commit 038d61fd642278bab63ee8ef722c50d10ab01e8f Author: Linus Torvalds Date: Sun Jul 27 14:26:38 2025 -0700 Linux 6.16 commit b711733e89a3f84c8e1e56e2328f9a0fa5facc7c Merge: ec2df4364666a9 67c632b4a7fbd6 Author: Linus Torvalds Date: Sun Jul 27 09:31:32 2025 -0700 Merge tag 'timers-urgent-2025-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix for the PTP systemcounter mechanism: The rework of this mechanism added a 'use_nsec' member to struct system_counterval. get_device_system_crosststamp() instantiates that struct on the stack and hands a pointer to the driver callback. Only the drivers which set use_nsec to true, initialize that field, but all others ignore it. As get_device_system_crosststamp() does not initialize the struct, the use_nsec field contains random stack content in those cases. That causes a miscalulation usually resulting in a failing range check in the best case. Initialize the structure before handing it to the drivers to cure that" * tag 'timers-urgent-2025-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Zero initialize system_counterval when querying time from phc drivers commit ec2df4364666a96e7868b7257bc7235bae263dcb Merge: 513fc69f8fc7f8 f820034864dd46 Author: Linus Torvalds Date: Sat Jul 26 14:38:33 2025 -0700 Merge tag 'spi-fix-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One last fix for v6.16, removing some hard coding to avoid data corruption on some NAND devices in the QPIC driver" * tag 'spi-fix-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-qpic-snand: don't hardcode ECC steps commit 513fc69f8fc7f85dfbdd35b6f59b6ef2da422e9c Merge: 874885990b1807 31f08841dd5d47 Author: Linus Torvalds Date: Sat Jul 26 14:25:41 2025 -0700 Merge tag 'i2c-for-6.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - qup: avoid potential hang when waiting for bus idle - tegra: improve ACPI reset error handling - virtio: use interruptible wait to prevent hang during transfer * tag 'i2c-for-6.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: qup: jump out of the loop in case of timeout i2c: virtio: Avoid hang by using interruptible completion wait i2c: tegra: Fix reset error handling with ACPI commit 874885990b18073213ff1797774c401df29676af Merge: 302f88ff3584a4 e4b2a0c2b9be6d Author: Linus Torvalds Date: Sat Jul 26 13:26:33 2025 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A few Allwinner clk driver fixes: - Mark Allwinner A523 MBUS clock as critical to avoid system stalls - Fix names of CSI related clocks on Allwinner V3s. This includes changes to the driver, DT bindings and DT files. - Fix parents of TCON clock on Allwinner V3s" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: v3s: Fix TCON clock parents clk: sunxi-ng: v3s: Fix CSI1 MCLK clock name clk: sunxi-ng: v3s: Fix CSI SCLK clock name clk: sunxi-ng: a523: Mark MBUS clock as critical commit 302f88ff3584a4ed7a169e534ba5c75d9ca92048 Merge: 6121f69c363370 53e7e1fb81cc8b Author: Linus Torvalds Date: Sat Jul 26 10:21:25 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM fixes from Russell King: - use an absolute path for asm/unified.h in KBUILD_AFLAGS to solve a regression caused by commit d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper flags and language target") - fix dead code elimination binutils version check again * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9450/1: Fix allowing linker DCE with binutils < 2.36 ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS commit 6121f69c36337076fb0ffaa23acee3cf8cc5c931 Merge: 5f33ebd2018ced 912b1f2a796ec7 Author: Linus Torvalds Date: Sat Jul 26 10:10:05 2025 -0700 Merge tag 'soc-fixes-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC fixes from Arnd Bergmann: "These are two fixes that came in late, one addresses a regression on a rockchips based board, the other is for ensuring a consistent dt binding for a device added in 6.16 before the incorrect one makes it into a release" * tag 'soc-fixes-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: rockchip: Drop netdev led-triggers on NanoPi R5S arm64: dts: allwinner: a523: Rename emac0 to gmac0 commit 31f08841dd5d479458ee98bdc91d63910ee19861 Merge: 89be9a83ccf1f8 a7982a14b30125 Author: Wolfram Sang Date: Sat Jul 26 00:59:39 2025 +0200 Merge tag 'i2c-host-fixes-6.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.16-rc8 qup: avoid potential hang when waiting for bus idle tegra: improve ACPI reset error handling virtio: use interruptible wait to prevent hang during transfer commit 5f33ebd2018ced2600b3fad2f8e2052498eb4072 Merge: 327579671a9bec 14e8f8e74dc137 Author: Linus Torvalds Date: Fri Jul 25 13:36:35 2025 -0700 Merge tag 'drm-fixes-2025-07-26' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes (part 2) from Dave Airlie: "Just the follow up fixes for i915 and xe, all pretty minor. i915: - Fix DP 2.7 Gbps DP_LINK_BW value on g4x - Fix return value on intel_atomic_commit_fence_wait xe: - Fix build without debugfs" * tag 'drm-fixes-2025-07-26' of https://gitlab.freedesktop.org/drm/kernel: drm/xe: Fix build without debugfs drm/i915/display: Fix dma_fence_wait_timeout() return value handling drm/i915/dp: Fix 2.7 Gbps DP_LINK_BW value on g4x commit 327579671a9becc43369f7c0637febe7e03d4003 Merge: 4bb01220911d2d 1966554b2e82b8 Author: Linus Torvalds Date: Fri Jul 25 08:05:17 2025 -0700 Merge tag 'block-6.16-20250725' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "Just a single fix for regression in this release, where a module reference could be leaked" * tag 'block-6.16-20250725' of git://git.kernel.dk/linux: block: fix module reference leak in mq-deadline I/O scheduler commit 4bb01220911d2dd6846573850937e89691f92e20 Merge: bef3012b2f6814 8b3c655fa2406b Author: Linus Torvalds Date: Fri Jul 25 08:00:48 2025 -0700 Merge tag 'vfs-6.16-rc8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "Two last-minute fixes for this cycle: - Set afs vllist to NULL if addr parsing fails - Add a missing check for reaching the end of the string in afs" * tag 'vfs-6.16-rc8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: afs: Set vllist to NULL if addr parsing fails afs: Fix check for NULL terminator commit bef3012b2f6814af2b5c5abd6b5f85921dbb8a01 Merge: 2942242dde896e c37495fe353164 Author: Linus Torvalds Date: Fri Jul 25 07:56:38 2025 -0700 Merge tag 'bcachefs-2025-07-24' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "User reported fixes: - Fix btree node scan on encrypted filesystems by not using btree node header fields encrypted - Fix a race in btree write buffer flush; this caused EROs primarily during fsck for some people" * tag 'bcachefs-2025-07-24' of git://evilpiepirate.org/bcachefs: bcachefs: Add missing snapshots_seen_add_inorder() bcachefs: Fix write buffer flushing from open journal entry bcachefs: btree_node_scan: don't re-read before initializing found_btree_node commit 53e7e1fb81cc8ba2da1cb31f8917ef397caafe91 Author: Nathan Chancellor Date: Mon Jul 14 20:56:47 2025 +0100 ARM: 9450/1: Fix allowing linker DCE with binutils < 2.36 Commit e7607f7d6d81 ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE") accidentally broke the binutils version restriction that was added in commit 0d437918fb64 ("ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION"), reintroducing the segmentation fault addressed by that workaround. Restore the binutils version dependency by using CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY as an additional condition to ensure that CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION is only enabled with binutils >= 2.36 and ld.lld >= 21.0.0. Closes: https://lore.kernel.org/6739da7d-e555-407a-b5cb-e5681da71056@landley.net/ Closes: https://lore.kernel.org/CAFERDQ0zPoya5ZQfpbeuKVZEo_fKsonLf6tJbp32QnSGAtbi+Q@mail.gmail.com/ Cc: stable@vger.kernel.org Fixes: e7607f7d6d81 ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE") Reported-by: Rob Landley Tested-by: Rob Landley Reported-by: Martin Wetterwald Signed-off-by: Nathan Chancellor Signed-off-by: Russell King (Oracle) commit 87c4e1459e80bf65066f864c762ef4dc932fad4b Author: Nathan Chancellor Date: Fri Jun 20 19:08:09 2025 +0100 ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS After commit d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper flags and language target"), which updated as-instr to use the 'assembler-with-cpp' language option, the Kbuild version of as-instr always fails internally for arch/arm with : fatal error: asm/unified.h: No such file or directory compilation terminated. because '-include' flags are now taken into account by the compiler driver and as-instr does not have '$(LINUXINCLUDE)', so unified.h is not found. This went unnoticed at the time of the Kbuild change because the last use of as-instr in Kbuild that arch/arm could reach was removed in 5.7 by commit 541ad0150ca4 ("arm: Remove 32bit KVM host support") but a stable backport of the Kbuild change to before that point exposed this potential issue if one were to be reintroduced. Follow the general pattern of '-include' paths throughout the tree and make unified.h absolute using '$(srctree)' to ensure KBUILD_AFLAGS can be used independently. Closes: https://lore.kernel.org/CACo-S-1qbCX4WAVFA63dWfHtrRHZBTyyr2js8Lx=Az03XHTTHg@mail.gmail.com/ Cc: stable@vger.kernel.org Fixes: d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper flags and language target") Reported-by: KernelCI bot Reviewed-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Signed-off-by: Russell King (Oracle) commit c37495fe3531647db4ae5787a80699ae1438d7cf Author: Kent Overstreet Date: Mon Jul 21 14:25:21 2025 -0400 bcachefs: Add missing snapshots_seen_add_inorder() This fixes an infinite loop when repairing "extent past end of inode", when the extent is an older snapshot than the inode that needs repair. Without the snaphsots_seen_add_inorder() we keep trying to delete the same extent, even though it's no longer visible in the inode's snapshot. Fixes: 63d6e9311999 ("bcachefs: bch2_fpunch_snapshot()") Signed-off-by: Kent Overstreet commit 1831840c2bc502c98c21df2ea0fa419b2ed0a6ec Author: Kent Overstreet Date: Mon Jul 21 23:41:50 2025 -0400 bcachefs: Fix write buffer flushing from open journal entry When flushing the btree write buffer, we pull write buffer keys directly from the journal instead of letting the journal write path copy them to the write buffer. When flushing from the currently open journal buffer, we have to block new reservations and wait for outstanding reservations to complete. Recheck the reservation state after blocking new reservations: previously, we were checking the reservation count from before calling __journal_block(). Signed-off-by: Kent Overstreet commit 2942242dde896ea8544f321617c86f941899c544 Merge: 94ce1ac2c9b492 0dec7201788b91 Author: Linus Torvalds Date: Thu Jul 24 19:13:30 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-07-24-18-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "11 hotfixes. 9 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. 7 are for MM" * tag 'mm-hotfixes-stable-2025-07-24-18-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: sprintf.h requires stdarg.h resource: fix false warning in __request_region() mm/damon/core: commit damos_quota_goal->nid kasan: use vmalloc_dump_obj() for vmalloc error reports mm/ksm: fix -Wsometimes-uninitialized from clang-21 in advisor_mode_show() mm: update MAINTAINERS entry for HMM nilfs2: reject invalid file types when reading inodes selftests/mm: fix split_huge_page_test for folio_split() tests mailmap: add entry for Senozhatsky mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list commit 14e8f8e74dc137ff9f1dfb2781784ceb19497ee5 Merge: e6b39e516c441f 99e91521cef80d Author: Dave Airlie Date: Fri Jul 25 11:01:39 2025 +1000 Merge tag 'drm-xe-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix build without debugfs (Lucas) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aIKWC2RPlbRxZc5o@fedora commit 0dec7201788b9152f06321d0dab46eed93834cda Author: Stephen Rothwell Date: Mon Jul 21 16:15:57 2025 +1000 sprintf.h requires stdarg.h In file included from drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs_utils.c:4: include/linux/sprintf.h:11:54: error: unknown type name 'va_list' 11 | __printf(2, 0) int vsprintf(char *buf, const char *, va_list); | ^~~~~~~ include/linux/sprintf.h:1:1: note: 'va_list' is defined in header ''; this is probably fixable by adding '#include ' Link: https://lkml.kernel.org/r/20250721173754.42865913@canb.auug.org.au Fixes: 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends") Signed-off-by: Stephen Rothwell Cc: Andriy Shevchenko Cc: Herbert Xu Cc: Petr Mladek Cc: Steven Rostedt Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton commit 91a229bb7ba86b2592c3f18c54b7b2c5e6fe0f95 Author: Akinobu Mita Date: Sat Jul 19 20:26:04 2025 +0900 resource: fix false warning in __request_region() A warning is raised when __request_region() detects a conflict with a resource whose resource.desc is IORES_DESC_DEVICE_PRIVATE_MEMORY. But this warning is only valid for iomem_resources. The hmem device resource uses resource.desc as the numa node id, which can cause spurious warnings. This warning appeared on a machine with multiple cxl memory expanders. One of the NUMA node id is 6, which is the same as the value of IORES_DESC_DEVICE_PRIVATE_MEMORY. In this environment it was just a spurious warning, but when I saw the warning I suspected a real problem so it's better to fix it. This change fixes this by restricting the warning to only iomem_resource. This also adds a missing new line to the warning message. Link: https://lkml.kernel.org/r/20250719112604.25500-1-akinobu.mita@gmail.com Fixes: 7dab174e2e27 ("dax/hmem: Move hmem device registration to dax_hmem.ko") Signed-off-by: Akinobu Mita Reviewed-by: Dan Williams Cc: Signed-off-by: Andrew Morton commit 1aef9df0ee90650ac3879dc994bb1a4b0e6dd83f Author: SeongJae Park Date: Sat Jul 19 11:19:32 2025 -0700 mm/damon/core: commit damos_quota_goal->nid DAMOS quota goal uses 'nid' field when the metric is DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP. But the goal commit function is not updating the goal's nid field. Fix it. Link: https://lkml.kernel.org/r/20250719181932.72944-1-sj@kernel.org Fixes: 0e1c773b501f ("mm/damon/core: introduce damos quota goal metrics for memory node utilization") [6.16.x] Signed-off-by: SeongJae Park Cc: Signed-off-by: Andrew Morton commit e6b39e516c441faecee20f3f34734ffa5ed834de Merge: 337666c522b9ec fd77b2c1b6eb7c Author: Dave Airlie Date: Fri Jul 25 10:57:21 2025 +1000 Merge tag 'drm-intel-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix DP 2.7 Gbps DP_LINK_BW value on g4x (Ville) - Fix return value on intel_atomic_commit_fence_wait (Aakash) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://lore.kernel.org/r/aIJE9F-PcCe35PFb@intel.com commit 94ce1ac2c9b4925c39fc976dc3f4421fc9230942 Merge: dd9c17322a6cc5 8c493cc91f3a11 Author: Linus Torvalds Date: Thu Jul 24 15:33:00 2025 -0700 Merge tag 'pci-v6.16-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fix from Bjorn Helgaas: - Create pwrctrl devices only when we need them, i.e., when CONFIG_PCI_PWRCTRL is enabled. This allows brcmstb to work around a pwrctrl regression by disabling CONFIG_PCI_PWRCTRL (Manivannan Sadhasivam) * tag 'pci-v6.16-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/pwrctrl: Create pwrctrl devices only when CONFIG_PCI_PWRCTRL is enabled commit 99e91521cef80d74e4fefed16a156848052b13df Author: Lucas De Marchi Date: Tue Jul 22 12:52:08 2025 -0700 drm/xe: Fix build without debugfs When CONFIG_DEBUG_FS is off, drivers/gpu/drm/xe/xe_gt_debugfs.o is not built and build fails on some setups with: ld: drivers/gpu/drm/xe/xe_gt.o: in function `xe_fault_inject_gt_reset': drivers/gpu/drm/xe/xe_gt.h:27:(.text+0x1659): undefined reference to `gt_reset_failure' ld: drivers/gpu/drm/xe/xe_gt.h:27:(.text+0x1c16): undefined reference to `gt_reset_failure' collect2: error: ld returned 1 exit status Do not use the gt_reset_failure attribute if debugfs is not enabled. Fixes: 8f3013e0b222 ("drm/xe: Introduce fault injection for gt reset") Cc: Himal Prasad Ghimiray Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250722-xe-fix-build-fault-v1-1-157384d50987@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 4d3bbe9dd28c0a4ca119e4b8823c5f5e9cb3ff90) Signed-off-by: Thomas Hellström commit dd9c17322a6cc56d57b5d2b0b84393ab76a55c80 Merge: cef6c8c92fafa5 0d57ed922b9a9b Author: Linus Torvalds Date: Thu Jul 24 09:15:16 2025 -0700 Merge tag 'sound-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Some last-minute fixes. All changes are device-specific small fixes or quirks, safe to apply" * tag 'sound-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: mediatek: common: fix device and OF node leak ALSA: hda/realtek: Fix mute LED mask on HP OMEN 16 laptop ALSA: usb-audio: qcom: Adjust mutex unlock order ASoC: SDCA: correct the calculation of the maximum init table size ASoC: rt5650: Eliminate the high frequency glitch ASoC: SOF: Intel: PTL: Add the sdw_process_wakeen op ALSA: hda/realtek - Add mute LED support for HP Pavilion 15-eg0xxx ALSA: hda/realtek - Add mute LED support for HP Victus 15-fa0xxx ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv commit cef6c8c92fafa58fa04d8622e89ed4871d121fc3 Merge: 407c114c983f6e d42e6c20de6192 Author: Linus Torvalds Date: Thu Jul 24 08:50:55 2025 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Two important arm64 fixes ahead of the 6.16 release. The first fixes a regression introduced during the merge window where the KVM UUID (which is used to advertise KVM-specific hypercalls for things like time synchronisation in the guest) was corrupted thanks to an endianness bug introduced when converting the code to use the UUID_INIT() helper. The second fixes a stack-pointer corruption issue during context-switch which has been observed in the wild when taking a pseudo-NMI with shadow call stack enabled. Summary: - Fix broken UUID value for the KVM/arm64 hypervisor SMCCC interface - Fix stack corruption on context-switch, primarily seen on (but not limited to) configurations with both pNMI and SCS enabled" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/entry: Mask DAIF in cpu_switch_to(), call_on_irq_stack() arm64: kvm, smccc: Fix vendor uuid commit 407c114c983f6eb87161853f0fdbe4a08e394b92 Merge: 25fae0b93d1d7d 291d5dc80eca1f Author: Linus Torvalds Date: Thu Jul 24 08:44:42 2025 -0700 Merge tag 'net-6.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from can and xfrm. The TI regression notified last week is actually on our net-next tree, it does not affect 6.16. We are investigating a virtio regression which is quite hard to reproduce - currently only our CI sporadically hits it. Hopefully it should not be critical, and I'm not sure that an additional week would be enough to solve it. Current release - fix to a fix: - sched: sch_qfq: avoid sleeping in atomic context in qfq_delete_class Previous releases - regressions: - xfrm: - set transport header to fix UDP GRO handling - delete x->tunnel as we delete x - eth: - mlx5: fix memory leak in cmd_exec() - i40e: when removing VF MAC filters, avoid losing PF-set MAC - gve: fix stuck TX queue for DQ queue format Previous releases - always broken: - can: fix NULL pointer deref of struct can_priv::do_set_mode - eth: - ice: fix a null pointer dereference in ice_copy_and_init_pkg() - ism: fix concurrency management in ism_cmd() - dpaa2: fix device reference count leak in MAC endpoint handling - icssg-prueth: fix buffer allocation for ICSSG Misc: - selftests: mptcp: increase code coverage" * tag 'net-6.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (34 commits) net: hns3: default enable tx bounce buffer when smmu enabled net: hns3: fixed vf get max channels bug net: hns3: disable interrupt when ptp init failed net: hns3: fix concurrent setting vlan filter issue s390/ism: fix concurrency management in ism_cmd() selftests: drv-net: wait for iperf client to stop sending MAINTAINERS: Add in6.h to MAINTAINERS selftests: netfilter: tone-down conntrack clash test can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class gve: Fix stuck TX queue for DQ queue format net: appletalk: Fix use-after-free in AARP proxy probe net: bcmasp: Restore programming of TX map vector register selftests: mptcp: connect: also cover checksum selftests: mptcp: connect: also cover alt modes e1000e: ignore uninitialized checksum word on tgp e1000e: disregard NVM checksum on tgp when valid checksum bit is not set ice: Fix a null pointer dereference in ice_copy_and_init_pkg() i40e: When removing VF MAC filters, only check PF-set MAC i40e: report VF tx_dropped with tx_errors instead of tx_discards ... commit 291d5dc80eca1fc67a0fa4c861d13c101345501a Merge: 89fd905dab912a 28712d6ed32028 Author: Paolo Abeni Date: Thu Jul 24 12:30:39 2025 +0200 Merge tag 'ipsec-2025-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2025-07-23 1) Premption fixes for xfrm_state_find. From Sabrina Dubroca. 2) Initialize offload path also for SW IPsec GRO. This fixes a performance regression on SW IPsec offload. From Leon Romanovsky. 3) Fix IPsec UDP GRO for IKE packets. From Tobias Brunner, 4) Fix transport header setting for IPcomp after decompressing. From Fernando Fernandez Mancera. 5) Fix use-after-free when xfrmi_changelink tries to change collect_md for a xfrm interface. From Eyal Birger . 6) Delete the special IPcomp x->tunnel state along with the state x to avoid refcount problems. From Sabrina Dubroca. Please pull or let me know if there are problems. * tag 'ipsec-2025-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: Revert "xfrm: destroy xfrm_state synchronously on net exit path" xfrm: delete x->tunnel as we delete x xfrm: interface: fix use-after-free after changing collect_md xfrm interface xfrm: ipcomp: adjust transport header after decompressing xfrm: Set transport header to fix UDP GRO handling xfrm: always initialize offload path xfrm: state: use a consistent pcpu_id in xfrm_state_find xfrm: state: initialize state_ptrs earlier in xfrm_state_find ==================== Link: https://patch.msgid.link/20250723075417.3432644-1-steffen.klassert@secunet.com Signed-off-by: Paolo Abeni commit 89fd905dab912a5712149ec5c06d251ceaedf743 Merge: 897e8601b9cff1 49ade8630f36e9 Author: Paolo Abeni Date: Thu Jul 24 11:27:26 2025 +0200 Merge branch 'there-are-some-bugfix-for-the-hns3-ethernet-driver' Jijie Shao says: ==================== There are some bugfix for the HNS3 ethernet driver v1: https://lore.kernel.org/all/20250702130901.2879031-1-shaojijie@huawei.com/ ==================== Link: https://patch.msgid.link/20250722125423.1270673-1-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit 49ade8630f36e9dca2395592cfb0b7deeb07e746 Author: Jijie Shao Date: Tue Jul 22 20:54:23 2025 +0800 net: hns3: default enable tx bounce buffer when smmu enabled The SMMU engine on HIP09 chip has a hardware issue. SMMU pagetable prefetch features may prefetch and use a invalid PTE even the PTE is valid at that time. This will cause the device trigger fake pagefaults. The solution is to avoid prefetching by adding a SYNC command when smmu mapping a iova. But the performance of nic has a sharp drop. Then we do this workaround, always enable tx bounce buffer, avoid mapping/unmapping on TX path. This issue only affects HNS3, so we always enable tx bounce buffer when smmu enabled to improve performance. Fixes: 295ba232a8c3 ("net: hns3: add device version to replace pci revision") Signed-off-by: Jian Shen Signed-off-by: Jijie Shao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722125423.1270673-5-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit b3e75c0bcc53f647311960bc1b0970b9b480ca5a Author: Jian Shen Date: Tue Jul 22 20:54:22 2025 +0800 net: hns3: fixed vf get max channels bug Currently, the queried maximum of vf channels is the maximum of channels supported by each TC. However, the actual maximum of channels is the maximum of channels supported by the device. Fixes: 849e46077689 ("net: hns3: add ethtool_ops.get_channels support for VF") Signed-off-by: Jian Shen Signed-off-by: Hao Lan Signed-off-by: Jijie Shao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722125423.1270673-4-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit cde304655f25d94a996c45b0f9956e7dcc2bc4c0 Author: Yonglong Liu Date: Tue Jul 22 20:54:21 2025 +0800 net: hns3: disable interrupt when ptp init failed When ptp init failed, we'd better disable the interrupt and clear the flag, to avoid early report interrupt at next probe. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Yonglong Liu Signed-off-by: Jijie Shao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722125423.1270673-3-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit 4555f8f8b6aa46940f55feb6a07704c2935b6d6e Author: Jian Shen Date: Tue Jul 22 20:54:20 2025 +0800 net: hns3: fix concurrent setting vlan filter issue The vport->req_vlan_fltr_en may be changed concurrently by function hclge_sync_vlan_fltr_state() called in periodic work task and function hclge_enable_vport_vlan_filter() called by user configuration. It may cause the user configuration inoperative. Fixes it by protect the vport->req_vlan_fltr by vport_lock. Fixes: 2ba306627f59 ("net: hns3: add support for modify VLAN filter state") Signed-off-by: Jian Shen Signed-off-by: Jijie Shao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722125423.1270673-2-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit 897e8601b9cff1d054cdd53047f568b0e1995726 Author: Halil Pasic Date: Tue Jul 22 18:18:17 2025 +0200 s390/ism: fix concurrency management in ism_cmd() The s390x ISM device data sheet clearly states that only one request-response sequence is allowable per ISM function at any point in time. Unfortunately as of today the s390/ism driver in Linux does not honor that requirement. This patch aims to rectify that. This problem was discovered based on Aliaksei's bug report which states that for certain workloads the ISM functions end up entering error state (with PEC 2 as seen from the logs) after a while and as a consequence connections handled by the respective function break, and for future connection requests the ISM device is not considered -- given it is in a dysfunctional state. During further debugging PEC 3A was observed as well. A kernel message like [ 1211.244319] zpci: 061a:00:00.0: Event 0x2 reports an error for PCI function 0x61a is a reliable indicator of the stated function entering error state with PEC 2. Let me also point out that a kernel message like [ 1211.244325] zpci: 061a:00:00.0: The ism driver bound to the device does not support error recovery is a reliable indicator that the ISM function won't be auto-recovered because the ISM driver currently lacks support for it. On a technical level, without this synchronization, commands (inputs to the FW) may be partially or fully overwritten (corrupted) by another CPU trying to issue commands on the same function. There is hard evidence that this can lead to DMB token values being used as DMB IOVAs, leading to PEC 2 PCI events indicating invalid DMA. But this is only one of the failure modes imaginable. In theory even completely losing one command and executing another one twice and then trying to interpret the outputs as if the command we intended to execute was actually executed and not the other one is also possible. Frankly, I don't feel confident about providing an exhaustive list of possible consequences. Fixes: 684b89bc39ce ("s390/ism: add device driver for internal shared memory") Reported-by: Aliaksei Makarau Tested-by: Mahanta Jambigi Tested-by: Aliaksei Makarau Signed-off-by: Halil Pasic Reviewed-by: Alexandra Winter Signed-off-by: Alexandra Winter Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722161817.1298473-1-wintera@linux.ibm.com Signed-off-by: Paolo Abeni commit 0d57ed922b9a9b0d36c90a992e076d850b779be5 Merge: 931837cd924048 696e123aa36bf0 Author: Takashi Iwai Date: Thu Jul 24 08:45:13 2025 +0200 Merge tag 'asoc-fix-v6.16-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 A few device specific fixes, none especially remarkable though all useful. commit 25fae0b93d1d7ddb25958bcb90c3c0e5e0e202bd Merge: f9af7b5d9349bf 337666c522b9ec Author: Linus Torvalds Date: Wed Jul 23 18:56:24 2025 -0700 Merge tag 'drm-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "This might just be part one, but I'm sending it a bit early as it has two sets of reverts for regressions, one is all the gem/dma-buf handling and another was a nouveau ioctl change. Otherwise there is an amdgpu fix, nouveau fix and a scheduler fix. If any other changes come in I'll follow up with another more usual Fri/Sat MR. gem: - revert all the dma-buf/gem changes as there as lifetime issues with them nouveau: - revert an ioctl change as it causes issues - fix NULL ptr on fermi bridge: - remove extra semicolon sched: - remove hang causing optimisation amdgpu: - fix garbage in cleared vram after resume" * tag 'drm-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/kernel: drm/bridge: ti-sn65dsi86: Remove extra semicolon in ti_sn_bridge_probe() Revert "drm/nouveau: check ioctl command codes better" drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Revert "drm/gem-dma: Use dma_buf from GEM object instance" Revert "drm/gem-shmem: Use dma_buf from GEM object instance" Revert "drm/gem-framebuffer: Use dma_buf from GEM object instance" Revert "drm/prime: Use dma_buf from GEM object instance" Revert "drm/etnaviv: Use dma_buf from GEM object instance" Revert "drm/vmwgfx: Use dma_buf from GEM object instance" Revert "drm/virtio: Use dma_buf from GEM object instance" drm/sched: Remove optimization that causes hang when killing dependent jobs drm/amdgpu: Reset the clear flag in buddy during resume commit 86941382508850d58c11bdafe0fec646dfd31b09 Author: Nimrod Oren Date: Tue Jul 22 15:26:55 2025 +0300 selftests: drv-net: wait for iperf client to stop sending A few packets may still be sent out during the termination of iperf processes. These late packets cause failures in rss_ctx.py when they arrive on queues expected to be empty. Example failure observed: Check failed 2 != 0 traffic on inactive queues (context 1): [0, 0, 1, 1, 386385, 397196, 0, 0, 0, 0, ...] Check failed 4 != 0 traffic on inactive queues (context 2): [0, 0, 0, 0, 2, 2, 247152, 253013, 0, 0, ...] Check failed 2 != 0 traffic on inactive queues (context 3): [0, 0, 0, 0, 0, 0, 1, 1, 282434, 283070, ...] To avoid such failures, wait until all client sockets for the requested port are either closed or in the TIME_WAIT state. Fixes: 847aa551fa78 ("selftests: drv-net: rss_ctx: factor out send traffic and check") Signed-off-by: Nimrod Oren Reviewed-by: Gal Pressman Reviewed-by: Carolina Jubran Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722122655.3194442-1-noren@nvidia.com Signed-off-by: Jakub Kicinski commit a7982a14b3012527a9583d12525cd0dc9f8d8934 Author: Yang Xiwen Date: Mon Jun 16 00:01:10 2025 +0800 i2c: qup: jump out of the loop in case of timeout Original logic only sets the return value but doesn't jump out of the loop if the bus is kept active by a client. This is not expected. A malicious or buggy i2c client can hang the kernel in this case and should be avoided. This is observed during a long time test with a PCA953x GPIO extender. Fix it by changing the logic to not only sets the return value, but also jumps out of the loop and return to the caller with -ETIMEDOUT. Fixes: fbfab1ab0658 ("i2c: qup: reorganization of driver code to remove polling for qup v1") Signed-off-by: Yang Xiwen Cc: # v4.17+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250616-qca-i2c-v1-1-2a8d37ee0a30@outlook.com commit a663b3c47ab10f66130818cf94eb59c971541c3f Author: Viresh Kumar Date: Thu Jul 3 17:01:02 2025 +0530 i2c: virtio: Avoid hang by using interruptible completion wait The current implementation uses wait_for_completion(), which can cause the caller to hang indefinitely if the transfer never completes. Switch to wait_for_completion_interruptible() so that the operation can be interrupted by signals. Fixes: 84e1d0bf1d71 ("i2c: virtio: disable timeout handling") Signed-off-by: Viresh Kumar Cc: # v5.16+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/b8944e9cab8eb959d888ae80add6f2a686159ba2.1751541962.git.viresh.kumar@linaro.org commit 56344e241c543f17e8102fa13466ad5c3e7dc9ff Author: Akhil R Date: Thu Jul 10 18:42:04 2025 +0530 i2c: tegra: Fix reset error handling with ACPI The acpi_evaluate_object() returns an ACPI error code and not Linux one. For the some platforms the err will have positive code which may be interpreted incorrectly. Use device_reset() for reset control which handles it correctly. Fixes: bd2fdedbf2ba ("i2c: tegra: Add the ACPI support") Reported-by: Andy Shevchenko Signed-off-by: Akhil R Cc: # v5.17+ Reviewed-by: Andy Shevchenko Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250710131206.2316-2-akhilrajeev@nvidia.com commit 14822f782700a094baa9b5966cc047a9b1b31701 Author: Kees Cook Date: Tue Jul 22 09:56:49 2025 -0700 MAINTAINERS: Add in6.h to MAINTAINERS My CC-adding automation returned nothing on a future patch to the include/linux/in6.h file, and I went looking for why. Add the missed in6.h to MAINTAINERS. Signed-off-by: Kees Cook Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250722165645.work.047-kees@kernel.org Signed-off-by: Jakub Kicinski commit f9af7b5d9349bf92cc4d0a0baa8a151295f12f4b Merge: 01a412d06bc578 5a53249d149f48 Author: Linus Torvalds Date: Wed Jul 23 15:04:27 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fix from Paolo Bonzini: - Fix cleanup mistake (probably a cut-and-paste error) in a Xen hypercall * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/xen: Fix cleanup logic in emulation of Xen schedop poll hypercalls commit 5a53249d149f48b558368c5338b9921b76a12f8c Author: Manuel Andreas Date: Wed Jul 23 17:51:20 2025 +0200 KVM: x86/xen: Fix cleanup logic in emulation of Xen schedop poll hypercalls kvm_xen_schedop_poll does a kmalloc_array() when a VM polls the host for more than one event channel potr (nr_ports > 1). After the kmalloc_array(), the error paths need to go through the "out" label, but the call to kvm_read_guest_virt() does not. Fixes: 92c58965e965 ("KVM: x86/xen: Use kvm_read_guest_virt() instead of open-coding it badly") Reviewed-by: David Woodhouse Signed-off-by: Manuel Andreas [Adjusted commit message. - Paolo] Signed-off-by: Paolo Bonzini commit 337666c522b9eca36deabf4133f7b2279155b69f Merge: 89be9a83ccf1f8 15a7ca747d9538 Author: Dave Airlie Date: Thu Jul 24 06:49:38 2025 +1000 Merge tag 'drm-misc-fixes-2025-07-23' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc8/final?: - Revert all uses of drm_gem_object->dmabuf to drm_gem_object->import_attach->dmabuf. - Fix amdgpu returning BIOS cluttered VRAM after resume. - Scheduler hang fix. - Revert nouveau ioctl fix as it caused regressions. - Fix null pointer deref in nouveau. - Fix unnecessary semicolon in ti_sn_bridge_probe. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/72235afd-c849-49fe-9cc1-2b1781abdf08@linux.intel.com commit 01a412d06bc5786eb4e44a6c8f0f4659bd4c9864 Merge: 964ebc07c546c7 e09a335a819133 Author: Linus Torvalds Date: Wed Jul 23 08:53:38 2025 -0700 Merge tag 'pull-ufs-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ufs fix from Al Viro: "Fix regression in ufs options parsing" * tag 'pull-ufs-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the regression in ufs options parsing commit e09a335a819133c0a9d6799adcf6d51837a7da2d Author: Al Viro Date: Sun Jul 20 16:43:53 2025 -0400 fix the regression in ufs options parsing A really dumb braino on rebasing and a dumber fuckup with managing #for-next Fixes: b70cb459890b ("ufs: convert ufs to the new mount API") Fucked-up-by: Al Viro Signed-off-by: Al Viro commit fd77b2c1b6eb7c7d2087e2c2b37c671d47fd2d4f Author: Aakash Deep Sarkar Date: Tue Jul 8 07:45:40 2025 +0000 drm/i915/display: Fix dma_fence_wait_timeout() return value handling dma_fence_wait_timeout returns a long type but the driver is only using the lower 32 bits of the retval and discarding the upper 32 bits. This is particularly problematic if there are already signalled or stub fences on some of the hw planes. In this case the dma_fence_wait_timeout function will immediately return with timeout value MAX_SCHEDULE_TIMEOUT (0x7fffffffffffffff) since the fence is already signalled. If the driver only uses the lower 32 bits of this return value then it'll interpret it as an error code (0xFFFFFFFF or (-1)) and skip the wait on the remaining fences. This issue was first observed in the xe driver with the Android compositor where the GPU composited layer was not properly waited on when there were stub fences in other overlay planes resulting in visual artifacts. Fixes: d59cf7bb73f3c ("drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence") Signed-off-by: Aakash Deep Sarkar Reviewed-by: Matthew Brost Signed-off-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250708074540.1948068-1-aakash.deep.sarkar@intel.com (cherry picked from commit cdb16039515a5ac4d2c923f7a651cf19a803a3fe) Signed-off-by: Rodrigo Vivi commit f820034864dd463cdcd2bebe7940f2eca0eb4223 Author: Gabor Juhos Date: Wed Jul 23 10:06:43 2025 +0200 spi: spi-qpic-snand: don't hardcode ECC steps NAND devices with different page sizes requires different number of ECC steps, yet the qcom_spi_ecc_init_ctx_pipelined() function sets 4 steps in 'ecc_cfg' unconditionally. The correct number of the steps is calculated earlier in the function already, so use that instead of the hardcoded value. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250723-qpic-snand-fix-steps-v1-1-d800695dde4c@gmail.com Signed-off-by: Mark Brown commit 696e123aa36bf0bc72bda98df96dd8f379a6e854 Author: Johan Hovold Date: Tue Jul 22 11:25:42 2025 +0200 ASoC: mediatek: common: fix device and OF node leak Make sure to drop the references to the accdet OF node and platform device taken by of_parse_phandle() and of_find_device_by_node() after looking up the sound component during probe. Fixes: cf536e2622e2 ("ASoC: mediatek: common: Handle mediatek,accdet property") Cc: stable@vger.kernel.org # 6.15 Cc: Nícolas F. R. A. Prado Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20250722092542.32754-1-johan@kernel.org Signed-off-by: Mark Brown commit 8b3c655fa2406b9853138142746a39b7615c54a2 Author: Edward Adam Davis Date: Mon Jul 21 15:26:51 2025 +0100 afs: Set vllist to NULL if addr parsing fails syzbot reported a bug in in afs_put_vlserverlist. kAFS: bad VL server IP address BUG: unable to handle page fault for address: fffffffffffffffa ... Oops: Oops: 0002 [#1] SMP KASAN PTI ... RIP: 0010:refcount_dec_and_test include/linux/refcount.h:450 [inline] RIP: 0010:afs_put_vlserverlist+0x3a/0x220 fs/afs/vl_list.c:67 ... Call Trace: afs_alloc_cell fs/afs/cell.c:218 [inline] afs_lookup_cell+0x12a5/0x1680 fs/afs/cell.c:264 afs_cell_init+0x17a/0x380 fs/afs/cell.c:386 afs_proc_rootcell_write+0x21f/0x290 fs/afs/proc.c:247 proc_simple_write+0x114/0x1b0 fs/proc/generic.c:825 pde_write fs/proc/inode.c:330 [inline] proc_reg_write+0x23d/0x330 fs/proc/inode.c:342 vfs_write+0x25c/0x1180 fs/read_write.c:682 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Because afs_parse_text_addrs() parses incorrectly, its return value -EINVAL is assigned to vllist, which results in -EINVAL being used as the vllist address when afs_put_vlserverlist() is executed. Set the vllist value to NULL when a parsing error occurs to avoid this issue. Fixes: e2c2cb8ef07a ("afs: Simplify cell record handling") Reported-by: syzbot+5c042fbab0b292c98fc6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5c042fbab0b292c98fc6 Tested-by: syzbot+5c042fbab0b292c98fc6@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: David Howells Link: https://lore.kernel.org/4119365.1753108011@warthog.procyon.org.uk cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 9aa64182952db7d931201ab4fcdf767c11fb4ab0 Author: Leo Stone Date: Mon Jul 21 15:29:12 2025 +0100 afs: Fix check for NULL terminator Add a missing check for reaching the end of the string while attempting to split a command. Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities") Reported-by: syzbot+7741f872f3c53385a2e2@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7741f872f3c53385a2e2 Signed-off-by: Leo Stone Signed-off-by: David Howells Link: https://lore.kernel.org/4119428.1753108152@warthog.procyon.org.uk Acked-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 67e9d0b40bd7990d6eab63b5afedea3c17578993 Merge: dca56cc8b5c3be c1f3f9797c1f44 Author: Jakub Kicinski Date: Tue Jul 22 18:39:51 2025 -0700 Merge tag 'linux-can-fixes-for-6.16-20250722' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-07-22 The patch is by me and fixes a potential NULL pointer deref in the CAN device driver infrastructure. It can be triggered from user space. * tag 'linux-can-fixes-for-6.16-20250722' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode ==================== Link: https://patch.msgid.link/20250722110059.3664104-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit dca56cc8b5c3bee889d6cb0d2ee3e933b21cb4ec Author: Florian Westphal Date: Tue Jul 22 00:36:49 2025 +0200 selftests: netfilter: tone-down conntrack clash test The test is supposed to observe that the 'clash_resolve' stat counter incremented (i.e., the code path was covered). This check was incorrect, 'conntrack -S' needs to be called in the revevant namespace, not the initial netns. The clash resolution logic in conntrack is only exercised when multiple packets with the same udp quadruple race. Depending on kernel config, number of CPUs, scheduling policy etc. this might not trigger even after several retries. Thus the script eventually returns SKIP if the retry count is exceeded. The udpclash tool with also exit with a failure if it did not observe the expected number of replies. In the script, make a note of this but do not fail anymore, just check if the clash resolution logic triggered after all. Remove the 'single-core' test: while unlikely, with preemptible kernel it should be possible to also trigger clash resolution logic. With this change the test will either SKIP or pass. Hard error could be restored later once its clear whats going on, so also dump 'conntrack -S' when some packets went missing to see if conntrack dropped them on insert. Fixes: 78a588363587 ("selftests: netfilter: add conntrack clash resolution test case") Signed-off-by: Florian Westphal Link: https://patch.msgid.link/20250721223652.6956-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 71c33df471a6ed40cc3ec7902cf889d813219b07 Merge: cf074eca0065bc 61114910a5f6a7 Author: Jakub Kicinski Date: Tue Jul 22 18:24:10 2025 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-07-21 (i40e, ice, e1000e) For i40e: Dennis Chen adjusts reporting of VF Tx dropped to a more appropriate field. Jamie Bainbridge fixes a check which can cause a PF set VF MAC address to be lost. For ice: Haoxiang Li adds an error check in DDP load to prevent NULL pointer dereference. For e1000e: Jacek Kowalski adds workarounds for issues surrounding Tiger Lake platforms with uninitialized NVMs. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000e: ignore uninitialized checksum word on tgp e1000e: disregard NVM checksum on tgp when valid checksum bit is not set ice: Fix a null pointer dereference in ice_copy_and_init_pkg() i40e: When removing VF MAC filters, only check PF-set MAC i40e: report VF tx_dropped with tx_errors instead of tx_discards ==================== Link: https://patch.msgid.link/20250721173733.2248057-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 912b1f2a796ec73530a709b11821cb0c249fb23e Author: Diederik de Haas Date: Tue Jul 22 14:35:33 2025 +0200 arm64: dts: rockchip: Drop netdev led-triggers on NanoPi R5S Sometimes the netdev triggers causes tasks to get blocked for more then 120 seconds, which in turn makes the (WAN) network port on the NanoPi R5S fail to come up. This results in the following (partial) trace: INFO: task kworker/0:1:11 blocked for more than 120 seconds. Not tainted 6.16-rc6+unreleased-arm64-cknow #1 Debian 6.16~rc6-1~exp1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/0:1 state:D stack:0 pid:11 tgid:11 ppid:2 task_flags:0x4208060 flags:0x00000010 Workqueue: events_power_efficient reg_check_chans_work [cfg80211] Call trace: __switch_to+0xf8/0x168 (T) __schedule+0x3f8/0xda8 schedule+0x3c/0x120 schedule_preempt_disabled+0x2c/0x58 __mutex_lock.constprop.0+0x4d0/0xab8 __mutex_lock_slowpath+0x1c/0x30 mutex_lock+0x50/0x68 rtnl_lock+0x20/0x38 reg_check_chans_work+0x40/0x478 [cfg80211] process_one_work+0x178/0x3e0 worker_thread+0x260/0x390 kthread+0x150/0x250 ret_from_fork+0x10/0x20 INFO: task kworker/0:1:11 is blocked on a mutex likely owned by task dhcpcd:615. task:dhcpcd state:D stack:0 pid:615 tgid:615 ppid:614 task_flags:0x400140 flags:0x00000018 Call trace: __switch_to+0xf8/0x168 (T) __schedule+0x3f8/0xda8 schedule+0x3c/0x120 schedule_preempt_disabled+0x2c/0x58 rwsem_down_write_slowpath+0x1e4/0x750 down_write+0x98/0xb0 led_trigger_register+0x134/0x1c0 phy_led_triggers_register+0xf4/0x258 [libphy] phy_attach_direct+0x30c/0x390 [libphy] phylink_fwnode_phy_connect+0xb0/0x138 [phylink] __stmmac_open+0xec/0x520 [stmmac] stmmac_open+0x4c/0xe8 [stmmac] __dev_open+0x130/0x2e0 __dev_change_flags+0x1c4/0x248 netif_change_flags+0x2c/0x80 dev_change_flags+0x88/0xc8 devinet_ioctl+0x35c/0x610 inet_ioctl+0x204/0x260 sock_do_ioctl+0x6c/0x140 sock_ioctl+0x2e4/0x388 __arm64_sys_ioctl+0xb4/0x120 invoke_syscall+0x6c/0x100 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x188 el0t_64_sync_handler+0x10c/0x140 el0t_64_sync+0x198/0x1a0 In order to not introduce a regression with kernel 6.16, drop the netdev triggers for now while the problem is being investigated further. Fixes: 1631cbdb8089 ("arm64: dts: rockchip: Improve LED config for NanoPi R5S") Helped-by: Robin Murphy Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250722123628.25660-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner Signed-off-by: Arnd Bergmann commit 8c493cc91f3a1102ad2f8c75ae0cf80f0a057488 Author: Manivannan Sadhasivam Date: Tue Jul 1 12:17:31 2025 +0530 PCI/pwrctrl: Create pwrctrl devices only when CONFIG_PCI_PWRCTRL is enabled If devicetree describes power supplies related to a PCI device, we unnecessarily created a pwrctrl device even if CONFIG_PCI_PWRCTL was not enabled. We only need pci_pwrctrl_create_device() when CONFIG_PCI_PWRCTRL is enabled. Compile it out when CONFIG_PCI_PWRCTRL is not enabled. When pci_pwrctrl_create_device() creates and returns a pwrctrl device, pci_scan_device() doesn't enumerate the PCI device. It assumes the pwrctrl core will rescan the bus after turning on the power. However, if CONFIG_PCI_PWRCTRL is not enabled, the rescan never happens, which breaks PCI enumeration on any system that describes power supplies in devicetree but does not use pwrctrl. Jim reported that some brcmstb platforms break this way. The brcmstb driver is still broken if CONFIG_PCI_PWRCTRL is enabled, but this commit at least allows brcmstb to work when it's NOT enabled. Fixes: 957f40d039a9 ("PCI/pwrctrl: Move creation of pwrctrl devices to pci_scan_device()") Reported-by: Jim Quinlan Link: https://lore.kernel.org/r/CA+-6iNwgaByXEYD3j=-+H_PKAxXRU78svPMRHDKKci8AGXAUPg@mail.gmail.com Signed-off-by: Manivannan Sadhasivam [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner Cc: stable@vger.kernel.org # v6.15 Link: https://patch.msgid.link/20250701064731.52901-1-manivannan.sadhasivam@linaro.org commit 931837cd924048ab785eedb4cee5b276c90a2924 Author: SHARAN KUMAR M Date: Tue Jul 22 22:52:24 2025 +0530 ALSA: hda/realtek: Fix mute LED mask on HP OMEN 16 laptop this patch is to fix my previous Commit i have fixed mute led but for by This patch corrects the coefficient mask value introduced in commit , which was intended to enable the mute LED functionality. During testing, multiple values were evaluated, and an incorrect value was mistakenly included in the final commit. This update fixes that error by applying the correct mask value for proper mute LED behavior. Tested on 6.15.5-arch1-1 Fixes: e5182305a519 ("ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx") Signed-off-by: SHARAN KUMAR M Link: https://patch.msgid.link/20250722172224.15359-1-sharweshraajan@gmail.com Signed-off-by: Takashi Iwai commit d42e6c20de6192f8e4ab4cf10be8c694ef27e8cb Author: Ada Couprie Diaz Date: Fri Jul 18 15:28:14 2025 +0100 arm64/entry: Mask DAIF in cpu_switch_to(), call_on_irq_stack() `cpu_switch_to()` and `call_on_irq_stack()` manipulate SP to change to different stacks along with the Shadow Call Stack if it is enabled. Those two stack changes cannot be done atomically and both functions can be interrupted by SErrors or Debug Exceptions which, though unlikely, is very much broken : if interrupted, we can end up with mismatched stacks and Shadow Call Stack leading to clobbered stacks. In `cpu_switch_to()`, it can happen when SP_EL0 points to the new task, but x18 stills points to the old task's SCS. When the interrupt handler tries to save the task's SCS pointer, it will save the old task SCS pointer (x18) into the new task struct (pointed to by SP_EL0), clobbering it. In `call_on_irq_stack()`, it can happen when switching from the task stack to the IRQ stack and when switching back. In both cases, we can be interrupted when the SCS pointer points to the IRQ SCS, but SP points to the task stack. The nested interrupt handler pushes its return addresses on the IRQ SCS. It then detects that SP points to the task stack, calls `call_on_irq_stack()` and clobbers the task SCS pointer with the IRQ SCS pointer, which it will also use ! This leads to tasks returning to addresses on the wrong SCS, or even on the IRQ SCS, triggering kernel panics via CONFIG_VMAP_STACK or FPAC if enabled. This is possible on a default config, but unlikely. However, when enabling CONFIG_ARM64_PSEUDO_NMI, DAIF is unmasked and instead the GIC is responsible for filtering what interrupts the CPU should receive based on priority. Given the goal of emulating NMIs, pseudo-NMIs can be received by the CPU even in `cpu_switch_to()` and `call_on_irq_stack()`, possibly *very* frequently depending on the system configuration and workload, leading to unpredictable kernel panics. Completely mask DAIF in `cpu_switch_to()` and restore it when returning. Do the same in `call_on_irq_stack()`, but restore and mask around the branch. Mask DAIF even if CONFIG_SHADOW_CALL_STACK is not enabled for consistency of behaviour between all configurations. Introduce and use an assembly macro for saving and masking DAIF, as the existing one saves but only masks IF. Cc: Signed-off-by: Ada Couprie Diaz Reported-by: Cristian Prundeanu Fixes: 59b37fe52f49 ("arm64: Stash shadow stack pointer in the task struct on interrupt") Tested-by: Cristian Prundeanu Acked-by: Will Deacon Link: https://lore.kernel.org/r/20250718142814.133329-1-ada.coupriediaz@arm.com Signed-off-by: Will Deacon commit 15a7ca747d9538c2ad8b0c81dd4c1261e0736c82 Author: Douglas Anderson Date: Mon Jul 14 13:06:32 2025 -0700 drm/bridge: ti-sn65dsi86: Remove extra semicolon in ti_sn_bridge_probe() As reported by the kernel test robot, a recent patch introduced an unnecessary semicolon. Remove it. Fixes: 55e8ff842051 ("drm/bridge: ti-sn65dsi86: Add HPD for DisplayPort connector type") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506301704.0SBj6ply-lkp@intel.com/ Reviewed-by: Devarsh Thakkar Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250714130631.1.I1cfae3222e344a3b3c770d079ee6b6f7f3b5d636@changeid commit 67c632b4a7fbd6b76a08b86f4950f0f84de93439 Author: Markus Blöchl Date: Sun Jul 20 15:54:51 2025 +0200 timekeeping: Zero initialize system_counterval when querying time from phc drivers Most drivers only populate the fields cycles and cs_id of system_counterval in their get_time_fn() callback for get_device_system_crosststamp(), unless they explicitly provide nanosecond values. When the use_nsecs field was added to struct system_counterval, most drivers did not care. Clock sources other than CSID_GENERIC could then get converted in convert_base_to_cs() based on an uninitialized use_nsecs field, which usually results in -EINVAL during the following range check. Pass in a fully zero initialized system_counterval_t to cure that. Fixes: 6b2e29977518 ("timekeeping: Provide infrastructure for converting to/from a base clock") Signed-off-by: Markus Blöchl Signed-off-by: Thomas Gleixner Acked-by: John Stultz Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250720-timekeeping_uninit_crossts-v2-1-f513c885b7c2@blochl.de commit 270b329f7ec4e4e8dca6735bd1fe286a8e39b82d Author: Arnd Bergmann Date: Tue Jul 22 13:58:18 2025 +0200 Revert "drm/nouveau: check ioctl command codes better" My previous patch ended up causing a regression for the DRM_IOCTL_NOUVEAU_NVIF ioctl. The intention of my patch was to only pass ioctl commands that have the correct dir/type/nr bits into the nouveau_abi16_ioctl() function. This turned out to be too strict, as userspace does use at least write-only and write-read direction settings. Checking for both of these still did not fix the issue, so the best we can do for the 6.16 release is to revert back to what we've had since linux-3.16. This version is still fragile, but at least it is known to work with existing userspace. Fixing this properly requires a better understanding of what commands are being passed from userspace in practice, and how that relies on the undocumented (miss)behavior in nouveau_drm_ioctl(). Fixes: e5478166dffb ("drm/nouveau: check ioctl command codes better") Reported-by: Satadru Pramanik Closes: https://lore.kernel.org/lkml/CAFrh3J85tsZRpOHQtKgNHUVnn=EG=QKBnZTRtWS8eWSc1K1xkA@mail.gmail.com/ Reported-by: Chris Bainbridge Closes: https://lore.kernel.org/lkml/aH9n_QGMFx2ZbKlw@debian.local/ Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250722115830.2587297-1-arnd@kernel.org [ Add Closes: tags, fix minor typo in commit message. - Danilo ] Signed-off-by: Danilo Krummrich commit c1f3f9797c1f44a762e6f5f72520b2e520537b52 Author: Marc Kleine-Budde Date: Tue Jul 15 22:35:46 2025 +0200 can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode Andrei Lalaev reported a NULL pointer deref when a CAN device is restarted from Bus Off and the driver does not implement the struct can_priv::do_set_mode callback. There are 2 code path that call struct can_priv::do_set_mode: - directly by a manual restart from the user space, via can_changelink() - delayed automatic restart after bus off (deactivated by default) To prevent the NULL pointer deference, refuse a manual restart or configure the automatic restart delay in can_changelink() and report the error via extack to user space. As an additional safety measure let can_restart() return an error if can_priv::do_set_mode is not set instead of dereferencing it unchecked. Reported-by: Andrei Lalaev Closes: https://lore.kernel.org/all/20250714175520.307467-1-andrey.lalaev@gmail.com Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") Link: https://patch.msgid.link/20250718-fix-nullptr-deref-do_set_mode-v1-1-0b520097bb96@pengutronix.de Signed-off-by: Marc Kleine-Budde commit cf074eca0065bc5142e6004ae236bb35a2687fdf Author: Xiang Mei Date: Thu Jul 17 16:01:28 2025 -0700 net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class might_sleep could be trigger in the atomic context in qfq_delete_class. qfq_destroy_class was moved into atomic context locked by sch_tree_lock to avoid a race condition bug on qfq_aggregate. However, might_sleep could be triggered by qfq_destroy_class, which introduced sleeping in atomic context (path: qfq_destroy_class->qdisc_put->__qdisc_destroy->lockdep_unregister_key ->might_sleep). Considering the race is on the qfq_aggregate objects, keeping qfq_rm_from_agg in the lock but moving the left part out can solve this issue. Fixes: 5e28d5a3f774 ("net/sched: sch_qfq: Fix race condition on qfq_aggregate") Reported-by: Dan Carpenter Signed-off-by: Xiang Mei Link: https://patch.msgid.link/4a04e0cc-a64b-44e7-9213-2880ed641d77@sabinyo.mountain Reviewed-by: Cong Wang Reviewed-by: Dan Carpenter Link: https://patch.msgid.link/20250717230128.159766-1-xmei5@asu.edu Signed-off-by: Paolo Abeni commit 48915162b5ad598bc6fbf8959683f43664b4f6f1 Author: Erick Karanja Date: Mon Jul 21 14:45:53 2025 +0300 ALSA: usb-audio: qcom: Adjust mutex unlock order The mutexes qdev_mutex and chip->mutex are acquired in that order throughout the driver. To preserve proper lock hierarchy and avoid potential deadlocks, they must be released in the reverse order of acquisition. This change reorders the unlock sequence to first release chip->mutex followed by qdev_mutex, ensuring consistency with the locking pattern. [ fixed the code indentations and Fixes tag by tiwai ] Fixes: 326bbc348298a ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Signed-off-by: Erick Karanja Link: https://patch.msgid.link/20250721114554.1666104-1-karanja99erick@gmail.com Signed-off-by: Takashi Iwai commit b03f15c0192b184078206760c839054ae6eb4eaa Author: Praveen Kaligineedi Date: Thu Jul 17 19:20:24 2025 +0000 gve: Fix stuck TX queue for DQ queue format gve_tx_timeout was calculating missed completions in a way that is only relevant in the GQ queue format. Additionally, it was attempting to disable device interrupts, which is not needed in either GQ or DQ queue formats. As a result, TX timeouts with the DQ queue format likely would have triggered early resets without kicking the queue at all. This patch drops the check for pending work altogether and always kicks the queue after validating the queue has not seen a TX timeout too recently. Cc: stable@vger.kernel.org Fixes: 87a7f321bb6a ("gve: Recover from queue stall due to missed IRQ") Co-developed-by: Tim Hostetler Signed-off-by: Tim Hostetler Signed-off-by: Praveen Kaligineedi Signed-off-by: Harshitha Ramamurthy Link: https://patch.msgid.link/20250717192024.1820931-1-hramamurthy@google.com Signed-off-by: Jakub Kicinski commit 6c4a92d07b0850342d3becf2e608f805e972467c Author: Kito Xu (veritas501) Date: Thu Jul 17 01:28:43 2025 +0000 net: appletalk: Fix use-after-free in AARP proxy probe The AARP proxy‐probe routine (aarp_proxy_probe_network) sends a probe, releases the aarp_lock, sleeps, then re-acquires the lock. During that window an expire timer thread (__aarp_expire_timer) can remove and kfree() the same entry, leading to a use-after-free. race condition: cpu 0 | cpu 1 atalk_sendmsg() | atif_proxy_probe_device() aarp_send_ddp() | aarp_proxy_probe_network() mod_timer() | lock(aarp_lock) // LOCK!! timeout around 200ms | alloc(aarp_entry) and then call | proxies[hash] = aarp_entry aarp_expire_timeout() | aarp_send_probe() | unlock(aarp_lock) // UNLOCK!! lock(aarp_lock) // LOCK!! | msleep(100); __aarp_expire_timer(&proxies[ct]) | free(aarp_entry) | unlock(aarp_lock) // UNLOCK!! | | lock(aarp_lock) // LOCK!! | UAF aarp_entry !! ================================================================== BUG: KASAN: slab-use-after-free in aarp_proxy_probe_network+0x560/0x630 net/appletalk/aarp.c:493 Read of size 4 at addr ffff8880123aa360 by task repro/13278 CPU: 3 UID: 0 PID: 13278 Comm: repro Not tainted 6.15.2 #3 PREEMPT(full) Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1b0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc1/0x630 mm/kasan/report.c:521 kasan_report+0xca/0x100 mm/kasan/report.c:634 aarp_proxy_probe_network+0x560/0x630 net/appletalk/aarp.c:493 atif_proxy_probe_device net/appletalk/ddp.c:332 [inline] atif_ioctl+0xb58/0x16c0 net/appletalk/ddp.c:857 atalk_ioctl+0x198/0x2f0 net/appletalk/ddp.c:1818 sock_do_ioctl+0xdc/0x260 net/socket.c:1190 sock_ioctl+0x239/0x6a0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x194/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcb/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated: aarp_alloc net/appletalk/aarp.c:382 [inline] aarp_proxy_probe_network+0xd8/0x630 net/appletalk/aarp.c:468 atif_proxy_probe_device net/appletalk/ddp.c:332 [inline] atif_ioctl+0xb58/0x16c0 net/appletalk/ddp.c:857 atalk_ioctl+0x198/0x2f0 net/appletalk/ddp.c:1818 Freed: kfree+0x148/0x4d0 mm/slub.c:4841 __aarp_expire net/appletalk/aarp.c:90 [inline] __aarp_expire_timer net/appletalk/aarp.c:261 [inline] aarp_expire_timeout+0x480/0x6e0 net/appletalk/aarp.c:317 The buggy address belongs to the object at ffff8880123aa300 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 96 bytes inside of freed 192-byte region [ffff8880123aa300, ffff8880123aa3c0) Memory state around the buggy address: ffff8880123aa200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880123aa280: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880123aa300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880123aa380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880123aa400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kito Xu (veritas501) Link: https://patch.msgid.link/20250717012843.880423-1-hxzene@gmail.com Signed-off-by: Jakub Kicinski commit 18ff09c1b94fa1584b31d3f4e9eecdca29230ce5 Author: Florian Fainelli Date: Fri Jul 18 14:22:42 2025 -0700 net: bcmasp: Restore programming of TX map vector register On ASP versions v2.x we need to program the TX map vector register to properly exercise end-to-end flow control, otherwise the TX engine can either lock-up, or cause the hardware calculated checksum to be wrong/corrupted when multiple back to back packets are being submitted for transmission. This register defaults to 0, which means no flow control being applied. Fixes: e9f31435ee7d ("net: bcmasp: Add support for asp-v3.0") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20250718212242.3447751-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski commit 53b2fb6b05cd343aa22367857c0e97aef72e8087 Merge: 81e0db8e839822 fdf0f60a2bb02b Author: Jakub Kicinski Date: Mon Jul 21 16:21:32 2025 -0700 Merge branch 'selftests-mptcp-connect-cover-alt-modes' Matthieu Baerts says: ==================== selftests: mptcp: connect: cover alt modes mptcp_connect.sh can be executed manually with "-m " and "-C" to make sure everything works as expected when using "mmap" and "sendfile" modes instead of "poll", and with the MPTCP checksum support. These modes should be validated, but they are not when the selftests are executed via the kselftest helpers. It means that most CIs validating these selftests, like NIPA for the net development trees and LKFT for the stable ones, are not covering these modes. To fix that, new test programs have been added, simply calling mptcp_connect.sh with the right parameters. The first patch can be backported up to v5.6, and the second one up to v5.14. v1: https://lore.kernel.org/20250714-net-mptcp-sft-connect-alt-v1-0-bf1c5abbe575@kernel.org ==================== Link: https://patch.msgid.link/20250715-net-mptcp-sft-connect-alt-v2-0-8230ddd82454@kernel.org Signed-off-by: Jakub Kicinski commit fdf0f60a2bb02ba581d9e71d583e69dd0714a521 Author: Matthieu Baerts (NGI0) Date: Tue Jul 15 20:43:29 2025 +0200 selftests: mptcp: connect: also cover checksum The checksum mode has been added a while ago, but it is only validated when manually launching mptcp_connect.sh with "-C". The different CIs were then not validating these MPTCP Connect tests with checksum enabled. To make sure they do, add a new test program executing mptcp_connect.sh with the checksum mode. Fixes: 94d66ba1d8e4 ("selftests: mptcp: enable checksum in mptcp_connect.sh") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250715-net-mptcp-sft-connect-alt-v2-2-8230ddd82454@kernel.org Signed-off-by: Jakub Kicinski commit 37848a456fc38c191aedfe41f662cc24db8c23d9 Author: Matthieu Baerts (NGI0) Date: Tue Jul 15 20:43:28 2025 +0200 selftests: mptcp: connect: also cover alt modes The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when mptcp_connect.sh is manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers. The MPTCP CI was manually running "mptcp_connect.sh -m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes. To make sure these modes are validated by these CIs, add two new test programs executing mptcp_connect.sh with the alternate modes. Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250715-net-mptcp-sft-connect-alt-v2-1-8230ddd82454@kernel.org Signed-off-by: Jakub Kicinski commit 61114910a5f6a71d0b6ea3b95082dfe031b19dfe Author: Jacek Kowalski Date: Mon Jun 30 10:35:00 2025 +0200 e1000e: ignore uninitialized checksum word on tgp As described by Vitaly Lifshits: > Starting from Tiger Lake, LAN NVM is locked for writes by SW, so the > driver cannot perform checksum validation and correction. This means > that all NVM images must leave the factory with correct checksum and > checksum valid bit set. Unfortunately some systems have left the factory with an uninitialized value of 0xFFFF at register address 0x3F (checksum word location). So on Tiger Lake platform we ignore the computed checksum when such condition is encountered. Signed-off-by: Jacek Kowalski Tested-by: Vlad URSU Fixes: 4051f68318ca9 ("e1000e: Do not take care about recovery NVM checksum") Cc: stable@vger.kernel.org Reviewed-by: Simon Horman Reviewed-by: Vitaly Lifshits Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 536fd741c7ac907d63166cdae1081b1febfab613 Author: Jacek Kowalski Date: Mon Jun 30 10:33:39 2025 +0200 e1000e: disregard NVM checksum on tgp when valid checksum bit is not set As described by Vitaly Lifshits: > Starting from Tiger Lake, LAN NVM is locked for writes by SW, so the > driver cannot perform checksum validation and correction. This means > that all NVM images must leave the factory with correct checksum and > checksum valid bit set. Since Tiger Lake devices were the first to have > this lock, some systems in the field did not meet this requirement. > Therefore, for these transitional devices we skip checksum update and > verification, if the valid bit is not set. Signed-off-by: Jacek Kowalski Reviewed-by: Simon Horman Reviewed-by: Vitaly Lifshits Fixes: 4051f68318ca9 ("e1000e: Do not take care about recovery NVM checksum") Cc: stable@vger.kernel.org Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 4ff12d82dac119b4b99b5a78b5af3bf2474c0a36 Author: Haoxiang Li Date: Thu Jul 3 17:52:32 2025 +0800 ice: Fix a null pointer dereference in ice_copy_and_init_pkg() Add check for the return value of devm_kmemdup() to prevent potential null pointer dereference. Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Michal Swiatkowski Reviewed-by: Aleksandr Loktionov Reviewed-by: Simon Horman Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5a0df02999dbe838c3feed54b1d59e9445f68b89 Author: Jamie Bainbridge Date: Wed Jun 25 09:29:18 2025 +1000 i40e: When removing VF MAC filters, only check PF-set MAC When the PF is processing an Admin Queue message to delete a VF's MACs from the MAC filter, we currently check if the PF set the MAC and if the VF is trusted. This results in undesirable behaviour, where if a trusted VF with a PF-set MAC sets itself down (which sends an AQ message to delete the VF's MAC filters) then the VF MAC is erased from the interface. This results in the VF losing its PF-set MAC which should not happen. There is no need to check for trust at all, because an untrusted VF cannot change its own MAC. The only check needed is whether the PF set the MAC. If the PF set the MAC, then don't erase the MAC on link-down. Resolve this by changing the deletion check only for PF-set MAC. (the out-of-tree driver has also intentionally removed the check for VF trust here with OOT driver version 2.26.8, this changes the Linux kernel driver behaviour and comment to match the OOT driver behaviour) Fixes: ea2a1cfc3b201 ("i40e: Fix VF MAC filter removal") Signed-off-by: Jamie Bainbridge Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 50b2af451597ca6eefe9d4543f8bbf8de8aa00e7 Author: Dennis Chen Date: Wed Jun 18 15:52:40 2025 -0400 i40e: report VF tx_dropped with tx_errors instead of tx_discards Currently the tx_dropped field in VF stats is not updated correctly when reading stats from the PF. This is because it reads from i40e_eth_stats.tx_discards which seems to be unused for per VSI stats, as it is not updated by i40e_update_eth_stats() and the corresponding register, GLV_TDPC, is not implemented[1]. Use i40e_eth_stats.tx_errors instead, which is actually updated by i40e_update_eth_stats() by reading from GLV_TEPC. To test, create a VF and try to send bad packets through it: $ echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs $ cat test.py from scapy.all import * vlan_pkt = Ether(dst="ff:ff:ff:ff:ff:ff") / Dot1Q(vlan=999) / IP(dst="192.168.0.1") / ICMP() ttl_pkt = IP(dst="8.8.8.8", ttl=0) / ICMP() print("Send packet with bad VLAN tag") sendp(vlan_pkt, iface="enp2s0f0v0") print("Send packet with TTL=0") sendp(ttl_pkt, iface="enp2s0f0v0") $ ip -s link show dev enp2s0f0 16: enp2s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 3c:ec:ef:b7:e0:ac brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 vf 0 link/ether e2:c6:fd:c1:1e:92 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off RX: bytes packets mcast bcast dropped 0 0 0 0 0 TX: bytes packets dropped 0 0 0 $ python test.py Send packet with bad VLAN tag . Sent 1 packets. Send packet with TTL=0 . Sent 1 packets. $ ip -s link show dev enp2s0f0 16: enp2s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 3c:ec:ef:b7:e0:ac brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 vf 0 link/ether e2:c6:fd:c1:1e:92 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off RX: bytes packets mcast bcast dropped 0 0 0 0 0 TX: bytes packets dropped 0 0 0 A packet with non-existent VLAN tag and a packet with TTL = 0 are sent, but tx_dropped is not incremented. After patch: $ ip -s link show dev enp2s0f0 19: enp2s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 3c:ec:ef:b7:e0:ac brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 0 0 0 vf 0 link/ether 4a:b7:3d:37:f7:56 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off RX: bytes packets mcast bcast dropped 0 0 0 0 0 TX: bytes packets dropped 0 0 2 Fixes: dc645daef9af5bcbd9c ("i40e: implement VF stats NDO") Signed-off-by: Dennis Chen Link: https://www.intel.com/content/www/us/en/content-details/596333/intel-ethernet-controller-x710-tm4-at2-carlsville-datasheet.html Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit ab16122115327b2a602595f539cae7e39a331d0e Author: Jack Thomson Date: Mon Jul 21 14:05:58 2025 +0100 arm64: kvm, smccc: Fix vendor uuid Commit 13423063c7cb ("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID") replaced the explicit register constants with the UUID_INIT macro. However, there is an endian issue, meaning the UUID generated and used in the handshake didn't match UUID prior to the commit. The change in UUID causes the SMCCC vendor handshake to fail with older guest kernels, meaning devices such as PTP were not available in the guest. This patch updates the parameters to the macro to generate a UUID which matches the previous value, and re-establish backwards compatibility with older guest kernels. Fixes: 13423063c7cb ("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID") Signed-off-by: Jack Thomson Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250721130558.50823-1-jackabt.amazon@gmail.com Signed-off-by: Will Deacon commit e4b2a0c2b9be6d10b0e50a7485fe9f569a6f2436 Merge: a42b4dcc4f9f30 01fdcbc7e5a56c Author: Stephen Boyd Date: Mon Jul 21 10:17:51 2025 -0700 Merge tag 'sunxi-clk-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull Allwinner clock fixes from Chen-Yu Tsai: - Mark A523 MBUS clock as critical - Fix names of CSI related clocks on V3s This includes changes to the driver, DT bindings and DT files. - Fix parents of TCON clock on V3s * tag 'sunxi-clk-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: v3s: Fix TCON clock parents clk: sunxi-ng: v3s: Fix CSI1 MCLK clock name clk: sunxi-ng: v3s: Fix CSI SCLK clock name clk: sunxi-ng: a523: Mark MBUS clock as critical commit 964ebc07c546c76b78aea5b6dff0d02c602d4793 Merge: 89be9a83ccf1f8 e2967b50b70997 Author: Linus Torvalds Date: Mon Jul 21 08:32:36 2025 -0700 Merge tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform drivers fixes from Ilpo Järvinen: - power supply code: - Add get/set property direct to allow avoiding taking psy->extensions_sem twice from power supply extensions - alienware-wmi-wmax: - Add AWCC support for Alienware Area-51m and m15 R5 - Fix `dmi_system_id` array termination - arm64: huawei-gaokun-ec: fix OF node leak - dell-ddv: Fix taking psy->extensions_sem twice - dell-lis3lv02d: Add Precision 3551 accelerometer support - firmware_attributes_class: Fix initialization order - ideapad-laptop: Retain FnLock and kbd backlight across boots - lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED - mellanox: mlxbf-pmc: Validate event names and bool input * tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: MAINTAINERS: Update entries for IFS and SBL drivers platform/x86: dell-lis3lv02d: Add Precision 3551 platform/x86: alieneware-wmi-wmax: Add AWCC support to more laptops platform/x86: Fix initialization order for firmware_attributes_class platform: arm64: huawei-gaokun-ec: fix OF node leak lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots platform/x86: ideapad-laptop: Fix FnLock not remembered among boots platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input platform/mellanox: mlxbf-pmc: Validate event/enable input platform/mellanox: mlxbf-pmc: Remove newline char from event name input platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice power: supply: test-power: Test access to extended power supply power: supply: core: Add power_supply_get/set_property_direct() platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array commit 9e55f1192648a5b327f03c60e411126b3d19c5c5 Author: Shuming Fan Date: Mon Jul 21 19:23:34 2025 +0800 ASoC: SDCA: correct the calculation of the maximum init table size One initial setting is 5 bytes, so num_init_writes should divide by 5. Signed-off-by: Shuming Fan Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20250721112334.388506-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 9e0c433d0c05fde284025264b89eaa4ad59f0a3e Author: Ville Syrjälä Date: Thu Jul 10 23:17:12 2025 +0300 drm/i915/dp: Fix 2.7 Gbps DP_LINK_BW value on g4x On g4x we currently use the 96MHz non-SSC refclk, which can't actually generate an exact 2.7 Gbps link rate. In practice we end up with 2.688 Gbps which seems to be close enough to actually work, but link training is currently failing due to miscalculating the DP_LINK_BW value (we calcualte it directly from port_clock which reflects the actual PLL outpout frequency). Ideas how to fix this: - nudge port_clock back up to 270000 during PLL computation/readout - track port_clock and the nominal link rate separately so they might differ a bit - switch to the 100MHz refclk, but that one should be SSC so perhaps not something we want While we ponder about a better solution apply some band aid to the immediate issue of miscalculated DP_LINK_BW value. With this I can again use 2.7 Gbps link rate on g4x. Cc: stable@vger.kernel.org Fixes: 665a7b04092c ("drm/i915: Feed the DPLL output freq back into crtc_state") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250710201718.25310-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit a8b874694db5cae7baaf522756f87acd956e6e66) Signed-off-by: Rodrigo Vivi commit d312962188dd1f682b0351ccf9933334738ac462 Author: Derek Fang Date: Mon Jul 21 11:47:28 2025 +0800 ASoC: rt5650: Eliminate the high frequency glitch The glitch was detected in the high frequency of the HP playback. This patch adjusts the DAC dither setting to avoid this situation for almost all cases. Signed-off-by: Derek Fang Link: https://patch.msgid.link/20250721034728.1396238-1-derek.fang@realtek.com Signed-off-by: Mark Brown commit 0503ac474a3d57b62ea40c7720058ae42668d948 Author: Ranjani Sridharan Date: Mon Jul 21 14:30:38 2025 +0800 ASoC: SOF: Intel: PTL: Add the sdw_process_wakeen op Add the missing op in the device description to avoid issues with jack detection. Signed-off-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250721063039.2234279-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit e2967b50b709970547b5cdfa1b42526835327f36 Author: Jithu Joseph Date: Mon Jul 14 09:46:43 2025 -0700 MAINTAINERS: Update entries for IFS and SBL drivers Update the MAINTAINERS file to reflect the following changes for two Intel platform drivers: - Tony has agreed to take over maintainership of the Intel In-Field Scan (IFS) driver, and is now listed as the new maintainer. - Remove myself as the maintainer for the Slim BootLoader (SBL) firmware update driver and mark it as Orphan. To the best of my knowledge, there is no one familiar with SBL who can take over this role. These changes are being made as I will soon be leaving Intel. Signed-off-by: Jithu Joseph Acked-by: Tony Luck Link: https://lore.kernel.org/r/20250714164643.3879784-1-jithu.joseph@intel.com Signed-off-by: Ilpo Järvinen commit 491254fff9a8dcb4af99bf2fb40f1e63a7257fd3 Author: Ben Skeggs Date: Mon Jul 14 12:59:23 2025 +1000 drm/nouveau/nvif: fix null ptr deref on pre-fermi boards Check that gpfifo.post() exists before trying to call it. Fixes: 862450a85b85 ("drm/nouveau/gf100-: track chan progress with non-WFI semaphore release") Reported-by: Jamie Heilman Closes: https://lore.kernel.org/lkml/aElJIo9_Se6tAR1a@audible.transient.net/ Reported-by: Rui Salvaterra Closes: https://lore.kernel.org/all/CALjTZvZgH0N43rMTcZiDVSX93PFL680hsYPwtp8=Ja1OWPvZ1A@mail.gmail.com/ Tested-by: Rui Salvaterra Signed-off-by: Ben Skeggs Link: https://lore.kernel.org/r/20250714025923.29591-1-bskeggs@nvidia.com Signed-off-by: Danilo Krummrich commit 9744ede7099e8a69c04aa23fbea44c15bc390c04 Author: Dawid Rezler Date: Sun Jul 20 17:49:08 2025 +0200 ALSA: hda/realtek - Add mute LED support for HP Pavilion 15-eg0xxx The mute LED on the HP Pavilion Laptop 15-eg0xxx, which uses the ALC287 codec, didn't work. This patch fixes the issue by enabling the ALC287_FIXUP_HP_GPIO_LED quirk. Tested on a physical device, the LED now works as intended. Signed-off-by: Dawid Rezler Cc: Link: https://patch.msgid.link/20250720154907.80815-2-dawidrezler.patches@gmail.com Signed-off-by: Takashi Iwai commit 89be9a83ccf1f88522317ce02f854f30d6115c41 Author: Linus Torvalds Date: Sun Jul 20 15:18:33 2025 -0700 Linux 6.16-rc7 commit 2013e8c2e6fd3a4bdf4ccc658ad20a4469360eff Merge: c10ee5cc1217c7 b5e8acc14dcb31 Author: Linus Torvalds Date: Sun Jul 20 13:03:31 2025 -0700 Merge tag 'trace-v6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix timerlat with use of FORTIFY_SOURCE FORTIFY_SOURCE was added to the stack tracer where it compares the entry->caller array to having entry->size elements. timerlat has the following: memcpy(&entry->caller, fstack->calls, size); entry->size = size; Which triggers FORTIFY_SOURCE as the caller is populated before the entry->size is initialized. Swap the order to satisfy FORTIFY_SOURCE logic. - Add down_write(trace_event_sem) when adding trace events in modules Trace events being added to the ftrace_events array are protected by the trace_event_sem semaphore. But when loading modules that have trace events, the addition of the events are not protected by the semaphore and loading two modules that have events at the same time can corrupt the list. Also add a lockdep_assert_held(trace_event_sem) to _trace_add_event_dirs() to confirm it is held when iterating the list. * tag 'trace-v6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Add down_write(trace_event_sem) when adding trace event tracing/osnoise: Fix crash in timerlat_dump_stack() commit c10ee5cc1217c79dfa606c432aa95d5ee2e81083 Merge: 07fa9cad54609d a8780906ca2604 Author: Linus Torvalds Date: Sun Jul 20 12:56:13 2025 -0700 Merge tag 'i2c-for-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "omap: - add missing error check - fix PM disable in probe error path stm32: - unmap DMA buffer on transfer failure - use correct device when mapping and unmapping during transfers" * tag 'i2c-for-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: stm32f7: unmap DMA mapped buffer i2c: stm32: fix the device used for the DMA map i2c: omap: Fix an error handling path in omap_i2c_probe() i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe() commit 1966554b2e82b89d4f6490f430ce76a379e23f1f Author: Nilay Shroff Date: Sat Jul 19 18:56:47 2025 +0530 block: fix module reference leak in mq-deadline I/O scheduler During probe, when the block layer registers a request queue, it defaults to the mq-deadline I/O scheduler if the device is single-queue and the mq-deadline module is available. To determine availability, the elevator_set_default() invokes elevator_find_get(), which increments the module's reference count. However, this reference is never released, resulting in a module reference leak that prevents the mq-deadline module from being unloaded. This patch fixes the issue by ensuring the acquired module reference is properly released. Fixes: 1e44bedbc921 ("block: unifying elevator change") Signed-off-by: Nilay Shroff Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250719132722.769536-1-nilay@linux.ibm.com Signed-off-by: Jens Axboe commit 07fa9cad54609df3eea00cd5b167df6088ce01a6 Merge: 92329d578d60fe 6b995d01683fea Author: Linus Torvalds Date: Sun Jul 20 11:27:52 2025 -0700 Merge tag 'x86-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 bug fix from Thomas Gleixner: "A single fix for a GCC wreckage, which emits a KCSAN instrumentation call in __sev_es_nmi_complete() despite the function being annotated with 'noinstr'. As all functions in that source file are noinstr, exclude the whole file from KCSAN in the Makefile to cure it" * tag 'x86-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Work around broken noinstr on GCC commit 92329d578d60fe944e30da287ee28f5c154a5802 Merge: 62347e279092ae d0a48dc4df5c98 Author: Linus Torvalds Date: Sun Jul 20 11:22:05 2025 -0700 Merge tag 'locking-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A single fix for the futex selftest code to make 32-bit user space work correctly on 64-bit kernels. sys_futex_wait() expects a struct __kernel_timespec for the timeout, but the selftest uses struct timespec, which is the original 32-bit non 2038 compliant variant. Fix it up by converting the callsite supplied timespec to a __kernel_timespec and hand that into the syscall" * tag 'locking-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode commit 62347e279092ae704877467abdc8533e914f945e Merge: 5f054ef2e0f1ca 36569780b0d64d Author: Linus Torvalds Date: Sun Jul 20 11:08:51 2025 -0700 Merge tag 'sched-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single fix for the scheduler. A recent commit changed the runqueue counter nr_uninterruptible to an unsigned int. Due to the fact that the counters are not updated on migration of a uninterruptble task to a different CPU, these counters can exceed INT_MAX. The counter is cast to long in the load average calculation, which means that the cast expands into negative space resulting in bogus load average values. Convert it back to unsigned long to fix this. * tag 'sched-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Change nr_uninterruptible type to unsigned long commit eef91707009ad8d98e0d397d58df47caa6ff2330 Author: Kent Overstreet Date: Sat Jul 19 20:47:09 2025 -0400 bcachefs: btree_node_scan: don't re-read before initializing found_btree_node If the btree node is encrypted, this caused us to initialize found_btree_node from the encrypted header. Signed-off-by: Kent Overstreet commit 5f054ef2e0f1ca7d32ac48e275d08e2ac29d84f3 Merge: 4f066b189f9162 a4131a50d072b3 Author: Linus Torvalds Date: Sun Jul 20 09:29:43 2025 -0700 Merge tag 'hyperv-fixes-signed-20250718' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Select use CONFIG_SYSFB only if EFI is enabled (Michael Kelley) - An assorted set of fixes to remove warnings for missing export.h header inclusion (Naman Jain) - An assorted set of fixes for when Linux run as the root partition for Microsoft Hypervisor (Mukesh Rathor, Nuno Das Neves, Stanislav Kinsburskii) - Fix the check for HYPERVISOR_CALLBACK_VECTOR (Naman Jain) - Fix fcopy tool to handle irregularities with size of ring buffer (Naman Jain) - Fix incorrect file path conversion in fcopy tool (Yasumasa Suenaga) * tag 'hyperv-fixes-signed-20250718' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: tools/hv: fcopy: Fix irregularities with size of ring buffer PCI: hv: Use the correct hypercall for unmasking interrupts on nested x86/hyperv: Expose hv_map_msi_interrupt() Drivers: hv: Use nested hypercall for post message and signal event x86/hyperv: Clean up hv_map/unmap_interrupt() return values x86/hyperv: Fix usage of cpu_online_mask to get valid cpu PCI: hv: Don't load the driver for baremetal root partition net: mana: Fix warnings for missing export.h header inclusion PCI: hv: Fix warnings for missing export.h header inclusion clocksource: hyper-v: Fix warnings for missing export.h header inclusion x86/hyperv: Fix warnings for missing export.h header inclusion Drivers: hv: Fix warnings for missing export.h header inclusion Drivers: hv: Fix the check for HYPERVISOR_CALLBACK_VECTOR tools/hv: fcopy: Fix incorrect file path conversion Drivers: hv: Select CONFIG_SYSFB only if EFI is enabled commit 4f066b189f91622f3a3a231736659f25eb6e30b0 Merge: 673cf893b66a7d 2521106fc732b0 Author: Linus Torvalds Date: Sun Jul 20 09:21:53 2025 -0700 Merge tag 'usb-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are some USB and Thunderbolt driver fixes for reported problems for 6.16-rc6. Included in here are: - Thunderbolt fixes for some much-reported issues - dwc2 driver fixes - dwc3 driver fixes - new usb-serial driver device ids - gadgetfs configfs fix - musb driver fix - USB hub driver fix All of these have been in linux-next for a while with no reported problems" * tag 'usb-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: hub: Don't try to recover devices lost during warm reset. usb: dwc2: gadget: Fix enter to hibernation for UTMI+ PHY usb: dwc3: qcom: Don't leave BCR asserted USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI usb: gadget: configfs: Fix OOB read on empty string write usb: musb: fix gadget state on disconnect USB: serial: option: add Foxconn T99W640 thunderbolt: Fix bit masking in tb_dp_port_set_hops() thunderbolt: Fix wake on connect at runtime commit 673cf893b66a7dd76c9378f4506b3d4a870c80b2 Merge: b933c72d650abf 6c0e9f05c9d787 Author: Linus Torvalds Date: Sun Jul 20 09:14:32 2025 -0700 Merge tag 'tty-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial driver fixes from Greg KH: "Here are two serial driver fixes for 6.16-rc6 that do: - fix for the serial core OF resource leak - pch_uart driver fix for a "incorrect variable" issue Both of these have been in linux-next for over a week with no reported problems" * tag 'tty-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: pch_uart: Fix dma_sync_sg_for_device() nents value serial: core: fix OF node leak commit b933c72d650abfb833b6ef700c26271d0a252f37 Merge: ecf11d31bf5ccd f2b8ebfb867011 Author: Linus Torvalds Date: Sun Jul 20 09:08:55 2025 -0700 Merge tag 'staging-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some small driver fixes for the vchiq_arm staging driver: - reverts of previous changes that turned out to caused problems. - change to prevent a resource leak All of these have been in linux-next this week with no reported problems" * tag 'staging-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: vchiq_arm: Make vchiq_shutdown never fail Revert "staging: vchiq_arm: Create keep-alive thread during probe" Revert "staging: vchiq_arm: Improve initial VCHIQ connect" commit ecf11d31bf5ccde62c91abe94d4edb867b64958f Merge: 990b11a523a80d 2d7521aa26ec2d Author: Linus Torvalds Date: Sun Jul 20 09:03:41 2025 -0700 Merge tag 'char-misc-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc / IIO fixes from Greg KH: "Here are some char/misc/iio and other driver fixes for 6.16-rc7. Included in here are: - IIO driver fixes for reported problems - Interconnect driver fixes for reported problems - nvmem driver fixes - bunch of comedi driver fixes for long-term bugs - Kconfig dependancy fixes for mux drivers - other small driver fixes for reported problems. All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (35 commits) nvmem: layouts: u-boot-env: remove crc32 endianness conversion misc: amd-sbi: Explicitly clear in/out arg "mb_in_out" misc: amd-sbi: Address copy_to/from_user() warning reported in smatch misc: amd-sbi: Address potential integer overflow issue reported in smatch comedi: comedi_test: Fix possible deletion of uninitialized timers comedi: Fix initialization of data for instructions that write to subdevice comedi: Fix use of uninitialized data in insn_rw_emulate_bits() comedi: das6402: Fix bit shift out of bounds comedi: aio_iiro_16: Fix bit shift out of bounds comedi: pcl812: Fix bit shift out of bounds comedi: das16m1: Fix bit shift out of bounds comedi: Fix some signed shift left operations comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large nvmem: imx-ocotp: fix MAC address byte length MAINTAINERS: add miscdevice Rust abstractions mux: mmio: Fix missing CONFIG_REGMAP_MMIO iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode iio: adc: ad7380: fix adi,gain-milli property parsing iio: adc: ad7949: use spi_is_bpw_supported() iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush ... commit 990b11a523a80de81ca4eacb1bdac80ad78fdf11 Merge: 875dd235ceca6d 710505212e3272 Author: Linus Torvalds Date: Sun Jul 20 08:58:58 2025 -0700 Merge tag 'spi-fix-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "A fix adding missing validation that 8 bit I/O mode is actually supported for the specific device when attempting to use it. Anything that runs into this should already have been having problems, enforcing this should just make things safer and more obvious" * tag 'spi-fix-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Add check for 8-bit transfer with 8 IO mode support commit 875dd235ceca6dc1821ea4ba6a7d41cdf0df6a55 Merge: e2e9e161997ad0 c871c199accb39 Author: Linus Torvalds Date: Sun Jul 20 08:56:40 2025 -0700 Merge tag 'regmap-fix-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "A fix for a memory leak when we get an error during regmap init for a bus that uses free_on_exit to clean up device specific data" * tag 'regmap-fix-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: fix potential memory leak of regmap_bus commit e2e9e161997ad0b44e37c82824fcab4e0a1e261d Merge: f4a40a4282f467 bcce05041b2188 Author: Linus Torvalds Date: Sun Jul 20 08:53:58 2025 -0700 Merge tag 'input-for-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: - just a small fixup to the xpad driver correcting the recent addition of the Acer NGR200 controller * tag 'input-for-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - set correct controller type for Acer NGR200 commit bcce05041b21888f10b80ea903dcfe51a25c586e Author: Nilton Perim Neto Date: Sat Jul 19 22:07:36 2025 -0700 Input: xpad - set correct controller type for Acer NGR200 The controller should have been set as XTYPE_XBOX360 and not XTYPE_XBOX. Also the entry is in the wrong place. Fix it. Reported-by: Vicki Pfau Signed-off-by: Nilton Perim Neto Link: https://lore.kernel.org/r/20250708033126.26216-2-niltonperimneto@gmail.com Fixes: 22c69d786ef8 ("Input: xpad - support Acer NGR 200 Controller") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 6ade153349c6bb990d170cecc3e8bdd8628119ab Author: Marco Elver Date: Wed Jul 16 17:23:28 2025 +0200 kasan: use vmalloc_dump_obj() for vmalloc error reports Since 6ee9b3d84775 ("kasan: remove kasan_find_vm_area() to prevent possible deadlock"), more detailed info about the vmalloc mapping and the origin was dropped due to potential deadlocks. While fixing the deadlock is necessary, that patch was too quick in killing an otherwise useful feature, and did no due-diligence in understanding if an alternative option is available. Restore printing more helpful vmalloc allocation info in KASAN reports with the help of vmalloc_dump_obj(). Example report: | BUG: KASAN: vmalloc-out-of-bounds in vmalloc_oob+0x4c9/0x610 | Read of size 1 at addr ffffc900002fd7f3 by task kunit_try_catch/493 | | CPU: [...] | Call Trace: | | dump_stack_lvl+0xa8/0xf0 | print_report+0x17e/0x810 | kasan_report+0x155/0x190 | vmalloc_oob+0x4c9/0x610 | [...] | | The buggy address belongs to a 1-page vmalloc region starting at 0xffffc900002fd000 allocated at vmalloc_oob+0x36/0x610 | The buggy address belongs to the physical page: | page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126364 | flags: 0x200000000000000(node=0|zone=2) | raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 | raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 | page dumped because: kasan: bad access detected | | [..] Link: https://lkml.kernel.org/r/20250716152448.3877201-1-elver@google.com Fixes: 6ee9b3d84775 ("kasan: remove kasan_find_vm_area() to prevent possible deadlock") Signed-off-by: Marco Elver Suggested-by: Uladzislau Rezki Acked-by: Uladzislau Rezki (Sony) Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Sebastian Andrzej Siewior Cc: Yeoreum Yun Cc: Yunseong Kim Cc: Signed-off-by: Andrew Morton commit 153ad566724fe6f57b14f66e9726d295d22e576d Author: Nathan Chancellor Date: Tue Jul 15 12:56:16 2025 -0700 mm/ksm: fix -Wsometimes-uninitialized from clang-21 in advisor_mode_show() After a recent change in clang to expose uninitialized warnings from const variables [1], there is a false positive warning from the if statement in advisor_mode_show(). mm/ksm.c:3687:11: error: variable 'output' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 3687 | else if (ksm_advisor == KSM_ADVISOR_SCAN_TIME) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/ksm.c:3690:33: note: uninitialized use occurs here 3690 | return sysfs_emit(buf, "%s\n", output); | ^~~~~~ Rewrite the if statement to implicitly make KSM_ADVISOR_NONE the else branch so that it is obvious to the compiler that ksm_advisor can only be KSM_ADVISOR_NONE or KSM_ADVISOR_SCAN_TIME due to the assignments in advisor_mode_store(). Link: https://lkml.kernel.org/r/20250715-ksm-fix-clang-21-uninit-warning-v1-1-f443feb4bfc4@kernel.org Fixes: 66790e9a735b ("mm/ksm: add sysfs knobs for advisor") Signed-off-by: Nathan Chancellor Closes: https://github.com/ClangBuiltLinux/linux/issues/2100 Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1] Acked-by: David Hildenbrand Cc: Chengming Zhou Cc: Stefan Roesch Cc: xu xin Cc: Signed-off-by: Andrew Morton commit d367a177e2e4097065c0181ea4da7cdce4d68921 Author: Jason Gunthorpe Date: Fri Jul 11 19:34:44 2025 -0300 mm: update MAINTAINERS entry for HMM Jérôme has moved on from RH and has not been looking at HMM patches for some time. I've made the most changes to the core code in the recent period and Leon is now working on the HMM side from the RDMA ODP. Link: https://lkml.kernel.org/r/0-v1-a1df5219c7a3+1d981-hmm_maintainers_jgg@nvidia.com Closes: https://lore.kernel.org/all/39d43309-9f34-48bc-a9ad-108c607ba175@samsung.com/ Signed-off-by: Jason Gunthorpe Reported-by: Marek Szyprowski Acked-by: David Hildenbrand Acked-by: Leon Romanovsky Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 4aead50caf67e01020c8be1945c3201e8a972a27 Author: Ryusuke Konishi Date: Thu Jul 10 22:49:08 2025 +0900 nilfs2: reject invalid file types when reading inodes To prevent inodes with invalid file types from tripping through the vfs and causing malfunctions or assertion failures, add a missing sanity check when reading an inode from a block device. If the file type is not valid, treat it as a filesystem error. Link: https://lkml.kernel.org/r/20250710134952.29862-1-konishi.ryusuke@gmail.com Fixes: 05fe58fdc10d ("nilfs2: inode operations") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+895c23f6917da440ed0d@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d Cc: Signed-off-by: Andrew Morton commit 7563fcbfd484b347b776aeed4d7dac78b30884aa Author: Zi Yan Date: Tue Jul 8 21:27:59 2025 -0400 selftests/mm: fix split_huge_page_test for folio_split() tests PID_FMT does not have an offset field, so folio_split() tests are not performed. Add PID_FMT_OFFSET with an offset field and use it to perform folio_split() tests. Link: https://lkml.kernel.org/r/20250709012800.3225727-1-ziy@nvidia.com Fixes: 80a5c494c89f ("selftests/mm: add tests for folio_split(), buddy allocator like split") Signed-off-by: Zi Yan Tested-by: Baolin Wang Reviewed-by: Lorenzo Stoakes Reviewed-by: Donet Tom Tested-by : Donet Tom Cc: Barry Song Cc: David Hildenbrand Cc: Dev Jain Cc: Liam Howlett Cc: Mariano Pache Cc: Ryan Roberts Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton commit 091a08b002d9b5040b92531fff07b52879f29722 Author: Sergey Senozhatsky Date: Mon Jul 7 16:52:13 2025 +0900 mailmap: add entry for Senozhatsky Consolidate and map all addresses to a single one. Link: https://lkml.kernel.org/r/20250707075243.858895-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 694d6b99923eb05a8fd188be44e26077d19f0e21 Author: Harry Yoo Date: Fri Jul 4 19:30:53 2025 +0900 mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n Commit 48b4800a1c6a ("zsmalloc: page migration support") added support for migrating zsmalloc pages using the movable_operations migration framework. However, the commit did not take into account that zsmalloc supports migration only when CONFIG_COMPACTION is enabled. Tracing shows that zsmalloc was still passing the __GFP_MOVABLE flag even when compaction is not supported. This can result in unmovable pages being allocated from movable page blocks (even without stealing page blocks), ZONE_MOVABLE and CMA area. Possible user visible effects: - Some ZONE_MOVABLE memory can be not actually movable - CMA allocation can fail because of this - Increased memory fragmentation due to ignoring the page mobility grouping feature I'm not really sure who uses kernels without compaction support, though :( To fix this, clear the __GFP_MOVABLE flag when !IS_ENABLED(CONFIG_COMPACTION). Link: https://lkml.kernel.org/r/20250704103053.6913-1-harry.yoo@oracle.com Fixes: 48b4800a1c6a ("zsmalloc: page migration support") Signed-off-by: Harry Yoo Acked-by: David Hildenbrand Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton commit 9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab Author: Jinjiang Tu Date: Fri Jun 27 20:57:46 2025 +0800 mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list In shrink_folio_list(), the hwpoisoned folio may be large folio, which can't be handled by unmap_poisoned_folio(). For THP, try_to_unmap_one() must be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then retry. Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of pvmw.pte. Even we passed TTU_SPLIT_HUGE_PMD, we will trigger a WARN_ON_ONCE due to the page isn't in swapcache. Since UCE is rare in real world, and race with reclaimation is more rare, just skipping the hwpoisoned large folio is enough. memory_failure() will handle it if the UCE is triggered again. This happens when memory reclaim for large folio races with memory_failure(), and will lead to kernel panic. The race is as follows: cpu0 cpu1 shrink_folio_list memory_failure TestSetPageHWPoison unmap_poisoned_folio --> trigger BUG_ON due to unmap_poisoned_folio couldn't handle large folio [tujinjiang@huawei.com: add comment to unmap_poisoned_folio()] Link: https://lkml.kernel.org/r/69fd4e00-1b13-d5f7-1c82-705c7d977ea4@huawei.com Link: https://lkml.kernel.org/r/20250627125747.3094074-2-tujinjiang@huawei.com Signed-off-by: Jinjiang Tu Fixes: 1b0449544c64 ("mm/vmscan: don't try to reclaim hwpoison folio") Reported-by: syzbot+3b220254df55d8ca8a61@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/68412d57.050a0220.2461cf.000e.GAE@google.com/ Acked-by: David Hildenbrand Reviewed-by: Miaohe Lin Acked-by: Zi Yan Reviewed-by: Oscar Salvador Cc: Kefeng Wang Cc: Michal Hocko Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton commit f4a40a4282f467ec99745c6ba62cb84346e42139 Merge: bf61759db409ce 64e135f1eaba0b Author: Linus Torvalds Date: Sat Jul 19 16:27:03 2025 -0700 Merge tag 'efi-fixes-for-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fix from Ard Biesheuvel: - Fix potential memory leak reported by kmemleak * tag 'efi-fixes-for-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths commit b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df Author: Steven Rostedt Date: Fri Jul 18 22:31:58 2025 -0400 tracing: Add down_write(trace_event_sem) when adding trace event When a module is loaded, it adds trace events defined by the module. It may also need to modify the modules trace printk formats to replace enum names with their values. If two modules are loaded at the same time, the adding of the event to the ftrace_events list can corrupt the walking of the list in the code that is modifying the printk format strings and crash the kernel. The addition of the event should take the trace_event_sem for write while it adds the new event. Also add a lockdep_assert_held() on that semaphore in __trace_add_event_dirs() as it iterates the list. Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/20250718223158.799bfc0c@batman.local.home Reported-by: Fusheng Huang(黄富生) Closes: https://lore.kernel.org/all/20250717105007.46ccd18f@batman.local.home/ Fixes: 110bf2b764eb6 ("tracing: add protection around module events unload") Signed-off-by: Steven Rostedt (Google) commit bf61759db409ce21a8f2a5bb442b7c35905a713d Merge: c64004df8914cf 06efc9fe0b8dee Author: Linus Torvalds Date: Sat Jul 19 10:40:30 2025 -0700 Merge tag 'sched_ext-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fixes from Tejun Heo: - Fix handling of migration disabled tasks in default idle selection - update_locked_rq() called __this_cpu_write() spuriously with NULL when @rq was not locked. As the writes were spurious, it didn't break anything directly. However, the function could be called in a preemptible leading to a context warning in __this_cpu_write(). Skip the spurious NULL writes. - Selftest fix on UP * tag 'sched_ext-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: idle: Handle migration-disabled tasks in idle selection sched/ext: Prevent update_locked_rq() calls with NULL rq selftests/sched_ext: Fix exit selftest hang on UP commit c64004df8914cf5cf4455d9e78d8f371d0f7322f Merge: bd4a1567b6e345 14a67b42cb6f3a Author: Linus Torvalds Date: Sat Jul 19 10:00:47 2025 -0700 Merge tag 'cgroup-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "An earlier commit to suppress a warning introduced a race condition where tasks can escape cgroup1 freezer. Revert the commit and simply remove the warning which was spurious to begin with" * tag 'cgroup-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: Revert "cgroup_freezer: cgroup_freezing: Check if not frozen" sched,freezer: Remove unnecessary warning in __thaw_task commit bd4a1567b6e3454eda1113ed3a537119208e9c7a Merge: acc0bac1c62597 ce3cf7c8a17478 Author: Linus Torvalds Date: Sat Jul 19 09:51:01 2025 -0700 Merge tag 'hwmon-for-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - corsair-cpro: Validate the size of the received input buffer - ina238: Report energy in microjoules as expected by the ABI - pmbus/ucd9000: Fixed GPIO functionality * tag 'hwmon-for-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus/ucd9000) Fix error in ucd9000_gpio_set hwmon: (ina238) Report energy in microjoules hwmon: (corsair-cpro) Validate the size of the received input buffer commit acc0bac1c625972f3622339080194061e28fa243 Merge: 1c6aa1121e7a5c 7498159226772d Author: Linus Torvalds Date: Sat Jul 19 09:22:26 2025 -0700 Merge tag 'rust-fixes-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull Rust fixes from Miguel Ojeda: "Toolchain and infrastructure: - Fix build and modpost confusion for the upcoming Rust 1.89.0 release - Clean objtool warning for the upcoming Rust 1.89.0 release by adding one more noreturn function 'kernel' crate: - Fix build error when using generics in the 'try_{,pin_}init!' macros" * tag 'rust-fixes-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: rust: use `#[used(compiler)]` to fix build and `modpost` with Rust >= 1.89.0 objtool/rust: add one more `noreturn` Rust function for Rust 1.89.0 rust: init: Fix generics in *_init! macros commit 1c6aa1121e7a5cd296d7038dbdd619da8bee1cd5 Merge: 4871b7cb27f480 a88cddaaa3bf74 Author: Linus Torvalds Date: Sat Jul 19 08:47:59 2025 -0700 Merge tag 'vfs-6.16-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix a memory leak in fcntl_dirnotify() - Raise SB_I_NOEXEC on secrement superblock instead of messing with flags on the mount - Add fsdevel and block mailing lists to uio entry. We had a few instances were very questionable stuff was added without either block or the VFS being aware of it - Fix netfs copy-to-cache so that it performs collection with ceph+fscache - Fix netfs race between cache write completion and ALL_QUEUED being set - Verify the inode mode when loading entries from disk in isofs - Avoid state_lock in iomap_set_range_uptodate() - Fix PIDFD_INFO_COREDUMP check in PIDFD_GET_INFO ioctl - Fix the incorrect return value in __cachefiles_write() * tag 'vfs-6.16-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: MAINTAINERS: add block and fsdevel lists to iov_iter netfs: Fix race between cache write completion and ALL_QUEUED being set netfs: Fix copy-to-cache so that it performs collection with ceph+fscache fix a leak in fcntl_dirnotify() iomap: avoid unnecessary ifs_set_range_uptodate() with locks isofs: Verify inode mode when loading from disk cachefiles: Fix the incorrect return value in __cachefiles_write() secretmem: use SB_I_NOEXEC coredump: fix PIDFD_INFO_COREDUMP ioctl check commit 4871b7cb27f480f6ecce804f81d4b9ee27281dd2 Merge: 27c2570359d688 8767cb3fbd514c Author: Linus Torvalds Date: Fri Jul 18 22:32:30 2025 -0700 Merge tag 'v6.16-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - fix creating special files to Samba when using SMB3.1.1 POSIX Extensions - fix incorrect caching on new file creation with directory leases enabled - two use after free fixes: one in oplock_break and one in async decryption * tag 'v6.16-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: Fix SMB311 posix special file creation to servers which do not advertise reparse support smb: invalidate and close cached directory when creating child entries smb: client: fix use-after-free in crypt_message when using async crypto smb: client: fix use-after-free in cifs_oplock_break commit 27c2570359d688884887cd45fa92e678523012a6 Merge: 414aaef1537ac7 ccafe2821cfaa8 Author: Linus Torvalds Date: Fri Jul 18 18:15:21 2025 -0700 Merge tag 'v6.16-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes buffer overflows in qat and chelsio" * tag 'v6.16-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: qat - Use crypto_shash_export_core crypto: chelsio - Use crypto_shash_export_core commit 81e0db8e839822b8380ce4716cd564a593ccbfc5 Merge: 6e86fb73de0fe3 5b4c56ad4da0aa Author: Jakub Kicinski Date: Fri Jul 18 17:33:05 2025 -0700 Merge branch 'mlx5-misc-fixes-2025-07-17' Tariq Toukan says: ==================== mlx5 misc fixes 2025-07-17 This small patchset provides misc bug fixes from the team to the mlx5 driver. ==================== Link: https://patch.msgid.link/1752753970-261832-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 5b4c56ad4da0aa00b258ab50b1f5775b7d3108c7 Author: Shahar Shitrit Date: Thu Jul 17 15:06:10 2025 +0300 net/mlx5: E-Switch, Fix peer miss rules to use peer eswitch In the original design, it is assumed local and peer eswitches have the same number of vfs. However, in new firmware, local and peer eswitches can have different number of vfs configured by mlxconfig. In such configuration, it is incorrect to derive the number of vfs from the local device's eswitch. Fix this by updating the peer miss rules add and delete functions to use the peer device's eswitch and vf count instead of the local device's information, ensuring correct behavior regardless of vf configuration differences. Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules") Signed-off-by: Shahar Shitrit Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Simon Horman Link: https://patch.msgid.link/1752753970-261832-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3afa3ae3db52e3c216d77bd5907a5a86833806cc Author: Chiara Meiohas Date: Thu Jul 17 15:06:09 2025 +0300 net/mlx5: Fix memory leak in cmd_exec() If cmd_exec() is called with callback and mlx5_cmd_invoke() returns an error, resources allocated in cmd_exec() will not be freed. Fix the code to release the resources if mlx5_cmd_invoke() returns an error. Fixes: f086470122d5 ("net/mlx5: cmdif, Return value improvements") Reported-by: Alex Tereshkin Signed-off-by: Chiara Meiohas Reviewed-by: Moshe Shemesh Signed-off-by: Vlad Dumitrescu Signed-off-by: Tariq Toukan Reviewed-by: Simon Horman Link: https://patch.msgid.link/1752753970-261832-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 6e86fb73de0fe3ec5cdcd5873ad1d6005f295b64 Author: Himanshu Mittal Date: Thu Jul 17 15:12:20 2025 +0530 net: ti: icssg-prueth: Fix buffer allocation for ICSSG Fixes overlapping buffer allocation for ICSSG peripheral used for storing packets to be received/transmitted. There are 3 buffers: 1. Buffer for Locally Injected Packets 2. Buffer for Forwarding Packets 3. Buffer for Host Egress Packets In existing allocation buffers for 2. and 3. are overlapping causing packet corruption. Packet corruption observations: During tcp iperf testing, due to overlapping buffers the received ack packet overwrites the packet to be transmitted. So, we see packets on wire with the ack packet content inside the content of next TCP packet from sender device. Details for AM64x switch mode: -> Allocation by existing driver: +---------+-------------------------------------------------------------+ | | SLICE 0 | SLICE 1 | | +------+--------------+--------+------+--------------+--------+ | | Slot | Base Address | Size | Slot | Base Address | Size | |---------+------+--------------+--------+------+--------------+--------+ | | 0 | 70000000 | 0x2000 | 0 | 70010000 | 0x2000 | | | 1 | 70002000 | 0x2000 | 1 | 70012000 | 0x2000 | | | 2 | 70004000 | 0x2000 | 2 | 70014000 | 0x2000 | | FWD | 3 | 70006000 | 0x2000 | 3 | 70016000 | 0x2000 | | Buffers | 4 | 70008000 | 0x2000 | 4 | 70018000 | 0x2000 | | | 5 | 7000A000 | 0x2000 | 5 | 7001A000 | 0x2000 | | | 6 | 7000C000 | 0x2000 | 6 | 7001C000 | 0x2000 | | | 7 | 7000E000 | 0x2000 | 7 | 7001E000 | 0x2000 | +---------+------+--------------+--------+------+--------------+--------+ | | 8 | 70020000 | 0x1000 | 8 | 70028000 | 0x1000 | | | 9 | 70021000 | 0x1000 | 9 | 70029000 | 0x1000 | | | 10 | 70022000 | 0x1000 | 10 | 7002A000 | 0x1000 | | Our | 11 | 70023000 | 0x1000 | 11 | 7002B000 | 0x1000 | | LI | 12 | 00000000 | 0x0 | 12 | 00000000 | 0x0 | | Buffers | 13 | 00000000 | 0x0 | 13 | 00000000 | 0x0 | | | 14 | 00000000 | 0x0 | 14 | 00000000 | 0x0 | | | 15 | 00000000 | 0x0 | 15 | 00000000 | 0x0 | +---------+------+--------------+--------+------+--------------+--------+ | | 16 | 70024000 | 0x1000 | 16 | 7002C000 | 0x1000 | | | 17 | 70025000 | 0x1000 | 17 | 7002D000 | 0x1000 | | | 18 | 70026000 | 0x1000 | 18 | 7002E000 | 0x1000 | | Their | 19 | 70027000 | 0x1000 | 19 | 7002F000 | 0x1000 | | LI | 20 | 00000000 | 0x0 | 20 | 00000000 | 0x0 | | Buffers | 21 | 00000000 | 0x0 | 21 | 00000000 | 0x0 | | | 22 | 00000000 | 0x0 | 22 | 00000000 | 0x0 | | | 23 | 00000000 | 0x0 | 23 | 00000000 | 0x0 | +---------+------+--------------+--------+------+--------------+--------+ --> here 16, 17, 18, 19 overlapping with below express buffer +-----+-----------------------------------------------+ | | SLICE 0 | SLICE 1 | | +------------+----------+------------+----------+ | | Start addr | End addr | Start addr | End addr | +-----+------------+----------+------------+----------+ | EXP | 70024000 | 70028000 | 7002C000 | 70030000 | <-- Overlapping | PRE | 70030000 | 70033800 | 70034000 | 70037800 | +-----+------------+----------+------------+----------+ +---------------------+----------+----------+ | | SLICE 0 | SLICE 1 | +---------------------+----------+----------+ | Default Drop Offset | 00000000 | 00000000 | <-- Field not configured +---------------------+----------+----------+ -> Allocation this patch brings: +---------+-------------------------------------------------------------+ | | SLICE 0 | SLICE 1 | | +------+--------------+--------+------+--------------+--------+ | | Slot | Base Address | Size | Slot | Base Address | Size | |---------+------+--------------+--------+------+--------------+--------+ | | 0 | 70000000 | 0x2000 | 0 | 70040000 | 0x2000 | | | 1 | 70002000 | 0x2000 | 1 | 70042000 | 0x2000 | | | 2 | 70004000 | 0x2000 | 2 | 70044000 | 0x2000 | | FWD | 3 | 70006000 | 0x2000 | 3 | 70046000 | 0x2000 | | Buffers | 4 | 70008000 | 0x2000 | 4 | 70048000 | 0x2000 | | | 5 | 7000A000 | 0x2000 | 5 | 7004A000 | 0x2000 | | | 6 | 7000C000 | 0x2000 | 6 | 7004C000 | 0x2000 | | | 7 | 7000E000 | 0x2000 | 7 | 7004E000 | 0x2000 | +---------+------+--------------+--------+------+--------------+--------+ | | 8 | 70010000 | 0x1000 | 8 | 70050000 | 0x1000 | | | 9 | 70011000 | 0x1000 | 9 | 70051000 | 0x1000 | | | 10 | 70012000 | 0x1000 | 10 | 70052000 | 0x1000 | | Our | 11 | 70013000 | 0x1000 | 11 | 70053000 | 0x1000 | | LI | 12 | 00000000 | 0x0 | 12 | 00000000 | 0x0 | | Buffers | 13 | 00000000 | 0x0 | 13 | 00000000 | 0x0 | | | 14 | 00000000 | 0x0 | 14 | 00000000 | 0x0 | | | 15 | 00000000 | 0x0 | 15 | 00000000 | 0x0 | +---------+------+--------------+--------+------+--------------+--------+ | | 16 | 70014000 | 0x1000 | 16 | 70054000 | 0x1000 | | | 17 | 70015000 | 0x1000 | 17 | 70055000 | 0x1000 | | | 18 | 70016000 | 0x1000 | 18 | 70056000 | 0x1000 | | Their | 19 | 70017000 | 0x1000 | 19 | 70057000 | 0x1000 | | LI | 20 | 00000000 | 0x0 | 20 | 00000000 | 0x0 | | Buffers | 21 | 00000000 | 0x0 | 21 | 00000000 | 0x0 | | | 22 | 00000000 | 0x0 | 22 | 00000000 | 0x0 | | | 23 | 00000000 | 0x0 | 23 | 00000000 | 0x0 | +---------+------+--------------+--------+------+--------------+--------+ +-----+-----------------------------------------------+ | | SLICE 0 | SLICE 1 | | +------------+----------+------------+----------+ | | Start addr | End addr | Start addr | End addr | +-----+------------+----------+------------+----------+ | EXP | 70018000 | 7001C000 | 70058000 | 7005C000 | | PRE | 7001C000 | 7001F800 | 7005C000 | 7005F800 | +-----+------------+----------+------------+----------+ +---------------------+----------+----------+ | | SLICE 0 | SLICE 1 | +---------------------+----------+----------+ | Default Drop Offset | 7001F800 | 7005F800 | +---------------------+----------+----------+ Rootcause: missing buffer configuration for Express frames in function: prueth_fw_offload_buffer_setup() Details: Driver implements two distinct buffer configuration functions that are invoked based on the driver state and ICSSG firmware:- - prueth_fw_offload_buffer_setup() - prueth_emac_buffer_setup() During initialization, driver creates standard network interfaces (netdevs) and configures buffers via prueth_emac_buffer_setup(). This function properly allocates and configures all required memory regions including: - LI buffers - Express packet buffers - Preemptible packet buffers However, when the driver transitions to an offload mode (switch/HSR/PRP), buffer reconfiguration is handled by prueth_fw_offload_buffer_setup(). This function does not reconfigure the buffer regions required for Express packets, leading to incorrect buffer allocation. Fixes: abd5576b9c57 ("net: ti: icssg-prueth: Add support for ICSSG switch firmware") Signed-off-by: Himanshu Mittal Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250717094220.546388-1-h-mittal1@ti.com Signed-off-by: Jakub Kicinski commit 96e056ffba912ef18a72177f71956a5b347b5177 Author: Ma Ke Date: Thu Jul 17 10:23:09 2025 +0800 dpaa2-switch: Fix device reference count leak in MAC endpoint handling The fsl_mc_get_endpoint() function uses device_find_child() for localization, which implicitly calls get_device() to increment the device's reference count before returning the pointer. However, the caller dpaa2_switch_port_connect_mac() fails to properly release this reference in multiple scenarios. We should call put_device() to decrement reference count properly. As comment of device_find_child() says, 'NOTE: you will need to drop the reference with put_device() after use'. Found by code review. Cc: stable@vger.kernel.org Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") Signed-off-by: Ma Ke Tested-by: Ioana Ciornei Reviewed-by: Ioana Ciornei Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250717022309.3339976-3-make24@iscas.ac.cn Signed-off-by: Jakub Kicinski commit ee9f3a81ab08dfe0538dbd1746f81fd4d5147fdc Author: Ma Ke Date: Thu Jul 17 10:23:08 2025 +0800 dpaa2-eth: Fix device reference count leak in MAC endpoint handling The fsl_mc_get_endpoint() function uses device_find_child() for localization, which implicitly calls get_device() to increment the device's reference count before returning the pointer. However, the caller dpaa2_eth_connect_mac() fails to properly release this reference in multiple scenarios. We should call put_device() to decrement reference count properly. As comment of device_find_child() says, 'NOTE: you will need to drop the reference with put_device() after use'. Found by code review. Cc: stable@vger.kernel.org Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink") Signed-off-by: Ma Ke Tested-by: Ioana Ciornei Reviewed-by: Ioana Ciornei Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250717022309.3339976-2-make24@iscas.ac.cn Signed-off-by: Jakub Kicinski commit bddbe13d36a02d5097b99cf02354d5752ad1ac60 Author: Ma Ke Date: Thu Jul 17 10:23:07 2025 +0800 bus: fsl-mc: Fix potential double device reference in fsl_mc_get_endpoint() The fsl_mc_get_endpoint() function may call fsl_mc_device_lookup() twice, which would increment the device's reference count twice if both lookups find a device. This could lead to a reference count leak. Found by code review. Cc: stable@vger.kernel.org Fixes: 1ac210d128ef ("bus: fsl-mc: add the fsl_mc_get_endpoint function") Signed-off-by: Ma Ke Tested-by: Ioana Ciornei Reviewed-by: Simon Horman Fixes: 8567494cebe5 ("bus: fsl-mc: rescan devices if endpoint not found") Link: https://patch.msgid.link/20250717022309.3339976-1-make24@iscas.ac.cn Signed-off-by: Jakub Kicinski commit 414aaef1537ac7f90dcb54e618864680aca2e197 Merge: c7de79e662b868 b65ca21835ed61 Author: Linus Torvalds Date: Fri Jul 18 15:31:46 2025 -0700 Merge tag 'riscv-for-linus-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - Three fixes for unnecessary spew: an ACPI CPPC boot-time debug message, the link-time warnings for R_RISCV_NONE in binaries, and some compile-time warnings in __put_user_nocheck - A fix for a race during text patching - Interrupts are no longer disabled during exception handling - A fix for a missing sign extension in the misaligned load handler - A fix to avoid static ftrace being selected in Kconfig, as we have moved to dynamic ftrace * tag 'riscv-for-linus-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: uaccess: Fix -Wuninitialized and -Wshadow in __put_user_nocheck riscv: Stop supporting static ftrace riscv: traps_misaligned: properly sign extend value in misaligned load handler riscv: Enable interrupt during exception handling riscv: ftrace: Properly acquire text_mutex to fix a race condition ACPI: RISC-V: Remove unnecessary CPPC debug message riscv: Stop considering R_RISCV_NONE as bad relocations commit 85a3bce695b361d85fc528e6fbb33e4c8089c806 Author: Tomas Glozar Date: Wed Jul 16 16:36:01 2025 +0200 tracing/osnoise: Fix crash in timerlat_dump_stack() We have observed kernel panics when using timerlat with stack saving, with the following dmesg output: memcpy: detected buffer overflow: 88 byte write of buffer size 0 WARNING: CPU: 2 PID: 8153 at lib/string_helpers.c:1032 __fortify_report+0x55/0xa0 CPU: 2 UID: 0 PID: 8153 Comm: timerlatu/2 Kdump: loaded Not tainted 6.15.3-200.fc42.x86_64 #1 PREEMPT(lazy) Call Trace: ? trace_buffer_lock_reserve+0x2a/0x60 __fortify_panic+0xd/0xf __timerlat_dump_stack.cold+0xd/0xd timerlat_dump_stack.part.0+0x47/0x80 timerlat_fd_read+0x36d/0x390 vfs_read+0xe2/0x390 ? syscall_exit_to_user_mode+0x1d5/0x210 ksys_read+0x73/0xe0 do_syscall_64+0x7b/0x160 ? exc_page_fault+0x7e/0x1a0 entry_SYSCALL_64_after_hwframe+0x76/0x7e __timerlat_dump_stack() constructs the ftrace stack entry like this: struct stack_entry *entry; ... memcpy(&entry->caller, fstack->calls, size); entry->size = fstack->nr_entries; Since commit e7186af7fb26 ("tracing: Add back FORTIFY_SOURCE logic to kernel_stack event structure"), struct stack_entry marks its caller field with __counted_by(size). At the time of the memcpy, entry->size contains garbage from the ringbuffer, which under some circumstances is zero, triggering a kernel panic by buffer overflow. Populate the size field before the memcpy so that the out-of-bounds check knows the correct size. This is analogous to __ftrace_trace_stack(). Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Cc: Attila Fazekas Link: https://lore.kernel.org/20250716143601.7313-1-tglozar@redhat.com Fixes: e7186af7fb26 ("tracing: Add back FORTIFY_SOURCE logic to kernel_stack event structure") Signed-off-by: Tomas Glozar Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit c7de79e662b8681f54196c107281f1e63c26a3db Merge: e347810e840940 4b7d440de209cb Author: Linus Torvalds Date: Fri Jul 18 12:38:34 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix use of u64_replace_bits() in adjusting the guest's view of MDCR_EL2.HPMN RISC-V: - Fix an issue related to timer cleanup when exiting to user-space - Fix a race-condition in updating interrupts enabled for the guest when IMSIC is hardware-virtualized x86: - Reject KVM_SET_TSC_KHZ for guests with a protected TSC (currently only TDX) - Ensure struct kvm_tdx_capabilities fields that are not explicitly set by KVM are zeroed Documentation: - Explain how KVM contributions should be made testable - Fix a formatting goof in the TDX documentation" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: TDX: Don't report base TDVMCALLs KVM: VMX: Ensure unused kvm_tdx_capabilities fields are zeroed out KVM: Documentation: document how KVM is tested KVM: Documentation: minimal updates to review-checklist.rst KVM: x86: Reject KVM_SET_TSC_KHZ vCPU ioctl for TSC protected guest RISC-V: KVM: Move HGEI[E|P] CSR access to IMSIC virtualization RISC-V: KVM: Disable vstimecmp before exiting to user-space Documentation: KVM: Fix unexpected unindent warning KVM: arm64: Fix enforcement of upper bound on MDCR_EL2.HPMN commit e347810e84094078d155663acbf36d82efe91f95 Merge: e5ac874257bf06 c7cafd5b81cc07 Author: Linus Torvalds Date: Fri Jul 18 12:21:26 2025 -0700 Merge tag 'io_uring-6.16-20250718' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - dmabug offset fix for zcrx - Fix for the POLLERR connect work around handling * tag 'io_uring-6.16-20250718' of git://git.kernel.dk/linux: io_uring/poll: fix POLLERR handling io_uring/zcrx: disallow user selected dmabuf offset and size commit e5ac874257bf06eba00282e5b627f23b72ac8f7d Merge: 7abc678e308467 2680efde75ccdd Author: Linus Torvalds Date: Fri Jul 18 12:16:13 2025 -0700 Merge tag 'block-6.16-20250718' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe changes via Christoph: - revert the cross-controller atomic write size validation that caused regressions (Christoph Hellwig) - fix endianness of command word printout in nvme_log_err_passthru() (John Garry) - fix callback lock for TLS handshake (Maurizio Lombardi) - fix misaccounting of nvme-mpath inflight I/O (Yu Kuai) - fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() (Zheng Qixing) - Fix for a kobject leak in queue unregistration - Fix for loop async file write start/end handling * tag 'block-6.16-20250718' of git://git.kernel.dk/linux: loop: use kiocb helpers to fix lockdep warning nvmet-tcp: fix callback lock for TLS handshake nvme: fix misaccounting of nvme-mpath inflight I/O nvme: revert the cross-controller atomic write size validation nvme: fix endianness of command word prints in nvme_log_err_passthru() nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() block: fix kobject leak in blk_unregister_queue commit 7abc678e308467ab60ffb8c31f4638a47ee3518c Merge: 16e14971df69ff 621a88dbfe9006 Author: Linus Torvalds Date: Fri Jul 18 12:02:17 2025 -0700 Merge tag 'pmdomain-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain / cpuidle-psci fixes from Ulf Hansson: "pmdomain core: - Respect CPU latency QoS limit in the genpd governor for CPUs cpuidle-psci: - Fix cpuhotplug support for PREEMPT_RT" * tag 'pmdomain-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: cpuidle: psci: Fix cpuhotplug routine with PREEMPT_RT=y pmdomain: governor: Consider CPU latency tolerance from pm_domain_cpu_gov commit 16e14971df69ff8e655196b77515821b1724c61f Merge: d786aba32000f2 11ff5e06e02326 Author: Linus Torvalds Date: Fri Jul 18 11:57:41 2025 -0700 Merge tag 'gpio-fixes-for-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix the devres release callback for devm_gpiod_put_array() - add an ACPI quirk for Acer Nitro V15 suspend & wakeup * tag 'gpio-fixes-for-v6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: devres: release GPIOs in devm_gpiod_put_array() gpiolib: acpi: Add a quirk for Acer Nitro V15 commit d786aba32000f20a58bb79c2e3ae326e4fb377a1 Merge: c460535a6d6182 0238c45fbbf822 Author: Linus Torvalds Date: Fri Jul 18 11:46:26 2025 -0700 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull bpf fixes from Alexei Starovoitov: - Fix handling of BPF arena relocations (Andrii Nakryiko) - Fix race in bpf_arch_text_poke() on s390 (Ilya Leoshkevich) - Fix use of virt_to_phys() on arm64 when mmapping BTF (Lorenz Bauer) - Reject %p% format string in bprintf-like BPF helpers (Paul Chaignon) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: libbpf: Fix handling of BPF arena relocations btf: Fix virt_to_phys() on arm64 when mmapping BTF selftests/bpf: Stress test attaching a BPF prog to another BPF prog s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL again selftests/bpf: Add negative test cases for snprintf bpf: Reject %p% format string in bprintf-like helpers commit c460535a6d6182dcb00773132a8c384c1f9b5408 Merge: f0afb7bd4374fd 4d33ed640ffc06 Author: Linus Torvalds Date: Fri Jul 18 11:27:46 2025 -0700 Merge tag 'drm-fixes-2025-07-18-1' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Seems like a quiet enough week, xe/amdgpu being the usual suspects, then mediatek with a few fixes, and otherwise just misc other bits. dp: - aux dpcd address fix xe: - SR-IOV fixes for GT reset and TLB invalidation - Fix memory copy direction during migration - Fix alignment check on migration - Fix MOCS and page fault init order to correctly account for topology amdgpu: - Fix a DC memory leak - DCN 4.0.1 degamma LUT fix - Fix reset counter handling for soft recovery - GC 8 fix radeon: - Drop console locks when suspending/resuming nouveau: - ioctl validation fix panfrost: - scheduler bug fix mediatek: - Add wait_event_timeout when disabling plane - only announce AFBC if really supported - mtk_dpi: Reorder output formats on MT8195/88" * tag 'drm-fixes-2025-07-18-1' of https://gitlab.freedesktop.org/drm/kernel: drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 drm/mediatek: only announce AFBC if really supported drm/mediatek: Add wait_event_timeout when disabling plane drm/xe/pf: Resend PF provisioning after GT reset drm/xe/pf: Prepare to stop SR-IOV support prior GT reset drm/xe/migrate: Fix alignment check drm/xe: Move page fault init after topology init drm/xe/mocs: Initialize MOCS index early drm/xe/migrate: fix copy direction in access_memory drm/xe: Dont skip TLB invalidations on VF drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume drm/amdgpu: Increase reset counter only on success drm/radeon: Do not hold console lock during resume drm/radeon: Do not hold console lock while suspending clients drm/amd/display: Disable CRTC degamma LUT for DCN401 drm/amd/display: Free memory allocation drm/dp: Change AUX DPCD probe address from LANE0_1_STATUS to TRAINING_PATTERN_SET drm/panfrost: Fix scheduler workqueue bug drm/nouveau: check ioctl command codes better commit f0afb7bd4374fdb30da8bf6cd74528bba131bd88 Merge: e1da8eb20a06c7 348954f9b78e15 Author: Linus Torvalds Date: Fri Jul 18 11:15:55 2025 -0700 Merge tag 'sound-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes again. The only change in the core is about the handling of ALSA compress-offload ioctl numbers for avoiding potential abusing the API (if any). Other than that, all changes are device-specific small fixes and quirks, which should be safe to apply" * tag 'sound-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: amd: yc: Add DMI quirk for HP Laptop 17 cp-2033dx ASoC: Intel: soc-acpi: add support for HP Omen14 ARL ASoC: amd: yc: Add DMI entries to support HP 15-fb1xxx ALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX ALSA: hda/realtek: Support mute LED for Yoga with ALC287 ASoC: Intel: fix SND_SOC_SOF dependencies ASoC: rt5660: Fix the dmic data source from GPIO2 ALSA: hda/realtek - Fix mute LED for HP Victus 16-r0xxx ALSA: compress_offload: tighten ioctl command number checks ASoC: Intel: avs: Fix NULL ptr deref on rmmod ASoC: amd: yc: add DMI quirk for ASUS M6501RM commit e1da8eb20a06c71022252754ce6c20de9fcdbbeb Merge: fcc481f76b2917 834bce6a715ae9 Author: Linus Torvalds Date: Fri Jul 18 11:04:39 2025 -0700 Merge tag 'soundwire-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire fixes from Vinod Koul: "This contains a couple of amd driver fixes to handle alerts when the link is down and the cmd status register clears up. Also a revert of the qualcomm driver channel map support due to a regression" * tag 'soundwire-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: Revert "soundwire: qcom: Add set_channel_map api support" soundwire: amd: fix for clearing command status register soundwire: amd: fix for handling slave alerts after link is down commit fcc481f76b291798ff1e3054c8a8602937087cb3 Merge: 5b35eb8435fd33 3df63fa8f2afd0 Author: Linus Torvalds Date: Fri Jul 18 10:59:26 2025 -0700 Merge tag 'dmaengine-fix-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: - Mediatek flag reuse error fix - Array overbound fix for nbpfaxi - Frame size warning in driver probe * tag 'dmaengine-fix-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dma: dw-edma: Fix build warning in dw_edma_pcie_probe() dmaengine: nbpfaxi: Fix memory corruption in probe() dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() commit 5b35eb8435fd33f357918f2aefa50357695522e3 Merge: a4e3703088546a b7acfeab8af9ee Author: Linus Torvalds Date: Fri Jul 18 10:54:23 2025 -0700 Merge tag 'phy-fix-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: "Core: - use per-PHY lockdep keys, in order to fix a phy using internal phys Drivers: - tegra: - fixes for unbalanced regulator - decouple pad calibration fix - disable periodic updates - qualcomm: - error code fix for driver probe" * tag 'phy-fix-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: qcom: fix error code in snps_eusb2_hsphy_probe() phy: use per-PHY lockdep keys phy: tegra: xusb: Fix unbalanced regulator disable in UTMI PHY mode phy: tegra: xusb: Disable periodic tracking on Tegra234 phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode commit a4e3703088546abca27e7319e2fb95569ccd59fd Merge: d551d7bbf264ed 21b34a3a204ed6 Author: Linus Torvalds Date: Fri Jul 18 10:23:03 2025 -0700 Merge tag 'mmc-v6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC host: - bcm2835: Fix dma_unmap_sg() nents value - sdhci_am654: Add workaround for maximum HW timeout - sdhci-pci: Disable broken CQE Intel GLK-based Positivo models MEMSTICK: - Zero initialize id_reg in h_memstick_read_dev_id()" * tag 'mmc-v6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: memstick: core: Zero initialize id_reg in h_memstick_read_dev_id() mmc: bcm2835: Fix dma_unmap_sg() nents value mmc: sdhci_am654: Workaround for Errata i2312 mmc: sdhci-pci: Quirk for broken command queuing on Intel GLK-based Positivo models commit 8767cb3fbd514c4cf85b4f516ca30388e846f540 Author: Steve French Date: Mon Jul 14 22:16:19 2025 -0500 Fix SMB311 posix special file creation to servers which do not advertise reparse support Some servers (including Samba), support the SMB3.1.1 POSIX Extensions (which use reparse points for handling special files) but do not properly advertise file system attribute FILE_SUPPORTS_REPARSE_POINTS. Although we don't check for this attribute flag when querying special file information, we do check it when creating special files which causes them to fail unnecessarily. If we have negotiated SMB3.1.1 POSIX Extensions with the server we can expect the server to support creating special files via reparse points, and even if the server fails the operation due to really forbidding creating special files, then it should be no problem and is more likely to return a more accurate rc in any case (e.g. EACCES instead of EOPNOTSUPP). Allow creating special files as long as the server supports either reparse points or the SMB3.1.1 POSIX Extensions (note that if the "sfu" mount option is specified it uses a different way of storing special files that does not rely on reparse points). Cc: Fixes: 6c06be908ca19 ("cifs: Check if server supports reparse points before using them") Acked-by: Ralph Boehme Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit d551d7bbf264ed11d897368e3670bda5b37b360e Merge: d3d16f31d7b305 5948705adbf1a7 Author: Linus Torvalds Date: Fri Jul 18 10:09:48 2025 -0700 Merge tag 'xfs-fixes-6.16-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Carlos Maiolino: "This contains mostly code clean up, refactoring and comments modification. The most important patch in this series is the last one that removes an unnecessary data structure allocation of xfs busy extents which might lead to a memory leak on the zoned allocator code" * tag 'xfs-fixes-6.16-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't allocate the xfs_extent_busy structure for zoned RTGs xfs: remove the bt_bdev_file buftarg field xfs: rename the bt_bdev_* buftarg fields xfs: refactor xfs_calc_atomic_write_unit_max xfs: add a xfs_group_type_buftarg helper xfs: remove the call to sync_blockdev in xfs_configure_buftarg xfs: clean up the initial read logic in xfs_readsb xfs: replace strncpy with memcpy in xattr listing commit ce3cf7c8a17478456f502cb2facd6660e519ead3 Author: Torben Nielsen Date: Fri Jul 18 11:36:45 2025 +0200 hwmon: (pmbus/ucd9000) Fix error in ucd9000_gpio_set The GPIO output functionality does not work as intended. The ucd9000_gpio_set function should set UCD9000_GPIO_CONFIG_OUT_VALUE (bit 2) in order to change the output value of the selected GPIO. Instead UCD9000_GPIO_CONFIG_STATUS (bit 3) is set, but this is a read-only value. This patch fixes the mistake and provides the intended functionality of the GPIOs. See UCD90xxx Sequencer and System Health Controller PMBus Command SLVU352C section 10.43 for reference. Signed-off-by: Torben Nielsen Link: https://lore.kernel.org/r/20250718093644.356085-2-t8927095@gmail.com Signed-off-by: Guenter Roeck commit 3e8e93cbb8b0fe67661665a3e7e80642a02884a5 Author: Jonas Rebmann Date: Tue Jul 15 15:02:41 2025 +0200 hwmon: (ina238) Report energy in microjoules The hwmon sysfs interface specifies that energy values should be reported in microjoules. This is also what tools such as lmsensors expect, reporting wrong values otherwise. Adjust the driver to scale the output accordingly and adjust ina238 driver documentation. Fixes: 6daaf15a1173 ("hwmon: (ina238) Add support for SQ52206") Signed-off-by: Jonas Rebmann Link: https://lore.kernel.org/r/20250715-hwmon-ina238-microjoules-v1-1-9df678568a41@pengutronix.de Signed-off-by: Guenter Roeck commit d3d16f31d7b305df46080a95f2d254f78e04d588 Merge: 6832a9317eee28 89edfcf710875f Author: Linus Torvalds Date: Fri Jul 18 09:19:57 2025 -0700 Merge tag 'bcachefs-2025-07-17' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - two small syzbot fixes - fix discard behaviour regression; we no longer wait until the number of buckets needing discard is greater than the number of buckets available before kicking off discards - fix a fast_list leak when async object debugging is enabled - fixes for casefolding when CONFIG_UTF8 != y * tag 'bcachefs-2025-07-17' of git://evilpiepirate.org/bcachefs: bcachefs: Fix bch2_maybe_casefold() when CONFIG_UTF8=n bcachefs: Fix build when CONFIG_UNICODE=n bcachefs: Fix reference to invalid bucket in copygc bcachefs: Don't build aux search tree when still repairing node bcachefs: Tweak threshold for allocator triggering discards bcachefs: Fix triggering of discard by the journal path bcachefs: io_read: remove from async obj list in rbio_done() commit 5948705adbf1a7afcecfe9a13ff39221ef61e16b Author: Christoph Hellwig Date: Wed Jul 16 14:54:01 2025 +0200 xfs: don't allocate the xfs_extent_busy structure for zoned RTGs Busy extent tracking is primarily used to ensure that freed blocks are not reused for data allocations before the transaction that deleted them has been committed to stable storage, and secondarily to drive online discard. None of the use cases applies to zoned RTGs, as the zoned allocator can't overwrite blocks before resetting the zone, which already flushes out all transactions touching the RTGs. So the busy extent tracking is not needed for zoned RTGs, and also not called for zoned RTGs. But somehow the code to skip allocating and freeing the structure got lost during the zoned XFS upstreaming process. This not only causes these structures to unnecessarily allocated, but can also lead to memory leaks as the xg_busy_extents pointer in the xfs_group structure is overlayed with the pointer for the linked list of to be reset zones. Stop allocating and freeing the structure to not pointlessly allocate memory which is then leaked when the zone is reset. Fixes: 080d01c41d44 ("xfs: implement zoned garbage collection") Signed-off-by: Christoph Hellwig Cc: # v6.15 [cem: Fix type and add stable tag] Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit 21c8ed9047b7f44c1c49b889d4ba2f555d9ee17e Author: Edip Hazuri Date: Fri Jul 18 00:26:26 2025 +0300 ALSA: hda/realtek - Add mute LED support for HP Victus 15-fa0xxx The mute led on this laptop is using ALC245 but requires a quirk to work This patch enables the existing quirk for the device. Tested on my Victus 15-fa0xxx Laptop. The LED behaviour works as intended. Cc: Signed-off-by: Edip Hazuri Link: https://patch.msgid.link/20250717212625.366026-2-edip@medip.dev Signed-off-by: Takashi Iwai commit 6bea85979d05470e6416a2bb504a9bcd9178304c Author: Guoqing Jiang Date: Thu Jul 10 09:18:06 2025 +0800 ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv Given mt8365_dai_set_priv allocate priv_size space to copy priv_data which means we should pass mt8365_i2s_priv[i] or "struct mtk_afe_i2s_priv" instead of afe_priv which has the size of "struct mt8365_afe_private". Otherwise the KASAN complains about. [ 59.389765] BUG: KASAN: global-out-of-bounds in mt8365_dai_set_priv+0xc8/0x168 [snd_soc_mt8365_pcm] ... [ 59.394789] Call trace: [ 59.395167] dump_backtrace+0xa0/0x128 [ 59.395733] show_stack+0x20/0x38 [ 59.396238] dump_stack_lvl+0xe8/0x148 [ 59.396806] print_report+0x37c/0x5e0 [ 59.397358] kasan_report+0xac/0xf8 [ 59.397885] kasan_check_range+0xe8/0x190 [ 59.398485] asan_memcpy+0x3c/0x98 [ 59.399022] mt8365_dai_set_priv+0xc8/0x168 [snd_soc_mt8365_pcm] [ 59.399928] mt8365_dai_i2s_register+0x1e8/0x2b0 [snd_soc_mt8365_pcm] [ 59.400893] mt8365_afe_pcm_dev_probe+0x4d0/0xdf0 [snd_soc_mt8365_pcm] [ 59.401873] platform_probe+0xcc/0x228 [ 59.402442] really_probe+0x340/0x9e8 [ 59.402992] driver_probe_device+0x16c/0x3f8 [ 59.403638] driver_probe_device+0x64/0x1d8 [ 59.404256] driver_attach+0x1dc/0x4c8 [ 59.404840] bus_for_each_dev+0x100/0x190 [ 59.405442] driver_attach+0x44/0x68 [ 59.405980] bus_add_driver+0x23c/0x500 [ 59.406550] driver_register+0xf8/0x3d0 [ 59.407122] platform_driver_register+0x68/0x98 [ 59.407810] mt8365_afe_pcm_driver_init+0x2c/0xff8 [snd_soc_mt8365_pcm] Fixes: 402bbb13a195 ("ASoC: mediatek: mt8365: Add I2S DAI support") Signed-off-by: Guoqing Jiang Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250710011806.134507-1-guoqing.jiang@canonical.com Signed-off-by: Mark Brown commit 64e135f1eaba0bbb0cdee859af3328c68d5b9789 Author: Breno Leitao Date: Wed Jul 16 08:23:12 2025 -0700 efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths When processing mount options, efivarfs allocates efivarfs_fs_info (sfi) early in fs_context initialization. However, sfi is associated with the superblock and typically freed when the superblock is destroyed. If the fs_context is released (final put) before fill_super is called—such as on error paths or during reconfiguration—the sfi structure would leak, as ownership never transfers to the superblock. Implement the .free callback in efivarfs_context_ops to ensure any allocated sfi is properly freed if the fs_context is torn down before fill_super, preventing this memory leak. Suggested-by: James Bottomley Fixes: 5329aa5101f73c ("efivarfs: Add uid/gid mount options") Signed-off-by: Breno Leitao Signed-off-by: Ard Biesheuvel commit 816309d500ac34b9ae3ff88f130ca7dbbe467bfb Merge: 347e9f5043c896 a46b4822bed08d Author: Arnd Bergmann Date: Fri Jul 18 08:23:59 2025 +0200 Merge tag 'sunxi-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Allwinner fixes for 6.16 Only one fix: Correct the name of the A523's EMAC0 to GMAC0, as seen in the SoC's datasheets. The matching DT binding change is in the net tree. * tag 'sunxi-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a523: Rename emac0 to gmac0 Signed-off-by: Arnd Bergmann commit 4d33ed640ffc06734271cebda5ac2e3b5a79f453 Merge: 4399e3d84d6a64 5c244eeca57ff4 Author: Dave Airlie Date: Fri Jul 18 14:04:02 2025 +1000 Merge tag 'drm-xe-fixes-2025-07-17' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - SR-IOV fixes for GT reset and TLB invalidation - Fix memory copy direction during migration - Fix alignment check on migration - Fix MOCS and page fault init order to correctly account for topology Signed-off-by: Dave Airlie From: Lucas De Marchi Link: https://lore.kernel.org/r/6jworkgupwstm4v7aohbuzod3dyz4u7pyfhshr5ifgf2xisgj3@cm5em5yupjiu commit 0238c45fbbf8228f52aa4642f0cdc21c570d1dfe Author: Andrii Nakryiko Date: Thu Jul 17 17:10:09 2025 -0700 libbpf: Fix handling of BPF arena relocations Initial __arena global variable support implementation in libbpf contains a bug: it remembers struct bpf_map pointer for arena, which is used later on to process relocations. Recording this pointer is problematic because map pointers are not stable during ELF relocation collection phase, as an array of struct bpf_map's can be reallocated, invalidating all the pointers. Libbpf is dealing with similar issues by using a stable internal map index, though for BPF arena map specifically this approach wasn't used due to an oversight. The resulting behavior is non-deterministic issue which depends on exact layout of ELF object file, number of actual maps, etc. We didn't hit this until very recently, when this bug started triggering crash in BPF CI when validating one of sched-ext BPF programs. The fix is rather straightforward: we just follow an established pattern of remembering map index (just like obj->kconfig_map_idx, for example) instead of `struct bpf_map *`, and resolving index to a pointer at the point where map information is necessary. While at it also add debug-level message for arena-related relocation resolution information, which we already have for all other kinds of maps. Fixes: 2e7ba4f8fd1f ("libbpf: Recognize __arena global variables.") Signed-off-by: Andrii Nakryiko Tested-by: Eduard Zingerman Link: https://lore.kernel.org/r/20250718001009.610955-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4399e3d84d6a64f3b5307983b76f75a0f56edd43 Merge: 8d2ad05666d726 5ceed7a6d34a88 Author: Dave Airlie Date: Fri Jul 18 11:58:31 2025 +1000 Merge tag 'mediatek-drm-fixes-20250718' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes - 20250718 1. Add wait_event_timeout when disabling plane 2. only announce AFBC if really supported 3. mtk_dpi: Reorder output formats on MT8195/88 Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://lore.kernel.org/r/20250717232916.12372-1-chunkuang.hu@kernel.org commit 8d2ad05666d7263db3426d02558dc7e86c49ad14 Merge: fbefd8adda4ef6 83261934015c43 Author: Dave Airlie Date: Fri Jul 18 11:41:10 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-07-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.16-2025-07-17: amdgpu: - Fix a DC memory leak - DCN 4.0.1 degamma LUT fix - Fix reset counter handling for soft recovery - GC 8 fix radeon: - Drop console locks when suspending/resuming Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250717171935.642380-1-alexander.deucher@amd.com commit fbefd8adda4ef6c7a3a7b875ad075a75f0256094 Merge: cbc3fa828894cd d34d6feaf4a768 Author: Dave Airlie Date: Fri Jul 18 09:59:42 2025 +1000 Merge tag 'drm-intel-fixes-2025-07-17' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - DP AUX DPCD address fix (Imre) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://lore.kernel.org/r/aHkQmRhelb4Fzqau@intel.com commit cbc3fa828894cdad0af94e9d3d2704952fc11587 Merge: 347e9f5043c896 cb345f954eacd1 Author: Dave Airlie Date: Fri Jul 18 09:42:22 2025 +1000 Merge tag 'drm-misc-fixes-2025-07-16' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16 final?: - nouveau ioctl validation fix. - panfrost scheduler bug. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/ee784a3a-30b4-489a-8503-b1be3b09268c@linux.intel.com commit 5ceed7a6d34a8800bc39673bf2d5573990fbac4d Author: Louis-Alexis Eyraud Date: Fri Jun 6 14:50:12 2025 +0200 drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 Reorder output format arrays in both MT8195 DPI and DP_INTF block configuration by decreasing preference order instead of alphanumeric one, as expected by the atomic_get_output_bus_fmts callback function of drm_bridge controls, so the RGB ones are used first during the bus format negotiation process. Fixes: 20fa6a8fc588 ("drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88") Signed-off-by: Louis-Alexis Eyraud Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20250606-mtk_dpi-mt8195-fix-wrong-color-v1-1-47988101b798@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 8d121a82fa564e0c8bd86ce4ec56b2a43b9b016e Author: Icenowy Zheng Date: Sat May 31 20:11:40 2025 +0800 drm/mediatek: only announce AFBC if really supported Currently even the SoC's OVL does not declare the support of AFBC, AFBC is still announced to the userspace within the IN_FORMATS blob, which breaks modern Wayland compositors like KWin Wayland and others. Gate passing modifiers to drm_universal_plane_init() behind querying the driver of the hardware block for AFBC support. Fixes: c410fa9b07c3 ("drm/mediatek: Add AFBC support to Mediatek DRM driver") Signed-off-by: Icenowy Zheng Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20250531121140.387661-1-uwu@icenowy.me/ Signed-off-by: Chun-Kuang Hu commit d208261e9f7c66960587b10473081dc1cecbe50b Author: Jason-JH Lin Date: Tue Jun 24 19:31:41 2025 +0800 drm/mediatek: Add wait_event_timeout when disabling plane Our hardware registers are set through GCE, not by the CPU. DRM might assume the hardware is disabled immediately after calling atomic_disable() of drm_plane, but it is only truly disabled after the GCE IRQ is triggered. Additionally, the cursor plane in DRM uses async_commit, so DRM will not wait for vblank and will free the buffer immediately after calling atomic_disable(). To prevent the framebuffer from being freed before the layer disable settings are configured into the hardware, which can cause an IOMMU fault error, a wait_event_timeout has been added to wait for the ddp_cmdq_cb() callback,indicating that the GCE IRQ has been triggered. Fixes: 2f965be7f900 ("drm/mediatek: apply CMDQ control flow") Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20250624113223.443274-1-jason-jh.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 2e2713ae1a05eea7dda2f3b6988827196e33b25a Author: Lorenz Bauer Date: Thu Jul 17 17:49:49 2025 +0100 btf: Fix virt_to_phys() on arm64 when mmapping BTF Breno Leitao reports that arm64 emits the following warning with CONFIG_DEBUG_VIRTUAL: [ 58.896157] virt_to_phys used for non-linear address: 000000009fea9737 (__start_BTF+0x0/0x685530) [ 23.988669] WARNING: CPU: 25 PID: 1442 at arch/arm64/mm/physaddr.c:15 __virt_to_phys (arch/arm64/mm/physaddr.c:?) ... [ 24.075371] Tainted: [E]=UNSIGNED_MODULE, [N]=TEST [ 24.080276] Hardware name: Quanta S7GM 20S7GCU0010/S7G MB (CG1), BIOS 3D22 07/03/2024 [ 24.088295] pstate: 63400009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) [ 24.098440] pc : __virt_to_phys (arch/arm64/mm/physaddr.c:?) [ 24.105398] lr : __virt_to_phys (arch/arm64/mm/physaddr.c:?) ... [ 24.197257] Call trace: [ 24.199761] __virt_to_phys (arch/arm64/mm/physaddr.c:?) (P) [ 24.206883] btf_sysfs_vmlinux_mmap (kernel/bpf/sysfs_btf.c:27) [ 24.214264] sysfs_kf_bin_mmap (fs/sysfs/file.c:179) [ 24.218536] kernfs_fop_mmap (fs/kernfs/file.c:462) [ 24.222461] mmap_region (./include/linux/fs.h:? mm/internal.h:167 mm/vma.c:2405 mm/vma.c:2467 mm/vma.c:2622 mm/vma.c:2692) It seems that the memory layout on arm64 maps the kernel image in vmalloc space which is different than x86. This makes virt_to_phys emit the warning. Fix this by translating the address using __pa_symbol as suggested by Breno instead. Reported-by: Breno Leitao Closes: https://lore.kernel.org/bpf/g2gqhkunbu43awrofzqb4cs4sxkxg2i4eud6p4qziwrdh67q4g@mtw3d3aqfgmb/ Signed-off-by: Lorenz Bauer Tested-by: Breno Leitao Fixes: a539e2a6d51d ("btf: Allow mmap of vmlinux btf") Link: https://lore.kernel.org/r/20250717-vmlinux-mmap-pa-symbol-v1-1-970be6681158@isovalent.com Signed-off-by: Alexei Starovoitov commit 06efc9fe0b8deeb83b47fd7c5451fe1a60c8a761 Author: Andrea Righi Date: Sat Jul 5 07:43:51 2025 +0200 sched_ext: idle: Handle migration-disabled tasks in idle selection When SCX_OPS_ENQ_MIGRATION_DISABLED is enabled, migration-disabled tasks are also routed to ops.enqueue(). A scheduler may attempt to dispatch such tasks directly to an idle CPU using the default idle selection policy via scx_bpf_select_cpu_and() or scx_bpf_select_cpu_dfl(). This scenario must be properly handled by the built-in idle policy to avoid returning an idle CPU where the target task isn't allowed to run. Otherwise, it can lead to errors such as: EXIT: runtime error (SCX_DSQ_LOCAL[_ON] cannot move migration disabled Chrome_ChildIOT[291646] from CPU 3 to 14) Prevent this by explicitly handling migration-disabled tasks in the built-in idle selection logic, maintaining their CPU affinity. Fixes: a730e3f7a48bc ("sched_ext: idle: Consolidate default idle CPU selection kfuncs") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 14a67b42cb6f3ab66f41603c062c5056d32ea7dd Author: Chen Ridong Date: Thu Jul 17 08:55:50 2025 +0000 Revert "cgroup_freezer: cgroup_freezing: Check if not frozen" This reverts commit cff5f49d433fcd0063c8be7dd08fa5bf190c6c37. Commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") modified the cgroup_freezing() logic to verify that the FROZEN flag is not set, affecting the return value of the freezing() function, in order to address a warning in __thaw_task. A race condition exists that may allow tasks to escape being frozen. The following scenario demonstrates this issue: CPU 0 (get_signal path) CPU 1 (freezer.state reader) try_to_freeze read freezer.state __refrigerator freezer_read update_if_frozen WRITE_ONCE(current->__state, TASK_FROZEN); ... /* Task is now marked frozen */ /* frozen(task) == true */ /* Assuming other tasks are frozen */ freezer->state |= CGROUP_FROZEN; /* freezing(current) returns false */ /* because cgroup is frozen (not freezing) */ break out __set_current_state(TASK_RUNNING); /* Bug: Task resumes running when it should remain frozen */ The existing !frozen(p) check in __thaw_task makes the WARN_ON_ONCE(freezing(p)) warning redundant. Removing this warning enables reverting the commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to resolve the issue. The warning has been removed in the previous patch. This patch revert the commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to complete the fix. Fixes: cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") Reported-by: Zhong Jiawei Signed-off-by: Chen Ridong Signed-off-by: Tejun Heo commit 9beb8c5e77dc10e3889ff5f967eeffba78617a88 Author: Chen Ridong Date: Thu Jul 17 08:55:49 2025 +0000 sched,freezer: Remove unnecessary warning in __thaw_task Commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") modified the cgroup_freezing() logic to verify that the FROZEN flag is not set, affecting the return value of the freezing() function, in order to address a warning in __thaw_task. A race condition exists that may allow tasks to escape being frozen. The following scenario demonstrates this issue: CPU 0 (get_signal path) CPU 1 (freezer.state reader) try_to_freeze read freezer.state __refrigerator freezer_read update_if_frozen WRITE_ONCE(current->__state, TASK_FROZEN); ... /* Task is now marked frozen */ /* frozen(task) == true */ /* Assuming other tasks are frozen */ freezer->state |= CGROUP_FROZEN; /* freezing(current) returns false */ /* because cgroup is frozen (not freezing) */ break out __set_current_state(TASK_RUNNING); /* Bug: Task resumes running when it should remain frozen */ The existing !frozen(p) check in __thaw_task makes the WARN_ON_ONCE(freezing(p)) warning redundant. Removing this warning enables reverting commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to resolve the issue. This patch removes the warning from __thaw_task. A subsequent patch will revert commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to complete the fix. Reported-by: Zhong Jiawei Signed-off-by: Chen Ridong Signed-off-by: Tejun Heo commit 6832a9317eee280117cd695fa885b2b7a7a38daf Merge: e6e82e5bedd7e9 a2bbaff6816a15 Author: Linus Torvalds Date: Thu Jul 17 10:04:04 2025 -0700 Merge tag 'net-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from Bluetooth, CAN, WiFi and Netfilter. More code here than I would have liked. That said, better now than next week. Nothing particularly scary stands out. The improvement to the OpenVPN input validation is a bit large but better get them in before the code makes it to a final release. Some of the changes we got from sub-trees could have been split better between the fix and -next refactoring, IMHO, that has been communicated. We have one known regression in a TI AM65 board not getting link. The investigation is going a bit slow, a number of people are on vacation. We'll try to wrap it up, but don't think it should hold up the release. Current release - fix to a fix: - Bluetooth: L2CAP: fix attempting to adjust outgoing MTU, it broke some headphones and speakers Current release - regressions: - wifi: ath12k: fix packets received in WBM error ring with REO LUT enabled, fix Rx performance regression - wifi: iwlwifi: - fix crash due to a botched indexing conversion - mask reserved bits in chan_state_active_bitmap, avoid FW assert() Current release - new code bugs: - nf_conntrack: fix crash due to removal of uninitialised entry - eth: airoha: fix potential UaF in airoha_npu_get() Previous releases - regressions: - net: fix segmentation after TCP/UDP fraglist GRO - af_packet: fix the SO_SNDTIMEO constraint not taking effect and a potential soft lockup waiting for a completion - rpl: fix UaF in rpl_do_srh_inline() for sneaky skb geometry - virtio-net: fix recursive rtnl_lock() during probe() - eth: stmmac: populate entire system_counterval_t in get_time_fn() - eth: libwx: fix a number of crashes in the driver Rx path - hv_netvsc: prevent IPv6 addrconf after IFF_SLAVE lost that meaning Previous releases - always broken: - mptcp: fix races in handling connection fallback to pure TCP - rxrpc: assorted error handling and race fixes - sched: another batch of "security" fixes for qdiscs (QFQ, HTB) - tls: always refresh the queue when reading sock, avoid UaF - phy: don't register LEDs for genphy, avoid deadlock - Bluetooth: btintel: check if controller is ISO capable on btintel_classify_pkt_type(), work around FW returning incorrect capabilities Misc: - make OpenVPN Netlink input checking more strict before it makes it to a final release - wifi: cfg80211: remove scan request n_channels __counted_by, it's only yielding false positives" * tag 'net-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits) rxrpc: Fix to use conn aborts for conn-wide failures rxrpc: Fix transmission of an abort in response to an abort rxrpc: Fix notification vs call-release vs recvmsg rxrpc: Fix recv-recv race of completed call rxrpc: Fix irq-disabled in local_bh_enable() selftests/tc-testing: Test htb_dequeue_tree with deactivation and row emptying net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree net: bridge: Do not offload IGMP/MLD messages selftests: Add test cases for vlan_filter modification during runtime net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime tls: always refresh the queue when reading sock virtio-net: fix recursived rtnl_lock() during probe() net/mlx5: Update the list of the PCI supported devices hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU netfilter: nf_conntrack: fix crash due to removal of uninitialised entry net: fix segmentation after TCP/UDP fraglist GRO ipv6: mcast: Delay put pmc->idev in mld_del_delrec() net: airoha: fix potential use-after-free in airoha_npu_get() ... commit e6e82e5bedd7e924b670cea041d63aba1e03d06e Merge: e2291551827fe5 ebd6884167eac9 Author: Linus Torvalds Date: Thu Jul 17 09:46:37 2025 -0700 Merge tag 'pm-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These address three issues introduced during the current development cycle and related to system suspend and hibernation, one triggering when asynchronous suspend of devices fails, one possibly affecting memory management in the core suspend code error path, and one due to duplicate filesystems freezing during system suspend: - Fix a deadlock that may occur on asynchronous device suspend failures due to missing completion updates in error paths (Rafael Wysocki) - Drop a misplaced pm_restore_gfp_mask() call, which may cause swap to be accessed too early if system suspend fails, from suspend_devices_and_enter() (Rafael Wysocki) - Remove duplicate filesystems_freeze/thaw() calls, which sometimes cause systems to be unable to resume, from enter_state() (Zihuan Zhang)" * tag 'pm-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: Update power.completion for all devices on errors PM: suspend: clean up redundant filesystems_freeze/thaw() handling PM: suspend: Drop a misplaced pm_restore_gfp_mask() call commit 4b7d440de209cb2bb83827c30107ba05884a50c7 Merge: ed302854d0155e b8be70ec2b47ca Author: Paolo Bonzini Date: Thu Jul 17 17:06:13 2025 +0200 Merge tag 'kvm-x86-fixes-6.16-rc7' of https://github.com/kvm-x86/linux into HEAD KVM TDX fixes for 6.16 - Fix a formatting goof in the TDX documentation. - Reject KVM_SET_TSC_KHZ for guests with a protected TSC (currently only TDX). - Ensure struct kvm_tdx_capabilities fields that are not explicitly set by KVM are zeroed. commit a2bbaff6816a1531fd61b07739c3f2a500cd3693 Merge: 32247444dd8668 d24e4a7fedae12 Author: Jakub Kicinski Date: Thu Jul 17 07:54:48 2025 -0700 Merge tag 'for-net-2025-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_sync: fix connectable extended advertising when using static random address - hci_core: fix typos in macros - hci_core: add missing braces when using macro parameters - hci_core: replace 'quirks' integer by 'quirk_flags' bitmap - SMP: If an unallowed command is received consider it a failure - SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout - L2CAP: Fix null-ptr-deref in l2cap_sock_resume_cb() - L2CAP: Fix attempting to adjust outgoing MTU - btintel: Check if controller is ISO capable on btintel_classify_pkt_type - btusb: QCA: Fix downloading wrong NVM for WCN6855 GF variant without board ID * tag 'for-net-2025-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU Bluetooth: btusb: QCA: Fix downloading wrong NVM for WCN6855 GF variant without board ID Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap Bluetooth: hci_core: add missing braces when using macro parameters Bluetooth: hci_core: fix typos in macros Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout Bluetooth: SMP: If an unallowed command is received consider it a failure Bluetooth: btintel: Check if controller is ISO capable on btintel_classify_pkt_type Bluetooth: hci_sync: fix connectable extended advertising when using static random address Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() ==================== Link: https://patch.msgid.link/20250717142849.537425-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 32247444dd86681966c56e5c6dc9664c3786c706 Merge: 88b06e4fb4bf9e f0295678ad3041 Author: Jakub Kicinski Date: Thu Jul 17 07:50:51 2025 -0700 Merge branch 'rxrpc-miscellaneous-fixes' David Howells says: ==================== rxrpc: Miscellaneous fixes Here are some fixes for rxrpc: (1) Fix the calling of IP routing code with IRQs disabled. (2) Fix a recvmsg/recvmsg race when the first completes a call. (3) Fix a race between notification, recvmsg and sendmsg releasing a call. (4) Fix abort of abort. (5) Fix call-level aborts that should be connection-level aborts. ==================== Link: https://patch.msgid.link/20250717074350.3767366-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit f0295678ad304195927829b1dbf06553aa2187b0 Author: David Howells Date: Thu Jul 17 08:43:45 2025 +0100 rxrpc: Fix to use conn aborts for conn-wide failures Fix rxrpc to use connection-level aborts for things that affect the whole connection, such as the service ID not matching a local service. Fixes: 57af281e5389 ("rxrpc: Tidy up abort generation infrastructure") Reported-by: Jeffrey Altman Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250717074350.3767366-6-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit e9c0b96ec0a34fcacdf9365713578d83cecac34c Author: David Howells Date: Thu Jul 17 08:43:44 2025 +0100 rxrpc: Fix transmission of an abort in response to an abort Under some circumstances, such as when a server socket is closing, ABORT packets will be generated in response to incoming packets. Unfortunately, this also may include generating aborts in response to incoming aborts - which may cause a cycle. It appears this may be made possible by giving the client a multicast address. Fix this such that rxrpc_reject_packet() will refuse to generate aborts in response to aborts. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: Junvyyang, Tencent Zhuque Lab cc: LePremierHomme cc: Linus Torvalds cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250717074350.3767366-5-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 2fd895842d49c23137ae48252dd211e5d6d8a3ed Author: David Howells Date: Thu Jul 17 08:43:43 2025 +0100 rxrpc: Fix notification vs call-release vs recvmsg When a call is released, rxrpc takes the spinlock and removes it from ->recvmsg_q in an effort to prevent racing recvmsg() invocations from seeing the same call. Now, rxrpc_recvmsg() only takes the spinlock when actually removing a call from the queue; it doesn't, however, take it in the lead up to that when it checks to see if the queue is empty. It *does* hold the socket lock, which prevents a recvmsg/recvmsg race - but this doesn't prevent sendmsg from ending the call because sendmsg() drops the socket lock and relies on the call->user_mutex. Fix this by firstly removing the bit in rxrpc_release_call() that dequeues the released call and, instead, rely on recvmsg() to simply discard released calls (done in a preceding fix). Secondly, rxrpc_notify_socket() is abandoned if the call is already marked as released rather than trying to be clever by setting both pointers in call->recvmsg_link to NULL to trick list_empty(). This isn't perfect and can still race, resulting in a released call on the queue, but recvmsg() will now clean that up. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: Junvyyang, Tencent Zhuque Lab cc: LePremierHomme cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250717074350.3767366-4-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 962fb1f651c2cf2083e0c3ef53ba69e3b96d3fbc Author: David Howells Date: Thu Jul 17 08:43:42 2025 +0100 rxrpc: Fix recv-recv race of completed call If a call receives an event (such as incoming data), the call gets placed on the socket's queue and a thread in recvmsg can be awakened to go and process it. Once the thread has picked up the call off of the queue, further events will cause it to be requeued, and once the socket lock is dropped (recvmsg uses call->user_mutex to allow the socket to be used in parallel), a second thread can come in and its recvmsg can pop the call off the socket queue again. In such a case, the first thread will be receiving stuff from the call and the second thread will be blocked on call->user_mutex. The first thread can, at this point, process both the event that it picked call for and the event that the second thread picked the call for and may see the call terminate - in which case the call will be "released", decoupling the call from the user call ID assigned to it (RXRPC_USER_CALL_ID in the control message). The first thread will return okay, but then the second thread will wake up holding the user_mutex and, if it sees that the call has been released by the first thread, it will BUG thusly: kernel BUG at net/rxrpc/recvmsg.c:474! Fix this by just dequeuing the call and ignoring it if it is seen to be already released. We can't tell userspace about it anyway as the user call ID has become stale. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Reported-by: Junvyyang, Tencent Zhuque Lab Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: LePremierHomme cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250717074350.3767366-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit e4d2878369d590bf8455e3678a644e503172eafa Author: David Howells Date: Thu Jul 17 08:43:41 2025 +0100 rxrpc: Fix irq-disabled in local_bh_enable() The rxrpc_assess_MTU_size() function calls down into the IP layer to find out the MTU size for a route. When accepting an incoming call, this is called from rxrpc_new_incoming_call() which holds interrupts disabled across the code that calls down to it. Unfortunately, the IP layer uses local_bh_enable() which, config dependent, throws a warning if IRQs are enabled: WARNING: CPU: 1 PID: 5544 at kernel/softirq.c:387 __local_bh_enable_ip+0x43/0xd0 ... RIP: 0010:__local_bh_enable_ip+0x43/0xd0 ... Call Trace: rt_cache_route+0x7e/0xa0 rt_set_nexthop.isra.0+0x3b3/0x3f0 __mkroute_output+0x43a/0x460 ip_route_output_key_hash+0xf7/0x140 ip_route_output_flow+0x1b/0x90 rxrpc_assess_MTU_size.isra.0+0x2a0/0x590 rxrpc_new_incoming_peer+0x46/0x120 rxrpc_alloc_incoming_call+0x1b1/0x400 rxrpc_new_incoming_call+0x1da/0x5e0 rxrpc_input_packet+0x827/0x900 rxrpc_io_thread+0x403/0xb60 kthread+0x2f7/0x310 ret_from_fork+0x2a/0x230 ret_from_fork_asm+0x1a/0x30 ... hardirqs last enabled at (23): _raw_spin_unlock_irq+0x24/0x50 hardirqs last disabled at (24): _raw_read_lock_irq+0x17/0x70 softirqs last enabled at (0): copy_process+0xc61/0x2730 softirqs last disabled at (25): rt_add_uncached_list+0x3c/0x90 Fix this by moving the call to rxrpc_assess_MTU_size() out of rxrpc_init_peer() and further up the stack where it can be done without interrupts disabled. It shouldn't be a problem for rxrpc_new_incoming_call() to do it after the locks are dropped as pmtud is going to be performed by the I/O thread - and we're in the I/O thread at this point. Fixes: a2ea9a907260 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread") Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: Junvyyang, Tencent Zhuque Lab cc: LePremierHomme cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250717074350.3767366-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 88b06e4fb4bf9ee36f788cb6f5a65d188341d0e2 Author: William Liu Date: Thu Jul 17 02:29:47 2025 +0000 selftests/tc-testing: Test htb_dequeue_tree with deactivation and row emptying Ensure that any deactivation and row emptying that occurs during htb_dequeue_tree does not cause a kernel panic. This scenario originally triggered a kernel BUG_ON, and we are checking for a graceful fail now. Signed-off-by: William Liu Signed-off-by: Savino Dicanosa Link: https://patch.msgid.link/20250717022912.221426-1-will@willsroot.io Signed-off-by: Jakub Kicinski commit 0e1d5d9b5c5966e2e42e298670808590db5ed628 Author: William Liu Date: Thu Jul 17 02:28:38 2025 +0000 net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree htb_lookup_leaf has a BUG_ON that can trigger with the following: tc qdisc del dev lo root tc qdisc add dev lo root handle 1: htb default 1 tc class add dev lo parent 1: classid 1:1 htb rate 64bit tc qdisc add dev lo parent 1:1 handle 2: netem tc qdisc add dev lo parent 2:1 handle 3: blackhole ping -I lo -c1 -W0.001 127.0.0.1 The root cause is the following: 1. htb_dequeue calls htb_dequeue_tree which calls the dequeue handler on the selected leaf qdisc 2. netem_dequeue calls enqueue on the child qdisc 3. blackhole_enqueue drops the packet and returns a value that is not just NET_XMIT_SUCCESS 4. Because of this, netem_dequeue calls qdisc_tree_reduce_backlog, and since qlen is now 0, it calls htb_qlen_notify -> htb_deactivate -> htb_deactiviate_prios -> htb_remove_class_from_row -> htb_safe_rb_erase 5. As this is the only class in the selected hprio rbtree, __rb_change_child in __rb_erase_augmented sets the rb_root pointer to NULL 6. Because blackhole_dequeue returns NULL, netem_dequeue returns NULL, which causes htb_dequeue_tree to call htb_lookup_leaf with the same hprio rbtree, and fail the BUG_ON The function graph for this scenario is shown here: 0) | htb_enqueue() { 0) + 13.635 us | netem_enqueue(); 0) 4.719 us | htb_activate_prios(); 0) # 2249.199 us | } 0) | htb_dequeue() { 0) 2.355 us | htb_lookup_leaf(); 0) | netem_dequeue() { 0) + 11.061 us | blackhole_enqueue(); 0) | qdisc_tree_reduce_backlog() { 0) | qdisc_lookup_rcu() { 0) 1.873 us | qdisc_match_from_root(); 0) 6.292 us | } 0) 1.894 us | htb_search(); 0) | htb_qlen_notify() { 0) 2.655 us | htb_deactivate_prios(); 0) 6.933 us | } 0) + 25.227 us | } 0) 1.983 us | blackhole_dequeue(); 0) + 86.553 us | } 0) # 2932.761 us | qdisc_warn_nonwc(); 0) | htb_lookup_leaf() { 0) | BUG_ON(); ------------------------------------------ The full original bug report can be seen here [1]. We can fix this just by returning NULL instead of the BUG_ON, as htb_dequeue_tree returns NULL when htb_lookup_leaf returns NULL. [1] https://lore.kernel.org/netdev/pF5XOOIim0IuEfhI-SOxTgRvNoDwuux7UHKnE_Y5-zVd4wmGvNk2ceHjKb8ORnzw0cGwfmVu42g9dL7XyJLf1NEzaztboTWcm0Ogxuojoeo=@willsroot.io/ Fixes: 512bb43eb542 ("pkt_sched: sch_htb: Optimize WARN_ONs in htb_dequeue_tree() etc.") Signed-off-by: William Liu Signed-off-by: Savino Dicanosa Link: https://patch.msgid.link/20250717022816.221364-1-will@willsroot.io Signed-off-by: Jakub Kicinski commit 683dc24da8bf199bb7446e445ad7f801c79a550e Author: Joseph Huang Date: Wed Jul 16 11:35:50 2025 -0400 net: bridge: Do not offload IGMP/MLD messages Do not offload IGMP/MLD messages as it could lead to IGMP/MLD Reports being unintentionally flooded to Hosts. Instead, let the bridge decide where to send these IGMP/MLD messages. Consider the case where the local host is sending out reports in response to a remote querier like the following: mcast-listener-process (IP_ADD_MEMBERSHIP) \ br0 / \ swp1 swp2 | | QUERIER SOME-OTHER-HOST In the above setup, br0 will want to br_forward() reports for mcast-listener-process's group(s) via swp1 to QUERIER; but since the source hwdom is 0, the report is eligible for tx offloading, and is flooded by hardware to both swp1 and swp2, reaching SOME-OTHER-HOST as well. (Example and illustration provided by Tobias.) Fixes: 472111920f1c ("net: bridge: switchdev: allow the TX data plane forwarding to be offloaded") Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250716153551.1830255-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit 9bb8a9f6ea964e25b2a2a6e464bad85ea591b230 Merge: afb5bef57f90ed e0f3b3e5c77a5f Author: Jakub Kicinski Date: Thu Jul 17 07:44:30 2025 -0700 Merge branch 'net-vlan-fix-vlan-0-refcount-imbalance-of-toggling-filtering-during-runtime' Dong Chenchen says: ==================== net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime Fix VLAN 0 refcount imbalance of toggling filtering during runtime. ==================== Link: https://patch.msgid.link/20250716034504.2285203-1-dongchenchen2@huawei.com Signed-off-by: Jakub Kicinski commit e0f3b3e5c77a5f9dd7224612a6d74e0888cb055f Author: Dong Chenchen Date: Wed Jul 16 11:45:04 2025 +0800 selftests: Add test cases for vlan_filter modification during runtime Add test cases for vlan_filter modification during runtime, which may triger null-ptr-ref or memory leak of vlan0. Signed-off-by: Dong Chenchen Link: https://patch.msgid.link/20250716034504.2285203-3-dongchenchen2@huawei.com Signed-off-by: Jakub Kicinski commit 579d4f9ca9a9a605184a9b162355f6ba131f678d Author: Dong Chenchen Date: Wed Jul 16 11:45:03 2025 +0800 net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime Assuming the "rx-vlan-filter" feature is enabled on a net device, the 8021q module will automatically add or remove VLAN 0 when the net device is put administratively up or down, respectively. There are a couple of problems with the above scheme. The first problem is a memory leak that can happen if the "rx-vlan-filter" feature is disabled while the device is running: # ip link add bond1 up type bond mode 0 # ethtool -K bond1 rx-vlan-filter off # ip link del dev bond1 When the device is put administratively down the "rx-vlan-filter" feature is disabled, so the 8021q module will not remove VLAN 0 and the memory will be leaked [1]. Another problem that can happen is that the kernel can automatically delete VLAN 0 when the device is put administratively down despite not adding it when the device was put administratively up since during that time the "rx-vlan-filter" feature was disabled. null-ptr-unref or bug_on[2] will be triggered by unregister_vlan_dev() for refcount imbalance if toggling filtering during runtime: $ ip link add bond0 type bond mode 0 $ ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q $ ethtool -K bond0 rx-vlan-filter off $ ifconfig bond0 up $ ethtool -K bond0 rx-vlan-filter on $ ifconfig bond0 down $ ip link del vlan0 Root cause is as below: step1: add vlan0 for real_dev, such as bond, team. register_vlan_dev vlan_vid_add(real_dev,htons(ETH_P_8021Q),0) //refcnt=1 step2: disable vlan filter feature and enable real_dev step3: change filter from 0 to 1 vlan_device_event vlan_filter_push_vids ndo_vlan_rx_add_vid //No refcnt added to real_dev vlan0 step4: real_dev down vlan_device_event vlan_vid_del(dev, htons(ETH_P_8021Q), 0); //refcnt=0 vlan_info_rcu_free //free vlan0 step5: delete vlan0 unregister_vlan_dev BUG_ON(!vlan_info); //vlan_info is null Fix both problems by noting in the VLAN info whether VLAN 0 was automatically added upon NETDEV_UP and based on that decide whether it should be deleted upon NETDEV_DOWN, regardless of the state of the "rx-vlan-filter" feature. [1] unreferenced object 0xffff8880068e3100 (size 256): comm "ip", pid 384, jiffies 4296130254 hex dump (first 32 bytes): 00 20 30 0d 80 88 ff ff 00 00 00 00 00 00 00 00 . 0............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 81ce31fa): __kmalloc_cache_noprof+0x2b5/0x340 vlan_vid_add+0x434/0x940 vlan_device_event.cold+0x75/0xa8 notifier_call_chain+0xca/0x150 __dev_notify_flags+0xe3/0x250 rtnl_configure_link+0x193/0x260 rtnl_newlink_create+0x383/0x8e0 __rtnl_newlink+0x22c/0xa40 rtnl_newlink+0x627/0xb00 rtnetlink_rcv_msg+0x6fb/0xb70 netlink_rcv_skb+0x11f/0x350 netlink_unicast+0x426/0x710 netlink_sendmsg+0x75a/0xc20 __sock_sendmsg+0xc1/0x150 ____sys_sendmsg+0x5aa/0x7b0 ___sys_sendmsg+0xfc/0x180 [2] kernel BUG at net/8021q/vlan.c:99! Oops: invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 0 UID: 0 PID: 382 Comm: ip Not tainted 6.16.0-rc3 #61 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:unregister_vlan_dev (net/8021q/vlan.c:99 (discriminator 1)) RSP: 0018:ffff88810badf310 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88810da84000 RCX: ffffffffb47ceb9a RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff88810e8b43c8 RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff6cefe80 R10: ffffffffb677f407 R11: ffff88810badf3c0 R12: ffff88810e8b4000 R13: 0000000000000000 R14: ffff88810642a5c0 R15: 000000000000017e FS: 00007f1ff68c20c0(0000) GS:ffff888163a24000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1ff5dad240 CR3: 0000000107e56000 CR4: 00000000000006f0 Call Trace: rtnl_dellink (net/core/rtnetlink.c:3511 net/core/rtnetlink.c:3553) rtnetlink_rcv_msg (net/core/rtnetlink.c:6945) netlink_rcv_skb (net/netlink/af_netlink.c:2535) netlink_unicast (net/netlink/af_netlink.c:1314 net/netlink/af_netlink.c:1339) netlink_sendmsg (net/netlink/af_netlink.c:1883) ____sys_sendmsg (net/socket.c:712 net/socket.c:727 net/socket.c:2566) ___sys_sendmsg (net/socket.c:2622) __sys_sendmsg (net/socket.c:2652) do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) Fixes: ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") Reported-by: syzbot+a8b046e462915c65b10b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a8b046e462915c65b10b Suggested-by: Ido Schimmel Signed-off-by: Dong Chenchen Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250716034504.2285203-2-dongchenchen2@huawei.com Signed-off-by: Jakub Kicinski commit afb5bef57f90edaa6e8b10fd27236443218f8b5d Merge: 4ab26bce3969f8 2022d704014d7a Author: Jakub Kicinski Date: Thu Jul 17 07:41:25 2025 -0700 Merge tag 'ovpn-net-20250716' of https://github.com/OpenVPN/ovpn-net-next Antonio Quartulli says: ==================== This bugfix batch includes the following changes: * properly propagate sk mark to skb->mark field * reject unexpected incoming netlink attributes * reset GSO state when moving skb from transport to tunnel layer * tag 'ovpn-net-20250716' of https://github.com/OpenVPN/ovpn-net-next: ovpn: reset GSO metadata after decapsulation ovpn: reject unexpected netlink attributes ovpn: propagate socket mark to skb in UDP ==================== Link: https://patch.msgid.link/20250716115443.16763-1-antonio@openvpn.net Signed-off-by: Jakub Kicinski commit 4ab26bce3969f8fd925fe6f6f551e4d1a508c68b Author: Jakub Kicinski Date: Wed Jul 16 07:38:50 2025 -0700 tls: always refresh the queue when reading sock After recent changes in net-next TCP compacts skbs much more aggressively. This unearthed a bug in TLS where we may try to operate on an old skb when checking if all skbs in the queue have matching decrypt state and geometry. BUG: KASAN: slab-use-after-free in tls_strp_check_rcv+0x898/0x9a0 [tls] (net/tls/tls_strp.c:436 net/tls/tls_strp.c:530 net/tls/tls_strp.c:544) Read of size 4 at addr ffff888013085750 by task tls/13529 CPU: 2 UID: 0 PID: 13529 Comm: tls Not tainted 6.16.0-rc5-virtme Call Trace: kasan_report+0xca/0x100 tls_strp_check_rcv+0x898/0x9a0 [tls] tls_rx_rec_wait+0x2c9/0x8d0 [tls] tls_sw_recvmsg+0x40f/0x1aa0 [tls] inet_recvmsg+0x1c3/0x1f0 Always reload the queue, fast path is to have the record in the queue when we wake, anyway (IOW the path going down "if !strp->stm.full_len"). Fixes: 0d87bbd39d7f ("tls: strp: make sure the TCP skbs do not have overlapping data") Link: https://patch.msgid.link/20250716143850.1520292-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit be5dcaed694e4255dc02dd0acfe036708c535def Author: Zigit Zo Date: Wed Jul 16 19:57:17 2025 +0800 virtio-net: fix recursived rtnl_lock() during probe() The deadlock appears in a stack trace like: virtnet_probe() rtnl_lock() virtio_config_changed_work() netdev_notify_peers() rtnl_lock() It happens if the VMM sends a VIRTIO_NET_S_ANNOUNCE request while the virtio-net driver is still probing. The config_work in probe() will get scheduled until virtnet_open() enables the config change notification via virtio_config_driver_enable(). Fixes: df28de7b0050 ("virtio-net: synchronize operstate with admin state on up/down") Signed-off-by: Zigit Zo Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Link: https://patch.msgid.link/20250716115717.1472430-1-zuozhijie@bytedance.com Signed-off-by: Jakub Kicinski commit ad4f6df4f384905bc85f9fbfc1c0c198fb563286 Author: Maor Gottlieb Date: Wed Jul 16 10:29:29 2025 +0300 net/mlx5: Update the list of the PCI supported devices Add the upcoming ConnectX-10 device ID to the table of supported PCI device IDs. Cc: stable@vger.kernel.org Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Reviewed-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1752650969-148501-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d7501e076d859d2f381d57bd984ff6db13172727 Author: Li Tian Date: Wed Jul 16 08:26:05 2025 +0800 hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf. Commit under Fixes added a new flag change that was not made to hv_netvsc resulting in the VF being assinged an IPv6. Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf") Suggested-by: Cathy Avery Signed-off-by: Li Tian Reviewed-by: Xin Long Link: https://patch.msgid.link/20250716002607.4927-1-litian@redhat.com Signed-off-by: Jakub Kicinski commit 17ba793f381eb813596d6de1cc6820bcbda5ed8b Author: Nathan Chancellor Date: Tue Jul 15 16:15:40 2025 -0700 phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() A new warning in clang [1] points out a place in pep_sock_accept() where dst is uninitialized then passed as a const pointer to pep_find_pipe(): net/phonet/pep.c:829:37: error: variable 'dst' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 829 | newsk = pep_find_pipe(&pn->hlist, &dst, pipe_handle); | ^~~: Move the call to pn_skb_get_dst_sockaddr(), which initializes dst, to before the call to pep_find_pipe(), so that dst is consistently used initialized throughout the function. Cc: stable@vger.kernel.org Fixes: f7ae8d59f661 ("Phonet: allocate sock from accept syscall rather than soft IRQ") Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1] Closes: https://github.com/ClangBuiltLinux/linux/issues/2101 Signed-off-by: Nathan Chancellor Link: https://patch.msgid.link/20250715-net-phonet-fix-uninit-const-pointer-v1-1-8efd1bd188b3@kernel.org Signed-off-by: Jakub Kicinski commit d24e4a7fedae121d33fb32ad785b87046527eedb Author: Luiz Augusto von Dentz Date: Wed Jul 16 09:40:49 2025 -0400 Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU Configuration request only configure the incoming direction of the peer initiating the request, so using the MTU is the other direction shall not be used, that said the spec allows the peer responding to adjust: Bluetooth Core 6.1, Vol 3, Part A, Section 4.5 'Each configuration parameter value (if any is present) in an L2CAP_CONFIGURATION_RSP packet reflects an ‘adjustment’ to a configuration parameter value that has been sent (or, in case of default values, implied) in the corresponding L2CAP_CONFIGURATION_REQ packet.' That said adjusting the MTU in the response shall be limited to ERTM channels only as for older modes the remote stack may not be able to detect the adjustment causing it to silently drop packets. Link: https://github.com/bluez/bluez/issues/1422 Link: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/149 Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4793 Fixes: 042bb9603c44 ("Bluetooth: L2CAP: Fix L2CAP MTU negotiation") Signed-off-by: Luiz Augusto von Dentz commit ed302854d0155e24a3620b92e7e9f591d510c252 Author: Xiaoyao Li Date: Thu Jul 17 10:20:09 2025 +0800 KVM: TDX: Don't report base TDVMCALLs Remove TDVMCALLINFO_GET_QUOTE from user_tdvmcallinfo_1_r11 reported to userspace to align with the direction of the GHCI spec. Recently, concern was raised about a gap in the GHCI spec that left ambiguity in how to expose to the guest that only a subset of GHCI TDVMCalls were supported. During the back and forth on the spec details[0], was moved from an individually enumerable TDVMCall, to one that is part of the 'base spec', meaning it doesn't have a specific bit in the return values. Although the spec[1] is still in draft form, the GetQoute part has been agreed by the major TDX VMMs. Unfortunately the commits that were upstreamed still treat as individually enumerable. They set bit 0 in the user_tdvmcallinfo_1_r11 which is reported to userspace to tell supported optional TDVMCalls, intending to say that is supported. So stop reporting in user_tdvmcallinfo_1_r11 to align with the direction of the spec, and allow some future TDVMCall to use that bit. [0] https://lore.kernel.org/all/aEmuKII8FGU4eQZz@google.com/ [1] https://cdrdv2.intel.com/v1/dl/getContent/858626 Fixes: 28224ef02b56 ("KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities") Signed-off-by: Xiaoyao Li Message-ID: <20250717022010.677645-1-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 348954f9b78e1515777708b6764c88f225457c40 Merge: e201c19ddeed6b 7bab1bd9fdf15b Author: Takashi Iwai Date: Thu Jul 17 14:53:38 2025 +0200 Merge tag 'asoc-fix-v6.16-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 A relatively large set of changes, but most of them are quirk information for various x86 systems. There is one more substantial fix for a NULL pointer dereference when removing the AVS driver, plus one for Kconfig dependencies. commit e49f95dc8cdce2a686bd13861da152e7d2c19ccb Merge: 69b1b21ab90cf8 bbc19fef578970 Author: Paolo Abeni Date: Thu Jul 17 14:52:41 2025 +0200 Merge tag 'wireless-2025-07-17' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Couple of fixes: - ath12k performance regression from -rc1 - cfg80211 counted_by() removal for scan request as it doesn't match usage and keeps complaining - iwlwifi crash with certain older devices - iwlwifi missing an error path unlock - iwlwifi compatibility with certain BIOS updates * tag 'wireless-2025-07-17' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: Fix botched indexing conversion wifi: cfg80211: remove scan request n_channels counted_by wifi: ath12k: Fix packets received in WBM error ring with REO LUT enabled wifi: iwlwifi: mask reserved bits in chan_state_active_bitmap wifi: iwlwifi: pcie: fix locking on invalid TOP reset ==================== Link: https://patch.msgid.link/20250717091831.18787-5-johannes@sipsolutions.net Signed-off-by: Paolo Abeni commit 5c244eeca57ff4e47e1f60310d059346d1b86b9b Author: Michal Wajdeczko Date: Fri Jul 11 21:33:12 2025 +0200 drm/xe/pf: Resend PF provisioning after GT reset If we reload the GuC due to suspend/resume or GT reset then we have to resend not only any VFs provisioning data, but also PF configuration, like scheduling parameters (EQ, PT), as otherwise GuC will continue to use default values. Fixes: 411220808cee ("drm/xe/pf: Restart VFs provisioning after GT reset") Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://lore.kernel.org/r/20250711193316.1920-3-michal.wajdeczko@intel.com (cherry picked from commit 1c38dd6afa4a8ecce28e94da794fd1d205c30f51) Signed-off-by: Lucas De Marchi commit 81dccec448d204e448ae83e1fe60e8aaeaadadb8 Author: Michal Wajdeczko Date: Fri Jul 11 21:33:11 2025 +0200 drm/xe/pf: Prepare to stop SR-IOV support prior GT reset As part of the resume or GT reset, the PF driver schedules work which is then used to complete restarting of the SR-IOV support, including resending to the GuC configurations of provisioned VFs. However, in case of short delay between those two actions, which could be seen by triggering a GT reset on the suspened device: $ echo 1 > /sys/kernel/debug/dri/0000:00:02.0/gt0/force_reset this PF worker might be still busy, which lead to errors due to just stopped or disabled GuC CTB communication: [ ] xe 0000:00:02.0: [drm:xe_gt_resume [xe]] GT0: resumed [ ] xe 0000:00:02.0: [drm] GT0: trying reset from force_reset_show [xe] [ ] xe 0000:00:02.0: [drm] GT0: reset queued [ ] xe 0000:00:02.0: [drm] GT0: reset started [ ] xe 0000:00:02.0: [drm:guc_ct_change_state [xe]] GT0: GuC CT communication channel stopped [ ] xe 0000:00:02.0: [drm:guc_ct_send_recv [xe]] GT0: H2G request 0x5503 canceled! [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to push VF1 12 config KLVs (-ECANCELED) [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to push VF1 configuration (-ECANCELED) [ ] xe 0000:00:02.0: [drm:guc_ct_change_state [xe]] GT0: GuC CT communication channel disabled [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to push VF2 12 config KLVs (-ENODEV) [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to push VF2 configuration (-ENODEV) [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to push 2 of 2 VFs configurations [ ] xe 0000:00:02.0: [drm:pf_worker_restart_func [xe]] GT0: PF: restart completed While this VFs reprovisioning will be successful during next spin of the worker, to avoid those errors, make sure to cancel restart worker if we are about to trigger next reset. Fixes: 411220808cee ("drm/xe/pf: Restart VFs provisioning after GT reset") Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://lore.kernel.org/r/20250711193316.1920-2-michal.wajdeczko@intel.com (cherry picked from commit 9f50b729dd61dfb9f4d7c66900d22a7c7353a8c0) Signed-off-by: Lucas De Marchi commit 057a7d66f98eda9257e46fe44ee5750e0a6eec66 Author: Lucas De Marchi Date: Thu Jul 10 14:34:41 2025 -0700 drm/xe/migrate: Fix alignment check The check would fail if the address is unaligned, but not when accounting the offset. Instead of `buf | offset` it should have been `buf + offset`. To make it more readable and also drop the uintptr_t, just use the IS_ALIGNED() macro. Fixes: 270172f64b11 ("drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access") Reviewed-by: Matthew Brost Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250710-migrate-aligned-v1-1-44003ef3c078@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 81e139db6900503a2e68009764054fad128fbf95) Signed-off-by: Lucas De Marchi commit 3155ac89251dcb5e35a3ec2f60a74a6ed22c56fd Author: Matthew Brost Date: Thu Jul 10 12:12:08 2025 -0700 drm/xe: Move page fault init after topology init We need the topology to determine GT page fault queue size, move page fault init after topology init. Cc: stable@vger.kernel.org Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size") Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Reviewed-by: Stuart Summers Link: https://lore.kernel.org/r/20250710191208.1040215-1-matthew.brost@intel.com (cherry picked from commit beb72acb5b38dbe670d8eb752d1ad7a32f9c4119) Signed-off-by: Lucas De Marchi commit 2a58b21adee3df10ca6f4491af965c4890d2d8e3 Author: Balasubramani Vivekanandan Date: Tue May 20 19:54:45 2025 +0530 drm/xe/mocs: Initialize MOCS index early MOCS uc_index is used even before it is initialized in the following callstack guc_prepare_xfer() __xe_guc_upload() xe_guc_min_load_for_hwconfig() xe_uc_init_hwconfig() xe_gt_init_hwconfig() Do MOCS index initialization earlier in the device probe. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Ravi Kumar Vodapalli Link: https://lore.kernel.org/r/20250520142445.2792824-1-balasubramani.vivekanandan@intel.com Signed-off-by: Matt Roper (cherry picked from commit 241cc827c0987d7173714fc5a95a7c8fc9bf15c0) Signed-off-by: Lucas De Marchi commit 69b1b21ab90cf8e4ac4f8bb448f1496e71559b94 Merge: 9f735b6f8a77d7 2d72afb340657f Author: Paolo Abeni Date: Thu Jul 17 14:44:54 2025 +0200 Merge tag 'nf-25-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains Netfilter fixes for net: 1) Three patches to enhance conntrack selftests for resize and clash resolution, from Florian Westphal. 2) Expand nft_concat_range.sh selftest to improve coverage from error path, from Florian Westphal. 3) Hide clash bit to userspace from netlink dumps until there is a good reason to expose, from Florian Westphal. 4) Revert notification for device registration/unregistration for nftables basechains and flowtables, we decided to go for a better way to handle this through the nfnetlink_hook infrastructure which will come via nf-next, patch from Phil Sutter. 5) Fix crash in conntrack due to race related to SLAB_TYPESAFE_BY_RCU that results in removing a recycled object that is not yet in the hashes. Move IPS_CONFIRM setting after the object is in the hashes. From Florian Westphal. netfilter pull request 25-07-17 * tag 'nf-25-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_conntrack: fix crash due to removal of uninitialised entry Revert "netfilter: nf_tables: Add notifications for hook changes" netfilter: nf_tables: hide clash bit from userspace selftests: netfilter: nft_concat_range.sh: send packets to empty set selftests: netfilter: conntrack_resize.sh: also use udpclash tool selftests: netfilter: add conntrack clash resolution test case selftests: netfilter: conntrack_resize.sh: extend resize test ==================== Link: https://patch.msgid.link/20250717095808.41725-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 1381c231c1267480f721b06528c3a230f43f2ac5 Author: Matthew Auld Date: Thu Jul 10 14:41:29 2025 +0100 drm/xe/migrate: fix copy direction in access_memory After we do the modification on the host side, ensure we write the result back to VRAM and not the other way around, otherwise the modification will be lost if treated like a read. Fixes: 270172f64b11 ("drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access") Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250710134128.800756-2-matthew.auld@intel.com (cherry picked from commit c12fe703cab93f9d8bfe0ff32b58e7b1fd52be1f) Signed-off-by: Lucas De Marchi commit fd25fa90edcfd4db5bf69c11621021a7cfd11d53 Author: Tejas Upadhyay Date: Thu Jul 10 10:29:45 2025 +0530 drm/xe: Dont skip TLB invalidations on VF Skipping TLB invalidations on VF causing unrecoverable faults. Probable reason for skipping TLB invalidations on SRIOV could be lack of support for instruction MI_FLUSH_DW_STORE_INDEX. Add back TLB flush with some additional handling. Helps in resolving, [ 704.913454] xe 0000:00:02.1: [drm:pf_queue_work_func [xe]] ASID: 0 VFID: 0 PDATA: 0x0d92 Faulted Address: 0x0000000002fa0000 FaultType: 0 AccessType: 1 FaultLevel: 0 EngineClass: 3 bcs EngineInstance: 8 [ 704.913551] xe 0000:00:02.1: [drm:pf_queue_work_func [xe]] Fault response: Unsuccessful -22 V2: - Use Xmas tree (MichalW) Suggested-by: Matthew Brost Fixes: 97515d0b3ed92 ("drm/xe/vf: Don't emit access to Global HWSP if VF") Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250710045945.1023840-1-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay (cherry picked from commit b528e896fa570844d654b5a4617a97fa770a1030) Signed-off-by: Lucas De Marchi commit 2680efde75ccdd745da7ae6f5e30026f70439588 Merge: c4706c5058a7bd 0523c6cc87e558 Author: Jens Axboe Date: Thu Jul 17 05:56:12 2025 -0600 Merge tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme into block-6.16 Pull NVMe fixes from Christoph: "- revert the cross-controller atomic write size validation that caused regressions (Christoph Hellwig) - fix endianness of command word prints in nvme_log_err_passthru() (John Garry) - fix callback lock for TLS handshake (Maurizio Lombardi) - fix misaccounting of nvme-mpath inflight I/O (Yu Kuai) - fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() (Zheng Qixing)" * tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme: nvmet-tcp: fix callback lock for TLS handshake nvme: fix misaccounting of nvme-mpath inflight I/O nvme: revert the cross-controller atomic write size validation nvme: fix endianness of command word prints in nvme_log_err_passthru() nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() commit 1918e79be908b8a2c8757640289bc196c14d928a Author: Thomas Zimmermann Date: Tue Jul 15 17:58:17 2025 +0200 Revert "drm/gem-dma: Use dma_buf from GEM object instance" This reverts commit e8afa1557f4f963c9a511bd2c6074a941c308685. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. v3: - cc stable Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Cc: # v6.15+ Link: https://lore.kernel.org/r/20250715155934.150656-8-tzimmermann@suse.de commit 6d496e9569983a0d7a05be6661126d0702cf94f7 Author: Thomas Zimmermann Date: Tue Jul 15 17:58:16 2025 +0200 Revert "drm/gem-shmem: Use dma_buf from GEM object instance" This reverts commit 1a148af06000e545e714fe3210af3d77ff903c11. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. v3: - cc stable Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Cc: # v6.15+ Link: https://lore.kernel.org/r/20250715155934.150656-7-tzimmermann@suse.de commit 2712ca878b688682ac2ce02aefc413fc76019cd9 Author: Thomas Zimmermann Date: Tue Jul 15 17:58:15 2025 +0200 Revert "drm/gem-framebuffer: Use dma_buf from GEM object instance" This reverts commit cce16fcd7446dcff7480cd9d2b6417075ed81065. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. v3: - cc stable Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Cc: # v6.15+ Link: https://lore.kernel.org/r/20250715155934.150656-6-tzimmermann@suse.de commit fb4ef4a52b79a22ad382bfe77332642d02aef773 Author: Thomas Zimmermann Date: Tue Jul 15 17:58:14 2025 +0200 Revert "drm/prime: Use dma_buf from GEM object instance" This reverts commit f83a9b8c7fd0557b0c50784bfdc1bbe9140c9bf8. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. v3: - cc stable Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Cc: # v6.15+ Link: https://lore.kernel.org/r/20250715155934.150656-5-tzimmermann@suse.de commit bb7f4972a6ff9a537b87e1b0ecf0e561f2761dd3 Author: Thomas Zimmermann Date: Tue Jul 15 17:58:13 2025 +0200 Revert "drm/etnaviv: Use dma_buf from GEM object instance" This reverts commit e91eb3ae415472b28211d7fed07fa283845b311e. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Link: https://lore.kernel.org/r/20250715155934.150656-4-tzimmermann@suse.de commit 1e9d2aed7c2248bc5ba7d0dfea4fcc0b2f80b4f7 Author: Thomas Zimmermann Date: Tue Jul 15 17:58:12 2025 +0200 Revert "drm/vmwgfx: Use dma_buf from GEM object instance" This reverts commit aec8a40228acb385d60feec59b54573d307e60f3. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Link: https://lore.kernel.org/r/20250715155934.150656-3-tzimmermann@suse.de commit 0ecfb8ddb953605cadd806de5b62e632c8e0e49e Author: Thomas Zimmermann Date: Tue Jul 15 17:58:11 2025 +0200 Revert "drm/virtio: Use dma_buf from GEM object instance" This reverts commit 415cb45895f43015515473fbc40563ca5eec9a7c. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. Signed-off-by: Thomas Zimmermann Reviewed-by: Simona Vetter Acked-by: Christian König Acked-by: Zack Rusin Link: https://lore.kernel.org/r/20250715155934.150656-3-tzimmermann@suse.de commit 15f77764e90a713ee3916ca424757688e4f565b9 Author: Lin.Cao Date: Thu Jul 17 16:44:53 2025 +0800 drm/sched: Remove optimization that causes hang when killing dependent jobs When application A submits jobs and application B submits a job with a dependency on A's fence, the normal flow wakes up the scheduler after processing each job. However, the optimization in drm_sched_entity_add_dependency_cb() uses a callback that only clears dependencies without waking up the scheduler. When application A is killed before its jobs can run, the callback gets triggered but only clears the dependency without waking up the scheduler, causing the scheduler to enter sleep state and application B to hang. Remove the optimization by deleting drm_sched_entity_clear_dep() and its usage, ensuring the scheduler is always woken up when dependencies are cleared. Fixes: 777dbd458c89 ("drm/amdgpu: drop a dummy wakeup scheduler") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Lin.Cao Reviewed-by: Christian König Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250717084453.921097-1-lincao12@amd.com commit 2d72afb340657f03f7261e9243b44457a9228ac7 Author: Florian Westphal Date: Wed Jul 16 20:39:14 2025 +0200 netfilter: nf_conntrack: fix crash due to removal of uninitialised entry A crash in conntrack was reported while trying to unlink the conntrack entry from the hash bucket list: [exception RIP: __nf_ct_delete_from_lists+172] [..] #7 [ff539b5a2b043aa0] nf_ct_delete at ffffffffc124d421 [nf_conntrack] #8 [ff539b5a2b043ad0] nf_ct_gc_expired at ffffffffc124d999 [nf_conntrack] #9 [ff539b5a2b043ae0] __nf_conntrack_find_get at ffffffffc124efbc [nf_conntrack] [..] The nf_conn struct is marked as allocated from slab but appears to be in a partially initialised state: ct hlist pointer is garbage; looks like the ct hash value (hence crash). ct->status is equal to IPS_CONFIRMED|IPS_DYING, which is expected ct->timeout is 30000 (=30s), which is unexpected. Everything else looks like normal udp conntrack entry. If we ignore ct->status and pretend its 0, the entry matches those that are newly allocated but not yet inserted into the hash: - ct hlist pointers are overloaded and store/cache the raw tuple hash - ct->timeout matches the relative time expected for a new udp flow rather than the absolute 'jiffies' value. If it were not for the presence of IPS_CONFIRMED, __nf_conntrack_find_get() would have skipped the entry. Theory is that we did hit following race: cpu x cpu y cpu z found entry E found entry E E is expired nf_ct_delete() return E to rcu slab init_conntrack E is re-inited, ct->status set to 0 reply tuplehash hnnode.pprev stores hash value. cpu y found E right before it was deleted on cpu x. E is now re-inited on cpu z. cpu y was preempted before checking for expiry and/or confirm bit. ->refcnt set to 1 E now owned by skb ->timeout set to 30000 If cpu y were to resume now, it would observe E as expired but would skip E due to missing CONFIRMED bit. nf_conntrack_confirm gets called sets: ct->status |= CONFIRMED This is wrong: E is not yet added to hashtable. cpu y resumes, it observes E as expired but CONFIRMED: nf_ct_expired() -> yes (ct->timeout is 30s) confirmed bit set. cpu y will try to delete E from the hashtable: nf_ct_delete() -> set DYING bit __nf_ct_delete_from_lists Even this scenario doesn't guarantee a crash: cpu z still holds the table bucket lock(s) so y blocks: wait for spinlock held by z CONFIRMED is set but there is no guarantee ct will be added to hash: "chaintoolong" or "clash resolution" logic both skip the insert step. reply hnnode.pprev still stores the hash value. unlocks spinlock return NF_DROP In case CPU z does insert the entry into the hashtable, cpu y will unlink E again right away but no crash occurs. Without 'cpu y' race, 'garbage' hlist is of no consequence: ct refcnt remains at 1, eventually skb will be free'd and E gets destroyed via: nf_conntrack_put -> nf_conntrack_destroy -> nf_ct_destroy. To resolve this, move the IPS_CONFIRMED assignment after the table insertion but before the unlock. Pablo points out that the confirm-bit-store could be reordered to happen before hlist add resp. the timeout fixup, so switch to set_bit and before_atomic memory barrier to prevent this. It doesn't matter if other CPUs can observe a newly inserted entry right before the CONFIRMED bit was set: Such event cannot be distinguished from above "E is the old incarnation" case: the entry will be skipped. Also change nf_ct_should_gc() to first check the confirmed bit. The gc sequence is: 1. Check if entry has expired, if not skip to next entry 2. Obtain a reference to the expired entry. 3. Call nf_ct_should_gc() to double-check step 1. nf_ct_should_gc() is thus called only for entries that already failed an expiry check. After this patch, once the confirmed bit check passes ct->timeout has been altered to reflect the absolute 'best before' date instead of a relative time. Step 3 will therefore not remove the entry. Without this change to nf_ct_should_gc() we could still get this sequence: 1. Check if entry has expired. 2. Obtain a reference. 3. Call nf_ct_should_gc() to double-check step 1: 4 - entry is still observed as expired 5 - meanwhile, ct->timeout is corrected to absolute value on other CPU and confirm bit gets set 6 - confirm bit is seen 7 - valid entry is removed again First do check 6), then 4) so the gc expiry check always picks up either confirmed bit unset (entry gets skipped) or expiry re-check failure for re-inited conntrack objects. This change cannot be backported to releases before 5.19. Without commit 8a75a2c17410 ("netfilter: conntrack: remove unconfirmed list") |= IPS_CONFIRMED line cannot be moved without further changes. Cc: Razvan Cojocaru Link: https://lore.kernel.org/netfilter-devel/20250627142758.25664-1-fw@strlen.de/ Link: https://lore.kernel.org/netfilter-devel/4239da15-83ff-4ca4-939d-faef283471bb@gmail.com/ Fixes: 1397af5bfd7d ("netfilter: conntrack: remove the percpu dying list") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9f735b6f8a77d7be7f8b0765dc93587774832cb1 Author: Felix Fietkau Date: Sat Jul 5 17:06:21 2025 +0200 net: fix segmentation after TCP/UDP fraglist GRO Since "net: gro: use cb instead of skb->network_header", the skb network header is no longer set in the GRO path. This breaks fraglist segmentation, which relies on ip_hdr()/tcp_hdr() to check for address/port changes. Fix this regression by selectively setting the network header for merged segment skbs. Fixes: 186b1ea73ad8 ("net: gro: use cb instead of skb->network_header") Signed-off-by: Felix Fietkau Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250705150622.10699-1-nbd@nbd.name Signed-off-by: Paolo Abeni commit 11ff5e06e02326a7c87aaa73dbffaed94918261d Author: André Draszik Date: Tue Jul 15 17:00:20 2025 +0100 gpiolib: devres: release GPIOs in devm_gpiod_put_array() devm_gpiod_put_array() is meant to undo the effects of devm_gpiod_get_array() - in particular, it should release the GPIOs contained in the array acquired with the latter. It is meant to be the resource-managed version of gpiod_put_array(), and it should behave similar to the non-array version devm_gpiod_put(). Since commit d1d52c6622a6 ("gpiolib: devres: Finish the conversion to use devm_add_action()") it doesn't do that anymore, it just removes the devres action and frees associated memory, but it doesn't actually release the GPIOs. Fix by switching from devm_remove_action() to devm_release_action(), which will in addition invoke the action to release the GPIOs. Fixes: d1d52c6622a6 ("gpiolib: devres: Finish the conversion to use devm_add_action()") Signed-off-by: André Draszik Reported-by: Wattson CI Reported-by: Samuel Wu Link: https://lore.kernel.org/r/20250715-gpiolib-devres-put-array-fix-v1-1-970d82a8c887@linaro.org Signed-off-by: Bartosz Golaszewski commit ae3264a25a4635531264728859dbe9c659fad554 Author: Yue Haibing Date: Mon Jul 14 22:19:57 2025 +0800 ipv6: mcast: Delay put pmc->idev in mld_del_delrec() pmc->idev is still used in ip6_mc_clear_src(), so as mld_clear_delrec() does, the reference should be put after ip6_mc_clear_src() return. Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface mld data") Signed-off-by: Yue Haibing Link: https://patch.msgid.link/20250714141957.3301871-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit af90e85307241ec495c2de85854cd2e35a4df16b Merge: bf4807c89d8f92 d459dbbbfa3231 Author: Alexei Starovoitov Date: Wed Jul 16 18:32:31 2025 -0700 Merge branch 's390-bpf-fix-bpf_arch_text_poke-with-new_addr-null-again' Ilya Leoshkevich says: ==================== s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL again This series fixes a regression causing perf on s390 to trigger a kernel panic. Patch 1 fixes the issue, patch 2 adds a test to make sure this doesn't happen again. ==================== Link: https://patch.msgid.link/20250716194524.48109-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit d459dbbbfa323165849451edb9690a933c210bac Author: Ilya Leoshkevich Date: Wed Jul 16 21:35:07 2025 +0200 selftests/bpf: Stress test attaching a BPF prog to another BPF prog Add a test that invokes a BPF prog in a loop, while concurrently attaching and detaching another BPF prog to and from it. This helps identifying race conditions in bpf_arch_text_poke(). Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250716194524.48109-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 6a5abf8cf182f577c7ae6c62f14debc9754ec986 Author: Ilya Leoshkevich Date: Wed Jul 16 21:35:06 2025 +0200 s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL again Commit 7ded842b356d ("s390/bpf: Fix bpf_plt pointer arithmetic") has accidentally removed the critical piece of commit c730fce7c70c ("s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL"), causing intermittent kernel panics in e.g. perf's on_switch() prog to reappear. Restore the fix and add a comment. Fixes: 7ded842b356d ("s390/bpf: Fix bpf_plt pointer arithmetic") Cc: stable@vger.kernel.org Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250716194524.48109-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit e14fd98c6d66cb76694b12c05768e4f9e8c95664 Author: Breno Leitao Date: Wed Jul 16 10:38:48 2025 -0700 sched/ext: Prevent update_locked_rq() calls with NULL rq Avoid invoking update_locked_rq() when the runqueue (rq) pointer is NULL in the SCX_CALL_OP and SCX_CALL_OP_RET macros. Previously, calling update_locked_rq(NULL) with preemption enabled could trigger the following warning: BUG: using __this_cpu_write() in preemptible [00000000] This happens because __this_cpu_write() is unsafe to use in preemptible context. rq is NULL when an ops invoked from an unlocked context. In such cases, we don't need to store any rq, since the value should already be NULL (unlocked). Ensure that update_locked_rq() is only called when rq is non-NULL, preventing calling __this_cpu_write() on preemptible context. Suggested-by: Peter Zijlstra Fixes: 18853ba782bef ("sched_ext: Track currently locked rq") Signed-off-by: Breno Leitao Acked-by: Andrea Righi Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v6.15 commit 69a46a5b42f9423b2536c1026518f6ff355967c4 Merge: 3cd582e7d07875 bedd0330a19b3a Author: Jakub Kicinski Date: Wed Jul 16 16:17:34 2025 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-07-15 (ixgbe, fm10k, i40e, ice) Arnd Bergmann resolves compile issues with large NR_CPUS for ixgbe, fm10k, and i40e. For ice: Dave adds a NULL check for LAG netdev. Michal corrects a pointer check in debugfs initialization. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: check correct pointer in fwlog debugfs ice: add NULL check in eswitch lag check ethernet: intel: fix building with large NR_CPUS ==================== Link: https://patch.msgid.link/20250715202948.3841437-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3cd582e7d0787506990ef0180405eb6224fa90a6 Author: Alok Tiwari Date: Tue Jul 15 07:30:58 2025 -0700 net: airoha: fix potential use-after-free in airoha_npu_get() np->name was being used after calling of_node_put(np), which releases the node and can lead to a use-after-free bug. Previously, of_node_put(np) was called unconditionally after of_find_device_by_node(np), which could result in a use-after-free if pdev is NULL. This patch moves of_node_put(np) after the error check to ensure the node is only released after both the error and success cases are handled appropriately, preventing potential resource issues. Fixes: 23290c7bc190 ("net: airoha: Introduce Airoha NPU support") Signed-off-by: Alok Tiwari Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250715143102.3458286-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit 531d0d32de3e1b6b77a87bd37de0c2c6e17b496a Author: Christoph Paasch Date: Tue Jul 15 13:20:53 2025 -0700 net/mlx5: Correctly set gso_size when LRO is used gso_size is expected by the networking stack to be the size of the payload (thus, not including ethernet/IP/TCP-headers). However, cqe_bcnt is the full sized frame (including the headers). Dividing cqe_bcnt by lro_num_seg will then give incorrect results. For example, running a bpftrace higher up in the TCP-stack (tcp_event_data_recv), we commonly have gso_size set to 1450 or 1451 even though in reality the payload was only 1448 bytes. This can have unintended consequences: - In tcp_measure_rcv_mss() len will be for example 1450, but. rcv_mss will be 1448 (because tp->advmss is 1448). Thus, we will always recompute scaling_ratio each time an LRO-packet is received. - In tcp_gro_receive(), it will interfere with the decision whether or not to flush and thus potentially result in less gro'ed packets. So, we need to discount the protocol headers from cqe_bcnt so we can actually divide the payload by lro_num_seg to get the real gso_size. v2: - Use "(unsigned char *)tcp + tcp->doff * 4 - skb->data)" to compute header-len (Tariq Toukan ) - Improve commit-message (Gal Pressman ) Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Christoph Paasch Reviewed-by: Tariq Toukan Reviewed-by: Gal Pressman Link: https://patch.msgid.link/20250715-cpaasch-pf-925-investigate-incorrect-gso_size-on-cx-7-nic-v2-1-e06c3475f3ac@openai.com Signed-off-by: Jakub Kicinski commit 89edfcf710875feedc4264a6c9c4e7fb55486422 Author: Kent Overstreet Date: Wed Jul 16 17:31:31 2025 -0400 bcachefs: Fix bch2_maybe_casefold() when CONFIG_UTF8=n maybe_casefold() shouldn't have been nooped, just bch2_casefold(). Fixes: 94426e4201fb ("bcachefs: opts.casefold_disabled") Signed-off-by: Kent Overstreet commit 40c35a0b476197419a19aaa1f76e83d0b8874921 Author: Kent Overstreet Date: Tue Jul 15 10:01:00 2025 -0400 bcachefs: Fix build when CONFIG_UNICODE=n 94426e4201fb, which added the killswitch for casefolding, accidentally removed some of the ifdefs we need to avoid build errors. It appears we need better build testing for different configurations, it took two weeks for the robots to catch this one. Fixes: 94426e4201fb ("bcachefs: opts.casefold_disabled") Signed-off-by: Kent Overstreet commit c02b943f7d127caf43f49ab6c9eaf8e1b082b9af Author: Kent Overstreet Date: Sun Jul 13 17:19:34 2025 -0400 bcachefs: Fix reference to invalid bucket in copygc Use bch2_dev_bucket_tryget() instead of bch2_dev_tryget() before checking the bucket bitmap. Reported-by: syzbot+3168625f36f4a539237e@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 9fe8ec866442b6ee7eac8d5ceda18f88aaa7f78d Author: Kent Overstreet Date: Sun Jul 13 13:31:33 2025 -0400 bcachefs: Don't build aux search tree when still repairing node bch2_btree_node_drop_keys_outside_node() will (re)build aux search trees, because it's also called by topology repair. bch2_btree_node_read_done() was calling it before validating individual keys; invalid ones have to be dropped. If we call drop_keys_outside_node() first, then bch2_bset_build_aux_tree() doesn't run because the node already has an aux search tree - which was invalidated by the repair. Reported-by: syzbot+c5e7a66b3b23ae65d44f@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 6a1c4323defd18ca732c13d9abf4204ea1a4182f Author: Kent Overstreet Date: Sat Jul 12 19:33:12 2025 -0400 bcachefs: Tweak threshold for allocator triggering discards The allocator path has a "if we're really low on free buckets, check if we should issue discards" - tweak this to also trigger discards if more than 1/128th of the device is in need_discard state. Signed-off-by: Kent Overstreet commit b4d6e204f892846b435ad5df89306a8ad56191f9 Author: Kent Overstreet Date: Sat Jul 12 19:31:49 2025 -0400 bcachefs: Fix triggering of discard by the journal path It becomes possible to do discards after a journal flush, which naturally the journal code is reponsible for. A prior refactoring seems to have broken this - which went unnoticed because the foreground allocator path can also trigger discards. Signed-off-by: Kent Overstreet commit 83261934015c434fabb980a3e613b01d9976e877 Author: Eeli Haapalainen Date: Mon Jul 14 08:13:09 2025 +0300 drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume Commit 42cdf6f687da ("drm/amdgpu/gfx8: always restore kcq MQDs") made the ring pointer always to be reset on resume from suspend. This caused compute rings to fail since the reset was done without also resetting it for the firmware. Reset wptr on the GPU to avoid a disconnect between the driver and firmware wptr. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3911 Fixes: 42cdf6f687da ("drm/amdgpu/gfx8: always restore kcq MQDs") Signed-off-by: Eeli Haapalainen Signed-off-by: Alex Deucher (cherry picked from commit 2becafc319db3d96205320f31cc0de4ee5a93747) Cc: stable@vger.kernel.org commit 86790e300d8b7bbadaad5024e308c52f1222128f Author: Lijo Lazar Date: Mon Jul 14 10:37:00 2025 +0530 drm/amdgpu: Increase reset counter only on success Increment the reset counter only if soft recovery succeeded. This is consistent with a ring hard reset behaviour where counter gets incremented only if hard reset succeeded. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 25c314aa3ec3d30e4ee282540e2096b5c66a2437) Cc: stable@vger.kernel.org commit 4c1a0fc2aeb8486956f37cad4433e4d18b45821d Author: Thomas Zimmermann Date: Tue Jul 15 11:50:54 2025 +0200 drm/radeon: Do not hold console lock during resume The function radeon_resume_kms() acquires the console lock. It is inconsistent, as it depends on the notify_client argument. That lock then covers a number of suspend operations that are unrelated to the console. Remove the calls to console_lock() and console_unlock() from the radeon function. The console lock is only required by DRM's fbdev emulation, which acquires it as necessary. Also fixes a possible circular dependency between the console lock and the client-list mutex, where the mutex is supposed to be taken first. Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher (cherry picked from commit fff8e0504499a929f26e2fb7cf7e2c9854e37b91) commit 5dd0b96118e09a3725e3f83543e133b1fd02c18c Author: Thomas Zimmermann Date: Tue Jul 15 11:50:53 2025 +0200 drm/radeon: Do not hold console lock while suspending clients The radeon driver holds the console lock while suspending in-kernel DRM clients. This creates a circular dependency with the client-list mutex, which is supposed to be acquired first. Reported when combining radeon with another DRM driver. Therefore, do not take the console lock in radeon, but let the fbdev DRM client acquire the lock when needed. This is what all other DRM drivers so. Signed-off-by: Thomas Zimmermann Reported-by: Jeff Johnson Closes: https://lore.kernel.org/dri-devel/0a087cfd-bd4c-48f1-aa2f-4a3b12593935@oss.qualcomm.com/ Suggested-by: Ville Syrjälä Signed-off-by: Alex Deucher (cherry picked from commit 612ec7c69d04cb58beb1332c2806da9f2f47a3ae) commit 97a0f2b5f4d4afcec34376e4428e157ce95efa71 Author: Melissa Wen Date: Mon Jul 7 16:52:05 2025 -0400 drm/amd/display: Disable CRTC degamma LUT for DCN401 In DCN401 pre-blending degamma LUT isn't affecting cursor as in previous DCN version. As this is not the behavior close to what is expected for CRTC degamma LUT, disable CRTC degamma LUT property in this HW. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4176 --- When enabling HDR on KDE, it takes the first CRTC 1D LUT available and apply a color transformation (Gamma 2.2 -> PQ). AMD driver usually advertises a CRTC degamma LUT as the first CRTC 1D LUT, but it's actually applied pre-blending. In previous HW version, it seems to work fine because the 1D LUT was applied to cursor too, but DCN401 presents a different behavior and the 1D LUT isn't affecting the hardware cursor. To address the wrong gamma on cursor with HDR (see the link), I came up with this patch that disables CRTC degamma LUT in this hw, since it presents a different behavior than others. With this KDE sees CRTC regamma LUT as the first post-blending 1D LUT available. This is actually more consistent with AMD color pipeline. It was tested by the reporter, since I don't have the HW available for local testing and debugging. Melissa --- Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 340231cdceec2c45995d773a358ca3c341f151aa) Cc: stable@vger.kernel.org commit b2ee9fa0fe6416e16c532f61b909c79b5d4ed282 Author: Clayton King Date: Thu Jun 19 13:54:26 2025 -0400 drm/amd/display: Free memory allocation [WHY] Free memory to avoid memory leak Reviewed-by: Joshua Aberback Signed-off-by: Clayton King Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit fa699acb8e9be2341ee318077fa119acc7d5f329) Cc: stable@vger.kernel.org commit e2291551827fe5d2d3758c435c191d32b6d1350e Merge: 4664a4ddb9211a 1ed171a3afe815 Author: Linus Torvalds Date: Wed Jul 16 13:00:38 2025 -0700 Merge tag 'probes-fixes-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes fix from Masami Hiramatsu: - fprobe-event: The @params variable was being used in an error path without being initialized. The fix to return an error code. * tag 'probes-fixes-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/probes: Avoid using params uninitialized in parse_btf_arg() commit 43015955795a619f7ca4ae69b9c0ffc994c82818 Author: Zijun Hu Date: Tue Jul 15 20:40:13 2025 +0800 Bluetooth: btusb: QCA: Fix downloading wrong NVM for WCN6855 GF variant without board ID For GF variant of WCN6855 without board ID programmed btusb_generate_qca_nvm_name() will chose wrong NVM 'qca/nvm_usb_00130201.bin' to download. Fix by choosing right NVM 'qca/nvm_usb_00130201_gf.bin'. Also simplify NVM choice logic of btusb_generate_qca_nvm_name(). Fixes: d6cba4e6d0e2 ("Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller") Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 6851a0c228fc040dce8e4c393004209e7372e0a3 Author: Christian Eggers Date: Mon Jul 14 22:27:45 2025 +0200 Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap The 'quirks' member already ran out of bits on some platforms some time ago. Replace the integer member by a bitmap in order to have enough bits in future. Replace raw bit operations by accessor macros. Fixes: ff26b2dd6568 ("Bluetooth: Add quirk for broken READ_VOICE_SETTING") Fixes: 127881334eaa ("Bluetooth: Add quirk for broken READ_PAGE_SCAN_TYPE") Suggested-by: Pauli Virtanen Tested-by: Ivan Pravdin Signed-off-by: Kiran K Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit cdee6a4416b2a57c89082929cc60e2275bb32a3a Author: Christian Eggers Date: Mon Jul 14 22:27:44 2025 +0200 Bluetooth: hci_core: add missing braces when using macro parameters Macro parameters should always be put into braces when accessing it. Fixes: 4fc9857ab8c6 ("Bluetooth: hci_sync: Add check simultaneous roles support") Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit dfef8d87a031ac1a46dde3de804e0fcf3c3a6afd Author: Christian Eggers Date: Mon Jul 14 22:27:43 2025 +0200 Bluetooth: hci_core: fix typos in macros The provided macro parameter is named 'dev' (rather than 'hdev', which may be a variable on the stack where the macro is used). Fixes: a9a830a676a9 ("Bluetooth: hci_event: Fix sending HCI_OP_READ_ENC_KEY_SIZE") Fixes: 6126ffabba6b ("Bluetooth: Introduce HCI_CONN_FLAG_DEVICE_PRIVACY device flag") Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit 6ef99c917688a8510259e565bd1b168b7146295a Author: Luiz Augusto von Dentz Date: Wed Jul 2 11:53:40 2025 -0400 Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout This replaces the usage of HCI_ERROR_REMOTE_USER_TERM, which as the name suggest is to indicate a regular disconnection initiated by an user, with HCI_ERROR_AUTH_FAILURE to indicate the session has timeout thus any pairing shall be considered as failed. Fixes: 1e91c29eb60c ("Bluetooth: Use hci_disconnect for immediate disconnection from SMP") Signed-off-by: Luiz Augusto von Dentz commit fe4840df0bdf341f376885271b7680764fe6b34e Author: Luiz Augusto von Dentz Date: Mon Jun 30 14:42:23 2025 -0400 Bluetooth: SMP: If an unallowed command is received consider it a failure If a command is received while a bonding is ongoing consider it a pairing failure so the session is cleanup properly and the device is disconnected immediately instead of continuing with other commands that may result in the session to get stuck without ever completing such as the case bellow: > ACL Data RX: Handle 2048 flags 0x02 dlen 21 SMP: Identity Information (0x08) len 16 Identity resolving key[16]: d7e08edef97d3e62cd2331f82d8073b0 > ACL Data RX: Handle 2048 flags 0x02 dlen 21 SMP: Signing Information (0x0a) len 16 Signature key[16]: 1716c536f94e843a9aea8b13ffde477d Bluetooth: hci0: unexpected SMP command 0x0a from XX:XX:XX:XX:XX:XX > ACL Data RX: Handle 2048 flags 0x02 dlen 12 SMP: Identity Address Information (0x09) len 7 Address: XX:XX:XX:XX:XX:XX (Intel Corporate) While accourding to core spec 6.1 the expected order is always BD_ADDR first first then CSRK: When using LE legacy pairing, the keys shall be distributed in the following order: LTK by the Peripheral EDIV and Rand by the Peripheral IRK by the Peripheral BD_ADDR by the Peripheral CSRK by the Peripheral LTK by the Central EDIV and Rand by the Central IRK by the Central BD_ADDR by the Central CSRK by the Central When using LE Secure Connections, the keys shall be distributed in the following order: IRK by the Peripheral BD_ADDR by the Peripheral CSRK by the Peripheral IRK by the Central BD_ADDR by the Central CSRK by the Central According to the Core 6.1 for commands used for key distribution "Key Rejected" can be used: '3.6.1. Key distribution and generation A device may reject a distributed key by sending the Pairing Failed command with the reason set to "Key Rejected". Fixes: b28b4943660f ("Bluetooth: Add strict checks for allowed SMP PDUs") Signed-off-by: Luiz Augusto von Dentz commit 6ec3185fbc3528f2284c347fb9bd8be6fa672ed4 Author: Luiz Augusto von Dentz Date: Wed Jul 9 15:02:56 2025 -0400 Bluetooth: btintel: Check if controller is ISO capable on btintel_classify_pkt_type Due to what seem to be a bug with variant version returned by some firmwares the code may set hdev->classify_pkt_type with btintel_classify_pkt_type when in fact the controller doesn't even support ISO channels feature but may use the handle range expected from a controllers that does causing the packets to be reclassified as ISO causing several bugs. To fix the above btintel_classify_pkt_type will attempt to check if the controller really supports ISO channels and in case it doesn't don't reclassify even if the handle range is considered to be ISO, this is considered safer than trying to fix the specific controller/firmware version as that could change over time and causing similar problems in the future. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219553 Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2100565 Link: https://github.com/StarLabsLtd/firmware/issues/180 Fixes: f25b7fd36cc3 ("Bluetooth: Add vendor-specific packet classification for ISO data") Cc: stable@vger.kernel.org Signed-off-by: Luiz Augusto von Dentz Tested-by: Sean Rhodes commit d85edab911a4c1fcbe3f08336eff5c7feec567d0 Author: Alessandro Gasbarroni Date: Wed Jul 9 09:53:11 2025 +0200 Bluetooth: hci_sync: fix connectable extended advertising when using static random address Currently, the connectable flag used by the setup of an extended advertising instance drives whether we require privacy when trying to pass a random address to the advertising parameters (Own Address). If privacy is not required, then it automatically falls back to using the controller's public address. This can cause problems when using controllers that do not have a public address set, but instead use a static random address. e.g. Assume a BLE controller that does not have a public address set. The controller upon powering is set with a random static address by default by the kernel. < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 Address: E4:AF:26:D8:3E:3A (Static) > HCI Event: Command Complete (0x0e) plen 4 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) Setting non-connectable extended advertisement parameters in bluetoothctl mgmt add-ext-adv-params -r 0x801 -x 0x802 -P 2M -g 1 correctly sets Own address type as Random < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 ... Own address type: Random (0x01) Setting connectable extended advertisement parameters in bluetoothctl mgmt add-ext-adv-params -r 0x801 -x 0x802 -P 2M -g -c 1 mistakenly sets Own address type to Public (which causes to use Public Address 00:00:00:00:00:00) < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 ... Own address type: Public (0x00) This causes either the controller to emit an Invalid Parameters error or to mishandle the advertising. This patch makes sure that we use the already set static random address when requesting a connectable extended advertising when we don't require privacy and our public address is not set (00:00:00:00:00:00). Fixes: 3fe318ee72c5 ("Bluetooth: move hci_get_random_address() to hci_sync") Signed-off-by: Alessandro Gasbarroni Signed-off-by: Luiz Augusto von Dentz commit a0075accbf0d76c2dad1ad3993d2e944505d99a0 Author: Kuniyuki Iwashima Date: Mon Jul 7 19:28:29 2025 +0000 Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() syzbot reported null-ptr-deref in l2cap_sock_resume_cb(). [0] l2cap_sock_resume_cb() has a similar problem that was fixed by commit 1bff51ea59a9 ("Bluetooth: fix use-after-free error in lock_sock_nested()"). Since both l2cap_sock_kill() and l2cap_sock_resume_cb() are executed under l2cap_sock_resume_cb(), we can avoid the issue simply by checking if chan->data is NULL. Let's not access to the killed socket in l2cap_sock_resume_cb(). [0]: BUG: KASAN: null-ptr-deref in instrument_atomic_write include/linux/instrumented.h:82 [inline] BUG: KASAN: null-ptr-deref in clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] BUG: KASAN: null-ptr-deref in l2cap_sock_resume_cb+0xb4/0x17c net/bluetooth/l2cap_sock.c:1711 Write of size 8 at addr 0000000000000570 by task kworker/u9:0/52 CPU: 1 UID: 0 PID: 52 Comm: kworker/u9:0 Not tainted 6.16.0-rc4-syzkaller-g7482bb149b9f #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: hci0 hci_rx_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:501 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_report+0x58/0x84 mm/kasan/report.c:524 kasan_report+0xb0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189 __kasan_check_write+0x20/0x30 mm/kasan/shadow.c:37 instrument_atomic_write include/linux/instrumented.h:82 [inline] clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] l2cap_sock_resume_cb+0xb4/0x17c net/bluetooth/l2cap_sock.c:1711 l2cap_security_cfm+0x524/0xea0 net/bluetooth/l2cap_core.c:7357 hci_auth_cfm include/net/bluetooth/hci_core.h:2092 [inline] hci_auth_complete_evt+0x2e8/0xa4c net/bluetooth/hci_event.c:3514 hci_event_func net/bluetooth/hci_event.c:7511 [inline] hci_event_packet+0x650/0xe9c net/bluetooth/hci_event.c:7565 hci_rx_work+0x320/0xb18 net/bluetooth/hci_core.c:4070 process_one_work+0x7e8/0x155c kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3402 kthread+0x5fc/0x75c kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:847 Fixes: d97c899bde33 ("Bluetooth: Introduce L2CAP channel callback for resuming") Reported-by: syzbot+e4d73b165c3892852d22@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/686c12bd.a70a0220.29fe6c.0b13.GAE@google.com/ Signed-off-by: Kuniyuki Iwashima Signed-off-by: Luiz Augusto von Dentz commit b65ca21835ed615907ba231a60db80a2605b94dc Author: Nathan Chancellor Date: Tue Jul 15 20:07:01 2025 -0700 riscv: uaccess: Fix -Wuninitialized and -Wshadow in __put_user_nocheck After a recent change in clang to strengthen uninitialized warnings [1], there is a warning from val being uninitialized in __put_user_nocheck when called from futex_put_value(): kernel/futex/futex.h:326:18: warning: variable 'val' is uninitialized when used within its own initialization [-Wuninitialized] 326 | unsafe_put_user(val, to, Efault); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ arch/riscv/include/asm/uaccess.h:464:21: note: expanded from macro 'unsafe_put_user' 464 | __put_user_nocheck(x, (ptr), label) | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ arch/riscv/include/asm/uaccess.h:314:36: note: expanded from macro '__put_user_nocheck' 314 | __inttype(x) val = (__inttype(x))x; \ | ~~~ ^ While not on by default, -Wshadow flags the same mistake: kernel/futex/futex.h:326:2: warning: declaration shadows a local variable [-Wshadow] 326 | unsafe_put_user(val, to, Efault); | ^ arch/riscv/include/asm/uaccess.h:464:2: note: expanded from macro 'unsafe_put_user' 464 | __put_user_nocheck(x, (ptr), label) | ^ arch/riscv/include/asm/uaccess.h:314:16: note: expanded from macro '__put_user_nocheck' 314 | __inttype(x) val = (__inttype(x))x; \ | ^ kernel/futex/futex.h:320:48: note: previous declaration is here 320 | static __always_inline int futex_put_value(u32 val, u32 __user *to) | ^ Use a three underscore prefix for the val variable in __put_user_nocheck to avoid clashing with either val or __val, which are both used within the put_user macros, clearing up all warnings. Closes: https://github.com/ClangBuiltLinux/linux/issues/2109 Fixes: ca1a66cdd685 ("riscv: uaccess: do not do misaligned accesses in get/put_user()") Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1] Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250715-riscv-uaccess-fix-self-init-val-v1-1-82b8e911f120@kernel.org Signed-off-by: Palmer Dabbelt commit c7cafd5b81cc07fb402e3068d134c21e60ea688c Author: Pavel Begunkov Date: Wed Jul 16 17:20:17 2025 +0100 io_uring/poll: fix POLLERR handling 8c8492ca64e7 ("io_uring/net: don't retry connect operation on EPOLLERR") is a little dirty hack that 1) wrongfully assumes that POLLERR equals to a failed request, which breaks all POLLERR users, e.g. all error queue recv interfaces. 2) deviates the connection request behaviour from connect(2), and 3) racy and solved at a wrong level. Nothing can be done with 2) now, and 3) is beyond the scope of the patch. At least solve 1) by moving the hack out of generic poll handling into io_connect(). Cc: stable@vger.kernel.org Fixes: 8c8492ca64e79 ("io_uring/net: don't retry connect operation on EPOLLERR") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3dc89036388d602ebd84c28e5042e457bdfc952b.1752682444.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5874ca4c6280d67158bf3db1ba7a5913eb3670d7 Author: Alexandre Ghiti Date: Wed Jul 16 12:05:16 2025 +0000 riscv: Stop supporting static ftrace Now that DYNAMIC_FTRACE was introduced, there is no need to support static ftrace as it is way less performant. This simplifies the code and prevents build failures as reported by kernel test robot when !DYNAMIC_FTRACE. Also make sure that FUNCTION_TRACER can only be selected if DYNAMIC_FTRACE is supported (we have a dependency on the toolchain). Co-developed-by: chenmiao Signed-off-by: chenmiao Fixes: b2137c3b6d7a ("riscv: ftrace: prepare ftrace for atomic code patching") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506191949.o3SMu8Zn-lkp@intel.com/ Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250716-dev-alex-static_ftrace-v1-1-ba5d2b6fc9c0@rivosinc.com Signed-off-by: Palmer Dabbelt commit b3510183ab7d63c71a3f5c89043d31686a76a34c Author: Andreas Schwab Date: Thu Jul 10 15:32:18 2025 +0200 riscv: traps_misaligned: properly sign extend value in misaligned load handler Add missing cast to signed long. Signed-off-by: Andreas Schwab Fixes: 956d705dd279 ("riscv: Unaligned load/store handling for M_MODE") Tested-by: Clément Léger Link: https://lore.kernel.org/r/mvmikk0goil.fsf@suse.de Signed-off-by: Palmer Dabbelt commit 969f028bf2c40573ef18061f702ede3ebfe12b42 Author: Nam Cao Date: Wed Jun 25 10:56:30 2025 +0200 riscv: Enable interrupt during exception handling force_sig_fault() takes a spinlock, which is a sleeping lock with CONFIG_PREEMPT_RT=y. However, exception handling calls force_sig_fault() with interrupt disabled, causing a sleeping in atomic context warning. This can be reproduced using userspace programs such as: int main() { asm ("ebreak"); } or int main() { asm ("unimp"); } There is no reason that interrupt must be disabled while handling exceptions from userspace. Enable interrupt while handling user exceptions. This also has the added benefit of avoiding unnecessary delays in interrupt handling. Fixes: f0bddf50586d ("riscv: entry: Convert to generic entry") Suggested-by: Sebastian Andrzej Siewior Signed-off-by: Nam Cao Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250625085630.3649485-1-namcao@linutronix.de Signed-off-by: Palmer Dabbelt commit e3f16d63d54e6fcf2b18812f2dd0a8d2782b5f3a Author: Alexandre Ghiti Date: Fri Jul 11 07:38:38 2025 +0000 riscv: ftrace: Properly acquire text_mutex to fix a race condition As reported by lockdep, some patching was done without acquiring text_mutex, so there could be a race when mapping the page to patch since we use the same fixmap entry. Reported-by: Han Gao Reported-by: Vivian Wang Reported-by: Yao Zi Closes: https://lore.kernel.org/linux-riscv/aGODMpq7TGINddzM@pie.lan/ Tested-by: Yao Zi Tested-by: Han Gao Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250711-alex-fixes-v2-1-d85a5438da6c@rivosinc.com Signed-off-by: Palmer Dabbelt commit 16d743606dba05f9ad87837791fcd5c083544c43 Author: Sunil V L Date: Fri Jul 11 19:30:13 2025 +0530 ACPI: RISC-V: Remove unnecessary CPPC debug message The presence or absence of the CPPC SBI extension is currently logged on every boot. This message is not particularly useful and can clutter the boot log. Remove this debug message to reduce noise during boot. This change has no functional impact. Signed-off-by: Sunil V L Reviewed-by: Anup Patel Tested-by: Drew Fustini Link: https://lore.kernel.org/r/20250711140013.3043463-1-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 82d369b48a6bd70947f9016cb358e278a737e919 Author: Alexandre Ghiti Date: Thu Jul 10 08:34:31 2025 +0000 riscv: Stop considering R_RISCV_NONE as bad relocations Even though those relocations should not be present in the final vmlinux, there are a lot of them. And since those relocations are considered "bad", they flood the compilation output which may hide some legitimate bad relocations. Signed-off-by: Alexandre Ghiti Tested-by: Ron Economos Link: https://lore.kernel.org/r/20250710-dev-alex-riscv_none_bad_relocs_v1-v1-1-758f2fcc6e75@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2d7521aa26ec2dc8b877bb2d1f2611a2df49a3cf Author: Michael C. Pratt Date: Wed Jul 16 15:42:10 2025 +0100 nvmem: layouts: u-boot-env: remove crc32 endianness conversion On 11 Oct 2022, it was reported that the crc32 verification of the u-boot environment failed only on big-endian systems for the u-boot-env nvmem layout driver with the following error. Invalid calculated CRC32: 0x88cd6f09 (expected: 0x096fcd88) This problem has been present since the driver was introduced, and before it was made into a layout driver. The suggested fix at the time was to use further endianness conversion macros in order to have both the stored and calculated crc32 values to compare always represented in the system's endianness. This was not accepted due to sparse warnings and some disagreement on how to handle the situation. Later on in a newer revision of the patch, it was proposed to use cpu_to_le32() for both values to compare instead of le32_to_cpu() and store the values as __le32 type to remove compilation errors. The necessity of this is based on the assumption that the use of crc32() requires endianness conversion because the algorithm uses little-endian, however, this does not prove to be the case and the issue is unrelated. Upon inspecting the current kernel code, there already is an existing use of le32_to_cpu() in this driver, which suggests there already is special handling for big-endian systems, however, it is big-endian systems that have the problem. This, being the only functional difference between architectures in the driver combined with the fact that the suggested fix was to use the exact same endianness conversion for the values brings up the possibility that it was not necessary to begin with, as the same endianness conversion for two values expected to be the same is expected to be equivalent to no conversion at all. After inspecting the u-boot environment of devices of both endianness and trying to remove the existing endianness conversion, the problem is resolved in an equivalent way as the other suggested fixes. Ultimately, it seems that u-boot is agnostic to endianness at least for the purpose of environment variables. In other words, u-boot reads and writes the stored crc32 value with the same endianness that the crc32 value is calculated with in whichever endianness a certain architecture runs on. Therefore, the u-boot-env driver does not need to convert endianness. Remove the usage of endianness macros in the u-boot-env driver, and change the type of local variables to maintain the same return type. If there is a special situation in the case of endianness, it would be a corner case and should be handled by a unique "compatible". Even though it is not necessary to use endianness conversion macros here, it may be useful to use them in the future for consistent error printing. Fixes: d5542923f200 ("nvmem: add driver handling U-Boot environment variables") Reported-by: INAGAKI Hiroshi Link: https://lore.kernel.org/all/20221011024928.1807-1-musashino.open@gmail.com Cc: stable@vger.kernel.org Signed-off-by: "Michael C. Pratt" Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250716144210.4804-1-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit 16ad3ee51fc95ae8e06b9934fa2f656a5e4a8f03 Author: Akshay Gupta Date: Wed Jul 16 11:07:29 2025 +0000 misc: amd-sbi: Explicitly clear in/out arg "mb_in_out" - New AMD processor will support different input/output for same command. - In some scenarios the input value is not cleared, which will be added to output before reporting the data. - Clearing input explicitly will be a cleaner and safer approach. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250716110729.2193725-3-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit bbb4013947fa5d9b2a65efdbfb08020abb060a18 Author: Akshay Gupta Date: Wed Jul 16 11:07:28 2025 +0000 misc: amd-sbi: Address copy_to/from_user() warning reported in smatch Smatch warnings are reported for below commit, Commit bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol") from Apr 28, 2025 (linux-next), leads to the following Smatch static checker warning: drivers/misc/amd-sbi/rmi-core.c:376 apml_rmi_reg_xfer() warn: maybe return -EFAULT instead of the bytes remaining? drivers/misc/amd-sbi/rmi-core.c:394 apml_mailbox_xfer() warn: maybe return -EFAULT instead of the bytes remaining? drivers/misc/amd-sbi/rmi-core.c:411 apml_cpuid_xfer() warn: maybe return -EFAULT instead of the bytes remaining? drivers/misc/amd-sbi/rmi-core.c:428 apml_mcamsr_xfer() warn: maybe return -EFAULT instead of the bytes remaining? copy_to/from_user() returns number of bytes, not copied. In case data not copied, return "-EFAULT". Additionally, fixes the "-EPROTOTYPE" error return as intended. Fixes: 35ac2034db72 ("misc: amd-sbi: Add support for AMD_SBI IOCTL") Fixes: bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol") Fixes: 69b1ba83d21c ("misc: amd-sbi: Add support for read MCA register protocol") Fixes: cf141287b774 ("misc: amd-sbi: Add support for register xfer") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aDVyO8ByVsceybk9@stanley.mountain/ Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250716110729.2193725-2-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit e108b0a5d339aca9661cd93eb4258b2c661e11e8 Author: Akshay Gupta Date: Wed Jul 16 11:07:27 2025 +0000 misc: amd-sbi: Address potential integer overflow issue reported in smatch Smatch warnings are reported for below commit, Commit bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol") from Apr 28, 2025 (linux-next), leads to the following Smatch static checker warning: drivers/misc/amd-sbi/rmi-core.c:132 rmi_cpuid_read() warn: bitwise OR is zero '0xffffffff00000000 & 0xffff' drivers/misc/amd-sbi/rmi-core.c:132 rmi_cpuid_read() warn: potential integer overflow from user 'msg->cpu_in_out << 32' drivers/misc/amd-sbi/rmi-core.c:213 rmi_mca_msr_read() warn: bitwise OR is zero '0xffffffff00000000 & 0xffff' drivers/misc/amd-sbi/rmi-core.c:213 rmi_mca_msr_read() warn: potential integer overflow from user 'msg->mcamsr_in_out << 32' CPUID & MCAMSR thread data from input is available at byte 4 & 5, this patch fixes to copy the user data correctly in the argument. Previously, CPUID and MCAMSR data is return only for thread 0. Fixes: bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol") Fixes: 69b1ba83d21c ("misc: amd-sbi: Add support for read MCA register protocol") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aDVyO8ByVsceybk9@stanley.mountain/ Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250716110729.2193725-1-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 1b98304c09a0192598d0767f1eb8c83d7e793091 Author: Ian Abbott Date: Tue Jul 8 14:06:27 2025 +0100 comedi: comedi_test: Fix possible deletion of uninitialized timers In `waveform_common_attach()`, the two timers `&devpriv->ai_timer` and `&devpriv->ao_timer` are initialized after the allocation of the device private data by `comedi_alloc_devpriv()` and the subdevices by `comedi_alloc_subdevices()`. The function may return with an error between those function calls. In that case, `waveform_detach()` will be called by the Comedi core to clean up. The check that `waveform_detach()` uses to decide whether to delete the timers is incorrect. It only checks that the device private data was allocated, but that does not guarantee that the timers were initialized. It also needs to check that the subdevices were allocated. Fix it. Fixes: 73e0e4dfed4c ("staging: comedi: comedi_test: fix timer lock-up") Cc: stable@vger.kernel.org # 6.15+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250708130627.21743-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 46d8c744136ce2454aa4c35c138cc06817f92b8e Author: Ian Abbott Date: Mon Jul 7 17:14:39 2025 +0100 comedi: Fix initialization of data for instructions that write to subdevice Some Comedi subdevice instruction handlers are known to access instruction data elements beyond the first `insn->n` elements in some cases. The `do_insn_ioctl()` and `do_insnlist_ioctl()` functions allocate at least `MIN_SAMPLES` (16) data elements to deal with this, but they do not initialize all of that. For Comedi instruction codes that write to the subdevice, the first `insn->n` data elements are copied from user-space, but the remaining elements are left uninitialized. That could be a problem if the subdevice instruction handler reads the uninitialized data. Ensure that the first `MIN_SAMPLES` elements are initialized before calling these instruction handlers, filling the uncopied elements with 0. For `do_insnlist_ioctl()`, the same data buffer elements are used for handling a list of instructions, so ensure the first `MIN_SAMPLES` elements are initialized for each instruction that writes to the subdevice. Fixes: ed9eccbe8970 ("Staging: add comedi core") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707161439.88385-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit e9cb26291d009243a4478a7ffb37b3a9175bfce9 Author: Ian Abbott Date: Mon Jul 7 16:33:54 2025 +0100 comedi: Fix use of uninitialized data in insn_rw_emulate_bits() For Comedi `INSN_READ` and `INSN_WRITE` instructions on "digital" subdevices (subdevice types `COMEDI_SUBD_DI`, `COMEDI_SUBD_DO`, and `COMEDI_SUBD_DIO`), it is common for the subdevice driver not to have `insn_read` and `insn_write` handler functions, but to have an `insn_bits` handler function for handling Comedi `INSN_BITS` instructions. In that case, the subdevice's `insn_read` and/or `insn_write` function handler pointers are set to point to the `insn_rw_emulate_bits()` function by `__comedi_device_postconfig()`. For `INSN_WRITE`, `insn_rw_emulate_bits()` currently assumes that the supplied `data[0]` value is a valid copy from user memory. It will at least exist because `do_insnlist_ioctl()` and `do_insn_ioctl()` in "comedi_fops.c" ensure at lease `MIN_SAMPLES` (16) elements are allocated. However, if `insn->n` is 0 (which is allowable for `INSN_READ` and `INSN_WRITE` instructions, then `data[0]` may contain uninitialized data, and certainly contains invalid data, possibly from a different instruction in the array of instructions handled by `do_insnlist_ioctl()`. This will result in an incorrect value being written to the digital output channel (or to the digital input/output channel if configured as an output), and may be reflected in the internal saved state of the channel. Fix it by returning 0 early if `insn->n` is 0, before reaching the code that accesses `data[0]`. Previously, the function always returned 1 on success, but it is supposed to be the number of data samples actually read or written up to `insn->n`, which is 0 in this case. Reported-by: syzbot+cb96ec476fb4914445c9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=cb96ec476fb4914445c9 Fixes: ed9eccbe8970 ("Staging: add comedi core") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707153355.82474-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 70f2b28b5243df557f51c054c20058ae207baaac Author: Ian Abbott Date: Mon Jul 7 14:57:37 2025 +0100 comedi: das6402: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: /* IRQs 2,3,5,6,7, 10,11,15 are valid for "enhanced" mode */ if ((1 << it->options[1]) & 0x8cec) { However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Valid `it->options[1]` values that select the IRQ will be in the range [1,15]. The value 0 explicitly disables the use of interrupts. Fixes: 79e5e6addbb1 ("staging: comedi: das6402: rewrite broken driver") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707135737.77448-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 66acb1586737a22dd7b78abc63213b1bcaa100e4 Author: Ian Abbott Date: Mon Jul 7 14:46:22 2025 +0100 comedi: aio_iiro_16: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: if ((1 << it->options[1]) & 0xdcfc) { However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Valid `it->options[1]` values that select the IRQ will be in the range [1,15]. The value 0 explicitly disables the use of interrupts. Fixes: ad7a370c8be4 ("staging: comedi: aio_iiro_16: add command support for change of state detection") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707134622.75403-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit b14b076ce593f72585412fc7fd3747e03a5e3632 Author: Ian Abbott Date: Mon Jul 7 14:34:29 2025 +0100 comedi: pcl812: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: if ((1 << it->options[1]) & board->irq_bits) { However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Valid `it->options[1]` values that select the IRQ will be in the range [1,15]. The value 0 explicitly disables the use of interrupts. Reported-by: syzbot+32de323b0addb9e114ff@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=32de323b0addb9e114ff Fixes: fcdb427bc7cf ("Staging: comedi: add pcl821 driver") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707133429.73202-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit ed93c6f68a3be06e4e0c331c6e751f462dee3932 Author: Ian Abbott Date: Mon Jul 7 14:09:08 2025 +0100 comedi: das16m1: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: /* only irqs 2, 3, 4, 5, 6, 7, 10, 11, 12, 14, and 15 are valid */ if ((1 << it->options[1]) & 0xdcfc) { However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Reported-by: syzbot+c52293513298e0fd9a94@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c52293513298e0fd9a94 Fixes: 729988507680 ("staging: comedi: das16m1: tidy up the irq support in das16m1_attach()") Tested-by: syzbot+c52293513298e0fd9a94@syzkaller.appspotmail.com Suggested-by: "Enju, Kohei" Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707130908.70758-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit ab705c8c35e18652abc6239c07cf3441f03e2cda Author: Ian Abbott Date: Mon Jul 7 13:15:55 2025 +0100 comedi: Fix some signed shift left operations Correct some left shifts of the signed integer constant 1 by some unsigned number less than 32. Change the constant to 1U to avoid shifting a 1 into the sign bit. The corrected functions are comedi_dio_insn_config(), comedi_dio_update_state(), and __comedi_device_postconfig(). Fixes: e523c6c86232 ("staging: comedi: drivers: introduce comedi_dio_insn_config()") Fixes: 05e60b13a36b ("staging: comedi: drivers: introduce comedi_dio_update_state()") Fixes: 09567cb4373e ("staging: comedi: initialize subdevice s->io_bits in postconfig") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250707121555.65424-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 08ae4b20f5e82101d77326ecab9089e110f224cc Author: Ian Abbott Date: Fri Jul 4 13:04:05 2025 +0100 comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large The handling of the `COMEDI_INSNLIST` ioctl allocates a kernel buffer to hold the array of `struct comedi_insn`, getting the length from the `n_insns` member of the `struct comedi_insnlist` supplied by the user. The allocation will fail with a WARNING and a stack dump if it is too large. Avoid that by failing with an `-EINVAL` error if the supplied `n_insns` value is unreasonable. Define the limit on the `n_insns` value in the `MAX_INSNS` macro. Set this to the same value as `MAX_SAMPLES` (65536), which is the maximum allowed sum of the values of the member `n` in the array of `struct comedi_insn`, and sensible comedi instructions will have an `n` of at least 1. Reported-by: syzbot+d6995b62e5ac7d79557a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d6995b62e5ac7d79557a Fixes: ed9eccbe8970 ("Staging: add comedi core") Tested-by: Ian Abbott Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250704120405.83028-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit a88cddaaa3bf7445357a79a5c351c6b6d6f95b7d Author: Christian Brauner Date: Wed Jul 16 10:40:45 2025 +0200 MAINTAINERS: add block and fsdevel lists to iov_iter We've had multiple instances where people didn't Cc fsdevel or block which are easily the most affected subsystems by iov_iter changes. Put a stop to that and make sure both lists are Cced so we can catch stuff like [1] early. Link: https://lore.kernel.org/linux-nvme/20250715132750.9619-4-aaptel@nvidia.com [1] Link: https://lore.kernel.org/20250716-eklig-rasten-ec8c4dc05a1e@brauner Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit c4706c5058a7bd7d7c20f3b24a8f523ecad44e83 Author: Ming Lei Date: Wed Jul 16 19:48:08 2025 +0800 loop: use kiocb helpers to fix lockdep warning The lockdep tool can report a circular lock dependency warning in the loop driver's AIO read/write path: ``` [ 6540.587728] kworker/u96:5/72779 is trying to acquire lock: [ 6540.593856] ff110001b5968440 (sb_writers#9){.+.+}-{0:0}, at: loop_process_work+0x11a/0xf70 [loop] [ 6540.603786] [ 6540.603786] but task is already holding lock: [ 6540.610291] ff110001b5968440 (sb_writers#9){.+.+}-{0:0}, at: loop_process_work+0x11a/0xf70 [loop] [ 6540.620210] [ 6540.620210] other info that might help us debug this: [ 6540.627499] Possible unsafe locking scenario: [ 6540.627499] [ 6540.634110] CPU0 [ 6540.636841] ---- [ 6540.639574] lock(sb_writers#9); [ 6540.643281] lock(sb_writers#9); [ 6540.646988] [ 6540.646988] *** DEADLOCK *** ``` This patch fixes the issue by using the AIO-specific helpers `kiocb_start_write()` and `kiocb_end_write()`. These functions are designed to be used with a `kiocb` and manage write sequencing correctly for asynchronous I/O without introducing the problematic lock dependency. The `kiocb` is already part of the `loop_cmd` struct, so this change also simplifies the completion function `lo_rw_aio_do_completion()` by using the `iocb` from the `cmd` struct directly, instead of retrieving the loop device from the request queue. Fixes: 39d86db34e41 ("loop: add file_start_write() and file_end_write()") Cc: Changhui Zhong Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250716114808.3159657-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7bab1bd9fdf15b9fa7e6a4b0151deab93df3c80d Author: Lane Odenbach Date: Tue Jul 15 13:20:38 2025 -0500 ASoC: amd: yc: Add DMI quirk for HP Laptop 17 cp-2033dx This fixes the internal microphone in the stated device Signed-off-by: Lane Odenbach Link: https://patch.msgid.link/20250715182038.10048-1-laodenbach@gmail.com Signed-off-by: Mark Brown commit 95a16160ca1d75c66bf7a1c5e0bcaffb18e7c7fc Author: Arunpravin Paneer Selvam Date: Wed Jul 16 13:21:24 2025 +0530 drm/amdgpu: Reset the clear flag in buddy during resume - Added a handler in DRM buddy manager to reset the cleared flag for the blocks in the freelist. - This is necessary because, upon resuming, the VRAM becomes cluttered with BIOS data, yet the VRAM backend manager believes that everything has been cleared. v2: - Add lock before accessing drm_buddy_clear_reset_blocks()(Matthew Auld) - Force merge the two dirty blocks.(Matthew Auld) - Add a new unit test case for this issue.(Matthew Auld) - Having this function being able to flip the state either way would be good. (Matthew Brost) v3(Matthew Auld): - Do merge step first to avoid the use of extra reset flag. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Acked-by: Christian König Reviewed-by: Matthew Auld Cc: stable@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3812 Signed-off-by: Christian König Link: https://lore.kernel.org/r/20250716075125.240637-2-Arunpravin.PaneerSelvam@amd.com commit ec5b9c847bb8ac0f458d2b2a3fa23ee84dd99c40 Author: Bard Liao Date: Wed Jul 16 16:22:33 2025 +0800 ASoC: Intel: soc-acpi: add support for HP Omen14 ARL This platform has an RT711-sdca on link0 and RT1316 on link3. Signed-off-by: Bard Liao Reviewed-by: Peter Ujfalusi Link: https://patch.msgid.link/20250716082233.1810334-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 21b34a3a204ed616373a12ec17dc127ebe51eab3 Author: Nathan Chancellor Date: Tue Jul 15 15:56:05 2025 -0700 memstick: core: Zero initialize id_reg in h_memstick_read_dev_id() A new warning in clang [1] points out that id_reg is uninitialized then passed to memstick_init_req() as a const pointer: drivers/memstick/core/memstick.c:330:59: error: variable 'id_reg' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 330 | memstick_init_req(&card->current_mrq, MS_TPC_READ_REG, &id_reg, | ^~~~~~ Commit de182cc8e882 ("drivers/memstick/core/memstick.c: avoid -Wnonnull warning") intentionally passed this variable uninitialized to avoid an -Wnonnull warning from a NULL value that was previously there because id_reg is never read from the call to memstick_init_req() in h_memstick_read_dev_id(). Just zero initialize id_reg to avoid the warning, which is likely happening in the majority of builds using modern compilers that support '-ftrivial-auto-var-init=zero'. Cc: stable@vger.kernel.org Fixes: de182cc8e882 ("drivers/memstick/core/memstick.c: avoid -Wnonnull warning") Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1] Closes: https://github.com/ClangBuiltLinux/linux/issues/2105 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250715-memstick-fix-uninit-const-pointer-v1-1-f6753829c27a@kernel.org Signed-off-by: Ulf Hansson commit 2022d704014d7a5b19dfe0a1ae5c67be0498e37c Author: Ralf Lici Date: Tue Jul 1 14:47:44 2025 +0200 ovpn: reset GSO metadata after decapsulation The ovpn_netdev_write() function is responsible for injecting decapsulated and decrypted packets back into the local network stack. Prior to this patch, the skb could retain GSO metadata from the outer, encrypted tunnel packet. This original GSO metadata, relevant to the sender's transport context, becomes invalid and misleading for the tunnel/data path once the inner packet is exposed. Leaving this stale metadata intact causes internal GSO validation checks further down the kernel's network stack (validate_xmit_skb()) to fail, leading to packet drops. The reasons for these failures vary by protocol, for example: - for ICMP, no offload handler is registered; - for TCP and UDP, the respective offload handlers return errors when comparing skb->len to the outdated skb_shinfo(skb)->gso_size. By calling skb_gso_reset(skb) we ensure the inner packet is presented to gro_cells_receive() with a clean state, correctly indicating it is an individual packet from the perspective of the local stack. This change eliminates the "Driver has suspect GRO implementation, TCP performance may be compromised" warning and improves overall TCP performance by allowing GSO/GRO to function as intended on the decapsulated traffic. Fixes: 11851cbd60ea ("ovpn: implement TCP transport") Reported-by: Gert Doering Closes: https://github.com/OpenVPN/ovpn-net-next/issues/4 Tested-by: Gert Doering Signed-off-by: Ralf Lici Signed-off-by: Antonio Quartulli commit af52020fc5995dd3bcbc91b897daded755564be7 Author: Antonio Quartulli Date: Wed Jun 25 16:08:11 2025 +0200 ovpn: reject unexpected netlink attributes Netlink ops do not expect all attributes to be always set, however this condition is not explicitly coded any where, leading the user to believe that all sent attributes are somewhat processed. Fix this behaviour by introducing explicit checks. For CMD_OVPN_PEER_GET and CMD_OVPN_KEY_GET directly open-code the needed condition in the related ops handlers. While for all other ops use attribute subsets in the ovpn.yaml spec file. Fixes: b7a63391aa98 ("ovpn: add basic netlink support") Reported-by: Ralf Lici Closes: https://github.com/OpenVPN/ovpn-net-next/issues/19 Signed-off-by: Antonio Quartulli commit 4c88cfcc6738466a33778c346061f7507403276a Author: Ralf Lici Date: Wed Jun 4 15:11:58 2025 +0200 ovpn: propagate socket mark to skb in UDP OpenVPN allows users to configure a FW mark on sockets used to communicate with other peers. The mark is set by means of the `SO_MARK` Linux socket option. However, in the ovpn UDP code path, the socket's `sk_mark` value is currently ignored and it is not propagated to outgoing `skbs`. This commit ensures proper inheritance of the field by setting `skb->mark` to `sk->sk_mark` before handing the `skb` to the network stack for transmission. Fixes: 08857b5ec5d9 ("ovpn: implement basic TX path (UDP)") Reviewed-by: Sabrina Dubroca Signed-off-by: Ralf Lici Link: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31877.html Signed-off-by: Antonio Quartulli commit 2521106fc732b0b75fd3555c689b1ed1d29d273c Author: Mathias Nyman Date: Mon Jun 23 16:39:47 2025 +0300 usb: hub: Don't try to recover devices lost during warm reset. Hub driver warm-resets ports in SS.Inactive or Compliance mode to recover a possible connected device. The port reset code correctly detects if a connection is lost during reset, but hub driver port_event() fails to take this into account in some cases. port_event() ends up using stale values and assumes there is a connected device, and will try all means to recover it, including power-cycling the port. Details: This case was triggered when xHC host was suspended with DbC (Debug Capability) enabled and connected. DbC turns one xHC port into a simple usb debug device, allowing debugging a system with an A-to-A USB debug cable. xhci DbC code disables DbC when xHC is system suspended to D3, and enables it back during resume. We essentially end up with two hosts connected to each other during suspend, and, for a short while during resume, until DbC is enabled back. The suspended xHC host notices some activity on the roothub port, but can't train the link due to being suspended, so xHC hardware sets a CAS (Cold Attach Status) flag for this port to inform xhci host driver that the port needs to be warm reset once xHC resumes. CAS is xHCI specific, and not part of USB specification, so xhci driver tells usb core that the port has a connection and link is in compliance mode. Recovery from complinace mode is similar to CAS recovery. xhci CAS driver support that fakes a compliance mode connection was added in commit 8bea2bd37df0 ("usb: Add support for root hub port status CAS") Once xHCI resumes and DbC is enabled back, all activity on the xHC roothub host side port disappears. The hub driver will anyway think port has a connection and link is in compliance mode, and hub driver will try to recover it. The port power-cycle during recovery seems to cause issues to the active DbC connection. Fix this by clearing connect_change flag if hub_port_reset() returns -ENOTCONN, thus avoiding the whole unnecessary port recovery and initialization attempt. Cc: stable@vger.kernel.org Fixes: 8bea2bd37df0 ("usb: Add support for root hub port status CAS") Tested-by: Łukasz Bartosik Signed-off-by: Mathias Nyman Acked-by: Alan Stern Link: https://lore.kernel.org/r/20250623133947.3144608-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f2b8ebfb867011ddbefbdf7b04ad62626cbc2afd Author: Stefan Wahren Date: Tue Jul 15 18:11:08 2025 +0200 staging: vchiq_arm: Make vchiq_shutdown never fail Most of the users of vchiq_shutdown ignore the return value, which is bad because this could lead to resource leaks. So instead of changing all calls to vchiq_shutdown, it's easier to make vchiq_shutdown never fail. Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver") Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20250715161108.3411-4-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 228af5a58524fba09ec4b7d184694db4f7fe96f5 Author: Stefan Wahren Date: Tue Jul 15 18:11:07 2025 +0200 Revert "staging: vchiq_arm: Create keep-alive thread during probe" The commit 86bc88217006 ("staging: vchiq_arm: Create keep-alive thread during probe") introduced a regression for certain configurations, which doesn't have a VCHIQ user. This results in a unused and hanging keep-alive thread: INFO: task vchiq-keep/0:85 blocked for more than 120 seconds. Not tainted 6.12.34-v8-+ #13 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:vchiq-keep/0 state:D stack:0 pid:85 tgid:85 ppid:2 Call trace: __switch_to+0x188/0x230 __schedule+0xa54/0xb28 schedule+0x80/0x120 schedule_preempt_disabled+0x30/0x50 kthread+0xd4/0x1a0 ret_from_fork+0x10/0x20 Fixes: 86bc88217006 ("staging: vchiq_arm: Create keep-alive thread during probe") Reported-by: Maíra Canal Closes: https://lore.kernel.org/linux-staging/ba35b960-a981-4671-9f7f-060da10feaa1@usp.br/ Cc: stable@kernel.org Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250715161108.3411-3-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit ebe0b2ecb7b8285852414a0f20044432e37d9b4c Author: Stefan Wahren Date: Tue Jul 15 18:11:06 2025 +0200 Revert "staging: vchiq_arm: Improve initial VCHIQ connect" The commit 3e5def4249b9 ("staging: vchiq_arm: Improve initial VCHIQ connect") based on the assumption that in good case the VCHIQ connect always happen and therefore the keep-alive thread is guaranteed to be woken up. This is wrong, because in certain configurations there are no VCHIQ users and so the VCHIQ connect never happen. So revert it. Fixes: 3e5def4249b9 ("staging: vchiq_arm: Improve initial VCHIQ connect") Reported-by: Maíra Canal Closes: https://lore.kernel.org/linux-staging/ba35b960-a981-4671-9f7f-060da10feaa1@usp.br/ Cc: stable@kernel.org Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250715161108.3411-2-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 1ed171a3afe81531b3ace96bd151a372dda3ee25 Author: Nathan Chancellor Date: Tue Jul 15 20:19:44 2025 -0700 tracing/probes: Avoid using params uninitialized in parse_btf_arg() After a recent change in clang to strengthen uninitialized warnings [1], it points out that in one of the error paths in parse_btf_arg(), params is used uninitialized: kernel/trace/trace_probe.c:660:19: warning: variable 'params' is uninitialized when used here [-Wuninitialized] 660 | return PTR_ERR(params); | ^~~~~~ Match many other NO_BTF_ENTRY error cases and return -ENOENT, clearing up the warning. Link: https://lore.kernel.org/all/20250715-trace_probe-fix-const-uninit-warning-v1-1-98960f91dd04@kernel.org/ Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/2110 Fixes: d157d7694460 ("tracing/probes: Support BTF field access from $retval") Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1] Signed-off-by: Nathan Chancellor Signed-off-by: Masami Hiramatsu (Google) commit dae7f9cbd1909de2b0bccc30afef95c23f93e477 Merge: 2b30a3d1ec2538 da9b2fc7b73d14 Author: Jakub Kicinski Date: Tue Jul 15 17:31:30 2025 -0700 Merge branch 'mptcp-fix-fallback-related-races' Matthieu Baerts says: ==================== mptcp: fix fallback-related races This series contains 3 fixes somewhat related to various races we have while handling fallback. The root cause of the issues addressed here is that the check for "we can fallback to tcp now" and the related action are not atomic. That also applies to fallback due to MP_FAIL -- where the window race is even wider. Address the issue introducing an additional spinlock to bundle together all the relevant events, as per patch 1 and 2. These fixes can be backported up to v5.19 and v5.15. Note that mptcp_disconnect() unconditionally clears the fallback status (zeroing msk->flags) but don't touch the `allows_infinite_fallback` flag. Such issue is addressed in patch 3, and can be backported up to v5.17. ==================== Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-0-391aff963322@kernel.org Signed-off-by: Jakub Kicinski commit da9b2fc7b73d147d88abe1922de5ab72d72d7756 Author: Paolo Abeni Date: Mon Jul 14 18:41:46 2025 +0200 mptcp: reset fallback status gracefully at disconnect() time mptcp_disconnect() clears the fallback bit unconditionally, without touching the associated flags. The bit clear is safe, as no fallback operation can race with that -- all subflow are already in TCP_CLOSE status thanks to the previous FASTCLOSE -- but we need to consistently reset all the fallback related status. Also acquire the relevant lock, to avoid fouling static analyzers. Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-3-391aff963322@kernel.org Signed-off-by: Jakub Kicinski commit def5b7b2643ebba696fc60ddf675dca13f073486 Author: Paolo Abeni Date: Mon Jul 14 18:41:45 2025 +0200 mptcp: plug races between subflow fail and subflow creation We have races similar to the one addressed by the previous patch between subflow failing and additional subflow creation. They are just harder to trigger. The solution is similar. Use a separate flag to track the condition 'socket state prevent any additional subflow creation' protected by the fallback lock. The socket fallback makes such flag true, and also receiving or sending an MP_FAIL option. The field 'allow_infinite_fallback' is now always touched under the relevant lock, we can drop the ONCE annotation on write. Fixes: 478d770008b0 ("mptcp: send out MP_FAIL when data checksum fails") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-2-391aff963322@kernel.org Signed-off-by: Jakub Kicinski commit f8a1d9b18c5efc76784f5a326e905f641f839894 Author: Paolo Abeni Date: Mon Jul 14 18:41:44 2025 +0200 mptcp: make fallback action and fallback decision atomic Syzkaller reported the following splat: WARNING: CPU: 1 PID: 7704 at net/mptcp/protocol.h:1223 __mptcp_do_fallback net/mptcp/protocol.h:1223 [inline] WARNING: CPU: 1 PID: 7704 at net/mptcp/protocol.h:1223 mptcp_do_fallback net/mptcp/protocol.h:1244 [inline] WARNING: CPU: 1 PID: 7704 at net/mptcp/protocol.h:1223 check_fully_established net/mptcp/options.c:982 [inline] WARNING: CPU: 1 PID: 7704 at net/mptcp/protocol.h:1223 mptcp_incoming_options+0x21a8/0x2510 net/mptcp/options.c:1153 Modules linked in: CPU: 1 UID: 0 PID: 7704 Comm: syz.3.1419 Not tainted 6.16.0-rc3-gbd5ce2324dba #20 PREEMPT(voluntary) Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:__mptcp_do_fallback net/mptcp/protocol.h:1223 [inline] RIP: 0010:mptcp_do_fallback net/mptcp/protocol.h:1244 [inline] RIP: 0010:check_fully_established net/mptcp/options.c:982 [inline] RIP: 0010:mptcp_incoming_options+0x21a8/0x2510 net/mptcp/options.c:1153 Code: 24 18 e8 bb 2a 00 fd e9 1b df ff ff e8 b1 21 0f 00 e8 ec 5f c4 fc 44 0f b7 ac 24 b0 00 00 00 e9 54 f1 ff ff e8 d9 5f c4 fc 90 <0f> 0b 90 e9 b8 f4 ff ff e8 8b 2a 00 fd e9 8d e6 ff ff e8 81 2a 00 RSP: 0018:ffff8880a3f08448 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8880180a8000 RCX: ffffffff84afcf45 RDX: ffff888090223700 RSI: ffffffff84afdaa7 RDI: 0000000000000001 RBP: ffff888017955780 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8880180a8910 R14: ffff8880a3e9d058 R15: 0000000000000000 FS: 00005555791b8500(0000) GS:ffff88811c495000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2800b7 CR3: 0000000058e44000 CR4: 0000000000350ef0 Call Trace: tcp_reset+0x26f/0x2b0 net/ipv4/tcp_input.c:4432 tcp_validate_incoming+0x1057/0x1b60 net/ipv4/tcp_input.c:5975 tcp_rcv_established+0x5b5/0x21f0 net/ipv4/tcp_input.c:6166 tcp_v4_do_rcv+0x5dc/0xa70 net/ipv4/tcp_ipv4.c:1925 tcp_v4_rcv+0x3473/0x44a0 net/ipv4/tcp_ipv4.c:2363 ip_protocol_deliver_rcu+0xba/0x480 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2f1/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:317 [inline] NF_HOOK include/linux/netfilter.h:311 [inline] ip_local_deliver+0x1be/0x560 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:469 [inline] ip_rcv_finish net/ipv4/ip_input.c:447 [inline] NF_HOOK include/linux/netfilter.h:317 [inline] NF_HOOK include/linux/netfilter.h:311 [inline] ip_rcv+0x514/0x810 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core+0x197/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6088 process_backlog+0x301/0x1360 net/core/dev.c:6440 __napi_poll.constprop.0+0xba/0x550 net/core/dev.c:7453 napi_poll net/core/dev.c:7517 [inline] net_rx_action+0xb44/0x1010 net/core/dev.c:7644 handle_softirqs+0x1d0/0x770 kernel/softirq.c:579 do_softirq+0x3f/0x90 kernel/softirq.c:480 __local_bh_enable_ip+0xed/0x110 kernel/softirq.c:407 local_bh_enable include/linux/bottom_half.h:33 [inline] inet_csk_listen_stop+0x2c5/0x1070 net/ipv4/inet_connection_sock.c:1524 mptcp_check_listen_stop.part.0+0x1cc/0x220 net/mptcp/protocol.c:2985 mptcp_check_listen_stop net/mptcp/mib.h:118 [inline] __mptcp_close+0x9b9/0xbd0 net/mptcp/protocol.c:3000 mptcp_close+0x2f/0x140 net/mptcp/protocol.c:3066 inet_release+0xed/0x200 net/ipv4/af_inet.c:435 inet6_release+0x4f/0x70 net/ipv6/af_inet6.c:487 __sock_release+0xb3/0x270 net/socket.c:649 sock_close+0x1c/0x30 net/socket.c:1439 __fput+0x402/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xd4/0xe0 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x245/0x360 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc92f8a36ad Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcf52802d8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007ffcf52803a8 RCX: 00007fc92f8a36ad RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007fc92fae7ba0 R08: 0000000000000001 R09: 0000002800000000 R10: 00007fc92f700000 R11: 0000000000000246 R12: 00007fc92fae5fac R13: 00007fc92fae5fa0 R14: 0000000000026d00 R15: 0000000000026c51 irq event stamp: 4068 hardirqs last enabled at (4076): [] __up_console_sem+0x76/0x80 kernel/printk/printk.c:344 hardirqs last disabled at (4085): [] __up_console_sem+0x5b/0x80 kernel/printk/printk.c:342 softirqs last enabled at (3096): [] local_bh_enable include/linux/bottom_half.h:33 [inline] softirqs last enabled at (3096): [] inet_csk_listen_stop+0x2c0/0x1070 net/ipv4/inet_connection_sock.c:1524 softirqs last disabled at (3097): [] do_softirq+0x3f/0x90 kernel/softirq.c:480 Since we need to track the 'fallback is possible' condition and the fallback status separately, there are a few possible races open between the check and the actual fallback action. Add a spinlock to protect the fallback related information and use it close all the possible related races. While at it also remove the too-early clearing of allow_infinite_fallback in __mptcp_subflow_connect(): the field will be correctly cleared by subflow_finish_connect() if/when the connection will complete successfully. If fallback is not possible, as per RFC, reset the current subflow. Since the fallback operation can now fail and return value should be checked, rename the helper accordingly. Fixes: 0530020a7c8f ("mptcp: track and update contiguous data status") Cc: stable@vger.kernel.org Reported-by: Matthieu Baerts Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/570 Reported-by: syzbot+5cf807c20386d699b524@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/555 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250714-net-mptcp-fallback-races-v1-1-391aff963322@kernel.org Signed-off-by: Jakub Kicinski commit 2b30a3d1ec2538a1fd363fde746b9fe1d38abc77 Author: Jiawen Wu Date: Mon Jul 14 09:56:56 2025 +0800 net: libwx: fix multicast packets received count Multicast good packets received by PF rings that pass ethternet MAC address filtering are counted for rtnl_link_stats64.multicast. The counter is not cleared on read. Fix the duplicate counting on updating statistics. Fixes: 46b92e10d631 ("net: libwx: support hardware statistics") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/DA229A4F58B70E51+20250714015656.91772-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit d4f9b8847989e17ae1f2f52a6702ff493548f072 Merge: e6176ab107ec6e d992ed7e1b687a Author: Jakub Kicinski Date: Tue Jul 15 17:28:28 2025 -0700 Merge branch 'fix-rx-fatal-errors' Jiawen Wu says: ==================== Fix Rx fatal errors There are some fatal errors on the Rx NAPI path, which can cause the kernel to crash. Fix known issues and potential risks. The part of the patches has been mentioned before[1]. [1]: https://lore.kernel.org/all/C8A23A11DB646E60+20250630094102.22265-1-jiawenwu@trustnetic.com/ v1: https://lore.kernel.org/20250709064025.19436-1-jiawenwu@trustnetic.com ==================== Link: https://patch.msgid.link/20250714024755.17512-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit d992ed7e1b687ad7df0763d3e015a5358646210b Author: Jiawen Wu Date: Mon Jul 14 10:47:55 2025 +0800 net: libwx: properly reset Rx ring descriptor When device reset is triggered by feature changes such as toggling Rx VLAN offload, wx->do_reset() is called to reinitialize Rx rings. The hardware descriptor ring may retain stale values from previous sessions. And only set the length to 0 in rx_desc[0] would result in building malformed SKBs. Fix it to ensure a clean slate after device reset. [ 549.186435] [ C16] ------------[ cut here ]------------ [ 549.186457] [ C16] kernel BUG at net/core/skbuff.c:2814! [ 549.186468] [ C16] Oops: invalid opcode: 0000 [#1] SMP NOPTI [ 549.186472] [ C16] CPU: 16 UID: 0 PID: 0 Comm: swapper/16 Kdump: loaded Not tainted 6.16.0-rc4+ #23 PREEMPT(voluntary) [ 549.186476] [ C16] Hardware name: Micro-Star International Co., Ltd. MS-7E16/X670E GAMING PLUS WIFI (MS-7E16), BIOS 1.90 12/31/2024 [ 549.186478] [ C16] RIP: 0010:__pskb_pull_tail+0x3ff/0x510 [ 549.186484] [ C16] Code: 06 f0 ff 4f 34 74 7b 4d 8b 8c 24 c8 00 00 00 45 8b 84 24 c0 00 00 00 e9 c8 fd ff ff 48 c7 44 24 08 00 00 00 00 e9 5e fe ff ff <0f> 0b 31 c0 e9 23 90 5b ff 41 f7 c6 ff 0f 00 00 75 bf 49 8b 06 a8 [ 549.186487] [ C16] RSP: 0018:ffffb391c0640d70 EFLAGS: 00010282 [ 549.186490] [ C16] RAX: 00000000fffffff2 RBX: ffff8fe7e4d40200 RCX: 00000000fffffff2 [ 549.186492] [ C16] RDX: ffff8fe7c3a4bf8e RSI: 0000000000000180 RDI: ffff8fe7c3a4bf40 [ 549.186494] [ C16] RBP: ffffb391c0640da8 R08: ffff8fe7c3a4c0c0 R09: 000000000000000e [ 549.186496] [ C16] R10: ffffb391c0640d88 R11: 000000000000000e R12: ffff8fe7e4d40200 [ 549.186497] [ C16] R13: 00000000fffffff2 R14: ffff8fe7fa01a000 R15: 00000000fffffff2 [ 549.186499] [ C16] FS: 0000000000000000(0000) GS:ffff8fef5ae40000(0000) knlGS:0000000000000000 [ 549.186502] [ C16] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 549.186503] [ C16] CR2: 00007f77d81d6000 CR3: 000000051a032000 CR4: 0000000000750ef0 [ 549.186505] [ C16] PKRU: 55555554 [ 549.186507] [ C16] Call Trace: [ 549.186510] [ C16] [ 549.186513] [ C16] ? srso_alias_return_thunk+0x5/0xfbef5 [ 549.186517] [ C16] __skb_pad+0xc7/0xf0 [ 549.186523] [ C16] wx_clean_rx_irq+0x355/0x3b0 [libwx] [ 549.186533] [ C16] wx_poll+0x92/0x120 [libwx] [ 549.186540] [ C16] __napi_poll+0x28/0x190 [ 549.186544] [ C16] net_rx_action+0x301/0x3f0 [ 549.186548] [ C16] ? srso_alias_return_thunk+0x5/0xfbef5 [ 549.186551] [ C16] ? __raw_spin_lock_irqsave+0x1e/0x50 [ 549.186554] [ C16] ? srso_alias_return_thunk+0x5/0xfbef5 [ 549.186557] [ C16] ? wake_up_nohz_cpu+0x35/0x160 [ 549.186559] [ C16] ? srso_alias_return_thunk+0x5/0xfbef5 [ 549.186563] [ C16] handle_softirqs+0xf9/0x2c0 [ 549.186568] [ C16] __irq_exit_rcu+0xc7/0x130 [ 549.186572] [ C16] common_interrupt+0xb8/0xd0 [ 549.186576] [ C16] [ 549.186577] [ C16] [ 549.186579] [ C16] asm_common_interrupt+0x22/0x40 [ 549.186582] [ C16] RIP: 0010:cpuidle_enter_state+0xc2/0x420 [ 549.186585] [ C16] Code: 00 00 e8 11 0e 5e ff e8 ac f0 ff ff 49 89 c5 0f 1f 44 00 00 31 ff e8 0d ed 5c ff 45 84 ff 0f 85 40 02 00 00 fb 0f 1f 44 00 00 <45> 85 f6 0f 88 84 01 00 00 49 63 d6 48 8d 04 52 48 8d 04 82 49 8d [ 549.186587] [ C16] RSP: 0018:ffffb391c0277e78 EFLAGS: 00000246 [ 549.186590] [ C16] RAX: ffff8fef5ae40000 RBX: 0000000000000003 RCX: 0000000000000000 [ 549.186591] [ C16] RDX: 0000007fde0faac5 RSI: ffffffff826e53f6 RDI: ffffffff826fa9b3 [ 549.186593] [ C16] RBP: ffff8fe7c3a20800 R08: 0000000000000002 R09: 0000000000000000 [ 549.186595] [ C16] R10: 0000000000000000 R11: 000000000000ffff R12: ffffffff82ed7a40 [ 549.186596] [ C16] R13: 0000007fde0faac5 R14: 0000000000000003 R15: 0000000000000000 [ 549.186601] [ C16] ? cpuidle_enter_state+0xb3/0x420 [ 549.186605] [ C16] cpuidle_enter+0x29/0x40 [ 549.186609] [ C16] cpuidle_idle_call+0xfd/0x170 [ 549.186613] [ C16] do_idle+0x7a/0xc0 [ 549.186616] [ C16] cpu_startup_entry+0x25/0x30 [ 549.186618] [ C16] start_secondary+0x117/0x140 [ 549.186623] [ C16] common_startup_64+0x13e/0x148 [ 549.186628] [ C16] Fixes: 3c47e8ae113a ("net: libwx: Support to receive packets in NAPI") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250714024755.17512-4-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 5fd77cc6bd9b368431a815a780e407b7781bcca0 Author: Jiawen Wu Date: Mon Jul 14 10:47:54 2025 +0800 net: libwx: fix the using of Rx buffer DMA The wx_rx_buffer structure contained two DMA address fields: 'dma' and 'page_dma'. However, only 'page_dma' was actually initialized and used to program the Rx descriptor. But 'dma' was uninitialized and used in some paths. This could lead to undefined behavior, including DMA errors or use-after-free, if the uninitialized 'dma' was used. Althrough such error has not yet occurred, it is worth fixing in the code. Fixes: 3c47e8ae113a ("net: libwx: Support to receive packets in NAPI") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250714024755.17512-3-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 1b7e585c04cd5f0731dd25ffd396277e55fae0e6 Author: Jiawen Wu Date: Mon Jul 14 10:47:53 2025 +0800 net: libwx: remove duplicate page_pool_put_full_page() page_pool_put_full_page() should only be invoked when freeing Rx buffers or building a skb if the size is too short. At other times, the pages need to be reused. So remove the redundant page put. In the original code, double free pages cause kernel panic: [ 876.949834] __irq_exit_rcu+0xc7/0x130 [ 876.949836] common_interrupt+0xb8/0xd0 [ 876.949838] [ 876.949838] [ 876.949840] asm_common_interrupt+0x22/0x40 [ 876.949841] RIP: 0010:cpuidle_enter_state+0xc2/0x420 [ 876.949843] Code: 00 00 e8 d1 1d 5e ff e8 ac f0 ff ff 49 89 c5 0f 1f 44 00 00 31 ff e8 cd fc 5c ff 45 84 ff 0f 85 40 02 00 00 fb 0f 1f 44 00 00 <45> 85 f6 0f 88 84 01 00 00 49 63 d6 48 8d 04 52 48 8d 04 82 49 8d [ 876.949844] RSP: 0018:ffffaa7340267e78 EFLAGS: 00000246 [ 876.949845] RAX: ffff9e3f135be000 RBX: 0000000000000002 RCX: 0000000000000000 [ 876.949846] RDX: 000000cc2dc4cb7c RSI: ffffffff89ee49ae RDI: ffffffff89ef9f9e [ 876.949847] RBP: ffff9e378f940800 R08: 0000000000000002 R09: 00000000000000ed [ 876.949848] R10: 000000000000afc8 R11: ffff9e3e9e5a9b6c R12: ffffffff8a6d8580 [ 876.949849] R13: 000000cc2dc4cb7c R14: 0000000000000002 R15: 0000000000000000 [ 876.949852] ? cpuidle_enter_state+0xb3/0x420 [ 876.949855] cpuidle_enter+0x29/0x40 [ 876.949857] cpuidle_idle_call+0xfd/0x170 [ 876.949859] do_idle+0x7a/0xc0 [ 876.949861] cpu_startup_entry+0x25/0x30 [ 876.949862] start_secondary+0x117/0x140 [ 876.949864] common_startup_64+0x13e/0x148 [ 876.949867] [ 876.949868] ---[ end trace 0000000000000000 ]--- [ 876.949869] ------------[ cut here ]------------ [ 876.949870] list_del corruption, ffffead40445a348->next is NULL [ 876.949873] WARNING: CPU: 14 PID: 0 at lib/list_debug.c:52 __list_del_entry_valid_or_report+0x67/0x120 [ 876.949875] Modules linked in: snd_hrtimer(E) bnep(E) binfmt_misc(E) amdgpu(E) squashfs(E) vfat(E) loop(E) fat(E) amd_atl(E) snd_hda_codec_realtek(E) intel_rapl_msr(E) snd_hda_codec_generic(E) intel_rapl_common(E) snd_hda_scodec_component(E) snd_hda_codec_hdmi(E) snd_hda_intel(E) edac_mce_amd(E) snd_intel_dspcfg(E) snd_hda_codec(E) snd_hda_core(E) amdxcp(E) kvm_amd(E) snd_hwdep(E) gpu_sched(E) drm_panel_backlight_quirks(E) cec(E) snd_pcm(E) drm_buddy(E) snd_seq_dummy(E) drm_ttm_helper(E) btusb(E) kvm(E) snd_seq_oss(E) btrtl(E) ttm(E) btintel(E) snd_seq_midi(E) btbcm(E) drm_exec(E) snd_seq_midi_event(E) i2c_algo_bit(E) snd_rawmidi(E) bluetooth(E) drm_suballoc_helper(E) irqbypass(E) snd_seq(E) ghash_clmulni_intel(E) sha512_ssse3(E) drm_display_helper(E) aesni_intel(E) snd_seq_device(E) rfkill(E) snd_timer(E) gf128mul(E) drm_client_lib(E) drm_kms_helper(E) snd(E) i2c_piix4(E) joydev(E) soundcore(E) wmi_bmof(E) ccp(E) k10temp(E) i2c_smbus(E) gpio_amdpt(E) i2c_designware_platform(E) gpio_generic(E) sg(E) [ 876.949914] i2c_designware_core(E) sch_fq_codel(E) parport_pc(E) drm(E) ppdev(E) lp(E) parport(E) fuse(E) nfnetlink(E) ip_tables(E) ext4 crc16 mbcache jbd2 sd_mod sfp mdio_i2c i2c_core txgbe ahci ngbe pcs_xpcs libahci libwx r8169 phylink libata realtek ptp pps_core video wmi [ 876.949933] CPU: 14 UID: 0 PID: 0 Comm: swapper/14 Kdump: loaded Tainted: G W E 6.16.0-rc2+ #20 PREEMPT(voluntary) [ 876.949935] Tainted: [W]=WARN, [E]=UNSIGNED_MODULE [ 876.949936] Hardware name: Micro-Star International Co., Ltd. MS-7E16/X670E GAMING PLUS WIFI (MS-7E16), BIOS 1.90 12/31/2024 [ 876.949936] RIP: 0010:__list_del_entry_valid_or_report+0x67/0x120 [ 876.949938] Code: 00 00 00 48 39 7d 08 0f 85 a6 00 00 00 5b b8 01 00 00 00 5d 41 5c e9 73 0d 93 ff 48 89 fe 48 c7 c7 a0 31 e8 89 e8 59 7c b3 ff <0f> 0b 31 c0 5b 5d 41 5c e9 57 0d 93 ff 48 89 fe 48 c7 c7 c8 31 e8 [ 876.949940] RSP: 0018:ffffaa73405d0c60 EFLAGS: 00010282 [ 876.949941] RAX: 0000000000000000 RBX: ffffead40445a348 RCX: 0000000000000000 [ 876.949942] RDX: 0000000000000105 RSI: 0000000000000001 RDI: 00000000ffffffff [ 876.949943] RBP: 0000000000000000 R08: 000000010006dfde R09: ffffffff8a47d150 [ 876.949944] R10: ffffffff8a47d150 R11: 0000000000000003 R12: dead000000000122 [ 876.949945] R13: ffff9e3e9e5af700 R14: ffffead40445a348 R15: ffff9e3e9e5af720 [ 876.949946] FS: 0000000000000000(0000) GS:ffff9e3f135be000(0000) knlGS:0000000000000000 [ 876.949947] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 876.949948] CR2: 00007fa58b480048 CR3: 0000000156724000 CR4: 0000000000750ef0 [ 876.949949] PKRU: 55555554 [ 876.949950] Call Trace: [ 876.949951] [ 876.949952] __rmqueue_pcplist+0x53/0x2c0 [ 876.949955] alloc_pages_bulk_noprof+0x2e0/0x660 [ 876.949958] __page_pool_alloc_pages_slow+0xa9/0x400 [ 876.949961] page_pool_alloc_pages+0xa/0x20 [ 876.949963] wx_alloc_rx_buffers+0xd7/0x110 [libwx] [ 876.949967] wx_clean_rx_irq+0x262/0x430 [libwx] [ 876.949971] wx_poll+0x92/0x130 [libwx] [ 876.949975] __napi_poll+0x28/0x190 [ 876.949977] net_rx_action+0x301/0x3f0 [ 876.949980] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949981] ? profile_tick+0x30/0x70 [ 876.949983] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949984] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949986] ? timerqueue_add+0xa3/0xc0 [ 876.949988] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949989] ? __raise_softirq_irqoff+0x16/0x70 [ 876.949991] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949993] ? srso_alias_return_thunk+0x5/0xfbef5 [ 876.949994] ? wx_msix_clean_rings+0x41/0x50 [libwx] [ 876.949998] handle_softirqs+0xf9/0x2c0 Fixes: 3c47e8ae113a ("net: libwx: Support to receive packets in NAPI") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250714024755.17512-2-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit e6176ab107ec6e57a752a97ba9f7c34a23034262 Author: Markus Blöchl Date: Sun Jul 13 22:21:41 2025 +0200 net: stmmac: intel: populate entire system_counterval_t in get_time_fn() callback get_time_fn() callback implementations are expected to fill out the entire system_counterval_t struct as it may be initially uninitialized. This broke with the removal of convert_art_to_tsc() helper functions which left use_nsecs uninitialized. Initially assign the entire struct with default values. Fixes: f5e1d0db3f02 ("stmmac: intel: Remove convert_art_to_tsc()") Cc: stable@vger.kernel.org Signed-off-by: Markus Blöchl Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250713-stmmac_crossts-v1-1-31bfe051b5cb@blochl.de Signed-off-by: Jakub Kicinski commit ae2256f9677b3c784bad99d4198d27b1a62fabc9 Merge: 4c4ca3c4616751 0f97a7588db7a5 Author: Jakub Kicinski Date: Tue Jul 15 16:05:41 2025 -0700 Merge tag 'linux-can-fixes-for-6.16-20250715' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-07-15 Brett Werling's patch for the tcan4x5x glue code driver fixes the detection of chips which are held in reset/sleep and must be woken up by GPIO prior to communication. * tag 'linux-can-fixes-for-6.16-20250715' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: tcan4x5x: fix reset gpio usage during probe ==================== Link: https://patch.msgid.link/20250715101625.3202690-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4c4ca3c46167518f8534ed70f6e3b4bf86c4d158 Author: Oliver Neukum Date: Mon Jul 14 13:12:56 2025 +0200 usb: net: sierra: check for no status endpoint The driver checks for having three endpoints and having bulk in and out endpoints, but not that the third endpoint is interrupt input. Rectify the omission. Reported-by: syzbot+3f89ec3d1d0842e95d50@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-usb/686d5a9f.050a0220.1ffab7.0017.GAE@google.com/ Tested-by: syzbot+3f89ec3d1d0842e95d50@syzkaller.appspotmail.com Fixes: eb4fd8cd355c8 ("net/usb: add sierra_net.c driver") Signed-off-by: Oliver Neukum Link: https://patch.msgid.link/20250714111326.258378-1-oneukum@suse.com Signed-off-by: Jakub Kicinski commit b8be70ec2b47ca62ccb54dc3c2ab9a9c93653e00 Author: Sean Christopherson Date: Mon Jul 14 15:19:28 2025 -0700 KVM: VMX: Ensure unused kvm_tdx_capabilities fields are zeroed out Zero-allocate the kernel's kvm_tdx_capabilities structure and copy only the number of CPUID entries from the userspace structure. As is, KVM doesn't ensure kernel_tdvmcallinfo_1_{r11,r12} and user_tdvmcallinfo_1_r12 are zeroed, i.e. KVM will reflect whatever happens to be in the userspace structure back at userspace, and thus may report garbage to userspace. Zeroing the entire kernel structure also provides better semantics for the reserved field. E.g. if KVM extends kvm_tdx_capabilities to enumerate new information by repurposing bytes from the reserved field, userspace would be required to zero the new field in order to get useful information back (because older KVMs without support for the repurposed field would report garbage, a la the aforementioned tdvmcallinfo bugs). Fixes: 61bb28279623 ("KVM: TDX: Get system-wide info about TDX module on initialization") Suggested-by: Rick Edgecombe Reported-by: Xiaoyao Li Closes: https://lore.kernel.org/all/3ef581f1-1ff1-4b99-b216-b316f6415318@intel.com Tested-by: Xiaoyao Li Reviewed-by: Xiaoyao Li Reviewed-by: Rick Edgecombe Link: https://lore.kernel.org/r/20250714221928.1788095-1-seanjc@google.com Signed-off-by: Sean Christopherson commit bedd0330a19b3a4448e67941732153ce04d3fb9b Author: Michal Swiatkowski Date: Tue Jun 24 11:26:36 2025 +0200 ice: check correct pointer in fwlog debugfs pf->ice_debugfs_pf_fwlog should be checked for an error here. Fixes: 96a9a9341cda ("ice: configure FW logging") Reviewed-by: Przemek Kitszel Signed-off-by: Michal Swiatkowski Reviewed-by: Paul Menzel Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3ce58b01ada408b372f15b7c992ed0519840e3cf Author: Dave Ertman Date: Thu May 22 13:16:57 2025 -0400 ice: add NULL check in eswitch lag check The function ice_lag_is_switchdev_running() is being called from outside of the LAG event handler code. This results in the lag->upper_netdev being NULL sometimes. To avoid a NULL-pointer dereference, there needs to be a check before it is dereferenced. Fixes: 776fe19953b0 ("ice: block default rule setting on LAG interface") Signed-off-by: Dave Ertman Reviewed-by: Aleksandr Loktionov Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 24171a5a4a952c26568ff0d2a0bc8c4708a95e1d Author: Arnd Bergmann Date: Fri Jun 20 19:31:24 2025 +0200 ethernet: intel: fix building with large NR_CPUS With large values of CONFIG_NR_CPUS, three Intel ethernet drivers fail to compile like: In function ‘i40e_free_q_vector’, inlined from ‘i40e_vsi_alloc_q_vectors’ at drivers/net/ethernet/intel/i40e/i40e_main.c:12112:3: 571 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) include/linux/rcupdate.h:1084:17: note: in expansion of macro ‘BUILD_BUG_ON’ 1084 | BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096); \ drivers/net/ethernet/intel/i40e/i40e_main.c:5113:9: note: in expansion of macro ‘kfree_rcu’ 5113 | kfree_rcu(q_vector, rcu); | ^~~~~~~~~ The problem is that the 'rcu' member in 'q_vector' is too far from the start of the structure. Move this member before the CPU mask instead, in all three drivers. Signed-off-by: Arnd Bergmann Acked-by: David S. Miller Reviewed-by: Aleksandr Loktionov Reviewed-by: Alexander Lobakin Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 495a4f0dce9c8c4478c242209748f1ee9e4d5820 Author: Marius Zachmann Date: Thu Jun 19 15:27:47 2025 +0200 hwmon: (corsair-cpro) Validate the size of the received input buffer Add buffer_recv_size to store the size of the received bytes. Validate buffer_recv_size in send_usb_cmd(). Reported-by: syzbot+3bbbade4e1a7ab45ca3b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-hwmon/61233ba1-e5ad-4d7a-ba31-3b5d0adcffcc@roeck-us.net Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver") Signed-off-by: Marius Zachmann Link: https://lore.kernel.org/r/20250619132817.39764-5-mail@mariuszachmann.de Signed-off-by: Guenter Roeck commit 709ea4a8661c731328c1f084dd7a4f0a510932a8 Merge: be8543845da599 4cec89db80ba81 Author: Paolo Bonzini Date: Tue Jul 15 19:32:31 2025 +0200 Merge tag 'kvm-riscv-fixes-6.16-2' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.16, take #2 - Disable vstimecmp before exiting to user-space - Move HGEI[E|P] CSR access to IMSIC virtualization commit be8543845da59901a8326a0df5e3630684ac028b Merge: 8a73c8dbb23010 2265c08ec393ef Author: Paolo Bonzini Date: Tue Jul 15 19:32:23 2025 +0200 Merge tag 'kvmarm-fixes-6.16-6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take #6 - Fix use of u64_replace_bits() in adjusting the guest's view of MDCR_EL2.HPMN. commit 8a73c8dbb23010561c9bc78a7342c3ad0da11188 Author: Paolo Bonzini Date: Thu Jul 10 12:17:11 2025 +0200 KVM: Documentation: document how KVM is tested Proper testing greatly simplifies both patch development and review, but it can be unclear what kind of userspace or guest support should accompany new features. Clarify maintainer expectations in terms of testing expectations; additionally, list the cases in which open-source userspace support is pretty much a necessity and its absence can only be mitigated by selftests. While these ideas have long been followed implicitly by KVM contributors and maintainers, formalize them in writing to provide consistent (though not universal) guidelines. Suggested-by: Rick Edgecombe Signed-off-by: Paolo Bonzini commit 83131d84694a85627f595b5ecd480f6ecb98b5aa Author: Paolo Bonzini Date: Thu Jul 10 12:14:17 2025 +0200 KVM: Documentation: minimal updates to review-checklist.rst While the file could stand a larger update, these are the bare minimum changes needed to make it more widely applicable. Signed-off-by: Paolo Bonzini commit 4664a4ddb9211a3513aa769453e3a1095fc806d0 Merge: e003ef2cb1de41 8f0837fdc5d832 Author: Linus Torvalds Date: Tue Jul 15 09:26:33 2025 -0700 Merge tag 'soc-fixes-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC fixes from Arnd Bergmann: "There are 18 devicetree fixes for three arm64 plaforms: Qualcomm Snapdragon, Rockchips and NXP i.MX. These get updated to more correctly describe the hardware, fixing issues with: - real-time clock on Snapdragon based laptops - SD card detection, PCI probing and HDMI/DDC communication on Rockchips - ethernet and SPI probing on certain i.MX based boards - a regression with the i.MX watchdog Aside from the devicetree fixes, there are two additional fixes for the merged ASPEED LPC snoop driver that saw some changes in 6.16, and one additional driver enabled in arm64 defconfig to fix CPU frequency scaling" * tag 'soc-fixes-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (21 commits) arm64: dts: freescale: imx8mm-verdin: Keep LDO5 always on soc: aspeed: lpc-snoop: Don't disable channels that aren't enabled soc: aspeed: lpc-snoop: Cleanup resources in stack-order arm64: dts: imx95: Correct the DMA interrupter number of pcie0_ep arm64: dts: rockchip: Add missing fan-supply to rk3566-quartz64-a arm64: dts: rockchip: use cs-gpios for spi1 on ringneck arm64: dts: add big-endian property back into watchdog node arm64: dts: imx95-15x15-evk: fix the overshoot issue of NETC arm64: dts: imx95-19x19-evk: fix the overshoot issue of NETC arm64: dts: rockchip: list all CPU supplies on ArmSoM Sige5 arm64: dts: imx8mp-venice-gw74xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw73xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw72xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw71xx: fix TPM SPI frequency arm64: dts: qcom: x1e80100: describe uefi rtc offset arm64: dts: qcom: sc8280xp-x13s: describe uefi rtc offset arm64: defconfig: Enable Qualcomm CPUCP mailbox driver arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi 4B arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi CM5 arm64: dts: rockchip: Adjust the HDMI DDC IO driver strength for rk3588 ... commit e003ef2cb1de41edda508ea1fdb21974f9f18dfb Merge: 155a3c003e555a 3a1d22bd85381c Author: Linus Torvalds Date: Tue Jul 15 09:20:44 2025 -0700 Merge tag 'hid-for-linus-2025071501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - one warning cleanup introduced in the last PR (Andy Shevchenko) - a nasty syzbot buffer underflow fix co-debugged with Alan Stern (Benjamin Tissoires) * tag 'hid-for-linus-2025071501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: selftests/hid: add a test case for the recent syzbot underflow HID: core: do not bypass hid_hw_raw_request HID: core: ensure __hid_request reserves the report ID as the first byte HID: core: ensure the allocated report buffer can contain the reserved report ID HID: debug: Remove duplicate entry (BTN_WHEEL) commit 3df63fa8f2afd051848e37ef1b8299dee28d4f87 Author: Abinash Singh Date: Sat Jul 5 21:30:55 2025 +0530 dma: dw-edma: Fix build warning in dw_edma_pcie_probe() The function dw_edma_pcie_probe() in dw-edma-pcie.c triggered a frame size warning: ld.lld:warning: drivers/dma/dw-edma/dw-edma-pcie.c:162:0: stack frame size (1040) exceeds limit (1024) in function 'dw_edma_pcie_probe' This patch reduces the stack usage by dynamically allocating the `vsec_data` structure using kmalloc(), rather than placing it on the stack. This eliminates the overflow warning and improves kernel robustness. Signed-off-by: Abinash Singh Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250705160055.808165-1-abinashsinghlalotra@gmail.com Signed-off-by: Vinod Koul commit 188c6ba1dd925849c5d94885c8bbdeb0b3dcf510 Author: Dan Carpenter Date: Tue Jul 1 17:31:40 2025 -0500 dmaengine: nbpfaxi: Fix memory corruption in probe() The nbpf->chan[] array is allocated earlier in the nbpf_probe() function and it has "num_channels" elements. These three loops iterate one element farther than they should and corrupt memory. The changes to the second loop are more involved. In this case, we're copying data from the irqbuf[] array into the nbpf->chan[] array. If the data in irqbuf[i] is the error IRQ then we skip it, so the iterators are not in sync. I added a check to ensure that we don't go beyond the end of the irqbuf[] array. I'm pretty sure this can't happen, but it seemed harmless to add a check. On the other hand, after the loop has ended there is a check to ensure that the "chan" iterator is where we expect it to be. In the original code we went one element beyond the end of the array so the iterator wasn't in the correct place and it would always return -EINVAL. However, now it will always be in the correct place. I deleted the check since we know the result. Cc: stable@vger.kernel.org Fixes: b45b262cefd5 ("dmaengine: add a driver for AMBA AXI NBPF DMAC IP cores") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/b13c5225-7eff-448c-badc-a2c98e9bcaca@sabinyo.mountain Signed-off-by: Vinod Koul commit b7acfeab8af9ee661c933522132f3d1d92ed12d6 Author: Harshit Mogalapalli Date: Thu Jul 10 10:24:02 2025 -0700 phy: qcom: fix error code in snps_eusb2_hsphy_probe() When phy->ref_clk is NULL PTR_ERR(NULL) will be a success. Fix this by using -ENOENT when phy->ref_clk is NULL instead. Fixes: 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aDCbeuCTy9zyWJAM@stanley.mountain/ Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20250710172403.2593193-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Vinod Koul commit b24bbb534c2da4a9a99a23525e9c24a0be7ec6f4 Author: Kai Huang Date: Mon Jul 14 10:20:20 2025 +1200 KVM: x86: Reject KVM_SET_TSC_KHZ vCPU ioctl for TSC protected guest Reject KVM_SET_TSC_KHZ vCPU ioctl if guest's TSC is protected and not changeable by KVM, and update the documentation to reflect it. For such TSC protected guests, e.g. TDX guests, typically the TSC is configured once at VM level before any vCPU are created and remains unchanged during VM's lifetime. KVM provides the KVM_SET_TSC_KHZ VM scope ioctl to allow the userspace VMM to configure the TSC of such VM. After that the userspace VMM is not supposed to call the KVM_SET_TSC_KHZ vCPU scope ioctl anymore when creating the vCPU. The de facto userspace VMM Qemu does this for TDX guests. The upcoming SEV-SNP guests with Secure TSC should follow. Note, TDX support hasn't been fully released as of the "buggy" commit, i.e. there is no established ABI to break. Fixes: adafea110600 ("KVM: x86: Add infrastructure for secure TSC") Suggested-by: Sean Christopherson Signed-off-by: Kai Huang Reviewed-by: Xiaoyao Li Reviewed-by: Nikunj A Dadhania Link: https://lore.kernel.org/r/71bbdf87fdd423e3ba3a45b57642c119ee2dd98c.1752444335.git.kai.huang@intel.com Signed-off-by: Sean Christopherson commit d34d6feaf4a76833effcec0b148b65946b04cde8 Author: Imre Deak Date: Wed Jul 9 00:23:31 2025 +0300 drm/dp: Change AUX DPCD probe address from LANE0_1_STATUS to TRAINING_PATTERN_SET Commit a3ef3c2da675 ("drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS") stopped using the DPCD_REV register for DPCD probing, since this results in link training failures at least when using an Intel Barlow Ridge TBT hub at UHBR link rates (the DP_INTRA_HOP_AUX_REPLY_INDICATION never getting cleared after the failed link training). Since accessing DPCD_REV during link training is prohibited by the DP Standard, LANE0_1_STATUS (0x202) was used instead, as it falls within the Standard's valid register address range (0x102-0x106, 0x202-0x207, 0x200c-0x200f, 0x2216) and it fixed the link training on the above TBT hub. However, reading the LANE0_1_STATUS register also has a side-effect at least on a Novatek eDP panel, as reported on the Closes: link below, resulting in screen flickering on that panel. One clear side-effect when doing the 1-byte probe reads from LANE0_1_STATUS during link training before reading out the full 6 byte link status starting at the same address is that the panel will report the link training as completed with voltage swing 0. This is different from the normal, flicker-free scenario when no DPCD probing is done, the panel reporting the link training complete with voltage swing 2. Using the TRAINING_PATTERN_SET register for DPCD probing doesn't have the above side-effect, the panel will link train with voltage swing 2 as expected and it will stay flicker-free. This register is also in the above valid register range and is unlikely to have a side-effect as that of LANE0_1_STATUS: Reading LANE0_1_STATUS is part of the link training CR/EQ sequences and so it may cause a state change in the sink - even if inadvertently as I suspect in the case of the above Novatek panel. As opposed to this, reading TRAINING_PATTERN_SET is not part of the link training sequence (it must be only written once at the beginning of the CR/EQ sequences), so it's unlikely to cause any state change in the sink. As a side-note, this Novatek panel also lacks support for TPS3, while claiming support for HBR2, which violates the DP Standard (the Standard mandating TPS3 for HBR2). Besides the Novatek panel (PSR 1), which this change fixes, I also verified the change on a Samsung (PSR 1) and an Analogix (PSR 2) eDP panel as well as on the Intel Barlow Ridge TBT hub. Note that in the drm-tip tree (targeting the v6.17 kernel version) the i915 and xe drivers keep DPCD probing enabled only for the panel known to require this (HP ZR24w), hence those drivers in drm-tip are not affected by the above problem. Cc: Ville Syrjälä Cc: Jani Nikula Fixes: a3ef3c2da675 ("drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS") Reported-and-tested-by: Paul Menzel Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14558 Reviewed-by: Jonathan Cavitt Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250708212331.112898-1-imre.deak@intel.com (cherry picked from commit bba9aa41654036534d86b198f5647a9ce15ebd7f) [Imre: Rebased on drm-intel-fixes] Signed-off-by: Imre Deak Signed-off-by: Rodrigo Vivi [Rodrigo: Changed original commit hash to match with the one propagated in fixes] commit 0e9418961f897be59b1fab6e31ae1b09a0bae902 Author: Paolo Abeni Date: Thu Jul 10 18:04:50 2025 +0200 selftests: net: increase inter-packet timeout in udpgro.sh The mentioned test is not very stable when running on top of debug kernel build. Increase the inter-packet timeout to allow more slack in such environments. Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Reviewed-by: Simon Horman Link: https://patch.msgid.link/b0370c06ddb3235debf642c17de0284b2cd3c652.1752163107.git.pabeni@redhat.com Signed-off-by: Paolo Abeni commit ebd6884167eac94bae9f92793fcd84069d9e4415 Author: Rafael J. Wysocki Date: Mon Jul 14 19:45:31 2025 +0200 PM: sleep: Update power.completion for all devices on errors After commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children"), the following scenario is possible: 1. Device A is async and it depends on device B that is sync. 2. Async suspend is scheduled for A before the processing of B is started. 3. A is waiting for B. 4. In the meantime, an unrelated device fails to suspend and returns an error. 5. The processing of B doesn't start at all and its power.completion is not updated. 6. A is still waiting for B when async_synchronize_full() is called. 7. Deadlock ensues. To prevent this from happening, update power.completion for all devices on errors in all suspend phases, but do not do it directly for devices that are already being processed or are waiting for the processing to start because in those cases it may be necessary to wait for the processing to actually complete before updating power.completion for the device. Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") Fixes: 443046d1ad66 ("PM: sleep: Make suspend of devices more asynchronous") Closes: https://lore.kernel.org/linux-pm/e13740a0-88f3-4a6f-920f-15805071a7d6@linaro.org/ Reported-and-tested-by: Tudor Ambarus Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson Link: https://patch.msgid.link/6191258.lOV4Wx5bFT@rjwysocki.net commit 228b9deded0011482149cdb474e3ad15aeeb4a97 Author: Zihuan Zhang Date: Sat Jul 12 11:08:24 2025 +0800 PM: suspend: clean up redundant filesystems_freeze/thaw() handling The recently introduced support for freezing filesystems during system suspend included calls to filesystems_freeze() in both suspend_prepare() and enter_state(), as well as calls to filesystems_thaw() in both suspend_finish() and the Unlock path in enter_state(). These are redundant. Moreover, calling filesystems_freeze() twice, from both suspend_prepare() and enter_state(), leads to a black screen and makes the system unable to resume in some cases. Address this as follows: - filesystems_freeze() is already called in suspend_prepare(), which is the proper and consistent place to handle pre-suspend operations. The second call in enter_state() is unnecessary and so remove it. - filesystems_thaw() is invoked in suspend_finish(), which covers successful suspend/resume paths. In the failure case, add a call to filesystems_thaw() only when needed, avoiding the duplicate call in the general Unlock path. This change simplifies the suspend code and avoids repeated freeze/thaw calls, while preserving correct ordering and behavior. Fixes: eacfbf74196f ("power: freeze filesystems during suspend/resume") Signed-off-by: Zihuan Zhang Link: https://patch.msgid.link/20250712030824.81474-1-zhangzihuan@kylinos.cn [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 75b63ce2c98b41c45ee3ff14c76f27c3238bc6d2 Author: Rafael J. Wysocki Date: Thu Jul 10 10:43:26 2025 +0200 PM: suspend: Drop a misplaced pm_restore_gfp_mask() call The pm_restore_gfp_mask() call added by commit 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence") to suspend_devices_and_enter() is done too early because it takes place before calling dpm_resume() in dpm_resume_end() and some swap-backing devices may not be ready at that point. Moreover, dpm_resume_end() called subsequently in the same code path invokes pm_restore_gfp_mask() again and calling it twice in a row is pointless. Drop the misplaced pm_restore_gfp_mask() call from suspend_devices_and_enter() to address this issue. Fixes: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence") Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/2810409.mvXUDI8C0e@rjwysocki.net [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 834bce6a715ae9a9c4dce7892454a19adf22b013 Author: Amit Pundir Date: Wed Jul 9 23:19:49 2025 +0530 soundwire: Revert "soundwire: qcom: Add set_channel_map api support" This reverts commit 7796c97df6b1b2206681a07f3c80f6023a6593d5. This patch broke Dragonboard 845c (sdm845). I see: Unexpected kernel BRK exception at EL1 Internal error: BRK handler: 00000000f20003e8 [#1] SMP pc : qcom_swrm_set_channel_map+0x7c/0x80 [soundwire_qcom] lr : snd_soc_dai_set_channel_map+0x34/0x78 Call trace: qcom_swrm_set_channel_map+0x7c/0x80 [soundwire_qcom] (P) sdm845_dai_init+0x18c/0x2e0 [snd_soc_sdm845] snd_soc_link_init+0x28/0x6c snd_soc_bind_card+0x5f4/0xb0c snd_soc_register_card+0x148/0x1a4 devm_snd_soc_register_card+0x50/0xb0 sdm845_snd_platform_probe+0x124/0x148 [snd_soc_sdm845] platform_probe+0x6c/0xd0 really_probe+0xc0/0x2a4 __driver_probe_device+0x7c/0x130 driver_probe_device+0x40/0x118 __device_attach_driver+0xc4/0x108 bus_for_each_drv+0x8c/0xf0 __device_attach+0xa4/0x198 device_initial_probe+0x18/0x28 bus_probe_device+0xb8/0xbc deferred_probe_work_func+0xac/0xfc process_one_work+0x244/0x658 worker_thread+0x1b4/0x360 kthread+0x148/0x228 ret_from_fork+0x10/0x20 Kernel panic - not syncing: BRK handler: Fatal exception Dan has also reported following issues with the original patch https://lore.kernel.org/all/33fe8fe7-719a-405a-9ed2-d9f816ce1d57@sabinyo.mountain/ Bug #1: The zeroeth element of ctrl->pconfig[] is supposed to be unused. We start counting at 1. However this code sets ctrl->pconfig[0].ch_mask = 128. Bug #2: There are SLIM_MAX_TX_PORTS (16) elements in tx_ch[] array but only QCOM_SDW_MAX_PORTS + 1 (15) in the ctrl->pconfig[] array so it corrupts memory like Yongqin Liu pointed out. Bug 3: Like Jie Gan pointed out, it erases all the tx information with the rx information. Cc: stable@vger.kernel.org # v6.15+ Signed-off-by: Amit Pundir Acked-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250709174949.8541-1-amit.pundir@linaro.org Signed-off-by: Vinod Koul commit 949ddec3728f3a793a13c1c9003028b9b159aefc Author: Adam Queler Date: Mon Jul 14 23:14:24 2025 -0400 ASoC: amd: yc: Add DMI entries to support HP 15-fb1xxx This model requires an additional detection quirk to enable the internal microphone. Signed-off-by: Adam Queler Link: https://patch.msgid.link/20250715031434.222062-1-queler+k@gmail.com Signed-off-by: Mark Brown commit fdfa018c6962c86d2faa183187669569be4d513f Merge: 5724ff190b22bd 252f4ac08cd2f1 Author: Greg Kroah-Hartman Date: Tue Jul 15 13:13:53 2025 +0200 Merge tag 'usb-serial-6.16-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB serial device ids for 6.16-rc7 Here are some more device ids for 6.16-rc7. All have been in linux-next with no reported issues. * tag 'usb-serial-6.16-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI commit bbc19fef578970158847a41d9b6b6b218034b8c2 Merge: 444020f4bf06fb 46345ed36296d9 Author: Johannes Berg Date: Tue Jul 15 13:07:24 2025 +0200 Merge tag 'iwlwifi-fixes-2025-07-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== iwlwifi-fixes - missing unlock in error path - Avoid FW assert on bad command values - fix kernel panic due to incorrect index calculation ==================== Signed-off-by: Johannes Berg commit 0f97a7588db7a545ea07ee0d512789bfad4931d8 Author: Brett Werling Date: Fri Jul 11 09:17:28 2025 -0500 can: tcan4x5x: fix reset gpio usage during probe Fixes reset GPIO usage during probe by ensuring we retrieve the GPIO and take the device out of reset (if it defaults to being in reset) before we attempt to communicate with the device. This is achieved by moving the call to tcan4x5x_get_gpios() before tcan4x5x_find_version() and avoiding any device communication while getting the GPIOs. Once we determine the version, we can then take the knowledge of which GPIOs we obtained and use it to decide whether we need to disable the wake or state pin functions within the device. This change is necessary in a situation where the reset GPIO is pulled high externally before the CPU takes control of it, meaning we need to explicitly bring the device out of reset before we can start communicating with it at all. This also has the effect of fixing an issue where a reset of the device would occur after having called tcan4x5x_disable_wake(), making the original behavior not actually disable the wake. This patch should now disable wake or state pin functions well after the reset occurs. Signed-off-by: Brett Werling Link: https://patch.msgid.link/20250711141728.1826073-1-brett.werling@garmin.com Cc: Markus Schneider-Pargmann Fixes: 142c6dc6d9d7 ("can: tcan4x5x: Add support for tcan4552/4553") Signed-off-by: Marc Kleine-Budde commit e31c8f1db9c1df91af43012cb482e05a9339bbdf Merge: 347e9f5043c896 9ab29ed505557b Author: Bartosz Golaszewski Date: Tue Jul 15 11:40:25 2025 +0200 Merge tag 'intel-gpio-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-current intel-gpio for v6.16-2 * Add a quirk for Acer Nitro V15 against wakeup capability The following is an automated git shortlog grouped by driver: gpiolib: - acpi: Add a quirk for Acer Nitro V15 commit 46345ed36296d965af1b6e68e62076d67521c55d Author: Ville Syrjälä Date: Fri Jul 11 23:57:44 2025 +0300 wifi: iwlwifi: Fix botched indexing conversion The conversion from compiler assisted indexing to manual indexing wasn't done correctly. The array is still made up of __le16 elements so multiplying the outer index by the element size is not what we want. Fix it up. This causes the kernel to oops when trying to transfer any significant amount of data over wifi: BUG: unable to handle page fault for address: ffffc900009f5282 PGD 100000067 P4D 100000067 PUD 1000fb067 PMD 102e82067 PTE 0 Oops: Oops: 0002 [#1] SMP CPU: 1 UID: 0 PID: 99 Comm: kworker/u8:3 Not tainted 6.15.0-rc2-cl-bisect3-00604-g6204d5130a64-dirty #78 PREEMPT Hardware name: Dell Inc. Latitude E5400 /0D695C, BIOS A19 06/13/2013 Workqueue: events_unbound cfg80211_wiphy_work [cfg80211] RIP: 0010:iwl_trans_pcie_tx+0x4dd/0xe60 [iwlwifi] Code: 00 00 66 81 fa ff 0f 0f 87 42 09 00 00 3d ff 00 00 00 0f 8f 37 09 00 00 41 c1 e0 0c 41 09 d0 48 8d 14 b6 48 c1 e2 07 48 01 ca <66> 44 89 04 57 48 8d 0c 12 83 f8 3f 0f 8e 84 01 00 00 41 8b 85 80 RSP: 0018:ffffc900001c3b50 EFLAGS: 00010206 RAX: 00000000000000c1 RBX: ffff88810b180028 RCX: 00000000000000c1 RDX: 0000000000002141 RSI: 000000000000000d RDI: ffffc900009f1000 RBP: 0000000000000002 R08: 0000000000000025 R09: ffffffffa050fa60 R10: 00000000fbdbf4bc R11: 0000000000000082 R12: ffff88810e5ade40 R13: ffff88810af81588 R14: 000000000000001a R15: ffff888100dfe0c8 FS: 0000000000000000(0000) GS:ffff8881998c3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900009f5282 CR3: 0000000001e39000 CR4: 00000000000426f0 Call Trace: ? rcu_is_watching+0xd/0x40 ? __iwl_dbg+0xb1/0xe0 [iwlwifi] iwlagn_tx_skb+0x8e2/0xcb0 [iwldvm] iwlagn_mac_tx+0x18/0x30 [iwldvm] ieee80211_handle_wake_tx_queue+0x6c/0xc0 [mac80211] ieee80211_agg_start_txq+0x140/0x2e0 [mac80211] ieee80211_agg_tx_operational+0x126/0x210 [mac80211] ieee80211_process_addba_resp+0x27b/0x2a0 [mac80211] ieee80211_iface_work+0x4bd/0x4d0 [mac80211] ? _raw_spin_unlock_irq+0x1f/0x40 cfg80211_wiphy_work+0x117/0x1f0 [cfg80211] process_one_work+0x1ee/0x570 worker_thread+0x1c5/0x3b0 ? bh_worker+0x240/0x240 kthread+0x110/0x220 ? kthread_queue_delayed_work+0x90/0x90 ret_from_fork+0x28/0x40 ? kthread_queue_delayed_work+0x90/0x90 ret_from_fork_asm+0x11/0x20 Modules linked in: ctr aes_generic ccm sch_fq_codel bnep xt_tcpudp xt_multiport xt_state iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 ip_tables x_tables btusb btrtl btintel btbcm bluetooth ecdh_generic ecc libaes hid_generic usbhid hid binfmt_misc joydev mousedev snd_hda_codec_hdmi iwldvm snd_hda_codec_idt snd_hda_codec_generic mac80211 coretemp iTCO_wdt watchdog kvm_intel i2c_dev snd_hda_intel libarc4 kvm snd_intel_dspcfg sdhci_pci sdhci_uhs2 snd_hda_codec iwlwifi sdhci irqbypass cqhci snd_hwdep snd_hda_core cfg80211 firewire_ohci mmc_core psmouse snd_pcm i2c_i801 firewire_core pcspkr led_class uhci_hcd i2c_smbus tg3 crc_itu_t iosf_mbi snd_timer rfkill libphy ehci_pci snd ehci_hcd lpc_ich mfd_core usbcore video intel_agp usb_common soundcore intel_gtt evdev agpgart parport_pc wmi parport backlight CR2: ffffc900009f5282 ---[ end trace 0000000000000000 ]--- RIP: 0010:iwl_trans_pcie_tx+0x4dd/0xe60 [iwlwifi] Code: 00 00 66 81 fa ff 0f 0f 87 42 09 00 00 3d ff 00 00 00 0f 8f 37 09 00 00 41 c1 e0 0c 41 09 d0 48 8d 14 b6 48 c1 e2 07 48 01 ca <66> 44 89 04 57 48 8d 0c 12 83 f8 3f 0f 8e 84 01 00 00 41 8b 85 80 RSP: 0018:ffffc900001c3b50 EFLAGS: 00010206 RAX: 00000000000000c1 RBX: ffff88810b180028 RCX: 00000000000000c1 RDX: 0000000000002141 RSI: 000000000000000d RDI: ffffc900009f1000 RBP: 0000000000000002 R08: 0000000000000025 R09: ffffffffa050fa60 R10: 00000000fbdbf4bc R11: 0000000000000082 R12: ffff88810e5ade40 R13: ffff88810af81588 R14: 000000000000001a R15: ffff888100dfe0c8 FS: 0000000000000000(0000) GS:ffff8881998c3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900009f5282 CR3: 0000000001e39000 CR4: 00000000000426f0 Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Cc: Miri Korenblit Fixes: 6204d5130a64 ("wifi: iwlwifi: use bc entries instead of bc table also for pre-ax210") Signed-off-by: Ville Syrjälä Link: https://patch.msgid.link/20250711205744.28723-1-ville.syrjala@linux.intel.com Signed-off-by: Miri Korenblit commit 444020f4bf06fb86805ee7e7ceec0375485fd94d Author: Johannes Berg Date: Mon Jul 14 14:21:30 2025 +0200 wifi: cfg80211: remove scan request n_channels counted_by This reverts commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by"). This really has been a completely failed experiment. There were no actual bugs found, and yet at this point we already have four "fixes" to it, with nothing to show for but code churn, and it never even made the code any safer. In all of the cases that ended up getting "fixed", the structure is also internally inconsistent after the n_channels setting as the channel list isn't actually filled yet. You cannot scan with such a structure, that's just wrong. In mac80211, the struct is also reused multiple times, so initializing it once is no good. Some previous "fixes" (e.g. one in brcm80211) are also just setting n_channels before accessing the array, under the assumption that the code is correct and the array can be accessed, further showing that the whole thing is just pointless when the allocation count and use count are not separate. If we really wanted to fix it, we'd need to separately track the number of channels allocated and the number of channels currently used, but given that no bugs were found despite the numerous syzbot reports, that'd just be a waste of time. Remove the __counted_by() annotation. We really should also remove a number of the n_channels settings that are setting up a structure that's inconsistent, but that can wait. Reported-by: syzbot+e834e757bd9b3d3e1251@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e834e757bd9b3d3e1251 Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by") Link: https://patch.msgid.link/20250714142130.9b0bbb7e1f07.I09112ccde72d445e11348fc2bef68942cb2ffc94@changeid Signed-off-by: Johannes Berg commit 2aec790e666bf1f11d39bb50aa9df8febd58a548 Merge: c7979c3917fa13 afcefc58fdfd68 Author: Johannes Berg Date: Tue Jul 15 10:26:03 2025 +0200 Merge tag 'ath-current-20250714' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath Jeff Johnson says: ================== ath.git update for v6.16-rc7 Fix an ath12k performance regression introduce in v6.16-rc1 ================== Signed-off-by: Johannes Berg commit 6b995d01683feae619aa3263d18a6aa19bface16 Author: Ard Biesheuvel Date: Mon Jul 14 09:34:03 2025 +0200 x86/sev: Work around broken noinstr on GCC Forcibly disable KCSAN for the sev-nmi.c source file, which only contains functions annotated as 'noinstr' but is emitted with calls to KCSAN instrumentation nonetheless. E.g., vmlinux.o: error: objtool: __sev_es_nmi_complete+0x58: call to __kcsan_check_access() leaves .noinstr.text section make[2]: *** [/usr/local/google/home/ardb/linux/scripts/Makefile.vmlinux_o:72: vmlinux.o] Error 1 Fixes: a3cbbb4717e1 ("x86/boot: Move SEV startup code into startup/") Reported-by: Randy Dunlap Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov (AMD) Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/20250714073402.4107091-2-ardb+git@google.com commit 0523c6cc87e558c50ff4489c87c54c55068b1169 Author: Maurizio Lombardi Date: Fri Jul 4 16:44:54 2025 +0200 nvmet-tcp: fix callback lock for TLS handshake When restoring the default socket callbacks during a TLS handshake, we need to acquire a write lock on sk_callback_lock. Previously, a read lock was used, which is insufficient for modifying sk_user_data and sk_data_ready. Fixes: 675b453e0241 ("nvmet-tcp: enable TLS handshake upcall") Signed-off-by: Maurizio Lombardi Signed-off-by: Christoph Hellwig commit 71257925e83eae1cb6913d65ca71927d2220e6d1 Author: Yu Kuai Date: Tue Jul 15 09:28:12 2025 +0800 nvme: fix misaccounting of nvme-mpath inflight I/O Procedures for nvme-mpath IO accounting: 1) initialize nvme_request and clear flags; 2) set NVME_MPATH_IO_STATS and increase inflight counter when IO started; 3) check NVME_MPATH_IO_STATS and decrease inflight counter when IO is done; However, for the case nvme_fail_nonready_command(), both step 1) and 2) are skipped, and if old nvme_request set NVME_MPATH_IO_STATS and then request is reused, step 3) will still be executed, causing inflight I/O counter to be negative. Fix the problem by clearing nvme_request in nvme_fail_nonready_command(). Fixes: ea5e5f42cd2c ("nvme-fabrics: avoid double completions in nvmf_fail_nonready_command") Reported-by: Yi Zhang Closes: https://lore.kernel.org/all/CAHj4cs_+dauobyYyP805t33WMJVzOWj=7+51p4_j9rA63D9sog@mail.gmail.com/ Signed-off-by: Yu Kuai Signed-off-by: Christoph Hellwig commit 1fc09f2961f5c6d8bb53bc989f17b12fdc6bc93d Author: Christoph Hellwig Date: Wed Jul 9 11:54:08 2025 +0200 nvme: revert the cross-controller atomic write size validation This was originally added by commit 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size") to check the all controllers in a subsystem report the same atomic write size, but the check wasn't quite correct and caused problems for devices with multiple namespaces that report different LBA sizes. Commit f46d273449ba ("nvme: fix atomic write size validation") tried to fix this, but then caused problems for namespace rediscovery after a format with an LBA size change that changes the AWUPF value. This drops the validation and essentially reverts those two commits while keeping the cleanup that went in between the two. We'll need to figure out how to properly check for the mouse trap that nvme left us, but for now revert the check to keep devices working for users who couldn't care less about the atomic write feature. Fixes: 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size") Fixes: f46d273449ba ("nvme: fix atomic write size validation") Signed-off-by: Christoph Hellwig Reviewed-by: Alan Adamson Reviewed-by: Keith Busch Reviewed-by: John Garry Reviewed-by: Chaitanya Kulkarni Tested-by: Alan Adamson commit e201c19ddeed6b37f05617e529d8efa079657ed7 Author: Takashi Iwai Date: Tue Jul 15 08:29:04 2025 +0200 ALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS ASUS ROG Strix G712LWS (PCI SSID 1043:1a83) requires the quirk for ALC294 headset mode in order to make the speaker and headset I/O working properly. Cc: Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220334 Link: https://patch.msgid.link/20250715062906.11857-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a4131a50d072b369bfed0b41e741c41fd8048641 Author: Naman Jain Date: Fri Jul 11 11:38:46 2025 +0530 tools/hv: fcopy: Fix irregularities with size of ring buffer Size of ring buffer, as defined in uio_hv_generic driver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon. Cc: stable@vger.kernel.org Fixes: 0315fef2aff9 ("uio_hv_generic: Align ring size to system page") Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Reviewed-by: Long Li Link: https://lore.kernel.org/r/20250711060846.9168-1-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250711060846.9168-1-namjain@linux.microsoft.com> commit 6f490bb4a982f7455576d6cf409bef10aebd07b8 Author: Stanislav Kinsburskii Date: Fri Jul 11 12:18:52 2025 -0700 PCI: hv: Use the correct hypercall for unmasking interrupts on nested Running as nested root on MSHV imposes a different requirement for the pci-hyperv controller. In this setup, the interrupt will first come to the L1 (nested) hypervisor, which will deliver it to the appropriate root CPU. Instead of issuing the RETARGET hypercall, issue the MAP_DEVICE_INTERRUPT hypercall to L1 to complete the setup. Rename hv_arch_irq_unmask() to hv_irq_retarget_interrupt(). Co-developed-by: Jinank Jain Signed-off-by: Jinank Jain Signed-off-by: Stanislav Kinsburskii Signed-off-by: Nuno Das Neves Reviewed-by: Roman Kisel Reviewed-by: Michael Kelley Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/1752261532-7225-4-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1752261532-7225-4-git-send-email-nunodasneves@linux.microsoft.com> commit 52a45f870e271d6d55ef26c17e8c6c82a22312a7 Author: Stanislav Kinsburskii Date: Fri Jul 11 12:18:51 2025 -0700 x86/hyperv: Expose hv_map_msi_interrupt() Move some of the logic of hv_irq_compose_irq_message() into hv_map_msi_interrupt(). Make hv_map_msi_interrupt() a globally-available helper function, which will be used to map PCI interrupts when running in the root partition. Signed-off-by: Stanislav Kinsburskii Signed-off-by: Nuno Das Neves Reviewed-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1752261532-7225-3-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1752261532-7225-3-git-send-email-nunodasneves@linux.microsoft.com> commit 36c46e64c55061623daf214d26e634ae2cfe4a49 Author: Nuno Das Neves Date: Fri Jul 11 12:18:50 2025 -0700 Drivers: hv: Use nested hypercall for post message and signal event When running nested, these hypercalls must be sent to the L0 hypervisor or VMBus will fail. Remove hv_do_nested_hypercall() and hv_do_fast_nested_hypercall8() altogether and open-code these cases, since there are only 2 and all they do is add the nested bit. Signed-off-by: Nuno Das Neves Reviewed-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1752261532-7225-2-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1752261532-7225-2-git-send-email-nunodasneves@linux.microsoft.com> commit 155a3c003e555a7300d156a5252c004c392ec6b0 Merge: 347e9f5043c896 b1bf1a782fdf5c Author: Linus Torvalds Date: Mon Jul 14 19:25:28 2025 -0700 Merge tag 'for-6.16/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mikulas Patocka: - dm-bufio: fix scheduling in atomic * tag 'for-6.16/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-bufio: fix sched in atomic context commit f0f2b992d8185a0366be951685e08643aae17d6d Author: Sean Anderson Date: Mon Jul 7 15:58:03 2025 -0400 net: phy: Don't register LEDs for genphy If a PHY has no driver, the genphy driver is probed/removed directly in phy_attach/detach. If the PHY's ofnode has an "leds" subnode, then the LEDs will be (un)registered when probing/removing the genphy driver. This could occur if the leds are for a non-generic driver that isn't loaded for whatever reason. Synchronously removing the PHY device in phy_detach leads to the following deadlock: rtnl_lock() ndo_close() ... phy_detach() phy_remove() phy_leds_unregister() led_classdev_unregister() led_trigger_set() netdev_trigger_deactivate() unregister_netdevice_notifier() rtnl_lock() There is a corresponding deadlock on the open/register side of things (and that one is reported by lockdep), but it requires a race while this one is deterministic. Generic PHYs do not support LEDs anyway, so don't bother registering them. Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Signed-off-by: Sean Anderson Link: https://patch.msgid.link/20250707195803.666097-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit e18f348632ec4ee25d9172cdff273f0e939241c7 Author: Victor Nogueira Date: Sat Jul 12 11:50:35 2025 -0300 selftests/tc-testing: Create test cases for adding qdiscs to invalid qdisc parents As described in a previous commit [1], Lion's patch [2] revealed an ancient bug in the qdisc API. Whenever a user tries to add a qdisc to an invalid parent (not a class, root, or ingress qdisc), the qdisc API will detect this after qdisc_create is called. Some qdiscs (like fq_codel, pie, and sfq) call functions (on their init callback) which assume the parent is valid, so qdisc_create itself may have caused a NULL pointer dereference in such cases. This commit creates 3 TDC tests that attempt to add fq_codel, pie and sfq qdiscs to invalid parents - Attempts to add an fq_codel qdisc to an hhf qdisc parent - Attempts to add a pie qdisc to a drr qdisc parent - Attempts to add an sfq qdisc to an inexistent hfsc classid (which would belong to a valid hfsc qdisc) [1] https://lore.kernel.org/all/20250707210801.372995-1-victor@mojatatu.com/ [2] https://lore.kernel.org/netdev/d912cbd7-193b-4269-9857-525bee8bbb6a@gmail.com/ Signed-off-by: Victor Nogueira Link: https://patch.msgid.link/20250712145035.705156-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski commit 60ada4fe644edaa6c2da97364184b0425e8aeaf5 Author: Kuniyuki Iwashima Date: Fri Jul 11 06:07:52 2025 +0000 smc: Fix various oops due to inet_sock type confusion. syzbot reported weird splats [0][1] in cipso_v4_sock_setattr() while freeing inet_sk(sk)->inet_opt. The address was freed multiple times even though it was read-only memory. cipso_v4_sock_setattr() did nothing wrong, and the root cause was type confusion. The cited commit made it possible to create smc_sock as an INET socket. The issue is that struct smc_sock does not have struct inet_sock as the first member but hijacks AF_INET and AF_INET6 sk_family, which confuses various places. In this case, inet_sock.inet_opt was actually smc_sock.clcsk_data_ready(), which is an address of a function in the text segment. $ pahole -C inet_sock vmlinux struct inet_sock { ... struct ip_options_rcu * inet_opt; /* 784 8 */ $ pahole -C smc_sock vmlinux struct smc_sock { ... void (*clcsk_data_ready)(struct sock *); /* 784 8 */ The same issue for another field was reported before. [2][3] At that time, an ugly hack was suggested [4], but it makes both INET and SMC code error-prone and hard to change. Also, yet another variant was fixed by a hacky commit 98d4435efcbf3 ("net/smc: prevent NULL pointer dereference in txopt_get"). Instead of papering over the root cause by such hacks, we should not allow non-INET socket to reuse the INET infra. Let's add inet_sock as the first member of smc_sock. [0]: kvfree_call_rcu(): Double-freed call. rcu_head 000000006921da73 WARNING: CPU: 0 PID: 6718 at mm/slab_common.c:1956 kvfree_call_rcu+0x94/0x3f0 mm/slab_common.c:1955 Modules linked in: CPU: 0 UID: 0 PID: 6718 Comm: syz.0.17 Tainted: G W 6.16.0-rc4-syzkaller-g7482bb149b9f #0 PREEMPT Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kvfree_call_rcu+0x94/0x3f0 mm/slab_common.c:1955 lr : kvfree_call_rcu+0x94/0x3f0 mm/slab_common.c:1955 sp : ffff8000a03a7730 x29: ffff8000a03a7730 x28: 00000000fffffff5 x27: 1fffe000184823d3 x26: dfff800000000000 x25: ffff0000c2411e9e x24: ffff0000dd88da00 x23: ffff8000891ac9a0 x22: 00000000ffffffea x21: ffff8000891ac9a0 x20: ffff8000891ac9a0 x19: ffff80008afc2480 x18: 00000000ffffffff x17: 0000000000000000 x16: ffff80008ae642c8 x15: ffff700011ede14c x14: 1ffff00011ede14c x13: 0000000000000004 x12: ffffffffffffffff x11: ffff700011ede14c x10: 0000000000ff0100 x9 : 5fa3c1ffaf0ff000 x8 : 5fa3c1ffaf0ff000 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a03a7078 x4 : ffff80008f766c20 x3 : ffff80008054d360 x2 : 0000000000000000 x1 : 0000000000000201 x0 : 0000000000000000 Call trace: kvfree_call_rcu+0x94/0x3f0 mm/slab_common.c:1955 (P) cipso_v4_sock_setattr+0x2f0/0x3f4 net/ipv4/cipso_ipv4.c:1914 netlbl_sock_setattr+0x240/0x334 net/netlabel/netlabel_kapi.c:1000 smack_netlbl_add+0xa8/0x158 security/smack/smack_lsm.c:2581 smack_inode_setsecurity+0x378/0x430 security/smack/smack_lsm.c:2912 security_inode_setsecurity+0x118/0x3c0 security/security.c:2706 __vfs_setxattr_noperm+0x174/0x5c4 fs/xattr.c:251 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295 vfs_setxattr+0x158/0x2ac fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] file_setxattr+0x1b8/0x294 fs/xattr.c:646 path_setxattrat+0x2ac/0x320 fs/xattr.c:711 __do_sys_fsetxattr fs/xattr.c:761 [inline] __se_sys_fsetxattr fs/xattr.c:758 [inline] __arm64_sys_fsetxattr+0xc0/0xdc fs/xattr.c:758 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 [1]: Unable to handle kernel write to read-only memory at virtual address ffff8000891ac9a8 KASAN: probably user-memory-access in range [0x0000000448d64d40-0x0000000448d64d47] Mem abort info: ESR = 0x000000009600004e EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x0e: level 2 permission fault Data abort info: ISV = 0, ISS = 0x0000004e, ISS2 = 0x00000000 CM = 0, WnR = 1, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000207144000 [ffff8000891ac9a8] pgd=0000000000000000, p4d=100000020f950003, pud=100000020f951003, pmd=0040000201000781 Internal error: Oops: 000000009600004e [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 6946 Comm: syz.0.69 Not tainted 6.16.0-rc4-syzkaller-g7482bb149b9f #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kvfree_call_rcu+0x31c/0x3f0 mm/slab_common.c:1971 lr : add_ptr_to_bulk_krc_lock mm/slab_common.c:1838 [inline] lr : kvfree_call_rcu+0xfc/0x3f0 mm/slab_common.c:1963 sp : ffff8000a28a7730 x29: ffff8000a28a7730 x28: 00000000fffffff5 x27: 1fffe00018b09bb3 x26: 0000000000000001 x25: ffff80008f66e000 x24: ffff00019beaf498 x23: ffff00019beaf4c0 x22: 0000000000000000 x21: ffff8000891ac9a0 x20: ffff8000891ac9a0 x19: 0000000000000000 x18: 00000000ffffffff x17: ffff800093363000 x16: ffff80008052c6e4 x15: ffff700014514ecc x14: 1ffff00014514ecc x13: 0000000000000004 x12: ffffffffffffffff x11: ffff700014514ecc x10: 0000000000000001 x9 : 0000000000000001 x8 : ffff00019beaf7b4 x7 : ffff800080a94154 x6 : 0000000000000000 x5 : ffff8000935efa60 x4 : 0000000000000008 x3 : ffff80008052c7fc x2 : 0000000000000001 x1 : ffff8000891ac9a0 x0 : 0000000000000001 Call trace: kvfree_call_rcu+0x31c/0x3f0 mm/slab_common.c:1967 (P) cipso_v4_sock_setattr+0x2f0/0x3f4 net/ipv4/cipso_ipv4.c:1914 netlbl_sock_setattr+0x240/0x334 net/netlabel/netlabel_kapi.c:1000 smack_netlbl_add+0xa8/0x158 security/smack/smack_lsm.c:2581 smack_inode_setsecurity+0x378/0x430 security/smack/smack_lsm.c:2912 security_inode_setsecurity+0x118/0x3c0 security/security.c:2706 __vfs_setxattr_noperm+0x174/0x5c4 fs/xattr.c:251 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295 vfs_setxattr+0x158/0x2ac fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] file_setxattr+0x1b8/0x294 fs/xattr.c:646 path_setxattrat+0x2ac/0x320 fs/xattr.c:711 __do_sys_fsetxattr fs/xattr.c:761 [inline] __se_sys_fsetxattr fs/xattr.c:758 [inline] __arm64_sys_fsetxattr+0xc0/0xdc fs/xattr.c:758 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: aa1f03e2 52800023 97ee1e8d b4000195 (f90006b4) Fixes: d25a92ccae6b ("net/smc: Introduce IPPROTO_SMC") Reported-by: syzbot+40bf00346c3fe40f90f2@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/686d9b50.050a0220.1ffab7.0020.GAE@google.com/ Tested-by: syzbot+40bf00346c3fe40f90f2@syzkaller.appspotmail.com Reported-by: syzbot+f22031fad6cbe52c70e7@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/686da0f3.050a0220.1ffab7.0022.GAE@google.com/ Reported-by: syzbot+271fed3ed6f24600c364@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=271fed3ed6f24600c364 # [2] Link: https://lore.kernel.org/netdev/99f284be-bf1d-4bc4-a629-77b268522fff@huawei.com/ # [3] Link: https://lore.kernel.org/netdev/20250331081003.1503211-1-wangliang74@huawei.com/ # [4] Signed-off-by: Kuniyuki Iwashima Reviewed-by: D. Wythe Reviewed-by: Wang Liang Link: https://patch.msgid.link/20250711060808.2977529-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 7498159226772d66f150dd406be462d75964a366 Author: Miguel Ojeda Date: Sat Jul 12 18:01:03 2025 +0200 rust: use `#[used(compiler)]` to fix build and `modpost` with Rust >= 1.89.0 Starting with Rust 1.89.0 (expected 2025-08-07), the Rust compiler fails to build the `rusttest` target due to undefined references such as: kernel...-cgu.0:(.text....+0x116): undefined reference to `rust_helper_kunit_get_current_test' Moreover, tooling like `modpost` gets confused: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/nova/nova.o ERROR: modpost: missing MODULE_LICENSE() in drivers/gpu/nova-core/nova_core.o The reason behind both issues is that the Rust compiler will now [1] treat `#[used]` as `#[used(linker)]` instead of `#[used(compiler)]` for our targets. This means that the retain section flag (`R`, `SHF_GNU_RETAIN`) will be used and that they will be marked as `unique` too, with different IDs. In turn, that means we end up with undefined references that did not get discarded in `rusttest` and that multiple `.modinfo` sections are generated, which confuse tooling like `modpost` because they only expect one. Thus start using `#[used(compiler)]` to keep the previous behavior and to be explicit about what we want. Sadly, it is an unstable feature (`used_with_arg`) [2] -- we will talk to upstream Rust about it. The good news is that it has been available for a long time (Rust >= 1.60) [3]. The changes should also be fine for previous Rust versions, since they behave the same way as before [4]. Alternatively, we could use `#[no_mangle]` or `#[export_name = ...]` since those still behave like `#[used(compiler)]`, but of course it is not really what we want to express, and it requires other changes to avoid symbol conflicts. Cc: David Wood Cc: Wesley Wiser Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust/pull/140872 [1] Link: https://github.com/rust-lang/rust/issues/93798 [2] Link: https://github.com/rust-lang/rust/pull/91504 [3] Link: https://godbolt.org/z/sxzWTMfzW [4] Reviewed-by: Alice Ryhl Acked-by: Björn Roy Baron Link: https://lore.kernel.org/r/20250712160103.1244945-3-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit aa7b65c2a29e8b07057b13624102c6810597c0d5 Author: Miguel Ojeda Date: Sat Jul 12 18:01:02 2025 +0200 objtool/rust: add one more `noreturn` Rust function for Rust 1.89.0 Starting with Rust 1.89.0 (expected 2025-08-07), under `CONFIG_RUST_DEBUG_ASSERTIONS=y`, `objtool` may report: rust/kernel.o: warning: objtool: _R..._6kernel4pageNtB5_4Page8read_raw() falls through to next function _R..._6kernel4pageNtB5_4Page9write_raw() (and many others) due to calls to the `noreturn` symbol: core::panicking::panic_nounwind_fmt Thus add the mangled one to the list so that `objtool` knows it is actually `noreturn`. See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). Cc: Josh Poimboeuf Cc: Peter Zijlstra Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250712160103.1244945-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit cb345f954eacd162601e7d07ca2f0f0a17b54ee3 Author: Philipp Stanner Date: Wed Jul 9 12:29:58 2025 +0200 drm/panfrost: Fix scheduler workqueue bug When the GPU scheduler was ported to using a struct for its initialization parameters, it was overlooked that panfrost creates a distinct workqueue for timeout handling. The pointer to this new workqueue is not initialized to the struct, resulting in NULL being passed to the scheduler, which then uses the system_wq for timeout handling. Set the correct workqueue to the init args struct. Cc: stable@vger.kernel.org # 6.15+ Fixes: 796a9f55a8d1 ("drm/sched: Use struct for drm_sched_init() params") Reported-by: Tvrtko Ursulin Closes: https://lore.kernel.org/dri-devel/b5d0921c-7cbf-4d55-aa47-c35cd7861c02@igalia.com/ Signed-off-by: Philipp Stanner Reviewed-by: Tvrtko Ursulin Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250709102957.100849-2-phasta@kernel.org commit 08ca1409c4fa37ec93de08b9963390ed68a5ae8c Author: Pavel Begunkov Date: Mon Jul 14 11:57:23 2025 +0100 io_uring/zcrx: disallow user selected dmabuf offset and size zcrx shouldn't be so frivolous about cutting a dmabuf sgtable and taking a subrange into it, the dmabuf layer might be not expecting that. It shouldn't be a problem for now, but since the zcrx dmabuf support is new and there shouldn't be any real users, let's play safe and reject user provided ranges into dmabufs. Also, it shouldn't be needed as userspace should size them appropriately. Fixes: a5c98e9424573 ("io_uring/zcrx: dmabuf backed zerocopy receive") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/be899f1afed32053eb2e2079d0da241514674aca.1752443579.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dd8e34afd6709cb2f9c0e63340f567e6c066ed8e Author: John Garry Date: Mon Jun 30 16:21:53 2025 +0000 nvme: fix endianness of command word prints in nvme_log_err_passthru() The command word members of struct nvme_common_command are __le32 type, so use helper le32_to_cpu() to read them properly. Fixes: 9f079dda1433 ("nvme: allow passthru cmd error logging") Signed-off-by: John Garry Reviewed-by: Alan Adamson Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 80d7762e0a42307ee31b21f090e21349b98c14f6 Author: Zheng Qixing Date: Tue Jul 1 15:17:17 2025 +0800 nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() When inserting a namespace into the controller's namespace list, the function uses list_add_rcu() when the namespace is inserted in the middle of the list, but falls back to a regular list_add() when adding at the head of the list. This inconsistency could lead to race conditions during concurrent access, as users might observe a partially updated list. Fix this by consistently using list_add_rcu() in both code paths to ensure proper RCU protection throughout the entire function. Fixes: be647e2c76b2 ("nvme: use srcu for iterating namespace list") Signed-off-by: Zheng Qixing Signed-off-by: Christoph Hellwig commit 710505212e3272396394f8cf78e3ddfd05df3f22 Author: Cheng Ming Lin Date: Mon Jul 14 11:10:23 2025 +0800 spi: Add check for 8-bit transfer with 8 IO mode support The current SPI framework does not verify if the SPI device supports 8 IO mode when doing an 8-bit transfer. This patch adds a check to ensure that if the transfer tx_nbits or rx_nbits is 8, the SPI mode must support 8 IO. If not, an error is returned, preventing undefined behavior. Fixes: d6a711a898672 ("spi: Fix OCTAL mode support") Cc: stable@vger.kernel.org Signed-off-by: Cheng Ming Lin Link: https://patch.msgid.link/20250714031023.504752-1-linchengming884@gmail.com Signed-off-by: Mark Brown commit 36a686c0784fcccdaa4f38b498a9ef0d42ea7cb8 Author: Phil Sutter Date: Thu Jul 10 18:43:42 2025 +0200 Revert "netfilter: nf_tables: Add notifications for hook changes" This reverts commit 465b9ee0ee7bc268d7f261356afd6c4262e48d82. Such notifications fit better into core or nfnetlink_hook code, following the NFNL_MSG_HOOK_GET message format. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 6ac86ac74e3a0608424240cc1ce813ad6e8a73dd Author: Florian Westphal Date: Mon Jul 7 22:32:44 2025 +0200 netfilter: nf_tables: hide clash bit from userspace Its a kernel implementation detail, at least at this time: We can later decide to revert this patch if there is a compelling reason, but then we should also remove the ifdef that prevents exposure of ip_conntrack_status enum IPS_NAT_CLASH value in the uapi header. Clash entries are not included in dumps (true for both old /proc and ctnetlink) either. So for now exclude the clash bit when dumping. Fixes: 7e5c6aa67e6f ("netfilter: nf_tables: add packets conntrack state to debug trace info") Link: https://lore.kernel.org/netfilter-devel/aGwf3dCggwBlRKKC@strlen.de/ Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6dc2fae7f8a2384304ef48b7cdcb988222102a54 Author: Florian Westphal Date: Tue Jul 1 14:41:37 2025 +0200 selftests: netfilter: nft_concat_range.sh: send packets to empty set The selftest doesn't cover this error path: scratch = *raw_cpu_ptr(m->scratch); if (unlikely(!scratch)) { // here cover this too. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit aa085ea1a68d27d34f14db1f4026c35aa6b1ecc8 Author: Florian Westphal Date: Fri Jun 27 16:27:52 2025 +0200 selftests: netfilter: conntrack_resize.sh: also use udpclash tool Previous patch added a new clash resolution test case. Also use this during conntrack resize stress test in addition to icmp ping flood. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 78a58836358783995884784cb20021db6f6a29df Author: Florian Westphal Date: Fri Jun 27 16:27:51 2025 +0200 selftests: netfilter: add conntrack clash resolution test case Add a dedicated test to exercise conntrack clash resolution path. Test program emits 128 identical udp packets in parallel, then reads back replies from socat echo server. Also check (via conntrack -S) that the clash path was hit at least once. Due to the racy nature of the test its possible that despite the threaded program all packets were processed in-order or on same cpu, emit a SKIP warning in this case. Two tests are added: - one to test the simpler, non-nat case - one to exercise clash resolution where packets might have different nat transformations attached to them. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b08590559f4b6954f1bf2510445aba346044c91b Author: Florian Westphal Date: Fri Jun 27 16:27:50 2025 +0200 selftests: netfilter: conntrack_resize.sh: extend resize test Extend the resize test: - continuously dump table both via /proc and ctnetlink interfaces while table is resized in a loop. - if socat is available, send udp packets in additon to ping requests. - increase/decrease the icmp and udp timeouts while resizes are happening. This makes sure we also exercise the 'ct has expired' check that happens on conntrack lookup. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 40b1c2f9b299295ed0482e1fee6f46521e6e79e5 Author: Richard Fitzgerald Date: Mon Jul 14 12:01:54 2025 +0100 ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX The Lenovo Yoga Book 9i GenX has the wrong values in the cirrus,dev-index _DSD property. Add a fixup for this model to ignore the property and hardcode the index from the I2C bus address. The error in the cirrus,dev-index property would prevent the second amp instance from probing. The component binding would never see all the required instances and so there would not be a binding between patch_realtek.c and the cs35l56 driver. Signed-off-by: Richard Fitzgerald Reported-by: Brian Howard Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220228 Link: https://patch.msgid.link/20250714110154.204740-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 621a88dbfe9006c318a0cafbd12e677ccfe006e7 Author: Daniel Lezcano Date: Wed Jul 9 17:47:28 2025 +0200 cpuidle: psci: Fix cpuhotplug routine with PREEMPT_RT=y Currently cpu hotplug with the PREEMPT_RT option set in the kernel is not supported because the underlying generic power domain functions used in the cpu hotplug callbacks are incompatible from a lock point of view. This situation prevents the suspend to idle to reach the deepest idle state for the "cluster" as identified in the undermentioned commit. Use the compatible ones when PREEMPT_RT is enabled and remove the boolean disabling the hotplug callbacks with this option. With this change the platform can reach the deepest idle state allowing at suspend time to consume less power. Tested-on Lenovo T14s with the following script: echo 0 > /sys/devices/system/cpu/cpu3/online BEFORE=$(cat /sys/kernel/debug/pm_genpd/power-domain-cpu-cluster0/idle_states | grep S0 | awk '{ print $3 }') ; rtcwake -s 1 -m mem; AFTER=$(cat /sys/kernel/debug/pm_genpd/power-domain-cpu-cluster0/idle_states | grep S0 | awk '{ print $3 }'); if [ $BEFORE -lt $AFTER ]; then echo "Test successful" else echo "Test failed" fi echo 1 > /sys/devices/system/cpu/cpu3/online Fixes: 1c4b2932bd62 ("cpuidle: psci: Enable the hierarchical topology for s2idle on PREEMPT_RT") Cc: Raghavendra Kakarla Signed-off-by: Daniel Lezcano Reviewed-by: Sudeep Holla Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250709154728.733920-1-daniel.lezcano@linaro.org Signed-off-by: Ulf Hansson commit 4722727373533b53489b66d3436b50ac156f23bf Author: Jackie Dong Date: Mon Jul 14 17:46:55 2025 +0800 ALSA: hda/realtek: Support mute LED for Yoga with ALC287 Support mute LED on keyboard for Lenovo Yoga series products with Realtek ALC287 chipset. Tested on Lenovo Slim Pro 7 14APH8. [ slight comment cleanup by tiwai ] Signed-off-by: Jackie Dong Link: https://patch.msgid.link/20250714094655.4657-1-xy-jackie@139.com Signed-off-by: Takashi Iwai commit 86ab0c10090b26e789b7bf477d4b673b5e18e55b Merge: fdfe0133473a52 89635eae076cd8 Author: Christian Brauner Date: Mon Jul 14 11:05:07 2025 +0200 Merge patch series "netfs: Fix use of fscache with ceph" David Howells says: Here are a couple of patches that fix the use of fscaching with ceph: (1) Fix the read collector to mark the write request that it creates to copy data to the cache with NETFS_RREQ_OFFLOAD_COLLECTION so that it will run the write collector on a workqueue as it's meant to run in the background and the app isn't going to wait for it. (2) Fix the read collector to wake up the copy-to-cache write request after it sets NETFS_RREQ_ALL_QUEUED if the write request doesn't have any subrequests left on it. ALL_QUEUED indicates that there won't be any more subreqs coming and the collector should clean up - except that an event is needed to trigger that, but it only gets events from subreq termination and so the last event can beat us to setting ALL_QUEUED. * patches from https://lore.kernel.org/20250711151005.2956810-1-dhowells@redhat.com: netfs: Fix race between cache write completion and ALL_QUEUED being set netfs: Fix copy-to-cache so that it performs collection with ceph+fscache Link: https://lore.kernel.org/20250711151005.2956810-1-dhowells@redhat.com Signed-off-by: Christian Brauner commit 89635eae076cd8eaa5cb752f66538c9dc6c9fdc3 Author: David Howells Date: Fri Jul 11 16:10:01 2025 +0100 netfs: Fix race between cache write completion and ALL_QUEUED being set When netfslib is issuing subrequests, the subrequests start processing immediately and may complete before we reach the end of the issuing function. At the end of the issuing function we set NETFS_RREQ_ALL_QUEUED to indicate to the collector that we aren't going to issue any more subreqs and that it can do the final notifications and cleanup. Now, this isn't a problem if the request is synchronous (NETFS_RREQ_OFFLOAD_COLLECTION is unset) as the result collection will be done in-thread and we're guaranteed an opportunity to run the collector. However, if the request is asynchronous, collection is primarily triggered by the termination of subrequests queuing it on a workqueue. Now, a race can occur here if the app thread sets ALL_QUEUED after the last subrequest terminates. This can happen most easily with the copy2cache code (as used by Ceph) where, in the collection routine of a read request, an asynchronous write request is spawned to copy data to the cache. Folios are added to the write request as they're unlocked, but there may be a delay before ALL_QUEUED is set as the write subrequests may complete before we get there. If all the write subreqs have finished by the ALL_QUEUED point, no further events happen and the collection never happens, leaving the request hanging. Fix this by queuing the collector after setting ALL_QUEUED. This is a bit heavy-handed and it may be sufficient to do it only if there are no extant subreqs. Also add a tracepoint to cross-reference both requests in a copy-to-request operation and add a trace to the netfs_rreq tracepoint to indicate the setting of ALL_QUEUED. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reported-by: Max Kellermann Link: https://lore.kernel.org/r/CAKPOu+8z_ijTLHdiCYGU_Uk7yYD=shxyGLwfe-L7AV3DhebS3w@mail.gmail.com/ Signed-off-by: David Howells Link: https://lore.kernel.org/20250711151005.2956810-3-dhowells@redhat.com Reviewed-by: Paulo Alcantara (Red Hat) cc: Paulo Alcantara cc: Viacheslav Dubeyko cc: Alex Markuze cc: Ilya Dryomov cc: netfs@lists.linux.dev cc: ceph-devel@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: stable@vger.kernel.org Signed-off-by: Christian Brauner commit 4c238e30774e3022a505fa54311273add7570f13 Author: David Howells Date: Fri Jul 11 16:10:00 2025 +0100 netfs: Fix copy-to-cache so that it performs collection with ceph+fscache The netfs copy-to-cache that is used by Ceph with local caching sets up a new request to write data just read to the cache. The request is started and then left to look after itself whilst the app continues. The request gets notified by the backing fs upon completion of the async DIO write, but then tries to wake up the app because NETFS_RREQ_OFFLOAD_COLLECTION isn't set - but the app isn't waiting there, and so the request just hangs. Fix this by setting NETFS_RREQ_OFFLOAD_COLLECTION which causes the notification from the backing filesystem to put the collection onto a work queue instead. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reported-by: Max Kellermann Link: https://lore.kernel.org/r/CAKPOu+8z_ijTLHdiCYGU_Uk7yYD=shxyGLwfe-L7AV3DhebS3w@mail.gmail.com/ Signed-off-by: David Howells Link: https://lore.kernel.org/20250711151005.2956810-2-dhowells@redhat.com Reviewed-by: Paulo Alcantara (Red Hat) cc: Paulo Alcantara cc: Viacheslav Dubeyko cc: Alex Markuze cc: Ilya Dryomov cc: netfs@lists.linux.dev cc: ceph-devel@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: stable@vger.kernel.org Signed-off-by: Christian Brauner commit 36569780b0d64de283f9d6c2195fd1a43e221ee8 Author: Aruna Ramakrishna Date: Wed Jul 9 17:33:28 2025 +0000 sched: Change nr_uninterruptible type to unsigned long The commit e6fe3f422be1 ("sched: Make multiple runqueue task counters 32-bit") changed nr_uninterruptible to an unsigned int. But the nr_uninterruptible values for each of the CPU runqueues can grow to large numbers, sometimes exceeding INT_MAX. This is valid, if, over time, a large number of tasks are migrated off of one CPU after going into an uninterruptible state. Only the sum of all nr_interruptible values across all CPUs yields the correct result, as explained in a comment in kernel/sched/loadavg.c. Change the type of nr_uninterruptible back to unsigned long to prevent overflows, and thus the miscalculation of load average. Fixes: e6fe3f422be1 ("sched: Make multiple runqueue task counters 32-bit") Signed-off-by: Aruna Ramakrishna Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250709173328.606794-1-aruna.ramakrishna@oracle.com commit fdfe0133473a528e3f5da69c35419ce6711d6b89 Author: Al Viro Date: Sat Jul 12 18:18:43 2025 +0100 fix a leak in fcntl_dirnotify() [into #fixes, unless somebody objects] Lifetime of new_dn_mark is controlled by that of its ->fsn_mark, pointed to by new_fsn_mark. Unfortunately, a failure exit had been inserted between the allocation of new_dn_mark and the call of fsnotify_init_mark(), ending up with a leak. Fixes: 1934b212615d "file: reclaim 24 bytes from f_owner" Signed-off-by: Al Viro Link: https://lore.kernel.org/20250712171843.GB1880847@ZenIV Signed-off-by: Christian Brauner commit a8780906ca2604c9d5128507e34285043b943410 Merge: d7b8f8e20813f0 6aae87fe7f180c Author: Wolfram Sang Date: Mon Jul 14 09:02:25 2025 +0200 Merge tag 'i2c-host-fixes-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.16-rc6 omap: add missing error check and fix PM disable in probe error path. stm32: unmap DMA buffer on transfer failure and use correct device when mapping and unmapping during transfers. commit 28712d6ed32028b0f2e0defe6681411496971ca3 Merge: a90b2a1aaacbcf 2a198bbec6913a Author: Steffen Klassert Date: Mon Jul 14 08:59:48 2025 +0200 Merge branch 'ipsec: fix splat due to ipcomp fallback tunnel' Sabrina Dubroca says: ==================== IPcomp tunnel states have an associated fallback tunnel, a keep a reference on the corresponding xfrm_state, to allow deleting that extra state when it's not needed anymore. These states cause issues during netns deletion. Commit f75a2804da39 ("xfrm: destroy xfrm_state synchronously on net exit path") tried to address these problems but doesn't fully solve them, and slowed down netns deletion by adding one synchronize_rcu per deleted state. The first patch solves the problem by moving the fallback state deletion earlier (when we delete the user state, rather than at destruction), then we can revert the previous fix. ==================== Signed-off-by: Steffen Klassert commit 83898e4a858387c88cd7456f713cb8fd49440cf9 Author: Bharath SM Date: Tue Jul 1 00:23:03 2025 +0530 smb: invalidate and close cached directory when creating child entries When a parent lease key is passed to the server during a create operation while holding a directory lease, the server may not send a lease break to the client. In such cases, it becomes the client’s responsibility to ensure cache consistency. This led to a problem where directory listings (e.g., `ls` or `readdir`) could return stale results after a new file is created. eg: ls /mnt/share/ touch /mnt/share/file1 ls /mnt/share/ In this scenario, the final `ls` may not show `file1` due to the stale directory cache. For now, fix this by marking the cached directory as invalid if using the parent lease key during create, and explicitly closing the cached directory after successful file creation. Fixes: 037e1bae588eacf ("smb: client: use ParentLeaseKey in cifs_do_create") Signed-off-by: Bharath SM Signed-off-by: Steve French commit b220bed63330c0e1733dc06ea8e75d5b9962b6b6 Author: Wang Zhaolong Date: Sat Jul 5 10:51:18 2025 +0800 smb: client: fix use-after-free in crypt_message when using async crypto The CVE-2024-50047 fix removed asynchronous crypto handling from crypt_message(), assuming all crypto operations are synchronous. However, when hardware crypto accelerators are used, this can cause use-after-free crashes: crypt_message() // Allocate the creq buffer containing the req creq = smb2_get_aead_req(..., &req); // Async encryption returns -EINPROGRESS immediately rc = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); // Free creq while async operation is still in progress kvfree_sensitive(creq, ...); Hardware crypto modules often implement async AEAD operations for performance. When crypto_aead_encrypt/decrypt() returns -EINPROGRESS, the operation completes asynchronously. Without crypto_wait_req(), the function immediately frees the request buffer, leading to crashes when the driver later accesses the freed memory. This results in a use-after-free condition when the hardware crypto driver later accesses the freed request structure, leading to kernel crashes with NULL pointer dereferences. The issue occurs because crypto_alloc_aead() with mask=0 doesn't guarantee synchronous operation. Even without CRYPTO_ALG_ASYNC in the mask, async implementations can be selected. Fix by restoring the async crypto handling: - DECLARE_CRYPTO_WAIT(wait) for completion tracking - aead_request_set_callback() for async completion notification - crypto_wait_req() to wait for operation completion This ensures the request buffer isn't freed until the crypto operation completes, whether synchronous or asynchronous, while preserving the CVE-2024-50047 fix. Fixes: b0abcd65ec54 ("smb: client: fix UAF in async decryption") Link: https://lore.kernel.org/all/8b784a13-87b0-4131-9ff9-7a8993538749@huaweicloud.com/ Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Wang Zhaolong Signed-off-by: Steve French commit 705c79101ccf9edea5a00d761491a03ced314210 Author: Wang Zhaolong Date: Mon Jul 7 09:09:26 2025 +0800 smb: client: fix use-after-free in cifs_oplock_break A race condition can occur in cifs_oplock_break() leading to a use-after-free of the cinode structure when unmounting: cifs_oplock_break() _cifsFileInfo_put(cfile) cifsFileInfo_put_final() cifs_sb_deactive() [last ref, start releasing sb] kill_sb() kill_anon_super() generic_shutdown_super() evict_inodes() dispose_list() evict() destroy_inode() call_rcu(&inode->i_rcu, i_callback) spin_lock(&cinode->open_file_lock) <- OK [later] i_callback() cifs_free_inode() kmem_cache_free(cinode) spin_unlock(&cinode->open_file_lock) <- UAF cifs_done_oplock_break(cinode) <- UAF The issue occurs when umount has already released its reference to the superblock. When _cifsFileInfo_put() calls cifs_sb_deactive(), this releases the last reference, triggering the immediate cleanup of all inodes under RCU. However, cifs_oplock_break() continues to access the cinode after this point, resulting in use-after-free. Fix this by holding an extra reference to the superblock during the entire oplock break operation. This ensures that the superblock and its inodes remain valid until the oplock break completes. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220309 Fixes: b98749cac4a6 ("CIFS: keep FileInfo handle live during oplock break") Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Wang Zhaolong Signed-off-by: Steve French commit b640daa2822a39ff76e70200cb2b7b892b896dce Author: Kuniyuki Iwashima Date: Fri Jul 11 18:21:19 2025 +0000 rpl: Fix use-after-free in rpl_do_srh_inline(). Running lwt_dst_cache_ref_loop.sh in selftest with KASAN triggers the splat below [0]. rpl_do_srh_inline() fetches ipv6_hdr(skb) and accesses it after skb_cow_head(), which is illegal as the header could be freed then. Let's fix it by making oldhdr to a local struct instead of a pointer. [0]: [root@fedora net]# ./lwt_dst_cache_ref_loop.sh ... TEST: rpl (input) [ 57.631529] ================================================================== BUG: KASAN: slab-use-after-free in rpl_do_srh_inline.isra.0 (net/ipv6/rpl_iptunnel.c:174) Read of size 40 at addr ffff888122bf96d8 by task ping6/1543 CPU: 50 UID: 0 PID: 1543 Comm: ping6 Not tainted 6.16.0-rc5-01302-gfadd1e6231b1 #23 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:122) print_report (mm/kasan/report.c:409 mm/kasan/report.c:521) kasan_report (mm/kasan/report.c:221 mm/kasan/report.c:636) kasan_check_range (mm/kasan/generic.c:175 (discriminator 1) mm/kasan/generic.c:189 (discriminator 1)) __asan_memmove (mm/kasan/shadow.c:94 (discriminator 2)) rpl_do_srh_inline.isra.0 (net/ipv6/rpl_iptunnel.c:174) rpl_input (net/ipv6/rpl_iptunnel.c:201 net/ipv6/rpl_iptunnel.c:282) lwtunnel_input (net/core/lwtunnel.c:459) ipv6_rcv (./include/net/dst.h:471 (discriminator 1) ./include/net/dst.h:469 (discriminator 1) net/ipv6/ip6_input.c:79 (discriminator 1) ./include/linux/netfilter.h:317 (discriminator 1) ./include/linux/netfilter.h:311 (discriminator 1) net/ipv6/ip6_input.c:311 (discriminator 1)) __netif_receive_skb_one_core (net/core/dev.c:5967) process_backlog (./include/linux/rcupdate.h:869 net/core/dev.c:6440) __napi_poll.constprop.0 (net/core/dev.c:7452) net_rx_action (net/core/dev.c:7518 net/core/dev.c:7643) handle_softirqs (kernel/softirq.c:579) do_softirq (kernel/softirq.c:480 (discriminator 20)) __local_bh_enable_ip (kernel/softirq.c:407) __dev_queue_xmit (net/core/dev.c:4740) ip6_finish_output2 (./include/linux/netdevice.h:3358 ./include/net/neighbour.h:526 ./include/net/neighbour.h:540 net/ipv6/ip6_output.c:141) ip6_finish_output (net/ipv6/ip6_output.c:215 net/ipv6/ip6_output.c:226) ip6_output (./include/linux/netfilter.h:306 net/ipv6/ip6_output.c:248) ip6_send_skb (net/ipv6/ip6_output.c:1983) rawv6_sendmsg (net/ipv6/raw.c:588 net/ipv6/raw.c:918) __sys_sendto (net/socket.c:714 (discriminator 1) net/socket.c:729 (discriminator 1) net/socket.c:2228 (discriminator 1)) __x64_sys_sendto (net/socket.c:2231) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) RIP: 0033:0x7f68cffb2a06 Code: 5d e8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 75 19 83 e2 39 83 fa 08 75 11 e8 26 ff ff ff 66 0f 1f 44 00 00 48 8b 45 10 0f 05 <48> 8b 5d f8 c9 c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 e5 48 83 ec 08 RSP: 002b:00007ffefb7c53d0 EFLAGS: 00000202 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000564cd69f10a0 RCX: 00007f68cffb2a06 RDX: 0000000000000040 RSI: 0000564cd69f10a4 RDI: 0000000000000003 RBP: 00007ffefb7c53f0 R08: 0000564cd6a032ac R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000202 R12: 0000564cd69f10a4 R13: 0000000000000040 R14: 00007ffefb7c66e0 R15: 0000564cd69f10a0 Allocated by task 1543: kasan_save_stack (mm/kasan/common.c:48) kasan_save_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1)) __kasan_slab_alloc (mm/kasan/common.c:319 mm/kasan/common.c:345) kmem_cache_alloc_node_noprof (./include/linux/kasan.h:250 mm/slub.c:4148 mm/slub.c:4197 mm/slub.c:4249) kmalloc_reserve (net/core/skbuff.c:581 (discriminator 88)) __alloc_skb (net/core/skbuff.c:669) __ip6_append_data (net/ipv6/ip6_output.c:1672 (discriminator 1)) ip6_append_data (net/ipv6/ip6_output.c:1859) rawv6_sendmsg (net/ipv6/raw.c:911) __sys_sendto (net/socket.c:714 (discriminator 1) net/socket.c:729 (discriminator 1) net/socket.c:2228 (discriminator 1)) __x64_sys_sendto (net/socket.c:2231) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Freed by task 1543: kasan_save_stack (mm/kasan/common.c:48) kasan_save_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1)) kasan_save_free_info (mm/kasan/generic.c:579 (discriminator 1)) __kasan_slab_free (mm/kasan/common.c:271) kmem_cache_free (mm/slub.c:4643 (discriminator 3) mm/slub.c:4745 (discriminator 3)) pskb_expand_head (net/core/skbuff.c:2274) rpl_do_srh_inline.isra.0 (net/ipv6/rpl_iptunnel.c:158 (discriminator 1)) rpl_input (net/ipv6/rpl_iptunnel.c:201 net/ipv6/rpl_iptunnel.c:282) lwtunnel_input (net/core/lwtunnel.c:459) ipv6_rcv (./include/net/dst.h:471 (discriminator 1) ./include/net/dst.h:469 (discriminator 1) net/ipv6/ip6_input.c:79 (discriminator 1) ./include/linux/netfilter.h:317 (discriminator 1) ./include/linux/netfilter.h:311 (discriminator 1) net/ipv6/ip6_input.c:311 (discriminator 1)) __netif_receive_skb_one_core (net/core/dev.c:5967) process_backlog (./include/linux/rcupdate.h:869 net/core/dev.c:6440) __napi_poll.constprop.0 (net/core/dev.c:7452) net_rx_action (net/core/dev.c:7518 net/core/dev.c:7643) handle_softirqs (kernel/softirq.c:579) do_softirq (kernel/softirq.c:480 (discriminator 20)) __local_bh_enable_ip (kernel/softirq.c:407) __dev_queue_xmit (net/core/dev.c:4740) ip6_finish_output2 (./include/linux/netdevice.h:3358 ./include/net/neighbour.h:526 ./include/net/neighbour.h:540 net/ipv6/ip6_output.c:141) ip6_finish_output (net/ipv6/ip6_output.c:215 net/ipv6/ip6_output.c:226) ip6_output (./include/linux/netfilter.h:306 net/ipv6/ip6_output.c:248) ip6_send_skb (net/ipv6/ip6_output.c:1983) rawv6_sendmsg (net/ipv6/raw.c:588 net/ipv6/raw.c:918) __sys_sendto (net/socket.c:714 (discriminator 1) net/socket.c:729 (discriminator 1) net/socket.c:2228 (discriminator 1)) __x64_sys_sendto (net/socket.c:2231) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) The buggy address belongs to the object at ffff888122bf96c0 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 24 bytes inside of freed 704-byte region [ffff888122bf96c0, ffff888122bf9980) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x122bf8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888101fc0a00 ffffea000464dc00 0000000000000002 raw: 0000000000000000 0000000080270027 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888101fc0a00 ffffea000464dc00 0000000000000002 head: 0000000000000000 0000000080270027 00000000f5000000 0000000000000000 head: 0200000000000003 ffffea00048afe01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888122bf9580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888122bf9600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888122bf9680: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff888122bf9700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888122bf9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: a7a29f9c361f8 ("net: ipv6: add rpl sr tunnel") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 30792947c6f33175e53ae3b8de3f6971c26505b9 Author: Kent Overstreet Date: Thu Jul 10 16:27:29 2025 -0400 bcachefs: io_read: remove from async obj list in rbio_done() Previously, only split rbios allocated in io_read.c would be removed from the async obj list. Signed-off-by: Kent Overstreet commit e837b59f8b411b5baf5e3de7a5aea10b1c545a63 Author: Arnd Bergmann Date: Wed Jul 9 16:56:07 2025 +0200 ASoC: Intel: fix SND_SOC_SOF dependencies It is currently possible to configure a kernel with all Intel SoC configs as loadable modules, but the board config as built-in. This causes a link failure in the reference to the snd_soc_sof.ko module: x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_hw_params': sof_rt5682.c:(.text+0x1f9): undefined reference to `sof_dai_get_mclk' x86_64-linux-ld: sof_rt5682.c:(.text+0x234): undefined reference to `sof_dai_get_bclk' x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_codec_init': sof_rt5682.c:(.text+0x3e0): undefined reference to `sof_dai_get_mclk' x86_64-linux-ld: sound/soc/intel/boards/sof_cs42l42.o: in function `sof_cs42l42_hw_params': sof_cs42l42.c:(.text+0x2a): undefined reference to `sof_dai_get_bclk' x86_64-linux-ld: sound/soc/intel/boards/sof_nau8825.o: in function `sof_nau8825_hw_params': sof_nau8825.c:(.text+0x7f): undefined reference to `sof_dai_get_bclk' x86_64-linux-ld: sound/soc/intel/boards/sof_da7219.o: in function `da7219_codec_init': sof_da7219.c:(.text+0xbf): undefined reference to `sof_dai_get_mclk' x86_64-linux-ld: sound/soc/intel/boards/sof_maxim_common.o: in function `max_98373_hw_params': sof_maxim_common.c:(.text+0x6f9): undefined reference to `sof_dai_get_tdm_slots' x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1015_hw_params': sof_realtek_common.c:(.text+0x54c): undefined reference to `sof_dai_get_bclk' x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1308_hw_params': sof_realtek_common.c:(.text+0x702): undefined reference to `sof_dai_get_mclk' x86_64-linux-ld: sound/soc/intel/boards/sof_cirrus_common.o: in function `cs35l41_hw_params': sof_cirrus_common.c:(.text+0x2f): undefined reference to `sof_dai_get_bclk' Add an optional dependency on SND_SOC_SOF_INTEL_COMMON, to ensure that whenever the SOF support is in a loadable module, none of the board code can be built-in. This may be be a little heavy-handed, but I also don't see a reason why one would want the boards to be built-in but not the SoC, so it shouldn't actually cause any usability problems. Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250709145626.64125-1-arnd@kernel.org Signed-off-by: Mark Brown commit d235538723e6c95f354b49a8c4760be43c234579 Author: Oder Chiou Date: Fri Jul 11 11:48:13 2025 +0800 ASoC: rt5660: Fix the dmic data source from GPIO2 The patch fixes an issue with the dmic data pin connected to GPIO2. Signed-off-by: Oder Chiou Link: https://patch.msgid.link/20250711034813.3278989-1-oder_chiou@realtek.com Signed-off-by: Mark Brown commit 347e9f5043c89695b01e66b3ed111755afcf1911 Author: Linus Torvalds Date: Sun Jul 13 14:25:58 2025 -0700 Linux 6.16-rc6 commit 3cd752194e2ec2573d0e740f4a1edbfcc28257f5 Merge: 5d5d62298b8b50 a42b4dcc4f9f30 Author: Linus Torvalds Date: Sun Jul 13 11:37:35 2025 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Fixes for a few clk drivers and bindings: - Add a missing property to the Mediatek MT8188 clk binding to keep binding checks happy - Avoid an OOB by setting the correct number of parents in dispmix_csr_clk_dev_data - Allocate clk_hw structs early in probe to avoid an ordering issue where clk_parent_data points to an unallocated clk_hw when the child clk is registered before the parent clk in the SCMI clk driver * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: dt-bindings: clock: mediatek: Add #reset-cells property for MT8188 clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data clk: scmi: Handle case where child clocks are initialized before their parents commit 5d5d62298b8b5017d6677af28e021f7ad13f7a62 Merge: 41998eeb29a187 cb73e53f7c0700 Author: Linus Torvalds Date: Sun Jul 13 10:41:19 2025 -0700 Merge tag 'x86_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Update Kirill's email address - Allow hugetlb PMD sharing only on 64-bit as it doesn't make a whole lotta sense on 32-bit - Add fixes for a misconfigured AMD Zen2 client which wasn't even supposed to run Linux * tag 'x86_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Update Kirill Shutemov's email address for TDX x86/mm: Disable hugetlb page table sharing on 32-bit x86/CPU/AMD: Disable INVLPGB on Zen2 x86/rdrand: Disable RDSEED on AMD Cyan Skillfish commit 41998eeb29a187d66eec7699741cc278ce53d65b Merge: 0a197b757690ec a8b289f0f2dcba Author: Linus Torvalds Date: Sun Jul 13 10:36:55 2025 -0700 Merge tag 'irq_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Fix a case of recursive locking in the MSI code - Fix a randconfig build failure in armada-370-xp irqchip * tag 'irq_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-msi-lib: Fix build with PCI disabled PCI/MSI: Prevent recursive locking in pci_msix_write_tph_tag() commit 0a197b757690ecdd60601bbc977b66bf38f2297d Merge: 3f31a806a62e44 3da6bb419750f3 Author: Linus Torvalds Date: Sun Jul 13 10:34:47 2025 -0700 Merge tag 'perf_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Borislav Petkov: - Prevent perf_sigtrap() from observing an exiting task and warning about it * tag 'perf_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix WARN in perf_sigtrap() commit 2aa4ad626ee7f817a8f4715a47b318cfdc1714c9 Author: Steffen Bätz Date: Sat Jul 12 19:17:27 2025 +0100 nvmem: imx-ocotp: fix MAC address byte length The commit "13bcd440f2ff nvmem: core: verify cell's raw_len" caused an extension of the "mac-address" cell from 6 to 8 bytes due to word_size of 4 bytes. This led to a required byte swap of the full buffer length, which caused truncation of the mac-address when read. Previously, the mac-address was incorrectly truncated from 70:B3:D5:14:E9:0E to 00:00:70:B3:D5:14. Fix the issue by swapping only the first 6 bytes to correctly pass the mac-address to the upper layers. Fixes: 13bcd440f2ff ("nvmem: core: verify cell's raw_len") Cc: stable@vger.kernel.org Signed-off-by: Steffen Bätz Tested-by: Alexander Stein Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250712181729.6495-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5724ff190b22bd04fcfd7287a39c6e5494e40f0b Author: Minas Harutyunyan Date: Mon Jul 7 09:54:19 2025 +0000 usb: dwc2: gadget: Fix enter to hibernation for UTMI+ PHY For UTMI+ PHY, according to programming guide, first should be set PMUACTV bit then STOPPCLK bit. Otherwise, when the device issues Remote Wakeup, then host notices disconnect instead. For ULPI PHY, above mentioned bits must be set in reversed order: STOPPCLK then PMUACTV. Fixes: 4483ef3c1685 ("usb: dwc2: Add hibernation updates for ULPI PHY") Cc: stable Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/692110d3c3d9bb2a91cedf24528a7710adc55452.1751881374.git.Minas.Harutyunyan@synopsys.com Signed-off-by: Greg Kroah-Hartman commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 Author: Krishna Kurapati Date: Wed Jul 9 18:59:00 2025 +0530 usb: dwc3: qcom: Don't leave BCR asserted Leaving the USB BCR asserted prevents the associated GDSC to turn on. This blocks any subsequent attempts of probing the device, e.g. after a probe deferral, with the following showing in the log: [ 1.332226] usb30_prim_gdsc status stuck at 'off' Leave the BCR deasserted when exiting the driver to avoid this issue. Cc: stable Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Acked-by: Thinh Nguyen Reviewed-by: Konrad Dybcio Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/20250709132900.3408752-1-krishna.kurapati@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 3a1d22bd85381c4e358fc3340e776c3a3223a1d0 Author: Benjamin Tissoires Date: Thu Jul 10 16:01:36 2025 +0200 selftests/hid: add a test case for the recent syzbot underflow Syzbot found a buffer underflow in __hid_request(). Add a related test case for it. It's not perfect, but it allows to catch a corner case when a report descriptor is crafted so that it has a size of 0. Link: https://patch.msgid.link/20250710-report-size-null-v2-4-ccf922b7c4e5@kernel.org Signed-off-by: Benjamin Tissoires commit c2ca42f190b6714d6c481dfd3d9b62ea091c946b Author: Benjamin Tissoires Date: Thu Jul 10 16:01:35 2025 +0200 HID: core: do not bypass hid_hw_raw_request hid_hw_raw_request() is actually useful to ensure the provided buffer and length are valid. Directly calling in the low level transport driver function bypassed those checks and allowed invalid paramto be used. Reported-by: Alan Stern Closes: https://lore.kernel.org/linux-input/c75433e0-9b47-4072-bbe8-b1d14ea97b13@rowland.harvard.edu/ Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250710-report-size-null-v2-3-ccf922b7c4e5@kernel.org Signed-off-by: Benjamin Tissoires commit 0d0777ccaa2d46609d05b66ba0096802a2746193 Author: Benjamin Tissoires Date: Thu Jul 10 16:01:34 2025 +0200 HID: core: ensure __hid_request reserves the report ID as the first byte The low level transport driver expects the first byte to be the report ID, even when the report ID is not use (in which case they just shift the buffer). However, __hid_request() whas not offsetting the buffer it used by one in this case, meaning that the raw_request() callback emitted by the transport driver would be stripped of the first byte. Note: this changes the API for uhid devices when a request is made through hid_hw_request. However, several considerations makes me think this is fine: - every request to a HID device made through hid_hw_request() would see that change, but every request made through hid_hw_raw_request() already has the new behaviour. So that means that the users are already facing situations where they might have or not the first byte being the null report ID when it is 0. We are making things more straightforward in the end. - uhid is mainly used for BLE devices - uhid is also used for testing, but I don't see that change a big issue - for BLE devices, we can check which kernel module is calling hid_hw_request() - and in those modules, we can check which are using a Bluetooth device - and then we can check if the command is used with a report ID or not. - surprise: none of the kernel module are using a report ID 0 - and finally, bluez, in its function set_report()[0], does the same shift if the report ID is 0 and the given buffer has a size > 0. [0] https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/profiles/input/hog-lib.c#n879 Reported-by: Alan Stern Closes: https://lore.kernel.org/linux-input/c75433e0-9b47-4072-bbe8-b1d14ea97b13@rowland.harvard.edu/ Reported-by: syzbot+8258d5439c49d4c35f43@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=8258d5439c49d4c35f43 Tested-by: syzbot+8258d5439c49d4c35f43@syzkaller.appspotmail.com Fixes: 4fa5a7f76cc7 ("HID: core: implement generic .request()") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250710-report-size-null-v2-2-ccf922b7c4e5@kernel.org Signed-off-by: Benjamin Tissoires commit 4f15ee98304b96e164ff2340e1dfd6181c3f42aa Author: Benjamin Tissoires Date: Thu Jul 10 16:01:33 2025 +0200 HID: core: ensure the allocated report buffer can contain the reserved report ID When the report ID is not used, the low level transport drivers expect the first byte to be 0. However, currently the allocated buffer not account for that extra byte, meaning that instead of having 8 guaranteed bytes for implement to be working, we only have 7. Reported-by: Alan Stern Closes: https://lore.kernel.org/linux-input/c75433e0-9b47-4072-bbe8-b1d14ea97b13@rowland.harvard.edu/ Cc: stable@vger.kernel.org Suggested-by: Alan Stern Link: https://patch.msgid.link/20250710-report-size-null-v2-1-ccf922b7c4e5@kernel.org Signed-off-by: Benjamin Tissoires commit a059ef8e888941d6c2dc3e94f5f7c98db232ea5d Merge: 5e28d5a3f774f1 55f0bfc0370539 Author: David S. Miller Date: Sun Jul 13 01:28:52 2025 +0100 Merge branch 'tpacket_snd-bugs' into main Yun Lu says: ==================== fix two issues and optimize code on tpacket_snd() This series fix two issues and optimize the code on tpacket_snd(): 1, fix the SO_SNDTIMEO constraint not effective due to the changes in commit 581073f626e3; 2, fix a soft lockup issue on a specific edge case, and also optimize the loop logic to be clearer and more obvious; --- Changes in v5: - Still combine fix and optimization together, change to while(1). Thanks: Willem de Bruijn. - Link to v4: https://lore.kernel.org/all/20250710102639.280932-1-luyun_611@163.com/ Changes in v4: - Fix a typo and add the missing semicolon. Thanks: Simon Horman. - Split the second patch into two, one to fix, another to optimize. Thanks: Willem de Bruijn - Link to v3: https://lore.kernel.org/all/20250709095653.62469-1-luyun_611@163.com/ Changes in v3: - Split in two different patches. - Simplify the code and reuse ph to continue. Thanks: Eric Dumazet. - Link to v2: https://lore.kernel.org/all/20250708020642.27838-1-luyun_611@163.com/ Changes in v2: - Add a Fixes tag. - Link to v1: https://lore.kernel.org/all/20250707081629.10344-1-luyun_611@163.com/ ==================== Signed-off-by: David S. Miller commit 55f0bfc0370539213202f4ce1a07615327ac4713 Author: Yun Lu Date: Fri Jul 11 17:33:00 2025 +0800 af_packet: fix soft lockup issue caused by tpacket_snd() When MSG_DONTWAIT is not set, the tpacket_snd operation will wait for pending_refcnt to decrement to zero before returning. The pending_refcnt is decremented by 1 when the skb->destructor function is called, indicating that the skb has been successfully sent and needs to be destroyed. If an error occurs during this process, the tpacket_snd() function will exit and return error, but pending_refcnt may not yet have decremented to zero. Assuming the next send operation is executed immediately, but there are no available frames to be sent in tx_ring (i.e., packet_current_frame returns NULL), and skb is also NULL, the function will not execute wait_for_completion_interruptible_timeout() to yield the CPU. Instead, it will enter a do-while loop, waiting for pending_refcnt to be zero. Even if the previous skb has completed transmission, the skb->destructor function can only be invoked in the ksoftirqd thread (assuming NAPI threading is enabled). When both the ksoftirqd thread and the tpacket_snd operation happen to run on the same CPU, and the CPU trapped in the do-while loop without yielding, the ksoftirqd thread will not get scheduled to run. As a result, pending_refcnt will never be reduced to zero, and the do-while loop cannot exit, eventually leading to a CPU soft lockup issue. In fact, skb is true for all but the first iterations of that loop, and as long as pending_refcnt is not zero, even if incremented by a previous call, wait_for_completion_interruptible_timeout() should be executed to yield the CPU, allowing the ksoftirqd thread to be scheduled. Therefore, the execution condition of this function should be modified to check if pending_refcnt is not zero, instead of check skb. - if (need_wait && skb) { + if (need_wait && packet_read_pending(&po->tx_ring)) { As a result, the judgment conditions are duplicated with the end code of the while loop, and packet_read_pending() is a very expensive function. Actually, this loop can only exit when ph is NULL, so the loop condition can be changed to while (1), and in the "ph = NULL" branch, if the subsequent condition of if is not met, the loop can break directly. Now, the loop logic remains the same as origin but is clearer and more obvious. Fixes: 89ed5b519004 ("af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET") Cc: stable@kernel.org Suggested-by: LongJun Tang Signed-off-by: Yun Lu Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit c1ba3c0cbdb5e53a8ec5d708e99cd4c497028a13 Author: Yun Lu Date: Fri Jul 11 17:32:59 2025 +0800 af_packet: fix the SO_SNDTIMEO constraint not effective on tpacked_snd() Due to the changes in commit 581073f626e3 ("af_packet: do not call packet_read_pending() from tpacket_destruct_skb()"), every time tpacket_destruct_skb() is executed, the skb_completion is marked as completed. When wait_for_completion_interruptible_timeout() returns completed, the pending_refcnt has not yet been reduced to zero. Therefore, when ph is NULL, the wait function may need to be called multiple times until packet_read_pending() finally returns zero. We should call sock_sndtimeo() only once, otherwise the SO_SNDTIMEO constraint could be way off. Fixes: 581073f626e3 ("af_packet: do not call packet_read_pending() from tpacket_destruct_skb()") Cc: stable@kernel.org Suggested-by: Eric Dumazet Signed-off-by: Yun Lu Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 5e28d5a3f774f118896aec17a3a20a9c5c9dfc64 Author: Xiang Mei Date: Thu Jul 10 03:09:42 2025 -0700 net/sched: sch_qfq: Fix race condition on qfq_aggregate A race condition can occur when 'agg' is modified in qfq_change_agg (called during qfq_enqueue) while other threads access it concurrently. For example, qfq_dump_class may trigger a NULL dereference, and qfq_delete_class may cause a use-after-free. This patch addresses the issue by: 1. Moved qfq_destroy_class into the critical section. 2. Added sch_tree_lock protection to qfq_dump_class and qfq_dump_class_stats. Fixes: 462dbc9101ac ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost") Signed-off-by: Xiang Mei Reviewed-by: Cong Wang Signed-off-by: David S. Miller commit 3f31a806a62e44f7498e2d17719c03f816553f11 Merge: 3b428e1cfcc4c5 db6cc3f4ac2e6c Author: Linus Torvalds Date: Sat Jul 12 10:30:47 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-07-11-16-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "19 hotfixes. A whopping 16 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. 14 are for MM. Three gdb-script fixes and a kallsyms build fix" * tag 'mm-hotfixes-stable-2025-07-11-16-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: Revert "sched/numa: add statistics of numa balance task" mm: fix the inaccurate memory statistics issue for users mm/damon: fix divide by zero in damon_get_intervals_score() samples/damon: fix damon sample mtier for start failure samples/damon: fix damon sample wsse for start failure samples/damon: fix damon sample prcl for start failure kasan: remove kasan_find_vm_area() to prevent possible deadlock scripts: gdb: vfs: support external dentry names mm/migrate: fix do_pages_stat in compat mode mm/damon/core: handle damon_call_control as normal under kdmond deactivation mm/rmap: fix potential out-of-bounds page table access during batched unmap mm/hugetlb: don't crash when allocating a folio if there are no resv scripts/gdb: de-reference per-CPU MCE interrupts scripts/gdb: fix interrupts.py after maple tree conversion maple_tree: fix mt_destroy_walk() on root leaf node mm/vmalloc: leave lazy MMU mode on PTE mapping error scripts/gdb: fix interrupts display after MCP on x86 lib/alloc_tag: do not acquire non-existent lock in alloc_tag_top_users() kallsyms: fix build without execinfo commit 3b428e1cfcc4c5f063bb8b367beb71ee06470d4b Merge: 4412b8b23de24a b44686c8391b42 Author: Linus Torvalds Date: Sat Jul 12 10:20:03 2025 -0700 Merge tag 'erofs-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "Fix for a cache aliasing issue by adding missing flush_dcache_folio(), which causes execution failures on some arm32 setups. Fix for large compressed fragments, which could be generated by -Eall-fragments option (but should be rare) and was rejected by mistake due to an on-disk hardening commit. The remaining ones are small fixes. Summary: - Address cache aliasing for mappable page cache folios - Allow readdir() to be interrupted - Fix large fragment handling which was errored out by mistake - Add missing tracepoints - Use memcpy_to_folio() to replace copy_to_iter() for inline data" * tag 'erofs-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix large fragment handling erofs: allow readdir() to be interrupted erofs: address D-cache aliasing erofs: use memcpy_to_folio() to replace copy_to_iter() erofs: fix to add missing tracepoint in erofs_read_folio() erofs: fix to add missing tracepoint in erofs_readahead() commit 4412b8b23de24a94a0b78ac283db043c833a3975 Merge: 2632d81f5a02b6 fec5e6f97dae5f Author: Linus Torvalds Date: Sat Jul 12 10:13:27 2025 -0700 Merge tag 'bcachefs-2025-07-11' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet. * tag 'bcachefs-2025-07-11' of git://evilpiepirate.org/bcachefs: bcachefs: Don't set BCH_FS_error on transaction restart bcachefs: Fix additional misalignment in journal space calculations bcachefs: Don't schedule non persistent passes persistently bcachefs: Fix bch2_btree_transactions_read() synchronization bcachefs: btree read retry fixes bcachefs: btree node scan no longer uses btree cache bcachefs: Tweak btree cache helpers for use by btree node scan bcachefs: Fix btree for nonexistent tree depth bcachefs: Fix bch2_io_failures_to_text() bcachefs: bch2_fpunch_snapshot() commit 2632d81f5a02b65e6131cd57ba092bd321446e91 Merge: 379f604cc3dc2c 50f930db223657 Author: Linus Torvalds Date: Sat Jul 12 10:06:06 2025 -0700 Merge tag 'v6.16-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - fix use after free in lease break - small fix for freeing rdma transport (fixes missing logging of cm_qp_destroy) - fix write count leak * tag 'v6.16-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix potential use-after-free in oplock/lease break ack ksmbd: fix a mount write count leak in ksmbd_vfs_kern_path_locked() smb: server: make use of rdma_destroy_qp() commit 3051247e4faa32a3d90c762a243c2c62dde310db Author: Ming Lei Date: Fri Jul 11 16:30:09 2025 +0800 block: fix kobject leak in blk_unregister_queue The kobject for the queue, `disk->queue_kobj`, is initialized with a reference count of 1 via `kobject_init()` in `blk_register_queue()`. While `kobject_del()` is called during the unregister path to remove the kobject from sysfs, the initial reference is never released. Add a call to `kobject_put()` in `blk_unregister_queue()` to properly decrement the reference count and fix the leak. Fixes: 2bd85221a625 ("block: untangle request_queue refcounting from sysfs") Cc: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250711083009.2574432-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 379f604cc3dc2c865dc2b13d81faa166b6df59ec Merge: 3c2fe27971c3c9 ba74278c638df7 Author: Linus Torvalds Date: Fri Jul 11 17:24:36 2025 -0700 Merge tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fixes from Bjorn Helgaas: - Track apple Root Ports explicitly and look up the driver data from the struct device instead of using dev->driver_data, which is used by pci_host_common_init() for the generic host bridge pointer (Marc Zyngier) - Set dev->driver_data before pci_host_common_init() calls gen_pci_init() because some drivers need it to set up ECAM mappings; this fixes a regression on MicroChip MPFS Icicle (Geert Uytterhoeven) - Revert the now-unnecessary use of ECAM pci_config_window.priv to store a copy of dev->driver_data (Marc Zyngier) * tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: Revert "PCI: ecam: Allow cfg->priv to be pre-populated from the root port device" PCI: host-generic: Set driver_data before calling gen_pci_init() PCI: apple: Add tracking of probed root ports commit 3c2fe27971c3c9cc27de6e369385f6428db6c0b5 Merge: 5f02b80c21e151 b7dc79a6332fe6 Author: Linus Torvalds Date: Fri Jul 11 17:18:40 2025 -0700 Merge tag 'drm-fixes-2025-07-12' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Simona Vetter: "Cross-subsystem Changes: - agp/amd64 binding dmesg noise regression fix Core Changes: - fix race in gem_handle_create_tail - fixup handle_count fb refcount regression from -rc5, popular with reports ... - call rust dtor for drm_device release Driver Changes: - nouveau: magic 50ms suspend fix, acpi leak fix - tegra: dma api error in nvdec - pvr: fix device reset - habanalbs maintainer update - intel display: fix some dsi mipi sequences - xe fixes: SRIOV fixes, small GuC fixes, disable indirect ring due to issues, compression fix for fragmented BO, doc update * tag 'drm-fixes-2025-07-12' of https://gitlab.freedesktop.org/drm/kernel: (22 commits) drm/xe/guc: Default log level to non-verbose drm/xe/bmg: Don't use WA 16023588340 and 22019338487 on VF drm/xe/guc: Recommend GuC v70.46.2 for BMG, LNL, DG2 drm/xe/pm: Correct comment of xe_pm_set_vram_threshold() drm/xe: Release runtime pm for error path of xe_devcoredump_read() drm/xe/pm: Restore display pm if there is error after display suspend drm/i915/bios: Apply vlv_fixup_mipi_sequences() to v2 mipi-sequences too drm/gem: Fix race in drm_gem_handle_create_tail() drm/framebuffer: Acquire internal references on GEM handles agp/amd64: Check AGP Capability before binding to unsupported devices drm/xe/bmg: fix compressed VRAM handling Revert "drm/xe/xe2: Enable Indirect Ring State support for Xe2" drm/xe: Allocate PF queue size on pow2 boundary drm/xe/pf: Clear all LMTT pages on alloc drm/nouveau/gsp: fix potential leak of memory used during acpi init rust: drm: remove unnecessary imports MAINTAINERS: Change habanalabs maintainer drm/imagination: Fix kernel crash when hard resetting the GPU drm/tegra: nvdec: Fix dma_alloc_coherent error check rust: drm: device: drop_in_place() the drm::Device in release() ... commit 5f02b80c21e1511c32a37f642497751041069076 Author: Linus Torvalds Date: Fri Jul 11 17:10:32 2025 -0700 Revert "eventpoll: Fix priority inversion problem" This reverts commit 8c44dac8add7503c345c0f6c7962e4863b88ba42. I haven't figured out what the actual bug in this commit is, but I did spend a lot of time chasing it down and eventually succeeded in bisecting it down to this. For some reason, this eventpoll commit ends up causing delays and stuck user space processes, but it only happens on one of my machines, and only during early boot or during the flurry of initial activity when logging in. I must be triggering some very subtle timing issue, but once I figured out the behavior pattern that made it reasonably reliable to trigger, it did bisect right to this, and reverting the commit fixes the problem. Of course, that was only after I had failed at bisecting it several times, and had flailed around blaming both the drm people and the netlink people for the odd problems. The most obvious of which happened at the time of the first graphical login (the most common symptom being that some gnome app aborted due to a 30s timeout, often leading to the whole session then failing if it was some critical component like gnome-shell or similar). Acked-by: Nam Cao Cc: Frederic Weisbecker Cc: Valentin Schneider Cc: Christian Brauner Signed-off-by: Linus Torvalds commit 7727ec1523d7973defa1dff8f9c0aad288d04008 Author: Alok Tiwari Date: Thu Jul 10 10:38:46 2025 -0700 net: emaclite: Fix missing pointer increment in aligned_read() Add missing post-increment operators for byte pointers in the loop that copies remaining bytes in xemaclite_aligned_read(). Without the increment, the same byte was written repeatedly to the destination. This update aligns with xemaclite_aligned_write() Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver") Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20250710173849.2381003-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit b44686c8391b427fb1c85a31c35077e6947c6d90 Author: Gao Xiang Date: Sat Jul 12 03:58:26 2025 +0800 erofs: fix large fragment handling Fragments aren't limited by Z_EROFS_PCLUSTER_MAX_DSIZE. However, if a fragment's logical length is larger than Z_EROFS_PCLUSTER_MAX_DSIZE but the fragment is not the whole inode, it currently returns -EOPNOTSUPP because m_flags has the wrong EROFS_MAP_ENCODED flag set. It is not intended by design but should be rare, as it can only be reproduced by mkfs with `-Eall-fragments` in a specific case. Let's normalize fragment m_flags using the new EROFS_MAP_FRAGMENT. Reported-by: Axel Fontaine Closes: https://github.com/erofs/erofs-utils/issues/23 Fixes: 7c3ca1838a78 ("erofs: restrict pcluster size limitations") Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250711195826.3601157-1-hsiangkao@linux.alibaba.com commit e5478166dffb51fa64e76cdbb5c24421f22f2d43 Author: Arnd Bergmann Date: Fri Jul 11 09:24:53 2025 +0200 drm/nouveau: check ioctl command codes better nouveau_drm_ioctl() only checks the _IOC_NR() bits in the DRM_NOUVEAU_NVIF command, but ignores the type and direction bits, so any command with '7' in the low eight bits gets passed into nouveau_abi16_ioctl() instead of drm_ioctl(). Check for all the bits except the size that is handled inside of the handler. Fixes: 27111a23d01c ("drm/nouveau: expose the full object/event interfaces to userspace") Signed-off-by: Arnd Bergmann [ Fix up two checkpatch warnings and a typo. - Danilo ] Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250711072458.2665325-1-arnd@kernel.org commit 40f92e79b0aabbf3575e371f9054657a421a3e79 Merge: cb3002e0e977a6 4cdf1bdd45ac78 Author: Linus Torvalds Date: Fri Jul 11 10:35:54 2025 -0700 Merge tag 'block-6.16-20250710' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - MD changes via Yu: - fix UAF due to stack memory used for bio mempool (Jinchao) - fix raid10/raid1 nowait IO error path (Nigel and Qixing) - fix kernel crash from reading bitmap sysfs entry (Håkon) - Fix for a UAF in the nbd connect error path - Fix for blocksize being bigger than pagesize, if THP isn't enabled * tag 'block-6.16-20250710' of git://git.kernel.dk/linux: block: reject bs > ps block devices when THP is disabled nbd: fix uaf in nbd_genl_connect() error path md/md-bitmap: fix GPF in bitmap_get_stats() md/raid1,raid10: strip REQ_NOWAIT from member bios raid10: cleanup memleak at raid10_make_request md/raid1: Fix stack memory use after return in raid1_reshape commit cb3002e0e977a6342c19ba957b971f7ce17ef958 Merge: c7979c3917fa13 9dff55ebaef7e9 Author: Linus Torvalds Date: Fri Jul 11 10:29:30 2025 -0700 Merge tag 'io_uring-6.16-20250710' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Remove a pointless warning in the zcrx code - Fix for MSG_RING commands, where the allocated io_kiocb needs to be freed under RCU as well - Revert the work-around we had in place for the anon inodes pretending to be regular files. Since that got reworked upstream, the work-around is no longer needed * tag 'io_uring-6.16-20250710' of git://git.kernel.dk/linux: Revert "io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well" io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU io_uring/zcrx: fix pp destruction warnings commit c7979c3917fa1326dae3607e1c6a04c12057b194 Merge: 5265593a28d91a a215b5723922f8 Author: Linus Torvalds Date: Fri Jul 11 10:18:51 2025 -0700 Merge tag 'net-6.16-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull more networking fixes from Jakub Kicinski "Big chunk of fixes for WiFi, Johannes says probably the last for the release. The Netlink fixes (on top of the tree) restore operation of iw (WiFi CLI) which uses sillily small recv buffer, and is the reason for this 'emergency PR'. The GRE multicast fix also stands out among the user-visible regressions. Current release - fix to a fix: - netlink: make sure we always allow at least one skb to be queued, even if the recvbuf is (mis)configured to be tiny Previous releases - regressions: - gre: fix IPv6 multicast route creation Previous releases - always broken: - wifi: prevent A-MSDU attacks in mesh networks - wifi: cfg80211: fix S1G beacon head validation and detection - wifi: mac80211: - always clear frame buffer to prevent stack leak in cases which hit a WARN() - fix monitor interface in device restart - wifi: mwifiex: discard erroneous disassoc frames on STA interface - wifi: mt76: - prevent null-deref in mt7925_sta_set_decap_offload() - add missing RCU annotations, and fix sleep in atomic - fix decapsulation offload - fixes for scanning - phy: microchip: improve link establishment and reset handling - eth: mlx5e: fix race between DIM disable and net_dim() - bnxt_en: correct DMA unmap len for XDP_REDIRECT" * tag 'net-6.16-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (44 commits) netlink: make sure we allow at least one dump skb netlink: Fix rmem check in netlink_broadcast_deliver(). bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT bnxt_en: Flush FW trace before copying to the coredump bnxt_en: Fix DCB ETS validation net: ll_temac: Fix missing tx_pending check in ethtools_set_ringparam() net/mlx5e: Add new prio for promiscuous mode net/mlx5e: Fix race between DIM disable and net_dim() net/mlx5: Reset bw_share field when changing a node's parent can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level selftests: net: lib: fix shift count out of range selftests: Add IPv6 multicast route generation tests for GRE devices. gre: Fix IPv6 multicast route creation. net: phy: microchip: limit 100M workaround to link-down events on LAN88xx net: phy: microchip: Use genphy_soft_reset() to purge stale LPA bits ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeof net: appletalk: Fix device refcount leak in atrtr_create() netfilter: flowtable: account for Ethernet header in nf_flow_pppoe_proto() wifi: mac80211: add the virtual monitor after reconfig complete wifi: mac80211: always initialize sdata::key_list ... commit 5265593a28d91aed5529c31e720be8d3e78e0695 Merge: 87cf461cd30bc3 edb471108cf147 Author: Linus Torvalds Date: Fri Jul 11 10:15:50 2025 -0700 Merge tag 'gpio-fixes-for-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix performance regression when setting values of multiple GPIO lines at once - make sure the GPIO OF xlate code doesn't end up passing an uninitialized local variable to GPIO core - update MAINTAINERS * tag 'gpio-fixes-for-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: MAINTAINERS: remove bouncing address for Nandor Han gpio: of: initialize local variable passed to the .of_xlate() callback gpiolib: fix performance regression when using gpio_chip_get_multiple() commit 87cf461cd30bc3e0ae48936a96590de8db747f54 Merge: a0f8361c3ce4cf ec3cae639482a8 Author: Linus Torvalds Date: Fri Jul 11 09:19:33 2025 -0700 Merge tag 'pm-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a coding mistake in a previous fix related to system suspend and hibernation merged recently" * tag 'pm-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: Call pm_restore_gfp_mask() after dpm_resume() commit aef9da333823f70b074e36a94c6e85f5c55e5477 Author: Jan-Niklas Burfeind Date: Thu Jul 10 21:09:19 2025 +0200 platform/x86: dell-lis3lv02d: Add Precision 3551 This marks 0x29 as accelerometer address on Dell Precision 3551. I followed previous works of Paul Menzel and Hans de Goede to verify it: $ cd /sys/bus/pci/drivers/i801_smbus/0000\:00\:1f.4 $ ls -d i2c-? i2c-0 $ sudo modprobe i2c-dev $ sudo i2cdetect 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0. I will probe address range 0x08-0x77. Continue? [Y/n] Y 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- -- 30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- -- 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- $ echo lis3lv02d 0x29 > sudo tee /sys/bus/i2c/devices/i2c-0/new_device lis3lv02d 0x29 $ sudo dmesg [ 0.000000] Linux version 6.12.28 (nixbld@localhost) (gcc (GCC) 14.2.1 20250322, GNU ld (GNU Binutils) 2.44) #1-NixOS SMP PREEMPT_DYNAMIC Fri May 9 07:50:53 UTC 2025 [...] [ 0.000000] DMI: Dell Inc. Precision 3551/07YHW8, BIOS 1.18.0 10/03/2022 [...] [ 3749.077624] lis3lv02d_i2c 0-0029: supply Vdd not found, using dummy regulator [ 3749.077732] lis3lv02d_i2c 0-0029: supply Vdd_IO not found, using dummy regulator [ 3749.098674] lis3lv02d: 8 bits 3DC sensor found [ 3749.182480] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input28 [ 3749.182899] i2c i2c-0: new_device: Instantiated device lis3lv02d at 0x29 Signed-off-by: Jan-Niklas Burfeind Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20250710190919.37842-1-kernel@aiyionpri.me Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit dbfb567f4ae86f4acc4644984ec5b59086060b99 Author: Kurt Borja Date: Thu Jul 10 00:11:12 2025 -0300 platform/x86: alieneware-wmi-wmax: Add AWCC support to more laptops Add support to Alienware Area-51m and Alienware m15 R5. Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250710-m15_r5-v1-1-2c6ad44e5987@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 2bfe3ae1aa45f8b61cb0dc462114fd0c9636ad32 Author: Torsten Hilbrich Date: Fri Jul 11 12:32:54 2025 +0200 platform/x86: Fix initialization order for firmware_attributes_class The think-lmi driver uses the firwmare_attributes_class. But this class is registered after think-lmi, causing the "think-lmi" directory in "/sys/class/firmware-attributes" to be missing when the driver is compiled as builtin. Fixes: 55922403807a ("platform/x86: think-lmi: Directly use firmware_attributes_class") Signed-off-by: Torsten Hilbrich Link: https://lore.kernel.org/r/7dce5f7f-c348-4350-ac53-d14a8e1e8034@secunet.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a0f8361c3ce4cf706608edb81c4334783cb093cf Merge: bc9ff192a6c940 aa807b9f22df2e Author: Linus Torvalds Date: Fri Jul 11 08:49:25 2025 -0700 Merge tag 'dma-mapping-6.16-2025-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux Pull dma-mapping fix from Marek Szyprowski: - small fix relevant to arm64 server and custom CMA configuration (Feng Tang) * tag 'dma-mapping-6.16-2025-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux: dma-contiguous: hornor the cma address limit setup by user commit bc48d79a1829ac5a79cc3d1eb8bf30c0ae9b3bcd Author: Johan Hovold Date: Tue Jul 8 10:53:58 2025 +0200 platform: arm64: huawei-gaokun-ec: fix OF node leak Make sure to drop the OF node reference taken when creating the Gaokun auxiliary devices when the devices are later released. Fixes: 7636f090d02e ("platform: arm64: add Huawei Matebook E Go EC driver") Cc: Pengyu Luo Signed-off-by: Johan Hovold Reviewed-by: Pengyu Luo Link: https://lore.kernel.org/r/20250708085358.15657-1-johan@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit afcefc58fdfd687e3a9a9bef0be5846b96f710b7 Author: Nithyanantham Paramasivam Date: Thu Jul 10 06:47:54 2025 +0530 wifi: ath12k: Fix packets received in WBM error ring with REO LUT enabled Currently, packets are being received into the WBM error ring when REO queue lookup is enabled, resulting in degraded RX performance. The issue arises because the REO queue LUT TID memory reference is set to zero-it's being assigned before the memory is allocated. Fix this by assigning the REO queue TID memory reference in the LUT immediately after memory allocation to ensure correct packet processing. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Reported-by: Tanguy Serrat Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220282 Fixes: 3b9cbce6fdd3 ("wifi: ath12k: alloc REO queue per station") Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250710011754.559817-1-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit a215b5723922f8099078478122f02100e489cb80 Author: Jakub Kicinski Date: Thu Jul 10 17:11:21 2025 -0700 netlink: make sure we allow at least one dump skb Commit under Fixes tightened up the memory accounting for Netlink sockets. Looks like the accounting is too strict for some existing use cases, Marek reported issues with nl80211 / WiFi iw CLI. To reduce number of iterations Netlink dumps try to allocate messages based on the size of the buffer passed to previous recvmsg() calls. If user space uses a larger buffer in recvmsg() than sk_rcvbuf we will allocate an skb we won't be able to queue. Make sure we always allow at least one skb to be queued. Same workaround is already present in netlink_attachskb(). Alternative would be to cap the allocation size to rcvbuf - rmem_alloc but as I said, the workaround is already present in other places. Reported-by: Marek Szyprowski Link: https://lore.kernel.org/9794af18-4905-46c6-b12c-365ea2f05858@samsung.com Fixes: ae8f160e7eb2 ("netlink: Fix wraparounds of sk->sk_rmem_alloc.") Tested-by: Marek Szyprowski Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250711001121.3649033-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a3c4a125ec725cefb40047eb05ff9eafd57830b4 Author: Kuniyuki Iwashima Date: Fri Jul 11 05:32:07 2025 +0000 netlink: Fix rmem check in netlink_broadcast_deliver(). We need to allow queuing at least one skb even when skb is larger than sk->sk_rcvbuf. The cited commit made a mistake while converting a condition in netlink_broadcast_deliver(). Let's correct the rmem check for the allow-one-skb rule. Fixes: ae8f160e7eb24 ("netlink: Fix wraparounds of sk->sk_rmem_alloc.") Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250711053208.2965945-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 52c14ea7d7580de164deab1e756eaf854dac85b2 Merge: e81750b4e3826f 3cdf199d4755d4 Author: Jakub Kicinski Date: Fri Jul 11 07:28:36 2025 -0700 Merge branch 'bnxt_en-3-bug-fixes' Michael Chan says: ==================== bnxt_en: 3 bug fixes The first one fixes a possible failure when setting DCB ETS. The second one fixes the ethtool coredump (-W 2) not containing all the FW traces. The third one fixes the DMA unmap length when transmitting XDP_REDIRECT packets. ==================== Link: https://patch.msgid.link/20250710213938.1959625-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 3cdf199d4755d477972ee87110b2aebc88b3cfad Author: Somnath Kotur Date: Thu Jul 10 14:39:38 2025 -0700 bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT When transmitting an XDP_REDIRECT packet, call dma_unmap_len_set() with the proper length instead of 0. This bug triggers this warning on a system with IOMMU enabled: WARNING: CPU: 36 PID: 0 at drivers/iommu/dma-iommu.c:842 __iommu_dma_unmap+0x159/0x170 RIP: 0010:__iommu_dma_unmap+0x159/0x170 Code: a8 00 00 00 00 48 c7 45 b0 00 00 00 00 48 c7 45 c8 00 00 00 00 48 c7 45 a0 ff ff ff ff 4c 89 45 b8 4c 89 45 c0 e9 77 ff ff ff <0f> 0b e9 60 ff ff ff e8 8b bf 6a 00 66 66 2e 0f 1f 84 00 00 00 00 RSP: 0018:ff22d31181150c88 EFLAGS: 00010206 RAX: 0000000000002000 RBX: 00000000e13a0000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ff22d31181150cf0 R08: ff22d31181150ca8 R09: 0000000000000000 R10: 0000000000000000 R11: ff22d311d36c9d80 R12: 0000000000001000 R13: ff13544d10645010 R14: ff22d31181150c90 R15: ff13544d0b2bac00 FS: 0000000000000000(0000) GS:ff13550908a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005be909dacff8 CR3: 0008000173408003 CR4: 0000000000f71ef0 PKRU: 55555554 Call Trace: ? show_regs+0x6d/0x80 ? __warn+0x89/0x160 ? __iommu_dma_unmap+0x159/0x170 ? report_bug+0x17e/0x1b0 ? handle_bug+0x46/0x90 ? exc_invalid_op+0x18/0x80 ? asm_exc_invalid_op+0x1b/0x20 ? __iommu_dma_unmap+0x159/0x170 ? __iommu_dma_unmap+0xb3/0x170 iommu_dma_unmap_page+0x4f/0x100 dma_unmap_page_attrs+0x52/0x220 ? srso_alias_return_thunk+0x5/0xfbef5 ? xdp_return_frame+0x2e/0xd0 bnxt_tx_int_xdp+0xdf/0x440 [bnxt_en] __bnxt_poll_work_done+0x81/0x1e0 [bnxt_en] bnxt_poll+0xd3/0x1e0 [bnxt_en] Fixes: f18c2b77b2e4 ("bnxt_en: optimized XDP_REDIRECT support") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250710213938.1959625-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 100c08c89d173b7fdf953e7d9f9ca8f69f80d1c5 Author: Shruti Parab Date: Thu Jul 10 14:39:37 2025 -0700 bnxt_en: Flush FW trace before copying to the coredump bnxt_fill_drv_seg_record() calls bnxt_dbg_hwrm_log_buffer_flush() to flush the FW trace buffer. This needs to be done before we call bnxt_copy_ctx_mem() to copy the trace data. Without this fix, the coredump may not contain all the FW traces. Fixes: 3c2179e66355 ("bnxt_en: Add FW trace coredump segments to the coredump") Reviewed-by: Kalesh AP Signed-off-by: Shruti Parab Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250710213938.1959625-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit b74c2a2e9cc471e847abd87e50a2354c07e02040 Author: Shravya KN Date: Thu Jul 10 14:39:36 2025 -0700 bnxt_en: Fix DCB ETS validation In bnxt_ets_validate(), the code incorrectly loops over all possible traffic classes to check and add the ETS settings. Fix it to loop over the configured traffic classes only. The unconfigured traffic classes will default to TSA_ETS with 0 bandwidth. Looping over these unconfigured traffic classes may cause the validation to fail and trigger this error message: "rejecting ETS config starving a TC\n" The .ieee_setets() will then fail. Fixes: 7df4ae9fe855 ("bnxt_en: Implement DCBNL to support host-based DCBX.") Reviewed-by: Sreekanth Reddy Signed-off-by: Shravya KN Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250710213938.1959625-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit e81750b4e3826fedce7362dad839cb40384d60ae Author: Alok Tiwari Date: Thu Jul 10 11:06:17 2025 -0700 net: ll_temac: Fix missing tx_pending check in ethtools_set_ringparam() The function ll_temac_ethtools_set_ringparam() incorrectly checked rx_pending twice, once correctly for RX and once mistakenly in place of tx_pending. This caused tx_pending to be left unchecked against TX_BD_NUM_MAX. As a result, invalid TX ring sizes may have been accepted or valid ones wrongly rejected based on the RX limit, leading to potential misconfiguration or unexpected results. This patch corrects the condition to properly validate tx_pending. Fixes: f7b261bfc35e ("net: ll_temac: Make RX/TX ring sizes configurable") Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20250710180621.2383000-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit 5b81d59f02a075cd318e898dd1f3644a261bb9c4 Merge: 71b976db8c6e68 4c9fce56fa7020 Author: Jakub Kicinski Date: Fri Jul 11 07:26:49 2025 -0700 Merge branch 'mlx5-misc-fixes-2025-07-10' Tariq Toukan says: ==================== mlx5 misc fixes 2025-07-10 This small patchset provides misc bug fixes from the team to the mlx5 core and EN drivers. ==================== Link: https://patch.msgid.link/1752155624-24095-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 4c9fce56fa702059bbc5ab737265b68f79cbaac4 Author: Jianbo Liu Date: Thu Jul 10 16:53:44 2025 +0300 net/mlx5e: Add new prio for promiscuous mode An optimization for promiscuous mode adds a high-priority steering table with a single catch-all rule to steer all traffic directly to the TTC table. However, a gap exists between the creation of this table and the insertion of the catch-all rule. Packets arriving in this brief window would miss as no rule was inserted yet, unnecessarily incrementing the 'rx_steer_missed_packets' counter and dropped. This patch resolves the issue by introducing a new prio for this table, placing it between MLX5E_TC_PRIO and MLX5E_NIC_PRIO. By doing so, packets arriving during the window now fall through to the next prio (at MLX5E_NIC_PRIO) instead of being dropped. Fixes: 1c46d7409f30 ("net/mlx5e: Optimize promiscuous mode") Signed-off-by: Jianbo Liu Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://patch.msgid.link/1752155624-24095-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit eb41a264a3a576dc040ee37c3d9d6b7e2d9be968 Author: Carolina Jubran Date: Thu Jul 10 16:53:43 2025 +0300 net/mlx5e: Fix race between DIM disable and net_dim() There's a race between disabling DIM and NAPI callbacks using the dim pointer on the RQ or SQ. If NAPI checks the DIM state bit and sees it still set, it assumes `rq->dim` or `sq->dim` is valid. But if DIM gets disabled right after that check, the pointer might already be set to NULL, leading to a NULL pointer dereference in net_dim(). Fix this by calling `synchronize_net()` before freeing the DIM context. This ensures all in-progress NAPI callbacks are finished before the pointer is cleared. Kernel log: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... RIP: 0010:net_dim+0x23/0x190 ... Call Trace: ? __die+0x20/0x60 ? page_fault_oops+0x150/0x3e0 ? common_interrupt+0xf/0xa0 ? sysvec_call_function_single+0xb/0x90 ? exc_page_fault+0x74/0x130 ? asm_exc_page_fault+0x22/0x30 ? net_dim+0x23/0x190 ? mlx5e_poll_ico_cq+0x41/0x6f0 [mlx5_core] ? sysvec_apic_timer_interrupt+0xb/0x90 mlx5e_handle_rx_dim+0x92/0xd0 [mlx5_core] mlx5e_napi_poll+0x2cd/0xac0 [mlx5_core] ? mlx5e_poll_ico_cq+0xe5/0x6f0 [mlx5_core] busy_poll_stop+0xa2/0x200 ? mlx5e_napi_poll+0x1d9/0xac0 [mlx5_core] ? mlx5e_trigger_irq+0x130/0x130 [mlx5_core] __napi_busy_loop+0x345/0x3b0 ? sysvec_call_function_single+0xb/0x90 ? asm_sysvec_call_function_single+0x16/0x20 ? sysvec_apic_timer_interrupt+0xb/0x90 ? pcpu_free_area+0x1e4/0x2e0 napi_busy_loop+0x11/0x20 xsk_recvmsg+0x10c/0x130 sock_recvmsg+0x44/0x70 __sys_recvfrom+0xbc/0x130 ? __schedule+0x398/0x890 __x64_sys_recvfrom+0x20/0x30 do_syscall_64+0x4c/0x100 entry_SYSCALL_64_after_hwframe+0x4b/0x53 ... ---[ end trace 0000000000000000 ]--- ... ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Fixes: 445a25f6e1a2 ("net/mlx5e: Support updating coalescing configuration without resetting channels") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://patch.msgid.link/1752155624-24095-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f7b76466894083c8f518cf29fef75fcd3ec670e5 Author: Carolina Jubran Date: Thu Jul 10 16:53:42 2025 +0300 net/mlx5: Reset bw_share field when changing a node's parent When changing a node's parent, its scheduling element is destroyed and re-created with bw_share 0. However, the node's bw_share field was not updated accordingly. Set the node's bw_share to 0 after re-creation to keep the software state in sync with the firmware configuration. Fixes: 9c7bbf4c3304 ("net/mlx5: Add support for setting parent of nodes") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://patch.msgid.link/1752155624-24095-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit cb73e53f7c0700285d743e7afbe37cba9f7df8f3 Author: Kirill A. Shutemov Date: Tue Jul 8 13:19:22 2025 +0300 MAINTAINERS: Update Kirill Shutemov's email address for TDX Update MAINTAINERS to use my @kernel.org email address. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250708101922.50560-4-kirill.shutemov%40linux.intel.com commit 71b976db8c6e683831e1492efdf1fe0a8487adef Merge: 47c84997c686b4 58805e9cbc6f6a Author: Jakub Kicinski Date: Fri Jul 11 07:07:56 2025 -0700 Merge tag 'linux-can-fixes-for-6.16-20250711' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-07-11 Sean Nyekjaer's patch targets the m_can driver and demotes the "msg lost in rx" message to debug level to prevent flooding the kernel log with error messages. * tag 'linux-can-fixes-for-6.16-20250711' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level ==================== Link: https://patch.msgid.link/20250711102451.2828802-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4cec89db80ba81fa4524c6449c0494b8ae08eeb0 Author: Anup Patel Date: Mon Jul 7 09:23:44 2025 +0530 RISC-V: KVM: Move HGEI[E|P] CSR access to IMSIC virtualization Currently, the common AIA functions kvm_riscv_vcpu_aia_has_interrupts() and kvm_riscv_aia_wakeon_hgei() lookup HGEI line using an array of VCPU pointers before accessing HGEI[E|P] CSR which is slow and prone to race conditions because there is a separate per-hart lock for the VCPU pointer array and a separate per-VCPU rwlock for IMSIC VS-file (including HGEI line) used by the VCPU. Due to these race conditions, it is observed on QEMU RISC-V host that Guest VCPUs sleep in WFI and never wakeup even with interrupt pending in the IMSIC VS-file because VCPUs were waiting for HGEI wakeup on the wrong host CPU. The IMSIC virtualization already keeps track of the HGEI line and the associated IMSIC VS-file used by each VCPU so move the HGEI[E|P] CSR access to IMSIC virtualization so that costly HGEI line lookup can be avoided and likelihood of race-conditions when updating HGEI[E|P] CSR is also reduced. Reviewed-by: Atish Patra Tested-by: Atish Patra Tested-by: Heinrich Schuchardt Fixes: 3385339296d1 ("RISC-V: KVM: Use IMSIC guest files when available") Signed-off-by: Anup Patel Reviewed-by: Nutty Liu Link: https://lore.kernel.org/r/20250707035345.17494-3-apatel@ventanamicro.com Signed-off-by: Anup Patel commit 57f576e860d3a3582edb5064db9f0c95558ca5f4 Author: Anup Patel Date: Mon Jul 7 09:23:43 2025 +0530 RISC-V: KVM: Disable vstimecmp before exiting to user-space If VS-timer expires when no VCPU running on a host CPU then WFI executed by such host CPU will be effective NOP resulting in no power savings. This is as-per RISC-V Privileged specificaiton which says: "WFI is also required to resume execution for locally enabled interrupts pending at any privilege level, regardless of the global interrupt enable at each privilege level." To address the above issue, vstimecmp CSR must be set to -1UL over here when VCPU is scheduled-out or exits to user space. Reviewed-by: Atish Patra Tested-by: Atish Patra Tested-by: Heinrich Schuchardt Fixes: 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension") Fixes: cea8896bd936 ("RISC-V: KVM: Fix kvm_riscv_vcpu_timer_pending() for Sstc") Reported-by: Heinrich Schuchardt Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2112578 Signed-off-by: Anup Patel Reviewed-by: Nutty Liu Link: https://lore.kernel.org/r/20250707035345.17494-2-apatel@ventanamicro.com Signed-off-by: Anup Patel commit b7dc79a6332fe6f58f2e6b2a631bad101dc79107 Merge: 14e85fabee2b3e bd46cece51a36e Author: Simona Vetter Date: Fri Jul 11 14:11:18 2025 +0200 Merge tag 'drm-misc-fixes-2025-07-10' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc6 or final: - Fix nouveau fail on debugfs errors. - Magic 50 ms to fix nouveau suspend. - Call rust destructor on drm device release. - Fix DMA api error handling in tegra/nvdec. - Fix PVR device reset. - Habanalabs maintainer update. - Small memory leak fix when nouveau acpi init fails. - Do not attempt to bind to any PCI device with AGP capability. - Make FB's acquire handles on backing object, same as i915/xe already does. - Fix race in drm_gem_handle_create_tail. Signed-off-by: Simona Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/e522cdc7-1787-48f2-97e5-0f94783970ab@linux.intel.com commit 8f0837fdc5d832f0cd953f66db0cbfb2fa8909d2 Merge: f2ebacd34eeb73 3871b51a684275 Author: Arnd Bergmann Date: Fri Jul 11 13:41:08 2025 +0200 Merge tag 'qcom-arm64-defconfig-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm Arm64 defconfig fixes for v6.16 The v6.16 driver and DeviceTree updates described and implemented CPU frequency scaling for the Qualcomm X Elite platform. But the necessary CPUCP mailbox driver was not enabled, resulting in a series of error messages being logged during boot (and no CPU frequency scaling). Enable the missing drivers to silence the errors, and enable CPU frequency scaling on this platform. * tag 'qcom-arm64-defconfig-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm CPUCP mailbox driver Signed-off-by: Arnd Bergmann commit f2ebacd34eeb73081eadfba5e6e99ea967365911 Merge: 07d45e80960a6f e8d3dc45f2d3b0 Author: Arnd Bergmann Date: Fri Jul 11 13:39:12 2025 +0200 Merge tag 'qcom-arm64-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm DeviceTree fixes for v6.16 The RTC DeviceTree binding was changed in v6.16, to require an explicit flag indicating that we store RTC offset in in an UEFI variable. The result sent X Elite and Lenovo Thinkpad X13s users back to 1970, add the flag to explicitly select the correct configuration for these devices. * tag 'qcom-arm64-fixes-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: x1e80100: describe uefi rtc offset arm64: dts: qcom: sc8280xp-x13s: describe uefi rtc offset Signed-off-by: Arnd Bergmann commit 07d45e80960a6f3e51d62104e2083eaa0cda86a6 Merge: fec3103b580994 56448e78a6bb4e Author: Arnd Bergmann Date: Fri Jul 11 13:38:35 2025 +0200 Merge tag 'aspeed-6.16-fixes-0' of https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux into arm/fixes ASPEED SoC driver fixes for 6.16 Address concerns in the ASPEED LPC snoop driver identified in the first two patches of the cleanup series at [1]. [1]: https://lore.kernel.org/all/20250616-aspeed-lpc-snoop-fixes-v2-0-3cdd59c934d3@codeconstruct.com.au/ * tag 'aspeed-6.16-fixes-0' of https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux: soc: aspeed: lpc-snoop: Don't disable channels that aren't enabled soc: aspeed: lpc-snoop: Cleanup resources in stack-order Signed-off-by: Arnd Bergmann commit fec3103b5809940b3fe2b66e5167cb9eebcedf5d Merge: 1e7c8c54c5138f 9037532ab89363 Author: Arnd Bergmann Date: Fri Jul 11 13:17:23 2025 +0200 Merge tag 'v6.16-rockchip-dtsfixes1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Switch to the gpio variant for spi-cs and mmc-detect for some boards as the in-controller functionality does not work as intended for them. HDMI drive strength adjustment for better ddc communication and some missing supplies. * tag 'v6.16-rockchip-dtsfixes1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add missing fan-supply to rk3566-quartz64-a arm64: dts: rockchip: use cs-gpios for spi1 on ringneck arm64: dts: rockchip: list all CPU supplies on ArmSoM Sige5 arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi 4B arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi CM5 arm64: dts: rockchip: Adjust the HDMI DDC IO driver strength for rk3588 arm64: dts: rockchip: fix rk3576 pcie1 linux,pci-domain Link: https://lore.kernel.org/r/5108768.AiC22s8V5E@diego Signed-off-by: Arnd Bergmann commit 58805e9cbc6f6a28f35d90e740956e983a0e036e Author: Sean Nyekjaer Date: Fri Jul 11 12:12:02 2025 +0200 can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level Downgrade the "msg lost in rx" message to debug level, to prevent flooding the kernel log with error messages. Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support") Reviewed-by: Vincent Mailhol Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250711-mcan_ratelimit-v3-1-7413e8e21b84@geanix.com [mkl: enhance commit message] Signed-off-by: Marc Kleine-Budde commit 177bb4cba97aae951b910d8ca248480715d09009 Author: Jinliang Zheng Date: Fri Jul 11 16:12:07 2025 +0800 iomap: avoid unnecessary ifs_set_range_uptodate() with locks In the buffer write path, iomap_set_range_uptodate() is called every time iomap_end_write() is called. But if folio_test_uptodate() holds, we know that all blocks in this folio are already in the uptodate state, so there is no need to go deep into the critical section of state_lock to execute bitmap_set(). This is because the folios always creep towards ifs_is_fully_uptodate() state and once they've gotten there folio_mark_uptodate() is called, which means the folio is uptodate. Then once a folio is uptodate, there is no route back to !uptodate without going through the removal of the folio from the page cache. Therefore, it's fine to use folio_test_uptodate() to short-circuit unnecessary code paths. Although state_lock may not have significant lock contention due to folio lock, this patch at least reduces the number of instructions, especially the expensive lock-prefixed instructions. Signed-off-by: Jinliang Zheng Link: https://lore.kernel.org/20250711081207.1782667-1-alexjlzheng@tencent.com Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 0a9e7405131380b57e155f10242b2e25d2e51852 Author: Jan Kara Date: Wed Jul 9 11:55:46 2025 +0200 isofs: Verify inode mode when loading from disk Verify that the inode mode is sane when loading it from the disk to avoid complaints from VFS about setting up invalid inodes. Reported-by: syzbot+895c23f6917da440ed0d@syzkaller.appspotmail.com CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/20250709095545.31062-2-jack@suse.cz Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit 14e85fabee2b3e0e7055ab4c38b2a541ecd9c823 Merge: 3638e6a84b7368 74806f69b8668e Author: Simona Vetter Date: Fri Jul 11 11:35:39 2025 +0200 Merge tag 'drm-xe-fixes-2025-07-11' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Clear LMTT page to avoid leaking data from one VF to another - Align PF queue size to power of 2 - Disable Indirect Ring State to avoid intermittent issues on context switch: feature is not currently needed, so can be disabled for now. - Fix compression handling when the BO pages are very fragmented - Restore display pm on error path - Fix runtime pm handling in xe devcoredump - Fix xe_pm_set_vram_threshold() doc - Recommend new minor versions of GuC firmware - Drop some workarounds on VF - Do not use verbose GuC logging by default: it should be only for debugging Signed-off-by: Simona Vetter From: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/s6jyd24mimbzb4vxtgc5vupvbyqplfep2c6eupue7znnlbhuxy@lmvzexfzhrnn commit 3638e6a84b7368a4fb222f05c2febc06c434a10a Merge: d7b8f8e20813f0 e778689390c714 Author: Simona Vetter Date: Fri Jul 11 11:28:41 2025 +0200 Merge tag 'drm-intel-fixes-2025-07-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes Short summary of fixes: - DSI panel's version 2 mipi-sequences fix (Hans) Signed-off-by: Simona Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/aHA_eR0G7X2P6_ib@intel.com commit 1e7c8c54c5138fe7226f8a7a9fb8e93e24243a01 Merge: 3f3fb973743089 fbe94be09fa813 Author: Arnd Bergmann Date: Fri Jul 11 11:26:57 2025 +0200 Merge tag 'imx-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.16: - Keep LDO5 always on for imx8mm-verdin to fix broken Ethernet support - Add big-endian property back for LS1046A watchdog, as the removal was an accident - Fix DMA interrupter number of i.MX95 pcie0_ep device - A set of changes from Tim Harvey to fix TPM SPI frequency on imx8mp-venice devices - A couple of changes from Wei Fang to fix NETC overshoot issue on i.MX95 EVK boards * tag 'imx-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: freescale: imx8mm-verdin: Keep LDO5 always on arm64: dts: imx95: Correct the DMA interrupter number of pcie0_ep arm64: dts: add big-endian property back into watchdog node arm64: dts: imx95-15x15-evk: fix the overshoot issue of NETC arm64: dts: imx95-19x19-evk: fix the overshoot issue of NETC arm64: dts: imx8mp-venice-gw74xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw73xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw72xx: fix TPM SPI frequency arm64: dts: imx8mp-venice-gw71xx: fix TPM SPI frequency Link: https://lore.kernel.org/r/aGzNeZ7KtsRsUkZT@dragon Signed-off-by: Arnd Bergmann commit edb471108cf1477c44b95e87e8cec261825eb079 Author: Bartosz Golaszewski Date: Wed Jul 9 09:18:24 2025 +0200 MAINTAINERS: remove bouncing address for Nandor Han Nandor's address has been bouncing for some time now. Remove it from MAINTAINERS. The affected driver falls under the wider umbrella of GPIO modules. Link: https://lore.kernel.org/r/20250709071825.16212-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 74806f69b8668ea0e98cd9d461b7803ffa1fcdf3 Author: Lucas De Marchi Date: Fri Jun 13 13:00:37 2025 -0700 drm/xe/guc: Default log level to non-verbose Currently xe sets the guc log level to a verbose level since it's useful to debug hangs and general development. However the verbose level may already be too much and affect performance. Michal Mrozek did some tests with the L0 compute stack for submission latency with ULLS disabled. Below are the normalized numbers with log level 3 (the current default) as baseline for each test: Test \ Log Level 3 0 1 2 ----------------------------------------------------------- ------ ------ ------ ------ BestWalkerNthCommandListSubmission(CmdListCount=2) 1.00 0.63 0.63 0.96 BestWalkerNthSubmission(KernelCount=2) 1.00 0.62 0.63 0.96 BestWalkerNthSubmissionImmediate(KernelCount=2) 1.00 0.58 0.58 0.85 BestWalkerSubmission 1.00 0.62 0.62 0.96 BestWalkerSubmissionImmediate 1.00 0.63 0.62 0.96 BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=2) 1.00 0.58 0.58 0.86 BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=4) 1.00 0.70 0.70 0.83 BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=8) 1.00 0.53 0.52 0.78 Log level 2 is the first "verbose level" for GuC, where the biggest difference happens. Keep log level 3 for CONFIG_DRM_XE_DEBUG, but switch to 1, i.e. GUC_LOG_LEVEL_NON_VERBOSE, for "normal" builds. Cc: Michal Mrozek Cc: John Harrison Reviewed-by: John Harrison Link: https://lore.kernel.org/r/20250613-guc-log-level-v2-1-cb84a63e49fe@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit a37128ba613ad6a5f81f382fa3cfe5c4a6527310) Signed-off-by: Lucas De Marchi commit 7a10175a4220b3f77d74a61ef767f6c43bf39a3e Author: Michal Wajdeczko Date: Thu Jul 10 10:30:39 2025 +0000 drm/xe/bmg: Don't use WA 16023588340 and 22019338487 on VF These workarounds are not applicable for use by the VFs. Signed-off-by: Michal Wajdeczko Tested-by: Jakub Kolakowski Reviewed-by: Satyanarayana K V P Signed-off-by: Jakub Kolakowski Link: https://lore.kernel.org/r/20250710103040.375610-2-jakub1.kolakowski@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 1d2e2503e506ddc499cbb7afdc8b70bcf6fe241f) Signed-off-by: Lucas De Marchi commit 8c018805097f52d0d35fbc273b4e6dd154811638 Author: Julia Filipchuk Date: Thu Jun 26 11:28:10 2025 -0700 drm/xe/guc: Recommend GuC v70.46.2 for BMG, LNL, DG2 UAPI compatibility version 1.22.2 Resolves various bugs. Recommend newer version. Signed-off-by: Julia Filipchuk Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250626182805.1701096-13-daniele.ceraolospurio@intel.com (cherry picked from commit 0b64addcae7f04745bc5f62d41e27268052f812e) Signed-off-by: Lucas De Marchi commit 0539c5eaf81f3f844213bf6b3137a53e5b04b083 Author: Shuicheng Lin Date: Tue Jul 8 02:14:51 2025 +0000 drm/xe/pm: Correct comment of xe_pm_set_vram_threshold() The parameter threshold is with size in MiB, not in bits. Correct it to avoid any confusion. v2: s/mb/MiB, s/vram/VRAM, fix return section. (Michal) Fixes: 30c399529f4c ("drm/xe: Document Xe PM component") Cc: Michal Wajdeczko Cc: Rodrigo Vivi Signed-off-by: Shuicheng Lin Link: https://lore.kernel.org/r/20250708021450.3602087-2-shuicheng.lin@intel.com Reviewed-by: Stuart Summers Signed-off-by: Rodrigo Vivi (cherry picked from commit 0efec0500117947f924e5ac83be40f96378af85a) Signed-off-by: Lucas De Marchi commit 253a174c06f8c37aa71521623205b890022b6987 Author: Shuicheng Lin Date: Mon Jul 7 00:49:14 2025 +0000 drm/xe: Release runtime pm for error path of xe_devcoredump_read() xe_pm_runtime_put() is missed to be called for the error path in xe_devcoredump_read(). Add function description comments for xe_devcoredump_read() to help understand it. v2: more detail function comments and refine goto logic (Matt) Fixes: c4a2e5f865b7 ("drm/xe: Add devcoredump chunking") Cc: stable@vger.kernel.org Reviewed-by: Matthew Brost Signed-off-by: Shuicheng Lin Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250707004911.3502904-6-shuicheng.lin@intel.com (cherry picked from commit 017ef1228d735965419ff118fe1b89089e772c42) Signed-off-by: Lucas De Marchi commit 6d33df611a39a1b4ad9f2b609ded5d6efa04d97e Author: Shuicheng Lin Date: Tue Jul 8 03:54:25 2025 +0000 drm/xe/pm: Restore display pm if there is error after display suspend xe_bo_evict_all() is called after xe_display_pm_suspend(). So if there is error with xe_bo_evict_all(), display pm should be restored. Fixes: 51462211f4a9 ("drm/xe/pxp: add PXP PM support") Fixes: cb8f81c17531 ("drm/xe/display: Make display suspend/resume work on discrete") Cc: Maarten Lankhorst Cc: Daniele Ceraolo Spurio Cc: John Harrison Signed-off-by: Shuicheng Lin Reviewed-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20250708035424.3608190-2-shuicheng.lin@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 83dcee17855c4e5af037ae3262809036de127903) Signed-off-by: Lucas De Marchi commit 47c84997c686b4d43b225521b732492552b84758 Author: Hangbin Liu Date: Wed Jul 9 09:12:44 2025 +0000 selftests: net: lib: fix shift count out of range I got the following warning when writing other tests: + handle_test_result_pass 'bond 802.3ad' '(lacp_active off)' + local 'test_name=bond 802.3ad' + shift + local 'opt_str=(lacp_active off)' + shift + log_test_result 'bond 802.3ad' '(lacp_active off)' ' OK ' + local 'test_name=bond 802.3ad' + shift + local 'opt_str=(lacp_active off)' + shift + local 'result= OK ' + shift + local retmsg= + shift /net/tools/testing/selftests/net/forwarding/../lib.sh: line 315: shift: shift count out of range This happens because an extra shift is executed even after all arguments have been consumed. Remove the last shift in log_test_result() to avoid this warning. Fixes: a923af1ceee7 ("selftests: forwarding: Convert log_test() to recognize RET values") Signed-off-by: Hangbin Liu Link: https://patch.msgid.link/20250709091244.88395-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit ce913b2292e9bdf2661af6e584ddfb4ed5978893 Merge: 2dfa4e31768bd7 4d61a8a7334399 Author: Jakub Kicinski Date: Thu Jul 10 18:10:48 2025 -0700 Merge branch 'gre-fix-default-ipv6-multicast-route-creation' Guillaume Nault says: ==================== gre: Fix default IPv6 multicast route creation. When fixing IPv6 link-local address generation on GRE devices with commit 3e6a0243ff00 ("gre: Fix again IPv6 link-local address generation."), I accidentally broke the default IPv6 multicast route creation on these GRE devices. Fix that in patch 1, making the GRE specific code yet a bit closer to the generic code used by most other network interface types. Then extend the selftest in patch 2 to cover this case. ==================== Link: https://patch.msgid.link/cover.1752070620.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 4d61a8a7334399f457867442445a4f916b40cddb Author: Guillaume Nault Date: Wed Jul 9 16:30:17 2025 +0200 selftests: Add IPv6 multicast route generation tests for GRE devices. The previous patch fixes a bug that prevented the creation of the default IPv6 multicast route (ff00::/8) for some GRE devices. Now let's extend the GRE IPv6 selftests to cover this case. Also, rename check_ipv6_ll_addr() to check_ipv6_device_config() and adapt comments and script output to take into account the fact that we're not limited to link-local address generation. Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/65a89583bde3bf866a1922c2e5158e4d72c520e2.1752070620.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 4e914ef063de40397e25a025c70d9737a9e45a8c Author: Guillaume Nault Date: Wed Jul 9 16:30:10 2025 +0200 gre: Fix IPv6 multicast route creation. Use addrconf_add_dev() instead of ipv6_find_idev() in addrconf_gre_config() so that we don't just get the inet6_dev, but also install the default ff00::/8 multicast route. Before commit 3e6a0243ff00 ("gre: Fix again IPv6 link-local address generation."), the multicast route was created at the end of the function by addrconf_add_mroute(). But this code path is now only taken in one particular case (gre devices not bound to a local IP address and in EUI64 mode). For all other cases, the function exits early and addrconf_add_mroute() is not called anymore. Using addrconf_add_dev() instead of ipv6_find_idev() in addrconf_gre_config(), fixes the problem as it will create the default multicast route for all gre devices. This also brings addrconf_gre_config() a bit closer to the normal netdevice IPv6 configuration code (addrconf_dev_config()). Cc: stable@vger.kernel.org Fixes: 3e6a0243ff00 ("gre: Fix again IPv6 link-local address generation.") Reported-by: Aiden Yang Closes: https://lore.kernel.org/netdev/CANR=AhRM7YHHXVxJ4DmrTNMeuEOY87K2mLmo9KMed1JMr20p6g@mail.gmail.com/ Reviewed-by: Gary Guo Tested-by: Gary Guo Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/027a923dcb550ad115e6d93ee8bb7d310378bd01.1752070620.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 2dfa4e31768bd73bc02a69f8f2cd11dd95f062bf Merge: 01b8114b432d7b dd4360c0e8504f Author: Jakub Kicinski Date: Thu Jul 10 18:08:18 2025 -0700 Merge branch 'net-phy-microchip-lan88xx-reliability-fixes' Oleksij Rempel says: ==================== net: phy: microchip: LAN88xx reliability fixes This patch series improves the reliability of the Microchip LAN88xx PHYs, particularly in edge cases involving fixed link configurations or forced speed modes. Patch 1 assigns genphy_soft_reset() to the .soft_reset hook to ensure that stale link partner advertisement (LPA) bits are properly cleared during reconfiguration. Without this, outdated autonegotiation bits may remain visible in some parallel detection cases. Patch 2 restricts the 100 Mbps workaround (originally intended to handle cable length switching) to only run when the link transitions to the PHY_NOLINK state. This prevents repeated toggling that can confuse autonegotiating link partners such as the Intel i350, leading to unstable link cycles. Both patches were tested on a LAN7850 (with integrated LAN88xx PHY) against an Intel I350 NIC. The full test suite - autonegotiation, fixed link, and parallel detection - passed successfully. ==================== Link: https://patch.msgid.link/20250709130753.3994461-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit dd4360c0e8504f2f7639c7f5d07c93cfd6a98333 Author: Oleksij Rempel Date: Wed Jul 9 15:07:53 2025 +0200 net: phy: microchip: limit 100M workaround to link-down events on LAN88xx Restrict the 100Mbit forced-mode workaround to link-down transitions only, to prevent repeated link reset cycles in certain configurations. The workaround was originally introduced to improve signal reliability when switching cables between long and short distances. It temporarily forces the PHY into 10 Mbps before returning to 100 Mbps. However, when used with autonegotiating link partners (e.g., Intel i350), executing this workaround on every link change can confuse the partner and cause constant renegotiation loops. This results in repeated link down/up transitions and the PHY never reaching a stable state. Limit the workaround to only run during the PHY_NOLINK state. This ensures it is triggered only once per link drop, avoiding disruptive toggling while still preserving its intended effect. Note: I am not able to reproduce the original issue that this workaround addresses. I can only confirm that 100 Mbit mode works correctly in my test setup. Based on code inspection, I assume the workaround aims to reset some internal state machine or signal block by toggling speeds. However, a PHY reset is already performed earlier in the function via phy_init_hw(), which may achieve a similar effect. Without a reproducer, I conservatively keep the workaround but restrict its conditions. Fixes: e57cf3639c32 ("net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250709130753.3994461-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit b4517c363e0e005c7f81ae3be199eec68e87f122 Author: Oleksij Rempel Date: Wed Jul 9 15:07:52 2025 +0200 net: phy: microchip: Use genphy_soft_reset() to purge stale LPA bits Enable .soft_reset for the LAN88xx PHY driver by assigning genphy_soft_reset() to ensure that the phylib core performs a proper soft reset during reconfiguration. Previously, the driver left .soft_reset unimplemented, so calls to phy_init_hw() (e.g., from lan88xx_link_change_notify()) did not fully reset the PHY. As a result, stale contents in the Link Partner Ability (LPA) register could persist, causing the PHY to incorrectly report that the link partner advertised autonegotiation even when it did not. Using genphy_soft_reset() guarantees a clean reset of the PHY and corrects the false autoneg reporting in these scenarios. Fixes: ccb989e4d1ef ("net: phy: microchip: Reset LAN88xx PHY to ensure clean link state on LAN7800/7850") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250709130753.3994461-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 01b8114b432d7baaa5e51ab229c12c4f36b8e2c6 Author: Mingming Cao Date: Wed Jul 9 08:33:32 2025 -0700 ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeof The previous hardcoded definitions of NUM_RX_STATS and NUM_TX_STATS were not updated when new fields were added to the ibmvnic_{rx,tx}_queue_stats structures. Specifically, commit 2ee73c54a615 ("ibmvnic: Add stat for tx direct vs tx batched") added a fourth TX stat, but NUM_TX_STATS remained 3, leading to a mismatch. This patch replaces the static defines with dynamic sizeof-based calculations to ensure the stat arrays are correctly sized. This fixes incorrect indexing and prevents incomplete stat reporting in tools like ethtool. Fixes: 2ee73c54a615 ("ibmvnic: Add stat for tx direct vs tx batched") Signed-off-by: Mingming Cao Reviewed-by: Dave Marquardt Reviewed-by: Haren Myneni Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250709153332.73892-1-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski commit 711c80f7d8b163d3ecd463cd96f07230f488e750 Author: Kito Xu Date: Wed Jul 9 03:52:51 2025 +0000 net: appletalk: Fix device refcount leak in atrtr_create() When updating an existing route entry in atrtr_create(), the old device reference was not being released before assigning the new device, leading to a device refcount leak. Fix this by calling dev_put() to release the old device reference before holding the new one. Fixes: c7f905f0f6d4 ("[ATALK]: Add missing dev_hold() to atrtr_create().") Signed-off-by: Kito Xu Link: https://patch.msgid.link/tencent_E1A26771CDAB389A0396D1681A90A49E5D09@qq.com Signed-off-by: Jakub Kicinski commit 7ac5cc2616257cf80d32a8814e44474f07efed62 Merge: 18cdb3d982da89 c07981af55d3ba Author: Jakub Kicinski Date: Thu Jul 10 17:13:46 2025 -0700 Merge tag 'wireless-2025-07-10' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Quite a number of fixes still: - mt76 (hadn't sent any fixes so far) - RCU - scanning - decapsulation offload - interface combinations - rt2x00: build fix (bad function pointer prototype) - cfg80211: prevent A-MSDU flipping attacks in mesh - zd1211rw: prevent race ending with NULL ptr deref - cfg80211/mac80211: more S1G fixes - mwifiex: avoid WARN on certain RX frames - mac80211: - avoid stack data leak in WARN cases - fix non-transmitted BSSID search (on certain multi-BSSID APs) - always initialize key list so driver iteration won't crash - fix monitor interface in device restart - fix __free() annotation usage * tag 'wireless-2025-07-10' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (26 commits) wifi: mac80211: add the virtual monitor after reconfig complete wifi: mac80211: always initialize sdata::key_list wifi: mac80211: Fix uninitialized variable with __free() in ieee80211_ml_epcs() wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel wifi: mt76: mt7925: Fix null-ptr-deref in mt7925_thermal_init() wifi: mt76: fix queue assignment for deauth packets wifi: mt76: add a wrapper for wcid access with validation wifi: mt76: mt7921: prevent decap offload config before STA initialization wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_sta_set_decap_offload() wifi: mt76: mt7925: fix incorrect scan probe IE handling for hw_scan wifi: mt76: mt7925: fix invalid array index in ssid assignment during hw scan wifi: mt76: mt7925: fix the wrong config for tx interrupt wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work() wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl() wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed() wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field() wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context wifi: prevent A-MSDU attacks in mesh networks wifi: rt2x00: fix remove callback type mismatch wifi: mac80211: reject VHT opmode for unsupported channel widths ... ==================== Link: https://patch.msgid.link/20250710122212.24272-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 18cdb3d982da8976b28d57691eb256ec5688fad2 Author: Eric Dumazet Date: Mon Jul 7 12:45:17 2025 +0000 netfilter: flowtable: account for Ethernet header in nf_flow_pppoe_proto() syzbot found a potential access to uninit-value in nf_flow_pppoe_proto() Blamed commit forgot the Ethernet header. BUG: KMSAN: uninit-value in nf_flow_offload_inet_hook+0x7e4/0x940 net/netfilter/nf_flow_table_inet.c:27 nf_flow_offload_inet_hook+0x7e4/0x940 net/netfilter/nf_flow_table_inet.c:27 nf_hook_entry_hookfn include/linux/netfilter.h:157 [inline] nf_hook_slow+0xe1/0x3d0 net/netfilter/core.c:623 nf_hook_ingress include/linux/netfilter_netdev.h:34 [inline] nf_ingress net/core/dev.c:5742 [inline] __netif_receive_skb_core+0x4aff/0x70c0 net/core/dev.c:5837 __netif_receive_skb_one_core net/core/dev.c:5975 [inline] __netif_receive_skb+0xcc/0xac0 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x57/0x630 net/core/dev.c:6235 tun_rx_batched+0x1df/0x980 drivers/net/tun.c:1485 tun_get_user+0x4ee0/0x6b40 drivers/net/tun.c:1938 tun_chr_write_iter+0x3e9/0x5c0 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0xb4b/0x1580 fs/read_write.c:686 ksys_write fs/read_write.c:738 [inline] __do_sys_write fs/read_write.c:749 [inline] Reported-by: syzbot+bf6ed459397e307c3ad2@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/686bc073.a00a0220.c7b3.0086.GAE@google.com/T/#u Fixes: 87b3593bed18 ("netfilter: flowtable: validate pppoe header") Signed-off-by: Eric Dumazet Reviewed-by: Pablo Neira Ayuso Link: https://patch.msgid.link/20250707124517.614489-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit a8b289f0f2dcbadd8c207ad8f33cf7ba2b4eb088 Author: Arnd Bergmann Date: Thu Jul 10 10:00:12 2025 +0200 irqchip/irq-msi-lib: Fix build with PCI disabled The armada-370-xp irqchip fails in some randconfig builds because of a missing declaration: In file included from drivers/irqchip/irq-armada-370-xp.c:23: include/linux/irqchip/irq-msi-lib.h:25:39: error: 'struct msi_domain_info' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] Add a forward declaration for the msi_domain_info structure. [ tglx: Fixed up the subsystem prefix. Is it really that hard to get right? ] Fixes: e51b27438a10 ("irqchip: Make irq-msi-lib.h globally available") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/all/20250710080021.2303640-1-arnd@kernel.org commit 68ea85df15d111d82fc474cbe104174791169355 Author: Himanshu Madhani Date: Tue Jul 8 22:25:30 2025 +0000 PCI/MSI: Prevent recursive locking in pci_msix_write_tph_tag() pci_msix_write_tph_tag() takes the per device MSI descriptor mutex and then invokes msi_domain_get_virq(), which takes the same mutex again. That obviously results in a system hang which is exposed by a softlockup or lockdep warning. Move the lock guard after the invocation of msi_domain_get_virq() to fix this. [ tglx: Massage changelog by adding a proper explanation and removing the not really useful stacktrace ] Fixes: d5124a9957b2 ("PCI/MSI: Provide a sane mechanism for TPH") Reported-by: Jorge Lopez Suggested-by: Thomas Gleixner Signed-off-by: Himanshu Madhani Signed-off-by: Thomas Gleixner Tested-by: Jorge Lopez Link: https://lore.kernel.org/all/20250708222530.1041477-1-himanshu.madhani@oracle.com commit 073b3eca08f915d9b92818ed8c30123c54058206 Author: Binbin Wu Date: Tue Jul 1 09:25:36 2025 +0800 Documentation: KVM: Fix unexpected unindent warning Add proper indentations to bullet list item to resolve the warning: "Bullet list ends without a blank line; unexpected unindent." Closes:https://lore.kernel.org/kvm/20250623162110.6e2f4241@canb.auug.org.au Fixes: 4580dbef5ce0 ("KVM: TDX: Exit to userspace for SetupEventNotifyInterrupt") Reported-by: Stephen Rothwell Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20250701012536.1281367-1-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit bc9ff192a6c940d9a26e21a0a82f2667067aaf5f Merge: 73d7cf07109e79 dd831ac8221e69 Author: Linus Torvalds Date: Thu Jul 10 09:18:53 2025 -0700 Merge tag 'net-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from Bluetooth. Current release - regressions: - tcp: refine sk_rcvbuf increase for ooo packets - bluetooth: fix attempting to send HCI_Disconnect to BIS handle - rxrpc: fix over large frame size warning - eth: bcmgenet: initialize u64 stats seq counter Previous releases - regressions: - tcp: correct signedness in skb remaining space calculation - sched: abort __tc_modify_qdisc if parent class does not exist - vsock: fix transport_{g2h,h2g} TOCTOU - rxrpc: fix bug due to prealloc collision - tipc: fix use-after-free in tipc_conn_close(). - bluetooth: fix not marking Broadcast Sink BIS as connected - phy: qca808x: fix WoL issue by utilizing at8031_set_wol() - eth: am65-cpsw-nuss: fix skb size by accounting for skb_shared_info Previous releases - always broken: - netlink: fix wraparounds of sk->sk_rmem_alloc. - atm: fix infinite recursive call of clip_push(). - eth: - stmmac: fix interrupt handling for level-triggered mode in DWC_XGMAC2 - rtsn: fix a null pointer dereference in rtsn_probe()" * tag 'net-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (37 commits) net/sched: sch_qfq: Fix null-deref in agg_dequeue rxrpc: Fix oops due to non-existence of prealloc backlog struct rxrpc: Fix bug due to prealloc collision MAINTAINERS: remove myself as netronome maintainer selftests/net: packetdrill: add tcp_ooo-before-and-after-accept.pkt tcp: refine sk_rcvbuf increase for ooo packets net/sched: Abort __tc_modify_qdisc if parent class does not exist net: ethernet: ti: am65-cpsw-nuss: Fix skb size by accounting for skb_shared_info net: thunderx: avoid direct MTU assignment after WRITE_ONCE() selftests/tc-testing: Create test case for UAF scenario with DRR/NETEM/BLACKHOLE chain atm: clip: Fix NULL pointer dereference in vcc_sendmsg() atm: clip: Fix infinite recursive call of clip_push(). atm: clip: Fix memory leak of struct clip_vcc. atm: clip: Fix potential null-ptr-deref in to_atmarpd(). net: phy: smsc: Fix link failure in forced mode with Auto-MDIX net: phy: smsc: Force predictable MDI-X state on LAN87xx net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap net: stmmac: Fix interrupt handling for level-triggered mode in DWC_XGMAC2 rxrpc: Fix over large frame size warning net: airoha: Fix an error handling path in airoha_probe() ... commit 73d7cf07109e79b093d1a1fb57a88d4048cd9b4b Merge: 8c2e52ebbe885c 4578a747f3c795 Author: Linus Torvalds Date: Thu Jul 10 09:06:53 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Many patches, pretty much all of them small, that accumulated while I was on vacation. ARM: - Remove the last leftovers of the ill-fated FPSIMD host state mapping at EL2 stage-1 - Fix unexpected advertisement to the guest of unimplemented S2 base granule sizes - Gracefully fail initialising pKVM if the interrupt controller isn't GICv3 - Also gracefully fail initialising pKVM if the carveout allocation fails - Fix the computing of the minimum MMIO range required for the host on stage-2 fault - Fix the generation of the GICv3 Maintenance Interrupt in nested mode x86: - Reject SEV{-ES} intra-host migration if one or more vCPUs are actively being created, so as not to create a non-SEV{-ES} vCPU in an SEV{-ES} VM - Use a pre-allocated, per-vCPU buffer for handling de-sparsification of vCPU masks in Hyper-V hypercalls; fixes a "stack frame too large" issue - Allow out-of-range/invalid Xen event channel ports when configuring IRQ routing, to avoid dictating a specific ioctl() ordering to userspace - Conditionally reschedule when setting memory attributes to avoid soft lockups when userspace converts huge swaths of memory to/from private - Add back MWAIT as a required feature for the MONITOR/MWAIT selftest - Add a missing field in struct sev_data_snp_launch_start that resulted in the guest-visible workarounds field being filled at the wrong offset - Skip non-canonical address when processing Hyper-V PV TLB flushes to avoid VM-Fail on INVVPID - Advertise supported TDX TDVMCALLs to userspace - Pass SetupEventNotifyInterrupt arguments to userspace - Fix TSC frequency underflow" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: avoid underflow when scaling TSC frequency KVM: arm64: Remove kvm_arch_vcpu_run_map_fp() KVM: arm64: Fix handling of FEAT_GTG for unimplemented granule sizes KVM: arm64: Don't free hyp pages with pKVM on GICv2 KVM: arm64: Fix error path in init_hyp_mode() KVM: arm64: Adjust range correctly during host stage-2 faults KVM: arm64: nv: Fix MI line level calculation in vgic_v3_nested_update_mi() KVM: x86/hyper-v: Skip non-canonical addresses during PV TLB flush KVM: SVM: Add missing member in SNP_LAUNCH_START command structure Documentation: KVM: Fix unexpected unindent warnings KVM: selftests: Add back the missing check of MONITOR/MWAIT availability KVM: Allow CPU to reschedule while setting per-page memory attributes KVM: x86/xen: Allow 'out of range' event channel ports in IRQ routing table. KVM: x86/hyper-v: Use preallocated per-vCPU buffer for de-sparsified vCPU masks KVM: SVM: Initialize vmsa_pa in VMCB to INVALID_PAGE if VMSA page is NULL KVM: SVM: Reject SEV{-ES} intra host migration if vCPU creation is in-flight KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities KVM: TDX: Exit to userspace for SetupEventNotifyInterrupt commit e778689390c71462a099b5d6e56d71c316486184 Author: Hans de Goede Date: Mon Jul 7 23:14:12 2025 +0200 drm/i915/bios: Apply vlv_fixup_mipi_sequences() to v2 mipi-sequences too It turns out that the fixup from vlv_fixup_mipi_sequences() is necessary for some DSI panel's with version 2 mipi-sequences too. Specifically the Acer Iconia One 8 A1-840 (not to be confused with the A1-840FHD which is different) has the following sequences: BDB block 53 (1284 bytes) - MIPI sequence block: Sequence block version v2 Panel 0 * Sequence 2 - MIPI_SEQ_INIT_OTP GPIO index 9, source 0, set 0 (0x00) Delay: 50000 us GPIO index 9, source 0, set 1 (0x01) Delay: 6000 us GPIO index 9, source 0, set 0 (0x00) Delay: 6000 us GPIO index 9, source 0, set 1 (0x01) Delay: 25000 us Send DCS: Port A, VC 0, LP, Type 39, Length 5, Data ff aa 55 a5 80 Send DCS: Port A, VC 0, LP, Type 39, Length 3, Data 6f 11 00 ... Send DCS: Port A, VC 0, LP, Type 05, Length 1, Data 29 Delay: 120000 us Sequence 4 - MIPI_SEQ_DISPLAY_OFF Send DCS: Port A, VC 0, LP, Type 05, Length 1, Data 28 Delay: 105000 us Send DCS: Port A, VC 0, LP, Type 05, Length 2, Data 10 00 Delay: 10000 us Sequence 5 - MIPI_SEQ_ASSERT_RESET Delay: 10000 us GPIO index 9, source 0, set 0 (0x00) Notice how there is no MIPI_SEQ_DEASSERT_RESET, instead the deassert is done at the beginning of MIPI_SEQ_INIT_OTP, which is exactly what the fixup from vlv_fixup_mipi_sequences() fixes up. Extend it to also apply to v2 sequences, this fixes the panel not working on the Acer Iconia One 8 A1-840. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14605 Signed-off-by: Hans de Goede Acked-by: Jani Nikula Link: https://lore.kernel.org/r/20250703143824.7121-1-hansg@kernel.org Signed-off-by: Rodrigo Vivi (cherry picked from commit 11895f375939d60efe7ed5dddc1cffe2e79f976c) Signed-off-by: Rodrigo Vivi commit b1bf1a782fdf5c482215c0c661b5da98b8e75773 Author: Sheng Yong Date: Thu Jul 10 14:48:55 2025 +0800 dm-bufio: fix sched in atomic context If "try_verify_in_tasklet" is set for dm-verity, DM_BUFIO_CLIENT_NO_SLEEP is enabled for dm-bufio. However, when bufio tries to evict buffers, there is a chance to trigger scheduling in spin_lock_bh, the following warning is hit: BUG: sleeping function called from invalid context at drivers/md/dm-bufio.c:2745 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 123, name: kworker/2:2 preempt_count: 201, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by kworker/2:2/123: #0: ffff88800a2d1548 ((wq_completion)dm_bufio_cache){....}-{0:0}, at: process_one_work+0xe46/0x1970 #1: ffffc90000d97d20 ((work_completion)(&dm_bufio_replacement_work)){....}-{0:0}, at: process_one_work+0x763/0x1970 #2: ffffffff8555b528 (dm_bufio_clients_lock){....}-{3:3}, at: do_global_cleanup+0x1ce/0x710 #3: ffff88801d5820b8 (&c->spinlock){....}-{2:2}, at: do_global_cleanup+0x2a5/0x710 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 2 UID: 0 PID: 123 Comm: kworker/2:2 Not tainted 6.16.0-rc3-g90548c634bd0 #305 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 Workqueue: dm_bufio_cache do_global_cleanup Call Trace: dump_stack_lvl+0x53/0x70 __might_resched+0x360/0x4e0 do_global_cleanup+0x2f5/0x710 process_one_work+0x7db/0x1970 worker_thread+0x518/0xea0 kthread+0x359/0x690 ret_from_fork+0xf3/0x1b0 ret_from_fork_asm+0x1a/0x30 That can be reproduced by: veritysetup format --data-block-size=4096 --hash-block-size=4096 /dev/vda /dev/vdb SIZE=$(blockdev --getsz /dev/vda) dmsetup create myverity -r --table "0 $SIZE verity 1 /dev/vda /dev/vdb 4096 4096 1 sha256 1 try_verify_in_tasklet" mount /dev/dm-0 /mnt -o ro echo 102400 > /sys/module/dm_bufio/parameters/max_cache_size_bytes [read files in /mnt] Cc: stable@vger.kernel.org # v6.4+ Fixes: 450e8dee51aa ("dm bufio: improve concurrent IO performance") Signed-off-by: Wang Shuai Signed-off-by: Sheng Yong Signed-off-by: Mikulas Patocka commit d9b99eb3d76a603442311926617654f0e35581d4 Author: Edip Hazuri Date: Thu Jul 10 16:18:12 2025 +0300 ALSA: hda/realtek - Fix mute LED for HP Victus 16-r0xxx The mute led on this laptop is using ALC245 but requires a quirk to work This patch enables the existing quirk for the device. Tested on Victus 16-r0xxx Laptop. The LED behaviour works as intended. Cc: Signed-off-by: Edip Hazuri Link: https://patch.msgid.link/20250710131812.27509-1-edip@medip.dev Signed-off-by: Takashi Iwai commit 252f4ac08cd2f16ecd20e4c5e41ac2a17dd86942 Author: Fabio Porcedda Date: Thu Jul 10 14:16:38 2025 +0200 USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition Add Telit Cinterion FE910C04 (ECM) composition: 0x10c7: ECM + tty (AT) + tty (AT) + tty (diag) usb-devices output: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10c7 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FE910 S: SerialNumber=f71b8b32 C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Fabio Porcedda Signed-off-by: Johan Hovold commit c980666b6958d9a841597331b38115a29a32250e Author: Ryan Mann (NDI) Date: Thu Jul 10 13:08:00 2025 +0000 USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI NDI (Northern Digital Inc.) is introducing a new product called the EMGUIDE GEMINI that will use an FTDI chip for USB serial communications. Add the NDI EMGUIDE GEMINI product ID that uses the NDI Vendor ID rather than the FTDI Vendor ID, unlike older products. Signed-off-by: Ryan Mann Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit c07981af55d3ba3ec3be880cfe4a0cc10f1f7138 Author: Miri Korenblit Date: Wed Jul 9 23:34:56 2025 +0300 wifi: mac80211: add the virtual monitor after reconfig complete In reconfig we add the virtual monitor in 2 cases: 1. If we are resuming (it was deleted on suspend) 2. If it was added after an error but before the reconfig (due to the last non-monitor interface removal). In the second case, the removal of the non-monitor interface will succeed but the addition of the virtual monitor will fail, so we add it in the reconfig. The problem is that we mislead the driver to think that this is an existing interface that is getting re-added - while it is actually a completely new interface from the drivers' point of view. Some drivers act differently when a interface is re-added. For example, it might not initialize things because they were already initialized. Such drivers will - in this case - be left with a partialy initialized vif. To fix it, add the virtual monitor after reconfig_complete, so the driver will know that this is a completely new interface. Fixes: 3c3e21e7443b ("mac80211: destroy virtual monitor interface across suspend") Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250709233451.648d39b041e8.I2e37b68375278987e303d6c00cc5f3d8334d2f96@changeid Signed-off-by: Johannes Berg commit d7a54d02db41f72f0581a3c77c75b0993ed3f6e2 Author: Miri Korenblit Date: Wed Jul 9 23:34:10 2025 +0300 wifi: mac80211: always initialize sdata::key_list This is currently not initialized for a virtual monitor, leading to a NULL pointer dereference when - for example - iterating over all the keys of all the vifs. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250709233400.8dcefe578497.I4c90a00ae3256520e063199d7f6f2580d5451acf@changeid Signed-off-by: Johannes Berg commit 04515e08bca9b5a1f9729b8d99d8b322e56d7454 Author: Andy Shevchenko Date: Thu Jul 10 12:41:20 2025 +0300 HID: debug: Remove duplicate entry (BTN_WHEEL) BTN_WHEEL is duplicated (by value) and compiler is not happy about that: drivers/hid/hid-debug.c:3302:16: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides] 3302 | [BTN_WHEEL] = "BtnWheel", [KEY_OK] = "Ok", | ^~~~~~~~~~ drivers/hid/hid-debug.c:3301:20: note: previous initialization is here 3301 | [BTN_GEAR_DOWN] = "BtnGearDown", [BTN_GEAR_UP] = "BtnGearUp", | ^~~~~~~~~~~~~ Remove it again, as the commit 7b2daa648eb7 ("HID: debug: Remove duplicates from 'keys'") already did this once in the past. Fixes: 194808a1ea39 ("HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL") Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250710094120.753358-1-andriy.shevchenko@linux.intel.com Signed-off-by: Benjamin Tissoires commit 04f9196ba981c9f23fa0c3c30bb290fb81848cec Merge: 19c4096ccdd809 a609bd74b8680d Author: Takashi Iwai Date: Thu Jul 10 11:59:31 2025 +0200 Merge tag 'asoc-fix-v6.16-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 Two patches here, one quirk for an AMD system and a fix for an issue on remove of the AVS driver. commit 6aae87fe7f180cd93a74466cdb6cf2aa9bb28798 Author: Clément Le Goffic Date: Fri Jul 4 10:39:15 2025 +0200 i2c: stm32f7: unmap DMA mapped buffer Before each I2C transfer using DMA, the I2C buffer is DMA'pped to make sure the memory buffer is DMA'able. This is handle in the function `stm32_i2c_prep_dma_xfer()`. If the transfer fails for any reason the I2C buffer must be unmap. Use the dma_callback to factorize the code and fix this issue. Note that the `stm32f7_i2c_dma_callback()` is now called in case of DMA transfer success and error and that the `complete()` on the dma_complete completion structure is done inconditionnally in case of transfer success or error as well as the `dmaengine_terminate_async()`. This is allowed as a `complete()` in case transfer error has no effect as well as a `dmaengine_terminate_async()` on a transfer success. Also fix the unneeded cast and remove not more needed variables. Fixes: 7ecc8cfde553 ("i2c: i2c-stm32f7: Add DMA support") Signed-off-by: Clément Le Goffic Cc: # v4.18+ Acked-by: Alain Volmat Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250704-i2c-upstream-v4-2-84a095a2c728@foss.st.com commit c870cbbd71fccda71d575f0acd4a8d2b7cd88861 Author: Clément Le Goffic Date: Fri Jul 4 10:39:14 2025 +0200 i2c: stm32: fix the device used for the DMA map If the DMA mapping failed, it produced an error log with the wrong device name: "stm32-dma3 40400000.dma-controller: rejecting DMA map of vmalloc memory" Fix this issue by replacing the dev with the I2C dev. Fixes: bb8822cbbc53 ("i2c: i2c-stm32: Add generic DMA API") Signed-off-by: Clément Le Goffic Cc: # v4.18+ Acked-by: Alain Volmat Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250704-i2c-upstream-v4-1-84a095a2c728@foss.st.com commit 60c016afccac7acb78a43b9c75480887ed3ce48e Author: Christophe JAILLET Date: Sat Jul 5 09:57:38 2025 +0200 i2c: omap: Fix an error handling path in omap_i2c_probe() If an error occurs after pm_runtime_use_autosuspend(), a corresponding pm_runtime_dont_use_autosuspend() should be called. In case of error in pm_runtime_resume_and_get(), it is not the case because the error handling path is wrongly ordered. Fix it. Fixes: 780f62974125 ("i2c: omap: fix reference leak when pm_runtime_get_sync fails") Signed-off-by: Christophe JAILLET Cc: # v5.13+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/af8a9b62996bebbaaa7c02986aa2a8325ef11596.1751701715.git.christophe.jaillet@wanadoo.fr commit a9503a2ecd95e23d7243bcde7138192de8c1c281 Author: Christophe JAILLET Date: Sat Jul 5 09:57:37 2025 +0200 i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe() omap_i2c_init() can fail. Handle this error in omap_i2c_probe(). Fixes: 010d442c4a29 ("i2c: New bus driver for TI OMAP boards") Signed-off-by: Christophe JAILLET Cc: # v2.6.19+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/565311abf9bafd7291ca82bcecb48c1fac1e727b.1751701715.git.christophe.jaillet@wanadoo.fr commit dd831ac8221e691e9e918585b1003c7071df0379 Author: Xiang Mei Date: Sat Jul 5 14:21:43 2025 -0700 net/sched: sch_qfq: Fix null-deref in agg_dequeue To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c) when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return value before using it, similar to the existing approach in sch_hfsc.c. To avoid code duplication, the following changes are made: 1. Changed qdisc_warn_nonwc(include/net/pkt_sched.h) into a static inline function. 2. Moved qdisc_peek_len from net/sched/sch_hfsc.c to include/net/pkt_sched.h so that sch_qfq can reuse it. 3. Applied qdisc_peek_len in agg_dequeue to avoid crashing. Signed-off-by: Xiang Mei Reviewed-by: Cong Wang Link: https://patch.msgid.link/20250705212143.3982664-1-xmei5@asu.edu Signed-off-by: Paolo Abeni commit d31fbdc4c7252846ea80235db8c1a8c932da9d39 Author: Chao Yu Date: Thu Jul 10 15:36:18 2025 +0800 erofs: allow readdir() to be interrupted In a quick slow device, readdir() may loop for long time in large directory, let's give a chance to allow it to be interrupted by userspace. Signed-off-by: Chao Yu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250710073619.4083422-1-chao@kernel.org [ Gao Xiang: move cond_resched() to the end of the while loop. ] Signed-off-by: Gao Xiang commit 27917e8194f91dffd8b4825350c63cb68e98ce58 Author: Gao Xiang Date: Wed Jul 9 11:46:14 2025 +0800 erofs: address D-cache aliasing Flush the D-cache before unlocking folios for compressed inodes, as they are dirtied during decompression. Avoid calling flush_dcache_folio() on every CPU write, since it's more like playing whack-a-mole without real benefit. It has no impact on x86 and arm64/risc-v: on x86, flush_dcache_folio() is a no-op, and on arm64/risc-v, PG_dcache_clean (PG_arch_1) is clear for new page cache folios. However, certain ARM boards are affected, as reported. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Closes: https://lore.kernel.org/r/c1e51e16-6cc6-49d0-a63e-4e9ff6c4dd53@pengutronix.de Closes: https://lore.kernel.org/r/38d43fae-1182-4155-9c5b-ffc7382d9917@siemens.com Tested-by: Jan Kiszka Tested-by: Stefan Kerkmann Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250709034614.2780117-2-hsiangkao@linux.alibaba.com commit f5443d0d1ad775927f1473b1c256ef68f2515b9c Author: Gao Xiang Date: Wed Jul 9 11:46:13 2025 +0800 erofs: use memcpy_to_folio() to replace copy_to_iter() Using copy_to_iter() here is overkill and even messy. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250709034614.2780117-1-hsiangkao@linux.alibaba.com commit 99f7619a77a0a2e3e2bcae676d0f301769167754 Author: Chao Yu Date: Tue Jul 8 19:19:42 2025 +0800 erofs: fix to add missing tracepoint in erofs_read_folio() Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readpage() tracepoint in the meantime, let's add it back. Fixes: 771c994ea51f ("erofs: convert all uncompressed cases to iomap") Signed-off-by: Chao Yu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250708111942.3120926-1-chao@kernel.org Signed-off-by: Gao Xiang commit d53238b614e01266a3d36b417b60a502e0698504 Author: Chao Yu Date: Mon Jul 7 16:48:32 2025 +0800 erofs: fix to add missing tracepoint in erofs_readahead() Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readahead() tracepoint in the meantime, let's add it back. Fixes: 771c994ea51f ("erofs: convert all uncompressed cases to iomap") Signed-off-by: Chao Yu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250707084832.2725677-1-chao@kernel.org Signed-off-by: Gao Xiang commit 19c4096ccdd809c6213e2e62b0d4f57c880138cd Author: Arnd Bergmann Date: Thu Jul 10 08:30:49 2025 +0200 ALSA: compress_offload: tighten ioctl command number checks The snd_compr_ioctl() ignores the upper 24 bits of the ioctl command number and only compares the number of the ioctl command, which can cause unintended behavior if an application tries to use an unsupprted command that happens to have the same _IOC_NR() value. Remove the truncation to the low bits and compare the entire ioctl command code like every other driver does. Fixes: b21c60a4edd2 ("ALSA: core: add support for compress_offload") Signed-off-by: Arnd Bergmann Acked-by: Vinod Koul Link: https://patch.msgid.link/20250710063059.2683476-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 6b89819b06d8d339da414f06ef3242f79508be5e Author: Zizhi Wo Date: Thu Jul 3 10:44:18 2025 +0800 cachefiles: Fix the incorrect return value in __cachefiles_write() In __cachefiles_write(), if the return value of the write operation > 0, it is set to 0. This makes it impossible to distinguish scenarios where a partial write has occurred, and will affect the outer calling functions: 1) cachefiles_write_complete() will call "term_func" such as netfs_write_subrequest_terminated(). When "ret" in __cachefiles_write() is used as the "transferred_or_error" of this function, it can not distinguish the amount of data written, makes the WARN meaningless. 2) cachefiles_ondemand_fd_write_iter() can only assume all writes were successful by default when "ret" is 0, and unconditionally return the full length specified by user space. Fix it by modifying "ret" to reflect the actual number of bytes written. Furthermore, returning a value greater than 0 from __cachefiles_write() does not affect other call paths, such as cachefiles_issue_write() and fscache_write(). Fixes: 047487c947e8 ("cachefiles: Implement the I/O routines") Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/20250703024418.2809353-1-wozizhi@huaweicloud.com Signed-off-by: Christian Brauner commit db6cc3f4ac2e6cdc898fc9cbc8b32ae1bf56bdad Author: Chen Yu Date: Fri Jul 4 21:56:20 2025 +0800 Revert "sched/numa: add statistics of numa balance task" This reverts commit ad6b26b6a0a79166b53209df2ca1cf8636296382. This commit introduces per-memcg/task NUMA balance statistics, but unfortunately it introduced a NULL pointer exception due to the following race condition: After a swap task candidate was chosen, its mm_struct pointer was set to NULL due to task exit. Later, when performing the actual task swapping, the p->mm caused the problem. CPU0 CPU1 : ... task_numa_migrate task_numa_find_cpu task_numa_compare # a normal task p is chosen env->best_task = p # p exit: exit_signals(p); p->flags |= PF_EXITING exit_mm p->mm = NULL; migrate_swap_stop __migrate_swap_task((arg->src_task, arg->dst_cpu) count_memcg_event_mm(p->mm, NUMA_TASK_SWAP)# p->mm is NULL task_lock() should be held and the PF_EXITING flag needs to be checked to prevent this from happening. After discussion, the conclusion was that adding a lock is not worthwhile for some statistics calculations. Revert the change and rely on the tracepoint for this purpose. Link: https://lkml.kernel.org/r/20250704135620.685752-1-yu.c.chen@intel.com Link: https://lkml.kernel.org/r/20250708064917.BBD13C4CEED@smtp.kernel.org Fixes: ad6b26b6a0a7 ("sched/numa: add statistics of numa balance task") Signed-off-by: Chen Yu Reported-by: Jirka Hladky Closes: https://lore.kernel.org/all/CAE4VaGBLJxpd=NeRJXpSCuw=REhC5LWJpC29kDy-Zh2ZDyzQZA@mail.gmail.com/ Reported-by: Srikanth Aithal Reported-by: Suneeth D Acked-by: Michal Hocko Cc: Borislav Petkov Cc: Ingo Molnar Cc: Jiri Hladky Cc: Libo Chen Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 82241a83cd15aaaf28200a40ad1a8b480012edaf Author: Baolin Wang Date: Thu Jun 5 20:58:29 2025 +0800 mm: fix the inaccurate memory statistics issue for users On some large machines with a high number of CPUs running a 64K pagesize kernel, we found that the 'RES' field is always 0 displayed by the top command for some processes, which will cause a lot of confusion for users. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 875525 root 20 0 12480 0 0 R 0.3 0.0 0:00.08 top 1 root 20 0 172800 0 0 S 0.0 0.0 0:04.52 systemd The main reason is that the batch size of the percpu counter is quite large on these machines, caching a significant percpu value, since converting mm's rss stats into percpu_counter by commit f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter"). Intuitively, the batch number should be optimized, but on some paths, performance may take precedence over statistical accuracy. Therefore, introducing a new interface to add the percpu statistical count and display it to users, which can remove the confusion. In addition, this change is not expected to be on a performance-critical path, so the modification should be acceptable. In addition, the 'mm->rss_stat' is updated by using add_mm_counter() and dec/inc_mm_counter(), which are all wrappers around percpu_counter_add_batch(). In percpu_counter_add_batch(), there is percpu batch caching to avoid 'fbc->lock' contention. This patch changes task_mem() and task_statm() to get the accurate mm counters under the 'fbc->lock', but this should not exacerbate kernel 'mm->rss_stat' lock contention due to the percpu batch caching of the mm counters. The following test also confirm the theoretical analysis. I run the stress-ng that stresses anon page faults in 32 threads on my 32 cores machine, while simultaneously running a script that starts 32 threads to busy-loop pread each stress-ng thread's /proc/pid/status interface. From the following data, I did not observe any obvious impact of this patch on the stress-ng tests. w/o patch: stress-ng: info: [6848] 4,399,219,085,152 CPU Cycles 67.327 B/sec stress-ng: info: [6848] 1,616,524,844,832 Instructions 24.740 B/sec (0.367 instr. per cycle) stress-ng: info: [6848] 39,529,792 Page Faults Total 0.605 M/sec stress-ng: info: [6848] 39,529,792 Page Faults Minor 0.605 M/sec w/patch: stress-ng: info: [2485] 4,462,440,381,856 CPU Cycles 68.382 B/sec stress-ng: info: [2485] 1,615,101,503,296 Instructions 24.750 B/sec (0.362 instr. per cycle) stress-ng: info: [2485] 39,439,232 Page Faults Total 0.604 M/sec stress-ng: info: [2485] 39,439,232 Page Faults Minor 0.604 M/sec On comparing a very simple app which just allocates & touches some memory against v6.1 (which doesn't have f1a7941243c1) and latest Linus tree (4c06e63b9203) I can see that on latest Linus tree the values for VmRSS, RssAnon and RssFile from /proc/self/status are all zeroes while they do report values on v6.1 and a Linus tree with this patch. Link: https://lkml.kernel.org/r/f4586b17f66f97c174f7fd1f8647374fdb53de1c.1749119050.git.baolin.wang@linux.alibaba.com Fixes: f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter") Signed-off-by: Baolin Wang Reviewed-by: Aboorva Devarajan Tested-by: Aboorva Devarajan Tested-by Donet Tom Acked-by: Shakeel Butt Acked-by: SeongJae Park Acked-by: Michal Hocko Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit bd225b9591442065beb876da72656f4a2d627d03 Author: Honggyu Kim Date: Wed Jul 2 09:02:04 2025 +0900 mm/damon: fix divide by zero in damon_get_intervals_score() The current implementation allows having zero size regions with no special reasons, but damon_get_intervals_score() gets crashed by divide by zero when the region size is zero. [ 29.403950] Oops: divide error: 0000 [#1] SMP NOPTI This patch fixes the bug, but does not disallow zero size regions to keep the backward compatibility since disallowing zero size regions might be a breaking change for some users. In addition, the same crash can happen when intervals_goal.access_bp is zero so this should be fixed in stable trees as well. Link: https://lkml.kernel.org/r/20250702000205.1921-5-honggyu.kim@sk.com Fixes: f04b0fedbe71 ("mm/damon/core: implement intervals auto-tuning") Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Cc: Signed-off-by: Andrew Morton commit ddba1b6cf4791824f8b614ff8878353a6c6f79f5 Author: Honggyu Kim Date: Wed Jul 2 09:02:03 2025 +0900 samples/damon: fix damon sample mtier for start failure The damon_sample_mtier_start() can fail so we must reset the "enable" parameter to "false" again for proper rollback. In such cases, setting Y to "enable" then N triggers the similar crash with mtier because damon sample start failed but the "enable" stays as Y. Link: https://lkml.kernel.org/r/20250702000205.1921-4-honggyu.kim@sk.com Fixes: 82a08bde3cf7 ("samples/damon: implement a DAMON module for memory tiering") Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Cc: Signed-off-by: Andrew Morton commit f1221c8442616a6927aff836327777144545cb29 Author: Honggyu Kim Date: Wed Jul 2 09:02:02 2025 +0900 samples/damon: fix damon sample wsse for start failure The damon_sample_wsse_start() can fail so we must reset the "enable" parameter to "false" again for proper rollback. In such cases, setting Y to "enable" then N triggers the similar crash with wsse because damon sample start failed but the "enable" stays as Y. Link: https://lkml.kernel.org/r/20250702000205.1921-3-honggyu.kim@sk.com Fixes: b757c6cfc696 ("samples/damon/wsse: start and stop DAMON as the user requests") Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Cc: Signed-off-by: Andrew Morton commit d9e01c62b7a0c258a7481c083f84c766a8f5597c Author: Honggyu Kim Date: Wed Jul 2 09:02:01 2025 +0900 samples/damon: fix damon sample prcl for start failure Patch series "mm/damon: fix divide by zero and its samples", v3. This series includes fixes against damon and its samples to make it safer when damon sample starting fails. It includes the following changes. - fix unexpected divide by zero crash for zero size regions - fix bugs for damon samples in case of start failures This patch (of 4): The damon_sample_prcl_start() can fail so we must reset the "enable" parameter to "false" again for proper rollback. In such cases, setting Y to "enable" then N triggers the following crash because damon sample start failed but the "enable" stays as Y. [ 2441.419649] damon_sample_prcl: start [ 2454.146817] damon_sample_prcl: stop [ 2454.146862] ------------[ cut here ]------------ [ 2454.146865] kernel BUG at mm/slub.c:546! [ 2454.148183] Oops: invalid opcode: 0000 [#1] SMP NOPTI ... [ 2454.167555] Call Trace: [ 2454.167822] [ 2454.168061] damon_destroy_ctx+0x78/0x140 [ 2454.168454] damon_sample_prcl_enable_store+0x8d/0xd0 [ 2454.168932] param_attr_store+0xa1/0x120 [ 2454.169315] module_attr_store+0x20/0x50 [ 2454.169695] sysfs_kf_write+0x72/0x90 [ 2454.170065] kernfs_fop_write_iter+0x150/0x1e0 [ 2454.170491] vfs_write+0x315/0x440 [ 2454.170833] ksys_write+0x69/0xf0 [ 2454.171162] __x64_sys_write+0x19/0x30 [ 2454.171525] x64_sys_call+0x18b2/0x2700 [ 2454.171900] do_syscall_64+0x7f/0x680 [ 2454.172258] ? exit_to_user_mode_loop+0xf6/0x180 [ 2454.172694] ? clear_bhb_loop+0x30/0x80 [ 2454.173067] ? clear_bhb_loop+0x30/0x80 [ 2454.173439] entry_SYSCALL_64_after_hwframe+0x76/0x7e Link: https://lkml.kernel.org/r/20250702000205.1921-1-honggyu.kim@sk.com Link: https://lkml.kernel.org/r/20250702000205.1921-2-honggyu.kim@sk.com Fixes: 2aca254620a8 ("samples/damon: introduce a skeleton of a smaple DAMON module for proactive reclamation") Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Cc: Signed-off-by: Andrew Morton commit 6ee9b3d84775944fb8c8a447961cd01274ac671c Author: Yeoreum Yun Date: Thu Jul 3 19:10:18 2025 +0100 kasan: remove kasan_find_vm_area() to prevent possible deadlock find_vm_area() couldn't be called in atomic_context. If find_vm_area() is called to reports vm area information, kasan can trigger deadlock like: CPU0 CPU1 vmalloc(); alloc_vmap_area(); spin_lock(&vn->busy.lock) spin_lock_bh(&some_lock); spin_lock(&some_lock); kasan_report(); print_report(); print_address_description(); kasan_find_vm_area(); find_vm_area(); spin_lock(&vn->busy.lock) // deadlock! To prevent possible deadlock while kasan reports, remove kasan_find_vm_area(). Link: https://lkml.kernel.org/r/20250703181018.580833-1-yeoreum.yun@arm.com Fixes: c056a364e954 ("kasan: print virtual mapping info in reports") Signed-off-by: Yeoreum Yun Reported-by: Yunseong Kim Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Byungchul Park Cc: Dmitriy Vyukov Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Vincenzo Frascino Cc: Signed-off-by: Andrew Morton commit e6d3e653b084f003977bf2e33820cb84d2e4541f Author: Illia Ostapyshyn Date: Sun Jun 29 02:38:11 2025 +0200 scripts: gdb: vfs: support external dentry names d_shortname of struct dentry only reserves D_NAME_INLINE_LEN characters and contains garbage for longer names. Use d_name instead, which always references the valid name. Link: https://lore.kernel.org/all/20250525213709.878287-2-illia@yshyn.com/ Link: https://lkml.kernel.org/r/20250629003811.2420418-1-illia@yshyn.com Fixes: 79300ac805b6 ("scripts/gdb: fix dentry_name() lookup") Signed-off-by: Illia Ostapyshyn Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jan Kiszka Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton commit 10d04c26ab2b7da31dd66973f5a09d6fd8ff2a46 Author: Christoph Berg Date: Tue Jun 24 16:44:27 2025 +0200 mm/migrate: fix do_pages_stat in compat mode For arrays with more than 16 entries, the old code would incorrectly advance the pages pointer by 16 words instead of 16 compat_uptr_t. Fix by doing the pointer arithmetic inside get_compat_pages_array where pages32 is already a correctly-typed pointer. Discovered while working on PostgreSQL 18's new NUMA introspection code. Link: https://lkml.kernel.org/r/aGREU0XTB48w9CwN@msg.df7cb.de Fixes: 5b1b561ba73c ("mm: simplify compat_sys_move_pages") Signed-off-by: Christoph Berg Acked-by: David Hildenbrand Suggested-by: David Hildenbrand Reported-by: Bertrand Drouvot Reported-by: Tomas Vondra Closes: https://www.postgresql.org/message-id/flat/6342f601-77de-4ee0-8c2a-3deb50ceac5b%40vondra.me#86402e3d80c031788f5f55b42c459471 Cc: Alistair Popple Cc: Byungchul Park Cc: Gregory Price Cc: "Huang, Ying" Cc: Joshua Hahn Cc: Mathew Brost Cc: Rakie Kim Cc: Zi Yan Signed-off-by: Andrew Morton commit bb1b5929b4279b136816f95ce1e8f1fa689bf4a1 Author: SeongJae Park Date: Sun Jun 29 13:49:14 2025 -0700 mm/damon/core: handle damon_call_control as normal under kdmond deactivation DAMON sysfs interface internally uses damon_call() to update DAMON parameters as users requested, online. However, DAMON core cancels any damon_call() requests when it is deactivated by DAMOS watermarks. As a result, users cannot change DAMON parameters online while DAMON is deactivated. Note that users can turn DAMON off and on with different watermarks to work around. Since deactivated DAMON is nearly same to stopped DAMON, the work around should have no big problem. Anyway, a bug is a bug. There is no real good reason to cancel the damon_call() request under DAMOS deactivation. Fix it by simply handling the request as normal, rather than cancelling under the situation. Link: https://lkml.kernel.org/r/20250629204914.54114-1-sj@kernel.org Fixes: 42b7491af14c ("mm/damon/core: introduce damon_call()") Signed-off-by: SeongJae Park Cc: [6.14+] Signed-off-by: Andrew Morton commit ddd05742b45b083975a0855ef6ebbf88cf1f532a Author: Lance Yang Date: Fri Jun 27 14:23:19 2025 +0800 mm/rmap: fix potential out-of-bounds page table access during batched unmap As pointed out by David[1], the batched unmap logic in try_to_unmap_one() may read past the end of a PTE table when a large folio's PTE mappings are not fully contained within a single page table. While this scenario might be rare, an issue triggerable from userspace must be fixed regardless of its likelihood. This patch fixes the out-of-bounds access by refactoring the logic into a new helper, folio_unmap_pte_batch(). The new helper correctly calculates the safe batch size by capping the scan at both the VMA and PMD boundaries. To simplify the code, it also supports partial batching (i.e., any number of pages from 1 up to the calculated safe maximum), as there is no strong reason to special-case for fully mapped folios. Link: https://lkml.kernel.org/r/20250701143100.6970-1-lance.yang@linux.dev Link: https://lkml.kernel.org/r/20250630011305.23754-1-lance.yang@linux.dev Link: https://lkml.kernel.org/r/20250627062319.84936-1-lance.yang@linux.dev Link: https://lore.kernel.org/linux-mm/a694398c-9f03-4737-81b9-7e49c857fcbe@redhat.com [1] Fixes: 354dffd29575 ("mm: support batched unmap for lazyfree large folios during reclamation") Signed-off-by: Lance Yang Suggested-by: David Hildenbrand Reported-by: David Hildenbrand Closes: https://lore.kernel.org/linux-mm/a694398c-9f03-4737-81b9-7e49c857fcbe@redhat.com Suggested-by: Barry Song Acked-by: Barry Song Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Reviewed-by: Harry Yoo Cc: Baolin Wang Cc: Chris Li Cc: "Huang, Ying" Cc: Kairui Song Cc: Lance Yang Cc: Liam Howlett Cc: Mingzhe Yang Cc: Rik van Riel Cc: Ryan Roberts Cc: Tangquan Zheng Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit c39b87456411a7e4d97a0f6384ca31f2abb1a4b7 Author: Vivek Kasireddy Date: Thu Jun 26 12:11:16 2025 -0700 mm/hugetlb: don't crash when allocating a folio if there are no resv There are cases when we try to pin a folio but discover that it has not been faulted-in. So, we try to allocate it in memfd_alloc_folio() but there is a chance that we might encounter a fatal crash/failure (VM_BUG_ON(!h->resv_huge_pages) in alloc_hugetlb_folio_reserve()) if there are no active reservations at that instant. This issue was reported by syzbot: kernel BUG at mm/hugetlb.c:2403! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5315 Comm: syz.0.0 Not tainted 6.13.0-rc5-syzkaller-00161-g63676eefb7a0 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:alloc_hugetlb_folio_reserve+0xbc/0xc0 mm/hugetlb.c:2403 Code: 1f eb 05 e8 56 18 a0 ff 48 c7 c7 40 56 61 8e e8 ba 21 cc 09 4c 89 f0 5b 41 5c 41 5e 41 5f 5d c3 cc cc cc cc e8 35 18 a0 ff 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f RSP: 0018:ffffc9000d3d77f8 EFLAGS: 00010087 RAX: ffffffff81ff6beb RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000e51a000 RSI: 00000000000003ec RDI: 00000000000003ed RBP: 1ffffffff34810d9 R08: ffffffff81ff6ba3 R09: 1ffffd4000093005 R10: dffffc0000000000 R11: fffff94000093006 R12: dffffc0000000000 R13: dffffc0000000000 R14: ffffea0000498000 R15: ffffffff9a4086c8 FS: 00007f77ac12e6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f77ab54b170 CR3: 0000000040b70000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: memfd_alloc_folio+0x1bd/0x370 mm/memfd.c:88 memfd_pin_folios+0xf10/0x1570 mm/gup.c:3750 udmabuf_pin_folios drivers/dma-buf/udmabuf.c:346 [inline] udmabuf_create+0x70e/0x10c0 drivers/dma-buf/udmabuf.c:443 udmabuf_ioctl_create drivers/dma-buf/udmabuf.c:495 [inline] udmabuf_ioctl+0x301/0x4e0 drivers/dma-buf/udmabuf.c:526 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Therefore, prevent the above crash by removing the VM_BUG_ON() as there is no need to crash the system in this situation and instead we could just fail the allocation request. Furthermore, as described above, the specific situation where this happens is when we try to pin memfd folios before they are faulted-in. Although, this is a valid thing to do, it is not the regular or the common use-case. Let us consider the following scenarios: 1) hugetlbfs_file_mmap() memfd_alloc_folio() hugetlb_fault() 2) memfd_alloc_folio() hugetlbfs_file_mmap() hugetlb_fault() 3) hugetlbfs_file_mmap() hugetlb_fault() alloc_hugetlb_folio() 3) is the most common use-case where first a memfd is allocated followed by mmap(), user writes/updates and then the relevant folios are pinned (memfd_pin_folios()). The BUG this patch is fixing occurs in 2) because we try to pin the folios before hugetlbfs_file_mmap() is called. So, in this situation we try to allocate the folios before pinning them but since we did not make any reservations, resv_huge_pages would be 0, leading to this issue. Link: https://lkml.kernel.org/r/20250626191116.1377761-1-vivek.kasireddy@intel.com Fixes: 26a8ea80929c ("mm/hugetlb: fix memfd_pin_folios resv_huge_pages leak") Reported-by: syzbot+a504cb5bae4fe117ba94@syzkaller.appspotmail.com Signed-off-by: Vivek Kasireddy Closes: https://syzkaller.appspot.com/bug?extid=a504cb5bae4fe117ba94 Closes: https://lore.kernel.org/all/677928b5.050a0220.3b53b0.004d.GAE@google.com/T/ Acked-by: Oscar Salvador Cc: Steve Sistare Cc: Muchun Song Cc: David Hildenbrand Cc: Anshuman Khandual Signed-off-by: Andrew Morton commit 50f4d2ba26d5c3a4687ae0569be3bbf1c8f0cbed Author: Florian Fainelli Date: Mon Jun 23 20:00:19 2025 -0700 scripts/gdb: de-reference per-CPU MCE interrupts The per-CPU MCE interrupts are looked up by reference and need to be de-referenced before printing, otherwise we print the addresses of the variables instead of their contents: MCE: 18379471554386948492 Machine check exceptions MCP: 18379471554386948488 Machine check polls The corrected output looks like this instead now: MCE: 0 Machine check exceptions MCP: 1 Machine check polls Link: https://lkml.kernel.org/r/20250625021109.1057046-1-florian.fainelli@broadcom.com Link: https://lkml.kernel.org/r/20250624030020.882472-1-florian.fainelli@broadcom.com Fixes: b0969d7687a7 ("scripts/gdb: print interrupts") Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton commit a02b0cde8ee515ee0c8efd33e7fbe6830c282e69 Author: Florian Fainelli Date: Tue Jun 24 19:10:20 2025 -0700 scripts/gdb: fix interrupts.py after maple tree conversion In commit 721255b9826b ("genirq: Use a maple tree for interrupt descriptor management"), the irq_desc_tree was replaced with a sparse_irqs tree using a maple tree structure. Since the script looked for the irq_desc_tree symbol which is no longer available, no interrupts would be printed and the script output would not be useful anymore. In addition to looking up the correct symbol (sparse_irqs), a new module (mapletree.py) is added whose mtree_load() implementation is largely copied after the C version and uses the same variable and intermediate function names wherever possible to ensure that both the C and Python version be updated in the future. This restores the scripts' output to match that of /proc/interrupts. Link: https://lkml.kernel.org/r/20250625021020.1056930-1-florian.fainelli@broadcom.com Fixes: 721255b9826b ("genirq: Use a maple tree for interrupt descriptor management") Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Cc: Shanker Donthineni Cc: Thomas Gleinxer Cc: Signed-off-by: Andrew Morton commit ea9b77f98d94c4d5c1bd1ac1db078f78b40e8bf5 Author: Wei Yang Date: Tue Jun 24 15:18:40 2025 -0400 maple_tree: fix mt_destroy_walk() on root leaf node On destroy, we should set each node dead. But current code miss this when the maple tree has only the root node. The reason is mt_destroy_walk() leverage mte_destroy_descend() to set node dead, but this is skipped since the only root node is a leaf. Fixes this by setting the node dead if it is a leaf. Link: https://lore.kernel.org/all/20250407231354.11771-1-richard.weiyang@gmail.com/ Link: https://lkml.kernel.org/r/20250624191841.64682-1-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Wei Yang Signed-off-by: Liam R. Howlett Reviewed-by: Dev Jain Cc: Signed-off-by: Andrew Morton commit fea18c686320a53fce7ad62a87a3e1d10ad02f31 Author: Alexander Gordeev Date: Mon Jun 23 09:57:21 2025 +0200 mm/vmalloc: leave lazy MMU mode on PTE mapping error vmap_pages_pte_range() enters the lazy MMU mode, but fails to leave it in case an error is encountered. Link: https://lkml.kernel.org/r/20250623075721.2817094-1-agordeev@linux.ibm.com Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Signed-off-by: Alexander Gordeev Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202506132017.T1l1l6ME-lkp@intel.com/ Reviewed-by: Ryan Roberts Cc: Signed-off-by: Andrew Morton commit 7627b459aa0737bdd62a8591a1481cda467f20e3 Author: Florian Fainelli Date: Mon Jun 23 09:41:52 2025 -0700 scripts/gdb: fix interrupts display after MCP on x86 The text line would not be appended to as it should have, it should have been a '+=' but ended up being a '==', fix that. Link: https://lkml.kernel.org/r/20250623164153.746359-1-florian.fainelli@broadcom.com Fixes: b0969d7687a7 ("scripts/gdb: print interrupts") Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton commit 99af22cd34688cc0d535a1919e0bea4cbc6c1ea1 Author: Harry Yoo Date: Sat Jun 21 04:53:05 2025 +0900 lib/alloc_tag: do not acquire non-existent lock in alloc_tag_top_users() alloc_tag_top_users() attempts to lock alloc_tag_cttype->mod_lock even when the alloc_tag_cttype is not allocated because: 1) alloc tagging is disabled because mem profiling is disabled (!alloc_tag_cttype) 2) alloc tagging is enabled, but not yet initialized (!alloc_tag_cttype) 3) alloc tagging is enabled, but failed initialization (!alloc_tag_cttype or IS_ERR(alloc_tag_cttype)) In all cases, alloc_tag_cttype is not allocated, and therefore alloc_tag_top_users() should not attempt to acquire the semaphore. This leads to a crash on memory allocation failure by attempting to acquire a non-existent semaphore: Oops: general protection fault, probably for non-canonical address 0xdffffc000000001b: 0000 [#3] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x00000000000000d8-0x00000000000000df] CPU: 2 UID: 0 PID: 1 Comm: systemd Tainted: G D 6.16.0-rc2 #1 VOLUNTARY Tainted: [D]=DIE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:down_read_trylock+0xaa/0x3b0 Code: d0 7c 08 84 d2 0f 85 a0 02 00 00 8b 0d df 31 dd 04 85 c9 75 29 48 b8 00 00 00 00 00 fc ff df 48 8d 6b 68 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 88 02 00 00 48 3b 5b 68 0f 85 53 01 00 00 65 ff RSP: 0000:ffff8881002ce9b8 EFLAGS: 00010016 RAX: dffffc0000000000 RBX: 0000000000000070 RCX: 0000000000000000 RDX: 000000000000001b RSI: 000000000000000a RDI: 0000000000000070 RBP: 00000000000000d8 R08: 0000000000000001 R09: ffffed107dde49d1 R10: ffff8883eef24e8b R11: ffff8881002cec20 R12: 1ffff11020059d37 R13: 00000000003fff7b R14: ffff8881002cec20 R15: dffffc0000000000 FS: 00007f963f21d940(0000) GS:ffff888458ca6000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f963f5edf71 CR3: 000000010672c000 CR4: 0000000000350ef0 Call Trace: codetag_trylock_module_list+0xd/0x20 alloc_tag_top_users+0x369/0x4b0 __show_mem+0x1cd/0x6e0 warn_alloc+0x2b1/0x390 __alloc_frozen_pages_noprof+0x12b9/0x21a0 alloc_pages_mpol+0x135/0x3e0 alloc_slab_page+0x82/0xe0 new_slab+0x212/0x240 ___slab_alloc+0x82a/0xe00 As David Wang points out, this issue became easier to trigger after commit 780138b12381 ("alloc_tag: check mem_profiling_support in alloc_tag_init"). Before the commit, the issue occurred only when it failed to allocate and initialize alloc_tag_cttype or if a memory allocation fails before alloc_tag_init() is called. After the commit, it can be easily triggered when memory profiling is compiled but disabled at boot. To properly determine whether alloc_tag_init() has been called and its data structures initialized, verify that alloc_tag_cttype is a valid pointer before acquiring the semaphore. If the variable is NULL or an error value, it has not been properly initialized. In such a case, just skip and do not attempt to acquire the semaphore. [harry.yoo@oracle.com: v3] Link: https://lkml.kernel.org/r/20250624072513.84219-1-harry.yoo@oracle.com Link: https://lkml.kernel.org/r/20250620195305.1115151-1-harry.yoo@oracle.com Fixes: 780138b12381 ("alloc_tag: check mem_profiling_support in alloc_tag_init") Fixes: 1438d349d16b ("lib: add memory allocations report in show_mem()") Signed-off-by: Harry Yoo Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202506181351.bba867dd-lkp@intel.com Acked-by: Suren Baghdasaryan Tested-by: Raghavendra K T Cc: Casey Chen Cc: David Wang <00107082@163.com> Cc: Kent Overstreet Cc: Yuanyuan Zhong Cc: Signed-off-by: Andrew Morton commit a95743b53031b015e8949e845a9f6fdfb2656347 Author: Achill Gilgenast Date: Sun Jun 22 03:45:49 2025 +0200 kallsyms: fix build without execinfo Some libc's like musl libc don't provide execinfo.h since it's not part of POSIX. In order to fix compilation on musl, only include execinfo.h if available (HAVE_BACKTRACE_SUPPORT) This was discovered with c104c16073b7 ("Kunit to check the longest symbol length") which starts to include linux/kallsyms.h with Alpine Linux' configs. Link: https://lkml.kernel.org/r/20250622014608.448718-1-fossdd@pwned.life Fixes: c104c16073b7 ("Kunit to check the longest symbol length") Signed-off-by: Achill Gilgenast Cc: Luis Henriques Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton commit 0fda5ccf5425c7b92eaca868a3fba8a3c9f8b746 Merge: ee48b0abeca9af 880a88f318cf1d Author: Jakub Kicinski Date: Wed Jul 9 19:41:45 2025 -0700 Merge branch 'rxrpc-miscellaneous-fixes' David Howells says: ==================== rxrpc: Miscellaneous fixes Here are some miscellaneous fixes for rxrpc: (1) Fix assertion failure due to preallocation collision. (2) Fix oops due to prealloc backlog struct not yet having been allocated if no service calls have yet been preallocated. ==================== Link: https://patch.msgid.link/20250708211506.2699012-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 880a88f318cf1d2a0f4c0a7ff7b07e2062b434a4 Author: David Howells Date: Tue Jul 8 22:15:04 2025 +0100 rxrpc: Fix oops due to non-existence of prealloc backlog struct If an AF_RXRPC service socket is opened and bound, but calls are preallocated, then rxrpc_alloc_incoming_call() will oops because the rxrpc_backlog struct doesn't get allocated until the first preallocation is made. Fix this by returning NULL from rxrpc_alloc_incoming_call() if there is no backlog struct. This will cause the incoming call to be aborted. Reported-by: Junvyyang, Tencent Zhuque Lab Suggested-by: Junvyyang, Tencent Zhuque Lab Signed-off-by: David Howells cc: LePremierHomme cc: Marc Dionne cc: Willy Tarreau cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250708211506.2699012-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 69e4186773c6445b258fb45b6e1df18df831ec45 Author: David Howells Date: Tue Jul 8 22:15:03 2025 +0100 rxrpc: Fix bug due to prealloc collision When userspace is using AF_RXRPC to provide a server, it has to preallocate incoming calls and assign to them call IDs that will be used to thread related recvmsg() and sendmsg() together. The preallocated call IDs will automatically be attached to calls as they come in until the pool is empty. To the kernel, the call IDs are just arbitrary numbers, but userspace can use the call ID to hold a pointer to prepared structs. In any case, the user isn't permitted to create two calls with the same call ID (call IDs become available again when the call ends) and EBADSLT should result from sendmsg() if an attempt is made to preallocate a call with an in-use call ID. However, the cleanup in the error handling will trigger both assertions in rxrpc_cleanup_call() because the call isn't marked complete and isn't marked as having been released. Fix this by setting the call state in rxrpc_service_prealloc_one() and then marking it as being released before calling the cleanup function. Fixes: 00e907127e6f ("rxrpc: Preallocate peers, conns and calls for incoming service requests") Reported-by: Junvyyang, Tencent Zhuque Lab Signed-off-by: David Howells cc: LePremierHomme cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250708211506.2699012-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit ee48b0abeca9afcd5a8bcb92345002d2667893ba Author: Louis Peens Date: Tue Jul 8 10:20:51 2025 +0200 MAINTAINERS: remove myself as netronome maintainer I am moving on from Corigine to different things, for the moment slightly removed from kernel development. Right now there is nobody I can in good conscience recommend to take over the maintainer role, but there are still people available for review, so put the driver state to 'Odd Fixes'. Additionally add Simon Horman as reviewer - thanks Simon. Signed-off-by: Louis Peens Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 95253dc7002408aec7cbb7281478f03797ca2519 Merge: ffdde7bf5a439a b939c074efc160 Author: Jakub Kicinski Date: Wed Jul 9 19:24:12 2025 -0700 Merge branch 'tcp-better-memory-control-for-not-yet-accepted-sockets' Eric Dumazet says: ==================== tcp: better memory control for not-yet-accepted sockets Address a possible OOM condition caused by a recent change. Add a new packetdrill test checking the expected behavior. ==================== Link: https://patch.msgid.link/20250707213900.1543248-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit b939c074efc160648de884a41aeb5e857f2c5c68 Author: Eric Dumazet Date: Mon Jul 7 21:39:00 2025 +0000 selftests/net: packetdrill: add tcp_ooo-before-and-after-accept.pkt Test how new passive flows react to ooo incoming packets. Their sk_rcvbuf can increase only after accept(). Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250707213900.1543248-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit 1a03edeb84e6e3b9c6ca5a642557bced93d54434 Author: Eric Dumazet Date: Mon Jul 7 21:38:59 2025 +0000 tcp: refine sk_rcvbuf increase for ooo packets When a passive flow has not been accepted yet, it is not wise to increase sk_rcvbuf when receiving ooo packets. A very busy server might tune down tcp_rmem[1] to better control how much memory can be used by sockets waiting in its listeners accept queues. Fixes: 63ad7dfedfae ("tcp: adjust rcvbuf in presence of reorders") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250707213900.1543248-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit ffdde7bf5a439aaa1955ebd581f5c64ab1533963 Author: Victor Nogueira Date: Mon Jul 7 18:08:01 2025 -0300 net/sched: Abort __tc_modify_qdisc if parent class does not exist Lion's patch [1] revealed an ancient bug in the qdisc API. Whenever a user creates/modifies a qdisc specifying as a parent another qdisc, the qdisc API will, during grafting, detect that the user is not trying to attach to a class and reject. However grafting is performed after qdisc_create (and thus the qdiscs' init callback) is executed. In qdiscs that eventually call qdisc_tree_reduce_backlog during init or change (such as fq, hhf, choke, etc), an issue arises. For example, executing the following commands: sudo tc qdisc add dev lo root handle a: htb default 2 sudo tc qdisc add dev lo parent a: handle beef fq Qdiscs such as fq, hhf, choke, etc unconditionally invoke qdisc_tree_reduce_backlog() in their control path init() or change() which then causes a failure to find the child class; however, that does not stop the unconditional invocation of the assumed child qdisc's qlen_notify with a null class. All these qdiscs make the assumption that class is non-null. The solution is ensure that qdisc_leaf() which looks up the parent class, and is invoked prior to qdisc_create(), should return failure on not finding the class. In this patch, we leverage qdisc_leaf to return ERR_PTRs whenever the parentid doesn't correspond to a class, so that we can detect it earlier on and abort before qdisc_create is called. [1] https://lore.kernel.org/netdev/d912cbd7-193b-4269-9857-525bee8bbb6a@gmail.com/ Fixes: 5e50da01d0ce ("[NET_SCHED]: Fix endless loops (part 2): "simple" qdiscs") Reported-by: syzbot+d8b58d7b0ad89a678a16@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/68663c93.a70a0220.5d25f.0857.GAE@google.com/ Reported-by: syzbot+5eccb463fa89309d8bdc@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/68663c94.a70a0220.5d25f.0858.GAE@google.com/ Reported-by: syzbot+1261670bbdefc5485a06@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/686764a5.a00a0220.c7b3.0013.GAE@google.com/ Reported-by: syzbot+15b96fc3aac35468fe77@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/686764a5.a00a0220.c7b3.0014.GAE@google.com/ Reported-by: syzbot+4dadc5aecf80324d5a51@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/68679e81.a70a0220.29cf51.0016.GAE@google.com/ Acked-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: Victor Nogueira Link: https://patch.msgid.link/20250707210801.372995-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski commit 02c4d6c26f1f662da8885b299c224ca6628ad232 Author: Chintan Vankar Date: Mon Jul 7 14:22:01 2025 +0530 net: ethernet: ti: am65-cpsw-nuss: Fix skb size by accounting for skb_shared_info While transitioning from netdev_alloc_ip_align() to build_skb(), memory for the "skb_shared_info" member of an "skb" was not allocated. Fix this by allocating "PAGE_SIZE" as the skb length, accounting for the packet length, headroom and tailroom, thereby including the required memory space for skb_shared_info. Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Reviewed-by: Siddharth Vadapalli Signed-off-by: Chintan Vankar Link: https://patch.msgid.link/20250707085201.1898818-1-c-vankar@ti.com Signed-off-by: Jakub Kicinski commit 849704b8b2115647e12436e5076b8e7a4944f21a Author: Alok Tiwari Date: Sun Jul 6 12:43:21 2025 -0700 net: thunderx: avoid direct MTU assignment after WRITE_ONCE() The current logic in nicvf_change_mtu() writes the new MTU to netdev->mtu using WRITE_ONCE() before verifying if the hardware update succeeds. However on hardware update failure, it attempts to revert to the original MTU using a direct assignment (netdev->mtu = orig_mtu) which violates the intended of WRITE_ONCE protection introduced in commit 1eb2cded45b3 ("net: annotate writes on dev->mtu from ndo_change_mtu()") Additionally, WRITE_ONCE(netdev->mtu, new_mtu) is unnecessarily performed even when the device is not running. Fix this by: Only writing netdev->mtu after successfully updating the hardware. Skipping hardware update when the device is down, and setting MTU directly. Remove unused variable orig_mtu. This ensures that all writes to netdev->mtu are consistent with WRITE_ONCE expectations and avoids unintended state corruption on failure paths. Signed-off-by: Alok Tiwari Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250706194327.1369390-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit d55683866c79a3af1e334126f32841d05e7e4143 Author: Victor Nogueira Date: Sat Jul 5 17:36:38 2025 -0300 selftests/tc-testing: Create test case for UAF scenario with DRR/NETEM/BLACKHOLE chain Create a tdc test for the UAF scenario with DRR/NETEM/BLACKHOLE chain shared by Lion on his report [1]. [1] https://lore.kernel.org/netdev/45876f14-cf28-4177-8ead-bb769fd9e57a@gmail.com/ Signed-off-by: Victor Nogueira Acked-by: Cong Wang Link: https://patch.msgid.link/20250705203638.246350-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski commit 22fc46cea91df3dce140a7dc6847c6fcf0354505 Author: Yue Haibing Date: Sat Jul 5 16:52:28 2025 +0800 atm: clip: Fix NULL pointer dereference in vcc_sendmsg() atmarpd_dev_ops does not implement the send method, which may cause crash as bellow. BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: Oops: 0010 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted 6.15.0-rc6-syzkaller-00346-g5723cc3450bc #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffffc9000d3cf778 EFLAGS: 00010246 RAX: 1ffffffff1910dd1 RBX: 00000000000000c0 RCX: dffffc0000000000 RDX: ffffc9000dc82000 RSI: ffff88803e4c4640 RDI: ffff888052cd0000 RBP: ffffc9000d3cf8d0 R08: ffff888052c9143f R09: 1ffff1100a592287 R10: dffffc0000000000 R11: 0000000000000000 R12: 1ffff92001a79f00 R13: ffff888052cd0000 R14: ffff88803e4c4640 R15: ffffffff8c886e88 FS: 00007fbc762566c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000041f1b000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vcc_sendmsg+0xa10/0xc50 net/atm/common.c:644 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:727 ____sys_sendmsg+0x52d/0x830 net/socket.c:2566 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2620 __sys_sendmmsg+0x227/0x430 net/socket.c:2709 __do_sys_sendmmsg net/socket.c:2736 [inline] __se_sys_sendmmsg net/socket.c:2733 [inline] __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2733 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+e34e5e6b5eddb0014def@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/682f82d5.a70a0220.1765ec.0143.GAE@google.com/T Signed-off-by: Yue Haibing Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250705085228.329202-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 3aaea88f7dd1631301878231e6bf218d0124b9ca Merge: 3c78f91e82d65d c489f3283dbfc0 Author: Jakub Kicinski Date: Wed Jul 9 17:52:30 2025 -0700 Merge branch 'atm-clip-fix-infinite-recursion-potential-null-ptr-deref-and-memleak' Kuniyuki Iwashima says: ==================== atm: clip: Fix infinite recursion, potential null-ptr-deref, and memleak. Patch 1 fixes racy access to atmarpd found while checking RTNL usage in clip.c. Patch 2 fixes memory leak by ioctl(ATMARP_MKIP) and ioctl(ATMARPD_CTRL). Patch 3 fixes infinite recursive call of clip_vcc->old_push(), which was reported by syzbot. v1: https://lore.kernel.org/20250702020437.703698-1-kuniyu@google.com ==================== Link: https://patch.msgid.link/20250704062416.1613927-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit c489f3283dbfc0f3c00c312149cae90d27552c45 Author: Kuniyuki Iwashima Date: Fri Jul 4 06:23:53 2025 +0000 atm: clip: Fix infinite recursive call of clip_push(). syzbot reported the splat below. [0] This happens if we call ioctl(ATMARP_MKIP) more than once. During the first call, clip_mkip() sets clip_push() to vcc->push(), and the second call copies it to clip_vcc->old_push(). Later, when the socket is close()d, vcc_destroy_socket() passes NULL skb to clip_push(), which calls clip_vcc->old_push(), triggering the infinite recursion. Let's prevent the second ioctl(ATMARP_MKIP) by checking vcc->user_back, which is allocated by the first call as clip_vcc. Note also that we use lock_sock() to prevent racy calls. [0]: BUG: TASK stack guard page was hit at ffffc9000d66fff8 (stack is ffffc9000d670000..ffffc9000d678000) Oops: stack guard page: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted 6.16.0-rc4-syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:clip_push+0x5/0x720 net/atm/clip.c:191 Code: e0 8f aa 8c e8 1c ad 5b fa eb ae 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 <41> 57 41 56 41 55 41 54 53 48 83 ec 20 48 89 f3 49 89 fd 48 bd 00 RSP: 0018:ffffc9000d670000 EFLAGS: 00010246 RAX: 1ffff1100235a4a5 RBX: ffff888011ad2508 RCX: ffff8880003c0000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888037f01000 RBP: dffffc0000000000 R08: ffffffff8fa104f7 R09: 1ffffffff1f4209e R10: dffffc0000000000 R11: ffffffff8a99b300 R12: ffffffff8a99b300 R13: ffff888037f01000 R14: ffff888011ad2500 R15: ffff888037f01578 FS: 000055557ab6d500(0000) GS:ffff88808d250000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc9000d66fff8 CR3: 0000000043172000 CR4: 0000000000352ef0 Call Trace: clip_push+0x6dc/0x720 net/atm/clip.c:200 clip_push+0x6dc/0x720 net/atm/clip.c:200 clip_push+0x6dc/0x720 net/atm/clip.c:200 ... clip_push+0x6dc/0x720 net/atm/clip.c:200 clip_push+0x6dc/0x720 net/atm/clip.c:200 clip_push+0x6dc/0x720 net/atm/clip.c:200 vcc_destroy_socket net/atm/common.c:183 [inline] vcc_release+0x157/0x460 net/atm/common.c:205 __sock_release net/socket.c:647 [inline] sock_close+0xc0/0x240 net/socket.c:1391 __fput+0x449/0xa70 fs/file_table.c:465 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff31c98e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffb5aa1f78 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 0000000000012747 RCX: 00007ff31c98e929 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007ff31cbb7ba0 R08: 0000000000000001 R09: 0000000db5aa226f R10: 00007ff31c7ff030 R11: 0000000000000246 R12: 00007ff31cbb608c R13: 00007ff31cbb6080 R14: ffffffffffffffff R15: 00007fffb5aa2090 Modules linked in: Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+0c77cccd6b7cd917b35a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2371d94d248d126c1eb1 Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250704062416.1613927-4-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 62dba28275a9a3104d4e33595c7b3328d4032d8d Author: Kuniyuki Iwashima Date: Fri Jul 4 06:23:52 2025 +0000 atm: clip: Fix memory leak of struct clip_vcc. ioctl(ATMARP_MKIP) allocates struct clip_vcc and set it to vcc->user_back. The code assumes that vcc_destroy_socket() passes NULL skb to vcc->push() when the socket is close()d, and then clip_push() frees clip_vcc. However, ioctl(ATMARPD_CTRL) sets NULL to vcc->push() in atm_init_atmarp(), resulting in memory leak. Let's serialise two ioctl() by lock_sock() and check vcc->push() in atm_init_atmarp() to prevent memleak. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250704062416.1613927-3-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 706cc36477139c1616a9b2b96610a8bb520b7119 Author: Kuniyuki Iwashima Date: Fri Jul 4 06:23:51 2025 +0000 atm: clip: Fix potential null-ptr-deref in to_atmarpd(). atmarpd is protected by RTNL since commit f3a0592b37b8 ("[ATM]: clip causes unregister hang"). However, it is not enough because to_atmarpd() is called without RTNL, especially clip_neigh_solicit() / neigh_ops->solicit() is unsleepable. Also, there is no RTNL dependency around atmarpd. Let's use a private mutex and RCU to protect access to atmarpd in to_atmarpd(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250704062416.1613927-2-kuniyu@google.com Signed-off-by: Jakub Kicinski commit faab52b59b09721edeb8f92eabad3f4d320fb522 Author: Nuno Das Neves Date: Thu Jul 3 15:44:35 2025 -0700 x86/hyperv: Clean up hv_map/unmap_interrupt() return values Fix the return values of these hypercall helpers so they return a negated errno either directly or via hv_result_to_errno(). Update the callers to check for errno instead of using hv_status_success(), and remove redundant error printing. While at it, rearrange some variable declarations to adhere to style guidelines i.e. "reverse fir tree order". Signed-off-by: Nuno Das Neves Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1751582677-30930-5-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1751582677-30930-5-git-send-email-nunodasneves@linux.microsoft.com> commit bb169f80ed5a156ec3405e0e49c6b8e9ae264718 Author: Nuno Das Neves Date: Thu Jul 3 15:44:34 2025 -0700 x86/hyperv: Fix usage of cpu_online_mask to get valid cpu Accessing cpu_online_mask here is problematic because the cpus read lock is not held in this context. However, cpu_online_mask isn't needed here since the effective affinity mask is guaranteed to be valid in this callback. So, just use cpumask_first() to get the cpu instead of ANDing it with cpus_online_mask unnecessarily. Fixes: e39397d1fd68 ("x86/hyperv: implement an MSI domain for root partition") Reported-by: Michael Kelley Closes: https://lore.kernel.org/linux-hyperv/SN6PR02MB4157639630F8AD2D8FD8F52FD475A@SN6PR02MB4157.namprd02.prod.outlook.com/ Suggested-by: Thomas Gleixner Signed-off-by: Nuno Das Neves Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1751582677-30930-4-git-send-email-nunodasneves@linux.microsoft.com> commit f84b21da3624d9c8514db409d254a22b84fac66a Author: Mukesh Rathor Date: Thu Jul 3 15:44:32 2025 -0700 PCI: hv: Don't load the driver for baremetal root partition The root partition only uses VMBus when running nested. When running on baremetal the Hyper-V PCI driver is not needed, so do not initialize it. Signed-off-by: Mukesh Rathor Signed-off-by: Nuno Das Neves Reviewed-by: Roman Kisel Reviewed-by: Michael Kelley Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/1751582677-30930-2-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1751582677-30930-2-git-send-email-nunodasneves@linux.microsoft.com> commit 9669ddda18fbe7f1e28cd0bfc1218e746fae6c50 Author: Naman Jain Date: Wed Jun 11 15:34:59 2025 +0530 net: mana: Fix warnings for missing export.h header inclusion Fix below warning in Hyper-V's MANA drivers that comes when kernel is compiled with W=1 option. Include export.h in driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include is missing Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250611100459.92900-7-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250611100459.92900-7-namjain@linux.microsoft.com> commit 4a4f15170b63bd3b8a6534b39330e981704c7369 Author: Naman Jain Date: Wed Jun 11 15:34:58 2025 +0530 PCI: hv: Fix warnings for missing export.h header inclusion Fix below warning in Hyper-V PCI driver that comes when kernel is compiled with W=1 option. Include export.h in driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include is missing Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250611100459.92900-6-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250611100459.92900-6-namjain@linux.microsoft.com> commit 5b187e9a31547d63a1a4078b79f7fb3fdbca92cd Author: Naman Jain Date: Wed Jun 11 15:34:57 2025 +0530 clocksource: hyper-v: Fix warnings for missing export.h header inclusion Fix below warning in Hyper-V clocksource driver that comes when kernel is compiled with W=1 option. Include export.h in driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include is missing Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250611100459.92900-5-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250611100459.92900-5-namjain@linux.microsoft.com> commit 0271e72bc0f7cf180dce3f6d145c83f2d5709a25 Author: Naman Jain Date: Wed Jun 11 15:34:55 2025 +0530 x86/hyperv: Fix warnings for missing export.h header inclusion Fix below warning in Hyper-V drivers that comes when kernel is compiled with W=1 option. Include export.h in driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include is missing Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250611100459.92900-3-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250611100459.92900-3-namjain@linux.microsoft.com> commit 2b206d3468236047d71d4ab6110b1f5b70448e0e Author: Naman Jain Date: Wed Jun 11 15:34:54 2025 +0530 Drivers: hv: Fix warnings for missing export.h header inclusion Fix below warning in Hyper-V drivers that comes when kernel is compiled with W=1 option. Include export.h in driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include is missing Signed-off-by: Naman Jain Reviewed-by: Nuno Das Neves Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250611100459.92900-2-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250611100459.92900-2-namjain@linux.microsoft.com> commit b0871aa0f8df55dbf0aad55d2ab2100c23071b4b Author: Naman Jain Date: Mon Jul 7 14:13:22 2025 +0530 Drivers: hv: Fix the check for HYPERVISOR_CALLBACK_VECTOR __is_defined(HYPERVISOR_CALLBACK_VECTOR) would return 1, only if HYPERVISOR_CALLBACK_VECTOR macro is defined as 1. However its value is 0xf3 and this leads to __is_defined() returning 0. The expectation was to just check whether this MACRO is defined or not and get 1 if it's defined. Replace __is_defined with #ifdef blocks instead to fix it. Fixes: 1dc5df133b98 ("Drivers: hv: vmbus: Get the IRQ number from DeviceTree") Cc: stable@kernel.org Signed-off-by: Naman Jain Reviewed-by: Roman Kisel Link: https://lore.kernel.org/r/20250707084322.1763-1-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250707084322.1763-1-namjain@linux.microsoft.com> commit 0d86a8d65c1e69610bfe1a7a774f71ff111ed8c1 Author: Yasumasa Suenaga Date: Sat Jun 28 11:22:17 2025 +0900 tools/hv: fcopy: Fix incorrect file path conversion The hv_fcopy_uio_daemon fails to correctly handle file copy requests from Windows hosts (e.g. via Copy-VMFile) due to wchar_t size differences between Windows and Linux. On Linux, wchar_t is 32 bit, whereas Windows uses 16 bit wide characters. Fix this by ensuring that file transfers from host to Linux guest succeed with correctly decoded file names and paths. - Treats file name and path as __u16 arrays, not wchar_t*. - Allocates fixed-size buffers (W_MAX_PATH) for converted strings instead of using malloc. - Adds a check for target path length to prevent snprintf() buffer overflow. Fixes: 82b0945ce2c2 ("tools: hv: Add new fcopy application based on uio driver") Signed-off-by: Yasumasa Suenaga Reviewed-by: Naman Jain Link: https://lore.kernel.org/r/20250628022217.1514-2-yasuenag@gmail.com Signed-off-by: Wei Liu Message-ID: <20250628022217.1514-2-yasuenag@gmail.com> commit 7b89a44b2e8c7ba548e3ad5d5155a17279625335 Author: Michael Kelley Date: Fri Jun 13 16:00:59 2025 -0700 Drivers: hv: Select CONFIG_SYSFB only if EFI is enabled Commit 96959283a58d ("Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests") selects CONFIG_SYSFB for Hyper-V guests so that screen_info is available to the VMBus driver to get the location of the framebuffer in Generation 2 VMs. However, if CONFIG_HYPERV is enabled but CONFIG_EFI is not, a kernel link error results in ARM64 builds because screen_info is provided by the EFI firmware interface. While configuring an ARM64 Hyper-V guest without EFI isn't useful since EFI is required to boot, the configuration is still possible and the link error should be prevented. Fix this by making the selection of CONFIG_SYSFB conditional on CONFIG_EFI being defined. For Generation 1 VMs on x86/x64, which don't use EFI, the additional condition is OK because such VMs get the framebuffer information via a mechanism that doesn't use screen_info. Fixes: 96959283a58d ("Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests") Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-hyperv/20250610091810.2638058-1-arnd@kernel.org/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506080820.1wmkQufc-lkp@intel.com/ Signed-off-by: Michael Kelley Link: https://lore.kernel.org/stable/20250613230059.380483-1-mhklinux%40outlook.com Reviewed-by: Roman Kisel Link: https://lore.kernel.org/r/20250613230059.380483-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250613230059.380483-1-mhklinux@outlook.com> commit ec3cae639482a8da11a3ae30d28ceceb9d6a3f56 Author: Rafael J. Wysocki Date: Wed Jul 9 19:12:47 2025 +0200 PM: sleep: Call pm_restore_gfp_mask() after dpm_resume() Commit 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence") changed two pm_restore_gfp_mask() calls in enter_state() and hibernation_restore() into one pm_restore_gfp_mask() call in dpm_resume_end(), but it put that call before the dpm_resume() invocation which is too early (some swap-backing devices may not be ready at that point). Moreover, this code ordering change was not even mentioned in the changelog of the commit mentioned above. Address this by moving that call after the dpm_resume() one. Fixes: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence") Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/2797018.mvXUDI8C0e@rjwysocki.net commit 4578a747f3c7950be3feb93c2db32eb597a3e55b Author: Paolo Bonzini Date: Wed Jul 9 13:45:14 2025 -0400 KVM: x86: avoid underflow when scaling TSC frequency In function kvm_guest_time_update(), __scale_tsc() is used to calculate a TSC *frequency* rather than a TSC value. With low-enough ratios, a TSC value that is less than 1 would underflow to 0 and to an infinite while loop in kvm_get_time_scale(): kvm_guest_time_update(struct kvm_vcpu *v) if (kvm_caps.has_tsc_control) tgt_tsc_khz = kvm_scale_tsc(tgt_tsc_khz, v->arch.l1_tsc_scaling_ratio); __scale_tsc(u64 ratio, u64 tsc) ratio=122380531, tsc=2299998, N=48 ratio*tsc >> N = 0.999... -> 0 Later in the function: Call Trace: kvm_get_time_scale arch/x86/kvm/x86.c:2458 [inline] kvm_guest_time_update+0x926/0xb00 arch/x86/kvm/x86.c:3268 vcpu_enter_guest.constprop.0+0x1e70/0x3cf0 arch/x86/kvm/x86.c:10678 vcpu_run+0x129/0x8d0 arch/x86/kvm/x86.c:11126 kvm_arch_vcpu_ioctl_run+0x37a/0x13d0 arch/x86/kvm/x86.c:11352 kvm_vcpu_ioctl+0x56b/0xe60 virt/kvm/kvm_main.c:4188 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0x12d/0x190 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 This can really happen only when fuzzing, since the TSC frequency would have to be nonsensically low. Fixes: 35181e86df97 ("KVM: x86: Add a common TSC scaling function") Reported-by: Yuntao Liu Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 8c2e52ebbe885c7eeaabd3b7ddcdc1246fc400d2 Author: Linus Torvalds Date: Wed Jul 9 10:38:29 2025 -0700 eventpoll: don't decrement ep refcount while still holding the ep mutex Jann Horn points out that epoll is decrementing the ep refcount and then doing a mutex_unlock(&ep->mtx); afterwards. That's very wrong, because it can lead to a use-after-free. That pattern is actually fine for the very last reference, because the code in question will delay the actual call to "ep_free(ep)" until after it has unlocked the mutex. But it's wrong for the much subtler "next to last" case when somebody *else* may also be dropping their reference and free the ep while we're still using the mutex. Note that this is true even if that other user is also using the same ep mutex: mutexes, unlike spinlocks, can not be used for object ownership, even if they guarantee mutual exclusion. A mutex "unlock" operation is not atomic, and as one user is still accessing the mutex as part of unlocking it, another user can come in and get the now released mutex and free the data structure while the first user is still cleaning up. See our mutex documentation in Documentation/locking/mutex-design.rst, in particular the section [1] about semantics: "mutex_unlock() may access the mutex structure even after it has internally released the lock already - so it's not safe for another context to acquire the mutex and assume that the mutex_unlock() context is not using the structure anymore" So if we drop our ep ref before the mutex unlock, but we weren't the last one, we may then unlock the mutex, another user comes in, drops _their_ reference and releases the 'ep' as it now has no users - all while the mutex_unlock() is still accessing it. Fix this by simply moving the ep refcount dropping to outside the mutex: the refcount itself is atomic, and doesn't need mutex protection (that's the whole _point_ of refcounts: unlike mutexes, they are inherently about object lifetimes). Reported-by: Jann Horn Link: https://docs.kernel.org/locking/mutex-design.html#semantics [1] Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Signed-off-by: Linus Torvalds commit f69f5aab1fad379bbef9339f66bc8323daffe56e Merge: 9adf143357bf5e 9dd17574934163 Author: Linus Torvalds Date: Wed Jul 9 08:37:48 2025 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Fix bogus KASAN splat on EFI runtime stack - Select JUMP_LABEL unconditionally to avoid boot failure with pKVM and the legacy implementation of static keys - Avoid touching GCS registers when 'arm64.nogcs' has been passed on the command-line - Move a 'cpumask_t' off the stack in smp_send_stop() - Don't advertise SME-related hwcaps to userspace when ID_AA64PFR1_EL1 indicates that SME is not implemented - Always check the VMA when handling an Overlay fault - Avoid corrupting TCR2_EL1 during boot * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/mm: Drop wrong writes into TCR2_EL1 arm64: poe: Handle spurious Overlay faults arm64: Filter out SME hwcaps when FEAT_SME isn't implemented arm64: move smp_send_stop() cpu mask off stack arm64/gcs: Don't try to access GCS registers if arm64.nogcs is enabled arm64: Unconditionally select CONFIG_JUMP_LABEL arm64: efi: Fix KASAN false positive for EFI runtime stack commit 9adf143357bf5ea6400f276ca60bfbc7cd92c19a Merge: 733923397fd954 5285b5ed04ab6a Author: Linus Torvalds Date: Wed Jul 9 08:33:08 2025 -0700 Merge tag 'pinctrl-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Mark som pins as invalid for IRQ use in the Qualcomm driver - Fix up the use of device properties on the MA35DX Nuvoton, apparently something went sidewise - Clear the GPIO debounce settings when going down for suspend in the AMD driver. Very good for some AMD laptops that now wake up from suspend again! - Add the compulsory .can_sleep bool flag in the AW9523 driver, should have been there from the beginning, now there are users finding the bug - Drop some bouncing email address from MAINTAINERS * tag 'pinctrl-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: aw9523: fix can_sleep flag for GPIO chip pinctrl: amd: Clear GPIO debounce for suspend pinctrl: nuvoton: Fix boot on ma35dx platforms MAINTAINERS: drop bouncing Lakshmi Sowjanya D pinctrl: qcom: msm: mark certain pins as invalid for interrupts commit 76303ee8d54bff6d9a6d55997acd88a6c2ba63cf Author: Jann Horn Date: Wed Jul 2 10:32:04 2025 +0200 x86/mm: Disable hugetlb page table sharing on 32-bit Only select ARCH_WANT_HUGE_PMD_SHARE on 64-bit x86. Page table sharing requires at least three levels because it involves shared references to PMD tables; 32-bit x86 has either two-level paging (without PAE) or three-level paging (with PAE), but even with three-level paging, having a dedicated PGD entry for hugetlb is only barely possible (because the PGD only has four entries), and it seems unlikely anyone's actually using PMD sharing on 32-bit. Having ARCH_WANT_HUGE_PMD_SHARE enabled on non-PAE 32-bit X86 (which has 2-level paging) became particularly problematic after commit 59d9094df3d7 ("mm: hugetlb: independent PMD page table shared count"), since that changes `struct ptdesc` such that the `pt_mm` (for PGDs) and the `pt_share_count` (for PMDs) share the same union storage - and with 2-level paging, PMDs are PGDs. (For comparison, arm64 also gates ARCH_WANT_HUGE_PMD_SHARE on the configuration of page tables such that it is never enabled with 2-level paging.) Closes: https://lore.kernel.org/r/srhpjxlqfna67blvma5frmy3aa@altlinux.org Fixes: cfe28c5d63d8 ("x86: mm: Remove x86 version of huge_pmd_share.") Reported-by: Vitaly Chikunov Suggested-by: Dave Hansen Signed-off-by: Jann Horn Signed-off-by: Dave Hansen Acked-by: Oscar Salvador Acked-by: David Hildenbrand Tested-by: Vitaly Chikunov Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250702-x86-2level-hugetlb-v2-1-1a98096edf92%40google.com commit d563e7f95c933816efe531c3a48e22bc099c0f55 Author: Alexander Stein Date: Tue Jul 8 10:38:29 2025 +0200 gpio: of: initialize local variable passed to the .of_xlate() callback of_flags is passed down to GPIO chip's xlate function, so ensure this one is properly initialized as - if the xlate callback does nothing with it - we may end up with various configuration errors like: gpio-720 (enable): multiple pull-up, pull-down or pull-disable enabled, invalid configuration Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20250708083829.658051-1-alexander.stein@ew.tq-group.com [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski commit bd46cece51a36ef088f22ef0416ac13b0a46d5b0 Author: Simona Vetter Date: Mon Jul 7 17:18:13 2025 +0200 drm/gem: Fix race in drm_gem_handle_create_tail() Object creation is a careful dance where we must guarantee that the object is fully constructed before it is visible to other threads, and GEM buffer objects are no difference. Final publishing happens by calling drm_gem_handle_create(). After that the only allowed thing to do is call drm_gem_object_put() because a concurrent call to the GEM_CLOSE ioctl with a correctly guessed id (which is trivial since we have a linear allocator) can already tear down the object again. Luckily most drivers get this right, the very few exceptions I've pinged the relevant maintainers for. Unfortunately we also need drm_gem_handle_create() when creating additional handles for an already existing object (e.g. GETFB ioctl or the various bo import ioctl), and hence we cannot have a drm_gem_handle_create_and_put() as the only exported function to stop these issues from happening. Now unfortunately the implementation of drm_gem_handle_create() isn't living up to standards: It does correctly finishe object initialization at the global level, and hence is safe against a concurrent tear down. But it also sets up the file-private aspects of the handle, and that part goes wrong: We fully register the object in the drm_file.object_idr before calling drm_vma_node_allow() or obj->funcs->open, which opens up races against concurrent removal of that handle in drm_gem_handle_delete(). Fix this with the usual two-stage approach of first reserving the handle id, and then only registering the object after we've completed the file-private setup. Jacek reported this with a testcase of concurrently calling GEM_CLOSE on a freshly-created object (which also destroys the object), but it should be possible to hit this with just additional handles created through import or GETFB without completed destroying the underlying object with the concurrent GEM_CLOSE ioctl calls. Note that the close-side of this race was fixed in f6cd7daecff5 ("drm: Release driver references to handle before making it available again"), which means a cool 9 years have passed until someone noticed that we need to make this symmetry or there's still gaps left :-/ Without the 2-stage close approach we'd still have a race, therefore that's an integral part of this bugfix. More importantly, this means we can have NULL pointers behind allocated id in our drm_file.object_idr. We need to check for that now: - drm_gem_handle_delete() checks for ERR_OR_NULL already - drm_gem.c:object_lookup() also chekcs for NULL - drm_gem_release() should never be called if there's another thread still existing that could call into an IOCTL that creates a new handle, so cannot race. For paranoia I added a NULL check to drm_gem_object_release_handle() though. - most drivers (etnaviv, i915, msm) are find because they use idr_find(), which maps both ENOENT and NULL to NULL. - drivers using idr_for_each_entry() should also be fine, because idr_get_next does filter out NULL entries and continues the iteration. - The same holds for drm_show_memory_stats(). v2: Use drm_WARN_ON (Thomas) Reported-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Reviewed-by: Thomas Zimmermann Cc: stable@vger.kernel.org Cc: Jacek Lawrynowicz Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Simona Vetter Signed-off-by: Simona Vetter Signed-off-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250707151814.603897-1-simona.vetter@ffwll.ch commit 2265c08ec393ef1f5ef5019add0ab1e3a7ee0b79 Author: Ben Horgan Date: Wed Jul 9 10:38:07 2025 +0100 KVM: arm64: Fix enforcement of upper bound on MDCR_EL2.HPMN Previously, u64_replace_bits() was used to no effect as the return value was ignored. Convert to u64p_replace_bits() so the value is updated in place. Reviewed-by: Zenghui Yu Signed-off-by: Ben Horgan Fixes: efff9dd2fee7 ("KVM: arm64: Handle out-of-bound write to MDCR_EL2.HPMN") Link: https://lore.kernel.org/r/20250709093808.920284-2-ben.horgan@arm.com Signed-off-by: Marc Zyngier commit f6bfc9afc7510cb5e6fbe0a17c507917b0120280 Author: Thomas Zimmermann Date: Mon Jul 7 15:11:55 2025 +0200 drm/framebuffer: Acquire internal references on GEM handles Acquire GEM handles in drm_framebuffer_init() and release them in the corresponding drm_framebuffer_cleanup(). Ties the handle's lifetime to the framebuffer. Not all GEM buffer objects have GEM handles. If not set, no refcounting takes place. This is the case for some fbdev emulation. This is not a problem as these GEM objects do not use dma-bufs and drivers will not release them while fbdev emulation is running. Framebuffer flags keep a bit per color plane of which the framebuffer holds a GEM handle reference. As all drivers use drm_framebuffer_init(), they will now all hold dma-buf references as fixed in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers"). In the GEM framebuffer helpers, restore the original ref counting on buffer objects. As the helpers for handle refcounting are now no longer called from outside the DRM core, unexport the symbols. v3: - don't mix internal flags with mode flags (Christian) v2: - track framebuffer handle refs by flag - drop gma500 cleanup (Christian) Signed-off-by: Thomas Zimmermann Fixes: 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") Reported-by: Bert Karwatzki Closes: https://lore.kernel.org/dri-devel/20250703115915.3096-1-spasswolf@web.de/ Tested-by: Bert Karwatzki Tested-by: Mario Limonciello Tested-by: Borislav Petkov (AMD) Cc: Thomas Zimmermann Cc: Anusha Srivatsa Cc: Christian König Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: Reviewed-by: Christian König Link: https://lore.kernel.org/r/20250707131224.249496-1-tzimmermann@suse.de commit 6c0e9f05c9d7875995b0e92ace71be947f280bbd Author: Thomas Fourier Date: Tue Jul 1 13:34:52 2025 +0200 pch_uart: Fix dma_sync_sg_for_device() nents value The dma_sync_sg_for_device() functions should be called with the same nents as the dma_map_sg(), not the value the map function returned according to the documentation in Documentation/core-api/dma-api.rst:450: With the sync_sg API, all the parameters must be the same as those passed into the sg mapping API. Fixes: da3564ee027e ("pch_uart: add multi-scatter processing") Cc: stable Signed-off-by: Thomas Fourier Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250701113452.18590-2-fourier.thomas@gmail.com Signed-off-by: Greg Kroah-Hartman commit 273cc3406c8d4e830ed45967c70d08d20ca1380e Author: Johan Hovold Date: Tue Jul 8 10:58:17 2025 +0200 serial: core: fix OF node leak Make sure to drop the OF node reference taken when initialising the control and port devices when the devices are later released. Fixes: d36f0e9a0002 ("serial: core: restore of_node information in sysfs") Cc: Aidan Stewart Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250708085817.16070-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3da6bb419750f3ad834786d6ba7c9d5d062c770b Author: Tetsuo Handa Date: Wed Jul 9 20:27:52 2025 +0900 perf/core: Fix WARN in perf_sigtrap() Since exit_task_work() runs after perf_event_exit_task_context() updated ctx->task to TASK_TOMBSTONE, perf_sigtrap() from perf_pending_task() might observe event->ctx->task == TASK_TOMBSTONE. Swap the early exit tests in order not to hit WARN_ON_ONCE(). Closes: https://syzkaller.appspot.com/bug?extid=2fe61cb2a86066be6985 Reported-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/b1c224bd-97f9-462c-a3e3-125d5e19c983@I-love.SAKURA.ne.jp commit cd0f8649d0e1c747d1bf6290201f38474fc23925 Merge: 3014168731b793 08f49cdb71f375 Author: Greg Kroah-Hartman Date: Wed Jul 9 12:43:12 2025 +0200 Merge tag 'usb-serial-6.16-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB serial device id for 6.16-rc6 Here's a new modem device id. Everything has been in linux-next with no reported issues. * tag 'usb-serial-6.16-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Foxconn T99W640 commit 500ba33284416255b9a5b50ace24470b6fe77ea5 Author: Maulik Shah Date: Wed Jul 9 14:00:11 2025 +0530 pmdomain: governor: Consider CPU latency tolerance from pm_domain_cpu_gov pm_domain_cpu_gov is selecting a cluster idle state but does not consider latency tolerance of child CPUs. This results in deeper cluster idle state whose latency does not meet latency tolerance requirement. Select deeper idle state only if global and device latency tolerance of all child CPUs meet. Test results on SM8750 with 300 usec PM-QoS on CPU0 which is less than domain idle state entry (2150) + exit (1983) usec latency mentioned in devicetree, demonstrate the issue. # echo 300 > /sys/devices/system/cpu/cpu0/power/pm_qos_resume_latency_us Before: (Usage is incrementing) ====== # cat /sys/kernel/debug/pm_genpd/power-domain-cluster0/idle_states State Time Spent(ms) Usage Rejected Above Below S0 29817 537 8 270 0 # cat /sys/kernel/debug/pm_genpd/power-domain-cluster0/idle_states State Time Spent(ms) Usage Rejected Above Below S0 30348 542 8 271 0 After: (Usage is not incrementing due to latency tolerance) ====== # cat /sys/kernel/debug/pm_genpd/power-domain-cluster0/idle_states State Time Spent(ms) Usage Rejected Above Below S0 39319 626 14 307 0 # cat /sys/kernel/debug/pm_genpd/power-domain-cluster0/idle_states State Time Spent(ms) Usage Rejected Above Below S0 39319 626 14 307 0 Signed-off-by: Maulik Shah Fixes: e94999688e3a ("PM / Domains: Add genpd governor for CPUs") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250709-pmdomain_qos-v2-1-976b12257899@oss.qualcomm.com Signed-off-by: Ulf Hansson commit 3014168731b7930300aab656085af784edc861f6 Author: Xinyu Liu <1171169449@qq.com> Date: Wed Jul 9 11:55:33 2025 +0800 usb: gadget: configfs: Fix OOB read on empty string write When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero. This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately. Signed-off-by: Xinyu Liu Cc: stable Link: https://lore.kernel.org/r/tencent_B1C9481688D0E95E7362AB2E999DE8048207@qq.com Signed-off-by: Greg Kroah-Hartman commit a066917360ed5000c4f73fb190773cfac004c885 Author: Pagadala Yesu Anjaneyulu Date: Mon Jun 9 21:35:14 2025 +0300 wifi: mac80211: Fix uninitialized variable with __free() in ieee80211_ml_epcs() The cleanup attribute runs kfree() when the variable goes out of scope. There is a possibility that the link_elems variable is uninitialized if the loop ends before an assignment is made to this variable. This leads to uninitialized variable bug. Fix this by assigning link_elems to NULL. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250609213231.eeacd3738a7b.I0f876fa1359daeec47ab3aef098255a9c23efd70@changeid Signed-off-by: Johannes Berg commit c86f7bb92f1ffbacb18634356bf0573047eab6a0 Author: Jackie Dong Date: Wed Jul 9 11:57:16 2025 +0800 lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED Not all of Lenovo non-ThinkPad devices support both mic mute LED (on F4) and audio mute LED (on F1). Some of them only support one mute LED, some of them don't have any mute LEDs. If any of the mute LEDs is missing, the driver reports error -5. Check if the device supports a mute LED or not. Do not trigger error -5 message from missing a mute LED if it is not supported on the device. Signed-off-by: Jackie Dong Suggested-by: Hans de Goede Link: https://lore.kernel.org/r/20250709035716.36267-1-xy-jackie@139.com [ij: major edits to the changelog.] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d88dfb756d557e40e88406e8c962c0684bc9eb87 Author: Lukas Wunner Date: Wed Jul 2 07:02:15 2025 +0200 agp/amd64: Check AGP Capability before binding to unsupported devices Since commit 172efbb40333 ("AGP: Try unsupported AGP chipsets on x86-64 by default"), the AGP driver for AMD Opteron/Athlon64 CPUs has attempted to bind to any PCI device possessing an AGP Capability. Commit 6fd024893911 ("amd64-agp: Probe unknown AGP devices the right way") subsequently reworked the driver to perform a bind attempt to any PCI device (regardless of AGP Capability) and reject a device in the driver's ->probe() hook if it lacks the AGP Capability. On modern CPUs exposing an AMD IOMMU, this subtle change results in an annoying message with KERN_CRIT severity: pci 0000:00:00.2: Resources present before probing The message is emitted by the driver core prior to invoking a driver's ->probe() hook. The check for an AGP Capability in the ->probe() hook happens too late to prevent the message. The message has appeared only recently with commit 3be5fa236649 (Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices"). Prior to the commit, no driver could bind to AMD IOMMUs. The reason for the message is that an MSI is requested early on for the AMD IOMMU, which results in a call from msi_sysfs_create_group() to devm_device_add_group(). A devres resource is thus attached to the driver-less AMD IOMMU, which is normally not allowed, but presumably cannot be avoided because requesting the MSI from a regular PCI driver might be too late. Avoid the message by once again checking for an AGP Capability *before* binding to an unsupported device. Achieve that by way of the PCI core's dynid functionality. pci_add_dynid() can fail only with -ENOMEM (on allocation failure) or -EINVAL (on bus_to_subsys() failure). It doesn't seem worth the extra code to propagate those error codes out of the for_each_pci_dev() loop, so simply error out with -ENODEV if there was no successful bind attempt. In the -ENOMEM case, a splat is emitted anyway, and the -EINVAL case can never happen because it requires failure of bus_register(&pci_bus_type), in which case there's no driver probing of PCI devices. Hans has voiced a preference to no longer probe unsupported devices by default (i.e. set agp_try_unsupported = 0). In fact, the help text for CONFIG_AGP_AMD64 pretends this to be the default. Alternatively, he proposes probing only devices with PCI_CLASS_BRIDGE_HOST. However these approaches risk regressing users who depend on the existing behavior. Fixes: 3be5fa236649 (Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices") Reported-by: Fedor Pchelkin Closes: https://lore.kernel.org/r/wpoivftgshz5b5aovxbkxl6ivvquinukqfvb5z6yi4mv7d25ew@edtzr2p74ckg/ Reported-by: Hans de Goede Closes: https://lore.kernel.org/r/20250625112411.4123-1-hansg@kernel.org/ Tested-by: Hans de Goede Signed-off-by: Lukas Wunner Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/b29e7fbfc6d146f947603d0ebaef44cbd2f0d754.1751468802.git.lukas@wunner.de commit 5fde0fcbd7608dd5f97a5c0c23a316074d6f17f5 Author: Pagadala Yesu Anjaneyulu Date: Wed Jul 9 06:56:39 2025 +0300 wifi: iwlwifi: mask reserved bits in chan_state_active_bitmap Mask the reserved bits as firmware will assert if reserved bits are set. Fixes: ef7ddf4e2f94 ("wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12") Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250709065608.7a72c70bdc9d.Ic9be0a3fc3aabde0c4b88568f3bb7b76e375f8d4@changeid commit 3c78f91e82d65d8927dc7976636bc5fae666370a Merge: 78b7920a03351a 9dfe110cc0f6ef Author: Jakub Kicinski Date: Tue Jul 8 18:12:55 2025 -0700 Merge branch 'net-phy-smsc-robustness-fixes-for-lan87xx-lan9500' Oleksij Rempel says: ==================== net: phy: smsc: robustness fixes for LAN87xx/LAN9500 The SMSC 10/100 PHYs (LAN87xx family) found in smsc95xx (lan95xx) USB-Ethernet adapters show several quirks around the Auto-MDIX feature: - A hardware strap (AUTOMDIX_EN) may boot the PHY in fixed-MDI mode, and the current driver cannot always override it. - When Auto-MDIX is left enabled while autonegotiation is forced off, the PHY endlessly swaps the TX/RX pairs and never links up. - The driver sets the enable bit for Auto-MDIX but forgets the override bit, so userspace requests are silently ignored. - Rapid configuration changes can wedge the link if PHY IRQs are enabled. The four patches below make the MDIX state fully predictable and prevent link failures in every tested strap / autoneg / MDI-X permutation. Tested on LAN9512 Eval board. ==================== Link: https://patch.msgid.link/20250703114941.3243890-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 9dfe110cc0f6ef42af8e81ce52aef34a647d0b8a Author: Oleksij Rempel Date: Thu Jul 3 13:49:41 2025 +0200 net: phy: smsc: Fix link failure in forced mode with Auto-MDIX Force a fixed MDI-X mode when auto-negotiation is disabled to prevent link instability. When forcing the link speed and duplex on a LAN9500 PHY (e.g., with `ethtool -s eth0 autoneg off ...`) while leaving MDI-X control in auto mode, the PHY fails to establish a stable link. This occurs because the PHY's Auto-MDIX algorithm is not designed to operate when auto-negotiation is disabled. In this state, the PHY continuously toggles the TX/RX signal pairs, which prevents the link partner from synchronizing. This patch resolves the issue by detecting when auto-negotiation is disabled. If the MDI-X control mode is set to 'auto', the driver now forces a specific, stable mode (ETH_TP_MDI) to prevent the pair toggling. This choice of a fixed MDI mode mirrors the behavior the hardware would exhibit if the AUTOMDIX_EN strap were configured for a fixed MDI connection. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Oleksij Rempel Cc: Andre Edich Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250703114941.3243890-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 0713e55533c88a20edb53eea6517dc56786a0078 Author: Oleksij Rempel Date: Thu Jul 3 13:49:40 2025 +0200 net: phy: smsc: Force predictable MDI-X state on LAN87xx Override the hardware strap configuration for MDI-X mode to ensure a predictable initial state for the driver. The initial mode of the LAN87xx PHY is determined by the AUTOMDIX_EN strap pin, but the driver has no documented way to read its latched status. This unpredictability means the driver cannot know if the PHY has initialized with Auto-MDIX enabled or disabled, preventing it from providing a reliable interface to the user. This patch introduces a `config_init` hook that forces the PHY into a known state by explicitly enabling Auto-MDIX. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Oleksij Rempel Cc: Andre Edich Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250703114941.3243890-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit a141af8eb2272ab0f677a7f2653874840bc9b214 Author: Oleksij Rempel Date: Thu Jul 3 13:49:39 2025 +0200 net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap Correct the Auto-MDIX configuration to ensure userspace settings are respected when the feature is disabled by the AUTOMDIX_EN hardware strap. The LAN9500 PHY allows its default MDI-X mode to be configured via a hardware strap. If this strap sets the default to "MDI-X off", the driver was previously unable to enable Auto-MDIX from userspace. When handling the ETH_TP_MDI_AUTO case, the driver would set the SPECIAL_CTRL_STS_AMDIX_ENABLE_ bit but neglected to set the required SPECIAL_CTRL_STS_OVRRD_AMDIX_ bit. Without the override flag, the PHY falls back to its hardware strap default, ignoring the software request. This patch corrects the behavior by also setting the override bit when enabling Auto-MDIX. This ensures that the userspace configuration takes precedence over the hardware strap, allowing Auto-MDIX to be enabled correctly in all scenarios. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Oleksij Rempel Cc: Andre Edich Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20250703114941.3243890-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 78b7920a03351a8402de2f81914c1d2e2bdf24b7 Author: EricChan Date: Thu Jul 3 10:04:49 2025 +0800 net: stmmac: Fix interrupt handling for level-triggered mode in DWC_XGMAC2 According to the Synopsys Controller IP XGMAC-10G Ethernet MAC Databook v3.30a (section 2.7.2), when the INTM bit in the DMA_Mode register is set to 2, the sbd_perch_tx_intr_o[] and sbd_perch_rx_intr_o[] signals operate in level-triggered mode. However, in this configuration, the DMA does not assert the XGMAC_NIS status bit for Rx or Tx interrupt events. This creates a functional regression where the condition if (likely(intr_status & XGMAC_NIS)) in dwxgmac2_dma_interrupt() will never evaluate to true, preventing proper interrupt handling for level-triggered mode. The hardware specification explicitly states that "The DMA does not assert the NIS status bit for the Rx or Tx interrupt events" (Synopsys DWC_XGMAC2 Databook v3.30a, sec. 2.7.2). The fix ensures correct handling of both edge and level-triggered interrupts while maintaining backward compatibility with existing configurations. It has been tested on the hardware device (not publicly available), and it can properly trigger the RX and TX interrupt handling in both the INTM=0 and INTM=2 configurations. Fixes: d6ddfacd95c7 ("net: stmmac: Add DMA related callbacks for XGMAC2") Tested-by: EricChan Signed-off-by: EricChan Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250703020449.105730-1-chenchuangyu@xiaomi.com Signed-off-by: Jakub Kicinski commit 733923397fd95405a48f165c9b1fbc8c4b0a4681 Merge: 72782127388d96 505b730ede7f5c Author: Linus Torvalds Date: Tue Jul 8 13:31:29 2025 -0700 Merge tag 'pwm/for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fixes from Uwe Kleine-König: "Two fixes for v6.16-rc6 The first patch fixes an embarrassing bug in the pwm core. I really wonder this wasn't found earlier since it's introduction in v6.11-rc1 as it greatly disturbs driving a PWM via sysfs. The second and last patch fixes a clock balance issue in an error path of the Mediatek PWM driver" * tag 'pwm/for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: mediatek: Ensure to disable clocks in error path pwm: Fix invalid state detection commit 72782127388d96e971f0186996a5bd44e64a1665 Merge: 2dbae28a1d2639 af1ccf546e5f29 Author: Linus Torvalds Date: Tue Jul 8 13:10:32 2025 -0700 Merge tag 'modules-6.16-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux Pull modules fixes from Daniel Gomez: "This includes two fixes: one introduced in the current release cycle and another introduced back in v6.4-rc1. Additionally, as Petr and Luis mentioned in previous pull requests, add myself (Daniel Gomez) to the list of modules maintainers. The first was reported by Intel's kernel test robot, and it addresses a crash exposed by Sebastian's commit c50d295c37f2 ("rds: Use nested-BH locking for rds_page_remainder") by allowing relocations for the per-CPU section even if it lacks the SHF_ALLOC flag. Petr and Sebastian went down to the archive history (before Git) and found the commit that broke it at [1] / [2] ("Don't relocate non-allocated regions in modules."). The second fix, reported and fixed by Petr (with additional cleanup), resolves a memory leak by ensuring proper deallocation if module loading fails. We couldn't find a reproducer other than forcing it manually or leveraging eBPF. So, I tested it by enabling error injection in the codetag functions through the error path that produces the leak and made it fail until execmem is unable to allocate more memory" Link: https://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux-fullhistory.git/commit/?id=b3b91325f3c7 [1] Link: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=1a6100caae [2] * tag 'modules-6.16-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: MAINTAINERS: update Daniel Gomez's role and email address module: Make sure relocations are applied to the per-CPU section module: Avoid unnecessary return value initialization in move_module() module: Fix memory deallocation on error path in move_module() commit 31ec70afaaad11fb08970bd1b0dc9ebae3501e16 Author: David Howells Date: Mon Jul 7 11:24:33 2025 +0100 rxrpc: Fix over large frame size warning Under some circumstances, the compiler will emit the following warning for rxrpc_send_response(): net/rxrpc/output.c: In function 'rxrpc_send_response': net/rxrpc/output.c:974:1: warning: the frame size of 1160 bytes is larger than 1024 bytes This occurs because the local variables include a 16-element scatterlist array and a 16-element bio_vec array. It's probably not actually a problem as this function is only called by the rxrpc I/O thread function in a kernel thread and there won't be much on the stack before it. Fix this by overlaying the bio_vec array over the kvec array in the rxrpc_local struct. There is one of these per I/O thread and the kvec array is intended for pointing at bits of a packet to be transmitted, typically a DATA or an ACK packet. As packets for a local endpoint are only transmitted by its specific I/O thread, there can be no race, and so overlaying this bit of memory should be no problem. Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506240423.E942yKJP-lkp@intel.com/ Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250707102435.2381045-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit a74bb5f202dabddfea96abc1328fcedae8aa140a Author: Mikhail Paulyshka Date: Tue Jul 8 16:39:10 2025 +0200 x86/CPU/AMD: Disable INVLPGB on Zen2 AMD Cyan Skillfish (Family 17h, Model 47h, Stepping 0h) has an issue that causes system oopses and panics when performing TLB flush using INVLPGB. However, the problem is that that machine has misconfigured CPUID and should not report the INVLPGB bit in the first place. So zap the kernel's representation of the flag so that nothing gets confused. [ bp: Massage. ] Fixes: 767ae437a32d ("x86/mm: Add INVLPGB feature and Kconfig entry") Signed-off-by: Mikhail Paulyshka Signed-off-by: Borislav Petkov (AMD) Cc: Link: https://lore.kernel.org/r/1ebe845b-322b-4929-9093-b41074e9e939@mixaill.net commit 5b937a1ed64ebeba8876e398110a5790ad77407c Author: Mikhail Paulyshka Date: Sat May 24 17:53:19 2025 +0300 x86/rdrand: Disable RDSEED on AMD Cyan Skillfish AMD Cyan Skillfish (Family 17h, Model 47h, Stepping 0h) has an error that causes RDSEED to always return 0xffffffff, while RDRAND works correctly. Mask the RDSEED cap for this CPU so that both /proc/cpuinfo and direct CPUID read report RDSEED as unavailable. [ bp: Move to amd.c, massage. ] Signed-off-by: Mikhail Paulyshka Signed-off-by: Borislav Petkov (AMD) Cc: Link: https://lore.kernel.org/20250524145319.209075-1-me@mixaill.net commit fec5e6f97dae5fbd628c444148b77728eae3bb93 Author: Kent Overstreet Date: Tue Jul 8 15:21:39 2025 -0400 bcachefs: Don't set BCH_FS_error on transaction restart This started showing up more when we started logging the error being corrected in the journal - but __bch2_fsck_err() could return transaction restarts before that. Setting BCH_FS_error incorrectly causes recovery passes to not be cleared, among other issues. Fixes: b43f72492768 ("bcachefs: Log fsck errors in the journal") Signed-off-by: Kent Overstreet commit 2dbae28a1d263902d647822937f9c42090c4adcc Merge: a3b5b88ea9bc9d 1afc85deecd32f Author: Linus Torvalds Date: Tue Jul 8 12:22:16 2025 -0700 Merge tag 'bitmap-for-6.16-rc6' of https://github.com/norov/linux Pull bitops UAPI fix from Yury Norov: "Fix BITS_PER_LONG merge error Tomas' fix for __BITS_PER_LONG was effectively reverted by a wrong merge. Fix it and add the related files to MAINTAINERS" * tag 'bitmap-for-6.16-rc6' of https://github.com/norov/linux: MAINTAINERS: bitmap: add UAPI headers uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2) commit af1ccf546e5f2915fbbde26841db43a971d81cf3 Author: Daniel Gomez Date: Fri Jul 4 21:39:59 2025 +0200 MAINTAINERS: update Daniel Gomez's role and email address Update Daniel Gomez's modules reviewer role to maintainer. This is according to the plan [1][2][3] of scaling with more reviewers for modules (for the incoming Rust support [4]) and rotate [5] every 6 months. Acked-by: Luis Chamberlain Link: https://lore.kernel.org/linux-modules/ZsPANzx4-5DrOl5m@bombadil.infradead.org [1] Link: https://lore.kernel.org/linux-modules/20240821174021.2371547-1-mcgrof@kernel.org [2] Link: https://lore.kernel.org/linux-modules/458901be-1da8-4987-9c72-5aa3da6db15e@suse.com [3] Link: https://lore.kernel.org/linux-modules/20250702-module-params-v3-v14-0-5b1cc32311af@kernel.org [4] Link: https://lore.kernel.org/linux-modules/Z3gDAnPlA3SZEbgl@bombadil.infradead.org [5] Acked-by: Petr Pavlu Signed-off-by: Daniel Gomez commit 570db4b39f535a8bb722adb8be0280d09e34ca99 Author: Sebastian Andrzej Siewior Date: Tue Jun 10 18:33:28 2025 +0200 module: Make sure relocations are applied to the per-CPU section The per-CPU data section is handled differently than the other sections. The memory allocations requires a special __percpu pointer and then the section is copied into the view of each CPU. Therefore the SHF_ALLOC flag is removed to ensure move_module() skips it. Later, relocations are applied and apply_relocations() skips sections without SHF_ALLOC because they have not been copied. This also skips the per-CPU data section. The missing relocations result in a NULL pointer on x86-64 and very small values on x86-32. This results in a crash because it is not skipped like NULL pointer would and can't be dereferenced. Such an assignment happens during static per-CPU lock initialisation with lockdep enabled. Allow relocation processing for the per-CPU section even if SHF_ALLOC is missing. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202506041623.e45e4f7d-lkp@intel.com Fixes: 1a6100caae425 ("Don't relocate non-allocated regions in modules.") #v2.6.1-rc3 Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Petr Pavlu Link: https://lore.kernel.org/r/20250610163328.URcsSUC1@linutronix.de Signed-off-by: Daniel Gomez Message-ID: <20250610163328.URcsSUC1@linutronix.de> commit eb0994a954978f0edd3efb38d0cbe6744df8b83d Author: Petr Pavlu Date: Wed Jun 18 14:26:27 2025 +0200 module: Avoid unnecessary return value initialization in move_module() All error conditions in move_module() set the return value by updating the ret variable. Therefore, it is not necessary to the initialize the variable when declaring it. Remove the unnecessary initialization. Signed-off-by: Petr Pavlu Reviewed-by: Sami Tolvanen Reviewed-by: Daniel Gomez Link: https://lore.kernel.org/r/20250618122730.51324-3-petr.pavlu@suse.com Signed-off-by: Daniel Gomez Message-ID: <20250618122730.51324-3-petr.pavlu@suse.com> commit ca3881f6fd8e9b6eb2d51e8718d07d3b8029d886 Author: Petr Pavlu Date: Wed Jun 18 14:26:26 2025 +0200 module: Fix memory deallocation on error path in move_module() The function move_module() uses the variable t to track how many memory types it has allocated and consequently how many should be freed if an error occurs. The variable is initially set to 0 and is updated when a call to module_memory_alloc() fails. However, move_module() can fail for other reasons as well, in which case t remains set to 0 and no memory is freed. Fix the problem by initializing t to MOD_MEM_NUM_TYPES. Additionally, make the deallocation loop more robust by not relying on the mod_mem_type_t enum having a signed integer as its underlying type. Fixes: c7ee8aebf6c0 ("module: add stop-grap sanity check on module memcpy()") Signed-off-by: Petr Pavlu Reviewed-by: Sami Tolvanen Reviewed-by: Daniel Gomez Link: https://lore.kernel.org/r/20250618122730.51324-2-petr.pavlu@suse.com Signed-off-by: Daniel Gomez Message-ID: <20250618122730.51324-2-petr.pavlu@suse.com> commit a3b5b88ea9bc9da00bd89d94738bf7181b2516f7 Merge: d006330be3f782 68279380266a5f Author: Linus Torvalds Date: Tue Jul 8 11:50:27 2025 -0700 Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull crypto library fix from Eric Biggers: "Fix an uninitialized variable in the s390 optimized SHA-1 and SHA-2. Note that my librarification changes also fix this by greatly simplifying how the s390 optimized SHA code is integrated. However, we need this separate fix for 6.16 and older versions" * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: crypto: s390/sha - Fix uninitialized variable in SHA-1 and SHA-2 commit 9dff55ebaef7e94e5dedb6be28a1cafff65cc467 Author: Jens Axboe Date: Tue Jul 8 11:04:45 2025 -0600 Revert "io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well" This reverts commit 6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3. The problematic commit was fixed in mainline, so the work-around in io_uring can be removed at this point. Anonymous inodes no longer pretend to be regular files after: 1e7ab6f67824 ("anon_inode: rework assertions") Signed-off-by: Jens Axboe commit fc582cd26e888b0652bc1494f252329453fd3b23 Author: Jens Axboe Date: Tue Jul 8 11:00:32 2025 -0600 io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU syzbot reports that defer/local task_work adding via msg_ring can hit a request that has been freed: CPU: 1 UID: 0 PID: 19356 Comm: iou-wrk-19354 Not tainted 6.16.0-rc4-syzkaller-00108-g17bbde2e1716 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 io_req_local_work_add io_uring/io_uring.c:1184 [inline] __io_req_task_work_add+0x589/0x950 io_uring/io_uring.c:1252 io_msg_remote_post io_uring/msg_ring.c:103 [inline] io_msg_data_remote io_uring/msg_ring.c:133 [inline] __io_msg_ring_data+0x820/0xaa0 io_uring/msg_ring.c:151 io_msg_ring_data io_uring/msg_ring.c:173 [inline] io_msg_ring+0x134/0xa00 io_uring/msg_ring.c:314 __io_issue_sqe+0x17e/0x4b0 io_uring/io_uring.c:1739 io_issue_sqe+0x165/0xfd0 io_uring/io_uring.c:1762 io_wq_submit_work+0x6e9/0xb90 io_uring/io_uring.c:1874 io_worker_handle_work+0x7cd/0x1180 io_uring/io-wq.c:642 io_wq_worker+0x42f/0xeb0 io_uring/io-wq.c:696 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 which is supposed to be safe with how requests are allocated. But msg ring requests alloc and free on their own, and hence must defer freeing to a sane time. Add an rcu_head and use kfree_rcu() in both spots where requests are freed. Only the one in io_msg_tw_complete() is strictly required as it has been visible on the other ring, but use it consistently in the other spot as well. This should not cause any other issues outside of KASAN rightfully complaining about it. Link: https://lore.kernel.org/io-uring/686cd2ea.a00a0220.338033.0007.GAE@google.com/ Reported-by: syzbot+54cbbfb4db9145d26fc2@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Fixes: 0617bb500bfa ("io_uring/msg_ring: improve handling of target CQE posting") Signed-off-by: Jens Axboe commit 50f930db22365738d9387c974416f38a06e8057e Author: Namjae Jeon Date: Tue Jul 8 07:47:40 2025 +0900 ksmbd: fix potential use-after-free in oplock/lease break ack If ksmbd_iov_pin_rsp return error, use-after-free can happen by accessing opinfo->state and opinfo_put and ksmbd_fd_put could called twice. Reported-by: Ziyan Xu Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 277627b431a0a6401635c416a21b2a0f77a77347 Author: Al Viro Date: Sun Jul 6 02:26:45 2025 +0100 ksmbd: fix a mount write count leak in ksmbd_vfs_kern_path_locked() If the call of ksmbd_vfs_lock_parent() fails, we drop the parent_path references and return an error. We need to drop the write access we just got on parent_path->mnt before we drop the mount reference - callers assume that ksmbd_vfs_kern_path_locked() returns with mount write access grabbed if and only if it has returned 0. Fixes: 864fb5d37163 ("ksmbd: fix possible deadlock in smb2_open") Signed-off-by: Al Viro Acked-by: Namjae Jeon Signed-off-by: Steve French commit 0c2b53997e8f5e2ec9e0fbd17ac0436466b65488 Author: Stefan Metzmacher Date: Wed Jul 2 09:18:05 2025 +0200 smb: server: make use of rdma_destroy_qp() The qp is created by rdma_create_qp() as t->cm_id->qp and t->qp is just a shortcut. rdma_destroy_qp() also calls ib_destroy_qp(cm_id->qp) internally, but it is protected by a mutex, clears the cm_id and also calls trace_cm_qp_destroy(). This should make the tracing more useful as both rdma_create_qp() and rdma_destroy_qp() are traces and it makes the code look more sane as functions from the same layer are used for the specific qp object. trace-cmd stream -e rdma_cma:cm_qp_create -e rdma_cma:cm_qp_destroy shows this now while doing a mount and unmount from a client: <...>-80 [002] 378.514182: cm_qp_create: cm.id=1 src=172.31.9.167:5445 dst=172.31.9.166:37113 tos=0 pd.id=0 qp_type=RC send_wr=867 recv_wr=255 qp_num=1 rc=0 <...>-6283 [001] 381.686172: cm_qp_destroy: cm.id=1 src=172.31.9.167:5445 dst=172.31.9.166:37113 tos=0 qp_num=1 Before we only saw the first line. Cc: Namjae Jeon Cc: Steve French Cc: Sergey Senozhatsky Cc: Hyunchul Lee Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Signed-off-by: Stefan Metzmacher Reviewed-by: Tom Talpey Acked-by: Namjae Jeon Signed-off-by: Steve French commit a46b4822bed08d15a856966357a4b12273751cd3 Author: Chen-Yu Tsai Date: Sat Jun 28 13:44:38 2025 +0800 arm64: dts: allwinner: a523: Rename emac0 to gmac0 The datasheets refer to the first Ethernet controller as GMAC0, not EMAC0. Fix the compatible string, node label and pinmux function name to match what the datasheets use. A change to the device tree binding is sent separately. Fixes: 56766ca6c4f6 ("arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC") Fixes: acca163f3f51 ("arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board") Fixes: c6800f15998b ("arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board") Link: https://patch.msgid.link/20250628054438.2864220-3-wens@kernel.org Signed-off-by: Chen-Yu Tsai commit 3ef07434c7dbfba302df477bb6c70e082965f232 Author: Christophe JAILLET Date: Sat Jul 5 10:34:32 2025 +0200 net: airoha: Fix an error handling path in airoha_probe() If an error occurs after a successful airoha_hw_init() call, airoha_ppe_deinit() needs to be called as already done in the remove function. Fixes: 00a7678310fe ("net: airoha: Introduce flowtable offload support") Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/1c940851b4fa3c3ed2a142910c821493a136f121.1746715755.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit d006330be3f782ff3fb7c3ed51e617e01f29a465 Merge: eadb9fa7f775e3 d78f76457d70d3 Author: Linus Torvalds Date: Tue Jul 8 08:55:18 2025 -0700 Merge tag 'sound-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are device-specific small fixes, including HD-audio, USB-audio and ASoC Intel quirks, as well as ASoC fsl, Cirrus codec and the legacy AD driver fixes. All look safe and easy" * tag 'sound-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Enable headset Mic on Positivo K116J ALSA: hda/tas2781: Fix calibration data parser issue ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp() ASoC: cs35l56: probe() should fail if the device ID is not recognized ALSA: hda/realtek: Add quirk for ASUS ExpertBook B9403CVAR ASoC: Intel: sof_sdw: Add quirks for Lenovo P1 and P16 ALSA: usb-audio: Improve filtering of sample rates on Focusrite devices ASoC: Intel: soc-acpi: arl: Correct order of cs42l43 matches MAINTAINERS: update Qualcomm audio codec drivers list ASoC: fsl_sai: Force a software reset when starting in consumer mode ASoC: Intel: SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_ACPI_INTEL_MATCH ASoC: fsl_asrc: use internal measured ratio for non-ideal ratio mode ALSA: hda/realtek - Add mute LED support for HP Victus 15-fb2xxx ALSA: hda: Add missing NVIDIA HDA codec IDs commit 40c47232772e45385757e8c979d8871895c78823 Merge: 95a234f6affbf5 1e7d9df379a04c Author: Jakub Kicinski Date: Tue Jul 8 08:39:53 2025 -0700 Merge branch 'vsock-fix-transport_-h2g-g2h-dgram-local-toctou-issues' Michal Luczaj says: ==================== vsock: Fix transport_{h2g,g2h,dgram,local} TOCTOU issues transport_{h2g,g2h,dgram,local} may become NULL on vsock_core_unregister(). Make sure a poorly timed `rmmod transport` won't lead to a NULL/stale pointer dereference. Note that these oopses are pretty unlikely to happen in the wild. Splats were collected after sprinkling kernel with mdelay()s. v3: https://lore.kernel.org/20250702-vsock-transports-toctou-v3-0-0a7e2e692987@rbox.co v2: https://lore.kernel.org/20250620-vsock-transports-toctou-v2-0-02ebd20b1d03@rbox.co v1: https://lore.kernel.org/20250618-vsock-transports-toctou-v1-0-dd2d2ede9052@rbox.co ==================== Link: https://patch.msgid.link/20250703-vsock-transports-toctou-v4-0-98f0eb530747@rbox.co Signed-off-by: Jakub Kicinski commit 1e7d9df379a04ccd0c2f82f39fbb69d482e864cc Author: Michal Luczaj Date: Thu Jul 3 17:18:20 2025 +0200 vsock: Fix IOCTL_VM_SOCKETS_GET_LOCAL_CID to check also `transport_local` Support returning VMADDR_CID_LOCAL in case no other vsock transport is available. Fixes: 0e12190578d0 ("vsock: add local transport support in the vsock core") Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250703-vsock-transports-toctou-v4-3-98f0eb530747@rbox.co Signed-off-by: Jakub Kicinski commit 687aa0c5581b8d4aa87fd92973e4ee576b550cdf Author: Michal Luczaj Date: Thu Jul 3 17:18:19 2025 +0200 vsock: Fix transport_* TOCTOU Transport assignment may race with module unload. Protect new_transport from becoming a stale pointer. This also takes care of an insecure call in vsock_use_local_transport(); add a lockdep assert. BUG: unable to handle page fault for address: fffffbfff8056000 Oops: Oops: 0000 [#1] SMP KASAN RIP: 0010:vsock_assign_transport+0x366/0x600 Call Trace: vsock_connect+0x59c/0xc40 __sys_connect+0xe8/0x100 __x64_sys_connect+0x6e/0xc0 do_syscall_64+0x92/0x1c0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250703-vsock-transports-toctou-v4-2-98f0eb530747@rbox.co Signed-off-by: Jakub Kicinski commit 209fd720838aaf1420416494c5505096478156b4 Author: Michal Luczaj Date: Thu Jul 3 17:18:18 2025 +0200 vsock: Fix transport_{g2h,h2g} TOCTOU vsock_find_cid() and vsock_dev_do_ioctl() may race with module unload. transport_{g2h,h2g} may become NULL after the NULL check. Introduce vsock_transport_local_cid() to protect from a potential null-ptr-deref. KASAN: null-ptr-deref in range [0x0000000000000118-0x000000000000011f] RIP: 0010:vsock_find_cid+0x47/0x90 Call Trace: __vsock_bind+0x4b2/0x720 vsock_bind+0x90/0xe0 __sys_bind+0x14d/0x1e0 __x64_sys_bind+0x6e/0xc0 do_syscall_64+0x92/0x1c0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 KASAN: null-ptr-deref in range [0x0000000000000118-0x000000000000011f] RIP: 0010:vsock_dev_do_ioctl.isra.0+0x58/0xf0 Call Trace: __x64_sys_ioctl+0x12d/0x190 do_syscall_64+0x92/0x1c0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250703-vsock-transports-toctou-v4-1-98f0eb530747@rbox.co Signed-off-by: Jakub Kicinski commit 95a234f6affbf51f06338383537ab80d637bb785 Author: Haoxiang Li Date: Thu Jul 3 18:01:09 2025 +0800 net: ethernet: rtsn: Fix a null pointer dereference in rtsn_probe() Add check for the return value of rcar_gen4_ptp_alloc() to prevent potential null pointer dereference. Fixes: b0d3969d2b4d ("net: ethernet: rtsn: Add support for Renesas Ethernet-TSN") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Niklas Söderlund Link: https://patch.msgid.link/20250703100109.2541018-1-haoxiang_li2024@163.com Signed-off-by: Jakub Kicinski commit 462da827c6e2be59c7b0981ed39fff7a9488d013 Merge: d3a5f2871adc0c b3603c0466a85b Author: Jakub Kicinski Date: Tue Jul 8 08:02:52 2025 -0700 Merge branch 'allwinner-a523-rename-emac0-to-gmac0' Chen-Yu Tsai says: ==================== allwinner: a523: Rename emac0 to gmac0 This small series aims to align the name of the first ethernet controller found on the Allwinner A523 SoC family with the name found in the datasheets. It renames the compatible string and any other references from "emac0" to "gmac0". When support of the hardware was introduced, the name chosen was "EMAC", which followed previous generations. However the datasheets use the name "GMAC" instead, likely because there is another "GMAC" based on a newer DWMAC IP. ==================== Link: https://patch.msgid.link/20250628054438.2864220-1-wens@kernel.org Signed-off-by: Jakub Kicinski commit b3603c0466a85bed302e80226950092ceaf09b94 Author: Chen-Yu Tsai Date: Sat Jun 28 13:44:37 2025 +0800 dt-bindings: net: sun8i-emac: Rename A523 EMAC0 to GMAC0 The datasheets refer to the first Ethernet controller as GMAC0, not EMAC0. Rename the compatible string to align with the datasheets. A fix for the device trees will be sent separately. Fixes: 0454b9057e98 ("dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible") Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250628054438.2864220-2-wens@kernel.org Signed-off-by: Jakub Kicinski commit d3a5f2871adc0c61c61869f37f3e697d97f03d8c Author: Jiayuan Chen Date: Mon Jul 7 13:41:11 2025 +0800 tcp: Correct signedness in skb remaining space calculation Syzkaller reported a bug [1] where sk->sk_forward_alloc can overflow. When we send data, if an skb exists at the tail of the write queue, the kernel will attempt to append the new data to that skb. However, the code that checks for available space in the skb is flawed: ''' copy = size_goal - skb->len ''' The types of the variables involved are: ''' copy: ssize_t (s64 on 64-bit systems) size_goal: int skb->len: unsigned int ''' Due to C's type promotion rules, the signed size_goal is converted to an unsigned int to match skb->len before the subtraction. The result is an unsigned int. When this unsigned int result is then assigned to the s64 copy variable, it is zero-extended, preserving its non-negative value. Consequently, copy is always >= 0. Assume we are sending 2GB of data and size_goal has been adjusted to a value smaller than skb->len. The subtraction will result in copy holding a very large positive integer. In the subsequent logic, this large value is used to update sk->sk_forward_alloc, which can easily cause it to overflow. The syzkaller reproducer uses TCP_REPAIR to reliably create this condition. However, this can also occur in real-world scenarios. The tcp_bound_to_half_wnd() function can also reduce size_goal to a small value. This would cause the subsequent tcp_wmem_schedule() to set sk->sk_forward_alloc to a value close to INT_MAX. Further memory allocation requests would then cause sk_forward_alloc to wrap around and become negative. [1]: https://syzkaller.appspot.com/bug?extid=de6565462ab540f50e47 Reported-by: syzbot+de6565462ab540f50e47@syzkaller.appspotmail.com Fixes: 270a1c3de47e ("tcp: Support MSG_SPLICE_PAGES") Signed-off-by: Jiayuan Chen Reviewed-by: Eric Dumazet Reviewed-by: David Howells Link: https://patch.msgid.link/20250707054112.101081-1-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski commit 5383fc057a0ea18e8eb9a0472ea853c24b59ee5e Merge: 7e7a7bf212cfd3 fa787ac07b3ceb Author: Paolo Bonzini Date: Tue Jul 8 10:49:19 2025 -0400 Merge tag 'kvm-x86-fixes-6.16-rcN' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.16-rcN - Reject SEV{-ES} intra-host migration if one or more vCPUs are actively being created so as not to create a non-SEV{-ES} vCPU in an SEV{-ES} VM. - Use a pre-allocated, per-vCPU buffer for handling de-sparsified vCPU masks when emulating Hyper-V hypercalls to fix a "stack frame too large" issue. - Allow out-of-range/invalid Xen event channel ports when configuring IRQ routing to avoid dictating a specific ioctl() ordering to userspace. - Conditionally reschedule when setting memory attributes to avoid soft lockups when userspace converts huge swaths of memory to/from private. - Add back MWAIT as a required feature for the MONITOR/MWAIT selftest. - Add a missing field in struct sev_data_snp_launch_start that resulted in the guest-visible workarounds field being filled at the wrong offset. - Skip non-canonical address when processing Hyper-V PV TLB flushes to avoid VM-Fail on INVVPID. - Advertise supported TDX TDVMCALLs to userspace. commit 7e7a7bf212cfd31183bd8e64295607d8e3153a66 Merge: 8aed168bf7e6b4 42ce432522a176 Author: Paolo Bonzini Date: Tue Jul 8 10:48:21 2025 -0400 Merge tag 'kvmarm-fixes-6.16-5' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take # - Remove the last leftovers from the ill-fated FPSIMD host state mapping at EL2 stage-1 - Fix unexpected advertisement to the guest of unimplemented S2 base granule sizes commit 8aed168bf7e6b4cbb4b46305f6fe9d8cbd6bd872 Merge: 25e8b1dd4883e6 0e02219f9cf4f0 Author: Paolo Bonzini Date: Tue Jul 8 10:46:40 2025 -0400 Merge tag 'kvmarm-fixes-6.16-4' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take #4 - Gracefully fail initialising pKVM if the interrupt controller isn't GICv3 - Also gracefully fail initialising pKVM if the carveout allocation fails - Fix the computing of the minimum MMIO range required for the host on stage-2 fault - Fix the generation of the GICv3 Maintenance Interrupt in nested mode commit 1afc85deecd32ff0f9972b38ecfbddb8be63143e Author: Thomas Weißschuh Date: Mon Jun 30 15:09:35 2025 +0200 MAINTAINERS: bitmap: add UAPI headers The UAPI headers have been split out from the kernel-only headers. They maintained as part of the bitmap library. Signed-off-by: Thomas Weißschuh Signed-off-by: Yury Norov (NVIDIA) commit 70b9c0c11e55167b9552ef395bc00f4920299177 Author: Thomas Weißschuh Date: Mon Jun 30 15:02:18 2025 +0200 uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2) BITS_PER_LONG does not exist in UAPI headers, so can't be used by the UAPI __GENMASK(). Instead __BITS_PER_LONG needs to be used. When __GENMASK() was introduced in commit 3c7a8e190bc5 ("uapi: introduce uapi-friendly macros for GENMASK"), the code was fine. A broken revert in 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") introduced the incorrect usage of BITS_PER_LONG. That was fixed in commit 11fcf368506d ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again"). But a broken sync of the kernel headers with the tools/ headers in commit fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources") undid the fix. Reapply the fix and while at it also fix the tools header. Fixes: fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources") Signed-off-by: Thomas Weißschuh Acked-by: Yury Norov (NVIDIA) Signed-off-by: Yury Norov (NVIDIA) commit a609bd74b8680dba62c44f7e6d00d381ddb2d3c0 Author: Amadeusz Sławiński Date: Tue Jul 8 12:50:09 2025 +0200 ASoC: Intel: avs: Fix NULL ptr deref on rmmod When uloading snd_soc_avs module there is NULL pointer dereference. It happens, because codec was moved into pdata and avs_component_hda_unregister_dais() was not updated. Fixes: 1581d5c68208 ("ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20250708105009.1883627-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 9b027aa3e8c44ea826fab1928f5d02a186ff1536 Author: Christoph Hellwig Date: Fri May 23 14:31:28 2025 +0200 xfs: remove the bt_bdev_file buftarg field And use bt_file for both bdev and shmem backed buftargs. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit 988a16827582dfb9256d22f74cb363f41f090c90 Author: Christoph Hellwig Date: Mon Jul 7 14:53:16 2025 +0200 xfs: rename the bt_bdev_* buftarg fields The extra bdev_ is weird, so drop it. Also improve the comment to make it clear these are the hardware limits. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit e4a7a3f9b24336059c782eaa7ed5ef88a614a1cf Author: Christoph Hellwig Date: Mon Jul 7 14:53:15 2025 +0200 xfs: refactor xfs_calc_atomic_write_unit_max This function and the helpers used by it duplicate the same logic for AGs and RTGs. Use the xfs_group_type enum to unify both variants. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit e74d1fa6a7d738c009a1dc7d739e64000c0d3d33 Author: Christoph Hellwig Date: Mon Jul 7 14:53:14 2025 +0200 xfs: add a xfs_group_type_buftarg helper Generalize the xfs_group_type helper in the discard code to return a buftarg and move it to xfs_mount.h, and use the result in xfs_dax_notify_dev_failure. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit d9b1e348cff7ed13e30886de7a72e1fa0e235863 Author: Christoph Hellwig Date: Mon Jul 7 14:53:13 2025 +0200 xfs: remove the call to sync_blockdev in xfs_configure_buftarg This extra call is not needed as xfs_alloc_buftarg already calls sync_blockdev. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Carlos Maiolino commit a578a8efa707cc99c22960e86e5b9eaeeda97c5e Author: Christoph Hellwig Date: Mon Jul 7 14:53:12 2025 +0200 xfs: clean up the initial read logic in xfs_readsb The initial sb read is always for a device logical block size buffer. The device logical block size is provided in the bt_logical_sectorsize in struct buftarg, so use that instead of the confusingly named xfs_getsize_buftarg buffer that reads it from the bdev. Update the comments surrounding the code to better describe what is going on. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit 2a198bbec6913ae1c90ec963750003c6213668c7 Author: Sabrina Dubroca Date: Fri Jul 4 16:54:34 2025 +0200 Revert "xfrm: destroy xfrm_state synchronously on net exit path" This reverts commit f75a2804da391571563c4b6b29e7797787332673. With all states (whether user or kern) removed from the hashtables during deletion, there's no need for synchronous destruction of states. xfrm6_tunnel states still need to have been destroyed (which will be the case when its last user is deleted (not destroyed)) so that xfrm6_tunnel_free_spi removes it from the per-netns hashtable before the netns is destroyed. This has the benefit of skipping one synchronize_rcu per state (in __xfrm_state_destroy(sync=true)) when we exit a netns. Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit b441cf3f8c4b8576639d20c8eb4aa32917602ecd Author: Sabrina Dubroca Date: Fri Jul 4 16:54:33 2025 +0200 xfrm: delete x->tunnel as we delete x The ipcomp fallback tunnels currently get deleted (from the various lists and hashtables) as the last user state that needed that fallback is destroyed (not deleted). If a reference to that user state still exists, the fallback state will remain on the hashtables/lists, triggering the WARN in xfrm_state_fini. Because of those remaining references, the fix in commit f75a2804da39 ("xfrm: destroy xfrm_state synchronously on net exit path") is not complete. We recently fixed one such situation in TCP due to defered freeing of skbs (commit 9b6412e6979f ("tcp: drop secpath at the same time as we currently drop dst")). This can also happen due to IP reassembly: skbs with a secpath remain on the reassembly queue until netns destruction. If we can't guarantee that the queues are flushed by the time xfrm_state_fini runs, there may still be references to a (user) xfrm_state, preventing the timely deletion of the corresponding fallback state. Instead of chasing each instance of skbs holding a secpath one by one, this patch fixes the issue directly within xfrm, by deleting the fallback state as soon as the last user state depending on it has been deleted. Destruction will still happen when the final reference is dropped. A separate lockdep class for the fallback state is required since we're going to lock x->tunnel while x is locked. Fixes: 9d4139c76905 ("netns xfrm: per-netns xfrm_state_all list") Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit e10981075adce203eac0be866389309eeb8ef11e Author: Rong Zhang Date: Tue Jul 8 00:38:07 2025 +0800 platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots On some models supported by ideapad-laptop, the HW/FW can remember the state of keyboard backlight among boots. However, it is always turned off while shutting down, as a side effect of the LED class device unregistering sequence. This is inconvenient for users who always prefer turning on the keyboard backlight. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class device so that the state of keyboard backlight gets remembered, which also aligns with the behavior of manufacturer utilities on Windows. Fixes: 503325f84bc0 ("platform/x86: ideapad-laptop: add keyboard backlight control support") Cc: stable@vger.kernel.org Signed-off-by: Rong Zhang Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250707163808.155876-3-i@rong.moe Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9533b789df7e8d273543a5991aec92447be043d7 Author: Rong Zhang Date: Tue Jul 8 00:38:06 2025 +0800 platform/x86: ideapad-laptop: Fix FnLock not remembered among boots On devices supported by ideapad-laptop, the HW/FW can remember the FnLock state among boots. However, since the introduction of the FnLock LED class device, it is turned off while shutting down, as a side effect of the LED class device unregistering sequence. Many users always turn on FnLock because they use function keys much more frequently than multimedia keys. The behavior change is inconvenient for them. Thus, set LED_RETAIN_AT_SHUTDOWN on the LED class device so that the FnLock state gets remembered, which also aligns with the behavior of manufacturer utilities on Windows. Fixes: 07f48f668fac ("platform/x86: ideapad-laptop: add FnLock LED class device") Cc: stable@vger.kernel.org Signed-off-by: Rong Zhang Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250707163808.155876-2-i@rong.moe Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f2eb2796b95118b877b63d9fcd3459e70494a498 Author: Pranav Tyagi Date: Tue Jun 17 18:44:46 2025 +0530 xfs: replace strncpy with memcpy in xattr listing Use memcpy() in place of strncpy() in __xfs_xattr_put_listent(). The length is known and a null byte is added manually. No functional change intended. Signed-off-by: Pranav Tyagi Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit 5300e5e24b8122ba3f60ce455e968379434f322e Merge: 737bb912ebbe45 eb8352ee2d1e70 Author: Johannes Berg Date: Tue Jul 8 09:22:40 2025 +0200 Merge tag 'mt76-fixes-2025-07-07' of https://github.com/nbd168/wireless Felix Fietkau says: =================== mt76 fixes for 6.16 =================== Signed-off-by: Johannes Berg commit fee58ca135a7b979c8b75e6d2eac60d695f9209b Author: Matthew Auld Date: Tue Jul 1 11:39:50 2025 +0100 drm/xe/bmg: fix compressed VRAM handling There looks to be an issue in our compression handling when the BO pages are very fragmented, where we choose to skip the identity map and instead fall back to emitting the PTEs by hand when migrating memory, such that we can hopefully do more work per blit operation. However in such a case we need to ensure the src PTEs are correctly tagged with a compression enabled PAT index on dgpu xe2+, otherwise the copy will simply treat the src memory as uncompressed, leading to corruption if the memory was compressed by the user. To fix this pass along use_comp_pat into emit_pte() on the src side, to indicate that compression should be considered. v2 (Jonathan): tweak the commit message Fixes: 523f191cc0c7 ("drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx") Signed-off-by: Matthew Auld Cc: Himal Prasad Ghimiray Cc: Thomas Hellström Cc: Akshata Jahagirdar Cc: # v6.12+ Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250701103949.83116-2-matthew.auld@intel.com (cherry picked from commit f7a2fd776e57bd6468644bdecd91ab3aba57ba58) Signed-off-by: Lucas De Marchi commit daa099fed50a39256feb37d3fac146bf0d74152f Author: Matthew Brost Date: Tue Jul 1 20:58:46 2025 -0700 Revert "drm/xe/xe2: Enable Indirect Ring State support for Xe2" This reverts commit fe0154cf8222d9e38c60ccc124adb2f9b5272371. Seeing some unexplained random failures during LRC context switches with indirect ring state enabled. The failures were always there, but the repro rate increased with the addition of WA BB as a separate BO. Commit 3a1edef8f4b5 ("drm/xe: Make WA BB part of LRC BO") helped to reduce the issues in the context switches, but didn't eliminate them completely. Indirect ring state is not required for any current features, so disable for now until failures can be root caused. Cc: stable@vger.kernel.org Fixes: fe0154cf8222 ("drm/xe/xe2: Enable Indirect Ring State support for Xe2") Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250702035846.3178344-1-matthew.brost@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 03d85ab36bcbcbe9dc962fccd3f8e54d7bb93b35) Signed-off-by: Lucas De Marchi commit c9a95dbe06102cf01afee4cd83ecb29f8d587a72 Author: Matthew Brost Date: Wed Jul 2 14:35:11 2025 -0700 drm/xe: Allocate PF queue size on pow2 boundary CIRC_SPACE does not work unless the size argument is a power of 2, allocate PF queue size on power of 2 boundary. Cc: stable@vger.kernel.org Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size") Fixes: 29582e0ea75c ("drm/xe: Add page queue multiplier") Signed-off-by: Matthew Brost Reviewed-by: Francois Dugast Link: https://lore.kernel.org/r/20250702213511.3226167-1-matthew.brost@intel.com (cherry picked from commit 491b9783126303755717c0cbde0b08ee59b6abab) Signed-off-by: Lucas De Marchi commit 705a412a367f383430fa34bada387af2e52eb043 Author: Michal Wajdeczko Date: Wed Jul 2 00:00:52 2025 +0200 drm/xe/pf: Clear all LMTT pages on alloc Our LMEM buffer objects are not cleared by default on alloc and during VF provisioning we only setup LMTT PTEs for the actually provisioned LMEM range. But beyond that valid range we might leave some stale data that could either point to some other VFs allocations or even to the PF pages. Explicitly clear all new LMTT page to avoid the risk that a malicious VF would try to exploit that gap. While around add asserts to catch any undesired PTE overwrites and low-level debug traces to track LMTT PT life-cycle. Fixes: b1d204058218 ("drm/xe/pf: Introduce Local Memory Translation Table") Signed-off-by: Michal Wajdeczko Cc: Michał Winiarski Cc: Lukasz Laguna Reviewed-by: Michał Winiarski Reviewed-by: Piotr Piórkowski Link: https://lore.kernel.org/r/20250701220052.1612-1-michal.wajdeczko@intel.com (cherry picked from commit 3fae6918a3e27cce20ded2551f863fb05d4bef8d) Signed-off-by: Lucas De Marchi commit 80852774ba0adc37dfdc230acceb7b2a90c900d8 Merge: ffc2c8c4a714df c7349772c268ec Author: Jakub Kicinski Date: Mon Jul 7 19:01:28 2025 -0700 Merge tag 'for-net-2025-07-03' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_sync: Fix not disabling advertising instance - hci_core: Remove check of BDADDR_ANY in hci_conn_hash_lookup_big_state - hci_sync: Fix attempting to send HCI_Disconnect to BIS handle - hci_event: Fix not marking Broadcast Sink BIS as connected * tag 'for-net-2025-07-03' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_event: Fix not marking Broadcast Sink BIS as connected Bluetooth: hci_sync: Fix attempting to send HCI_Disconnect to BIS handle Bluetooth: hci_core: Remove check of BDADDR_ANY in hci_conn_hash_lookup_big_state Bluetooth: hci_sync: Fix not disabling advertising instance ==================== Link: https://patch.msgid.link/20250703160409.1791514-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit ffc2c8c4a714df53a715827d6334ab9474424f6a Author: Ryo Takakura Date: Wed Jul 2 18:24:17 2025 +0900 net: bcmgenet: Initialize u64 stats seq counter Initialize u64 stats as it uses seq counter on 32bit machines as suggested by lockdep below. [ 1.830953][ T1] INFO: trying to register non-static key. [ 1.830993][ T1] The code is fine but needs lockdep annotation, or maybe [ 1.831027][ T1] you didn't initialize this object before use? [ 1.831057][ T1] turning off the locking correctness validator. [ 1.831090][ T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 6.16.0-rc2-v7l+ #1 PREEMPT [ 1.831097][ T1] Tainted: [W]=WARN [ 1.831099][ T1] Hardware name: BCM2711 [ 1.831101][ T1] Call trace: [ 1.831104][ T1] unwind_backtrace from show_stack+0x18/0x1c [ 1.831120][ T1] show_stack from dump_stack_lvl+0x8c/0xcc [ 1.831129][ T1] dump_stack_lvl from register_lock_class+0x9e8/0x9fc [ 1.831141][ T1] register_lock_class from __lock_acquire+0x420/0x22c0 [ 1.831154][ T1] __lock_acquire from lock_acquire+0x130/0x3f8 [ 1.831166][ T1] lock_acquire from bcmgenet_get_stats64+0x4a4/0x4c8 [ 1.831176][ T1] bcmgenet_get_stats64 from dev_get_stats+0x4c/0x408 [ 1.831184][ T1] dev_get_stats from rtnl_fill_stats+0x38/0x120 [ 1.831193][ T1] rtnl_fill_stats from rtnl_fill_ifinfo+0x7f8/0x1890 [ 1.831203][ T1] rtnl_fill_ifinfo from rtmsg_ifinfo_build_skb+0xd0/0x138 [ 1.831214][ T1] rtmsg_ifinfo_build_skb from rtmsg_ifinfo+0x48/0x8c [ 1.831225][ T1] rtmsg_ifinfo from register_netdevice+0x8c0/0x95c [ 1.831237][ T1] register_netdevice from register_netdev+0x28/0x40 [ 1.831247][ T1] register_netdev from bcmgenet_probe+0x690/0x6bc [ 1.831255][ T1] bcmgenet_probe from platform_probe+0x64/0xbc [ 1.831263][ T1] platform_probe from really_probe+0xd0/0x2d4 [ 1.831269][ T1] really_probe from __driver_probe_device+0x90/0x1a4 [ 1.831273][ T1] __driver_probe_device from driver_probe_device+0x38/0x11c [ 1.831278][ T1] driver_probe_device from __driver_attach+0x9c/0x18c [ 1.831282][ T1] __driver_attach from bus_for_each_dev+0x84/0xd4 [ 1.831291][ T1] bus_for_each_dev from bus_add_driver+0xd4/0x1f4 [ 1.831303][ T1] bus_add_driver from driver_register+0x88/0x120 [ 1.831312][ T1] driver_register from do_one_initcall+0x78/0x360 [ 1.831320][ T1] do_one_initcall from kernel_init_freeable+0x2bc/0x314 [ 1.831331][ T1] kernel_init_freeable from kernel_init+0x1c/0x144 [ 1.831339][ T1] kernel_init from ret_from_fork+0x14/0x20 [ 1.831344][ T1] Exception stack(0xf082dfb0 to 0xf082dff8) [ 1.831349][ T1] dfa0: 00000000 00000000 00000000 00000000 [ 1.831353][ T1] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.831356][ T1] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 Fixes: 59aa6e3072aa ("net: bcmgenet: switch to use 64bit statistics") Reviewed-by: Florian Fainelli Signed-off-by: Ryo Takakura Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250702092417.46486-1-ryotkkr98@gmail.com Signed-off-by: Jakub Kicinski commit 667eeab4999e981c96b447a4df5f20bdf5c26f13 Author: Kuniyuki Iwashima Date: Wed Jul 2 01:43:40 2025 +0000 tipc: Fix use-after-free in tipc_conn_close(). syzbot reported a null-ptr-deref in tipc_conn_close() during netns dismantle. [0] tipc_topsrv_stop() iterates tipc_net(net)->topsrv->conn_idr and calls tipc_conn_close() for each tipc_conn. The problem is that tipc_conn_close() is called after releasing the IDR lock. At the same time, there might be tipc_conn_recv_work() running and it could call tipc_conn_close() for the same tipc_conn and release its last ->kref. Once we release the IDR lock in tipc_topsrv_stop(), there is no guarantee that the tipc_conn is alive. Let's hold the ref before releasing the lock and put the ref after tipc_conn_close() in tipc_topsrv_stop(). [0]: BUG: KASAN: use-after-free in tipc_conn_close+0x122/0x140 net/tipc/topsrv.c:165 Read of size 8 at addr ffff888099305a08 by task kworker/u4:3/435 CPU: 0 PID: 435 Comm: kworker/u4:3 Not tainted 4.19.204-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 tipc_conn_close+0x122/0x140 net/tipc/topsrv.c:165 tipc_topsrv_stop net/tipc/topsrv.c:701 [inline] tipc_topsrv_exit_net+0x27b/0x5c0 net/tipc/topsrv.c:722 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 23: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] tipc_conn_alloc+0x43/0x4f0 net/tipc/topsrv.c:192 tipc_topsrv_accept+0x1b5/0x280 net/tipc/topsrv.c:470 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 23: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 tipc_conn_kref_release net/tipc/topsrv.c:150 [inline] kref_put include/linux/kref.h:70 [inline] conn_put+0x2cd/0x3a0 net/tipc/topsrv.c:155 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff888099305a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff888099305a00, ffff888099305c00) The buggy address belongs to the page: page:ffffea000264c140 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00028b6b88 ffffea0002cd2b08 ffff88813bff0940 raw: 0000000000000000 ffff888099305000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099305900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099305980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888099305a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099305a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099305b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: c5fa7b3cf3cb ("tipc: introduce new TIPC server infrastructure") Reported-by: syzbot+d333febcf8f4bc5f6110@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=27169a847a70550d17be Signed-off-by: Kuniyuki Iwashima Reviewed-by: Tung Nguyen Link: https://patch.msgid.link/20250702014350.692213-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit eadb9fa7f775e39c2bdd9a43a947f03e86f9e37b Merge: 6e9128ff9d8113 f8b53cc9174c59 Author: Linus Torvalds Date: Mon Jul 7 18:22:25 2025 -0700 Merge tag 'efi-fixes-for-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - Drop preprocessor macros in zboot.lds which is not preprocessed - Fix zboot .data section size and raw size when SBAT is enabled * tag 'efi-fixes-for-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: Fix .data section size calculations when .sbat is present efi: Drop preprocessor directives from zboot.lds commit 6e9128ff9d8113ef208e5ec82573b96ead100072 Merge: d7b8f8e20813f0 8e786a85c0a3c0 Author: Linus Torvalds Date: Mon Jul 7 17:08:36 2025 -0700 Merge tag 'tsa_x86_bugs_for_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU speculation fixes from Borislav Petkov: "Add the mitigation logic for Transient Scheduler Attacks (TSA) TSA are new aspeculative side channel attacks related to the execution timing of instructions under specific microarchitectural conditions. In some cases, an attacker may be able to use this timing information to infer data from other contexts, resulting in information leakage. Add the usual controls of the mitigation and integrate it into the existing speculation bugs infrastructure in the kernel" * tag 'tsa_x86_bugs_for_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/process: Move the buffer clearing before MONITOR x86/microcode/AMD: Add TSA microcode SHAs KVM: SVM: Advertise TSA CPUID bits to guests x86/bugs: Add a Transient Scheduler Attacks mitigation x86/bugs: Rename MDS machinery to something more generic commit 1e3b66e326015f77bc4b36976bebeedc2ac0f588 Author: Stefano Garzarella Date: Thu Jul 3 13:23:29 2025 +0200 vsock: fix `vsock_proto` declaration From commit 634f1a7110b4 ("vsock: support sockmap"), `struct proto vsock_proto`, defined in af_vsock.c, is not static anymore, since it's used by vsock_bpf.c. If CONFIG_BPF_SYSCALL is not defined, `make C=2` will print a warning: $ make O=build C=2 W=1 net/vmw_vsock/ ... CC [M] net/vmw_vsock/af_vsock.o CHECK ../net/vmw_vsock/af_vsock.c ../net/vmw_vsock/af_vsock.c:123:14: warning: symbol 'vsock_proto' was not declared. Should it be static? Declare `vsock_proto` regardless of CONFIG_BPF_SYSCALL, since it's defined in af_vsock.c, which is built regardless of CONFIG_BPF_SYSCALL. Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250703112329.28365-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit ae8f160e7eb24240a2a79fc4c815c6a0d4ee16cc Author: Kuniyuki Iwashima Date: Fri Jul 4 05:48:18 2025 +0000 netlink: Fix wraparounds of sk->sk_rmem_alloc. Netlink has this pattern in some places if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf) atomic_add(skb->truesize, &sk->sk_rmem_alloc); , which has the same problem fixed by commit 5a465a0da13e ("udp: Fix multiple wraparounds of sk->sk_rmem_alloc."). For example, if we set INT_MAX to SO_RCVBUFFORCE, the condition is always false as the two operands are of int. Then, a single socket can eat as many skb as possible until OOM happens, and we can see multiple wraparounds of sk->sk_rmem_alloc. Let's fix it by using atomic_add_return() and comparing the two variables as unsigned int. Before: [root@fedora ~]# ss -f netlink Recv-Q Send-Q Local Address:Port Peer Address:Port -1668710080 0 rtnl:nl_wraparound/293 * After: [root@fedora ~]# ss -f netlink Recv-Q Send-Q Local Address:Port Peer Address:Port 2147483072 0 rtnl:nl_wraparound/290 * ^ `--- INT_MAX - 576 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Jason Baron Closes: https://lore.kernel.org/netdev/cover.1750285100.git.jbaron@akamai.com/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250704054824.1580222-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 4e2bba30b16935d18e59d137f607f8e10b6fda87 Merge: b9fd9888a5654e 4ab9ada765b7ac Author: Jakub Kicinski Date: Mon Jul 7 16:43:51 2025 -0700 Merge branch 'fix-qca808x-wol-issue' Luo Jie says: ==================== Fix QCA808X WoL Issue Restore WoL (Wake-on-LAN) enablement via MMD3 register 0x8012 BIT5 for the QCA808X PHY. This change resolves the issue where WoL functionality was not working due to its unintended removal in a previous commit. Refactor at8031_set_wol() into a shared library to enable reuse of the Wake-on-LAN (WoL) functionality by the AT8031, QCA807X and QCA808X PHY drivers. ==================== Link: https://patch.msgid.link/20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com Signed-off-by: Jakub Kicinski commit 4ab9ada765b7acb5cd02fe27632ec2586b7868ee Author: Luo Jie Date: Fri Jul 4 13:31:14 2025 +0800 net: phy: qcom: qca808x: Fix WoL issue by utilizing at8031_set_wol() The previous commit unintentionally removed the code responsible for enabling WoL via MMD3 register 0x8012 BIT5. As a result, Wake-on-LAN (WoL) support for the QCA808X PHY is no longer functional. The WoL (Wake-on-LAN) feature for the QCA808X PHY is enabled via MMD3 register 0x8012, BIT5. This implementation is aligned with the approach used in at8031_set_wol(). Fixes: e58f30246c35 ("net: phy: at803x: fix the wol setting functions") Signed-off-by: Luo Jie Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20250704-qcom_phy_wol_support-v1-2-053342b1538d@quicinc.com Signed-off-by: Jakub Kicinski commit e31cf3cce2102af984656fed6e2254cbdd46da02 Author: Luo Jie Date: Fri Jul 4 13:31:13 2025 +0800 net: phy: qcom: move the WoL function to shared library Move the WoL (Wake-on-LAN) functionality to a shared library to enable its reuse by the QCA808X PHY driver, incorporating support for WoL functionality similar to the implementation in at8031_set_wol(). Reviewed-by: Maxime Chevallier Signed-off-by: Luo Jie Link: https://patch.msgid.link/20250704-qcom_phy_wol_support-v1-1-053342b1538d@quicinc.com Signed-off-by: Jakub Kicinski commit 6f80be548588429100eb1f5e25dc2a714d583ffe Author: Alexandru Andries Date: Tue Jul 8 01:07:30 2025 +0300 ASoC: amd: yc: add DMI quirk for ASUS M6501RM add DMI entry for ASUS Vivobook PRO 15X (M6501RM) to make the internal microphone function Signed-off-by: Alexandru Andries Link: https://patch.msgid.link/20250707220730.361290-1-alex.andries.aa@gmail.com Signed-off-by: Mark Brown commit 74f3931a1bfea5822e8953a15c8ebc587dc6b4bc Author: Kent Overstreet Date: Mon Jul 7 13:54:31 2025 -0400 bcachefs: Fix additional misalignment in journal space calculations Additional fix on top of f54b2a80d0df bcachefs: Fix misaligned bucket check in journal space calculations Make sure that when we calculate space for the next entry it's not misaligned: we need to round_down() to filesystem block size in multiple places (next entry size calculation as well as total space available). Reported-by: Ondřej Kraus Signed-off-by: Kent Overstreet commit 7de3c8b4077e052a6f7880a9ae0f42342c49631b Author: Kent Overstreet Date: Sun Jul 6 19:25:27 2025 -0400 bcachefs: Don't schedule non persistent passes persistently if (!(in_recovery && (flags & RUN_RECOVERY_PASS_nopersistent))) should have been if (!in_recovery && !(flags & RUN_RECOVERY_PASS_nopersistent))) But the !in_recovery part was also wrong: the assumption is that if we're in recovery we'll just rewind and run the recovery pass immediately, but we're not able to do so if we've already gone RW and the pass must be run before we go RW. In that case, we need to schedule it in the superblock so it can be run on the next mount attempt. Scheduling it persistently is fine, because it'll be cleared in the superblock immediately when the pass completes successfully. Signed-off-by: Kent Overstreet commit 4cdf1bdd45ac78a088773722f009883af30ad318 Author: Pankaj Raghav Date: Fri Jul 4 11:21:34 2025 +0200 block: reject bs > ps block devices when THP is disabled If THP is disabled and when a block device with logical block size > page size is present, the following null ptr deref panic happens during boot: [ [13.2 mK AOSAN: null-ptr-deref in range [0x0000000000000000-0x0000000000K0 0 0[07] [ 13.017749] RIP: 0010:create_empty_buffers+0x3b/0x380 [ 13.025448] Call Trace: [ 13.025692] [ 13.025895] block_read_full_folio+0x610/0x780 [ 13.026379] ? __pfx_blkdev_get_block+0x10/0x10 [ 13.027008] ? __folio_batch_add_and_move+0x1fa/0x2b0 [ 13.027548] ? __pfx_blkdev_read_folio+0x10/0x10 [ 13.028080] filemap_read_folio+0x9b/0x200 [ 13.028526] ? __pfx_filemap_read_folio+0x10/0x10 [ 13.029030] ? __filemap_get_folio+0x43/0x620 [ 13.029497] do_read_cache_folio+0x155/0x3b0 [ 13.029962] ? __pfx_blkdev_read_folio+0x10/0x10 [ 13.030381] read_part_sector+0xb7/0x2a0 [ 13.030805] read_lba+0x174/0x2c0 [ 13.045348] nvme_scan_ns+0x684/0x850 [nvme_core] [ 13.045858] ? __pfx_nvme_scan_ns+0x10/0x10 [nvme_core] [ 13.046414] ? _raw_spin_unlock+0x15/0x40 [ 13.046843] ? __switch_to+0x523/0x10a0 [ 13.047253] ? kvm_clock_get_cycles+0x14/0x30 [ 13.047742] ? __pfx_nvme_scan_ns_async+0x10/0x10 [nvme_core] [ 13.048353] async_run_entry_fn+0x96/0x4f0 [ 13.048787] process_one_work+0x667/0x10a0 [ 13.049219] worker_thread+0x63c/0xf60 As large folio support depends on THP, only allow bs > ps block devices if THP is enabled. Fixes: 47dd67532303 ("block/bdev: lift block size restrictions to 64k") Signed-off-by: Pankaj Raghav Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20250704092134.289491-1-p.raghav@samsung.com Signed-off-by: Jens Axboe commit aa9552438ebf015fc5f9f890dbfe39f0c53cf37e Author: Zheng Qixing Date: Thu Jun 12 21:24:05 2025 +0800 nbd: fix uaf in nbd_genl_connect() error path There is a use-after-free issue in nbd: block nbd6: Receive control failed (result -104) block nbd6: shutting down sockets ================================================================== BUG: KASAN: slab-use-after-free in recv_work+0x694/0xa80 drivers/block/nbd.c:1022 Write of size 4 at addr ffff8880295de478 by task kworker/u33:0/67 CPU: 2 UID: 0 PID: 67 Comm: kworker/u33:0 Not tainted 6.15.0-rc5-syzkaller-00123-g2c89c1b655c0 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: nbd6-recv recv_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_dec include/linux/atomic/atomic-instrumented.h:592 [inline] recv_work+0x694/0xa80 drivers/block/nbd.c:1022 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 nbd_genl_connect() does not properly stop the device on certain error paths after nbd_start_device() has been called. This causes the error path to put nbd->config while recv_work continue to use the config after putting it, leading to use-after-free in recv_work. This patch moves nbd_start_device() after the backend file creation. Reported-by: syzbot+48240bab47e705c53126@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/68227a04.050a0220.f2294.00b5.GAE@google.com/T/ Fixes: 6497ef8df568 ("nbd: provide a way for userspace processes to identify device backends") Signed-off-by: Zheng Qixing Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20250612132405.364904-1-zhengqixing@huaweicloud.com Signed-off-by: Jens Axboe commit eb8352ee2d1e70f916fac02094dca2b435076fa4 Author: Leon Yen Date: Wed Jun 25 15:37:20 2025 +0800 wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel Due to the lack of NoA(Notice of Absence) mechanism in SoftAP mode, it is inappropriate to allow concurrent SoftAP and STA to operate on the different channels. This patch restricts the concurrent SoftAP and STA to be setup on the same channel only. Signed-off-by: Leon Yen Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250625073720.1385210-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 03ee8f73801a8f46d83dfc2bf73fb9ffa5a21602 Author: Henry Martin Date: Wed Jun 25 20:49:01 2025 +0800 wifi: mt76: mt7925: Fix null-ptr-deref in mt7925_thermal_init() devm_kasprintf() returns NULL on error. Currently, mt7925_thermal_init() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: 396e41a74a88 ("wifi: mt76: mt7925: support temperature sensor") Signed-off-by: Henry Martin Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250625124901.1839832-1-bsdhenryma@tencent.com Signed-off-by: Felix Fietkau commit dedf2ec30fe417d181490896adf89cd6b9885b23 Author: Felix Fietkau Date: Mon Jul 7 17:47:02 2025 +0200 wifi: mt76: fix queue assignment for deauth packets When running in AP mode and deauthenticating a client that's in powersave mode, the disassoc/deauth packet can get stuck in a tx queue along with other buffered frames. This can fill up hardware queues with frames that are only released after the WTBL slot is reused for another client. Fix this by moving deauth packets to the ALTX queue. Reported-by: Chad Monroe Link: https://patch.msgid.link/20250707154702.1726-2-nbd@nbd.name Signed-off-by: Felix Fietkau commit dc66a129adf1f25e944d0b93cd2df2ee0f0bd4d6 Author: Felix Fietkau Date: Mon Jul 7 17:47:01 2025 +0200 wifi: mt76: add a wrapper for wcid access with validation Several places use rcu_dereference to get a wcid entry without validating if the index exceeds the array boundary. Fix this by using a helper function, which handles validation. Link: https://patch.msgid.link/20250707154702.1726-1-nbd@nbd.name Signed-off-by: Felix Fietkau commit 7035a082348acf1d43ffb9ff735899f8e3863f8f Author: Deren Wu Date: Sun May 25 14:11:22 2025 +0800 wifi: mt76: mt7921: prevent decap offload config before STA initialization The decap offload configuration should only be applied after the STA has been successfully initialized. Attempting to configure it earlier can lead to corruption of the MAC configuration in the chip's hardware state. Add an early check for `msta->deflink.wcid.sta` to ensure the station peer is properly initialized before proceeding with decapsulation offload configuration. Cc: stable@vger.kernel.org Fixes: 24299fc869f7 ("mt76: mt7921: enable rx header traslation offload") Signed-off-by: Deren Wu Link: https://patch.msgid.link/f23a72ba7a3c1ad38ba9e13bb54ef21d6ef44ffb.1748149855.git.deren.wu@mediatek.com Signed-off-by: Felix Fietkau commit 35ad47c0b3da04b00b19a8b9ed5632e2f2520472 Author: Deren Wu Date: Sun May 25 14:11:21 2025 +0800 wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_sta_set_decap_offload() Add a NULL check for msta->vif before accessing its members to prevent a kernel panic in AP mode deployment. This also fix the issue reported in [1]. The crash occurs when this function is triggered before the station is fully initialized. The call trace shows a page fault at mt7925_sta_set_decap_offload() due to accessing resources when msta->vif is NULL. Fix this by adding an early return if msta->vif is NULL and also check wcid.sta is ready. This ensures we only proceed with decap offload configuration when the station's state is properly initialized. [14739.655703] Unable to handle kernel paging request at virtual address ffffffffffffffa0 [14739.811820] CPU: 0 UID: 0 PID: 895854 Comm: hostapd Tainted: G [14739.821394] Tainted: [C]=CRAP, [O]=OOT_MODULE [14739.825746] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT) [14739.831577] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [14739.838538] pc : mt7925_sta_set_decap_offload+0xc0/0x1b8 [mt7925_common] [14739.845271] lr : mt7925_sta_set_decap_offload+0x58/0x1b8 [mt7925_common] [14739.851985] sp : ffffffc085efb500 [14739.855295] x29: ffffffc085efb500 x28: 0000000000000000 x27: ffffff807803a158 [14739.862436] x26: ffffff8041ececb8 x25: 0000000000000001 x24: 0000000000000001 [14739.869577] x23: 0000000000000001 x22: 0000000000000008 x21: ffffff8041ecea88 [14739.876715] x20: ffffff8041c19ca0 x19: ffffff8078031fe0 x18: 0000000000000000 [14739.883853] x17: 0000000000000000 x16: ffffffe2aeac1110 x15: 000000559da48080 [14739.890991] x14: 0000000000000001 x13: 0000000000000000 x12: 0000000000000000 [14739.898130] x11: 0a10020001008e88 x10: 0000000000001a50 x9 : ffffffe26457bfa0 [14739.905269] x8 : ffffff8042013bb0 x7 : ffffff807fb6cbf8 x6 : dead000000000100 [14739.912407] x5 : dead000000000122 x4 : ffffff80780326c8 x3 : 0000000000000000 [14739.919546] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff8041ececb8 [14739.926686] Call trace: [14739.929130] mt7925_sta_set_decap_offload+0xc0/0x1b8 [mt7925_common] [14739.935505] ieee80211_check_fast_rx+0x19c/0x510 [mac80211] [14739.941344] _sta_info_move_state+0xe4/0x510 [mac80211] [14739.946860] sta_info_move_state+0x1c/0x30 [mac80211] [14739.952116] sta_apply_auth_flags.constprop.0+0x90/0x1b0 [mac80211] [14739.958708] sta_apply_parameters+0x234/0x5e0 [mac80211] [14739.964332] ieee80211_add_station+0xdc/0x190 [mac80211] [14739.969950] nl80211_new_station+0x46c/0x670 [cfg80211] [14739.975516] genl_family_rcv_msg_doit+0xdc/0x150 [14739.980158] genl_rcv_msg+0x218/0x298 [14739.983830] netlink_rcv_skb+0x64/0x138 [14739.987670] genl_rcv+0x40/0x60 [14739.990816] netlink_unicast+0x314/0x380 [14739.994742] netlink_sendmsg+0x198/0x3f0 [14739.998664] __sock_sendmsg+0x64/0xc0 [14740.002324] ____sys_sendmsg+0x260/0x298 [14740.006242] ___sys_sendmsg+0xb4/0x110 Cc: stable@vger.kernel.org Link: https://github.com/morrownr/USB-WiFi/issues/603 [1] Fixes: b859ad65309a ("wifi: mt76: mt7925: add link handling in mt7925_sta_set_decap_offload") Signed-off-by: Deren Wu Link: https://patch.msgid.link/35aedbffa050e98939264300407a52ba4e236d52.1748149855.git.deren.wu@mediatek.com Signed-off-by: Felix Fietkau commit 9f8f4a51f3c133030ac5a4bcd4759ae2b947b7bd Author: Ming Yen Hsieh Date: Mon Jun 16 14:36:49 2025 +0800 wifi: mt76: mt7925: fix incorrect scan probe IE handling for hw_scan The IEs should be processed and filled into the command tlv separately according to each band. Cc: stable@vger.kernel.org Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250616063649.1100503-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit c701574c54121af2720648572efbfe77564652d1 Author: Michael Lo Date: Thu Jun 12 14:20:46 2025 +0800 wifi: mt76: mt7925: fix invalid array index in ssid assignment during hw scan Update the destination index to use 'n_ssids', which is incremented only when a valid SSID is present. Previously, both mt76_connac_mcu_hw_scan() and mt7925_mcu_hw_scan() used the loop index 'i' for the destination array, potentially leaving gaps if any source SSIDs had zero length. Cc: stable@vger.kernel.org Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250612062046.160598-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit d20de55332e92f9e614c34783c00bb6ce2fec067 Author: Ming Yen Hsieh Date: Thu Jun 12 14:09:31 2025 +0800 wifi: mt76: mt7925: fix the wrong config for tx interrupt MT_INT_TX_DONE_MCU_WM may cause tx interrupt to be mishandled during a reset failure, leading to the reset process failing. By using MT_INT_TX_DONE_MCU instead of MT_INT_TX_DONE_MCU_WM, the handling of tx interrupt is improved. Cc: stable@vger.kernel.org Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250612060931.135635-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 71532576f41e5b0ec967a82ed49d5dfb1027ccdb Author: Lorenzo Bianconi Date: Thu Jun 5 13:14:20 2025 +0200 wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work() Since mt7996_mcu_add_rate_ctrl() and mt7996_mcu_set_fixed_field() can't run in atomic context, move RCU critical section in mt7996_mcu_add_rate_ctrl() and mt7996_mcu_set_fixed_field(). This patch fixes a 'sleep while atomic' issue in mt7996_mac_sta_rc_work(). Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Lorenzo Bianconi Tested-by: Ben Greear Link: https://patch.msgid.link/20250605-mt7996-sleep-while-atomic-v1-5-d46d15f9203c@kernel.org Signed-off-by: Felix Fietkau commit 3dd6f67c669c860b93ff533f790f23ee1cb36f25 Author: Lorenzo Bianconi Date: Thu Jun 5 13:14:19 2025 +0200 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl() Since mt76_mcu_skb_send_msg() routine can't be executed in atomic context, move RCU section in mt7996_mcu_add_rate_ctrl() and execute mt76_mcu_skb_send_msg() in non-atomic context. This is a preliminary patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work(). Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250605-mt7996-sleep-while-atomic-v1-4-d46d15f9203c@kernel.org Signed-off-by: Felix Fietkau commit 28d519d0d493a8cf3f8ca01f10d962c56cec1825 Author: Lorenzo Bianconi Date: Thu Jun 5 13:14:18 2025 +0200 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed() Since mt7996_mcu_set_fixed_field() can't be executed in a RCU critical section, move RCU section in mt7996_mcu_add_rate_ctrl_fixed() and run mt7996_mcu_set_fixed_field() in non-atomic context. This is a preliminary patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work(). Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250605-mt7996-sleep-while-atomic-v1-3-d46d15f9203c@kernel.org Signed-off-by: Felix Fietkau commit c772cd726eea6fe8fb81d2aeeacb18cecff73a7b Author: Lorenzo Bianconi Date: Thu Jun 5 13:14:17 2025 +0200 wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field() Since mt76_mcu_skb_send_msg() routine can't be executed in atomic context, move RCU section in mt7996_mcu_set_fixed_field() and execute mt76_mcu_skb_send_msg() in non-atomic context. This is a preliminary patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work(). Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250605-mt7996-sleep-while-atomic-v1-2-d46d15f9203c@kernel.org Signed-off-by: Felix Fietkau commit a0c5eac9181025b6d65ff25c203a7f10274f80c1 Author: Lorenzo Bianconi Date: Thu Jun 5 13:14:16 2025 +0200 wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context Rely on GFP_ATOMIC flag in __mt76_connac_mcu_alloc_sta_req since it can run in atomic context. This is a preliminary patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work(). Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250605-mt7996-sleep-while-atomic-v1-1-d46d15f9203c@kernel.org Signed-off-by: Felix Fietkau commit d133036a0b23d3ef781d067ccdea6bbfb381e0cf Author: Ben Skeggs Date: Tue Jun 17 14:00:36 2025 +1000 drm/nouveau/gsp: fix potential leak of memory used during acpi init If any of the ACPI calls fail, memory allocated for the input buffer would be leaked. Fix failure paths to free allocated memory. Also add checks to ensure the allocations succeeded in the first place. Reported-by: Danilo Krummrich Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Ben Skeggs Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250617040036.2932-1-bskeggs@nvidia.com commit 203817de269539c062724d97dfa5af3cdf77a3ec Author: Pavel Begunkov Date: Mon Jul 7 09:52:33 2025 +0100 io_uring/zcrx: fix pp destruction warnings With multiple page pools and in some other cases we can have allocated niovs on page pool destruction. Remove a misplaced warning checking that all niovs are returned to zcrx on io_pp_zc_destroy(). It was reported before but apparently got lost. Reported-by: Pedro Tammela Fixes: 34a3e60821ab9 ("io_uring/zcrx: implement zerocopy receive pp memory provider") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b9e6d919d2964bc48ddbf8eb52fc9f5d118e9bc1.1751878185.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0e2cebd72321caeef84b6ba7084e85be0287fb4b Author: Shravan Kumar Ramani Date: Wed Jul 2 06:09:02 2025 -0400 platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input For setting the enable value, the input should be 0 or 1 only. Use kstrtobool() in place of kstrtoint() in mlxbf_pmc_enable_store() to accept only valid input. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/2ee618c59976bcf1379d5ddce2fc60ab5014b3a9.1751380187.git.shravankr@nvidia.com [ij: split kstrbool() change to own commit.] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f8c1311769d3b2c82688b294b4ae03e94f1c326d Author: Shravan Kumar Ramani Date: Wed Jul 2 06:09:02 2025 -0400 platform/mellanox: mlxbf-pmc: Validate event/enable input Before programming the event info, validate the event number received as input by checking if it exists in the event_list. Also fix a typo in the comment for mlxbf_pmc_get_event_name() to correctly mention that it returns the event name when taking the event number as input, and not the other way round. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/2ee618c59976bcf1379d5ddce2fc60ab5014b3a9.1751380187.git.shravankr@nvidia.com [ij: split kstrbool() change to own commit.] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 44e6ca8faeeed12206f3e7189c5ac618b810bb9c Author: Shravan Kumar Ramani Date: Wed Jul 2 06:09:01 2025 -0400 platform/mellanox: mlxbf-pmc: Remove newline char from event name input Since the input string passed via the command line appends a newline char, it needs to be removed before comparison with the event_list. Fixes: 1a218d312e65 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver") Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/4978c18e33313b48fa2ae7f3aa6dbcfce40877e4.1751380187.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d4e83784b2a9be58b938d55efb232d2751c4cab4 Author: Armin Wolf Date: Fri Jun 27 22:51:24 2025 +0200 platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice Calling power_supply_get_property() inside dell_wmi_ddv_battery_translate() can cause a deadlock since this function is also being called from the power supply extension code, in which case psy->extensions_sem is already being held. Fix this by using the new power_supply_get_property_direct() function to ignore any power supply extensions when retrieving the battery serial number. Tested on a Dell Inspiron 3505. Reported-by: Hans de Goede Fixes: 058de163a376 ("platform/x86: dell-ddv: Implement the battery matching algorithm") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250627205124.250433-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a5f354232118751fe43be6ac896f8d6e7d7418b5 Author: Armin Wolf Date: Fri Jun 27 22:51:23 2025 +0200 power: supply: test-power: Test access to extended power supply Test that power supply extensions can access properties of their power supply using power_supply_get_property_direct(). This both ensures that the functionality works and serves as an example for future driver developers. Signed-off-by: Armin Wolf Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250627205124.250433-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 3ebed2fddf6fac5729ffc8c471c87d111b641678 Author: Armin Wolf Date: Fri Jun 27 22:51:22 2025 +0200 power: supply: core: Add power_supply_get/set_property_direct() Power supply extensions might want to interact with the underlying power supply to retrieve data like serial numbers, charging status and more. However doing so causes psy->extensions_sem to be locked twice, possibly causing a deadlock. Provide special variants of power_supply_get/set_property() that ignore any power supply extensions and thus do not touch the associated psy->extensions_sem lock. Suggested-by: Hans de Goede Signed-off-by: Armin Wolf Acked-by: Sebastian Reichel Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250627205124.250433-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 8346c6af27f1c1410eb314f4be5875fdf1579a10 Author: Kurt Borja Date: Mon Jul 7 03:24:05 2025 -0300 platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array Add missing empty member to `awcc_dmi_table`. Cc: stable@vger.kernel.org Fixes: 6d7f1b1a5db6 ("platform/x86: alienware-wmi: Split DMI table") Signed-off-by: Kurt Borja Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250707-dmi-fix-v1-1-6730835d824d@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d78f76457d70d30e80b5d2e067d45de7a0505fc0 Author: Edson Juliano Drosdeck Date: Mon Jul 7 08:45:37 2025 -0300 ALSA: hda/realtek: Enable headset Mic on Positivo K116J Positivo K116J is equipped with ALC269VC, and needs a fix to make the headset mic to work. Also must to limits the internal microphone boost. Signed-off-by: Edson Juliano Drosdeck Link: https://patch.msgid.link/20250707114537.8291-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai commit 98f99394a104cc80296da34a62d4e1ad04127013 Author: Christian Brauner Date: Mon Jul 7 13:21:11 2025 +0200 secretmem: use SB_I_NOEXEC Anonymous inodes may never ever be exectuable and the only way to enforce this is to raise SB_I_NOEXEC on the superblock which can never be unset. I've made the exec code yell at anyone who does not abide by this rule. For good measure also kill any pretense that device nodes are supported on the secretmem filesystem. > WARNING: fs/exec.c:119 at path_noexec+0x1af/0x200 fs/exec.c:118, CPU#1: syz-executor260/5835 > Modules linked in: > CPU: 1 UID: 0 PID: 5835 Comm: syz-executor260 Not tainted 6.16.0-rc4-next-20250703-syzkaller #0 PREEMPT(full) > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 > RIP: 0010:path_noexec+0x1af/0x200 fs/exec.c:118 > Code: 02 31 ff 48 89 de e8 f0 b1 89 ff d1 eb eb 07 e8 07 ad 89 ff b3 01 89 d8 5b 41 5e 41 5f 5d c3 cc cc cc cc cc e8 f2 ac 89 ff 90 <0f> 0b 90 e9 48 ff ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c a6 > RSP: 0018:ffffc90003eefbd8 EFLAGS: 00010293 > RAX: ffffffff8235f22e RBX: ffff888072be0940 RCX: ffff88807763bc00 > RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 > RBP: 0000000000080000 R08: ffff88807763bc00 R09: 0000000000000003 > R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000011 > R13: 1ffff920007ddf90 R14: 0000000000000000 R15: dffffc0000000000 > FS: 000055556832d380(0000) GS:ffff888125d1e000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00007f21e34810d0 CR3: 00000000718a8000 CR4: 00000000003526f0 > Call Trace: > > do_mmap+0xa43/0x10d0 mm/mmap.c:472 > vm_mmap_pgoff+0x31b/0x4c0 mm/util.c:579 > ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:607 > do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] > do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 > entry_SYSCALL_64_after_hwframe+0x77/0x7f > RIP: 0033:0x7f21e340a9f9 > Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007ffd23ca3468 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 > RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f21e340a9f9 > RDX: 0000000000000000 RSI: 0000000000004000 RDI: 0000200000ff9000 > RBP: 00007f21e347d5f0 R08: 0000000000000003 R09: 0000000000000000 > R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000001 > R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001 Link: https://lore.kernel.org/686ba948.a00a0220.c7b3.0080.GAE@google.com Signed-off-by: Christian Brauner commit 830a9e37cfb203aa0f73cd947eda89eda89cc48c Author: Laura Brehm Date: Thu Jul 3 14:02:44 2025 +0200 coredump: fix PIDFD_INFO_COREDUMP ioctl check In Commit 1d8db6fd698de1f73b1a7d72aea578fdd18d9a87 ("pidfs, coredump: add PIDFD_INFO_COREDUMP"), the following code was added: if (mask & PIDFD_INFO_COREDUMP) { kinfo.mask |= PIDFD_INFO_COREDUMP; kinfo.coredump_mask = READ_ONCE(pidfs_i(inode)->__pei.coredump_mask); } [...] if (!(kinfo.mask & PIDFD_INFO_COREDUMP)) { task_lock(task); if (task->mm) kinfo.coredump_mask = pidfs_coredump_mask(task->mm->flags); task_unlock(task); } The second bit in particular looks off to me - the condition in essence checks whether PIDFD_INFO_COREDUMP was **not** requested, and if so fetches the coredump_mask in kinfo, since it's checking !(kinfo.mask & PIDFD_INFO_COREDUMP), which is unconditionally set in the earlier hunk. I'm tempted to assume the idea in the second hunk was to calculate the coredump mask if one was requested but fetched in the first hunk, in which case the check should be if ((kinfo.mask & PIDFD_INFO_COREDUMP) && !(kinfo.coredump_mask)) which might be more legibly written as if ((mask & PIDFD_INFO_COREDUMP) && !(kinfo.coredump_mask)) This could also instead be achieved by changing the first hunk to be: if (mask & PIDFD_INFO_COREDUMP) { kinfo.coredump_mask = READ_ONCE(pidfs_i(inode)->__pei.coredump_mask); if (kinfo.coredump_mask) kinfo.mask |= PIDFD_INFO_COREDUMP; } and the second hunk to: if ((mask & PIDFD_INFO_COREDUMP) && !(kinfo.mask & PIDFD_INFO_COREDUMP)) { task_lock(task); if (task->mm) { kinfo.coredump_mask = pidfs_coredump_mask(task->mm->flags); kinfo.mask |= PIDFD_INFO_COREDUMP; } task_unlock(task); } However, when looking at this, the supposition that the second hunk means to cover cases where the coredump info was requested but the first hunk failed to get it starts getting doubtful, so apologies if I'm completely off-base. This patch addresses the issue by fixing the check in the second hunk. Signed-off-by: Laura Brehm Link: https://lore.kernel.org/20250703120244.96908-3-laurabrehm@hey.com Cc: brauner@kernel.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 85e323bdbe28d4638aaefd8d9192763874efe9b0 Author: Baojun Xu Date: Mon Jul 7 17:05:13 2025 +0800 ALSA: hda/tas2781: Fix calibration data parser issue We will copy calibration data from position behind to front. We have created a variable (tmp_val) point on top of calibration data buffer, and tmp_val[1] is max of node number in original calibration data structure, it will be overwritten after first data copy, so can't be used as max node number check in for loop. So we create a new variable to save max of node number (tmp_val[1]), used to check if max node number was reached in for loop. And a point need to be increased to point at calibration data in node. Data saved position also need to be increased one byte. Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib") Signed-off-by: Baojun Xu Link: https://patch.msgid.link/20250707090513.1462-1-baojun.xu@ti.com Signed-off-by: Takashi Iwai commit 67a59f82196c8c4f50c83329f0577acfb1349b50 Author: Drew Hamilton Date: Tue Jul 1 11:41:26 2025 -0400 usb: musb: fix gadget state on disconnect When unplugging the USB cable or disconnecting a gadget in usb peripheral mode with echo "" > /sys/kernel/config/usb_gadget//UDC, /sys/class/udc/musb-hdrc.0/state does not change from USB_STATE_CONFIGURED. Testing on dwc2/3 shows they both update the state to USB_STATE_NOTATTACHED. Add calls to usb_gadget_set_state in musb_g_disconnect and musb_gadget_stop to fix both cases. Fixes: 49401f4169c0 ("usb: gadget: introduce gadget state tracking") Cc: stable@vger.kernel.org Co-authored-by: Yehowshua Immanuel Signed-off-by: Yehowshua Immanuel Signed-off-by: Drew Hamilton Link: https://lore.kernel.org/r/20250701154126.8543-1-drew.hamilton@zetier.com Signed-off-by: Greg Kroah-Hartman commit 737bb912ebbe4571195c56eba557c4d7315b26fb Author: Mathy Vanhoef Date: Mon Jun 16 02:46:35 2025 +0200 wifi: prevent A-MSDU attacks in mesh networks This patch is a mitigation to prevent the A-MSDU spoofing vulnerability for mesh networks. The initial update to the IEEE 802.11 standard, in response to the FragAttacks, missed this case (CVE-2025-27558). It can be considered a variant of CVE-2020-24588 but for mesh networks. This patch tries to detect if a standard MSDU was turned into an A-MSDU by an adversary. This is done by parsing a received A-MSDU as a standard MSDU, calculating the length of the Mesh Control header, and seeing if the 6 bytes after this header equal the start of an rfc1042 header. If equal, this is a strong indication of an ongoing attack attempt. This defense was tested with mac80211_hwsim against a mesh network that uses an empty Mesh Address Extension field, i.e., when four addresses are used, and when using a 12-byte Mesh Address Extension field, i.e., when six addresses are used. Functionality of normal MSDUs and A-MSDUs was also tested, and confirmed working, when using both an empty and 12-byte Mesh Address Extension field. It was also tested with mac80211_hwsim that A-MSDU attacks in non-mesh networks keep being detected and prevented. Note that the vulnerability being patched, and the defense being implemented, was also discussed in the following paper and in the following IEEE 802.11 presentation: https://papers.mathyvanhoef.com/wisec2025.pdf https://mentor.ieee.org/802.11/dcn/25/11-25-0949-00-000m-a-msdu-mesh-spoof-protection.docx Cc: stable@vger.kernel.org Signed-off-by: Mathy Vanhoef Link: https://patch.msgid.link/20250616004635.224344-1-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 9fccced2d25bcfe0fb210b1a0f17bb58ad69f7ad Merge: 3c2bd251d2039c 2cdde91c14ec35 Author: Greg Kroah-Hartman Date: Mon Jul 7 10:49:54 2025 +0200 Merge tag 'thunderbolt-for-v6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v6.16-rc4 This includes following USB4/Thunderbolt fixes for v6.16-rc4: - Fix wake on connect during runtime suspend - Fix bit masking in tb_dp_port_set_hops(). Both have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix bit masking in tb_dp_port_set_hops() thunderbolt: Fix wake on connect at runtime commit 2ce6ad9262256dd345cb104ba0ac6cf4aeed25a3 Author: Felix Fietkau Date: Sun Jul 6 11:20:53 2025 +0200 wifi: rt2x00: fix remove callback type mismatch The function is used as remove callback for a platform driver. It was missed during the conversion from int to void Fixes: 0edb555a65d1 ("platform: Make platform_driver::remove() return void") Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/20250706092053.97724-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 58fcb1b4287ce38850402bb2bb16d09bf77b91d9 Author: Moon Hee Lee Date: Thu Jul 3 12:37:57 2025 -0700 wifi: mac80211: reject VHT opmode for unsupported channel widths VHT operating mode notifications are not defined for channel widths below 20 MHz. In particular, 5 MHz and 10 MHz are not valid under the VHT specification and must be rejected. Without this check, malformed notifications using these widths may reach ieee80211_chan_width_to_rx_bw(), leading to a WARN_ON due to invalid input. This issue was reported by syzbot. Reject these unsupported widths early in sta_link_apply_parameters() when opmode_notif is used. The accepted set includes 20, 40, 80, 160, and 80+80 MHz, which are valid for VHT. While 320 MHz is not defined for VHT, it is allowed to avoid rejecting HE or EHT clients that may still send a VHT opmode notification. Reported-by: syzbot+ededba317ddeca8b3f08@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ededba317ddeca8b3f08 Fixes: 751e7489c1d7 ("wifi: mac80211: expose ieee80211_chan_width_to_rx_bw() to drivers") Tested-by: syzbot+ededba317ddeca8b3f08@syzkaller.appspotmail.com Signed-off-by: Moon Hee Lee Link: https://patch.msgid.link/20250703193756.46622-2-moonhee.lee.ca@gmail.com Signed-off-by: Johannes Berg commit 3b602ddc0df723992721b0d286c90c9bdd755b34 Author: Vitor Soares Date: Tue Jul 1 15:26:43 2025 +0100 wifi: mwifiex: discard erroneous disassoc frames on STA interface When operating in concurrent STA/AP mode with host MLME enabled, the firmware incorrectly sends disassociation frames to the STA interface when clients disconnect from the AP interface. This causes kernel warnings as the STA interface processes disconnect events that don't apply to it: [ 1303.240540] WARNING: CPU: 0 PID: 513 at net/wireless/mlme.c:141 cfg80211_process_disassoc+0x78/0xec [cfg80211] [ 1303.250861] Modules linked in: 8021q garp stp mrp llc rfcomm bnep btnxpuart nls_iso8859_1 nls_cp437 onboard_us [ 1303.327651] CPU: 0 UID: 0 PID: 513 Comm: kworker/u9:2 Not tainted 6.16.0-rc1+ #3 PREEMPT [ 1303.335937] Hardware name: Toradex Verdin AM62 WB on Verdin Development Board (DT) [ 1303.343588] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue [mwifiex] [ 1303.350856] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1303.357904] pc : cfg80211_process_disassoc+0x78/0xec [cfg80211] [ 1303.364065] lr : cfg80211_process_disassoc+0x70/0xec [cfg80211] [ 1303.370221] sp : ffff800083053be0 [ 1303.373590] x29: ffff800083053be0 x28: 0000000000000000 x27: 0000000000000000 [ 1303.380855] x26: 0000000000000000 x25: 00000000ffffffff x24: ffff000002c5b8ae [ 1303.388120] x23: ffff000002c5b884 x22: 0000000000000001 x21: 0000000000000008 [ 1303.395382] x20: ffff000002c5b8ae x19: ffff0000064dd408 x18: 0000000000000006 [ 1303.402646] x17: 3a36333a61623a30 x16: 32206d6f72662063 x15: ffff800080bfe048 [ 1303.409910] x14: ffff000003625300 x13: 0000000000000001 x12: 0000000000000000 [ 1303.417173] x11: 0000000000000002 x10: ffff000003958600 x9 : ffff000003625300 [ 1303.424434] x8 : ffff00003fd9ef40 x7 : ffff0000039fc280 x6 : 0000000000000002 [ 1303.431695] x5 : ffff0000038976d4 x4 : 0000000000000000 x3 : 0000000000003186 [ 1303.438956] x2 : 000000004836ba20 x1 : 0000000000006986 x0 : 00000000d00479de [ 1303.446221] Call trace: [ 1303.448722] cfg80211_process_disassoc+0x78/0xec [cfg80211] (P) [ 1303.454894] cfg80211_rx_mlme_mgmt+0x64/0xf8 [cfg80211] [ 1303.460362] mwifiex_process_mgmt_packet+0x1ec/0x460 [mwifiex] [ 1303.466380] mwifiex_process_sta_rx_packet+0x1bc/0x2a0 [mwifiex] [ 1303.472573] mwifiex_handle_rx_packet+0xb4/0x13c [mwifiex] [ 1303.478243] mwifiex_rx_work_queue+0x158/0x198 [mwifiex] [ 1303.483734] process_one_work+0x14c/0x28c [ 1303.487845] worker_thread+0x2cc/0x3d4 [ 1303.491680] kthread+0x12c/0x208 [ 1303.495014] ret_from_fork+0x10/0x20 Add validation in the STA receive path to verify that disassoc/deauth frames originate from the connected AP. Frames that fail this check are discarded early, preventing them from reaching the MLME layer and triggering WARN_ON(). This filtering logic is similar with that used in the ieee80211_rx_mgmt_disassoc() function in mac80211, which drops disassoc frames that don't match the current BSSID (!ether_addr_equal(mgmt->bssid, sdata->vif.cfg.ap_addr)), ensuring only relevant frames are processed. Tested on: - 8997 with FW 16.68.1.p197 Fixes: 36995892c271 ("wifi: mwifiex: add host mlme for client mode") Cc: stable@vger.kernel.org Signed-off-by: Vitor Soares Reviewed-by: Jeff Chen Reviewed-by: Francesco Dolcini Link: https://patch.msgid.link/20250701142643.658990-1-ivitro@gmail.com Signed-off-by: Johannes Berg commit e1e6ebf490e55fee1ae573aa443c1d4aea5e4a40 Author: Johannes Berg Date: Mon Jun 30 15:45:01 2025 +0200 wifi: mac80211: fix non-transmitted BSSID profile search When the non-transmitted BSSID profile is found, immediately return from the search to not return the wrong profile_len when the profile is found in a multiple BSSID element that isn't the last one in the frame. Fixes: 5023b14cf4df ("mac80211: support profile split between elements") Reported-by: Michael-CY Lee Link: https://patch.msgid.link/20250630154501.f26cd45a0ecd.I28e0525d06e8a99e555707301bca29265cf20dc8@changeid Signed-off-by: Johannes Berg commit 8af596e8ae44c3bcf36d1aea09fc9a6f17c555e5 Author: Johannes Berg Date: Tue Jul 1 09:22:13 2025 +0200 wifi: mac80211: clear frame buffer to never leak stack In disconnect paths paths, local frame buffers are used to build deauthentication frames to send them over the air and as notifications to userspace. Some internal error paths (that, given no other bugs, cannot happen) don't always initialize the buffers before sending them to userspace, so in the presence of other bugs they can leak stack content. Initialize the buffers to avoid the possibility of this happening. Suggested-by: Zhongqiu Han Link: https://patch.msgid.link/20250701072213.13004-2-johannes@sipsolutions.net Signed-off-by: Johannes Berg commit c5fd399a24c8e2865524361f7dc4d4a6899be4f4 Author: Lachlan Hodges Date: Tue Jul 1 17:55:41 2025 +1000 wifi: mac80211: correctly identify S1G short beacon mac80211 identifies a short beacon by the presence of the next TBTT field, however the standard actually doesn't explicitly state that the next TBTT can't be in a long beacon or even that it is required in a short beacon - and as a result this validation does not work for all vendor implementations. The standard explicitly states that an S1G long beacon shall contain the S1G beacon compatibility element as the first element in a beacon transmitted at a TBTT that is not a TSBTT (Target Short Beacon Transmission Time) as per IEEE80211-2024 11.1.3.10.1. This is validated by 9.3.4.3 Table 9-76 which states that the S1G beacon compatibility element is only allowed in the full set and is not allowed in the minimum set of elements permitted for use within short beacons. Correctly identify short beacons by the lack of an S1G beacon compatibility element as the first element in an S1G beacon frame. Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results") Signed-off-by: Simon Wadsworth Signed-off-by: Lachlan Hodges Link: https://patch.msgid.link/20250701075541.162619-1-lachlan.hodges@morsemicro.com Signed-off-by: Johannes Berg commit fbe94be09fa81343d623a86ec64a742759b669b3 Author: Francesco Dolcini Date: Mon Jun 23 15:25:45 2025 +0200 arm64: dts: freescale: imx8mm-verdin: Keep LDO5 always on LDO5 regulator is used to power the i.MX8MM NVCC_SD2 I/O supply, that is used for the SD2 card interface and also for some GPIOs. When the SD card interface is not enabled the regulator subsystem could turn off this supply, since it is not used anywhere else, however this will also remove the power to some other GPIOs, for example one I/O that is used to power the ethernet phy, leading to a non working ethernet interface. [ 31.820515] On-module +V3.3_1.8_SD (LDO5): disabling [ 31.821761] PMIC_USDHC_VSELECT: disabling [ 32.764949] fec 30be0000.ethernet end0: Link is Down Fix this keeping the LDO5 supply always on. Cc: stable@vger.kernel.org Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Fixes: f5aab0438ef1 ("regulator: pca9450: Fix enable register for LDO5") Signed-off-by: Francesco Dolcini Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 505b730ede7f5c4083ff212aa955155b5b92e574 Author: Uwe Kleine-König Date: Fri Jul 4 19:27:27 2025 +0200 pwm: mediatek: Ensure to disable clocks in error path After enabling the clocks each error path must disable the clocks again. One of them failed to do so. Unify the error paths to use goto to make it harder for future changes to add a similar bug. Fixes: 7ca59947b5fc ("pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250704172728.626815-2-u.kleine-koenig@baylibre.com Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König commit 9ee124caae1b0defd0e02c65686f539845a3ac9b Author: Uwe Kleine-König Date: Fri Jul 4 19:24:17 2025 +0200 pwm: Fix invalid state detection Commit 9dd42d019e63 ("pwm: Allow pwm state transitions from an invalid state") intended to allow some state transitions that were not allowed before. The idea is sane and back then I also got the code comment right, but the check for enabled is bogus. This resulted in state transitions for enabled states to be allowed to have invalid duty/period settings and thus it can happen that low-level drivers get requests for invalid states🙄. Invert the check to allow state transitions for disabled states only. Fixes: 9dd42d019e63 ("pwm: Allow pwm state transitions from an invalid state") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250704172416.626433-2-u.kleine-koenig@baylibre.com Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König commit d7b8f8e20813f0179d8ef519541a3527e7661d3a Author: Linus Torvalds Date: Sun Jul 6 14:10:26 2025 -0700 Linux 6.16-rc5 commit bab5cac627b36a96ffc344274953558906418495 Merge: 772b78c2abd855 b969f9614885c2 Author: Linus Torvalds Date: Sun Jul 6 13:10:39 2025 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull /proc/sys dcache lookup fix from Al Viro: "Fix for the breakage spotted by Neil in the interplay between /proc/sys ->d_compare() weirdness and parallel lookups" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix proc_sys_compare() handling of in-lookup dentries commit 772b78c2abd85586bb90b23adff89f7303c704c7 Merge: 95eb0d389b4a51 fc975cfb36393d Author: Linus Torvalds Date: Sun Jul 6 11:17:47 2025 -0700 Merge tag 'sched_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Borislav Petkov: - Fix the calculation of the deadline server task's runtime as this mishap was preventing realtime tasks from running - Avoid a race condition during migrate-swapping two tasks - Fix the string reported for the "none" dynamic preemption option * tag 'sched_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Fix dl_server runtime calculation formula sched/core: Fix migrate_swap() vs. hotplug sched: Fix preemption string of preempt_dynamic_none commit 95eb0d389b4a518a2630b18fbc5916a008f519f1 Merge: a1639ce5e59030 ccdd09e0fc0d5c Author: Linus Torvalds Date: Sun Jul 6 10:55:59 2025 -0700 Merge tag 'objtool_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Borislav Petkov: - Fix the compilation of an x86 kernel on a big engian machine due to a missed endianness conversion * tag 'objtool_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Add missing endian conversion to read_annotate() commit a1639ce5e590300af45bebedfbacf8fabc1777ed Merge: 5fc2e891a5badb ba677dbe77af5f Author: Linus Torvalds Date: Sun Jul 6 10:49:27 2025 -0700 Merge tag 'perf_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Revert uprobes to using CAP_SYS_ADMIN again as currently they can destructively modify kernel code from an unprivileged process - Move a warning to where it belongs * tag 'perf_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Revert to requiring CAP_SYS_ADMIN for uprobes perf/core: Fix the WARN_ON_ONCE is out of lock protected region commit 5fc2e891a5badbcb585850995c609be78bd73006 Merge: 463b1b2af83866 52e1a03e6cf61a Author: Linus Torvalds Date: Sun Jul 6 10:44:20 2025 -0700 Merge tag 'x86_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Make sure AMD SEV guests using secure TSC, include a TSC_FACTOR which prevents their TSCs from going skewed from the hypervisor's * tag 'x86_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Use TSC_FACTOR for Secure TSC frequency calculation commit 463b1b2af83866e6369e7764fb65f1d57449fb5b Merge: c92bda4cb96970 46b0a67e8f22d2 Author: Linus Torvalds Date: Sun Jul 6 10:38:04 2025 -0700 Merge tag 'locking_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Borislav Petkov: - Disable FUTEX_PRIVATE_HASH for this cycle due to a performance regression - Add a selftests compilation product to the corresponding .gitignore file * tag 'locking_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/futex: Add futex_numa to .gitignore futex: Temporary disable FUTEX_PRIVATE_HASH commit c92bda4cb96970b78037d52cfae43844044744b1 Merge: bdde3141ceb992 1e14ea901dc8d9 Author: Linus Torvalds Date: Sun Jul 6 09:29:24 2025 -0700 Merge tag 'edac_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: - Initialize sysfs attributes properly to avoid lockdep complaining about an uninitialized lock class * tag 'edac_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC: Initialize EDAC features sysfs attributes commit bdde3141ceb992f494e9a949c89f99983a1d6604 Merge: 45a3f125463852 30ad231a5029bf Author: Linus Torvalds Date: Sun Jul 6 09:17:48 2025 -0700 Merge tag 'ras_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Borislav Petkov: - Do not remove the MCE sysfs hierarchy if thresholding sysfs nodes init fails due to new/unknown banks present, which in itself is not fatal anyway; add default names for new banks - Make sure MCE polling settings are honored after CMCI storms - Make sure MCE threshold limit is reset after the thresholding interrupt has been serviced - Clean up properly and disable CMCI banks on shutdown so that a second/kexec-ed kernel can rediscover those banks again * tag 'ras_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Make sure CMCI banks are cleared during shutdown on Intel x86/mce/amd: Fix threshold limit reset x86/mce/amd: Add default names for MCA banks and blocks x86/mce: Ensure user polling settings are honored when restarting timer x86/mce: Don't remove sysfs if thresholding sysfs init fails commit 45a3f1254638523869fc2ba067713f4d467e5145 Merge: 1f988d0788f50d eb2c93e7028b4c Author: Linus Torvalds Date: Sun Jul 6 09:16:31 2025 -0700 Merge tag 'irq_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Have irq-msi-lib select CONFIG_GENERIC_MSI_IRQ explicitly as it uses its facilities * tag 'irq_urgent_for_v6.16_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-msi-lib: Select CONFIG_GENERIC_MSI_IRQ commit d0a48dc4df5c986bf8c3caf4d8fc15c480273052 Author: Terry Tritton Date: Fri Jul 4 20:02:34 2025 +0100 selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode sys_futex_wait() expects a struct __kernel_timespec pointer for the timeout, but the provided struct timespec pointer is of type struct old_timespec32 when compiled for 32-bit architectures, unless they use 64-bit timespecs already. Make it work for all variants by converting the provided timespec value into a local struct __kernel_timespec and provide a pointer to it to the syscall. This is a pointless operation for 64-bit, but this is not a hotpath operation, so keep it simple. This fix is based off [1] Originally-by: Wei Gao Signed-off-by: Terry Tritton Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250704190234.14230-1-terry.tritton@linaro.org Link: https://lore.kernel.org/all/20231203235117.29677-1-wegao@suse.com/ [1] commit ae68ad3d7a93ea1eedbce8e5813273163b971b36 Author: Tamir Duberstein Date: Sat Jul 5 11:45:56 2025 -0400 MAINTAINERS: add miscdevice Rust abstractions Add rust abstractions to miscdevice MAINTAINERS entry. Signed-off-by: Tamir Duberstein Acked-by: Boqun Feng Link: https://lore.kernel.org/r/20250705-miscdevice-maintainers-v1-1-9a6b67f7602f@gmail.com Signed-off-by: Greg Kroah-Hartman commit 46b0a67e8f22d2dbc679b37b26c5ff0f50424847 Author: Terry Tritton Date: Fri Jul 4 11:37:49 2025 +0100 selftests/futex: Add futex_numa to .gitignore futex_numa was never added to the .gitignore file. Add it. Fixes: 9140f57c1c13 ("futex,selftests: Add another FUTEX2_NUMA selftest") Signed-off-by: Terry Tritton Signed-off-by: Thomas Gleixner Reviewed-by: André Almeida Link: https://lore.kernel.org/all/20250704103749.10341-1-terry.tritton@linaro.org commit 1f988d0788f50d8464f957e793fab356e2937369 Merge: 05df91921da664 38224c472a038f Author: Linus Torvalds Date: Sat Jul 5 16:14:03 2025 -0700 Merge tag 'hid-for-linus-2025070502' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - Memory corruption fixes in hid-appletb-kbd driver (Qasim Ijaz) - New device ID in hid-elecom driver (Leonard Dizon) - Fixed several HID debugfs contants (Vicki Pfau) * tag 'hid-for-linus-2025070502' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: appletb-kbd: fix slab use-after-free bug in appletb_kbd_probe HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL HID: elecom: add support for ELECOM HUGE 019B variant HID: appletb-kbd: fix memory corruption of input_handler_list commit 05df91921da664ebba2752a7e45b63e3dddb85de Merge: fd860cd7814660 3363da82e02f1b Author: Linus Torvalds Date: Sat Jul 5 13:05:28 2025 -0700 Merge tag 'v6.16-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - Two reconnect fixes including one for a reboot/reconnect race - Fix for incorrect file type that can be returned by SMB3.1.1 POSIX extensions - tcon initialization fix - Fix for resolving Windows symlinks with absolute paths * tag 'v6.16-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: fix native SMB symlink traversal smb: client: fix race condition in negotiate timeout by using more precise timing cifs: all initializations for tcon should happen in tcon_info_alloc smb: client: fix warning when reconnecting channel smb: client: fix readdir returning wrong type with POSIX extensions commit fd860cd78146605eeeeee3ac264ca166cc9fa943 Merge: a79a588fc1761d 534eb6de621954 Author: Linus Torvalds Date: Sat Jul 5 12:54:24 2025 -0700 Merge tag 'i2c-for-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - designware: initialise msg_write_idx during transfer - microchip: check return value from core xfer call - realtek: add 'reg' property constraint to the device tree * tag 'i2c-for-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: dt-bindings: i2c: realtek,rtl9301: Fix missing 'reg' constraint i2c: microchip-core: re-fix fake detections w/ i2cdetect i2c/designware: Fix an initialization issue commit 63a83463d278ea9f9eff7f58708322856e106d87 Author: Kent Overstreet Date: Fri Jul 4 12:18:02 2025 -0400 bcachefs: Fix bch2_btree_transactions_read() synchronization Since we're accessing btree_trans objects owned by another thread, we need to guard against using pointers to freed key cache entries: we need our own srcu read lock, and we should skip a btree_trans if it didn't hold the srcu lock (and thus it might have pointers to freed key cache entries). 00693 Mem abort info: 00693 ESR = 0x0000000096000005 00693 EC = 0x25: DABT (current EL), IL = 32 bits 00693 SET = 0, FnV = 0 00693 EA = 0, S1PTW = 0 00693 FSC = 0x05: level 1 translation fault 00693 Data abort info: 00693 ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 00693 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 00693 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 00693 user pgtable: 4k pages, 39-bit VAs, pgdp=000000012e650000 00693 [000000008fb96218] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 00693 Internal error: Oops: 0000000096000005 [#1] SMP 00693 Modules linked in: 00693 CPU: 0 UID: 0 PID: 4307 Comm: cat Not tainted 6.16.0-rc2-ktest-g9e15af94fd86 #27578 NONE 00693 Hardware name: linux,dummy-virt (DT) 00693 pstate: 60001005 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--) 00693 pc : six_lock_counts+0x20/0xe8 00693 lr : bch2_btree_bkey_cached_common_to_text+0x38/0x130 00693 sp : ffffff80ca98bb60 00693 x29: ffffff80ca98bb60 x28: 000000008fb96200 x27: 0000000000000007 00693 x26: ffffff80eafd06b8 x25: 0000000000000000 x24: ffffffc080d75a60 00693 x23: ffffff80eafd0000 x22: ffffffc080bdfcc0 x21: ffffff80eafd0210 00693 x20: ffffff80c192ff08 x19: 000000008fb96200 x18: 00000000ffffffff 00693 x17: 0000000000000000 x16: 0000000000000000 x15: 00000000ffffffff 00693 x14: 0000000000000000 x13: ffffff80ceb5a29a x12: 20796220646c6568 00693 x11: 72205d3e303c5b20 x10: 0000000000000020 x9 : ffffffc0805fb6b0 00693 x8 : 0000000000000020 x7 : 0000000000000000 x6 : 0000000000000020 00693 x5 : ffffff80ceb5a29c x4 : 0000000000000001 x3 : 000000000000029c 00693 x2 : 0000000000000000 x1 : ffffff80ef66c000 x0 : 000000008fb96200 00693 Call trace: 00693 six_lock_counts+0x20/0xe8 (P) 00693 bch2_btree_bkey_cached_common_to_text+0x38/0x130 00693 bch2_btree_trans_to_text+0x260/0x2a8 00693 bch2_btree_transactions_read+0xac/0x1e8 00693 full_proxy_read+0x74/0xd8 00693 vfs_read+0x90/0x300 00693 ksys_read+0x6c/0x108 00693 __arm64_sys_read+0x20/0x30 00693 invoke_syscall.constprop.0+0x54/0xe8 00693 do_el0_svc+0x44/0xc8 00693 el0_svc+0x18/0x58 00693 el0t_64_sync_handler+0x104/0x130 00693 el0t_64_sync+0x154/0x158 00693 Code: 910003fd f9423c22 f90017e2 d2800002 (f9400c01) 00693 ---[ end trace 0000000000000000 ]--- Signed-off-by: Kent Overstreet commit 14dd95647ea533c7d7c528b9bb7e163e433b47b9 Author: Kent Overstreet Date: Thu Jul 3 19:19:21 2025 -0400 bcachefs: btree read retry fixes Fix btree node read retries after validate errors: __btree_err() is the wrong place to flag a topology error: that is done by btree_lost_data(). Additionally, some calls to bch2_bkey_pick_read_device() were not updated in the 6.16 rework for improved log messages; we were failing to signal that we still had a retry. Cc: Nikita Ofitserov Cc: Alan Huang Reported-and-tested-by: Edoardo Codeglia Signed-off-by: Kent Overstreet commit a77ffbe34d450dd685e55ba942b025ded2517aff Author: Kent Overstreet Date: Thu Jul 3 18:03:10 2025 -0400 bcachefs: btree node scan no longer uses btree cache Previously, btree node scan used the btree node cache to check if btree nodes were readable, but this is subject to interference from threads scanning different devices trying to read the same node - and more critically, nodes that we already attempted and failed to read before kicking off scan. Instead, we now allocate a 'struct btree' that does not live in the btree node cache, and call bch2_btree_node_read_done() directly. Cc: Nikita Ofitserov Reviewed-by: Nikita Ofitserov Reported-and-tested-by: Edoardo Codeglia Signed-off-by: Kent Overstreet commit 454706f1f8698eecc6cc00493c6dffbccdbbd416 Merge: 75ef7b8d44c30a c17fb542dbd1db Author: Jens Axboe Date: Sat Jul 5 06:32:59 2025 -0600 Merge tag 'md-6.16-20250705' of gitolite.kernel.org:pub/scm/linux/kernel/git/mdraid/linux into block-6.16 Pull MD fixes from Yu: " - fix uaf due to stack memory used for bio mempool, from Jinchao - fix raid10/raid1 nowait IO error path, from Nigel and Qixing - fix kernel crash from reading bitmap sysfs entry, by Håkon" * tag 'md-6.16-20250705' of gitolite.kernel.org:pub/scm/linux/kernel/git/mdraid/linux: md/md-bitmap: fix GPF in bitmap_get_stats() md/raid1,raid10: strip REQ_NOWAIT from member bios raid10: cleanup memleak at raid10_make_request md/raid1: Fix stack memory use after return in raid1_reshape commit c17fb542dbd1db745c9feac15617056506dd7195 Author: Håkon Bugge Date: Wed Jul 2 11:10:34 2025 +0200 md/md-bitmap: fix GPF in bitmap_get_stats() The commit message of commit 6ec1f0239485 ("md/md-bitmap: fix stats collection for external bitmaps") states: Remove the external bitmap check as the statistics should be available regardless of bitmap storage location. Return -EINVAL only for invalid bitmap with no storage (neither in superblock nor in external file). But, the code does not adhere to the above, as it does only check for a valid super-block for "internal" bitmaps. Hence, we observe: Oops: GPF, probably for non-canonical address 0x1cd66f1f40000028 RIP: 0010:bitmap_get_stats+0x45/0xd0 Call Trace: seq_read_iter+0x2b9/0x46a seq_read+0x12f/0x180 proc_reg_read+0x57/0xb0 vfs_read+0xf6/0x380 ksys_read+0x6d/0xf0 do_syscall_64+0x8c/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e We fix this by checking the existence of a super-block for both the internal and external case. Fixes: 6ec1f0239485 ("md/md-bitmap: fix stats collection for external bitmaps") Cc: stable@vger.kernel.org Reported-by: Gerald Gibson Signed-off-by: Håkon Bugge Link: https://lore.kernel.org/linux-raid/20250702091035.2061312-1-haakon.bugge@oracle.com Signed-off-by: Yu Kuai commit 5fa31c49928139fa948f078b094d80f12ed83f5f Author: Zheng Qixing Date: Wed Jul 2 18:23:41 2025 +0800 md/raid1,raid10: strip REQ_NOWAIT from member bios RAID layers don't implement proper non-blocking semantics for REQ_NOWAIT, making the flag potentially misleading when propagated to member disks. This patch clear REQ_NOWAIT from cloned bios in raid1/raid10. Retain original bio's REQ_NOWAIT flag for upper layer error handling. Maybe we can implement non-blocking I/O handling mechanisms within RAID in future work. Fixes: 9f346f7d4ea7 ("md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT") Signed-off-by: Zheng Qixing Link: https://lore.kernel.org/linux-raid/20250702102341.1969154-1-zhengqixing@huaweicloud.com Signed-off-by: Yu Kuai commit 43806c3d5b9bb7d74ba4e33a6a8a41ac988bde24 Author: Nigel Croxon Date: Thu Jul 3 11:23:04 2025 -0400 raid10: cleanup memleak at raid10_make_request If raid10_read_request or raid10_write_request registers a new request and the REQ_NOWAIT flag is set, the code does not free the malloc from the mempool. unreferenced object 0xffff8884802c3200 (size 192): comm "fio", pid 9197, jiffies 4298078271 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 88 41 02 00 00 00 00 00 .........A...... 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc c1a049a2): __kmalloc+0x2bb/0x450 mempool_alloc+0x11b/0x320 raid10_make_request+0x19e/0x650 [raid10] md_handle_request+0x3b3/0x9e0 __submit_bio+0x394/0x560 __submit_bio_noacct+0x145/0x530 submit_bio_noacct_nocheck+0x682/0x830 __blkdev_direct_IO_async+0x4dc/0x6b0 blkdev_read_iter+0x1e5/0x3b0 __io_read+0x230/0x1110 io_read+0x13/0x30 io_issue_sqe+0x134/0x1180 io_submit_sqes+0x48c/0xe90 __do_sys_io_uring_enter+0x574/0x8b0 do_syscall_64+0x5c/0xe0 entry_SYSCALL_64_after_hwframe+0x76/0x7e V4: changing backing tree to see if CKI tests will pass. The patch code has not changed between any versions. Fixes: c9aa889b035f ("md: raid10 add nowait support") Signed-off-by: Nigel Croxon Link: https://lore.kernel.org/linux-raid/c0787379-9caa-42f3-b5fc-369aed784400@redhat.com Signed-off-by: Yu Kuai commit d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98 Author: Wang Jinchao Date: Thu Jun 12 19:28:40 2025 +0800 md/raid1: Fix stack memory use after return in raid1_reshape In the raid1_reshape function, newpool is allocated on the stack and assigned to conf->r1bio_pool. This results in conf->r1bio_pool.wait.head pointing to a stack address. Accessing this address later can lead to a kernel panic. Example access path: raid1_reshape() { // newpool is on the stack mempool_t newpool, oldpool; // initialize newpool.wait.head to stack address mempool_init(&newpool, ...); conf->r1bio_pool = newpool; } raid1_read_request() or raid1_write_request() { alloc_r1bio() { mempool_alloc() { // if pool->alloc fails remove_element() { --pool->curr_nr; } } } } mempool_free() { if (pool->curr_nr < pool->min_nr) { // pool->wait.head is a stack address // wake_up() will try to access this invalid address // which leads to a kernel panic return; wake_up(&pool->wait); } } Fix: reinit conf->r1bio_pool.wait after assigning newpool. Fixes: afeee514ce7f ("md: convert to bioset_init()/mempool_init()") Signed-off-by: Wang Jinchao Reviewed-by: Yu Kuai Link: https://lore.kernel.org/linux-raid/20250612112901.3023950-1-wangjinchao600@gmail.com Signed-off-by: Yu Kuai commit 3d44147494385b245f021a3a3a5c1408be1d50d1 Author: Tamir Duberstein Date: Fri Jul 4 15:50:27 2025 -0400 rust: drm: remove unnecessary imports `kernel::str::CStr` is included in the prelude. Signed-off-by: Tamir Duberstein Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250704-cstr-include-drm-v1-1-a279dfc4d753@gmail.com commit 162c90154422e67c3b2dc209a4304a95e293cd58 Author: Ofir Bitton Date: Mon Jul 29 15:17:18 2024 +0300 MAINTAINERS: Change habanalabs maintainer I will be leaving Intel soon, Yaron Avizrat will take the role of habanalabs driver maintainer. Signed-off-by: Ofir Bitton Signed-off-by: Lukas Wunner Acked-by: Yaron Avizrat Acked-by: Jani Nikula Acked-by: Oded Gabbay Link: https://lore.kernel.org/r/20240729121718.540489-2-obitton@habana.ai commit c2b2c7d1da8f26c6db40de2bed142d66e238bd8a Author: Kent Overstreet Date: Thu Jul 3 18:50:18 2025 -0400 bcachefs: Tweak btree cache helpers for use by btree node scan btree node scan needs to not use the btree node cache: that causes interference from prior failed reads and parallel workers. Instead we need to allocate btree nodes that don't live in the btree cache, so that we can call bch2_btree_node_read_done() directly. This patch tweaks the low level helpers so they don't touch the btree cache lists. Cc: Nikita Ofitserov Reviewed-by: Nikita Ofitserov Reported-and-tested-by: Edoardo Codeglia Signed-off-by: Kent Overstreet commit a79a588fc1761dc12a3064fc2f648ae66cea3c5a Merge: 49dcc4f601017c 250d0579da5db2 Author: Linus Torvalds Date: Fri Jul 4 17:27:30 2025 -0700 Merge tag 'pm-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These address system suspend failures under memory pressure in some configurations, fix up RAPL handling on platforms where PL1 cannot be disabled, and fix a documentation typo: - Prevent the Intel RAPL power capping driver from allowing PL1 to be exceeded by mistake on systems when PL1 cannot be disabled (Zhang Rui) - Fix a typo in the ABI documentation (Sumanth Gavini) - Allow swap to be used a bit longer during system suspend and hibernation to avoid suspend failures under memory pressure (Mario Limonciello)" * tag 'pm-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: docs: Replace "diasble" with "disable" powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed PM: Restrict swap use to later in the suspend sequence commit 49dcc4f601017c3fb5dec6754a90403a07d043a6 Merge: b1bf2ef6259e6a de1675de39aa94 Author: Linus Torvalds Date: Fri Jul 4 17:25:41 2025 -0700 Merge tag 'acpi-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a problematic ACPI battery driver change merged recently" * tag 'acpi-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI: battery: negate current when discharging" commit 250d0579da5db2052cce2891a5eaa87450851354 Merge: 964209202ebe15 3e7e5adcd2a867 Author: Rafael J. Wysocki Date: Fri Jul 4 21:54:55 2025 +0200 Merge branch 'pm-sleep' Merge fixes related to system sleep for 6.16-rc5: - Fix typo in the ABI documentation (Sumanth Gavini). - Allow swap to be used a bit longer during system suspend and hibernation to avoid suspend failures under memory pressure (Mario Limonciello). * pm-sleep: PM: sleep: docs: Replace "diasble" with "disable" PM: Restrict swap use to later in the suspend sequence commit c72d628469b8f46251b3afc361269cb15de0c988 Author: Kent Overstreet Date: Thu Jul 3 15:53:51 2025 -0400 bcachefs: Fix btree for nonexistent tree depth The fix for when we should increase tree depth in journal replay was entirely bogus. We should only increase the tree depth in journal replay when recovery from btree node scan, and then only for keys found by btree node scan. This needs additional work - we should be shooting down existing interior node pointers when recovery from scan, they shouldn't be showing up here. Fixes: b47a82ff4772 ("bcachefs: Only run 'increase_depth' for keys from btree node csan") Cc: Alan Huang Reported-by: syzbot+8deb6ff4415db67a9f18@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit ddb9680a7226d6081b42869d2875715a17ecb51d Author: Kent Overstreet Date: Thu Jul 3 15:08:19 2025 -0400 bcachefs: Fix bch2_io_failures_to_text() This wasn't updated when we added tracking for btree validate errors. Signed-off-by: Kent Overstreet commit 63d6e9311999a3dd125ad3e0560a769e047fd7b1 Author: Kent Overstreet Date: Wed Jul 2 13:28:55 2025 -0400 bcachefs: bch2_fpunch_snapshot() Add a new version of fpunch for operating on a snapshot ID, not a subvolume - and use it for "extent past end of inode" repair. Previously, repair would try to delete everything at once, but deleting too many extents at once can overflow the btree_trans bump allocator, as well as causing other problems - the new helper properly uses bch2_extent_trim_atomic(). Reported-and-tested-by: Edoardo Codeglia Signed-off-by: Kent Overstreet commit b1bf2ef6259e6aedc3f952ebd9bc056605563b74 Merge: c435a4f487e8c6 3f3fb973743089 Author: Linus Torvalds Date: Fri Jul 4 12:05:36 2025 -0700 Merge tag 'soc-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC fixes from Arnd Bergmann: "A couple of fixes for firmware drivers have come up, addressing kernel side bugs in op-tee and ff-a code, as well as compatibility issues with exynos-acpm and ff-a protocols. The only devicetree fixes are for the Apple platform, addressing issues with conformance to the bindings for the wlan, spi and mipi nodes" * tag 'soc-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: apple: Move touchbar mipi {address,size}-cells from dtsi to dts arm64: dts: apple: Drop {address,size}-cells from SPI NOR arm64: dts: apple: t8103: Fix PCIe BCM4377 nodename optee: ffa: fix sleep in atomic context firmware: exynos-acpm: fix timeouts on xfers handling arm64: defconfig: update renamed PHY_SNPS_EUSB2 firmware: arm_ffa: Fix the missing entry in struct ffa_indirect_msg_hdr firmware: arm_ffa: Replace mutex with rwlock to avoid sleep in atomic context firmware: arm_ffa: Move memory allocation outside the mutex locking firmware: arm_ffa: Fix memory leak by freeing notifier callback node commit c435a4f487e8c6a3b23dafbda87d971d4fd14e0b Merge: 4b02ed4ab721f5 5903a7452e642f Author: Linus Torvalds Date: Fri Jul 4 10:23:29 2025 -0700 Merge tag 'riscv-for-linus-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - kCFI is restricted to clang-17 or newer, as earlier versions have known bugs - sbi_hsm_hart_start is now staticly allocated, to avoid tripping up the SBI HSM page mapping on sparse systems. * tag 'riscv-for-linus-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: cpu_ops_sbi: Use static array for boot_data riscv: Require clang-17 or newer for kCFI commit 4b02ed4ab721f559e843251564a3ea6ae1769a83 Merge: a1d8128f701682 c9764fd88bc744 Author: Linus Torvalds Date: Fri Jul 4 10:14:49 2025 -0700 Merge tag 'regulator-fix-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few driver fixes (the GPIO one being potentially nasty, though it has been there for a while without anyone reporting it), and one core fix for the rarely used combination of coupled regulators and unbinding" * tag 'regulator-fix-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods regulator: mp886x: Fix ID table driver_data regulator: sy8824x: Fix ID table driver_data regulator: tps65219: Fix devm_kmalloc size allocation regulator: core: fix NULL dereference on unbind due to stale coupling data commit a1d8128f701682d34d9308c9e6b7385c0ffa4b4b Merge: df46426745ac58 04a8ff1bc35148 Author: Linus Torvalds Date: Fri Jul 4 10:10:49 2025 -0700 Merge tag 'spi-fix-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "As well as a few driver specific fixes we've got a core change here which raises the hard coded limit on the number of devices we can support on one SPI bus since some FPGA based systems are running into the existing limit. This is not a good solution but it's one suitable for this point in the release cycle, we should dynamically size the relevant data structures which I hope will happen in the next couple of merge windows. We also pull in a MTD fix for the Qualcomm SNAND driver, the two fixes cover the same issue and merging them together minimises bisection issues" * tag 'spi-fix-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: cadence-quadspi: fix cleanup of rx_chan on failure paths spi: spi-fsl-dspi: Clear completion counter before initiating transfer spi: Raise limit on number of chip selects to 24 mtd: nand: qpic_common: prevent out of bounds access of BAM arrays spi: spi-qpic-snand: reallocate BAM transactions commit df46426745ac58618c822ce3f93d2bb25b9a5060 Merge: 3c2bd251d2039c 4f30f946f27b7f Author: Linus Torvalds Date: Fri Jul 4 10:05:31 2025 -0700 Merge tag 'platform-drivers-x86-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform drivers fixes from Ilpo Järvinen: "Mostly a few lines fixed here and there except amd/isp4 which improves swnodes relationships but that is a new driver not in any stable kernels yet. The think-lmi driver changes also look relatively large but there are just many fixes to it. The i2c/piix4 change is a effectively a revert of the commit 7e173eb82ae9 ("i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86") but that required moving the header out from arch/x86 under include/linux/platform_data/ Summary: - amd/isp4: Improve swnode graph (new driver exception) - asus-nb-wmi: Use duo keyboard quirk for Zenbook Duo UX8406CA - dell-lis3lv02d: Add Latitude 5500 accelerometer address - dell-wmi-sysman: Fix WMI data block retrieval and class dev unreg - hp-bioscfg: Fix class device unregistration - i2c: piix4: Re-enable on non-x86 + move FCH header under platform_data/ - intel/hid: Wildcat Lake support - mellanox: - mlxbf-pmc: Fix duplicate event ID - mlxbf-tmfifo: Fix vring_desc.len assignment - mlxreg-lc: Fix bit-not-set logic check - nvsw-sn2201: Fix bus number in error message & spelling errors - portwell-ec: Move watchdog device under correct platform hierarchy - think-lmi: Error handling fixes (sysfs, kset, kobject, class dev unreg) - thinkpad_acpi: Handle HKEY 0x1402 event (2025 Thinkpads) - wmi: Fix WMI event enablement" * tag 'platform-drivers-x86-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (22 commits) platform/x86: think-lmi: Fix sysfs group cleanup platform/x86: think-lmi: Fix kobject cleanup platform/x86: think-lmi: Create ksets consecutively platform/mellanox: mlxreg-lc: Fix logic error in power state check i2c: Re-enable piix4 driver on non-x86 Move FCH header to a location accessible by all archs platform/x86/intel/hid: Add Wildcat Lake support platform/x86: dell-wmi-sysman: Fix class device unregistration platform/x86: think-lmi: Fix class device unregistration platform/x86: hp-bioscfg: Fix class device unregistration platform/x86: Update swnode graph for amd isp4 platform/x86: dell-wmi-sysman: Fix WMI data block retrieval in sysfs callbacks platform/x86: wmi: Update documentation of WCxx/WExx ACPI methods platform/x86: wmi: Fix WMI event enablement platform/mellanox: nvsw-sn2201: Fix bus number in adapter error message platform/mellanox: Fix spelling and comment clarity in Mellanox drivers platform/mellanox: mlxbf-pmc: Fix duplicate event ID for CACHE_DATA1 platform/x86: thinkpad_acpi: handle HKEY 0x1402 event platform/x86: asus-nb-wmi: add DMI quirk for ASUS Zenbook Duo UX8406CA platform/x86: dell-lis3lv02d: Add Latitude 5500 ... commit 3c2bd251d2039ce2778c35ced5ef47b3a379f5df Merge: d46971e0b6f574 9bd9c8026341f7 Author: Linus Torvalds Date: Fri Jul 4 09:57:12 2025 -0700 Merge tag 'usb-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB driver fixes for 6.16-rc5. I originally wanted this to get into -rc4, but there were some regressions that had to be handled first. Now all looks good. Included in here are the following fixes: - cdns3 driver fixes - xhci driver fixes - typec driver fixes - USB hub fixes (this is what took the longest to get right) - new USB driver quirks added - chipidea driver fixes All of these have been in linux-next for a while and now we have no more reported problems with them" * tag 'usb-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits) usb: hub: Fix flushing of delayed work used for post resume purposes xhci: dbc: Flush queued requests before stopping dbc xhci: dbctty: disable ECHO flag by default xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS usb: xhci: quirk for data loss in ISOC transfers usb: dwc3: gadget: Fix TRB reclaim logic for short transfers and ZLPs usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm usb: typec: displayport: Fix potential deadlock usb: typec: altmodes/displayport: do not index invalid pin_assignments usb: cdnsp: Fix issue with CV Bad Descriptor test usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach Revert "usb: xhci: Implement xhci_handshake_check_state() helper" usb: xhci: Skip xhci_reset in xhci_resume if xhci is being removed usb: gadget: u_serial: Fix race condition in TTY wakeup Revert "usb: gadget: u_serial: Add null pointer check in gs_start_io" usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume usb: acpi: fix device link removal usb: hub: fix detection of high tier USB3 devices behind suspended hubs Logitech C-270 even more broken usb: dwc3: Abort suspend on soft disconnect failure ... commit d46971e0b6f574059d167ddda1355ed301a0bae6 Merge: 42bb9b630c4c6c 4cf65845fdd09d Author: Linus Torvalds Date: Fri Jul 4 09:54:15 2025 -0700 Merge tag 'input-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - support for Acer NGR 200 Controller added to xpad driver - xpad driver will no longer log errors about URBs at sudden disconnect - a fix for potential NULL dereference in cs40l50-vibra driver - several drivers have been switched to using scnprintf() to suppress warnings about potential output truncation * tag 'input-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cs40l50-vibra - fix potential NULL dereference in cs40l50_upload_owt() Input: alps - use scnprintf() to suppress truncation warning Input: iqs7222 - explicitly define number of external channels Input: xpad - support Acer NGR 200 Controller Input: xpad - return errors from xpad_try_sending_next_out_packet() up Input: xpad - adjust error handling for disconnect Input: apple_z2 - drop default ARCH_APPLE in Kconfig Input: Fully open-code compatible for grepping dt-bindings: HID: i2c-hid: elan: Introduce Elan eKTH8D18 Input: psmouse - switch to use scnprintf() to suppress truncation warning Input: lifebook - switch to use scnprintf() to suppress truncation warning Input: alps - switch to use scnprintf() to suppress truncation warning Input: atkbd - switch to use scnprintf() to suppress truncation warning Input: fsia6b - suppress buffer truncation warning for phys Input: iqs626a - replace snprintf() with scnprintf() commit 42bb9b630c4c6c0964cddca98d9d30aa992826de Merge: 923d401238c590 da8d8e9001c6a3 Author: Linus Torvalds Date: Fri Jul 4 09:48:36 2025 -0700 Merge tag 'drm-fixes-2025-07-04' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly drm fixes, bit of a bumper crop, the usual amdgpu/xe/i915 suspects, then there is a large scattering of fixes across core and drivers. I think the simple panel lookup fix is probably the largest, the sched race fix is also fun, but I don't see anything standing out too badly. dma-buf: - fix timeout handling gem: - fix framebuffer object references sched: - fix spsc queue job count race bridge: - fix aux hpd bridge of node - panel: move missing flag handling - samsung-dsim: fix %pK usage to %p panel: - fix problem with simple panel lookup ttm: - fix error path handling amdgpu: - SDMA 5.x reset fix - Add missing firmware declaration - Fix leak in amdgpu_ctx_mgr_entity_fini() - Freesync fix - OLED backlight fix amdkfd: - mtype fix for ext coherent system memory - MMU notifier fix - gfx7/8 fix xe: - Fix chunking the PTE updates and overflowing the maximum number of dwords with with MI_STORE_DATA_IMM - Move WA BB to the LRC BO to mitigate hangs on context switch - Fix frequency/flush WAs for BMG - Fix kconfig prompt title and description - Do not require kunit - Extend 14018094691 WA to BMG - Fix wedging the device on signal i915: - Make mei interrupt top half irq disabled to fix RT builds - Fix timeline left held on VMA alloc error - Fix NULL pointer deref in vlv_dphy_param_init() - Fix selftest mock_request() to avoid NULL deref exynos: - switch to using %p instead of %pK - fix vblank NULL ptr race - fix lockup on samsung peach-pit/pi chromebooks vesadrm: - NULL ptr fix vmwgfx: - fix encrypted memory allocation bug v3d: - fix irq enabled during reset" * tag 'drm-fixes-2025-07-04' of https://gitlab.freedesktop.org/drm/kernel: (41 commits) drm/xe: Do not wedge device on killed exec queues drm/xe: Extend WA 14018094691 to BMG drm/v3d: Disable interrupts before resetting the GPU drm/gem: Acquire references on GEM handles for framebuffers drm/sched: Increment job count before swapping tail spsc queue drm/xe: Allow dropping kunit dependency as built-in drm/xe: Fix kconfig prompt drm/xe/bmg: Update Wa_22019338487 drm/xe/bmg: Update Wa_14022085890 drm/xe: Split xe_device_td_flush() drm/xe/xe_guc_pc: Lock once to update stashed frequencies drm/xe/guc_pc: Add _locked variant for min/max freq drm/xe: Make WA BB part of LRC BO drm/xe: Fix out-of-bounds field write in MI_STORE_DATA_IMM drm/i915/gsc: mei interrupt top half should be in irq disabled context drm/i915/gt: Fix timeline left held on VMA alloc error drm/vmwgfx: Fix guests running with TDX/SEV drm/amd/display: Don't allow OLED to go down to fully off drm/amd/display: Added case for when RR equals panel's max RR using freesync drm/amdkfd: add hqd_sdma_get_doorbell callbacks for gfx7/8 ... commit 923d401238c590f39833a2015f6f9493f146d98f Merge: 1880df2cf44af6 25b1b75bbaf963 Author: Linus Torvalds Date: Fri Jul 4 09:43:08 2025 -0700 Merge tag 'iommu-fixes-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Rockchip: fix infinite loop caused by probing race condition - Intel VT-d: assign devtlb cache tag on ATS enablement * tag 'iommu-fixes-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/vt-d: Assign devtlb cache tag on ATS enablement iommu/rockchip: prevent iommus dead loop when two masters share one IOMMU commit 1880df2cf44af6266b48a905596726c267bc2b04 Merge: 482deed9dfa065 75ef7b8d44c30a Author: Linus Torvalds Date: Fri Jul 4 09:33:59 2025 -0700 Merge tag 'block-6.16-20250704' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe fixes via Christoph: - fix incorrect cdw15 value in passthru error logging (Alok Tiwari) - fix memory leak of bio integrity in nvmet (Dmitry Bogdanov) - refresh visible attrs after being checked (Eugen Hristev) - fix suspicious RCU usage warning in the multipath code (Geliang Tang) - correctly account for namespace head reference counter (Nilay Shroff) - Fix for a regression introduced in ublk in this cycle, where it would attempt to queue a canceled request. - brd RCU sleeping fix, also introduced in this cycle. Bare bones fix, should be improved upon for the next release. * tag 'block-6.16-20250704' of git://git.kernel.dk/linux: brd: fix sleeping function called from invalid context in brd_insert_page() ublk: don't queue request if the associated uring_cmd is canceled nvme-multipath: fix suspicious RCU usage warning nvme-pci: refresh visible attrs after being checked nvmet: fix memory leak of bio integrity nvme: correctly account for namespace head reference counter nvme: Fix incorrect cdw15 value in passthru error logging commit 534eb6de621954cde61c910dbeb8fb1700a0a0d6 Merge: d0b3b7b22dfa1f 5f05fc6e2218db Author: Wolfram Sang Date: Fri Jul 4 18:31:22 2025 +0200 Merge tag 'i2c-host-fixes-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.16-rc5 designware: initialise msg_write_idx during transfer microchip: check return value from core xfer call realtek: add 'reg' property constraint to the device tree commit 482deed9dfa065cf3f68372dadac857541c7d504 Merge: 2eb7f03acf4ac5 94426e4201fbb1 Author: Linus Torvalds Date: Fri Jul 4 09:29:22 2025 -0700 Merge tag 'bcachefs-2025-07-03' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "The 'opts.casefold_disabled' patch is non critical, but would be a 6.15 backport; it's to address the casefolding + overlayfs incompatibility that was discovvered late. It's late because I was hoping that this would be addressed on the overlayfs side (and will be in 6.17), but user reports keep coming in on this one (lots of people are using docker these days)" * tag 'bcachefs-2025-07-03' of git://evilpiepirate.org/bcachefs: bcachefs: opts.casefold_disabled bcachefs: Work around deadlock to btree node rewrites in journal replay bcachefs: Fix incorrect transaction restart handling bcachefs: fix btree_trans_peek_prev_journal() bcachefs: mark invalid_btree_id autofix commit 2eb7f03acf4ac5db937974e99e75dac4c2c5a83d Merge: 4c06e63b92038f 1e7ab6f6782434 Author: Linus Torvalds Date: Fri Jul 4 09:06:49 2025 -0700 Merge tag 'vfs-6.16-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix a regression caused by the anonymous inode rework. Making them regular files causes various places in the kernel to tip over starting with io_uring. Revert to the former status quo and port our assertion to be based on checking the inode so we don't lose the valuable VFS_*_ON_*() assertions that have already helped discover weird behavior our outright bugs. - Fix the the upper bound calculation in fuse_fill_write_pages() - Fix priority inversion issues in the eventpoll code - Make secretmen use anon_inode_make_secure_inode() to avoid bypassing the LSM layer - Fix a netfs hang due to missing case in final DIO read result collection - Fix a double put of the netfs_io_request struct - Provide some helpers to abstract out NETFS_RREQ_IN_PROGRESS flag wrangling - Fix infinite looping in netfs_wait_for_pause/request() - Fix a netfs ref leak on an extra subrequest inserted into a request's list of subreqs - Fix various cifs RPC callbacks to set NETFS_SREQ_NEED_RETRY if a subrequest fails retriably - Fix a cifs warning in the workqueue code when reconnecting a channel - Fix the updating of i_size in netfs to avoid a race between testing if we should have extended the file with a DIO write and changing i_size - Merge the places in netfs that update i_size on write - Fix coredump socket selftests * tag 'vfs-6.16-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: anon_inode: rework assertions netfs: Update tracepoints in a number of ways netfs: Renumber the NETFS_RREQ_* flags to make traces easier to read netfs: Merge i_size update functions netfs: Fix i_size updating smb: client: set missing retry flag in cifs_writev_callback() smb: client: set missing retry flag in cifs_readv_callback() smb: client: set missing retry flag in smb2_writev_callback() netfs: Fix ref leak on inserted extra subreq in write retry netfs: Fix looping in wait functions netfs: Provide helpers to perform NETFS_RREQ_IN_PROGRESS flag wangling netfs: Fix double put of request netfs: Fix hang due to missing case in final DIO read result collection eventpoll: Fix priority inversion problem fuse: fix fuse_fill_write_pages() upper bound calculation fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass selftests/coredump: Fix "socket_detect_userspace_client" test failure commit 4f5b1aa2e40651c8ec196c15e6e8c07e3a0314ca Merge: 043faef334a1f3 3b3312f28ee2d9 Author: Takashi Iwai Date: Fri Jul 4 17:53:03 2025 +0200 Merge tag 'asoc-fix-v6.16-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 An update for the MAINTAINERS file, plus a number of small driver specific fixes and device quirks. commit 9dd1757493416310a5e71146a08bc228869f8dae Author: Anshuman Khandual Date: Fri Jul 4 12:08:12 2025 +0530 arm64/mm: Drop wrong writes into TCR2_EL1 Register X0 contains PIE_E1_ASM and should not be written into REG_TCR2_EL1 which could have an adverse impact otherwise. This has remained undetected till now probably because current value for PIE_E1_ASM (0xcc880e0ac0800000) clears TCR2_EL1 which again gets set subsequently with 'tcr2' after testing for FEAT_TCR2. Drop this unwarranted 'msr' which is a stray change from an earlier commit. This line got re-introduced when rebasing on top of the commit 926b66e2ebc8 ("arm64: setup: name 'tcr2' register"). Cc: Catalin Marinas Cc: Will Deacon Cc: Ryan Roberts Cc: Marc Zyngier Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: 7052e808c446 ("arm64/sysreg: Get rid of the TCR2_EL1x SysregFields") Acked-by: Marc Zyngier Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20250704063812.298914-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 22f3a4f6085951eff28bd1e44d3f388c1d9a5f44 Author: Kevin Brodsky Date: Thu Jun 19 17:00:41 2025 +0100 arm64: poe: Handle spurious Overlay faults We do not currently issue an ISB after updating POR_EL0 when context-switching it, for instance. The rationale is that if the old value of POR_EL0 is more restrictive and causes a fault during uaccess, the access will be retried [1]. In other words, we are trading an ISB on every context-switching for the (unlikely) possibility of a spurious fault. We may also miss faults if the new value of POR_EL0 is more restrictive, but that's considered acceptable. However, as things stand, a spurious Overlay fault results in uaccess failing right away since it causes fault_from_pkey() to return true. If an Overlay fault is reported, we therefore need to double check POR_EL0 against vma_pkey(vma) - this is what arch_vma_access_permitted() already does. As it turns out, we already perform that explicit check if no Overlay fault is reported, and we need to keep that check (see comment added in fault_from_pkey()). Net result: the Overlay ISS2 bit isn't of much help to decide whether a pkey fault occurred. Remove the check for the Overlay bit from fault_from_pkey() and add a comment to try and explain the situation. While at it, also add a comment to permission_overlay_switch() in case anyone gets surprised by the lack of ISB. [1] https://lore.kernel.org/linux-arm-kernel/ZtYNGBrcE-j35fpw@arm.com/ Fixes: 160a8e13de6c ("arm64: context switch POR_EL0 register") Signed-off-by: Kevin Brodsky Link: https://lore.kernel.org/r/20250619160042.2499290-2-kevin.brodsky@arm.com Signed-off-by: Will Deacon commit a75ad2fc76a2ab70817c7eed3163b66ea84ca6ac Author: Mark Brown Date: Fri Jun 20 12:28:48 2025 +0100 arm64: Filter out SME hwcaps when FEAT_SME isn't implemented We have a number of hwcaps for various SME subfeatures enumerated via ID_AA64SMFR0_EL1. Currently we advertise these without cross checking against the main SME feature, advertised in ID_AA64PFR1_EL1.SME which means that if the two are out of sync userspace can see a confusing situation where SME subfeatures are advertised without the base SME hwcap. This can be readily triggered by using the arm64.nosme override which only masks out ID_AA64PFR1_EL1.SME, and there have also been reports of VMMs which do the same thing. Fix this as we did previously for SVE in 064737920bdb ("arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented") by filtering out the SME subfeature hwcaps when FEAT_SME is not present. Fixes: 5e64b862c482 ("arm64/sme: Basic enumeration support") Reported-by: Yury Khrustalev Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250620-arm64-sme-filter-hwcaps-v1-1-02b9d3c2d8ef@kernel.org Signed-off-by: Will Deacon commit 6c66bb655ca3fd5e9304163cf70796d08de512ed Author: Arnd Bergmann Date: Fri Jun 20 13:10:41 2025 +0200 arm64: move smp_send_stop() cpu mask off stack For really large values of CONFIG_NR_CPUS, a CPU mask value should not be put on the stack: arch/arm64/kernel/smp.c:1188:1: error: the frame size of 8544 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] This could be achieved using alloc_cpumask_var(), which makes it depend on CONFIG_CPUMASK_OFFSTACK, but as this function is already serialized and can only run on one CPU, making the variable 'static' is easier. Signed-off-by: Arnd Bergmann Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20250620111045.3364827-1-arnd@kernel.org Signed-off-by: Will Deacon commit d38376b3ee48d073c64e75e150510d7e6b4b04f7 Author: Alessio Belle Date: Tue Jun 24 15:22:08 2025 +0100 drm/imagination: Fix kernel crash when hard resetting the GPU The GPU hard reset sequence calls pm_runtime_force_suspend() and pm_runtime_force_resume(), which according to their documentation should only be used during system-wide PM transitions to sleep states. The main issue though is that depending on some internal runtime PM state as seen by pm_runtime_force_suspend() (whether the usage count is <= 1), pm_runtime_force_resume() might not resume the device unless needed. If that happens, the runtime PM resume callback pvr_power_device_resume() is not called, the GPU clocks are not re-enabled, and the kernel crashes on the next attempt to access GPU registers as part of the power-on sequence. Replace calls to pm_runtime_force_suspend() and pm_runtime_force_resume() with direct calls to the driver's runtime PM callbacks, pvr_power_device_suspend() and pvr_power_device_resume(), to ensure clocks are re-enabled and avoid the kernel crash. Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support") Signed-off-by: Alessio Belle Reviewed-by: Matt Coster Link: https://lore.kernel.org/r/20250624-fix-kernel-crash-gpu-hard-reset-v1-1-6d24810d72a6@imgtec.com Cc: stable@vger.kernel.org Signed-off-by: Matt Coster commit 0d1c86b840966a278d9b25a9d7c18881980f306e Author: Mark Brown Date: Thu Jun 19 22:15:41 2025 +0100 arm64/gcs: Don't try to access GCS registers if arm64.nogcs is enabled During EL2 setup if GCS is advertised in the ID registers we will reset the GCS control registers GCSCR_EL1 and GCSCRE0_EL1 to known values in order to ensure it is disabled. This is done without taking into account overrides supplied on the command line, meaning that if the user has configured arm64.nogcs we will still access these GCS specific registers. If this was done because EL3 does not enable GCS this results in traps to EL3 and a failed boot which is not what users would expect from having set that parameter. Move the writes to these registers to finalise_el2_state where we can pay attention to the command line overrides. For simplicity we leave the updates to the traps in HCRX_EL2 and the FGT registers in place since these should only be relevant for KVM guests and KVM will manage them itself for guests. This follows the existing practice for other similar traps for overridable features such as those for TPIDR2_EL0 and SMPRI_EL1. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20250619-arm64-fix-nogcs-v1-1-febf2973672e@kernel.org Signed-off-by: Will Deacon commit 0262393c1016783ddaa47a7c67f9180bf59f5068 Merge: 5f596380538610 c5b60592886f97 Author: Greg Kroah-Hartman Date: Fri Jul 4 16:31:28 2025 +0200 Merge tag 'icc-6.16-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v6.16-rc This contains a few framework core fixes (related to the new dynamic node id feature), as well as some misc Qualcomm and Samsung driver fixes. - interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node - interconnect: exynos: handle node name allocation failure - interconnect: increase ICC_DYN_ID_START - interconnect: icc-clk: destroy nodes in case of memory allocation failures - interconnect: avoid memory allocation when 'icc_bw_lock' is held Signed-off-by: Georgi Djakov * tag 'icc-6.16-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: avoid memory allocation when 'icc_bw_lock' is held interconnect: icc-clk: destroy nodes in case of memory allocation failures interconnect: increase ICC_DYN_ID_START interconnect: exynos: handle node name allocation failure interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node commit 5f596380538610f6e77437a5c632f7f80106c140 Merge: 9fe58ecd1ed816 1131e70558bc70 Author: Greg Kroah-Hartman Date: Fri Jul 4 16:28:06 2025 +0200 Merge tag 'iio-fixes-for-6.16a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: iio: 1st set of fixes for the 6.16 cycle The usual mixed back of the recent and ancient issues that have surfaced so far this cycle. iio-core - Fix a possible out of bounds write on writing string terminator. iio-backend: - Fix a possible out of bounds write on writing string terminator. adi,ad3530r - Fix wrong masking for channels 4-7 in powerdown mode as they are in a second register and mask assumed all in one larger register. adi,ad7380 - Fix parsing of adi,gain-milli property by reading it as u16 as specified in the binding. adi,ad7606 - Tweak dt-binding to allow both interrupts and backend to be wired up resolving some dt_schema warnings. - Mask value before returning it in register read as for parallel busses both the value and (unwanted) address are read back. adi,ad7949 - Use spi_is_bpw_supported() to correctly handle bits_per_word_mask == 0 which means default value of 8. invensense,mpu3050 - Fix wrong number of interrupts in the binding as minItems should have been maxItems. maxim,max1363 - Two related fixes for a long running mismatch between array indexes that now results in warnings after the core gained a sanity check. Resulted in unnecessary channels being sampled. nxp,fxls8962 - Fix a use after free in fxls8962af_fifo_flush() if it races with buffer mode tear down. st,sensors - Stop using indio_dev->dev before it was initialized as the parent device should be used anyway for error messages and similar. st,stm32-adc - Fix a race when installing chained IRQ handler. x-powers,axp20x_adc - Add missing sentinel in ADC channel map (avoid out of bounds read). * tag 'iio-fixes-for-6.16a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode iio: adc: ad7380: fix adi,gain-milli property parsing iio: adc: ad7949: use spi_is_bpw_supported() iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps dt-bindings: iio: gyro: invensense,mpu3050: change irq maxItems iio: common: st_sensors: Fix use of uninitialize device structs iio: adc: adi-axi-adc: fix ad7606_bus_reg_read() dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning iio: adc: max1363: Reorder mode_list[] entries iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[] iio: adc: stm32-adc: Fix race in installing chained IRQ handler iio: fix potential out-of-bound write iio: backend: fix out-of-bound write commit 9fe58ecd1ed8162a96447fe6fbcbfb2f74be0b54 Author: Krzysztof Kozlowski Date: Mon Jun 16 11:38:42 2025 +0200 mux: mmio: Fix missing CONFIG_REGMAP_MMIO MMIO mux uses now regmap_init_mmio(), so one way or another CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for !REGMAP_MMIO case: ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined! Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/ Fixes: 61de83fd8256 ("mux: mmio: Do not use syscon helper to build regmap") Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250521152354.92720-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250616093841.31985-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 727c2a53cf959f599493c50a80fe2a356b8b1df6 Author: Marc Zyngier Date: Fri Jun 13 15:19:36 2025 +0100 arm64: Unconditionally select CONFIG_JUMP_LABEL Aneesh reports that his kernel fails to boot in nVHE mode with KVM's protected mode enabled. Further investigation by Mostafa reveals that this fails because CONFIG_JUMP_LABEL=n and that we have static keys shared between EL1 and EL2. While this can be worked around, it is obvious that we have long relied on having CONFIG_JUMP_LABEL enabled at all times, as all supported compilers now have 'asm goto' (which is the basic block for jump labels). Let's simplify our lives once and for all by mandating jump labels. It's not like anyone else is testing anything without them, and we already rely on them for other things (kfence, xfs, preempt). Link: https://lore.kernel.org/r/yq5ah60pkq03.fsf@kernel.org Reported-by: Aneesh Kumar K.V Reported-by: Mostafa Saleh Signed-off-by: Marc Zyngier Cc: Will Deacon Cc: Catalin marinas Cc: Mark Rutland Cc: Ard Biesheuvel Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20250613141936.2219895-1-maz@kernel.org Signed-off-by: Will Deacon commit ef8923e6c051a98164c2889db943df9695a39888 Author: Breno Leitao Date: Fri Jul 4 05:47:07 2025 -0700 arm64: efi: Fix KASAN false positive for EFI runtime stack KASAN reports invalid accesses during arch_stack_walk() for EFI runtime services due to vmalloc tagging[1]. The EFI runtime stack must be allocated with KASAN tags reset to avoid false positives. This patch uses arch_alloc_vmap_stack() instead of __vmalloc_node() for EFI stack allocation, which internally calls kasan_reset_tag() The changes ensure EFI runtime stacks are properly sanitized for KASAN while maintaining functional consistency. Link: https://lore.kernel.org/all/aFVVEgD0236LdrL6@gmail.com/ [1] Suggested-by: Andrey Konovalov Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20250704-arm_kasan-v2-1-32ebb4fd7607@debian.org Signed-off-by: Will Deacon commit b9fd9888a5654e59f6c6249337e36c53c1faa329 Author: Jason Xing Date: Wed Jul 2 14:48:22 2025 +0800 bnxt_en: eliminate the compile warning in bnxt_request_irq due to CONFIG_RFS_ACCEL I received a kernel-test-bot report[1] that shows the [-Wunused-but-set-variable] warning. Since the previous commit I made, as the 'Fixes' tag shows, gives users an option to turn on and off the CONFIG_RFS_ACCEL, the issue then can be discovered and reproduced with GCC specifically. Like Simon and Jakub suggested, use fewer #ifdefs which leads to fewer bugs. [1] All warnings (new ones prefixed by >>): drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_request_irq': >> drivers/net/ethernet/broadcom/bnxt/bnxt.c:10703:9: warning: variable 'j' set but not used [-Wunused-but-set-variable] 10703 | int i, j, rc = 0; | ^ Fixes: 9b6a30febddf ("net: allow rps/rfs related configs to be switched") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506282102.x1tXt0qz-lkp@intel.com/ Signed-off-by: Jason Xing Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 44306a684cd1699b8562a54945ddc43e2abc9eab Author: Mikko Perttunen Date: Wed Jul 2 11:08:07 2025 +0900 drm/tegra: nvdec: Fix dma_alloc_coherent error check Check for NULL return value with dma_alloc_coherent, in line with Robin's fix for vic.c in 'drm/tegra: vic: Fix DMA API misuse'. Fixes: 46f226c93d35 ("drm/tegra: Add NVDEC driver") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250702-nvdec-dma-error-check-v1-1-c388b402c53a@nvidia.com commit fc975cfb36393db1db517fbbe366e550bcdcff14 Author: kuyo chang Date: Wed Jul 2 10:12:25 2025 +0800 sched/deadline: Fix dl_server runtime calculation formula In our testing with 6.12 based kernel on a big.LITTLE system, we were seeing instances of RT tasks being blocked from running on the LITTLE cpus for multiple seconds of time, apparently by the dl_server. This far exceeds the default configured 50ms per second runtime. This is due to the fair dl_server runtime calculation being scaled for frequency & capacity of the cpu. Consider the following case under a Big.LITTLE architecture: Assume the runtime is: 50,000,000 ns, and Frequency/capacity scale-invariance defined as below: Frequency scale-invariance: 100 Capacity scale-invariance: 50 First by Frequency scale-invariance, the runtime is scaled to 50,000,000 * 100 >> 10 = 4,882,812 Then by capacity scale-invariance, it is further scaled to 4,882,812 * 50 >> 10 = 238,418. So it will scaled to 238,418 ns. This smaller "accounted runtime" value is what ends up being subtracted against the fair-server's runtime for the current period. Thus after 50ms of real time, we've only accounted ~238us against the fair servers runtime. This 209:1 ratio in this example means that on the smaller cpu the fair server is allowed to continue running, blocking RT tasks, for over 10 seconds before it exhausts its supposed 50ms of runtime. And on other hardware configurations it can be even worse. For the fair deadline_server, to prevent realtime tasks from being unexpectedly delayed, we really do want to use fixed time, and not scaled time for smaller capacity/frequency cpus. So remove the scaling from the fair server's accounting to fix this. Fixes: a110a81c52a9 ("sched/deadline: Deferrable dl server") Suggested-by: Peter Zijlstra Suggested-by: John Stultz Signed-off-by: kuyo chang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Acked-by: John Stultz Tested-by: John Stultz Link: https://lore.kernel.org/r/20250702021440.2594736-1-kuyo.chang@mediatek.com commit 25b1b75bbaf96331750fb01302825069657b2ff8 Author: Lu Baolu Date: Sat Jun 28 18:03:51 2025 +0800 iommu/vt-d: Assign devtlb cache tag on ATS enablement Commit <4f1492efb495> ("iommu/vt-d: Revert ATS timing change to fix boot failure") placed the enabling of ATS in the probe_finalize callback. This occurs after the default domain attachment, which is when the ATS cache tag is assigned. Consequently, the device TLB cache tag is missed when the domain is attached, leading to the device TLB not being invalidated in the iommu_unmap paths. Fix this by assigning the CACHE_TAG_DEVTLB cache tag when ATS is enabled. Fixes: 4f1492efb495 ("iommu/vt-d: Revert ATS timing change to fix boot failure") Cc: stable@vger.kernel.org Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Tested-by: Shuicheng Lin Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20250625050135.3129955-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20250628100351.3198955-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 5285b5ed04ab6ad40f7b654eefbccd6ae8cbf415 Author: Milan Krstic Date: Thu Jul 3 14:30:39 2025 +0000 pinctrl: aw9523: fix can_sleep flag for GPIO chip The GPIO expander is connected via I2C, thus the can_sleep flag has to be set to true. This fixes spurious "scheduling while atomic" bugs in the kernel ringbuffer. Signed-off-by: David Bauer Signed-off-by: Milan Krstic Link: https://lore.kernel.org/20250703143039.5809-1-milan.krstic@gmail.com Signed-off-by: Linus Walleij commit 30e0fd3c0273dc106320081793793a424f1f1950 Author: Hugo Villeneuve Date: Thu Jul 3 15:18:29 2025 -0400 gpiolib: fix performance regression when using gpio_chip_get_multiple() commit 74abd086d2ee ("gpiolib: sanitize the return value of gpio_chip::get_multiple()") altered the value returned by gc->get_multiple() in case it is positive (> 0), but failed to return for other cases (<= 0). This may result in the "if (gc->get)" block being executed and thus negates the performance gain that is normally obtained by using gc->get_multiple(). Fix by returning the result of gc->get_multiple() if it is <= 0. Also move the "ret" variable to the scope where it is used, which as an added bonus fixes an indentation error introduced by the aforementioned commit. Fixes: 74abd086d2ee ("gpiolib: sanitize the return value of gpio_chip::get_multiple()") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20250703191829.2952986-1-hugo@hugovil.com Signed-off-by: Bartosz Golaszewski commit a90b2a1aaacbcf0f91d7e4868ad6c51c5dee814b Author: Eyal Birger Date: Thu Jul 3 10:02:58 2025 -0700 xfrm: interface: fix use-after-free after changing collect_md xfrm interface collect_md property on xfrm interfaces can only be set on device creation, thus xfrmi_changelink() should fail when called on such interfaces. The check to enforce this was done only in the case where the xi was returned from xfrmi_locate() which doesn't look for the collect_md interface, and thus the validation was never reached. Calling changelink would thus errornously place the special interface xi in the xfrmi_net->xfrmi hash, but since it also exists in the xfrmi_net->collect_md_xfrmi pointer it would lead to a double free when the net namespace was taken down [1]. Change the check to use the xi from netdev_priv which is available earlier in the function to prevent changes in xfrm collect_md interfaces. [1] resulting oops: [ 8.516540] kernel BUG at net/core/dev.c:12029! [ 8.516552] Oops: invalid opcode: 0000 [#1] SMP NOPTI [ 8.516559] CPU: 0 UID: 0 PID: 12 Comm: kworker/u80:0 Not tainted 6.15.0-virtme #5 PREEMPT(voluntary) [ 8.516565] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 8.516569] Workqueue: netns cleanup_net [ 8.516579] RIP: 0010:unregister_netdevice_many_notify+0x101/0xab0 [ 8.516590] Code: 90 0f 0b 90 48 8b b0 78 01 00 00 48 8b 90 80 01 00 00 48 89 56 08 48 89 32 4c 89 80 78 01 00 00 48 89 b8 80 01 00 00 eb ac 90 <0f> 0b 48 8b 45 00 4c 8d a0 88 fe ff ff 48 39 c5 74 5c 41 80 bc 24 [ 8.516593] RSP: 0018:ffffa93b8006bd30 EFLAGS: 00010206 [ 8.516598] RAX: ffff98fe4226e000 RBX: ffffa93b8006bd58 RCX: ffffa93b8006bc60 [ 8.516601] RDX: 0000000000000004 RSI: 0000000000000000 RDI: dead000000000122 [ 8.516603] RBP: ffffa93b8006bdd8 R08: dead000000000100 R09: ffff98fe4133c100 [ 8.516605] R10: 0000000000000000 R11: 00000000000003d2 R12: ffffa93b8006be00 [ 8.516608] R13: ffffffff96c1a510 R14: ffffffff96c1a510 R15: ffffa93b8006be00 [ 8.516615] FS: 0000000000000000(0000) GS:ffff98fee73b7000(0000) knlGS:0000000000000000 [ 8.516619] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8.516622] CR2: 00007fcd2abd0700 CR3: 000000003aa40000 CR4: 0000000000752ef0 [ 8.516625] PKRU: 55555554 [ 8.516627] Call Trace: [ 8.516632] [ 8.516635] ? rtnl_is_locked+0x15/0x20 [ 8.516641] ? unregister_netdevice_queue+0x29/0xf0 [ 8.516650] ops_undo_list+0x1f2/0x220 [ 8.516659] cleanup_net+0x1ad/0x2e0 [ 8.516664] process_one_work+0x160/0x380 [ 8.516673] worker_thread+0x2aa/0x3c0 [ 8.516679] ? __pfx_worker_thread+0x10/0x10 [ 8.516686] kthread+0xfb/0x200 [ 8.516690] ? __pfx_kthread+0x10/0x10 [ 8.516693] ? __pfx_kthread+0x10/0x10 [ 8.516697] ret_from_fork+0x82/0xf0 [ 8.516705] ? __pfx_kthread+0x10/0x10 [ 8.516709] ret_from_fork_asm+0x1a/0x30 [ 8.516718] Fixes: abc340b38ba2 ("xfrm: interface: support collect metadata mode") Reported-by: Lonial Con Signed-off-by: Eyal Birger Signed-off-by: Steffen Klassert commit 043faef334a1f3d96ae88e1b7618bfa2b4946388 Author: Thorsten Blum Date: Thu Jul 3 22:06:13 2025 +0200 ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp() Use pr_warn() instead of dev_warn() when 'pdev' is NULL to avoid a potential NULL pointer dereference. Cc: stable@vger.kernel.org Fixes: 20869176d7a7 ("ALSA: ad1816a: Use standard print API") Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250703200616.304309-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit 4cf65845fdd09d711fc7546d60c9abe010956922 Author: Yunshui Jiang Date: Thu Jul 3 21:56:02 2025 -0700 Input: cs40l50-vibra - fix potential NULL dereference in cs40l50_upload_owt() The cs40l50_upload_owt() function allocates memory via kmalloc() without checking for allocation failure, which could lead to a NULL pointer dereference. Return -ENOMEM in case allocation fails. Signed-off-by: Yunshui Jiang Fixes: c38fe1bb5d21 ("Input: cs40l50 - Add support for the CS40L50 haptic driver") Link: https://lore.kernel.org/r/20250704024010.2353841-1-jiangyunshui@kylinos.cn Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit b969f9614885c20f903e1d1f9445611daf161d6d Author: Al Viro Date: Mon Jun 30 02:52:13 2025 -0400 fix proc_sys_compare() handling of in-lookup dentries There's one case where ->d_compare() can be called for an in-lookup dentry; usually that's nothing special from ->d_compare() point of view, but... proc_sys_compare() is weird. The thing is, /proc/sys subdirectories can look differently for different processes. Up to and including having the same name resolve to different dentries - all of them hashed. The way it's done is ->d_compare() refusing to admit a match unless this dentry is supposed to be visible to this caller. The information needed to discriminate between them is stored in inode; it is set during proc_sys_lookup() and until it's done d_splice_alias() we really can't tell who should that dentry be visible for. Normally there's no negative dentries in /proc/sys; we can run into a dying dentry in RCU dcache lookup, but those can be safely rejected. However, ->d_compare() is also called for in-lookup dentries, before they get positive - or hashed, for that matter. In case of match we will wait until dentry leaves in-lookup state and repeat ->d_compare() afterwards. In other words, the right behaviour is to treat the name match as sufficient for in-lookup dentries; if dentry is not for us, we'll see that when we recheck once proc_sys_lookup() is done with it. While we are at it, fix the misspelled READ_ONCE and WRITE_ONCE there. Fixes: d9171b934526 ("parallel lookups machinery, part 4 (and last)") Reported-by: NeilBrown Reviewed-by: Christian Brauner Reviewed-by: NeilBrown Signed-off-by: Al Viro commit da8d8e9001c6a3741e9bec26a6cdcfd75ecabc88 Merge: 8f954c435f6096 5459e16b215c18 Author: Dave Airlie Date: Fri Jul 4 10:01:49 2025 +1000 Merge tag 'drm-xe-fixes-2025-07-03' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix chunking the PTE updates and overflowing the maximum number of dwords with with MI_STORE_DATA_IMM (Jia Yao) - Move WA BB to the LRC BO to mitigate hangs on context switch (Matthew Brost) - Fix frequency/flush WAs for BMG (Vinay / Lucas) - Fix kconfig prompt title and description (Lucas) - Do not require kunit (Harry Austen / Lucas) - Extend 14018094691 WA to BMG (Daniele) - Fix wedging the device on signal (Matthew Brost) Signed-off-by: Dave Airlie From: Lucas De Marchi Link: https://lore.kernel.org/r/o5662wz6nrlf6xt5sjgxq5oe6qoujefzywuwblm3m626hreifv@foqayqydd6ig commit 3363da82e02f1bddc54faa92ea430c6532e2cd2e Author: Paulo Alcantara Date: Thu Jul 3 17:57:19 2025 -0300 smb: client: fix native SMB symlink traversal We've seen customers having shares mounted in paths like /??/C:/ or /??/UNC/foo.example.com/share in order to get their native SMB symlinks successfully followed from different mounts. After commit 12b466eb52d9 ("cifs: Fix creating and resolving absolute NT-style symlinks"), the client would then convert absolute paths from "/??/C:/" to "/mnt/c/" by default. The absolute paths would vary depending on the value of symlinkroot= mount option. Fix this by restoring old behavior of not trying to convert absolute paths by default. Only do this if symlinkroot= was _explicitly_ set. Before patch: $ mount.cifs //w22-fs0/test2 /mnt/1 -o vers=3.1.1,username=xxx,password=yyy $ ls -l /mnt/1/symlink2 lrwxr-xr-x 1 root root 15 Jun 20 14:22 /mnt/1/symlink2 -> /mnt/c/testfile $ mkdir -p /??/C:; echo foo > //??/C:/testfile $ cat /mnt/1/symlink2 cat: /mnt/1/symlink2: No such file or directory After patch: $ mount.cifs //w22-fs0/test2 /mnt/1 -o vers=3.1.1,username=xxx,password=yyy $ ls -l /mnt/1/symlink2 lrwxr-xr-x 1 root root 15 Jun 20 14:22 /mnt/1/symlink2 -> '/??/C:/testfile' $ mkdir -p /??/C:; echo foo > //??/C:/testfile $ cat /mnt/1/symlink2 foo Cc: linux-cifs@vger.kernel.org Reported-by: Pierguido Lambri Cc: David Howells Cc: Stefan Metzmacher Fixes: 12b466eb52d9 ("cifs: Fix creating and resolving absolute NT-style symlinks") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 266b5d02e14f3a0e07414e11f239397de0577a1d Author: Wang Zhaolong Date: Thu Jul 3 21:29:52 2025 +0800 smb: client: fix race condition in negotiate timeout by using more precise timing When the SMB server reboots and the client immediately accesses the mount point, a race condition can occur that causes operations to fail with "Host is down" error. Reproduction steps: # Mount SMB share mount -t cifs //192.168.245.109/TEST /mnt/ -o xxxx ls /mnt # Reboot server ssh root@192.168.245.109 reboot ssh root@192.168.245.109 /path/to/cifs_server_setup.sh ssh root@192.168.245.109 systemctl stop firewalld # Immediate access fails ls /mnt ls: cannot access '/mnt': Host is down # But works if there is a delay The issue is caused by a race condition between negotiate and reconnect. The 20-second negotiate timeout mechanism can interfere with the normal recovery process when both are triggered simultaneously. ls cifsd --------------------------------------------------- cifs_getattr cifs_revalidate_dentry cifs_get_inode_info cifs_get_fattr smb2_query_path_info smb2_compound_op SMB2_open_init smb2_reconnect cifs_negotiate_protocol smb2_negotiate cifs_send_recv smb_send_rqst wait_for_response cifs_demultiplex_thread cifs_read_from_socket cifs_readv_from_socket server_unresponsive cifs_reconnect __cifs_reconnect cifs_abort_connection mid->mid_state = MID_RETRY_NEEDED cifs_wake_up_task cifs_sync_mid_result // case MID_RETRY_NEEDED rc = -EAGAIN; // In smb2_negotiate() rc = -EHOSTDOWN; The server_unresponsive() timeout triggers cifs_reconnect(), which aborts ongoing mid requests and causes the ls command to receive -EAGAIN, leading to -EHOSTDOWN. Fix this by introducing a dedicated `neg_start` field to precisely tracks when the negotiate process begins. The timeout check now uses this accurate timestamp instead of `lstrp`, ensuring that: 1. Timeout is only triggered after negotiate has actually run for 20s 2. The mechanism doesn't interfere with concurrent recovery processes 3. Uninitialized timestamps (value 0) don't trigger false timeouts Fixes: 7ccc1465465d ("smb: client: fix hang in wait_for_response() for negproto") Signed-off-by: Wang Zhaolong Signed-off-by: Steve French commit 8f954c435f609656308b6f8fe3225e7e22c0076a Merge: ac2ad73e755961 2ab3ba39153dcd Author: Dave Airlie Date: Fri Jul 4 09:40:17 2025 +1000 Merge tag 'samsung-dsim-fixes-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - Fixed raw pointer leakage and unsafe behavior in printk() . Switch from %pK to %p for pointer formatting, as %p is now safer and prevents issues like raw pointer leakage and acquiring sleeping locks in atomic contexts. Signed-off-by: Dave Airlie From: Inki Dae Link: https://lore.kernel.org/r/20250629091742.29956-1-inki.dae@samsung.com commit ac2ad73e75596189603995cd4283949863fd7e55 Merge: afd30ace71eecc 5d91394f236167 Author: Dave Airlie Date: Fri Jul 4 09:37:57 2025 +1000 Merge tag 'exynos-drm-fixes-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Fixups - Fixed raw pointer leakage and unsafe behavior in printk() . Switch from %pK to %p for pointer formatting, as %p is now safer and prevents issues like raw pointer leakage and acquiring sleeping locks in atomic contexts. - Fixed kernel panic during boot . A NULL pointer dereference issue occasionally occurred when the vblank interrupt handler was called before the DRM driver was fully initialized during boot. So this patch fixes the issue by adding a check in the interrupt handler to ensure the DRM driver is properly initialized. - Fixed a lockup issue on Samsung Peach-Pit/Pi Chromebooks . The issue occurred after commit c9b1150a68d9 changed the call order of CRTC enable/disable and bridge pre_enable/post_disable methods, causing fimd_dp_clock_enable() to be called before the FIMD device was activated. To fix this, runtime PM guards were added to fimd_dp_clock_enable() to ensure proper operation even when CRTC is not enabled. Signed-off-by: Dave Airlie From: Inki Dae Link: https://lore.kernel.org/r/20250629083554.28628-1-inki.dae@samsung.com commit afd30ace71eecc3ba06815c9b554e801e85ab73a Merge: b91e11ec5cd972 8cadce97bf264e Author: Dave Airlie Date: Fri Jul 4 09:26:57 2025 +1000 Merge tag 'drm-intel-fixes-2025-07-03' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Make mei interrupt top half irq disabled to fix RT builds - Fix timeline left held on VMA alloc error - Fix NULL pointer deref in vlv_dphy_param_init() - Fix selftest mock_request() to avoid NULL deref Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aGYVPAA4KvsZqDFx@jlahtine-mobl commit b91e11ec5cd972dc39121496c3a0cf2ec2e9a393 Merge: bf906c988d77d9 226862f50a7a88 Author: Dave Airlie Date: Fri Jul 4 09:06:56 2025 +1000 Merge tag 'drm-misc-fixes-2025-07-03' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc5: - Replace simple panel lookup hack with proper fix. - nullpointer deref in vesadrm fix. - fix dma_resv_wait_timeout. - fix error handling in ttm_buffer_object_transfer. - bridge fixes. - Fix vmwgfx accidentally allocating encrypted memory. - Fix race in spsc_queue_push() - Add refcount on backing GEM objects during fb creation. - Fix v3d irq's being enabled during gpu reset. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/a7461418-08dc-4b7c-b2fa-264155f66d5e@linux.intel.com commit 2e9fdbe5ec7a65b66da9c202cac621a3a366fde3 Author: Danilo Krummrich Date: Sun Jun 29 17:37:42 2025 +0200 rust: drm: device: drop_in_place() the drm::Device in release() In drm::Device::new() we allocate with __drm_dev_alloc() and return an ARef. When the reference count of the drm::Device falls to zero, the C code automatically calls drm_dev_release(), which eventually frees the memory allocated in drm::Device::new(). However, due to that, drm::Device::drop() is never called. As a result the destructor of the user's private data, i.e. drm::Device::data is never called. Hence, fix this by calling drop_in_place() from the DRM device's release callback. Fixes: 1e4b8896c0f3 ("rust: drm: add device abstraction") Reviewed-by: Alice Ryhl Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250629153747.72536-1-dakr@kernel.org commit 8ff4fb276e2384a87ae7f65f3c28e1e139dbb3fe Author: Mario Limonciello Date: Fri Jun 27 10:01:46 2025 -0500 pinctrl: amd: Clear GPIO debounce for suspend soc-button-array hardcodes a debounce value by means of gpio_keys which uses pinctrl-amd as a backend to program debounce for a GPIO. This hardcoded value doesn't match what the firmware intended to be programmed in _AEI. The hardcoded debounce leads to problems waking from suspend. There isn't appetite to conditionalize the behavior in soc-button-array or gpio-keys so clear it when the system suspends to avoid problems with being able to resume. Cc: Dmitry Torokhov Cc: Hans de Goede Fixes: 5c4fa2a6da7fb ("Input: soc_button_array - debounce the buttons") Link: https://lore.kernel.org/linux-input/mkgtrb5gt7miyg6kvqdlbu4nj3elym6ijudobpdi26gp4xxay5@rsa6ytrjvj2q/ Link: https://lore.kernel.org/linux-input/20250625215813.3477840-1-superm1@kernel.org/ Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Link: https://lore.kernel.org/20250627150155.3311574-1-superm1@kernel.org Signed-off-by: Linus Walleij commit e79d0ba605d54dd47f3d8a487d00f264b896966c Author: Dave Airlie Date: Thu Jul 3 09:27:07 2025 +1000 nouveau/gsp: add a 50ms delay between fbsr and driver unload rpcs This fixes a bunch of command hangs after runtime suspend/resume. This fixes a regression caused by code movement in the commit below, the commit seems to just change timings enough to cause this to happen now, and adding the sleep seems to avoid it. I've spent some time trying to root cause it to no great avail, it seems like a bug on the firmware side, but it could be a bug in our rpc handling that I can't find. Either way, we should land the workaround to fix the problem, while we continue to work out the root cause. Signed-off-by: Dave Airlie Cc: Ben Skeggs Cc: Danilo Krummrich Fixes: c21b039715ce ("drm/nouveau/gsp: add hals for fbsr.suspend/resume()") Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250702232707.175679-1-airlied@gmail.com commit 78f88067d5c56d9aed69f27e238742841461cf67 Author: Aaron Thompson Date: Thu Jul 3 21:19:49 2025 +0000 drm/nouveau: Do not fail module init on debugfs errors If CONFIG_DEBUG_FS is enabled, nouveau_drm_init() returns an error if it fails to create the "nouveau" directory in debugfs. One case where that will happen is when debugfs access is restricted by CONFIG_DEBUG_FS_ALLOW_NONE or by the boot parameter debugfs=off, which cause the debugfs APIs to return -EPERM. So just ignore errors from debugfs. Note that nouveau_debugfs_root may be an error now, but that is a standard pattern for debugfs. From include/linux/debugfs.h: "NOTE: it's expected that most callers should _ignore_ the errors returned by this function. Other debugfs functions handle the fact that the "dentry" passed to them could be an error and they don't crash in that case. Drivers should generally work fine even if debugfs fails to init anyway." Fixes: 97118a1816d2 ("drm/nouveau: create module debugfs root") Cc: stable@vger.kernel.org Signed-off-by: Aaron Thompson Acked-by: Timur Tabi Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250703211949.9916-1-dev@aaront.org commit 4c06e63b92038fadb566b652ec3ec04e228931e8 Merge: 025c1970da725b 157501b0469969 Author: Linus Torvalds Date: Thu Jul 3 13:29:56 2025 -0700 Merge tag 'for-6.16-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - tree-log fixes: - fixes of log tracking of directories and subvolumes - fix iteration and error handling of inode references during log replay - fix free space tree rebuild (reported by syzbot) * tag 'for-6.16-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: use btrfs_record_snapshot_destroy() during rmdir btrfs: propagate last_unlink_trans earlier when doing a rmdir btrfs: record new subvolume in parent dir earlier to avoid dir logging races btrfs: fix inode lookup error handling during log replay btrfs: fix iteration of extrefs during log replay btrfs: fix missing error handling when searching for inode refs during log replay btrfs: fix failure to rebuild free space tree using multiple transactions commit 025c1970da725b07701464990f747fe1c2bd797f Merge: 17bbde2e1716e2 021f243627ead1 Author: Linus Torvalds Date: Thu Jul 3 11:52:39 2025 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Driver fixes plus core sd.c fix are all small and obvious. The larger change to hosts.c is less obvious, but required to avoid data corruption caused by bio splitting" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Fix spelling of a sysfs attribute name scsi: core: Enforce unlimited max_segment_size when virt_boundary_mask is set scsi: RDMA/srp: Don't set a max_segment_size when virt_boundary_mask is set scsi: sd: Fix VPD page 0xb7 length check scsi: qla4xxx: Fix missing DMA mapping error in qla4xxx_alloc_pdu() scsi: qla2xxx: Fix DMA mapping test in qla24xx_get_port_database() commit 68279380266a5fa70e664de754503338e2ec3f43 Author: Eric Biggers Date: Thu Jul 3 10:23:16 2025 -0700 crypto: s390/sha - Fix uninitialized variable in SHA-1 and SHA-2 Commit 88c02b3f79a6 ("s390/sha3: Support sha3 performance enhancements") added the field s390_sha_ctx::first_message_part and made it be used by s390_sha_update() (now s390_sha_update_blocks()). At the time, s390_sha_update() was used by all the s390 SHA-1, SHA-2, and SHA-3 algorithms. However, only the initialization functions for SHA-3 were updated, leaving SHA-1 and SHA-2 using first_message_part uninitialized. This could cause e.g. the function code CPACF_KIMD_SHA_512 | CPACF_KIMD_NIP to be used instead of just CPACF_KIMD_SHA_512. This apparently was harmless, as the SHA-1 and SHA-2 function codes ignore CPACF_KIMD_NIP; it is recognized only by the SHA-3 function codes (https://lore.kernel.org/r/73477fe9-a1dc-4e38-98a6-eba9921e8afa@linux.ibm.com/). Therefore, this bug was found only when first_message_part was later converted to a boolean and UBSAN detected its uninitialized use. Regardless, let's fix this by just initializing to zero. Note: in 6.16, we need to patch SHA-1, SHA-384, and SHA-512. In 6.15 and earlier, we'll also need to patch SHA-224 and SHA-256, as they hadn't yet been librarified (which incidentally fixed this bug). Fixes: 88c02b3f79a6 ("s390/sha3: Support sha3 performance enhancements") Cc: stable@vger.kernel.org Reported-by: Ingo Franzki Closes: https://lore.kernel.org/r/12740696-595c-4604-873e-aefe8b405fbf@linux.ibm.com Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20250703172316.7914-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 7980ad7e4ca80f6c255f4473fba82a475342035a Author: Andrea Righi Date: Tue Jul 1 08:08:45 2025 +0200 selftests/sched_ext: Fix exit selftest hang on UP On single-CPU systems, ops.select_cpu() is never called, causing the EXIT_SELECT_CPU test case to wait indefinitely. Avoid the stall by skipping this specific sub-test when only one CPU is available. Reported-by: Phil Auld Fixes: a5db7817af780 ("sched_ext: Add selftests") Signed-off-by: Andrea Righi Reviewed-by: Phil Auld Tested-by: Phil Auld Signed-off-by: Tejun Heo commit 17bbde2e1716e2ee4b997d476b48ae85c5a47671 Merge: d32e907d15f725 223e2288f4b8c2 Author: Linus Torvalds Date: Thu Jul 3 09:18:55 2025 -0700 Merge tag 'net-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from Bluetooth. Current release - new code bugs: - eth: - txgbe: fix the issue of TX failure - ngbe: specify IRQ vector when the number of VFs is 7 Previous releases - regressions: - sched: always pass notifications when child class becomes empty - ipv4: fix stat increase when udp early demux drops the packet - bluetooth: prevent unintended pause by checking if advertising is active - virtio: fix error reporting in virtqueue_resize - eth: - virtio-net: - ensure the received length does not exceed allocated size - fix the xsk frame's length check - lan78xx: fix WARN in __netif_napi_del_locked on disconnect Previous releases - always broken: - bluetooth: mesh: check instances prior disabling advertising - eth: - idpf: convert control queue mutex to a spinlock - dpaa2: fix xdp_rxq_info leak - amd-xgbe: align CL37 AN sequence as per databook" * tag 'net-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (38 commits) vsock/vmci: Clear the vmci transport packet properly when initializing it dt-bindings: net: sophgo,sg2044-dwmac: Drop status from the example net: ngbe: specify IRQ vector when the number of VFs is 7 net: wangxun: revert the adjustment of the IRQ vector sequence net: txgbe: request MISC IRQ in ndo_open virtio_net: Enforce minimum TX ring size for reliability virtio_net: Cleanup '2+MAX_SKB_FRAGS' virtio_ring: Fix error reporting in virtqueue_resize virtio-net: xsk: rx: fix the frame's length check virtio-net: use the check_mergeable_len helper virtio-net: remove redundant truesize check with PAGE_SIZE virtio-net: ensure the received length does not exceed allocated size net: ipv4: fix stat increase when udp early demux drops the packet net: libwx: fix the incorrect display of the queue number amd-xgbe: do not double read link status net/sched: Always pass notifications when child class becomes empty nui: Fix dma_mapping_error() check rose: fix dangling neighbour pointers in rose_rt_device_down() enic: fix incorrect MTU comparison in enic_change_mtu() amd-xgbe: align CL37 AN sequence as per databook ... commit d32e907d15f7257f69d38b4c829f87a79ecf8b7f Merge: b4911fb0b06089 9e9b46672b1daa Author: Linus Torvalds Date: Thu Jul 3 09:00:04 2025 -0700 Merge tag 'xfs-fixes-6.16-rc5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Carlos Maiolino: - Fix umount hang with unflushable inodes (and add new tracepoint used for debugging this) - Fix ABBA deadlock in xfs_reclaim_inode() vs xfs_ifree_cluster() - Fix dquot buffer pin deadlock * tag 'xfs-fixes-6.16-rc5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: add FALLOC_FL_ALLOCATE_RANGE to supported flags mask xfs: fix unmount hang with unflushable inodes stuck in the AIL xfs: factor out stale buffer item completion xfs: rearrange code in xfs_buf_item.c xfs: add tracepoints for stale pinned inode state debug xfs: avoid dquot buffer pin deadlock xfs: catch stale AGF/AGF metadata xfs: xfs_ifree_cluster vs xfs_iflush_shutdown_abort deadlock xfs: actually use the xfs_growfs_check_rtgeom tracepoint xfs: Improve error handling in xfs_mru_cache_create() xfs: move xfs_submit_zoned_bio a bit xfs: use xfs_readonly_buftarg in xfs_remount_rw xfs: remove NULL pointer checks in xfs_mru_cache_insert xfs: check for shutdown before going to sleep in xfs_select_zone commit 75ef7b8d44c30a76cfbe42dde9413d43055a00a7 Merge: 0d519bb0de3bf0 d6811074203b13 Author: Jens Axboe Date: Thu Jul 3 09:42:07 2025 -0600 Merge tag 'nvme-6.16-2025-07-03' of git://git.infradead.org/nvme into block-6.16 Pull NVMe fixes from Christoph: "- fix incorrect cdw15 value in passthru error logging (Alok Tiwari) - fix memory leak of bio integrity in nvmet (Dmitry Bogdanov) - refresh visible attrs after being checked (Eugen Hristev) - fix suspicious RCU usage warning in the multipath code (Geliang Tang) - correctly account for namespace head reference counter (Nilay Shroff)" * tag 'nvme-6.16-2025-07-03' of git://git.infradead.org/nvme: nvme-multipath: fix suspicious RCU usage warning nvme-pci: refresh visible attrs after being checked nvmet: fix memory leak of bio integrity nvme: correctly account for namespace head reference counter nvme: Fix incorrect cdw15 value in passthru error logging commit c7349772c268ec3c91d83cbfbbcf63f1bd7c256c Author: Luiz Augusto von Dentz Date: Fri Jun 27 11:19:02 2025 -0400 Bluetooth: hci_event: Fix not marking Broadcast Sink BIS as connected Upon receiving HCI_EVT_LE_BIG_SYNC_ESTABLISHED with status 0x00 (success) the corresponding BIS hci_conn state shall be set to BT_CONNECTED otherwise they will be left with BT_OPEN which is invalid at that point, also create the debugfs and sysfs entries following the same logic as the likes of Broadcast Source BIS and CIS connections. Fixes: f777d8827817 ("Bluetooth: ISO: Notify user space about failed bis connections") Signed-off-by: Luiz Augusto von Dentz commit 314d30b1508682e27c8a324096262c66f23455d9 Author: Luiz Augusto von Dentz Date: Thu Jul 3 09:45:08 2025 -0400 Bluetooth: hci_sync: Fix attempting to send HCI_Disconnect to BIS handle BIS/PA connections do have their own cleanup proceedure which are performed by hci_conn_cleanup/bis_cleanup. Fixes: 23205562ffc8 ("Bluetooth: separate CIS_LINK and BIS_LINK link types") Signed-off-by: Luiz Augusto von Dentz commit 59710a26a289ad4e7ef227d22063e964930928b0 Author: Luiz Augusto von Dentz Date: Mon Jun 30 15:37:46 2025 -0400 Bluetooth: hci_core: Remove check of BDADDR_ANY in hci_conn_hash_lookup_big_state The check for destination to be BDADDR_ANY is no longer necessary with the introduction of BIS_LINK. Fixes: 23205562ffc8 ("Bluetooth: separate CIS_LINK and BIS_LINK link types") Signed-off-by: Luiz Augusto von Dentz commit ef9675b0ef030d135413e8638989f3a7d1f3217a Author: Luiz Augusto von Dentz Date: Fri Jun 27 12:31:33 2025 -0400 Bluetooth: hci_sync: Fix not disabling advertising instance As the code comments on hci_setup_ext_adv_instance_sync suggests the advertising instance needs to be disabled in order to update its parameters, but it was wrongly checking that !adv->pending. Fixes: cba6b758711c ("Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 2") Signed-off-by: Luiz Augusto von Dentz commit 01fdcbc7e5a56c9cba521e0f237cb5c3fd162432 Author: Paul Kocialkowski Date: Tue Jul 1 22:11:23 2025 +0200 clk: sunxi-ng: v3s: Fix TCON clock parents The TCON clock can be parented to both the video PLL and the periph0 PLL. Add the latter, which was missing from the list. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Paul Kocialkowski Link: https://patch.msgid.link/20250701201124.812882-5-paulk@sys-base.io Signed-off-by: Chen-Yu Tsai commit 2b73328629396d32e41ca1f023653b07abf2b42f Author: Paul Kocialkowski Date: Tue Jul 1 22:11:22 2025 +0200 clk: sunxi-ng: v3s: Fix CSI1 MCLK clock name The CSI1 MCLK clock is reported as "csi-mclk" while it is specific to CSI1 as the name of the definition indicates. Fix it in the driver. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Paul Kocialkowski Reviewed-By: Icenowy Zheng Link: https://patch.msgid.link/20250701201124.812882-4-paulk@sys-base.io Signed-off-by: Chen-Yu Tsai commit f45b2949b1a235881255132a119b8cc8c3738bd5 Author: Paul Kocialkowski Date: Tue Jul 1 22:11:21 2025 +0200 clk: sunxi-ng: v3s: Fix CSI SCLK clock name The CSI SCLK clock is incorrectly called CSI1 SCLK while it is used for both the CSI0 and CSI1 interfaces and is called CSI SCLK all around the documentation. Fix the name in the driver, header and device-tree. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Paul Kocialkowski Reviewed-By: Icenowy Zheng Link: https://patch.msgid.link/20250701201124.812882-3-paulk@sys-base.io Signed-off-by: Chen-Yu Tsai commit 3f3fb97374308993dbe8884f44c2579a81b90bfa Merge: c6754d77bd42d0 08a0d93c353bd5 Author: Arnd Bergmann Date: Thu Jul 3 16:27:31 2025 +0200 Merge tag 'apple-soc-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux into arm/fixes Apple SoC fixes for 6.16 One devicetree fix for a dtbs_warning that's been present for a while: - Rename the PCIe BCM4377 node to conform to the devicetree binding schema Two devicetree fixes for W=1 warnings that have been introduced recently: - Drop {address,size}-cells from SPI NOR which doesn't have any child nodes such that these don't make sense - Move touchbar mipi {address,size}-cells from the dtsi file where the node is disabled and has no children to the dts file where it's enabled and its children are declared Signed-off-by: Sven Peter * tag 'apple-soc-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux: arm64: dts: apple: Move touchbar mipi {address,size}-cells from dtsi to dts arm64: dts: apple: Drop {address,size}-cells from SPI NOR arm64: dts: apple: t8103: Fix PCIe BCM4377 nodename commit c6754d77bd42d0ca35df8bdcf481b5984141ed1f Merge: f31824a60213dd 312d02adb959ea Author: Arnd Bergmann Date: Thu Jul 3 16:26:08 2025 +0200 Merge tag 'optee-fix-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into arm/fixes A fix in the OP-TEE driver for v6.16 Fixing a sleep in atomic context in the FF-A notification callback by adding a work queue to process in a non-atomic context. * tag 'optee-fix-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: optee: ffa: fix sleep in atomic context commit f31824a60213dd12bddd5b7c2e7e8adbeda61929 Merge: 9a5d769c908467 8d2c2fa2209e83 Author: Arnd Bergmann Date: Thu Jul 3 16:23:53 2025 +0200 Merge tag 'samsung-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/fixes Samsung SoC fixes for v6.16 1. Correct CONFIG option in arm64 defconfig enabling the Qualcomm SoC SNPS EUSB2 phy driver, because Kconfig entry was renamed when changing the driver to a common one, shared with Samsung SoC, thus defconfig lost that driver effectively. 2. Exynos ACPM: Fix timeouts happening with multiple requests. * tag 'samsung-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: firmware: exynos-acpm: fix timeouts on xfers handling arm64: defconfig: update renamed PHY_SNPS_EUSB2 commit 5459e16b215c18529782e7746992653f00de0779 Author: Matthew Brost Date: Tue Jun 24 10:41:03 2025 -0700 drm/xe: Do not wedge device on killed exec queues When a user closes an exec queue or interrupts an app with Ctrl-C, this does not warrant wedging the device in mode 2. Avoid this by skipping the wedge check for killed exec queues in the TDR and LR exec queue cleanup worker. Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250624174103.2707941-1-matthew.brost@intel.com (cherry picked from commit 5a2f117a80c207372513ca8964eeb178874f4990) Signed-off-by: Lucas De Marchi commit d008fc65ebbc7d0f36c5a90c8b1ef117c295d8d8 Author: Daniele Ceraolo Spurio Date: Fri Jun 13 16:11:29 2025 -0700 drm/xe: Extend WA 14018094691 to BMG This WA is applicable to BMG as well. Note that this is a GSC WA and we don't load the GSC on BMG, so extending the WA to BMG won't do anything right now. However, it helps future-proof the driver so that if we ever turn the GSC on we won't have to remember to extend this WA. v2: don't use VERSION_RANGE from 2001 to 2004 (Matt) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250613231128.1261815-2-daniele.ceraolospurio@intel.com (cherry picked from commit 1a5ce0c5b95b0624ebd44f574b98003a466973be) Signed-off-by: Lucas De Marchi commit ff09b71bf9daeca4f21d6e5e449641c9fad75b53 Author: Thomas Fourier Date: Mon Jun 30 11:35:07 2025 +0200 mmc: bcm2835: Fix dma_unmap_sg() nents value The dma_unmap_sg() functions should be called with the same nents as the dma_map_sg(), not the value the map function returned. Fixes: 2f5da678351f ("mmc: bcm2835: Properly handle dmaengine_prep_slave_sg") Signed-off-by: Thomas Fourier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250630093510.82871-2-fourier.thomas@gmail.com Signed-off-by: Ulf Hansson commit 9a5d769c9084678c0f21c3f9cf83ca17466a16fb Merge: 86731a2a651e58 4c46a471be1221 Author: Arnd Bergmann Date: Thu Jul 3 13:56:15 2025 +0200 Merge tag 'ffa-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FF-A fixes for v6.16 Couple of fixes to address: 1. The safety and memory issues in the FF-A notification callback handler: The fixes replaces a mutex with an rwlock to prevent sleeping in atomic context, resolving kernel warnings. Memory allocation is moved outside the lock to support this transition safely. Additionally, a memory leak in the notifier unregistration path is fixed by properly freeing the callback node. 2. The missing entry in struct ffa_indirect_msg_hdr: The fix adds the missing 32 bit reserved entry in the structure as required by the FF-A specification. * tag 'ffa-fixes-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Fix the missing entry in struct ffa_indirect_msg_hdr firmware: arm_ffa: Replace mutex with rwlock to avoid sleep in atomic context firmware: arm_ffa: Move memory allocation outside the mutex locking firmware: arm_ffa: Fix memory leak by freeing notifier callback node Link: https://lore.kernel.org/r/20250609105207.1185570-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 6d0b1c01847fedd7c85a5cdf59b8cfc7d14512e6 Author: Judith Mendez Date: Thu Jun 26 18:14:52 2025 -0500 mmc: sdhci_am654: Workaround for Errata i2312 Errata i2312 [0] for K3 silicon mentions the maximum obtainable timeout through MMC host controller is 700ms. And for commands taking longer than 700ms, hardware timeout should be disabled and software timeout should be used. The workaround for Errata i2312 can be achieved by adding SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci_am654. [0] https://www.ti.com/lit/pdf/sprz487 Signed-off-by: Judith Mendez Acked-by: Adrian Hunter Fixes: 41fd4caeb00b ("mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250626231452.3460987-1-jm@ti.com Signed-off-by: Ulf Hansson commit c9764fd88bc744592b0604ccb6b6fc1a5f76b4e3 Author: Manivannan Sadhasivam Date: Thu Jul 3 16:05:49 2025 +0530 regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods drvdata::gpiods is supposed to hold an array of 'gpio_desc' pointers. But the memory is allocated for only one pointer. This will lead to out-of-bounds access later in the code if 'config::ngpios' is > 1. So fix the code to allocate enough memory to hold 'config::ngpios' of GPIO descriptors. While at it, also move the check for memory allocation failure to be below the allocation to make it more readable. Cc: stable@vger.kernel.org # 5.0 Fixes: d6cd33ad7102 ("regulator: gpio: Convert to use descriptors") Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250703103549.16558-1-mani@kernel.org Signed-off-by: Mark Brown commit 3b3312f28ee2d9c386602f8521e419cfc69f4823 Author: Richard Fitzgerald Date: Thu Jul 3 11:25:21 2025 +0100 ASoC: cs35l56: probe() should fail if the device ID is not recognized Return an error from driver probe if the DEVID read from the chip is not one supported by this driver. In cs35l56_hw_init() there is a check for valid DEVID, but the invalid case was returning the value of ret. At this point in the code ret == 0 so the caller would think that cs35l56_hw_init() was successful. Signed-off-by: Richard Fitzgerald Fixes: 84851aa055c8 ("ASoC: cs35l56: Move part of cs35l56_init() to shared library") Link: https://patch.msgid.link/20250703102521.54204-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 50c78f398e92fafa1cbba3469c95fe04b2e4206d Author: Edson Juliano Drosdeck Date: Thu Jun 26 08:24:42 2025 -0300 mmc: sdhci-pci: Quirk for broken command queuing on Intel GLK-based Positivo models Disable command queuing on Intel GLK-based Positivo models. Without this quirk, CQE (Command Queuing Engine) causes instability or I/O errors during operation. Disabling it ensures stable operation on affected devices. Signed-off-by: Edson Juliano Drosdeck Fixes: bedf9fc01ff1 ("mmc: sdhci: Workaround broken command queuing on Intel GLK") Cc: stable@vger.kernel.org Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250626112442.9791-1-edson.drosdeck@gmail.com Signed-off-by: Ulf Hansson commit de1675de39aa945bad5937d1fde4df3682670639 Author: Rafael J. Wysocki Date: Thu Jul 3 12:54:55 2025 +0200 Revert "ACPI: battery: negate current when discharging" Revert commit 234f71555019 ("ACPI: battery: negate current when discharging") breaks not one but several userspace implementations of battery monitoring: Steam and MangoHud. Perhaps it breaks more, but those are the two that have been tested. Reported-by: Matthew Schwartz Closes: https://lore.kernel.org/linux-acpi/87C1B2AF-D430-4568-B620-14B941A8ABA4@linux.dev/ Signed-off-by: Rafael J. Wysocki commit 223e2288f4b8c262a864e2c03964ffac91744cd5 Author: HarshaVardhana S A Date: Tue Jul 1 14:22:54 2025 +0200 vsock/vmci: Clear the vmci transport packet properly when initializing it In vmci_transport_packet_init memset the vmci_transport_packet before populating the fields to avoid any uninitialised data being left in the structure. Cc: Bryan Tan Cc: Vishnu Dasa Cc: Broadcom internal kernel review list Cc: Stefano Garzarella Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Simon Horman Cc: virtualization@lists.linux.dev Cc: netdev@vger.kernel.org Cc: stable Signed-off-by: HarshaVardhana S A Signed-off-by: Greg Kroah-Hartman Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Acked-by: Stefano Garzarella Link: https://patch.msgid.link/20250701122254.2397440-1-gregkh@linuxfoundation.org Signed-off-by: Paolo Abeni commit f030713e5abf67d0a88864c8855f809c763af954 Author: Krzysztof Kozlowski Date: Tue Jul 1 08:36:22 2025 +0200 dt-bindings: net: sophgo,sg2044-dwmac: Drop status from the example Examples should be complete and should not have a 'status' property, especially a disabled one because this disables the dt_binding_check of the example against the schema. Dropping 'status' property shows missing other properties - phy-mode and phy-handle. Fixes: 114508a89ddc ("dt-bindings: net: Add support for Sophgo SG2044 dwmac") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alexander Sverdlin Reviewed-by: Chen Wang Link: https://patch.msgid.link/20250701063621.23808-2-krzysztof.kozlowski@linaro.org Signed-off-by: Paolo Abeni commit b2f8ef030ef77130844c4b6f1eee28553163d5a7 Merge: b0727b0ccd907a 4174c0c331a2aa Author: Paolo Abeni Date: Thu Jul 3 11:51:41 2025 +0200 Merge branch 'fix-irq-vectors' Jiawen Wu says: ==================== Fix IRQ vectors The interrupt vector order was adjusted by [1]commit 937d46ecc5f9 ("net: wangxun: add ethtool_ops for channel number") in Linux-6.8. Because at that time, the MISC interrupt acts as the parent interrupt in the GPIO IRQ chip. When the number of Rx/Tx ring changes, the last MISC interrupt must be reallocated. Then the GPIO interrupt controller would be corrupted. So the initial plan was to adjust the sequence of the interrupt vectors, let MISC interrupt to be the first one and do not free it. Later, irq_domain was introduced in [2]commit aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller") to avoid this problem. However, the vector sequence adjustment was not reverted. So there is still one problem that has been left unresolved. Due to hardware limitations of NGBE, queue IRQs can only be requested on vector 0 to 7. When the number of queues is set to the maximum 8, the PCI IRQ vectors are allocated from 0 to 8. The vector 0 is used by MISC interrupt, and althrough the vector 8 is used by queue interrupt, it is unable to receive packets. This will cause some packets to be dropped when RSS is enabled and they are assigned to queue 8. This patch set fix the above problems. [1] https://git.kernel.org/netdev/net-next/c/937d46ecc5f9 [2] https://git.kernel.org/netdev/net-next/c/aefd013624a1 ==================== Link: https://patch.msgid.link/20250701063030.59340-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 4174c0c331a2aa3322d3b3be532808deb041b37d Author: Jiawen Wu Date: Tue Jul 1 14:30:30 2025 +0800 net: ngbe: specify IRQ vector when the number of VFs is 7 For NGBE devices, the queue number is limited to be 1 when SRIOV is enabled. In this case, IRQ vector[0] is used for MISC and vector[1] is used for queue, based on the previous patches. But for the hardware design, the IRQ vector[1] must be allocated for use by the VF[6] when the number of VFs is 7. So the IRQ vector[0] should be shared for PF MISC and QUEUE interrupts. +-----------+----------------------+ | Vector | Assigned To | +-----------+----------------------+ | Vector 0 | PF MISC and QUEUE | | Vector 1 | VF 6 | | Vector 2 | VF 5 | | Vector 3 | VF 4 | | Vector 4 | VF 3 | | Vector 5 | VF 2 | | Vector 6 | VF 1 | | Vector 7 | VF 0 | +-----------+----------------------+ Minimize code modifications, only adjust the IRQ vector number for this case. Fixes: 877253d2cbf2 ("net: ngbe: add sriov function support") Signed-off-by: Jiawen Wu Reviewed-by: Larysa Zaremba Link: https://patch.msgid.link/20250701063030.59340-4-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit e37546ad1f9b2c777d3a21d7e50ce265ee3dece8 Author: Jiawen Wu Date: Tue Jul 1 14:30:29 2025 +0800 net: wangxun: revert the adjustment of the IRQ vector sequence Due to hardware limitations of NGBE, queue IRQs can only be requested on vector 0 to 7. When the number of queues is set to the maximum 8, the PCI IRQ vectors are allocated from 0 to 8. The vector 0 is used by MISC interrupt, and althrough the vector 8 is used by queue interrupt, it is unable to receive packets. This will cause some packets to be dropped when RSS is enabled and they are assigned to queue 8. So revert the adjustment of the MISC IRQ location, to make it be the last one in IRQ vectors. Fixes: 937d46ecc5f9 ("net: wangxun: add ethtool_ops for channel number") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Larysa Zaremba Link: https://patch.msgid.link/20250701063030.59340-3-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit cc9f7f65cd2f31150b10e6956f1f0882e1bbae49 Author: Jiawen Wu Date: Tue Jul 1 14:30:28 2025 +0800 net: txgbe: request MISC IRQ in ndo_open Move the creating of irq_domain for MISC IRQ from .probe to .ndo_open, and free it in .ndo_stop, to maintain consistency with the queue IRQs. This it for subsequent adjustments to the IRQ vectors. Fixes: aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250701063030.59340-2-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit b0727b0ccd907aa669ba48027f29019f1c48d42c Merge: 5177373c31318c 24b2f5df86aaeb Author: Paolo Abeni Date: Thu Jul 3 11:40:04 2025 +0200 Merge branch 'virtio-fixes-for-tx-ring-sizing-and-resize-error-reporting' Laurent Vivier says: ==================== virtio: Fixes for TX ring sizing and resize error reporting This patch series contains two fixes and a cleanup for the virtio subsystem. The first patch fixes an error reporting bug in virtio_ring's virtqueue_resize() function. Previously, errors from internal resize helpers could be masked if the subsequent re-enabling of the virtqueue succeeded. This patch restores the correct error propagation, ensuring that callers of virtqueue_resize() are properly informed of underlying resize failures. The second patch does a cleanup of the use of '2+MAX_SKB_FRAGS' The third patch addresses a reliability issue in virtio_net where the TX ring size could be configured too small, potentially leading to persistently stopped queues and degraded performance. It enforces a minimum TX ring size to ensure there's always enough space for at least one maximally-fragmented packet plus an additional slot. ==================== Link: https://patch.msgid.link/20250521092236.661410-1-lvivier@redhat.com Signed-off-by: Paolo Abeni commit 24b2f5df86aaebbe7bac40304eaf5a146c02367c Author: Laurent Vivier Date: Wed May 21 11:22:36 2025 +0200 virtio_net: Enforce minimum TX ring size for reliability The `tx_may_stop()` logic stops TX queues if free descriptors (`sq->vq->num_free`) fall below the threshold of (`MAX_SKB_FRAGS` + 2). If the total ring size (`ring_num`) is not strictly greater than this value, queues can become persistently stopped or stop after minimal use, severely degrading performance. A single sk_buff transmission typically requires descriptors for: - The virtio_net_hdr (1 descriptor) - The sk_buff's linear data (head) (1 descriptor) - Paged fragments (up to MAX_SKB_FRAGS descriptors) This patch enforces that the TX ring size ('ring_num') must be strictly greater than (MAX_SKB_FRAGS + 2). This ensures that the ring is always large enough to hold at least one maximally-fragmented packet plus at least one additional slot. Reported-by: Lei Yang Signed-off-by: Laurent Vivier Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Link: https://patch.msgid.link/20250521092236.661410-4-lvivier@redhat.com Tested-by: Lei Yang Acked-by: Michael S. Tsirkin Signed-off-by: Paolo Abeni commit bd2948d2581ebd31745c1b7094a470513789555f Author: Laurent Vivier Date: Wed May 21 11:22:35 2025 +0200 virtio_net: Cleanup '2+MAX_SKB_FRAGS' Improve consistency by using everywhere it is needed 'MAX_SKB_FRAGS + 2' rather than '2+MAX_SKB_FRAGS' or '2 + MAX_SKB_FRAGS'. No functional change. Signed-off-by: Laurent Vivier Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Link: https://patch.msgid.link/20250521092236.661410-3-lvivier@redhat.com Tested-by: Lei Yang Acked-by: Michael S. Tsirkin Signed-off-by: Paolo Abeni commit 45ebc7e6c125ce93d2ddf82cd5bea20121bb0258 Author: Laurent Vivier Date: Wed May 21 11:22:34 2025 +0200 virtio_ring: Fix error reporting in virtqueue_resize The virtqueue_resize() function was not correctly propagating error codes from its internal resize helper functions, specifically virtqueue_resize_packet() and virtqueue_resize_split(). If these helpers returned an error, but the subsequent call to virtqueue_enable_after_reset() succeeded, the original error from the resize operation would be masked. Consequently, virtqueue_resize() could incorrectly report success to its caller despite an underlying resize failure. This change restores the original code behavior: if (vdev->config->enable_vq_after_reset(_vq)) return -EBUSY; return err; Fix: commit ad48d53b5b3f ("virtio_ring: separate the logic of reset/enable from virtqueue_resize") Cc: xuanzhuo@linux.alibaba.com Signed-off-by: Laurent Vivier Acked-by: Jason Wang Link: https://patch.msgid.link/20250521092236.661410-2-lvivier@redhat.com Tested-by: Lei Yang Acked-by: Michael S. Tsirkin Signed-off-by: Paolo Abeni commit 42ce432522a17685f5a84529de49e555477c0a1f Author: Mark Rutland Date: Thu Jun 19 14:48:17 2025 +0100 KVM: arm64: Remove kvm_arch_vcpu_run_map_fp() Historically KVM hyp code saved the host's FPSIMD state into the hosts's fpsimd_state memory, and so it was necessary to map this into the hyp Stage-1 mappings before running a vCPU. This is no longer necessary as of commits: * fbc7e61195e2 ("KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state") * 8eca7f6d5100 ("KVM: arm64: Remove host FPSIMD saving for non-protected KVM") Since those commits, we eagerly save the host's FPSIMD state before calling into hyp to run a vCPU, and hyp code never reads nor writes the host's fpsimd_state memory. There's no longer any need to map the host's fpsimd_state memory into the hyp Stage-1, and kvm_arch_vcpu_run_map_fp() is unnecessary but benign. Remove kvm_arch_vcpu_run_map_fp(). Currently there is no code to perform a corresponding unmap, and we never mapped the host's SVE or SME state into the hyp Stage-1, so no other code needs to be removed. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Cc: kvmarm@lists.linux.dev Reviewed-by: Mark Brown Tested-by: Fuad Tabba Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20250619134817.4075340-1-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit 105485a182dc6ba32e55db46839af756c105afae Author: Marc Zyngier Date: Tue Jul 1 15:02:58 2025 +0100 KVM: arm64: Fix handling of FEAT_GTG for unimplemented granule sizes Booting an EL2 guest on a system only supporting a subset of the possible page sizes leads to interesting situations. For example, on a system that only supports 4kB and 64kB, and is booted with a 4kB kernel, we end-up advertising 16kB support at stage-2, which is pretty weird. That's because we consider that any S2 bigger than our base granule is fair game, irrespective of what the HW actually supports. While this is not impossible to support (KVM would happily handle it), it is likely to be confusing for the guest. Add new checks that will verify that this granule size is actually supported before publishing it to the guest. Fixes: e7ef6ed4583ea ("KVM: arm64: Enforce NV limits on a per-idregs basis") Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 38224c472a038fa9ccd4085511dd9f3d6119dbf9 Author: Qasim Ijaz Date: Tue Jun 24 13:52:56 2025 +0100 HID: appletb-kbd: fix slab use-after-free bug in appletb_kbd_probe In probe appletb_kbd_probe() a "struct appletb_kbd *kbd" is allocated via devm_kzalloc() to store touch bar keyboard related data. Later on if backlight_device_get_by_name() finds a backlight device with name "appletb_backlight" a timer (kbd->inactivity_timer) is setup with appletb_inactivity_timer() and the timer is armed to run after appletb_tb_dim_timeout (60) seconds. A use-after-free is triggered when failure occurs after the timer is armed. This ultimately means probe failure occurs and as a result the "struct appletb_kbd *kbd" which is device managed memory is freed. After 60 seconds the timer will have expired and __run_timers will attempt to access the timer (kbd->inactivity_timer) however the kdb structure has been freed causing a use-after free. [ 71.636938] ================================================================== [ 71.637915] BUG: KASAN: slab-use-after-free in __run_timers+0x7ad/0x890 [ 71.637915] Write of size 8 at addr ffff8881178c5958 by task swapper/1/0 [ 71.637915] [ 71.637915] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.16.0-rc2-00318-g739a6c93cc75-dirty #12 PREEMPT(voluntary) [ 71.637915] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 71.637915] Call Trace: [ 71.637915] [ 71.637915] dump_stack_lvl+0x53/0x70 [ 71.637915] print_report+0xce/0x670 [ 71.637915] ? __run_timers+0x7ad/0x890 [ 71.637915] kasan_report+0xce/0x100 [ 71.637915] ? __run_timers+0x7ad/0x890 [ 71.637915] __run_timers+0x7ad/0x890 [ 71.637915] ? __pfx___run_timers+0x10/0x10 [ 71.637915] ? update_process_times+0xfc/0x190 [ 71.637915] ? __pfx_update_process_times+0x10/0x10 [ 71.637915] ? _raw_spin_lock_irq+0x80/0xe0 [ 71.637915] ? _raw_spin_lock_irq+0x80/0xe0 [ 71.637915] ? __pfx__raw_spin_lock_irq+0x10/0x10 [ 71.637915] run_timer_softirq+0x141/0x240 [ 71.637915] ? __pfx_run_timer_softirq+0x10/0x10 [ 71.637915] ? __pfx___hrtimer_run_queues+0x10/0x10 [ 71.637915] ? kvm_clock_get_cycles+0x18/0x30 [ 71.637915] ? ktime_get+0x60/0x140 [ 71.637915] handle_softirqs+0x1b8/0x5c0 [ 71.637915] ? __pfx_handle_softirqs+0x10/0x10 [ 71.637915] irq_exit_rcu+0xaf/0xe0 [ 71.637915] sysvec_apic_timer_interrupt+0x6c/0x80 [ 71.637915] [ 71.637915] [ 71.637915] Allocated by task 39: [ 71.637915] kasan_save_stack+0x33/0x60 [ 71.637915] kasan_save_track+0x14/0x30 [ 71.637915] __kasan_kmalloc+0x8f/0xa0 [ 71.637915] __kmalloc_node_track_caller_noprof+0x195/0x420 [ 71.637915] devm_kmalloc+0x74/0x1e0 [ 71.637915] appletb_kbd_probe+0x37/0x3c0 [ 71.637915] hid_device_probe+0x2d1/0x680 [ 71.637915] really_probe+0x1c3/0x690 [ 71.637915] __driver_probe_device+0x247/0x300 [ 71.637915] driver_probe_device+0x49/0x210 [...] [ 71.637915] [ 71.637915] Freed by task 39: [ 71.637915] kasan_save_stack+0x33/0x60 [ 71.637915] kasan_save_track+0x14/0x30 [ 71.637915] kasan_save_free_info+0x3b/0x60 [ 71.637915] __kasan_slab_free+0x37/0x50 [ 71.637915] kfree+0xcf/0x360 [ 71.637915] devres_release_group+0x1f8/0x3c0 [ 71.637915] hid_device_probe+0x315/0x680 [ 71.637915] really_probe+0x1c3/0x690 [ 71.637915] __driver_probe_device+0x247/0x300 [ 71.637915] driver_probe_device+0x49/0x210 [...] The root cause of the issue is that the timer is not disarmed on failure paths leading to it remaining active and accessing freed memory. To fix this call timer_delete_sync() to deactivate the timer. Another small issue is that timer_delete_sync is called unconditionally in appletb_kbd_remove(), fix this by checking for a valid kbd->backlight_dev before calling timer_delete_sync. Fixes: 93a0fc489481 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar") Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Reviewed-by: Aditya Garg Signed-off-by: Jiri Kosina commit 5177373c31318c3c6a190383bfd232e6cf565c36 Author: Bui Quang Minh Date: Mon Jun 30 22:13:14 2025 +0700 virtio-net: xsk: rx: fix the frame's length check When calling buf_to_xdp, the len argument is the frame data's length without virtio header's length (vi->hdr_len). We check that len with xsk_pool_get_rx_frame_size() + vi->hdr_len to ensure the provided len does not larger than the allocated chunk size. The additional vi->hdr_len is because in virtnet_add_recvbuf_xsk, we use part of XDP_PACKET_HEADROOM for virtio header and ask the vhost to start placing data from hard_start + XDP_PACKET_HEADROOM - vi->hdr_len not hard_start + XDP_PACKET_HEADROOM But the first buffer has virtio_header, so the maximum frame's length in the first buffer can only be xsk_pool_get_rx_frame_size() not xsk_pool_get_rx_frame_size() + vi->hdr_len like in the current check. This commit adds an additional argument to buf_to_xdp differentiate between the first buffer and other ones to correctly calculate the maximum frame's length. Cc: stable@vger.kernel.org Reviewed-by: Xuan Zhuo Fixes: a4e7ba702701 ("virtio_net: xsk: rx: support recv small mode") Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250630151315.86722-2-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit c9cbbe7ab6f31ba91c47c09eee75017d5b69462d Merge: bd475eeaaf3cad 7d4a119e45828e Author: Paolo Abeni Date: Thu Jul 3 10:56:57 2025 +0200 Merge branch 'virtio-net-fixes-for-mergeable-xdp-receive-path' Bui Quang Minh says: ==================== virtio-net: fixes for mergeable XDP receive path This series contains fixes for XDP receive path in virtio-net - Patch 1: add a missing check for the received data length with our allocated buffer size in mergeable mode. - Patch 2: remove a redundant truesize check with PAGE_SIZE in mergeable mode - Patch 3: make the current repeated code use the check_mergeable_len to check for received data length in mergeable mode ==================== Link: https://patch.msgid.link/20250630144212.48471-1-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit 7d4a119e45828e643baedea2d2ac736804bc85ee Author: Bui Quang Minh Date: Mon Jun 30 21:42:12 2025 +0700 virtio-net: use the check_mergeable_len helper Replace the current repeated code to check received length in mergeable mode with the new check_mergeable_len helper. Signed-off-by: Bui Quang Minh Acked-by: Jason Wang Link: https://patch.msgid.link/20250630144212.48471-4-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit 4be2193b3393dca33504793fe7586fed547abb5d Author: Bui Quang Minh Date: Mon Jun 30 21:42:11 2025 +0700 virtio-net: remove redundant truesize check with PAGE_SIZE The truesize is guaranteed not to exceed PAGE_SIZE in get_mergeable_buf_len(). It is saved in mergeable context, which is not changeable by the host side, so the check in receive path is quite redundant. Acked-by: Jason Wang Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250630144212.48471-3-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit 315dbdd7cdf6aa533829774caaf4d25f1fd20e73 Author: Bui Quang Minh Date: Mon Jun 30 21:42:10 2025 +0700 virtio-net: ensure the received length does not exceed allocated size In xdp_linearize_page, when reading the following buffers from the ring, we forget to check the received length with the true allocate size. This can lead to an out-of-bound read. This commit adds that missing check. Cc: Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set") Signed-off-by: Bui Quang Minh Acked-by: Jason Wang Link: https://patch.msgid.link/20250630144212.48471-2-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit ba677dbe77af5ffe6204e0f3f547f3ba059c6302 Author: Peter Zijlstra Date: Wed Jul 2 18:21:44 2025 +0200 perf: Revert to requiring CAP_SYS_ADMIN for uprobes Jann reports that uprobes can be used destructively when used in the middle of an instruction. The kernel only verifies there is a valid instruction at the requested offset, but due to variable instruction length cannot determine if this is an instruction as seen by the intended execution stream. Additionally, Mark Rutland notes that on architectures that mix data in the text segment (like arm64), a similar things can be done if the data word is 'mistaken' for an instruction. As such, require CAP_SYS_ADMIN for uprobes. Fixes: c9e0924e5c2b ("perf/core: open access to probes for CAP_PERFMON privileged process") Reported-by: Jann Horn Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/CAG48ez1n4520sq0XrWYDHKiKxE_+WCfAK+qt9qkY4ZiBGmL-5g@mail.gmail.com commit 194808a1ea391e35d364d6c9406e2eccb6174525 Author: Vicki Pfau Date: Tue Jul 1 20:46:42 2025 -0700 HID: Fix debug name for BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_WHEEL The name of BTN_GEAR_DOWN was WheelBtn and BTN_WHEEL was missing. Further, BTN_GEAR_UP had a space in its name and no Btn, which is against convention. This makes the names BtnGearDown, BtnGearUp, and BtnWheel, fixing the errors and matching convention. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 50f9ff52c078d66053bba791ded6fafc64055524 Author: Leonard Dizon Date: Mon Jun 30 05:48:30 2025 +0800 HID: elecom: add support for ELECOM HUGE 019B variant The ELECOM M-HT1DRBK trackball has an additional device ID (056E:019B) not yet recognized by the driver, despite using the same report descriptor as earlier variants. This patch adds the new ID and applies the same fixups, enabling all 8 buttons to function properly. Signed-off-by: Leonard Dizon Signed-off-by: Jiri Kosina commit c80f2b047d5cc42fbd2dff9d1942d4ba7545100f Author: Qasim Ijaz Date: Fri Jun 27 12:01:21 2025 +0100 HID: appletb-kbd: fix memory corruption of input_handler_list In appletb_kbd_probe an input handler is initialised and then registered with input core through input_register_handler(). When this happens input core will add the input handler (specifically its node) to the global input_handler_list. The input_handler_list is central to the functionality of input core and is traversed in various places in input core. An example of this is when a new input device is plugged in and gets registered with input core. The input_handler in probe is allocated as device managed memory. If a probe failure occurs after input_register_handler() the input_handler memory is freed, yet it will remain in the input_handler_list. This effectively means the input_handler_list contains a dangling pointer to data belonging to a freed input handler. This causes an issue when any other input device is plugged in - in my case I had an old PixArt HP USB optical mouse and I decided to plug it in after a failure occurred after input_register_handler(). This lead to the registration of this input device via input_register_device which involves traversing over every handler in the corrupted input_handler_list and calling input_attach_handler(), giving each handler a chance to bind to newly registered device. The core of this bug is a UAF which causes memory corruption of input_handler_list and to fix it we must ensure the input handler is unregistered from input core, this is done through input_unregister_handler(). [ 63.191597] ================================================================== [ 63.192094] BUG: KASAN: slab-use-after-free in input_attach_handler.isra.0+0x1a9/0x1e0 [ 63.192094] Read of size 8 at addr ffff888105ea7c80 by task kworker/0:2/54 [ 63.192094] [ 63.192094] CPU: 0 UID: 0 PID: 54 Comm: kworker/0:2 Not tainted 6.16.0-rc2-00321-g2aa6621d [ 63.192094] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.164 [ 63.192094] Workqueue: usb_hub_wq hub_event [ 63.192094] Call Trace: [ 63.192094] [ 63.192094] dump_stack_lvl+0x53/0x70 [ 63.192094] print_report+0xce/0x670 [ 63.192094] kasan_report+0xce/0x100 [ 63.192094] input_attach_handler.isra.0+0x1a9/0x1e0 [ 63.192094] input_register_device+0x76c/0xd00 [ 63.192094] hidinput_connect+0x686d/0xad60 [ 63.192094] hid_connect+0xf20/0x1b10 [ 63.192094] hid_hw_start+0x83/0x100 [ 63.192094] hid_device_probe+0x2d1/0x680 [ 63.192094] really_probe+0x1c3/0x690 [ 63.192094] __driver_probe_device+0x247/0x300 [ 63.192094] driver_probe_device+0x49/0x210 [ 63.192094] __device_attach_driver+0x160/0x320 [ 63.192094] bus_for_each_drv+0x10f/0x190 [ 63.192094] __device_attach+0x18e/0x370 [ 63.192094] bus_probe_device+0x123/0x170 [ 63.192094] device_add+0xd4d/0x1460 [ 63.192094] hid_add_device+0x30b/0x910 [ 63.192094] usbhid_probe+0x920/0xe00 [ 63.192094] usb_probe_interface+0x363/0x9a0 [ 63.192094] really_probe+0x1c3/0x690 [ 63.192094] __driver_probe_device+0x247/0x300 [ 63.192094] driver_probe_device+0x49/0x210 [ 63.192094] __device_attach_driver+0x160/0x320 [ 63.192094] bus_for_each_drv+0x10f/0x190 [ 63.192094] __device_attach+0x18e/0x370 [ 63.192094] bus_probe_device+0x123/0x170 [ 63.192094] device_add+0xd4d/0x1460 [ 63.192094] usb_set_configuration+0xd14/0x1880 [ 63.192094] usb_generic_driver_probe+0x78/0xb0 [ 63.192094] usb_probe_device+0xaa/0x2e0 [ 63.192094] really_probe+0x1c3/0x690 [ 63.192094] __driver_probe_device+0x247/0x300 [ 63.192094] driver_probe_device+0x49/0x210 [ 63.192094] __device_attach_driver+0x160/0x320 [ 63.192094] bus_for_each_drv+0x10f/0x190 [ 63.192094] __device_attach+0x18e/0x370 [ 63.192094] bus_probe_device+0x123/0x170 [ 63.192094] device_add+0xd4d/0x1460 [ 63.192094] usb_new_device+0x7b4/0x1000 [ 63.192094] hub_event+0x234d/0x3fa0 [ 63.192094] process_one_work+0x5bf/0xfe0 [ 63.192094] worker_thread+0x777/0x13a0 [ 63.192094] [ 63.192094] [ 63.192094] Allocated by task 54: [ 63.192094] kasan_save_stack+0x33/0x60 [ 63.192094] kasan_save_track+0x14/0x30 [ 63.192094] __kasan_kmalloc+0x8f/0xa0 [ 63.192094] __kmalloc_node_track_caller_noprof+0x195/0x420 [ 63.192094] devm_kmalloc+0x74/0x1e0 [ 63.192094] appletb_kbd_probe+0x39/0x440 [ 63.192094] hid_device_probe+0x2d1/0x680 [ 63.192094] really_probe+0x1c3/0x690 [ 63.192094] __driver_probe_device+0x247/0x300 [ 63.192094] driver_probe_device+0x49/0x210 [ 63.192094] __device_attach_driver+0x160/0x320 [...] [ 63.192094] [ 63.192094] Freed by task 54: [ 63.192094] kasan_save_stack+0x33/0x60 [ 63.192094] kasan_save_track+0x14/0x30 [ 63.192094] kasan_save_free_info+0x3b/0x60 [ 63.192094] __kasan_slab_free+0x37/0x50 [ 63.192094] kfree+0xcf/0x360 [ 63.192094] devres_release_group+0x1f8/0x3c0 [ 63.192094] hid_device_probe+0x315/0x680 [ 63.192094] really_probe+0x1c3/0x690 [ 63.192094] __driver_probe_device+0x247/0x300 [ 63.192094] driver_probe_device+0x49/0x210 [ 63.192094] __device_attach_driver+0x160/0x320 [...] Fixes: 7d62ba8deacf ("HID: hid-appletb-kbd: add support for fn toggle between media and function mode") Cc: stable@vger.kernel.org Reviewed-by: Aditya Garg Signed-off-by: Qasim Ijaz Signed-off-by: Jiri Kosina commit 226862f50a7a88e4e4de9abbf36c64d19acd6fd0 Author: Maíra Canal Date: Sat Jun 28 19:42:42 2025 -0300 drm/v3d: Disable interrupts before resetting the GPU Currently, an interrupt can be triggered during a GPU reset, which can lead to GPU hangs and NULL pointer dereference in an interrupt context as shown in the following trace: [ 314.035040] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000c0 [ 314.043822] Mem abort info: [ 314.046606] ESR = 0x0000000096000005 [ 314.050347] EC = 0x25: DABT (current EL), IL = 32 bits [ 314.055651] SET = 0, FnV = 0 [ 314.058695] EA = 0, S1PTW = 0 [ 314.061826] FSC = 0x05: level 1 translation fault [ 314.066694] Data abort info: [ 314.069564] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 314.075039] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 314.080080] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 314.085382] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000102728000 [ 314.091814] [00000000000000c0] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 314.100511] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP [ 314.106770] Modules linked in: v3d i2c_brcmstb vc4 snd_soc_hdmi_codec gpu_sched drm_shmem_helper drm_display_helper cec drm_dma_helper drm_kms_helper drm drm_panel_orientation_quirks snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd backlight [ 314.129654] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.25+rpt-rpi-v8 #1 Debian 1:6.12.25-1+rpt1 [ 314.139388] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [ 314.145211] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 314.152165] pc : v3d_irq+0xec/0x2e0 [v3d] [ 314.156187] lr : v3d_irq+0xe0/0x2e0 [v3d] [ 314.160198] sp : ffffffc080003ea0 [ 314.163502] x29: ffffffc080003ea0 x28: ffffffec1f184980 x27: 021202b000000000 [ 314.170633] x26: ffffffec1f17f630 x25: ffffff8101372000 x24: ffffffec1f17d9f0 [ 314.177764] x23: 000000000000002a x22: 000000000000002a x21: ffffff8103252000 [ 314.184895] x20: 0000000000000001 x19: 00000000deadbeef x18: 0000000000000000 [ 314.192026] x17: ffffff94e51d2000 x16: ffffffec1dac3cb0 x15: c306000000000000 [ 314.199156] x14: 0000000000000000 x13: b2fc982e03cc5168 x12: 0000000000000001 [ 314.206286] x11: ffffff8103f8bcc0 x10: ffffffec1f196868 x9 : ffffffec1dac3874 [ 314.213416] x8 : 0000000000000000 x7 : 0000000000042a3a x6 : ffffff810017a180 [ 314.220547] x5 : ffffffec1ebad400 x4 : ffffffec1ebad320 x3 : 00000000000bebeb [ 314.227677] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 [ 314.234807] Call trace: [ 314.237243] v3d_irq+0xec/0x2e0 [v3d] [ 314.240906] __handle_irq_event_percpu+0x58/0x218 [ 314.245609] handle_irq_event+0x54/0xb8 [ 314.249439] handle_fasteoi_irq+0xac/0x240 [ 314.253527] handle_irq_desc+0x48/0x68 [ 314.257269] generic_handle_domain_irq+0x24/0x38 [ 314.261879] gic_handle_irq+0x48/0xd8 [ 314.265533] call_on_irq_stack+0x24/0x58 [ 314.269448] do_interrupt_handler+0x88/0x98 [ 314.273624] el1_interrupt+0x34/0x68 [ 314.277193] el1h_64_irq_handler+0x18/0x28 [ 314.281281] el1h_64_irq+0x64/0x68 [ 314.284673] default_idle_call+0x3c/0x168 [ 314.288675] do_idle+0x1fc/0x230 [ 314.291895] cpu_startup_entry+0x3c/0x50 [ 314.295810] rest_init+0xe4/0xf0 [ 314.299030] start_kernel+0x5e8/0x790 [ 314.302684] __primary_switched+0x80/0x90 [ 314.306691] Code: 940029eb 360ffc13 f9442ea0 52800001 (f9406017) [ 314.312775] ---[ end trace 0000000000000000 ]--- [ 314.317384] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 314.324249] SMP: stopping secondary CPUs [ 314.328167] Kernel Offset: 0x2b9da00000 from 0xffffffc080000000 [ 314.334076] PHYS_OFFSET: 0x0 [ 314.336946] CPU features: 0x08,00002013,c0200000,0200421b [ 314.342337] Memory Limit: none [ 314.345382] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- Before resetting the GPU, it's necessary to disable all interrupts and deal with any interrupt handler still in-flight. Otherwise, the GPU might reset with jobs still running, or yet, an interrupt could be handled during the reset. Cc: stable@vger.kernel.org Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Reviewed-by: Juan A. Suarez Reviewed-by: Iago Toral Quiroga Link: https://lore.kernel.org/r/20250628224243.47599-1-mcanal@igalia.com Signed-off-by: Maíra Canal commit bd475eeaaf3cad1b183418fff7b19c9b1e3d1c4f Merge: c2a2ff6b4db556 0325143b59c6c6 Author: Jakub Kicinski Date: Wed Jul 2 14:52:25 2025 -0700 Merge branch '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-07-01 (idpf, igc) For idpf: Michal returns 0 for key size when RSS is not supported. Ahmed changes control queue to a spinlock due to sleeping calls. For igc: Vitaly disables L1.2 PCI-E link substate on I226 devices to resolve performance issues. * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igc: disable L1.2 PCI-E link substate to avoid performance issue idpf: convert control queue mutex to a spinlock idpf: return 0 size for RSS key if not supported ==================== Link: https://patch.msgid.link/20250701164317.2983952-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit c2a2ff6b4db55647575260bf2227b0e09d46addb Author: Antoine Tenart Date: Tue Jul 1 09:49:34 2025 +0200 net: ipv4: fix stat increase when udp early demux drops the packet udp_v4_early_demux now returns drop reasons as it either returns 0 or ip_mc_validate_source, which returns itself a drop reason. However its use was not converted in ip_rcv_finish_core and the drop reason is ignored, leading to potentially skipping increasing LINUX_MIB_IPRPFILTER if the drop reason is SKB_DROP_REASON_IP_RPFILTER. This is a fix and we're not converting udp_v4_early_demux to explicitly return a drop reason to ease backports; this can be done as a follow-up. Fixes: d46f827016d8 ("net: ip: make ip_mc_validate_source() return drop reason") Cc: Menglong Dong Reported-by: Sabrina Dubroca Signed-off-by: Antoine Tenart Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250701074935.144134-1-atenart@kernel.org Signed-off-by: Jakub Kicinski commit 5186ff7e1d0e26aaef998ba18b31c79c28d1441f Author: Jiawen Wu Date: Tue Jul 1 15:06:25 2025 +0800 net: libwx: fix the incorrect display of the queue number When setting "ethtool -L eth0 combined 1", the number of RX/TX queue is changed to be 1. RSS is disabled at this moment, and the indices of FDIR have not be changed in wx_set_rss_queues(). So the combined count still shows the previous value. This issue was introduced when supporting FDIR. Fix it for those devices that support FDIR. Fixes: 34744a7749b3 ("net: txgbe: add FDIR info to ethtool ops") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/A5C8FE56D6C04608+20250701070625.73680-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 16ceda2ef683a50cd0783006c0504e1931cd8879 Author: Raju Rangoju Date: Tue Jul 1 12:20:16 2025 +0530 amd-xgbe: do not double read link status The link status is latched low so that momentary link drops can be detected. Always double-reading the status defeats this design feature. Only double read if link was already down This prevents unnecessary duplicate readings of the link status. Fixes: 4f3b20bfbb75 ("amd-xgbe: add support for rx-adaptation") Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250701065016.4140707-1-Raju.Rangoju@amd.com Signed-off-by: Jakub Kicinski commit 103406b38c600fec1fe375a77b27d87e314aea09 Author: Lion Ackermann Date: Mon Jun 30 15:27:30 2025 +0200 net/sched: Always pass notifications when child class becomes empty Certain classful qdiscs may invoke their classes' dequeue handler on an enqueue operation. This may unexpectedly empty the child qdisc and thus make an in-flight class passive via qlen_notify(). Most qdiscs do not expect such behaviour at this point in time and may re-activate the class eventually anyways which will lead to a use-after-free. The referenced fix commit attempted to fix this behavior for the HFSC case by moving the backlog accounting around, though this turned out to be incomplete since the parent's parent may run into the issue too. The following reproducer demonstrates this use-after-free: tc qdisc add dev lo root handle 1: drr tc filter add dev lo parent 1: basic classid 1:1 tc class add dev lo parent 1: classid 1:1 drr tc qdisc add dev lo parent 1:1 handle 2: hfsc def 1 tc class add dev lo parent 2: classid 2:1 hfsc rt m1 8 d 1 m2 0 tc qdisc add dev lo parent 2:1 handle 3: netem tc qdisc add dev lo parent 3:1 handle 4: blackhole echo 1 | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888 tc class delete dev lo classid 1:1 echo 1 | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888 Since backlog accounting issues leading to a use-after-frees on stale class pointers is a recurring pattern at this point, this patch takes a different approach. Instead of trying to fix the accounting, the patch ensures that qdisc_tree_reduce_backlog always calls qlen_notify when the child qdisc is empty. This solves the problem because deletion of qdiscs always involves a call to qdisc_reset() and / or qdisc_purge_queue() which ultimately resets its qlen to 0 thus causing the following qdisc_tree_reduce_backlog() to report to the parent. Note that this may call qlen_notify on passive classes multiple times. This is not a problem after the recent patch series that made all the classful qdiscs qlen_notify() handlers idempotent. Fixes: 3f981138109f ("sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()") Signed-off-by: Lion Ackermann Reviewed-by: Jamal Hadi Salim Acked-by: Cong Wang Acked-by: Jamal Hadi Salim Link: https://patch.msgid.link/d912cbd7-193b-4269-9857-525bee8bbb6a@gmail.com Signed-off-by: Jakub Kicinski commit 3e7e5adcd2a86783c441edf6f518fc903e3c4e7c Author: Sumanth Gavini Date: Fri May 23 15:02:37 2025 -0700 PM: sleep: docs: Replace "diasble" with "disable" Fix misspelling reported by codespell. Signed-off-by: Sumanth Gavini Link: https://patch.msgid.link/20250523220238.455718-1-sumanth.gavini@yahoo.com [ rjw: Subject rewrite ] Signed-off-by: Rafael J. Wysocki commit 5903a7452e642f1475f274373633522db168b60b Merge: d0b3b7b22dfa1f 2b29be967ae456 Author: Palmer Dabbelt Date: Wed Jul 2 10:51:00 2025 -0700 Merge tag 'riscv-fixes-6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into fixes riscv fixes for 6.16-rc4 - A fix for a percpu variable that may lie in the vmalloc region and on which we used __pa() - A fix to require at least clang-17 to prevent build issues with previous versions on kCFI * tag 'riscv-fixes-6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux: riscv: cpu_ops_sbi: Use static array for boot_data riscv: Require clang-17 or newer for kCFI commit b4911fb0b060899e4eebca0151eb56deb86921ec Merge: ba6a2f25d3d0c8 ec54c0a20709ed Author: Linus Torvalds Date: Wed Jul 2 09:34:57 2025 -0700 Merge tag 'mmc-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Apply BROKEN_SD_DISCARD quirk earlier during init - Silence some confusing error messages for SD UHS-II cards MMC host: - mtk-sd: - Prevent memory corruption from DMA map failure - Fix a pagefault in dma_unmap_sg() for not prepared data - sdhci: Revert "Disable SD card clock before changing parameters" - sdhci-of-k1: Fix error code in probe() - sdhci-uhs2: Silence some confusing error messages for SD UHS-II cards" * tag 'mmc-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mtk-sd: reset host->mrq on prepare_data() error Revert "mmc: sdhci: Disable SD card clock before changing parameters" mmc: sdhci-uhs2: Adjust some error messages and register dump for SD UHS-II card mmc: sdhci: Add a helper function for dump register in dynamic debug mode mmc: core: Adjust some error messages for SD UHS-II cards mtk-sd: Prevent memory corruption from DMA map failure mtk-sd: Fix a pagefault in dma_unmap_sg() for not prepared data mmc: sdhci-of-k1: Fix error code in probe() mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier commit ba6a2f25d3d0c813bc5f70c4437002ecc90b85d5 Merge: 3c894cb29bbf4e 62355f1f87b8c7 Author: Linus Torvalds Date: Wed Jul 2 09:27:57 2025 -0700 Merge tag 's390-6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Fix PCI error recovery and bring it in line with AER/EEH * tag 's390-6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: Allow automatic recovery with minimal driver support s390/pci: Do not try re-enabling load/store if device is disabled s390/pci: Fix stale function handles in error handling commit 3c894cb29bbf4e36c5f2497cf8ea6fb09e157920 Merge: 7e4a6b57dd7f55 9a96876e3c6578 Author: Linus Torvalds Date: Wed Jul 2 09:23:56 2025 -0700 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd fixes from Jason Gunthorpe: "Some changes to the userspace selftest framework cause the iommufd tests to start failing. This turned out to be bugs in the iommufd side that were just getting uncovered. - Deal with MAP_HUGETLB mmaping more than requested even when in MAP_FIXED mode - Fixup missing error flow cleanup in the test - Check that the memory allocations suceeded - Suppress some bogus gcc 'may be used uninitialized' warnings" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd/selftest: Fix build warnings due to uninitialized mfd iommufd/selftest: Add asserts testing global mfd iommufd/selftest: Add missing close(mfd) in memfd_mmap() iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes commit 7e4a6b57dd7f55cce9ece0778c111905e73db7b1 Merge: 65c1736c8e9d06 a9a9e68954f29b Author: Linus Torvalds Date: Wed Jul 2 09:17:40 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Several mlx5 bugs, crashers, and reports: - Limit stack usage - Fix mis-use of __xa_store/erase() without holding the lock to a locked version - Rate limit prints in the gid cache error cases - Fully initialize the event object before making it globally visible in an xarray - Fix deadlock inside the ODP code if the MMU notifier was called from a reclaim context - Include missed counters for some switchdev configurations and mulit-port MPV mode - Fix loopback packet support when in mulit-port MPV mode" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/mlx5: Fix vport loopback for MPV device RDMA/mlx5: Fix CC counters query for MPV RDMA/mlx5: Fix HW counters query for non-representor devices IB/core: Annotate umem_mutex acquisition under fs_reclaim for lockdep IB/mlx5: Fix potential deadlock in MR deregistration RDMA/mlx5: Initialize obj_event->obj_sub_list before xa_insert RDMA/core: Rate limit GID cache warning messages RDMA/mlx5: Fix unsafe xarray access in implicit ODP handling RDMA/mlx5: reduce stack usage in mlx5_ib_ufile_hw_cleanup commit 5f05fc6e2218db7ecc52c60eb34b707fe69262c2 Author: Krzysztof Kozlowski Date: Wed Jul 2 08:15:31 2025 +0200 dt-bindings: i2c: realtek,rtl9301: Fix missing 'reg' constraint Lists should have fixed amount if items, so add missing constraint to the 'reg' property (only one address space entry). Fixes: c5eda0333076 ("dt-bindings: i2c: Add Realtek RTL I2C Controller") Cc: # v6.13+ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250702061530.6940-2-krzysztof.kozlowski@linaro.org commit db98ee56851061082fecd7e6b4b6a93600562ec2 Author: Peter Ujfalusi Date: Tue Jul 1 16:34:11 2025 +0300 ALSA: hda/realtek: Add quirk for ASUS ExpertBook B9403CVAR ASUS ExpertBook B9403CVAR needs the ALC294_FIXUP_ASUS_HPE for the headphones to work. Closes: https://github.com/thesofproject/linux/issues/5472 Signed-off-by: Peter Ujfalusi Tested-by: Anton Khirnov Link: https://patch.msgid.link/20250701133411.25275-1-peter.ujfalusi@linux.intel.com Signed-off-by: Takashi Iwai commit 1e7ab6f67824343ee3e96f100f0937c393749a8a Author: Christian Brauner Date: Wed Jul 2 11:23:55 2025 +0200 anon_inode: rework assertions Making anonymous inodes regular files comes with a lot of risk and regression potential as evidenced by a recent hickup in io_uring. We're better of continuing to not have them be regular files. Since we have S_ANON_INODE we can port all of our assertions easily. Link: https://lore.kernel.org/20250702-work-fixes-v1-1-ff76ea589e33@kernel.org Fixes: cfd86ef7e8e7 ("anon_inode: use a proper mode internally") Acked-by: Jens Axboe Cc: stable@kernel.org Reported-by: Jens Axboe Signed-off-by: Christian Brauner commit f7690d058170dbc1520b0bfbc3d9daf046b59326 Author: Simon Trimmer Date: Wed Jul 2 11:22:35 2025 +0000 ASoC: Intel: sof_sdw: Add quirks for Lenovo P1 and P16 These Lenovo Laptops have the DMICs connected to the host instead of the CS42L43 and so need the SOC_SDW_CODEC_MIC quirk. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20250702112235.377479-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 561aa0e22b70a5e7246b73d62a824b3aef3fc375 Author: Thomas Fourier Date: Mon Jun 30 10:36:43 2025 +0200 nui: Fix dma_mapping_error() check dma_map_XXX() functions return values DMA_MAPPING_ERROR as error values which is often ~0. The error value should be tested with dma_mapping_error(). This patch creates a new function in niu_ops to test if the mapping failed. The test is fixed in niu_rbr_add_page(), added in niu_start_xmit() and the successfully mapped pages are unmaped upon error. Fixes: ec2deec1f352 ("niu: Fix to check for dma mapping errors.") Signed-off-by: Thomas Fourier Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4f30f946f27b7f044cf8f3f1f353dee1dcd3517a Author: Kurt Borja Date: Mon Jun 30 14:31:21 2025 -0300 platform/x86: think-lmi: Fix sysfs group cleanup Many error paths in tlmi_sysfs_init() lead to sysfs groups being removed when they were not even created. Fix this by letting the kobject core manage these groups through their kobj_type's defult_groups. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Cc: stable@vger.kernel.org Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250630-lmi-fix-v3-3-ce4f81c9c481@gmail.com Signed-off-by: Ilpo Järvinen commit 9110056fe10b0519529bdbbac37311a5037ea0c2 Author: Kurt Borja Date: Mon Jun 30 14:31:20 2025 -0300 platform/x86: think-lmi: Fix kobject cleanup In tlmi_analyze(), allocated structs with an embedded kobject are freed in error paths after the they were already initialized. Fix this by first by avoiding the initialization of kobjects in tlmi_analyze() and then by correctly cleaning them up in tlmi_release_attr() using their kset's kobject list. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Fixes: 30e78435d3bf ("platform/x86: think-lmi: Split kobject_init() and kobject_add() calls") Cc: stable@vger.kernel.org Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250630-lmi-fix-v3-2-ce4f81c9c481@gmail.com Signed-off-by: Ilpo Järvinen commit 8dab34ca77293b409c3223636dde915a22656748 Author: Kurt Borja Date: Mon Jun 30 14:31:19 2025 -0300 platform/x86: think-lmi: Create ksets consecutively Avoid entering tlmi_release_attr() in error paths if both ksets are not yet created. This is accomplished by initializing them side by side. Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Cc: stable@vger.kernel.org Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250630-lmi-fix-v3-1-ce4f81c9c481@gmail.com Signed-off-by: Ilpo Järvinen commit 5307dce878d4126e1b375587318955bd019c3741 Author: Thomas Zimmermann Date: Mon Jun 30 10:36:47 2025 +0200 drm/gem: Acquire references on GEM handles for framebuffers A GEM handle can be released while the GEM buffer object is attached to a DRM framebuffer. This leads to the release of the dma-buf backing the buffer object, if any. [1] Trying to use the framebuffer in further mode-setting operations leads to a segmentation fault. Most easily happens with driver that use shadow planes for vmap-ing the dma-buf during a page flip. An example is shown below. [ 156.791968] ------------[ cut here ]------------ [ 156.796830] WARNING: CPU: 2 PID: 2255 at drivers/dma-buf/dma-buf.c:1527 dma_buf_vmap+0x224/0x430 [...] [ 156.942028] RIP: 0010:dma_buf_vmap+0x224/0x430 [ 157.043420] Call Trace: [ 157.045898] [ 157.048030] ? show_trace_log_lvl+0x1af/0x2c0 [ 157.052436] ? show_trace_log_lvl+0x1af/0x2c0 [ 157.056836] ? show_trace_log_lvl+0x1af/0x2c0 [ 157.061253] ? drm_gem_shmem_vmap+0x74/0x710 [ 157.065567] ? dma_buf_vmap+0x224/0x430 [ 157.069446] ? __warn.cold+0x58/0xe4 [ 157.073061] ? dma_buf_vmap+0x224/0x430 [ 157.077111] ? report_bug+0x1dd/0x390 [ 157.080842] ? handle_bug+0x5e/0xa0 [ 157.084389] ? exc_invalid_op+0x14/0x50 [ 157.088291] ? asm_exc_invalid_op+0x16/0x20 [ 157.092548] ? dma_buf_vmap+0x224/0x430 [ 157.096663] ? dma_resv_get_singleton+0x6d/0x230 [ 157.101341] ? __pfx_dma_buf_vmap+0x10/0x10 [ 157.105588] ? __pfx_dma_resv_get_singleton+0x10/0x10 [ 157.110697] drm_gem_shmem_vmap+0x74/0x710 [ 157.114866] drm_gem_vmap+0xa9/0x1b0 [ 157.118763] drm_gem_vmap_unlocked+0x46/0xa0 [ 157.123086] drm_gem_fb_vmap+0xab/0x300 [ 157.126979] drm_atomic_helper_prepare_planes.part.0+0x487/0xb10 [ 157.133032] ? lockdep_init_map_type+0x19d/0x880 [ 157.137701] drm_atomic_helper_commit+0x13d/0x2e0 [ 157.142671] ? drm_atomic_nonblocking_commit+0xa0/0x180 [ 157.147988] drm_mode_atomic_ioctl+0x766/0xe40 [...] [ 157.346424] ---[ end trace 0000000000000000 ]--- Acquiring GEM handles for the framebuffer's GEM buffer objects prevents this from happening. The framebuffer's cleanup later puts the handle references. Commit 1a148af06000 ("drm/gem-shmem: Use dma_buf from GEM object instance") triggers the segmentation fault easily by using the dma-buf field more widely. The underlying issue with reference counting has been present before. v2: - acquire the handle instead of the BO (Christian) - fix comment style (Christian) - drop the Fixes tag (Christian) - rename err_ gotos - add missing Link tag Suggested-by: Christian König Signed-off-by: Thomas Zimmermann Link: https://elixir.bootlin.com/linux/v6.15/source/drivers/gpu/drm/drm_gem.c#L241 # [1] Cc: Thomas Zimmermann Cc: Anusha Srivatsa Cc: Christian König Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: Reviewed-by: Christian König Link: https://lore.kernel.org/r/20250630084001.293053-1-tzimmermann@suse.de commit 2ca58d87ebae20906cf808ef813d747db0177a18 Author: Fernando Fernandez Mancera Date: Tue Jun 24 15:11:15 2025 +0200 xfrm: ipcomp: adjust transport header after decompressing The skb transport header pointer needs to be adjusted by network header pointer plus the size of the ipcomp header. This shows up when running traffic over ipcomp using transport mode. After being reinjected, packets are dropped because the header isn't adjusted properly and some checks can be triggered. E.g the skb is mistakenly considered as IP fragmented packet and later dropped. kworker/30:1-mm 443 [030] 102.055250: skb:kfree_skb:skbaddr=0xffff8f104aa3ce00 rx_sk=( ffffffff8419f1f4 sk_skb_reason_drop+0x94 ([kernel.kallsyms]) ffffffff8419f1f4 sk_skb_reason_drop+0x94 ([kernel.kallsyms]) ffffffff84281420 ip_defrag+0x4b0 ([kernel.kallsyms]) ffffffff8428006e ip_local_deliver+0x4e ([kernel.kallsyms]) ffffffff8432afb1 xfrm_trans_reinject+0xe1 ([kernel.kallsyms]) ffffffff83758230 process_one_work+0x190 ([kernel.kallsyms]) ffffffff83758f37 worker_thread+0x2d7 ([kernel.kallsyms]) ffffffff83761cc9 kthread+0xf9 ([kernel.kallsyms]) ffffffff836c3437 ret_from_fork+0x197 ([kernel.kallsyms]) ffffffff836718da ret_from_fork_asm+0x1a ([kernel.kallsyms]) Fixes: eb2953d26971 ("xfrm: ipcomp: Use crypto_acomp interface") Link: https://bugzilla.suse.com/1244532 Signed-off-by: Fernando Fernandez Mancera Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit 3ac9e29211fa2df5539ba0d742c8fe9fe95fdc79 Author: Tobias Brunner Date: Tue Jun 24 14:47:20 2025 +0200 xfrm: Set transport header to fix UDP GRO handling The referenced commit replaced a call to __xfrm4|6_udp_encap_rcv() with a custom check for non-ESP markers. But what the called function also did was setting the transport header to the ESP header. The function that follows, esp4|6_gro_receive(), relies on that being set when it calls xfrm_parse_spi(). We have to set the full offset as the skb's head was not moved yet so adding just the UDP header length won't work. Fixes: e3fd05777685 ("xfrm: Fix UDP GRO handling for some corner cases") Signed-off-by: Tobias Brunner Signed-off-by: Steffen Klassert commit 34a500caf48c47d5171f4aa1f237da39b07c6157 Author: Kohei Enju Date: Sun Jun 29 12:06:31 2025 +0900 rose: fix dangling neighbour pointers in rose_rt_device_down() There are two bugs in rose_rt_device_down() that can cause use-after-free: 1. The loop bound `t->count` is modified within the loop, which can cause the loop to terminate early and miss some entries. 2. When removing an entry from the neighbour array, the subsequent entries are moved up to fill the gap, but the loop index `i` is still incremented, causing the next entry to be skipped. For example, if a node has three neighbours (A, A, B) with count=3 and A is being removed, the second A is not checked. i=0: (A, A, B) -> (A, B) with count=2 ^ checked i=1: (A, B) -> (A, B) with count=2 ^ checked (B, not A!) i=2: (doesn't occur because i < count is false) This leaves the second A in the array with count=2, but the rose_neigh structure has been freed. Code that accesses these entries assumes that the first `count` entries are valid pointers, causing a use-after-free when it accesses the dangling pointer. Fix both issues by iterating over the array in reverse order with a fixed loop bound. This ensures that all entries are examined and that the removal of an entry doesn't affect subsequent iterations. Reported-by: syzbot+e04e2c007ba2c80476cb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e04e2c007ba2c80476cb Tested-by: syzbot+e04e2c007ba2c80476cb@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kohei Enju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250629030833.6680-1-enjuk@amazon.com Signed-off-by: Jakub Kicinski commit aaf2b2480375099c022a82023e1cd772bf1c6a5d Author: Alok Tiwari Date: Sat Jun 28 07:56:05 2025 -0700 enic: fix incorrect MTU comparison in enic_change_mtu() The comparison in enic_change_mtu() incorrectly used the current netdev->mtu instead of the new new_mtu value when warning about an MTU exceeding the port MTU. This could suppress valid warnings or issue incorrect ones. Fix the condition and log to properly reflect the new_mtu. Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly") Signed-off-by: Alok Tiwari Acked-by: John Daley Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250628145612.476096-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit 56448e78a6bb4e1a8528a0e2efe94eff0400c247 Author: Andrew Jeffery Date: Mon Jun 16 22:43:39 2025 +0930 soc: aspeed: lpc-snoop: Don't disable channels that aren't enabled Mitigate e.g. the following: # echo 1e789080.lpc-snoop > /sys/bus/platform/drivers/aspeed-lpc-snoop/unbind ... [ 120.363594] Unable to handle kernel NULL pointer dereference at virtual address 00000004 when write [ 120.373866] [00000004] *pgd=00000000 [ 120.377910] Internal error: Oops: 805 [#1] SMP ARM [ 120.383306] CPU: 1 UID: 0 PID: 315 Comm: sh Not tainted 6.15.0-rc1-00009-g926217bc7d7d-dirty #20 NONE ... [ 120.679543] Call trace: [ 120.679559] misc_deregister from aspeed_lpc_snoop_remove+0x84/0xac [ 120.692462] aspeed_lpc_snoop_remove from platform_remove+0x28/0x38 [ 120.700996] platform_remove from device_release_driver_internal+0x188/0x200 ... Fixes: 9f4f9ae81d0a ("drivers/misc: add Aspeed LPC snoop driver") Cc: stable@vger.kernel.org Cc: Jean Delvare Acked-by: Jean Delvare Link: https://patch.msgid.link/20250616-aspeed-lpc-snoop-fixes-v2-2-3cdd59c934d3@codeconstruct.com.au Signed-off-by: Andrew Jeffery commit 8481d59be606d2338dbfe14b04cdbd1a3402c150 Author: Andrew Jeffery Date: Mon Jun 16 22:43:38 2025 +0930 soc: aspeed: lpc-snoop: Cleanup resources in stack-order Free the kfifo after unregistering the miscdev in aspeed_lpc_disable_snoop() as the kfifo is initialised before the miscdev in aspeed_lpc_enable_snoop(). Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Cc: stable@vger.kernel.org Cc: Jean Delvare Acked-by: Jean Delvare Link: https://patch.msgid.link/20250616-aspeed-lpc-snoop-fixes-v2-1-3cdd59c934d3@codeconstruct.com.au Signed-off-by: Andrew Jeffery commit bf906c988d77d9cdfb52a7d19ad9b183991271a3 Merge: d0b3b7b22dfa1f 39d81457ad3417 Author: Dave Airlie Date: Wed Jul 2 11:17:25 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-07-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.16-2025-07-01: amdgpu: - SDMA 5.x reset fix - Add missing firmware declaration - Fix leak in amdgpu_ctx_mgr_entity_fini() - Freesync fix - OLED backlight fix amdkfd: - mtype fix for ext coherent system memory - MMU notifier fix - gfx7/8 fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250701192642.32490-1-alexander.deucher@amd.com commit 42fd432fe6d320323215ebdf4de4d0d7e56e6792 Author: Raju Rangoju Date: Tue Jul 1 00:56:36 2025 +0530 amd-xgbe: align CL37 AN sequence as per databook Update the Clause 37 Auto-Negotiation implementation to properly align with the PCS hardware specifications: - Fix incorrect bit settings in Link Status and Link Duplex fields - Implement missing sequence steps 2 and 7 These changes ensure CL37 auto-negotiation protocol follows the exact sequence patterns as specified in the hardware databook. Fixes: 1bf40ada6290 ("amd-xgbe: Add support for clause 37 auto-negotiation") Signed-off-by: Raju Rangoju Link: https://patch.msgid.link/20250630192636.3838291-1-Raju.Rangoju@amd.com Signed-off-by: Jakub Kicinski commit e6ed134a4ef592fe1fd0cafac9683813b3c8f3e8 Author: Dan Carpenter Date: Mon Jun 30 14:36:40 2025 -0500 lib: test_objagg: Set error message in check_expect_hints_stats() Smatch complains that the error message isn't set in the caller: lib/test_objagg.c:923 test_hints_case2() error: uninitialized symbol 'errmsg'. This static checker warning only showed up after a recent refactoring but the bug dates back to when the code was originally added. This likely doesn't affect anything in real life. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202506281403.DsuyHFTZ-lkp@intel.com/ Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager") Signed-off-by: Dan Carpenter Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Link: https://patch.msgid.link/8548f423-2e3b-4bb7-b816-5041de2762aa@sabinyo.mountain Signed-off-by: Jakub Kicinski commit 94426e4201fbb1c5ea4a697eb62a8b7cd7dfccbf Author: Kent Overstreet Date: Thu Jun 26 09:46:35 2025 -0400 bcachefs: opts.casefold_disabled Add an option for completely disabling casefolding on a filesystem, as a workaround for overlayfs. This should only be needed as a temporary workaround, until the overlayfs fix arrives. Signed-off-by: Kent Overstreet commit c6e8d51b37d2ca37dee63753fd240bcbc6402ad3 Author: Kent Overstreet Date: Tue Jul 1 13:36:51 2025 -0400 bcachefs: Work around deadlock to btree node rewrites in journal replay Don't mark btree nodes for rewrites, if they are or would be degraded, if journal replay hasn't finished, to avoid a deadlock. This is because btree node rewrites generate more updates for the interior updates (alloc, backpointers), and if those updates touch new nodes and generate more rewrites - we can only have so many interior btree updates in flight before we deadlock on open_buckets. The biggest cause is that we don't use the btree write buffer (for the backpointer updates - this needs some real thought on locking in order to fix. The problem with this workaround (not doing the rewrite for degraded nodes in journal replay) is that those degraded nodes persist, and we don't want that (this is a real bug when a btree node write completes with fewer replicas than we wanted and leaves a degraded node due to device _removal_, i.e. the device went away mid write). It's less of a bug here, but still a problem because we don't yet have a way of tracking degraded data - we another index (all extents/btree nodes, by replicas entry) in order to fix properly (re-replicate degraded data at the earliest possible time). Signed-off-by: Kent Overstreet commit 8af39ec5cf2be522c8eb43a3d8005ed59e4daaee Author: Matthew Brost Date: Fri Jun 13 14:20:13 2025 -0700 drm/sched: Increment job count before swapping tail spsc queue A small race exists between spsc_queue_push and the run-job worker, in which spsc_queue_push may return not-first while the run-job worker has already idled due to the job count being zero. If this race occurs, job scheduling stops, leading to hangs while waiting on the job’s DMA fences. Seal this race by incrementing the job count before appending to the SPSC queue. This race was observed on a drm-tip 6.16-rc1 build with the Xe driver in an SVM test case. Fixes: 1b1f42d8fde4 ("drm: move amd_gpu_scheduler into common location") Fixes: 27105db6c63a ("drm/amdgpu: Add SPSC queue to scheduler.") Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250613212013.719312-1-matthew.brost@intel.com commit bf4807c89d8f92c47404b1e4eeeefb42259d1b50 Author: Paul Chaignon Date: Tue Jul 1 21:48:03 2025 +0200 selftests/bpf: Add negative test cases for snprintf This patch adds a couple negative test cases with a trailing % at the end of the format string. The %p% case was fixed by the previous commit, whereas the %s% case was already successfully rejected before. Acked-by: Yonghong Song Signed-off-by: Paul Chaignon Link: https://lore.kernel.org/r/0669bf6eb4f9e5bb10e949d60311c06e2d942447.1751395489.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov commit f8242745871f81a3ac37f9f51853d12854fd0b58 Author: Paul Chaignon Date: Tue Jul 1 21:47:30 2025 +0200 bpf: Reject %p% format string in bprintf-like helpers static const char fmt[] = "%p%"; bpf_trace_printk(fmt, sizeof(fmt)); The above BPF program isn't rejected and causes a kernel warning at runtime: Please remove unsupported %\x00 in format string WARNING: CPU: 1 PID: 7244 at lib/vsprintf.c:2680 format_decode+0x49c/0x5d0 This happens because bpf_bprintf_prepare skips over the second %, detected as punctuation, while processing %p. This patch fixes it by not skipping over punctuation. %\x00 is then processed in the next iteration and rejected. Reported-by: syzbot+e2c932aec5c8a6e1d31c@syzkaller.appspotmail.com Fixes: 48cac3f4a96d ("bpf: Implement formatted output helpers with bstr_printf") Acked-by: Yonghong Song Signed-off-by: Paul Chaignon Link: https://lore.kernel.org/r/a0e06cc479faec9e802ae51ba5d66420523251ee.1751395489.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov commit aa18d5769fcafe645a3ba01a9a69dde4f8dc8cc3 Author: Harry Austen Date: Fri Jun 27 13:30:35 2025 -0700 drm/xe: Allow dropping kunit dependency as built-in Fix Kconfig symbol dependency on KUNIT, which isn't actually required for XE to be built-in. However, if KUNIT is enabled, it must be built-in too. Fixes: 08987a8b6820 ("drm/xe: Fix build with KUNIT=m") Cc: Lucas De Marchi Cc: Thomas Hellström Cc: Jani Nikula Cc: Maarten Lankhorst Signed-off-by: Harry Austen Reviewed-by: Lucas De Marchi Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20250627-xe-kunit-v2-2-756fe5cd56cf@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit a559434880b320b83733d739733250815aecf1b0) Signed-off-by: Lucas De Marchi commit de6acfdc390ec2eb64d43186721038ddc93228b3 Author: Lucas De Marchi Date: Wed Jun 11 12:38:37 2025 -0700 drm/xe: Fix kconfig prompt The xe driver is the official driver for Intel Xe2 and later, while maintaining experimental support for earlier GPUs. Reword the help message accordingly. Reviewed-by: Maarten Lankhorst Link: https://lore.kernel.org/r/20250611-xe-kconfig-help-v1-1-8bcc6b47d11a@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 1488a3089de3d0bcdc9532da7ce04cf0af9d7dd0) Signed-off-by: Lucas De Marchi commit 84c0b4a00610afbde650fdb8ad6db0424f7b2cc3 Author: Vinay Belgaumkar Date: Wed Jun 18 11:50:01 2025 -0700 drm/xe/bmg: Update Wa_22019338487 Limit GT max frequency to 2600MHz and wait for frequency to reduce before proceeding with a transient flush. This is really only needed for the transient flush: if L2 flush is needed due to 16023588340 then there's no need to do this additional wait since we are already using the bigger hammer. v2: Use generic names, ensure user set max frequency requests wait for flush to complete (Rodrigo) v3: - User requests wait via wait_var_event_timeout (Lucas) - Close races on flush + user requests (Lucas) - Fix xe_guc_pc_remove_flush_freq_limit() being called on last gt rather than root gt (Lucas) v4: - Only apply the freq reducing part if a TDF is needed: L2 flush trumps the need for waiting a lower frequency Fixes: aaa08078e725 ("drm/xe/bmg: Apply Wa_22019338487") Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Link: https://lore.kernel.org/r/20250618-wa-22019338487-v5-4-b888388477f2@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit deea6a7d6d803d6bb874a3e6f1b312e560e6c6df) Signed-off-by: Lucas De Marchi commit a5c7dcdd969f2248cc91d65e5ac852859fc8dac2 Author: Vinay Belgaumkar Date: Thu Jun 12 00:09:02 2025 -0700 drm/xe/bmg: Update Wa_14022085890 Set GT min frequency to 1200Mhz once driver load is complete. v2: Review comments (Rodrigo) v3: Apply Wa earlier so user_req_min is not clobbered. v4: Apply to all GTs (Lucas) Cc: Matt Roper Cc: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Reviewed-by: Stuart Summers Link: https://lore.kernel.org/r/20250612-wa-14022085890-v4-3-94ba5dcc1e30@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit bdde16c9ac5cb56ad2ee19792222fa1853577af7) Signed-off-by: Lucas De Marchi commit a1eec6cae95a1a0888cb8370338822ca81cd9436 Author: Lucas De Marchi Date: Wed Jun 18 11:50:00 2025 -0700 drm/xe: Split xe_device_td_flush() xe_device_td_flush() has 2 possible implementations: an entire L2 flush or a transient flush, depending on WA 16023588340. Make this clear by splitting the function so it calls each of them. Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250618-wa-22019338487-v5-3-b888388477f2@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 5e300ed8a545bdffc26b579c526b5fef7b2d5365) Signed-off-by: Lucas De Marchi commit 4cec9099b93a63eb0b1e8cbbe6419fdaeb72e09b Author: Lucas De Marchi Date: Wed Jun 18 11:49:59 2025 -0700 drm/xe/xe_guc_pc: Lock once to update stashed frequencies pc_set_mert_freq_cap() currently lock()/unlock() the mutex multiple times to stash the current frequencies. It's not a problem since xe_guc_pc_restore_stashed_freq() is guaranteed to be called only later in the init sequence. However, now that we have _locked() variants for this functions, use them and avoid potential issues when called from other places or using the same pattern. While at it, prefer and early return for the WA check to reduce indentation. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250618-wa-22019338487-v5-2-b888388477f2@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit d878c97daa603573e5af01fd8beec2fffdb42ad1) Signed-off-by: Lucas De Marchi commit d8390768dcf6f5a78af56aa03797a076871b01f3 Author: Lucas De Marchi Date: Wed Jun 18 11:49:58 2025 -0700 drm/xe/guc_pc: Add _locked variant for min/max freq There are places in which the getters/setters are called one after the other causing a multiple lock()/unlock(). These are not currently a problem since they are all happening from the same thread, but there's a race possibility as calls are added outside of the early init when the max/min and stashed values need to be correlated. Add the _locked() variants to prepare for that. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250618-wa-22019338487-v5-1-b888388477f2@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 1beae9aa2b88d3a02eb666e7b777eb2d7bc645f4) Signed-off-by: Lucas De Marchi commit 65c1736c8e9d06bfa5cc734b156518ff65926918 Merge: ce95858aeedfd7 d9d79e4f7dc935 Author: Linus Torvalds Date: Tue Jul 1 13:50:21 2025 -0700 Merge tag 'mfd-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: - Fix some -Werror=unused-variable build errors * tag 'mfd-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: Fix building without CONFIG_OF commit afcad92411772a1f361339f22c49f855c6cc7d0f Author: Matthew Brost Date: Wed Jun 11 20:19:25 2025 -0700 drm/xe: Make WA BB part of LRC BO No idea why, but without this GuC context switches randomly fail when running IGTs in a loop. Need to follow up why this fixes the aforementioned issue but can live with a stable driver for now. Fixes: 617d824c5323 ("drm/xe: Add WA BB to capture active context utilization") Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Tested-by: Shuicheng Lin Link: https://lore.kernel.org/r/20250612031925.4009701-1-matthew.brost@intel.com (cherry picked from commit 3a1edef8f4b58b0ba826bc68bf4bce4bdf59ecf3) Signed-off-by: Lucas De Marchi commit ce95858aeedfd7f942e91234b81841eec0260a82 Merge: 66701750d5565c 38074de35b015d Author: Linus Torvalds Date: Tue Jul 1 13:42:30 2025 -0700 Merge tag 'nfs-for-6.16-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: - Fix loop in GSS sequence number cache - Clean up /proc/net/rpc/nfs if nfs_fs_proc_net_init() fails - Fix a race to wake on NFS_LAYOUT_DRAIN - Fix handling of NFS level errors in I/O * tag 'nfs-for-6.16-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4/flexfiles: Fix handling of NFS level errors in I/O NFSv4/pNFS: Fix a race to wake on NFS_LAYOUT_DRAIN nfs: Clean up /proc/net/rpc/nfs when nfs_fs_proc_net_init() fails. sunrpc: fix loop in gss seqno cache commit d5cb81ba929c1b0d02dadd4be27fc1440dd2e014 Merge: 8c44dac8add750 90b3ccf514578c Author: Christian Brauner Date: Tue Jul 1 22:37:20 2025 +0200 Merge patch series "netfs, cifs: Fixes to retry-related code" David Howells says: Here are some miscellaneous fixes and changes for netfslib and cifs, if you could consider pulling them. Many of these were found because a bug in Samba was causing smbd to crash and restart after about 1-2s and this was vigorously and abruptly exercising the netfslib retry paths. Subsequent testing of the cifs RDMA support showed up some more bugs, but the fixes for those went via the cifs tree and have been removed from this set as they're now upstream. First, there are some netfs fixes: (1) Fix a hang due to missing case in final DIO read result collection not breaking out of a loop if the request finished, but there were no subrequests being processed and NETFS_RREQ_ALL_QUEUED wasn't yet set. (2) Fix a double put of the netfs_io_request struct if completion happened in the pause loop. (3) Provide some helpers to abstract out NETFS_RREQ_IN_PROGRESS flag wrangling. (4) Fix infinite looping in netfs_wait_for_pause/request() which wa caused by a loop waiting for NETFS_RREQ_ALL_QUEUED to get set - but which wouldn't get set until the looping function returned. This uses patch (3) above. (5) Fix a ref leak on an extra subrequest inserted into a request's list of subreqs because more subreq records were needed for retrying than were needed for the original request (say, for instance, that the amount of cifs credit available was reduced and, subsequently, the ops had to be smaller). Then a bunch of cifs fixes, some of which are from other people: (6-8) cifs: Fix various RPC callbacks to set NETFS_SREQ_NEED_RETRY if a subrequest fails retriably. (10) Fix a warning in the workqueue code when reconnecting a channel. Followed by some patches to deal with i_size handling: (11) Fix the updating of i_size to use a lock to avoid a race between testing if we should have extended the file with a DIO write and changing i_size. (12) A follow-up patch to (11) to merge the places in netfslib that update i_size on write. And finally a couple of patches to improve tracing output, but that should otherwise not affect functionality: (13) Renumber the NETFS_RREQ_* flags to make the hex values easier to interpret by eye, including moving the main status flags down to the lowest bits, with IN_PROGRESS in bit 0. (14) Update the tracepoints in a number of ways, including adding more tracepoints into the cifs read/write RPC callback so that differend MID_RESPONSE_* values can be differentiated. * patches from https://lore.kernel.org/20250701163852.2171681-1-dhowells@redhat.com: netfs: Update tracepoints in a number of ways netfs: Renumber the NETFS_RREQ_* flags to make traces easier to read netfs: Merge i_size update functions netfs: Fix i_size updating smb: client: set missing retry flag in cifs_writev_callback() smb: client: set missing retry flag in cifs_readv_callback() smb: client: set missing retry flag in smb2_writev_callback() netfs: Fix ref leak on inserted extra subreq in write retry netfs: Fix looping in wait functions netfs: Provide helpers to perform NETFS_RREQ_IN_PROGRESS flag wangling netfs: Fix double put of request netfs: Fix hang due to missing case in final DIO read result collection Link: https://lore.kernel.org/20250701163852.2171681-1-dhowells@redhat.com Signed-off-by: Christian Brauner commit 90b3ccf514578ca3a6ac25db51a29a48e34e0f1b Author: David Howells Date: Tue Jul 1 17:38:48 2025 +0100 netfs: Update tracepoints in a number of ways Make a number of updates to the netfs tracepoints: (1) Remove a duplicate trace from netfs_unbuffered_write_iter_locked(). (2) Move the trace in netfs_wake_rreq_flag() to after the flag is cleared so that the change appears in the trace. (3) Differentiate the use of netfs_rreq_trace_wait/woke_queue symbols. (4) Don't do so many trace emissions in the wait functions as some of them are redundant. (5) In netfs_collect_read_results(), differentiate a subreq that's being abandoned vs one that has been consumed in a regular way. (6) Add a tracepoint to indicate the call to ->ki_complete(). (7) Don't double-increment the subreq_counter when retrying a write. (8) Move the netfs_sreq_trace_io_progress tracepoint within cifs code to just MID_RESPONSE_RECEIVED and add different tracepoints for other MID states and note check failure. Signed-off-by: David Howells Co-developed-by: Paulo Alcantara Signed-off-by: Paulo Alcantara Link: https://lore.kernel.org/20250701163852.2171681-14-dhowells@redhat.com cc: Steve French cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-cifs@vger.kernel.org Signed-off-by: Christian Brauner commit 4e32541076833f5ce2e23523c9faa25f7b2cc96f Author: David Howells Date: Tue Jul 1 17:38:47 2025 +0100 netfs: Renumber the NETFS_RREQ_* flags to make traces easier to read Renumber the NETFS_RREQ_* flags to put the most useful status bits in the bottom nibble - and therefore the last hex digit in the trace output - making it easier to grasp the state at a glance. In particular, put the IN_PROGRESS flag in bit 0 and ALL_QUEUED at bit 1. Also make the flags field in /proc/fs/netfs/requests larger to accommodate all the flags. Also make the flags field in the netfs_sreq tracepoint larger to accommodate all the NETFS_SREQ_* flags. Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-13-dhowells@redhat.com Reviewed-by: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 5e1e6ec2e346c0850f304c31abdef4158007474e Author: David Howells Date: Tue Jul 1 17:38:46 2025 +0100 netfs: Merge i_size update functions Netfslib has two functions for updating the i_size after a write: one for buffered writes into the pagecache and one for direct/unbuffered writes. However, what needs to be done is much the same in both cases, so merge them together. This does raise one question, though: should updating the i_size after a direct write do the same estimated update of i_blocks as is done for buffered writes. Also get rid of the cleanup function pointer from netfs_io_request as it's only used for direct write to update i_size; instead do the i_size setting directly from write collection. Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-12-dhowells@redhat.com cc: Steve French cc: Paulo Alcantara cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 2e0658940d90a3dc130bb3b7f75bae9f4100e01f Author: David Howells Date: Tue Jul 1 17:38:45 2025 +0100 netfs: Fix i_size updating Fix the updating of i_size, particularly in regard to the completion of DIO writes and especially async DIO writes by using a lock. The bug is triggered occasionally by the generic/207 xfstest as it chucks a bunch of AIO DIO writes at the filesystem and then checks that fstat() returns a reasonable st_size as each completes. The problem is that netfs is trying to do "if new_size > inode->i_size, update inode->i_size" sort of thing but without a lock around it. This can be seen with cifs, but shouldn't be seen with kafs because kafs serialises modification ops on the client whereas cifs sends the requests to the server as they're generated and lets the server order them. Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support") Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-11-dhowells@redhat.com Reviewed-by: Paulo Alcantara (Red Hat) cc: Steve French cc: Paulo Alcantara cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 74ee76bea4b445c023d04806e0bcd78a912fd30b Author: Paulo Alcantara Date: Tue Jul 1 17:38:43 2025 +0100 smb: client: set missing retry flag in cifs_writev_callback() Set NETFS_SREQ_NEED_RETRY flag to tell netfslib that the subreq needs to be retried. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-9-dhowells@redhat.com Tested-by: Steve French Cc: linux-cifs@vger.kernel.org Cc: netfs@lists.linux.dev Signed-off-by: Christian Brauner commit 0e60bae24ad28ab06a485698077d3c626f1e54ab Author: Paulo Alcantara Date: Tue Jul 1 17:38:42 2025 +0100 smb: client: set missing retry flag in cifs_readv_callback() Set NETFS_SREQ_NEED_RETRY flag to tell netfslib that the subreq needs to be retried. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-8-dhowells@redhat.com Tested-by: Steve French Cc: linux-cifs@vger.kernel.org Cc: netfs@lists.linux.dev Signed-off-by: Christian Brauner commit e67e75edeb88022c04f8e0a173e1ff6dc688f155 Author: Paulo Alcantara Date: Tue Jul 1 17:38:41 2025 +0100 smb: client: set missing retry flag in smb2_writev_callback() Set NETFS_SREQ_NEED_RETRY flag to tell netfslib that the subreq needs to be retried. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-7-dhowells@redhat.com Tested-by: Steve French Cc: linux-cifs@vger.kernel.org Cc: netfs@lists.linux.dev Signed-off-by: Christian Brauner commit 97d8e8e52cb8ab3d7675880a92626d9a4332f7a6 Author: David Howells Date: Tue Jul 1 17:38:40 2025 +0100 netfs: Fix ref leak on inserted extra subreq in write retry The write-retry algorithm will insert extra subrequests into the list if it can't get sufficient capacity to split the range that needs to be retried into the sequence of subrequests it currently has (for instance, if the cifs credit pool has fewer credits available than it did when the range was originally divided). However, the allocator furnishes each new subreq with 2 refs and then another is added for resubmission, causing one to be leaked. Fix this by replacing the ref-getting line with a neutral trace line. Fixes: 288ace2f57c9 ("netfs: New writeback implementation") Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-6-dhowells@redhat.com Tested-by: Steve French Reviewed-by: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 09623e3a14c1c5465124350cd227457c2b0fb017 Author: David Howells Date: Tue Jul 1 17:38:39 2025 +0100 netfs: Fix looping in wait functions netfs_wait_for_request() and netfs_wait_for_pause() can loop forever if netfs_collect_in_app() returns 2, indicating that it wants to repeat because the ALL_QUEUED flag isn't yet set and there are no subreqs left that haven't been collected. The problem is that, unless collection is offloaded (OFFLOAD_COLLECTION), we have to return to the application thread to continue and eventually set ALL_QUEUED after pausing to deal with a retry - but we never get there. Fix this by inserting checks for the IN_PROGRESS and PAUSE flags as appropriate before cycling round - and add cond_resched() for good measure. Fixes: 2b1424cd131c ("netfs: Fix wait/wake to be consistent about the waitqueue used") Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-5-dhowells@redhat.com Tested-by: Steve French Reviewed-by: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 1a6d45fec33a03ca681eee125ea96987742a893f Author: David Howells Date: Tue Jul 1 17:38:38 2025 +0100 netfs: Provide helpers to perform NETFS_RREQ_IN_PROGRESS flag wangling Provide helpers to clear and test the NETFS_RREQ_IN_PROGRESS and to insert the appropriate barrierage. Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-4-dhowells@redhat.com Tested-by: Steve French Reviewed-by: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 9df7b5ebead649b00bf9a53a798e4bf83a1318fd Author: David Howells Date: Tue Jul 1 17:38:37 2025 +0100 netfs: Fix double put of request If a netfs request finishes during the pause loop, it will have the ref that belongs to the IN_PROGRESS flag removed at that point - however, if it then goes to the final wait loop, that will *also* put the ref because it sees that the IN_PROGRESS flag is clear and incorrectly assumes that this happened when it called the collector. In fact, since IN_PROGRESS is clear, we shouldn't call the collector again since it's done all the cleanup, such as calling ->ki_complete(). Fix this by making netfs_collect_in_app() just return, indicating that we're done if IN_PROGRESS is removed. Fixes: 2b1424cd131c ("netfs: Fix wait/wake to be consistent about the waitqueue used") Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-3-dhowells@redhat.com Tested-by: Steve French Reviewed-by: Paulo Alcantara cc: Steve French cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-cifs@vger.kernel.org Signed-off-by: Christian Brauner commit da8cf4bd458722d090a788c6e581eeb72695c62f Author: David Howells Date: Tue Jul 1 17:38:36 2025 +0100 netfs: Fix hang due to missing case in final DIO read result collection When doing a DIO read, if the subrequests we issue fail and cause the request PAUSE flag to be set to put a pause on subrequest generation, we may complete collection of the subrequests (possibly discarding them) prior to the ALL_QUEUED flags being set. In such a case, netfs_read_collection() doesn't see ALL_QUEUED being set after netfs_collect_read_results() returns and will just return to the app (the collector can be seen unpausing the generator in the trace log). The subrequest generator can then set ALL_QUEUED and the app thread reaches netfs_wait_for_request(). This causes netfs_collect_in_app() to be called to see if we're done yet, but there's missing case here. netfs_collect_in_app() will see that a thread is active and set inactive to false, but won't see any subrequests in the read stream, and so won't set need_collect to true. The function will then just return 0, indicating that the caller should just sleep until further activity (which won't be forthcoming) occurs. Fix this by making netfs_collect_in_app() check to see if an active thread is complete - i.e. that ALL_QUEUED is set and the subrequests list is empty - and to skip the sleep return path. The collector will then be called which will clear the request IN_PROGRESS flag, allowing the app to progress. Fixes: 2b1424cd131c ("netfs: Fix wait/wake to be consistent about the waitqueue used") Reported-by: Steve French Signed-off-by: David Howells Link: https://lore.kernel.org/20250701163852.2171681-2-dhowells@redhat.com Tested-by: Steve French Reviewed-by: Paulo Alcantara cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 8c44dac8add7503c345c0f6c7962e4863b88ba42 Author: Nam Cao Date: Tue May 27 11:08:36 2025 +0200 eventpoll: Fix priority inversion problem The ready event list of an epoll object is protected by read-write semaphore: - The consumer (waiter) acquires the write lock and takes items. - the producer (waker) takes the read lock and adds items. The point of this design is enabling epoll to scale well with large number of producers, as multiple producers can hold the read lock at the same time. Unfortunately, this implementation may cause scheduling priority inversion problem. Suppose the consumer has higher scheduling priority than the producer. The consumer needs to acquire the write lock, but may be blocked by the producer holding the read lock. Since read-write semaphore does not support priority-boosting for the readers (even with CONFIG_PREEMPT_RT=y), we have a case of priority inversion: a higher priority consumer is blocked by a lower priority producer. This problem was reported in [1]. Furthermore, this could also cause stall problem, as described in [2]. To fix this problem, make the event list half-lockless: - The consumer acquires a mutex (ep->mtx) and takes items. - The producer locklessly adds items to the list. Performance is not the main goal of this patch, but as the producer now can add items without waiting for consumer to release the lock, performance improvement is observed using the stress test from https://github.com/rouming/test-tools/blob/master/stress-epoll.c. This is the same test that justified using read-write semaphore in the past. Testing using 12 x86_64 CPUs: Before After Diff threads events/ms events/ms 8 6932 19753 +185% 16 7820 27923 +257% 32 7648 35164 +360% 64 9677 37780 +290% 128 11166 38174 +242% Testing using 1 riscv64 CPU (averaged over 10 runs, as the numbers are noisy): Before After Diff threads events/ms events/ms 1 73 129 +77% 2 151 216 +43% 4 216 364 +69% 8 234 382 +63% 16 251 392 +56% Reported-by: Frederic Weisbecker Closes: https://lore.kernel.org/linux-rt-users/20210825132754.GA895675@lothringen/ [1] Reported-by: Valentin Schneider Closes: https://lore.kernel.org/linux-rt-users/xhsmhttqvnall.mognet@vschneid.remote.csb/ [2] Signed-off-by: Nam Cao Link: https://lore.kernel.org/20250527090836.1290532-1-namcao@linutronix.de Tested-by: K Prateek Nayak Acked-by: Frederic Weisbecker Signed-off-by: Christian Brauner commit 2d5cff2b4bc567dcaad7ab5b46c973ba534cc062 Author: Jia Yao Date: Thu Jun 12 22:46:20 2025 +0000 drm/xe: Fix out-of-bounds field write in MI_STORE_DATA_IMM According to Bspec, bits 0~9 of MI_STORE_DATA_IMM must not exceed 0x3FE. The macro MI_SDI_NUM_QW(x) evaluates to 2 * x + 1, which means the condition 2 * x + 1 <= 0x3FE must be satisfied. Therefore, the maximum valid value for x is 0x1FE, not 0x1FF. v2 - Replace 0x1fe with macro MAX_PTE_PER_SDI (Auld, Matthew & Patelczyk, Maciej) v3 - Change macro MAX_PTE_PER_SDI from 0x1fe to 0x1feU (De Marchi, Lucas) Bspec: 60246 Fixes: 9c44fd5f6e8a ("drm/xe: Add migrate layer functions for SVM support") Cc: Matthew Brost Cc: Brian3 Nguyen Cc: Alex Zuo Cc: Matthew Auld Cc: Maciej Patelczyk Cc: Lucas De Marchi Suggested-by: Shuicheng Lin Signed-off-by: Jia Yao Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Reviewed-by: Maciej Patelczyk Link: https://lore.kernel.org/r/20250612224620.161105-1-jia.yao@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit c038bdba98c9f6a36378044a9d4385531a194d3e) Signed-off-by: Lucas De Marchi commit c584c4f264c3bd7c27247688056a5c77907dbb07 Author: Conor Dooley Date: Mon Jun 30 16:18:17 2025 +0100 i2c: microchip-core: re-fix fake detections w/ i2cdetect Introducing support for smbus re-broke i2cdetect, causing it to detect devices at every i2c address, just as it did prior to being fixed in commit 49e1f0fd0d4cb ("i2c: microchip-core: fix "ghost" detections"). This was caused by an oversight, where the new smbus code failed to check the return value of mchp_corei2c_xfer(). Check it, and propagate any errors. Fixes: d6ceb40538263 ("i2c: microchip-corei2c: add smbus support") Signed-off-by: Conor Dooley Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250630-shopper-proven-500f4075e7d6@spud commit 0325143b59c6c6d79987afc57d2456e7a20d13b7 Author: Vitaly Lifshits Date: Wed Jun 11 15:52:54 2025 +0300 igc: disable L1.2 PCI-E link substate to avoid performance issue I226 devices advertise support for the PCI-E link L1.2 substate. However, due to a hardware limitation, the exit latency from this low-power state is longer than the packet buffer can tolerate under high traffic conditions. This can lead to packet loss and degraded performance. To mitigate this, disable the L1.2 substate. The increased power draw between L1.1 and L1.2 is insignificant. Fixes: 43546211738e ("igc: Add new device ID's") Link: https://lore.kernel.org/intel-wired-lan/15248b4f-3271-42dd-8e35-02bfc92b25e1@intel.com Signed-off-by: Vitaly Lifshits Reviewed-by: Aleksandr Loktionov Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit b2beb5bb2cd90d7939e470ed4da468683f41baa3 Author: Ahmed Zaki Date: Fri May 23 14:55:37 2025 -0600 idpf: convert control queue mutex to a spinlock With VIRTCHNL2_CAP_MACFILTER enabled, the following warning is generated on module load: [ 324.701677] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:578 [ 324.701684] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1582, name: NetworkManager [ 324.701689] preempt_count: 201, expected: 0 [ 324.701693] RCU nest depth: 0, expected: 0 [ 324.701697] 2 locks held by NetworkManager/1582: [ 324.701702] #0: ffffffff9f7be770 (rtnl_mutex){....}-{3:3}, at: rtnl_newlink+0x791/0x21e0 [ 324.701730] #1: ff1100216c380368 (_xmit_ETHER){....}-{2:2}, at: __dev_open+0x3f0/0x870 [ 324.701749] Preemption disabled at: [ 324.701752] [] __dev_open+0x3dd/0x870 [ 324.701765] CPU: 30 UID: 0 PID: 1582 Comm: NetworkManager Not tainted 6.15.0-rc5+ #2 PREEMPT(voluntary) [ 324.701771] Hardware name: Intel Corporation M50FCP2SBSTD/M50FCP2SBSTD, BIOS SE5C741.86B.01.01.0001.2211140926 11/14/2022 [ 324.701774] Call Trace: [ 324.701777] [ 324.701779] dump_stack_lvl+0x5d/0x80 [ 324.701788] ? __dev_open+0x3dd/0x870 [ 324.701793] __might_resched.cold+0x1ef/0x23d <..> [ 324.701818] __mutex_lock+0x113/0x1b80 <..> [ 324.701917] idpf_ctlq_clean_sq+0xad/0x4b0 [idpf] [ 324.701935] ? kasan_save_track+0x14/0x30 [ 324.701941] idpf_mb_clean+0x143/0x380 [idpf] <..> [ 324.701991] idpf_send_mb_msg+0x111/0x720 [idpf] [ 324.702009] idpf_vc_xn_exec+0x4cc/0x990 [idpf] [ 324.702021] ? rcu_is_watching+0x12/0xc0 [ 324.702035] idpf_add_del_mac_filters+0x3ed/0xb50 [idpf] <..> [ 324.702122] __hw_addr_sync_dev+0x1cf/0x300 [ 324.702126] ? find_held_lock+0x32/0x90 [ 324.702134] idpf_set_rx_mode+0x317/0x390 [idpf] [ 324.702152] __dev_open+0x3f8/0x870 [ 324.702159] ? __pfx___dev_open+0x10/0x10 [ 324.702174] __dev_change_flags+0x443/0x650 <..> [ 324.702208] netif_change_flags+0x80/0x160 [ 324.702218] do_setlink.isra.0+0x16a0/0x3960 <..> [ 324.702349] rtnl_newlink+0x12fd/0x21e0 The sequence is as follows: rtnl_newlink()-> __dev_change_flags()-> __dev_open()-> dev_set_rx_mode() - > # disables BH and grabs "dev->addr_list_lock" idpf_set_rx_mode() -> # proceed only if VIRTCHNL2_CAP_MACFILTER is ON __dev_uc_sync() -> idpf_add_mac_filter -> idpf_add_del_mac_filters -> idpf_send_mb_msg() -> idpf_mb_clean() -> idpf_ctlq_clean_sq() # mutex_lock(cq_lock) Fix by converting cq_lock to a spinlock. All operations under the new lock are safe except freeing the DMA memory, which may use vunmap(). Fix by requesting a contiguous physical memory for the DMA mapping. Fixes: a251eee62133 ("idpf: add SRIOV support and other ndo_ops") Reviewed-by: Aleksandr Loktionov Signed-off-by: Ahmed Zaki Reviewed-by: Simon Horman Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit f77bf1ebf8ff6301ccdbc346f7b52db928f9cbf8 Author: Michal Swiatkowski Date: Thu May 22 10:52:06 2025 +0200 idpf: return 0 size for RSS key if not supported Returning -EOPNOTSUPP from function returning u32 is leading to cast and invalid size value as a result. -EOPNOTSUPP as a size probably will lead to allocation fail. Command: ethtool -x eth0 It is visible on all devices that don't have RSS caps set. [ 136.615917] Call Trace: [ 136.615921] [ 136.615927] ? __warn+0x89/0x130 [ 136.615942] ? __alloc_frozen_pages_noprof+0x322/0x330 [ 136.615953] ? report_bug+0x164/0x190 [ 136.615968] ? handle_bug+0x58/0x90 [ 136.615979] ? exc_invalid_op+0x17/0x70 [ 136.615987] ? asm_exc_invalid_op+0x1a/0x20 [ 136.616001] ? rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616016] ? __alloc_frozen_pages_noprof+0x322/0x330 [ 136.616028] __alloc_pages_noprof+0xe/0x20 [ 136.616038] ___kmalloc_large_node+0x80/0x110 [ 136.616072] __kmalloc_large_node_noprof+0x1d/0xa0 [ 136.616081] __kmalloc_noprof+0x32c/0x4c0 [ 136.616098] ? rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616105] rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616114] ethnl_default_doit+0x107/0x3d0 [ 136.616131] genl_family_rcv_msg_doit+0x100/0x160 [ 136.616147] genl_rcv_msg+0x1b8/0x2c0 [ 136.616156] ? __pfx_ethnl_default_doit+0x10/0x10 [ 136.616168] ? __pfx_genl_rcv_msg+0x10/0x10 [ 136.616176] netlink_rcv_skb+0x58/0x110 [ 136.616186] genl_rcv+0x28/0x40 [ 136.616195] netlink_unicast+0x19b/0x290 [ 136.616206] netlink_sendmsg+0x222/0x490 [ 136.616215] __sys_sendto+0x1fd/0x210 [ 136.616233] __x64_sys_sendto+0x24/0x30 [ 136.616242] do_syscall_64+0x82/0x160 [ 136.616252] ? __sys_recvmsg+0x83/0xe0 [ 136.616265] ? syscall_exit_to_user_mode+0x10/0x210 [ 136.616275] ? do_syscall_64+0x8e/0x160 [ 136.616282] ? __count_memcg_events+0xa1/0x130 [ 136.616295] ? count_memcg_events.constprop.0+0x1a/0x30 [ 136.616306] ? handle_mm_fault+0xae/0x2d0 [ 136.616319] ? do_user_addr_fault+0x379/0x670 [ 136.616328] ? clear_bhb_loop+0x45/0xa0 [ 136.616340] ? clear_bhb_loop+0x45/0xa0 [ 136.616349] ? clear_bhb_loop+0x45/0xa0 [ 136.616359] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 136.616369] RIP: 0033:0x7fd30ba7b047 [ 136.616376] Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 80 3d bd d5 0c 00 00 41 89 ca 74 10 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 71 c3 55 48 83 ec 30 44 89 4c 24 2c 4c 89 44 [ 136.616381] RSP: 002b:00007ffde1796d68 EFLAGS: 00000202 ORIG_RAX: 000000000000002c [ 136.616388] RAX: ffffffffffffffda RBX: 000055d7bd89f2a0 RCX: 00007fd30ba7b047 [ 136.616392] RDX: 0000000000000028 RSI: 000055d7bd89f3b0 RDI: 0000000000000003 [ 136.616396] RBP: 00007ffde1796e10 R08: 00007fd30bb4e200 R09: 000000000000000c [ 136.616399] R10: 0000000000000000 R11: 0000000000000202 R12: 000055d7bd89f340 [ 136.616403] R13: 000055d7bd89f3b0 R14: 000055d78943f200 R15: 0000000000000000 Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks") Reviewed-by: Ahmed Zaki Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 0d519bb0de3bf0ac9e6f401d4910fc119062d7be Author: Yu Kuai Date: Mon Jun 30 19:28:28 2025 +0800 brd: fix sleeping function called from invalid context in brd_insert_page() __xa_cmpxchg() is called with rcu_read_lock(), and it will allocate memory if necessary. Fix the problem by moving rcu_read_lock() after __xa_cmpxchg(), meanwhile, it still should be held before xa_unlock(), prevent returned page to be freed by concurrent discard. Fixes: bbcacab2e8ee ("brd: avoid extra xarray lookups on first write") Reported-by: syzbot+ea4c8fd177a47338881a@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/685ec4c9.a00a0220.129264.000c.GAE@google.com/ Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250630112828.421219-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 61f1065272ea3721c20c4c0a6877d346b0e237c3 Author: Richard Zhu Date: Mon Jun 9 17:11:27 2025 +0800 arm64: dts: imx95: Correct the DMA interrupter number of pcie0_ep Correct the DMA interrupter number of pcie0_ep from 317 to 311. Fixes: 3b1d5deb29ff ("arm64: dts: imx95: add pcie[0,1] and pcie-ep[0,1] support") Signed-off-by: Richard Zhu Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 01ed88aea527e19def9070349399684522c66c72 Author: Ming Lei Date: Tue Jul 1 15:23:25 2025 +0800 ublk: don't queue request if the associated uring_cmd is canceled Commit 524346e9d79f ("ublk: build batch from IOs in same io_ring_ctx and io task") need to dereference `io->cmd` for checking if the IO can be added to current batch, see ublk_belong_to_same_batch() and io_uring_cmd_ctx_handle(). However, `io->cmd` may become invalid after the uring_cmd is canceled. Fixes it by only allowing to queue this IO in case that ublk_prep_req() returns `BLK_STS_OK`, when 'io->cmd' is guaranteed to be valid. Reported-by: Changhui Zhong Fixes: 524346e9d79f ("ublk: build batch from IOs in same io_ring_ctx and io task") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250701072325.1458109-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 04a8ff1bc3514808481ddebd454342ad902a3f60 Author: Khairul Anuar Romli Date: Mon Jun 30 17:11:56 2025 +0800 spi: cadence-quadspi: fix cleanup of rx_chan on failure paths Remove incorrect checks on cqspi->rx_chan that cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating in cqspi->use_direct_mode, preventing leaks and improving stability. Signed-off-by: Khairul Anuar Romli Reviewed-by: Dan Carpenter Link: https://patch.msgid.link/89765a2b94f047ded4f14babaefb7ef92ba07cb2.1751274389.git.khairul.anuar.romli@altera.com Signed-off-by: Mark Brown commit 9a57c3773152a3ff2c35cc8325e088d011c9f83b Author: Sebastian Andrzej Siewior Date: Mon Jun 30 16:50:34 2025 +0200 futex: Temporary disable FUTEX_PRIVATE_HASH Chris Mason reported a performance regression on big iron. Reports of this kind were usually reported as part of a micro benchmark but Chris' test did mimic his real workload. This makes it a real regression. The root cause is rcuref_get() which is invoked during each futex operation. If all threads of an application do this simultaneously then it leads to cache line bouncing and the performance drops. Disable FUTEX_PRIVATE_HASH entirely for this cycle. The performance regression will be addressed in the following cycle enabling the option again. Closes: https://lore.kernel.org/all/3ad05298-351e-4d61-9972-ca45a0a50e33@meta.com/ Reported-by: Chris Mason Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250630145034.8JnINEaS@linutronix.de commit ccdd09e0fc0d5ce6dfc8360f0c88da9a5045b6ea Author: Heiko Carstens Date: Mon Jun 30 15:12:30 2025 +0200 objtool: Add missing endian conversion to read_annotate() Trying to compile an x86 kernel on big endian results in this error: net/ipv4/netfilter/iptable_nat.o: warning: objtool: iptable_nat_table_init+0x150: Unknown annotation type: 50331648 make[5]: *** [scripts/Makefile.build:287: net/ipv4/netfilter/iptable_nat.o] Error 255 Reason is a missing endian conversion in read_annotate(). Add the missing conversion to fix this. Fixes: 2116b349e29a ("objtool: Generic annotation infrastructure") Signed-off-by: Heiko Carstens Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250630131230.4130185-1-hca@linux.ibm.com commit 009836b4fa52f92cba33618e773b1094affa8cd2 Author: Peter Zijlstra Date: Thu Jun 5 12:00:09 2025 +0200 sched/core: Fix migrate_swap() vs. hotplug On Mon, Jun 02, 2025 at 03:22:13PM +0800, Kuyo Chang wrote: > So, the potential race scenario is: > > CPU0 CPU1 > // doing migrate_swap(cpu0/cpu1) > stop_two_cpus() > ... > // doing _cpu_down() > sched_cpu_deactivate() > set_cpu_active(cpu, false); > balance_push_set(cpu, true); > cpu_stop_queue_two_works > __cpu_stop_queue_work(stopper1,...); > __cpu_stop_queue_work(stopper2,..); > stop_cpus_in_progress -> true > preempt_enable(); > ... > 1st balance_push > stop_one_cpu_nowait > cpu_stop_queue_work > __cpu_stop_queue_work > list_add_tail -> 1st add push_work > wake_up_q(&wakeq); -> "wakeq is empty. > This implies that the stopper is at wakeq@migrate_swap." > preempt_disable > wake_up_q(&wakeq); > wake_up_process // wakeup migrate/0 > try_to_wake_up > ttwu_queue > ttwu_queue_cond ->meet below case > if (cpu == smp_processor_id()) > return false; > ttwu_do_activate > //migrate/0 wakeup done > wake_up_process // wakeup migrate/1 > try_to_wake_up > ttwu_queue > ttwu_queue_cond > ttwu_queue_wakelist > __ttwu_queue_wakelist > __smp_call_single_queue > preempt_enable(); > > 2nd balance_push > stop_one_cpu_nowait > cpu_stop_queue_work > __cpu_stop_queue_work > list_add_tail -> 2nd add push_work, so the double list add is detected > ... > ... > cpu1 get ipi, do sched_ttwu_pending, wakeup migrate/1 > So this balance_push() is part of schedule(), and schedule() is supposed to switch to stopper task, but because of this race condition, stopper task is stuck in WAKING state and not actually visible to be picked. Therefore CPU1 can do another schedule() and end up doing another balance_push() even though the last one hasn't been done yet. This is a confluence of fail, where both wake_q and ttwu_wakelist can cause crucial wakeups to be delayed, resulting in the malfunction of balance_push. Since there is only a single stopper thread to be woken, the wake_q doesn't really add anything here, and can be removed in favour of direct wakeups of the stopper thread. Then add a clause to ttwu_queue_cond() to ensure the stopper threads are never queued / delayed. Of all 3 moving parts, the last addition was the balance_push() machinery, so pick that as the point the bug was introduced. Fixes: 2558aacff858 ("sched/hotplug: Ensure only per-cpu kthreads run during hotplug") Reported-by: Kuyo Chang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kuyo Chang Link: https://lkml.kernel.org/r/20250605100009.GO39944@noisy.programming.kicks-ass.net commit 3ebb1b6522392f64902b4e96954e35927354aa27 Author: Thomas Weißschuh Date: Thu Jun 26 11:23:44 2025 +0200 sched: Fix preemption string of preempt_dynamic_none Zero is a valid value for "preempt_dynamic_mode", namely "preempt_dynamic_none". Fix the off-by-one in preempt_model_str(), so that "preempty_dynamic_none" is correctly formatted as PREEMPT(none) instead of PREEMPT(undef). Fixes: 8bdc5daaa01e ("sched: Add a generic function to return the preemption string") Signed-off-by: Thomas Weißschuh Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sebastian Andrzej Siewior Tested-by: Shrikanth Hegde Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250626-preempt-str-none-v2-1-526213b70a89@linutronix.de commit d6811074203b13f715ce2480ac64c5b1c773f2a5 Author: Geliang Tang Date: Mon Jun 30 15:48:32 2025 +0800 nvme-multipath: fix suspicious RCU usage warning When I run the NVME over TCP test in virtme-ng, I get the following "suspicious RCU usage" warning in nvme_mpath_add_sysfs_link(): ''' [ 5.024557][ T44] nvmet: Created nvm controller 1 for subsystem nqn.2025-06.org.nvmexpress.mptcp for NQN nqn.2014-08.org.nvmexpress:uuid:f7f6b5e0-ff97-4894-98ac-c85309e0bc77. [ 5.027401][ T183] nvme nvme0: creating 2 I/O queues. [ 5.029017][ T183] nvme nvme0: mapped 2/0/0 default/read/poll queues. [ 5.032587][ T183] nvme nvme0: new ctrl: NQN "nqn.2025-06.org.nvmexpress.mptcp", addr 127.0.0.1:4420, hostnqn: nqn.2014-08.org.nvmexpress:uuid:f7f6b5e0-ff97-4894-98ac-c85309e0bc77 [ 5.042214][ T25] [ 5.042440][ T25] ============================= [ 5.042579][ T25] WARNING: suspicious RCU usage [ 5.042705][ T25] 6.16.0-rc3+ #23 Not tainted [ 5.042812][ T25] ----------------------------- [ 5.042934][ T25] drivers/nvme/host/multipath.c:1203 RCU-list traversed in non-reader section!! [ 5.043111][ T25] [ 5.043111][ T25] other info that might help us debug this: [ 5.043111][ T25] [ 5.043341][ T25] [ 5.043341][ T25] rcu_scheduler_active = 2, debug_locks = 1 [ 5.043502][ T25] 3 locks held by kworker/u9:0/25: [ 5.043615][ T25] #0: ffff888008730948 ((wq_completion)async){+.+.}-{0:0}, at: process_one_work+0x7ed/0x1350 [ 5.043830][ T25] #1: ffffc900001afd40 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0xcf3/0x1350 [ 5.044084][ T25] #2: ffff888013ee0020 (&head->srcu){.+.+}-{0:0}, at: nvme_mpath_add_sysfs_link.part.0+0xb4/0x3a0 [ 5.044300][ T25] [ 5.044300][ T25] stack backtrace: [ 5.044439][ T25] CPU: 0 UID: 0 PID: 25 Comm: kworker/u9:0 Not tainted 6.16.0-rc3+ #23 PREEMPT(full) [ 5.044441][ T25] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 5.044442][ T25] Workqueue: async async_run_entry_fn [ 5.044445][ T25] Call Trace: [ 5.044446][ T25] [ 5.044449][ T25] dump_stack_lvl+0x6f/0xb0 [ 5.044453][ T25] lockdep_rcu_suspicious.cold+0x4f/0xb1 [ 5.044457][ T25] nvme_mpath_add_sysfs_link.part.0+0x2fb/0x3a0 [ 5.044459][ T25] ? queue_work_on+0x90/0xf0 [ 5.044461][ T25] ? lockdep_hardirqs_on+0x78/0x110 [ 5.044466][ T25] nvme_mpath_set_live+0x1e9/0x4f0 [ 5.044470][ T25] nvme_mpath_add_disk+0x240/0x2f0 [ 5.044472][ T25] ? __pfx_nvme_mpath_add_disk+0x10/0x10 [ 5.044475][ T25] ? add_disk_fwnode+0x361/0x580 [ 5.044480][ T25] nvme_alloc_ns+0x81c/0x17c0 [ 5.044483][ T25] ? kasan_quarantine_put+0x104/0x240 [ 5.044487][ T25] ? __pfx_nvme_alloc_ns+0x10/0x10 [ 5.044495][ T25] ? __pfx_nvme_find_get_ns+0x10/0x10 [ 5.044496][ T25] ? rcu_read_lock_any_held+0x45/0xa0 [ 5.044498][ T25] ? validate_chain+0x232/0x4f0 [ 5.044503][ T25] nvme_scan_ns+0x4c8/0x810 [ 5.044506][ T25] ? __pfx_nvme_scan_ns+0x10/0x10 [ 5.044508][ T25] ? find_held_lock+0x2b/0x80 [ 5.044512][ T25] ? ktime_get+0x16d/0x220 [ 5.044517][ T25] ? kvm_clock_get_cycles+0x18/0x30 [ 5.044520][ T25] ? __pfx_nvme_scan_ns_async+0x10/0x10 [ 5.044522][ T25] async_run_entry_fn+0x97/0x560 [ 5.044523][ T25] ? rcu_is_watching+0x12/0xc0 [ 5.044526][ T25] process_one_work+0xd3c/0x1350 [ 5.044532][ T25] ? __pfx_process_one_work+0x10/0x10 [ 5.044536][ T25] ? assign_work+0x16c/0x240 [ 5.044539][ T25] worker_thread+0x4da/0xd50 [ 5.044545][ T25] ? __pfx_worker_thread+0x10/0x10 [ 5.044546][ T25] kthread+0x356/0x5c0 [ 5.044548][ T25] ? __pfx_kthread+0x10/0x10 [ 5.044549][ T25] ? ret_from_fork+0x1b/0x2e0 [ 5.044552][ T25] ? __lock_release.isra.0+0x5d/0x180 [ 5.044553][ T25] ? ret_from_fork+0x1b/0x2e0 [ 5.044555][ T25] ? rcu_is_watching+0x12/0xc0 [ 5.044557][ T25] ? __pfx_kthread+0x10/0x10 [ 5.044559][ T25] ret_from_fork+0x218/0x2e0 [ 5.044561][ T25] ? __pfx_kthread+0x10/0x10 [ 5.044562][ T25] ret_from_fork_asm+0x1a/0x30 [ 5.044570][ T25] ''' This patch uses sleepable RCU version of helper list_for_each_entry_srcu() instead of list_for_each_entry_rcu() to fix it. Fixes: 4dbd2b2ebe4c ("nvme-multipath: Add visibility for round-robin io-policy") Signed-off-by: Geliang Tang Reviewed-by: Keith Busch Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Christoph Hellwig commit 8cadce97bf264ed478669c6f32d5603b34608335 Author: Junxiao Chang Date: Fri Apr 25 23:11:07 2025 +0800 drm/i915/gsc: mei interrupt top half should be in irq disabled context MEI GSC interrupt comes from i915. It has top half and bottom half. Top half is called from i915 interrupt handler. It should be in irq disabled context. With RT kernel, by default i915 IRQ handler is in threaded IRQ. MEI GSC top half might be in threaded IRQ context. generic_handle_irq_safe API could be called from either IRQ or process context, it disables local IRQ then calls MEI GSC interrupt top half. This change fixes A380/A770 GPU boot hang issue with RT kernel. Fixes: 1e3dc1d8622b ("drm/i915/gsc: add gsc as a mei auxiliary device") Tested-by: Furong Zhou Suggested-by: Sebastian Andrzej Siewior Acked-by: Sebastian Andrzej Siewior Signed-off-by: Junxiao Chang Link: https://lore.kernel.org/r/20250425151108.643649-1-junxiao.chang@intel.com Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi (cherry picked from commit dccf655f69002d496a527ba441b4f008aa5bebbf) Signed-off-by: Joonas Lahtinen commit a5aa7bc1fca78c7fa127d9e33aa94a0c9066c1d6 Author: Janusz Krzysztofik Date: Wed Jun 11 12:42:13 2025 +0200 drm/i915/gt: Fix timeline left held on VMA alloc error The following error has been reported sporadically by CI when a test unbinds the i915 driver on a ring submission platform: <4> [239.330153] ------------[ cut here ]------------ <4> [239.330166] i915 0000:00:02.0: [drm] drm_WARN_ON(dev_priv->mm.shrink_count) <4> [239.330196] WARNING: CPU: 1 PID: 18570 at drivers/gpu/drm/i915/i915_gem.c:1309 i915_gem_cleanup_early+0x13e/0x150 [i915] ... <4> [239.330640] RIP: 0010:i915_gem_cleanup_early+0x13e/0x150 [i915] ... <4> [239.330942] Call Trace: <4> [239.330944] <4> [239.330949] i915_driver_late_release+0x2b/0xa0 [i915] <4> [239.331202] i915_driver_release+0x86/0xa0 [i915] <4> [239.331482] devm_drm_dev_init_release+0x61/0x90 <4> [239.331494] devm_action_release+0x15/0x30 <4> [239.331504] release_nodes+0x3d/0x120 <4> [239.331517] devres_release_all+0x96/0xd0 <4> [239.331533] device_unbind_cleanup+0x12/0x80 <4> [239.331543] device_release_driver_internal+0x23a/0x280 <4> [239.331550] ? bus_find_device+0xa5/0xe0 <4> [239.331563] device_driver_detach+0x14/0x20 ... <4> [357.719679] ---[ end trace 0000000000000000 ]--- If the test also unloads the i915 module then that's followed with: <3> [357.787478] ============================================================================= <3> [357.788006] BUG i915_vma (Tainted: G U W N ): Objects remaining on __kmem_cache_shutdown() <3> [357.788031] ----------------------------------------------------------------------------- <3> [357.788204] Object 0xffff888109e7f480 @offset=29824 <3> [357.788670] Allocated in i915_vma_instance+0xee/0xc10 [i915] age=292729 cpu=4 pid=2244 <4> [357.788994] i915_vma_instance+0xee/0xc10 [i915] <4> [357.789290] init_status_page+0x7b/0x420 [i915] <4> [357.789532] intel_engines_init+0x1d8/0x980 [i915] <4> [357.789772] intel_gt_init+0x175/0x450 [i915] <4> [357.790014] i915_gem_init+0x113/0x340 [i915] <4> [357.790281] i915_driver_probe+0x847/0xed0 [i915] <4> [357.790504] i915_pci_probe+0xe6/0x220 [i915] ... Closer analysis of CI results history has revealed a dependency of the error on a few IGT tests, namely: - igt@api_intel_allocator@fork-simple-stress-signal, - igt@api_intel_allocator@two-level-inception-interruptible, - igt@gem_linear_blits@interruptible, - igt@prime_mmap_coherency@ioctl-errors, which invisibly trigger the issue, then exhibited with first driver unbind attempt. All of the above tests perform actions which are actively interrupted with signals. Further debugging has allowed to narrow that scope down to DRM_IOCTL_I915_GEM_EXECBUFFER2, and ring_context_alloc(), specific to ring submission, in particular. If successful then that function, or its execlists or GuC submission equivalent, is supposed to be called only once per GEM context engine, followed by raise of a flag that prevents the function from being called again. The function is expected to unwind its internal errors itself, so it may be safely called once more after it returns an error. In case of ring submission, the function first gets a reference to the engine's legacy timeline and then allocates a VMA. If the VMA allocation fails, e.g. when i915_vma_instance() called from inside is interrupted with a signal, then ring_context_alloc() fails, leaving the timeline held referenced. On next I915_GEM_EXECBUFFER2 IOCTL, another reference to the timeline is got, and only that last one is put on successful completion. As a consequence, the legacy timeline, with its underlying engine status page's VMA object, is still held and not released on driver unbind. Get the legacy timeline only after successful allocation of the context engine's VMA. v2: Add a note on other submission methods (Krzysztof Karas): Both execlists and GuC submission use lrc_alloc() which seems free from a similar issue. Fixes: 75d0a7f31eec ("drm/i915: Lift timeline into intel_context") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061 Cc: Chris Wilson Cc: Matthew Auld Cc: Krzysztof Karas Reviewed-by: Sebastian Brzezinka Reviewed-by: Krzysztof Niemiec Signed-off-by: Janusz Krzysztofik Reviewed-by: Nitin Gote Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250611104352.1014011-2-janusz.krzysztofik@linux.intel.com (cherry picked from commit cc43422b3cc79eacff4c5a8ba0d224688ca9dd4f) Signed-off-by: Joonas Lahtinen commit 7dfede7d7edd18c0c91ca854cde8eaaf4ccf97ea Author: Marko Kiiskila Date: Wed Jun 18 15:29:26 2025 -0400 drm/vmwgfx: Fix guests running with TDX/SEV Commit 81256a50aa0f ("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default") changed the default behavior of memremap(MEMREMAP_WB) and started mapping memory as encrypted. The driver requires the fifo memory to be decrypted to communicate with the host but was relaying on the old default behavior of memremap(MEMREMAP_WB) and thus broke. Fix it by explicitly specifying the desired behavior and passing MEMREMAP_DEC to memremap. Fixes: 81256a50aa0f ("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default") Signed-off-by: Marko Kiiskila Signed-off-by: Zack Rusin Cc: Kirill A. Shutemov Cc: Ingo Molnar Cc: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Acked-by: Kirill A. Shutemov Link: https://lore.kernel.org/r/20250618192926.1092450-1-zack.rusin@broadcom.com commit 72fb83735c71e3f6f025ab7f5dbfec7c9e26b6cc Merge: 3b2c45cb1b5080 89fb8acc388521 Author: Jakub Kicinski Date: Mon Jun 30 18:58:47 2025 -0700 Merge tag 'for-net-2025-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - MGMT: set_mesh: update LE scan interval and window - MGMT: mesh_send: check instances prior disabling advertising - hci_sync: revert some mesh modifications - hci_sync: Set extended advertising data synchronously - hci_sync: Prevent unintended pause by checking if advertising is active * tag 'for-net-2025-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: HCI: Set extended advertising data synchronously Bluetooth: MGMT: mesh_send: check instances prior disabling advertising Bluetooth: MGMT: set_mesh: update LE scan interval and window Bluetooth: hci_sync: revert some mesh modifications Bluetooth: Prevent unintended pause by checking if advertising is active ==================== Link: https://patch.msgid.link/20250627181601.520435-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 3b2c45cb1b508014cee59cbabb1fc936f2f2dd3f Author: Lukas Bulwahn Date: Fri Jun 27 15:44:53 2025 +0200 MAINTAINERS: adjust file entry after renaming rzv2h-gbeth dtb Commit d53320aeef18 ("dt-bindings: net: Rename renesas,r9a09g057-gbeth.yaml") renames the net devicetree binding renesas,r9a09g057-gbeth.yaml to renesas,rzv2h-gbeth.yaml, but misses to adjust the file entry in the RENESAS RZ/V2H(P) DWMAC GBETH GLUE LAYER DRIVER section in MAINTAINERS. Adjust the file entry after this file renaming. Signed-off-by: Lukas Bulwahn Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Lad Prabhakar Link: https://patch.msgid.link/20250627134453.51780-1-lukas.bulwahn@redhat.com Signed-off-by: Jakub Kicinski commit 6c7ffc9af7186ed79403a3ffee9a1e5199fc7450 Author: Oleksij Rempel Date: Fri Jun 27 07:13:46 2025 +0200 net: usb: lan78xx: fix WARN in __netif_napi_del_locked on disconnect Remove redundant netif_napi_del() call from disconnect path. A WARN may be triggered in __netif_napi_del_locked() during USB device disconnect: WARNING: CPU: 0 PID: 11 at net/core/dev.c:7417 __netif_napi_del_locked+0x2b4/0x350 This happens because netif_napi_del() is called in the disconnect path while NAPI is still enabled. However, it is not necessary to call netif_napi_del() explicitly, since unregister_netdev() will handle NAPI teardown automatically and safely. Removing the redundant call avoids triggering the warning. Full trace: lan78xx 1-1:1.0 enu1: Failed to read register index 0x000000c4. ret = -ENODEV lan78xx 1-1:1.0 enu1: Failed to set MAC down with error -ENODEV lan78xx 1-1:1.0 enu1: Link is Down lan78xx 1-1:1.0 enu1: Failed to read register index 0x00000120. ret = -ENODEV ------------[ cut here ]------------ WARNING: CPU: 0 PID: 11 at net/core/dev.c:7417 __netif_napi_del_locked+0x2b4/0x350 Modules linked in: flexcan can_dev fuse CPU: 0 UID: 0 PID: 11 Comm: kworker/0:1 Not tainted 6.16.0-rc2-00624-ge926949dab03 #9 PREEMPT Hardware name: SKOV IMX8MP CPU revC - bd500 (DT) Workqueue: usb_hub_wq hub_event pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __netif_napi_del_locked+0x2b4/0x350 lr : __netif_napi_del_locked+0x7c/0x350 sp : ffffffc085b673c0 x29: ffffffc085b673c0 x28: ffffff800b7f2000 x27: ffffff800b7f20d8 x26: ffffff80110bcf58 x25: ffffff80110bd978 x24: 1ffffff0022179eb x23: ffffff80110bc000 x22: ffffff800b7f5000 x21: ffffff80110bc000 x20: ffffff80110bcf38 x19: ffffff80110bcf28 x18: dfffffc000000000 x17: ffffffc081578940 x16: ffffffc08284cee0 x15: 0000000000000028 x14: 0000000000000006 x13: 0000000000040000 x12: ffffffb0022179e8 x11: 1ffffff0022179e7 x10: ffffffb0022179e7 x9 : dfffffc000000000 x8 : 0000004ffdde8619 x7 : ffffff80110bcf3f x6 : 0000000000000001 x5 : ffffff80110bcf38 x4 : ffffff80110bcf38 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 1ffffff0022179e7 x0 : 0000000000000000 Call trace: __netif_napi_del_locked+0x2b4/0x350 (P) lan78xx_disconnect+0xf4/0x360 usb_unbind_interface+0x158/0x718 device_remove+0x100/0x150 device_release_driver_internal+0x308/0x478 device_release_driver+0x1c/0x30 bus_remove_device+0x1a8/0x368 device_del+0x2e0/0x7b0 usb_disable_device+0x244/0x540 usb_disconnect+0x220/0x758 hub_event+0x105c/0x35e0 process_one_work+0x760/0x17b0 worker_thread+0x768/0xce8 kthread+0x3bc/0x690 ret_from_fork+0x10/0x20 irq event stamp: 211604 hardirqs last enabled at (211603): [] _raw_spin_unlock_irqrestore+0x84/0x98 hardirqs last disabled at (211604): [] el1_dbg+0x24/0x80 softirqs last enabled at (211296): [] handle_softirqs+0x820/0xbc8 softirqs last disabled at (210993): [] __do_softirq+0x18/0x20 ---[ end trace 0000000000000000 ]--- lan78xx 1-1:1.0 enu1: failed to kill vid 0081/0 Fixes: ec4c7e12396b ("lan78xx: Introduce NAPI polling support") Suggested-by: Jakub Kicinski Signed-off-by: Oleksij Rempel Link: https://patch.msgid.link/20250627051346.276029-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit e39ed71c7a26e8e94c637e222bc373b511ca127f Author: Jiawen Wu Date: Thu Jun 26 16:51:53 2025 +0800 net: txgbe: fix the issue of TX failure There is a occasional problem that ping is failed between AML devices. That is because the manual enablement of the security Tx path on the hardware is missing, no matter what its previous state was. Fixes: 6f8b4c01a8cd ("net: txgbe: Implement PHYLINK for AML 25G/10G devices") Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/5BDFB14C57D1C42A+20250626085153.86122-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 66701750d5565c574af42bef0b789ce0203e3071 Merge: 4b424a3f7d91c4 6f11adcc6f36ff Author: Linus Torvalds Date: Mon Jun 30 16:32:43 2025 -0700 Merge tag 'io_uring-6.16-20250630' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Now that anonymous inodes set S_IFREG, this breaks the io_uring read/write retries for short reads/writes. As things like timerfd and eventfd are anon inodes, applications that previously did: unsigned long event_data[2]; io_uring_prep_read(sqe, evfd, event_data, sizeof(event_data), 0); and just got a short read when 1 event was posted, will now wait for the full amount before posting a completion. This caused issues for the ghostty application, making it basically unusable due to excessive buffering" * tag 'io_uring-6.16-20250630' of git://git.kernel.dk/linux: io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well commit 52e1a03e6cf61ae165f59f41c44394a653a0a788 Author: Nikunj A Dadhania Date: Mon Jun 30 13:48:58 2025 +0530 x86/sev: Use TSC_FACTOR for Secure TSC frequency calculation When using Secure TSC, the GUEST_TSC_FREQ MSR reports a frequency based on the nominal P0 frequency, which deviates slightly (typically ~0.2%) from the actual mean TSC frequency due to clocking parameters. Over extended VM uptime, this discrepancy accumulates, causing clock skew between the hypervisor and a SEV-SNP VM, leading to early timer interrupts as perceived by the guest. The guest kernel relies on the reported nominal frequency for TSC-based timekeeping, while the actual frequency set during SNP_LAUNCH_START may differ. This mismatch results in inaccurate time calculations, causing the guest to perceive hrtimers as firing earlier than expected. Utilize the TSC_FACTOR from the SEV firmware's secrets page (see "Secrets Page Format" in the SNP Firmware ABI Specification) to calculate the mean TSC frequency, ensuring accurate timekeeping and mitigating clock skew in SEV-SNP VMs. Use early_ioremap_encrypted() to map the secrets page as ioremap_encrypted() uses kmalloc() which is not available during early TSC initialization and causes a panic. [ bp: Drop the silly dummy var: https://lore.kernel.org/r/20250630192726.GBaGLlHl84xIopx4Pt@fat_crate.local ] Fixes: 73bbf3b0fbba ("x86/tsc: Init the TSC for Secure TSC guests") Signed-off-by: Nikunj A Dadhania Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250630081858.485187-1-nikunj@amd.com commit fbf913cb72a52559ae98951fb4311b81d7b0650e Author: Alan Huang Date: Mon Jun 30 20:36:33 2025 +0800 bcachefs: Fix incorrect transaction restart handling Reported-by: syzbot+cc7567f096079cb4146f@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 74ebd02163fde05baa23129e06dde4b8f0f2377a Author: Shyam Prasad N Date: Mon Jun 30 23:09:34 2025 +0530 cifs: all initializations for tcon should happen in tcon_info_alloc Today, a few work structs inside tcon are initialized inside cifs_get_tcon and not in tcon_info_alloc. As a result, if a tcon is obtained from tcon_info_alloc, but not called as a part of cifs_get_tcon, we may trip over. Cc: Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 964209202ebe1569c858337441e87ef0f9d71416 Author: Zhang Rui Date: Thu Jun 19 15:13:40 2025 +0800 powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed PL1 cannot be disabled on some platforms. The ENABLE bit is still set after software clears it. This behavior leads to a scenario where, upon user request to disable the Power Limit through the powercap sysfs, the ENABLE bit remains set while the CLAMPING bit is inadvertently cleared. According to the Intel Software Developer's Manual, the CLAMPING bit, "When set, allows the processor to go below the OS requested P states in order to maintain the power below specified Platform Power Limit value." Thus this means the system may operate at higher power levels than intended on such platforms. Enhance the code to check ENABLE bit after writing to it, and stop further processing if ENABLE bit cannot be changed. Reported-by: Srinivas Pandruvada Fixes: 2d281d8196e3 ("PowerCap: Introduce Intel RAPL power capping driver") Cc: All applicable Signed-off-by: Zhang Rui Link: https://patch.msgid.link/20250619071340.384782-1-rui.zhang@intel.com [ rjw: Use str_enabled_disabled() instead of open-coded equivalent ] Signed-off-by: Rafael J. Wysocki commit 3bbe46716092d8ef6b0df4b956f585c5cd0fc78e Author: Paulo Alcantara Date: Wed Jun 25 00:00:17 2025 -0300 smb: client: fix warning when reconnecting channel When reconnecting a channel in smb2_reconnect_server(), a dummy tcon is passed down to smb2_reconnect() with ->query_interface uninitialized, so we can't call queue_delayed_work() on it. Fix the following warning by ensuring that we're queueing the delayed worker from correct tcon. WARNING: CPU: 4 PID: 1126 at kernel/workqueue.c:2498 __queue_delayed_work+0x1d2/0x200 Modules linked in: cifs cifs_arc4 nls_ucs2_utils cifs_md4 [last unloaded: cifs] CPU: 4 UID: 0 PID: 1126 Comm: kworker/4:0 Not tainted 6.16.0-rc3 #5 PREEMPT(voluntary) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-4.fc42 04/01/2014 Workqueue: cifsiod smb2_reconnect_server [cifs] RIP: 0010:__queue_delayed_work+0x1d2/0x200 Code: 41 5e 41 5f e9 7f ee ff ff 90 0f 0b 90 e9 5d ff ff ff bf 02 00 00 00 e8 6c f3 07 00 89 c3 eb bd 90 0f 0b 90 e9 57 f> 0b 90 e9 65 fe ff ff 90 0f 0b 90 e9 72 fe ff ff 90 0f 0b 90 e9 RSP: 0018:ffffc900014afad8 EFLAGS: 00010003 RAX: 0000000000000000 RBX: ffff888124d99988 RCX: ffffffff81399cc1 RDX: dffffc0000000000 RSI: ffff888114326e00 RDI: ffff888124d999f0 RBP: 000000000000ea60 R08: 0000000000000001 R09: ffffed10249b3331 R10: ffff888124d9998f R11: 0000000000000004 R12: 0000000000000040 R13: ffff888114326e00 R14: ffff888124d999d8 R15: ffff888114939020 FS: 0000000000000000(0000) GS:ffff88829f7fe000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe7a2b4038 CR3: 0000000120a6f000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: queue_delayed_work_on+0xb4/0xc0 smb2_reconnect+0xb22/0xf50 [cifs] smb2_reconnect_server+0x413/0xd40 [cifs] ? __pfx_smb2_reconnect_server+0x10/0x10 [cifs] ? local_clock_noinstr+0xd/0xd0 ? local_clock+0x15/0x30 ? lock_release+0x29b/0x390 process_one_work+0x4c5/0xa10 ? __pfx_process_one_work+0x10/0x10 ? __list_add_valid_or_report+0x37/0x120 worker_thread+0x2f1/0x5a0 ? __kthread_parkme+0xde/0x100 ? __pfx_worker_thread+0x10/0x10 kthread+0x1fe/0x380 ? kthread+0x10f/0x380 ? __pfx_kthread+0x10/0x10 ? local_clock_noinstr+0xd/0xd0 ? ret_from_fork+0x1b/0x1f0 ? local_clock+0x15/0x30 ? lock_release+0x29b/0x390 ? rcu_is_watching+0x20/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x15b/0x1f0 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 irq event stamp: 1116206 hardirqs last enabled at (1116205): [] __up_console_sem+0x52/0x60 hardirqs last disabled at (1116206): [] queue_delayed_work_on+0x6e/0xc0 softirqs last enabled at (1116138): [] __smb_send_rqst+0x42d/0x950 [cifs] softirqs last disabled at (1116136): [] release_sock+0x21/0xf0 Cc: linux-cifs@vger.kernel.org Reported-by: David Howells Fixes: 42ca547b13a2 ("cifs: do not disable interface polling on failure") Reviewed-by: David Howells Tested-by: David Howells Reviewed-by: Shyam Prasad N Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Tested-by: Steve French Signed-off-by: Steve French commit 39d81457ad3417a98ac826161f9ca0e642677661 Author: Mario Limonciello Date: Thu Jun 19 09:29:13 2025 -0500 drm/amd/display: Don't allow OLED to go down to fully off [Why] OLED panels can be fully off, but this behavior is unexpected. [How] Ensure that minimum luminance is at least 1. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4338 Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 51496c7737d06a74b599d0aa7974c3d5a4b1162e) commit 84f2902bfcfe79e94adf5dfe9bf85ad334a4c63a Author: Harold Sun Date: Thu Jun 19 14:52:54 2025 -0400 drm/amd/display: Added case for when RR equals panel's max RR using freesync [WHY] Rounding error sometimes occurs when the refresh rate is equal to a panel's max refresh rate, causing HDMI compliance failures. [HOW] Added a case so that we round up to avoid v_total_min to be below a panel's minimum bound. Reviewed-by: Jun Lei Signed-off-by: Harold Sun Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit fe7645d22bc0f7c1558296538ec49987bf268ef6) commit 34659c1a1f4fd4c148ab13e13b11fd64df01ffcd Author: Alex Deucher Date: Wed Jun 25 18:15:37 2025 -0400 drm/amdkfd: add hqd_sdma_get_doorbell callbacks for gfx7/8 These were missed when support was added for other generations. The callbacks are called unconditionally so we need to make sure all generations have them. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4304 Link: https://github.com/ROCm/ROCm/issues/4965 Fixes: bac38ca8c475 ("drm/amdkfd: implement per queue sdma reset for gfx 9.4+") Cc: Jonathan Kim Reported-by: Johl Brown Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher (cherry picked from commit 1e9d17a5dcf1242e9518e461d8e63ad35240e49e) Cc: stable@vger.kernel.org commit f3e58d8e154dae5015c7400812c80789589fc36e Author: Lin.Cao Date: Tue Jun 24 17:05:34 2025 +0800 drm/amdgpu: Fix memory leak in amdgpu_ctx_mgr_entity_fini patch dd64956685fa ("drm/amdgpu: Remove duplicated "context still alive" check") removed ctx put, which will cause amdgpu_ctx_fini() cannot be called and then cause some finished fence that added by amdgpu_ctx_add_fence() cannot be released and cause memleak. Fixes: dd64956685fa ("drm/amdgpu: Remove duplicated "context still alive" check") Signed-off-by: Lin.Cao Reviewed-by: Tvrtko Ursulin Acked-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 8cf66089e28108dedd47e6156a48489303cf525c) Cc: stable@vger.kernel.org commit cf234231fcbc7d391e2135b9518613218cc5347f Author: Philip Yang Date: Fri Jun 20 18:32:32 2025 -0400 drm/amdkfd: Don't call mmput from MMU notifier callback If the process is exiting, the mmput inside mmu notifier callback from compactd or fork or numa balancing could release the last reference of mm struct to call exit_mmap and free_pgtable, this triggers deadlock with below backtrace. The deadlock will leak kfd process as mmu notifier release is not called and cause VRAM leaking. The fix is to take mm reference mmget_non_zero when adding prange to the deferred list to pair with mmput in deferred list work. If prange split and add into pchild list, the pchild work_item.mm is not used, so remove the mm parameter from svm_range_unmap_split and svm_range_add_child. The backtrace of hung task: INFO: task python:348105 blocked for more than 64512 seconds. Call Trace: __schedule+0x1c3/0x550 schedule+0x46/0xb0 rwsem_down_write_slowpath+0x24b/0x4c0 unlink_anon_vmas+0xb1/0x1c0 free_pgtables+0xa9/0x130 exit_mmap+0xbc/0x1a0 mmput+0x5a/0x140 svm_range_cpu_invalidate_pagetables+0x2b/0x40 [amdgpu] mn_itree_invalidate+0x72/0xc0 __mmu_notifier_invalidate_range_start+0x48/0x60 try_to_unmap_one+0x10fa/0x1400 rmap_walk_anon+0x196/0x460 try_to_unmap+0xbb/0x210 migrate_page_unmap+0x54d/0x7e0 migrate_pages_batch+0x1c3/0xae0 migrate_pages_sync+0x98/0x240 migrate_pages+0x25c/0x520 compact_zone+0x29d/0x590 compact_zone_order+0xb6/0xf0 try_to_compact_pages+0xbe/0x220 __alloc_pages_direct_compact+0x96/0x1a0 __alloc_pages_slowpath+0x410/0x930 __alloc_pages_nodemask+0x3a9/0x3e0 do_huge_pmd_anonymous_page+0xd7/0x3e0 __handle_mm_fault+0x5e3/0x5f0 handle_mm_fault+0xf7/0x2e0 hmm_vma_fault.isra.0+0x4d/0xa0 walk_pmd_range.isra.0+0xa8/0x310 walk_pud_range+0x167/0x240 walk_pgd_range+0x55/0x100 __walk_page_range+0x87/0x90 walk_page_range+0xf6/0x160 hmm_range_fault+0x4f/0x90 amdgpu_hmm_range_get_pages+0x123/0x230 [amdgpu] amdgpu_ttm_tt_get_user_pages+0xb1/0x150 [amdgpu] init_user_pages+0xb1/0x2a0 [amdgpu] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x543/0x7d0 [amdgpu] kfd_ioctl_alloc_memory_of_gpu+0x24c/0x4e0 [amdgpu] kfd_ioctl+0x29d/0x500 [amdgpu] Fixes: fa582c6f3684 ("drm/amdkfd: Use mmget_not_zero in MMU notifier") Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher (cherry picked from commit a29e067bd38946f752b0ef855f3dfff87e77bec7) Cc: stable@vger.kernel.org commit 3d30048958e0d43425f6d4e76565e6249fa71050 Author: Michael J. Ruhl Date: Fri Jun 27 10:35:11 2025 -0400 i2c/designware: Fix an initialization issue The i2c_dw_xfer_init() function requires msgs and msg_write_idx from the dev context to be initialized. amd_i2c_dw_xfer_quirk() inits msgs and msgs_num, but not msg_write_idx. This could allow an out of bounds access (of msgs). Initialize msg_write_idx before calling i2c_dw_xfer_init(). Reviewed-by: Andy Shevchenko Fixes: 17631e8ca2d3 ("i2c: designware: Add driver support for AMD NAVI GPU") Cc: # v5.13+ Signed-off-by: Michael J. Ruhl Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250627143511.489570-1-michael.j.ruhl@intel.com commit e54c5de901ea56fc68f8d56b3cce9940169346f4 Author: Kent Russell Date: Tue Jun 24 11:42:06 2025 -0400 drm/amdgpu: Include sdma_4_4_4.bin This got missed during SDMA 4.4.4 support. Fixes: 968e3811c3e8 ("drm/amdgpu: add initial support for sdma444") Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 51526efe02714339ed6139f7bc348377d363200a) Cc: stable@vger.kernel.org commit 62461367f4c0dcf4fab9cafb4ab3a7d346788df6 Author: David Yat Sin Date: Thu Jun 19 17:51:13 2025 +0000 amdkfd: MTYPE_UC for ext-coherent system memory Set memory mtype to UC host memory when ext-coherent flag is set and memory is registered as a SVM allocation. Reviewed-by: Amber Lin Signed-off-by: David Yat Sin Signed-off-by: Alex Deucher (cherry picked from commit 5d14fdab4778c29cfd39e62c3ce84d232b4a7d8c) commit 905967e359f0a3345dce096504e8c0390d0a8f49 Author: Alex Deucher Date: Mon Jun 16 14:04:54 2025 -0400 drm/amdgpu/sdma5.x: suspend KFD queues in ring reset SDMA 5.x only supports engine soft reset which resets all queues on the engine. As such, we need to suspend KFD queues around resets like we do for SDMA 4.x. Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher (cherry picked from commit 61feed0baa1a0d094af0e07e968b1e6e875f07d0) commit ba74278c638df7c333a970a265dfcc258e70807b Author: Marc Zyngier Date: Wed Jun 25 12:18:06 2025 +0100 Revert "PCI: ecam: Allow cfg->priv to be pre-populated from the root port device" This reverts commit 4900454b4f819e88e9c57ed93542bf9325d7e161. Now that nobody relies of cfg->priv containing anything useful before the .init() callback is used, restore the previous behaviour. Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250625111806.4153773-4-maz@kernel.org commit bdb32a0f6780660512d2335db2ebe32e6582cdc8 Author: Geert Uytterhoeven Date: Wed Jun 25 12:18:04 2025 +0100 PCI: host-generic: Set driver_data before calling gen_pci_init() On MicroChip MPFS Icicle: microchip-pcie 2000000000.pcie: host bridge /soc/pcie@2000000000 ranges: microchip-pcie 2000000000.pcie: Parsing ranges property... microchip-pcie 2000000000.pcie: MEM 0x2008000000..0x2087ffffff -> 0x0008000000 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000368 Current swapper/0 pgtable: 4K pagesize, 39-bit VAs, pgdp=0x00000000814f1000 [0000000000000368] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 Oops [#1] Modules linked in: CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.15.0-rc1-icicle-00003-gafc0a570bb61 #232 NONE Hardware name: Microchip PolarFire-SoC Icicle Kit (DT) [...] [] plda_pcie_setup_iomems+0xe/0x78 [] mc_platform_init+0x80/0x1d2 [] pci_ecam_create+0x104/0x1e2 [] pci_host_common_init+0x120/0x228 [] pci_host_common_probe+0x7c/0x8a The initialization of driver_data was moved after the call to gen_pci_init(), while the pci_ecam_ops.init() callback mc_platform_init() expects it has already been initialized. Fix this by moving the initialization of driver_data up. Fixes: afc0a570bb613871 ("PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/774290708a6f0f683711914fda110742c18a7fb2.1750787223.git.geert+renesas@glider.be Link: https://patch.msgid.link/20250625111806.4153773-2-maz@kernel.org commit 643c0c9d0496c5727ca28cd841d069b5afee06cf Author: Marc Zyngier Date: Wed Jun 25 12:18:05 2025 +0100 PCI: apple: Add tracking of probed root ports The apple driver relies on being able to directly find the matching root port structure from the platform device that represents this port. A previous hack stashed a pointer to the root port structure in the config window private pointer, but that ended up relying on assumptions that break other drivers. Instead, bite the bullet and track the association as part of the driver itself as a list of probed root ports. Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250625111806.4153773-3-maz@kernel.org commit a106b6a888caf478d5fd31d123ffa09558500772 Author: Andy Shevchenko Date: Mon Jun 30 11:21:52 2025 +0300 Input: alps - use scnprintf() to suppress truncation warning The commit 76c968e75715 ("Input: alps - switch to use scnprintf() to suppress truncation warning") converted one place in the driver while the other left untouched. Convert the other place as well. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250630082245.1416796-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov commit 60f7f4afaf6d09c27971f30f5ab69a3aab78b28f Author: Mark Bloch Date: Thu Jun 26 18:42:52 2025 -0700 MAINTAINERS: Add myself as mlx5 core and mlx5e co-maintainer I have been working on mlx5 related code for several years, contributing features, code reviews, and occasional maintainer tasks when needed. This patch makes my maintainer role official. Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20250627014252.1262592-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit e8537cad824065b0425fb0429e762e14a08067c2 Author: Dmitry Baryshkov Date: Sun Jun 8 18:52:04 2025 +0300 drm/bridge: aux-hpd-bridge: fix assignment of the of_node Perform fix similar to the one in the commit 85e444a68126 ("drm/bridge: Fix assignment of the of_node of the parent to aux bridge"). The assignment of the of_node to the aux HPD bridge needs to mark the of_node as reused, otherwise driver core will attempt to bind resources like pinctrl, which is going to fail as corresponding pins are already marked as used by the parent device. Fix that by using the device_set_of_node_from_dev() helper instead of assigning it directly. Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250608-fix-aud-hpd-bridge-v1-1-4641a6f8e381@oss.qualcomm.com commit eb028cd884e1b0976ff8c5944ee6650fe3ed0a6c Author: Dmitry Baryshkov Date: Thu Feb 20 17:07:26 2025 +0200 drm/bridge: panel: move prepare_prev_first handling to drm_panel_bridge_add_typed The commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") and commit 0974687a19c3 ("drm/bridge: panel: Set pre_enable_prev_first from drmm_panel_bridge_add") added handling of panel's prepare_prev_first to devm_panel_bridge_add() and drmm_panel_bridge_add(). However if the driver calls drm_panel_bridge_add_typed() directly, then the flag won't be handled and thus the drm_bridge.pre_enable_prev_first will not be set. Move prepare_prev_first handling to the drm_panel_bridge_add_typed() so that there is no way to miss the flag. Fixes: 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") Fixes: 0974687a19c3 ("drm/bridge: panel: Set pre_enable_prev_first from drmm_panel_bridge_add") Reported-by: Svyatoslav Ryhel Closes: https://lore.kernel.org/dri-devel/CAPVz0n3YZass3Bns1m0XrFxtAC0DKbEPiW6vXimQx97G243sXw@mail.gmail.com/ Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250220-panel_prev_first-v1-1-b9e787825a1a@linaro.org commit 4b424a3f7d91c4c694a36ecb30b978e30689cdae Merge: d0b3b7b22dfa1f 08d82d0cad51c2 Author: Linus Torvalds Date: Mon Jun 30 08:27:38 2025 -0700 Merge tag 'rtc-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "Some fixes for 6.16. The cmos one is important for PREEMPT_RT. I've also added the s5m changes as they had a dependency on the MFD pull request that was included in 6.16-rc1 and we didn't synchronize before the merge window and they won't hurt. - cmos: use spin_lock_irqsave in cmos_interrupt - pcf2127: fix SPI command byte for PCF2131 - s5m: add S2MPG10 support" * tag 'rtc-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: pcf2127: add missing semicolon after statement rtc: pcf2127: fix SPI command byte for PCF2131 rtc: cmos: use spin_lock_irqsave in cmos_interrupt rtc: s5m: replace open-coded read/modify/write registers with regmap helpers rtc: s5m: replace regmap_update_bits with regmap_clear/set_bits rtc: s5m: switch to devm_device_init_wakeup rtc: s5m: fix a typo: peding -> pending rtc: s5m: add support for S2MPG10 RTC rtc: s5m: prepare for external regmap rtc: s5m: cache device type during probe commit 6729c134ccc0d37d865c342e466b90df29081f1a Author: Jisheng Zhang Date: Sun Jun 29 17:59:18 2025 +0800 regulator: mp886x: Fix ID table driver_data Currently, the driver_data of the i2c ID table is wrong, so it won't work if any mp886x user makes use of the ID table. Fortunately, there's no such user in upstream source code, we can fix the issue by using different ID table entry for mp8867 and mp8869. Signed-off-by: Jisheng Zhang Link: https://patch.msgid.link/20250629095918.912-1-jszhang@kernel.org Signed-off-by: Mark Brown commit f172ffde18997aa401a74153cea4ae3bfdcb5124 Author: Jisheng Zhang Date: Sun Jun 29 17:59:05 2025 +0800 regulator: sy8824x: Fix ID table driver_data Currently, the driver_data of the i2c ID table is wrong, so it won't work if any sy8824x user makes use of the ID table. Fortunately, there's no such user in upstream source code, we can fix the issue by using different ID table entry for sy8824c, sy8824e, sy20276 and sy20278. Signed-off-by: Jisheng Zhang Link: https://patch.msgid.link/20250629095905.898-1-jszhang@kernel.org Signed-off-by: Mark Brown commit eb2c93e7028b4c9fe4761734d65ee40712d1c242 Author: Nam Cao Date: Mon Jun 30 12:26:14 2025 +0200 irqchip/irq-msi-lib: Select CONFIG_GENERIC_MSI_IRQ irq-msi-lib directly uses struct msi_domain_info and more things which are only available when CONFIG_GENERIC_MSI_IRQ=y. However, there is no dependency specified and CONFIG_IRQ_MSI_LIB can be enabled without CONFIG_GENERIC_MSI_IRQ, which causes the kernel build fail. Make IRQ_MSI_LIB select GENEREIC_MSI_IRQ to prevent that. Fixes: 72e257c6f058 ("irqchip: Provide irq-msi-lib") Reported-by: kernel test robot Signed-off-by: Nam Cao Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/b0c44007f3b7e062228349a2395f8d850050db33.1751277765.git.namcao@linutronix.de Closes: https://lore.kernel.org/oe-kbuild-all/202506282256.cHlEHrdc-lkp@intel.com/ commit 9bd9c8026341f75f25c53104eb7e656e357ca1a2 Author: Mathias Nyman Date: Fri Jun 27 19:43:48 2025 +0300 usb: hub: Fix flushing of delayed work used for post resume purposes Delayed work that prevents USB3 hubs from runtime-suspending too early needed to be flushed in hub_quiesce() to resolve issues detected on QC SC8280XP CRD board during suspend resume testing. This flushing did however trigger new issues on Raspberry Pi 3B+, which doesn't have USB3 ports, and doesn't queue any post resume delayed work. The flushed 'hub->init_work' item is used for several purposes, and is originally initialized with a 'NULL' work function. The work function is also changed on the fly, which may contribute to the issue. Solve this by creating a dedicated delayed work item for post resume work, and flush that delayed work in hub_quiesce() Cc: stable Fixes: a49e1e2e785f ("usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm") Reported-by: Mark Brown Closes: https://lore.kernel.org/linux-usb/aF5rNp1l0LWITnEB@finisterre.sirena.org.uk Signed-off-by: Mathias Nyman Tested-by: Konrad Dybcio # SC8280XP CRD Tested-by: Mark Brown Link: https://lore.kernel.org/r/20250627164348.3982628-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 74b1ec9f5d627d2bdd5e5b6f3f81c23317657023 Author: Daniil Dulov Date: Thu Jun 26 14:46:19 2025 +0300 wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev() There is a potential NULL pointer dereference in zd_mac_tx_to_dev(). For example, the following is possible: T0 T1 zd_mac_tx_to_dev() /* len == skb_queue_len(q) */ while (len > ZD_MAC_MAX_ACK_WAITERS) { filter_ack() spin_lock_irqsave(&q->lock, flags); /* position == skb_queue_len(q) */ for (i=1; itype == NL80211_IFTYPE_AP) skb = __skb_dequeue(q); spin_unlock_irqrestore(&q->lock, flags); skb_dequeue() -> NULL Since there is a small gap between checking skb queue length and skb being unconditionally dequeued in zd_mac_tx_to_dev(), skb_dequeue() can return NULL. Then the pointer is passed to zd_mac_tx_status() where it is dereferenced. In order to avoid potential NULL pointer dereference due to situations like above, check if skb is not NULL before passing it to zd_mac_tx_status(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 459c51ad6e1f ("zd1211rw: port to mac80211") Signed-off-by: Daniil Dulov Link: https://patch.msgid.link/20250626114619.172631-1-d.dulov@aladdin.ru Signed-off-by: Johannes Berg commit 1fe44a86ff0ff483aa1f1332f2b08f431fa51ce8 Author: Lachlan Hodges Date: Thu Jun 26 21:51:18 2025 +1000 wifi: cfg80211: fix S1G beacon head validation in nl80211 S1G beacons contain fixed length optional fields that precede the variable length elements, ensure we take this into account when validating the beacon. This particular case was missed in 1e1f706fc2ce ("wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements"). Fixes: 1d47f1198d58 ("nl80211: correctly validate S1G beacon head") Signed-off-by: Lachlan Hodges Link: https://patch.msgid.link/20250626115118.68660-1-lachlan.hodges@morsemicro.com [shorten/reword subject] Signed-off-by: Johannes Berg commit 9e9b46672b1daac814b384286c21fb8332a87392 Author: Youling Tang Date: Mon Jun 30 09:11:48 2025 +0800 xfs: add FALLOC_FL_ALLOCATE_RANGE to supported flags mask Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate flags in XFS_FALLOC_FL_SUPPORTED. This change improves code clarity and maintains by explicitly showing this flag in the supported flags mask. Note that since FALLOC_FL_ALLOCATE_RANGE is defined as 0x00, this addition has no functional modifications. Reviewed-by: Carlos Maiolino Signed-off-by: Youling Tang Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino commit 4ec24e9601d5cfc9ac9798c0acb8e88c6ab61fc5 Merge: fa60c094c19b97 ddaad4ad774d4a Author: Mark Brown Date: Mon Jun 30 12:42:36 2025 +0100 spi: spi-qpic-snand: avoid memory corruption Merge series from Gabor Juhos : The 'spi-qpic-nand' driver may cause memory corruption under some circumstances. The first patch in the series changes the driver to avoid that, whereas the second adds some sanity checks to the common QPIC code in order to make detecting such errors easier in the future. commit 97e000acf2e20a86a50a0ec8c2739f0846f37509 Author: Christian König Date: Fri Jun 13 13:16:38 2025 +0200 drm/ttm: fix error handling in ttm_buffer_object_transfer Unlocking the resv object was missing in the error path, additionally to that we should move over the resource only after the fence slot was reserved. Signed-off-by: Christian König Reviewed-by: Matthew Brost Fixes: c8d4c18bfbc4a ("dma-buf/drivers: make reserving a shared slot mandatory v4") Cc: Link: https://lore.kernel.org/r/20250616130726.22863-3-christian.koenig@amd.com commit 2b95a7db6e0f75587bffddbb490399cbb87e4985 Author: Christian König Date: Tue Jan 28 10:47:48 2025 +0100 dma-buf: fix timeout handling in dma_resv_wait_timeout v2 Even the kerneldoc says that with a zero timeout the function should not wait for anything, but still return 1 to indicate that the fences are signaled now. Unfortunately that isn't what was implemented, instead of only returning 1 we also waited for at least one jiffies. Fix that by adjusting the handling to what the function is actually documented to do. v2: improve code readability Reported-by: Marek Olšák Reported-by: Lucas Stach Signed-off-by: Christian König Reviewed-by: Lucas Stach Cc: Link: https://lore.kernel.org/r/20250129105841.1806-1-christian.koenig@amd.com commit 644bec18e705ca41d444053407419a21832fcb2f Author: Alok Tiwari Date: Mon Jun 30 03:58:08 2025 -0700 platform/mellanox: mlxreg-lc: Fix logic error in power state check Fixes a logic issue in mlxreg_lc_completion_notify() where the intention was to check if MLXREG_LC_POWERED flag is not set before powering on the device. The original code used "state & ~MLXREG_LC_POWERED" to check for the absence of the POWERED bit. However this condition evaluates to true even when other bits are set, leading to potentially incorrect behavior. Corrected the logic to explicitly check for the absence of MLXREG_LC_POWERED using !(state & MLXREG_LC_POWERED). Fixes: 62f9529b8d5c ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Suggested-by: Vadim Pasternak Signed-off-by: Alok Tiwari Link: https://lore.kernel.org/r/20250630105812.601014-1-alok.a.tiwari@oracle.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit af14ed3fcb2703d1185bf10531fee87e6e1cc60b Author: Mario Limonciello Date: Tue Jun 10 15:58:17 2025 -0500 i2c: Re-enable piix4 driver on non-x86 loongarch and mips both support hardware that uses the i2c-piix4 driver. It should not be restricted to x86, so drop the x86 dependency. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdVPQLjOox5sMp34Z5MTwKv2WOpHa=MpZr8hWG22fQKcjw@mail.gmail.com/ Fixes: 7e173eb82ae97175 ("i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86"). Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Acked-by: Andi Shyti Link: https://lore.kernel.org/r/20250610205817.3912944-2-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b1c26e059536d8acbf9d508374f4b76537e20fb7 Author: Mario Limonciello Date: Tue Jun 10 15:58:16 2025 -0500 Move FCH header to a location accessible by all archs A new header fch.h was created to store registers used by different AMD drivers. This header was included by i2c-piix4 in commit 624b0d5696a8 ("i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to "). To prevent compile failures on non-x86 archs i2c-piix4 was set to only compile on x86 by commit 7e173eb82ae9717 ("i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86"). This was not a good decision because loongarch and mips both actually support i2c-piix4 and set it enabled in the defconfig. Move the header to a location accessible by all architectures. Fixes: 624b0d5696a89 ("i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to ") Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250610205817.3912944-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 690be4bc589a145dc211b8d66b8f851713abd344 Author: Srinivas Pandruvada Date: Tue Jun 17 16:29:13 2025 -0700 platform/x86/intel/hid: Add Wildcat Lake support Add ACPI ID for Wildcat Lake. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250617232913.3314765-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 314e5ad4782d08858b3abc325c0487bd2abc23a1 Author: Kurt Borja Date: Wed Jun 25 22:17:37 2025 -0300 platform/x86: dell-wmi-sysman: Fix class device unregistration Devices under the firmware_attributes_class do not have unique a dev_t. Therefore, device_unregister() should be used instead of device_destroy(), since the latter may match any device with a given dev_t. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250625-dest-fix-v1-3-3a0f342312bb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 5ff1fbb3059730700b4823f43999fc1315984632 Author: Kurt Borja Date: Wed Jun 25 22:17:36 2025 -0300 platform/x86: think-lmi: Fix class device unregistration Devices under the firmware_attributes_class do not have unique a dev_t. Therefore, device_unregister() should be used instead of device_destroy(), since the latter may match any device with a given dev_t. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250625-dest-fix-v1-2-3a0f342312bb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 11cba4793b95df3bc192149a6eb044f69aa0b99e Author: Kurt Borja Date: Wed Jun 25 22:17:35 2025 -0300 platform/x86: hp-bioscfg: Fix class device unregistration Devices under the firmware_attributes_class do not have unique a dev_t. Therefore, device_unregister() should be used instead of device_destroy(), since the latter may match any device with a given dev_t. Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg") Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250625-dest-fix-v1-1-3a0f342312bb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9037532ab893635a46afe88542cd747a4a846497 Author: Diederik de Haas Date: Sat Jun 28 16:28:18 2025 +0200 arm64: dts: rockchip: Add missing fan-supply to rk3566-quartz64-a The Quartz 64 Model-A Schematic from 20210427 on page 7 shows that the fan's power supply is provided by VCC12V_DCIN. This fixes the following warning: gpio-fan gpio_fan: supply fan not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250628142843.839150-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 53b6445ad08f07b6f4a84f1434f543196009ed89 Author: Jakob Unterwurzacher Date: Fri Jun 27 15:17:12 2025 +0200 arm64: dts: rockchip: use cs-gpios for spi1 on ringneck Hardware CS has a very slow rise time of about 6us, causing transmission errors when CS does not reach high between transaction. It looks like it's not driven actively when transitioning from low to high but switched to input, so only the CPU pull-up pulls it high, slowly. Transitions from high to low are fast. On the oscilloscope, CS looks like an irregular sawtooth pattern like this: _____ ^ / | ^ /| / | /| / | / | / | / | / | ___/ |___/ |_____/ |___ With cs-gpios we have a CS rise time of about 20ns, as it should be, and CS looks rectangular. This fixes the data errors when running a flashcp loop against a m25p40 spi flash. With the Rockchip 6.1 kernel we see the same slow rise time, but for some reason CS is always high for long enough to reach a solid high. The RK3399 and RK3588 SoCs use the same SPI driver, so we also checked our "Puma" (RK3399) and "Tiger" (RK3588) boards. They do not have this problem. Hardware CS rise time is good. Fixes: c484cf93f61b ("arm64: dts: rockchip: add PX30-µQ7 (Ringneck) SoM with Haikou baseboard") Cc: stable@vger.kernel.org Reviewed-by: Quentin Schulz Signed-off-by: Jakob Unterwurzacher Link: https://lore.kernel.org/r/20250627131715.1074308-1-jakob.unterwurzacher@cherry.de Signed-off-by: Heiko Stuebner commit e1af6f0146d64fc4fb142504ba128a97cd171558 Author: Pratap Nirujogi Date: Wed Jun 18 16:29:48 2025 -0400 platform/x86: Update swnode graph for amd isp4 Existing swnode graph format is specific to sensor device and is causing conflicts when accessing standard property variables outside the sensor driver. To address this issue, enhanced swnode graph format with dedicated nodes for i2c and isp devices, with sensor node added as child to i2c node. This approach allows to have standard property variables (ex: 'clock-frequency') with values applicable for each of the devices (sensor, i2c and isp). ACPI device driver_data handle is also initialized with root camera swnode to access the property variables in the graph in isp and i2c drivers. Signed-off-by: Pratap Nirujogi Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250618202958.3934822-1-pratap.nirujogi@amd.com Signed-off-by: Ilpo Järvinen commit 1e14ea901dc8d976d355ddc3e0de84ee86ef0596 Author: Shiju Jose Date: Thu Jun 26 11:13:44 2025 +0100 EDAC: Initialize EDAC features sysfs attributes Fix the lockdep splat caused by missing sysfs_attr_init() calls for the recently added EDAC feature's sysfs attributes. In lockdep_init_map_type(), the check for the lock-class key if (!static_obj(key) && !is_dynamic_key(key)) causes the splat. Backtrace: RIP: 0010:lockdep_init_map_type Call Trace: __kernfs_create_file sysfs_add_file_mode_ns internal_create_group internal_create_groups device_add ? __init_waitqueue_head edac_dev_register devm_cxl_memdev_edac_register ? lock_acquire ? find_held_lock ? cxl_mem_probe ? cxl_mem_probe ? lockdep_hardirqs_on ? cxl_mem_probe cxl_mem_probe [ bp: Massage. ] Fixes: f90b738166fe ("EDAC: Add scrub control feature") Fixes: bcbd069b11b0 ("EDAC: Add a Error Check Scrub control feature") Fixes: 699ea5219c4b ("EDAC: Add a memory repair control feature") Reported-by: Dave Jiang Suggested-by: Jonathan Cameron Signed-off-by: Shiju Jose Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/20250626101344.1726-1-shiju.jose@huawei.com commit eb617dd25ca176f3fee24f873f0fd60010773d67 Author: Kurt Borja Date: Mon Jun 30 00:43:12 2025 -0300 platform/x86: dell-wmi-sysman: Fix WMI data block retrieval in sysfs callbacks After retrieving WMI data blocks in sysfs callbacks, check for the validity of them before dereferencing their content. Reported-by: Jan Graczyk Closes: https://lore.kernel.org/r/CAHk-=wgMiSKXf7SvQrfEnxVtmT=QVQPjJdNjfm3aXS7wc=rzTw@mail.gmail.com/ Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Suggested-by: Linus Torvalds Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250630-sysman-fix-v2-1-d185674d0a30@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 7b4c5a37544ba22c6ebe72c0d4ea56c953459fa5 Author: Luo Gengkun Date: Thu Jun 26 13:54:03 2025 +0000 perf/core: Fix the WARN_ON_ONCE is out of lock protected region commit 3172fb986666 ("perf/core: Fix WARN in perf_cgroup_switch()") try to fix a concurrency problem between perf_cgroup_switch and perf_cgroup_event_disable. But it does not to move the WARN_ON_ONCE into lock-protected region, so the warning is still be triggered. Fixes: 3172fb986666 ("perf/core: Fix WARN in perf_cgroup_switch()") Signed-off-by: Luo Gengkun Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250626135403.2454105-1-luogengkun@huaweicloud.com commit 05f254a6369ac020fc0382a7cbd3ef64ad997c92 Author: Alexander Tsoy Date: Mon Jun 30 04:33:57 2025 +0300 ALSA: usb-audio: Improve filtering of sample rates on Focusrite devices Previously we were filtering out only upper unsupported sampling rates. This patch adds filtering of the lower unsupported sampling rates. As a result there is 1:1 mapping between altsetting and supported rates. The issue was found on a Scarlett 3rd Gen card (see linked bug), but the same filtering is likely needed for the Scarlett 1st and 2nd Gen as well as the older Clarett cards which lacks Valid Alternate Setting Control. Patch was not tested on a real hardware. Link: https://bugzilla.kernel.org/show_bug.cgi?id=214493 Signed-off-by: Alexander Tsoy Link: https://patch.msgid.link/20250630013357.1327420-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 2b29be967ae456fc09c320d91d52278cf721be1e Author: Vivian Wang Date: Tue Jun 24 16:04:46 2025 +0800 riscv: cpu_ops_sbi: Use static array for boot_data Since commit 6b9f29b81b15 ("riscv: Enable pcpu page first chunk allocator"), if NUMA is enabled, the page percpu allocator may be used on very sparse configurations, or when requested on boot with percpu_alloc=page. In that case, percpu data gets put in the vmalloc area. However, sbi_hsm_hart_start() needs the physical address of a sbi_hart_boot_data, and simply assumes that __pa() would work. This causes the just started hart to immediately access an invalid address and hang. Fortunately, struct sbi_hart_boot_data is not too large, so we can simply allocate an array for boot_data statically, putting it in the kernel image. This fixes NUMA=y SMP boot on Sophgo SG2042. To reproduce on QEMU: Set CONFIG_NUMA=y and CONFIG_DEBUG_VIRTUAL=y, then run with: qemu-system-riscv64 -M virt -smp 2 -nographic \ -kernel arch/riscv/boot/Image \ -append "percpu_alloc=page" Kernel output: [ 0.000000] Booting Linux on hartid 0 [ 0.000000] Linux version 6.16.0-rc1 (dram@sakuya) (riscv64-unknown-linux-gnu-gcc (GCC) 14.2.1 20250322, GNU ld (GNU Binutils) 2.44) #11 SMP Tue Jun 24 14:56:22 CST 2025 ... [ 0.000000] percpu: 28 4K pages/cpu s85784 r8192 d20712 ... [ 0.083192] smp: Bringing up secondary CPUs ... [ 0.086722] ------------[ cut here ]------------ [ 0.086849] virt_to_phys used for non-linear address: (____ptrval____) (0xff2000000001d080) [ 0.088001] WARNING: CPU: 0 PID: 1 at arch/riscv/mm/physaddr.c:14 __virt_to_phys+0xae/0xe8 [ 0.088376] Modules linked in: [ 0.088656] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.16.0-rc1 #11 NONE [ 0.088833] Hardware name: riscv-virtio,qemu (DT) [ 0.088948] epc : __virt_to_phys+0xae/0xe8 [ 0.089001] ra : __virt_to_phys+0xae/0xe8 [ 0.089037] epc : ffffffff80021eaa ra : ffffffff80021eaa sp : ff2000000004bbc0 [ 0.089057] gp : ffffffff817f49c0 tp : ff60000001d60000 t0 : 5f6f745f74726976 [ 0.089076] t1 : 0000000000000076 t2 : 705f6f745f747269 s0 : ff2000000004bbe0 [ 0.089095] s1 : ff2000000001d080 a0 : 0000000000000000 a1 : 0000000000000000 [ 0.089113] a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000 [ 0.089131] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 [ 0.089155] s2 : ffffffff8130dc00 s3 : 0000000000000001 s4 : 0000000000000001 [ 0.089174] s5 : ffffffff8185eff8 s6 : ff2000007f1eb000 s7 : ffffffff8002a2ec [ 0.089193] s8 : 0000000000000001 s9 : 0000000000000001 s10: 0000000000000000 [ 0.089211] s11: 0000000000000000 t3 : ffffffff8180a9f7 t4 : ffffffff8180a9f7 [ 0.089960] t5 : ffffffff8180a9f8 t6 : ff2000000004b9d8 [ 0.089984] status: 0000000200000120 badaddr: ffffffff80021eaa cause: 0000000000000003 [ 0.090101] [] __virt_to_phys+0xae/0xe8 [ 0.090228] [] sbi_cpu_start+0x6e/0xe8 [ 0.090247] [] __cpu_up+0x1e/0x8c [ 0.090260] [] bringup_cpu+0x42/0x258 [ 0.090277] [] cpuhp_invoke_callback+0xe0/0x40c [ 0.090292] [] __cpuhp_invoke_callback_range+0x68/0xfc [ 0.090320] [] _cpu_up+0x11a/0x244 [ 0.090334] [] cpu_up+0x52/0x90 [ 0.090384] [] bringup_nonboot_cpus+0x78/0x118 [ 0.090411] [] smp_init+0x34/0xb8 [ 0.090425] [] kernel_init_freeable+0x148/0x2e4 [ 0.090442] [] kernel_init+0x1e/0x14c [ 0.090455] [] ret_from_fork_kernel+0xe/0xf0 [ 0.090471] [] ret_from_fork_kernel_asm+0x16/0x18 [ 0.090560] ---[ end trace 0000000000000000 ]--- [ 1.179875] CPU1: failed to come online [ 1.190324] smp: Brought up 1 node, 1 CPU Cc: stable@vger.kernel.org Reported-by: Han Gao Fixes: 6b9f29b81b15 ("riscv: Enable pcpu page first chunk allocator") Reviewed-by: Alexandre Ghiti Tested-by: Alexandre Ghiti Signed-off-by: Vivian Wang Link: https://lore.kernel.org/r/20250624-riscv-hsm-boot-data-array-v1-1-50b5eeafbe61@iscas.ac.cn Signed-off-by: Alexandre Ghiti commit 6f49743af42ca43ef6d5487fc6d32f6184909430 Author: Nathan Chancellor Date: Thu Jun 12 12:57:01 2025 -0700 riscv: Require clang-17 or newer for kCFI After the combination of commit c217157bcd1d ("riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS"), which starts using '-fpatchable-function-entry=M,N', and commit d0262e907e29 ("riscv: ftrace: support PREEMPT"), which allows CONFIG_DYNAMIC_FTRACE to be enabled by allmodconfig, allmodconfig builds with clang-16 begin crashing in the generic LLVM kCFI pass (see [1] for the stack trace). clang-17 avoids this crash by moving to target-specific lowering of the kCFI operand bundles [2]. Require clang-17 to select CONFIG_CFI_CLANG to avoid this crash. Fixes: c217157bcd1d ("riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS") Link: https://godbolt.org/z/xG39Pn16o [1] Link: https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2 [2] Signed-off-by: Nathan Chancellor Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/r/20250612-riscv-require-clang-17-for-kcfi-v1-1-216f7cd7d87f@kernel.org Signed-off-by: Alexandre Ghiti commit 14005c96d6649b27fa52d0cd0f492eb3b5586c07 Author: Eugen Hristev Date: Fri Jun 13 16:21:01 2025 -0300 nvme-pci: refresh visible attrs after being checked The sysfs attributes are registered early, but the driver does not know whether they are needed or not at that moment. For the CMB attributes, commit e917a849c3fc ("nvme-pci: refresh visible attrs for cmb attributes") solved this problem by calling nvme_update_attrs after mapping the CMB. However the issue persists for the HMB attributes. To solve the problem, moved the call to nvme_update_attrs after nvme_setup_host_mem, which sets up the HMB. Fixes: e917a849c3fc ("nvme-pci: refresh visible attrs for cmb attributes") Fixes: 86adbf0cdb9e ("nvme: simplify transport specific device attribute handling") Signed-off-by: Eugen Hristev Signed-off-by: André Almeida Signed-off-by: Christoph Hellwig commit 190f4c2c863af7cc5bb354b70e0805f06419c038 Author: Dmitry Bogdanov Date: Wed Jun 25 14:45:33 2025 +0300 nvmet: fix memory leak of bio integrity If nvmet receives commands with metadata there is a continuous memory leak of kmalloc-128 slab or more precisely bio->bi_integrity. Since commit bf4c89fc8797 ("block: don't call bio_uninit from bio_endio") each user of bio_init has to use bio_uninit as well. Otherwise the bio integrity is not getting free. Nvmet uses bio_init for inline bios. Uninit the inline bio to complete deallocation of integrity in bio. Fixes: bf4c89fc8797 ("block: don't call bio_uninit from bio_endio") Signed-off-by: Dmitry Bogdanov Signed-off-by: Christoph Hellwig commit ba806c900379899e5cdd6ca165b900e2081e1c99 Author: Nilay Shroff Date: Thu Jun 26 10:49:19 2025 +0530 nvme: correctly account for namespace head reference counter The blktests nvme/058 manifests an issue where the NVMe subsystem kobject entry remains stale in sysfs, causing a failure during subsequent NVMe module reloads[1]. Specifically, when attempting to register a new NVMe subsystem, the driver encounters a kobejct name collision because a stale kobject still exists. Though, please note that nvme/058 doesn't report any failure and test case passes and it's only during subsequent NVMe module reloads, the stale nvme sub- system kobject entry in sysfs causes the observed symptom[1]. This issue stems from an imbalance in the get/put usage of the namespace head (nshead) reference counter. The nshead holds a reference to the associated NVMe subsystem. If the nshead reference is not properly released, it prevents the cleanup of the subsystem's kobject, leaving nvme subsystem stale entry behind in sysfs. During the failure case, the last namespace path referencing a nshead is removed, but the nshead reference was not released. This occurs because the release logic currently only puts the nshead reference when its state is LIVE. However, in configurations where ANA (Asymmetric Namespace Access) is enabled, a namespace may be associated with an ANA state that is neither optimized nor non-optimized. In this case, the nshead may never transition to LIVE, and the corresponding nshead reference is then never dropped. In fact nvme/058 associates some of nvme namespaces to an inaccessible ANA state and with that nshead is created but it's state is not transitioned to LIVE. So the current logic would then causes nshead reference to be leaked for non-LIVE states. Another scenario, during namespace allocation, the driver first allocates a nshead and then issues an Identify Namespace command. If this command fails — which can happen in tests like nvme/058 that rapidly enables and disables namespaces — we must release the reference to the newly allocated nshead. However this reference release is currently missing in the failure, causing a nshead reference leak. To fix this, we now unconditionally release the nshead reference when the last nvme path referencing to the nshead is removed, regardless of the head’s state. Also during identify namespace failure case we now properly release the nshead reference. So this ensures proper cleanup of the nshead, and consequently, the NVMe subsystem and its associated kobject. This change prevents stale kobject entries from lingering in sysfs and eliminates the module reload failures observed just after running nvme/058. [1] https://lore.kernel.org/all/CAHj4cs8fOBS-eSjsd5LUBzy7faKXJtgLkCN+mDy_-ezCLLLq+Q@mail.gmail.com/ Reported-by: yi.zhang@redhat.com Closes: https://lore.kernel.org/all/CAHj4cs8fOBS-eSjsd5LUBzy7faKXJtgLkCN+mDy_-ezCLLLq+Q@mail.gmail.com/ Fixes: 62188639ec16 ("nvme-multipath: introduce delayed removal of the multipath head node") Tested-by: yi.zhang@redhat.com Signed-off-by: Nilay Shroff Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 2e96d2d8c2a7a6c2cef45593c028d9c5ef180316 Author: Alok Tiwari Date: Sat Jun 28 11:12:32 2025 -0700 nvme: Fix incorrect cdw15 value in passthru error logging Fix an error in nvme_log_err_passthru() where cdw14 was incorrectly printed twice instead of cdw15. This fix ensures accurate logging of the full passthrough command payload. Fixes: 9f079dda1433 ("nvme: allow passthru cmd error logging") Signed-off-by: Alok Tiwari Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig commit 7da6c155a67d42a0c1e4e22bd3f492fabcb14f2c Author: Hans de Goede Date: Thu Jun 26 16:33:17 2025 +0200 drm/i915/dsi: Fix NULL pointer deref in vlv_dphy_param_init() Commit 77ba0b856225 ("drm/i915/dsi: convert vlv_dsi.[ch] to struct intel_display") added a to_intel_display(connector) call to vlv_dphy_param_init() but when vlv_dphy_param_init() gets called the connector object has not been initialized yet, so this leads to a NULL pointer deref: BUG: kernel NULL pointer dereference, address: 000000000000000c ... Hardware name: ASUSTeK COMPUTER INC. T100TA/T100TA, BIOS T100TA.314 08/13/2015 RIP: 0010:vlv_dsi_init+0x4e6/0x1600 [i915] ... Call Trace: ? intel_step_name+0x4be8/0x5c30 [i915] intel_setup_outputs+0x2d6/0xbd0 [i915] intel_display_driver_probe_nogem+0x13f/0x220 [i915] i915_driver_probe+0x3d9/0xaf0 [i915] Use to_intel_display(&intel_dsi->base) instead to fix this. Fixes: 77ba0b856225 ("drm/i915/dsi: convert vlv_dsi.[ch] to struct intel_display") Signed-off-by: Hans de Goede Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/20250626143317.101706-1-hansg@kernel.org Signed-off-by: Jani Nikula (cherry picked from commit 0dc6bfb50a5d0759e726cd36a3d3b7529fd2a627) Signed-off-by: Joonas Lahtinen commit caa7c7a76b78ce41d347003f84975125383e6b59 Author: Dan Carpenter Date: Wed Jun 25 10:21:58 2025 -0500 drm/i915/selftests: Change mock_request() to return error pointers There was an error pointer vs NULL bug in __igt_breadcrumbs_smoketest(). The __mock_request_alloc() function implements the smoketest->request_alloc() function pointer. It was supposed to return error pointers, but it propogates the NULL return from mock_request() so in the event of a failure, it would lead to a NULL pointer dereference. To fix this, change the mock_request() function to return error pointers and update all the callers to expect that. Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking") Signed-off-by: Dan Carpenter Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/685c1417.050a0220.696f5.5c05@mx.google.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 778fa8ad5f0f23397d045c7ebca048ce8def1c43) Signed-off-by: Joonas Lahtinen commit 720fd1cbc0a0f3acdb26aedb3092ab10fe05e7ae Author: Meng Li Date: Sun Jun 8 11:06:16 2025 +0800 arm64: dts: add big-endian property back into watchdog node Watchdog doesn't work on NXP ls1046ardb board because in commit 7c8ffc5555cb("arm64: dts: layerscape: remove big-endian for mmc nodes"), it intended to remove the big-endian from mmc node, but the big-endian of watchdog node is also removed by accident. So, add watchdog big-endian property back. In addition, add compatible string fsl,ls1046a-wdt, which allow big-endian property. Fixes: 7c8ffc5555cb ("arm64: dts: layerscape: remove big-endian for mmc nodes") Cc: stable@vger.kernel.org Signed-off-by: Meng Li Reviewed-by: Ahmad Fatoum Signed-off-by: Shawn Guo commit e0322ac2a3cf7013b7af73b1293670f1e163c92e Author: Wei Fang Date: Wed May 28 16:34:32 2025 +0800 arm64: dts: imx95-15x15-evk: fix the overshoot issue of NETC The overshoot of MDIO, MDC, ENET1_TDx and ENET2_TDx is too high, so reduce the drive strength of these pins. Fixes: e3e8b199aff8 ("arm64: dts: imx95: Add imx95-15x15-evk support") Signed-off-by: Wei Fang Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 36c2bf42b6f02ded87a381edc6b500cd6aac5018 Author: Wei Fang Date: Wed May 28 16:34:31 2025 +0800 arm64: dts: imx95-19x19-evk: fix the overshoot issue of NETC The overshoot of MDIO, MDC and ENET1_TDx is too high, so reduce the drive strength these pins. Fixes: 025cf78938c2 ("arm64: dts: imx95-19x19-evk: add ENETC 0 support") Signed-off-by: Wei Fang Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 63f4970a1219b5256e8ea952096c86dab666d312 Author: Jeff LaBundy Date: Sun Jun 29 18:33:30 2025 -0700 Input: iqs7222 - explicitly define number of external channels The number of external channels is assumed to be a multiple of 10, but this is not the case for IQS7222D. As a result, some CRx pins are wrongly prevented from being assigned to some channels. Address this problem by explicitly defining the number of external channels for cases in which the number of external channels is not equal to the total number of available channels. Fixes: dd24e202ac72 ("Input: iqs7222 - add support for Azoteq IQS7222D") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/aGHVf6HkyFZrzTPy@nixie71 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3 Author: Jens Axboe Date: Sun Jun 29 16:48:28 2025 -0600 io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well io_uring marks a request as dealing with a regular file on S_ISREG. This drives things like retries on short reads or writes, which is generally not expected on a regular file (or bdev). Applications tend to not expect that, so io_uring tries hard to ensure it doesn't deliver short IO on regular files. However, a recent commit added S_IFREG to anonymous inodes. When io_uring is used to read from various things that are backed by anon inodes, like eventfd, timerfd, etc, then it'll now all of a sudden wait for more data when rather than deliver what was read or written in a single operation. This breaks applications that issue reads on anon inodes, if they ask for more data than a single read delivers. Add a check for !S_ANON_INODE as well before setting REQ_F_ISREG to prevent that. Cc: Christian Brauner Cc: stable@vger.kernel.org Link: https://github.com/ghostty-org/ghostty/discussions/7720 Fixes: cfd86ef7e8e7 ("anon_inode: use a proper mode internally") Signed-off-by: Jens Axboe commit b8f89cb723b9e66f5dbd7199e4036fee34fb0de0 Author: Philipp Kerling Date: Sun Jun 29 19:05:05 2025 +0200 smb: client: fix readdir returning wrong type with POSIX extensions When SMB 3.1.1 POSIX Extensions are negotiated, userspace applications using readdir() or getdents() calls without stat() on each individual file (such as a simple "ls" or "find") would misidentify file types and exhibit strange behavior such as not descending into directories. The reason for this behavior is an oversight in the cifs_posix_to_fattr conversion function. Instead of extracting the entry type for cf_dtype from the properly converted cf_mode field, it tries to extract the type from the PDU. While the wire representation of the entry mode is similar in structure to POSIX stat(), the assignments of the entry types are different. Applying the S_DT macro to cf_mode instead yields the correct result. This is also what the equivalent function smb311_posix_info_to_fattr in inode.c already does for stat() etc.; which is why "ls -l" would give the correct file type but "ls" would not (as identified by the colors). Cc: stable@vger.kernel.org Signed-off-by: Philipp Kerling Signed-off-by: Steve French commit fa60c094c19b97e103d653f528f8d9c178b6a5f5 Author: James Clark Date: Fri Jun 27 11:21:37 2025 +0100 spi: spi-fsl-dspi: Clear completion counter before initiating transfer In target mode, extra interrupts can be received between the end of a transfer and halting the module if the host continues sending more data. If the interrupt from this occurs after the reinit_completion() then the completion counter is left at a non-zero value. The next unrelated transfer initiated by userspace will then complete immediately without waiting for the interrupt or writing to the RX buffer. Fix it by resetting the counter before the transfer so that lingering values are cleared. This is done after clearing the FIFOs and the status register but before the transfer is initiated, so no interrupts should be received at this point resulting in other race conditions. Fixes: 4f5ee75ea171 ("spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion") Signed-off-by: James Clark Reviewed-by: Frank Li Link: https://patch.msgid.link/20250627-james-nxp-spi-dma-v4-1-178dba20c120@linaro.org Signed-off-by: Mark Brown commit 96893cdd4760ad94a438c1523cc5ca2470e04670 Author: Marc Kleine-Budde Date: Sun Jun 29 18:15:32 2025 +0200 spi: Raise limit on number of chip selects to 24 We have a system which uses 24 SPI chip selects, raise the hard coded limit accordingly. Signed-off-by: Marc Kleine-Budde Link: https://patch.msgid.link/20250629-spi-increase-number-of-cs-v2-1-85a0a09bab32@pengutronix.de Signed-off-by: Mark Brown commit ddaad4ad774d4ae02047ef873a8e38f62a4b7b01 Author: Gabor Juhos Date: Wed Jun 18 22:22:50 2025 +0200 mtd: nand: qpic_common: prevent out of bounds access of BAM arrays The common QPIC code does not do any boundary checking when it handles the command elements and scatter gater list arrays of a BAM transaction, thus it allows to access out of bounds elements in those. Although it is the responsibility of the given driver to allocate enough space for all possible BAM transaction variations, however there can be mistakes in the driver code which can lead to hidden memory corruption issues which are hard to debug. This kind of problem has been observed during testing the 'spi-qpic-snand' driver. Although the driver has been fixed with a preceding patch, but it still makes sense to reduce the chance of having such errors again later. In order to prevent such errors, change the qcom_alloc_bam_transaction() function to store the number of elements of the arrays in the 'bam_transaction' strucutre during allocation. Also, add sanity checks to the qcom_prep_bam_dma_desc_{cmd,data}() functions to avoid using out of bounds indices for the arrays. Tested-by: Lakshmi Sowjanya D # on SDX75 Acked-by: Miquel Raynal Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250618-qpic-snand-avoid-mem-corruption-v3-2-319c71296cda@gmail.com Signed-off-by: Mark Brown commit d85d0380292a7e618915069c3579ae23c7c80339 Author: Gabor Juhos Date: Wed Jun 18 22:22:49 2025 +0200 spi: spi-qpic-snand: reallocate BAM transactions Using the mtd_nandbiterrs module for testing the driver occasionally results in weird things like below. 1. swiotlb mapping fails with the following message: [ 85.926216] qcom_snand 79b0000.spi: swiotlb buffer is full (sz: 4294967294 bytes), total 512 (slots), used 0 (slots) [ 85.932937] qcom_snand 79b0000.spi: failure in mapping desc [ 87.999314] qcom_snand 79b0000.spi: failure to write raw page [ 87.999352] mtd_nandbiterrs: error: write_oob failed (-110) Rebooting the board after this causes a panic due to a NULL pointer dereference. 2. If the swiotlb mapping does not fail, rebooting the board may result in a different panic due to a bad spinlock magic: [ 256.104459] BUG: spinlock bad magic on CPU#3, procd/2241 [ 256.104488] Unable to handle kernel paging request at virtual address ffffffff0000049b ... Investigating the issue revealed that these symptoms are results of memory corruption which is caused by out of bounds access within the driver. The driver uses a dynamically allocated structure for BAM transactions, which structure must have enough space for all possible variations of different flash operations initiated by the driver. The required space heavily depends on the actual number of 'codewords' which is calculated from the pagesize of the actual NAND chip. Although the qcom_nandc_alloc() function allocates memory for the BAM transactions during probe, but since the actual number of 'codewords' is not yet know the allocation is done for one 'codeword' only. Because of this, whenever the driver does a flash operation, and the number of the required transactions exceeds the size of the allocated arrays the driver accesses memory out of the allocated range. To avoid this, change the code to free the initially allocated BAM transactions memory, and allocate a new one once the actual number of 'codewords' required for a given NAND chip is known. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Reviewed-by: Md Sadre Alam Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250618-qpic-snand-avoid-mem-corruption-v3-1-319c71296cda@gmail.com Signed-off-by: Mark Brown commit eeca209124bb694650026216d3e59cae02d91686 Author: Shree Ramamoorthy Date: Fri Jun 20 10:45:41 2025 -0500 regulator: tps65219: Fix devm_kmalloc size allocation In probe(), two arrays of structs are allocated with the devm_kmalloc() function, but the memory size of the allocations were given as the arrays' length (pmic->common_irq_size for the first call and pmic->dev_irq_size for the second devm_kmalloc call). The memory size should have been the total memory needed. This led to a heap overflow when the struct array was used. The issue was first discovered with the PocketBeagle2 and BeaglePlay. The common and device-specific structs are now allocated one at a time within the loop. Fixes: 38c9f98db20a ("regulator: tps65219: Add support for TPS65215 Regulator IRQs") Reported-by: Dhruva Gole Closes: https://lore.kernel.org/all/20250619153526.297398-1-d-gole@ti.com/ Tested-by: Robert Nelson Acked-by: Andrew Davis Signed-off-by: Shree Ramamoorthy Reviewed-by: Nishanth Menon Link: https://patch.msgid.link/20250620154541.2713036-1-s-ramamoorthy@ti.com Signed-off-by: Mark Brown commit ca46946a482238b0cdea459fb82fc837fb36260e Author: Alessandro Carminati Date: Thu Jun 26 08:38:09 2025 +0000 regulator: core: fix NULL dereference on unbind due to stale coupling data Failing to reset coupling_desc.n_coupled after freeing coupled_rdevs can lead to NULL pointer dereference when regulators are accessed post-unbind. This can happen during runtime PM or other regulator operations that rely on coupling metadata. For example, on ridesx4, unbinding the 'reg-dummy' platform device triggers a panic in regulator_lock_recursive() due to stale coupling state. Ensure n_coupled is set to 0 to prevent access to invalid pointers. Signed-off-by: Alessandro Carminati Link: https://patch.msgid.link/20250626083809.314842-1-acarmina@redhat.com Signed-off-by: Mark Brown commit c871c199accb39d0f4cb941ad0dccabfc21e9214 Author: Abdun Nihaal Date: Thu Jun 26 22:58:21 2025 +0530 regmap: fix potential memory leak of regmap_bus When __regmap_init() is called from __regmap_init_i2c() and __regmap_init_spi() (and their devm versions), the bus argument obtained from regmap_get_i2c_bus() and regmap_get_spi_bus(), may be allocated using kmemdup() to support quirks. In those cases, the bus->free_on_exit field is set to true. However, inside __regmap_init(), buf is not freed on any error path. This could lead to a memory leak of regmap_bus when __regmap_init() fails. Fix that by freeing bus on error path when free_on_exit is set. Fixes: ea030ca68819 ("regmap-i2c: Set regmap max raw r/w from quirks") Signed-off-by: Abdun Nihaal Link: https://patch.msgid.link/20250626172823.18725-1-abdun.nihaal@gmail.com Signed-off-by: Mark Brown commit a7528e9beadbddcec21b394ce5fa8dc4e5cdaa24 Author: Charles Keepax Date: Thu Jun 26 15:18:41 2025 +0100 ASoC: Intel: soc-acpi: arl: Correct order of cs42l43 matches Matches should go from more specific to less specific, correct the ordering of two cs42l43 entries. Fixes: c0524067653d ("ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250626141841.77780-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit be2e1a63448b35bd6736b5934f7720534649b51e Author: Srinivas Kandagatla Date: Fri Jun 27 17:03:29 2025 +0100 MAINTAINERS: update Qualcomm audio codec drivers list Some of the codec drivers like wcd939x are missing in the MAINTAINERS which is resulting in incorrect list from get_maintainers script. Fix this by using wildcard matching on both wcd93* and wsa88* codec and bindings. Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20250627160329.442795-1-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown commit dc78f7e59169d3f0e6c3c95d23dc8e55e95741e2 Author: Arun Raghavan Date: Thu Jun 26 09:08:25 2025 -0400 ASoC: fsl_sai: Force a software reset when starting in consumer mode On an imx8mm platform with an external clock provider, when running the receiver (arecord) and triggering an xrun with xrun_injection, we see a channel swap/offset. This happens sometimes when running only the receiver, but occurs reliably if a transmitter (aplay) is also concurrently running. It seems that the SAI loses track of frame sync during the trigger stop -> trigger start cycle that occurs during an xrun. Doing just a FIFO reset in this case does not suffice, and only a software reset seems to get it back on track. This looks like the same h/w bug that is already handled for the producer case, so we now do the reset unconditionally on config disable. Signed-off-by: Arun Raghavan Reported-by: Pieterjan Camerlynck Fixes: 3e3f8bd56955 ("ASoC: fsl_sai: fix no frame clk in master mode") Cc: stable@vger.kernel.org Reviewed-by: Fabio Estevam Link: https://patch.msgid.link/20250626130858.163825-1-arun@arunraghavan.net Signed-off-by: Mark Brown commit 960aed31eedbaeb2e47b1bc485b462fd38a53311 Author: Bard Liao Date: Thu Jun 26 14:44:20 2025 +0800 ASoC: Intel: SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_ACPI_INTEL_MATCH The helpers that are provided by SND_SOC_ACPI_INTEL_MATCH (soc-acpi-intel-ssp-common) are used in SND_SOC_INTEL_SOF_BOARD_HELPERS (sof_board_helpers). SND_SOC_ACPI_INTEL_MATCH is selected by machine drivers. When skl_hda_dsp_generic uses the board helpers, it select SND_SOC_INTEL_SOF_BOARD_HELPERS only but not SND_SOC_ACPI_INTEL_MATCH which initroduce the undefined symbol errors. However, it makes more sense that SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_ACPI_INTEL_MATCH itself. Fixes: b28b23dea314 ("ASoC: Intel: skl_hda_dsp_generic: use common module for DAI links") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506141543.dN0JJyZC-lkp@intel.com/ Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Liam Girdwood Link: https://patch.msgid.link/20250626064420.450334-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit cbe876121633dadb2b0ce52711985328638e9aab Author: Shengjiu Wang Date: Wed Jun 25 10:05:04 2025 +0800 ASoC: fsl_asrc: use internal measured ratio for non-ideal ratio mode When USRC=0, there is underrun issue for the non-ideal ratio mode; according to the reference mannual, the internal measured ratio can be used with USRC=1 and IDRC=0. Fixes: d0250cf4f2ab ("ASoC: fsl_asrc: Add an option to select internal ratio mode") Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250625020504.2728161-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af Author: Linus Torvalds Date: Sun Jun 29 13:09:04 2025 -0700 Linux 6.16-rc4 commit fe49aae0fcb348b656bbde2eb1d1c75d8a1a5c3c Author: Janne Grunau Date: Sat Jun 28 13:36:00 2025 +0200 rust: init: Fix generics in *_init! macros The match pattern for a optional trailing comma in the list of generics is erroneously repeated in the code block resulting in following error: | error: attempted to repeat an expression containing no syntax variables matched as repeating at this depth | --> rust/kernel/init.rs:301:73 | | | 301 | ::pin_init::try_pin_init!($(&$this in)? $t $(::<$($generics),* $(,)?>)? { | | ^^^ Remove "$(,)?" from all code blocks in the try_init! and try_pin_init! definitions. Cc: stable@vger.kernel.org Fixes: 578eb8b6db13 ("rust: pin-init: move the default error behavior of `try_[pin_]init`") Signed-off-by: Janne Grunau Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250628-rust_init_trailing_comma-v1-1-2d162ae1a757@jannau.net Signed-off-by: Miguel Ojeda commit afa9a6f4f5744d907954f5b708d76c9bffa43234 Merge: 798804b69fb6c5 a55bc4ffc06d8c Author: Linus Torvalds Date: Sun Jun 29 09:25:55 2025 -0700 Merge tag 'staging-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fix from Greg KH: "Here is a single staging driver fix for 6.16-rc4. It resolves a build error in the rtl8723bs driver for some versions of clang on arm64 when checking the frame size with -Wframe-larger-than. It has been in linux-next for a while now with no reported issues" * tag 'staging-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8723bs: Avoid memset() in aes_cipher() and aes_decipher() commit 798804b69fb6c5b5a4a5d38cd6054e42fc4a174e Merge: 3b1890e4b250c9 09812134071b39 Author: Linus Torvalds Date: Sun Jun 29 09:21:27 2025 -0700 Merge tag 'tty-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are five small serial and tty and vt fixes for 6.16-rc4. Included in here are: - kerneldoc fixes for recent vt changes - imx serial driver fix - of_node sysfs fix for a regression - vt missing notification fix - 8250 dt bindings fix All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive serial: imx: Restore original RXTL for console to fix data loss serial: core: restore of_node information in sysfs vt: fix kernel-doc warnings in ucs_get_fallback() vt: add missing notification when switching back to text mode commit 1131e70558bc70f1fc52515281de2663e961e1cc Author: Kim Seer Paller Date: Thu Jun 26 16:38:12 2025 +0800 iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode In the current implementation of ad3530r_set_dac_powerdown() function, the macro AD3530R_OP_MODE_CHAN_MSK(chan->channel) is used to generate the bitmask for the operating mode of a specific channel. However, this macro does not account for channels 4-7, which map to the second register AD3530R_OUTPUT_OPERATING_MODE_1 for the 8 channeled device. As a result, the bitmask is incorrectly calculated for these channels, leading to improper configuration of the powerdown mode. Resolve this issue by adjusting the channel index for channels 4-7 by subtracting 4 before applying the macro. This ensures that the correct bitmask is generated for the second register. Fixes: 93583174a3df ("iio: dac: ad3530r: Add driver for AD3530R and AD3531R") Signed-off-by: Kim Seer Paller Reviewed-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250626-bug_fix-v1-1-eb3c2b370f10@analog.com Cc: Signed-off-by: Jonathan Cameron commit 24fa69894ea3f76ecb13d7160692ee574a912803 Author: David Lechner Date: Thu Jun 19 10:24:22 2025 -0500 iio: adc: ad7380: fix adi,gain-milli property parsing Change the data type of the "adi,gain-milli" property from u32 to u16. The devicetree binding specifies it as uint16, so we need to read it as such to avoid an -EOVERFLOW error when parsing the property. Fixes: c904e6dcf402 ("iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250619-iio-adc-ad7380-fix-adi-gain-milli-parsing-v1-1-4c27fb426860@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit 7b86482632788acd48d7b9ee1867f5ad3a32ccbb Author: David Lechner Date: Wed Jun 11 10:04:58 2025 -0500 iio: adc: ad7949: use spi_is_bpw_supported() Use spi_is_bpw_supported() instead of directly accessing spi->controller ->bits_per_word_mask. bits_per_word_mask may be 0, which implies that 8-bits-per-word is supported. spi_is_bpw_supported() takes this into account while spi_ctrl_mask == SPI_BPW_MASK(8) does not. Fixes: 0b2a740b424e ("iio: adc: ad7949: enable use with non 14/16-bit controllers") Closes: https://lore.kernel.org/linux-spi/c8b8a963-6cef-4c9b-bfef-dab2b7bd0b0f@sirena.org.uk/ Signed-off-by: David Lechner Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250611-iio-adc-ad7949-use-spi_is_bpw_supported-v1-1-c4e15bfd326e@baylibre.com Signed-off-by: Jonathan Cameron commit 1fe16dc1a2f5057772e5391ec042ed7442966c9a Author: Sean Nyekjaer Date: Tue Jun 3 14:25:44 2025 +0200 iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush fxls8962af_fifo_flush() uses indio_dev->active_scan_mask (with iio_for_each_active_channel()) without making sure the indio_dev stays in buffer mode. There is a race if indio_dev exits buffer mode in the middle of the interrupt that flushes the fifo. Fix this by calling synchronize_irq() to ensure that no interrupt is currently running when disabling buffer mode. Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read [...] _find_first_bit_le from fxls8962af_fifo_flush+0x17c/0x290 fxls8962af_fifo_flush from fxls8962af_interrupt+0x80/0x178 fxls8962af_interrupt from irq_thread_fn+0x1c/0x7c irq_thread_fn from irq_thread+0x110/0x1f4 irq_thread from kthread+0xe0/0xfc kthread from ret_from_fork+0x14/0x2c Fixes: 79e3a5bdd9ef ("iio: accel: fxls8962af: add hw buffered sampling") Cc: stable@vger.kernel.org Suggested-by: David Lechner Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250603-fxlsrace-v2-1-5381b36ba1db@geanix.com Signed-off-by: Jonathan Cameron commit 3281ddcea6429f7bc1fdb39d407752dd1371aba9 Author: Chen-Yu Tsai Date: Sat Jun 7 21:56:27 2025 +0800 iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps The AXP717 ADC channel maps is missing a sentinel entry at the end. This causes a KASAN warning. Add the missing sentinel entry. Fixes: 5ba0cb92584b ("iio: adc: axp20x_adc: add support for AXP717 ADC") Signed-off-by: Chen-Yu Tsai Link: https://patch.msgid.link/20250607135627.2086850-1-wens@kernel.org Cc: Signed-off-by: Jonathan Cameron commit fd8e6f8729629407d2d932116d83b9cd71c17d80 Author: Rodrigo Gobbi Date: Tue May 27 18:51:06 2025 -0300 dt-bindings: iio: gyro: invensense,mpu3050: change irq maxItems The mpu3050 datasheet describes that this IC only supports one INT pin, which means one item with two cells inside binding. Change max to match this description. Signed-off-by: Rodrigo Gobbi Fixes: 749787477ae4 ("dt-bindings:iio:gyro:invensense,mpu3050: txt to yaml format conversion.") Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250527215818.13000-1-rodrigo.gobbi.7@gmail.com Signed-off-by: Jonathan Cameron commit 9f92e93e257b33e73622640a9205f8642ec16ddd Author: Maud Spierings Date: Tue May 27 08:36:08 2025 +0200 iio: common: st_sensors: Fix use of uninitialize device structs Throughout the various probe functions &indio_dev->dev is used before it is initialized. This caused a kernel panic in st_sensors_power_enable() when the call to devm_regulator_bulk_get_enable() fails and then calls dev_err_probe() with the uninitialized device. This seems to only cause a panic with dev_err_probe(), dev_err(), dev_warn() and dev_info() don't seem to cause a panic, but are fixed as well. The issue is reported and traced here: [1] Link: https://lore.kernel.org/all/AM7P189MB100986A83D2F28AF3FFAF976E39EA@AM7P189MB1009.EURP189.PROD.OUTLOOK.COM/ [1] Cc: stable@vger.kernel.org Signed-off-by: Maud Spierings Reviewed-by: Andy Shevchenko Link: https://... [1] Link: https://patch.msgid.link/20250527-st_iio_fix-v4-1-12d89801c761@gocontroll.com Signed-off-by: Jonathan Cameron commit 6ac609d1fba19d5d40fb3c81201ffadcb6d00fb3 Author: David Lechner Date: Fri May 30 16:50:14 2025 -0500 iio: adc: adi-axi-adc: fix ad7606_bus_reg_read() Mask the value read before returning it. The value read over the parallel bus via the AXI ADC IP block contains both the address and the data, but callers expect val to only contain the data. axi_adc_raw_write() takes a u32 parameter, so addr was the wrong type. This wasn't causing any issues but is corrected anyway since we are touching the same line to add a new variable. Cc: stable@vger.kernel.org Fixes: 79c47485e438 ("iio: adc: adi-axi-adc: add support for AD7606 register writing") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250530-iio-adc-adi-axi-adc-fix-ad7606_bus_reg_read-v2-1-ad2dfc0694ce@baylibre.com Signed-off-by: Jonathan Cameron commit 43d8c4a3a3c7caa7fcc01d1bb349920db7004266 Author: Angelo Dureghello Date: Mon May 26 15:19:08 2025 +0200 dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning Fix following dt_schema warning when offload is used: DTC [C] arch/arm/boot/dts/xilinx/zynq-zed-adv7511-ad7606.dtb /home/angelo/dev-baylibre/linux-iio/arch/arm/boot/dts/xilinx/zynq-zed-adv7511-ad7606.dtb: adc@0: 'oneOf' conditional failed, one must be fixed: 'interrupts' is a required property 'io-backends' is a required property from schema $id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml# There isn't any reason that we couldn't have interrupts wired up at the same time we are using io-backends or SPI offload, so dropping off the related "oneOf" block entirely. Fixes: 81fe5529e812 ("dt-bindings: iio: adc: adi,ad7606: add SPI offload properties") Signed-off-by: Angelo Dureghello Acked-by: Conor Dooley Link: https://patch.msgid.link/20250526-wip-bl-ad7606-dtschema-fixes-v2-1-9bd56d039489@baylibre.com Signed-off-by: Jonathan Cameron commit 3b1890e4b250c95cf93a0a772433c3a2300e7c8f Merge: cc69ac7a65820d a3f3040657417a Author: Linus Torvalds Date: Sun Jun 29 08:43:54 2025 -0700 Merge tag 'edac_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: - Consider secondary address mask registers in amd64_edac in order to get the correct total memory size of the system * tag 'edac_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs commit cc69ac7a65820dd96c48fd2988255f8acc2527f2 Merge: 2fc18d0b8958dc fa7d0f83c5c422 Author: Linus Torvalds Date: Sun Jun 29 08:28:24 2025 -0700 Merge tag 'x86_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Make sure DR6 and DR7 are initialized to their architectural values and not accidentally cleared, leading to misconfigurations * tag 'x86_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/traps: Initialize DR7 by writing its architectural reset value x86/traps: Initialize DR6 by writing its architectural reset value commit 2fc18d0b8958dcea74c7357ebbc6912d0d6e2936 Merge: 753a0f61b90915 1476b218327b89 Author: Linus Torvalds Date: Sun Jun 29 08:16:02 2025 -0700 Merge tag 'perf_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Borislav Petkov: - Make sure an AUX perf event is really disabled when it overruns * tag 'perf_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/aux: Fix pending disable flow when the AUX ring buffer overruns commit 753a0f61b9091536425d656c145881b70eb402f7 Merge: dfba48a70cb688 a24cc6ce1933ea Author: Linus Torvalds Date: Sun Jun 29 08:09:13 2025 -0700 Merge tag 'locking_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Borislav Petkov: - Make sure the new futex phash is not copied during fork in order to avoid a double-free * tag 'locking_urgent_for_v6.16_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Initialize futex_phash_new during fork(). commit e5d110fec068c7708002f4f372bf9ecdc1bc3da2 Author: Johannes Berg Date: Wed Jun 25 20:42:21 2025 +0300 wifi: iwlwifi: pcie: fix locking on invalid TOP reset If a TOP reset were to ever be erroneously requested on HW prior to SC, the code warns and returns, but doesn't take care to unlock the mutex in this case. Fix that. Fixes: 909e1be65462 ("wifi: iwlwifi: implement TOP reset") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202506100707.WAnP5ePA-lkp@intel.com/ Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250625204210.19a0378838b1.I6bdc58d4996e995e1358ad94d4cc5017f3abf47b@changeid Signed-off-by: Miri Korenblit commit ce174b48aebb3fa18fe48c59a3d10a89c414fdf2 Author: Edip Hazuri Date: Fri Jun 27 23:34:16 2025 +0300 ALSA: hda/realtek - Add mute LED support for HP Victus 15-fb2xxx The mute led on this laptop is using ALC245 but requires a quirk to work This patch enables the existing quirk for the device. Tested on my friend's Victus 15-fb2xxx Laptop. The LED behaviour works as intended. Cc: Signed-off-by: Edip Hazuri Link: https://patch.msgid.link/20250627203415.56785-2-edip@medip.dev Signed-off-by: Takashi Iwai commit e0a911ac86857a73182edde9e50d9b4b949b7f01 Author: Daniel Dadap Date: Thu Jun 26 16:16:30 2025 -0500 ALSA: hda: Add missing NVIDIA HDA codec IDs Add codec IDs for several NVIDIA products with HDA controllers to the snd_hda_id_hdmi[] patch table. Signed-off-by: Daniel Dadap Cc: Link: https://patch.msgid.link/aF24rqwMKFWoHu12@ddadap-lakeline.nvidia.com Signed-off-by: Takashi Iwai commit 2ab3ba39153dcdc9de7d2eec42bf19f84d4844cf Author: Thomas Weißschuh Date: Wed Jun 18 09:52:20 2025 +0200 drm/bridge: samsung-dsim: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping locks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. Signed-off-by: Thomas Weißschuh Signed-off-by: Inki Dae commit 5d91394f236167ac624b823820faf4aa928b889e Author: Marek Szyprowski Date: Wed Jun 18 14:06:26 2025 +0200 drm/exynos: fimd: Guard display clock control with runtime PM calls Commit c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable and post-disable") changed the call sequence to the CRTC enable/disable and bridge pre_enable/post_disable methods, so those bridge methods are now called when CRTC is not yet enabled. This causes a lockup observed on Samsung Peach-Pit/Pi Chromebooks. The source of this lockup is a call to fimd_dp_clock_enable() function, when FIMD device is not yet runtime resumed. It worked before the mentioned commit only because the CRTC implemented by the FIMD driver was always enabled what guaranteed the FIMD device to be runtime resumed. This patch adds runtime PM guards to the fimd_dp_clock_enable() function to enable its proper operation also when the CRTC implemented by FIMD is not yet enabled. Fixes: 196e059a8a6a ("drm/exynos: convert clock_enable crtc callback to pipeline clock") Signed-off-by: Marek Szyprowski Reviewed-by: Tomi Valkeinen Signed-off-by: Inki Dae commit b846350aa272de99bf6fecfa6b08e64ebfb13173 Author: Kaustabh Chakraborty Date: Fri Jun 27 00:50:30 2025 +0530 drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling If there's support for another console device (such as a TTY serial), the kernel occasionally panics during boot. The panic message and a relevant snippet of the call stack is as follows: Unable to handle kernel NULL pointer dereference at virtual address 000000000000000 Call trace: drm_crtc_handle_vblank+0x10/0x30 (P) decon_irq_handler+0x88/0xb4 [...] Otherwise, the panics don't happen. This indicates that it's some sort of race condition. Add a check to validate if the drm device can handle vblanks before calling drm_crtc_handle_vblank() to avoid this. Cc: stable@vger.kernel.org Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver") Signed-off-by: Kaustabh Chakraborty Signed-off-by: Inki Dae commit 18665eaa2acbe17da11c2748ac43c2f4ec2fad85 Author: Thomas Weißschuh Date: Wed Jun 18 09:52:21 2025 +0200 drm/exynos: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping locks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. Signed-off-by: Thomas Weißschuh Signed-off-by: Inki Dae commit 14da58521ee5b31976f5b5b437438b8f28f9ba51 Author: Kent Overstreet Date: Sat Jun 28 21:54:58 2025 -0400 bcachefs: fix btree_trans_peek_prev_journal() Signed-off-by: Kent Overstreet commit dfba48a70cb68888efb494c9642502efe73614ed Merge: ded779017ad78f f40213cd93e608 Author: Linus Torvalds Date: Sat Jun 28 15:23:17 2025 -0700 Merge tag 'i2c-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - imx: fix SMBus protocol compliance during block read - omap: fix error handling path in probe - robotfuzz, tiny-usb: prevent zero-length reads - x86, designware, amdisp: fix build error when modules are disabled (agreed to go in via i2c) - scx200_acb: fix build error because of missing HAS_IOPORT * tag 'i2c-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: scx200_acb: depends on HAS_IOPORT i2c: omap: Fix an error handling path in omap_i2c_probe() platform/x86: Use i2c adapter name to fix build errors i2c: amd-isp: Initialize unique adapter name i2c: designware: Initialize adapter name only when not set i2c: tiny-usb: disable zero-length read messages i2c: robotfuzz-osif: disable zero-length read messages i2c: imx: fix emulated smbus block read commit ded779017ad78fc9df3e9d9ae0e39d2e73865851 Merge: 3a3de75a68ff8d 6921d1e07cb5ed Author: Linus Torvalds Date: Sat Jun 28 11:39:24 2025 -0700 Merge tag 'trace-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: - Fix possible UAF on error path in filter_free_subsystem_filters() When freeing a subsystem filter, the filter for the subsystem is passed in to be freed and all the events within the subsystem will have their filter freed too. In order to free without waiting for RCU synchronization, list items are allocated to hold what is going to be freed to free it via a call_rcu(). If the allocation of these items fails, it will call the synchronization directly and free after that (causing a bit of delay for the user). The subsystem filter is first added to this list and then the filters for all the events under the subsystem. The bug is if one of the allocations of the list items for the event filters fail to allocate, it jumps to the "free_now" label which will free the subsystem filter, then all the items on the allocated list, and then the event filters that were not added to the list yet. But because the subsystem filter was added first, it gets freed twice. The solution is to add the subsystem filter after the events, and then if any of the allocations fail it will not try to free any of them twice * tag 'trace-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Fix filter logic error commit 3a3de75a68ff8d52466980c4cfb2c16192d5e4e7 Merge: aaf724ed692647 955853cf83657f Author: Linus Torvalds Date: Sat Jun 28 11:35:11 2025 -0700 Merge tag 'loongarch-fixes-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: - replace __ASSEMBLY__ with __ASSEMBLER__ in headers like others - fix build warnings about export.h - reserve the EFI memory map region for kdump - handle __init vs inline mismatches - fix some KVM bugs * tag 'loongarch-fixes-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Disable updating of "num_cpu" and "feature" LoongArch: KVM: Check validity of "num_cpu" from user space LoongArch: KVM: Check interrupt route from physical CPU LoongArch: KVM: Fix interrupt route update with EIOINTC LoongArch: KVM: Add address alignment check for IOCSR emulation LoongArch: KVM: Avoid overflow with array index LoongArch: Handle KCOV __init vs inline mismatches LoongArch: Reserve the EFI memory map region LoongArch: Fix build warnings about export.h LoongArch: Replace __ASSEMBLY__ with __ASSEMBLER__ in headers commit 62355f1f87b8c7f8785a8dd3cd5ca6e5b513566a Author: Niklas Schnelle Date: Wed Jun 25 11:28:30 2025 +0200 s390/pci: Allow automatic recovery with minimal driver support According to Documentation/PCI/pci-error-recovery.rst only the error_detected() callback in the err_handler struct is mandatory for a driver to support error recovery. So far s390's error recovery chose a stricter approach also requiring slot_reset() and resume(). Relax this requirement and only require error_detected(). If a callback is not implemented EEH and AER treat this as PCI_ERS_RESULT_NONE. This return value is otherwise used by drivers abstaining from their vote on how to proceed with recovery and currently also not supported by s390's recovery code. So to support missing callbacks in-line with other implementors of the recovery flow, also handle PCI_ERS_RESULT_NONE. Since s390 only does per PCI function recovery and does not do voting, treat PCI_ERS_RESULT_NONE optimistically and proceed through recovery unless other failures prevent this. Reviewed-by: Farhan Ali Reviewed-by: Julian Ruess Signed-off-by: Niklas Schnelle Signed-off-by: Alexander Gordeev commit b97a7972b1f4f81417840b9a2ab0c19722b577d5 Author: Niklas Schnelle Date: Wed Jun 25 11:28:29 2025 +0200 s390/pci: Do not try re-enabling load/store if device is disabled If a device is disabled unblocking load/store on its own is not useful as a full re-enable of the function is necessary anyway. Note that SCLP Write Event Data Action Qualifier 0 (Reset) leaves the device disabled and triggers this case unless the driver already requests a reset. Cc: stable@vger.kernel.org Fixes: 4cdf2f4e24ff ("s390/pci: implement minimal PCI error recovery") Reviewed-by: Farhan Ali Signed-off-by: Niklas Schnelle Signed-off-by: Alexander Gordeev commit 45537926dd2aaa9190ac0fac5a0fbeefcadfea95 Author: Niklas Schnelle Date: Wed Jun 25 11:28:28 2025 +0200 s390/pci: Fix stale function handles in error handling The error event information for PCI error events contains a function handle for the respective function. This handle is generally captured at the time the error event was recorded. Due to delays in processing or cascading issues, it may happen that during firmware recovery multiple events are generated. When processing these events in order Linux may already have recovered an affected function making the event information stale. Fix this by doing an unconditional CLP List PCI function retrieving the current function handle with the zdev->state_lock held and ignoring the event if its function handle is stale. Cc: stable@vger.kernel.org Fixes: 4cdf2f4e24ff ("s390/pci: implement minimal PCI error recovery") Reviewed-by: Julian Ruess Reviewed-by: Gerd Bayer Reviewed-by: Farhan Ali Signed-off-by: Niklas Schnelle Signed-off-by: Alexander Gordeev commit efe3e3ae5a66cb38ef29c909e951b4039044bae9 Author: Mathias Nyman Date: Fri Jun 27 17:41:22 2025 +0300 xhci: dbc: Flush queued requests before stopping dbc Flush dbc requests when dbc is stopped and transfer rings are freed. Failure to flush them lead to leaking memory and dbc completing odd requests after resuming from suspend, leading to error messages such as: [ 95.344392] xhci_hcd 0000:00:0d.0: no matched request Cc: stable Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250627144127.3889714-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2b857d69a5e116150639a0c6c39c86cc329939ee Author: Łukasz Bartosik Date: Fri Jun 27 17:41:21 2025 +0300 xhci: dbctty: disable ECHO flag by default When /dev/ttyDBC0 device is created then by default ECHO flag is set for the terminal device. However if data arrives from a peer before application using /dev/ttyDBC0 applies its set of terminal flags then the arriving data will be echoed which might not be desired behavior. Fixes: 4521f1613940 ("xhci: dbctty: split dbc tty driver registration and unregistration functions.") Cc: stable Signed-off-by: Łukasz Bartosik Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/stable/20250610111802.18742-1-ukaszb%40chromium.org Link: https://lore.kernel.org/r/20250627144127.3889714-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cd65ee81240e8bc3c3119b46db7f60c80864b90b Author: Hongyu Xie Date: Fri Jun 27 17:41:20 2025 +0300 xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS Disable stream for platform xHC controller with broken stream. Fixes: 14aec589327a6 ("storage: accept some UAS devices if streams are unavailable") Cc: stable Signed-off-by: Hongyu Xie Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250627144127.3889714-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cbc889ab0122366f6cdbe3c28d477c683ebcebc2 Author: Raju Rangoju Date: Fri Jun 27 17:41:19 2025 +0300 usb: xhci: quirk for data loss in ISOC transfers During the High-Speed Isochronous Audio transfers, xHCI controller on certain AMD platforms experiences momentary data loss. This results in Missed Service Errors (MSE) being generated by the xHCI. The root cause of the MSE is attributed to the ISOC OUT endpoint being omitted from scheduling. This can happen when an IN endpoint with a 64ms service interval either is pre-scheduled prior to the ISOC OUT endpoint or the interval of the ISOC OUT endpoint is shorter than that of the IN endpoint. Consequently, the OUT service is neglected when an IN endpoint with a service interval exceeding 32ms is scheduled concurrently (every 64ms in this scenario). This issue is particularly seen on certain older AMD platforms. To mitigate this problem, it is recommended to adjust the service interval of the IN endpoint to not exceed 32ms (interval 8). This adjustment ensures that the OUT endpoint will not be bypassed, even if a smaller interval value is utilized. Cc: stable Signed-off-by: Raju Rangoju Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250627144127.3889714-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 80e08394377559ed5a2ccadd861e62d24b826911 Author: SCHNEIDER Johannes Date: Wed Jun 25 07:49:16 2025 +0000 usb: dwc3: gadget: Fix TRB reclaim logic for short transfers and ZLPs Commit 96c7bf8f6b3e ("usb: dwc3: gadget: Cleanup SG handling") updated the TRB reclaim path to use the TRB CHN (Chain) bit to determine whether a TRB was part of a chain. However, this inadvertently changed the behavior of reclaiming the final TRB in some scatter-gather or short transfer cases. In particular, if the final TRB did not have the CHN bit set, the cleanup path could incorrectly skip clearing the HWO (Hardware Own) bit, leaving stale TRBs in the ring. This resulted in broken data transfer completions in userspace, notably for MTP over FunctionFS. Fix this by unconditionally clearing the HWO bit during TRB reclaim, regardless of the CHN bit state. This restores correct behavior especially for transfers that require ZLPs or end on non-CHN TRBs. Fixes: 61440628a4ff ("usb: dwc3: gadget: Cleanup SG handling") Signed-off-by: Johannes Schneider Acked-by: Thinh Nguyen Cc: stable Link: https://lore.kernel.org/r/AM8PR06MB7521A29A8863C838B54987B6BC7BA@AM8PR06MB7521.eurprd06.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 30ad231a5029bfa16e46ce868497b1a5cdd3c24d Author: JP Kobryn Date: Fri Jun 27 10:49:35 2025 -0700 x86/mce: Make sure CMCI banks are cleared during shutdown on Intel CMCI banks are not cleared during shutdown on Intel CPUs. As a side effect, when a kexec is performed, CPUs coming back online are unable to rediscover/claim these occupied banks which breaks MCE reporting. Clear the CPU ownership during shutdown via cmci_clear() so the banks can be reclaimed and MCE reporting will become functional once more. [ bp: Massage commit message. ] Reported-by: Aijay Adams Signed-off-by: JP Kobryn Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Reviewed-by: Qiuxu Zhuo Cc: Link: https://lore.kernel.org/20250627174935.95194-1-inwardvessel@gmail.com commit aaf724ed69264719550ec4f194d3ab17b886af9a Merge: 0fd39af24e37a6 263debecb4aa7c Author: Linus Torvalds Date: Fri Jun 27 20:38:05 2025 -0700 Merge tag 'v6.16-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - Multichannel reconnect lock ordering deadlock fix - Fix for regression in handling native Windows symlinks - Three smbdirect fixes: - oops in RDMA response processing - smbdirect memcpy issue - fix smbdirect regression with large writes (smbdirect test cases now all passing) - Fix for "FAILED_TO_PARSE" warning in trace-cmd report output * tag 'v6.16-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code cifs: Fix the smbd_response slab to allow usercopy smb: client: fix potential deadlock when reconnecting channels smb: client: remove \t from TP_printk statements smb: client: let smbd_post_send_iter() respect the peers max_send_size and transmit all data smb: client: fix regression with native SMB symlinks commit 0fd39af24e37a6866c479ca385301845f6029787 Merge: 867b9987a30b7f c0cb210a87fcdd Author: Linus Torvalds Date: Fri Jun 27 20:34:10 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-06-27-16-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "16 hotfixes. 6 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. 5 are for MM" * tag 'mm-hotfixes-stable-2025-06-27-16-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: add Lorenzo as THP co-maintainer mailmap: update Duje Mihanović's email address selftests/mm: fix validate_addr() helper crashdump: add CONFIG_KEYS dependency mailmap: correct name for a historical account of Zijun Hu mailmap: add entries for Zijun Hu fuse: fix runtime warning on truncate_folio_batch_exceptionals() scripts/gdb: fix dentry_name() lookup mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write mm/alloc_tag: fix the kmemleak false positive issue in the allocation of the percpu variable tag->counters lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly() mm/hugetlb: remove unnecessary holding of hugetlb_lock MAINTAINERS: add missing files to mm page alloc section MAINTAINERS: add tree entry to mm init block mm: add OOM killer maintainer structure fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio commit 867b9987a30b7f68a6e9e89d3670730692222a4a Merge: fa33adcaf8af14 c5136add3f9b4c Author: Linus Torvalds Date: Fri Jun 27 20:22:18 2025 -0700 Merge tag 'riscv-for-linus-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V Fixes for 5.16-rc4 - .rodata is no longer linkd into PT_DYNAMIC. It was not supposed to be there in the first place and resulted in invalid (but unused) entries. This manifests as at least warnings in llvm-readelf - A fix for runtime constants with all-0 upper 32-bits. This should only manifest on MMU=n kernels - A fix for context save/restore on systems using the T-Head vector extensions - A fix for a conflicting "+r"/"r" register constraint in the VDSO getrandom syscall wrapper, which is undefined behavior in clang - A fix for a missing register clobber in the RVV raid6 implementation. This manifests as a NULL pointer reference on some compilers, but could trigger in other ways - Misaligned accesses from userspace at faulting addresses are now handled correctly - A fix for an incorrect optimization that allowed access_ok() to mark invalid addresses as accessible, which can result in userspace triggering BUG()s - A few fixes for build warnings, and an update to Drew's email address * tag 'riscv-for-linus-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: export boot_cpu_hartid Revert "riscv: Define TASK_SIZE_MAX for __access_ok()" riscv: Fix sparse warning in vendor_extensions/sifive.c Revert "riscv: misaligned: fix sleeping function called during misaligned access handling" MAINTAINERS: Update Drew Fustini's email address RISC-V: uaccess: Wrap the get_user_8 uaccess macro raid6: riscv: Fix NULL pointer dereference caused by a missing clobber RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper riscv: vector: Fix context save/restore with xtheadvector riscv: fix runtime constant support for nommu kernels riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment commit fa33adcaf8af147f4238c84d76a316a47e43e091 Merge: 7abdafd2343ab1 5aa326a6a2ff0a Author: Linus Torvalds Date: Fri Jun 27 20:17:48 2025 -0700 Merge tag 'pci-v6.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fix from Bjorn Helgaas: - Fix a PTM debugfs build error with CONFIG_DEBUG_FS=n && CONFIG_PCIE_PTM=y (Manivannan Sadhasivam) * tag 'pci-v6.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/PTM: Build debugfs code only if CONFIG_DEBUG_FS is enabled commit 7abdafd2343ab199367c8243d6a5f06a9aa6976b Merge: 26fd9f7b7ff379 9fbceb37c95939 Author: Linus Torvalds Date: Fri Jun 27 19:38:36 2025 -0700 Merge tag 'drm-fixes-2025-06-28' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Regular weekly drm updates, nothing out of the ordinary, amdgpu, xe, i915 and a few misc bits. Seems about right for this time in the release cycle. core: - fix drm_writeback_connector_cleanup function signature - use correct HDMI audio bridge in drm_connector_hdmi_audio_init bridge: - SN65DSI86: fix HPD amdgpu: - Cleaner shader support for additional GFX9 GPUs - MES firmware compatibility fixes - Discovery error reporting fixes - SDMA6/7 userq fixes - Backlight fix - EDID sanity check i915: - Fix for SNPS PHY HDMI for 1080p@120Hz - Correct DP AUX DPCD probe address - Followup build fix for GCOV and AutoFDO enabled config xe: - Missing error check - Fix xe_hwmon_power_max_write - Move flushes - Explicitly exit CT safe mode on unwind - Process deferred GGTT node removals on device unwind" * tag 'drm-fixes-2025-06-28' of https://gitlab.freedesktop.org/drm/kernel: drm/xe: Process deferred GGTT node removals on device unwind drm/xe/guc: Explicitly exit CT safe mode on unwind drm/xe: move DPT l2 flush to a more sensible place drm/xe: Move DSB l2 flush to a more sensible place drm/bridge: ti-sn65dsi86: Add HPD for DisplayPort connector type drm/i915: fix build error some more drm/xe/hwmon: Fix xe_hwmon_power_max_write drm/xe/display: Add check for alloc_ordered_workqueue() drm/amd/display: Add sanity checks for drm_edid_raw() drm/amd/display: Fix AMDGPU_MAX_BL_LEVEL value drm/amdgpu/sdma7: add ucode version checks for userq support drm/amdgpu/sdma6: add ucode version checks for userq support drm/amd: Adjust output for discovery error handling drm/amdgpu/mes: add compatibility checks for set_hw_resource_1 drm/amdgpu/gfx9: Add Cleaner Shader Support for GFX9.x GPUs drm/bridge-connector: Fix bridge in drm_connector_hdmi_audio_init() drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS drm/i915/snps_hdmi_pll: Fix 64-bit divisor truncation by using div64_u64 drm: writeback: Fix drm_writeback_connector_cleanup signature commit 26fd9f7b7ff3794c5de0e6ae538cead53118b4c3 Merge: 5683cd63a33a5f 0a46f60a9fe16f Author: Linus Torvalds Date: Fri Jun 27 17:58:32 2025 -0700 Merge tag 'cxl-fixes-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull Compute Express Link (CXL) fixes from Dave Jiang: "These fixes address a few issues in the CXL subsystem, including dealing with some bugs in the CXL EDAC and RAS drivers: - Fix return value of cxlctl_validate_set_features() - Fix min_scrub_cycle of a region miscaculation and add additional documentation - Fix potential memory leak issues for CXL EDAC - Fix CPER handler device confusion for CXL RAS - Fix using wrong repair type to check DRAM event record" * tag 'cxl-fixes-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/edac: Fix using wrong repair type to check dram event record cxl/ras: Fix CPER handler device confusion cxl/edac: Fix potential memory leak issues cxl/Documentation: Add more description about min/max scrub cycle cxl/edac: Fix the min_scrub_cycle of a region miscalculation cxl: fix return value in cxlctl_validate_set_features() commit 5683cd63a33a5f0bf629a77f704ddd45cdb36cba Merge: 35e261cd95ddc7 64f7548aad63d2 Author: Linus Torvalds Date: Fri Jun 27 17:32:30 2025 -0700 Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull crypto library fix from Eric Biggers: "Fix a regression where the purgatory code sometimes fails to build" * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto: sha256: Mark sha256_choose_blocks as __always_inline commit 2def09ead4ad5907988b655d1e1454003aaf8297 Author: Fushuai Wang Date: Thu Jun 26 21:30:03 2025 +0800 dpaa2-eth: fix xdp_rxq_info leak The driver registered xdp_rxq_info structures via xdp_rxq_info_reg() but failed to properly unregister them in error paths and during removal. Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support") Signed-off-by: Fushuai Wang Reviewed-by: Simon Horman Reviewed-by: Ioana Ciornei Link: https://patch.msgid.link/20250626133003.80136-1-wangfushuai@baidu.com Signed-off-by: Jakub Kicinski commit d72411d20905180cdc452c553be17481b24463d2 Author: Thomas Fourier Date: Wed Jun 25 16:16:24 2025 +0200 ethernet: atl1: Add missing DMA mapping error checks and count errors The `dma_map_XXX()` functions can fail and must be checked using `dma_mapping_error()`. This patch adds proper error handling for all DMA mapping calls. In `atl1_alloc_rx_buffers()`, if DMA mapping fails, the buffer is deallocated and marked accordingly. In `atl1_tx_map()`, previously mapped buffers are unmapped and the packet is dropped on failure. If `atl1_xmit_frame()` drops the packet, increment the tx_error counter. Fixes: f3cc28c79760 ("Add Attansic L1 ethernet driver.") Signed-off-by: Thomas Fourier Link: https://patch.msgid.link/20250625141629.114984-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski commit 22c69d786ef8fb789c61ca75492a272774221324 Author: Nilton Perim Neto Date: Fri Jun 27 16:29:40 2025 -0700 Input: xpad - support Acer NGR 200 Controller Add the NGR 200 Xbox 360 to the list of recognized controllers. Signed-off-by: Nilton Perim Neto Link: https://lore.kernel.org/r/20250608060517.14967-1-niltonperimneto@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit ba2f83eecd2b36b12f92e5edd8bdc0509c7cd44e Author: Ulrich Weber Date: Thu Jun 26 16:56:18 2025 +0200 doc: tls: socket needs to be established to enable ulp To enable TLS ulp socket needs to be in established state. This was added in commit d91c3e17f75f ("net/tls: Only attach to sockets in ESTABLISHED state"), in 2018. Signed-off-by: Ulrich Weber Link: https://patch.msgid.link/20250626145618.15464-1-ulrich.weber@gmail.com Signed-off-by: Jakub Kicinski commit 6e457732c8a4431952a5cc075215268ce021dc0f Author: Jakub Kicinski Date: Thu Jun 26 11:20:55 2025 -0700 docs: netdev: correct the heading level for co-posting selftests "Co-posting selftests" belongs in the "netdev patch review" section, same as "co-posting changes to user space components". It was erroneously added as its own section. Reviewed-by: Bagas Sanjaya Link: https://patch.msgid.link/20250626182055.4161905-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8550821a153558d49dffacbc1dc98ac9d3eed2fa Author: Jan Karcher Date: Thu Jun 26 07:16:53 2025 +0200 MAINTAINERS: update smc section Due to changes of my responsibilities within IBM i can no longer act as maintainer for smc. As a result of the co-operation with Alibaba over the last years we decided to, once more, give them more responsibility for smc by appointing D. Wythe and Dust Li as maintainers as well. Within IBM Sidraya Jayagond and Mahanta Jambigi are going to take over the maintainership for smc. Signed-off-by: Jan Karcher Reviewed-by: Wenjia Zhang Link: https://patch.msgid.link/20250626051653.4259-1-jaka@linux.ibm.com Signed-off-by: Jakub Kicinski commit 9fbceb37c95939182e1409211447a1d3f3db9274 Merge: 6daaa479ac557b 55e8ff842051b1 Author: Dave Airlie Date: Sat Jun 28 06:53:00 2025 +1000 Merge tag 'drm-misc-fixes-2025-06-26' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc4: - Fix function signature of drm_writeback_connector_cleanup. - Use correct HDMI audio bridge in drm_connector_hdmi_audio_init. - Make HPD work on SN65DSI86. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/3dd1d5e1-73b6-4b0c-a208-f7d6235cf530@linux.intel.com commit 6921d1e07cb5eddec830801087b419194fde0803 Author: Edward Adam Davis Date: Tue Jun 24 14:38:46 2025 +0800 tracing: Fix filter logic error If the processing of the tr->events loop fails, the filter that has been added to filter_head will be released twice in free_filter_list(&head->rcu) and __free_filter(filter). After adding the filter of tr->events, add the filter to the filter_head process to avoid triggering uaf. Link: https://lore.kernel.org/tencent_4EF87A626D702F816CD0951CE956EC32CD0A@qq.com Fixes: a9d0aab5eb33 ("tracing: Fix regression of filter waiting a long time on RCU synchronization") Reported-by: syzbot+daba72c4af9915e9c894@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=daba72c4af9915e9c894 Tested-by: syzbot+daba72c4af9915e9c894@syzkaller.appspotmail.com Acked-by: Masami Hiramatsu (Google) Signed-off-by: Edward Adam Davis Signed-off-by: Steven Rostedt (Google) commit 77451cb102506a980cd299581e1c03a367af3c9a Author: Mario Limonciello Date: Fri Jun 27 12:23:44 2025 -0700 Input: xpad - return errors from xpad_try_sending_next_out_packet() up Not all errors that occur in xpad_try_sending_next_out_packet() are IO errors. Pass up the error code to the caller so that it can decide what to do. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250609014718.236827-3-superm1@kernel.org Signed-off-by: Dmitry Torokhov commit 35ecea24b5ef7534b8c928bb9ddfa936bd2805ab Author: Mario Limonciello Date: Fri Jun 27 12:23:20 2025 -0700 Input: xpad - adjust error handling for disconnect When a device supporting xpad is disconnected it's expected that a URB will fail to transmit. Only show an error message when the error isn't -ENODEV. Fixes: 7fc595f4c0263 ("Input: xpad - correctly handle concurrent LED and FF requests") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250609014718.236827-2-superm1@kernel.org Signed-off-by: Dmitry Torokhov commit 35e261cd95ddc741d8664f5ac897bbd0d384bbd0 Merge: e540341508ce2f 2b8be57fa0c88a Author: Linus Torvalds Date: Fri Jun 27 12:08:36 2025 -0700 Merge tag 'acpi-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a commit that attempted to fix a memory leak in an error code path and introduced a different issue (Zhe Qiao)" * tag 'acpi-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()" commit c5b60592886f97b01503c1bb553f88d6a7df42ea Author: Gabor Juhos Date: Fri Jun 27 09:58:54 2025 +0200 interconnect: avoid memory allocation when 'icc_bw_lock' is held The 'icc_bw_lock' mutex is introduced in commit af42269c3523 ("interconnect: Fix locking for runpm vs reclaim") in order to decouple serialization of bw aggregation from codepaths that require memory allocation. However commit d30f83d278a9 ("interconnect: core: Add dynamic id allocation support") added a devm_kasprintf() call into a path protected by the 'icc_bw_lock' which causes the following lockdep warning on machines like the Lenovo ThinkPad X13s: ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc3 #15 Not tainted ------------------------------------------------------ (udev-worker)/342 is trying to acquire lock: ffffb973f7ec4638 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_node_track_caller_noprof+0xa0/0x3e0 but task is already holding lock: ffffb973f7f7f0e8 (icc_bw_lock){+.+.}-{4:4}, at: icc_node_add+0x44/0x154 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (icc_bw_lock){+.+.}-{4:4}: icc_init+0x48/0x108 do_one_initcall+0x64/0x30c kernel_init_freeable+0x27c/0x500 kernel_init+0x20/0x1d8 ret_from_fork+0x10/0x20 -> #0 (fs_reclaim){+.+.}-{0:0}: __lock_acquire+0x136c/0x2114 lock_acquire+0x1c8/0x354 fs_reclaim_acquire+0x74/0xa8 __kmalloc_node_track_caller_noprof+0xa0/0x3e0 devm_kmalloc+0x54/0x124 devm_kvasprintf+0x74/0xd4 devm_kasprintf+0x58/0x80 icc_node_add+0xb4/0x154 qcom_osm_l3_probe+0x20c/0x314 [icc_osm_l3] platform_probe+0x68/0xd8 really_probe+0xc0/0x38c __driver_probe_device+0x7c/0x160 driver_probe_device+0x40/0x110 __driver_attach+0xfc/0x208 bus_for_each_dev+0x74/0xd0 driver_attach+0x24/0x30 bus_add_driver+0x110/0x234 driver_register+0x60/0x128 __platform_driver_register+0x24/0x30 osm_l3_driver_init+0x20/0x1000 [icc_osm_l3] do_one_initcall+0x64/0x30c do_init_module+0x58/0x23c load_module+0x1df8/0x1f70 init_module_from_file+0x88/0xc4 idempotent_init_module+0x188/0x280 __arm64_sys_finit_module+0x6c/0xd8 invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x4c/0x158 el0t_64_sync_handler+0xc8/0xcc el0t_64_sync+0x198/0x19c other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(icc_bw_lock); lock(fs_reclaim); lock(icc_bw_lock); lock(fs_reclaim); *** DEADLOCK *** The icc_node_add() functions is not designed to fail, and as such it should not do any memory allocation. In order to avoid this, add a new helper function for the name generation to be called by drivers which are using the new dynamic id feature. Fixes: d30f83d278a9 ("interconnect: core: Add dynamic id allocation support") Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/r/20250625-icc-bw-lockdep-v3-1-2b8f8b8987c4@gmail.com Co-developed-by: Johan Hovold Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250627075854.26943-1-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 89fb8acc38852116d38d721ad394aad7f2871670 Author: Christian Eggers Date: Fri Jun 27 09:05:08 2025 +0200 Bluetooth: HCI: Set extended advertising data synchronously Currently, for controllers with extended advertising, the advertising data is set in the asynchronous response handler for extended adverstising params. As most advertising settings are performed in a synchronous context, the (asynchronous) setting of the advertising data is done too late (after enabling the advertising). Move setting of adverstising data from asynchronous response handler into synchronous context to fix ordering of HCI commands. Signed-off-by: Christian Eggers Fixes: a0fb3726ba55 ("Bluetooth: Use Set ext adv/scan rsp data if controller supports") Cc: stable@vger.kernel.org v2: https://lore.kernel.org/linux-bluetooth/20250626115209.17839-1-ceggers@arri.de/ Signed-off-by: Luiz Augusto von Dentz commit f3cb5676e5c11c896ba647ee309a993e73531588 Author: Christian Eggers Date: Wed Jun 25 15:09:31 2025 +0200 Bluetooth: MGMT: mesh_send: check instances prior disabling advertising The unconditional call of hci_disable_advertising_sync() in mesh_send_done_sync() also disables other LE advertisings (non mesh related). I am not sure whether this call is required at all, but checking the adv_instances list (like done at other places) seems to solve the problem. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Cc: stable@vger.kernel.org Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit e5af67a870f738bb8a4594b6c60c2caf4c87a3c9 Author: Christian Eggers Date: Wed Jun 25 15:09:30 2025 +0200 Bluetooth: MGMT: set_mesh: update LE scan interval and window According to the message of commit b338d91703fa ("Bluetooth: Implement support for Mesh"), MGMT_OP_SET_MESH_RECEIVER should set the passive scan parameters. Currently the scan interval and window parameters are silently ignored, although user space (bluetooth-meshd) expects that they can be used [1] [1] https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/mesh/mesh-io-mgmt.c#n344 Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Cc: stable@vger.kernel.org Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit 46c0d947b64ac8efcf89dd754213dab5d1bd00aa Author: Christian Eggers Date: Wed Jun 25 15:09:29 2025 +0200 Bluetooth: hci_sync: revert some mesh modifications This reverts minor parts of the changes made in commit b338d91703fa ("Bluetooth: Implement support for Mesh"). It looks like these changes were only made for development purposes but shouldn't have been part of the commit. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Cc: stable@vger.kernel.org Signed-off-by: Christian Eggers Signed-off-by: Luiz Augusto von Dentz commit 157501b0469969fc1ba53add5049575aadd79d80 Author: Filipe Manana Date: Fri Jun 20 16:37:01 2025 +0100 btrfs: use btrfs_record_snapshot_destroy() during rmdir We are setting the parent directory's last_unlink_trans directly which may result in a concurrent task starting to log the directory not see the update and therefore can log the directory after we removed a child directory which had a snapshot within instead of falling back to a transaction commit. Replaying such a log tree would result in a mount failure since we can't currently delete snapshots (and subvolumes) during log replay. This is the type of failure described in commit 1ec9a1ae1e30 ("Btrfs: fix unreplayable log after snapshot delete + parent dir fsync"). Fix this by using btrfs_record_snapshot_destroy() which updates the last_unlink_trans field while holding the inode's log_mutex lock. Fixes: 44f714dae50a ("Btrfs: improve performance on fsync against new inode after rename/unlink") Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c466e33e729a0ee017d10d919cba18f503853c60 Author: Filipe Manana Date: Fri Jun 20 15:54:05 2025 +0100 btrfs: propagate last_unlink_trans earlier when doing a rmdir In case the removed directory had a snapshot that was deleted, we are propagating its inode's last_unlink_trans to the parent directory after we removed the entry from the parent directory. This leaves a small race window where someone can log the parent directory after we removed the entry and before we updated last_unlink_trans, and as a result if we ever try to replay such a log tree, we will fail since we will attempt to remove a snapshot during log replay, which is currently not possible and results in the log replay (and mount) to fail. This is the type of failure described in commit 1ec9a1ae1e30 ("Btrfs: fix unreplayable log after snapshot delete + parent dir fsync"). So fix this by propagating the last_unlink_trans to the parent directory before we remove the entry from it. Fixes: 44f714dae50a ("Btrfs: improve performance on fsync against new inode after rename/unlink") Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit bf5bcf9a6fa070ec8a725b08db63fb1318f77366 Author: Filipe Manana Date: Thu Jun 19 13:13:38 2025 +0100 btrfs: record new subvolume in parent dir earlier to avoid dir logging races Instead of recording that a new subvolume was created in a directory after we add the entry do the directory, record it before adding the entry. This is to avoid races where after creating the entry and before recording the new subvolume in the directory (the call to btrfs_record_new_subvolume()), another task logs the directory, so we end up with a log tree where we logged a directory that has an entry pointing to a root that was not yet committed, resulting in an invalid entry if the log is persisted and replayed later due to a power failure or crash. Also state this requirement in the function comment for btrfs_record_new_subvolume(), similar to what we do for the btrfs_record_unlink_dir() and btrfs_record_snapshot_destroy(). Fixes: 45c4102f0d82 ("btrfs: avoid transaction commit on any fsync after subvolume creation") Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5f61b961599acbd2bed028d3089105a1f7d224b8 Author: Filipe Manana Date: Wed Jun 18 15:58:31 2025 +0100 btrfs: fix inode lookup error handling during log replay When replaying log trees we use read_one_inode() to get an inode, which is just a wrapper around btrfs_iget_logging(), which in turn is a wrapper for btrfs_iget(). But read_one_inode() always returns NULL for any error that btrfs_iget_logging() / btrfs_iget() may return and this is a problem because: 1) In many callers of read_one_inode() we convert the NULL into -EIO, which is not accurate since btrfs_iget() may return -ENOMEM and -ENOENT for example, besides -EIO and other errors. So during log replay we may end up reporting a false -EIO, which is confusing since we may not have had any IO error at all; 2) When replaying directory deletes, at replay_dir_deletes(), we assume the NULL returned from read_one_inode() means that the inode doesn't exist and then proceed as if no error had happened. This is wrong because unless btrfs_iget() returned ERR_PTR(-ENOENT), we had an actual error and the target inode may exist in the target subvolume root - this may later result in the log replay code failing at a later stage (if we are "lucky") or succeed but leaving some inconsistency in the filesystem. So fix this by not ignoring errors from btrfs_iget_logging() and as a consequence remove the read_one_inode() wrapper and just use btrfs_iget_logging() directly. Also since btrfs_iget_logging() is supposed to be called only against subvolume roots, just like read_one_inode() which had a comment about it, add an assertion to btrfs_iget_logging() to check that the target root corresponds to a subvolume root. Fixes: 5d4f98a28c7d ("Btrfs: Mixed back reference (FORWARD ROLLING FORMAT CHANGE)") Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 54a7081ed168b72a8a2d6ef4ba3a1259705a2926 Author: Filipe Manana Date: Mon Jun 23 12:11:58 2025 +0100 btrfs: fix iteration of extrefs during log replay At __inode_add_ref() when processing extrefs, if we jump into the next label we have an undefined value of victim_name.len, since we haven't initialized it before we did the goto. This results in an invalid memory access in the next iteration of the loop since victim_name.len was not initialized to the length of the name of the current extref. Fix this by initializing victim_name.len with the current extref's name length. Fixes: e43eec81c516 ("btrfs: use struct qstr instead of name and namelen pairs") Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 6561a40ceced9082f50c374a22d5966cf9fc5f5c Author: Filipe Manana Date: Wed Jun 18 16:57:07 2025 +0100 btrfs: fix missing error handling when searching for inode refs during log replay During log replay, at __add_inode_ref(), when we are searching for inode ref keys we totally ignore if btrfs_search_slot() returns an error. This may make a log replay succeed when there was an actual error and leave some metadata inconsistency in a subvolume tree. Fix this by checking if an error was returned from btrfs_search_slot() and if so, return it to the caller. Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations") Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1e6ed33cabba8f06f532f2e5851a102602823734 Author: Filipe Manana Date: Sat Jun 7 13:43:32 2025 +0100 btrfs: fix failure to rebuild free space tree using multiple transactions If we are rebuilding a free space tree, while modifying the free space tree we may need to allocate a new metadata block group. If we end up using multiple transactions for the rebuild, when we call btrfs_end_transaction() we enter btrfs_create_pending_block_groups() which calls add_block_group_free_space() to add items to the free space tree for the block group. Then later during the free space tree rebuild, at btrfs_rebuild_free_space_tree(), we may find such new block groups and call populate_free_space_tree() for them, which fails with -EEXIST because there are already items in the free space tree. Then we abort the transaction with -EEXIST at btrfs_rebuild_free_space_tree(). Notice that we say "may find" the new block groups because a new block group may be inserted in the block groups rbtree, which is being iterated by the rebuild process, before or after the current node where the rebuild process is currently at. Syzbot recently reported such case which produces a trace like the following: ------------[ cut here ]------------ BTRFS: Transaction aborted (error -17) WARNING: CPU: 1 PID: 7626 at fs/btrfs/free-space-tree.c:1341 btrfs_rebuild_free_space_tree+0x470/0x54c fs/btrfs/free-space-tree.c:1341 Modules linked in: CPU: 1 UID: 0 PID: 7626 Comm: syz.2.25 Not tainted 6.15.0-rc7-syzkaller-00085-gd7fa1af5b33e-dirty #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : btrfs_rebuild_free_space_tree+0x470/0x54c fs/btrfs/free-space-tree.c:1341 lr : btrfs_rebuild_free_space_tree+0x470/0x54c fs/btrfs/free-space-tree.c:1341 sp : ffff80009c4f7740 x29: ffff80009c4f77b0 x28: ffff0000d4c3f400 x27: 0000000000000000 x26: dfff800000000000 x25: ffff70001389eee8 x24: 0000000000000003 x23: 1fffe000182b6e7b x22: 0000000000000000 x21: ffff0000c15b73d8 x20: 00000000ffffffef x19: ffff0000c15b7378 x18: 1fffe0003386f276 x17: ffff80008f31e000 x16: ffff80008adbe98c x15: 0000000000000001 x14: 1fffe0001b281550 x13: 0000000000000000 x12: 0000000000000000 x11: ffff60001b281551 x10: 0000000000000003 x9 : 1c8922000a902c00 x8 : 1c8922000a902c00 x7 : ffff800080485878 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : ffff80008047843c x2 : 0000000000000001 x1 : ffff80008b3ebc40 x0 : 0000000000000001 Call trace: btrfs_rebuild_free_space_tree+0x470/0x54c fs/btrfs/free-space-tree.c:1341 (P) btrfs_start_pre_rw_mount+0xa78/0xe10 fs/btrfs/disk-io.c:3074 btrfs_remount_rw fs/btrfs/super.c:1319 [inline] btrfs_reconfigure+0x828/0x2418 fs/btrfs/super.c:1543 reconfigure_super+0x1d4/0x6f0 fs/super.c:1083 do_remount fs/namespace.c:3365 [inline] path_mount+0xb34/0xde0 fs/namespace.c:4200 do_mount fs/namespace.c:4221 [inline] __do_sys_mount fs/namespace.c:4432 [inline] __se_sys_mount fs/namespace.c:4409 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4409 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 330 hardirqs last enabled at (329): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1525 [inline] hardirqs last enabled at (329): [] finish_lock_switch+0xb0/0x1c0 kernel/sched/core.c:5130 hardirqs last disabled at (330): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:511 softirqs last enabled at (10): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (8): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]--- Fix this by flagging new block groups which had their free space tree entries already added and then skip them in the rebuild process. Also, since the rebuild may be triggered when doing a remount, make sure that when we clear an existing free space tree that we clear such flag from every existing block group, otherwise we would skip those block groups during the rebuild. Reported-by: syzbot+d0014fb0fc39c5487ae5@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/68460a54.050a0220.daf97.0af5.GAE@google.com/ Fixes: 882af9f13e83 ("btrfs: handle free space tree rebuild in multiple transactions") Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1f029b4e30a602db33dedee5ac676e9236ad193c Author: Yang Li Date: Thu Jun 19 11:01:07 2025 +0800 Bluetooth: Prevent unintended pause by checking if advertising is active When PA Create Sync is enabled, advertising resumes unexpectedly. Therefore, it's necessary to check whether advertising is currently active before attempting to pause it. < HCI Command: LE Add Device To... (0x08|0x0011) plen 7 #1345 [hci0] 48.306205 Address type: Random (0x01) Address: 4F:84:84:5F:88:17 (Resolvable) Identity type: Random (0x01) Identity: FC:5B:8C:F7:5D:FB (Static) < HCI Command: LE Set Address Re.. (0x08|0x002d) plen 1 #1347 [hci0] 48.308023 Address resolution: Enabled (0x01) ... < HCI Command: LE Set Extended A.. (0x08|0x0039) plen 6 #1349 [hci0] 48.309650 Extended advertising: Enabled (0x01) Number of sets: 1 (0x01) Entry 0 Handle: 0x01 Duration: 0 ms (0x00) Max ext adv events: 0 ... < HCI Command: LE Periodic Adve.. (0x08|0x0044) plen 14 #1355 [hci0] 48.314575 Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x02 Adv address type: Random (0x01) Adv address: 4F:84:84:5F:88:17 (Resolvable) Identity type: Random (0x01) Identity: FC:5B:8C:F7:5D:FB (Static) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 Fixes: ad383c2c65a5 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") Signed-off-by: Yang Li Signed-off-by: Luiz Augusto von Dentz commit 96de8f85203147e3d1e646da891307fa3e462c32 Author: Bharadwaj Raju Date: Fri Jun 27 22:11:29 2025 +0530 bcachefs: mark invalid_btree_id autofix Checking for invalid IDs was introduced in 9e7cfb35e266 ("bcachefs: Check for invalid btree IDs") to prevent an invalid shift later, but since 141526548052 ("bcachefs: Bad btree roots are now autofix") which made btree_root_bkey_invalid autofix, the fsck_err_on call didn't do anything. We can mark this err type (invalid_btree_id) autofix as well, so it gets handled. Reported-by: syzbot+029d1989099aa5ae3e89@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=029d1989099aa5ae3e89 Fixes: 141526548052 ("bcachefs: Bad btree roots are now autofix") Signed-off-by: Bharadwaj Raju Signed-off-by: Kent Overstreet commit e540341508ce2f6e27810106253d5de194b66750 Merge: 0a47e02d8a283a c007062188d8e4 Author: Linus Torvalds Date: Fri Jun 27 09:02:33 2025 -0700 Merge tag 'block-6.16-20250626' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fixes for ublk: - fix C++ narrowing warnings in the uapi header - update/improve UBLK_F_SUPPORT_ZERO_COPY comment in uapi header - fix for the ublk ->queue_rqs() implementation, limiting a batch to just the specific task AND ring - ublk_get_data() error handling fix - sanity check more arguments in ublk_ctrl_add_dev() - selftest addition - NVMe pull request via Christoph: - reset delayed remove_work after reconnect - fix atomic write size validation - Fix for a warning introduced in bdev_count_inflight_rw() in this merge window * tag 'block-6.16-20250626' of git://git.kernel.dk/linux: block: fix false warning in bdev_count_inflight_rw() ublk: sanity check add_dev input for underflow nvme: fix atomic write size validation nvme: refactor the atomic write unit detection nvme: reset delayed remove_work after reconnect ublk: setup ublk_io correctly in case of ublk_get_data() failure ublk: update UBLK_F_SUPPORT_ZERO_COPY comment in UAPI header ublk: fix narrowing warnings in UAPI header selftests: ublk: don't take same backing file for more than one ublk devices ublk: build batch from IOs in same io_ring_ctx and io task commit 0a47e02d8a283a99592876556b9d42e087525828 Merge: 9c7331f150549d 178b8ff66ff827 Author: Linus Torvalds Date: Fri Jun 27 08:55:57 2025 -0700 Merge tag 'io_uring-6.16-20250626' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Two tweaks for a recent fix: fixing a memory leak if multiple iovecs were initially mapped but only the first was used and hence turned into a UBUF rathan than an IOVEC iterator, and catching a case where a retry would be done even if the previous segment wasn't full - Small series fixing an issue making the vm unhappy if debugging is turned on, hitting a VM_BUG_ON_PAGE() - Fix a resource leak in io_import_dmabuf() in the error handling case, which is a regression in this merge window - Mark fallocate as needing to be write serialized, as is already done for truncate and buffered writes * tag 'io_uring-6.16-20250626' of git://git.kernel.dk/linux: io_uring/kbuf: flag partial buffer mappings io_uring/net: mark iov as dynamically allocated even for single segments io_uring: fix resource leak in io_import_dmabuf() io_uring: don't assume uaddr alignment in io_vec_fill_bvec io_uring/rsrc: don't rely on user vaddr alignment io_uring/rsrc: fix folio unpinning io_uring: make fallocate be hashed work commit 9c7331f150549d3c724051aa11c5dcb51bf3aa99 Merge: 51df97f90002cb 3e0809b1664b9d Author: Linus Torvalds Date: Fri Jun 27 08:30:37 2025 -0700 Merge tag 'ata-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Niklas Cassel: - Use the correct DMI identifier for ASUSPRO-D840SA LPM quirk such that the quirk actually gets applied (me) * tag 'ata-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: ahci: Use correct DMI identifier for ASUSPRO-D840SA LPM quirk commit 51df97f90002cb055e966189bd46d831af69e155 Merge: 9c2f970518c900 7f8073cfb04a97 Author: Linus Torvalds Date: Fri Jun 27 08:26:25 2025 -0700 Merge tag 's390-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Fix incorrectly dropped dereferencing of the stack nth entry introduced with a previous KASAN false positive fix - Use a proper memdup_array_user() helper to prevent overflow in a protected key size calculation * tag 's390-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ptrace: Fix pointer dereferencing in regs_get_kernel_stack_nth() s390/pkey: Prevent overflow in size calculation for memdup_user() commit 9c2f970518c900821acdac47bbd681b99a325e3d Merge: 67a993863163cb 7ab6847a03229e Author: Linus Torvalds Date: Fri Jun 27 08:21:05 2025 -0700 Merge tag 'sound-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes again: - A regression fix for hibernation bug in ASoC SoundWire - Fixes for the new Qualcomm USB offload stuff - A potential OOB access fix in USB-audio - A potential memleadk fix in ASoC Intel - Quirks for HD-audio and ASoC AMD ACP" * tag 'sound-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X507UAR ALSA: usb: qcom: fix NULL pointer dereference in qmi_stop_session ASoC: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak. ASoC: rt721-sdca: fix boost gain calculation error ALSA: qc_audio_offload: Fix missing error code in prepare_qmi_response() ALSA: hda/realtek: Add mic-mute LED setup for ASUS UM5606 ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 6 G1a ASoC: amd: ps: fix for soundwire failures during hibernation exit sequence ASoC: amd: yc: Add DMI quirk for Lenovo IdeaPad Slim 5 15 ASoC: amd: yc: add quirk for Acer Nitro ANV15-41 internal mic ASoC: qcom: sm8250: Fix possibly undefined reference ALSA: hda/realtek - Enable mute LED on HP Pavilion Laptop 15-eg100 ALSA: hda/realtek: Add quirks for some Clevo laptops commit 615cc4223fcbe1e0e6f68b8494b26bb6c08d917a Author: Thomas Zimmermann Date: Tue Jun 17 16:09:34 2025 +0200 drm/vesadrm: Avoid NULL-ptr deref in vesadrm_pmi_cmap_write() Only set PMI fields if the screen_info's Vesa PM segment has been set. Vesa PMI is the power-management interface. It also provides means to set the color palette. The interface is optional, so not all VESA graphics cards support it. Print vesafb's warning [1] if the hardware palette cannot be set at all. If unsupported the field PrimaryPalette in struct vesadrm.pmi is NULL, which results in a segmentation fault. Happens with qemu's Cirrus emulation. Signed-off-by: Thomas Zimmermann Fixes: 814d270b31d2 ("drm/sysfb: vesadrm: Add gamma correction") Link: https://elixir.bootlin.com/linux/v6.15/source/drivers/video/fbdev/vesafb.c#L375 # 1 Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: dri-devel@lists.freedesktop.org Acked-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250617140944.142392-1-tzimmermann@suse.de commit 7b5f775be14ac1532c049022feadcfe44769566d Author: Dave Chinner Date: Thu Jun 26 08:49:00 2025 +1000 xfs: fix unmount hang with unflushable inodes stuck in the AIL Unmount of a shutdown filesystem can hang with stale inode cluster buffers in the AIL like so: [95964.140623] Call Trace: [95964.144641] __schedule+0x699/0xb70 [95964.154003] schedule+0x64/0xd0 [95964.156851] xfs_ail_push_all_sync+0x9b/0xf0 [95964.164816] xfs_unmount_flush_inodes+0x41/0x70 [95964.168698] xfs_unmountfs+0x7f/0x170 [95964.171846] xfs_fs_put_super+0x3b/0x90 [95964.175216] generic_shutdown_super+0x77/0x160 [95964.178060] kill_block_super+0x1b/0x40 [95964.180553] xfs_kill_sb+0x12/0x30 [95964.182796] deactivate_locked_super+0x38/0x100 [95964.185735] deactivate_super+0x41/0x50 [95964.188245] cleanup_mnt+0x9f/0x160 [95964.190519] __cleanup_mnt+0x12/0x20 [95964.192899] task_work_run+0x89/0xb0 [95964.195221] resume_user_mode_work+0x4f/0x60 [95964.197931] syscall_exit_to_user_mode+0x76/0xb0 [95964.201003] do_syscall_64+0x74/0x130 $ pstree -N mnt |grep umount |-check-parallel---nsexec---run_test.sh---753---umount It always seems to be generic/753 that triggers this, and repeating a quick group test run triggers it every 10-15 iterations. Hence it generally triggers once up every 30-40 minutes of test time. just running generic/753 by itself or concurrently with a limited group of tests doesn't reproduce this issue at all. Tracing on a hung system shows the AIL repeating every 50ms a log force followed by an attempt to push pinned, aborted inodes from the AIL (trimmed for brevity): xfs_log_force: lsn 0x1c caller xfsaild+0x18e xfs_log_force: lsn 0x0 caller xlog_cil_flush+0xbd xfs_log_force: lsn 0x1c caller xfs_log_force+0x77 xfs_ail_pinned: lip 0xffff88826014afa0 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED xfs_ail_pinned: lip 0xffff88814000a708 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED xfs_ail_pinned: lip 0xffff88810b850c80 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED xfs_ail_pinned: lip 0xffff88810b850af0 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED xfs_ail_pinned: lip 0xffff888165cf0a28 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED xfs_ail_pinned: lip 0xffff88810b850bb8 lsn 1/37472 type XFS_LI_INODE flags IN_AIL|ABORTED .... The inode log items are marked as aborted, which means that either: a) a transaction commit has occurred, seen an error or shutdown, and called xfs_trans_free_items() to abort the items. This should happen before any pinning of log items occurs. or b) a dirty transaction has been cancelled. This should also happen before any pinning of log items occurs. or c) AIL insertion at journal IO completion is marked as aborted. In this case, the log item is pinned by the CIL until journal IO completes and hence needs to be unpinned. This is then done after the ->iop_committed() callback is run, so the pin count should be balanced correctly. Yet none of these seemed to be occurring. Further tracing indicated this: d) Shutdown during CIL pushing resulting in log item completion being called from checkpoint abort processing. Items are unpinned and released without serialisation against each other, journal IO completion or transaction commit completion. In this case, we may still have a transaction commit in flight that holds a reference to a xfs_buf_log_item (BLI) after CIL insertion. e.g. a synchronous transaction will flush the CIL before the transaction is torn down. The concurrent CIL push then aborts insertion it and drops the commit/AIL reference to the BLI. This can leave the transaction commit context with the last reference to the BLI which is dropped here: xfs_trans_free_items() ->iop_release xfs_buf_item_release xfs_buf_item_put if (XFS_LI_ABORTED) xfs_trans_ail_delete xfs_buf_item_relse() Unlike the journal completion ->iop_unpin path, this path does not run stale buffer completion process when it drops the last reference, hence leaving the stale inodes attached to the buffer sitting the AIL. There are no other references to those inodes, so there is no other mechanism to remove them from the AIL. Hence unmount hangs. The buffer lock context for stale buffers is passed to the last BLI reference. This is normally the last BLI unpin on journal IO completion. The unpin then processes the stale buffer completion and releases the buffer lock. However, if the final unpin from journal IO completion (or CIL push abort) does not hold the last reference to the BLI, there -must- still be a transaction context that references the BLI, and so that context must perform the stale buffer completion processing before the buffer is unlocked and the BLI torn down. The fix for this is to rework the xfs_buf_item_relse() path to run stale buffer completion processing if it drops the last reference to the BLI. We still hold the buffer locked, so the buffer owner and lock context is the same as if we passed the BLI and buffer to the ->iop_unpin() context to finish stale process on journal commit. However, we have to be careful here. In a shutdown state, we can be freeing dirty BLIs from xfs_buf_item_put() via xfs_trans_brelse() and xfs_trans_bdetach(). The existing code handles this case by considering shutdown state as "aborted", but in doing so largely masks the failure to clean up stale BLI state from the xfs_buf_item_relse() path. i.e regardless of the shutdown state and whether the item is in the AIL, we must finish the stale buffer cleanup if we are are dropping the last BLI reference from the ->iop_relse path in transaction commit context. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit 816c330b605c3f4813c0dc0ab5af5cce17ff06b3 Author: Dave Chinner Date: Thu Jun 26 08:48:59 2025 +1000 xfs: factor out stale buffer item completion The stale buffer item completion handling is currently only done from BLI unpinning. We need to perform this function from where-ever the last reference to the BLI is dropped, so first we need to factor this code out into a helper. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit d2fe5c4c8d25999862d615f616aea7befdd62799 Author: Dave Chinner Date: Thu Jun 26 08:48:58 2025 +1000 xfs: rearrange code in xfs_buf_item.c The code to initialise, release and free items is all the way down the bottom of the file. Upcoming fixes need to these functions earlier in the file, so move them to the top. There is one code change in this move - the parameter to xfs_buf_item_relse() is changed from the xfs_buf to the xfs_buf_log_item - the thing that the function is releasing. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit fc48627b9c22f4d18651ca72ba171952d7a26004 Author: Dave Chinner Date: Thu Jun 26 08:48:57 2025 +1000 xfs: add tracepoints for stale pinned inode state debug I needed more insight into how stale inodes were getting stuck on the AIL after a forced shutdown when running fsstress. These are the tracepoints I added for that purpose. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit d62016b1a2df24c8608fe83cd3ae8090412881b3 Author: Dave Chinner Date: Thu Jun 26 08:48:56 2025 +1000 xfs: avoid dquot buffer pin deadlock On shutdown when quotas are enabled, the shutdown can deadlock trying to unpin the dquot buffer buf_log_item like so: [ 3319.483590] task:kworker/20:0H state:D stack:14360 pid:1962230 tgid:1962230 ppid:2 task_flags:0x4208060 flags:0x00004000 [ 3319.493966] Workqueue: xfs-log/dm-6 xlog_ioend_work [ 3319.498458] Call Trace: [ 3319.500800] [ 3319.502809] __schedule+0x699/0xb70 [ 3319.512672] schedule+0x64/0xd0 [ 3319.515573] schedule_timeout+0x30/0xf0 [ 3319.528125] __down_common+0xc3/0x200 [ 3319.531488] __down+0x1d/0x30 [ 3319.534186] down+0x48/0x50 [ 3319.540501] xfs_buf_lock+0x3d/0xe0 [ 3319.543609] xfs_buf_item_unpin+0x85/0x1b0 [ 3319.547248] xlog_cil_committed+0x289/0x570 [ 3319.571411] xlog_cil_process_committed+0x6d/0x90 [ 3319.575590] xlog_state_shutdown_callbacks+0x52/0x110 [ 3319.580017] xlog_force_shutdown+0x169/0x1a0 [ 3319.583780] xlog_ioend_work+0x7c/0xb0 [ 3319.587049] process_scheduled_works+0x1d6/0x400 [ 3319.591127] worker_thread+0x202/0x2e0 [ 3319.594452] kthread+0x20c/0x240 The CIL push has seen the deadlock, so it has aborted the push and is running CIL checkpoint completion to abort all the items in the checkpoint. This calls ->iop_unpin(remove = true) to clean up the log items in the checkpoint. When a buffer log item is unpined like this, it needs to lock the buffer to run io completion to correctly fail the buffer and run all the required completions to fail attached log items as well. In this case, the attempt to lock the buffer on unpin is hanging because the buffer is already locked. I suspected a leaked XFS_BLI_HOLD state because of XFS_BLI_STALE handling changes I was testing, so I went looking for pin events on HOLD buffers and unpin events on locked buffer. That isolated this one buffer with these two events: xfs_buf_item_pin: dev 251:6 daddr 0xa910 bbcount 0x2 hold 2 pincount 0 lock 0 flags DONE|KMEM recur 0 refcount 1 bliflags HOLD|DIRTY|LOGGED liflags DIRTY .... xfs_buf_item_unpin: dev 251:6 daddr 0xa910 bbcount 0x2 hold 4 pincount 1 lock 0 flags DONE|KMEM recur 0 refcount 1 bliflags DIRTY liflags ABORTED Firstly, bbcount = 0x2, which means it is not a single sector structure. That rules out every xfs_trans_bhold() case except one: dquot buffers. Then hung task dumping gave this trace: [ 3197.312078] task:fsync-tester state:D stack:12080 pid:2051125 tgid:2051125 ppid:1643233 task_flags:0x400000 flags:0x00004002 [ 3197.323007] Call Trace: [ 3197.325581] [ 3197.327727] __schedule+0x699/0xb70 [ 3197.334582] schedule+0x64/0xd0 [ 3197.337672] schedule_timeout+0x30/0xf0 [ 3197.350139] wait_for_completion+0xbd/0x180 [ 3197.354235] __flush_workqueue+0xef/0x4e0 [ 3197.362229] xlog_cil_force_seq+0xa0/0x300 [ 3197.374447] xfs_log_force+0x77/0x230 [ 3197.378015] xfs_qm_dqunpin_wait+0x49/0xf0 [ 3197.382010] xfs_qm_dqflush+0x55/0x460 [ 3197.385663] xfs_qm_dquot_isolate+0x29e/0x4d0 [ 3197.389977] __list_lru_walk_one+0x141/0x220 [ 3197.398867] list_lru_walk_one+0x10/0x20 [ 3197.402713] xfs_qm_shrink_scan+0x6a/0x100 [ 3197.406699] do_shrink_slab+0x18a/0x350 [ 3197.410512] shrink_slab+0xf7/0x430 [ 3197.413967] drop_slab+0x97/0xf0 [ 3197.417121] drop_caches_sysctl_handler+0x59/0xc0 [ 3197.421654] proc_sys_call_handler+0x18b/0x280 [ 3197.426050] proc_sys_write+0x13/0x20 [ 3197.429750] vfs_write+0x2b8/0x3e0 [ 3197.438532] ksys_write+0x7e/0xf0 [ 3197.441742] __x64_sys_write+0x1b/0x30 [ 3197.445363] x64_sys_call+0x2c72/0x2f60 [ 3197.449044] do_syscall_64+0x6c/0x140 [ 3197.456341] entry_SYSCALL_64_after_hwframe+0x76/0x7e Yup, another test run by check-parallel is running drop_caches concurrently and the dquot shrinker for the hung filesystem is running. That's trying to flush a dirty dquot from reclaim context, and it waiting on a log force to complete. xfs_qm_dqflush is called with the dquot buffer held locked, and so we've called xfs_log_force() with that buffer locked. Now the log force is waiting for a workqueue flush to complete, and that workqueue flush is waiting of CIL checkpoint processing to finish. The CIL checkpoint processing is aborting all the log items it has, and that requires locking aborted buffers to cancel them. Now, normally this isn't a problem if we are issuing a log force to unpin an object, because the ->iop_unpin() method wakes pin waiters first. That results in the pin waiter finishing off whatever it was doing, dropping the lock and then xfs_buf_item_unpin() can lock the buffer and fail it. However, xfs_qm_dqflush() is waiting on the -dquot- unpin event, not the dquot buffer unpin event, and so it never gets woken and so does not drop the buffer lock. Inodes do not have this problem, as they can only be written from one spot (->iop_push) whilst dquots can be written from multiple places (memory reclaim, ->iop_push, xfs_dq_dqpurge, and quotacheck). The reason that the dquot buffer has an attached buffer log item is that it has been recently allocated. Initialisation of the dquot buffer logs the buffer directly, thereby pinning it in memory. We then modify the dquot in a separate operation, and have memory reclaim racing with a shutdown and we trigger this deadlock. check-parallel reproduces this reliably on 1kB FSB filesystems with quota enabled because it does all of these things concurrently without having to explicitly write tests to exercise these corner case conditions. xfs_qm_dquot_logitem_push() doesn't have this deadlock because it checks if the dquot is pinned before locking the dquot buffer and skipping it if it is pinned. This means the xfs_qm_dqunpin_wait() log force in xfs_qm_dqflush() never triggers and we unlock the buffer safely allowing a concurrent shutdown to fail the buffer appropriately. xfs_qm_dqpurge() could have this problem as it is called from quotacheck and we might have allocated dquot buffers when recording the quota updates. This can be fixed by calling xfs_qm_dqunpin_wait() before we lock the dquot buffer. Because we hold the dquot locked, nothing will be able to add to the pin count between the unpin_wait and the dqflush callout, so this now makes xfs_qm_dqpurge() safe against this race. xfs_qm_dquot_isolate() can also be fixed this same way but, quite frankly, we shouldn't be doing IO in memory reclaim context. If the dquot is pinned or dirty, simply rotate it and let memory reclaim come back to it later, same as we do for inodes. This then gets rid of the nasty issue in xfs_qm_flush_one() where quotacheck writeback races with memory reclaim flushing the dquots. We can lift xfs_qm_dqunpin_wait() up into this code, then get rid of the "can't get the dqflush lock" buffer write to cycle the dqlfush lock and enable it to be flushed again. checking if the dquot is pinned and returning -EAGAIN so that the dquot walk will revisit the dquot again later. Finally, with xfs_qm_dqunpin_wait() lifted into all the callers, we can remove it from the xfs_qm_dqflush() code. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit db6a2274162de615ff74b927d38942fe3134d298 Author: Dave Chinner Date: Thu Jun 26 08:48:55 2025 +1000 xfs: catch stale AGF/AGF metadata There is a race condition that can trigger in dmflakey fstests that can result in asserts in xfs_ialloc_read_agi() and xfs_alloc_read_agf() firing. The asserts look like this: XFS: Assertion failed: pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks), file: fs/xfs/libxfs/xfs_alloc.c, line: 3440 ..... Call Trace: xfs_alloc_read_agf+0x2ad/0x3a0 xfs_alloc_fix_freelist+0x280/0x720 xfs_alloc_vextent_prepare_ag+0x42/0x120 xfs_alloc_vextent_iterate_ags+0x67/0x260 xfs_alloc_vextent_start_ag+0xe4/0x1c0 xfs_bmapi_allocate+0x6fe/0xc90 xfs_bmapi_convert_delalloc+0x338/0x560 xfs_map_blocks+0x354/0x580 iomap_writepages+0x52b/0xa70 xfs_vm_writepages+0xd7/0x100 do_writepages+0xe1/0x2c0 __writeback_single_inode+0x44/0x340 writeback_sb_inodes+0x2d0/0x570 __writeback_inodes_wb+0x9c/0xf0 wb_writeback+0x139/0x2d0 wb_workfn+0x23e/0x4c0 process_scheduled_works+0x1d4/0x400 worker_thread+0x234/0x2e0 kthread+0x147/0x170 ret_from_fork+0x3e/0x50 ret_from_fork_asm+0x1a/0x30 I've seen the AGI variant from scrub running on the filesysetm after unmount failed due to systemd interference: XFS: Assertion failed: pag->pagi_freecount == be32_to_cpu(agi->agi_freecount) || xfs_is_shutdown(pag->pag_mount), file: fs/xfs/libxfs/xfs_ialloc.c, line: 2804 ..... Call Trace: xfs_ialloc_read_agi+0xee/0x150 xchk_perag_drain_and_lock+0x7d/0x240 xchk_ag_init+0x34/0x90 xchk_inode_xref+0x7b/0x220 xchk_inode+0x14d/0x180 xfs_scrub_metadata+0x2e2/0x510 xfs_ioc_scrub_metadata+0x62/0xb0 xfs_file_ioctl+0x446/0xbf0 __se_sys_ioctl+0x6f/0xc0 __x64_sys_ioctl+0x1d/0x30 x64_sys_call+0x1879/0x2ee0 do_syscall_64+0x68/0x130 ? exc_page_fault+0x62/0xc0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Essentially, it is the same problem. When _flakey_drop_and_remount() loads the drop-writes table, it makes all writes silently fail. Writes are reported to the fs as completed successfully, but they are not issued to the backing store. The filesystem sees the successful write completion and marks the metadata buffer clean and removes it from the AIL. If this happens at the same time as memory pressure is occuring, the now-clean AGF and/or AGI buffers can be reclaimed from memory. Shortly afterwards, but before _flakey_drop_and_remount() runs unmount, background writeback is kicked and it tries to allocate blocks for the dirty pages in memory. This then tries to access the AGF buffer we just turfed out of memory. It's not found, so it gets read in from disk. This is all fine, except for the fact that the last writeback of the AGF did not actually reach disk. The AGF on disk is stale compared to the in-memory state held by the perag, and so they don't match and the assert fires. Then other operations on that inode hang because the task was killed whilst holding inode locks. e.g: Workqueue: xfs-conv/dm-12 xfs_end_io Call Trace: __schedule+0x650/0xb10 schedule+0x6d/0xf0 schedule_preempt_disabled+0x15/0x30 rwsem_down_write_slowpath+0x31a/0x5f0 down_write+0x43/0x60 xfs_ilock+0x1a8/0x210 xfs_trans_alloc_inode+0x9c/0x240 xfs_iomap_write_unwritten+0xe3/0x300 xfs_end_ioend+0x90/0x130 xfs_end_io+0xce/0x100 process_scheduled_works+0x1d4/0x400 worker_thread+0x234/0x2e0 kthread+0x147/0x170 ret_from_fork+0x3e/0x50 ret_from_fork_asm+0x1a/0x30 and it's all down hill from there. Memory pressure is one way to trigger this, another is to run "echo 3 > /proc/sys/vm/drop_caches" randomly while tests are running. Regardless of how it is triggered, this effectively takes down the system once umount hangs because it's holding a sb->s_umount lock exclusive and now every sync(1) call gets stuck on it. Fix this by replacing the asserts with a corruption detection check and a shutdown. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit 09234a632be42573d9743ac5ff6773622d233ad0 Author: Dave Chinner Date: Thu Jun 26 08:48:54 2025 +1000 xfs: xfs_ifree_cluster vs xfs_iflush_shutdown_abort deadlock Lock order of xfs_ifree_cluster() is cluster buffer -> try ILOCK -> IFLUSHING, except for the last inode in the cluster that is triggering the free. In that case, the lock order is ILOCK -> cluster buffer -> IFLUSHING. xfs_iflush_cluster() uses cluster buffer -> try ILOCK -> IFLUSHING, so this can safely run concurrently with xfs_ifree_cluster(). xfs_inode_item_precommit() uses ILOCK -> cluster buffer, but this cannot race with xfs_ifree_cluster() so being in a different order will not trigger a deadlock. xfs_reclaim_inode() during a filesystem shutdown uses ILOCK -> IFLUSHING -> cluster buffer via xfs_iflush_shutdown_abort(), and this deadlocks against xfs_ifree_cluster() like so: sysrq: Show Blocked State task:kworker/10:37 state:D stack:12560 pid:276182 tgid:276182 ppid:2 flags:0x00004000 Workqueue: xfs-inodegc/dm-3 xfs_inodegc_worker Call Trace: __schedule+0x650/0xb10 schedule+0x6d/0xf0 schedule_timeout+0x8b/0x180 schedule_timeout_uninterruptible+0x1e/0x30 xfs_ifree+0x326/0x730 xfs_inactive_ifree+0xcb/0x230 xfs_inactive+0x2c8/0x380 xfs_inodegc_worker+0xaa/0x180 process_scheduled_works+0x1d4/0x400 worker_thread+0x234/0x2e0 kthread+0x147/0x170 ret_from_fork+0x3e/0x50 ret_from_fork_asm+0x1a/0x30 task:fsync-tester state:D stack:12160 pid:2255943 tgid:2255943 ppid:3988702 flags:0x00004006 Call Trace: __schedule+0x650/0xb10 schedule+0x6d/0xf0 schedule_timeout+0x31/0x180 __down_common+0xbe/0x1f0 __down+0x1d/0x30 down+0x48/0x50 xfs_buf_lock+0x3d/0xe0 xfs_iflush_shutdown_abort+0x51/0x1e0 xfs_icwalk_ag+0x386/0x690 xfs_reclaim_inodes_nr+0x114/0x160 xfs_fs_free_cached_objects+0x19/0x20 super_cache_scan+0x17b/0x1a0 do_shrink_slab+0x180/0x350 shrink_slab+0xf8/0x430 drop_slab+0x97/0xf0 drop_caches_sysctl_handler+0x59/0xc0 proc_sys_call_handler+0x189/0x280 proc_sys_write+0x13/0x20 vfs_write+0x33d/0x3f0 ksys_write+0x7c/0xf0 __x64_sys_write+0x1b/0x30 x64_sys_call+0x271d/0x2ee0 do_syscall_64+0x68/0x130 entry_SYSCALL_64_after_hwframe+0x76/0x7e We can't change the lock order of xfs_ifree_cluster() - XFS_ISTALE and XFS_IFLUSHING are serialised through to journal IO completion by the cluster buffer lock being held. There's quite a few asserts in the code that check that XFS_ISTALE does not occur out of sync with buffer locking (e.g. in xfs_iflush_cluster). There's also a dependency on the inode log item being removed from the buffer before XFS_IFLUSHING is cleared, also with asserts that trigger on this. Further, we don't have a requirement for the inode to be locked when completing or aborting inode flushing because all the inode state updates are serialised by holding the cluster buffer lock across the IO to completion. We can't check for XFS_IRECLAIM in xfs_ifree_mark_inode_stale() and skip the inode, because there is no guarantee that the inode will be reclaimed. Hence it *must* be marked XFS_ISTALE regardless of whether reclaim is preparing to free that inode. Similarly, we can't check for IFLUSHING before locking the inode because that would result in dirty inodes not being marked with ISTALE in the event of racing with XFS_IRECLAIM. Hence we have to address this issue from the xfs_reclaim_inode() side. It is clear that we cannot hold the inode locked here when calling xfs_iflush_shutdown_abort() because it is the inode->buffer lock order that causes the deadlock against xfs_ifree_cluster(). Hence we need to drop the ILOCK before aborting the inode in the shutdown case. Once we've aborted the inode, we can grab the ILOCK again and then immediately reclaim it as it is now guaranteed to be clean. Note that dropping the ILOCK in xfs_reclaim_inode() means that it can now be locked by xfs_ifree_mark_inode_stale() and seen whilst in this state. This is safe because we have left the XFS_IFLUSHING flag on the inode and so xfs_ifree_mark_inode_stale() will simply set XFS_ISTALE and move to the next inode. An ASSERT check in this path needs to be tweaked to take into account this new shutdown interaction. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit 5f6e3b720694ad771911f637a51930f511427ce1 Author: Yazen Ghannam Date: Tue Jun 24 14:15:59 2025 +0000 x86/mce/amd: Fix threshold limit reset The MCA threshold limit must be reset after servicing the interrupt. Currently, the restart function doesn't have an explicit check for this. It makes some assumptions based on the current limit and what's in the registers. These assumptions don't always hold, so the limit won't be reset in some cases. Make the reset condition explicit. Either an interrupt/overflow has occurred or the bank is being initialized. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250624-wip-mca-updates-v4-4-236dd74f645f@amd.com commit d66e1e90b16055d2f0ee76e5384e3f119c3c2773 Author: Yazen Ghannam Date: Tue Jun 24 14:15:58 2025 +0000 x86/mce/amd: Add default names for MCA banks and blocks Ensure that sysfs init doesn't fail for new/unrecognized bank types or if a bank has additional blocks available. Most MCA banks have a single thresholding block, so the block takes the same name as the bank. Unified Memory Controllers (UMCs) are a special case where there are two blocks and each has a unique name. However, the microarchitecture allows for five blocks. Any new MCA bank types with more than one block will be missing names for the extra blocks. The MCE sysfs will fail to initialize in this case. Fixes: 87a6d4091bd7 ("x86/mce/AMD: Update sysfs bank names for SMCA systems") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250624-wip-mca-updates-v4-3-236dd74f645f@amd.com commit 00c092de6f28ebd32208aef83b02d61af2229b60 Author: Yazen Ghannam Date: Tue Jun 24 14:15:57 2025 +0000 x86/mce: Ensure user polling settings are honored when restarting timer Users can disable MCA polling by setting the "ignore_ce" parameter or by setting "check_interval=0". This tells the kernel to *not* start the MCE timer on a CPU. If the user did not disable CMCI, then storms can occur. When these happen, the MCE timer will be started with a fixed interval. After the storm subsides, the timer's next interval is set to check_interval. This disregards the user's input through "ignore_ce" and "check_interval". Furthermore, if "check_interval=0", then the new timer will run faster than expected. Create a new helper to check these conditions and use it when a CMCI storm ends. [ bp: Massage. ] Fixes: 7eae17c4add5 ("x86/mce: Add per-bank CMCI storm mitigation") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250624-wip-mca-updates-v4-2-236dd74f645f@amd.com commit f40213cd93e608ee78b5e25db042c42ec07139fe Author: Johannes Berg Date: Fri Jun 6 09:56:52 2025 +0200 i2c: scx200_acb: depends on HAS_IOPORT It already depends on X86_32, but that's also set for ARCH=um. Recent changes made UML no longer have IO port access since it's not needed, but this driver uses it. Build it only for HAS_IOPORT. This is pretty much the same as depending on X86, but on the off-chance that HAS_IOPORT will ever be optional on x86 HAS_IOPORT is the real prerequisite. Signed-off-by: Johannes Berg Signed-off-by: Wolfram Sang commit 955853cf83657faa58572ef3f08b44f0f88885c1 Author: Bibo Mao Date: Fri Jun 27 18:27:44 2025 +0800 LoongArch: KVM: Disable updating of "num_cpu" and "feature" Property "num_cpu" and "feature" are read-only once eiointc is created, which are set with KVM_DEV_LOONGARCH_EXTIOI_GRP_CTRL attr group before device creation. Attr group KVM_DEV_LOONGARCH_EXTIOI_GRP_SW_STATUS is to update register and software state for migration and reset usage, property "num_cpu" and "feature" can not be update again if it is created already. Here discard write operation with property "num_cpu" and "feature" in attr group KVM_DEV_LOONGARCH_EXTIOI_GRP_CTRL. Cc: stable@vger.kernel.org Fixes: 1ad7efa552fd ("LoongArch: KVM: Add EIOINTC user mode read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit cc8d5b209e09d3b52bca1ffe00045876842d96ae Author: Bibo Mao Date: Fri Jun 27 18:27:44 2025 +0800 LoongArch: KVM: Check validity of "num_cpu" from user space The maximum supported cpu number is EIOINTC_ROUTE_MAX_VCPUS about irqchip EIOINTC, here add validation about cpu number to avoid array pointer overflow. Cc: stable@vger.kernel.org Fixes: 1ad7efa552fd ("LoongArch: KVM: Add EIOINTC user mode read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 45515c643d0abb75c2cc760a6bc6b235eadafd66 Author: Bibo Mao Date: Fri Jun 27 18:27:44 2025 +0800 LoongArch: KVM: Check interrupt route from physical CPU With EIOINTC interrupt controller, physical CPU ID is set for irq route. However the function kvm_get_vcpu() is used to get destination vCPU when delivering irq. With API kvm_get_vcpu(), the logical CPU ID is used. With API kvm_get_vcpu_by_cpuid(), vCPU ID can be searched from physical CPU ID. Cc: stable@vger.kernel.org Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit c34bbc2c990700ba07b271fc7c8113b0bc3e4093 Author: Bibo Mao Date: Fri Jun 27 18:27:44 2025 +0800 LoongArch: KVM: Fix interrupt route update with EIOINTC With function eiointc_update_sw_coremap(), there is forced assignment like val = *(u64 *)pvalue. Parameter pvalue may be pointer to char type or others, there is problem with forced assignment with u64 type. Here the detailed value is passed rather address pointer. Cc: stable@vger.kernel.org Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 9159c5e733cfa35ec863fa81960a3e7435f831fb Author: Bibo Mao Date: Fri Jun 27 18:27:44 2025 +0800 LoongArch: KVM: Add address alignment check for IOCSR emulation IOCSR instruction supports 1/2/4/8 bytes access, the address should be naturally aligned with its access size. Here address alignment check is added in the EIOINTC kernel emulation. Cc: stable@vger.kernel.org Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 48e29133ae880a8f30ff098a9843d22e012350e0 Merge: 86731a2a651e58 666c23af755dcc Author: Wolfram Sang Date: Fri Jun 27 11:58:27 2025 +0200 Merge tag 'i2c-host-fixes-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host fixes for v6.16-rc4 - imx: fix SMBus protocol compliance during block read - omap: fix error handling path in probe - robotfuzz, tiny-usb: prevent zero-length reads - x86, designware, amdisp: fix build error when modules are disabled commit f6faebc11a8a6d9521e5ab00481bd22ed9c7c67d Author: Maxime Ripard Date: Thu Jun 26 12:05:03 2025 +0200 drm/panel: panel-simple: get rid of panel_dpi hack The empty panel_dpi struct was only ever used as a discriminant, but it's kind of a hack, and with the reworks done in the previous patches, we shouldn't need it anymore. Let's get rid of it. Reviewed-by: Javier Martinez Canillas Tested-by: Francesco Dolcini # Toradex Colibri iMX6 Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-5-5afcaa608bdc@kernel.org Signed-off-by: Maxime Ripard commit 47c08262f34e1cd9c48364431e4d32529029b910 Author: Maxime Ripard Date: Thu Jun 26 12:05:02 2025 +0200 drm/panel: panel-simple: Add function to look panel data up Commit de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") moved the call to drm_panel_init into the devm_drm_panel_alloc(), which needs a connector type to initialize properly. In the panel-dpi compatible case, the passed panel_desc structure is an empty one used as a discriminant, and the connector type it contains isn't actually initialized. It is initialized through a call to panel_dpi_probe() later in the function, which used to be before the call to drm_panel_init() that got merged into devm_drm_panel_alloc(). So, we do need a proper panel_desc pointer before the call to devm_drm_panel_alloc() now. All cases associate their panel_desc with the panel compatible and use of_device_get_match_data, except for the panel-dpi compatible. In that case, we're expected to call panel_dpi_probe, which will allocate and initialize the panel_desc for us. Let's create such a helper function that would be called first in the driver and will lookup the desc by compatible, or allocate one if relevant. Reported-by: Francesco Dolcini Closes: https://lore.kernel.org/all/20250612081834.GA248237@francesco-nb/ Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") Reviewed-by: Javier Martinez Canillas Tested-by: Francesco Dolcini # Toradex Colibri iMX6 Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-4-5afcaa608bdc@kernel.org Signed-off-by: Maxime Ripard commit 921c41e509746aabecbbb2595ebf41a9d8fdc4e2 Author: Maxime Ripard Date: Thu Jun 26 12:05:01 2025 +0200 drm/panel: panel-simple: Make panel_simple_probe return its panel In order to fix the regession introduced by commit de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()"), we need to move the panel_desc lookup into the common panel_simple_probe() function. There's two callers for that function, the probe implementations of the platform and MIPI-DSI drivers panel-simple implements. The MIPI-DSI driver's probe will need to access the current panel_desc to initialize properly, which won't be possible anymore if we make that lookup in panel_simple_probe(). However, we can make panel_simple_probe() return the initialized panel_simple structure it allocated, which will contain a pointer to the associated panel_desc in its desc field. This doesn't fix de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") still, but makes progress towards that goal. Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") Reviewed-by: Javier Martinez Canillas Tested-by: Francesco Dolcini # Toradex Colibri iMX6 Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-3-5afcaa608bdc@kernel.org Signed-off-by: Maxime Ripard commit 073667fce1667eab31d6a62cdd7fb795933ec7e8 Author: Maxime Ripard Date: Thu Jun 26 12:05:00 2025 +0200 drm/panel: panel-simple: make panel_dpi_probe return a panel_desc If the panel-simple driver is probed from a panel-dpi compatible, the driver will use an empty panel_desc structure as a descriminant. It will then allocate and fill another panel_desc as part of its probe. However, that allocation needs to happen after the panel_simple structure has been allocated, since panel_dpi_probe(), the function doing the panel_desc allocation and initialization, takes a panel_simple pointer as an argument. This pointer is used to fill the panel_simple->desc pointer that is still initialized with the empty panel_desc when panel_dpi_probe() is called. Since commit de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()"), we will need the panel connector type found in panel_desc to allocate panel_simple. This creates a circular dependency where we need panel_desc to create panel_simple, and need panel_simple to create panel_desc. Let's break that dependency by making panel_dpi_probe simply return the panel_desc it initialized and move the panel_simple->desc assignment to the caller. This will not fix the breaking commit entirely, but will move us towards the right direction. Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") Reviewed-by: Javier Martinez Canillas Tested-by: Francesco Dolcini # Toradex Colibri iMX6 Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-2-5afcaa608bdc@kernel.org Signed-off-by: Maxime Ripard commit 2d22b63f3a5aae2088708941d08cf0f01f430a58 Author: Maxime Ripard Date: Thu Jun 26 12:04:59 2025 +0200 drm/mipi-dsi: Add dev_is_mipi_dsi function This will be especially useful for generic panels (like panel-simple) which can take different code path depending on if they are MIPI-DSI devices or platform devices. Reviewed-by: Javier Martinez Canillas Tested-by: Francesco Dolcini # Toradex Colibri iMX6 Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-1-5afcaa608bdc@kernel.org Signed-off-by: Maxime Ripard commit 62e062a29ad5133f67c20b333ba0a952a99161ae Author: Simon Xue Date: Mon Jun 23 10:00:18 2025 +0800 iommu/rockchip: prevent iommus dead loop when two masters share one IOMMU When two masters share an IOMMU, calling ops->of_xlate during the second master's driver init may overwrite iommu->domain set by the first. This causes the check if (iommu->domain == domain) in rk_iommu_attach_device() to fail, resulting in the same iommu->node being added twice to &rk_domain->iommus, which can lead to an infinite loop in subsequent &rk_domain->iommus operations. Cc: Fixes: 25c2325575cc ("iommu/rockchip: Add missing set_platform_dma_ops callback") Signed-off-by: Simon Xue Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20250623020018.584802-1-xxm@rock-chips.com Signed-off-by: Joerg Roedel commit 67a993863163cb88b1b68974c31b0d84ece4293e Merge: 6f2a71a99ebd5d 20d71750cc72e8 Author: Linus Torvalds Date: Thu Jun 26 22:05:24 2025 -0700 Merge tag 'v6.16-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression where wp512 can no longer be used with hmac" * tag 'v6.16-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: wp512 - Use API partial block handling commit 6f2a71a99ebd5dfaa7948a2e9c59eae94b741bd8 Merge: 8a20830f2dd180 ef6fac0f9e5d06 Author: Linus Torvalds Date: Thu Jun 26 19:49:12 2025 -0700 Merge tag 'bcachefs-2025-06-26' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - Lots of small check/repair fixes, primarily in subvol loop and directory structure loop (when involving snapshots). - Fix a few 6.16 regressions: rare UAF in the foreground allocator path when taking a transaction restart from the transaction bump allocator, and some small fallout from the change to log the error being corrected in the journal when repairing errors, also some fallout from the btree node read error logging improvements. (Alan, Bharadwaj) - New option: journal_rewind This lets the entire filesystem be reset to an earlier point in time. Note that this is only a disaster recovery tool, and right now there are major caveats to using it (discards should be disabled, in particular), but it successfully restored the filesystem of one of the users who was bit by the subvolume deletion bug and didn't have backups. I'll likely be making some changes to the discard path in the future to make this a reliable recovery tool. - Some new btree iterator tracepoints, for tracking down some livelock-ish behaviour we've been seeing in the main data write path. * tag 'bcachefs-2025-06-26' of git://evilpiepirate.org/bcachefs: (51 commits) bcachefs: Plumb correct ip to trans_relock_fail tracepoint bcachefs: Ensure we rewind to run recovery passes bcachefs: Ensure btree node scan runs before checking for scanned nodes bcachefs: btree_root_unreadable_and_scan_found_nothing should not be autofix bcachefs: fix bch2_journal_keys_peek_prev_min() underflow bcachefs: Use wait_on_allocator() when allocating journal bcachefs: Check for bad write buffer key when moving from journal bcachefs: Don't unlock the trans if ret doesn't match BCH_ERR_operation_blocked bcachefs: Fix range in bch2_lookup_indirect_extent() error path bcachefs: fix spurious error_throw bcachefs: Add missing bch2_err_class() to fileattr_set() bcachefs: Add missing key type checks to check_snapshot_exists() bcachefs: Don't log fsck err in the journal if doing repair elsewhere bcachefs: Fix *__bch2_trans_subbuf_alloc() error path bcachefs: Fix missing newlines before ero bcachefs: fix spurious error in read_btree_roots() bcachefs: fsck: Fix oops in key_visible_in_snapshot() bcachefs: fsck: fix unhandled restart in topology repair bcachefs: fsck: Fix check_directory_structure when no check_dirents bcachefs: Fix restart handling in btree_node_scrub_work() ... commit 8a20830f2dd180064f25254d9c55beb243fe9223 Merge: f02769e7f272d6 a8905238c3bbe1 Author: Linus Torvalds Date: Thu Jun 26 17:06:01 2025 -0700 Merge tag 'hid-for-linus-2025062701' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - fix for stalls during suspend/resume cycles with hid-nintendo (Daniel J. Ogorchock) - memory leak and reference count fixes in hid-wacom and in-appletb-kdb (Qasim Ijaz) - race condition (leading to kernel crash) fix during device removal in hid-wacom (Thomas Zeitlhofer) - fix for missed interrupt in intel-thc-hid (Intel-thc-hid:) - support for a bunch of new device IDs * tag 'hid-for-linus-2025062701' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: lenovo: Add support for ThinkPad X1 Tablet Thin Keyboard Gen2 HID: appletb-kbd: fix "appletb_backlight" backlight device reference counting HID: wacom: fix crash in wacom_aes_battery_handler() HID: intel-ish-hid: ipc: Add Wildcat Lake PCI device ID hid: intel-ish-hid: Use PCI_DEVICE_DATA() macro for ISH device table HID: lenovo: Restrict F7/9/11 mode to compact keyboards only HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY HID: input: lower message severity of 'No inputs registered, leaving' to debug HID: quirks: Add quirk for 2 Chicony Electronics HP 5MP Cameras HID: Intel-thc-hid: Intel-quicki2c: Enhance QuickI2C reset flow HID: nintendo: avoid bluetooth suspend/resume stalls HID: wacom: fix kobject reference count leak HID: wacom: fix memory leak on sysfs attribute creation failure HID: wacom: fix memory leak on kobject creation failure commit 6daaa479ac557bc426a7fd2e913b618523fe41fd Merge: b6211ab2ebc1e4 af2b588abe006b Author: Dave Airlie Date: Fri Jun 27 09:13:45 2025 +1000 Merge tag 'drm-xe-fixes-2025-06-26' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: Driver Changes: - Missing error check (Haoxiang Li) - Fix xe_hwmon_power_max_write (Karthik) - Move flushes (Maarten and Matthew Auld) - Explicitly exit CT safe mode on unwind (Michal) - Process deferred GGTT node removals on device unwind (Michal) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aF1T6EzzC3xj4K4H@fedora commit b6211ab2ebc1e47c1ce8e42c5edbd75d8161c654 Merge: 06f6516ee0b1fd d02b2103a08b6d Author: Dave Airlie Date: Fri Jun 27 09:09:01 2025 +1000 Merge tag 'drm-intel-fixes-2025-06-26' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix for SNPS PHY HDMI for 1080p@120Hz - Correct DP AUX DPCD probe address - Followup build fix for GCOV and AutoFDO enabled config Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aFzsHR9WLYsxg8jy@jlahtine-mobl commit 06f6516ee0b1fd98da2cb781a848b54d504462e8 Merge: 86731a2a651e58 6847b3b6e84ef3 Author: Dave Airlie Date: Fri Jun 27 09:03:42 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-25-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.16-2025-25-25: amdgpu: - Cleaner shader support for additional GFX9 GPUs - MES firmware compatibility fixes - Discovery error reporting fixes - SDMA6/7 userq fixes - Backlight fix - EDID sanity check Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250625151734.11537-1-alexander.deucher@amd.com commit 8eba2187391e5ab49940cd02d6bd45a5617f4daf Author: Qiu-ji Chen Date: Fri Jun 6 17:00:17 2025 +0800 dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Fixed a flag reuse bug in the mtk_cqdma_tx_status() function. Fixes: 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()") Cc: stable@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUfU-lkp@intel.com/ Signed-off-by: Qiu-ji Chen Reviewed-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250606090017.5436-1-chenqiuji666@gmail.com Signed-off-by: Vinod Koul commit a628e69b6412dc02757a6a23f7f16ce0c14d71f1 Author: Vijendar Mukunda Date: Fri Jun 20 15:55:19 2025 +0530 soundwire: amd: fix for clearing command status register To clear the valid result status, 1 should be written to ACP_SDW_IMM_CMD_STS register. Update the ACP_SW_IMM_CMD_STS register value as 1. Fixes: d8f48fbdfd9a ("soundwire: amd: Add support for AMD Manager driver") Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20250620102617.73437-1-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit f02769e7f272d6f42b9767f066c5a99afd2338f3 Merge: e34a79b96ab9d4 f75794b6077ec7 Author: Linus Torvalds Date: Thu Jun 26 12:26:39 2025 -0700 Merge tag 'devicetree-fixes-for-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Convert altr,uart-1.0 and altr,juart-1.0 to DT schema. These were applied for nios2, but never sent upstream. - Fix extra '/' in fsl,ls1028a-reset '$id' path - Fix warnings in ti,sn65dsi83 schema due to unnecessary $ref. * tag 'devicetree-fixes-for-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: serial: Convert altr,uart-1.0 to DT schema dt-bindings: serial: Convert altr,juart-1.0 to DT schema dt-bindings: soc: fsl,ls1028a-reset: Drop extra "/" in $id dt-bindings: drm/bridge: ti-sn65dsi83: drop $ref to fix lvds-vod* warnings commit 12ffc3b1513ebc1f11ae77d053948504a94a68a6 Author: Mario Limonciello Date: Fri Jun 13 16:43:44 2025 -0500 PM: Restrict swap use to later in the suspend sequence Currently swap is restricted before drivers have had a chance to do their prepare() PM callbacks. Restricting swap this early means that if a driver needs to evict some content from memory into sawp in it's prepare callback, it won't be able to. On AMD dGPUs this can lead to failed suspends under memory pressure situations as all VRAM must be evicted to system memory or swap. Move the swap restriction to right after all devices have had a chance to do the prepare() callback. If there is any problem with the sequence, restore swap in the appropriate dpm resume callbacks or error handling paths. Closes: https://github.com/ROCm/ROCK-Kernel-Driver/issues/174 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Signed-off-by: Mario Limonciello Tested-by: Nat Wittstock Tested-by: Lucian Langa Link: https://patch.msgid.link/20250613214413.4127087-1-superm1@kernel.org Signed-off-by: Rafael J. Wysocki commit 178b8ff66ff827c41b4fa105e9aabb99a0b5c537 Author: Jens Axboe Date: Thu Jun 26 12:17:48 2025 -0600 io_uring/kbuf: flag partial buffer mappings A previous commit aborted mapping more for a non-incremental ring for bundle peeking, but depending on where in the process this peeking happened, it would not necessarily prevent a retry by the user. That can create gaps in the received/read data. Add struct buf_sel_arg->partial_map, which can pass this information back. The networking side can then map that to internal state and use it to gate retry as well. Since this necessitates a new flag, change io_sr_msg->retry to a retry_flags member, and store both the retry and partial map condition in there. Cc: stable@vger.kernel.org Fixes: 26ec15e4b0c1 ("io_uring/kbuf: don't truncate end buffer for multiple buffer peeks") Signed-off-by: Jens Axboe commit 38074de35b015df5623f524d6f2b49a0cd395c40 Author: Trond Myklebust Date: Thu Jun 19 15:16:11 2025 -0400 NFSv4/flexfiles: Fix handling of NFS level errors in I/O Allow the flexfiles error handling to recognise NFS level errors (as opposed to RPC level errors) and handle them separately. The main motivator is the NFSERR_PERM errors that get returned if the NFS client connects to the data server through a port number that is lower than 1024. In that case, the client should disconnect and retry a READ on a different data server, or it should retry a WRITE after reconnecting. Reviewed-by: Tigran Mkrtchyan Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 618c810a7b2163517ab1875bd56b633ca3cb3328 Author: Gabor Juhos Date: Wed Jun 25 19:32:35 2025 +0200 interconnect: icc-clk: destroy nodes in case of memory allocation failures When memory allocation fails during creating the name of the nodes in icc_clk_register(), the code continues on the error path and it calls icc_nodes_remove() to destroy the already created nodes. However that function only destroys the nodes which were already added to the provider and the newly created nodes are never destroyed in case of error. In order to avoid a memory leaks, change the code to destroy the newly created nodes explicitly in case of memory allocation failures. Fixes: 44c5aa73ccd1 ("interconnect: icc-clk: check return values of devm_kasprintf()") Signed-off-by: Gabor Juhos Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250625-icc-clk-memleak-fix-v1-1-4151484cd24f@gmail.com Signed-off-by: Georgi Djakov commit 1809db75bd1fa71e27e199e4c5cc9072741f6052 Author: Gabor Juhos Date: Wed Jun 25 15:34:23 2025 +0200 interconnect: increase ICC_DYN_ID_START Since commit d30f83d278a9 ("interconnect: core: Add dynamic id allocation support"), interconnect node ids greater than or equal to ICC_DYN_ID_START are reserved for dynamic id allocation. Yet the icc_node_create_nolock() function allows to directly use such ids for creating nodes. This can cause problems by executing dynamic id related codepaths even for nodes intended to use static ids. For example, the 'nsscc-ipq9574' driver creates interconnect nodes with static ids starting from 19148. Because these ids belongs to the dynamic id range, the icc_node_add() function replaces the node names unexpectedly. The node names looked like this before the change: # grep nss_cc /sys/kernel/debug/interconnect/interconnect_summary nss_cc_nssnoc_ppe_clk_master 0 0 nss_cc_nssnoc_ppe_clk_slave 0 0 nss_cc_nssnoc_ppe_cfg_clk_master 0 0 ... And those have an unexpected suffix now: # grep nss_cc /sys/kernel/debug/interconnect/interconnect_summary nss_cc_nssnoc_ppe_clk_master@39b00000.clock-controller 0 0 nss_cc_nssnoc_ppe_clk_slave@39b00000.clock-controller 0 0 nss_cc_nssnoc_ppe_cfg_clk_master@39b00000.clock-controller 0 0 ... Increase the value of ICC_DYN_ID_START to avoid this. Also, add sanity check to the icc_node_create_nolock() function to prevent directly creating nodes with ids reserved for dynamic allocation in order to detect these kind of problems. Fixes: d30f83d278a9 ("interconnect: core: Add dynamic id allocation support") Signed-off-by: Gabor Juhos Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250625-icc-dyn-id-fix-v1-1-127cb5498449@gmail.com Signed-off-by: Georgi Djakov commit e34a79b96ab9d49ed8b605fee11099cf3efbb428 Merge: ee88bddf7f2f5d 85720e04d9af0b Author: Linus Torvalds Date: Thu Jun 26 09:13:27 2025 -0700 Merge tag 'net-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth and wireless. Current release - regressions: - bridge: fix use-after-free during router port configuration Current release - new code bugs: - eth: wangxun: fix the creation of page_pool Previous releases - regressions: - netpoll: initialize UDP checksum field before checksumming - wifi: mac80211: finish link init before RCU publish - bluetooth: fix use-after-free in vhci_flush() - eth: - ionic: fix DMA mapping test - bnxt: properly flush XDP redirect lists Previous releases - always broken: - netlink: specs: enforce strict naming of properties - unix: don't leave consecutive consumed OOB skbs. - vsock: fix linux/vm_sockets.h userspace compilation errors - selftests: fix TCP packet checksum" * tag 'net-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (38 commits) net: libwx: fix the creation of page_pool net: selftests: fix TCP packet checksum atm: Release atm_dev_mutex after removing procfs in atm_dev_deregister(). netlink: specs: enforce strict naming of properties netlink: specs: tc: replace underscores with dashes in names netlink: specs: rt-link: replace underscores with dashes in names netlink: specs: mptcp: replace underscores with dashes in names netlink: specs: ovs_flow: replace underscores with dashes in names netlink: specs: devlink: replace underscores with dashes in names netlink: specs: dpll: replace underscores with dashes in names netlink: specs: ethtool: replace underscores with dashes in names netlink: specs: fou: replace underscores with dashes in names netlink: specs: nfsd: replace underscores with dashes in names net: enetc: Correct endianness handling in _enetc_rd_reg64 atm: idt77252: Add missing `dma_map_error()` bnxt: properly flush XDP redirect lists vsock/uapi: fix linux/vm_sockets.h userspace compilation errors wifi: mac80211: finish link init before RCU publish wifi: iwlwifi: mvm: assume '1' as the default mac_config_cmd version selftest: af_unix: Add tests for -ECONNRESET. ... commit 263debecb4aa7cec0a86487e6f409814f6194a21 Author: David Howells Date: Wed Apr 2 20:27:26 2025 +0100 cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code When performing a file read from RDMA, smbd_recv() prints an "Invalid msg type 4" error and fails the I/O. This is due to the switch-statement there not handling the ITER_FOLIOQ handed down from netfslib. Fix this by collapsing smbd_recv_buf() and smbd_recv_page() into smbd_recv() and just using copy_to_iter() instead of memcpy(). This future-proofs the function too, in case more ITER_* types are added. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Reported-by: Stefan Metzmacher Signed-off-by: David Howells cc: Tom Talpey cc: Paulo Alcantara (Red Hat) cc: Matthew Wilcox cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 43e7e284fc77b710d899569360ea46fa3374ae22 Author: David Howells Date: Wed Jun 25 14:15:04 2025 +0100 cifs: Fix the smbd_response slab to allow usercopy The handling of received data in the smbdirect client code involves using copy_to_iter() to copy data from the smbd_reponse struct's packet trailer to a folioq buffer provided by netfslib that encapsulates a chunk of pagecache. If, however, CONFIG_HARDENED_USERCOPY=y, this will result in the checks then performed in copy_to_iter() oopsing with something like the following: CIFS: Attempting to mount //172.31.9.1/test CIFS: VFS: RDMA transport established usercopy: Kernel memory exposure attempt detected from SLUB object 'smbd_response_0000000091e24ea1' (offset 81, size 63)! ------------[ cut here ]------------ kernel BUG at mm/usercopy.c:102! ... RIP: 0010:usercopy_abort+0x6c/0x80 ... Call Trace: __check_heap_object+0xe3/0x120 __check_object_size+0x4dc/0x6d0 smbd_recv+0x77f/0xfe0 [cifs] cifs_readv_from_socket+0x276/0x8f0 [cifs] cifs_read_from_socket+0xcd/0x120 [cifs] cifs_demultiplex_thread+0x7e9/0x2d50 [cifs] kthread+0x396/0x830 ret_from_fork+0x2b8/0x3b0 ret_from_fork_asm+0x1a/0x30 The problem is that the smbd_response slab's packet field isn't marked as being permitted for usercopy. Fix this by passing parameters to kmem_slab_create() to indicate that copy_to_iter() is permitted from the packet region of the smbd_response slab objects, less the header space. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Reported-by: Stefan Metzmacher Link: https://lore.kernel.org/r/acb7f612-df26-4e2a-a35d-7cd040f513e1@samba.org/ Signed-off-by: David Howells Reviewed-by: Stefan Metzmacher Tested-by: Stefan Metzmacher cc: Paulo Alcantara cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 711741f94ac3cf9f4e3aa73aa171e76d188c0819 Author: Paulo Alcantara Date: Wed Jun 25 12:22:38 2025 -0300 smb: client: fix potential deadlock when reconnecting channels Fix cifs_signal_cifsd_for_reconnect() to take the correct lock order and prevent the following deadlock from happening ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc3-build2+ #1301 Tainted: G S W ------------------------------------------------------ cifsd/6055 is trying to acquire lock: ffff88810ad56038 (&tcp_ses->srv_lock){+.+.}-{3:3}, at: cifs_signal_cifsd_for_reconnect+0x134/0x200 but task is already holding lock: ffff888119c64330 (&ret_buf->chan_lock){+.+.}-{3:3}, at: cifs_signal_cifsd_for_reconnect+0xcf/0x200 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&ret_buf->chan_lock){+.+.}-{3:3}: validate_chain+0x1cf/0x270 __lock_acquire+0x60e/0x780 lock_acquire.part.0+0xb4/0x1f0 _raw_spin_lock+0x2f/0x40 cifs_setup_session+0x81/0x4b0 cifs_get_smb_ses+0x771/0x900 cifs_mount_get_session+0x7e/0x170 cifs_mount+0x92/0x2d0 cifs_smb3_do_mount+0x161/0x460 smb3_get_tree+0x55/0x90 vfs_get_tree+0x46/0x180 do_new_mount+0x1b0/0x2e0 path_mount+0x6ee/0x740 do_mount+0x98/0xe0 __do_sys_mount+0x148/0x180 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #1 (&ret_buf->ses_lock){+.+.}-{3:3}: validate_chain+0x1cf/0x270 __lock_acquire+0x60e/0x780 lock_acquire.part.0+0xb4/0x1f0 _raw_spin_lock+0x2f/0x40 cifs_match_super+0x101/0x320 sget+0xab/0x270 cifs_smb3_do_mount+0x1e0/0x460 smb3_get_tree+0x55/0x90 vfs_get_tree+0x46/0x180 do_new_mount+0x1b0/0x2e0 path_mount+0x6ee/0x740 do_mount+0x98/0xe0 __do_sys_mount+0x148/0x180 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #0 (&tcp_ses->srv_lock){+.+.}-{3:3}: check_noncircular+0x95/0xc0 check_prev_add+0x115/0x2f0 validate_chain+0x1cf/0x270 __lock_acquire+0x60e/0x780 lock_acquire.part.0+0xb4/0x1f0 _raw_spin_lock+0x2f/0x40 cifs_signal_cifsd_for_reconnect+0x134/0x200 __cifs_reconnect+0x8f/0x500 cifs_handle_standard+0x112/0x280 cifs_demultiplex_thread+0x64d/0xbc0 kthread+0x2f7/0x310 ret_from_fork+0x2a/0x230 ret_from_fork_asm+0x1a/0x30 other info that might help us debug this: Chain exists of: &tcp_ses->srv_lock --> &ret_buf->ses_lock --> &ret_buf->chan_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ret_buf->chan_lock); lock(&ret_buf->ses_lock); lock(&ret_buf->chan_lock); lock(&tcp_ses->srv_lock); *** DEADLOCK *** 3 locks held by cifsd/6055: #0: ffffffff857de398 (&cifs_tcp_ses_lock){+.+.}-{3:3}, at: cifs_signal_cifsd_for_reconnect+0x7b/0x200 #1: ffff888119c64060 (&ret_buf->ses_lock){+.+.}-{3:3}, at: cifs_signal_cifsd_for_reconnect+0x9c/0x200 #2: ffff888119c64330 (&ret_buf->chan_lock){+.+.}-{3:3}, at: cifs_signal_cifsd_for_reconnect+0xcf/0x200 Cc: linux-cifs@vger.kernel.org Reported-by: David Howells Fixes: d7d7a66aacd6 ("cifs: avoid use of global locks for high contention data") Reviewed-by: David Howells Tested-by: David Howells Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Signed-off-by: Steve French commit 4c113a5b28bfd589e2010b5fc8867578b0135ed7 Author: Yazen Ghannam Date: Tue Jun 24 14:15:56 2025 +0000 x86/mce: Don't remove sysfs if thresholding sysfs init fails Currently, the MCE subsystem sysfs interface will be removed if the thresholding sysfs interface fails to be created. A common failure is due to new MCA bank types that are not recognized and don't have a short name set. The MCA thresholding feature is optional and should not break the common MCE sysfs interface. Also, new MCA bank types are occasionally introduced, and updates will be needed to recognize them. But likewise, this should not break the common sysfs interface. Keep the MCE sysfs interface regardless of the status of the thresholding sysfs interface. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Qiuxu Zhuo Reviewed-by: Tony Luck Tested-by: Tony Luck Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250624-wip-mca-updates-v4-1-236dd74f645f@amd.com commit 50b6914fc53c718c5426fb6e9cd9484f9ae967c2 Author: Armin Wolf Date: Fri Jun 20 00:14:40 2025 +0200 platform/x86: wmi: Update documentation of WCxx/WExx ACPI methods Inform potential firmware developers that WExx ACPI methods are always called by the WMI driver core even if the associated WMI event is not marked as being expensive. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250619221440.6737-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit cf0b812500e64a7d5e2957abed38c3a97917b34f Author: Armin Wolf Date: Fri Jun 20 00:14:39 2025 +0200 platform/x86: wmi: Fix WMI event enablement It turns out that the Windows WMI-ACPI driver always enables/disables WMI events regardless of whether they are marked as expensive or not. This finding is further reinforced when reading the documentation of the WMI_FUNCTION_CONTROL_CALLBACK callback used by Windows drivers for enabling/disabling WMI devices: The DpWmiFunctionControl routine enables or disables notification of events, and enables or disables data collection for data blocks that the driver registered as expensive to collect. Follow this behavior to fix the WMI event used for reporting hotkey events on the Dell Latitude 5400 and likely many more devices. Reported-by: Dmytro Bagrii Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220246 Tested-by: Dmytro Bagrii Fixes: 656f0961d126 ("platform/x86: wmi: Rework WCxx/WExx ACPI method handling") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250619221440.6737-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a49e1e2e785fb3621f2d748581881b23a364998a Author: Mathias Nyman Date: Thu Jun 26 16:01:02 2025 +0300 usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm Delayed work to prevent USB3 hubs from runtime-suspending immediately after resume was added in commit 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs"). This delayed work needs be flushed if system suspends, or hub needs to be quiesced for other reasons right after resume. Not flushing it triggered issues on QC SC8280XP CRD board during suspend/resume testing. Fix it by flushing the delayed resume work in hub_quiesce() The delayed work item that allow hub runtime suspend is also scheduled just before calling autopm get. Alan pointed out there is a small risk that work is run before autopm get, which would call autopm put before get, and mess up the runtime pm usage order. Swap the order of work sheduling and calling autopm get to solve this. Cc: stable Fixes: 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs") Reported-by: Konrad Dybcio Closes: https://lore.kernel.org/linux-usb/acaaa928-832c-48ca-b0ea-d202d5cd3d6c@oss.qualcomm.com Reported-by: Alan Stern Closes: https://lore.kernel.org/linux-usb/c73fbead-66d7-497a-8fa1-75ea4761090a@rowland.harvard.edu Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250626130102.3639861-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d07143b507c51c04c091081627c5a130e9d3c517 Author: Alok Tiwari Date: Sun Jun 22 00:29:12 2025 -0700 platform/mellanox: nvsw-sn2201: Fix bus number in adapter error message change error log to use correct bus number from main_mux_devs instead of cpld_devs. Fixes: 662f24826f95 ("platform/mellanox: Add support for new SN2201 system") Signed-off-by: Alok Tiwari Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250622072921.4111552-2-alok.a.tiwari@oracle.com Signed-off-by: Ilpo Järvinen commit c3ac7e30309b8221a8321c3882d289ba519b4104 Author: Alok Tiwari Date: Sun Jun 22 00:29:11 2025 -0700 platform/mellanox: Fix spelling and comment clarity in Mellanox drivers This commit corrects several minor typographical errors in comments and error messages across multiple Mellanox platform driver. Fixed spelling of "thresholds", "region", "platform", "default", and removed redundant spaces in comment strings and error logs. These changes are cosmetic and do not affect runtime behavior. Signed-off-by: Alok Tiwari Reviewed-by: Vadim Pasternak Reviewed-by: David Thompson Link: https://lore.kernel.org/r/20250622072921.4111552-1-alok.a.tiwari@oracle.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c007062188d8e402c294117db53a24b2bed2b83f Author: Yu Kuai Date: Thu Jun 26 19:57:43 2025 +0800 block: fix false warning in bdev_count_inflight_rw() While bdev_count_inflight is interating all cpus, if some IOs are issued from traversed cpu and then completed from the cpu that is not traversed yet: cpu0 cpu1 bdev_count_inflight //for_each_possible_cpu // cpu0 is 0 infliht += 0 // issue a io blk_account_io_start // cpu0 inflight ++ cpu2 // the io is done blk_account_io_done // cpu2 inflight -- // cpu 1 is 0 inflight += 0 // cpu2 is -1 inflight += -1 ... In this case, the total inflight will be -1, causing lots of false warning. Fix the problem by removing the warning. Noted there is still a valid warning for nvme-mpath(From Yi) that is not fixed yet. Fixes: f5482ee5edb9 ("block: WARN if bdev inflight counter is negative") Reported-by: Yi Zhang Closes: https://lore.kernel.org/linux-block/aFtUXy-lct0WxY2w@mozart.vkv.me/T/#mae89155a5006463d0a21a4a2c35ae0034b26a339 Reported-and-tested-by: Calvin Owens Closes: https://lore.kernel.org/linux-block/aFtUXy-lct0WxY2w@mozart.vkv.me/T/#m1d935a00070bf95055d0ac84e6075158b08acaef Reported-by: Dave Chinner Closes: https://lore.kernel.org/linux-block/aFuypjqCXo9-5_En@dread.disaster.area/ Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20250626115743.1641443-1-yukuai3@huawei.com Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5990b776fb79a444f91431d35d24b0bdc622984b Merge: 969127bf0783a4 f46d273449ba65 Author: Jens Axboe Date: Thu Jun 26 07:31:52 2025 -0600 Merge tag 'nvme-6.16-2025-06-26' of git://git.infradead.org/nvme into block-6.16 Pull NVMe fixes from Christoph: " - reset delayed remove_work after reconnect (Keith Busch) - fix atomic write size validation (Christoph Hellwig)" * tag 'nvme-6.16-2025-06-26' of git://git.infradead.org/nvme: nvme: fix atomic write size validation nvme: refactor the atomic write unit detection nvme: reset delayed remove_work after reconnect commit 969127bf0783a4ac0c8a27e633a9e8ea1738583f Author: Ronnie Sahlberg Date: Thu Jun 26 12:20:45 2025 +1000 ublk: sanity check add_dev input for underflow Add additional checks that queue depth and number of queues are non-zero. Signed-off-by: Ronnie Sahlberg Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250626022046.235018-1-ronniesahlberg@gmail.com Signed-off-by: Jens Axboe commit af2b588abe006bd55ddd358c4c3b87523349c475 Author: Michal Wajdeczko Date: Fri Jun 13 00:09:36 2025 +0200 drm/xe: Process deferred GGTT node removals on device unwind While we are indirectly draining our dedicated workqueue ggtt->wq that we use to complete asynchronous removal of some GGTT nodes, this happends as part of the managed-drm unwinding (ggtt_fini_early), which could be later then manage-device unwinding, where we could already unmap our MMIO/GMS mapping (mmio_fini). This was recently observed during unsuccessful VF initialization: [ ] xe 0000:00:02.1: probe with driver xe failed with error -62 [ ] xe 0000:00:02.1: DEVRES REL ffff88811e747340 __xe_bo_unpin_map_no_vm (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e747540 __xe_bo_unpin_map_no_vm (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e747240 __xe_bo_unpin_map_no_vm (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e747040 tiles_fini (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e746840 mmio_fini (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e747f40 xe_bo_pinned_fini (16 bytes) [ ] xe 0000:00:02.1: DEVRES REL ffff88811e746b40 devm_drm_dev_init_release (16 bytes) [ ] xe 0000:00:02.1: [drm:drm_managed_release] drmres release begin [ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef81640 __fini_relay (8 bytes) [ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80d40 guc_ct_fini (8 bytes) [ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80040 __drmm_mutex_release (8 bytes) [ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80140 ggtt_fini_early (8 bytes) and this was leading to: [ ] BUG: unable to handle page fault for address: ffffc900058162a0 [ ] #PF: supervisor write access in kernel mode [ ] #PF: error_code(0x0002) - not-present page [ ] Oops: Oops: 0002 [#1] SMP NOPTI [ ] Tainted: [W]=WARN [ ] Workqueue: xe-ggtt-wq ggtt_node_remove_work_func [xe] [ ] RIP: 0010:xe_ggtt_set_pte+0x6d/0x350 [xe] [ ] Call Trace: [ ] [ ] xe_ggtt_clear+0xb0/0x270 [xe] [ ] ggtt_node_remove+0xbb/0x120 [xe] [ ] ggtt_node_remove_work_func+0x30/0x50 [xe] [ ] process_one_work+0x22b/0x6f0 [ ] worker_thread+0x1e8/0x3d Add managed-device action that will explicitly drain the workqueue with all pending node removals prior to releasing MMIO/GSM mapping. Fixes: 919bb54e989c ("drm/xe: Fix missing runtime outer protection for ggtt_remove_node") Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250612220937.857-2-michal.wajdeczko@intel.com (cherry picked from commit 89d2835c3680ab1938e22ad81b1c9f8c686bd391) Signed-off-by: Thomas Hellström commit ad40098da5c3b43114d860a5b5740e7204158534 Author: Michal Wajdeczko Date: Fri Jun 13 00:09:37 2025 +0200 drm/xe/guc: Explicitly exit CT safe mode on unwind During driver probe we might be briefly using CT safe mode, which is based on a delayed work, but usually we are able to stop this once we have IRQ fully operational. However, if we abort the probe quite early then during unwind we might try to destroy the workqueue while there is still a pending delayed work that attempts to restart itself which triggers a WARN. This was recently observed during unsuccessful VF initialization: [ ] xe 0000:00:02.1: probe with driver xe failed with error -62 [ ] ------------[ cut here ]------------ [ ] workqueue: cannot queue safe_mode_worker_func [xe] on wq xe-g2h-wq [ ] WARNING: CPU: 9 PID: 0 at kernel/workqueue.c:2257 __queue_work+0x287/0x710 [ ] RIP: 0010:__queue_work+0x287/0x710 [ ] Call Trace: [ ] delayed_work_timer_fn+0x19/0x30 [ ] call_timer_fn+0xa1/0x2a0 Exit the CT safe mode on unwind to avoid that warning. Fixes: 09b286950f29 ("drm/xe/guc: Allow CTB G2H processing without G2H IRQ") Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250612220937.857-3-michal.wajdeczko@intel.com (cherry picked from commit 2ddbb73ec20b98e70a5200cb85deade22ccea2ec) Signed-off-by: Thomas Hellström commit f16873f42a06b620669d48a4b5c3f888cb3653a1 Author: Matthew Auld Date: Fri Jun 6 11:45:48 2025 +0100 drm/xe: move DPT l2 flush to a more sensible place Only need the flush for DPT host updates here. Normal GGTT updates don't need special flush. Fixes: 01570b446939 ("drm/xe/bmg: implement Wa_16023588340") Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: stable@vger.kernel.org # v6.12+ Reviewed-by: Ville Syrjälä Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250606104546.1996818-4-matthew.auld@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 35db1da40c8cfd7511dc42f342a133601eb45449) Signed-off-by: Thomas Hellström commit a4b1b51ae132ac199412028a2df7b6c267888190 Author: Maarten Lankhorst Date: Fri Jun 6 11:45:47 2025 +0100 drm/xe: Move DSB l2 flush to a more sensible place Flushing l2 is only needed after all data has been written. Fixes: 01570b446939 ("drm/xe/bmg: implement Wa_16023588340") Signed-off-by: Maarten Lankhorst Cc: Matthew Auld Cc: stable@vger.kernel.org # v6.12+ Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Reviewed-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250606104546.1996818-3-matthew.auld@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 0dd2dd0182bc444a62652e89d08c7f0e4fde15ba) Signed-off-by: Thomas Hellström commit 080e8d2ecdfde588897aa8a87a8884061f4dbbbb Author: Bibo Mao Date: Thu Jun 26 20:07:27 2025 +0800 LoongArch: KVM: Avoid overflow with array index The variable index is modified and reused as array index when modify register EIOINTC_ENABLE. There will be array index overflow problem. Cc: stable@vger.kernel.org Fixes: 3956a52bc05b ("LoongArch: KVM: Add EIOINTC read and write functions") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit a0137c9048252ea965a0436895c77d1c917dfe2a Author: Kees Cook Date: Thu Jun 26 20:07:18 2025 +0800 LoongArch: Handle KCOV __init vs inline mismatches When the KCOV is enabled all functions get instrumented, unless the __no_sanitize_coverage attribute is used. To prepare for __no_sanitize_coverage being applied to __init functions, we have to handle differences in how GCC's inline optimizations get resolved. For LoongArch this exposed several places where __init annotations were missing but ended up being "accidentally correct". So fix these cases. Signed-off-by: Kees Cook Signed-off-by: Huacai Chen commit 39503fc84b4ea94f2bedca481de5e225e0df729d Author: Ming Wang Date: Thu Jun 26 20:07:18 2025 +0800 LoongArch: Reserve the EFI memory map region The EFI memory map at 'boot_memmap' is crucial for kdump to understand the primary kernel's memory layout. This memory region, typically part of EFI Boot Services (BS) data, can be overwritten after ExitBootServices if not explicitly preserved by the kernel. This commit addresses this by: 1. Calling memblock_reserve() to reserve the entire physical region occupied by the EFI memory map (header + descriptors). This prevents the primary kernel from reallocating and corrupting this area. 2. Setting the EFI_PRESERVE_BS_REGIONS flag in efi.flags. This indicates that efforts have been made to preserve critical BS code/data regions which can be useful for other kernel subsystems or debugging. These changes ensure the original EFI memory map data remains intact, improving kdump reliability and potentially aiding other EFI-related functionalities that might rely on preserved BS code/data. Signed-off-by: Ming Wang Signed-off-by: Huacai Chen commit 7d69294b8a8d0e19600797711ed3bc047fead1c1 Author: Huacai Chen Date: Thu Jun 26 20:07:18 2025 +0800 LoongArch: Fix build warnings about export.h After commit a934a57a42f64a4 ("scripts/misc-check: check missing #include when W=1") and 7d95680d64ac8e836c ("scripts/misc-check: check unnecessary #include when W=1"), we get some build warnings with W=1: arch/loongarch/kernel/acpi.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/alternative.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/kfpu.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/traps.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/unwind_guess.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/unwind_orc.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/unwind_prologue.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/lib/crc32-loongarch.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/lib/csum.c: warning: EXPORT_SYMBOL() is used, but #include is missing arch/loongarch/kernel/elf.c: warning: EXPORT_SYMBOL() is not used, but #include is present arch/loongarch/kernel/paravirt.c: warning: EXPORT_SYMBOL() is not used, but #include is present arch/loongarch/pci/pci.c: warning: EXPORT_SYMBOL() is not used, but #include is present So fix these build warnings for LoongArch. Reviewed-by: Masahiro Yamada Signed-off-by: Huacai Chen commit f0ef0b02af381418973a952867052b12194f9c16 Author: Thomas Huth Date: Thu Jun 26 20:07:10 2025 +0800 LoongArch: Replace __ASSEMBLY__ with __ASSEMBLER__ in headers While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembler code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This is bad since macros starting with two underscores are names that are reserved by the C language. It can also be very confusing for the developers when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's now standardize on the __ASSEMBLER__ macro that is provided by the compilers. This is almost a completely mechanical patch (done with a simple "sed -i" statement), with one comment tweaked manually in the arch/loongarch/include/asm/cpu.h file (it was missing the trailing underscores). Signed-off-by: Thomas Huth Signed-off-by: Huacai Chen commit f46d273449ba65afd53f3dd8fe0182c9df877e08 Author: Christoph Hellwig Date: Wed Jun 11 06:54:56 2025 +0200 nvme: fix atomic write size validation Don't mix the namespace and controller values, and validate the per-controller limit when probing the controller. This avoid spurious failures for controllers with namespaces that have different namespaces with different logical block sizes, or report the per-namespace values only for some namespaces. It also fixes a missing queue_limits_cancel_update in an error path by removing that error path. Fixes: 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size") Reported-by: Yi Zhang Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Reviewed-by: John Garry Tested-by: Yi Zhang commit b2e607fecac15e07f50269c080e2e71b5049dfa2 Author: Christoph Hellwig Date: Wed Jun 11 07:09:21 2025 +0200 nvme: refactor the atomic write unit detection Move all the code out of nvme_update_disk_info into the helper, and rename the helper to have a somewhat less clumsy name. Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Reviewed-by: John Garry commit dd2c18548964ae7ad48d208a765d909cd35448a1 Author: Keith Busch Date: Wed Jun 11 06:50:47 2025 +0200 nvme: reset delayed remove_work after reconnect The remove_work will proceed with permanently disconnecting on the initial final path failure if the head shows no paths after the delay. If a new path connects while the remove_work is pending, and if that new path happens to disconnect before that remove_work executes, the delayed removal should reset based on the most recent path disconnect time, but queue_delayed_work() won't do anything if the work is already pending. Attempt to cancel the delayed work when a new path connects, and use mod_delayed_work() in case the remove_work remains pending anyway. Signed-off-by: Keith Busch Reviewed-by: Nilay Shroff Signed-off-by: Christoph Hellwig commit 0e02219f9cf4f0c0aa3dbf3c820e6612bf3f0c8c Author: Quentin Perret Date: Thu Jun 26 10:10:14 2025 +0000 KVM: arm64: Don't free hyp pages with pKVM on GICv2 Marc reported that enabling protected mode on a device with GICv2 doesn't fail gracefully as one would expect, and leads to a host kernel crash. As it turns out, the first half of pKVM init happens before the vgic probe, and so by the time we find out we have a GICv2 we're already committed to keeping the pKVM vectors installed at EL2 -- pKVM rejects stub HVCs for obvious security reasons. However, the error path on KVM init leads to teardown_hyp_mode() which unconditionally frees hypervisor allocations (including the EL2 stacks and per-cpu pages) under the assumption that a previous cpu_hyp_uninit() execution has reset the vectors back to the stubs, which is false with pKVM. Interestingly, host stage-2 protection is not enabled yet at this point, so this use-after-free may go unnoticed for a while. The issue becomes more obvious after the finalize_pkvm() call. Fix this by keeping track of the CPUs on which pKVM is initialized in the kvm_hyp_initialized per-cpu variable, and use it from teardown_hyp_mode() to skip freeing pages that are in fact used. Fixes: a770ee80e662 ("KVM: arm64: pkvm: Disable GICv2 support") Reported-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250626101014.1519345-1-qperret@google.com Signed-off-by: Marc Zyngier commit 85720e04d9af0b77f8092b12a06661a8d459d4a0 Author: Jiawen Wu Date: Wed Jun 25 10:39:24 2025 +0800 net: libwx: fix the creation of page_pool 'rx_ring->size' means the count of ring descriptors multiplied by the size of one descriptor. When increasing the count of ring descriptors, it may exceed the limit of pool size. [ 864.209610] page_pool_create_percpu() gave up with errno -7 [ 864.209613] txgbe 0000:11:00.0: Page pool creation failed: -7 Fix to set the pool_size to the count of ring descriptors. Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources") Cc: stable@vger.kernel.org Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Reviewed-by: Mina Almasry Link: https://patch.msgid.link/434C72BFB40E350A+20250625023924.21821-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 8d89661a36dd3bb8c9902cff36dc0c144dce3faf Author: Jakub Kicinski Date: Tue Jun 24 11:32:58 2025 -0700 net: selftests: fix TCP packet checksum The length in the pseudo header should be the length of the L3 payload AKA the L4 header+payload. The selftest code builds the packet from the lower layers up, so all the headers are pushed already when it constructs L4. We need to subtract the lower layer headers from skb->len. Fixes: 3e1e58d64c3d ("net: add generic selftest support") Signed-off-by: Jakub Kicinski Reviewed-by: Gerhard Engleder Reported-by: Oleksij Rempel Tested-by: Oleksij Rempel Reviewed-by: Oleksij Rempel Link: https://patch.msgid.link/20250624183258.3377740-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 1476b218327b89bbb64c14619a2d34f0c320f2c3 Author: Leo Yan Date: Wed Jun 25 18:07:37 2025 +0100 perf/aux: Fix pending disable flow when the AUX ring buffer overruns If an AUX event overruns, the event core layer intends to disable the event by setting the 'pending_disable' flag. Unfortunately, the event is not actually disabled afterwards. In commit: ca6c21327c6a ("perf: Fix missing SIGTRAPs") the 'pending_disable' flag was changed to a boolean. However, the AUX event code was not updated accordingly. The flag ends up holding a CPU number. If this number is zero, the flag is taken as false and the IRQ work is never triggered. Later, with commit: 2b84def990d3 ("perf: Split __perf_pending_irq() out of perf_pending_irq()") a new IRQ work 'pending_disable_irq' was introduced to handle event disabling. The AUX event path was not updated to kick off the work queue. To fix this bug, when an AUX ring buffer overrun is detected, call perf_event_disable_inatomic() to initiate the pending disable flow. Also update the outdated comment for setting the flag, to reflect the boolean values (0 or 1). Fixes: 2b84def990d3 ("perf: Split __perf_pending_irq() out of perf_pending_irq()") Fixes: ca6c21327c6a ("perf: Fix missing SIGTRAPs") Signed-off-by: Leo Yan Signed-off-by: Ingo Molnar Reviewed-by: James Clark Reviewed-by: Yeoreum Yun Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Liang Kan Cc: Marco Elver Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20250625170737.2918295-1-leo.yan@arm.com commit 9a2b9416fd1d18d97ce1b737a11fcbc521140e5d Author: Mostafa Saleh Date: Wed Jun 25 12:30:58 2025 +0000 KVM: arm64: Fix error path in init_hyp_mode() In the unlikely case pKVM failed to allocate carveout, the error path tries to access NULL ptr when it de-reference the SVE state from the uninitialized nVHE per-cpu base. [ 1.575420] pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 1.576010] pc : teardown_hyp_mode+0xe4/0x180 [ 1.576920] lr : teardown_hyp_mode+0xd0/0x180 [ 1.577308] sp : ffff8000826fb9d0 [ 1.577600] x29: ffff8000826fb9d0 x28: 0000000000000000 x27: ffff80008209b000 [ 1.578383] x26: ffff800081dde000 x25: ffff8000820493c0 x24: ffff80008209eb00 [ 1.579180] x23: 0000000000000040 x22: 0000000000000001 x21: 0000000000000000 [ 1.579881] x20: 0000000000000002 x19: ffff800081d540b8 x18: 0000000000000000 [ 1.580544] x17: ffff800081205230 x16: 0000000000000152 x15: 00000000fffffff8 [ 1.581183] x14: 0000000000000008 x13: fff00000ff7f6880 x12: 000000000000003e [ 1.581813] x11: 0000000000000002 x10: 00000000000000ff x9 : 0000000000000000 [ 1.582503] x8 : 0000000000000000 x7 : 7f7f7f7f7f7f7f7f x6 : 43485e525851ff30 [ 1.583140] x5 : fff00000ff6e9030 x4 : fff00000ff6e8f80 x3 : 0000000000000000 [ 1.583780] x2 : 0000000000000000 x1 : 0000000000000002 x0 : 0000000000000000 [ 1.584526] Call trace: [ 1.584945] teardown_hyp_mode+0xe4/0x180 (P) [ 1.585578] init_hyp_mode+0x920/0x994 [ 1.586005] kvm_arm_init+0xb4/0x25c [ 1.586387] do_one_initcall+0xe0/0x258 [ 1.586819] do_initcall_level+0xa0/0xd4 [ 1.587224] do_initcalls+0x54/0x94 [ 1.587606] do_basic_setup+0x1c/0x28 [ 1.587998] kernel_init_freeable+0xc8/0x130 [ 1.588409] kernel_init+0x20/0x1a4 [ 1.588768] ret_from_fork+0x10/0x20 [ 1.589568] Code: f875db48 8b1c0109 f100011f 9a8903e8 (f9463100) [ 1.590332] ---[ end trace 0000000000000000 ]--- As Quentin pointed, the order of free is also wrong, we need to free SVE state first before freeing the per CPU ptrs. I initially observed this on 6.12, but I could also repro in master. Signed-off-by: Mostafa Saleh Fixes: 66d5b53e20a6 ("KVM: arm64: Allocate memory mapped at hyp for host sve state in pKVM") Reviewed-by: Quentin Perret Link: https://lore.kernel.org/r/20250625123058.875179-1-smostafa@google.com Signed-off-by: Marc Zyngier commit e728e705802fec20f65d974a5d5eb91217ac618d Author: Quentin Perret Date: Wed Jun 25 10:55:48 2025 +0000 KVM: arm64: Adjust range correctly during host stage-2 faults host_stage2_adjust_range() tries to find the largest block mapping that fits within a memory or mmio region (represented by a kvm_mem_range in this function) during host stage-2 faults under pKVM. To do so, it walks the host stage-2 page-table, finds the faulting PTE and its level, and then progressively increments the level until it finds a granule of the appropriate size. However, the condition in the loop implementing the above is broken as it checks kvm_level_supports_block_mapping() for the next level instead of the current, so pKVM may attempt to map a region larger than can be covered with a single block. This is not a security problem and is quite rare in practice (the kvm_mem_range check usually forces host_stage2_adjust_range() to choose a smaller granule), but this is clearly not the expected behaviour. Refactor the loop to fix the bug and improve readability. Fixes: c4f0935e4d95 ("KVM: arm64: Optimize host memory aborts") Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250625105548.984572-1-qperret@google.com Signed-off-by: Marc Zyngier commit af040a9a296044fd4b748786c2516f172a7617f1 Author: Wei-Lin Chang Date: Wed Jun 25 16:47:09 2025 +0800 KVM: arm64: nv: Fix MI line level calculation in vgic_v3_nested_update_mi() The state of the vcpu's MI line should be asserted when its ICH_HCR_EL2.En is set and ICH_MISR_EL2 is non-zero. Using bitwise AND (&=) directly for this calculation will not give us the correct result when the LSB of the vcpu's ICH_MISR_EL2 isn't set. Correct this by directly computing the line level with a logical AND operation. Signed-off-by: Wei-Lin Chang Link: https://lore.kernel.org/r/20250625084709.3968844-1-r09922117@csie.ntu.edu.tw [maz: drop the level check from the original code] Signed-off-by: Marc Zyngier commit 7ab6847a03229e73bb7c58ca397630f699e79b53 Author: Salvatore Bonaccorso Date: Wed Jun 25 20:41:28 2025 +0200 ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X507UAR The built-in mic of ASUS VivoBook X507UAR is broken recently by the fix of the pin sort. The fixup ALC256_FIXUP_ASUS_MIC_NO_PRESENCE is working for addressing the regression, too. Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort") Reported-by: Igor Tamara Closes: https://bugs.debian.org/1108069 Signed-off-by: Salvatore Bonaccorso Link: https://lore.kernel.org/CADdHDco7_o=4h_epjEAb92Dj-vUz_PoTC2-W9g5ncT2E0NzfeQ@mail.gmail.com Signed-off-by: Takashi Iwai commit 346bd8a977fc559ef41099f727cdb0805f66bd10 Merge: 5e9571750c4e53 6c038b58a2dc5a Author: Takashi Iwai Date: Thu Jun 26 07:59:33 2025 +0200 Merge tag 'asoc-fix-v6.16-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 A small collection of fixes, the main one being a fix for resume from hibernation on AMD systems, plus a few new quirk entries for AMD systems. commit ccafe2821cfaa880cf4461307111b76df07c48fb Author: Herbert Xu Date: Wed Jun 25 11:42:27 2025 +0800 crypto: qat - Use crypto_shash_export_core Use crypto_shash_export_core to export the core hash state without the partial blocks. Signed-off-by: Herbert Xu commit d9408b8eea6dfb2c6cf1aef06b8344eac8052664 Author: Herbert Xu Date: Wed Jun 25 11:37:35 2025 +0800 crypto: chelsio - Use crypto_shash_export_core Use crypto_shash_export_core to export the core hash state without the partial blocks. Signed-off-by: Herbert Xu commit ee88bddf7f2f5d1f1da87dd7bedc734048b70e88 Merge: c5c2a8b497d69f 5e9388f7984a9c Author: Linus Torvalds Date: Wed Jun 25 21:09:02 2025 -0700 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull bpf fixes from Alexei Starovoitov: - Fix use-after-free in libbpf when map is resized (Adin Scannell) - Fix verifier assumptions about 2nd argument of bpf_sysctl_get_name (Jerome Marchand) - Fix verifier assumption of nullness of d_inode in dentry (Song Liu) - Fix global starvation of LRU map (Willem de Bruijn) - Fix potential NULL dereference in btf_dump__free (Yuan Chen) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: adapt one more case in test_lru_map to the new target_free libbpf: Fix possible use-after-free for externs selftests/bpf: Convert test_sysctl to prog_tests bpf: Specify access type of bpf_sysctl_get_name args libbpf: Fix null pointer dereference in btf_dump__free on allocation failure bpf: Adjust free target to avoid global starvation of LRU map bpf: Mark dentry->d_inode as trusted_or_null commit ef6fac0f9e5d0695cee1d820c727fe753eca52d5 Author: Kent Overstreet Date: Wed Jun 25 14:55:59 2025 -0400 bcachefs: Plumb correct ip to trans_relock_fail tracepoint Signed-off-by: Kent Overstreet commit 64b6a788bd96a0cdc11073a2d1f85413b078c1f2 Author: Kent Overstreet Date: Wed Jun 25 00:48:14 2025 -0400 bcachefs: Ensure we rewind to run recovery passes Fix a 6.16 regression from the recovery pass rework, which introduced a bug where calling bch2_run_explicit_recovery_pass() would only return the error code to rewind recovery for the first call that scheduled that recovery pass. If the error code from the first call was swallowed (because it was called by an asynchronous codepath), subsequent calls would go "ok, this pass is already marked as needing to run" and return 0. Fixing this ensures that check_topology bails out to run btree_node_scan before doing any repair. Signed-off-by: Kent Overstreet commit 3e72acb78b73ccffeaf929c039dc5a0a7a147535 Author: Kent Overstreet Date: Wed Jun 25 12:45:11 2025 -0400 bcachefs: Ensure btree node scan runs before checking for scanned nodes Previously, calling bch2_btree_has_scanned_nodes() when btree node scan hadn't actually run would erroniously return false - causing us to think a btree was entirely gone. This fixes a 6.16 regression from moving the scheduling of btree node scan out of bch2_btree_lost_data() (fixing the bug where we'd schedule it persistently in the superblock) and only scheduling it when check_toploogy() is asking for scanned btree nodes. Signed-off-by: Kent Overstreet commit 1dcea07810c8bb4aba1bfed0bbe015b2d708a903 Author: Kent Overstreet Date: Wed Jun 25 12:17:51 2025 -0400 bcachefs: btree_root_unreadable_and_scan_found_nothing should not be autofix Autofix is specified in btree_gc.c if it's not an important btree. Signed-off-by: Kent Overstreet commit c5c2a8b497d69fb01d2563e383615a4eb69c72bc Merge: c4dce0c094a89b 0748e553df0225 Author: Linus Torvalds Date: Wed Jun 25 20:48:48 2025 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount fixes from Al Viro: "Several mount-related fixes" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: userns and mnt_idmap leak in open_tree_attr(2) attach_recursive_mnt(): do not lock the covering tree when sliding something under it replace collect_mounts()/drop_collected_mounts() with a safer variant commit a433791aeaea6e84df709e0b9584b9bbe040cd1c Author: Kuniyuki Iwashima Date: Tue Jun 24 14:45:00 2025 -0700 atm: Release atm_dev_mutex after removing procfs in atm_dev_deregister(). syzbot reported a warning below during atm_dev_register(). [0] Before creating a new device and procfs/sysfs for it, atm_dev_register() looks up a duplicated device by __atm_dev_lookup(). These operations are done under atm_dev_mutex. However, when removing a device in atm_dev_deregister(), it releases the mutex just after removing the device from the list that __atm_dev_lookup() iterates over. So, there will be a small race window where the device does not exist on the device list but procfs/sysfs are still not removed, triggering the splat. Let's hold the mutex until procfs/sysfs are removed in atm_dev_deregister(). [0]: proc_dir_entry 'atm/atmtcp:0' already registered WARNING: CPU: 0 PID: 5919 at fs/proc/generic.c:377 proc_register+0x455/0x5f0 fs/proc/generic.c:377 Modules linked in: CPU: 0 UID: 0 PID: 5919 Comm: syz-executor284 Not tainted 6.16.0-rc2-syzkaller-00047-g52da431bf03b #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:proc_register+0x455/0x5f0 fs/proc/generic.c:377 Code: 48 89 f9 48 c1 e9 03 80 3c 01 00 0f 85 a2 01 00 00 48 8b 44 24 10 48 c7 c7 20 c0 c2 8b 48 8b b0 d8 00 00 00 e8 0c 02 1c ff 90 <0f> 0b 90 90 48 c7 c7 80 f2 82 8e e8 0b de 23 09 48 8b 4c 24 28 48 RSP: 0018:ffffc9000466fa30 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817ae248 RDX: ffff888026280000 RSI: ffffffff817ae255 RDI: 0000000000000001 RBP: ffff8880232bed48 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff888076ed2140 R13: dffffc0000000000 R14: ffff888078a61340 R15: ffffed100edda444 FS: 00007f38b3b0c6c0(0000) GS:ffff888124753000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f38b3bdf953 CR3: 0000000076d58000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: proc_create_data+0xbe/0x110 fs/proc/generic.c:585 atm_proc_dev_register+0x112/0x1e0 net/atm/proc.c:361 atm_dev_register+0x46d/0x890 net/atm/resources.c:113 atmtcp_create+0x77/0x210 drivers/atm/atmtcp.c:369 atmtcp_attach drivers/atm/atmtcp.c:403 [inline] atmtcp_ioctl+0x2f9/0xd60 drivers/atm/atmtcp.c:464 do_vcc_ioctl+0x12c/0x930 net/atm/ioctl.c:159 sock_do_ioctl+0x115/0x280 net/socket.c:1190 sock_ioctl+0x227/0x6b0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f38b3b74459 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f38b3b0c198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f38b3bfe318 RCX: 00007f38b3b74459 RDX: 0000000000000000 RSI: 0000000000006180 RDI: 0000000000000005 RBP: 00007f38b3bfe310 R08: 65732f636f72702f R09: 65732f636f72702f R10: 65732f636f72702f R11: 0000000000000246 R12: 00007f38b3bcb0ac R13: 00007f38b3b0c1a0 R14: 0000200000000200 R15: 00007f38b3bcb03b Fixes: 64bf69ddff76 ("[ATM]: deregistration removes device from atm_devs list immediately") Reported-by: syzbot+8bd335d2ad3b93e80715@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/685316de.050a0220.216029.0087.GAE@google.com/ Tested-by: syzbot+8bd335d2ad3b93e80715@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250624214505.570679-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit c0cb210a87fcdda3c25f43b5a64420e6b07d3f53 Author: Lorenzo Stoakes Date: Wed Jun 25 10:52:31 2025 +0100 MAINTAINERS: add Lorenzo as THP co-maintainer I am doing a great deal of review and getting ever more involved in THP with intent to do more so in future also, so add myself as co-maintainer to help David with workload. Link: https://lkml.kernel.org/r/20250625095231.42874-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand Acked-by: Baolin Wang Acked-by: Dev Jain Acked-by: Zi Yan Acked-by: Oscar Salvador Cc: Barry Song Cc: Liam Howlett Cc: Mariano Pache Cc: Ryan Roberts Signed-off-by: Andrew Morton commit 02d67850aecaf2306d849a3c804a125bb4f9c5f6 Author: Duje Mihanović Date: Fri Jun 20 11:25:35 2025 +0200 mailmap: update Duje Mihanović's email address I'm switching to a new mail address, so map my old one to it. Link: https://lkml.kernel.org/r/20250620-mailmap-v1-1-a6b4b72dbd07@dujemihanovic.xyz Signed-off-by: Duje Mihanović Cc: Karel Balej Signed-off-by: Andrew Morton commit 7c942f87cc0be5699b1ce434d369eccd8b5321d4 Author: Dev Jain Date: Fri Jun 20 16:41:50 2025 +0530 selftests/mm: fix validate_addr() helper validate_addr() checks whether the address returned by mmap() lies in the low or high VA space, according to whether a high addr hint was passed or not. The fix commit mentioned below changed the code in such a way that this function will always return failure when passed high_addr == 1; addr will be >= HIGH_ADDR_MARK always, we will fall down to "if (addr > HIGH_ADDR_MARK)" and return failure. Fix this. Link: https://lkml.kernel.org/r/20250620111150.50344-1-dev.jain@arm.com Fixes: d1d86ce28d0f ("selftests/mm: virtual_address_range: conform to TAP format output") Signed-off-by: Dev Jain Reviewed-by: Donet Tom Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Lorenzo Stoakes Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton commit b6f5e748587063d4ad3294d07ca29886851d9cd7 Author: Arnd Bergmann Date: Fri Jun 20 13:21:22 2025 +0200 crashdump: add CONFIG_KEYS dependency The dm_crypt code fails to build without CONFIG_KEYS: kernel/crash_dump_dm_crypt.c: In function 'restore_dm_crypt_keys_to_thread_keyring': kernel/crash_dump_dm_crypt.c:105:9: error: unknown type name 'key_ref_t'; did you mean 'key_ref_put'? There is a mix of 'select KEYS' and 'depends on KEYS' in Kconfig, so there is no single obvious solution here, but generally using 'depends on' makes more sense and is less likely to cause dependency loops. Link: https://lkml.kernel.org/r/20250620112140.3396316-1-arnd@kernel.org Fixes: 62f17d9df692 ("crash_dump: retrieve dm crypt keys in kdump kernel") Signed-off-by: Arnd Bergmann Cc: Alexander Graf Cc: Baoquan He Cc: Coiby Xu Cc: Dave Vasilevsky Cc: Eric Biggers Cc: Michael Ellerman Signed-off-by: Andrew Morton commit c9e8efa0b384c43670852f955567b31a5eb4ac2b Author: Zijun Hu Date: Fri Jun 20 19:53:54 2025 +0800 mailmap: correct name for a historical account of Zijun Hu Correct the name for from 'zijun_hu' to 'Zijun Hu'. Link: https://lkml.kernel.org/r/20250620-my_mailmap-v1-2-11ea3db8ba1e@oss.qualcomm.com Signed-off-by: Zijun Hu Cc: Hans verkuil Signed-off-by: Andrew Morton commit b160a5cc6ac761f341e58e48ae3f03a04d310677 Author: Zijun Hu Date: Fri Jun 20 19:53:53 2025 +0800 mailmap: add entries for Zijun Hu Map my old qualcomm email addresses: Zijun Hu Zijun Hu To the current one: Zijun Hu Link: https://lkml.kernel.org/r/20250620-my_mailmap-v1-1-11ea3db8ba1e@oss.qualcomm.com Signed-off-by: Zijun Hu Cc: Hans verkuil Signed-off-by: Andrew Morton commit befd9a71d859ea625eaa84dae1b243efb3df3eca Author: Haiyue Wang Date: Sun Jun 22 01:13:51 2025 +0800 fuse: fix runtime warning on truncate_folio_batch_exceptionals() The WARN_ON_ONCE is introduced on truncate_folio_batch_exceptionals() to capture whether the filesystem has removed all DAX entries or not. And the fix has been applied on the filesystem xfs and ext4 by the commit 0e2f80afcfa6 ("fs/dax: ensure all pages are idle prior to filesystem unmount"). Apply the missed fix on filesystem fuse to fix the runtime warning: [ 2.011450] ------------[ cut here ]------------ [ 2.011873] WARNING: CPU: 0 PID: 145 at mm/truncate.c:89 truncate_folio_batch_exceptionals+0x272/0x2b0 [ 2.012468] Modules linked in: [ 2.012718] CPU: 0 UID: 1000 PID: 145 Comm: weston Not tainted 6.16.0-rc2-WSL2-STABLE #2 PREEMPT(undef) [ 2.013292] RIP: 0010:truncate_folio_batch_exceptionals+0x272/0x2b0 [ 2.013704] Code: 48 63 d0 41 29 c5 48 8d 1c d5 00 00 00 00 4e 8d 6c 2a 01 49 c1 e5 03 eb 09 48 83 c3 08 49 39 dd 74 83 41 f6 44 1c 08 01 74 ef <0f> 0b 49 8b 34 1e 48 89 ef e8 10 a2 17 00 eb df 48 8b 7d 00 e8 35 [ 2.014845] RSP: 0018:ffffa47ec33f3b10 EFLAGS: 00010202 [ 2.015279] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 2.015884] RDX: 0000000000000000 RSI: ffffa47ec33f3ca0 RDI: ffff98aa44f3fa80 [ 2.016377] RBP: ffff98aa44f3fbf0 R08: ffffa47ec33f3ba8 R09: 0000000000000000 [ 2.016942] R10: 0000000000000001 R11: 0000000000000000 R12: ffffa47ec33f3ca0 [ 2.017437] R13: 0000000000000008 R14: ffffa47ec33f3ba8 R15: 0000000000000000 [ 2.017972] FS: 000079ce006afa40(0000) GS:ffff98aade441000(0000) knlGS:0000000000000000 [ 2.018510] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.018987] CR2: 000079ce03e74000 CR3: 000000010784f006 CR4: 0000000000372eb0 [ 2.019518] Call Trace: [ 2.019729] [ 2.019901] truncate_inode_pages_range+0xd8/0x400 [ 2.020280] ? timerqueue_add+0x66/0xb0 [ 2.020574] ? get_nohz_timer_target+0x2a/0x140 [ 2.020904] ? timerqueue_add+0x66/0xb0 [ 2.021231] ? timerqueue_del+0x2e/0x50 [ 2.021646] ? __remove_hrtimer+0x39/0x90 [ 2.022017] ? srso_alias_untrain_ret+0x1/0x10 [ 2.022497] ? psi_group_change+0x136/0x350 [ 2.023046] ? _raw_spin_unlock+0xe/0x30 [ 2.023514] ? finish_task_switch.isra.0+0x8d/0x280 [ 2.024068] ? __schedule+0x532/0xbd0 [ 2.024551] fuse_evict_inode+0x29/0x190 [ 2.025131] evict+0x100/0x270 [ 2.025641] ? _atomic_dec_and_lock+0x39/0x50 [ 2.026316] ? __pfx_generic_delete_inode+0x10/0x10 [ 2.026843] __dentry_kill+0x71/0x180 [ 2.027335] dput+0xeb/0x1b0 [ 2.027725] __fput+0x136/0x2b0 [ 2.028054] __x64_sys_close+0x3d/0x80 [ 2.028469] do_syscall_64+0x6d/0x1b0 [ 2.028832] ? clear_bhb_loop+0x30/0x80 [ 2.029182] ? clear_bhb_loop+0x30/0x80 [ 2.029533] ? clear_bhb_loop+0x30/0x80 [ 2.029902] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 2.030423] RIP: 0033:0x79ce03d0d067 [ 2.030820] Code: b8 ff ff ff ff e9 3e ff ff ff 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 c3 a7 f8 ff [ 2.032354] RSP: 002b:00007ffef0498948 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 2.032939] RAX: ffffffffffffffda RBX: 00007ffef0498960 RCX: 000079ce03d0d067 [ 2.033612] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 000000000000000d [ 2.034289] RBP: 00007ffef0498a30 R08: 000000000000000d R09: 0000000000000000 [ 2.034944] R10: 00007ffef0498978 R11: 0000000000000246 R12: 0000000000000001 [ 2.035610] R13: 00007ffef0498960 R14: 000079ce03e09ce0 R15: 0000000000000003 [ 2.036301] [ 2.036532] ---[ end trace 0000000000000000 ]--- Link: https://lkml.kernel.org/r/20250621171507.3770-1-haiyuewa@163.com Fixes: bde708f1a65d ("fs/dax: always remove DAX page-cache entries when breaking layouts") Signed-off-by: Haiyue Wang Cc: Alistair Popple Cc: Dan Williams Cc: Miklos Szeredi Cc: Signed-off-by: Andrew Morton commit 79300ac805b672a84b64d80d4cbc374d83411599 Author: Florian Fainelli Date: Thu Jun 19 15:51:05 2025 -0700 scripts/gdb: fix dentry_name() lookup The "d_iname" member was replaced with "d_shortname.string" in the commit referenced in the Fixes tag. This prevented the GDB script "lx-mount" command to properly function: (gdb) lx-mounts mount super_block devname pathname fstype options 0xff11000002d21180 0xff11000002d24800 rootfs / rootfs rw 0 0 0xff11000002e18a80 0xff11000003713000 /dev/root / ext4 rw,relatime 0 0 Python Exception : There is no member named d_iname. Error occurred in Python: There is no member named d_iname. Link: https://lkml.kernel.org/r/20250619225105.320729-1-florian.fainelli@broadcom.com Fixes: 58cf9c383c5c ("dcache: back inline names with a struct-wrapped array of unsigned long") Signed-off-by: Florian Fainelli Cc: Al Viro Cc: Jan Kara Cc: Jan Kiszka Cc: Jeff Layton Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton commit 4f489fe6afb395dbc79840efa3c05440b760d883 Author: SeongJae Park Date: Thu Jun 19 11:36:07 2025 -0700 mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write memcg_path_store() assigns a newly allocated memory buffer to filter->memcg_path, without deallocating the previously allocated and assigned memory buffer. As a result, users can leak kernel memory by continuously writing a data to memcg_path DAMOS sysfs file. Fix the leak by deallocating the previously set memory buffer. Link: https://lkml.kernel.org/r/20250619183608.6647-2-sj@kernel.org Fixes: 7ee161f18b5d ("mm/damon/sysfs-schemes: implement filter directory") Signed-off-by: SeongJae Park Cc: Shuah Khan Cc: [6.3.x] Signed-off-by: Andrew Morton commit f5769359c5b241978e6933672bb78b3adc36aa18 Author: Hao Ge Date: Fri Jun 20 02:31:54 2025 +0800 mm/alloc_tag: fix the kmemleak false positive issue in the allocation of the percpu variable tag->counters When loading a module, as long as the module has memory allocation operations, kmemleak produces a false positive report that resembles the following: unreferenced object (percpu) 0x7dfd232a1650 (size 16): comm "modprobe", pid 1301, jiffies 4294940249 hex dump (first 16 bytes on cpu 2): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): kmemleak_alloc_percpu+0xb4/0xd0 pcpu_alloc_noprof+0x700/0x1098 load_module+0xd4/0x348 codetag_module_init+0x20c/0x450 codetag_load_module+0x70/0xb8 load_module+0xef8/0x1608 init_module_from_file+0xec/0x158 idempotent_init_module+0x354/0x608 __arm64_sys_finit_module+0xbc/0x150 invoke_syscall+0xd4/0x258 el0_svc_common.constprop.0+0xb4/0x240 do_el0_svc+0x48/0x68 el0_svc+0x40/0xf8 el0t_64_sync_handler+0x10c/0x138 el0t_64_sync+0x1ac/0x1b0 This is because the module can only indirectly reference alloc_tag_counters through the alloc_tag section, which misleads kmemleak. However, we don't have a kmemleak ignore interface for percpu allocations yet. So let's create one and invoke it for tag->counters. [gehao@kylinos.cn: fix build error when CONFIG_DEBUG_KMEMLEAK=n, s/igonore/ignore/] Link: https://lkml.kernel.org/r/20250620093102.2416767-1-hao.ge@linux.dev Link: https://lkml.kernel.org/r/20250619183154.2122608-1-hao.ge@linux.dev Fixes: 12ca42c23775 ("alloc_tag: allocate percpu counters for module tags dynamically") Signed-off-by: Hao Ge Reviewed-by: Catalin Marinas Acked-by: Suren Baghdasaryan [lib/alloc_tag.c] Cc: Kent Overstreet Signed-off-by: Andrew Morton commit df831e97739405ecbaddb85516bc7d4d1c933d6b Author: Yu Kuai Date: Thu Jun 19 21:26:55 2025 +0800 lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly() While testing null_blk with configfs, echo 0 > poll_queues will trigger following panic: BUG: kernel NULL pointer dereference, address: 0000000000000010 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 27 UID: 0 PID: 920 Comm: bash Not tainted 6.15.0-02023-gadbdb95c8696-dirty #1238 PREEMPT(undef) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 RIP: 0010:__bitmap_or+0x48/0x70 Call Trace: __group_cpus_evenly+0x822/0x8c0 group_cpus_evenly+0x2d9/0x490 blk_mq_map_queues+0x1e/0x110 null_map_queues+0xc9/0x170 [null_blk] blk_mq_update_queue_map+0xdb/0x160 blk_mq_update_nr_hw_queues+0x22b/0x560 nullb_update_nr_hw_queues+0x71/0xf0 [null_blk] nullb_device_poll_queues_store+0xa4/0x130 [null_blk] configfs_write_iter+0x109/0x1d0 vfs_write+0x26e/0x6f0 ksys_write+0x79/0x180 __x64_sys_write+0x1d/0x30 x64_sys_call+0x45c4/0x45f0 do_syscall_64+0xa5/0x240 entry_SYSCALL_64_after_hwframe+0x76/0x7e Root cause is that numgrps is set to 0, and ZERO_SIZE_PTR is returned from kcalloc(), and later ZERO_SIZE_PTR will be deferenced. Fix the problem by checking numgrps first in group_cpus_evenly(), and return NULL directly if numgrps is zero. [yukuai3@huawei.com: also fix the non-SMP version] Link: https://lkml.kernel.org/r/20250620010958.1265984-1-yukuai1@huaweicloud.com Link: https://lkml.kernel.org/r/20250619132655.3318883-1-yukuai1@huaweicloud.com Fixes: 6a6dcae8f486 ("blk-mq: Build default queue map via group_cpus_evenly()") Signed-off-by: Yu Kuai Reviewed-by: Ming Lei Reviewed-by: Jens Axboe Cc: ErKun Yang Cc: John Garry Cc: Thomas Gleinxer Cc: "zhangyi (F)" Cc: Signed-off-by: Andrew Morton commit 344ef45b03336e7f74658814f66483b5417c9cf1 Author: Ge Yang Date: Tue May 27 11:36:50 2025 +0800 mm/hugetlb: remove unnecessary holding of hugetlb_lock In isolate_or_dissolve_huge_folio(), after acquiring the hugetlb_lock, it is only for the purpose of obtaining the correct hstate, which is then passed to alloc_and_dissolve_hugetlb_folio(). alloc_and_dissolve_hugetlb_folio() itself also acquires the hugetlb_lock. We can have alloc_and_dissolve_hugetlb_folio() obtain the hstate by itself, so that isolate_or_dissolve_huge_folio() no longer needs to acquire the hugetlb_lock. In addition, we keep the folio_test_hugetlb() check within isolate_or_dissolve_huge_folio(). By doing so, we can avoid disrupting the normal path by vainly holding the hugetlb_lock. replace_free_hugepage_folios() has the same issue, and we should address it as well. Addresses a possible performance problem which was added by the hotfix 113ed54ad276 ("mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios"). Link: https://lkml.kernel.org/r/1748317010-16272-1-git-send-email-yangge1116@126.com Fixes: 113ed54ad276 ("mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios") Signed-off-by: Ge Yang Suggested-by: Oscar Salvador Reviewed-by: Muchun Song Cc: Baolin Wang Cc: Barry Song <21cnbao@gmail.com> Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton commit 3746351e876b42f5221c2f85ba60965b38494ff2 Author: Lorenzo Stoakes Date: Wed Jun 18 11:59:53 2025 +0100 MAINTAINERS: add missing files to mm page alloc section There are a number of files within memory management which appear to be most suitably placed within the page allocation section of MAINTAINERS and are otherwise unassigned, so place these there. Link: https://lkml.kernel.org/r/20250618105953.67630-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Acked-by: Brendan Jackman Acked-by: Zi Yan Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Michal Hocko Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 71aa17fd981be2ef683bf83326128c505abe070c Author: Mike Rapoport (Microsoft) Date: Wed Jun 18 19:47:52 2025 +0300 MAINTAINERS: add tree entry to mm init block Link: https://lkml.kernel.org/r/aFLubPfiO5hqfhCe@kernel.org Signed-off-by: Mike Rapoport (Microsoft) Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 86bc5752a9173589271439911b33b4d952b0a91f Author: Michal Hocko Date: Tue Jun 17 10:58:19 2025 +0200 mm: add OOM killer maintainer structure Add MAINTAINERS info for the oom-killer. [akpm@linux-foundation.org: fix mhocko email address (SeongJae), add files (Lorenzo)] [akpm@linux-foundation.org: fix ordering] Link: https://lkml.kernel.org/r/20250617085819.355838-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: David Rientjes Acked-by: Shakeel Butt Acked-by: Lorenzo Stoakes Acked-by: SeongJae Park Acked-by: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton commit 4a5e85f4eb8fd18b1266342d100e4f0849544ca0 Author: David Hildenbrand Date: Tue Jun 17 16:35:32 2025 +0200 fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio is_zero_pfn() does not work for the huge zero folio. Fix it by using is_huge_zero_pmd(). This can cause the PAGEMAP_SCAN ioctl against /proc/pid/pagemap to present pages as PAGE_IS_PRESENT rather than as PAGE_IS_PFNZERO. Found by code inspection. Link: https://lkml.kernel.org/r/20250617143532.2375383-1-david@redhat.com Fixes: 52526ca7fdb9 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs") Signed-off-by: David Hildenbrand Cc: Muhammad Usama Anjum Cc: Signed-off-by: Andrew Morton commit 9186c43c1f000ce18069b429afcc725c2997d040 Merge: 7b515f35a911fd af852f1f1c951d Author: Jakub Kicinski Date: Wed Jun 25 15:36:30 2025 -0700 Merge branch 'netlink-specs-enforce-strict-naming-of-properties' Jakub Kicinski says: ==================== netlink: specs: enforce strict naming of properties I got annoyed once again by the name properties in the ethtool spec which use underscore instead of dash. I previously assumed that there is a lot of such properties in the specs so fixing them now would be near impossible. On a closer look, however, I only found 22 (rough grep suggests we have ~4.8k names in the specs, so bad ones are just 0.46%). Add a regex to the JSON schema to enforce the naming, fix the few bad names. I was hoping we could start enforcing this from newer families, but there's no correlation between the protocol and the number of errors. If anything classic netlink has more recently added specs so it has fewer errors. The regex is just for name properties which will end up visible to the user (in Python or YNL CLI). I left the c-name properties alone, those don't matter as much. C codegen rewrites them, anyway. I'm not updating the spec for genetlink-c. Looks like it has no users, new families use genetlink, all old ones need genetlink-legacy. If these patches are merged I will remove genetlink-c completely in net-next. ==================== Link: https://patch.msgid.link/20250624211002.3475021-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit af852f1f1c951d43b36881302fd10d9f898cdb54 Author: Jakub Kicinski Date: Tue Jun 24 14:10:02 2025 -0700 netlink: specs: enforce strict naming of properties Add a regexp to make sure all names which may end up being visible to the user consist of lower case characters, numbers and dashes. Underscores keep sneaking into the specs, which is not visible in the C code but makes the Python and alike inconsistent. Note that starting with a number is okay, as in C the full name will include the family name. For legacy families we can't enforce the naming in the family name or the multicast group names, as these are part of the binary uAPI of the kernel. For classic netlink we need to allow capital letters in names of struct members. TC has some structs with capitalized members. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-11-kuba@kernel.org Signed-off-by: Jakub Kicinski commit eef0eaeca7fa8e358a31e89802f564451b797718 Author: Jakub Kicinski Date: Tue Jun 24 14:10:01 2025 -0700 netlink: specs: tc: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: a1bcfde83669 ("doc/netlink/specs: Add a spec for tc") Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8d7e211ea925e050882c762ddf8cf2da78856dfb Author: Jakub Kicinski Date: Tue Jun 24 14:10:00 2025 -0700 netlink: specs: rt-link: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: b2f63d904e72 ("doc/netlink: Add spec for rt link messages") Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9e6dd4c256d0774701637b958ba682eff4991277 Author: Jakub Kicinski Date: Tue Jun 24 14:09:59 2025 -0700 netlink: specs: mptcp: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: bc8aeb2045e2 ("Documentation: netlink: add a YAML spec for mptcp") Reviewed-by: Davide Caratti Reviewed-by: Donald Hunter Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250624211002.3475021-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e40d3d0931d2b1e86ba2ca0e9c95f90ac6dd5525 Author: Jakub Kicinski Date: Tue Jun 24 14:09:58 2025 -0700 netlink: specs: ovs_flow: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: 93b230b549bc ("netlink: specs: add ynl spec for ovs_flow") Reviewed-by: Donald Hunter Reviewed-by: Ilya Maximets Reviewed-by: Eelco Chaudron Link: https://patch.msgid.link/20250624211002.3475021-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9407680945145cc34fafd0e9f802b03574620d43 Author: Jakub Kicinski Date: Tue Jun 24 14:09:57 2025 -0700 netlink: specs: devlink: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: 429ac6211494 ("devlink: define enum for attr types of dynamic attributes") Fixes: f2f9dd164db0 ("netlink: specs: devlink: add the remaining command to generate complete split_ops") Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 354592f19c7b0ac5983d56d8594a76aa3437f0a6 Author: Jakub Kicinski Date: Tue Jun 24 14:09:56 2025 -0700 netlink: specs: dpll: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: 3badff3a25d8 ("dpll: spec: Add Netlink spec in YAML") Reviewed-by: Vadim Fedorenko Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 07caaf875c937e5f0a262a1dbad307d08ecc8673 Author: Jakub Kicinski Date: Tue Jun 24 14:09:55 2025 -0700 netlink: specs: ethtool: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen replaces special chars in names) but gives more uniform naming in Python. Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Fixes: 46fb3ba95b93 ("ethtool: Add an interface for flashing transceiver modules' firmware") Reviewed-by: Kory Maincent Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 791a9ed0a40dfa70fe793dcecf950273255cbb84 Author: Jakub Kicinski Date: Tue Jun 24 14:09:54 2025 -0700 netlink: specs: fou: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: 4eb77b4ecd3c ("netlink: add a proto specification for FOU") Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250624211002.3475021-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2434ccb94dfc8e036c81e9d7c77fca6dc1dc2590 Author: Jakub Kicinski Date: Tue Jun 24 14:09:53 2025 -0700 netlink: specs: nfsd: replace underscores with dashes in names We're trying to add a strict regexp for the name format in the spec. Underscores will not be allowed, dashes should be used instead. This makes no difference to C (codegen, if used, replaces special chars in names) but it gives more uniform naming in Python. Fixes: 13727f85b49b ("NFSD: introduce netlink stubs") Reviewed-by: Donald Hunter Reviewed-by: Jeff Layton Link: https://patch.msgid.link/20250624211002.3475021-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7b515f35a911fdc31fbde6531828dcd6ae9803d3 Author: Simon Horman Date: Tue Jun 24 17:35:12 2025 +0100 net: enetc: Correct endianness handling in _enetc_rd_reg64 enetc_hw.h provides two versions of _enetc_rd_reg64. One which simply calls ioread64() when available. And another that composes the 64-bit result from ioread32() calls. In the second case the code appears to assume that each ioread32() call returns a little-endian value. However both the shift and logical or used to compose the return value would not work correctly on big endian systems if this were the case. Moreover, this is inconsistent with the first case where the return value of ioread64() is assumed to be in host byte order. It appears that the correct approach is for both versions to treat the return value of ioread*() functions as being in host byte order. And this patch corrects the ioread32()-based version to do so. This is a bug but would only manifest on big endian systems that make use of the ioread32-based implementation of _enetc_rd_reg64. While all in-tree users of this driver are little endian and make use of the ioread64-based implementation of _enetc_rd_reg64. Thus, no in-tree user of this driver is affected by this bug. Flagged by Sparse. Compile tested only. Fixes: 16eb4c85c964 ("enetc: Add ethtool statistics") Closes: https://lore.kernel.org/all/AM9PR04MB850500D3FC24FE23DEFCEA158879A@AM9PR04MB8505.eurprd04.prod.outlook.com/ Signed-off-by: Simon Horman Reviewed-by: Wei Fang Link: https://patch.msgid.link/20250624-etnetc-le-v1-1-a73a95d96e4e@kernel.org Signed-off-by: Jakub Kicinski commit c4890963350dcf4e9a909bae23665921fba4ad27 Author: Thomas Fourier Date: Tue Jun 24 08:41:47 2025 +0200 atm: idt77252: Add missing `dma_map_error()` The DMA map functions can fail and should be tested for errors. Signed-off-by: Thomas Fourier Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250624064148.12815-3-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski commit 5e9388f7984a9cc7e659a105113f6ccf0aebedd0 Author: Willem de Bruijn Date: Wed Jun 25 17:03:55 2025 -0400 selftests/bpf: adapt one more case in test_lru_map to the new target_free The below commit that updated BPF_MAP_TYPE_LRU_HASH free target, also updated tools/testing/selftests/bpf/test_lru_map to match. But that missed one case that passes with 4 cores, but fails at higher cpu counts. Update test_lru_sanity3 to also adjust its expectation of target_free. This time tested with 1, 4, 16, 64 and 384 cpu count. Fixes: d4adf1c9ee77 ("bpf: Adjust free target to avoid global starvation of LRU map") Signed-off-by: Willem de Bruijn Link: https://lore.kernel.org/r/20250625210412.2732970-1-willemdebruijn.kernel@gmail.com Signed-off-by: Alexei Starovoitov commit 666c23af755dccca8c25b5d5200ca28153c69a05 Author: Christophe JAILLET Date: Sat Jun 14 16:59:26 2025 +0200 i2c: omap: Fix an error handling path in omap_i2c_probe() If an error occurs after calling mux_state_select(), mux_state_deselect() should be called as already done in the remove function. Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") Signed-off-by: Christophe JAILLET Cc: # v6.15+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/998542981b6d2435c057dd8b9fe71743927babab.1749913149.git.christophe.jaillet@wanadoo.fr commit 577c1e0ef351e41aba764816232a9feb7a9b3969 Author: Pratap Nirujogi Date: Mon Jun 9 11:53:57 2025 -0400 platform/x86: Use i2c adapter name to fix build errors Use adapater->name inplace of adapter->owner->name to fix build issues when CONFIG_MODULES is not defined. Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") Reported-by: Randy Dunlap Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org Tested-by: Randy Dunlap Signed-off-by: Pratap Nirujogi Requires: 942e1aece13e ("i2c: designware: Initialize adapter name only when not set" Requires: c8dc57916973 ("i2c: amd-isp: Initialize unique adapter name") Acked-by: Ilpo Järvinen Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250609155601.1477055-4-pratap.nirujogi@amd.com commit c8dc579169738a3546f57ecb38e62d3872a3cc04 Author: Pratap Nirujogi Date: Mon Jun 9 11:53:56 2025 -0400 i2c: amd-isp: Initialize unique adapter name Initialize unique name for amdisp i2c adapter, which is used in the platform driver to detect the matching adapter for i2c_client creation. Add definition of amdisp i2c adapter name in a new header file (include/linux/soc/amd/isp4_misc.h) as it is referred in different driver modules. Tested-by: Randy Dunlap Signed-off-by: Pratap Nirujogi Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250609155601.1477055-3-pratap.nirujogi@amd.com commit 942e1aece13e4007656e41d3182c0adf05cf08b8 Author: Pratap Nirujogi Date: Mon Jun 9 11:53:55 2025 -0400 i2c: designware: Initialize adapter name only when not set Check if the adapter name is already set in the driver prior to initializing with generic name in i2c_dw_probe_master(). This check allows to retain the unique adapter name driver has initialized, which platform driver can use to distinguish it from other i2c designware adapters. Tested-by: Randy Dunlap Signed-off-by: Pratap Nirujogi Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250609155601.1477055-2-pratap.nirujogi@amd.com commit cbdb25ccf7566eee0c2b945e35cb98baf9ed0aa6 Author: Wolfram Sang Date: Thu May 22 08:43:49 2025 +0200 i2c: tiny-usb: disable zero-length read messages This driver passes the length of an i2c_msg directly to usb_control_msg(). If the message is now a read and of length 0, it violates the USB protocol and a warning will be printed. Enable the I2C_AQ_NO_ZERO_LEN_READ quirk for this adapter thus forbidding 0-length read messages altogether. Fixes: e8c76eed2ecd ("i2c: New i2c-tiny-usb bus driver") Signed-off-by: Wolfram Sang Cc: # v2.6.22+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250522064349.3823-2-wsa+renesas@sang-engineering.com commit 56ad91c1aa9c18064348edf69308080b03c9dc48 Author: Wolfram Sang Date: Thu May 22 08:42:35 2025 +0200 i2c: robotfuzz-osif: disable zero-length read messages This driver passes the length of an i2c_msg directly to usb_control_msg(). If the message is now a read and of length 0, it violates the USB protocol and a warning will be printed. Enable the I2C_AQ_NO_ZERO_LEN_READ quirk for this adapter thus forbidding 0-length read messages altogether. Fixes: 83e53a8f120f ("i2c: Add bus driver for for OSIF USB i2c device.") Signed-off-by: Wolfram Sang Cc: # v3.14+ Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250522064234.3721-2-wsa+renesas@sang-engineering.com commit a5d0b9e32745277644cda8d7d334e7080bd339bf Author: Lukasz Kucharczyk Date: Tue May 20 14:22:52 2025 +0200 i2c: imx: fix emulated smbus block read Acknowledge the byte count submitted by the target. When I2C_SMBUS_BLOCK_DATA read operation is executed by i2c_smbus_xfer_emulated(), the length of the second (read) message is set to 1. Length of the block is supposed to be obtained from the target by the underlying bus driver. The i2c_imx_isr_read() function should emit the acknowledge on i2c bus after reading the first byte (i.e., byte count) while processing such message (as defined in Section 6.5.7 of System Management Bus Specification [1]). Without this acknowledge, the target does not submit subsequent bytes and the controller only reads 0xff's. In addition, store the length of block data obtained from the target in the buffer provided by i2c_smbus_xfer_emulated() - otherwise the first byte of actual data is erroneously interpreted as length of the data block. [1] https://smbus.org/specs/SMBus_3_3_20240512.pdf Fixes: 5f5c2d4579ca ("i2c: imx: prevent rescheduling in non dma mode") Signed-off-by: Lukasz Kucharczyk Cc: # v6.13+ Acked-by: Oleksij Rempel Reviewed-by: Stefan Eichenberger Reviewed-by: Carlos Song Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250520122252.1475403-1-lukasz.kucharczyk@leica-geosystems.com commit fa6f092cc0a02d0fcee37e9e8172eda372a03d33 Author: Adin Scannell Date: Tue Jun 24 22:02:15 2025 -0700 libbpf: Fix possible use-after-free for externs The `name` field in `obj->externs` points into the BTF data at initial open time. However, some functions may invalidate this after opening and before loading (e.g. `bpf_map__set_value_size`), which results in pointers into freed memory and undefined behavior. The simplest solution is to simply `strdup` these strings, similar to the `essent_name`, and free them at the same time. In order to test this path, the `global_map_resize` BPF selftest is modified slightly to ensure the presence of an extern, which causes this test to fail prior to the fix. Given there isn't an obvious API or error to test against, I opted to add this to the existing test as an aspect of the resizing feature rather than duplicate the test. Fixes: 9d0a23313b1a ("libbpf: Add capability for resizing datasec maps") Signed-off-by: Adin Scannell Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250625050215.2777374-1-amscanne@meta.com commit 0a46f60a9fe16f5596b6b4b3ee1a483ea7854136 Author: Li Ming Date: Fri Jun 20 13:29:24 2025 +0800 cxl/edac: Fix using wrong repair type to check dram event record cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways. When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking. Fixes: 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature") Signed-off-by: Li Ming Reviewed-by: Shiju Jose Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Reviewed-by: Fan Ni Link: https://patch.msgid.link/20250620052924.138892-1-ming.li@zohomail.com Signed-off-by: Dave Jiang commit c4dce0c094a89b1bc8fde1163342bd6fe29c0370 Merge: 92ca6c498a5e6e b07f349d1864ab Author: Linus Torvalds Date: Wed Jun 25 11:54:04 2025 -0700 Merge tag 'spi-fix-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One fix for a runtime PM underflow when removing the Cadence QuadSPI driver" * tag 'spi-fix-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-cadence-quadspi: Fix pm runtime unbalance commit e97f9540ce001503a4539f337da742c1dfa7d86a Author: Stefan Metzmacher Date: Wed Jun 25 10:13:04 2025 +0200 smb: client: remove \t from TP_printk statements The generate '[FAILED TO PARSE]' strings in trace-cmd report output like this: rm-5298 [001] 6084.533748493: smb3_exit_err: [FAILED TO PARSE] xid=972 func_name=cifs_rmdir rc=-39 rm-5298 [001] 6084.533959234: smb3_enter: [FAILED TO PARSE] xid=973 func_name=cifs_closedir rm-5298 [001] 6084.533967630: smb3_close_enter: [FAILED TO PARSE] xid=973 fid=94489281833 tid=1 sesid=96758029877361 rm-5298 [001] 6084.534004008: smb3_cmd_enter: [FAILED TO PARSE] tid=1 sesid=96758029877361 cmd=6 mid=566 rm-5298 [001] 6084.552248232: smb3_cmd_done: [FAILED TO PARSE] tid=1 sesid=96758029877361 cmd=6 mid=566 rm-5298 [001] 6084.552280542: smb3_close_done: [FAILED TO PARSE] xid=973 fid=94489281833 tid=1 sesid=96758029877361 rm-5298 [001] 6084.552316034: smb3_exit_done: [FAILED TO PARSE] xid=973 func_name=cifs_closedir Cc: stable@vger.kernel.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 92ca6c498a5e6e2083b520b82d318e7e525f3e7c Merge: 2dca89df0d1116 85d6fbc47c3087 Author: Linus Torvalds Date: Wed Jun 25 11:20:14 2025 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Fixes all in drivers. ufs and megaraid_sas are small and obvious. The large diffstat in fnic comes from two pieces: the addition of quite a bit of logging (no change to function) and the reworking of the timeout allocation path for the two conditions that can occur simultaneously to prevent reusing the same abort frame and then both trying to free it" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fnic: Fix missing DMA mapping error in fnic_send_frame() scsi: fnic: Set appropriate logging level for log message scsi: fnic: Add and improve logs in FDMI and FDMI ABTS paths scsi: fnic: Turn off FDMI ACTIVE flags on link down scsi: fnic: Fix crash in fnic_wq_cmpl_handler when FDMI times out scsi: ufs: core: Fix clk scaling to be conditional in reset and restore scsi: megaraid_sas: Fix invalid node index commit 2dca89df0d1116f722b4be100e4bfcff858058e8 Merge: 7595b66ae9de66 2d65fc13be85c3 Author: Linus Torvalds Date: Wed Jun 25 11:13:31 2025 -0700 Merge tag 'uml-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fixes from Johannes Berg: - fix FP registers in seccomp mode - prevent duplicate devices in VFIO support - don't ignore errors in UBD thread start - reduce stack use with clang 19 * tag 'uml-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: vector: Reduce stack usage in vector_eth_configure() um: Use correct data source in fpregs_legacy_set() um: vfio: Prevent duplicate device assignments um: ubd: Add missing error check in start_io_thread() commit 010c40c1f50eecab3cdeaa895808294ad0c4f000 Merge: 9caca6ac0e26cd 95b922dd04f74a Author: Jakub Kicinski Date: Wed Jun 25 10:26:16 2025 -0700 Merge tag 'wireless-2025-06-25' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Just a few fixes: - iwlegacy: work around large stack with clang/kasan - mac80211: fix integer overflow - mac80211: fix link struct init vs. RCU publish - iwlwifi: fix warning on IFF_UP * tag 'wireless-2025-06-25' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: finish link init before RCU publish wifi: iwlwifi: mvm: assume '1' as the default mac_config_cmd version wifi: mac80211: fix beacon interval calculation overflow wifi: iwlegacy: work around excessive stack usage on clang/kasan ==================== Link: https://patch.msgid.link/20250625115433.41381-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 9a709b7e98e6fa51600b5f2d24c5068efa6d39de Author: Jens Axboe Date: Wed Jun 25 10:17:06 2025 -0600 io_uring/net: mark iov as dynamically allocated even for single segments A bigger array of vecs could've been allocated, but io_ring_buffers_peek() still decided to cap the mapped range depending on how much data was available. Hence don't rely on the segment count to know if the request should be marked as needing cleanup, always check upfront if the iov array is different than the fast_iov array. Fixes: 26ec15e4b0c1 ("io_uring/kbuf: don't truncate end buffer for multiple buffer peeks") Signed-off-by: Jens Axboe commit fa787ac07b3ceb56dd88a62d1866038498e96230 Author: Manuel Andreas Date: Wed Jun 25 15:53:19 2025 +0200 KVM: x86/hyper-v: Skip non-canonical addresses during PV TLB flush In KVM guests with Hyper-V hypercalls enabled, the hypercalls HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST and HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX allow a guest to request invalidation of portions of a virtual TLB. For this, the hypercall parameter includes a list of GVAs that are supposed to be invalidated. However, when non-canonical GVAs are passed, there is currently no filtering in place and they are eventually passed to checked invocations of INVVPID on Intel / INVLPGA on AMD. While AMD's INVLPGA silently ignores non-canonical addresses (effectively a no-op), Intel's INVVPID explicitly signals VM-Fail and ultimately triggers the WARN_ONCE in invvpid_error(): invvpid failed: ext=0x0 vpid=1 gva=0xaaaaaaaaaaaaa000 WARNING: CPU: 6 PID: 326 at arch/x86/kvm/vmx/vmx.c:482 invvpid_error+0x91/0xa0 [kvm_intel] Modules linked in: kvm_intel kvm 9pnet_virtio irqbypass fuse CPU: 6 UID: 0 PID: 326 Comm: kvm-vm Not tainted 6.15.0 #14 PREEMPT(voluntary) RIP: 0010:invvpid_error+0x91/0xa0 [kvm_intel] Call Trace: vmx_flush_tlb_gva+0x320/0x490 [kvm_intel] kvm_hv_vcpu_flush_tlb+0x24f/0x4f0 [kvm] kvm_arch_vcpu_ioctl_run+0x3013/0x5810 [kvm] Hyper-V documents that invalid GVAs (those that are beyond a partition's GVA space) are to be ignored. While not completely clear whether this ruling also applies to non-canonical GVAs, it is likely fine to make that assumption, and manual testing on Azure confirms "real" Hyper-V interprets the specification in the same way. Skip non-canonical GVAs when processing the list of address to avoid tripping the INVVPID failure. Alternatively, KVM could filter out "bad" GVAs before inserting into the FIFO, but practically speaking the only downside of pushing validation to the final processing is that doing so is suboptimal for the guest, and no well-behaved guest will request TLB flushes for non-canonical addresses. Fixes: 260970862c88 ("KVM: x86: hyper-v: Handle HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls gently") Cc: stable@vger.kernel.org Signed-off-by: Manuel Andreas Suggested-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/c090efb3-ef82-499f-a5e0-360fc8420fb7@tum.de Signed-off-by: Sean Christopherson commit 1944f6ab4967db7ad8d4db527dceae8c77de76e9 Author: Stefan Metzmacher Date: Wed Jun 25 10:16:38 2025 +0200 smb: client: let smbd_post_send_iter() respect the peers max_send_size and transmit all data We should not send smbdirect_data_transfer messages larger than the negotiated max_send_size, typically 1364 bytes, which means 24 bytes of the smbdirect_data_transfer header + 1340 payload bytes. This happened when doing an SMB2 write with more than 1340 bytes (which is done inline as it's below rdma_readwrite_threshold). It means the peer resets the connection. When testing between cifs.ko and ksmbd.ko something like this is logged: client: CIFS: VFS: RDMA transport re-established siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 siw: got TERMINATE. layer 1, type 2, code 2 CIFS: VFS: \\carina Send error in SessSetup = -11 smb2_reconnect: 12 callbacks suppressed CIFS: VFS: reconnect tcon failed rc = -11 CIFS: VFS: reconnect tcon failed rc = -11 CIFS: VFS: reconnect tcon failed rc = -11 CIFS: VFS: SMB: Zero rsize calculated, using minimum value 65536 and: CIFS: VFS: RDMA transport re-established siw: got TERMINATE. layer 1, type 2, code 2 CIFS: VFS: smbd_recv:1894 disconnected siw: got TERMINATE. layer 1, type 2, code 2 The ksmbd dmesg is showing things like: smb_direct: Recv error. status='local length error (1)' opcode=128 smb_direct: disconnected smb_direct: Recv error. status='local length error (1)' opcode=128 ksmbd: smb_direct: disconnected ksmbd: sock_read failed: -107 As smbd_post_send_iter() limits the transmitted number of bytes we need loop over it in order to transmit the whole iter. Reviewed-by: David Howells Tested-by: David Howells Tested-by: Meetakshi Setiya Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Cc: # sp->max_send_size should be info->max_send_size in backports Fixes: 3d78fe73fa12 ("cifs: Build the RDMA SGE list directly from an iterator") Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 55e8ff842051b1150461d7595d8f1d033c69d66b Author: Jayesh Choudhary Date: Tue Jun 24 10:18:35 2025 +0530 drm/bridge: ti-sn65dsi86: Add HPD for DisplayPort connector type By default, HPD was disabled on SN65DSI86 bridge. When the driver was added (commit "a095f15c00e27"), the HPD_DISABLE bit was set in pre-enable call which was moved to other function calls subsequently. Later on, commit "c312b0df3b13" added detect utility for DP mode. But with HPD_DISABLE bit set, all the HPD events are disabled[0] and the debounced state always return 1 (always connected state). Set HPD_DISABLE bit conditionally based on display sink's connector type. Since the HPD_STATE is reflected correctly only after waiting for debounce time (~100-400ms) and adding this delay in detect() is not feasible owing to the performace impact (glitches and frame drop), remove runtime calls in detect() and add hpd_enable()/disable() bridge hooks with runtime calls, to detect hpd properly without any delay. [0]: (Pg. 32) Fixes: c312b0df3b13 ("drm/bridge: ti-sn65dsi86: Implement bridge connector operations for DP") Cc: Max Krummenacher Reviewed-by: Douglas Anderson Tested-by: Ernest Van Hoecke Signed-off-by: Jayesh Choudhary Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250624044835.165708-1-j-choudhary@ti.com commit a3f3040657417aeadb9622c629d4a0c2693a0f93 Author: Avadhut Naik Date: Thu May 29 20:50:04 2025 +0000 EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs Each Chip-Select (CS) of a Unified Memory Controller (UMC) on AMD Zen-based SOCs has an Address Mask and a Secondary Address Mask register associated with it. The amd64_edac module logs DIMM sizes on a per-UMC per-CS granularity during init using these two registers. Currently, the module primarily considers only the Address Mask register for computing DIMM sizes. The Secondary Address Mask register is only considered for odd CS. Additionally, if it has been considered, the Address Mask register is ignored altogether for that CS. For power-of-two DIMMs i.e. DIMMs whose total capacity is a power of two (32GB, 64GB, etc), this is not an issue since only the Address Mask register is used. For non-power-of-two DIMMs i.e., DIMMs whose total capacity is not a power of two (48GB, 96GB, etc), however, the Secondary Address Mask register is used in conjunction with the Address Mask register. However, since the module only considers either of the two registers for a CS, the size computed by the module is incorrect. The Secondary Address Mask register is not considered for even CS, and the Address Mask register is not considered for odd CS. Introduce a new helper function so that both Address Mask and Secondary Address Mask registers are considered, when valid, for computing DIMM sizes. Furthermore, also rename some variables for greater clarity. Fixes: 81f5090db843 ("EDAC/amd64: Support asymmetric dual-rank DIMMs") Closes: https://lore.kernel.org/dbec22b6-00f2-498b-b70d-ab6f8a5ec87e@natrix.lt Reported-by: Žilvinas Žaltiena Signed-off-by: Avadhut Naik Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Tested-by: Žilvinas Žaltiena Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250529205013.403450-1-avadhut.naik@amd.com commit 51a4273dcab39dd1e850870945ccec664352d383 Author: Nikunj A Dadhania Date: Tue Apr 8 15:02:11 2025 +0530 KVM: SVM: Add missing member in SNP_LAUNCH_START command structure The sev_data_snp_launch_start structure should include a 4-byte desired_tsc_khz field before the gosvw field, which was missed in the initial implementation. As a result, the structure is 4 bytes shorter than expected by the firmware, causing the gosvw field to start 4 bytes early. Fix this by adding the missing 4-byte member for the desired TSC frequency. Fixes: 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands") Cc: stable@vger.kernel.org Suggested-by: Tom Lendacky Reviewed-by: Tom Lendacky Tested-by: Vaishali Thakkar Signed-off-by: Nikunj A Dadhania Link: https://lore.kernel.org/r/20250408093213.57962-3-nikunj@amd.com Signed-off-by: Sean Christopherson commit 7cac633a42a7b3c8146eb1db76fb80dc652998de Author: Penglei Jiang Date: Wed Jun 25 03:27:03 2025 -0700 io_uring: fix resource leak in io_import_dmabuf() Replace the return statement with setting ret = -EINVAL and jumping to the err label to ensure resources are released via io_release_dmabuf. Fixes: a5c98e942457 ("io_uring/zcrx: dmabuf backed zerocopy receive") Signed-off-by: Penglei Jiang Link: https://lore.kernel.org/r/20250625102703.68336-1-superman.xpt@gmail.com Signed-off-by: Jens Axboe commit 0c84b534047dcf843f4344108bc3f2c2344b7e31 Author: Binbin Wu Date: Wed Jun 25 09:48:29 2025 +0800 Documentation: KVM: Fix unexpected unindent warnings Add proper indentations to bullet list items to resolve the warning: "Bullet list ends without a blank line; unexpected unindent." Closes:https://lore.kernel.org/kvm/20250623162110.6e2f4241@canb.auug.org.au/ Fixes: cf207eac06f6 ("KVM: TDX: Handle TDG.VP.VMCALL") Fixes: 25e8b1dd4883 ("KVM: TDX: Exit to userspace for GetTdVmCallInfo") Reported-by: Stephen Rothwell Signed-off-by: Binbin Wu Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250625014829.82289-1-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 3e0809b1664b9dc650d9dbca9a2d3ac690d4f661 Author: Niklas Cassel Date: Tue Jun 24 09:40:30 2025 +0200 ata: ahci: Use correct DMI identifier for ASUSPRO-D840SA LPM quirk ASUS store the board name in DMI_PRODUCT_NAME rather than DMI_PRODUCT_VERSION. (Apparently it is only Lenovo that stores the model-name in DMI_PRODUCT_VERSION.) Use the correct DMI identifier, DMI_PRODUCT_NAME, to match the ASUSPRO-D840SA board, such that the quirk actually gets applied. Cc: stable@vger.kernel.org Reported-by: Andy Yang Tested-by: Andy Yang Closes: https://lore.kernel.org/linux-ide/aFb3wXAwJSSJUB7o@ryzen/ Fixes: b5acc3628898 ("ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard") Reviewed-by: Hans de Goede Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20250624074029.963028-2-cassel@kernel.org Signed-off-by: Niklas Cassel commit ec54c0a20709ed6e56f40a8d59eee725c31a916b Author: Sergey Senozhatsky Date: Wed Jun 25 14:20:37 2025 +0900 mtk-sd: reset host->mrq on prepare_data() error Do not leave host with dangling ->mrq pointer if we hit the msdc_prepare_data() error out path. Signed-off-by: Sergey Senozhatsky Reviewed-by: Masami Hiramatsu (Google) Fixes: f5de469990f1 ("mtk-sd: Prevent memory corruption from DMA map failure") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250625052106.584905-1-senozhatsky@chromium.org Signed-off-by: Ulf Hansson commit 173bbec6693f3f3f00dac144f3aa0cd62fb60d33 Author: Alok Tiwari Date: Wed Jun 18 23:05:00 2025 -0700 platform/mellanox: mlxbf-pmc: Fix duplicate event ID for CACHE_DATA1 same ID (103) was assigned to both GDC_BANK0_G_RSE_PIPE_CACHE_DATA0 and GDC_BANK0_G_RSE_PIPE_CACHE_DATA1. This could lead to incorrect event mapping. Updated the ID to 104 to ensure uniqueness. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Alok Tiwari Reviewed-by: David Thompson Link: https://lore.kernel.org/r/20250619060502.3594350-1-alok.a.tiwari@oracle.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b511bbfe4242e14c27a4f80da95dabc4a99d73b2 Author: Mark Pearson Date: Fri Jun 20 14:11:10 2025 -0400 platform/x86: thinkpad_acpi: handle HKEY 0x1402 event 2025 Thinkpads F11 key launch the Intel Unison app on Windows, which does some sort of smart sharing between laptop and phone. Map this key event to KEY_LINK_PHONE as the closest thing we have. This prevents an error message being displayed on key press. Reported-by: Damjan Georgievski Closes: https://sourceforge.net/p/ibm-acpi/mailman/message/59189556/ Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20250620181119.2519546-1-mpearson-lenovo@squebb.ca [ij: converted directory to pre-lenovo move as this is fixes material.] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 7dc6b2d3b5503bcafebbeaf9818112bf367107b4 Author: Rahul Chandra Date: Tue Jun 24 03:33:01 2025 -0400 platform/x86: asus-nb-wmi: add DMI quirk for ASUS Zenbook Duo UX8406CA Add a DMI quirk entry for the ASUS Zenbook Duo UX8406CA 2025 model to use the existing zenbook duo keyboard quirk. Signed-off-by: Rahul Chandra Link: https://lore.kernel.org/r/20250624073301.602070-1-rahul@chandra.net Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d0f8ee81a8fe63cd29d01b905eead72b88326ef2 Author: Paul Menzel Date: Sun Jun 22 10:07:20 2025 +0200 platform/x86: dell-lis3lv02d: Add Latitude 5500 Add 0x29 as the accelerometer address for the Dell Latitude 5500 to lis3lv02d_devices[]. The address was verified as below: $ cd /sys/bus/pci/drivers/i801_smbus/0000:00:1f.4 $ ls -d i2c-? i2c-2 $ sudo modprobe i2c-dev $ sudo i2cdetect 2 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-2. I will probe address range 0x08-0x77. Continue? [Y/n] Y 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- -- 30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- -- 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device lis3lv02d 0x29 $ sudo dmesg [ 0.000000] Linux version 6.12.32-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44) #1 SMP PREEMPT_DYNAMIC Debian 6.12.32-1 (2025-06-07) […] [ 0.000000] DMI: Dell Inc. Latitude 5500/0M14W7, BIOS 1.38.0 03/06/2025 […] [ 609.063488] i2c_dev: i2c /dev entries driver [ 639.135020] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29 Signed-off-by: Paul Menzel Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250622080721.4661-1-pmenzel@molgen.mpg.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 95b922dd04f74a45fb86b34a25cda62f427a2b5c Merge: d87c3ca0f8f1ca 93598167dcb635 Author: Johannes Berg Date: Wed Jun 25 10:19:39 2025 +0200 Merge tag 'iwlwifi-fixes-2025-06-25' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== iwlwifi-fixes: fix failure in interface up ==================== Signed-off-by: Johannes Berg commit a9a9e68954f29b1e197663f76289db4879fd51bb Author: Patrisious Haddad Date: Mon Jun 16 12:14:54 2025 +0300 RDMA/mlx5: Fix vport loopback for MPV device Always enable vport loopback for both MPV devices on driver start. Previously in some cases related to MPV RoCE, packets weren't correctly executing loopback check at vport in FW, since it was disabled. Due to complexity of identifying such cases for MPV always enable vport loopback for both GVMIs when binding the slave to the master port. Fixes: 0042f9e458a5 ("RDMA/mlx5: Enable vport loopback when user context or QP mandate") Signed-off-by: Patrisious Haddad Reviewed-by: Mark Bloch Link: https://patch.msgid.link/d4298f5ebb2197459e9e7221c51ecd6a34699847.1750064969.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit acd245b1e33fc4b9d0f2e3372021d632f7ee0652 Author: Patrisious Haddad Date: Mon Jun 16 12:14:53 2025 +0300 RDMA/mlx5: Fix CC counters query for MPV In case, CC counters are querying for the second port use the correct core device for the query instead of always using the master core device. Fixes: aac4492ef23a ("IB/mlx5: Update counter implementation for dual port RoCE") Signed-off-by: Patrisious Haddad Reviewed-by: Michael Guralnik Link: https://patch.msgid.link/9cace74dcf106116118bebfa9146d40d4166c6b0.1750064969.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 3cc1dbfddf88dc5ecce0a75185061403b1f7352d Author: Patrisious Haddad Date: Mon Jun 16 12:14:52 2025 +0300 RDMA/mlx5: Fix HW counters query for non-representor devices To get the device HW counters, a non-representor switchdev device should use the mlx5_ib_query_q_counters() function and query all of the available counters. While a representor device in switchdev mode should use the mlx5_ib_query_q_counters_vport() function and query only the Q_Counters without the PPCNT counters and congestion control counters, since they aren't relevant for a representor device. Currently a non-representor switchdev device skips querying the PPCNT counters and congestion control counters, leaving them unupdated. Fix that by properly querying those counters for non-representor devices. Fixes: d22467a71ebe ("RDMA/mlx5: Expand switchdev Q-counters to expose representor statistics") Signed-off-by: Patrisious Haddad Reviewed-by: Maher Sanalla Link: https://patch.msgid.link/56bf8af4ca8c58e3fb9f7e47b1dca2009eeeed81.1750064969.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 3f5f6321f129ad5a30aa03c99c196b4612be68a8 Author: Or Har-Toov Date: Mon Jun 16 11:16:03 2025 +0300 IB/core: Annotate umem_mutex acquisition under fs_reclaim for lockdep Following the fix in the previous commit ("IB/mlx5: Fix potential deadlock in MR deregistration"), teach lockdep explicitly about the locking order between fs_reclaim and umem_mutex. The previous commit resolved a potential deadlock scenario where kzalloc(GFP_KERNEL) was called while holding umem_mutex, which could lead to reclaim and eventually invoke the MMU notifier (mlx5_ib_invalidate_range()), causing a recursive acquisition of umem_mutex. To prevent such issues from reoccurring unnoticed in future code changes, add a lockdep annotation in ib_init_umem_odp() that simulates taking umem_mutex inside a reclaim context. This makes lockdep aware of this locking dependency and ensures that future violations—such as calling kzalloc() or any memory allocator that may enter reclaim while holding umem_mutex—will immediately raise a lockdep warning. Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Link: https://patch.msgid.link/9d31b9d8fe1db648a9f47cec3df6b8463319dee5.1750061698.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 2ed25aa7f7711f508b6120e336f05cd9d49943c0 Author: Or Har-Toov Date: Mon Jun 16 11:14:09 2025 +0300 IB/mlx5: Fix potential deadlock in MR deregistration The issue arises when kzalloc() is invoked while holding umem_mutex or any other lock acquired under umem_mutex. This is problematic because kzalloc() can trigger fs_reclaim_aqcuire(), which may, in turn, invoke mmu_notifier_invalidate_range_start(). This function can lead to mlx5_ib_invalidate_range(), which attempts to acquire umem_mutex again, resulting in a deadlock. The problematic flow: CPU0 | CPU1 ---------------------------------------|------------------------------------------------ mlx5_ib_dereg_mr() | → revoke_mr() | → mutex_lock(&umem_odp->umem_mutex) | | mlx5_mkey_cache_init() | → mutex_lock(&dev->cache.rb_lock) | → mlx5r_cache_create_ent_locked() | → kzalloc(GFP_KERNEL) | → fs_reclaim() | → mmu_notifier_invalidate_range_start() | → mlx5_ib_invalidate_range() | → mutex_lock(&umem_odp->umem_mutex) → cache_ent_find_and_store() | → mutex_lock(&dev->cache.rb_lock) | Additionally, when kzalloc() is called from within cache_ent_find_and_store(), we encounter the same deadlock due to re-acquisition of umem_mutex. Solve by releasing umem_mutex in dereg_mr() after umr_revoke_mr() and before acquiring rb_lock. This ensures that we don't hold umem_mutex while performing memory allocations that could trigger the reclaim path. This change prevents the deadlock by ensuring proper lock ordering and avoiding holding locks during memory allocation operations that could trigger the reclaim path. The following lockdep warning demonstrates the deadlock: python3/20557 is trying to acquire lock: ffff888387542128 (&umem_odp->umem_mutex){+.+.}-{4:4}, at: mlx5_ib_invalidate_range+0x5b/0x550 [mlx5_ib] but task is already holding lock: ffffffff82f6b840 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}, at: unmap_vmas+0x7b/0x1a0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}: fs_reclaim_acquire+0x60/0xd0 mem_cgroup_css_alloc+0x6f/0x9b0 cgroup_init_subsys+0xa4/0x240 cgroup_init+0x1c8/0x510 start_kernel+0x747/0x760 x86_64_start_reservations+0x25/0x30 x86_64_start_kernel+0x73/0x80 common_startup_64+0x129/0x138 -> #2 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0x91/0xd0 __kmalloc_cache_noprof+0x4d/0x4c0 mlx5r_cache_create_ent_locked+0x75/0x620 [mlx5_ib] mlx5_mkey_cache_init+0x186/0x360 [mlx5_ib] mlx5_ib_stage_post_ib_reg_umr_init+0x3c/0x60 [mlx5_ib] __mlx5_ib_add+0x4b/0x190 [mlx5_ib] mlx5r_probe+0xd9/0x320 [mlx5_ib] auxiliary_bus_probe+0x42/0x70 really_probe+0xdb/0x360 __driver_probe_device+0x8f/0x130 driver_probe_device+0x1f/0xb0 __driver_attach+0xd4/0x1f0 bus_for_each_dev+0x79/0xd0 bus_add_driver+0xf0/0x200 driver_register+0x6e/0xc0 __auxiliary_driver_register+0x6a/0xc0 do_one_initcall+0x5e/0x390 do_init_module+0x88/0x240 init_module_from_file+0x85/0xc0 idempotent_init_module+0x104/0x300 __x64_sys_finit_module+0x68/0xc0 do_syscall_64+0x6d/0x140 entry_SYSCALL_64_after_hwframe+0x4b/0x53 -> #1 (&dev->cache.rb_lock){+.+.}-{4:4}: __mutex_lock+0x98/0xf10 __mlx5_ib_dereg_mr+0x6f2/0x890 [mlx5_ib] mlx5_ib_dereg_mr+0x21/0x110 [mlx5_ib] ib_dereg_mr_user+0x85/0x1f0 [ib_core] uverbs_free_mr+0x19/0x30 [ib_uverbs] destroy_hw_idr_uobject+0x21/0x80 [ib_uverbs] uverbs_destroy_uobject+0x60/0x3d0 [ib_uverbs] uobj_destroy+0x57/0xa0 [ib_uverbs] ib_uverbs_cmd_verbs+0x4d5/0x1210 [ib_uverbs] ib_uverbs_ioctl+0x129/0x230 [ib_uverbs] __x64_sys_ioctl+0x596/0xaa0 do_syscall_64+0x6d/0x140 entry_SYSCALL_64_after_hwframe+0x4b/0x53 -> #0 (&umem_odp->umem_mutex){+.+.}-{4:4}: __lock_acquire+0x1826/0x2f00 lock_acquire+0xd3/0x2e0 __mutex_lock+0x98/0xf10 mlx5_ib_invalidate_range+0x5b/0x550 [mlx5_ib] __mmu_notifier_invalidate_range_start+0x18e/0x1f0 unmap_vmas+0x182/0x1a0 exit_mmap+0xf3/0x4a0 mmput+0x3a/0x100 do_exit+0x2b9/0xa90 do_group_exit+0x32/0xa0 get_signal+0xc32/0xcb0 arch_do_signal_or_restart+0x29/0x1d0 syscall_exit_to_user_mode+0x105/0x1d0 do_syscall_64+0x79/0x140 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Chain exists of: &dev->cache.rb_lock --> mmu_notifier_invalidate_range_start --> &umem_odp->umem_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&umem_odp->umem_mutex); lock(mmu_notifier_invalidate_range_start); lock(&umem_odp->umem_mutex); lock(&dev->cache.rb_lock); *** DEADLOCK *** Fixes: abb604a1a9c8 ("RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error") Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Link: https://patch.msgid.link/3c8f225a8a9fade647d19b014df1172544643e4a.1750061612.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 2d65fc13be85c336c56af7077f08ccd3a3a15a4a Author: Tiwei Bie Date: Mon Jun 23 19:08:29 2025 +0800 um: vector: Reduce stack usage in vector_eth_configure() When compiling with clang (19.1.7), initializing *vp using a compound literal may result in excessive stack usage. Fix it by initializing the required fields of *vp individually. Without this patch: $ objdump -d arch/um/drivers/vector_kern.o | ./scripts/checkstack.pl x86_64 0 ... 0x0000000000000540 vector_eth_configure [vector_kern.o]:1472 ... With this patch: $ objdump -d arch/um/drivers/vector_kern.o | ./scripts/checkstack.pl x86_64 0 ... 0x0000000000000540 vector_eth_configure [vector_kern.o]:208 ... Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506221017.WtB7Usua-lkp@intel.com/ Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250623110829.314864-1-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 8948941276024fcfb08fdb3d678867dc1f7b1c16 Author: Tiwei Bie Date: Fri Jun 6 20:44:28 2025 +0800 um: Use correct data source in fpregs_legacy_set() Read from the buffer pointed to by 'from' instead of '&buf', as 'buf' contains no valid data when 'ubuf' is NULL. Fixes: b1e1bd2e6943 ("um: Add helper functions to get/set state for SECCOMP") Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250606124428.148164-5-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit bc4e2ae08183d9017f43bf88aa7cfdf84e76f573 Author: Tiwei Bie Date: Fri Jun 6 20:44:27 2025 +0800 um: vfio: Prevent duplicate device assignments Ensure devices are assigned only once. Reject subsequent requests for duplicate assignments. Fixes: a0e2cb6a9063 ("um: Add VFIO-based virtual PCI driver") Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250606124428.148164-4-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit c55c7a85e02a7bfee20a3ffebdff7cbeb41613ef Author: Tiwei Bie Date: Fri Jun 6 20:44:25 2025 +0800 um: ubd: Add missing error check in start_io_thread() The subsequent call to os_set_fd_block() overwrites the previous return value. OR the two return values together to fix it. Fixes: f88f0bdfc32f ("um: UBD Improvements") Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250606124428.148164-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit d02b2103a08b6d6908f1d3d8e8783d3f342555ac Author: Arnd Bergmann Date: Fri Jun 20 13:18:18 2025 +0200 drm/i915: fix build error some more An earlier patch fixed a build failure with clang, but I still see the same problem with some configurations using gcc: drivers/gpu/drm/i915/i915_pmu.c: In function 'config_mask': include/linux/compiler_types.h:568:38: error: call to '__compiletime_assert_462' declared with attribute error: BUILD_BUG_ON failed: bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1 drivers/gpu/drm/i915/i915_pmu.c:116:3: note: in expansion of macro 'BUILD_BUG_ON' 116 | BUILD_BUG_ON(bit > As I understand it, the problem is that the function is not always fully inlined, but the __builtin_constant_p() can still evaluate the argument as being constant. Marking it as __always_inline so far works for me in all configurations. Fixes: a7137b1825b5 ("drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled") Fixes: a644fde77ff7 ("drm/i915/pmu: Change bitmask of enabled events to u32") Reviewed-by: Rodrigo Vivi Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250620111824.3395007-1-arnd@kernel.org Signed-off-by: Rodrigo Vivi (cherry picked from commit ef69f9dd1cd7301cdf04ba326ed28152a3affcf6) Signed-off-by: Joonas Lahtinen commit 5e9571750c4e53d16727a04159455c693d7b31cb Author: Pei Xiao Date: Tue Jun 24 17:00:47 2025 +0800 ALSA: usb: qcom: fix NULL pointer dereference in qmi_stop_session The find_substream() call may return NULL, but the error path dereferenced 'subs' unconditionally via dev_err(&subs->dev->dev, ...), causing a NULL pointer dereference when subs is NULL. Fix by switching to &uadev[idx].udev->dev which is always valid in this context. Signed-off-by: Pei Xiao Link: https://patch.msgid.link/86ac2939273ac853535049e60391c09d7688714e.1750755508.git.xiaopei01@kylinos.cn Signed-off-by: Takashi Iwai commit e1d7727b73a1f78035316ac35ee184d477059f0b Author: Pavel Begunkov Date: Tue Jun 24 14:40:35 2025 +0100 io_uring: don't assume uaddr alignment in io_vec_fill_bvec There is no guaranteed alignment for user pointers. Don't use mask trickery and adjust the offset by bv_offset. Cc: stable@vger.kernel.org Reported-by: David Hildenbrand Fixes: 9ef4cbbcb4ac3 ("io_uring: add infra for importing vectored reg buffers") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/io-uring/19530391f5c361a026ac9b401ff8e123bde55d98.1750771718.git.asml.silence@gmail.com/ Signed-off-by: Jens Axboe commit 3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b Author: Pavel Begunkov Date: Tue Jun 24 14:40:34 2025 +0100 io_uring/rsrc: don't rely on user vaddr alignment There is no guaranteed alignment for user pointers, however the calculation of an offset of the first page into a folio after coalescing uses some weird bit mask logic, get rid of it. Cc: stable@vger.kernel.org Reported-by: David Hildenbrand Fixes: a8edbb424b139 ("io_uring/rsrc: enable multi-hugepage buffer coalescing") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/io-uring/e387b4c78b33f231105a601d84eefd8301f57954.1750771718.git.asml.silence@gmail.com/ Signed-off-by: Jens Axboe commit 5afb4bf9fc62d828647647ec31745083637132e4 Author: Pavel Begunkov Date: Tue Jun 24 14:40:33 2025 +0100 io_uring/rsrc: fix folio unpinning syzbot complains about an unmapping failure: [ 108.070381][ T14] kernel BUG at mm/gup.c:71! [ 108.070502][ T14] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP [ 108.123672][ T14] Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20250221-8.fc42 02/21/2025 [ 108.127458][ T14] Workqueue: iou_exit io_ring_exit_work [ 108.174205][ T14] Call trace: [ 108.175649][ T14] sanity_check_pinned_pages+0x7cc/0x7d0 (P) [ 108.178138][ T14] unpin_user_page+0x80/0x10c [ 108.180189][ T14] io_release_ubuf+0x84/0xf8 [ 108.182196][ T14] io_free_rsrc_node+0x250/0x57c [ 108.184345][ T14] io_rsrc_data_free+0x148/0x298 [ 108.186493][ T14] io_sqe_buffers_unregister+0x84/0xa0 [ 108.188991][ T14] io_ring_ctx_free+0x48/0x480 [ 108.191057][ T14] io_ring_exit_work+0x764/0x7d8 [ 108.193207][ T14] process_one_work+0x7e8/0x155c [ 108.195431][ T14] worker_thread+0x958/0xed8 [ 108.197561][ T14] kthread+0x5fc/0x75c [ 108.199362][ T14] ret_from_fork+0x10/0x20 We can pin a tail page of a folio, but then io_uring will try to unpin the head page of the folio. While it should be fine in terms of keeping the page actually alive, mm folks say it's wrong and triggers a debug warning. Use unpin_user_folio() instead of unpin_user_page*. Cc: stable@vger.kernel.org Debugged-by: David Hildenbrand Reported-by: syzbot+1d335893772467199ab6@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/683f1551.050a0220.55ceb.0017.GAE@google.com Fixes: a8edbb424b139 ("io_uring/rsrc: enable multi-hugepage buffer coalescing") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/io-uring/a28b0f87339ac2acf14a645dad1e95bbcbf18acd.1750771718.git.asml.silence@gmail.com/ [axboe: adapt to current tree, massage commit message] Signed-off-by: Jens Axboe commit 4c8a951787ffc4b61a547db9866196104971b5fd Author: Ming Lei Date: Tue Jun 24 18:41:21 2025 +0800 ublk: setup ublk_io correctly in case of ublk_get_data() failure If ublk_get_data() fails, -EIOCBQUEUED is returned and the current command becomes ASYNC. And the only reason is that mapping data can't move on, because of no enough pages or pending signal, then the current ublk request has to be requeued. Once the request need to be requeued, we have to setup `ublk_io` correctly, including io->cmd and flags, otherwise the request may not be forwarded to ublk server successfully. Fixes: 9810362a57cb ("ublk: don't call ublk_dispatch_req() for NEED_GET_DATA") Reported-by: Changhui Zhong Closes: https://lore.kernel.org/linux-block/CAGVVp+VN9QcpHUz_0nasFf5q9i1gi8H8j-G-6mkBoqa3TyjRHA@mail.gmail.com/ Signed-off-by: Ming Lei Tested-by: Changhui Zhong Link: https://lore.kernel.org/r/20250624104121.859519-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 81b4d1a1d03301dcca8af5c58eded9e535f1f6ed Author: Caleb Sander Mateos Date: Sat Jun 21 11:10:14 2025 -0600 ublk: update UBLK_F_SUPPORT_ZERO_COPY comment in UAPI header UBLK_F_SUPPORT_ZERO_COPY has a very old comment describing the initial idea for how zero-copy would be implemented. The actual implementation added in commit 1f6540e2aabb ("ublk: zc register/unregister bvec") uses io_uring registered buffers rather than shared memory mapping. Remove the inaccurate remarks about mapping ublk request memory into the ublk server's address space and requiring 4K block size. Replace them with a description of the current zero-copy mechanism. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250621171015.354932-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 67caa528ae08cd05e485c0ea6aea0baaf6579b06 Author: Caleb Sander Mateos Date: Sat Jun 21 10:28:41 2025 -0600 ublk: fix narrowing warnings in UAPI header When a C++ file compiled with -Wc++11-narrowing includes the UAPI header linux/ublk_cmd.h, ublk_sqe_addr_to_auto_buf_reg()'s assignments of u64 values to u8, u16, and u32 fields result in compiler warnings. Add explicit casts to the intended types to avoid these warnings. Drop the unnecessary bitmasks. Reported-by: Uday Shankar Signed-off-by: Caleb Sander Mateos Fixes: 99c1e4eb6a3f ("ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG") Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250621162842.337452-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 5223372e672eaa576c892984b438875426d8ff2b Author: Ming Lei Date: Mon Jun 23 09:19:27 2025 +0800 selftests: ublk: don't take same backing file for more than one ublk devices Don't use same backing file for more than one ublk devices, and avoid concurrent write on same file from more ublk disks. Fixes: 8ccebc19ee3d ("selftests: ublk: support UBLK_F_AUTO_BUF_REG") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250623011934.741788-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 524346e9d79f63a6e5aaa645140da3d1ec7a8a0f Author: Ming Lei Date: Wed Jun 25 10:25:54 2025 +0800 ublk: build batch from IOs in same io_ring_ctx and io task ublk_queue_cmd_list() dispatches the whole batch list by scheduling task work via the tail request's io_uring_cmd, this way is fine even though more than one io_ring_ctx are involved for this batch since it is just one running context. However, the task work handler ublk_cmd_list_tw_cb() takes `issue_flags` of tail uring_cmd's io_ring_ctx for completing all commands. This way is wrong if any uring_cmd is issued from different io_ring_ctx. Fixes it by always building batch IOs from same io_ring_ctx and io task because ublk_dispatch_req() does validate task context, and IO needs to be aborted in case of running from fallback task work context. For typical per-queue or per-io daemon implementation, this way shouldn't make difference from performance viewpoint, because single io_ring_ctx is taken in each daemon for normal use case. Fixes: d796cea7b9f3 ("ublk: implement ->queue_rqs()") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250625022554.883571-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 021f243627ead17eb6500170256d3d9be787dad8 Author: Bart Van Assche Date: Tue Jun 24 11:16:44 2025 -0700 scsi: ufs: core: Fix spelling of a sysfs attribute name Change "resourse" into "resource" in the name of a sysfs attribute. Fixes: d829fc8a1058 ("scsi: ufs: sysfs: unit descriptor") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250624181658.336035-1-bvanassche@acm.org Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 4937e604ca24c41cae3296d069c871c2f3f519c8 Author: Christoph Hellwig Date: Tue Jun 24 14:52:28 2025 +0200 scsi: core: Enforce unlimited max_segment_size when virt_boundary_mask is set The virt_boundary_mask limit requires an unlimited max_segment_size for bio splitting to not corrupt data. Historically, the block layer tried to validate this, although the check was half-hearted until the addition of the atomic queue limits API. The full blown check then triggered issues with stacked devices incorrectly inheriting limits such as the virt boundary and got disabled in commit b561ea56a264 ("block: allow device to have both virt_boundary_mask and max segment size") instead of fixing the issue properly. Ensure that the SCSI mid layer doesn't set the default low max_segment_size limit for this case, and check for invalid max_segment_size values in the host template, similar to the original block layer check given that SCSI devices can't be stacked. This fixes reported data corruption on storvsc, although as far as I can tell storvsc always failed to properly set the max_segment_size limit as the SCSI APIs historically applied that when setting up the host, while storvsc only set the virt_boundary_mask when configuring the scsi_device. Fixes: 81988a0e6b03 ("storvsc: get rid of bounce buffer") Fixes: b561ea56a264 ("block: allow device to have both virt_boundary_mask and max segment size") Reported-by: Ming Lei Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250624125233.219635-3-hch@lst.de Reviewed-by: John Garry Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 844c6a160e69cc6d1da4b666f8672f6fc5f4f862 Author: Christoph Hellwig Date: Tue Jun 24 14:52:27 2025 +0200 scsi: RDMA/srp: Don't set a max_segment_size when virt_boundary_mask is set virt_boundary_mask implies an unlimited max_segment_size. Setting both can lead to data corruption because __blk_rq_map_sg() can split requests so that the virt_boundary_mask is not respected if max_segment_size is not UINT_MAX. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250624125233.219635-2-hch@lst.de Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Acked-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 8889676cd62161896f1d861ce294adc29c4f2cb5 Author: jackysliu <1972843537@qq.com> Date: Thu Jun 19 12:03:02 2025 +0800 scsi: sd: Fix VPD page 0xb7 length check sd_read_block_limits_ext() currently assumes that vpd->len excludes the size of the page header. However, vpd->len describes the size of the entire VPD page, therefore the sanity check is incorrect. In practice this is not really a problem since we don't attach VPD pages unless they actually report data trailing the header. But fix the length check regardless. This issue was identified by Wukong-Agent (formerly Tencent Woodpecker), a code security AI agent, through static code analysis. [mkp: rewrote patch description] Signed-off-by: jackysliu <1972843537@qq.com> Link: https://lore.kernel.org/r/tencent_ADA5210D1317EEB6CD7F3DE9FE9DA4591D05@qq.com Fixes: 96b171d6dba6 ("scsi: core: Query the Block Limits Extension VPD page") Signed-off-by: Martin K. Petersen commit 9caca6ac0e26cd20efd490d8b3b2ffb1c7c00f6f Author: Yan Zhai Date: Mon Jun 23 09:06:38 2025 -0700 bnxt: properly flush XDP redirect lists We encountered following crash when testing a XDP_REDIRECT feature in production: [56251.579676] list_add corruption. next->prev should be prev (ffff93120dd40f30), but was ffffb301ef3a6740. (next=ffff93120dd 40f30). [56251.601413] ------------[ cut here ]------------ [56251.611357] kernel BUG at lib/list_debug.c:29! [56251.621082] Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [56251.632073] CPU: 111 UID: 0 PID: 0 Comm: swapper/111 Kdump: loaded Tainted: P O 6.12.33-cloudflare-2025.6. 3 #1 [56251.653155] Tainted: [P]=PROPRIETARY_MODULE, [O]=OOT_MODULE [56251.663877] Hardware name: MiTAC GC68B-B8032-G11P6-GPU/S8032GM-HE-CFR, BIOS V7.020.B10-sig 01/22/2025 [56251.682626] RIP: 0010:__list_add_valid_or_report+0x4b/0xa0 [56251.693203] Code: 0e 48 c7 c7 68 e7 d9 97 e8 42 16 fe ff 0f 0b 48 8b 52 08 48 39 c2 74 14 48 89 f1 48 c7 c7 90 e7 d9 97 48 89 c6 e8 25 16 fe ff <0f> 0b 4c 8b 02 49 39 f0 74 14 48 89 d1 48 c7 c7 e8 e7 d9 97 4c 89 [56251.725811] RSP: 0018:ffff93120dd40b80 EFLAGS: 00010246 [56251.736094] RAX: 0000000000000075 RBX: ffffb301e6bba9d8 RCX: 0000000000000000 [56251.748260] RDX: 0000000000000000 RSI: ffff9149afda0b80 RDI: ffff9149afda0b80 [56251.760349] RBP: ffff9131e49c8000 R08: 0000000000000000 R09: ffff93120dd40a18 [56251.772382] R10: ffff9159cf2ce1a8 R11: 0000000000000003 R12: ffff911a80850000 [56251.784364] R13: ffff93120fbc7000 R14: 0000000000000010 R15: ffff9139e7510e40 [56251.796278] FS: 0000000000000000(0000) GS:ffff9149afd80000(0000) knlGS:0000000000000000 [56251.809133] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [56251.819561] CR2: 00007f5e85e6f300 CR3: 00000038b85e2006 CR4: 0000000000770ef0 [56251.831365] PKRU: 55555554 [56251.838653] Call Trace: [56251.845560] [56251.851943] cpu_map_enqueue.cold+0x5/0xa [56251.860243] xdp_do_redirect+0x2d9/0x480 [56251.868388] bnxt_rx_xdp+0x1d8/0x4c0 [bnxt_en] [56251.877028] bnxt_rx_pkt+0x5f7/0x19b0 [bnxt_en] [56251.885665] ? cpu_max_write+0x1e/0x100 [56251.893510] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.902276] __bnxt_poll_work+0x190/0x340 [bnxt_en] [56251.911058] bnxt_poll+0xab/0x1b0 [bnxt_en] [56251.919041] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.927568] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.935958] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.944250] __napi_poll+0x2b/0x160 [56251.951155] bpf_trampoline_6442548651+0x79/0x123 [56251.959262] __napi_poll+0x5/0x160 [56251.966037] net_rx_action+0x3d2/0x880 [56251.973133] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.981265] ? srso_alias_return_thunk+0x5/0xfbef5 [56251.989262] ? __hrtimer_run_queues+0x162/0x2a0 [56251.996967] ? srso_alias_return_thunk+0x5/0xfbef5 [56252.004875] ? srso_alias_return_thunk+0x5/0xfbef5 [56252.012673] ? bnxt_msix+0x62/0x70 [bnxt_en] [56252.019903] handle_softirqs+0xcf/0x270 [56252.026650] irq_exit_rcu+0x67/0x90 [56252.032933] common_interrupt+0x85/0xa0 [56252.039498] [56252.044246] [56252.048935] asm_common_interrupt+0x26/0x40 [56252.055727] RIP: 0010:cpuidle_enter_state+0xb8/0x420 [56252.063305] Code: dc 01 00 00 e8 f9 79 3b ff e8 64 f7 ff ff 49 89 c5 0f 1f 44 00 00 31 ff e8 a5 32 3a ff 45 84 ff 0f 85 ae 01 00 00 fb 45 85 f6 <0f> 88 88 01 00 00 48 8b 04 24 49 63 ce 4c 89 ea 48 6b f1 68 48 29 [56252.088911] RSP: 0018:ffff93120c97fe98 EFLAGS: 00000202 [56252.096912] RAX: ffff9149afd80000 RBX: ffff9141d3a72800 RCX: 0000000000000000 [56252.106844] RDX: 00003329176c6b98 RSI: ffffffe36db3fdc7 RDI: 0000000000000000 [56252.116733] RBP: 0000000000000002 R08: 0000000000000002 R09: 000000000000004e [56252.126652] R10: ffff9149afdb30c4 R11: 071c71c71c71c71c R12: ffffffff985ff860 [56252.136637] R13: 00003329176c6b98 R14: 0000000000000002 R15: 0000000000000000 [56252.146667] ? cpuidle_enter_state+0xab/0x420 [56252.153909] cpuidle_enter+0x2d/0x40 [56252.160360] do_idle+0x176/0x1c0 [56252.166456] cpu_startup_entry+0x29/0x30 [56252.173248] start_secondary+0xf7/0x100 [56252.179941] common_startup_64+0x13e/0x141 [56252.186886] From the crash dump, we found that the cpu_map_flush_list inside redirect info is partially corrupted: its list_head->next points to itself, but list_head->prev points to a valid list of unflushed bq entries. This turned out to be a result of missed XDP flush on redirect lists. By digging in the actual source code, we found that commit 7f0a168b0441 ("bnxt_en: Add completion ring pointer in TX and RX ring structures") incorrectly overwrites the event mask for XDP_REDIRECT in bnxt_rx_xdp. We can stably reproduce this crash by returning XDP_TX and XDP_REDIRECT randomly for incoming packets in a naive XDP program. Properly propagate the XDP_REDIRECT events back fixes the crash. Fixes: a7559bc8c17c ("bnxt: support transmit and free of aggregation buffers") Tested-by: Andrew Rzeznik Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Reviewed-by: Michael Chan Reviewed-by: Andy Gospodarek Link: https://patch.msgid.link/aFl7jpCNzscumuN2@debian.debian Signed-off-by: Jakub Kicinski commit 7595b66ae9de667bf35a8c99e8f1bfc4792e207e Merge: 78f4e737a53e11 fde46f60f6c513 Author: Linus Torvalds Date: Tue Jun 24 17:20:43 2025 -0700 Merge tag 'selinux-pr-20250624' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "Another small SELinux patch to fix a problem seen by the dracut-ng folks during early boot when SELinux is enabled, but the policy has yet to be loaded" * tag 'selinux-pr-20250624' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: change security_compute_sid to return the ssid or tsid on match commit 22bbc1dcd0d6785fb390c41f0dd5b5e218d23bdd Author: Stefano Garzarella Date: Mon Jun 23 12:00:53 2025 +0200 vsock/uapi: fix linux/vm_sockets.h userspace compilation errors If a userspace application just include will fail to build with the following errors: /usr/include/linux/vm_sockets.h:182:39: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr’ 182 | unsigned char svm_zero[sizeof(struct sockaddr) - | ^~~~~~ /usr/include/linux/vm_sockets.h:183:39: error: ‘sa_family_t’ undeclared here (not in a function) 183 | sizeof(sa_family_t) - | Include for userspace (guarded by ifndef __KERNEL__) where `struct sockaddr` and `sa_family_t` are defined. We already do something similar in and . Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Reported-by: Daan De Meyer Signed-off-by: Stefano Garzarella Link: https://patch.msgid.link/20250623100053.40979-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 1f8aede70d491a1d5867f575ca44c86fe2e335ae Author: Kent Overstreet Date: Tue Jun 24 16:04:32 2025 -0400 bcachefs: fix bch2_journal_keys_peek_prev_min() underflow Signed-off-by: Kent Overstreet commit f5109c201cf2bc304a05ecc40c2aabb119b27833 Author: Kent Overstreet Date: Tue Jun 24 17:53:00 2025 -0400 bcachefs: Use wait_on_allocator() when allocating journal wait_on_allocator() emits debug info when we hang trying to allocate. Signed-off-by: Kent Overstreet commit fa7d0f83c5c4223a01598876352473cb3d3bd4d7 Author: Xin Li (Intel) Date: Fri Jun 20 16:15:04 2025 -0700 x86/traps: Initialize DR7 by writing its architectural reset value Initialize DR7 by writing its architectural reset value to always set bit 10, which is reserved to '1', when "clearing" DR7 so as not to trigger unanticipated behavior if said bit is ever unreserved, e.g. as a feature enabling flag with inverted polarity. Signed-off-by: Xin Li (Intel) Signed-off-by: Dave Hansen Reviewed-by: H. Peter Anvin (Intel) Reviewed-by: Sohil Mehta Acked-by: Peter Zijlstra (Intel) Acked-by: Sean Christopherson Tested-by: Sohil Mehta Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250620231504.2676902-3-xin%40zytor.com commit 5f465c148c61e876b6d6eacd8e8e365f2d47758f Author: Xin Li (Intel) Date: Fri Jun 20 16:15:03 2025 -0700 x86/traps: Initialize DR6 by writing its architectural reset value Initialize DR6 by writing its architectural reset value to avoid incorrectly zeroing DR6 to clear DR6.BLD at boot time, which leads to a false bus lock detected warning. The Intel SDM says: 1) Certain debug exceptions may clear bits 0-3 of DR6. 2) BLD induced #DB clears DR6.BLD and any other debug exception doesn't modify DR6.BLD. 3) RTM induced #DB clears DR6.RTM and any other debug exception sets DR6.RTM. To avoid confusion in identifying debug exceptions, debug handlers should set DR6.BLD and DR6.RTM, and clear other DR6 bits before returning. The DR6 architectural reset value 0xFFFF0FF0, already defined as macro DR6_RESERVED, satisfies these requirements, so just use it to reinitialize DR6 whenever needed. Since clear_all_debug_regs() no longer zeros all debug registers, rename it to initialize_debug_regs() to better reflect its current behavior. Since debug_read_clear_dr6() no longer clears DR6, rename it to debug_read_reset_dr6() to better reflect its current behavior. Fixes: ebb1064e7c2e9 ("x86/traps: Handle #DB for bus lock") Reported-by: Sohil Mehta Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li (Intel) Signed-off-by: Dave Hansen Reviewed-by: H. Peter Anvin (Intel) Reviewed-by: Sohil Mehta Acked-by: Peter Zijlstra (Intel) Tested-by: Sohil Mehta Link: https://lore.kernel.org/lkml/06e68373-a92b-472e-8fd9-ba548119770c@intel.com/ Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250620231504.2676902-2-xin%40zytor.com commit 0048ca5e9945f487fc055dad987ee4c7fdc1ed18 Author: Chenyi Qiang Date: Fri Jun 20 14:22:18 2025 +0800 KVM: selftests: Add back the missing check of MONITOR/MWAIT availability The revamp of monitor/mwait test missed the original check of feature availability [*]. If MONITOR/MWAIT is not supported or is disabled by IA32_MISC_ENABLE on the host, executing MONITOR or MWAIT instruction from guest doesn't cause monitor/mwait VM exits, but a #UD. [*] https://lore.kernel.org/all/20240411210237.34646-1-zide.chen@intel.com/ Reported-by: Xuelian Guo Fixes: 80fd663590cf ("selftests: kvm: revamp MONITOR/MWAIT tests") Signed-off-by: Chenyi Qiang Link: https://lore.kernel.org/r/20250620062219.342930-1-chenyi.qiang@intel.com Signed-off-by: Sean Christopherson commit 865ad1dbf13244b349e3da2731c1188476ad17b8 Author: Kent Overstreet Date: Mon Jun 23 18:42:42 2025 -0400 bcachefs: Check for bad write buffer key when moving from journal Signed-off-by: Kent Overstreet commit 5c4acbc8ce9025fe6e318966af8d3c42ffc6e9ca Author: Alan Huang Date: Wed Jun 25 03:10:27 2025 +0800 bcachefs: Don't unlock the trans if ret doesn't match BCH_ERR_operation_blocked Reported-by: syzbot+d540192e763531d307ff@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 47bb584237cc285e3a860b70c01f7bda9dcfb05b Author: Liam Merwick Date: Mon Jun 9 09:11:19 2025 +0000 KVM: Allow CPU to reschedule while setting per-page memory attributes When running an SEV-SNP guest with a sufficiently large amount of memory (1TB+), the host can experience CPU soft lockups when running an operation in kvm_vm_set_mem_attributes() to set memory attributes on the whole range of guest memory. watchdog: BUG: soft lockup - CPU#8 stuck for 26s! [qemu-kvm:6372] CPU: 8 UID: 0 PID: 6372 Comm: qemu-kvm Kdump: loaded Not tainted 6.15.0-rc7.20250520.el9uek.rc1.x86_64 #1 PREEMPT(voluntary) Hardware name: Oracle Corporation ORACLE SERVER E4-2c/Asm,MB Tray,2U,E4-2c, BIOS 78016600 11/13/2024 RIP: 0010:xas_create+0x78/0x1f0 Code: 00 00 00 41 80 fc 01 0f 84 82 00 00 00 ba 06 00 00 00 bd 06 00 00 00 49 8b 45 08 4d 8d 65 08 41 39 d6 73 20 83 ed 06 48 85 c0 <74> 67 48 89 c2 83 e2 03 48 83 fa 02 75 0c 48 3d 00 10 00 00 0f 87 RSP: 0018:ffffad890a34b940 EFLAGS: 00000286 RAX: ffff96f30b261daa RBX: ffffad890a34b9c8 RCX: 0000000000000000 RDX: 000000000000001e RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffad890a356868 R13: ffffad890a356860 R14: 0000000000000000 R15: ffffad890a356868 FS: 00007f5578a2a400(0000) GS:ffff97ed317e1000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f015c70fb18 CR3: 00000001109fd006 CR4: 0000000000f70ef0 PKRU: 55555554 Call Trace: xas_store+0x58/0x630 __xa_store+0xa5/0x130 xa_store+0x2c/0x50 kvm_vm_set_mem_attributes+0x343/0x710 [kvm] kvm_vm_ioctl+0x796/0xab0 [kvm] __x64_sys_ioctl+0xa3/0xd0 do_syscall_64+0x8c/0x7a0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f5578d031bb Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 2d 4c 0f 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe0a742b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000004020aed2 RCX: 00007f5578d031bb RDX: 00007ffe0a742c80 RSI: 000000004020aed2 RDI: 000000000000000b RBP: 0000010000000000 R08: 0000010000000000 R09: 0000017680000000 R10: 0000000000000080 R11: 0000000000000246 R12: 00005575e5f95120 R13: 00007ffe0a742c80 R14: 0000000000000008 R15: 00005575e5f961e0 While looping through the range of memory setting the attributes, call cond_resched() to give the scheduler a chance to run a higher priority task on the runqueue if necessary and avoid staying in kernel mode long enough to trigger the lockup. Fixes: 5a475554db1e ("KVM: Introduce per-page memory attributes") Cc: stable@vger.kernel.org # 6.12.x Suggested-by: Sean Christopherson Signed-off-by: Liam Merwick Reviewed-by: Pankaj Gupta Link: https://lore.kernel.org/r/20250609091121.2497429-2-liam.merwick@oracle.com Signed-off-by: Sean Christopherson commit a7f4dff21fd744d08fa956c243d2b1795f23cbf7 Author: David Woodhouse Date: Thu May 8 13:30:12 2025 -0700 KVM: x86/xen: Allow 'out of range' event channel ports in IRQ routing table. To avoid imposing an ordering constraint on userspace, allow 'invalid' event channel targets to be configured in the IRQ routing table. This is the same as accepting interrupts targeted at vCPUs which don't exist yet, which is already the case for both Xen event channels *and* for MSIs (which don't do any filtering of permitted APIC ID targets at all). If userspace actually *triggers* an IRQ with an invalid target, that will fail cleanly, as kvm_xen_set_evtchn_fast() also does the same range check. If KVM enforced that the IRQ target must be valid at the time it is *configured*, that would force userspace to create all vCPUs and do various other parts of setup (in this case, setting the Xen long_mode) before restoring the IRQ table. Cc: stable@vger.kernel.org Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Link: https://lore.kernel.org/r/e489252745ac4b53f1f7f50570b03fb416aa2065.camel@infradead.org [sean: massage comment] Signed-off-by: Sean Christopherson commit 0b6f4a5f0878c410677a8201c48127fda0bfd843 Author: Sean Christopherson Date: Fri Jun 13 12:39:22 2025 -0700 KVM: x86/hyper-v: Use preallocated per-vCPU buffer for de-sparsified vCPU masks Use a preallocated per-vCPU bitmap for tracking the unpacked set of vCPUs being targeted for Hyper-V's paravirt TLB flushing. If KVM_MAX_NR_VCPUS is set to 4096 (which is allowed even for MAXSMP=n builds), putting the vCPU mask on-stack pushes kvm_hv_flush_tlb() past the default FRAME_WARN limit. arch/x86/kvm/hyperv.c:2001:12: error: stack frame size (1288) exceeds limit (1024) in 'kvm_hv_flush_tlb' [-Werror,-Wframe-larger-than] 2001 | static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc) | ^ 1 error generated. Note, sparse_banks was given the same treatment by commit 7d5e88d301f8 ("KVM: x86: hyper-v: Use preallocated buffer in 'struct kvm_vcpu_hv' instead of on-stack 'sparse_banks'"), for the exact same reason. Reported-by: Abinash Lalotra Closes: https://lore.kernel.org/all/20250613111023.786265-1-abinashsinghlalotra@gmail.com Link: https://lore.kernel.org/all/aEylI-O8kFnFHrOH@google.com Signed-off-by: Sean Christopherson commit 48f15f624189762e7ff2d95bcbb68e21c2d56077 Author: Sean Christopherson Date: Mon Jun 2 15:44:59 2025 -0700 KVM: SVM: Initialize vmsa_pa in VMCB to INVALID_PAGE if VMSA page is NULL When creating an SEV-ES vCPU for intra-host migration, set its vmsa_pa to INVALID_PAGE to harden against doing VMRUN with a bogus VMSA (KVM checks for a valid VMSA page in pre_sev_run()). Cc: Tom Lendacky Reviewed-by: Liam Merwick Tested-by: Liam Merwick Link: https://lore.kernel.org/r/20250602224459.41505-3-seanjc@google.com Signed-off-by: Sean Christopherson commit ecf371f8b02d5e31b9aa1da7f159f1b2107bdb01 Author: Sean Christopherson Date: Mon Jun 2 15:44:58 2025 -0700 KVM: SVM: Reject SEV{-ES} intra host migration if vCPU creation is in-flight Reject migration of SEV{-ES} state if either the source or destination VM is actively creating a vCPU, i.e. if kvm_vm_ioctl_create_vcpu() is in the section between incrementing created_vcpus and online_vcpus. The bulk of vCPU creation runs _outside_ of kvm->lock to allow creating multiple vCPUs in parallel, and so sev_info.es_active can get toggled from false=>true in the destination VM after (or during) svm_vcpu_create(), resulting in an SEV{-ES} VM effectively having a non-SEV{-ES} vCPU. The issue manifests most visibly as a crash when trying to free a vCPU's NULL VMSA page in an SEV-ES VM, but any number of things can go wrong. BUG: unable to handle page fault for address: ffffebde00000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP KASAN NOPTI CPU: 227 UID: 0 PID: 64063 Comm: syz.5.60023 Tainted: G U O 6.15.0-smp-DEV #2 NONE Tainted: [U]=USER, [O]=OOT_MODULE Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.52.0-0 10/28/2024 RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:206 [inline] RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:238 [inline] RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline] RIP: 0010:PageHead include/linux/page-flags.h:866 [inline] RIP: 0010:___free_pages+0x3e/0x120 mm/page_alloc.c:5067 Code: <49> f7 06 40 00 00 00 75 05 45 31 ff eb 0c 66 90 4c 89 f0 4c 39 f0 RSP: 0018:ffff8984551978d0 EFLAGS: 00010246 RAX: 0000777f80000001 RBX: 0000000000000000 RCX: ffffffff918aeb98 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffebde00000000 RBP: 0000000000000000 R08: ffffebde00000007 R09: 1ffffd7bc0000000 R10: dffffc0000000000 R11: fffff97bc0000001 R12: dffffc0000000000 R13: ffff8983e19751a8 R14: ffffebde00000000 R15: 1ffffd7bc0000000 FS: 0000000000000000(0000) GS:ffff89ee661d3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffebde00000000 CR3: 000000793ceaa000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000b5f DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: sev_free_vcpu+0x413/0x630 arch/x86/kvm/svm/sev.c:3169 svm_vcpu_free+0x13a/0x2a0 arch/x86/kvm/svm/svm.c:1515 kvm_arch_vcpu_destroy+0x6a/0x1d0 arch/x86/kvm/x86.c:12396 kvm_vcpu_destroy virt/kvm/kvm_main.c:470 [inline] kvm_destroy_vcpus+0xd1/0x300 virt/kvm/kvm_main.c:490 kvm_arch_destroy_vm+0x636/0x820 arch/x86/kvm/x86.c:12895 kvm_put_kvm+0xb8e/0xfb0 virt/kvm/kvm_main.c:1310 kvm_vm_release+0x48/0x60 virt/kvm/kvm_main.c:1369 __fput+0x3e4/0x9e0 fs/file_table.c:465 task_work_run+0x1a9/0x220 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x7f0/0x25b0 kernel/exit.c:953 do_group_exit+0x203/0x2d0 kernel/exit.c:1102 get_signal+0x1357/0x1480 kernel/signal.c:3034 arch_do_signal_or_restart+0x40/0x690 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x67/0xb0 kernel/entry/common.c:218 do_syscall_64+0x7c/0x150 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f87a898e969 Modules linked in: gq(O) gsmi: Log Shutdown Reason 0x03 CR2: ffffebde00000000 ---[ end trace 0000000000000000 ]--- Deliberately don't check for a NULL VMSA when freeing the vCPU, as crashing the host is likely desirable due to the VMSA being consumed by hardware. E.g. if KVM manages to allow VMRUN on the vCPU, hardware may read/write a bogus VMSA page. Accessing PFN 0 is "fine"-ish now that it's sequestered away thanks to L1TF, but panicking in this scenario is preferable to potentially running with corrupted state. Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Fixes: 0b020f5af092 ("KVM: SEV: Add support for SEV-ES intra host migration") Fixes: b56639318bb2 ("KVM: SEV: Add support for SEV intra host migration") Cc: stable@vger.kernel.org Cc: James Houghton Cc: Peter Gonda Reviewed-by: Liam Merwick Tested-by: Liam Merwick Reviewed-by: James Houghton Link: https://lore.kernel.org/r/20250602224459.41505-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 9a96876e3c6578031fa5dc5dde7759d383b2fb75 Author: Nicolin Chen Date: Tue Jun 24 11:00:48 2025 -0700 iommufd/selftest: Fix build warnings due to uninitialized mfd Commit 869c788909b9 ("selftests: harness: Stop using setjmp()/longjmp()") changed the harness structure. For some unknown reason, two build warnings occur to the iommufd selftest: iommufd.c: In function ‘wrapper_iommufd_mock_domain_all_aligns’: iommufd.c:1807:17: warning: ‘mfd’ may be used uninitialized in this function 1807 | close(mfd); | ^~~~~~~~~~ iommufd.c:1767:13: note: ‘mfd’ was declared here 1767 | int mfd; | ^~~ iommufd.c: In function ‘wrapper_iommufd_mock_domain_all_aligns_copy’: iommufd.c:1870:17: warning: ‘mfd’ may be used uninitialized in this function 1870 | close(mfd); | ^~~~~~~~~~ iommufd.c:1819:13: note: ‘mfd’ was declared here 1819 | int mfd; | ^~~ All the mfd have been used in the variant->file path only, so it's likely a false alarm. FWIW, the commit mentioned above does not cause this, yet it might affect gcc in a certain way that resulted in the warnings. It is also found that ading a dummy setjmp (which doesn't make sense) could mute the warnings: https://lore.kernel.org/all/aEi8DV+ReF3v3Rlf@nvidia.com/ The job of this selftest is to catch kernel bug, while such warnings will unlikely disrupt its role. Mute the warning by force initializing the mfd and add an ASSERT_GT(). Link: https://patch.msgid.link/r/6951d85d5cd34cbf22abab7714542654e63ecc44.1750787928.git.nicolinc@nvidia.com Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe commit a9bf67ee170514b17541038c60bb94cb2cf5732f Author: Nicolin Chen Date: Tue Jun 24 11:00:47 2025 -0700 iommufd/selftest: Add asserts testing global mfd The mfd and mfd_buffer will be used in the tests directly without an extra check. Test them in setup_sizes() to ensure they are safe to use. Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE") Link: https://patch.msgid.link/r/94bdc11d2b6d5db337b1361c5e5fce0ed494bb40.1750787928.git.nicolinc@nvidia.com Cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe commit 4b75e3babb85238912f50bbe0647bae08242a9b6 Author: Nicolin Chen Date: Tue Jun 24 11:00:46 2025 -0700 iommufd/selftest: Add missing close(mfd) in memfd_mmap() Do not forget to close mfd in the error paths, since none of the callers would close it when ASSERT_NE(MAP_FAILED, buf) fails. Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE") Link: https://patch.msgid.link/r/a363a69dbf453d4bc1bde276f3b16778620488e1.1750787928.git.nicolinc@nvidia.com Cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe commit 818625570558cd91082c9bafd6f2b59b73241a69 Author: Nicolin Chen Date: Tue Jun 24 11:00:45 2025 -0700 iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes The hugepage test cases of iommufd_dirty_tracking have the 64MB and 128MB coverages. Both of them are smaller than the default hugepage size 512MB, when CONFIG_PAGE_SIZE_64KB=y. However, these test cases have a variant of using huge pages, which would mmap(MAP_HUGETLB) using these smaller sizes than the system hugepag size. This results in the kernel aligning up the smaller size to 512MB. If a memory was located between the upper 64/128MB size boundary and the hugepage 512MB boundary, it would get wiped out: https://lore.kernel.org/all/aEoUhPYIAizTLADq@nvidia.com/ Given that this aligning up behavior is well documented, we have no choice but to allocate a hugepage aligned size to avoid this unintended wipe out. Instead of relying on the kernel's internal force alignment, pass the same size to posix_memalign() and map(). Also, fix the FIXTURE_TEARDOWN() misusing munmap() to free the memory from posix_memalign(), as munmap() doesn't destroy the allocator meta data. So, call free() instead. Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") Link: https://patch.msgid.link/r/1ea8609ae6d523fdd4d8efb179ddee79c8582cb6.1750787928.git.nicolinc@nvidia.com Cc: stable@vger.kernel.org Suggested-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe commit 9127a69c7193ad47047ff968a2de9161d5c93d37 Author: Karthik Poosa Date: Tue Jun 17 17:30:30 2025 +0530 drm/xe/hwmon: Fix xe_hwmon_power_max_write Prevent other bits of mailbox power limit from being overwritten with 0. This issue was due to a missing read and modify of current power limit, before setting a requested mailbox power limit, which is added in this patch. v2: - Improve commit message. (Anshuman) v3: - Rebase. - Rephrase commit message. (Riana) - Add read-modify-write variant of xe_hwmon_pcode_write_power_limit() i.e. xe_hwmon_pcode_rmw_power_limit(). (Badal) - Use xe_hwmon_pcode_rmw_power_limit() to set mailbox power limits. - Remove xe_hwmon_pcode_write_power_limit() as all mailbox power limits writes use xe_hwmon_pcode_rmw_power_limit() only. v4: - Use PWR_LIM in place of (PWR_LIM_EN | PWR_LIM_VAL) wherever applicable. (Riana) Fixes: 25a2aa779fc3 ("drm/xe/hwmon: Add support to manage power limits though mailbox") Reviewed-by: Riana Tauro Signed-off-by: Karthik Poosa Reviewed-by: Badal Nilawar Link: https://lore.kernel.org/r/20250617120030.612819-1-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 8aa7306631f088881759398972d503757cf0c901) Signed-off-by: Thomas Hellström commit 62207293479e6c03ef498a70f2914c51f4d31d2c Author: Haoxiang Li Date: Fri May 16 15:16:55 2025 +0300 drm/xe/display: Add check for alloc_ordered_workqueue() Add check for the return value of alloc_ordered_workqueue() in xe_display_create() to catch potential exception. Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/4ee1b0e5d1626ce1dde2e82af05c2edaed50c3aa.1747397638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 5b62d63395d5b7d4094e7cd380bccae4b25415cb) Signed-off-by: Thomas Hellström commit b07f349d1864abe29436f45e3047da2bdd476462 Author: Khairul Anuar Romli Date: Mon Jun 16 09:13:53 2025 +0800 spi: spi-cadence-quadspi: Fix pm runtime unbalance Having PM put sync in remove function is causing PM underflow during remove operation. This is caused by the function, runtime_pm_get_sync, not being called anywhere during the op. Ensure that calls to pm_runtime_enable()/pm_runtime_disable() and pm_runtime_get_sync()/pm_runtime_put_sync() match. echo 108d2000.spi > /sys/bus/platform/drivers/cadence-qspi/unbind [ 49.644256] Deleting MTD partitions on "108d2000.spi.0": [ 49.649575] Deleting u-boot MTD partition [ 49.684087] Deleting root MTD partition [ 49.724188] cadence-qspi 108d2000.spi: Runtime PM usage count underflow! Continuous bind/unbind will result in an "Unbalanced pm_runtime_enable" error. Subsequent unbind attempts will return a "No such device" error, while bind attempts will return a "Resource temporarily unavailable" error. [ 47.592434] cadence-qspi 108d2000.spi: Runtime PM usage count underflow! [ 49.592233] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128) [ 53.232309] cadence-qspi 108d2000.spi: Runtime PM usage count underflow! [ 55.828550] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128) [ 57.940627] cadence-qspi 108d2000.spi: Runtime PM usage count underflow! [ 59.912490] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128) [ 61.876243] cadence-qspi 108d2000.spi: Runtime PM usage count underflow! [ 61.883000] platform 108d2000.spi: Unbalanced pm_runtime_enable! [ 532.012270] cadence-qspi 108d2000.spi: probe with driver cadence-qspi failed1 Also, change clk_disable_unprepare() to clk_disable() since continuous bind and unbind operations will trigger a warning indicating that the clock is already unprepared. Fixes: 4892b374c9b7 ("mtd: spi-nor: cadence-quadspi: Add runtime PM support") cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Khairul Anuar Romli Reviewed-by: Matthew Gerlach Link: https://patch.msgid.link/4e7a4b8aba300e629b45a04f90bddf665fbdb335.1749601877.git.khairul.anuar.romli@altera.com Signed-off-by: Mark Brown commit 6c038b58a2dc5a008c7e7a1297f5aaa4deaaaa7e Author: Tamura Dai Date: Mon Jun 16 08:55:48 2025 +0900 ASoC: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak. sof_pdata->tplg_filename can have address allocated by kstrdup() and can be overwritten. Memory leak was detected with kmemleak: unreferenced object 0xffff88812391ff60 (size 16): comm "kworker/4:1", pid 161, jiffies 4294802931 hex dump (first 16 bytes): 73 6f 66 2d 68 64 61 2d 67 65 6e 65 72 69 63 00 sof-hda-generic. backtrace (crc 4bf1675c): __kmalloc_node_track_caller_noprof+0x49c/0x6b0 kstrdup+0x46/0xc0 hda_machine_select.cold+0x1de/0x12cf [snd_sof_intel_hda_generic] sof_init_environment+0x16f/0xb50 [snd_sof] sof_probe_continue+0x45/0x7c0 [snd_sof] sof_probe_work+0x1e/0x40 [snd_sof] process_one_work+0x894/0x14b0 worker_thread+0x5e5/0xfb0 kthread+0x39d/0x760 ret_from_fork+0x31/0x70 ret_from_fork_asm+0x1a/0x30 Signed-off-by: Tamura Dai Link: https://patch.msgid.link/20250615235548.8591-1-kirinode0@gmail.com Signed-off-by: Mark Brown commit 099cf1fbb8afc3771f408109f62bdec66f85160e Author: Andrei Kuchynski Date: Tue Jun 24 13:32:46 2025 +0000 usb: typec: displayport: Fix potential deadlock The deadlock can occur due to a recursive lock acquisition of `cros_typec_altmode_data::mutex`. The call chain is as follows: 1. cros_typec_altmode_work() acquires the mutex 2. typec_altmode_vdm() -> dp_altmode_vdm() -> 3. typec_altmode_exit() -> cros_typec_altmode_exit() 4. cros_typec_altmode_exit() attempts to acquire the mutex again To prevent this, defer the `typec_altmode_exit()` call by scheduling it rather than calling it directly from within the mutex-protected context. Cc: stable Fixes: b4b38ffb38c9 ("usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode") Signed-off-by: Andrei Kuchynski Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250624133246.3936737-1-akuchynski@chromium.org Signed-off-by: Greg Kroah-Hartman commit af4db5a35a4ef7a68046883bfd12468007db38f1 Author: RD Babiera Date: Wed Jun 18 22:49:42 2025 +0000 usb: typec: altmodes/displayport: do not index invalid pin_assignments A poorly implemented DisplayPort Alt Mode port partner can indicate that its pin assignment capabilities are greater than the maximum value, DP_PIN_ASSIGN_F. In this case, calls to pin_assignment_show will cause a BRK exception due to an out of bounds array access. Prevent for loop in pin_assignment_show from accessing invalid values in pin_assignments by adding DP_PIN_ASSIGN_MAX value in typec_dp.h and using i < DP_PIN_ASSIGN_MAX as a loop condition. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable Signed-off-by: RD Babiera Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250618224943.3263103-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 2831a81077f5162f104ba5a97a7d886eb371c21c Author: Pawel Laszczak Date: Fri Jun 20 08:23:12 2025 +0000 usb: cdnsp: Fix issue with CV Bad Descriptor test The SSP2 controller has extra endpoint state preserve bit (ESP) which setting causes that endpoint state will be preserved during Halt Endpoint command. It is used only for EP0. Without this bit the Command Verifier "TD 9.10 Bad Descriptor Test" failed. Setting this bit doesn't have any impact for SSP controller. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Signed-off-by: Pawel Laszczak Acked-by: Peter Chen Link: https://lore.kernel.org/r/PH7PR07MB95382CCD50549DABAEFD6156DD7CA@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit bec15191d52300defa282e3fd83820f69e447116 Author: RD Babiera Date: Wed Jun 18 23:06:04 2025 +0000 usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach This patch fixes Type-C compliance test TD 4.7.6 - Try.SNK DRP Connect SNKAS. tVbusON has a limit of 275ms when entering SRC_ATTACHED. Compliance testers can interpret the TryWait.Src to Attached.Src transition after Try.Snk as being in Attached.Src the entire time, so ~170ms is lost to the debounce timer. Setting the data role can be a costly operation in host mode, and when completed after 100ms can cause Type-C compliance test check TD 4.7.5.V.4 to fail. Turn VBUS on before tcpm_set_roles to meet timing requirement. Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)") Cc: stable Signed-off-by: RD Babiera Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250618230606.3272497-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 6847b3b6e84ef37451c074e6a8db3fbd250c8dbf Author: Takashi Iwai Date: Mon Jun 16 18:08:41 2025 +0200 drm/amd/display: Add sanity checks for drm_edid_raw() When EDID is retrieved via drm_edid_raw(), it doesn't guarantee to return proper EDID bytes the caller wants: it may be either NULL (that leads to an Oops) or with too long bytes over the fixed size raw_edid array (that may lead to memory corruption). The latter was reported actually when connected with a bad adapter. Add sanity checks for drm_edid_raw() to address the above corner cases, and return EDID_BAD_INPUT accordingly. Fixes: 48edb2a4256e ("drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid") Link: https://bugzilla.suse.com/show_bug.cgi?id=1236415 Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher (cherry picked from commit 648d3f4d209725d51900d6a3ed46b7b600140cdf) Cc: stable@vger.kernel.org commit 66abb996999de0d440a02583a6e70c2c24deab45 Author: Mario Limonciello Date: Mon Jun 23 12:11:13 2025 -0500 drm/amd/display: Fix AMDGPU_MAX_BL_LEVEL value [Why] commit 16dc8bc27c2a ("drm/amd/display: Export full brightness range to userspace") adjusted the brightness range to scale to larger values, but missed updating AMDGPU_MAX_BL_LEVEL which is needed to make sure that scaling works properly with custom brightness curves. [How] As the change for max brightness of 0xFFFF only applies to devices supporting DC, use existing DC define MAX_BACKLIGHT_LEVEL. Fixes: 16dc8bc27c2a ("drm/amd/display: Export full brightness range to userspace") Acked-by: Alex Deucher Link: https://lore.kernel.org/r/20250623171114.1156451-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit 5b852044eb0d3e1f1c946d32e05fcb068e0a20a0) Cc: stable@vger.kernel.org commit 31135cc99c40247bec924dcdcd74a58e866c52d8 Author: Alex Deucher Date: Fri Jun 20 11:39:22 2025 -0400 drm/amdgpu/sdma7: add ucode version checks for userq support SDMA 7.0.0/1: 7836028 Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher (cherry picked from commit 8c011408ed842dfccdd50a90a9cf6bccdb85cc0e) commit 899dec4e885f839da2065803e21b7ab003a5c609 Author: Alex Deucher Date: Thu Jun 19 17:56:29 2025 -0400 drm/amdgpu/sdma6: add ucode version checks for userq support SDMA 6.0.0 version 24 SDMA 6.0.2 version 21 SDMA 6.0.3 version 25 Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher (cherry picked from commit e8cca30d8b34f1c4101c237914c53068d4a55e73) commit 73eab78721f7b85216f1ca8c7b732f13213b5b32 Author: Mario Limonciello Date: Tue Jun 17 13:30:52 2025 -0500 drm/amd: Adjust output for discovery error handling commit 017fbb6690c2 ("drm/amdgpu/discovery: check ip_discovery fw file available") added support for reading an amdgpu IP discovery bin file for some specific products. If it's not found then it will fallback to hardcoded values. However if it's not found there is also a lot of noise about missing files and errors. Adjust the error handling to decrease most messages to DEBUG and to show users less about missing files. Reviewed-by: Lijo Lazar Reported-by: Marcus Seyfarth Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4312 Tested-by: Marcus Seyfarth Fixes: 017fbb6690c2 ("drm/amdgpu/discovery: check ip_discovery fw file available") Acked-by: Alex Deucher Link: https://lore.kernel.org/r/20250617183052.1692059-1-superm1@kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit 49f1f9f6c3c9febf8ba93f94a8d9c8d03e1ea0a1) commit 99579c55c3d6132a5236926652c0a72a526b809d Author: Alex Deucher Date: Tue May 20 10:02:14 2025 -0400 drm/amdgpu/mes: add compatibility checks for set_hw_resource_1 Seems some older MES firmware versions do not properly support this packet. Add back some the compatibility checks. v2: switch to fw version check (Shaoyun) Fixes: f81cd793119e ("drm/amd/amdgpu: Fix MES init sequence") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4295 Cc: Shaoyun Liu Reviewed-by: shaoyun.liu Signed-off-by: Alex Deucher (cherry picked from commit 0180e0a5dd5c6ff118043ee42dbbbddaf881f283) Cc: stable@vger.kernel.org commit 0043ec26d827ddb1e85bd9786693152aa6f55d16 Author: Srinivasan Shanmugam Date: Thu Jun 12 20:11:14 2025 +0530 drm/amdgpu/gfx9: Add Cleaner Shader Support for GFX9.x GPUs Enable the cleaner shader for other GFX9.x series of GPUs to provide data isolation between GPU workloads. The cleaner shader is responsible for clearing the Local Data Store (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps prevent data leakage and ensures accurate computation results. This update extends cleaner shader support to GFX9.x GPUs, previously available for GFX9.4.2. It enhances security by clearing GPU memory between processes and maintains a consistent GPU state across KGD and KFD workloads. Cc: Manu Rastogi Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 99808926d0ea6234a89e35240a7cb088368de9e1) commit 09812134071b3941fb81def30b61ed36d3a5dfb5 Author: Yao Zi Date: Mon Jun 23 09:34:45 2025 +0000 dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive The 8250 binding before converting to json-schema states, - clock-frequency : the input clock frequency for the UART or - clocks phandle to refer to the clk used as per Documentation/devicetree for clock-related properties, where "or" indicates these properties shouldn't exist at the same time. Additionally, the behavior of Linux's driver is strange when both clocks and clock-frequency are specified: it ignores clocks and obtains the frequency from clock-frequency, left the specified clocks unclaimed. It may even be disabled, which is undesired most of the time. But "anyOf" doesn't prevent these two properties from coexisting, as it considers the object valid as long as there's at LEAST one match. Let's switch to "oneOf" and disallows the other property if one exists, precisely matching the original binding and avoiding future confusion on the driver's behavior. Fixes: e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema") Cc: stable Signed-off-by: Yao Zi Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250623093445.62327-1-ziyao@disroot.org Signed-off-by: Greg Kroah-Hartman commit f23c52aafb1675ab1d1f46914556d8e29cbbf7b3 Author: Fabio Estevam Date: Thu Jun 19 08:46:17 2025 -0300 serial: imx: Restore original RXTL for console to fix data loss Commit 7a637784d517 ("serial: imx: reduce RX interrupt frequency") introduced a regression on the i.MX6UL EVK board. The issue can be reproduced with the following steps: - Open vi on the board. - Paste a text file (~150 characters). - Save the file, then repeat the process. - Compare the sha256sum of the saved files. The checksums do not match due to missing characters or entire lines. Fix this by restoring the RXTL value to 1 when the UART is used as a console. This ensures timely RX interrupts and reliable data reception in console mode. With this change, pasted content is saved correctly, and checksums are always consistent. Cc: stable Fixes: 7a637784d517 ("serial: imx: reduce RX interrupt frequency") Signed-off-by: Fabio Estevam Reviewed-by: Stefan Wahren Link: https://lore.kernel.org/r/20250619114617.2791939-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0748e553df0225754c316a92af3a77fdc057b358 Author: Al Viro Date: Tue Jun 24 10:25:04 2025 -0400 userns and mnt_idmap leak in open_tree_attr(2) Once want_mount_setattr() has returned a positive, it does require finish_mount_kattr() to release ->mnt_userns. Failing do_mount_setattr() does not change that. As the result, we can end up leaking userns and possibly mnt_idmap as well. Fixes: c4a16820d901 ("fs: add open_tree_attr()") Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 08d82d0cad51c2b1d454fe41ea1ff96ade676961 Author: Hugo Villeneuve Date: Thu May 29 16:29:22 2025 -0400 rtc: pcf2127: add missing semicolon after statement Replace comma with semicolon at the end of the statement when setting config.max_register. Fixes: fd28ceb4603f ("rtc: pcf2127: add variant-specific configuration structure") Cc: stable@vger.kernel.org Cc: Elena Popa Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20250529202923.1552560-1-hugo@hugovil.com Signed-off-by: Alexandre Belloni commit fa78e9b606a472495ef5b6b3d8b45c37f7727f9d Author: Elena Popa Date: Fri May 30 13:40:00 2025 +0300 rtc: pcf2127: fix SPI command byte for PCF2131 PCF2131 was not responding to read/write operations using SPI. PCF2131 has a different command byte definition, compared to PCF2127/29. Added the new command byte definition when PCF2131 is detected. Fixes: afc505bf9039 ("rtc: pcf2127: add support for PCF2131 RTC") Cc: stable@vger.kernel.org Signed-off-by: Elena Popa Acked-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20250530104001.957977-1-elena.popa@nxp.com Signed-off-by: Alexandre Belloni commit d87c3ca0f8f1ca4c25f2ed819e954952f4d8d709 Author: Johannes Berg Date: Tue Jun 24 13:07:49 2025 +0200 wifi: mac80211: finish link init before RCU publish Since the link/conf pointers can be accessed without any protection other than RCU, make sure the data is actually set up before publishing the structures. Fixes: b2e8434f1829 ("wifi: mac80211: set up/tear down client vif links properly") Link: https://patch.msgid.link/20250624130749.9a308b713c74.I4a80f5eead112a38730939ea591d2e275c721256@changeid Signed-off-by: Johannes Berg commit ff21a6ec0f27c126db0a86d96751bd6e5d1d9874 Author: Jack Yu Date: Tue Jun 24 02:59:28 2025 +0000 ASoC: rt721-sdca: fix boost gain calculation error Fix the boost gain calculation error in rt721_sdca_set_gain_get. This patch is specific for "FU33 Boost Volume". Signed-off-by: Jack Yu Link: https://patch.msgid.link/1b18fcde41c64d6fa85451d523c0434a@realtek.com Signed-off-by: Mark Brown commit dcc3bcfc5b50c625b475dcc25d167b6b947a6637 Author: Ulf Hansson Date: Tue Jun 24 13:09:32 2025 +0200 Revert "mmc: sdhci: Disable SD card clock before changing parameters" It has turned out the trying to strictly conform to the SDHCI specification is causing problems. Let's revert and start over. This reverts commit fb3bbc46c94f261b6156ee863c1b06c84cf157dc. Cc: Erick Shepherd Cc: stable@vger.kernel.org Fixes: fb3bbc46c94f ("mmc: sdhci: Disable SD card clock before changing parameters") Suggested-by: Adrian Hunter Reported-by: Jonathan Liu Reported-by: Salvatore Bonaccorso Closes: https://bugs.debian.org/1108065 Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250624110932.176925-1-ulf.hansson@linaro.org commit 1fd26729e013d0c829eb0675d5b6ad77ff497ab3 Merge: c3f429388c192e 1d6123102e9fbe Author: Paolo Abeni Date: Tue Jun 24 12:40:54 2025 +0200 Merge tag 'for-net-2025-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - L2CAP: Fix L2CAP MTU negotiation - hci_core: Fix use-after-free in vhci_flush() - btintel_pcie: Fix potential race condition in firmware download - hci_qca: fix unable to load the BT driver * tag 'for-net-2025-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_core: Fix use-after-free in vhci_flush() driver: bluetooth: hci_qca:fix unable to load the BT driver Bluetooth: L2CAP: Fix L2CAP MTU negotiation Bluetooth: btintel_pcie: Fix potential race condition in firmware download ==================== Link: https://patch.msgid.link/20250623165405.227619-1-luiz.dentz@gmail.com Signed-off-by: Paolo Abeni commit 49b14db035135341f6cf4de7af6ac2cbc8ad29b6 Author: Victor Shih Date: Fri Jun 6 19:01:21 2025 +0800 mmc: sdhci-uhs2: Adjust some error messages and register dump for SD UHS-II card Adjust some error messages to debug mode and register dump to dynamic debug mode to avoid causing misunderstanding it is an error. Signed-off-by: Victor Shih Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-4-victorshihgli@gmail.com Signed-off-by: Ulf Hansson commit 2881ba9af073faa8ee7408a8d1e0575e50eb3f6c Author: Victor Shih Date: Fri Jun 6 19:01:20 2025 +0800 mmc: sdhci: Add a helper function for dump register in dynamic debug mode Add a helper function for dump register in dynamic debug mode. Signed-off-by: Victor Shih Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-3-victorshihgli@gmail.com Signed-off-by: Ulf Hansson commit 14633da0f416fdbb6844d1b295cdc828b666e273 Author: Victor Shih Date: Fri Jun 6 19:01:19 2025 +0800 mmc: core: Adjust some error messages for SD UHS-II cards Adjust some error messages to debug mode to avoid causing misunderstanding it is an error. Signed-off-by: Victor Shih Acked-by: Adrian Hunter Fixes: 9a9f7e13952b ("mmc: core: Support UHS-II card control and access") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-2-victorshihgli@gmail.com Signed-off-by: Ulf Hansson commit dbee298cb7bba3aa112a0265b208f2f3861c5744 Author: Joanne Koong Date: Fri Jun 13 17:01:14 2025 -0700 fuse: fix fuse_fill_write_pages() upper bound calculation This fixes a bug in commit 63c69ad3d18a ("fuse: refactor fuse_fill_write_pages()") where max_pages << PAGE_SHIFT is mistakenly used as the calculation for the max_pages upper limit but there's the possibility that copy_folio_from_iter_atomic() may copy over bytes from the iov_iter that are less than the full length of the folio, which would lead to exceeding max_pages. This commit fixes it by adding a 'ap->num_folios < max_folios' check. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/20250614000114.910380-1-joannelkoong@gmail.com Fixes: 63c69ad3d18a ("fuse: refactor fuse_fill_write_pages()") Tested-by: Brian Foster Reported-by: Brian Foster Closes: https://lore.kernel.org/linux-fsdevel/aEq4haEQScwHIWK6@bfoster/ Signed-off-by: Christian Brauner commit 08f49cdb71f3759368fded4dbc9dde35a404ec2b Author: Slark Xiao Date: Fri Jun 20 11:57:21 2025 +0800 USB: serial: option: add Foxconn T99W640 T99W640 is designed based on Qualconn SDX72 chip. There are 3 serial ports to be enumerated: Diag, NMEA and AT. Test evidence as below: T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=0489 ProdID=e167 Rev=05.15 S: Manufacturer=QCOM S: Product=SDXPINNL USB WWAN Adapter S: SerialNumber=cc1f1d92 C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=88(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms 0&1: MBIM, 2:Modem, 3:GNSS(non-serial port), 4: NMEA, 5:Diag Signed-off-by: Slark Xiao Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 93598167dcb6351ba40449d994244696168f1094 Author: Miri Korenblit Date: Tue Jun 24 10:14:27 2025 +0300 wifi: iwlwifi: mvm: assume '1' as the default mac_config_cmd version Unfortunately, FWs of some devices don't have the version of the iwl_mac_config_cmd defined in the TLVs. We send 0 as the 'def argument to iwl_fw_lookup_cmd_ver, so for such FWs, the return value will be 0, leading to a warning, and to not sending the command. Fix this by assuming that the default version is 1. Fixes: 83f3ac2848b4 ("wifi: iwlwifi: Fix incorrect logic on cmd_ver range checking") Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250624071427.2662621-1-miriam.rachel.korenblit@intel.com commit b272f42547d85356b035e46273ddaf2aa4e161b8 Author: Harshit Mogalapalli Date: Mon Jun 23 07:26:27 2025 -0700 ALSA: qc_audio_offload: Fix missing error code in prepare_qmi_response() When snd_soc_usb_find_priv_data() fails, return failure instead of success. While we are at it also use direct returns at first few error paths where there is no additional cleanup needed. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/Z_40qL4JnyjR4j0O@stanley.mountain/ Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Signed-off-by: Harshit Mogalapalli Link: https://patch.msgid.link/20250623142639.2938056-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Takashi Iwai commit c3f429388c192eeb17aafa17eb315cb01f5d2aa8 Merge: 7544f3f5b0b58c 632f55fa60c481 Author: Paolo Abeni Date: Tue Jun 24 10:10:09 2025 +0200 Merge branch 'af_unix-fix-two-oob-issues' Kuniyuki Iwashima says: ==================== af_unix: Fix two OOB issues. From: Kuniyuki Iwashima Recently, two issues are reported regarding MSG_OOB. Patch 1 fixes issues that happen when multiple consumed OOB skbs are placed consecutively in the recv queue. Patch 2 fixes an inconsistent behaviour that close()ing a socket with a consumed OOB skb at the head of the recv queue triggers -ECONNRESET on the peer's recv(). v1: https://lore.kernel.org/netdev/20250618043453.281247-1-kuni1840@gmail.com/ ==================== Link: https://patch.msgid.link/20250619041457.1132791-1-kuni1840@gmail.com Signed-off-by: Paolo Abeni commit 632f55fa60c481035297739ecd374d945c9b32c7 Author: Kuniyuki Iwashima Date: Wed Jun 18 21:13:58 2025 -0700 selftest: af_unix: Add tests for -ECONNRESET. A new function resetpair() calls close() for the receiver and checks the return value from recv() on the initial sender side. Now resetpair() is added to each test case and some additional test cases. Note that TCP sets -ECONNRESET to the consumed OOB, but we have decided not to touch TCP MSG_OOB code in the past. Before: # RUN msg_oob.no_peek.ex_oob_ex_oob ... # msg_oob.c:236:ex_oob_ex_oob:AF_UNIX :Connection reset by peer # msg_oob.c:237:ex_oob_ex_oob:Expected: # msg_oob.c:239:ex_oob_ex_oob:Expected ret[0] (-1) == expected_len (0) # ex_oob_ex_oob: Test terminated by assertion # FAIL msg_oob.no_peek.ex_oob_ex_oob not ok 14 msg_oob.no_peek.ex_oob_ex_oob ... # FAILED: 36 / 48 tests passed. # Totals: pass:36 fail:12 xfail:0 xpass:0 skip:0 error:0 After: # RUN msg_oob.no_peek.ex_oob_ex_oob ... # msg_oob.c:244:ex_oob_ex_oob:AF_UNIX : # msg_oob.c:245:ex_oob_ex_oob:TCP :Connection reset by peer # OK msg_oob.no_peek.ex_oob_ex_oob ok 14 msg_oob.no_peek.ex_oob_ex_oob ... # PASSED: 48 / 48 tests passed. # Totals: pass:48 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250619041457.1132791-5-kuni1840@gmail.com Signed-off-by: Paolo Abeni commit 2a5a4841846b079b5fca5752fe94e59346fbda40 Author: Kuniyuki Iwashima Date: Wed Jun 18 21:13:57 2025 -0700 af_unix: Don't set -ECONNRESET for consumed OOB skb. Christian Brauner reported that even after MSG_OOB data is consumed, calling close() on the receiver socket causes the peer's recv() to return -ECONNRESET: 1. send() and recv() an OOB data. >>> from socket import * >>> s1, s2 = socketpair(AF_UNIX, SOCK_STREAM) >>> s1.send(b'x', MSG_OOB) 1 >>> s2.recv(1, MSG_OOB) b'x' 2. close() for s2 sets ECONNRESET to s1->sk_err even though s2 consumed the OOB data >>> s2.close() >>> s1.recv(10, MSG_DONTWAIT) ... ConnectionResetError: [Errno 104] Connection reset by peer Even after being consumed, the skb holding the OOB 1-byte data stays in the recv queue to mark the OOB boundary and break recv() at that point. This must be considered while close()ing a socket. Let's skip the leading consumed OOB skb while checking the -ECONNRESET condition in unix_release_sock(). Fixes: 314001f0bf92 ("af_unix: Add OOB support") Reported-by: Christian Brauner Closes: https://lore.kernel.org/netdev/20250529-sinkt-abfeuern-e7b08200c6b0@brauner/ Signed-off-by: Kuniyuki Iwashima Acked-by: Christian Brauner Link: https://patch.msgid.link/20250619041457.1132791-4-kuni1840@gmail.com Signed-off-by: Paolo Abeni commit e1ca44e85f652a6ebd657c67c394894c1fdfb403 Author: Kuniyuki Iwashima Date: Wed Jun 18 21:13:56 2025 -0700 af_unix: Add test for consecutive consumed OOB. Let's add a test case where consecutive concumed OOB skbs stay at the head of the queue. Without the previous patch, ioctl(SIOCATMARK) assertion fails. Before: # RUN msg_oob.no_peek.ex_oob_ex_oob_oob ... # msg_oob.c:305:ex_oob_ex_oob_oob:Expected answ[0] (0) == oob_head (1) # ex_oob_ex_oob_oob: Test terminated by assertion # FAIL msg_oob.no_peek.ex_oob_ex_oob_oob not ok 12 msg_oob.no_peek.ex_oob_ex_oob_oob After: # RUN msg_oob.no_peek.ex_oob_ex_oob_oob ... # OK msg_oob.no_peek.ex_oob_ex_oob_oob ok 12 msg_oob.no_peek.ex_oob_ex_oob_oob Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250619041457.1132791-3-kuni1840@gmail.com Signed-off-by: Paolo Abeni commit 32ca245464e1479bfea8592b9db227fdc1641705 Author: Kuniyuki Iwashima Date: Wed Jun 18 21:13:55 2025 -0700 af_unix: Don't leave consecutive consumed OOB skbs. Jann Horn reported a use-after-free in unix_stream_read_generic(). The following sequences reproduce the issue: $ python3 from socket import * s1, s2 = socketpair(AF_UNIX, SOCK_STREAM) s1.send(b'x', MSG_OOB) s2.recv(1, MSG_OOB) # leave a consumed OOB skb s1.send(b'y', MSG_OOB) s2.recv(1, MSG_OOB) # leave a consumed OOB skb s1.send(b'z', MSG_OOB) s2.recv(1) # recv 'z' illegally s2.recv(1, MSG_OOB) # access 'z' skb (use-after-free) Even though a user reads OOB data, the skb holding the data stays on the recv queue to mark the OOB boundary and break the next recv(). After the last send() in the scenario above, the sk2's recv queue has 2 leading consumed OOB skbs and 1 real OOB skb. Then, the following happens during the next recv() without MSG_OOB 1. unix_stream_read_generic() peeks the first consumed OOB skb 2. manage_oob() returns the next consumed OOB skb 3. unix_stream_read_generic() fetches the next not-yet-consumed OOB skb 4. unix_stream_read_generic() reads and frees the OOB skb , and the last recv(MSG_OOB) triggers KASAN splat. The 3. above occurs because of the SO_PEEK_OFF code, which does not expect unix_skb_len(skb) to be 0, but this is true for such consumed OOB skbs. while (skip >= unix_skb_len(skb)) { skip -= unix_skb_len(skb); skb = skb_peek_next(skb, &sk->sk_receive_queue); ... } In addition to this use-after-free, there is another issue that ioctl(SIOCATMARK) does not function properly with consecutive consumed OOB skbs. So, nothing good comes out of such a situation. Instead of complicating manage_oob(), ioctl() handling, and the next ECONNRESET fix by introducing a loop for consecutive consumed OOB skbs, let's not leave such consecutive OOB unnecessarily. Now, while receiving an OOB skb in unix_stream_recv_urg(), if its previous skb is a consumed OOB skb, it is freed. [0]: BUG: KASAN: slab-use-after-free in unix_stream_read_actor (net/unix/af_unix.c:3027) Read of size 4 at addr ffff888106ef2904 by task python3/315 CPU: 2 UID: 0 PID: 315 Comm: python3 Not tainted 6.16.0-rc1-00407-gec315832f6f9 #8 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-4.fc42 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:122) print_report (mm/kasan/report.c:409 mm/kasan/report.c:521) kasan_report (mm/kasan/report.c:636) unix_stream_read_actor (net/unix/af_unix.c:3027) unix_stream_read_generic (net/unix/af_unix.c:2708 net/unix/af_unix.c:2847) unix_stream_recvmsg (net/unix/af_unix.c:3048) sock_recvmsg (net/socket.c:1063 (discriminator 20) net/socket.c:1085 (discriminator 20)) __sys_recvfrom (net/socket.c:2278) __x64_sys_recvfrom (net/socket.c:2291 (discriminator 1) net/socket.c:2287 (discriminator 1) net/socket.c:2287 (discriminator 1)) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) RIP: 0033:0x7f8911fcea06 Code: 5d e8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 75 19 83 e2 39 83 fa 08 75 11 e8 26 ff ff ff 66 0f 1f 44 00 00 48 8b 45 10 0f 05 <48> 8b 5d f8 c9 c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 e5 48 83 ec 08 RSP: 002b:00007fffdb0dccb0 EFLAGS: 00000202 ORIG_RAX: 000000000000002d RAX: ffffffffffffffda RBX: 00007fffdb0dcdc8 RCX: 00007f8911fcea06 RDX: 0000000000000001 RSI: 00007f8911a5e060 RDI: 0000000000000006 RBP: 00007fffdb0dccd0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000202 R12: 00007f89119a7d20 R13: ffffffffc4653600 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 315: kasan_save_stack (mm/kasan/common.c:48) kasan_save_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1)) __kasan_slab_alloc (mm/kasan/common.c:348) kmem_cache_alloc_node_noprof (./include/linux/kasan.h:250 mm/slub.c:4148 mm/slub.c:4197 mm/slub.c:4249) __alloc_skb (net/core/skbuff.c:660 (discriminator 4)) alloc_skb_with_frags (./include/linux/skbuff.h:1336 net/core/skbuff.c:6668) sock_alloc_send_pskb (net/core/sock.c:2993) unix_stream_sendmsg (./include/net/sock.h:1847 net/unix/af_unix.c:2256 net/unix/af_unix.c:2418) __sys_sendto (net/socket.c:712 (discriminator 20) net/socket.c:727 (discriminator 20) net/socket.c:2226 (discriminator 20)) __x64_sys_sendto (net/socket.c:2233 (discriminator 1) net/socket.c:2229 (discriminator 1) net/socket.c:2229 (discriminator 1)) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Freed by task 315: kasan_save_stack (mm/kasan/common.c:48) kasan_save_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1)) kasan_save_free_info (mm/kasan/generic.c:579 (discriminator 1)) __kasan_slab_free (mm/kasan/common.c:271) kmem_cache_free (mm/slub.c:4643 (discriminator 3) mm/slub.c:4745 (discriminator 3)) unix_stream_read_generic (net/unix/af_unix.c:3010) unix_stream_recvmsg (net/unix/af_unix.c:3048) sock_recvmsg (net/socket.c:1063 (discriminator 20) net/socket.c:1085 (discriminator 20)) __sys_recvfrom (net/socket.c:2278) __x64_sys_recvfrom (net/socket.c:2291 (discriminator 1) net/socket.c:2287 (discriminator 1) net/socket.c:2287 (discriminator 1)) do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) The buggy address belongs to the object at ffff888106ef28c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 68 bytes inside of freed 224-byte region [ffff888106ef28c0, ffff888106ef29a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888106ef3cc0 pfn:0x106ef2 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff8881001d28c0 ffffea000422fe00 0000000000000004 raw: ffff888106ef3cc0 0000000080190010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff8881001d28c0 ffffea000422fe00 0000000000000004 head: ffff888106ef3cc0 0000000080190010 00000000f5000000 0000000000000000 head: 0200000000000001 ffffea00041bbc81 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888106ef2800: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888106ef2880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff888106ef2900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888106ef2980: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff888106ef2a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 314001f0bf92 ("af_unix: Add OOB support") Reported-by: Jann Horn Signed-off-by: Kuniyuki Iwashima Reviewed-by: Jann Horn Link: https://patch.msgid.link/20250619041457.1132791-2-kuni1840@gmail.com Signed-off-by: Paolo Abeni commit 7a3750ff0f2e8fee338a9c168f429f6c37f0e820 Author: Lachlan Hodges Date: Sat Jun 21 22:32:09 2025 +1000 wifi: mac80211: fix beacon interval calculation overflow As we are converting from TU to usecs, a beacon interval of 100*1024 usecs will lead to integer wrapping. To fix change to use a u32. Fixes: 057d5f4ba1e4 ("mac80211: sync dtim_count to TSF") Signed-off-by: Lachlan Hodges Link: https://patch.msgid.link/20250621123209.511796-1-lachlan.hodges@morsemicro.com Signed-off-by: Johannes Berg commit 0e7facea6da2bd360361440786785752aa5b0e30 Author: Arnd Bergmann Date: Fri Jun 20 13:39:42 2025 +0200 wifi: iwlegacy: work around excessive stack usage on clang/kasan In some rare randconfig builds, I seem to trigger a bug in clang where it unrolls a loop but then runs out of registers, which then get spilled to the stack: net/wireless/intel/iwlegacy/4965-rs.c:2262:1: error: stack frame size (1696) exceeds limit (1280) in 'il4965_rs_rate_init' [-Werror,-Wframe-larger-than] This seems to be the same one I saw in the omapdrm driver, and there is an easy workaround by not inlining the il4965_rs_rate_scale_clear_win function. Link: https://github.com/llvm/llvm-project/issues/143908 Signed-off-by: Arnd Bergmann Acked-by: Stanislaw Gruszka Link: https://patch.msgid.link/20250620113946.3987160-1-arnd@kernel.org Signed-off-by: Johannes Berg commit 190113989ae01da7f5925877815a3ac75856d9ed Merge: aa485e8789d56a b8a205486ed5c0 Author: Alexei Starovoitov Date: Mon Jun 23 21:50:44 2025 -0700 Merge branch 'bpf-specify-access-type-of-bpf_sysctl_get_name-args' Jerome Marchand says: ==================== bpf: Specify access type of bpf_sysctl_get_name args The second argument of bpf_sysctl_get_name() helper is a pointer to a buffer that is being written to. However that isn't specify in the prototype. Until commit 37cce22dbd51a ("bpf: verifier: Refactor helper access type tracking") that mistake was hidden by the way the verifier treated helper accesses. Since then, the verifier, working on wrong infromation from the prototype, can make faulty optimization that would had been caught by the test_sysctl selftests if it was run by the CI. The first patch fixes bpf_sysctl_get_name prototype. The second patch converts the test_sysctl to prog_tests so that it will be run by the CI and catch similar issues in the future. Changes in v3: - Use ASSERT* macro instead of CHECK_FAIL. - Remove useless code. Changes in v2: - Replace ARG_PTR_TO_UNINIT_MEM by ARG_PTR_TO_MEM | MEM_WRITE. - Converts test_sysctl to prog_tests. ==================== Link: https://patch.msgid.link/20250619140603.148942-1-jmarchan@redhat.com Signed-off-by: Alexei Starovoitov commit b8a205486ed5c0c5c0386e472157a81ce686af25 Author: Jerome Marchand Date: Thu Jun 19 16:06:03 2025 +0200 selftests/bpf: Convert test_sysctl to prog_tests Convert test_sysctl test to prog_tests with minimal change to the tests themselves. Signed-off-by: Jerome Marchand Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20250619140603.148942-3-jmarchan@redhat.com Signed-off-by: Alexei Starovoitov commit 2eb7648558a7911f2208e8940cd22ca40e93cc76 Author: Jerome Marchand Date: Thu Jun 19 16:06:02 2025 +0200 bpf: Specify access type of bpf_sysctl_get_name args The second argument of bpf_sysctl_get_name() helper is a pointer to a buffer that is being written to. However that isn't specify in the prototype. Until commit 37cce22dbd51a ("bpf: verifier: Refactor helper access type tracking"), all helper accesses were considered as a possible write access by the verifier, so no big harm was done. However, since then, the verifier might make wrong asssumption about the content of that address which might lead it to make faulty optimizations (such as removing code that was wrongly labeled dead). This is what happens in test_sysctl selftest to the tests related to sysctl_get_name. Add MEM_WRITE flag the second argument of bpf_sysctl_get_name(). Signed-off-by: Jerome Marchand Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20250619140603.148942-2-jmarchan@redhat.com Signed-off-by: Alexei Starovoitov commit 7544f3f5b0b58c396f374d060898b5939da31709 Author: Ido Schimmel Date: Thu Jun 19 21:22:28 2025 +0300 bridge: mcast: Fix use-after-free during router port configuration The bridge maintains a global list of ports behind which a multicast router resides. The list is consulted during forwarding to ensure multicast packets are forwarded to these ports even if the ports are not member in the matching MDB entry. When per-VLAN multicast snooping is enabled, the per-port multicast context is disabled on each port and the port is removed from the global router port list: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 # ip link add name dummy1 up master br1 type dummy # ip link set dev dummy1 type bridge_slave mcast_router 2 $ bridge -d mdb show | grep router router ports on br1: dummy1 # ip link set dev br1 type bridge mcast_vlan_snooping 1 $ bridge -d mdb show | grep router However, the port can be re-added to the global list even when per-VLAN multicast snooping is enabled: # ip link set dev dummy1 type bridge_slave mcast_router 0 # ip link set dev dummy1 type bridge_slave mcast_router 2 $ bridge -d mdb show | grep router router ports on br1: dummy1 Since commit 4b30ae9adb04 ("net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions"), when per-VLAN multicast snooping is enabled, multicast disablement on a port will disable the per-{port, VLAN} multicast contexts and not the per-port one. As a result, a port will remain in the global router port list even after it is deleted. This will lead to a use-after-free [1] when the list is traversed (when adding a new port to the list, for example): # ip link del dev dummy1 # ip link add name dummy2 up master br1 type dummy # ip link set dev dummy2 type bridge_slave mcast_router 2 Similarly, stale entries can also be found in the per-VLAN router port list. When per-VLAN multicast snooping is disabled, the per-{port, VLAN} contexts are disabled on each port and the port is removed from the per-VLAN router port list: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 # ip link add name dummy1 up master br1 type dummy # bridge vlan add vid 2 dev dummy1 # bridge vlan global set vid 2 dev br1 mcast_snooping 1 # bridge vlan set vid 2 dev dummy1 mcast_router 2 $ bridge vlan global show dev br1 vid 2 | grep router router ports: dummy1 # ip link set dev br1 type bridge mcast_vlan_snooping 0 $ bridge vlan global show dev br1 vid 2 | grep router However, the port can be re-added to the per-VLAN list even when per-VLAN multicast snooping is disabled: # bridge vlan set vid 2 dev dummy1 mcast_router 0 # bridge vlan set vid 2 dev dummy1 mcast_router 2 $ bridge vlan global show dev br1 vid 2 | grep router router ports: dummy1 When the VLAN is deleted from the port, the per-{port, VLAN} multicast context will not be disabled since multicast snooping is not enabled on the VLAN. As a result, the port will remain in the per-VLAN router port list even after it is no longer member in the VLAN. This will lead to a use-after-free [2] when the list is traversed (when adding a new port to the list, for example): # ip link add name dummy2 up master br1 type dummy # bridge vlan add vid 2 dev dummy2 # bridge vlan del vid 2 dev dummy1 # bridge vlan set vid 2 dev dummy2 mcast_router 2 Fix these issues by removing the port from the relevant (global or per-VLAN) router port list in br_multicast_port_ctx_deinit(). The function is invoked during port deletion with the per-port multicast context and during VLAN deletion with the per-{port, VLAN} multicast context. Note that deleting the multicast router timer is not enough as it only takes care of the temporary multicast router states (1 or 3) and not the permanent one (2). [1] BUG: KASAN: slab-out-of-bounds in br_multicast_add_router.part.0+0x3f1/0x560 Write of size 8 at addr ffff888004a67328 by task ip/384 [...] Call Trace: dump_stack_lvl+0x6f/0xa0 print_address_description.constprop.0+0x6f/0x350 print_report+0x108/0x205 kasan_report+0xdf/0x110 br_multicast_add_router.part.0+0x3f1/0x560 br_multicast_set_port_router+0x74e/0xac0 br_setport+0xa55/0x1870 br_port_slave_changelink+0x95/0x120 __rtnl_newlink+0x5e8/0xa40 rtnl_newlink+0x627/0xb00 rtnetlink_rcv_msg+0x6fb/0xb70 netlink_rcv_skb+0x11f/0x350 netlink_unicast+0x426/0x710 netlink_sendmsg+0x75a/0xc20 __sock_sendmsg+0xc1/0x150 ____sys_sendmsg+0x5aa/0x7b0 ___sys_sendmsg+0xfc/0x180 __sys_sendmsg+0x124/0x1c0 do_syscall_64+0xbb/0x360 entry_SYSCALL_64_after_hwframe+0x4b/0x53 [2] BUG: KASAN: slab-use-after-free in br_multicast_add_router.part.0+0x378/0x560 Read of size 8 at addr ffff888009f00840 by task bridge/391 [...] Call Trace: dump_stack_lvl+0x6f/0xa0 print_address_description.constprop.0+0x6f/0x350 print_report+0x108/0x205 kasan_report+0xdf/0x110 br_multicast_add_router.part.0+0x378/0x560 br_multicast_set_port_router+0x6f9/0xac0 br_vlan_process_options+0x8b6/0x1430 br_vlan_rtm_process_one+0x605/0xa30 br_vlan_rtm_process+0x396/0x4c0 rtnetlink_rcv_msg+0x2f7/0xb70 netlink_rcv_skb+0x11f/0x350 netlink_unicast+0x426/0x710 netlink_sendmsg+0x75a/0xc20 __sock_sendmsg+0xc1/0x150 ____sys_sendmsg+0x5aa/0x7b0 ___sys_sendmsg+0xfc/0x180 __sys_sendmsg+0x124/0x1c0 do_syscall_64+0xbb/0x360 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fixes: 2796d846d74a ("net: bridge: vlan: convert mcast router global option to per-vlan entry") Fixes: 4b30ae9adb04 ("net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions") Reported-by: syzbot+7bfa4b72c6a5da128d32@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/684c18bd.a00a0220.279073.000b.GAE@google.com/T/ Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250619182228.1656906-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit d5e3241c5a386a2425823c8c7afb77a465bd040f Author: Thomas Fourier Date: Thu Jun 19 11:45:30 2025 +0200 ethernet: ionic: Fix DMA mapping tests Change error values of `ionic_tx_map_single()` and `ionic_tx_map_frag()` from 0 to `DMA_MAPPING_ERROR` to prevent collision with 0 as a valid address. This also fixes the use of `dma_mapping_error()` to test against 0 in `ionic_xdp_post_frame()` Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Fixes: 56e41ee12d2d ("ionic: better dma-map error handling") Fixes: ac8813c0ab7d ("ionic: convert Rx queue buffers to use page_pool") Signed-off-by: Thomas Fourier Reviewed-by: Brett Creeley Link: https://patch.msgid.link/20250619094538.283723-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski commit c5136add3f9b4c23b8bbe5f4d722c95d4cfb936e Author: Klara Modin Date: Tue Jun 17 14:58:47 2025 +0200 riscv: export boot_cpu_hartid The mailbox controller driver for the Microchip Inter-processor Communication can be built as a module. It uses cpuid_to_hartid_map and commit 4783ce32b080 ("riscv: export __cpuid_to_hartid_map") enables that to work for SMP. However, cpuid_to_hartid_map uses boot_cpu_hartid on non-SMP kernels and this driver can be useful in such configurations[1]. Export boot_cpu_hartid so the driver can be built as a module on non-SMP kernels as well. Link: https://lore.kernel.org/lkml/20250617-confess-reimburse-876101e099cb@spud/ [1] Cc: stable@vger.kernel.org Fixes: e4b1d67e7141 ("mailbox: add Microchip IPC support") Signed-off-by: Klara Modin Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250617125847.23829-1-klarasmodin@gmail.com Signed-off-by: Palmer Dabbelt commit 890ba5be6335dbbbc99af14ea007befb5f83f174 Author: Nam Cao Date: Thu Jun 19 17:58:58 2025 +0200 Revert "riscv: Define TASK_SIZE_MAX for __access_ok()" This reverts commit ad5643cf2f69 ("riscv: Define TASK_SIZE_MAX for __access_ok()"). This commit changes TASK_SIZE_MAX to be LONG_MAX to optimize access_ok(), because the previous TASK_SIZE_MAX (default to TASK_SIZE) requires some computation. The reasoning was that all user addresses are less than LONG_MAX, and all kernel addresses are greater than LONG_MAX. Therefore access_ok() can filter kernel addresses. Addresses between TASK_SIZE and LONG_MAX are not valid user addresses, but access_ok() let them pass. That was thought to be okay, because they are not valid addresses at hardware level. Unfortunately, one case is missed: get_user_pages_fast() happily accepts addresses between TASK_SIZE and LONG_MAX. futex(), for instance, uses get_user_pages_fast(). This causes the problem reported by Robert [1]. Therefore, revert this commit. TASK_SIZE_MAX is changed to the default: TASK_SIZE. This unfortunately reduces performance, because TASK_SIZE is more expensive to compute compared to LONG_MAX. But correctness first, we can think about optimization later, if required. Reported-by: Closes: https://lore.kernel.org/linux-riscv/77605.1750245028@localhost/ Signed-off-by: Nam Cao Cc: stable@vger.kernel.org Reviewed-by: Alexandre Ghiti Fixes: ad5643cf2f69 ("riscv: Define TASK_SIZE_MAX for __access_ok()") Link: https://lore.kernel.org/r/20250619155858.1249789-1-namcao@linutronix.de Signed-off-by: Palmer Dabbelt commit b0843f836126c980fb31923563c86ec52e8b9514 Author: Alexandre Ghiti Date: Fri Jun 20 12:08:11 2025 +0000 riscv: Fix sparse warning in vendor_extensions/sifive.c sparse reports the following warning: arch/riscv/kernel/vendor_extensions/sifive.c:11:33: sparse: sparse: symbol 'riscv_isa_vendor_ext_sifive' was not declared. Should it be static? So as this struct is only used in this file, make it static. Fixes: 2d147d77ae6e ("riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505072100.TZlEp8h1-lkp@intel.com/ Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250620-dev-alex-fix_sparse_sifive_v1-v1-1-efa3a6f93846@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2f73c62d4e13df67380ff6faca39eec2bf08dd93 Author: Nam Cao Date: Fri Jun 20 13:09:39 2025 +0200 Revert "riscv: misaligned: fix sleeping function called during misaligned access handling" This reverts commit 61a74ad25462 ("riscv: misaligned: fix sleeping function called during misaligned access handling"). The commit addresses a sleeping in atomic context problem, but it is not the correct fix as explained by Clément: "Using nofault would lead to failure to read from user memory that is paged out for instance. This is not really acceptable, we should handle user misaligned access even at an address that would generate a page fault." This bug has been properly fixed by commit 453805f0a28f ("riscv: misaligned: enable IRQs while handling misaligned accesses"). Revert this improper fix. Link: https://lore.kernel.org/linux-riscv/b779beed-e44e-4a5e-9551-4647682b0d21@rivosinc.com/ Signed-off-by: Nam Cao Cc: stable@vger.kernel.org Reviewed-by: Clément Léger Reviewed-by: Alexandre Ghiti Fixes: 61a74ad25462 ("riscv: misaligned: fix sleeping function called during misaligned access handling") Link: https://lore.kernel.org/r/20250620110939.1642735-1-namcao@linutronix.de Signed-off-by: Palmer Dabbelt commit 00a39d8652ff9088de07a6fe6e9e1893452fe0dd Author: Mateusz Jończyk Date: Sat Jun 7 23:06:08 2025 +0200 rtc: cmos: use spin_lock_irqsave in cmos_interrupt cmos_interrupt() can be called in a non-interrupt context, such as in an ACPI event handler (which runs in an interrupt thread). Therefore, usage of spin_lock(&rtc_lock) is insecure. Use spin_lock_irqsave() / spin_unlock_irqrestore() instead. Before a misguided commit 6950d046eb6e ("rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ") the cmos_interrupt() function used spin_lock_irqsave(). That commit changed it to spin_lock() and broke locking, which was partially fixed in commit 13be2efc390a ("rtc: cmos: Disable irq around direct invocation of cmos_interrupt()") That second commit did not take account of the ACPI fixed event handler pathway, however. It introduced local_irq_disable() workarounds in cmos_check_wkalrm(), which can cause problems on PREEMPT_RT kernels and are now unnecessary. Add an explicit comment so that this change will not be reverted by mistake. Cc: stable@vger.kernel.org Fixes: 6950d046eb6e ("rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ") Signed-off-by: Mateusz Jończyk Reviewed-by: Sebastian Andrzej Siewior Tested-by: Chris Bainbridge Reported-by: Chris Bainbridge Closes: https://lore.kernel.org/all/aDtJ92foPUYmGheF@debian.local/ Link: https://lore.kernel.org/r/20250607210608.14835-1-mat.jonczyk@o2.pl Signed-off-by: Alexandre Belloni commit 10357824151262636fda879845f8b64553541106 Author: Chaoyi Chen Date: Fri Jun 20 09:16:16 2025 +0800 drm/bridge-connector: Fix bridge in drm_connector_hdmi_audio_init() The bridge used in drm_connector_hdmi_audio_init() does not correctly point to the required audio bridge, which lead to incorrect audio configuration input. Fixes: 231adeda9f67 ("drm/bridge-connector: hook DisplayPort audio support") Signed-off-by: Chaoyi Chen Reviewed-by: Dmitry Baryshkov Tested-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250620011616.118-1-kernel@airkyi.com Signed-off-by: Dmitry Baryshkov commit 78f4e737a53e1163ded2687a922fce138aee73f5 Merge: cb0de0e220d223 db53805156f1e0 Author: Linus Torvalds Date: Mon Jun 23 15:02:57 2025 -0700 Merge tag 'for-6.16/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mikulas Patocka: - dm-crypt: fix a crash on 32-bit machines - dm-raid: replace "rdev" with correct loop variable name "r" * tag 'for-6.16/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-raid: fix variable in journal device check dm-crypt: Extend state buffer size in crypt_iv_lmk_one commit b1248da008362323f75e8b84874586e9ea4c0b31 Author: André Draszik Date: Wed Apr 9 21:37:52 2025 +0100 rtc: s5m: replace open-coded read/modify/write registers with regmap helpers Instead of the open-coded read/modify/write sequence, we can simply use the regmap helpers regmap_set_bits() and regmap_update_bits() respectively. This makes the code easier to read, and avoids extra work in case the underlying bus supports updating bits via struct regmap_bus::reg_update_bits() directly (which is the case for S2MPG10 on gs101 where this driver communicates via ACPM). Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-31-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit f5adb1fa04d08731a13db48afafd1a5f4384d3c9 Author: André Draszik Date: Wed Apr 9 21:37:51 2025 +0100 rtc: s5m: replace regmap_update_bits with regmap_clear/set_bits The regmap_clear_bits() and regmap_set_bits() helper macros state the intention a bit more obviously. Use those. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-30-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit 1dd609587414f8b2844e551d1fe0505f12871992 Author: André Draszik Date: Wed Apr 9 21:37:50 2025 +0100 rtc: s5m: switch to devm_device_init_wakeup To release memory allocated by device_init_wakeup(true), drivers have to call device_init_wakeup(false) in error paths and unbind. Switch to the new devres managed version devm_device_init_wakeup() to plug this memleak. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-29-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit 972a3b47f6e191a0c5afcc45f4de74bf3d043a75 Author: André Draszik Date: Wed Apr 9 21:37:49 2025 +0100 rtc: s5m: fix a typo: peding -> pending Fix this minor typo, and adjust the a related incorrect alignment to avoid a checkpatch error. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-28-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit e64180846e7e4397938bbd0acf0640836f0f8051 Author: André Draszik Date: Wed Apr 9 21:37:48 2025 +0100 rtc: s5m: add support for S2MPG10 RTC Add support for Samsung's S2MPG10 PMIC RTC, which is similar to the existing PMIC RTCs supported by this driver. S2MPG10 doesn't use I2C, so we expect the core driver to have created a regmap for us. Additionally, it can be used for doing a cold-reset. If requested to do so (via DT), S2MPG10 is programmed with a watchdog configuration that will perform a full power cycle upon watchdog expiry. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-27-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit a57743bf009e788ada3607ac6b74ae9ebbd4ed74 Author: André Draszik Date: Wed Apr 9 21:37:47 2025 +0100 rtc: s5m: prepare for external regmap The Samsung S2MPG10 PMIC is not connected via I2C as this driver assumes, hence this driver's current approach of creating an I2C-based regmap doesn't work for it, and this driver should use the regmap provided by the parent (core) driver instead for that PMIC. To prepare this driver for s2mpg support, restructure the code to only create a regmap if one isn't provided by the parent. No functional changes, since the parent doesn't provide a regmap for any of the PMICs currently supported by this driver. Having this change separate will simply make the addition of S2MPG10 support more self-contained, without additional restructuring. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-26-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit 002cc0ee90e6172ef40ae95c248bf6ce67fb3f3f Author: André Draszik Date: Wed Apr 9 21:37:46 2025 +0100 rtc: s5m: cache device type during probe platform_get_device_id() is called mulitple times during probe to retrieve the device type. This makes the code harder to read than necessary. Just get the type once, which also trims the lengths of the lines involved. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-25-d66d5f39b6bf@linaro.org Signed-off-by: Alexandre Belloni commit cb0de0e220d2233a84a2ff1afb8ffba7597d02fa Merge: 5ca7fe213ba311 ba8dac350faf16 Author: Linus Torvalds Date: Mon Jun 23 14:55:40 2025 -0700 Merge tag 'f2fs-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: - fix double-unlock introduced by the recent folio conversion - fix stale page content beyond EOF complained by xfstests/generic/363 * tag 'f2fs-for-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: fix to zero post-eof page f2fs: Fix __write_node_folio() conversion commit 2b8be57fa0c88ac824a906f29c04d728f9f6047a Author: Zhe Qiao Date: Thu Jun 19 15:26:08 2025 +0800 Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()" This reverts commit 631b2af2f357 ("PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()"). The reverted patch causes the 'ri->cfg' and 'root_ops' resources to be released multiple times. When acpi_pci_root_create() fails, these resources have already been released internally by the __acpi_pci_root_release_info() function. Releasing them again in pci_acpi_scan_root() leads to incorrect behavior and potential memory issues. We plan to resolve the issue using a more appropriate fix. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aEmdnuw715btq7Q5@stanley.mountain/ Signed-off-by: Zhe Qiao Acked-by: Dan Carpenter Link: https://patch.msgid.link/20250619072608.2075475-1-qiaozhe@iscas.ac.cn Signed-off-by: Rafael J. Wysocki commit f5990207026987a353d5a95204c4d9cb725637fd Author: Breno Leitao Date: Fri Jun 20 11:48:55 2025 -0700 net: netpoll: Initialize UDP checksum field before checksumming commit f1fce08e63fe ("netpoll: Eliminate redundant assignment") removed the initialization of the UDP checksum, which was wrong and broke netpoll IPv6 transmission due to bad checksumming. udph->check needs to be set before calling csum_ipv6_magic(). Fixes: f1fce08e63fe ("netpoll: Eliminate redundant assignment") Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250620-netpoll_fix-v1-1-f9f0b82bc059@debian.org Signed-off-by: Jakub Kicinski commit 5ca7fe213ba3113dde19c4cd46347c16d9e69f81 Merge: c06944560a5628 c0d90a79e8e65b Author: Linus Torvalds Date: Mon Jun 23 11:16:38 2025 -0700 Merge tag 'for-6.16-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Fixes: - fix invalid inode pointer dereferences during log replay - fix a race between renames and directory logging - fix shutting down delayed iput worker - fix device byte accounting when dropping chunk - in zoned mode, fix offset calculations for DUP profile when conventional and sequential zones are used together Regression fixes: - fix possible double unlock of extent buffer tree (xarray conversion) - in zoned mode, fix extent buffer refcount when writing out extents (xarray conversion) Error handling fixes and updates: - handle unexpected extent type when replaying log - check and warn if there are remaining delayed inodes when putting a root - fix assertion when building free space tree - handle csum tree error with mount option 'rescue=ibadroot' Other: - error message updates: add prefix to all scrub related messages, include other information in messages" * tag 'for-6.16-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: fix alloc_offset calculation for partly conventional block groups btrfs: handle csum tree error with rescue=ibadroots correctly btrfs: fix race between async reclaim worker and close_ctree() btrfs: fix assertion when building free space tree btrfs: don't silently ignore unexpected extent type when replaying log btrfs: fix invalid inode pointer dereferences during log replay btrfs: fix double unlock of buffer_tree xarray when releasing subpage eb btrfs: update superblock's device bytes_used when dropping chunk btrfs: fix a race between renames and directory logging btrfs: scrub: add prefix for the error messages btrfs: warn if leaking delayed_nodes in btrfs_put_root() btrfs: fix delayed ref refcount leak in debug assertion btrfs: include root in error message when unlinking inode btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails commit aa485e8789d56a4573f7c8d000a182b749eaa64d Author: Yuan Chen Date: Wed Jun 18 09:19:33 2025 +0800 libbpf: Fix null pointer dereference in btf_dump__free on allocation failure When btf_dump__new() fails to allocate memory for the internal hashmap (btf_dump->type_names), it returns an error code. However, the cleanup function btf_dump__free() does not check if btf_dump->type_names is NULL before attempting to free it. This leads to a null pointer dereference when btf_dump__free() is called on a btf_dump object. Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") Signed-off-by: Yuan Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250618011933.11423-1-chenyuan_fl@163.com commit ce7df19686530920f2f6b636e71ce5eb1d9303ef Author: Al Viro Date: Sun Jun 22 18:03:29 2025 -0400 attach_recursive_mnt(): do not lock the covering tree when sliding something under it If we are propagating across the userns boundary, we need to lock the mounts added there. However, in case when something has already been mounted there and we end up sliding a new tree under that, the stuff that had been there before should not get locked. IOW, lock_mnt_tree() should be called before we reparent the preexisting tree on top of what we are adding. Fixes: 3bd045cc9c4b ("separate copying and locking mount tree on cross-userns copies") Signed-off-by: Al Viro commit 7484e15dbb016d9d40f8c6e0475810212ae181db Author: Al Viro Date: Tue Jun 17 00:09:51 2025 -0400 replace collect_mounts()/drop_collected_mounts() with a safer variant collect_mounts() has several problems - one can't iterate over the results directly, so it has to be done with callback passed to iterate_mounts(); it has an oopsable race with d_invalidate(); it creates temporary clones of mounts invisibly for sync umount (IOW, you can have non-lazy umount succeed leaving filesystem not mounted anywhere and yet still busy). A saner approach is to give caller an array of struct path that would pin every mount in a subtree, without cloning any mounts. * collect_mounts()/drop_collected_mounts()/iterate_mounts() is gone * collect_paths(where, preallocated, size) gives either ERR_PTR(-E...) or a pointer to array of struct path, one for each chunk of tree visible under 'where' (i.e. the first element is a copy of where, followed by (mount,root) for everything mounted under it - the same set collect_mounts() would give). Unlike collect_mounts(), the mounts are *not* cloned - we just get pinning references to the roots of subtrees in the caller's namespace. Array is terminated by {NULL, NULL} struct path. If it fits into preallocated array (on-stack, normally), that's where it goes; otherwise it's allocated by kmalloc_array(). Passing 0 as size means that 'preallocated' is ignored (and expected to be NULL). * drop_collected_paths(paths, preallocated) is given the array returned by an earlier call of collect_paths() and the preallocated array passed to that call. All mount/dentry references are dropped and array is kfree'd if it's not equal to 'preallocated'. * instead of iterate_mounts(), users should just iterate over array of struct path - nothing exotic is needed for that. Existing users (all in audit_tree.c) are converted. [folded a fix for braino reported by Venkat Rao Bagalkote ] Fixes: 80b5dce8c59b0 ("vfs: Add a function to lazily unmount all mounts from any dentry") Tested-by: Venkat Rao Bagalkote Signed-off-by: Al Viro commit 5aa326a6a2ff0a7e7c6e11777045e66704c2d5e4 Author: Manivannan Sadhasivam Date: Sun Jun 8 09:03:05 2025 +0530 PCI/PTM: Build debugfs code only if CONFIG_DEBUG_FS is enabled Otherwise, the following build error will happen for CONFIG_DEBUG_FS=n && CONFIG_PCIE_PTM=y: drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs' 498 | struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata, | ^ ./include/linux/pci.h:1915:2: note: previous definition is here 1915 | *pcie_ptm_create_debugfs(struct device *dev, void *pdata, | ^ drivers/pci/pcie/ptm.c:546:6: error: redefinition of 'pcie_ptm_destroy_debugfs' 546 | void pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs) | ^ ./include/linux/pci.h:1918:1: note: previous definition is here 1918 | pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs) { } | Fixes: 132833405e61 ("PCI: Add debugfs support for exposing PTM context") Reported-by: Eric Biggers Closes: https://lore.kernel.org/linux-pci/20250607025506.GA16607@sol Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Eric Biggers Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250608033305.15214-1-manivannan.sadhasivam@linaro.org commit 00f452a1b084efbe8dcb60a29860527944a002a1 Author: Thomas Fourier Date: Wed Jun 18 09:17:37 2025 +0200 scsi: qla4xxx: Fix missing DMA mapping error in qla4xxx_alloc_pdu() dma_map_XXX() can fail and should be tested for errors with dma_mapping_error(). Fixes: b3a271a94d00 ("[SCSI] qla4xxx: support iscsiadm session mgmt") Signed-off-by: Thomas Fourier Link: https://lore.kernel.org/r/20250618071742.21822-2-fourier.thomas@gmail.com Signed-off-by: Martin K. Petersen commit c3b214719a87735d4f67333a8ef3c0e31a34837c Author: Thomas Fourier Date: Tue Jun 17 18:11:11 2025 +0200 scsi: qla2xxx: Fix DMA mapping test in qla24xx_get_port_database() dma_map_XXX() functions return as error values DMA_MAPPING_ERROR which is often ~0. The error value should be tested with dma_mapping_error() like it was done in qla26xx_dport_diagnostics(). Fixes: 818c7f87a177 ("scsi: qla2xxx: Add changes in preparation for vendor extended FDMI/RDP") Signed-off-by: Thomas Fourier Link: https://lore.kernel.org/r/20250617161115.39888-2-fourier.thomas@gmail.com Signed-off-by: Martin K. Petersen commit c06944560a562828d507166b4f87c01c367cc9c1 Merge: 86731a2a651e58 c742d127d2d831 Author: Linus Torvalds Date: Mon Jun 23 09:20:39 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-06-22-18-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "20 hotfixes. 7 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. Only 4 are for MM. - The series `Revert "bcache: update min_heap_callbacks to use default builtin swap"' from Kuan-Wei Chiu backs out the author's recent min_heap changes due to a performance regression. A fix for this regression has been developed but we felt it best to go back to the known-good version to give the new code more bake time. - A lot of MAINTAINERS maintenance. I like to get these changes upstreamed promptly because they can't break things and more accurate/complete MAINTAINERS info hopefully improves the speed and accuracy of our responses to submitters and reporters" * tag 'mm-hotfixes-stable-2025-06-22-18-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: add additional mmap-related files to mmap section MAINTAINERS: add memfd, shmem quota files to shmem section MAINTAINERS: add stray rmap file to mm rmap section MAINTAINERS: add hugetlb_cgroup.c to hugetlb section MAINTAINERS: add further init files to mm init block MAINTAINERS: update maintainers for HugeTLB maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate() MAINTAINERS: add missing test files to mm gup section MAINTAINERS: add missing mm/workingset.c file to mm reclaim section selftests/mm: skip uprobe vma merge test if uprobes are not enabled bcache: remove unnecessary select MIN_HEAP Revert "bcache: remove heap-related macros and switch to generic min_heap" Revert "bcache: update min_heap_callbacks to use default builtin swap" selftests/mm: add configs to fix testcase failure kho: initialize tail pages for higher order folios properly MAINTAINERS: add linux-mm@ list to Kexec Handover mm: userfaultfd: fix race of userfaultfd_move and swap cache mm/gup: revert "mm: gup: fix infinite loop within __get_longterm_locked" selftests/mm: increase timeout from 180 to 900 seconds mm/shmem, swap: fix softlockup with mTHP swapin commit 41c66461cb2e8d3934a5395f27e572ebe63696b4 Author: Takashi Iwai Date: Mon Jun 23 17:18:39 2025 +0200 ALSA: hda/realtek: Add mic-mute LED setup for ASUS UM5606 ASUS UM5606* models use the quirk to set up the bass speakers, but it missed the mic-mute LED configuration. Other similar models have the AMD ACP dmic, and the mic-mute is set up for that, but those models don't have AMD ACP but rather built-in mics of Realtek codec, hence the Realtek driver should set it up, instead. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220125 Link: https://patch.msgid.link/20250623151841.28810-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fb4e2a6e8f28a3c0ad382e363aeb9cd822007b8a Author: Youngjun Lee Date: Mon Jun 23 20:05:25 2025 +0900 ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() In snd_usb_get_audioformat_uac3(), the length value returned from snd_usb_ctl_msg() is used directly for memory allocation without validation. This length is controlled by the USB device. The allocated buffer is cast to a uac3_cluster_header_descriptor and its fields are accessed without verifying that the buffer is large enough. If the device returns a smaller than expected length, this leads to an out-of-bounds read. Add a length check to ensure the buffer is large enough for uac3_cluster_header_descriptor. Signed-off-by: Youngjun Lee Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Link: https://patch.msgid.link/20250623-uac3-oob-fix-v1-1-527303eaf40a@samsung.com Signed-off-by: Takashi Iwai commit 9a07ca9a4015f8f71e2b594ee76ac55483babd89 Author: Chris Chiu Date: Mon Jun 23 14:30:23 2025 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 6 G1a HP EliteBook 6 G1a laptops use ALC236 codec and need the fixup ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF to make the mic/micmute LEDs work. Signed-off-by: Chris Chiu Link: https://patch.msgid.link/20250623063023.374920-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai commit c01776287414ca43412d1319d2877cbad65444ac Author: Benjamin Coddington Date: Thu Jun 19 11:02:21 2025 -0400 NFSv4/pNFS: Fix a race to wake on NFS_LAYOUT_DRAIN We found a few different systems hung up in writeback waiting on the same page lock, and one task waiting on the NFS_LAYOUT_DRAIN bit in pnfs_update_layout(), however the pnfs_layout_hdr's plh_outstanding count was zero. It seems most likely that this is another race between the waiter and waker similar to commit ed0172af5d6f ("SUNRPC: Fix a race to wake a sync task"). Fix it up by applying the advised barrier. Fixes: 880265c77ac4 ("pNFS: Avoid a live lock condition in pnfs_update_layout()") Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit e8d6f3ab59468e230f3253efe5cb63efa35289f7 Author: Kuniyuki Iwashima Date: Thu Jun 12 14:52:50 2025 -0700 nfs: Clean up /proc/net/rpc/nfs when nfs_fs_proc_net_init() fails. syzbot reported a warning below [1] following a fault injection in nfs_fs_proc_net_init(). [0] When nfs_fs_proc_net_init() fails, /proc/net/rpc/nfs is not removed. Later, rpc_proc_exit() tries to remove /proc/net/rpc, and the warning is logged as the directory is not empty. Let's handle the error of nfs_fs_proc_net_init() properly. [0]: FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 UID: 0 PID: 6120 Comm: syz.2.27 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl (lib/dump_stack.c:123) should_fail_ex (lib/fault-inject.c:73 lib/fault-inject.c:174) should_failslab (mm/failslab.c:46) kmem_cache_alloc_noprof (mm/slub.c:4178 mm/slub.c:4204) __proc_create (fs/proc/generic.c:427) proc_create_reg (fs/proc/generic.c:554) proc_create_net_data (fs/proc/proc_net.c:120) nfs_fs_proc_net_init (fs/nfs/client.c:1409) nfs_net_init (fs/nfs/inode.c:2600) ops_init (net/core/net_namespace.c:138) setup_net (net/core/net_namespace.c:443) copy_net_ns (net/core/net_namespace.c:576) create_new_namespaces (kernel/nsproxy.c:110) unshare_nsproxy_namespaces (kernel/nsproxy.c:218 (discriminator 4)) ksys_unshare (kernel/fork.c:3123) __x64_sys_unshare (kernel/fork.c:3190) do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [1]: remove_proc_entry: removing non-empty directory 'net/rpc', leaking at least 'nfs' WARNING: CPU: 1 PID: 6120 at fs/proc/generic.c:727 remove_proc_entry+0x45e/0x530 fs/proc/generic.c:727 Modules linked in: CPU: 1 UID: 0 PID: 6120 Comm: syz.2.27 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:remove_proc_entry+0x45e/0x530 fs/proc/generic.c:727 Code: 3c 02 00 0f 85 85 00 00 00 48 8b 93 d8 00 00 00 4d 89 f0 4c 89 e9 48 c7 c6 40 ba a2 8b 48 c7 c7 60 b9 a2 8b e8 33 81 1d ff 90 <0f> 0b 90 90 e9 5f fe ff ff e8 04 69 5e ff 90 48 b8 00 00 00 00 00 RSP: 0018:ffffc90003637b08 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88805f534140 RCX: ffffffff817a92c8 RDX: ffff88807da99e00 RSI: ffffffff817a92d5 RDI: 0000000000000001 RBP: ffff888033431ac0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff888033431a00 R13: ffff888033431ae4 R14: ffff888033184724 R15: dffffc0000000000 FS: 0000555580328500(0000) GS:ffff888124a62000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f71733743e0 CR3: 000000007f618000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sunrpc_exit_net+0x46/0x90 net/sunrpc/sunrpc_syms.c:76 ops_exit_list net/core/net_namespace.c:200 [inline] ops_undo_list+0x2eb/0xab0 net/core/net_namespace.c:253 setup_net+0x2e1/0x510 net/core/net_namespace.c:457 copy_net_ns+0x2a6/0x5f0 net/core/net_namespace.c:574 create_new_namespaces+0x3ea/0xa90 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:218 ksys_unshare+0x45b/0xa40 kernel/fork.c:3121 __do_sys_unshare kernel/fork.c:3192 [inline] __se_sys_unshare kernel/fork.c:3190 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3190 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa1a6b8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff3a090368 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007fa1a6db5fa0 RCX: 00007fa1a6b8e929 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000080 RBP: 00007fa1a6c10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa1a6db5fa0 R14: 00007fa1a6db5fa0 R15: 0000000000000001 Fixes: d47151b79e32 ("nfs: expose /proc/net/sunrpc/nfs in net namespaces") Reported-by: syzbot+a4cc4ac22daa4a71b87c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a4cc4ac22daa4a71b87c Tested-by: syzbot+a4cc4ac22daa4a71b87c@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Signed-off-by: Anna Schumaker commit 9c19b3315cef8b62d2c037616a66b4446b966f6d Author: Nikhil Jha Date: Wed Jun 11 15:46:39 2025 -0400 sunrpc: fix loop in gss seqno cache There was a silly bug in the initial implementation where a loop variable was not incremented. This commit increments the loop variable. This bug is somewhat tricky to catch because it can only happen on loops of two or more. If it is hit, it locks up a kernel thread in an infinite loop. Signed-off-by: Nikhil Jha Tested-by: Nikhil Jha Fixes: 08d6ee6d8a10 ("sunrpc: implement rfc2203 rpcsec_gss seqnum cache") Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 1d6123102e9fbedc8d25bf4731da6d513173e49e Author: Kuniyuki Iwashima Date: Tue Jun 17 09:58:13 2025 -0700 Bluetooth: hci_core: Fix use-after-free in vhci_flush() syzbot reported use-after-free in vhci_flush() without repro. [0] From the splat, a thread close()d a vhci file descriptor while its device was being used by iotcl() on another thread. Once the last fd refcnt is released, vhci_release() calls hci_unregister_dev(), hci_free_dev(), and kfree() for struct vhci_data, which is set to hci_dev->dev->driver_data. The problem is that there is no synchronisation after unlinking hdev from hci_dev_list in hci_unregister_dev(). There might be another thread still accessing the hdev which was fetched before the unlink operation. We can use SRCU for such synchronisation. Let's run hci_dev_reset() under SRCU and wait for its completion in hci_unregister_dev(). Another option would be to restore hci_dev->destruct(), which was removed in commit 587ae086f6e4 ("Bluetooth: Remove unused hci-destruct cb"). However, this would not be a good solution, as we should not run hci_unregister_dev() while there are in-flight ioctl() requests, which could lead to another data-race KCSAN splat. Note that other drivers seem to have the same problem, for exmaple, virtbt_remove(). [0]: BUG: KASAN: slab-use-after-free in skb_queue_empty_lockless include/linux/skbuff.h:1891 [inline] BUG: KASAN: slab-use-after-free in skb_queue_purge_reason+0x99/0x360 net/core/skbuff.c:3937 Read of size 8 at addr ffff88807cb8d858 by task syz.1.219/6718 CPU: 1 UID: 0 PID: 6718 Comm: syz.1.219 Not tainted 6.16.0-rc1-syzkaller-00196-g08207f42d3ff #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 skb_queue_empty_lockless include/linux/skbuff.h:1891 [inline] skb_queue_purge_reason+0x99/0x360 net/core/skbuff.c:3937 skb_queue_purge include/linux/skbuff.h:3368 [inline] vhci_flush+0x44/0x50 drivers/bluetooth/hci_vhci.c:69 hci_dev_do_reset net/bluetooth/hci_core.c:552 [inline] hci_dev_reset+0x420/0x5c0 net/bluetooth/hci_core.c:592 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcf5b98e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcf5c7b9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcf5bbb6160 RCX: 00007fcf5b98e929 RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000009 RBP: 00007fcf5ba10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcf5bbb6160 R15: 00007ffd6353d528 Allocated by task 6535: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] vhci_open+0x57/0x360 drivers/bluetooth/hci_vhci.c:635 misc_open+0x2bc/0x330 drivers/char/misc.c:161 chrdev_open+0x4c9/0x5e0 fs/char_dev.c:414 do_dentry_open+0xdf0/0x1970 fs/open.c:964 vfs_open+0x3b/0x340 fs/open.c:1094 do_open fs/namei.c:3887 [inline] path_openat+0x2ee5/0x3830 fs/namei.c:4046 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6535: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x18e/0x440 mm/slub.c:4842 vhci_release+0xbc/0xd0 drivers/bluetooth/hci_vhci.c:671 __fput+0x44c/0xa70 fs/file_table.c:465 task_work_run+0x1d1/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x6ad/0x22e0 kernel/exit.c:955 do_group_exit+0x21c/0x2d0 kernel/exit.c:1104 __do_sys_exit_group kernel/exit.c:1115 [inline] __se_sys_exit_group kernel/exit.c:1113 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1113 x64_sys_call+0x21ba/0x21c0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807cb8d800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 88 bytes inside of freed 1024-byte region [ffff88807cb8d800, ffff88807cb8dc00) Fixes: bf18c7118cf8 ("Bluetooth: vhci: Free driver_data on file release") Reported-by: syzbot+2faa4825e556199361f9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f62d64848fc4c7c30cd6 Signed-off-by: Kuniyuki Iwashima Acked-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit b44f12ae21f661e5d97fb4a8b234d6689f68f706 Author: Johan Hovold Date: Mon Jun 23 16:24:37 2025 +0200 interconnect: exynos: handle node name allocation failure Add the missing error handling in case node name allocation ever fails. Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250623142437.23068-1-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 88a80066af1617fab444776135d840467414beb6 Author: Fengnan Chang Date: Mon Jun 23 19:02:18 2025 +0800 io_uring: make fallocate be hashed work Like ftruncate and write, fallocate operations on the same file cannot be executed in parallel, so it is better to make fallocate be hashed work. Signed-off-by: Fengnan Chang Link: https://lore.kernel.org/r/20250623110218.61490-1-changfengnan@bytedance.com Signed-off-by: Jens Axboe commit 886a94f008dd1a1702ee66dd035c266f70fd9e90 Author: Xilin Wu Date: Fri Jun 13 22:53:38 2025 +0800 interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node This allows adding interconnect paths for PCIe 1 in device tree later. Fixes: 46bdcac533cc ("interconnect: qcom: Add SC7280 interconnect provider driver") Signed-off-by: Xilin Wu Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250613-sc7280-icc-pcie1-fix-v1-1-0b09813e3b09@radxa.com Signed-off-by: Georgi Djakov commit db53805156f1e0aa6d059c0d3f9ac660d4ef3eb4 Author: Heinz Mauelshagen Date: Tue Jun 10 20:53:30 2025 +0200 dm-raid: fix variable in journal device check Replace "rdev" with correct loop variable name "r". Signed-off-by: Heinz Mauelshagen Cc: stable@vger.kernel.org Fixes: 63c32ed4afc2 ("dm raid: add raid4/5/6 journaling support") Signed-off-by: Mikulas Patocka commit ff8abbd248c1f52df0c321690b88454b13ff54b2 Author: Paulo Alcantara Date: Sun Jun 22 14:13:40 2025 -0300 smb: client: fix regression with native SMB symlinks Some users and customers reported that their backup/copy tools started to fail when the directory being copied contained symlink targets that the client couldn't parse - even when those symlinks weren't followed. Fix this by allowing lstat(2) and readlink(2) to succeed even when the client can't resolve the symlink target, restoring old behavior. Cc: linux-cifs@vger.kernel.org Cc: stable@vger.kernel.org Reported-by: Remy Monsen Closes: https://lore.kernel.org/r/CAN+tdP7y=jqw3pBndZAGjQv0ObFq8Q=+PUDHgB36HdEz9QA6FQ@mail.gmail.com Reported-by: Pierguido Lambri Fixes: 12b466eb52d9 ("cifs: Fix creating and resolving absolute NT-style symlinks") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 95b6759a81833d0e8c7456430186c2f6d174764e Author: Arnd Bergmann Date: Fri Jun 20 15:09:53 2025 +0200 net: qed: reduce stack usage for TLV processing clang gets a bit confused by the code in the qed_mfw_process_tlv_req and ends up spilling registers to the stack hundreds of times. When sanitizers are enabled, this can end up blowing the stack warning limit: drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c:1244:5: error: stack frame size (1824) exceeds limit (1280) in 'qed_mfw_process_tlv_req' [-Werror,-Wframe-larger-than] Apparently the problem is the complexity of qed_mfw_update_tlvs() after inlining, and marking the four main branches of that function as noinline_for_stack makes this problem completely go away, the stack usage goes down to 100 bytes. Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Lobakin Signed-off-by: David S. Miller commit dc6458ed95e40146699f9c523e34cb13ff127170 Author: Vijendar Mukunda Date: Mon Jun 23 14:14:55 2025 +0530 ASoC: amd: ps: fix for soundwire failures during hibernation exit sequence During the hibernate entry sequence, ACP registers will be reset to default values and acp ip will be completely powered off including acp SoundWire pads. During resume sequence, if acp SoundWire pad keeper enable register is not restored along with pad pulldown control register value, then SoundWire manager links won't be powered on correctly results in peripheral register access failures and completely audio function is broken. Add code to store the acp SoundWire pad keeper enable register and acp pad pulldown ctrl register values before entering into suspend state and restore the register values during resume sequence based on condition check for acp SoundWire pad keeper enable register for ACP6.3, ACP7.0 & ACP7.1 platforms. Fixes: 491628388005 ("ASoC: amd: ps: add callback functions for acp pci driver pm ops") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20250623084630.3100279-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit a3ef3c2da675a8a564c8bea1a511cdd0a2a9aa49 Author: Imre Deak Date: Thu Jun 5 11:28:46 2025 +0300 drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS Reading DPCD registers has side-effects in general. In particular accessing registers outside of the link training register range (0x102-0x106, 0x202-0x207, 0x200c-0x200f, 0x2216) is explicitly forbidden by the DP v2.1 Standard, see 3.6.5.1 DPTX AUX Transaction Handling Mandates 3.6.7.4 128b/132b DP Link Layer LTTPR Link Training Mandates Based on my tests, accessing the DPCD_REV register during the link training of an UHBR TBT DP tunnel sink leads to link training failures. Solve the above by using the DP_LANE0_1_STATUS (0x202) register for the DPCD register access quirk. Cc: Cc: Ville Syrjälä Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250605082850.65136-2-imre.deak@intel.com (cherry picked from commit a40c5d727b8111b5db424a1e43e14a1dcce1e77f) Signed-off-by: Joonas Lahtinen commit a24cc6ce1933eade12aa2b9859de0fcd2dac2c06 Author: Sebastian Andrzej Siewior Date: Mon Jun 23 10:34:08 2025 +0200 futex: Initialize futex_phash_new during fork(). During a hash resize operation the new private hash is stored in mm_struct::futex_phash_new if the current hash can not be immediately replaced. The new hash must not be copied during fork() into the new task. Doing so will lead to a double-free of the memory by the two tasks. Initialize the mm_struct::futex_phash_new during fork(). Closes: https://lore.kernel.org/all/aFBQ8CBKmRzEqIfS@mozart.vkv.me/ Fixes: bd54df5ea7cad ("futex: Allow to resize the private local hash") Reported-by: Calvin Owens Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Calvin Owens Link: https://lkml.kernel.org/r/20250623083408.jTiJiC6_@linutronix.de commit 9205999e9f13a07cb29d5a8836c25afdca186007 Author: Ankit Nautiyal Date: Wed Jun 18 18:39:50 2025 +0530 drm/i915/snps_hdmi_pll: Fix 64-bit divisor truncation by using div64_u64 DIV_ROUND_CLOSEST_ULL uses do_div(), which expects a 32-bit divisor. When passing a 64-bit constant like CURVE2_MULTIPLIER, the value is silently truncated to u32, potentially leading to incorrect results on large divisors. Replace DIV_ROUND_CLOSEST_ULL with DIV64_U64_ROUND_CLOSEST which correctly handles full 64-bit division. v2: Use DIV64_U64_ROUND_CLOSEST instead of div64_u64 macro. (Jani) Fixes: 5947642004bf ("drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2") Reported-by: Vas Novikov Closes: https://lore.kernel.org/all/8d7c7958-9558-4c8a-a81a-e9310f2d8852@gmail.com/ Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Cc: Vas Novikov Cc: stable@vger.kernel.org # v6.15+ Reviewed-by: Jani Nikula Signed-off-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250618130951.1596587-2-ankit.k.nautiyal@intel.com (cherry picked from commit b300a175a11e6a934d728317dc39787723cc7917) Signed-off-by: Joonas Lahtinen commit b872f562c8cef59743993b48eb458c2d87c1651e Author: Herbert Xu Date: Mon Jun 23 19:11:50 2025 +0800 dm-crypt: Extend state buffer size in crypt_iv_lmk_one Add a macro CRYPTO_MD5_STATESIZE for the Crypto API export state size of md5 and use that in dm-crypt instead of relying on the size of struct md5_state (the latter is currently undergoing a transition and may shrink). This commit fixes a crash on 32-bit machines: Oops: Oops: 0000 [#1] SMP CPU: 1 UID: 0 PID: 12 Comm: kworker/u16:0 Not tainted 6.16.0-rc2+ #993 PREEMPT(full) Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Workqueue: kcryptd-254:0-1 kcryptd_crypt [dm_crypt] EIP: __crypto_shash_export+0xf/0x90 Code: 4a c1 c7 40 20 a0 b4 4a c1 81 cf 0e 00 04 08 89 78 50 e9 2b ff ff ff 8d 74 26 00 55 89 e5 57 56 53 89 c3 89 d6 8b 00 8b 40 14 <8b> 50 fc f6 40 13 01 74 04 4a 2b 50 14 85 c9 74 10 89 f2 89 d8 ff EAX: 303a3435 EBX: c3007c90 ECX: 00000000 EDX: c3007c38 ESI: c3007c38 EDI: c3007c90 EBP: c3007bfc ESP: c3007bf0 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010216 CR0: 80050033 CR2: 303a3431 CR3: 04fbe000 CR4: 00350e90 Call Trace: crypto_shash_export+0x65/0xc0 crypt_iv_lmk_one+0x106/0x1a0 [dm_crypt] Fixes: efd62c85525e ("crypto: md5-generic - Use API partial block handling") Reported-by: Milan Broz Signed-off-by: Herbert Xu Tested-by: Milan Broz Closes: https://lore.kernel.org/linux-crypto/f1625ddc-e82e-4b77-80c2-dc8e45b54848@gmail.com/T/ Signed-off-by: Mikulas Patocka commit cbe4134ea4bc493239786220bd69cb8a13493190 Author: Shivank Garg Date: Fri Jun 20 07:03:30 2025 +0000 fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass Export anon_inode_make_secure_inode() to allow KVM guest_memfd to create anonymous inodes with proper security context. This replaces the current pattern of calling alloc_anon_inode() followed by inode_init_security_anon() for creating security context manually. This change also fixes a security regression in secretmem where the S_PRIVATE flag was not cleared after alloc_anon_inode(), causing LSM/SELinux checks to be bypassed for secretmem file descriptors. As guest_memfd currently resides in the KVM module, we need to export this symbol for use outside the core kernel. In the future, guest_memfd might be moved to core-mm, at which point the symbols no longer would have to be exported. When/if that happens is still unclear. Fixes: 2bfe15c52612 ("mm: create security context for memfd_secret inodes") Suggested-by: David Hildenbrand Suggested-by: Mike Rapoport Signed-off-by: Shivank Garg Link: https://lore.kernel.org/20250620070328.803704-3-shivankg@amd.com Acked-by: "Mike Rapoport (Microsoft)" Signed-off-by: Christian Brauner commit 6a68d28066b6257b8d09b1daa91db43d56dbb6ad Author: Nam Cao Date: Fri Jun 20 13:02:52 2025 +0200 selftests/coredump: Fix "socket_detect_userspace_client" test failure The coredump.socket_detect_userspace_client test occasionally fails: # RUN coredump.socket_detect_userspace_client ... # stackdump_test.c:500:socket_detect_userspace_client:Expected 0 (0) != WIFEXITED(status) (0) # socket_detect_userspace_client: Test terminated by assertion # FAIL coredump.socket_detect_userspace_client not ok 3 coredump.socket_detect_userspace_client because there is no guarantee that client's write() happens before server's close(). The client gets terminated SIGPIPE, and thus the test fails. Add a read() to server to make sure server's close() doesn't happen before client's write(). Fixes: 7b6724fe9a6b ("selftests/coredump: add tests for AF_UNIX coredumps") Signed-off-by: Nam Cao Link: https://lore.kernel.org/20250620110252.1640391-1-namcao@linutronix.de Signed-off-by: Christian Brauner commit 2cdde91c14ec358087f43287513946d493aef940 Author: Alok Tiwari Date: Sun Jun 22 10:17:02 2025 -0700 thunderbolt: Fix bit masking in tb_dp_port_set_hops() The tb_dp_port_set_hops() function was incorrectly clearing ADP_DP_CS_1_AUX_RX_HOPID_MASK twice. According to the function's purpose, it should clear both TX and RX AUX HopID fields. Replace the first instance with ADP_DP_CS_1_AUX_TX_HOPID_MASK to ensure proper configuration of both AUX directions. Fixes: 98176380cbe5 ("thunderbolt: Convert DP adapter register names to follow the USB4 spec") Cc: stable@vger.kernel.org Signed-off-by: Alok Tiwari Signed-off-by: Mika Westerberg commit 58d71d4242ce057955c783a14c82270c71f9e1e8 Author: Mario Limonciello Date: Thu Jun 19 16:38:30 2025 -0500 thunderbolt: Fix wake on connect at runtime commit 1a760d10ded37 ("thunderbolt: Fix a logic error in wake on connect") fixated on the USB4 port sysfs wakeup file not working properly to control policy, but it had an unintended side effect that the sysfs file controls policy both at runtime and at suspend time. The sysfs file is supposed to only control behavior while system is suspended. Pass whether programming a port for runtime into usb4_switch_set_wake() and if runtime then ignore the value in the sysfs file. Cc: stable@vger.kernel.org Reported-by: Alexander Kovacs Tested-by: Alexander Kovacs Fixes: 1a760d10ded37 ("thunderbolt: Fix a logic error in wake on connect") Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 20d71750cc72e80859d52548cf5c2a7513983b0d Author: Herbert Xu Date: Fri Jun 20 20:15:03 2025 +0800 crypto: wp512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu Tested-by: Milan Broz Signed-off-by: Herbert Xu commit fb721b2c35b1829b8ecf62e3adb41cf30260316a Author: Louis Chauvet Date: Tue Apr 29 10:36:23 2025 +0200 drm: writeback: Fix drm_writeback_connector_cleanup signature The drm_writeback_connector_cleanup have the signature: static void drm_writeback_connector_cleanup( struct drm_device *dev, struct drm_writeback_connector *wb_connector) But it is stored and used as a drmres_release_t typedef void (*drmres_release_t)(struct drm_device *dev, void *res); While the current code is valid and does not produce any warning, the CFI runtime check (CONFIG_CFI_CLANG) can fail because the function signature is not the same as drmres_release_t. In order to fix this, change the function signature to match what is expected by drmres_release_t. Fixes: 1914ba2b91ea ("drm: writeback: Create drmm variants for drm_writeback_connector initialization") Suggested-by: Mark Yacoub Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250429-drm-fix-writeback-cleanup-v2-1-548ff3a4e284@bootlin.com Signed-off-by: Louis Chauvet commit bf39286adc5e10ce3e32eb86ad316ae56f3b52a0 Author: Oliver Schramm Date: Sun Jun 22 00:30:01 2025 +0200 ASoC: amd: yc: Add DMI quirk for Lenovo IdeaPad Slim 5 15 It's smaller brother has already received the patch to enable the microphone, now add it too to the DMI quirk table. Cc: stable@vger.kernel.org Signed-off-by: Oliver Schramm Link: https://patch.msgid.link/20250621223000.11817-2-oliver.schramm97@gmail.com Signed-off-by: Mark Brown commit 7186b81807b4a08f8bf834b6bdc72d6ed8ba1587 Author: Yuzuru10 Date: Sun Jun 22 22:58:00 2025 +0000 ASoC: amd: yc: add quirk for Acer Nitro ANV15-41 internal mic This patch adds DMI-based quirk for the Acer Nitro ANV15-41, allowing the internal microphone to be detected correctly on machines with "RB" as board vendor. Signed-off-by: Yuzuru Link: https://patch.msgid.link/20250622225754.20856-1-yuzuru_10@proton.me Signed-off-by: Mark Brown commit 999fb9d51f939ee23cbb9313ae558d29d6987804 Author: Luca Weiss Date: Tue Jun 17 14:20:12 2025 +0200 ASoC: qcom: sm8250: Fix possibly undefined reference With CONFIG_SND_SOC_SM8250=y and CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS=m selected in kconfig, the build will fail due to trying to link against a symbol only found in the module. aarch64-linux-gnu-ld: sound/soc/qcom/sm8250.o: in function `sm8250_snd_exit': sound/soc/qcom/sm8250.c:52:(.text+0x210): undefined reference to `qcom_snd_usb_offload_jack_remove' Fix this by declaring the dependency that forces CONFIG_SND_SOC_SM8250=m when CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS is =m. Reported-by: Matthew Croughan Fixes: 1b8d0d87b934 ("ASoC: qcom: qdsp6: Add headphone jack for offload connection status") Signed-off-by: Luca Weiss Link: https://patch.msgid.link/20250617-snd-sm8250-dep-fix-v1-1-879af8906ec4@fairphone.com Signed-off-by: Mark Brown commit 86731a2a651e58953fc949573895f2fa6d456841 Author: Linus Torvalds Date: Sun Jun 22 13:30:08 2025 -0700 Linux 6.16-rc3 commit b993ea46b3b601915ceaaf3c802adf11e7d6bac6 Author: Eric Dumazet Date: Fri Jun 20 14:28:44 2025 +0000 atm: clip: prevent NULL deref in clip_push() Blamed commit missed that vcc_destroy_socket() calls clip_push() with a NULL skb. If clip_devs is NULL, clip_push() then crashes when reading skb->truesize. Fixes: 93a2014afbac ("atm: fix a UAF in lec_arp_clear_vccs()") Reported-by: syzbot+1316233c4c6803382a8b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/68556f59.a00a0220.137b3.004e.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Cc: Cong Wang Cc: Gengming Liu Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b67ec639010f7d2ce2b467cef36f3e5e785d8d50 Merge: 5c00eca95a9a20 a6c23dac756b95 Author: Linus Torvalds Date: Sun Jun 22 10:50:36 2025 -0700 Merge tag 'i2c-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - subsystem: convert drivers to use recent callbacks of struct i2c_algorithm A typical after-rc1 cleanup, which I couldn't send in time for rc2 - tegra: fix YAML conversion of device tree bindings - k1: re-add a check which got lost during upstreaming * tag 'i2c-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: k1: check for transfer error i2c: use inclusive callbacks in struct i2c_algorithm dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties commit 5c00eca95a9a20e662bd290c3ef3f2e07dfa9baa Merge: 33efa7dbabcf62 2aebf5ee43bf0e Author: Linus Torvalds Date: Sun Jun 22 10:30:44 2025 -0700 Merge tag 'x86_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Make sure the array tracking which kernel text positions need to be alternatives-patched doesn't get mishandled by out-of-order modifications, leading to it overflowing and causing page faults when patching - Avoid an infinite loop when early code does a ranged TLB invalidation before the broadcast TLB invalidation count of how many pages it can flush, has been read from CPUID - Fix a CONFIG_MODULES typo - Disable broadcast TLB invalidation when PTI is enabled to avoid an overflow of the bitmap tracking dynamic ASIDs which need to be flushed when the kernel switches between the user and kernel address space - Handle the case of a CPU going offline and thus reporting zeroes when reading top-level events in the resctrl code * tag 'x86_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Fix int3 handling failure from broken text_poke array x86/mm: Fix early boot use of INVPLGB x86/its: Fix an ifdef typo in its_alloc() x86/mm: Disable INVLPGB when PTI is enabled x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem commit 33efa7dbabcf62491c2eac9631752d52b8e159f8 Merge: 17ef32ae66b1af 3085ef9d9e7ab5 Author: Linus Torvalds Date: Sun Jun 22 10:17:51 2025 -0700 Merge tag 'irq_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Fix missing prototypes warnings - Properly initialize work context when allocating it - Remove a method tracking when managed interrupts are suspended during hotplug, in favor of the code using a IRQ disable depth tracking now, and have interrupts get properly enabled again on restore - Make sure multiple CPUs getting hotplugged don't cause wrong tracking of the managed IRQ disable depth * tag 'irq_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/ath79-misc: Fix missing prototypes warnings genirq/irq_sim: Initialize work context pointers properly genirq/cpuhotplug: Restore affinity even for suspended IRQ genirq/cpuhotplug: Rebalance managed interrupts across multi-CPU hotplug commit 302251f1fdfd302ce99a619aac1a5164d0bb7c4b Author: Faisal Bukhari Date: Sat Jun 21 16:02:04 2025 +0530 Fix typo in marvell octeontx2 documentation Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst Fixes a spelling mistake: "funcionality" → "functionality". Signed-off-by: Faisal Bukhari Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 17ef32ae66b1afc9fa6dbea40eb18a13edba9c31 Merge: aff2a7e23f2373 b0823d5fbacb1c Author: Linus Torvalds Date: Sun Jun 22 10:11:45 2025 -0700 Merge tag 'perf_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Avoid a crash on a heterogeneous machine where not all cores support the same hw events features - Avoid a deadlock when throttling events - Document the perf event states more - Make sure a number of perf paths switching off or rescheduling events call perf_cgroup_event_disable() - Make sure perf does task sampling before its userspace mapping is torn down, and not after * tag 'perf_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix crash in icl_update_topdown_event() perf: Fix the throttle error of some clock events perf: Add comment to enum perf_event_state perf/core: Fix WARN in perf_cgroup_switch() perf: Fix dangling cgroup pointer in cpuctx perf: Fix cgroup state vs ERROR perf: Fix sample vs do_exit() commit aff2a7e23f23738ca3cd62e4ce5be2d62a3d52ad Merge: 73543bad766486 69a14d146f3b87 Author: Linus Torvalds Date: Sun Jun 22 10:09:23 2025 -0700 Merge tag 'locking_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Borislav Petkov: - Make sure the switch to the global hash is requested always under a lock so that two threads requesting that simultaneously cannot get to inconsistent state - Reject negative NUMA nodes earlier in the futex NUMA interface handling code - Selftests fixes * tag 'locking_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Verify under the lock if hash can be replaced futex: Handle invalid node numbers supplied by user selftests/futex: Set the home_node in futex_numa_mpol selftests/futex: getopt() requires int as return value. commit 73543bad766486c3cdbf6fa9d1faf7d0c4bcc7af Merge: e669e322c52c49 88efa0de3285be Author: Linus Torvalds Date: Sun Jun 22 10:05:33 2025 -0700 Merge tag 'edac_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: - amd64: Correct the number of memory controllers on some AMD Zen clients - igen6: Handle firmware-disabled memory controllers properly * tag 'edac_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/igen6: Fix NULL pointer dereference EDAC/amd64: Correct number of UMCs for family 19h models 70h-7fh commit e669e322c52c49c161e46492963e64319fbb53a8 Merge: 75f99f8cf445d5 25e8b1dd4883e6 Author: Linus Torvalds Date: Sun Jun 22 09:58:23 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix another set of FP/SIMD/SVE bugs affecting NV, and plugging some missing synchronisation - A small fix for the irqbypass hook fixes, tightening the check and ensuring that we only deal with MSI for both the old and the new route entry - Rework the way the shadow LRs are addressed in a nesting configuration, plugging an embarrassing bug as well as simplifying the whole process - Add yet another fix for the dreaded arch_timer_edge_cases selftest RISC-V: - Fix the size parameter check in SBI SFENCE calls - Don't treat SBI HFENCE calls as NOPs x86 TDX: - Complete API for handling complex TDVMCALLs in userspace. This was delayed because the spec lacked a way for userspace to deny supporting these calls; the new exit code is now approved" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: TDX: Exit to userspace for GetTdVmCallInfo KVM: TDX: Handle TDG.VP.VMCALL KVM: TDX: Add new TDVMCALL status code for unsupported subfuncs KVM: arm64: VHE: Centralize ISBs when returning to host KVM: arm64: Remove cpacr_clear_set() KVM: arm64: Remove ad-hoc CPTR manipulation from kvm_hyp_handle_fpsimd() KVM: arm64: Remove ad-hoc CPTR manipulation from fpsimd_sve_sync() KVM: arm64: Reorganise CPTR trap manipulation KVM: arm64: VHE: Synchronize CPTR trap deactivation KVM: arm64: VHE: Synchronize restore of host debug registers KVM: arm64: selftests: Close the GIC FD in arch_timer_edge_cases KVM: arm64: Explicitly treat routing entry type changes as changes KVM: arm64: nv: Fix tracking of shadow list registers RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs RISC-V: KVM: Fix the size parameter check in SBI SFENCE calls commit 75f99f8cf445d577132ed97514032d9a3d3e2758 Merge: 739a6c93cc755c 27e9d5d021dbaa Author: Linus Torvalds Date: Sun Jun 22 09:46:11 2025 -0700 Merge tag 'v6.16-rc2-smb3-client-fixes-v2' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - Multichannel channel allocation fix for Kerberos mounts - Two reconnect fixes - Fix netfs_writepages crash with smbdirect/RDMA - Directory caching fix - Three minor cleanup fixes - Log error when close cached dirs fails * tag 'v6.16-rc2-smb3-client-fixes-v2' of git://git.samba.org/sfrench/cifs-2.6: smb: minor fix to use SMB2_NTLMV2_SESSKEY_SIZE for auth_key size smb: minor fix to use sizeof to initialize flags_string buffer smb: Use loff_t for directory position in cached_dirents smb: Log an error when close_all_cached_dirs fails cifs: Fix prepare_write to negotiate wsize if needed smb: client: fix max_sge overflow in smb_extract_folioq_to_rdma() smb: client: fix first command failure during re-negotiation cifs: Remove duplicate fattr->cf_dtype assignment from wsl_to_fattr() function smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels commit 68cc9d3c8e44afe90e43cbbd2960da15c2f31e23 Author: Yasmin Fitzgerald Date: Sat Jun 21 01:36:14 2025 -0400 ALSA: hda/realtek - Enable mute LED on HP Pavilion Laptop 15-eg100 The HP Pavilion Laptop 15-eg100 has Realtek HDA codec ALC287. It needs the ALC287_FIXUP_HP_GPIO_LED quirk to enable the mute LED. Signed-off-by: Yasmin Fitzgerald Link: https://patch.msgid.link/20250621053832.52950-1-sunoflife1.git@gmail.com Signed-off-by: Takashi Iwai commit e41687b511d5e5437db5d2151e23c115dba30411 Author: Tim Crawford Date: Fri Jun 20 14:43:29 2025 -0600 ALSA: hda/realtek: Add quirks for some Clevo laptops Add audio quirks to fix speaker output and headset detection on the following Clevo models: - V350ENC - V350WNPQ - V540TU - X560WNR - X580WNS Signed-off-by: Tim Crawford Link: https://patch.msgid.link/20250620204329.35878-1-tcrawford@system76.com Signed-off-by: Takashi Iwai commit 72c0d9cb0fc48b6d382c3b5b6f702108a612cfdb Author: Kent Overstreet Date: Thu Jun 19 23:06:01 2025 -0400 bcachefs: Fix range in bch2_lookup_indirect_extent() error path Before calling bch2_indirect_extent_missing_error(), we have to calculate the missing range, which is the intersection of the reflink pointer and the non-indirect-extent we found. The calculation didn't take into account that the returned extent may span the iter position, leading to an infinite loop when we (unnecessarily) resized the extent we were returning to one that didn't extend past the offset we were looking up. Signed-off-by: Kent Overstreet commit abcb6bd4be19d935795611c022d7d19ab69363b0 Author: Kent Overstreet Date: Thu Jun 19 17:06:43 2025 -0400 bcachefs: fix spurious error_throw Signed-off-by: Kent Overstreet commit bb378314ceee4d181e26bfe180deca852ae80c5c Author: Kent Overstreet Date: Thu Jun 19 16:51:32 2025 -0400 bcachefs: Add missing bch2_err_class() to fileattr_set() Make sure we return a standard error code. Signed-off-by: Kent Overstreet commit a6c23dac756b9541b33aa3bcd30f464df2879209 Author: Alex Elder Date: Mon Jun 16 07:51:36 2025 -0500 i2c: k1: check for transfer error If spacemit_i2c_xfer_msg() times out waiting for a message transfer to complete, or if the hardware reports an error, it returns a negative error code (-ETIMEDOUT, -EAGAIN, -ENXIO. or -EIO). The sole caller of spacemit_i2c_xfer_msg() is spacemit_i2c_xfer(), which is the i2c_algorithm->xfer callback function. It currently does not save the value returned by spacemit_i2c_xfer_msg(). The result is that transfer errors go unreported, and a caller has no indication anything is wrong. When this code was out for review, the return value *was* checked in early versions. But for some reason, that assignment got dropped between versions 5 and 6 of the series, perhaps related to reworking the code to merge spacemit_i2c_xfer_core() into spacemit_i2c_xfer(). Simply assigning the value returned to "ret" fixes the problem. Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC") Signed-off-by: Alex Elder Cc: # v6.15+ Reviewed-by: Troy Mitchell Link: https://lore.kernel.org/r/20250616125137.1555453-1-elder@riscstar.com Signed-off-by: Andi Shyti Signed-off-by: Wolfram Sang commit 739a6c93cc755c0daf3a7e57e018a8c61047cd90 Merge: 1f9378d4a7dd86 94d10a4dba0bc4 Author: Linus Torvalds Date: Sat Jun 21 09:20:15 2025 -0700 Merge tag 'nfsd-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Two fixes for commits in the nfsd-6.16 merge - One fix for the recently-added NFSD netlink facility - One fix for a remote SunRPC crasher * tag 'nfsd-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: sunrpc: handle SVC_GARBAGE during svc auth processing as auth error nfsd: use threads array as-is in netlink interface SUNRPC: Cleanup/fix initial rq_pages allocation NFSD: Avoid corruption of a referring call list commit 1f9378d4a7dd862b28d83a062a2dcc6ef1a0daa7 Merge: f7301f856d351f 417b8af2e30d7f Author: Linus Torvalds Date: Sat Jun 21 09:15:08 2025 -0700 Merge tag 'erofs-for-6.16-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: - Use the mounter’s credentials for file-backed mounts to resolve Android SELinux permission issues - Remove the unused trace event `erofs_destroy_inode` - Error out on crafted out-of-file-range encoded extents - Remove an incorrect check for encoded extents * tag 'erofs-for-6.16-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: remove a superfluous check for encoded extents erofs: refuse crafted out-of-file-range encoded extents erofs: remove unused trace event erofs_destroy_inode erofs: impersonate the opener's credentials when accessing backing file commit 27e9d5d021dbaa1211836d07a240078bf84b284e Author: Bharath SM Date: Thu Jun 19 21:05:34 2025 +0530 smb: minor fix to use SMB2_NTLMV2_SESSKEY_SIZE for auth_key size Replaced hardcoded value 16 with SMB2_NTLMV2_SESSKEY_SIZE in the auth_key definition and memcpy call. Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Bharath SM Signed-off-by: Steve French commit 4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7 Author: Bharath SM Date: Thu Jun 19 21:05:33 2025 +0530 smb: minor fix to use sizeof to initialize flags_string buffer Replaced hardcoded length with sizeof(flags_string). Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Bharath SM Signed-off-by: Steve French commit 4eb11a34b72c86d559f437fdadc47e512bba41d2 Author: Bharath SM Date: Thu Jun 19 21:05:32 2025 +0530 smb: Use loff_t for directory position in cached_dirents Change the pos field in struct cached_dirents from int to loff_t to support large directory offsets. This avoids overflow and matches kernel conventions for directory positions. Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Bharath SM Signed-off-by: Steve French commit a2182743a8b4969481f64aec4908ff162e8a206c Author: Paul Aurich Date: Wed Nov 20 08:01:54 2024 -0800 smb: Log an error when close_all_cached_dirs fails Under low-memory conditions, close_all_cached_dirs() can't move the dentries to a separate list to dput() them once the locks are dropped. This will result in a "Dentry still in use" error, so add an error message that makes it clear this is what happened: [ 495.281119] CIFS: VFS: \\otters.example.com\share Out of memory while dropping dentries [ 495.281595] ------------[ cut here ]------------ [ 495.281887] BUG: Dentry ffff888115531138{i=78,n=/} still in use (2) [unmount of cifs cifs] [ 495.282391] WARNING: CPU: 1 PID: 2329 at fs/dcache.c:1536 umount_check+0xc8/0xf0 Also, bail out of looping through all tcons as soon as a single allocation fails, since we're already in trouble, and kmalloc() attempts for subseqeuent tcons are likely to fail just like the first one did. Signed-off-by: Paul Aurich Acked-by: Bharath SM Suggested-by: Ruben Devos Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 2c4fd3d141465ef1afc8318c95e7b916d9a8c49c Author: David Howells Date: Wed Jun 18 16:39:47 2025 +0100 cifs: Fix prepare_write to negotiate wsize if needed Fix cifs_prepare_write() to negotiate the wsize if it is unset. Reviewed-by: Shyam Prasad N Reviewed-by: Bharath SM Signed-off-by: David Howells cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit a379a8a2a0032e12e7ef397197c9c2ad011588d6 Author: Stefan Metzmacher Date: Wed Jun 18 18:51:40 2025 +0200 smb: client: fix max_sge overflow in smb_extract_folioq_to_rdma() This fixes the following problem: [ 749.901015] [ T8673] run fstests cifs/001 at 2025-06-17 09:40:30 [ 750.346409] [ T9870] ================================================================== [ 750.346814] [ T9870] BUG: KASAN: slab-out-of-bounds in smb_set_sge+0x2cc/0x3b0 [cifs] [ 750.347330] [ T9870] Write of size 8 at addr ffff888011082890 by task xfs_io/9870 [ 750.347705] [ T9870] [ 750.348077] [ T9870] CPU: 0 UID: 0 PID: 9870 Comm: xfs_io Kdump: loaded Not tainted 6.16.0-rc2-metze.02+ #1 PREEMPT(voluntary) [ 750.348082] [ T9870] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 750.348085] [ T9870] Call Trace: [ 750.348086] [ T9870] [ 750.348088] [ T9870] dump_stack_lvl+0x76/0xa0 [ 750.348106] [ T9870] print_report+0xd1/0x640 [ 750.348116] [ T9870] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 750.348120] [ T9870] ? kasan_complete_mode_report_info+0x26/0x210 [ 750.348124] [ T9870] kasan_report+0xe7/0x130 [ 750.348128] [ T9870] ? smb_set_sge+0x2cc/0x3b0 [cifs] [ 750.348262] [ T9870] ? smb_set_sge+0x2cc/0x3b0 [cifs] [ 750.348377] [ T9870] __asan_report_store8_noabort+0x17/0x30 [ 750.348381] [ T9870] smb_set_sge+0x2cc/0x3b0 [cifs] [ 750.348496] [ T9870] smbd_post_send_iter+0x1990/0x3070 [cifs] [ 750.348625] [ T9870] ? __pfx_smbd_post_send_iter+0x10/0x10 [cifs] [ 750.348741] [ T9870] ? update_stack_state+0x2a0/0x670 [ 750.348749] [ T9870] ? cifs_flush+0x153/0x320 [cifs] [ 750.348870] [ T9870] ? cifs_flush+0x153/0x320 [cifs] [ 750.348990] [ T9870] ? update_stack_state+0x2a0/0x670 [ 750.348995] [ T9870] smbd_send+0x58c/0x9c0 [cifs] [ 750.349117] [ T9870] ? __pfx_smbd_send+0x10/0x10 [cifs] [ 750.349231] [ T9870] ? unwind_get_return_address+0x65/0xb0 [ 750.349235] [ T9870] ? __pfx_stack_trace_consume_entry+0x10/0x10 [ 750.349242] [ T9870] ? arch_stack_walk+0xa7/0x100 [ 750.349250] [ T9870] ? stack_trace_save+0x92/0xd0 [ 750.349254] [ T9870] __smb_send_rqst+0x931/0xec0 [cifs] [ 750.349374] [ T9870] ? kernel_text_address+0x173/0x190 [ 750.349379] [ T9870] ? kasan_save_stack+0x39/0x70 [ 750.349382] [ T9870] ? kasan_save_track+0x18/0x70 [ 750.349385] [ T9870] ? __kasan_slab_alloc+0x9d/0xa0 [ 750.349389] [ T9870] ? __pfx___smb_send_rqst+0x10/0x10 [cifs] [ 750.349508] [ T9870] ? smb2_mid_entry_alloc+0xb4/0x7e0 [cifs] [ 750.349626] [ T9870] ? cifs_call_async+0x277/0xb00 [cifs] [ 750.349746] [ T9870] ? cifs_issue_write+0x256/0x610 [cifs] [ 750.349867] [ T9870] ? netfs_do_issue_write+0xc2/0x340 [netfs] [ 750.349900] [ T9870] ? netfs_advance_write+0x45b/0x1270 [netfs] [ 750.349929] [ T9870] ? netfs_write_folio+0xd6c/0x1be0 [netfs] [ 750.349958] [ T9870] ? netfs_writepages+0x2e9/0xa80 [netfs] [ 750.349987] [ T9870] ? do_writepages+0x21f/0x590 [ 750.349993] [ T9870] ? filemap_fdatawrite_wbc+0xe1/0x140 [ 750.349997] [ T9870] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.350002] [ T9870] smb_send_rqst+0x22e/0x2f0 [cifs] [ 750.350131] [ T9870] ? __pfx_smb_send_rqst+0x10/0x10 [cifs] [ 750.350255] [ T9870] ? local_clock_noinstr+0xe/0xd0 [ 750.350261] [ T9870] ? kasan_save_alloc_info+0x37/0x60 [ 750.350268] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.350271] [ T9870] ? _raw_spin_lock+0x81/0xf0 [ 750.350275] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.350278] [ T9870] ? smb2_setup_async_request+0x293/0x580 [cifs] [ 750.350398] [ T9870] cifs_call_async+0x477/0xb00 [cifs] [ 750.350518] [ T9870] ? __pfx_smb2_writev_callback+0x10/0x10 [cifs] [ 750.350636] [ T9870] ? __pfx_cifs_call_async+0x10/0x10 [cifs] [ 750.350756] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.350760] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.350763] [ T9870] ? __smb2_plain_req_init+0x933/0x1090 [cifs] [ 750.350891] [ T9870] smb2_async_writev+0x15ff/0x2460 [cifs] [ 750.351008] [ T9870] ? sched_clock_noinstr+0x9/0x10 [ 750.351012] [ T9870] ? local_clock_noinstr+0xe/0xd0 [ 750.351018] [ T9870] ? __pfx_smb2_async_writev+0x10/0x10 [cifs] [ 750.351144] [ T9870] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 750.351150] [ T9870] ? _raw_spin_unlock+0xe/0x40 [ 750.351154] [ T9870] ? cifs_pick_channel+0x242/0x370 [cifs] [ 750.351275] [ T9870] cifs_issue_write+0x256/0x610 [cifs] [ 750.351554] [ T9870] ? cifs_issue_write+0x256/0x610 [cifs] [ 750.351677] [ T9870] netfs_do_issue_write+0xc2/0x340 [netfs] [ 750.351710] [ T9870] netfs_advance_write+0x45b/0x1270 [netfs] [ 750.351740] [ T9870] ? rolling_buffer_append+0x12d/0x440 [netfs] [ 750.351769] [ T9870] netfs_write_folio+0xd6c/0x1be0 [netfs] [ 750.351798] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.351804] [ T9870] netfs_writepages+0x2e9/0xa80 [netfs] [ 750.351835] [ T9870] ? __pfx_netfs_writepages+0x10/0x10 [netfs] [ 750.351864] [ T9870] ? exit_files+0xab/0xe0 [ 750.351867] [ T9870] ? do_exit+0x148f/0x2980 [ 750.351871] [ T9870] ? do_group_exit+0xb5/0x250 [ 750.351874] [ T9870] ? arch_do_signal_or_restart+0x92/0x630 [ 750.351879] [ T9870] ? exit_to_user_mode_loop+0x98/0x170 [ 750.351882] [ T9870] ? do_syscall_64+0x2cf/0xd80 [ 750.351886] [ T9870] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.351890] [ T9870] do_writepages+0x21f/0x590 [ 750.351894] [ T9870] ? __pfx_do_writepages+0x10/0x10 [ 750.351897] [ T9870] filemap_fdatawrite_wbc+0xe1/0x140 [ 750.351901] [ T9870] __filemap_fdatawrite_range+0xba/0x100 [ 750.351904] [ T9870] ? __pfx___filemap_fdatawrite_range+0x10/0x10 [ 750.351912] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.351916] [ T9870] filemap_write_and_wait_range+0x7d/0xf0 [ 750.351920] [ T9870] cifs_flush+0x153/0x320 [cifs] [ 750.352042] [ T9870] filp_flush+0x107/0x1a0 [ 750.352046] [ T9870] filp_close+0x14/0x30 [ 750.352049] [ T9870] put_files_struct.part.0+0x126/0x2a0 [ 750.352053] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.352058] [ T9870] exit_files+0xab/0xe0 [ 750.352061] [ T9870] do_exit+0x148f/0x2980 [ 750.352065] [ T9870] ? __pfx_do_exit+0x10/0x10 [ 750.352069] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.352072] [ T9870] ? _raw_spin_lock_irq+0x8a/0xf0 [ 750.352076] [ T9870] do_group_exit+0xb5/0x250 [ 750.352080] [ T9870] get_signal+0x22d3/0x22e0 [ 750.352086] [ T9870] ? __pfx_get_signal+0x10/0x10 [ 750.352089] [ T9870] ? fpregs_assert_state_consistent+0x68/0x100 [ 750.352101] [ T9870] ? folio_add_lru+0xda/0x120 [ 750.352105] [ T9870] arch_do_signal_or_restart+0x92/0x630 [ 750.352109] [ T9870] ? __pfx_arch_do_signal_or_restart+0x10/0x10 [ 750.352115] [ T9870] exit_to_user_mode_loop+0x98/0x170 [ 750.352118] [ T9870] do_syscall_64+0x2cf/0xd80 [ 750.352123] [ T9870] ? __kasan_check_read+0x11/0x20 [ 750.352126] [ T9870] ? count_memcg_events+0x1b4/0x420 [ 750.352132] [ T9870] ? handle_mm_fault+0x148/0x690 [ 750.352136] [ T9870] ? _raw_spin_lock_irq+0x8a/0xf0 [ 750.352140] [ T9870] ? __kasan_check_read+0x11/0x20 [ 750.352143] [ T9870] ? fpregs_assert_state_consistent+0x68/0x100 [ 750.352146] [ T9870] ? irqentry_exit_to_user_mode+0x2e/0x250 [ 750.352151] [ T9870] ? irqentry_exit+0x43/0x50 [ 750.352154] [ T9870] ? exc_page_fault+0x75/0xe0 [ 750.352160] [ T9870] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.352163] [ T9870] RIP: 0033:0x7858c94ab6e2 [ 750.352167] [ T9870] Code: Unable to access opcode bytes at 0x7858c94ab6b8. [ 750.352175] [ T9870] RSP: 002b:00007858c9248ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000022 [ 750.352179] [ T9870] RAX: fffffffffffffdfe RBX: 00007858c92496c0 RCX: 00007858c94ab6e2 [ 750.352182] [ T9870] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 750.352184] [ T9870] RBP: 00007858c9248d10 R08: 0000000000000000 R09: 0000000000000000 [ 750.352185] [ T9870] R10: 0000000000000000 R11: 0000000000000246 R12: fffffffffffffde0 [ 750.352187] [ T9870] R13: 0000000000000020 R14: 0000000000000002 R15: 00007ffc072d2230 [ 750.352191] [ T9870] [ 750.352195] [ T9870] [ 750.395206] [ T9870] Allocated by task 9870 on cpu 0 at 750.346406s: [ 750.395523] [ T9870] kasan_save_stack+0x39/0x70 [ 750.395532] [ T9870] kasan_save_track+0x18/0x70 [ 750.395536] [ T9870] kasan_save_alloc_info+0x37/0x60 [ 750.395539] [ T9870] __kasan_slab_alloc+0x9d/0xa0 [ 750.395543] [ T9870] kmem_cache_alloc_noprof+0x13c/0x3f0 [ 750.395548] [ T9870] mempool_alloc_slab+0x15/0x20 [ 750.395553] [ T9870] mempool_alloc_noprof+0x135/0x340 [ 750.395557] [ T9870] smbd_post_send_iter+0x63e/0x3070 [cifs] [ 750.395694] [ T9870] smbd_send+0x58c/0x9c0 [cifs] [ 750.395819] [ T9870] __smb_send_rqst+0x931/0xec0 [cifs] [ 750.395950] [ T9870] smb_send_rqst+0x22e/0x2f0 [cifs] [ 750.396081] [ T9870] cifs_call_async+0x477/0xb00 [cifs] [ 750.396232] [ T9870] smb2_async_writev+0x15ff/0x2460 [cifs] [ 750.396359] [ T9870] cifs_issue_write+0x256/0x610 [cifs] [ 750.396492] [ T9870] netfs_do_issue_write+0xc2/0x340 [netfs] [ 750.396544] [ T9870] netfs_advance_write+0x45b/0x1270 [netfs] [ 750.396576] [ T9870] netfs_write_folio+0xd6c/0x1be0 [netfs] [ 750.396608] [ T9870] netfs_writepages+0x2e9/0xa80 [netfs] [ 750.396639] [ T9870] do_writepages+0x21f/0x590 [ 750.396643] [ T9870] filemap_fdatawrite_wbc+0xe1/0x140 [ 750.396647] [ T9870] __filemap_fdatawrite_range+0xba/0x100 [ 750.396651] [ T9870] filemap_write_and_wait_range+0x7d/0xf0 [ 750.396656] [ T9870] cifs_flush+0x153/0x320 [cifs] [ 750.396787] [ T9870] filp_flush+0x107/0x1a0 [ 750.396791] [ T9870] filp_close+0x14/0x30 [ 750.396795] [ T9870] put_files_struct.part.0+0x126/0x2a0 [ 750.396800] [ T9870] exit_files+0xab/0xe0 [ 750.396803] [ T9870] do_exit+0x148f/0x2980 [ 750.396808] [ T9870] do_group_exit+0xb5/0x250 [ 750.396813] [ T9870] get_signal+0x22d3/0x22e0 [ 750.396817] [ T9870] arch_do_signal_or_restart+0x92/0x630 [ 750.396822] [ T9870] exit_to_user_mode_loop+0x98/0x170 [ 750.396827] [ T9870] do_syscall_64+0x2cf/0xd80 [ 750.396832] [ T9870] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.396836] [ T9870] [ 750.397150] [ T9870] The buggy address belongs to the object at ffff888011082800 which belongs to the cache smbd_request_0000000008f3bd7b of size 144 [ 750.397798] [ T9870] The buggy address is located 0 bytes to the right of allocated 144-byte region [ffff888011082800, ffff888011082890) [ 750.398469] [ T9870] [ 750.398800] [ T9870] The buggy address belongs to the physical page: [ 750.399141] [ T9870] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11082 [ 750.399148] [ T9870] flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff) [ 750.399155] [ T9870] page_type: f5(slab) [ 750.399161] [ T9870] raw: 000fffffc0000000 ffff888022d65640 dead000000000122 0000000000000000 [ 750.399165] [ T9870] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 750.399169] [ T9870] page dumped because: kasan: bad access detected [ 750.399172] [ T9870] [ 750.399505] [ T9870] Memory state around the buggy address: [ 750.399863] [ T9870] ffff888011082780: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 750.400247] [ T9870] ffff888011082800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 750.400618] [ T9870] >ffff888011082880: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 750.400982] [ T9870] ^ [ 750.401370] [ T9870] ffff888011082900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 750.401774] [ T9870] ffff888011082980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 750.402171] [ T9870] ================================================================== [ 750.402696] [ T9870] Disabling lock debugging due to kernel taint [ 750.403202] [ T9870] BUG: unable to handle page fault for address: ffff8880110a2000 [ 750.403797] [ T9870] #PF: supervisor write access in kernel mode [ 750.404204] [ T9870] #PF: error_code(0x0003) - permissions violation [ 750.404581] [ T9870] PGD 5ce01067 P4D 5ce01067 PUD 5ce02067 PMD 78aa063 PTE 80000000110a2021 [ 750.404969] [ T9870] Oops: Oops: 0003 [#1] SMP KASAN PTI [ 750.405394] [ T9870] CPU: 0 UID: 0 PID: 9870 Comm: xfs_io Kdump: loaded Tainted: G B 6.16.0-rc2-metze.02+ #1 PREEMPT(voluntary) [ 750.406510] [ T9870] Tainted: [B]=BAD_PAGE [ 750.406967] [ T9870] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 750.407440] [ T9870] RIP: 0010:smb_set_sge+0x15c/0x3b0 [cifs] [ 750.408065] [ T9870] Code: 48 83 f8 ff 0f 84 b0 00 00 00 48 ba 00 00 00 00 00 fc ff df 4c 89 e1 48 c1 e9 03 80 3c 11 00 0f 85 69 01 00 00 49 8d 7c 24 08 <49> 89 04 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f [ 750.409283] [ T9870] RSP: 0018:ffffc90005e2e758 EFLAGS: 00010246 [ 750.409803] [ T9870] RAX: ffff888036c53400 RBX: ffffc90005e2e878 RCX: 1ffff11002214400 [ 750.410323] [ T9870] RDX: dffffc0000000000 RSI: dffffc0000000000 RDI: ffff8880110a2008 [ 750.411217] [ T9870] RBP: ffffc90005e2e798 R08: 0000000000000001 R09: 0000000000000400 [ 750.411770] [ T9870] R10: ffff888011082800 R11: 0000000000000000 R12: ffff8880110a2000 [ 750.412325] [ T9870] R13: 0000000000000000 R14: ffffc90005e2e888 R15: ffff88801a4b6000 [ 750.412901] [ T9870] FS: 0000000000000000(0000) GS:ffff88812bc68000(0000) knlGS:0000000000000000 [ 750.413477] [ T9870] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 750.414077] [ T9870] CR2: ffff8880110a2000 CR3: 000000005b0a6005 CR4: 00000000000726f0 [ 750.414654] [ T9870] Call Trace: [ 750.415211] [ T9870] [ 750.415748] [ T9870] smbd_post_send_iter+0x1990/0x3070 [cifs] [ 750.416449] [ T9870] ? __pfx_smbd_post_send_iter+0x10/0x10 [cifs] [ 750.417128] [ T9870] ? update_stack_state+0x2a0/0x670 [ 750.417685] [ T9870] ? cifs_flush+0x153/0x320 [cifs] [ 750.418380] [ T9870] ? cifs_flush+0x153/0x320 [cifs] [ 750.419055] [ T9870] ? update_stack_state+0x2a0/0x670 [ 750.419624] [ T9870] smbd_send+0x58c/0x9c0 [cifs] [ 750.420297] [ T9870] ? __pfx_smbd_send+0x10/0x10 [cifs] [ 750.420936] [ T9870] ? unwind_get_return_address+0x65/0xb0 [ 750.421456] [ T9870] ? __pfx_stack_trace_consume_entry+0x10/0x10 [ 750.421954] [ T9870] ? arch_stack_walk+0xa7/0x100 [ 750.422460] [ T9870] ? stack_trace_save+0x92/0xd0 [ 750.422948] [ T9870] __smb_send_rqst+0x931/0xec0 [cifs] [ 750.423579] [ T9870] ? kernel_text_address+0x173/0x190 [ 750.424056] [ T9870] ? kasan_save_stack+0x39/0x70 [ 750.424813] [ T9870] ? kasan_save_track+0x18/0x70 [ 750.425323] [ T9870] ? __kasan_slab_alloc+0x9d/0xa0 [ 750.425831] [ T9870] ? __pfx___smb_send_rqst+0x10/0x10 [cifs] [ 750.426548] [ T9870] ? smb2_mid_entry_alloc+0xb4/0x7e0 [cifs] [ 750.427231] [ T9870] ? cifs_call_async+0x277/0xb00 [cifs] [ 750.427882] [ T9870] ? cifs_issue_write+0x256/0x610 [cifs] [ 750.428909] [ T9870] ? netfs_do_issue_write+0xc2/0x340 [netfs] [ 750.429425] [ T9870] ? netfs_advance_write+0x45b/0x1270 [netfs] [ 750.429882] [ T9870] ? netfs_write_folio+0xd6c/0x1be0 [netfs] [ 750.430345] [ T9870] ? netfs_writepages+0x2e9/0xa80 [netfs] [ 750.430809] [ T9870] ? do_writepages+0x21f/0x590 [ 750.431239] [ T9870] ? filemap_fdatawrite_wbc+0xe1/0x140 [ 750.431652] [ T9870] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.432041] [ T9870] smb_send_rqst+0x22e/0x2f0 [cifs] [ 750.432586] [ T9870] ? __pfx_smb_send_rqst+0x10/0x10 [cifs] [ 750.433108] [ T9870] ? local_clock_noinstr+0xe/0xd0 [ 750.433482] [ T9870] ? kasan_save_alloc_info+0x37/0x60 [ 750.433855] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.434214] [ T9870] ? _raw_spin_lock+0x81/0xf0 [ 750.434561] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.434903] [ T9870] ? smb2_setup_async_request+0x293/0x580 [cifs] [ 750.435394] [ T9870] cifs_call_async+0x477/0xb00 [cifs] [ 750.435892] [ T9870] ? __pfx_smb2_writev_callback+0x10/0x10 [cifs] [ 750.436388] [ T9870] ? __pfx_cifs_call_async+0x10/0x10 [cifs] [ 750.436881] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.437237] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.437579] [ T9870] ? __smb2_plain_req_init+0x933/0x1090 [cifs] [ 750.438062] [ T9870] smb2_async_writev+0x15ff/0x2460 [cifs] [ 750.438557] [ T9870] ? sched_clock_noinstr+0x9/0x10 [ 750.438906] [ T9870] ? local_clock_noinstr+0xe/0xd0 [ 750.439293] [ T9870] ? __pfx_smb2_async_writev+0x10/0x10 [cifs] [ 750.439786] [ T9870] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 750.440143] [ T9870] ? _raw_spin_unlock+0xe/0x40 [ 750.440495] [ T9870] ? cifs_pick_channel+0x242/0x370 [cifs] [ 750.440989] [ T9870] cifs_issue_write+0x256/0x610 [cifs] [ 750.441492] [ T9870] ? cifs_issue_write+0x256/0x610 [cifs] [ 750.441987] [ T9870] netfs_do_issue_write+0xc2/0x340 [netfs] [ 750.442387] [ T9870] netfs_advance_write+0x45b/0x1270 [netfs] [ 750.442969] [ T9870] ? rolling_buffer_append+0x12d/0x440 [netfs] [ 750.443376] [ T9870] netfs_write_folio+0xd6c/0x1be0 [netfs] [ 750.443768] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.444145] [ T9870] netfs_writepages+0x2e9/0xa80 [netfs] [ 750.444541] [ T9870] ? __pfx_netfs_writepages+0x10/0x10 [netfs] [ 750.444936] [ T9870] ? exit_files+0xab/0xe0 [ 750.445312] [ T9870] ? do_exit+0x148f/0x2980 [ 750.445672] [ T9870] ? do_group_exit+0xb5/0x250 [ 750.446028] [ T9870] ? arch_do_signal_or_restart+0x92/0x630 [ 750.446402] [ T9870] ? exit_to_user_mode_loop+0x98/0x170 [ 750.446762] [ T9870] ? do_syscall_64+0x2cf/0xd80 [ 750.447132] [ T9870] ? entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.447499] [ T9870] do_writepages+0x21f/0x590 [ 750.447859] [ T9870] ? __pfx_do_writepages+0x10/0x10 [ 750.448236] [ T9870] filemap_fdatawrite_wbc+0xe1/0x140 [ 750.448595] [ T9870] __filemap_fdatawrite_range+0xba/0x100 [ 750.448953] [ T9870] ? __pfx___filemap_fdatawrite_range+0x10/0x10 [ 750.449336] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.449697] [ T9870] filemap_write_and_wait_range+0x7d/0xf0 [ 750.450062] [ T9870] cifs_flush+0x153/0x320 [cifs] [ 750.450592] [ T9870] filp_flush+0x107/0x1a0 [ 750.450952] [ T9870] filp_close+0x14/0x30 [ 750.451322] [ T9870] put_files_struct.part.0+0x126/0x2a0 [ 750.451678] [ T9870] ? __pfx__raw_spin_lock+0x10/0x10 [ 750.452033] [ T9870] exit_files+0xab/0xe0 [ 750.452401] [ T9870] do_exit+0x148f/0x2980 [ 750.452751] [ T9870] ? __pfx_do_exit+0x10/0x10 [ 750.453109] [ T9870] ? __kasan_check_write+0x14/0x30 [ 750.453459] [ T9870] ? _raw_spin_lock_irq+0x8a/0xf0 [ 750.453787] [ T9870] do_group_exit+0xb5/0x250 [ 750.454082] [ T9870] get_signal+0x22d3/0x22e0 [ 750.454406] [ T9870] ? __pfx_get_signal+0x10/0x10 [ 750.454709] [ T9870] ? fpregs_assert_state_consistent+0x68/0x100 [ 750.455031] [ T9870] ? folio_add_lru+0xda/0x120 [ 750.455347] [ T9870] arch_do_signal_or_restart+0x92/0x630 [ 750.455656] [ T9870] ? __pfx_arch_do_signal_or_restart+0x10/0x10 [ 750.455967] [ T9870] exit_to_user_mode_loop+0x98/0x170 [ 750.456282] [ T9870] do_syscall_64+0x2cf/0xd80 [ 750.456591] [ T9870] ? __kasan_check_read+0x11/0x20 [ 750.456897] [ T9870] ? count_memcg_events+0x1b4/0x420 [ 750.457280] [ T9870] ? handle_mm_fault+0x148/0x690 [ 750.457616] [ T9870] ? _raw_spin_lock_irq+0x8a/0xf0 [ 750.457925] [ T9870] ? __kasan_check_read+0x11/0x20 [ 750.458297] [ T9870] ? fpregs_assert_state_consistent+0x68/0x100 [ 750.458672] [ T9870] ? irqentry_exit_to_user_mode+0x2e/0x250 [ 750.459191] [ T9870] ? irqentry_exit+0x43/0x50 [ 750.459600] [ T9870] ? exc_page_fault+0x75/0xe0 [ 750.460130] [ T9870] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 750.460570] [ T9870] RIP: 0033:0x7858c94ab6e2 [ 750.461206] [ T9870] Code: Unable to access opcode bytes at 0x7858c94ab6b8. [ 750.461780] [ T9870] RSP: 002b:00007858c9248ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000022 [ 750.462327] [ T9870] RAX: fffffffffffffdfe RBX: 00007858c92496c0 RCX: 00007858c94ab6e2 [ 750.462653] [ T9870] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 750.462969] [ T9870] RBP: 00007858c9248d10 R08: 0000000000000000 R09: 0000000000000000 [ 750.463290] [ T9870] R10: 0000000000000000 R11: 0000000000000246 R12: fffffffffffffde0 [ 750.463640] [ T9870] R13: 0000000000000020 R14: 0000000000000002 R15: 00007ffc072d2230 [ 750.463965] [ T9870] [ 750.464285] [ T9870] Modules linked in: siw ib_uverbs ccm cmac nls_utf8 cifs cifs_arc4 nls_ucs2_utils rdma_cm iw_cm ib_cm ib_core cifs_md4 netfs softdog vboxsf vboxguest cpuid intel_rapl_msr intel_rapl_common intel_uncore_frequency_common intel_pmc_core pmt_telemetry pmt_class intel_pmc_ssram_telemetry intel_vsec polyval_clmulni ghash_clmulni_intel sha1_ssse3 aesni_intel rapl i2c_piix4 i2c_smbus joydev input_leds mac_hid sunrpc binfmt_misc kvm_intel kvm irqbypass sch_fq_codel efi_pstore nfnetlink vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock vmw_vmci dmi_sysfs ip_tables x_tables autofs4 hid_generic vboxvideo usbhid drm_vram_helper psmouse vga16fb vgastate drm_ttm_helper serio_raw hid ahci libahci ttm pata_acpi video wmi [last unloaded: vboxguest] [ 750.467127] [ T9870] CR2: ffff8880110a2000 cc: Tom Talpey cc: linux-cifs@vger.kernel.org Reviewed-by: David Howells Reviewed-by: Tom Talpey Fixes: c45ebd636c32 ("cifs: Provide the capability to extract from ITER_FOLIOQ to RDMA SGEs") Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 34331d7beed7576acfc98e991c39738b96162499 Author: zhangjian Date: Thu Jun 19 09:18:29 2025 +0800 smb: client: fix first command failure during re-negotiation after fabc4ed200f9, server_unresponsive add a condition to check whether client need to reconnect depending on server->lstrp. When client failed to reconnect for some time and abort connection, server->lstrp is updated for the last time. In the following scene, server->lstrp is too old. This cause next command failure in re-negotiation rather than waiting for re-negotiation done. 1. mount -t cifs -o username=Everyone,echo_internal=10 //$server_ip/export /mnt 2. ssh $server_ip "echo b > /proc/sysrq-trigger &" 3. ls /mnt 4. sleep 21s 5. ssh $server_ip "service firewalld stop" 6. ls # return EHOSTDOWN If the interval between 5 and 6 is too small, 6 may trigger sending negotiation request. Before backgrounding cifsd thread try to receive negotiation response from server in cifs_readv_from_socket, server_unresponsive may trigger cifs_reconnect which cause 6 to be failed: ls thread ---------------- smb2_negotiate server->tcpStatus = CifsInNegotiate compound_send_recv wait_for_compound_request cifsd thread ---------------- cifs_readv_from_socket server_unresponsive server->tcpStatus == CifsInNegotiate && jiffies > server->lstrp + 20s cifs_reconnect cifs_abort_connection: mid_state = MID_RETRY_NEEDED ls thread ---------------- cifs_sync_mid_result return EAGAIN smb2_negotiate return EHOSTDOWN Though server->lstrp means last server response time, it is updated in cifs_abort_connection and cifs_get_tcp_session. We can also update server->lstrp before switching into CifsInNegotiate state to avoid failure in 6. Fixes: 7ccc1465465d ("smb: client: fix hang in wait_for_response() for negproto") Acked-by: Paulo Alcantara (Red Hat) Acked-by: Meetakshi Setiya Signed-off-by: zhangjian Signed-off-by: Steve French commit f7301f856d351f068f807d0a3d442b85b2c6a01d Merge: 26fef998eb4df8 51a4598ad5d9eb Author: Linus Torvalds Date: Sat Jun 21 08:40:45 2025 -0700 Merge tag 'io_uring-6.16-20250621' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "A single fix to hopefully wrap up the saga of receive bundles" * tag 'io_uring-6.16-20250621' of git://git.kernel.dk/linux: io_uring/net: always use current transfer count for buffer put commit 26fef998eb4df8781c038ffa4be8287219a8df0a Merge: f0eeb5f6f645d1 6fcab279154392 Author: Linus Torvalds Date: Sat Jun 21 08:27:12 2025 -0700 Merge tag 'acpi-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a crash in ACPICA while attempting to evaluate a control method that expects more arguments than are being passed to it, which was exposed by a defective firmware update from a prominent OEM on multiple systems (Rafael Wysocki)" * tag 'acpi-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Refuse to evaluate a method if arguments are missing commit f0eeb5f6f645d13446649b226b1dc026bab418ed Merge: afa3d8b6e01b46 bbf10cd686835d Author: Linus Torvalds Date: Sat Jun 21 08:21:10 2025 -0700 Merge tag 'pci-v6.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fixes from Bjorn Helgaas: - Set up runtime PM even for devices that lack a PM Capability as we did before 4d4c10f763d7 ("PCI: Explicitly put devices into D0 when initializing"), which broke resume in some VFIO scenarios (Mario Limonciello) - Ignore pciehp Presence Detect Changed events caused by DPC, even if they occur after a Data Link Layer State Changed event, to fix a VFIO GPU passthrough regression in v6.13 (Lukas Wunner) * tag 'pci-v6.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: pciehp: Ignore belated Presence Detect Changed caused by DPC PCI/PM: Set up runtime PM even for devices without PCI PM commit afa3d8b6e01b4637d494bf1b1b8b531fddd1e452 Merge: 7c7f9dd1ea3fc6 33b6a1f155d627 Author: Linus Torvalds Date: Sat Jun 21 08:10:21 2025 -0700 Merge tag 'rcu/fixes-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux Pull RCU fix from Joel Fernandes: "We recently got a report of a crash [1] with misuse of call_rcu(). Instead of crashing the kernel, a warning and graceful return is better: - rcu: Return early if callback is not specified (Uladzislau Rezki)" Link: https://lore.kernel.org/all/aEnVuzK7VhGSizWj@pc636/ [1] * tag 'rcu/fixes-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: rcu: Return early if callback is not specified commit 7c7f9dd1ea3fc6b175b7227bb473dc883b925548 Merge: 3f75bfff44be06 d222b6e6fb31e3 Author: Linus Torvalds Date: Sat Jun 21 07:59:45 2025 -0700 Merge tag 'perf-tools-fixes-for-v6.16-1-2025-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix some file descriptor leaks that stand out with recent changes to 'perf list' - Fix prctl include to fix building 'perf bench futex' hash with musl libc - Restrict 'perf test' uniquifying entry to machines with 'uncore_imc' PMUs - Document new output fields (op, cache, mem, dtlb, snoop) used with 'perf mem' - Synchronize kernel header copies * tag 'perf-tools-fixes-for-v6.16-1-2025-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: tools headers x86 cpufeatures: Sync with the kernel sources perf bench futex: Fix prctl include in musl libc perf test: Directory file descriptor leak perf evsel: Missed close() when probing hybrid core PMUs tools headers: Synchronize linux/bits.h with the kernel sources tools arch amd ibs: Sync ibs.h with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers: Syncronize linux/build_bug.h with the kernel sources tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' tools headers UAPI: Sync linux/kvm.h with the kernel sources tools headers UAPI: Sync the drm/drm.h with the kernel sources perf beauty: Update copy of linux/socket.h with the kernel sources tools headers UAPI: Sync kvm header with the kernel sources tools headers x86 svm: Sync svm headers with the kernel sources tools headers UAPI: Sync KVM's vmx.h header with the kernel sources tools kvm headers arm64: Update KVM header from the kernel sources tools headers UAPI: Sync linux/prctl.h with the kernel sources to pick FUTEX knob perf mem: Document new output fields (op, cache, mem, dtlb, snoop) tools headers: Update the fs headers with the kernel sources perf test: Restrict uniquifying test to machines with 'uncore_imc' commit 714db279942b1fb9b97c4243e186825a96750239 Author: Shannon Nelson Date: Thu Jun 19 14:16:07 2025 -0700 CREDITS: Add entry for Shannon Nelson I'm retiring and have already had my name removed from MAINTAINERS. A couple of folks kindly suggested I should have an entry here. Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250619211607.1244217-1-sln@onemain.com Signed-off-by: Jakub Kicinski commit 0b39b055b5b48cbbdf5746a1ca6e3f6b0221e537 Author: Xiaowei Li Date: Fri Jun 20 10:27:02 2025 +0800 net: usb: qmi_wwan: add SIMCom 8230C composition Add support for SIMCom 8230C which is based on Qualcomm SDX35 chip. 0x9071: tty (DM) + tty (NMEA) + tty (AT) + rmnet T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9071 Rev= 5.15 S: Manufacturer=SIMCOM S: Product=SDXBAAGHA-IDP _SN:D744C4C5 S: SerialNumber=0123456789ABCDEF C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=none E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Xiaowei Li Acked-by: Bjørn Mork Link: https://patch.msgid.link/tencent_21D781FAA4969FEACA6ABB460362B52C9409@qq.com Signed-off-by: Jakub Kicinski commit 3f75bfff44be0646580fe4efda45d646f9c1693b Merge: a765b9e6db4082 6463cbe08b0cbf Author: Linus Torvalds Date: Fri Jun 20 22:36:48 2025 -0700 Merge tag 'mtd/fixes-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "The main fix that really needs to get in is the revert of the patch adding the new mtd_master class, because it entirely fails the partitioning if a specific Kconfig option is set. We need to think how to handle that differently, so let's revert it as we need to get back to the pen and paper situation again. Otherwise the definition of some Winbond SPI NAND chips are receiving some fixes (geometry and maximum frequency, mostly). And finally a small memory leak gets also fixed" * tag 'mtd/fixes-for-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: spinand: fix memory leak of ECC engine conf mtd: spinand: winbond: Prevent unsupported frequencies on dual/quad I/O variants mtd: spinand: winbond: Increase maximum frequency on an octal operation mtd: spinand: winbond: Fix W35N number of planes/LUN Revert "mtd: core: always create master device" commit a765b9e6db4082eefe6e1581a9495518685e7abf Merge: 11313e2f78128c 2a8a5a5dd06eef Author: Linus Torvalds Date: Fri Jun 20 22:34:52 2025 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small and obvious driver fixes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: elx: efct: Fix memory leak in efct_hw_parse_filter() scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() commit a42b4dcc4f9f309a23e6de5ae57a680b9fd2ea10 Author: Julien Massot Date: Fri May 16 16:12:13 2025 +0200 dt-bindings: clock: mediatek: Add #reset-cells property for MT8188 The '#reset-cells' property is permitted for some of the MT8188 clock controllers, but not listed as a valid property. Fixes: 9a5cd59640ac ("dt-bindings: clock: mediatek: Add SMI LARBs reset for MT8188") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Julien Massot Link: https://lore.kernel.org/r/20250516-dtb-check-mt8188-v2-1-fb60bef1b8e1@collabora.com Acked-by: Conor Dooley Signed-off-by: Stephen Boyd commit 64f7548aad63d2fbca2eeb6eb33361c218ebd5a5 Author: Arnd Bergmann Date: Fri Jun 20 21:19:40 2025 +0200 lib/crypto: sha256: Mark sha256_choose_blocks as __always_inline When the compiler chooses to not inline sha256_choose_blocks() in the purgatory code, it fails to link against the missing CPU specific version: x86_64-linux-ld: arch/x86/purgatory/purgatory.ro: in function `sha256_choose_blocks.part.0': sha256.c:(.text+0x6a6): undefined reference to `irq_fpu_usable' sha256.c:(.text+0x6c7): undefined reference to `sha256_blocks_arch' sha256.c:(.text+0x6cc): undefined reference to `sha256_blocks_simd' Mark this function as __always_inline to prevent this, same as sha256_finup(). Fixes: 5b90a779bc54 ("crypto: lib/sha256 - Add helpers for block-based shash") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250620191952.1867578-1-arnd@kernel.org Signed-off-by: Eric Biggers commit 3085ef9d9e7ab5ae4cddbe809e2e3b8dc11cdc75 Author: Shiji Yang Date: Wed Jun 18 23:07:43 2025 +0800 irqchip/ath79-misc: Fix missing prototypes warnings ath79_misc_irq_init() was defined but unused since commit 51fa4f8912c0 ("MIPS: ath79: drop legacy IRQ code"), so it's time to drop it. The build also warns about a missing prototype of get_c0_perfcount_int(). Remove the stale leftover function and add the missing include. Signed-off-by: Shiji Yang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/OSBPR01MB167032D2017645200787AAEBBC72A@OSBPR01MB1670.jpnprd01.prod.outlook.com commit 33b6a1f155d627f5bd80c7485c598ce45428f74f Author: Uladzislau Rezki (Sony) Date: Tue Jun 10 19:34:48 2025 +0200 rcu: Return early if callback is not specified Currently the call_rcu() API does not check whether a callback pointer is NULL. If NULL is passed, rcu_core() will try to invoke it, resulting in NULL pointer dereference and a kernel crash. To prevent this and improve debuggability, this patch adds a check for NULL and emits a kernel stack trace to help identify a faulty caller. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Joel Fernandes Signed-off-by: Joel Fernandes commit 28224ef02b56fceee2c161fe2a49a0bb197e44f5 Author: Paolo Bonzini Date: Fri Jun 20 14:20:20 2025 -0400 KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities Allow userspace to advertise TDG.VP.VMCALL subfunctions that the kernel also supports. For each output register of GetTdVmCallInfo's leaf 1, add two fields to KVM_TDX_CAPABILITIES: one for kernel-supported TDVMCALLs (userspace can set those blindly) and one for user-supported TDVMCALLs (userspace can set those if it knows how to handle them). Signed-off-by: Paolo Bonzini commit 4580dbef5ce0f95a4bd8ac2d007bc4fbf1539332 Author: Paolo Bonzini Date: Fri Jun 20 13:28:08 2025 -0400 KVM: TDX: Exit to userspace for SetupEventNotifyInterrupt Signed-off-by: Paolo Bonzini commit 25e8b1dd4883e6c251c3db5b347f3c8ae4ade921 Author: Binbin Wu Date: Tue Jun 10 10:14:21 2025 +0800 KVM: TDX: Exit to userspace for GetTdVmCallInfo Exit to userspace for TDG.VP.VMCALL via KVM_EXIT_TDX, to allow userspace to provide information about the support of TDVMCALLs when r12 is 1 for the TDVMCALLs beyond the GHCI base API. GHCI spec defines the GHCI base TDVMCALLs: , , , , <#VE.RequestMMIO>, , , and . They must be supported by VMM to support TDX guests. For GetTdVmCallInfo - When leaf (r12) to enumerate TDVMCALL functionality is set to 0, successful execution indicates all GHCI base TDVMCALLs listed above are supported. Update the KVM TDX document with the set of the GHCI base APIs. - When leaf (r12) to enumerate TDVMCALL functionality is set to 1, it indicates the TDX guest is querying the supported TDVMCALLs beyond the GHCI base TDVMCALLs. Exit to userspace to let userspace set the TDVMCALL sub-function bit(s) accordingly to the leaf outputs. KVM could set the TDVMCALL bit(s) supported by itself when the TDVMCALLs don't need support from userspace after returning from userspace and before entering guest. Currently, no such TDVMCALLs implemented, KVM just sets the values returned from userspace. Suggested-by: Paolo Bonzini Signed-off-by: Binbin Wu [Adjust userspace API. - Paolo] Signed-off-by: Paolo Bonzini commit cf207eac06f661fb692f405d5ab8230df884ee52 Author: Binbin Wu Date: Tue Jun 10 10:14:20 2025 +0800 KVM: TDX: Handle TDG.VP.VMCALL Handle TDVMCALL for GetQuote to generate a TD-Quote. GetQuote is a doorbell-like interface used by TDX guests to request VMM to generate a TD-Quote signed by a service hosting TD-Quoting Enclave operating on the host. A TDX guest passes a TD Report (TDREPORT_STRUCT) in a shared-memory area as parameter. Host VMM can access it and queue the operation for a service hosting TD-Quoting enclave. When completed, the Quote is returned via the same shared-memory area. KVM only checks the GPA from the TDX guest has the shared-bit set and drops the shared-bit before exiting to userspace to avoid bleeding the shared-bit into KVM's exit ABI. KVM forwards the request to userspace VMM (e.g. QEMU) and userspace VMM queues the operation asynchronously. KVM sets the return code according to the 'ret' field set by userspace to notify the TDX guest whether the request has been queued successfully or not. When the request has been queued successfully, the TDX guest can poll the status field in the shared-memory area to check whether the Quote generation is completed or not. When completed, the generated Quote is returned via the same buffer. Add KVM_EXIT_TDX as a new exit reason to userspace. Userspace is required to handle the KVM exit reason as the initial support for TDX, by reentering KVM to ensure that the TDVMCALL is complete. While at it, add a note that KVM_EXIT_HYPERCALL also requires reentry with KVM_RUN. Signed-off-by: Binbin Wu Tested-by: Mikko Ylinen Acked-by: Kai Huang [Adjust userspace API. - Paolo] Signed-off-by: Paolo Bonzini commit b5aafcb4efd2bdacbc37753cf807d69faa6a7304 Author: Binbin Wu Date: Tue Jun 10 10:14:19 2025 +0800 KVM: TDX: Add new TDVMCALL status code for unsupported subfuncs Add the new TDVMCALL status code TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED and return it for unimplemented TDVMCALL subfunctions. Returning TDVMCALL_STATUS_INVALID_OPERAND when a subfunction is not implemented is vague because TDX guests can't tell the error is due to the subfunction is not supported or an invalid input of the subfunction. New GHCI spec adds TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED to avoid the ambiguity. Use it instead of TDVMCALL_STATUS_INVALID_OPERAND. Before the change, for common guest implementations, when a TDX guest receives TDVMCALL_STATUS_INVALID_OPERAND, it has two cases: 1. Some operand is invalid. It could change the operand to another value retry. 2. The subfunction is not supported. For case 1, an invalid operand usually means the guest implementation bug. Since the TDX guest can't tell which case is, the best practice for handling TDVMCALL_STATUS_INVALID_OPERAND is stopping calling such leaf, treating the failure as fatal if the TDVMCALL is essential or ignoring it if the TDVMCALL is optional. With this change, TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED could be sent to old TDX guest that do not know about it, but it is expected that the guest will make the same action as TDVMCALL_STATUS_INVALID_OPERAND. Currently, no known TDX guest checks TDVMCALL_STATUS_INVALID_OPERAND specifically; for example Linux just checks for success. Signed-off-by: Binbin Wu [Return it for untrapped KVM_HC_MAP_GPA_RANGE. - Paolo] Signed-off-by: Paolo Bonzini commit 11313e2f78128c948e9b4eb58b3dacfc30964700 Merge: 299f489f5bad35 10af0273a35ab4 Author: Linus Torvalds Date: Fri Jun 20 10:07:56 2025 -0700 Merge tag 'gpio-fixes-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - correct the ACPI GPIO access mode in gpio-loongson-64bit - only obtain the interrupt for a single instance of the chip controlled by gpio-mlxbf3 - fix an invalid value return from probe() in gpio-pca953x - add missing MODULE_DEVICE_TABLE() to gpio-spacemit - update the HiSilicon GPIO driver maintainer entry * tag 'gpio-fixes-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mlxbf3: only get IRQ for device instance 0 gpio: pca953x: fix wrong error probe return value gpio: spacemit: Add missing MODULE_DEVICE_TABLE gpio: loongson-64bit: Correct Loongson-7A2000 ACPI GPIO access mode MAINTAINERS: Update HiSilicon GPIO driver maintainer commit 2f3fc29ae86f4a4e91c74e066e49657443af7149 Merge: a09e359d434e07 2e7be162996640 Author: Paolo Bonzini Date: Fri Jun 20 13:07:24 2025 -0400 Merge tag 'kvm-riscv-fixes-6.16-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.16, take #1 - Fix the size parameter check in SBI SFENCE calls - Don't treat SBI HFENCE calls as NOPs commit a09e359d434e07941095503dbf21c280143857e4 Merge: e04c78d86a9699 04c5355b2a94ff Author: Paolo Bonzini Date: Fri Jun 20 13:07:10 2025 -0400 Merge tag 'kvmarm-fixes-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take #3 - Fix another set of FP/SIMD/SVE bugs affecting NV, and plugging some missing synchronisation - A small fix for the irqbypass hook fixes, tightening the check and ensuring that we only deal with MSI for both the old and the new route entry - Rework the way the shadow LRs are addressed in a nesting configuration, plugging an embarrassing bug as well as simplifying the whole process - Add yet another fix for the dreaded arch_timer_edge_cases selftest commit 850f0e2433cdd38f36d80a4c1ab59f82029bef74 Author: Drew Fustini Date: Wed Jun 18 20:54:57 2025 -0700 MAINTAINERS: Update Drew Fustini's email address Switch from personal domain to kernel.org address. Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20250619035457.331065-1-fustini@kernel.org Signed-off-by: Palmer Dabbelt commit 299f489f5bad3554531f67335d1762225448ff39 Merge: d41fef1ce2f3cd 33bdee12822d24 Author: Linus Torvalds Date: Fri Jun 20 09:59:20 2025 -0700 Merge tag 'sound-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes. All changes are device-specific at this time: - Fixes for Cirrus codecs with SoundWire, including firmware name updates - Fix for i.MX8 SoC DSP - Usual HD-audio, USB-audio, and ASoC AMD quirks - Fixes for legendary SoundBlaster AWE32 ISA device (a real one, we still got a bug report after 25 years) - Minor build fixes" * tag 'sound-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits) ALSA: hda/realtek: Enable headset Mic on Positivo P15X ASoC: Intel: sof-function-topology-lib: Print out the unsupported dmic count ASoC: doc: cs35l56: Add CS35L63 to the list of supported devices ASoC: SOF: imx8: add core shutdown operation for imx8/imx8x ALSA: hda/realtek: Add quirk for Asus GA605K ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged ASoC: amd: yc: update quirk data for HP Victus ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card ASoC: amd: yc: Add quirk for MSI Bravo 17 D7VF internal mic ASoC: doc: cs35l56: Update to add new SoundWire firmware filename suffix ASoC: cs35l56: Use SoundWire address as alternate firmware suffix on L56 B0 ASoC: cs35l56: Use SoundWire address as firmware name suffix for new silicon ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present() ALSA: sb: Force to disable DMAs once when DMA mode is changed ALSA: sb: Don't allow changing the DMA mode during operations ALSA: hda/realtek: Add quirk for Asus GU605C ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X513EA ALSA: hda/realtek - Add mute LED support for HP Victus 16-s1xxx and HP Victus 15-fa1xxx ALSA: ctxfi: Replace deprecated strcpy() with strscpy() ... commit d41fef1ce2f3cd9df128d2c3cf6d91ce15130daf Merge: 75f5f23f8787c5 39dfc971e42d88 Author: Linus Torvalds Date: Fri Jun 20 09:54:24 2025 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "There's nothing major (even the vmalloc one is just suppressing a potential warning) but all worth having, nonetheless. - Suppress KASAN false positive in stack unwinding code - Drop redundant reset of the GCS state on exec() - Don't try to descend into a !present PMD when creating a huge vmap() entry at the PUD level - Fix a small typo in the arm64 booting Documentation" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() arm64/gcs: Don't call gcs_free() during flush_gcs() arm64: Restrict pagetable teardown to avoid false warning docs: arm64: Fix ICC_SRE_EL2 register typo in booting.rst commit db0ff7e15923ffa7067874604ca275e92343f1b1 Author: Shuai Zhang Date: Mon Jun 9 18:55:00 2025 +0800 driver: bluetooth: hci_qca:fix unable to load the BT driver Some modules have BT_EN enabled via a hardware pull-up, meaning it is not defined in the DTS and is not controlled through the power sequence. In such cases, fall through to follow the legacy flow. Signed-off-by: Shuai Zhang Signed-off-by: Luiz Augusto von Dentz commit 042bb9603c44620dce98717a2d23235ca57a00d7 Author: Frédéric Danis Date: Thu Jun 12 09:50:34 2025 +0200 Bluetooth: L2CAP: Fix L2CAP MTU negotiation OBEX download from iPhone is currently slow due to small packet size used to transfer data which doesn't follow the MTU negotiated during L2CAP connection, i.e. 672 bytes instead of 32767: < ACL Data TX: Handle 11 flags 0x00 dlen 12 L2CAP: Connection Request (0x02) ident 18 len 4 PSM: 4103 (0x1007) Source CID: 72 > ACL Data RX: Handle 11 flags 0x02 dlen 16 L2CAP: Connection Response (0x03) ident 18 len 8 Destination CID: 14608 Source CID: 72 Result: Connection successful (0x0000) Status: No further information available (0x0000) < ACL Data TX: Handle 11 flags 0x00 dlen 27 L2CAP: Configure Request (0x04) ident 20 len 19 Destination CID: 14608 Flags: 0x0000 Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 32767 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 63 Max transmit: 3 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 > ACL Data RX: Handle 11 flags 0x02 dlen 26 L2CAP: Configure Request (0x04) ident 72 len 18 Destination CID: 72 Flags: 0x0000 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 32 Max transmit: 255 Retransmission timeout: 0 Monitor timeout: 0 Maximum PDU size: 65527 Option: Frame Check Sequence (0x05) [mandatory] FCS: 16-bit FCS (0x01) < ACL Data TX: Handle 11 flags 0x00 dlen 29 L2CAP: Configure Response (0x05) ident 72 len 21 Source CID: 14608 Flags: 0x0000 Result: Success (0x0000) Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 672 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 32 Max transmit: 255 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 > ACL Data RX: Handle 11 flags 0x02 dlen 32 L2CAP: Configure Response (0x05) ident 20 len 24 Source CID: 72 Flags: 0x0000 Result: Success (0x0000) Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 32767 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 63 Max transmit: 3 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 Option: Frame Check Sequence (0x05) [mandatory] FCS: 16-bit FCS (0x01) ... > ACL Data RX: Handle 11 flags 0x02 dlen 680 Channel: 72 len 676 ctrl 0x0202 [PSM 4103 mode Enhanced Retransmission (0x03)] {chan 8} I-frame: Unsegmented TxSeq 1 ReqSeq 2 < ACL Data TX: Handle 11 flags 0x00 dlen 13 Channel: 14608 len 9 ctrl 0x0204 [PSM 4103 mode Enhanced Retransmission (0x03)] {chan 8} I-frame: Unsegmented TxSeq 2 ReqSeq 2 > ACL Data RX: Handle 11 flags 0x02 dlen 680 Channel: 72 len 676 ctrl 0x0304 [PSM 4103 mode Enhanced Retransmission (0x03)] {chan 8} I-frame: Unsegmented TxSeq 2 ReqSeq 3 The MTUs are negotiated for each direction. In this traces 32767 for iPhone->localhost and no MTU for localhost->iPhone, which based on '4.4 L2CAP_CONFIGURATION_REQ' (Core specification v5.4, Vol. 3, Part A): The only parameters that should be included in the L2CAP_CONFIGURATION_REQ packet are those that require different values than the default or previously agreed values. ... Any missing configuration parameters are assumed to have their most recently explicitly or implicitly accepted values. and '5.1 Maximum transmission unit (MTU)': If the remote device sends a positive L2CAP_CONFIGURATION_RSP packet it should include the actual MTU to be used on this channel for traffic flowing into the local device. ... The default value is 672 octets. is set by BlueZ to 672 bytes. It seems that the iPhone used the lowest negotiated value to transfer data to the localhost instead of the negotiated one for the incoming direction. This could be fixed by using the MTU negotiated for the other direction, if exists, in the L2CAP_CONFIGURATION_RSP. This allows to use segmented packets as in the following traces: < ACL Data TX: Handle 11 flags 0x00 dlen 12 L2CAP: Connection Request (0x02) ident 22 len 4 PSM: 4103 (0x1007) Source CID: 72 < ACL Data TX: Handle 11 flags 0x00 dlen 27 L2CAP: Configure Request (0x04) ident 24 len 19 Destination CID: 2832 Flags: 0x0000 Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 32767 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 63 Max transmit: 3 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 > ACL Data RX: Handle 11 flags 0x02 dlen 26 L2CAP: Configure Request (0x04) ident 15 len 18 Destination CID: 72 Flags: 0x0000 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 32 Max transmit: 255 Retransmission timeout: 0 Monitor timeout: 0 Maximum PDU size: 65527 Option: Frame Check Sequence (0x05) [mandatory] FCS: 16-bit FCS (0x01) < ACL Data TX: Handle 11 flags 0x00 dlen 29 L2CAP: Configure Response (0x05) ident 15 len 21 Source CID: 2832 Flags: 0x0000 Result: Success (0x0000) Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 32767 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 32 Max transmit: 255 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 > ACL Data RX: Handle 11 flags 0x02 dlen 32 L2CAP: Configure Response (0x05) ident 24 len 24 Source CID: 72 Flags: 0x0000 Result: Success (0x0000) Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 32767 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Enhanced Retransmission (0x03) TX window size: 63 Max transmit: 3 Retransmission timeout: 2000 Monitor timeout: 12000 Maximum PDU size: 1009 Option: Frame Check Sequence (0x05) [mandatory] FCS: 16-bit FCS (0x01) ... > ACL Data RX: Handle 11 flags 0x02 dlen 1009 Channel: 72 len 1005 ctrl 0x4202 [PSM 4103 mode Enhanced Retransmission (0x03)] {chan 8} I-frame: Start (len 21884) TxSeq 1 ReqSeq 2 > ACL Data RX: Handle 11 flags 0x02 dlen 1009 Channel: 72 len 1005 ctrl 0xc204 [PSM 4103 mode Enhanced Retransmission (0x03)] {chan 8} I-frame: Continuation TxSeq 2 ReqSeq 2 This has been tested with kernel 5.4 and BlueZ 5.77. Cc: stable@vger.kernel.org Signed-off-by: Frédéric Danis Signed-off-by: Luiz Augusto von Dentz commit 89a33de314945c866b155d369f224fa552af1722 Author: Kiran K Date: Tue Jun 10 19:30:37 2025 +0530 Bluetooth: btintel_pcie: Fix potential race condition in firmware download During firmware download, if an error occurs, interrupts must be disabled, synchronized, and re-enabled before retrying the download. This change ensures proper interrupt handling to prevent race conditions. Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 417b8af2e30d7f131682a893ad79c506fd39c624 Author: Gao Xiang Date: Fri Jun 20 23:31:08 2025 +0800 erofs: remove a superfluous check for encoded extents It is possible when an inode is split into segments for multi-threaded compression, and the tail extent of a segment could also be small. Fixes: 1d191b4ca51d ("erofs: implement encoded extent metadata") Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250620153108.1368029-1-hsiangkao@linux.alibaba.com commit 51a4598ad5d9eb6be4ec9ba65bbfdf0ac302eb2e Author: Jens Axboe Date: Fri Jun 20 07:41:21 2025 -0600 io_uring/net: always use current transfer count for buffer put A previous fix corrected the retry condition for when to continue a current bundle, but it missed that the current (not the total) transfer count also applies to the buffer put. If not, then for incrementally consumed buffer rings repeated completions on the same request may end up over consuming. Reported-by: Roy Tang (ErgoniaTrading) Cc: stable@vger.kernel.org Fixes: 3a08988123c8 ("io_uring/net: only retry recv bundle for a full transfer") Link: https://github.com/axboe/liburing/issues/1423 Signed-off-by: Jens Axboe commit f8b53cc9174c5980549f60c972faad82b660b62d Author: Vitaly Kuznetsov Date: Fri Jun 20 13:16:07 2025 +0200 efi: Fix .data section size calculations when .sbat is present Commit 0f9a1739dd0e ("efi: zboot specific mechanism for embedding SBAT section") neglected to adjust the sizes of the .data section when CONFIG_EFI_SBAT_FILE is set. As the result, the produced PE binary is incorrect and some tools complain about it. E.g. 'sbsign' reports: # sbsign --key my.key --cert my.crt arch/arm64/boot/vmlinuz.efi warning: file-aligned section .data extends beyond end of file warning: checksum areas are greater than image size. Invalid section table? Note, '__data_size' is also used in the PE optional header and it is not entirely clear whether .sbat needs to be accounted as part of SizeOfInitializedData or not. As the header seems to be unused by the real world firmware, keeping the field equal to __data_size. Fixes: 0f9a1739dd0e ("efi: zboot specific mechanism for embedding SBAT section") Reported-by: Heinrich Schuchardt Signed-off-by: Vitaly Kuznetsov Signed-off-by: Ard Biesheuvel commit 33bdee12822d240caaa01aeac231eac42182fd64 Author: Edson Juliano Drosdeck Date: Thu Jun 19 16:12:15 2025 -0300 ALSA: hda/realtek: Enable headset Mic on Positivo P15X Positivo P15X is equipped with ALC269VC, and needs a fix to make the headset mic to work. Also must to limits the internal microphone boost. Signed-off-by: Edson Juliano Drosdeck Link: https://patch.msgid.link/20250619191215.17203-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai commit 721385192415b6e9979454cdb08d67e2ded684d6 Merge: 60599e4f8a041d 16ea4666bbb7f5 Author: Takashi Iwai Date: Fri Jun 20 09:58:57 2025 +0200 Merge tag 'asoc-fix-v6.16-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 A relatively large collection of fixes and updates that came in since the merge window. Of note are a couple of Cirrus ones which change the firmware naming for some newly added devices, and a fix from Laurentiu for issues booting firmwares on the DSPs on i.MX8 SoCs. commit a8905238c3bbe13db90065ed74682418f23830c3 Author: Akira Inoue Date: Thu Jun 12 13:34:38 2025 +0900 HID: lenovo: Add support for ThinkPad X1 Tablet Thin Keyboard Gen2 Add "Thinkpad X1 Tablet Gen 2 Keyboard" PID to hid-lenovo driver to fix trackpoint not working issue. Signed-off-by: Akira Inoue Signed-off-by: Jiri Kosina commit 4540e41e753a7d69ecd3f5bad51fe620205c3a18 Author: Qasim Ijaz Date: Sun Jun 15 23:59:41 2025 +0100 HID: appletb-kbd: fix "appletb_backlight" backlight device reference counting During appletb_kbd_probe, probe attempts to get the backlight device by name. When this happens backlight_device_get_by_name looks for a device in the backlight class which has name "appletb_backlight" and upon finding a match it increments the reference count for the device and returns it to the caller. However this reference is never released leading to a reference leak. Fix this by decrementing the backlight device reference count on removal via put_device and on probe failure. Fixes: 93a0fc489481 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar") Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Reviewed-by: Aditya Garg Signed-off-by: Jiri Kosina commit 75f5f23f8787c5e184fcb2fbcd02d8e9317dc5e7 Merge: 255da9b8d761c2 8c847285588435 Author: Linus Torvalds Date: Thu Jun 19 23:29:35 2025 -0700 Merge tag 'block-6.16-20250619' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Two fixes for aoe which fixes issues dating back to when this driver was converted to blk-mq - Fix for ublk, checking for valid queue depth and count values before setting up a device * tag 'block-6.16-20250619' of git://git.kernel.dk/linux: ublk: santizize the arguments from userspace when adding a device aoe: defer rexmit timer downdev work to workqueue aoe: clean device rq_list in aoedev_downdev() commit 255da9b8d761c20dbdca3ff2c96635d50a9f1fb8 Merge: 5f2b6c5f6b692c e1c75831f682ee Author: Linus Torvalds Date: Thu Jun 19 23:25:28 2025 -0700 Merge tag 'io_uring-6.16-20250619' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Two fixes for error injection failures. One fixes a task leak issue introduced in this merge window, the other an older issue with handling allocation of a mapped buffer. - Fix for a syzbot issue that triggers a kmalloc warning on attempting an allocation that's too large - Fix for an error injection failure causing a double put of a task, introduced in this merge window * tag 'io_uring-6.16-20250619' of git://git.kernel.dk/linux: io_uring: fix potential page leak in io_sqe_buffer_register() io_uring/sqpoll: don't put task_struct on tctx setup failure io_uring: remove duplicate io_uring_alloc_task_context() definition io_uring: fix task leak issue in io_wq_create() io_uring/rsrc: validate buffer count with offset for cloning commit 5f2b6c5f6b692c696a232d12c43b8e41c0d393b9 Merge: 0fa5248255a1f4 b8de9b21e8499a Author: Linus Torvalds Date: Thu Jun 19 23:18:59 2025 -0700 Merge tag 'drm-fixes-2025-06-20' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Bit of an uptick in fixes for rc3, msm and amdgpu leading the way, with i915/xe/nouveau with a few each and then some scattered misc bits, nothing looks too crazy: msm: - Display: - Fixed DP output on SDM845 - Fixed 10nm DSI PLL init - GPU: - SUBMIT ioctl error path leak fixes - drm half of stall-on-fault fixes - a7xx: Missing CP_RESET_CONTEXT_STATE - Skip GPU component bind if GPU is not in the device table i915: - Fix MIPI vtotal programming off by one on Broxton - Fix PMU code for GCOV and AutoFDO enabled build xe: - A workaround update - Fix memset on iomem - Fix early wedge on GuC Load failure amdgpu: - DP tunneling fix - LTTPR fix - DSC fix - DML2.x ABGR16161616 fix - RMCM fix - Backlight fixes - GFX11 kicker support - SDMA reset fixes - VCN 5.0.1 fix - Reset fix - Misc small fixes amdkfd: - SDMA reset fix - Fix race in GWS scheduling nouveau: - update docs reference - fix backlight name buffer size - fix UAF in r535 gsp rpc msg - fix undefined shift mgag200: - drop export header ast: - drop export header malidp: - drop informational error ssd130x: - fix clear columns etnaviv: - scheduler locking fix v3d: - null pointer crash fix" * tag 'drm-fixes-2025-06-20' of https://gitlab.freedesktop.org/drm/kernel: (50 commits) drm/xe: Fix early wedge on GuC load failure drm/xe: Fix memset on iomem drm/xe/bmg: Update Wa_16023588340 drm/amdgpu/sdma5.2: init engine reset mutex drm/amdkfd: Fix race in GWS queue scheduling drm/amdgpu/sdma5: init engine reset mutex drm/amdgpu: switch job hw_fence to amdgpu_fence drm/amdgpu: Fix SDMA UTC_L1 handling during start/stop sequences drm/amdgpu: Release reset locks during failures drm/amd/display: Check dce_hwseq before dereferencing it drm/amdgpu: VCN v5_0_1 to prevent FW checking RB during DPG pause drm/amdgpu: Use logical instance ID for SDMA v4_4_2 queue operations drm/amdgpu: Fix SDMA engine reset with logical instance ID drm/amdgpu: add kicker fws loading for gfx11/smu13/psp13 drm/amdgpu: Add kicker device detection drm/amd/display: Export full brightness range to userspace drm/amd/display: Only read ACPI backlight caps once drm/amd/display: Fix RMCM programming seq errors drm/amd/display: Fix mpv playback corruption on weston drm/amd/display: Add more checks for DSC / HUBP ONO guarantees ... commit 0fa5248255a1f4cc87f35610f2762d9cdd919246 Merge: 41687a5c6f8b07 df29f60369ccec Author: Linus Torvalds Date: Thu Jun 19 23:15:10 2025 -0700 Merge tag 'v6.16-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a regression in ahash (broken fallback finup) and reinstates a Kconfig option to control the extra self-tests" * tag 'v6.16-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ahash - Fix infinite recursion in ahash_def_finup crypto: testmgr - reinstate kconfig control over full self-tests commit c742d127d2d831aa83ae2987a508bca2bf0c7736 Author: Lorenzo Stoakes Date: Tue Jun 17 15:41:30 2025 +0100 MAINTAINERS: add additional mmap-related files to mmap section msync and nommu are directly related to memory mapping, mincore is less so but all are roughly speaking operating on virtual memory mappings from the point of view of the user so this seems the most appropriate place for them. Link: https://lkml.kernel.org/r/20250617144130.147847-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Pedro Falcato Acked-by: Liam R. Howlett Acked-by: Vlastimil Babka Cc: David Hildenbrand Cc: Jann Horn Signed-off-by: Andrew Morton commit db5921ab8aa23142b277325192a7443601dc4534 Author: Lorenzo Stoakes Date: Tue Jun 17 17:13:59 2025 +0100 MAINTAINERS: add memfd, shmem quota files to shmem section These files seem best suited to shmem. Link: https://lkml.kernel.org/r/20250617161359.166955-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Baolin Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit a1540dcbe0246c42ee271a3b7bba5ec7c933321a Author: Lorenzo Stoakes Date: Tue Jun 17 17:51:42 2025 +0100 MAINTAINERS: add stray rmap file to mm rmap section page_vma_mapped_walk() is used to traverse page tables from a VMA, used by rmap logic once the reverse mapping has been traversed to the VMA level. It is also used by other users (migration, damon, etc.) but is primarily used by the reverse mapping and is a key part of its logic, so it seems appropriate to place it here. Link: https://lkml.kernel.org/r/20250617165142.173716-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d91b00b687abf6fef13be030abd848416f320149 Author: Lorenzo Stoakes Date: Tue Jun 17 18:15:38 2025 +0100 MAINTAINERS: add hugetlb_cgroup.c to hugetlb section This file is clearly specific to hugetlb so this seems the most appropriate place for it. Link: https://lkml.kernel.org/r/20250617171538.178042-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Muchun Song Cc: Oscar Salvador Signed-off-by: Andrew Morton commit b6d19f3742ff3429d8eb2cdf51a8ab598c197ee5 Author: Lorenzo Stoakes Date: Tue Jun 17 18:45:38 2025 +0100 MAINTAINERS: add further init files to mm init block These files comprise the bootmem info logic which is initialised on startup and also memory tests that are run on startup and as such this seems the most appropriate section for them. Link: https://lkml.kernel.org/r/20250617174538.188977-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton commit 883cf5b0b8389610f17106c454180c7f54b8d486 Author: Oscar Salvador Date: Tue Jun 17 20:59:10 2025 +0200 MAINTAINERS: update maintainers for HugeTLB Change my role to Maintainer as I am quite involved in HugeTLB development, and will be more so with the upcoming HugetLB-pagewalk unification, so I would like to help Munchun take care of the code. Besides, having two people will help in offloading some pressure. Also add David as a Reviewer since he has quite some knowledge in the field and has already provided valuable feedback. Link: https://lkml.kernel.org/r/20250617185910.471406-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: Muchun Song Cc: Michal Hocko Cc: Peter Xu Signed-off-by: Andrew Morton commit fba46a5d83ca8decb338722fb4899026d8d9ead2 Author: Liam R. Howlett Date: Mon Jun 16 14:45:20 2025 -0400 maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate() Temporarily clear the preallocation flag when explicitly requesting allocations. Pre-existing allocations are already counted against the request through mas_node_count_gfp(), but the allocations will not happen if the MA_STATE_PREALLOC flag is set. This flag is meant to avoid re-allocating in bulk allocation mode, and to detect issues with preallocation calculations. The MA_STATE_PREALLOC flag should also always be set on zero allocations so that detection of underflow allocations will print a WARN_ON() during consumption. User visible effect of this flaw is a WARN_ON() followed by a null pointer dereference when subsequent requests for larger number of nodes is ignored, such as the vma merge retry in mmap_region() caused by drivers altering the vma flags (which happens in v6.6, at least) Link: https://lkml.kernel.org/r/20250616184521.3382795-3-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Zhaoyang Huang Reported-by: Hailong Liu Link: https://lore.kernel.org/all/1652f7eb-a51b-4fee-8058-c73af63bacd1@oppo.com/ Link: https://lore.kernel.org/all/20250428184058.1416274-1-Liam.Howlett@oracle.com/ Link: https://lore.kernel.org/all/20250429014754.1479118-1-Liam.Howlett@oracle.com/ Cc: Lorenzo Stoakes Cc: Suren Baghdasaryan Cc: Hailong Liu Cc: zhangpeng.00@bytedance.com Cc: Steve Kang Cc: Matthew Wilcox Cc: Sidhartha Kumar Cc: Signed-off-by: Andrew Morton commit 40ffd2887635c492b758d8b02172c97f5d42f593 Author: Lorenzo Stoakes Date: Mon Jun 16 21:08:44 2025 +0100 MAINTAINERS: add missing test files to mm gup section We previously overlooked GUP test files that sensibly should belong to the GUP section, include them now. Link: https://lkml.kernel.org/r/20250616200844.560225-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand Reviewed-by: John Hubbard Cc: Jason Gunthorpe Cc: Peter Xu Signed-off-by: Andrew Morton commit 38103247777695ca2b09691b2247e66f157908c6 Author: Lorenzo Stoakes Date: Mon Jun 16 21:16:43 2025 +0100 MAINTAINERS: add missing mm/workingset.c file to mm reclaim section The working set logic belongs very much to the reclaim section and is otherwise not assigned to any other MAINTAINERS section so add it here. Link: https://lkml.kernel.org/r/20250616201643.561626-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand Acked-by: Shakeel Butt Acked-by: Qi Zheng Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton commit 3333871296efd52ef6f6d5cce5a92dc7b06ba879 Author: Pedro Falcato Date: Tue Jun 10 13:22:09 2025 +0100 selftests/mm: skip uprobe vma merge test if uprobes are not enabled If uprobes are not enabled, the test currently fails with: 7151 12:46:54.627936 # # # RUN merge.handle_uprobe_upon_merged_vma ... 7152 12:46:54.639014 # # f /sys/bus/event_source/devices/uprobe/type 7153 12:46:54.639306 # # fopen: No such file or directory 7154 12:46:54.650451 # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0) 7155 12:46:54.650730 # # # handle_uprobe_upon_merged_vma: Test terminated by assertion 7156 12:46:54.661750 # # # FAIL merge.handle_uprobe_upon_merged_vma 7157 12:46:54.662030 # # not ok 8 merge.handle_uprobe_upon_merged_vma Skipping is a more sane and friendly behavior here. Link: https://lkml.kernel.org/r/20250610122209.3177587-1-pfalcato@suse.de Fixes: efe99fabeb11 ("selftests/mm: add test about uprobe pte be orphan during vma merge") Signed-off-by: Pedro Falcato Reported-by: Aishwarya Closes: https://lore.kernel.org/linux-mm/20250610103729.72440-1-aishwarya.tcv@arm.com/ Reviewed-by: Lorenzo Stoakes Tested-by : Donet Tom Reviewed-by : Donet Tom Reviewed-by: Dev Jain Reviewed-by: Pu Lehui Cc: Jann Horn Cc: Liam Howlett Cc: Mark Brown Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 95b2e31e1752494d477c5da89d6789f769b0d67b Author: Kuan-Wei Chiu Date: Sun Jun 15 04:23:53 2025 +0800 bcache: remove unnecessary select MIN_HEAP After reverting the transition to the generic min heap library, bcache no longer depends on MIN_HEAP. The select entry can be removed to reduce code size and shrink the kernel's attack surface. This change effectively reverts the bcache-related part of commit 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions"). This is part of a series of changes to address a performance regression caused by the use of the generic min_heap implementation. As reported by Robert, bcache now suffers from latency spikes, with P100 (max) latency increasing from 600 ms to 2.4 seconds every 5 minutes. These regressions degrade bcache's effectiveness as a low-latency cache layer and lead to frequent timeouts and application stalls in production environments. Link: https://lore.kernel.org/lkml/CAJhEC05+0S69z+3+FB2Cd0hD+pCRyWTKLEOsc8BOmH73p1m+KQ@mail.gmail.com Link: https://lkml.kernel.org/r/20250614202353.1632957-4-visitorckw@gmail.com Fixes: 866898efbb25 ("bcache: remove heap-related macros and switch to generic min_heap") Fixes: 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions") Signed-off-by: Kuan-Wei Chiu Reported-by: Robert Pang Closes: https://lore.kernel.org/linux-bcache/CAJhEC06F_AtrPgw2-7CvCqZgeStgCtitbD-ryuPpXQA-JG5XXw@mail.gmail.com Acked-by: Coly Li Cc: Ching-Chun (Jim) Huang Cc: Kent Overstreet Cc: Signed-off-by: Andrew Morton commit 48fd7ebe00c1cdc782b42576548b25185902f64c Author: Kuan-Wei Chiu Date: Sun Jun 15 04:23:52 2025 +0800 Revert "bcache: remove heap-related macros and switch to generic min_heap" This reverts commit 866898efbb25bb44fd42848318e46db9e785973a. The generic bottom-up min_heap implementation causes performance regression in invalidate_buckets_lru(), a hot path in bcache. Before the cache is fully populated, new_bucket_prio() often returns zero, leading to many equal comparisons. In such cases, bottom-up sift_down performs up to 2 * log2(n) comparisons, while the original top-down approach completes with just O() comparisons, resulting in a measurable performance gap. The performance degradation is further worsened by the non-inlined min_heap API functions introduced in commit 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions"), adding function call overhead to this critical path. As reported by Robert, bcache now suffers from latency spikes, with P100 (max) latency increasing from 600 ms to 2.4 seconds every 5 minutes. These regressions degrade bcache's effectiveness as a low-latency cache layer and lead to frequent timeouts and application stalls in production environments. This revert aims to restore bcache's original low-latency behavior. Link: https://lore.kernel.org/lkml/CAJhEC05+0S69z+3+FB2Cd0hD+pCRyWTKLEOsc8BOmH73p1m+KQ@mail.gmail.com Link: https://lkml.kernel.org/r/20250614202353.1632957-3-visitorckw@gmail.com Fixes: 866898efbb25 ("bcache: remove heap-related macros and switch to generic min_heap") Fixes: 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions") Signed-off-by: Kuan-Wei Chiu Reported-by: Robert Pang Closes: https://lore.kernel.org/linux-bcache/CAJhEC06F_AtrPgw2-7CvCqZgeStgCtitbD-ryuPpXQA-JG5XXw@mail.gmail.com Acked-by: Coly Li Cc: Ching-Chun (Jim) Huang Cc: Kent Overstreet Cc: Signed-off-by: Andrew Morton commit 845f1f2d69f3f49b3d8c142265952c8257e3368c Author: Kuan-Wei Chiu Date: Sun Jun 15 04:23:51 2025 +0800 Revert "bcache: update min_heap_callbacks to use default builtin swap" Patch series "bcache: Revert min_heap migration due to performance regression". This patch series reverts the migration of bcache from its original heap implementation to the generic min_heap library. While the original change aimed to simplify the code and improve maintainability, it introduced a severe performance regression in real-world scenarios. As reported by Robert, systems using bcache now suffer from periodic latency spikes, with P100 (max) latency increasing from 600 ms to 2.4 seconds every 5 minutes. This degrades bcache's value as a low-latency caching layer, and leads to frequent timeouts and application stalls in production environments. The primary cause of this regression is the behavior of the generic min_heap implementation's bottom-up sift_down, which performs up to 2 * log2(n) comparisons when many elements are equal. The original top-down variant used by bcache only required O(1) comparisons in such cases. The issue was further exacerbated by commit 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions"), which introduced non-inlined versions of the min_heap API, adding function call overhead to a performance-critical hot path. This patch (of 3): This reverts commit 3d8a9a1c35227c3f1b0bd132c9f0a80dbda07b65. Although removing the custom swap function simplified the code, this change is part of a broader migration to the generic min_heap API that introduced significant performance regressions in bcache. As reported by Robert, bcache now suffers from latency spikes, with P100 (max) latency increasing from 600 ms to 2.4 seconds every 5 minutes. These regressions degrade bcache's effectiveness as a low-latency cache layer and lead to frequent timeouts and application stalls in production environments. This revert is part of a series of changes to restore previous performance by undoing the min_heap transition. Link: https://lkml.kernel.org/r/20250614202353.1632957-1-visitorckw@gmail.com Link: https://lore.kernel.org/lkml/CAJhEC05+0S69z+3+FB2Cd0hD+pCRyWTKLEOsc8BOmH73p1m+KQ@mail.gmail.com Link: https://lkml.kernel.org/r/20250614202353.1632957-2-visitorckw@gmail.com Fixes: 866898efbb25 ("bcache: remove heap-related macros and switch to generic min_heap") Fixes: 92a8b224b833 ("lib/min_heap: introduce non-inline versions of min heap API functions") Signed-off-by: Kuan-Wei Chiu Reported-by: Robert Pang Closes: https://lore.kernel.org/linux-bcache/CAJhEC06F_AtrPgw2-7CvCqZgeStgCtitbD-ryuPpXQA-JG5XXw@mail.gmail.com Acked-by: Coly Li Cc: Ching-Chun (Jim) Huang Cc: Kent Overstreet Cc: Signed-off-by: Andrew Morton commit 223731cd63004cb07edfc6257d53565995c00cbb Author: Dev Jain Date: Fri Jun 13 09:19:12 2025 +0530 selftests/mm: add configs to fix testcase failure If CONFIG_UPROBES is not set, a merge subtest fails: Failure log: 7151 12:46:54.627936 # # # RUN merge.handle_uprobe_upon_merged_vma ... 7152 12:46:54.639014 # # f /sys/bus/event_source/devices/uprobe/type 7153 12:46:54.639306 # # fopen: No such file or directory 7154 12:46:54.650451 # # # merge.c:473:handle_uprobe_upon_merged_vma:Expected read_sysfs("/sys/bus/event_source/devices/uprobe/type", &type) (1) == 0 (0) 7155 12:46:54.650730 # # # handle_uprobe_upon_merged_vma: Test terminated by assertion 7156 12:46:54.661750 # # # FAIL merge.handle_uprobe_upon_merged_vma 7157 12:46:54.662030 # # not ok 8 merge.handle_uprobe_upon_merged_vma CONFIG_UPROBES is enabled by CONFIG_UPROBE_EVENTS, which gets enabled by CONFIG_FTRACE. Therefore add these configs to selftests/mm/config so that CI systems can include this config in the kernel build. To be completely safe, add CONFIG_PROFILING too, to enable the dependency chain PROFILING -> PERF_EVENTS -> UPROBE_EVENTS -> UPROBES. Link: https://lkml.kernel.org/r/20250613034912.53791-1-dev.jain@arm.com Fixes: efe99fabeb11 ("selftests/mm: add test about uprobe pte be orphan during vma merge") Signed-off-by: Dev Jain Reported-by: Aishwarya Closes: https://lore.kernel.org/all/20250610103729.72440-1-aishwarya.tcv@arm.com/ Tested-by: Aishwarya TCV Tested-by : Donet Tom Reviewed-by: Lorenzo Stoakes Reviewed-by: Anshuman Khandual Reviewed-by: Mark Brown Reviewed-by: Donet Tom Reviewed-by: Pedro Falcato Cc: Jann Horn Cc: Liam Howlett Cc: Pu Lehui Cc: Ryan Roberts Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 12b9a2c05d1b474518b0f5fac4a50b7f93b16930 Author: Pratyush Yadav Date: Thu Jun 5 19:11:41 2025 +0200 kho: initialize tail pages for higher order folios properly Currently, when restoring higher order folios, kho_restore_folio() only calls prep_compound_page() on all the pages. That is not enough to properly initialize the folios. The managed page count does not get updated, the reserved flag does not get dropped, and page count does not get initialized properly. Restoring a higher order folio with it results in the following BUG with CONFIG_DEBUG_VM when attempting to free the folio: BUG: Bad page state in process test pfn:104e2b page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x104e2b flags: 0x2fffff80000000(node=0|zone=2|lastcpupid=0x1fffff) raw: 002fffff80000000 0000000000000000 00000000ffffffff 0000000000000000 raw: ffffffffffffffff 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: nonzero _refcount [...] Call Trace: dump_stack_lvl+0x4b/0x70 bad_page.cold+0x97/0xb2 __free_frozen_pages+0x616/0x850 [...] Combine the path for 0-order and higher order folios, initialize the tail pages with a count of zero, and call adjust_managed_page_count() to account for all the pages instead of just missing them. In addition, since all the KHO-preserved pages get marked with MEMBLOCK_RSRV_NOINIT by deserialize_bitmap(), the reserved flag is not actually set (as can also be seen from the flags of the dumped page in the logs above). So drop the ClearPageReserved() calls. [ptyadav@amazon.de: declare i in the loop instead of at the top] Link: https://lkml.kernel.org/r/20250613125916.39272-1-pratyush@kernel.org Link: https://lkml.kernel.org/r/20250605171143.76963-1-pratyush@kernel.org Fixes: fc33e4b44b27 ("kexec: enable KHO support for memory preservation") Signed-off-by: Pratyush Yadav Reviewed-by: Pasha Tatashin Reviewed-by: Mike Rapoport (Microsoft) Cc: Alexander Graf Cc: Baoquan He Cc: Changyuan Lyu Signed-off-by: Andrew Morton commit 417d145c2e71ad7362200ede6e8afdfc6e56c4fb Author: Pratyush Yadav Date: Fri Jun 13 15:19:14 2025 +0200 MAINTAINERS: add linux-mm@ list to Kexec Handover Along with kexec, KHO also has parts dealing with memory management, like page/folio initialization, memblock, and preserving/unpreserving memory for next kernel. Copy linux-mm@ to KHO patches so the right set of eyes can look at changes to those parts. Link: https://lkml.kernel.org/r/20250613131917.4488-1-pratyush@kernel.org Signed-off-by: Pratyush Yadav Reviewed-by: Pasha Tatashin Reviewed-by: Mike Rapoport (Microsoft) Acked-by: SeongJae Park Cc: Alexander Graf Cc: Baoquan He Cc: Changyuan Lyu Signed-off-by: Andrew Morton commit 0ea148a799198518d8ebab63ddd0bb6114a103bc Author: Kairui Song Date: Wed Jun 4 23:10:38 2025 +0800 mm: userfaultfd: fix race of userfaultfd_move and swap cache This commit fixes two kinds of races, they may have different results: Barry reported a BUG_ON in commit c50f8e6053b0, we may see the same BUG_ON if the filemap lookup returned NULL and folio is added to swap cache after that. If another kind of race is triggered (folio changed after lookup) we may see RSS counter is corrupted: [ 406.893936] BUG: Bad rss-counter state mm:ffff0000c5a9ddc0 type:MM_ANONPAGES val:-1 [ 406.894071] BUG: Bad rss-counter state mm:ffff0000c5a9ddc0 type:MM_SHMEMPAGES val:1 Because the folio is being accounted to the wrong VMA. I'm not sure if there will be any data corruption though, seems no. The issues above are critical already. On seeing a swap entry PTE, userfaultfd_move does a lockless swap cache lookup, and tries to move the found folio to the faulting vma. Currently, it relies on checking the PTE value to ensure that the moved folio still belongs to the src swap entry and that no new folio has been added to the swap cache, which turns out to be unreliable. While working and reviewing the swap table series with Barry, following existing races are observed and reproduced [1]: In the example below, move_pages_pte is moving src_pte to dst_pte, where src_pte is a swap entry PTE holding swap entry S1, and S1 is not in the swap cache: CPU1 CPU2 userfaultfd_move move_pages_pte() entry = pte_to_swp_entry(orig_src_pte); // Here it got entry = S1 ... < interrupted> ... // folio A is a new allocated folio // and get installed into src_pte // src_pte now points to folio A, S1 // has swap count == 0, it can be freed // by folio_swap_swap or swap // allocator's reclaim. // folio B is a folio in another VMA. // S1 is freed, folio B can use it // for swap out with no problem. ... folio = filemap_get_folio(S1) // Got folio B here !!! ... < interrupted again> ... // Now S1 is free to be used again. // Now src_pte is a swap entry PTE // holding S1 again. folio_trylock(folio) move_swap_pte double_pt_lock is_pte_pages_stable // Check passed because src_pte == S1 folio_move_anon_rmap(...) // Moved invalid folio B here !!! The race window is very short and requires multiple collisions of multiple rare events, so it's very unlikely to happen, but with a deliberately constructed reproducer and increased time window, it can be reproduced easily. This can be fixed by checking if the folio returned by filemap is the valid swap cache folio after acquiring the folio lock. Another similar race is possible: filemap_get_folio may return NULL, but folio (A) could be swapped in and then swapped out again using the same swap entry after the lookup. In such a case, folio (A) may remain in the swap cache, so it must be moved too: CPU1 CPU2 userfaultfd_move move_pages_pte() entry = pte_to_swp_entry(orig_src_pte); // Here it got entry = S1, and S1 is not in swap cache folio = filemap_get_folio(S1) // Got NULL ... < interrupted again> ... move_swap_pte double_pt_lock is_pte_pages_stable // Check passed because src_pte == S1 folio_move_anon_rmap(...) // folio A is ignored !!! Fix this by checking the swap cache again after acquiring the src_pte lock. And to avoid the filemap overhead, we check swap_map directly [2]. The SWP_SYNCHRONOUS_IO path does make the problem more complex, but so far we don't need to worry about that, since folios can only be exposed to the swap cache in the swap out path, and this is covered in this patch by checking the swap cache again after acquiring the src_pte lock. Testing with a simple C program that allocates and moves several GB of memory did not show any observable performance change. Link: https://lkml.kernel.org/r/20250604151038.21968-1-ryncsn@gmail.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Kairui Song Closes: https://lore.kernel.org/linux-mm/CAMgjq7B1K=6OOrK2OUZ0-tqCzi+EJt+2_K97TPGoSt=9+JwP7Q@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/CAGsJ_4yJhJBo16XhiC-nUzSheyX-V3-nFE+tAi=8Y560K8eT=A@mail.gmail.com/ [2] Reviewed-by: Lokesh Gidra Acked-by: Peter Xu Reviewed-by: Suren Baghdasaryan Reviewed-by: Barry Song Reviewed-by: Chris Li Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: Kairui Song Cc: Signed-off-by: Andrew Morton commit 517f496e1e61bd169d585dab4dd77e7147506322 Author: David Hildenbrand Date: Wed Jun 11 15:13:14 2025 +0200 mm/gup: revert "mm: gup: fix infinite loop within __get_longterm_locked" After commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked") we are able to longterm pin folios that are not supposed to get longterm pinned, simply because they temporarily have the LRU flag cleared (esp. temporarily isolated). For example, two __get_longterm_locked() callers can race, or __get_longterm_locked() can race with anything else that temporarily isolates folios. The introducing commit mentions the use case of a driver that uses vm_ops->fault to insert pages allocated through cma_alloc() into the page tables, assuming they can later get longterm pinned. These pages/ folios would never have the LRU flag set and consequently cannot get isolated. There is no known in-tree user making use of that so far, fortunately. To handle that in the future -- and avoid retrying forever to isolate/migrate them -- we will need a different mechanism for the CMA area *owner* to indicate that it actually already allocated the page and is fine with longterm pinning it. The LRU flag is not suitable for that. Probably we can lookup the relevant CMA area and query the bitmap; we only have have to care about some races, probably. If already allocated, we could just allow longterm pinning) Anyhow, let's fix the "must not be longterm pinned" problem first by reverting the original commit. Link: https://lkml.kernel.org/r/20250611131314.594529-1-david@redhat.com Fixes: 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked") Signed-off-by: David Hildenbrand Closes: https://lore.kernel.org/all/20250522092755.GA3277597@tiffany/ Reported-by: Hyesoo Yu Reviewed-by: John Hubbard Cc: Jason Gunthorpe Cc: Peter Xu Cc: Zhaoyang Huang Cc: Aijun Sun Cc: Alistair Popple Cc: Signed-off-by: Andrew Morton commit 965f87700adbcc6d72430f524d88135027f5bba3 Author: Shivank Garg Date: Mon Jun 9 12:06:07 2025 +0000 selftests/mm: increase timeout from 180 to 900 seconds The mm selftests are timing out with the current 180-second limit. Testing shows that run_vmtests.sh takes approximately 11 minutes (664 seconds) to complete. Increase the timeout to 900 seconds (15 minutes) to provide sufficient buffer for the tests to complete successfully. Link: https://lkml.kernel.org/r/20250609120606.73145-2-shivankg@amd.com Signed-off-by: Shivank Garg Cc: Shuah Khan Signed-off-by: Andrew Morton commit a05dd8ae5cbb1cb45f349922cfea4f548a5e5d6f Author: Kairui Song Date: Tue Jun 10 01:17:51 2025 +0800 mm/shmem, swap: fix softlockup with mTHP swapin Following softlockup can be easily reproduced on my test machine with: echo always > /sys/kernel/mm/transparent_hugepage/hugepages-64kB/enabled swapon /dev/zram0 # zram0 is a 48G swap device mkdir -p /sys/fs/cgroup/memory/test echo 1G > /sys/fs/cgroup/test/memory.max echo $BASHPID > /sys/fs/cgroup/test/cgroup.procs while true; do dd if=/dev/zero of=/tmp/test.img bs=1M count=5120 cat /tmp/test.img > /dev/null rm /tmp/test.img done Then after a while: watchdog: BUG: soft lockup - CPU#0 stuck for 763s! [cat:5787] Modules linked in: zram virtiofs CPU: 0 UID: 0 PID: 5787 Comm: cat Kdump: loaded Tainted: G L 6.15.0.orig-gf3021d9246bc-dirty #118 PREEMPT(voluntary)· Tainted: [L]=SOFTLOCKUP Hardware name: Red Hat KVM/RHEL-AV, BIOS 0.0.0 02/06/2015 RIP: 0010:mpol_shared_policy_lookup+0xd/0x70 Code: e9 b8 b4 ff ff 31 c0 c3 cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 0f 1f 44 00 00 41 54 55 53 <48> 8b 1f 48 85 db 74 41 4c 8d 67 08 48 89 fb 48 89 f5 4c 89 e7 e8 RSP: 0018:ffffc90002b1fc28 EFLAGS: 00000202 RAX: 00000000001c20ca RBX: 0000000000724e1e RCX: 0000000000000001 RDX: ffff888118e214c8 RSI: 0000000000057d42 RDI: ffff888118e21518 RBP: 000000000002bec8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000bf4 R11: 0000000000000000 R12: 0000000000000001 R13: 00000000001c20ca R14: 00000000001c20ca R15: 0000000000000000 FS: 00007f03f995c740(0000) GS:ffff88a07ad9a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f03f98f1000 CR3: 0000000144626004 CR4: 0000000000770eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: shmem_alloc_folio+0x31/0xc0 shmem_swapin_folio+0x309/0xcf0 ? filemap_get_entry+0x117/0x1e0 ? xas_load+0xd/0xb0 ? filemap_get_entry+0x101/0x1e0 shmem_get_folio_gfp+0x2ed/0x5b0 shmem_file_read_iter+0x7f/0x2e0 vfs_read+0x252/0x330 ksys_read+0x68/0xf0 do_syscall_64+0x4c/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f03f9a46991 Code: 00 48 8b 15 81 14 10 00 f7 d8 64 89 02 b8 ff ff ff ff eb bd e8 20 ad 01 00 f3 0f 1e fa 80 3d 35 97 10 00 00 74 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 4f c3 66 0f 1f 44 00 00 55 48 89 e5 48 83 ec RSP: 002b:00007fff3c52bd28 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000040000 RCX: 00007f03f9a46991 RDX: 0000000000040000 RSI: 00007f03f98ba000 RDI: 0000000000000003 RBP: 00007fff3c52bd50 R08: 0000000000000000 R09: 00007f03f9b9a380 R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000040000 R13: 00007f03f98ba000 R14: 0000000000000003 R15: 0000000000000000 The reason is simple, readahead brought some order 0 folio in swap cache, and the swapin mTHP folio being allocated is in conflict with it, so swapcache_prepare fails and causes shmem_swap_alloc_folio to return -EEXIST, and shmem simply retries again and again causing this loop. Fix it by applying a similar fix for anon mTHP swapin. The performance change is very slight, time of swapin 10g zero folios with shmem (test for 12 times): Before: 2.47s After: 2.48s [kasong@tencent.com: add comment] Link: https://lkml.kernel.org/r/20250610181645.45922-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20250610181645.45922-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20250609171751.36305-1-ryncsn@gmail.com Fixes: 1dd44c0af4fa ("mm: shmem: skip swapcache for swapin of synchronous swap device") Signed-off-by: Kairui Song Reviewed-by: Barry Song Acked-by: Nhat Pham Reviewed-by: Baolin Wang Cc: Baoquan He Cc: Chris Li Cc: Hugh Dickins Cc: Kemeng Shi Cc: Usama Arif Cc: Signed-off-by: Andrew Morton commit 85d6fbc47c3087c5d048e6734926b0c36af34fe9 Author: Thomas Fourier Date: Wed Jun 18 08:57:04 2025 +0200 scsi: fnic: Fix missing DMA mapping error in fnic_send_frame() dma_map_XXX() can fail and should be tested for errors with dma_mapping_error(). Fixes: a63e78eb2b0f ("scsi: fnic: Add support for fabric based solicited requests and responses") Signed-off-by: Thomas Fourier Link: https://lore.kernel.org/r/20250618065715.14740-2-fourier.thomas@gmail.com Reviewed-by: Karan Tilak Kumar Reviewed-by: John Menghini Signed-off-by: Martin K. Petersen commit 18b5cb6f1fdda4454f55a31f7c78d94da62be495 Author: Karan Tilak Kumar Date: Tue Jun 17 17:34:31 2025 -0700 scsi: fnic: Set appropriate logging level for log message Replace KERN_INFO with KERN_DEBUG for a log message. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Gian Carlo Boffa Reviewed-by: Arun Easi Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/stable/20250612002212.4144-1-kartilak%40cisco.com Link: https://lore.kernel.org/r/20250618003431.6314-4-kartilak@cisco.com Reviewed-by: John Meneghini Signed-off-by: Martin K. Petersen commit 9b9b8594654a79e3d4166356fd86cd5397477b24 Author: Karan Tilak Kumar Date: Tue Jun 17 17:34:30 2025 -0700 scsi: fnic: Add and improve logs in FDMI and FDMI ABTS paths Add logs in FDMI and FDMI ABTS paths. Modify log text in these paths. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Gian Carlo Boffa Reviewed-by: Arun Easi Reviewed-by: John Meneghini Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20250618003431.6314-3-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 74f46a0524f8d2f01dc7ca95bb5fc463a8603e72 Author: Karan Tilak Kumar Date: Tue Jun 17 17:34:29 2025 -0700 scsi: fnic: Turn off FDMI ACTIVE flags on link down When the link goes down and comes up, FDMI requests are not sent out anymore. Fix bug by turning off FNIC_FDMI_ACTIVE when the link goes down. Fixes: 09c1e6ab4ab2 ("scsi: fnic: Add and integrate support for FDMI") Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Gian Carlo Boffa Reviewed-by: Arun Easi Tested-by: Karan Tilak Kumar Cc: stable@vger.kernel.org Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20250618003431.6314-2-kartilak@cisco.com Reviewed-by: John Meneghini Signed-off-by: Martin K. Petersen commit a35b29bdedb4d2ae3160d4d6684a6f1ecd9ca7c2 Author: Karan Tilak Kumar Date: Tue Jun 17 17:34:28 2025 -0700 scsi: fnic: Fix crash in fnic_wq_cmpl_handler when FDMI times out When both the RHBA and RPA FDMI requests time out, fnic reuses a frame to send ABTS for each of them. On send completion, this causes an attempt to free the same frame twice that leads to a crash. Fix crash by allocating separate frames for RHBA and RPA, and modify ABTS logic accordingly. Tested by checking MDS for FDMI information. Tested by using instrumented driver to: - Drop PLOGI response - Drop RHBA response - Drop RPA response - Drop RHBA and RPA response - Drop PLOGI response + ABTS response - Drop RHBA response + ABTS response - Drop RPA response + ABTS response - Drop RHBA and RPA response + ABTS response for both of them Fixes: 09c1e6ab4ab2 ("scsi: fnic: Add and integrate support for FDMI") Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Gian Carlo Boffa Tested-by: Arun Easi Co-developed-by: Arun Easi Signed-off-by: Arun Easi Tested-by: Karan Tilak Kumar Cc: stable@vger.kernel.org Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20250618003431.6314-1-kartilak@cisco.com Reviewed-by: John Meneghini Signed-off-by: Martin K. Petersen commit 2e083cd802294693a5414e4557a183dd7e442e71 Author: anvithdosapati Date: Mon Jun 16 08:57:34 2025 +0000 scsi: ufs: core: Fix clk scaling to be conditional in reset and restore In ufshcd_host_reset_and_restore(), scale up clocks only when clock scaling is supported. Without this change CPU latency is voted for 0 (ufshcd_pm_qos_update) during resume unconditionally. Signed-off-by: anvithdosapati Link: https://lore.kernel.org/r/20250616085734.2133581-1-anvithdosapati@google.com Fixes: a3cd5ec55f6c ("scsi: ufs: add load based scaling of UFS gear") Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 752eb816b55adb0673727ba0ed96609a17895654 Author: Chen Yu Date: Wed Jun 4 12:25:56 2025 +0800 scsi: megaraid_sas: Fix invalid node index On a system with DRAM interleave enabled, out-of-bound access is detected: megaraid_sas 0000:3f:00.0: requested/available msix 128/128 poll_queue 0 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in ./arch/x86/include/asm/topology.h:72:28 index -1 is out of range for type 'cpumask *[1024]' dump_stack_lvl+0x5d/0x80 ubsan_epilogue+0x5/0x2b __ubsan_handle_out_of_bounds.cold+0x46/0x4b megasas_alloc_irq_vectors+0x149/0x190 [megaraid_sas] megasas_probe_one.cold+0xa4d/0x189c [megaraid_sas] local_pci_probe+0x42/0x90 pci_device_probe+0xdc/0x290 really_probe+0xdb/0x340 __driver_probe_device+0x78/0x110 driver_probe_device+0x1f/0xa0 __driver_attach+0xba/0x1c0 bus_for_each_dev+0x8b/0xe0 bus_add_driver+0x142/0x220 driver_register+0x72/0xd0 megasas_init+0xdf/0xff0 [megaraid_sas] do_one_initcall+0x57/0x310 do_init_module+0x90/0x250 init_module_from_file+0x85/0xc0 idempotent_init_module+0x114/0x310 __x64_sys_finit_module+0x65/0xc0 do_syscall_64+0x82/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fix it accordingly. Signed-off-by: Chen Yu Link: https://lore.kernel.org/r/20250604042556.3731059-1-yu.c.chen@intel.com Fixes: 8049da6f3943 ("scsi: megaraid_sas: Use irq_set_affinity_and_hint()") Cc: stable@vger.kernel.org Signed-off-by: Martin K. Petersen commit 41687a5c6f8b07ad0850d6c46452376d54fe9b65 Merge: e0990236bbdc96 d57e92dd660014 Author: Linus Torvalds Date: Thu Jun 19 17:46:08 2025 -0700 Merge tag 'spi-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One fix here from Thierry, fixing crashes caused by attempting to do cache sync operations on uncached memory on Tegra platforms" * tag 'spi-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: tegra210-qspi: Remove cache operations commit e0990236bbdc96440bfc4a5b24b5dd811fd2210d Merge: 5c8013ae2e86ec 8acfb165a49225 Author: Linus Torvalds Date: Thu Jun 19 17:40:42 2025 -0700 Merge tag 'regulator-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One patch here from Heiko which fixes stability issues on some Rockchip platforms by implementing soft start support and providing startup time information for their regulators" * tag 'regulator-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: fan53555: add enable_time support and soft-start times commit aacc875a448d363332b9df0621dde6d3a225ea9f Author: Xiaolei Wang Date: Thu Jun 19 14:21:08 2025 +0800 clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data When num_parents is 4, __clk_register() occurs an out-of-bounds when accessing parent_names member. Use ARRAY_SIZE() instead of hardcode number here. BUG: KASAN: global-out-of-bounds in __clk_register+0x1844/0x20d8 Read of size 8 at addr ffff800086988e78 by task kworker/u24:3/59 Hardware name: NXP i.MX95 19X19 board (DT) Workqueue: events_unbound deferred_probe_work_func Call trace: dump_backtrace+0x94/0xec show_stack+0x18/0x24 dump_stack_lvl+0x8c/0xcc print_report+0x398/0x5fc kasan_report+0xd4/0x114 __asan_report_load8_noabort+0x20/0x2c __clk_register+0x1844/0x20d8 clk_hw_register+0x44/0x110 __clk_hw_register_mux+0x284/0x3a8 imx95_bc_probe+0x4f4/0xa70 Fixes: 5224b189462f ("clk: imx: add i.MX95 BLK CTL clk driver") Cc: stable@vger.kernel.org Reviewed-by: Frank Li Signed-off-by: Xiaolei Wang Link: https://lore.kernel.org/r/20250619062108.2016511-1-xiaolei.wang@windriver.com Signed-off-by: Stephen Boyd commit 6306e0c5a0d28e9df2b5902f4a021204bee75173 Author: Sascha Hauer Date: Thu Jun 12 14:56:57 2025 +0200 clk: scmi: Handle case where child clocks are initialized before their parents The SCMI clock driver currently assumes that parent clocks are always initialized before their children. However, this assumption can fail if a child clock is encountered before its parent during probe. This leads to an issue during initialization of the parent_data array: sclk->parent_data[i].hw = hws[sclk->info->parents[i]]; If the parent clock's hardware structure has not been initialized yet, this assignment results in invalid data. To resolve this, allocate all struct scmi_clk instances as a contiguous array at the beginning of the probe and populate the hws[] array upfront. This ensures that any parent referenced later is already initialized, regardless of the order in which clocks are processed. Note that we can no longer free individual scmi_clk instances if scmi_clk_ops_init() fails which shouldn't be a problem if the SCMI platform has proper per-agent clock discovery. Fixes: 65a8a3dd3b95f ("clk: scmi: Add support for clock {set,get}_parent") Reviewed-by: peng.fan@nxp.com Reviewed-by: Cristian Marussi Reviewed-by: Sudeep Holla Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20250612-clk-scmi-children-parent-fix-v3-1-7de52a27593d@pengutronix.de Signed-off-by: Stephen Boyd commit b8de9b21e8499a09ef424e101a8703e8e1866bfd Merge: 97aadc161d623b a39d082c3553d3 Author: Dave Airlie Date: Fri Jun 20 09:01:21 2025 +1000 Merge tag 'drm-xe-fixes-2025-06-19' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - A workaround update (Vinay) - Fix memset on iomem (Lucas) - Fix early wedge on GuC Load failure (Daniele) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aFQ03kNzhbiNK7gW@fedora commit 97aadc161d623b4b86ee5deaeb8e9165422ecb9e Merge: 453e6fd262904c 61ee19dedb8d75 Author: Dave Airlie Date: Fri Jun 20 08:57:10 2025 +1000 Merge tag 'drm-misc-fixes-2025-06-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc3: - vivante scheduler fix. - v3d null pointer crash fix. - fix backlight, booting GSP-RM, and potential integer shift overflow in nouveau. - fix compiler warnings about unused linux/export.h - fix malidp unknown modifier spam. - fix for ssd130x. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/d44bab7b-01f8-45a8-a7f4-5d3d563d2f9d@linux.intel.com commit e0fca6f2cebff539e9317a15a37dcf432e3b851a Author: Long Li Date: Tue Jun 17 18:36:46 2025 -0700 net: mana: Record doorbell physical address in PF mode MANA supports RDMA in PF mode. The driver should record the doorbell physical address when in PF mode. The doorbell physical address is used by the RDMA driver to map doorbell pages of the device to user-mode applications through RDMA verbs interface. In the past, they have been mapped to user-mode while the device is in VF mode. With the support for PF mode implemented, also expose those pages in PF mode. Support for PF mode is implemented in 290e5d3c49f6 ("net: mana: Add support for Multi Vports on Bare metal") Signed-off-by: Long Li Reviewed-by: Simon Horman Link: https://patch.msgid.link/1750210606-12167-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Jakub Kicinski commit c76bcc7d1f24e90a2d7b98d1e523d7524269fc56 Author: Alexey Charkov Date: Sat Jun 14 22:14:33 2025 +0400 arm64: dts: rockchip: list all CPU supplies on ArmSoM Sige5 List both CPU supply regulators which drive the little and big CPU clusters, respectively, so that cpufreq can pick them up. Without this patch the cpufreq governor attempts to raise the big CPU frequency under high load, while its supply voltage stays at 850000 uV. This causes system instability and, in my case, random reboots. With this patch, supply voltages are adjusted in step with frequency changes from 700000-737000 uV in idle to 950000 uV under full load, and the system appears to be stable. While at this, list all CPU supplies for completeness. Cc: stable@vger.kernel.org Fixes: 40f742b07ab2 ("arm64: dts: rockchip: Add rk3576-armsom-sige5 board") Reviewed-by: Nicolas Frattaroli Tested-by: Nicolas Frattaroli Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250614-sige5-updates-v2-1-3bb31b02623c@gmail.com Signed-off-by: Heiko Stuebner commit fde46f60f6c5138ee422087addbc5bf5b4968bf1 Author: Stephen Smalley Date: Tue Jun 10 15:48:27 2025 -0400 selinux: change security_compute_sid to return the ssid or tsid on match If the end result of a security_compute_sid() computation matches the ssid or tsid, return that SID rather than looking it up again. This avoids the problem of multiple initial SIDs that map to the same context. Cc: stable@vger.kernel.org Reported-by: Guido Trentalancia Fixes: ae254858ce07 ("selinux: introduce an initial SID for early boot processes") Signed-off-by: Stephen Smalley Tested-by: Guido Trentalancia Signed-off-by: Paul Moore commit b2e2bed119809a5ca384241e0631f04c6142ae08 Author: Kent Overstreet Date: Thu Jun 19 14:32:57 2025 -0400 bcachefs: Add missing key type checks to check_snapshot_exists() For now we only have one key type in these btrees, but forward compatibility means we do have to check. Reported-by: syzbot+b4cb4a6988aced0cec4b@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 5c8013ae2e86ec36b07500ba4cacb14ab4d6f728 Merge: 24770983ccfec8 16ef63acb784bd Author: Linus Torvalds Date: Thu Jun 19 10:21:32 2025 -0700 Merge tag 'net-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wireless. The ath12k fix to avoid FW crashes requires adding support for a number of new FW commands so it's quite large in terms of LoC. The rest is relatively small. Current release - fix to a fix: - ptp: fix breakage after ptp_vclock_in_use() rework Current release - regressions: - openvswitch: allocate struct ovs_pcpu_storage dynamically, static allocation may exhaust module loader limit on smaller systems Previous releases - regressions: - tcp: fix tcp_packet_delayed() for peers with no selective ACK support Previous releases - always broken: - wifi: ath12k: don't activate more links than firmware supports - tcp: make sure sockets open via passive TFO have valid NAPI ID - eth: bnxt_en: update MRU and RSS table of RSS contexts on queue reset, prevent Rx queues from silently hanging after queue reset - NFC: uart: set tty->disc_data only in success path" * tag 'net-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (59 commits) net: airoha: Differentiate hwfd buffer size for QDMA0 and QDMA1 net: airoha: Compute number of descriptors according to reserved memory size tools: ynl: fix mixing ops and notifications on one socket net: atm: fix /proc/net/atm/lec handling net: atm: add lec_mutex mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available net: airoha: Always check return value from airoha_ppe_foe_get_entry() NFC: nci: uart: Set tty->disc_data only in success path calipso: Fix null-ptr-deref in calipso_req_{set,del}attr(). MAINTAINERS: Remove Shannon Nelson from MAINTAINERS file net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get() eth: fbnic: avoid double free when failing to DMA-map FW msg tcp: fix passive TFO socket having invalid NAPI ID selftests: net: add test for passive TFO socket NAPI ID selftests: net: add passive TFO test binary selftests: netdevsim: improve lib.sh include in peer.sh tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer Octeontx2-pf: Fix Backpresure configuration net: ftgmac100: select FIXED_PHY net: ethtool: remove duplicate defines for family info ... commit 6463cbe08b0cbf9bba8763306764f5fd643023e1 Author: Pablo Martin-Gomez Date: Wed Jun 18 13:35:16 2025 +0200 mtd: spinand: fix memory leak of ECC engine conf Memory allocated for the ECC engine conf is not released during spinand cleanup. Below kmemleak trace is seen for this memory leak: unreferenced object 0xffffff80064f00e0 (size 8): comm "swapper/0", pid 1, jiffies 4294937458 hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace (crc 0): kmemleak_alloc+0x30/0x40 __kmalloc_cache_noprof+0x208/0x3c0 spinand_ondie_ecc_init_ctx+0x114/0x200 nand_ecc_init_ctx+0x70/0xa8 nanddev_ecc_engine_init+0xec/0x27c spinand_probe+0xa2c/0x1620 spi_mem_probe+0x130/0x21c spi_probe+0xf0/0x170 really_probe+0x17c/0x6e8 __driver_probe_device+0x17c/0x21c driver_probe_device+0x58/0x180 __device_attach_driver+0x15c/0x1f8 bus_for_each_drv+0xec/0x150 __device_attach+0x188/0x24c device_initial_probe+0x10/0x20 bus_probe_device+0x11c/0x160 Fix the leak by calling nanddev_ecc_engine_cleanup() inside spinand_cleanup(). Signed-off-by: Pablo Martin-Gomez Signed-off-by: Miquel Raynal commit 32a01cd4334175a0ae42b3c3d7f37fd26468ecc3 Author: Kent Overstreet Date: Thu Jun 19 12:50:06 2025 -0400 bcachefs: Don't log fsck err in the journal if doing repair elsewhere This fixes exceeding the bump allocator limit when the allocator finds many buckets that need repair - they're repaired asynchronously, which means that every error logged a message in the bump allocator, without committing. Signed-off-by: Kent Overstreet commit b2348fe6c81cc92c7d0bd8a7d9241f8de0fa72b7 Author: Kent Overstreet Date: Thu Jun 19 12:25:41 2025 -0400 bcachefs: Fix *__bch2_trans_subbuf_alloc() error path Don't change buf->size on error - this would usually be a transaction restart, but it could also be -ENOMEM - when we've exceeded the bump allocator max). Fixes: 247abee6ae6d ("bcachefs: btree_trans_subbuf") Signed-off-by: Kent Overstreet commit 24770983ccfec854d89da9d87ca5f2c9efc695fc Merge: fb4d33ab452ea2 c25892b7a17443 Author: Linus Torvalds Date: Thu Jun 19 09:09:40 2025 -0700 Merge tag 'hwmon-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - ltc4282: Avoid repeated register write operation - occ: Fix unaligned accesses, and rework attribute registration to reduce stack usage - ftsteutates: Fix TOCTOU race * tag 'hwmon-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (ltc4282) avoid repeated register write hwmon: (occ) fix unaligned accesses hwmon: (occ) Rework attribute registration for stack usage hwmon: (ftsteutates) Fix TOCTOU race in fts_read() commit 16ef63acb784bd0951a08c6feb108d19d9488800 Merge: dccf87ea49b7b9 7b46bdaec00a67 Author: Jakub Kicinski Date: Thu Jun 19 08:42:27 2025 -0700 Merge branch 'net-airoha-improve-hwfd-buffer-descriptor-queues-setup' Lorenzo Bianconi says: ==================== net: airoha: Improve hwfd buffer/descriptor queues setup Compute the number of hwfd buffers/descriptors according to the reserved memory size if provided via DTS. Reduce the required hwfd buffers queue size for QDMA1. v3: https://lore.kernel.org/20250618-airoha-hw-num-desc-v3-0-18a6487cd75e@kernel.org v1: https://lore.kernel.org/20250615-airoha-hw-num-desc-v1-0-8f88daa4abd7@kernel.org ==================== Link: https://patch.msgid.link/20250619-airoha-hw-num-desc-v4-0-49600a9b319a@kernel.org Signed-off-by: Jakub Kicinski commit 7b46bdaec00a675f6fac9d0b01a2105b5746ebe9 Author: Lorenzo Bianconi Date: Thu Jun 19 09:07:25 2025 +0200 net: airoha: Differentiate hwfd buffer size for QDMA0 and QDMA1 EN7581 SoC allows configuring the size and the number of buffers in hwfd payload queue for both QDMA0 and QDMA1. In order to reduce the required DRAM used for hwfd buffers queues and decrease the memory footprint, differentiate hwfd buffer size for QDMA0 and QDMA1 and reduce hwfd buffer size to 1KB for QDMA1 (WAN) while maintaining 2KB for QDMA0 (LAN). Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250619-airoha-hw-num-desc-v4-2-49600a9b319a@kernel.org Signed-off-by: Jakub Kicinski commit edf8afeecfbb0b8c1a2edb8c8892d2f759d35321 Author: Lorenzo Bianconi Date: Thu Jun 19 09:07:24 2025 +0200 net: airoha: Compute number of descriptors according to reserved memory size In order to not exceed the reserved memory size for hwfd buffers, compute the number of hwfd buffers/descriptors according to the reserved memory size and the size of each hwfd buffer (2KB). Fixes: 3a1ce9e3d01b ("net: airoha: Add the capability to allocate hwfd buffers via reserved-memory") Reviewed-by: Simon Horman Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250619-airoha-hw-num-desc-v4-1-49600a9b319a@kernel.org Signed-off-by: Jakub Kicinski commit dccf87ea49b7b954f85ce4d13826dced250e855c Merge: 9738280aae592b 68dd8eeb7208f1 Author: Jakub Kicinski Date: Thu Jun 19 08:38:40 2025 -0700 Merge tag 'wireless-2025-06-18' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== More fixes: - ath12k - avoid busy-waiting - activate correct number of links - iwlwifi - iwldvm regression (lots of warnings) - iwlmld merge damage regression (crash) - fix build with some old gcc versions - carl9170: don't talk to device w/o FW [syzbot] - ath6kl: remove bad FW WARN [syzbot] - ieee80211: use variable-length arrays [syzbot] - mac80211 - remove WARN on delayed beacon update [syzbot] - drop OCB frames with invalid source [syzbot] * tag 'wireless-2025-06-18' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: Fix incorrect logic on cmd_ver range checking wifi: iwlwifi: dvm: restore n_no_reclaim_cmds setting wifi: iwlwifi: cfg: Limit cb_size to valid range wifi: iwlwifi: restore missing initialization of async_handlers_list (again) wifi: ath6kl: remove WARN on bad firmware input wifi: carl9170: do not ping device which has failed to load firmware wifi: ath12k: don't wait when there is no vdev started wifi: ath12k: don't use static variables in ath12k_wmi_fw_stats_process() wifi: ath12k: avoid burning CPU while waiting for firmware stats wifi: ath12k: fix documentation on firmware stats wifi: ath12k: don't activate more links than firmware supports wifi: ath12k: update link active in case two links fall on the same MAC wifi: ath12k: support WMI_MLO_LINK_SET_ACTIVE_CMDID command wifi: ath12k: update freq range for each hardware mode wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event wifi: ath12k: parse and save hardware mode info from WMI_SERVICE_READY_EXT_EVENTID event for later use wifi: ath12k: Avoid CPU busy-wait by handling VDEV_STAT and BCN_STAT wifi: mac80211: don't WARN for late channel/color switch wifi: mac80211: drop invalid source address OCB frames wifi: remove zero-length arrays ==================== Link: https://patch.msgid.link/20250618210642.35805-6-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 9738280aae592b579a25b5b1b6584c894827d3c7 Author: Jakub Kicinski Date: Wed Jun 18 10:17:46 2025 -0700 tools: ynl: fix mixing ops and notifications on one socket The multi message support loosened the connection between the request and response handling, as we can now submit multiple requests before we start processing responses. Passing the attr set to NlMsgs decoding no longer makes sense (if it ever did), attr set may differ message by messsage. Isolate the part of decoding responsible for attr-set specific interpretation and call it once we identified the correct op. Without this fix performing SET operation on an ethtool socket, while being subscribed to notifications causes: # File "tools/net/ynl/pyynl/lib/ynl.py", line 1096, in _op # Exception| return self._ops(ops)[0] # Exception| ~~~~~~~~~^^^^^ # File "tools/net/ynl/pyynl/lib/ynl.py", line 1040, in _ops # Exception| nms = NlMsgs(reply, attr_space=op.attr_set) # Exception| ^^^^^^^^^^^ The value of op we use on line 1040 is stale, it comes form the previous loop. If a notification comes before a response we will update op to None and the next iteration thru the loop will break with the trace above. Fixes: 6fda63c45fe8 ("tools/net/ynl: fix cli.py --subscribe feature") Fixes: ba8be00f68f5 ("tools/net/ynl: Add multi message support to ynl") Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250618171746.1201403-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 664f1b854f63e0bedba96a8f5d896c7ce5fd167f Merge: e7ea5f5b1858dd d03b79f459c793 Author: Jakub Kicinski Date: Thu Jun 19 08:36:35 2025 -0700 Merge branch 'with-a-mutex' Eric Dumazet says: ==================== net: atm: protect dev_lec[] with a mutex Based on an initial syzbot report. First patch is adding lec_mutex to address the report. Second patch protects /proc/net/atm/lec operations. We probably should delete this driver, it seems quite broken. ==================== Link: https://patch.msgid.link/20250618140844.1686882-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit d03b79f459c7935cff830d98373474f440bd03ae Author: Eric Dumazet Date: Wed Jun 18 14:08:44 2025 +0000 net: atm: fix /proc/net/atm/lec handling /proc/net/atm/lec must ensure safety against dev_lec[] changes. It appears it had dev_put() calls without prior dev_hold(), leading to imbalance and UAF. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Acked-by: Francois Romieu # Minor atm contributor Link: https://patch.msgid.link/20250618140844.1686882-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit d13a3824bfd2b4774b671a75cf766a16637a0e67 Author: Eric Dumazet Date: Wed Jun 18 14:08:43 2025 +0000 net: atm: add lec_mutex syzbot found its way in net/atm/lec.c, and found an error path in lecd_attach() could leave a dangling pointer in dev_lec[]. Add a mutex to protect dev_lecp[] uses from lecd_attach(), lec_vcc_attach() and lec_mcast_attach(). Following patch will use this mutex for /proc/net/atm/lec. BUG: KASAN: slab-use-after-free in lecd_attach net/atm/lec.c:751 [inline] BUG: KASAN: slab-use-after-free in lane_ioctl+0x2224/0x23e0 net/atm/lec.c:1008 Read of size 8 at addr ffff88807c7b8e68 by task syz.1.17/6142 CPU: 1 UID: 0 PID: 6142 Comm: syz.1.17 Not tainted 6.16.0-rc1-syzkaller-00239-g08215f5486ec #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 lecd_attach net/atm/lec.c:751 [inline] lane_ioctl+0x2224/0x23e0 net/atm/lec.c:1008 do_vcc_ioctl+0x12c/0x930 net/atm/ioctl.c:159 sock_do_ioctl+0x118/0x280 net/socket.c:1190 sock_ioctl+0x227/0x6b0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated by task 6132: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kvmalloc_node_noprof+0x27b/0x620 mm/slub.c:5015 alloc_netdev_mqs+0xd2/0x1570 net/core/dev.c:11711 lecd_attach net/atm/lec.c:737 [inline] lane_ioctl+0x17db/0x23e0 net/atm/lec.c:1008 do_vcc_ioctl+0x12c/0x930 net/atm/ioctl.c:159 sock_do_ioctl+0x118/0x280 net/socket.c:1190 sock_ioctl+0x227/0x6b0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6132: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4842 free_netdev+0x6c5/0x910 net/core/dev.c:11892 lecd_attach net/atm/lec.c:744 [inline] lane_ioctl+0x1ce8/0x23e0 net/atm/lec.c:1008 do_vcc_ioctl+0x12c/0x930 net/atm/ioctl.c:159 sock_do_ioctl+0x118/0x280 net/socket.c:1190 sock_ioctl+0x227/0x6b0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:893 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+8b64dec3affaed7b3af5@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6852c6f6.050a0220.216029.0018.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250618140844.1686882-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit e7ea5f5b1858ddb96b152584d5fe06e6fc623e89 Author: David Thompson Date: Wed Jun 18 13:59:02 2025 +0000 mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available The message "Error getting PHY irq. Use polling instead" is emitted when the mlxbf_gige driver is loaded by the kernel before the associated gpio-mlxbf driver, and thus the call to get the PHY IRQ fails since it is not yet available. The driver probe() must return -EPROBE_DEFER if acpi_dev_gpio_irq_get_by() returns the same. Fixes: 6c2a6ddca763 ("net: mellanox: mlxbf_gige: Replace non-standard interrupt handling") Signed-off-by: David Thompson Reviewed-by: Asmaa Mnebhi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250618135902.346-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski commit 78bd03ee1f20a267d2c218884b66041b3508ac9c Author: Lorenzo Bianconi Date: Wed Jun 18 09:37:40 2025 +0200 net: airoha: Always check return value from airoha_ppe_foe_get_entry() airoha_ppe_foe_get_entry routine can return NULL, so check the returned pointer is not NULL in airoha_ppe_foe_flow_l2_entry_update() Fixes: b81e0f2b58be3 ("net: airoha: Add FLOW_CLS_STATS callback support") Reviewed-by: Simon Horman Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250618-check-ret-from-airoha_ppe_foe_get_entry-v2-1-068dcea3cc66@kernel.org Signed-off-by: Jakub Kicinski commit fc27ab48904ceb7e4792f0c400f1ef175edf16fe Author: Krzysztof Kozlowski Date: Wed Jun 18 09:36:50 2025 +0200 NFC: nci: uart: Set tty->disc_data only in success path Setting tty->disc_data before opening the NCI device means we need to clean it up on error paths. This also opens some short window if device starts sending data, even before NCIUARTSETDRIVER IOCTL succeeded (broken hardware?). Close the window by exposing tty->disc_data only on the success path, when opening of the NCI device and try_module_get() succeeds. The code differs in error path in one aspect: tty->disc_data won't be ever assigned thus NULL-ified. This however should not be relevant difference, because of "tty->disc_data=NULL" in nci_uart_tty_open(). Cc: Linus Torvalds Fixes: 9961127d4bce ("NFC: nci: add generic uart support") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Greg Kroah-Hartman Link: https://patch.msgid.link/20250618073649.25049-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit a55bc4ffc06d8c965a7d6f0a01ed0ed41380df28 Author: Nathan Chancellor Date: Mon Jun 9 14:13:14 2025 -0700 staging: rtl8723bs: Avoid memset() in aes_cipher() and aes_decipher() After commit 6f110a5e4f99 ("Disable SLUB_TINY for build testing"), which causes CONFIG_KASAN to be enabled in allmodconfig again, arm64 allmodconfig builds with older versions of clang (15 through 17) show an instance of -Wframe-larger-than (which breaks the build with CONFIG_WERROR=y): drivers/staging/rtl8723bs/core/rtw_security.c:1287:5: error: stack frame size (2208) exceeds limit (2048) in 'rtw_aes_decrypt' [-Werror,-Wframe-larger-than] 1287 | u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) | ^ This comes from aes_decipher() being inlined in rtw_aes_decrypt(). Running the same build with CONFIG_FRAME_WARN=128 shows aes_cipher() also uses a decent amount of stack, just under the limit of 2048: drivers/staging/rtl8723bs/core/rtw_security.c:864:19: warning: stack frame size (1952) exceeds limit (128) in 'aes_cipher' [-Wframe-larger-than] 864 | static signed int aes_cipher(u8 *key, uint hdrlen, | ^ -Rpass-analysis=stack-frame-layout only shows one large structure on the stack, which is the ctx variable inlined from aes128k128d(). A good number of the other variables come from the additional checks of fortified string routines, which are present in memset(), which both aes_cipher() and aes_decipher() use to initialize some temporary buffers. In this case, since the size is known at compile time, these additional checks should not result in any code generation changes but allmodconfig has several sanitizers enabled, which may make it harder for the compiler to eliminate the compile time checks and the variables that come about from them. The memset() calls are just initializing these buffers to zero, so use '= {}' instead, which is used all over the kernel and does the exact same thing as memset() without the fortify checks, which drops the stack usage of these functions by a few hundred kilobytes. drivers/staging/rtl8723bs/core/rtw_security.c:864:19: warning: stack frame size (1584) exceeds limit (128) in 'aes_cipher' [-Wframe-larger-than] 864 | static signed int aes_cipher(u8 *key, uint hdrlen, | ^ drivers/staging/rtl8723bs/core/rtw_security.c:1271:5: warning: stack frame size (1456) exceeds limit (128) in 'rtw_aes_decrypt' [-Wframe-larger-than] 1271 | u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) | ^ Cc: stable@vger.kernel.org Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Nathan Chancellor Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20250609-rtl8723bs-fix-clang-arm64-wflt-v1-1-e2accba43def@kernel.org Signed-off-by: Greg Kroah-Hartman commit 10876da918fa1aec0227fb4c67647513447f53a9 Author: Kuniyuki Iwashima Date: Tue Jun 17 15:40:42 2025 -0700 calipso: Fix null-ptr-deref in calipso_req_{set,del}attr(). syzkaller reported a null-ptr-deref in sock_omalloc() while allocating a CALIPSO option. [0] The NULL is of struct sock, which was fetched by sk_to_full_sk() in calipso_req_setattr(). Since commit a1a5344ddbe8 ("tcp: avoid two atomic ops for syncookies"), reqsk->rsk_listener could be NULL when SYN Cookie is returned to its client, as hinted by the leading SYN Cookie log. Here are 3 options to fix the bug: 1) Return 0 in calipso_req_setattr() 2) Return an error in calipso_req_setattr() 3) Alaways set rsk_listener 1) is no go as it bypasses LSM, but 2) effectively disables SYN Cookie for CALIPSO. 3) is also no go as there have been many efforts to reduce atomic ops and make TCP robust against DDoS. See also commit 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood"). As of the blamed commit, SYN Cookie already did not need refcounting, and no one has stumbled on the bug for 9 years, so no CALIPSO user will care about SYN Cookie. Let's return an error in calipso_req_setattr() and calipso_req_delattr() in the SYN Cookie case. This can be reproduced by [1] on Fedora and now connect() of nc times out. [0]: TCP: request_sock_TCPv6: Possible SYN flooding on port [::]:20002. Sending cookies. Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] CPU: 3 UID: 0 PID: 12262 Comm: syz.1.2611 Not tainted 6.14.0 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 RIP: 0010:read_pnet include/net/net_namespace.h:406 [inline] RIP: 0010:sock_net include/net/sock.h:655 [inline] RIP: 0010:sock_kmalloc+0x35/0x170 net/core/sock.c:2806 Code: 89 d5 41 54 55 89 f5 53 48 89 fb e8 25 e3 c6 fd e8 f0 91 e3 00 48 8d 7b 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 26 01 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b RSP: 0018:ffff88811af89038 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff888105266400 RDX: 0000000000000006 RSI: ffff88800c890000 RDI: 0000000000000030 RBP: 0000000000000050 R08: 0000000000000000 R09: ffff88810526640e R10: ffffed1020a4cc81 R11: ffff88810526640f R12: 0000000000000000 R13: 0000000000000820 R14: ffff888105266400 R15: 0000000000000050 FS: 00007f0653a07640(0000) GS:ffff88811af80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f863ba096f4 CR3: 00000000163c0005 CR4: 0000000000770ef0 PKRU: 80000000 Call Trace: ipv6_renew_options+0x279/0x950 net/ipv6/exthdrs.c:1288 calipso_req_setattr+0x181/0x340 net/ipv6/calipso.c:1204 calipso_req_setattr+0x56/0x80 net/netlabel/netlabel_calipso.c:597 netlbl_req_setattr+0x18a/0x440 net/netlabel/netlabel_kapi.c:1249 selinux_netlbl_inet_conn_request+0x1fb/0x320 security/selinux/netlabel.c:342 selinux_inet_conn_request+0x1eb/0x2c0 security/selinux/hooks.c:5551 security_inet_conn_request+0x50/0xa0 security/security.c:4945 tcp_v6_route_req+0x22c/0x550 net/ipv6/tcp_ipv6.c:825 tcp_conn_request+0xec8/0x2b70 net/ipv4/tcp_input.c:7275 tcp_v6_conn_request+0x1e3/0x440 net/ipv6/tcp_ipv6.c:1328 tcp_rcv_state_process+0xafa/0x52b0 net/ipv4/tcp_input.c:6781 tcp_v6_do_rcv+0x8a6/0x1a40 net/ipv6/tcp_ipv6.c:1667 tcp_v6_rcv+0x505e/0x5b50 net/ipv6/tcp_ipv6.c:1904 ip6_protocol_deliver_rcu+0x17c/0x1da0 net/ipv6/ip6_input.c:436 ip6_input_finish+0x103/0x180 net/ipv6/ip6_input.c:480 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0x13c/0x6b0 net/ipv6/ip6_input.c:491 dst_input include/net/dst.h:469 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] ip6_rcv_finish+0xb6/0x490 net/ipv6/ip6_input.c:69 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ipv6_rcv+0xf9/0x490 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x12e/0x1f0 net/core/dev.c:5896 __netif_receive_skb+0x1d/0x170 net/core/dev.c:6009 process_backlog+0x41e/0x13b0 net/core/dev.c:6357 __napi_poll+0xbd/0x710 net/core/dev.c:7191 napi_poll net/core/dev.c:7260 [inline] net_rx_action+0x9de/0xde0 net/core/dev.c:7382 handle_softirqs+0x19a/0x770 kernel/softirq.c:561 do_softirq.part.0+0x36/0x70 kernel/softirq.c:462 do_softirq arch/x86/include/asm/preempt.h:26 [inline] __local_bh_enable_ip+0xf1/0x110 kernel/softirq.c:389 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0xc2a/0x3c40 net/core/dev.c:4679 dev_queue_xmit include/linux/netdevice.h:3313 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip6_finish_output2+0xd69/0x1f80 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x5dc/0xd60 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x24b/0x8d0 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:459 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_xmit+0xbbc/0x20d0 net/ipv6/ip6_output.c:366 inet6_csk_xmit+0x39a/0x720 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x1a7b/0x3b40 net/ipv4/tcp_output.c:1471 tcp_transmit_skb net/ipv4/tcp_output.c:1489 [inline] tcp_send_syn_data net/ipv4/tcp_output.c:4059 [inline] tcp_connect+0x1c0c/0x4510 net/ipv4/tcp_output.c:4148 tcp_v6_connect+0x156c/0x2080 net/ipv6/tcp_ipv6.c:333 __inet_stream_connect+0x3a7/0xed0 net/ipv4/af_inet.c:677 tcp_sendmsg_fastopen+0x3e2/0x710 net/ipv4/tcp.c:1039 tcp_sendmsg_locked+0x1e82/0x3570 net/ipv4/tcp.c:1091 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1358 inet6_sendmsg+0xb9/0x150 net/ipv6/af_inet6.c:659 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0xf4/0x2a0 net/socket.c:733 __sys_sendto+0x29a/0x390 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xe1/0x1c0 net/socket.c:2190 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc3/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f06553c47ed Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0653a06fc8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f0655605fa0 RCX: 00007f06553c47ed RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000000b RBP: 00007f065545db38 R08: 0000200000000140 R09: 000000000000001c R10: f7384d4ea84b01bd R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0655605fac R14: 00007f0655606038 R15: 00007f06539e7000 Modules linked in: [1]: dnf install -y selinux-policy-targeted policycoreutils netlabel_tools procps-ng nmap-ncat mount -t selinuxfs none /sys/fs/selinux load_policy netlabelctl calipso add pass doi:1 netlabelctl map del default netlabelctl map add default address:::1 protocol:calipso,1 sysctl net.ipv4.tcp_syncookies=2 nc -l ::1 80 & nc ::1 80 Fixes: e1adea927080 ("calipso: Allow request sockets to be relabelled by the lsm.") Reported-by: syzkaller Reported-by: John Cheung Closes: https://lore.kernel.org/netdev/CAP=Rh=MvfhrGADy+-WJiftV2_WzMH4VEhEFmeT28qY+4yxNu4w@mail.gmail.com/ Signed-off-by: Kuniyuki Iwashima Acked-by: Paul Moore Link: https://patch.msgid.link/20250617224125.17299-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit a1113cefd7d62e20735edda79507dc9f6ce103ff Author: Shannon Nelson Date: Mon Jun 16 15:44:37 2025 -0700 MAINTAINERS: Remove Shannon Nelson from MAINTAINERS file Brett Creeley is taking ownership of AMD/Pensando drivers while I wander off into the sunset with my retirement this month. I'll still keep an eye out on a few topics for awhile, and maybe do some free-lance work in the future. Meanwhile, thank you all for the fun and support and the many learning opportunities :-). Special thanks go to DaveM for merging my first patch long ago, the big ionic patchset a few years ago, and my last patchset last week. Redirect things to a non-corporate account. Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: Brett Creeley Link: https://patch.msgid.link/20250616224437.56581-1-shannon.nelson@amd.com [Jakub: squash in the .mailmap update] Signed-off-by: Shannon Nelson Link: https://patch.msgid.link/20250619010603.1173141-1-sln@onemain.com Signed-off-by: Jakub Kicinski commit a39d082c3553d35b4fe5585e1e2fb221c130cae8 Author: Daniele Ceraolo Spurio Date: Wed Jun 11 14:44:54 2025 -0700 drm/xe: Fix early wedge on GuC load failure When the GuC fails to load we declare the device wedged. However, the very first GuC load attempt on GT0 (from xe_gt_init_hwconfig) is done before the GT1 GuC objects are initialized, so things go bad when the wedge code attempts to cleanup GT1. To fix this, check the initialization status in the functions called during wedge. Fixes: 7dbe8af13c18 ("drm/xe: Wedge the entire device") Signed-off-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Jonathan Cavitt Cc: Lucas De Marchi Cc: Zhanjun Dong Cc: stable@vger.kernel.org # v6.12+: 1e1981b16bb1: drm/xe: Fix taking invalid lock on wedge Cc: stable@vger.kernel.org # v6.12+ Reviewed-by: Jonathan Cavitt Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250611214453.1159846-2-daniele.ceraolospurio@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 0b93b7dcd9eb888a6ac7546560877705d4ad61bf) Signed-off-by: Thomas Hellström commit 16ea4666bbb7f5bd1130fa2d75631ccf8b62362e Author: Peter Ujfalusi Date: Thu Jun 19 13:47:05 2025 +0300 ASoC: Intel: sof-function-topology-lib: Print out the unsupported dmic count It is better to print out the non supported num_dmics than printing that it is not matching with 2 or 4. Fixes: 2fbeff33381c ("ASoC: Intel: add sof_sdw_get_tplg_files ops") Cc: stable@vger.kernel.org Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250619104705.26057-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 87a15c89d8c7b00b0fc94e0d4f554f7ee2fe6961 Author: Lucas De Marchi Date: Thu Jun 12 15:14:12 2025 -0700 drm/xe: Fix memset on iomem It should rather use xe_map_memset() as the BO is created with XE_BO_FLAG_VRAM_IF_DGFX in xe_guc_pc_init(). Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: stable@vger.kernel.org Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250612-vmap-vaddr-v1-1-26238ed443eb@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 21cf47d89fba353b2d5915ba4718040c4cb955d3) Signed-off-by: Thomas Hellström commit 16c1241b08751a67cd7a0221ea9f82b0b02806f4 Author: Vinay Belgaumkar Date: Thu Jun 12 00:09:01 2025 -0700 drm/xe/bmg: Update Wa_16023588340 This allows for additional L2 caching modes. Fixes: 01570b446939 ("drm/xe/bmg: implement Wa_16023588340") Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Vinay Belgaumkar Link: https://lore.kernel.org/r/20250612-wa-14022085890-v4-2-94ba5dcc1e30@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 6ab42fa03d4c88a0ddf5e56e62794853b198e7bf) Signed-off-by: Thomas Hellström commit 8c8472855884355caf3d8e0c50adf825f83454b2 Author: Ronnie Sahlberg Date: Thu Jun 19 12:10:31 2025 +1000 ublk: santizize the arguments from userspace when adding a device Sanity check the values for queue depth and number of queues we get from userspace when adding a device. Signed-off-by: Ronnie Sahlberg Reviewed-by: Ming Lei Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Fixes: 62fe99cef94a ("ublk: add read()/write() support for ublk char device") Link: https://lore.kernel.org/r/20250619021031.181340-1-ronniesahlberg@gmail.com Signed-off-by: Jens Axboe commit 94d10a4dba0bc482f2b01e39f06d5513d0f75742 Author: Jeff Layton Date: Thu Jun 19 06:01:55 2025 -0400 sunrpc: handle SVC_GARBAGE during svc auth processing as auth error tianshuo han reported a remotely-triggerable crash if the client sends a kernel RPC server a specially crafted packet. If decoding the RPC reply fails in such a way that SVC_GARBAGE is returned without setting the rq_accept_statp pointer, then that pointer can be dereferenced and a value stored there. If it's the first time the thread has processed an RPC, then that pointer will be set to NULL and the kernel will crash. In other cases, it could create a memory scribble. The server sunrpc code treats a SVC_GARBAGE return from svc_authenticate or pg_authenticate as if it should send a GARBAGE_ARGS reply. RFC 5531 says that if authentication fails that the RPC should be rejected instead with a status of AUTH_ERR. Handle a SVC_GARBAGE return as an AUTH_ERROR, with a reason of AUTH_BADCRED instead of returning GARBAGE_ARGS in that case. This sidesteps the whole problem of touching the rpc_accept_statp pointer in this situation and avoids the crash. Cc: stable@kernel.org Fixes: 29cd2927fb91 ("SUNRPC: Fix encoding of accepted but unsuccessful RPC replies") Reported-by: tianshuo han Reviewed-by: Chuck Lever Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 8ea688a3372e8369dc04395b39b4e71a6d91d4d5 Author: Jeff Layton Date: Tue May 27 20:12:47 2025 -0400 nfsd: use threads array as-is in netlink interface The old nfsdfs interface for starting a server with multiple pools handles the special case of a single entry array passed down from userland by distributing the threads over every NUMA node. The netlink control interface however constructs an array of length nfsd_nrpools() and fills any unprovided slots with 0's. This behavior defeats the special casing that the old interface relies on. Change nfsd_nl_threads_set_doit() to pass down the array from userland as-is. Fixes: 7f5c330b2620 ("nfsd: allow passing in array of thread counts via netlink") Cc: stable@vger.kernel.org Reported-by: Mike Snitzer Closes: https://lore.kernel.org/linux-nfs/aDC-ftnzhJAlwqwh@kernel.org/ Signed-off-by: Jeff Layton Reviewed-by: Simon Horman Tested-by: Mike Snitzer Signed-off-by: Chuck Lever commit e353b0854d3a1a31cb061df8d022fbfea53a0f24 Author: Alexey Kodanev Date: Mon Jun 16 11:37:43 2025 +0000 net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get() Before calling lan743x_ptp_io_event_clock_get(), the 'channel' value is checked against the maximum value of PCI11X1X_PTP_IO_MAX_CHANNELS(8). This seems correct and aligns with the PTP interrupt status register (PTP_INT_STS) specifications. However, lan743x_ptp_io_event_clock_get() writes to ptp->extts[] with only LAN743X_PTP_N_EXTTS(4) elements, using channel as an index: lan743x_ptp_io_event_clock_get(..., u8 channel,...) { ... /* Update Local timestamp */ extts = &ptp->extts[channel]; extts->ts.tv_sec = sec; ... } To avoid an out-of-bounds write and utilize all the supported GPIO inputs, set LAN743X_PTP_N_EXTTS to 8. Detected using the static analysis tool - Svace. Fixes: 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input External Timestamp (extts)") Signed-off-by: Alexey Kodanev Reviewed-by: Jacob Keller Acked-by: Rengarajan S Link: https://patch.msgid.link/20250616113743.36284-1-aleksei.kodanev@bell-sw.com Signed-off-by: Paolo Abeni commit c0d90a79e8e65b89037508276b2b31f41a1b3783 Author: Johannes Thumshirn Date: Fri Jun 6 09:17:41 2025 +0200 btrfs: zoned: fix alloc_offset calculation for partly conventional block groups When one of two zones composing a DUP block group is a conventional zone, we have the zone_info[i]->alloc_offset = WP_CONVENTIONAL. That will, of course, not match the write pointer of the other zone, and fails that block group. This commit solves that issue by properly recovering the emulated write pointer from the last allocated extent. The offset for the SINGLE, DUP, and RAID1 are straight-forward: it is same as the end of last allocated extent. The RAID0 and RAID10 are a bit tricky that we need to do the math of striping. This is the kernel equivalent of Naohiro's user-space commit: "btrfs-progs: zoned: fix alloc_offset calculation for partly conventional block groups". Reviewed-by: Naohiro Aota Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 547e836661554dcfa15c212a3821664e85b4191a Author: Qu Wenruo Date: Sat Jun 7 09:18:43 2025 +0930 btrfs: handle csum tree error with rescue=ibadroots correctly [BUG] There is syzbot based reproducer that can crash the kernel, with the following call trace: (With some debug output added) DEBUG: rescue=ibadroots parsed BTRFS: device fsid 14d642db-7b15-43e4-81e6-4b8fac6a25f8 devid 1 transid 8 /dev/loop0 (7:0) scanned by repro (1010) BTRFS info (device loop0): first mount of filesystem 14d642db-7b15-43e4-81e6-4b8fac6a25f8 BTRFS info (device loop0): using blake2b (blake2b-256-generic) checksum algorithm BTRFS info (device loop0): using free-space-tree BTRFS warning (device loop0): checksum verify failed on logical 5312512 mirror 1 wanted 0xb043382657aede36608fd3386d6b001692ff406164733d94e2d9a180412c6003 found 0x810ceb2bacb7f0f9eb2bf3b2b15c02af867cb35ad450898169f3b1f0bd818651 level 0 DEBUG: read tree root path failed for tree csum, ret=-5 BTRFS warning (device loop0): checksum verify failed on logical 5328896 mirror 1 wanted 0x51be4e8b303da58e6340226815b70e3a93592dac3f30dd510c7517454de8567a found 0x51be4e8b303da58e634022a315b70e3a93592dac3f30dd510c7517454de8567a level 0 BTRFS warning (device loop0): checksum verify failed on logical 5292032 mirror 1 wanted 0x1924ccd683be9efc2fa98582ef58760e3848e9043db8649ee382681e220cdee4 found 0x0cb6184f6e8799d9f8cb335dccd1d1832da1071d12290dab3b85b587ecacca6e level 0 process 'repro' launched './file2' with NULL argv: empty string added DEBUG: no csum root, idatacsums=0 ibadroots=134217728 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f] CPU: 5 UID: 0 PID: 1010 Comm: repro Tainted: G OE 6.15.0-custom+ #249 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:btrfs_lookup_csum+0x93/0x3d0 [btrfs] Call Trace: btrfs_lookup_bio_sums+0x47a/0xdf0 [btrfs] btrfs_submit_bbio+0x43e/0x1a80 [btrfs] submit_one_bio+0xde/0x160 [btrfs] btrfs_readahead+0x498/0x6a0 [btrfs] read_pages+0x1c3/0xb20 page_cache_ra_order+0x4b5/0xc20 filemap_get_pages+0x2d3/0x19e0 filemap_read+0x314/0xde0 __kernel_read+0x35b/0x900 bprm_execve+0x62e/0x1140 do_execveat_common.isra.0+0x3fc/0x520 __x64_sys_execveat+0xdc/0x130 do_syscall_64+0x54/0x1d0 entry_SYSCALL_64_after_hwframe+0x76/0x7e ---[ end trace 0000000000000000 ]--- [CAUSE] Firstly the fs has a corrupted csum tree root, thus to mount the fs we have to go "ro,rescue=ibadroots" mount option. Normally with that mount option, a bad csum tree root should set BTRFS_FS_STATE_NO_DATA_CSUMS flag, so that any future data read will ignore csum search. But in this particular case, we have the following call trace that caused NULL csum root, but not setting BTRFS_FS_STATE_NO_DATA_CSUMS: load_global_roots_objectid(): ret = btrfs_search_slot(); /* Succeeded */ btrfs_item_key_to_cpu() found = true; /* We found the root item for csum tree. */ root = read_tree_root_path(); if (IS_ERR(root)) { if (!btrfs_test_opt(fs_info, IGNOREBADROOTS)) /* * Since we have rescue=ibadroots mount option, * @ret is still 0. */ break; if (!found || ret) { /* @found is true, @ret is 0, error handling for csum * tree is skipped. */ } This means we completely skipped to set BTRFS_FS_STATE_NO_DATA_CSUMS if the csum tree is corrupted, which results unexpected later csum lookup. [FIX] If read_tree_root_path() failed, always populate @ret to the error number. As at the end of the function, we need @ret to determine if we need to do the extra error handling for csum tree. Fixes: abed4aaae4f7 ("btrfs: track the csum, extent, and free space trees in a rb tree") Reported-by: Zhiyu Zhang Reported-by: Longxing Li Reviewed-by: David Sterba Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit a26bf338cdad3643a6e7c3d78a172baadba15c1a Author: Filipe Manana Date: Wed Jun 4 16:54:44 2025 +0100 btrfs: fix race between async reclaim worker and close_ctree() Syzbot reported an assertion failure due to an attempt to add a delayed iput after we have set BTRFS_FS_STATE_NO_DELAYED_IPUT in the fs_info state: WARNING: CPU: 0 PID: 65 at fs/btrfs/inode.c:3420 btrfs_add_delayed_iput+0x2f8/0x370 fs/btrfs/inode.c:3420 Modules linked in: CPU: 0 UID: 0 PID: 65 Comm: kworker/u8:4 Not tainted 6.15.0-next-20250530-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: btrfs-endio-write btrfs_work_helper RIP: 0010:btrfs_add_delayed_iput+0x2f8/0x370 fs/btrfs/inode.c:3420 Code: 4e ad 5d (...) RSP: 0018:ffffc9000213f780 EFLAGS: 00010293 RAX: ffffffff83c635b7 RBX: ffff888058920000 RCX: ffff88801c769e00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: 0000000000000001 R08: ffff888058921b67 R09: 1ffff1100b12436c R10: dffffc0000000000 R11: ffffed100b12436d R12: 0000000000000001 R13: dffffc0000000000 R14: ffff88807d748000 R15: 0000000000000100 FS: 0000000000000000(0000) GS:ffff888125c53000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000bd038 CR3: 000000006a142000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_put_ordered_extent+0x19f/0x470 fs/btrfs/ordered-data.c:635 btrfs_finish_one_ordered+0x11d8/0x1b10 fs/btrfs/inode.c:3312 btrfs_work_helper+0x399/0xc20 fs/btrfs/async-thread.c:312 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 This can happen due to a race with the async reclaim worker like this: 1) The async metadata reclaim worker enters shrink_delalloc(), which calls btrfs_start_delalloc_roots() with an nr_pages argument that has a value less than LONG_MAX, and that in turn enters start_delalloc_inodes(), which sets the local variable 'full_flush' to false because wbc->nr_to_write is less than LONG_MAX; 2) There it finds inode X in a root's delalloc list, grabs a reference for inode X (with igrab()), and triggers writeback for it with filemap_fdatawrite_wbc(), which creates an ordered extent for inode X; 3) The unmount sequence starts from another task, we enter close_ctree() and we flush the workqueue fs_info->endio_write_workers, which waits for the ordered extent for inode X to complete and when dropping the last reference of the ordered extent, with btrfs_put_ordered_extent(), when we call btrfs_add_delayed_iput() we don't add the inode to the list of delayed iputs because it has a refcount of 2, so we decrement it to 1 and return; 4) Shortly after at close_ctree() we call btrfs_run_delayed_iputs() which runs all delayed iputs, and then we set BTRFS_FS_STATE_NO_DELAYED_IPUT in the fs_info state; 5) The async reclaim worker, after calling filemap_fdatawrite_wbc(), now calls btrfs_add_delayed_iput() for inode X and there we trigger an assertion failure since the fs_info state has the flag BTRFS_FS_STATE_NO_DELAYED_IPUT set. Fix this by setting BTRFS_FS_STATE_NO_DELAYED_IPUT only after we wait for the async reclaim workers to finish, after we call cancel_work_sync() for them at close_ctree(), and by running delayed iputs after wait for the reclaim workers to finish and before setting the bit. This race was recently introduced by commit 19e60b2a95f5 ("btrfs: add extra warning if delayed iput is added when it's not allowed"). Without the new validation at btrfs_add_delayed_iput(), this described scenario was safe because close_ctree() later calls btrfs_commit_super(). That will run any final delayed iputs added by reclaim workers in the window between the btrfs_run_delayed_iputs() and the the reclaim workers being shut down. Reported-by: syzbot+0ed30ad435bf6f5b7a42@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/6840481c.a00a0220.d4325.000c.GAE@google.com/T/#u Fixes: 19e60b2a95f5 ("btrfs: add extra warning if delayed iput is added when it's not allowed") Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1961d20f6fa8903266ed9bd77c691924c22c8f02 Author: Filipe Manana Date: Thu Jun 5 20:51:03 2025 +0100 btrfs: fix assertion when building free space tree When building the free space tree with the block group tree feature enabled, we can hit an assertion failure like this: BTRFS info (device loop0 state M): rebuilding free space tree assertion failed: ret == 0, in fs/btrfs/free-space-tree.c:1102 ------------[ cut here ]------------ kernel BUG at fs/btrfs/free-space-tree.c:1102! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 6592 Comm: syz-executor322 Not tainted 6.15.0-rc7-syzkaller-gd7fa1af5b33e #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : populate_free_space_tree+0x514/0x518 fs/btrfs/free-space-tree.c:1102 lr : populate_free_space_tree+0x514/0x518 fs/btrfs/free-space-tree.c:1102 sp : ffff8000a4ce7600 x29: ffff8000a4ce76e0 x28: ffff0000c9bc6000 x27: ffff0000ddfff3d8 x26: ffff0000ddfff378 x25: dfff800000000000 x24: 0000000000000001 x23: ffff8000a4ce7660 x22: ffff70001499cecc x21: ffff0000e1d8c160 x20: ffff0000e1cb7800 x19: ffff0000e1d8c0b0 x18: 00000000ffffffff x17: ffff800092f39000 x16: ffff80008ad27e48 x15: ffff700011e740c0 x14: 1ffff00011e740c0 x13: 0000000000000004 x12: ffffffffffffffff x11: ffff700011e740c0 x10: 0000000000ff0100 x9 : 94ef24f55d2dbc00 x8 : 94ef24f55d2dbc00 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a4ce6f98 x4 : ffff80008f415ba0 x3 : ffff800080548ef0 x2 : 0000000000000000 x1 : 0000000100000000 x0 : 000000000000003e Call trace: populate_free_space_tree+0x514/0x518 fs/btrfs/free-space-tree.c:1102 (P) btrfs_rebuild_free_space_tree+0x14c/0x54c fs/btrfs/free-space-tree.c:1337 btrfs_start_pre_rw_mount+0xa78/0xe10 fs/btrfs/disk-io.c:3074 btrfs_remount_rw fs/btrfs/super.c:1319 [inline] btrfs_reconfigure+0x828/0x2418 fs/btrfs/super.c:1543 reconfigure_super+0x1d4/0x6f0 fs/super.c:1083 do_remount fs/namespace.c:3365 [inline] path_mount+0xb34/0xde0 fs/namespace.c:4200 do_mount fs/namespace.c:4221 [inline] __do_sys_mount fs/namespace.c:4432 [inline] __se_sys_mount fs/namespace.c:4409 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4409 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: f0047182 91178042 528089c3 9771d47b (d4210000) ---[ end trace 0000000000000000 ]--- This happens because we are processing an empty block group, which has no extents allocated from it, there are no items for this block group, including the block group item since block group items are stored in a dedicated tree when using the block group tree feature. It also means this is the block group with the highest start offset, so there are no higher keys in the extent root, hence btrfs_search_slot_for_read() returns 1 (no higher key found). Fix this by asserting 'ret' is 0 only if the block group tree feature is not enabled, in which case we should find a block group item for the block group since it's stored in the extent root and block group item keys are greater than extent item keys (the value for BTRFS_BLOCK_GROUP_ITEM_KEY is 192 and for BTRFS_EXTENT_ITEM_KEY and BTRFS_METADATA_ITEM_KEY the values are 168 and 169 respectively). In case 'ret' is 1, we just need to add a record to the free space tree which spans the whole block group, and we can achieve this by making 'ret == 0' as the while loop's condition. Reported-by: syzbot+36fae25c35159a763a2a@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/6841dca8.a00a0220.d4325.0020.GAE@google.com/ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 16edae52f60658caeaa0702e7cb6b738a09d4ad4 Author: Filipe Manana Date: Tue Jun 3 22:06:17 2025 +0100 btrfs: don't silently ignore unexpected extent type when replaying log If there's an unexpected (invalid) extent type, we just silently ignore it. This means a corruption or some bug somewhere, so instead return -EUCLEAN to the caller, making log replay fail, and print an error message with relevant information. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2dcf838cf5c2f0f4501edaa1680fcad03618d760 Author: Filipe Manana Date: Tue Jun 3 19:29:01 2025 +0100 btrfs: fix invalid inode pointer dereferences during log replay In a few places where we call read_one_inode(), if we get a NULL pointer we end up jumping into an error path, or fallthrough in case of __add_inode_ref(), where we then do something like this: iput(&inode->vfs_inode); which results in an invalid inode pointer that triggers an invalid memory access, resulting in a crash. Fix this by making sure we don't do such dereferences. Fixes: b4c50cbb01a1 ("btrfs: return a btrfs_inode from read_one_inode()") CC: stable@vger.kernel.org # 6.15+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e5b5596011773a38e035e9633ed928ef13c720b1 Author: Filipe Manana Date: Tue Jun 3 19:45:35 2025 +0100 btrfs: fix double unlock of buffer_tree xarray when releasing subpage eb If we break out of the loop because an extent buffer doesn't have the bit EXTENT_BUFFER_TREE_REF set, we end up unlocking the xarray twice, once before we tested for the bit and break out of the loop, and once again after the loop. Fix this by testing the bit and exiting before unlocking the xarray. The time spent testing the bit is negligible and it's not worth trying to do that outside the critical section delimited by the xarray lock due to the code complexity required to avoid it (like using a local boolean variable to track whether the xarray is locked or not). The xarray unlock only needs to be done before calling release_extent_buffer(), as that needs to lock the xarray (through xa_cmpxchg_irq()) and does a more significant amount of work. Fixes: 19d7f65f032f ("btrfs: convert the buffer_radix to an xarray") Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-btrfs/aDRNDU0GM1_D4Xnw@stanley.mountain/ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ae4477f937569d097ca5dbce92a89ba384b49bc6 Author: Mark Harmstone Date: Thu May 29 10:37:44 2025 +0100 btrfs: update superblock's device bytes_used when dropping chunk Each superblock contains a copy of the device item for that device. In a transaction which drops a chunk but doesn't create any new ones, we were correctly updating the device item in the chunk tree but not copying over the new bytes_used value to the superblock. This can be seen by doing the following: # dd if=/dev/zero of=test bs=4096 count=2621440 # mkfs.btrfs test # mount test /root/temp # cd /root/temp # for i in {00..10}; do dd if=/dev/zero of=$i bs=4096 count=32768; done # sync # rm * # sync # btrfs balance start -dusage=0 . # sync # cd # umount /root/temp # btrfs check test For btrfs-check to detect this, you will also need my patch at https://github.com/kdave/btrfs-progs/pull/991. Change btrfs_remove_dev_extents() so that it adds the devices to the fs_info->post_commit_list if they're not there already. This causes btrfs_commit_device_sizes() to be called, which updates the bytes_used value in the superblock. Fixes: bbbf7243d62d ("btrfs: combine device update operations during transaction commit") CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Qu Wenruo Signed-off-by: Mark Harmstone Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ca864de852bc91007b32d2a0d48993724f4abad Author: Filipe Manana Date: Wed May 28 12:28:27 2025 +0100 btrfs: fix a race between renames and directory logging We have a race between a rename and directory inode logging that if it happens and we crash/power fail before the rename completes, the next time the filesystem is mounted, the log replay code will end up deleting the file that was being renamed. This is best explained following a step by step analysis of an interleaving of steps that lead into this situation. Consider the initial conditions: 1) We are at transaction N; 2) We have directories A and B created in a past transaction (< N); 3) We have inode X corresponding to a file that has 2 hardlinks, one in directory A and the other in directory B, so we'll name them as "A/foo_link1" and "B/foo_link2". Both hard links were persisted in a past transaction (< N); 4) We have inode Y corresponding to a file that as a single hard link and is located in directory A, we'll name it as "A/bar". This file was also persisted in a past transaction (< N). The steps leading to a file loss are the following and for all of them we are under transaction N: 1) Link "A/foo_link1" is removed, so inode's X last_unlink_trans field is updated to N, through btrfs_unlink() -> btrfs_record_unlink_dir(); 2) Task A starts a rename for inode Y, with the goal of renaming from "A/bar" to "A/baz", so we enter btrfs_rename(); 3) Task A inserts the new BTRFS_INODE_REF_KEY for inode Y by calling btrfs_insert_inode_ref(); 4) Because the rename happens in the same directory, we don't set the last_unlink_trans field of directoty A's inode to the current transaction id, that is, we don't cal btrfs_record_unlink_dir(); 5) Task A then removes the entries from directory A (BTRFS_DIR_ITEM_KEY and BTRFS_DIR_INDEX_KEY items) when calling __btrfs_unlink_inode() (actually the dir index item is added as a delayed item, but the effect is the same); 6) Now before task A adds the new entry "A/baz" to directory A by calling btrfs_add_link(), another task, task B is logging inode X; 7) Task B starts a fsync of inode X and after logging inode X, at btrfs_log_inode_parent() it calls btrfs_log_all_parents(), since inode X has a last_unlink_trans value of N, set at in step 1; 8) At btrfs_log_all_parents() we search for all parent directories of inode X using the commit root, so we find directories A and B and log them. Bu when logging direct A, we don't have a dir index item for inode Y anymore, neither the old name "A/bar" nor for the new name "A/baz" since the rename has deleted the old name but has not yet inserted the new name - task A hasn't called yet btrfs_add_link() to do that. Note that logging directory A doesn't fallback to a transaction commit because its last_unlink_trans has a lower value than the current transaction's id (see step 4); 9) Task B finishes logging directories A and B and gets back to btrfs_sync_file() where it calls btrfs_sync_log() to persist the log tree; 10) Task B successfully persisted the log tree, btrfs_sync_log() completed with success, and a power failure happened. We have a log tree without any directory entry for inode Y, so the log replay code deletes the entry for inode Y, name "A/bar", from the subvolume tree since it doesn't exist in the log tree and the log tree is authorative for its index (we logged a BTRFS_DIR_LOG_INDEX_KEY item that covers the index range for the dentry that corresponds to "A/bar"). Since there's no other hard link for inode Y and the log replay code deletes the name "A/bar", the file is lost. The issue wouldn't happen if task B synced the log only after task A called btrfs_log_new_name(), which would update the log with the new name for inode Y ("A/bar"). Fix this by pinning the log root during renames before removing the old directory entry, and unpinning after btrfs_log_new_name() is called. Fixes: 259c4b96d78d ("btrfs: stop doing unnecessary log updates during a rename") CC: stable@vger.kernel.org # 5.18+ Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 65d5112b4d7cf019ccb62cf40077038aae66239b Author: Anand Jain Date: Tue May 20 19:42:23 2025 +0800 btrfs: scrub: add prefix for the error messages Add a "scrub: " prefix to all messages logged by scrub so that it's easy to filter them from dmesg for analysis. Reviewed-by: Filipe Manana Reviewed-by: Qu Wenruo Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 186b9dc3c302ad706b3f23c857eb128165f6b484 Author: Leo Martins Date: Tue May 27 17:04:22 2025 -0700 btrfs: warn if leaking delayed_nodes in btrfs_put_root() Add a warning for leaked delayed_nodes when putting a root. We currently do this for inodes, but not delayed_nodes. Signed-off-by: Leo Martins Reviewed-by: Filipe Manana Reviewed-by: Qu Wenruo [ Remove the changelog from the commit message. ] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit dd276214e439db08f444fd3e07e9fe4c9e0ca210 Author: Leo Martins Date: Tue May 27 17:04:21 2025 -0700 btrfs: fix delayed ref refcount leak in debug assertion If the delayed_root is not empty we are increasing the number of references to a delayed_node without decreasing it, causing a leak. Fix by decrementing the delayed_node reference count. Reviewed-by: Filipe Manana Signed-off-by: Leo Martins Reviewed-by: Qu Wenruo [ Remove the changelog from the commit message. ] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit c769be2d3dbb165a3d432f4fcca2c80fabb35877 Author: Filipe Manana Date: Thu May 22 16:10:00 2025 +0100 btrfs: include root in error message when unlinking inode To help debugging include the root number in the error message, and since this is a critical error that implies a metadata inconsistency and results in a transaction abort change the log message level from "info" to "critical", which is a much better fit. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 04c5355b2a94ff3191ce63ab035fb7f04d036869 Author: Mark Rutland Date: Tue Jun 17 14:37:18 2025 +0100 KVM: arm64: VHE: Centralize ISBs when returning to host The VHE hyp code has recently gained a few ISBs. Simplify this to one unconditional ISB in __kvm_vcpu_run_vhe(), and remove the unnecessary ISB from the kvm_call_hyp_ret() macro. While kvm_call_hyp_ret() is also used to invoke __vgic_v3_get_gic_config(), but no ISB is necessary in that case either. For the moment, an ISB is left in kvm_call_hyp(), as there are many more users, and removing the ISB would require a more thorough audit. Suggested-by: Marc Zyngier Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-8-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit 3a300a33e4063fb44c7887bec3aecd2fd6966df8 Author: Mark Rutland Date: Tue Jun 17 14:37:17 2025 +0100 KVM: arm64: Remove cpacr_clear_set() We no longer use cpacr_clear_set(). Remove cpacr_clear_set() and its helper functions. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-7-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit 186b58bacd74d9b7892869f7c7d20cf865a3c237 Author: Mark Rutland Date: Tue Jun 17 14:37:16 2025 +0100 KVM: arm64: Remove ad-hoc CPTR manipulation from kvm_hyp_handle_fpsimd() The hyp code FPSIMD/SVE/SME trap handling logic has some rather messy open-coded manipulation of CPTR/CPACR. This is benign for non-nested guests, but broken for nested guests, as the guest hypervisor's CPTR configuration is not taken into account. Consider the case where L0 provides FPSIMD+SVE to an L1 guest hypervisor, and the L1 guest hypervisor only provides FPSIMD to an L2 guest (with L1 configuring CPTR/CPACR to trap SVE usage from L2). If the L2 guest triggers an FPSIMD trap to the L0 hypervisor, kvm_hyp_handle_fpsimd() will see that the vCPU supports FPSIMD+SVE, and will configure CPTR/CPACR to NOT trap FPSIMD+SVE before returning to the L2 guest. Consequently the L2 guest would be able to manipulate SVE state even though the L1 hypervisor had configured CPTR/CPACR to forbid this. Clean this up, and fix the nested virt issue by always using __deactivate_cptr_traps() and __activate_cptr_traps() to manage the CPTR traps. This removes the need for the ad-hoc fixup in kvm_hyp_save_fpsimd_host(), and ensures that any guest hypervisor configuration of CPTR/CPACR is taken into account. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-6-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit 59e6e101a6fa542a365dd5858affd18ba3e84cb8 Author: Mark Rutland Date: Tue Jun 17 14:37:15 2025 +0100 KVM: arm64: Remove ad-hoc CPTR manipulation from fpsimd_sve_sync() There's no need for fpsimd_sve_sync() to write to CPTR/CPACR. All relevant traps are always disabled earlier within __kvm_vcpu_run(), when __deactivate_cptr_traps() configures CPTR/CPACR. With irrelevant details elided, the flow is: handle___kvm_vcpu_run(...) { flush_hyp_vcpu(...) { fpsimd_sve_flush(...); } __kvm_vcpu_run(...) { __activate_traps(...) { __activate_cptr_traps(...); } do { __guest_enter(...); } while (...); __deactivate_traps(....) { __deactivate_cptr_traps(...); } } sync_hyp_vcpu(...) { fpsimd_sve_sync(...); } } Remove the unnecessary write to CPTR/CPACR. An ISB is still necessary, so a comment is added to describe this requirement. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-5-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit e62dd507844fa47f0fdc29f3be5a90a83f297820 Author: Mark Rutland Date: Tue Jun 17 14:37:14 2025 +0100 KVM: arm64: Reorganise CPTR trap manipulation The NVHE/HVHE and VHE modes have separate implementations of __activate_cptr_traps() and __deactivate_cptr_traps() in their respective switch.c files. There's some duplication of logic, and it's not currently possible to reuse this logic elsewhere. Move the logic into the common switch.h header so that it can be reused, and de-duplicate the common logic. This rework changes the way SVE traps are deactivated in VHE mode, aligning it with NVHE/HVHE modes: * Before this patch, VHE's __deactivate_cptr_traps() would unconditionally enable SVE for host EL2 (but not EL0), regardless of whether the ARM64_SVE cpucap was set. * After this patch, VHE's __deactivate_cptr_traps() will take the ARM64_SVE cpucap into account. When ARM64_SVE is not set, SVE will be trapped from EL2 and below. The old and new behaviour are both benign: * When ARM64_SVE is not set, the host will not touch SVE state, and will not reconfigure SVE traps. Host EL0 access to SVE will be trapped as expected. * When ARM64_SVE is set, the host will configure EL0 SVE traps before returning to EL0 as part of reloading the EL0 FPSIMD/SVE/SME state. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-4-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit 257d0aa8e2502754bc758faceceb6ff59318af60 Author: Mark Rutland Date: Tue Jun 17 14:37:13 2025 +0100 KVM: arm64: VHE: Synchronize CPTR trap deactivation Currently there is no ISB between __deactivate_cptr_traps() disabling traps that affect EL2 and fpsimd_lazy_switch_to_host() manipulating registers potentially affected by CPTR traps. When NV is not in use, this is safe because the relevant registers are only accessed when guest_owns_fp_regs() && vcpu_has_sve(vcpu), and this also implies that SVE traps affecting EL2 have been deactivated prior to __guest_entry(). When NV is in use, a guest hypervisor may have configured SVE traps for a nested context, and so it is necessary to have an ISB between __deactivate_cptr_traps() and fpsimd_lazy_switch_to_host(). Due to the current lack of an ISB, when a guest hypervisor enables SVE traps in CPTR, the host can take an unexpected SVE trap from within fpsimd_lazy_switch_to_host(), e.g. | Unhandled 64-bit el1h sync exception on CPU1, ESR 0x0000000066000000 -- SVE | CPU: 1 UID: 0 PID: 164 Comm: kvm-vcpu-0 Not tainted 6.15.0-rc4-00138-ga05e0f012c05 #3 PREEMPT | Hardware name: FVP Base RevC (DT) | pstate: 604023c9 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : __kvm_vcpu_run+0x6f4/0x844 | lr : __kvm_vcpu_run+0x150/0x844 | sp : ffff800083903a60 | x29: ffff800083903a90 x28: ffff000801f4a300 x27: 0000000000000000 | x26: 0000000000000000 x25: ffff000801f90000 x24: ffff000801f900f0 | x23: ffff800081ff7720 x22: 0002433c807d623f x21: ffff000801f90000 | x20: ffff00087f730730 x19: 0000000000000000 x18: 0000000000000000 | x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 | x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 | x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 | x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff000801f90d70 | x5 : 0000000000001000 x4 : ffff8007fd739000 x3 : ffff000801f90000 | x2 : 0000000000000000 x1 : 00000000000003cc x0 : ffff800082f9d000 | Kernel panic - not syncing: Unhandled exception | CPU: 1 UID: 0 PID: 164 Comm: kvm-vcpu-0 Not tainted 6.15.0-rc4-00138-ga05e0f012c05 #3 PREEMPT | Hardware name: FVP Base RevC (DT) | Call trace: | show_stack+0x18/0x24 (C) | dump_stack_lvl+0x60/0x80 | dump_stack+0x18/0x24 | panic+0x168/0x360 | __panic_unhandled+0x68/0x74 | el1h_64_irq_handler+0x0/0x24 | el1h_64_sync+0x6c/0x70 | __kvm_vcpu_run+0x6f4/0x844 (P) | kvm_arm_vcpu_enter_exit+0x64/0xa0 | kvm_arch_vcpu_ioctl_run+0x21c/0x870 | kvm_vcpu_ioctl+0x1a8/0x9d0 | __arm64_sys_ioctl+0xb4/0xf4 | invoke_syscall+0x48/0x104 | el0_svc_common.constprop.0+0x40/0xe0 | do_el0_svc+0x1c/0x28 | el0_svc+0x30/0xcc | el0t_64_sync_handler+0x10c/0x138 | el0t_64_sync+0x198/0x19c | SMP: stopping secondary CPUs | Kernel Offset: disabled | CPU features: 0x0000,000002c0,02df4fb9,97ee773f | Memory Limit: none | ---[ end Kernel panic - not syncing: Unhandled exception ]--- Fix this by adding an ISB between __deactivate_traps() and fpsimd_lazy_switch_to_host(). Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250617133718.4014181-3-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit cade3d57e456e69f67aa9894bf89dc8678796bb7 Author: Mark Rutland Date: Tue Jun 17 14:37:12 2025 +0100 KVM: arm64: VHE: Synchronize restore of host debug registers When KVM runs in non-protected VHE mode, there's no context synchronization event between __debug_switch_to_host() restoring the host debug registers and __kvm_vcpu_run() unmasking debug exceptions. Due to this, it's theoretically possible for the host to take an unexpected debug exception due to the stale guest configuration. This cannot happen in NVHE/HVHE mode as debug exceptions are masked in the hyp code, and the exception return to the host will provide the necessary context synchronization before debug exceptions can be taken. For now, avoid the problem by adding an ISB after VHE hyp code restores the host debug registers. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Mark Brown Cc: Oliver Upton Cc: Will Deacon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250617133718.4014181-2-mark.rutland@arm.com Signed-off-by: Marc Zyngier commit d36f0e9a0002f04f4d6dd9be908d58fe5bd3a279 Author: Aidan Stewart Date: Tue Jun 17 10:48:19 2025 -0600 serial: core: restore of_node information in sysfs Since in v6.8-rc1, the of_node symlink under tty devices is missing. This breaks any udev rules relying on this information. Link the of_node information in the serial controller device with the parent defined in the device tree. This will also apply to the serial device which takes the serial controller as a parent device. Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") Cc: stable@vger.kernel.org Signed-off-by: Aidan Stewart Link: https://lore.kernel.org/r/20250617164819.13912-1-astewart@tektelic.com Signed-off-by: Greg Kroah-Hartman commit 747b52413effe958ed57cf6d7bef80c34e1185f3 Author: Randy Dunlap Date: Tue Jun 10 19:02:29 2025 -0700 vt: fix kernel-doc warnings in ucs_get_fallback() Use the correct function parameter name in ucs_get_fallback() to prevent kernel-doc warnings: Warning: drivers/tty/vt/ucs.c:218 function parameter 'cp' not described in 'ucs_get_fallback' Warning: drivers/tty/vt/ucs.c:218 Excess function parameter 'base' description in 'ucs_get_fallback' Fixes: fe26933cf1e1 ("vt: add ucs_get_fallback()") Signed-off-by: Randy Dunlap Cc: Nicolas Pitre Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Reviewed-by: Nicolas Pitre . Link: https://lore.kernel.org/r/20250611020229.2650595-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ff78538e07fa284ce08cbbcb0730daa91ed16722 Author: Nicolas Pitre Date: Tue Jun 10 21:41:44 2025 -0400 vt: add missing notification when switching back to text mode Programs using poll() on /dev/vcsa to be notified when VT changes occur were missing one case: the switch from gfx to text mode. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/9o5ro928-0pp4-05rq-70p4-ro385n21n723@onlyvoer.pbz Signed-off-by: Greg Kroah-Hartman commit f5de469990f19569627ea0dd56536ff5a13beaa3 Author: Masami Hiramatsu (Google) Date: Thu Jun 12 20:26:10 2025 +0900 mtk-sd: Prevent memory corruption from DMA map failure If msdc_prepare_data() fails to map the DMA region, the request is not prepared for data receiving, but msdc_start_data() proceeds the DMA with previous setting. Since this will lead a memory corruption, we have to stop the request operation soon after the msdc_prepare_data() fails to prepare it. Signed-off-by: Masami Hiramatsu (Google) Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/174972756982.3337526.6755001617701603082.stgit@mhiramat.tok.corp.google.com Signed-off-by: Ulf Hansson commit 7aed15379db9c6ec67999cdaf5c443b7be06ea73 Author: Roy Luo Date: Thu May 22 19:09:12 2025 +0000 Revert "usb: xhci: Implement xhci_handshake_check_state() helper" This reverts commit 6ccb83d6c4972ebe6ae49de5eba051de3638362c. Commit 6ccb83d6c497 ("usb: xhci: Implement xhci_handshake_check_state() helper") was introduced to workaround watchdog timeout issues on some platforms, allowing xhci_reset() to bail out early without waiting for the reset to complete. Skipping the xhci handshake during a reset is a dangerous move. The xhci specification explicitly states that certain registers cannot be accessed during reset in section 5.4.1 USB Command Register (USBCMD), Host Controller Reset (HCRST) field: "This bit is cleared to '0' by the Host Controller when the reset process is complete. Software cannot terminate the reset process early by writinga '0' to this bit and shall not write any xHC Operational or Runtime registers until while HCRST is '1'." This behavior causes a regression on SNPS DWC3 USB controller with dual-role capability. When the DWC3 controller exits host mode and removes xhci while a reset is still in progress, and then tries to configure its hardware for device mode, the ongoing reset leads to register access issues; specifically, all register reads returns 0. These issues extend beyond the xhci register space (which is expected during a reset) and affect the entire DWC3 IP block, causing the DWC3 device mode to malfunction. Cc: stable Fixes: 6ccb83d6c497 ("usb: xhci: Implement xhci_handshake_check_state() helper") Signed-off-by: Roy Luo Link: https://lore.kernel.org/r/20250522190912.457583-3-royluo@google.com Signed-off-by: Greg Kroah-Hartman commit 3eff494f6e17abf932699483f133a708ac0355dc Author: Roy Luo Date: Thu May 22 19:09:11 2025 +0000 usb: xhci: Skip xhci_reset in xhci_resume if xhci is being removed xhci_reset() currently returns -ENODEV if XHCI_STATE_REMOVING is set, without completing the xhci handshake, unless the reset completes exceptionally quickly. This behavior causes a regression on Synopsys DWC3 USB controllers with dual-role capabilities. Specifically, when a DWC3 controller exits host mode and removes xhci while a reset is still in progress, and then attempts to configure its hardware for device mode, the ongoing, incomplete reset leads to critical register access issues. All register reads return zero, not just within the xHCI register space (which might be expected during a reset), but across the entire DWC3 IP block. This patch addresses the issue by preventing xhci_reset() from being called in xhci_resume() and bailing out early in the reinit flow when XHCI_STATE_REMOVING is set. Cc: stable Fixes: 6ccb83d6c497 ("usb: xhci: Implement xhci_handshake_check_state() helper") Suggested-by: Mathias Nyman Signed-off-by: Roy Luo Link: https://lore.kernel.org/r/20250522190912.457583-2-royluo@google.com Signed-off-by: Greg Kroah-Hartman commit c529c3730bd09115684644e26bf01ecbd7e2c2c9 Author: Kuen-Han Tsai Date: Tue Jun 17 13:07:12 2025 +0800 usb: gadget: u_serial: Fix race condition in TTY wakeup A race condition occurs when gs_start_io() calls either gs_start_rx() or gs_start_tx(), as those functions briefly drop the port_lock for usb_ep_queue(). This allows gs_close() and gserial_disconnect() to clear port.tty and port_usb, respectively. Use the null-safe TTY Port helper function to wake up TTY. Example CPU1: CPU2: gserial_connect() // lock gs_close() // await lock gs_start_rx() // unlock usb_ep_queue() gs_close() // lock, reset port.tty and unlock gs_start_rx() // lock tty_wakeup() // NPE Fixes: 35f95fd7f234 ("TTY: usb/u_serial, use tty from tty_port") Cc: stable Signed-off-by: Kuen-Han Tsai Reviewed-by: Prashanth K Link: https://lore.kernel.org/linux-usb/20240116141801.396398-1-khtsai@google.com/ Link: https://lore.kernel.org/r/20250617050844.1848232-2-khtsai@google.com Signed-off-by: Greg Kroah-Hartman commit f6c7bc4a6823a0a959f40866a1efe99bd03c2c5b Author: Kuen-Han Tsai Date: Tue Jun 17 13:07:11 2025 +0800 Revert "usb: gadget: u_serial: Add null pointer check in gs_start_io" This reverts commit ffd603f214237e250271162a5b325c6199a65382. Commit ffd603f21423 ("usb: gadget: u_serial: Add null pointer check in gs_start_io") adds null pointer checks at the beginning of the gs_start_io() function to prevent a null pointer dereference. However, these checks are redundant because the function's comment already requires callers to hold the port_lock and ensure port.tty and port_usb are not null. All existing callers already follow these rules. The true cause of the null pointer dereference is a race condition. When gs_start_io() calls either gs_start_rx() or gs_start_tx(), the port_lock is temporarily released for usb_ep_queue(). This allows port.tty and port_usb to be cleared. Fixes: ffd603f21423 ("usb: gadget: u_serial: Add null pointer check in gs_start_io") Cc: stable Signed-off-by: Kuen-Han Tsai Reviewed-by: Prashanth K Link: https://lore.kernel.org/r/20250617050844.1848232-1-khtsai@google.com Signed-off-by: Greg Kroah-Hartman commit 31a6afbe86e8e9deba9ab53876ec49eafc7fd901 Author: Xu Yang Date: Sat Jun 14 20:49:14 2025 +0800 usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume Shawn and John reported a hang issue during system suspend as below: - USB gadget is enabled as Ethernet - There is data transfer over USB Ethernet (scp a big file between host and device) - Device is going in/out suspend (echo mem > /sys/power/state) The root cause is the USB device controller is suspended but the USB bus is still active which caused the USB host continues to transfer data with device and the device continues to queue USB requests (in this case, a delayed TCP ACK packet trigger the issue) after controller is suspended, however the USB controller clock is already gated off. Then if udc driver access registers after that point, the system will hang. The correct way to avoid such issue is to disconnect device from host when the USB bus is not at suspend state. Then the host will receive disconnect event and stop data transfer in time. To continue make USB gadget device work after system resume, this will reconnect device automatically. To make usb wakeup work if USB bus is already at suspend state, this will keep connection for it only when USB device controller has enabled wakeup capability. Reported-by: Shawn Guo Reported-by: John Ernberg Closes: https://lore.kernel.org/linux-usb/aEZxmlHmjeWcXiF3@dragon/ Tested-by: John Ernberg # iMX8QXP Fixes: 235ffc17d014 ("usb: chipidea: udc: add suspend/resume support for device controller") Cc: stable Reviewed-by: Jun Li Signed-off-by: Xu Yang Acked-by: Peter Chen Link: https://lore.kernel.org/r/20250614124914.207540-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3b18405763c1ebb1efc15feef5563c9cdb2cc3a7 Author: Heikki Krogerus Date: Wed Jun 11 14:14:15 2025 +0300 usb: acpi: fix device link removal The device link to the USB4 host interface has to be removed manually since it's no longer auto removed. Fixes: 623dae3e7084 ("usb: acpi: fix boot hang due to early incorrect 'tunneled' USB3 device links") Cc: stable Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/r/20250611111415.2707865-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8f5b7e2bec1c36578fdaa74a6951833541103e27 Author: Mathias Nyman Date: Wed Jun 11 14:24:41 2025 +0300 usb: hub: fix detection of high tier USB3 devices behind suspended hubs USB3 devices connected behind several external suspended hubs may not be detected when plugged in due to aggressive hub runtime pm suspend. The hub driver immediately runtime-suspends hubs if there are no active children or port activity. There is a delay between the wake signal causing hub resume, and driver visible port activity on the hub downstream facing ports. Most of the LFPS handshake, resume signaling and link training done on the downstream ports is not visible to the hub driver until completed, when device then will appear fully enabled and running on the port. This delay between wake signal and detectable port change is even more significant with chained suspended hubs where the wake signal will propagate upstream first. Suspended hubs will only start resuming downstream ports after upstream facing port resumes. The hub driver may resume a USB3 hub, read status of all ports, not yet see any activity, and runtime suspend back the hub before any port activity is visible. This exact case was seen when conncting USB3 devices to a suspended Thunderbolt dock. USB3 specification defines a 100ms tU3WakeupRetryDelay, indicating USB3 devices expect to be resumed within 100ms after signaling wake. if not then device will resend the wake signal. Give the USB3 hubs twice this time (200ms) to detect any port changes after resume, before allowing hub to runtime suspend again. Cc: stable Fixes: 2839f5bcfcfc ("USB: Turn on auto-suspend for USB 3.0 hubs.") Acked-by: Alan Stern Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250611112441.2267883-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cee4392a57e14a799fbdee193bc4c0de65b29521 Author: Oliver Neukum Date: Thu Jun 5 14:28:45 2025 +0200 Logitech C-270 even more broken Some varieties of this device don't work with RESET_RESUME alone. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20250605122852.1440382-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 630a1dec3b0eba2a695b9063f1c205d585cbfec9 Author: Kuen-Han Tsai Date: Wed May 28 18:03:11 2025 +0800 usb: dwc3: Abort suspend on soft disconnect failure When dwc3_gadget_soft_disconnect() fails, dwc3_suspend_common() keeps going with the suspend, resulting in a period where the power domain is off, but the gadget driver remains connected. Within this time frame, invoking vbus_event_work() will cause an error as it attempts to access DWC3 registers for endpoint disabling after the power domain has been completely shut down. Abort the suspend sequence when dwc3_gadget_suspend() cannot halt the controller and proceeds with a soft connect. Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume") Cc: stable Acked-by: Thinh Nguyen Signed-off-by: Kuen-Han Tsai Link: https://lore.kernel.org/r/20250528100315.2162699-1-khtsai@google.com Signed-off-by: Greg Kroah-Hartman commit 7e2c421ef88e9da9c39e01496b7f5b0b354b42bc Author: Peter Chen Date: Thu Jun 19 09:34:13 2025 +0800 usb: cdnsp: do not disable slot for disabled slot It doesn't need to do it, and the related command event returns 'Slot Not Enabled Error' status. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Suggested-by: Hongliang Yang Reviewed-by: Fugang Duan Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20250619013413.35817-1-peter.chen@cixtech.com Signed-off-by: Greg Kroah-Hartman commit 5bd1bafd4474ee26f504b41aba11f3e2a1175b88 Author: Jakub Kicinski Date: Mon Jun 16 12:55:10 2025 -0700 eth: fbnic: avoid double free when failing to DMA-map FW msg The semantics are that caller of fbnic_mbx_map_msg() retains the ownership of the message on error. All existing callers dutifully free the page. Fixes: da3cde08209e ("eth: fbnic: Add FW communication mechanism") Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250616195510.225819-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit d9d79e4f7dc935fea96dbf3de524404c08d08b03 Author: Arnd Bergmann Date: Tue May 20 17:40:43 2025 +0200 mfd: Fix building without CONFIG_OF Using the of_fwnode_handle() means that local 'node' variables are unused whenever CONFIG_OF is disabled for compile testing: drivers/mfd/88pm860x-core.c: In function 'device_irq_init': drivers/mfd/88pm860x-core.c:576:29: error: unused variable 'node' [-Werror=unused-variable] 576 | struct device_node *node = i2c->dev.of_node; | ^~~~ drivers/mfd/max8925-core.c: In function 'max8925_irq_init': drivers/mfd/max8925-core.c:659:29: error: unused variable 'node' [-Werror=unused-variable] 659 | struct device_node *node = chip->dev->of_node; | ^~~~ drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq': drivers/mfd/twl4030-irq.c:679:46: error: unused variable 'node' [-Werror=unused-variable] 679 | struct device_node *node = dev->of_node; | ^~~~ Replace these with the corresponding dev_fwnode() lookups that keep the code simpler in addition to avoiding the warnings. Fixes: e3d44f11da04 ("mfd: Switch to irq_domain_create_*()") Signed-off-by: Arnd Bergmann Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250520154106.2019525-1-arnd@kernel.org Signed-off-by: Lee Jones commit 56a14984505b11674df5e01407748236bc4bc8f8 Author: Zenghui Yu Date: Sun Jun 8 17:54:02 2025 +0800 KVM: arm64: selftests: Close the GIC FD in arch_timer_edge_cases Close the GIC FD to free the reference it holds to the VM so that we can correctly clean up the VM. This also gets rid of the "KVM: debugfs: duplicate directory 395722-4" warning when running arch_timer_edge_cases. Signed-off-by: Zenghui Yu Reviewed-by: Miguel Luis Reviewed-by: Sebastian Ott Link: https://lore.kernel.org/r/20250608095402.1131-1-yuzenghui@huawei.com Signed-off-by: Marc Zyngier commit 1fbe6861a6d9a942fb8ab8677ddf1ecb86b1af60 Author: Sean Christopherson Date: Wed Jun 11 15:45:04 2025 -0700 KVM: arm64: Explicitly treat routing entry type changes as changes Explicitly treat type differences as GSI routing changes, as comparing MSI data between two entries could get a false negative, e.g. if userspace changed the type but left the type-specific data as- Note, the same bug was fixed in x86 by commit bcda70c56f3e ("KVM: x86: Explicitly treat routing entry type changes as changes"). Fixes: 4bf3693d36af ("KVM: arm64: Unmap vLPIs affected by changes to GSI routing information") Signed-off-by: Sean Christopherson Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250611224604.313496-3-seanjc@google.com Signed-off-by: Marc Zyngier commit 8a8ff069c7ad9a359c54683329883e2432cff191 Author: Marc Zyngier Date: Sun Jun 15 16:11:38 2025 +0100 KVM: arm64: nv: Fix tracking of shadow list registers Wei-Lin reports that the tracking of shadow list registers is majorly broken when resync'ing the L2 state after a run, as we confuse the guest's LR index with the host's, potentially losing the interrupt state. While this could be fixed by adding yet another side index to track it (Wei-Lin's fix), it may be better to refactor this code to avoid having a side index altogether, limiting the risk to introduce this class of bugs. A key observation is that the shadow index is always the number of bits in the lr_map bitmap. With that, the parallel indexing scheme can be completely dropped. While doing this, introduce a couple of helpers that abstract the index conversion and some of the LR repainting, making the whole exercise much simpler. Reported-by: Wei-Lin Chang Reviewed-by: Wei-Lin Chang Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20250614145721.2504524-1-r09922117@csie.ntu.edu.tw Link: https://lore.kernel.org/r/86qzzkc5xa.wl-maz@kernel.org commit 0bdaca0922175478ddeadf8e515faa5269f6fae6 Author: Tim Harvey Date: Wed Jun 4 15:56:30 2025 -0700 arm64: dts: imx8mp-venice-gw74xx: fix TPM SPI frequency The IMX8MPDS Table 37 [1] shows that the max SPI master read frequency depends on the pins the interface is muxed behind with ECSPI2 muxed behind ECSPI2 supporting up to 25MHz. Adjust the spi-max-frequency based on these findings. [1] https://www.nxp.com/webapp/Download?colCode=IMX8MPIEC Fixes: 531936b218d8 ("arm64: dts: imx8mp-venice-gw74xx: update to revB PCB") Cc: stable@vger.kernel.org Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 1fc02c2086003c5fdaa99cde49a987992ff1aae4 Author: Tim Harvey Date: Wed Jun 4 15:56:29 2025 -0700 arm64: dts: imx8mp-venice-gw73xx: fix TPM SPI frequency The IMX8MPDS Table 37 [1] shows that the max SPI master read frequency depends on the pins the interface is muxed behind with ECSPI2 muxed behind ECSPI2 supporting up to 25MHz. Adjust the spi-max-frequency based on these findings. [1] https://www.nxp.com/webapp/Download?colCode=IMX8MPIEC Fixes: 2b3ab9d81ab4 ("arm64: dts: imx8mp-venice-gw73xx: add TPM device") Cc: stable@vger.kernel.org Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit b25344753c53a5524ba80280ce68f2046e559ce0 Author: Tim Harvey Date: Wed Jun 4 15:56:28 2025 -0700 arm64: dts: imx8mp-venice-gw72xx: fix TPM SPI frequency The IMX8MPDS Table 37 [1] shows that the max SPI master read frequency depends on the pins the interface is muxed behind with ECSPI2 muxed behind ECSPI2 supporting up to 25MHz. Adjust the spi-max-frequency based on these findings. [1] https://www.nxp.com/webapp/Download?colCode=IMX8MPIEC Fixes: 5016f22028e4 ("arm64: dts: imx8mp-venice-gw72xx: add TPM device") Cc: stable@vger.kernel.org Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 528e2d3125ad8d783e922033a0a8e2adb17b400e Author: Tim Harvey Date: Wed Jun 4 15:56:27 2025 -0700 arm64: dts: imx8mp-venice-gw71xx: fix TPM SPI frequency The IMX8MPDS Table 37 [1] shows that the max SPI master read frequency depends on the pins the interface is muxed behind with ECSPI2 muxed behind ECSPI2 supporting up to 25MHz. Adjust the spi-max-frequency based on these findings. [1] https://www.nxp.com/webapp/Download?colCode=IMX8MPIEC Fixes: 1a8f6ff6a291 ("arm64: dts: imx8mp-venice-gw71xx: add TPM device") Cc: stable@vger.kernel.org Signed-off-by: Tim Harvey Link: https://lore.kernel.org/stable/20250523173723.4167474-1-tharvey%40gateworks.com Signed-off-by: Shawn Guo commit 453e6fd262904cb736afdf08130bd84855ecac93 Merge: bec8ff17ff6528 fe79ef3530d3c6 Author: Dave Airlie Date: Thu Jun 19 17:29:09 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-06-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.16-2025-06-18: amdgpu: - DP tunneling fix - LTTPR fix - DSC fix - DML2.x ABGR16161616 fix - RMCM fix - Backlight fixes - GFX11 kicker support - SDMA reset fixes - VCN 5.0.1 fix - Reset fix - Misc small fixes amdkfd: - SDMA reset fix - Fix race in GWS scheduling Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250618203115.1533451-1-alexander.deucher@amd.com commit 7869738b6908eec7755818aaf6f3aa068b2f0e1b Author: Gao Xiang Date: Thu Jun 19 11:28:39 2025 +0800 erofs: refuse crafted out-of-file-range encoded extents Crafted encoded extents could record out-of-range `lstart`, which should not happen in normal cases. It caused an iomap_iter_done() complaint [1] reported by syzbot. [1] https://lore.kernel.org/r/684cb499.a00a0220.c6bd7.0010.GAE@google.com Fixes: 1d191b4ca51d ("erofs: implement encoded extent metadata") Reported-and-tested-by: syzbot+d8f000c609f05f52d9b5@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d8f000c609f05f52d9b5 Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250619032839.2642193-1-hsiangkao@linux.alibaba.com commit bec8ff17ff6528bec9f2089dcef9e41a63b71dea Merge: 49a5fdc06ccfec c464ce6af332e7 Author: Dave Airlie Date: Thu Jun 19 14:18:54 2025 +1000 Merge tag 'drm-intel-fixes-2025-06-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix MIPI vtotal programming off by one on Broxton - Fix PMU code for GCOV and AutoFDO enabled build Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aFJfykDpUwtmpilE@jlahtine-mobl commit d4adf1c9ee7722545450608bcb095fb31512f0c6 Author: Willem de Bruijn Date: Wed Jun 18 17:57:40 2025 -0400 bpf: Adjust free target to avoid global starvation of LRU map BPF_MAP_TYPE_LRU_HASH can recycle most recent elements well before the map is full, due to percpu reservations and force shrink before neighbor stealing. Once a CPU is unable to borrow from the global map, it will once steal one elem from a neighbor and after that each time flush this one element to the global list and immediately recycle it. Batch value LOCAL_FREE_TARGET (128) will exhaust a 10K element map with 79 CPUs. CPU 79 will observe this behavior even while its neighbors hold 78 * 127 + 1 * 15 == 9921 free elements (99%). CPUs need not be active concurrently. The issue can appear with affinity migration, e.g., irqbalance. Each CPU can reserve and then hold onto its 128 elements indefinitely. Avoid global list exhaustion by limiting aggregate percpu caches to half of map size, by adjusting LOCAL_FREE_TARGET based on cpu count. This change has no effect on sufficiently large tables. Similar to LOCAL_NR_SCANS and lru->nr_scans, introduce a map variable lru->free_target. The extra field fits in a hole in struct bpf_lru. The cacheline is already warm where read in the hot path. The field is only accessed with the lru lock held. Tested-by: Anton Protopopov Signed-off-by: Willem de Bruijn Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20250618215803.3587312-1-willemdebruijn.kernel@gmail.com Signed-off-by: Alexei Starovoitov commit 9b70c362a9d4ab93e0b582dad73acb2a953ef797 Merge: f82727adcf2992 dbe0ca8da1f62b Author: Jakub Kicinski Date: Wed Jun 18 18:30:55 2025 -0700 Merge branch 'net-fix-passive-tfo-socket-having-invalid-napi-id' David Wei says: ==================== net: fix passive TFO socket having invalid NAPI ID Found a bug where an accepted passive TFO socket returns an invalid NAPI ID (i.e. 0) from SO_INCOMING_NAPI_ID. Add a selftest for this using netdevsim and fix the bug. Patch 1 is a drive-by fix for the lib.sh include in an existing drivers/net/netdevsim/peer.sh selftest. Patch 2 adds a test binary for a simple TFO server/client. Patch 3 adds a selftest for checking that the NAPI ID of a passive TFO socket is valid. This will currently fail. Patch 4 adds a fix for the bug. ==================== Link: https://patch.msgid.link/20250617212102.175711-1-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit dbe0ca8da1f62b6252e7be6337209f4d86d4a914 Author: David Wei Date: Tue Jun 17 14:21:02 2025 -0700 tcp: fix passive TFO socket having invalid NAPI ID There is a bug with passive TFO sockets returning an invalid NAPI ID 0 from SO_INCOMING_NAPI_ID. Normally this is not an issue, but zero copy receive relies on a correct NAPI ID to process sockets on the right queue. Fix by adding a sk_mark_napi_id_set(). Fixes: e5907459ce7e ("tcp: Record Rx hash and NAPI ID in tcp_child_process") Signed-off-by: David Wei Reviewed-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250617212102.175711-5-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 137e7b5cceda2fd634ff47fde6c4226092d09442 Author: David Wei Date: Tue Jun 17 14:21:01 2025 -0700 selftests: net: add test for passive TFO socket NAPI ID Add a test that checks that the NAPI ID of a passive TFO socket is valid i.e. not zero. Signed-off-by: David Wei Link: https://patch.msgid.link/20250617212102.175711-4-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit c65b5bb2329e36340eba76f05752f8f1eb15bee0 Author: David Wei Date: Tue Jun 17 14:21:00 2025 -0700 selftests: net: add passive TFO test binary Add a simple passive TFO server and client test binary. This will be used to test the SO_INCOMING_NAPI_ID of passive TFO accepted sockets. Signed-off-by: David Wei Link: https://patch.msgid.link/20250617212102.175711-3-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 3168276591210d147ed9e6dc267f8a04007593c7 Author: David Wei Date: Tue Jun 17 14:20:59 2025 -0700 selftests: netdevsim: improve lib.sh include in peer.sh Fix the peer.sh test to run from INSTALL_PATH. Signed-off-by: David Wei Link: https://patch.msgid.link/20250617212102.175711-2-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit fb4d33ab452ea254e2c319bac5703d1b56d895bf Merge: 229f135e0680da 4ea0bb8aaedfad Author: Linus Torvalds Date: Wed Jun 18 17:47:27 2025 -0700 Merge tag '6.16-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - Fix alternate data streams bug - Important fix for null pointer deref with Kerberos authentication - Fix oops in smbdirect (RDMA) in free_transport * tag '6.16-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: handle set/get info file for streamed file ksmbd: fix null pointer dereference in destroy_previous_session ksmbd: add free_transport ops in ksmbd connection commit ba8dac350faf16afc129ce6303ca4feaf083ccb1 Author: Chao Yu Date: Thu Jun 5 11:26:33 2025 +0800 f2fs: fix to zero post-eof page fstest reports a f2fs bug: generic/363 42s ... [failed, exit status 1]- output mismatch (see /share/git/fstests/results//generic/363.out.bad) --- tests/generic/363.out 2025-01-12 21:57:40.271440542 +0800 +++ /share/git/fstests/results//generic/363.out.bad 2025-05-19 19:55:58.000000000 +0800 @@ -1,2 +1,78 @@ QA output created by 363 fsx -q -S 0 -e 1 -N 100000 +READ BAD DATA: offset = 0xd6fb, size = 0xf044, fname = /mnt/f2fs/junk +OFFSET GOOD BAD RANGE +0x1540d 0x0000 0x2a25 0x0 +operation# (mod 256) for the bad data may be 37 +0x1540e 0x0000 0x2527 0x1 ... (Run 'diff -u /share/git/fstests/tests/generic/363.out /share/git/fstests/results//generic/363.out.bad' to see the entire diff) Ran: generic/363 Failures: generic/363 Failed 1 of 1 tests The root cause is user can update post-eof page via mmap [1], however, f2fs missed to zero post-eof page in below operations, so, once it expands i_size, then it will include dummy data locates previous post-eof page, so during below operations, we need to zero post-eof page. Operations which can include dummy data after previous i_size after expanding i_size: - write - mapwrite [1] - truncate - fallocate * preallocate * zero_range * insert_range * collapse_range - clone_range (doesn’t support in f2fs) - copy_range (doesn’t support in f2fs) [1] https://man7.org/linux/man-pages/man2/mmap.2.html 'BUG section' Cc: stable@kernel.org Signed-off-by: Chao Yu Reviewed-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit 229f135e0680da3dd0bcce515c07be87858f1d12 Merge: 74b4cc9b8780bf eab9dcb76b9fca Author: Linus Torvalds Date: Wed Jun 18 14:31:16 2025 -0700 Merge tag 'driver-core-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core Pull driver core fixes from Danilo Krummrich: - Fix a race condition in Devres::drop(). This depends on two other patches: - (Minimal) Rust abstractions for struct completion - Let Revocable indicate whether its data is already being revoked - Fix Devres to avoid exposing the internal Revocable - Add .mailmap entry for Danilo Krummrich - Add Madhavan Srinivasan to embargoed-hardware-issues.rst * tag 'driver-core-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: Documentation: embargoed-hardware-issues.rst: Add myself for Power mailmap: add entry for Danilo Krummrich rust: devres: do not dereference to the internal Revocable rust: devres: fix race in Devres::drop() rust: revocable: indicate whether `data` has been revoked already rust: completion: implement initial abstraction commit 74b4cc9b8780bfe8a3992c9ac0033bf22ac01f19 Merge: 0564e6a8c2c315 37fb58a7273726 Author: Linus Torvalds Date: Wed Jun 18 14:25:50 2025 -0700 Merge tag 'cgroup-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: - In cgroup1 freezer, a task migrating into a frozen cgroup might not get frozen immediately due to the wrong operation order. Fix it. * tag 'cgroup-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup,freezer: fix incomplete freezing when attaching tasks commit 0564e6a8c2c3152783906534d5767cabe1b05930 Merge: 4f24bfcc398eb7 261dce3d64021e Author: Linus Torvalds Date: Wed Jun 18 14:22:31 2025 -0700 Merge tag 'wq-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: - Fix missed early init of wq_isolated_cpumask * tag 'wq-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Initialize wq_isolated_cpumask in workqueue_init_early() commit f82727adcf2992822e12198792af450a76ebd5ef Author: Haixia Qu Date: Tue Jun 17 05:56:24 2025 +0000 tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer The reproduction steps: 1. create a tun interface 2. enable l2 bearer 3. TIPC_NL_UDP_GET_REMOTEIP with media name set to tun tipc: Started in network mode tipc: Node identity 8af312d38a21, cluster identity 4711 tipc: Enabled bearer , priority 1 Oops: general protection fault KASAN: null-ptr-deref in range CPU: 1 UID: 1000 PID: 559 Comm: poc Not tainted 6.16.0-rc1+ #117 PREEMPT Hardware name: QEMU Ubuntu 24.04 PC RIP: 0010:tipc_udp_nl_dump_remoteip+0x4a4/0x8f0 the ub was in fact a struct dev. when bid != 0 && skip_cnt != 0, bearer_list[bid] may be NULL or other media when other thread changes it. fix this by checking media_id. Fixes: 832629ca5c313 ("tipc: add UDP remoteip dump to netlink API") Signed-off-by: Haixia Qu Reviewed-by: Tung Nguyen Link: https://patch.msgid.link/20250617055624.2680-1-hxqu@hillstonenet.com Signed-off-by: Jakub Kicinski commit 9ac8d0c640a161486eaf71d1999ee990fad62947 Author: Hariprasad Kelam Date: Tue Jun 17 12:04:02 2025 +0530 Octeontx2-pf: Fix Backpresure configuration NIX block can receive packets from multiple links such as MAC (RPM), LBK and CPT. ----------------- RPM --| NIX | ----------------- | | LBK Each link supports multiple channels for example RPM link supports 16 channels. In case of link oversubsribe, NIX will assert backpressure on receive channels. The previous patch considered a single channel per link, resulting in backpressure not being enabled on the remaining channels Fixes: a7ef63dbd588 ("octeontx2-af: Disable backpressure between CPT and NIX") Signed-off-by: Hariprasad Kelam Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250617063403.3582210-1-hkelam@marvell.com Signed-off-by: Jakub Kicinski commit 4f24bfcc398eb77aa41fe1bb1621d8c2cca5368d Merge: 61f4769affffc3 33796b91871ad4 Author: Linus Torvalds Date: Wed Jun 18 14:17:15 2025 -0700 Merge tag 'sched_ext-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fixes from Tejun Heo: - Fix a couple bugs in cgroup cpu.weight support - Add the new sched-ext@lists.linux.dev to MAINTAINERS * tag 'sched_ext-for-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() sched_ext: Make scx_group_set_weight() always update tg->scx.weight sched_ext: Update mailing list entry in MAINTAINERS commit 28c0d7756fd9b69971073c946076e35851a7133b Merge: ae409629e022fb 688a0d61b2d742 Author: Jakub Kicinski Date: Wed Jun 18 14:15:15 2025 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-06-17 (ice, e1000e) For ice: Krishna Kumar modifies aRFS match criteria to correctly identify matching filters. Grzegorz fixes a memory leak in eswitch legacy mode. For e1000e: Vitaly sets clock frequency on some Nahum systems which may misreport their value. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13 ice: fix eswitch code memory leak in reset scenario net: ice: Perform accurate aRFS flow match ==================== Link: https://patch.msgid.link/20250617172444.1419560-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ae409629e022fbebbc6d31a1bfeccdbbeee20fd6 Author: Heiner Kallweit Date: Tue Jun 17 20:20:17 2025 +0200 net: ftgmac100: select FIXED_PHY Depending on e.g. DT configuration this driver uses a fixed link. So we shouldn't rely on the user to enable FIXED_PHY, select it in Kconfig instead. We may end up with a non-functional driver otherwise. Fixes: 38561ded50d0 ("net: ftgmac100: support fixed link") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/476bb33b-5584-40f0-826a-7294980f2895@gmail.com Signed-off-by: Jakub Kicinski commit c6d732c38f93c4aebd204a5656583142289c3a2e Author: Jakub Kicinski Date: Tue Jun 17 13:22:40 2025 -0700 net: ethtool: remove duplicate defines for family info Commit under fixes switched to uAPI generation from the YAML spec. A number of custom defines were left behind, mostly for commands very hard to express in YAML spec. Among what was left behind was the name and version of the generic netlink family. Problem is that the codegen always outputs those values so we ended up with a duplicated, differently named set of defines. Provide naming info in YAML and remove the incorrect defines. Fixes: 8d0580c6ebdd ("ethtool: regenerate uapi header from the spec") Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250617202240.811179-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 61f4769affffc398499250ccacf0b86d5b654399 Merge: 5adb635077d1b4 9d4204a8106fe7 Author: Linus Torvalds Date: Wed Jun 18 14:09:22 2025 -0700 Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull crypto library fixes from Eric Biggers: - Fix a regression in the arm64 Poly1305 code - Fix a couple compiler warnings * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto/poly1305: Fix arm64's poly1305_blocks_arch() lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older lib/crypto: Annotate crypto strings with nonstring commit 37fb58a7273726e59f9429c89ade5116083a213d Author: Chen Ridong Date: Wed Jun 18 07:32:17 2025 +0000 cgroup,freezer: fix incomplete freezing when attaching tasks An issue was found: # cd /sys/fs/cgroup/freezer/ # mkdir test # echo FROZEN > test/freezer.state # cat test/freezer.state FROZEN # sleep 1000 & [1] 863 # echo 863 > test/cgroup.procs # cat test/freezer.state FREEZING When tasks are migrated to a frozen cgroup, the freezer fails to immediately freeze the tasks, causing the cgroup to remain in the "FREEZING". The freeze_task() function is called before clearing the CGROUP_FROZEN flag. This causes the freezing() check to incorrectly return false, preventing __freeze_task() from being invoked for the migrated task. To fix this issue, clear the CGROUP_FROZEN state before calling freeze_task(). Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic") Cc: stable@vger.kernel.org # v6.1+ Reported-by: Zhong Jiawei Signed-off-by: Chen Ridong Acked-by: Michal Koutný Signed-off-by: Tejun Heo commit 6fcab2791543924d438e7fa49276d0998b0a069f Author: Rafael J. Wysocki Date: Wed Jun 18 14:17:45 2025 +0200 ACPICA: Refuse to evaluate a method if arguments are missing As reported in [1], a platform firmware update that increased the number of method parameters and forgot to update a least one of its callers, caused ACPICA to crash due to use-after-free. Since this a result of a clear AML issue that arguably cannot be fixed up by the interpreter (it cannot produce missing data out of thin air), address it by making ACPICA refuse to evaluate a method if the caller attempts to pass fewer arguments than expected to it. Closes: https://github.com/acpica/acpica/issues/1027 [1] Reported-by: Peter Williams Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Tested-by: Hans de Goede # Dell XPS 9640 with BIOS 1.12.0 Link: https://patch.msgid.link/5909446.DvuYhMxLoT@rjwysocki.net Signed-off-by: Rafael J. Wysocki commit 840738eae94864993a735ab677b9795bb8f3b961 Author: Pali Rohár Date: Sun Jun 8 16:10:33 2025 +0200 cifs: Remove duplicate fattr->cf_dtype assignment from wsl_to_fattr() function Commit 8bd25b61c5a5 ("smb: client: set correct d_type for reparse DFS/DFSR and mount point") deduplicated assignment of fattr->cf_dtype member from all places to end of the function cifs_reparse_point_to_fattr(). The only one missing place which was not deduplicated is wsl_to_fattr(). Fix it. Fixes: 8bd25b61c5a5 ("smb: client: set correct d_type for reparse DFS/DFSR and mount point") Signed-off-by: Pali Rohár Signed-off-by: Steve French commit 306cb65bb0cb243389fcbd0a66907d5bdea07d1e Author: Bharath SM Date: Mon Mar 17 15:57:27 2025 +0530 smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels When mounting a share with kerberos authentication with multichannel support, share mounts correctly, but fails to create secondary channels. This occurs because the hostname is not populated when adding the channels. The hostname is necessary for the userspace cifs.upcall program to retrieve the required credentials and pass it back to kernel, without hostname secondary channels fails establish. Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N Signed-off-by: Bharath SM Reported-by: xfuren Link: https://bugzilla.samba.org/show_bug.cgi?id=15824 Signed-off-by: Steve French commit 88efa0de3285be66969b71ec137d9dab1ee19e52 Author: Qiuxu Zhuo Date: Thu Jun 19 00:23:06 2025 +0800 EDAC/igen6: Fix NULL pointer dereference A kernel panic was reported with the following kernel log: EDAC igen6: Expected 2 mcs, but only 1 detected. BUG: unable to handle page fault for address: 000000000000d570 ... Hardware name: Notebook V54x_6x_TU/V54x_6x_TU, BIOS Dasharo (coreboot+UEFI) v0.9.0 07/17/2024 RIP: e030:ecclog_handler+0x7e/0xf0 [igen6_edac] ... igen6_probe+0x2a0/0x343 [igen6_edac] ... igen6_init+0xc5/0xff0 [igen6_edac] ... This issue occurred because one memory controller was disabled by the BIOS but the igen6_edac driver still checked all the memory controllers, including this absent one, to identify the source of the error. Accessing the null MMIO for the absent memory controller resulted in the oops above. Fix this issue by reverting the configuration structure to non-const and updating the field 'res_cfg->num_imc' to reflect the number of detected memory controllers. Fixes: 20e190b1c1fd ("EDAC/igen6: Skip absent memory controllers") Reported-by: Marek Marczykowski-Górecki Closes: https://lore.kernel.org/all/aFFN7RlXkaK_loQb@mail-itl/ Suggested-by: Borislav Petkov Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Tested-by: Marek Marczykowski-Górecki Link: https://lore.kernel.org/r/20250618162307.1523736-1-qiuxu.zhuo@intel.com commit 5adb635077d1b4bd65b183022775a59a378a9c00 Merge: 5da3ff1fd0fdce 86c8db86af43f5 Author: Linus Torvalds Date: Wed Jun 18 10:32:01 2025 -0700 Merge tag 'selinux-pr-20250618' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "A small SELinux patch to resolve a UBSAN warning in the xfrm/labeled-IPsec code" * tag 'selinux-pr-20250618' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len commit 5da3ff1fd0fdce7b5d9508c62403c04a8c96a1e5 Merge: 5a3b583f205087 327e28664307d4 Author: Linus Torvalds Date: Wed Jun 18 10:24:50 2025 -0700 Merge tag 'ftrace-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ftrace fix from Steven Rostedt: - Do not blindly enable function_graph tracer when updating funcgraph-args When the option to trace function arguments in the function graph trace is updated, it requires the function graph tracer to switch its callback routine. It disables function graph tracing, updates the callback and then re-enables function graph tracing. The issue is that it doesn't check if function graph tracing is currently enabled or not. If it is not enabled, it will try to disable it and re-enable it (which will actually enable it even though it is not the current tracer). This causes an issue in the accounting and will trigger a WARN_ON() if the function tracer is enabled after that. * tag 'ftrace-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fgraph: Do not enable function_graph tracer when setting funcgraph-args commit 5a3b583f2050870e0403ffed650f06c94d7968a4 Merge: 52da431bf03b55 a7b3b77fd111d4 Author: Linus Torvalds Date: Wed Jun 18 10:21:39 2025 -0700 Merge tag 'ata-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Niklas Cassel: - Force PIO for ATAPI devices on VT6415/VT6330 as the controller locks up on ATAPI DMA (Tasos) - Fix ACPI PATA cable type detection such that the controller is not forced down to a slow transfer mode (Tasos) - Fix build error on 32-bit UML (Johannes) - Fix a PCI region leak in the pata_macio driver so that the driver no longer fails to load after rmmod (Philipp) - Use correct DMI BIOS build date for ThinkPad W541 quirk (me) - Disallow LPM for ASUSPRO-D840SA motherboard as this board interestingly enough gets graphical corruptions on the iGPU when LPM is enabled (me) - Disallow LPM for Asus B550-F motherboard as this board will get command timeouts on ports 5 and 6, yet LPM with the same drive works fine on all other ports (Mikko) * tag 'ata-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: ahci: Disallow LPM for Asus B550-F motherboard ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard ata: ahci: Use correct BIOS build date for ThinkPad W541 quirk ata: pata_macio: Fix PCI region leak ata: pata_cs5536: fix build on 32-bit UML ata: libata-acpi: Do not assume 40 wire cable if no devices are enabled ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330 commit fe79ef3530d3c681ef2d5644a9d1d1a67b21426a Author: Alex Deucher Date: Mon Jun 16 15:47:13 2025 -0400 drm/amdgpu/sdma5.2: init engine reset mutex Missing the mutex init. Fixes: 47454f2dc0bf ("drm/amdgpu: Register the new sdma function pointers for sdma_v5_2") Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher (cherry picked from commit ea685ff30a51a25dd9be90786933ada49a088f65) commit cfb05257ae168a0496c7637e1d9e3ab8a25cbffe Author: Jay Cornwall Date: Wed Jun 11 09:52:14 2025 -0500 drm/amdkfd: Fix race in GWS queue scheduling q->gws is not updated atomically with qpd->mapped_gws_queue. If a runlist is created between pqm_set_gws and update_queue it will contain a queue which uses GWS in a process with no GWS allocated. This will result in a scheduler hang. Use q->properties.is_gws which is changed while holding the DQM lock. Signed-off-by: Jay Cornwall Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher (cherry picked from commit b98370220eb3110e82248e3354e16a489a492cfb) Cc: stable@vger.kernel.org commit 49cc5beeabd5b9b6a6660be8ea2e95de30ec0a07 Author: Alex Deucher Date: Mon Jun 16 15:43:55 2025 -0400 drm/amdgpu/sdma5: init engine reset mutex Missing the mutex init. Fixes: e56d4bf57fab ("drm/amdgpu/: drm/amdgpu: Register the new sdma function pointers for sdma_v5_0") Reviewed-by: Jesse Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 3f4caf092f02f0de169c6122639af481c7edc8f9) commit ebe43542702c3d15d1a1d95e8e13b1b54076f05a Author: Alex Deucher Date: Mon Jun 2 11:31:52 2025 -0400 drm/amdgpu: switch job hw_fence to amdgpu_fence Use the amdgpu fence container so we can store additional data in the fence. This also fixes the start_time handling for MCBP since we were casting the fence to an amdgpu_fence and it wasn't. Fixes: 3f4c175d62d8 ("drm/amdgpu: MCBP based on DRM scheduler (v9)") Reviewed-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit bf1cd14f9e2e1fdf981eed273ddd595863f5288c) Cc: stable@vger.kernel.org commit 7f3b16f3f229e37cc3e02e9e4e7106c523b119e9 Author: Jesse Zhang Date: Mon Jun 16 19:21:41 2025 +0800 drm/amdgpu: Fix SDMA UTC_L1 handling during start/stop sequences This commit makes two key fixes to SDMA v4.4.2 handling: 1. disable UTC_L1 in sdma_cntl register when stopping SDMA engines by reading the current value before modifying UTC_L1_ENABLE bit. 2. Ensure UTC_L1_ENABLE is consistently managed by: - Adding the missing register write when enabling UTC_L1 during start - Keeping UTC_L1 enabled by default as per hardware requirements v2: Correct SDMA_CNTL setting (Philip) Suggested-by: Jonathan Kim Signed-off-by: Jesse Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 375bf564654e85a7b1b0657b191645b3edca1bda) Cc: stable@vger.kernel.org commit 785c536c31c0bb057252fddedb30d79ae4979f4b Author: Lijo Lazar Date: Fri Jun 6 10:29:28 2025 +0530 drm/amdgpu: Release reset locks during failures Make sure to release reset domain lock in case of failures. Signed-off-by: Lijo Lazar Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Fixes: 11bb33766f66 ("drm/amdgpu: refactor amdgpu_device_gpu_recover") Signed-off-by: Alex Deucher (cherry picked from commit 1ab11a82681eb33a66f423216cb063e7f40c6f85) commit b669507b637eb6b1aaecf347f193efccc65d756e Author: Alex Hung Date: Tue Jun 3 18:30:55 2025 -0600 drm/amd/display: Check dce_hwseq before dereferencing it [WHAT] hws was checked for null earlier in dce110_blank_stream, indicating hws can be null, and should be checked whenever it is used. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher (cherry picked from commit 79db43611ff61280b6de58ce1305e0b2ecf675ad) Cc: stable@vger.kernel.org commit 46e15197b513e60786a44107759d6ca293d6288c Author: Sonny Jiang Date: Thu Jun 12 11:01:08 2025 -0400 drm/amdgpu: VCN v5_0_1 to prevent FW checking RB during DPG pause Add a protection to ensure programming are all complete prior VCPU starting. This is a WA for an unintended VCPU running. Signed-off-by: Sonny Jiang Acked-by: Leo Liu Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher (cherry picked from commit c29521b529fa5e225feaf709d863a636ca0cbbfa) Cc: stable@vger.kernel.org commit caade9d69f2e2b76d2e2d47089736a99135b8772 Author: Jesse Zhang Date: Wed Jun 11 15:07:11 2025 +0800 drm/amdgpu: Use logical instance ID for SDMA v4_4_2 queue operations Simplify SDMA v4_4_2 queue reset and stop operations by: 1. Removing GET_INST(SDMA0) conversion for ring->me 2. Using the logical instance ID (ring->me) directly 3. Maintaining consistent behavior with other SDMA queue operations This change aligns with the existing queue handling logic where ring->me already represents the correct instance identifier. Signed-off-by: Lijo Lazar Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 3bab282dfe25dff7a55add432f56898505a6cc6c) Cc: stable@vger.kernel.org commit 09b585592fa481384597c81388733aed4a04dd05 Author: Jesse Zhang Date: Wed Jun 11 15:02:09 2025 +0800 drm/amdgpu: Fix SDMA engine reset with logical instance ID This commit makes the following improvements to SDMA engine reset handling: 1. Clarifies in the function documentation that instance_id refers to a logical ID 2. Adds conversion from logical to physical instance ID before performing reset using GET_INST(SDMA0, instance_id) macro 3. Improves error messaging to indicate when a logical instance reset fails 4. Adds better code organization with blank lines for readability The change ensures proper SDMA engine reset by using the correct physical instance ID while maintaining the logical ID interface for callers. V2: Remove harvest_config check and convert directly to physical instance (Lijo) Suggested-by: Jonathan Kim Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 5efa6217c239ed1ceec0f0414f9b6f6927387dfc) Cc: stable@vger.kernel.org commit 854171405e7f093532b33d8ed0875b9e34fc55b4 Author: Frank Min Date: Wed Jun 4 21:17:05 2025 +0800 drm/amdgpu: add kicker fws loading for gfx11/smu13/psp13 1. Add kicker firmwares loading for gfx11/smu13/psp13 2. Register additional MODULE_FIRMWARE entries for kicker fws - gc_11_0_0_rlc_kicker.bin - gc_11_0_0_imu_kicker.bin - psp_13_0_0_sos_kicker.bin - psp_13_0_0_ta_kicker.bin - smu_13_0_0_kicker.bin Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit fb5ec2174d70a8989bc207d257db90ffeca3b163) Cc: stable@vger.kernel.org commit 0bbf5fd86c585d437b75003f11365b324360a5d6 Author: Frank Min Date: Wed Jun 4 21:00:44 2025 +0800 drm/amdgpu: Add kicker device detection 1. add kicker device list 2. add kicker device checking helper function Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 09aa2b408f4ab689c3541d22b0968de0392ee406) Cc: stable@vger.kernel.org commit 16dc8bc27c2aa3c93905d3e885e27f1e3535f09a Author: Mario Limonciello Date: Thu May 29 09:46:32 2025 -0500 drm/amd/display: Export full brightness range to userspace [WHY] Userspace currently is offered a range from 0-0xFF but the PWM is programmed from 0-0xFFFF. This can be limiting to some software that wants to apply greater granularity. [HOW] Convert internally to firmware values only when mapping custom brightness curves because these are in 0-0xFF range. Advertise full PWM range to userspace. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Mario Limonciello Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 8dbd72cb790058ce52279af38a43c2b302fdd3e5) Cc: stable@vger.kernel.org commit ffcaed1d7ecef31198000dfbbea791f30f7ca437 Author: Mario Limonciello Date: Thu May 29 11:33:44 2025 -0500 drm/amd/display: Only read ACPI backlight caps once [WHY] Backlight caps are read already in amdgpu_dm_update_backlight_caps(). They may be updated by update_connector_ext_caps(). Reading again when registering backlight device may cause wrong values to be used. [HOW] Use backlight caps already registered to the dm. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Mario Limonciello Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 148144f6d2f14b02eaaa39b86bbe023cbff350bd) Cc: stable@vger.kernel.org commit 158f9944ac05dafd2d3a23d0688e6cf40ef68b90 Author: Yihan Zhu Date: Tue May 27 16:47:40 2025 -0400 drm/amd/display: Fix RMCM programming seq errors [WHY & HOW] Fix RMCM programming sequence errors and mapping issues to pass the RMCM test. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Dmytro Laktyushkin Signed-off-by: Yihan Zhu Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 11baa4975025033547f45f5894087a0dda6efbb8) Cc: stable@vger.kernel.org commit 8724a5380c4390eed81e271d22f34ff06453ded9 Author: Alex Hung Date: Thu May 29 10:59:19 2025 -0600 drm/amd/display: Fix mpv playback corruption on weston [WHAT] Severe video playback corruption is observed in the following setup: weston 14.0.90 (built from source) + mpv v0.40.0 with command: mpv bbb_sunflower_1080p_60fps_normal.mp4 --vo=gpu [HOW] ABGR16161616 needs to be included in dml2/2.1 translation. Cc: Mario Limonciello Cc: Alex Deucher Acked-by: Aurabindo Pillai Reviewed-by: Harry Wentland Reviewed-by: Austin Zheng Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit d023de809f85307ca819a9dbbceee6ae1f50e2ad) Cc: stable@vger.kernel.org commit 0d57dd1765d311111d9885346108c4deeae1deb4 Author: Nicholas Kazlauskas Date: Wed May 21 16:40:25 2025 -0400 drm/amd/display: Add more checks for DSC / HUBP ONO guarantees [WHY] For non-zero DSC instances it's possible that the HUBP domain required to drive it for sequential ONO ASICs isn't met, potentially causing the logic to the tile to enter an undefined state leading to a system hang. [HOW] Add more checks to ensure that the HUBP domain matching the DSC instance is appropriately powered. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Duncan Ma Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit da63df07112e5a9857a8d2aaa04255c4206754ec) Cc: stable@vger.kernel.org commit d358a51444c88bcc995e471dc8cc840f19e4b374 Author: Michael Strauss Date: Wed Feb 26 10:03:48 2025 -0500 drm/amd/display: Get LTTPR IEEE OUI/Device ID From Closest LTTPR To Host [WHY] These fields are read for the explicit purpose of detecting embedded LTTPRs (i.e. between host ASIC and the user-facing port), and thus need to calculate the correct DPCD address offset based on LTTPR count to target the appropriate LTTPR's DPCD register space with these queries. [HOW] Cascaded LTTPRs in a link each snoop and increment LTTPR count when queried via DPCD read, so an LTTPR embedded in a source device (e.g. USB4 port on a laptop) will always be addressible using the max LTTPR count seen by the host. Therefore we simply need to use a recently added helper function to calculate the correct DPCD address to target potentially embedded LTTPRs based on the received LTTPR count. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Wenjing Liu Signed-off-by: Michael Strauss Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 791897f5c77a2a65d0e500be4743af2ddf6eb061) Cc: stable@vger.kernel.org commit 3251b69b7efb82eba24c9e168a6142a3078de72f Author: Peichen Huang Date: Mon May 26 16:04:10 2025 +0800 drm/amd/display: Add dc cap for dp tunneling [WHAT] 1. add dc cap for dp tunneling 2. add function to get index of host router Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Cruise Hung Signed-off-by: Peichen Huang Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 29e178d13979cf6fdb42c5fe2dfec2da2306c4ad) Cc: stable@vger.kernel.org commit a55737dab6ba63eb4241e9c6547629058af31e12 Author: Jesse.Zhang Date: Thu May 29 11:27:37 2025 +0800 drm/amdkfd: move SDMA queue reset capability check to node_show Relocate the per-SDMA queue reset capability check from kfd_topology_set_capabilities() to node_show() to ensure we read the latest value of sdma.supported_reset after all IP blocks are initialized. Fixes: ceb7114c961b ("drm/amdkfd: flag per-sdma queue reset supported to user space") Reviewed-by: Jonathan Kim Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher (cherry picked from commit e17df7b086cf908cedd919f448da9e00028419bb) commit 6c5b8895c8cab4fdb496b38513ec417588b58596 Author: Richard Fitzgerald Date: Wed Jun 18 15:55:47 2025 +0100 ASoC: doc: cs35l56: Add CS35L63 to the list of supported devices Add CS35L63 to the list of parts supported by the cs35l56 driver and mention the CS35L63 where the text refers to the supported part numbers. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250618145547.152814-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit bbf10cd686835d5a4b8566dc73a3b00b4cd7932a Author: Lukas Wunner Date: Wed Jun 18 16:38:25 2025 +0200 PCI: pciehp: Ignore belated Presence Detect Changed caused by DPC Commit c3be50f7547c ("PCI: pciehp: Ignore Presence Detect Changed caused by DPC") sought to ignore Presence Detect Changed events occurring as a side effect of Downstream Port Containment. The commit awaits recovery from DPC and then clears events which occurred in the meantime. However if the first event seen after DPC is Data Link Layer State Changed, only that event is cleared and not Presence Detect Changed. The object of the commit is thus defeated. That's because pciehp_ist() computes the events to clear based on the local "events" variable instead of "ctrl->pending_events". The former contains the events that had occurred when pciehp_ist() was entered, whereas the latter also contains events that have accumulated while awaiting DPC recovery. In practice, the order of PDC and DLLSC events is arbitrary and the delay in-between can be several milliseconds. So change the logic to always clear PDC events, even if they come after an initial DLLSC event. Fixes: c3be50f7547c ("PCI: pciehp: Ignore Presence Detect Changed caused by DPC") Reported-by: Lương Việt Hoàng Reported-by: Joel Mathew Thomas Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219765#c165 Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Tested-by: Lương Việt Hoàng Tested-by: Joel Mathew Thomas Link: https://patch.msgid.link/d9c4286a16253af7e93eaf12e076e3ef3546367a.1750257164.git.lukas@wunner.de commit eab9dcb76b9fca47402c9e93afca243e745a0f02 Author: Madhavan Srinivasan Date: Sat Jun 14 20:59:24 2025 +0530 Documentation: embargoed-hardware-issues.rst: Add myself for Power Adding myself as the contact for Power Signed-off-by: Madhavan Srinivasan Link: https://lore.kernel.org/r/20250614152925.82831-1-maddy@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit 46147490b4098e200b7d7d3ac4637a3e4f7b806a Author: Miquel Raynal Date: Fri Jun 13 20:13:12 2025 +0200 pinctrl: nuvoton: Fix boot on ma35dx platforms As part of a wider cleanup trying to get rid of OF specific APIs, an incorrect (and partially unrelated) cleanup was introduced. The goal was to replace a device_for_each_chil_node() loop including an additional condition inside by a macro doing both the loop and the check on a single line. The snippet: device_for_each_child_node(dev, child) if (fwnode_property_present(child, "gpio-controller")) continue; was replaced by: for_each_gpiochip_node(dev, child) which expands into: device_for_each_child_node(dev, child) for_each_if(fwnode_property_present(child, "gpio-controller")) This change is actually doing the opposite of what was initially expected, breaking the probe of this driver, breaking at the same time the whole boot of Nuvoton platforms (no more console, the kernel WARN()). Revert these two changes to roll back to the correct behavior. Fixes: 693c9ecd8326 ("pinctrl: nuvoton: Reduce use of OF-specific APIs") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/20250613181312.1269794-1-miquel.raynal@bootlin.com Signed-off-by: Linus Walleij commit 7d502192431e2d863f4b2595182d61c7fa8e656f Author: Bartosz Golaszewski Date: Thu Jun 12 15:19:27 2025 +0200 MAINTAINERS: drop bouncing Lakshmi Sowjanya D The address for Lakshmi Sowjanya D: lakshmi.sowjanya.d@intel.com is bouncing. Drop it and mark the driver as orphaned. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250612131927.127733-1-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 2aebf5ee43bf0ed225a09a30cf515d9f2813b759 Author: Masami Hiramatsu (Google) Date: Wed Jun 18 09:05:23 2025 +0900 x86/alternatives: Fix int3 handling failure from broken text_poke array Since smp_text_poke_single() does not expect there is another text_poke request is queued, it can make text_poke_array not sorted or cause a buffer overflow on the text_poke_array.vec[]. This will cause an Oops in int3 because of bsearch failing; CPU 0 CPU 1 CPU 2 ----- ----- ----- smp_text_poke_batch_add() smp_text_poke_single() <<-- Adds out of order [Fails o find address in text_poke_array ] OOPS! Or unhandled page fault because of a buffer overflow; CPU 0 CPU 1 ----- ----- smp_text_poke_batch_add() <<+ ... | smp_text_poke_batch_add() <<-- Adds TEXT_POKE_ARRAY_MAX times. smp_text_poke_single() { __smp_text_poke_batch_add() <<-- Adds entry at TEXT_POKE_ARRAY_MAX + 1 smp_text_poke_batch_finish() [Unhandled page fault because text_poke_array.nr_entries is overwritten] BUG! } Use smp_text_poke_batch_add() instead of __smp_text_poke_batch_add() so that it correctly flush the queue if needed. Closes: https://lore.kernel.org/all/CA+G9fYsLu0roY3DV=tKyqP7FEKbOEETRvTDhnpPxJGbA=Cg+4w@mail.gmail.com/ Fixes: c8976ade0c1b ("x86/alternatives: Simplify smp_text_poke_single() by using tp_vec and existing APIs") Reported-by: Linux Kernel Functional Testing Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Tested-by: Linux Kernel Functional Testing Link: https://lkml.kernel.org/r/\ 175020512308.3582717.13631440385506146631.stgit@mhiramat.tok.corp.google.com commit 93712205ce2f1fb047739494c0399a26ea4f0890 Author: Bartosz Golaszewski Date: Thu Jun 12 11:14:48 2025 +0200 pinctrl: qcom: msm: mark certain pins as invalid for interrupts On some platforms, the UFS-reset pin has no interrupt logic in TLMM but is nevertheless registered as a GPIO in the kernel. This enables the user-space to trigger a BUG() in the pinctrl-msm driver by running, for example: `gpiomon -c 0 113` on RB2. The exact culprit is requesting pins whose intr_detection_width setting is not 1 or 2 for interrupts. This hits a BUG() in msm_gpio_irq_set_type(). Potentially crashing the kernel due to an invalid request from user-space is not optimal, so let's go through the pins and mark those that would fail the check as invalid for the irq chip as we should not even register them as available irqs. This function can be extended if we determine that there are more corner-cases like this. Fixes: f365be092572 ("pinctrl: Add Qualcomm TLMM driver") Cc: stable@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250612091448.41546-1-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 327e28664307d49ce3fa71ba30dcc0007c270974 Author: Steven Rostedt Date: Wed Jun 18 07:38:01 2025 -0400 fgraph: Do not enable function_graph tracer when setting funcgraph-args When setting the funcgraph-args option when function graph tracer is net enabled, it incorrectly enables it. Worse, it unregisters itself when it was never registered. Then when it gets enabled again, it will register itself a second time causing a WARNing. ~# echo 1 > /sys/kernel/tracing/options/funcgraph-args ~# head -20 /sys/kernel/tracing/trace # tracer: nop # # entries-in-buffer/entries-written: 813/26317372 #P:8 # # _-----=> irqs-off/BH-disabled # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / _-=> migrate-disable # |||| / delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | -0 [007] d..4. 358.966010: 7) 1.692 us | fetch_next_timer_interrupt(basej=4294981640, basem=357956000000, base_local=0xffff88823c3ae040, base_global=0xffff88823c3af300, tevt=0xffff888100e47cb8); -0 [007] d..4. 358.966012: 7) | tmigr_cpu_deactivate(nextexp=357988000000) { -0 [007] d..4. 358.966013: 7) | _raw_spin_lock(lock=0xffff88823c3b2320) { -0 [007] d..4. 358.966014: 7) 0.981 us | preempt_count_add(val=1); -0 [007] d..5. 358.966017: 7) 1.058 us | do_raw_spin_lock(lock=0xffff88823c3b2320); -0 [007] d..4. 358.966019: 7) 5.824 us | } -0 [007] d..5. 358.966021: 7) | tmigr_inactive_up(group=0xffff888100cb9000, child=0x0, data=0xffff888100e47bc0) { -0 [007] d..5. 358.966022: 7) | tmigr_update_events(group=0xffff888100cb9000, child=0x0, data=0xffff888100e47bc0) { Notice the "tracer: nop" at the top there. The current tracer is the "nop" tracer, but the content is obviously the function graph tracer. Enabling function graph tracing will cause it to register again and trigger a warning in the accounting: ~# echo function_graph > /sys/kernel/tracing/current_tracer -bash: echo: write error: Device or resource busy With the dmesg of: ------------[ cut here ]------------ WARNING: CPU: 7 PID: 1095 at kernel/trace/ftrace.c:3509 ftrace_startup_subops+0xc1e/0x1000 Modules linked in: kvm_intel kvm irqbypass CPU: 7 UID: 0 PID: 1095 Comm: bash Not tainted 6.16.0-rc2-test-00006-gea03de4105d3 #24 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:ftrace_startup_subops+0xc1e/0x1000 Code: 48 b8 22 01 00 00 00 00 ad de 49 89 84 24 88 01 00 00 8b 44 24 08 89 04 24 e9 c3 f7 ff ff c7 04 24 ed ff ff ff e9 b7 f7 ff ff <0f> 0b c7 04 24 f0 ff ff ff e9 a9 f7 ff ff c7 04 24 f4 ff ff ff e9 RSP: 0018:ffff888133cff948 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 1ffff1102679ff31 RCX: 0000000000000000 RDX: 1ffffffff0b27a60 RSI: ffffffff8593d2f0 RDI: ffffffff85941140 RBP: 00000000000c2041 R08: ffffffffffffffff R09: ffffed1020240221 R10: ffff88810120110f R11: ffffed1020240214 R12: ffffffff8593d2f0 R13: ffffffff8593d300 R14: ffffffff85941140 R15: ffffffff85631100 FS: 00007f7ec6f28740(0000) GS:ffff8882b5251000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7ec6f181c0 CR3: 000000012f1d0005 CR4: 0000000000172ef0 Call Trace: ? __pfx_ftrace_startup_subops+0x10/0x10 ? find_held_lock+0x2b/0x80 ? ftrace_stub_direct_tramp+0x10/0x10 ? ftrace_stub_direct_tramp+0x10/0x10 ? trace_preempt_on+0xd0/0x110 ? __pfx_trace_graph_entry_args+0x10/0x10 register_ftrace_graph+0x4d2/0x1020 ? tracing_reset_online_cpus+0x14b/0x1e0 ? __pfx_register_ftrace_graph+0x10/0x10 ? ring_buffer_record_enable+0x16/0x20 ? tracing_reset_online_cpus+0x153/0x1e0 ? __pfx_tracing_reset_online_cpus+0x10/0x10 ? __pfx_trace_graph_return+0x10/0x10 graph_trace_init+0xfd/0x160 tracing_set_tracer+0x500/0xa80 ? __pfx_tracing_set_tracer+0x10/0x10 ? lock_release+0x181/0x2d0 ? _copy_from_user+0x26/0xa0 tracing_set_trace_write+0x132/0x1e0 ? __pfx_tracing_set_trace_write+0x10/0x10 ? ftrace_graph_func+0xcc/0x140 ? ftrace_stub_direct_tramp+0x10/0x10 ? ftrace_stub_direct_tramp+0x10/0x10 ? ftrace_stub_direct_tramp+0x10/0x10 vfs_write+0x1d0/0xe90 ? __pfx_vfs_write+0x10/0x10 Have the setting of the funcgraph-args check if function_graph tracer is the current tracer of the instance, and if not, do nothing, as there's nothing to do (the option is checked when function_graph tracing starts). Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Cc: Mark Rutland Link: https://lore.kernel.org/20250618073801.057ea636@gandalf.local.home Fixes: c7a60a733c373 ("ftrace: Have funcgraph-args take affect during tracing") Closes: https://lore.kernel.org/all/4ab1a7bdd0174ab09c7b0d68cdbff9a4@huawei.com/ Reported-by: Changbin Du Tested-by: Changbin Du Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit e1c75831f682eef0f68b35723437146ed86070b1 Author: Penglei Jiang Date: Tue Jun 17 09:56:44 2025 -0700 io_uring: fix potential page leak in io_sqe_buffer_register() If allocation of the 'imu' fails, then the existing pages aren't unpinned in the error path. This is mostly a theoretical issue, requiring fault injection to hit. Move unpin_user_pages() to unified error handling to fix the page leak issue. Fixes: d8c2237d0aa9 ("io_uring: add io_pin_pages() helper") Signed-off-by: Penglei Jiang Link: https://lore.kernel.org/r/20250617165644.79165-1-superman.xpt@gmail.com Signed-off-by: Jens Axboe commit 10af0273a35ab4513ca1546644b8c853044da134 Author: David Thompson Date: Fri Jun 13 16:34:43 2025 +0000 gpio: mlxbf3: only get IRQ for device instance 0 The gpio-mlxbf3 driver interfaces with two GPIO controllers, device instance 0 and 1. There is a single IRQ resource shared between the two controllers, and it is found in the ACPI table for device instance 0. The driver should not attempt to get an IRQ resource when probing device instance 1, otherwise the following error is logged: mlxbf3_gpio MLNXBF33:01: error -ENXIO: IRQ index 0 not found Signed-off-by: David Thompson Reviewed-by: Shravan Kumar Ramani Fixes: cd33f216d241 ("gpio: mlxbf3: Add gpio driver support") Link: https://lore.kernel.org/r/20250613163443.1065217-1-davthompson@nvidia.com Signed-off-by: Bartosz Golaszewski commit dba90f5a79c13936de4273a19e67908a0c296afe Author: Miquel Raynal Date: Wed Jun 18 10:48:00 2025 +0200 mtd: spinand: winbond: Prevent unsupported frequencies on dual/quad I/O variants Dual and quad capable chips natively support dual and quad I/O variants at up to 104MHz (1-2-2 and 1-4-4 operations). Reaching the maximum speed of 166MHz is theoretically possible (while still unsupported in the field) by adding a few more dummy cycles. Let's be accurate and clearly state this limit. Setting a maximum frequency implies adding the frequency parameter to the macro, which is done using a variadic argument to avoid impacting all the other drivers which already make use of this macro. Fixes: 1ea808b4d15b ("mtd: spinand: winbond: Update the *JW chip definitions") Signed-off-by: Miquel Raynal commit 29384bbb1a2a5926f97b8cbe469081e7a1770dea Author: Miquel Raynal Date: Wed Jun 18 10:47:59 2025 +0200 mtd: spinand: winbond: Increase maximum frequency on an octal operation The default number of dummy cycles is 16 in octal I/O mode (1S-8S-8S), and with this default configuration the maximum frequency is higher than what is being advertised. There are higher and lower frequency possibilities, which involve making changes in the number of dummy cycles through the VCR register. At this stage, let's just describe the default configuration correctly. There should be no functional change. Fixes: 1ac5ff2f2ad6 ("mtd: spinand: winbond: Add octal support") Signed-off-by: Miquel Raynal commit 60dffe96fab00cee7ef7f1b151da485d42ccb33a Author: Miquel Raynal Date: Wed Jun 18 10:47:58 2025 +0200 mtd: spinand: winbond: Fix W35N number of planes/LUN There's been a mistake when extracting the geometry of the W35N02 and W35N04 chips from the datasheet. There is a single plane, however there are respectively 2 and 4 LUNs. They are actually referred in the datasheet as dies (equivalent of target), but as there is no die select operation and the chips only feature a single configuration register for the entire chip (instead of one per die), we can reasonably assume we are talking about LUNs and not dies. Reported-by: Andreas Dannenberg Suggested-by: Vignesh Raghavendra Fixes: 25e08bf66660 ("mtd: spinand: winbond: Add support for W35N02JW and W35N04JW chips") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal commit 635e118317ffa773f6d25ec6a71b7927d7e8886a Author: Miquel Raynal Date: Wed Jun 18 10:54:44 2025 +0200 Revert "mtd: core: always create master device" The idea behind this patch was to always let a "master" mtd device available to anchor runtime PM. Historically, there was no mtd device representing the whole storage as soon as partitions were coming into play. The introduction of CONFIG_MTD_PARTITIONED_MASTER allowed to keep this "master" device, but was not enabled by default to avoid breaking existing users (otherwise the mtd device numbering would be totally messed up with an off by 1, at least). The approach of adding an mtd_master class on top of partitioned mtd devices is breaking the mtd core in many creative ways, so better think again this approach and revert the faulty changes for now. This reverts commit 0aa7b390fc40a871267a2328bbbefca8b37ad307. Fixes: 0aa7b390fc40 ("mtd: core: always create master device") Tested-by: Guenter Roeck Acked-by: Guenter Roeck Signed-off-by: Miquel Raynal commit df29f60369ccec0aa17d7eed7e2ae1fcdc9be6d4 Author: Herbert Xu Date: Mon Jun 16 12:09:17 2025 +0800 crypto: ahash - Fix infinite recursion in ahash_def_finup Invoke the final function directly in the default finup implementation since crypto_ahash_final is now just a wrapper around finup. Reported-by: Eric Biggers Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API") Signed-off-by: Herbert Xu commit 68dd8eeb7208f16a0592da3896dd59379d95d553 Merge: 05ced11a508af9 83f3ac2848b46e Author: Johannes Berg Date: Wed Jun 18 10:31:21 2025 +0200 Merge tag 'iwlwifi-fixes-2025-06-18' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== fixes for 6.16-rc3 ==================== Signed-off-by: Johannes Berg commit d0fa59897e049e84432600e86df82aab3dce7aa5 Author: Neal Cardwell Date: Fri Jun 13 15:30:56 2025 -0400 tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior After the following commit from 2024: commit e37ab7373696 ("tcp: fix to allow timestamp undo if no retransmits were sent") ...there was buggy behavior where TCP connections without SACK support could easily see erroneous undo events at the end of fast recovery or RTO recovery episodes. The erroneous undo events could cause those connections to suffer repeated loss recovery episodes and high retransmit rates. The problem was an interaction between the non-SACK behavior on these connections and the undo logic. The problem is that, for non-SACK connections at the end of a loss recovery episode, if snd_una == high_seq, then tcp_is_non_sack_preventing_reopen() holds steady in CA_Recovery or CA_Loss, but clears tp->retrans_stamp to 0. Then upon the next ACK the "tcp: fix to allow timestamp undo if no retransmits were sent" logic saw the tp->retrans_stamp at 0 and erroneously concluded that no data was retransmitted, and erroneously performed an undo of the cwnd reduction, restoring cwnd immediately to the value it had before loss recovery. This caused an immediate burst of traffic and build-up of queues and likely another immediate loss recovery episode. This commit fixes tcp_packet_delayed() to ignore zero retrans_stamp values for non-SACK connections when snd_una is at or above high_seq, because tcp_is_non_sack_preventing_reopen() clears retrans_stamp in this case, so it's not a valid signal that we can undo. Note that the commit named in the Fixes footer restored long-present behavior from roughly 2005-2019, so apparently this bug was present for a while during that era, and this was simply not caught. Fixes: e37ab7373696 ("tcp: fix to allow timestamp undo if no retransmits were sent") Reported-by: Eric Wheeler Closes: https://lore.kernel.org/netdev/64ea9333-e7f9-0df-b0f2-8d566143acab@ewheeler.net/ Signed-off-by: Neal Cardwell Co-developed-by: Yuchung Cheng Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 83f3ac2848b46e3e5af5d06b5f176c17e35733a3 Author: Colin Ian King Date: Thu May 22 13:17:03 2025 +0100 wifi: iwlwifi: Fix incorrect logic on cmd_ver range checking The current cmd_ver range checking on cmd_ver < 1 && cmd_ver > 3 can never be true because the logical operator && is being used, cmd_ver can never be less than 1 and also greater than 3. Fix this by using the logical || operator. Fixes: df6146a0296e ("wifi: iwlwifi: Add a new version for mac config command") Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250522121703.2766764-1-colin.i.king@gmail.com Signed-off-by: Miri Korenblit commit 432a41232ca932ecb2330f46105e68e296ba8c7f Author: Johannes Berg Date: Mon Jun 16 13:48:36 2025 +0200 wifi: iwlwifi: dvm: restore n_no_reclaim_cmds setting Apparently I accidentally removed this setting in my transport configuration rework, leading to an endless stream of warnings from the PCIe code when relevant notifications are received by the driver from firmware. Restore it. Reported-by: Woody Suwalski Closes: https://lore.kernel.org/r/e8c45d32-6129-8a5e-af80-ccc42aaf200b@gmail.com/ Fixes: 08e77d5edf70 ("wifi: iwlwifi: rework transport configuration") Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250616134902.222342908ca4.I47a551c86cbc0e9de4f980ca2fd0d67bf4052e50@changeid Signed-off-by: Miri Korenblit commit d5352b491a3a2628f1a798952a4ae76bde5d42e4 Author: Pei Xiao Date: Tue May 27 16:03:55 2025 +0800 wifi: iwlwifi: cfg: Limit cb_size to valid range on arm64 defconfig build failed with gcc-8: drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c:208:3: include/linux/bitfield.h:195:3: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask __field_overflow(); \ ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:215:2: note: in expansion of macro '____MAKE_OP' ____MAKE_OP(u##size,u##size,,) ^~~~~~~~~~~ include/linux/bitfield.h:218:1: note: in expansion of macro '__MAKE_OP' __MAKE_OP(32) Limit cb_size to valid range to fix it. Signed-off-by: Pei Xiao Link: https://patch.msgid.link/7b373a4426070d50b5afb3269fd116c18ce3aea8.1748332709.git.xiaopei01@kylinos.cn Signed-off-by: Miri Korenblit commit db5957ab85204a02093ac5ab2d0bbfe253955b71 Author: Miri Korenblit Date: Tue Jun 17 15:00:06 2025 +0300 wifi: iwlwifi: restore missing initialization of async_handlers_list (again) The initialization of async_handlers_list was accidentally removed in a previous change. Then it was restoted by commit 175e69e33c66 ("wifi: iwlwifi: restore missing initialization of async_handlers_list"). Somehow, the initialization disappeared again. Restote it. Signed-off-by: Miri Korenblit commit 05ced11a508af932c15bf549add04584cb989dc9 Merge: e7417421d89358 15d25307692312 Author: Johannes Berg Date: Wed Jun 18 09:05:26 2025 +0200 Merge tag 'ath-current-20250617' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath Jeff Johnson says: ================== ath.git updates for v6.16-rc3 Fix the following 3 issues: wifi: ath12k: avoid burning CPU while waiting for firmware stats wifi: ath12k: don't activate more links than firmware supports wifi: carl9170: do not ping device which has failed to load firmware ================== Signed-off-by: Johannes Berg commit e7417421d89358da071fd2930f91e67c7128fbff Author: Johannes Berg Date: Tue Jun 17 11:45:29 2025 +0200 wifi: ath6kl: remove WARN on bad firmware input If the firmware gives bad input, that's nothing to do with the driver's stack at this point etc., so the WARN_ON() doesn't add any value. Additionally, this is one of the top syzbot reports now. Just print a message, and as an added bonus, print the sizes too. Reported-by: syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com Tested-by: syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com Acked-by: Jeff Johnson Link: https://patch.msgid.link/20250617114529.031a677a348e.I58bf1eb4ac16a82c546725ff010f3f0d2b0cca49@changeid Signed-off-by: Johannes Berg commit 30b58444807c93bffeaba7d776110f2a909d2f9a Author: Gao Xiang Date: Tue Jun 17 13:40:56 2025 +0800 erofs: remove unused trace event erofs_destroy_inode The trace event `erofs_destroy_inode` was added but remains unused. This unused event contributes approximately 5KB to the kernel module size. Reported-by: Steven Rostedt Closes: https://lore.kernel.org/r/20250612224906.15000244@batman.local.home Fixes: 13f06f48f7bf ("staging: erofs: support tracepoint") Cc: stable@vger.kernel.org Reviewed-by: Hongbo Li Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250617054056.3232365-1-hsiangkao@linux.alibaba.com commit 905eeb2b7c33adda23a966aeb811ab4cb9e62031 Author: Tatsuyuki Ishi Date: Thu Jun 12 19:18:25 2025 +0900 erofs: impersonate the opener's credentials when accessing backing file Previously, file operations on a file-backed mount used the current process' credentials to access the backing FD. Attempting to do so on Android lead to SELinux denials, as ACL rules on the backing file (e.g. /system/apex/foo.apex) is restricted to a small set of process. Arguably, this error is redundant and leaking implementation details, as access to files on a mount is already ACL'ed by path. Instead, override to use the opener's cred when accessing the backing file. This makes the behavior similar to a loop-backed mount, which uses kworker cred when accessing the backing file and does not cause SELinux denials. Signed-off-by: Tatsuyuki Ishi Reviewed-by: Gao Xiang Reviewed-by: Hongbo Li Link: https://lore.kernel.org/r/20250612-b4-erofs-impersonate-v1-1-8ea7d6f65171@google.com Signed-off-by: Gao Xiang commit 0aff00432cc755ad7713f8a2f305395d443cdd4c Merge: 6dbb0d97c50960 7851263998d426 Author: Jakub Kicinski Date: Tue Jun 17 18:42:48 2025 -0700 Merge branch 'atm-fix-uninit-and-mem-accounting-leak-in-vcc_sendmsg' Kuniyuki Iwashima says: ==================== atm: Fix uninit and mem accounting leak in vcc_sendmsg(). Patch 1 fixes uninit issue reported by KMSAN, and patch 2 fixes another issue found by Simon Horman during review for v1 patch. v1: https://lore.kernel.org/20250613055700.415596-1-kuni1840@gmail.com ==================== Link: https://patch.msgid.link/20250616182147.963333-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit 7851263998d4269125fd6cb3fdbfc7c6db853859 Author: Kuniyuki Iwashima Date: Mon Jun 16 11:21:15 2025 -0700 atm: Revert atm_account_tx() if copy_from_iter_full() fails. In vcc_sendmsg(), we account skb->truesize to sk->sk_wmem_alloc by atm_account_tx(). It is expected to be reverted by atm_pop_raw() later called by vcc->dev->ops->send(vcc, skb). However, vcc_sendmsg() misses the same revert when copy_from_iter_full() fails, and then we will leak a socket. Let's factorise the revert part as atm_return_tx() and call it in the failure path. Note that the corresponding sk_wmem_alloc operation can be found in alloc_tx() as of the blamed commit. $ git blame -L:alloc_tx net/atm/common.c c55fa3cccbc2c~ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Simon Horman Closes: https://lore.kernel.org/netdev/20250614161959.GR414686@horms.kernel.org/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250616182147.963333-3-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit 2f370ae1fb6317985f3497b1bb80d457508ca2f7 Author: Kuniyuki Iwashima Date: Mon Jun 16 11:21:14 2025 -0700 atm: atmtcp: Free invalid length skb in atmtcp_c_send(). syzbot reported the splat below. [0] vcc_sendmsg() copies data passed from userspace to skb and passes it to vcc->dev->ops->send(). atmtcp_c_send() accesses skb->data as struct atmtcp_hdr after checking if skb->len is 0, but it's not enough. Also, when skb->len == 0, skb and sk (vcc) were leaked because dev_kfree_skb() is not called and sk_wmem_alloc adjustment is missing to revert atm_account_tx() in vcc_sendmsg(), which is expected to be done in atm_pop_raw(). Let's properly free skb with an invalid length in atmtcp_c_send(). [0]: BUG: KMSAN: uninit-value in atmtcp_c_send+0x255/0xed0 drivers/atm/atmtcp.c:294 atmtcp_c_send+0x255/0xed0 drivers/atm/atmtcp.c:294 vcc_sendmsg+0xd7c/0xff0 net/atm/common.c:644 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x330/0x3d0 net/socket.c:727 ____sys_sendmsg+0x7e0/0xd80 net/socket.c:2566 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2655 x64_sys_call+0x32fb/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was created at: slab_post_alloc_hook mm/slub.c:4154 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_node_noprof+0x818/0xf00 mm/slub.c:4249 kmalloc_reserve+0x13c/0x4b0 net/core/skbuff.c:579 __alloc_skb+0x347/0x7d0 net/core/skbuff.c:670 alloc_skb include/linux/skbuff.h:1336 [inline] vcc_sendmsg+0xb40/0xff0 net/atm/common.c:628 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x330/0x3d0 net/socket.c:727 ____sys_sendmsg+0x7e0/0xd80 net/socket.c:2566 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2655 x64_sys_call+0x32fb/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f CPU: 1 UID: 0 PID: 5798 Comm: syz-executor192 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(undef) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+1d3c235276f62963e93a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1d3c235276f62963e93a Tested-by: syzbot+1d3c235276f62963e93a@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250616182147.963333-2-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit 49a5fdc06ccfece8fc935aef1d15f4400d47602b Merge: e04c78d86a9699 d3deabe4c61987 Author: Dave Airlie Date: Wed Jun 18 11:37:14 2025 +1000 Merge tag 'drm-msm-fixes-2025-06-16' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.16-rc3 Display: - Fixed DP output on SDM845 - Fixed 10nm DSI PLL init GPU: - SUBMIT ioctl error path leak fixes - drm half of stall-on-fault fixes. Note there is a soft dependency, to get correct mmu fault devcoredumps, on arm-smmu changes which are not in this branch, but have already been merged by Linus. So by the time Linus merges this, everything should be peachy. - a7xx: Missing CP_RESET_CONTEXT_STATE - Skip GPU component bind if GPU is not in the device table. Signed-off-by: Dave Airlie From: Rob Clark Link: https://lore.kernel.org/r/CACSVV03=OH74ip8O1xqb8RJWGyM4HFuUnWuR=p3zJR+-ko_AJA@mail.gmail.com commit 6dbb0d97c5096072c78a6abffe393584e57ae945 Author: Kuniyuki Iwashima Date: Mon Jun 16 13:15:12 2025 -0700 mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu(). As syzbot reported [0], mpls_route_input_rcu() can be called from mpls_getroute(), where is under RTNL. net->mpls.platform_label is only updated under RTNL. Let's use rcu_dereference_rtnl() in mpls_route_input_rcu() to silence the splat. [0]: WARNING: suspicious RCU usage 6.15.0-rc7-syzkaller-00082-g5cdb2c77c4c3 #0 Not tainted ---------------------------- net/mpls/af_mpls.c:84 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz.2.4451/17730: #0: ffffffff9012a3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:80 [inline] #0: ffffffff9012a3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnetlink_rcv_msg+0x371/0xe90 net/core/rtnetlink.c:6961 stack backtrace: CPU: 1 UID: 0 PID: 17730 Comm: syz.2.4451 Not tainted 6.15.0-rc7-syzkaller-00082-g5cdb2c77c4c3 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 lockdep_rcu_suspicious+0x166/0x260 kernel/locking/lockdep.c:6865 mpls_route_input_rcu+0x1d4/0x200 net/mpls/af_mpls.c:84 mpls_getroute+0x621/0x1ea0 net/mpls/af_mpls.c:2381 rtnetlink_rcv_msg+0x3c9/0xe90 net/core/rtnetlink.c:6964 netlink_rcv_skb+0x16d/0x440 net/netlink/af_netlink.c:2534 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x53a/0x7f0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] ____sys_sendmsg+0xa98/0xc70 net/socket.c:2566 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2620 __sys_sendmmsg+0x200/0x420 net/socket.c:2709 __do_sys_sendmmsg net/socket.c:2736 [inline] __se_sys_sendmmsg net/socket.c:2733 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2733 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0a2818e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0a28f52038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f0a283b5fa0 RCX: 00007f0a2818e969 RDX: 0000000000000003 RSI: 0000200000000080 RDI: 0000000000000003 RBP: 00007f0a28210ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f0a283b5fa0 R15: 00007ffce5e9f268 Fixes: 0189197f4416 ("mpls: Basic routing support") Reported-by: syzbot+8a583bdd1a5cc0b0e068@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/68507981.a70a0220.395abc.01ef.GAE@google.com/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250616201532.1036568-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit 434635987fb7d544dd134f25c922413e19b02112 Author: Kent Overstreet Date: Tue Jun 17 20:22:32 2025 -0400 bcachefs: Fix missing newlines before ero Signed-off-by: Kent Overstreet commit 88bd771191f7f20d6295700d1746f576419e3d1f Author: Kent Overstreet Date: Tue Jun 17 20:24:12 2025 -0400 bcachefs: fix spurious error in read_btree_roots() Signed-off-by: Kent Overstreet commit 1df310860aa5b4d97b3cc83a1a8dee599071b72d Author: Kent Overstreet Date: Tue Jun 17 16:49:40 2025 -0400 bcachefs: fsck: Fix oops in key_visible_in_snapshot() The normal fsck code doesn't call key_visible_in_snapshot() with an empty list of snapshot IDs seen (the current snapshot ID will always be on the list), but str_hash_repair_key() -> bch2_get_snapshot_overwrites() can, and that's totally fine as long as we check for it. Signed-off-by: Kent Overstreet commit 3f890768dab1f97ff9bd7ebb76f4c52309401501 Author: Kent Overstreet Date: Tue Jun 17 16:41:43 2025 -0400 bcachefs: fsck: fix unhandled restart in topology repair Signed-off-by: Kent Overstreet commit cb6075bc62dc6a9cd7ab3572758685fdf78e3e20 Author: Rik van Riel Date: Fri Jun 6 13:10:34 2025 -0400 x86/mm: Fix early boot use of INVPLGB The INVLPGB instruction has limits on how many pages it can invalidate at once. That limit is enumerated in CPUID, read by the kernel, and stored in 'invpgb_count_max'. Ranged invalidation, like invlpgb_kernel_range_flush() break up their invalidations so that they do not exceed the limit. However, early boot code currently attempts to do ranged invalidation before populating 'invlpgb_count_max'. There is a for loop which is basically: for (...; addr < end; addr += invlpgb_count_max*PAGE_SIZE) If invlpgb_kernel_range_flush is called before the kernel has read the value of invlpgb_count_max from the hardware, the normally bounded loop can become an infinite loop if invlpgb_count_max is initialized to zero. Fix that issue by initializing invlpgb_count_max to 1. This way INVPLGB at early boot time will be a little bit slower than normal (with initialized invplgb_count_max), and not an instant hang at bootup time. Fixes: b7aa05cbdc52 ("x86/mm: Add INVLPGB support code") Signed-off-by: Rik van Riel Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250606171112.4013261-3-riel%40surriel.com commit 15d25307692312cec4b57052da73387f91a2e870 Author: Dmitry Antipov Date: Mon Jun 16 21:12:05 2025 +0300 wifi: carl9170: do not ping device which has failed to load firmware Syzkaller reports [1, 2] crashes caused by an attempts to ping the device which has failed to load firmware. Since such a device doesn't pass 'ieee80211_register_hw()', an internal workqueue managed by 'ieee80211_queue_work()' is not yet created and an attempt to queue work on it causes null-ptr-deref. [1] https://syzkaller.appspot.com/bug?extid=9a4aec827829942045ff [2] https://syzkaller.appspot.com/bug?extid=0d8afba53e8fb2633217 Fixes: e4a668c59080 ("carl9170: fix spurious restart due to high latency") Signed-off-by: Dmitry Antipov Acked-by: Christian Lamparter Link: https://patch.msgid.link/20250616181205.38883-1-dmantipov@yandex.ru Signed-off-by: Jeff Johnson commit ad5e9178cec589bf3af589dc43e638e5a5bf56fa Author: Baochen Qiang Date: Thu Jun 12 09:31:52 2025 +0800 wifi: ath12k: don't wait when there is no vdev started For WMI_REQUEST_VDEV_STAT request, firmware might split response into multiple events dut to buffer limit, hence currently in ath12k_wmi_fw_stats_process() host waits until all events received. In case there is no vdev started, this results in that below condition would never get satisfied ((++ar->fw_stats.num_vdev_recvd) == total_vdevs_started) consequently the requestor would be blocked until time out. The same applies to WMI_REQUEST_BCN_STAT request as well due to: ((++ar->fw_stats.num_bcn_recvd) == ar->num_started_vdevs) Change to check the number of started vdev first: if it is zero, finish directly; if not, follow the old way. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1 Fixes: e367c924768b ("wifi: ath12k: Request vdev stats from firmware") Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250612-ath12k-fw-fixes-v1-4-12f594f3b857@quicinc.com Signed-off-by: Jeff Johnson commit ac7b8ff7839ded757806317ab8979be844766770 Author: Baochen Qiang Date: Thu Jun 12 09:31:51 2025 +0800 wifi: ath12k: don't use static variables in ath12k_wmi_fw_stats_process() Currently ath12k_wmi_fw_stats_process() is using static variables to count firmware stat events. Taking num_vdev as an example, if for whatever reason (say ar->num_started_vdevs is 0 or firmware bug etc.) the following condition (++num_vdev) == total_vdevs_started is not met, is_end is not set thus num_vdev won't be cleared. Next time when firmware stats is requested again, even if everything is working fine, failure is expected due to the condition above will never be satisfied. The same applies to num_bcn as well. Change to use non-static counters and reset them each time before firmware stats is requested. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1 Fixes: e367c924768b ("wifi: ath12k: Request vdev stats from firmware") Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250612-ath12k-fw-fixes-v1-3-12f594f3b857@quicinc.com Signed-off-by: Jeff Johnson commit 9a353a4a11a475578be3c02dd17e70afe3a4a7f6 Author: Baochen Qiang Date: Thu Jun 12 09:31:50 2025 +0800 wifi: ath12k: avoid burning CPU while waiting for firmware stats ath12k_mac_get_fw_stats() is busy polling fw_stats_done flag while waiting firmware finishing sending all events. This is not good as CPU is monopolized and kept burning during the wait. Change to the completion mechanism to fix it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1 Fixes: e367c924768b ("wifi: ath12k: Request vdev stats from firmware") Reported-by: Grégoire Stein Closes: https://lore.kernel.org/ath12k/AS8P190MB120575BBB25FCE697CD7D4988763A@AS8P190MB1205.EURP190.PROD.OUTLOOK.COM/ Signed-off-by: Baochen Qiang Tested-by: Grégoire Stein Link: https://patch.msgid.link/20250612-ath12k-fw-fixes-v1-2-12f594f3b857@quicinc.com Signed-off-by: Jeff Johnson commit a48a931a32f88157db2baa31c10738a7fe660e93 Author: Baochen Qiang Date: Thu Jun 12 09:31:49 2025 +0800 wifi: ath12k: fix documentation on firmware stats Regarding the firmware stats events handling, the comment in ath12k_mac_get_fw_stats() says host determines whether all events have been received based on 'end' tag in TLV. This is wrong as there is no such tag at all, actually host makes the decision totally by itself based on the stats type and active pdev/vdev counts etc. Fix it to correctly reflect the logic. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250612-ath12k-fw-fixes-v1-1-12f594f3b857@quicinc.com Signed-off-by: Jeff Johnson commit d9dbc6b8b94ab41fb8b9dbb5a7be024029d46309 Author: Baochen Qiang Date: Thu May 22 16:54:15 2025 +0800 wifi: ath12k: don't activate more links than firmware supports In case of ML connection, currently all useful links are activated at ASSOC stage: ieee80211_set_active_links(vif, ieee80211_vif_usable_links(vif)) this results in firmware crash when the number of links activated on the same device is more than supported. Since firmware supports activating at most 2 links for a ML connection, to avoid firmware crash, host needs to select 2 links out of the useful links. As the assoc link has already been chosen, the question becomes how to determine partner links. A straightforward principle applied here is that the resulted combination should achieve the best throughput. For that purpose, ideally various factors like bandwidth, RSSI etc should be considered. But that would be too complicate. To make it easy, the choice is to only take hardware modes into consideration. The SBS (single band simultaneously) mode frequency range covers 5 GHz and 6 GHz bands. In this mode, the two individual MACs are both active, with one working on 5g-high band and the other on 5g-low band (from hardware perspective 5 GHz and 6 GHz bands are referred to as a 'large' single 5 GHz band). The DBS (dual band simultaneously) mode covers 2 GHz band and the 'large' 5 GHz band, with one MAC working on 2 GHz band and the other working on 5 GHz band or 6 GHz band. Since 5,6 GHz bands could provide higher bandwidth than 2 GHz band, the preference is given to SBS mode. Other hardware modes results in only one working MAC at any given time, so it is chosen only when both SBS are DBS are not possible. For each hardware mode, if there are more than one partner candidate, just choose the first one. For now only single device MLO case is handled as it is easy. Other cases could be addressed in the future. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-6-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit 2296038fd35a6e57af77496affe9044293ed2947 Author: Baochen Qiang Date: Thu May 22 16:54:14 2025 +0800 wifi: ath12k: update link active in case two links fall on the same MAC In case of two links established on the same device in an ML connection, depending on device's hardware mode capability, it is possible that both links fall on the same MAC. Currently, no specific action is taken to address this but just keep both links active. However this would result in lower throughput compared to even one link, because switching between these two links on the resulted MAC significantly impacts throughput. Check if both links fall in the frequency range of a single MAC. If so, send WMI_MLO_LINK_SET_ACTIVE_CMDID command to firmware such that firmware can deactivate one of them. Note the decision of which link getting deactivated is made by firmware, host only sends the vdev lists. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-5-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit c36f2cd628f9df6ffb19c23eedaa666440b8f5c5 Author: Baochen Qiang Date: Thu May 22 16:54:13 2025 +0800 wifi: ath12k: support WMI_MLO_LINK_SET_ACTIVE_CMDID command Add WMI_MLO_LINK_SET_ACTIVE_CMDID command. This command allows host to send required link information to firmware such that firmware can make decision on activating/deactivating links in various scenarios. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-4-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit e47b11e3bd34177af6669ef0945eb23dd4da3bcb Author: Baochen Qiang Date: Thu May 22 16:54:12 2025 +0800 wifi: ath12k: update freq range for each hardware mode Previous patches parse and save hardware MAC frequency range information in ath12k_svc_ext_info structure. Such range represents hardware capability hence needs to be updated based on host information, e.g. guard the range based on host's low/high boundary. So update frequency range. The updated range is saved in ath12k_hw_mode_info structure and would be used when doing vdev activation and link selection in following patches. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-3-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit 241d130f1419fd99923d99aff6e40490a4c34d93 Author: Baochen Qiang Date: Thu May 22 16:54:11 2025 +0800 wifi: ath12k: parse and save sbs_lower_band_end_freq from WMI_SERVICE_READY_EXT2_EVENTID event Firmware sends the boundary between lower and higher bands in ath12k_wmi_dbs_or_sbs_cap_params structure embedded in WMI_SERVICE_READY_EXT2_EVENTID event. The boundary is needed when updating frequency range in the following patch. So parse and save it for later use. Note ath12k_wmi_dbs_or_sbs_cap_params is placed after some other structures, so placeholders for them are added as well. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-2-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit 062ade23991e556a14bbb27c1cf873c34dbd9d28 Author: Baochen Qiang Date: Thu May 22 16:54:10 2025 +0800 wifi: ath12k: parse and save hardware mode info from WMI_SERVICE_READY_EXT_EVENTID event for later use WLAN hardware might support various hardware modes such as DBS (dual band simultaneously), SBS (single band simultaneously) and DBS_OR_SBS etc, see enum wmi_host_hw_mode_config_type. Firmware advertises actual supported modes in WMI_SERVICE_READY_EXT_EVENTID event. For each mode, firmware advertises frequency range each hardware MAC can operate on. In MLO case such information is necessary during vdev activation and link selection (which is done in following patches), so add a new structure ath12k_svc_ext_info to ath12k_wmi_base, then parse and save those information to it for later use. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250522-ath12k-sbs-dbs-v1-1-54a29e7a3a88@quicinc.com Signed-off-by: Jeff Johnson commit 18ae7d0cdd76420e80f6ab15ada063708f14ba40 Author: Bjorn Andersson Date: Mon Jun 9 22:06:22 2025 -0500 wifi: ath12k: Avoid CPU busy-wait by handling VDEV_STAT and BCN_STAT When the ath12k driver is built without CONFIG_ATH12K_DEBUG, the recently refactored stats code can cause any user space application (such at NetworkManager) to consume 100% CPU for 3 seconds, every time stats are read. Commit 'b8a0d83fe4c7 ("wifi: ath12k: move firmware stats out of debugfs")' moved ath12k_debugfs_fw_stats_request() out of debugfs, by merging the additional logic into ath12k_mac_get_fw_stats(). Among the added responsibility of ath12k_mac_get_fw_stats() was the busy-wait for `fw_stats_done`. Signalling of `fw_stats_done` happens when one of the WMI_REQUEST_PDEV_STAT, WMI_REQUEST_VDEV_STAT, and WMI_REQUEST_BCN_STAT messages are received, but the handling of the latter two commands remained in the debugfs code. As `fw_stats_done` isn't signalled, the calling processes will spin until the timeout (3 seconds) is reached. Moving the handling of these two additional responses out of debugfs resolves the issue. Fixes: b8a0d83fe4c7 ("wifi: ath12k: move firmware stats out of debugfs") Signed-off-by: Bjorn Andersson Tested-by: Abel Vesa Link: https://patch.msgid.link/20250609-ath12k-fw-stats-done-v1-1-2b3624656697@oss.qualcomm.com Signed-off-by: Jeff Johnson commit b160766e26d4e2e2d6fe2294e0b02f92baefcec5 Author: Hyunwoo Kim Date: Fri Jun 13 20:54:57 2025 -0400 net/sched: fix use-after-free in taprio_dev_notifier Since taprio’s taprio_dev_notifier() isn’t protected by an RCU read-side critical section, a race with advance_sched() can lead to a use-after-free. Adding rcu_read_lock() inside taprio_dev_notifier() prevents this. Fixes: fed87cc6718a ("net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations") Cc: stable@vger.kernel.org Signed-off-by: Hyunwoo Kim Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/aEzIYYxt0is9upYG@v4bel-B760M-AORUS-ELITE-AX Signed-off-by: Jakub Kicinski commit 4300fd62daf219e712687fff82098490517d6b20 Merge: 13c90202ddbb5f aa112cbc5f0ac6 Author: Jakub Kicinski Date: Tue Jun 17 16:13:12 2025 -0700 Merge branch 'ptp_vclock-fixes' Vladimir Oltean says: ==================== ptp_vclock fixes While I was intending to test something else related to PTP in net-next I noticed any time I would run ptp4l on an interface, the kernel would print "ptp: physical clock is free running" and ptp4l would exit with an error code. I then found Jeongjun Park's patch and subsequent explanation provided to Jakub's question, specifically related to the code which introduced the breakage I am seeing. https://lore.kernel.org/netdev/CAO9qdTEjQ5414un7Yw604paECF=6etVKSDSnYmZzZ6Pg3LurXw@mail.gmail.com/ I had to look at the original issue that prompted Jeongjun Park's patch, and provide an alternative fix for it. Patch 1/2 in this set contains a logical revert plus the alternative fix, squashed into one. Patch 2/2 fixes another issue which was confusing during debugging/ characterization, namely: "ok, the kernel clearly thinks that any physical clock is free-running after this change (despite there being no vclocks), but why would ptp4l fail to create the clock altogether? Why not just fail to adjust it?" By reverting (locally) Jeongjun Park's commit, I could reproduce the reported lockdep splat using the commands from patch 1/2's commit message, and this goes away with the reworked implementation. ==================== Link: https://patch.msgid.link/20250613174749.406826-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit aa112cbc5f0ac6f3b44d829005bf34005d9fe9bb Author: Vladimir Oltean Date: Fri Jun 13 20:47:49 2025 +0300 ptp: allow reading of currently dialed frequency to succeed on free-running clocks There is a bug in ptp_clock_adjtime() which makes it refuse the operation even if we just want to read the current clock dialed frequency, not modify anything (tx->modes == 0). That should be possible even if the clock is free-running. For context, the kernel UAPI is the same for getting and setting the frequency of a POSIX clock. For example, ptp4l errors out at clock_create() -> clockadj_get_freq() -> clock_adjtime() time, when it should logically only have failed on actual adjustments to the clock, aka if the clock was configured as slave. But in master mode it should work. This was discovered when examining the issue described in the previous commit, where ptp_clock_freerun() returned true despite n_vclocks being zero. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20250613174749.406826-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 5ab73b010cad294851e558f1d4714a85c6f206c7 Author: Vladimir Oltean Date: Fri Jun 13 20:47:48 2025 +0300 ptp: fix breakage after ptp_vclock_in_use() rework What is broken -------------- ptp4l, and any other application which calls clock_adjtime() on a physical clock, is greeted with error -EBUSY after commit 87f7ce260a3c ("ptp: remove ptp->n_vclocks check logic in ptp_vclock_in_use()"). Explanation for the breakage ---------------------------- The blamed commit was based on the false assumption that ptp_vclock_in_use() callers already test for n_vclocks prior to calling this function. This is notably incorrect for the code path below, in which there is, in fact, no n_vclocks test: ptp_clock_adjtime() -> ptp_clock_freerun() -> ptp_vclock_in_use() The result is that any clock adjustment on any physical clock is now impossible. This is _despite_ there not being any vclock over this physical clock. $ ptp4l -i eno0 -2 -P -m ptp4l[58.425]: selected /dev/ptp0 as PTP clock [ 58.429749] ptp: physical clock is free running ptp4l[58.431]: Failed to open /dev/ptp0: Device or resource busy failed to create a clock $ cat /sys/class/ptp/ptp0/n_vclocks 0 The patch makes the ptp_vclock_in_use() function say "if it's not a virtual clock, then this physical clock does have virtual clocks on top". Then ptp_clock_freerun() uses this information to say "this physical clock has virtual clocks on top, so it must stay free-running". Then ptp_clock_adjtime() uses this information to say "well, if this physical clock has to be free-running, I can't do it, return -EBUSY". Simply put, ptp_vclock_in_use() cannot be simplified so as to remove the test whether vclocks are in use. What did the blamed commit intend to fix ---------------------------------------- The blamed commit presents a lockdep warning stating "possible recursive locking detected", with the n_vclocks_store() and ptp_clock_unregister() functions involved. The recursive locking seems this: n_vclocks_store() -> mutex_lock_interruptible(&ptp->n_vclocks_mux) // 1 -> device_for_each_child_reverse(..., unregister_vclock) -> unregister_vclock() -> ptp_vclock_unregister() -> ptp_clock_unregister() -> ptp_vclock_in_use() -> mutex_lock_interruptible(&ptp->n_vclocks_mux) // 2 The issue can be triggered by creating and then deleting vclocks: $ echo 2 > /sys/class/ptp/ptp0/n_vclocks $ echo 0 > /sys/class/ptp/ptp0/n_vclocks But note that in the original stack trace, the address of the first lock is different from the address of the second lock. This is because at step 1 marked above, &ptp->n_vclocks_mux is the lock of the parent (physical) PTP clock, and at step 2, the lock is of the child (virtual) PTP clock. They are different locks of different devices. In this situation there is no real deadlock, the lockdep warning is caused by the fact that the mutexes have the same lock class on both the parent and the child. Functionally it is fine. Proposed alternative solution ----------------------------- We must reintroduce the body of ptp_vclock_in_use() mostly as it was structured prior to the blamed commit, but avoid the lockdep warning. Based on the fact that vclocks cannot be nested on top of one another (ptp_is_attribute_visible() hides n_vclocks for virtual clocks), we already know that ptp->n_vclocks is zero for a virtual clock. And ptp->is_virtual_clock is a runtime invariant, established at ptp_clock_register() time and never changed. There is no need to serialize on any mutex in order to read ptp->is_virtual_clock, and we take advantage of that by moving it outside the lock. Thus, virtual clocks do not need to acquire &ptp->n_vclocks_mux at all, and step 2 in the code walkthrough above can simply go away. We can simply return false to the question "ptp_vclock_in_use(a virtual clock)". Other notes ----------- Releasing &ptp->n_vclocks_mux before ptp_vclock_in_use() returns execution seems racy, because the returned value can become stale as soon as the function returns and before the return value is used (i.e. n_vclocks_store() can run any time). The locking requirement should somehow be transferred to the caller, to ensure a longer life time for the returned value, but this seems out of scope for this severe bug fix. Because we are also fixing up the logic from the original commit, there is another Fixes: tag for that. Fixes: 87f7ce260a3c ("ptp: remove ptp->n_vclocks check logic in ptp_vclock_in_use()") Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20250613174749.406826-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 3c902383f2da91cba3821b73aa6edd49f4db6023 Author: Lukas Bulwahn Date: Mon Jun 16 12:04:32 2025 +0200 x86/its: Fix an ifdef typo in its_alloc() Commit a82b26451de1 ("x86/its: explicitly manage permissions for ITS pages") reworks its_alloc() and introduces a typo in an ifdef conditional, referring to CONFIG_MODULE instead of CONFIG_MODULES. Fix this typo in its_alloc(). Fixes: a82b26451de1 ("x86/its: explicitly manage permissions for ITS pages") Signed-off-by: Lukas Bulwahn Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250616100432.22941-1-lukas.bulwahn%40redhat.com commit 13c90202ddbb5f6e8457dadc797ca88b2d1b0742 Merge: 68a4abb1ef7970 5dacc94c6fe61c Author: Jakub Kicinski Date: Tue Jun 17 15:56:33 2025 -0700 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes Thie first patch fixes a crash during PCIe AER when the bnxt_re RoCE driver is loaded. The second patch is a refactor patch needed by patch 3. Patch 3 fixes a packet drop issue if queue restart is done on a ring belonging to a non-default RSS context. Patch 2 and 3 are version 2 that has addressed the v1 issue by reducing the scope of the traffic disruptions: https://lore.kernel.org/netdev/CACKFLi=P9xYHVF4h2Ovjd-8DaoyzFAHnY6Y6H+1b7eGq+BQZzA@mail.gmail.com/ ==================== Link: https://patch.msgid.link/20250613231841.377988-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 5dacc94c6fe61cde6f700e95cf35af9944b022c4 Author: Pavan Chebbi Date: Fri Jun 13 16:18:41 2025 -0700 bnxt_en: Update MRU and RSS table of RSS contexts on queue reset The commit under the Fixes tag below which updates the VNICs' RSS and MRU during .ndo_queue_start(), needs to be extended to cover any non-default RSS contexts which have their own VNICs. Without this step, packets that are destined to a non-default RSS context may be dropped after .ndo_queue_start(). We further optimize this scheme by updating the VNIC only if the RX ring being restarted is in the RSS table of the VNIC. Updating the VNIC (in particular setting the MRU to 0) will momentarily stop all traffic to all rings in the RSS table. Any VNIC that has the RX ring excluded from the RSS table can skip this step and avoid the traffic disruption. Note that this scheme is just an improvement. A VNIC with multiple rings in the RSS table will still see traffic disruptions to all rings in the RSS table when one of the rings is being restarted. We are working on a FW scheme that will improve upon this further. Fixes: 5ac066b7b062 ("bnxt_en: Fix queue start to update vnic RSS table") Reported-by: David Wei Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250613231841.377988-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit e11baaea94e2923739a98abeee85eb0667c04fd3 Author: Pavan Chebbi Date: Fri Jun 13 16:18:40 2025 -0700 bnxt_en: Add a helper function to configure MRU and RSS Add a new helper function that will configure MRU and RSS table of a VNIC. This will be useful when we configure both on a VNIC when resetting an RX ring. This function will be used again in the next bug fix patch where we have to reconfigure VNICs for RSS contexts. Suggested-by: Michael Chan Reviewed-by: Simon Horman Reviewed-by: David Wei Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250613231841.377988-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 1e9ac33fa271be0d2480fd732f9642d81542500b Author: Kalesh AP Date: Fri Jun 13 16:18:39 2025 -0700 bnxt_en: Fix double invocation of bnxt_ulp_stop()/bnxt_ulp_start() Before the commit under the Fixes tag below, bnxt_ulp_stop() and bnxt_ulp_start() were always invoked in pairs. After that commit, the new bnxt_ulp_restart() can be invoked after bnxt_ulp_stop() has been called. This may result in the RoCE driver's aux driver .suspend() method being invoked twice. The 2nd bnxt_re_suspend() call will crash when it dereferences a NULL pointer: (NULL ib_device): Handle device suspend call BUG: kernel NULL pointer dereference, address: 0000000000000b78 PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP PTI CPU: 20 UID: 0 PID: 181 Comm: kworker/u96:5 Tainted: G S 6.15.0-rc1 #4 PREEMPT(voluntary) Tainted: [S]=CPU_OUT_OF_SPEC Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017 Workqueue: bnxt_pf_wq bnxt_sp_task [bnxt_en] RIP: 0010:bnxt_re_suspend+0x45/0x1f0 [bnxt_re] Code: 8b 05 a7 3c 5b f5 48 89 44 24 18 31 c0 49 8b 5c 24 08 4d 8b 2c 24 e8 ea 06 0a f4 48 c7 c6 04 60 52 c0 48 89 df e8 1b ce f9 ff <48> 8b 83 78 0b 00 00 48 8b 80 38 03 00 00 a8 40 0f 85 b5 00 00 00 RSP: 0018:ffffa2e84084fd88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffffb4b6b934 RDI: 00000000ffffffff RBP: ffffa1760954c9c0 R08: 0000000000000000 R09: c0000000ffffdfff R10: 0000000000000001 R11: ffffa2e84084fb50 R12: ffffa176031ef070 R13: ffffa17609775000 R14: ffffa17603adc180 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffffa17daa397000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000b78 CR3: 00000004aaa30003 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bnxt_ulp_stop+0x69/0x90 [bnxt_en] bnxt_sp_task+0x678/0x920 [bnxt_en] ? __schedule+0x514/0xf50 process_scheduled_works+0x9d/0x400 worker_thread+0x11c/0x260 ? __pfx_worker_thread+0x10/0x10 kthread+0xfe/0x1e0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2b/0x40 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Check the BNXT_EN_FLAG_ULP_STOPPED flag and do not proceed if the flag is already set. This will preserve the original symmetrical bnxt_ulp_stop() and bnxt_ulp_start(). Also, inside bnxt_ulp_start(), clear the BNXT_EN_FLAG_ULP_STOPPED flag after taking the mutex to avoid any race condition. And for symmetry, only proceed in bnxt_ulp_start() if the BNXT_EN_FLAG_ULP_STOPPED is set. Fixes: 3c163f35bd50 ("bnxt_en: Optimize recovery path ULP locking in the driver") Signed-off-by: Kalesh AP Co-developed-by: Michael Chan Signed-off-by: Michael Chan Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250613231841.377988-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 68a4abb1ef797095799e91d21f5d428c5bd09342 Merge: 6f793a1d053775 db22720545207f Author: Jakub Kicinski Date: Tue Jun 17 15:48:38 2025 -0700 Merge tag 'linux-can-fixes-for-6.16-20250617' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-06-17 The patch is by Brett Werling, and fixes the power regulator retrieval during probe of the tcan4x5x glue code for the m_can driver. * tag 'linux-can-fixes-for-6.16-20250617' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: tcan4x5x: fix power regulator retrieval during probe openvswitch: Allocate struct ovs_pcpu_storage dynamically ==================== Link: https://patch.msgid.link/20250617155123.2141584-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 6f793a1d053775f8324b8dba1e7ed224f8b0166f Author: Mina Almasry Date: Sun Jun 15 20:07:33 2025 +0000 net: netmem: fix skb_ensure_writable with unreadable skbs skb_ensure_writable should succeed when it's trying to write to the header of the unreadable skbs, so it doesn't need an unconditional skb_frags_readable check. The preceding pskb_may_pull() call will succeed if write_len is within the head and fail if we're trying to write to the unreadable payload, so we don't need an additional check. Removing this check restores DSCP functionality with unreadable skbs as it's called from dscp_tg. Cc: willemb@google.com Cc: asml.silence@gmail.com Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags") Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250615200733.520113-1-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 94a17f2dc90bc7eae36c0f478515d4bd1c23e877 Author: Dave Hansen Date: Tue Jun 10 15:24:20 2025 -0700 x86/mm: Disable INVLPGB when PTI is enabled PTI uses separate ASIDs (aka. PCIDs) for kernel and user address spaces. When the kernel needs to flush the user address space, it just sets a bit in a bitmap and then flushes the entire PCID on the next switch to userspace. This bitmap is a single 'unsigned long' which is plenty for all 6 dynamic ASIDs. But, unfortunately, the INVLPGB support brings along a bunch more user ASIDs, as many as ~2k more. The bitmap can't address that many. Fortunately, the bitmap is only needed for PTI and all the CPUs with INVLPGB are AMD CPUs that aren't vulnerable to Meltdown and don't need PTI. The only way someone can run into an issue in practice is by booting with pti=on on a newer AMD CPU. Disable INVLPGB if PTI is enabled. Avoid overrunning the small bitmap. Note: this will be fixed up properly by making the bitmap bigger. For now, just avoid the mostly theoretical bug. Fixes: 4afeb0ed1753 ("x86/mm: Enable broadcast TLB invalidation for multi-threaded processes") Signed-off-by: Dave Hansen Acked-by: Rik van Riel Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250610222420.E8CBF472%40davehans-spike.ostc.intel.com commit 60524f1d2bdf222db6dc3f680e0272441f697fe4 Author: Meghana Malladi Date: Mon Jun 16 12:03:19 2025 +0530 net: ti: icssg-prueth: Fix packet handling for XDP_TX While transmitting XDP frames for XDP_TX, page_pool is used to get the DMA buffers (already mapped to the pages) and need to be freed/reycled once the transmission is complete. This need not be explicitly done by the driver as this is handled more gracefully by the xdp driver while returning the xdp frame. __xdp_return() frees the XDP memory based on its memory type, under which page_pool memory is also handled. This change fixes the transmit queue timeout while running XDP_TX. logs: [ 309.069682] icssg-prueth icssg1-eth eth2: NETDEV WATCHDOG: CPU: 0: transmit queue 0 timed out 45860 ms [ 313.933780] icssg-prueth icssg1-eth eth2: NETDEV WATCHDOG: CPU: 0: transmit queue 0 timed out 50724 ms [ 319.053656] icssg-prueth icssg1-eth eth2: NETDEV WATCHDOG: CPU: 0: transmit queue 0 timed out 55844 ms ... Fixes: 62aa3246f462 ("net: ti: icssg-prueth: Add XDP support") Signed-off-by: Meghana Malladi Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250616063319.3347541-1-m-malladi@ti.com Signed-off-by: Jakub Kicinski commit f4b048a6a34af9ad14a3a4a82902748f6cea6872 Author: Sven Peter Date: Thu Jun 12 21:11:32 2025 +0000 Input: apple_z2 - drop default ARCH_APPLE in Kconfig When the first driver for Apple Silicon was upstreamed we accidentally included `default ARCH_APPLE` in its Kconfig which then spread to almost every subsequent driver. As soon as ARCH_APPLE is set to y this will pull in many drivers as built-ins which is not what we want. Thus, drop `default ARCH_APPLE` from Kconfig. Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250612-apple-kconfig-defconfig-v1-8-0e6f9cb512c1@kernel.org Signed-off-by: Dmitry Torokhov commit 52da431bf03b5506203bca27fe14a97895c80faf Merge: 4663747812d1a2 62a65b32bddb0f Author: Linus Torvalds Date: Tue Jun 17 14:58:52 2025 -0700 Merge tag 'libnvdimm-fixes-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Ira Weiny: "This converts the pmem-region device tree bindings to YAML to fix errors and bring it up to date" * tag 'libnvdimm-fixes-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dt-bindings: pmem: Convert binding to YAML commit d222b6e6fb31e320eca506e665694d8ddf459157 Author: Arnaldo Carvalho de Melo Date: Mon Jun 16 14:18:55 2025 -0300 tools headers x86 cpufeatures: Sync with the kernel sources To pick the changes from: faad6645e1128ec2 ("x86/cpufeatures: Add CPUID feature bit for the Bus Lock Threshold") 159013a7ca18c271 ("x86/its: Enumerate Indirect Target Selection (ITS) bug") f9f27c4a377a8b45 ("x86/cpufeatures: Add "Allowed SEV Features" Feature") b02dc185ee86836c ("x86/cpufeatures: Add X86_FEATURE_APX") d88bb2ded2efdc38 ("KVM: x86: Advertise support for AMD's PREFETCHI") This causes these perf files to be rebuilt and brings some X86_FEATURE that may be used by: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Please see tools/include/uapi/README for further details. Cc: Adrian Hunter Cc: Babu Moger Cc: Chang S. Bae Cc: Dave Hansen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kishon Vijay Abraham I Cc: Manali Shukla Cc: Namhyung Kim Cc: Pawan Gupta Cc: Sean Christopherson Link: https://lore.kernel.org/r/aFBWAI3kHYX5aL9G@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 1c85c94b3767895d70b7a5a49b111f974f5660ec Author: Arnaldo Carvalho de Melo Date: Mon Jun 16 14:33:17 2025 -0300 perf bench futex: Fix prctl include in musl libc Namhyung Kim reported: I've updated the perf-tools-next to v6.16-rc1 and found a build error like below on alpine linux 3.18. In file included from bench/futex.c:6: /usr/include/sys/prctl.h:88:8: error: redefinition of 'struct prctl_mm_map' 88 | struct prctl_mm_map { | ^~~~~~~~~~~~ In file included from bench/futex.c:5: /linux/tools/include/uapi/linux/prctl.h:134:8: note: originally defined here 134 | struct prctl_mm_map { | ^~~~~~~~~~~~ make[4]: *** [/linux/tools/build/Makefile.build:86: /build/bench/futex.o] Error 1 git bisect says it's the first commit introduced the failure. So both /usr/include/sys/prctl.h and /linux/tools/include/uapi/linux/prctl.h provide struct prctl_mm_map but their include guard must be different. /usr/include/sys/prctl.h provided by glibc contains the prctl() declaration. It includes also linux/prctl.h. The /usr/include/sys/prctl.h on alpine linux is different. This is probably coming from musl. It contains the PR_* definition and the prctl() declaration. So it clashes here because now the one struct is available twice. The man page for prctl(2) says: | #include /* Definition of PR_* constants */ | #include so musl doesn't follow this. So don't include linux/prctl.h explicitely and add some new defines needed if they aren't available. Acked-by: Sebastian Andrzej Siewior Reported-by: Namhyung Kim Closes: https://lore.kernel.org/r/20250611092542.F4ooE2FL@linutronix.de Link: https://www.openwall.com/lists/musl/2025/06/12/11 Signed-off-by: Arnaldo Carvalho de Melo commit 19f4422d485b2d0a935117a1a16015328f99be25 Author: Ian Rogers Date: Fri Jun 13 17:41:04 2025 -0700 perf test: Directory file descriptor leak Add missed close when iterating over the script directories. Fixes: f3295f5b067d3c26 ("perf tests: Use scandirat for shell script finding") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tiezhu Yang Link: https://lore.kernel.org/r/20250614004108.1650988-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4ea0bb8aaedfad8e695429cda6bd1c8b0dad0844 Author: Namjae Jeon Date: Fri Jun 13 11:51:29 2025 +0900 ksmbd: handle set/get info file for streamed file The bug only appears when: - windows 11 copies a file that has an alternate data stream - streams_xattr is enabled on the share configuration. Microsoft Edge adds a ZoneIdentifier data stream containing the URL for files it downloads. Another way to create a test file: - open cmd.exe - echo "hello from default data stream" > hello.txt - echo "hello again from ads" > hello.txt:ads.txt If you open the file using notepad, we'll see the first message. If you run "notepad hello.txt:ads.txt" in cmd.exe, we should see the second message. dir /s /r should least all streams for the file. The truncation happens because the windows 11 client sends a SetInfo/EndOfFile message on the ADS, but it is instead applied on the main file, because we don't check fp->stream. When receiving set/get info file for a stream file, Change to process requests using stream position and size. Truncate is unnecessary for stream files, so we skip set_file_allocation_info and set_end_of_file_info operations. Reported-by: Marios Makassikis Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 7ac5b66acafcc9292fb935d7e03790f2b8b2dc0e Author: Namjae Jeon Date: Fri Jun 13 10:12:43 2025 +0900 ksmbd: fix null pointer dereference in destroy_previous_session If client set ->PreviousSessionId on kerberos session setup stage, NULL pointer dereference error will happen. Since sess->user is not set yet, It can pass the user argument as NULL to destroy_previous_session. sess->user will be set in ksmbd_krb5_authenticate(). So this patch move calling destroy_previous_session() after ksmbd_krb5_authenticate(). Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-27391 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit a89f5fae998bdc4d0505306f93844c9ae059d50c Author: Namjae Jeon Date: Tue Jun 10 18:52:56 2025 +0900 ksmbd: add free_transport ops in ksmbd connection free_transport function for tcp connection can be called from smbdirect. It will cause kernel oops. This patch add free_transport ops in ksmbd connection, and add each free_transports for tcp and smbdirect. Fixes: 21a4e47578d4 ("ksmbd: fix use-after-free in __smb2_lease_break_noti()") Reviewed-by: Stefan Metzmacher Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 155c1e5a92bebff36cc033c9eb9bb3f76712af44 Author: Krzysztof Kozlowski Date: Fri Jun 13 09:16:54 2025 +0200 Input: Fully open-code compatible for grepping It is very useful to find driver implementing compatibles with `git grep compatible`, so driver should not use defines for that string, even if this means string will be effectively duplicated. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250613071653.46809-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit c44f79cbd305e7a8c2548b4fa3b42b865611bada Author: Chen-Yu Tsai Date: Tue Jun 17 16:19:58 2025 +0800 dt-bindings: HID: i2c-hid: elan: Introduce Elan eKTH8D18 The Elan eKTH8D18 touchscreen controller is an I2C HID device with a longer boot-up time. Power sequence timing wise it is compatible with the eKTH6A12NAY, with a power-on delay of at least 5ms, 20ms out-of-reset for I2C ack response, and 150ms out-of-reset for I2C HID enumeration, both shorter than what the eKTH6A12NAY requires. Enumeration and subsequent operation follows the I2C HID standard. Add a compatible string for it with the ekth6a12nay one as a fallback. No enum was used as it is rare to actually add new entries. These chips are commonly completely backward compatible, and unless the power sequencing delays change, there is no real effort being made to keep track of new parts, which come out constantly. Also drop the constraints on the I2C address since it's not really part of the binding. Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20250617082004.1653492-2-wenst@chromium.org Signed-off-by: Dmitry Torokhov commit ebec62bc7ec435b475722a5467d67c720a1ad79f Author: Ian Rogers Date: Fri Jun 13 17:41:05 2025 -0700 perf evsel: Missed close() when probing hybrid core PMUs Add missing close() to avoid leaking perf events. In past perfs this mattered little as the function was just used by 'perf list'. As the function is now used to detect hybrid PMUs leaking the perf event is somewhat more painful. Fixes: b41f1cec91c37eee ("perf list: Skip unsupported events") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tiezhu Yang Link: https://lore.kernel.org/r/20250614004108.1650988-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fc92099902fbf21000554678a47654b029c15a4d Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 12:36:06 2025 -0300 tools headers: Synchronize linux/bits.h with the kernel sources To pick up the changes in this cset: 1e7933a575ed8af4 ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") 5b572e8a9f3dcd6e ("bits: introduce fixed-type BIT_U*()") 19408200c094858d ("bits: introduce fixed-type GENMASK_U*()") 31299a5e02112411 ("bits: add comments and newlines to #if, #else and #endif directives") This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/linux/bits.h include/linux/bits.h Please see tools/include/uapi/README for further details. Acked-by: Vincent Mailhol Cc: I Hsin Cheng Cc: Yury Norov Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Lucas De Marchi Cc: Namhyung Kim Cc: Yury Norov Link: https://lore.kernel.org/r/aEr0ZJ60EbshEy6p@x1 Signed-off-by: Arnaldo Carvalho de Melo commit bb6b4143503750318a3f85975186db899a3caaf2 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 18:08:40 2025 -0300 tools arch amd ibs: Sync ibs.h with the kernel sources To pick up the changes from: 861c6b1185fbb2e3 ("x86/platform/amd: Add standard header guards to ") A small change to tools/perf/check-headers.sh was made to cope with the move of this header done in: 3846389c03a85188 ("x86/platform/amd: Move the header to ") That don't result in any changes in the tools, just address this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/aEtCi0pup5FEwnzn@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 261dce3d64021e7ec828a17b4975ce9182e54ceb Author: Chuyi Zhou Date: Tue Jun 17 12:42:16 2025 +0800 workqueue: Initialize wq_isolated_cpumask in workqueue_init_early() Now when isolcpus is enabled via the cmdline, wq_isolated_cpumask does not include these isolated CPUs, even wq_unbound_cpumask has already excluded them. It is only when we successfully configure an isolate cpuset partition that wq_isolated_cpumask gets overwritten by workqueue_unbound_exclude_cpumask(), including both the cmdline-specified isolated CPUs and the isolated CPUs within the cpuset partitions. Fix this issue by initializing wq_isolated_cpumask properly in workqueue_init_early(). Fixes: fe28f631fa94 ("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask") Signed-off-by: Chuyi Zhou Reviewed-by: Waiman Long Signed-off-by: Tejun Heo commit 4663747812d1a272312d1b95cbd128f0cdb329f2 Merge: 9afe652958c3ee e2468dc7007436 Author: Linus Torvalds Date: Tue Jun 17 11:31:53 2025 -0700 Merge tag 'platform-drivers-x86-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - amd/hsmp: Timeout handling fixes - amd/pmc: - Clear metrics table at start of cycle - Add PCSpecialist Lafite Pro V 14M to 8042 quirks list - amd/pmf: Fix error handling corner cases (nth attempt) - alienware-wmi-wmax: Revert G-Mode support as it lowers performance - dell_rbu: - Fix sparse lock context warning - Fix list head usage - Don't overwrite data buffer past the size of the last packet - ideapad-laptop: Ensure EC is not polled too frequently - intel-uncore-freq: - Fail module load when plat_info is NULL - Avoid a non-literal format string as it triggers a compiler warning - intel/pmc: Add Lunar Lake and Panther Lake support to SSRAM Telemetry - intel/power-domains: Fix error code in tpmi_init() - samsung-galaxybook: Add support for Notebook 9 Pro and others (SAM0426) * tag 'platform-drivers-x86-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: Revert "platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1" platform/x86/amd/pmc: Add PCSpecialist Lafite Pro V 14M to 8042 quirks list platform/x86/intel-uncore-freq: avoid non-literal format string platform/x86/intel/pmc: Add Panther Lake support to Intel PMC SSRAM Telemetry platform/x86/intel/pmc: Add Lunar Lake support to Intel PMC SSRAM Telemetry MAINTAINERS: .mailmap: Update Hans de Goede's email address platform/x86: dell_rbu: Bump version platform/x86: dell_rbu: Stop overwriting data buffer platform/x86: dell_rbu: Fix list usage platform/x86: dell_rbu: Fix lock context warning platform/x86/amd: pmf: Simplify error flow in amd_pmf_init_smart_pc() platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice platform/x86/amd: pmf: Use device managed allocations x86/platform/amd: replace down_timeout() with down_interruptible() x86/platform/amd: move final timeout check to after final sleep platform/x86/amd: pmc: Clear metrics table at start of cycle platform/x86/intel: power-domains: Fix error code in tpmi_init() platform/x86: samsung-galaxybook: Add SAM0426 platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL platform/x86: ideapad-laptop: use usleep_range() for EC polling commit 33796b91871ad4010c8188372dd1faf97cf0f1c0 Author: Tejun Heo Date: Mon Jun 16 10:13:25 2025 -1000 sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() During task_group creation, sched_create_group() calls scx_group_set_weight() with CGROUP_WEIGHT_DFL to initialize the sched_ext portion. This is premature and ends up calling ops.cgroup_set_weight() with an incorrect @cgrp before ops.cgroup_init() is called. sched_create_group() should just initialize SCX related fields in the new task_group. Fix it by factoring out scx_tg_init() from sched_init() and making sched_create_group() call that function instead of scx_group_set_weight(). v2: Retain CONFIG_EXT_GROUP_SCHED ifdef in sched_init() as removing it leads to build failures on !CONFIG_GROUP_SCHED configs. Signed-off-by: Tejun Heo Fixes: 819513666966 ("sched_ext: Add cgroup support") Cc: stable@vger.kernel.org # v6.12+ commit c50784e99f0e7199cdb12dbddf02229b102744ef Author: Tejun Heo Date: Fri Jun 13 13:23:07 2025 -1000 sched_ext: Make scx_group_set_weight() always update tg->scx.weight Otherwise, tg->scx.weight can go out of sync while scx_cgroup is not enabled and ops.cgroup_init() may be called with a stale weight value. Signed-off-by: Tejun Heo Fixes: 819513666966 ("sched_ext: Add cgroup support") Cc: stable@vger.kernel.org # v6.12+ commit bbc3a0b17a890aa19bddd0f9b08e8af488f1ec94 Author: Kent Overstreet Date: Tue Jun 17 13:08:35 2025 -0400 bcachefs: fsck: Fix check_directory_structure when no check_dirents check_directory_structure runs after check_dirents, so it expects that it won't see any inodes with missing backpointers - normally. But online fsck can't run check_dirents yet, or the user might only be running a specific pass, so we need to be careful that this isn't an error. If an inode is unreachable, that's handled by a separate pass. Also, add a new 'bch2_inode_has_backpointer()' helper, since we were doing this inconsistently. Signed-off-by: Kent Overstreet commit 8edab8a72d67742f87e9dc2e2b0cdfddda5dc29a Author: Mark Zhang Date: Tue Jun 17 11:13:55 2025 +0300 RDMA/mlx5: Initialize obj_event->obj_sub_list before xa_insert The obj_event may be loaded immediately after inserted, then if the list_head is not initialized then we may get a poisonous pointer. This fixes the crash below: mlx5_core 0000:03:00.0: MLX5E: StrdRq(1) RqSz(8) StrdSz(2048) RxCqeCmprss(0 enhanced) mlx5_core.sf mlx5_core.sf.4: firmware version: 32.38.3056 mlx5_core 0000:03:00.0 en3f0pf0sf2002: renamed from eth0 mlx5_core.sf mlx5_core.sf.4: Rate limit: 127 rates are supported, range: 0Mbps to 195312Mbps IPv6: ADDRCONF(NETDEV_CHANGE): en3f0pf0sf2002: link becomes ready Unable to handle kernel NULL pointer dereference at virtual address 0000000000000060 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=00000007760fb000 [0000000000000060] pgd=000000076f6d7003, p4d=000000076f6d7003, pud=0000000777841003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] SMP Modules linked in: ipmb_host(OE) act_mirred(E) cls_flower(E) sch_ingress(E) mptcp_diag(E) udp_diag(E) raw_diag(E) unix_diag(E) tcp_diag(E) inet_diag(E) binfmt_misc(E) bonding(OE) rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) isofs(E) cdrom(E) mst_pciconf(OE) ib_umad(OE) mlx5_ib(OE) ipmb_dev_int(OE) mlx5_core(OE) kpatch_15237886(OEK) mlxdevm(OE) auxiliary(OE) ib_uverbs(OE) ib_core(OE) psample(E) mlxfw(OE) tls(E) sunrpc(E) vfat(E) fat(E) crct10dif_ce(E) ghash_ce(E) sha1_ce(E) sbsa_gwdt(E) virtio_console(E) ext4(E) mbcache(E) jbd2(E) xfs(E) libcrc32c(E) mmc_block(E) virtio_net(E) net_failover(E) failover(E) sha2_ce(E) sha256_arm64(E) nvme(OE) nvme_core(OE) gpio_mlxbf3(OE) mlx_compat(OE) mlxbf_pmc(OE) i2c_mlxbf(OE) sdhci_of_dwcmshc(OE) pinctrl_mlxbf3(OE) mlxbf_pka(OE) gpio_generic(E) i2c_core(E) mmc_core(E) mlxbf_gige(OE) vitesse(E) pwr_mlxbf(OE) mlxbf_tmfifo(OE) micrel(E) mlxbf_bootctl(OE) virtio_ring(E) virtio(E) ipmi_devintf(E) ipmi_msghandler(E) [last unloaded: mst_pci] CPU: 11 PID: 20913 Comm: rte-worker-11 Kdump: loaded Tainted: G OE K 5.10.134-13.1.an8.aarch64 #1 Hardware name: https://www.mellanox.com BlueField-3 SmartNIC Main Card/BlueField-3 SmartNIC Main Card, BIOS 4.2.2.12968 Oct 26 2023 pstate: a0400089 (NzCv daIf +PAN -UAO -TCO BTYPE=--) pc : dispatch_event_fd+0x68/0x300 [mlx5_ib] lr : devx_event_notifier+0xcc/0x228 [mlx5_ib] sp : ffff80001005bcf0 x29: ffff80001005bcf0 x28: 0000000000000001 x27: ffff244e0740a1d8 x26: ffff244e0740a1d0 x25: ffffda56beff5ae0 x24: ffffda56bf911618 x23: ffff244e0596a480 x22: ffff244e0596a480 x21: ffff244d8312ad90 x20: ffff244e0596a480 x19: fffffffffffffff0 x18: 0000000000000000 x17: 0000000000000000 x16: ffffda56be66d620 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000040 x10: ffffda56bfcafb50 x9 : ffffda5655c25f2c x8 : 0000000000000010 x7 : 0000000000000000 x6 : ffff24545a2e24b8 x5 : 0000000000000003 x4 : ffff80001005bd28 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff244e0596a480 x0 : ffff244d8312ad90 Call trace: dispatch_event_fd+0x68/0x300 [mlx5_ib] devx_event_notifier+0xcc/0x228 [mlx5_ib] atomic_notifier_call_chain+0x58/0x80 mlx5_eq_async_int+0x148/0x2b0 [mlx5_core] atomic_notifier_call_chain+0x58/0x80 irq_int_handler+0x20/0x30 [mlx5_core] __handle_irq_event_percpu+0x60/0x220 handle_irq_event_percpu+0x3c/0x90 handle_irq_event+0x58/0x158 handle_fasteoi_irq+0xfc/0x188 generic_handle_irq+0x34/0x48 ... Fixes: 759738537142 ("IB/mlx5: Enable subscription for device events over DEVX") Link: https://patch.msgid.link/r/3ce7f20e0d1a03dc7de6e57494ec4b8eaf1f05c2.1750147949.git.leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 333e4d79316c9ed5877d7aac8b8ed22efc74e96d Author: Maor Gottlieb Date: Mon Jun 16 11:26:21 2025 +0300 RDMA/core: Rate limit GID cache warning messages The GID cache warning messages can flood the kernel log when there are multiple failed attempts to add GIDs. This can happen when creating many virtual interfaces without having enough space for their GIDs in the GID table. Change pr_warn to pr_warn_ratelimited to prevent log flooding while still maintaining visibility of the issue. Link: https://patch.msgid.link/r/fd45ed4a1078e743f498b234c3ae816610ba1b18.1750062357.git.leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2c6b640ea08bff1a192bf87fa45246ff1e40767c Author: Or Har-Toov Date: Mon Jun 16 11:17:01 2025 +0300 RDMA/mlx5: Fix unsafe xarray access in implicit ODP handling __xa_store() and __xa_erase() were used without holding the proper lock, which led to a lockdep warning due to unsafe RCU usage. This patch replaces them with xa_store() and xa_erase(), which perform the necessary locking internally. ============================= WARNING: suspicious RCPU usage 6.14.0-rc7_for_upstream_debug_2025_03_18_15_01 #1 Not tainted ----------------------------- ./include/linux/xarray.h:1211 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 3 locks held by kworker/u136:0/219: at: process_one_work+0xbe4/0x15f0 process_one_work+0x75c/0x15f0 pagefault_mr+0x9a5/0x1390 [mlx5_ib] stack backtrace: CPU: 14 UID: 0 PID: 219 Comm: kworker/u136:0 Not tainted 6.14.0-rc7_for_upstream_debug_2025_03_18_15_01 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5_ib_page_fault mlx5_ib_eqe_pf_action [mlx5_ib] Call Trace: dump_stack_lvl+0xa8/0xc0 lockdep_rcu_suspicious+0x1e6/0x260 xas_create+0xb8a/0xee0 xas_store+0x73/0x14c0 __xa_store+0x13c/0x220 ? xa_store_range+0x390/0x390 ? spin_bug+0x1d0/0x1d0 pagefault_mr+0xcb5/0x1390 [mlx5_ib] ? _raw_spin_unlock+0x1f/0x30 mlx5_ib_eqe_pf_action+0x3be/0x2620 [mlx5_ib] ? lockdep_hardirqs_on_prepare+0x400/0x400 ? mlx5_ib_invalidate_range+0xcb0/0xcb0 [mlx5_ib] process_one_work+0x7db/0x15f0 ? pwq_dec_nr_in_flight+0xda0/0xda0 ? assign_work+0x168/0x240 worker_thread+0x57d/0xcd0 ? rescuer_thread+0xc40/0xc40 kthread+0x3b3/0x800 ? kthread_is_per_cpu+0xb0/0xb0 ? lock_downgrade+0x680/0x680 ? do_raw_spin_lock+0x12d/0x270 ? spin_bug+0x1d0/0x1d0 ? finish_task_switch.isra.0+0x284/0x9e0 ? lockdep_hardirqs_on_prepare+0x284/0x400 ? kthread_is_per_cpu+0xb0/0xb0 ret_from_fork+0x2d/0x70 ? kthread_is_per_cpu+0xb0/0xb0 ret_from_fork_asm+0x11/0x20 Fixes: d3d930411ce3 ("RDMA/mlx5: Fix implicit ODP use after free") Link: https://patch.msgid.link/r/a85ddd16f45c8cb2bc0a188c2b0fcedfce975eb8.1750061791.git.leon@kernel.org Signed-off-by: Or Har-Toov Reviewed-by: Patrisious Haddad Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 688a0d61b2d7427189c4eb036ce485d8fc957cbb Author: Vitaly Lifshits Date: Sun May 25 11:38:43 2025 +0300 e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13 On some systems with Nahum 11 and Nahum 13 the value of the XTAL clock in the software STRAP is incorrect. This causes the PTP timer to run at the wrong rate and can lead to synchronization issues. The STRAP value is configured by the system firmware, and a firmware update is not always possible. Since the XTAL clock on these systems always runs at 38.4MHz, the driver may ignore the STRAP and just set the correct value. Fixes: cc23f4f0b6b9 ("e1000e: Add support for Meteor Lake") Signed-off-by: Vitaly Lifshits Tested-by: Mor Bar-Gabay Reviewed-by: Gil Fine Signed-off-by: Tony Nguyen commit 48c8b214974dc55283bd5f12e3a483b27c403bbc Author: Grzegorz Nitka Date: Fri May 16 15:09:07 2025 +0200 ice: fix eswitch code memory leak in reset scenario Add simple eswitch mode checker in attaching VF procedure and allocate required port representor memory structures only in switchdev mode. The reset flows triggers VF (if present) detach/attach procedure. It might involve VF port representor(s) re-creation if the device is configured is switchdev mode (not legacy one). The memory was blindly allocated in current implementation, regardless of the mode and not freed if in legacy mode. Kmemeleak trace: unreferenced object (percpu) 0x7e3bce5b888458 (size 40): comm "bash", pid 1784, jiffies 4295743894 hex dump (first 32 bytes on cpu 45): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): pcpu_alloc_noprof+0x4c4/0x7c0 ice_repr_create+0x66/0x130 [ice] ice_repr_create_vf+0x22/0x70 [ice] ice_eswitch_attach_vf+0x1b/0xa0 [ice] ice_reset_all_vfs+0x1dd/0x2f0 [ice] ice_pci_err_resume+0x3b/0xb0 [ice] pci_reset_function+0x8f/0x120 reset_store+0x56/0xa0 kernfs_fop_write_iter+0x120/0x1b0 vfs_write+0x31c/0x430 ksys_write+0x61/0xd0 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Testing hints (ethX is PF netdev): - create at least one VF echo 1 > /sys/class/net/ethX/device/sriov_numvfs - trigger the reset echo 1 > /sys/class/net/ethX/device/reset Fixes: 415db8399d06 ("ice: make representor code generic") Signed-off-by: Grzegorz Nitka Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5d3bc9e5e725aa36cca9b794e340057feb6880b4 Author: Krishna Kumar Date: Tue May 20 22:36:56 2025 +0530 net: ice: Perform accurate aRFS flow match This patch fixes an issue seen in a large-scale deployment under heavy incoming pkts where the aRFS flow wrongly matches a flow and reprograms the NIC with wrong settings. That mis-steering causes RX-path latency spikes and noisy neighbor effects when many connections collide on the same hash (some of our production servers have 20-30K connections). set_rps_cpu() calls ndo_rx_flow_steer() with flow_id that is calculated by hashing the skb sized by the per rx-queue table size. This results in multiple connections (even across different rx-queues) getting the same hash value. The driver steer function modifies the wrong flow to use this rx-queue, e.g.: Flow#1 is first added: Flow#1: , Hash 'h', q#10 Later when a new flow needs to be added: Flow#2: , Hash 'h', q#20 The driver finds the hash 'h' from Flow#1 and updates it to use q#20. This results in both flows getting un-optimized - packets for Flow#1 goes to q#20, and then reprogrammed back to q#10 later and so on; and Flow #2 programming is never done as Flow#1 is matched first for all misses. Many flows may wrongly share the same hash and reprogram rules of the original flow each with their own q#. Tested on two 144-core servers with 16K netperf sessions for 180s. Netperf clients are pinned to cores 0-71 sequentially (so that wrong packets on q#s 72-143 can be measured). IRQs are set 1:1 for queues -> CPUs, enable XPS, enable aRFS (global value is 144 * rps_flow_cnt). Test notes about results from ice_rx_flow_steer(): --------------------------------------------------- 1. "Skip:" counter increments here: if (fltr_info->q_index == rxq_idx || arfs_entry->fltr_state != ICE_ARFS_ACTIVE) goto out; 2. "Add:" counter increments here: ret = arfs_entry->fltr_info.fltr_id; INIT_HLIST_NODE(&arfs_entry->list_entry); 3. "Update:" counter increments here: /* update the queue to forward to on an already existing flow */ Runtime comparison: original code vs with the patch for different rps_flow_cnt values. +-------------------------------+--------------+--------------+ | rps_flow_cnt | 512 | 2048 | +-------------------------------+--------------+--------------+ | Ratio of Pkts on Good:Bad q's | 214 vs 822K | 1.1M vs 980K | | Avoid wrong aRFS programming | 0 vs 310K | 0 vs 30K | | CPU User | 216 vs 183 | 216 vs 206 | | CPU System | 1441 vs 1171 | 1447 vs 1320 | | CPU Softirq | 1245 vs 920 | 1238 vs 961 | | CPU Total | 29 vs 22.7 | 29 vs 24.9 | | aRFS Update | 533K vs 59 | 521K vs 32 | | aRFS Skip | 82M vs 77M | 7.2M vs 4.5M | +-------------------------------+--------------+--------------+ A separate TCP_STREAM and TCP_RR with 1,4,8,16,64,128,256,512 connections showed no performance degradation. Some points on the patch/aRFS behavior: 1. Enabling full tuple matching ensures flows are always correctly matched, even with smaller hash sizes. 2. 5-6% drop in CPU utilization as the packets arrive at the correct CPUs and fewer calls to driver for programming on misses. 3. Larger hash tables reduces mis-steering due to more unique flow hashes, but still has clashes. However, with larger per-device rps_flow_cnt, old flows take more time to expire and new aRFS flows cannot be added if h/w limits are reached (rps_may_expire_flow() succeeds when 10*rps_flow_cnt pkts have been processed by this cpu that are not part of the flow). Fixes: 28bf26724fdb0 ("ice: Implement aRFS") Signed-off-by: Krishna Kumar Reviewed-by: Simon Horman Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 7f8073cfb04a97842fe891ca50dad60afd1e3121 Author: Heiko Carstens Date: Fri Jun 13 17:53:04 2025 +0200 s390/ptrace: Fix pointer dereferencing in regs_get_kernel_stack_nth() The recent change which added READ_ONCE_NOCHECK() to read the nth entry from the kernel stack incorrectly dropped dereferencing of the stack pointer in order to read the requested entry. In result the address of the entry is returned instead of its content. Dereference the pointer again to fix this. Reported-by: Will Deacon Closes: https://lore.kernel.org/r/20250612163331.GA13384@willie-the-truck Fixes: d93a855c31b7 ("s390/ptrace: Avoid KASAN false positives in regs_get_kernel_stack_nth()") Cc: stable@vger.kernel.org Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit db22720545207f734aaa9d9f71637bfc8b0155e0 Author: Brett Werling Date: Thu Jun 12 14:18:25 2025 -0500 can: tcan4x5x: fix power regulator retrieval during probe Fixes the power regulator retrieval in tcan4x5x_can_probe() by ensuring the regulator pointer is not set to NULL in the successful return from devm_regulator_get_optional(). Fixes: 3814ca3a10be ("can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config") Signed-off-by: Brett Werling Link: https://patch.msgid.link/20250612191825.3646364-1-brett.werling@garmin.com Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit e1f0e1a45a40f45ed615abf938cbdfeb7793a9ee Author: Kent Overstreet Date: Tue Jun 17 10:23:53 2025 -0400 bcachefs: Fix restart handling in btree_node_scrub_work() btree node scrub was sometimes failing to rewrite nodes with errors; bch2_btree_node_rewrite() can return a transaction restart and we weren't checking - the lockrestart_do() needs to wrap the entire operation. And there's a better helper it should've been using, bch2_btree_node_rewrite_key(), which makes all this more convenient. Signed-off-by: Kent Overstreet commit a766cfbbeb3a74397965a8fa2e9a402026d3e1d8 Author: Song Liu Date: Thu Jun 12 22:28:56 2025 -0700 bpf: Mark dentry->d_inode as trusted_or_null LSM hooks such as security_path_mknod() and security_inode_rename() have access to newly allocated negative dentry, which has NULL d_inode. Therefore, it is necessary to do the NULL pointer check for d_inode. Also add selftests that checks the verifier enforces the NULL pointer check. Signed-off-by: Song Liu Reviewed-by: Matt Bobrowski Link: https://lore.kernel.org/r/20250613052857.1992233-1-song@kernel.org Signed-off-by: Alexei Starovoitov commit 8e786a85c0a3c0fffae6244733fb576eeabd9dec Author: Borislav Petkov (AMD) Date: Mon Apr 14 15:33:19 2025 +0200 x86/process: Move the buffer clearing before MONITOR Move the VERW clearing before the MONITOR so that VERW doesn't disarm it and the machine never enters C1. Original idea by Kim Phillips . Suggested-by: Andrew Cooper Signed-off-by: Borislav Petkov (AMD) commit 2329f250e04d3b8e78b36a68b9880ca7750a07ef Author: Borislav Petkov (AMD) Date: Thu Mar 27 12:23:55 2025 +0100 x86/microcode/AMD: Add TSA microcode SHAs Signed-off-by: Borislav Petkov (AMD) commit 31272abd5974b38ba312e9cf2ec2f09f9dd7dcba Author: Borislav Petkov (AMD) Date: Wed Sep 11 11:00:50 2024 +0200 KVM: SVM: Advertise TSA CPUID bits to guests Synthesize the TSA CPUID feature bits for guests. Set TSA_{SQ,L1}_NO on unaffected machines. Signed-off-by: Borislav Petkov (AMD) commit d8010d4ba43e9f790925375a7de100604a5e2dba Author: Borislav Petkov (AMD) Date: Wed Sep 11 10:53:08 2024 +0200 x86/bugs: Add a Transient Scheduler Attacks mitigation Add the required features detection glue to bugs.c et all in order to support the TSA mitigation. Co-developed-by: Kim Phillips Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Pawan Gupta commit 7b4ac12cc929e281cf7edc22203e0533790ebc2b Author: Sebastian Andrzej Siewior Date: Fri Jun 13 14:36:29 2025 +0200 openvswitch: Allocate struct ovs_pcpu_storage dynamically PERCPU_MODULE_RESERVE defines the maximum size that can by used for the per-CPU data size used by modules. This is 8KiB. Commit 035fcdc4d240c ("openvswitch: Merge three per-CPU structures into one") restructured the per-CPU memory allocation for the module and moved the separate alloc_percpu() invocations at module init time to a static per-CPU variable which is allocated by the module loader. The size of the per-CPU data section for openvswitch is 6488 bytes which is ~80% of the available per-CPU memory. Together with a few other modules it is easy to exhaust the available 8KiB of memory. Allocate ovs_pcpu_storage dynamically at module init time. Reported-by: Gal Pressman Closes: https://lore.kernel.org/all/c401e017-f8db-4f57-a1cd-89beb979a277@nvidia.com Fixes: 035fcdc4d240c ("openvswitch: Merge three per-CPU structures into one") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Aaron Conole Link: https://patch.msgid.link/20250613123629.-XSoQTCu@linutronix.de Signed-off-by: Paolo Abeni commit f2320f1dd6f6f82cb2c7aff23a12bab537bdea89 Author: Jens Axboe Date: Tue Jun 17 06:43:18 2025 -0600 io_uring/sqpoll: don't put task_struct on tctx setup failure A recent commit moved the error handling of sqpoll thread and tctx failures into the thread itself, as part of fixing an issue. However, it missed that tctx allocation may also fail, and that io_sq_offload_create() does its own error handling for the task_struct in that case. Remove the manual task putting in io_sq_offload_create(), as io_sq_thread() will notice that the tctx did not get setup and hence it should put itself and exit. Reported-by: syzbot+763e12bbf004fb1062e4@syzkaller.appspotmail.com Fixes: ac0b8b327a56 ("io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo()") Signed-off-by: Jens Axboe commit 91a7703a036b146481b8a0bd6efa6200d296ca5d Author: Jens Axboe Date: Tue Jun 17 06:41:48 2025 -0600 io_uring: remove duplicate io_uring_alloc_task_context() definition This function exists in both tctx.h (where it belongs) and in io_uring.h as a remnant of before the tctx handling code got split out. Remove the io_uring.h definition and ensure that sqpoll.c includes the tctx.h header to get the definition. Signed-off-by: Jens Axboe commit 109f4d29dade8ae5b4ac6325af9d1bc24b4230f8 Author: David Thompson Date: Fri Jun 13 21:46:08 2025 +0000 platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment Fix warnings reported by sparse, related to incorrect type: drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: warning: incorrect type in assignment (different base types) drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: expected restricted __virtio32 [usertype] len drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: got unsigned long Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404040339.S7CUIgf3-lkp@intel.com/ Fixes: 78034cbece79 ("platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors") Signed-off-by: David Thompson Link: https://lore.kernel.org/r/20250613214608.2250130-1-davthompson@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c8892c2a5b27d4026cda60409c393ba0d6c88df9 Author: Ivan Hu Date: Mon Jun 16 15:48:19 2025 +0800 platform/x86: portwell-ec: Move watchdog device under correct platform hierarchy Without explicitly setting a parent for the watchdog device, the device is registered with a NULL parent. This causes device_add() (called internally by devm_watchdog_register_device()) to register the device under /sys/devices/virtual, since no parent is provided. The result is: DEVPATH=/devices/virtual/watchdog/watchdog0 To fix this, assign &pdev->dev as the parent of the watchdog device before calling devm_watchdog_register_device(). This ensures the device is associated with the Portwell EC platform device and placed correctly in sysfs as: DEVPATH=/devices/platform/portwell-ec/watchdog/watchdog0 This aligns the device hierarchy with expectations and avoids misplacement under the virtual class. Fixes: 835796753310 ("platform/x86: portwell-ec: Add GPIO and WDT driver for Portwell EC") Signed-off-by: Ivan Hu Link: https://lore.kernel.org/r/20250616074819.63547-1-ivan.hu@canonical.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d19bac3d4edc4ab92e90d1c6bf68620192254b4b Author: Johannes Berg Date: Tue Jun 17 10:49:01 2025 +0200 wifi: mac80211: don't WARN for late channel/color switch There's really no value in the WARN stack trace etc., the reason for this happening isn't directly related to the calling function anyway. Also, syzbot has been observing it constantly, and there's no way we can resolve it there - those systems are just slow. Instead print an error message (once) and add a comment about what really causes this message. Reported-by: syzbot+468656785707b0e995df@syzkaller.appspotmail.com Reported-by: syzbot+18c783c5cf6a781e3e2c@syzkaller.appspotmail.com Reported-by: syzbot+d5924d5cffddfccab68e@syzkaller.appspotmail.com Reported-by: syzbot+7d73d99525d1ff7752ef@syzkaller.appspotmail.com Reported-by: syzbot+8e6e002c74d1927edaf5@syzkaller.appspotmail.com Reported-by: syzbot+97254a3b10c541879a65@syzkaller.appspotmail.com Reported-by: syzbot+dfd1fd46a1960ad9c6ec@syzkaller.appspotmail.com Reported-by: syzbot+85e0b8d12d9ca877d806@syzkaller.appspotmail.com Link: https://patch.msgid.link/20250617104902.146e10919be1.I85f352ca4a2dce6f556e5ff45ceaa5f3769cb5ce@changeid Signed-off-by: Johannes Berg commit d1b1a5eb27c4948e8811cf4dbb05aaf3eb10700c Author: Johannes Berg Date: Mon Jun 16 17:18:38 2025 +0200 wifi: mac80211: drop invalid source address OCB frames In OCB, don't accept frames from invalid source addresses (and in particular don't try to create stations for them), drop the frames instead. Reported-by: syzbot+8b512026a7ec10dcbdd9@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6788d2d9.050a0220.20d369.0028.GAE@google.com/ Signed-off-by: Johannes Berg Tested-by: syzbot+8b512026a7ec10dcbdd9@syzkaller.appspotmail.com Link: https://patch.msgid.link/20250616171838.7433379cab5d.I47444d63c72a0bd58d2e2b67bb99e1fea37eec6f@changeid Signed-off-by: Johannes Berg commit a85b8544d46390469b6ca72d6bfd3ecb7be985ff Author: Johannes Berg Date: Sat Jun 14 00:30:37 2025 +0200 wifi: remove zero-length arrays All of these are really meant to be variable-length, and in the case of s1g_beacon it's actually accessed. Make that one in particular, and a couple of others (that aren't used as arrays now), actually variable. Reported-by: syzbot+fd222bb38e916df26fa4@syzkaller.appspotmail.com Fixes: 1e1f706fc2ce ("wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements") Link: https://patch.msgid.link/20250614003037.a3e82e882251.I2e8b58e56ff2a9f8b06c66f036578b7c1d4e4685@changeid Signed-off-by: Johannes Berg commit cffc873d68ab09a0432b8212008c5613f8a70a2c Author: Justin Sanders Date: Tue Jun 10 17:06:00 2025 +0000 aoe: defer rexmit timer downdev work to workqueue When aoe's rexmit_timer() notices that an aoe target fails to respond to commands for more than aoe_deadsecs, it calls aoedev_downdev() which cleans the outstanding aoe and block queues. This can involve sleeping, such as in blk_mq_freeze_queue(), which should not occur in irq context. This patch defers that aoedev_downdev() call to the aoe device's workqueue. Link: https://bugzilla.kernel.org/show_bug.cgi?id=212665 Signed-off-by: Justin Sanders Link: https://lore.kernel.org/r/20250610170600.869-2-jsanders.devel@gmail.com Tested-By: Valentin Kleibel Signed-off-by: Jens Axboe commit 7f90d45e57cb2ef1f0adcaf925ddffdfc5e680ca Author: Justin Sanders Date: Tue Jun 10 17:05:59 2025 +0000 aoe: clean device rq_list in aoedev_downdev() An aoe device's rq_list contains accepted block requests that are waiting to be transmitted to the aoe target. This queue was added as part of the conversion to blk_mq. However, the queue was not cleaned out when an aoe device is downed which caused blk_mq_freeze_queue() to sleep indefinitely waiting for those requests to complete, causing a hang. This fix cleans out the queue before calling blk_mq_freeze_queue(). Link: https://bugzilla.kernel.org/show_bug.cgi?id=212665 Fixes: 3582dd291788 ("aoe: convert aoeblk to blk-mq") Signed-off-by: Justin Sanders Link: https://lore.kernel.org/r/20250610170600.869-1-jsanders.devel@gmail.com Tested-By: Valentin Kleibel Signed-off-by: Jens Axboe commit 9a816ebeb573eddc2ed079dd4ea57a8d831c176c Merge: 614b1c3cbfb0ec 903cc7096db22f Author: Wolfram Sang Date: Tue Jun 17 12:32:54 2025 +0200 Merge tag 'i2c-host-fixes-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.16-rc2 tegra: fix YAML conversion of device tree bindings commit a7b3b77fd111d49f8e25624e4ea1046322a57baf Author: Mikko Korhonen Date: Tue Jun 17 09:18:41 2025 +0300 ata: ahci: Disallow LPM for Asus B550-F motherboard Asus ROG STRIX B550-F GAMING (WI-FI) motherboard has problems on some SATA ports with at least one hard drive model (WDC WD20EFAX-68FB5N0) when LPM is enabled. Disabling LPM solves the issue. Cc: stable@vger.kernel.org Fixes: 7627a0edef54 ("ata: ahci: Drop low power policy board type") Signed-off-by: Mikko Korhonen Link: https://lore.kernel.org/r/20250617062055.784827-1-mjkorhon@gmail.com [cassel: more detailed comment, make single line comments consistent] Signed-off-by: Niklas Cassel commit 0a1db19f66c0960eb00e1f2ccd40708b6747f5b1 Author: Sascha Hauer Date: Mon Jun 16 15:45:03 2025 +0200 gpio: pca953x: fix wrong error probe return value The second argument to dev_err_probe() is the error value. Pass the return value of devm_request_threaded_irq() there instead of the irq number. Signed-off-by: Sascha Hauer Fixes: c47f7ff0fe61 ("gpio: pca953x: Utilise dev_err_probe() where it makes sense") Link: https://lore.kernel.org/r/20250616134503.1201138-1-s.hauer@pengutronix.de Signed-off-by: Bartosz Golaszewski commit 2e7be162996640bbe3b6da694cc064c511b8a5d9 Author: Anup Patel Date: Thu Jun 5 11:44:47 2025 +0530 RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs The SBI specification clearly states that SBI HFENCE calls should return SBI_ERR_NOT_SUPPORTED when one of the target hart doesn’t support hypervisor extension (aka nested virtualization in-case of KVM RISC-V). Fixes: c7fa3c48de86 ("RISC-V: KVM: Treat SBI HFENCE calls as NOPs") Reviewed-by: Atish Patra Signed-off-by: Anup Patel Link: https://lore.kernel.org/r/20250605061458.196003-3-apatel@ventanamicro.com Signed-off-by: Anup Patel commit 6aba0cb5bba6141158d5449f2cf53187b7f755f9 Author: Anup Patel Date: Thu Jun 5 11:44:46 2025 +0530 RISC-V: KVM: Fix the size parameter check in SBI SFENCE calls As-per the SBI specification, an SBI remote fence operation applies to the entire address space if either: 1) start_addr and size are both 0 2) size is equal to 2^XLEN-1 >From the above, only #1 is checked by SBI SFENCE calls so fix the size parameter check in SBI SFENCE calls to cover #2 as well. Fixes: 13acfec2dbcc ("RISC-V: KVM: Add remote HFENCE functions based on VCPU requests") Reviewed-by: Atish Patra Signed-off-by: Anup Patel Link: https://lore.kernel.org/r/20250605061458.196003-2-apatel@ventanamicro.com Signed-off-by: Anup Patel commit 6c4897caefc8e4c6f2bf08f8317b955672667909 Author: Kent Overstreet Date: Mon Jun 16 20:08:23 2025 -0400 bcachefs: Fix bch2_read_bio_to_text() We can only pass negative error codes to bch2_err_str(); if it's a positive integer it's not an error and we trip an assert. Signed-off-by: Kent Overstreet commit 61ee19dedb8d753249e20308782bf4e9e2fb7344 Author: Maíra Canal Date: Mon Jun 2 10:22:16 2025 -0300 drm/etnaviv: Protect the scheduler's pending list with its lock Commit 704d3d60fec4 ("drm/etnaviv: don't block scheduler when GPU is still active") ensured that active jobs are returned to the pending list when extending the timeout. However, it didn't use the pending list's lock to manipulate the list, which causes a race condition as the scheduler's workqueues are running. Hold the lock while manipulating the scheduler's pending list to prevent a race. Cc: stable@vger.kernel.org Fixes: 704d3d60fec4 ("drm/etnaviv: don't block scheduler when GPU is still active") Reported-by: Philipp Stanner Closes: https://lore.kernel.org/dri-devel/964e59ba1539083ef29b06d3c78f5e2e9b138ab8.camel@mailbox.org/ Reviewed-by: Lucas Stach Reviewed-by: Philipp Stanner Link: https://lore.kernel.org/r/20250602132240.93314-1-mcanal@igalia.com Signed-off-by: Maíra Canal commit 495ba899d5a163d4cd50627ab48e3edd80dfa3a4 Author: Kent Overstreet Date: Mon Jun 16 16:16:38 2025 -0400 bcachefs: fsck: Fix check_path_loop() + snapshots A path exists in a particular snapshot: we should do the pathwalk in the snapshot ID of the inode we started from, _not_ change snapshot ID as we walk inodes and dirents. Signed-off-by: Kent Overstreet commit 583ba52a40dd1f9328e2626056f0797d273817e7 Author: Kent Overstreet Date: Mon Jun 16 16:15:41 2025 -0400 bcachefs: fsck: check_subdir_count logs path We can easily go from inode number -> path now, which makes for more useful log messages. Signed-off-by: Kent Overstreet commit 8d6ac82361df55d223186d8cd2ce884310ee5e6b Author: Kent Overstreet Date: Mon Jun 16 16:14:59 2025 -0400 bcachefs: fsck: additional diagnostics for reattach_inode() Log the inode's new path. Signed-off-by: Kent Overstreet commit 3e5ceaa5bfd71ae94d736426f8a27391023182ff Author: Kent Overstreet Date: Mon Jun 16 16:13:02 2025 -0400 bcachefs: fsck: check_directory_structure runs in reverse order When we find a directory connectivity problem, we should do the repair in the oldest snapshot that has the issue - so that we don't end up duplicating work or making a real mess of things. Oldest snapshot IDs have the highest integer value, so - just walk inodes in reverse order. Signed-off-by: Kent Overstreet commit 9fb09ace59b2beab312ec225630ce87ddbec6d79 Author: Kent Overstreet Date: Mon Jun 16 14:41:27 2025 -0400 bcachefs: fsck: Fix reattach_inode() for subvol roots bch_subvolume.fs_path_parent needs to be updated as well, it should match inode.bi_parent_subvol. Signed-off-by: Kent Overstreet commit c1ca07a4dd1a1ab17ed651729c37b04af9f75ee8 Author: Kent Overstreet Date: Mon Jun 16 14:15:28 2025 -0400 bcachefs: fsck: Fix remove_backpointer() for subvol roots The dirent will be in a different snapshot if the inode is a subvolume root. Signed-off-by: Kent Overstreet commit 7029cc4d13453499a88f512720d26c1a0c4e957b Author: Kent Overstreet Date: Sat Jun 7 19:33:59 2025 -0400 bcachefs: fsck: Print path when we find a subvol loop Signed-off-by: Kent Overstreet commit 9ba6930ef8e0e00102716f4627896e0be6358d7b Author: Kent Overstreet Date: Mon Jun 16 14:00:40 2025 -0400 bcachefs: Fix __bch2_inum_to_path() when crossing subvol boundaries The bch2_subvolume_get_snapshot() call needs to happen before the dirent lookup - the dirent is in the parent subvolume. Also, check for loops. Signed-off-by: Kent Overstreet commit 1cddad0fcbccc7056036f2a83184a3ca5c62f7d3 Author: Kent Overstreet Date: Sun Jun 15 16:43:34 2025 -0400 bcachefs: Call bch2_fs_init_rw() early if we'll be going rw kthread creation checks for pending signals, which is _very_ annoying if we have to do a long recovery and don't go rw until we've done significant work. Check if we'll be going rw and pre-allocate kthreads/workqueues. Signed-off-by: Kent Overstreet commit f2a701fd94f161bdca7537284ba218c20181451e Author: Kent Overstreet Date: Sun Jun 15 12:09:24 2025 -0400 bcachefs: fsck: Improve check_key_has_inode() Print out more info when we find a key (extent, dirent, xattr) for a missing inode - was there a good inode in an older snapshot, full(ish) list of keys for that missing inode, so we can make better decisions on how to repair. If it looks like it should've been deleted, autofix it. If we ever hit the non-autofix cases, we'll want to write more repair code (possibly reconstituting the inode). Signed-off-by: Kent Overstreet commit 03208bd06a61bc2ebc423b6485cbcffecd37af36 Author: Bharadwaj Raju Date: Sun Jun 15 22:15:38 2025 +0530 bcachefs: don't return fsck_fix for unfixable node errors in __btree_err After cd3cdb1ef706 ("Single err message for btree node reads"), all errors caused __btree_err to return -BCH_ERR_fsck_fix no matter what the actual error type was if the recovery pass was scanning for btree nodes. This lead to the code continuing despite things like bad node formats when they earlier would have caused a jump to fsck_err, because btree_err only jumps when the return from __btree_err does not match fsck_fix. Ultimately this lead to undefined behavior by attempting to unpack a key based on an invalid format. Make only errors of type -BCH_ERR_btree_node_read_err_fixable cause __btree_err to return -BCH_ERR_fsck_fix when scanning for btree nodes. Reported-by: syzbot+cfd994b9cdf00446fd54@syzkaller.appspotmail.com Fixes: cd3cdb1ef706 ("bcachefs: Single err message for btree node reads") Signed-off-by: Bharadwaj Raju Signed-off-by: Kent Overstreet commit 56be92c63f02e0f6fd855075acb1471ea1c68539 Author: Alan Huang Date: Sun Jun 15 13:41:22 2025 +0800 bcachefs: Fix pool->alloc NULL pointer dereference btree_interior_update_pool has not been initialized before the filesystem becomes read-write, thus mempool_alloc in bch2_btree_update_start will trigger pool->alloc NULL pointer dereference in mempool_alloc_noprof Reported-by: syzbot+2f3859bd28f20fa682e6@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit d89a34b14df5c205de698c23c3950b2b947cdb97 Author: Alan Huang Date: Sat Jun 14 17:18:07 2025 +0800 bcachefs: Move bset size check before csum check In syzbot's crash, the bset's u64s is larger than the btree node. Reported-by: syzbot+bfaeaa8e26281970158d@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 7c9cef5f8bf10a803fd0937ea071a93778f1108a Author: Kent Overstreet Date: Fri Jun 13 18:01:25 2025 -0400 bcachefs: mark more errors autofix Signed-off-by: Kent Overstreet commit 10dfe4926de30b550913409d107005278ab47911 Author: Kent Overstreet Date: Fri Jun 13 20:06:33 2025 -0400 bcachefs: Kill unused tracepoints Dead code cleanup. Link: https://lore.kernel.org/linux-bcachefs/20250612224059.39fddd07@batman.local.home/ Signed-off-by: Kent Overstreet commit 17c3395e25f7db23fa5758c257a372d410d16cfd Author: Kent Overstreet Date: Sat Jun 7 19:16:12 2025 -0400 bcachefs: opts.journal_rewind Add a mount option for rewinding the journal, bringing the entire filesystem to where it was at a previous point in time. This is for extreme disaster recovery scenarios - it's not intended as an undelete operation. The option takes a journal sequence number; the desired sequence number can be determined with 'bcachefs list_journal' Caveats: - The 'journal_transaction_names' option must have been enabled (it's on by default). The option controls emitting of extra debug info in the journal, so we can see what individual transactions were doing; It also enables journalling of keys being overwritten, which is what we rely on here. - A full fsck run will be automatically triggered since alloc info will be inconsistent. Only leaf node updates to non-alloc btrees are rewound, since rewinding interior btree updates isn't possible or desirable. - We can't do anything about data that was deleted and overwritten. Lots of metadata updates after the point in time we're rewinding to shouldn't cause a problem, since we segragate data and metadata allocations (this is in order to make repair by btree node scan practical on larger filesystems; there's a small 64-bit per device bitmap in the superblock of device ranges with btree nodes, and we try to keep this small). However, having discards enabled will cause problems, since buckets are discarded as soon as they become empty (this is why we don't implement fstrim: we don't need it). Hopefully, this feature will be a one-off thing that's never used again: this was implemented for recovering from the "vfs i_nlink 0 -> subvol deletion" bug, and that bug was unusually disastrous and additional safeguards have since been implemented. But if it does turn out that we need this more in the future, I'll have to implement an option so that empty buckets aren't discarded immediately - lagging by perhaps 1% of device capacity. Signed-off-by: Kent Overstreet commit 86c8db86af43f52f682e53a0f2f0828683be1e52 Author: Stephen Smalley Date: Fri Jun 13 15:37:05 2025 -0400 selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len We should count the terminating NUL byte as part of the ctx_len. Otherwise, UBSAN logs a warning: UBSAN: array-index-out-of-bounds in security/selinux/xfrm.c:99:14 index 60 is out of range for type 'char [*]' The allocation itself is correct so there is no actual out of bounds indexing, just a warning. Cc: stable@vger.kernel.org Suggested-by: Christian Göttsche Link: https://lore.kernel.org/selinux/CAEjxPJ6tA5+LxsGfOJokzdPeRomBHjKLBVR6zbrg+_w3ZZbM3A@mail.gmail.com/ Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit e1bc3a13bd775791cca0bb144d977b00f3598042 Author: Maíra Canal Date: Mon Jun 2 12:14:02 2025 -0300 drm/v3d: Avoid NULL pointer dereference in `v3d_job_update_stats()` The following kernel Oops was recently reported by Mesa CI: [ 800.139824] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000588 [ 800.148619] Mem abort info: [ 800.151402] ESR = 0x0000000096000005 [ 800.155141] EC = 0x25: DABT (current EL), IL = 32 bits [ 800.160444] SET = 0, FnV = 0 [ 800.163488] EA = 0, S1PTW = 0 [ 800.166619] FSC = 0x05: level 1 translation fault [ 800.171487] Data abort info: [ 800.174357] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 800.179832] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 800.184873] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 800.190176] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001014c2000 [ 800.196607] [0000000000000588] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 800.205305] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP [ 800.211564] Modules linked in: vc4 snd_soc_hdmi_codec drm_display_helper v3d cec gpu_sched drm_dma_helper drm_shmem_helper drm_kms_helper drm drm_panel_orientation_quirks snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm i2c_brcmstb snd_timer snd backlight [ 800.234448] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.25+rpt-rpi-v8 #1 Debian 1:6.12.25-1+rpt1 [ 800.244182] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [ 800.250005] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 800.256959] pc : v3d_job_update_stats+0x60/0x130 [v3d] [ 800.262112] lr : v3d_job_update_stats+0x48/0x130 [v3d] [ 800.267251] sp : ffffffc080003e60 [ 800.270555] x29: ffffffc080003e60 x28: ffffffd842784980 x27: 0224012000000000 [ 800.277687] x26: ffffffd84277f630 x25: ffffff81012fd800 x24: 0000000000000020 [ 800.284818] x23: ffffff8040238b08 x22: 0000000000000570 x21: 0000000000000158 [ 800.291948] x20: 0000000000000000 x19: ffffff8040238000 x18: 0000000000000000 [ 800.299078] x17: ffffffa8c1bd2000 x16: ffffffc080000000 x15: 0000000000000000 [ 800.306208] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [ 800.313338] x11: 0000000000000040 x10: 0000000000001a40 x9 : ffffffd83b39757c [ 800.320468] x8 : ffffffd842786420 x7 : 7fffffffffffffff x6 : 0000000000ef32b0 [ 800.327598] x5 : 00ffffffffffffff x4 : 0000000000000015 x3 : ffffffd842784980 [ 800.334728] x2 : 0000000000000004 x1 : 0000000000010002 x0 : 000000ba4c0ca382 [ 800.341859] Call trace: [ 800.344294] v3d_job_update_stats+0x60/0x130 [v3d] [ 800.349086] v3d_irq+0x124/0x2e0 [v3d] [ 800.352835] __handle_irq_event_percpu+0x58/0x218 [ 800.357539] handle_irq_event+0x54/0xb8 [ 800.361369] handle_fasteoi_irq+0xac/0x240 [ 800.365458] handle_irq_desc+0x48/0x68 [ 800.369200] generic_handle_domain_irq+0x24/0x38 [ 800.373810] gic_handle_irq+0x48/0xd8 [ 800.377464] call_on_irq_stack+0x24/0x58 [ 800.381379] do_interrupt_handler+0x88/0x98 [ 800.385554] el1_interrupt+0x34/0x68 [ 800.389123] el1h_64_irq_handler+0x18/0x28 [ 800.393211] el1h_64_irq+0x64/0x68 [ 800.396603] default_idle_call+0x3c/0x168 [ 800.400606] do_idle+0x1fc/0x230 [ 800.403827] cpu_startup_entry+0x40/0x50 [ 800.407742] rest_init+0xe4/0xf0 [ 800.410962] start_kernel+0x5e8/0x790 [ 800.414616] __primary_switched+0x80/0x90 [ 800.418622] Code: 8b170277 8b160296 11000421 b9000861 (b9401ac1) [ 800.424707] ---[ end trace 0000000000000000 ]--- [ 800.457313] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- This issue happens when the file descriptor is closed before the jobs submitted by it are completed. When the job completes, we update the global GPU stats and the per-fd GPU stats, which are exposed through fdinfo. If the file descriptor was closed, then the struct `v3d_file_priv` and its stats were already freed and we can't update the per-fd stats. Therefore, if the file descriptor was already closed, don't update the per-fd GPU stats, only update the global ones. Cc: stable@vger.kernel.org # v6.12+ Reviewed-by: Jose Maria Casanova Crespo Link: https://lore.kernel.org/r/20250602151451.10161-1-mcanal@igalia.com Signed-off-by: Maíra Canal commit 2a8a5a5dd06eef580f9818567773fd75057cb875 Author: Vitaliy Shevtsov Date: Thu Jun 12 21:35:18 2025 +0500 scsi: elx: efct: Fix memory leak in efct_hw_parse_filter() strsep() modifies the address of the pointer passed to it so that it no longer points to the original address. This means kfree() gets the wrong pointer. Fix this by passing unmodified pointer returned from kstrdup() to kfree(). Found by Linux Verification Center (linuxtesting.org) with Svace. Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Signed-off-by: Vitaliy Shevtsov Link: https://lore.kernel.org/r/20250612163616.24298-1-v.shevtsov@mt-integration.ru Reviewed-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 1224b218a4b9203656ecc932152f4c81a97b4fcc Author: Simon Horman Date: Fri Jun 13 17:46:20 2025 +0100 pldmfw: Select CRC32 when PLDMFW is selected pldmfw calls crc32 code and depends on it being enabled, else there is a link error as follows. So PLDMFW should select CRC32. lib/pldmfw/pldmfw.o: In function `pldmfw_flash_image': pldmfw.c:(.text+0x70f): undefined reference to `crc32_le_base' This problem was introduced by commit b8265621f488 ("Add pldmfw library for PLDM firmware update"). It manifests as of commit d69ea414c9b4 ("ice: implement device flash update via devlink"). And is more likely to occur as of commit 9ad19171b6d6 ("lib/crc: remove unnecessary prompt for CONFIG_CRC32 and drop 'default y'"). Found by chance while exercising builds based on tinyconfig. Fixes: b8265621f488 ("Add pldmfw library for PLDM firmware update") Signed-off-by: Simon Horman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250613-pldmfw-crc32-v1-1-f3fad109eee6@kernel.org Signed-off-by: Jakub Kicinski commit b2e673ae53ef4b943f68585207a5f21cfc9a0714 Author: Avadhut Naik Date: Fri Jun 13 00:51:35 2025 +0000 EDAC/amd64: Correct number of UMCs for family 19h models 70h-7fh AMD's Family 19h-based Models 70h-7fh support 4 unified memory controllers (UMC) per processor die. The amd64_edac driver, however, assumes only 2 UMCs are supported since max_mcs variable for the models has not been explicitly set to 4. The same results in incomplete or incorrect memory information being logged to dmesg by the module during initialization in some instances. Fixes: 6c79e42169fe ("EDAC/amd64: Add support for ECC on family 19h model 60h-7Fh") Closes: https://lore.kernel.org/all/27dc093f-ce27-4c71-9e81-786150a040b6@reox.at/ Reported-by: reox Signed-off-by: Avadhut Naik Signed-off-by: Borislav Petkov (AMD) Cc: stable@kernel.org Link: https://lore.kernel.org/20250613005233.2330627-1-avadhut.naik@amd.com commit 9d4204a8106fe7dc80e3f2e440c8f2ba1ba47319 Author: Eric Biggers Date: Sun Jun 15 18:06:54 2025 -0700 lib/crypto/poly1305: Fix arm64's poly1305_blocks_arch() For some reason arm64's Poly1305 code got changed to ignore the padbit argument. As a result, the output is incorrect when the message length is not a multiple of 16 (which is not reached with the standard ChaCha20Poly1305, but bcachefs could reach this). Fix this. Fixes: a59e5468a921 ("crypto: arm64/poly1305 - Add block-only interface") Reported-by: Kent Overstreet Tested-by: Kent Overstreet Link: https://lore.kernel.org/r/20250616010654.367302-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 594902c986e269660302f09df9ec4bf1cf017b77 Author: Qinyun Tan Date: Sat May 31 02:20:53 2025 +0800 x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem In the resctrl subsystem's Sub-NUMA Cluster (SNC) mode, the rdt_mon_domain structure representing a NUMA node relies on the cacheinfo interface (rdt_mon_domain::ci) to store L3 cache information (e.g., shared_cpu_map) for monitoring. The L3 cache information of a SNC NUMA node determines which domains are summed for the "top level" L3-scoped events. rdt_mon_domain::ci is initialized using the first online CPU of a NUMA node. When this CPU goes offline, its shared_cpu_map is cleared to contain only the offline CPU itself. Subsequently, attempting to read counters via smp_call_on_cpu(offline_cpu) fails (and error ignored), returning zero values for "top-level events" without any error indication. Replace the cacheinfo references in struct rdt_mon_domain and struct rmid_read with the cacheinfo ID (a unique identifier for the L3 cache). rdt_domain_hdr::cpu_mask contains the online CPUs associated with that domain. When reading "top-level events", select a CPU from rdt_domain_hdr::cpu_mask and utilize its L3 shared_cpu_map to determine valid CPUs for reading RMID counter via the MSR interface. Considering all CPUs associated with the L3 cache improves the chances of picking a housekeeping CPU on which the counter reading work can be queued, avoiding an unnecessary IPI. Fixes: 328ea68874642 ("x86/resctrl: Prepare for new Sub-NUMA Cluster (SNC) monitor files") Signed-off-by: Qinyun Tan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Tony Luck Link: https://lore.kernel.org/20250530182053.37502-2-qinyuntan@linux.alibaba.com commit 9afe652958c3ee88f24df1e4a97f298afce89407 Merge: 44a5ab7a7958fb 7cd9a11dd0c3d1 Author: Linus Torvalds Date: Mon Jun 16 11:36:21 2025 -0700 Merge tag 'x86_urgent_for_6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Dave Hansen: "This is a pretty scattered set of fixes. The majority of them are further fixups around the recent ITS mitigations. The rest don't really have a coherent story: - Some flavors of Xen PV guests don't support large pages, but the set_memory.c code assumes all CPUs support them. Avoid problems with a quick CPU feature check. - The TDX code has some wrappers to help retry calls to the TDX module. They use function pointers to assembly functions and the compiler usually generates direct CALLs. But some new compilers, plus -Os turned them in to indirect CALLs and the assembly code was not annotated for indirect calls. Force inlining of the helper to fix it up. - Last, a FRED issue showed up when single-stepping. It's fine when using an external debugger, but was getting stuck returning from a SIGTRAP handler otherwise. Clear the FRED 'swevent' bit to ensure that forward progress is made" * tag 'x86_urgent_for_6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "mm/execmem: Unify early execmem_cache behaviour" x86/its: explicitly manage permissions for ITS pages x86/its: move its_pages array to struct mod_arch_specific x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set x86/mm/pat: don't collapse pages without PSE set x86/virt/tdx: Avoid indirect calls to TDX assembly functions selftests/x86: Add a test to detect infinite SIGTRAP handler loop x86/fred/signal: Prevent immediate repeat of single step trap on return from SIGTRAP handler commit d8ab68bdb294b09a761e967dad374f2965e1913f Author: Maurizio Lombardi Date: Thu Jun 12 12:15:56 2025 +0200 scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() The function core_scsi3_decode_spec_i_port(), in its error code path, unconditionally calls core_scsi3_lunacl_undepend_item() passing the dest_se_deve pointer, which may be NULL. This can lead to a NULL pointer dereference if dest_se_deve remains unset. SPC-3 PR SPEC_I_PT: Unable to locate dest_tpg Unable to handle kernel paging request at virtual address dfff800000000012 Call trace: core_scsi3_lunacl_undepend_item+0x2c/0xf0 [target_core_mod] (P) core_scsi3_decode_spec_i_port+0x120c/0x1c30 [target_core_mod] core_scsi3_emulate_pro_register+0x6b8/0xcd8 [target_core_mod] target_scsi3_emulate_pr_out+0x56c/0x840 [target_core_mod] Fix this by adding a NULL check before calling core_scsi3_lunacl_undepend_item() Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20250612101556.24829-1-mlombard@redhat.com Reviewed-by: Mike Christie Reviewed-by: John Meneghini Signed-off-by: Martin K. Petersen commit 6143374c6dc874d301dc16612aed144bf4544bae Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 17:58:05 2025 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 159013a7ca18c271 ("x86/its: Enumerate Indirect Target Selection (ITS) bug") f4138de5e41fae1a ("x86/msr: Standardize on u64 in ") ec980e4facef8110 ("perf/x86/intel: Support auto counter reload") That cause no changes to tooling as it doesn't include a new MSR to be captured by the tools/perf/trace/beauty/tracepoints/x86_msr.sh script. Just silences this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Cc: Adrian Hunter Cc: Dave Hansen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Pawan Gupta Cc: Peter Zijlstra Link: https://lore.kernel.org/r/aEtAUg83OQGx8Kay@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 3417404c6f83c5d72d69ae81ded914bdc3841a49 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 12:53:37 2025 -0300 tools headers: Syncronize linux/build_bug.h with the kernel sources To pick up the changes in: 243c90e917f5cfc9 ("build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO()") This also needed to pick the __BUILD_BUG_ON_ZERO_MSG() in linux/compiler.h, that needed to be polished to avoid hitting old clang problems with _Static_assert on arrays of structs: Debian clang version 11.0.1-2~deb10u1 Debian clang version 11.0.1-2~deb10u1 $ make NO_LIBTRACEEVENT=1 ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf CC=clang btf_dump.c:895:18: error: type name does not allow storage class to be specified for (i = 0; i < ARRAY_SIZE(pads); i++) { ^ /git/perf-6.16.0-rc1/tools/include/linux/kernel.h:91:59: note: expanded from macro 'ARRAY_SIZE' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^ /git/perf-6.16.0-rc1/tools/include/linux/compiler-gcc.h:26:28: note: expanded from macro '__must_be_array' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^ /git/perf-6.16.0-rc1/tools/include/linux/build_bug.h:17:2: note: expanded from macro 'BUILD_BUG_ON_ZERO' __BUILD_BUG_ON_ZERO_MSG(e, ##__VA_ARGS__, #e " is true") ^ /git/perf-6.16.0-rc1/tools/include/linux/compiler.h:248:67: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) ^ /usr/include/x86_64-linux-gnu/sys/cdefs.h:438:5: note: expanded from macro '_Static_assert' extern int (*__Static_assert_function (void)) \ ^ These also failed: toolsbuilder@five:~$ grep FAIL dm.log/summary | grep clang 1 72.87 almalinux:8 : FAIL clang version 19.1.7 ( 19.1.7-2.module_el8.10.0+3990+33d0d926) 15 73.39 centos:stream : FAIL clang version 17.0.6 (Red Hat 17.0.6-1.module_el8+767+9fa966b8) 36 87.14 opensuse:15.4 : FAIL clang version 15.0.7 37 80.08 opensuse:15.5 : FAIL clang version 15.0.7 40 72.12 oraclelinux:8 : FAIL clang version 16.0.6 (Red Hat 16.0.6-2.0.1.module+el8.9.0+90129+d3ee8717) 42 74.12 rockylinux:8 : FAIL clang version 16.0.6 (Red Hat 16.0.6-2.module+el8.9.0+1651+e10a8f6d) toolsbuilder@five:~$ This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/linux/build_bug.h include/linux/build_bug.h Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Vincent Mailhol Cc: Yury Norov Link: https://lore.kernel.org/r/aEszb7SSIJB6Lp6f@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 00c8fde72fe2cdbd3892fbdc338c2d3a66ec8db3 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 12:29:23 2025 -0300 tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' Also add SYM_PIC_ALIAS() to tools/perf/util/include/linux/linkage.h. This is to get the changes from: 419cbaf6a56a6e4b ("x86/boot: Add a bunch of PIC aliases") That addresses these perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Adrian Hunter Cc: Ard Biesheuvel Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/aEry7L3fibwIG5au@x1 Signed-off-by: Arnaldo Carvalho de Melo commit aa69783a5920d5924d95a198917fa3dd9c2c84a3 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 12:08:45 2025 -0300 tools headers UAPI: Sync linux/kvm.h with the kernel sources To pick the changes in: 5b9db9c16f428ada ("RISC-V: KVM: add KVM_CAP_RISCV_MP_STATE_RESET") a7484c80e5ca1ae0 ("KVM: arm64: Allow userspace to request KVM_ARM_VCPU_EL2*") 79462faa2b2aa89d ("KVM: TDX: Handle TDG.VP.VMCALL") That just rebuilds perf, as these patches don't add any new KVM ioctl to be harvested for the the 'perf trace' ioctl syscall argument beautifiers. This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Adrian Hunter Cc: Anup Patel Cc: Binbin Wu Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Marc Zyngier Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Radim Krčmář Link: https://lore.kernel.org/r/aEruUUJvR0bfCg7_@x1 Signed-off-by: Arnaldo Carvalho de Melo commit c71bc5995409395d5c9094144534912886fd09a7 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 12:03:28 2025 -0300 tools headers UAPI: Sync the drm/drm.h with the kernel sources Picking the changes from: c2d3a730069545f2 ("drm/syncobj: Extend EXPORT_SYNC_FILE for timeline syncobjs") Silencing these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h No changes in tooling as these are just C comment documentation changes: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/drm.h tools/include/uapi/drm/drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after $ Cc: Adrian Hunter Cc: Christian König Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Rob Clark Link: https://lore.kernel.org/r/aErtHs3T2hdPjjHx@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 47684bfb7c3405aa8f7bfb31f2aa642ffd2b640f Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 11:55:54 2025 -0300 perf beauty: Update copy of linux/socket.h with the kernel sources To pick the changes in: b1e904999542ad67 ("net: pass const to msg_data_left()") That don't result in any changes in the tables generated from that header. This silences this perf build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Please see tools/include/uapi/README for details. Cc: Adrian Hunter Cc: Breno Leitao Cc: Ian Rogers Cc: Jakub Kicinski Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/aErrK24XLUILFH_P@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 8fc50bec411e9cc7bba441dc6f7de9af30ea9cbb Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 11:31:41 2025 -0300 tools headers UAPI: Sync kvm header with the kernel sources To pick the changes in: c9c1e20b4c7d60fa ("KVM: x86: Introduce Intel specific quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT") 012426d6f59cab21 ("KVM: TDX: Finalize VM initialization") c846b451d3c5d4ba ("KVM: TDX: Add an ioctl to create initial guest memory") 488808e682e72bdb ("KVM: x86: Introduce KVM_TDX_GET_CPUID") a50f673f25e0ba2b ("KVM: TDX: Do TDX specific vcpu initialization") 0186dd29a251866d ("KVM: TDX: add ioctl to initialize VM with TDX specific parameters") 61bb28279623b636 ("KVM: TDX: Get system-wide info about TDX module on initialization") b2aaf38ced6905b8 ("KVM: TDX: Add place holder for TDX VM specific mem_enc_op ioctl") This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Please see tools/include/uapi/README for further details. Cc: Adrian Hunter Cc: Ian Rogers Cc: Isaku Yamahata Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Xiaoyao Li Cc: Yan Zhao Link: https://lore.kernel.org/r/aErqLPktXIzGyS-m@x1 Signed-off-by: Arnaldo Carvalho de Melo commit da845e4bf4587cf4a212b607b6d508b00eab5217 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 10:49:47 2025 -0300 tools headers x86 svm: Sync svm headers with the kernel sources To pick the changes in: 827547bc3a2a2af6 ("KVM: SVM: Add architectural definitions/assets for Bus Lock Threshold") That triggers: CC /tmp/build/perf-tools/arch/x86/util/kvm-stat.o LD /tmp/build/perf-tools/arch/x86/util/perf-util-in.o LD /tmp/build/perf-tools/arch/x86/perf-util-in.o LD /tmp/build/perf-tools/arch/perf-util-in.o LD /tmp/build/perf-tools/perf-util-in.o AR /tmp/build/perf-tools/libperf-util.a LINK /tmp/build/perf-tools/perf The SVM_EXIT_BUS_LOCK exit reason was added to SVM_EXIT_REASONS, used in kvm-stat.c. This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Nikunj A Dadhania Cc: Sean Christopherson Link: https://lore.kernel.org/r/aErcjuTTCVEZ-8Nb@x1 Signed-off-by: Arnaldo Carvalho de Melo commit c30c18709587bba7753f8ee2419bacc9100d6b40 Author: Arnaldo Carvalho de Melo Date: Thu Jun 12 10:44:07 2025 -0300 tools headers UAPI: Sync KVM's vmx.h header with the kernel sources To pick the changes in: 6c441e4d6e729616 ("KVM: TDX: Handle EXIT_REASON_OTHER_SMI") c42856af8f70d983 ("KVM: TDX: Add a place holder for handler of TDX hypercalls (TDG.VP.VMCALL)") That makes 'perf kvm-stat' aware of this new TDCALL exit reason, thus addressing the following perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Isaku Yamahata Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Paolo Bonzini Link: https://lore.kernel.org/r/aErcVn_4plQyODR1@x1 Signed-off-by: Arnaldo Carvalho de Melo commit f1e30a4269f9636ffe6b0556f336633fac524ba7 Author: Arnaldo Carvalho de Melo Date: Tue Jun 10 17:46:03 2025 -0300 tools kvm headers arm64: Update KVM header from the kernel sources To pick the changes from: b7628c7973765c85 ("KVM: arm64: Allow userspace to limit the number of PMU counters for EL2 VMs") That doesn't result in any changes in tooling (built on a Raspberry PI 5 running Debian GNU/Linux 12 (bookworm)), only addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Marc Zyngier Cc: Namhyung Kim Link: https://lore.kernel.org/r/ Signed-off-by: Arnaldo Carvalho de Melo commit 3ce66a48a685f27a931e5bdffb637751c58df7d9 Author: Arnaldo Carvalho de Melo Date: Mon Jun 9 15:02:17 2025 -0300 tools headers UAPI: Sync linux/prctl.h with the kernel sources to pick FUTEX knob To pick the changes in: 63e8595c060a1fef ("futex: Allow to make the private hash immutable") 80367ad01d93ac78 ("futex: Add basic infrastructure for local task local hash") That adds a FUTEX knob: $ tools/perf/trace/beauty/prctl_option.sh > before $ cp include/uapi/linux/prctl.h tools/perf/trace/beauty/include/uapi/linux/prctl.h $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after --- before 2025-06-09 14:50:45.162579336 -0300 +++ after 2025-06-09 14:50:52.797660024 -0300 @@ -72,6 +72,7 @@ [75] = "SET_SHADOW_STACK_STATUS", [76] = "LOCK_SHADOW_STACK_STATUS", [77] = "TIMER_CREATE_RESTORE_IDS", + [78] = "FUTEX_HASH", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ That now will be used to decode the syscall option and also to compose filters, for instance: [root@five ~]# perf trace -e syscalls:sys_enter_prctl --filter option==SET_NAME 0.000 Isolated Servi/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23f13b7aee) 0.032 DOM Worker/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23deb25670) 7.920 :3474328/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fbb10) 7.935 StreamT~s #374/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fb970) 8.400 Isolated Servi/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24bab10) 8.418 StreamT~s #374/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24ba970) ^C[root@five ~]# This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi/linux/prctl.h Acked-by: Sebastian Andrzej Siewior Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/aEiYOtKkrVDT03hZ@x1 Signed-off-by: Arnaldo Carvalho de Melo commit bbeb1088a40b0da8b832d72e05e1c1cb71535712 Author: Namhyung Kim Date: Mon Jun 9 17:57:42 2025 -0700 perf mem: Document new output fields (op, cache, mem, dtlb, snoop) Update the documentation of the new fields with examples and caveats. Also update the related documentation for AMD IBS. Reviewed-by: Ravi Bangoria Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250610005742.2173050-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 11cfaf37d6a79447bde8192e2e3bb2877932b82b Author: Arnaldo Carvalho de Melo Date: Mon Jun 9 12:32:06 2025 -0300 tools headers: Update the fs headers with the kernel sources To pick up changes from: 5d894321c49e6137 ("fs: add atomic write unit max opt to statx") a516403787e08119 ("fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions") c07d3aede2b26830 ("fscrypt: add support for hardware-wrapped keys") These are used to beautify fs syscall arguments, albeit the changes in this update are not affecting those beautifiers. This addresses these tools/ build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/linux/fs.h diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/linux/stat.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Adrian Hunter Cc: Andrei Vagin Cc: Andrew Morton Cc: Andrii Nakryiko Cc: Darrick J. Wong Cc: Eric Biggers Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Liam R. Howlett Cc: Namhyung Kim Link: https://lore.kernel.org/r/aEce1keWdO-vGeqe@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 070b315333ee942f2cc69d02a864945c9bc27ef2 Author: Chun-Tse Shao Date: Wed May 21 15:44:44 2025 -0700 perf test: Restrict uniquifying test to machines with 'uncore_imc' The test would fail if target machine does not have 'uncore_imc' devices. Since event uniquifying behavior is similar among different architectures, we are restricting the test to only run on machines with `uncore_imc` devices. Suggested-by: Ian Rogers Signed-off-by: Chun-Tse Shao Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250521224513.1104129-1-ctshao@google.com [ Skip the test, i.e. return 2, instead of returning 0 as if the test had succeed ] Signed-off-by: Arnaldo Carvalho de Melo commit f9af88a3d384c8b55beb5dc5483e5da0135fadbd Author: Borislav Petkov (AMD) Date: Wed Sep 11 05:13:46 2024 +0200 x86/bugs: Rename MDS machinery to something more generic It will be used by other x86 mitigations. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Pawan Gupta commit 44a5ab7a7958fbf190ae384b8ef252f23b840c1b Merge: fe78e02600f83d ab107276607af9 Author: Linus Torvalds Date: Mon Jun 16 08:49:58 2025 -0700 Merge tag 'powerpc-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Madhavan Srinivasan: - Fix to handle VDSO32 with pcrel - Couple of dts fixes in microwatt and mpc8315erdb - Fix to handle PE bridge reconfiguration in VFIO EEH recovery path - Fix ioctl macros related to struct termio Thanks to Christophe Leroy, Ganesh Goudar, J. Neuschäfer, Justin M. Forbes, Michael Ellerman, Narayana Murty N, Tulio Magno, and Vaibhav Jain * tag 'powerpc-6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Fix struct termio related ioctl macros powerpc: dts: mpc8315erdb: Add GPIO controller node powerpc/microwatt: Fix model property in device tree powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery powerpc/vdso: Fix build of VDSO32 with pcrel commit fe78e02600f83d81e55f6fc352d82c4f264a2901 Merge: e04c78d86a9699 dd2d6b7f6f519d Author: Linus Torvalds Date: Mon Jun 16 08:18:43 2025 -0700 Merge tag 'vfs-6.16-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix a regression in overlayfs caused by reworking the lookup_one*() set of helpers - Make sure that the name of the dentry is printed in overlayfs' mkdir() helper - Add missing iocb values to TRACE_IOCB_STRINGS define - Unlock the superblock during iterate_supers_type(). This was an accidental internal api change - Drop a misleading assert in file_seek_cur_needs_f_lock() helper - Never refuse to return PIDFD_GET_INGO when parent pid is zero That can trivially happen in container scenarios where the parent process might be located in an ancestor pid namespace - Don't revalidate in try_lookup_noperm() as that causes regression for filesystems such as cifs - Fix simple_xattr_list() and reset the err variable after security_inode_listsecurity() got called so as not to confuse userspace about the length of the xattr * tag 'vfs-6.16-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: drop assert in file_seek_cur_needs_f_lock fs: unlock the superblock during iterate_supers_type ovl: fix debug print in case of mkdir error VFS: change try_lookup_noperm() to skip revalidation fs: add missing values to TRACE_IOCB_STRINGS fs/xattr.c: fix simple_xattr_list() ovl: fix regression caused by lookup helpers API changes pidfs: never refuse ppid == 0 in PIDFD_GET_INFO commit 7360ee47599af91a1d5f4e74d635d9408a54e489 Author: Fedor Pchelkin Date: Wed Jun 11 22:20:10 2025 +0300 s390/pkey: Prevent overflow in size calculation for memdup_user() Number of apqn target list entries contained in 'nr_apqns' variable is determined by userspace via an ioctl call so the result of the product in calculation of size passed to memdup_user() may overflow. In this case the actual size of the allocated area and the value describing it won't be in sync leading to various types of unpredictable behaviour later. Use a proper memdup_array_user() helper which returns an error if an overflow is detected. Note that it is different from when nr_apqns is initially zero - that case is considered valid and should be handled in subsequent pkey_handler implementations. Found by Linux Verification Center (linuxtesting.org). Fixes: f2bbc96e7cfa ("s390/pkey: add CCA AES cipher key support") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Reviewed-by: Holger Dengler Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20250611192011.206057-1-pchelkin@ispras.ru Signed-off-by: Alexander Gordeev commit c25892b7a1744355e16281cd24a9b59ec15ec974 Author: Nuno Sá Date: Wed Jun 11 17:26:12 2025 +0100 hwmon: (ltc4282) avoid repeated register write The fault enabled bits were being mistankenly enabled twice in case the FW property is present. Remove one of the writes. Fixes: cbc29538dbf7 ("hwmon: Add driver for LTC4282") Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20250611-fix-ltc4282-repetead-write-v1-1-fe46edd08cf1@analog.com Signed-off-by: Guenter Roeck commit 2c021b45c154958566aad0cae9f74ab26a2d5732 Author: Arnd Bergmann Date: Tue Jun 10 11:25:49 2025 +0200 hwmon: (occ) fix unaligned accesses Passing a pointer to an unaligned integer as a function argument is undefined behavior: drivers/hwmon/occ/common.c:492:27: warning: taking address of packed member 'accumulator' of class or structure 'power_sensor_2' may result in an unaligned pointer value [-Waddress-of-packed-member] 492 | val = occ_get_powr_avg(&power->accumulator, | ^~~~~~~~~~~~~~~~~~ drivers/hwmon/occ/common.c:493:13: warning: taking address of packed member 'update_tag' of class or structure 'power_sensor_2' may result in an unaligned pointer value [-Waddress-of-packed-member] 493 | &power->update_tag); | ^~~~~~~~~~~~~~~~~ Move the get_unaligned() calls out of the function and pass these through argument registers instead. Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250610092553.2641094-1-arnd@kernel.org Signed-off-by: Guenter Roeck commit 744c2fe950e936c4d62430de899d6253424200ed Author: Arnd Bergmann Date: Tue Jun 10 11:23:06 2025 +0200 hwmon: (occ) Rework attribute registration for stack usage clang produces an output with excessive stack usage when building the occ_setup_sensor_attrs() function, apparently the result of having a lot of struct literals and building with the -fno-strict-overflow option that leads clang to skip some optimization in case the 'attr' pointer overruns: drivers/hwmon/occ/common.c:775:12: error: stack frame size (1392) exceeds limit (1280) in 'occ_setup_sensor_attrs' [-Werror,-Wframe-larger-than] Replace the custom macros for initializing the attributes with a simpler function call that does not run into this corner case. Link: https://godbolt.org/z/Wf1Yx76a5 Fixes: 54076cb3b5ff ("hwmon (occ): Add sensor attributes and register hwmon device") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250610092315.2640039-1-arnd@kernel.org Signed-off-by: Guenter Roeck commit 14c9ede9ca4cd078ad76a6ab9617b81074eb58bf Author: Gui-Dong Han Date: Fri Jun 6 07:16:40 2025 +0000 hwmon: (ftsteutates) Fix TOCTOU race in fts_read() In the fts_read() function, when handling hwmon_pwm_auto_channels_temp, the code accesses the shared variable data->fan_source[channel] twice without holding any locks. It is first checked against FTS_FAN_SOURCE_INVALID, and if the check passes, it is read again when used as an argument to the BIT() macro. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition. Another thread executing fts_update_device() can modify the value of data->fan_source[channel] between the check and its use. If the value is changed to FTS_FAN_SOURCE_INVALID (0xff) during this window, the BIT() macro will be called with a large shift value (BIT(255)). A bit shift by a value greater than or equal to the type width is undefined behavior and can lead to a crash or incorrect values being returned to userspace. Fix this by reading data->fan_source[channel] into a local variable once, eliminating the race condition. Additionally, add a bounds check to ensure the value is less than BITS_PER_LONG before passing it to the BIT() macro, making the code more robust against undefined behavior. This possible bug was found by an experimental static analysis tool developed by our team. Fixes: 1c5759d8ce05 ("hwmon: (ftsteutates) Replace fanX_source with pwmX_auto_channels_temp") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han Link: https://lore.kernel.org/r/20250606071640.501262-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck commit 8acfb165a492251a08a22a4fa6497a131e8c2609 Author: Heiko Stuebner Date: Fri Jun 6 21:04:18 2025 +0200 regulator: fan53555: add enable_time support and soft-start times The datasheets for all the fan53555 variants (and clones using the same interface) define so called soft start times, from enabling the regulator until at least some percentage of the output (i.e. 92% for the rk860x types) are available. The regulator framework supports this with the enable_time property but currently the fan53555 driver does not define enable_times for any variant. I ran into a problem with this while testing the new driver for the Rockchip NPUs (rocket), which does runtime-pm including disabling and enabling a rk8602 as needed. When reenabling the regulator while running a load, fatal hangs could be observed while enabling the associated power-domain, which the regulator supplies. Experimentally setting the regulator to always-on, made the issue disappear, leading to the missing delay to let power stabilize. And as expected, setting the enable-time to a non-zero value according to the datasheet also resolved the regulator-issue. The datasheets in nearly all cases only specify "typical" values, except for the fan53555 type 08. There both a typical and maximum value are listed - 40uS apart. For all typical values I've added 100uS to be on the safe side. Individual details for the relevant regulators below: - fan53526: The datasheet for all variants lists a typical value of 150uS, so make that 250uS with safety margin. - fan53555: types 08 and 18 (unsupported) are given a typical enable time of 135uS but also a maximum of 175uS so use that value. All the other types only have a typical time in the datasheet of 300uS, so give a bit margin by setting it to 400uS. - rk8600 + rk8602: Datasheet reports a typical value of 260us, so use 360uS to be safe. - syr82x + syr83x: All datasheets report typical soft-start values of 300uS for these regulators, so use 400uS. - tcs452x: Datasheet sadly does not report a soft-start time, so I've not set an enable-time Signed-off-by: Heiko Stuebner Link: https://patch.msgid.link/20250606190418.478633-1-heiko@sntech.de Signed-off-by: Mark Brown commit b081d8564e4a396843a78788476fdcbf70efed06 Author: Laurentiu Mihalcea Date: Fri Jun 13 15:43:10 2025 -0400 ASoC: SOF: imx8: add core shutdown operation for imx8/imx8x Currently, the DSP core from i.MX8QM/i.MX8QXP is able to operate while the firmware image is being loaded. Because of this, the DSP may change the content of the firmware data just after it was loaded, thus leading to the data having unexpected values when the DSP is reset (via run()). Fix this by implementing the core_shutdown() operation that will put the DSP in stall during suspend(). The stall will be removed during the run() opertion, thus guaranteeing that the DSP core will not be able to run while the firmware image is being loaded. Signed-off-by: Laurentiu Mihalcea Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250613194310.1128733-1-laurentiumihalcea111@gmail.com Signed-off-by: Mark Brown commit b8b8663ac82a2595a0922d30014f60c5547084de Author: Danilo Krummrich Date: Sat Jun 14 11:20:23 2025 +0200 mailmap: add entry for Danilo Krummrich Add an entry to remap my Red Hat address. Link: https://lore.kernel.org/r/20250614092054.161658-1-dakr@kernel.org Signed-off-by: Danilo Krummrich commit db44d088a5ab030b741a3adf2e7b181a8a6dcfbe Author: Darrick J. Wong Date: Thu Jun 12 10:51:12 2025 -0700 xfs: actually use the xfs_growfs_check_rtgeom tracepoint We created a new tracepoint but forgot to put it in. Fix that. Cc: rostedt@goodmis.org Cc: stable@vger.kernel.org # v6.14 Fixes: 59a57acbce282d ("xfs: check that the rtrmapbt maxlevels doesn't increase when growing fs") Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reported-by: Steven Rostedt Closes: https://lore.kernel.org/all/20250612131021.114e6ec8@batman.local.home/ Signed-off-by: Carlos Maiolino commit 19fa6e493a933c095f164230d3393d504216e052 Author: Markus Elfring Date: Tue Jun 10 14:50:07 2025 +0200 xfs: Improve error handling in xfs_mru_cache_create() Simplify error handling in this function implementation. * Delete unnecessary pointer checks and variable assignments. * Omit a redundant function call. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit 0989dfa61f438150c4f1110604ba0787856fe8b0 Author: Christoph Hellwig Date: Thu Jun 5 08:16:30 2025 +0200 xfs: move xfs_submit_zoned_bio a bit Commit f3e2e53823b9 ("xfs: add inode to zone caching for data placement") add the new code right between xfs_submit_zoned_bio and xfs_zone_alloc_and_submit which implement the main zoned write path. Move xfs_submit_zoned_bio down to keep it together again. Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Hans Holmberg Signed-off-by: Carlos Maiolino commit df3b7e2b56d271f93e2d1f395c13235a1a277639 Author: Christoph Hellwig Date: Thu Jun 5 08:16:29 2025 +0200 xfs: use xfs_readonly_buftarg in xfs_remount_rw Use xfs_readonly_buftarg instead of open coding it. Signed-off-by: Christoph Hellwig Reviewed-by: Hans Holmberg Reviewed-by: John Garry Signed-off-by: Carlos Maiolino commit a593c89ac5a417605b165cbc9768b3663ab4d8ad Author: Christoph Hellwig Date: Thu Jun 5 08:16:28 2025 +0200 xfs: remove NULL pointer checks in xfs_mru_cache_insert Remove the check for a NULL mru or mru->list in xfs_mru_cache_insert as this API misused lead to a direct NULL pointer dereference on first use and is not user triggerable. As a smatch run by Dan points out with the recent cleanup it would otherwise try to free the object we just determined to be NULL for this impossible to reach case. Fixes: 70b95cb86513 ("xfs: free the item in xfs_mru_cache_insert on failure") Reported-by: Dan Carpenter Signed-off-by: Christoph Hellwig Reviewed-by: Hans Holmberg Signed-off-by: Carlos Maiolino commit b0f77d301eb2b4e1fc816f33ade8519ae7f894f4 Author: Christoph Hellwig Date: Thu Jun 5 08:16:27 2025 +0200 xfs: check for shutdown before going to sleep in xfs_select_zone Ensure the file system hasn't been shut down before waiting for a free zone to become available, because that won't happen on a shut down file system. Without this processes can occasionally get stuck in the allocator wait loop when racing with a file system shutdown. This sporadically happens when running generic/388 or generic/475. Fixes: 4e4d52075577 ("xfs: add the zoned space allocator") Reported-by: Shinichiro Kawasaki Signed-off-by: Christoph Hellwig Reviewed-by: Hans Holmberg Tested-by: Shin'ichiro Kawasaki Signed-off-by: Carlos Maiolino commit dd2d6b7f6f519d078a866a36a625b0297d81c5bc Author: Luis Henriques Date: Fri Jun 13 11:11:11 2025 +0100 fs: drop assert in file_seek_cur_needs_f_lock The assert in function file_seek_cur_needs_f_lock() can be triggered very easily because there are many users of vfs_llseek() (such as overlayfs) that do their custom locking around llseek instead of relying on fdget_pos(). Just drop the overzealous assertion. Fixes: da06e3c51794 ("fs: don't needlessly acquire f_lock") Suggested-by: Jan Kara Suggested-by: Mateusz Guzik Signed-off-by: Luis Henriques Link: https://lore.kernel.org/20250613101111.17716-1-luis@igalia.com Signed-off-by: Christian Brauner commit e6382fcf989074566bb9a54bbd3c514d7bb99397 Author: Vivian Wang Date: Fri Jun 13 17:25:33 2025 +0800 gpio: spacemit: Add missing MODULE_DEVICE_TABLE The gpio-spacemit-k1 driver can be compiled as a module. Add missing MODULE_DEVICE_TABLE so it can be matched by modalias and automatically loaded by udev. Fixes: d00553240ef8 ("gpio: spacemit: add support for K1 SoC") Signed-off-by: Vivian Wang Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250613-k1-gpio-of-table-v1-1-9015da8fdfdb@iscas.ac.cn Signed-off-by: Bartosz Golaszewski commit c464ce6af332e7c802c36cd337cacf81db05400c Author: Ville Syrjälä Date: Fri Mar 14 17:01:34 2025 +0200 drm/i915/dsi: Fix off by one in BXT_MIPI_TRANS_VTOTAL BXT_MIPI_TRANS_VTOTAL must be programmed with vtotal-1 instead of vtotal. Make it so. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250314150136.22564-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 7b3685c9b38c3097f465efec8b24dbed63258cf6) Signed-off-by: Joonas Lahtinen commit a7137b1825b535eb7258b25beeb0d5425e0037d2 Author: Tzung-Bi Shih Date: Thu Jun 12 08:30:23 2025 +0000 drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled i915_pmu.c may fail to build with GCOV and AutoFDO enabled. ../drivers/gpu/drm/i915/i915_pmu.c:116:3: error: call to '__compiletime_assert_487' declared with 'error' attribute: BUILD_BUG_ON failed: bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1 116 | BUILD_BUG_ON(bit > | ^ Here is a way to reproduce the issue: $ git checkout v6.15 $ mkdir build $ ./scripts/kconfig/merge_config.sh -O build -n -m <(cat < Signed-off-by: Tzung-Bi Shih Signed-off-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250612083023.562585-1-tzungbi@kernel.org (cherry picked from commit 686d773186bf72b739bab7e12eb8665d914676ee) Signed-off-by: Joonas Lahtinen commit 191334400d8031df367eb74b6ab49bc163f6f821 Author: Kent Overstreet Date: Fri Jun 13 18:58:57 2025 -0400 bcachefs: fsck: fix extent past end of inode repair Fix the case where we're deleting in a different snapshot and need to emit a whiteout - that requires a regular BTREE_ITER_filter_snapshots iterator. Also, only delete the part of the extent that extents past i_size. Signed-off-by: Kent Overstreet commit b17d7bdb128c50025fc3eb7a9e57b3c7caa4a5ac Author: Kent Overstreet Date: Fri Jun 13 18:49:54 2025 -0400 bcachefs: fsck: fix add_inode() the inode btree uses the offset field for the inum, not the inode field. Signed-off-by: Kent Overstreet commit c27e5782d957c7242e9cb6405a395b89e8e1d573 Author: Kent Overstreet Date: Fri Jun 13 18:27:33 2025 -0400 bcachefs: Fix snapshot_key_missing_inode_snapshot repair When the inode was a whiteout, we were inserting a new whiteout at the wrong (old) snapshot. Signed-off-by: Kent Overstreet commit c1ccd43b357e157d78c899e61764fc83b4d1dbaa Author: Kent Overstreet Date: Fri Jun 13 17:47:07 2025 -0400 bcachefs: Fix "now allowing incompatible features" message Check against version_incompat_allowed, not version_incompat. Signed-off-by: Kent Overstreet commit 2ba562cc04dc22d01750e80d0638cc1d91fdd95c Author: Kent Overstreet Date: Fri Jun 13 15:15:09 2025 -0400 bcachefs: pass last_seq into fs_journal_start() Prep work for journal rewind, where the seq we're replaying from may be different than the last journal entry's last_seq. Signed-off-by: Kent Overstreet commit f2ed0892732d470abde7a1af360bd670dc8a68c6 Author: Kent Overstreet Date: Fri Jun 13 15:17:37 2025 -0400 bcachefs: better __bch2_snapshot_is_ancestor() assert Previously, we weren't checking the result of the skiplist walk, just the is_ancestor bitmap. Signed-off-by: Kent Overstreet commit 425da82c63e3ac06b2f8780879e83463e88cbf9f Author: Kent Overstreet Date: Fri Jun 13 14:57:34 2025 -0400 bcachefs: btree_iter: fix updates, journal overlay We need to start searching from search_key - _not_ path->pos, which will point to the key we found in the btree Signed-off-by: Kent Overstreet commit 0e62fca2a6dbfcedaab4919d7ad2044f20fdf889 Author: Kent Overstreet Date: Fri Jun 13 14:53:42 2025 -0400 bcachefs: Fix bch2_journal_keys_peek_prev_min() this code is rarely invoked, so - we had a few bugs left from basing it off of bch2_journal_keys_peek_max()... Signed-off-by: Kent Overstreet commit 0dc8eaebed99ea323ab3be7cf1438277f990189d Author: Alan Huang Date: Fri Jun 13 03:01:59 2025 +0800 bcachefs: Delay calculation of trans->journal_u64s When there is commit error that need split btree leaf, fsck might change the value of trans->journal_entries.u64s, when retry commit, the value of trans->journal_u64s would be incorrect, which will lead to trans->journal_res.u64s underflow, and then out of bounds write will occur: [ 464.496970][T11969] Call trace: [ 464.496973][T11969] show_stack+0x3c/0x88 (C) [ 464.496995][T11969] dump_stack_lvl+0xf8/0x178 [ 464.497014][T11969] dump_stack+0x20/0x30 [ 464.497031][T11969] __bch2_trans_log_str+0x344/0x350 [ 464.497048][T11969] bch2_trans_log_str+0x3c/0x60 [ 464.497065][T11969] __bch2_fsck_err+0x11bc/0x1390 [ 464.497083][T11969] bch2_check_discard_freespace_key+0xad4/0x10d0 [ 464.497100][T11969] bch2_bucket_alloc_freelist+0x99c/0x1130 [ 464.497117][T11969] bch2_bucket_alloc_trans+0x79c/0xcb8 [ 464.497133][T11969] bch2_bucket_alloc_set_trans+0x378/0xc20 [ 464.497151][T11969] __open_bucket_add_buckets+0x7fc/0x1c00 [ 464.497168][T11969] open_bucket_add_buckets+0x184/0x3a8 [ 464.497185][T11969] bch2_alloc_sectors_start_trans+0xa04/0x1da0 [ 464.497203][T11969] bch2_btree_reserve_get+0x6e0/0xef0 [ 464.497220][T11969] bch2_btree_update_start+0x1618/0x2600 [ 464.497239][T11969] bch2_btree_split_leaf+0xcc/0x730 [ 464.497258][T11969] bch2_trans_commit_error+0x22c/0xc30 [ 464.497276][T11969] __bch2_trans_commit+0x207c/0x4e30 [ 464.497292][T11969] bch2_journal_replay+0x9e0/0x1420 [ 464.497305][T11969] __bch2_run_recovery_passes+0x458/0xf98 [ 464.497318][T11969] bch2_run_recovery_passes+0x280/0x478 [ 464.497331][T11969] bch2_fs_recovery+0x24f0/0x3a28 [ 464.497344][T11969] bch2_fs_start+0xb80/0x1248 [ 464.497358][T11969] bch2_fs_get_tree+0xe94/0x1708 [ 464.497377][T11969] vfs_get_tree+0x84/0x2d0 Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit e31144f8cbe041a572ca64d9261ceeb647ccf557 Author: Alan Huang Date: Fri Jun 13 03:01:58 2025 +0800 bcachefs: Add missing EBUG_ON Just like the EBUG_ON in bch2_journal_add_entry(). Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 9b54efe66c9b44e7446e8a81a058c014cd43661d Author: Alan Huang Date: Fri Jun 13 22:54:59 2025 +0800 bcachefs: Fix alloc_req use after free Now the alloc_req is allocated from the bump allocator, if there is reallocation, the memory of alloc_req would be frees, fix by delaying the reallocation to transaction restart, it has to restart anyway. Reported-by: syzbot+2887a13a5c387e616a68@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 9b9a3270092bf8030dbe21ce90b2d0c8d98d33c7 Author: Alan Huang Date: Fri Jun 13 21:19:50 2025 +0800 bcachefs: Don't allocate new memory when mempool is exhausted Allocating new memory when mempool is exhausted is too complicated, just return ENOMEM is fine. memcpy is not needed, since there might be pointers point to the old memory, that's the bug. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 3bd6f8aeae3d3f8121cbae5a8650a46622aa4e07 Author: Kent Overstreet Date: Thu Jun 12 18:27:37 2025 -0400 bcachefs: btree iter tracepoints We've been seeing some livelock-ish behavior in the index update part of the main write path, and while we've got low level btree path tracepoints, we've been lacking high level btree iterator tracepoints. Signed-off-by: Kent Overstreet commit 0f4dd2ce352d38c7ecf1b3821c908816eb6376a7 Author: Kent Overstreet Date: Thu Jun 12 18:26:48 2025 -0400 bcachefs: trace_extent_trim_atomic Add a tracepoint for when we insert only part of an extent, due to too many overwrites. Signed-off-by: Kent Overstreet commit 2f13daee2a72bb962f5fd356c3a263a6f16da965 Author: Nathan Chancellor Date: Mon Jun 9 15:45:20 2025 -0700 lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older After commit 6f110a5e4f99 ("Disable SLUB_TINY for build testing"), which causes CONFIG_KASAN to be enabled in allmodconfig again, arm64 allmodconfig builds with clang-17 and older show an instance of -Wframe-larger-than (which breaks the build with CONFIG_WERROR=y): lib/crypto/curve25519-hacl64.c:757:6: error: stack frame size (2336) exceeds limit (2048) in 'curve25519_generic' [-Werror,-Wframe-larger-than] 757 | void curve25519_generic(u8 mypublic[CURVE25519_KEY_SIZE], | ^ When KASAN is disabled, the stack usage is roughly quartered: lib/crypto/curve25519-hacl64.c:757:6: error: stack frame size (608) exceeds limit (128) in 'curve25519_generic' [-Werror,-Wframe-larger-than] 757 | void curve25519_generic(u8 mypublic[CURVE25519_KEY_SIZE], | ^ Using '-Rpass-analysis=stack-frame-layout' shows the following variables and many, many 8-byte spills when KASAN is enabled: Offset: [SP-144], Type: Variable, Align: 8, Size: 40 Offset: [SP-464], Type: Variable, Align: 8, Size: 320 Offset: [SP-784], Type: Variable, Align: 8, Size: 320 Offset: [SP-864], Type: Variable, Align: 32, Size: 80 Offset: [SP-896], Type: Variable, Align: 32, Size: 32 Offset: [SP-1016], Type: Variable, Align: 8, Size: 120 When KASAN is disabled, there are still spills but not at many and the variables list is smaller: Offset: [SP-192], Type: Variable, Align: 32, Size: 80 Offset: [SP-224], Type: Variable, Align: 32, Size: 32 Offset: [SP-344], Type: Variable, Align: 8, Size: 120 Disable KASAN for this file when using clang-17 or older to avoid blowing out the stack, clearing up the warning. Signed-off-by: Nathan Chancellor Acked-by: "Jason A. Donenfeld" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250609-curve25519-hacl64-disable-kasan-clang-v1-1-08ea0ac5ccff@kernel.org Signed-off-by: Eric Biggers commit e202196b8aa249d78ab87eae56bbe0e71e3dc39c Author: Kees Cook Date: Thu May 29 10:31:17 2025 -0700 lib/crypto: Annotate crypto strings with nonstring Annotate various keys, ivs, and other byte arrays with __nonstring so that static initializers will not complain about truncating the trailing NUL byte under GCC 15 with -Wunterminated-string-initialization enabled. Silences many warnings like: ../lib/crypto/aesgcm.c:642:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (13 chars into 12 available) [-Wunterminated-string-initialization] 642 | .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250529173113.work.760-kees@kernel.org Signed-off-by: Eric Biggers commit e04c78d86a9699d136910cfc0bdcf01087e3267e Author: Linus Torvalds Date: Sun Jun 15 13:49:41 2025 -0700 Linux 6.16-rc2 commit 89465d923bda180299e69ee2800aab84ad0ba689 Author: Penglei Jiang Date: Sun Jun 15 09:39:06 2025 -0700 io_uring: fix task leak issue in io_wq_create() Add missing put_task_struct() in the error path Cc: stable@vger.kernel.org Fixes: 0f8baa3c9802 ("io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls()") Signed-off-by: Penglei Jiang Link: https://lore.kernel.org/r/20250615163906.2367-1-superman.xpt@gmail.com Signed-off-by: Jens Axboe commit 08215f5486ec4d7c39cf14987ffb133e1e1f6c10 Merge: 8c6bc74c7f8910 2f6b47b295518c Author: Linus Torvalds Date: Sun Jun 15 09:14:27 2025 -0700 Merge tag 'kbuild-fixes-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Move warnings about linux/export.h from W=1 to W=2 - Fix structure type overrides in gendwarfksyms * tag 'kbuild-fixes-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: gendwarfksyms: Fix structure type overrides kbuild: move warnings about linux/export.h from W=1 to W=2 commit 2f6b47b295518c3ba16fabb1dddbe6a319899acb Author: Sami Tolvanen Date: Sat Jun 14 00:55:33 2025 +0000 gendwarfksyms: Fix structure type overrides As we always iterate through the entire die_map when expanding type strings, recursively processing referenced types in type_expand_child() is not actually necessary. Furthermore, the type_string kABI rule added in commit c9083467f7b9 ("gendwarfksyms: Add a kABI rule to override type strings") can fail to override type strings for structures due to a missing kabi_get_type_string() check in this function. Fix the issue by dropping the unnecessary recursion and moving the override check to type_expand(). Note that symbol versions are otherwise unchanged with this patch. Fixes: c9083467f7b9 ("gendwarfksyms: Add a kABI rule to override type strings") Reported-by: Giuliano Procida Signed-off-by: Sami Tolvanen Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit cf0233491b3a15933234a26efd9ecbc1c0764674 Author: Dmitry Baryshkov Date: Thu Jun 5 14:25:49 2025 +0300 phy: use per-PHY lockdep keys If the PHY driver uses another PHY internally (e.g. in case of eUSB2, repeaters are represented as PHYs), then it would trigger the following lockdep splat because all PHYs use a single static lockdep key and thus lockdep can not identify whether there is a dependency or not and reports a false positive. Make PHY subsystem use dynamic lockdep keys, assigning each driver a separate key. This way lockdep can correctly identify dependency graph between mutexes. ============================================ WARNING: possible recursive locking detected 6.15.0-rc7-next-20250522-12896-g3932f283970c #3455 Not tainted -------------------------------------------- kworker/u51:0/78 is trying to acquire lock: ffff0008116554f0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c but task is already holding lock: ffff000813c10cf0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&phy->mutex); lock(&phy->mutex); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by kworker/u51:0/78: #0: ffff000800010948 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x18c/0x5ec #1: ffff80008036bdb0 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x1b4/0x5ec #2: ffff0008094ac8f8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x38/0x188 #3: ffff000813c10cf0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c stack backtrace: CPU: 0 UID: 0 PID: 78 Comm: kworker/u51:0 Not tainted 6.15.0-rc7-next-20250522-12896-g3932f283970c #3455 PREEMPT Hardware name: Qualcomm CRD, BIOS 6.0.240904.BOOT.MXF.2.4-00528.1-HAMOA-1 09/ 4/2024 Workqueue: events_unbound deferred_probe_work_func Call trace: show_stack+0x18/0x24 (C) dump_stack_lvl+0x90/0xd0 dump_stack+0x18/0x24 print_deadlock_bug+0x258/0x348 __lock_acquire+0x10fc/0x1f84 lock_acquire+0x1c8/0x338 __mutex_lock+0xb8/0x59c mutex_lock_nested+0x24/0x30 phy_init+0x4c/0x12c snps_eusb2_hsphy_init+0x54/0x1a0 phy_init+0xe0/0x12c dwc3_core_init+0x450/0x10b4 dwc3_core_probe+0xce4/0x15fc dwc3_probe+0x64/0xb0 platform_probe+0x68/0xc4 really_probe+0xbc/0x298 __driver_probe_device+0x78/0x12c driver_probe_device+0x3c/0x160 __device_attach_driver+0xb8/0x138 bus_for_each_drv+0x84/0xe0 __device_attach+0x9c/0x188 device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 deferred_probe_work_func+0x8c/0xc8 process_one_work+0x208/0x5ec worker_thread+0x1c0/0x368 kthread+0x14c/0x20c ret_from_fork+0x10/0x20 Fixes: 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater") Fixes: e2463559ff1d ("phy: amlogic: Add Amlogic AXG PCIE PHY Driver") Reviewed-by: Neil Armstrong Reviewed-by: Abel Vesa Reported-by: Johan Hovold Link: https://lore.kernel.org/lkml/ZnpoAVGJMG4Zu-Jw@hovoldconsulting.com/ Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250605-phy-subinit-v3-1-1e1e849e10cd@oss.qualcomm.com Signed-off-by: Vinod Koul commit a6a7946bd691940cfe7289ae6dfb1f077516df72 Author: Masahiro Yamada Date: Fri Jun 13 01:08:48 2025 +0900 kbuild: move warnings about linux/export.h from W=1 to W=2 This hides excessive warnings, as nobody builds with W=2. Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include when W=1") Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessary #include when W=1") Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Acked-by: Heiko Carstens commit cefc1caee9dd06c69e2d807edc5949b329f52b22 Author: Wayne Chang Date: Fri May 2 17:26:06 2025 +0800 phy: tegra: xusb: Fix unbalanced regulator disable in UTMI PHY mode When transitioning from USB_ROLE_DEVICE to USB_ROLE_NONE, the code assumed that the regulator should be disabled. However, if the regulator is marked as always-on, regulator_is_enabled() continues to return true, leading to an incorrect attempt to disable a regulator which is not enabled. This can result in warnings such as: [ 250.155624] WARNING: CPU: 1 PID: 7326 at drivers/regulator/core.c:3004 _regulator_disable+0xe4/0x1a0 [ 250.155652] unbalanced disables for VIN_SYS_5V0 To fix this, we move the regulator control logic into tegra186_xusb_padctl_id_override() function since it's directly related to the ID override state. The regulator is now only disabled when the role transitions from USB_ROLE_HOST to USB_ROLE_NONE, by checking the VBUS_ID register. This ensures that regulator enable/disable operations are properly balanced and only occur when actually transitioning to/from host mode. Fixes: 49d46e3c7e59 ("phy: tegra: xusb: Add set_mode support for UTMI phy on Tegra186") Cc: stable@vger.kernel.org Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Tested-by: Jon Hunter Link: https://lore.kernel.org/r/20250502092606.2275682-1-waynec@nvidia.com Signed-off-by: Vinod Koul commit 7be54870e9bf5ed0b4fe2a23b41a630527882de5 Author: Haotien Hsu Date: Mon May 19 17:09:29 2025 +0800 phy: tegra: xusb: Disable periodic tracking on Tegra234 Periodic calibration updates (~10µs) may overlap with transfers when PCIe NVMe SSD, LPDDR, and USB2 devices operate simultaneously, causing crosstalk on Tegra234 devices. Hence disable periodic calibration updates and make this a one-time calibration. Fixes: d8163a32ca95 ("phy: tegra: xusb: Add Tegra234 support") Cc: stable@vger.kernel.org Signed-off-by: Haotien Hsu Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Tested-by: Jon Hunter Link: https://lore.kernel.org/r/20250519090929.3132456-3-waynec@nvidia.com Signed-off-by: Vinod Koul commit 24c63c590adca310e0df95c77cf7aa5552bc3fc5 Author: Wayne Chang Date: Mon May 19 17:09:28 2025 +0800 phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode The logic that drives the pad calibration values resides in the controller reset domain and so the calibration values are only being captured when the controller is out of reset. However, by clearing the CYA_TRK_CODE_UPDATE_ON_IDLE bit, the calibration values can be set while the controller is in reset. The CYA_TRK_CODE_UPDATE_ON_IDLE bit was previously cleared based on the trk_hw_mode flag, but this dependency is not necessary. Instead, introduce a new flag, trk_update_on_idle, to independently control this bit. Fixes: d8163a32ca95 ("phy: tegra: xusb: Add Tegra234 support") Cc: stable@vger.kernel.org Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Tested-by: Jon Hunter Link: https://lore.kernel.org/r/20250519090929.3132456-2-waynec@nvidia.com Signed-off-by: Vinod Koul commit 1d27f11bf02b38c431e49a17dee5c10a2b4c2e28 Author: Jens Axboe Date: Sun Jun 15 08:09:14 2025 -0600 io_uring/rsrc: validate buffer count with offset for cloning syzbot reports that it can trigger a WARN_ON() for kmalloc() attempt that's too big: WARNING: CPU: 0 PID: 6488 at mm/slub.c:5024 __kvmalloc_node_noprof+0x520/0x640 mm/slub.c:5024 Modules linked in: CPU: 0 UID: 0 PID: 6488 Comm: syz-executor312 Not tainted 6.15.0-rc7-syzkaller-gd7fa1af5b33e #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __kvmalloc_node_noprof+0x520/0x640 mm/slub.c:5024 lr : __do_kmalloc_node mm/slub.c:-1 [inline] lr : __kvmalloc_node_noprof+0x3b4/0x640 mm/slub.c:5012 sp : ffff80009cfd7a90 x29: ffff80009cfd7ac0 x28: ffff0000dd52a120 x27: 0000000000412dc0 x26: 0000000000000178 x25: ffff7000139faf70 x24: 0000000000000000 x23: ffff800082f4cea8 x22: 00000000ffffffff x21: 000000010cd004a8 x20: ffff0000d75816c0 x19: ffff0000dd52a000 x18: 00000000ffffffff x17: ffff800092f39000 x16: ffff80008adbe9e4 x15: 0000000000000005 x14: 1ffff000139faf1c x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000139faf21 x10: 0000000000000003 x9 : ffff80008f27b938 x8 : 0000000000000002 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 00000000ffffffff x4 : 0000000000400dc0 x3 : 0000000200000000 x2 : 000000010cd004a8 x1 : ffff80008b3ebc40 x0 : 0000000000000001 Call trace: __kvmalloc_node_noprof+0x520/0x640 mm/slub.c:5024 (P) kvmalloc_array_node_noprof include/linux/slab.h:1065 [inline] io_rsrc_data_alloc io_uring/rsrc.c:206 [inline] io_clone_buffers io_uring/rsrc.c:1178 [inline] io_register_clone_buffers+0x484/0xa14 io_uring/rsrc.c:1287 __io_uring_register io_uring/register.c:815 [inline] __do_sys_io_uring_register io_uring/register.c:926 [inline] __se_sys_io_uring_register io_uring/register.c:903 [inline] __arm64_sys_io_uring_register+0x42c/0xea8 io_uring/register.c:903 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 which is due to offset + buffer_count being too large. The registration code checks only the total count of buffers, but given that the indexing is an array, it should also check offset + count. That can't exceed IORING_MAX_REG_BUFFERS either, as there's no way to reach buffers beyond that limit. There's no issue with registrering a table this large, outside of the fact that it's pointless to register buffers that cannot be reached, and that it can trigger this kmalloc() warning for attempting an allocation that is too large. Cc: stable@vger.kernel.org Fixes: b16e920a1909 ("io_uring/rsrc: allow cloning at an offset") Reported-by: syzbot+cb4bf3cb653be0d25de8@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/684e77bd.a00a0220.279073.0029.GAE@google.com/ Signed-off-by: Jens Axboe commit 8c6bc74c7f8910ed4c969ccec52e98716f98700a Merge: ac91b4de4492bf 72dd7961a4bb4f Author: Linus Torvalds Date: Sat Jun 14 10:13:32 2025 -0700 Merge tag 'v6.16-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - SMB3.1.1 POSIX extensions fix for char remapping - Fix for repeated directory listings when directory leases enabled - deferred close handle reuse fix * tag 'v6.16-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: improve directory cache reuse for readdir operations smb: client: fix perf regression with deferred closes smb: client: disable path remapping with POSIX extensions commit ac91b4de4492bfdbbf46b265fb6c5c0ed4b66504 Merge: f713ffa3639cd5 f9705d66fa7107 Author: Linus Torvalds Date: Sat Jun 14 10:01:47 2025 -0700 Merge tag 'iommu-fixes-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fix from Joerg Roedel: - Fix PTE size calculation for NVidia Tegra * tag 'iommu-fixes-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/tegra: Fix incorrect size calculation commit f713ffa3639cd57673754a5e83aedebf50dce332 Merge: 6d13760ea3a746 9ce6c9875f3e99 Author: Linus Torvalds Date: Sat Jun 14 09:25:22 2025 -0700 Merge tag 'block-6.16-20250614' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix for a deadlock on queue freeze with zoned writes - Fix for zoned append emulation - Two bio folio fixes, for sparsemem and for very large folios - Fix for a performance regression introduced in 6.13 when plug insertion was changed - Fix for NVMe passthrough handling for polled IO - Document the ublk auto registration feature - loop lockdep warning fix * tag 'block-6.16-20250614' of git://git.kernel.dk/linux: nvme: always punt polled uring_cmd end_io work to task_work Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists block: Fix bvec_set_folio() for very large folios bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP block: use plug request list tail for one-shot backmerge attempt block: don't use submit_bio_noacct_nocheck in blk_zone_wplug_bio_work block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion ublk: document auto buffer registration(UBLK_F_AUTO_BUF_REG) loop: move lo_set_size() out of queue freeze commit 713d48878e8a5e4bcca6355324f943eb72cd2c84 Author: Chen-Yu Tsai Date: Sat Jun 7 21:50:29 2025 +0800 clk: sunxi-ng: a523: Mark MBUS clock as critical The MBUS serves as the main data bus for various DMA masters in the system. If its clock is not enabled, the DMA operations will stall, leading to the peripherals stalling or timing out. This has been observed as USB or MMC hosts timing out waiting for transactions when the clock is automatically disabled by the CCF due to it not being used. Mark the clock as critical so that it never gets disabled. Fixes: 74b0443a0d0a ("clk: sunxi-ng: a523: add system mod clocks") Reviewed-by: Andre Przywara Link: https://patch.msgid.link/20250607135029.2085140-1-wens@kernel.org Signed-off-by: Chen-Yu Tsai commit 6d13760ea3a746c329d534b90d2b38a0ef7690d2 Merge: 588adb24b757d5 b62e0efd8a8571 Author: Linus Torvalds Date: Sat Jun 14 08:44:54 2025 -0700 Merge tag 'io_uring-6.16-20250614' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix for a race between SQPOLL exit and fdinfo reading. It's slim and I was only able to reproduce this with an artificial delay in the kernel. Followup sparse fix as well to unify the access to ->thread. - Fix for multiple buffer peeking, avoiding truncation if possible. - Run local task_work for IOPOLL reaping when the ring is exiting. This currently isn't done due to an assumption that polled IO will never need task_work, but a fix on the block side is going to change that. * tag 'io_uring-6.16-20250614' of git://git.kernel.dk/linux: io_uring: run local task_work from ring exit IOPOLL reaping io_uring/kbuf: don't truncate end buffer for multiple buffer peeks io_uring: consistently use rcu semantics with sqpoll thread io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo() commit 588adb24b757d5d9a438056ac0347d8b3ac38dde Merge: 27b9989b87119d 5b2d595efbfc9c Author: Linus Torvalds Date: Sat Jun 14 08:38:34 2025 -0700 Merge tag 'rust-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull Rust fix from Miguel Ojeda: - 'hrtimer': fix future compile error when the 'impl_has_hr_timer!' macro starts to get called * tag 'rust-fixes-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: rust: time: Fix compile error in impl_has_hr_timer macro commit 27b9989b87119da2f33f2c0fcbb8984ab4ebdf1a Merge: 4774cfe3543abb bb666b7c27073b Author: Linus Torvalds Date: Sat Jun 14 08:18:09 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-06-13-21-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "9 hotfixes. 3 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. Only 4 are for MM" * tag 'mm-hotfixes-stable-2025-06-13-21-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm: add mmap_prepare() compatibility layer for nested file systems init: fix build warnings about export.h MAINTAINERS: add Barry as a THP reviewer drivers/rapidio/rio_cm.c: prevent possible heap overwrite mm: close theoretical race where stale TLB entries could linger mm/vma: reset VMA iterator on commit_merge() OOM failure docs: proc: update VmFlags documentation in smaps scatterlist: fix extraneous '@'-sign kernel-doc notation selftests/mm: skip failed memfd setups in gup_longterm commit d3deabe4c619875714b9a844b1a3d9752dbae1dd Author: Rob Clark Date: Fri Jun 13 07:41:44 2025 -0700 drm/msm: Fix inverted WARN_ON() logic We want to WARN_ON() if info is NULL. Suggested-by: Konrad Dybcio Fixes: 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind") Tested-by: Neil Armstrong Signed-off-by: Rob Clark Reported-by: Alexey Klimov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/658631/ commit 60599e4f8a041d1186afe4bcf12ba522afe4c5bc Author: Simon Trimmer Date: Fri Jun 13 14:52:51 2025 +0000 ALSA: hda/realtek: Add quirk for Asus GA605K The GA605K has similar audio hardware to the GA403U so apply the same quirk. Signed-off-by: Simon Trimmer Tested-by: Timofey Titovets Link: https://github.com/alsa-project/alsa-ucm-conf/issues/578 Link: https://patch.msgid.link/20250613145251.397500-1-simont@opensource.cirrus.com Signed-off-by: Takashi Iwai commit efa6bdf1bc75e26cafaa5f1d775e8bb7c5b0c431 Author: Jonathan Lane Date: Wed Jun 11 12:31:25 2025 -0700 ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged Like many Dell laptops, the 3.5mm port by default can not detect a combined headphones+mic headset or even a pure microphone. This change enables the port's functionality. Signed-off-by: Jonathan Lane Cc: Link: https://patch.msgid.link/20250611193124.26141-2-jon@borg.moe Signed-off-by: Takashi Iwai commit 4774cfe3543abb8ee98089f535e28ebfd45b975a Merge: 25294cb8a404e8 5c3ba81923e02a Author: Linus Torvalds Date: Fri Jun 13 16:49:39 2025 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "All fixes for drivers. The core change in the error handler is simply to translate an ALUA specific sense code into a retry the ALUA components can handle and won't impact any other devices" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: error: alua: I/O errors for ALUA state transitions scsi: storvsc: Increase the timeouts to storvsc_timeout scsi: s390: zfcp: Ensure synchronous unit_add scsi: iscsi: Fix incorrect error path labels for flashnode operations scsi: mvsas: Fix typos in per-phy comments and SAS cmd port registers scsi: core: ufs: Fix a hang in the error handler commit 25294cb8a404e8116eecaf2f151ee2fd6c17fb9b Merge: 18531f4d1c8c47 1364af9cb2c571 Author: Linus Torvalds Date: Fri Jun 13 16:27:27 2025 -0700 Merge tag 'drm-fixes-2025-06-14' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Quiet week, only two pull requests came my way, xe has a couple of fixes and then a bunch of fixes across the board, vc4 probably fixes the biggest problem: vc4: - Fix infinite EPROBE_DEFER loop in vc4 probing amdxdna: - Fix amdxdna firmware size meson: - modesetting fixes sitronix: - Kconfig fix for st7171-i2c dma-buf: - Fix -EBUSY WARN_ON_ONCE in dma-buf udmabuf: - Use dma_sync_sgtable_for_cpu in udmabuf xe: - Fix regression disallowing 64K SVM migration - Use a bounce buffer for WA BB" * tag 'drm-fixes-2025-06-14' of https://gitlab.freedesktop.org/drm/kernel: drm/xe/lrc: Use a temporary buffer for WA BB udmabuf: use sgtable-based scatterlist wrappers dma-buf: fix compare in WARN_ON_ONCE drm/sitronix: st7571-i2c: Select VIDEOMODE_HELPERS drm/meson: fix more rounding issues with 59.94Hz modes drm/meson: use vclk_freq instead of pixel_freq in debug print drm/meson: fix debug log statement when setting the HDMI clocks drm/vc4: fix infinite EPROBE_DEFER loop drm/xe/svm: Fix regression disallowing 64K SVM migration accel/amdxdna: Fix incorrect PSP firmware size commit 20c96ed278e362ae4e324ed7d8c69fb48c508d3c Author: Danilo Krummrich Date: Wed Jun 11 19:48:25 2025 +0200 rust: devres: do not dereference to the internal Revocable We can't expose direct access to the internal Revocable, since this allows users to directly revoke the internal Revocable without Devres having the chance to synchronize with the devres callback -- we have to guarantee that the internal Revocable has been fully revoked before the device is fully unbound. Hence, remove the corresponding Deref implementation and, instead, provide indirect accessors for the internal Revocable. Note that we can still support Devres::revoke() by implementing the required synchronization (which would be almost identical to the synchronization in Devres::drop()). Fixes: 76c01ded724b ("rust: add devres abstraction") Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250611174827.380555-1-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f744201c6159fc7323c40936fd079525f7063598 Author: Danilo Krummrich Date: Thu Jun 12 14:17:15 2025 +0200 rust: devres: fix race in Devres::drop() In Devres::drop() we first remove the devres action and then drop the wrapped device resource. The design goal is to give the owner of a Devres object control over when the device resource is dropped, but limit the overall scope to the corresponding device being bound to a driver. However, there's a race that was introduced with commit 8ff656643d30 ("rust: devres: remove action in `Devres::drop`"), but also has been (partially) present from the initial version on. In Devres::drop(), the devres action is removed successfully and subsequently the destructor of the wrapped device resource runs. However, there is no guarantee that the destructor of the wrapped device resource completes before the driver core is done unbinding the corresponding device. If in Devres::drop(), the devres action can't be removed, it means that the devres callback has been executed already, or is still running concurrently. In case of the latter, either Devres::drop() wins revoking the Revocable or the devres callback wins revoking the Revocable. If Devres::drop() wins, we (again) have no guarantee that the destructor of the wrapped device resource completes before the driver core is done unbinding the corresponding device. CPU0 CPU1 ------------------------------------------------------------------------ Devres::drop() { Devres::devres_callback() { self.data.revoke() { this.data.revoke() { is_available.swap() == true is_available.swap == false } } // [...] // device fully unbound drop_in_place() { // release device resource } } } Depending on the specific device resource, this can potentially lead to user-after-free bugs. In order to fix this, implement the following logic. In the devres callback, we're always good when we get to revoke the device resource ourselves, i.e. Revocable::revoke() returns true. If Revocable::revoke() returns false, it means that Devres::drop(), concurrently, already drops the device resource and we have to wait for Devres::drop() to signal that it finished dropping the device resource. Note that if we hit the case where we need to wait for the completion of Devres::drop() in the devres callback, it means that we're actually racing with a concurrent Devres::drop() call, which already started revoking the device resource for us. This is rather unlikely and means that the concurrent Devres::drop() already started doing our work and we just need to wait for it to complete it for us. Hence, there should not be any additional overhead from that. (Actually, for now it's even better if Devres::drop() does the work for us, since it can bypass the synchronize_rcu() call implied by Revocable::revoke(), but this goes away anyways once I get to implement the split devres callback approach, which allows us to first flip the atomics of all registered Devres objects of a certain device, execute a single synchronize_rcu() and then drop all revocable objects.) In Devres::drop() we try to revoke the device resource. If that is *not* successful, it means that the devres callback already did and we're good. Otherwise, we try to remove the devres action, which, if successful, means that we're good, since the device resource has just been revoked by us *before* we removed the devres action successfully. If the devres action could not be removed, it means that the devres callback must be running concurrently, hence we signal that the device resource has been revoked by us, using the completion. This makes it safe to drop a Devres object from any task and at any point of time, which is one of the design goals. Fixes: 76c01ded724b ("rust: add devres abstraction") Reported-by: Alice Ryhl Closes: https://lore.kernel.org/lkml/aD64YNuqbPPZHAa5@google.com/ Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250612121817.1621-4-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 4b76fafb20dd4a2becb94949d78e86bc88006509 Author: Danilo Krummrich Date: Thu Jun 12 14:17:14 2025 +0200 rust: revocable: indicate whether `data` has been revoked already Return a boolean from Revocable::revoke() and Revocable::revoke_nosync() to indicate whether the data has been revoked already. Return true if the data hasn't been revoked yet (i.e. this call revoked the data), false otherwise. This is required by Devres in order to synchronize the completion of the revoke process. Reviewed-by: Benno Lossin Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250612121817.1621-3-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 1b56e765bf8990f1f60e124926c11fc4ac63d752 Author: Danilo Krummrich Date: Thu Jun 12 14:17:13 2025 +0200 rust: completion: implement initial abstraction Implement a minimal abstraction for the completion synchronization primitive. This initial abstraction only adds complete_all() and wait_for_completion(), since that is what is required for the subsequent Devres patch. Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Valentin Schneider Reviewed-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Benno Lossin Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250612121817.1621-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit b62e0efd8a8571460d05922862a451855ebdf3c6 Author: Jens Axboe Date: Fri Jun 13 15:24:53 2025 -0600 io_uring: run local task_work from ring exit IOPOLL reaping In preparation for needing to shift NVMe passthrough to always use task_work for polled IO completions, ensure that those are suitably run at exit time. See commit: 9ce6c9875f3e ("nvme: always punt polled uring_cmd end_io work to task_work") for details on why that is necessary. Signed-off-by: Jens Axboe commit 9ce6c9875f3e995be5fd720b65835291f8a609b1 Author: Jens Axboe Date: Fri Jun 13 13:37:41 2025 -0600 nvme: always punt polled uring_cmd end_io work to task_work Currently NVMe uring_cmd completions will complete locally, if they are polled. This is done because those completions are always invoked from task context. And while that is true, there's no guarantee that it's invoked under the right ring context, or even task. If someone does NVMe passthrough via multiple threads and with a limited number of poll queues, then ringA may find completions from ringB. For that case, completing the request may not be sound. Always just punt the passthrough completions via task_work, which will redirect the completion, if needed. Cc: stable@vger.kernel.org Fixes: 585079b6e425 ("nvme: wire up async polling for io passthrough commands") Signed-off-by: Jens Axboe commit 18531f4d1c8c47c4796289dbbc1ab657ffa063d2 Merge: f688b599d711d1 28b069933d3970 Author: Linus Torvalds Date: Fri Jun 13 13:39:15 2025 -0700 Merge tag 'acpi-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix an ACPI APEI error injection driver failure that started to occur after switching it over to using a faux device, address an EC driver issue related to invalid ECDT tables, clean up the usage of mwait_idle_with_hints() in the ACPI PAD driver, add a new IRQ override quirk, and fix a NULL pointer dereference related to nosmp: - Update the faux device handling code in the driver core and address an ACPI APEI error injection driver failure that started to occur after switching it over to using a faux device on top of that (Dan Williams) - Update data types of variables passed as arguments to mwait_idle_with_hints() in the ACPI PAD (processor aggregator device) driver to match the function definition after recent changes (Uros Bizjak) - Fix a NULL pointer dereference in the ACPI CPPC library that occurs when nosmp is passed to the kernel in the command line (Yunhui Cui) - Ignore ECDT tables with an invalid ID string to prevent using an incorrect GPE for signaling events on some systems (Armin Wolf) - Add a new IRQ override quirk for MACHENIKE 16P (Wentao Guan)" * tag 'acpi-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: resource: Use IRQ override on MACHENIKE 16P ACPI: EC: Ignore ECDT tables with an invalid ID string ACPI: CPPC: Fix NULL pointer dereference when nosmp is used ACPI: PAD: Update arguments of mwait_idle_with_hints() ACPI: APEI: EINJ: Do not fail einj_init() on faux_device_create() failure driver core: faux: Quiet probe failures driver core: faux: Suppress bind attributes commit f688b599d711d169b22e99f2d055847d66c4e0d3 Merge: 02adc1490e6d86 dd3581853c5f19 Author: Linus Torvalds Date: Fri Jun 13 13:27:41 2025 -0700 Merge tag 'pm-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix the cpupower utility installation, fix up the recently added Rust abstractions for cpufreq and OPP, restore the x86 update eliminating mwait_play_dead_cpuid_hint() that has been reverted during the 6.16 merge window along with preventing the failure caused by it from happening, and clean up mwait_idle_with_hints() usage in intel_idle: - Implement CpuId Rust abstraction and use it to fix doctest failure related to the recently introduced cpumask abstraction (Viresh Kumar) - Do minor cleanups in the `# Safety` sections for cpufreq abstractions added recently (Viresh Kumar) - Unbreak cpupower systemd service units installation on some systems by adding a unitdir variable for specifying the location to install them (Francesco Poli) - Eliminate mwait_play_dead_cpuid_hint() again after reverting its elimination during the 6.16 merge window due to a problem with handling "dead" SMT siblings, but this time prevent leaving them in C1 after initialization by taking them online and back offline when a proper cpuidle driver for the platform has been registered (Rafael Wysocki) - Update data types of variables passed as arguments to mwait_idle_with_hints() to match the function definition after recent changes (Uros Bizjak)" * tag 'pm-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: rust: cpu: Add CpuId::current() to retrieve current CPU ID rust: Use CpuId in place of raw CPU numbers rust: cpu: Introduce CpuId abstraction intel_idle: Update arguments of mwait_idle_with_hints() cpufreq: Convert `/// SAFETY` lines to `# Safety` sections cpupower: split unitdir from libdir in Makefile Reapply "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" ACPI: processor: Rescan "dead" SMT siblings during initialization intel_idle: Rescan "dead" SMT siblings during initialization x86/smp: PM/hibernate: Split arch_resume_nosmt() intel_idle: Use subsys_initcall_sync() for initialization commit 28b069933d39708af872d9739e78315317b93031 Merge: 162457f5853ce3 2f76d269073bdb 15eece6c5b05e5 7a0d59f6a913a2 c99ad987d3e9b5 Author: Rafael J. Wysocki Date: Fri Jun 13 21:55:30 2025 +0200 Merge branches 'acpi-pad', 'acpi-cppc', 'acpi-ec' and 'acpi-resource' Merge assorted ACPI updates for 6.16-rc2: - Update data types of variables passed as arguments to mwait_idle_with_hints() in the ACPI PAD (processor aggregator device) driver to match the function definition after recent changes (Uros Bizjak). - Fix a NULL pointer dereference in the ACPI CPPC library that occurs when nosmp is passed to the kernel in the command line (Yunhui Cui). - Ignore ECDT tables with an invalid ID string to prevent using an incorrect GPE for signaling events on some systems (Armin Wolf). - Add a new IRQ override quirk for MACHENIKE 16P (Wentao Guan). * acpi-pad: ACPI: PAD: Update arguments of mwait_idle_with_hints() * acpi-cppc: ACPI: CPPC: Fix NULL pointer dereference when nosmp is used * acpi-ec: ACPI: EC: Ignore ECDT tables with an invalid ID string * acpi-resource: ACPI: resource: Use IRQ override on MACHENIKE 16P commit 907a7a2e5bf40c6a359b2f6cc53d6fdca04009e0 Author: Mario Limonciello Date: Wed Jun 11 18:31:16 2025 -0500 PCI/PM: Set up runtime PM even for devices without PCI PM 4d4c10f763d7 ("PCI: Explicitly put devices into D0 when initializing") intended to put PCI devices into D0, but in doing so unintentionally changed runtime PM initialization not to occur on devices that don't support PCI PM. This caused a regression in vfio-pci due to an imbalance with its use. Adjust the logic in pci_pm_init() so that even if PCI PM isn't supported runtime PM is still initialized. Fixes: 4d4c10f763d7 ("PCI: Explicitly put devices into D0 when initializing") Reported-by: Giovanni Cabiddu Closes: https://lore.kernel.org/linux-pci/20250424043232.1848107-1-superm1@kernel.org/T/#m7e8929d6421690dc8bd6dc639d86c2b4db27cbc4 Reported-by: Nicolas Dichtel Closes: https://lore.kernel.org/linux-pci/20250424043232.1848107-1-superm1@kernel.org/T/#m40d277dcdb9be64a1609a82412d1aa906263e201 Signed-off-by: Mario Limonciello Signed-off-by: Bjorn Helgaas Tested-by: Giovanni Cabiddu Tested-by: Nicolas Dichtel Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Rafael J. Wysocki Cc: Alex Williamson Link: https://patch.msgid.link/20250611233117.61810-1-superm1@kernel.org commit dd3581853c5f190c3a7bd1de78f5ecb2905a77a7 Merge: ea2867608b311a 72840238e2bcb8 Author: Rafael J. Wysocki Date: Fri Jun 13 21:28:07 2025 +0200 Merge branch 'pm-cpuidle' Merge cpuidle updates for 6.16-rc2: - Update data types of variables passed as arguments to mwait_idle_with_hints() to match the function definition after recent changes (Uros Bizjak). - Eliminate mwait_play_dead_cpuid_hint() again after reverting its elimination during the merge window due to a problem with handling "dead" SMT siblings, but this time prevent leaving them in C1 after initialization by taking them online and back offline when a proper cpuidle driver for the platform has been registered (Rafael Wysocki). * pm-cpuidle: intel_idle: Update arguments of mwait_idle_with_hints() Reapply "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" ACPI: processor: Rescan "dead" SMT siblings during initialization intel_idle: Rescan "dead" SMT siblings during initialization x86/smp: PM/hibernate: Split arch_resume_nosmt() intel_idle: Use subsys_initcall_sync() for initialization commit ea2867608b311a4bcf4f231cd065825b5d8dc4f9 Merge: 332d6a94ce80ef d08293ef1ede6a Author: Rafael J. Wysocki Date: Fri Jun 13 21:25:38 2025 +0200 Merge branch 'pm-tools' Merge a cpupower utility fix for 6.16-rc2 that unbreaks systemd service units installation on some sysems (Francesco Poli). * pm-tools: cpupower: split unitdir from libdir in Makefile commit 02adc1490e6d8681cc81057ed86d123d0240909b Merge: 601dddb6c5d6bf 9f0ad43b158d07 Author: Linus Torvalds Date: Fri Jun 13 11:01:44 2025 -0700 Merge tag 'spi-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A collection of driver specific fixes, most minor apart from the OMAP ones which disable some recent performance optimisations in some non-standard cases where we could start driving the bus incorrectly. The change to the stm32-ospi driver to use the newer reset APIs is a fix for interactions with other IP sharing the same reset line in some SoCs" * tag 'spi-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-pci1xxxx: Drop MSI-X usage as unsupported by DMA engine spi: stm32-ospi: clean up on error in probe() spi: stm32-ospi: Make usage of reset_control_acquire/release() API spi: offload: check offload ops existence before disabling the trigger spi: spi-pci1xxxx: Fix error code in probe spi: loongson: Fix build warnings about export.h spi: omap2-mcspi: Disable multi-mode when the previous message kept CS asserted spi: omap2-mcspi: Disable multi mode when CS should be kept asserted after message commit 601dddb6c5d6bf63c63b2efba98231db5f861696 Merge: f90fff1e152ded 06118ae36855b7 Author: Linus Torvalds Date: Fri Jun 13 11:00:19 2025 -0700 Merge tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One minor fix for a leak in the DT parsing code in the max20086 driver" * tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt() commit f90fff1e152dedf52b932240ebbd670d83330eca Author: Oleg Nesterov Date: Fri Jun 13 19:26:50 2025 +0200 posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del() If an exiting non-autoreaping task has already passed exit_notify() and calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent or debugger right after unlock_task_sighand(). If a concurrent posix_cpu_timer_del() runs at that moment, it won't be able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or lock_task_sighand() will fail. Add the tsk->exit_state check into run_posix_cpu_timers() to fix this. This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because exit_task_work() is called before exit_notify(). But the check still makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail anyway in this case. Cc: stable@vger.kernel.org Reported-by: Benoît Sevens Fixes: 0bdd2ed4138e ("sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()") Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds commit 3ca933aad0aca463512d2f54a79fc65b8ecb0f48 Merge: dde63797055cf3 8a157d8a00e815 Author: Linus Torvalds Date: Fri Jun 13 10:51:11 2025 -0700 Merge tag 'trace-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: - Do not free "head" variable in filter_free_subsystem_filters() The first error path jumps to "free_now" label but first frees the newly allocated "head" variable. But the "free_now" code checks this variable, and if it is not NULL, it will iterate the list. As this list variable was already initialized, the "free_now" code will not do anything as it is empty. But freeing it will cause a UAF bug. The error path should simply jump to the "free_now" label and leave the "head" variable alone. * tag 'trace-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Do not free "head" on error path of filter_free_subsystem_filters() commit 13b86ea92ebf0fa587fbadfb8a60ca2e9993203f Author: Raven Black Date: Fri Jun 13 07:51:25 2025 -0400 ASoC: amd: yc: update quirk data for HP Victus Make the internal microphone work on HP Victus laptops. Signed-off-by: Raven Black Link: https://patch.msgid.link/20250613-support-hp-victus-microphone-v1-1-bebc4c3a2041@gmail.com Signed-off-by: Mark Brown commit dc8b60918fc5ba281743f3694e9b671ddbf0e930 Merge: f59427932885f9 fa8fae5f82e48d Author: Mark Brown Date: Fri Jun 13 18:12:49 2025 +0100 ASoC: cs35l56: Change firmware filenames for SoundWire Merge series from Richard Fitzgerald : Change the firmware filename format on SoundWire systems to directly tie it to the physical amp it applies to. This is mainly to decouple it from the ALSA prefix strings to avoid complications when the SoundWire machine driver starts creating dailinks based on SDCA Disco info instead of hardcoded match tables. It also avoids errors from having to rename firmware files from a hardware-address to a ALSA-prefix naming for Linux publication. There are already published firmware files for the L56 B0 silicon so that has a fallback scheme for backward compatibility which has been separated into its own patch on top of the main change. We'd like to get this into 6.16 so that the L63 support starts "clean" with this new naming and we don't have to support one kernel version with L63 using the old naming. Unfortunately we didn't manage to get these patches through internal review and testing before the merge window opened. commit dde63797055cf3615bdac744d641e19e165467bb Merge: ad6159087fbbd7 8046d29dde1700 Author: Linus Torvalds Date: Fri Jun 13 10:05:31 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Rework of system register accessors for system registers that are directly writen to memory, so that sanitisation of the in-memory value happens at the correct time (after the read, or before the write). For convenience, RMW-style accessors are also provided. - Multiple fixes for the so-called "arch-timer-edge-cases' selftest, which was always broken. x86: - Make KVM_PRE_FAULT_MEMORY stricter for TDX, allowing userspace to pass only the "untouched" addresses and flipping the shared/private bit in the implementation. - Disable SEV-SNP support on initialization failure * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/mmu: Reject direct bits in gpa passed to KVM_PRE_FAULT_MEMORY KVM: x86/mmu: Embed direct bits into gpa for KVM_PRE_FAULT_MEMORY KVM: SEV: Disable SEV-SNP support on initialization failure KVM: arm64: selftests: Determine effective counter width in arch_timer_edge_cases KVM: arm64: selftests: Fix xVAL init in arch_timer_edge_cases KVM: arm64: selftests: Fix thread migration in arch_timer_edge_cases KVM: arm64: selftests: Fix help text for arch_timer_edge_cases KVM: arm64: Make __vcpu_sys_reg() a pure rvalue operand KVM: arm64: Don't use __vcpu_sys_reg() to get the address of a sysreg KVM: arm64: Add RMW specific sysreg accessor KVM: arm64: Add assignment-specific sysreg accessor commit 26ec15e4b0c1d7b25214d9c0be1d50492e2f006c Author: Jens Axboe Date: Fri Jun 13 11:01:49 2025 -0600 io_uring/kbuf: don't truncate end buffer for multiple buffer peeks If peeking a bunch of buffers, normally io_ring_buffers_peek() will truncate the end buffer. This isn't optimal as presumably more data will be arriving later, and hence it's better to stop with the last full buffer rather than truncate the end buffer. Cc: stable@vger.kernel.org Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers") Reported-by: Christian Mazakas Signed-off-by: Jens Axboe commit ad6159087fbbd754bfe940bd62b6322307925faa Merge: 36df6f734a7ad6 40a98e702b528c Author: Linus Torvalds Date: Fri Jun 13 09:59:29 2025 -0700 Merge tag 'v6.16-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a broken self-test in hkdf (new regression)" * tag 'v6.16-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: hkdf - move to late_initcall commit 36df6f734a7ad69880c5262543165c47cb57169f Merge: d080d3b5444850 aef22f6fe7a630 Author: Linus Torvalds Date: Fri Jun 13 09:49:07 2025 -0700 Merge tag 'bcachefs-2025-06-12' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "As usual, highlighting the ones users have been noticing: - Fix a small issue with has_case_insensitive not being propagated on snapshot creation; this led to fsck errors, which we're harmless because we're not using this flag yet (it's for overlayfs + casefolding). - Log the error being corrected in the journal when we're doing fsck repair: this was one of the "lessons learned" from the i_nlink 0 -> subvolume deletion bug, where reconstructing what had happened by analyzing the journal was a bit more difficult than it needed to be. - Don't schedule btree node scan to run in the superblock: this fixes a regression from the 6.16 recovery passes rework, and let to it running unnecessarily. The real issue here is that we don't have online, "self healing" style topology repair yet: topology repair currently has to run before we go RW, which means that we may schedule it unnecessarily after a transient error. This will be fixed in the future. - We now track, in btree node flags, the reason it was scheduled to be rewritten. We discovered a deadlock in recovery when many btree nodes need to be rewritten because they're degraded: fully fixing this will take some work but it's now easier to see what's going on. For the bug report where this came up, a device had been kicked RO due to transient errors: manually setting it back to RW was sufficient to allow recovery to succeed. - Mark a few more fsck errors as autofix: as a reminder to users, please do keep reporting cases where something needs to be repaired and is not repaired automatically (i.e. cases where -o fix_errors or fsck -y is required). - rcu_pending.c now works with PREEMPT_RT - 'bcachefs device add', then umount, then remount wasn't working - we now emit a uevent so that the new device's new superblock is correctly picked up - Assorted repair fixes: btree node scan will no longer incorrectly update sb->version_min, - Assorted syzbot fixes" * tag 'bcachefs-2025-06-12' of git://evilpiepirate.org/bcachefs: (23 commits) bcachefs: Don't trace should_be_locked unless changing bcachefs: Ensure that snapshot creation propagates has_case_insensitive bcachefs: Print devices we're mounting on multi device filesystems bcachefs: Don't trust sb->nr_devices in members_to_text() bcachefs: Fix version checks in validate_bset() bcachefs: ioctl: avoid stack overflow warning bcachefs: Don't pass trans to fsck_err() in gc_accounting_done bcachefs: Fix leak in bch2_fs_recovery() error path bcachefs: Fix rcu_pending for PREEMPT_RT bcachefs: Fix downgrade_table_extra() bcachefs: Don't put rhashtable on stack bcachefs: Make sure opts.read_only gets propagated back to VFS bcachefs: Fix possible console lock involved deadlock bcachefs: mark more errors autofix bcachefs: Don't persistently run scan_for_btree_nodes bcachefs: Read error message now prints if self healing bcachefs: Only run 'increase_depth' for keys from btree node csan bcachefs: Mark need_discard_freespace_key_bad autofix bcachefs: Update /dev/disk/by-uuid on device add bcachefs: Add more flags to btree nodes for rewrite reason ... commit ab107276607af90b13a5994997e19b7b9731e251 Author: Madhavan Srinivasan Date: Sat May 17 19:52:37 2025 +0530 powerpc: Fix struct termio related ioctl macros Since termio interface is now obsolete, include/uapi/asm/ioctls.h has some constant macros referring to "struct termio", this caused build failure at userspace. In file included from /usr/include/asm/ioctl.h:12, from /usr/include/asm/ioctls.h:5, from tst-ioctls.c:3: tst-ioctls.c: In function 'get_TCGETA': tst-ioctls.c:12:10: error: invalid application of 'sizeof' to incomplete type 'struct termio' 12 | return TCGETA; | ^~~~~~ Even though termios.h provides "struct termio", trying to juggle definitions around to make it compile could introduce regressions. So better to open code it. Reported-by: Tulio Magno Suggested-by: Nicholas Piggin Tested-by: Justin M. Forbes Reviewed-by: Michael Ellerman Closes: https://lore.kernel.org/linuxppc-dev/8734dji5wl.fsf@ascii.art.br/ Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250517142237.156665-1-maddy@linux.ibm.com commit d57e92dd660014ccac884eda616cafc7b04601e0 Author: Thierry Reding Date: Fri Jun 13 14:30:37 2025 +0200 spi: tegra210-qspi: Remove cache operations The DMA memory for this driver is allocated using dma_alloc_coherent(), which ends up mapping the allocated memory as uncached. Performing the various dma_sync_*() operations on this memory causes issues during SPI flashing: [ 7.818017] pc : dcache_inval_poc+0x40/0x58 [ 7.822128] lr : arch_sync_dma_for_cpu+0x2c/0x4c [ 7.826854] sp : ffff80008193bcf0 [ 7.830267] x29: ffff80008193bcf0 x28: ffffa3fe5ff1e908 x27: ffffa3fe627bb130 [ 7.837528] x26: ffff000086952180 x25: ffff00008015c8ac x24: ffff000086c9b480 [ 7.844878] x23: ffff00008015c800 x22: 0000000000000002 x21: 0000000000010000 [ 7.852229] x20: 0000000106dae000 x19: ffff000080112410 x18: 0000000000000001 [ 7.859580] x17: ffff000080159400 x16: ffffa3fe607a9bd8 x15: ffff0000eac1b180 [ 7.866753] x14: 000000000000000c x13: 0000000000000001 x12: 000000000000025a [ 7.874104] x11: 0000000000000000 x10: 7f73e96357f6a07f x9 : db1fc8072a7f5e3a [ 7.881365] x8 : ffff000086c9c588 x7 : ffffa3fe607a9bd8 x6 : ffff80008193bc28 [ 7.888630] x5 : 000000000000ffff x4 : 0000000000000009 x3 : 000000000000003f [ 7.895892] x2 : 0000000000000040 x1 : ffff000086dbe000 x0 : ffff000086db0000 [ 7.903155] Call trace: [ 7.905606] dcache_inval_poc+0x40/0x58 (P) [ 7.909804] iommu_dma_sync_single_for_cpu+0xb4/0xb8 [ 7.914617] __dma_sync_single_for_cpu+0x158/0x194 [ 7.919428] __this_module+0x5b020/0x5baf8 [spi_tegra210_quad] [ 7.925291] irq_thread_fn+0x2c/0xc0 [ 7.928966] irq_thread+0x16c/0x318 [ 7.932467] kthread+0x12c/0x214 Fix this by removing all calls to the dma_sync_*() functions. This isn't ideal because DMA is used only for relatively large (> 64 words or 256 bytes) and using uncached memory for this might be slow. Reworking this to use cached memory for faster access and reintroducing the cache maintenance calls is probably worth a follow-up patch. Reported-by: Brad Griffis Fixes: 017f1b0bae08 ("spi: tegra210-quad: Add support for internal DMA") Signed-off-by: Thierry Reding Link: https://patch.msgid.link/20250613123037.2082788-1-thierry.reding@gmail.com Signed-off-by: Mark Brown commit 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 Author: Dan Williams Date: Thu Jun 12 12:20:43 2025 -0700 cxl/ras: Fix CPER handler device confusion By inspection, cxl_cper_handle_prot_err() is making a series of fragile assumptions that can lead to crashes: 1/ It assumes that endpoints identified in the record are a CXL-type-3 device, nothing guarantees that. 2/ It assumes that the device is bound to the cxl_pci driver, nothing guarantees that. 3/ Minor, it holds the device lock over the switch-port tracing for no reason as the trace is 100% generated from data in the record. Correct those by checking that the PCIe endpoint parents a cxl_memdev before assuming the format of the driver data, and move the lock to where it is required. Consequently this also makes the implementation ready for CXL accelerators that are not bound to cxl_pci. Fixes: 36f257e3b0ba ("acpi/ghes, cxl/pci: Process CXL CPER Protocol Errors") Cc: Terry Bowman Cc: Li Ming Cc: Alison Schofield Cc: Ira Weiny Cc: Tony Luck Reviewed-by: Smita Koralahalli Reviewed-by: Dave Jiang Signed-off-by: Dan Williams Reviewed-by: Jonathan Cameron Reviewed-by: Li Ming Link: https://patch.msgid.link/20250612192043.2254617-1-dan.j.williams@intel.com Signed-off-by: Dave Jiang commit a403fe6c0b17f472e01246eb350f5eef105243ac Author: Li Ming Date: Fri Jun 13 09:16:48 2025 +0800 cxl/edac: Fix potential memory leak issues In cxl_store_rec_gen_media() and cxl_store_rec_dram(), use kmemdup() to duplicate a cxl gen_media/dram event to store the event in a xarray by xa_store(). The cxl gen_media/dram event allocated by kmemdup() should be freed in the case that the xa_store() fails. Fixes: 0b5ccb0de1e2 ("cxl/edac: Support for finding memory operation attributes from the current boot") Signed-off-by: Li Ming Tested-by: Shiju Jose Reviewed-by: Shiju Jose Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250613011648.102840-1-ming.li@zohomail.com Signed-off-by: Dave Jiang commit db3dfae1a2f662e69d535827703bcdbb04b8d72b Author: Bagas Sanjaya Date: Fri Jun 13 09:38:57 2025 +0700 Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists Stephen Rothwell reports htmldocs warning on ublk docs: Documentation/block/ublk.rst:414: ERROR: Unexpected indentation. [docutils] Fix the warning by separating sublists of auto buffer registration fallback behavior from their appropriate parent list item. Fixes: ff20c516485e ("ublk: document auto buffer registration(UBLK_F_AUTO_BUF_REG)") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250612132638.193de386@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250613023857.15971-1-bagasdotme@gmail.com Signed-off-by: Jens Axboe commit f9705d66fa7107fcd619083f7aae2afb0554a593 Author: Jason Gunthorpe Date: Tue Jun 3 16:14:45 2025 -0300 iommu/tegra: Fix incorrect size calculation This driver uses a mixture of ways to get the size of a PTE, tegra_smmu_set_pde() did it as sizeof(*pd) which became wrong when pd switched to a struct tegra_pd. Switch pd back to a u32* in tegra_smmu_set_pde() so the sizeof(*pd) returns 4. Fixes: 50568f87d1e2 ("iommu/terga: Do not use struct page as the handle for as->pd memory") Reported-by: Diogo Ivo Closes: https://lore.kernel.org/all/62e7f7fe-6200-4e4f-ad42-d58ad272baa6@tecnico.ulisboa.pt/ Signed-off-by: Jason Gunthorpe Acked-by: Thierry Reding Reviewed-by: Jerry Snitselaar Tested-by: Diogo Ivo Link: https://lore.kernel.org/r/0-v1-da7b8b3d57eb+ce-iommu_terga_sizeof_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 553ab30a181043f01b99a493ba13f9c011eb75ae Author: Bagas Sanjaya Date: Wed Jun 11 09:08:06 2025 +0700 Documentation: nouveau: Update GSP message queue kernel-doc reference GSP message queue docs has been moved following RPC handling split in commit 8a8b1ec5261f20 ("drm/nouveau/gsp: split rpc handling out on its own"), before GSP-RM implementation is versioned in commit c472d828348caf ("drm/nouveau/gsp: move subdev/engine impls to subdev/gsp/rm/r535/"). However, the kernel-doc reference in nouveau docs is left behind, which triggers htmldocs warnings: ERROR: Cannot find file ./drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c WARNING: No kernel-doc for file ./drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c Update the reference. Fixes: c472d828348c ("drm/nouveau/gsp: move subdev/engine impls to subdev/gsp/rm/r535/") Fixes: 8a8b1ec5261f ("drm/nouveau/gsp: split rpc handling out on its own") Signed-off-by: Bagas Sanjaya Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20250611020805.22418-2-bagasdotme@gmail.com Signed-off-by: Danilo Krummrich commit 61b2b3737499f1fb361a54a16828db24a8345e85 Author: Jacob Keller Date: Tue Jun 10 14:54:51 2025 -0700 drm/nouveau/bl: increase buffer size to avoid truncate warning The nouveau_get_backlight_name() function generates a unique name for the backlight interface, appending an id from 1 to 99 for all backlight devices after the first. GCC 15 (and likely other compilers) produce the following -Wformat-truncation warning: nouveau_backlight.c: In function ‘nouveau_backlight_init’: nouveau_backlight.c:56:69: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Werror=format-truncation=] 56 | snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb); | ^~ In function ‘nouveau_get_backlight_name’, inlined from ‘nouveau_backlight_init’ at nouveau_backlight.c:351:7: nouveau_backlight.c:56:56: note: directive argument in the range [1, 2147483647] 56 | snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb); | ^~~~~~~~~~~~~~~~ nouveau_backlight.c:56:17: note: ‘snprintf’ output between 14 and 23 bytes into a destination of size 15 56 | snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The warning started appearing after commit ab244be47a8f ("drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()") This fix for the ida usage removed the explicit value check for ids larger than 99. The compiler is unable to intuit that the ida_alloc_max() limits the returned value range between 0 and 99. Because the compiler can no longer infer that the number ranges from 0 to 99, it thinks that it could use as many as 11 digits (10 + the potential - sign for negative numbers). The warning has gone unfixed for some time, with at least one kernel test robot report. The code breaks W=1 builds, which is especially frustrating with the introduction of CONFIG_WERROR. The string is stored temporarily on the stack and then copied into the device name. Its not a big deal to use 11 more bytes of stack rounding out to an even 24 bytes. Increase BL_NAME_SIZE to 24 to avoid the truncation warning. This fixes the W=1 builds that include this driver. Compile tested only. Fixes: ab244be47a8f ("drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312050324.0kv4PnfZ-lkp@intel.com/ Suggested-by: Timur Tabi Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20250610-jk-nouveua-drm-bl-snprintf-fix-v2-1-7fdd4b84b48e@intel.com Signed-off-by: Danilo Krummrich commit 9802f0a63b641f4cddb2139c814c2e95cb825099 Author: Zhi Wang Date: Tue May 27 16:37:12 2025 +0000 drm/nouveau: fix a use-after-free in r535_gsp_rpc_push() The RPC container is released after being passed to r535_gsp_rpc_send(). When sending the initial fragment of a large RPC and passing the caller's RPC container, the container will be freed prematurely. Subsequent attempts to send remaining fragments will therefore result in a use-after-free. Allocate a temporary RPC container for holding the initial fragment of a large RPC when sending. Free the caller's container when all fragments are successfully sent. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Zhi Wang Link: https://lore.kernel.org/r/20250527163712.3444-1-zhiw@nvidia.com [ Rebase onto Blackwell changes. - Danilo ] Signed-off-by: Danilo Krummrich commit 08a0d93c353bd55de8b5fb77b464d89425be0215 Author: Sven Peter Date: Wed Jun 11 15:18:53 2025 +0000 arm64: dts: apple: Move touchbar mipi {address,size}-cells from dtsi to dts Move the {address,size}-cells property from the (disabled) touchbar screen mipi node inside the dtsi file to the model-specific dts file where it's enabled to fix the following W=1 warnings: t8103.dtsi:404.34-433.5: Warning (avoid_unnecessary_addr_size): /soc/dsi@228600000: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property t8112.dtsi:419.34-448.5: Warning (avoid_unnecessary_addr_size): /soc/dsi@228600000: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property Fixes: 7275e795e520 ("arm64: dts: apple: Add touchbar screen nodes") Reviewed-by: Janne Grunau Link: https://lore.kernel.org/r/20250611-display-pipe-mipi-warning-v1-1-bd80ba2c0eea@kernel.org Signed-off-by: Sven Peter commit 811a909978bf59caa25359e0aca4e30500dcff26 Author: Sven Peter Date: Tue Jun 10 19:19:24 2025 +0000 arm64: dts: apple: Drop {address,size}-cells from SPI NOR Fix the following warning by dropping #{address,size}-cells from the SPI NOR node which only has a single child node without reg property: spi1-nvram.dtsi:19.10-38.4: Warning (avoid_unnecessary_addr_size): /soc/spi@235104000/flash@0: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property Fixes: 3febe9de5ca5 ("arm64: dts: apple: Add SPI NOR nvram partition to all devices") Reviewed-by: Janne Grunau Link: https://lore.kernel.org/r/20250610-apple-dts-warnings-v1-1-70b53e8108a0@kernel.org Signed-off-by: Sven Peter commit ac1daa91e9370e3b88ef7826a73d62a4d09e2717 Author: Janne Grunau Date: Wed Jun 11 22:30:31 2025 +0200 arm64: dts: apple: t8103: Fix PCIe BCM4377 nodename Fix the following `make dtbs_check` warnings for all t8103 based devices: arch/arm64/boot/dts/apple/t8103-j274.dtb: network@0,0: $nodename:0: 'network@0,0' does not match '^wifi(@.*)?$' from schema $id: http://devicetree.org/schemas/net/wireless/brcm,bcm4329-fmac.yaml# arch/arm64/boot/dts/apple/t8103-j274.dtb: network@0,0: Unevaluated properties are not allowed ('local-mac-address' was unexpected) from schema $id: http://devicetree.org/schemas/net/wireless/brcm,bcm4329-fmac.yaml# Fixes: bf2c05b619ff ("arm64: dts: apple: t8103: Expose PCI node for the WiFi MAC address") Signed-off-by: Janne Grunau Reviewed-by: Sven Peter Link: https://lore.kernel.org/r/20250611-arm64_dts_apple_wifi-v1-1-fb959d8e1eb4@jannau.net Signed-off-by: Sven Peter commit 80626ae6ffe57917915c6e6d8ea1e908689954fd Author: Colin Ian King Date: Thu May 22 14:15:12 2025 +0100 drm/nouveau/gsp: Fix potential integer overflow on integer shifts The left shift int 32 bit integer constants 1 is evaluated using 32 bit arithmetic and then assigned to a 64 bit unsigned integer. In the case where the shift is 32 or more this can lead to an overflow. Avoid this by shifting using the BIT_ULL macro instead. Fixes: 6c3ac7bcfcff ("drm/nouveau/gsp: support deeper page tables in COPY_SERVER_RESERVED_PDES") Signed-off-by: Colin Ian King Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250522131512.2768310-1-colin.i.king@gmail.com commit 8a2277a3c9e4cc5398f80821afe7ecbe9bdf2819 Author: Gyeyoung Baek Date: Thu Jun 12 21:48:27 2025 +0900 genirq/irq_sim: Initialize work context pointers properly Initialize `ops` member's pointers properly by using kzalloc() instead of kmalloc() when allocating the simulation work context. Otherwise the pointers contain random content leading to invalid dereferencing. Signed-off-by: Gyeyoung Baek Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250612124827.63259-1-gye976@gmail.com commit 72218d74c9c57b8ea36c2a58875dff406fc10462 Author: Brian Norris Date: Thu Jun 12 11:32:52 2025 -0700 genirq/cpuhotplug: Restore affinity even for suspended IRQ Commit 788019eb559f ("genirq: Retain disable depth for managed interrupts across CPU hotplug") tried to make managed shutdown/startup properly reference counted, but it missed the fact that the unplug and hotplug code has an intentional imbalance by skipping IRQS_SUSPENDED interrupts on the "restore" path. This means that if a managed-affinity interrupt was both suspended and managed-shutdown (such as may happen during system suspend / S3), resume skips calling irq_startup_managed(), and would again have an unbalanced depth this time, with a positive value (i.e., remaining unexpectedly masked). This IRQS_SUSPENDED check was introduced in commit a60dd06af674 ("genirq/cpuhotplug: Skip suspended interrupts when restoring affinity") for essentially the same reason as commit 788019eb559f, to prevent that irq_startup() would unconditionally re-enable an interrupt too early. Because irq_startup_managed() now respsects the disable-depth count, the IRQS_SUSPENDED check is not longer needed, and instead, it causes harm. Thus, drop the IRQS_SUSPENDED check, and restore balance. This effectively reverts commit a60dd06af674 ("genirq/cpuhotplug: Skip suspended interrupts when restoring affinity"), because it is replaced by commit 788019eb559f ("genirq: Retain disable depth for managed interrupts across CPU hotplug"). Fixes: 788019eb559f ("genirq: Retain disable depth for managed interrupts across CPU hotplug") Reported-by: Aleksandrs Vinarskis Signed-off-by: Brian Norris Signed-off-by: Thomas Gleixner Tested-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/all/20250612183303.3433234-3-briannorris@chromium.org Closes: https://lore.kernel.org/lkml/24ec4adc-7c80-49e9-93ee-19908a97ab84@gmail.com/ commit 2b32fc8ff08deac3aa509f321a28e21b1eea5525 Author: Brian Norris Date: Thu Jun 12 11:32:51 2025 -0700 genirq/cpuhotplug: Rebalance managed interrupts across multi-CPU hotplug Commit 788019eb559f ("genirq: Retain disable depth for managed interrupts across CPU hotplug") intended to only decrement the disable depth once per managed shutdown, but instead it decrements for each CPU hotplug in the affinity mask, until its depth reaches a point where it finally gets re-started. For example, consider: 1. Interrupt is affine to CPU {M,N} 2. disable_irq() -> depth is 1 3. CPU M goes offline -> interrupt migrates to CPU N / depth is still 1 4. CPU N goes offline -> irq_shutdown() / depth is 2 5. CPU N goes online -> irq_restore_affinity_of_irq() -> irqd_is_managed_and_shutdown()==true -> irq_startup_managed() -> depth is 1 6. CPU M goes online -> irq_restore_affinity_of_irq() -> irqd_is_managed_and_shutdown()==true -> irq_startup_managed() -> depth is 0 *** BUG: driver expects the interrupt is still disabled *** -> irq_startup() -> irqd_clr_managed_shutdown() 7. enable_irq() -> depth underflow / unbalanced enable_irq() warning This should clear the managed-shutdown flag at step 6, so that further hotplugs don't cause further imbalance. Note: It might be cleaner to also remove the irqd_clr_managed_shutdown() invocation from __irq_startup_managed(). But this is currently not possible because of irq_update_affinity_desc() as it sets IRQD_MANAGED_SHUTDOWN and expects irq_startup() to clear it. Fixes: 788019eb559f ("genirq: Retain disable depth for managed interrupts across CPU hotplug") Reported-by: Aleksandrs Vinarskis Signed-off-by: Brian Norris Signed-off-by: Thomas Gleixner Tested-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/all/20250612183303.3433234-2-briannorris@chromium.org commit b5acc3628898baa63658bc4125f9525f9b3dd4f3 Author: Niklas Cassel Date: Thu Jun 12 16:17:51 2025 +0200 ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard A user has bisected a regression which causes graphical corruptions on his screen to commit 7627a0edef54 ("ata: ahci: Drop low power policy board type"). Simply reverting commit 7627a0edef54 ("ata: ahci: Drop low power policy board type") makes the graphical corruptions on his screen to go away. (Note: there are no visible messages in dmesg that indicates a problem with AHCI.) The user also reports that the problem occurs regardless if there is an HDD or an SSD connected via AHCI, so the problem is not device related. The devices also work fine on other motherboards, so it seems specific to the ASUSPRO-D840SA motherboard. While enabling low power modes for AHCI is not supposed to affect completely unrelated hardware, like a graphics card, it does however allow the system to enter deeper PC-states, which could expose ACPI issues that were previously not visible (because the system never entered these lower power states before). There are previous examples where enabling LPM exposed serious BIOS/ACPI bugs, see e.g. commit 240630e61870 ("ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS"). Since there hasn't been any BIOS update in years for the ASUSPRO-D840SA motherboard, disable LPM for this board, in order to avoid entering lower PC-states, which triggers graphical corruptions. Cc: stable@vger.kernel.org Reported-by: Andy Yang Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220111 Fixes: 7627a0edef54 ("ata: ahci: Drop low power policy board type") Reviewed-by: Damien Le Moal Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250612141750.2108342-2-cassel@kernel.org Signed-off-by: Niklas Cassel commit 5e223e06ee7c6d8f630041a0645ac90e39a42cc6 Author: Matthew Wilcox (Oracle) Date: Thu Jun 12 15:42:53 2025 +0100 block: Fix bvec_set_folio() for very large folios Similarly to 26064d3e2b4d ("block: fix adding folio to bio"), if we attempt to add a folio that is larger than 4GB, we'll silently truncate the offset and len. Widen the parameters to size_t, assert that the length is less than 4GB and set the first page that contains the interesting data rather than the first page of the folio. Fixes: 26db5ee15851 (block: add a bvec_set_folio helper) Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20250612144255.2850278-1-willy@infradead.org Signed-off-by: Jens Axboe commit f826ec7966a63d48e16e0868af4e038bf9a1a3ae Author: Matthew Wilcox (Oracle) Date: Thu Jun 12 15:41:25 2025 +0100 bio: Fix bio_first_folio() for SPARSEMEM without VMEMMAP It is possible for physically contiguous folios to have discontiguous struct pages if SPARSEMEM is enabled and SPARSEMEM_VMEMMAP is not. This is correctly handled by folio_page_idx(), so remove this open-coded implementation. Fixes: 640d1930bef4 (block: Add bio_for_each_folio_all()) Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20250612144126.2849931-1-willy@infradead.org Signed-off-by: Jens Axboe commit e2468dc700743683e1d1793bbd855e2536fd3de2 Author: Kurt Borja Date: Wed Jun 11 18:30:40 2025 -0300 Revert "platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1" This reverts commit 5ff79cabb23a2f14d2ed29e9596aec908905a0e6. Although the Alienware m16 R1 AMD model supports G-Mode, it actually has a lower power ceiling than plain "performance" profile, which results in lower performance. Reported-by: Cihan Ozakca Cc: stable@vger.kernel.org # 6.15.x Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250611-m16-rev-v1-1-72d13bad03c9@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9ba75ccad85708c5a484637dccc1fc59295b0a83 Author: Mario Limonciello Date: Wed Jun 11 15:33:40 2025 -0500 platform/x86/amd/pmc: Add PCSpecialist Lafite Pro V 14M to 8042 quirks list Every other s2idle cycle fails to reach hardware sleep when keyboard wakeup is enabled. This appears to be an EC bug, but the vendor refuses to fix it. It was confirmed that turning off i8042 wakeup avoids ths issue (albeit keyboard wakeup is disabled). Take the lesser of two evils and add it to the i8042 quirk list. Reported-by: Raoul Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220116 Tested-by: Raoul Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250611203341.3733478-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9f0ad43b158d07bc7144d219ceabdea36e28e392 Author: Thangaraj Samynathan Date: Thu Jun 12 08:00:59 2025 +0530 spi: spi-pci1xxxx: Drop MSI-X usage as unsupported by DMA engine Removes MSI-X from the interrupt request path, as the DMA engine used by the SPI controller does not support MSI-X interrupts. Signed-off-by: Thangaraj Samynathan Link: https://patch.msgid.link/20250612023059.71726-1-thangaraj.s@microchip.com Signed-off-by: Mark Brown commit f59427932885f9b47b22b532b079478905b9ad08 Author: Sven Peter Date: Thu Jun 12 21:11:34 2025 +0000 ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig When the first driver for Apple Silicon was upstreamed we accidentally included `default ARCH_APPLE` in its Kconfig which then spread to almost every subsequent driver. As soon as ARCH_APPLE is set to y this will pull in many drivers as built-ins which is not what we want. Thus, drop `default ARCH_APPLE` from Kconfig. Signed-off-by: Sven Peter Reviewed-by: Janne Grunau Link: https://patch.msgid.link/20250612-apple-kconfig-defconfig-v1-10-0e6f9cb512c1@kernel.org Signed-off-by: Mark Brown commit ac90aad0e9bf7c37e706fdc08ce763a553890bdf Author: Eric Biggers Date: Thu Jun 12 10:47:09 2025 -0700 crypto: testmgr - reinstate kconfig control over full self-tests Commit 698de822780f ("crypto: testmgr - make it easier to enable the full set of tests") removed support for building kernels that run only the "fast" set of crypto self-tests by default. This assumed that nearly everyone actually wanted the full set of tests, *if* they had already chosen to enable the tests at all. Unfortunately, it turns out that both Debian and Fedora intentionally have the crypto self-tests enabled in their production kernels. And for production kernels we do need to keep the testing time down, which implies just running the "fast" tests, not the full set of tests. For Fedora, a reason for enabling the tests in production is that they are being (mis)used to meet the FIPS 140-3 pre-operational testing requirement. However, the other reason for enabling the tests in production, which applies to both distros, is that they provide some value in protecting users from buggy drivers. Unfortunately, the crypto/ subsystem has many buggy and untested drivers for off-CPU hardware accelerators on rare platforms. These broken drivers get shipped to users, and there have been multiple examples of the tests preventing these buggy drivers from being used. So effectively, the tests are being relied on in production kernels. I think this is kind of crazy (untested drivers should just not be enabled at all), but that seems to be how things work currently. Thus, reintroduce a kconfig option that controls the level of testing. Call it CRYPTO_SELFTESTS_FULL instead of the original name CRYPTO_MANAGER_EXTRA_TESTS, which was slightly misleading. Moreover, given the "production kernel" use case, make CRYPTO_SELFTESTS depend on EXPERT instead of DEBUG_KERNEL. I also haven't reinstated all the #ifdefs in crypto/testmgr.c. Instead, just rely on the compiler to optimize out unused code. Fixes: 40b9969796bf ("crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS") Fixes: 698de822780f ("crypto: testmgr - make it easier to enable the full set of tests") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 93adf20ff4d6e865e0b974110d3cf2f07c057177 Author: wangdicheng Date: Fri Jun 13 14:36:36 2025 +0800 ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card PCM1 not in Pulseaudio's control list; standardize control to "Speaker" and "Headphone". Signed-off-by: wangdicheng Cc: Link: https://patch.msgid.link/20250613063636.239683-1-wangdich9700@163.com Signed-off-by: Takashi Iwai commit b0823d5fbacb1c551d793cbfe7af24e0d1fa45ed Author: Kan Liang Date: Thu Jun 12 07:38:18 2025 -0700 perf/x86/intel: Fix crash in icl_update_topdown_event() The perf_fuzzer found a hard-lockup crash on a RaptorLake machine: Oops: general protection fault, maybe for address 0xffff89aeceab400: 0000 CPU: 23 UID: 0 PID: 0 Comm: swapper/23 Tainted: [W]=WARN Hardware name: Dell Inc. Precision 9660/0VJ762 RIP: 0010:native_read_pmc+0x7/0x40 Code: cc e8 8d a9 01 00 48 89 03 5b cd cc cc cc cc 0f 1f ... RSP: 000:fffb03100273de8 EFLAGS: 00010046 .... Call Trace: icl_update_topdown_event+0x165/0x190 ? ktime_get+0x38/0xd0 intel_pmu_read_event+0xf9/0x210 __perf_event_read+0xf9/0x210 CPUs 16-23 are E-core CPUs that don't support the perf metrics feature. The icl_update_topdown_event() should not be invoked on these CPUs. It's a regression of commit: f9bdf1f95339 ("perf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read") The bug introduced by that commit is that the is_topdown_event() function is mistakenly used to replace the is_topdown_count() call to check if the topdown functions for the perf metrics feature should be invoked. Fix it. Fixes: f9bdf1f95339 ("perf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read") Closes: https://lore.kernel.org/lkml/352f0709-f026-cd45-e60c-60dfd97f73f3@maine.edu/ Reported-by: Vince Weaver Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Vince Weaver Cc: stable@vger.kernel.org # v6.15+ Link: https://lore.kernel.org/r/20250612143818.2889040-1-kan.liang@linux.intel.com commit e75cb6010838f61b9d63e921d1763a8ab177e38e Author: J. Neuschäfer Date: Wed Jun 11 21:01:01 2025 +0200 powerpc: dts: mpc8315erdb: Add GPIO controller node The MPC8315E SoC and variants have a GPIO controller at IMMR + 0xc00. This node was previously missing from the device tree. Signed-off-by: J. Neuschäfer Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250611-mpc-gpio-v1-1-02d1f75336e2@posteo.net commit 4e6d080acfda5344ccbc63afe778830e22be4be9 Author: J. Neuschäfer Date: Wed Jun 11 23:07:49 2025 +0200 powerpc/microwatt: Fix model property in device tree The standard property for the model name is called "model". Signed-off-by: J. Neuschäfer Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250611-microwatt-v2-1-80847bbc5f9c@posteo.net commit 33bc69cf6655cf60829a803a45275f11a74899e5 Author: Narayana Murty N Date: Thu May 8 02:29:28 2025 -0400 powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery VFIO EEH recovery for PCI passthrough devices fails on PowerNV and pseries platforms due to missing host-side PE bridge reconfiguration. In the current implementation, eeh_pe_configure() only performs RTAS or OPAL-based bridge reconfiguration for native host devices, but skips it entirely for PEs managed through VFIO in guest passthrough scenarios. This leads to incomplete EEH recovery when a PCI error affects a passthrough device assigned to a QEMU/KVM guest. Although VFIO triggers the EEH recovery flow through VFIO_EEH_PE_ENABLE ioctl, the platform-specific bridge reconfiguration step is silently bypassed. As a result, the PE's config space is not fully restored, causing subsequent config space access failures or EEH freeze-on-access errors inside the guest. This patch fixes the issue by ensuring that eeh_pe_configure() always invokes the platform's configure_bridge() callback (e.g., pseries_eeh_phb_configure_bridge) even for VFIO-managed PEs. This ensures that RTAS or OPAL calls to reconfigure the PE bridge are correctly issued on the host side, restoring the PE's configuration space after an EEH event. This fix is essential for reliable EEH recovery in QEMU/KVM guests using VFIO PCI passthrough on PowerNV and pseries systems. Tested with: - QEMU/KVM guest using VFIO passthrough (IBM Power9,(lpar)Power11 host) - Injected EEH errors with pseries EEH errinjct tool on host, recovery verified on qemu guest. - Verified successful config space access and CAP_EXP DevCtl restoration after recovery Fixes: 212d16cdca2d ("powerpc/eeh: EEH support for VFIO PCI device") Signed-off-by: Narayana Murty N Reviewed-by: Vaibhav Jain Reviewed-by: Ganesh Goudar Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250508062928.146043-1-nnmlinux@linux.ibm.com commit b93755f408325170edb2156c6a894ed1cae5f4f6 Author: Christophe Leroy Date: Mon May 12 20:14:55 2025 +0200 powerpc/vdso: Fix build of VDSO32 with pcrel Building vdso32 on power10 with pcrel leads to following errors: VDSO32A arch/powerpc/kernel/vdso/gettimeofday-32.o arch/powerpc/kernel/vdso/gettimeofday.S: Assembler messages: arch/powerpc/kernel/vdso/gettimeofday.S:40: Error: syntax error; found `@', expected `,' arch/powerpc/kernel/vdso/gettimeofday.S:71: Info: macro invoked from here arch/powerpc/kernel/vdso/gettimeofday.S:40: Error: junk at end of line: `@notoc' arch/powerpc/kernel/vdso/gettimeofday.S:71: Info: macro invoked from here ... make[2]: *** [arch/powerpc/kernel/vdso/Makefile:85: arch/powerpc/kernel/vdso/gettimeofday-32.o] Error 1 make[1]: *** [arch/powerpc/Makefile:388: vdso_prepare] Error 2 Once the above is fixed, the following happens: VDSO32C arch/powerpc/kernel/vdso/vgettimeofday-32.o cc1: error: '-mpcrel' requires '-mcmodel=medium' make[2]: *** [arch/powerpc/kernel/vdso/Makefile:89: arch/powerpc/kernel/vdso/vgettimeofday-32.o] Error 1 make[1]: *** [arch/powerpc/Makefile:388: vdso_prepare] Error 2 make: *** [Makefile:251: __sub-make] Error 2 Make sure pcrel version of CFUNC() macro is used only for powerpc64 builds and remove -mpcrel for powerpc32 builds. Fixes: 7e3a68be42e1 ("powerpc/64: vmlinux support building with PCREL addresing") Signed-off-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/1fa3453f07d42a50a70114da9905bf7b73304fca.1747073669.git.christophe.leroy@csgroup.eu commit 2e3395ab2a358ba8d1c80d8df35dcfb882cfc28e Author: Thomas Zimmermann Date: Thu Jun 12 10:53:02 2025 +0200 drm/mgag200: Do not include Fix the compile-time warning drivers/gpu/drm/mgag200/mgag200_ddc.c: warning: EXPORT_SYMBOL() is not used, but #include is present Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250612085308.203861-1-tzimmermann@suse.de commit d742f3ec1cb91c4dd86b981f55cd291e07f03094 Author: Thomas Zimmermann Date: Thu Jun 12 10:42:55 2025 +0200 drm/ast: Do not include Fix the compile-time warning drivers/gpu/drm/ast/ast_mode.c: warning: EXPORT_SYMBOL() is not used, but #include is present Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250612084257.200907-1-tzimmermann@suse.de commit 1364af9cb2c5716f1905113cc84ff77ddf16a22e Merge: a24823d14b2d35 afe382843717d4 Author: Dave Airlie Date: Fri Jun 13 14:57:09 2025 +1000 Merge tag 'drm-misc-fixes-2025-06-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.16-rc2: - Fix infinite EPROBE_DEFER loop in vc4 probing. - Fix amdxdna firmware size. - mode fixes for meson. - Kconfig fix for st7171-i2c. - Fix -EBUSY WARN_ON_ONCE in dma-buf - Use dma_sync_sgtable_for_cpu in udmabuf. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/62c06195-8bc1-4dae-8777-e86d94e4d9d9@linux.intel.com commit bb666b7c27073b986b75699e51a7102910f58060 Author: Lorenzo Stoakes Date: Mon Jun 9 17:57:49 2025 +0100 mm: add mmap_prepare() compatibility layer for nested file systems Nested file systems, that is those which invoke call_mmap() within their own f_op->mmap() handlers, may encounter underlying file systems which provide the f_op->mmap_prepare() hook introduced by commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file callback"). We have a chicken-and-egg scenario here - until all file systems are converted to using .mmap_prepare(), we cannot convert these nested handlers, as we can't call f_op->mmap from an .mmap_prepare() hook. So we have to do it the other way round - invoke the .mmap_prepare() hook from an .mmap() one. in order to do so, we need to convert VMA state into a struct vm_area_desc descriptor, invoking the underlying file system's f_op->mmap_prepare() callback passing a pointer to this, and then setting VMA state accordingly and safely. This patch achieves this via the compat_vma_mmap_prepare() function, which we invoke from call_mmap() if f_op->mmap_prepare() is specified in the passed in file pointer. We place the fundamental logic into mm/vma.h where VMA manipulation belongs. We also update the VMA userland tests to accommodate the changes. The compat_vma_mmap_prepare() function and its associated machinery is temporary, and will be removed once the conversion of file systems is complete. We carefully place this code so it can be used with CONFIG_MMU and also with cutting edge nommu silicon. [akpm@linux-foundation.org: export compat_vma_mmap_prepare tp fix build] [lorenzo.stoakes@oracle.com: remove unused declarations] Link: https://lkml.kernel.org/r/ac3ae324-4c65-432a-8c6d-2af988b18ac8@lucifer.local Link: https://lkml.kernel.org/r/20250609165749.344976-1-lorenzo.stoakes@oracle.com Fixes: c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file callback"). Signed-off-by: Lorenzo Stoakes Reported-by: Jann Horn Closes: https://lore.kernel.org/linux-mm/CAG48ez04yOEVx1ekzOChARDDBZzAKwet8PEoPM4Ln3_rk91AzQ@mail.gmail.com/ Reviewed-by: Pedro Falcato Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Cc: Liam Howlett Signed-off-by: Andrew Morton commit 5466491c9e3309ed5c7adbb8fad6e93fcc9a8fe9 Author: Brett Creeley Date: Mon Jun 9 14:28:27 2025 -0700 ionic: Prevent driver/fw getting out of sync on devcmd(s) Some stress/negative firmware testing around devcmd(s) returning EAGAIN found that the done bit could get out of sync in the firmware when it wasn't cleared in a retry case. While here, change the type of the local done variable to a bool to match the return type from ionic_dev_cmd_done(). Fixes: ec8ee714736e ("ionic: stretch heartbeat detection") Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250609212827.53842-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit a24823d14b2d35909e1299d10c34d85dfbf23434 Merge: 19272b37aa4f83 9c7632faad434c Author: Dave Airlie Date: Fri Jun 13 11:05:23 2025 +1000 Merge tag 'drm-xe-fixes-2025-06-12' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix regression disallowing 64K SVM migration (Maarten) - Use a bounce buffer for WA BB (Lucas) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aEsBQoh5Si3ouPgE@fedora commit 8b3ac9fabaa825b7bae850ee7b4580c5cba32699 Author: Benjamin Coddington Date: Mon Jun 9 13:21:56 2025 -0400 SUNRPC: Cleanup/fix initial rq_pages allocation While investigating some reports of memory-constrained NUMA machines failing to mount v3 and v4.0 nfs mounts, we found that svc_init_buffer() was not attempting to retry allocations from the bulk page allocator. Typically, this results in a single page allocation being returned and the mount attempt fails with -ENOMEM. A retry would have allowed the mount to succeed. Additionally, it seems that the bulk allocation in svc_init_buffer() is redundant because svc_alloc_arg() will perform the required allocation and does the correct thing to retry the allocations. The call to allocate memory in svc_alloc_arg() drops the preferred node argument, but I expect we'll still allocate on the preferred node because the allocation call happens within the svc thread context, which chooses the node with memory closest to the current thread's execution. This patch cleans out the bulk allocation in svc_init_buffer() to allow svc_alloc_arg() to handle the allocation/retry logic for rq_pages. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Fixes: ed603bcf4fea ("sunrpc: Replace the rq_pages array with dynamically-allocated memory") Signed-off-by: Chuck Lever commit 32ce6b3a83b71d8abf0c0837dc78775f16c9902f Author: Chuck Lever Date: Sun Jun 8 18:08:51 2025 -0400 NFSD: Avoid corruption of a referring call list The new code neglects to remove a freshly-allocated RCL from the callback's referring call list when no matching referring call is found. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202505171002.cE46sdj5-lkp@intel.com/ Fixes: 4f3c8d8c9e10 ("NFSD: Implement CB_SEQUENCE referring call lists") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 2aa5801ada29948ce510fc8b1e3b3ec8162423e2 Author: Palmer Dabbelt Date: Tue Jun 10 14:30:58 2025 -0700 RISC-V: uaccess: Wrap the get_user_8 uaccess macro I must have lost this rebasing things during the merge window, I know I got it at some point but it's not here now. Without this I get warnings along the lines of include/linux/fs.h:3975:15: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] 3975 | if (unlikely(get_user(c, path))) | ^ arch/riscv/include/asm/uaccess.h:274:3: note: expanded from macro 'get_user' 274 | __get_user((x), __p) : \ | ^ arch/riscv/include/asm/uaccess.h:244:2: note: expanded from macro '__get_user' 244 | __get_user_error(__gu_val, __gu_ptr, __gu_err); \ | ^ arch/riscv/include/asm/uaccess.h:207:2: note: expanded from macro '__get_user_error' 207 | __ge LD [M] net/802/psnap.ko t_user_nocheck(x, ptr, __gu_failed); \ | ^ arch/riscv/include/asm/uaccess.h:196:3: note: expanded from macro '__get_user_nocheck' 196 | __get_user_8((x), __gu_ptr, label); \ | ^ arch/riscv/include/asm/uaccess.h:130:2: note: expanded from macro '__get_user_8' 130 | u32 __user *__ptr = (u32 __user *)(ptr); \ | ^ Link: https://lore.kernel.org/r/20250610213058.24852-1-palmer@dabbelt.com Reviewed-by: Alexandre Ghiti Cc: stable@vger.kernel.org Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()") Signed-off-by: Palmer Dabbelt commit d080d3b54448501ddb0f9e1f85a8043253100f55 Merge: 27605c8c0f69e3 11fcf368506d34 Author: Linus Torvalds Date: Thu Jun 12 12:32:09 2025 -0700 Merge tag 'bitmap-for-6.16-rc2' of https://github.com/norov/linux Pull bitmap fix from Yury Norov: "Fix for __GENMASK() and __GENMASK_ULL() in UAPI" * tag 'bitmap-for-6.16-rc2' of https://github.com/norov/linux: uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again commit dbe0038b65ff4b8c13b862f24c0381e0d9196e5f Merge: 5c5ecd1f3413cc bc75552b80e668 Author: Palmer Dabbelt Date: Thu Jun 12 12:20:46 2025 -0700 Merge patch "Fix a segmentation fault also add raid6test for RISC-V support" This is a fix in the middle of a feature set, so I'm going to take the fix onto fixes on its own. * b4-shazam-merge: raid6: riscv: Fix NULL pointer dereference issue Link: https://lore.kernel.org/r/20250610101234.1100660-1-zhangchunyan@iscas.ac.cn Signed-off-by: Palmer Dabbelt commit bc75552b80e6683b2def5a0459433607ea4788f5 Author: Chunyan Zhang Date: Tue Jun 10 18:12:32 2025 +0800 raid6: riscv: Fix NULL pointer dereference caused by a missing clobber When running the raid6 user-space test program on RISC-V QEMU, there's a segmentation fault which seems caused by accessing a NULL pointer, which is the pointer variable p/q in raid6_rvv*_gen/xor_syndrome_real(), p/q should have been equal to dptr[x], but when I use GDB command to see its value, which was 0x10 like below: " Program received signal SIGSEGV, Segmentation fault. 0x0000000000011062 in raid6_rvv2_xor_syndrome_real (disks=, start=0, stop=, bytes=4096, ptrs=) at rvv.c:386 (gdb) p p $1 = (u8 *) 0x10 " The issue was found to be related with: 1) Compile optimization There's no segmentation fault if compiling the raid6test program with the optimization flag -O0. 2) The RISC-V vector command vsetvli If not used t0 as the first parameter in vsetvli, there's no segmentation fault either. This patch selects the 2nd solution to fix the issue. [Palmer: The actual issue here is a missing clobber in the vsetvli code. It's a little tricky: we've already probed for VLENB so we don't need to look at the output register, we just need to have an X register in the instruction as that's the form required to actually set VL. Thus we clobber a register, and without describing that we end up breaking compilers.] Fixes: 6093faaf9593 ("raid6: Add RISC-V SIMD syndrome and recovery calculations") Signed-off-by: Chunyan Zhang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250610101234.1100660-3-zhangchunyan@iscas.ac.cn Signed-off-by: Palmer Dabbelt commit 5c5ecd1f3413cce5474a16255f4212680d3ca5d5 Merge: 8d90d9872edae7 2b9518684f8558 Author: Palmer Dabbelt Date: Thu Jun 12 11:59:05 2025 -0700 Merge tag 'riscv-fixes-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into fixes riscv fixes for 6.16-rc1 - A fix for the newly introduced getrandom vdso where clang optimizes away a register variable which is both an input and an output parameter - A fix for theadvector where we did not save all the vector registers, only a few of them * tag 'riscv-fixes-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux: RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper riscv: vector: Fix context save/restore with xtheadvector commit 2b9518684f8558cd61a7c608cc03a27822cf7b03 Author: Xi Ruoyao Date: Fri Jun 6 17:24:44 2025 +0800 RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper As recently pointed out by Thomas, if a register is forced for two different register variables, among them one is used as "+" (both input and output) and another is only used as input, Clang would treat the conflicting input parameters as undefined behaviour and optimize away the argument assignment. Instead use "=r" (only output) for the output parameter and "r" (only input) for the input parameter. While the example from the GCC documentation uses "0" for the input parameter, this is not necessary as confirmed by the GCC developers and "r" matches what the other architectures' vDSO implementations are using. [ alex: Update log to match v2 (Thomas) ] Link: https://lore.kernel.org/all/20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@linutronix.de/ Link: https://gcc.gnu.org/onlinedocs/gcc-15.1.0/gcc/Local-Register-Variables.html Link: https://gcc.gnu.org/pipermail/gcc-help/2025-June/144266.html Cc: Thomas Weißschuh Cc: Nathan Chancellor Signed-off-by: Xi Ruoyao Reviewed-by: Thomas Weißschuh Fixes: ee0d03053e70 ("RISC-V: vDSO: Wire up getrandom() vDSO") Link: https://lore.kernel.org/r/20250606092443.73650-2-xry111@xry111.site Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 4262bd0d9cc704ea1365ac00afc1272400c2cbef Author: Han Gao Date: Fri May 23 18:25:56 2025 +0800 riscv: vector: Fix context save/restore with xtheadvector Previously only v0-v7 were correctly saved/restored, and the context of v8-v31 are damanged. Correctly save/restore v8-v31 to avoid breaking userspace. Fixes: d863910eabaf ("riscv: vector: Support xtheadvector save/restore") Cc: stable@vger.kernel.org Signed-off-by: Han Gao Tested-by: Xiongchuan Tan Reviewed-by: Charlie Jenkins Reviewed-by: Yanteng Si Reviewed-by: Andy Chiu Link: https://lore.kernel.org/r/9b9eb2337f3d5336ce813721f8ebea51e0b2b553.1747994822.git.rabenda.cn@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 72dd7961a4bb4fa1fc456169a61dd12e68e50645 Author: Bharath SM Date: Wed Jun 11 16:59:02 2025 +0530 smb: improve directory cache reuse for readdir operations Currently, cached directory contents were not reused across subsequent 'ls' operations because the cache validity check relied on comparing the ctx pointer, which changes with each readdir invocation. As a result, the cached dir entries was not marked as valid and the cache was not utilized for subsequent 'ls' operations. This change uses the file pointer, which remains consistent across all readdir calls for a given directory instance, to associate and validate the cache. As a result, cached directory contents can now be correctly reused, improving performance for repeated directory listings. Performance gains with local windows SMB server: Without the patch and default actimeo=1: 1000 directory enumeration operations on dir with 10k files took 135.0s With this patch and actimeo=0: 1000 directory enumeration operations on dir with 10k files took just 5.1s Signed-off-by: Bharath SM Reviewed-by: Shyam Prasad N Cc: stable@vger.kernel.org Signed-off-by: Steve French commit b64af6bcd3b0f3fc633d6a70adb0991737abfef4 Author: Paulo Alcantara Date: Thu Jun 12 12:45:04 2025 -0300 smb: client: fix perf regression with deferred closes Customer reported that one of their applications started failing to open files with STATUS_INSUFFICIENT_RESOURCES due to NetApp server hitting the maximum number of opens to same file that it would allow for a single client connection. It turned out the client was failing to reuse open handles with deferred closes because matching ->f_flags directly without masking off O_CREAT|O_EXCL|O_TRUNC bits first broke the comparision and then client ended up with thousands of deferred closes to same file. Those bits are already satisfied on the original open, so no need to check them against existing open handles. Reproducer: #include #include #include #include #include #include #define NR_THREADS 4 #define NR_ITERATIONS 2500 #define TEST_FILE "/mnt/1/test/dir/foo" static char buf[64]; static void *worker(void *arg) { int i, j; int fd; for (i = 0; i < NR_ITERATIONS; i++) { fd = open(TEST_FILE, O_WRONLY|O_CREAT|O_APPEND, 0666); for (j = 0; j < 16; j++) write(fd, buf, sizeof(buf)); close(fd); } } int main(int argc, char *argv[]) { pthread_t t[NR_THREADS]; int fd; int i; fd = open(TEST_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0666); close(fd); memset(buf, 'a', sizeof(buf)); for (i = 0; i < NR_THREADS; i++) pthread_create(&t[i], NULL, worker, NULL); for (i = 0; i < NR_THREADS; i++) pthread_join(t[i], NULL); return 0; } Before patch: $ mount.cifs //srv/share /mnt/1 -o ... $ mkdir -p /mnt/1/test/dir $ gcc repro.c && ./a.out ... number of opens: 1391 After patch: $ mount.cifs //srv/share /mnt/1 -o ... $ mkdir -p /mnt/1/test/dir $ gcc repro.c && ./a.out ... number of opens: 1 Cc: linux-cifs@vger.kernel.org Cc: David Howells Cc: Jay Shin Cc: Pierguido Lambri Fixes: b8ea3b1ff544 ("smb: enable reuse of deferred file handles for write operations") Acked-by: Shyam Prasad N Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 27605c8c0f69e319df156b471974e4e223035378 Merge: 9cc7d5904bab74 d5705afbaca2f5 Author: Linus Torvalds Date: Thu Jun 12 09:50:36 2025 -0700 Merge tag 'net-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and wireless. Current release - regressions: - af_unix: allow passing cred for embryo without SO_PASSCRED/SO_PASSPIDFD Current release - new code bugs: - eth: airoha: correct enable mask for RX queues 16-31 - veth: prevent NULL pointer dereference in veth_xdp_rcv when peer disappears under traffic - ipv6: move fib6_config_validate() to ip6_route_add(), prevent invalid routes Previous releases - regressions: - phy: phy_caps: don't skip better duplex match on non-exact match - dsa: b53: fix untagged traffic sent via cpu tagged with VID 0 - Revert "wifi: mwifiex: Fix HT40 bandwidth issue.", it caused transient packet loss, exact reason not fully understood, yet Previous releases - always broken: - net: clear the dst when BPF is changing skb protocol (IPv4 <> IPv6) - sched: sfq: fix a potential crash on gso_skb handling - Bluetooth: intel: improve rx buffer posting to avoid causing issues in the firmware - eth: intel: i40e: make reset handling robust against multiple requests - eth: mlx5: ensure FW pages are always allocated on the local NUMA node, even when device is configure to 'serve' another node - wifi: ath12k: fix GCC_GCC_PCIE_HOT_RST definition for WCN7850, prevent kernel crashes - wifi: ath11k: avoid burning CPU in ath11k_debugfs_fw_stats_request() for 3 sec if fw_stats_done is not set" * tag 'net-6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (70 commits) selftests: drv-net: rss_ctx: Add test for ntuple rules targeting default RSS context net: ethtool: Don't check if RSS context exists in case of context 0 af_unix: Allow passing cred for embryo without SO_PASSCRED/SO_PASSPIDFD. ipv6: Move fib6_config_validate() to ip6_route_add(). net: drv: netdevsim: don't napi_complete() from netpoll net/mlx5: HWS, Add error checking to hws_bwc_rule_complex_hash_node_get() veth: prevent NULL pointer dereference in veth_xdp_rcv net_sched: remove qdisc_tree_flush_backlog() net_sched: ets: fix a race in ets_qdisc_change() net_sched: tbf: fix a race in tbf_change() net_sched: red: fix a race in __red_change() net_sched: prio: fix a race in prio_tune() net_sched: sch_sfq: reject invalid perturb period net: phy: phy_caps: Don't skip better duplex macth on non-exact match MAINTAINERS: Update Kuniyuki Iwashima's email address. selftests: net: add test case for NAT46 looping back dst net: clear the dst when changing skb protocol net/mlx5e: Fix number of lanes to UNKNOWN when using data_rate_oper net/mlx5e: Fix leak of Geneve TLV option object net/mlx5: HWS, make sure the uplink is the last destination ... commit 39dfc971e42d886e7df01371cd1bef505076d84c Author: Tengda Wu Date: Wed Jun 4 00:55:33 2025 +0000 arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() KASAN reports a stack-out-of-bounds read in regs_get_kernel_stack_nth(). Call Trace: [ 97.283505] BUG: KASAN: stack-out-of-bounds in regs_get_kernel_stack_nth+0xa8/0xc8 [ 97.284677] Read of size 8 at addr ffff800089277c10 by task 1.sh/2550 [ 97.285732] [ 97.286067] CPU: 7 PID: 2550 Comm: 1.sh Not tainted 6.6.0+ #11 [ 97.287032] Hardware name: linux,dummy-virt (DT) [ 97.287815] Call trace: [ 97.288279] dump_backtrace+0xa0/0x128 [ 97.288946] show_stack+0x20/0x38 [ 97.289551] dump_stack_lvl+0x78/0xc8 [ 97.290203] print_address_description.constprop.0+0x84/0x3c8 [ 97.291159] print_report+0xb0/0x280 [ 97.291792] kasan_report+0x84/0xd0 [ 97.292421] __asan_load8+0x9c/0xc0 [ 97.293042] regs_get_kernel_stack_nth+0xa8/0xc8 [ 97.293835] process_fetch_insn+0x770/0xa30 [ 97.294562] kprobe_trace_func+0x254/0x3b0 [ 97.295271] kprobe_dispatcher+0x98/0xe0 [ 97.295955] kprobe_breakpoint_handler+0x1b0/0x210 [ 97.296774] call_break_hook+0xc4/0x100 [ 97.297451] brk_handler+0x24/0x78 [ 97.298073] do_debug_exception+0xac/0x178 [ 97.298785] el1_dbg+0x70/0x90 [ 97.299344] el1h_64_sync_handler+0xcc/0xe8 [ 97.300066] el1h_64_sync+0x78/0x80 [ 97.300699] kernel_clone+0x0/0x500 [ 97.301331] __arm64_sys_clone+0x70/0x90 [ 97.302084] invoke_syscall+0x68/0x198 [ 97.302746] el0_svc_common.constprop.0+0x11c/0x150 [ 97.303569] do_el0_svc+0x38/0x50 [ 97.304164] el0_svc+0x44/0x1d8 [ 97.304749] el0t_64_sync_handler+0x100/0x130 [ 97.305500] el0t_64_sync+0x188/0x190 [ 97.306151] [ 97.306475] The buggy address belongs to stack of task 1.sh/2550 [ 97.307461] and is located at offset 0 in frame: [ 97.308257] __se_sys_clone+0x0/0x138 [ 97.308910] [ 97.309241] This frame has 1 object: [ 97.309873] [48, 184) 'args' [ 97.309876] [ 97.310749] The buggy address belongs to the virtual mapping at [ 97.310749] [ffff800089270000, ffff800089279000) created by: [ 97.310749] dup_task_struct+0xc0/0x2e8 [ 97.313347] [ 97.313674] The buggy address belongs to the physical page: [ 97.314604] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14f69a [ 97.315885] flags: 0x15ffffe00000000(node=1|zone=2|lastcpupid=0xfffff) [ 97.316957] raw: 015ffffe00000000 0000000000000000 dead000000000122 0000000000000000 [ 97.318207] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 97.319445] page dumped because: kasan: bad access detected [ 97.320371] [ 97.320694] Memory state around the buggy address: [ 97.321511] ffff800089277b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 97.322681] ffff800089277b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 97.323846] >ffff800089277c00: 00 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 00 00 00 [ 97.325023] ^ [ 97.325683] ffff800089277c80: 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3 [ 97.326856] ffff800089277d00: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 This issue seems to be related to the behavior of some gcc compilers and was also fixed on the s390 architecture before: commit d93a855c31b7 ("s390/ptrace: Avoid KASAN false positives in regs_get_kernel_stack_nth()") As described in that commit, regs_get_kernel_stack_nth() has confirmed that `addr` is on the stack, so reading the value at `*addr` should be allowed. Use READ_ONCE_NOCHECK() helper to silence the KASAN check for this case. Fixes: 0a8ea52c3eb1 ("arm64: Add HAVE_REGS_AND_STACK_ACCESS_API feature") Signed-off-by: Tengda Wu Link: https://lore.kernel.org/r/20250604005533.1278992-1-wutengda@huaweicloud.com [will: Use '*addr' as the argument to READ_ONCE_NOCHECK()] Signed-off-by: Will Deacon commit d2be3270f40b1330f8c1c9512c59dd085a758ac0 Author: Mark Brown Date: Wed Jun 11 17:28:13 2025 +0100 arm64/gcs: Don't call gcs_free() during flush_gcs() Currently we call gcs_free() during flush_gcs() to reset the thread state for GCS. This includes unmapping any kernel allocated GCS, but this is redundant when doing a flush_thread() since we are reinitialising the thread memory too. Inline the reinitialisation of the thread struct. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20250611-arm64-gcs-flush-thread-v1-1-cc26feeddabd@kernel.org Signed-off-by: Will Deacon commit 9c7632faad434c98f1f2cc06f3647a5a5d05ddbf Author: Lucas De Marchi Date: Wed Jun 4 08:03:05 2025 -0700 drm/xe/lrc: Use a temporary buffer for WA BB In case the BO is in iomem, we can't simply take the vaddr and write to it. Instead, prepare a separate buffer that is later copied into io memory. Right now it's just a few words that could be using xe_map_write32(), but the intention is to grow the WA BB for other uses. Fixes: 617d824c5323 ("drm/xe: Add WA BB to capture active context utilization") Cc: Umesh Nerlige Ramappa Cc: Tvrtko Ursulin Reviewed-by: Matthew Brost Reviewed-by: Umesh Nerlige Ramappa Link: https://lore.kernel.org/r/20250604-wa-bb-fix-v1-1-0dfc5dafcef0@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit ef48715b2d3df17c060e23b9aa636af3d95652f8) Signed-off-by: Thomas Hellström commit 9cc7d5904bab74f54aad4948a04535c1f07c74d8 Merge: 3d853391c44196 5558f27a58459a Author: Linus Torvalds Date: Thu Jun 12 08:21:13 2025 -0700 Merge tag 'pinctrl-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Add some missing pins on the Qualcomm QCM2290, along with a managed resources patch that make it clean and nice - Drop an unused function in the ST Micro driver - Drop bouncing MAINTAINER entry - Drop of_match_ptr() macro to rid compile warnings in the TB10x driver - Fix up calculation of pin numbers from base in the Sunxi driver * tag 'pinctrl-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunxi: dt: Consider pin base when calculating bank number from pin pinctrl: tb10x: Drop of_match_ptr for ID table pinctrl: MAINTAINERS: Drop bouncing Jianlong Huang pinctrl: st: Drop unused st_gpio_bank() function pinctrl: qcom: pinctrl-qcm2290: Add missing pins pinctrl: qcom: switch to devm_gpiochip_add_data() commit 3d853391c441965d30cc94d00d59e8bb2dd0668c Merge: 2c4a1f3fe03eda 179e949719fe81 Author: Linus Torvalds Date: Thu Jun 12 08:17:56 2025 -0700 Merge tag 'arc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - arch_atomic64_cmpxchg relaxed variant [Jason] - use of inbuilt swap in stack unwinder [Yu-Chun Lin] - use of __ASSEMBLER__ in kernel headers [Thomas Huth] * tag 'arc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers ARC: unwind: Use built-in sort swap to reduce code size and improve performance ARC: atomics: Implement arch_atomic64_cmpxchg using _relaxed commit d5705afbaca2f5b3fb8766391ca6c43105d229b2 Merge: 613fd52ea75d70 f87586598fffac Author: Jakub Kicinski Date: Thu Jun 12 08:16:47 2025 -0700 Merge tag 'wireless-2025-06-12' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Another quick round of updates: - revert mwifiex HT40 that was causing issues - many ath10k/ath11k/ath12k fixes - re-add some iwlwifi code I lost in a merge - use kfree_sensitive() on an error path in cfg80211 * tag 'wireless-2025-06-12' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211: use kfree_sensitive() for connkeys cleanup wifi: iwlwifi: fix merge damage related to iwl_pci_resume Revert "wifi: mwifiex: Fix HT40 bandwidth issue." wifi: ath12k: fix uaf in ath12k_core_init() wifi: ath12k: Fix hal_reo_cmd_status kernel-doc wifi: ath12k: fix GCC_GCC_PCIE_HOT_RST definition for WCN7850 wifi: ath11k: validate ath11k_crypto_mode on top of ath11k_core_qmi_firmware_ready wifi: ath11k: consistently use ath11k_mac_get_fw_stats() wifi: ath11k: move locking outside of ath11k_mac_get_fw_stats() wifi: ath11k: adjust unlock sequence in ath11k_update_stats_event() wifi: ath11k: move some firmware stats related functions outside of debugfs wifi: ath11k: don't wait when there is no vdev started wifi: ath11k: don't use static variables in ath11k_debugfs_fw_stats_process() wifi: ath11k: avoid burning CPU in ath11k_debugfs_fw_stats_request() wil6210: fix support for sparrow chipsets wifi: ath10k: Avoid vdev delete timeout when firmware is already down ath10k: snoc: fix unbalanced IRQ enable in crash recovery ==================== Link: https://patch.msgid.link/20250612082519.11447-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 613fd52ea75d70275fa67de0af5af2b5d65bed16 Merge: d5441acae780c3 56c5d291e88538 Author: Jakub Kicinski Date: Thu Jun 12 08:15:37 2025 -0700 Merge branch 'fix-ntuple-rules-targeting-default-rss' Gal Pressman says: ==================== Fix ntuple rules targeting default RSS This series addresses a regression in ethtool flow steering where rules targeting the default RSS context (context 0) were incorrectly rejected. The default RSS context always exists but is not stored in the rss_ctx xarray like additional contexts. The current validation logic was checking for the existence of context 0 in this array, causing valid flow steering rules to be rejected. This prevented configurations such as: - High priority rules directing specific traffic to the default context - Low priority catch-all rules directing remaining traffic to additional contexts Patch 1 fixes the validation logic to skip the existence check for context 0. Patch 2 adds a selftest that verifies this behavior. v3: https://lore.kernel.org/20250609120250.1630125-1-gal@nvidia.com v2: https://lore.kernel.org/20250225071348.509432-1-gal@nvidia.com ==================== Link: https://patch.msgid.link/20250612071958.1696361-1-gal@nvidia.com Signed-off-by: Jakub Kicinski commit 56c5d291e88538621029e5c7c5f60540d37846a8 Author: Gal Pressman Date: Thu Jun 12 10:19:58 2025 +0300 selftests: drv-net: rss_ctx: Add test for ntuple rules targeting default RSS context Add test_rss_default_context_rule() to verify that ntuple rules can correctly direct traffic to the default RSS context (context 0). The test creates two ntuple rules with explicit location priorities: - A high-priority rule (loc 0) directing specific port traffic to context 0. - A low-priority rule (loc 1) directing all other TCP traffic to context 1. This validates that: 1. Rules targeting the default context function properly. 2. Traffic steering works as expected when mixing default and additional RSS contexts. The test was written by AI, and reviewed by humans. Reviewed-by: Nimrod Oren Signed-off-by: Gal Pressman Link: https://patch.msgid.link/20250612071958.1696361-3-gal@nvidia.com Signed-off-by: Jakub Kicinski commit d78ebc772c7ceccf6e655ddb93099f49a1268af4 Author: Gal Pressman Date: Thu Jun 12 10:19:57 2025 +0300 net: ethtool: Don't check if RSS context exists in case of context 0 Context 0 (default context) always exists, there is no need to check whether it exists or not when adding a flow steering rule. The existing check fails when creating a flow steering rule for context 0 as it is not stored in the rss_ctx xarray. For example: $ ethtool --config-ntuple eth2 flow-type tcp4 dst-ip 194.237.147.23 dst-port 19983 context 0 loc 618 rmgr: Cannot insert RX class rule: Invalid argument Cannot insert classification rule An example usecase for this could be: - A high-priority rule (loc 0) directing specific port traffic to context 0. - A low-priority rule (loc 1) directing all other TCP traffic to context 1. This is a user-visible regression that was caught in our testing environment, it was not reported by a user yet. Fixes: de7f7582dff2 ("net: ethtool: prevent flow steering to RSS contexts which don't exist") Reviewed-by: Tariq Toukan Reviewed-by: Nimrod Oren Signed-off-by: Gal Pressman Reviewed-by: Joe Damato Reviewed-by: Edward Cree Link: https://patch.msgid.link/20250612071958.1696361-2-gal@nvidia.com Signed-off-by: Jakub Kicinski commit d5441acae780c346c04213a62d3eb189216daab1 Merge: 43fb2b30eea7cf 7dd38ba4acbea9 Author: Jakub Kicinski Date: Thu Jun 12 08:13:47 2025 -0700 Merge tag 'for-net-2025-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - eir: Fix NULL pointer deference on eir_get_service_data - eir: Fix possible crashes on eir_create_adv_data - hci_sync: Fix broadcast/PA when using an existing instance - ISO: Fix using BT_SK_PA_SYNC to detect BIS sockets - ISO: Fix not using bc_sid as advertisement SID - MGMT: Fix sparse errors * tag 'for-net-2025-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: MGMT: Fix sparse errors Bluetooth: ISO: Fix not using bc_sid as advertisement SID Bluetooth: ISO: Fix using BT_SK_PA_SYNC to detect BIS sockets Bluetooth: eir: Fix possible crashes on eir_create_adv_data Bluetooth: hci_sync: Fix broadcast/PA when using an existing instance Bluetooth: Fix NULL pointer deference on eir_get_service_data ==================== Link: https://patch.msgid.link/20250611204944.1559356-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 43fb2b30eea7cfc40214484935b026ec29838a91 Author: Kuniyuki Iwashima Date: Wed Jun 11 13:27:35 2025 -0700 af_unix: Allow passing cred for embryo without SO_PASSCRED/SO_PASSPIDFD. Before the cited commit, the kernel unconditionally embedded SCM credentials to skb for embryo sockets even when both the sender and listener disabled SO_PASSCRED and SO_PASSPIDFD. Now, the credentials are added to skb only when configured by the sender or the listener. However, as reported in the link below, it caused a regression for some programs that assume credentials are included in every skb, but sometimes not now. The only problematic scenario would be that a socket starts listening before setting the option. Then, there will be 2 types of non-small race window, where a client can send skb without credentials, which the peer receives as an "invalid" message (and aborts the connection it seems ?): Client Server ------ ------ s1.listen() <-- No SO_PASS{CRED,PIDFD} s2.connect() s2.send() <-- w/o cred s1.setsockopt(SO_PASS{CRED,PIDFD}) s2.send() <-- w/ cred or Client Server ------ ------ s1.listen() <-- No SO_PASS{CRED,PIDFD} s2.connect() s2.send() <-- w/o cred s3, _ = s1.accept() <-- Inherit cred options s2.send() <-- w/o cred but not set yet s3.setsockopt(SO_PASS{CRED,PIDFD}) s2.send() <-- w/ cred It's unfortunate that buggy programs depend on the behaviour, but let's restore the previous behaviour. Fixes: 3f84d577b79d ("af_unix: Inherit sk_flags at connect().") Reported-by: Jacek Łuczak Closes: https://lore.kernel.org/all/68d38b0b-1666-4974-85d4-15575789c8d4@gmail.com/ Signed-off-by: Kuniyuki Iwashima Tested-by: Christian Heusel Tested-by: André Almeida Tested-by: Jacek Łuczak Link: https://patch.msgid.link/20250611202758.3075858-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit b3979e3d2fc92bf1a2da614fc383b75b9859ef58 Author: Kuniyuki Iwashima Date: Wed Jun 11 12:35:02 2025 -0700 ipv6: Move fib6_config_validate() to ip6_route_add(). syzkaller created an IPv6 route from a malformed packet, which has a prefix len > 128, triggering the splat below. [0] This is a similar issue fixed by commit 586ceac9acb7 ("ipv6: Restore fib6_config validation for SIOCADDRT."). The cited commit removed fib6_config validation from some callers of ip6_add_route(). Let's move the validation back to ip6_route_add() and ip6_route_multipath_add(). [0]: UBSAN: array-index-out-of-bounds in ./include/net/ipv6.h:616:34 index 20 is out of range for type '__u8 [16]' CPU: 1 UID: 0 PID: 7444 Comm: syz.0.708 Not tainted 6.16.0-rc1-syzkaller-g19272b37aa4f #0 PREEMPT Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [] dump_stack+0x1c/0x24 lib/dump_stack.c:129 [] ubsan_epilogue+0x14/0x46 lib/ubsan.c:233 [] __ubsan_handle_out_of_bounds+0xf6/0xf8 lib/ubsan.c:455 [] ipv6_addr_prefix include/net/ipv6.h:616 [inline] [] ip6_route_info_create+0x8f8/0x96e net/ipv6/route.c:3793 [] ip6_route_add+0x2a/0x1aa net/ipv6/route.c:3889 [] addrconf_prefix_route+0x2c4/0x4e8 net/ipv6/addrconf.c:2487 [] addrconf_prefix_rcv+0x1720/0x1e62 net/ipv6/addrconf.c:2878 [] ndisc_router_discovery+0x1a06/0x3504 net/ipv6/ndisc.c:1570 [] ndisc_rcv+0x500/0x600 net/ipv6/ndisc.c:1874 [] icmpv6_rcv+0x145e/0x1e0a net/ipv6/icmp.c:988 [] ip6_protocol_deliver_rcu+0x18a/0x1976 net/ipv6/ip6_input.c:436 [] ip6_input_finish+0xf4/0x174 net/ipv6/ip6_input.c:480 [] NF_HOOK include/linux/netfilter.h:317 [inline] [] NF_HOOK include/linux/netfilter.h:311 [inline] [] ip6_input+0x16a/0x70c net/ipv6/ip6_input.c:491 [] ip6_mc_input+0x5c8/0x1268 net/ipv6/ip6_input.c:588 [] dst_input include/net/dst.h:469 [inline] [] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] [] NF_HOOK include/linux/netfilter.h:317 [inline] [] NF_HOOK include/linux/netfilter.h:311 [inline] [] ipv6_rcv+0x5ae/0x6e0 net/ipv6/ip6_input.c:309 [] __netif_receive_skb_one_core+0x106/0x16e net/core/dev.c:5977 [] __netif_receive_skb+0x2c/0x144 net/core/dev.c:6090 [] netif_receive_skb_internal net/core/dev.c:6176 [inline] [] netif_receive_skb+0x1aa/0xbf2 net/core/dev.c:6235 [] tun_rx_batched.isra.0+0x430/0x686 drivers/net/tun.c:1485 [] tun_get_user+0x2952/0x3d6c drivers/net/tun.c:1938 [] tun_chr_write_iter+0xc4/0x21c drivers/net/tun.c:1984 [] new_sync_write fs/read_write.c:593 [inline] [] vfs_write+0x56c/0xa9a fs/read_write.c:686 [] ksys_write+0x126/0x228 fs/read_write.c:738 [] __do_sys_write fs/read_write.c:749 [inline] [] __se_sys_write fs/read_write.c:746 [inline] [] __riscv_sys_write+0x6e/0x94 fs/read_write.c:746 [] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 [] do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:341 [] handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197 Fixes: fa76c1674f2e ("ipv6: Move some validation from ip6_route_info_create() to rtm_to_fib6_config().") Reported-by: syzbot+4c2358694722d304c44e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6849b8c3.a00a0220.1eb5f5.00f0.GAE@google.com/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250611193551.2999991-1-kuni1840@gmail.com Signed-off-by: Jakub Kicinski commit 1264971017b4d7141352a7fe29021bdfce5d885d Author: Jakub Kicinski Date: Wed Jun 11 10:46:43 2025 -0700 net: drv: netdevsim: don't napi_complete() from netpoll netdevsim supports netpoll. Make sure we don't call napi_complete() from it, since it may not be scheduled. Breno reports hitting a warning in napi_complete_done(): WARNING: CPU: 14 PID: 104 at net/core/dev.c:6592 napi_complete_done+0x2cc/0x560 __napi_poll+0x2d8/0x3a0 handle_softirqs+0x1fe/0x710 This is presumably after netpoll stole the SCHED bit prematurely. Reported-by: Breno Leitao Fixes: 3762ec05a9fb ("netdevsim: add NAPI support") Tested-by: Breno Leitao Link: https://patch.msgid.link/20250611174643.2769263-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1619bdf4389c829f16af5c7d5b4fa5f1673614d7 Author: Dan Carpenter Date: Wed Jun 11 16:14:32 2025 +0300 net/mlx5: HWS, Add error checking to hws_bwc_rule_complex_hash_node_get() Check for if ida_alloc() or rhashtable_lookup_get_insert_fast() fails. Fixes: 17e0accac577 ("net/mlx5: HWS, support complex matchers") Signed-off-by: Dan Carpenter Reviewed-by: Yevgeny Kliteynik Link: https://patch.msgid.link/aEmBONjyiF6z5yCV@stanley.mountain Signed-off-by: Jakub Kicinski commit 9337c54401a5bb6ac3c9f6c71dd2a9130cfba82e Author: Jesper Dangaard Brouer Date: Wed Jun 11 14:40:04 2025 +0200 veth: prevent NULL pointer dereference in veth_xdp_rcv The veth peer device is RCU protected, but when the peer device gets deleted (veth_dellink) then the pointer is assigned NULL (via RCU_INIT_POINTER). This patch adds a necessary NULL check in veth_xdp_rcv when accessing the veth peer net_device. This fixes a bug introduced in commit dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to reduce TX drops"). The bug is a race and only triggers when having inflight packets on a veth that is being deleted. Reported-by: Ihor Solodrai Closes: https://lore.kernel.org/all/fecfcad0-7a16-42b8-bff2-66ee83a6e5c4@linux.dev/ Reported-by: syzbot+c4c7bf27f6b0c4bd97fe@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/683da55e.a00a0220.d8eae.0052.GAE@google.com/ Fixes: dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to reduce TX drops") Signed-off-by: Jesper Dangaard Brouer Acked-by: Ihor Solodrai Link: https://patch.msgid.link/174964557873.519608.10855046105237280978.stgit@firesoul Signed-off-by: Jakub Kicinski commit a844b0c864a28e43affa3f1a048414b7122def40 Merge: 7ca52541c05c83 adcaa890c7a4a9 Author: Jakub Kicinski Date: Thu Jun 12 08:05:53 2025 -0700 Merge branch 'net_sched-no-longer-use-qdisc_tree_flush_backlog' Eric Dumazet says: ==================== net_sched: no longer use qdisc_tree_flush_backlog() This series is based on a report from Gerrard Tai. Essentially, all users of qdisc_tree_flush_backlog() are racy. We must instead use qdisc_purge_queue(). ==================== Link: https://patch.msgid.link/20250611111515.1983366-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit adcaa890c7a4a91a422168d8fb629183fff07b2f Author: Eric Dumazet Date: Wed Jun 11 11:15:15 2025 +0000 net_sched: remove qdisc_tree_flush_backlog() This function is no longer used after the four prior fixes. Given all prior uses were wrong, it seems better to remove it. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250611111515.1983366-6-edumazet@google.com Signed-off-by: Jakub Kicinski commit d92adacdd8c2960be856e0b82acc5b7c5395fddb Author: Eric Dumazet Date: Wed Jun 11 11:15:14 2025 +0000 net_sched: ets: fix a race in ets_qdisc_change() Gerrard Tai reported a race condition in ETS, whenever SFQ perturb timer fires at the wrong time. The race is as follows: CPU 0 CPU 1 [1]: lock root [2]: qdisc_tree_flush_backlog() [3]: unlock root | | [5]: lock root | [6]: rehash | [7]: qdisc_tree_reduce_backlog() | [4]: qdisc_put() This can be abused to underflow a parent's qlen. Calling qdisc_purge_queue() instead of qdisc_tree_flush_backlog() should fix the race, because all packets will be purged from the qdisc before releasing the lock. Fixes: b05972f01e7d ("net: sched: tbf: don't call qdisc_put() while holding tree lock") Reported-by: Gerrard Tai Suggested-by: Gerrard Tai Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250611111515.1983366-5-edumazet@google.com Signed-off-by: Jakub Kicinski commit 43eb466041216d25dedaef1c383ad7bd89929cbc Author: Eric Dumazet Date: Wed Jun 11 11:15:13 2025 +0000 net_sched: tbf: fix a race in tbf_change() Gerrard Tai reported a race condition in TBF, whenever SFQ perturb timer fires at the wrong time. The race is as follows: CPU 0 CPU 1 [1]: lock root [2]: qdisc_tree_flush_backlog() [3]: unlock root | | [5]: lock root | [6]: rehash | [7]: qdisc_tree_reduce_backlog() | [4]: qdisc_put() This can be abused to underflow a parent's qlen. Calling qdisc_purge_queue() instead of qdisc_tree_flush_backlog() should fix the race, because all packets will be purged from the qdisc before releasing the lock. Fixes: b05972f01e7d ("net: sched: tbf: don't call qdisc_put() while holding tree lock") Reported-by: Gerrard Tai Suggested-by: Gerrard Tai Signed-off-by: Eric Dumazet Cc: Zhengchao Shao Link: https://patch.msgid.link/20250611111515.1983366-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit 85a3e0ede38450ea3053b8c45d28cf55208409b8 Author: Eric Dumazet Date: Wed Jun 11 11:15:12 2025 +0000 net_sched: red: fix a race in __red_change() Gerrard Tai reported a race condition in RED, whenever SFQ perturb timer fires at the wrong time. The race is as follows: CPU 0 CPU 1 [1]: lock root [2]: qdisc_tree_flush_backlog() [3]: unlock root | | [5]: lock root | [6]: rehash | [7]: qdisc_tree_reduce_backlog() | [4]: qdisc_put() This can be abused to underflow a parent's qlen. Calling qdisc_purge_queue() instead of qdisc_tree_flush_backlog() should fix the race, because all packets will be purged from the qdisc before releasing the lock. Fixes: 0c8d13ac9607 ("net: sched: red: delay destroying child qdisc on replace") Reported-by: Gerrard Tai Suggested-by: Gerrard Tai Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250611111515.1983366-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit d35acc1be3480505b5931f17e4ea9b7617fea4d3 Author: Eric Dumazet Date: Wed Jun 11 11:15:11 2025 +0000 net_sched: prio: fix a race in prio_tune() Gerrard Tai reported a race condition in PRIO, whenever SFQ perturb timer fires at the wrong time. The race is as follows: CPU 0 CPU 1 [1]: lock root [2]: qdisc_tree_flush_backlog() [3]: unlock root | | [5]: lock root | [6]: rehash | [7]: qdisc_tree_reduce_backlog() | [4]: qdisc_put() This can be abused to underflow a parent's qlen. Calling qdisc_purge_queue() instead of qdisc_tree_flush_backlog() should fix the race, because all packets will be purged from the qdisc before releasing the lock. Fixes: 7b8e0b6e6599 ("net: sched: prio: delay destroying child qdiscs on change") Reported-by: Gerrard Tai Suggested-by: Gerrard Tai Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250611111515.1983366-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit 7ca52541c05c832d32b112274f81a985101f9ba8 Author: Eric Dumazet Date: Wed Jun 11 08:35:01 2025 +0000 net_sched: sch_sfq: reject invalid perturb period Gerrard Tai reported that SFQ perturb_period has no range check yet, and this can be used to trigger a race condition fixed in a separate patch. We want to make sure ctl->perturb_period * HZ will not overflow and is positive. Tested: tc qd add dev lo root sfq perturb -10 # negative value : error Error: sch_sfq: invalid perturb period. tc qd add dev lo root sfq perturb 1000000000 # too big : error Error: sch_sfq: invalid perturb period. tc qd add dev lo root sfq perturb 2000000 # acceptable value tc -s -d qd sh dev lo qdisc sfq 8005: root refcnt 2 limit 127p quantum 64Kb depth 127 flows 128 divisor 1024 perturb 2000000sec Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Gerrard Tai Signed-off-by: Eric Dumazet Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250611083501.1810459-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit d4e6cb324dcc952618fec6b25aa3fc7bfc2750b4 Author: Maxime Chevallier Date: Fri Jun 6 11:43:20 2025 +0200 net: phy: phy_caps: Don't skip better duplex macth on non-exact match When performing a non-exact phy_caps lookup, we are looking for a supported mode that matches as closely as possible the passed speed/duplex. Blamed patch broke that logic by returning a match too early in case the caller asks for half-duplex, as a full-duplex linkmode may match first, and returned as a non-exact match without even trying to mach on half-duplex modes. Reported-by: Jijie Shao Closes: https://lore.kernel.org/netdev/20250603102500.4ec743cf@fedora/T/#m22ed60ca635c67dc7d9cbb47e8995b2beb5c1576 Tested-by: Jijie Shao Reviewed-by: Larysa Zaremba Fixes: fc81e257d19f ("net: phy: phy_caps: Allow looking-up link caps based on speed and duplex") Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250606094321.483602-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 650768c512faba8070bf4cfbb28c95eb5cd203f3 Author: Dev Jain Date: Tue May 27 13:56:33 2025 +0530 arm64: Restrict pagetable teardown to avoid false warning Commit 9c006972c3fe ("arm64: mmu: drop pXd_present() checks from pXd_free_pYd_table()") removes the pxd_present() checks because the caller checks pxd_present(). But, in case of vmap_try_huge_pud(), the caller only checks pud_present(); pud_free_pmd_page() recurses on each pmd through pmd_free_pte_page(), wherein the pmd may be none. Thus it is possible to hit a warning in the latter, since pmd_none => !pmd_table(). Thus, add a pmd_present() check in pud_free_pmd_page(). This problem was found by code inspection. Fixes: 9c006972c3fe ("arm64: mmu: drop pXd_present() checks from pXd_free_pYd_table()") Cc: stable@vger.kernel.org Reported-by: Ryan Roberts Acked-by: David Hildenbrand Signed-off-by: Dev Jain Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20250527082633.61073-1-dev.jain@arm.com Signed-off-by: Will Deacon commit c0c7fa4e7a512006710c8e4d6b6f7b40c9f786cd Author: Lorenzo Pieralisi Date: Tue Jun 10 14:09:35 2025 +0200 docs: arm64: Fix ICC_SRE_EL2 register typo in booting.rst Fix trivial ICC_SRE_EL2 register spelling typo in booting.rst. Signed-off-by: Lorenzo Pieralisi Cc: Jonathan Corbet Cc: Will Deacon CC: Catalin Marinas Link: https://lore.kernel.org/r/20250610120935.852034-1-lpieralisi@kernel.org Signed-off-by: Will Deacon commit c538f400fae22725580842deb2bef546701b64bd Author: Keith Busch Date: Wed Jun 11 13:53:43 2025 -0700 io_uring: consistently use rcu semantics with sqpoll thread The sqpoll thread is dereferenced with rcu read protection in one place, so it needs to be annotated as an __rcu type, and should consistently use rcu helpers for access and assignment to make sparse happy. Since most of the accesses occur under the sqd->lock, we can use rcu_dereference_protected() without declaring an rcu read section. Provide a simple helper to get the thread from a locked context. Fixes: ac0b8b327a5677d ("io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo()") Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20250611205343.1821117-1-kbusch@meta.com [axboe: fold in fix for register.c] Signed-off-by: Jens Axboe commit ba06528ad5a31923efc24324706116ccd17e12d8 Author: Gabriel Santese Date: Fri May 30 02:52:32 2025 +0200 ASoC: amd: yc: Add quirk for MSI Bravo 17 D7VF internal mic MSI Bravo 17 (D7VF), like other laptops from the family, has broken ACPI tables and needs a quirk for internal mic to work properly. Signed-off-by: Gabriel Santese Link: https://patch.msgid.link/20250530005444.23398-1-santesegabriel@gmail.com Signed-off-by: Mark Brown commit 0b9d62a47149083d581d8b2abb04124b6175cb29 Author: Darrick J. Wong Date: Wed Jun 11 09:40:44 2025 -0700 fs: unlock the superblock during iterate_supers_type This function takes super_lock in shared mode, so it should release the same lock. Cc: stable@vger.kernel.org # v6.16-rc1 Fixes: af7551cf13cf7f ("super: remove pointless s_root checks") Signed-off-by: "Darrick J. Wong" Link: https://lore.kernel.org/20250611164044.GF6138@frogsfrogsfrogs Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 527c88d8390d6c0358dea4d71696795c05328925 Author: Amir Goldstein Date: Thu Jun 12 09:22:45 2025 +0200 ovl: fix debug print in case of mkdir error We want to print the name in case of mkdir failure and now we will get a cryptic (efault) as name. Fixes: c54b386969a5 ("VFS: Change vfs_mkdir() to return the dentry.") Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250612072245.2825938-1-amir73il@gmail.com Signed-off-by: Christian Brauner commit fa8fae5f82e48db1a06ba570a2a3fdc087fc93c0 Author: Richard Fitzgerald Date: Thu Jun 12 13:14:28 2025 +0100 ASoC: doc: cs35l56: Update to add new SoundWire firmware filename suffix Add the new firmware filename suffix used for SoundWire systems with CS35L57, CS35L63 or CS35L56 later than B0 silicon. This uses the SoundWire physical address of the amp to identify which firmware file to load on that amp. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250612121428.1667-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e5d5b3aebdc8acf9f52d1369a7744a2ab9ca591c Author: Richard Fitzgerald Date: Thu Jun 12 13:14:27 2025 +0100 ASoC: cs35l56: Use SoundWire address as alternate firmware suffix on L56 B0 Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L56 B0 if .bin files are not found with the older suffix. Some changes in wm_adsp needed to support this have been included in this patch because they are trivial. The allows future products with CS35L56 B0 silicon to use the same firmware file naming as CS35L57 and cs35L63, while retaining backward compatibility for firmware that has already been published with the old naming scheme. The old suffix is searched first, partly because there are already many files using that naming scheme, but also because they are a smaller subset of all the possible fallback name options offered by wm_adsp so we know that it will either find the qualified files or fail. All the firmware files already published have the wmfw qualified with only the ACPI SSID and the bin files qualified with both SSID and the suffix. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by the address pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing a redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There are already many published firmware for CS35L56 B0 silicon so this first looks for the original name suffix, to keep backward compatibility. If this doesn't find .bin files it will switch to using the new name suffix so that future products using CS35L56 B0 can start to use the new suffix. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250612121428.1667-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit d1fc7687959b0fbf335815a8d808e6076b969309 Author: Richard Fitzgerald Date: Thu Jun 12 13:14:26 2025 +0100 ASoC: cs35l56: Use SoundWire address as firmware name suffix for new silicon Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L57, CS35L63 and revisions of CS35L56 after B0. The change in wm_adsp needed to support this has been included in this patch because it is fairly trivial. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by a pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing the redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There have not been any firmwares published for CS35L57 or CS35L63, so these can safely be switched to using the SoundWire unique address as the suffix string. Also note that the machine driver in older kernel version only has match entries for the CS35L56 Soundwire identity so any future product with a cs35L57 or CS35L63 would require a new kernel anyway. There are already many published firmware for CS35L56 B0 silicon so this keeps the original naming scheme on those, to preserve backward compatibility. Note that although sdw_slave.id contains a unique_id field, this cannot be trusted because the SoundWire core code also puts magic values into it that it uses as a flag. So the unique ID is read from the chip register. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250612121428.1667-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 8ecbad4853f83d9853d7bb0c2d8373afab8851d3 Author: Alexander Stein Date: Fri May 23 08:40:41 2025 +0200 drm/arm/malidp: Silence informational message When checking for unsupported expect an error is printed every time. This spams the log for platforms where this is expected, e.g. ls1028a having a Vivante (etnaviv) GPU and Mali display processor. Signed-off-by: Alexander Stein Signed-off-by: Liviu Dudau Link: https://lore.kernel.org/r/20250523064042.3275926-1-alexander.stein@ew.tq-group.com commit e479da4054875c4cc53a7fb956ebff03d2dac939 Author: John Keeping Date: Wed Jun 11 12:13:06 2025 +0100 drm/ssd130x: fix ssd132x_clear_screen() columns The number of columns relates to the width, not the height. Use the correct variable. Signed-off-by: John Keeping Reviewed-by: Javier Martinez Canillas Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") Link: https://lore.kernel.org/r/20250611111307.1814876-1-jkeeping@inmusicbrands.com Signed-off-by: Javier Martinez Canillas commit 332d6a94ce80efae2e6b38e01a46e92230577354 Merge: 19272b37aa4f83 c7f005f70d22cd Author: Rafael J. Wysocki Date: Thu Jun 12 13:23:56 2025 +0200 Merge tag 'cpufreq-arm-fixes-6.16-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge CPUFreq fixes for 6.16-rc from Viresh Kumar: "- Implement CpuId rust abstraction and use it to fix doctest failure (Viresh Kumar). - Minor cleanups in the `# Safety` sections for cpufreq abstractions (Viresh Kumar)." * tag 'cpufreq-arm-fixes-6.16-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: rust: cpu: Add CpuId::current() to retrieve current CPU ID rust: Use CpuId in place of raw CPU numbers rust: cpu: Introduce CpuId abstraction cpufreq: Convert `/// SAFETY` lines to `# Safety` sections commit 312d02adb959ea199372f375ada06e0186f651e4 Author: Jens Wiklander Date: Mon Jun 2 14:04:35 2025 +0200 optee: ffa: fix sleep in atomic context The OP-TEE driver registers the function notif_callback() for FF-A notifications. However, this function is called in an atomic context leading to errors like this when processing asynchronous notifications: | BUG: sleeping function called from invalid context at kernel/locking/mutex.c:258 | in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 9, name: kworker/0:0 | preempt_count: 1, expected: 0 | RCU nest depth: 0, expected: 0 | CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted 6.14.0-00019-g657536ebe0aa #13 | Hardware name: linux,dummy-virt (DT) | Workqueue: ffa_pcpu_irq_notification notif_pcpu_irq_work_fn | Call trace: | show_stack+0x18/0x24 (C) | dump_stack_lvl+0x78/0x90 | dump_stack+0x18/0x24 | __might_resched+0x114/0x170 | __might_sleep+0x48/0x98 | mutex_lock+0x24/0x80 | optee_get_msg_arg+0x7c/0x21c | simple_call_with_arg+0x50/0xc0 | optee_do_bottom_half+0x14/0x20 | notif_callback+0x3c/0x48 | handle_notif_callbacks+0x9c/0xe0 | notif_get_and_handle+0x40/0x88 | generic_exec_single+0x80/0xc0 | smp_call_function_single+0xfc/0x1a0 | notif_pcpu_irq_work_fn+0x2c/0x38 | process_one_work+0x14c/0x2b4 | worker_thread+0x2e4/0x3e0 | kthread+0x13c/0x210 | ret_from_fork+0x10/0x20 Fix this by adding work queue to process the notification in a non-atomic context. Fixes: d0476a59de06 ("optee: ffa_abi: add asynchronous notifications") Cc: stable@vger.kernel.org Reviewed-by: Sumit Garg Tested-by: Sudeep Holla Link: https://lore.kernel.org/r/20250602120452.2507084-1-jens.wiklander@linaro.org Signed-off-by: Jens Wiklander commit 0c44b46f51a17baa7ab67de1464427116e9c4eaa Author: Arnd Bergmann Date: Tue Jun 10 11:34:55 2025 +0200 platform/x86/intel-uncore-freq: avoid non-literal format string Using a string variable in place of a format string causes a W=1 build warning: drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c:61:40: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] 61 | length += sysfs_emit_at(buf, length, agent_name[agent]); | ^~~~~~~~~~~~~~~~~ Use the safer "%s" format string to print it instead. Fixes: b98fa870fce2 ("platform/x86/intel-uncore-freq: Add attributes to show agent types") Signed-off-by: Arnd Bergmann Tested-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250610093459.2646337-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit be574d5eee9808a422cff0293da9b08c0e434ed0 Author: Xi Pardee Date: Tue Jun 10 16:04:07 2025 -0700 platform/x86/intel/pmc: Add Panther Lake support to Intel PMC SSRAM Telemetry Add Panther Lake support to Intel PMC SSRAM Telemetry driver. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250610230416.622970-2-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 2d5a84c3ecc075d87bcb16c1cc80277b5837c153 Author: Xi Pardee Date: Tue Jun 10 16:04:06 2025 -0700 platform/x86/intel/pmc: Add Lunar Lake support to Intel PMC SSRAM Telemetry Add Lunar Lake support to Intel PMC SSRAM Telemetry driver. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250610230416.622970-1-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b26852daaa83f535109253d114426d1fa674155d Author: Arnd Bergmann Date: Tue Jun 10 11:28:42 2025 +0200 RDMA/mlx5: reduce stack usage in mlx5_ib_ufile_hw_cleanup This function has an array of eight mlx5_async_cmd structures, which often fits on the stack, but depending on the configuration can end up blowing the stack frame warning limit: drivers/infiniband/hw/mlx5/devx.c:2670:6: error: stack frame size (1392) exceeds limit (1280) in 'mlx5_ib_ufile_hw_cleanup' [-Werror,-Wframe-larger-than] Change this to a dynamic allocation instead. While a kmalloc() can theoretically fail, a GFP_KERNEL allocation under a page will block until memory has been freed up, so in the worst case, this only adds extra time in an already constrained environment. Fixes: 7c891a4dbcc1 ("RDMA/mlx5: Add implementation for ufile_hw_cleanup device operation") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250610092846.2642535-1-arnd@kernel.org Signed-off-by: Leon Romanovsky commit 614b1c3cbfb0ecbafd40284d2f8e67c865818714 Author: Wolfram Sang Date: Thu Jun 12 09:27:22 2025 +0200 i2c: use inclusive callbacks in struct i2c_algorithm Convert the I2C subsystem to drop using the 'master_'-prefixed callbacks in favor of the simplified ones. Fix alignment of '=' while here. Signed-off-by: Wolfram Sang commit aa807b9f22df2eee28593cbbabba0f93f4aa26c1 Author: Feng Tang Date: Thu Jun 12 10:14:17 2025 +0800 dma-contiguous: hornor the cma address limit setup by user When porting a cma related usage from x86_64 server to arm64 server, the "cma=4G@4G" setup failed on arm64. The reason is arm64 and some other architectures have specific physical address limit for reserved cma area, like 4GB due to the device's need for 32 bit dma. Actually lots of platforms of those architectures don't have this device dma limit, but still have to obey it, and are not able to reserve a huge cma pool. This situation could be improved by honoring the user input cma physical address than the arch limit. As when users specify it, they already knows what the default is which probably can't suit them. Suggested-by: Robin Murphy Signed-off-by: Feng Tang Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20250612021417.44929-1-feng.tang@linux.alibaba.com commit 66ac1a4d366d3faa95fcf6082b555f8d77f1e8db Author: Huacai Chen Date: Sun Jun 8 22:12:35 2025 +0800 init: fix build warnings about export.h After commit a934a57a42f64a4 ("scripts/misc-check: check missing #include when W=1") and 7d95680d64ac8e836c ("scripts/misc-check: check unnecessary #include when W=1"), we get some build warnings with W=1: init/main.c: warning: EXPORT_SYMBOL() is used, but #include is missing init/initramfs.c: warning: EXPORT_SYMBOL() is used, but #include is missing So fix these build warnings for the init code. Link: https://lkml.kernel.org/r/20250608141235.155206-1-chenhuacai@loongson.cn Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include when W=1") Signed-off-by: Huacai Chen Reviewed-by: Masahiro Yamada Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Signed-off-by: Andrew Morton commit 02fb36505c61c35d5fd879f5a66a97935dbcb2ee Author: Barry Song Date: Mon Jun 9 12:24:42 2025 +1200 MAINTAINERS: add Barry as a THP reviewer I have been actively contributing to mTHP and reviewing related patches for an extended period, and I would like to continue supporting patch reviews. Link: https://lkml.kernel.org/r/20250609002442.1856-1-21cnbao@gmail.com Signed-off-by: Barry Song Acked-by: Zi Yan Acked-by: Baolin Wang Acked-by: Dev Jain Acked-by: Lorenzo Stoakes Reviewed-by: Ryan Roberts Cc: David Hildenbrand Cc: Liam R. Howlett Cc: Nico Pache Signed-off-by: Andrew Morton commit 50695153d7ddde3b1696dbf0085be0033bf3ddb3 Author: Andrew Morton Date: Sat Jun 7 17:43:18 2025 -0700 drivers/rapidio/rio_cm.c: prevent possible heap overwrite In riocm_cdev_ioctl(RIO_CM_CHAN_SEND) -> cm_chan_msg_send() -> riocm_ch_send() cm_chan_msg_send() checks that userspace didn't send too much data but riocm_ch_send() failed to check that userspace sent sufficient data. The result is that riocm_ch_send() can write to fields in the rio_ch_chan_hdr which were outside the bounds of the space which cm_chan_msg_send() allocated. Address this by teaching riocm_ch_send() to check that the entire rio_ch_chan_hdr was copied in from userspace. Reported-by: maher azz Cc: Matt Porter Cc: Alexandre Bounine Cc: Linus Torvalds Cc: Signed-off-by: Andrew Morton commit 383c4613c67c26e90e8eebb72e3083457d02033f Author: Ryan Roberts Date: Fri Jun 6 10:28:07 2025 +0100 mm: close theoretical race where stale TLB entries could linger Commit 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries") described a theoretical race as such: """ Nadav Amit identified a theoretical race between page reclaim and mprotect due to TLB flushes being batched outside of the PTL being held. He described the race as follows: CPU0 CPU1 ---- ---- user accesses memory using RW PTE [PTE now cached in TLB] try_to_unmap_one() ==> ptep_get_and_clear() ==> set_tlb_ubc_flush_pending() mprotect(addr, PROT_READ) ==> change_pte_range() ==> [ PTE non-present - no flush ] user writes using cached RW PTE ... try_to_unmap_flush() The same type of race exists for reads when protecting for PROT_NONE and also exists for operations that can leave an old TLB entry behind such as munmap, mremap and madvise. """ The solution was to introduce flush_tlb_batched_pending() and call it under the PTL from mprotect/madvise/munmap/mremap to complete any pending tlb flushes. However, while madvise_free_pte_range() and madvise_cold_or_pageout_pte_range() were both retro-fitted to call flush_tlb_batched_pending() immediately after initially acquiring the PTL, they both temporarily release the PTL to split a large folio if they stumble upon one. In this case, where re-acquiring the PTL flush_tlb_batched_pending() must be called again, but it previously was not. Let's fix that. There are 2 Fixes: tags here: the first is the commit that fixed madvise_free_pte_range(). The second is the commit that added madvise_cold_or_pageout_pte_range(), which looks like it copy/pasted the faulty pattern from madvise_free_pte_range(). This is a theoretical bug discovered during code review. Link: https://lkml.kernel.org/r/20250606092809.4194056-1-ryan.roberts@arm.com Fixes: 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries") Fixes: 9c276cc65a58 ("mm: introduce MADV_COLD") Signed-off-by: Ryan Roberts Reviewed-by: Jann Horn Acked-by: David Hildenbrand Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mel Gorman Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 0cf4b1687a187ba9247c71721d8b064634eda1f7 Author: Lorenzo Stoakes Date: Fri Jun 6 13:50:32 2025 +0100 mm/vma: reset VMA iterator on commit_merge() OOM failure While an OOM failure in commit_merge() isn't really feasible due to the allocation which might fail (a maple tree pre-allocation) being 'too small to fail', we do need to handle this case correctly regardless. In vma_merge_existing_range(), we can theoretically encounter failures which result in an OOM error in two ways - firstly dup_anon_vma() might fail with an OOM error, and secondly commit_merge() failing, ultimately, to pre-allocate a maple tree node. The abort logic for dup_anon_vma() resets the VMA iterator to the initial range, ensuring that any logic looping on this iterator will correctly proceed to the next VMA. However the commit_merge() abort logic does not do the same thing. This resulted in a syzbot report occurring because mlockall() iterates through VMAs, is tolerant of errors, but ended up with an incorrect previous VMA being specified due to incorrect iterator state. While making this change, it became apparent we are duplicating logic - the logic introduced in commit 41e6ddcaa0f1 ("mm/vma: add give_up_on_oom option on modify/merge, use in uffd release") duplicates the vmg->give_up_on_oom check in both abort branches. Additionally, we observe that we can perform the anon_dup check safely on dup_anon_vma() failure, as this will not be modified should this call fail. Finally, we need to reset the iterator in both cases, so now we can simply use the exact same code to abort for both. We remove the VM_WARN_ON(err != -ENOMEM) as it would be silly for this to be otherwise and it allows us to implement the abort check more neatly. Link: https://lkml.kernel.org/r/20250606125032.164249-1-lorenzo.stoakes@oracle.com Fixes: 47b16d0462a4 ("mm: abort vma_modify() on merge out of memory failure") Signed-off-by: Lorenzo Stoakes Reported-by: syzbot+d16409ea9ecc16ed261a@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-mm/6842cc67.a00a0220.29ac89.003b.GAE@google.com/ Reviewed-by: Pedro Falcato Reviewed-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: Jann Horn Cc: Signed-off-by: Andrew Morton commit 1b8e4091ffb4655c761354eb33f41b618e809427 Author: wangfushuai Date: Sat Jun 7 23:36:14 2025 +0800 docs: proc: update VmFlags documentation in smaps Remove outdated VM_DENYWRITE("dw") reference and add missing VM_LOCKONFAULT("lf") and VM_UFFD_MINOR("ui") flags. [akpm@linux-foundation.org: add "dp" (VM_DROPPABLE), per Tal] Link: https://lkml.kernel.org/r/20250607153614.81914-1-wangfushuai@baidu.com Signed-off-by: wangfushuai Cc: Andrii Nakryiko Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Mariano Pache Cc: xu xin Cc: Tal Zussman Signed-off-by: Andrew Morton commit 331843c845d15413e9d89fd91cdcfa6912e291c3 Author: Randy Dunlap Date: Wed Jun 4 17:23:37 2025 -0700 scatterlist: fix extraneous '@'-sign kernel-doc notation Using "@argname@" in kernel-doc produces "argname****" (with "argname" in bold) in the generated html output, so use the expected kernel-doc notation of just "@argname" instead. "Fixes:" lines are added in case Matthew's patch [1] is backported. Link: https://lkml.kernel.org/r/20250605002337.2842659-1-rdunlap@infradead.org Link: https://lore.kernel.org/linux-doc/3bc4e779-7a79-42c1-8867-024f643a22fc@infradead.org/T/#m5d2bd9d21fb34f297aa4e7db069f09bc27b89007 [1] Fixes: 0db9299f48eb ("SG: Move functions to lib/scatterlist.c and add sg chaining allocator helpers") Fixes: 8d1d4b538bb1 ("scatterlist: inline sg_next()") Fixes: 18dabf473e15 ("Change table chaining layout") Signed-off-by: Randy Dunlap Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit b1a529bdb9641392b4f5fc91545598793c0b3b96 Author: Mark Brown Date: Thu Jun 5 22:34:31 2025 +0100 selftests/mm: skip failed memfd setups in gup_longterm Unlike the other cases gup_longterm's memfd tests previously skipped the test when failing to set up the file descriptor to test. Restore this behavior to avoid hitting failures when hugetlb isn't configured. Link: https://lkml.kernel.org/r/20250605-selftest-mm-gup-longterm-tweaks-v1-1-2fae34b05958@kernel.org Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm") Signed-off-by: Mark Brown Reported-by: Lorenzo Stoakes Closes: https://lkml.kernel.org/r/a76fc252-0fe3-4d4b-a9a1-4a2895c2680d@lucifer.local Reviewed-by: Lorenzo Stoakes Tested-by: Lorenzo Stoakes Acked-by: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit c0f21029f123d1b15f8eddc8e3976bf0c8781c43 Author: Leon Romanovsky Date: Sun Jun 8 10:42:53 2025 +0300 xfrm: always initialize offload path Offload path is used for GRO with SW IPsec, and not just for HW offload. So initialize it anyway. Fixes: 585b64f5a620 ("xfrm: delay initialization of offload path till its actually requested") Reported-by: Sabrina Dubroca Closes: https://lore.kernel.org/all/aEGW_5HfPqU1rFjl@krikkit Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit c7f005f70d22cd5613cac30bf6d34867189e36a9 Author: Viresh Kumar Date: Mon Jun 9 16:44:16 2025 +0530 rust: cpu: Add CpuId::current() to retrieve current CPU ID Introduce `CpuId::current()`, a constructor that wraps the C function `raw_smp_processor_id()` to retrieve the current CPU identifier without guaranteeing stability. This function should be used only when the caller can ensure that the CPU ID won't change unexpectedly due to preemption or migration. Suggested-by: Boqun Feng Signed-off-by: Viresh Kumar Reviewed-by: Boqun Feng commit 33db8c97b4cfa0328054fb755dfbcd6e7f3c7a9d Author: Viresh Kumar Date: Mon Jun 9 14:26:54 2025 +0530 rust: Use CpuId in place of raw CPU numbers Use the newly defined `CpuId` abstraction instead of raw CPU numbers. This also fixes a doctest failure for configurations where `nr_cpu_ids < 4`. The C `cpumask_{set|clear}_cpu()` APIs emit a warning when given an invalid CPU number — but only if `CONFIG_DEBUG_PER_CPU_MAPS=y` is set. Meanwhile, `cpumask_weight()` only considers CPUs up to `nr_cpu_ids`, which can cause inconsistencies: a CPU number greater than `nr_cpu_ids` may be set in the mask, yet the weight calculation won't reflect it. This leads to doctest failures when `nr_cpu_ids < 4`, as the test tries to set CPUs 2 and 3: rust_doctest_kernel_cpumask_rs_0.location: rust/kernel/cpumask.rs:180 rust_doctest_kernel_cpumask_rs_0: ASSERTION FAILED at rust/kernel/cpumask.rs:190 Fixes: 8961b8cb3099 ("rust: cpumask: Add initial abstractions") Reported-by: Miguel Ojeda Closes: https://lore.kernel.org/rust-for-linux/CANiq72k3ozKkLMinTLQwvkyg9K=BeRxs1oYZSKhJHY-veEyZdg@mail.gmail.com/ Reported-by: Andreas Hindborg Closes: https://lore.kernel.org/all/87qzzy3ric.fsf@kernel.org/ Suggested-by: Boqun Feng Signed-off-by: Viresh Kumar Reviewed-by: Boqun Feng commit 8046d29dde17002523f94d3e6e0ebe486ce52166 Author: Paolo Bonzini Date: Thu Jun 12 00:47:44 2025 -0400 KVM: x86/mmu: Reject direct bits in gpa passed to KVM_PRE_FAULT_MEMORY Only let userspace pass the same addresses that were used in KVM_SET_USER_MEMORY_REGION (or KVM_SET_USER_MEMORY_REGION2); gpas in the the upper half of the address space are an implementation detail of TDX and KVM. Extracted from a patch by Sean Christopherson . Signed-off-by: Paolo Bonzini commit aa2024c01a9afba6728b362626f868811ca872ee Author: Paolo Bonzini Date: Tue Jun 10 20:10:18 2025 -0400 KVM: x86/mmu: Embed direct bits into gpa for KVM_PRE_FAULT_MEMORY Bug[*] reported for TDX case when enabling KVM_PRE_FAULT_MEMORY in QEMU. It turns out that @gpa passed to kvm_mmu_do_page_fault() doesn't have shared bit set when the memory attribute of it is shared, and it leads to wrong root in tdp_mmu_get_root_for_fault(). Fix it by embedding the direct bits in the gpa that is passed to kvm_tdp_map_page(), when the memory of the gpa is not private. [*] https://lore.kernel.org/qemu-devel/4a757796-11c2-47f1-ae0d-335626e818fd@intel.com/ Reported-by: Xiaoyao Li Closes: https://lore.kernel.org/qemu-devel/4a757796-11c2-47f1-ae0d-335626e818fd@intel.com/ Signed-off-by: Paolo Bonzini Signed-off-by: Xiaoyao Li Message-ID: <20250611001018.2179964-1-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit aef22f6fe7a630d536f9eaa0a7a2ed0f90ea369e Author: Kent Overstreet Date: Tue Jun 10 22:32:14 2025 -0400 bcachefs: Don't trace should_be_locked unless changing Signed-off-by: Kent Overstreet commit cd1124244be30fd3e87da9186508aab371e9307d Author: Kent Overstreet Date: Sun Jun 8 12:35:20 2025 -0400 bcachefs: Ensure that snapshot creation propagates has_case_insensitive We normally can't create a new directory with the case-insensitive option already set - except when we're creating a snapshot. And if casefolding is enabled filesystem wide, we should still set it even though not strictly required, for consistency. Signed-off-by: Kent Overstreet commit b68baf9a87330148d3ad074e48503a4e9c5c3929 Author: Kent Overstreet Date: Wed Jun 11 15:57:48 2025 -0400 bcachefs: Print devices we're mounting on multi device filesystems Previously, we only ever logged the filesystem UUID. Signed-off-by: Kent Overstreet commit 205da7c026739d965e605d39001049c7b6728e87 Author: Kent Overstreet Date: Sun Jun 8 11:31:23 2025 -0400 bcachefs: Don't trust sb->nr_devices in members_to_text() We have to be able to print superblock sections even if they fail to validate (for debugging), so we have to calculate the number of entries from the field size. Reported-by: syzbot+5138f00559ffb3cb3610@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 625c494db95624f09f5e7b81b64d4da34e45bd2a Author: Kent Overstreet Date: Wed Jun 11 13:32:58 2025 -0400 bcachefs: Fix version checks in validate_bset() It seems btree node scan picked up a partially overwritten btree node, and corrected the "bset version older than sb version_min" error - resulting in an invalid superblock with a bad version_min field. Don't run this check at all when we're in btree node scan, and when we do run it, do something saner if the bset version is totally crazy. Signed-off-by: Kent Overstreet commit e82b3a63a9a91cc5c585efb3e28f32100f24e3e1 Author: Arnd Bergmann Date: Tue Jun 10 11:24:04 2025 +0200 bcachefs: ioctl: avoid stack overflow warning Multiple ioctl handlers individually use a lot of stack space, and clang chooses to inline them into the bch2_fs_ioctl() function, blowing through the warning limit: fs/bcachefs/chardev.c:655:6: error: stack frame size (1032) exceeds limit (1024) in 'bch2_fs_ioctl' [-Werror,-Wframe-larger-than] 655 | long bch2_fs_ioctl(struct bch_fs *c, unsigned cmd, void __user *arg) By marking the largest two of them as noinline_for_stack, no indidual code path ends up using this much, which avoids the warning and reduces the possible total stack usage in the ioctl handler. Signed-off-by: Arnd Bergmann Signed-off-by: Kent Overstreet commit c3dd25319c1818e067f41f41127f935f153498e6 Author: Kent Overstreet Date: Mon Jun 9 17:28:00 2025 -0400 bcachefs: Don't pass trans to fsck_err() in gc_accounting_done fsck_err() can return a transaction restart if passed a transaction object - this has always been true when it has to drop locks to prompt for user input, but we're seeing this more now that we're logging the error being corrected in the journal. gc_accounting_done() doesn't call fsck_err() from an actual commit loop, and it doesn't need to be holding btree locks when it calls fsck_err(), so the easy fix here for the unhandled transaction restart is to just not pass it the transaction object. We'll miss out on the fancy new logging, but that's ok. Signed-off-by: Kent Overstreet commit 9e48f574e55731106b26dc33d8b0be1adedf3f20 Author: Kent Overstreet Date: Mon Jun 9 17:30:40 2025 -0400 bcachefs: Fix leak in bch2_fs_recovery() error path Fix a small leak of the superblock 'clean' section. Signed-off-by: Kent Overstreet commit 54aacfe3976893ee04582a0bd61967bbee5a7e04 Author: Kent Overstreet Date: Sun Jun 8 12:17:02 2025 -0400 bcachefs: Fix rcu_pending for PREEMPT_RT PREEMPT_RT redefines how standard spinlocks work, so local_irq_save() + spin_lock() is no longer equivalent to spin_lock_irqsave(). Fortunately, we don't strictly need to do it that way. Signed-off-by: Kent Overstreet commit 082c74411491f8b0d31465fc104b8342e66c4056 Author: Kent Overstreet Date: Sun Jun 8 11:58:59 2025 -0400 bcachefs: Fix downgrade_table_extra() Fix a UAF: we were calling darray_make_room() and retaining a pointer to the old buffer. And fix an UBSAN warning: struct bch_sb_field_downgrade_entry uses __counted_by, so set dst->nr_errors before assigning to the array entry. Reported-by: syzbot+14c52d86ddbd89bea13e@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 757601ef853359fe2d57d75c00b5045f62efc608 Author: Kent Overstreet Date: Sun Jun 8 11:40:00 2025 -0400 bcachefs: Don't put rhashtable on stack Object debugging generally needs special provisions for putting said objects on the stack, which rhashtable does not have. Reported-by: syzbot+bcc38a9556d0324c2ec2@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit f946ce0be45e75801583a5371fccf7466961d9d0 Author: Kent Overstreet Date: Sat Jun 7 20:18:16 2025 -0400 bcachefs: Make sure opts.read_only gets propagated back to VFS If we think we're read-only but the VFS doesn't, fun will ensue. And now that we know we have to be able to do this safely, just make nochanges imply ro. Reported-by: syzbot+a7d6ceaba099cc21dee4@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 0acb385ec19c99b213d28a309a941790758c53a8 Author: Alan Huang Date: Tue May 20 15:34:28 2025 +0800 bcachefs: Fix possible console lock involved deadlock Link: https://lore.kernel.org/all/6822ab02.050a0220.f2294.00cb.GAE@google.com/T/ Reported-by: syzbot+2c3ef91c9523c3d1a25c@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 3315113af178041ab474723804e1322cee7d0a97 Author: Kent Overstreet Date: Sat Jun 7 18:56:28 2025 -0400 bcachefs: mark more errors autofix Signed-off-by: Kent Overstreet commit 263561649ee5875a922f4358e96d3deb17a91021 Author: Kent Overstreet Date: Sat Jun 7 14:27:35 2025 -0400 bcachefs: Don't persistently run scan_for_btree_nodes bch2_btree_lost_data() gets called on btree node read error, but the error might be transient. btree_node_scan is expensive, and there's no need to run it persistently (marking it in the superblock as required to run) - check_topology will run it if required, via bch2_get_scanned_nodes(). Running it non-persistently is fine, to avoid check_topology having to rewind recovery to run it. Signed-off-by: Kent Overstreet commit dd22844f48a71a414bd7e08cd4a9a5847974c07e Author: Kent Overstreet Date: Sat Jun 7 14:22:24 2025 -0400 bcachefs: Read error message now prints if self healing Signed-off-by: Kent Overstreet commit b47a82ff4772ea9d7091b85ef5f34dc78c866a02 Author: Kent Overstreet Date: Sat Jun 7 12:56:33 2025 -0400 bcachefs: Only run 'increase_depth' for keys from btree node csan bch2_btree_increase_depth() was originally for disaster recovery, to get some data back from the journal when a btree root was bad. We don't need it for that purpose anymore; on bad btree root we'll launch btree node scan and reconstruct all the interior nodes. If there's a key in the journal for a depth that doesn't exists, and it's not from check_topology/btree node scan, we should just ignore it. Signed-off-by: Kent Overstreet commit 7b0e6b198e4ef39ec89285d953778c5a3a04d390 Author: Kent Overstreet Date: Sat Jun 7 12:56:15 2025 -0400 bcachefs: Mark need_discard_freespace_key_bad autofix Signed-off-by: Kent Overstreet commit af5b88618a38371545251ad92ce42bc4bfa1142a Author: Kent Overstreet Date: Sat Jun 7 12:01:22 2025 -0400 bcachefs: Update /dev/disk/by-uuid on device add Invalidate pagecache after we write the new superblock and send a uevent. Signed-off-by: Kent Overstreet commit b76cce12700b8bb8d59b9ff444504b94db96dd4b Author: Kent Overstreet Date: Thu Jun 5 20:53:01 2025 -0400 bcachefs: Add more flags to btree nodes for rewrite reason It seems excessive forced btree node rewrites can cause interior btree updates to become wedged during recovery, before we're using the write buffer for backpointer updates. Add more flags so we can determine where these are coming from. Signed-off-by: Kent Overstreet commit c7e351be7aa4e176223f0128e4d1b959ffad9598 Author: Kent Overstreet Date: Thu Jun 5 19:00:11 2025 -0400 bcachefs: Add range being updated to btree_update_to_text() We had a deadlock during recovery where interior btree updates became wedged and all open_buckets were consumed; start adding more introspection. Signed-off-by: Kent Overstreet commit b43f724927686387589b98eb762e1a4109bb1bac Author: Kent Overstreet Date: Sun Jun 1 13:07:31 2025 -0400 bcachefs: Log fsck errors in the journal Log the specific error being corrected in the journal when we're repairing, this helps greatly with 'bcachefs list_journal' analysis. Signed-off-by: Kent Overstreet commit 47fe65b105f29ef22f463c17ab8a4c0eeb741045 Author: Kent Overstreet Date: Sun Jun 1 20:22:17 2025 -0400 bcachefs: Add missing restart handling to check_topology() The next patch will add logging of the specific error being corrected in repair paths to the journal; this means __bch2_fsck_err() can return transaction restarts in places that previously weren't expecting them. check_topology() is old code that doesn't use btree iterators for btree node locking - it'll have to be rewritten in the future to work online. Signed-off-by: Kent Overstreet commit ebf2e500e06f707654572bc7d8bc569a8caa51aa Author: Viresh Kumar Date: Mon Jun 9 12:38:43 2025 +0530 rust: cpu: Introduce CpuId abstraction This adds abstraction for representing a CPU identifier. Suggested-by: Boqun Feng Signed-off-by: Viresh Kumar Reviewed-by: Boqun Feng commit 2c4a1f3fe03edab80db66688360685031802160a Merge: 403d1338a4a59c 9cf1e25053c269 Author: Linus Torvalds Date: Wed Jun 11 19:00:20 2025 -0700 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull BPF fixes from Alexei Starovoitov - Fix libbpf backward compatibility (Andrii Nakryiko) - Add Stanislav Fomichev as bpf/net reviewer - Fix resolve_btfid build when cross compiling (Suleiman Souhlal) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: MAINTAINERS: Add myself as bpf networking reviewer tools/resolve_btfids: Fix build when cross compiling kernel with clang. libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly commit 903cc7096db22f889d48e2cee8840709ce04fdac Author: Akhil R Date: Tue Jun 3 21:00:20 2025 +0530 dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties Specify the properties which are essential and which are not for the Tegra I2C driver to function correctly. This was not added correctly when the TXT binding was converted to yaml. All the existing DT nodes have these properties already and hence this does not break the ABI. dmas and dma-names which were specified as a must in the TXT binding is now made optional since the driver can work in PIO mode if dmas are missing. Fixes: f10a9b722f80 ("dt-bindings: i2c: tegra: Convert to json-schema”) Signed-off-by: Akhil R Cc: # v5.17+ Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250603153022.39434-1-akhilrajeev@nvidia.com commit 27cea0e419d2f9dc6f51bbce5a44c70bc3774b9a Author: Kuniyuki Iwashima Date: Tue Jun 10 23:56:58 2025 +0000 MAINTAINERS: Update Kuniyuki Iwashima's email address. I left Amazon and joined Google, so let's map the email addresses accordingly. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250610235734.88540-1-kuniyu@google.com Signed-off-by: Jakub Kicinski commit 567766954b2d5d6c29f568ad4382d6351ea48079 Author: Jakub Kicinski Date: Mon Jun 9 17:12:45 2025 -0700 selftests: net: add test case for NAT46 looping back dst Simple test for crash involving multicast loopback and stale dst. Reuse exising NAT46 program. Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250610001245.1981782-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ba9db6f907ac02215e30128770f85fbd7db2fcf9 Author: Jakub Kicinski Date: Mon Jun 9 17:12:44 2025 -0700 net: clear the dst when changing skb protocol A not-so-careful NAT46 BPF program can crash the kernel if it indiscriminately flips ingress packets from v4 to v6: BUG: kernel NULL pointer dereference, address: 0000000000000000 ip6_rcv_core (net/ipv6/ip6_input.c:190:20) ipv6_rcv (net/ipv6/ip6_input.c:306:8) process_backlog (net/core/dev.c:6186:4) napi_poll (net/core/dev.c:6906:9) net_rx_action (net/core/dev.c:7028:13) do_softirq (kernel/softirq.c:462:3) netif_rx (net/core/dev.c:5326:3) dev_loopback_xmit (net/core/dev.c:4015:2) ip_mc_finish_output (net/ipv4/ip_output.c:363:8) NF_HOOK (./include/linux/netfilter.h:314:9) ip_mc_output (net/ipv4/ip_output.c:400:5) dst_output (./include/net/dst.h:459:9) ip_local_out (net/ipv4/ip_output.c:130:9) ip_send_skb (net/ipv4/ip_output.c:1496:8) udp_send_skb (net/ipv4/udp.c:1040:8) udp_sendmsg (net/ipv4/udp.c:1328:10) The output interface has a 4->6 program attached at ingress. We try to loop the multicast skb back to the sending socket. Ingress BPF runs as part of netif_rx(), pushes a valid v6 hdr and changes skb->protocol to v6. We enter ip6_rcv_core which tries to use skb_dst(). But the dst is still an IPv4 one left after IPv4 mcast output. Clear the dst in all BPF helpers which change the protocol. Try to preserve metadata dsts, those may carry non-routing metadata. Cc: stable@vger.kernel.org Reviewed-by: Maciej Żenczykowski Acked-by: Daniel Borkmann Fixes: d219df60a70e ("bpf: Add ipip6 and ip6ip decap support for bpf_skb_adjust_room()") Fixes: 1b00e0dfe7d0 ("bpf: update skb->protocol in bpf_skb_net_grow") Fixes: 6578171a7ff0 ("bpf: add bpf_skb_change_proto helper") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250610001245.1981782-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f75794b6077ec729f57de9a1ad24f14d288a68bb Author: Rob Herring (Arm) Date: Thu May 1 20:15:40 2025 -0500 dt-bindings: serial: Convert altr,uart-1.0 to DT schema Convert the Altera JTAG UART binding to DT schema. The "ALTR,uart-1.0" compatible has long been deprecated, so drop it. Signed-off-by: Rob Herring (Arm) commit ed2a6ff0234e21cd5e56b63d8bff80120bbe5f15 Author: Rob Herring (Arm) Date: Thu May 1 20:14:26 2025 -0500 dt-bindings: serial: Convert altr,juart-1.0 to DT schema Convert the Altera JTAG UART binding to DT schema. The "ALTR,juart-1.0" compatible has long been deprecated, so drop it. Signed-off-by: Rob Herring (Arm) commit 403d1338a4a59cfebb4ded53fa35fbd5119f36b1 Author: Magnus Lindholm Date: Tue Feb 18 18:55:14 2025 +0100 mm: pgtable: fix pte_swp_exclusive Make pte_swp_exclusive return bool instead of int. This will better reflect how pte_swp_exclusive is actually used in the code. This fixes swap/swapoff problems on Alpha due pte_swp_exclusive not returning correct values when _PAGE_SWP_EXCLUSIVE bit resides in upper 32-bits of PTE (like on alpha). Suggested-by: Al Viro Signed-off-by: Magnus Lindholm Cc: Sam James Link: https://lore.kernel.org/lkml/20250218175735.19882-2-linmag7@gmail.com/ Link: https://lore.kernel.org/lkml/20250602041118.GA2675383@ZenIV/ [ Applied as the 'sed' script Al suggested - Linus ] Signed-off-by: Linus Torvalds commit df298062a8f44feca7b22baf7ab1f87f7bef0f30 Merge: c7bdeed31e4c42 875d7c160d6061 Author: Jakub Kicinski Date: Wed Jun 11 14:41:15 2025 -0700 Merge branch 'mlx5-misc-fixes-2025-06-10' Mark Bloch says: ==================== mlx5 misc fixes 2025-06-10 This patchset includes misc fixes from the team for the mlx5 core and Ethernet drivers. ==================== Link: https://patch.msgid.link/20250610151514.1094735-1-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit 875d7c160d60616ff06dedb70470ad199661efe7 Author: Shahar Shitrit Date: Tue Jun 10 18:15:14 2025 +0300 net/mlx5e: Fix number of lanes to UNKNOWN when using data_rate_oper When the link is up, either eth_proto_oper or ext_eth_proto_oper typically reports the active link protocol, from which both speed and number of lanes can be retrieved. However, in certain cases, such as when a NIC is connected via a non-standard cable, the firmware may not report the protocol. In such scenarios, the speed can still be obtained from the data_rate_oper field in PTYS register. Since data_rate_oper provides only speed information and lacks lane details, it is incorrect to derive the number of lanes from it. This patch corrects the behavior by setting the number of lanes to UNKNOWN instead of incorrectly using MAX_LANES when relying on data_rate_oper. Fixes: 7e959797f021 ("net/mlx5e: Enable lanes configuration when auto-negotiation is off") Signed-off-by: Shahar Shitrit Reviewed-by: Tariq Toukan Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-10-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit aa9c44b842096c553871bc68a8cebc7861fa192b Author: Jianbo Liu Date: Tue Jun 10 18:15:13 2025 +0300 net/mlx5e: Fix leak of Geneve TLV option object Previously, a unique tunnel id was added for the matching on TC non-zero chains, to support inner header rewrite with goto action. Later, it was used to support VF tunnel offload for vxlan, then for Geneve and GRE. To support VF tunnel, a temporary mlx5_flow_spec is used to parse tunnel options. For Geneve, if there is TLV option, a object is created, or refcnt is added if already exists. But the temporary mlx5_flow_spec is directly freed after parsing, which causes the leak because no information regarding the object is saved in flow's mlx5_flow_spec, which is used to free the object when deleting the flow. To fix the leak, call mlx5_geneve_tlv_option_del() before free the temporary spec if it has TLV object. Fixes: 521933cdc4aa ("net/mlx5e: Support Geneve and GRE with VF tunnel offload") Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Reviewed-by: Alex Lazar Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-9-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit b8335829518ec5988294280e37d735799209d70d Author: Vlad Dogaru Date: Tue Jun 10 18:15:11 2025 +0300 net/mlx5: HWS, make sure the uplink is the last destination When there are more than one destinations, we create a FW flow table and provide it with all the destinations. FW requires to have wire as the last destination in the list (if it exists), otherwise the operation fails with FW syndrome. This patch fixes the destination array action creation: if it contains a wire destination, it is moved to the end. Fixes: 504e536d9010 ("net/mlx5: HWS, added actions handling") Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-7-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit b5e3c76f35ee7e814c2469c73406c5bbf110d89c Author: Yevgeny Kliteynik Date: Tue Jun 10 18:15:10 2025 +0300 net/mlx5: HWS, fix missing ip_version handling in definer Fix missing field handling in definer - outer IP version. Fixes: 74a778b4a63f ("net/mlx5: HWS, added definers handling") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-6-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit a002602676cdae0c9996adb75b9310559b718a93 Author: Vlad Dogaru Date: Tue Jun 10 18:15:09 2025 +0300 net/mlx5: HWS, Init mutex on the correct path The newly introduced mutex is only used for reformat actions, but it was initialized for modify header instead. The struct that contains the mutex is zero-initialized and an all-zero mutex is valid, so the issue only shows up with CONFIG_DEBUG_MUTEXES. Fixes: b206d9ec19df ("net/mlx5: HWS, register reformat actions with fw") Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-5-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit 8ec40e3f1f72bf8f8accf18020d487caa99f46a4 Author: Patrisious Haddad Date: Tue Jun 10 18:15:08 2025 +0300 net/mlx5: Fix return value when searching for existing flow group When attempting to add a rule to an existing flow group, if a matching flow group exists but is not active, the error code returned should be EAGAIN, so that the rule can be added to the matching flow group once it is active, rather than ENOENT, which indicates that no matching flow group was found. Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Gavi Teitz Signed-off-by: Roi Dayan Signed-off-by: Patrisious Haddad Reviewed-by: Tariq Toukan Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-4-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit 687560d8a9a2d654829ad0da1ec24242f1de711d Author: Amir Tzin Date: Tue Jun 10 18:15:07 2025 +0300 net/mlx5: Fix ECVF vports unload on shutdown flow Fix shutdown flow UAF when a virtual function is created on the embedded chip (ECVF) of a BlueField device. In such case the vport acl ingress table is not properly destroyed. ECVF functionality is independent of ecpf_vport_exists capability and thus functions mlx5_eswitch_(enable|disable)_pf_vf_vports() should not test it when enabling/disabling ECVF vports. kernel log: [] refcount_t: underflow; use-after-free. [] WARNING: CPU: 3 PID: 1 at lib/refcount.c:28 refcount_warn_saturate+0x124/0x220 ---------------- [] Call trace: [] refcount_warn_saturate+0x124/0x220 [] tree_put_node+0x164/0x1e0 [mlx5_core] [] mlx5_destroy_flow_table+0x98/0x2c0 [mlx5_core] [] esw_acl_ingress_table_destroy+0x28/0x40 [mlx5_core] [] esw_acl_ingress_lgcy_cleanup+0x80/0xf4 [mlx5_core] [] esw_legacy_vport_acl_cleanup+0x44/0x60 [mlx5_core] [] esw_vport_cleanup+0x64/0x90 [mlx5_core] [] mlx5_esw_vport_disable+0xc0/0x1d0 [mlx5_core] [] mlx5_eswitch_unload_ec_vf_vports+0xcc/0x150 [mlx5_core] [] mlx5_eswitch_disable_sriov+0x198/0x2a0 [mlx5_core] [] mlx5_device_disable_sriov+0xb8/0x1e0 [mlx5_core] [] mlx5_sriov_detach+0x40/0x50 [mlx5_core] [] mlx5_unload+0x40/0xc4 [mlx5_core] [] mlx5_unload_one_devl_locked+0x6c/0xe4 [mlx5_core] [] mlx5_unload_one+0x3c/0x60 [mlx5_core] [] shutdown+0x7c/0xa4 [mlx5_core] [] pci_device_shutdown+0x3c/0xa0 [] device_shutdown+0x170/0x340 [] __do_sys_reboot+0x1f4/0x2a0 [] __arm64_sys_reboot+0x2c/0x40 [] invoke_syscall+0x78/0x100 [] el0_svc_common.constprop.0+0x54/0x184 [] do_el0_svc+0x30/0xac [] el0_svc+0x48/0x160 [] el0t_64_sync_handler+0xa4/0x12c [] el0t_64_sync+0x1a4/0x1a8 [] --[ end trace 9c4601d68c70030e ]--- Fixes: a7719b29a821 ("net/mlx5: Add management of EC VF vports") Reviewed-by: Daniel Jurgens Reviewed-by: Moshe Shemesh Signed-off-by: Amir Tzin Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-3-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit f37258133c1e95e61db532e14067e28b4881bf24 Author: Moshe Shemesh Date: Tue Jun 10 18:15:06 2025 +0300 net/mlx5: Ensure fw pages are always allocated on same NUMA When firmware asks the driver to allocate more pages, using event of give_pages, the driver should always allocate it from same NUMA, the original device NUMA. Current code uses dev_to_node() which can result in different NUMA as it is changed by other driver flows, such as mlx5_dma_zalloc_coherent_node(). Instead, use saved numa node for allocating firmware pages. Fixes: 311c7c71c9bb ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node") Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250610151514.1094735-2-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit c7bdeed31e4c421d340c56411c3be2afbf15cbc1 Merge: 260388f79e94fb b4a8085ceefb7b Author: Jakub Kicinski Date: Wed Jun 11 14:28:51 2025 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-06-10 (i40e, iavf, ice, e1000) For i40e: Robert Malz improves reset handling for situations where multiple reset requests could cause some to be missed. For iavf: Ahmed adds detection, and handling, of reset that could occur early in the initialization process to stop long wait/hangs. For ice: Anton, properly, sets missed use_nsecs value. For e1000: Joe Damato moves cancel_work_sync() call to avoid deadlock. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000: Move cancel_work_sync to avoid deadlock ice/ptp: fix crosstimestamp reporting iavf: fix reset_task for early reset event i40e: retry VFLR handling if there is ongoing VF reset i40e: return false from i40e_reset_vf if reset is in progress ==================== Link: https://patch.msgid.link/20250610171348.1476574-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 47096d301e39f96962ca1fd6c7b71bfa796c53db Author: Tejun Heo Date: Wed Jun 11 11:05:16 2025 -1000 sched_ext: Update mailing list entry in MAINTAINERS Use sched-ext@lists.linux.dev instead of LKML. Signed-off-by: Tejun Heo commit 7dd38ba4acbea9875b4ee061e20a26413e39d9f4 Author: Luiz Augusto von Dentz Date: Wed Jun 11 16:36:27 2025 -0400 Bluetooth: MGMT: Fix sparse errors This fixes the following errors: net/bluetooth/mgmt.c:5400:59: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned short [usertype] handle @@ got restricted __le16 [usertype] monitor_handle @@ net/bluetooth/mgmt.c:5400:59: sparse: expected unsigned short [usertype] handle net/bluetooth/mgmt.c:5400:59: sparse: got restricted __le16 [usertype] monitor_handle Fixes: e6ed54e86aae ("Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506060347.ux2O1p7L-lkp@intel.com/ Signed-off-by: Luiz Augusto von Dentz commit 5842c01a9ed1d515c8ba2d6d3733eac78ace89c1 Author: Luiz Augusto von Dentz Date: Fri Jun 6 14:32:49 2025 -0400 Bluetooth: ISO: Fix not using bc_sid as advertisement SID Currently bc_sid is being ignore when acting as Broadcast Source role, so this fix it by passing the bc_sid and then use it when programming the PA: < HCI Command: LE Set Exte.. (0x08|0x0036) plen 25 Handle: 0x01 Properties: 0x0000 Min advertising interval: 140.000 msec (0x00e0) Max advertising interval: 140.000 msec (0x00e0) Channel map: 37, 38, 39 (0x07) Own address type: Random (0x01) Peer address type: Public (0x00) Peer address: 00:00:00:00:00:00 (OUI 00-00-00) Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00) TX power: Host has no preference (0x7f) Primary PHY: LE 1M (0x01) Secondary max skip: 0x00 Secondary PHY: LE 2M (0x02) SID: 0x01 Scan request notifications: Disabled (0x00) Signed-off-by: Luiz Augusto von Dentz commit 2df108c227b266a9ec9e3fda3828d2ac9662aa33 Author: Luiz Augusto von Dentz Date: Mon Jun 9 14:53:53 2025 -0400 Bluetooth: ISO: Fix using BT_SK_PA_SYNC to detect BIS sockets BT_SK_PA_SYNC is only valid for Broadcast Sinks which means socket used for Broadcast Sources wouldn't be able to use the likes of getpeername to read out the sockaddr_iso_bc fields which may have been update (e.g. bc_sid). Fixes: 0a766a0affb5 ("Bluetooth: ISO: Fix getpeername not returning sockaddr_iso_bc fields") Signed-off-by: Luiz Augusto von Dentz commit 47c03902269aff377f959dc3fd94a9733aa31d6e Author: Luiz Augusto von Dentz Date: Tue Jun 10 10:14:35 2025 -0400 Bluetooth: eir: Fix possible crashes on eir_create_adv_data eir_create_adv_data may attempt to add EIR_FLAGS and EIR_TX_POWER without checking if that would fit. Link: https://github.com/bluez/bluez/issues/1117#issuecomment-2958244066 Fixes: 01ce70b0a274 ("Bluetooth: eir: Move EIR/Adv Data functions to its own file") Signed-off-by: Luiz Augusto von Dentz commit 5725bc608252050ed8a4d47d59225b7dd73474c8 Author: Luiz Augusto von Dentz Date: Thu Jun 5 11:15:16 2025 -0400 Bluetooth: hci_sync: Fix broadcast/PA when using an existing instance When using and existing adv_info instance for broadcast source it needs to be updated to periodic first before it can be reused, also in case the existing instance already have data hci_set_adv_instance_data cannot be used directly since it would overwrite the existing data so this reappend the original data after the Broadcast ID, if one was generated. Example: bluetoothctl># Add PBP to EA so it can be later referenced as the BIS ID bluetoothctl> advertise.service 0x1856 0x00 0x00 bluetoothctl> advertise on ... < HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 13 Handle: 0x01 Operation: Complete extended advertising data (0x03) Fragment preference: Minimize fragmentation (0x01) Data length: 0x09 Service Data: Public Broadcast Announcement (0x1856) Data[2]: 0000 Flags: 0x06 LE General Discoverable Mode BR/EDR Not Supported ... bluetoothctl># Attempt to acquire Broadcast Source transport bluetoothctl>transport.acquire /org/bluez/hci0/pac_bcast0/fd0 ... < HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 255 Handle: 0x01 Operation: Complete extended advertising data (0x03) Fragment preference: Minimize fragmentation (0x01) Data length: 0x0e Service Data: Broadcast Audio Announcement (0x1852) Broadcast ID: 11371620 (0xad8464) Service Data: Public Broadcast Announcement (0x1856) Data[2]: 0000 Flags: 0x06 LE General Discoverable Mode BR/EDR Not Supported Link: https://github.com/bluez/bluez/issues/1117 Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Signed-off-by: Luiz Augusto von Dentz commit 20a2aa01f5aeb6daad9aeaa7c33dd512c58d81eb Author: Luiz Augusto von Dentz Date: Thu Jun 5 11:14:25 2025 -0400 Bluetooth: Fix NULL pointer deference on eir_get_service_data The len parameter is considered optional so it can be NULL so it cannot be used for skipping to next entry of EIR_SERVICE_DATA. Fixes: 8f9ae5b3ae80 ("Bluetooth: eir: Add helpers for managing service data") Signed-off-by: Luiz Augusto von Dentz commit 62a65b32bddb0f242b106b8c464913f2f01c108d Author: Drew Fustini Date: Fri Jun 6 11:11:17 2025 -0700 dt-bindings: pmem: Convert binding to YAML Convert the PMEM device tree binding from text to YAML. This will allow device trees with pmem-region nodes to pass dtbs_check. [iweiny: fix ups from Rob/Drew] Acked-by: Conor Dooley Acked-by: Oliver O'Halloran Signed-off-by: Drew Fustini Acked-by: Dan Williams Link: https://patch.msgid.link/20250606184405.359812-4-drew@pdp7.com Signed-off-by: Ira Weiny commit 488ef3560196ee10fc1c5547e1574a87068c3494 Author: Herbert Xu Date: Wed May 28 13:18:17 2025 +0100 KEYS: Invert FINAL_PUT bit Invert the FINAL_PUT bit so that test_bit_acquire and clear_bit_unlock can be used instead of smp_mb. Signed-off-by: Herbert Xu Signed-off-by: David Howells Reviewed-by: Jarkko Sakkinen Signed-off-by: Linus Torvalds commit 179a8427fcbffe36ccfed5e138d7c9b6180caff9 Author: Ashish Kalra Date: Mon May 12 22:16:34 2025 +0000 KVM: SEV: Disable SEV-SNP support on initialization failure During platform init, SNP initialization may fail for several reasons, such as firmware command failures and incompatible versions. However, the KVM capability may continue to advertise support for it. The platform may have SNP enabled but if SNP_INIT fails then SNP is not supported by KVM. During KVM module initialization query the SNP platform status to obtain the SNP initialization state and use it as an additional condition to determine support for SEV-SNP. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Co-developed-by: Pratik R. Sampat Signed-off-by: Pratik R. Sampat Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Reviewed-by: Pankaj Gupta Reviewed-by: Pavan Kumar Paluri Message-ID: <20250512221634.12045-1-Ashish.Kalra@amd.com> Signed-off-by: Paolo Bonzini commit ce360c2bfd219130bf1df4282ccf2e9bdf3a5ed5 Merge: 19272b37aa4f83 fad4cf944839da Author: Paolo Bonzini Date: Wed Jun 11 14:25:22 2025 -0400 Merge tag 'kvmarm-fixes-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take #2 - Rework of system register accessors for system registers that are directly writen to memory, so that sanitisation of the in-memory value happens at the correct time (after the read, or before the write). For convenience, RMW-style accessors are also provided. - Multiple fixes for the so-called "arch-timer-edge-cases' selftest, which was always broken. commit 83f066fac3c231e58e9adf3b307e96fee172dfb3 Author: Dan Carpenter Date: Wed Jun 11 16:09:45 2025 +0300 spi: stm32-ospi: clean up on error in probe() If reset_control_acquire() fails, then we can't return directly. We need to do a little clean up first. Fixes: cf2c3eceb757 ("spi: stm32-ospi: Make usage of reset_control_acquire/release() API") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aEmAGTUzzKZlLe3K@stanley.mountain Signed-off-by: Mark Brown commit 69a14d146f3b87819f3fb73ed5d1de3e1fa680c1 Author: Sebastian Andrzej Siewior Date: Mon Jun 2 13:00:27 2025 +0200 futex: Verify under the lock if hash can be replaced Once the global hash is requested there is no way back to switch back to the per-task private hash. This is checked at the begin of the function. It is possible that two threads simultaneously request the global hash and both pass the initial check and block later on the mm::futex_hash_lock. In this case the first thread performs the switch to the global hash. The second thread will also attempt to switch to the global hash and while doing so, accessing the nonexisting slot 1 of the struct futex_private_hash. The same applies if the hash is made immutable: There is no reference counting and the hash must not be replaced. Verify under mm_struct::futex_phash that neither the global hash nor an immutable hash in use. Tested-by: "Lai, Yi" Reported-by: "Lai, Yi" Closes: https://lore.kernel.org/all/aDwDw9Aygqo6oAx+@ly-workstation/ Fixes: bd54df5ea7cad ("futex: Allow to resize the private local hash") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250610104400.1077266-5-bigeasy@linutronix.de/ commit 961296e89dc3800e6a3abc3f5d5bb4192cf31e98 Author: Jens Axboe Date: Wed Jun 11 08:48:46 2025 -0600 block: use plug request list tail for one-shot backmerge attempt Previously, the block layer stored the requests in the plug list in LIFO order. For this reason, blk_attempt_plug_merge() would check just the head entry for a back merge attempt, and abort after that unless requests for multiple queues existed in the plug list. If more than one request is present in the plug list, this makes the one-shot back merging less useful than before, as it'll always fail to find a quick merge candidate. Use the tail entry for the one-shot merge attempt, which is the last added request in the list. If that fails, abort immediately unless there are multiple queues available. If multiple queues are available, then scan the list. Ideally the latter scan would be a backwards scan of the list, but as it currently stands, the plug list is singly linked and hence this isn't easily feasible. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-block/20250611121626.7252-1-abuehaze@amazon.com/ Reported-by: Hazem Mohamed Abuelfotoh Fixes: e70c301faece ("block: don't reorder requests in blk_add_rq_to_plug") Signed-off-by: Jens Axboe commit cf625013d8741c01407bbb4a60c111b61b9fa69d Author: Christoph Hellwig Date: Wed Jun 11 06:44:16 2025 +0200 block: don't use submit_bio_noacct_nocheck in blk_zone_wplug_bio_work Bios queued up in the zone write plug have already gone through all all preparation in the submit_bio path, including the freeze protection. Submitting them through submit_bio_noacct_nocheck duplicates the work and can can cause deadlocks when freezing a queue with pending bio write plugs. Go straight to ->submit_bio or blk_mq_submit_bio to bypass the superfluous extra freeze protection and checks. Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") Reported-by: Bart Van Assche Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Link: https://lore.kernel.org/r/20250611044416.2351850-1-hch@lst.de Signed-off-by: Jens Axboe commit f705d33c2f0353039d03e5d6f18f70467d86080e Author: Damien Le Moal Date: Wed Jun 11 09:59:15 2025 +0900 block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion When blk_zone_write_plug_bio_endio() is called for a regular write BIO used to emulate a zone append operation, that is, a BIO flagged with BIO_EMULATES_ZONE_APPEND, the BIO operation code is restored to the original REQ_OP_ZONE_APPEND but the BIO_EMULATES_ZONE_APPEND flag is not cleared. Clear it to fully return the BIO to its orginal definition. Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250611005915.89843-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit ff20c516485efbeb5c32bcb6aa5a24f73774185b Author: Ming Lei Date: Wed Jun 11 16:56:32 2025 +0800 ublk: document auto buffer registration(UBLK_F_AUTO_BUF_REG) Document recently merged feature auto buffer registration(UBLK_F_AUTO_BUF_REG). Cc: Caleb Sander Mateos Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250611085632.109719-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 4bb08cf974c54adc321b8505ce82720c2a15c451 Author: Ming Lei Date: Wed Jun 11 16:49:38 2025 +0800 loop: move lo_set_size() out of queue freeze It isn't necessary to freeze queue for updating disk size given submit_bio() doesn't grab queue usage counter for checking eod. Also many driver won't freeze queue for calling set_capacity_and_notify(). Move lo_set_size() out of queue freeze for fixing many lockdep warning report. Link: https://lore.kernel.org/linux-block/67ea99e0.050a0220.3c3d88.0042.GAE@google.com/ Reported-by: syzbot+9dd7dbb1a4b915dee638@syzkaller.appspotmail.com Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250611084938.108829-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 72f37957007d25f4290e3ba40d40aaec1dd0b0cf Author: Binbin Zhou Date: Tue Jun 10 19:59:26 2025 +0800 gpio: loongson-64bit: Correct Loongson-7A2000 ACPI GPIO access mode According to the description of the Loongson-7A2000 ACPI GPIO register in the manual, its access mode should be BIT_CTRL_MODE, otherwise there maybe some unpredictable behavior. Cc: stable@vger.kernel.org Fixes: 44fe79020b91 ("gpio: loongson-64bit: Add more gpio chip support") Signed-off-by: Binbin Zhou Reviewed-by: Huacai Chen Link: https://lore.kernel.org/r/20250610115926.347845-1-zhoubinbin@loongson.cn Signed-off-by: Bartosz Golaszewski commit bc4394e5e79cdda1b0997e0be1d65e242f523f02 Author: Kan Liang Date: Fri Jun 6 12:25:46 2025 -0700 perf: Fix the throttle error of some clock events Both ARM and IBM CI reports RCU stall, which can be reproduced by the below perf command. perf record -a -e cpu-clock -- sleep 2 The issue is introduced by the generic throttle patch set, which unconditionally invoke the event_stop() when throttle is triggered. The cpu-clock and task-clock are two special SW events, which rely on the hrtimer. The throttle is invoked in the hrtimer handler. The event_stop()->hrtimer_cancel() waits for the handler to finish, which is a deadlock. Instead of invoking the stop(), the HRTIMER_NORESTART should be used to stop the timer. There may be two ways to fix it: - Introduce a PMU flag to track the case. Avoid the event_stop in perf_event_throttle() if the flag is detected. It has been implemented in the https://lore.kernel.org/lkml/20250528175832.2999139-1-kan.liang@linux.intel.com/ The new flag was thought to be an overkill for the issue. - Add a check in the event_stop. Return immediately if the throttle is invoked in the hrtimer handler. Rely on the existing HRTIMER_NORESTART method to stop the timer. The latter is implemented here. Move event->hw.interrupts = MAX_INTERRUPTS before the stop(). It makes the order the same as perf_event_unthrottle(). Except the patch, no one checks the hw.interrupts in the stop(). There is no impact from the order change. When stops in the throttle, the event should not be updated, stop(event, 0). But the cpu_clock_event_stop() doesn't handle the flag. In logic, it's wrong. But it didn't bring any problems with the old code, because the stop() was not invoked when handling the throttle. Checking the flag before updating the event. Fixes: 9734e25fbf5a ("perf: Fix the throttle logic for a group") Closes: https://lore.kernel.org/lkml/20250527161656.GJ2566836@e132581.arm.com/ Closes: https://lore.kernel.org/lkml/djxlh5fx326gcenwrr52ry3pk4wxmugu4jccdjysza7tlc5fef@ktp4rffawgcw/ Closes: https://lore.kernel.org/lkml/8e8f51d8-af64-4d9e-934b-c0ee9f131293@linux.ibm.com/ Closes: https://lore.kernel.org/lkml/4ce106d0-950c-aadc-0b6a-f0215cd39913@maine.edu/ Reported-by: Leo Yan Reported-by: Aishwarya TCV Reported-by: Alexei Starovoitov Reported-by: Venkat Rao Bagalkote Reported-by: Vince Weaver Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20250606192546.915765-1-kan.liang@linux.intel.com commit 260388f79e94fb3026c419a208ece8358bb7b555 Author: Jakub Raczynski Date: Mon Jun 9 17:31:47 2025 +0200 net/mdiobus: Fix potential out-of-bounds clause 45 read/write access When using publicly available tools like 'mdio-tools' to read/write data from/to network interface and its PHY via C45 (clause 45) mdiobus, there is no verification of parameters passed to the ioctl and it accepts any mdio address. Currently there is support for 32 addresses in kernel via PHY_MAX_ADDR define, but it is possible to pass higher value than that via ioctl. While read/write operation should generally fail in this case, mdiobus provides stats array, where wrong address may allow out-of-bounds read/write. Fix that by adding address verification before C45 read/write operation. While this excludes this access from any statistics, it improves security of read/write operation. Fixes: 4e4aafcddbbf ("net: mdio: Add dedicated C45 API to MDIO bus drivers") Signed-off-by: Jakub Raczynski Reported-by: Wenjing Shan Signed-off-by: David S. Miller commit 0e629694126ca388916f059453a1c36adde219c4 Author: Jakub Raczynski Date: Mon Jun 9 17:31:46 2025 +0200 net/mdiobus: Fix potential out-of-bounds read/write access When using publicly available tools like 'mdio-tools' to read/write data from/to network interface and its PHY via mdiobus, there is no verification of parameters passed to the ioctl and it accepts any mdio address. Currently there is support for 32 addresses in kernel via PHY_MAX_ADDR define, but it is possible to pass higher value than that via ioctl. While read/write operation should generally fail in this case, mdiobus provides stats array, where wrong address may allow out-of-bounds read/write. Fix that by adding address verification before read/write operation. While this excludes this access from any statistics, it improves security of read/write operation. Fixes: 080bb352fad00 ("net: phy: Maintain MDIO device and bus statistics") Signed-off-by: Jakub Raczynski Reported-by: Wenjing Shan Signed-off-by: David S. Miller commit afe382843717d44b24ef5014d57dcbaab75a4052 Author: Marek Szyprowski Date: Wed May 7 18:09:12 2025 +0200 udmabuf: use sgtable-based scatterlist wrappers Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgtable's nents. Fixes: 1ffe09590121 ("udmabuf: fix dma-buf cpu access") CC: stable@vger.kernel.org Signed-off-by: Marek Szyprowski Acked-by: Vivek Kasireddy Reviewed-by: Christian König Signed-off-by: Christian König Link: https://lore.kernel.org/r/20250507160913.2084079-3-m.szyprowski@samsung.com commit 6f29d393061c2c1fa30a72a0e9b01e15e09dae34 Author: Niklas Cassel Date: Tue Jun 10 13:07:59 2025 +0200 ata: ahci: Use correct BIOS build date for ThinkPad W541 quirk Fix the TODO in ahci_broken_lpm() by using the proper BIOS build date. The proper BIOS build date was provided by Hans, see Link. Link: https://lore.kernel.org/linux-ide/6ea509c8-b38d-4941-8a29-c1117ff3dd5b@redhat.com/ Reviewed-by: Damien Le Moal Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250610110757.1318959-6-cassel@kernel.org Signed-off-by: Niklas Cassel commit 3e5378779091c2f9a96d4404066e1923c92ceb8b Author: Philipp Stanner Date: Tue Jun 10 15:54:14 2025 +0200 ata: pata_macio: Fix PCI region leak pci_request_regions() became a managed devres functions if the PCI device was enabled with pcim_enable_device(), which is the case for pata_macio. The PCI subsystem recently removed this hybrid feature from pci_request_region(). When doing so, pata_macio was forgotten to be ported to use pcim_request_all_regions(). If that function is not used, pata_macio will fail on driver-reload because the PCI regions will remain blocked. Fix the region leak by replacing pci_request_regions() with its managed counterpart, pcim_request_all_regions(). Fixes: 51f6aec99cb0 ("PCI: Remove hybrid devres nature from request functions") Signed-off-by: Philipp Stanner Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20250610135413.35930-2-phasta@kernel.org Signed-off-by: Niklas Cassel commit ad5a0351064c8f744416df3a49156d2c61af5bc0 Author: NeilBrown Date: Tue Jun 10 11:04:04 2025 +1000 VFS: change try_lookup_noperm() to skip revalidation The recent change from using d_hash_and_lookup() to using try_lookup_noperm() inadvertently introduce a d_revalidate() call when the lookup was successful. Steven French reports that this resulted in worse than halving of performance in some cases. Prior to the offending patch the only caller of try_lookup_noperm() was autofs which does not need the d_revalidate(). So it is safe to remove the d_revalidate() call providing we stop using try_lookup_noperm() to implement lookup_noperm(). The "try_" in the name is strongly suggestive that the caller isn't expecting much effort, so it seems reasonable to avoid the effort of d_revalidate(). Fixes: 06c567403ae5 ("Use try_lookup_noperm() instead of d_hash_and_lookup() outside of VFS") Reported-by: Steve French Link: https://lore.kernel.org/all/CAH2r5mu5SfBrdc2CFHwzft8=n9koPMk+Jzwpy-oUMx-wCRCesQ@mail.gmail.com/ Signed-off-by: NeilBrown Link: https://lore.kernel.org/174951744454.608730.18354002683881684261@noble.neil.brown.name Tested-by: Steve French Signed-off-by: Christian Brauner commit 6bdd3a01fe4627ad7a562ba38eb759eba715b671 Author: Christoph Hellwig Date: Tue Jun 10 16:00:20 2025 +0200 fs: add missing values to TRACE_IOCB_STRINGS Make sure all values are covered. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/20250610140020.2227932-1-hch@lst.de Signed-off-by: Christian Brauner commit aa3f93cd75bf8195e434deefff853d70d723d6f0 Author: Christian König Date: Thu Jun 5 10:38:30 2025 +0200 dma-buf: fix compare in WARN_ON_ONCE Smatch pointed out this trivial typo: drivers/dma-buf/dma-buf.c:1123 dma_buf_map_attachment() warn: passing positive error code '16' to 'ERR_PTR' drivers/dma-buf/dma-buf.c 1113 dma_resv_assert_held(attach->dmabuf->resv); 1114 1115 if (dma_buf_pin_on_map(attach)) { 1116 ret = attach->dmabuf->ops->pin(attach); 1117 /* 1118 * Catch exporters making buffers inaccessible even when 1119 * attachments preventing that exist. 1120 */ 1121 WARN_ON_ONCE(ret == EBUSY); ^^^^^ This was probably intended to be -EBUSY? 1122 if (ret) --> 1123 return ERR_PTR(ret); ^^^ Otherwise we will eventually crash. 1124 } 1125 1126 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); 1127 if (!sg_table) 1128 sg_table = ERR_PTR(-ENOMEM); 1129 if (IS_ERR(sg_table)) 1130 goto error_unpin; 1131 Signed-off-by: Christian König Reviewed-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250605085336.62156-1-christian.koenig@amd.com commit f87586598fffac31afc1141471b789251b030a76 Author: Zilin Guan Date: Fri May 23 11:01:56 2025 +0000 wifi: cfg80211: use kfree_sensitive() for connkeys cleanup The nl80211_parse_connkeys() function currently uses kfree() to release the 'result' structure in error handling paths. However, if an error occurs due to result->def being less than 0, the 'result' structure may contain sensitive information. To prevent potential leakage of sensitive data, replace kfree() with kfree_sensitive() when freeing 'result'. This change aligns with the approach used in its caller, nl80211_join_ibss(), enhancing the overall security of the wireless subsystem. Signed-off-by: Zilin Guan Link: https://patch.msgid.link/20250523110156.4017111-1-zilin@seu.edu.cn Signed-off-by: Johannes Berg commit 8d60350891b185553836ebea1c406078a69a56e4 Merge: 6a0f81c549a00f f3fe49dbddd73f Author: Johannes Berg Date: Wed Jun 11 11:28:35 2025 +0200 Merge tag 'ath-current-20250608' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath Jeff Johnson says: ================== ath.git updates for v6.16-rc2 Fix a handful of both build and stability issues across multiple drivers. ================== Signed-off-by: Johannes Berg commit 6a0f81c549a00f87865ff0ad2400944ca0726868 Author: Emmanuel Grumbach Date: Tue Jun 3 12:17:54 2025 +0300 wifi: iwlwifi: fix merge damage related to iwl_pci_resume The changes I made in wifi: iwlwifi: don't warn if the NIC is gone in resume conflicted with a major rework done in this area. The merge de-facto removed my changes. Re-add them. Signed-off-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250603091754.70182-1-emmanuel.grumbach@intel.com Fixes: 06c4b2036818 ("Merge tag 'iwlwifi-next-2025-05-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next") Signed-off-by: Johannes Berg commit 570896604f47d44d4ff6882d2a588428d2a6ef17 Author: Francesco Dolcini Date: Thu Jun 5 15:03:02 2025 +0200 Revert "wifi: mwifiex: Fix HT40 bandwidth issue." This reverts commit 4fcfcbe45734 ("wifi: mwifiex: Fix HT40 bandwidth issue.") That commit introduces a regression, when HT40 mode is enabled, received packets are lost, this was experience with W8997 with both SDIO-UART and SDIO-SDIO variants. From an initial investigation the issue solves on its own after some time, but it's not clear what is the reason. Given that this was just a performance optimization, let's revert it till we have a better understanding of the issue and a proper fix. Cc: Jeff Chen Cc: stable@vger.kernel.org Fixes: 4fcfcbe45734 ("wifi: mwifiex: Fix HT40 bandwidth issue.") Closes: https://lore.kernel.org/all/20250603203337.GA109929@francesco-nb/ Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20250605130302.55555-1-francesco@dolcini.it [fix commit reference format] Signed-off-by: Johannes Berg commit 7cd9a11dd0c3d1dd225795ed1b5b53132888e7b5 Author: Mike Rapoport (Microsoft) Date: Tue Jun 3 14:14:45 2025 +0300 Revert "mm/execmem: Unify early execmem_cache behaviour" The commit d6d1e3e6580c ("mm/execmem: Unify early execmem_cache behaviour") changed early behaviour of execemem ROX cache to allow its usage in early x86 code that allocates text pages when CONFIG_MITGATION_ITS is enabled. The permission management of the pages allocated from execmem for ITS mitigation is now completely contained in arch/x86/kernel/alternatives.c and therefore there is no need to special case early allocations in execmem. This reverts commit d6d1e3e6580ca35071ad474381f053cbf1fb6414. Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250603111446.2609381-6-rppt@kernel.org commit a82b26451de126a5ae130361081986bc459afe9b Author: Peter Zijlstra (Intel) Date: Tue Jun 3 14:14:44 2025 +0300 x86/its: explicitly manage permissions for ITS pages execmem_alloc() sets permissions differently depending on the kernel configuration, CPU support for PSE and whether a page is allocated before or after mark_rodata_ro(). Add tracking for pages allocated for ITS when patching the core kernel and make sure the permissions for ITS pages are explicitly managed for both kernel and module allocations. Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches") Signed-off-by: Peter Zijlstra (Intel) Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250603111446.2609381-5-rppt@kernel.org commit 0b0cae7119a0ec9449d7261b5e672a5fed765068 Author: Mike Rapoport (Microsoft) Date: Tue Jun 3 14:14:43 2025 +0300 x86/its: move its_pages array to struct mod_arch_specific The of pages with ITS thunks allocated for modules are tracked by an array in 'struct module'. Since this is very architecture specific data structure, move it to 'struct mod_arch_specific'. No functional changes. Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches") Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250603111446.2609381-4-rppt@kernel.org commit 47410d839fcda6890cb82828f874f97710982f24 Author: Mike Rapoport (Microsoft) Date: Tue Jun 3 14:14:42 2025 +0300 x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set Currently ROX cache in execmem is enabled regardless of STRICT_MODULE_RWX setting. This breaks an assumption that module memory is writable when STRICT_MODULE_RWX is disabled, for instance for kernel debuggin. Only enable ROX cache in execmem when STRICT_MODULE_RWX is set to restore the original behaviour of module text permissions. Fixes: 64f6a4e10c05 ("x86: re-enable EXECMEM_ROX support") Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250603111446.2609381-3-rppt@kernel.org commit 1dbf30fdb5e57fb2c39f17f35f2b544d5de34397 Author: Juergen Gross Date: Tue Jun 3 14:14:41 2025 +0300 x86/mm/pat: don't collapse pages without PSE set Collapsing pages to a leaf PMD or PUD should be done only if X86_FEATURE_PSE is available, which is not the case when running e.g. as a Xen PV guest. Fixes: 41d88484c71c ("x86/mm/pat: restore large ROX pages after fragmentation") Signed-off-by: Juergen Gross Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250528123557.12847-3-jgross@suse.com commit d9816ec74e6d6aa29219d010bba3f780ba1d9d75 Author: Carlos Fernandez Date: Mon Jun 9 09:26:26 2025 +0200 macsec: MACsec SCI assignment for ES = 0 According to 802.1AE standard, when ES and SC flags in TCI are zero, used SCI should be the current active SC_RX. Current code uses the header MAC address. Without this patch, when ES flag is 0 (using a bridge or switch), header MAC will not fit the SCI and MACSec frames will be discarted. In order to test this issue, MACsec link should be stablished between two interfaces, setting SC and ES flags to zero and a port identifier different than one. For example, using ip macsec tools: ip link add link $ETH0 macsec0 type macsec port 11 send_sci off end_station off ip macsec add macsec0 tx sa 0 pn 2 on key 01 $ETH1_KEY ip macsec add macsec0 rx port 11 address $ETH1_MAC ip macsec add macsec0 rx port 11 address $ETH1_MAC sa 0 pn 2 on key 02 ip link set dev macsec0 up ip link add link $ETH1 macsec1 type macsec port 11 send_sci off end_station off ip macsec add macsec1 tx sa 0 pn 2 on key 01 $ETH0_KEY ip macsec add macsec1 rx port 11 address $ETH0_MAC ip macsec add macsec1 rx port 11 address $ETH0_MAC sa 0 pn 2 on key 02 ip link set dev macsec1 up Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Co-developed-by: Andreu Montiel Signed-off-by: Andreu Montiel Signed-off-by: Carlos Fernandez Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit b8d3291d3185b5c69ba36362ae1a370f06a33e5c Author: Nathan Chancellor Date: Tue Jun 10 12:40:38 2025 -0700 drm/sitronix: st7571-i2c: Select VIDEOMODE_HELPERS This driver requires of_get_display_timing() from CONFIG_VIDEOMODE_HELPERS but does not select it. If no other driver selects it, there will be a failure from the linker if the driver is built in or modpost if it is a module. ERROR: modpost: "of_get_display_timing" [drivers/gpu/drm/sitronix/st7571-i2c.ko] undefined! Select CONFIG_VIDEOMODE_HELPERS to resolve the build failure. Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250610-drm-st7571-i2c-select-videomode-helpers-v1-1-d30b50ff6e64@kernel.org Signed-off-by: Maxime Ripard commit 40a98e702b528c631094f2e524d309faf33dc774 Author: Eric Biggers Date: Tue Jun 10 12:16:00 2025 -0700 crypto: hkdf - move to late_initcall The HKDF self-tests depend on the HMAC algorithms being registered. HMAC is now registered at module_init, which put it at the same level as HKDF. Move HKDF to late_initcall so that it runs afterwards. Fixes: ef93f1562803 ("Revert "crypto: run initcalls for generic implementations earlier"") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8d90d9872edae7e78c3a12b98e239bfaa66f3639 Author: Charles Mirabile Date: Fri May 30 17:14:22 2025 -0400 riscv: fix runtime constant support for nommu kernels the `__runtime_fixup_32` function does not handle the case where `val` is zero correctly (as might occur when patching a nommu kernel and referring to a physical address below the 4GiB boundary whose upper 32 bits are all zero) because nothing in the existing logic prevents the code from taking the `else` branch of both nop-checks and emitting two `nop` instructions. This leaves random garbage in the register that is supposed to receive the upper 32 bits of the pointer instead of zero that when combined with the value for the lower 32 bits yields an invalid pointer and causes a kernel panic when that pointer is eventually accessed. The author clearly considered the fact that if the `lui` is converted into a `nop` that the second instruction needs to be adjusted to become an `li` instead of an `addi`, hence introducing the `addi_insn_mask` variable, but didn't follow that logic through fully to the case where the `else` branch executes. To fix it just adjust the logic to ensure that the second `else` branch is not taken if the first instruction will be patched to a `nop`. Fixes: a44fb5722199 ("riscv: Add runtime constant support") Signed-off-by: Charles Mirabile Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250530211422.784415-2-cmirabil@redhat.com Signed-off-by: Palmer Dabbelt commit f478d68b653323b691280b40fbd3b8ca1ac75aa2 Author: Lorenzo Bianconi Date: Mon Jun 9 22:40:35 2025 +0200 net: airoha: Enable RX queues 16-31 Fix RX_DONE_INT_MASK definition in order to enable RX queues 16-31. Fixes: f252493e18353 ("net: airoha: Enable multiple IRQ lines support in airoha_eth driver.") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250609-aioha-fix-rx-queue-mask-v1-1-f33706a06fa2@kernel.org Signed-off-by: Jakub Kicinski commit c85bf1975108d2e2431c11d1cb7e95aca587dfbe Author: Gustavo Luiz Duarte Date: Mon Jun 9 11:24:20 2025 -0700 netconsole: fix appending sysdata when sysdata_fields == SYSDATA_RELEASE Before appending sysdata, prepare_extradata() checks if any feature is enabled in sysdata_fields (and exits early if none is enabled). When SYSDATA_RELEASE was introduced, we missed adding it to the list of features being checked against sysdata_fields in prepare_extradata(). The result was that, if only SYSDATA_RELEASE is enabled in sysdata_fields, we incorreclty exit early and fail to append the release. Instead of checking specific bits in sysdata_fields, check if sysdata_fields has ALL bit zeroed and exit early if true. This fixes case when only SYSDATA_RELEASE enabled and makes the code more general / less error prone in future feature implementation. Signed-off-by: Gustavo Luiz Duarte Reviewed-by: Breno Leitao Fixes: cfcc9239e78a ("netconsole: append release to sysdata") Link: https://patch.msgid.link/20250609-netconsole-fix-v1-1-17543611ae31@gmail.com Signed-off-by: Jakub Kicinski commit 2660a544fdc0940bba15f70508a46cf9a6491230 Author: Michal Luczaj Date: Mon Jun 9 19:08:03 2025 +0200 net: Fix TOCTOU issue in sk_is_readable() sk->sk_prot->sock_is_readable is a valid function pointer when sk resides in a sockmap. After the last sk_psock_put() (which usually happens when socket is removed from sockmap), sk->sk_prot gets restored and sk->sk_prot->sock_is_readable becomes NULL. This makes sk_is_readable() racy, if the value of sk->sk_prot is reloaded after the initial check. Which in turn may lead to a null pointer dereference. Ensure the function pointer does not turn NULL after the check. Fixes: 8934ce2fd081 ("bpf: sockmap redirect ingress support") Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250609-skisreadable-toctou-v1-1-d0dfb2d62c37@rbox.co Signed-off-by: Jakub Kicinski commit f3054152c12e2eed1e72704aff47b0ea58229584 Author: Thomas Zeitlhofer Date: Mon May 19 10:54:46 2025 +0200 HID: wacom: fix crash in wacom_aes_battery_handler() Commit fd2a9b29dc9c ("HID: wacom: Remove AES power_supply after extended inactivity") introduced wacom_aes_battery_handler() which is scheduled as a delayed work (aes_battery_work). In wacom_remove(), aes_battery_work is not canceled. Consequently, if the device is removed while aes_battery_work is still pending, then hard crashes or "Oops: general protection fault..." are experienced when wacom_aes_battery_handler() is finally called. E.g., this happens with built-in USB devices after resume from hibernate when aes_battery_work was still pending at the time of hibernation. So, take care to cancel aes_battery_work in wacom_remove(). Fixes: fd2a9b29dc9c ("HID: wacom: Remove AES power_supply after extended inactivity") Signed-off-by: Thomas Zeitlhofer Acked-by: Ping Cheng Signed-off-by: Jiri Kosina commit dc9c67820f81ee0d34f9095195228fcb828315ff Author: Lucas Sanchez Sagrado Date: Mon Jun 9 16:55:36 2025 +0200 net: usb: r8152: Add device ID for TP-Link UE200 The TP-Link UE200 is a RTL8152B based USB 2.0 Fast Ethernet adapter. This patch adds its device ID. It has been tested on Ubuntu 22.04.5. Signed-off-by: Lucas Sanchez Sagrado Reviewed-by: Subbaraya Sundeep Link: https://patch.msgid.link/20250609145536.26648-1-lucsansag@gmail.com Signed-off-by: Jakub Kicinski commit 85cc50bfcb8b08c9304925b66cd2bc83c1c765bf Author: Li Ming Date: Tue Jun 3 18:43:14 2025 +0800 cxl/Documentation: Add more description about min/max scrub cycle user can configurare scrub cycle for a region or a memory device via sysfs interface. Currently, these interfaces have not enough description for the return value. So adding return value description to these interfaces. Suggested-by: Alison Schofield Signed-off-by: Shiju Jose Signed-off-by: Li Ming Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Davidlohr Bueso Link: https://patch.msgid.link/20250603104314.25569-2-ming.li@zohomail.com Signed-off-by: Dave Jiang commit fdc9be90929081ed5a9658583aa5f3121d5e8365 Author: Li Ming Date: Tue Jun 3 18:43:13 2025 +0800 cxl/edac: Fix the min_scrub_cycle of a region miscalculation When trying to update the scrub_cycle value of a cxl region, which means updating the scrub_cycle value of each memdev under a cxl region. cxl driver needs to guarantee the new scrub_cycle value is greater than the min_scrub_cycle value of a memdev, otherwise the updating operation will fail(Per Table 8-223 in CXL r3.2 section 8.2.10.9.11.1). Current implementation logic of getting the min_scrub_cycle value of a cxl region is that getting the min_scrub_cycle value of each memdevs under the cxl region, then using the minimum min_scrub_cycle value as the region's min_scrub_cycle. Checking if the new scrub_cycle value is greater than this value. If yes, updating the new scrub_cycle value to each memdevs. The issue is that the new scrub_cycle value is possibly greater than the minimum min_scrub_cycle value of all memdevs but less than the maximum min_scrub_cycle value of all memdevs if memdevs have a different min_scrub_cycle value. The updating operation will always fail on these memdevs which have a greater min_scrub_cycle than the new scrub_cycle. The correct implementation logic is to get the maximum value of these memdevs' min_scrub_cycle, check if the new scrub_cycle value is greater than the value. If yes, the new scrub_cycle value is fit for the region. The change also impacts the result of cxl_patrol_scrub_get_min_scrub_cycle(), the interface returned the minimum min_scrub_cycle value among all memdevs under the region before the change. The interface will return the maximum min_scrub_cycle value among all memdevs under the region with the change. Signed-off-by: Li Ming Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Shiju Jose Reviewed-by: Davidlohr Bueso Link: https://patch.msgid.link/20250603104314.25569-1-ming.li@zohomail.com Signed-off-by: Dave Jiang commit e0eb1b6b0cd29ca7793c501d5960fd36ba11f110 Author: Fangrui Song Date: Mon Jun 2 20:48:44 2025 -0700 riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment .rodata is implicitly included in the PT_DYNAMIC segment due to inheriting the segment of the preceding .dynamic section (in both GNU ld and LLD). When the .rodata section's size is not a multiple of 16 bytes on riscv64, llvm-readelf will report a "PT_DYNAMIC dynamic table is invalid" warning. Note: in the presence of the .dynamic section, GNU readelf and llvm-readelf's -d option decodes the dynamic section using the section. This issue arose after commit 8f8c1ff879fab60f80f3a7aec3000f47e5b03ba9 ("riscv: vdso.lds.S: remove hardcoded 0x800 .text start addr"), which placed .rodata directly after .dynamic by removing .eh_frame. This patch resolves the implicit inclusion into PT_DYNAMIC by explicitly specifying the :text output section phdr. Reported-by: Nathan Chancellor Closes: https://github.com/ClangBuiltLinux/linux/issues/2093 Signed-off-by: Fangrui Song Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250602-riscv-vdso-v1-1-0620cf63cff0@maskray.me Signed-off-by: Palmer Dabbelt commit 5cdb49a680b45f467e9d915c0e74756bc0c67c57 Author: Zhang Lixu Date: Tue Jun 10 10:01:32 2025 +0800 HID: intel-ish-hid: ipc: Add Wildcat Lake PCI device ID Add device ID of Wildcat Lake into ishtp support list. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 0e97f5b6a0808fa2ea865280708511c817d4bca3 Author: Zhang Lixu Date: Tue Jun 10 10:01:31 2025 +0800 hid: intel-ish-hid: Use PCI_DEVICE_DATA() macro for ISH device table Replace the usage of PCI_VDEVICE() with driver_data assignment in the ISH PCI device table with the PCI_DEVICE_DATA() macro. This improves code readability. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 9327e3ee5b077c4ab4495a09b67624f670ed88b6 Author: Iusico Maxim Date: Thu Jun 5 19:55:50 2025 +0200 HID: lenovo: Restrict F7/9/11 mode to compact keyboards only Commit 2f2bd7cbd1d1 ("hid: lenovo: Resend all settings on reset_resume for compact keyboards") introduced a regression for ThinkPad TrackPoint Keyboard II by removing the conditional check for enabling F7/9/11 mode needed for compact keyboards only. As a result, the non-compact keyboards can no longer toggle Fn-lock via Fn+Esc, although it can be controlled via sysfs knob that directly sends raw commands. This patch restores the previous conditional check without any additions. Cc: stable@vger.kernel.org Fixes: 2f2bd7cbd1d1 ("hid: lenovo: Resend all settings on reset_resume for compact keyboards") Signed-off-by: Iusico Maxim Signed-off-by: Jiri Kosina commit 1a8953f4f7746c6a515989774fe03047c522c613 Author: Zhang Heng Date: Thu Jun 5 15:29:59 2025 +0800 HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY MARTLINKTECHNOLOGY is a microphone device, when the HID interface in an audio device is requested to get specific report id, the following error may occur. [ 562.939373] usb 1-1.4.1.2: new full-speed USB device number 21 using xhci_hcd [ 563.104908] usb 1-1.4.1.2: New USB device found, idVendor=4c4a, idProduct=4155, bcdDevice= 1.00 [ 563.104910] usb 1-1.4.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 563.104911] usb 1-1.4.1.2: Product: USB Composite Device [ 563.104912] usb 1-1.4.1.2: Manufacturer: SmartlinkTechnology [ 563.104913] usb 1-1.4.1.2: SerialNumber: 20201111000001 [ 563.229499] input: SmartlinkTechnology USB Composite Device as /devices/pci0000:00/0000:00:07.1/0000:04:00.3/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1.2/1-1.4.1.2:1.2/0003:4C4A:4155.000F/input/input35 [ 563.291505] hid-generic 0003:4C4A:4155.000F: input,hidraw2: USB HID v2.01 Keyboard [SmartlinkTechnology USB Composite Device] on usb-0000:04:00.3-1.4.1.2/input2 [ 563.291557] usbhid 1-1.4.1.2:1.3: couldn't find an input interrupt endpoint [ 568.506654] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 573.626656] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 578.746657] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 583.866655] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 588.986657] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) Ignore HID interface. The device is working properly. Signed-off-by: Zhang Heng Signed-off-by: Jiri Kosina commit 9cf1e25053c269d64b9e9fa25e8697d6d58028d4 Author: Stanislav Fomichev Date: Tue Jun 10 10:54:37 2025 -0700 MAINTAINERS: Add myself as bpf networking reviewer I've been focusing on networking BPF bits lately, add myself as a reviewer. Signed-off-by: Stanislav Fomichev Acked-by: KP Singh Acked-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20250610175442.2138504-1-stfomichev@gmail.com Signed-off-by: Alexei Starovoitov commit fa10d4515817274a50af510d5d283d3c7fffc1ae Author: Mario Limonciello Date: Fri May 23 11:10:07 2025 -0500 HID: input: lower message severity of 'No inputs registered, leaving' to debug Plugging in a "Blue snowball" microphone always shows the error 'No inputs registered, leaving', but the device functions as intended. When a HID device is started using the function hid_hw_start() and the argument HID_CONNECT_DEFAULT it will try all various hid connect requests. Not all devices will create an input device and so the message is needlessly noisy. Decrease it to debug instead. [jkosina@suse.com: edit shortlog] Signed-off-by: Mario Limonciello Signed-off-by: Jiri Kosina commit 54bae4c17c11688339eb73a04fd24203bb6e7494 Author: Chia-Lin Kao (AceLan) Date: Tue May 6 13:50:15 2025 +0800 HID: quirks: Add quirk for 2 Chicony Electronics HP 5MP Cameras The Chicony Electronics HP 5MP Cameras (USB ID 04F2:B824 & 04F2:B82C) report a HID sensor interface that is not actually implemented. Attempting to access this non-functional sensor via iio_info causes system hangs as runtime PM tries to wake up an unresponsive sensor. Add these 2 devices to the HID ignore list since the sensor interface is non-functional by design and should not be exposed to userspace. Signed-off-by: Chia-Lin Kao (AceLan) Signed-off-by: Jiri Kosina commit 0b3bc018e86afdc0cbfef61328c63d5c08f8b370 Author: Kai Huang Date: Sat Jun 7 01:07:37 2025 +1200 x86/virt/tdx: Avoid indirect calls to TDX assembly functions Two 'static inline' TDX helper functions (sc_retry() and sc_retry_prerr()) take function pointer arguments which refer to assembly functions. Normally, the compiler inlines the TDX helper, realizes that the function pointer targets are completely static -- thus can be resolved at compile time -- and generates direct call instructions. But, other times (like when CONFIG_CC_OPTIMIZE_FOR_SIZE=y), the compiler declines to inline the helpers and will instead generate indirect call instructions. Indirect calls to assembly functions require special annotation (for various Control Flow Integrity mechanisms). But TDX assembly functions lack the special annotations and can only be called directly. Annotate both the helpers as '__always_inline' to prod the compiler into maintaining the direct calls. There is no guarantee here, but Peter has volunteered to report the compiler bug if this assumption ever breaks[1]. Fixes: 1e66a7e27539 ("x86/virt/tdx: Handle SEAMCALL no entropy error in common code") Fixes: df01f5ae07dd ("x86/virt/tdx: Add SEAMCALL error printing for module initialization") Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/lkml/20250605145914.GW39944@noisy.programming.kicks-ass.net/ [1] Link: https://lore.kernel.org/all/20250606130737.30713-1-kai.huang%40intel.com commit 73f3a7415d93cf418c7625d03bce72da84344406 Author: Even Xu Date: Wed May 14 14:26:38 2025 +0800 HID: Intel-thc-hid: Intel-quicki2c: Enhance QuickI2C reset flow During customer board enabling, it was found: some touch devices prepared reset response, but either forgot sending interrupt or THC missed reset interrupt because of timing issue. THC QuickI2C driver depends on interrupt to read reset response, in this case, it will cause driver waiting timeout. This patch enhances the flow by adding manually reset response reading after waiting for reset interrupt timeout. Signed-off-by: Even Xu Tested-by: Chong Han Fixes: 66b59bfce6d9 ("HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver") Signed-off-by: Jiri Kosina commit 4a0381080397e77792a5168069f174d3e56175ff Author: Daniel J. Ogorchock Date: Tue May 13 03:47:00 2025 -0400 HID: nintendo: avoid bluetooth suspend/resume stalls Ensure we don't stall or panic the kernel when using bluetooth-connected controllers. This was reported as an issue on android devices using kernel 6.6 due to the resume hook which had been added for usb joycons. First, set a new state value to JOYCON_CTLR_STATE_SUSPENDED in a newly-added nintendo_hid_suspend. This makes sure we will not stall out the kernel waiting for input reports during led classdev suspend. The stalls could happen if connectivity is unreliable or lost to the controller prior to suspend. Second, since we lose connectivity during suspend, do not try joycon_init() for bluetooth controllers in the nintendo_hid_resume path. Tested via multiple suspend/resume flows when using the controller both in USB and bluetooth modes. Signed-off-by: Daniel J. Ogorchock Reviewed-by: Silvan Jegen Signed-off-by: Jiri Kosina commit 85a720f4337f0ddf1603c8b75a8f1ffbbe022ef9 Author: Qasim Ijaz Date: Fri Jun 6 19:49:59 2025 +0100 HID: wacom: fix kobject reference count leak When sysfs_create_files() fails in wacom_initialize_remotes() the error is returned and the cleanup action will not have been registered yet. As a result the kobject???s refcount is never dropped, so the kobject can never be freed leading to a reference leak. Fix this by calling kobject_put() before returning. Fixes: 83e6b40e2de6 ("HID: wacom: EKR: have the wacom resources dynamically allocated") Acked-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Signed-off-by: Jiri Kosina commit 1a19ae437ca5d5c7d9ec2678946fb339b1c706bf Author: Qasim Ijaz Date: Fri Jun 6 19:49:58 2025 +0100 HID: wacom: fix memory leak on sysfs attribute creation failure When sysfs_create_files() fails during wacom_initialize_remotes() the fifo buffer is not freed leading to a memory leak. Fix this by calling kfifo_free() before returning. Fixes: 83e6b40e2de6 ("HID: wacom: EKR: have the wacom resources dynamically allocated") Reviewed-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Signed-off-by: Jiri Kosina commit 5ae416c5b1e2e816aee7b3fc8347adf70afabb4c Author: Qasim Ijaz Date: Fri Jun 6 19:49:57 2025 +0100 HID: wacom: fix memory leak on kobject creation failure During wacom_initialize_remotes() a fifo buffer is allocated with kfifo_alloc() and later a cleanup action is registered during devm_add_action_or_reset() to clean it up. However if the code fails to create a kobject and register it with sysfs the code simply returns -ENOMEM before the cleanup action is registered leading to a memory leak. Fix this by ensuring the fifo is freed when the kobject creation and registration process fails. Fixes: 83e6b40e2de6 ("HID: wacom: EKR: have the wacom resources dynamically allocated") Reviewed-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Signed-off-by: Jiri Kosina commit 72840238e2bcb8fb24cb35d8d1d5a822c04e62a4 Author: Uros Bizjak Date: Mon Jun 9 08:35:01 2025 +0200 intel_idle: Update arguments of mwait_idle_with_hints() Commit a17b37a3f416 ("x86/idle: Change arguments of mwait_idle_with_hints() to u32") changed the type of arguments of mwait_idle_with_hints() from unsigned long to u32. Change the type of variables in the call to mwait_idle_with_hints() to unsigned int to follow the change. Signed-off-by: Uros Bizjak Reviewed-by: Artem Bityutskiy Link: https://patch.msgid.link/20250609063528.48715-1-ubizjak@gmail.com Signed-off-by: Rafael J. Wysocki commit c99ad987d3e9b550e9839d5df22de97d90462e5f Author: Wentao Guan Date: Tue Jun 3 20:20:59 2025 +0800 ACPI: resource: Use IRQ override on MACHENIKE 16P Use ACPI IRQ override on MACHENIKE laptop to make the internal keyboard work. Add a new entry to the irq1_edge_low_force_override structure, similar to the existing ones. Link: https://bbs.deepin.org.cn/zh/post/287628 Signed-off-by: Wentao Guan Link: https://patch.msgid.link/20250603122059.1072790-1-guanwentao@uniontech.com Signed-off-by: Rafael J. Wysocki commit 7a0d59f6a913a2bc7680c663b8cf1e45d1bdbf26 Author: Armin Wolf Date: Fri May 30 01:53:10 2025 +0200 ACPI: EC: Ignore ECDT tables with an invalid ID string On the MSI Modern 14 C5M the ECDT table contains invalid data: UID : 00000000 GPE Number : 00 /* Invalid, 03 would be correct */ Namepath : "" /* Invalid, "\_SB.PCI0.SBRG.EC" would * be correct */ This slows down the EC access as the wrong GPE event is used for communication. Additionally the ID string is invalid. Ignore such faulty ECDT tables by verifying that the ID string has a valid format. Tested-by: glpnk@proton.me Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20250529235310.540530-1-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 15eece6c5b05e5f9db0711978c3e3b7f1a2cfe12 Author: Yunhui Cui Date: Wed Jun 4 10:30:36 2025 +0800 ACPI: CPPC: Fix NULL pointer dereference when nosmp is used With nosmp in cmdline, other CPUs are not brought up, leaving their cpc_desc_ptr NULL. CPU0's iteration via for_each_possible_cpu() dereferences these NULL pointers, causing panic. Panic backtrace: [ 0.401123] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b8 ... [ 0.403255] [] cppc_allow_fast_switch+0x6a/0xd4 ... Kernel panic - not syncing: Attempted to kill init! Fixes: 3cc30dd00a58 ("cpufreq: CPPC: Enable fast_switch") Reported-by: Xu Lu Signed-off-by: Yunhui Cui Link: https://patch.msgid.link/20250604023036.99553-1-cuiyunhui@bytedance.com [ rjw: New subject ] Signed-off-by: Rafael J. Wysocki commit 2f76d269073bdb2971b253ef87d1f96f1a94c50e Author: Uros Bizjak Date: Mon Jun 9 08:42:06 2025 +0200 ACPI: PAD: Update arguments of mwait_idle_with_hints() Commit a17b37a3f416 ("x86/idle: Change arguments of mwait_idle_with_hints() to u32") changed the type of arguments of mwait_idle_with_hints() from unsigned long to u32. Change the type of variables in the call to mwait_idle_with_hints() to unsigned int to follow the change. Signed-off-by: Uros Bizjak Link: https://patch.msgid.link/20250609064235.49146-1-ubizjak@gmail.com Signed-off-by: Rafael J. Wysocki commit 5b2d595efbfc9c46823bdb9ef11e1f9fa46adf9d Author: FUJITA Tomonori Date: Fri Jun 6 11:05:05 2025 +0900 rust: time: Fix compile error in impl_has_hr_timer macro Fix a compile error in the `impl_has_hr_timer!` macro as follows: error[E0599]: no method named cast_mut found for raw pointer *mut Foo in the current scope The `container_of!` macro already returns a mutable pointer when used in a `*mut T` context so the `.cast_mut()` method is not available. [ We missed this one because there is no caller yet and it is a macro. - Miguel ] Fixes: 74d6a606c2b3 ("rust: retain pointer mut-ness in `container_of!`") Signed-off-by: FUJITA Tomonori Reviewed-by: Benno Lossin Acked-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250606020505.3186533-1-fujita.tomonori@gmail.com Signed-off-by: Miguel Ojeda commit 162457f5853ce3348e7956666916f5e5e31be51f Author: Dan Williams Date: Fri Jun 6 20:32:28 2025 -0700 ACPI: APEI: EINJ: Do not fail einj_init() on faux_device_create() failure CXL has a symbol dependency on einj_core.ko, so if einj_init() fails then cxl_core.ko fails to load. Prior to the faux_device_create() conversion, einj_probe() failures were tracked by the einj_initialized flag without failing einj_init(). Revert to that behavior and always succeed einj_init() given there is no way, and no pressing need, to discern faux device-create vs device-probe failures. This situation arose because CXL knows proper kernel named objects to trigger errors against, but acpi-einj knows how to perform the error injection. The injection mechanism is shared with non-CXL use cases. The result is CXL now has a module dependency on einj-core.ko, and init/probe failures are handled at runtime. Fixes: 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface") Signed-off-by: Dan Williams Reviewed-by: Ben Cheatham Acked-by: Greg Kroah-Hartman Link: https://patch.msgid.link/20250607033228.1475625-4-dan.j.williams@intel.com Signed-off-by: Rafael J. Wysocki commit ff53a6e247285687df1a71d8ee5c457939792c13 Author: Dan Williams Date: Fri Jun 6 20:32:27 2025 -0700 driver core: faux: Quiet probe failures The acpi-einj conversion to faux_device_create() leads to a noisy error message when the error injection facility is disabled. Quiet the error as CXL error injection via ACPI expects the module to stay loaded even if the error injection facility is disabled. This situation arose because CXL knows proper kernel named objects to trigger errors against, but acpi-einj knows how to perform the error injection. The injection mechanism is shared with non-CXL use cases. The result is CXL now has a module dependency on einj-core.ko, and init/probe failures are handled at runtime. Fixes: 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface") Signed-off-by: Dan Williams Reviewed-by: Jonathan Cameron Acked-by: Greg Kroah-Hartman Link: https://patch.msgid.link/20250607033228.1475625-3-dan.j.williams@intel.com Signed-off-by: Rafael J. Wysocki commit c393befa14ab26596fb86d702566d648832dae06 Author: Dan Williams Date: Fri Jun 6 20:32:26 2025 -0700 driver core: faux: Suppress bind attributes faux_device_create() is almost a suitable candidate to replace platform_driver_probe() if not for the fact that faux_device_create() supports dynamic attach/detach of the driver. Drop the bind attributes with the expectation that simple faux devices can always assume that the device is permanently bound at create, and only unbound at 'destroy'. The acpi-einj driver depends on static bind. Fixes: 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface") Signed-off-by: Dan Williams Reviewed-by: Jonathan Cameron Acked-by: Greg Kroah-Hartman Link: https://patch.msgid.link/20250607033228.1475625-2-dan.j.williams@intel.com Signed-off-by: Rafael J. Wysocki commit aef17cb3d3c43854002956f24c24ec8e1a0e3546 Author: Linus Torvalds Date: Tue Jun 10 10:22:15 2025 -0700 Revert "mm/damon/Kconfig: enable CONFIG_DAMON by default" This reverts commit 28615e6eed152f2fda5486680090b74aeed7b554. No, we don't make random features default to being on. Reported-by: Geert Uytterhoeven Cc: Andrew Morton Cc: SeongJae Park Signed-off-by: Linus Torvalds commit ac0b8b327a5677dc6fecdf353d808161525b1ff0 Author: Penglei Jiang Date: Tue Jun 10 10:18:01 2025 -0700 io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo() syzbot reports: BUG: KASAN: slab-use-after-free in getrusage+0x1109/0x1a60 Read of size 8 at addr ffff88810de2d2c8 by task a.out/304 CPU: 0 UID: 0 PID: 304 Comm: a.out Not tainted 6.16.0-rc1 #1 PREEMPT(voluntary) Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x53/0x70 print_report+0xd0/0x670 ? __pfx__raw_spin_lock_irqsave+0x10/0x10 ? getrusage+0x1109/0x1a60 kasan_report+0xce/0x100 ? getrusage+0x1109/0x1a60 getrusage+0x1109/0x1a60 ? __pfx_getrusage+0x10/0x10 __io_uring_show_fdinfo+0x9fe/0x1790 ? ksys_read+0xf7/0x1c0 ? do_syscall_64+0xa4/0x260 ? vsnprintf+0x591/0x1100 ? __pfx___io_uring_show_fdinfo+0x10/0x10 ? __pfx_vsnprintf+0x10/0x10 ? mutex_trylock+0xcf/0x130 ? __pfx_mutex_trylock+0x10/0x10 ? __pfx_show_fd_locks+0x10/0x10 ? io_uring_show_fdinfo+0x57/0x80 io_uring_show_fdinfo+0x57/0x80 seq_show+0x38c/0x690 seq_read_iter+0x3f7/0x1180 ? inode_set_ctime_current+0x160/0x4b0 seq_read+0x271/0x3e0 ? __pfx_seq_read+0x10/0x10 ? __pfx__raw_spin_lock+0x10/0x10 ? __mark_inode_dirty+0x402/0x810 ? selinux_file_permission+0x368/0x500 ? file_update_time+0x10f/0x160 vfs_read+0x177/0xa40 ? __pfx___handle_mm_fault+0x10/0x10 ? __pfx_vfs_read+0x10/0x10 ? mutex_lock+0x81/0xe0 ? __pfx_mutex_lock+0x10/0x10 ? fdget_pos+0x24d/0x4b0 ksys_read+0xf7/0x1c0 ? __pfx_ksys_read+0x10/0x10 ? do_user_addr_fault+0x43b/0x9c0 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0f74170fc9 Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 8 RSP: 002b:00007fffece049e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0f74170fc9 RDX: 0000000000001000 RSI: 00007fffece049f0 RDI: 0000000000000004 RBP: 00007fffece05ad0 R08: 0000000000000000 R09: 00007fffece04d90 R10: 0000000000000000 R11: 0000000000000206 R12: 00005651720a1100 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 298: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x6e/0x70 kmem_cache_alloc_node_noprof+0xe8/0x330 copy_process+0x376/0x5e00 create_io_thread+0xab/0xf0 io_sq_offload_create+0x9ed/0xf20 io_uring_setup+0x12b0/0x1cc0 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 22: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x37/0x50 kmem_cache_free+0xc4/0x360 rcu_core+0x5ff/0x19f0 handle_softirqs+0x18c/0x530 run_ksoftirqd+0x20/0x30 smpboot_thread_fn+0x287/0x6c0 kthread+0x30d/0x630 ret_from_fork+0xef/0x1a0 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x33/0x60 kasan_record_aux_stack+0x8c/0xa0 __call_rcu_common.constprop.0+0x68/0x940 __schedule+0xff2/0x2930 __cond_resched+0x4c/0x80 mutex_lock+0x5c/0xe0 io_uring_del_tctx_node+0xe1/0x2b0 io_uring_clean_tctx+0xb7/0x160 io_uring_cancel_generic+0x34e/0x760 do_exit+0x240/0x2350 do_group_exit+0xab/0x220 __x64_sys_exit_group+0x39/0x40 x64_sys_call+0x1243/0x1840 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88810de2cb00 which belongs to the cache task_struct of size 3712 The buggy address is located 1992 bytes inside of freed 3712-byte region [ffff88810de2cb00, ffff88810de2d980) which is caused by the task_struct pointed to by sq->thread being released while it is being used in the function __io_uring_show_fdinfo(). Holding ctx->uring_lock does not prevent ehre relase or exit of sq->thread. Fix this by assigning and looking up ->thread under RCU, and grabbing a reference to the task_struct. This ensures that it cannot get released while fdinfo is using it. Reported-by: syzbot+531502bbbe51d2f769f4@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/682b06a5.a70a0220.3849cf.00b3.GAE@google.com Fixes: 3fcb9d17206e ("io_uring/sqpoll: statistics of the true utilization of sq threads") Signed-off-by: Penglei Jiang Link: https://lore.kernel.org/r/20250610171801.70960-1-superman.xpt@gmail.com [axboe: massage commit message] Signed-off-by: Jens Axboe commit d08293ef1ede6a558b9cf2577aa34473f6298ca7 Merge: 19272b37aa4f83 e044b8a9545cd8 Author: Rafael J. Wysocki Date: Tue Jun 10 19:15:54 2025 +0200 Merge tag 'linux-cpupower-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge an urgent cpupower utility fix for 6.16-rc1 from Shuah Khan: "Add unitdir variable for specifying the location to install systemd service units instead of installing under ${libdir}/systemd/system which doesn't work on some distributions." * tag 'linux-cpupower-6.16-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: split unitdir from libdir in Makefile commit c33453d08a56a45c2e72f9f56043610b8f7449c7 Author: Vitaly Kuznetsov Date: Fri Jun 6 17:41:12 2025 +0200 efi: Drop preprocessor directives from zboot.lds Older versions of `ld` don't seem to support preprocessor directives in linker scripts, e.g. on RHEL9's ld-2.35.2-63.el9 the build fails with: ld:./drivers/firmware/efi/libstub/zboot.lds:32: ignoring invalid character `#' in expression ld:./drivers/firmware/efi/libstub/zboot.lds:33: syntax error We don't seem to need these '#ifdef', no empty .sbat section is created when CONFIG_EFI_SBAT_FILE="": # objdump -h arch/arm64/boot/vmlinuz.efi arch/arm64/boot/vmlinuz.efi: file format pei-aarch64-little Sections: Idx Name Size VMA LMA File off Algn 0 .text 00b94000 0000000000001000 0000000000001000 00001000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000200 0000000000b95000 0000000000b95000 00b95000 2**2 CONTENTS, ALLOC, LOAD, DATA Fixes: 0f9a1739dd0e ("efi: zboot specific mechanism for embedding SBAT section") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Ard Biesheuvel commit b4a8085ceefb7bbb12c2b71c55e71fc946c6929f Author: Joe Damato Date: Tue Jun 3 16:34:01 2025 +0000 e1000: Move cancel_work_sync to avoid deadlock Previously, e1000_down called cancel_work_sync for the e1000 reset task (via e1000_down_and_stop), which takes RTNL. As reported by users and syzbot, a deadlock is possible in the following scenario: CPU 0: - RTNL is held - e1000_close - e1000_down - cancel_work_sync (cancel / wait for e1000_reset_task()) CPU 1: - process_one_work - e1000_reset_task - take RTNL To remedy this, avoid calling cancel_work_sync from e1000_down (e1000_reset_task does nothing if the device is down anyway). Instead, call cancel_work_sync for e1000_reset_task when the device is being removed. Fixes: e400c7444d84 ("e1000: Hold RTNL when e1000_down can be called") Reported-by: syzbot+846bb38dc67fe62cc733@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/683837bf.a00a0220.52848.0003.GAE@google.com/ Reported-by: John Closes: https://lore.kernel.org/netdev/CAP=Rh=OEsn4y_2LvkO3UtDWurKcGPnZ_NPSXK=FbgygNXL37Sw@mail.gmail.com/ Signed-off-by: Joe Damato Acked-by: Stanislav Fomichev Acked-by: Jacob Keller Signed-off-by: Tony Nguyen commit a5a441ae283d54ec329aadc7426991dc32786d52 Author: Anton Nadezhdin Date: Tue May 20 10:42:16 2025 +0200 ice/ptp: fix crosstimestamp reporting Set use_nsecs=true as timestamp is reported in ns. Lack of this result in smaller timestamp error window which cause error during phc2sys execution on E825 NICs: phc2sys[1768.256]: ioctl PTP_SYS_OFFSET_PRECISE: Invalid argument This problem was introduced in the cited commit which omitted setting use_nsecs to true when converting the ice driver to use convert_base_to_cs(). Testing hints (ethX is PF netdev): phc2sys -s ethX -c CLOCK_REALTIME -O 37 -m phc2sys[1769.256]: CLOCK_REALTIME phc offset -5 s0 freq -0 delay 0 Fixes: d4bea547ebb57 ("ice/ptp: Remove convert_art_to_tsc()") Signed-off-by: Anton Nadezhdin Reviewed-by: Aleksandr Loktionov Reviewed-by: Arkadiusz Kubalewski Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 0c6f4631436ecea841f1583b98255aedd7495b18 Author: Ahmed Zaki Date: Thu Apr 24 15:50:13 2025 +0200 iavf: fix reset_task for early reset event If a reset event is received from the PF early in the init cycle, the state machine hangs for about 25 seconds. Reproducer: echo 1 > /sys/class/net/$PF0/device/sriov_numvfs ip link set dev $PF0 vf 0 mac $NEW_MAC The log shows: [792.620416] ice 0000:5e:00.0: Enabling 1 VFs [792.738812] iavf 0000:5e:01.0: enabling device (0000 -> 0002) [792.744182] ice 0000:5e:00.0: Enabling 1 VFs with 17 vectors and 16 queues per VF [792.839964] ice 0000:5e:00.0: Setting MAC 52:54:00:00:00:11 on VF 0. VF driver will be reinitialized [813.389684] iavf 0000:5e:01.0: Failed to communicate with PF; waiting before retry [818.635918] iavf 0000:5e:01.0: Hardware came out of reset. Attempting reinit. [818.766273] iavf 0000:5e:01.0: Multiqueue Enabled: Queue pair count = 16 Fix it by scheduling the reset task and making the reset task capable of resetting early in the init cycle. Fixes: ef8693eb90ae3 ("i40evf: refactor reset handling") Signed-off-by: Ahmed Zaki Tested-by: Przemek Kitszel Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit fb4e9239e029954a37a00818b21e837cebf2aa10 Author: Robert Malz Date: Tue May 20 10:31:52 2025 +0200 i40e: retry VFLR handling if there is ongoing VF reset When a VFLR interrupt is received during a VF reset initiated from a different source, the VFLR may be not fully handled. This can leave the VF in an undefined state. To address this, set the I40E_VFLR_EVENT_PENDING bit again during VFLR handling if the reset is not yet complete. This ensures the driver will properly complete the VF reset in such scenarios. Fixes: 52424f974bc5 ("i40e: Fix VF hang when reset is triggered on another VF") Signed-off-by: Robert Malz Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit a2c90d63b71223d69a813333c1abf4fdacddbbe5 Author: Robert Malz Date: Tue May 20 10:31:51 2025 +0200 i40e: return false from i40e_reset_vf if reset is in progress The function i40e_vc_reset_vf attempts, up to 20 times, to handle a VF reset request, using the return value of i40e_reset_vf as an indicator of whether the reset was successfully triggered. Currently, i40e_reset_vf always returns true, which causes new reset requests to be ignored if a different VF reset is already in progress. This patch updates the return value of i40e_reset_vf to reflect when another VF reset is in progress, allowing the caller to properly use the retry mechanism. Fixes: 52424f974bc5 ("i40e: Fix VF hang when reset is triggered on another VF") Signed-off-by: Robert Malz Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit a298bbab903e3fb4cbe16d36d6195e68fad1b776 Author: Suleiman Souhlal Date: Fri Jun 6 16:45:38 2025 +0900 tools/resolve_btfids: Fix build when cross compiling kernel with clang. When cross compiling the kernel with clang, we need to override CLANG_CROSS_FLAGS when preparing the step libraries. Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs when building tools in parallel"), MAKEFLAGS would have been set to a value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the fact that we weren't properly overriding it. Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program") Signed-off-by: Suleiman Souhlal Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20250606074538.1608546-1-suleiman@google.com commit 6dea74e454c260cd757b53a2f6861fffe6d83308 Author: Matthew Wilcox (Oracle) Date: Sun Jun 1 01:26:54 2025 +0100 f2fs: Fix __write_node_folio() conversion This conversion moved the folio_unlock() to inside __write_node_folio(), but missed one caller so we had a double-unlock on this path. Cc: Christoph Hellwig Cc: Chao Yu Cc: Jaegeuk Kim Reported-by: syzbot+c0dc46208750f063d0e0@syzkaller.appspotmail.com Fixes: 80f31d2a7e5f (f2fs: return bool from __write_node_folio) Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e8d3dc45f2d3b0fea089e0e6e351d1287a5a2a29 Author: Johan Hovold Date: Wed Apr 23 09:51:43 2025 +0200 arm64: dts: qcom: x1e80100: describe uefi rtc offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On platforms where the offset is stored in a Qualcomm specific UEFI variable the variables are also accessed in a non-standard way, which means that the OS cannot assume that the variable service is available by the time the RTC driver probes. Use the new 'qcom,uefi-rtc-info' property to indicate that the offset is stored in a UEFI variable so that the OS can determine whether to wait for it to become available. Fixes: b53c2c23d3c2 ("arm64: dts: qcom: x1e80100: enable rtc") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250423075143.11157-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 869971de8221b97acb6aa4d7ff4fa67eb71adc87 Author: Johan Hovold Date: Wed Apr 23 09:51:42 2025 +0200 arm64: dts: qcom: sc8280xp-x13s: describe uefi rtc offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On platforms where the offset is stored in a Qualcomm specific UEFI variable the variables are also accessed in a non-standard way, which means that the OS cannot assume that the variable service is available by the time the RTC driver probes. Use the new 'qcom,uefi-rtc-info' property to indicate that the offset is stored in a UEFI variable so that the OS can determine whether to wait for it to become available. Fixes: 409803681a55 ("arm64: dts: qcom: sc8280xp-x13s: switch to uefi rtc offset") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250423075143.11157-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 8a157d8a00e815cab4432653cb50c9cedbbb4931 Author: Steven Rostedt Date: Tue Jun 10 09:33:48 2025 -0400 tracing: Do not free "head" on error path of filter_free_subsystem_filters() The variable "head" is allocated and initialized as a list before allocating the first "item" for the list. If the allocation of "item" fails, it frees "head" and then jumps to the label "free_now" which will process head and free it. This will cause a UAF of "head", and it doesn't need to free it before jumping to the "free_now" label as that code will free it. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250610093348.33c5643a@gandalf.local.home Fixes: a9d0aab5eb33 ("tracing: Fix regression of filter waiting a long time on RCU synchronization") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202506070424.lCiNreTI-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) commit 5558f27a58459a4038ebb23bcb5bd40c1e345c57 Author: Chen-Yu Tsai Date: Sat Jun 7 21:52:03 2025 +0800 pinctrl: sunxi: dt: Consider pin base when calculating bank number from pin In prepare_function_table() when the pinctrl function table IRQ entries are generated, the pin bank is calculated from the absolute pin number; however the IRQ bank mux array is indexed from the first pin bank of the controller. For R_PIO controllers, this means the absolute pin bank is way off from the relative pin bank used for array indexing. Correct this by taking into account the pin base of the controller. Fixes: f5e2cd34b12f ("pinctrl: sunxi: allow reading mux values from DT") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/20250607135203.2085226-1-wens@kernel.org Signed-off-by: Linus Walleij commit fe5b391fc56f77cf3c22a9dd4f0ce20db0e3533f Author: Johannes Berg Date: Fri Jun 6 11:01:11 2025 +0200 ata: pata_cs5536: fix build on 32-bit UML On 32-bit ARCH=um, CONFIG_X86_32 is still defined, so it doesn't indicate building on real X86 machines. There's no MSR on UML though, so add a check for CONFIG_X86. Reported-by: Arnd Bergmann Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20250606090110.15784-2-johannes@sipsolutions.net Signed-off-by: Niklas Cassel commit 0cee6c4d3518b2e757aedae78771f17149f57653 Author: Martin Blumenstingl Date: Mon Jun 9 22:27:51 2025 +0200 drm/meson: fix more rounding issues with 59.94Hz modes Commit 1017560164b6 ("drm/meson: use unsigned long long / Hz for frequency types") attempts to resolve video playback using 59.94Hz. using YUV420 by changing the clock calculation to use Hz instead of kHz (thus yielding more precision). The basic calculation itself is correct, however the comparisions in meson_vclk_vic_supported_freq() and meson_vclk_setup() don't work anymore for 59.94Hz modes (using the freq * 1000 / 1001 logic). For example, drm/edid specifies a 593407kHz clock for 3840x2160@59.94Hz. With the mentioend commit we convert this to Hz. Then meson_vclk tries to find a matchig "params" entry (as the clock setup code currently only supports specific frequencies) by taking the venc_freq from the params and calculating the "alt frequency" (used for the 59.94Hz modes) from it, which is: (594000000Hz * 1000) / 1001 = 593406593Hz Similar calculation is applied to the phy_freq (TMDS clock), which is 10 times the pixel clock. Implement a new meson_vclk_freqs_are_matching_param() function whose purpose is to compare if the requested and calculated frequencies. They may not match exactly (for the reasons mentioned above). Allow the clocks to deviate slightly to make the 59.94Hz modes again. Fixes: 1017560164b6 ("drm/meson: use unsigned long long / Hz for frequency types") Reported-by: Christian Hewitt Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250609202751.962208-1-martin.blumenstingl@googlemail.com commit faf2f8382088e8c74bd6eeb236c8c9190e61615e Author: Martin Blumenstingl Date: Sat Jun 7 00:10:31 2025 +0200 drm/meson: use vclk_freq instead of pixel_freq in debug print meson_vclk_vic_supported_freq() has a debug print which includes the pixel freq. However, within the whole function the pixel freq is irrelevant, other than checking the end of the params array. Switch to printing the vclk_freq which is being compared / matched against the inputs to the function to avoid confusion when analyzing error reports from users. Fixes: e5fab2ec9ca4 ("drm/meson: vclk: add support for YUV420 setup") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250606221031.3419353-1-martin.blumenstingl@googlemail.com commit d17e61ab63fb7747b340d6a66bf1408cd5c6562b Author: Martin Blumenstingl Date: Fri Jun 6 22:37:29 2025 +0200 drm/meson: fix debug log statement when setting the HDMI clocks The "phy" and "vclk" frequency labels were swapped, making it more difficult to debug driver errors. Swap the label order to make them match with the actual frequencies printed to correct this. Fixes: e5fab2ec9ca4 ("drm/meson: vclk: add support for YUV420 setup") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250606203729.3311592-1-martin.blumenstingl@googlemail.com commit 33877220b8641b4cde474a4229ea92c0e3637883 Author: Tasos Sahanidis Date: Mon May 19 11:56:55 2025 +0300 ata: libata-acpi: Do not assume 40 wire cable if no devices are enabled On at least an ASRock 990FX Extreme 4 with a VIA VT6330, the devices have not yet been enabled by the first time ata_acpi_cbl_80wire() is called. This means that the ata_for_each_dev loop is never entered, and a 40 wire cable is assumed. The VIA controller on this board does not report the cable in the PCI config space, thus having to fall back to ACPI even though no SATA bridge is present. The _GTM values are correctly reported by the firmware through ACPI, which has already set up faster transfer modes, but due to the above the controller is forced down to a maximum of UDMA/33. Resolve this by modifying ata_acpi_cbl_80wire() to directly return the cable type. First, an unknown cable is assumed which preserves the mode set by the firmware, and then on subsequent calls when the devices have been enabled, an 80 wire cable is correctly detected. Since the function now directly returns the cable type, it is renamed to ata_acpi_cbl_pata_type(). Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20250519085945.1399466-1-tasos@tasossah.com Signed-off-by: Niklas Cassel commit d29fc02caad7f94b62d56ee1b01c954f9c961ba7 Author: Tasos Sahanidis Date: Mon May 19 11:49:45 2025 +0300 ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330 The controller has a hardware bug that can hard hang the system when doing ATAPI DMAs without any trace of what happened. Depending on the device attached, it can also prevent the system from booting. In this case, the system hangs when reading the ATIP from optical media with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4, running at UDMA/33. The issue can be reproduced by running the same command with a cygwin build of cdrecord on WinXP, although it requires more attempts to cause it. The hang in that case is also resolved by forcing PIO. It doesn't appear that VIA has produced any drivers for that OS, thus no known workaround exists. HDDs attached to the controller do not suffer from any DMA issues. Cc: stable@vger.kernel.org Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/916677 Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20250519085508.1398701-1-tasos@tasossah.com Signed-off-by: Niklas Cassel commit 6325766d69900d1aa9733fc7572456fc4427b708 Author: Thorsten Blum Date: Tue Jun 10 12:32:16 2025 +0200 ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present() Check the return value of kzalloc() and exit early to avoid a potential NULL pointer dereference. Cc: stable@vger.kernel.org Fixes: 4f8ef33dd44a ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present") Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250610103225.1475-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit 4823a58093c6dfa20df62b5c18da613621b9716e Author: Viresh Kumar Date: Tue Jun 10 16:38:56 2025 +0530 cpufreq: Convert `/// SAFETY` lines to `# Safety` sections Replace `/// SAFETY` comments in doc comments with proper `# Safety` sections, as per rustdoc conventions. Also mark the C FFI callbacks as `unsafe` to correctly reflect their safety requirements. Reported-by: Miguel Ojeda Closes: https://github.com/Rust-for-Linux/linux/issues/1169 Signed-off-by: Viresh Kumar commit c0317ad44f45b3c1f0ff46a4e28d14c7bccdedf4 Author: Gabriel Dalimonte Date: Sun Jun 1 12:45:36 2025 -0400 drm/vc4: fix infinite EPROBE_DEFER loop `vc4_hdmi_audio_init` calls `devm_snd_dmaengine_pcm_register` which may return EPROBE_DEFER. Calling `drm_connector_hdmi_audio_init` adds a child device. The driver model docs[1] state that adding a child device prior to returning EPROBE_DEFER may result in an infinite loop. [1] https://www.kernel.org/doc/html/v6.14/driver-api/driver-model/driver.html Fixes: 9640f1437a88 ("drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure") Signed-off-by: Gabriel Dalimonte Link: https://lore.kernel.org/r/20250601-vc4-audio-inf-probe-v2-1-9ad43c7b6147@gmail.com Signed-off-by: Maxime Ripard commit 8d2c2fa2209e83d0eb10f7330d8a0bbdc1df32ff Author: Tudor Ambarus Date: Fri Jun 6 10:45:37 2025 +0000 firmware: exynos-acpm: fix timeouts on xfers handling The mailbox framework has a single inflight request at a time. If a request is sent while another is still active, it will be queued to the mailbox core ring buffer. ACPM protocol did not serialize the calls to the mailbox subsystem so we could start the timeout ticks in parallel for multiple requests, while just one was being inflight. Consider a hypothetical case where the xfer timeout is 100ms and an ACPM transaction takes 90ms: | 0ms: Message #0 is queued in mailbox layer and sent out, then sits | at acpm_dequeue_by_polling() with a timeout of 100ms | 1ms: Message #1 is queued in mailbox layer but not sent out yet. | Since send_message() doesn't block, it also sits at | acpm_dequeue_by_polling() with a timeout of 100ms | ... | 90ms: Message #0 is completed, txdone is called and message #1 is sent | 101ms: Message #1 times out since the count started at 1ms. Even though | it has only been inflight for 11ms. Fix the problem by moving mbox_send_message() and mbox_client_txdone() immediately after the message has been written to the TX queue and while still keeping the ACPM TX queue lock. We thus tie together the TX write with the doorbell ring and mark the TX as done after the doorbell has been rung. This guarantees that the doorbell has been rang before starting the timeout ticks. We should also see some performance improvement as we no longer wait to receive a response before ringing the doorbell for the next request, so the ACPM firmware shall be able to drain faster the TX queue. Another benefit is that requests are no longer able to ring the doorbell one for the other, so it eases debugging. Finally, the mailbox software queue will always contain a single doorbell request due to the serialization done at the ACPM TX queue level. Protocols like ACPM, that handle their own hardware queues need a passthrough mailbox API, where they are able to just ring the doorbell or flip a bit directly into the mailbox controller. The mailbox software queue mechanism, the locking done into the mailbox core is not really needed, so hopefully this lays the foundation for a passthrough mailbox API. Reported-by: André Draszik Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver") Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20250606-acpm-timeout-v2-1-306b1aa07a6c@linaro.org Signed-off-by: Krzysztof Kozlowski commit f17d5b90947a7b89a27913abf47cb0c7063b3430 Author: Casey Connolly Date: Fri May 23 13:55:34 2025 +0200 arm64: defconfig: update renamed PHY_SNPS_EUSB2 This config option was renamed, update the defconfig to match. Fixes: 8d3b5f637546 ("phy: move phy-qcom-snps-eusb2 out of its vendor sub-directory") Signed-off-by: Casey Connolly Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250523115630.459249-3-casey.connolly@linaro.org Signed-off-by: Krzysztof Kozlowski commit e0d4a0f1d066f14522049e827107a577444d9183 Author: Yang Shen Date: Thu May 29 11:40:23 2025 +0800 MAINTAINERS: Update HiSilicon GPIO driver maintainer Add Yang Shen as the maintainer of the HiSilicon GPIO driver, replacing Jay Fang. Signed-off-by: Yang Shen Reviewed-by: Jay Fang Link: https://lore.kernel.org/r/20250529034023.3780376-1-shenyang39@huawei.com Signed-off-by: Bartosz Golaszewski commit 766f6a784bdfd0747c66e40102e53c48bb89e135 Merge: b56bbaf8c9ffe0 7eb11c0ab70777 Author: Steffen Klassert Date: Tue Jun 10 09:51:54 2025 +0200 Merge branch 'xfrm: fixes for xfrm_state_find under preemption' Sabrina Dubroca says: ==================== While looking at the pcpu_id changes, I found two issues that can happen if we get preempted and the cpu_id changes. The second patch takes care of both problems. The first patch also makes sure we don't use state_ptrs uninitialized, which could currently happen. syzbot seems to have hit this issue [1]. [1] https://syzkaller.appspot.com/bug?extid=7ed9d47e15e88581dc5b ==================== Signed-off-by: Steffen Klassert commit 3fbf25ecf8b7b524b4774b427657d30a24e696ef Author: Hans de Goede Date: Mon Jun 9 16:35:57 2025 +0200 MAINTAINERS: .mailmap: Update Hans de Goede's email address I'm moving all my kernel work over to using my kernel.org email address. Update .mailmap and MAINTAINER entries still using hdegoede@redhat.com. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20250609143558.42941-2-hansg@kernel.org Signed-off-by: Ilpo Järvinen commit ea7af94548159c57747aa8e86408a19192a1e1fe Author: Stuart Hayes Date: Mon Jun 9 13:46:59 2025 -0500 platform/x86: dell_rbu: Bump version Bump the module version. Signed-off-by: Stuart Hayes Link: https://lore.kernel.org/r/20250609184659.7210-6-stuart.w.hayes@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f4b0fa38d5fefe9aed6ed831f3bd3538c168ee19 Author: Stuart Hayes Date: Mon Jun 9 13:46:58 2025 -0500 platform/x86: dell_rbu: Stop overwriting data buffer The dell_rbu driver will use memset() to clear the data held by each packet when it is no longer needed (when the driver is unloaded, the packet size is changed, etc). The amount of memory that is cleared (before this patch) is the normal packet size. However, the last packet in the list may be smaller. Fix this to only clear the memory actually used by each packet, to prevent it from writing past the end of data buffer. Because the packet data buffers are allocated with __get_free_pages() (in page-sized increments), this bug could only result in a buffer being overwritten when a packet size larger than one page is used. The only user of the dell_rbu module should be the Dell BIOS update program, which uses a packet size of 4096, so no issues should be seen without the patch, it just blocks the possiblity. Fixes: 6c54c28e69f2 ("[PATCH] dell_rbu: new Dell BIOS update driver") Signed-off-by: Stuart Hayes Link: https://lore.kernel.org/r/20250609184659.7210-5-stuart.w.hayes@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 61ce04601e0d8265ec6d2ffa6df5a7e1bce64854 Author: Stuart Hayes Date: Mon Jun 9 13:46:56 2025 -0500 platform/x86: dell_rbu: Fix list usage Pass the correct list head to list_for_each_entry*() when looping through the packet list. Without this patch, reading the packet data via sysfs will show the data incorrectly (because it starts at the wrong packet), and clearing the packet list will result in a NULL pointer dereference. Fixes: d19f359fbdc6 ("platform/x86: dell_rbu: don't open code list_for_each_entry*()") Signed-off-by: Stuart Hayes Link: https://lore.kernel.org/r/20250609184659.7210-3-stuart.w.hayes@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a2f32c7467e843727f20cae0e9b1545e1504a977 Author: Stuart Hayes Date: Mon Jun 9 13:46:55 2025 -0500 platform/x86: dell_rbu: Fix lock context warning Fix a sparse lock context warning. Signed-off-by: Stuart Hayes Link: https://lore.kernel.org/r/20250609184659.7210-2-stuart.w.hayes@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d7186dfd41924ef01ef490be5b82ab63cc417b31 Author: Mario Limonciello Date: Wed May 21 19:34:57 2025 -0500 platform/x86/amd: pmf: Simplify error flow in amd_pmf_init_smart_pc() commit 5b1122fc4995f ("platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()") adjusted the error handling flow to use a ladder but this isn't actually needed because work is only scheduled in amd_pmf_start_policy_engine() and with device managed cleanups pointers for allocations don't need to be freed. Adjust the error flow to a single call to amd_pmf_deinit_smart_pc() for the cases that need to clean up. Cc: Dan Carpenter Link: https://lore.kernel.org/r/20250512211154.2510397-4-superm1@kernel.org Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250522003457.1516679-4-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 93103d56650d7a38ed37ba4041578310f82776ae Author: Mario Limonciello Date: Wed May 21 19:34:56 2025 -0500 platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice If any of the tee init fails, pass up the errors and clear the tee_ctx pointer. This will prevent cleaning up multiple times. Fixes: ac052d8c08f9d ("platform/x86/amd/pmf: Add PMF TEE interface") Suggested-by: Dan Carpenter Link: https://lore.kernel.org/r/20250512211154.2510397-3-superm1@kernel.org Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250522003457.1516679-3-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d9db3a941270d92bbd1a6a6b54a10324484f2f2d Author: Mario Limonciello Date: Wed May 21 19:34:55 2025 -0500 platform/x86/amd: pmf: Use device managed allocations If setting up smart PC fails for any reason then this can lead to a double free when unloading amd-pmf. This is because dev->buf was freed but never set to NULL and is again freed in amd_pmf_remove(). To avoid subtle allocation bugs in failures leading to a double free change all allocations into device managed allocations. Fixes: 5b1122fc4995f ("platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()") Link: https://lore.kernel.org/r/20250512211154.2510397-2-superm1@kernel.org Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250522003457.1516679-2-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4c267ae2ef349639b4d9ebf00dd28586a82fdbe6 Author: Takashi Iwai Date: Tue Jun 10 08:43:20 2025 +0200 ALSA: sb: Force to disable DMAs once when DMA mode is changed When the DMA mode is changed on the (still real!) SB AWE32 after playing a stream and closing, the previous DMA setup was still silently kept, and it can confuse the hardware, resulting in the unexpected noises. As a workaround, enforce the disablement of DMA setups when the DMA setup is changed by the kcontrol. https://bugzilla.kernel.org/show_bug.cgi?id=218185 Link: https://patch.msgid.link/20250610064322.26787-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit ed29e073ba93f2d52832804cabdd831d5d357d33 Author: Takashi Iwai Date: Tue Jun 10 08:43:19 2025 +0200 ALSA: sb: Don't allow changing the DMA mode during operations When a PCM stream is already running, one shouldn't change the DMA mode via kcontrol, which may screw up the hardware. Return -EBUSY instead. Link: https://bugzilla.kernel.org/show_bug.cgi?id=218185 Link: https://patch.msgid.link/20250610064322.26787-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7b23887a0c70d15459f02c51651a111e9e5cab86 Author: Richard Fitzgerald Date: Mon Jun 9 11:21:25 2025 +0100 ALSA: hda/realtek: Add quirk for Asus GU605C The GU605C has similar audio hardware to the GU605M so apply the same quirk. Note that in the linked bugzilla there are two separate problems with the GU605C. This patch fixes one of the problems, so I haven't added a Closes: tag. Signed-off-by: Richard Fitzgerald Reported-by: Nick Karaolidis Link: https://bugzilla.kernel.org/show_bug.cgi?id=220152 Cc: Link: https://patch.msgid.link/20250609102125.63196-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit c6451a7325874c119def1d4094f6815c0c8fdc23 Author: Chris Chiu Date: Tue Jun 10 11:56:07 2025 +0800 ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X513EA The built-in mic of ASUS VivoBook X513EA is broken recently by the fix of the pin sort. The fixup ALC256_FIXUP_ASUS_MIC_NO_PRESENCE is working for addressing the regression, too. Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort") Signed-off-by: Chris Chiu Cc: Link: https://patch.msgid.link/20250610035607.690771-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai commit f09079bd04a924c72d555cd97942d5f8d7eca98c Merge: 19272b37aa4f83 0d67f0dee6c917 Author: Linus Torvalds Date: Mon Jun 9 20:06:58 2025 -0700 Merge tag 'powerpc-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Madhavan Srinivasan: - a couple of fixes for out of bounds issues in memtrace and vas Thanks to Ritesh Harjani (IBM), Haren Myneni, and Jonathan Greental * tag 'powerpc-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vas: Return -EINVAL if the offset is non-zero in mmap() powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap commit 0d67f0dee6c9176bc09a5482dd7346e3a0f14d0b Author: Haren Myneni Date: Tue Jun 10 07:42:27 2025 +0530 powerpc/vas: Return -EINVAL if the offset is non-zero in mmap() The user space calls mmap() to map VAS window paste address and the kernel returns the complete mapped page for each window. So return -EINVAL if non-zero is passed for offset parameter to mmap(). See Documentation/arch/powerpc/vas-api.rst for mmap() restrictions. Co-developed-by: Jonathan Greental Signed-off-by: Jonathan Greental Reported-by: Jonathan Greental Fixes: dda44eb29c23 ("powerpc/vas: Add VAS user space API") Signed-off-by: Haren Myneni Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250610021227.361980-2-maddy@linux.ibm.com commit 3871b51a684275e3a47fbebf93c0a0e7a05d7f9f Author: Bjorn Andersson Date: Thu Jun 5 19:06:06 2025 -0500 arm64: defconfig: Enable Qualcomm CPUCP mailbox driver The Qualcomm CPUCP mailbox driver needs to be enabled for CPU frequency scaling to work on the X Elite platform, so enable this driver. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250605-enable-cpucp-v1-1-111ecef7e4c9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit cd097df4596f3a1e9d75eb8520162de1eb8485b2 Author: Ritesh Harjani (IBM) Date: Tue Jun 10 07:42:26 2025 +0530 powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap memtrace mmap issue has an out of bounds issue. This patch fixes the by checking that the requested mapping region size should stay within the allocated region size. Reported-by: Jonathan Greental Fixes: 08a022ad3dfa ("powerpc/powernv/memtrace: Allow mmaping trace buffers") Signed-off-by: Ritesh Harjani (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250610021227.361980-1-maddy@linux.ibm.com commit 5c3ba81923e02adae354ec8afd006f93289b4a3c Author: Rajashekhar M A Date: Fri Jun 6 15:59:24 2025 +0200 scsi: error: alua: I/O errors for ALUA state transitions When a host is configured with a few LUNs and I/O is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes 2 of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults. Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying. Signed-off-by: Rajashekhar M A Signed-off-by: Hannes Reinecke Link: https://lore.kernel.org/r/20250606135924.27397-1-hare@kernel.org Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit b2f966568faaad326de97481096d0f3dc0971c43 Author: Dexuan Cui Date: Fri Jun 6 13:57:39 2025 -0700 scsi: storvsc: Increase the timeouts to storvsc_timeout Currently storvsc_timeout is only used in storvsc_sdev_configure(), and 5s and 10s are used elsewhere. It turns out that rarely the 5s is not enough on Azure, so let's use storvsc_timeout everywhere. In case a timeout happens and storvsc_channel_init() returns an error, close the VMBus channel so that any host-to-guest messages in the channel's ringbuffer, which might come late, can be safely ignored. Add a "const" to storvsc_timeout. Cc: stable@kernel.org Signed-off-by: Dexuan Cui Link: https://lore.kernel.org/r/1749243459-10419-1-git-send-email-decui@microsoft.com Reviewed-by: Long Li Signed-off-by: Martin K. Petersen commit 0838fc3e6718743d595bf26e0e69ae55aa51fad1 Author: Rob Clark Date: Mon Jun 9 11:24:37 2025 -0700 drm/msm/adreno: Check for recognized GPU before bind If we have a newer dtb than kernel, we could end up in a situation where the GPU device is present in the dtb, but not in the drivers device table. We don't want this to prevent the display from probing. So check that we recognize the GPU before adding the GPU component. v2: use %pOF Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/657701/ commit fdd9ebccfc32c060d027ab9a2c957097e6997de6 Merge: 82ffbe7776d0ac 6fe26f694c824b Author: Jakub Kicinski Date: Mon Jun 9 15:47:29 2025 -0700 Merge tag 'for-net-2025-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - MGMT: Fix UAF on mgmt_remove_adv_monitor_complete - MGMT: Protect mgmt_pending list with its own lock - hci_core: fix list_for_each_entry_rcu usage - btintel_pcie: Increase the tx and rx descriptor count - btintel_pcie: Reduce driver buffer posting to prevent race condition - btintel_pcie: Fix driver not posting maximum rx buffers * tag 'for-net-2025-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: MGMT: Protect mgmt_pending list with its own lock Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete Bluetooth: btintel_pcie: Reduce driver buffer posting to prevent race condition Bluetooth: btintel_pcie: Increase the tx and rx descriptor count Bluetooth: btintel_pcie: Fix driver not posting maximum rx buffers Bluetooth: hci_core: fix list_for_each_entry_rcu usage ==================== Link: https://patch.msgid.link/20250605191136.904411-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 82ffbe7776d0ac084031f114167712269bf3d832 Author: Eric Dumazet Date: Fri Jun 6 16:51:27 2025 +0000 net_sched: sch_sfq: fix a potential crash on gso_skb handling SFQ has an assumption of always being able to queue at least one packet. However, after the blamed commit, sch->q.len can be inflated by packets in sch->gso_skb, and an enqueue() on an empty SFQ qdisc can be followed by an immediate drop. Fix sfq_drop() to properly clear q->tail in this situation. Tested: ip netns add lb ip link add dev to-lb type veth peer name in-lb netns lb ethtool -K to-lb tso off # force qdisc to requeue gso_skb ip netns exec lb ethtool -K in-lb gro on # enable NAPI ip link set dev to-lb up ip -netns lb link set dev in-lb up ip addr add dev to-lb 192.168.20.1/24 ip -netns lb addr add dev in-lb 192.168.20.2/24 tc qdisc replace dev to-lb root sfq limit 100 ip netns exec lb netserver netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & Fixes: a53851e2c321 ("net: sched: explicit locking in gso_cpu fallback") Reported-by: Marcus Wichelmann Closes: https://lore.kernel.org/netdev/9da42688-bfaa-4364-8797-e9271f3bdaef@hetzner-cloud.de/ Signed-off-by: Eric Dumazet Reviewed-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250606165127.3629486-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 93310053663ba647e402ef67e4bb18ec06ff8dc4 Author: Philipp Kerling Date: Sun Jun 8 20:59:00 2025 +0200 smb: client: disable path remapping with POSIX extensions If SMB 3.1.1 POSIX Extensions are available and negotiated, the client should be able to use all characters and not remap anything. Currently, the user has to explicitly request this behavior by specifying the "nomapposix" mount option. Link: https://lore.kernel.org/4195bb677b33d680e77549890a4f4dd3b474ceaf.camel@rx2.rx-server.de Signed-off-by: Philipp Kerling Reviewed-by: Namjae Jeon Signed-off-by: Steve French commit 9ab29ed505557bd106e292184fa4917955eb8e6e Author: Mario Limonciello Date: Sun Jun 8 21:34:08 2025 -0500 gpiolib: acpi: Add a quirk for Acer Nitro V15 It is reported that on Acer Nitro V15 suspend only works properly if the keyboard backlight is turned off. In looking through the issue Acer Nitro V15 has a GPIO (#8) specified in _AEI but it has no matching notify device in _EVT. The values for GPIO #8 change as keyboard backlight is turned on and off. This makes it seem that GPIO #8 is actually supposed to be solely for keyboard backlight. Turning off the interrupt for this GPIO fixes the issue. Add a quirk that does just that. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4169 Signed-off-by: Mario Limonciello Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 1efb73791c828f3d1ac68ebbc5eddc35a562f9d0 Author: Rob Clark Date: Mon Jun 9 11:24:36 2025 -0700 drm/msm/adreno: Pass device_node to find_chipid() We are going to want to re-use this before the component is bound, when we don't yet have the device pointer (but we do have the of node). v2: use %pOF Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/657705/ commit 1453b532d193a0b1b94429c657365e14dd4f361e Author: Rob Clark Date: Mon Jun 9 11:24:35 2025 -0700 drm/msm: Rename add_components_mdp() To better match add_gpu_components(). Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/657700/ commit ba64c6737f8656aa86e9fbcc1ff56e56316e62f6 Author: Ryan Eatmon Date: Sat May 24 21:25:37 2025 +0530 drivers: gpu: drm: msm: registers: improve reproducibility The files generated by gen_header.py capture the source path to the input files and the date. While that can be informative, it varies based on where and when the kernel was built as the full path is captured. Since all of the files that this tool is run on is under the drivers directory, this modifies the application to strip all of the path before drivers. Additionally it prints instead of the date. Signed-off-by: Ryan Eatmon Signed-off-by: Bruce Ashfield Signed-off-by: Viswanath Kraleti Acked-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/655599/ Signed-off-by: Rob Clark commit 2b520c6104f34e3a548525173c38ebca4402cac3 Author: Connor Abbott Date: Tue May 20 18:28:06 2025 -0400 drm/msm/a7xx: Call CP_RESET_CONTEXT_STATE Calling this packet is necessary when we switch contexts because there are various pieces of state used by userspace to synchronize between BR and BV that are persistent across submits and we need to make sure that they are in a "safe" state when switching contexts. Otherwise a userspace submission in one context could cause another context to function incorrectly and hang, effectively a denial of service (although without leaking data). This was missed during initial a7xx bringup. Fixes: af66706accdf ("drm/msm/a6xx: Add skeleton A7xx support") Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/654924/ Signed-off-by: Rob Clark commit b1c9e797ad37d188675505b66a3a4bbeea5d9560 Author: Connor Abbott Date: Tue May 20 18:28:05 2025 -0400 drm/msm: Fix CP_RESET_CONTEXT_STATE bitfield names Based on kgsl. Fixes: af66706accdf ("drm/msm/a6xx: Add skeleton A7xx support") Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/654922/ Signed-off-by: Rob Clark commit a3da9388c66782dbd808a63709e376ebe81ccca5 Merge: 19272b37aa4f83 9697ca0d53e3db Author: Martin K. Petersen Date: Mon Jun 9 15:34:06 2025 -0400 Merge branch '6.16/scsi-queue' into 6.16/scsi-fixes Pull in remaining fixes from queue branch. Signed-off-by: Martin K. Petersen commit 9697ca0d53e3db357be26d2414276143c4a2cd49 Author: Peter Oberparleiter Date: Tue Jun 3 20:21:56 2025 +0200 scsi: s390: zfcp: Ensure synchronous unit_add Improve the usability of the unit_add sysfs attribute by ensuring that the associated FCP LUN scan processing is completed synchronously. This enables configuration tooling to consistently determine the end of the scan process to allow for serialization of follow-on actions. While the scan process associated with unit_add typically completes synchronously, it is deferred to an asynchronous background process if unit_add is used before initial remote port scanning has completed. This occurs when unit_add is used immediately after setting the associated FCP device online. To ensure synchronous unit_add processing, wait for remote port scanning to complete before initiating the FCP LUN scan. Cc: stable@vger.kernel.org Reviewed-by: M Nikhil Reviewed-by: Nihar Panda Signed-off-by: Peter Oberparleiter Signed-off-by: Nihar Panda Link: https://lore.kernel.org/r/20250603182252.2287285-2-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen commit 9b17621366d210ffee83262a8754086ebbde5e55 Author: Alok Tiwari Date: Fri May 30 12:29:35 2025 -0700 scsi: iscsi: Fix incorrect error path labels for flashnode operations Correct the error handling goto labels used when host lookup fails in various flashnode-related event handlers: - iscsi_new_flashnode() - iscsi_del_flashnode() - iscsi_login_flashnode() - iscsi_logout_flashnode() - iscsi_logout_flashnode_sid() scsi_host_put() is not required when shost is NULL, so jumping to the correct label avoids unnecessary operations. These functions previously jumped to the wrong goto label (put_host), which did not match the intended cleanup logic. Use the correct exit labels (exit_new_fnode, exit_del_fnode, etc.) to ensure proper error handling. Also remove the unused put_host label under iscsi_new_flashnode() as it is no longer needed. No functional changes beyond accurate error path correction. Fixes: c6a4bb2ef596 ("[SCSI] scsi_transport_iscsi: Add flash node mgmt support") Signed-off-by: Alok Tiwari Link: https://lore.kernel.org/r/20250530193012.3312911-1-alok.a.tiwari@oracle.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit ad0f54842cd23127070d8c310dd06d8f7add025c Author: Ankit Chauhan Date: Wed May 28 16:36:04 2025 +0530 scsi: mvsas: Fix typos in per-phy comments and SAS cmd port registers Spelling fixes: Deocder --> Decoder Memroy --> Memory This is a non-functional change aimed at improving code clarity. Signed-off-by: Ankit Chauhan Link: https://lore.kernel.org/r/20250528110604.59528-1-ankitchauhan2065@gmail.com Signed-off-by: Martin K. Petersen commit b13044092c1e30453d2f7e9be596d3a2616582a0 Author: Connor Abbott Date: Tue May 20 15:08:59 2025 -0400 drm/msm: Temporarily disable stall-on-fault after a page fault When things go wrong, the GPU is capable of quickly generating millions of faulting translation requests per second. When that happens, in the stall-on-fault model each access will stall until it wins the race to signal the fault and then the RESUME register is written. This slows processing page faults to a crawl as the GPU can generate faults much faster than the CPU can acknowledge them. It also means that all available resources in the SMMU are saturated waiting for the stalled transactions, so that other transactions such as transactions generated by the GMU, which shares translation resources with the GPU, cannot proceed. This causes a GMU watchdog timeout, which leads to a failed reset because GX cannot collapse when there is a transaction pending and a permanently hung GPU. On older platforms with qcom,smmu-v2, it seems that when one transaction is stalled subsequent faulting transactions are terminated, which avoids this problem, but the MMU-500 follows the spec here. To work around these problems, disable stall-on-fault as soon as we get a page fault until a cooldown period after pagefaults stop. This allows the GMU some guaranteed time to continue working. We only use stall-on-fault to halt the GPU while we collect a devcoredump and we always terminate the transaction afterward, so it's fine to miss some subsequent page faults. We also keep it disabled so long as the current devcoredump hasn't been deleted, because in that case we likely won't capture another one if there's a fault. After this commit HFI messages still occasionally time out, because the crashdump handler doesn't run fast enough to let the GMU resume, but the driver seems to recover from it. This will probably go away after the HFI timeout is increased. Signed-off-by: Connor Abbott Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/654891/ Signed-off-by: Rob Clark commit dedf404be8cf97e6fabbed7ad97000ab816897eb Author: Connor Abbott Date: Tue May 20 15:08:58 2025 -0400 drm/msm: Delete resume_translation() Unused since the previous commit. Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/654890/ Signed-off-by: Rob Clark commit 0c5fea1eb0dc234cd321bcd19a6bd0f51273b4c6 Author: Connor Abbott Date: Tue May 20 15:08:57 2025 -0400 drm/msm: Don't use a worker to capture fault devcoredump Now that we use a threaded IRQ, it should be safe to do this in the fault handler. We can also remove fault_info from struct msm_gpu and just pass it directly. Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/654889/ Signed-off-by: Rob Clark commit f681c2aa8676a890eacc84044717ab0fd26e058f Author: Rob Clark Date: Wed May 14 09:33:33 2025 -0700 drm/msm: Fix another leak in the submit error path put_unused_fd() doesn't free the installed file, if we've already done fd_install(). So we need to also free the sync_file. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/653583/ Signed-off-by: Rob Clark commit 5d319f75ccf7f0927425a7545aa1a22b3eedc189 Author: Rob Clark Date: Wed May 14 09:33:32 2025 -0700 drm/msm: Fix a fence leak in submit error path In error paths, we could unref the submit without calling drm_sched_entity_push_job(), so msm_job_free() will never get called. Since drm_sched_job_cleanup() will NULL out the s_fence, we can use that to detect this case. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/653584/ Signed-off-by: Rob Clark commit bd30b995df8fd053e13d10f78dbc7b2fa5ed1aae Merge: cf2c3eceb757e3 10c24e0d2f7cd2 Author: Mark Brown Date: Mon Jun 9 18:45:20 2025 +0100 SPI: omap2-mcspi: Fix SPI CS behaviour around Merge series from Félix Piédallu : These patches fix the behaviour of the SPI Chip Select of the OMAP2 MCSPI driver used on TI SoCs. The omap2-mcspi driver supports the use of multi mode (multichannel in TI documentation). In this mode, the CS is asserted and deasserted by the hardware. The multi mode is disabled for messages when cs_change=0 for all transfers (e.g when CS is kept asserted between transfers of a same message). The multi mode also needs to be disabled for messages when cs_change=1 on the last transfer (e.g when CS is kept asserted after the WHOLE message), and the message right after. Currently, that is not the case and it CS is deasserted by hardware when it shouldn't. This breaks peripheral drivers that send multiple messages with the CS asserted in between. Patch 1 ensures that multi mode is disabled when cs_change=1 on the last transfer of the message. Patch 2 ensures that multi mode is disable on a message following one with cs_change=1 on the last transfer. This is the case for the TPM TIS SPI driver that uses this logic for flow control purposes. Tested on an AM6442 platform with a TPM ST33HTPH2X32AHE4. commit 87b42c114cdda76c8ad3002f2096699ad5146cb3 Author: Dan Carpenter Date: Wed May 28 11:11:41 2025 +0300 cxl: fix return value in cxlctl_validate_set_features() The cxlctl_validate_set_features() function is type bool. It's supposed to return true for valid requests and false for invalid. However, this error path returns ERR_PTR(-EINVAL) which is true when it was intended to return false. The incorrect return will result in kernel failing to prevent a incorrect op_size passed in from userspace to be detected. [ dj: Add user impact to commit log ] Fixes: f76e0bbc8bc3 ("cxl: Update prototype of function get_support_feature_info()") Signed-off-by: Dan Carpenter Reviewed-by: Ira Weiny Link: https://patch.msgid.link/aDbFPSCujpJLY1if@stanley.mountain Signed-off-by: Dave Jiang commit 179e949719fe81219a3e23f1e716ac2d02eea845 Author: Thomas Huth Date: Fri Mar 14 08:09:36 2025 +0100 ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Thomas Huth Signed-off-by: Vineet Gupta commit 2cb74be378675c860af0fcaf1ec2801beebdf028 Author: Thomas Huth Date: Fri Mar 14 08:09:35 2025 +0100 ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers __ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code. Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Thomas Huth Signed-off-by: Vineet Gupta commit 857f4517965b282234e12f6bca0c21ef10eec09b Author: Yu-Chun Lin Date: Thu Apr 10 01:11:16 2025 +0800 ARC: unwind: Use built-in sort swap to reduce code size and improve performance The custom swap function used in sort() was identical to the default built-in sort swap. Remove the custom swap function and passes NULL to sort(), allowing it to use the default swap function. This change reduces code size and improves performance, particularly when CONFIG_MITIGATION_RETPOLINE is enabled. With RETPOLINE mitigation, indirect function calls incur significant overhead, and using the default swap function avoids this cost. $ ./scripts/bloat-o-meter ./unwind.o.old ./unwind.o.new add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-22 (-22) Function old new delta init_unwind_hdr.constprop 544 540 -4 swap_eh_frame_hdr_table_entries 18 - -18 Total: Before=4410, After=4388, chg -0.50% Signed-off-by: Yu-Chun Lin Signed-off-by: Vineet Gupta commit ea7caffedd011f7d40abe93a884ffbe46f122535 Author: Jason Gunthorpe Date: Tue Apr 8 14:22:56 2025 -0300 ARC: atomics: Implement arch_atomic64_cmpxchg using _relaxed The core atomic code has a number of macros where it elaborates architecture primitives into more functions. ARC uses arch_atomic64_cmpxchg() as it's architecture primitive which disable alot of the additional functions. Instead provide arch_cmpxchg64_relaxed() as the primitive and rely on the core macros to create arch_cmpxchg64(). The macros will also provide other functions, for instance, try_cmpxchg64_release(), giving a more complete implementation. Suggested-by: Mark Rutland Link: https://lore.kernel.org/r/Z0747n5bSep4_1VX@J2N7QTR9R3 Signed-off-by: Jason Gunthorpe Signed-off-by: Vineet Gupta commit e044b8a9545cd8265c7110c179aeec2624c16455 Author: Francesco Poli (wintermute) Date: Wed May 21 23:14:39 2025 +0200 cpupower: split unitdir from libdir in Makefile Improve the installation procedure for the systemd service unit 'cpupower.service', to be more flexible. Some distros install libraries to /usr/lib64/, but systemd service units have to be installed to /usr/lib/systemd/system: as a consequence, the installation procedure should not assume that systemd service units can be installed to ${libdir}/systemd/system ... Define a dedicated variable ("unitdir") in the Makefile. Link: https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6 Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower") Link: https://lore.kernel.org/r/20250521211656.65646-1-invernomuto@paranoici.org Signed-off-by: Francesco Poli (wintermute) Tested-by: Thorsten Leemhuis Signed-off-by: Shuah Khan commit 86a4371b76976158be875dc654ceee35c574b27b Author: Vijendar Mukunda Date: Fri May 30 11:13:39 2025 +0530 soundwire: amd: fix for handling slave alerts after link is down Sometimes, its observed that during system level suspend callback execution, after link is down, handling pending slave status workqueue results in mipi register access failures as shown below. soundwire sdw-master-0-0: trf on Slave 1 failed:-110 read addr 0 count 1 rt722-sdca sdw:0:0:025d:0722:01: SDW_DP0_INT recheck read failed:-110 rt722-sdca sdw:0:0:025d:0722:01: Slave 1 alert handling failed: -110 amd_sdw_manager amd_sdw_manager.0: SDW0 cmd response timeout occurred amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5c count 1 amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5d count 1 amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 Cancel the pending slave status workqueue prior to initiating clock stop sequence during suspend callback execution for both the power modes. Fixes: 9cf1efc5ed2d ("soundwire: amd: add pm_prepare callback and pm ops support") Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20250530054447.1645807-2-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit f287822688eeb44ae1cf6ac45701d965efc33218 Author: Xin Li (Intel) Date: Mon Jun 9 01:40:54 2025 -0700 selftests/x86: Add a test to detect infinite SIGTRAP handler loop When FRED is enabled, if the Trap Flag (TF) is set without an external debugger attached, it can lead to an infinite loop in the SIGTRAP handler. To avoid this, the software event flag in the augmented SS must be cleared, ensuring that no single-step trap remains pending when ERETU completes. This test checks for that specific scenario—verifying whether the kernel correctly prevents an infinite SIGTRAP loop in this edge case when FRED is enabled. The test should _always_ pass with IDT event delivery, thus no need to disable the test even when FRED is not enabled. Signed-off-by: Xin Li (Intel) Signed-off-by: Dave Hansen Tested-by: Sohil Mehta Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250609084054.2083189-3-xin%40zytor.com commit e34dbbc85d64af59176fe59fad7b4122f4330fe2 Author: Xin Li (Intel) Date: Mon Jun 9 01:40:53 2025 -0700 x86/fred/signal: Prevent immediate repeat of single step trap on return from SIGTRAP handler Clear the software event flag in the augmented SS to prevent immediate repeat of single step trap on return from SIGTRAP handler if the trap flag (TF) is set without an external debugger attached. Following is a typical single-stepping flow for a user process: 1) The user process is prepared for single-stepping by setting RFLAGS.TF = 1. 2) When any instruction in user space completes, a #DB is triggered. 3) The kernel handles the #DB and returns to user space, invoking the SIGTRAP handler with RFLAGS.TF = 0. 4) After the SIGTRAP handler finishes, the user process performs a sigreturn syscall, restoring the original state, including RFLAGS.TF = 1. 5) Goto step 2. According to the FRED specification: A) Bit 17 in the augmented SS is designated as the software event flag, which is set to 1 for FRED event delivery of SYSCALL, SYSENTER, or INT n. B) If bit 17 of the augmented SS is 1 and ERETU would result in RFLAGS.TF = 1, a single-step trap will be pending upon completion of ERETU. In step 4) above, the software event flag is set upon the sigreturn syscall, and its corresponding ERETU would restore RFLAGS.TF = 1. This combination causes a pending single-step trap upon completion of ERETU. Therefore, another #DB is triggered before any user space instruction is executed, which leads to an infinite loop in which the SIGTRAP handler keeps being invoked on the same user space IP. Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code") Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li (Intel) Signed-off-by: Dave Hansen Tested-by: Sohil Mehta Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250609084054.2083189-2-xin%40zytor.com commit cf2c3eceb757e3f28e6f1034f9bc178e1535f5cc Author: Patrice Chotard Date: Mon Jun 9 17:05:04 2025 +0200 spi: stm32-ospi: Make usage of reset_control_acquire/release() API As ospi reset is consumed by both OMM and OSPI drivers, use the reset acquire/release mechanism which ensure exclusive reset usage. This avoid to call reset_control_get/put() in OMM driver each time we need to reset OSPI children and guarantee the reset line stays deasserted. During resume, OMM driver takes temporarily control of reset. Fixes: 79b8a705e26c ("spi: stm32: Add OSPI driver") Signed-off-by: Patrice Chotard Reviewed-by: Philipp Zabel Link: https://patch.msgid.link/20250609-b4-upstream_ospi_reset_update-v6-1-5b602b567e8a@foss.st.com Signed-off-by: Mark Brown commit d6fb4f01736a1d18cc981eb04fa2907a7121fc27 Author: Maarten Lankhorst Date: Wed May 21 11:01:02 2025 +0200 drm/xe/svm: Fix regression disallowing 64K SVM migration When changing the condition from >= SZ_64K, it was changed to <= SZ_64K. This disallows migration of 64K, which is the exact minimum allowed. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5057 Fixes: 794f5493f518 ("drm/xe: Strict migration policy for atomic SVM faults") Cc: stable@vger.kernel.org Cc: Matthew Brost Cc: Himal Prasad Ghimiray Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Maarten Lankhorst Link: https://lore.kernel.org/r/20250521090102.2965100-1-dev@lankhorst.se (cherry picked from commit 531bef26d189b28bf0d694878c0e064b30990b6c) Signed-off-by: Thomas Hellström commit d53fd59707c402d03ec740b4e90a2ddcb5312006 Author: Rob Herring (Arm) Date: Wed May 7 16:59:02 2025 -0500 dt-bindings: soc: fsl,ls1028a-reset: Drop extra "/" in $id The $id value has a double "//". Drop it. Fixes: 9ca5a7d9d2e0 ("dt-bindings: soc: fsl: Add fsl,ls1028a-reset for reset syscon node") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250507215903.2748698-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 779a0c9e06a91d0007f2a4f4071e3b9a8102b15e Author: Lizhi Hou Date: Wed Jun 4 07:32:17 2025 -0700 accel/amdxdna: Fix incorrect PSP firmware size The incorrect PSP firmware size is used for initializing. It may cause error for newer version firmware. Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine") Acked-by: Alex Deucher Signed-off-by: Lizhi Hou Link: https://lore.kernel.org/r/20250604143217.1386272-1-lizhi.hou@amd.com commit 539d80575b810c7a5987c7ac8915e3bc99c03695 Author: Masami Hiramatsu (Google) Date: Thu Jun 5 10:07:38 2025 +0900 mtk-sd: Fix a pagefault in dma_unmap_sg() for not prepared data When swiotlb buffer is full, the dma_map_sg() returns 0 to msdc_prepare_data(), but it does not check it and sets the MSDC_PREPARE_FLAG. swiotlb_tbl_map_single() /* prints "swiotlb buffer is full" */ <-swiotlb_map() <-dma_direct_map_page() <-dma_direct_map_sg() <-__dma_map_sg_attrs() <-dma_map_sg_attrs() <-dma_map_sg() /* returns 0 (pages mapped) */ <-msdc_prepare_data() Then, the msdc_unprepare_data() checks MSDC_PREPARE_FLAG and calls dma_unmap_sg() with unmapped pages. It causes a page fault. To fix this problem, Do not set MSDC_PREPARE_FLAG if dma_map_sg() fails because this is not prepared. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Masami Hiramatsu (Google) Tested-by: Sergey Senozhatsky Reviewed-by: AngeloGioacchino Del Regno Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/174908565814.4056588.769599127120955383.stgit@mhiramat.tok.corp.google.com Signed-off-by: Ulf Hansson commit 3358b836d4369ad47823c26834b3613778fe75b2 Author: Dan Carpenter Date: Tue May 27 08:55:01 2025 +0300 mmc: sdhci-of-k1: Fix error code in probe() If spacemit_sdhci_get_clocks() fails, then propagate the error code. Don't return success. Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC") Signed-off-by: Dan Carpenter Reviewed-by: Yixun Lan Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/aDVTtQdXVtRhxOrb@stanley.mountain Signed-off-by: Ulf Hansson commit 009c3a4bc41e855fd76f92727f9fbae4e5917d7f Author: Avri Altman Date: Mon May 26 14:44:45 2025 +0300 mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier Move the BROKEN_SD_DISCARD quirk for certain SanDisk SD cards from the `mmc_blk_fixups[]` to `mmc_sd_fixups[]`. This ensures the quirk is applied earlier in the device initialization process, aligning with the reasoning in [1]. Applying the quirk sooner prevents the kernel from incorrectly enabling discard support on affected cards during initial setup. [1] https://lore.kernel.org/all/20240820230631.GA436523@sony.com Fixes: 07d2872bf4c8 ("mmc: core: Add SD card quirk for broken discard") Signed-off-by: Avri Altman Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250526114445.675548-1-avri.altman@sandisk.com Signed-off-by: Ulf Hansson commit e51a086117ed857ea455c9ea774dbfb82f53e517 Author: Andres Urian Florez Date: Sun Jun 8 18:04:21 2025 -0500 spi: offload: check offload ops existence before disabling the trigger Add a safe guard in spi_offload_trigger to check the existence of offload->ops before invoking the trigger_disable callback Signed-off-by: Andres Urian Florez Link: https://patch.msgid.link/20250608230422.325360-1-andres.emb.sys@gmail.com Signed-off-by: Mark Brown commit 4c46a471be12216347ba707f8eadadbf5d68e698 Author: Viresh Kumar Date: Tue Jun 3 16:38:53 2025 +0530 firmware: arm_ffa: Fix the missing entry in struct ffa_indirect_msg_hdr As per the spec, one 32 bit reserved entry is missing here, add it. Signed-off-by: Viresh Kumar Fixes: 910cc1acc9b4 ("firmware: arm_ffa: Add support for passing UUID in FFA_MSG_SEND2") Reviewed-by: Bertrand Marquis Message-Id: <28a624fbf416975de4fbe08cfbf7c2db89cb630e.1748948911.git.viresh.kumar@linaro.org> Signed-off-by: Sudeep Holla commit 9ca7a421229bbdfbe2e1e628cff5cfa782720a10 Author: Sudeep Holla Date: Wed May 28 09:49:43 2025 +0100 firmware: arm_ffa: Replace mutex with rwlock to avoid sleep in atomic context The current use of a mutex to protect the notifier hashtable accesses can lead to issues in the atomic context. It results in the below kernel warnings: | BUG: sleeping function called from invalid context at kernel/locking/mutex.c:258 | in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 9, name: kworker/0:0 | preempt_count: 1, expected: 0 | RCU nest depth: 0, expected: 0 | CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted 6.14.0 #4 | Workqueue: ffa_pcpu_irq_notification notif_pcpu_irq_work_fn | Call trace: | show_stack+0x18/0x24 (C) | dump_stack_lvl+0x78/0x90 | dump_stack+0x18/0x24 | __might_resched+0x114/0x170 | __might_sleep+0x48/0x98 | mutex_lock+0x24/0x80 | handle_notif_callbacks+0x54/0xe0 | notif_get_and_handle+0x40/0x88 | generic_exec_single+0x80/0xc0 | smp_call_function_single+0xfc/0x1a0 | notif_pcpu_irq_work_fn+0x2c/0x38 | process_one_work+0x14c/0x2b4 | worker_thread+0x2e4/0x3e0 | kthread+0x13c/0x210 | ret_from_fork+0x10/0x20 To address this, replace the mutex with an rwlock to protect the notifier hashtable accesses. This ensures that read-side locking does not sleep and multiple readers can acquire the lock concurrently, avoiding unnecessary contention and potential deadlocks. Writer access remains exclusive, preserving correctness. This change resolves warnings from lockdep about potential sleep in atomic context. Cc: Jens Wiklander Reported-by: Jérôme Forissier Closes: https://github.com/OP-TEE/optee_os/issues/7394 Fixes: e0573444edbf ("firmware: arm_ffa: Add interfaces to request notification callbacks") Message-Id: <20250528-ffa_notif_fix-v1-3-5ed7bc7f8437@arm.com> Reviewed-by: Jens Wiklander Tested-by: Jens Wiklander Signed-off-by: Sudeep Holla commit 27e850c88df0e25474a8caeb2903e2e90b62c1dc Author: Sudeep Holla Date: Wed May 28 09:49:42 2025 +0100 firmware: arm_ffa: Move memory allocation outside the mutex locking The notifier callback node allocation is currently done while holding the notify_lock mutex. While this is safe even if memory allocation may sleep, we need to move the allocation outside the locked region in preparation to move from using muxtes to rwlocks. Move the memory allocation to avoid potential sleeping in atomic context once the locks are moved from mutex to rwlocks. Fixes: e0573444edbf ("firmware: arm_ffa: Add interfaces to request notification callbacks") Message-Id: <20250528-ffa_notif_fix-v1-2-5ed7bc7f8437@arm.com> Reviewed-by: Jens Wiklander Signed-off-by: Sudeep Holla commit a833d31ad867103ba72a0b73f3606f4ab8601719 Author: Sudeep Holla Date: Wed May 28 09:49:41 2025 +0100 firmware: arm_ffa: Fix memory leak by freeing notifier callback node Commit e0573444edbf ("firmware: arm_ffa: Add interfaces to request notification callbacks") adds support for notifier callbacks by allocating and inserting a callback node into a hashtable during registration of notifiers. However, during unregistration, the code only removes the node from the hashtable without freeing the associated memory, resulting in a memory leak. Resolve the memory leak issue by ensuring the allocated notifier callback node is properly freed after it is removed from the hashtable entry. Fixes: e0573444edbf ("firmware: arm_ffa: Add interfaces to request notification callbacks") Message-Id: <20250528-ffa_notif_fix-v1-1-5ed7bc7f8437@arm.com> Reviewed-by: Jens Wiklander Signed-off-by: Sudeep Holla commit 98570e8cb8b0c0893810f285b4a3b1a3ab81a556 Author: Andy Yan Date: Sat May 24 14:42:13 2025 +0800 arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi 4B cd-gpios is used for sdcard detects for sdmmc. Fixes: 3f5d336d64d6 ("arm64: dts: rockchip: Add support for rk3588s based board Cool Pi 4B") Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250524064223.5741-2-andyshrk@163.com Signed-off-by: Heiko Stuebner commit e625e284172d235be5cd906a98c6c91c365bb9b1 Author: Andy Yan Date: Sat May 24 14:42:12 2025 +0800 arm64: dts: rockchip: Add cd-gpios for sdcard detect on Cool Pi CM5 cd-gpios is used for sdcard detects for sdmmc. Fixes: 791c154c3982 ("arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB") Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250524064223.5741-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit af9feb0b85f92d2972061224839c5fea5ee39f6d Author: Andy Yan Date: Thu May 22 10:05:24 2025 +0800 arm64: dts: rockchip: Adjust the HDMI DDC IO driver strength for rk3588 For the RK3588 HDMI controller, the falling edge of DDC SDA and SCL almost coincide and cannot be adjusted by HDMI registrer, resulting in poor compatibility of DDC communication. An improvement of the compatibility of DDC can be done by increasing the driver strength of SCL and decreasing the driver strength of SDA to increase the slope of the falling edge. It should be noted that the maximum driving strength of hdmim0_tx1_scl is only 3, which is different from that of the other IOs. Signed-off-by: Andy Yan Tested-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250522020537.1884771-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit af0f43d5d0d6e486b6a83190000dfa7ad447f825 Author: Shawn Lin Date: Tue Jun 3 10:35:40 2025 +0800 arm64: dts: rockchip: fix rk3576 pcie1 linux,pci-domain pcie0 already used 0 as its pci-domain, so pcie1 will fail to allocate the same pci-domain if both of them are used. rk-pcie 2a210000.pcie: PCIe Link up, LTSSM is 0x130011 rk-pcie 2a210000.pcie: PCIe Gen.2 x1 link up rk-pcie 2a210000.pcie: Scanning root bridge failed rk-pcie 2a210000.pcie: failed to initialize host Fixes: d4b9fc2af45d ("arm64: dts: rockchip: Add rk3576 pcie nodes") Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1748918140-212263-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Heiko Stuebner commit 24b0277c1c539cd41539d9297baafc62df04464a Author: Krzysztof Kozlowski Date: Sun Jun 1 12:51:01 2025 +0200 pinctrl: tb10x: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF warning: pinctrl-tb10x.c:815:34: warning: unused variable 'tb10x_pinctrl_dt_ids' [-Wunused-const-variable] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505301317.EI1caRC0-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20250601105100.27927-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit d38e00c417e1ca0c586802e47ad7d54347c91f67 Author: Krzysztof Kozlowski Date: Wed May 28 12:45:15 2025 +0200 pinctrl: MAINTAINERS: Drop bouncing Jianlong Huang Emails to Jianlong Huang bounce since 9 months, so drop the person from maintainers: 550 5.4.1 Recipient address rejected: Access denied. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20250528104514.184122-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit fcd65d65fd85dbde090ef8c2615760ebc5ccf9e3 Author: Krzysztof Kozlowski Date: Wed May 28 11:22:02 2025 +0200 pinctrl: st: Drop unused st_gpio_bank() function Static inline st_gpio_bank() function is not referenced: pinctrl-st.c:377:19: error: unused function 'st_gpio_bank' [-Werror,-Wunused-function] Fixes: 701016c0cba5 ("pinctrl: st: Add pinctrl and pinconf support.") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20250528092201.52132-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 315345610faee8a0568b522dba9e35067d1732ab Author: Wojciech Slenska Date: Fri May 23 12:14:37 2025 +0200 pinctrl: qcom: pinctrl-qcm2290: Add missing pins Added the missing pins to the qcm2290_pins table. Signed-off-by: Wojciech Slenska Fixes: 48e049ef1238 ("pinctrl: qcom: Add QCM2290 pinctrl driver") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250523101437.59092-1-wojciech.slenska@gmail.com Signed-off-by: Linus Walleij commit 56ec63a6e107e724619e61c7e605b49d365dfa07 Author: Dmitry Baryshkov Date: Tue May 13 21:38:59 2025 +0300 pinctrl: qcom: switch to devm_gpiochip_add_data() In order to simplify cleanup actions, use devres-enabled version of gpiochip_add_data(). As the msm_pinctrl_remove() function is now empty, drop it and all its calls from the corresponding pinctrl drivers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250513-pinctrl-msm-fix-v2-3-249999af0fc1@oss.qualcomm.com Signed-off-by: Linus Walleij commit a0914bf56e26d2cf457690602883f9cd2ec2c646 Author: Edip Hazuri Date: Mon Jun 9 10:59:44 2025 +0300 ALSA: hda/realtek - Add mute LED support for HP Victus 16-s1xxx and HP Victus 15-fa1xxx The mute led on those laptops is using ALC245 but requires a quirk to work This patch enables the existing quirk for the devices. Tested on my Victus 16-s1011nt Laptop and my friend's Victus 15-fa1xxx. The LED behaviour works as intended. Cc: Signed-off-by: Edip Hazuri Link: https://patch.msgid.link/20250609075943.13934-2-edip@medip.dev Signed-off-by: Takashi Iwai commit f00de8e82cab24ef2e2cae0b297b4dc46c3e37ca Author: Brahmajit Das Date: Sat Jun 7 02:10:00 2025 +0530 ALSA: ctxfi: Replace deprecated strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. Use strscpy() to copy the long name because there's no string to format with sprintf(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Brahmajit Das Link: https://patch.msgid.link/20250606204000.8156-1-listout@listout.xyz Signed-off-by: Takashi Iwai commit 784e48a82976ee0b645788750343cd1b28a372f3 Author: Jake Hillion Date: Thu Jun 5 19:09:27 2025 +0100 x86/platform/amd: replace down_timeout() with down_interruptible() Currently hsmp_send_message() uses down_timeout() with a 100ms timeout to take the semaphore. However __hsmp_send_message(), the content of the critical section, has a sleep in it. On systems with significantly delayed scheduling behaviour this may take over 100ms. Convert this method to down_interruptible(). Leave the error handling the same as the documentation currently is not specific about what error is returned. Previous behaviour: a caller who competes with another caller stuck in the critical section due to scheduler delays would receive -ETIME. New behaviour: a caller who competes with another caller stuck in the critical section due to scheduler delays will complete successfully. Reviewed-by: Suma Hegde Tested-by: Suma Hegde Signed-off-by: Jake Hillion Link: https://lore.kernel.org/r/20250605-amd-hsmp-v2-2-a811bc3dd74a@hillion.co.uk Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f8afb12a2d7503de6558c23cacd7acbf6e9fe678 Author: Jake Hillion Date: Thu Jun 5 19:09:26 2025 +0100 x86/platform/amd: move final timeout check to after final sleep __hsmp_send_message sleeps between result read attempts and has a timeout of 100ms. Under extreme load it's possible for these sleeps to take a long time, exceeding the 100ms. In this case the current code does not check the register and fails with ETIMEDOUT. Refactor the loop to ensure there is at least one read of the register after a sleep of any duration. This removes instances of ETIMEDOUT with a single caller, even with a misbehaving scheduler. Tested on AMD Bergamo machines. Suggested-by: Blaise Sanouillet Reviewed-by: Suma Hegde Tested-by: Suma Hegde Signed-off-by: Jake Hillion Link: https://lore.kernel.org/r/20250605-amd-hsmp-v2-1-a811bc3dd74a@hillion.co.uk Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4dbd11796f3a8eb95647507befc41995458a4023 Author: Mario Limonciello Date: Tue Jun 3 08:24:08 2025 -0500 platform/x86/amd: pmc: Clear metrics table at start of cycle The area of memory that contains the metrics table may contain garbage when the cycle starts. This normally doesn't matter because the cycle itself will populate it with valid data, however commit 9f5595d5f03fd ("platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep cycles") started to use it during the check() phase. Depending upon what garbage is in the table it's possible that the system will wait 2.5 seconds for even the first cycle, which will be visible to a user. To prevent this from happening explicitly clear the table when logging is started. Fixes: 9f5595d5f03fd ("platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep cycles") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20250603132412.3555302-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1d0a61940e22e165e6acc4a9c6fb26edbe69112e Author: Dan Carpenter Date: Fri Jun 6 12:04:32 2025 +0300 platform/x86/intel: power-domains: Fix error code in tpmi_init() Return -ENOMEM instead of success if kcalloc() fails. Fixes: e37be5d85c60 ("platform/x86/intel: power-domains: Add interface to get Linux die ID") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/aEKvIGCt6d8Gcx4S@stanley.mountain Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit afbdc4bbb3a6418778cf969b0795bbaa8237cdd3 Author: Joshua Grisham Date: Fri Jun 6 15:09:08 2025 +0200 platform/x86: samsung-galaxybook: Add SAM0426 Add device ID SAM0426 (Notebook 9 Pro and similar devices) as reported and tested by GitHub user "diego-karsa" [1]. [1]: https://github.com/joshuagrisham/samsung-galaxybook-extras/issues/69 Signed-off-by: Joshua Grisham Reviewed-by: Armin Wolf Link: https://lore.kernel.org/r/20250606130909.207047-1-josh@joshuagrisham.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c987a390f1b3b8bdac11031d7004e3410fe259bd Author: Takashi Iwai Date: Sun Jun 8 11:14:14 2025 +0200 ALSA: hda/intel: Add Thinkpad E15 to PM deny list Lenovo Thinkpad E15 with Conexant CX8070 codec seems causing ugly noises after runtime-PM suspend. Disable the codec runtime PM as a workaround. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220210 Cc: Link: https://patch.msgid.link/20250608091415.21170-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 685f88c72a0c4d12d3bd2ff50286938f14486f85 Author: Srinivas Pandruvada Date: Fri Jun 6 13:53:00 2025 -0700 platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL Address a Smatch static checker warning regarding an unchecked dereference in the function call: set_cdie_id(i, cluster_info, plat_info) when plat_info is NULL. Instead of addressing this one case, in general if plat_info is NULL then it can cause other issues. For example in a two package system it will give warning for duplicate sysfs entry as package ID will be always zero for both packages when creating string for attribute group name. plat_info is derived from TPMI ID TPMI_BUS_INFO, which is integral to the core TPMI design. Therefore, it should not be NULL on a production platform. Consequently, the module should fail to load if plat_info is NULL. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/platform-driver-x86/aEKvGCLd1qmX04Tc@stanley.mountain/T/#u Fixes: 8a54e2253e4c ("platform/x86/intel-uncore-freq: Uncore frequency control via TPMI") Signed-off-by: Srinivas Pandruvada Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606205300.2384494-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 5808c34216954cd832bd4b8bc52dfa287049122b Author: Rong Zhang Date: Mon May 26 04:18:07 2025 +0800 platform/x86: ideapad-laptop: use usleep_range() for EC polling It was reported that ideapad-laptop sometimes causes some recent (since 2024) Lenovo ThinkBook models shut down when: - suspending/resuming - closing/opening the lid - (dis)connecting a charger - reading/writing some sysfs properties, e.g., fan_mode, touchpad - pressing down some Fn keys, e.g., Brightness Up/Down (Fn+F5/F6) - (seldom) loading the kmod The issue has existed since the launch day of such models, and there have been some out-of-tree workarounds (see Link:) for the issue. One disables some functionalities, while another one simply shortens IDEAPAD_EC_TIMEOUT. The disabled functionalities have read_ec_data() in their call chains, which calls schedule() between each poll. It turns out that these models suffer from the indeterminacy of schedule() because of their low tolerance for being polled too frequently. Sometimes schedule() returns too soon due to the lack of ready tasks, causing the margin between two polls to be too short. In this case, the command is somehow aborted, and too many subsequent polls (they poll for "nothing!") may eventually break the state machine in the EC, resulting in a hard shutdown. This explains why shortening IDEAPAD_EC_TIMEOUT works around the issue - it reduces the total number of polls sent to the EC. Even when it doesn't lead to a shutdown, frequent polls may also disturb the ongoing operation and notably delay (+ 10-20ms) the availability of EC response. This phenomenon is unlikely to be exclusive to the models mentioned above, so dropping the schedule() manner should also slightly improve the responsiveness of various models. Fix these issues by migrating to usleep_range(150, 300). The interval is chosen to add some margin to the minimal 50us and considering EC responses are usually available after 150-2500us based on my test. It should be enough to fix these issues on all models subject to the EC bug without introducing latency on other models. Tested on ThinkBook 14 G7+ ASP and solved both issues. No regression was introduced in the test on a model without the EC bug (ThinkBook X IMH, thanks Eric). Link: https://github.com/ty2/ideapad-laptop-tb2024g6plus/commit/6c5db18c9e8109873c2c90a7d2d7f552148f7ad4 Link: https://github.com/ferstar/ideapad-laptop-tb/commit/42d1e68e5009529d31bd23f978f636f79c023e80 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218771 Fixes: 6a09f21dd1e2 ("ideapad: add ACPI helpers") Cc: stable@vger.kernel.org Tested-by: Felix Yan Tested-by: Eric Long Tested-by: Jianfei Zhang Tested-by: Mingcong Bai Tested-by: Minh Le Tested-by: Sicheng Zhu Signed-off-by: Rong Zhang Link: https://lore.kernel.org/r/20250525201833.37939-1-i@rong.moe Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 8d8d7c1dbc46aa07a76acab7336a42ddd900be10 Author: Fabio Estevam Date: Fri May 16 14:39:00 2025 -0300 iio: adc: max1363: Reorder mode_list[] entries The IIO core issues warnings when a scan mask is a subset of a previous entry in the available_scan_masks array. On a board using a MAX11601, the following warning is observed: max1363 1-0064: available_scan_mask 7 subset of 6. Never used This occurs because the entries in the max11607_mode_list[] array are not ordered correctly. To fix this, reorder the entries so that no scan mask is a subset of an earlier one. While at it, reorder the mode_list[] arrays for other supported chips as well, to prevent similar warnings on different variants. Note fixes tag dropped as these were introduced over many commits a long time back and the side effect until recently was a reduction in sampling rate due to reading too many channels when only a few were desired. Now we have a sanity check that reports this error but that is not where the issue was introduced. Cc: stable@vger.kernel.org Signed-off-by: Fabio Estevam Acked-by: Matti Vaittinen Link: https://patch.msgid.link/20250516173900.677821-2-festevam@gmail.com Signed-off-by: Jonathan Cameron commit 6d21f2c2dd843bceefd9455f2919f6bb526797f0 Author: Fabio Estevam Date: Fri May 16 14:38:59 2025 -0300 iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[] Since commit 2718f15403fb ("iio: sanity check available_scan_masks array"), booting a board populated with a MAX11601 results in a flood of warnings: max1363 1-0064: available_scan_mask 8 subset of 0. Never used max1363 1-0064: available_scan_mask 9 subset of 0. Never used max1363 1-0064: available_scan_mask 10 subset of 0. Never used max1363 1-0064: available_scan_mask 11 subset of 0. Never used max1363 1-0064: available_scan_mask 12 subset of 0. Never used max1363 1-0064: available_scan_mask 13 subset of 0. Never used ... These warnings are caused by incorrect offsets used for differential channels in the MAX1363_4X_CHANS() and MAX1363_8X_CHANS() macros. The max1363_mode_table[] defines the differential channel mappings as follows: MAX1363_MODE_DIFF_SINGLE(0, 1, 1 << 12), MAX1363_MODE_DIFF_SINGLE(2, 3, 1 << 13), MAX1363_MODE_DIFF_SINGLE(4, 5, 1 << 14), MAX1363_MODE_DIFF_SINGLE(6, 7, 1 << 15), MAX1363_MODE_DIFF_SINGLE(8, 9, 1 << 16), MAX1363_MODE_DIFF_SINGLE(10, 11, 1 << 17), MAX1363_MODE_DIFF_SINGLE(1, 0, 1 << 18), MAX1363_MODE_DIFF_SINGLE(3, 2, 1 << 19), MAX1363_MODE_DIFF_SINGLE(5, 4, 1 << 20), MAX1363_MODE_DIFF_SINGLE(7, 6, 1 << 21), MAX1363_MODE_DIFF_SINGLE(9, 8, 1 << 22), MAX1363_MODE_DIFF_SINGLE(11, 10, 1 << 23), Update the macros to follow this same pattern, ensuring that the scan masks are valid and preventing the warnings. Cc: stable@vger.kernel.org Suggested-by: Jonathan Cameron Signed-off-by: Fabio Estevam Acked-by: Matti Vaittinen Link: https://patch.msgid.link/20250516173900.677821-1-festevam@gmail.com Signed-off-by: Jonathan Cameron commit e8ad595064f6ebd5d2d1a5d5d7ebe0efce623091 Author: Chen Ni Date: Thu May 15 16:31:01 2025 +0800 iio: adc: stm32-adc: Fix race in installing chained IRQ handler Fix a race where a pending interrupt could be received and the handler called before the handler's data has been setup, by converting to irq_set_chained_handler_and_data(). Fixes: 1add69880240 ("iio: adc: Add support for STM32 ADC core") Signed-off-by: Chen Ni Reviewed-by: Nuno Sá Tested-by: Fabrice Gasnier Reviewed-by: Fabrice Gasnier Link: https://patch.msgid.link/20250515083101.3811350-1-nichen@iscas.ac.cn Cc: Signed-off-by: Jonathan Cameron commit 16285a0931869baa618b1f5d304e1e9d090470a8 Author: Markus Burri Date: Thu May 8 15:06:09 2025 +0200 iio: fix potential out-of-bound write The buffer is set to 20 characters. If a caller write more characters, count is truncated to the max available space in "simple_write_to_buffer". To protect from OoB access, check that the input size fit into buffer and add a zero terminator after copy to the end of the copied data. Fixes: 6d5dd486c715 iio: core: make use of simple_write_to_buffer() Signed-off-by: Markus Burri Link: https://patch.msgid.link/20250508130612.82270-4-markus.burri@mt.com Signed-off-by: Jonathan Cameron commit da9374819eb3885636934c1006d450c3cb1a02ed Author: Markus Burri Date: Thu May 8 15:06:07 2025 +0200 iio: backend: fix out-of-bound write The buffer is set to 80 character. If a caller write more characters, count is truncated to the max available space in "simple_write_to_buffer". But afterwards a string terminator is written to the buffer at offset count without boundary check. The zero termination is written OUT-OF-BOUND. Add a check that the given buffer is smaller then the buffer to prevent. Fixes: 035b4989211d ("iio: backend: make sure to NULL terminate stack buffer") Signed-off-by: Markus Burri Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250508130612.82270-2-markus.burri@mt.com Cc: Signed-off-by: Jonathan Cameron commit 8a48e35becb214743214f5504e726c3ec131cd6d Author: Krzysztof Kozlowski Date: Tue May 20 13:13:26 2025 +0200 drm/msm/dsi/dsi_phy_10nm: Fix missing initial VCO rate Driver unconditionally saves current state on first init in dsi_pll_10nm_init(), but does not save the VCO rate, only some of the divider registers. The state is then restored during probe/enable via msm_dsi_phy_enable() -> msm_dsi_phy_pll_restore_state() -> dsi_10nm_pll_restore_state(). Restoring calls dsi_pll_10nm_vco_set_rate() with pll_10nm->vco_current_rate=0, which basically overwrites existing rate of VCO and messes with clock hierarchy, by setting frequency to 0 to clock tree. This makes anyway little sense - VCO rate was not saved, so should not be restored. If PLL was not configured configure it to minimum rate to avoid glitches and configuring entire in clock hierarchy to 0 Hz. Suggested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/sz4kbwy5nwsebgf64ia7uq4ee7wbsa5uy3xmlqwcstsbntzcov@ew3dcyjdzmi2/ Signed-off-by: Krzysztof Kozlowski Fixes: a4ccc37693a2 ("drm/msm/dsi_pll_10nm: restore VCO rate during Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/654796/ Link: https://lore.kernel.org/r/20250520111325.92352-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Baryshkov commit 146e87f3e11de0dfa091ff87e34b4bc6eec761a4 Author: James A. MacInnes Date: Wed Feb 12 15:03:47 2025 -0800 drm/msm/disp: Correct porch timing for SDM845 Type-C DisplayPort inoperable due to incorrect porch settings. - Re-used wide_bus_en as flag to prevent porch shifting Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: James A. MacInnes Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/636945/ Link: https://lore.kernel.org/r/20250212-sdm845_dp-v2-2-4954e51458f4@gmail.com Signed-off-by: Dmitry Baryshkov commit 83c4c67076c209787515e06fffd41dd0bdab09b9 Author: James A. MacInnes Date: Wed Feb 12 15:03:46 2025 -0800 drm/msm/dp: Disable wide bus support for SDM845 When widebus was enabled for DisplayPort in commit c7c412202623 ("drm/msm/dp: enable widebus on all relevant chipsets") it was clarified that it is only supported on DPU 5.0.0 onwards which includes SC7180 on DPU revision 6.2. However, this patch missed that the description structure for SC7180 is also reused for SDM845 (because of identical io_start address) which is only DPU 4.0.0, leading to a wrongly enbled widebus feature and corruption on that platform. Create a separate msm_dp_desc_sdm845 structure for this SoC compatible, with the wide_bus_supported flag turned off. Fixes: c7c412202623 ("drm/msm/dp: enable widebus on all relevant chipsets") Signed-off-by: James A. MacInnes [DB: reworded commit text following Marijn's suggestion] Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/636944/ Link: https://lore.kernel.org/r/20250212-sdm845_dp-v2-1-4954e51458f4@gmail.com Signed-off-by: Dmitry Baryshkov commit 2b74aea6d078ade810a3b0f7d1bcfcba2eaad416 Author: Dan Carpenter Date: Fri Jun 6 12:04:14 2025 +0300 spi: spi-pci1xxxx: Fix error code in probe Return the error code if pci_alloc_irq_vectors() fails. Don't return success. Fixes: b4608e944177 ("spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts") Signed-off-by: Dan Carpenter Reviewed-by: Thangaraj Samynathan Link: https://patch.msgid.link/aEKvDrUxD19GWi0u@stanley.mountain Signed-off-by: Mark Brown commit 1dd630088332b5b310f3dd7eaacae9f3c4465651 Author: Huacai Chen Date: Sun Jun 8 22:29:39 2025 +0800 spi: loongson: Fix build warnings about export.h After commit a934a57a42f64a4 ("scripts/misc-check: check missing #include when W=1") and 7d95680d64ac8e836c ("scripts/misc-check: check unnecessary #include when W=1"), we get some build warnings with W=1: drivers/spi/spi-loongson-core.c: warning: EXPORT_SYMBOL() is used, but #include is missing So fix these build warnings for SPI/Loongson. Signed-off-by: Huacai Chen Link: https://patch.msgid.link/20250608142939.172108-1-chenhuacai@loongson.cn Signed-off-by: Mark Brown commit 10c24e0d2f7cd2bc8a847cf750f01301ce67dbc8 Author: Félix Piédallu Date: Fri Jun 6 15:37:25 2025 +0200 spi: omap2-mcspi: Disable multi-mode when the previous message kept CS asserted When the last transfer of a SPI message has the cs_change flag, the CS is kept asserted after the message. The next message can't use multi-mode because the CS will be briefly deasserted before the first transfer. Remove the early exit of the list_for_each_entry because the last transfer actually needs to be always checked. Fixes: d153ff4056cb ("spi: omap2-mcspi: Add support for MULTI-mode") Signed-off-by: Félix Piédallu Link: https://patch.msgid.link/20250606-cs_change_fix-v1-2-27191a98a2e5@non.se.com Signed-off-by: Mark Brown commit a5bf5272295d3f058adeee025d2a0b6625f8ba7b Author: Félix Piédallu Date: Fri Jun 6 15:37:24 2025 +0200 spi: omap2-mcspi: Disable multi mode when CS should be kept asserted after message When the last transfer of a SPI message has the cs_change flag, the CS is kept asserted after the message. Multi-mode can't respect this as CS is deasserted by the hardware at the end of the message. Disable multi-mode when not applicable to the current message. Fixes: d153ff4056cb ("spi: omap2-mcspi: Add support for MULTI-mode") Signed-off-by: Félix Piédallu Link: https://patch.msgid.link/20250606-cs_change_fix-v1-1-27191a98a2e5@non.se.com Signed-off-by: Mark Brown commit 06118ae36855b7d3d22688298e74a766ccf0cb7a Author: Dan Carpenter Date: Tue May 27 08:44:14 2025 +0300 regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt() There is a missing call to of_node_put() if devm_kcalloc() fails. Fix this by changing the code to use cleanup.h magic to drop the refcount. Fixes: 6b0cd72757c6 ("regulator: max20086: fix invalid memory access") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aDVRLqgJWMxYU03G@stanley.mountain Reviewed-by: Laurent Pinchart Signed-off-by: Mark Brown commit a4e469c1e2e0ec7f08fff9ed29f5500f187ba9f2 Author: Huacai Chen Date: Sun Jun 8 22:27:37 2025 +0800 ASoC: loongson: Fix build warnings about export.h After commit 25704938c86d7b2 ("scripts/misc-check: check missing #include when W=1") and 1239f681359926101e ("scripts/misc-check: check unnecessary #include when W=1"), we get some build warnings with W=1: sound/soc/loongson/loongson_i2s.c: warning: EXPORT_SYMBOL() is used, but #include is missing So fix these build warnings for ASoC/Loongson. Signed-off-by: Huacai Chen Link: https://patch.msgid.link/20250608142737.168829-1-chenhuacai@loongson.cn Signed-off-by: Mark Brown commit b44b2694005b501b2eaeb56aa778f3ca22de4659 Author: Zhang Yi Date: Wed Jun 4 14:18:21 2025 +0800 ASoC: codecs: ES8326: Modify initialization configuration Modify the value of ES8326_SDINOUT1_IO in the initialization Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250604061821.2678-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 22188b9df60dde48eaba276da22062aaf8e12dfe Author: Harshit Mogalapalli Date: Tue Jun 3 14:48:13 2025 -0700 ASoC: cs48l32: Fix a signedness bug in cs48l32_hw_params() There is a type promotion that can happen when freq(u32) variable is comapared with sclk_target(integer), when sclk_target is a negative value it promotes to a large postive integer which might not be a problem in this particular case as the condition evaluates to false when that happens, but bail out early when sclk_target has negative error codes. cs48l32_sclk_rates[i].freq >= sclk_target Fix this by adding a negative error check when snd_soc_tdm_params_to_bclk() fails Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Harshit Mogalapalli Link: https://patch.msgid.link/20250603214813.197346-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Richard Fitzgerald Signed-off-by: Mark Brown commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 Author: Linus Torvalds Date: Sun Jun 8 13:44:43 2025 -0700 Linux 6.16-rc1 commit 939f15e640f193616691d3bcde0089760e75b0d3 Merge: be54f8c558027a 42fd37dcc432df Author: Linus Torvalds Date: Sun Jun 8 11:44:41 2025 -0700 Merge tag 'turbostat-2025.06.08' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: - Add initial DMR support, which required smarter RAPL probe - Fix AMD MSR RAPL energy reporting - Add RAPL power limit configuration output - Minor fixes * tag 'turbostat-2025.06.08' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2025.06.08 tools/power turbostat: Add initial support for BartlettLake tools/power turbostat: Add initial support for DMR tools/power turbostat: Dump RAPL sysfs info tools/power turbostat: Avoid probing the same perf counters tools/power turbostat: Allow probing RAPL with platform_features->rapl_msrs cleared tools/power turbostat: Clean up add perf/msr counter logic tools/power turbostat: Introduce add_msr_counter() tools/power turbostat: Remove add_msr_perf_counter_() tools/power turbostat: Remove add_cstate_perf_counter_() tools/power turbostat: Remove add_rapl_perf_counter_() tools/power turbostat: Quit early for unsupported RAPL counters tools/power turbostat: Always check rapl_joules flag tools/power turbostat: Fix AMD package-energy reporting tools/power turbostat: Fix RAPL_GFX_ALL typo tools/power turbostat: Add Android support for MSR device handling tools/power turbostat.8: pm_domain wording fix tools/power turbostat.8: fix typo: idle_pct should be pct_idle commit be54f8c558027a218423134dd9b8c7c46d92204a Merge: 0529ef8c36d74a 41cb08555c4164 Author: Linus Torvalds Date: Sun Jun 8 11:33:00 2025 -0700 Merge tag 'timers-cleanups-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer cleanup from Thomas Gleixner: "The delayed from_timer() API cleanup: The renaming to the timer_*() namespace was delayed due massive conflicts against Linux-next. Now that everything is upstream finish the conversion" * tag 'timers-cleanups-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: treewide, timers: Rename from_timer() to timer_container_of() commit 0529ef8c36d74a05e929ea4adbdecd2c3393b0bb Merge: 4710eacf8daef2 dd2922dcfaa329 Author: Linus Torvalds Date: Sun Jun 8 11:27:20 2025 -0700 Merge tag 'x86-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A small set of x86 fixes: - Cure IO bitmap inconsistencies A failed fork cleans up all resources of the newly created thread via exit_thread(). exit_thread() invokes io_bitmap_exit() which does the IO bitmap cleanups, which unfortunately assume that the cleanup is related to the current task, which is obviously bogus. Make it work correctly - A lockdep fix in the resctrl code removed the clearing of the command buffer in two places, which keeps stale error messages around. Bring them back. - Remove unused trace events" * tag 'x86-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fs/resctrl: Restore the rdt_last_cmd_clear() calls after acquiring rdtgroup_mutex x86/iopl: Cure TIF_IO_BITMAP inconsistencies x86/fpu: Remove unused trace events commit 4710eacf8daef2c6bbb18fbad95ef60603b685ac Merge: d9864e7d151194 434d7f9b0e24e1 Author: Linus Torvalds Date: Sun Jun 8 11:25:13 2025 -0700 Merge tag 'timers-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "Add the missing seq_file forward declaration in the timer namespace header" * tag 'timers-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timens: Add struct seq_file forward declaration commit 42fd37dcc432df1ea1987232d41bb84fcb7e150c Author: Len Brown Date: Sun Jun 8 12:31:59 2025 -0400 tools/power turbostat: version 2025.06.08 Add initial DMR support, which required smarter RAPL probe Fix AMD MSR RAPL energy reporting Add RAPL power limit configuration output Minor fixes Signed-off-by: Len Brown commit d8c0f5d973004f2ac86375ea54fae9625ac594fb Author: Zhang Rui Date: Fri Apr 18 14:04:26 2025 +0800 tools/power turbostat: Add initial support for BartlettLake Add initial support for BartlettLake. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 83075bd59de25f5c9238a583008540914946f23e Author: Zhang Rui Date: Mon Mar 4 14:54:40 2024 +0800 tools/power turbostat: Add initial support for DMR Add initial support for DMR. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 2a535d6cc3b4831cc6dc7e248f2fb4afeeec591d Author: Zhang Rui Date: Fri May 30 14:01:31 2025 +0800 tools/power turbostat: Dump RAPL sysfs info for example: intel-rapl:1: psys 28.0s:100W 976.0us:100W intel-rapl:0: package-0 28.0s:57W,max:15W 2.4ms:57W intel-rapl:0/intel-rapl:0:0: core disabled intel-rapl:0/intel-rapl:0:1: uncore disabled intel-rapl-mmio:0: package-0 28.0s:28W,max:15W 2.4ms:57W [lenb: simplified format] Signed-off-by: Zhang Rui Signed-off-by: Len Brown squish me Signed-off-by: Len Brown commit 69078520fdf1525212a23a80dc79e1a75f2062f6 Author: Zhang Rui Date: Fri May 30 08:09:28 2025 +0800 tools/power turbostat: Avoid probing the same perf counters For the RAPL package energy status counter, Intel and AMD share the same perf_subsys and perf_name, but with different MSR addresses. Both rapl_counter_arch_infos[0] and rapl_counter_arch_infos[1] are introduced to describe this counter for different Vendors. As a result, the perf counter is probed twice, and causes a failure in in get_rapl_counters() because expected_read_size and actual_read_size don't match. Fix the problem by skipping the already probed counter. Note, this is not a perfect fix. For example, if different vendors/platforms use the same MSR value for different purpose, the code can be fooled when it probes a rapl_counter_arch_infos[] entry that does not belong to the running Vendor/Platform. In a long run, better to put rapl_counter_arch_infos[] into the platform_features so that this becomes Vendor/Platform specific. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit ff3d019e98db83ce2b5eb395333bc2518b37f4f0 Author: Zhang Rui Date: Sat May 17 17:44:50 2025 +0800 tools/power turbostat: Allow probing RAPL with platform_features->rapl_msrs cleared platform_features->rapl_msrs describes the RAPL MSRs supported. While RAPL Perf counters can be exposed from different kernel backend drivers, e.g. RAPL MSR I/F driver, or RAPL TPMI I/F driver. Thus, turbostat should first blindly probe all the available RAPL Perf counters, and falls back to the RAPL MSR counters if they are listed in platform_features->rapl_msrs. With this, platforms that don't have RAPL MSRs can clear the platform_features->rapl_msrs bits and use RAPL Perf counters only. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 0362337968ad252e6563fff131906a43450d8940 Author: Zhang Rui Date: Sat May 17 17:35:17 2025 +0800 tools/power turbostat: Clean up add perf/msr counter logic Increase the code readability by moving the no_perf/no_msr flag and the cai->perf_name/cai->msr sanity checks into the counter probe functions. No functional change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 1ab2e19b4c52ee08700938d52024d85bd15c9721 Author: Zhang Rui Date: Sat May 17 15:58:51 2025 +0800 tools/power turbostat: Introduce add_msr_counter() probe_rapl_msr() is reused for probing RAPL MSR counters, cstate MSR counters and MPERF/APERF/SMI MSR counters, thus its name is misleading. Similar to add_perf_counter(), introduce add_msr_counter() to probe a counter via MSR. Introduce wrapper function add_rapl_msr_counter() at the same time to add extra check for Zero return value for specified RAPL counters. No functional change intended. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 3403e89f97ce71e473a5128ea389cb83bc27e7a9 Author: Zhang Rui Date: Sat May 17 17:40:08 2025 +0800 tools/power turbostat: Remove add_msr_perf_counter_() As the only caller of add_msr_perf_counter_(), add_msr_perf_counter() just gives extra debug output on top. There is no need to keep both functions. Remove add_msr_perf_counter_() and move all the logic to add_msr_perf_counter(). No functional change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 4d6ced7bef959701533d1e5c003872e837318e38 Author: Zhang Rui Date: Sat May 17 15:43:59 2025 +0800 tools/power turbostat: Remove add_cstate_perf_counter_() As the only caller of add_cstate_perf_counter_(), add_cstate_perf_counter() just gives extra debug output on top. There is no need to keep both functions. Remove add_cstate_perf_counter_() and move all the logic to add_cstate_perf_counter(). No functional change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit c8bca955da22269db80576c676eb50a5ef156832 Author: Zhang Rui Date: Sat May 17 12:06:22 2025 +0800 tools/power turbostat: Remove add_rapl_perf_counter_() As the only caller of add_rapl_perf_counter_(), add_rapl_perf_counter() just gives extra debug output on top. There is no need to keep both functions. Remove add_rapl_perf_counter_() and move all the logic to add_rapl_perf_counter(). No functional change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 57b53787f0f7845eb30aedde75464aca37906985 Author: Zhang Rui Date: Sat May 17 10:26:14 2025 +0800 tools/power turbostat: Quit early for unsupported RAPL counters Quit early for unsupported RAPL counters. No functional change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit fdea6b883b05b101b6e85674e1c3f58234229bfa Author: Zhang Rui Date: Fri May 30 14:00:33 2025 +0800 tools/power turbostat: Always check rapl_joules flag rapl_joules bit should always be checked even if platform_features->rapl_msrs is not set or no_msr flag is used. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit adb49732c8c63665dd3476e8e6b7c67a0f851245 Author: Gautham R. Shenoy Date: Thu May 29 17:18:25 2025 +0530 tools/power turbostat: Fix AMD package-energy reporting commit 05a2f07db888 ("tools/power turbostat: read RAPL counters via perf") that adds support to read RAPL counters via perf defines the notion of a RAPL domain_id which is set to physical_core_id on platforms which support per_core_rapl counters (Eg: AMD processors Family 17h onwards) and is set to the physical_package_id on all the other platforms. However, the physical_core_id is only unique within a package and on platforms with multiple packages more than one core can have the same physical_core_id and thus the same domain_id. (For eg, the first cores of each package have the physical_core_id = 0). This results in all these cores with the same physical_core_id using the same entry in the rapl_counter_info_perdomain[]. Since rapl_perf_init() skips the perf-initialization for cores whose domain_ids have already been visited, cores that have the same physical_core_id always read the perf file corresponding to the physical_core_id of the first package and thus the package-energy is incorrectly reported to be the same value for different packages. Note: This issue only arises when RAPL counters are read via perf and not when they are read via MSRs since in the latter case the MSRs are read separately on each core. Fix this issue by associating each CPU with rapl_core_id which is unique across all the packages in the system. Fixes: 05a2f07db888 ("tools/power turbostat: read RAPL counters via perf") Signed-off-by: Gautham R. Shenoy Signed-off-by: Len Brown commit b4a734d3839971f590ce8c435ea5b0d3762b37a8 Author: Kaushlendra Kumar Date: Fri May 23 13:36:59 2025 +0530 tools/power turbostat: Fix RAPL_GFX_ALL typo Fix typo in the currently unused RAPL_GFX_ALL macro definition. Signed-off-by: Kaushlendra Kumar Signed-off-by: Len Brown commit 5663785ae02f66acf64f285a40e35abd21b8a7b2 Author: Kaushlendra Kumar Date: Thu May 22 14:19:46 2025 +0530 tools/power turbostat: Add Android support for MSR device handling It uses /dev/msrN device paths on Android instead of /dev/cpu/N/msr, updates error messages and permission checks to reflect the Android device path, and wraps platform-specific code with #if defined(ANDROID) to ensure correct behavior on both Android and non-Android systems. These changes improve compatibility and usability of turbostat on Android devices. Signed-off-by: Kaushlendra Kumar Signed-off-by: Len Brown commit c967900fcb00927c1758c16130be5cd771993198 Author: Len Brown Date: Fri Apr 18 17:54:39 2025 -0400 tools/power turbostat.8: pm_domain wording fix turbostat.8: clarify that uncore "domains" are Power Management domains, aka pm_domains. Signed-off-by: Len Brown commit 394c1127abd9e8ee829bbfaddb959728d60b0cdc Author: Len Brown Date: Wed Apr 9 00:06:24 2025 -0400 tools/power turbostat.8: fix typo: idle_pct should be pct_idle idle_pct should be pct_idle Signed-off-by: Len Brown commit d9864e7d151194b06c6cdbee8e69f0686238313a Merge: 70b7d651ca6e0d 86aa94cd50b138 Author: Linus Torvalds Date: Sun Jun 8 11:07:33 2025 -0700 Merge tag 'perf-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fix from Thomas Gleixner: "A single fix for the x86 performance counters on Intel CPUs: The MSR offset calculations for fixed performance counters are stored at the wrong index in the configuration array causing the general purpose counter MSR offset to be overwritten, so both the general purpose and the fixed counters offsets are incorrect. Correct the array index calculation to fix that" * tag 'perf-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix incorrect MSR index calculations in intel_pmu_config_acr() commit 70b7d651ca6e0d37cbfd60929b7fdb55ce66d41f Merge: 35b574a6c2279f 9cc82d99b13c1a Author: Linus Torvalds Date: Sun Jun 8 11:02:53 2025 -0700 Merge tag 'irq-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix for the PCI/MSI code: The conversion to per device MSI domains created a MSI domain with size 1 instead of sizing it to the maximum possible number of MSI interrupts for the device. This "worked" as the subsequent allocations resized the domain, but the recent change to move the prepare() call into the domain creation path broke this works by chance mechanism. Size the domain properly at creation time" * tag 'irq-urgent-2025-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI/MSI: Size device MSI domain with the maximum number of vectors commit 35b574a6c2279fe47d13ffafb8389f1adc87a1d1 Merge: 522cd6acd250de 12f147ddd6de73 Author: Linus Torvalds Date: Sun Jun 8 10:35:12 2025 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount fixes from Al Viro: "Various mount-related bugfixes: - split the do_move_mount() checks in subtree-of-our-ns and entire-anon cases and adapt detached mount propagation selftest for mount_setattr - allow clone_private_mount() for a path on real rootfs - fix a race in call of has_locked_children() - fix move_mount propagation graph breakage by MOVE_MOUNT_SET_GROUP - make sure clone_private_mnt() caller has CAP_SYS_ADMIN in the right userns - avoid false negatives in path_overmount() - don't leak MNT_LOCKED from parent to child in finish_automount() - do_change_type(): refuse to operate on unmounted/not ours mounts" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do_change_type(): refuse to operate on unmounted/not ours mounts clone_private_mnt(): make sure that caller has CAP_SYS_ADMIN in the right userns selftests/mount_setattr: adapt detached mount propagation test do_move_mount(): split the checks in subtree-of-our-ns and entire-anon cases fs: allow clone_private_mount() for a path on real rootfs fix propagation graph breakage by MOVE_MOUNT_SET_GROUP move_mount(2) finish_automount(): don't leak MNT_LOCKED from parent to child path_overmount(): avoid false negatives fs/fhandle.c: fix a race in call of has_locked_children() commit 522cd6acd250dea76afaabc52e028fef280fd753 Merge: 538c429a4b430e 8e9d6efccdd728 Author: Linus Torvalds Date: Sun Jun 8 10:20:21 2025 -0700 Merge tag '6.16-rc-part2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull more smb client updates from Steve French: - multichannel/reconnect fixes - move smbdirect (smb over RDMA) defines to fs/smb/common so they will be able to be used in the future more broadly, and a documentation update explaining setting up smbdirect mounts - update email address for Paulo * tag '6.16-rc-part2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal version number MAINTAINERS, mailmap: Update Paulo Alcantara's email address cifs: add documentation for smbdirect setup cifs: do not disable interface polling on failure cifs: serialize other channels when query server interfaces is pending cifs: deal with the channel loading lag while picking channels smb: client: make use of common smbdirect_socket_parameters smb: smbdirect: introduce smbdirect_socket_parameters smb: client: make use of common smbdirect_socket smb: smbdirect: add smbdirect_socket.h smb: client: make use of common smbdirect.h smb: smbdirect: add smbdirect.h with public structures smb: client: make use of common smbdirect_pdu.h smb: smbdirect: add smbdirect_pdu.h with protocol definitions commit 538c429a4b430ef70f428d2d1755ac51724d3245 Merge: 8630c59e99363c 549e914c96ae67 Author: Linus Torvalds Date: Sun Jun 8 08:19:01 2025 -0700 Merge tag 'trace-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull more tracing fixes from Steven Rostedt: - Fix regression of waiting a long time on updating trace event filters When the faultable trace points were added, it needed task trace RCU synchronization. This was added to the tracepoint_synchronize_unregister() function. The filter logic always called this function whenever it updated the trace event filters before freeing the old filters. This increased the time of "trace-cmd record" from taking 13 seconds to running over 2 minutes to complete. Move the freeing of the filters to call_rcu*() logic, which brings the time back down to 13 seconds. - Fix ring_buffer_subbuf_order_set() error path lock protection The error path of the ring_buffer_subbuf_order_set() released the mutex too early and allowed subsequent accesses to setting the subbuffer size to corrupt the data and cause a bug. By moving the mutex locking to the end of the error path, it prevents the reentrant access to the critical data and also allows the function to convert the taking of the mutex over to the guard() logic. - Remove unused power management clock events The clock events were added in 2010 for power management. In 2011 arm used them. In 2013 the code they were used in was removed. These events have been wasting memory since then. - Fix sparse warnings There was a few places that sparse warned about trace_events_filter.c where file->filter was referenced directly, but it is annotated with an __rcu tag. Use the helper functions and fix them up to use rcu_dereference() properly. * tag 'trace-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Add rcu annotation around file->filter accesses tracing: PM: Remove unused clock events ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set() tracing: Fix regression of filter waiting a long time on RCU synchronization commit 41cb08555c4164996d67c78b3bf1c658075b75f1 Author: Ingo Molnar Date: Fri May 9 07:51:14 2025 +0200 treewide, timers: Rename from_timer() to timer_container_of() Move this API to the canonical timer_*() namespace. [ tglx: Redone against pre rc1 ] Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com commit 8630c59e99363c4b655788fd01134aef9bcd9264 Merge: b3154a6ff1f53b c50a04f8f45c7f Author: Linus Torvalds Date: Sat Jun 7 10:05:35 2025 -0700 Merge tag 'kbuild-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Add support for the EXPORT_SYMBOL_GPL_FOR_MODULES() macro, which exports a symbol only to specified modules - Improve ABI handling in gendwarfksyms - Forcibly link lib-y objects to vmlinux even if CONFIG_MODULES=n - Add checkers for redundant or missing inclusion - Deprecate the extra-y syntax - Fix a genksyms bug when including enum constants from *.symref files * tag 'kbuild-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (28 commits) genksyms: Fix enum consts from a reference affecting new values arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds kbuild: set y instead of 1 to KBUILD_{BUILTIN,MODULES} efi/libstub: use 'targets' instead of extra-y in Makefile module: make __mod_device_table__* symbols static scripts/misc-check: check unnecessary #include when W=1 scripts/misc-check: check missing #include when W=1 scripts/misc-check: add double-quotes to satisfy shellcheck kbuild: move W=1 check for scripts/misc-check to top-level Makefile scripts/tags.sh: allow to use alternative ctags implementation kconfig: introduce menu type enum docs: symbol-namespaces: fix reST warning with literal block kbuild: link lib-y objects to vmlinux forcibly even when CONFIG_MODULES=n tinyconfig: enable CONFIG_LD_DEAD_CODE_DATA_ELIMINATION docs/core-api/symbol-namespaces: drop table of contents and section numbering modpost: check forbidden MODULE_IMPORT_NS("module:") at compile time kbuild: move kbuild syntax processing to scripts/Makefile.build Makefile: remove dependency on archscripts for header installation Documentation/kbuild: Add new gendwarfksyms kABI rules Documentation/kbuild: Drop section numbers ... commit b3154a6ff1f53b794c01096577700f35b1be9cc2 Merge: b7191581a973ab 8a3682601ddaa4 Author: Linus Torvalds Date: Sat Jun 7 10:00:03 2025 -0700 Merge tag 'sh-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: - replace the __ASSEMBLY__ with __ASSEMBLER__ macro in all headers since the latter is now defined automatically by both GCC and Clang when compiling assembly code (Thomas Huth) - set the default SPI mode for the ecovec24 board which became necessary after a new mode member as added to the sh_msiof_spi_info struct in cf9e4784f3bd ("spi: sh-msiof: Add slave mode support") (Geert Uytterhoeven) - remove unused variables in the kprobes code in kprobe_exceptions_notify() (Mike Rapoport) * tag 'sh-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: kprobes: Remove unused variables in kprobe_exceptions_notify() sh: ecovec24: Make SPI mode explicit sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers commit b7191581a973ab2fca45d2ca64416065f1660ae0 Merge: af477f4d5a6c18 f78fb2576f22b0 Author: Linus Torvalds Date: Sat Jun 7 09:56:18 2025 -0700 Merge tag 'loongarch-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Adjust the 'make install' operation - Support SCHED_MC (Multi-core scheduler) - Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS - Enable HAVE_ARCH_STACKLEAK - Increase max supported CPUs up to 2048 - Introduce the numa_memblks conversion - Add PWM controller nodes in dts - Some bug fixes and other small changes * tag 'loongarch-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: platform/loongarch: laptop: Unregister generic_sub_drivers on exit platform/loongarch: laptop: Add backlight power control support platform/loongarch: laptop: Get brightness setting from EC on probe LoongArch: dts: Add PWM support to Loongson-2K2000 LoongArch: dts: Add PWM support to Loongson-2K1000 LoongArch: dts: Add PWM support to Loongson-2K0500 LoongArch: vDSO: Correctly use asm parameters in syscall wrappers LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset() LoongArch: Preserve firmware configuration when desired LoongArch: Avoid using $r0/$r1 as "mask" for csrxchg LoongArch: Introduce the numa_memblks conversion LoongArch: Increase max supported CPUs up to 2048 LoongArch: Enable HAVE_ARCH_STACKLEAK LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS LoongArch: Add SCHED_MC (Multi-core scheduler) support LoongArch: Add some annotations in archhelp LoongArch: Using generic scripts/install.sh in `make install` LoongArch: Add a default install.sh commit af477f4d5a6c183e2dd44f49dd9a7950bfa7bd50 Merge: 5b032cac622533 10db9528524074 Author: Linus Torvalds Date: Sat Jun 7 09:40:08 2025 -0700 Merge tag 'sound-fix-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fix patches for the 6.16-rc1 merge window. Most of changes are about ASoC, especially lots of AVS driver fixes. Larger LOCs are seen in TAS571x codec drivers, but the changes are trivial and safe. The rest are all device-specific small fixes" * tag 'sound-fix-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits) ASoC: Intel: avs: boards: Fix rt5663 front end name ASoC: Intel: avs: Simplify verification of parse_int_array() result ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1 ALSA: hda: Ignore unsol events for cards being shut down ALSA: hda: Add new pci id for AMD GPU display HD audio controller ALSA: hda: cs35l41: Constify regmap_irq_chip ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init ASoC: pcm: Do not open FEs with no BEs connected ASoC: rt1320: fix speaker noise when volume bar is 100% ASoC: Intel: avs: Include missing string.h ASoC: Intel: avs: Verify content returned by parse_int_array() ASoC: Intel: avs: Verify kcalloc() status when setting constraints ASoC: Intel: avs: Fix paths in MODULE_FIRMWARE hints ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw ASoC: Intel: avs: Fix PPLCxFMT calculation ASoC: Intel: avs: Fix deadlock when the failing IPC is SET_D0IX ASoC: codecs: hda: Fix RPM usage count underflow ASoC: amd: yc: Add support for Lenovo Yoga 7 16ARP8 ASoC: tas571x: fix tas5733 num_controls ... commit f3fe49dbddd73f0155a8935af47cb63693069dbe Author: Miaoqing Pan Date: Wed Jun 4 13:52:50 2025 +0800 wifi: ath12k: fix uaf in ath12k_core_init() When the execution of ath12k_core_hw_group_assign() or ath12k_core_hw_group_create() fails, the registered notifier chain is not unregistered properly. Its memory is freed after rmmod, which may trigger to a use-after-free (UAF) issue if there is a subsequent access to this notifier chain. Fixes the issue by calling ath12k_core_panic_notifier_unregister() in failure cases. Call trace: notifier_chain_register+0x4c/0x1f0 (P) atomic_notifier_chain_register+0x38/0x68 ath12k_core_init+0x50/0x4e8 [ath12k] ath12k_pci_probe+0x5f8/0xc28 [ath12k] pci_device_probe+0xbc/0x1a8 really_probe+0xc8/0x3a0 __driver_probe_device+0x84/0x1b0 driver_probe_device+0x44/0x130 __driver_attach+0xcc/0x208 bus_for_each_dev+0x84/0x100 driver_attach+0x2c/0x40 bus_add_driver+0x130/0x260 driver_register+0x70/0x138 __pci_register_driver+0x68/0x80 ath12k_pci_init+0x30/0x68 [ath12k] ath12k_init+0x28/0x78 [ath12k] Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 6f245ea0ec6c ("wifi: ath12k: introduce device group abstraction") Signed-off-by: Miaoqing Pan Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20250604055250.1228501-1-miaoqing.pan@oss.qualcomm.com Signed-off-by: Jeff Johnson commit b6bca6d7149e0bc1a56e831af0296d45688945ec Author: Jeff Johnson Date: Thu Jun 5 10:27:22 2025 -0700 wifi: ath12k: Fix hal_reo_cmd_status kernel-doc Currently a warning is reported when running: % scripts/kernel-doc -Wall -Werror -none drivers/net/wireless/ath/ath12k/hal.h Warning: drivers/net/wireless/ath/ath12k/hal.h:596 Enum value 'HAL_REO_CMD_RESOURCE_BLOCKED' not described in enum 'hal_reo_cmd_status' Add the missing description of HAL_REO_CMD_RESOURCE_BLOCKED. Link: https://patch.msgid.link/20250605-hal_reo_cmd_status-kdoc-v1-1-e59f4b814b88@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 7588a893cde5385ad308400ff167d29a29913b3a Author: Baochen Qiang Date: Fri May 23 10:23:05 2025 +0800 wifi: ath12k: fix GCC_GCC_PCIE_HOT_RST definition for WCN7850 GCC_GCC_PCIE_HOT_RST is wrongly defined for WCN7850, causing kernel crash on some specific platforms. Since this register is divergent for WCN7850 and QCN9274, move it to register table to allow different definitions. Then correct the register address for WCN7850 to fix this issue. Note IPQ5332 is not affected as it is not PCIe based device. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Reported-by: Parth Pancholi Closes: https://lore.kernel.org/all/86899b2235a59c9134603beebe08f2bb0b244ea0.camel@gmail.com Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Tested-by: Parth Pancholi Link: https://patch.msgid.link/20250523-ath12k-wrong-global-reset-addr-v1-1-3b06eb556196@quicinc.com Signed-off-by: Jeff Johnson commit b0d226a60856a1b765bb9a3848c7b2322fd08c47 Author: Rodrigo Gobbi Date: Thu May 22 17:01:12 2025 -0300 wifi: ath11k: validate ath11k_crypto_mode on top of ath11k_core_qmi_firmware_ready if ath11k_crypto_mode is invalid (not ATH11K_CRYPT_MODE_SW/ATH11K_CRYPT_MODE_HW), ath11k_core_qmi_firmware_ready() will not undo some actions that was previously started/configured. Do the validation as soon as possible in order to avoid undoing actions in that case and also to fix the following smatch warning: drivers/net/wireless/ath/ath11k/core.c:2166 ath11k_core_qmi_firmware_ready() warn: missing unwind goto? Signed-off-by: Rodrigo Gobbi Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202304151955.oqAetVFd-lkp@intel.com/ Fixes: aa2092a9bab3 ("ath11k: add raw mode and software crypto support") Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20250522200519.16858-1-rodrigo.gobbi.7@gmail.com Signed-off-by: Jeff Johnson commit 29e2adf2ef2966379bd3fe002530b10dfc3030ba Author: Baochen Qiang Date: Thu Feb 20 16:24:48 2025 +0800 wifi: ath11k: consistently use ath11k_mac_get_fw_stats() Currently to get firmware stats, ath11k_mac_op_get_txpower() calls ath11k_fw_stats_request() and ath11k_mac_op_sta_statistics() calls ath11k_mac_get_fw_stats(). Those two helpers are basically doing the same, except for: 1. ath11k_mac_get_fw_stats() verifies ar->state inside itself. 2. ath11k_mac_get_fw_stats() calls ath11k_mac_fw_stats_request() which then calls ath11k_mac_fw_stats_reset() to free pdev/vdev stats whereas only pdev stats are freed by ath11k_fw_stats_request(). 3. ath11k_mac_get_fw_stats() waits for ar->fw_stats_complete and ar->fw_stats_done, whereas ath11k_fw_stats_request() only waits for ar->fw_stats_complete. Change to call ath11k_mac_get_fw_stats() in ath11k_mac_op_get_txpower(). This is valid because: 1. ath11k_mac_op_get_txpower() also has the same request on ar->state. 2. it is harmless to call ath11k_fw_stats_vdevs_free() since ar->fw_stats.vdevs should be empty and there should be no one expecting it at that time. 3. ath11k_mac_op_get_txpower() only needs pdev stats. For pdev stats, ar->fw_stats_done is set to true whenever ar->fw_stats_complete is set to true in ath11k_update_stats_event(). So additional wait on ar->fw_stats_done does not wast any time. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-8-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit c5b92a2c18938ebb08e8d4062408ab1524da31c3 Author: Baochen Qiang Date: Thu Feb 20 16:24:47 2025 +0800 wifi: ath11k: move locking outside of ath11k_mac_get_fw_stats() Currently ath11k_mac_get_fw_stats() is acquiring/releasing ar->conf_mutex by itself. In order to reuse this function in a context where that lock is already taken, move lock handling to its callers, then the function itself only has to assert it. There is only one caller now, i.e., ath11k_mac_op_sta_statistics(), so add lock handling there. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-7-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 81f64165c9dc2d9b070d8240dd369974ebe188d3 Author: Baochen Qiang Date: Thu Feb 20 16:24:46 2025 +0800 wifi: ath11k: adjust unlock sequence in ath11k_update_stats_event() Currently RCU lock and ar->data_lock are acquired in a sequence of rcu_read_lock() spin_lock_bh(&ar->data_lock) but released in a sequence of rcu_read_unlock() spin_unlock_bh(&ar->data_lock) Although there are no apparent issues with this, reorder them to achieve symmetry. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Signed-off-by: Baochen Qiang Acked-by: Kalle Valo Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-6-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 72610ed7d79da17ee09102534d6c696a4ea8a08e Author: Baochen Qiang Date: Thu Feb 20 16:24:45 2025 +0800 wifi: ath11k: move some firmware stats related functions outside of debugfs Commit b488c766442f ("ath11k: report rssi of each chain to mac80211 for QCA6390/WCN6855") and commit c3b39553fc77 ("ath11k: add signal report to mac80211 for QCA6390 and WCN6855") call debugfs functions in mac ops. Those functions are no-ops if CONFIG_ATH11K_DEBUGFS is not enabled, thus cause wrong status reported. Move them to mac.c. Besides, since WMI_REQUEST_RSSI_PER_CHAIN_STAT and WMI_REQUEST_VDEV_STAT stats could also be requested via mac ops, process them directly in ath11k_update_stats_event(). Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Fixes: b488c766442f ("ath11k: report rssi of each chain to mac80211 for QCA6390/WCN6855") Fixes: c3b39553fc77 ("ath11k: add signal report to mac80211 for QCA6390 and WCN6855") Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-5-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 3b6d00fa883075dcaf49221538230e038a9c0b43 Author: Baochen Qiang Date: Thu Feb 20 16:24:44 2025 +0800 wifi: ath11k: don't wait when there is no vdev started For WMI_REQUEST_VDEV_STAT request, firmware might split response into multiple events dut to buffer limit, hence currently in ath11k_debugfs_fw_stats_process() we wait until all events received. In case there is no vdev started, this results in that below condition would never get satisfied ((++ar->fw_stats.num_vdev_recvd) == total_vdevs_started) finally the requestor would be blocked until wait time out. The same applies to WMI_REQUEST_BCN_STAT request as well due to: ((++ar->fw_stats.num_bcn_recvd) == ar->num_started_vdevs) Change to check the number of started vdev first: if it is zero, finish wait directly; if not, follow the old way. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-4-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 2bcf73b2612dda7432f2c2eaad6679bd291791f2 Author: Baochen Qiang Date: Thu Feb 20 16:24:43 2025 +0800 wifi: ath11k: don't use static variables in ath11k_debugfs_fw_stats_process() Currently ath11k_debugfs_fw_stats_process() is using static variables to count firmware stat events. Taking num_vdev as an example, if for whatever reason ( say ar->num_started_vdevs is 0 or firmware bug etc.) the following condition (++num_vdev) == total_vdevs_started is not met, is_end is not set thus num_vdev won't be cleared. Next time when firmware stats is requested again, even if everything is working fine, we will fail due to the condition above will never be satisfied. The same applies to num_bcn as well. Change to use non-static counters so that we have a chance to clear them each time firmware stats is requested. Currently only ath11k_fw_stats_request() and ath11k_debugfs_fw_stats_request() are requesting firmware stats, so clear counters there. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Fixes: da3a9d3c1576 ("ath11k: refactor debugfs code into debugfs.c") Signed-off-by: Baochen Qiang Acked-by: Kalle Valo Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-3-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 9f6e82d11bb9692a90d20b10f87345598945c803 Author: Baochen Qiang Date: Thu Feb 20 16:24:42 2025 +0800 wifi: ath11k: avoid burning CPU in ath11k_debugfs_fw_stats_request() We get report [1] that CPU is running a hot loop in ath11k_debugfs_fw_stats_request(): 94.60% 0.00% i3status [kernel.kallsyms] [k] do_syscall_64 | --94.60%--do_syscall_64 | --94.55%--__sys_sendmsg ___sys_sendmsg ____sys_sendmsg netlink_sendmsg netlink_unicast genl_rcv netlink_rcv_skb genl_rcv_msg | --94.55%--genl_family_rcv_msg_dumpit __netlink_dump_start netlink_dump genl_dumpit nl80211_dump_station | --94.55%--ieee80211_dump_station sta_set_sinfo | --94.55%--ath11k_mac_op_sta_statistics ath11k_debugfs_get_fw_stats | --94.55%--ath11k_debugfs_fw_stats_request | |--41.73%--_raw_spin_lock_bh | |--22.74%--__local_bh_enable_ip | |--9.22%--_raw_spin_unlock_bh | --6.66%--srso_alias_safe_ret This is because, if for whatever reason ar->fw_stats_done is not set by ath11k_update_stats_event(), ath11k_debugfs_fw_stats_request() won't yield CPU before an up to 3s timeout. Change to completion mechanism to avoid CPU burning. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Reported-by: Yury Vostrikov Closes: https://lore.kernel.org/all/7324ac7a-8b7a-42a5-aa19-de52138ff638@app.fastmail.com/ # [1] Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250220082448.31039-2-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson commit 593963660919a97a4546acfd706dac93625724f5 Author: Sebastian Gottschall Date: Tue Mar 4 08:21:31 2025 +0700 wil6210: fix support for sparrow chipsets the wil6210 driver irq handling code is unconditionally writing edma irq registers which are supposed to be only used on Talyn chipsets. This however leade to a chipset hang on the older sparrow chipset generation and firmware will not even boot. Fix that by simply checking for edma support before handling these registers. Tested on Netgear R9000 Signed-off-by: Sebastian Gottschall Link: https://patch.msgid.link/20250304012131.25970-2-s.gottschall@dd-wrt.com Signed-off-by: Jeff Johnson commit dc9c4252fe0d7a7f1ee904405ea91534277305bf Author: Loic Poulain Date: Thu May 22 15:17:04 2025 +0200 wifi: ath10k: Avoid vdev delete timeout when firmware is already down In some scenarios, the firmware may be stopped before the interface is removed, either due to a crash or because the remoteproc (e.g., MPSS) is shut down early during system reboot or shutdown. This leads to a delay during interface teardown, as the driver waits for a vdev delete response that never arrives, eventually timing out. Example (SNOC): $ echo stop > /sys/class/remoteproc/remoteproc0/state [ 71.64] remoteproc remoteproc0: stopped remote processor modem $ reboot [ 74.84] ath10k_snoc c800000.wifi: failed to transmit packet, dropping: -108 [ 74.84] ath10k_snoc c800000.wifi: failed to submit frame: -108 [...] [ 82.39] ath10k_snoc c800000.wifi: Timeout in receiving vdev delete response To avoid this, skip waiting for the vdev delete response if the firmware is already marked as unreachable (`ATH10K_FLAG_CRASH_FLUSH`), similar to how `ath10k_mac_wait_tx_complete()` and `ath10k_vdev_setup_sync()` handle this case. Signed-off-by: Loic Poulain Link: https://patch.msgid.link/20250522131704.612206-1-loic.poulain@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 1650d32b92b01db03a1a95d69ee74fcbc34d4b00 Author: Casey Connolly Date: Tue Mar 18 20:50:27 2025 +0000 ath10k: snoc: fix unbalanced IRQ enable in crash recovery In ath10k_snoc_hif_stop() we skip disabling the IRQs in the crash recovery flow, but we still unconditionally call enable again in ath10k_snoc_hif_start(). We can't check the ATH10K_FLAG_CRASH_FLUSH bit since it is cleared before hif_start() is called, so instead check the ATH10K_SNOC_FLAG_RECOVERY flag and skip enabling the IRQs during crash recovery. This fixes unbalanced IRQ enable splats that happen after recovering from a crash. Fixes: 0e622f67e041 ("ath10k: add support for WCN3990 firmware crash recovery") Signed-off-by: Caleb Connolly Tested-by: Loic Poulain Link: https://patch.msgid.link/20250318205043.1043148-1-caleb.connolly@linaro.org Signed-off-by: Jeff Johnson commit 549e914c96ae67760f36b9714b424dc992a0a69b Author: Steven Rostedt Date: Sat Jun 7 10:28:21 2025 -0400 tracing: Add rcu annotation around file->filter accesses Running sparse on trace_events_filter.c triggered several warnings about file->filter being accessed directly even though it's annotated with __rcu. Add rcu_dereference() around it and shuffle the logic slightly so that it's always referenced via accessor functions. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250607102821.6c7effbf@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 5b032cac622533631b8f9b7826498b7ce75001c6 Merge: bdc7f8c5adad50 2b6d96503255a3 Author: Linus Torvalds Date: Sat Jun 7 07:24:07 2025 -0700 Merge tag 'ubifs-for-linus-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull JFFS2 and UBIFS fixes from Richard Weinberger: "JFFS2: - Correctly check return code of jffs2_prealloc_raw_node_refs() UBIFS: - Spelling fixes" * tag 'ubifs-for-linus-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: jffs2: check jffs2_prealloc_raw_node_refs() result in few other places jffs2: check that raw node were preallocated before writing summary ubifs: Fix grammar in error message commit 8a3682601ddaa4ef0c400f627a7f4b9388bbccef Author: Mike Rapoport Date: Sat May 17 12:30:48 2025 +0300 sh: kprobes: Remove unused variables in kprobe_exceptions_notify() kbuild reports the following warning: arch/sh/kernel/kprobes.c: In function 'kprobe_exceptions_notify': >> arch/sh/kernel/kprobes.c:412:24: warning: variable 'p' set but not used [-Wunused-but-set-variable] 412 | struct kprobe *p = NULL; | ^ The variable 'p' is indeed unused since the commit fa5a24b16f94 ("sh/kprobes: Don't call the ->break_handler() in SH kprobes code") Remove that variable along with 'kprobe_opcode_t *addr' which also becomes unused after 'p' is removed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505151341.EuRFR22l-lkp@intel.com/ Fixes: fa5a24b16f94 ("sh/kprobes: Don't call the ->break_handler() in SH kprobes code") Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: John Paul Adrian Glaubitz Reviewed-by: Geert Uytterhoeven Signed-off-by: John Paul Adrian Glaubitz commit ab0a168fcd984c2fc93eb0fb2367881c6aa62eb3 Author: Geert Uytterhoeven Date: Fri May 2 13:13:36 2025 +0200 sh: ecovec24: Make SPI mode explicit Commit cf9e4784f3bde3e4 ("spi: sh-msiof: Add slave mode support") added a new mode member to the sh_msiof_spi_info structure, but did not update any board files. Hence all users in board files rely on the default being host mode. Make this unambiguous by configuring host mode explicitly. Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz commit 9cc646950eefda5605111cbc387b00b1f741c239 Author: Thomas Huth Date: Fri Mar 14 08:10:03 2025 +0100 sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all headers While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org Signed-off-by: Thomas Huth Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz commit a18d098f2aab82abde1d59c56aef9beca01c892b Author: Rafael J. Wysocki Date: Thu Jun 5 17:09:35 2025 +0200 Reapply "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" Revert commit 70523f335734 ("Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"") to reapply the changes from commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()") reverted by it. Previously, these changes caused idle power to rise on systems booting with "nosmt" in the kernel command line because they effectively caused "dead" SMT siblings to remain in idle state C1 after executing the HLT instruction, which prevented the processor from reaching package idle states deeper than PC2 going forward. Now, the "dead" SMT siblings are rescanned after initializing a proper cpuidle driver for the processor (either intel_idle or ACPI idle), at which point they are able to enter a sufficiently deep idle state in native_play_dead() via cpuidle, so the code changes in question can be reapplied. Signed-off-by: Rafael J. Wysocki Acked-by: Dave Hansen Tested-by: Artem Bityutskiy Link: https://patch.msgid.link/7813065.EvYhyI6sBW@rjwysocki.net commit f694481b1d3177144fcac4242eb750cfcb9f7bd5 Author: Rafael J. Wysocki Date: Thu Jun 5 17:07:31 2025 +0200 ACPI: processor: Rescan "dead" SMT siblings during initialization Make acpi_processor_driver_init() call arch_cpu_rescan_dead_smt_siblings(), via a new wrapper function called acpi_idle_rescan_dead_smt_siblings(), after successfully initializing the driver, to allow the "dead" SMT siblings to go into deep idle states, which is necessary for the processor to be able to reach deep package C-states (like PC10) going forward, so that power can be reduced sufficiently in suspend-to-idle, among other things. However, do it only if the ACPI idle driver is the current cpuidle driver (otherwise it is assumed that another cpuidle driver will take care of this) and avoid doing it on architectures other than x86. Signed-off-by: Rafael J. Wysocki Tested-by: Artem Bityutskiy Link: https://patch.msgid.link/2005721.PYKUYFuaPT@rjwysocki.net commit a430c11f401589a0f4f57fd398271a5d85142c7a Author: Rafael J. Wysocki Date: Thu Jun 5 17:06:08 2025 +0200 intel_idle: Rescan "dead" SMT siblings during initialization Make intel_idle_init() call arch_cpu_rescan_dead_smt_siblings() after successfully registering intel_idle as the cpuidle driver so as to allow the "dead" SMT siblings (if any) to go into deep idle states. This is necessary for the processor to be able to reach deep package C-states (like PC10) going forward which is requisite for reducing power sufficiently in suspend-to-idle, among other things. Signed-off-by: Rafael J. Wysocki Tested-by: Artem Bityutskiy Link: https://patch.msgid.link/10669885.nUPlyArG6x@rjwysocki.net commit 4c529a4a7260776bb4abe264498857b4537aa70d Author: Rafael J. Wysocki Date: Sat Jun 7 14:22:56 2025 +0200 x86/smp: PM/hibernate: Split arch_resume_nosmt() Move the inner part of the arch_resume_nosmt() code into a separate function called arch_cpu_rescan_dead_smt_siblings(), so it can be used in other places where "dead" SMT siblings may need to be taken online and offline again in order to get into deep idle states. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Dave Hansen Tested-by: Artem Bityutskiy Link: https://patch.msgid.link/3361688.44csPzL39Z@rjwysocki.net [ rjw: Prevent build issues with CONFIG_SMP unset ] Signed-off-by: Rafael J. Wysocki commit c50a04f8f45c7f13972f9097622d1d929033ea8c Author: Petr Pavlu Date: Tue Jun 3 15:02:09 2025 +0200 genksyms: Fix enum consts from a reference affecting new values Enumeration constants read from a symbol reference file can incorrectly affect new enumeration constants parsed from an actual input file. Example: $ cat test.c enum { E_A, E_B, E_MAX }; struct bar { int mem[E_MAX]; }; int foo(struct bar *a) {} __GENKSYMS_EXPORT_SYMBOL(foo); $ cat test.c | ./scripts/genksyms/genksyms -T test.0.symtypes #SYMVER foo 0x070d854d $ cat test.0.symtypes E#E_MAX 2 s#bar struct bar { int mem [ E#E_MAX ] ; } foo int foo ( s#bar * ) $ cat test.c | ./scripts/genksyms/genksyms -T test.1.symtypes -r test.0.symtypes :4: warning: foo: modversion changed because of changes in enum constant E_MAX #SYMVER foo 0x9c9dfd81 $ cat test.1.symtypes E#E_MAX ( 2 ) + 3 s#bar struct bar { int mem [ E#E_MAX ] ; } foo int foo ( s#bar * ) The __add_symbol() function includes logic to handle the incrementation of enumeration values, but this code is also invoked when reading a reference file. As a result, the variables last_enum_expr and enum_counter might be incorrectly set after reading the reference file, which later affects parsing of the actual input. Fix the problem by splitting the logic for the incrementation of enumeration values into a separate function process_enum() and call it from __add_symbol() only when processing non-reference data. Fixes: e37ddb825003 ("genksyms: Track changes to enum constants") Signed-off-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit e21efe833eae4e2a56c2c2a11caae870a65926fa Author: Masahiro Yamada Date: Tue Jun 3 03:12:54 2025 +0900 arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds The extra-y syntax is deprecated. Instead, use always-$(KBUILD_BUILTIN), which behaves equivalently. Signed-off-by: Masahiro Yamada Acked-by: Johannes Berg Reviewed-by: Nicolas Schier commit 12f147ddd6de7382dad54812e65f3f08d05809fc Author: Al Viro Date: Wed Jun 4 12:27:08 2025 -0400 do_change_type(): refuse to operate on unmounted/not ours mounts Ensure that propagation settings can only be changed for mounts located in the caller's mount namespace. This change aligns permission checking with the rest of mount(2). Reviewed-by: Christian Brauner Fixes: 07b20889e305 ("beginning of the shared-subtree proper") Reported-by: "Orlando, Noah" Signed-off-by: Al Viro commit 1bf807b8f7e0eada62007f9f1966f3d22329eef9 Author: Masahiro Yamada Date: Tue Jun 3 03:12:53 2025 +0900 kbuild: set y instead of 1 to KBUILD_{BUILTIN,MODULES} KBUILD_BUILTIN is set to 1 unless you are building only modules. KBUILD_MODULES is set to 1 when you are building only modules (a typical use case is "make modules"). It is more useful to set them to 'y' instead, so we can do something like: always-$(KBUILD_BUILTIN) += vmlinux.lds This works equivalently to: extra-y += vmlinux.lds This allows us to deprecate extra-y. extra-y and always-y are quite similar, and we do not need both. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Nicolas Schier commit c28f922c9dcee0e4876a2c095939d77fe7e15116 Author: Al Viro Date: Sun Jun 1 20:11:06 2025 -0400 clone_private_mnt(): make sure that caller has CAP_SYS_ADMIN in the right userns What we want is to verify there is that clone won't expose something hidden by a mount we wouldn't be able to undo. "Wouldn't be able to undo" may be a result of MNT_LOCKED on a child, but it may also come from lacking admin rights in the userns of the namespace mount belongs to. clone_private_mnt() checks the former, but not the latter. There's a number of rather confusing CAP_SYS_ADMIN checks in various userns during the mount, especially with the new mount API; they serve different purposes and in case of clone_private_mnt() they usually, but not always end up covering the missing check mentioned above. Reviewed-by: Christian Brauner Reported-by: "Orlando, Noah" Fixes: 427215d85e8d ("ovl: prevent private clone if bind mount is not allowed") Signed-off-by: Al Viro commit bdc7f8c5adad50dad2ec762e317f8b212f5782ac Merge: d3c82f618a9c2b efe99fabeb11b0 Author: Linus Torvalds Date: Fri Jun 6 22:06:57 2025 -0700 Merge tag 'mm-stable-2025-06-06-16-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull more MM updates from Andrew Morton: "The series 'Fix uprobe pte be overwritten when expanding vma' fixes a longstanding and quite obscure bug related to the vma merging of the uprobe mmap page" * tag 'mm-stable-2025-06-06-16-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: selftests/mm: add test about uprobe pte be orphan during vma merge selftests/mm: extract read_sysfs and write_sysfs into vm_util mm: expose abnormal new_pte during move_ptes mm: fix uprobe pte be overwritten when expanding vma mm/damon: s/primitives/code/ on comments commit d3c82f618a9c2b764b7651afe16594ffeb50ade9 Merge: 949ea6f3f4c016 2da20fd904f87f Author: Linus Torvalds Date: Fri Jun 6 21:45:45 2025 -0700 Merge tag 'mm-hotfixes-stable-2025-06-06-16-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "13 hotfixes. 6 are cc:stable and the remainder address post-6.15 issues or aren't considered necessary for -stable kernels. 11 are for MM" * tag 'mm-hotfixes-stable-2025-06-06-16-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count MAINTAINERS: add mm swap section kmsan: test: add module description MAINTAINERS: add tlb trace events to MMU GATHER AND TLB INVALIDATION mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race mm/hugetlb: unshare page tables during VMA split, not before MAINTAINERS: add Alistair as reviewer of mm memory policy iov_iter: use iov_offset for length calculation in iov_iter_aligned_bvec mm/mempolicy: fix incorrect freeing of wi_kobj alloc_tag: handle module codetag load errors as module load failures mm/madvise: handle madvise_lock() failure during race unwinding mm: fix vmstat after removing NR_BOUNCE KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY commit 7054674ee9b9c0c62c2a254243f876f577d36db2 Author: Christian Brauner Date: Thu Jun 5 14:50:54 2025 +0200 selftests/mount_setattr: adapt detached mount propagation test Make sure that detached trees don't receive mount propagation. Signed-off-by: Christian Brauner Signed-off-by: Al Viro commit 290da20e333955637f00647d9fff7c6e3c0b61e0 Author: Al Viro Date: Fri Jun 6 18:31:03 2025 -0400 do_move_mount(): split the checks in subtree-of-our-ns and entire-anon cases ... and fix the breakage in anon-to-anon case. There are two cases acceptable for do_move_mount() and mixing checks for those is making things hard to follow. One case is move of a subtree in caller's namespace. * source and destination must be in caller's namespace * source must be detachable from parent Another is moving the entire anon namespace elsewhere * source must be the root of anon namespace * target must either in caller's namespace or in a suitable anon namespace (see may_use_mount() for details). * target must not be in the same namespace as source. It's really easier to follow if tests are *not* mixed together... Reviewed-by: Christian Brauner Fixes: 3b5260d12b1f ("Don't propagate mounts into detached trees") Reported-by: Allison Karlitskaya Signed-off-by: Al Viro commit 4954346d80fb047cb78776d9f2ebd6a050f80c5f Author: KONDO KAZUMA(近藤 和真) Date: Thu May 15 12:18:30 2025 +0000 fs: allow clone_private_mount() for a path on real rootfs Mounting overlayfs with a directory on real rootfs (initramfs) as upperdir has failed with following message since commit db04662e2f4f ("fs: allow detached mounts in clone_private_mount()"). [ 4.080134] overlayfs: failed to clone upperpath Overlayfs mount uses clone_private_mount() to create internal mount for the underlying layers. The commit made clone_private_mount() reject real rootfs because it does not have a parent mount and is in the initial mount namespace, that is not an anonymous mount namespace. This issue can be fixed by modifying the permission check of clone_private_mount() following [1]. Reviewed-by: Christian Brauner Fixes: db04662e2f4f ("fs: allow detached mounts in clone_private_mount()") Link: https://lore.kernel.org/all/20250514190252.GQ2023217@ZenIV/ [1] Link: https://lore.kernel.org/all/20250506194849.GT2023217@ZenIV/ Suggested-by: Al Viro Signed-off-by: Kazuma Kondo Signed-off-by: Al Viro commit d8cc0362f918d020ca1340d7694f07062dc30f36 Author: Al Viro Date: Tue Jun 3 17:57:27 2025 -0400 fix propagation graph breakage by MOVE_MOUNT_SET_GROUP move_mount(2) 9ffb14ef61ba "move_mount: allow to add a mount into an existing group" breaks assertions on ->mnt_share/->mnt_slave. For once, the data structures in question are actually documented. Documentation/filesystem/sharedsubtree.rst: All vfsmounts in a peer group have the same ->mnt_master. If it is non-NULL, they form a contiguous (ordered) segment of slave list. do_set_group() puts a mount into the same place in propagation graph as the old one. As the result, if old mount gets events from somewhere and is not a pure event sink, new one needs to be placed next to the old one in the slave list the old one's on. If it is a pure event sink, we only need to make sure the new one doesn't end up in the middle of some peer group. "move_mount: allow to add a mount into an existing group" ends up putting the new one in the beginning of list; that's definitely not going to be in the middle of anything, so that's fine for case when old is not marked shared. In case when old one _is_ marked shared (i.e. is not a pure event sink), that breaks the assumptions of propagation graph iterators. Put the new mount next to the old one on the list - that does the right thing in "old is marked shared" case and is just as correct as the current behaviour if old is not marked shared (kudos to Pavel for pointing that out - my original suggested fix changed behaviour in the "nor marked" case, which complicated things for no good reason). Reviewed-by: Christian Brauner Fixes: 9ffb14ef61ba ("move_mount: allow to add a mount into an existing group") Signed-off-by: Al Viro commit bab77c0d191e241d2d59a845c7ed68bfa6e1b257 Author: Al Viro Date: Sun May 4 13:28:37 2025 -0400 finish_automount(): don't leak MNT_LOCKED from parent to child Intention for MNT_LOCKED had always been to protect the internal mountpoints within a subtree that got copied across the userns boundary, not the mountpoint that tree got attached to - after all, it _was_ exposed before the copying. For roots of secondary copies that is enforced in attach_recursive_mnt() - MNT_LOCKED is explicitly stripped for those. For the root of primary copy we are almost always guaranteed that MNT_LOCKED won't be there, so attach_recursive_mnt() doesn't bother. Unfortunately, one call chain got overlooked - triggering e.g. NFS referral will have the submount inherit the public flags from parent; that's fine for such things as read-only, nosuid, etc., but not for MNT_LOCKED. This is particularly pointless since the mount attached by finish_automount() is usually expirable, which makes any protection granted by MNT_LOCKED null and void; just wait for a while and that mount will go away on its own. Include MNT_LOCKED into the set of flags to be ignored by do_add_mount() - it really is an internal flag. Reviewed-by: Christian Brauner Fixes: 5ff9d8a65ce8 ("vfs: Lock in place mounts from more privileged users") Signed-off-by: Al Viro commit 5f31c549382bcddbbd754c72c5433b19420d485d Author: Al Viro Date: Sun Jun 1 14:02:26 2025 -0400 path_overmount(): avoid false negatives Holding namespace_sem is enough to make sure that result remains valid. It is *not* enough to avoid false negatives from __lookup_mnt(). Mounts can be unhashed outside of namespace_sem (stuck children getting detached on final mntput() of lazy-umounted mount) and having an unrelated mount removed from the hash chain while we traverse it may end up with false negative from __lookup_mnt(). We need to sample and recheck the seqlock component of mount_lock... Bug predates the introduction of path_overmount() - it had come from the code in finish_automount() that got abstracted into that helper. Reviewed-by: Christian Brauner Fixes: 26df6034fdb2 ("fix automount/automount race properly") Fixes: 6ac392815628 ("fs: allow to mount beneath top mount") Signed-off-by: Al Viro commit 1f282cdc1d219c4a557f7009e81bc792820d9d9a Author: Al Viro Date: Sun Jun 1 14:23:52 2025 -0400 fs/fhandle.c: fix a race in call of has_locked_children() may_decode_fh() is calling has_locked_children() while holding no locks. That's an oopsable race... The rest of the callers are safe since they are holding namespace_sem and are guaranteed a positive refcount on the mount in question. Rename the current has_locked_children() to __has_locked_children(), make it static and switch the fs/namespace.c users to it. Make has_locked_children() a wrapper for __has_locked_children(), calling the latter under read_seqlock_excl(&mount_lock). Reviewed-by: Christian Brauner Reviewed-by: Jeff Layton Fixes: 620c266f3949 ("fhandle: relax open_by_handle_at() permission checks") Signed-off-by: Al Viro commit f78fb2576f22b0ba5297412a9aa7691920666c41 Author: Yao Zi Date: Thu Jun 5 20:34:46 2025 +0800 platform/loongarch: laptop: Unregister generic_sub_drivers on exit Without correct unregisteration, ACPI notify handlers and the platform drivers installed by generic_subdriver_init() will become dangling references after removing the loongson_laptop module, triggering various kernel faults when a hotkey is sent or at kernel shutdown. Cc: stable@vger.kernel.org Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver") Signed-off-by: Yao Zi Signed-off-by: Huacai Chen commit 53c762b47f726e4079a1f06f684bce2fc0d56fba Author: Yao Zi Date: Thu Jun 5 20:34:46 2025 +0800 platform/loongarch: laptop: Add backlight power control support loongson_laptop_turn_{on,off}_backlight() are designed for controlling the power of the backlight, but they aren't really used in the driver previously. Unify these two functions since they only differ in arguments passed to ACPI method, and wire up loongson_laptop_backlight_update() to update the power state of the backlight as well. Tested on the TongFang L860-T2 Loongson-3A5000 laptop. Cc: stable@vger.kernel.org Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver") Signed-off-by: Yao Zi Signed-off-by: Huacai Chen commit 949ea6f3f4c016852406bfdd3374e2ba5d4c30a9 Merge: 119b1e61a769aa 7831003165d37e Author: Linus Torvalds Date: Fri Jun 6 20:02:51 2025 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Mostly trivial updates and bug fixes (core update is a comment spelling fix). The bigger UFS update is the clock scaling and frequency fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: qcom: Prevent calling phy_exit() before phy_init() scsi: ufs: qcom: Call ufs_qcom_cfg_timers() in clock scaling path scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear() scsi: aacraid: Remove useless code scsi: core: devinfo: Fix typo in comment scsi: ufs: core: Don't perform UFS clkscaling during host async scan commit 119b1e61a769aa98e68599f44721661a4d8c55f3 Merge: d94467aed34e5a 51f1b16367dfde Author: Linus Torvalds Date: Fri Jun 6 18:05:18 2025 -0700 Merge tag 'riscv-for-linus-6.16-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for the FWFT SBI extension, which is part of SBI 3.0 and a dependency for many new SBI and ISA extensions - Support for getrandom() in the VDSO - Support for mseal - Optimized routines for raid6 syndrome and recovery calculations - kexec_file() supports loading Image-formatted kernel binaries - Improvements to the instruction patching framework to allow for atomic instruction patching, along with rules as to how systems need to behave in order to function correctly - Support for a handful of new ISA extensions: Svinval, Zicbop, Zabha, some SiFive vendor extensions - Various fixes and cleanups, including: misaligned access handling, perf symbol mangling, module loading, PUD THPs, and improved uaccess routines * tag 'riscv-for-linus-6.16-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (69 commits) riscv: uaccess: Only restore the CSR_STATUS SUM bit RISC-V: vDSO: Wire up getrandom() vDSO implementation riscv: enable mseal sysmap for RV64 raid6: Add RISC-V SIMD syndrome and recovery calculations riscv: mm: Add support for Svinval extension RISC-V: Documentation: Add enough title underlines to CMODX riscv: Improve Kconfig help for RISCV_ISA_V_PREEMPTIVE MAINTAINERS: Update Atish's email address riscv: uaccess: do not do misaligned accesses in get/put_user() riscv: process: use unsigned int instead of unsigned long for put_user() riscv: make unsafe user copy routines use existing assembly routines riscv: hwprobe: export Zabha extension riscv: Make regs_irqs_disabled() more clear perf symbols: Ignore mapping symbols on riscv RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND riscv: module: Optimize PLT/GOT entry counting riscv: Add support for PUD THP riscv: xchg: Prefetch the destination word for sc.w riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop riscv: Add support for Zicbop ... commit d94467aed34e5ac9cf26d6178a324eed7367e98c Merge: 27fb892d364bd1 11709abccf93b0 Author: Linus Torvalds Date: Fri Jun 6 18:02:37 2025 -0700 Merge tag 's390-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Heiko Carstens: - Add missing select CRYPTO_ENGINE to CRYPTO_PAES_S390 - Fix secure storage access exception handling when fault handling is disabled * tag 's390-6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: Fix in_atomic() handling in do_secure_storage_access() s390/crypto: Select crypto engine in Kconfig when PAES is chosen commit 27fb892d364bd18a66b61a04b63401b18aeee253 Merge: a3fb8a61e4a18f e9ddb37834eb93 Author: Linus Torvalds Date: Fri Jun 6 18:00:36 2025 -0700 Merge tag 'tomoyo-pr-20250606' of git://git.code.sf.net/p/tomoyo/tomoyo Pull tomoyo update from Tetsuo Handa: "Update mailing list address" * tag 'tomoyo-pr-20250606' of git://git.code.sf.net/p/tomoyo/tomoyo: tomoyo: update mailing lists commit a3fb8a61e4a18f11dab281d5afa370e4aaded47b Merge: 28fb80f0891c01 b828b4bf29d10a Author: Linus Torvalds Date: Fri Jun 6 17:56:19 2025 -0700 Merge tag 'ceph-for-6.16-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: - a one-liner that leads to a startling (but also very much rational) performance improvement in cases where an IMA policy with rules that are based on fsmagic matching is enforced - an encryption-related fixup that addresses generic/397 and other fstest failures - a couple of cleanups in CephFS * tag 'ceph-for-6.16-rc1' of https://github.com/ceph/ceph-client: ceph: fix variable dereferenced before check in ceph_umount_begin() ceph: set superblock s_magic for IMA fsmagic matching ceph: cleanup hardcoded constants of file handle size ceph: fix possible integer overflow in ceph_zero_objects() ceph: avoid kernel BUG for encrypted inode with unaligned file size commit 28fb80f0891c01dc706a5f6cada94c9cf0f2b1c2 Merge: 7a912d04415b37 6f9ccdad0feaef Author: Linus Torvalds Date: Fri Jun 6 17:54:09 2025 -0700 Merge tag 'ovl-update-v2-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs Pull overlayfs update from Miklos Szeredi: - Fix a regression in getting the path of an open file (e.g. in /proc/PID/maps) for a nested overlayfs setup (André Almeida) - Support data-only layers and verity in a user namespace (unprivileged composefs use case) - Fix a gcc warning (Kees) - Cleanups * tag 'ovl-update-v2-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: ovl: Annotate struct ovl_entry with __counted_by() ovl: Replace offsetof() with struct_size() in ovl_stack_free() ovl: Replace offsetof() with struct_size() in ovl_cache_entry_new() ovl: Check for NULL d_inode() in ovl_dentry_upper() ovl: Use str_on_off() helper in ovl_show_options() ovl: don't require "metacopy=on" for "verity" ovl: relax redirect/metacopy requirements for lower -> data redirect ovl: make redirect/metacopy rejection consistent ovl: Fix nested backing file paths commit de6fdc076d39c97c0f7ed4873bfc84f58909f479 Author: Steven Rostedt Date: Thu Jun 5 16:21:06 2025 -0400 tracing: PM: Remove unused clock events The events clock_enable, clock_disable, and clock_set_rate were added back in 2010. In 2011 they were used by the arm architecture but removed in 2013. These events add around 7K of memory which was wasted for the last 12 years. Remove them. Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/ Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Kajetan Puchalski Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/20250605162106.1a459dad@gandalf.local.home Fixes: 74704ac6ea402 ("tracing, perf: Add more power related events") Signed-off-by: Steven Rostedt (Google) commit 40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e Author: Dmitry Antipov Date: Fri Jun 6 14:22:42 2025 +0300 ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set() Enlarge the critical section in ring_buffer_subbuf_order_set() to ensure that error handling takes place with per-buffer mutex held, thus preventing list corruption and other concurrency-related issues. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Tzvetomir Stoyanov Link: https://lore.kernel.org/20250606112242.1510605-1-dmantipov@yandex.ru Reported-by: syzbot+05d673e83ec640f0ced9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=05d673e83ec640f0ced9 Fixes: f9b94daa542a8 ("ring-buffer: Set new size of the ring buffer sub page") Signed-off-by: Dmitry Antipov Signed-off-by: Steven Rostedt (Google) commit a9d0aab5eb33a44792a66b7af13ff50d7b3e7022 Author: Steven Rostedt Date: Fri Jun 6 20:20:20 2025 -0400 tracing: Fix regression of filter waiting a long time on RCU synchronization When faultable trace events were added, a trace event may no longer use normal RCU to synchronize but instead used synchronize_rcu_tasks_trace(). This synchronization takes a much longer time to synchronize. The filter logic would free the filters by calling tracepoint_synchronize_unregister() after it unhooked the filter strings and before freeing them. With this function now calling synchronize_rcu_tasks_trace() this increased the time to free a filter tremendously. On a PREEMPT_RT system, it was even more noticeable. # time trace-cmd record -p function sleep 1 [..] real 2m29.052s user 0m0.244s sys 0m20.136s As trace-cmd would clear out all the filters before recording, it could take up to 2 minutes to do a recording of "sleep 1". To find out where the issues was: ~# trace-cmd sqlhist -e -n sched_stack select start.prev_state as state, end.next_comm as comm, TIMESTAMP_DELTA_USECS as delta, start.STACKTRACE as stack from sched_switch as start join sched_switch as end on start.prev_pid = end.next_pid Which will produce the following commands (and -e will also execute them): echo 's:sched_stack s64 state; char comm[16]; u64 delta; unsigned long stack[];' >> /sys/kernel/tracing/dynamic_events echo 'hist:keys=prev_pid:__arg_18057_2=prev_state,__arg_18057_4=common_timestamp.usecs,__arg_18057_7=common_stacktrace' >> /sys/kernel/tracing/events/sched/sched_switch/trigger echo 'hist:keys=next_pid:__state_18057_1=$__arg_18057_2,__comm_18057_3=next_comm,__delta_18057_5=common_timestamp.usecs-$__arg_18057_4,__stack_18057_6=$__arg_18057_7:onmatch(sched.sched_switch).trace(sched_stack,$__state_18057_1,$__comm_18057_3,$__delta_18057_5,$__stack_18057_6)' >> /sys/kernel/tracing/events/sched/sched_switch/trigger The above creates a synthetic event that creates a stack trace when a task schedules out and records it with the time it scheduled back in. Basically the time a task is off the CPU. It also records the state of the task when it left the CPU (running, blocked, sleeping, etc). It also saves the comm of the task as "comm" (needed for the next command). ~# echo 'hist:keys=state,stack.stacktrace:vals=delta:sort=state,delta if comm == "trace-cmd" && state & 3' > /sys/kernel/tracing/events/synthetic/sched_stack/trigger The above creates a histogram with buckets per state, per stack, and the value of the total time it was off the CPU for that stack trace. It filters on tasks with "comm == trace-cmd" and only the sleeping and blocked states (1 - sleeping, 2 - blocked). ~# trace-cmd record -p function sleep 1 ~# cat /sys/kernel/tracing/events/synthetic/sched_stack/hist | tail -18 { state: 2, stack.stacktrace __schedule+0x1545/0x3700 schedule+0xe2/0x390 schedule_timeout+0x175/0x200 wait_for_completion_state+0x294/0x440 __wait_rcu_gp+0x247/0x4f0 synchronize_rcu_tasks_generic+0x151/0x230 apply_subsystem_event_filter+0xa2b/0x1300 subsystem_filter_write+0x67/0xc0 vfs_write+0x1e2/0xeb0 ksys_write+0xff/0x1d0 do_syscall_64+0x7b/0x420 entry_SYSCALL_64_after_hwframe+0x76/0x7e } hitcount: 237 delta: 99756288 <<--------------- Delta is 99 seconds! Totals: Hits: 525 Entries: 21 Dropped: 0 This shows that this particular trace waited for 99 seconds on synchronize_rcu_tasks() in apply_subsystem_event_filter(). In fact, there's a lot of places in the filter code that spends a lot of time waiting for synchronize_rcu_tasks_trace() in order to free the filters. Add helper functions that will use call_rcu*() variants to asynchronously free the filters. This brings the timings back to normal: # time trace-cmd record -p function sleep 1 [..] real 0m14.681s user 0m0.335s sys 0m28.616s And the histogram also shows this: ~# cat /sys/kernel/tracing/events/synthetic/sched_stack/hist | tail -21 { state: 2, stack.stacktrace __schedule+0x1545/0x3700 schedule+0xe2/0x390 schedule_timeout+0x175/0x200 wait_for_completion_state+0x294/0x440 __wait_rcu_gp+0x247/0x4f0 synchronize_rcu_normal+0x3db/0x5c0 tracing_reset_online_cpus+0x8f/0x1e0 tracing_open+0x335/0x440 do_dentry_open+0x4c6/0x17a0 vfs_open+0x82/0x360 path_openat+0x1a36/0x2990 do_filp_open+0x1c5/0x420 do_sys_openat2+0xed/0x180 __x64_sys_openat+0x108/0x1d0 do_syscall_64+0x7b/0x420 } hitcount: 2 delta: 77044 Totals: Hits: 55 Entries: 28 Dropped: 0 Where the total waiting time of synchronize_rcu_tasks_trace() is 77 milliseconds. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: "Paul E. McKenney" Cc: Jan Kiszka Cc: Andreas Ziegler Cc: Felix MOESSBAUER Link: https://lore.kernel.org/20250606201936.1e3d09a9@batman.local.home Reported-by: "Flot, Julien" Tested-by: Julien Flot Fixes: a363d27cdbc2 ("tracing: Allow system call tracepoints to handle page faults") Closes: https://lore.kernel.org/all/240017f656631c7dd4017aa93d91f41f653788ea.camel@siemens.com/ Signed-off-by: Steven Rostedt (Google) commit 02670deede2288d8e4e3d800477b27c091080fae Author: Andrii Nakryiko Date: Fri Jun 6 13:21:34 2025 -0700 libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly libbpf_err_ptr() helpers are meant to return NULL and set errno, if there is an error. But btf_parse_raw_mmap() is meant to be used internally and is expected to return ERR_PTR() values. Because of this mismatch, when libbpf tries to mmap /sys/kernel/btf/vmlinux, we don't detect the error correctly with IS_ERR() check, and never fallback to old non-mmap-based way of loading vmlinux BTF. Fix this by using proper ERR_PTR() returns internally. Reported-by: Arnaldo Carvalho de Melo Reviewed-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Fixes: 3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs") Cc: Lorenz Bauer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20250606202134.2738910-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 7a912d04415b372324e5a8dfad3360d993d0c23a Merge: d7582bb0a4f549 57cf46cd1fe351 Author: Linus Torvalds Date: Fri Jun 6 13:22:31 2025 -0700 Merge tag 'spi-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull more spi updates from Mark Brown: "A small set of updates that came in during the merge window, we've got: - Some small fixes for the Broadcom and spi-pci1xxxx drivers - A change to the QPIC SNAND driver to flag that the error correction features are less useful than people might be expecting - A new device ID for the SOPHGO SG2042 - The addition of Yang Shen as a Huawei maintainer" * tag 'spi-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-qpic-snand: document the limited bit error reporting capability spi: bcm63xx-hsspi: fix shared reset spi: bcm63xx-spi: fix shared reset MAINTAINERS: Update HiSilicon SFC driver maintainer MAINTAINERS: Update HiSilicon SPI Controller driver maintainer spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts commit d7582bb0a4f54979cef625df35ff9fd845400769 Merge: 8a2ba6f8ee7dd7 65271f868cb1dc Author: Linus Torvalds Date: Fri Jun 6 13:20:26 2025 -0700 Merge tag 'regulator-fix-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "A very minor fix that came in during the merge window, checking for I/O errors in the MAX14577 driver" * tag 'regulator-fix-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: max14577: Add error check for max14577_read_reg() commit 8a2ba6f8ee7dd764ffec4484e4f4d5ad377f9a69 Merge: 6d8854216ebb60 a8841dc3dfbf12 Author: Linus Torvalds Date: Fri Jun 6 13:16:50 2025 -0700 Merge tag 'pwm/for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fixes from Uwe Kleine-König: "axi-pwmgen: Fix handling of external clock The pwm-axi-pwmgen device is backed by an FPGA and can be synthesized in different ways. Relevant here is that it can use one or two external clock signals. These fix clock handling for the two clocks case" * tag 'pwm/for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: axi-pwmgen: fix missing separate external clock dt-bindings: pwm: adi,axi-pwmgen: Fix clocks commit 6d8854216ebb60959ddb6f4ea4123bd449ba6cf6 Merge: 794a5492078116 6f65947a1e684d Author: Linus Torvalds Date: Fri Jun 6 13:12:50 2025 -0700 Merge tag 'block-6.16-20250606' of git://git.kernel.dk/linux Pull more block updates from Jens Axboe: - NVMe pull request via Christoph: - TCP error handling fix (Shin'ichiro Kawasaki) - TCP I/O stall handling fixes (Hannes Reinecke) - fix command limits status code (Keith Busch) - support vectored buffers also for passthrough (Pavel Begunkov) - spelling fixes (Yi Zhang) - MD pull request via Yu: - fix REQ_RAHEAD and REQ_NOWAIT IO err handling for raid1/10 - fix max_write_behind setting for dm-raid - some minor cleanups - Integrity data direction fix and cleanup - bcache NULL pointer fix - Fix for loop missing write start/end handling - Decouple hardware queues and IO threads in ublk - Slew of ublk selftests additions and updates * tag 'block-6.16-20250606' of git://git.kernel.dk/linux: (29 commits) nvme: spelling fixes nvme-tcp: fix I/O stalls on congested sockets nvme-tcp: sanitize request list handling nvme-tcp: remove tag set when second admin queue config fails nvme: enable vectored registered bufs for passthrough cmds nvme: fix implicit bool to flags conversion nvme: fix command limits status code selftests: ublk: kublk: improve behavior on init failure block: flip iter directions in blk_rq_integrity_map_user() block: drop direction param from bio_integrity_copy_user() selftests: ublk: cover PER_IO_DAEMON in more stress tests Documentation: ublk: document UBLK_F_PER_IO_DAEMON selftests: ublk: add stress test for per io daemons selftests: ublk: add functional test for per io daemons selftests: ublk: kublk: decouple ublk_queues from ublk server threads selftests: ublk: kublk: move per-thread data out of ublk_queue selftests: ublk: kublk: lift queue initialization out of thread selftests: ublk: kublk: tie sqe allocation to io instead of queue selftests: ublk: kublk: plumb q_id in io_uring user_data ublk: have a per-io daemon instead of a per-queue daemon ... commit 794a54920781162c4503acea62d88e725726e319 Merge: c0c9379f235df3 079afb081c4288 Author: Linus Torvalds Date: Fri Jun 6 13:09:03 2025 -0700 Merge tag 'io_uring-6.16-20250606' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix for a regression introduced in this merge window, where the 'id' passed to xa_find() for ifq lookup is uninitialized - Fix for zcrx release on registration failure. From 6.15, going to stable - Tweak for recv bundles, where msg_inq should be > 1 before being used to gate a retry event - Pavel doesnt want to be a maintainer anymore, remove him from the MAINTAINERS entry - Limit legacy kbuf registrations to 64k, which is the size of the buffer ID field anyway. Hence it's nonsensical to support more than that, and the only purpose that serves is to have syzbot trigger long exit delays for heavily configured debug kernels - Fix for the io_uring futex handling, which got broken for FUTEX2_PRIVATE by a generic futex commit adding private hashes * tag 'io_uring-6.16-20250606' of git://git.kernel.dk/linux: io_uring/futex: mark wait requests as inflight io_uring/futex: get rid of struct io_futex addr union io_uring/kbuf: limit legacy provided buffer lists to USHRT_MAX MAINTAINERS: remove myself from io_uring io_uring/net: only consider msg_inq if larger than 1 io_uring/zcrx: fix area release on registration failure io_uring/zcrx: init id for xa_find commit c0c9379f235df33a12ceae94370ad80c5278324d Merge: 378ec25aec5a84 882826f58b2c48 Author: Linus Torvalds Date: Fri Jun 6 12:45:35 2025 -0700 Merge tag 'usb-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the big set of USB and Thunderbolt changes for 6.16-rc1. Included in here are the following: - USB offload support for audio devices. I think this takes the record for the most number of patch series (30+) over the longest period of time (2+ years) to get merged properly. Many props go to Wesley Cheng for seeing this effort through, they took a major out-of-tree hacked-up-monstrosity that was created by multiple vendors for their specific devices, got it all merged into a semi-coherent set of changes, and got all of the different major subsystems to agree on how this should be implemented both with changes to their code as well as userspace apis, AND wrangled the hardware companies into agreeing to go forward with this, despite making them all redo work they had already done in their private device trees. This feature offers major power savings on embedded devices where a USB audio stream can continue to flow while the rest of the system is sleeping, something that devices running on battery power really care about. There are still some more small tweaks left to be done here, and those patches are still out for review and arguing among the different hardware companies, but this is a major step forward and a great example of how to do upstream development well. - small number of thunderbolt fixes and updates, things seem to be slowing down here (famous last words...) - xhci refactors and reworking to try to handle some rough corner cases in some hardware implementations where things don't always work properly - typec driver updates - USB3 power management reworking and updates - Removal of some old and orphaned UDC gadget drivers that had not been used in a very long time, dropping over 11 thousand lines from the tree, always a nice thing, making up for the 12k lines added for the USB offload feature. - lots of little updates and fixes in different drivers All of these have been in linux-next for over 2 weeks, the USB offload logic has been in there for 8 weeks now, with no reported issues" * tag 'usb-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (172 commits) ALSA: usb-audio: qcom: fix USB_XHCI dependency ASoC: qdsp6: fix compile-testing without CONFIG_OF usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n usb: typec: tipd: fix typo in TPS_STATUS_HIGH_VOLAGE_WARNING macro USB: typec: fix const issue in typec_match() USB: gadget: udc: fix const issue in gadget_match_driver() USB: gadget: fix up const issue with struct usb_function_instance USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB USB: serial: bus: fix const issue in usb_serial_device_match() usb: usbtmc: Fix timeout value in get_stb usb: usbtmc: Fix read_stb function and get_stb ioctl ALSA: qc_audio_offload: try to reduce address space confusion ALSA: qc_audio_offload: avoid leaking xfer_buf allocation ALSA: qc_audio_offload: rename dma/iova/va/cpu/phys variables ALSA: usb-audio: qcom: Fix an error handling path in qc_usb_audio_probe() usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence dt-bindings: usb: ti,usb8041: Add binding for TI USB8044 hub controller usb: misc: onboard_usb_dev: Add support for TI TUSB8044 hub usb: gadget: lpc32xx_udc: Use USB API functions rather than constants usb: gadget: epautoconf: Use USB API functions rather than constants ... commit 378ec25aec5a8444879f8696d580c94950a1f1df Merge: c26f4fbd58375b b495021a973e24 Author: Linus Torvalds Date: Fri Jun 6 12:32:02 2025 -0700 Merge tag 'tty-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big set of tty and serial driver changes for 6.16-rc1. A little more churn than normal in this portion of the kernel for this development cycle, Jiri and Nicholas were busy with cleanups and reviews and fixes for the vt unicode handling logic which composed most of the overall work in here. Major changes are: - vt unicode changes/reverts/changes from Nicholas. This should help out a lot with screen readers and others that rely on vt console support - lock guard additions to the core tty/serial code to clean up lots of error handling logic - 8250 driver updates and fixes - device tree conversions to yaml - sh-sci driver updates - other small cleanups and updates for serial drivers and tty core portions All of these have been in linux-next for 2 weeks with no reported issues" * tag 'tty-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (105 commits) tty: serial: 8250_omap: fix TX with DMA for am33xx vt: add VT_GETCONSIZECSRPOS to retrieve console size and cursor position vt: bracketed paste support vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl() vt: process the full-width ASCII fallback range programmatically vt: make use of ucs_get_fallback() when glyph is unavailable vt: add ucs_get_fallback() vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.py vt: introduce gen_ucs_fallback_table.py to create ucs_fallback_table.h vt: move glyph determination to a separate function vt: make sure displayed double-width characters are remembered as such vt: ucs.c: fix misappropriate in_range() usage serial: max3100: Replace open-coded parity calculation with parity8() dt-bindings: serial: 8250_omap: Drop redundant properties dt-bindings: serial: Convert socionext,milbeaut-usio-uart to DT schema dt-bindings: serial: Convert microchip,pic32mzda-uart to DT schema dt-bindings: serial: Convert arm,sbsa-uart to DT schema dt-bindings: serial: Convert snps,arc-uart to DT schema dt-bindings: serial: Convert marvell,armada-3700-uart to DT schema dt-bindings: serial: Convert lantiq,asc to DT schema ... commit c26f4fbd58375bd6ef74f95eb73d61762ad97c59 Merge: a100922a3855eb 9857af0fcff385 Author: Linus Torvalds Date: Fri Jun 6 11:50:47 2025 -0700 Merge tag 'char-misc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc / iio driver updates from Greg KH: "Here is the big char/misc/iio and other small driver subsystem pull request for 6.16-rc1. Overall, a lot of individual changes, but nothing major, just the normal constant forward progress of new device support and cleanups to existing subsystems. Highlights in here are: - Large IIO driver updates and additions and device tree changes - Android binder bugfixes and logfile fixes - mhi driver updates - comedi driver updates - counter driver updates and additions - coresight driver updates and additions - echo driver removal as there are no in-kernel users of it - nvmem driver updates - spmi driver updates - new amd-sbi driver "subsystem" and drivers added - rust miscdriver binding documentation fix - other small driver fixes and updates (uio, w1, acrn, hpet, xillybus, cardreader drivers, fastrpc and others) All of these have been in linux-next for quite a while with no reported problems" * tag 'char-misc-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (390 commits) binder: fix yet another UAF in binder_devices counter: microchip-tcb-capture: Add watch validation support dt-bindings: iio: adc: Add ROHM BD79100G iio: adc: add support for Nuvoton NCT7201 dt-bindings: iio: adc: add NCT7201 ADCs iio: chemical: Add driver for SEN0322 dt-bindings: trivial-devices: Document SEN0322 iio: adc: ad7768-1: reorganize driver headers iio: bmp280: zero-init buffer iio: ssp_sensors: optimalize -> optimize HID: sensor-hub: Fix typo and improve documentation iio: admv1013: replace redundant ternary operator with just len iio: chemical: mhz19b: Fix error code in probe() iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros iio: make IIO_DMA_MINALIGN minimum of 8 bytes ... commit a100922a3855eb35ecd465f1d558546b1e144445 Merge: 5fc6c6f258b34f a481f0ebf213e0 Author: Linus Torvalds Date: Fri Jun 6 11:23:37 2025 -0700 Merge tag 'staging-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the "big" set of staging driver changes for 6.16-rc1. Included in here are: - gpib driver cleanups and updates. This subsystem is _almost_ ready to be merged into the main portion of the kernel tree. Hopefully should happen in the next kernel merge cycle if all goes well. - sm750fb driver cleanups - rtl8723bs driver cleanups - other small driver cleanups for coding style issues All of these have been in for over 2 weeks with no reported issues" * tag 'staging-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (203 commits) staging: rtl8723bs: remove unnecessary braces for single statement blocks staging: rtl8723bs: Removed multiple blank lines of rtw_pwrctrl.c staging: sm750fb: rename `hw_sm750le_setBLANK` staging: sm750fb: rename `hw_sm750_setBLANK` staging: sm750fb: rename `hw_sm750_setColReg` staging: sm750fb: rename `hw_sm750_crtc_setMode` staging: sm750fb: rename `hw_sm750_crtc_checkMode` staging: sm750fb: rename `hw_sm750_output_setMode` staging: sm750fb: rename `hw_sm750le_deWait` staging: sm750fb: rename `hw_sm750_deWait` staging: sm750fb: rename `hw_sm750_initAccel` staging: gpib: switch to kmalloc(sizeof(*status)) staging: gpib: Fix secondary address restriction staging: gpib: Fix uapi include header guard name staging: gpib: Avoid unused variable warning staging: gpib: Declare driver entry points static staging: gpib: Fix PCMCIA config identifier staging: gpib: Avoid unused variable warnings staging: gpib: Fix lpvo request_system_control staging: sm750fb: rename sm750_hw_cursor_setData2 ... commit 5fc6c6f258b34fd0d2ff2a63b8a407a4dcbca750 Merge: e332935a540eb7 6f7e234f74caf5 Author: Linus Torvalds Date: Fri Jun 6 09:26:47 2025 -0700 Merge tag 'drm-fixes-2025-06-06' of https://gitlab.freedesktop.org/drm/kernel Pull more drm fixes from Simona Vetter: "Another small batch of drm fixes, this time with a different baseline and hence separate. Drivers: - ivpu: - dma_resv locking - warning fixes - reset failure handling - improve logging - update fw file names - fix cmdqueue unregister - panel-simple: add Evervision VGG644804 Core Changes: - sysfb: screen_info type check - video: screen_info for relocated pci fb - drm/sched: signal fence of killed job - dummycon: deferred takeover fix" * tag 'drm-fixes-2025-06-06' of https://gitlab.freedesktop.org/drm/kernel: sysfb: Fix screen_info type check for VGA video: screen_info: Relocate framebuffers behind PCI bridges accel/ivpu: Fix warning in ivpu_gem_bo_free() accel/ivpu: Trigger device recovery on engine reset/resume failure accel/ivpu: Use dma_resv_lock() instead of a custom mutex drm/panel-simple: fix the warnings for the Evervision VGG644804 accel/ivpu: Reorder Doorbell Unregister and Command Queue Destruction accel/ivpu: Use firmware names from upstream repo accel/ivpu: Improve buffer object logging dummycon: Trigger redraw when switching consoles with deferred takeover drm/scheduler: signal scheduled fence when kill job commit c0f691388992c708436ab5f6e810865be6ddf5c6 Author: Rafael J. Wysocki Date: Thu Jun 5 17:04:11 2025 +0200 intel_idle: Use subsys_initcall_sync() for initialization It is not necessary to wait until the device_initcall() stage with intel_idle initialization. All of its dependencies are met after all subsys_initcall()s have run, so subsys_initcall_sync() can be used for initializing it. It is also better to ensure that intel_idle will always initialize before the ACPI processor driver that uses module_init() for its initialization. Signed-off-by: Rafael J. Wysocki Tested-by: Artem Bityutskiy Link: https://patch.msgid.link/2994397.e9J7NaK4W3@rjwysocki.net commit e332935a540eb76dd656663ca908eb0544d96757 Merge: 67faad74352d1c 04c8970771b4f1 Author: Linus Torvalds Date: Fri Jun 6 08:09:56 2025 -0700 Merge tag 'drm-next-2025-06-06' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "This is pretty much two weeks worth of fixes, plus one thing that might be considered next: amdkfd is now able to be enabled on risc-v platforms. Otherwise, amdgpu and xe with the majority of fixes, and then a smattering all over. panel: - nt37801: fix IS_ERR - nt37801: fix KConfig connector: - Fix null deref in HDMI audio helper. bridge: - analogix_dp: fixup clk-disable removal nouveau: - minor typo fix (',' vs ';') msm: - mailmap updates i915: - Fix the enabling/disabling of DP audio SDP splitting - Fix PSR register definitions for ALPM - Fix u32 overflow in SNPS PHY HDMI PLL setup - Fix GuC pending message underflow when submit fails - Fix GuC wakeref underflow race during reset xe: - Two documentation fixes - A couple of vm init fixes - Hwmon fixes - Drop reduntant conversion to bool - Fix CONFIG_INTEL_VSEC dependency - Rework eviction rejection of bound external bos - Stop re-submitting signalled jobs - A couple of pxp fixes - Add back a fix that got lost in a merge - Create LRC bo without VM - Fix for the above fix amdgpu: - UserQ fixes - SMU 13.x fixes - VCN fixes - JPEG fixes - Misc cleanups - runtime pm fix - DCN 4.0.1 fixes - Misc display fixes - ISP fix - VRAM manager fix - RAS fixes - IP discovery fix - Cleaner shader fix for GC 10.1.x - OD fix - Non-OLED panel fix - Misc display fixes - Brightness fixes amdkfd: - Enable CONFIG_HSA_AMD on RISCV - SVM fix - Misc cleanups - Ref leak fix - WPTR BO fix radeon: - Misc cleanups" * tag 'drm-next-2025-06-06' of https://gitlab.freedesktop.org/drm/kernel: (105 commits) drm/nouveau/vfn/r535: Convert comma to semicolon drm/xe: remove unmatched xe_vm_unlock() from __xe_exec_queue_init() drm/xe: Create LRC BO without VM drm/xe/guc_submit: add back fix drm/xe/pxp: Clarify PXP queue creation behavior if PXP is not ready drm/xe/pxp: Use the correct define in the set_property_funcs array drm/xe/sched: stop re-submitting signalled jobs drm/xe: Rework eviction rejection of bound external bos drm/xe/vsec: fix CONFIG_INTEL_VSEC dependency drm/xe: drop redundant conversion to bool drm/xe/hwmon: Move card reactive critical power under channel card drm/xe/hwmon: Add support to manage power limits though mailbox drm/xe/vm: move xe_svm_init() earlier drm/xe/vm: move rebind_work init earlier MAINTAINERS: .mailmap: update Rob Clark's email address mailmap: Update entry for Akhil P Oommen MAINTAINERS: update my email address MAINTAINERS: drop myself as maintainer drm/i915/display: Fix u32 overflow in SNPS PHY HDMI PLL setup drm/amd/display: Fix default DC and AC levels ... commit 67faad74352d1ce0c1f411f92fdb1e0c0f3c9380 Merge: e271ed52b344ac 5a0c749125c001 Author: Linus Torvalds Date: Fri Jun 6 07:56:36 2025 -0700 Merge tag 'mips_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - Added support for EcoNet platform - Added support for parallel CPU bring up on EyeQ - Other cleanups and fixes * tag 'mips_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (23 commits) MIPS: loongson2ef: lemote-2f: add missing function prototypes MIPS: loongson2ef: cs5536: add missing function prototypes MIPS: SMP: Move the AP sync point before the calibration delay mips: econet: Fix incorrect Kconfig dependencies MAINTAINERS: Add entry for newly added EcoNet platform. mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board dt-bindings: vendor-prefixes: Add SmartFiber mips: Add EcoNet MIPS platform support dt-bindings: mips: Add EcoNet platform binding MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine() mips: dts: pic32: pic32mzda: Rename the sdhci nodename to match with common mmc-controller binding MIPS: SMP: Move the AP sync point before the non-parallel aware functions MIPS: Replace strcpy() with strscpy() in vpe_elfload() MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init() mips: ptrace: Improve code formatting and indentation MIPS: SMP: Implement parallel CPU bring up for EyeQ mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS MIPS: Loongson64: Add missing '#interrupt-cells' for loongson64c_ls7a mips: dts: realtek: Add MDIO controller MIPS: txx9: gpio: use new line value setter callbacks ... commit 11fcf368506d347088e613edf6cd2604d70c454f Author: Thomas Weißschuh Date: Fri Jun 6 10:23:57 2025 +0200 uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again Commit 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") did not take in account that the usage of BITS_PER_LONG in __GENMASK() was changed to __BITS_PER_LONG for UAPI-safety in commit 3c7a8e190bc5 ("uapi: introduce uapi-friendly macros for GENMASK"). BITS_PER_LONG can not be used in UAPI headers as it derives from the kernel configuration and not from the current compiler invocation. When building compat userspace code or a compat vDSO its value will be incorrect. Switch back to __BITS_PER_LONG. Fixes: 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Signed-off-by: Yury Norov [NVIDIA] commit 6f7e234f74caf5f8863bbca51b1b135d0736b0b3 Merge: 3c4c39cbde6aab f670b50ef5e4a6 Author: Simona Vetter Date: Fri Jun 6 14:38:50 2025 +0200 Merge tag 'drm-misc-fixes-2025-06-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: ivpu: - gem: Use dma-resv lock - gem. Fix a warning - Trigger recovery on device engine reset/resume failure panel: - panel-simple: Fix settings for Evervision VGG644804 sysfb: - Fix screen_info type check video: - Update screen_info for relocated PCI framebuffers Signed-off-by: Simona Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250606072853.GA13099@linux.fritz.box commit 82cbd06f327f3c2ccdee990bd356c9303ae168f9 Author: Wei Fang Date: Thu Jun 5 14:08:36 2025 +0800 net: enetc: fix the netc-lib driver build dependency The kernel robot reported the following errors when the netc-lib driver was compiled as a loadable module and the enetc-core driver was built-in. ld.lld: error: undefined symbol: ntmp_init_cbdr referenced by enetc_cbdr.c:88 (drivers/net/ethernet/freescale/enetc/enetc_cbdr.c:88) ld.lld: error: undefined symbol: ntmp_free_cbdr referenced by enetc_cbdr.c:96 (drivers/net/ethernet/freescale/enetc/enetc_cbdr.c:96) Simply changing "tristate" to "bool" can fix this issue, but considering that the netc-lib driver needs to support being compiled as a loadable module and LS1028 does not need the netc-lib driver. Therefore, we add a boolean symbol 'NXP_NTMP' to enable 'NXP_NETC_LIB' as needed. And when adding NETC switch driver support in the future, there is no need to modify the dependency, just select "NXP_NTMP" and "NXP_NETC_LIB" at the same time. Reported-by: Arnd Bergmann Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505220734.x6TF6oHR-lkp@intel.com/ Fixes: 4701073c3deb ("net: enetc: add initial netc-lib driver to support NTMP") Suggested-by: Arnd Bergmann Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1205088fd0393bd9eae96b62bf1e4b9eb1b73edf Author: Yao Zi Date: Thu Jun 5 20:34:46 2025 +0800 platform/loongarch: laptop: Get brightness setting from EC on probe Previously during driver probe, 1 is unconditionally taken as current brightness value and set to props.brightness, which will be considered as the brightness before suspend and restored to EC on resume. Since a brightness value of 1 almost never matches EC's state on coldboot (my laptop's EC defaults to 80), this causes surprising changes of screen brightness on the first time of resume after coldboot. Let's get brightness from EC and take it as the current brightness on probe of the laptop driver to avoid the surprising behavior. Tested on TongFang L860-T2 Loongson-3A5000 laptop. Cc: stable@vger.kernel.org Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver") Signed-off-by: Yao Zi Signed-off-by: Huacai Chen commit 1cf806006574b0e874fb39a18b1b26559770fb1c Author: Binbin Zhou Date: Thu Jun 5 20:34:34 2025 +0800 LoongArch: dts: Add PWM support to Loongson-2K2000 The module is supported, enable it. Reviewed-by: Yanteng Si Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit abd000dbaee45fa620ddaeb13757b9a8985ce50f Author: Binbin Zhou Date: Thu Jun 5 20:34:34 2025 +0800 LoongArch: dts: Add PWM support to Loongson-2K1000 The module is supported, enable it. Also, add the pwm-fan and cooling-maps associated with it. Reviewed-by: Yanteng Si Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 07aeb50e6c74e59c268ad6460c6b51411bea1759 Author: Binbin Zhou Date: Thu Jun 5 20:34:34 2025 +0800 LoongArch: dts: Add PWM support to Loongson-2K0500 The module is supported, enable it. Reviewed-by: Yanteng Si Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit e242bbbb6d7ac7556aa1e358294dc7e3c82cc902 Author: Thomas Weißschuh Date: Thu Jun 5 20:34:18 2025 +0800 LoongArch: vDSO: Correctly use asm parameters in syscall wrappers The syscall wrappers use the "a0" register for two different register variables, both the first argument and the return value. Here the "ret" variable is used as both input and output while the argument register is only used as input. Clang treats the conflicting input parameters as an undefined behaviour and optimizes away the argument assignment. The code seems to work by chance for the most part today but that may change in the future. Specifically clock_gettime_fallback() fails with clockids from 16 to 23, as implemented by the upcoming auxiliary clocks. Switch the "ret" register variable to a pure output, similar to the other architectures' vDSO code. This works in both clang and GCC. Link: https://lore.kernel.org/lkml/20250602102825-42aa84f0-23f1-4d10-89fc-e8bbaffd291a@linutronix.de/ Link: https://lore.kernel.org/lkml/20250519082042.742926976@linutronix.de/ Fixes: c6b99bed6b8f ("LoongArch: Add VDSO and VSYSCALL support") Fixes: 18efd0b10e0f ("LoongArch: vDSO: Wire up getrandom() vDSO implementation") Cc: stable@vger.kernel.org Reviewed-by: Nathan Chancellor Reviewed-by: Yanteng Si Reviewed-by: WANG Xuerui Reviewed-by: Xi Ruoyao Signed-off-by: Thomas Weißschuh Signed-off-by: Huacai Chen commit b828b4bf29d10a3e505a76a39c4daea969e19dc9 Author: Viacheslav Dubeyko Date: Mon Jun 2 11:49:56 2025 -0700 ceph: fix variable dereferenced before check in ceph_umount_begin() smatch warnings: fs/ceph/super.c:1042 ceph_umount_begin() warn: variable dereferenced before check 'fsc' (see line 1041) vim +/fsc +1042 fs/ceph/super.c void ceph_umount_begin(struct super_block *sb) { struct ceph_fs_client *fsc = ceph_sb_to_fs_client(sb); doutc(fsc->client, "starting forced umount\n"); ^^^^^^^^^^^ Dereferenced if (!fsc) ^^^^ Checked too late. return; fsc->mount_state = CEPH_MOUNT_SHUTDOWN; __ceph_umount_begin(fsc); } The VFS guarantees that the superblock is still alive when it calls into ceph via ->umount_begin(). Finally, we don't need to check the fsc and it should be valid. This patch simply removes the fsc check. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202503280852.YDB3pxUY-lkp@intel.com/ Signed-off-by: Viacheslav Dubeyko Reviewed by: Alex Markuze Signed-off-by: Ilya Dryomov commit 800d0b9b6a8b1b354637b4194cc167ad1ce2bdd3 Author: Stephen Smalley Date: Thu Jun 5 12:51:16 2025 -0400 fs/xattr.c: fix simple_xattr_list() commit 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") failed to reset err after the call to security_inode_listsecurity(), which returns the length of the returned xattr name. This results in simple_xattr_list() incorrectly returning this length even if a POSIX acl is also set on the inode. Reported-by: Collin Funk Closes: https://lore.kernel.org/selinux/8734ceal7q.fsf@gmail.com/ Reported-by: Paul Eggert Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2369561 Fixes: 8b0ba61df5a1 ("fs/xattr.c: fix simple_xattr_list to always include security.* xattrs") Signed-off-by: Stephen Smalley Link: https://lore.kernel.org/20250605165116.2063-1-stephen.smalley.work@gmail.com Signed-off-by: Christian Brauner commit 3c4c39cbde6aab4b77bcb12b7879ab5e121f4ca4 Merge: 0ff41df1cb268f 4557cc834712ec Author: Simona Vetter Date: Fri Jun 6 08:21:45 2025 +0200 Merge tag 'drm-misc-fixes-2025-05-28' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: drm-scheduler: - signal scheduled fence when killing job dummycon: - trigger deferred takeover when switching consoles ivpu: - improve logging - update firmware filenames - reorder steps in command-queue unregistering Signed-off-by: Simona Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250528153550.GA21050@linux.fritz.box commit 2da20fd904f87f7bb31b79719bc3dda4093f8cdb Author: Max Kellermann Date: Sun May 4 20:08:31 2025 +0200 kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count Expose a simple counter to userspace for monitoring tools. (akpm: 2536c5c7d6ae added the documentation but the code changes were lost) Link: https://lkml.kernel.org/r/20250504180831.4190860-3-max.kellermann@ionos.com Fixes: 2536c5c7d6ae ("kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count") Signed-off-by: Max Kellermann Cc: Core Minyard Cc: Doug Anderson Cc: Joel Granados Cc: Max Kellermann Cc: Song Liu Cc: Sourabh Jain Signed-off-by: Andrew Morton commit 7266f590ca1fab3adf7c2546894dc418f2d86ba6 Author: Lorenzo Stoakes Date: Wed Jun 4 17:31:39 2025 +0100 MAINTAINERS: add mm swap section In furtherance of ongoing efforts to ensure people are aware of who de-facto maintains/has an interest in specific parts of mm, as well trying to avoid get_maintainers.pl listing only Andrew and the mailing list for mm files - establish a swap memory management section and add relevant maintainers/reviewers. Link: https://lkml.kernel.org/r/20250604163139.126630-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Chris Li Acked-by: Kairui Song Acked-by: Kemeng Shi Acked-by: Baoquan He Acked-by: Barry Song Acked-by: Nhat Pham Signed-off-by: Andrew Morton commit ffa74d44f4b95a97b36a038c66f53e4edeaffb99 Author: Arnd Bergmann Date: Tue Jun 3 09:53:07 2025 +0200 kmsan: test: add module description Every module should have a description, and kbuild now warns for those that don't. WARNING: modpost: missing MODULE_DESCRIPTION() in mm/kmsan/kmsan_test.o Link: https://lkml.kernel.org/r/20250603075323.1839608-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dmitriy Vyukov Cc: Macro Elver Cc: Sabyrzhan Tasbolatov Signed-off-by: Andrew Morton commit 1b11a28308923a67fc76b8f7be06e1b2d80d07ca Author: Tal Zussman Date: Tue Jun 3 18:50:17 2025 -0400 MAINTAINERS: add tlb trace events to MMU GATHER AND TLB INVALIDATION The MMU GATHER AND TLB INVALIDATION entry lists other TLB-related files. Add the tlb.h tracepoint file there as well. Link: https://lore.kernel.org/linux-mm/ce048e11-f79d-44a6-bacc-46e1ebc34b24@redhat.com/ Link: https://lkml.kernel.org/r/20250603-tlb-maintainers-v1-1-726d193c6693@columbia.edu Signed-off-by: Tal Zussman Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Cc: "Aneesh Kumar K.V" Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton commit 1013af4f585fccc4d3e5c5824d174de2257f7d6d Author: Jann Horn Date: Tue May 27 23:23:54 2025 +0200 mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race huge_pmd_unshare() drops a reference on a page table that may have previously been shared across processes, potentially turning it into a normal page table used in another process in which unrelated VMAs can afterwards be installed. If this happens in the middle of a concurrent gup_fast(), gup_fast() could end up walking the page tables of another process. While I don't see any way in which that immediately leads to kernel memory corruption, it is really weird and unexpected. Fix it with an explicit broadcast IPI through tlb_remove_table_sync_one(), just like we do in khugepaged when removing page tables for a THP collapse. Link: https://lkml.kernel.org/r/20250528-hugetlb-fixes-splitrace-v2-2-1329349bad1a@google.com Link: https://lkml.kernel.org/r/20250527-hugetlb-fixes-splitrace-v1-2-f4136f5ec58a@google.com Fixes: 39dde65c9940 ("[PATCH] shared page table for hugetlb page") Signed-off-by: Jann Horn Reviewed-by: Lorenzo Stoakes Cc: Liam Howlett Cc: Muchun Song Cc: Oscar Salvador Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0 Author: Jann Horn Date: Tue May 27 23:23:53 2025 +0200 mm/hugetlb: unshare page tables during VMA split, not before Currently, __split_vma() triggers hugetlb page table unsharing through vm_ops->may_split(). This happens before the VMA lock and rmap locks are taken - which is too early, it allows racing VMA-locked page faults in our process and racing rmap walks from other processes to cause page tables to be shared again before we actually perform the split. Fix it by explicitly calling into the hugetlb unshare logic from __split_vma() in the same place where THP splitting also happens. At that point, both the VMA and the rmap(s) are write-locked. An annoying detail is that we can now call into the helper hugetlb_unshare_pmds() from two different locking contexts: 1. from hugetlb_split(), holding: - mmap lock (exclusively) - VMA lock - file rmap lock (exclusively) 2. hugetlb_unshare_all_pmds(), which I think is designed to be able to call us with only the mmap lock held (in shared mode), but currently only runs while holding mmap lock (exclusively) and VMA lock Backporting note: This commit fixes a racy protection that was introduced in commit b30c14cd6102 ("hugetlb: unshare some PMDs when splitting VMAs"); that commit claimed to fix an issue introduced in 5.13, but it should actually also go all the way back. [jannh@google.com: v2] Link: https://lkml.kernel.org/r/20250528-hugetlb-fixes-splitrace-v2-1-1329349bad1a@google.com Link: https://lkml.kernel.org/r/20250528-hugetlb-fixes-splitrace-v2-0-1329349bad1a@google.com Link: https://lkml.kernel.org/r/20250527-hugetlb-fixes-splitrace-v1-1-f4136f5ec58a@google.com Fixes: 39dde65c9940 ("[PATCH] shared page table for hugetlb page") Signed-off-by: Jann Horn Cc: Liam Howlett Reviewed-by: Lorenzo Stoakes Reviewed-by: Oscar Salvador Cc: Lorenzo Stoakes Cc: Vlastimil Babka Cc: [b30c14cd6102: hugetlb: unshare some PMDs when splitting VMAs] Cc: Signed-off-by: Andrew Morton commit a2946fb271b1e01f49df35042e338cca1bd28095 Author: Alistair Popple Date: Fri May 30 11:49:17 2025 +1000 MAINTAINERS: add Alistair as reviewer of mm memory policy I'm particularly familiar with mm/migrate.c and especially mm/migrate_device.c so add myself to MAINTAINERS. Link: https://lkml.kernel.org/r/20250530014917.2946940-1-apopple@nvidia.com Signed-off-by: Alistair Popple Acked-by: Lorenzo Stoakes Acked-by: Matthew Brost Acked-by: David Hildenbrand Cc: Joshua Hahn Cc: Rakie Kim Cc: Zi Yan Signed-off-by: Andrew Morton commit 334d7c4fb60cf21e0abac134d92fe49e9b04377e Author: Nitesh Shetty Date: Mon Apr 28 15:28:48 2025 +0530 iov_iter: use iov_offset for length calculation in iov_iter_aligned_bvec If iov_offset is non-zero, then we need to consider iov_offset in length calculation, otherwise we might pass smaller IOs such as 512 bytes, in below scenario [1]. This issue is reproducible using lib-uring test/fixed-seg.c application with fixed buffer on a 512 LBA formatted device. [1] At present we pass the alignment check, for 512 LBA formatted devices, len_mask = 511 when IO is smaller, i->count = 512 has an offset, i->io_offset = 3584 with bvec values, bvec->bv_offset = 256, bvec->bv_len = 3840. In short, the first 256 bytes are in the current page, next 256 bytes are in the another page. Ideally we expect to fail the IO. I can think of 2 userspace scenarios where we experience this. a: From userspace, we observe a different behaviour when device LBA size is 512 vs 4096 bytes. For 4096 LBA formatted device, I see the same liburing test [2] failing, whereas 512 the test passes without this. This is reproducible everytime. [2] https://github.com/axboe/liburing/ b: Although I was not able to reproduce the below condition, but I suspect below case should be possible from user space for devices with 512 LBA formatted device. Lets say from userspace while allocating a virtually single chunk of memory, if we get 2 physical chunk of memory, and IO happens to be at the boundary of first physical chunk with length crossing first chunk, then we allow IOs to proceed and hence we might map wrong physical address length and proceed with IO rather than failing. : --- a/test/fixed-seg.c : +++ b/test/fixed-seg.c : @@ -64,7 +64,7 @@ static int test(struct io_uring *ring, int fd, int : vec_off) : return T_EXIT_FAIL; : } : : - ret = read_it(ring, fd, 4096, vec_off); : + ret = read_it(ring, fd, 4096, 7*512 + 256); : if (ret) { : fprintf(stderr, "4096 0 failed\n"); : return T_EXIT_FAIL; Effectively this is a write crossing the page boundary. Link: https://lkml.kernel.org/r/20250428095849.11709-1-nj.shetty@samsung.com Fixes: 2263639f96f2 ("iov_iter: streamline iovec/bvec alignment iteration") Reviewed-by: Jens Axboe Reviewed-by: Anuj Gupta Signed-off-by: Nitesh Shetty Cc: Al Viro Cc: Christian Brauner Cc: Keith Busch Signed-off-by: Andrew Morton commit 41ffaa0ea76206e4fb7589a5a499e6752c33188a Author: Joshua Hahn Date: Mon Jun 2 09:23:39 2025 -0700 mm/mempolicy: fix incorrect freeing of wi_kobj We should not free wi_group->wi_kobj here. In the error path of add_weighted_interleave_group() where this snippet is called from, kobj_{del, put} is immediately called right after this section. Thus, it is not only unnecessary but also incorrect to free it here. Link: https://lkml.kernel.org/r/20250602162345.2595696-1-joshua.hahnjy@gmail.com Fixes: e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning") Signed-off-by: Joshua Hahn Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506011545.Fduxqxqj-lkp@intel.com/ Cc: Alistair Popple Cc: Byungchul Park Cc: David Hildenbrand Cc: Gregory Price Cc: "Huang, Ying" Cc: Mathew Brost Cc: Rakie Kim Cc: Zi Yan Signed-off-by: Andrew Morton commit 044d2aee6c575231ed4a24fb3d119bad0937488b Author: Suren Baghdasaryan Date: Wed May 21 09:06:02 2025 -0700 alloc_tag: handle module codetag load errors as module load failures Failures inside codetag_load_module() are currently ignored. As a result an error there would not cause a module load failure and freeing of the associated resources. Correct this behavior by propagating the error code to the caller and handling possible errors. With this change, error to allocate percpu counters, which happens at this stage, will not be ignored and will cause a module load failure and freeing of resources. With this change we also do not need to disable memory allocation profiling when this error happens, instead we fail to load the module. Link: https://lkml.kernel.org/r/20250521160602.1940771-1-surenb@google.com Fixes: 10075262888b ("alloc_tag: allocate percpu counters for module tags dynamically") Signed-off-by: Suren Baghdasaryan Reported-by: Casey Chen Closes: https://lore.kernel.org/all/20250520231620.15259-1-cachen@purestorage.com/ Cc: Daniel Gomez Cc: David Wang <00107082@163.com> Cc: Kent Overstreet Cc: Luis Chamberalin Cc: Petr Pavlu Cc: Sami Tolvanen Cc: Signed-off-by: Andrew Morton commit 9c49e5d09f076001e05537734d7df002162eb2b5 Author: SeongJae Park Date: Mon Jun 2 10:49:26 2025 -0700 mm/madvise: handle madvise_lock() failure during race unwinding When unwinding race on -ERESTARTNOINTR handling of process_madvise(), madvise_lock() failure is ignored. Check the failure and abort remaining works in the case. Link: https://lkml.kernel.org/r/20250602174926.1074-1-sj@kernel.org Fixes: 4000e3d0a367 ("mm/madvise: remove redundant mmap_lock operations from process_madvise()") Signed-off-by: SeongJae Park Reported-by: Barry Song <21cnbao@gmail.com> Closes: https://lore.kernel.org/CAGsJ_4xJXXO0G+4BizhohSZ4yDteziPw43_uF8nPXPWxUVChzw@mail.gmail.com Reviewed-by: Jann Horn Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Reviewed-by: Shakeel Butt Reviewed-by: Barry Song Cc: Liam Howlett Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 684088173b1852e5f5891a7b2a124b7974cb827d Author: Kirill A. Shutemov Date: Thu May 29 13:38:32 2025 +0300 mm: fix vmstat after removing NR_BOUNCE Hongyu noticed that the nr_unaccepted counter kept growing even in the absence of unaccepted memory on the machine. This happens due to a commit that removed NR_BOUNCE: it removed the counter from the enum zone_stat_item, but left it in the vmstat_text array. As a result, all counters below nr_bounce in /proc/vmstat are shifted by one line, causing the numa_hit counter to be labeled as nr_unaccepted. To fix this issue, remove nr_bounce from the vmstat_text array. Link: https://lkml.kernel.org/r/20250529103832.2937460-1-kirill.shutemov@linux.intel.com Fixes: 194df9f66db8 ("mm: remove NR_BOUNCE zone stat") Signed-off-by: Kirill A. Shutemov Reported-by: Hongyu Ning Reviewed-by: Jens Axboe Reviewed-by: Vlastimil Babka Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Jens Axboe Signed-off-by: Andrew Morton commit 15ac613f124e51a6623975efad9657b1f3ee47e7 Author: Lorenzo Stoakes Date: Mon May 19 15:56:57 2025 +0100 KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY The enum type prot_type declared in arch/s390/kvm/gaccess.c declares an unfortunate identifier within it - PROT_NONE. This clashes with the protection bit define from the uapi for mmap() declared in include/uapi/asm-generic/mman-common.h, which is indeed what those casually reading this code would assume this to refer to. This means that any changes which subsequently alter headers in any way which results in the uapi header being imported here will cause build errors. Resolve the issue by renaming PROT_NONE to PROT_TYPE_DUMMY. Link: https://lkml.kernel.org/r/20250519145657.178365-1-lorenzo.stoakes@oracle.com Fixes: b3cefd6bf16e ("KVM: s390: Pass initialized arg even if unused") Signed-off-by: Lorenzo Stoakes Suggested-by: Ignacio Moreno Gonzalez Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505140943.IgHDa9s7-lkp@intel.com/ Acked-by: Christian Borntraeger Acked-by: Ignacio Moreno Gonzalez Acked-by: Yang Shi Reviewed-by: David Hildenbrand Acked-by: Liam R. Howlett Reviewed-by: Oscar Salvador Reviewed-by: Claudio Imbrenda Cc: Cc: Alexander Gordeev Cc: Heiko Carstens Cc: James Houghton Cc: Janosch Frank Cc: Matthew Wilcox (Oracle) Cc: Paolo Bonzini Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit efe99fabeb11b030c89a7dc5a5e7a7558d0dc7ec Author: Pu Lehui Date: Thu May 29 15:56:50 2025 +0000 selftests/mm: add test about uprobe pte be orphan during vma merge Add test about uprobe pte be orphan during vma merge. [akpm@linux-foundation.org: include sys/syscall.h, per Lorenzo] Link: https://lkml.kernel.org/r/20250529155650.4017699-5-pulehui@huaweicloud.com Signed-off-by: Pu Lehui Cc: Jann Horn Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: "Masami Hiramatsu (Google)" Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 6fb6223347d5d9512875120267c117e7437f0db6 Author: Pu Lehui Date: Thu May 29 15:56:49 2025 +0000 selftests/mm: extract read_sysfs and write_sysfs into vm_util Extract read_sysfs and write_sysfs into vm_util. Meanwhile, rename the function in thuge-gen that has the same name as read_sysfs. Link: https://lkml.kernel.org/r/20250529155650.4017699-4-pulehui@huaweicloud.com Signed-off-by: Pu Lehui Reviewed-by: Lorenzo Stoakes Cc: Jann Horn Cc: Liam Howlett Cc: "Masami Hiramatsu (Google)" Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit b36b701bbcd9f7b24c0d98499c28895b55fdde81 Author: Pu Lehui Date: Thu May 29 15:56:48 2025 +0000 mm: expose abnormal new_pte during move_ptes When executing move_ptes, the new_pte must be NULL, otherwise it will be overwritten by the old_pte, and cause the abnormal new_pte to be leaked. In order to make this problem to be more explicit, let's add WARN_ON_ONCE when new_pte is not NULL. [akpm@linux-foundation.org: s/WARN_ON_ONCE/VM_WARN_ON_ONCE/] Link: https://lkml.kernel.org/r/20250529155650.4017699-3-pulehui@huaweicloud.com Suggested-by: Oleg Nesterov Signed-off-by: Pu Lehui Reviewed-by: Lorenzo Stoakes Cc: Jann Horn Cc: Liam Howlett Cc: "Masami Hiramatsu (Google)" Cc: Peter Zijlstra Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 2b12d06c37fd3a394376f42f026a7478d826ed63 Author: Pu Lehui Date: Thu May 29 15:56:47 2025 +0000 mm: fix uprobe pte be overwritten when expanding vma Patch series "Fix uprobe pte be overwritten when expanding vma". This patch (of 4): We encountered a BUG alert triggered by Syzkaller as follows: BUG: Bad rss-counter state mm:00000000b4a60fca type:MM_ANONPAGES val:1 And we can reproduce it with the following steps: 1. register uprobe on file at zero offset 2. mmap the file at zero offset: addr1 = mmap(NULL, 2 * 4096, PROT_NONE, MAP_PRIVATE, fd, 0); 3. mremap part of vma1 to new vma2: addr2 = mremap(addr1, 4096, 2 * 4096, MREMAP_MAYMOVE); 4. mremap back to orig addr1: mremap(addr2, 4096, 4096, MREMAP_MAYMOVE | MREMAP_FIXED, addr1); In step 3, the vma1 range [addr1, addr1 + 4096] will be remap to new vma2 with range [addr2, addr2 + 8192], and remap uprobe anon page from the vma1 to vma2, then unmap the vma1 range [addr1, addr1 + 4096]. In step 4, the vma2 range [addr2, addr2 + 4096] will be remap back to the addr range [addr1, addr1 + 4096]. Since the addr range [addr1 + 4096, addr1 + 8192] still maps the file, it will take vma_merge_new_range to expand the range, and then do uprobe_mmap in vma_complete. Since the merged vma pgoff is also zero offset, it will install uprobe anon page to the merged vma. However, the upcomming move_page_tables step, which use set_pte_at to remap the vma2 uprobe pte to the merged vma, will overwrite the newly uprobe pte in the merged vma, and lead that pte to be orphan. Since the uprobe pte will be remapped to the merged vma, we can remove the unnecessary uprobe_mmap upon merged vma. This problem was first found in linux-6.6.y and also exists in the community syzkaller: https://lore.kernel.org/all/000000000000ada39605a5e71711@google.com/T/ Link: https://lkml.kernel.org/r/20250529155650.4017699-1-pulehui@huaweicloud.com Link: https://lkml.kernel.org/r/20250529155650.4017699-2-pulehui@huaweicloud.com Fixes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints") Signed-off-by: Pu Lehui Suggested-by: Lorenzo Stoakes Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Cc: Jann Horn Cc: Liam Howlett Cc: "Masami Hiramatsu (Google)" Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit ea68ea9091d3d3c297a4c40efd837e0d9e12c88b Author: Enze Li Date: Fri May 30 13:31:15 2025 +0800 mm/damon: s/primitives/code/ on comments The word 'primitive' is not explicit. To make the code more easily understood, this commit renames 'primitives' to 'code' in header comments of some source files. Link: https://lkml.kernel.org/r/20250530053115.153238-1-lienze@kylinos.cn Signed-off-by: Enze Li Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 04c8970771b4f1f39bb8453a2eeb188c4d5edbd6 Author: Chen Ni Date: Tue Jun 3 14:10:27 2025 +0800 drm/nouveau/vfn/r535: Convert comma to semicolon Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni Fixes: cd3c62282b61 ("drm/nouveau/gsp: add usermode class id to gpu hal") Signed-off-by: Dave Airlie Link: https://lore.kernel.org/r/20250603061027.1310267-1-nichen@iscas.ac.cn commit a9062ece98d8d811958022763e573a17f6c1bfa8 Merge: 4f577bed5ca7bc 8b5f3a229a70d2 Author: Dave Airlie Date: Fri Jun 6 13:23:04 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-06-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.16-2025-06-05: amdgpu: - IP discovery fix - Cleaner shader fix for GC 10.1.x - OD fix - UserQ fixes - Non-OLED panel fix - Misc display fixes - Brightness fixes amdkfd: - Enable CONFIG_HSA_AMD on RISCV Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250606015932.835829-1-alexander.deucher@amd.com commit 4f577bed5ca7bc8f16da7e422faa688e7e2f8524 Merge: 27bba8864480cd 7c7c5cb5b5bf9d Author: Dave Airlie Date: Fri Jun 6 11:37:01 2025 +1000 Merge tag 'drm-xe-next-fixes-2025-06-05' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - A couple of vm init fixes (Matt Auld) - Hwmon fixes (Karthik) - Drop reduntant conversion to bool (Raag) - Fix CONFIG_INTEL_VSEC dependency (Arnd) - Rework eviction rejection of bound external bos (Thomas) - Stop re-submitting signalled jobs (Matt Auld) - A couple of pxp fixes (Daniele) - Add back a fix that got lost in a merge (Matt Auld) - Create LRC bo without VM (Niranjana) - Fix for the above fix (Maciej) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aEHq44uIAZwfK-mG@fedora commit 27bba8864480cd1633e3702594823036ca1f9cd1 Merge: df9d4941827182 fd03f82a026cc0 Author: Dave Airlie Date: Fri Jun 6 11:32:13 2025 +1000 Merge tag 'drm-misc-next-fixes-2025-06-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-fixes for v6.16-rc1: - Fixes for nt37801 panel - Fix null deref in HDMI audio helper. - Fixes for analogix_dp. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/14c2eff8-701d-4699-b187-08862715e1ac@linux.intel.com commit 87f7ce260a3c838b49e1dc1ceedf1006795157a2 Author: Jeongjun Park Date: Wed May 21 01:07:17 2025 +0900 ptp: remove ptp->n_vclocks check logic in ptp_vclock_in_use() There is no disagreement that we should check both ptp->is_virtual_clock and ptp->n_vclocks to check if the ptp virtual clock is in use. However, when we acquire ptp->n_vclocks_mux to read ptp->n_vclocks in ptp_vclock_in_use(), we observe a recursive lock in the call trace starting from n_vclocks_store(). ============================================ WARNING: possible recursive locking detected 6.15.0-rc6 #1 Not tainted -------------------------------------------- syz.0.1540/13807 is trying to acquire lock: ffff888035a24868 (&ptp->n_vclocks_mux){+.+.}-{4:4}, at: ptp_vclock_in_use drivers/ptp/ptp_private.h:103 [inline] ffff888035a24868 (&ptp->n_vclocks_mux){+.+.}-{4:4}, at: ptp_clock_unregister+0x21/0x250 drivers/ptp/ptp_clock.c:415 but task is already holding lock: ffff888030704868 (&ptp->n_vclocks_mux){+.+.}-{4:4}, at: n_vclocks_store+0xf1/0x6d0 drivers/ptp/ptp_sysfs.c:215 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ptp->n_vclocks_mux); lock(&ptp->n_vclocks_mux); *** DEADLOCK *** .... ============================================ The best way to solve this is to remove the logic that checks ptp->n_vclocks in ptp_vclock_in_use(). The reason why this is appropriate is that any path that uses ptp->n_vclocks must unconditionally check if ptp->n_vclocks is greater than 0 before unregistering vclocks, and all functions are already written this way. And in the function that uses ptp->n_vclocks, we already get ptp->n_vclocks_mux before unregistering vclocks. Therefore, we need to remove the redundant check for ptp->n_vclocks in ptp_vclock_in_use() to prevent recursive locking. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Signed-off-by: Jeongjun Park Acked-by: Richard Cochran Link: https://patch.msgid.link/20250520160717.7350-1-aha310510@gmail.com Signed-off-by: Jakub Kicinski commit 692eb9f8a5b71d852e873375d20cf5da7a046ea6 Author: Jonas Gorski Date: Mon Jun 2 21:49:14 2025 +0200 net: dsa: b53: fix untagged traffic sent via cpu tagged with VID 0 When Linux sends out untagged traffic from a port, it will enter the CPU port without any VLAN tag, even if the port is a member of a vlan filtering bridge with a PVID egress untagged VLAN. This makes the CPU port's PVID take effect, and the PVID's VLAN table entry controls if the packet will be tagged on egress. Since commit 45e9d59d3950 ("net: dsa: b53: do not allow to configure VLAN 0") we remove bridged ports from VLAN 0 when joining or leaving a VLAN aware bridge. But we also clear the untagged bit, causing untagged traffic from the controller to become tagged with VID 0 (and priority 0). Fix this by not touching the untagged map of VLAN 0. Additionally, always keep the CPU port as a member, as the untag map is only effective as long as there is at least one member, and we would remove it when bridging all ports and leaving no standalone ports. Since Linux (and the switch) treats VLAN 0 tagged traffic like untagged, the actual impact of this is rather low, but this also prevented earlier detection of the issue. Fixes: 45e9d59d3950 ("net: dsa: b53: do not allow to configure VLAN 0") Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250602194914.1011890-1-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski commit df9d49418271826bb35eb85f43cbcc6160f7002f Merge: 61a4b7d7d56cdb 791d76005de0ab Author: Dave Airlie Date: Fri Jun 6 09:08:29 2025 +1000 Merge tag 'drm-intel-next-fixes-2025-06-05' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Fix PSR register definitions for ALPM - Fix u32 overflow in SNPS PHY HDMI PLL setup - Fix GuC pending message underflow when submit fails - Fix GuC wakeref underflow race during reset Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aEFW1wGnt1kTVNGF@jlahtine-mobl commit 400123bd0107175e92a9780b97f7a5934eb0a991 Author: Andrej Picej Date: Thu May 29 07:36:53 2025 +0200 dt-bindings: drm/bridge: ti-sn65dsi83: drop $ref to fix lvds-vod* warnings The kernel test robot reported a warning related to the use of "$ref" type definitions for custom endpoint properties - "ti,lvds-vod-swing-clock-microvolt" and - "ti,lvds-vod-swing-data-microvolt". Using "$ref" with "uint32-array" is not correctly handled in this context. Removing "$ref" and relying solely on "maxItems: 2" enforces the intended requirement of specifying exactly two values, without triggering a schema validation warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505021937.efnQPPqx-lkp@intel.com/ Signed-off-by: Andrej Picej Link: https://lore.kernel.org/r/20250529053654.1754926-1-andrej.picej@norik.com Signed-off-by: Rob Herring (Arm) commit 51f1b16367dfde89a4ef5bee2270f6a4d523ef3b Merge: a921f0753a4c15 7977448bf374f6 Author: Palmer Dabbelt Date: Thu Jun 5 11:42:35 2025 -0700 Merge patch series "riscv: add SBI FWFT misaligned exception delegation support" Clément Léger says: The SBI Firmware Feature extension allows the S-mode to request some specific features (either hardware or software) to be enabled. This series uses this extension to request misaligned access exception delegation to S-mode in order to let the kernel handle it. It also adds support for the KVM FWFT SBI extension based on the misaligned access handling infrastructure. FWFT SBI extension is part of the SBI V3.0 specifications [1]. It can be tested using the qemu provided at [2] which contains the series from [3]. Upstream kvm-unit-tests can be used inside kvm to tests the correct delegation of misaligned exceptions. Upstream OpenSBI can be used. The tests can be run using the kselftest from series [4]. $ qemu-system-riscv64 \ -cpu rv64,trap-misaligned-access=true,v=true \ -M virt \ -m 1024M \ -bios fw_dynamic.bin \ -kernel Image ... # ./misaligned TAP version 13 1..23 # Starting 23 tests from 1 test cases. # RUN global.gp_load_lh ... # OK global.gp_load_lh ok 1 global.gp_load_lh # RUN global.gp_load_lhu ... # OK global.gp_load_lhu ok 2 global.gp_load_lhu # RUN global.gp_load_lw ... # OK global.gp_load_lw ok 3 global.gp_load_lw # RUN global.gp_load_lwu ... # OK global.gp_load_lwu ok 4 global.gp_load_lwu # RUN global.gp_load_ld ... # OK global.gp_load_ld ok 5 global.gp_load_ld # RUN global.gp_load_c_lw ... # OK global.gp_load_c_lw ok 6 global.gp_load_c_lw # RUN global.gp_load_c_ld ... # OK global.gp_load_c_ld ok 7 global.gp_load_c_ld # RUN global.gp_load_c_ldsp ... # OK global.gp_load_c_ldsp ok 8 global.gp_load_c_ldsp # RUN global.gp_load_sh ... # OK global.gp_load_sh ok 9 global.gp_load_sh # RUN global.gp_load_sw ... # OK global.gp_load_sw ok 10 global.gp_load_sw # RUN global.gp_load_sd ... # OK global.gp_load_sd ok 11 global.gp_load_sd # RUN global.gp_load_c_sw ... # OK global.gp_load_c_sw ok 12 global.gp_load_c_sw # RUN global.gp_load_c_sd ... # OK global.gp_load_c_sd ok 13 global.gp_load_c_sd # RUN global.gp_load_c_sdsp ... # OK global.gp_load_c_sdsp ok 14 global.gp_load_c_sdsp # RUN global.fpu_load_flw ... # OK global.fpu_load_flw ok 15 global.fpu_load_flw # RUN global.fpu_load_fld ... # OK global.fpu_load_fld ok 16 global.fpu_load_fld # RUN global.fpu_load_c_fld ... # OK global.fpu_load_c_fld ok 17 global.fpu_load_c_fld # RUN global.fpu_load_c_fldsp ... # OK global.fpu_load_c_fldsp ok 18 global.fpu_load_c_fldsp # RUN global.fpu_store_fsw ... # OK global.fpu_store_fsw ok 19 global.fpu_store_fsw # RUN global.fpu_store_fsd ... # OK global.fpu_store_fsd ok 20 global.fpu_store_fsd # RUN global.fpu_store_c_fsd ... # OK global.fpu_store_c_fsd ok 21 global.fpu_store_c_fsd # RUN global.fpu_store_c_fsdsp ... # OK global.fpu_store_c_fsdsp ok 22 global.fpu_store_c_fsdsp # RUN global.gen_sigbus ... [12797.988647] misaligned[618]: unhandled signal 7 code 0x1 at 0x0000000000014dc0 in misaligned[4dc0,10000+76000] [12797.988990] CPU: 0 UID: 0 PID: 618 Comm: misaligned Not tainted 6.13.0-rc6-00008-g4ec4468967c9-dirty #51 [12797.989169] Hardware name: riscv-virtio,qemu (DT) [12797.989264] epc : 0000000000014dc0 ra : 0000000000014d00 sp : 00007fffe165d100 [12797.989407] gp : 000000000008f6e8 tp : 0000000000095760 t0 : 0000000000000008 [12797.989544] t1 : 00000000000965d8 t2 : 000000000008e830 s0 : 00007fffe165d160 [12797.989692] s1 : 000000000000001a a0 : 0000000000000000 a1 : 0000000000000002 [12797.989831] a2 : 0000000000000000 a3 : 0000000000000000 a4 : ffffffffdeadbeef [12797.989964] a5 : 000000000008ef61 a6 : 626769735f6e0000 a7 : fffffffffffff000 [12797.990094] s2 : 0000000000000001 s3 : 00007fffe165d838 s4 : 00007fffe165d848 [12797.990238] s5 : 000000000000001a s6 : 0000000000010442 s7 : 0000000000010200 [12797.990391] s8 : 000000000000003a s9 : 0000000000094508 s10: 0000000000000000 [12797.990526] s11: 0000555567460668 t3 : 00007fffe165d070 t4 : 00000000000965d0 [12797.990656] t5 : fefefefefefefeff t6 : 0000000000000073 [12797.990756] status: 0000000200004020 badaddr: 000000000008ef61 cause: 0000000000000006 [12797.990911] Code: 8793 8791 3423 fcf4 3783 fc84 c737 dead 0713 eef7 (c398) 0001 # OK global.gen_sigbus ok 23 global.gen_sigbus # PASSED: 23 / 23 tests passed. # Totals: pass:23 fail:0 xfail:0 xpass:0 skip:0 error:0 With kvm-tools: # lkvm run -k sbi.flat -m 128 Info: # lkvm run -k sbi.flat -m 128 -c 1 --name guest-97 Info: Removed ghost socket file "/root/.lkvm//guest-97.sock". ########################################################################## # kvm-unit-tests ########################################################################## ... [test messages elided] PASS: sbi: fwft: FWFT extension probing no error PASS: sbi: fwft: get/set reserved feature 0x6 error == SBI_ERR_DENIED PASS: sbi: fwft: get/set reserved feature 0x3fffffff error == SBI_ERR_DENIED PASS: sbi: fwft: get/set reserved feature 0x80000000 error == SBI_ERR_DENIED PASS: sbi: fwft: get/set reserved feature 0xbfffffff error == SBI_ERR_DENIED PASS: sbi: fwft: misaligned_deleg: Get misaligned deleg feature no error PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature invalid value error PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature invalid value error PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature value no error PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature value 0 PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature value no error PASS: sbi: fwft: misaligned_deleg: Set misaligned deleg feature value 1 PASS: sbi: fwft: misaligned_deleg: Verify misaligned load exception trap in supervisor SUMMARY: 50 tests, 2 unexpected failures, 12 skipped This series is available at [5]. [Palmer: slighyt commit text modification, as SBI-3.0 is merged now. Also drop the KVM patches, as they're too late.] * b4-shazam-merge: riscv: misaligned: add a function to check misalign trap delegability riscv: misaligned: move emulated access uniformity check in a function riscv: misaligned: declare misaligned_access_speed under CONFIG_RISCV_MISALIGNED riscv: misaligned: use on_each_cpu() for scalar misaligned access probing riscv: misaligned: request misaligned exception from SBI riscv: sbi: add SBI FWFT extension calls riscv: sbi: add FWFT extension interface riscv: sbi: add new SBI error mappings riscv: sbi: remove useless parenthesis riscv: sbi: add Firmware Feature (FWFT) SBI extensions definitions Link: https://lore.kernel.org/r/20250523101932.1594077-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit a921f0753a4c152ba6ebb215b224dd1d04420d26 Merge: 265d6aba165c50 ca1a66cdd68503 Author: Palmer Dabbelt Date: Thu Jun 5 11:39:22 2025 -0700 Merge patch series "riscv: misaligned: fix misaligned accesses handling in put/get_user()" Clément Léger says: While debugging a few problems with the misaligned access kselftest, Alexandre discovered some crash with the current code. Indeed, some misaligned access was done by the kernel using put_user(). This was resulting in trap and a kernel crash since. The path was the following: user -> kernel -> access to user memory -> misaligned trap -> trap -> kernel -> misaligned handling -> memcpy -> crash due to failed page fault while in interrupt disabled section. Last discussion about kernel misaligned handling and interrupt reenabling were actually not to reenable interrupt when handling misaligned access being done by kernel. The best solution being not to do any misaligned accesses to userspace memory, we considered a few options: - Remove any call to put/get_user() potentially doing misaligned accesses - Do not do any misaligned accesses in put/get_user() itself The second solution was the one chosen as there are too many callsites to put/get_user() that could potentially do misaligned accesses. We tried two approaches for that, either split access in two aligned accesses (and do RMW for put_user()) or call copy_from/to_user() which does not do any misaligned accesses. The later one was the simpler to implement (although the performances are probably lower than split aligned accesses but still way better than doing misaligned access emulation) and allows to support what we wanted. These commits are based on top of Alex dev/alex/get_user_misaligned_v1 branch. [Palmer: No idea what that branch is, so I'm basing it on the uaccess optimizations patch series which is the last thing to touch these.] * b4-shazam-merge riscv: uaccess: do not do misaligned accesses in get/put_user() riscv: process: use unsigned int instead of unsigned long for put_user() riscv: make unsafe user copy routines use existing assembly routines Link: https://lore.kernel.org/r/20250602193918.868962-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 265d6aba165c500389c80d394ac247460c443ef5 Author: Cyril Bur Date: Mon Jun 2 12:15:43 2025 +0000 riscv: uaccess: Only restore the CSR_STATUS SUM bit During switch to csrs will OR the value of the register into the corresponding csr. In this case we're only interested in restoring the SUM bit not the entire register. Signed-off-by: Cyril Bur Link: https://lore.kernel.org/r/20250522160954.429333-1-cyrilbur@tenstorrent.com Co-developed-by: Alexandre Ghiti Signed-off-by: Alexandre Ghiti Fixes: 788aa64c01f1 ("riscv: save the SR_SUM status over switches") Link: https://lore.kernel.org/r/20250602121543.1544278-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2670a39b1ea68fb0b9175e26e299f3fe974e0332 Merge: 7bc76fb3883aab ee0d03053e7009 Author: Palmer Dabbelt Date: Thu Jun 5 11:23:07 2025 -0700 Merge tag 'riscv-mw2-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into for-next riscv patches for 6.16-rc1, part 2 * Performance improvements - Add support for vdso getrandom - Implement raid6 calculations using vectors - Introduce svinval tlb invalidation * Cleanup - A bunch of deduplication of the macros we use for manipulating instructions * Misc - Introduce a kunit test for kprobes - Add support for mseal as riscv fits the requirements (thanks to Lorenzo for making sure of that :)) [Palmer: There was a rebase between part 1 and part 2, so I've had to do some more git surgery here... at least two rounds of surgery...] * alex-pr-2: (866 commits) RISC-V: vDSO: Wire up getrandom() vDSO implementation riscv: enable mseal sysmap for RV64 raid6: Add RISC-V SIMD syndrome and recovery calculations riscv: mm: Add support for Svinval extension riscv: Add kprobes KUnit test riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG riscv: kproves: Remove duplication of RVC_EXTRACT_JTYPE_IMM riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM riscv: kprobes: Move branch_funct3 to insn.h riscv: kprobes: Move branch_rs2_idx to insn.h Linux 6.15-rc6 Input: xpad - fix xpad_device sorting Input: xpad - add support for several more controllers Input: xpad - fix Share button on Xbox One controllers ... commit ee0d03053e7009a3a3532fb37f6c94bfa0a8cca3 Author: Xi Ruoyao Date: Fri Apr 11 10:46:00 2025 +0800 RISC-V: vDSO: Wire up getrandom() vDSO implementation Hook up the generic vDSO implementation to the generic vDSO getrandom implementation by providing the required __arch_chacha20_blocks_nostack and getrandom_syscall implementations. Also wire up the selftests. The benchmark result: vdso: 25000000 times in 2.466341333 seconds libc: 25000000 times in 41.447720005 seconds syscall: 25000000 times in 41.043926672 seconds vdso: 25000000 x 256 times in 162.286219353 seconds libc: 25000000 x 256 times in 2953.855018685 seconds syscall: 25000000 x 256 times in 2796.268546000 seconds [ alex: - Fix dynamic relocation - Squash Nathan's fix https://lore.kernel.org/all/20250423-riscv-fix-compat_vdso-lld-v2-1-b7bbbc244501@kernel.org/ - Add comment from Loongarch ] Signed-off-by: Xi Ruoyao Link: https://lore.kernel.org/r/20250411024600.16045-1-xry111@xry111.site Tested-by: Alexandre Ghiti Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit a869b8c29f864b9530a6473a30c09546333b571a Author: Jisheng Zhang Date: Sat Apr 26 21:59:54 2025 +0800 riscv: enable mseal sysmap for RV64 Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS for RV64, covering the vdso, vvar. Passed sysmap_is_sealed and mseal_test self tests. Passed booting a buildroot rootfs image and a cli debian rootfs image. Signed-off-by: Jisheng Zhang Cc: Jeff Xu Link: https://lore.kernel.org/r/20250426135954.5614-1-jszhang@kernel.org Tested-by: Alexandre Ghiti Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 6093faaf9593fca92f96f165c95ff4b53353b1f4 Author: Chunyan Zhang Date: Wed Mar 5 16:37:06 2025 +0800 raid6: Add RISC-V SIMD syndrome and recovery calculations The assembly is originally based on the ARM NEON and int.uc, but uses RISC-V vector instructions to implement the RAID6 syndrome and recovery calculations. The functions are tested on QEMU running with the option "-icount shift=0": raid6: rvvx1 gen() 1008 MB/s raid6: rvvx2 gen() 1395 MB/s raid6: rvvx4 gen() 1584 MB/s raid6: rvvx8 gen() 1694 MB/s raid6: int64x8 gen() 113 MB/s raid6: int64x4 gen() 116 MB/s raid6: int64x2 gen() 272 MB/s raid6: int64x1 gen() 229 MB/s raid6: using algorithm rvvx8 gen() 1694 MB/s raid6: .... xor() 1000 MB/s, rmw enabled raid6: using rvv recovery algorithm [Charlie: - Fixup vector options] Signed-off-by: Charlie Jenkins Signed-off-by: Chunyan Zhang Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250305083707.74218-1-zhangchunyan@iscas.ac.cn Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit a56972698810089d8f1bdc296cd709726db7176b Author: Mayuresh Chitale Date: Tue Jul 2 15:56:37 2024 +0530 riscv: mm: Add support for Svinval extension The Svinval extension splits SFENCE.VMA instruction into finer-grained invalidation and ordering operations and is mandatory for RVA23S64 profile. When Svinval is enabled the local_flush_tlb_range_threshold_asid function should use the following sequence to optimize the tlb flushes instead of a simple sfence.vma: sfence.w.inval svinval.vma . . svinval.vma sfence.inval.ir The maximum number of consecutive svinval.vma instructions that can be executed in local_flush_tlb_range_threshold_asid function is limited to 64. This is required to avoid soft lockups and the approach is similar to that used in arm64. Signed-off-by: Mayuresh Chitale Reviewed-by: Andrew Jones Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240702102637.9074-1-mchitale@ventanamicro.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 481d5c31e14347aef33ab715f79831873a60c6e2 Author: Masahiro Yamada Date: Tue Jun 3 03:11:41 2025 +0900 efi/libstub: use 'targets' instead of extra-y in Makefile These objects are built as prerequisites of %.stub.o files. There is no need to use extra-y, which is planned for deprecation. Acked-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada commit 8c21c4111128365f81a88573eeb2844fa696b299 Author: Masahiro Yamada Date: Mon Jun 2 19:55:36 2025 +0900 module: make __mod_device_table__* symbols static The __mod_device_table__* symbols are only parsed by modpost to generate MODULE_ALIAS() entries from MODULE_DEVICE_TABLE(). Therefore, these symbols do not need to be globally visible, or globally unique. If they are in the global scope, we would worry about the symbol uniqueness, but modpost is fine with parsing multiple symbols with the same name. Signed-off-by: Masahiro Yamada Reviewed-by: Petr Pavlu commit 7d95680d64ac8e836c35fd56efe77eac4e9cc26b Author: Masahiro Yamada Date: Sun Jun 1 22:31:30 2025 +0900 scripts/misc-check: check unnecessary #include when W=1 Another issue with is that it is sometimes included even when EXPORT_SYMBOL() is not used at all. Some headers (e.g. include/linux/linkage.h>) cannot be fixed for now for the reason described in the previous commit. This commit adds a warning for *.c files that include but do not use EXPORT_SYMBOL() when the kernel is built with W=1. Signed-off-by: Masahiro Yamada commit a934a57a42f64a40705202f84144b1a29b29f910 Author: Masahiro Yamada Date: Sun Jun 1 22:31:29 2025 +0900 scripts/misc-check: check missing #include when W=1 The problem was described in commit 5b20755b7780 ("init: move THIS_MODULE from to "). To summarize it again here: is included by most C files, even though only some of them actually export symbols. This is because some headers, such as include/linux/{module.h,linkage}, needlessly include . I have added a more detailed explanation in the comments of scripts/misc-check. This problem will be fixed in two steps: 1. Add #include directly to C files that use EXPORT_SYMBOL() 2. Remove #include from header files that do not use EXPORT_SYMBOL() This commit addresses step 1; scripts/misc-check will warn about *.[ch] files that use EXPORT_SYMBOL() but do not include . This check is only triggered when the kernel is built with W=1. We need to fix 4000+ files. I hope others will help with this effort. Signed-off-by: Masahiro Yamada commit 3a44052b728e5d96ea425f908e71926364a12f11 Author: Masahiro Yamada Date: Sun Jun 1 22:31:28 2025 +0900 scripts/misc-check: add double-quotes to satisfy shellcheck In scripts/misc-check line 8: git -C ${srctree:-.} ls-files -i -c --exclude-per-directory=.gitignore 2>/dev/null | ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Signed-off-by: Masahiro Yamada commit 89e7fecf5ce2e85a323e58f09aa808218a37079a Author: Masahiro Yamada Date: Sun Jun 1 22:31:27 2025 +0900 kbuild: move W=1 check for scripts/misc-check to top-level Makefile This script is executed only when ${KBUILD_EXTRA_WARN} contains 1. Move this check to the top-level Makefile to allow more checks to be easily added to this script. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit a503a313108e26402151f25c1f2628ec91bda605 Author: Masatake YAMATO Date: Fri May 30 04:46:33 2025 +0900 scripts/tags.sh: allow to use alternative ctags implementation Some ctags implementations are available. With this change, You can specify your favorite one with CTAGS environment variable. Signed-off-by: Masatake YAMATO Signed-off-by: Masahiro Yamada commit 0f57c75973bedc08a865b06ce1b73ae5b54477c0 Author: Masahiro Yamada Date: Wed May 28 02:56:15 2025 +0900 kconfig: introduce menu type enum Currently, menu->prompt->type is checked to distinguish "comment" (P_COMMENT) and "menu" (P_MENU) entries from regular "config" entries. This is odd because P_COMMENT and P_MENU are not properties. This commit introduces menu type enum to distinguish menu types more naturally. Signed-off-by: Masahiro Yamada commit 94145ffb07601674091aadbdca9ce004b1736df4 Author: Khaled Elnaggar Date: Tue May 27 00:10:39 2025 +0300 docs: symbol-namespaces: fix reST warning with literal block Use a literal block for the EXPORT_SYMBOL_GPL_FOR_MODULES() example to avoid a Docutils warning about unmatched '*'. This ensures correct rendering and keeps the source readable. Warning: Documentation/core-api/symbol-namespaces.rst:90: WARNING: Inline emphasis start-string without end-string. [docutils] Signed-off-by: Khaled Elnaggar Reviewed-by: Bagas Sanjaya Signed-off-by: Masahiro Yamada commit 41a77d43f36d3b897755a223b264c45131546b8b Author: Masahiro Yamada Date: Mon May 26 18:07:52 2025 +0900 kbuild: link lib-y objects to vmlinux forcibly even when CONFIG_MODULES=n Since commit 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y"), all objects from lib-y have been forcibly linked to vmlinux when CONFIG_MODULES=y. To simplify future changes, this commit makes all objects from lib-y be linked regardless of the CONFIG_MODULES setting. Most use cases (CONFIG_MODULES=y) are not affected by this change. The vmlinux size with ARCH=arm allnoconfig, where CONFIG_MODULES=n, increases as follows: text data bss dec hex filename 1368644 835104 206288 2410036 24c634 vmlinux.before 1379440 837064 206288 2422792 24f808 vmlinux.after We no longer benefit from using static libraries, but the impact is mitigated by supporting CONFIG_LD_DEAD_CODE_DATA_ELIMINATION. For example, the size of vmlinux remains almost the same with ARCH=arm tinyconfig, where CONFIG_MODULES=n and CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y. text data bss dec hex filename 455316 93404 15472 564192 89be0 vmlinux.before 455312 93404 15472 564188 89bdc vmlinux.after Signed-off-by: Masahiro Yamada commit 81a93bf93f0e5963d8695a3596ac50b5ceea87c3 Author: Masahiro Yamada Date: Mon May 26 18:07:51 2025 +0900 tinyconfig: enable CONFIG_LD_DEAD_CODE_DATA_ELIMINATION This CONFIG option, if supported by the architecture, helps reduce the size of vmlinux. For example, the size of vmlinux with ARCH=arm tinyconfig decreases as follows: text data bss dec hex filename 631684 104500 18176 754360 b82b8 vmlinux.before 455316 93404 15472 564192 89be0 vmlinux.after Signed-off-by: Masahiro Yamada commit e271ed52b344ac02d4581286961d0c40acc54c03 Merge: 2c7e4a2663a1ab 8887abccf8aa16 Author: Linus Torvalds Date: Thu Jun 5 12:47:12 2025 -0700 Merge tag 'pm-6.16-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix three issues introduced into device suspend/resume error paths in the PM core by some of the recent updates. First off, replace list_splice() with list_splice_init() in three places in device suspend error paths to avoid attempting to use an uninitialized list head going forward. Second, rearrange device_resume() to avoid leaking the power.is_suspended device PM flag to the next system suspend/resume cycle where it can confuse rolling back after an error or early wakeup. Finally, add synchronization to dpm_async_resume_children() to avoid resetting the async state mistakenly for devices whose resume callbacks have already been queued up for asynchronous execution in the given device resume phase, which fortunately can happen only if the preceding system suspend transition has been aborted" * tag 'pm-6.16-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: Add locking to dpm_async_resume_children() PM: sleep: Fix power.is_suspended cleanup for direct-complete devices PM: sleep: Fix list splicing in device suspend error paths commit 2c7e4a2663a1ab5a740c59c31991579b6b865a26 Merge: 71052a800371c6 3cae906e1a6184 Author: Linus Torvalds Date: Thu Jun 5 12:34:55 2025 -0700 Merge tag 'net-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from CAN, wireless, Bluetooth, and Netfilter. Current release - regressions: - Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests", makes kunit error out if compiler is old - wifi: iwlwifi: mvm: fix assert on suspend - rxrpc: fix return from none_validate_challenge() Current release - new code bugs: - ovpn: couple of fixes for socket cleanup and UDP-tunnel teardown - can: kvaser_pciefd: refine error prone echo_skb_max handling logic - fix net_devmem_bind_dmabuf() stub when DEVMEM not compiled - eth: airoha: fixes for config / accel in bridge mode Previous releases - regressions: - Bluetooth: hci_qca: move the SoC type check to the right place, fix GPIO integration - prevent a NULL deref in rtnl_create_link() after locking changes - fix udp gso skb_segment after pull from frag_list - hv_netvsc: fix potential deadlock in netvsc_vf_setxdp() Previous releases - always broken: - netfilter: - nf_nat: also check reverse tuple to obtain clashing entry - nf_set_pipapo_avx2: fix initial map fill (zeroing) - fix the helper for incremental update of packet checksums after modifying the IP address, used by ILA and BPF - eth: - stmmac: prevent div by 0 when clock rate is misconfigured - ice: fix Tx scheduler handling of XDP and changing queue count - eth: fix support for the RGMII interface when delays configured" * tag 'net-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (76 commits) calipso: unlock rcu before returning -EAFNOSUPPORT seg6: Fix validation of nexthop addresses net: prevent a NULL deref in rtnl_create_link() net: annotate data-races around cleanup_net_task selftests: drv-net: tso: make bkg() wait for socat to quit selftests: drv-net: tso: fix the GRE device name selftests: drv-net: add configs for the TSO test wireguard: device: enable threaded NAPI netlink: specs: rt-link: decode ip6gre netlink: specs: rt-link: add missing byte-order properties net: wwan: mhi_wwan_mbim: use correct mux_id for multiplexing wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements net: dsa: b53: do not touch DLL_IQQD on bcm53115 net: dsa: b53: allow RGMII for bcm63xx RGMII ports net: dsa: b53: do not configure bcm63xx's IMP port interface net: dsa: b53: do not enable RGMII delay on bcm63xx net: dsa: b53: do not enable EEE on bcm63xx net: ti: icssg-prueth: Fix swapped TX stats for MII interfaces. selftests: netfilter: nft_nat.sh: add test for reverse clash with nat netfilter: nf_nat: also check reverse tuple to obtain clashing entry ... commit 7bc76fb3883aaba56b16dc4009ba8a490b8dc6ab Author: Palmer Dabbelt Date: Tue Jun 3 10:28:57 2025 -0700 RISC-V: Documentation: Add enough title underlines to CMODX This reports as a warning in linux-next along the lines of Documentation/arch/riscv/cmodx.rst:14: WARNING: Title underline too short. CMODX in the Kernel Space --------------------- [docutils] Documentation/arch/riscv/cmodx.rst:43: WARNING: Title underline too short. CMODX in the User Space --------------------- [docutils] Documentation/arch/riscv/cmodx.rst:43: WARNING: Title underline too short. CMODX in the User Space --------------------- [docutils] Link: https://lore.kernel.org/all/20250603154544.1602a8b5@canb.auug.org.au/ Fixes: 0e07200b2af6 ("riscv: Documentation: add a description about dynamic ftrace") Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250603172856.49925-1-palmer@dabbelt.com Signed-off-by: Palmer Dabbelt commit 9d3da7827536b8e41e4188185622816a105b46f7 Merge: 2f956db8b3b022 c39d53750ff96b Author: Palmer Dabbelt Date: Thu Jun 5 11:11:21 2025 -0700 Merge tag 'riscv-mw1-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into for-next riscv patches for 6.16-rc1 * Implement atomic patching support for ftrace which finally allows to get rid of stop_machine(). * Support for kexec_file_load() syscall * Improve module loading time by changing the algorithm that counts the number of plt/got entries in a module. * Zicbop is now used in the kernel to prefetch instructions [Palmer: There's been two rounds of surgery on this one, so as a result it's a bit different than the PR.] * alex-pr: (734 commits) riscv: Improve Kconfig help for RISCV_ISA_V_PREEMPTIVE MAINTAINERS: Update Atish's email address riscv: hwprobe: export Zabha extension riscv: Make regs_irqs_disabled() more clear perf symbols: Ignore mapping symbols on riscv RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND riscv: module: Optimize PLT/GOT entry counting riscv: Add support for PUD THP riscv: xchg: Prefetch the destination word for sc.w riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop riscv: Add support for Zicbop riscv: Introduce Zicbop instructions riscv/kexec_file: Fix comment in purgatory relocator riscv: kexec_file: Support loading Image binary file riscv: kexec_file: Split the loading of kernel and others riscv: Documentation: add a description about dynamic ftrace riscv: ftrace: support direct call using call_ops riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS riscv: ftrace: support PREEMPT riscv: add a data fence for CMODX in the kernel mode ... Signed-off-by: Palmer Dabbelt commit c39d53750ff96b282c869a0184a7c3ecfd298ca8 Author: Miquel Sabaté Solà Date: Thu May 1 15:03:09 2025 +0200 riscv: Improve Kconfig help for RISCV_ISA_V_PREEMPTIVE Fix a couple of spelling issues plus some minor details on the grammar. Signed-off-by: Miquel Sabaté Solà Link: https://lore.kernel.org/r/20250501130309.14803-1-mikisabate@gmail.com Reviewed-by: Alexandre Ghiti Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 9811c864f5d72effcaf476a80645f0ad3de4469d Author: Atish Patra Date: Mon May 5 14:27:38 2025 -0700 MAINTAINERS: Update Atish's email address My personal upstream email account was previously based on gmail which has become difficult to manage upstream activities lately. Update it to the more reliable linux.dev account. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20250505-update_email_address-v1-1-1c24db506fdb@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 847689d2a0c4b4778459c387ec561465e521d963 Merge: 415a8c81da3dab eb87e56d651d0a Author: Alexandre Ghiti Date: Tue May 6 08:19:57 2025 +0000 Merge patch series "riscv: Add Zicbop & prefetchw support" Alexandre Ghiti says: I found this lost series developed by Guo so here is a respin with the comments on v2 applied. This patch series adds Zicbop support and then enables the Linux prefetch features. * patches from https://lore.kernel.org/r/20250421142441.395849-1-alexghiti@rivosinc.com: riscv: xchg: Prefetch the destination word for sc.w riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop riscv: Add support for Zicbop riscv: Introduce Zicbop instructions Link: https://lore.kernel.org/r/20250421142441.395849-1-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 71052a800371c64b4546a1d7f69ad515a779316f Author: Eric Biggers Date: Thu Jun 5 10:11:56 2025 -0700 MAINTAINERS: add entry for crypto library I am volunteering to maintain the kernel's crypto library code. [ And Jason and Ard piped up too - Linus ] Signed-off-by: Eric Biggers Acked-by: Jason A. Donenfeld Acked-by: Ard Biesheuvel Signed-off-by: Linus Torvalds commit 6fe26f694c824b8a4dbf50c635bee1302e3f099c Author: Luiz Augusto von Dentz Date: Tue May 20 15:42:21 2025 -0400 Bluetooth: MGMT: Protect mgmt_pending list with its own lock This uses a mutex to protect from concurrent access of mgmt_pending list which can cause crashes like: ================================================================== BUG: KASAN: slab-use-after-free in hci_sock_get_channel+0x60/0x68 net/bluetooth/hci_sock.c:91 Read of size 2 at addr ffff0000c48885b2 by task syz.4.334/7318 CPU: 0 UID: 0 PID: 7318 Comm: syz.4.334 Not tainted 6.15.0-rc7-syzkaller-g187899f4124a #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x254 mm/kasan/report.c:408 print_report+0x68/0x84 mm/kasan/report.c:521 kasan_report+0xb0/0x110 mm/kasan/report.c:634 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379 hci_sock_get_channel+0x60/0x68 net/bluetooth/hci_sock.c:91 mgmt_pending_find+0x7c/0x140 net/bluetooth/mgmt_util.c:223 pending_find net/bluetooth/mgmt.c:947 [inline] remove_adv_monitor+0x44/0x1a4 net/bluetooth/mgmt.c:5445 hci_mgmt_cmd+0x780/0xc00 net/bluetooth/hci_sock.c:1712 hci_sock_sendmsg+0x544/0xbb0 net/bluetooth/hci_sock.c:1832 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] sock_write_iter+0x25c/0x378 net/socket.c:1131 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x62c/0x97c fs/read_write.c:684 ksys_write+0x120/0x210 fs/read_write.c:736 __do_sys_write fs/read_write.c:747 [inline] __se_sys_write fs/read_write.c:744 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:744 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 7037: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_noprof+0x2fc/0x4c8 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2198 sk_alloc+0x44/0x3ac net/core/sock.c:2254 bt_sock_alloc+0x4c/0x300 net/bluetooth/af_bluetooth.c:148 hci_sock_create+0xa8/0x194 net/bluetooth/hci_sock.c:2202 bt_sock_create+0x14c/0x24c net/bluetooth/af_bluetooth.c:132 __sock_create+0x43c/0x91c net/socket.c:1541 sock_create net/socket.c:1599 [inline] __sys_socket_create net/socket.c:1636 [inline] __sys_socket+0xd4/0x1c0 net/socket.c:1683 __do_sys_socket net/socket.c:1697 [inline] __se_sys_socket net/socket.c:1695 [inline] __arm64_sys_socket+0x7c/0x94 net/socket.c:1695 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Freed by task 6607: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x68/0x88 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x17c/0x474 mm/slub.c:4841 sk_prot_free net/core/sock.c:2237 [inline] __sk_destruct+0x4f4/0x760 net/core/sock.c:2332 sk_destruct net/core/sock.c:2360 [inline] __sk_free+0x320/0x430 net/core/sock.c:2371 sk_free+0x60/0xc8 net/core/sock.c:2382 sock_put include/net/sock.h:1944 [inline] mgmt_pending_free+0x88/0x118 net/bluetooth/mgmt_util.c:290 mgmt_pending_remove+0xec/0x104 net/bluetooth/mgmt_util.c:298 mgmt_set_powered_complete+0x418/0x5cc net/bluetooth/mgmt.c:1355 hci_cmd_sync_work+0x204/0x33c net/bluetooth/hci_sync.c:334 process_one_work+0x7e8/0x156c kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3400 kthread+0x5fc/0x75c kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:847 Fixes: a380b6cff1a2 ("Bluetooth: Add generic mgmt helper API") Closes: https://syzkaller.appspot.com/bug?extid=0a7039d5d9986ff4ecec Closes: https://syzkaller.appspot.com/bug?extid=cc0cc52e7f43dc9e6df1 Reported-by: syzbot+0a7039d5d9986ff4ecec@syzkaller.appspotmail.com Tested-by: syzbot+0a7039d5d9986ff4ecec@syzkaller.appspotmail.com Tested-by: syzbot+cc0cc52e7f43dc9e6df1@syzkaller.appspotmail.com Signed-off-by: Dmitry Antipov Signed-off-by: Luiz Augusto von Dentz commit e6ed54e86aae9e4f7286ce8d5c73780f91b48d1c Author: Luiz Augusto von Dentz Date: Tue Jun 3 16:12:39 2025 -0400 Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete This reworks MGMT_OP_REMOVE_ADV_MONITOR to not use mgmt_pending_add to avoid crashes like bellow: ================================================================== BUG: KASAN: slab-use-after-free in mgmt_remove_adv_monitor_complete+0xe5/0x540 net/bluetooth/mgmt.c:5406 Read of size 8 at addr ffff88801c53f318 by task kworker/u5:5/5341 CPU: 0 UID: 0 PID: 5341 Comm: kworker/u5:5 Not tainted 6.15.0-syzkaller-10402-g4cb6c8af8591 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: hci0 hci_cmd_sync_work Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 mgmt_remove_adv_monitor_complete+0xe5/0x540 net/bluetooth/mgmt.c:5406 hci_cmd_sync_work+0x261/0x3a0 net/bluetooth/hci_sync.c:334 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5987: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4358 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] mgmt_pending_new+0x65/0x240 net/bluetooth/mgmt_util.c:252 mgmt_pending_add+0x34/0x120 net/bluetooth/mgmt_util.c:279 remove_adv_monitor+0x103/0x1b0 net/bluetooth/mgmt.c:5454 hci_mgmt_cmd+0x9c9/0xef0 net/bluetooth/hci_sock.c:1719 hci_sock_sendmsg+0x6ca/0xef0 net/bluetooth/hci_sock.c:1839 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:727 sock_write_iter+0x258/0x330 net/socket.c:1131 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x548/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5989: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x18e/0x440 mm/slub.c:4841 mgmt_pending_foreach+0xc9/0x120 net/bluetooth/mgmt_util.c:242 mgmt_index_removed+0x10d/0x2f0 net/bluetooth/mgmt.c:9366 hci_sock_bind+0xbe9/0x1000 net/bluetooth/hci_sock.c:1314 __sys_bind_socket net/socket.c:1810 [inline] __sys_bind+0x2c3/0x3e0 net/socket.c:1841 __do_sys_bind net/socket.c:1846 [inline] __se_sys_bind net/socket.c:1844 [inline] __x64_sys_bind+0x7a/0x90 net/socket.c:1844 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 66bd095ab5d4 ("Bluetooth: advmon offload MSFT remove monitor") Closes: https://syzkaller.appspot.com/bug?extid=feb0dc579bbe30a13190 Reported-by: syzbot+feb0dc579bbe30a13190@syzkaller.appspotmail.com Tested-by: syzbot+feb0dc579bbe30a13190@syzkaller.appspotmail.com Signed-off-by: Luiz Augusto von Dentz commit bf2ffc4d14db29cab781549912d2dc69127f4d3e Author: Chandrashekar Devegowda Date: Tue Jun 3 15:34:40 2025 +0530 Bluetooth: btintel_pcie: Reduce driver buffer posting to prevent race condition Modify the driver to post 3 fewer buffers than the maximum rx buffers (64) allowed for the firmware. This change mitigates a hardware issue causing a race condition in the firmware, improving stability and data handling. Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz commit 2dd711102ce69ae41f65d09c012441227d4aa983 Author: Chandrashekar Devegowda Date: Tue Jun 3 15:34:39 2025 +0530 Bluetooth: btintel_pcie: Increase the tx and rx descriptor count This change addresses latency issues observed in HID use cases where events arrive in bursts. By increasing the Rx descriptor count to 64, the firmware can handle bursty data more effectively, reducing latency and preventing buffer overflows. Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz commit daabd276985055250528da97e9ce6d277d7009c2 Author: Kiran K Date: Tue Jun 3 15:34:38 2025 +0530 Bluetooth: btintel_pcie: Fix driver not posting maximum rx buffers The driver was posting only 6 rx buffers, despite the maximum rx buffers being defined as 16. Having fewer RX buffers caused firmware exceptions in HID use cases when events arrived in bursts. Exception seen on android 6.12 kernel. E Bluetooth: hci0: Received hw exception interrupt E Bluetooth: hci0: Received gp1 mailbox interrupt D Bluetooth: hci0: 00000000: ff 3e 87 80 03 01 01 01 03 01 0c 0d 02 1c 10 0e D Bluetooth: hci0: 00000010: 01 00 05 14 66 b0 28 b0 c0 b0 28 b0 ac af 28 b0 D Bluetooth: hci0: 00000020: 14 f1 28 b0 00 00 00 00 fa 04 00 00 00 00 40 10 D Bluetooth: hci0: 00000030: 08 00 00 00 7a 7a 7a 7a 47 00 fb a0 10 00 00 00 D Bluetooth: hci0: 00000000: 10 01 0a E Bluetooth: hci0: ---- Dump of debug registers — E Bluetooth: hci0: boot stage: 0xe0fb0047 E Bluetooth: hci0: ipc status: 0x00000004 E Bluetooth: hci0: ipc control: 0x00000000 E Bluetooth: hci0: ipc sleep control: 0x00000000 E Bluetooth: hci0: mbox_1: 0x00badbad E Bluetooth: hci0: mbox_2: 0x0000101c E Bluetooth: hci0: mbox_3: 0x00000008 E Bluetooth: hci0: mbox_4: 0x7a7a7a7a Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz commit 308a3a8ce8ea41b26c46169f3263e50f5997c28e Author: Pauli Virtanen Date: Sat May 31 18:24:58 2025 +0300 Bluetooth: hci_core: fix list_for_each_entry_rcu usage Releasing + re-acquiring RCU lock inside list_for_each_entry_rcu() loop body is not correct. Fix by taking the update-side hdev->lock instead. Fixes: c7eaf80bfb0c ("Bluetooth: Fix hci_link_tx_to RCU lock usage") Signed-off-by: Pauli Virtanen Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit cfc4ca8986bb1f6182da6cd7bb57f228590b4643 Merge: e9e668cd2756c1 e56a50ff7c1298 Author: Linus Torvalds Date: Thu Jun 5 11:45:33 2025 -0700 Merge tag 'uml-for-linux-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Johannes Berg: "The only really new thing is the long-standing seccomp work (originally from 2021!). Wven if it still isn't enabled by default due to security concerns it can still be used e.g. for tests. - remove obsolete network transports - remove PCI IO port support - start adding seccomp-based process handling instead of ptrace" * tag 'uml-for-linux-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (29 commits) um: remove "extern" from implementation of sigchld_handler um: fix unused variable warning um: fix SECCOMP 32bit xstate register restore um: pass FD for memory operations when needed um: Add SECCOMP support detection and initialization um: Implement kernel side of SECCOMP based process handling um: Track userspace children dying in SECCOMP mode um: Add helper functions to get/set state for SECCOMP um: Add stub side of SECCOMP/futex based process handling um: Move faultinfo extraction into userspace routine um: vector: Use mac_pton() for MAC address parsing um: vector: Clean up and modernize log messages um: chan_kern: use raw spinlock for irqs_to_free_lock MAINTAINERS: remove obsolete file entry in TUN/TAP DRIVER um: Fix tgkill compile error on old host OSes um: stop using PCI port I/O um: Remove legacy network transport infrastructure um: vector: Eliminate the dependency on uml_net um: Remove obsolete legacy network transports um/asm: Replace "REP; NOP" with PAUSE mnemonic ... commit ca1a66cdd685030738cf077e3955fdedfe39fbb9 Author: Clément Léger Date: Mon Jun 2 21:39:16 2025 +0200 riscv: uaccess: do not do misaligned accesses in get/put_user() Doing misaligned access to userspace memory would make a trap on platform where it is emulated. Latest fixes removed the kernel capability to do unaligned accesses to userspace memory safely since interrupts are kept disabled at all time during that. Thus doing so would crash the kernel. Such behavior was detected with GET_UNALIGN_CTL() that was doing a put_user() with an unsigned long* address that should have been an unsigned int*. Reenabling kernel misaligned access emulation is a bit risky and it would also degrade performances. Rather than doing that, we will try to avoid any misaligned accessed by using copy_from/to_user() which does not do any misaligned accesses. This can be done only for !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS and thus allows to only generate a bit more code for this config. Signed-off-by: Clément Léger Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250602193918.868962-4-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit e9e668cd2756c1300f3bf84eba1d6711b886b531 Merge: aef7457540e040 10f885d63a0efd Author: Linus Torvalds Date: Thu Jun 5 11:39:17 2025 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "We've got a couple of build fixes when using LLD, a missing TLB invalidation and a workaround for broken firmware on SoCs with CPUs that implement MPAM: - Disable problematic linker assertions for broken versions of LLD - Work around sporadic link failure with LLD and various randconfig builds - Fix missing invalidation in the TLB batching code when reclaim races with mprotect() and friends - Add a command-line override for MPAM to allow booting on systems with broken firmware" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Add override for MPAM arm64/mm: Close theoretical race where stale TLB entry remains valid arm64: Work around convergence issue with LLD linker arm64: Disable LLD linker ASSERT()s for the time being commit 020667d661f9be65167174d28a6eda7102f7293f Author: Clément Léger Date: Mon Jun 2 21:39:15 2025 +0200 riscv: process: use unsigned int instead of unsigned long for put_user() The specification of prctl() for GET_UNALIGN_CTL states that the value is returned in an unsigned int * address passed as an unsigned long. Change the type to match that and avoid an unaligned access as well. Signed-off-by: Clément Léger Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250602193918.868962-3-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit a4348546332c9fae12b29acb514535e0a52b9b3c Author: Alexandre Ghiti Date: Mon Jun 2 21:39:14 2025 +0200 riscv: make unsafe user copy routines use existing assembly routines The current implementation is underperforming and in addition, it triggers misaligned access traps on platforms which do not handle misaligned accesses in hardware. Use the existing assembly routines to solve both problems at once. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250602193918.868962-2-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit aef7457540e0407c66a93491cffccd2a6979987c Merge: 7fdaba912981e6 293bb049380e14 Author: Linus Torvalds Date: Thu Jun 5 11:33:09 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM fixes from Russell King: - Fix arch_memremap_can_ram_remap() which incorrectly passed a PFN to memblock_is_map_memory rather than the actual address. - Disallow kernel mode NEON when IRQs are disabled Explanation: "To avoid having to preserve/restore kernel mode NEON state when such a softirq is taken softirqs are now disabled when using the NEON from task context." should explain that it's nested kernel mode. In other words, softirqs from user mode are fine, because the context will be preserved. softirqs from kernel mode may be from a context that has already saved the user NEON state, and thus we would need to preserve the NEON state for the parent kernel mode context, and this we don't allow. The problem occurs when the kernel context disables hard IRQs, and then uses NEON. When it's finished, and restores the userspace NEON state, we call local_bh_enable() with hard IRQs disabled, which causes a warning. This commit addresses that by disallowing the use of NEON with hard IRQs disabled. https://lore.kernel.org/all/20250516231858.27899-4-ebiggers@kernel.org/T/#m104841b6e9346b1814c8b0fb9f2340551b0cd3e8 has some further context * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9446/1: Disallow kernel mode NEON when IRQs are disabled ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap() commit 415a8c81da3dab0a585bd4f8d505a11ad5a171a7 Author: Alexandre Ghiti Date: Mon Apr 21 16:14:13 2025 +0200 riscv: hwprobe: export Zabha extension Export Zabha through the hwprobe syscall. Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20250421141413.394444-1-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit d7e0cce103663a60b14c52a0bcad62c7e8c0e6e8 Author: Tiezhu Yang Date: Tue Apr 22 19:31:56 2025 +0800 riscv: Make regs_irqs_disabled() more clear The return value of regs_irqs_disabled() is true or false, so change its type to reflect that and also make it always inline. Suggested-by: Huacai Chen Signed-off-by: Tiezhu Yang Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250422113156.25742-1-yangtiezhu@loongson.cn Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 4d6319289e8661a1845dde5d05859afc21ec3ed9 Author: Haibo Xu Date: Wed Apr 9 10:51:56 2025 +0800 perf symbols: Ignore mapping symbols on riscv RISCV ELF use mapping symbols with special names $x, $d to identify regions of RISCV code or code with different ISAs[1]. These symbols don't identify functions, so will confuse the perf output. The patch filters out these symbols at load time, similar to "4886f2ca perf symbols: Ignore mapping symbols on aarch64". [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/ master/riscv-elf.adoc#mapping-symbol Signed-off-by: Haibo Xu Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20250409025202.201046-1-haibo1.xu@intel.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 9eb9ea31fff0f66e5d41b6fe62c4119dc1e580ba Merge: 48d9aabf2dc5d9 809a11eea8e8c8 Author: Palmer Dabbelt Date: Tue May 27 17:22:40 2025 -0700 Merge patch series "riscv: kexec_file: Support loading Image binary file" Björn Töpel says: From: Björn Töpel Hi! For over a year ago, Daniel and I was testing the V2 of Song's series. I also promised to take the V2, that had been sitting on the lists for too long, to rebase it on a new kernel, and re-test it. One year later, here's the V3! ;-) There are no changes from V2 other, than some simple checkpatch cleanups. Song's original cover: | This series makes the kexec_file_load() syscall support to load | Image binary file. At the same time, corresponding support for | kexec-tools had been pushed to my repo[2]. | | Now, we can leverage that kexec-tools and this series to use the | kexec_load() or kexec_file_load() syscall to boot both vmlinux and | Image file, as seen in these combo tests: | | ``` | 1. kexec -l vmlinux | 2. kexec -l Image | 3. kexec -s -l vmlinux | 4. kexec -s -l Image | ``` Notably, kexec-tools has still not made it upstream. I've prepared a branch on my GH [3], that I indend to post ASAP. That branch is a collection of fixes/features, including Song's userland Image loading. The V2 is here [2], and V1 [1]. I've tested the kexec-file/Image on qemu-rv64, with following combinations: * ACPI/UEFI * DT/UEFI * DT both "regular" kexec (-s + -e), and crashkernels (-p). Note that there are two purgatory patches that has to be present (part of -rc1, so all good): commit 28093cfef5dd ("riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator") commit 3f7023171df4 ("riscv/purgatory: 4B align purgatory_start") [1] https://lore.kernel.org/linux-riscv/20230914020044.1397356-1-songshuaishuai@tinylab.org/ [2] https://lore.kernel.org/linux-riscv/20231016092006.3347632-1-songshuaishuai@tinylab.org/ [3] https://github.com/bjoto/kexec-tools/tree/rv-on-master * patches from https://lore.kernel.org/r/20250409193004.643839-1-bjorn@kernel.org: riscv: kexec_file: Support loading Image binary file riscv: kexec_file: Split the loading of kernel and others Link: https://lore.kernel.org/r/20250409193004.643839-1-bjorn@kernel.org Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 48d9aabf2dc5d93b402ce55e3187e95698f2b9e9 Author: 谢致邦 (XIE Zhibang) Date: Fri Mar 28 10:14:22 2025 +0000 RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND It is the built-in command line appended to the bootloader command line, not the bootloader command line appended to the built-in command line. Fixes: 3aed8c43267e ("RISC-V: Update Kconfig to better handle CMDLINE") Signed-off-by: 谢致邦 (XIE Zhibang) Link: https://lore.kernel.org/r/tencent_A93C7FB46BFD20054AD2FEF4645913FF550A@qq.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit be17c0df67959fe4f88dac75dc26ed9252d4b133 Author: Samuel Holland Date: Wed Apr 9 10:14:51 2025 -0700 riscv: module: Optimize PLT/GOT entry counting perf reports that 99.63% of the cycles from `modprobe amdgpu` are spent inside module_frob_arch_sections(). This is because amdgpu.ko contains about 300000 relocations in its .rela.text section, and the algorithm in count_max_entries() takes quadratic time. Apply two optimizations from the arm64 code, which together reduce the total execution time by 99.58%. First, sort the relocations so duplicate entries are adjacent. Second, reduce the number of relocations that must be sorted by filtering to only relocations that need PLT/GOT entries, as done in commit d4e0340919fb ("arm64/module: Optimize module load time by optimizing PLT counting"). Unlike the arm64 code, here the filtering and sorting is done in a scratch buffer, because the HI20 relocation search optimization in apply_relocate_add() depends on the original order of the relocations. This allows accumulating PLT/GOT relocations across sections so sorting and counting is only done once per module. Signed-off-by: Samuel Holland Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20250409171526.862481-3-samuel.holland@sifive.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 881dadf0792c02d7d156e0665dc5eaf18701cd5a Merge: c3cc2a4a3a23fa d8ac85dad407f4 Author: Alexandre Ghiti Date: Tue Apr 22 12:43:31 2025 +0000 Merge patch series "riscv: ftrace: atmoic patching and preempt improvements" Andy Chiu says: This series makes atomic code patching in ftrace possible and eliminates the need of the stop_machine dance. The major difference of this version is that we merge the CALL_OPS support from Puranjay [1] and make direct calls available for practical uses such as BPF. Thanks for the time reviewing the series and suggestions, we hope this version gets a step closer to happening in the upstream. Please reference the link to v3 below for more introductory view of the implementation [2] Added patch: 2, 4, 10, 11, 12 Modified patch: 5, 6 Unchanged patch: 1, 3, 7, 8, 9 (1, 8 has commit msg modified) Special thanks to Björn for his efforts on testing and guiding the series! [1]: https://lore.kernel.org/lkml/20240306165904.108141-1-puranjay12@gmail.com/ [2]: https://lore.kernel.org/linux-riscv/20241127172908.17149-1-andybnac@gmail.com/ * patches from https://lore.kernel.org/r/20250407180838.42877-1-andybnac@gmail.com: riscv: Documentation: add a description about dynamic ftrace riscv: ftrace: support direct call using call_ops riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS riscv: ftrace: support PREEMPT riscv: add a data fence for CMODX in the kernel mode riscv: vector: Support calling schedule() for preemptible Vector riscv: ftrace: do not use stop_machine to update code riscv: ftrace: prepare ftrace for atomic code patching kernel: ftrace: export ftrace_sync_ipi riscv: ftrace: align patchable functions to 4 Byte boundary riscv: ftrace factor out code defined by !WITH_ARG riscv: ftrace: support fastcc in Clang for WITH_ARGS Link: https://lore.kernel.org/r/20250407180838.42877-1-andybnac@gmail.com Signed-off-by: Alexandre Ghiti commit c3cc2a4a3a23faf6b88459471c1c16ab3837cc2f Author: Alexandre Ghiti Date: Fri Mar 21 13:39:54 2025 +0100 riscv: Add support for PUD THP Add the necessary page table functions to deal with PUD THP, this enables the use of PUD pfnmap. Link: https://lore.kernel.org/r/20250321123954.225097-1-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit eb87e56d651d0a72009842bc0d8eeae7b605c97d Author: Guo Ren Date: Mon Apr 21 16:24:41 2025 +0200 riscv: xchg: Prefetch the destination word for sc.w The cost of changing a cacheline from shared to exclusive state can be significant, especially when this is triggered by an exclusive store, since it may result in having to retry the transaction. This patch makes use of prefetch.w to prefetch cachelines for write prior to lr/sc loops when using the xchg_small atomic routine. This patch is inspired by commit 0ea366f5e1b6 ("arm64: atomics: prefetch the destination word for write prior to stxr"). Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20231231082955.16516-4-guoren@kernel.org Tested-by: Andrea Parri Link: https://lore.kernel.org/r/20250421142441.395849-5-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit a5f947c73115efb6fb0d9579e71ce1ee5cf706aa Author: Guo Ren Date: Mon Apr 21 16:24:40 2025 +0200 riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop Enable Linux prefetch and prefetchw primitives using Zicbop. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20231231082955.16516-3-guoren@kernel.org Tested-by: Andrea Parri Link: https://lore.kernel.org/r/20250421142441.395849-4-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 8d496b5a989120c1bce1ad8eb48ebae0350722d7 Author: Alexandre Ghiti Date: Mon Apr 21 16:24:39 2025 +0200 riscv: Add support for Zicbop Zicbop introduces cache blocks prefetching instructions, add the necessary support for the kernel to use it in the coming commits. Co-developed-by: Guo Ren Signed-off-by: Guo Ren Tested-by: Andrea Parri Link: https://lore.kernel.org/r/20250421142441.395849-3-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit f0f4e64b9e3527c11dc6dcb005e577d661eb9ab5 Author: Alexandre Ghiti Date: Mon Apr 21 16:24:38 2025 +0200 riscv: Introduce Zicbop instructions The S-type instructions are first introduced and then used to define the encoding of the Zicbop prefetching instructions. Co-developed-by: Guo Ren Signed-off-by: Guo Ren Tested-by: Andrea Parri Link: https://lore.kernel.org/r/20250421142441.395849-2-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 850d7b14c8f77407b7d2a1edeb83d3e36c46e7a8 Author: Yao Zi Date: Wed Mar 26 07:34:51 2025 +0000 riscv/kexec_file: Fix comment in purgatory relocator Apparently sec_base doesn't mean relocated symbol value, which seems a copy-pasting error in the comment. Assigned with the address of section indexed by sym->st_shndx, it should represent base address of the relevant section. Let's fix the comment to avoid possible confusion. Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file") Signed-off-by: Yao Zi Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20250326073450.57648-2-ziyao@disroot.org Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 809a11eea8e8c80491e3ba3a286af25409c072d5 Author: Song Shuai Date: Wed Apr 9 21:29:59 2025 +0200 riscv: kexec_file: Support loading Image binary file This patch creates image_kexec_ops to load Image binary file for kexec_file_load() syscall. Signed-off-by: Song Shuai Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20250409193004.643839-3-bjorn@kernel.org Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 1df45f8a9fea5a7513bd1bad98604ce1fbefcaaf Author: Song Shuai Date: Wed Apr 9 21:29:58 2025 +0200 riscv: kexec_file: Split the loading of kernel and others This is the preparative patch for kexec_file_load Image support. It separates the elf_kexec_load() as two parts: - the first part loads the vmlinux (or Image) - the second part loads other segments (e.g. initrd,fdt,purgatory) And the second part is exported as the load_extra_segments() function which would be used in both kexec-elf.c and kexec-image.c. No functional change intended. Signed-off-by: Song Shuai Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20250409193004.643839-2-bjorn@kernel.org Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit d8ac85dad407f4cea65a970e9ba42201cb49686a Author: Andy Chiu Date: Tue Apr 8 02:08:36 2025 +0800 riscv: Documentation: add a description about dynamic ftrace Add a section in cmodx to describe how dynamic ftrace works on riscv, limitations, and assumptions. Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-12-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit b21cdb9523e5561b97fd534dbb75d132c5c938ff Author: Andy Chiu Date: Tue Apr 8 02:08:35 2025 +0800 riscv: ftrace: support direct call using call_ops jump to FTRACE_ADDR if distance is out of reach Co-developed-by: Björn Töpel Signed-off-by: Björn Töpel Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-11-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit c217157bcd1df434fdeaeb24b7c25ec31e15cf4a Author: Puranjay Mohan Date: Tue Apr 8 02:08:34 2025 +0800 riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS This patch enables support for DYNAMIC_FTRACE_WITH_CALL_OPS on RISC-V. This allows each ftrace callsite to provide an ftrace_ops to the common ftrace trampoline, allowing each callsite to invoke distinct tracer functions without the need to fall back to list processing or to allocate custom trampolines for each callsite. This significantly speeds up cases where multiple distinct trace functions are used and callsites are mostly traced by a single tracer. The idea and most of the implementation is taken from the ARM64's implementation of the same feature. The idea is to place a pointer to the ftrace_ops as a literal at a fixed offset from the function entry point, which can be recovered by the common ftrace trampoline. We use -fpatchable-function-entry to reserve 8 bytes above the function entry by emitting 2 4 byte or 4 2 byte nops depending on the presence of CONFIG_RISCV_ISA_C. These 8 bytes are patched at runtime with a pointer to the associated ftrace_ops for that callsite. Functions are aligned to 8 bytes to make sure that the accesses to this literal are atomic. This approach allows for directly invoking ftrace_ops::func even for ftrace_ops which are dynamically-allocated (or part of a module), without going via ftrace_ops_list_func. We've benchamrked this with the ftrace_ops sample module on Spacemit K1 Jupiter: Without this patch: baseline (Linux rivos 6.14.0-09584-g7d06015d936c #3 SMP Sat Mar 29 +-----------------------+-----------------+----------------------------+ | Number of tracers | Total time (ns) | Per-call average time | |-----------------------+-----------------+----------------------------| | Relevant | Irrelevant | 100000 calls | Total (ns) | Overhead (ns) | |----------+------------+-----------------+------------+---------------| | 0 | 0 | 1357958 | 13 | - | | 0 | 1 | 1302375 | 13 | - | | 0 | 2 | 1302375 | 13 | - | | 0 | 10 | 1379084 | 13 | - | | 0 | 100 | 1302458 | 13 | - | | 0 | 200 | 1302333 | 13 | - | |----------+------------+-----------------+------------+---------------| | 1 | 0 | 13677833 | 136 | 123 | | 1 | 1 | 18500916 | 185 | 172 | | 1 | 2 | 22856459 | 228 | 215 | | 1 | 10 | 58824709 | 588 | 575 | | 1 | 100 | 505141584 | 5051 | 5038 | | 1 | 200 | 1580473126 | 15804 | 15791 | |----------+------------+-----------------+------------+---------------| | 1 | 0 | 13561000 | 135 | 122 | | 2 | 0 | 19707292 | 197 | 184 | | 10 | 0 | 67774750 | 677 | 664 | | 100 | 0 | 714123125 | 7141 | 7128 | | 200 | 0 | 1918065668 | 19180 | 19167 | +----------+------------+-----------------+------------+---------------+ Note: per-call overhead is estimated relative to the baseline case with 0 relevant tracers and 0 irrelevant tracers. With this patch: v4-rc4 (Linux rivos 6.14.0-09598-gd75747611c93 #4 SMP Sat Mar 29 +-----------------------+-----------------+----------------------------+ | Number of tracers | Total time (ns) | Per-call average time | |-----------------------+-----------------+----------------------------| | Relevant | Irrelevant | 100000 calls | Total (ns) | Overhead (ns) | |----------+------------+-----------------+------------+---------------| | 0 | 0 | 1459917 | 14 | - | | 0 | 1 | 1408000 | 14 | - | | 0 | 2 | 1383792 | 13 | - | | 0 | 10 | 1430709 | 14 | - | | 0 | 100 | 1383791 | 13 | - | | 0 | 200 | 1383750 | 13 | - | |----------+------------+-----------------+------------+---------------| | 1 | 0 | 5238041 | 52 | 38 | | 1 | 1 | 5228542 | 52 | 38 | | 1 | 2 | 5325917 | 53 | 40 | | 1 | 10 | 5299667 | 52 | 38 | | 1 | 100 | 5245250 | 52 | 39 | | 1 | 200 | 5238459 | 52 | 39 | |----------+------------+-----------------+------------+---------------| | 1 | 0 | 5239083 | 52 | 38 | | 2 | 0 | 19449417 | 194 | 181 | | 10 | 0 | 67718584 | 677 | 663 | | 100 | 0 | 709840708 | 7098 | 7085 | | 200 | 0 | 2203580626 | 22035 | 22022 | +----------+------------+-----------------+------------+---------------+ Note: per-call overhead is estimated relative to the baseline case with 0 relevant tracers and 0 irrelevant tracers. As can be seen from the above: a) Whenever there is a single relevant tracer function associated with a tracee, the overhead of invoking the tracer is constant, and does not scale with the number of tracers which are *not* associated with that tracee. b) The overhead for a single relevant tracer has dropped to ~1/3 of the overhead prior to this series (from 122ns to 38ns). This is largely due to permitting calls to dynamically-allocated ftrace_ops without going through ftrace_ops_list_func. Signed-off-by: Puranjay Mohan [update kconfig, asm, refactor] Signed-off-by: Andy Chiu Tested-by: Björn Töpel Link: https://lore.kernel.org/r/20250407180838.42877-10-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit d0262e907e2991ae09ca476281fc8cae3ec57850 Author: Andy Chiu Date: Tue Apr 8 02:08:33 2025 +0800 riscv: ftrace: support PREEMPT Now, we can safely enable dynamic ftrace with kernel preemption. Signed-off-by: Andy Chiu Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20250407180838.42877-9-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit ca358692de41b273468e625f96926fa53e13bd8c Author: Andy Chiu Date: Tue Apr 8 02:08:32 2025 +0800 riscv: add a data fence for CMODX in the kernel mode RISC-V spec explicitly calls out that a local fence.i is not enough for the code modification to be visble from a remote hart. In fact, it states: To make a store to instruction memory visible to all RISC-V harts, the writing hart also has to execute a data FENCE before requesting that all remote RISC-V harts execute a FENCE.I. Although current riscv drivers for IPI use ordered MMIO when sending IPIs in order to synchronize the action between previous csd writes, riscv does not restrict itself to any particular flavor of IPI. Any driver or firmware implementation that does not order data writes before the IPI may pose a risk for code-modifying race. Thus, add a fence here to order data writes before making the IPI. Signed-off-by: Andy Chiu Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20250407180838.42877-8-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit d1049fc0de81bca3abbb35e8d4b8794170498b78 Author: Andy Chiu Date: Tue Apr 8 02:08:31 2025 +0800 riscv: vector: Support calling schedule() for preemptible Vector Each function entry implies a call to ftrace infrastructure. And it may call into schedule in some cases. So, it is possible for preemptible kernel-mode Vector to implicitly call into schedule. Since all V-regs are caller-saved, it is possible to drop all V context when a thread voluntarily call schedule(). Besides, we currently don't pass argument through vector register, so we don't have to save/restore V-regs in ftrace trampoline. Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-7-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 5aa4ef95588456df5a5563dd23892827f97fb14f Author: Andy Chiu Date: Tue Apr 8 02:08:30 2025 +0800 riscv: ftrace: do not use stop_machine to update code Now it is safe to remove dependency from stop_machine() for us to patch code in ftrace. Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-6-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit b2137c3b6d7a45622967aac78b46a4bd2cff6c42 Author: Andy Chiu Date: Tue Apr 8 02:08:29 2025 +0800 riscv: ftrace: prepare ftrace for atomic code patching We use an AUIPC+JALR pair to jump into a ftrace trampoline. Since instruction fetch can break down to 4 byte at a time, it is impossible to update two instructions without a race. In order to mitigate it, we initialize the patchable entry to AUIPC + NOP4. Then, the run-time code patching can change NOP4 to JALR to eable/disable ftrcae from a function. This limits the reach of each ftrace entry to +-2KB displacing from ftrace_caller. Starting from the trampoline, we add a level of indirection for it to reach ftrace caller target. Now, it loads the target address from a memory location, then perform the jump. This enable the kernel to update the target atomically. The new don't-stop-the-world text patching on change only one RISC-V instruction: | -8: &ftrace_ops of the associated tracer function. | : | 0: auipc t0, hi(ftrace_caller) | 4: jalr t0, lo(ftrace_caller) | | -8: &ftrace_nop_ops | : | 0: auipc t0, hi(ftrace_caller) | 4: nop This means that f+0x0 is fixed, and should not be claimed by ftrace, e.g. kprobe should be able to put a probe in f+0x0. Thus, we adjust the offset and MCOUNT_INSN_SIZE accordingly. [ alex: Fix build errors with !CONFIG_DYNAMIC_FTRACE ] Co-developed-by: Björn Töpel Signed-off-by: Björn Töpel Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-5-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 500e626c4a5bf2fa7cc6f1cd6dd86c77b5b127f2 Author: Andy Chiu Date: Tue Apr 8 02:08:28 2025 +0800 kernel: ftrace: export ftrace_sync_ipi The following ftrace patch for riscv uses a data store to update ftrace function. Therefore, a romote fence is required to order it against function_trace_op updates. The mechanism is similar to the fence between function_trace_op and update_ftrace_func in the generic ftrace, so we leverage the same ftrace_sync_ipi function. [ alex: Fix build warning when !CONFIG_DYNAMIC_FTRACE ] Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-4-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit c41bf4326c7b0af3f7004235ac91551833ec95c6 Author: Andy Chiu Date: Tue Apr 8 02:08:27 2025 +0800 riscv: ftrace: align patchable functions to 4 Byte boundary We are changing ftrace code patching in order to remove dependency from stop_machine() and enable kernel preemption. This requires us to align functions entry at a 4-B align address. However, -falign-functions on older versions of GCC alone was not strong enoungh to align all functions. In fact, cold functions are not aligned after turning on optimizations. We consider this is a bug in GCC and turn off guess-branch-probility as a workaround to align all functions. GCC bug id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345 The option -fmin-function-alignment is able to align all functions properly on newer versions of gcc. So, we add a cc-option to test if the toolchain supports it. Suggested-by: Evgenii Shatokhin Signed-off-by: Andy Chiu Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20250407180838.42877-3-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 54ecbc8d857122b32a98fe204cb61a06aabc063d Author: Andy Chiu Date: Tue Apr 8 02:08:26 2025 +0800 riscv: ftrace factor out code defined by !WITH_ARG DYNAMIC_FTRACE selects DYNAMIC_FTRACE_WITH_ARGS and mcount-dyn.S in riscv, so we can remove ifdef jargons of WITH_ARG when it is known that DYNAMIC_FTRACE is true. Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20250407180838.42877-2-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit f8693f6dffcd1865da7f5f4c3df1de445e519bec Author: Andy Chiu Date: Tue Apr 8 02:08:25 2025 +0800 riscv: ftrace: support fastcc in Clang for WITH_ARGS Some caller-saved registers which are not defined as function arguments in the ABI can still be passed as arguments when the kernel is compiled with Clang. As a result, we must save and restore those registers to prevent ftrace from clobbering them. - [1]: https://reviews.llvm.org/D68559 Reported-by: Evgenii Shatokhin Closes: https://lore.kernel.org/linux-riscv/7e7c7914-445d-426d-89a0-59a9199c45b1@yadro.com/ Fixes: 7caa9765465f ("ftrace: riscv: move from REGS to ARGS") Acked-by: Nathan Chancellor Reviewed-by: Björn Töpel Signed-off-by: Andy Chiu Tested-by: Björn Töpel Link: https://lore.kernel.org/r/20250407180838.42877-1-andybnac@gmail.com Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 7c7c5cb5b5bf9d8ccc6a51b28687c9e7ff7f1890 Author: Maciej Patelczyk Date: Fri May 30 15:56:27 2025 +0200 drm/xe: remove unmatched xe_vm_unlock() from __xe_exec_queue_init() There is unmatched xe_vm_unlock() in the __xe_exec_queue_init(). Leftover from commit fbeaad071a98 ("drm/xe: Create LRC BO without VM") Fixes: 2b0a0ce0c20b ("drm/xe: Create LRC BO without VM") Signed-off-by: Maciej Patelczyk Reviewed-by: Jonathan Cavitt Reviewed-by: Matthew Brost Signed-off-by: Niranjana Vishwanathapura Link: https://lore.kernel.org/r/20250530135627.2821612-1-maciej.patelczyk@intel.com (cherry picked from commit 28b996ce73982a44fa86736ca0e3684cb1ae8b24) Signed-off-by: Thomas Hellström commit 2b0a0ce0c20bbedf83f78ba5926f6cae7470cd38 Author: Niranjana Vishwanathapura Date: Wed May 28 22:20:32 2025 -0700 drm/xe: Create LRC BO without VM Specifying VM during lrc->bo creation requires VM's reference to be held for the lifetime of lrc->bo as it will use VM's dma reservation object. Using VM's dma reservation object for lrc->bo doesn't provide any advantage. Hence do not pass VM while creating lrc->bo. v2: Use xe_bo_unpin_map_no_vm (Matthew Brost) Fixes: 264eecdba211 ("drm/xe: Decouple xe_exec_queue and xe_lrc") Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Reviewed-by: Maarten Lankhorst Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250529052031.2429120-2-niranjana.vishwanathapura@intel.com (cherry picked from commit fbeaad071a98fef87deccee81d564de1c8e8e16d) Signed-off-by: Thomas Hellström commit 2e824747cfbdf1fba88df5e5800d284b2602ae8f Author: Matthew Auld Date: Tue Jun 3 18:42:14 2025 +0100 drm/xe/guc_submit: add back fix Daniele noticed that the fix in commit 2d2be279f1ca ("drm/xe: fix UAF around queue destruction") looks to have been unintentionally removed as part of handling a conflict in some past merge commit. Add it back. Fixes: ac44ff7cec33 ("Merge tag 'drm-xe-fixes-2024-10-10' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes") Reported-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: # v6.12+ Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250603174213.1543579-2-matthew.auld@intel.com (cherry picked from commit 9d9fca62dc49d96f97045b6d8e7402a95f8cf92a) Signed-off-by: Thomas Hellström commit 69a58ef4fa77759b0e0c2f79834fa51b00a50c0b Author: Daniele Ceraolo Spurio Date: Thu May 22 15:54:04 2025 -0700 drm/xe/pxp: Clarify PXP queue creation behavior if PXP is not ready The expected flow of operations when using PXP is to query the PXP status and wait for it to transition to "ready" before attempting to create an exec_queue. This flow is followed by the Mesa driver, but there is no guarantee that an incorrectly coded (or malicious) app will not attempt to create the queue first without querying the status. Therefore, we need to clarify what the expected behavior of the queue creation ioctl is in this scenario. Currently, the ioctl always fails with an -EBUSY code no matter the error, but for consistency it is better to distinguish between "failed to init" (-EIO) and "not ready" (-EBUSY), the same way the query ioctl does. Note that, while this is a change in the return code of an ioctl, the behavior of the ioctl in this particular corner case was not clearly spec'd, so no one should have been relying on it (and we know that Mesa, which is the only known userspace for this, didn't). v2: Minor rework of the doc (Rodrigo) Fixes: 72d479601d67 ("drm/xe/pxp/uapi: Add userspace and LRC support for PXP-using queues") Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: José Roberto de Souza Reviewed-by: José Roberto de Souza Reviewed-by: John Harrison Acked-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250522225401.3953243-7-daniele.ceraolospurio@intel.com (cherry picked from commit 21784ca96025b62d95b670b7639ad70ddafa69b8) Signed-off-by: Thomas Hellström commit 6bf4d5649230ca65725ec4793333fb5eba18d646 Author: Daniele Ceraolo Spurio Date: Thu May 22 15:54:03 2025 -0700 drm/xe/pxp: Use the correct define in the set_property_funcs array The define of the extension type was accidentally used instead of the one of the property itself. They're both zero, so no functional issue, but we should use the correct define for code correctness. Fixes: 41a97c4a1294 ("drm/xe/pxp/uapi: Add API to mark a BO as using PXP") Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Link: https://lore.kernel.org/r/20250522225401.3953243-6-daniele.ceraolospurio@intel.com (cherry picked from commit 1d891ee820fd0fbb4101eacb0d922b5050a24933) Signed-off-by: Thomas Hellström commit 0ee54d5cacc0276ec631ac149825a24b59c51c38 Author: Matthew Auld Date: Wed May 28 12:33:29 2025 +0100 drm/xe/sched: stop re-submitting signalled jobs Customer is reporting a really subtle issue where we get random DMAR faults, hangs and other nasties for kernel migration jobs when stressing stuff like s2idle/s3/s4. The explosions seems to happen somewhere after resuming the system with splats looking something like: PM: suspend exit rfkill: input handler disabled xe 0000:00:02.0: [drm] GT0: Engine reset: engine_class=bcs, logical_mask: 0x2, guc_id=0 xe 0000:00:02.0: [drm] GT0: Timedout job: seqno=24496, lrc_seqno=24496, guc_id=0, flags=0x13 in no process [-1] xe 0000:00:02.0: [drm] GT0: Kernel-submitted job timed out The likely cause appears to be a race between suspend cancelling the worker that processes the free_job()'s, such that we still have pending jobs to be freed after the cancel. Following from this, on resume the pending_list will now contain at least one already complete job, but it looks like we call drm_sched_resubmit_jobs(), which will then call run_job() on everything still on the pending_list. But if the job was already complete, then all the resources tied to the job, like the bb itself, any memory that is being accessed, the iommu mappings etc. might be long gone since those are usually tied to the fence signalling. This scenario can be seen in ftrace when running a slightly modified xe_pm IGT (kernel was only modified to inject artificial latency into free_job to make the race easier to hit): xe_sched_job_run: dev=0000:00:02.0, fence=0xffff888276cc8540, seqno=0, lrc_seqno=0, gt=0, guc_id=0, batch_addr=0x000000146910 ... xe_exec_queue_stop: dev=0000:00:02.0, 3:0x2, gt=0, width=1, guc_id=0, guc_state=0x0, flags=0x13 xe_exec_queue_stop: dev=0000:00:02.0, 3:0x2, gt=0, width=1, guc_id=1, guc_state=0x0, flags=0x4 xe_exec_queue_stop: dev=0000:00:02.0, 4:0x1, gt=1, width=1, guc_id=0, guc_state=0x0, flags=0x3 xe_exec_queue_stop: dev=0000:00:02.0, 1:0x1, gt=1, width=1, guc_id=1, guc_state=0x0, flags=0x3 xe_exec_queue_stop: dev=0000:00:02.0, 4:0x1, gt=1, width=1, guc_id=2, guc_state=0x0, flags=0x3 xe_exec_queue_resubmit: dev=0000:00:02.0, 3:0x2, gt=0, width=1, guc_id=0, guc_state=0x0, flags=0x13 xe_sched_job_run: dev=0000:00:02.0, fence=0xffff888276cc8540, seqno=0, lrc_seqno=0, gt=0, guc_id=0, batch_addr=0x000000146910 ... ..... xe_exec_queue_memory_cat_error: dev=0000:00:02.0, 3:0x2, gt=0, width=1, guc_id=0, guc_state=0x3, flags=0x13 So the job_run() is clearly triggered twice for the same job, even though the first must have already signalled to completion during suspend. We can also see a CAT error after the re-submit. To prevent this only resubmit jobs on the pending_list that have not yet signalled. v2: - Make sure to re-arm the fence callbacks with sched_start(). v3 (Matt B): - Stop using drm_sched_resubmit_jobs(), which appears to be deprecated and just open-code a simple loop such that we skip calling run_job() on anything already signalled. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4856 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Cc: William Tseng Cc: # v6.8+ Reviewed-by: Matthew Brost Reviewed-by: Tejas Upadhyay Link: https://lore.kernel.org/r/20250528113328.289392-2-matthew.auld@intel.com (cherry picked from commit 38fafa9f392f3110d2de431432d43f4eef99cd1b) Signed-off-by: Thomas Hellström commit 5cc3325584c425069c1c3355c775314d64bf8770 Author: Thomas Hellström Date: Wed May 28 18:41:05 2025 +0200 drm/xe: Rework eviction rejection of bound external bos For preempt_fence mode VM's we're rejecting eviction of shared bos during VM_BIND. However, since we do this in the move() callback, we're getting an eviction failure warning from TTM. The TTM callback intended for these things is eviction_valuable(). However, the latter doesn't pass in the struct ttm_operation_ctx needed to determine whether the caller needs this. Instead, attach the needed information to the vm under the vm->resv, until we've been able to update TTM to provide the needed information. And add sufficient lockdep checks to prevent misuse and races. v2: - Fix a copy-paste error in xe_vm_clear_validating() v3: - Fix kerneldoc errors. Signed-off-by: Thomas Hellström Fixes: 0af944f0e308 ("drm/xe: Reject BO eviction if BO is bound to current VM") Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250528164105.234718-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 9d5558649f68e2e84a87a909631b30e15ca0f8ec) Signed-off-by: Thomas Hellström commit 2182f358fb138f81a586ffdddd510f2a4fc61702 Author: Arnd Bergmann Date: Thu May 29 10:23:56 2025 -0700 drm/xe/vsec: fix CONFIG_INTEL_VSEC dependency The XE driver can be built with or without VSEC support, but fails to link as built-in if vsec is in a loadable module: x86_64-linux-ld: vmlinux.o: in function `xe_vsec_init': (.text+0x1e83e16): undefined reference to `intel_vsec_register' The normal fix for this is to add a 'depends on INTEL_VSEC || !INTEL_VSEC', forcing XE to be a loadable module as well, but that causes a circular dependency: symbol DRM_XE depends on INTEL_VSEC symbol INTEL_VSEC depends on X86_PLATFORM_DEVICES symbol X86_PLATFORM_DEVICES is selected by DRM_XE The problem here is selecting a symbol from another subsystem, so change that as well and rephrase the 'select' into the corresponding dependency. Since X86_PLATFORM_DEVICES is 'default y', there is no change to defconfig builds here. Fixes: 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices") Signed-off-by: Arnd Bergmann Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250529172355.2395634-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit e4931f8be347ec5f19df4d6d33aea37145378c42) Signed-off-by: Thomas Hellström commit 94110827925a2512e480176b3002e08105f98d66 Author: Raag Jadav Date: Thu May 29 21:39:37 2025 +0530 drm/xe: drop redundant conversion to bool The result of integer comparison already evaluates to bool. No need for explicit conversion. No functional impact. Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505292205.MoljmkjQ-lkp@intel.com/ Signed-off-by: Raag Jadav Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250529160937.490147-1-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 61761a6b57f2818983466d24aab60baab471ba21) Signed-off-by: Thomas Hellström commit b885ae2e9db3dba8e9b3bc4df36744f22455d889 Author: Karthik Poosa Date: Thu May 29 22:04:54 2025 +0530 drm/xe/hwmon: Move card reactive critical power under channel card Move power2/curr2_crit to channel 1 i.e power1/curr1_crit as this represents the entire card critical power/current. v2: Update the date of curr1_crit also in hwmon documentation. Signed-off-by: Karthik Poosa Fixes: 345dadc4f68b ("drm/xe/hwmon: Add infra to support card power and energy attributes") Reviewed-by: Badal Nilawar Link: https://lore.kernel.org/r/20250529163458.2354509-3-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 25e963a09e059ffdb15c09cc79cfded855b43668) Signed-off-by: Thomas Hellström commit 25a2aa779fc39c4559a5bde0f841d2cd4cbc4d66 Author: Karthik Poosa Date: Thu May 29 22:04:53 2025 +0530 drm/xe/hwmon: Add support to manage power limits though mailbox Add support to manage power limits using pcode mailbox commands for supported platforms. v2: - Address review comments. (Badal) - Use mailbox commands instead of registers to manage power limits for BMG. - Clamp the maximum power limit to GPU firmware default value. v3: - Clamp power limit in write also for platforms with mailbox support. v4: - Remove unnecessary debug prints. (Badal) v5: - Update description of variable pl1_on_boot to fix kernel-doc error. v6: - Improve commit message, refer to BIOS as GPU firmware. - Change macro READ_PL_FROM_BIOS to READ_PL_FROM_FW. - Rectify drm_warn to drm_info. Signed-off-by: Karthik Poosa Fixes: e90f7a58e659 ("drm/xe/hwmon: Add HWMON support for BMG") Reviewed-by: Badal Nilawar Link: https://lore.kernel.org/r/20250529163458.2354509-2-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 7596d839f6228757fe17a810da2d1c5f3305078c) Signed-off-by: Thomas Hellström commit 8cf8cde41ad01150afbd1327ad1942387787f7fd Author: Matthew Auld Date: Wed May 14 16:24:26 2025 +0100 drm/xe/vm: move xe_svm_init() earlier In xe_vm_close_and_put() we need to be able to call xe_svm_fini(), however during vm creation we can call this on the error path, before having actually initialised the svm state, leading to various splats followed by a fatal NPD. Fixes: 6fd979c2f331 ("drm/xe: Add SVM init / close / fini to faulting VMs") Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4967 Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250514152424.149591-4-matthew.auld@intel.com (cherry picked from commit 4f296d77cf49fcb5f90b4674123ad7f3a0676165) Signed-off-by: Thomas Hellström commit a63e99b4d6d3a0353ef47146dd5bd562f08e1786 Author: Matthew Auld Date: Wed May 14 16:24:25 2025 +0100 drm/xe/vm: move rebind_work init earlier In xe_vm_close_and_put() we need to be able to call flush_work(rebind_work), however during vm creation we can call this on the error path, before having actually set up the worker, leading to a splat from flush_work(). It looks like we can simply move the worker init step earlier to fix this. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: # v6.8+ Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250514152424.149591-3-matthew.auld@intel.com (cherry picked from commit 96af397aa1a2d1032a6e28ff3f4bc0ab4be40e1d) Signed-off-by: Thomas Hellström commit 7fdaba912981e6fe7585517ccf3b5da59e17592e Merge: bfdf35c5dc6267 3d8b44b104fb5f Author: Linus Torvalds Date: Thu Jun 5 08:54:47 2025 -0700 Merge tag 'rtc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "There are two new drivers this cycle. There is also support for a negative offset for RTCs that have been shipped with a date set using an epoch that is before 1970. This unfortunately happens with some products that ship with a vendor kernel and an out of tree driver. Core: - support negative offsets for RTCs that have shipped with an epoch earlier than 1970 New drivers: - NXP S32G2/S32G3 - Sophgo CV1800 Drivers: - loongson: fix missing alarm notifications for ACPI - m41t80: kickstart ocillator upon failure - mt6359: mt6357 support - pcf8563: fix wrong alarm register - sh: cleanups" * tag 'rtc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (39 commits) rtc: mt6359: Add mt6357 support rtc: test: Test date conversion for dates starting in 1900 rtc: test: Also test time and wday outcome of rtc_time64_to_tm() rtc: test: Emit the seconds-since-1970 value instead of days-since-1970 rtc: Fix offset calculation for .start_secs < 0 rtc: Make rtc_time64_to_tm() support dates before 1970 rtc: pcf8563: fix wrong alarm register rtc: rzn1: support input frequencies other than 32768Hz rtc: rzn1: Disable controller before initialization dt-bindings: rtc: rzn1: add optional second clock rtc: m41t80: reduce verbosity rtc: m41t80: kickstart ocillator upon failure rtc: s32g: add NXP S32G2/S32G3 SoC support dt-bindings: rtc: add schema for NXP S32G2/S32G3 SoCs dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc rtc: loongson: Add missing alarm notifications for ACPI RTC events rtc: sophgo: add rtc support for Sophgo CV1800 SoC rtc: stm32: drop unused module alias rtc: s3c: drop unused module alias ... commit f670b50ef5e4a69bf4d2ec5ac6a9228d93b13a7a Author: Thomas Zimmermann Date: Tue Jun 3 17:48:20 2025 +0200 sysfb: Fix screen_info type check for VGA Use the helper screen_info_video_type() to get the framebuffer type from struct screen_info. Handle supported values in sorted switch statement. Reading orig_video_isVGA is unreliable. On most systems it is a VIDEO_TYPE_ constant. On some systems with VGA it is simply set to 1 to signal the presence of a VGA output. See vga_probe() for an example. Retrieving the screen_info type with the helper screen_info_video_type() detects these cases and returns the appropriate VIDEO_TYPE_ constant. For VGA, sysfb creates a device named "vga-framebuffer". The sysfb code has been taken from vga16fb, where it likely didn't work correctly either. With this bugfix applied, vga16fb loads for compatible vga-framebuffer devices. Fixes: 0db5b61e0dc0 ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Alex Deucher Cc: Tzung-Bi Shih Cc: Helge Deller Cc: "Uwe Kleine-König" Cc: Zsolt Kajtar Cc: # v6.1+ Signed-off-by: Thomas Zimmermann Reviewed-by: Tzung-Bi Shih Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250603154838.401882-1-tzimmermann@suse.de commit 2f29b5c231011b94007d2c8a6d793992f2275db1 Author: Thomas Zimmermann Date: Wed May 28 10:02:08 2025 +0200 video: screen_info: Relocate framebuffers behind PCI bridges Apply PCI host-bridge window offsets to screen_info framebuffers. Fixes invalid access to I/O memory. Resources behind a PCI host bridge can be relocated by a certain offset in the kernel's CPU address range used for I/O. The framebuffer memory range stored in screen_info refers to the CPU addresses as seen during boot (where the offset is 0). During boot up, firmware may assign a different memory offset to the PCI host bridge and thereby relocating the framebuffer address of the PCI graphics device as seen by the kernel. The information in screen_info must be updated as well. The helper pcibios_bus_to_resource() performs the relocation of the screen_info's framebuffer resource (given in PCI bus addresses). The result matches the I/O-memory resource of the PCI graphics device (given in CPU addresses). As before, we store away the information necessary to later update the information in screen_info itself. Commit 78aa89d1dfba ("firmware/sysfb: Update screen_info for relocated EFI framebuffers") added the code for updating screen_info. It is based on similar functionality that pre-existed in efifb. Efifb uses a pointer to the PCI resource, while the newer code does a memcpy of the region. Hence efifb sees any updates to the PCI resource and avoids the issue. v3: - Only use struct pci_bus_region for PCI bus addresses (Bjorn) - Clarify address semantics in commit messages and comments (Bjorn) v2: - Fixed tags (Takashi, Ivan) - Updated information on efifb Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reported-by: "Ivan T. Ivanov" Closes: https://bugzilla.suse.com/show_bug.cgi?id=1240696 Tested-by: "Ivan T. Ivanov" Fixes: 78aa89d1dfba ("firmware/sysfb: Update screen_info for relocated EFI framebuffers") Cc: dri-devel@lists.freedesktop.org Cc: # v6.9+ Link: https://lore.kernel.org/r/20250528080234.7380-1-tzimmermann@suse.de commit bfdf35c5dc6267f70f76abddfacface4dd3b9ac0 Merge: d12ed2b7e1fe5c 3c018bf5a0ee3a Author: Linus Torvalds Date: Thu Jun 5 08:49:30 2025 -0700 Merge tag 'dmaengine-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "A fairly small update for the dmaengine subsystem. This has a new ARM dmaengine driver and couple of new device support and few driver changes: New support: - Renesas RZ/V2H(P) dma support for r9a09g057 - Arm DMA-350 driver - Tegra Tegra264 ADMA support Updates: - AMD ptdma driver code removal and optimizations - Freescale edma error interrupt handler support" * tag 'dmaengine-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (27 commits) dmaengine: idxd: Remove unused pointer and macro arm64: dts: renesas: r9a09g057: Add DMAC nodes dmaengine: sh: rz-dmac: Add RZ/V2H(P) support dmaengine: sh: rz-dmac: Allow for multiple DMACs irqchip/renesas-rzv2h: Add rzv2h_icu_register_dma_req() dt-bindings: dma: rz-dmac: Document RZ/V2H(P) family of SoCs dt-bindings: dma: rz-dmac: Restrict properties for RZ/A1H dmaengine: idxd: Narrow the restriction on BATCH to ver. 1 only dmaengine: ti: Add NULL check in udma_probe() fsldma: Set correct dma_mask based on hw capability dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using dmaengine: xilinx_dma: Set dma_device directions dmaengine: tegra210-adma: Add Tegra264 support dt-bindings: Document Tegra264 ADMA support dmaengine: dw-edma: Add HDMA NATIVE map check dmaegnine: fsl-edma: add edma error interrupt handler dt-bindings: dma: fsl-edma: increase maxItems of interrupts and interrupt-names dmaengine: ARM_DMA350 should depend on ARM/ARM64 dt-bindings: dma: qcom,bam: Document dma-coherent property dmaengine: Add Arm DMA-350 driver ... commit 8e9d6efccdd728fb1193e4faada45dff03773608 Author: Steve French Date: Tue Jun 3 23:21:09 2025 -0500 cifs: update internal version number to 2.55 Signed-off-by: Steve French commit e889a450a661281847517ee64ef8219b05972347 Author: Paulo Alcantara Date: Thu Jun 5 10:22:16 2025 -0300 MAINTAINERS, mailmap: Update Paulo Alcantara's email address Update my email address in MAINTAINERS and .mailmap files. Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 1c6bbc45d856ac86be9c18194a8c5b7c56e41ebd Author: Meetakshi Setiya Date: Tue Jun 3 00:06:28 2025 -0400 cifs: add documentation for smbdirect setup Document steps to use SMB over RDMA using the linux SMB client and KSMBD server Signed-off-by: Meetakshi Setiya Signed-off-by: Steve French commit d12ed2b7e1fe5c9e4a372a95fb7635a7f81eff6a Merge: a479ebb269bc0c 0c22287319741b Author: Linus Torvalds Date: Thu Jun 5 08:20:21 2025 -0700 Merge tag 'phy-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "As usual featuring couple of new driver and bunch of new device support and some driver changes to Freescale, rockchip driver along with couple of yaml binding conversions. New Support: - Qualcomm IPQ5424 qusb2 support, IPQ5018 uniphy-pcie driver - Rockchip usb2 support for RK3562, RK3036 usb2 phy support - Samsung exynos2200 eusb2 phy support and driver refactoring for this support, exynos7870 USBDRD support - Mediatek MT7988 xs-phy support - Broadcom BCM74110 usb phy support - Renesas RZ/V2H(P) usb2 phy support Updates: - Freescale phy rate claculation updates, i.MX95 tuning support - Better error handling for amlogic pcie phy - Rockchip color depth configuration and management support - Yaml binding conversion for RK3399 Type-C and PCIe Phy" * tag 'phy-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (77 commits) phy: tegra: p2u: Broaden architecture dependency phy: rockchip: inno-usb2: Add usb2 phy support for rk3562 dt-bindings: phy: rockchip,inno-usb2phy: add rk3562 phy: rockchip: inno-usb2: add phy definition for rk3036 dt-bindings: phy: rockchip,inno-usb2phy: add rk3036 compatible phy: freescale: fsl-samsung-hdmi: Improve LUT search for best clock phy: freescale: fsl-samsung-hdmi: Refactor finding PHY settings phy: freescale: fsl-samsung-hdmi: Rename phy_clk_round_rate phy: renesas: phy-rcar-gen3-usb2: Add USB2.0 PHY support for RZ/V2H(P) phy: renesas: phy-rcar-gen3-usb2: Sort compatible entries by SoC part number dt-bindings: phy: renesas,usb2-phy: Document RZ/V2H(P) SoC dt-bindings: phy: renesas,usb2-phy: Add clock constraint for RZ/G2L family phy: exynos5-usbdrd: support Exynos USBDRD 3.2 4nm controller phy: phy-snps-eusb2: add support for exynos2200 phy: phy-snps-eusb2: refactor reference clock init phy: phy-snps-eusb2: make reset control optional phy: phy-snps-eusb2: make repeater optional phy: phy-snps-eusb2: split phy init code phy: phy-snps-eusb2: refactor constructs names phy: move phy-qcom-snps-eusb2 out of its vendor sub-directory ... commit a479ebb269bc0c4d286f0413b92f92808e053b79 Merge: ec7714e4947909 62ada17a6217a5 Author: Linus Torvalds Date: Thu Jun 5 08:07:24 2025 -0700 Merge tag 'soundwire-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: "A couple of small core changes and an Intel driver change: - sdw_assign_device_num() logic simplification, using internal slave id for irqs and optimizing computing of port params in specific stream states - Intel driver updates for ACE3+ microphone privacy status reporting and enabling the status in HDA Intel driver" * tag 'soundwire-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: only compute port params in specific stream states ASoC: SOF: Intel: hda: Set the mic_privacy flag for soundwire with ACE3+ soundwire: intel: Add awareness of ACE3+ microphone privacy soundwire: bus: Add internal slave ID and use for IRQs soundwire: bus: Simplify sdw_assign_device_num() commit 3cae906e1a6184cdc9e4d260e4dbdf9a118d94ad Author: Eric Dumazet Date: Wed Jun 4 13:38:26 2025 +0000 calipso: unlock rcu before returning -EAFNOSUPPORT syzbot reported that a recent patch forgot to unlock rcu in the error path. Adopt the convention that netlbl_conn_setattr() is already using. Fixes: 6e9f2df1c550 ("calipso: Don't call calipso functions for AF_INET sk.") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Kuniyuki Iwashima Acked-by: Paul Moore Link: https://patch.msgid.link/20250604133826.1667664-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 7632fedb266d93ed0ed9f487133e6c6314a9b2d1 Author: Ido Schimmel Date: Wed Jun 4 14:32:52 2025 +0300 seg6: Fix validation of nexthop addresses The kernel currently validates that the length of the provided nexthop address does not exceed the specified length. This can lead to the kernel reading uninitialized memory if user space provided a shorter length than the specified one. Fix by validating that the provided length exactly matches the specified one. Fixes: d1df6fd8a1d2 ("ipv6: sr: define core operations for seg6local lightweight tunnel") Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://patch.msgid.link/20250604113252.371528-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit feafc73f3e6ae73371777a037d41d2e31c929636 Author: Eric Dumazet Date: Wed Jun 4 10:58:15 2025 +0000 net: prevent a NULL deref in rtnl_create_link() At the time rtnl_create_link() is running, dev->netdev_ops is NULL, we must not use netdev_lock_ops() or risk a NULL deref if CONFIG_NET_SHAPER is defined. Use netif_set_group() instead of dev_set_group(). RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline] RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline] RIP: 0010:dev_set_group+0xc0/0x230 net/core/dev_api.c:82 Call Trace: rtnl_create_link+0x748/0xd10 net/core/rtnetlink.c:3674 rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3813 __rtnl_newlink net/core/rtnetlink.c:3940 [inline] rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] Reported-by: syzbot+9fc858ba0312b42b577e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6840265f.a00a0220.d4325.0009.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Fixes: 7e4d784f5810 ("net: hold netdev instance lock during rtnetlink operations") Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250604105815.1516973-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 535caaca921c653b1f9838fbd5c4e9494cafc3d9 Author: Eric Dumazet Date: Wed Jun 4 09:39:28 2025 +0000 net: annotate data-races around cleanup_net_task from_cleanup_net() reads cleanup_net_task locklessly. Add READ_ONCE()/WRITE_ONCE() annotations to avoid a potential KCSAN warning, even if the race is harmless. Fixes: 0734d7c3d93c ("net: expedite synchronize_net() for cleanup_net()") Signed-off-by: Eric Dumazet Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250604093928.1323333-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit e6854be4d80ea266a7be64a65a0322bcdfa72807 Author: Jakub Kicinski Date: Tue Jun 3 18:20:55 2025 -0700 selftests: drv-net: tso: make bkg() wait for socat to quit Commit 846742f7e32f ("selftests: drv-net: add a warning for bkg + shell + terminate") added a warning for bkg() used with terminate=True. The tso test was missed as we didn't have it running anywhere in NIPA. Add exit_wait=True, to avoid: # Warning: combining shell and terminate is risky! # SIGTERM may not reach the child on zsh/ksh! getting printed twice for every variant. Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250604012055.891431-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c68804c934e3197e34560744854c57cf88dff8e7 Author: Jakub Kicinski Date: Tue Jun 3 18:20:31 2025 -0700 selftests: drv-net: tso: fix the GRE device name The device type for IPv4 GRE is "gre" not "ipgre", unlike for IPv6 which uses "ip6gre". Not sure how I missed this when writing the test, perhaps because all HW I have access to is on an IPv6-only network. Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test") Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250604012031.891242-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7eb6b63aa3c3b406512db15943ce9eb114095b51 Author: Jakub Kicinski Date: Tue Jun 3 17:16:52 2025 -0700 selftests: drv-net: add configs for the TSO test Add missing config options for the tso.py test, specifically to make sure the kernel is built with vxlan and gre tunnels. I noticed this while adding a TSO-capable device QEMU to the CI. Previously we only run virtio tests and it doesn't report LSO stats on the QEMU we have. Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250604001653.853008-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4bbe2e570f454ca1765d4e45b9b8266c4e65c581 Merge: db9ae3b6b43c79 120f28a6f314fe Author: Jakub Kicinski Date: Thu Jun 5 07:59:31 2025 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== iavf: get rid of the crit lock Przemek Kitszel says: Fix some deadlocks in iavf, and make it less error prone for the future. Patch 1 is simple and independent from the rest. Patches 2, 3, 4 are strictly a refactor, but it enables the last patch to be much smaller. (Technically Jake given his RB tags not knowing I will send it to -net). Patch 5 just adds annotations, this also helps prove last patch to be correct. Patch 6 removes the crit lock, with its unusual try_lock()s. I have more refactoring for scheduling done for -next, to be sent soon. There is a simple test: add VF; decrease number of queueus; remove VF that was way too hard to pass without this series :) * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: get rid of the crit lock iavf: sprinkle netdev_assert_locked() annotations iavf: extract iavf_watchdog_step() out of iavf_watchdog_task() iavf: simplify watchdog_task in terms of adminq task scheduling iavf: centralize watchdog requeueing itself iavf: iavf_suspend(): take RTNL before netdev_lock() ==================== Link: https://patch.msgid.link/20250603171710.2336151-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit db9ae3b6b43c79b1ba87eea849fd65efa05b4b2e Author: Mirco Barone Date: Thu Jun 5 14:06:16 2025 +0200 wireguard: device: enable threaded NAPI Enable threaded NAPI by default for WireGuard devices in response to low performance behavior that we observed when multiple tunnels (and thus multiple wg devices) are deployed on a single host. This affects any kind of multi-tunnel deployment, regardless of whether the tunnels share the same endpoints or not (i.e., a VPN concentrator type of gateway would also be affected). The problem is caused by the fact that, in case of a traffic surge that involves multiple tunnels at the same time, the polling of the NAPI instance of all these wg devices tends to converge onto the same core, causing underutilization of the CPU and bottlenecking performance. This happens because NAPI polling is hosted by default in softirq context, but the WireGuard driver only raises this softirq after the rx peer queue has been drained, which doesn't happen during high traffic. In this case, the softirq already active on a core is reused instead of raising a new one. As a result, once two or more tunnel softirqs have been scheduled on the same core, they remain pinned there until the surge ends. In our experiments, this almost always leads to all tunnel NAPIs being handled on a single core shortly after a surge begins, limiting scalability to less than 3× the performance of a single tunnel, despite plenty of unused CPU cores being available. The proposed mitigation is to enable threaded NAPI for all WireGuard devices. This moves the NAPI polling context to a dedicated per-device kernel thread, allowing the scheduler to balance the load across all available cores. On our 32-core gateways, enabling threaded NAPI yields a ~4× performance improvement with 16 tunnels, increasing throughput from ~13 Gbps to ~48 Gbps. Meanwhile, CPU usage on the receiver (which is the bottleneck) jumps from 20% to 100%. We have found no performance regressions in any scenario we tested. Single-tunnel throughput remains unchanged. More details are available in our Netdev paper. Link: https://netdevconf.info/0x18/docs/netdev-0x18-paper23-talk-paper.pdf Signed-off-by: Mirco Barone Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250605120616.2808744-1-Jason@zx2c4.com Signed-off-by: Jakub Kicinski commit 6f65947a1e684db28b9407ea51927ed5157caf41 Merge: a2f4c1ae163b81 44e479d7202070 Author: Jens Axboe Date: Thu Jun 5 07:40:38 2025 -0600 Merge tag 'nvme-6.16-2025-06-05' of git://git.infradead.org/nvme into block-6.16 Pull NVMe updates and fixes from Christoph: "nvme updates for Linux 6.16 - TCP error handling fix (Shin'ichiro Kawasaki) - TCP I/O stall handling fixes (Hannes Reinecke) - fix command limits status code (Keith Busch) - support vectored buffers also for passthrough (Pavel Begunkov) - spelling fixes (Yi Zhang)" * tag 'nvme-6.16-2025-06-05' of git://git.infradead.org/nvme: nvme: spelling fixes nvme-tcp: fix I/O stalls on congested sockets nvme-tcp: sanitize request list handling nvme-tcp: remove tag set when second admin queue config fails nvme: enable vectored registered bufs for passthrough cmds nvme: fix implicit bool to flags conversion nvme: fix command limits status code commit fad4cf944839da7f5c3376243aa353295c88f588 Author: Sebastian Ott Date: Thu Jun 5 12:36:13 2025 +0200 KVM: arm64: selftests: Determine effective counter width in arch_timer_edge_cases arch_timer_edge_cases uses ~0 as the maximum counter value, however there's no architectural guarantee that this is valid. Figure out the effective counter width based on the effective frequency like it's done by the kernel. This also serves as a workaround for AC03_CPU_14 that led to the following assertion failure on ampere-one machines: ==== Test Assertion Failure ==== arm64/arch_timer_edge_cases.c:169: timer_condition == istatus pid=11236 tid=11236 errno=4 - Interrupted system call 1 0x0000000000404ce7: test_run at arch_timer_edge_cases.c:938 2 0x0000000000401ebb: main at arch_timer_edge_cases.c:1053 3 0x0000ffff9fa8625b: ?? ??:0 4 0x0000ffff9fa8633b: ?? ??:0 5 0x0000000000401fef: _start at ??:? 0x1 != 0x0 (timer_condition != istatus) Note that the following subtest only worked since the counter initialized with CVAL_MAX would instantly overflow (which is no longer the case): test_set_cnt_after_cval_no_irq(timer, 0, DEF_CNT, CVAL_MAX, sm); To fix this we could swap CVAL_MAX for 0 here but since that is already done by test_move_counters_behind_timers() let's remove that subtest. Link: https://lore.kernel.org/kvmarm/ac1de1d2-ef2b-d439-dc48-8615e121b07b@redhat.com Link: https://amperecomputing.com/assets/AmpereOne_Developer_ER_v0_80_20240823_28945022f4.pdf Signed-off-by: Sebastian Ott Link: https://lore.kernel.org/r/20250605103613.14544-5-sebott@redhat.com Signed-off-by: Marc Zyngier commit 05ce38d489dbc96eb1dd700b287f949cb8cc0610 Author: Sebastian Ott Date: Thu Jun 5 12:36:12 2025 +0200 KVM: arm64: selftests: Fix xVAL init in arch_timer_edge_cases arch_timer_edge_cases hits the following assertion in < 10% of the test runs: ==== Test Assertion Failure ==== arm64/arch_timer_edge_cases.c:490: timer_get_cntct(timer) >= DEF_CNT + (timer_get_cntfrq() * (uint64_t)(delta_2_ms) / 1000) pid=17110 tid=17110 errno=4 - Interrupted system call 1 0x0000000000404ec7: test_run at arch_timer_edge_cases.c:945 2 0x0000000000401fa3: main at arch_timer_edge_cases.c:1074 3 0x0000ffffa774b587: ?? ??:0 4 0x0000ffffa774b65f: ?? ??:0 5 0x000000000040206f: _start at ??:? timer_get_cntct(timer) >= DEF_CNT + msec_to_cycles(delta_2_ms) Enabling the timer without proper xval initialization in set_tval_irq() resulted in an early interrupt during timer reprogramming. Make sure to set the xval before setting the enable bit. Signed-off-by: Sebastian Ott Link: https://lore.kernel.org/r/20250605103613.14544-4-sebott@redhat.com Signed-off-by: Marc Zyngier commit 050632ae6571d0f148fa0d4b90b6409a12645461 Author: Sebastian Ott Date: Thu Jun 5 12:36:11 2025 +0200 KVM: arm64: selftests: Fix thread migration in arch_timer_edge_cases arch_timer_edge_cases tries to migrate itself across host cpus. Before the first test, it migrates to cpu 0 by setting up an affinity mask with only bit 0 set. After that it looks for the next possible cpu in the current affinity mask which still has only bit 0 set. So there is no migration at all. Fix this by reading the default mask at start and use this to find the next cpu in each iteration. Signed-off-by: Sebastian Ott Link: https://lore.kernel.org/r/20250605103613.14544-3-sebott@redhat.com Signed-off-by: Marc Zyngier commit 9a9864fd09c7e52440c05e70609bf5ee8da425d0 Author: Sebastian Ott Date: Thu Jun 5 12:36:10 2025 +0200 KVM: arm64: selftests: Fix help text for arch_timer_edge_cases Fix the help text for arch_timer_edge_cases to show the correct option for setting the wait time. Signed-off-by: Sebastian Ott Link: https://lore.kernel.org/r/20250605103613.14544-2-sebott@redhat.com Signed-off-by: Marc Zyngier commit 4d401c5534ab132a44f9afbf18a6d861b1320c98 Merge: edafd348a0548b 787fe16b435668 Author: Paolo Abeni Date: Thu Jun 5 15:19:33 2025 +0200 Merge tag 'wireless-2025-06-05' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Couple of quick fixes: - iwlwifi/iwlmld crash on certain error paths - iwlwifi/iwlmld regulatory data mixup - iwlwifi/iwlmld suspend/resume fix - iwlwifi MSI (without -X) fix - cfg80211/mac80211 S1G parsing fixes * tag 'wireless-2025-06-05' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements wifi: iwlwifi: mld: Move regulatory domain initialization wifi: iwlwifi: pcie: fix non-MSIX handshake register wifi: iwlwifi: mld: avoid panic on init failure wifi: iwlwifi: mvm: fix assert on suspend ==================== Link: https://patch.msgid.link/20250605095443.17874-6-johannes@sipsolutions.net Signed-off-by: Paolo Abeni commit b5fa1f91e11fdf74ad4e2ac6dae246a57cbd2d95 Author: Marc Zyngier Date: Tue Jun 3 08:08:24 2025 +0100 KVM: arm64: Make __vcpu_sys_reg() a pure rvalue operand Now that we don't have any use of __vcpu_sys_reg() as a lvalue, remove the in-place update, and directly return the sanitised value. Reviewed-by: Miguel Luis Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250603070824.1192795-5-maz@kernel.org Signed-off-by: Marc Zyngier commit b61fae4ee120f337b8700dff43b2fd639f3bf6a5 Author: Marc Zyngier Date: Tue Jun 3 08:08:23 2025 +0100 KVM: arm64: Don't use __vcpu_sys_reg() to get the address of a sysreg We are about to prevent the use of __vcpu_sys_reg() as a lvalue, and getting the address of a rvalue is not a thing. Update the couple of places where we do this to use the __ctxt_sys_reg() accessor, which return the address of a register. Reviewed-by: Miguel Luis Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250603070824.1192795-4-maz@kernel.org Signed-off-by: Marc Zyngier commit 8800b7c4bbede3cd40831726d3f98e8080baf4df Author: Marc Zyngier Date: Tue Jun 3 08:08:22 2025 +0100 KVM: arm64: Add RMW specific sysreg accessor In a number of cases, we perform a Read-Modify-Write operation on a system register, meaning that we would apply the RESx masks twice. Instead, provide a new accessor that performs this RMW operation, allowing the masks to be applied exactly once per operation. Reviewed-by: Miguel Luis Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250603070824.1192795-3-maz@kernel.org Signed-off-by: Marc Zyngier commit 6678791ee3da0b78c28fe7d77814097f53cbb8df Author: Marc Zyngier Date: Tue Jun 3 08:08:21 2025 +0100 KVM: arm64: Add assignment-specific sysreg accessor Assigning a value to a system register doesn't do what it is supposed to be doing if that register is one that has RESx bits. The main problem is that we use __vcpu_sys_reg(), which can be used both as a lvalue and rvalue. When used as a lvalue, the bit masking occurs *before* the new value is assigned, meaning that we (1) do pointless work on the old cvalue, and (2) potentially assign an invalid value as we fail to apply the masks to it. Fix this by providing a new __vcpu_assign_sys_reg() that does what it says on the tin, and sanitises the *new* value instead of the old one. This comes with a significant amount of churn. Reviewed-by: Miguel Luis Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250603070824.1192795-2-maz@kernel.org Signed-off-by: Marc Zyngier commit 91274fd4ed9ba110b02c53d71d2778b7d13b49ac Author: Jacek Lawrynowicz Date: Wed May 28 19:12:20 2025 +0200 accel/ivpu: Fix warning in ivpu_gem_bo_free() Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they can be indeed used in the original context/driver. Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management") Cc: stable@vger.kernel.org # v6.3 Reviewed-by: Jeff Hugo Reviewed-by: Lizhi Hou Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250528171220.513225-1-jacek.lawrynowicz@linux.intel.com commit 8337204c58899fe422db765b481711eb2d95eb0b Author: Peter Zijlstra Date: Wed May 28 10:55:21 2025 +0200 futex: Handle invalid node numbers supplied by user syzbot used a negative node number which was not rejected early and led to invalid memory access in node_possible(). Reject negative node numbers except for FUTEX_NO_NODE. [bigeasy: Keep the FUTEX_NO_NODE check] Closes: https://lore.kernel.org/all/6835bfe3.a70a0220.253bc2.00b5.GAE@google.com/ Fixes: cec199c5e39bd ("futex: Implement FUTEX2_NUMA") Signed-off-by: Peter Zijlstra (Intel) Reported-by: syzbot+9afaf6749e3a7aa1bdf3@syzkaller.appspotmail.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250528085521.1938355-4-bigeasy@linutronix.de commit 0ecb4232fc65e659ca7020f8bb2e0fc347acfb7d Author: Sebastian Andrzej Siewior Date: Wed May 28 10:55:20 2025 +0200 selftests/futex: Set the home_node in futex_numa_mpol The test fails at the MPOL step if multiple nodes are available. The reason is that mbind() sets the policy but the home_node, which is retrieved by the futex code, is not set. This causes to retrieve the current node and with multiple nodes it fails on one of the iterations. Use numa_set_mempolicy_home_node() to set the expected node. Use ksft_exit_fail_msg() to fail and exit in order not to confuse ktap. Fixes: 3163369407baf ("selftests/futex: Add futex_numa_mpol") Suggested-by: Vlastimil Babka Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250528085521.1938355-3-bigeasy@linutronix.de commit 1a9dcf69c7a97e733aa2fc026db22f22928ca7b7 Author: Sebastian Andrzej Siewior Date: Wed May 28 10:55:19 2025 +0200 selftests/futex: getopt() requires int as return value. Mark reported that futex_priv_hash fails on ARM64. It turns out that the command line parsing does not terminate properly and ends in the default case assuming an invalid option was passed. Use an int as the return type for getopt(). Closes: https://lore.kernel.org/all/31869a69-063f-44a3-a079-ba71b2506cce@sirena.org.uk/ Fixes: 3163369407baf ("selftests/futex: Add futex_numa_mpol") Fixes: cda95faef7bcf ("selftests/futex: Add futex_priv_hash") Reported-by: Mark Brown Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250528085521.1938355-2-bigeasy@linutronix.de commit 49b393af3130c7712c7e8f215f4126c9a8060fa6 Author: Peter Zijlstra Date: Wed Jun 4 10:21:38 2025 +0200 perf: Add comment to enum perf_event_state Better describe the event states. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Leo Yan Link: https://lkml.kernel.org/r/20250604135801.GK38114@noisy.programming.kicks-ass.net commit 3172fb986666dfb71bf483b6d3539e1e587fa197 Author: Luo Gengkun Date: Wed Jun 4 03:39:24 2025 +0000 perf/core: Fix WARN in perf_cgroup_switch() There may be concurrency between perf_cgroup_switch and perf_cgroup_event_disable. Consider the following scenario: after a new perf cgroup event is created on CPU0, the new event may not trigger a reprogramming, causing ctx->is_active to be 0. In this case, when CPU1 disables this perf event, it executes __perf_remove_from_context-> list _del_event->perf_cgroup_event_disable on CPU1, which causes a race with perf_cgroup_switch running on CPU0. The following describes the details of this concurrency scenario: CPU0 CPU1 perf_cgroup_switch: ... # cpuctx->cgrp is not NULL here if (READ_ONCE(cpuctx->cgrp) == NULL) return; perf_remove_from_context: ... raw_spin_lock_irq(&ctx->lock); ... # ctx->is_active == 0 because reprogramm is not # tigger, so CPU1 can do __perf_remove_from_context # for CPU0 __perf_remove_from_context: perf_cgroup_event_disable: ... if (--ctx->nr_cgroups) ... # this warning will happened because CPU1 changed # ctx.nr_cgroups to 0. WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0); [peterz: use guard instead of goto unlock] Fixes: db4a835601b7 ("perf/core: Set cgroup in CPU contexts for new cgroup events") Signed-off-by: Luo Gengkun Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250604033924.3914647-3-luogengkun@huaweicloud.com commit 3b7a34aebbdf2a4b7295205bf0c654294283ec82 Author: Yeoreum Yun Date: Mon Jun 2 19:40:49 2025 +0100 perf: Fix dangling cgroup pointer in cpuctx Commit a3c3c6667("perf/core: Fix child_total_time_enabled accounting bug at task exit") moves the event->state update to before list_del_event(). This makes the event->state test in list_del_event() always false; never calling perf_cgroup_event_disable(). As a result, cpuctx->cgrp won't be cleared properly; causing havoc. Fixes: a3c3c6667("perf/core: Fix child_total_time_enabled accounting bug at task exit") Signed-off-by: Yeoreum Yun Signed-off-by: Peter Zijlstra (Intel) Tested-by: David Wang <00107082@163.com> Link: https://lore.kernel.org/all/aD2TspKH%2F7yvfYoO@e129823.arm.com/ commit 61988e36dc5457cdff7ae7927e8d9ad1419ee998 Author: Peter Zijlstra Date: Thu Jun 5 12:37:11 2025 +0200 perf: Fix cgroup state vs ERROR While chasing down a missing perf_cgroup_event_disable() elsewhere, Leo Yan found that both perf_put_aux_event() and perf_remove_sibling_event() were also missing one. Specifically, the rule is that events that switch to OFF,ERROR need to call perf_cgroup_event_disable(). Unify the disable paths to ensure this. Fixes: ab43762ef010 ("perf: Allow normal events to output AUX data") Fixes: 9f0c4fa111dc ("perf/core: Add a new PERF_EV_CAP_SIBLING event capability") Reported-by: Leo Yan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250605123343.GD35970@noisy.programming.kicks-ass.net commit 4f6fc782128355931527cefe3eb45338abd8ab39 Author: Peter Zijlstra Date: Thu Jun 5 12:31:45 2025 +0200 perf: Fix sample vs do_exit() Baisheng Gao reported an ARM64 crash, which Mark decoded as being a synchronous external abort -- most likely due to trying to access MMIO in bad ways. The crash further shows perf trying to do a user stack sample while in exit_mmap()'s tlb_finish_mmu() -- i.e. while tearing down the address space it is trying to access. It turns out that we stop perf after we tear down the userspace mm; a receipie for disaster, since perf likes to access userspace for various reasons. Flip this order by moving up where we stop perf in do_exit(). Additionally, harden PERF_SAMPLE_CALLCHAIN and PERF_SAMPLE_STACK_USER to abort when the current task does not have an mm (exit_mm() makes sure to set current->mm = NULL; before commencing with the actual teardown). Such that CPU wide events don't trip on this same problem. Fixes: c5ebcedb566e ("perf: Add ability to attach user stack dump to sample") Reported-by: Baisheng Gao Suggested-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250605110815.GQ39944@noisy.programming.kicks-ass.net commit a47e36dc5d90dc664cac87304c17d50f1595d634 Author: Karol Wachowski Date: Wed May 28 17:42:53 2025 +0200 accel/ivpu: Trigger device recovery on engine reset/resume failure Trigger full device recovery when the driver fails to restore device state via engine reset and resume operations. This is necessary because, even if submissions from a faulty context are blocked, the NPU may still process previously submitted faulty jobs if the engine reset fails to abort them. Such jobs can continue to generate faults and occupy device resources. When engine reset is ineffective, the only way to recover is to perform a full device recovery. Fixes: dad945c27a42 ("accel/ivpu: Add handling of VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW") Cc: stable@vger.kernel.org # v6.15+ Signed-off-by: Karol Wachowski Reviewed-by: Lizhi Hou Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250528154253.500556-1-jacek.lawrynowicz@linux.intel.com commit 98d3f772ca7d6822bdfc8c960f5f909574db97c9 Author: Jacek Lawrynowicz Date: Wed May 28 17:43:25 2025 +0200 accel/ivpu: Use dma_resv_lock() instead of a custom mutex This fixes a potential race conditions in: - ivpu_bo_unbind_locked() where we modified the shmem->sgt without holding the dma_resv_lock(). - ivpu_bo_print_info() where we read the shmem->pages without holding the dma_resv_lock(). Using dma_resv_lock() also protects against future syncronisation issues that may arise when accessing drm_gem_shmem_object or drm_gem_object members. Fixes: 42328003ecb6 ("accel/ivpu: Refactor BO creation functions") Cc: stable@vger.kernel.org # v6.9+ Reviewed-by: Lizhi Hou Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250528154325.500684-1-jacek.lawrynowicz@linux.intel.com commit edafd348a0548b6945c3cf77273f0a88a181362a Merge: 8e59d9e24df468 3c3c3248496a3a Author: Paolo Abeni Date: Thu Jun 5 13:37:02 2025 +0200 Merge tag 'nf-25-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Zero out the remainder in nft_pipapo AVX2 implementation, otherwise next lookup could bogusly report a mismatch. This is followed by two patches to update nft_pipapo selftests to cover for the previous bug. From Florian Westphal. 2) Check for reverse tuple too in case of esoteric NAT collisions for UDP traffic and extend selftest coverage. Also from Florian. netfilter pull request 25-06-05 * tag 'nf-25-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: selftests: netfilter: nft_nat.sh: add test for reverse clash with nat netfilter: nf_nat: also check reverse tuple to obtain clashing entry selftests: netfilter: nft_concat_range.sh: add datapath check for map fill bug selftests: netfilter: nft_concat_range.sh: prefer per element counters for testing netfilter: nf_set_pipapo_avx2: fix initial map fill ==================== Link: https://patch.msgid.link/20250605085735.52205-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 714d02b41939d2720379e11ef25227aec4e5bec9 Author: Amir Goldstein Date: Thu Jun 5 12:15:30 2025 +0200 ovl: fix regression caused by lookup helpers API changes The lookup helpers API was changed by merge of vfs-6.16-rc1.async.dir to pass a non-const qstr pointer argument to lookup_one*() helpers. All of the callers of this API were changed to pass a pointer to temp copy of qstr, except overlays that was passing a const pointer to dentry->d_name that was changed to pass a non-const copy instead when doing a lookup in lower layer which is not the fs of said dentry. This wrong use of the API caused a regression in fstest overlay/012. Fix the regression by making a non-const copy of dentry->d_name prior to calling the lookup API, but the API should be fixed to not allow this class of bugs. Cc: NeilBrown Fixes: 5741909697a3 ("VFS: improve interface for lookup_one functions") Fixes: 390e34bc1490 ("VFS: change lookup_one_common and lookup_noperm_common to take a qstr") Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250605101530.2336320-1-amir73il@gmail.com Signed-off-by: Christian Brauner commit 8e59d9e24df4688b6a5ea79c84d0b26d1499d4d5 Merge: ec6a328b2e68ad 8af7a919c52f02 Author: Paolo Abeni Date: Thu Jun 5 12:50:12 2025 +0200 Merge branch 'netlink-specs-rt-link-decode-ip6gre' Jakub Kicinski says: ==================== netlink: specs: rt-link: decode ip6gre Adding GRE tunnels to the .config for driver tests caused some unhappiness in YNL, as it can't decode all the link attrs on the system. Add ip6gre support to fix the tests. This is similar to commit 6ffdbb93a59c ("netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs"). ==================== Link: https://patch.msgid.link/20250603135357.502626-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 8af7a919c52f02514a145f995cbdf0deadb8075a Author: Jakub Kicinski Date: Tue Jun 3 06:53:57 2025 -0700 netlink: specs: rt-link: decode ip6gre Driver tests now require GRE tunnels, while we don't configure them with YNL, YNL will complain when it sees link types it doesn't recognize. Teach it decoding ip6gre tunnels. The attrs are largely the same as IPv4 GRE. Correct the type of encap-limit, but note that this attr is only used in ip6gre, so the mistake didn't matter until now. Fixes: 0d0f4174f6c8 ("selftests: drv-net: add a simple TSO test") Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250603135357.502626-3-kuba@kernel.org Signed-off-by: Paolo Abeni commit de92258e3b22bd4ce920715cc91f09d788e5badf Author: Jakub Kicinski Date: Tue Jun 3 06:53:56 2025 -0700 netlink: specs: rt-link: add missing byte-order properties A number of fields in the ip tunnels are lacking the big-endian designation. I suspect this is not intentional, as decoding the ports with the right endian seems objectively beneficial. Fixes: 6ffdbb93a59c ("netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs") Fixes: 077b6022d24b ("doc/netlink/specs: Add sub-message type to rt_link family") Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250603135357.502626-2-kuba@kernel.org Signed-off-by: Paolo Abeni commit ec6a328b2e68adfaa322b633519b72ab6cd33e3a Merge: 501fe52aa908c9 9c7e8b31da035f Author: Paolo Abeni Date: Thu Jun 5 12:37:10 2025 +0200 Merge tag 'ovpn-net-20250603' of https://github.com/OpenVPN/ovpn-net-next Antonio Quartulli says: ==================== In this batch you can find the following bug fixes: Patch 1: when releasing a UDP socket we were wrongly invoking setup_udp_tunnel_sock() with an empty config. This was not properly shutting down the UDP encap state. With this patch we simply undo what was done during setup. Patch 2: ovpn was holding a reference to a 'struct socket' without increasing its reference counter. This was intended and worked as expected until we hit a race condition where user space tries to close the socket while kernel space is also releasing it. In this case the (struct socket *)->sk member would disappear under our feet leading to a null-ptr-deref. This patch fixes this issue by having struct ovpn_socket hold a reference directly to the sk member while also increasing its reference counter. Patch 3: in case of errors along the TCP RX path (softirq) we want to immediately delete the peer, but this operation may sleep. With this patch we move the peer deletion to a scheduled worker. Patch 4 and 5 are instead fixing minor issues in the ovpn kselftests. * tag 'ovpn-net-20250603' of https://github.com/OpenVPN/ovpn-net-next: selftest/net/ovpn: fix missing file selftest/net/ovpn: fix TCP socket creation ovpn: avoid sleep in atomic context in TCP RX error path ovpn: ensure sk is still valid during cleanup ovpn: properly deconfigure UDP-tunnel ==================== Link: https://patch.msgid.link/20250603111110.4575-1-antonio@openvpn.net/ Signed-off-by: Paolo Abeni commit 11709abccf93b08adde95ef313c300b0d4bc28f1 Author: Heiko Carstens Date: Tue Jun 3 15:49:36 2025 +0200 s390/mm: Fix in_atomic() handling in do_secure_storage_access() Kernel user spaces accesses to not exported pages in atomic context incorrectly try to resolve the page fault. With debug options enabled call traces like this can be seen: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1523 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 419074, name: qemu-system-s39 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<00000383ea47cfa2>] copy_page_from_iter_atomic+0xa2/0x8a0 CPU: 12 UID: 0 PID: 419074 Comm: qemu-system-s39 Tainted: G W 6.16.0-20250531.rc0.git0.69b3a602feac.63.fc42.s390x+debug #1 PREEMPT Tainted: [W]=WARN Hardware name: IBM 3931 A01 703 (LPAR) Call Trace: [<00000383e990d282>] dump_stack_lvl+0xa2/0xe8 [<00000383e99bf152>] __might_resched+0x292/0x2d0 [<00000383eaa7c374>] down_read+0x34/0x2d0 [<00000383e99432f8>] do_secure_storage_access+0x108/0x360 [<00000383eaa724b0>] __do_pgm_check+0x130/0x220 [<00000383eaa842e4>] pgm_check_handler+0x114/0x160 [<00000383ea47d028>] copy_page_from_iter_atomic+0x128/0x8a0 ([<00000383ea47d016>] copy_page_from_iter_atomic+0x116/0x8a0) [<00000383e9c45eae>] generic_perform_write+0x16e/0x310 [<00000383e9eb87f4>] ext4_buffered_write_iter+0x84/0x160 [<00000383e9da0de4>] vfs_write+0x1c4/0x460 [<00000383e9da123c>] ksys_write+0x7c/0x100 [<00000383eaa7284e>] __do_syscall+0x15e/0x280 [<00000383eaa8417e>] system_call+0x6e/0x90 INFO: lockdep is turned off. It is not allowed to take the mmap_lock while in atomic context. Therefore handle such a secure storage access fault as if the accessed page is not mapped: the uaccess function will return -EFAULT, and the caller has to deal with this. Usually this means that the access is retried in process context, which allows to resolve the page fault (or in this case export the page). Reviewed-by: Claudio Imbrenda Acked-by: Alexander Gordeev Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20250603134936.1314139-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens commit 501fe52aa908c96f2c9b8d54767938a1a5960354 Author: Daniele Palmas Date: Tue Jun 3 11:12:04 2025 +0200 net: wwan: mhi_wwan_mbim: use correct mux_id for multiplexing Recent Qualcomm chipsets like SDX72/75 require MBIM sessionId mapping to muxId in the range (0x70-0x8F) for the PCIe tethered use. This has been partially addressed by the referenced commit, mapping the default data call to muxId = 112, but the multiplexed data calls scenario was not properly considered, mapping sessionId = 1 to muxId 1, while it should have been 113. Fix this by moving the session_id assignment logic to mhi_mbim_newlink, in order to map sessionId = n to muxId = n + WDS_BIND_MUX_DATA_PORT_MUX_ID. Fixes: 65bc58c3dcad ("net: wwan: mhi: make default data link id configurable") Signed-off-by: Daniele Palmas Reviewed-by: Loic Poulain Link: https://patch.msgid.link/20250603091204.2802840-1-dnlplm@gmail.com Signed-off-by: Paolo Abeni commit 787fe16b435668205fba19aaa7387972b7575991 Merge: 1e1f706fc2ce90 f81aa834bfa91c Author: Johannes Berg Date: Thu Jun 5 11:33:07 2025 +0200 Merge tag 'iwlwifi-fixes-2025-06-04' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== iwlwifi fixes ==================== Signed-off-by: Johannes Berg commit 1e1f706fc2ce90eaaf3480b3d5f27885960d751c Author: Lachlan Hodges Date: Tue Jun 3 15:35:38 2025 +1000 wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements S1G beacons are not traditional beacons but a type of extension frame. Extension frames contain the frame control and duration fields, followed by zero or more optional fields before the frame body. These optional fields are distinct from the variable length elements. The presence of optional fields is indicated in the frame control field. To correctly locate the elements offset, the frame control must be parsed to identify which optional fields are present. Currently, mac80211 parses S1G beacons based on fixed assumptions about the frame layout, without inspecting the frame control field. This can result in incorrect offsets to the "variable" portion of the frame. Properly parse S1G beacon frames by using the field lengths defined in IEEE 802.11-2024, section 9.3.4.3, ensuring that the elements offset is calculated accurately. Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results") Fixes: cd418ba63f0c ("mac80211: convert S1G beacon to scan results") Signed-off-by: Lachlan Hodges Link: https://patch.msgid.link/20250603053538.468562-1-lachlan.hodges@morsemicro.com Signed-off-by: Johannes Berg commit e56a50ff7c12983aba710bd02a2c2ad401379e91 Author: Benjamin Berg Date: Thu Jun 5 07:03:25 2025 +0200 um: remove "extern" from implementation of sigchld_handler There is no need to mark the function as extern in the implementation. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506051226.X8r7X5aa-lkp@intel.com/ Fixes: 8420e08fe3a5 ("um: Track userspace children dying in SECCOMP mode") Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250605050325.1077208-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 27a041040f2c6cfbbc24053bce9acb2e801e4e71 Author: Benjamin Berg Date: Thu Jun 5 07:03:24 2025 +0200 um: fix unused variable warning The code was updated to access the PID of the userspace stub process in a different way, making the local cpu variable obsolete. Remove it. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506050008.AwXLNxQX-lkp@intel.com/ Fixes: 406d17c6c370 ("um: Implement kernel side of SECCOMP based process handling") Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250605050325.1077208-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 2862da49dd15d709141acae3f6d81399654420a0 Merge: 919d763d609428 bc1a65eb81a21e Author: Paolo Abeni Date: Thu Jun 5 11:07:36 2025 +0200 Merge branch 'net-dsa-b53-fix-rgmii-ports' Jonas Gorski says: ==================== net: dsa: b53: fix RGMII ports RGMII ports on BCM63xx were not really working, especially with PHYs that support EEE and are capable of configuring their own RGMII delays. So let's make them work, and fix additional minor rgmii related issues found while working on it. With a BCM96328BU-P300: Before: [ 3.580000] b53-switch 10700000.switch GbE3 (uninitialized): validation of rgmii with support 0000000,00000000,00000000,000062ff and advertisement 0000000,00000000,00000000,000062ff failed: -EINVAL [ 3.600000] b53-switch 10700000.switch GbE3 (uninitialized): failed to connect to PHY: -EINVAL [ 3.610000] b53-switch 10700000.switch GbE3 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 4 [ 3.620000] b53-switch 10700000.switch GbE1 (uninitialized): validation of rgmii with support 0000000,00000000,00000000,000062ff and advertisement 0000000,00000000,00000000,000062ff failed: -EINVAL [ 3.640000] b53-switch 10700000.switch GbE1 (uninitialized): failed to connect to PHY: -EINVAL [ 3.650000] b53-switch 10700000.switch GbE1 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5 [ 3.660000] b53-switch 10700000.switch GbE4 (uninitialized): validation of rgmii with support 0000000,00000000,00000000,000062ff and advertisement 0000000,00000000,00000000,000062ff failed: -EINVAL [ 3.680000] b53-switch 10700000.switch GbE4 (uninitialized): failed to connect to PHY: -EINVAL [ 3.690000] b53-switch 10700000.switch GbE4 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 6 [ 3.700000] b53-switch 10700000.switch GbE5 (uninitialized): validation of rgmii with support 0000000,00000000,00000000,000062ff and advertisement 0000000,00000000,00000000,000062ff failed: -EINVAL [ 3.720000] b53-switch 10700000.switch GbE5 (uninitialized): failed to connect to PHY: -EINVAL [ 3.730000] b53-switch 10700000.switch GbE5 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 7 After: [ 3.700000] b53-switch 10700000.switch GbE3 (uninitialized): PHY [mdio_mux-0.1:00] driver [Broadcom BCM54612E] (irq=POLL) [ 3.770000] b53-switch 10700000.switch GbE1 (uninitialized): PHY [mdio_mux-0.1:01] driver [Broadcom BCM54612E] (irq=POLL) [ 3.850000] b53-switch 10700000.switch GbE4 (uninitialized): PHY [mdio_mux-0.1:18] driver [Broadcom BCM54612E] (irq=POLL) [ 3.920000] b53-switch 10700000.switch GbE5 (uninitialized): PHY [mdio_mux-0.1:19] driver [Broadcom BCM54612E] (irq=POLL) ==================== Link: https://patch.msgid.link/20250602193953.1010487-1-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit bc1a65eb81a21e2aa3c3dca058ee8adf687b6ef5 Author: Jonas Gorski Date: Mon Jun 2 21:39:53 2025 +0200 net: dsa: b53: do not touch DLL_IQQD on bcm53115 According to OpenMDK, bit 2 of the RGMII register has a different meaning for BCM53115 [1]: "DLL_IQQD 1: In the IDDQ mode, power is down0: Normal function mode" Configuring RGMII delay works without setting this bit, so let's keep it at the default. For other chips, we always set it, so not clearing it is not an issue. One would assume BCM53118 works the same, but OpenMDK is not quite sure what this bit actually means [2]: "BYPASS_IMP_2NS_DEL #1: In the IDDQ mode, power is down#0: Normal function mode1: Bypass dll65_2ns_del IP0: Use dll65_2ns_del IP" So lets keep setting it for now. [1] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53115/bcm53115_a0_defs.h#L19871 [2] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53118/bcm53118_a0_defs.h#L14392 Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Signed-off-by: Jonas Gorski Link: https://patch.msgid.link/20250602193953.1010487-6-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit 5ea0d42c1980e6d10e5cb56a78021db5bfcebaaf Author: Jonas Gorski Date: Mon Jun 2 21:39:52 2025 +0200 net: dsa: b53: allow RGMII for bcm63xx RGMII ports Add RGMII to supported interfaces for BCM63xx RGMII ports so they can be actually used in RGMII mode. Without this, phylink will fail to configure them: [ 3.580000] b53-switch 10700000.switch GbE3 (uninitialized): validation of rgmii with support 0000000,00000000,00000000,000062ff and advertisement 0000000,00000000,00000000,000062ff failed: -EINVAL [ 3.600000] b53-switch 10700000.switch GbE3 (uninitialized): failed to connect to PHY: -EINVAL [ 3.610000] b53-switch 10700000.switch GbE3 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 4 Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs") Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Link: https://patch.msgid.link/20250602193953.1010487-5-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit 75f4f7b2b13008803f84768ff90396f9d7553221 Author: Jonas Gorski Date: Mon Jun 2 21:39:51 2025 +0200 net: dsa: b53: do not configure bcm63xx's IMP port interface The IMP port is not a valid RGMII interface, but hard wired to internal, so we shouldn't touch the undefined register B53_RGMII_CTRL_IMP. While this does not seem to have any side effects, let's not touch it at all, so limit RGMII configuration on bcm63xx to the actual RGMII ports. Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs") Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250602193953.1010487-4-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit 4af523551d876ab8b8057d1e5303a860fd736fcb Author: Jonas Gorski Date: Mon Jun 2 21:39:50 2025 +0200 net: dsa: b53: do not enable RGMII delay on bcm63xx bcm63xx's RGMII ports are always in MAC mode, never in PHY mode, so we shouldn't enable any delays and let the PHY handle any delays as necessary. This fixes using RGMII ports with normal PHYs like BCM54612E, which will handle the delay in the PHY. Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs") Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250602193953.1010487-3-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit 1237c2d4a8db79dfd4369bff6930b0e385ed7d5c Author: Jonas Gorski Date: Mon Jun 2 21:39:49 2025 +0200 net: dsa: b53: do not enable EEE on bcm63xx BCM63xx internal switches do not support EEE, but provide multiple RGMII ports where external PHYs may be connected. If one of these PHYs are EEE capable, we may try to enable EEE for the MACs, which then hangs the system on access of the (non-existent) EEE registers. Fix this by checking if the switch actually supports EEE before attempting to configure it. Fixes: 22256b0afb12 ("net: dsa: b53: Move EEE functions to b53") Reviewed-by: Florian Fainelli Tested-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski Link: https://patch.msgid.link/20250602193953.1010487-2-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni commit 919d763d609428c2680ec8159257d9655f002f89 Author: Meghana Malladi Date: Tue Jun 3 10:59:04 2025 +0530 net: ti: icssg-prueth: Fix swapped TX stats for MII interfaces. In MII mode, Tx lines are swapped for port0 and port1, which means Tx port0 receives data from PRU1 and the Tx port1 receives data from PRU0. This is an expected hardware behavior and reading the Tx stats needs to be handled accordingly in the driver. Update the driver to read Tx stats from the PRU1 for port0 and PRU0 for port1. Fixes: c1e10d5dc7a1 ("net: ti: icssg-prueth: Add ICSSG Stats") Signed-off-by: Meghana Malladi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250603052904.431203-1-m-malladi@ti.com Signed-off-by: Paolo Abeni commit 3c3c3248496a3a1848ec5d923f2eee0edf60226e Author: Florian Westphal Date: Fri May 30 12:34:03 2025 +0200 selftests: netfilter: nft_nat.sh: add test for reverse clash with nat This will fail without the previous bug fix because we erronously believe that the clashing entry went way. However, the clash exists in the opposite direction due to an existing nat mapping: PASS: IP statless for ns2-LgTIuS ERROR: failed to test udp ns1-x4iyOW to ns2-LgTIuS with dnat rule step 2, result: "" This is partially adapted from test instructions from the below ubuntu tracker. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2109889 Signed-off-by: Florian Westphal Tested-by: Shaun Brady Signed-off-by: Pablo Neira Ayuso commit 50d9ce9679dd50df2dc51ada717fa875bc248fad Author: Florian Westphal Date: Fri May 30 12:34:02 2025 +0200 netfilter: nf_nat: also check reverse tuple to obtain clashing entry The logic added in the blamed commit was supposed to only omit nat source port allocation if neither the existing nor the new entry are subject to NAT. However, its not enough to lookup the conntrack based on the proposed tuple, we must also check the reverse direction. Otherwise there are esoteric cases where the collision is in the reverse direction because that colliding connection has a port rewrite, but the new entry doesn't. In this case, we only check the new entry and then erronously conclude that no clash exists anymore. The existing (udp) tuple is: a:p -> b:P, with nat translation to s:P, i.e. pure daddr rewrite, reverse tuple in conntrack table is s:P -> a:p. When another UDP packet is sent directly to s, i.e. a:p->s:P, this is correctly detected as a colliding entry: tuple is taken by existing reply tuple in reverse direction. But the colliding conntrack is only searched for with unreversed direction, and we can't find such entry matching a:p->s:P. The incorrect conclusion is that the clashing entry has timed out and that no port address translation is required. Such conntrack will then be discarded at nf_confirm time because the proposed reverse direction clashes with an existing mapping in the conntrack table. Search for the reverse tuple too, this will then check the NAT bits of the colliding entry and triggers port reallocation. Followp patch extends nft_nat.sh selftest to cover this scenario. The IPS_SEQ_ADJUST change is also a bug fix: Instead of checking for SEQ_ADJ this tested for SEEN_REPLY and ASSURED by accident -- _BIT is only for use with the test_bit() API. This bug has little consequence in practice, because the sequence number adjustments are only useful for TCP which doesn't support clash resolution. The existing test case (conntrack_reverse_clash.sh) exercise a race condition path (parallel conntrack creation on different CPUs), so the colliding entries have neither SEEN_REPLY nor ASSURED set. Thanks to Yafang Shao and Shaun Brady for an initial investigation of this bug. Fixes: d8f84a9bc7c4 ("netfilter: nf_nat: don't try nat source port reallocation for reverse dir clash") Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1795 Reported-by: Yafang Shao Reported-by: Shaun Brady Signed-off-by: Florian Westphal Tested-by: Yafang Shao Signed-off-by: Pablo Neira Ayuso commit 38399f2b0fe4d44226bfb7eba9e137251c8b2571 Author: Florian Westphal Date: Fri May 23 14:20:46 2025 +0200 selftests: netfilter: nft_concat_range.sh: add datapath check for map fill bug commit 0935ee6032df ("selftests: netfilter: add test case for recent mismatch bug") added a regression check for incorrect initial fill of the result map that was fixed with 791a615b7ad2 ("netfilter: nf_set_pipapo: fix initial map fill"). The test used 'nft get element', i.e., control plane checks for match/nomatch results. The control plane however doesn't use avx2 version, so we need to send+match packets. As the additional packet match/nomatch is slow, don't do this for every element added/removed: add and use maybe_send_(no)match helpers and use them. Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit febe7eda74d105437c7532b4a76ff14eb6007828 Author: Florian Westphal Date: Fri May 23 14:20:45 2025 +0200 selftests: netfilter: nft_concat_range.sh: prefer per element counters for testing The selftest uses following rule: ... @test counter name "test" Then sends a packet, then checks if the named counter did increment or not. This is fine for the 'no-match' test case: If anything matches the counter increments and the test fails as expected. But for the 'should match' test cases this isn't optimal. Consider buggy matching, where the packet matches entry x, but it should have matched entry y. In that case the test would erronously pass. Rework the selftest to use per-element counters to avoid this. After sending packet that should have matched entry x, query the relevant element via 'nft reset element' and check that its counter had incremented. The 'nomatch' case isn't altered, no entry should match so the named counter must be 0, changing it to the per-element counter would then pass if another entry matches. The downside of this change is a slight increase in test run-time by a few seconds. Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit ea77c397bff8b6d59f6d83dae1425b08f465e8b5 Author: Florian Westphal Date: Fri May 23 14:20:44 2025 +0200 netfilter: nf_set_pipapo_avx2: fix initial map fill If the first field doesn't cover the entire start map, then we must zero out the remainder, else we leak those bits into the next match round map. The early fix was incomplete and did only fix up the generic C implementation. A followup patch adds a test case to nft_concat_range.sh. Fixes: 791a615b7ad2 ("netfilter: nf_set_pipapo: fix initial map fill") Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 10db95285240743e7b288272ede140aabce5e631 Merge: 6a3439a417b910 b7188a1c0d2d7b Author: Takashi Iwai Date: Thu Jun 5 09:35:24 2025 +0200 Merge tag 'asoc-fix-v6.16-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.16 A bunch of fixes, including a big batch for the Intel AVS driver, and one new device ID. It's all device specific. commit 5dc1ea903588a73fb03b3a3e5a041a7c63a4bccd Author: Michael Walle Date: Tue May 20 09:41:10 2025 +0200 drm/panel-simple: fix the warnings for the Evervision VGG644804 The panel lacked the connector type which causes a warning. Adding the connector type reveals wrong bus_flags and bits per pixel. Fix all of it. Fixes: 1319f2178bdf ("drm/panel-simple: add Evervision VGG644804 panel entry") Signed-off-by: Michael Walle Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250520074110.655114-1-mwalle@kernel.org commit ec7714e4947909190ffb3041a03311a975350fe0 Merge: 64980441d26995 7a17bbc1d95205 Author: Linus Torvalds Date: Wed Jun 4 21:18:37 2025 -0700 Merge tag 'rust-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull Rust updates from Miguel Ojeda: "Toolchain and infrastructure: - KUnit '#[test]'s: - Support KUnit-mapped 'assert!' macros. The support that landed last cycle was very basic, and the 'assert!' macros panicked since they were the standard library ones. Now, they are mapped to the KUnit ones in a similar way to how is done for doctests, reusing the infrastructure there. With this, a failing test like: #[test] fn my_first_test() { assert_eq!(42, 43); } will report: # my_first_test: ASSERTION FAILED at rust/kernel/lib.rs:251 Expected 42 == 43 to be true, but is false # my_first_test.speed: normal not ok 1 my_first_test - Support tests with checked 'Result' return types. The return value of test functions that return a 'Result' will be checked, thus one can now easily catch errors when e.g. using the '?' operator in tests. With this, a failing test like: #[test] fn my_test() -> Result { f()?; Ok(()) } will report: # my_test: ASSERTION FAILED at rust/kernel/lib.rs:321 Expected is_test_result_ok(my_test()) to be true, but is false # my_test.speed: normal not ok 1 my_test - Add 'kunit_tests' to the prelude. - Clarify the remaining language unstable features in use. - Compile 'core' with edition 2024 for Rust >= 1.87. - Workaround 'bindgen' issue with forward references to 'enum' types. - objtool: relax slice condition to cover more 'noreturn' functions. - Use absolute paths in macros referencing 'core' and 'kernel' crates. - Skip '-mno-fdpic' flag for bindgen in GCC 32-bit arm builds. - Clean some 'doc_markdown' lint hits -- we may enable it later on. 'kernel' crate: - 'alloc' module: - 'Box': support for type coercion, e.g. 'Box' to 'Box' if 'T' implements 'U'. - 'Vec': implement new methods (prerequisites for nova-core and binder): 'truncate', 'resize', 'clear', 'pop', 'push_within_capacity' (with new error type 'PushError'), 'drain_all', 'retain', 'remove' (with new error type 'RemoveError'), insert_within_capacity' (with new error type 'InsertError'). In addition, simplify 'push' using 'spare_capacity_mut', split 'set_len' into 'inc_len' and 'dec_len', add type invariant 'len <= capacity' and simplify 'truncate' using 'dec_len'. - 'time' module: - Morph the Rust hrtimer subsystem into the Rust timekeeping subsystem, covering delay, sleep, timekeeping, timers. This new subsystem has all the relevant timekeeping C maintainers listed in the entry. - Replace 'Ktime' with 'Delta' and 'Instant' types to represent a duration of time and a point in time. - Temporarily add 'Ktime' to 'hrtimer' module to allow 'hrtimer' to delay converting to 'Instant' and 'Delta'. - 'xarray' module: - Add a Rust abstraction for the 'xarray' data structure. This abstraction allows Rust code to leverage the 'xarray' to store types that implement 'ForeignOwnable'. This support is a dependency for memory backing feature of the Rust null block driver, which is waiting to be merged. - Set up an entry in 'MAINTAINERS' for the XArray Rust support. Patches will go to the new Rust XArray tree and then via the Rust subsystem tree for now. - Allow 'ForeignOwnable' to carry information about the pointed-to type. This helps asserting alignment requirements for the pointer passed to the foreign language. - 'container_of!': retain pointer mut-ness and add a compile-time check of the type of the first parameter ('$field_ptr'). - Support optional message in 'static_assert!'. - Add C FFI types (e.g. 'c_int') to the prelude. - 'str' module: simplify KUnit tests 'format!' macro, convert 'rusttest' tests into KUnit, take advantage of the '-> Result' support in KUnit '#[test]'s. - 'list' module: add examples for 'List', fix path of 'assert_pinned!' (so far unused macro rule). - 'workqueue' module: remove 'HasWork::OFFSET'. - 'page' module: add 'inline' attribute. 'macros' crate: - 'module' macro: place 'cleanup_module()' in '.exit.text' section. 'pin-init' crate: - Add 'Wrapper' trait for creating pin-initializers for wrapper structs with a structurally pinned value such as 'UnsafeCell' or 'MaybeUninit'. - Add 'MaybeZeroable' derive macro to try to derive 'Zeroable', but not error if not all fields implement it. This is needed to derive 'Zeroable' for all bindgen-generated structs. - Add 'unsafe fn cast_[pin_]init()' functions to unsafely change the initialized type of an initializer. These are utilized by the 'Wrapper' implementations. - Add support for visibility in 'Zeroable' derive macro. - Add support for 'union's in 'Zeroable' derive macro. - Upstream dev news: streamline CI, fix some bugs. Add new workflows to check if the user-space version and the one in the kernel tree have diverged. Use the issues tab [1] to track them, which should help folks report and diagnose issues w.r.t. 'pin-init' better. [1] https://github.com/rust-for-linux/pin-init/issues Documentation: - Testing: add docs on the new KUnit '#[test]' tests. - Coding guidelines: explain that '///' vs. '//' applies to private items too. Add section on C FFI types. - Quick Start guide: update Ubuntu instructions and split them into "25.04" and "24.04 LTS and older". And a few other cleanups and improvements" * tag 'rust-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: (78 commits) rust: list: Fix typo `much` in arc.rs rust: check type of `$ptr` in `container_of!` rust: workqueue: remove HasWork::OFFSET rust: retain pointer mut-ness in `container_of!` Documentation: rust: testing: add docs on the new KUnit `#[test]` tests Documentation: rust: rename `#[test]`s to "`rusttest` host tests" rust: str: take advantage of the `-> Result` support in KUnit `#[test]`'s rust: str: simplify KUnit tests `format!` macro rust: str: convert `rusttest` tests into KUnit rust: add `kunit_tests` to the prelude rust: kunit: support checked `-> Result`s in KUnit `#[test]`s rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s rust: make section names plural rust: list: fix path of `assert_pinned!` rust: compile libcore with edition 2024 for 1.87+ rust: dma: add missing Markdown code span rust: task: add missing Markdown code spans and intra-doc links rust: pci: fix docs related to missing Markdown code spans rust: alloc: add missing Markdown code span rust: alloc: add missing Markdown code spans ... commit 64980441d26995ea5599958740dbf6d791e81e27 Merge: d2fec01e894477 baa39c169dd526 Author: Linus Torvalds Date: Wed Jun 4 19:46:22 2025 -0700 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull bpf fixes from Alexei Starovoitov: "Two small fixes to selftests" * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Fix selftest btf_tag/btf_type_tag_percpu_vmlinux_helper failure selftests/bpf: Fix bpf selftest build error commit 61a4b7d7d56cdbe5eefbf11ba3ed64bdd49f178b Merge: 1c1df79ccf5615 ee11d953fd230b Author: Dave Airlie Date: Thu Jun 5 12:39:08 2025 +1000 Merge tag 'drm-msm-fixes-2025-06-04' of https://gitlab.freedesktop.org/drm/msm into drm-next Just some mailmap/MAINTAINER email address updates Signed-off-by: Dave Airlie From: Rob Clark Link: https://lore.kernel.org/r/CAF6AEGuW1kpUijxzLCc4TKph72-PfXvHTttNu214_1GB-R8qwg@mail.gmail.com commit d2fec01e89447729c7b9d722a8e7ef9d1184c7be Merge: ff0905bbf991f4 dc3e0f17f74558 Author: Linus Torvalds Date: Wed Jun 4 19:23:37 2025 -0700 Merge tag '6.16-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server updates from Steve French: "Four smb3 server fixes: - Fix for special character handling when mounting with "posix" - Fix for mounts from Mac for fs that don't provide unique inode numbers - Two cleanup patches (e.g. for crypto calls)" * tag '6.16-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: allow a filename to contain special characters on SMB3.1.1 posix extension ksmbd: provide zero as a unique ID to the Mac client ksmbd: remove unnecessary softdep on crc32 ksmbd: use SHA-256 library API instead of crypto_shash API commit ff0905bbf991f4337b5ebc19c0d43525ebb0d96b Merge: 16b70698aa3ae7 3d11125ff624b5 Author: Linus Torvalds Date: Wed Jun 4 19:14:24 2025 -0700 Merge tag 'bcachefs-2025-06-04' of git://evilpiepirate.org/bcachefs Pull more bcachefs updates from Kent Overstreet: "More bcachefs updates: - More stack usage improvements (~600 bytes) - Define CLASS()es for some commonly used types, and convert most rcu_read_lock() uses to the new lock guards - New introspection: - Superblock error counters are now available in sysfs: previously, they were only visible with 'show-super', which doesn't provide a live view - New tracepoint, error_throw(), which is called any time we return an error and start to unwind - Repair - check_fix_ptrs() can now repair btree node roots - We can now repair when we've somehow ended up with the journal using a superblock bucket - Revert some leftovers from the aborted directory i_size feature, and add repair code: some userspace programs (e.g. sshfs) were getting confused It seems in 6.15 there's a bug where i_nlink on the vfs inode has been getting incorrectly set to 0, with some unfortunate results; list_journal analysis showed bch2_inode_rm() being called (by bch2_evict_inode()) when it clearly should not have been. - bch2_inode_rm() now runs "should we be deleting this inode?" checks that were previously only run when deleting unlinked inodes in recovery - check_subvol() was treating a dangling subvol (pointing to a missing root inode) like a dangling dirent, and deleting it. This was the really unfortunate one: check_subvol() will now recreate the root inode if necessary This took longer to debug than it should have, and we lost several filesystems unnecessarily, because users have been ignoring the release notes and blindly running 'fsck -y'. Debugging required reconstructing what happened through analyzing the journal, when ideally someone would have noticed 'hey, fsck is asking me if I want to repair this: it usually doesn't, maybe I should run this in dry run mode and check what's going on?' As a reminder, fsck errors are being marked as autofix once we've verified, in real world usage, that they're working correctly; blindly running 'fsck -y' on an experimental filesystem is playing with fire Up to this incident we've had an excellent track record of not losing data, so let's try to learn from this one This is a community effort, I wouldn't be able to get this done without the help of all the people QAing and providing excellent bug reports and feedback based on real world usage. But please don't ignore advice and expect me to pick up the pieces If an error isn't marked as autofix, and it /is/ happening in the wild, that's also something I need to know about so we can check it out and add it to the autofix list if repair looks good. I haven't been getting those reports, and I should be; since we don't have any sort of telemetry yet I am absolutely dependent on user reports Now I'll be spending the weekend working on new repair code to see if I can get a filesystem back for a user who didn't have backups" * tag 'bcachefs-2025-06-04' of git://evilpiepirate.org/bcachefs: (69 commits) bcachefs: add cond_resched() to handle_overwrites() bcachefs: Make journal read log message a bit quieter bcachefs: Fix subvol to missing root repair bcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm() bcachefs: delete dead code from may_delete_deleted_inode() bcachefs: Add flags to subvolume_to_text() bcachefs: Fix oops in btree_node_seq_matches() bcachefs: Fix dirent_casefold_mismatch repair bcachefs: Fix bch2_fsck_rename_dirent() for casefold bcachefs: Redo bch2_dirent_init_name() bcachefs: Fix -Wc23-extensions in bch2_check_dirents() bcachefs: Run check_dirents second time if required bcachefs: Run snapshot deletion out of system_long_wq bcachefs: Make check_key_has_snapshot safer bcachefs: BCH_RECOVERY_PASS_NO_RATELIMIT bcachefs: bch2_require_recovery_pass() bcachefs: bch_err_throw() bcachefs: Repair code for directory i_size bcachefs: Kill un-reverted directory i_size code bcachefs: Delete redundant fsck_err() ... commit 7977448bf374f6e9592153838f072a89bd3b5c45 Author: Clément Léger Date: Fri May 23 12:19:27 2025 +0200 riscv: misaligned: add a function to check misalign trap delegability Checking for the delegability of the misaligned access trap is needed for the KVM FWFT extension implementation. Add a function to get the delegability of the misaligned trap exception. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250523101932.1594077-11-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 4eaaa65e301208d6ff612ad2244c6174c9d852b8 Author: Clément Léger Date: Fri May 23 12:19:26 2025 +0200 riscv: misaligned: move emulated access uniformity check in a function Split the code that check for the uniformity of misaligned accesses performance on all cpus from check_unaligned_access_emulated_all_cpus() to its own function which will be used for delegation check. No functional changes intended. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250523101932.1594077-10-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 1317045a7d6f397904d105f6d40dc9787876a34b Author: Clément Léger Date: Fri May 23 12:19:25 2025 +0200 riscv: misaligned: declare misaligned_access_speed under CONFIG_RISCV_MISALIGNED While misaligned_access_speed was defined in a file compile with CONFIG_RISCV_MISALIGNED, its definition was under CONFIG_RISCV_SCALAR_MISALIGNED. This resulted in compilation problems when using it in a file compiled with CONFIG_RISCV_MISALIGNED. Move the declaration under CONFIG_RISCV_MISALIGNED so that it can be used unconditionnally when compiled with that config and remove the check for that variable in traps_misaligned.c. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20250523101932.1594077-9-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 9f9f6fdd1dc6791bcfe251160a96a446199f85ce Author: Clément Léger Date: Fri May 23 12:19:24 2025 +0200 riscv: misaligned: use on_each_cpu() for scalar misaligned access probing schedule_on_each_cpu() was used without any good reason while documented as very slow. This call was in the boot path, so better use on_each_cpu() for scalar misaligned checking. Vector misaligned check still needs to use schedule_on_each_cpu() since it requires irqs to be enabled but that's less of a problem since this code is ran in a kthread. Add a comment to explicit that. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250523101932.1594077-8-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit cf5a8abc6560f989a880bec3647c614e638a0c9f Author: Clément Léger Date: Fri May 23 12:19:23 2025 +0200 riscv: misaligned: request misaligned exception from SBI Now that the kernel can handle misaligned accesses in S-mode, request misaligned access exception delegation from SBI. This uses the FWFT SBI extension defined in SBI version 3.0. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20250523101932.1594077-7-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit c4a50db1e1739a5d4698dee7cd4c6f6430bff7b3 Author: Clément Léger Date: Fri May 23 12:19:22 2025 +0200 riscv: sbi: add SBI FWFT extension calls Add FWFT extension calls. This will be ratified in SBI V3.0 hence, it is provided as a separate commit that can be left out if needed. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20250523101932.1594077-6-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 6d6d0641dcfa9d1e398d75791283bf6d129135de Author: Clément Léger Date: Fri May 23 12:19:21 2025 +0200 riscv: sbi: add FWFT extension interface This SBI extensions enables supervisor mode to control feature that are under M-mode control (For instance, Svadu menvcfg ADUE bit, Ssdbltrp DTE, etc). Add an interface to set local features for a specific cpu mask as well as for the online cpu mask. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20250523101932.1594077-5-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 99cf5b7c738733032af9a265a6a5a6bc34b91900 Author: Clément Léger Date: Fri May 23 12:19:20 2025 +0200 riscv: sbi: add new SBI error mappings A few new errors have been added with SBI V3.0, maps them as close as possible to errno values. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20250523101932.1594077-4-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit a7cd450f0e06b4118b2ca8b4e1ef707d5c2c4506 Author: Clément Léger Date: Fri May 23 12:19:19 2025 +0200 riscv: sbi: remove useless parenthesis A few parenthesis in check for SBI version/extension were useless, remove them. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20250523101932.1594077-3-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit cf8651f7319d12a6fd81e1d001afb0958ee2bf28 Author: Clément Léger Date: Fri May 23 12:19:18 2025 +0200 riscv: sbi: add Firmware Feature (FWFT) SBI extensions definitions The Firmware Features extension (FWFT) was added as part of the SBI 3.0 specification. Add SBI definitions to use this extension. Signed-off-by: Clément Léger Reviewed-by: Samuel Holland Tested-by: Samuel Holland Reviewed-by: Deepak Gupta Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20250523101932.1594077-2-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit b55eb6eb2a7427428c59b293a0900131fc849595 Author: Mike Yuan Date: Wed Jun 4 15:03:42 2025 +0000 pidfs: never refuse ppid == 0 in PIDFD_GET_INFO In systemd we spotted an issue after switching to ioctl(PIDFD_GET_INFO) for obtaining pid number the pidfd refers to, that for processes with a parent from outer pidns PIDFD_GET_INFO unexpectedly yields -ESRCH [1]. It turned out that there's an arbitrary check blocking this, which is not really sensible given getppid() happily returns 0 for such processes. Just drop the spurious check and userspace ought to handle ppid == 0 properly everywhere. [1] https://github.com/systemd/systemd/issues/37715 Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info") Signed-off-by: Mike Yuan Link: https://lore.kernel.org/20250604150238.42664-1-me@yhndnzj.com Cc: Christian Brauner Cc: Luca Boccassi Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner commit 3d11125ff624b540334f7134d98b94f3b980e85d Author: Kent Overstreet Date: Tue Jun 3 11:47:51 2025 -0400 bcachefs: add cond_resched() to handle_overwrites() Fix soft lockup warnings in btree nodes can. Signed-off-by: Kent Overstreet commit a4b0f750505cc4ffdafca3e8e6bd731341c6bb68 Author: Kent Overstreet Date: Tue Jun 3 09:31:58 2025 -0400 bcachefs: Make journal read log message a bit quieter Users seem to be assuming that the 'dropped unflushed entries' message at the end of journal read indicates some sort of problem, when it does not - we expect there to be entries in the journal that weren't commited, it's purely informational so that we can correlate journal sequence numbers elsewhere when debugging. Shorten the log message a bit to hopefully make this clearer. Signed-off-by: Kent Overstreet commit 29cc6fb7c068c773049d3bde14b939033893eff4 Author: Kent Overstreet Date: Mon Jun 2 19:48:27 2025 -0400 bcachefs: Fix subvol to missing root repair We had a bug where the root inode of a subvolume was erronously deleted: bch2_evict_inode() called bch2_inode_rm(), meaning the VFS inode's i_nlink was somehow set to 0 when it shouldn't have - the inode in the btree indicated it clearly was not unlinked. This has been addressed with additional safety checks in bch2_inode_rm() - pulling in the safety checks we already were doing when deleting unlinked inodes in recovery - but the really disastrous bug was in check_subvols(), which on finding a dangling subvol (subvol with a missing root inode) would delete the subvolume. I assume this bug dates from early check_directory_structure() code, which originally handled subvolumes and normal paths - the idea being that still live contents of the subvolume would get reattached somewhere. But that's incorrect, and disastrously so; deleting a subvolume triggers deleting the snapshot ID it points to, deleting the entire contents. The correct way to repair is to recreate the root inode if it's missing; then any contents will get reattached under that subvolume's lost+found. Signed-off-by: Kent Overstreet commit 09fb85ae565645b982e9030dbb2ff6707f2cdddc Author: Kent Overstreet Date: Mon Jun 2 17:43:36 2025 -0400 bcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm() We had a bug where bch2_evict_inode() incorrectly called bch2_inode_rm() - the journal clearly showed the inode was not unlinked. We've got checks that we use in recovery when cleaning up deleted inodes, lift them to bch2_inode_rm() as well. Signed-off-by: Kent Overstreet commit bb6689bbeebc6fb51f0f120b486bdcc9a38ffcf6 Author: Kent Overstreet Date: Mon Jun 2 18:26:44 2025 -0400 bcachefs: delete dead code from may_delete_deleted_inode() Signed-off-by: Kent Overstreet commit bfaac2c54694f72d08db5cfad0a1fce2a4c7e45e Author: Kent Overstreet Date: Mon Jun 2 17:23:49 2025 -0400 bcachefs: Add flags to subvolume_to_text() Signed-off-by: Kent Overstreet commit 9f2dc5f39431a17d304e5845a3f7e78905473442 Author: Kent Overstreet Date: Mon Jun 2 09:26:20 2025 -0400 bcachefs: Fix oops in btree_node_seq_matches() btree_update_nodes_written() needs to wait on in-flight writes to old nodes before marking them as freed. But it has no reason to pin those old nodes in memory, so some trickyness ensues. The update we're completing deleted references to those nodes from the btree, so we know if they've been evicted they can't be pulled back in. We just have to check if the nodes we have pointers to are still those old nodes, and haven't been reused. To do that we check the node's "sequence number" (actually a random 64 bit cookie), but that lives in the node's data buffer. 'struct btree' can't be freed until filesystem shutdown (as they're quite small), but the data buffers can be freed or swapped around. Commit 1f88c3567495, which was fixing a kmsan warning, assumed that we could safely do this locklessly with just a READ_ONCE() - if we've got a non-null ptr it would be safe to read from. But that's not true if the data buffer is a vmalloc allocation, so we need to restore the locking that commit deleted (or alternatively RCU free those data buffers, but there's no other reason for that). Fixes: 1f88c3567495 ("bcachefs: Fix a KMSAN splat in btree_update_nodes_written()") Signed-off-by: Kent Overstreet commit 2bf380c005adcc653464215a5170afa3367c0b22 Author: Kent Overstreet Date: Sat May 31 00:11:52 2025 -0400 bcachefs: Fix dirent_casefold_mismatch repair Instead of simply recreating a mis-casefolded dirent, use the str_hash repair code, which will rename it if necessary - the dirent might have been created again with the correct casefolding. Factor out out bch2_str_hash_repair key() from __bch2_str_hash_check_key() for the new path to use, and export bch2_dirent_create_key() as well. Signed-off-by: Kent Overstreet commit b938d3c970175b2f3d22865dc077482fc6137828 Author: Kent Overstreet Date: Sat May 31 17:00:00 2025 -0400 bcachefs: Fix bch2_fsck_rename_dirent() for casefold bch2_fsck_renamed_dirent was creating bch_dirent keys open-coded - but we need to use the appropriate helper, if the directory is casefolded. Signed-off-by: Kent Overstreet commit 35c1f131bc5ff9d6fb9599b3ae5a15dd83a27e31 Author: Kent Overstreet Date: Sun Jun 1 18:35:18 2025 -0400 bcachefs: Redo bch2_dirent_init_name() Redo (and simplify somewhat) how casefolded and non casefolded dirents are initialized, and export this to be used by fsck_rename_dirent(). Signed-off-by: Kent Overstreet commit 01d925f7e18360f740e7b75bfad9b6e55fd4dc53 Author: Nathan Chancellor Date: Wed Jun 4 12:38:27 2025 -0700 bcachefs: Fix -Wc23-extensions in bch2_check_dirents() Clang warns (or errors with CONFIG_WERROR=y): fs/bcachefs/fsck.c:2325:2: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 2325 | int ret = bch2_trans_run(c, | ^ On clang-17 and older, this is an unconditional error: fs/bcachefs/fsck.c:2325:2: error: expected expression 2325 | int ret = bch2_trans_run(c, | ^ Move the declaration of ret to the top of the function to resolve both ways this issue manifests. Fixes: c72def523799 ("bcachefs: Run check_dirents second time if required") Signed-off-by: Nathan Chancellor Signed-off-by: Kent Overstreet commit ee11d953fd230b4e1c28388913826ca832ae8444 Author: Rob Clark Date: Wed Jun 4 10:55:58 2025 -0700 MAINTAINERS: .mailmap: update Rob Clark's email address Remap historical email addresses to @oss.qualcomm.com. Signed-off-by: Rob Clark Acked-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/656974/ commit cb4607816835e1bd5c944ca847a43d84e065a330 Author: Akhil P Oommen Date: Tue Jun 3 17:45:06 2025 +0530 mailmap: Update entry for Akhil P Oommen A new policy within qualcomm requires me to use a new email address for all future contributions to Linux kernel. Update the mailmap to map my old email addresses to the new one, ie akhilpo@oss.qualcomm.com Signed-off-by: Akhil P Oommen Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/lkml/20250603121508.296678-1-quic_akhilpo@quicinc.com Signed-off-by: Rob Clark commit d6984d0c0a561b17ed4ba4f8f20b916402430adc Author: Abhinav Kumar Date: Fri May 23 11:27:27 2025 -0700 MAINTAINERS: update my email address My current email address will stop working soon. Use linux.dev email instead. Signed-off-by: Abhinav Kumar Acked-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/655555/ Signed-off-by: Rob Clark commit 11bb662bfa9761d8d678f3e801554bfc0736c7e8 Author: Abhinav Kumar Date: Fri May 23 11:27:26 2025 -0700 MAINTAINERS: drop myself as maintainer I will no longer regularly work on this platform. Hence will step down from maintainer duties. Also, add Jessica as a reviewer to the MSM DRM subsystem to help out with the reviews. Signed-off-by: Abhinav Kumar Acked-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/655558/ Signed-off-by: Rob Clark commit 16b70698aa3ae7888826d0c84567c72241cf6713 Merge: 3719a04a80caf6 9960be72a54cf0 Author: Linus Torvalds Date: Wed Jun 4 12:07:16 2025 -0700 Merge tag 'sched_ext-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fixes from Tejun Heo: "Two fixes in the built-in idle selection helpers: - Fix prev_cpu handling to guarantee that idle selection never returns a CPU that's not allowed - Skip cross-node search when !NUMA which could lead to infinite looping due to a bug in NUMA iterator" * tag 'sched_ext-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: idle: Skip cross-node search with !CONFIG_NUMA sched_ext: idle: Properly handle invalid prev_cpu during idle selection commit dd2922dcfaa3296846265e113309e5f7f138839f Author: Zeng Heng Date: Tue Jun 3 20:58:28 2025 +0800 fs/resctrl: Restore the rdt_last_cmd_clear() calls after acquiring rdtgroup_mutex A lockdep fix removed two rdt_last_cmd_clear() calls that were used to clear the last_cmd_status buffer but called without holding the required rdtgroup_mutex. The impacted resctrl commands are writing to the cpus or cpus_list files and creating a new monitor or control group. With stale data in the last_cmd_status buffer the impacted resctrl commands report the stale error on success, or append its own failure message to the stale error on failure. Consequently, restore the rdt_last_cmd_clear() calls after acquiring rdtgroup_mutex. Fixes: c8eafe149530 ("x86/resctrl: Fix potential lockdep warning") Signed-off-by: Zeng Heng Signed-off-by: Thomas Gleixner Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/all/20250603125828.1590067-1-zengheng4@huawei.com commit 3719a04a80caf660f899a462cd8f3973bcfa676e Merge: 1af80d00e1e026 3de914864c0d53 Author: Linus Torvalds Date: Wed Jun 4 11:26:17 2025 -0700 Merge tag 'pci-v6.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Print the actual delay time in pci_bridge_wait_for_secondary_bus() instead of assuming it was 1000ms (Wilfred Mallawa) - Revert 'iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices', which broke resume from system sleep on AMD platforms and has been fixed by other commits (Lukas Wunner) Resource management: - Remove mtip32xx use of pcim_iounmap_regions(), which is deprecated and unnecessary (Philipp Stanner) - Remove pcim_iounmap_regions() and pcim_request_region_exclusive() and related flags since all uses have been removed (Philipp Stanner) - Rework devres 'request' functions so they are no longer 'hybrid', i.e., their behavior no longer depends on whether pcim_enable_device or pci_enable_device() was used, and remove related code (Philipp Stanner) - Warn (not BUG()) about failure to assign optional resources (Ilpo Järvinen) Error handling: - Log the DPC Error Source ID only when it's actually valid (when ERR_FATAL or ERR_NONFATAL was received from a downstream device) and decode into bus/device/function (Bjorn Helgaas) - Determine AER log level once and save it so all related messages use the same level (Karolina Stolarek) - Use KERN_WARNING, not KERN_ERR, when logging PCIe Correctable Errors (Karolina Stolarek) - Ratelimit PCIe Correctable and Non-Fatal error logging, with sysfs controls on interval and burst count, to avoid flooding logs and RCU stall warnings (Jon Pan-Doh) Power management: - Increment PM usage counter when probing reset methods so we don't try to read config space of a powered-off device (Alex Williamson) - Set all devices to D0 during enumeration to ensure ACPI opregion is connected via _REG (Mario Limonciello) Power control: - Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match the filename paths. Retain old deprecated symbols for compatibility, except for the pwrctrl slot driver (PCI_PWRCTRL_SLOT) (Johan Hovold) - When unregistering pwrctrl, cancel outstanding rescan work before cleaning up data structures to avoid use-after-free issues (Brian Norris) Bandwidth control: - Simplify link bandwidth controller by replacing the count of Link Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN flag (Ilpo Järvinen) - Update the Link Speed after retraining, since the Link Speed may have changed (Ilpo Järvinen) PCIe native device hotplug: - Ignore Presence Detect Changed caused by DPC. pciehp already ignores Link Down/Up events caused by DPC, but on slots using in-band presence detect, DPC causes a spurious Presence Detect Changed event (Lukas Wunner) - Ignore Link Down/Up caused by Secondary Bus Reset. On hotplug ports using in-band presence detect, the reset causes a Presence Detect Changed event, which mistakenly caused teardown and re-enumeration of the device. Drivers may need to annotate code that resets their device (Lukas Wunner) Virtualization: - Add an ACS quirk for Loongson Root Ports that don't advertise ACS but don't allow peer-to-peer transactions between Root Ports; the quirk allows each Root Port to be in a separate IOMMU group (Huacai Chen) Endpoint framework: - For fixed-size BARs, retain both the actual size and the possibly larger size allocated to accommodate iATU alignment requirements (Jerome Brunet) - Simplify ctrl/SPAD space allocation and avoid allocating more space than needed (Jerome Brunet) - Correct MSI-X PBA offset calculations for DesignWare and Cadence endpoint controllers (Niklas Cassel) - Align the return value (number of interrupts) encoding for pci_epc_get_msi()/pci_epc_ops::get_msi() and pci_epc_get_msix()/pci_epc_ops::get_msix() (Niklas Cassel) - Align the nr_irqs parameter encoding for pci_epc_set_msi()/pci_epc_ops::set_msi() and pci_epc_set_msix()/pci_epc_ops::set_msix() (Niklas Cassel) Common host controller library: - Convert pci-host-common to a library so platforms that don't need native host controller drivers don't need to include these helper functions (Manivannan Sadhasivam) Apple PCIe controller driver: - Extract ECAM bridge creation helper from pci_host_common_probe() to separate driver-specific things like MSI from PCI things (Marc Zyngier) - Dynamically allocate RID-to_SID bitmap to prepare for SoCs with varying capabilities (Marc Zyngier) - Skip ports disabled in DT when setting up ports (Janne Grunau) - Add t6020 compatible string (Alyssa Rosenzweig) - Add T602x PCIe support (Hector Martin) - Directly set/clear INTx mask bits because T602x dropped the accessors that could do this without locking (Marc Zyngier) - Move port PHY registers to their own reg items to accommodate T602x, which moves them around; retain default offsets for existing DTs that lack phy%d entries with the reg offsets (Hector Martin) - Stop polling for core refclk, which doesn't work on T602x and the bootloader has already done anyway (Hector Martin) - Use gpiod_set_value_cansleep() when asserting PERST# in probe because we're allowed to sleep there (Hector Martin) Cadence PCIe controller driver: - Drop a runtime PM 'put' to resolve a runtime atomic count underflow (Hans Zhang) - Make the cadence core buildable as a module (Kishon Vijay Abraham I) - Add cdns_pcie_host_disable() and cdns_pcie_ep_disable() for use by loadable drivers when they are removed (Siddharth Vadapalli) Freescale i.MX6 PCIe controller driver: - Apply link training workaround only on IMX6Q, IMX6SX, IMX6SP (Richard Zhu) - Remove redundant dw_pcie_wait_for_link() from imx_pcie_start_link(); since the DWC core does this, imx6 only needs it when retraining for a faster link speed (Richard Zhu) - Toggle i.MX95 core reset to align with PHY powerup (Richard Zhu) - Set SYS_AUX_PWR_DET to work around i.MX95 ERR051624 erratum: in some cases, the controller can't exit 'L23 Ready' through Beacon or PERST# deassertion (Richard Zhu) - Clear GEN3_ZRXDC_NONCOMPL to work around i.MX95 ERR051586 erratum: controller can't meet 2.5 GT/s ZRX-DC timing when operating at 8 GT/s, causing timeouts in L1 (Richard Zhu) - Wait for i.MX95 PLL lock before enabling controller (Richard Zhu) - Save/restore i.MX95 LUT for suspend/resume (Richard Zhu) Mobiveil PCIe controller driver: - Return bool (not int) for link-up check in mobiveil_pab_ops.link_up() and layerscape-gen4, mobiveil (Hans Zhang) NVIDIA Tegra194 PCIe controller driver: - Create debugfs directory for 'aspm_state_cnt' only when CONFIG_PCIEASPM is enabled, since there are no other entries (Hans Zhang) Qualcomm PCIe controller driver: - Add OF support for parsing DT 'eq-presets-gts' property for lane equalization presets (Krishna Chaitanya Chundru) - Read Maximum Link Width from the Link Capabilities register if DT lacks 'num-lanes' property (Krishna Chaitanya Chundru) - Add Physical Layer 64 GT/s Capability ID and register offsets for 8, 32, and 64 GT/s lane equalization registers (Krishna Chaitanya Chundru) - Add generic dwc support for configuring lane equalization presets (Krishna Chaitanya Chundru) - Add DT and driver support for PCIe on IPQ5018 SoC (Nitheesh Sekar) Renesas R-Car PCIe controller driver: - Describe endpoint BAR 4 as being fixed size (Jerome Brunet) - Document how to obtain R-Car V4H (r8a779g0) controller firmware (Yoshihiro Shimoda) Rockchip PCIe controller driver: - Reorder rockchip_pci_core_rsts because reset_control_bulk_deassert() deasserts in reverse order, to fix a link training regression (Jensen Huang) - Mark RK3399 as being capable of raising INTx interrupts (Niklas Cassel) Rockchip DesignWare PCIe controller driver: - Check only PCIE_LINKUP, not LTSSM status, to determine whether the link is up (Shawn Lin) - Increase N_FTS (used in L0s->L0 transitions) and enable ASPM L0s for Root Complex and Endpoint modes (Shawn Lin) - Hide the broken ATS Capability in rockchip_pcie_ep_init() instead of rockchip_pcie_ep_pre_init() so it stays hidden after PERST# resets non-sticky registers (Shawn Lin) - Call phy_power_off() before phy_exit() in rockchip_pcie_phy_deinit() (Diederik de Haas) Synopsys DesignWare PCIe controller driver: - Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training more robust; this will not affect the intended link width if all lanes are functional (Wenbin Yao) - Return bool (not int) for link-up check in dw_pcie_ops.link_up() and armada8k, dra7xx, dw-rockchip, exynos, histb, keembay, keystone, kirin, meson, qcom, qcom-ep, rcar_gen4, spear13xx, tegra194, uniphier, visconti (Hans Zhang) - Add debugfs support for exposing DWC device-specific PTM context (Manivannan Sadhasivam) TI J721E PCIe driver: - Make j721e buildable as a loadable and removable module (Siddharth Vadapalli) - Fix j721e host/endpoint dependencies that result in link failures in some configs (Arnd Bergmann) Device tree bindings: - Add qcom DT binding for 'global' interrupt (PCIe controller and link-specific events) for ipq8074, ipq8074-gen3, ipq6018, sa8775p, sc7280, sc8180x sdm845, sm8150, sm8250, sm8350 (Manivannan Sadhasivam) - Add qcom DT binding for 8 MSI SPI interrupts for msm8998, ipq8074, ipq8074-gen3, ipq6018 (Manivannan Sadhasivam) - Add dw rockchip DT binding for rk3576 and rk3562 (Kever Yang) - Correct indentation and style of examples in brcm,stb-pcie, cdns,cdns-pcie-ep, intel,keembay-pcie-ep, intel,keembay-pcie, microchip,pcie-host, rcar-pci-ep, rcar-pci-host, xilinx-versal-cpm (Krzysztof Kozlowski) - Convert Marvell EBU (dove, kirkwood, armada-370, armada-xp) and armada8k from text to schema DT bindings (Rob Herring) - Remove obsolete .txt DT bindings for content that has been moved to schemas (Rob Herring) - Add qcom DT binding for MHI registers in IPQ5332, IPQ6018, IPQ8074 and IPQ9574 (Varadarajan Narayanan) - Convert v3,v360epc-pci from text to DT schema binding (Rob Herring) - Change microchip,pcie-host DT binding to be 'dma-noncoherent' since PolarFire may be configured that way (Conor Dooley) Miscellaneous: - Drop 'pci' suffix from intel_mid_pci.c filename to match similar files (Andy Shevchenko) - All platforms with PCI have an MMU, so add PCI Kconfig dependency on MMU to simplify build testing and avoid inadvertent build regressions (Arnd Bergmann) - Update Krzysztof Wilczyński's email address in MAINTAINERS (Krzysztof Wilczyński) - Update Manivannan Sadhasivam's email address in MAINTAINERS (Manivannan Sadhasivam)" * tag 'pci-v6.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (147 commits) MAINTAINERS: Update Manivannan Sadhasivam email address PCI: j721e: Fix host/endpoint dependencies PCI: j721e: Add support to build as a loadable module PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup PCI: cadence: Add support to build pcie-cadence library as a kernel module MAINTAINERS: Update Krzysztof Wilczyński email address PCI: Remove unnecessary linesplit in __pci_setup_bridge() PCI: WARN (not BUG()) when we fail to assign optional resources PCI: Remove unused pci_printk() PCI: qcom: Replace PERST# sleep time with proper macro PCI: dw-rockchip: Replace PERST# sleep time with proper macro PCI: host-common: Convert to library for host controller drivers PCI/ERR: Remove misleading TODO regarding kernel panic PCI: cadence: Remove duplicate message code definitions PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding PCI: cadence-ep: Correct PBA offset in .set_msix() callback ... commit 079afb081c4288e94d5e4223d3eb6306d853c68b Author: Jens Axboe Date: Wed Jun 4 10:25:42 2025 -0600 io_uring/futex: mark wait requests as inflight Inflight marking is used so that do_exit() -> io_uring_files_cancel() will find requests with files that reference an io_uring instance, so they can get appropriately canceled before the files go away. However, it's also called before the mm goes away. Mark futex/futexv wait requests as being inflight, so that io_uring_files_cancel() will prune them. This ensures that the mm stays alive, which is important as an exiting mm will also free the futex private hash buckets. An io_uring futex request with FUTEX2_PRIVATE set relies on those being alive until the request has completed. A recent commit added these futex private hashes, which get killed when the mm goes away. Fixes: 80367ad01d93 ("futex: Add basic infrastructure for local task local hash") Link: https://lore.kernel.org/io-uring/38053.1749045482@localhost/ Reported-by: Robert Morris Signed-off-by: Jens Axboe commit 6a8118a77eec5fc4dfec69cc6bdc52229943f6ef Author: Jens Axboe Date: Wed Jun 4 08:49:32 2025 -0600 io_uring/futex: get rid of struct io_futex addr union Rather than use a union of a u32 and struct futex_waitv user address, consolidate it into a single void __user pointer instead. This also makes prep easier to use as the store happens to the member that will be used. No functional changes in this patch. Signed-off-by: Jens Axboe commit f81aa834bfa91c827f290b62a245e23c5ad2813c Author: Ilan Peer Date: Wed Jun 4 06:13:21 2025 +0300 wifi: iwlwifi: mld: Move regulatory domain initialization The regulatory domain information was initialized every time the FW was loaded and the device was restarted. This was unnecessary and useless as at this stage the wiphy channels information was not setup yet so while the regulatory domain was set to the wiphy, the channel information was not updated. In case that a specific MCC was configured during FW initialization then following updates with this MCC are ignored, and thus the wiphy channels information is left with information not matching the regulatory domain. This commit moves the regulatory domain initialization to after the operational firmware is started, i.e., after the wiphy channels were configured and the regulatory information is needed. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250604061200.f138a7382093.I2fd8b3e99be13c2687da483e2cb1311ffb4fbfce@changeid Signed-off-by: Miri Korenblit commit 847a4bf1b4bdcc224196d77714f71e36822fed70 Author: Johannes Berg Date: Wed Jun 4 06:13:20 2025 +0300 wifi: iwlwifi: pcie: fix non-MSIX handshake register When reading the interrupt status after a FW reset handshake timeout, read the actual value not the mask for the non-MSIX case. Fixes: ab606dea80c4 ("wifi: iwlwifi: pcie: add support for the reset handshake in MSI") Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250604061200.87a849a55086.I2f8571aafa55aa3b936a30b938de9d260592a584@changeid Signed-off-by: Miri Korenblit commit 960c7e6d388034d219dafffa6da0a5c2ccd5ff30 Author: Miri Korenblit Date: Wed Jun 4 06:13:19 2025 +0300 wifi: iwlwifi: mld: avoid panic on init failure In case of an error during init, in_hw_restart will be set, but it will never get cleared. Instead, we will retry to init again, and then we will act like we are in a restart when we are actually not. This causes (among others) to a NULL pointer dereference when canceling rx_omi::finished_work, that was not even initialized, because we thought that we are in hw_restart. Set in_hw_restart to true only if the fw is running, then we know that FW was loaded successfully and we are not going to the retry loop. Fixes: 7391b2a4f7db ("wifi: iwlwifi: rework firmware error handling") Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250604061200.e0040e0a4b09.Iae469a0abe6bfa3c26d8a88c066bad75c2e8f121@changeid Signed-off-by: Miri Korenblit commit 264c844abb29530b3e16d255f1eb2ccb06316b1f Author: Miri Korenblit Date: Wed Jun 4 06:13:18 2025 +0300 wifi: iwlwifi: mvm: fix assert on suspend After using DEFINE_RAW_FLEX, cmd is a pointer to iwl_rxq_sync_cmd, and not a variable containing both the command and notification. Adjust hcmd->data and hcmd->len assignment as well. Fixes: 7438843df8cf ("wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warning") Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250604031321.2277481-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 1af80d00e1e026c317c6ec19b1072f81ba7af64c Merge: f5ebe7bb87e045 354ad60e123dad Author: Linus Torvalds Date: Wed Jun 4 08:59:59 2025 -0700 Merge tag 'slab-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: - Make kvmalloc() more suitable for callers that need it to succeed, but without unnecessary overhead by reclaim and compaction to get a physically contiguous allocation. Instead fall back to vmalloc() more easily by default, unless instructed by __GFP_RETRY_MAYFAIL to prefer kmalloc() harder. This should allow the removal of a xfs-specific workaround (Michal Hocko) - Remove potentially excessive warnings due to memory pressure when allocating structures for per-object allocation profiling metadata (Usama Arif) * tag 'slab-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm: slub: only warn once when allocating slab obj extensions fails mm: kvmalloc: make kmalloc fast path real fast path commit f5ebe7bb87e04537b37573f0a2516baa90ee23c0 Merge: 1a576136f8d708 59c11a7a9a138a Author: Linus Torvalds Date: Wed Jun 4 08:57:22 2025 -0700 Merge tag 'spdx-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull LICENSES update from Greg KH: "Here is a single patch to the LICENSES/ directory to add the CC0 license that is currently used in the kcpuid x86 tool for one of their files. This fixes the error that spdxcheck.py currently has with the kcpuid file due to a missing LICENSE file for this specific license" * tag 'spdx-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: LICENSES: add CC0-1.0 license text commit 3de914864c0d53b7c49aaa94e4ccda9e1dd271d7 Merge: 27b1aac553401d 308f8c7a626ecd Author: Bjorn Helgaas Date: Wed Jun 4 10:50:45 2025 -0500 Merge branch 'pci/misc' - Drop 'pci' suffix from intel_mid_pci.c filename to match similar files (Andy Shevchenko) - All platforms with PCI have an MMU, so add PCI Kconfig dependency on MMU to simplify build testing and avoid inadvertent build regressions (Arnd Bergmann) - Update driver path in PCI NVMe function documentation (Rick Wertenbroek) - Remove unused pci_printk() (Ilpo Järvinen) - Warn (not BUG()) about failure to assign optional resources (Ilpo Järvinen) - Update Krzysztof Wilczyński's email address in MAINTAINERS (Krzysztof Wilczyński) - Update Manivannan Sadhasivam's email address in MAINTAINERS (Manivannan Sadhasivam) * pci/misc: MAINTAINERS: Update Manivannan Sadhasivam email address MAINTAINERS: Update Krzysztof Wilczyński email address PCI: Remove unnecessary linesplit in __pci_setup_bridge() PCI: WARN (not BUG()) when we fail to assign optional resources PCI: Remove unused pci_printk() Documentation: Fix path for NVMe PCI endpoint target driver PCI: Add CONFIG_MMU dependency x86/PCI: Drop 'pci' suffix from intel_mid_pci.c commit 27b1aac553401d1f504c767e7274331c81360b4c Merge: db847adbf99f80 db8266017e0a70 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:45 2025 -0500 Merge branch 'pci/dt-bindings' - Add qcom DT binding for 'global' interrupt (PCIe controller and link-specific events) for ipq8074, ipq8074-gen3, ipq6018, sa8775p, sc7280, sc8180x sdm845, sm8150, sm8250, sm8350 (Manivannan Sadhasivam) - Add qcom DT binding for 8 MSI SPI interrupts for msm8998, ipq8074, ipq8074-gen3, ipq6018 (Manivannan Sadhasivam) - Add dw rockchip DT binding for rk3576 and rk3562 (Kever Yang) - Correct indentation and style of examples in brcm,stb-pcie, cdns,cdns-pcie-ep, intel,keembay-pcie-ep, intel,keembay-pcie, microchip,pcie-host, rcar-pci-ep, rcar-pci-host, xilinx-versal-cpm (Krzysztof Kozlowski) - Fix include placement in sifive,fu740-pcie example (Krzysztof Kozlowski) - Convert Marvell EBU (dove, kirkwood, armada-370, armada-xp) and armada8k from text to schema DT bindings (Rob Herring) - Remove obsolete .txt DT bindings for content that has been moved to schemas (Rob Herring) - Add qcom DT binding for MHI registers in IPQ5332, IPQ6018, IPQ8074 and IPQ9574 (Varadarajan Narayanan) - Convert v3,v360epc-pci from text to DT schema binding (Rob Herring) - Change microchip,pcie-host DT binding to be 'dma-noncoherent' since PolarFire may be configured that way (Conor Dooley) * pci/dt-bindings: dt-bindings: PCI: microchip,pcie-host: Fix DMA coherency property dt-bindings: PCI: Convert v3,v360epc-pci to DT schema dt-bindings: PCI: qcom: Add MHI registers for IPQ9574 dt-bindings: PCI: Remove obsolete .txt docs dt-bindings: PCI: Convert marvell,armada8k-pcie to schema dt-bindings: PCI: Convert Marvell EBU to schema dt-bindings: PCI: sifive,fu740-pcie: Fix include placement in DTS example dt-bindings: PCI: Correct indentation and style in DTS example dt-bindings: PCI: dwc: rockchip: Add rk3562 support dt-bindings: PCI: dw: rockchip: Add rk3576 support dt-bindings: PCI: qcom,pcie-sc8180x: Add 'global' interrupt dt-bindings: PCI: qcom: Allow IPQ6018 to use 8 MSI and one 'global' interrupt dt-bindings: PCI: qcom: Allow IPQ8074 to use 8 MSI and one 'global' interrupt dt-bindings: PCI: qcom: Allow MSM8998 to use 8 MSI and one 'global' interrupt dt-bindings: PCI: qcom: Add 'global' interrupt for SDM845 SoC dt-bindings: PCI: qcom,pcie-sc7280: Add 'global' interrupt dt-bindings: PCI: qcom,pcie-sa8775p: Add 'global' interrupt dt-bindings: PCI: qcom,pcie-sm8350: Add 'global' interrupt dt-bindings: PCI: qcom,pcie-sm8250: Add 'global' interrupt dt-bindings: PCI: qcom,pcie-sm8150: Add 'global' interrupt commit db847adbf99f80088b5e545855c1bc7ea52973d1 Merge: df52b63940e644 5fbfae69e78d24 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:44 2025 -0500 Merge branch 'pci/ptm-debugfs' - Add debugfs support for exposing DWC device-specific PTM context (Manivannan Sadhasivam) * pci/ptm-debugfs: PCI: qcom-ep: Mask PTM_UPDATING interrupt PCI: dwc: Add debugfs support for PTM context PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init() PCI: Add debugfs support for exposing PTM context commit df52b63940e64456d47cabcbc5a9c1137a3f0b2e Merge: fd0c51f7eb4b4a ed798ff1c52f6f Author: Bjorn Helgaas Date: Wed Jun 4 10:50:43 2025 -0500 Merge branch 'pci/controller/tegra194' - Create debugfs directory for 'aspm_state_cnt' only when CONFIG_PCIEASPM is enabled, since there are no other entries (Hans Zhang) * pci/controller/tegra194: PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled commit fd0c51f7eb4b4ad9d7ed971757e76ce3fe346c85 Merge: d96c67a57ca60b a7d824b2df0d8b Author: Bjorn Helgaas Date: Wed Jun 4 10:50:43 2025 -0500 Merge branch 'pci/controller/rockchip' - Reorder rockchip_pci_core_rsts because reset_control_bulk_deassert() deasserts in reverse order, to fix a link training regression (Jensen Huang) - Mark RK3399 as being capable of raising INTx interrupts (Niklas Cassel) * pci/controller/rockchip: PCI: rockchip-ep: Mark RK3399 as intx_capable PCI: rockchip: Fix order of rockchip_pci_core_rsts commit d96c67a57ca60ba6535ab5459924fe9bd85f34ff Merge: 05cf00aa05afed 003d15b30f3690 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:42 2025 -0500 Merge branch 'pci/controller/rcar-gen4' - Describe endpoint BAR 4 as being fixed size (Jerome Brunet) - Document how to obtain R-Car V4H (r8a779g0) controller firmware (Yoshihiro Shimoda) * pci/controller/rcar-gen4: PCI: rcar-gen4: Document how to obtain platform firmware PCI: rcar-gen4: set ep BAR4 fixed size commit 05cf00aa05afed0d6808cce6654ef8be457fb6bb Merge: c7b9c591245e32 3e5127469a8d41 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:42 2025 -0500 Merge branch 'pci/controller/qcom' - Add OF support for parsing DT 'eq-presets-gts' property for lane equalization presets (Krishna Chaitanya Chundru) - Read Maximum Link Width from the Link Capabilities register if DT lacks 'num-lanes' property (Krishna Chaitanya Chundru) - Add Physical Layer 64 GT/s Capability ID and register offsets for 8, 32, and 64 GT/s lane equalization registers (Krishna Chaitanya Chundru) - Add generic dwc support for configuring lane equalization presets (Krishna Chaitanya Chundru) - Add DT and driver support for PCIe on IPQ5018 SoC (Nitheesh Sekar) * pci/controller/qcom: PCI: qcom: Add support for IPQ5018 dt-bindings: PCI: qcom: Add IPQ5018 SoC PCI: dwc: Add support for configuring lane equalization presets PCI: Add lane equalization register offsets PCI: dwc: Update pci->num_lanes to maximum supported link width PCI: of: Add of_pci_get_equalization_presets() API commit c7b9c591245e32b5c7b235f48485497e1e8f9e2a Merge: dee6ce5c6f1dc6 5da3d94a23c6c1 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:41 2025 -0500 Merge branch 'pci/controller/mvebu' - Use for_each_of_range() iterator for parsing 'ranges' (Rob Herring) * pci/controller/mvebu: PCI: mvebu: Use for_each_of_range() iterator for parsing "ranges" commit dee6ce5c6f1dc6fe88d268ca6152a157c1086b4c Merge: f4ff0b0ed26c57 5e2664f9e108f6 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:41 2025 -0500 Merge branch 'pci/controller/mobiveil' - Use to_delayed_work() instead of open-coding it (Chen Ni) * pci/controller/mobiveil: PCI: ls-gen4: Use to_delayed_work() commit f4ff0b0ed26c57a1c01c3f27d55d6504fe36a7ff Merge: 20611193be9843 e4d66131caaf18 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:40 2025 -0500 Merge branch 'pci/controller/imx6' - Apply link training workaround only on IMX6Q, IMX6SX, IMX6SP (Richard Zhu) - Remove redundant dw_pcie_wait_for_link() from imx_pcie_start_link(); since the DWC core does this, imx6 only needs it when retraining for a faster link speed (Richard Zhu) - Toggle i.MX95 core reset to align with PHY powerup (Richard Zhu) - Set SYS_AUX_PWR_DET to work around i.MX95 ERR051624 erratum: in some cases, the controller can't exit 'L23 Ready' through Beacon or PERST# deassertion (Richard Zhu) - Clear GEN3_ZRXDC_NONCOMPL to work around i.MX95 ERR051586 erratum: controller can't meet 2.5 GT/s ZRX-DC timing when operating at 8 GT/s, causing timeouts in L1 (Richard Zhu) - Wait for i.MX95 PLL lock before enabling controller (Richard Zhu) - Save/restore i.MX95 LUT for suspend/resume (Richard Zhu) * pci/controller/imx6: PCI: imx6: Save and restore the LUT setting during suspend/resume for i.MX95 SoC PCI: imx6: Add PLL lock check for i.MX95 SoC PCI: imx6: Add workaround for errata ERR051586 PCI: imx6: Add workaround for errata ERR051624 PCI: imx6: Toggle the core reset for i.MX95 PCIe PCI: imx6: Call dw_pcie_wait_for_link() from start_link() callback only when required PCI: imx6: Skip link up workaround for newer platforms commit 20611193be984391b5ec80a372e7f8bbc7c5b07a Merge: 00c78a3c3fc34b af3c6eacce0c46 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:39 2025 -0500 Merge branch 'pci/controller/dwc' - Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training more robust; this will not affect the intended link width if all lanes are functional (Wenbin Yao) * pci/controller/dwc: PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane commit 00c78a3c3fc34bf9d781f415d4dec41429457fc6 Merge: 20279628bb5e96 1d79596e866137 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:39 2025 -0500 Merge branch 'pci/controller/dwc-ep' - Use FIELD_GET() to simplify extracting register values (Hans Zhang) * pci/controller/dwc-ep: PCI: dwc: ep: Fix errno typo PCI: dwc: ep: Use FIELD_GET() where applicable commit 20279628bb5e96852d417a18e9d85b9bc506e716 Merge: 3f0b36295ea32e ec49e253322bf2 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:38 2025 -0500 Merge branch 'pci/controller/dw-rockchip' - Check only PCIE_LINKUP, not LTSSM status, to determine whether the link is up (Shawn Lin) - Increase N_FTS (used in L0s->L0 transitions) and enable ASPM L0s for Root Complex and Endpoint modes (Shawn Lin) - Hide the broken ATS Capability in rockchip_pcie_ep_init() instead of rockchip_pcie_ep_pre_init() so it stays hidden after PERST# resets non-sticky registers (Shawn Lin) - Remove unused PCIE_CLIENT_GENERAL_DEBUG definition (Hans Zhang) - Organize register and bitfield definitions logically (Hans Zhang) - Use rockchip_pcie_link_up() to check link up instead of open coding, and use GENMASK() and FIELD_GET() when possible (Hans Zhang) - Call phy_power_off() before phy_exit() in rockchip_pcie_phy_deinit() (Diederik de Haas) - Return bool (not int) for link-up check in dw_pcie_ops.link_up() and armada8k, dra7xx, dw-rockchip, exynos, histb, keembay, keystone, kirin, meson, qcom, qcom-ep, rcar_gen4, spear13xx, tegra194, uniphier, visconti (Hans Zhang) - Return bool (not int) for link-up check in mobiveil_pab_ops.link_up() and layerscape-gen4, mobiveil (Hans Zhang) - Simplify j721e link-up check (Hans Zhang) - Convert pci-host-common to a library so platforms that don't need native host controller drivers don't need to include these helper functions (Manivannan Sadhasivam) * pci/controller/dw-rockchip: PCI: qcom: Replace PERST# sleep time with proper macro PCI: dw-rockchip: Replace PERST# sleep time with proper macro PCI: host-common: Convert to library for host controller drivers PCI: cadence: Simplify J721e link status check PCI: mobiveil: Return bool from link up check PCI: dwc: Return bool from link up check PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit() PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding PCI: dw-rockchip: Reorganize register and bitfield definitions PCI: dw-rockchip: Remove unused PCIE_CLIENT_GENERAL_DEBUG definition PCI: dw-rockchip: Move rockchip_pcie_ep_hide_broken_ats_cap_rk3588() to dw_pcie_ep_ops::init() PCI: dw-rockchip: Enable ASPM L0s capability for both RC and EP modes PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up() # Conflicts: # drivers/pci/controller/pcie-apple.c # include/linux/pci-ecam.h commit 3f0b36295ea32ec115a54810f078a4cc7aaffa50 Merge: c3b2f9dccba5c9 3c05e88413f7b7 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:04 2025 -0500 Merge branch 'pci/controller/cadence' - Drop a runtime PM 'put' to resolve a runtime atomic count underflow (Hans Zhang) - Use shared PCIE_MSG_CODE_* definitions and remove duplicate cdns_pcie_msg_code definitions (Hans Zhang) - Make the cadence core buildable as a module (Kishon Vijay Abraham I) - Add cdns_pcie_host_disable() and cdns_pcie_ep_disable() for use by loadable drivers when they are removed (Siddharth Vadapalli) - Make j721e buildable as a loadable and removable module (Siddharth Vadapalli) - Fix j721e host/endpoint dependencies that result in link failures in some configs (Arnd Bergmann) * pci/controller/cadence: PCI: j721e: Fix host/endpoint dependencies PCI: j721e: Add support to build as a loadable module PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup PCI: cadence: Add support to build pcie-cadence library as a kernel module PCI: cadence: Remove duplicate message code definitions PCI: cadence: Fix runtime atomic count underflow commit c3b2f9dccba5c94bb1b37b4a401440f78d8293be Merge: 2ce738726adf93 4e639f11d6e06d Author: Bjorn Helgaas Date: Wed Jun 4 10:50:04 2025 -0500 Merge branch 'pci/controller/apple' - Skip ports disabled in DT when setting up ports (Janne Grunau) - Add t6020 compatible string (Alyssa Rosenzweig) - Extract ECAM bridge creation helper from pci_host_common_probe() to separate driver-specific things like MSI from PCI things (Marc Zyngier) - Dynamically allocate RID-to_SID bitmap to prepare for SoCs with varying capabilities (Marc Zyngier) - Directly set/clear INTx mask bits because T602x dropped the accessors that could do this without locking (Marc Zyngier) - Move port PHY registers to their own reg items to accommodate T602x, which moves them around; retain default offsets for existing DTs that lack phy%d entries with the reg offsets (Hector Martin) - Stop polling for core refclk, which doesn't work on T602x and the bootloader has already done anyway (Hector Martin) - Use gpiod_set_value_cansleep() when asserting PERST# in probe because we're allowed to sleep there (Hector Martin) - Move register offsets into SoC-specific structure (Hector Martin) - Add T602x PCIe support (Hector Martin) * pci/controller/apple: PCI: apple: Add T602x PCIe support PCI: apple: Abstract register offsets via a SoC-specific structure PCI: apple: Use gpiod_set_value_cansleep in probe flow PCI: apple: Drop poll for CORE_RC_PHYIF_STAT_REFCLK PCI: apple: Move port PHY registers to their own reg items PCI: apple: Fix missing OF node reference in apple_pcie_setup_port PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts PCI: apple: Dynamically allocate RID-to_SID bitmap PCI: apple: Move over to standalone probing PCI: ecam: Allow cfg->priv to be pre-populated from the root port device PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe() dt-bindings: pci: apple,pcie: Add t6020 compatible string PCI: apple: Set only available ports up commit 2ce738726adf934e272b3726de2df5843bc2e70c Merge: 014dbfe0e402fe de0321bcc5fdd8 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:03 2025 -0500 Merge branch 'pci/endpoint' - For fixed-size BARs, retain both the actual size and the possibly larger size allocated to accommodate iATU alignment requirements (Jerome Brunet) - Simplify ctrl/SPAD space allocation and avoid allocating more space than needed (Jerome Brunet) - Correct MSI-X PBA offset calculations for DesignWare and Cadence endpoint controllers (Niklas Cassel) - Align the return value (number of interrupts) encoding for pci_epc_get_msi()/pci_epc_ops::get_msi() and pci_epc_get_msix()/pci_epc_ops::get_msix() (Niklas Cassel) - Align the nr_irqs parameter encoding for pci_epc_set_msi()/pci_epc_ops::set_msi() and pci_epc_set_msix()/pci_epc_ops::set_msix() (Niklas Cassel) * pci/endpoint: PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding PCI: cadence-ep: Correct PBA offset in .set_msix() callback PCI: dwc: ep: Correct PBA offset in .set_msix() callback PCI: endpoint: pci-epf-vntb: Simplify ctrl/SPAD space allocation PCI: endpoint: Retain fixed-size BAR size as well as aligned size commit 014dbfe0e402fe76cf2e4a0b21648c72c6ac4f8c Merge: df11586119066c 1f3303aa92e15f Author: Bjorn Helgaas Date: Wed Jun 4 10:50:03 2025 -0500 Merge branch 'pci/virtualization' - Add an ACS quirk for Loongson Root Ports that don't advertise ACS but don't allow peer-to-peer transactions between Root Ports; the quirk allows each Root Port to be in a separate IOMMU group (Huacai Chen) * pci/virtualization: PCI: Add ACS quirk for Loongson PCIe commit df11586119066c0c37c4324c3866416fe72c3f1a Merge: 4dac48e8a755c0 f3efb9569b4a21 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:02 2025 -0500 Merge branch 'pci/reset' - Fix locking issue in the slot reset path (Ilpo Järvinen) * pci/reset: PCI: Fix lock symmetry in pci_slot_unlock() commit 4dac48e8a755c03f07d3cb10ae605f620eaee4d3 Merge: f377d9cb257984 46bc169f6f07ec Author: Bjorn Helgaas Date: Wed Jun 4 10:50:02 2025 -0500 Merge branch 'pci/pwrctrl' - Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match the filename paths. Retain old deprecated symbols for compatibility, except for the pwrctrl slot driver (PCI_PWRCTRL_SLOT) (Johan Hovold) - When unregistering pwrctrl, cancel outstanding rescan work before cleaning up data structures to avoid use-after-free issues (Brian Norris) * pci/pwrctrl: arm64: Kconfig: switch to HAVE_PWRCTRL wifi: ath12k: switch to PCI_PWRCTRL_PWRSEQ wifi: ath11k: switch to PCI_PWRCTRL_PWRSEQ PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module PCI/pwrctrl: Cancel outstanding rescan work when unregistering commit f377d9cb2579843219f9f1c4a74ed1c3d1967859 Merge: 80fe18d1de6b90 4d4c10f763d780 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:01 2025 -0500 Merge branch 'pci/pm' - Add pm_runtime_put() cleanup helper for use with __free() to automatically drop the device usage count when a pointer goes out of scope (Alex Williamson) - Increment PM usage counter when probing reset methods so we don't try to read config space of a powered-off device (Alex Williamson) - Set all devices to D0 during enumeration to ensure ACPI opregion is connected via _REG (Mario Limonciello) * pci/pm: PCI: Explicitly put devices into D0 when initializing PCI: Increment PM usage counter when probing reset methods PM: runtime: Define pm_runtime_put cleanup helper commit 80fe18d1de6b90351834fbe06314602120ee646a Merge: 3ebd1305c1d243 631b2af2f35737 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:00 2025 -0500 Merge branch 'pci/pci-acpi' - Fix pci_acpi_scan_root() memory leak when we fail to create a PCI bus (Zhe Qiao) * pci/pci-acpi: PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root() commit 3ebd1305c1d243f287409096a39d1c7103a6bce0 Merge: bb5c909e6a5e37 fdc348121f2465 Author: Bjorn Helgaas Date: Wed Jun 4 10:50:00 2025 -0500 Merge branch 'pci/irq' - Use of_fwnode_handle() so of_node_to_fwnode() can be removed (Jiri Slaby) * pci/irq: irqdomain: pci: Switch to of_fwnode_handle() commit bb5c909e6a5e37417e988147c705e4df64278b52 Merge: 68d0370e4e80ac d46b3918fac499 Author: Bjorn Helgaas Date: Wed Jun 4 10:49:59 2025 -0500 Merge branch 'pci/hotplug' - Ignore Presence Detect Changed caused by DPC. pciehp already ignores Link Down/Up events caused by DPC, but on slots using in-band presence detect, DPC causes a spurious Presence Detect Changed event (Lukas Wunner) - Ignore Link Down/Up caused by Secondary Bus Reset. On hotplug ports using in-band presence detect, the reset causes a Presence Detect Changed event, which mistakenly caused teardown and re-enumeration of the device. Drivers may need to annotate code that resets their device (Lukas Wunner) * pci/hotplug: PCI: hotplug: Drop superfluous #include directives PCI: pciehp: Ignore Link Down/Up caused by Secondary Bus Reset PCI: pciehp: Ignore Presence Detect Changed caused by DPC # Conflicts: # drivers/pci/pci.h commit 68d0370e4e80ac6ab9043813f7ade3c810648679 Merge: f56278a46d8611 ce45dc4bb22e96 Author: Bjorn Helgaas Date: Wed Jun 4 10:49:56 2025 -0500 Merge branch 'pci/enumeration' - Remove pci_fixup_cardbus(), which has no users left (Heiner Kallweit) - Print the actual delay time in pci_bridge_wait_for_secondary_bus() instead of assuming it was 1000ms (Wilfred Mallawa) - Revert 'iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices', which broke resume from system sleep on AMD platforms and has been fixed by other commits (Lukas Wunner) - Restrict visibility of pci_dev.match_driver since it's no longer used outside the PCI core (Lukas Wunner) * pci/enumeration: PCI: Limit visibility of match_driver flag to PCI core Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices" PCI: Print the actual delay time in pci_bridge_wait_for_secondary_bus() PCI: Use PCI_STD_NUM_BARS instead of 6 PCI: Remove pci_fixup_cardbus() # Conflicts: # drivers/pci/pci.h commit f56278a46d8611278c2b6764ad370fe2a4987430 Merge: 1acf6a5e7948cb dfc970ad619731 Author: Bjorn Helgaas Date: Wed Jun 4 10:49:50 2025 -0500 Merge branch 'pci/devres' - Remove mtip32xx use of pcim_iounmap_regions(), which is deprecated and unnecessary (Philipp Stanner) - Remove pcim_iounmap_regions() and pcim_request_region_exclusive() and related flags since all uses have been removed (Philipp Stanner) - Rework devres 'request' functions so they are no longer 'hybrid', i.e., their behavior no longer depends on whether pcim_enable_device or pci_enable_device() was used, and remove related code (Philipp Stanner) * pci/devres: PCI: Remove function pcim_intx() prototype from pci.h PCI: Remove hybrid-devres usage warnings from kernel-doc PCI: Remove redundant set of request functions PCI: Remove exclusive requests flags from _pcim_request_region() PCI: Remove pcim_request_region_exclusive() Documentation/driver-api: Update pcim_enable_device() PCI: Remove hybrid devres nature from request functions PCI: Remove pcim_iounmap_regions() mtip32xx: Remove unnecessary pcim_iounmap_regions() calls commit 1acf6a5e7948cb6f7d5a8cda349532f67f346b4d Merge: f5b6c76e552da4 6ade6e81f898f7 Author: Bjorn Helgaas Date: Wed Jun 4 10:49:49 2025 -0500 Merge branch 'pci/bwctrl' - Simplify link bandwidth controller by replacing the count of Link Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN flag (Ilpo Järvinen) - Update the Link Speed after retraining, since the Link Speed may have changed (Ilpo Järvinen) * pci/bwctrl: PCI: Update Link Speed after retraining PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag commit f5b6c76e552da4dd23de2e23a73ead04aa2285d2 Merge: 0af2f6be1b4281 b06d125e628060 Author: Bjorn Helgaas Date: Wed Jun 4 10:49:49 2025 -0500 Merge branch 'pci/aer' - Initialize struct aer_err_info before using it to avoid depending on stack garbage (Bjorn Helgaas) - Log the DPC Error Source ID only when it's actually valid (when ERR_FATAL or ERR_NONFATAL was received from a downstream device) and decode into bus/device/function (Bjorn Helgaas) - Consolidate AER Error Source ID in one place for message consistency (Bjorn Helgaas) - Update statistics and emit trace events early in AER logging paths, before any potential ratelimiting (Bjorn Helgaas) - Determine AER log level once and save it so all related messages use the same level (Karolina Stolarek) - Use KERN_WARNING, not KERN_ERR, when logging PCIe Correctable Errors. - Ratelimit PCIe Correctable and Non-Fatal error logging, with sysfs controls on interval and burst count, to avoid flooding logs and RCU stall warnings (Jon Pan-Doh) * pci/aer: PCI/ERR: Remove misleading TODO regarding kernel panic PCI/AER: Add sysfs attributes for log ratelimits PCI/AER: Add ratelimits to PCI AER Documentation PCI/AER: Ratelimit correctable and non-fatal error logging PCI/AER: Simplify add_error_device() PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index PCI/AER: Rename struct aer_stats to aer_info PCI/AER: Reduce pci_print_aer() correctable error level to KERN_WARNING PCI/ERR: Add printk level to pcie_print_tlp_log() PCI/AER: Check log level once and remember it PCI/AER: Trace error event before ratelimiting PCI/AER: Update statistics before ratelimiting PCI/AER: Simplify pci_print_aer() PCI/AER: Initialize aer_err_info before using it PCI/AER: Move aer_print_source() earlier in file PCI/AER: Rename aer_print_port_info() to aer_print_source() PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type() PCI/AER: Factor COR/UNCOR error handling out from aer_isr_one_error() PCI/DPC: Log Error Source ID only when valid PCI/DPC: Initialize aer_err_info before using it commit 1a576136f8d7089ef7f427dee8aa919a6edaef69 Author: Steven Rostedt Date: Wed Jun 4 08:51:21 2025 -0400 drm/ttm: Fix compile error when CONFIG_SHMEM is not set When CONFIG_SHMEM is not set, the following compiler error occurs: ld: vmlinux.o: in function `ttm_backup_backup_page': (.text+0x10363bc): undefined reference to `shmem_writeout' make[3]: *** [/work/build/trace/nobackup/linux.git/scripts/Makefile.vmlinux:91: vmlinux.unstripped] Error 1 This is due to the replacement of writepage and calling swap_writeout() and shmem_writeout() directly. The issue is that when CONFIG_SHMEM is not defined, shmem_writeout() is also not defined. The function ttm_backup_backup_page() called mapping->a_ops->writepage() which was then changed to call shmem_writeout() directly. Even before commit 84798514db50 ("mm: Remove swap_writepage() and shmem_writepage()"), it didn't make sense to call anything other than shmem_writeout() as the ttm_backup deals only with shmem folios. Have DRM_TTM config option select SHMEM to guarantee that shmem_writeout() is available. Link: https://lore.kernel.org/all/20250602170500.48713a2b@gandalf.local.home/ Suggested-by: Hugh Dickins Fixes: 84798514db50 ("mm: Remove swap_writepage() and shmem_writepage()") Signed-off-by: Steven Rostedt (Google) Reviewed-by: Thomas Hellström Signed-off-by: Linus Torvalds commit 791d76005de0ab556b590473eb4cbfede727fce0 Author: Dibin Moolakadan Subrahmanian Date: Wed May 28 12:15:56 2025 +0530 drm/i915/display: Fix u32 overflow in SNPS PHY HDMI PLL setup When configuring the HDMI PLL, calculations use DIV_ROUND_UP_ULL and DIV_ROUND_DOWN_ULL macros, which internally rely on do_div. However, do_div expects a 32-bit (u32) divisor, and at higher data rates, the divisor can exceed this limit. This leads to incorrect division results and ultimately misconfigured PLL values. This fix replaces do_div calls with div64_base64 calls where diviser can exceed u32 limit. Fixes: 5947642004bf ("drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2") Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Signed-off-by: Dibin Moolakadan Subrahmanian Reviewed-by: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250528064557.4172149-1-dibin.moolakadan.subrahmanian@intel.com (cherry picked from commit ce924116e43ffbfa544d82976c4b9d11bcde9334) Signed-off-by: Joonas Lahtinen commit 308f8c7a626ecd5b9be67181ae67660e165a29b5 Author: Manivannan Sadhasivam Date: Wed Jun 4 17:38:30 2025 +0530 MAINTAINERS: Update Manivannan Sadhasivam email address My Linaro email is going to bounce soon, so switch to the kernel.org alias and add relevant .mailmap entry. [bhelgaas: squash https://patch.msgid.link/20250604120833.32791-3-manivannan.sadhasivam@linaro.org] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Acked-by: Neil Armstrong Link: https://patch.msgid.link/20250604120833.32791-2-manivannan.sadhasivam@linaro.org commit 12c331b29c7397ac3b03584e12902990693bc248 Author: Alok Tiwari Date: Mon Jun 2 03:34:29 2025 -0700 gve: add missing NULL check for gve_alloc_pending_packet() in TX DQO gve_alloc_pending_packet() can return NULL, but gve_tx_add_skb_dqo() did not check for this case before dereferencing the returned pointer. Add a missing NULL check to prevent a potential NULL pointer dereference when allocation fails. This improves robustness in low-memory scenarios. Fixes: a57e5de476be ("gve: DQO: Add TX path") Signed-off-by: Alok Tiwari Reviewed-by: Mina Almasry Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 942349413a49670e8bed246e2185fd3a053227be Author: Benjamin Berg Date: Wed Jun 4 10:17:05 2025 +0200 um: fix SECCOMP 32bit xstate register restore There was a typo that caused the extended FP state to be copied into the wrong location on 32 bit. On 32 bit we only store the xstate internally as that already contains everything. However, for compatibility, the mcontext on 32 bit first contains the legacy FP state and then the xstate. The code copied the xstate on top of the legacy FP state instead of using the correct offset. This offset was already calculated in the xstate_* variables, so simply switch to those to fix the problem. With this SECCOMP mode works on 32 bit, so lift the restriction. Fixes: b1e1bd2e6943 ("um: Add helper functions to get/set state for SECCOMP") Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250604081705.934112-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 434d7f9b0e24e1f0166d05f10881a8ab386845b7 Author: Herbert Xu Date: Fri May 30 16:30:11 2025 +0800 timens: Add struct seq_file forward declaration Add forward declaration of struct seq_file before using it in a function prototype. Fixes: 04a8682a71be ("fs/proc: Introduce /proc/pid/timens_offsets") Signed-off-by: Herbert Xu Signed-off-by: Thomas Gleixner Acked-by: Andrei Vagin Link: https://lore.kernel.org/all/aDlskzKIAULMlwPj@gondor.apana.org.au commit 9cc82d99b13c1ad04e3dff9182b7953a8dba10b6 Author: Marc Zyngier Date: Tue Jun 3 15:18:01 2025 +0100 PCI/MSI: Size device MSI domain with the maximum number of vectors Zenghui reports that since 1396e89e09f0 ("genirq/msi: Move prepare() call to per-device allocation"), his Multi-MSI capable device isn't working anymore. This is a consequence of 15c72f824b32 ("PCI/MSI: Add support for per device MSI[X] domains"), which always creates a MSI domain of size 1, even in the presence of Multi-MSI. While this was somehow working until then, moving the .prepare() call ends up sizing the ITS table with a tiny value for this device, and making the endpoint driver unhappy. Instead, always create the domain and call the .prepare() helper with the maximum expected size. Fixes: 1396e89e09f0 ("genirq/msi: Move prepare() call to per-device allocation") Fixes: 15c72f824b32 ("PCI/MSI: Add support for per device MSI[X] domains") Reported-by: Zenghui Yu Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Zenghui Yu Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/all/20250603141801.915305-1-maz@kernel.org Closes: https://lore.kernel.org/r/0b1d7aec-1eac-a9cd-502a-339e216e08a1@huawei.com commit 44e479d7202070c3bc7f084a4951ee8689769f71 Author: Yi Zhang Date: Fri Apr 25 06:01:07 2025 -0400 nvme: spelling fixes Fix various spelling errors in comments. Signed-off-by: Yi Zhang Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f42d4796ee100fade86086d1cf98537fb4d326c8 Author: Hannes Reinecke Date: Wed May 28 08:45:34 2025 +0200 nvme-tcp: fix I/O stalls on congested sockets When the socket is busy processing nvme_tcp_try_recv() might return -EAGAIN, but this doesn't automatically imply that the sending side is blocked, too. So check if there are pending requests once nvme_tcp_try_recv() returns -EAGAIN and continue with the sending loop to avoid I/O stalls. Signed-off-by: Hannes Reinecke Acked-by: Chris Leech Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 0bf04c874fcb1ae46a863034296e4b33d8fbd66c Author: Hannes Reinecke Date: Wed May 28 08:45:33 2025 +0200 nvme-tcp: sanitize request list handling Validate the request in nvme_tcp_handle_r2t() to ensure it's not part of any list, otherwise a malicious R2T PDU might inject a loop in request list processing. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e7143706702a209c814ed2c3fc6486c2a7decf6c Author: Shin'ichiro Kawasaki Date: Mon Jun 2 13:35:22 2025 +0900 nvme-tcp: remove tag set when second admin queue config fails Commit 104d0e2f6222 ("nvme-fabrics: reset admin connection for secure concatenation") modified nvme_tcp_setup_ctrl() to call nvme_tcp_configure_admin_queue() twice. The first call prepares for DH-CHAP negotitation, and the second call is required for secure concatenation. However, this change triggered BUG KASAN slab-use-after- free in blk_mq_queue_tag_busy_iter(). This BUG can be recreated by repeating the blktests test case nvme/063 a few times [1]. When the BUG happens, nvme_tcp_create_ctrl() fails in the call chain below: nvme_tcp_create_ctrl() nvme_tcp_alloc_ctrl() new=true ... Alloc nvme_tcp_ctrl and admin_tag_set nvme_tcp_setup_ctrl() new=true nvme_tcp_configure_admin_queue() new=true ... Succeed nvme_alloc_admin_tag_set() ... Alloc the tag set for admin_tag_set nvme_stop_keep_alive() nvme_tcp_teardown_admin_queue() remove=false nvme_tcp_configure_admin_queue() new=false nvme_tcp_alloc_admin_queue() ... Fail, but do not call nvme_remove_admin_tag_set() nvme_uninit_ctrl() nvme_put_ctrl() ... Free up the nvme_tcp_ctrl and admin_tag_set The first call of nvme_tcp_configure_admin_queue() succeeds with new=true argument. The second call fails with new=false argument. This second call does not call nvme_remove_admin_tag_set() on failure, due to the new=false argument. Then the admin tag set is not removed. However, nvme_tcp_create_ctrl() assumes that nvme_tcp_setup_ctrl() would call nvme_remove_admin_tag_set(). Then it frees up struct nvme_tcp_ctrl which has admin_tag_set field. Later on, the timeout handler accesses the admin_tag_set field and causes the BUG KASAN slab-use-after-free. To not leave the admin tag set, call nvme_remove_admin_tag_set() when the second nvme_tcp_configure_admin_queue() call fails. Do not return from nvme_tcp_setup_ctrl() on failure. Instead, jump to "destroy_admin" go-to label to call nvme_tcp_teardown_admin_queue() which calls nvme_remove_admin_tag_set(). Fixes: 104d0e2f6222 ("nvme-fabrics: reset admin connection for secure concatenation") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-nvme/6mhxskdlbo6fk6hotsffvwriauurqky33dfb3s44mqtr5dsxmf@gywwmnyh3twm/ [1] Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 3c12a8939e04749b8c2520c8b1fa2bf171bd8852 Author: Pavel Begunkov Date: Tue May 20 16:22:18 2025 +0100 nvme: enable vectored registered bufs for passthrough cmds nvme already supports registered buffers for non-vectored io_uring passthrough commands, enable it for the vectored mode as well. It takes an iovec, each entry of which should contain a range within the same registered buffer specificied in sqe->buf_index. Signed-off-by: Pavel Begunkov Reviewed-by: Jens Axboe Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos Signed-off-by: Christoph Hellwig commit c4b680ac2863821e19d360fca62f78b68b1c8ece Author: Pavel Begunkov Date: Tue May 20 16:14:49 2025 +0100 nvme: fix implicit bool to flags conversion nvme_map_user_request() takes flags as the last argument, but nvme_uring_cmd_io() shoves a bool "vec" into it. It behaves as expected because bool is converted to 0/1 and NVME_IOCTL_VEC is defined as 1, but it's better to pass flags explicitly. Fixes: 7b7fdb8e2dbc1 ("nvme: replace the "bool vec" arguments with flags in the ioctl path") Signed-off-by: Pavel Begunkov Reviewed-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Reviewed-by: Caleb Sander Mateos Signed-off-by: Christoph Hellwig commit 10f4a7cd724e34b7a6ff96e57ac49dc0cadececc Author: Keith Busch Date: Tue May 20 13:20:37 2025 -0700 nvme: fix command limits status code The command specific status code, 0x183, was introduced in the NVMe 2.0 specification defined to "Command Size Limits Exceeded" and only ever applied to DSM and Copy commands. Fix the name and, remove the incorrect translation to error codes and special treatment in the target code for it. Fixes: 3b7c33b28a44d4 ("nvme.h: add Write Zeroes definitions") Cc: Chaitanya Kulkarni Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 805f5bbaa507a7e15333ad7bb34d517251de4eb9 Author: Dmitry Torokhov Date: Tue Jun 3 21:47:36 2025 -0700 Input: psmouse - switch to use scnprintf() to suppress truncation warning Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit ce098f2aded8d0f6f41bb9ab069c3f3c8ef5fc42 Author: Dmitry Torokhov Date: Tue Jun 3 21:49:21 2025 -0700 Input: lifebook - switch to use scnprintf() to suppress truncation warning Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit 1babc858cce111d744baf9a015ec65a19aafbbea Author: Dmitry Torokhov Date: Tue Jun 3 21:42:51 2025 -0700 Input: alps - switch to use scnprintf() to suppress truncation warning Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit 4ecc7317700a0f402e301380300328141b332170 Author: Dmitry Torokhov Date: Tue Jun 3 21:45:44 2025 -0700 Input: atkbd - switch to use scnprintf() to suppress truncation warning Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit 05286c5d7e72a543a12a62904a221825d72f20e9 Author: Markus Koch Date: Tue Jun 3 21:36:44 2025 -0700 Input: fsia6b - suppress buffer truncation warning for phys Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501020303.1WtxWWTu-lkp@intel.com/ Signed-off-by: Markus Koch Link: https://lore.kernel.org/r/20250602175710.61583-4-markus@notsyncing.net Signed-off-by: Dmitry Torokhov commit 1ac9aa41c6af7949a040f87cf1ed4bc4cac296bf Author: Jeff LaBundy Date: Sun Jan 5 12:56:48 2025 -0600 Input: iqs626a - replace snprintf() with scnprintf() W=1 builds warn that the data written to 'tc_name' is truncated for theoretical strings such as "channel-2147483646". Solve this problem by replacing snprintf() with scnprintf() so that the return value corresponds to what was actually written. In practice, the largest string that will be written is "channel-8", and the return value is not actually evaluated. Instead, this patch ultimately removes the warning without unnecessarily increasing the size of 'tc_name' from 10 bytes. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202412221136.0S4kRoCC-lkp@intel.com/ Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Z3rV8GTHxLyjBQ5I@nixie71 Signed-off-by: Dmitry Torokhov commit a2f4c1ae163b815dc81e3cab97c3149fdc6639e3 Author: Uday Shankar Date: Tue Jun 3 17:38:33 2025 -0600 selftests: ublk: kublk: improve behavior on init failure Some failure modes are handled poorly by kublk. For example, if ublk_drv is built as a module but not currently loaded into the kernel, ./kublk add ... just hangs forever. This happens because in this case (and a few others), the worker process does not notify its parent (via a write to the shared eventfd) that it has tried and failed to initialize, so the parent hangs forever. Fix this by ensuring that we always notify the parent process of any initialization failure, and have the parent print a (not very descriptive) log line when this happens. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250603-ublk_init_fail-v1-1-87c91486230e@purestorage.com Signed-off-by: Jens Axboe commit 8a3514d348de87a9d5e2ac00fbac4faae0b97996 Author: Sanjeev Yadav Date: Fri May 23 13:14:01 2025 -0700 scsi: core: ufs: Fix a hang in the error handler ufshcd_err_handling_prepare() calls ufshcd_rpm_get_sync(). The latter function can only succeed if UFSHCD_EH_IN_PROGRESS is not set because resuming involves submitting a SCSI command and ufshcd_queuecommand() returns SCSI_MLQUEUE_HOST_BUSY if UFSHCD_EH_IN_PROGRESS is set. Fix this hang by setting UFSHCD_EH_IN_PROGRESS after ufshcd_rpm_get_sync() has been called instead of before. Backtrace: __switch_to+0x174/0x338 __schedule+0x600/0x9e4 schedule+0x7c/0xe8 schedule_timeout+0xa4/0x1c8 io_schedule_timeout+0x48/0x70 wait_for_common_io+0xa8/0x160 //waiting on START_STOP wait_for_completion_io_timeout+0x10/0x20 blk_execute_rq+0xe4/0x1e4 scsi_execute_cmd+0x108/0x244 ufshcd_set_dev_pwr_mode+0xe8/0x250 __ufshcd_wl_resume+0x94/0x354 ufshcd_wl_runtime_resume+0x3c/0x174 scsi_runtime_resume+0x64/0xa4 rpm_resume+0x15c/0xa1c __pm_runtime_resume+0x4c/0x90 // Runtime resume ongoing ufshcd_err_handler+0x1a0/0xd08 process_one_work+0x174/0x808 worker_thread+0x15c/0x490 kthread+0xf4/0x1ec ret_from_fork+0x10/0x20 Signed-off-by: Sanjeev Yadav [ bvanassche: rewrote patch description ] Fixes: 62694735ca95 ("[SCSI] ufs: Add runtime PM support for UFS host controller driver") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250523201409.1676055-1-bvanassche@acm.org Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen commit 42ca547b13a20e7cbb04fbdf8d5f089ac4bb35b7 Author: Shyam Prasad N Date: Mon Jun 2 22:37:17 2025 +0530 cifs: do not disable interface polling on failure When a server has multichannel enabled, we keep polling the server for interfaces periodically. However, when this query fails, we disable the polling. This can be problematic as it takes away the chance for the server to start advertizing again. This change reschedules the delayed work, even if the current call failed. That way, multichannel sessions can recover. Signed-off-by: Shyam Prasad N Cc: stable@vger.kernel.org Signed-off-by: Steve French commit b5e3e6e28cf3853566ba5d816f79aba5be579158 Author: Shyam Prasad N Date: Mon Jun 2 22:37:15 2025 +0530 cifs: serialize other channels when query server interfaces is pending Today, during smb2_reconnect, session_mutex is released as soon as the tcon is reconnected and is in a good state. However, in case multichannel is enabled, there is also a query of server interfaces that follows. We've seen that this query can race with reconnects of other channels, causing them to step on each other with reconnects. This change extends the hold of session_mutex till after the query of server interfaces is complete. In order to avoid recursive smb2_reconnect checks during query ioctl, this change also introduces a session flag for sessions where such a query is in progress. Signed-off-by: Shyam Prasad N Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 66d590b828b1fd9fa337047ae58fe1c4c6f43609 Author: Shyam Prasad N Date: Mon Jun 2 22:37:12 2025 +0530 cifs: deal with the channel loading lag while picking channels Our current approach to select a channel for sending requests is this: 1. iterate all channels to find the min and max queue depth 2. if min and max are not the same, pick the channel with min depth 3. if min and max are same, round robin, as all channels are equally loaded The problem with this approach is that there's a lag between selecting a channel and sending the request (that increases the queue depth on the channel). While these numbers will eventually catch up, there could be a skew in the channel usage, depending on the application's I/O parallelism and the server's speed of handling requests. With sufficient parallelism, this lag can artificially increase the queue depth, thereby impacting the performance negatively. This change will change the step 1 above to start the iteration from the last selected channel. This is to reduce the skew in channel usage even in the presence of this lag. Fixes: ea90708d3cf3 ("cifs: use the least loaded channel for sending requests") Cc: Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit cc55f65dd352bdb7bdf8db1c36fb348c294c3b66 Author: Stefan Metzmacher Date: Wed May 28 18:01:40 2025 +0200 smb: client: make use of common smbdirect_socket_parameters Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit dce8047f4725d4469c0813ff50c4115fc2d0b628 Author: Stefan Metzmacher Date: Wed May 28 18:01:39 2025 +0200 smb: smbdirect: introduce smbdirect_socket_parameters This is the next step in the direction of a common smbdirect layer. Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit c3011b9a7deaaaabdf955815d29eac39c8b75e67 Author: Stefan Metzmacher Date: Wed May 28 18:01:37 2025 +0200 smb: client: make use of common smbdirect_socket This is the next step in the direction of a common smbdirect layer. Currently only structures are shared, but that will change over time until everything is shared. Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 22234e37d7e97652cb53133009da5e14793d3c10 Author: Stefan Metzmacher Date: Wed May 28 18:01:36 2025 +0200 smb: smbdirect: add smbdirect_socket.h This abstracts the common smbdirect layer. Currently with just a few things in it, but that will change over time until everything is in common. Will be used in client and server in the next commits Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 21604ed60864b9ace2e28a1c86411f388f03f94e Author: Stefan Metzmacher Date: Wed May 28 18:01:34 2025 +0200 smb: client: make use of common smbdirect.h Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 7e136a718633b2c54764e185f3bfccf0763fc1dd Author: Stefan Metzmacher Date: Wed May 28 18:01:33 2025 +0200 smb: smbdirect: add smbdirect.h with public structures Will be used in client and server in the next commits. Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee CC: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 64946d5be665ddac6b5bf11f5b5ff319aae0f4c6 Author: Stefan Metzmacher Date: Wed May 28 18:01:31 2025 +0200 smb: client: make use of common smbdirect_pdu.h Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 00fab6cf323fa5850e6cbe283b23e605e6e97912 Author: Stefan Metzmacher Date: Wed May 28 18:01:30 2025 +0200 smb: smbdirect: add smbdirect_pdu.h with protocol definitions This is just a start moving into a common smbdirect layer. It will be used in the next commits... Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: Hyunchul Lee Cc: Meetakshi Setiya Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 43a67dd812c5d3de163c0b6971046b4a4b633d3f Author: Caleb Sander Mateos Date: Tue Jun 3 12:47:51 2025 -0600 block: flip iter directions in blk_rq_integrity_map_user() blk_rq_integrity_map_user() creates the ubuf iter with ITER_DEST for write-direction operations and ITER_SOURCE for read-direction ones. This is backwards; writes use the user buffer as a source for metadata and reads use it as a destination. Switch to the rq_data_dir() helper, which maps writes to ITER_SOURCE (WRITE) and reads to ITER_DEST(READ). Signed-off-by: Caleb Sander Mateos Fixes: fe8f4ca7107e ("block: modify bio_integrity_map_user to accept iov_iter as argument") Link: https://lore.kernel.org/r/20250603184752.1185676-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 5abc7438f1e9d62e91ad775cc83c9594c48d2282 Merge: 6d9b5f6b81ace1 e3e3775392f3f0 Author: Linus Torvalds Date: Tue Jun 3 16:13:32 2025 -0700 Merge tag 'nfs-for-6.16-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS clent updates from Anna Schumaker: "New Features: - Implement the Sunrpc rfc2203 rpcsec_gss sequence number cache - Add support for FALLOC_FL_ZERO_RANGE on NFS v4.2 - Add a localio sysfs attribute Stable Fixes: - Fix double-unlock bug in nfs_return_empty_folio() - Don't check for OPEN feature support in v4.1 - Always probe for LOCALIO support asynchronously - Prevent hang on NFS mounts with xprtsec=[m]tls Other Bugfixes: - xattr handlers should check for absent nfs filehandles - Fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated - Fix listxattr to return selinux security labels - Connect to NFSv3 DS using TLS if MDS connection uses TLS - Clear SB_RDONLY before getting a superblock, and ignore when remounting - Fix incorrect handling of NFS error codes in nfs4_do_mkdir() - Various nfs_localio fixes from Neil Brown that include fixing an rcu compilation error found by older gcc versions. - Update stats on flexfiles pNFS DSes when receiving NFS4ERR_DELAY Cleanups: - Add a refcount tracker for struct net in the nfs_client - Allow FREE_STATEID to clean up delegations - Always set NLINK even if the server doesn't support it - Cleanups to the NFS folio writeback code - Remove dead code from xs_tcp_tls_setup_socket()" * tag 'nfs-for-6.16-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (30 commits) flexfiles/pNFS: update stats on NFS4ERR_DELAY for v4.1 DSes nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh() nfs_localio: duplicate nfs_close_local_fh() nfs_localio: simplify interface to nfsd for getting nfsd_file nfs_localio: always hold nfsd net ref with nfsd_file ref nfs_localio: use cmpxchg() to install new nfs_file_localio SUNRPC: Remove dead code from xs_tcp_tls_setup_socket() SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls nfs: fix incorrect handling of large-number NFS errors in nfs4_do_mkdir() nfs: ignore SB_RDONLY when remounting nfs nfs: clear SB_RDONLY before getting superblock NFS: always probe for LOCALIO support asynchronously pnfs/flexfiles: connect to NFSv3 DS using TLS if MDS connection uses TLS NFS: add localio to sysfs nfs: use writeback_iter directly nfs: refactor nfs_do_writepage nfs: don't return AOP_WRITEPAGE_ACTIVATE from nfs_do_writepage nfs: fold nfs_page_async_flush into nfs_do_writepage NFSv4: Always set NLINK even if the server doesn't support it ... commit 6d9b5f6b81ace1b2b0830271ad46628d6fad31bb Merge: 3c727285f1c99b 8a5ebd2be99a1f Author: Linus Torvalds Date: Tue Jun 3 16:04:29 2025 -0700 Merge tag 'v6.16-rc-part1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client updates from Steve French: - multichannel fixes (mostly reconnect related), and clarification of locking documentation - automount null pointer check fix - fixes to add support for ParentLeaseKey - minor cleanup - smb1/cifs fixes * tag 'v6.16-rc-part1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update the lock ordering comments with new mutex cifs: dns resolution is needed only for primary channel cifs: update dstaddr whenever channel iface is updated cifs: reset connections for all channels when reconnect requested smb: client: use ParentLeaseKey in cifs_do_create smb: client: use ParentLeaseKey in open_cached_dir smb: client: add ParentLeaseKey support cifs: Fix cifs_query_path_info() for Windows NT servers cifs: Fix validation of SMB1 query reparse point response cifs: Correctly set SMB1 SessionKey field in Session Setup Request cifs: Fix encoding of SMB1 Session Setup NTLMSSP Request in non-UNICODE mode smb: client: add NULL check in automount_fullpath smb: client: Remove an unused function and variable commit 3c727285f1c99b4be5458ba68329748b207584ce Merge: 0939bd2fcf3372 9f2f6316d753fe Author: Linus Torvalds Date: Tue Jun 3 15:54:46 2025 -0700 Merge tag 'for-6.16/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mikulas Patocka: - better error handling when reloading a table - use use generic disable_* functions instead of open coding them - lock queue limits when reading them - remove unneeded kvfree from alloc_targets - fix BLK_FEAT_ATOMIC_WRITES - pass through operations on wrapped inline crypto keys - dm-verity: - use softirq context only when !need_resched() - fix a memory leak if some arguments are specified multiple times - dm-mpath: - interface for explicit probing of active paths - replace spin_lock_irqsave with spin_lock_irq - dm-delay: don't busy-wait in kthread - dm-bufio: remove maximum age based eviction - dm-flakey: various fixes - vdo indexer: don't read request structure after enqueuing - dm-zone: Use bdev_*() helper functions where applicable - dm-mirror: fix a tiny race condition - dm-stripe: small code cleanup * tag 'for-6.16/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (29 commits) dm-stripe: small code cleanup dm-verity: fix a memory leak if some arguments are specified multiple times dm-mirror: fix a tiny race condition dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock dm mpath: replace spin_lock_irqsave with spin_lock_irq dm-mpath: Don't grab work_mutex while probing paths dm-zone: Use bdev_*() helper functions where applicable dm vdo indexer: don't read request structure after enqueuing dm: pass through operations on wrapped inline crypto keys blk-crypto: export wrapped key functions dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits dm mpath: Interface for explicit probing of active paths dm: Allow .prepare_ioctl to handle ioctls directly dm-flakey: make corrupting read bios work dm-flakey: remove useless ERROR_READS check in flakey_end_io dm-flakey: error all IOs when num_features is absent dm-flakey: Clean up parsing messages dm: remove unneeded kvfree from alloc_targets dm-bufio: remove maximum age based eviction dm-verity: use softirq context only when !need_resched() ... commit 0939bd2fcf337243133b0271335a2838857c319f Merge: 70087d2200d4a3 a913ef6fd883c0 Author: Linus Torvalds Date: Tue Jun 3 15:11:44 2025 -0700 Merge tag 'perf-tools-for-v6.16-1-2025-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools updates from Arnaldo Carvalho de Melo: "perf report/top/annotate TUI: - Accept the left arrow key as a Zoom out if done on the first column - Show if source code toggle status in title, to help spotting bugs with the various disassemblers (capstone, llvm, objdump) - Provide feedback on unhandled hotkeys Build: - Better inform when certain features are not available with warnings in the build process and in 'perf version --build-options' or 'perf -vv' perf record: - Improve the --off-cpu code by synthesizing events for switch-out -> switch-in intervals using a BPF program. This can be fine tuned using a --off-cpu-thresh knob perf report: - Add 'tgid' sort key perf mem/c2c: - Add 'op', 'cache', 'snoop', 'dtlb' output fields - Add support for 'ldlat' on AMD IBS (Instruction Based Sampling) perf ftrace: - Use process/session specific trace settings instead of messing with the global ftrace knobs perf trace: - Implement syscall summary in BPF - Support --summary-mode=cgroup - Always print return value for syscalls returning a pid - The rseq and set_robust_list don't return a pid, just -errno perf lock contention: - Symbolize zone->lock using BTF - Add -J/--inject-delay option to estimate impact on application performance by optimization of kernel locking behavior perf stat: - Improve hybrid support for the NMI watchdog warning Symbol resolution: - Handle 'u' and 'l' symbols in /proc/kallsyms, resolving some Rust symbols - Improve Rust demangler Hardware tracing: Intel PT: - Fix PEBS-via-PT data_src - Do not default to recording all switch events - Fix pattern matching with python3 on the SQL viewer script arm64: - Fixups for the hip08 hha PMU Vendor events: - Update Intel events/metrics files for alderlake, alderlaken, arrowlake, bonnell, broadwell, broadwellde, broadwellx, cascadelakex, clearwaterforest, elkhartlake, emeraldrapids, grandridge, graniterapids, haswell, haswellx, icelake, icelakex, ivybridge, ivytown, jaketown, lunarlake, meteorlake, nehalemep, nehalemex, rocketlake, sandybridge, sapphirerapids, sierraforest, skylake, skylakex, snowridgex, tigerlake, westmereep-dp, westmereep-sp, westmereep-sx python support: - Add support for event counts in the python binding, add a counting.py example perf list: - Display the PMU name associated with a perf metric in JSON perf test: - Hybrid improvements for metric value validation test - Fix LBR test by ignoring idle task - Add AMD IBS sw filter ana d'ldlat' tests - Add 'perf trace --summary-mode=cgroup' test - Add tests for the various language symbol demanglers Miscellaneous: - Allow specifying the cpu an event will be tied using '-e event/cpu=N/' - Sync various headers with the kernel sources - Add annotations to use clang's -Wthread-safety and fix some problems it detected - Make dump_stack() use perf's symbol resolution to provide better backtraces - Intel TPEBS support cleanups and fixes. TPEBS stands for Timed PEBS (Precision Event-Based Sampling), that adds timing info, the retirement latency of instructions - Various memory allocation (some detected by ASAN) and reference counting fixes - Add a 8-byte aligned PERF_RECORD_COMPRESSED2 to replace PERF_RECORD_COMPRESSED - Skip unsupported event types in perf.data files, don't stop when finding one - Improve lookups using hashmaps and binary searches" * tag 'perf-tools-for-v6.16-1-2025-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (206 commits) perf callchain: Always populate the addr_location map when adding IP perf lock contention: Reject more than 10ms delays for safety perf trace: Set errpid to false for rseq and set_robust_list perf symbol: Move demangling code out of symbol-elf.c perf trace: Always print return value for syscalls returning a pid perf script: Print PERF_AUX_FLAG_COLLISION flag perf mem: Show absolute percent in mem_stat output perf mem: Display sort order only if it's available perf mem: Describe overhead calculation in brief perf record: Fix incorrect --user-regs comments Revert "perf thread: Ensure comm_lock held for comm_list" perf test trace_summary: Skip --bpf-summary tests if no libbpf perf test intel-pt: Skip jitdump test if no libelf perf intel-tpebs: Avoid race when evlist is being deleted perf test demangle-java: Don't segv if demangling fails perf symbol: Fix use-after-free in filename__read_build_id perf pmu: Avoid segv for missing name/alias_name in wildcarding perf machine: Factor creating a "live" machine out of dwarf-unwind perf test: Add AMD IBS sw filter test perf mem: Count L2 HITM for c2c statistic ... commit 607d09d1a01e9f29e91733e3a08b63ed240aacb2 Author: Jens Axboe Date: Tue Jun 3 07:42:28 2025 -0600 io_uring/kbuf: limit legacy provided buffer lists to USHRT_MAX The buffer ID for a provided buffer is an unsigned short, and hence there can only be 64k added to any given buffer list before having duplicate BIDs. Cap the legacy provided buffers at 64k in the list. This is mostly to prevent silly stall reports from syzbot, which likes to dump tons of buffers into a list and then have kernels with lockdep and kasan churning through them and hitting long wait times for buffer pruning at ring exit time. Signed-off-by: Jens Axboe commit 70087d2200d4a3bd31812ab4578c9ec70ea344af Merge: def5b099a64528 a4a45a9a72f3a9 Author: Linus Torvalds Date: Tue Jun 3 14:21:31 2025 -0700 Merge tag 'trace-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix UAF in module unload in ftrace when there's a bug in the module If a module is buggy and triggers ftrace_disable which is set when an anomaly is detected, when it gets unloaded it doesn't free the hooks into kallsyms, and when a kallsyms lookup is performed it may access the mod->modname field and crash via UAF. Fix this by still freeing the mod_maps that are attached to kallsyms on module unload regardless if ftrace_disable is set or not. - Do not bother allocating mod_maps for kallsyms if ftrace_disable is set - Remove unused trace events When a trace event or tracepoint is created but not used, it still creates the code and data structures needed for that trace event. This just wastes memory. Remove the trace events that are created but not used. This does not remove trace events that are created but are not used due configs not being set. That will be handled later. This only removes events that have no user under any config. * tag 'trace-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fsdax: Remove unused trace events for dax insert mapping genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint xdp: Remove unused mem_return_failed event ftrace: Don't allocate ftrace module map if ftrace is disabled ftrace: Fix UAF when lookup kallsym after ftrace disabled commit def5b099a6452856801da71ad07c601ae2dbf6ef Merge: 29e9359005dd1a c853d18706de8c Author: Linus Torvalds Date: Tue Jun 3 14:12:36 2025 -0700 Merge tag 'cgroup-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "The rstat per-subsystem split change skipped per-cpu allocation on UP configs; however even on UP, depending on config options, the size of the percpu struct may not be zero leading to crashes. Fix it by conditionalizing the per-cpu area allocation and usage on the size of the per-cpu struct" * tag 'cgroup-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: adjust criteria for rstat subsystem cpu lock access commit 29e9359005dd1ac5f9683608891718e6a32a20a3 Merge: a9dfb7db96f7bc 9f153b7fb5ae45 Author: Linus Torvalds Date: Tue Jun 3 13:24:14 2025 -0700 Merge tag 'cxl-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull Compute Express Link (CXL) updates from Dave Jiang: - Remove always true condition in cxl features code - Add verification of CHBS length for CXL 2.0 - Ignore interleave granularity when interleave ways is 1 - Add update addressing mising MODULE_DESCRIPTION for cxl_test - A series of cleanups/refactor to prep for AMD Zen5 translate code - Clean %pa debug printk in core/hdm.c - Documentation updates: - Update to CXL Maturity Map - Fixes to source linking in CXL documentation - CXL documentation fixes, spelling corrections - A large collection of CXL documentation for the entire CXL subsystem, including documentation on CXL related platform and firmware notes - Remove redundant code of cxlctl_get_supported_features() - Series to support CXL RAS Features - Including "Patrol Scrub Control", "Error Check Scrub", "Performance Maitenance" and "Memory Sparing". The series connects CXL to EDAC. * tag 'cxl-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (53 commits) cxl/edac: Add CXL memory device soft PPR control feature cxl/edac: Add CXL memory device memory sparing control feature cxl/edac: Support for finding memory operation attributes from the current boot cxl/edac: Add support for PERFORM_MAINTENANCE command cxl/edac: Add CXL memory device ECS control feature cxl/edac: Add CXL memory device patrol scrub control feature cxl: Update prototype of function get_support_feature_info() EDAC: Update documentation for the CXL memory patrol scrub control feature cxl/features: Remove the inline specifier from to_cxlfs() cxl/feature: Remove redundant code of get supported features docs: ABI: Fix "firwmare" to "firmware" cxl/Documentation: Fix typo in sysfs write_bandwidth attribute path cxl: doc/linux/access-coordinates Update access coordinates calculation methods cxl: docs/platform/acpi/srat Add generic target documentation cxl: docs/platform/cdat reference documentation Documentation: Update the CXL Maturity Map cxl: Sync up the driver-api/cxl documentation cxl: docs - add self-referencing cross-links cxl: docs/allocation/hugepages cxl: docs/allocation/reclaim ... commit 8887abccf8aa16795f23ef3a3b25650cb8aa804c Author: Rafael J. Wysocki Date: Tue Jun 3 18:21:57 2025 +0200 PM: sleep: Add locking to dpm_async_resume_children() Commit 0cbef962ce1f ("PM: sleep: Resume children after resuming the parent") introduced a subtle concurrency issue that may lead to a kernel crash if system suspend is aborted and may also slow down asynchronous device resume otherwise. Namely, the initial list walks in dpm_noirq_resume_devices(), dpm_resume_early(), and dpm_resume() call dpm_clear_async_state() for every device and attempt to asynchronously resume it if it has no children (so it is a "root" device). The asynchronous resume of a root device triggers an attempt to asynchronously resume its children which may take place before calling dpm_clear_async_state() for them due to the lack of synchronization between dpm_async_resume_children() and the code calling dpm_clear_async_state(). If this happens, the dpm_clear_async_state() that comes in late, will clear power.work_in_progress for the given device after it has been set by __dpm_async(), so the suspend callback will be allowed to run once again for the same device during the same transition. This leads to a whole range of interesting breakage. Fortunately, if the suspend transition is not aborted, power.work_in_progress is set by it for all devices, so dpm_async_resume_children() will not schedule asynchronous resume for them until dpm_clear_async_state() clears that flag, but this means missing an opportunity to start the resume of those devices earlier. Address the above issue by adding dpm_list_mtx locking to dpm_async_resume_children(), so it will wait for the entire initial list walk and the invocation of dpm_clear_async_state() for all devices to be completed before scheduling any new asynchronous resume callbacks. Fixes: 0cbef962ce1f ("PM: sleep: Resume children after resuming the parent") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4280 Reported-and-tested-by: Chris Bainbridge Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/13779172.uLZWGnKmhe@rjwysocki.net commit d46c4c839c20a599a0eb8d73708ce401f9c7d06d Author: Rafael J. Wysocki Date: Tue Jun 3 18:19:27 2025 +0200 PM: sleep: Fix power.is_suspended cleanup for direct-complete devices Commit 03f1444016b7 ("PM: sleep: Fix handling devices with direct_complete set on errors") caused power.is_suspended to be set for devices with power.direct_complete set, but it forgot to ensure the clearing of that flag for them in device_resume(), so power.is_suspended is still set for them during the next system suspend-resume cycle. If that cycle is aborted in dpm_suspend(), the subsequent invocation of dpm_resume() will trigger a device_resume() call for every device and because power.is_suspended is set for the devices in question, they will not be skipped by device_resume() as expected which causes scary error messages to be logged (as appropriate). To address this issue, move the clearing of power.is_suspended in device_resume() immediately after the power.is_suspended check so it will be always cleared for all devices processed by that function. Fixes: 03f1444016b7 ("PM: sleep: Fix handling devices with direct_complete set on errors") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4280 Reported-and-tested-by: Chris Bainbridge Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/4990586.GXAFRqVoOG@rjwysocki.net commit 079e8889ad136930617278fbce44b42ef10af9e1 Author: Rafael J. Wysocki Date: Tue Jun 3 18:17:58 2025 +0200 PM: sleep: Fix list splicing in device suspend error paths Commits aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") and 443046d1ad66 ("PM: sleep: Make suspend of devices more asynchronous") added list splicing to the error paths of dpm_suspend(), dpm_suspend_late(), and dpm_noirq_suspend_devices(), but they should have used the list_splice_init() variant because the emptied list is used going forward in all of these cases. Replace list_splice() with list_splice_init() in the code in question as appropriate. Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") Fixes: 443046d1ad66 ("PM: sleep: Make suspend of devices more asynchronous") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4280 Reported-and-tested-by: Chris Bainbridge Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/4659282.LvFx2qVVIh@rjwysocki.net commit a9dfb7db96f7bc1f30feae673aab7fdbfbc94e9c Merge: b546608ea2151e e12d3e1624a027 Author: Linus Torvalds Date: Tue Jun 3 12:52:25 2025 -0700 Merge tag 'backlight-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Framebuffer Subsystem (fbdev): - The display's blanking status is now tracked in 'struct fb_info' - 'framebuffer_alloc()' initializes the blank state to FB_BLANK_UNBLANK - 'register_framebuffer()' sets the state to 'FB_BLANK_POWERDOWN' if an 'fb_blank' callback exists, ensuring 'FB_EVENT_BLANK' listeners correctly see the display being turned on during the first modeset - The 'FB_EVENT_BLANK' event data now includes both the new and the old blank states - 'fb_blank()' has been reworked to return early on errors, without functional changes, in preparation for further state tracking improvements - Fbdev now calls dedicated functions in the backlight subsystems to notify them of blank state changes, instead of relying on fbdev event notifiers - For LCDs, fbdev also calls a dedicated function to notify of mode changes - Removed the definitions for the unused fbdev event constants 'FB_EVENT_MODE_CHANGE' and 'FB_EVENT_BLANK' from the header file Backlight Subsystem: - Implemented fbdev blank state tracking using the (newly enhanced) blank state information provided directly by 'FB_EVENT_BLANK' - Removed internal blank state tracking fields ('fb_bl_on') from 'struct backlight_device' - Moved the handling of blank-state updates into a separate internal helper function, 'backlight_notify_blank()' - Removed support for fbdev events and replaced it with a dedicated function call interface ('backlight_notify_blank()' and 'backlight_notify_blank_all()') for display drivers to update backlight status LCD Subsystem: - Moved the handling of display updates (blank events and mode changes) from fbdev event notifiers to separate internal helper functions ('lcd_notify_blank', 'lcd_notify_mode_change') - Removed support for fbdev events and replaced it with dedicated function call interfaces ('lcd_notify_blank_all()', 'lcd_notify_mode_change_all()') - The LCD subsystem now maintains its own internal list of LCD devices instead of relying on fbdev notifiers LED Backlight Trigger: - Moved the handling of blank-state updates into a separate internal helper, 'ledtrig_backlight_notify_blank()' - Removed support for fbdev events and replaced it with a dedicated function call, 'ledtrig_backlight_blank()', for fbdev to notify trigger of blank state changes - The LED backlight trigger now maintains its own internal list of triggers instead of relying on fbdev notifiers Qualcomm WLED Backlight: - Added a NULL check after 'devm_kasprintf()' in 'wled_configure()' to prevent a potential NULL pointer dereference if memory allocation fails" * tag 'backlight-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pm8941: Add NULL check in wled_configure() fbdev: Remove constants of unused events leds: backlight trigger: Replace fb events with a dedicated function call leds: backlight trigger: Move blank-state handling into helper backlight: lcd: Replace fb events with a dedicated function call backlight: lcd: Move event handling into helpers backlight: Replace fb events with a dedicated function call backlight: Move blank-state handling into helper backlight: Implement fbdev tracking with blank state from event fbdev: Send old blank state in FB_EVENT_BLANK fbdev: Track display blanking state fbdev: Rework fb_blank() commit 8b5f3a229a70d242322b78c8e13744ca00212def Author: Mario Limonciello Date: Wed May 14 16:06:40 2025 -0500 drm/amd/display: Fix default DC and AC levels [Why] DC and AC levels are advertised in a percentage, not a luminance. [How] Scale DC and AC levels to supported values. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4221 Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4b61b8a390511a1864f26cc42bab72881e93468d Author: Mario Limonciello Date: Wed May 14 16:00:43 2025 -0500 drm/amd/display: Add debugging message for brightness caps [Why] Default BIOS brightness caps are buried in ACPI. [How] Add extra dynamic debug that can show default brightness caps. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c73375d918452e58f8903685d30ae21603040709 Author: Cruise Hung Date: Thu May 22 18:02:14 2025 +0800 drm/amd/display: Use DC log instead of using DM error msg [Why & How] It sent an error msg when it failed to read the DP tunneling DPCD field. This should just be a warning msg. Use a DC log instead of a DM error msg. Reviewed-by: Wenjing Liu Signed-off-by: Cruise Hung Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 747bfca45e07b201cf80f3ba7338006f4525aeed Author: Zhongwei Zhang Date: Fri May 16 14:44:21 2025 +0800 drm/amd/display: Avoid calling blank_stream() twice [Why] We've made fix for garbage in dcn31_reset_back_end_for_pipe(), adding blank_stream() before disable_crtc(). And set_dpms_off() will call blank_stream() again. [How] Add flag to avoid calling blank_stream() twice. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Zhongwei Zhang Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 893f07452bca56ff146a6be02b3294a9ea23d18a Author: Zhongwei Zhang Date: Tue May 13 16:45:59 2025 +0800 drm/amd/display: Correct non-OLED pre_T11_delay. [Why] Only OLED panels require non-zero pre_T11_delay defaultly. Others should be controlled by power sequence. [How] For non OLED, pre_T11_delay delay in code should be zero. Also post_T7_delay. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Signed-off-by: Zhongwei Zhang Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e34bcf1594b59f9f63c084bf0646b19edf581adc Author: Arunpravin Paneer Selvam Date: Tue May 27 19:13:20 2025 +0530 drm/amdgpu: Add userq fence support to SDMAv7.0 - Add userq fence support to SDMAv7.0. - GFX12's user fence irq src id differs from GFX11's, hence we need create a new irq srcid header file for GFX12. User fence irq src id information- GFX11 and SDMA6.0 - 0x43 GFX12 and SDMA7.0 - 0x46 Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit 335f1e797c32cbe6f313805125526b35d29280b0 Author: Dan Carpenter Date: Fri May 23 19:09:52 2025 +0300 drm/amdgpu: Fix integer overflow in amdgpu_gem_add_input_fence() The "num_syncobj_handles" is a u32 value that comes from the user via the ioctl. On 32bit systems the "sizeof(uint32_t) * num_syncobj_handles" multiplication can have an integer overflow. Use size_mul() to fix that. Fixes: 38c67ec9aa4b ("drm/amdgpu: Add input fence to sync bo map/unmap") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit a4a45a9a72f3a9eaa17ec502d6e97c8eaa901825 Author: Steven Rostedt Date: Thu May 29 15:22:11 2025 -0400 fsdax: Remove unused trace events for dax insert mapping When the dax_fault_actor() helper was factored out, it removed the calls to the dax_pmd_insert_mapping and dax_insert_mapping events but never removed the events themselves. As each event created takes up memory (roughly 5K each), this is a waste as it is never used. Remove the unused dax_pmd_insert_mapping and dax_insert_mapping trace events. Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/ Cc: Shiyang Ruan Cc: "Darrick J. Wong" Cc: Ross Zwisler Cc: Andrew Morton Link: https://lore.kernel.org/20250529152211.688800c9@gandalf.local.home Fixes: c2436190e492 ("fsdax: factor out a dax_fault_actor() helper") Acked-by: Dan Williams Reviewed-by: Alison Schofield Signed-off-by: Steven Rostedt (Google) commit b546608ea2151eebfca515d362bc400645e02d4f Merge: 69352bd52b2667 b338a2ae9b316d Author: Linus Torvalds Date: Tue Jun 3 12:10:31 2025 -0700 Merge tag 'leds-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "LED Triggers: - Allow writing "default" to the sysfs 'trigger' attribute to set an LED to its default trigger - If the default trigger is "none", writing "default" will remove the current trigger - Updated sysfs ABI documentation for the new "default" trigger functionality LED KUnit Testing: - Provide a skeleton KUnit test suite for the LEDs framework - Expand the LED class device registration KUnit test to cover more scenarios, including 'brightness_get' behavior - Add KUnit tests for the LED lookup and get API ('led_add_lookup', 'devm_led_get') LED Flash Class: - Add support for setting flash/strobe duration through a new 'duration_set' op and 'led_set_flash_duration()' function, aligning with 'V4L2_CID_FLASH_DURATION' Texas Instruments TPS6131x: - Add a new driver for the TPS61310/TPS61311 flash LED controllers - The driver supports the device's three constant-current sinks for flash and torch modes LED Core: - Prevent potential 'snprintf()' truncations in LED names by checking for buffer overflows ChromeOS EC LEDs: - Avoid a -Wflex-array-member-not-at-end GCC warning by replacing an on-stack flexible structure definition with a utility function call Multicolor LEDs: - Fix issue where setting multi_intensity while software blinking is active could stop blinking PCA955x LEDs: - Avoid potential buffer overflow when creating default labels by changing a field's type to 'u8' and updating format specifiers PCA995x LEDs: - Fix a typo (stray space) in an 'of_device_id' entry in the 'pca995x_of_match' table Kconfig: - Prevent LED drivers from being enabled by default when 'COMPILE_TEST' is set Device Property API: - Split 'device_get_child_node_count()' into a new helper 'fwnode_get_child_node_count()' that doesn't require a device struct, making the API more symmetrical Driver Modernization (using 'fwnode_get_child_node_count()'): - Update 'leds-pwm-multicolor', 'leds-ncp5623' and 'leds-ncp5623' to use the new 'fwnode_get_child_node_count()' helper, removing their custom implementation - As above in the USB Type-C TCPM driver Driver Modernization (using new GPIO setter callbacks): - Convert 'leds-lgm-sso' to use new GPIO line value setter callbacks which return an integer for error handling - Convert 'leds-pca955x', 'leds-pca9532' and 'leds-tca6507' to use new GPIO setter callbacks Documentation: - Remove the '.rst' extension for 'leds-st1202' in the documentation index for consistency LP8860 LEDs: - Use 'regmap_multi_reg_write()' for EEPROM writes instead of manual looping - Use scoped mutex guards and 'devm_mutex_init()' to simplify function exits and ensure automatic cleanup - Remove default register definitions that are unused when regmap caching is not active - Use 'devm_regulator_get_enable_optional()' to handle the optional regulator, simplifying enabling and removing manual disabling - Refactor 'lp8860_unlock_eeprom()' to only perform the unlock operation, removing the lock part and an unnecessary parameter - Use a 'devm' action to disable the enable-GPIO, simplifying cleanup and error paths, and remove the now-empty '.remove()' function Turris Omnia LEDs: - Drop unnecessary commas in terminator entries of 'struct attribute' and 'struct of_device_id' arrays MT6370 RGB LEDs: - Use the 'LINEAR_RANGE()' for defining 'struct linear_range' entries to improve robustness Texas Instruments TPS6131x: - Add new devicetree bindings for the TI TPS61310/TPS61311 flash LED driver" * tag 'leds-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (31 commits) leds: tps6131x: Add support for Texas Instruments TPS6131X flash LED driver dt-bindings: leds: Add Texas Instruments TPS6131x flash LED driver leds: flash: Add support for flash/strobe duration leds: rgb: leds-mt6370-rgb: Improve definition of some struct linear_range leds: led-test: Provide tests for the lookup and get infrastructure leds: led-test: Fill out the registration test to cover more test cases leds: led-test: Remove standard error checking after KUNIT_ASSERT_*() leds: pca995x: Fix typo in pca995x_of_match's of_device_id entry leds: Provide skeleton KUnit testing for the LEDs framework leds: tca6507: Use new GPIO line value setter callbacks leds: pca9532: Use new GPIO line value setter callbacks leds: pca955x: Use new GPIO line value setter callbacks leds: lgm-sso: Use new GPIO line value setter callbacks leds: Do not enable by default during compile testing leds: turris-omnia: Drop commas in the terminator entries leds: lp8860: Disable GPIO with devm action leds: lp8860: Only unlock in lp8860_unlock_eeprom() leds: lp8860: Enable regulator using enable_optional helper leds: lp8860: Remove default regs when not caching leds: lp8860: Use new mutex guards to cleanup function exits ... commit 98a46a408998102af5c45adce0871acd7967bb59 Author: Dan Carpenter Date: Fri May 23 19:05:58 2025 +0300 drm/amdgpu: Fix integer overflow issues in amdgpu_userq_fence.c This patch only affects 32bit systems. There are several integer overflows bugs here but only the "sizeof(u32) * num_syncobj" multiplication is a problem at runtime. (The last lines of this patch). These variables are u32 variables that come from the user. The issue is the multiplications can overflow leading to us allocating a smaller buffer than intended. For the first couple integer overflows, the syncobj_handles = memdup_user() allocation is immediately followed by a kmalloc_array(): syncobj = kmalloc_array(num_syncobj_handles, sizeof(*syncobj), GFP_KERNEL); In that situation the kmalloc_array() works as a bounds check and we haven't accessed the syncobj_handlesp[] array yet so the integer overflow is harmless. But the "num_syncobj" multiplication doesn't have that and the integer overflow could lead to an out of bounds access. Fixes: a292fdecd728 ("drm/amdgpu: Implement userqueue signal/wait IOCTL") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 5cccf10f652122a17b40df9d672ccf2ed69cd82f Author: Alex Deucher Date: Tue May 27 10:13:31 2025 -0400 drm/amdgpu: disable workload profile switching when OD is enabled Users have reported that they have to reduce the level of undervolting to acheive stability when dynamic workload profiles are enabled on GC 10.3.x. Disable dynamic workload profiles if the user has enabled OD. Fixes: b9467983b774 ("drm/amdgpu: add dynamic workload profile switching for gfx10") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4262 Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.15.x commit d26625d034fb8d596f0488472969493fa02d03f3 Author: Vitaly Prosyak Date: Tue May 6 16:45:33 2025 -0400 drm/amdgpu/gfx10: Refine Cleaner Shader for GFX10.1.10 This patch updates the cleaner shader, which is responsible for initializing GPU resources such as Local Data Share (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs). Changes include adjustments to register clearing and shader configuration. - Updated GPU resource initialization addresses in the cleaner shader from `be803080` to `be803000`. - Simplified the logic in the SGPR clearing section, ensuring all SGPRs are set to zero. Fixes: 25961bad9212 ("drm/amdgpu/gfx10: Add cleaner shader for GFX10.1.10") Cc: Christian König Cc: Alex Deucher Signed-off-by: Manu Rastogi Signed-off-by: Vitaly Prosyak Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 719d84f8a812608fc0f7be18a96d7dee96eaf3ba Author: Lijo Lazar Date: Thu May 29 15:57:44 2025 +0530 drm/amdgpu: Add more checks to discovery fetch Add more checks for valid vram size and log error, if any. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e696906e9a82d4cab75f3083fabd65433c77e20 Author: Xuemei Liu Date: Thu May 29 10:25:11 2025 +0800 drm/amdkfd: enable kfd on RISCV systems KFD has been confirmed that can run on RISCV systems. It's necessary to support CONFIG_HSA_AMD on RISCV. Signed-off-by: Xuemei Liu Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 69352bd52b2667e5c6e8ebb14143528c28f5e37d Merge: 2043ae9019e0f7 ffb006aa433e81 Author: Linus Torvalds Date: Tue Jun 3 11:53:55 2025 -0700 Merge tag 'mfd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Samsung Exynos ACPM: - Populate child platform devices from device tree data - Introduce a new API, 'devm_acpm_get_by_node()', for child devices to get the ACPM handle ROHM PMICs: - Add support for the ROHM BD96802 scalable companion PMIC to the BD96801 core driver - Add support for controlling the BD96802 using the BD96801 regulator driver - Add support to the BD96805, which is almost identical to the BD96801 - Add support to the BD96806, which is similar to the BD96802 Maxim MAX77759: - Add a core driver for the MAX77759 companion PMIC - Add a GPIO driver for the expander functions on the MAX77759 - Add an NVMEM driver to expose the non-volatile memory on the MAX77759 STMicroelectronics STM32MP25: - Add support for the STM32MP25 SoC to the stm32-lptimer - Add support for the STM32MP25 to the clocksource driver, handling new register access requirements - Add support for the STM32MP25 to the PWM driver, enabling up to two PWM outputs Broadcom BCM590xx: - Add support for the BCM59054 PMU - Parse the PMU ID and revision to support behavioral differences between chip revisions - Add regulator support for the BCM59054 Samsung S2MPG10: - Add support for the S2MPG10 PMIC, which communicates via the Samsung ACPM firmware instead of I2C Exynos ACPM: - Improve timeout detection reliability by using ktime APIs instead of a loop counter assumption - Allow PMIC access during late system shutdown by switching to 'udelay()' instead of a sleeping function - Fix an issue where reading command results longer than 8 bytes would fail - Silence non-error '-EPROBE_DEFER' messages during boot to clean up logs Exynos LPASS: - Fix an error handling path by switching to 'devm_regmap_init_mmio()' to prevent resource leaks - Fix a bug where 'exynos_lpass_disable()' was called twice in the remove function - Fix another resource leak in the probe's error path by using 'devm_add_action_or_reset()' Samsung SEC: - Handle the s2dos05, which does not have IRQ support, explicitly to prevent warnings - Fix the core driver to correctly handle errors from 'sec_irq_init()' instead of ignoring them STMPE-SPI: - Correct an undeclared identifier in the 'MODULE_DEVICE_TABLE' macro MAINTAINERS: - Adjust a file path for the Siemens IPC LED drivers entry to fix a broken reference Maxim Drivers: - Correct the spelling of "Electronics" in Samsung copyright headers across multiple files General: - Fix wakeup source memory leaks on device unbind for 88pm886, as3722, max14577, max77541, max77705, max8925, rt5033, and sprd-sc27xx drivers Samsung SEC Drivers: - Split the driver into a transport-agnostic core ('sec-core') and transport-specific ('sec-i2c', 'sec-acpm') modules to support non-I2C devices - Merge the 'sec-core' and 'sec-irq' modules to reduce memory consumption - Move internal APIs to a private header to clean up the public API - Improve code style by sorting includes, cleaning up headers, sorting device tables, and using helper macros like 'dev_err_probe()', 'MFD_CELL', and 'REGMAP_IRQ_REG' - Make regmap configuration for s2dos05/s2mpu05 explicit to improve clarity - Rework platform data and regmap instantiation to use OF match data instead of a large switch statement ROHM BD96801/2: - Prepare the driver for new models by separating chip-specific data into its own structure - Drop IC name prefix from IRQ resource names in both the MFD and regulator drivers for simplification Broadcom BCM590xx: - Refactor the regulator driver to store descriptions in a table to ease support for new chips - Rename BCM59056-specific data to prepare for the addition of other regulators - Use 'dev_err_probe()' for cleaner error handling Exynos ACPM: - Correct kerneldoc warnings and use the conventional 'np' argument name General MFD: - Convert 'aat2870' and 'tps65010' to use the per-client debugfs directory provided by the I2C core - Convert 'sm501', 'tps65010' and 'ucb1x00' to use the new GPIO line value setter callbacks - Constify 'regmap_irq_chip' and other structures in '88pm886' to move data to read-only sections BCM590xx: - Drop the unused "id" member from the 'bcm590xx' struct in preparation for a replacement Samsung SEC Core: - Remove forward declarations for functions that no longer exist SM501: - Remove the unused 'sm501_find_clock()' function New Compatibles: - Google: Add a PMIC child node to the 'google,gs101-acpm-ipc' binding - ROHM: Add new bindings for 'rohm,bd96802-regulator' and 'rohm,bd96802-pmic', and add compatibles for BD96805 and BD96806 - Maxim: Add new bindings for 'maxim,max77759-gpio', 'maxim,max77759-nvmem', and the top-level 'maxim,max77759' - STM: Add 'stm32mp25' compatible to the 'stm32-lptimer' binding - Broadcom: Add 'bcm59054' compatible - Atmel/Microchip: Add 'microchip,sama7d65-gpbr' and 'microchip,sama7d65-secumod' compatibles - Samsung: Add 's2mpg10' compatible to the 'samsung,s2mps11' MFD binding - MediaTek: Add compatibles for 'mt6893' (scpsys), 'mt7988-topmisc', and 'mt8365-infracfg-nao' - Qualcomm: Add 'qcom,apq8064-mmss-sfpb' and 'qcom,apq8064-sps-sic' syscon compatibles Refactoring & Cleanup: - Convert Broadcom BCM59056 devicetree bindings to YAML and split them into MFD and regulator parts - Convert the Microchip AT91 secumod binding to YAML - Drop unrelated consumer nodes from binding examples to reduce bloat - Correct indentation and style in various DTS examples" * tag 'mfd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (81 commits) mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers mfd: maxim: Correct Samsung "Electronics" spelling in headers mfd: sm501: Remove unused sm501_find_clock mfd: 88pm886: Constify struct regmap_irq_chip and some other structures dt-bindings: mfd: syscon: Add mediatek,mt8365-infracfg-nao mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind mfd: rt5033: Fix wakeup source leaks on device unbind mfd: max8925: Fix wakeup source leaks on device unbind mfd: max77705: Fix wakeup source leaks on device unbind mfd: max77541: Fix wakeup source leaks on device unbind mfd: max14577: Fix wakeup source leaks on device unbind mfd: as3722: Fix wakeup source leaks on device unbind mfd: 88pm886: Fix wakeup source leaks on device unbind dt-bindings: mfd: Correct indentation and style in DTS example dt-bindings: mfd: Drop unrelated nodes from DTS example dt-bindings: mfd: syscon: Add qcom,apq8064-sps-sic dt-bindings: mfd: syscon: Add qcom,apq8064-mmss-sfpb mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE dt-bindings: mfd: syscon: Add mt7988-topmisc mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe() ... commit c09a8b00f850d3ca0af998bff1fac4a3f6d11768 Author: Caleb Sander Mateos Date: Tue Jun 3 12:31:32 2025 -0600 block: drop direction param from bio_integrity_copy_user() direction is determined from bio, which is already passed in. Compute op_is_write(bio_op(bio)) directly instead of converting it to an iter direction and back to a bool. Signed-off-by: Caleb Sander Mateos Reviewed-by: Keith Busch Reviewed-by: Anuj Gupta Link: https://lore.kernel.org/r/20250603183133.1178062-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 9960be72a54cf0e4d47abdd4cacd1278835a3bb4 Author: Andrea Righi Date: Tue Jun 3 10:22:01 2025 +0200 sched_ext: idle: Skip cross-node search with !CONFIG_NUMA In the idle CPU selection logic, attempting cross-node searches adds unnecessary complexity when CONFIG_NUMA is disabled. Since there's no meaningful concept of nodes in this case, simplify the logic by restricting the idle CPU search to the current node only. Fixes: 48849271e6611 ("sched_ext: idle: Per-node idle cpumasks") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 2043ae9019e0f75c7785048230586c3f3ca0a2a4 Merge: efe19d34f6361c c48228c476ffe3 Author: Linus Torvalds Date: Tue Jun 3 10:34:36 2025 -0700 Merge tag 'hid-for-linus-2025060301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - support for Apple Magic Mouse 2 USB-C (Aditya Garg) - power management improvement for multitouch devices (Werner Sembach) - fix for ACPI initialization in intel-thc driver (Wentao Guan) - adaptation of HID drivers to use new gpio_chip's line setter callbacks (Bartosz Golaszewski) - fix potential OOB in usbhid_parse() (Terry Junge) - make it possible to set hid_mouse_ignore_list dynamically (the same way we handle other quirks) (Aditya Garg) - other small assorted fixes and device ID additions * tag 'hid-for-linus-2025060301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: multitouch: Disable touchpad on firmware level while not in use HID: core: Add functions for HID drivers to react on first open and last close call HID: HID_APPLETB_BL should depend on X86 HID: HID_APPLETB_KBD should depend on X86 HID: appletb-kbd: Use secs_to_jiffies() instead of msecs_to_jiffies() HID: intel-thc-hid: intel-thc: make read-only arrays static const HID: magicmouse: Apple Magic Mouse 2 USB-C support HID: mcp2221: use new line value setter callbacks HID: mcp2200: use new line value setter callbacks HID: cp2112: use new line value setter callbacks HID: cp2112: use lock guards HID: cp2112: hold the lock for the entire direction_output() call HID: cp2112: destroy mutex on driver detach HID: intel-thc-hid: intel-quicki2c: pass correct arguments to acpi_evaluate_object HID: corsair-void: Use to_delayed_work() HID: hid-logitech: use sysfs_emit_at() instead of scnprintf() HID: quirks: Add HID_QUIRK_IGNORE_MOUSE quirk HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() HID: Kysona: Add periodic online check commit 9f2f6316d753fe80c764e924cee475306f38ceb6 Author: Mikulas Patocka Date: Tue Jun 3 18:58:47 2025 +0200 dm-stripe: small code cleanup This commit doesn't fix any bug, it is just code cleanup. Use the function format_dev_t instead of sprintf, because format_dev_t does the same thing. Remove the useless memset call. An unsigned integer can take at most 10 digits, so extend the array size to 22. (note that because the range of minor and major numbers is limited, the size 16 could not be exceeded, thus this function couldn't write beyond string end) Signed-off-by: Mikulas Patocka commit 66be40a14e496689e1f0add50118408e22c96169 Author: Mikulas Patocka Date: Tue Jun 3 18:55:50 2025 +0200 dm-verity: fix a memory leak if some arguments are specified multiple times If some of the arguments "check_at_most_once", "ignore_zero_blocks", "use_fec_from_device", "root_hash_sig_key_desc" were specified more than once on the target line, a memory leak would happen. This commit fixes the memory leak. It also fixes error handling in verity_verify_sig_parse_opt_args. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org commit 829451beaed6165eb11d7a9fb4e28eb17f489980 Author: Mikulas Patocka Date: Tue Jun 3 18:53:17 2025 +0200 dm-mirror: fix a tiny race condition There's a tiny race condition in dm-mirror. The functions queue_bio and write_callback grab a spinlock, add a bio to the list, drop the spinlock and wake up the mirrord thread that processes bios in the list. It may be possible that the mirrord thread processes the bio just after spin_unlock_irqrestore is called, before wakeup_mirrord. This spurious wake-up is normally harmless, however if the device mapper device is unloaded just after the bio was processed, it may be possible that wakeup_mirrord(ms) uses invalid "ms" pointer. Fix this bug by moving wakeup_mirrord inside the spinlock. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org commit 120f28a6f314fef7f282c99f196923fe44081cad Author: Przemek Kitszel Date: Fri Apr 4 12:23:21 2025 +0200 iavf: get rid of the crit lock Get rid of the crit lock. That frees us from the error prone logic of try_locks. Thanks to netdev_lock() by Jakub it is now easy, and in most cases we were protected by it already - replace crit lock by netdev lock when it was not the case. Lockdep reports that we should cancel the work under crit_lock [splat1], and that was the scheme we have mostly followed since [1] by Slawomir. But when that is done we still got into deadlocks [splat2]. So instead we should look at the bigger problem, namely "weird locking/scheduling" of the iavf. The first step to fix that is to remove the crit lock. I will followup with a -next series that simplifies scheduling/tasks. Cancel the work without netdev lock (weird unlock+lock scheme), to fix the [splat2] (which would be totally ugly if we would kept the crit lock). Extend protected part of iavf_watchdog_task() to include scheduling more work. Note that the removed comment in iavf_reset_task() was misplaced, it belonged to inside of the removed if condition, so it's gone now. [splat1] - w/o this patch - The deadlock during VF removal: WARNING: possible circular locking dependency detected sh/3825 is trying to acquire lock: ((work_completion)(&(&adapter->watchdog_task)->work)){+.+.}-{0:0}, at: start_flush_work+0x1a1/0x470 but task is already holding lock: (&adapter->crit_lock){+.+.}-{4:4}, at: iavf_remove+0xd1/0x690 [iavf] which lock already depends on the new lock. [splat2] - when cancelling work under crit lock, w/o this series, see [2] for the band aid attempt WARNING: possible circular locking dependency detected sh/3550 is trying to acquire lock: ((wq_completion)iavf){+.+.}-{0:0}, at: touch_wq_lockdep_map+0x26/0x90 but task is already holding lock: (&dev->lock){+.+.}-{4:4}, at: iavf_remove+0xa6/0x6e0 [iavf] which lock already depends on the new lock. [1] fc2e6b3b132a ("iavf: Rework mutexes for better synchronisation") [2] https://github.com/pkitszel/linux/commit/52dddbfc2bb60294083f5711a158a Fixes: d1639a17319b ("iavf: fix a deadlock caused by rtnl and driver's lock circular dependencies") Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 05702b5c949bd46243181833d4726f4c5e95f5e3 Author: Przemek Kitszel Date: Fri Apr 4 12:23:20 2025 +0200 iavf: sprinkle netdev_assert_locked() annotations Lockdep annotations help in general, but here it is extra good, as next commit will remove crit lock. Reviewed-by: Jacob Keller Signed-off-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 257a8241ad7f4dc312494f69e3bc79a5598b4514 Author: Przemek Kitszel Date: Fri Apr 4 12:23:19 2025 +0200 iavf: extract iavf_watchdog_step() out of iavf_watchdog_task() Finish up easy refactor of watchdog_task, total for this + prev two commits is: 1 file changed, 47 insertions(+), 82 deletions(-) Signed-off-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit ecb4cd0461accc446d20a7a167f39ed2fd5e9b0e Author: Przemek Kitszel Date: Fri Apr 4 12:23:18 2025 +0200 iavf: simplify watchdog_task in terms of adminq task scheduling Simplify the decision whether to schedule adminq task. The condition is the same, but it is executed in more scenarios. Note that movement of watchdog_done label makes this commit a bit surprising. (Hence not squashing it to anything bigger). Reviewed-by: Jacob Keller Signed-off-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 099418da91b7d3d46ddcccbb03075cc4f1ba2d44 Author: Przemek Kitszel Date: Fri Apr 4 12:23:17 2025 +0200 iavf: centralize watchdog requeueing itself Centralize the unlock(critlock); unlock(netdev); queue_delayed_work(watchog_task); pattern to one place. Reviewed-by: Jacob Keller Signed-off-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit dba35a4bb4a3da5696f2a179b7d695dc3ea25fb8 Author: Przemek Kitszel Date: Fri Apr 4 12:23:16 2025 +0200 iavf: iavf_suspend(): take RTNL before netdev_lock() Fix an obvious violation of lock ordering. Jakub's [1] added netdev_lock() call that is wrong ordered wrt RTNL, but the Fixes tag points to crit_lock being wrongly placed (by lockdep standards). Actual reason we got it wrong is dated back to critical section managed by pure flag checks, which is with us since the very beginning. [1] afc664987ab3 ("eth: iavf: extend the netdev_lock usage") Fixes: 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections") Reviewed-by: Jacob Keller Signed-off-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit efe19d34f6361c6fc90a2c249796af929db7d4a8 Merge: 76c21d22546978 a374cfbf609017 Author: Linus Torvalds Date: Tue Jun 3 09:42:38 2025 -0700 Merge tag 'ata-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata updates from Damien Le Moal: - Simplify ata_print_version_once() using dev_dbg_once() (Heiner) - Some cleanups of libata-sata code to simplify the sense data fetching code and use BIT() macro for tag bit handling (Niklas) - Fix variable name spelling in the sata_sx4 driver (Colin) - Improve sense data information field handling for passthrough commands (Igor) - Add Rockchip RK3576 SoC compatible to the Designware AHCI DT bindings (Nicolas) - Add a message to indicate if a port is marked as external or not, to help with debugging potential issues with LPM (Niklas) - Convert DT bindings for "ti,dm816-ahci", "apm,xgene-ahci", "cavium,ebt3000-compact-flash", "marvell,orion-sata", and "arasan,cf-spear1340" to DT schema (Rob) - Cleanup and improve the code and related comments for HIPM and DIPM (host initiated and device initiated power managent) handling. In particular, keep DIPM disabled while modifying the allowed LPM states to avoid races with the device initiating power state changes (Niklas) * tag 'ata-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-eh: Keep DIPM disabled while modifying the allowed LPM states ata: libata-eh: Rename no_dipm variable to be more clear ata: libata-eh: Rename hipm and dipm variables ata: libata-eh: Add ata_eh_set_lpm() WARN_ON_ONCE ata: libata-eh: Update DIPM comments to reflect reality dt-bindings: ata: Convert arasan,cf-spear1340 to DT schema dt-bindings: ata: Convert marvell,orion-sata to DT schema dt-bindings: ata: Convert cavium,ebt3000-compact-flash to DT schema dt-bindings: ata: Convert apm,xgene-ahci to DT schema dt-bindings: ata: Convert st,ahci to DT schema dt-bindings: ata: Convert ti,dm816-ahci to DT schema ata: libata: Print if port is external on boot dt-bindings: ata: rockchip-dwc-ahci: add RK3576 compatible ata: libata-scsi: Do not set the INFORMATION field twice for ATA PT ata: sata_sx4: Fix spelling mistake "parttern" -> "pattern" ata: libata-sata: Use BIT() macro to convert tag to bit field ata: libata-sata: Simplify sense_valid fetching ata: libata-core: Simplify ata_print_version_once commit 76c21d225469780a005140037b6248e648f41ae4 Merge: f5164456c604f6 46d40b2479ab64 Author: Linus Torvalds Date: Tue Jun 3 09:11:26 2025 -0700 Merge tag 'hwmon-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - KEBA fan controller - KEBA battery monitoring controller - MAX77705 Support added to existing drivers: - MAXIMUS VI HERO and ROG MAXIMUS Z90 Formula support (asus-ec-sensors) - SQ52206 support (ina238) - lt3074 support (pmbus/lt3074) - ADPM12160 support (pmbus/max34440) - MPM82504 and for MPM3695 family support (pmbus/mpq8785) - Add the Dell OptiPlex 7050 to the DMI whitelist (dell-smm) - Zen5 Ryzen Desktop support (k10temp) Various other minor fixes and improvements" * tag 'hwmon-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (48 commits) doc: hwmon: acpi_power_meter: Add information about enabling the power capping feature. hwmon: (isl28022) Fix current reading calculation hwmon: (lm75) Fix I3C transfer buffer pointer for incoming data hwmon: Add KEBA fan controller support hwmon: pmbus: mpq8785: Add support for MPM3695 family hwmon: pmbus: mpq8785: Add support for MPM82504 hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configuration hwmon: pmbus: mpq8785: Prepare driver for multiple device support dt-bindings: hwmon: Add bindings for mpq8785 driver hwmon: (ina238) Modify the calculation formula to adapt to different chips hwmon: (ina238) Add support for SQ52206 dt-bindings: Add SQ52206 to ina2xx devicetree bindings hwmon: (ina238) Add ina238_config to save configurations for different chips hwmon: (ausus-ec-sensors) add MAXIMUS VI HERO. hwmon: (isl28022, nct7363) Convert to use maple tree register cache hwmon: (asus-ec-sensors) check sensor index in read_string() hwmon: (asus-ec-sensors) add ROG MAXIMUS Z90 Formula. dt-bindings: hwmon: Add Sophgo SG2044 external hardware monitor support hwmon: (max77705) Add initial support hwmon: (tmp102) add vcc regulator support ... commit f5164456c604f6b7cdc5d8ee2cf792b10fba3aa2 Merge: c00b28502470b7 3d6d238851dff5 Author: Linus Torvalds Date: Tue Jun 3 09:05:01 2025 -0700 Merge tag 'xtensa-20250603' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa updates from Max Filippov: - migrate to the generic rule for built-in DTB - cleanups in code and common_defconfig * tag 'xtensa-20250603' of https://github.com/jcmvbkbc/linux-xtensa: arch: xtensa: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX xtensa: migrate to the generic rule for built-in DTB xtensa: ptrace: Remove zero-length alignment array commit b7188a1c0d2d7b04f4558e10293651d49fcb2398 Author: Amadeusz Sławiński Date: Tue Jun 3 16:52:44 2025 +0200 ASoC: Intel: avs: boards: Fix rt5663 front end name Fix copy paste mistake in board name. Fixes: f1e282c333ac ("ASoC: Intel: avs: boards: Change rt5663 card name") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20250603145244.871239-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit c00b28502470b7677c2f4ee2e9c899205fa78e27 Merge: 04446eee58fcb2 96959283a58d91 Author: Linus Torvalds Date: Tue Jun 3 08:39:20 2025 -0700 Merge tag 'hyperv-next-signed-20250602' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - Support for Virtual Trust Level (VTL) on arm64 (Roman Kisel) - Fixes for Hyper-V UIO driver (Long Li) - Fixes for Hyper-V PCI driver (Michael Kelley) - Select CONFIG_SYSFB for Hyper-V guests (Michael Kelley) - Documentation updates for Hyper-V VMBus (Michael Kelley) - Enhance logging for hv_kvp_daemon (Shradha Gupta) * tag 'hyperv-next-signed-20250602' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (23 commits) Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests Drivers: hv: vmbus: Add comments about races with "channels" sysfs dir Documentation: hyperv: Update VMBus doc with new features and info PCI: hv: Remove unnecessary flex array in struct pci_packet Drivers: hv: Remove hv_alloc/free_* helpers Drivers: hv: Use kzalloc for panic page allocation uio_hv_generic: Align ring size to system page uio_hv_generic: Use correct size for interrupt and monitor pages Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary arch/x86: Provide the CPU number in the wakeup AP callback x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap() PCI: hv: Get vPCI MSI IRQ domain from DeviceTree ACPI: irq: Introduce acpi_get_gsi_dispatcher() Drivers: hv: vmbus: Introduce hv_get_vmbus_root_device() Drivers: hv: vmbus: Get the IRQ number from DeviceTree dt-bindings: microsoft,vmbus: Add interrupt and DMA coherence properties arm64, x86: hyperv: Report the VTL the system boots in arm64: hyperv: Initialize the Virtual Trust Level field Drivers: hv: Provide arch-neutral implementation of get_vtl() Drivers: hv: Enable VTL mode for arm64 ... commit 04446eee58fcb2a6c9db5abff7f07cc2f38da9d0 Merge: 8b2198f03776c5 b9802b54d41bbe Author: Linus Torvalds Date: Tue Jun 3 08:03:45 2025 -0700 Merge tag 'v6.16-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix a loongarch header regression and a module name collision on s390" * tag 'v6.16-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: asm-generic: Add sched.h inclusion in simd.h crypto: s390/sha256 - rename module to sha256-s390 commit 8b2198f03776c5c25f0cafe0ba5c0c60807b554b Merge: 546b1c9e93c2bb 895ee6a22e3195 Author: Linus Torvalds Date: Tue Jun 3 07:39:23 2025 -0700 Merge tag 'bitmap-for-6.16-rc1' of https://github.com/norov/linux Pull bitmap updates from Yury Norov: - dead code cleanups for cpumasks and nodemasks (me) - fixed-width flavors of GENMASK() and BIT() (Vincent, Lucas and me) - FIELD_MODIFY() helper (Luo) - for_each_node_with_cpus() optimization (me) - bitmap-str fixes (Andy) * tag 'bitmap-for-6.16-rc1' of https://github.com/norov/linux: topology: make for_each_node_with_cpus() O(N) bitfield: Add FIELD_MODIFY() helper bitmap-str: Add missing header(s) bitmap-str: Get rid of 'extern' for function prototypes build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO() test_bits: add tests for BIT_U*() test_bits: add tests for GENMASK_U*() drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*() bits: introduce fixed-type BIT_U*() bits: introduce fixed-type GENMASK_U*() bits: add comments and newlines to #if, #else and #endif directives cpumask: drop cpumask_assign_cpu() riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu() cpumask: add non-atomic __assign_cpu() nodemask: drop nodes_shift commit 8b68e978718f14fdcb080c2a7791c52a0d09bc6d Author: Thomas Gleixner Date: Wed Feb 26 16:01:57 2025 +0100 x86/iopl: Cure TIF_IO_BITMAP inconsistencies io_bitmap_exit() is invoked from exit_thread() when a task exists or when a fork fails. In the latter case the exit_thread() cleans up resources which were allocated during fork(). io_bitmap_exit() invokes task_update_io_bitmap(), which in turn ends up in tss_update_io_bitmap(). tss_update_io_bitmap() operates on the current task. If current has TIF_IO_BITMAP set, but no bitmap installed, tss_update_io_bitmap() crashes with a NULL pointer dereference. There are two issues, which lead to that problem: 1) io_bitmap_exit() should not invoke task_update_io_bitmap() when the task, which is cleaned up, is not the current task. That's a clear indicator for a cleanup after a failed fork(). 2) A task should not have TIF_IO_BITMAP set and neither a bitmap installed nor IOPL emulation level 3 activated. This happens when a kernel thread is created in the context of a user space thread, which has TIF_IO_BITMAP set as the thread flags are copied and the IO bitmap pointer is cleared. Other than in the failed fork() case this has no impact because kernel threads including IO workers never return to user space and therefore never invoke tss_update_io_bitmap(). Cure this by adding the missing cleanups and checks: 1) Prevent io_bitmap_exit() to invoke task_update_io_bitmap() if the to be cleaned up task is not the current task. 2) Clear TIF_IO_BITMAP in copy_thread() unconditionally. For user space forks it is set later, when the IO bitmap is inherited in io_bitmap_share(). For paranoia sake, add a warning into tss_update_io_bitmap() to catch the case, when that code is invoked with inconsistent state. Fixes: ea5f1cd7ab49 ("x86/ioperm: Remove bitmap if all permissions dropped") Reported-by: syzbot+e2b1803445d236442e54@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/87wmdceom2.ffs@tglx commit 7eb11c0ab70777b9e5145a5ba1c0a2312c3980b2 Author: Sabrina Dubroca Date: Fri May 23 17:11:18 2025 +0200 xfrm: state: use a consistent pcpu_id in xfrm_state_find If we get preempted during xfrm_state_find, we could run xfrm_state_look_at using a different pcpu_id than the one xfrm_state_find saw. This could lead to ignoring states that should have matched, and triggering acquires on a CPU that already has a pcpu state. xfrm_state_find starts on CPU1 pcpu_id = 1 lookup starts xfrm_state_look_at pcpu_id = 2 finds a state found: best->pcpu_num != pcpu_id (2 != 1) if (!x && !error && !acquire_in_progress) { ... xfrm_state_alloc xfrm_init_tempstate ... This can be avoided by passing the original pcpu_id down to all xfrm_state_look_at() calls. Also switch to raw_smp_processor_id, disabling preempting just to re-enable it immediately doesn't really make sense. Fixes: 1ddf9916ac09 ("xfrm: Add support for per cpu xfrm state handling.") Signed-off-by: Sabrina Dubroca Reviewed-by: Florian Westphal Signed-off-by: Steffen Klassert commit 94d077c331730510d5611b438640a292097341f0 Author: Sabrina Dubroca Date: Fri May 23 17:11:17 2025 +0200 xfrm: state: initialize state_ptrs earlier in xfrm_state_find In case of preemption, xfrm_state_look_at will find a different pcpu_id and look up states for that other CPU. If we matched a state for CPU2 in the state_cache while the lookup started on CPU1, we will jump to "found", but the "best" state that we got will be ignored and we will enter the "acquire" block. This block uses state_ptrs, which isn't initialized at this point. Let's initialize state_ptrs just after taking rcu_read_lock. This will also prevent a possible misuse in the future, if someone adjusts this function. Reported-by: syzbot+7ed9d47e15e88581dc5b@syzkaller.appspotmail.com Fixes: e952837f3ddb ("xfrm: state: fix out-of-bounds read during lookup") Signed-off-by: Sabrina Dubroca Reviewed-by: Florian Westphal Signed-off-by: Steffen Klassert commit 9c7e8b31da035fe81399891b2630a8e0c4b09137 Author: Antonio Quartulli Date: Thu May 22 15:33:18 2025 +0200 selftest/net/ovpn: fix missing file test-large-mtu.sh is referenced by the Makefile but does not exist. Add it along the other scripts. Fixes: 944f8b6abab6 ("selftest/net/ovpn: extend coverage with more test cases") Signed-off-by: Antonio Quartulli commit fdf4064aaebe4379e6d441141bed83d51b52ad04 Author: Antonio Quartulli Date: Tue May 20 16:42:39 2025 +0200 selftest/net/ovpn: fix TCP socket creation TCP sockets cannot be created with AF_UNSPEC, but one among the supported family must be used. Since commit 944f8b6abab6 ("selftest/net/ovpn: extend coverage with more test cases") the default address family for all tests was changed from AF_INET to AF_UNSPEC, thus breaking all TCP cases. Restore AF_INET as default address family for TCP listeners. Fixes: 944f8b6abab6 ("selftest/net/ovpn: extend coverage with more test cases") Signed-off-by: Antonio Quartulli commit a6a5e87b3ee4cbf9c69a776565378c9b6a91dbfb Author: Antonio Quartulli Date: Wed May 28 00:01:10 2025 +0200 ovpn: avoid sleep in atomic context in TCP RX error path Upon error along the TCP data_ready event path, we have the following chain of calls: strp_data_ready() ovpn_tcp_rcv() ovpn_peer_del() ovpn_socket_release() Since strp_data_ready() may be invoked from softirq context, and ovpn_socket_release() may sleep, the above sequence may cause a sleep in atomic context like the following: BUG: sleeping function called from invalid context at ./ovpn-backports-ovpn-net-next-main-6.15.0-rc5-20250522/drivers/net/ovpn/socket.c:71 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 25, name: ksoftirqd/3 5 locks held by ksoftirqd/3/25: #0: ffffffe000cd0580 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb+0xb8/0x5b0 OpenVPN/ovpn-backports#1: ffffffe000cd0580 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb+0xb8/0x5b0 OpenVPN/ovpn-backports#2: ffffffe000cd0580 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x66/0x1e0 OpenVPN/ovpn-backports#3: ffffffe003ce9818 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x156e/0x17a0 OpenVPN/ovpn-backports#4: ffffffe000cd0580 (rcu_read_lock){....}-{1:2}, at: ovpn_tcp_data_ready+0x0/0x1b0 [ovpn] CPU: 3 PID: 25 Comm: ksoftirqd/3 Not tainted 5.10.104+ #0 Call Trace: walk_stackframe+0x0/0x1d0 show_stack+0x2e/0x44 dump_stack+0xc2/0x102 ___might_sleep+0x29c/0x2b0 __might_sleep+0x62/0xa0 ovpn_socket_release+0x24/0x2d0 [ovpn] unlock_ovpn+0x6e/0x190 [ovpn] ovpn_peer_del+0x13c/0x390 [ovpn] ovpn_tcp_rcv+0x280/0x560 [ovpn] __strp_recv+0x262/0x940 strp_recv+0x66/0x80 tcp_read_sock+0x122/0x410 strp_data_ready+0x156/0x1f0 ovpn_tcp_data_ready+0x92/0x1b0 [ovpn] tcp_data_ready+0x6c/0x150 tcp_rcv_established+0xb36/0xc50 tcp_v4_do_rcv+0x25e/0x380 tcp_v4_rcv+0x166a/0x17a0 ip_protocol_deliver_rcu+0x8c/0x250 ip_local_deliver_finish+0xf8/0x1e0 ip_local_deliver+0xc2/0x2d0 ip_rcv+0x1f2/0x330 __netif_receive_skb+0xfc/0x290 netif_receive_skb+0x104/0x5b0 br_pass_frame_up+0x190/0x3f0 br_handle_frame_finish+0x3e2/0x7a0 br_handle_frame+0x750/0xab0 __netif_receive_skb_core.constprop.0+0x4c0/0x17f0 __netif_receive_skb+0xc6/0x290 netif_receive_skb+0x104/0x5b0 xgmac_dma_rx+0x962/0xb40 __napi_poll.constprop.0+0x5a/0x350 net_rx_action+0x1fe/0x4b0 __do_softirq+0x1f8/0x85c run_ksoftirqd+0x80/0xd0 smpboot_thread_fn+0x1f0/0x3e0 kthread+0x1e6/0x210 ret_from_kernel_thread+0x8/0xc Fix this issue by postponing the ovpn_peer_del() call to a scheduled worker, as we already do in ovpn_tcp_send_sock() for the very same reason. Fixes: 11851cbd60ea ("ovpn: implement TCP transport") Reported-by: Qingfang Deng Closes: https://github.com/OpenVPN/ovpn-net-next/issues/13 Reviewed-by: Michal Swiatkowski Signed-off-by: Antonio Quartulli commit ba499a07ce1d912e48e225eadd9b3f994b05fd58 Author: Antonio Quartulli Date: Wed Apr 30 02:26:49 2025 +0200 ovpn: ensure sk is still valid during cleanup Removing a peer while userspace attempts to close its transport socket triggers a race condition resulting in the following crash: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000077: 0000 [#1] SMP KASAN KASAN: null-ptr-deref in range [0x00000000000003b8-0x00000000000003bf] CPU: 12 UID: 0 PID: 162 Comm: kworker/12:1 Tainted: G O 6.15.0-rc2-00635-g521139ac3840 #272 PREEMPT(full) Tainted: [O]=OOT_MODULE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-20240910_120124-localhost 04/01/2014 Workqueue: events ovpn_peer_keepalive_work [ovpn] RIP: 0010:ovpn_socket_release+0x23c/0x500 [ovpn] Code: ea 03 80 3c 02 00 0f 85 71 02 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 64 24 18 49 8d bc 24 be 03 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 30 RSP: 0018:ffffc90000c9fb18 EFLAGS: 00010217 RAX: dffffc0000000000 RBX: ffff8881148d7940 RCX: ffffffff817787bb RDX: 0000000000000077 RSI: 0000000000000008 RDI: 00000000000003be RBP: ffffc90000c9fb30 R08: 0000000000000000 R09: fffffbfff0d3e840 R10: ffffffff869f4207 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888115eb9300 R14: ffffc90000c9fbc8 R15: 000000000000000c FS: 0000000000000000(0000) GS:ffff8882b0151000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f37266b6114 CR3: 00000000054a8000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: unlock_ovpn+0x8b/0xe0 [ovpn] ovpn_peer_keepalive_work+0xe3/0x540 [ovpn] ? ovpn_peers_free+0x780/0x780 [ovpn] ? lock_acquire+0x56/0x70 ? process_one_work+0x888/0x1740 process_one_work+0x933/0x1740 ? pwq_dec_nr_in_flight+0x10b0/0x10b0 ? move_linked_works+0x12d/0x2c0 ? assign_work+0x163/0x270 worker_thread+0x4d6/0xd90 ? preempt_count_sub+0x4c/0x70 ? process_one_work+0x1740/0x1740 kthread+0x36c/0x710 ? trace_preempt_on+0x8c/0x1e0 ? kthread_is_per_cpu+0xc0/0xc0 ? preempt_count_sub+0x4c/0x70 ? _raw_spin_unlock_irq+0x36/0x60 ? calculate_sigpending+0x7b/0xa0 ? kthread_is_per_cpu+0xc0/0xc0 ret_from_fork+0x3a/0x80 ? kthread_is_per_cpu+0xc0/0xc0 ret_from_fork_asm+0x11/0x20 Modules linked in: ovpn(O) This happens because the peer deletion operation reaches ovpn_socket_release() while ovpn_sock->sock (struct socket *) and its sk member (struct sock *) are still both valid. Here synchronize_rcu() is invoked, after which ovpn_sock->sock->sk becomes NULL, due to the concurrent socket closing triggered from userspace. After having invoked synchronize_rcu(), ovpn_socket_release() will attempt dereferencing ovpn_sock->sock->sk, triggering the crash reported above. The reason for accessing sk is that we need to retrieve its protocol and continue the cleanup routine accordingly. This crash can be easily produced by running openvpn userspace in client mode with `--keepalive 10 20`, while entirely omitting this option on the server side. After 20 seconds ovpn will assume the peer (server) to be dead, will start removing it and will notify userspace. The latter will receive the notification and close the transport socket, thus triggering the crash. To fix the race condition for good, we need to refactor struct ovpn_socket. Since ovpn is always only interested in the sock->sk member (struct sock *) we can directly hold a reference to it, raher than accessing it via its struct socket container. This means changing "struct socket *ovpn_socket->sock" to "struct sock *ovpn_socket->sk". While acquiring a reference to sk, we can increase its refcounter without affecting the socket close()/destroy() notification (which we rely on when userspace closes a socket we are using). By increasing sk's refcounter we know we can dereference it in ovpn_socket_release() without incurring in any race condition anymore. ovpn_socket_release() will ultimately decrease the reference counter. Cc: Oleksandr Natalenko Fixes: 11851cbd60ea ("ovpn: implement TCP transport") Reported-by: Qingfang Deng Closes: https://github.com/OpenVPN/ovpn-net-next/issues/1 Tested-by: Gert Doering Link: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31575.html Reviewed-by: Michal Swiatkowski Signed-off-by: Antonio Quartulli commit 930faf1eb8d70226ac804b61e5cd79b17fb3261d Author: Antonio Quartulli Date: Tue May 13 16:43:59 2025 +0200 ovpn: properly deconfigure UDP-tunnel When deconfiguring a UDP-tunnel from a socket, we cannot call setup_udp_tunnel_sock() with an empty config, because this helper is expected to be invoked only during setup. Get rid of the call to setup_udp_tunnel_sock() and just revert what it did during socket initialization.. Note that the global udp_encap_needed_key and the GRO state are left untouched: udp_destroy_socket() will eventually take care of them. Cc: Sabrina Dubroca Cc: Oleksandr Natalenko Fixes: ab66abbc769b ("ovpn: implement basic RX path (UDP)") Reported-by: Paolo Abeni Closes: https://lore.kernel.org/netdev/1a47ce02-fd42-4761-8697-f3f315011cc6@redhat.com Signed-off-by: Antonio Quartulli commit 065a651e2fb35209cbfe6fc5f1ababf92b66d4a4 Author: Cezary Rojewski Date: Fri May 30 16:10:24 2025 +0200 ASoC: Intel: avs: Simplify verification of parse_int_array() result The function return either success or an error code, no need to involve '<' operator. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b56bbaf8c9ffe02468f6ba8757668e95dda7e62c Merge: d3f2a9587ebe68 c86fac5365d3a0 Author: Paolo Abeni Date: Tue Jun 3 13:04:08 2025 +0200 Merge branch 'net-airoha-fix-ipv6-hw-acceleration' Lorenzo Bianconi says: ==================== net: airoha: Fix IPv6 hw acceleration Fix IPv6 hw acceleration in bridge mode resolving ib2 and airoha_foe_mac_info_common overwrite in airoha_ppe_foe_commit_subflow_entry routine. Introduce UPDMEM source-mac table used to set source mac address for L3 IPv6 hw accelerated traffic. ==================== Link: https://patch.msgid.link/20250602-airoha-flowtable-ipv6-fix-v2-0-3287f8b55214@kernel.org Signed-off-by: Paolo Abeni commit c86fac5365d3a068422beeb508f2741f1a2d734d Author: Lorenzo Bianconi Date: Mon Jun 2 12:55:39 2025 +0200 net: airoha: Fix smac_id configuration in bridge mode Set PPE entry smac_id field to 0xf in airoha_ppe_foe_commit_subflow_entry routine for IPv6 traffic in order to instruct the hw to keep original source mac address for IPv6 hw accelerated traffic in bridge mode. Fixes: cd53f622611f ("net: airoha: Add L2 hw acceleration support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250602-airoha-flowtable-ipv6-fix-v2-3-3287f8b55214@kernel.org Signed-off-by: Paolo Abeni commit 504a577c9b000f9e0e99e1b28616fb4eb369e1ef Author: Lorenzo Bianconi Date: Mon Jun 2 12:55:38 2025 +0200 net: airoha: Fix IPv6 hw acceleration in bridge mode ib2 and airoha_foe_mac_info_common have not the same offsets in airoha_foe_bridge and airoha_foe_ipv6 structures. Current codebase does not accelerate IPv6 traffic in bridge mode since ib2 and l2 info are not set properly copying airoha_foe_bridge struct into airoha_foe_ipv6 one in airoha_ppe_foe_commit_subflow_entry routine. Fix IPv6 hw acceleration in bridge mode resolving ib2 and airoha_foe_mac_info_common overwrite in airoha_ppe_foe_commit_subflow_entry() and configuring them with proper values. Fixes: cd53f622611f ("net: airoha: Add L2 hw acceleration support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250602-airoha-flowtable-ipv6-fix-v2-2-3287f8b55214@kernel.org Signed-off-by: Paolo Abeni commit a869d3a5eb011a9cf9bd864f31f5cf27362de8c7 Author: Lorenzo Bianconi Date: Mon Jun 2 12:55:37 2025 +0200 net: airoha: Initialize PPE UPDMEM source-mac table UPDMEM source-mac table is a key-value map used to store devices mac addresses according to the port identifier. UPDMEM source mac table is used during IPv6 traffic hw acceleration since PPE entries, for space constraints, do not contain the full source mac address but just the identifier in the UPDMEM source-mac table. Configure UPDMEM source-mac table with device mac addresses and set the source-mac ID field for PPE IPv6 entries in order to select the proper device mac address as source mac for L3 IPv6 hw accelerated traffic. Fixes: 00a7678310fe ("net: airoha: Introduce flowtable offload support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250602-airoha-flowtable-ipv6-fix-v2-1-3287f8b55214@kernel.org Signed-off-by: Paolo Abeni commit d3f2a9587ebe68f5067f9ff624f9a83dfb911f60 Author: Bui Quang Minh Date: Sun Jun 1 21:29:13 2025 +0700 selftests: net: build net/lib dependency in all target We have the logic to include net/lib automatically for net related selftests. However, currently, this logic is only in install target which means only `make install` will have net/lib included. This commit adds the logic to all target so that all `make`, `make run_tests` and `make install` will have net/lib included in net related selftests. Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250601142914.13379-1-minhquangbui99@gmail.com Fixes: b86761ff6374 ("selftests: net: add scaffolding for Netlink tests in Python") Signed-off-by: Paolo Abeni commit 982d30c30eaa2ec723df42e3bf526c014c1dbb88 Author: Ronak Doshi Date: Fri May 30 15:27:00 2025 +0000 vmxnet3: correctly report gso type for UDP tunnels Commit 3d010c8031e3 ("udp: do not accept non-tunnel GSO skbs landing in a tunnel") added checks in linux stack to not accept non-tunnel GRO packets landing in a tunnel. This exposed an issue in vmxnet3 which was not correctly reporting GRO packets for tunnel packets. This patch fixes this issue by setting correct GSO type for the tunnel packets. Currently, vmxnet3 does not support reporting inner fields for LRO tunnel packets. The issue is not seen for egress drivers that do not use skb inner fields. The workaround is to enable tnl-segmentation offload on the egress interfaces if the driver supports it. This problem pre-exists this patch fix and can be addressed as a separate future patch. Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Link: https://patch.msgid.link/20250530152701.70354-1-ronak.doshi@broadcom.com [pabeni@redhat.com: dropped the changelog] Signed-off-by: Paolo Abeni commit f6695269dc52d133ecf6468aa7cbfe29987630ed Author: Jakub Kicinski Date: Fri May 30 06:58:00 2025 -0700 Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests" This reverts commit a571a9a1b120264e24b41eddf1ac5140131bfa84. The commit in question breaks kunit for older compilers: $ gcc --version gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) $ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64 Configuring KUnit Kernel ... Regenerating .config ... Populating config with: $ make ARCH=x86_64 O=.kunit olddefconfig ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config. This is probably due to unsatisfied dependencies. Missing: CONFIG_INIT_STACK_ALL_PATTERN=y Link: https://lore.kernel.org/20250529083811.778bc31b@kernel.org Fixes: a571a9a1b120 ("kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests") Signed-off-by: Jakub Kicinski Acked-by: Mark Brown Acked-by: Shuah Khan Link: https://patch.msgid.link/20250530135800.13437-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit ffb006aa433e8109ec79320c344fb69947997ba1 Author: Sumanth Gavini Date: Mon May 19 16:20:23 2025 -0700 mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers Fix the misspelling of 'Electronics' in MFD driver copyright headers. Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t Link: https://lore.kernel.org/r/20250519232025.152769-1-sumanth.gavini@yahoo.com Signed-off-by: Sumanth Gavini Signed-off-by: Lee Jones commit b8628379957d0c8c057782ec1a8512de6d4ba29c Author: Sumanth Gavini Date: Mon May 19 19:08:05 2025 -0700 mfd: maxim: Correct Samsung "Electronics" spelling in headers Fix the misspelling of 'Electronics' in MFD driver headers. Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t Link: https://lore.kernel.org/r/20250520020808.159586-1-sumanth.gavini@yahoo.com Signed-off-by: Sumanth Gavini Signed-off-by: Lee Jones commit 905fe0845bb27e4eed2ca27ea06e6c4847f1b2b1 Author: Jinjian Song Date: Fri May 30 11:16:48 2025 +0800 net: wwan: t7xx: Fix napi rx poll issue When driver handles the napi rx polling requests, the netdev might have been released by the dellink logic triggered by the disconnect operation on user plane. However, in the logic of processing skb in polling, an invalid netdev is still being used, which causes a panic. BUG: kernel NULL pointer dereference, address: 00000000000000f1 Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:dev_gro_receive+0x3a/0x620 [...] Call Trace: ? __die_body+0x68/0xb0 ? page_fault_oops+0x379/0x3e0 ? exc_page_fault+0x4f/0xa0 ? asm_exc_page_fault+0x22/0x30 ? __pfx_t7xx_ccmni_recv_skb+0x10/0x10 [mtk_t7xx (HASH:1400 7)] ? dev_gro_receive+0x3a/0x620 napi_gro_receive+0xad/0x170 t7xx_ccmni_recv_skb+0x48/0x70 [mtk_t7xx (HASH:1400 7)] t7xx_dpmaif_napi_rx_poll+0x590/0x800 [mtk_t7xx (HASH:1400 7)] net_rx_action+0x103/0x470 irq_exit_rcu+0x13a/0x310 sysvec_apic_timer_interrupt+0x56/0x90 Fixes: 5545b7b9f294 ("net: wwan: t7xx: Add NAPI support") Signed-off-by: Jinjian Song Link: https://patch.msgid.link/20250530031648.5592-1-jinjian.song@fibocom.com Signed-off-by: Paolo Abeni commit c48228c476ffe35ec99af6660af602956ffaa12b Merge: 6920d9625730d2 6a9e76f75c1a8f Author: Jiri Kosina Date: Tue Jun 3 09:32:30 2025 +0200 Merge branch 'for-6.16/core' into for-linus - power management improvement for multitouch devices (Werner Sembach) commit 6920d9625730d260c5f5f517799e25de4ea5e7d7 Merge: 4376fd0f8c5f0b b8d56ef91cc36b Author: Jiri Kosina Date: Tue Jun 3 09:27:46 2025 +0200 Merge branch 'for-6.16/magicmouse' into for-linus - support for Apple Magic Mouse 2 USB-C (Aditya Garg) commit 4376fd0f8c5f0b372f62c3ea82ff8d69d564f1f8 Merge: 1f09ba86b6bffb f58470ce6d26ea Author: Jiri Kosina Date: Tue Jun 3 09:27:32 2025 +0200 Merge branch 'for-6.16/logitech' into for-linus commit 1f09ba86b6bffb784f08596b34639b04be47b3e4 Merge: e6322141f00d03 113521a4d2b0c4 Author: Jiri Kosina Date: Tue Jun 3 09:26:50 2025 +0200 Merge branch 'for-6.16/kysona' into for-linus - power management improvement (Lode Willems) commit e6322141f00d032665be453193e64b0ebae61da4 Merge: 17678759efda17 bbd7a03dc9a221 Author: Jiri Kosina Date: Tue Jun 3 09:26:12 2025 +0200 Merge branch 'for-6.16/intel-thc' into for-linus - fix for ACPI initialization (Wentao Guan) commit 17678759efda1710aecfd38cca6b0c58a2d45df4 Merge: 5b53c0e7df2954 31a78afda1ef7f Author: Jiri Kosina Date: Tue Jun 3 09:25:26 2025 +0200 Merge branch 'for-6.16/hid-gpio-setter-callbacks' into for-linus - adapt HID drivers to use new gpio_chip's line setter callbacks (Bartosz Golaszewski) commit 5b53c0e7df295490a5304f870e35a70d7bb68c1e Merge: 6f96598984a0e4 cc2c611f296009 Author: Jiri Kosina Date: Tue Jun 3 09:24:39 2025 +0200 Merge branch 'for-6.16/corsair' into for-linus commit 6f96598984a0e4ba7d4e92566b25dbf30ab1f387 Merge: ad78d7e364a7f2 a058002358b7aa Author: Jiri Kosina Date: Tue Jun 3 09:23:09 2025 +0200 Merge branch 'for-6.16/core' into for-linus - make it possible to set hid_mouse_ignore_list dynamically (the same way we handle other quirks) (Aditya Garg) - fix potential OOB in usbhid_parse() (Terry Junge) commit ad78d7e364a7f26ceed91d2e3b2b3f6bd19ef557 Merge: 578e1b96fad740 de7ad66b16b4d3 Author: Jiri Kosina Date: Tue Jun 3 09:21:55 2025 +0200 Merge branch 'for-6.16/apple' into for-linus - Kconfig dependency fixes (Geert Uytterhoeven) - time scaling fix for appletb_tb_idle_timeout and appletb_tb_dim_timeout parameters (Thorsten Blum) commit 408da3a0f89d581421ca9bd6ff39c7dd05bc4b2f Merge: 3382a1ed7f778d 9dc63d8ff18215 Author: Jakub Kicinski Date: Mon Jun 2 18:44:37 2025 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-05-30 (ice, idpf) For ice: Michal resolves XDP issues related to Tx scheduler configuration with large number of Tx queues. Additional information: https://lore.kernel.org/intel-wired-lan/20250513105529.241745-1-michal.kubiak@intel.com/ For idpf: Brian Vazquez updates netif_subqueue_maybe_stop() condition check to prevent possible races. Emil shuts down virtchannel mailbox during reset to reduce timeout delays as it's unavailable during that time. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: idpf: avoid mailbox timeout delays during reset idpf: fix a race in txq wakeup ice: fix rebuilding the Tx scheduler tree for large queue counts ice: create new Tx scheduler nodes for new queues only ice: fix Tx scheduler error handling in XDP callback ==================== Link: https://patch.msgid.link/20250530211221.2170484-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253 Merge: c8be54240893db d81bab116b4856 Author: Linus Torvalds Date: Mon Jun 2 17:39:24 2025 -0700 Merge tag 'bootconfig-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig updates from Masami Hiramatsu: - Allow overriding CFLAGS and LDFLAGS for tools/bootconfig, for example making it a static binary. * tag 'bootconfig-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tools/bootconfig: specify LDFLAGS as an argument to CC tools/bootconfig: allow overriding CFLAGS assignment commit c8be54240893dbf89c294cb6a9e338fdc2f73ead Merge: fd1f8473503e5b a0b018a495a3f6 Author: Linus Torvalds Date: Mon Jun 2 17:35:06 2025 -0700 Merge tag 'modules-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux Pull module updates from Petr Pavlu: - Make .static_call_sites in modules read-only after init The .static_call_sites sections in modules have been made read-only after init to avoid any (non-)accidental modifications, similarly to how they are read-only after init in vmlinux - The rest are minor cleanups * tag 'modules-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: module: Remove outdated comment about text_size module: Make .static_call_sites read-only after init module: Add a separate function to mark sections as read-only after init module: Constify parameters of module_enforce_rwx_sections() commit fd1f8473503e5bf897bd3e8efe3545c0352954e6 Merge: fe4281644c62ce 0b43b8bc8ef88b Author: Linus Torvalds Date: Mon Jun 2 16:00:26 2025 -0700 Merge tag 'mm-stable-2025-06-01-14-06' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull more MM updates from Andrew Morton: - "zram: support algorithm-specific parameters" from Sergey Senozhatsky adds infrastructure for passing algorithm-specific parameters into zram. A single parameter `winbits' is implemented at this time. - "memcg: nmi-safe kmem charging" from Shakeel Butt makes memcg charging nmi-safe, which is required by BFP, which can operate in NMI context. - "Some random fixes and cleanup to shmem" from Kemeng Shi implements small fixes and cleanups in the shmem code. - "Skip mm selftests instead when kernel features are not present" from Zi Yan fixes some issues in the MM selftest code. - "mm/damon: build-enable essential DAMON components by default" from SeongJae Park reworks DAMON Kconfig to make it easier to enable CONFIG_DAMON. - "sched/numa: add statistics of numa balance task migration" from Libo Chen adds more info into sysfs and procfs files to improve visibility into the NUMA balancer's task migration activity. - "selftests/mm: cow and gup_longterm cleanups" from Mark Brown provides various updates to some of the MM selftests to make them play better with the overall containing framework. * tag 'mm-stable-2025-06-01-14-06' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (43 commits) mm/khugepaged: clean up refcount check using folio_expected_ref_count() selftests/mm: fix test result reporting in gup_longterm selftests/mm: report unique test names for each cow test selftests/mm: add helper for logging test start and results selftests/mm: use standard ksft_finished() in cow and gup_longterm selftests/damon/_damon_sysfs: skip testcases if CONFIG_DAMON_SYSFS is disabled sched/numa: add statistics of numa balance task sched/numa: fix task swap by skipping kernel threads tools/testing: check correct variable in open_procmap() tools/testing/vma: add missing function stub mm/gup: update comment explaining why gup_fast() disables IRQs selftests/mm: two fixes for the pfnmap test mm/khugepaged: fix race with folio split/free using temporary reference mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order mmu_notifiers: remove leftover stub macros selftests/mm: deduplicate test names in madv_populate kcov: rust: add flags for KCOV with Rust mm: rust: make CONFIG_MMU ifdefs more narrow mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables() mm/damon/Kconfig: enable CONFIG_DAMON by default ... commit fe4281644c62ce9385d3b9165e27d6c86ae0a845 Merge: 2619a6d413f4c3 9126d2754c5e5d Author: Linus Torvalds Date: Mon Jun 2 15:53:43 2025 -0700 Merge tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: - Fix a NULL pointer dereference reported by syzbot * tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add commit 2619a6d413f4c3c4c1eddf63e83ecc345f250d07 Merge: 0fb34422b5c223 dabb9039102879 Author: Linus Torvalds Date: Mon Jun 2 15:31:05 2025 -0700 Merge tag 'fuse-update-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Remove tmp page copying in writeback path (Joanne). This removes ~300 lines and with that a lot of complexity related to avoiding reclaim related deadlock. The old mechanism is replaced with a mapping flag that tells the MM not to block reclaim waiting for writeback to complete. The MM parts have been reviewed/acked by respective maintainers. - Convert more code to handle large folios (Joanne). This still just adds the code to deal with large folios and does not enable them yet. - Allow invalidating all cached lookups atomically (Luis Henriques). This feature is useful for CernVMFS, which currently does this iteratively. - Align write prefaulting in fuse with generic one (Dave Hansen) - Fix race causing invalid data to be cached when setting attributes on different nodes of a distributed fs (Guang Yuan Wu) - Update documentation for passthrough (Chen Linxuan) - Add fdinfo about the device number associated with an opened /dev/fuse instance (Chen Linxuan) - Increase readdir buffer size (Miklos). This depends on a patch to VFS readdir code that was already merged through Christians tree. - Optimize io-uring request expiration (Joanne) - Misc cleanups * tag 'fuse-update-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (25 commits) fuse: increase readdir buffer size readdir: supply dir_context.count as readdir buffer size hint fuse: don't allow signals to interrupt getdents copying fuse: support large folios for writeback fuse: support large folios for readahead fuse: support large folios for queued writes fuse: support large folios for stores fuse: support large folios for symlinks fuse: support large folios for folio reads fuse: support large folios for writethrough writes fuse: refactor fuse_fill_write_pages() fuse: support large folios for retrieves fuse: support copying large folios fs: fuse: add dev id to /dev/fuse fdinfo docs: filesystems: add fuse-passthrough.rst MAINTAINERS: update filter of FUSE documentation fuse: fix race between concurrent setattrs from multiple nodes fuse: remove tmp folio for writebacks and internal rb tree mm: skip folio reclaim in legacy memcg contexts for deadlockable mappings fuse: optimize over-io-uring request expiration check ... commit 8a5ebd2be99a1f4630d0382f7fdf581561d317cd Author: Shyam Prasad N Date: Tue Apr 29 12:02:36 2025 +0000 cifs: update the lock ordering comments with new mutex The lock ordering rules listed as comments in cifsglob.h were missing some lock details and also the fid_lock. Updated those notes in this commit. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 0fb34422b5c2237e0de41980628b023252912108 Merge: fcd0bb8e99f7f5 db26d62d79e406 Author: Linus Torvalds Date: Mon Jun 2 15:04:06 2025 -0700 Merge tag 'vfs-6.16-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull netfs updates from Christian Brauner: - The main API document has been extensively updated/rewritten - Fix an oops in write-retry due to mis-resetting the I/O iterator - Fix the recording of transferred bytes for short DIO reads - Fix a request's work item to not require a reference, thereby avoiding the need to get rid of it in BH/IRQ context - Fix waiting and waking to be consistent about the waitqueue used - Remove NETFS_SREQ_SEEK_DATA_READ, NETFS_INVALID_WRITE, NETFS_ICTX_WRITETHROUGH, NETFS_READ_HOLE_CLEAR, NETFS_RREQ_DONT_UNLOCK_FOLIOS, and NETFS_RREQ_BLOCKED - Reorder structs to eliminate holes - Remove netfs_io_request::ractl - Only provide proc_link field if CONFIG_PROC_FS=y - Remove folio_queue::marks3 - Fix undifferentiation of DIO reads from unbuffered reads * tag 'vfs-6.16-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: netfs: Fix undifferentiation of DIO reads from unbuffered reads netfs: Fix wait/wake to be consistent about the waitqueue used netfs: Fix the request's work item to not require a ref netfs: Fix setting of transferred bytes with short DIO reads netfs: Fix oops in write-retry from mis-resetting the subreq iterator fs/netfs: remove unused flag NETFS_RREQ_BLOCKED fs/netfs: remove unused flag NETFS_RREQ_DONT_UNLOCK_FOLIOS folio_queue: remove unused field `marks3` fs/netfs: declare field `proc_link` only if CONFIG_PROC_FS=y fs/netfs: remove `netfs_io_request.ractl` fs/netfs: reorder struct fields to eliminate holes fs/netfs: remove unused enum choice NETFS_READ_HOLE_CLEAR fs/netfs: remove unused flag NETFS_ICTX_WRITETHROUGH fs/netfs: remove unused source NETFS_INVALID_WRITE fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ commit 3c05e88413f7b7145795dc1ad56983e75bca07a7 Author: Arnd Bergmann Date: Wed Apr 23 18:25:16 2025 +0200 PCI: j721e: Fix host/endpoint dependencies The j721e driver has a single platform driver that can be built-in or a loadable module, but it calls two separate backend drivers depending on whether it is a host or endpoint. If the two modes are not the same, we can end up with a situation where the built-in pci-j721e driver tries to call the modular host or endpoint driver, which causes a link failure: ld.lld-21: error: undefined symbol: cdns_pcie_ep_setup >>> referenced by pci-j721e.c >>> drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a ld.lld-21: error: undefined symbol: cdns_pcie_host_setup >>> referenced by pci-j721e.c >>> drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a Rework the dependencies so that the 'select' is done by the common Kconfig symbol, based on which of the two are enabled. Effectively this means that having one built-in makes the other either built-in or disabled, but all configurations will now build. Signed-off-by: Arnd Bergmann Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Siddharth Vadapalli Link: https://patch.msgid.link/20250423162523.2060405-1-arnd@kernel.org commit a2790bf81f0f7b0fb683204cd3bef07feecb9958 Author: Siddharth Vadapalli Date: Thu Apr 17 18:14:08 2025 +0530 PCI: j721e: Add support to build as a loadable module The 'pci-j721e.c' driver is the application/glue/wrapper driver for the Cadence PCIe Controllers on TI SoCs. Implement support for building it as a loadable module. Signed-off-by: Siddharth Vadapalli Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250417124408.2752248-5-s-vadapalli@ti.com commit 3a4b05c9bae485d230560278a659e0830f96e28f Author: Siddharth Vadapalli Date: Thu Apr 17 18:14:07 2025 +0530 PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup Introduce the helper function cdns_pcie_ep_disable() which will undo the configuration performed by cdns_pcie_ep_setup(). Also, export it for use by the existing callers of cdns_pcie_ep_setup(), thereby allowing them to cleanup on their exit path. Signed-off-by: Siddharth Vadapalli Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250417124408.2752248-4-s-vadapalli@ti.com commit 47f25da6c5ea55494f4de5ca1ecf6c456b4b3e2a Author: Siddharth Vadapalli Date: Thu Apr 17 18:14:06 2025 +0530 PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup Introduce the helper function cdns_pcie_host_disable() which will undo the configuration performed by cdns_pcie_host_setup(). Also, export it for use by existing callers of cdns_pcie_host_setup(), thereby allowing them to cleanup on their exit path. Signed-off-by: Siddharth Vadapalli Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250417124408.2752248-3-s-vadapalli@ti.com commit f876904e44360449e64e2d38c428eba3a03d7a47 Author: Kishon Vijay Abraham I Date: Thu Apr 17 18:14:05 2025 +0530 PCI: cadence: Add support to build pcie-cadence library as a kernel module Currently, the Cadence PCIe controller driver can be built as a built-in module only. Since PCIe functionality is not a necessity for booting, add support to build the Cadence PCIe driver as a loadable module as well. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Siddharth Vadapalli Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250417124408.2752248-2-s-vadapalli@ti.com commit ae06c6197c9e53dcb115f1f7aad9e86aa465adae Author: Krzysztof Wilczyński Date: Fri Apr 18 04:52:51 2025 +0000 MAINTAINERS: Update Krzysztof Wilczyński email address Update my e-mail address and add relevant entries to the .mailmap file. [bhelgaas: drop maintainer status change] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250418045251.7434-1-kwilczynski@kernel.org commit 75d7b40becfb9de11f9c2ff7138111eb48e76099 Author: Ilpo Järvinen Date: Fri Apr 4 15:45:47 2025 +0300 PCI: Remove unnecessary linesplit in __pci_setup_bridge() No need to split the line in __pci_setup_bridge() as it is way shorter than the limit. Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20250404124547.51185-1-ilpo.jarvinen@linux.intel.com commit fcd0bb8e99f7f5fbe6979b8633ed86502d822203 Merge: 7f9039c524a351 5402c4d4d2000a Author: Linus Torvalds Date: Mon Jun 2 12:49:16 2025 -0700 Merge tag 'vfs-6.16-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix the AT_HANDLE_CONNECTABLE option so filesystems that don't know how to decode a connected non-dir dentry fail the request - Use repr(transparent) to ensure identical layout between the C and Rust implementation of struct file - Add a missing xas_pause() into the dax code employing wait_entry_unlocked_exclusive() - Fix FOP_DONTCACHE which we disabled for v6.15. A folio could get redirtied and/or scheduled for writeback after the initial dropbehind test. Change the test accordingly to handle these cases so we can re-enable FOP_DONTCACHE again * tag 'vfs-6.16-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: exportfs: require ->fh_to_parent() to encode connectable file handles rust: file: improve safety comments rust: file: mark `LocalFile` as `repr(transparent)` fs/dax: Fix "don't skip locked entries when scanning entries" iomap: don't lose folio dropbehind state for overwrites mm/filemap: unify dropbehind flag testing and clearing mm/filemap: unify read/write dropbehind naming Revert "Disable FOP_DONTCACHE for now due to bugs" mm/filemap: use filemap_end_dropbehind() for read invalidation mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback commit 7f9039c524a351c684149ecf1b3c5145a0dff2fe Merge: df7b9b4f6bfeb1 61374cc145f4a5 Author: Linus Torvalds Date: Mon Jun 2 12:24:58 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more kvm updates from Paolo Bonzini: Generic: - Clean up locking of all vCPUs for a VM by using the *_nest_lock() family of functions, and move duplicated code to virt/kvm/. kernel/ patches acked by Peter Zijlstra - Add MGLRU support to the access tracking perf test ARM fixes: - Make the irqbypass hooks resilient to changes in the GSI<->MSI routing, avoiding behind stale vLPI mappings being left behind. The fix is to resolve the VGIC IRQ using the host IRQ (which is stable) and nuking the vLPI mapping upon a routing change - Close another VGIC race where vCPU creation races with VGIC creation, leading to in-flight vCPUs entering the kernel w/o private IRQs allocated - Fix a build issue triggered by the recently added workaround for Ampere's AC04_CPU_23 erratum - Correctly sign-extend the VA when emulating a TLBI instruction potentially targeting a VNCR mapping - Avoid dereferencing a NULL pointer in the VGIC debug code, which can happen if the device doesn't have any mapping yet s390: - Fix interaction between some filesystems and Secure Execution - Some cleanups and refactorings, preparing for an upcoming big series x86: - Wait for target vCPU to ack KVM_REQ_UPDATE_PROTECTED_GUEST_STATE to fix a race between AP destroy and VMRUN - Decrypt and dump the VMSA in dump_vmcb() if debugging enabled for the VM - Refine and harden handling of spurious faults - Add support for ALLOWED_SEV_FEATURES - Add #VMGEXIT to the set of handlers special cased for CONFIG_RETPOLINE=y - Treat DEBUGCTL[5:2] as reserved to pave the way for virtualizing features that utilize those bits - Don't account temporary allocations in sev_send_update_data() - Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM, via Bus Lock Threshold - Unify virtualization of IBRS on nested VM-Exit, and cross-vCPU IBPB, between SVM and VMX - Advertise support to userspace for WRMSRNS and PREFETCHI - Rescan I/O APIC routes after handling EOI that needed to be intercepted due to the old/previous routing, but not the new/current routing - Add a module param to control and enumerate support for device posted interrupts - Fix a potential overflow with nested virt on Intel systems running 32-bit kernels - Flush shadow VMCSes on emergency reboot - Add support for SNP to the various SEV selftests - Add a selftest to verify fastops instructions via forced emulation - Refine and optimize KVM's software processing of the posted interrupt bitmap, and share the harvesting code between KVM and the kernel's Posted MSI handler" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (93 commits) rtmutex_api: provide correct extern functions KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer KVM: arm64: vgic-init: Plug vCPU vs. VGIC creation race KVM: arm64: Unmap vLPIs affected by changes to GSI routing information KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding() KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock KVM: arm64: Use lock guard in vgic_v4_set_forwarding() KVM: arm64: Mask out non-VA bits from TLBI VA* on VNCR invalidation arm64: sysreg: Drag linux/kconfig.h to work around vdso build issue KVM: s390: Simplify and move pv code KVM: s390: Refactor and split some gmap helpers KVM: s390: Remove unneeded srcu lock s390: Remove unneeded includes s390/uv: Improve splitting of large folios that cannot be split while dirty s390/uv: Always return 0 from s390_wiggle_split_folio() if successful s390/uv: Don't return 0 from make_hva_secure() if the operation was not successful rust: add helper for mutex_trylock RISC-V: KVM: use kvm_trylock_all_vcpus when locking all vCPUs KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs x86: KVM: SVM: use kvm_lock_all_vcpus instead of a custom implementation ... commit df7b9b4f6bfeb1143e7626c536e03bb122e90cc9 Merge: d00a83477e7a8f eb43efd062d10b Author: Linus Torvalds Date: Mon Jun 2 12:16:17 2025 -0700 Merge tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: - use new gpio line value settings - use strscpy() more * tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Replace memcpy() + manual NUL-termination with strscpy() m68k/kernel: replace strncpy() with strscpy() m68k: coldfire: gpio: use new line value setter callbacks commit b4f60a053a2534c3e510ba0c1f8727566adf8317 Author: Shyam Prasad N Date: Mon Jun 2 22:37:16 2025 +0530 cifs: dns resolution is needed only for primary channel When calling cifs_reconnect, before the connection to the server is reestablished, the code today does a DNS resolution and updates server->dstaddr. However, this is not necessary for secondary channels. Secondary channels use the interface list returned by the server to decide which address to connect to. And that happens after tcon is reconnected and server interfaces are requested. Signed-off-by: Shyam Prasad N Cc: stable@vger.kernel.org Signed-off-by: Steve French commit c1846893991f3b4ec8a0cc12219ada153f0814d6 Author: Shyam Prasad N Date: Mon Jun 2 22:37:14 2025 +0530 cifs: update dstaddr whenever channel iface is updated When the server interface info changes (more common in clustered servers like Azure Files), the per-channel iface gets updated. However, this did not update the corresponding dstaddr. As a result these channels will still connect (or try connecting) to older addresses. Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary") Cc: Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 1f396b9bfe39aaf55ea74a7005806164b236653d Author: Shyam Prasad N Date: Mon Jun 2 22:37:13 2025 +0530 cifs: reset connections for all channels when reconnect requested cifs_reconnect can be called with a flag to mark the session as needing reconnect too. When this is done, we expect the connections of all channels to be reconnected too, which is not happening today. Without doing this, we have seen bad things happen when primary and secondary channels are connected to different servers (in case of cloud services like Azure Files SMB). This change would force all connections to reconnect as well, not just the sessions and tcons. Cc: Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit d00a83477e7a8f55c9f9d0c6768901f28b1b9d87 Merge: 4c3b7df7844340 4f9786035f9e51 Author: Linus Torvalds Date: Mon Jun 2 11:14:21 2025 -0700 Merge tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - support for game controllers requiring delayed initialization packets, such as ByoWave Proteus, in xpad driver - a change to atkbd driver to not reset the keyboard on Loongson devices - tweaks to gpio-keys and matrix_keypad drivers - fixes to documentation for Amiga joysticks - a fix to ims-pcu driver to better handle malformed firmware * tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ims-pcu - check record size in ims_pcu_flash_firmware() Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer() Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT Input: amijoy - make headings compliant w/ guidelines in documentation Input: amijoy - fix grammar in documentation Input: amijoy - fix Amiga 4-joystick adapter pinout in documentation Input: amijoy - fix broken table formatting in documentation Input: atkbd - do not reset keyboard by default on Loongson Input: xpad - send LED and auth done packets to all Xbox One controllers Input: xpad - add the ByoWave Proteus controller Input: xpad - allow delaying init packets MAINTAINERS: update dlg,da72??.txt to yaml dt-bindings: input: convert dlg,da7280.txt to dt-schema dt-bindings: input: touchscreen: edt-ft5x06: use unevaluatedProperties Input: snvs_pwrkey - support power-off-time-sec dt-bindings: crypto: fsl,sec-v4.0-mon: Add "power-off-time-sec" Input: matrix_keypad - detect change during scan Input: matrix_keypad - add function for reading row state commit 2f956db8b3b02256b21da4d1f26fedc63782adff Author: Palmer Dabbelt Date: Mon Jun 2 10:33:15 2025 -0700 Revert "RISC-V: vDSO: Wire up getrandom() vDSO implementation" This has been on -next for a bit, but it's broken and there's already a v2. So I'm reverting it to avoid more rebasing. This reverts commit 89079520cef65d6da1e864eab4464effe5396e23. Link: https://lore.kernel.org/r/20250602173315.20228-1-palmer@dabbelt.com Signed-off-by: Palmer Dabbelt commit 4c3b7df78443403bff2532299f21eb4cbdf059e2 Merge: b509c16e1d7cba aa702923258f2c Author: Linus Torvalds Date: Mon Jun 2 11:08:17 2025 -0700 Merge tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "A big core MTD change is the introduction of a new class to always register a master device. This is a problem that has been there forever: the "master" device was not always present depending on a number of heuristics such as the presence of fixed partitions and the absence of a Kconfig symbol to force its presence. This was a problem for runtime PM operations which might not have the "master" device available in all situation. The SPI NAND subsystem has seen the introduction of DTR operations (the equivalent of DDR transfers), which involved quite a few preparation patches for clarifying macro names. In the raw NAND subsystem, the brcmnand driver has been "fixed" for old legacy SoCs with an update of the ->exec_op() hook, there has been the introduction of a new controller driver named Loongson-1, and the Qualcomm driver has received quite a few misc fixes as well as a new compatible. Finally, Macornix SPI NOR entries have been cleaned-up and some SFDP table fixups for Macronix MX25L3255E have been merged. Aside from this, there is the usual load of misc improvement, fixes, and yaml conversion" * tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (42 commits) mtd: rawnand: brcmnand: legacy exec_op implementation mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk mtd: nand: brcmnand: fix NAND timeout when accessing eMMC mtd: nand: sunxi: Add randomizer configuration before randomizer enable mtd: spinand: esmt: fix id code for F50D1G41LB mtd: rawnand: brcmnand: remove unused parameters mtd: core: always create master device mtd: rawnand: loongson1: Fix inconsistent refcounting in ls1x_nand_chip_init() mtd: rawnand: loongson1: Fix error code in ls1x_nand_dma_transfer() mtd: rawnand: qcom: Fix read len for onfi param page mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec() mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd() mtd: rawnand: Use non-hybrid PCI devres API mtd: nand: ecc-mxic: Fix use of uninitialized variable ret mtd: spinand: winbond: Add support for W35N02JW and W35N04JW chips mtd: spinand: winbond: Add octal support mtd: spinand: winbond: Add support for W35N01JW in single mode mtd: spinand: winbond: Rename DTR variants ... commit b509c16e1d7cba8d0fd3843f6641fcafb3761432 Merge: dcf9ee9ac4d5c0 5de775df336209 Author: Linus Torvalds Date: Mon Jun 2 11:06:44 2025 -0700 Merge tag 'rpmsg-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: - Remove some dead and unused code from core and virtio modules - Improve the error messages from the Qualcomm SMD driver and initialize an uninitialized variable in the send path * tag 'rpmsg-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send() rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge rpmsg: Remove unused method pointers *send_offchannel rpmsg: virtio: Remove uncallable offchannel functions rpmsg: core: Remove deadcode commit dcf9ee9ac4d5c09c5bc74aba5e93581e93a1ac33 Merge: a0607951116798 5779f6f9a64ffc Author: Linus Torvalds Date: Mon Jun 2 11:04:29 2025 -0700 Merge tag 'rproc-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - Fix resource cleanup in the remoteproc attach error handling code paths - Refactor the various TI K3 drivers to extract and reuse common code between them - Add support in the i.MX remoteproc driver for determining from the firmware if Linux should wait on a "firmware ready" signal at startup - Improve the Xilinx R5F power down mechanism to handle use cases where this is shared with other entities in the system * tag 'rproc-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (46 commits) remoteproc: k3: Refactor release_tsp() functions into common driver remoteproc: k3: Refactor reserved_mem_init() functions into common driver remoteproc: k3: Refactor mem_release() functions into common driver remoteproc: k3: Refactor of_get_memories() functions into common driver remoteproc: k3: Refactor .da_to_va rproc ops into common driver remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driver remoteproc: k3: Refactor .detach rproc ops into common driver remoteproc: k3: Refactor .attach rproc ops into common driver remoteproc: k3: Refactor .stop rproc ops into common driver remoteproc: k3: Refactor .start rproc ops into common driver remoteproc: k3: Refactor .unprepare rproc ops into common driver remoteproc: k3: Refactor .prepare rproc ops into common driver remoteproc: k3-dsp: Assert local reset during .prepare callback remoteproc: k3-dsp: Don't override rproc ops in IPC-only mode remoteproc: k3: Refactor rproc_request_mbox() implementations into common driver remoteproc: k3-m4: Ping the mbox while acquiring the channel remoteproc: k3: Refactor rproc_release() implementation into common driver remoteproc: k3-m4: Introduce central function to release rproc from reset remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets remoteproc: k3: Refactor rproc_reset() implementation into common driver ... commit da12597a1d8c1f91ae509520e9e1bf90648feb93 Author: Ming Lei Date: Mon Jun 2 21:21:13 2025 +0800 selftests: ublk: cover PER_IO_DAEMON in more stress tests We have stress_03, stress_04 and stress_05 for checking new feature vs. stress IO & device removal & ublk server crash & recovery, so let the three existing stress tests cover PER_IO_DAEMON. Then stress_06 can be removed, since the same test function is included in stress_03. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250602132113.1398645-1-ming.lei@redhat.com Reviewed-by: Uday Shankar [axboe: remove test_stress_06.sh from Makefile too] Signed-off-by: Jens Axboe commit a06079511167984f7d25ff09fdfeb2f1582c85dd Merge: cd2e103d57e561 d0b497df02e9b2 Author: Linus Torvalds Date: Mon Jun 2 10:58:00 2025 -0700 Merge tag 'mailbox-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox Pull mailbox updates from Jassi Brar: "Core: - misc cleanup sophgo: - add driver for CV18XX series qcom: - add SM7150 APCS compatible - apcs: added separate clock node imx: - fix tx doorbell send microchip: - misc compile option fix mediatek: - Refine GCE_GCTL_VALUE setting" * tag 'mailbox-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: mailbox: qcom-apcs-ipc: Assign OF node to clock controller child device dt-bindings: mailbox: qcom,apcs: Add separate node for clock-controller dt-bindings: mailbox: qcom: Add the SM7150 APCS compatible mailbox: sophgo: add mailbox driver for CV18XX series SoC dt-bindings: mailbox: add Sophgo CV18XX series SoC mailbox: Use guard/scoped_guard for spinlock mailbox: Use guard/scoped_guard for con_mutex mailbox: Remove devm_mbox_controller_unregister mailbox: Propagate correct error return value mailbox: Not protect module_put with spin_lock_irqsave mailbox: Use dev_err when there is error mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting mailbox: imx: Fix TXDB_V2 sending mailbox: mchp-ipc-sbi: Fix COMPILE_TEST build error commit 167d7ede0007d320a891494be57b635b4c069995 Author: Steven Rostedt Date: Thu May 29 13:57:39 2025 -0400 genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint The tracepoint irq_matrix_alloc_reserved was added but never used. Remove it. Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/ Cc: Juergen Gross Cc: Mathieu Desnoyers Cc: Masami Hiramatsu Link: https://lore.kernel.org/20250529135739.26e5c075@gandalf.local.home Fixes: ec0f7cd273dc4 ("genirq/matrix: Add tracepoints") Reviewed-by: Thomas Gleixner Signed-off-by: Steven Rostedt (Google) commit e27e43a5cbda77d211757eb83101f11f67788204 Author: Steven Rostedt Date: Thu May 29 16:05:50 2025 -0400 xdp: Remove unused mem_return_failed event The change to allow page_pool to handle its own page destruction instead of relying on XDP removed the trace_mem_return_failed() tracepoint caller, but did not remove the mem_return_failed trace event. As trace events take up memory when they are created regardless of if they are used or not, having this unused event around wastes around 5K of memory. Remove the unused event. Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/ Cc: netdev Cc: Jonathan Lemon Cc: Mathieu Desnoyers Cc: Masami Hiramatsu Link: https://lore.kernel.org/20250529160550.1f888b15@gandalf.local.home Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.") Acked-by: Jesper Dangaard Brouer Acked-by: Jakub Kicinski Signed-off-by: Steven Rostedt (Google) commit 5834a597386c59fedc601a81091028074d6ae9a2 Author: Ye Bin Date: Thu May 29 19:19:55 2025 +0800 ftrace: Don't allocate ftrace module map if ftrace is disabled If ftrace is disabled, it is meaningless to allocate a module map. Add a check in allocate_ftrace_mod_map() to not allocate if ftrace is disabled. Link: https://lore.kernel.org/20250529111955.2349189-3-yebin@huaweicloud.com Signed-off-by: Ye Bin Signed-off-by: Steven Rostedt (Google) commit f914b52c379c12288b7623bb814d0508dbe7481d Author: Ye Bin Date: Thu May 29 19:19:54 2025 +0800 ftrace: Fix UAF when lookup kallsym after ftrace disabled The following issue happens with a buggy module: BUG: unable to handle page fault for address: ffffffffc05d0218 PGD 1bd66f067 P4D 1bd66f067 PUD 1bd671067 PMD 101808067 PTE 0 Oops: Oops: 0000 [#1] SMP KASAN PTI Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS RIP: 0010:sized_strscpy+0x81/0x2f0 RSP: 0018:ffff88812d76fa08 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffffffc0601010 RCX: dffffc0000000000 RDX: 0000000000000038 RSI: dffffc0000000000 RDI: ffff88812608da2d RBP: 8080808080808080 R08: ffff88812608da2d R09: ffff88812608da68 R10: ffff88812608d82d R11: ffff88812608d810 R12: 0000000000000038 R13: ffff88812608da2d R14: ffffffffc05d0218 R15: fefefefefefefeff FS: 00007fef552de740(0000) GS:ffff8884251c7000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc05d0218 CR3: 00000001146f0000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ftrace_mod_get_kallsym+0x1ac/0x590 update_iter_mod+0x239/0x5b0 s_next+0x5b/0xa0 seq_read_iter+0x8c9/0x1070 seq_read+0x249/0x3b0 proc_reg_read+0x1b0/0x280 vfs_read+0x17f/0x920 ksys_read+0xf3/0x1c0 do_syscall_64+0x5f/0x2e0 entry_SYSCALL_64_after_hwframe+0x76/0x7e The above issue may happen as follows: (1) Add kprobe tracepoint; (2) insmod test.ko; (3) Module triggers ftrace disabled; (4) rmmod test.ko; (5) cat /proc/kallsyms; --> Will trigger UAF as test.ko already removed; ftrace_mod_get_kallsym() ... strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN); ... The problem is when a module triggers an issue with ftrace and sets ftrace_disable. The ftrace_disable is set when an anomaly is discovered and to prevent any more damage, ftrace stops all text modification. The issue that happened was that the ftrace_disable stops more than just the text modification. When a module is loaded, its init functions can also be traced. Because kallsyms deletes the init functions after a module has loaded, ftrace saves them when the module is loaded and function tracing is enabled. This allows the output of the function trace to show the init function names instead of just their raw memory addresses. When a module is removed, ftrace_release_mod() is called, and if ftrace_disable is set, it just returns without doing anything more. The problem here is that it leaves the mod_list still around and if kallsyms is called, it will call into this code and access the module memory that has already been freed as it will return: strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN); Where the "mod" no longer exists and triggers a UAF bug. Link: https://lore.kernel.org/all/20250523135452.626d8dcd@gandalf.local.home/ Cc: stable@vger.kernel.org Fixes: aba4b5c22cba ("ftrace: Save module init functions kallsyms symbols for tracing") Link: https://lore.kernel.org/20250529111955.2349189-2-yebin@huaweicloud.com Signed-off-by: Ye Bin Signed-off-by: Steven Rostedt (Google) commit aa702923258f2ce5e259b9cb8e746090bb6bf126 Merge: 73c4699a35e61a 3bfb22cecfe6b6 Author: Miquel Raynal Date: Mon Jun 2 18:39:50 2025 +0200 Merge tag 'nand/for-6.16' into mtd/next The SPI NAND subsystem has seen the introduction of DTR operations (the equivalent of DDR transfers), which involved quite a few preparation patches for clarifying macro names. In the raw NAND subsystem, the brcmnand driver has been "fixed" for old legacy SoCs with an update of the ->exec_op() hook, there has been the introduction of a new controller driver named Loongson-1, and the Qualcomm driver has received quite a few misc fixes as well as a new compatible. Aside from this, there is the usual load of misc improvement and fixes. commit 73c4699a35e61a1fff315a25f4299c0b4074944a Merge: 0aa7b390fc40a8 594c8df92b946c Author: Miquel Raynal Date: Mon Jun 2 18:39:35 2025 +0200 Merge tag 'spi-nor/for-6.16' into mtd/next SPI NOR changes for 6.16 Notable changes: - Cleanup some Macronix flash entries. - Add SFDP table fixups for Macronix MX25L3255E. commit a8841dc3dfbf127a19c3612204bd336ee559b9a1 Author: David Lechner Date: Thu May 29 11:53:20 2025 -0500 pwm: axi-pwmgen: fix missing separate external clock Add proper support for external clock to the AXI PWM generator driver. In most cases, the HDL for this IP block is compiled with the default ASYNC_CLK_EN=1. With this option, there is a separate external clock that drives the PWM output separate from the peripheral clock. So the driver should be enabling the "axi" clock to power the peripheral and the "ext" clock to drive the PWM output. When ASYNC_CLK_EN=0, the "axi" clock is also used to drive the PWM output and there is no "ext" clock. Previously, if there was a separate external clock, users had to specify only the external clock and (incorrectly) omit the AXI clock in order to get the correct operating frequency for the PWM output. The devicetree bindings are updated to fix this shortcoming and this patch changes the driver to match the new bindings. To preserve compatibility with any existing dtbs that specify only one clock, we don't require the clock name on the first clock. Fixes: 41814fe5c782 ("pwm: Add driver for AXI PWM generator") Cc: stable@vger.kernel.org Acked-by: Nuno Sá Reviewed-by: Trevor Gamblin Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20250529-pwm-axi-pwmgen-add-external-clock-v3-3-5d8809a7da91@baylibre.com Signed-off-by: Uwe Kleine-König commit e683131e64f71e957ca77743cb3d313646157329 Author: David Lechner Date: Thu May 29 11:53:19 2025 -0500 dt-bindings: pwm: adi,axi-pwmgen: Fix clocks Fix a shortcoming in the bindings that doesn't allow for a separate external clock. The AXI PWMGEN IP block has a compile option ASYNC_CLK_EN that allows the use of an external clock for the PWM output separate from the AXI clock that runs the peripheral. This was missed in the original bindings and so users were writing dts files where the one and only clock specified would be the external clock, if there was one, incorrectly missing the separate AXI clock. The correct bindings are that the AXI clock is always required and the external clock is optional (must be given only when HDL compile option ASYNC_CLK_EN=1). Fixes: 1edf2c2a2841 ("dt-bindings: pwm: Add AXI PWM generator") Cc: stable@vger.kernel.org Signed-off-by: David Lechner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250529-pwm-axi-pwmgen-add-external-clock-v3-2-5d8809a7da91@baylibre.com Signed-off-by: Uwe Kleine-König commit c72def523799a0b054fd7cbbed32509e365db55b Author: Kent Overstreet Date: Sat May 31 19:12:25 2025 -0400 bcachefs: Run check_dirents second time if required If we move a key backwards, we'll need a second pass to run the rest of the fsck checks. Signed-off-by: Kent Overstreet commit a4907d7f3380f19c11a6191feac85b563439012a Author: Kent Overstreet Date: Sun Jun 1 18:24:18 2025 -0400 bcachefs: Run snapshot deletion out of system_long_wq We don't want this running out of the same workqueue, and blocking, writes. Signed-off-by: Kent Overstreet commit e49cf9b54bc8b4c41c7aac8f12adb709f2015470 Author: Kent Overstreet Date: Sat May 31 13:10:43 2025 -0400 bcachefs: Make check_key_has_snapshot safer Snapshot deletion v2 added sentinal values for deleted snapshots, so "key for deleted snapshot" - i.e. snapshot deletion missed something - is safe to repair automatically. But if we find a key for a missing snapshot we have no idea what happened, and we shouldn't delete it unless we're very sure that everything else is consistent. So hook it up to the new bch2_require_recovery_pass(), we'll now only delete if snapshots and subvolumes have recenlty been checked. Signed-off-by: Kent Overstreet commit 0942b852d4070e448231d2e204ac82ad47f5920a Author: Kent Overstreet Date: Sat May 31 13:01:44 2025 -0400 bcachefs: BCH_RECOVERY_PASS_NO_RATELIMIT Add a superblock flag to temporarily disable ratelimiting for a recovery pass. This will be used to make check_key_has_snapshot safer: we don't want to delete a key for a missing snapshot unless we know that the snapshots and subvolumes btrees are consistent, i.e. check_snapshots and check_subvols have run recently. Changing those btrees - creating/deleting a subvolume or snapshot - will set the "disable ratelimit" flag, i.e. ensuring that those passes run if check_key_has_snapshot discovers an error. We're only disabling ratelimiting in the snapshot/subvol delete paths, we're not so concerned about the create paths. Signed-off-by: Kent Overstreet commit a2ffab0e659831761443f3ae6341c30e845dce43 Author: Kent Overstreet Date: Sat May 31 12:48:00 2025 -0400 bcachefs: bch2_require_recovery_pass() Add a helper for requiring that a recovery pass has already run: either run it directly, if we're still in recovery, or if we're not in recovery check if it has run recently and schedule it if it hasn't. Signed-off-by: Kent Overstreet commit 09b9c72bd4b77a954123997377665fb30f1d07e1 Author: Kent Overstreet Date: Wed May 28 11:57:50 2025 -0400 bcachefs: bch_err_throw() Add a tracepoint for any time we return an error and unwind. Signed-off-by: Kent Overstreet commit 36a2fdf7c5c1ccae6ca16cd14067567096cebe17 Author: Kent Overstreet Date: Sat May 31 11:58:11 2025 -0400 bcachefs: Repair code for directory i_size We had a bug due due to an incomplete revert of the patch implementing directory i_size (summing up the size of the dirents), leading to completely screwy i_size values that underflow. Most userspace programs don't seem to care (e.g. du ignores it), but it turns out this broke sshfs, so needs to be repaired. Signed-off-by: Kent Overstreet commit 95fafc0f3407a6446082c11849df585bd3246571 Author: Kent Overstreet Date: Sat May 31 18:32:37 2025 -0400 bcachefs: Kill un-reverted directory i_size code Signed-off-by: Kent Overstreet commit d47db3e63679541f4dd4696ce4661b6917cb9684 Author: Kent Overstreet Date: Sat May 31 18:47:49 2025 -0400 bcachefs: Delete redundant fsck_err() 'inode_has_wrong_backpointer'; we have more specific errors for every case afterwards. Signed-off-by: Kent Overstreet commit 165815c296076132f0399bd892fd879fc597ac83 Author: Kent Overstreet Date: Sat May 31 19:20:33 2025 -0400 bcachefs: Convert BUG() to error Signed-off-by: Kent Overstreet commit b3f3ca04ec3f0587b92fcffa4d581e73b335701a Merge: bae071aa7bcd03 38b1befc7a35a4 Author: Mark Brown Date: Mon Jun 2 16:51:02 2025 +0100 ASoC: Intel: avs: Set of functional fixes Merge series from Cezary Rojewski : Medium range of fixes all avs-driver related. The most important fixes lead the way: 1. For ASoC-hda codec driver, existing RPM manipulation in hda_codec_probe_complete()'s error path is superfluous and leads to RPM usage count underflow if the probe exists early e.g.: build-controls operation fails. 2. Resolve deadlock when DSP-recovery is a consequence of SET_D0IX IPC. The procedure handling IPC timeouts and EXCEPTION_CAUGHT notification shall cancel any D0IX work before proceeding with DSP recovery. If SET_D0IX called from delayed_work is the failing IPC the procedure will deadlock. 3. LINK format (PPLCxFMT) calculation is incorrect. HDAudio transfer types utilize SDxFMT for front-end (HOST) and PPLCxFMT for back-end (LINK) side when setting up the stream. BE's substream->runtime duplicates FE runtime so switch to using BE's hw_params to address incorrect format values on the LINK side when FE and BE formats differ. Below three patches address problems found by Coverity static analyzer: ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw ASoC: Intel: avs: Verify kcalloc() status when setting constraints ASoC: Intel: avs: Verify content returned by parse_int_array() While unlikely in runtime, it's good to keep code resilient. The last few patches are readability/cohesiveness improvements. commit 6a3439a417b910e662c666993798e0691bc81147 Author: David Heimann Date: Sun Jun 1 12:41:16 2025 -0400 ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1 The RODE AI-1 audio interface requires implicit feedback sync between playback endpoint 0x03 and feedback endpoint 0x84 on interface 3, but doesn't advertise this in its USB descriptors. Without this quirk, the device receives audio data but produces no output. Signed-off-by: David Heimann Cc: Link: https://patch.msgid.link/084dc88c-1193-4a94-a002-5599adff936c@app.fastmail.com Signed-off-by: Takashi Iwai commit 3f100f524e75586537e337b34d18c8d604b398e7 Author: Cezary Rojewski Date: Fri May 30 16:13:09 2025 +0200 ALSA: hda: Ignore unsol events for cards being shut down For the classic snd_hda_intel driver, codec->card and bus->card point to the exact same thing. When snd_card_diconnect() fires, bus->shutdown is set thanks to azx_dev_disconnect(). card->shutdown is already set when that happens but both provide basically the same functionality. For the DSP snd_soc_avs driver where multiple codecs are located on multiple cards, bus->shutdown 'shortcut' is not sufficient. One codec card may be unregistered while other codecs are still operational. Proper check in form of card->shutdown must be used to verify whether the codec's card is being shut down. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141309.2943404-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit ab72bfce7647522e01a181e3600c3d14ff5c143e Author: Vijendar Mukunda Date: Thu May 29 11:08:13 2025 +0530 ALSA: hda: Add new pci id for AMD GPU display HD audio controller Add new pci id for AMD GPU display HD audio controller(device id- 0xab40). Signed-off-by: Vijendar Mukunda Reviewed-by: Alex Deucher Link: https://patch.msgid.link/20250529053838.2350071-1-Vijendar.Mukunda@amd.com Signed-off-by: Takashi Iwai commit 9a4e17b59631e55c79ce0efbfc9f9eb85d377c6a Author: Krzysztof Kozlowski Date: Wed May 28 21:44:03 2025 +0200 ALSA: hda: cs35l41: Constify regmap_irq_chip Static 'struct regmap_irq_chip' is not modified so can be changed to const for more safety. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250528194402.567062-2-krzysztof.kozlowski@linaro.org Signed-off-by: Takashi Iwai commit 4919353c7789b8047e06a9b2b943f775a8f72883 Author: Mario Limonciello Date: Tue May 27 12:26:56 2025 -0500 ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock The audio controller in the Lenovo Thinkpad Thunderbolt 3 dock doesn't support reading the sampling rate. Add a quirk for it. Suggested-by: Takashi Iwai Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20250527172657.1972565-1-superm1@kernel.org Signed-off-by: Takashi Iwai commit af6e3defb11a1c67cd462485655b43b5d70524b1 Author: Ilpo Järvinen Date: Mon May 12 00:52:23 2025 +0300 PCI: WARN (not BUG()) when we fail to assign optional resources Resource fitting/assignment code checks if there's a remainder in add_list (aka. realloc_head in the inner functions) using BUG_ON(). This problem typically results in a mere PCI device resource assignment failure which does not warrant using BUG_ON(). The machine could well come up usable even if this condition occurs because the realloc_head relates to resources which are optional anyway. Change BUG_ON() to WARN_ON_ONCE() and free the list if it's not empty. [bhelgaas: subject] Reported-by: Tudor Ambarus Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/linux-pci/5f103643-5e1c-43c6-b8fe-9617d3b5447c@linaro.org Link: https://lore.kernel.org/r/20250511215223.7131-1-ilpo.jarvinen@linux.intel.com commit 1c8a0ed2043c30cee97facd1eb8cff88b6c7ea4a Author: Ilpo Järvinen Date: Mon Apr 7 13:12:14 2025 +0300 PCI: Remove unused pci_printk() include/linux/pci.h provides low-level pci_printk() interface that is not used since the commits fab874e12593 ("PCI/AER: Descope pci_printk() to aer_printk()") and 588021b28642 ("PCI: shpchp: Remove 'shpchp_debug' module parameter"). PCI logging should not use pci_printk() but pci_*() wrappers that follow the usual logging wrapper patterns. Remove pci_printk(). Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20250407101215.1376-1-ilpo.jarvinen@linux.intel.com commit e92e2552858142b60238b9828d802f128e4acccd Author: Benjamin Berg Date: Mon Jun 2 15:00:52 2025 +0200 um: pass FD for memory operations when needed Instead of always sharing the FDs with the userspace process, only hand over the FDs needed for mmap when required. The idea is that userspace might be able to force the stub into executing an mmap syscall, however, it will not be able to manipulate the control flow sufficiently to have access to an FD that would allow mapping arbitrary memory. Security wise, we need to be sure that only the expected syscalls are executed after the kernel sends FDs through the socket. This is currently not the case, as userspace can trivially jump to the rt_sigreturn syscall instruction to execute any syscall that the stub is permitted to do. With this, it can trick the kernel to send the FD, which in turn allows userspace to freely map any physical memory. As such, this is currently *not* secure. However, in principle the approach should be fine with a more strict SECCOMP filter and a careful review of the stub control flow (as userspace can prepare a stack). With some care, it is likely possible to extend the security model to SMP if desired. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-8-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit beddc9fb1cb161e1bf779b180750b648ff9690c7 Author: Benjamin Berg Date: Mon Jun 2 15:00:51 2025 +0200 um: Add SECCOMP support detection and initialization This detects seccomp support, sets the global using_seccomp variable and initilizes the exec registers. The support is only enabled if the seccomp= kernel parameter is set to either "on" or "auto". With "auto" a fallback to ptrace mode will happen if initialization failed. Signed-off-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-7-benjamin@sipsolutions.net [extend help with Kconfig text from v2, use exit syscall instead of libc, remove unneeded mctx_offset assignment, disable on 32-bit for now] Signed-off-by: Johannes Berg commit 406d17c6c370a33cfb54067d9e205305293d4604 Author: Benjamin Berg Date: Mon Jun 2 15:00:50 2025 +0200 um: Implement kernel side of SECCOMP based process handling This adds the kernel side of the seccomp based process handling. Co-authored-by: Johannes Berg Signed-off-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-6-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 8420e08fe3a594b6ffa07705ac270faa2ed452c5 Author: Benjamin Berg Date: Mon Jun 2 15:00:49 2025 +0200 um: Track userspace children dying in SECCOMP mode When in seccomp mode, we would hang forever on the futex if a child has died unexpectedly. In contrast, ptrace mode will notice it and kill the corresponding thread when it fails to run it. Fix this issue using a new IRQ that is fired after a SIGCHLD and keeping an (internal) list of all MMs. In the IRQ handler, find the affected MM and set its PID to -1 as well as the futex variable to FUTEX_IN_KERN. This, together with futex returning -EINTR after the signal is sufficient to implement a race-free detection of a child dying. Note that this also enables IRQ handling while starting a userspace process. This should be safe and SECCOMP requires the IRQ in case the process does not come up properly. Signed-off-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-5-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit b1e1bd2e69430445021394536740352be1b41cd0 Author: Benjamin Berg Date: Mon Jun 2 15:00:48 2025 +0200 um: Add helper functions to get/set state for SECCOMP When not using ptrace, we need to both save and restore registers through the mcontext as provided by the host kernel to our signal handlers. Add corresponding functions to store the state to an mcontext and helpers to access the mcontext of the subprocess through the stub data. Signed-off-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-4-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit dac494bf54f764a114f16621ef04f534dd754ac1 Author: Benjamin Berg Date: Mon Jun 2 15:00:47 2025 +0200 um: Add stub side of SECCOMP/futex based process handling This adds the stub side for the new seccomp process management code. In this case we do register save/restore through the signal handler mcontext. Add special code for handling TLS, which for x86_64 means setting the FS_BASE/GS_BASE registers while for i386 it means calling the set_thread_area syscall. Co-authored-by: Johannes Berg Signed-off-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-3-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 247ed9e4a6869f3bf07bffd277a341a6833abdbc Author: Benjamin Berg Date: Mon Jun 2 15:00:46 2025 +0200 um: Move faultinfo extraction into userspace routine The segv handler is called slightly differently depending on whether PTRACE_FULL_FAULTINFO is set or not (32bit vs. 64bit). The only difference is that we don't try to pass the registers and instruction pointer to the segv handler. It would be good to either document or remove the difference, but I do not know why this difference exists. And, passing NULL can even result in a crash. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250602130052.545733-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 10f885d63a0efd50b0d22bf27eb3cf727838e99e Author: Xi Ruoyao Date: Mon Jun 2 12:33:21 2025 +0800 arm64: Add override for MPAM As the message of the commit 09e6b306f3ba ("arm64: cpufeature: discover CPU support for MPAM") already states, if a buggy firmware fails to either enable MPAM or emulate the trap as if it were disabled, the kernel will just fail to boot. While upgrading the firmware should be the best solution, we have some hardware of which the vendor have made no response 2 months after we requested a firmware update. Allow overriding it so our devices don't become some e-waste. Cc: James Morse Cc: Marc Zyngier Cc: Will Deacon Cc: Shameer Kolothum Cc: Mingcong Bai Cc: Shaopeng Tan Cc: Ben Horgan Signed-off-by: Xi Ruoyao Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20250602043723.216338-1-xry111@xry111.site Signed-off-by: Will Deacon commit 85f6d5b729eaace1549f1dcc284d9865f2c3ec02 Author: Benjamin Marzinski Date: Fri May 30 10:50:32 2025 -0400 dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock dm_set_device_limits() should check q->limits.features for BLK_FEAT_ATOMIC_WRITES while holding q->limits_lock, like it does for the rest of the queue limits. Fixes: b7c18b17a173 ("dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits") Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 4b634918384c0f84c33aeb4dd9fd4c38e7be5ccb Author: Ryan Roberts Date: Fri May 30 16:23:47 2025 +0100 arm64/mm: Close theoretical race where stale TLB entry remains valid Commit 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries") describes a race that, prior to the commit, could occur between reclaim and operations such as mprotect() when using reclaim's tlbbatch mechanism. See that commit for details but the summary is: """ Nadav Amit identified a theoritical race between page reclaim and mprotect due to TLB flushes being batched outside of the PTL being held. He described the race as follows: CPU0 CPU1 ---- ---- user accesses memory using RW PTE [PTE now cached in TLB] try_to_unmap_one() ==> ptep_get_and_clear() ==> set_tlb_ubc_flush_pending() mprotect(addr, PROT_READ) ==> change_pte_range() ==> [ PTE non-present - no flush ] user writes using cached RW PTE ... try_to_unmap_flush() """ The solution was to insert flush_tlb_batched_pending() in mprotect() and friends to explcitly drain any pending reclaim TLB flushes. In the modern version of this solution, arch_flush_tlb_batched_pending() is called to do that synchronisation. arm64's tlbbatch implementation simply issues TLBIs at queue-time (arch_tlbbatch_add_pending()), eliding the trailing dsb(ish). The trailing dsb(ish) is finally issued in arch_tlbbatch_flush() at the end of the batch to wait for all the issued TLBIs to complete. Now, the Arm ARM states: """ The completion of the TLB maintenance instruction is guaranteed only by the execution of a DSB by the observer that performed the TLB maintenance instruction. The execution of a DSB by a different observer does not have this effect, even if the DSB is known to be executed after the TLB maintenance instruction is observed by that different observer. """ arch_tlbbatch_add_pending() and arch_tlbbatch_flush() conform to this requirement because they are called from the same task (either kswapd or caller of madvise(MADV_PAGEOUT)), so either they are on the same CPU or if the task was migrated, __switch_to() contains an extra dsb(ish). HOWEVER, arm64's arch_flush_tlb_batched_pending() is also implemented as a dsb(ish). But this may be running on a CPU remote from the one that issued the outstanding TLBIs. So there is no architectural gurantee of synchonization. Therefore we are still vulnerable to the theoretical race described in Commit 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries"). Fix this by flushing the entire mm in arch_flush_tlb_batched_pending(). This aligns with what the other arches that implement the tlbbatch feature do. Cc: Fixes: 43b3dfdd0455 ("arm64: support batched/deferred tlb shootdown during page reclamation/migration") Signed-off-by: Ryan Roberts Link: https://lore.kernel.org/r/20250530152445.2430295-1-ryan.roberts@arm.com Signed-off-by: Will Deacon commit dc0a083948040ff364d065da8bb50c29f77a39ad Author: Ard Biesheuvel Date: Sat May 31 14:30:05 2025 +0200 arm64: Work around convergence issue with LLD linker LLD will occasionally error out with a '__init_end does not converge' error if INIT_IDMAP_DIR_SIZE is defined in terms of _end, as this results in a circular dependency. Counter this by dimensioning the initial IDMAP page tables based on a new boundary marker 'kimage_limit', and define it such that its value should not change as a result of the initdata segment being pushed over a 64k segment boundary due to changes in INIT_IDMAP_DIR_SIZE, provided that its value doesn't change by more than 2M between linker passes. Reported-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250531123005.3866382-2-ardb+git@google.com Signed-off-by: Will Deacon commit e931d3a9d5200bae9d938be2582072b2898e37f7 Author: Pavel Begunkov Date: Fri May 23 23:37:39 2025 +0100 MAINTAINERS: remove myself from io_uring Disassociate my name from the project over disagreements on development practices. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/814ec73b73323a8e1c87643d193a73f467fb191f.1748034476.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e21560b7d33c4f692cc9cd5b75ff09024f5a69d2 Author: Ard Biesheuvel Date: Thu May 29 09:35:08 2025 +0200 arm64: Disable LLD linker ASSERT()s for the time being It turns out [1] that the way LLD handles ASSERT()s in the linker script can result in spurious failures, so disable them for the newly introduced BSS symbol export checks. Since we're not aware of any issues with the existing assertions in vmlinux.lds.S, leave those alone for now so that they can continue to provide useful coverage. A linker fix [2] is due to land in version 21 of LLD. Link: https://lore.kernel.org/r/202505261019.OUlitN6m-lkp@intel.com [1] Link: https://github.com/llvm/llvm-project/commit/5859863bab7f [2] Link: https://github.com/ClangBuiltLinux/linux/issues/2094 Signed-off-by: Ard Biesheuvel Tested-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505261019.OUlitN6m-lkp@intel.com/ Link: https://lore.kernel.org/r/20250529073507.2984959-2-ardb+git@google.com Signed-off-by: Will Deacon commit 3382a1ed7f778db841063f5d7e317ac55f9e7f72 Author: Shiming Cheng Date: Fri May 30 09:26:08 2025 +0800 net: fix udp gso skb_segment after pull from frag_list Commit a1e40ac5b5e9 ("net: gso: fix udp gso fraglist segmentation after pull from frag_list") detected invalid geometry in frag_list skbs and redirects them from skb_segment_list to more robust skb_segment. But some packets with modified geometry can also hit bugs in that code. We don't know how many such cases exist. Addressing each one by one also requires touching the complex skb_segment code, which risks introducing bugs for other types of skbs. Instead, linearize all these packets that fail the basic invariants on gso fraglist skbs. That is more robust. If only part of the fraglist payload is pulled into head_skb, it will always cause exception when splitting skbs by skb_segment. For detailed call stack information, see below. Valid SKB_GSO_FRAGLIST skbs - consist of two or more segments - the head_skb holds the protocol headers plus first gso_size - one or more frag_list skbs hold exactly one segment - all but the last must be gso_size Optional datapath hooks such as NAT and BPF (bpf_skb_pull_data) can modify fraglist skbs, breaking these invariants. In extreme cases they pull one part of data into skb linear. For UDP, this causes three payloads with lengths of (11,11,10) bytes were pulled tail to become (12,10,10) bytes. The skbs no longer meets the above SKB_GSO_FRAGLIST conditions because payload was pulled into head_skb, it needs to be linearized before pass to regular skb_segment. skb_segment+0xcd0/0xd14 __udp_gso_segment+0x334/0x5f4 udp4_ufo_fragment+0x118/0x15c inet_gso_segment+0x164/0x338 skb_mac_gso_segment+0xc4/0x13c __skb_gso_segment+0xc4/0x124 validate_xmit_skb+0x9c/0x2c0 validate_xmit_skb_list+0x4c/0x80 sch_direct_xmit+0x70/0x404 __dev_queue_xmit+0x64c/0xe5c neigh_resolve_output+0x178/0x1c4 ip_finish_output2+0x37c/0x47c __ip_finish_output+0x194/0x240 ip_finish_output+0x20/0xf4 ip_output+0x100/0x1a0 NF_HOOK+0xc4/0x16c ip_forward+0x314/0x32c ip_rcv+0x90/0x118 __netif_receive_skb+0x74/0x124 process_backlog+0xe8/0x1a4 __napi_poll+0x5c/0x1f8 net_rx_action+0x154/0x314 handle_softirqs+0x154/0x4b8 [118.376811] [C201134] rxq0_pus: [name:bug&]kernel BUG at net/core/skbuff.c:4278! [118.376829] [C201134] rxq0_pus: [name:traps&]Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP [118.470774] [C201134] rxq0_pus: [name:mrdump&]Kernel Offset: 0x178cc00000 from 0xffffffc008000000 [118.470810] [C201134] rxq0_pus: [name:mrdump&]PHYS_OFFSET: 0x40000000 [118.470827] [C201134] rxq0_pus: [name:mrdump&]pstate: 60400005 (nZCv daif +PAN -UAO) [118.470848] [C201134] rxq0_pus: [name:mrdump&]pc : [0xffffffd79598aefc] skb_segment+0xcd0/0xd14 [118.470900] [C201134] rxq0_pus: [name:mrdump&]lr : [0xffffffd79598a5e8] skb_segment+0x3bc/0xd14 [118.470928] [C201134] rxq0_pus: [name:mrdump&]sp : ffffffc008013770 Fixes: a1e40ac5b5e9 ("gso: fix udp gso fraglist segmentation after pull from frag_list") Signed-off-by: Shiming Cheng Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 57cf46cd1fe351846e1b065ca9546eef66675ecd Author: Gabor Juhos Date: Tue May 27 13:08:16 2025 +0200 spi: spi-qpic-snand: document the limited bit error reporting capability The QPIC hardware is not capable of reporting the exact number of the corrected bit errors, it only reports the number of the corrected bytes. Document this behaviour in the code, and also issue a warning message to inform the user about it. No functional changes. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250527-qpic-snand-limited-biterr-caps-v1-1-61f7cf87be1e@gmail.com Signed-off-by: Mark Brown commit bae071aa7bcd034054cec91666c80f812adeccd9 Author: Yuuki NAGAO Date: Sat May 31 23:13:41 2025 +0900 ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init The removed dai_link->platform component cause a fail which is exposed at runtime. (ex: when a sound tool is used) This patch re-adds the dai_link->platform component to have a full card registered. Before this patch: $ aplay -l **** List of PLAYBACK Hardware Devices **** card 1: HDMI [HDMI], device 0: HDMI snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 $ speaker-test -D plughw:1,0 -t sine speaker-test 1.2.8 Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Sine wave rate is 440.0000Hz Playback open error: -22,Invalid argument After this patch which restores the platform component: $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: HDMI [HDMI], device 0: HDMI snd-soc-dummy-dai-0 [HDMI snd-soc-dummy-dai-0] Subdevices: 0/1 Subdevice #0: subdevice #0 -> Resolve the playback error. Fixes: 3b0db249cf8f ("ASoC: ti: remove unnecessary dai_link->platform") Signed-off-by: Yuuki NAGAO Link: https://patch.msgid.link/20250531141341.81164-1-wf.yn386@gmail.com Signed-off-by: Mark Brown commit 59a4d9a9efd921ae2b722ffa52217124bcbc0acf Author: Cezary Rojewski Date: Fri May 30 16:12:31 2025 +0200 ASoC: pcm: Do not open FEs with no BEs connected The check is performed in prepare-step, that is dpcm_fe_dai_prepare() but that is very late - code operates on invalid configuration from dpcm_fe_dai_open() till it gets there. Relocate the check to the open-step to avoid any invalid scenarios. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141231.2943351-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 9adf2de86611ac108d07e769a699556d87f052e2 Author: Shuming Fan Date: Mon Jun 2 16:58:51 2025 +0800 ASoC: rt1320: fix speaker noise when volume bar is 100% This patch updates the settings to fix the speaker noise. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20250602085851.4081886-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 38b1befc7a35a475d90ec32bfbe319f4412880a1 Author: Cezary Rojewski Date: Fri May 30 16:10:25 2025 +0200 ASoC: Intel: avs: Include missing string.h File loader.c utilizes strscpy(). Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 93e246b6769bdacb09cfff4ea0f00fe5ab4f0d7a Author: Cezary Rojewski Date: Fri May 30 16:10:23 2025 +0200 ASoC: Intel: avs: Verify content returned by parse_int_array() The first element of the returned array stores its length. If it is 0, any manipulation beyond the element at index 0 ends with null-ptr-deref. Fixes: 5a565ba23abe ("ASoC: Intel: avs: Probing and firmware tracing over debugfs") Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 5f342aeee2724d31046172eb5caab8e0e8afd57d Author: Cezary Rojewski Date: Fri May 30 16:10:22 2025 +0200 ASoC: Intel: avs: Verify kcalloc() status when setting constraints All memory operations shall be checked. Fixes: f2f847461fb7 ("ASoC: Intel: avs: Constrain path based on BE capabilities") Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 9e3285be55e6c0829e451b4a341e3059da47ec9d Author: Amadeusz Sławiński Date: Fri May 30 16:10:21 2025 +0200 ASoC: Intel: avs: Fix paths in MODULE_FIRMWARE hints The binaries for cAVS architecture are located in "intel/avs" subdirectory, not "intel". Fixes: 94aa347d34e0 ("ASoC: Intel: avs: Add MODULE_FIRMWARE to inform about FW") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 2f78724d4f0c665c83e202e3989d5333a2cb1036 Author: Cezary Rojewski Date: Fri May 30 16:10:20 2025 +0200 ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw Search result of avs_dai_find_path_template() shall be verified before being used. As 'template' is already known when avs_hw_constraints_init() is fired, drop the search entirely. Fixes: f2f847461fb7 ("ASoC: Intel: avs: Constrain path based on BE capabilities") Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 347c8d6db7c9d65d93ef226849b273823f54eaea Author: Cezary Rojewski Date: Fri May 30 16:10:19 2025 +0200 ASoC: Intel: avs: Fix PPLCxFMT calculation HDAudio transfer types utilize SDxFMT for front-end (HOST) and PPLCxFMT for back-end (LINK) side when setting up the stream. BE's substream->runtime duplicates FE runtime so switch to using BE's hw_params to address incorrect format values on the LINK side when FE and BE formats differ. The problem is introduced with commit d070002a20fc ("ASoC: Intel: avs: HDA PCM BE operations") but the code has been shuffled around since then so direct 'Fixes:' tag does not apply. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 9ad1f3cd0d60444c69948854c7e50d2a61b63755 Author: Cezary Rojewski Date: Fri May 30 16:10:18 2025 +0200 ASoC: Intel: avs: Fix deadlock when the failing IPC is SET_D0IX The procedure handling IPC timeouts and EXCEPTION_CAUGHT notification shall cancel any D0IX work before proceeding with DSP recovery. If SET_D0IX called from delayed_work is the failing IPC the procedure will deadlock. Conditionally skip cancelling the work to fix that. Fixes: 335c4cbd201d ("ASoC: Intel: avs: D0ix power state support") Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ff0045de4ee0288dec683690f66f2f369b7d3466 Author: Cezary Rojewski Date: Fri May 30 16:10:17 2025 +0200 ASoC: codecs: hda: Fix RPM usage count underflow RPM manipulation in hda_codec_probe_complete()'s error path is superfluous and leads to RPM usage count underflow if the build-controls operation fails. hda_codec_probe_complete() is called in: 1) hda_codec_probe() for all non-HDMI codecs 2) in card->late_probe() for HDMI codecs Error path for hda_codec_probe() takes care of bus' RPM already. For 2) if late_probe() fails, ASoC performs card cleanup what triggers hda_codec_remote() - same treatment is in 1). Fixes: b5df2a7dca1c ("ASoC: codecs: Add HD-Audio codec driver") Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141025.2942936-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b76d18b53a3f52880452a58cc982910abcccd111 Author: Tiwei Bie Date: Tue May 6 12:51:17 2025 +0800 um: vector: Use mac_pton() for MAC address parsing Use mac_pton() instead of custom approach. Suggested-by: Geert Uytterhoeven Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250506045117.1896661-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 477c1c21da0d6ffc4dfe924178b90377f2938ba5 Author: Tiwei Bie Date: Tue May 6 12:51:16 2025 +0800 um: vector: Clean up and modernize log messages Use pr_*() and netdev_*() to print log messages. While at it, join split messages for easier grepping. Suggested-by: Geert Uytterhoeven Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250506045117.1896661-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 10eabeca45fdfa48e8efd2c7fc0fd97314b65266 Author: Johannes Berg Date: Mon May 5 10:33:59 2025 +0200 um: chan_kern: use raw spinlock for irqs_to_free_lock Since this is called deep in the ARCH=um IRQ infrastructure it must use a raw spinlock. It's not really part of the driver, but rather the core UML IRQ code. Link: https://patch.msgid.link/20250505103358.ae7dc659f8b4.I64ca7aece30e0b4b0b5b35ad89cdd63db197c0ce@changeid Signed-off-by: Johannes Berg commit bb13e79cc9ef3b4f18b905df0ab75f6f92725558 Author: Lukas Bulwahn Date: Wed May 7 09:10:04 2025 +0200 MAINTAINERS: remove obsolete file entry in TUN/TAP DRIVER Commit 65eaac591b75 ("um: Remove obsolete legacy network transports") removes the directory arch/um/os-Linux/drivers/, but misses to remove the file entry in TUN/TAP DRIVER referring to that directory. Remove this obsolete file entry. While at it, put the section name in capital letters. Signed-off-by: Lukas Bulwahn Reviewed-by: Tiwei Bie Link: https://patch.msgid.link/20250507071004.35120-1-lukas.bulwahn@redhat.com Signed-off-by: Johannes Berg commit fd054188999ff19746cc09f4e0f196a113964db9 Author: Yongting Lin Date: Tue May 27 23:12:22 2025 +0800 um: Fix tgkill compile error on old host OSes tgkill is a quite old syscall since kernel 2.5.75, but unfortunately glibc doesn't support it before 2.30. Thus some systems fail to compile the latest UserMode Linux. Here is the compile error I encountered when I tried to compile UML in my system shipped with glibc-2.28. CALL scripts/checksyscalls.sh CC arch/um/os-Linux/sigio.o In file included from arch/um/os-Linux/sigio.c:17: arch/um/os-Linux/sigio.c: In function ‘write_sigio_thread’: arch/um/os-Linux/sigio.c:49:19: error: implicit declaration of function ‘tgkill’; did you mean ‘kill’? [-Werror=implicit-function-declaration] CATCH_EINTR(r = tgkill(pid, pid, SIGIO)); ^~~~~~ ./arch/um/include/shared/os.h:21:48: note: in definition of macro ‘CATCH_EINTR’ #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) ^~~~ cc1: some warnings being treated as errors Fix it by Replacing glibc call with raw syscall. Fixes: 33c9da5dfb18 ("um: Rewrite the sigio workaround based on epoll and tgkill") Signed-off-by: Yongting Lin Link: https://patch.msgid.link/20250527151222.40371-1-linyongting@gmail.com Signed-off-by: Johannes Berg commit b8c9c3b822fe8e033b9802516f6466099d915488 Author: Arnd Bergmann Date: Fri May 9 10:40:52 2025 +0200 um: stop using PCI port I/O arch/um is one of the last users of CONFIG_GENERIC_IOMAP, but upon closer look it appears that the PCI host bridge does not register any port I/O, and the absense of both custom inb/outb functions and a PCI_IOBASE constant means that actually trying to use port I/O results on a NULL pointer access. Build testing with clang confirms this by warning about this exact problem: include/asm-generic/io.h:549:31: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic] 549 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ Remove all the Kconfig selects that refer to legacy port I/O and instead just build the normal MMIO path that is emulated by the virtio PCI host. Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250509084125.1488601-1-arnd@kernel.org Signed-off-by: Johannes Berg commit 0323a5127e7c534cfc88efe0f850a0cb777e938b Author: Jesus Narvaez Date: Wed May 28 16:05:51 2025 -0700 drm/i915/guc: Handle race condition where wakeref count drops below 0 There is a rare race condition when preparing for a reset where guc_lrc_desc_unpin() could be in the process of deregistering a context while a different thread is scrubbing outstanding contexts and it alters the context state and does a wakeref put. Then, if there is a failure with deregister_context(), a second wakeref put could occur. As a result the wakeref count could drop below 0 and fail an INTEL_WAKEREF_BUG_ON() check. Therefore if there is a failure with deregister_context(), undo the context state changes and do a wakeref put only if the context was set to be destroyed earlier. v2: Expand comment to better explain change. (Daniele) v3: Removed addition to the original comment. (Daniele) Fixes: 2f2cc53b5fe7 ("drm/i915/guc: Close deregister-context race against CT-loss") Signed-off-by: Jesus Narvaez Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Anshuman Gupta Cc: Mousumi Jana Cc: Rodrigo Vivi Cc: Matt Roper Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: John Harrison Link: https://lore.kernel.org/r/20250528230551.1855177-1-jesus.narvaez@intel.com (cherry picked from commit f36a75aba1c3176d177964bca76f86a075d2943a) Signed-off-by: Joonas Lahtinen commit 57d63c6cd0851d3af612a556ec61b0f2a9bd522f Author: Jouni Högander Date: Mon May 26 15:05:11 2025 +0300 drm/i915/psr: Fix using wrong mask in REG_FIELD_PREP Wrong mask is used in PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION and PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION. Fixes: 295099580f04 ("drm/i915/psr: Add missing ALPM AUX-Less register definitions") Signed-off-by: Jouni Högander Reviewed-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250526120512.1702815-12-jouni.hogander@intel.com (cherry picked from commit 8097128a40ff378761034ec72cdbf6f46e466dc0) Signed-off-by: Joonas Lahtinen commit c557fd1050f6691dde36818dfc1a4c415c42901b Author: Jesus Narvaez Date: Wed May 14 15:52:24 2025 -0700 drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h When sending a H2G message where a reply is expected in guc_submission_send_busy_loop(), outstanding_submission_g2h is incremented before the send. However, if there is an error sending the message, outstanding_submission_g2h is decremented without checking if a reply is expected. Therefore, check if reply is expected when there is a failure before decrementing outstanding_submission_g2h. Fixes: 2f2cc53b5fe7 ("drm/i915/guc: Close deregister-context race against CT-loss") Signed-off-by: Jesus Narvaez Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Anshuman Gupta Cc: Mousumi Jana Cc: Rodrigo Vivi Cc: Matt Roper Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: John Harrison Link: https://lore.kernel.org/r/20250514225224.4142684-1-jesus.narvaez@intel.com (cherry picked from commit a6a26786f22a4ab0227bcf610510c4c9c2df0808) Signed-off-by: Joonas Lahtinen commit 34a149a02b5f1eb788d1f79252fccc7028e3856b Author: Harald Freudenberger Date: Wed May 28 10:30:32 2025 +0200 s390/crypto: Select crypto engine in Kconfig when PAES is chosen The s390 PAES crypto algorithm has a dependency to the crypto engine. So enable the crypto engine via SELECT CRYPTO_ENGINE in drivers/crypto/Kconfig when CRYPTO_PAES_S390 is chosen. Fixes: 6cd87cb5ef6c ("s390/crypto: Rework protected key AES for true asynch support") Reported-by: Thomas Huth Closes: https://lore.kernel.org/linux-s390/f958f869-8da3-48d9-a118-f3cf9a9ea75c@redhat.com/ Reviewed-by: Holger Dengler Signed-off-by: Harald Freudenberger Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20250528083032.224430-1-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 61374cc145f4a56377eaf87c7409a97ec7a34041 Merge: 438e22801b1958 4d62121ce9b58e Author: Paolo Bonzini Date: Mon Jun 2 03:05:29 2025 -0400 Merge tag 'kvmarm-fixes-6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.16, take #1 - Make the irqbypass hooks resilient to changes in the GSI<->MSI routing, avoiding behind stale vLPI mappings being left behind. The fix is to resolve the VGIC IRQ using the host IRQ (which is stable) and nuking the vLPI mapping upon a routing change. - Close another VGIC race where vCPU creation races with VGIC creation, leading to in-flight vCPUs entering the kernel w/o private IRQs allocated. - Fix a build issue triggered by the recently added workaround for Ampere's AC04_CPU_23 erratum. - Correctly sign-extend the VA when emulating a TLBI instruction potentially targeting a VNCR mapping. - Avoid dereferencing a NULL pointer in the VGIC debug code, which can happen if the device doesn't have any mapping yet. commit 438e22801b1958f86883812af70d402eda29c4f5 Author: Paolo Bonzini Date: Fri May 30 03:45:13 2025 -0400 rtmutex_api: provide correct extern functions Commit fb49f07ba1d9 ("locking/mutex: implement mutex_lock_killable_nest_lock") changed the set of functions that mutex.c defines when CONFIG_DEBUG_LOCK_ALLOC is set. - it removed the "extern" declaration of mutex_lock_killable_nested from include/linux/mutex.h, and replaced it with a macro since it could be treated as a special case of _mutex_lock_killable. It also removed a definition of the function in kernel/locking/mutex.c. - likewise, it replaced mutex_trylock() with the more generic mutex_trylock_nest_lock() and replaced mutex_trylock() with a macro. However, it left the old definitions in place in kernel/locking/rtmutex_api.c, which causes failures when building with CONFIG_RT_MUTEXES=y. Bring over the changes. Fixes: fb49f07ba1d9 ("locking/mutex: implement mutex_lock_killable_nest_lock") Reported-by: Randy Dunlap Tested-by: Randy Dunlap Cc: Peter Zijlstra Signed-off-by: Paolo Bonzini commit 4f9786035f9e519db41375818e1d0b5f20da2f10 Merge: ca39500f6af9cf a95ef0199e80f3 Author: Dmitry Torokhov Date: Sun Jun 1 21:41:07 2025 -0700 Merge branch 'next' into for-linus Prepare input updates for 6.16 merge window. commit 1c1df79ccf5615a007cb11ff30e997e58a9fa79a Merge: 84e2f918550e10 30837a49bd0aba Author: Dave Airlie Date: Mon Jun 2 11:56:00 2025 +1000 Merge tag 'amd-drm-fixes-6.16-2025-05-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.16-2025-05-29: amdgpu: - UserQ fixes - SMU 13.x fixes - VCN fixes - JPEG fixes - Misc cleanups - runtime pm fix - DCN 4.0.1 fixes - Misc display fixes - ISP fix - VRAM manager fix - RAS fixes amdkfd: - SVM fix - Misc cleanups - Ref leak fix - WPTR BO fix radeon: - Misc cleanups Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250529205215.6790-1-alexander.deucher@amd.com commit 037e1bae588eacf98a0fedf52a7b72f14bbf0b26 Author: Henrique Carvalho Date: Wed May 28 17:30:03 2025 -0300 smb: client: use ParentLeaseKey in cifs_do_create Implement ParentLeaseKey logic in cifs_do_create() by looking up the parent cfid, copying its lease key into the fid struct, and setting the appropriate lease flag. Fixes: f047390a097e ("CIFS: Add create lease v2 context for SMB3") Signed-off-by: Henrique Carvalho Signed-off-by: Steve French commit 0f220d30c6fd04d3616737d8cdb0f8c7a76ee995 Author: Henrique Carvalho Date: Thu May 8 13:37:50 2025 -0300 smb: client: use ParentLeaseKey in open_cached_dir Implement ParentLeaseKey logic in open_cached_dir() by looking up the parent cfid, copying its lease key into the fid struct, and setting the appropriate lease flag. Fixes: f047390a097e ("CIFS: Add create lease v2 context for SMB3") Signed-off-by: Henrique Carvalho Signed-off-by: Steve French commit 51b78ffb803657fe38788d5715eee591cd7c0740 Author: Henrique Carvalho Date: Thu May 8 13:09:51 2025 -0300 smb: client: add ParentLeaseKey support According to MS-SMB2 3.2.4.3.8, when opening a file the client must lookup its parent directory, copy that entry’s LeaseKey into ParentLeaseKey, and set SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET. Extend lease context functions to carry a parent_lease_key and lease_flags and to add them to the lease context buffer accordingly in smb3_create_lease_buf. Also add a parent_lease_key field to struct cifs_fid and lease_flags to cifs_open_parms. Only applies to the SMB 3.x dialect family. Fixes: f047390a097e ("CIFS: Add create lease v2 context for SMB3") Signed-off-by: Henrique Carvalho Signed-off-by: Steve French commit a3e771afbb3bce91c8296828304903e7348003fe Author: Pali Rohár Date: Tue Dec 31 16:06:22 2024 +0100 cifs: Fix cifs_query_path_info() for Windows NT servers For TRANS2 QUERY_PATH_INFO request when the path does not exist, the Windows NT SMB server returns error response STATUS_OBJECT_NAME_NOT_FOUND or ERRDOS/ERRbadfile without the SMBFLG_RESPONSE flag set. Similarly it returns STATUS_DELETE_PENDING when the file is being deleted. And looks like that any error response from TRANS2 QUERY_PATH_INFO does not have SMBFLG_RESPONSE flag set. So relax check in check_smb_hdr() for detecting if the packet is response for this special case. This change fixes stat() operation against Windows NT SMB servers and also all operations which depends on -ENOENT result from stat like creat() or mkdir(). Signed-off-by: Pali Rohár Signed-off-by: Steve French commit 56e84c64fc257a95728ee73165456b025c48d408 Author: Pali Rohár Date: Thu Dec 26 19:55:13 2024 +0100 cifs: Fix validation of SMB1 query reparse point response Validate the SMB1 query reparse point response per [MS-CIFS] section 2.2.7.2 NT_TRANSACT_IOCTL. NT_TRANSACT_IOCTL response contains one word long setup data after which is ByteCount member. So check that SetupCount is 1 before trying to read and use ByteCount member. Output setup data contains ReturnedDataLen member which is the output length of executed IOCTL command by remote system. So check that output was not truncated before transferring over network. Change MaxSetupCount of NT_TRANSACT_IOCTL request from 4 to 1 as io_rsp structure already expects one word long output setup data. This should prevent server sending incompatible structure (in case it would be extended in future, which is unlikely). Change MaxParameterCount of NT_TRANSACT_IOCTL request from 2 to 0 as NT IOCTL does not have any documented output parameters and this function does not parse any output parameters at all. Fixes: ed3e0a149b58 ("smb: client: implement ->query_reparse_point() for SMB1") Signed-off-by: Pali Rohár Signed-off-by: Steve French commit 89381c72d52094988e11d23ef24a00066a0fa458 Author: Pali Rohár Date: Sat Nov 2 17:58:31 2024 +0100 cifs: Correctly set SMB1 SessionKey field in Session Setup Request [MS-CIFS] specification in section 2.2.4.53.1 where is described SMB_COM_SESSION_SETUP_ANDX Request, for SessionKey field says: The client MUST set this field to be equal to the SessionKey field in the SMB_COM_NEGOTIATE Response for this SMB connection. Linux SMB client currently set this field to zero. This is working fine against Windows NT SMB servers thanks to [MS-CIFS] product behavior <94>: Windows NT Server ignores the client's SessionKey. For compatibility with [MS-CIFS], set this SessionKey field in Session Setup Request to value retrieved from Negotiate response. Signed-off-by: Pali Rohár Signed-off-by: Steve French commit 6510ef4230b68c960309e0c1d6eb3e32eb785142 Author: Pali Rohár Date: Sun Oct 6 19:24:29 2024 +0200 cifs: Fix encoding of SMB1 Session Setup NTLMSSP Request in non-UNICODE mode SMB1 Session Setup NTLMSSP Request in non-UNICODE mode is similar to UNICODE mode, just strings are encoded in ASCII and not in UTF-16. With this change it is possible to setup SMB1 session with NTLM authentication in non-UNICODE mode with Windows SMB server. This change fixes mounting SMB1 servers with -o nounicode mount option together with -o sec=ntlmssp mount option (which is the default sec=). Signed-off-by: Pali Rohár Signed-off-by: Steve French commit 3d8b44b104fb5f93a853ae34fbcf8d840e4482f5 Author: Alexandre Mergnat Date: Mon Apr 28 16:29:55 2025 +0200 rtc: mt6359: Add mt6357 support The MT6357 PMIC contains the same RTC as MT6358 which allows to add support for it trivially by just complementing the list of compatibles. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Acked-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250428-rtc-mt6357-v1-1-31f673b0a723@baylibre.com Signed-off-by: Alexandre Belloni commit ccb2dba3c19f04d2203a4b630180bf50fe710d22 Author: Uwe Kleine-König Date: Mon Apr 28 12:06:51 2025 +0200 rtc: test: Test date conversion for dates starting in 1900 While the RTC framework intends to only handle dates after 1970 for consumers, time conversion must also work for earlier dates to cover e.g. storing dates beyond an RTC's range_max. This is most relevant for the rtc-mt6397 driver that has range_min = RTC_TIMESTAMP_BEGIN_1900; range_max = mktime64(2027, 12, 31, 23, 59, 59); and so needs working support for timestamps in 1900 starting in less than three years. So shift the tested interval of timestamps to also cover years 1900 to 1970. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-5-2b2f7e3f9349@baylibre.com Signed-off-by: Alexandre Belloni commit da62b49830f83d1c80bfa1f2208db0cc6c19a1f9 Author: Uwe Kleine-König Date: Mon Apr 28 12:06:50 2025 +0200 rtc: test: Also test time and wday outcome of rtc_time64_to_tm() To cover calculation of the time and wday in the rtc kunit test also check tm_hour, tm_min, tm_sec and tm_wday of the rtc_time calculated by rtc_time64_to_tm(). There are no surprises, the two tests making use of rtc_time64_to_tm_test_date_range() continue to succeed. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-4-2b2f7e3f9349@baylibre.com Signed-off-by: Alexandre Belloni commit 46351921cbe11403a4fcab00e76fa03d99a7aef2 Author: Uwe Kleine-König Date: Mon Apr 28 12:06:49 2025 +0200 rtc: test: Emit the seconds-since-1970 value instead of days-since-1970 This is easier to handle because you can just consult date(1) to convert between a seconds-since-1970 value and a date string: $ date --utc -d @3661 Thu Jan 1 01:01:01 AM UTC 1970 $ date -d "Jan 1 12:00:00 AM UTC 1900" +%s -2208988800 The intended side effect is that this prepares the test for dates before 1970. The division of a negative value by 86400 doesn't result in the desired days-since-1970 value as e.g. secs=-82739 should map to days=-1. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-3-2b2f7e3f9349@baylibre.com Signed-off-by: Alexandre Belloni commit fe9f5f96cfe8b82d0f24cbfa93718925560f4f8d Author: Alexandre Mergnat Date: Mon Apr 28 12:06:48 2025 +0200 rtc: Fix offset calculation for .start_secs < 0 The comparison rtc->start_secs > rtc->range_max has a signed left-hand side and an unsigned right-hand side. So the comparison might become true for negative start_secs which is interpreted as a (possibly very large) positive value. As a negative value can never be bigger than an unsigned value the correct representation of the (mathematical) comparison rtc->start_secs > rtc->range_max in C is: rtc->start_secs >= 0 && rtc->start_secs > rtc->range_max Use that to fix the offset calculation currently used in the rtc-mt6397 driver. Fixes: 989515647e783 ("rtc: Add one offset seconds to expand RTC range") Signed-off-by: Alexandre Mergnat Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-2-2b2f7e3f9349@baylibre.com Signed-off-by: Alexandre Belloni commit 7df4cfef8b351fec3156160bedfc7d6d29de4cce Author: Alexandre Mergnat Date: Mon Apr 28 12:06:47 2025 +0200 rtc: Make rtc_time64_to_tm() support dates before 1970 Conversion of dates before 1970 is still relevant today because these dates are reused on some hardwares to store dates bigger than the maximal date that is representable in the device's native format. This prominently and very soon affects the hardware covered by the rtc-mt6397 driver that can only natively store dates in the interval 1900-01-01 up to 2027-12-31. So to store the date 2028-01-01 00:00:00 to such a device, rtc_time64_to_tm() must do the right thing for time=-2208988800. Signed-off-by: Alexandre Mergnat Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250428-enable-rtc-v4-1-2b2f7e3f9349@baylibre.com Signed-off-by: Alexandre Belloni commit 1e15a6803df01471e0065dabd8b9563692c47219 Author: Troy Mitchell Date: Sat May 31 15:20:40 2025 +0800 rtc: pcf8563: fix wrong alarm register When the regmap framework was introduced to this driver, the PCF8563_REG_AMN register within the set_alarm function was incorrectly changed to PCF8563_REG_SC. The PCF8563_REG_SC register is the seconds register. This caused alarm values to be written to the seconds register when an alarm was set. Which means the alarm would not trigger as expected and the seconds register would be overwritten with an incorrect value. Signed-off-by: Troy Mitchell Link: https://lore.kernel.org/r/20250531-pcf8563-fix-alarm-v2-1-cac4b1716167@gmail.com Signed-off-by: Alexandre Belloni commit f096bdbf08c9c696a6b5c18a36b75c43f8d86eba Author: Wolfram Sang Date: Mon May 26 11:58:04 2025 +0200 rtc: rzn1: support input frequencies other than 32768Hz When using the SCMP mode instead of SUBU, this RTC can also support other input frequencies than 32768Hz. Also, upcoming SoCs will only support SCMP. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20250526095801.35781-8-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit a50f00cb87b1c69eb4a08ae5c79e9536da839dfd Author: Wolfram Sang Date: Mon May 26 11:58:03 2025 +0200 rtc: rzn1: Disable controller before initialization Datasheet says that the controller must be disabled before setting up either SUBU or SCMP. This did not matter so far because the driver only supported SUBU which was the default, too. It is good practice to follow datasheet recommendations, though. It will also be needed because SCMP mode will be added in a later patch. Signed-off-by: Wolfram Sang Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20250526095801.35781-7-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit ae95a7e3214092900fc0688224626b203f95f165 Author: Wolfram Sang Date: Mon May 26 11:58:02 2025 +0200 dt-bindings: rtc: rzn1: add optional second clock The external crystal can be a second clock input. It is needed for the SCMP counting method which allows using crystals different than 32768Hz. It is also needed for an upcoming SoC which only supports the SCMP method. Signed-off-by: Wolfram Sang Reviewed-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250526095801.35781-6-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit f1e7a277a1736e12cc4bd6d93b8a5c439b8ca20c Author: Ruben Devos Date: Sun Jun 1 19:18:55 2025 +0200 smb: client: add NULL check in automount_fullpath page is checked for null in __build_path_from_dentry_optional_prefix when tcon->origin_fullpath is not set. However, the check is missing when it is set. Add a check to prevent a potential NULL pointer dereference. Signed-off-by: Ruben Devos Cc: stable@vger.kernel.org Signed-off-by: Steve French commit baa39c169dd526cb0186187fc44ec462266efcc6 Author: Yonghong Song Date: Thu May 29 13:11:51 2025 -0700 selftests/bpf: Fix selftest btf_tag/btf_type_tag_percpu_vmlinux_helper failure Ihor Solodrai reported selftest 'btf_tag/btf_type_tag_percpu_vmlinux_helper' failure ([1]) during 6.16 merge window. The failure log: ... 7: (15) if r0 == 0x0 goto pc+1 ; R0=ptr_css_rstat_cpu() ; *(volatile int *)rstat; @ btf_type_tag_percpu.c:68 8: (61) r1 = *(u32 *)(r0 +0) cannot access ptr member updated_children with moff 0 in struct css_rstat_cpu with off 0 size 4 Two changes are needed. First, 'struct cgroup_rstat_cpu' needs to be replaced with 'struct css_rstat_cpu' to be consistent with new data structure. Second, layout of 'css_rstat_cpu' is changed compared to 'cgroup_rstat_cpu'. The first member becomes a pointer so the bpf prog needs to do 8-byte load instead of 4-byte load. [1] https://lore.kernel.org/bpf/6f688f2e-7d26-423a-9029-d1b1ef1c938a@linux.dev/ Cc: Ihor Solodrai Cc: JP Kobryn Signed-off-by: Yonghong Song Acked-by: JP Kobryn Link: https://lore.kernel.org/r/20250529201151.1787575-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 4b65d5ae971430287855a89635a184c489bd02a5 Author: Saket Kumar Bhaskar Date: Mon May 12 14:41:07 2025 +0530 selftests/bpf: Fix bpf selftest build error On linux-next, build for bpf selftest displays an error due to mismatch in the expected function signature of bpf_testmod_test_read and bpf_testmod_test_write. Commit 97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()") changed the required type for struct bin_attribute to const struct bin_attribute. To resolve the error, update corresponding signature for the callback. Fixes: 97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()") Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/e915da49-2b9a-4c4c-a34f-877f378129f6@linux.ibm.com/ Tested-by: Venkat Rao Bagalkote Signed-off-by: Saket Kumar Bhaskar Link: https://lore.kernel.org/r/20250512091108.2015615-1-skb99@linux.ibm.com Signed-off-by: Alexei Starovoitov commit cd2e103d57e5615f9bb027d772f93b9efd567224 Merge: bb1556ec946470 f39f18f3c3531a Author: Linus Torvalds Date: Sun Jun 1 11:37:01 2025 -0700 Merge tag 'hardening-v6.16-rc1-fix1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: - randstruct: gcc-plugin: Fix attribute addition with GCC 15 - ubsan: integer-overflow: depend on BROKEN to keep this out of CI - overflow: Introduce __DEFINE_FLEX for having no initializer - wifi: iwlwifi: mld: Work around Clang loop unrolling bug [ Take two after a jump scare due to some repo rewriting by 'b4' - Linus ] * tag 'hardening-v6.16-rc1-fix1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: randstruct: gcc-plugin: Fix attribute addition overflow: Introduce __DEFINE_FLEX for having no initializer ubsan: integer-overflow: depend on BROKEN to keep this out of CI wifi: iwlwifi: mld: Work around Clang loop unrolling bug commit bb1556ec94647060c6b52bf434b9fd824724a6f4 Merge: a2604f8d43bf41 158f9f2f71523b Author: Linus Torvalds Date: Sun Jun 1 09:01:58 2025 -0700 Merge tag 'linux-watchdog-6.16-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add watchdog timer for the NXP S32 platform - Add driver for Intel OC WDT - Add exynos990-wdt - Various other fixes and improvements * tag 'linux-watchdog-6.16-rc1' of git://www.linux-watchdog.org/linux-watchdog: (22 commits) watchdog: iTCO_wdt: Update the heartbeat value after clamping timeout watchdog: Add driver for Intel OC WDT watchdog: arm_smc_wdt: get wdt status through SMCWD_GET_TIMELEFT watchdog: iTCO: Drop driver-internal locking watchdog: apple: set max_hw_heartbeat_ms instead of max_timeout watchdog: qcom: introduce the device data for IPQ5424 watchdog device dt-bindings: watchdog: renesas,wdt: Document RZ/V2N (R9A09G056) support watchdog: lenovo_se30_wdt: Fix possible devm_ioremap() NULL pointer dereference in lenovo_se30_wdt_probe() watchdog: s3c2410_wdt: Add exynos990-wdt compatible data dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible dt-bindings: watchdog: Add rk3562 compatible dt-bindings: watchdog: fsl,scu-wdt: Document imx8qm watchdog: Add the Watchdog Timer for the NXP S32 platform dt-bindings: watchdog: Add NXP Software Watchdog Timer watchdog: Correct kerneldoc warnings watchdog: stm32: Fix wakeup source leaks on device unbind watchdog: Do not enable by default during compile testing watchdog: cros-ec: Avoid -Wflex-array-member-not-at-end warning watchdog: da9052_wdt: respect TWDMIN watchdog: da9052_wdt: do not disable wdt during probe ... commit a2604f8d43bf414db54c42ca6ea52803ce1c0b2f Merge: 9bebf9f9d5db91 00286d7d643d3c Author: Linus Torvalds Date: Sun Jun 1 08:59:50 2025 -0700 Merge tag 'i3c/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "There is not much this this, mostly fixes around interrupt and IBI handling: - mipi-i3c-hci: interrupt handling fixes - svc: i.MX94 and i.MX95 support, IBI handling fixes" * tag 'i3c/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: controllers do not need to depend on I3C i3c: master: svc: switch to bulk clk API for flexible clock support dt-bindings: i3c: silvaco,i3c-master: add i.MX94 and i.MX95 I3C i3c: master: svc: skip address resend on repeat START i3c: master: svc: Emit STOP asap in the IBI transaction i3c: master: svc: Receive IBI requests in interrupt context i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler i3c: mipi-i3c-hci: Change name of INTR_STATUS bit 11 i3c: mipi-i3c-hci: Clear INTR_STATUS unconditionally i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates commit 9bebf9f9d5db910ab3bd285749ee0f869d39c642 Merge: 82dad698061c2d e5ef4cd2a47f27 Author: Linus Torvalds Date: Sun Jun 1 08:58:31 2025 -0700 Merge tag 'edac_urgent_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: "Limit a register write width in altera_edac to avoid hw errors" * tag 'edac_urgent_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/altera: Use correct write width with the INTTEST register commit 82dad698061c2db166fdcf92f549d34ba038e829 Merge: f563ba4ac68a4d f698ee1f400301 Author: Linus Torvalds Date: Sun Jun 1 08:56:34 2025 -0700 Merge tag 'for-linus' of https://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "Just a few documentation updates from the community: - Device tree documentation conversion from txt to yaml - Documentation addition to help users getting started with initramfs on OpenRISC * tag 'for-linus' of https://github.com/openrisc/linux: dt-bindings: interrupt-controller: Convert openrisc,ompic to DT schema dt-bindings: interrupt-controller: Convert opencores,or1k-pic to DT schema Documentation:openrisc: Add build instructions with initramfs commit f563ba4ac68a4dfdfb37baa24ff1a4f917e9ffe7 Merge: 7d4e49a77d9930 213205889d5ffc Author: Linus Torvalds Date: Sun Jun 1 08:55:28 2025 -0700 Merge tag 'parisc-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Fix building with gcc-15, formatting fix on unaligned warnings and replace __ASSEMBLY__ with __ASSEMBLER__ in headers" * tag 'parisc-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc/unaligned: Fix hex output to show 8 hex chars parisc: fix building with gcc-15 parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers commit 72386d5245b249f5a0a8fabb881df7ad947b8ea4 Author: Dennis Marttinen Date: Thu May 29 17:45:12 2025 +0000 ceph: set superblock s_magic for IMA fsmagic matching The CephFS kernel driver forgets to set the filesystem magic signature in its superblock. As a result, IMA policy rules based on fsmagic matching do not apply as intended. This causes a major performance regression in Talos Linux [1] when mounting CephFS volumes, such as when deploying Rook Ceph [2]. Talos Linux ships a hardened kernel with the following IMA policy (irrelevant lines omitted): [...] dont_measure fsmagic=0xc36400 # CEPH_SUPER_MAGIC [...] measure func=FILE_CHECK mask=^MAY_READ euid=0 measure func=FILE_CHECK mask=^MAY_READ uid=0 [...] Currently, IMA compares 0xc36400 == 0x0 for CephFS files, resulting in all files opened with O_RDONLY or O_RDWR getting measured with SHA512 on every open(2): 10 69990c87e8af323d47e2d6ae4... ima-ng sha512: /data/cephfs/test-file Since O_WRONLY is rare, this results in an order of magnitude lower performance than expected for practically all file operations. Properly setting CEPH_SUPER_MAGIC in the CephFS superblock resolves the regression. Tests performed on a 3x replicated Ceph v19.3.0 cluster across three i5-7200U nodes each equipped with one Micron 7400 MAX M.2 disk (BlueStore) and Gigabit ethernet, on Talos Linux v1.10.2: FS-Mark 3.3 Test: 500 Files, Empty Files/s > Higher Is Better 6.12.27-talos . 16.6 |==== +twelho patch . 208.4 |==================================================== FS-Mark 3.3 Test: 500 Files, 1KB Size Files/s > Higher Is Better 6.12.27-talos . 15.6 |======= +twelho patch . 118.6 |==================================================== FS-Mark 3.3 Test: 500 Files, 32 Sub Dirs, 1MB Size Files/s > Higher Is Better 6.12.27-talos . 12.7 |=============== +twelho patch . 44.7 |===================================================== IO500 [3] 2fcd6d6 results (benchmarks within variance omitted): | IO500 benchmark | 6.12.27-talos | +twelho patch | Speedup | |-------------------|----------------|----------------|-----------| | mdtest-easy-write | 0.018524 kIOPS | 1.135027 kIOPS | 6027.33 % | | mdtest-hard-write | 0.018498 kIOPS | 0.973312 kIOPS | 5161.71 % | | ior-easy-read | 0.064727 GiB/s | 0.155324 GiB/s | 139.97 % | | mdtest-hard-read | 0.018246 kIOPS | 0.780800 kIOPS | 4179.29 % | This applies outside of synthetic benchmarks as well, for example, the time to rsync a 55 MiB directory with ~12k of mostly small files drops from an unusable 10m5s to a reasonable 26s (23x the throughput). [1]: https://www.talos.dev/ [2]: https://www.talos.dev/v1.10/kubernetes-guides/configuration/ceph-with-rook/ [3]: https://github.com/IO500/io500 Cc: stable@vger.kernel.org Signed-off-by: Dennis Marttinen Reviewed-by: Viacheslav Dubeyko Signed-off-by: Ilya Dryomov commit d50eb28f2de5a35670ce10c0d34b9c9088f43f54 Author: Viacheslav Dubeyko Date: Mon Feb 10 15:01:58 2025 -0800 ceph: cleanup hardcoded constants of file handle size The ceph/export.c contains very confusing logic of file handle size calculation based on hardcoded values. This patch makes the cleanup of this logic by means of introduction the named constants. Signed-off-by: Viacheslav Dubeyko Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov commit 0abd87942e0c93964e93224836944712feba1d91 Author: Dmitry Kandybka Date: Tue Apr 22 12:32:04 2025 +0300 ceph: fix possible integer overflow in ceph_zero_objects() In 'ceph_zero_objects', promote 'object_size' to 'u64' to avoid possible integer overflow. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Kandybka Reviewed-by: Viacheslav Dubeyko Signed-off-by: Ilya Dryomov commit 060909278cc0a91373a20726bd3d8ce085f480a9 Author: Viacheslav Dubeyko Date: Thu Jan 16 16:30:08 2025 -0800 ceph: avoid kernel BUG for encrypted inode with unaligned file size The generic/397 test hits a BUG_ON for the case of encrypted inode with unaligned file size (for example, 33K or 1K): [ 877.737811] run fstests generic/397 at 2025-01-03 12:34:40 [ 877.875761] libceph: mon0 (2)127.0.0.1:40674 session established [ 877.876130] libceph: client4614 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 877.991965] libceph: mon0 (2)127.0.0.1:40674 session established [ 877.992334] libceph: client4617 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.017234] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.017594] libceph: client4620 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.031394] xfs_io (pid 18988) is setting deprecated v1 encryption policy; recommend upgrading to v2. [ 878.054528] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.054892] libceph: client4623 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.070287] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.070704] libceph: client4626 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.264586] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.265258] libceph: client4629 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.374578] -----------[ cut here ]------------ [ 878.374586] kernel BUG at net/ceph/messenger.c:1070! [ 878.375150] Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 878.378145] CPU: 2 UID: 0 PID: 4759 Comm: kworker/2:9 Not tainted 6.13.0-rc5+ #1 [ 878.378969] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 878.380167] Workqueue: ceph-msgr ceph_con_workfn [ 878.381639] RIP: 0010:ceph_msg_data_cursor_init+0x42/0x50 [ 878.382152] Code: 89 17 48 8b 46 70 55 48 89 47 08 c7 47 18 00 00 00 00 48 89 e5 e8 de cc ff ff 5d 31 c0 31 d2 31 f6 31 ff c3 cc cc cc cc 0f 0b <0f> 0b 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 [ 878.383928] RSP: 0018:ffffb4ffc7cbbd28 EFLAGS: 00010287 [ 878.384447] RAX: ffffffff82bb9ac0 RBX: ffff981390c2f1f8 RCX: 0000000000000000 [ 878.385129] RDX: 0000000000009000 RSI: ffff981288232b58 RDI: ffff981390c2f378 [ 878.385839] RBP: ffffb4ffc7cbbe18 R08: 0000000000000000 R09: 0000000000000000 [ 878.386539] R10: 0000000000000000 R11: 0000000000000000 R12: ffff981390c2f030 [ 878.387203] R13: ffff981288232b58 R14: 0000000000000029 R15: 0000000000000001 [ 878.387877] FS: 0000000000000000(0000) GS:ffff9814b7900000(0000) knlGS:0000000000000000 [ 878.388663] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 878.389212] CR2: 00005e106a0554e0 CR3: 0000000112bf0001 CR4: 0000000000772ef0 [ 878.389921] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 878.390620] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 878.391307] PKRU: 55555554 [ 878.391567] Call Trace: [ 878.391807] [ 878.392021] ? show_regs+0x71/0x90 [ 878.392391] ? die+0x38/0xa0 [ 878.392667] ? do_trap+0xdb/0x100 [ 878.392981] ? do_error_trap+0x75/0xb0 [ 878.393372] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.393842] ? exc_invalid_op+0x53/0x80 [ 878.394232] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.394694] ? asm_exc_invalid_op+0x1b/0x20 [ 878.395099] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.395583] ? ceph_con_v2_try_read+0xd16/0x2220 [ 878.396027] ? _raw_spin_unlock+0xe/0x40 [ 878.396428] ? raw_spin_rq_unlock+0x10/0x40 [ 878.396842] ? finish_task_switch.isra.0+0x97/0x310 [ 878.397338] ? __schedule+0x44b/0x16b0 [ 878.397738] ceph_con_workfn+0x326/0x750 [ 878.398121] process_one_work+0x188/0x3d0 [ 878.398522] ? __pfx_worker_thread+0x10/0x10 [ 878.398929] worker_thread+0x2b5/0x3c0 [ 878.399310] ? __pfx_worker_thread+0x10/0x10 [ 878.399727] kthread+0xe1/0x120 [ 878.400031] ? __pfx_kthread+0x10/0x10 [ 878.400431] ret_from_fork+0x43/0x70 [ 878.400771] ? __pfx_kthread+0x10/0x10 [ 878.401127] ret_from_fork_asm+0x1a/0x30 [ 878.401543] [ 878.401760] Modules linked in: hctr2 nhpoly1305_avx2 nhpoly1305_sse2 nhpoly1305 chacha_generic chacha_x86_64 libchacha adiantum libpoly1305 essiv authenc mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag intel_rapl_msr intel_rapl_common intel_uncore_frequency_common skx_edac_common nfit kvm_intel kvm crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel sha256_ssse3 sha1_ssse3 aesni_intel joydev crypto_simd cryptd rapl input_leds psmouse sch_fq_codel serio_raw bochs i2c_piix4 floppy qemu_fw_cfg i2c_smbus mac_hid pata_acpi msr parport_pc ppdev lp parport efi_pstore ip_tables x_tables [ 878.407319] ---[ end trace 0000000000000000 ]--- [ 878.407775] RIP: 0010:ceph_msg_data_cursor_init+0x42/0x50 [ 878.408317] Code: 89 17 48 8b 46 70 55 48 89 47 08 c7 47 18 00 00 00 00 48 89 e5 e8 de cc ff ff 5d 31 c0 31 d2 31 f6 31 ff c3 cc cc cc cc 0f 0b <0f> 0b 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 [ 878.410087] RSP: 0018:ffffb4ffc7cbbd28 EFLAGS: 00010287 [ 878.410609] RAX: ffffffff82bb9ac0 RBX: ffff981390c2f1f8 RCX: 0000000000000000 [ 878.411318] RDX: 0000000000009000 RSI: ffff981288232b58 RDI: ffff981390c2f378 [ 878.412014] RBP: ffffb4ffc7cbbe18 R08: 0000000000000000 R09: 0000000000000000 [ 878.412735] R10: 0000000000000000 R11: 0000000000000000 R12: ffff981390c2f030 [ 878.413438] R13: ffff981288232b58 R14: 0000000000000029 R15: 0000000000000001 [ 878.414121] FS: 0000000000000000(0000) GS:ffff9814b7900000(0000) knlGS:0000000000000000 [ 878.414935] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 878.415516] CR2: 00005e106a0554e0 CR3: 0000000112bf0001 CR4: 0000000000772ef0 [ 878.416211] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 878.416907] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 878.417630] PKRU: 55555554 (gdb) l *ceph_msg_data_cursor_init+0x42 0xffffffff823b45a2 is in ceph_msg_data_cursor_init (net/ceph/messenger.c:1070). 1065 1066 void ceph_msg_data_cursor_init(struct ceph_msg_data_cursor *cursor, 1067 struct ceph_msg *msg, size_t length) 1068 { 1069 BUG_ON(!length); 1070 BUG_ON(length > msg->data_length); 1071 BUG_ON(!msg->num_data_items); 1072 1073 cursor->total_resid = length; 1074 cursor->data = msg->data; The issue takes place because of this: [ 202.628853] libceph: net/ceph/messenger_v2.c:2034 prepare_sparse_read_data(): msg->data_length 33792, msg->sparse_read_total 36864 1070 BUG_ON(length > msg->data_length); The generic/397 test (xfstests) executes such steps: (1) create encrypted files and directories; (2) access the created files and folders with encryption key; (3) access the created files and folders without encryption key. The issue takes place in this portion of code: if (IS_ENCRYPTED(inode)) { struct page **pages; size_t page_off; err = iov_iter_get_pages_alloc2(&subreq->io_iter, &pages, len, &page_off); if (err < 0) { doutc(cl, "%llx.%llx failed to allocate pages, %d\n", ceph_vinop(inode), err); goto out; } /* should always give us a page-aligned read */ WARN_ON_ONCE(page_off); len = err; err = 0; osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false); The reason of the issue is that subreq->io_iter.count keeps unaligned value of length: [ 347.751182] lib/iov_iter.c:1185 __iov_iter_get_pages_alloc(): maxsize 36864, maxpages 4294967295, start 18446659367320516064 [ 347.752808] lib/iov_iter.c:1196 __iov_iter_get_pages_alloc(): maxsize 33792, maxpages 4294967295, start 18446659367320516064 [ 347.754394] lib/iov_iter.c:1015 iter_folioq_get_pages(): maxsize 33792, maxpages 4294967295, extracted 0, _start_offset 18446659367320516064 This patch simply assigns the aligned value to subreq->io_iter.count before calling iov_iter_get_pages_alloc2(). [ idryomov: tag the comment with FIXME to make it clear that it's only a workaround for netfslib not coexisting with fscrypt nicely (this is also noted in another pre-existing comment) ] Cc: David Howells Cc: stable@vger.kernel.org Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Signed-off-by: Viacheslav Dubeyko Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit f39f18f3c3531aa802b58a20d39d96e82eb96c14 Author: Kees Cook Date: Fri May 30 15:18:28 2025 -0700 randstruct: gcc-plugin: Fix attribute addition Based on changes in the 2021 public version of the randstruct out-of-tree GCC plugin[1], more carefully update the attributes on resulting decls, to avoid tripping checks in GCC 15's comptypes_check_enum_int() when it has been configured with "--enable-checking=misc": arch/arm64/kernel/kexec_image.c:132:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1519 132 | const struct kexec_file_ops kexec_image_ops = { | ^~~~~~~~~~~~~~ internal_error(char const*, ...), at gcc/gcc/diagnostic-global-context.cc:517 fancy_abort(char const*, int, char const*), at gcc/gcc/diagnostic.cc:1803 comptypes_check_enum_int(tree_node*, tree_node*, bool*), at gcc/gcc/c/c-typeck.cc:1519 ... Link: https://archive.org/download/grsecurity/grsecurity-3.1-5.10.41-202105280954.patch.gz [1] Reported-by: Thiago Jung Bauermann Closes: https://github.com/KSPP/linux/issues/367 Closes: https://lore.kernel.org/lkml/20250530000646.104457-1-thiago.bauermann@linaro.org/ Reported-by: Ingo Saitz Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104745 Fixes: 313dd1b62921 ("gcc-plugins: Add the randstruct plugin") Tested-by: Thiago Jung Bauermann Link: https://lore.kernel.org/r/20250530221824.work.623-kees@kernel.org Signed-off-by: Kees Cook commit 5c78e793f78732b60276401f75cc1a101f9ad121 Author: Kees Cook Date: Fri May 30 12:06:47 2025 -0700 overflow: Introduce __DEFINE_FLEX for having no initializer While not yet in the tree, there is a proposed patch[1] that was depending on the prior behavior of _DEFINE_FLEX, which did not have an explicit initializer. Provide this via __DEFINE_FLEX now, which can also have attributes applied (e.g. __uninitialized). Examples of the resulting initializer behaviors can be seen here: https://godbolt.org/z/P7Go8Tr33 Link: https://lore.kernel.org/netdev/20250520205920.2134829-9-anthony.l.nguyen@intel.com [1] Fixes: 47e36ed78406 ("overflow: Fix direct struct member initialization in _DEFINE_FLEX()") Signed-off-by: Kees Cook commit 158f9f2f71523bab787f4fa7a7a1f390524350ca Author: Ziyan Fu Date: Tue Apr 29 18:25:33 2025 +0800 watchdog: iTCO_wdt: Update the heartbeat value after clamping timeout When executing "modprobe iTCO_wdt heartbeat=700", the user-specified 'heartbeat' parameter exceeds the valid range, the driver clamps the timeout to default 30s but fails to update the logged 'heartbeat' value, resulting in misleading log output: iTCO_wdt iTCO_wdt: timeout value out of range, using 30 iTCO_wdt iTCO_wdt: initialized. heartbeat=700 sec (nowayout=0) After validating the range, update the 'heartbeat' value with the clamped timeout value to ensure that log messages accurately reflect the actual runtime parameters. Signed-off-by: Ziyan Fu Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20250429102533.11886-1-13281011316@163.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 535d1784d8a96dce79023ac5081de1aa8669388a Author: Diogo Ivo Date: Mon Mar 17 10:55:06 2025 +0000 watchdog: Add driver for Intel OC WDT Add a driver for the Intel Over-Clocking Watchdog found in Intel Platform Controller (PCH) chipsets. This watchdog is controlled via a simple single-register interface and would otherwise be standard except for the presence of a LOCK bit that can only be set once per power cycle, needing extra handling around it. Signed-off-by: Diogo Ivo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250317-ivo-intel_oc_wdt-v3-1-32c396f4eefd@siemens.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cc0df5eba1b3a0eb54003d977a062ed39db09b0d Author: Antonio Borneo Date: Tue May 20 10:59:52 2025 +0200 watchdog: arm_smc_wdt: get wdt status through SMCWD_GET_TIMELEFT The optional SMCWD_GET_TIMELEFT command can be used to detect if the watchdog has already been started. See the implementation in OP-TEE secure OS [1]. At probe time, check if the watchdog is already started and then set WDOG_HW_RUNNING in the watchdog status. This will cause the watchdog framework to ping the watchdog until a userspace watchdog daemon takes over the control. Link: https://github.com/OP-TEE/optee_os/commit/a7f2d4bd8632 [1] Signed-off-by: Antonio Borneo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250520085952.210723-1-antonio.borneo@foss.st.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 27a46a0f088692bca08165e320e0293fd02638e2 Author: Guenter Roeck Date: Sat May 17 09:09:36 2025 -0700 watchdog: iTCO: Drop driver-internal locking The locking code in the iTCO watchdog driver has been carried along from before the watchdog core existed. The watchdog core protects calls into drivers since commit f4e9c82f64b5 ("watchdog: Add Locking support"), making driver-internal locking unnecessary. Drop it. Signed-off-by: Guenter Roeck Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20250517160936.3231017-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 45f1884d5cf2f66736d84bc11d023a7cc82b8838 Author: Florian Klink Date: Tue May 6 17:26:22 2025 +0300 watchdog: apple: set max_hw_heartbeat_ms instead of max_timeout The hardware only supports timeouts slightly below 3mins, but by using max_hw_heartbeat_ms we can let the kernel take care of supporting larger timeouts than that requested from userspace. Switching to max_hw_heartbeat_ms also means our set_timeout function now needs to configure the hardware to the minimum of either the requested timeout (in seconds) or the maximum supported by the user (in seconds). Signed-off-by: Florian Klink Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20250506142621.11428-2-flokli@flokli.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1aea3e1ec0e7611804c9124097eecf050bf5fdcd Author: Kathiravan Thirumoorthy Date: Fri May 2 18:47:51 2025 +0530 watchdog: qcom: introduce the device data for IPQ5424 watchdog device To retrieve the restart reason from IMEM, certain device specific data like IMEM compatible to lookup, location of IMEM to read, etc should be defined. To achieve that, introduce the separate device data for IPQ5424 and add the required details subsequently. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250502-wdt_reset_reason-v3-3-b2dc7ace38ca@oss.qualcomm.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f55937e42c9951b615e291d9b7e6337747804463 Author: Lad Prabhakar Date: Fri May 2 13:00:54 2025 +0100 dt-bindings: watchdog: renesas,wdt: Document RZ/V2N (R9A09G056) support Document support for the watchdog IP found on the Renesas RZ/V2N (R9A09G056) SoC. The watchdog IP is identical to that on RZ/V2H(P), so `renesas,r9a09g057-wdt` will be used as a fallback compatible, enabling reuse of the existing driver without changes. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250502120054.47323-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a4e2401438a26131ecff9be6a3a1d4cbfea66f9a Author: Henry Martin Date: Thu Apr 24 15:16:48 2025 +0800 watchdog: lenovo_se30_wdt: Fix possible devm_ioremap() NULL pointer dereference in lenovo_se30_wdt_probe() devm_ioremap() returns NULL on error. Currently, lenovo_se30_wdt_probe() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_ioremap() to prevent this issue. Fixes: c284153a2c55 ("watchdog: lenovo_se30_wdt: Watchdog driver for Lenovo SE30 platform") Signed-off-by: Henry Martin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250424071648.89016-1-bsdhenrymartin@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 53663d2cabac37f990a7df686322ad33eb6ce51d Author: Igor Belwon Date: Sun Apr 20 21:00:39 2025 +0200 watchdog: s3c2410_wdt: Add exynos990-wdt compatible data The Exynos990 has two watchdog clusters - cl0 and cl2. Add new driver data for these two clusters, making it possible to use the watchdog timer on this SoC. Signed-off-by: Igor Belwon Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250420-wdt-resends-april-v1-2-f58639673959@mentallysanemainliners.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a2170f8493d6776b76277b9b1ab59a5642774ecf Author: Igor Belwon Date: Sun Apr 20 21:00:38 2025 +0200 dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible Add a dt-binding compatible for the Exynos990 Watchdog timer. This watchdog is compatible with the GS101/Exynos850 design, as such it requires the cluster-index and syscon-phandle properties to be present. It also contains a cl2 cluster, as such the cluster-index property has been expanded. Signed-off-by: Igor Belwon Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250420-wdt-resends-april-v1-1-f58639673959@mentallysanemainliners.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0b43b8bc8ef88bb45b018b2d4853d38bfc5ce2a7 Author: Shivank Garg Date: Mon May 26 18:28:20 2025 +0000 mm/khugepaged: clean up refcount check using folio_expected_ref_count() Use folio_expected_ref_count() instead of open-coded logic in is_refcount_suitable(). This avoids code duplication and improves clarity. Drop is_refcount_suitable() as it is no longer needed. Link: https://lkml.kernel.org/r/20250526182818.37978-2-shivankg@amd.com Signed-off-by: Shivank Garg Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dev Jain Reviewed-by: Baolin Wang Cc: Bharata B Rao Cc: Fengwei Yin Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Ryan Roberts Cc: Zi Yan Signed-off-by: Andrew Morton commit 66bce7afbaca6ca9022210b0cd9fa3405da36667 Author: Mark Brown Date: Tue May 27 17:04:48 2025 +0100 selftests/mm: fix test result reporting in gup_longterm The kselftest framework uses the string logged when a test result is reported as the unique identifier for a test, using it to track test results between runs. The gup_longterm test fails to follow this pattern, it runs a single test function repeatedly with various parameters but each result report is a string logging an error message which is fixed between runs. Since the code already logs each test uniquely before it starts refactor to also print this to a buffer, then use that name as the test result. This isn't especially pretty but is relatively straightforward and is a great help to tooling. Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-4-ff198df8e38e@kernel.org Signed-off-by: Mark Brown Cc: David Hildenbrand Cc: Lorenzo Stoakes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3f2d9a9ac544694e26c8faeb1a044c2bdcd0c793 Author: Mark Brown Date: Tue May 27 17:04:47 2025 +0100 selftests/mm: report unique test names for each cow test The kselftest framework uses the string logged when a test result is reported as the unique identifier for a test, using it to track test results between runs. The cow test completely fails to follow this pattern, it runs test functions repeatedly with various parameters with each result report from those functions being a string logging an error message which is fixed between runs. Since the code already logs each test uniquely before it starts refactor to also print this to a buffer, then use that name as the test result. This isn't especially pretty but is relatively straightforward and is a great help to tooling. Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-3-ff198df8e38e@kernel.org Signed-off-by: Mark Brown Cc: David Hildenbrand Cc: Lorenzo Stoakes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3f192afbede24c60e59db1272ad155a3a44f5fe7 Author: Mark Brown Date: Tue May 27 17:04:46 2025 +0100 selftests/mm: add helper for logging test start and results Several of the MM tests have a pattern of printing a description of the test to be run then reporting the actual TAP result using a generic string not connected to the specific test, often in a shared function used by many tests. The name reported typically varies depending on the specific result rather than the test too. This causes problems for tooling that works with test results, the names reported with the results are used to deduplicate tests and track them between runs so both duplicated names and changing names cause trouble for things like UIs and automated bisection. As a first step towards matching these tests better with the expectations of kselftest provide helpers which record the test name as part of the initial print and then use that as part of reporting a result. This is not added as a generic kselftest helper partly because the use of a variable to store the test name doesn't fit well with the header only implementation of kselftest.h and partly because it's not really an intended pattern. Ideally at some point the mm tests that use it will be updated to not need it. Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-2-ff198df8e38e@kernel.org Signed-off-by: Mark Brown Cc: David Hildenbrand Cc: Lorenzo Stoakes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 109364fce504dae70b13eccc51a7bfc71528d154 Author: Mark Brown Date: Tue May 27 17:04:45 2025 +0100 selftests/mm: use standard ksft_finished() in cow and gup_longterm Patch series "selftests/mm: cow and gup_longterm cleanups", v2. The bulk of these changes modify the cow and gup_longterm tests to report unique and stable names for each test, bringing them into line with the expectations of tooling that works with kselftest. The string reported as a test result is used by tooling to both deduplicate tests and track tests between test runs, using the same string for multiple tests or changing the string depending on test result causes problems for user interfaces and automation such as bisection. It was suggested that converting to use kselftest_harness.h would be a good way of addressing this, however that really wants the set of tests to run to be known at compile time but both test programs dynamically enumarate the set of huge page sizes the system supports and test each. Refactoring to handle this would be even more invasive than these changes which are large but straightforward and repetitive. A version of the main gup_longterm cleanup was previously sent separately, this version factors out the helpers for logging the start of the test since the cow test looks very similar. This patch (of 4): The cow and gup_longterm test programs open code something that looks a lot like the standard ksft_finished() helper to summarise the test results and provide an exit code, convert to use ksft_finished(). Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-0-ff198df8e38e@kernel.org Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-1-ff198df8e38e@kernel.org Signed-off-by: Mark Brown Acked-by: David Hildenbrand Cc: Lorenzo Stoakes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 79509ec1d253c536d223cbc06a5b51c13841fec2 Author: Enze Li Date: Sat May 31 17:39:37 2025 +0800 selftests/damon/_damon_sysfs: skip testcases if CONFIG_DAMON_SYSFS is disabled When CONFIG_DAMON_SYSFS is disabled, the selftests fail with the following outputs, not ok 2 selftests: damon: sysfs_update_schemes_tried_regions_wss_estimation.py # exit=1 not ok 3 selftests: damon: damos_quota.py # exit=1 not ok 4 selftests: damon: damos_quota_goal.py # exit=1 not ok 5 selftests: damon: damos_apply_interval.py # exit=1 not ok 6 selftests: damon: damos_tried_regions.py # exit=1 not ok 7 selftests: damon: damon_nr_regions.py # exit=1 not ok 11 selftests: damon: sysfs_update_schemes_tried_regions_hang.py # exit=1 The root cause of this issue is that all the testcases above do not check the sysfs interface of DAMON whether it exists or not. With this patch applied, all the testcases above now pass successfully. Link: https://lkml.kernel.org/r/20250531093937.1555159-1-lienze@kylinos.cn Signed-off-by: Enze Li Reviewed-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit ad6b26b6a0a79166b53209df2ca1cf8636296382 Author: Chen Yu Date: Fri May 23 20:51:15 2025 +0800 sched/numa: add statistics of numa balance task On systems with NUMA balancing enabled, it has been found that tracking task activities resulting from NUMA balancing is beneficial. NUMA balancing employs two mechanisms for task migration: one is to migrate a task to an idle CPU within its preferred node, and the other is to swap tasks located on different nodes when they are on each other's preferred nodes. The kernel already provides NUMA page migration statistics in /sys/fs/cgroup/mytest/memory.stat and /proc/{PID}/sched. However, it lacks statistics regarding task migration and swapping. Therefore, relevant counts for task migration and swapping should be added. The following two new fields: numa_task_migrated numa_task_swapped will be shown in /sys/fs/cgroup/{GROUP}/memory.stat, /proc/{PID}/sched and /proc/vmstat. Introducing both per-task and per-memory cgroup (memcg) NUMA balancing statistics facilitates a rapid evaluation of the performance and resource utilization of the target workload. For instance, users can first identify the container with high NUMA balancing activity and then further pinpoint a specific task within that group, and subsequently adjust the memory policy for that task. In short, although it is possible to iterate through /proc/$pid/sched to locate the problematic task, the introduction of aggregated NUMA balancing activity for tasks within each memcg can assist users in identifying the task more efficiently through a divide-and-conquer approach. As Libo Chen pointed out, the memcg event relies on the text names in vmstat_text, and /proc/vmstat generates corresponding items based on vmstat_text. Thus, the relevant task migration and swapping events introduced in vmstat_text also need to be populated by count_vm_numa_event(), otherwise these values are zero in /proc/vmstat. In theory, task migration and swap events are part of the scheduler's activities. The reason for exposing them through the memory.stat/vmstat interface is that we already have NUMA balancing statistics in memory.stat/vmstat, and these events are closely related to each other. Following Shakeel's suggestion, we describe the end-to-end flow/story of all these events occurring on a timeline for future reference: The goal of NUMA balancing is to co-locate a task and its memory pages on the same NUMA node. There are two strategies: migrate the pages to the task's node, or migrate the task to the node where its pages reside. Suppose a task p1 is running on Node 0, but its pages are located on Node 1. NUMA page fault statistics for p1 reveal its "page footprint" across nodes. If NUMA balancing detects that most of p1's pages are on Node 1: 1.Page Migration Attempt: The Numa balance first tries to migrate p1's pages to Node 0. The numa_page_migrate counter increments. 2.Task Migration Strategies: After the page migration finishes, Numa balance checks every 1 second to see if p1 can be migrated to Node 1. Case 2.1: Idle CPU Available If Node 1 has an idle CPU, p1 is directly scheduled there. This event is logged as numa_task_migrated. Case 2.2: No Idle CPU (Task Swap) If all CPUs on Node1 are busy, direct migration could cause CPU contention or load imbalance. Instead: The Numa balance selects a candidate task p2 on Node 1 that prefers Node 0 (e.g., due to its own page footprint). p1 and p2 are swapped. This cross-node swap is recorded as numa_task_swapped. Link: https://lkml.kernel.org/r/d00edb12ba0f0de3c5222f61487e65f2ac58f5b1.1748493462.git.yu.c.chen@intel.com Link: https://lkml.kernel.org/r/7ef90a88602ed536be46eba7152ed0d33bad5790.1748002400.git.yu.c.chen@intel.com Signed-off-by: Chen Yu Tested-by: K Prateek Nayak Tested-by: Madadi Vineeth Reddy Acked-by: Peter Zijlstra (Intel) Tested-by: Venkat Rao Bagalkote Cc: Aubrey Li Cc: Ayush Jain Cc: "Chen, Tim C" Cc: Ingo Molnar Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Libo Chen Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tejun Heo Signed-off-by: Andrew Morton commit 9709eb0f845b713ba163f2c461537d8add3e4e04 Author: Libo Chen Date: Fri May 23 20:51:01 2025 +0800 sched/numa: fix task swap by skipping kernel threads Patch series "sched/numa: add statistics of numa balance task migration", v6. Introduce task migration and swap statistics in the following places: /sys/fs/cgroup/{GROUP}/memory.stat /proc/{PID}/sched /proc/vmstat These statistics facilitate a rapid evaluation of the performance and resource utilization of the target workload. This patch (of 2): Task swapping is triggered when there are no idle CPUs in task A's preferred node. In this case, the NUMA load balancer chooses a task B on A's preferred node and swaps B with A. This helps improve NUMA locality without introducing load imbalance between nodes. In the current implementation, B's NUMA node preference is not mandatory. That is to say, a kernel thread might be incorrectly chosen as B. However, kernel thread and user space thread that does not have mm are not supposed to be covered by NUMA balancing because NUMA balancing only considers user pages via VMAs. According to Peter's suggestion for fixing this issue, we use PF_KTHREAD to skip the kernel thread. curr->mm is also checked because it is possible that user_mode_thread() might create a user thread without an mm. As per Prateek's analysis, after adding the PF_KTHREAD check, there is no need to further check the PF_IDLE flag: : - play_idle_precise() already ensures PF_KTHREAD is set before adding : PF_IDLE : : - cpu_startup_entry() is only called from the startup thread which : should be marked with PF_KTHREAD (based on my understanding looking at : commit cff9b2332ab7 ("kernel/sched: Modify initial boot task idle : setup")) In summary, the check in task_numa_compare() now aligns with task_tick_numa(). Link: https://lkml.kernel.org/r/cover.1748493462.git.yu.c.chen@intel.com Link: https://lkml.kernel.org/r/43d68b356b25d124f0d222ebedf3859e86eefb9f.1748493462.git.yu.c.chen@intel.com Link: https://lkml.kernel.org/r/cover.1748002400.git.yu.c.chen@intel.com Link: https://lkml.kernel.org/r/eaacc9c9bd37bac92d43a671867d85b2fdad3b06.1748002400.git.yu.c.chen@intel.com Signed-off-by: Chen Yu Signed-off-by: Libo Chen Suggested-by: Michal Koutný Tested-by: Ayush Jain Tested-by: Venkat Rao Bagalkote Reviewed-by: Shakeel Butt Cc: Aubrey Li Cc: "Chen, Tim C" Cc: Ingo Molnar Cc: Johannes Weiner Cc: Jonathan Corbet Cc: K Prateek Nayak Cc: Madadi Vineeth Reddy Cc: Mel Gorman Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Tejun Heo Signed-off-by: Andrew Morton commit 83da212b7fca407f6f30c7d6f02a8f910db8724d Author: Dan Carpenter Date: Wed May 28 11:13:45 2025 +0300 tools/testing: check correct variable in open_procmap() Check if "procmap_out->fd" is negative instead of "procmap_out" (which is a pointer). Link: https://lkml.kernel.org/r/aDbFuUTlJTBqziVd@stanley.mountain Fixes: bd23f293a0d5 ("tools/testing: add PROCMAP_QUERY helper functions in mm self tests") Signed-off-by: Dan Carpenter Reviewed-by: Lorenzo Stoakes Cc: levi.yun Cc: Shuah Khan Cc: Wei Yang Signed-off-by: Andrew Morton commit 918850c13608c7b138512c2ecbfd3436b7a51797 Author: Lorenzo Stoakes Date: Wed May 28 15:15:39 2025 +0100 tools/testing/vma: add missing function stub The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma() error handling for hugetlb mappings") mistakenly did not provide a stub for the VMA userland testing, which results in a compile error when trying to build this. Provide this stub to resolve the issue. Link: https://lkml.kernel.org/r/20250528-fix-vma-test-v1-1-c8a5f533b38f@oracle.com Fixes: ee40c9920ac2 ("mm: fix copy_vma() error handling for hugetlb mappings") Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Reviewed-by: Pedro Falcato Cc: Jann Horn Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 52084f258e46f09a71063447df31cbd48c0cacd0 Author: Jann Horn Date: Wed May 28 23:06:17 2025 +0200 mm/gup: update comment explaining why gup_fast() disables IRQs The current comment in gup_fast() talks about "IPIs that come from THPs splitting", which is outdated and refers to the old THP splitting implementation that was removed in commit ad0bed24e98b ("thp: drop all split_huge_page()-related code"), which landed in v4.5. Before then, THP splitting involved a pmdp_splitting_flush(), which sent an IPI to serialize against gup_fast(). Nowadays, we use tlb_remove_table_sync_one() to send IPIs that serialize against gup_fast(); this is used, for example, in THP *collapsing* to stop gup_fast() walks of a page table before depositing it. Link: https://lkml.kernel.org/r/20250528-gup-irq-comment-fix-v1-1-b9d83c345333@google.com Signed-off-by: Jann Horn Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: John Hubbard Cc: Kirill A. Shuemov Cc: Peter Xu Signed-off-by: Andrew Morton commit bb084994d38fd36518ac50a33c8ddcea2239067e Author: David Hildenbrand Date: Wed May 28 21:52:44 2025 +0200 selftests/mm: two fixes for the pfnmap test When unregistering the signal handler, we have to pass SIG_DFL, and blindly reading from PFN 0 and PFN 1 seems to be problematic on !x86 systems. In particularly, on arm64 tx2 machines where noting resides at these physical memory locations, we can generate RAS errors. Let's fix it by scanning /proc/iomem for actual "System RAM". Link: https://lkml.kernel.org/r/20250528195244.1182810-1-david@redhat.com Fixes: 2616b370323a ("selftests/mm: add simple VM_PFNMAP tests based on mmap'ing /dev/mem") Signed-off-by: David Hildenbrand Reported-by: Ryan Roberts Closes: https://lore.kernel.org/all/232960c2-81db-47ca-a337-38c4bce5f997@arm.com/T/#u Reviewed-by: Ryan Roberts Tested-by: Aishwarya TCV Cc: Shuah Khan Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 595cf683519ab5a277d258a2251ee8cc7b838d6d Author: Shivank Garg Date: Mon May 26 18:28:18 2025 +0000 mm/khugepaged: fix race with folio split/free using temporary reference hpage_collapse_scan_file() calls is_refcount_suitable(), which in turn calls folio_mapcount(). folio_mapcount() checks folio_test_large() before proceeding to folio_large_mapcount(), but there is a race window where the folio may get split/freed between these checks, triggering: VM_WARN_ON_FOLIO(!folio_test_large(folio), folio) Take a temporary reference to the folio in hpage_collapse_scan_file(). This stabilizes the folio during refcount check and prevents incorrect large folio detection due to concurrent split/free. Use helper folio_expected_ref_count() + 1 to compare with folio_ref_count() instead of using is_refcount_suitable(). Link: https://lkml.kernel.org/r/20250526182818.37978-1-shivankg@amd.com Fixes: 05c5323b2a34 ("mm: track mapcount of large folios in single value") Signed-off-by: Shivank Garg Reported-by: syzbot+2b99589e33edbe9475ca@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/6828470d.a70a0220.38f255.000c.GAE@google.com Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dev Jain Reviewed-by: Baolin Wang Cc: Bharata B Rao Cc: Fengwei Yin Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Ryan Roberts Cc: Zi Yan Cc: Signed-off-by: Andrew Morton commit e13e7922d03439e374c263049af5f740ceae6346 Author: Juan Yescas Date: Wed May 21 14:57:45 2025 -0700 mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order Problem: On large page size configurations (16KiB, 64KiB), the CMA alignment requirement (CMA_MIN_ALIGNMENT_BYTES) increases considerably, and this causes the CMA reservations to be larger than necessary. This means that system will have less available MIGRATE_UNMOVABLE and MIGRATE_RECLAIMABLE page blocks since MIGRATE_CMA can't fallback to them. The CMA_MIN_ALIGNMENT_BYTES increases because it depends on MAX_PAGE_ORDER which depends on ARCH_FORCE_MAX_ORDER. The value of ARCH_FORCE_MAX_ORDER increases on 16k and 64k kernels. For example, in ARM, the CMA alignment requirement when: - CONFIG_ARCH_FORCE_MAX_ORDER default value is used - CONFIG_TRANSPARENT_HUGEPAGE is set: PAGE_SIZE | MAX_PAGE_ORDER | pageblock_order | CMA_MIN_ALIGNMENT_BYTES ----------------------------------------------------------------------- 4KiB | 10 | 9 | 4KiB * (2 ^ 9) = 2MiB 16Kib | 11 | 11 | 16KiB * (2 ^ 11) = 32MiB 64KiB | 13 | 13 | 64KiB * (2 ^ 13) = 512MiB There are some extreme cases for the CMA alignment requirement when: - CONFIG_ARCH_FORCE_MAX_ORDER maximum value is set - CONFIG_TRANSPARENT_HUGEPAGE is NOT set: - CONFIG_HUGETLB_PAGE is NOT set PAGE_SIZE | MAX_PAGE_ORDER | pageblock_order | CMA_MIN_ALIGNMENT_BYTES ------------------------------------------------------------------------ 4KiB | 15 | 15 | 4KiB * (2 ^ 15) = 128MiB 16Kib | 13 | 13 | 16KiB * (2 ^ 13) = 128MiB 64KiB | 13 | 13 | 64KiB * (2 ^ 13) = 512MiB This affects the CMA reservations for the drivers. If a driver in a 4KiB kernel needs 4MiB of CMA memory, in a 16KiB kernel, the minimal reservation has to be 32MiB due to the alignment requirements: reserved-memory { ... cma_test_reserve: cma_test_reserve { compatible = "shared-dma-pool"; size = <0x0 0x400000>; /* 4 MiB */ ... }; }; reserved-memory { ... cma_test_reserve: cma_test_reserve { compatible = "shared-dma-pool"; size = <0x0 0x2000000>; /* 32 MiB */ ... }; }; Solution: Add a new config CONFIG_PAGE_BLOCK_ORDER that allows to set the page block order in all the architectures. The maximum page block order will be given by ARCH_FORCE_MAX_ORDER. By default, CONFIG_PAGE_BLOCK_ORDER will have the same value that ARCH_FORCE_MAX_ORDER. This will make sure that current kernel configurations won't be affected by this change. It is a opt-in change. This patch will allow to have the same CMA alignment requirements for large page sizes (16KiB, 64KiB) as that in 4kb kernels by setting a lower pageblock_order. Tests: - Verified that HugeTLB pages work when pageblock_order is 1, 7, 10 on 4k and 16k kernels. - Verified that Transparent Huge Pages work when pageblock_order is 1, 7, 10 on 4k and 16k kernels. - Verified that dma-buf heaps allocations work when pageblock_order is 1, 7, 10 on 4k and 16k kernels. Benchmarks: The benchmarks compare 16kb kernels with pageblock_order 10 and 7. The reason for the pageblock_order 7 is because this value makes the min CMA alignment requirement the same as that in 4kb kernels (2MB). - Perform 100K dma-buf heaps (/dev/dma_heap/system) allocations of SZ_8M, SZ_4M, SZ_2M, SZ_1M, SZ_64, SZ_8, SZ_4. Use simpleperf (https://developer.android.com/ndk/guides/simpleperf) to measure the # of instructions and page-faults on 16k kernels. The benchmark was executed 10 times. The averages are below: # instructions | #page-faults order 10 | order 7 | order 10 | order 7 -------------------------------------------------------- 13,891,765,770 | 11,425,777,314 | 220 | 217 14,456,293,487 | 12,660,819,302 | 224 | 219 13,924,261,018 | 13,243,970,736 | 217 | 221 13,910,886,504 | 13,845,519,630 | 217 | 221 14,388,071,190 | 13,498,583,098 | 223 | 224 13,656,442,167 | 12,915,831,681 | 216 | 218 13,300,268,343 | 12,930,484,776 | 222 | 218 13,625,470,223 | 14,234,092,777 | 219 | 218 13,508,964,965 | 13,432,689,094 | 225 | 219 13,368,950,667 | 13,683,587,37 | 219 | 225 ------------------------------------------------------------------- 13,803,137,433 | 13,131,974,268 | 220 | 220 Averages There were 4.85% #instructions when order was 7, in comparison with order 10. 13,803,137,433 - 13,131,974,268 = -671,163,166 (-4.86%) The number of page faults in order 7 and 10 were the same. These results didn't show any significant regression when the pageblock_order is set to 7 on 16kb kernels. - Run speedometer 3.1 (https://browserbench.org/Speedometer3.1/) 5 times on the 16k kernels with pageblock_order 7 and 10. order 10 | order 7 | order 7 - order 10 | (order 7 - order 10) % ------------------------------------------------------------------- 15.8 | 16.4 | 0.6 | 3.80% 16.4 | 16.2 | -0.2 | -1.22% 16.6 | 16.3 | -0.3 | -1.81% 16.8 | 16.3 | -0.5 | -2.98% 16.6 | 16.8 | 0.2 | 1.20% ------------------------------------------------------------------- 16.44 16.4 -0.04 -0.24% Averages The results didn't show any significant regression when the pageblock_order is set to 7 on 16kb kernels. Link: https://lkml.kernel.org/r/20250521215807.1860663-1-jyescas@google.com Signed-off-by: Juan Yescas Acked-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: David Hildenbrand Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Minchan Kim Signed-off-by: Andrew Morton commit 49c69504f4d340d870f2c3f3d2f404c118ff7b23 Author: Jann Horn Date: Fri May 23 00:30:17 2025 +0200 mmu_notifiers: remove leftover stub macros Commit ec8832d007cb ("mmu_notifiers: don't invalidate secondary TLBs as part of mmu_notifier_invalidate_range_end()") removed the main definitions of {ptep,pmdp_huge,pudp_huge}_clear_flush_notify; just their !CONFIG_MMU_NOTIFIER stubs are left behind, remove them. Link: https://lkml.kernel.org/r/20250523-mmu-notifier-cleanup-unused-v1-1-cc1f47ebec33@google.com Signed-off-by: Jann Horn Reviewed-by: Alistair Popple Reviewed-by: Qi Zheng Reviewed-by: Jason Gunthorpe Signed-off-by: Andrew Morton commit cfc695109a6cd9b7228ad19ef7e74a851856ce3d Author: Mark Brown Date: Thu May 22 17:29:00 2025 +0100 selftests/mm: deduplicate test names in madv_populate The madv_populate selftest has some repetitive code for several different cases that it covers, included repeated test names used in ksft_test_result() reports. This causes problems for automation, the test name is used to both track the test between runs and distinguish between multiple tests within the same run. Fix this by tweaking the messages with duplication to be more specific about the contexts they're in. Link: https://lkml.kernel.org/r/20250522-selftests-mm-madv-populate-dedupe-v1-1-fd1dedd79b4b@kernel.org Signed-off-by: Mark Brown Reviewed-by: Liam R. Howlett Acked-by: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3bf67171e98272c918a41b899070e6e86741adc8 Author: Alice Ryhl Date: Thu May 1 12:16:16 2025 +0000 kcov: rust: add flags for KCOV with Rust Rust code is currently not instrumented properly when KCOV is enabled. Thus, add the relevant flags to perform instrumentation correctly. This is necessary for efficient fuzzing of Rust code. The sanitizer-coverage features of LLVM have existed for long enough that they are available on any LLVM version supported by rustc, so we do not need any Kconfig feature detection. The coverage level is set to 3, as that is the level needed by trace-pc. We do not instrument `core` since when we fuzz the kernel, we are looking for bugs in the kernel, not the Rust stdlib. Link: https://lkml.kernel.org/r/20250501-rust-kcov-v2-1-b71e83e9779f@google.com Signed-off-by: Alice Ryhl Co-developed-by: Matthew Maurer Signed-off-by: Matthew Maurer Reviewed-by: Alexander Potapenko Tested-by: Aleksandr Nogikh Acked-by: Miguel Ojeda Cc: Andreas Hindborg Cc: Andrey Konovalov Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Justin Stitt Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Trevor Gross Signed-off-by: Andrew Morton commit 5a78977262f47dd52a4880689a2ca3d21dbf149a Author: Alice Ryhl Date: Fri May 16 19:32:19 2025 +0000 mm: rust: make CONFIG_MMU ifdefs more narrow Currently the entire kernel::mm module is ifdef'd out when CONFIG_MMU=n. However, there are some downstream users of the module in rust/kernel/task.rs and rust/kernel/miscdevice.rs. Thus, update the cfgs so that only MmWithUserAsync is removed with CONFIG_MMU=n. The code is moved into a new file, since the #[cfg()] annotation otherwise has to be duplicated several times. Link: https://lkml.kernel.org/r/20250516193219.2987032-1-aliceryhl@google.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505071753.kldNHYVQ-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202505072116.eSYC8igT-lkp@intel.com/ Fixes: 5bb9ed6cdfeb ("mm: rust: add abstraction for struct mm_struct") Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Cc: Boqun Feng Cc: Liam Howlett Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit bfe125f1b1870c7b5f05b489a525042d6715fcc1 Author: Roman Gushchin Date: Thu May 22 01:28:38 2025 +0000 mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables() Commit b67fbebd4cf9 ("mmu_gather: Force tlb-flush VM_PFNMAP vmas") added a forced tlbflush to tlb_vma_end(), which is required to avoid a race between munmap() and unmap_mapping_range(). However it added some overhead to other paths where tlb_vma_end() is used, but vmas are not removed, e.g. madvise(MADV_DONTNEED). Fix this by moving the tlb flush out of tlb_end_vma() into new tlb_flush_vmas() called from free_pgtables(), somewhat similar to the stable version of the original commit: commit 895428ee124a ("mm: Force TLB flush for PFNMAP mappings before unlink_file_vma()"). Note, that if tlb->fullmm is set, no flush is required, as the whole mm is about to be destroyed. Link: https://lkml.kernel.org/r/20250522012838.163876-1-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Reviewed-by: Jann Horn Acked-by: Hugh Dickins Acked-by: Peter Zijlstra (Intel) Cc: Will Deacon Cc: "Aneesh Kumar K.V" Cc: Nick Piggin Signed-off-by: Andrew Morton commit 28615e6eed152f2fda5486680090b74aeed7b554 Author: SeongJae Park Date: Tue May 20 21:27:55 2025 -0700 mm/damon/Kconfig: enable CONFIG_DAMON by default As of this writing, multiple major distros including Alma, Amazon, Android, CentOS, Debian, Fedora, and Oracle are build-enabling DAMON (set CONFIG_DAMON[1]). Enabling it by default will save configuration setup time for the current and future DAMON users. Build-enabling DAMON does not introduce a real risk since it makes no behavioral change by default. It requires explicit user requests to do anything. Only one potential risk is making the size of the kernel a little bit larger. On a production-purpose configuration, it increases the resulting kernel package size by about 0.1 % of the final package file. I believe that's too small to be a real problem in common setups. Hence, the benefit of enabling CONFIG_DAMON outweighs the potential risk. Set CONFIG_DAMON by default. Link: https://oracle.github.io/kconfigs/?config=UTS_RELEASE&config=DAMON [1] Link: https://lkml.kernel.org/r/20250521042755.39653-3-sj@kernel.org Signed-off-by: SeongJae Park Acked-by: Honggyu Kim Signed-off-by: Andrew Morton commit 0acfc656df50403cbd9dcb2d7b2a04fce161e6e4 Author: SeongJae Park Date: Tue May 20 21:27:54 2025 -0700 mm/damon/Kconfig: set DAMON_{VADDR,PADDR,SYSFS} default to DAMON Patch series "mm/damon: build-enable essential DAMON components by default". As of this writing, multiple major distros including Alma, Amazon, Android, CentOS, Debian, Fedora, and Oracle are build-enabling DAMON (set CONFIG_DAMON[1]). Configuring DAMON is not very easy, since it is disabled by default, and there are multiple essential options that need to be manually turned on, one by one. Make it easier, by grouping essential configurations to be enabled with one selection, and enabling build of the essential parts of DAMON by default. Note that build-enabling DAMON does not introduce any real risk, since it makes no behavioral change by default. It requires explicit user requests to do anything. Only one potential risk is making the size of the kernel a little bit larger. On a production-purpose configuration, it increases the resulting kernel package binary size by about 0.1 % of the final package file. I believe that's too small to be a real problem in common setups. DAMON_{VADDR,PADDR,SYSFS} are de-facto essential parts of DAMON for normal usages. Because those need to be enabled one by one, however, and there are other test-purpose or non-essential configurations, it is easy to be confused and make mistakes at setup. Make the essential configurations default to CONFIG_DAMON, so that those can be enabled by default with a single change. Link: https://oracle.github.io/kconfigs/?config=UTS_RELEASE&config=DAMON [1] Link: https://lkml.kernel.org/r/20250521042755.39653-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250521042755.39653-2-sj@kernel.org Signed-off-by: SeongJae Park Acked-by: Honggyu Kim Signed-off-by: Andrew Morton commit 3aefb1f06994ebbd94b7b2e5bf9cc3fecbd3eb39 Author: Wenjie Xu Date: Thu May 15 19:42:31 2025 +0800 hugetlb: show nr_huge_pages in report_hugepages() The number of pre-allocated huge pages should be nr_huge_pages, not free_huge_pages, although they are same during booting stage Link: https://lkml.kernel.org/r/20250515114231.65824-1-xuwenjie04@baidu.com Signed-off-by: Wenjie Xu Signed-off-by: Li RongQing Acked-by: Oscar Salvador Cc: Muchun Song Signed-off-by: Andrew Morton commit 115155901db2593d7adbd3e84d0889f591fbb6fc Author: Zi Yan Date: Fri May 16 09:29:38 2025 -0400 selftests/mm: skip hugevm test if kernel config file is not present When running hugevm tests in a machine without kernel config present, e.g., a VM running a kernel without CONFIG_IKCONFIG_PROC nor /boot/config-*, skip hugevm tests, which reads kernel config to get page table level information. Link: https://lkml.kernel.org/r/20250516132938.356627-3-ziy@nvidia.com Signed-off-by: Zi Yan Acked-by: Lorenzo Stoakes Cc: Adam Sindelar Cc: Lorenzo Stoakes Cc: Pedro Falcato Signed-off-by: Andrew Morton commit 6d211303121fdef3b960125ceeafd1073df05ae6 Author: Zi Yan Date: Fri May 16 09:29:37 2025 -0400 selftests/mm: skip guard_regions.uffd tests when uffd is not present Patch series "Skip mm selftests instead when kernel features are not present", v2. Two guard_regions tests on userfaultfd fail when userfaultfd is not present. Skip them instead. hugevm test reads kernel config to get page table level information and fails when neither /proc/config.gz nor /boot/config-* is present. Skip it instead. This patch (of 2): When userfaultfd is not compiled into kernel, userfaultfd() returns -1, causing guard_regions.uffd tests to fail. Skip the tests instead. Link: https://lkml.kernel.org/r/20250516132938.356627-1-ziy@nvidia.com Link: https://lkml.kernel.org/r/20250516132938.356627-2-ziy@nvidia.com Signed-off-by: Zi Yan Reviewed-by: Lorenzo Stoakes Reviewed-by: Pedro Falcato Cc: Adam Sindelar Signed-off-by: Andrew Morton commit c5a9deace6095c0dca86f5414493bcf1711f1ca3 Author: Kemeng Shi Date: Sat May 17 01:09:39 2025 +0800 mm/shmem: remove unneeded xa_is_value() check in shmem_unuse_swap_entries() As only value entry will be added to fbatch in shmem_find_swap_entries(), there is no need to do xa_is_value() check in shmem_unuse_swap_entries(). Link: https://lkml.kernel.org/r/20250516170939.965736-6-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang Cc: Hugh Dickins Cc: Kairui Song Cc: kernel test robot Signed-off-by: Andrew Morton commit a5cdbe9f376f920af102fd0f0ecfd9952bb6bc40 Author: Kemeng Shi Date: Sat May 17 01:09:38 2025 +0800 mm: shmem: only remove inode from swaplist when it's swapped page count is 0 Even if we fail to allocate a swap entry, the inode might have previously allocated entry and we might take inode containing swap entry off swaplist. As a result, try_to_unuse() may enter a potential dead loop to repeatedly look for inode and clean it's swap entry. Only take inode off swaplist when it's swapped page count is 0 to fix the issue. Link: https://lkml.kernel.org/r/20250516170939.965736-5-shikemeng@huaweicloud.com Fixes: b487a2da3575 ("mm, swap: simplify folio swap allocation") Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang Reviewed-by: Kairui Song Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505161438.9009cf47-lkp@intel.com Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 3f778ab1b52450d467109321e2abfc4b36ec2d3e Author: Kemeng Shi Date: Sat May 17 01:09:37 2025 +0800 mm/shmem: fix potential dead loop in shmem_unuse() If multi shmem_unuse() for different swap type is called concurrently, a dead loop could occur as following: shmem_unuse(typeA) shmem_unuse(typeB) mutex_lock(&shmem_swaplist_mutex) list_for_each_entry_safe(info, next, ...) ... mutex_unlock(&shmem_swaplist_mutex) /* info->swapped may drop to 0 */ shmem_unuse_inode(&info->vfs_inode, type) mutex_lock(&shmem_swaplist_mutex) list_for_each_entry(info, next, ...) if (!info->swapped) list_del_init(&info->swaplist) ... mutex_unlock(&shmem_swaplist_mutex) mutex_lock(&shmem_swaplist_mutex) /* iterate with offlist entry and encounter a dead loop */ next = list_next_entry(info, swaplist); ... Restart the iteration if the inode is already off shmem_swaplist list to fix the issue. Link: https://lkml.kernel.org/r/20250516170939.965736-4-shikemeng@huaweicloud.com Fixes: b56a2d8af914 ("mm: rid swapoff of quadratic complexity") Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang Cc: Hugh Dickins Cc: Kairui Song Cc: kernel test robot Signed-off-by: Andrew Morton commit 594ec2ab389ab9cdada13ad85f503bbfc5658e84 Author: Kemeng Shi Date: Sat May 17 01:09:36 2025 +0800 mm: shmem: add missing shmem_unacct_size() in __shmem_file_setup() We will miss shmem_unacct_size() when is_idmapped_mnt() returns a failure. Move is_idmapped_mnt() before shmem_acct_size() to fix the issue. Link: https://lkml.kernel.org/r/20250516170939.965736-3-shikemeng@huaweicloud.com Fixes: 7a80e5b8c6fa ("shmem: support idmapped mounts for tmpfs") Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang Cc: Hugh Dickins Cc: Kairui Song Cc: kernel test robot Signed-off-by: Andrew Morton commit e08d5f515613a9860bfee7312461a19f422adb5e Author: Kemeng Shi Date: Sat May 17 01:09:35 2025 +0800 mm: shmem: avoid unpaired folio_unlock() in shmem_swapin_folio() Patch series "Some random fixes and cleanup to shmem", v3. This series contains some simple fixes and cleanup which are made during learning shmem. More details can be found in respective patches. This patch (of 5): If we get a folio from swap_cache_get_folio() successfully but encounter a failure before the folio is locked, we will unlock the folio which was not previously locked. Put the folio and set it to NULL when a failure occurs before the folio is locked to fix the issue. Link: https://lkml.kernel.org/r/20250516170939.965736-1-shikemeng@huaweicloud.com Link: https://lkml.kernel.org/r/20250516170939.965736-2-shikemeng@huaweicloud.com Fixes: 058313515d5a ("mm: shmem: fix potential data corruption during shmem swapin") Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang Reviewed-by: Kairui Song Cc: Hugh Dickins Cc: kernel test robot Signed-off-by: Andrew Morton commit 8e1c4961f44be6172553c062d8f425a4a4357afa Author: Akinobu Mita Date: Sat May 17 23:18:52 2025 +0900 mm/damon/core: avoid destroyed target reference from DAMOS quota When the number of the monitoring targets in running contexts is reduced, there may be DAMOS quotas referencing the targets that will be destroyed. Applying the scheme action for such DAMOS scheme will be skipped forever looking for the starting part of the region for the destroyed monitoring target. To fix this issue, when the monitoring target is destroyed, reset the starting part for all DAMOS quotas that reference the target. Link: https://lkml.kernel.org/r/20250517141852.142802-1-akinobu.mita@gmail.com Fixes: da87878010e5 ("mm/damon/sysfs: support online inputs update") Signed-off-by: Akinobu Mita Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 3ac4638a734abbeb1d4a02b042e26a80a4205975 Author: Shakeel Butt Date: Sun May 18 23:31:42 2025 -0700 memcg: make memcg_rstat_updated nmi safe Currently kernel maintains memory related stats updates per-cgroup to optimize stats flushing. The stats_updates is defined as atomic64_t which is not nmi-safe on some archs. Actually we don't really need 64bit atomic as the max value stats_updates can get should be less than nr_cpus * MEMCG_CHARGE_BATCH. A normal atomic_t should suffice. Also the function cgroup_rstat_updated() is still not nmi-safe but there is parallel effort to make it nmi-safe, so until then let's ignore it in the nmi context. Link: https://lkml.kernel.org/r/20250519063142.111219-6-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Andrew Morton commit 15ca4fa9045768dd798f101a09f0c27a2d1b0cdf Author: Shakeel Butt Date: Sun May 18 23:31:41 2025 -0700 memcg: nmi-safe slab stats updates The objcg based kmem [un]charging can be called in nmi context and it may need to update NR_SLAB_[UN]RECLAIMABLE_B stats. So, let's correctly handle the updates of these stats in the nmi context. Link: https://lkml.kernel.org/r/20250519063142.111219-5-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Andrew Morton commit 9d3edf96cef6d65ca2be287e48d40aec90081f3f Author: Shakeel Butt Date: Sun May 18 23:31:40 2025 -0700 memcg: add nmi-safe update for MEMCG_KMEM The objcg based kmem charging and uncharging code path needs to update MEMCG_KMEM appropriately. Let's add support to update MEMCG_KMEM in nmi-safe way for those code paths. Link: https://lkml.kernel.org/r/20250519063142.111219-4-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Andrew Morton commit 940b01fc8dc1aead398819215650727cb9e7335e Author: Shakeel Butt Date: Sun May 18 23:31:39 2025 -0700 memcg: nmi safe memcg stats for specific archs There are archs which have NMI but does not support this_cpu_* ops safely in the nmi context but they support safe atomic ops in nmi context. For such archs, let's add infra to use atomic ops for the memcg stats which can be updated in nmi. At the moment, the memcg stats which get updated in the objcg charging path are MEMCG_KMEM, NR_SLAB_RECLAIMABLE_B & NR_SLAB_UNRECLAIMABLE_B. Rather than adding support for all memcg stats to be nmi safe, let's just add infra to make these three stats nmi safe which this patch is doing. Link: https://lkml.kernel.org/r/20250519063142.111219-3-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Andrew Morton commit 25352d2f2dc630b33cb61228dbdf7a0a2d6a4117 Author: Shakeel Butt Date: Sun May 18 23:31:38 2025 -0700 memcg: disable kmem charging in nmi for unsupported arch Patch series "memcg: nmi-safe kmem charging", v4. Users can attached their BPF programs at arbitrary execution points in the kernel and such BPF programs may run in nmi context. In addition, these programs can trigger memcg charged kernel allocations in the nmi context. However memcg charging infra for kernel memory is not equipped to handle nmi context for all architectures. This series removes the hurdles to enable kmem charging in the nmi context for most of the archs. For archs without CONFIG_HAVE_NMI, this series is a noop. For archs with NMI support and have CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS, the previous work to make memcg stats re-entrant is sufficient for allowing kmem charging in nmi context. For archs with NMI support but without CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS and with ARCH_HAVE_NMI_SAFE_CMPXCHG, this series added infra to support kmem charging in nmi context. Lastly those archs with NMI support but without CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS and ARCH_HAVE_NMI_SAFE_CMPXCHG, kmem charging in nmi context is not supported at all. Mostly used archs have support for CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS and this series should be almost a noop (other than making memcg_rstat_updated nmi safe) for such archs. This patch (of 5): The memcg accounting and stats uses this_cpu* and atomic* ops. There are archs which define CONFIG_HAVE_NMI but does not define CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS and ARCH_HAVE_NMI_SAFE_CMPXCHG, so memcg accounting for such archs in nmi context is not possible to support. Let's just disable memcg accounting in nmi context for such archs. Link: https://lkml.kernel.org/r/20250519063142.111219-1-shakeel.butt@linux.dev Link: https://lkml.kernel.org/r/20250519063142.111219-2-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Andrew Morton commit 9abb8c208fcc26c644d4a25eb90a526c60ebbd62 Author: Mark Brown Date: Thu May 15 11:36:14 2025 +0200 selftests/mm: deduplicate default page size test results in thuge-gen The thuge-gen test program runs mmap() and shmget() tests for both every available page size and the default page size, resulting in two tests for the default size. These tests are distinct since the flags in the default case do not specify an explicit size, add the flags to the test name that is logged to deduplicate. Link: https://lkml.kernel.org/r/20250515-selfests-mm-thuge-gen-dup-v1-1-057d2836553f@kernel.org Signed-off-by: Mark Brown Acked-by: Dev Jain Cc: Shuah Khan Signed-off-by: Andrew Morton commit 62973e38670a660480ab19c9241f8d77e89b0199 Author: Mark Brown Date: Thu May 15 11:27:14 2025 +0200 selftests/mm: deduplicate test logging in test_mlock_lock() The mlock2-tests test_mlock_lock() test reports two test results with an identical string, one reporitng if it successfully locked a block of memory and another reporting if the lock is still present after doing an unlock (following a similar pattern to other tests in the same program). This confuses test automation since the test string is used to deduplicate tests, change the post unlock test to report "Unlocked" instead like the other tests to fix this. Link: https://lkml.kernel.org/r/20250515-selftest-mm-mlock2-dup-v1-1-963d5d7d243a@kernel.org Signed-off-by: Mark Brown Acked-by: Dev Jain Cc: Shuah Khan Signed-off-by: Andrew Morton commit dc75a0d93bd5a1c64104efb4ec680463afbdd755 Author: Sergey Senozhatsky Date: Wed May 14 11:47:51 2025 +0900 zram: support deflate-specific params Introduce support of algorithm specific parameters in algorithm_params device attribute. The expected format is algorithm.param=value. For starters, add support for deflate.winbits parameter. Link: https://lkml.kernel.org/r/20250514024825.1745489-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reviewed-by: Mikhail Zaslonko Cc: Minchan Kim Signed-off-by: Andrew Morton commit a5ade2e9fa6af5ba545c0f94a65dd001c90c1cf7 Author: Sergey Senozhatsky Date: Wed May 14 11:47:50 2025 +0900 zram: rename ZCOMP_PARAM_NO_LEVEL Patch series "zram: support algorithm-specific parameters". This patchset adds support for algorithm-specific parameters. For now, only deflate-specific winbits can be configured, which fixes deflate support on some s390 setups. This patch (of 2): Use more generic name because this will be default "un-set" value for more params in the future. Link: https://lkml.kernel.org/r/20250514024825.1745489-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20250514024825.1745489-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reviewed-by: Mikhail Zaslonko Cc: Minchan Kim Signed-off-by: Andrew Morton commit d9736929445e7f4c60f0093af61ff0b52e2d4412 Author: Matthew Wilcox (Oracle) Date: Wed May 14 18:06:04 2025 +0100 iov: remove copy_page_from_iter_atomic() All callers now use copy_folio_from_iter_atomic(), so convert copy_page_from_iter_atomic(). While I'm in there, use kmap_local_folio() and pagefault_disable() instead of kmap_atomic(). That allows preemption and/or task migration to happen during the copy_from_user(). Also use the new folio_test_partial_kmap() predicate instead of open-coding it. Link: https://lkml.kernel.org/r/20250514170607.3000994-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Alexander Viro Cc: Hugh Dickins Cc: Konstantin Komarov Signed-off-by: Andrew Morton commit 80ae99c5727f35d2ed7e011fb0b72c2fe7c5a908 Author: Matthew Wilcox (Oracle) Date: Wed May 14 18:06:03 2025 +0100 ntfs3: use folios more in ntfs_compress_write() Remove the local 'page' variable and do everything in terms of folios. Removes the last user of copy_page_from_iter_atomic() and a hidden call to compound_head() in ClearPageDirty(). Link: https://lkml.kernel.org/r/20250514170607.3000994-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Konstantin Komarov Cc: Alexander Viro Cc: Hugh Dickins Signed-off-by: Andrew Morton commit acc53a0b4c156877773da6e9eea4113dc7e770ae Author: Matthew Wilcox (Oracle) Date: Wed May 14 19:15:07 2025 +0100 mm: rename page->index to page->__folio_index All users of page->index have been converted to not refer to it any more. Update a few pieces of documentation that were missed and prevent new users from appearing (or at least make them easy to grep for). Link: https://lkml.kernel.org/r/20250514181508.3019795-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit e94715982c969135457df013d2f8b1742451803c Author: Matthew Wilcox (Oracle) Date: Fri May 16 16:13:29 2025 +0100 m68k: remove use of page->index Switch to using struct ptdesc to store the markbits which will allow us to remove index from struct page. Link: https://lkml.kernel.org/r/20250516151332.3705351-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton commit 132263220ddacaa5d4a93c34675eb9639dcc3707 Author: Kent Overstreet Date: Fri May 30 19:09:11 2025 -0400 bcachefs: Add better logging to fsck_rename_dirent() Signed-off-by: Kent Overstreet commit 18dad454cd16cbb4c219dbd19a0008af52eb294a Author: Kent Overstreet Date: Sat May 24 16:33:39 2025 -0400 bcachefs: Replace rcu_read_lock() with guards The new guard(), scoped_guard() allow for more natural code. Some of the uses with creative flow control have been left. Signed-off-by: Kent Overstreet commit 9cb49fbf734609c79ba29c43d98e1230ecd1361a Author: Kent Overstreet Date: Sun May 25 01:41:17 2025 -0400 bcachefs: CLASS(btree_trans) Allow btree_trans to be used with CLASS(). Automatic cleanup, instead of manually calling bch2_trans_put(). We don't use DEFINE_CLASS because using a static inline for the constructor breaks bch2_trans_get()'s use of __func__, so we have to open code it. Signed-off-by: Kent Overstreet commit 7d4e49a77d9930c69751b9192448fda6ff9100f1 Merge: 00c010e130e583 375700bab5b150 Author: Linus Torvalds Date: Sat May 31 19:12:53 2025 -0700 Merge tag 'mm-nonmm-stable-2025-05-31-15-28' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - "hung_task: extend blocking task stacktrace dump to semaphore" from Lance Yang enhances the hung task detector. The detector presently dumps the blocking tasks's stack when it is blocked on a mutex. Lance's series extends this to semaphores - "nilfs2: improve sanity checks in dirty state propagation" from Wentao Liang addresses a couple of minor flaws in nilfs2 - "scripts/gdb: Fixes related to lx_per_cpu()" from Illia Ostapyshyn fixes a couple of issues in the gdb scripts - "Support kdump with LUKS encryption by reusing LUKS volume keys" from Coiby Xu addresses a usability problem with kdump. When the dump device is LUKS-encrypted, the kdump kernel may not have the keys to the encrypted filesystem. A full writeup of this is in the series [0/N] cover letter - "sysfs: add counters for lockups and stalls" from Max Kellermann adds /sys/kernel/hardlockup_count and /sys/kernel/hardlockup_count and /sys/kernel/rcu_stall_count - "fork: Page operation cleanups in the fork code" from Pasha Tatashin implements a number of code cleanups in fork.c - "scripts/gdb/symbols: determine KASLR offset on s390 during early boot" from Ilya Leoshkevich fixes some s390 issues in the gdb scripts * tag 'mm-nonmm-stable-2025-05-31-15-28' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (67 commits) llist: make llist_add_batch() a static inline delayacct: remove redundant code and adjust indentation squashfs: add optional full compressed block caching crash_dump, nvme: select CONFIGFS_FS as built-in scripts/gdb/symbols: determine KASLR offset on s390 during early boot scripts/gdb/symbols: factor out pagination_off() scripts/gdb/symbols: factor out get_vmlinux() kernel/panic.c: format kernel-doc comments mailmap: update and consolidate Casey Connolly's name and email nilfs2: remove wbc->for_reclaim handling fork: define a local GFP_VMAP_STACK fork: check charging success before zeroing stack fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code fork: clean-up ifdef logic around stack allocation kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count kernel/watchdog: add /sys/kernel/{hard,soft}lockup_count x86/crash: make the page that stores the dm crypt keys inaccessible x86/crash: pass dm crypt keys to kdump kernel Revert "x86/mm: Remove unused __set_memory_prot()" crash_dump: retrieve dm crypt keys in kdump kernel ... commit 42359f1615cf0c8184de67408ab294b574cfaaf6 Author: Kent Overstreet Date: Thu May 29 19:13:42 2025 -0400 bcachefs: CLASS(darray) Signed-off-by: Kent Overstreet commit 237a8e16bd71cce84e0e3404e1ed8df2b5d63c7c Author: Kent Overstreet Date: Sun May 25 02:59:35 2025 -0400 bcachefs: CLASS(printbuf) Add a DEFINE_CLASS() for printbufs. Signed-off-by: Kent Overstreet commit a0f7437906d115c3fff1b6242f57ca87262a879b Author: Kent Overstreet Date: Thu May 29 20:16:58 2025 -0400 bcachefs: sysfs trigger_journal_commit Signed-off-by: Kent Overstreet commit 1f42a0335a721eca962f792794e864797d09087a Author: Kent Overstreet Date: Thu May 29 18:02:21 2025 -0400 bcachefs: sysfs trigger_emergency_read_only Signed-off-by: Kent Overstreet commit 5802caf74fa5647a0e560b585bf7d1ac65b20e11 Author: Kent Overstreet Date: Thu May 29 16:56:50 2025 -0400 bcachefs: darray_find(), darray_find_p() New helpers to avoid open coded loops. Signed-off-by: Kent Overstreet commit 9a1accd3a57d4bfb6daeee2262b1b24b57ec2382 Author: Kent Overstreet Date: Thu May 29 20:06:01 2025 -0400 bcachefs: Journal keys are retained until shutdown, or journal replay finishes If we don't finish journal replay we need to keep journal keys around until the filesystem shuts down - otherwise e.g. -o norecovery, various tools (dump, list) break, and eventually we'll be doing journal replay in the background. Signed-off-by: Kent Overstreet commit 6447544c3d1473c9d8945e2cc0f3c71eba4c354b Author: Kent Overstreet Date: Thu May 29 17:32:35 2025 -0400 bcachefs: Improve error printing in btree_node_check_topology() We had a bug report where the errors from btree_node_check_topology() don't seem to be getting printed; log_fsck_err() does some fancy ratelimiting-type stuff that we don't want here. Instead, just use bch2_count_fsck_err(); this is simpler, and modelled after how we're currently handling bucket ref update errors in buckets.c. Signed-off-by: Kent Overstreet commit f402d9710b3e55fa2e47a939f69e4267d6d4406f Author: Kent Overstreet Date: Wed May 28 16:34:42 2025 -0400 bcachefs: bch2_readdir() now calls str_hash_check_key() More self healing code: readdir will now notice if there are dirents hashed incorrectly, and it'll repair them if errors=fix_safe. Signed-off-by: Kent Overstreet commit a5922682602788a0f9b37d58e15d7247ad6c54d4 Author: Kent Overstreet Date: Wed May 28 16:25:11 2025 -0400 bcachefs: bch2_str_hash_check_key() may now be called without snapshots_seen We don't track snapshot overwrites outside of fsck, so for this to be called at runtime outside of fsck we need to create it on demand, when we have repair to do. Signed-off-by: Kent Overstreet commit cb6f5d0decea51225b297b0ad3c393de12d68bf0 Author: Kent Overstreet Date: Wed May 28 15:20:20 2025 -0400 bcachefs: __bch2_insert_snapshot_whiteouts() refactoring Now uses bch2_get_snapshot_overwrites(), and much shorter. Signed-off-by: Kent Overstreet commit 801cb2bd6cb7ef2f4568b6646f92234c225c0932 Author: Kent Overstreet Date: Wed May 28 15:08:19 2025 -0400 bcachefs: bch2_get_snapshot_overwrites() New helper for getting a list of snapshot IDs that have overwritten a given key. Signed-off-by: Kent Overstreet commit d21262d4e35d448cbc80092c91f04cc0a5f2b0b4 Author: Kent Overstreet Date: Wed May 28 14:26:33 2025 -0400 bcachefs: bch2_dev_journal_bucket_delete() Recover from "journal and btree in same bucket". Signed-off-by: Kent Overstreet commit 0224d17d762ce036fde5ad18dd33236db6fca88b Author: Kent Overstreet Date: Tue May 27 22:20:27 2025 -0400 bcachefs: Runtime self healing for keys for deleted snapshots If snapshot deletion incorrectly missing some keys and leaves keys for deleted snapshots, that causes a bit of a problem for data move - we can't move an extent for a nonexistent snapshot, because the extent might have to be fragmented, and maintaining correct visibility in child snapshots doesn't work if it doesn't have a snapshot. Previously we'd just skip these keys, but it turns out that causes copygc to spin. So we need runtime self healing, i.e. calling check_key_has_snapshot() from the data move path. Snapshot deletion v2 included sentinal values for deleted snapshot nodes, so this is quite safe. Signed-off-by: Kent Overstreet commit f02d15327455822ed80e0b7d70b2ab3568a0389e Author: Kent Overstreet Date: Wed May 28 16:06:07 2025 -0400 bcachefs: Don't unlock trans before data_update_init() data_update_init() does need to do btree operations, delay doing the unlock-before-io. Signed-off-by: Kent Overstreet commit 642c1aabb001ee8410e6bfb6654b23bcead64e4e Author: Kent Overstreet Date: Wed May 28 11:31:51 2025 -0400 bcachefs: Use bch2_err_matches() for BCH_ERR_fsck_(fix|ignore) We'll be adding subtypes of these errors, and new error code tracing. Signed-off-by: Kent Overstreet commit 00c010e130e58301db2ea0cec1eadc931e1cb8cf Merge: b42966552bb8d3 c544a952ba61b1 Author: Linus Torvalds Date: Sat May 31 15:44:16 2025 -0700 Merge tag 'mm-stable-2025-05-31-14-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - "Add folio_mk_pte()" from Matthew Wilcox simplifies the act of creating a pte which addresses the first page in a folio and reduces the amount of plumbing which architecture must implement to provide this. - "Misc folio patches for 6.16" from Matthew Wilcox is a shower of largely unrelated folio infrastructure changes which clean things up and better prepare us for future work. - "memory,x86,acpi: hotplug memory alignment advisement" from Gregory Price adds early-init code to prevent x86 from leaving physical memory unused when physical address regions are not aligned to memory block size. - "mm/compaction: allow more aggressive proactive compaction" from Michal Clapinski provides some tuning of the (sadly, hard-coded (more sadly, not auto-tuned)) thresholds for our invokation of proactive compaction. In a simple test case, the reduction of a guest VM's memory consumption was dramatic. - "Minor cleanups and improvements to swap freeing code" from Kemeng Shi provides some code cleaups and a small efficiency improvement to this part of our swap handling code. - "ptrace: introduce PTRACE_SET_SYSCALL_INFO API" from Dmitry Levin adds the ability for a ptracer to modify syscalls arguments. At this time we can alter only "system call information that are used by strace system call tampering, namely, syscall number, syscall arguments, and syscall return value. This series should have been incorporated into mm.git's "non-MM" branch, but I goofed. - "fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions" from Andrei Vagin extends the info returned by the PAGEMAP_SCAN ioctl against /proc/pid/pagemap. This permits CRIU to more efficiently get at the info about guard regions. - "Fix parameter passed to page_mapcount_is_type()" from Gavin Shan implements that fix. No runtime effect is expected because validate_page_before_insert() happens to fix up this error. - "kernel/events/uprobes: uprobe_write_opcode() rewrite" from David Hildenbrand basically brings uprobe text poking into the current decade. Remove a bunch of hand-rolled implementation in favor of using more current facilities. - "mm/ptdump: Drop assumption that pxd_val() is u64" from Anshuman Khandual provides enhancements and generalizations to the pte dumping code. This might be needed when 128-bit Page Table Descriptors are enabled for ARM. - "Always call constructor for kernel page tables" from Kevin Brodsky ensures that the ctor/dtor is always called for kernel pgtables, as it already is for user pgtables. This permits the addition of more functionality such as "insert hooks to protect page tables". This change does result in various architectures performing unnecesary work, but this is fixed up where it is anticipated to occur. - "Rust support for mm_struct, vm_area_struct, and mmap" from Alice Ryhl adds plumbing to permit Rust access to core MM structures. - "fix incorrectly disallowed anonymous VMA merges" from Lorenzo Stoakes takes advantage of some VMA merging opportunities which we've been missing for 15 years. - "mm/madvise: batch tlb flushes for MADV_DONTNEED and MADV_FREE" from SeongJae Park optimizes process_madvise()'s TLB flushing. Instead of flushing each address range in the provided iovec, we batch the flushing across all the iovec entries. The syscall's cost was approximately halved with a microbenchmark which was designed to load this particular operation. - "Track node vacancy to reduce worst case allocation counts" from Sidhartha Kumar makes the maple tree smarter about its node preallocation. stress-ng mmap performance increased by single-digit percentages and the amount of unnecessarily preallocated memory was dramaticelly reduced. - "mm/gup: Minor fix, cleanup and improvements" from Baoquan He removes a few unnecessary things which Baoquan noted when reading the code. - ""Enhance sysfs handling for memory hotplug in weighted interleave" from Rakie Kim "enhances the weighted interleave policy in the memory management subsystem by improving sysfs handling, fixing memory leaks, and introducing dynamic sysfs updates for memory hotplug support". Fixes things on error paths which we are unlikely to hit. - "mm/damon: auto-tune DAMOS for NUMA setups including tiered memory" from SeongJae Park introduces new DAMOS quota goal metrics which eliminate the manual tuning which is required when utilizing DAMON for memory tiering. - "mm/vmalloc.c: code cleanup and improvements" from Baoquan He provides cleanups and small efficiency improvements which Baoquan found via code inspection. - "vmscan: enforce mems_effective during demotion" from Gregory Price changes reclaim to respect cpuset.mems_effective during demotion when possible. because presently, reclaim explicitly ignores cpuset.mems_effective when demoting, which may cause the cpuset settings to violated. This is useful for isolating workloads on a multi-tenant system from certain classes of memory more consistently. - "Clean up split_huge_pmd_locked() and remove unnecessary folio pointers" from Gavin Guo provides minor cleanups and efficiency gains in in the huge page splitting and migrating code. - "Use kmem_cache for memcg alloc" from Huan Yang creates a slab cache for `struct mem_cgroup', yielding improved memory utilization. - "add max arg to swappiness in memory.reclaim and lru_gen" from Zhongkun He adds a new "max" argument to the "swappiness=" argument for memory.reclaim MGLRU's lru_gen. This directs proactive reclaim to reclaim from only anon folios rather than file-backed folios. - "kexec: introduce Kexec HandOver (KHO)" from Mike Rapoport is the first step on the path to permitting the kernel to maintain existing VMs while replacing the host kernel via file-based kexec. At this time only memblock's reserve_mem is preserved. - "mm: Introduce for_each_valid_pfn()" from David Woodhouse provides and uses a smarter way of looping over a pfn range. By skipping ranges of invalid pfns. - "sched/numa: Skip VMA scanning on memory pinned to one NUMA node via cpuset.mems" from Libo Chen removes a lot of pointless VMA scanning when a task is pinned a single NUMA mode. Dramatic performance benefits were seen in some real world cases. - "JFS: Implement migrate_folio for jfs_metapage_aops" from Shivank Garg addresses a warning which occurs during memory compaction when using JFS. - "move all VMA allocation, freeing and duplication logic to mm" from Lorenzo Stoakes moves some VMA code from kernel/fork.c into the more appropriate mm/vma.c. - "mm, swap: clean up swap cache mapping helper" from Kairui Song provides code consolidation and cleanups related to the folio_index() function. - "mm/gup: Cleanup memfd_pin_folios()" from Vishal Moola does that. - "memcg: Fix test_memcg_min/low test failures" from Waiman Long addresses some bogus failures which are being reported by the test_memcontrol selftest. - "eliminate mmap() retry merge, add .mmap_prepare hook" from Lorenzo Stoakes commences the deprecation of file_operations.mmap() in favor of the new file_operations.mmap_prepare(). The latter is more restrictive and prevents drivers from messing with things in ways which, amongst other problems, may defeat VMA merging. - "memcg: decouple memcg and objcg stocks"" from Shakeel Butt decouples the per-cpu memcg charge cache from the objcg's one. This is a step along the way to making memcg and objcg charging NMI-safe, which is a BPF requirement. - "mm/damon: minor fixups and improvements for code, tests, and documents" from SeongJae Park is yet another batch of miscellaneous DAMON changes. Fix and improve minor problems in code, tests and documents. - "memcg: make memcg stats irq safe" from Shakeel Butt converts memcg stats to be irq safe. Another step along the way to making memcg charging and stats updates NMI-safe, a BPF requirement. - "Let unmap_hugepage_range() and several related functions take folio instead of page" from Fan Ni provides folio conversions in the hugetlb code. * tag 'mm-stable-2025-05-31-14-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (285 commits) mm: pcp: increase pcp->free_count threshold to trigger free_high mm/hugetlb: convert use of struct page to folio in __unmap_hugepage_range() mm/hugetlb: refactor __unmap_hugepage_range() to take folio instead of page mm/hugetlb: refactor unmap_hugepage_range() to take folio instead of page mm/hugetlb: pass folio instead of page to unmap_ref_private() memcg: objcg stock trylock without irq disabling memcg: no stock lock for cpu hot-unplug memcg: make __mod_memcg_lruvec_state re-entrant safe against irqs memcg: make count_memcg_events re-entrant safe against irqs memcg: make mod_memcg_state re-entrant safe against irqs memcg: move preempt disable to callers of memcg_rstat_updated memcg: memcg_rstat_updated re-entrant safe against irqs mm: khugepaged: decouple SHMEM and file folios' collapse selftests/eventfd: correct test name and improve messages alloc_tag: check mem_profiling_support in alloc_tag_init Docs/damon: update titles and brief introductions to explain DAMOS selftests/damon/_damon_sysfs: read tried regions directories in order mm/damon/tests/core-kunit: add a test for damos_set_filters_default_reject() mm/damon/paddr: remove unused variable, folio_list, in damon_pa_stat() mm/damon/sysfs-schemes: fix wrong comment on damons_sysfs_quota_goal_metric_strs ... commit 08652bd86e267b0c83ed013dd972c99c04c7e76a Author: Uday Shankar Date: Thu May 29 17:47:18 2025 -0600 Documentation: ublk: document UBLK_F_PER_IO_DAEMON Explain the restrictions imposed on ublk servers in two cases: 1. When UBLK_F_PER_IO_DAEMON is set (current ublk_drv) 2. When UBLK_F_PER_IO_DAEMON is not set (legacy) Remove most references to per-queue daemons, as the new UBLK_F_PER_IO_DAEMON feature renders that concept obsolete. Signed-off-by: Uday Shankar Reviewed-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-9-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit 17574aa2a06b1f5bc447433ceaaa3df3543cc632 Author: Uday Shankar Date: Thu May 29 17:47:17 2025 -0600 selftests: ublk: add stress test for per io daemons Add a new test_stress_06 for the per io daemons feature. This is just a copy of test_stress_01 with the per_io_tasks flag added, with varying amounts of nthreads. This test is able to reproduce a panic which was caught manually during development [1]; in the current version of this patch set, it passes. Note that this commit also makes all stress tests using the run_io_and_remove helper more stressful by additionally exercising the batch submit (queue_rqs) path. [1] https://lore.kernel.org/linux-block/aDgwGoGCEpwd1mFY@fedora/ Suggested-by: Ming Lei Signed-off-by: Uday Shankar Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-8-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit 236918d3e9ac45d593c2f74e1df598483a508d2f Author: Uday Shankar Date: Thu May 29 17:47:16 2025 -0600 selftests: ublk: add functional test for per io daemons Add a new test test_generic_12 which: - sets up a ublk server with per_io_tasks and a different number of ublk server threads and ublk_queues. This is possible now that these objects are decoupled - runs some I/O load from a single CPU - verifies that all the ublk server threads handle some I/O Before this changeset, this test fails, since I/O issued from one CPU is always handled by the one ublk server thread. After this changeset, the test passes. In the future, the last check above may be strengthened to "verify that all ublk server threads handle the same amount of I/O." However, this requires some adjustments/bugfixes to tag allocation, so this work is postponed to a followup. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-7-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit abe54c16034631db01aba02e06da569b33002ab1 Author: Uday Shankar Date: Thu May 29 17:47:15 2025 -0600 selftests: ublk: kublk: decouple ublk_queues from ublk server threads Add support in kublk for decoupled ublk_queues and ublk server threads. kublk now has two modes of operation: - (preexisting mode) threads and queues are paired 1:1, and each thread services all the I/Os of one queue - (new mode) thread and queue counts are independently configurable. threads service I/Os in a way that balances load across threads even if load is not balanced over queues. The default is the preexisting mode. The new mode is activated by passing the --per_io_tasks flag. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-6-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit b9848ca7a7643b13feed9ebb67f5150eb731610c Author: Uday Shankar Date: Thu May 29 17:47:14 2025 -0600 selftests: ublk: kublk: move per-thread data out of ublk_queue Towards the goal of decoupling ublk_queues from ublk server threads, move resources/data that should be per-thread rather than per-queue out of ublk_queue and into a new struct ublk_thread. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-5-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit 8f75ba28b8747d6a788daede0060d574b5693dac Author: Uday Shankar Date: Thu May 29 17:47:13 2025 -0600 selftests: ublk: kublk: lift queue initialization out of thread Currently, each ublk server I/O handler thread initializes its own queue. However, as we move towards decoupled ublk_queues and ublk server threads, this model does not make sense anymore, as there will no longer be a concept of a thread having "its own" queue. So lift queue initialization out of the per-thread ublk_io_handler_fn and into a loop in ublk_start_daemon (which runs once for each device). There is a part of ublk_queue_init (ring initialization) which does actually need to happen on the thread that will use the ring; that is separated into a separate ublk_thread_init which is still called by each I/O handler thread. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-4-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit 97737097528397a8106ffc552e827a3dedccf132 Author: Uday Shankar Date: Thu May 29 17:47:12 2025 -0600 selftests: ublk: kublk: tie sqe allocation to io instead of queue We currently have a helper ublk_queue_alloc_sqes which the ublk targets use to allocate SQEs for their own operations. However, as we move towards decoupled ublk_queues and ublk server threads, this helper does not make sense anymore. SQEs are allocated from rings, and we will have one ring per thread to avoid locking. Change the SQE allocation helper to ublk_io_alloc_sqes. Currently this still allocates SQEs from the io's queue's ring, but when we fully decouple threads and queues, it will allocate from the io's thread's ring instead. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-3-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit bf098d72696db1a947e72d549ec861dc1092deef Author: Uday Shankar Date: Thu May 29 17:47:11 2025 -0600 selftests: ublk: kublk: plumb q_id in io_uring user_data Currently, when we process CQEs, we know which ublk_queue we are working on because we know which ring we are working on, and ublk_queues and rings are in 1:1 correspondence. However, as we decouple ublk_queues from ublk server threads, ublk_queues and rings will no longer be in 1:1 correspondence - each ublk server thread will have a ring, and each thread may issue commands against more than one ublk_queue. So in order to know which ublk_queue a CQE refers to, plumb that information in the associated SQE's user_data. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-2-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit ab03a61c66149327e022bdafa5843c6f82be267e Author: Uday Shankar Date: Thu May 29 17:47:10 2025 -0600 ublk: have a per-io daemon instead of a per-queue daemon Currently, ublk_drv associates to each hardware queue (hctx) a unique task (called the queue's ubq_daemon) which is allowed to issue COMMIT_AND_FETCH commands against the hctx. If any other task attempts to do so, the command fails immediately with EINVAL. When considered together with the block layer architecture, the result is that for each CPU C on the system, there is a unique ublk server thread which is allowed to handle I/O submitted on CPU C. This can lead to suboptimal performance under imbalanced load generation. For an extreme example, suppose all the load is generated on CPUs mapping to a single ublk server thread. Then that thread may be fully utilized and become the bottleneck in the system, while other ublk server threads are totally idle. This issue can also be addressed directly in the ublk server without kernel support by having threads dequeue I/Os and pass them around to ensure even load. But this solution requires inter-thread communication at least twice for each I/O (submission and completion), which is generally a bad pattern for performance. The problem gets even worse with zero copy, as more inter-thread communication would be required to have the buffer register/unregister calls to come from the correct thread. Therefore, address this issue in ublk_drv by allowing each I/O to have its own daemon task. Two I/Os in the same queue are now allowed to be serviced by different daemon tasks - this was not possible before. Imbalanced load can then be balanced across all ublk server threads by having the ublk server threads issue FETCH_REQs in a round-robin manner. As a small toy example, consider a system with a single ublk device having 2 queues, each of depth 4. A ublk server having 4 threads could issue its FETCH_REQs against this device as follows (where each entry is the qid,tag pair that the FETCH_REQ targets): ublk server thread: T0 T1 T2 T3 0,0 0,1 0,2 0,3 1,3 1,0 1,1 1,2 This setup allows for load that is concentrated on one hctx/ublk_queue to be spread out across all ublk server threads, alleviating the issue described above. Add the new UBLK_F_PER_IO_DAEMON feature to ublk_drv, which ublk servers can use to essentially test for the presence of this change and tailor their behavior accordingly. Signed-off-by: Uday Shankar Reviewed-by: Caleb Sander Mateos Reviewed-by: Ming Lei Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-1-e9d3b119336a@purestorage.com Signed-off-by: Jens Axboe commit b42966552bb8d3027b66782fc1b53ce570e4d356 Merge: 4cb6c8af859113 05f6e183879d97 Author: Linus Torvalds Date: Sat May 31 11:34:27 2025 -0700 Merge tag 'fbdev-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Many small but important fixes for special cases in the fbdev, fbcon and vgacon code which were found with Syzkaller, Svace and other tools by various people and teams (e.g. Linux Verification Center). Some smaller code cleanups in the nvidiafb, arkfb, atyfb and viafb drivers and two spelling fixes" * tag 'fbdev-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var fbdev: sstfb.rst: Fix spelling mistake fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod() fbcon: Make sure modelist not set on unregistered console vgacon: Add check for vc_origin address range in vgacon_scroll() fbdev: arkfb: Cast ics5342_init() allocation type fbdev: nvidiafb: Correct const string length in nvidiafb_setup() fbdev: atyfb: Remove unused PCI vendor ID fbdev: carminefb: Fix spelling mistake of CARMINE_TOTAL_DIPLAY_MEM fbdev: via: use new GPIO line value setter callbacks commit 4cb6c8af8591135ec000fbe4bb474139ceec595d Author: Mark Brown Date: Fri May 30 11:42:25 2025 +0100 selftests/filesystems: Fix build of anon_inode_test The newly added anon_inode_test test fails to build due to attempting to include a nonexisting overlayfs/wrapper.h: anon_inode_test.c:10:10: fatal error: overlayfs/wrappers.h: No such file or directory 10 | #include "overlayfs/wrappers.h" | ^~~~~~~~~~~~~~~~~~~~~~ This is due to 0bd92b9fe538 ("selftests/filesystems: move wrapper.h out of overlayfs subdir") which was added in the vfs-6.16.selftests branch which was based on -rc5 and did not contain the newly added test so once things were merged into mainline the build started failing - both parent commits are fine. Fixes: 3e406741b1989 ("Merge tag 'vfs-6.16-rc1.selftests' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs") Signed-off-by: Mark Brown Signed-off-by: Linus Torvalds commit dee264c16a6334dcdbea5c186f5ff35f98b1df42 Merge: 31848987f177a6 582847f9702461 Author: Linus Torvalds Date: Sat May 31 08:16:52 2025 -0700 Merge tag 'gcc-minimum-version-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull compiler version requirement update from Arnd Bergmann: "Require gcc-8 and binutils-2.30 x86 already uses gcc-8 as the minimum version, this changes all other architectures to the same version. gcc-8 is used is Debian 10 and Red Hat Enterprise Linux 8, both of which are still supported, and binutils 2.30 is the oldest corresponding version on those. Ubuntu Pro 18.04 and SUSE Linux Enterprise Server 15 both use gcc-7 as the system compiler but additionally include toolchains that remain supported. With the new minimum toolchain versions, a number of workarounds for older versions can be dropped, in particular on x86_64 and arm64. Importantly, the updated compiler version allows removing two of the five remaining gcc plugins, as support for sancov and structeak features is already included in modern compiler versions. I tried collecting the known changes that are possible based on the new toolchain version, but expect that more cleanups will be possible. Since this touches multiple architectures, I merged the patches through the asm-generic tree." * tag 'gcc-minimum-version-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV Documentation: update binutils-2.30 version reference gcc-plugins: remove SANCOV gcc plugin Kbuild: remove structleak gcc plugin arm64: drop binutils version checks raid6: skip avx512 checks kbuild: require gcc-8 and binutils-2.30 commit 31848987f177a6c0944fd0254a55ffd7c52a8c50 Merge: ec71f661a572a7 9bba618694cc90 Author: Linus Torvalds Date: Sat May 31 08:14:37 2025 -0700 Merge tag 'soc-newsoc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull sophgo SoC devicetree updates from Arnd Bergmann: "The Sophgo SG2044 SoC is their second generation server chip with 64 cores, following the SG2042. In addition, there are minor updates for the cv180x SoCs" * tag 'soc-newsoc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10 dt-bindings: riscv: sophgo: Add SG2044 compatible string dt-bindings: interrupt-controller: Add Sophgo SG2044 PLIC dt-bindings: interrupt-controller: Add Sophgo SG2044 CLINT mswi riscv: dts: sopgho: use SOC_PERIPHERAL_IRQ to calculate interrupt number riscv: dts: sophgo: rename header file cv18xx.dtsi to cv180x.dtsi riscv: dts: sophgo: Move riscv cpu definition to a separate file riscv: dts: sophgo: Move all soc specific device into soc dtsi file riscv: sophgo: dts: Add spi controller for SG2042 riscv: dts: sophgo: sg2042: add pinctrl support commit ec71f661a572a770d7c861cd52a50cbbb0e1a8d1 Merge: f79749a8e42b3a 3f07353e2fd3e1 Author: Linus Torvalds Date: Sat May 31 08:08:56 2025 -0700 Merge tag 'soc-dt-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC devicetree updates from Arnd Bergmann: "There are 11 newly supported SoCs, but these are all either new variants of existing designs, or straight reuses of the existing chip in a new package: - RK3562 is a new chip based on the old Cortex-A53 core, apparently a low-cost version of the Cortex-A55 based RK3568/RK3566. - NXP i.MX94 is a minor variation of i.MX93/i.MX95 with a different set of on-chip peripherals. - Renesas RZ/V2N (R9A09G056) is a new member of the larger RZ/V2 family - Amlogic S6/S7/S7D - Samsung Exynos7870 is an older chip similar to Exynos7885 - WonderMedia wm8950 is a minor variation on the wm8850 chip - Amlogic s805y is almost idential to s805x - Allwinner A523 is similar to A527 and T527 - Qualcomm MSM8926 is a variant of MSM8226 - Qualcomm Snapdragon X1P42100 is related to R1E80100 There are also 65 boards, including reference designs for the chips above, this includes - 12 new boards based on TI K3 series chips, most of them from Toradex - 10 devices using Rockchips RK35xx and PX30 chips - 2 phones and 2 laptops based on Qualcomm Snapdragon designs - 10 NXP i.MX8/i.MX9 boards, mostly for embedded/industrial uses - 3 Samsung Galaxy phones based on Exynos7870 - 5 Allwinner based boards using a variety of ARMv8 chips - 9 32-bit machines, each based on a different SoC family Aside from the new hardware, there is the usual set of cleanups and newly added hardware support on existing machines, for a total of 965 devicetree changesets" * tag 'soc-dt-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (956 commits) MAINTAINERS, mailmap: update Sven Peter's email address arm64: dts: renesas: rzg3e-smarc-som: Reduce I2C2 clock frequency arm64: dts: nuvoton: Add pinctrl ARM: dts: samsung: sp5v210-aries: Align wifi node name with bindings arm64: dts: blaize-blzp1600: Enable GPIO support dt-bindings: clock: socfpga: convert to yaml arm64: dts: rockchip: move rk3562 pinctrl node outside the soc node arm64: dts: rockchip: fix rk3562 pcie unit addresses arm64: dts: rockchip: move rk3528 pinctrl node outside the soc node arm64: dts: rockchip: remove a double-empty line from rk3576 core dtsi arm64: dts: rockchip: move rk3576 pinctrl node outside the soc node arm64: dts: rockchip: fix rk3576 pcie unit addresses arm64: dts: rockchip: Drop assigned-clock* from cpu nodes on rk3588 arm64: dts: rockchip: Add missing SFC power-domains to rk3576 Revert "arm64: dts: mediatek: mt8390-genio-common: Add firmware-name for scp0" arm64: dts: mediatek: mt8188: Address binding warnings for MDP3 nodes arm64: dts: mt6359: Rename RTC node to match binding expectations arm64: dts: mt8365-evk: Add goodix touchscreen support arm64: dts: mediatek: mt8188: Add missing #reset-cells property arm64: dts: airoha: en7581: Add PCIe nodes to EN7581 SoC evaluation board ... commit f79749a8e42b3a6dcb980e87f3ef752962b9f094 Merge: 500af1defbcbb6 ae006498a0723e Author: Linus Torvalds Date: Sat May 31 08:06:14 2025 -0700 Merge tag 'soc-defconfig-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC defconfig updates from Arnd Bergmann: "The usual defconfig updates enable configuration options for drivers that got added. A few SoC specific options are enabled in Kconfig files instead, in place of the defconfig files" * tag 'soc-defconfig-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: defconfig: enable ACPM protocol and Exynos mailbox arm64: defconfig: Enable configs for MediaTek Genio EVK boards arm64: defconfig: mediatek: enable PHY drivers arm64: defconfig: Enable Rockchip SAI and ES8328 arm64: defconfig: Add Toradex Embedded Controller config arm64: defconfig: Enable TPIC2810 GPIO expander riscv: defconfig: spacemit: enable clock controller driver for SpacemiT K1 arm64: defconfig: Enable TMP102 as module arm64: defconfig: Enable hwspinlock and eQEP for K3 arm64: defconfig: Add CDNS_DSI and CDNS_PHY config riscv: defconfig: spacemit: enable gpio support for K1 SoC arm64: defconfig: Enable IPQ5424 RDP466 base configs riscv: Enable PM_GENERIC_DOMAINS for T-Head SoCs commit 500af1defbcbb6113c9a958b791517d0562b8d6d Merge: 297d9111e9fcf4 16066e29d3f5a4 Author: Linus Torvalds Date: Sat May 31 08:03:09 2025 -0700 Merge tag 'soc-arm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "The main update in size is the removal of the TI DaVinci DA830 SoC support. DA830 is similar to DA850, which remain supported, but only the reference board was ever supported, and we removed that one 3 years ago as it had never been converted to devicetree. There are some other cleanups for OMAP4 and a few boards using old GPIO interfaces" * tag 'soc-arm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: s3c: stop including gpio.h ARM: dts: davinci: da850-evm: Increase fifo threshold ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY ARM: broadcom: MAINTAINERS: Cover bcm2712 files bus: ti-sysc: PRUSS OCP configuration ARM: davinci: remove support for da830 ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4 ARM: omap2plus_defconfig: enable I2C devices of GTA04 ARM: s3c/gpio: use new line value setter callbacks ARM: scoop/gpio: use new line value setter callbacks ARM: sa1100/gpio: use new line value setter callbacks ARM: orion/gpio: use new line value setter callbacks commit 297d9111e9fcf47dd1dcc6f79bba915f35378d01 Merge: 9d49da438819c5 5963edd98a2159 Author: Linus Torvalds Date: Sat May 31 07:53:30 2025 -0700 Merge tag 'soc-drivers-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "Updates are across the usual driver subsystems with SoC specific drivers: - added soc specicific drivers for sophgo cv1800 and sg2044, qualcomm sm8750, and amlogic c3 and s4 chips. - cache controller updates for sifive chips, plus binding changes for other cache descriptions. - memory controller drivers for mediatek mt6893, stm32 and cleanups for a few more drivers - reset controller drivers for T-Head TH1502, Sophgo sg2044 and Renesas RZ/V2H(P) - SCMI firmware updates to better deal with buggy firmware, plus better support for Qualcomm X1E and NXP i.MX specific interfaces - a new platform driver for the crypto firmware on Cznic Turris Omnia/MOX - cleanups for the TEE firmware subsystem and amdtee driver - minor updates and fixes for freescale/nxp, qualcomm, google, aspeed, wondermedia, ti, nxp, renesas, hisilicon, mediatek, broadcom and samsung SoCs" * tag 'soc-drivers-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (133 commits) soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop() soc: aspeed: lpc: Fix impossible judgment condition ARM: aspeed: Don't select SRAM docs: firmware: qcom_scm: Fix kernel-doc warning soc: fsl: qe: Consolidate chained IRQ handler install/remove firmware: qcom: scm: Allow QSEECOM for HP EliteBook Ultra G1q dt-bindings: mfd: qcom,tcsr: Add compatible for ipq5018 dt-bindings: cache: add QiLai compatible to ax45mp memory: stm32_omm: Fix error handling in stm32_omm_disable_child() dt-bindings: cache: Convert marvell,tauros2-cache to DT schema dt-bindings: cache: Convert marvell,{feroceon,kirkwood}-cache to DT schema soc: samsung: exynos-pmu: enable CPU hotplug support for gs101 MAINTAINERS: Add google,gs101-pmu-intr-gen.yaml binding file dt-bindings: soc: samsung: exynos-pmu: gs101: add google,pmu-intr-gen phandle dt-bindings: soc: google: Add gs101-pmu-intr-gen binding documentation bus: fsl-mc: Use strscpy() instead of strscpy_pad() soc: fsl: qbman: Remove const from portal->cgrs allocation type bus: fsl_mc: Fix driver_managed_dma check bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value bus: fsl-mc: drop useless cleanup ... commit 213205889d5ffc19cb8df06aa6778b2d4724c887 Author: Helge Deller Date: Sat May 31 15:26:27 2025 +0200 parisc/unaligned: Fix hex output to show 8 hex chars Change back printk format to 0x%08lx instead of %#08lx, since the latter does not seem to reliably format the value to 8 hex chars. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v5.18+ Fixes: e5e9e7f222e5b ("parisc/unaligned: Enhance user-space visible output") commit 9d49da438819c5dd82840eb63d929edbdccb80d8 Author: Linus Torvalds Date: Sat May 31 07:43:16 2025 -0700 Revert "iommu: make inclusion of arm/arm-smmu-v3 directory conditional" This reverts commit e436576b0231542f6f233279f0972989232575a8. That commit is very broken, and seems to have missed the fact that CONFIG_ARM_SMMU_V3 is not just a yes-or-no thing, but also can be modular. So it caused build errors on arm64 allmodconfig setups: ERROR: modpost: "arm_smmu_make_cdtable_ste" [drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.ko] undefined! ERROR: modpost: "arm_smmu_make_s2_domain_ste" [drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.ko] undefined! ERROR: modpost: "arm_smmu_make_s1_cd" [drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.ko] undefined! ... (and six more symbols just the same). Link: https://lore.kernel.org/all/CAHk-=wh4qRwm7AQ8sBmQj7qECzgAhj4r73RtCDfmHo5SdcN0Jw@mail.gmail.com/ Cc: Joerg Roedel Cc: Rolf Eike Beer Cc: Lu Baolu Signed-off-by: Linus Torvalds commit a913ef6fd883c05bd6538ed21ee1e773f0d750b7 Author: Ian Rogers Date: Wed May 28 21:39:37 2025 -0700 perf callchain: Always populate the addr_location map when adding IP Dropping symbols also meant the callchain maps wasn't populated, but the callchain map is needed to find the DSO. Plumb the symbols option better, falling back to thread__find_map() rather than thread__find_symbol() when symbols are disabled. Fixes: 02b2705017d2e5ad ("perf callchain: Allow symbols to be optional when resolving a callchain") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Ben Gainey Cc: Chaitanya S Prakash Cc: Charlie Jenkins Cc: Chun-Tse Shao Cc: Colin Ian King Cc: Dmitriy Vyukov Cc: Dr. David Alan Gilbert Cc: Graham Woodward Cc: Howard Chu Cc: Ilkka Koskinen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Krzysztof Łopatowski Cc: Leo Yan Cc: Levi Yun Cc: Li Huafei Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Martin Liška Cc: Masami Hiramatsu Cc: Matt Fleming Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Steinar H. Gunderson Cc: Stephen Brennan Cc: Steve Clevenger Cc: Thomas Falcon Cc: Veronika Molnarova Cc: Weilin Wang Cc: Will Deacon Cc: Yicong Yang Cc: Yujie Liu Cc: Zhongqiu Han Cc: Zixian Cai Link: https://lore.kernel.org/r/20250529044000.759937-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0df14c1f1ed530ba21b603a2e282589c034367da Author: Namhyung Kim Date: Thu May 15 11:10:42 2025 -0700 perf lock contention: Reject more than 10ms delays for safety Delaying kernel operations can be dangerous and the kernel may kill (non-sleepable) BPF programs running for long in the future. Limit the max delay to 10ms and update the document about it. $ sudo ./perf lock con -abl -J 100000us@cgroup_mutex true lock delay is too long: 100000us (> 10ms) Usage: perf lock contention [] -J, --inject-delay Inject delays to specific locks Suggested-by: Alexei Starovoitov Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20250515181042.555189-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 05f6e183879d9785a3cdf2f08a498bc31b7a20aa Author: Murad Masimov Date: Mon Apr 28 18:34:07 2025 +0300 fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var If fb_add_videomode() in fb_set_var() fails to allocate memory for fb_videomode, later it may lead to a null-ptr dereference in fb_videomode_to_var(), as the fb_info is registered while not having the mode in modelist that is expected to be there, i.e. the one that is described in fb_info->var. ================================================================ general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 30371 Comm: syz-executor.1 Not tainted 5.10.226-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:fb_videomode_to_var+0x24/0x610 drivers/video/fbdev/core/modedb.c:901 Call Trace: display_to_var+0x3a/0x7c0 drivers/video/fbdev/core/fbcon.c:929 fbcon_resize+0x3e2/0x8f0 drivers/video/fbdev/core/fbcon.c:2071 resize_screen drivers/tty/vt/vt.c:1176 [inline] vc_do_resize+0x53a/0x1170 drivers/tty/vt/vt.c:1263 fbcon_modechanged+0x3ac/0x6e0 drivers/video/fbdev/core/fbcon.c:2720 fbcon_update_vcs+0x43/0x60 drivers/video/fbdev/core/fbcon.c:2776 do_fb_ioctl+0x6d2/0x740 drivers/video/fbdev/core/fbmem.c:1128 fb_ioctl+0xe7/0x150 drivers/video/fbdev/core/fbmem.c:1203 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x67/0xd1 ================================================================ The reason is that fb_info->var is being modified in fb_set_var(), and then fb_videomode_to_var() is called. If it fails to add the mode to fb_info->modelist, fb_set_var() returns error, but does not restore the old value of fb_info->var. Restore fb_info->var on failure the same way it is done earlier in the function. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Murad Masimov Signed-off-by: Helge Deller commit 17186f1f90d34fa701e4f14e6818305151637b9e Author: Murad Masimov Date: Mon Apr 28 18:34:06 2025 +0300 fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var If fb_add_videomode() in do_register_framebuffer() fails to allocate memory for fb_videomode, it will later lead to a null-ptr dereference in fb_videomode_to_var(), as the fb_info is registered while not having the mode in modelist that is expected to be there, i.e. the one that is described in fb_info->var. ================================================================ general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 30371 Comm: syz-executor.1 Not tainted 5.10.226-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:fb_videomode_to_var+0x24/0x610 drivers/video/fbdev/core/modedb.c:901 Call Trace: display_to_var+0x3a/0x7c0 drivers/video/fbdev/core/fbcon.c:929 fbcon_resize+0x3e2/0x8f0 drivers/video/fbdev/core/fbcon.c:2071 resize_screen drivers/tty/vt/vt.c:1176 [inline] vc_do_resize+0x53a/0x1170 drivers/tty/vt/vt.c:1263 fbcon_modechanged+0x3ac/0x6e0 drivers/video/fbdev/core/fbcon.c:2720 fbcon_update_vcs+0x43/0x60 drivers/video/fbdev/core/fbcon.c:2776 do_fb_ioctl+0x6d2/0x740 drivers/video/fbdev/core/fbmem.c:1128 fb_ioctl+0xe7/0x150 drivers/video/fbdev/core/fbmem.c:1203 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x67/0xd1 ================================================================ Even though fbcon_init() checks beforehand if fb_match_mode() in var_to_display() fails, it can not prevent the panic because fbcon_init() does not return error code. Considering this and the comment in the code about fb_match_mode() returning NULL - "This should not happen" - it is better to prevent registering the fb_info if its mode was not set successfully. Also move fb_add_videomode() closer to the beginning of do_register_framebuffer() to avoid having to do the cleanup on fail. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Murad Masimov Signed-off-by: Helge Deller commit 9c221db509695243f37fd68e5313a4c62eac9887 Author: Rujra Bhatt Date: Mon May 19 20:08:32 2025 +0530 fbdev: sstfb.rst: Fix spelling mistake Fix spelling: "tweeks" to "tweaks" Signed-off-by: Rujra Bhatt Signed-off-by: Helge Deller commit 3f6dae09fc8c306eb70fdfef70726e1f154e173a Author: Sergey Shtylyov Date: Wed May 14 23:35:58 2025 +0300 fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod() In fb_find_mode_cvt(), iff mode->refresh somehow happens to be 0x80000000, cvt.f_refresh will become 0 when multiplying it by 2 due to overflow. It's then passed to fb_cvt_hperiod(), where it's used as a divider -- division by 0 will result in kernel oops. Add a sanity check for cvt.f_refresh to avoid such overflow... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Fixes: 96fe6a2109db ("[PATCH] fbdev: Add VESA Coordinated Video Timings (CVT) support") Signed-off-by: Sergey Shtylyov Signed-off-by: Helge Deller commit cedc1b63394a866bf8663a3e40f4546f1d28c8d8 Author: Kees Cook Date: Fri May 9 13:06:47 2025 -0700 fbcon: Make sure modelist not set on unregistered console It looks like attempting to write to the "store_modes" sysfs node will run afoul of unregistered consoles: UBSAN: array-index-out-of-bounds in drivers/video/fbdev/core/fbcon.c:122:28 index -1 is out of range for type 'fb_info *[32]' ... fbcon_info_from_console+0x192/0x1a0 drivers/video/fbdev/core/fbcon.c:122 fbcon_new_modelist+0xbf/0x2d0 drivers/video/fbdev/core/fbcon.c:3048 fb_new_modelist+0x328/0x440 drivers/video/fbdev/core/fbmem.c:673 store_modes+0x1c9/0x3e0 drivers/video/fbdev/core/fbsysfs.c:113 dev_attr_store+0x55/0x80 drivers/base/core.c:2439 static struct fb_info *fbcon_registered_fb[FB_MAX]; ... static signed char con2fb_map[MAX_NR_CONSOLES]; ... static struct fb_info *fbcon_info_from_console(int console) ... return fbcon_registered_fb[con2fb_map[console]]; If con2fb_map contains a -1 things go wrong here. Instead, return NULL, as callers of fbcon_info_from_console() are trying to compare against existing "info" pointers, so error handling should kick in correctly. Reported-by: syzbot+a7d4444e7b6e743572f7@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/679d0a8f.050a0220.163cdc.000c.GAE@google.com/ Signed-off-by: Kees Cook Signed-off-by: Helge Deller commit 864f9963ec6b4b76d104d595ba28110b87158003 Author: GONG Ruiqi Date: Sun Apr 27 10:53:03 2025 +0800 vgacon: Add check for vc_origin address range in vgacon_scroll() Our in-house Syzkaller reported the following BUG (twice), which we believed was the same issue with [1]: ================================================================== BUG: KASAN: slab-out-of-bounds in vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4740 Read of size 2 at addr ffff88800f5bef60 by task syz.7.2620/12393 ... Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x72/0xa0 lib/dump_stack.c:106 print_address_description.constprop.0+0x6b/0x3d0 mm/kasan/report.c:364 print_report+0xba/0x280 mm/kasan/report.c:475 kasan_report+0xa9/0xe0 mm/kasan/report.c:588 vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4740 vcs_write_buf_noattr drivers/tty/vt/vc_screen.c:493 [inline] vcs_write+0x586/0x840 drivers/tty/vt/vc_screen.c:690 vfs_write+0x219/0x960 fs/read_write.c:584 ksys_write+0x12e/0x260 fs/read_write.c:639 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 ... Allocated by task 5614: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:201 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x62/0x140 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] vc_do_resize+0x235/0xf40 drivers/tty/vt/vt.c:1193 vgacon_adjust_height+0x2d4/0x350 drivers/video/console/vgacon.c:1007 vgacon_font_set+0x1f7/0x240 drivers/video/console/vgacon.c:1031 con_font_set drivers/tty/vt/vt.c:4628 [inline] con_font_op+0x4da/0xa20 drivers/tty/vt/vt.c:4675 vt_k_ioctl+0xa10/0xb30 drivers/tty/vt/vt_ioctl.c:474 vt_ioctl+0x14c/0x1870 drivers/tty/vt/vt_ioctl.c:752 tty_ioctl+0x655/0x1510 drivers/tty/tty_io.c:2779 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0x12d/0x190 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 Last potentially related work creation: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x94/0xa0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0xc3/0xa10 kernel/rcu/tree.c:2713 netlink_release+0x620/0xc20 net/netlink/af_netlink.c:802 __sock_release+0xb5/0x270 net/socket.c:663 sock_close+0x1e/0x30 net/socket.c:1425 __fput+0x408/0xab0 fs/file_table.c:384 __fput_sync+0x4c/0x60 fs/file_table.c:465 __do_sys_close fs/open.c:1580 [inline] __se_sys_close+0x68/0xd0 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 Second to last potentially related work creation: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x94/0xa0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0xc3/0xa10 kernel/rcu/tree.c:2713 netlink_release+0x620/0xc20 net/netlink/af_netlink.c:802 __sock_release+0xb5/0x270 net/socket.c:663 sock_close+0x1e/0x30 net/socket.c:1425 __fput+0x408/0xab0 fs/file_table.c:384 task_work_run+0x154/0x240 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:45 [inline] do_exit+0x8e5/0x1320 kernel/exit.c:874 do_group_exit+0xcd/0x280 kernel/exit.c:1023 get_signal+0x1675/0x1850 kernel/signal.c:2905 arch_do_signal_or_restart+0x80/0x3b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x1b3/0x1e0 kernel/entry/common.c:218 do_syscall_64+0x66/0x110 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x78/0xe2 The buggy address belongs to the object at ffff88800f5be000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 2656 bytes to the right of allocated 1280-byte region [ffff88800f5be000, ffff88800f5be500) ... Memory state around the buggy address: ffff88800f5bee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88800f5bee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88800f5bef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88800f5bef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88800f5bf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== By analyzing the vmcore, we found that vc->vc_origin was somehow placed one line prior to vc->vc_screenbuf when vc was in KD_TEXT mode, and further writings to /dev/vcs caused out-of-bounds reads (and writes right after) in vcs_write_buf_noattr(). Our further experiments show that in most cases, vc->vc_origin equals to vga_vram_base when the console is in KD_TEXT mode, and it's around vc->vc_screenbuf for the KD_GRAPHICS mode. But via triggerring a TIOCL_SETVESABLANK ioctl beforehand, we can make vc->vc_origin be around vc->vc_screenbuf while the console is in KD_TEXT mode, and then by writing the special 'ESC M' control sequence to the tty certain times (depends on the value of `vc->state.y - vc->vc_top`), we can eventually move vc->vc_origin prior to vc->vc_screenbuf. Here's the PoC, tested on QEMU: ``` int main() { const int RI_NUM = 10; // should be greater than `vc->state.y - vc->vc_top` int tty_fd, vcs_fd; const char *tty_path = "/dev/tty0"; const char *vcs_path = "/dev/vcs"; const char escape_seq[] = "\x1bM"; // ESC + M const char trigger_seq[] = "Let's trigger an OOB write."; struct vt_sizes vt_size = { 70, 2 }; int blank = TIOCL_BLANKSCREEN; tty_fd = open(tty_path, O_RDWR); char vesa_mode[] = { TIOCL_SETVESABLANK, 1 }; ioctl(tty_fd, TIOCLINUX, vesa_mode); ioctl(tty_fd, TIOCLINUX, &blank); ioctl(tty_fd, VT_RESIZE, &vt_size); for (int i = 0; i < RI_NUM; ++i) write(tty_fd, escape_seq, sizeof(escape_seq) - 1); vcs_fd = open(vcs_path, O_RDWR); write(vcs_fd, trigger_seq, sizeof(trigger_seq)); close(vcs_fd); close(tty_fd); return 0; } ``` To solve this problem, add an address range validation check in vgacon_scroll(), ensuring vc->vc_origin never precedes vc_screenbuf. Reported-by: syzbot+9c09fda97a1a65ea859b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9c09fda97a1a65ea859b [1] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Co-developed-by: Yi Yang Signed-off-by: Yi Yang Signed-off-by: GONG Ruiqi Signed-off-by: Helge Deller commit ede481f6dad47d40b7e561cfbc6c04286a9faf1a Author: Kees Cook Date: Fri Apr 25 23:23:06 2025 -0700 fbdev: arkfb: Cast ics5342_init() allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct dac_info *" but the returned type will be "struct ics5342_info *", which has a larger allocation size. This is by design, as struct ics5342_info contains struct dac_info as its first member. (patch slightly modified by Helge Deller) Signed-off-by: Kees Cook Signed-off-by: Helge Deller commit 34fe05cd2d0f4cc625afb656469a9838f02ca59e Author: Zijun Hu Date: Mon Apr 7 19:55:20 2025 +0800 fbdev: nvidiafb: Correct const string length in nvidiafb_setup() The actual length of const string "noaccel" is 7, but the strncmp() branch in nvidiafb_setup() wrongly hard codes it as 6. Fix by using actual length 7 as argument of the strncmp(). Signed-off-by: Zijun Hu Signed-off-by: Helge Deller commit c9b26429c8c7aa2836322aeab38be4254d166e02 Author: Andy Shevchenko Date: Thu Apr 24 14:56:52 2025 +0300 fbdev: atyfb: Remove unused PCI vendor ID The custom definition of PCI vendor ID in video/mach64.h is unused. Remove it. Note, that the proper one is available in pci_ids.h. Signed-off-by: Andy Shevchenko Signed-off-by: Helge Deller commit 67ebb5890a15e82f369df46e9411250252b5a98c Author: Colin Ian King Date: Fri Apr 18 13:51:35 2025 +0100 fbdev: carminefb: Fix spelling mistake of CARMINE_TOTAL_DIPLAY_MEM There is a spelling mistake in macro CARMINE_TOTAL_DIPLAY_MEM. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Helge Deller commit 2be358790e15c34668f3694d4c3d1f2c5f29a709 Author: Bartosz Golaszewski Date: Tue Apr 8 09:42:56 2025 +0200 fbdev: via: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Helge Deller commit 86aa94cd50b138be0dd872b0779fa3036e641881 Author: Dapeng Mi Date: Thu May 29 08:02:36 2025 +0000 perf/x86/intel: Fix incorrect MSR index calculations in intel_pmu_config_acr() The MSR offset calculations in intel_pmu_config_acr() are buggy. To calculate fixed counter MSR addresses in intel_pmu_config_acr(), the HW counter index "idx" is subtracted by INTEL_PMC_IDX_FIXED. This leads to the ACR mask value of fixed counters to be incorrectly saved to the positions of GP counters in acr_cfg_b[], e.g. For fixed counter 0, its ACR counter mask should be saved to acr_cfg_b[32], but it's saved to acr_cfg_b[0] incorrectly. Fix this issue. [ mingo: Clarified & improved the changelog. ] Fixes: ec980e4facef ("perf/x86/intel: Support auto counter reload") Signed-off-by: Dapeng Mi Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250529080236.2552247-2-dapeng1.mi@linux.intel.com commit 99850a1c93fe7ca40ad9efddc00acec6e85c5e48 Author: Steven Rostedt Date: Thu May 29 13:10:24 2025 -0400 x86/fpu: Remove unused trace events The following trace events are not used and defining them just wastes memory: x86_fpu_before_restore x86_fpu_after_restore x86_fpu_init_state Simply remove them. Signed-off-by: Steven Rostedt (Google) Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Dave Hansen Cc: Linux Trace Kernel Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Oleg Nesterov Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home # background Link: https://lore.kernel.org/r/20250529131024.7c2ef96f@gandalf.local.home # x86 submission commit 8bf722c684b31368a6f1fba7abcffb0da99722ed Merge: 03ebff0c837b36 99d232804405e3 Author: Linus Torvalds Date: Fri May 30 21:20:11 2025 -0700 Merge tag 'trace-ringbuffer-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ring-buffer updates from Steven Rostedt: - Allow the persistent ring buffer to be memory mapped In the last merge window there was issues with the implementation of mapping the persistent ring buffer because it was assumed that the persistent memory was just physical memory without being part of the kernel virtual address space. But this was incorrect and the persistent ring buffer can be mapped the same way as the allocated ring buffer is mapped. The metadata for the persistent ring buffer is different than the normal ring buffer and the organization of mapping it to user space is a little different. Make the updates needed to the meta data to allow the persistent ring buffer to be mapped to user space. - Fix cpus_read_lock() with buffer->mutex and cpu_buffer->mapping_lock Mapping the ring buffer to user space uses the cpu_buffer->mapping_lock. The buffer->mutex can be taken when the mapping_lock is held, giving the locking order of: cpu_buffer->mapping_lock -->> buffer->mutex. But there also exists the ordering: buffer->mutex -->> cpus_read_lock() mm->mmap_lock -->> cpu_buffer->mapping_lock cpus_read_lock() -->> mm->mmap_lock causing a circular chain of: cpu_buffer->mapping_lock -> buffer->mutex -->> cpus_read_lock() -->> mm->mmap_lock -->> cpu_buffer->mapping_lock By moving the cpus_read_lock() outside the buffer->mutex where: cpus_read_lock() -->> buffer->mutex, breaks the deadlock chain. - Do not trigger WARN_ON() for commit overrun When the ring buffer is user space mapped and there's a "commit overrun" (where an interrupt preempted an event, and then added so many events it filled the buffer having to drop events when it hit the preempted event) a WARN_ON() was triggered if this was read via a memory mapped buffer. This is due to "missed events" being non zero when the reader page ended up with the commit page. The idea was, if the writer is on the reader page, there's only one page that has been written to and there should be no missed events. But if a commit overrun is done where the writer is off the commit page and looped around to the commit page causing missed events, it is possible that the reader page is the commit page with missed events. Instead of triggering a WARN_ON() when the reader page is the commit page with missed events, trigger it when the reader page is the tail_page with missed events. That's because the writer is always on the tail_page if an event was interrupted (which holds the commit event) and continues off the commit page. - Reset the persistent buffer if it is fully consumed On boot up, if the user fully consumes the last boot buffer of the persistent buffer, if it reboots without enabling it, there will still be events in the buffer which can cause confusion. Instead, reset the buffer when it is fully consumed, so that the data is not read again. - Clean up some goto out jumps There's a few cases that the code jumps to the "out:" label that simply returns a value. There used to be more work done at those labels but now that they simply return a value use a return instead of jumping to a label. - Use guard() to simplify some of the code Add guard() around some locking instead of jumping to a label to do the unlocking. - Use free() to simplify some of the code Use free(kfree) on variables that will get freed on error and use return_ptr() to return the variable when its not freed. There's one instance where free(kfree) simplifies the code on a temp variable that was allocated just for the function use. * tag 'trace-ringbuffer-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ring-buffer: Simplify functions with __free(kfree) to free allocations ring-buffer: Make ring_buffer_{un}map() simpler with guard(mutex) ring-buffer: Simplify ring_buffer_read_page() with guard() ring-buffer: Simplify reset_disabled_cpu_buffer() with use of guard() ring-buffer: Remove jump to out label in ring_buffer_swap_cpu() ring-buffer: Removed unnecessary if() goto out where out is the next line tracing: Reset last-boot buffers when reading out all cpu buffers ring-buffer: Allow reserve_mem persistent ring buffers to be mmapped ring-buffer: Do not trigger WARN_ON() due to a commit_overrun ring-buffer: Move cpus_read_lock() outside of buffer->mutex commit 03ebff0c837b3636f0a33901e9b2cd66a13f5f3b Merge: 0f70f5b08a47a3 52b70e5b605c38 Author: Linus Torvalds Date: Fri May 30 21:11:21 2025 -0700 Merge tag 'microblaze-v6.16' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze update from Michal Simek: - Small OF update * tag 'microblaze-v6.16' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Use of_property_present() for non-boolean properties commit 558428921eddbd5083fe8116e31b8af460712f44 Merge: 44abca1fe32099 ead7f9b8de6563 Author: Jakub Kicinski Date: Fri May 30 19:53:53 2025 -0700 Merge branch 'net-fix-inet_proto_csum_replace_by_diff-for-ipv6' Paul Chaignon says: ==================== net: Fix inet_proto_csum_replace_by_diff for IPv6 This patchset fixes a bug that causes skb->csum to hold an incorrect value when calling inet_proto_csum_replace_by_diff for an IPv6 packet in CHECKSUM_COMPLETE state. This bug affects BPF helper bpf_l4_csum_replace and IPv6 ILA in adj-transport mode. In those cases, inet_proto_csum_replace_by_diff updates the L4 checksum field after an IPv6 address change. These two changes cancel each other in terms of checksum, so skb->csum shouldn't be updated. v2: https://lore.kernel.org/aCz84JU60wd8etiT@mail.gmail.com ==================== Link: https://patch.msgid.link/cover.1748509484.git.paul.chaignon@gmail.com Signed-off-by: Jakub Kicinski commit ead7f9b8de65632ef8060b84b0c55049a33cfea1 Author: Paul Chaignon Date: Thu May 29 12:28:35 2025 +0200 bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE In Cilium, we use bpf_csum_diff + bpf_l4_csum_replace to, among other things, update the L4 checksum after reverse SNATing IPv6 packets. That use case is however not currently supported and leads to invalid skb->csum values in some cases. This patch adds support for IPv6 address changes in bpf_l4_csum_update via a new flag. When calling bpf_l4_csum_replace in Cilium, it ends up calling inet_proto_csum_replace_by_diff: 1: void inet_proto_csum_replace_by_diff(__sum16 *sum, struct sk_buff *skb, 2: __wsum diff, bool pseudohdr) 3: { 4: if (skb->ip_summed != CHECKSUM_PARTIAL) { 5: csum_replace_by_diff(sum, diff); 6: if (skb->ip_summed == CHECKSUM_COMPLETE && pseudohdr) 7: skb->csum = ~csum_sub(diff, skb->csum); 8: } else if (pseudohdr) { 9: *sum = ~csum_fold(csum_add(diff, csum_unfold(*sum))); 10: } 11: } The bug happens when we're in the CHECKSUM_COMPLETE state. We've just updated one of the IPv6 addresses. The helper now updates the L4 header checksum on line 5. Next, it updates skb->csum on line 7. It shouldn't. For an IPv6 packet, the updates of the IPv6 address and of the L4 checksum will cancel each other. The checksums are set such that computing a checksum over the packet including its checksum will result in a sum of 0. So the same is true here when we update the L4 checksum on line 5. We'll update it as to cancel the previous IPv6 address update. Hence skb->csum should remain untouched in this case. The same bug doesn't affect IPv4 packets because, in that case, three fields are updated: the IPv4 address, the IP checksum, and the L4 checksum. The change to the IPv4 address and one of the checksums still cancel each other in skb->csum, but we're left with one checksum update and should therefore update skb->csum accordingly. That's exactly what inet_proto_csum_replace_by_diff does. This special case for IPv6 L4 checksums is also described atop inet_proto_csum_replace16, the function we should be using in this case. This patch introduces a new bpf_l4_csum_replace flag, BPF_F_IPV6, to indicate that we're updating the L4 checksum of an IPv6 packet. When the flag is set, inet_proto_csum_replace_by_diff will skip the skb->csum update. Fixes: 7d672345ed295 ("bpf: add generic bpf_csum_diff helper") Signed-off-by: Paul Chaignon Acked-by: Daniel Borkmann Link: https://patch.msgid.link/96a6bc3a443e6f0b21ff7b7834000e17fb549e05.1748509484.git.paul.chaignon@gmail.com Signed-off-by: Jakub Kicinski commit 6043b794c7668c19dabc4a93c75b924a19474d59 Author: Paul Chaignon Date: Thu May 29 12:28:05 2025 +0200 net: Fix checksum update for ILA adj-transport During ILA address translations, the L4 checksums can be handled in different ways. One of them, adj-transport, consist in parsing the transport layer and updating any found checksum. This logic relies on inet_proto_csum_replace_by_diff and produces an incorrect skb->csum when in state CHECKSUM_COMPLETE. This bug can be reproduced with a simple ILA to SIR mapping, assuming packets are received with CHECKSUM_COMPLETE: $ ip a show dev eth0 14: eth0@if15: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 62:ae:35:9e:0f:8d brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 3333:0:0:1::c078/64 scope global valid_lft forever preferred_lft forever inet6 fd00:10:244:1::c078/128 scope global nodad valid_lft forever preferred_lft forever inet6 fe80::60ae:35ff:fe9e:f8d/64 scope link proto kernel_ll valid_lft forever preferred_lft forever $ ip ila add loc_match fd00:10:244:1 loc 3333:0:0:1 \ csum-mode adj-transport ident-type luid dev eth0 Then I hit [fd00:10:244:1::c078]:8000 with a server listening only on [3333:0:0:1::c078]:8000. With the bug, the SYN packet is dropped with SKB_DROP_REASON_TCP_CSUM after inet_proto_csum_replace_by_diff changed skb->csum. The translation and drop are visible on pwru [1] traces: IFACE TUPLE FUNC eth0:9 [fd00:10:244:3::3d8]:51420->[fd00:10:244:1::c078]:8000(tcp) ipv6_rcv eth0:9 [fd00:10:244:3::3d8]:51420->[fd00:10:244:1::c078]:8000(tcp) ip6_rcv_core eth0:9 [fd00:10:244:3::3d8]:51420->[fd00:10:244:1::c078]:8000(tcp) nf_hook_slow eth0:9 [fd00:10:244:3::3d8]:51420->[fd00:10:244:1::c078]:8000(tcp) inet_proto_csum_replace_by_diff eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) tcp_v6_early_demux eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) ip6_route_input eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) ip6_input eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) ip6_input_finish eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) ip6_protocol_deliver_rcu eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) raw6_local_deliver eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) ipv6_raw_deliver eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) tcp_v6_rcv eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) __skb_checksum_complete eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) kfree_skb_reason(SKB_DROP_REASON_TCP_CSUM) eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) skb_release_head_state eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) skb_release_data eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) skb_free_head eth0:9 [fd00:10:244:3::3d8]:51420->[3333:0:0:1::c078]:8000(tcp) kfree_skbmem This is happening because inet_proto_csum_replace_by_diff is updating skb->csum when it shouldn't. The L4 checksum is updated such that it "cancels" the IPv6 address change in terms of checksum computation, so the impact on skb->csum is null. Note this would be different for an IPv4 packet since three fields would be updated: the IPv4 address, the IP checksum, and the L4 checksum. Two would cancel each other and skb->csum would still need to be updated to take the L4 checksum change into account. This patch fixes it by passing an ipv6 flag to inet_proto_csum_replace_by_diff, to skip the skb->csum update if we're in the IPv6 case. Note the behavior of the only other user of inet_proto_csum_replace_by_diff, the BPF subsystem, is left as is in this patch and fixed in the subsequent patch. With the fix, using the reproduction from above, I can confirm skb->csum is not touched by inet_proto_csum_replace_by_diff and the TCP SYN proceeds to the application after the ILA translation. Link: https://github.com/cilium/pwru [1] Fixes: 65d7ab8de582 ("net: Identifier Locator Addressing module") Signed-off-by: Paul Chaignon Acked-by: Daniel Borkmann Link: https://patch.msgid.link/b5539869e3550d46068504feb02d37653d939c0b.1748509484.git.paul.chaignon@gmail.com Signed-off-by: Jakub Kicinski commit 44abca1fe32099ec8872488add959bed24d1d7af Merge: 3ec52330497664 cbefe2ffa77845 Author: Jakub Kicinski Date: Fri May 30 19:33:30 2025 -0700 Merge branch 'net-stmmac-prevent-div-by-0' Alexis Lothoré says: ==================== net: stmmac: prevent div by 0 fix a small splat I am observing on a STM32MP157 platform at boot (see commit 1) due to a division by 0. v3: https://lore.kernel.org/20250528-stmmac_tstamp_div-v3-0-b525ecdfd84c@bootlin.com v2: https://lore.kernel.org/20250527-stmmac_tstamp_div-v2-1-663251b3b542@bootlin.com v1: https://lore.kernel.org/20250523-stmmac_tstamp_div-v1-1-bca8a5a3a477@bootlin.com ==================== Link: https://patch.msgid.link/20250529-stmmac_tstamp_div-v4-0-d73340a794d5@bootlin.com Signed-off-by: Jakub Kicinski commit cbefe2ffa7784525ec5d008ba87c7add19ec631a Author: Alexis Lothoré Date: Thu May 29 11:07:24 2025 +0200 net: stmmac: make sure that ptp_rate is not 0 before configuring EST If the ptp_rate recorded earlier in the driver happens to be 0, this bogus value will propagate up to EST configuration, where it will trigger a division by 0. Prevent this division by 0 by adding the corresponding check and error code. Suggested-by: Maxime Chevallier Signed-off-by: Alexis Lothoré Fixes: 8572aec3d0dc ("net: stmmac: Add basic EST support for XGMAC") Link: https://patch.msgid.link/20250529-stmmac_tstamp_div-v4-2-d73340a794d5@bootlin.com Signed-off-by: Jakub Kicinski commit 030ce919e114a111e83b7976ecb3597cefd33f26 Author: Alexis Lothoré Date: Thu May 29 11:07:23 2025 +0200 net: stmmac: make sure that ptp_rate is not 0 before configuring timestamping The stmmac platform drivers that do not open-code the clk_ptp_rate value after having retrieved the default one from the device-tree can end up with 0 in clk_ptp_rate (as clk_get_rate can return 0). It will eventually propagate up to PTP initialization when bringing up the interface, leading to a divide by 0: Division by zero in kernel. CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.30-00001-g48313bd5768a #22 Hardware name: STM32 (Device Tree Support) Call trace: unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x6c/0x8c dump_stack_lvl from Ldiv0_64+0x8/0x18 Ldiv0_64 from stmmac_init_tstamp_counter+0x190/0x1a4 stmmac_init_tstamp_counter from stmmac_hw_setup+0xc1c/0x111c stmmac_hw_setup from __stmmac_open+0x18c/0x434 __stmmac_open from stmmac_open+0x3c/0xbc stmmac_open from __dev_open+0xf4/0x1ac __dev_open from __dev_change_flags+0x1cc/0x224 __dev_change_flags from dev_change_flags+0x24/0x60 dev_change_flags from ip_auto_config+0x2e8/0x11a0 ip_auto_config from do_one_initcall+0x84/0x33c do_one_initcall from kernel_init_freeable+0x1b8/0x214 kernel_init_freeable from kernel_init+0x24/0x140 kernel_init from ret_from_fork+0x14/0x28 Exception stack(0xe0815fb0 to 0xe0815ff8) Prevent this division by 0 by adding an explicit check and error log about the actual issue. While at it, remove the same check from stmmac_ptp_register, which then becomes duplicate Fixes: 19d857c9038e ("stmmac: Fix calculations for ptp counters when clock input = 50Mhz.") Signed-off-by: Alexis Lothoré Reviewed-by: Yanteng Si Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20250529-stmmac_tstamp_div-v4-1-d73340a794d5@bootlin.com Signed-off-by: Jakub Kicinski commit 3ec523304976648b45a3eef045e97d17122ff1b2 Author: Saurabh Sengar Date: Thu May 29 03:18:30 2025 -0700 hv_netvsc: fix potential deadlock in netvsc_vf_setxdp() The MANA driver's probe registers netdevice via the following call chain: mana_probe() register_netdev() register_netdevice() register_netdevice() calls notifier callback for netvsc driver, holding the netdev mutex via netdev_lock_ops(). Further this netvsc notifier callback end up attempting to acquire the same lock again in dev_xdp_propagate() leading to deadlock. netvsc_netdev_event() netvsc_vf_setxdp() dev_xdp_propagate() This deadlock was not observed so far because net_shaper_ops was never set, and thus the lock was effectively a no-op in this case. Fix this by using netif_xdp_propagate() instead of dev_xdp_propagate() to avoid recursive locking in this path. And, since no deadlock is observed on the other path which is via netvsc_probe, add the lock exclusivly for that path. Also, clean up the unregistration path by removing the unnecessary call to netvsc_vf_setxdp(), since unregister_netdevice_many_notify() already performs this cleanup via dev_xdp_uninstall(). Fixes: 97246d6d21c2 ("net: hold netdev instance lock during ndo_bpf") Cc: stable@vger.kernel.org Signed-off-by: Saurabh Sengar Tested-by: Erni Sri Satya Vennela Reviewed-by: Haiyang Zhang Reviewed-by: Subbaraya Sundeep Link: https://patch.msgid.link/1748513910-23963-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Jakub Kicinski commit c1f4cb8a8d48db5c8396e1976c5b2e7922d944b9 Author: Pranjal Shrivastava Date: Wed May 28 21:10:58 2025 +0000 net: Fix net_devmem_bind_dmabuf for non-devmem configs Fix the signature of the net_devmem_bind_dmabuf API for CONFIG_NET_DEVMEM=n. Fixes: bd61848900bf ("net: devmem: Implement TX path") Signed-off-by: Pranjal Shrivastava Link: https://patch.msgid.link/20250528211058.1826608-1-praan@google.com Signed-off-by: Jakub Kicinski commit efdddc4484859082da6c7877ed144c8121c8ea55 Author: Álvaro Fernández Rojas Date: Thu May 29 14:44:06 2025 +0200 net: dsa: tag_brcm: legacy: fix pskb_may_pull length BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length. The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes. Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags") Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250529124406.2513779-1-noltari@gmail.com Signed-off-by: Jakub Kicinski commit d1a866d5530698a4be4214048c2282c7e5bfcdac Merge: d3faab9b5a6a04 03dba9cea72f97 Author: Jakub Kicinski Date: Fri May 30 19:15:58 2025 -0700 Merge tag 'for-net-2025-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_qca: move the SoC type check to the right place - MGMT: reject malformed HCI_CMD_SYNC commands - btnxpuart: Fix missing devm_request_irq() return value check - L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION * tag 'for-net-2025-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION Bluetooth: hci_qca: move the SoC type check to the right place Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Bluetooth: MGMT: reject malformed HCI_CMD_SYNC commands ==================== Link: https://patch.msgid.link/20250530174835.405726-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit ee9a4e92799d72b1a2237d76065562b1f1cf334f Author: Andrea Righi Date: Fri May 30 17:46:29 2025 +0200 sched_ext: idle: Properly handle invalid prev_cpu during idle selection The default idle selection policy doesn't properly handle the case where @prev_cpu is not part of the task's allowed CPUs. In this situation, it may return an idle CPU that is not usable by the task, breaking the assumption that the returned CPU must always be within the allowed cpumask, causing inefficiencies or even stalls in certain cases. This issue can arise in the following cases: - The task's affinity may have changed by the time the function is invoked, especially now that the idle selection logic can be used from multiple contexts (i.e., BPF test_run call). - The BPF scheduler may provide a @prev_cpu that is not part of the allowed mask, either unintentionally or as a placement hint. In fact @prev_cpu may not necessarily refer to the CPU the task last ran on, but it can also be considered as a target CPU that the scheduler wishes to use for the task. Therefore, enforce the right behavior by always checking whether @prev_cpu is in the allowed mask, when using scx_bpf_select_cpu_and(), and it's also usable by the task (@p->cpus_ptr). If it is not, try to find a valid CPU nearby @prev_cpu, following the usual locality-aware fallback path (SMT, LLC, node, allowed CPUs). This ensures the returned CPU is always allowed, improving robustness to affinity changes and invalid scheduler hints, while preserving locality as much as possible. Fixes: a730e3f7a48bc ("sched_ext: idle: Consolidate default idle CPU selection kfuncs") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit c853d18706de8c9525126b362f747d2e480e93df Author: JP Kobryn Date: Wed May 28 16:51:30 2025 -0700 cgroup: adjust criteria for rstat subsystem cpu lock access Previously it was found that on uniprocessor machines the size of raw_spinlock_t could be zero so a pre-processor conditional was used to avoid the allocation of ss->rstat_ss_cpu_lock. The conditional did not take into account cases where lock debugging features were enabled. Cover these cases along with the original non-smp case by explicitly using the size of size of the lock type as criteria for allocation/access where applicable. Signed-off-by: JP Kobryn Fixes: 748922dcfabd "cgroup: use subsystem-specific rstat locks to avoid contention" Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505281034.7ae1668d-lkp@intel.com Reviewed-by: Shakeel Butt Reviewed-by: Waiman Long Signed-off-by: Tejun Heo commit a95ef0199e80f3384eb992889322957d26c00102 Author: Dan Carpenter Date: Fri May 30 16:13:32 2025 -0700 Input: ims-pcu - check record size in ims_pcu_flash_firmware() The "len" variable comes from the firmware and we generally do trust firmware, but it's always better to double check. If the "len" is too large it could result in memory corruption when we do "memcpy(fragment->data, rec->data, len);" Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/131fd1ae92c828ee9f4fa2de03d8c210ae1f3524.1748463049.git.dan.carpenter@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 8f38219fa139623c29db2cb0f17d0a197a86e344 Author: Gatien Chevallier Date: Fri May 30 16:09:23 2025 -0700 Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer() gpio_keys_irq_isr() and gpio_keys_irq_timer() access the same resources. There could be a concurrent access if a GPIO interrupt occurs in parallel of a HR timer interrupt. Guard back those resources with a spinlock. Fixes: 019002f20cb5 ("Input: gpio-keys - use hrtimer for release timer") Signed-off-by: Gatien Chevallier Link: https://lore.kernel.org/r/20250528-gpio_keys_preempt_rt-v2-2-3fc55a9c3619@foss.st.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit f4a8f561d08e39f7833d4a278ebfb12a41eef15f Author: Fabrice Gasnier Date: Fri May 30 15:36:43 2025 -0700 Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT When enabling PREEMPT_RT, the gpio_keys_irq_timer() callback runs in hard irq context, but the input_event() takes a spin_lock, which isn't allowed there as it is converted to a rt_spin_lock(). [ 4054.289999] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [ 4054.290028] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/0 ... [ 4054.290195] __might_resched+0x13c/0x1f4 [ 4054.290209] rt_spin_lock+0x54/0x11c [ 4054.290219] input_event+0x48/0x80 [ 4054.290230] gpio_keys_irq_timer+0x4c/0x78 [ 4054.290243] __hrtimer_run_queues+0x1a4/0x438 [ 4054.290257] hrtimer_interrupt+0xe4/0x240 [ 4054.290269] arch_timer_handler_phys+0x2c/0x44 [ 4054.290283] handle_percpu_devid_irq+0x8c/0x14c [ 4054.290297] handle_irq_desc+0x40/0x58 [ 4054.290307] generic_handle_domain_irq+0x1c/0x28 [ 4054.290316] gic_handle_irq+0x44/0xcc Considering the gpio_keys_irq_isr() can run in any context, e.g. it can be threaded, it seems there's no point in requesting the timer isr to run in hard irq context. Relax the hrtimer not to use the hard context. Fixes: 019002f20cb5 ("Input: gpio-keys - use hrtimer for release timer") Suggested-by: Sebastian Andrzej Siewior Signed-off-by: Fabrice Gasnier Signed-off-by: Gatien Chevallier Link: https://lore.kernel.org/r/20250528-gpio_keys_preempt_rt-v2-1-3fc55a9c3619@foss.st.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 0f70f5b08a47a3bc1a252e5f451a137cde7c98ce Merge: edb94482e9d6da 2dbf6e0df447d1 Author: Linus Torvalds Date: Fri May 30 15:38:29 2025 -0700 Merge tag 'pull-automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull automount updates from Al Viro: "Automount wart removal A bunch of odd boilerplate gone from instances - the reason for those was the need to protect the yet-to-be-attched mount from mark_mounts_for_expiry() deciding to take it out. But that's easy to detect and take care of in mark_mounts_for_expiry() itself; no need to have every instance simulate mount being busy by grabbing an extra reference to it, with finish_automount() undoing that once it attaches that mount. Should've done it that way from the very beginning... This is a flagday change, thankfully there are very few instances. vfs_submount() is gone - its sole remaining user (trace_automount) had been switched to saner primitives" * tag 'pull-automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill vfs_submount() saner calling conventions for ->d_automount() commit e8fe33fdd797e22c85d7cda97e1ee8f27b09a609 Author: George Anthony Vernon Date: Mon May 26 14:59:52 2025 +0100 Input: amijoy - make headings compliant w/ guidelines in documentation Make heading adornments compliant with the guidelines to improve organisation of the page. Signed-off-by: George Anthony Vernon Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250526135957.180254-5-contact@gvernon.com Signed-off-by: Dmitry Torokhov commit 11172ec55b4c827052985407abf6d909b5266fd3 Author: George Anthony Vernon Date: Mon May 26 14:59:51 2025 +0100 Input: amijoy - fix grammar in documentation Make small grammar fixes to Amiga joystick documentation. Signed-off-by: George Anthony Vernon Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250526135957.180254-4-contact@gvernon.com Signed-off-by: Dmitry Torokhov commit ed1d9c2b0dbc3c2d4b86f006e39d2c0ca8ac15c8 Author: George Anthony Vernon Date: Mon May 26 14:59:50 2025 +0100 Input: amijoy - fix Amiga 4-joystick adapter pinout in documentation Pinout incorrectly duplicated pin 18, correct this. Signed-off-by: George Anthony Vernon Link: https://lore.kernel.org/r/20250526135957.180254-3-contact@gvernon.com Signed-off-by: Dmitry Torokhov commit fb81e4738ec9d727830be2787556932446271369 Author: George Anthony Vernon Date: Mon May 26 14:59:49 2025 +0100 Input: amijoy - fix broken table formatting in documentation Missing '+' led to unintended spanning cell. Correct this. Signed-off-by: George Anthony Vernon Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250526135957.180254-2-contact@gvernon.com Signed-off-by: Dmitry Torokhov commit edb94482e9d6da6e397e8b1cd0400d673b24fd35 Merge: a82ba839915926 b70cb459890b75 Author: Linus Torvalds Date: Fri May 30 15:07:55 2025 -0700 Merge tag 'pull-ufs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull UFS updates from Al Viro: "The bulk of this is Eric's conversion of UFS to new mount API, with a bit of cleanups from me. I hoped to get stricter sanity checks on superblock flags into that pile, but... next cycle, hopefully" * tag 'pull-ufs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ufs: convert ufs to the new mount API ufs: reject multiple conflicting -o ufstype=... on mount ufs: split ->s_mount_opt - don't mix flavour and on-error commit a82ba839915926f8713183fd023c6d9357bae26c Merge: 724b03ee96b8d4 3b5260d12b1fe7 Author: Linus Torvalds Date: Fri May 30 15:04:11 2025 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount propagation fix from Al Viro: "6.15 allowed mount propagation to destinations in detached trees; unfortunately, that breaks existing userland, so the old behaviour needs to be restored. It's not exactly a revert - the original behaviour had a bug, where existence of detached tree might disrupt propagation between locations not in detached trees. Thankfully, userland did not depend upon that bug, so we want to keep the fix" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Don't propagate mounts into detached trees commit ec49e253322bf29e721c6153d9e7be95eef33b33 Author: Niklas Cassel Date: Tue May 6 09:39:39 2025 +0200 PCI: qcom: Replace PERST# sleep time with proper macro Replace the PERST# sleep time with the proper macro (PCIE_T_PVPERL_MS). No functional change. Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Wilfred Mallawa Reviewed-by: Hans Zhang <18255117159@163.com> Reviewed-by: Krishna Chaitanya Chundru Link: https://patch.msgid.link/20250506073934.433176-10-cassel@kernel.org commit d34719d0e81f5bf1750931562a36a6f3fa6512bc Author: Niklas Cassel Date: Tue May 6 09:39:38 2025 +0200 PCI: dw-rockchip: Replace PERST# sleep time with proper macro Replace the PERST# sleep time with the proper macro (PCIE_T_PVPERL_MS). No functional change. Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Laszlo Fiat Reviewed-by: Hans Zhang <18255117159@163.com> Reviewed-by: Wilfred Mallawa Link: https://patch.msgid.link/20250506073934.433176-9-cassel@kernel.org commit 9dc63d8ff182150d7d7b318ab9389702a2c0a292 Author: Emil Tantilov Date: Thu May 8 11:47:15 2025 -0700 idpf: avoid mailbox timeout delays during reset Mailbox operations are not possible while the driver is in reset. Operations that require MBX exchange with the control plane will result in long delays if executed while a reset is in progress: ethtool -L combined 8& echo 1 > /sys/class/net//device/reset idpf 0000:83:00.0: HW reset detected idpf 0000:83:00.0: Device HW Reset initiated idpf 0000:83:00.0: Transaction timed-out (op:504 cookie:be00 vc_op:504 salt:be timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:508 cookie:bf00 vc_op:508 salt:bf timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:512 cookie:c000 vc_op:512 salt:c0 timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:510 cookie:c100 vc_op:510 salt:c1 timeout:2000ms) idpf 0000:83:00.0: Transaction timed-out (op:509 cookie:c200 vc_op:509 salt:c2 timeout:60000ms) idpf 0000:83:00.0: Transaction timed-out (op:509 cookie:c300 vc_op:509 salt:c3 timeout:60000ms) idpf 0000:83:00.0: Transaction timed-out (op:505 cookie:c400 vc_op:505 salt:c4 timeout:60000ms) idpf 0000:83:00.0: Failed to configure queues for vport 0, -62 Disable mailbox communication in case of a reset, unless it's done during a driver load, where the virtchnl operations are needed to configure the device. Fixes: 8077c727561aa ("idpf: add controlq init and reset checks") Co-developed-by: Joshua Hay Signed-off-by: Joshua Hay Signed-off-by: Emil Tantilov Reviewed-by: Ahmed Zaki Reviewed-by: Aleksandr Loktionov Reviewed-by: Simon Horman Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 7292af042bcf22e2c18b96ed250f78498a5b28ab Author: Brian Vazquez Date: Thu May 1 17:06:17 2025 +0000 idpf: fix a race in txq wakeup Add a helper function to correctly handle the lockless synchronization when the sender needs to block. The paradigm is if (no_resources()) { stop_queue(); barrier(); if (!no_resources()) restart_queue(); } netif_subqueue_maybe_stop already handles the paradigm correctly, but the code split the check for resources in three parts, the first one (descriptors) followed the protocol, but the other two (completions and tx_buf) were only doing the first part and so race prone. Luckily netif_subqueue_maybe_stop macro already allows you to use a function to evaluate the start/stop conditions so the fix only requires the right helper function to evaluate all the conditions at once. The patch removes idpf_tx_maybe_stop_common since it's no longer needed and instead adjusts separately the conditions for singleq and splitq. Note that idpf_tx_buf_hw_update doesn't need to check for resources since that will be covered in idpf_tx_splitq_frame. To reproduce: Reduce the threshold for pending completions to increase the chances of hitting this pause by changing your kernel: drivers/net/ethernet/intel/idpf/idpf_txrx.h -#define IDPF_TX_COMPLQ_OVERFLOW_THRESH(txcq) ((txcq)->desc_count >> 1) +#define IDPF_TX_COMPLQ_OVERFLOW_THRESH(txcq) ((txcq)->desc_count >> 4) Use pktgen to force the host to push small pkts very aggressively: ./pktgen_sample02_multiqueue.sh -i eth1 -s 100 -6 -d $IP -m $MAC \ -p 10000-10000 -t 16 -n 0 -v -x -c 64 Fixes: 6818c4d5b3c2 ("idpf: add splitq start_xmit") Reviewed-by: Jacob Keller Reviewed-by: Madhu Chittim Signed-off-by: Josh Hay Signed-off-by: Brian Vazquez Signed-off-by: Luigi Rizzo Reviewed-by: Simon Horman Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 73145e6d81070d34a21431c9e0d7aaf2f29ca048 Author: Michal Kubiak Date: Tue May 13 12:55:29 2025 +0200 ice: fix rebuilding the Tx scheduler tree for large queue counts The current implementation of the Tx scheduler allows the tree to be rebuilt as the user adds more Tx queues to the VSI. In such a case, additional child nodes are added to the tree to support the new number of queues. Unfortunately, this algorithm does not take into account that the limit of the VSI support node may be exceeded, so an additional node in the VSI layer may be required to handle all the requested queues. Such a scenario occurs when adding XDP Tx queues on machines with many CPUs. Although the driver still respects the queue limit returned by the FW, the Tx scheduler was unable to add those queues to its tree and returned one of the errors below. Such a scenario occurs when adding XDP Tx queues on machines with many CPUs (e.g. at least 321 CPUs, if there is already 128 Tx/Rx queue pairs). Although the driver still respects the queue limit returned by the FW, the Tx scheduler was unable to add those queues to its tree and returned the following errors: Failed VSI LAN queue config for XDP, error: -5 or: Failed to set LAN Tx queue context, error: -22 Fix this problem by extending the tree rebuild algorithm to check if the current VSI node can support the requested number of queues. If it cannot, create as many additional VSI support nodes as necessary to handle all the required Tx queues. Symmetrically, adjust the VSI node removal algorithm to remove all nodes associated with the given VSI. Also, make the search for the next free VSI node more restrictive. That is, add queue group nodes only to the VSI support nodes that have a matching VSI handle. Finally, fix the comment describing the tree update algorithm to better reflect the current scenario. Fixes: b0153fdd7e8a ("ice: update VSI config dynamically") Reviewed-by: Dawid Osuchowski Reviewed-by: Przemek Kitszel Signed-off-by: Michal Kubiak Reviewed-by: Simon Horman Tested-by: Jesse Brandeburg Tested-by: Saritha Sanigani (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 6fa2942578472c9cab13a8fc1dae0d830193e0a1 Author: Michal Kubiak Date: Tue May 13 12:55:28 2025 +0200 ice: create new Tx scheduler nodes for new queues only The current implementation of the Tx scheduler tree attempts to create nodes for all Tx queues, ignoring the fact that some queues may already exist in the tree. For example, if the VSI already has 128 Tx queues and the user requests for 16 new queues, the Tx scheduler will compute the tree for 272 queues (128 existing queues + 144 new queues), instead of 144 queues (128 existing queues and 16 new queues). Fix that by modifying the node count calculation algorithm to skip the queues that already exist in the tree. Fixes: 5513b920a4f7 ("ice: Update Tx scheduler tree for VSI multi-Tx queue support") Reviewed-by: Dawid Osuchowski Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Michal Kubiak Reviewed-by: Simon Horman Tested-by: Jesse Brandeburg Tested-by: Saritha Sanigani (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 0153f36041b8e52019ebfa8629c13bf8f9b0a951 Author: Michal Kubiak Date: Tue May 13 12:55:27 2025 +0200 ice: fix Tx scheduler error handling in XDP callback When the XDP program is loaded, the XDP callback adds new Tx queues. This means that the callback must update the Tx scheduler with the new queue number. In the event of a Tx scheduler failure, the XDP callback should also fail and roll back any changes previously made for XDP preparation. The previous implementation had a bug that not all changes made by the XDP callback were rolled back. This caused the crash with the following call trace: [ +9.549584] ice 0000:ca:00.0: Failed VSI LAN queue config for XDP, error: -5 [ +0.382335] Oops: general protection fault, probably for non-canonical address 0x50a2250a90495525: 0000 [#1] SMP NOPTI [ +0.010710] CPU: 103 UID: 0 PID: 0 Comm: swapper/103 Not tainted 6.14.0-net-next-mar-31+ #14 PREEMPT(voluntary) [ +0.010175] Hardware name: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 02/16/2022 [ +0.010946] RIP: 0010:__ice_update_sample+0x39/0xe0 [ice] [...] [ +0.002715] Call Trace: [ +0.002452] [ +0.002021] ? __die_body.cold+0x19/0x29 [ +0.003922] ? die_addr+0x3c/0x60 [ +0.003319] ? exc_general_protection+0x17c/0x400 [ +0.004707] ? asm_exc_general_protection+0x26/0x30 [ +0.004879] ? __ice_update_sample+0x39/0xe0 [ice] [ +0.004835] ice_napi_poll+0x665/0x680 [ice] [ +0.004320] __napi_poll+0x28/0x190 [ +0.003500] net_rx_action+0x198/0x360 [ +0.003752] ? update_rq_clock+0x39/0x220 [ +0.004013] handle_softirqs+0xf1/0x340 [ +0.003840] ? sched_clock_cpu+0xf/0x1f0 [ +0.003925] __irq_exit_rcu+0xc2/0xe0 [ +0.003665] common_interrupt+0x85/0xa0 [ +0.003839] [ +0.002098] [ +0.002106] asm_common_interrupt+0x26/0x40 [ +0.004184] RIP: 0010:cpuidle_enter_state+0xd3/0x690 Fix this by performing the missing unmapping of XDP queues from q_vectors and setting the XDP rings pointer back to NULL after all those queues are released. Also, add an immediate exit from the XDP callback in case of ring preparation failure. Fixes: efc2214b6047 ("ice: Add support for XDP") Reviewed-by: Dawid Osuchowski Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Michal Kubiak Reviewed-by: Aleksandr Loktionov Reviewed-by: Simon Horman Tested-by: Jesse Brandeburg Tested-by: Saritha Sanigani (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 724b03ee96b8d45310d89c9c3b0aa5ee0dbb72f7 Merge: 1fbbb629452ca1 46550e2b878d60 Author: Linus Torvalds Date: Fri May 30 12:42:57 2025 -0700 Merge tag 'efi-next-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: "Not a lot going on in the EFI tree this cycle. The only thing that stands out is the new support for SBAT metadata, which was a bit contentious when it was first proposed, because in the initial incarnation, it would have required us to maintain a revocation index, and bump it each time a vulnerability affecting UEFI secure boot got fixed. This was shot down for obvious reasons. This time, only the changes needed to emit the SBAT section into the PE/COFF image are being carried upstream, and it is up to the distros to decide what to put in there when creating and signing the build. This only has the EFI zboot bits (which the distros will be using for arm64); the x86 bzImage changes should be arriving next cycle, presumably via the -tip tree. Summary: - Add support for emitting a .sbat section into the EFI zboot image, so that downstreams can easily include revocation metadata in the signed EFI images - Align PE symbolic constant names with other projects - Bug fix for the efi_test module - Log the physical address and size of the EFI memory map when failing to map it - A kerneldoc fix for the EFI stub code" * tag 'efi-next-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: include: pe.h: Fix PE definitions efi/efi_test: Fix missing pending status update in getwakeuptime efi: zboot specific mechanism for embedding SBAT section efi/libstub: Describe missing 'out' parameter in efi_load_initrd efi: Improve logging around memmap init commit 1fbbb629452ca16909b440b9217a28f42202dc60 Merge: 976aa630da5b55 f4c606df263b6d Author: Linus Torvalds Date: Fri May 30 12:11:46 2025 -0700 Merge tag 'acpi-6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These address issues introduced by recent ACPI changes merged previously: - Unbreak acpi_ut_safe_strncpy() by restoring its previous behavior changed incorrectly by a recent update (Ahmed Salem) - Make a new static checker warning in the recently introduced ACPI MRRM table parser go away (Dan Carpenter) - Fix ACPI table referece leak in error path of einj_probe() (Dan Carpenter)" * tag 'acpi-6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy() ACPI: MRRM: Silence error code static checker warning ACPI: APEI: EINJ: Clean up on error in einj_probe() commit 976aa630da5b5508c278487db31b873ddf6bae8f Merge: 8477ab143069c6 3d031d0d8daab8 Author: Linus Torvalds Date: Fri May 30 11:54:29 2025 -0700 Merge tag 'pm-6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These revert an x86 commit that introduced a nasty power regression on some systems, fix PSCI cpuidle driver and ACPI cpufreq driver regressions, add Rust abstractions for cpufreq, OPP, clk, and cpumasks, add a Rust-based cpufreq-dt driver, and do a minor SCMI cpufreq driver cleanup: - Revert an x86 commit that went into 6.15 and caused idle power, including power in suspend-to-idle, to rise rather dramatically on systems booting with "nosmt" in the kernel command line (Rafael Wysocki) - Prevent freeing an uninitialized pointer in error path of dt_idle_state_present() in the PSCI cpuidle driver (Dan Carpenter) - Use KHz as the nominal_freq units in get_max_boost_ratio() in the ACPI cpufreq driver (iGautham Shenoy) - Add Rust abstractions for CPUFreq framework (Viresh Kumar) - Add Rust abstractions for OPP framework (Viresh Kumar) - Add basic Rust abstractions for Clk and Cpumask frameworks (Viresh Kumar) - Clean up the SCMI cpufreq driver somewhat (Mike Tipton)" * tag 'pm-6.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (21 commits) Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() rust: opp: Move `cfg(CONFIG_OF)` attribute to the top of doc test cpuidle: psci: Fix uninitialized variable in dt_idle_state_present() rust: opp: Make the doctest example depend on CONFIG_OF cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs cpufreq: Add Rust-based cpufreq-dt driver rust: opp: Extend OPP abstractions with cpufreq support rust: cpufreq: Extend abstractions for driver registration rust: cpufreq: Extend abstractions for policy and driver ops rust: cpufreq: Add initial abstractions for cpufreq framework rust: opp: Add abstractions for the configuration options rust: opp: Add abstractions for the OPP table rust: opp: Add initial abstractions for OPP framework rust: cpu: Add from_cpu() rust: macros: enable use of hyphens in module names rust: clk: Add initial abstractions rust: clk: Add helpers for Rust code MAINTAINERS: Add entry for Rust cpumask API rust: cpumask: Add initial abstractions ... commit 3d031d0d8daab86f9c3e9e89c80fec08367fb304 Merge: 25961ae6c80b2b 70523f335734b0 Author: Rafael J. Wysocki Date: Fri May 30 20:21:36 2025 +0200 Merge branch 'pm-cpuidle' Fix an issue in the PSCI cpuidle driver introduced recently and a nasty x86 power regression introduced in 6.15: - Prevent freeing an uninitialized pointer in error path of dt_idle_state_present() in the PSCI cpuidle driver (Dan Carpenter). - Revert an x86 commit that went into 6.15 and caused idle power, including power in suspend-to-idle, to rise rather dramatically on systems booting with "nosmt" in the kernel command line (Rafael Wysocki). * pm-cpuidle: Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" cpuidle: psci: Fix uninitialized variable in dt_idle_state_present() commit 25961ae6c80b2b940e941f0b3bd0c5c8c1b9ee60 Merge: 9d230d500b0e5f cb6a85f38f456b Author: Rafael J. Wysocki Date: Fri May 30 20:11:09 2025 +0200 Merge branch 'pm-cpufreq' Merge Rust support for cpufreq and OPP, a new Rust-based cpufreq-dt driver, an SCMI cpufreq driver cleanup, and an ACPI cpufreq driver regression fix: - Add Rust abstractions for CPUFreq framework (Viresh Kumar). - Add Rust abstractions for OPP framework (Viresh Kumar). - Add basic Rust abstractions for Clk and Cpumask frameworks (Viresh Kumar). - Clean up the SCMI cpufreq driver somewhat (Mike Tipton). - Use KHz as the nominal_freq units in get_max_boost_ratio() in the ACPI cpufreq driver (iGautham Shenoy). * pm-cpufreq: acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() rust: opp: Move `cfg(CONFIG_OF)` attribute to the top of doc test rust: opp: Make the doctest example depend on CONFIG_OF cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs cpufreq: Add Rust-based cpufreq-dt driver rust: opp: Extend OPP abstractions with cpufreq support rust: cpufreq: Extend abstractions for driver registration rust: cpufreq: Extend abstractions for policy and driver ops rust: cpufreq: Add initial abstractions for cpufreq framework rust: opp: Add abstractions for the configuration options rust: opp: Add abstractions for the OPP table rust: opp: Add initial abstractions for OPP framework rust: cpu: Add from_cpu() rust: macros: enable use of hyphens in module names rust: clk: Add initial abstractions rust: clk: Add helpers for Rust code MAINTAINERS: Add entry for Rust cpumask API rust: cpumask: Add initial abstractions rust: cpumask: Add few more helpers commit f4c606df263b6de746412dee707bc4b590adf45a Merge: 3702a515edec51 d0b29661a95bbf 9375e5e3557bf9 ce57cc1269c580 Author: Rafael J. Wysocki Date: Fri May 30 19:58:09 2025 +0200 Merge branches 'acpica', 'acpi-tables' and 'acpi-apei' Merge fixes for issues introduced by recent ACPI changes merged previously: - Unbreak acpi_ut_safe_strncpy() by restoring its previous behavior changed incorrectly by a recent update (Ahmed Salem). - Make a new static checker warning in the recently introduced ACPI MRRM table parser go away (Dan Carpenter). - Fix ACPI table referece leak in error path of einj_probe() (Dan Carpenter). * acpica: ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy() * acpi-tables: ACPI: MRRM: Silence error code static checker warning * acpi-apei: ACPI: APEI: EINJ: Clean up on error in einj_probe() commit 8477ab143069c6b05d6da4a8184ded8b969240f5 Merge: dd91b5e1d64487 879b141b7cfa09 Author: Linus Torvalds Date: Fri May 30 10:44:20 2025 -0700 Merge tag 'iommu-updates-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu updates from Joerg Roedel: "Core: - Introduction of iommu-pages infrastructure to consolitate page-table allocation code among hardware drivers. This is ground-work for more generalization in the future - Remove IOMMU_DEV_FEAT_SVA and IOMMU_DEV_FEAT_IOPF feature flags - Convert virtio-iommu to domain_alloc_paging() - KConfig cleanups - Some small fixes for possible overflows and race conditions Intel VT-d driver: - Restore WO permissions on second-level paging entries - Use ida to manage domain id - Miscellaneous cleanups AMD-Vi: - Make sure notifiers finish running before module unload - Add support for HTRangeIgnore feature - Allow matching ACPI HID devices without matching UIDs ARM-SMMU: - SMMUv2: - Recognise the compatible string for SAR2130P MDSS in the Qualcomm driver, as this device requires an identity domain - Fix Adreno stall handling so that GPU debugging is more robust and doesn't e.g. result in deadlock - SMMUv3: - Fix ->attach_dev() error reporting for unrecognised domains - IO-pgtable: - Allow clients (notably, drivers that process requests from userspace) to silence warnings when mapping an already-mapped IOVA S390: - Add support for additional table regions Mediatek: - Add support for MT6893 MM IOMMU And some smaller fixes and improvements in various other drivers" * tag 'iommu-updates-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: (75 commits) iommu/vt-d: Restore context entry setup order for aliased devices iommu/mediatek: Fix compatible typo for mediatek,mt6893-iommu-mm iommu/arm-smmu-qcom: Make set_stall work when the device is on iommu/arm-smmu: Move handing of RESUME to the context fault handler iommu/arm-smmu-qcom: Enable threaded IRQ for Adreno SMMUv2/MMU500 iommu/io-pgtable-arm: Add quirk to quiet WARN_ON() iommu: Clear the freelist after iommu_put_pages_list() iommu/vt-d: Change dmar_ats_supported() to return boolean iommu/vt-d: Eliminate pci_physfn() in dmar_find_matched_satc_unit() iommu/vt-d: Replace spin_lock with mutex to protect domain ida iommu/vt-d: Use ida to manage domain id iommu/vt-d: Restore WO permissions on second-level paging entries iommu/amd: Allow matching ACPI HID devices without matching UIDs iommu: make inclusion of arm/arm-smmu-v3 directory conditional iommu: make inclusion of riscv directory conditional iommu: make inclusion of amd directory conditional iommu: make inclusion of intel directory conditional iommu: remove duplicate selection of DMAR_TABLE iommu/fsl_pamu: remove trailing space after \n iommu/arm-smmu-qcom: Add SAR2130P MDSS compatible ... commit 03dba9cea72f977e873e4e60e220fa596959dd8f Author: Luiz Augusto von Dentz Date: Wed May 28 14:53:11 2025 -0400 Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION Depending on the security set the response to L2CAP_LE_CONN_REQ shall be just L2CAP_CR_LE_ENCRYPTION if only encryption when BT_SECURITY_MEDIUM is selected since that means security mode 2 which doesn't require authentication which is something that is covered in the qualification test L2CAP/LE/CFC/BV-25-C. Link: https://github.com/bluez/bluez/issues/1270 Fixes: 27e2d4c8d28b ("Bluetooth: Add basic LE L2CAP connect request receiving support") Signed-off-by: Luiz Augusto von Dentz commit 0fb410c914eb03c7e9d821e26d03bac0a239e5db Author: Bartosz Golaszewski Date: Tue May 27 09:47:37 2025 +0200 Bluetooth: hci_qca: move the SoC type check to the right place Commit 3d05fc82237a ("Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional()") accidentally changed the prevous behavior where power control would be disabled without the BT_EN GPIO only on QCA_WCN6750 and QCA_WCN6855 while also getting the error check wrong. We should treat every IS_ERR() return value from devm_gpiod_get_optional() as a reason to bail-out while we should only set power_ctrl_enabled to false on the two models mentioned above. While at it: use dev_err_probe() to save a LOC. Cc: stable@vger.kernel.org Fixes: 3d05fc82237a ("Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional()") Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Tested-by: Hsin-chen Chuang Reviewed-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz commit edc14f2adc6401d67bf73828d9135c80d32615a2 Author: Krzysztof Kozlowski Date: Sun May 25 21:00:21 2025 +0200 Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Return value of devm_request_irq() must be checked (function is even annotated) and without it clang W=1 complains: btnxpuart.c:494:6: error: unused variable 'ret' [-Werror,-Wunused-variable] Setting up wakeup IRQ handler is not really critical, because the handler is empty, so just log the informational message so user could submit proper bug report and silences the clang warning. Fixes: c50b56664e48 ("Bluetooth: btnxpuart: Implement host-wakeup feature") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 03f1700b9b4d4f2fed3165370f3c23db76553178 Author: Dmitry Antipov Date: Thu May 22 21:16:02 2025 +0300 Bluetooth: MGMT: reject malformed HCI_CMD_SYNC commands In 'mgmt_hci_cmd_sync()', check whether the size of parameters passed in 'struct mgmt_cp_hci_cmd_sync' matches the total size of the data (i.e. 'sizeof(struct mgmt_cp_hci_cmd_sync)' plus trailing bytes). Otherwise, large invalid 'params_len' will cause 'hci_cmd_sync_alloc()' to do 'skb_put_data()' from an area beyond the one actually passed to 'mgmt_hci_cmd_sync()'. Reported-by: syzbot+5fe2d5bfbfbec0b675a0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5fe2d5bfbfbec0b675a0 Fixes: 827af4787e74 ("Bluetooth: MGMT: Add initial implementation of MGMT_OP_HCI_CMD_SYNC") Signed-off-by: Dmitry Antipov Signed-off-by: Luiz Augusto von Dentz commit d1c696dba120624256ab335ab8247f535b872309 Author: Manivannan Sadhasivam Date: Thu May 8 12:40:32 2025 +0530 PCI: host-common: Convert to library for host controller drivers This common library will be used as a placeholder for helper functions shared by the host controller drivers. This avoids placing the host controller drivers specific helpers in drivers/pci/*.c, to avoid enlarging the kernel image on platforms that do not use host controller drivers at all (like x86/ACPI platforms). Suggested-by: Lukas Wunner Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250508-pcie-reset-slot-v4-3-7050093e2b50@linaro.org commit b06d125e6280603a34d9064cd9c12748ca2edb04 Author: Manivannan Sadhasivam Date: Thu May 8 12:40:30 2025 +0530 PCI/ERR: Remove misleading TODO regarding kernel panic A PCI device is just another peripheral in a system. So failure to recover it, must not result in a kernel panic. So remove the TODO which is quite misleading. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Wilfred Mallawa Link: https://patch.msgid.link/20250508-pcie-reset-slot-v4-1-7050093e2b50@linaro.org commit 9126d2754c5e5d1818765811a10af0a14cf1fa0a Author: Andrew Price Date: Wed May 28 16:02:37 2025 +0100 gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add When gfs2_sys_fs_add() fails, it sets sb->s_fs_info to NULL on its error path (see commit 0d515210b696 ("GFS2: Add kobject release method")). The intention seems to be to prevent dereferencing sb->s_fs_info once the object pointed to has been deallocated, but that would be better achieved by setting the pointer to NULL in free_sbd(). As a consequence, when the call to gfs2_sys_fs_add() fails in gfs2_fill_super(), sdp = GFS2_SB(inode) will evaluate to NULL in iput() -> gfs2_drop_inode(), and accessing sdp->sd_flags will be a NULL pointer dereference. Fix that by only setting sb->s_fs_info to NULL when actually freeing the object pointed to in free_sbd(). Fixes: ae9f3bd8259a ("gfs2: replace sd_aspace with sd_inode") Reported-by: syzbot+b12826218502df019f9d@syzkaller.appspotmail.com Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit dd91b5e1d6448794c07378d1be12e3261c8769e7 Merge: 883e3c9f408143 92a251c3df8ea1 Author: Linus Torvalds Date: Fri May 30 10:18:56 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Usual collection of driver fixes: - Small bug fixes and cleansup in hfi, hns, rxe, mlx5, mana siw - Further ODP functionality in rxe - Remote access MRs in mana, along with more page sizes - Improve CM scalability with a rwlock around the agent - More trace points for hns - ODP hmm conversion to the new two step dma API - Support the ethernet HW device in mana as well as the RNIC - Cleanups: - Use secs_to_jiffies() when appropriate - Use ERR_CAST() instead of naked casts - Don't use %pK in printk - Unusued functions removed - Allocation type matching" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (57 commits) RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work RDMA/bnxt_re: Support extended stats for Thor2 VF RDMA/hns: Fix endian issue in trace events RDMA/mlx5: Avoid flexible array warning IB/cm: Remove dead code and adjust naming RDMA/core: Avoid hmm_dma_map_alloc() for virtual DMA devices RDMA/rxe: Break endless pagefault loop for RO pages RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc RDMA/bnxt_re: Fix missing error handling for tx_queue RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output RDMA/mlx5: Add support for 200Gbps per lane speeds RDMA/mlx5: Remove the redundant MLX5_IB_STAGE_UAR stage RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction net: mana: Add support for auxiliary device servicing events RDMA/mana_ib: unify mana_ib functions to support any gdma device RDMA/mana_ib: Add support of mana_ib for RNIC and ETH nic net: mana: Probe rdma device in mana driver RDMA/siw: replace redundant ternary operator with just rv RDMA/umem: Separate implicit ODP initialization from explicit ODP RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage ... commit 883e3c9f40814377a239ca0becbcc77deab5ffe5 Merge: eafd95ea74846e 17b7d785fc7fc9 Author: Linus Torvalds Date: Fri May 30 10:07:53 2025 -0700 Merge tag 'i2c-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Core updates: - move towards using the 'fwnode' handle instead of 'of_node' (meaning 'of_node' even gets removed from i2c_board_info) - add support for Write Disable-aware SPD eeproms - minor stuff (use new helpers, typo fixes) i2c-atr (address translator) updates: - support per-channel alias pools - added support for dynamic address translation (also adds FPC202 driver as its user) - add 'static' and 'passthrough' flags Cleanups and refactorings - Many drivers switched to dev_err_probe() - Generic cleanups applied to designware, iproc, ismt, mlxbf, npcm7xx, qcom-geni, pasemi, and thunderx - davinci: declare I2C mangling support among I2C features - designware: clean up DTS handling - designware: fix PM runtime on driver unregister - imx: improve error logging during probe - lpc2k: improve checks in probe error path - xgene-slimpro: improve PCC shared memory handling - pasemi: improve error handling in reset, smbus clear, timeouts - tegra: validate buffer length during transfers - wmt: convert binding to YAML format Improvements and extended support: - microchip-core: add SMBus support - mlxbf: add support for repeated start in block transfers - mlxbf: improve timer configuration - npcm: attempt clock toggle recovery before failing init - octeon: add support for block mode operations - pasemi: add support for unjam device feature - riic: add support for bus recovery New device support: - MediaTek Dimensity 1200 (MT6893) - Sophgo SG2044 - Renesas RZ/V2N (R9A09G056) - Rockchip RK3528 - AMD ISP (new driver)" * tag 'i2c-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (89 commits) i2c: Use str_read_write() helper i2c: mlxbf: avoid 64-bit division i2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function i2c: designware: Don't warn about missing get_clk_rate_khz i2c: designware: Invoke runtime suspend on quick slave re-registration i2c-mlxbf: Improve I2C bus timing configuration i2c-mlxbf: Add repeated start condition support i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function dt-bindings: i2c: i2c-wmt: Convert to YAML i2c: microchip-corei2c: add smbus support i2c: mlxbf: Allow build with COMPILE_TEST i2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP i2c: atr: add passthrough flag i2c: atr: add static flag i2c: atr: allow replacing mappings in attach_addr() i2c: atr: deduplicate logic in attach_addr() i2c: atr: do not create mapping in detach_addr() i2c: atr: split up i2c_atr_get_mapping_by_addr() i2c: atr: find_mapping() -> get_mapping() i2c: atr: Fix lockdep for nested ATRs ... commit eafd95ea74846eda3e3eac6b2bb7f34619d8a6f8 Merge: 9f32a03e3e0d37 08dcbe30be481b Author: Linus Torvalds Date: Fri May 30 09:46:28 2025 -0700 Merge tag 'pinctrl-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "An especially linear and sparse improvement and new drivers release. Nothing exciting. The biggest change in Bartosz changes to make gpiochip set/get calls return error codes (something we should have fixed ages ago but is now finally getting fixed.) Core changes: - Add the devres devm_pinctrl_register_mappings() call that can register some pin control machine mappings and have them go away with the associated device New drivers: - Support for the Mediatek MT6893 and MT8196 SoCs - Support for the Renesas RZ/V2N SoC - Support for the NXP Freescale i.MX943 SoC Improvements: - Per-SoC suspend/resume callbacks in the Samsung drivers - Set all pins as input (High-Z) at probe in the MCP23S08 driver - Switch most GPIO chips to use the setters/getters with a return value - EGPIO support in the Qualcomm QCM2290 driver - Fix up the number of available GPIO lines in Qualcomm QCS8300 and QCS615" * tag 'pinctrl-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (82 commits) pinctrl: freescale: Add support for imx943 pinctrl pinctrl: core: add devm_pinctrl_register_mappings() pinctrl: remove extern specifier for functions in machine.h pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms pinctrl: freescale: Enable driver if platform is enabled. pinctrl: freescale: Depend imx-scu driver on OF pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() pinctrl: armada-37xx: set GPIO output value before setting direction pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 pinctrl: meson: Drop unused aml_pctl_find_group_by_name() pinctrl: at91: Fix possible out-of-boundary access pinctrl: add stubs for OF-specific pinconf functions pinctrl: qcom: correct the ngpios entry for QCS8300 pinctrl: qcom: correct the ngpios entry for QCS615 dt-bindings: pinctrl: qcom: correct gpio-ranges in examples for qcs8300 dt-bindings: pinctrl: qcom: correct gpio-ranges in examples for qcs615 ... commit 9f32a03e3e0d372c520d829dd4da6022fe88832a Merge: d8441523f21375 63bfd78aae9a90 Author: Linus Torvalds Date: Fri May 30 09:15:40 2025 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This has been a semi-quiet cycle. The core framework remains unchanged this time around. In terms of shiny new code though, we have support for the SpacemiT K1 SoC, Sophgo SG2044, and T-HEAD TH1520 VO clk drivers joining the usual silicon players like Qualcomm, Samsung, Allwinner, and Renesas. Surprisingly, the Qualcomm pile was smaller than usual but that is likely because they put one SoC support inside a driver for a different SoC that is very similar. Other than all those new clk drivers there are the usual clk data updates to fix parents, frequency tables, and add missing clks along with some Kconfig changes to make compile testing simpler and even more DT binding conversions to boot. The exciting part is still the new SoC support like SpacemiT and Sophgo support though, which really dominate the diffstat because they introduce a whole new silicon vendor clk driver. New Drivers: - Camera clock controller driver for Qualcomm QCS8300 - DE (display engine) 3.3 clocks on Allwinner H616 - Samsung ExynosAutov920 CPU cluster CL0, CL1 and CL2 clock controllers - Video Output (VO) subsystem clk controller in the T-HEAD TH1520 SoC - Clock driver for Sophgo SG2044 - Clock driver for SpacemiT K1 SoC - Renesas RZ/V2N (R9A09G056) SoC clk driver Updates: - Correct data in various SoC clk drivers - Allow clkaN to be optional in the Qualcomm RPMh clock controller driver if command db doesn't define it - Change Kconfig options to not enable by default during compile testing - Add missing clks in various SoC clk drivers - Remove some duplicate clk DT bindings and convert some more to YAML" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (93 commits) clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks clk: qcom: gcc: Set FORCE_MEM_CORE_ON for gcc_ufs_axi_clk for 8650/8750 clk: qcom: rpmh: make clkaN optional clk: qcom: Add support for Camera Clock Controller on QCS8300 clk: rockchip: rk3528: add slab.h header include clk: rockchip: rk3576: add missing slab.h include clk: meson: Do not enable by default during compile testing clk: meson-g12a: add missing fclk_div2 to spicc clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz clk: rockchip: rename gate-grf clk file clk: rockchip: rename branch_muxgrf to branch_grf_mux clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support dt-bindings: allwinner: add H616 DE33 clock binding clk: samsung: correct clock summary for hsi1 block dt-bindings: clock: add SM6350 QCOM video clock bindings clk: rockchip: Pass NULL as reg pointer when registering GRF MMC clocks clk: sunxi-ng: h616: Add LVDS reset for LCD TCON dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset clk: rockchip: rk3036: mark ddrphy as critical clk: rockchip: rk3036: fix implementation of usb480m clock mux ... commit d8441523f21375b11a4593a2d89942b407bcb44f Merge: f66bc387efbee5 9883494c45a13d Author: Linus Torvalds Date: Fri May 30 08:40:25 2025 -0700 Merge tag 'f2fs-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, Matthew converted most of page operations to using folio. Beyond the work, we've applied some performance tunings such as GC and linear lookup, in addition to enhancing fault injection and sanity checks. Enhancements: - large number of folio conversions - add a control to turn on/off the linear lookup for performance - tune GC logics for zoned block device - improve fault injection and sanity checks Bug fixes: - handle error cases of memory donation - fix to correct check conditions in f2fs_cross_rename - fix to skip f2fs_balance_fs() if checkpoint is disabled - don't over-report free space or inodes in statvfs - prevent the current section from being selected as a victim during GC - fix to calculate first_zoned_segno correctly - fix to avoid inconsistence between SIT and SSA for zoned block device As usual, there are several debugging patches and clean-ups as well" * tag 'f2fs-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (195 commits) f2fs: fix to correct check conditions in f2fs_cross_rename f2fs: use d_inode(dentry) cleanup dentry->d_inode f2fs: fix to skip f2fs_balance_fs() if checkpoint is disabled f2fs: clean up to check bi_status w/ BLK_STS_OK f2fs: introduce is_{meta,node}_folio f2fs: add ckpt_valid_blocks to the section entry f2fs: add a method for calculating the remaining blocks in the current segment in LFS mode. f2fs: introduce FAULT_VMALLOC f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx f2fs: add f2fs_bug_on() in f2fs_quota_read() f2fs: add f2fs_bug_on() to detect potential bug f2fs: remove unused sbi argument from checksum functions f2fs: fix 32-bits hexademical number in fault injection doc f2fs: don't over-report free space or inodes in statvfs f2fs: return bool from __write_node_folio f2fs: simplify return value handling in f2fs_fsync_node_pages f2fs: always unlock the page in f2fs_write_single_data_page f2fs: remove wbc->for_reclaim handling f2fs: return bool from __f2fs_write_meta_folio f2fs: fix to return correct error number in f2fs_sync_node_pages() ... commit dc43f6a70b9685acabfda210f7cbb0520e952510 Author: Kent Overstreet Date: Wed May 28 11:27:59 2025 -0400 bcachefs: Mark bch_errcode helpers __attribute__((const)) These don't access global memory or defer pointer arguments - this enables CSE optimizations. Signed-off-by: Kent Overstreet commit 66621f016d792157fc661fe2cce40ab128009d79 Author: Kent Overstreet Date: Thu May 29 15:02:37 2025 -0400 bcachefs: Add missing printbuf_reset() in bch2_check_dirent_inode_dirent() We were accidentally including the contents from the previous fsck_err(). Signed-off-by: Kent Overstreet commit f1dc067bc10ac95550869dbe25dc4db1420f4f6a Author: Kent Overstreet Date: Wed May 28 01:00:34 2025 -0400 bcachefs: sysfs/errors Make the superblock error counters available in sysfs; the only other way they can be seen is 'show-super', but we don't write the superblock every time the error count gets incremented. Signed-off-by: Kent Overstreet commit ee084fa96123ede8b0563a1b5a9b23adc43cd50d Author: Tianyang Zhang Date: Fri May 30 21:45:57 2025 +0800 LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset() ERROR INFO: CPU 25 Unable to handle kernel paging request at virtual address 0x0 ... Call Trace: [<900000000023c30c>] huge_pte_offset+0x3c/0x58 [<900000000057fd4c>] hugetlb_follow_page_mask+0x74/0x438 [<900000000051fee8>] __get_user_pages+0xe0/0x4c8 [<9000000000522414>] faultin_page_range+0x84/0x380 [<9000000000564e8c>] madvise_vma_behavior+0x534/0xa48 [<900000000056689c>] do_madvise+0x1bc/0x3e8 [<9000000000566df4>] sys_madvise+0x24/0x38 [<90000000015b9e88>] do_syscall+0x78/0x98 [<9000000000221f18>] handle_syscall+0xb8/0x158 In some cases, pmd may be NULL and rely on NULL as the return value for processing, so it is necessary to determine this situation here. Cc: stable@vger.kernel.org Fixes: bd51834d1cf6 ("LoongArch: Return NULL from huge_pte_offset() for invalid PMD") Signed-off-by: Tianyang Zhang Signed-off-by: Huacai Chen commit 712e6a914328e9672d534fc77edd596234ec2d7f Author: Huacai Chen Date: Fri May 30 21:45:48 2025 +0800 LoongArch: Preserve firmware configuration when desired If we must preserve the firmware resource assignments, claim the existing resources rather than reassigning everything. According to PCI Firmware Specification: if ACPI DSM#5 function returns 0, the OS must retain the resource allocation for PCI in the firmware; if ACPI DSM#5 function returns 1, the OS can ignore the resource allocation for PCI and reallocate it. Signed-off-by: Qihang Gao Signed-off-by: Juxin Gao Signed-off-by: Huacai Chen commit 52c22661c79a7b6af7fad9f77200738fc6c51878 Author: Huacai Chen Date: Fri May 30 21:45:48 2025 +0800 LoongArch: Avoid using $r0/$r1 as "mask" for csrxchg When building kernel with LLVM there are occasionally such errors: In file included from ./include/linux/spinlock.h:59: In file included from ./include/linux/irqflags.h:17: arch/loongarch/include/asm/irqflags.h:38:3: error: must not be $r0 or $r1 38 | "csrxchg %[val], %[mask], %[reg]\n\t" | ^ :1:16: note: instantiated into assembly here 1 | csrxchg $a1, $ra, 0 | ^ To prevent the compiler from allocating $r0 or $r1 for the "mask" of the csrxchg instruction, the 'q' constraint must be used but Clang < 21 does not support it. So force to use $t0 in the inline asm, in order to avoid using $r0/$r1 while keeping the backward compatibility. Cc: stable@vger.kernel.org Link: https://github.com/llvm/llvm-project/pull/141037 Reviewed-by: Yanteng Si Suggested-by: WANG Rui Signed-off-by: Huacai Chen commit a24f2fb70cb62180486ad4d74f809ff35ddd1cf9 Author: Huacai Chen Date: Fri May 30 21:45:43 2025 +0800 LoongArch: Introduce the numa_memblks conversion Commit 87482708210ff3333a ("mm: introduce numa_memblks") has moved numa_memblks from x86 to the generic code, but LoongArch was left out of this conversion. This patch introduces the generic numa_memblks for LoongArch. In detail: 1. Enable NUMA_MEMBLKS (but disable NUMA_EMU) in Kconfig; 2. Use generic definition for numa_memblk and numa_meminfo; 3. Use generic implementation for numa_add_memblk() and its friends; 4. Use generic implementation for numa_set_distance() and its friends; 5. Use generic implementation for memory_add_physaddr_to_nid() and its friends. Note: Disable NUMA_EMU because it needs more efforts and no obvious demand now. Tested-by: Binbin Zhou Signed-off-by: Yuquan Wang Signed-off-by: Huacai Chen commit 9559d5806319a9254d9053b22a31324e1929aac6 Author: Huacai Chen Date: Fri May 30 21:45:43 2025 +0800 LoongArch: Increase max supported CPUs up to 2048 Increase max supported CPUs up to 2048, including: 1. Increase CSR.CPUID register's effective width; 2. Define MAX_CORE_PIC (a.k.a. max physical ID) to 2048; 3. Allow NR_CPUS (a.k.a. max logical ID) to be as large as 2048; 4. Introduce acpi_numa_x2apic_affinity_init() to handle ACPI SRAT for CPUID >= 256. Note: The reason of increasing to 2048 rather than 4096/8192 is because the IPI hardware can only support 2048 as a maximum. Reviewed-by: Yanteng Si Signed-off-by: Huacai Chen commit a45728fd4120011c78af1d056e571b84d47dfcc1 Author: Youling Tang Date: Fri May 30 21:45:42 2025 +0800 LoongArch: Enable HAVE_ARCH_STACKLEAK Add support for the stackleak feature. It initializes the stack with the poison value before returning from system calls which improves the kernel security. At the same time, disables the plugin in EFI stub code because EFI stub is out of scope for the protection. Tested on Loongson-3A5000 (enable GCC_PLUGIN_STACKLEAK and LKDTM): # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT # dmesg lkdtm: Performing direct entry STACKLEAK_ERASING lkdtm: stackleak stack usage: high offset: 320 bytes current: 448 bytes lowest: 1264 bytes tracked: 1264 bytes untracked: 208 bytes poisoned: 14528 bytes low offset: 64 bytes lkdtm: OK: the rest of the thread stack is properly erased Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit b37981ce540dffa64a4664ccf0e20dbef6c2c638 Author: Yuli Wang Date: Fri May 30 21:45:42 2025 +0800 LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on LoongArch, covering the vdso. Link: https://lore.kernel.org/all/25bad37f-273e-4626-999c-e1890be96182@lucifer.local/ Acked-by: Liam R. Howlett Acked-by: Lorenzo Stoakes Reviewed-by: Jeff Xu Tested-by: Yuli Wang Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen commit 93f437315660219245f99724d7597e5b2ea40df3 Author: Tianyang Zhang Date: Fri May 30 21:45:42 2025 +0800 LoongArch: Add SCHED_MC (Multi-core scheduler) support In order to achieve more reasonable load balancing behavior, add SCHED_MC (Multi-core scheduler) support. The LLC distribution of LoongArch now is consistent with NUMA node, the balancing domain of SCHED_MC can effectively reduce the situation where processes are awakened to smt_sibling. Co-developed-by: Hongliang Wang Signed-off-by: Hongliang Wang Signed-off-by: Tianyang Zhang Signed-off-by: Huacai Chen commit 980d4a42d595a00be2cec6a39ae3bfa6011ffcb3 Author: Youling Tang Date: Fri May 30 21:45:42 2025 +0800 LoongArch: Add some annotations in archhelp - Add annotations to the kernel image. - Modify the annotations of make insatll. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 75cffd392bfabc30ee88836887ea5439ec3b8089 Author: Youling Tang Date: Fri May 30 21:45:42 2025 +0800 LoongArch: Using generic scripts/install.sh in `make install` Use the generic script/install.sh to perform the make install operation. This will automatically generate the initrd file and modify the grub.cfg without manual intervention (The previous kernel image, config file and System.map will also be generated), similar to other architectures. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit a96c7330da0b4cc64c6f79044d03f52532bdfc5b Author: Youling Tang Date: Fri May 30 21:45:33 2025 +0800 LoongArch: Add a default install.sh As specified in scripts/install.sh, the priority order is as follows (from highest to lowest): ~/bin/installkernel /sbin/installkernel arch/loongarch/boot/install.sh Fallback to default install.sh if installkernel is not found. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit c006d5d691481acebb34f49b4017dd536e906a2e Merge: 0ff41df1cb268f 8278fd6006a02e Author: Huacai Chen Date: Fri May 30 21:38:40 2025 +0800 Merge commit 'core-entry-2025-05-25' into loongarch-next LoongArch architecture changes for 6.16 modify some same files with the core-entry changes, so merge them to create a base to resolve conflicts. commit b9802b54d41bbe98f673e08bc148b0c563fdc02e Author: Huacai Chen Date: Fri May 30 12:16:58 2025 +0800 asm-generic: Add sched.h inclusion in simd.h Commit 7ba8df47810f073 ("asm-generic: Make simd.h more resilient") causes a build error for PREEMPT_RT kernels: CC lib/crypto/sha256.o In file included from ./include/asm-generic/simd.h:6, from ./arch/loongarch/include/generated/asm/simd.h:1, from ./include/crypto/internal/simd.h:9, from ./include/crypto/internal/sha2.h:6, from lib/crypto/sha256.c:15: ./include/asm-generic/simd.h: In function 'may_use_simd': ./include/linux/preempt.h:111:34: error: 'current' undeclared (first use in this function) 111 | # define softirq_count() (current->softirq_disable_cnt & SOFTIRQ_MASK) | ^~~~~~~ ./include/linux/preempt.h:112:82: note: in expansion of macro 'softirq_count' 112 | # define irq_count() ((preempt_count() & (NMI_MASK | HARDIRQ_MASK)) | softirq_count()) | ^~~~~~~~~~~~~ ./include/linux/preempt.h:143:34: note: in expansion of macro 'irq_count' 143 | #define in_interrupt() (irq_count()) | ^~~~~~~~~ ./include/asm-generic/simd.h:18:17: note: in expansion of macro 'in_interrupt' 18 | return !in_interrupt(); | ^~~~~~~~~~~~ So add sched.h inclusion in simd.h to fix it. Fixes: 7ba8df47810f073 ("asm-generic: Make simd.h more resilient") Signed-off-by: Huacai Chen Signed-off-by: Herbert Xu commit cddded9803cd6c4f53432cc64377d34522aa11c9 Author: Eric Biggers Date: Thu May 29 11:59:13 2025 -0700 crypto: s390/sha256 - rename module to sha256-s390 When the s390 SHA-256 code is built as a loadable module, name it sha256-s390.ko instead of sha256.ko. This avoids a module name collision with crypto/sha256.ko and makes it consistent with the other architectures. We should consider making a single module provide all the SHA-256 library code, which would prevent issues like this. But for now this is the fix that's needed. Fixes: b9eac03edcf8 ("crypto: s390/sha256 - implement library instead of shash") Reported-by: Alex Williamson Closes: https://lore.kernel.org/r/20250529110526.6d2959a9.alex.williamson@redhat.com/ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5a0c749125c001cba673e9951b0002fba7ea2886 Author: Randy Dunlap Date: Wed May 28 20:20:05 2025 -0700 MIPS: loongson2ef: lemote-2f: add missing function prototypes Add several missing function prototypes for lemote-2f to eliminate build warnings: arch/mips/loongson2ef/lemote-2f/machtype.c:10:13: warning: no previous prototype for 'mach_prom_init_machtype' [-Wmissing-prototypes] 10 | void __init mach_prom_init_machtype(void) arch/mips/loongson2ef/common/machtype.c:34:20: warning: no previous prototype for 'mach_prom_init_machtype' [-Wmissing-prototypes] 34 | void __weak __init mach_prom_init_machtype(void) arch/mips/loongson2ef/lemote-2f/pm.c:52:6: warning: no previous prototype for 'setup_wakeup_events' [-Wmissing-prototypes] 52 | void setup_wakeup_events(void) arch/mips/loongson2ef/lemote-2f/pm.c:90:5: warning: no previous prototype for 'wakeup_loongson' [-Wmissing-prototypes] 90 | int wakeup_loongson(void) arch/mips/loongson2ef/lemote-2f/pm.c:137:13: warning: no previous prototype for 'mach_suspend' [-Wmissing-prototypes] 137 | void __weak mach_suspend(void) arch/mips/loongson2ef/lemote-2f/pm.c:142:13: warning: no previous prototype for 'mach_resume' [-Wmissing-prototypes] 142 | void __weak mach_resume(void) Signed-off-by: Randy Dunlap Cc: Jiaxun Yang Cc: linux-mips@vger.kernel.org Cc: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer commit 314da9d6b3119328c1a38234c68e720380d14957 Author: Randy Dunlap Date: Wed May 28 20:19:56 2025 -0700 MIPS: loongson2ef: cs5536: add missing function prototypes Add missing function prototypes for cs5536, mostly for PCI functions, and for init_mfgpt_clocksource(). arch/mips/loongson2ef/common/cs5536/cs5536_ide.c:15:6: warning: no previous prototype for 'pci_ide_write_reg' [-Wmissing-prototypes] 15 | void pci_ide_write_reg(int reg, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_ide.c:96:5: warning: no previous prototype for 'pci_ide_read_reg' [-Wmissing-prototypes] 96 | u32 pci_ide_read_reg(int reg) arch/mips/loongson2ef/common/cs5536/cs5536_ehci.c:15:6: warning: no previous prototype for 'pci_ehci_write_reg' [-Wmissing-prototypes] 15 | void pci_ehci_write_reg(int reg, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_ehci.c:75:5: warning: no previous prototype for 'pci_ehci_read_reg' [-Wmissing-prototypes] 75 | u32 pci_ehci_read_reg(int reg) arch/mips/loongson2ef/common/cs5536/cs5536_acc.c:15:6: warning: no previous prototype for 'pci_acc_write_reg' [-Wmissing-prototypes] 15 | void pci_acc_write_reg(int reg, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_acc.c:62:5: warning: no previous prototype for 'pci_acc_read_reg' [-Wmissing-prototypes] 62 | u32 pci_acc_read_reg(int reg) arch/mips/loongson2ef/common/cs5536/cs5536_ohci.c:15:6: warning: no previous prototype for 'pci_ohci_write_reg' [-Wmissing-prototypes] 15 | void pci_ohci_write_reg(int reg, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_ohci.c:70:5: warning: no previous prototype for 'pci_ohci_read_reg' [-Wmissing-prototypes] 70 | u32 pci_ohci_read_reg(int reg) arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:84:6: warning: no previous prototype for 'pci_isa_write_bar' [-Wmissing-prototypes] 84 | void pci_isa_write_bar(int n, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:110:5: warning: no previous prototype for 'pci_isa_read_bar' [-Wmissing-prototypes] 110 | u32 pci_isa_read_bar(int n) arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:134:6: warning: no previous prototype for 'pci_isa_write_reg' [-Wmissing-prototypes] 134 | void pci_isa_write_reg(int reg, u32 value) arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:228:5: warning: no previous prototype for 'pci_isa_read_reg' [-Wmissing-prototypes] 228 | u32 pci_isa_read_reg(int reg) arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c:195:12: warning: no previous prototype for 'init_mfgpt_clocksource' [-Wmissing-prototypes] 195 | int __init init_mfgpt_clocksource(void) Signed-off-by: Randy Dunlap Cc: Jiaxun Yang Cc: linux-mips@vger.kernel.org Cc: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer commit d3faab9b5a6a0477d69c38bd11c43aa5e936f929 Author: Oliver Neukum Date: Wed May 28 13:03:54 2025 +0200 net: usb: aqc111: debug info before sanitation If we sanitize error returns, the debug statements need to come before that so that we don't lose information. Signed-off-by: Oliver Neukum Fixes: 405b0d610745 ("net: usb: aqc111: fix error handling of usbnet read calls") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f4d22ac96a45afb44545189a4807ccec5bc8f945 Merge: 39d86db34e41b9 01bf468c4e086b Author: Jens Axboe Date: Fri May 30 04:42:53 2025 -0600 Merge tag 'md-6.16-20250530' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.16 Pull MD fixes from Yu: "- fix REQ_RAHEAD and REQ_NOWAIT IO err handling for raid1/10 - fix max_write_behind setting for dm-raid - some minor cleanups" * tag 'md-6.16-20250530' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/md-bitmap: remove parameter slot from bitmap_create() md/md-bitmap: cleanup bitmap_ops->startwrite() md/dm-raid: remove max_write_behind setting limit md/md-bitmap: fix dm-raid max_write_behind setting md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT commit 3d6d84c8f2f66d3fd6a43a1e2ce8e6b54c573960 Author: Álvaro Fernández Rojas Date: Thu May 29 15:09:15 2025 +0200 spi: bcm63xx-hsspi: fix shared reset Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive. Fixes: 0eeadddbf09a ("spi: bcm63xx-hsspi: add reset support") Reported-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250529130915.2519590-3-noltari@gmail.com Signed-off-by: Mark Brown commit 5ad20e3d8cfe3b2e42bbddc7e0ebaa74479bb589 Author: Álvaro Fernández Rojas Date: Thu May 29 15:09:14 2025 +0200 spi: bcm63xx-spi: fix shared reset Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive. Fixes: 38807adeaf1e ("spi: bcm63xx-spi: add reset support") Reported-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250529130915.2519590-2-noltari@gmail.com Signed-off-by: Mark Brown commit 4d62121ce9b58ea23c8d62207cbc604e98ecdc0a Author: Marc Zyngier Date: Fri May 30 10:16:47 2025 +0100 KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer Dan reports that iterating over a device ITEs can legitimately lead to a NULL pointer, and that the NULL check is placed *after* the pointer has already been dereferenced. Hoist the pointer check as early as possible and be done with it. Reported-by: Dan Carpenter Fixes: 30deb51a677b ("KVM: arm64: vgic-its: Add debugfs interface to expose ITS tables") Link: https://lore.kernel.org/r/aDBylI1YnjPatAbr@stanley.mountain Cc: Jing Zhang Link: https://lore.kernel.org/r/20250530091647.1152489-1-maz@kernel.org Signed-off-by: Marc Zyngier commit 07212d16adc7a02810e1641c2721762751ce4f88 Author: Oliver Upton Date: Fri May 23 12:47:22 2025 -0700 KVM: arm64: vgic-init: Plug vCPU vs. VGIC creation race syzkaller has found another ugly race in the VGIC, this time dealing with VGIC creation. Since kvm_vgic_create() doesn't sufficiently protect against in-flight vCPU creations, it is possible to get a vCPU into the kernel w/ an in-kernel VGIC but no allocation of private IRQs: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000d20 Mem abort info: ESR = 0x0000000096000046 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000046, ISS2 = 0x00000000 CM = 0, WnR = 1, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=0000000103e4f000 [0000000000000d20] pgd=0800000102e1c403, p4d=0800000102e1c403, pud=0800000101146403, pmd=0000000000000000 Internal error: Oops: 0000000096000046 [#1] PREEMPT SMP CPU: 9 UID: 0 PID: 246 Comm: test Not tainted 6.14.0-rc6-00097-g0c90821f5db8 #16 Hardware name: linux,dummy-virt (DT) pstate: 814020c5 (Nzcv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : _raw_spin_lock_irqsave+0x34/0x8c lr : kvm_vgic_set_owner+0x54/0xa4 sp : ffff80008086ba20 x29: ffff80008086ba20 x28: ffff0000c19b5640 x27: 0000000000000000 x26: 0000000000000000 x25: ffff0000c4879bd0 x24: 000000000000001e x23: 0000000000000000 x22: 0000000000000000 x21: ffff0000c487af80 x20: ffff0000c487af18 x19: 0000000000000000 x18: 0000001afadd5a8b x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000001 x14: ffff0000c19b56c0 x13: 0030c9adf9d9889e x12: ffffc263710e1908 x11: 0000001afb0d74f2 x10: e0966b840b373664 x9 : ec806bf7d6a57cd5 x8 : ffff80008086b980 x7 : 0000000000000001 x6 : 0000000000000001 x5 : 0000000080800054 x4 : 4ec4ec4ec4ec4ec5 x3 : 0000000000000000 x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000d20 Call trace: _raw_spin_lock_irqsave+0x34/0x8c (P) kvm_vgic_set_owner+0x54/0xa4 kvm_timer_enable+0xf4/0x274 kvm_arch_vcpu_run_pid_change+0xe0/0x380 kvm_vcpu_ioctl+0x93c/0x9e0 __arm64_sys_ioctl+0xb4/0xec invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x30/0xd0 el0t_64_sync_handler+0x10c/0x138 el0t_64_sync+0x198/0x19c Code: b9000841 d503201f 52800001 52800022 (88e17c02) ---[ end trace 0000000000000000 ]--- Plug the race by explicitly checking for an in-progress vCPU creation and failing kvm_vgic_create() when that's the case. Add some comments to document all the things kvm_vgic_create() is trying to guard against too. Reported-by: Alexander Potapenko Signed-off-by: Oliver Upton Tested-by: Alexander Potapenko Link: https://lore.kernel.org/r/20250523194722.4066715-6-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit 4bf3693d36af9768c9bcc1df3a12d00ad6ea8083 Author: Oliver Upton Date: Fri May 23 12:47:21 2025 -0700 KVM: arm64: Unmap vLPIs affected by changes to GSI routing information KVM's interrupt infrastructure is dodgy at best, allowing for some ugly 'off label' usage of the various UAPIs. In one example, userspace can change the routing entry of a particular "GSI" after configuring irqbypass with KVM_IRQFD. KVM/arm64 is oblivious to this, and winds up preserving the stale translation in cases where vLPIs are configured. Honor userspace's intentions and tear down the vLPI mapping if affected by a "GSI" routing change. Make no attempt to reconstruct vLPIs if the new target is an MSI and just fall back to software injection. Tested-by: Sweet Tea Dorminy Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250523194722.4066715-5-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit 05b9405f2fa1848e984f231708fa1e5d385e4d27 Author: Oliver Upton Date: Fri May 23 12:47:20 2025 -0700 KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding() The virtual mapping and "GSI" routing of a particular vLPI is subject to change in response to the guest / userspace. This can be pretty annoying to deal with when KVM needs to track the physical state that's managed for vLPI direct injection. Make vgic_v4_unset_forwarding() resilient by using the host IRQ to resolve the vgic IRQ. Since this uses the LPI xarray directly, finding the ITS by doorbell address + grabbing it's its_lock is no longer necessary. Note that matching the right ITS / ITE is already handled in vgic_v4_set_forwarding(), and unless there's a bug in KVM's VGIC ITS emulation the virtual mapping that should remain stable for the lifetime of the vLPI mapping. Tested-by: Sweet Tea Dorminy Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250523194722.4066715-4-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit fc4dafe87b93ec94204896c4bc8cad7e71bdd151 Author: Oliver Upton Date: Fri May 23 12:47:19 2025 -0700 KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock Though undocumented, KVM generally protects the translation of a vLPI with the its_lock. While this makes perfectly good sense, as the ITS itself contains the guest translation, an upcoming change will require twiddling the vLPI mapping in an atomic context. Switch to using the vIRQ's irq_lock to protect the translation. Use of the its_lock in vgic_v4_unset_forwarding() is preserved for now as it still needs to walk the ITS. Tested-by: Sweet Tea Dorminy Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250523194722.4066715-3-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit 761aabe76e6b1eb8850e72141cb026c7057e46fd Author: Oliver Upton Date: Fri May 23 12:47:18 2025 -0700 KVM: arm64: Use lock guard in vgic_v4_set_forwarding() The locking dance is about to get more interesting, switch the its_lock over to a lock guard to make it a bit easier to handle. Tested-by: Sweet Tea Dorminy Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250523194722.4066715-2-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit 667304740537e546dac676be9eb81cee41d2ebdd Author: Marc Zyngier Date: Sun May 25 18:57:59 2025 +0100 KVM: arm64: Mask out non-VA bits from TLBI VA* on VNCR invalidation When handling a TLBI VA* instruction that potentially targets a VNCR page mapping, we fail to mask out the top bits that contain the ASID and TTL fields, hence potentially failing the VA check in the TLB code. An additional wrinkle is that we fail to sign extend the VA, again leading to failed VA checks. Fix both in one go by sign-extending the VA from bit 48, making it comparable to the way we interpret VNCR_EL2.BADDR. Fixes: 4ffa72ad8f37e ("KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2") Link: https://lore.kernel.org/r/20250525175759.780891-1-maz@kernel.org Signed-off-by: Marc Zyngier commit 94d889713d8b8e3bb78e19a1bbe76e36e34e8113 Author: Marc Zyngier Date: Fri May 23 18:02:08 2025 +0100 arm64: sysreg: Drag linux/kconfig.h to work around vdso build issue Broonie reports that fed55f49fad18 ("arm64: errata: Work around AmpereOne's erratum AC04_CPU_23") breaks one of the vdso selftests (vdso_test_chacha) as it indirectly drags asm/sysreg.h. It is rather unfortunate (and worrying) that userspace gets built with non-UAPI headers. In any case, paper over the issue by dragging linux/kconfig.h in asm/sysreg.h. It is the right thing to do, at least from the kernel perspective. Reported-by: Mark Brown Fixes: fed55f49fad18 ("arm64: errata: Work around AmpereOne's erratum AC04_CPU_23") Link: https://lore.kernel.org/r/aDCDGZ-G-nCP3hJI@finisterre.sirena.org.uk Cc: D Scott Phillips Cc: Catalin Marinas Cc: Oliver Upton Cc: Will Deacon Reviewed-by: Oliver Upton Acked-by: Will Deacon Link: https://lore.kernel.org/r/20250523170208.530818-1-maz@kernel.org Signed-off-by: Marc Zyngier commit 01bf468c4e086b2f52a0c9dfa677c6016fc915ae Author: Yu Kuai Date: Sat May 24 14:13:02 2025 +0800 md/md-bitmap: remove parameter slot from bitmap_create() All callers pass in '-1' for 'slot', hence it can be removed. Link: https://lore.kernel.org/linux-raid/20250524061320.370630-6-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Xiao Ni Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke commit 38f520a37d541a52ce16437a379824fabcd768da Author: Yu Kuai Date: Sat May 24 14:13:00 2025 +0800 md/md-bitmap: cleanup bitmap_ops->startwrite() bitmap_startwrite() always return 0, and the caller doesn't check return value as well, hence change the method to void. Also rename startwrite/endwrite to start_write/end_write, which is more in line with the usual naming convention. Link: https://lore.kernel.org/linux-raid/20250524061320.370630-4-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke commit b886475804230cad8075e1ed8c7fb2333f7c41c1 Author: Yu Kuai Date: Sat May 24 14:13:11 2025 +0800 md/dm-raid: remove max_write_behind setting limit The comments said 'vaule in kB', while the value actually means the number of write_behind IOs. And since md-bitmap will automatically adjust the value to max COUNTER_MAX / 2, there is no need to fail early. Also move some macros that is only used md-bitmap.c. Link: https://lore.kernel.org/linux-raid/20250524061320.370630-15-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Xiao Ni commit 2afe17794cfed5f80295b1b9facd66e6f65e5002 Author: Yu Kuai Date: Sat May 24 14:13:10 2025 +0800 md/md-bitmap: fix dm-raid max_write_behind setting It's supposed to be COUNTER_MAX / 2, not COUNTER_MAX. Link: https://lore.kernel.org/linux-raid/20250524061320.370630-14-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke commit 9f346f7d4ea73692b82f5102ca8698e4040469ea Author: Yu Kuai Date: Tue May 27 16:14:07 2025 +0800 md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT IO with REQ_RAHEAD or REQ_NOWAIT can fail early, even if the storage medium is fine, hence record badblocks or remove the disk from array does not make sense. This problem if found by lvm2 test lvcreate-large-raid, where dm-zero will fail read ahead IO directly. Fixes: e879a0d9cb08 ("md/raid1,raid10: don't ignore IO flags") Reported-and-tested-by: Mikulas Patocka Closes: https://lore.kernel.org/all/34fa755d-62c8-4588-8ee1-33cb1249bdf2@redhat.com/ Link: https://lore.kernel.org/linux-raid/20250527081407.3004055-1-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai commit 3f07353e2fd3e154921e539044b26e85ca910dbe Merge: 4c2cebc2e87d72 f62bb41740462b Author: Arnd Bergmann Date: Fri May 30 09:10:42 2025 +0200 Merge tag 'renesas-dts-for-v6.16-tag5' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.16 (take five) - Reduce I2C2 clock frequency on the RZ/G3E SMARC SoM. * tag 'renesas-dts-for-v6.16-tag5' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: rzg3e-smarc-som: Reduce I2C2 clock frequency Link: https://lore.kernel.org/r/cover.1748355530.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4c2cebc2e87d72857a66c121adb5ba1f72e3111f Author: Sven Peter Date: Thu May 29 00:17:18 2025 +0200 MAINTAINERS, mailmap: update Sven Peter's email address Update my mail address to my new @kernel.org one and also add a mailmap entry to make sure everything gets sent there for easier filtering. Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250528221718.45204-1-sven@kernel.org Signed-off-by: Arnd Bergmann commit 5402c4d4d2000a9baa30c1157c97152ec6383733 Author: Amir Goldstein Date: Sun May 25 12:47:31 2025 +0200 exportfs: require ->fh_to_parent() to encode connectable file handles When user requests a connectable file handle explicitly with the AT_HANDLE_CONNECTABLE flag, fail the request if filesystem (e.g. nfs) does not know how to decode a connected non-dir dentry. Fixes: c374196b2b9f ("fs: name_to_handle_at() support for "explicit connectable" file handles") Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250525104731.1461704-1-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 66b7c51ceb9f08e7dfb6b25e811b5b791100eda8 Author: Kent Overstreet Date: Tue May 27 20:51:00 2025 -0400 bcachefs: bch2_check_fix_ptrs() can now repair btree roots This is straightforward enough: check_fix_ptrs() currently only runs before we go RW, so updating the btree root pointer in c->btree_roots suffices - it'll be written out in the first journal write we do. For that, do_bch2_trans_commit_to_journal_replay() now handles JSET_ENTRY_btree_root entries. Signed-off-by: Kent Overstreet commit a7c9add482c7b0e7e28433816fa9e8f7b890086e Author: Kent Overstreet Date: Tue May 27 14:39:43 2025 -0400 bcachefs: Include b->ob.nr in cached_btree_node_to_text() We have a bug report that looks like we might be leaking open buckets - let's check if they got left attached to the cached btree node. Signed-off-by: Kent Overstreet commit e87de7d4918bd43901685dd1dd5620fc1aafd0aa Author: Kent Overstreet Date: Mon May 26 17:03:48 2025 -0400 bcachefs: Move devs_sorted to alloc_request More stack usage work. Signed-off-by: Kent Overstreet commit ff6369da9ac366f4a18735902ab8f50f5690ee83 Author: Kent Overstreet Date: Mon May 26 17:15:11 2025 -0400 bcachefs: reduce stack usage in alloc_sectors_start() with typical config options, variables in different inline functions aren't sharing stack space - and these are slowpaths. Signed-off-by: Kent Overstreet commit eabef52ff881e91f41c7bd6696c9355d12fc00c2 Author: Kent Overstreet Date: Mon May 26 14:24:19 2025 -0400 bcachefs: bch2_alloc_v4_to_text() Specialize the .to_text() for alloc_v4, to avoid the temporary on the stack for conversion from old versions. Signed-off-by: Kent Overstreet commit 0c34e7ff69036ffcb006ee86fd0143f3620dd491 Author: Kent Overstreet Date: Mon May 26 13:26:10 2025 -0400 bcachefs: Tweak bch2_data_update_init() for stack usage - Separate out a slowpath for bkey_nocow_lock() - Don't call bch2_bkey_ptrs_c() or loop over pointers more than necessary Signed-off-by: Kent Overstreet commit 56e5c7f65f582d60e900f356f0dff542b90630b1 Author: Kent Overstreet Date: Mon May 26 14:15:28 2025 -0400 bcachefs: kill replicas_sectors arg to __trigger_extent() Signed-off-by: Kent Overstreet commit 92caf17189a5b32bb9349a7a1f329cdd5fa51eb4 Author: Kent Overstreet Date: Mon May 26 16:16:17 2025 -0400 bcachefs: Don't stack allocate bch_writepage_state Signed-off-by: Kent Overstreet commit cd831a9494524726babf835434da1438bcff6f45 Author: Kent Overstreet Date: Mon May 26 16:29:56 2025 -0400 bcachefs: factor out break_cycle_fail() More stack usage work. Signed-off-by: Kent Overstreet commit 19c0a8aa8ae302a3b038283c7d7eee0371ae3bf5 Author: Kent Overstreet Date: Mon May 26 12:48:19 2025 -0400 bcachefs: btree_node_missing_err() Factor out an error path for a small stack usage improvement. Signed-off-by: Kent Overstreet commit 0d25264ecfa3868c9308684fe344da1eb2f4502c Author: Kent Overstreet Date: Sun May 25 17:56:45 2025 -0400 bcachefs: Kill bkey_buf in btree_path_down() Allocate some (smaller) temporary storage in btree_trans for this - btree_path_down() is in our max-stack call stack. Signed-off-by: Kent Overstreet commit 99813d88e371c3a60d65810125b8d1568364f254 Author: Kent Overstreet Date: Tue May 27 20:37:21 2025 -0400 bcachefs: Add missing error logging in delete_dead_inodes() Signed-off-by: Kent Overstreet commit f54b2a80d0df06f8c13cbd102ca9dc2c6a578c5c Author: Kent Overstreet Date: Tue May 27 22:06:04 2025 -0400 bcachefs: Fix misaligned bucket check in journal space calculations Fix an assertion pop in the tiering_misaligned test: rounding down to bucket size at the end of the journal space calculations leaves cur_entry_sectors == 0, which is incorrect with !cur_entry_err. Signed-off-by: Kent Overstreet commit 813825d24135aa3109cf7746ce11f1ec2ab901fd Author: Kent Overstreet Date: Tue May 27 20:37:50 2025 -0400 bcachefs: Fix incorrect multiple dev check in journal write path It's uncomon to have multiple devices with journalling only on a subset, but can be specified with the 'data_allowed' option. We need to know if we're doing data/metadata writes to multiple devices, as that requires issuing flushes before the journal writes. Signed-off-by: Kent Overstreet commit 327971cef509c6380ed4bd8587fad26ceb2ab90b Author: Kent Overstreet Date: Tue May 27 21:45:56 2025 -0400 bcachefs: Catch data_update_done events in trace_io_move_start_fail Signed-off-by: Kent Overstreet commit c7897b5055df20e954c269897052c9397e0fff1a Author: Kent Overstreet Date: Tue May 27 21:54:22 2025 -0400 bcachefs: io_move_evacuate_bucket tracepoint, counter Signed-off-by: Kent Overstreet commit 060ff4b794748ef5d290c9b58075453ed4eac59d Author: Kent Overstreet Date: Mon May 26 23:00:21 2025 -0400 bcachefs: trace_io_move_pred Signed-off-by: Kent Overstreet commit d6efd42a8450c67d283dbaacd127dcccca858f51 Author: Kent Overstreet Date: Sun May 25 17:04:11 2025 -0400 bcachefs: Fix infinite loop in journal_entry_btree_keys_to_text() Fix an infinite loop when bkey_i->k.u64s is 0. This only happens in userspace, where 'bcachefs list_journal' can print the entire contents of the journal, and non-dirty entries aren't validated. Signed-off-by: Kent Overstreet commit cd04497b10e6178a7510329465d05788b906ce5f Author: Kent Overstreet Date: Mon May 26 12:21:57 2025 -0400 bcachefs: Journal read error message improvements - Don't print a checksum error when we first read a journal entry: we print a checksum error later if we'll be using the journal entry. - Continuing with the theme of of improving error messages and grouping errors into a single log message per error, print a single 'checksum error' message per journal entry, and use bch2_journal_ptr_to_text() to print out where on the device it was. - Factor out checksum error messages and checking for missing journal entries into helpers, bch2_journal_read() has gotten obnoxiously big. Signed-off-by: Kent Overstreet commit f66bc387efbee59978e076ce9bf123ac353b389c Merge: 35360498220603 fd2963e729ed69 Author: Linus Torvalds Date: Thu May 29 22:17:52 2025 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Updates to the usual drivers (smartpqi, ufs, lpfc, scsi_debug, target, hisi_sas) with the only substantive core change being the removal of the stream_status member from the scsi_stream_status_header (to get rid of flex array members)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (77 commits) scsi: target: core: Constify struct target_opcode_descriptor scsi: target: core: Constify enabled() in struct target_opcode_descriptor scsi: hisi_sas: Fix warning detected by sparse scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer scsi: sg: Remove unnecessary NULL check before unregister_sysctl_table() scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort() scsi: ufs: qcom: dt-bindings: Document the SM8750 UFS Controller scsi: mvsas: Fix typos in SAS/SATA VSP register comments scsi: fnic: Replace memset() with eth_zero_addr() scsi: ufs: core: Support updating device command timeout scsi: ufs: core: Change hwq_id type and value scsi: ufs: core: Increase the UIC command timeout further scsi: zfcp: Simplify workqueue allocation scsi: ufs: core: Print error value as hex format in ufshcd_err_handler() scsi: sd: Remove the stream_status member from scsi_stream_status_header scsi: docs: Clean up some style in scsi_mid_low_api scsi: core: Remove unused scsi_dev_info_list_del_keyed() scsi: isci: Remove unused sci_remote_device_reset() scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH scsi: smartpqi: Delete a stray tab in pqi_is_parity_write_stream() ... commit 21fae34a27dd67612b865e377149c7e663a41fa9 Merge: dd59137bfe70cf 946026ba4293a1 Author: Christian Brauner Date: Fri May 30 07:12:08 2025 +0200 Merge patch series "rust: file: mark `LocalFile` as `repr(transparent)`" Mark files as repr(transparent) to ensure identical layout between C and Rust. * patches from https://lore.kernel.org/20250527204636.12573-1-pekkarr@protonmail.com: rust: file: improve safety comments rust: file: mark `LocalFile` as `repr(transparent)` Link: https://lore.kernel.org/20250527204636.12573-1-pekkarr@protonmail.com Signed-off-by: Christian Brauner commit 946026ba4293a14970b4b0b72f5f0cbb698ad77e Author: Pekka Ristola Date: Tue May 27 20:48:59 2025 +0000 rust: file: improve safety comments Some of the safety comments in `LocalFile`'s methods incorrectly refer to the `File` type instead of `LocalFile`, so fix them to use the correct type. Also add missing Markdown code spans around lifetimes in the safety comments, i.e. change 'a to `'a`. Link: https://github.com/Rust-for-Linux/linux/issues/1165 Signed-off-by: Pekka Ristola Link: https://lore.kernel.org/20250527204636.12573-2-pekkarr@protonmail.com Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Signed-off-by: Christian Brauner commit 15ecd83dc06277385ad71dc7ea26911d9a79acaf Author: Pekka Ristola Date: Tue May 27 20:48:55 2025 +0000 rust: file: mark `LocalFile` as `repr(transparent)` Unsafe code in `LocalFile`'s methods assumes that the type has the same layout as the inner `bindings::file`. This is not guaranteed by the default struct representation in Rust, but requires specifying the `transparent` representation. The `File` struct (which also wraps `bindings::file`) is already marked as `repr(transparent)`, so this change makes their layouts equivalent. Fixes: 851849824bb5 ("rust: file: add Rust abstraction for `struct file`") Closes: https://github.com/Rust-for-Linux/linux/issues/1165 Signed-off-by: Pekka Ristola Link: https://lore.kernel.org/20250527204636.12573-1-pekkarr@protonmail.com Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Signed-off-by: Christian Brauner commit dd59137bfe70cf3646021b4721e430213b9c71bd Author: Alistair Popple Date: Fri May 23 14:37:49 2025 +1000 fs/dax: Fix "don't skip locked entries when scanning entries" Commit 6be3e21d25ca ("fs/dax: don't skip locked entries when scanning entries") introduced a new function, wait_entry_unlocked_exclusive(), which waits for the current entry to become unlocked without advancing the XArray iterator state. Waiting for the entry to become unlocked requires dropping the XArray lock. This requires calling xas_pause() prior to dropping the lock which leaves the xas in a suitable state for the next iteration. However this has the side-effect of advancing the xas state to the next index. Normally this isn't an issue because xas_for_each() contains code to detect this state and thus avoid advancing the index a second time on the next loop iteration. However both callers of and wait_entry_unlocked_exclusive() itself subsequently use the xas state to reload the entry. As xas_pause() updated the state to the next index this will cause the current entry which is being waited on to be skipped. This caused the following warning to fire intermittently when running xftest generic/068 on an XFS filesystem with FS DAX enabled: [ 35.067397] ------------[ cut here ]------------ [ 35.068229] WARNING: CPU: 21 PID: 1640 at mm/truncate.c:89 truncate_folio_batch_exceptionals+0xd8/0x1e0 [ 35.069717] Modules linked in: nd_pmem dax_pmem nd_btt nd_e820 libnvdimm [ 35.071006] CPU: 21 UID: 0 PID: 1640 Comm: fstest Not tainted 6.15.0-rc7+ #77 PREEMPT(voluntary) [ 35.072613] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/204 [ 35.074845] RIP: 0010:truncate_folio_batch_exceptionals+0xd8/0x1e0 [ 35.075962] Code: a1 00 00 00 f6 47 0d 20 0f 84 97 00 00 00 4c 63 e8 41 39 c4 7f 0b eb 61 49 83 c5 01 45 39 ec 7e 58 42 f68 [ 35.079522] RSP: 0018:ffffb04e426c7850 EFLAGS: 00010202 [ 35.080359] RAX: 0000000000000000 RBX: ffff9d21e3481908 RCX: ffffb04e426c77f4 [ 35.081477] RDX: ffffb04e426c79e8 RSI: ffffb04e426c79e0 RDI: ffff9d21e34816e8 [ 35.082590] RBP: ffffb04e426c79e0 R08: 0000000000000001 R09: 0000000000000003 [ 35.083733] R10: 0000000000000000 R11: 822b53c0f7a49868 R12: 000000000000001f [ 35.084850] R13: 0000000000000000 R14: ffffb04e426c78e8 R15: fffffffffffffffe [ 35.085953] FS: 00007f9134c87740(0000) GS:ffff9d22abba0000(0000) knlGS:0000000000000000 [ 35.087346] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 35.088244] CR2: 00007f9134c86000 CR3: 000000040afff000 CR4: 00000000000006f0 [ 35.089354] Call Trace: [ 35.089749] [ 35.090168] truncate_inode_pages_range+0xfc/0x4d0 [ 35.091078] truncate_pagecache+0x47/0x60 [ 35.091735] xfs_setattr_size+0xc7/0x3e0 [ 35.092648] xfs_vn_setattr+0x1ea/0x270 [ 35.093437] notify_change+0x1f4/0x510 [ 35.094219] ? do_truncate+0x97/0xe0 [ 35.094879] do_truncate+0x97/0xe0 [ 35.095640] path_openat+0xabd/0xca0 [ 35.096278] do_filp_open+0xd7/0x190 [ 35.096860] do_sys_openat2+0x8a/0xe0 [ 35.097459] __x64_sys_openat+0x6d/0xa0 [ 35.098076] do_syscall_64+0xbb/0x1d0 [ 35.098647] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 35.099444] RIP: 0033:0x7f9134d81fc1 [ 35.100033] Code: 75 57 89 f0 25 00 00 41 00 3d 00 00 41 00 74 49 80 3d 2a 26 0e 00 00 74 6d 89 da 48 89 ee bf 9c ff ff ff5 [ 35.102993] RSP: 002b:00007ffcd41e0d10 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 [ 35.104263] RAX: ffffffffffffffda RBX: 0000000000000242 RCX: 00007f9134d81fc1 [ 35.105452] RDX: 0000000000000242 RSI: 00007ffcd41e1200 RDI: 00000000ffffff9c [ 35.106663] RBP: 00007ffcd41e1200 R08: 0000000000000000 R09: 0000000000000064 [ 35.107923] R10: 00000000000001a4 R11: 0000000000000202 R12: 0000000000000066 [ 35.109112] R13: 0000000000100000 R14: 0000000000100000 R15: 0000000000000400 [ 35.110357] [ 35.110769] irq event stamp: 8415587 [ 35.111486] hardirqs last enabled at (8415599): [] __up_console_sem+0x52/0x60 [ 35.113067] hardirqs last disabled at (8415610): [] __up_console_sem+0x37/0x60 [ 35.114575] softirqs last enabled at (8415300): [] handle_softirqs+0x315/0x3f0 [ 35.115933] softirqs last disabled at (8415291): [] __irq_exit_rcu+0xa1/0xc0 [ 35.117316] ---[ end trace 0000000000000000 ]--- Fix this by using xas_reset() instead, which is equivalent in implementation to xas_pause() but does not advance the XArray state. Fixes: 6be3e21d25ca ("fs/dax: don't skip locked entries when scanning entries") Signed-off-by: Alistair Popple Link: https://lore.kernel.org/20250523043749.1460780-1-apopple@nvidia.com Reviewed-by: Dan Williams Reviewed-by: Jan Kara Cc: Dan Williams Cc: Alison Schofield Cc: "Matthew Wilcow (Oracle)" Cc: Balbir Singh Cc: "Darrick J. Wong" Cc: Dave Chinner Cc: David Hildenbrand Cc: Jan Kara Cc: John Hubbard Cc: Ted Ts'o Cc: Alexander Viro Cc: Christian Brauner Signed-off-by: Christian Brauner commit 3536049822060347c8cb5a923186a8d65a8f7a48 Merge: 02897f5e56b22e 4518e5a60c7fbf Author: Linus Torvalds Date: Thu May 29 22:09:08 2025 -0700 Merge tag 'vfio-v6.16-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Remove an outdated DMA unmap optimization that relies on a feature only implemented in AMDv1 page tables. (Jason Gunthorpe) - Fix various migration issues in the hisi_acc_vfio_pci variant driver, including use of a wrong DMA address requiring an update to the migration data structure, resending task completion interrupt after migration to re-sync queues, fixing a write-back cache sequencing issue, fixing a driver unload issue, behaving correctly when the guest driver is not loaded, and avoiding to squash errors from sub-functions. (Longfang Liu) - mlx5-vfio-pci variant driver update to make use of the new two-step DMA API for migration, using a page array directly rather than using a page list mapped across a scatter list. (Leon Romanovsky) - Fix an incorrect loop index used when unwinding allocation of dirty page bitmaps on error, resulting in temporary failure in freeing unused bitmaps. (Li RongQing) * tag 'vfio-v6.16-rc1' of https://github.com/awilliam/linux-vfio: vfio/type1: Fix error unwind in migration dirty bitmap allocation vfio/mlx5: Enable the DMA link API vfio/mlx5: Rewrite create mkey flow to allow better code reuse vfio/mlx5: Explicitly use number of pages instead of allocated length hisi_acc_vfio_pci: update function return values. hisi_acc_vfio_pci: bugfix live migration function without VF device driver hisi_acc_vfio_pci: bugfix the problem of uninstalling driver hisi_acc_vfio_pci: bugfix cache write-back issue hisi_acc_vfio_pci: add eq and aeq interruption restore hisi_acc_vfio_pci: fix XQE dma address error vfio/type1: Remove Fine Grained Superpages detection commit 02897f5e56b22e78d376faff1533ad800991650e Merge: ae5ec8adb8ec9c 08effa6b77f7db Author: Linus Torvalds Date: Thu May 29 21:37:11 2025 -0700 Merge tag 'for-linus-6.16-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Restructure the IPMI driver. This is a restructure of the IPMI driver, mostly to remove SRCU. The locking had issues, and they were not going to be straightforward to fix. Plus it used tons of memory and was generally a pain. Most of this moves handling of messages out of bh and interrupt context and runs it in thread context. Then getting rid of SRCU is easy. This also has a minor cleanup to remove a warning on newer GCCs and to fix some documentation" * tag 'for-linus-6.16-1' of https://github.com/cminyard/linux-ipmi: (26 commits) docs: ipmi: fix spelling and grammar mistakes ipmi:msghandler: Fix potential memory corruption in ipmi_create_user() ipmi:watchdog: Use the new interface for panic messages ipmi:msghandler: Export and fix panic messaging capability Documentation:ipmi: Remove comments about interrupt level ipmi:ssif: Fix a shutdown race ipmi:msghandler: Don't deliver messages to deleted users ipmi:si: Rework startup of IPMI devices ipmi:msghandler: Add a error return from unhandle LAN cmds ipmi:msghandler: Shut down lower layer first at unregister ipmi:msghandler: Remove proc_fs.h ipmi:msghandler: Don't check for shutdown when returning responses ipmi:msghandler: Don't acquire a user refcount for queued messages ipmi:msghandler: Fix locking around users and interfaces ipmi:msghandler: Remove some user level processing in panic mode ipmi: Add a note about the pretimeout callback ipmi:watchdog: Change lock to mutex ipmi:msghandler: Remove srcu for the ipmi_interfaces list ipmi:msghandler: Remove srcu from the ipmi user structure ipmi:msghandler: Use the system_wq, not system_bh_wq ... commit ae5ec8adb8ec9c2aa916f853737c101faa87e5ba Merge: bbd9c366bfb272 9d948b8804096d Author: Linus Torvalds Date: Thu May 29 21:21:11 2025 -0700 Merge tag 'tsm-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm Pull trusted security manager (TSM) updates from Dan Williams: - Add a general sysfs scheme for publishing "Measurement" values provided by the architecture's TEE Security Manager. Use it to publish TDX "Runtime Measurement Registers" ("RTMRs") that either maintain a hash of stored values (similar to a TPM PCR) or provide statically provisioned data. These measurements are validated by a relying party. - Reorganize the drivers/virt/coco/ directory for "host" and "guest" shared infrastructure. - Fix a configfs-tsm-report unregister bug - With CONFIG_TSM_MEASUREMENTS joining CONFIG_TSM_REPORTS and in anticipation of more shared "TSM" infrastructure arriving, rename the maintainer entry to "TRUSTED SECURITY MODULE (TSM) INFRASTRUCTURE". * tag 'tsm-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm: tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase sample/tsm-mr: Fix missing static for sample_report virt: tdx-guest: Transition to scoped_cond_guard for mutex operations virt: tdx-guest: Refactor and streamline TDREPORT generation virt: tdx-guest: Expose TDX MRs as sysfs attributes x86/tdx: tdx_mcall_get_report0: Return -EBUSY on TDCALL_OPERAND_BUSY error x86/tdx: Add tdx_mcall_extend_rtmr() interface tsm-mr: Add tsm-mr sample code tsm-mr: Add TVM Measurement Register support configfs-tsm-report: Fix NULL dereference of tsm_ops coco/guest: Move shared guest CC infrastructure to drivers/virt/coco/guest/ configfs-tsm: Namespace TSM report symbols commit bbd9c366bfb2723435e82717ebbb3398f93a1f63 Merge: b78f1293f90642 ed16618c380c32 Author: Linus Torvalds Date: Thu May 29 21:13:17 2025 -0700 Merge tag 'x86_sgx_for_6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull Intel software guard extension (SGX) updates from Dave Hansen: "A couple of x86/sgx changes. The first one is a no-brainer to use the (simple) SHA-256 library. For the second one, some folks doing testing noticed that SGX systems under memory pressure were inducing fatal machine checks at pretty unnerving rates, despite the SGX code having _some_ awareness of memory poison. It turns out that the SGX reclaim path was not checking for poison _and_ it always accesses memory to copy it around. Make sure that poisoned pages are not reclaimed" * tag 'x86_sgx_for_6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sgx: Prevent attempts to reclaim poisoned pages x86/sgx: Use SHA-256 library API instead of crypto_shash API commit b78f1293f90642ff9809935aa9df7b964e0f17ba Merge: 472c5f736b54c4 2fbdb6d8e03b70 Author: Linus Torvalds Date: Thu May 29 21:04:36 2025 -0700 Merge tag 'trace-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - Have module addresses get updated in the persistent ring buffer The addresses of the modules from the previous boot are saved in the persistent ring buffer. If the same modules are loaded and an address is in the old buffer points to an address that was both saved in the persistent ring buffer and is loaded in memory, shift the address to point to the address that is loaded in memory in the trace event. - Print function names for irqs off and preempt off callsites When ignoring the print fmt of a trace event and just printing the fields directly, have the fields for preempt off and irqs off events still show the function name (via kallsyms) instead of just showing the raw address. - Clean ups of the histogram code The histogram functions saved over 800 bytes on the stack to process events as they come in. Instead, create per-cpu buffers that can hold this information and have a separate location for each context level (thread, softirq, IRQ and NMI). Also add some more comments to the code. - Add "common_comm" field for histograms Add "common_comm" that uses the current->comm as a field in an event histogram and acts like any of the other fields of the event. - Show "subops" in the enabled_functions file When the function graph infrastructure is used, a subsystem has a "subops" that it attaches its callback function to. Instead of the enabled_functions just showing a function calling the function that calls the subops functions, also show the subops functions that will get called for that function too. - Add "copy_trace_marker" option to instances There are cases where an instance is created for tooling to write into, but the old tooling has the top level instance hardcoded into the application. New tools want to consume the data from an instance and not the top level buffer. By adding a copy_trace_marker option, whenever the top instance trace_marker is written into, a copy of it is also written into the instance with this option set. This allows new tools to read what old tools are writing into the top buffer. If this option is cleared by the top instance, then what is written into the trace_marker is not written into the top instance. This is a way to redirect the trace_marker writes into another instance. - Have tracepoints created by DECLARE_TRACE() use trace__tp() If a tracepoint is created by DECLARE_TRACE() instead of TRACE_EVENT(), then it will not be exposed via tracefs. Currently there's no way to differentiate in the kernel the tracepoint functions between those that are exposed via tracefs or not. A calling convention has been made manually to append a "_tp" prefix for events created by DECLARE_TRACE(). Instead of doing this manually, force it so that all DECLARE_TRACE() events have this notation. - Use __string() for task->comm in some sched events Instead of hardcoding the comm to be TASK_COMM_LEN in some of the scheduler events use __string() which makes it dynamic. Note, if these events are parsed by user space it they may break, and the event may have to be converted back to the hardcoded size. - Have function graph "depth" be unsigned to the user Internally to the kernel, the "depth" field of the function graph event is signed due to -1 being used for end of boundary. What actually gets recorded in the event itself is zero or positive. Reflect this to user space by showing "depth" as unsigned int and be consistent across all events. - Allow an arbitrary long CPU string to osnoise_cpus_write() The filtering of which CPUs to write to can exceed 256 bytes. If a machine has 256 CPUs, and the filter is to filter every other CPU, the write would take a string larger than 256 bytes. Instead of using a fixed size buffer on the stack that is 256 bytes, allocate it to handle what is passed in. - Stop having ftrace check the per-cpu data "disabled" flag The "disabled" flag in the data structure passed to most ftrace functions is checked to know if tracing has been disabled or not. This flag was added back in 2008 before the ring buffer had its own way to disable tracing. The "disable" flag is now not always set when needed, and the ring buffer flag should be used in all locations where the disabled is needed. Since the "disable" flag is redundant and incorrect, stop using it. Fix up some locations that use the "disable" flag to use the ring buffer info. - Use a new tracer_tracing_disable/enable() instead of data->disable flag There's a few cases that set the data->disable flag to stop tracing, but this flag is not consistently used. It is also an on/off switch where if a function set it and calls another function that sets it, the called function may incorrectly enable it. Use a new trace_tracing_disable() and tracer_tracing_enable() that uses a counter and can be nested. These use the ring buffer flags which are always checked making the disabling more consistent. - Save the trace clock in the persistent ring buffer Save what clock was used for tracing in the persistent ring buffer and set it back to that clock after a reboot. - Remove unused reference to a per CPU data pointer in mmiotrace functions - Remove unused buffer_page field from trace_array_cpu structure - Remove more strncpy() instances - Other minor clean ups and fixes * tag 'trace-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (36 commits) tracing: Fix compilation warning on arm32 tracing: Record trace_clock and recover when reboot tracing/sched: Use __string() instead of fixed lengths for task->comm tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix tracing: Cleanup upper_empty() in pid_list tracing: Allow the top level trace_marker to write into another instances tracing: Add a helper function to handle the dereference arg in verifier tracing: Remove unnecessary "goto out" that simply returns ret is trigger code tracing: Fix error handling in event_trigger_parse() tracing: Rename event_trigger_alloc() to trigger_data_alloc() tracing: Replace deprecated strncpy() with strscpy() for stack_trace_filter_buf tracing: Remove unused buffer_page field from trace_array_cpu structure tracing: Use atomic_inc_return() for updating "disabled" counter in irqsoff tracer tracing: Convert the per CPU "disabled" counter to local from atomic tracing: branch: Use trace_tracing_is_on_cpu() instead of "disabled" field ring-buffer: Add ring_buffer_record_is_on_cpu() tracing: Do not use per CPU array_buffer.data->disabled for cpumask ftrace: Do not disabled function graph based on "disabled" field tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled tracing: Use tracer_tracing_disable() instead of "disabled" field for ftrace_dump_one() ... commit 472c5f736b54c476c9bfaa0258c4c07fc6ddeea4 Merge: e0797d3b91de75 8020361d51eea5 Author: Linus Torvalds Date: Thu May 29 20:59:52 2025 -0700 Merge tag 'trace-tools-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tools updates from Steven Rostedt: - Set distinctive value for failed tests When running "make check" that performs tests on rtla the failure is checked by examining the output. Instead have the tool return an error status if it exceeds the threadhold. - Define __NR_sched_setattr for LoongArch Define __NR_sched_setattr to allow this to build for LoongArch. - Define _GNU_SOURCE for timerlat_bpf.c Due to modifications of struct sched_attr in utils.h when _GNU_SOURCE is not defined, this can cause errors for timerlat_bpf_init() and breakage in BPF sample collection mode. * tag 'trace-tools-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla: Define _GNU_SOURCE in timerlat_bpf.c rtla: Define __NR_sched_setattr for LoongArch rtla: Set distinctive exit value for failed tests commit 8c56bfe53bd881c7b598c54a3a06216743c57bbc Author: Anubhav Shelat Date: Thu May 29 10:33:35 2025 -0400 perf trace: Set errpid to false for rseq and set_robust_list The 'rseq' and 'set_robust_list' syscalls don't return a pid, so set errpid for both to false. Fixes: 0c1019e3463b263a ("perf trace: Mark the 'rseq' arg in the rseq syscall as coming from user space") Fixes: 1de5b5dcb8353f36 ("perf trace: Mark the 'head' arg in the set_robust_list syscall as coming from user space") Signed-off-by: Anubhav Shelat Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dapeng Mi Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250529143334.1469669-2-ashelat@redhat.com [ Remove explicit .errpid = false, omitting its initialization zeroes it, as noted by Namhyung ] Signed-off-by: Arnaldo Carvalho de Melo commit 7a17bbc1d952057898cb0739e60665908fbb8c72 Author: Sylvan Smit Date: Thu May 29 18:29:23 2025 +0200 rust: list: Fix typo `much` in arc.rs Correct the typo (s/much/must) in the ListArc documentation. Reported-by: Miguel Ojeda Closes: https://github.com/Rust-for-Linux/linux/issues/1166 Fixes: a48026315cd7 ("rust: list: add tracking for ListArc") Signed-off-by: Sylvan Smit Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250529162923.434978-1-sylvan@sylvansmit.com [ Changed tag to "Reported-by" and sorted. - Miguel ] Signed-off-by: Miguel Ojeda commit b20fbbc08a363f28fd0f3ad5163b2b0ff7605ba5 Author: Tamir Duberstein Date: Thu May 29 09:11:33 2025 -0400 rust: check type of `$ptr` in `container_of!` Add a compile-time check that `*$ptr` is of the type of `$type->$($f)*`. Rename those placeholders for clarity. Given the incorrect usage: > diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs > index 8d978c896747..6a7089149878 100644 > --- a/rust/kernel/rbtree.rs > +++ b/rust/kernel/rbtree.rs > @@ -329,7 +329,7 @@ fn raw_entry(&mut self, key: &K) -> RawEntry<'_, K, V> { > while !(*child_field_of_parent).is_null() { > let curr = *child_field_of_parent; > // SAFETY: All links fields we create are in a `Node`. > - let node = unsafe { container_of!(curr, Node, links) }; > + let node = unsafe { container_of!(curr, Node, key) }; > > // SAFETY: `node` is a non-null node so it is valid by the type invariants. > match key.cmp(unsafe { &(*node).key }) { this patch produces the compilation error: > error[E0308]: mismatched types > --> rust/kernel/lib.rs:220:45 > | > 220 | $crate::assert_same_type(field_ptr, (&raw const (*container_ptr).$($fields)*).cast_mut()); > | ------------------------ --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut rb_node`, found `*mut K` > | | | > | | expected all arguments to be this `*mut bindings::rb_node` type because they need to match the type of this parameter > | arguments to this function are incorrect > | > ::: rust/kernel/rbtree.rs:270:6 > | > 270 | impl RBTree > | - found this type parameter > ... > 332 | let node = unsafe { container_of!(curr, Node, key) }; > | ------------------------------------ in this macro invocation > | > = note: expected raw pointer `*mut bindings::rb_node` > found raw pointer `*mut K` > note: function defined here > --> rust/kernel/lib.rs:227:8 > | > 227 | pub fn assert_same_type(_: T, _: T) {} > | ^^^^^^^^^^^^^^^^ - ---- ---- this parameter needs to match the `*mut bindings::rb_node` type of parameter #1 > | | | > | | parameter #2 needs to match the `*mut bindings::rb_node` type of this parameter > | parameter #1 and parameter #2 both reference this parameter `T` > = note: this error originates in the macro `container_of` (in Nightly builds, run with -Z macro-backtrace for more info) [ We decided to go with a variation of v1 [1] that became v4, since it seems like the obvious approach, the error messages seem good enough and the debug performance should be fine, given the kernel is always built with -O2. In the future, we may want to make the helper non-hidden, with proper documentation, for others to use. [1] https://lore.kernel.org/rust-for-linux/CANiq72kQWNfSV0KK6qs6oJt+aGdgY=hXg=wJcmK3zYcokY1LNw@mail.gmail.com/ - Miguel ] Suggested-by: Alice Ryhl Link: https://lore.kernel.org/all/CAH5fLgh6gmqGBhPMi2SKn7mCmMWfOSiS0WP5wBuGPYh9ZTAiww@mail.gmail.com/ Signed-off-by: Tamir Duberstein Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250529-b4-container-of-type-check-v4-1-bf3a7ad73cec@gmail.com [ Added intra-doc link. - Miguel ] Signed-off-by: Miguel Ojeda commit d0b29661a95bbf804b6fe9bdff1d8927206c9f38 Author: Ahmed Salem Date: Thu May 29 17:43:13 2025 +0200 ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy() ACPICA commit b90d0d65ec97ff8279ad826f4102e0d31c5f662a I mistakenly replaced strncpy() with memcpy() in commit ebf27765421c ("ACPICA: Replace strncpy() with memcpy()"), not realizing the entire context behind *why* strncpy() was used. In this safer implementation of strncpy(), it does not make sense to use memcpy() only to null-terminate strings passed to acpi_ut_safe_strncpy() one byte early. The consequences of doing so are understandably *bad*, as was evident by the kernel test bot reporting problems [1]. Fixes: ebf27765421c ("ACPICA: Replace strncpy() with memcpy()") Link: https://lore.kernel.org/all/202505081033.50e45ff4-lkp@intel.com [1] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505081033.50e45ff4-lkp@intel.com Link: https://github.com/acpica/acpica/commit/b90d0d65 Signed-off-by: Ahmed Salem Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/12685690.O9o76ZdvQC@rjwysocki.net commit e0797d3b91de75b6c95b4a0e0649ebd4aac1d9d1 Merge: db340159f19ae0 d5a2693f93e497 Author: Linus Torvalds Date: Thu May 29 10:38:23 2025 -0700 Merge tag 'fs_for_v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2 and isofs updates from Jan Kara: - isofs fix of handling of particularly formatted Rock Ridge timestamps - Add deprecation notice about support of DAX in ext2 filesystem driver * tag 'fs_for_v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Deprecate DAX isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry commit db340159f19ae083afb33fce0aaadc77c6b0d547 Merge: 1193e205dbb6fe 58f5fbeb367ff6 Author: Linus Torvalds Date: Thu May 29 10:34:26 2025 -0700 Merge tag 'fsnotify_for_v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "Two fanotify cleanups and support for watching namespace-owned filesystems by namespace admins (most useful for being able to watch for new mounts / unmounts happening within a user namespace)" * tag 'fsnotify_for_v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: support watching filesystems and mounts inside userns fanotify: remove redundant permission checks fanotify: Drop use of flex array in fanotify_fh commit 1193e205dbb6feca917dc8e1862ffcdf2194234b Merge: 9d230d500b0e5f 9c96808f10d841 Author: Linus Torvalds Date: Thu May 29 10:19:22 2025 -0700 Merge tag 'platform-drivers-x86-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform drivers updates from Ilpo Järvinen: "The changes are mostly business as usual. Besides pdx86 changes, there are a few power supply changes needed for related pdx86 features, move of oxpec driver from hwmon (oxp-sensors) to pdx86, and one FW version warning to hid-asus. Highlights: - alienware-wmi-wmax: - Add HWMON support - Add ABI and admin-guide documentation - Expose GPIO debug methods through debug FS - Support manual fan control and "custom" thermal profile - amd/hsmp: - Add sysfs files to show HSMP telemetry - Report power readings and limits via hwmon - amd/isp4: Add AMD ISP platform config for OV05C10 - asus-wmi: - Refactor Ally suspend/resume to work better with older FW - hid-asus: check ROG Ally MCU version and warn about old FW versions - dasharo-acpi: - Add driver for Dasharo devices supporting fans and temperatures monitoring - dell-ddv: - Expose the battery health and manufacture date to userspace using power supply extensions - Implement the battery matching algorithm - dell-pc: - Improve error propagation - Use faux device - int3472: - Add delays to avoid GPIO regulator spikes - Add handshake pin support - Make regulator supply name configurable and allow registering more than 1 GPIO regulator - Map mt9m114 powerdown pin to powerenable - intel/pmc: Add separate SSRAM Telemetry driver - intel-uncore-freq: Add attributes to show agent types and die ID - ISST: - Support SST-TF revision 2 (allows more cores per bucket) - Support SST-PP revision 2 (fabric 1 frequencies) - Remove unnecessary SST MSRs restore (the package retains MSRs despite CPU offlining) - mellanox: Add support for SN2201, SN4280, SN5610, and SN5640 - mellanox: mlxbf-pmc: Support additional PMC blocks - oxpec: - Add OneXFly variants - Add support for charge limit, charge thresholds, and turbo LED - Distinguish current X1 variants to avoid unwanted matching to new variants - Follow hwmon conventions - Move from hwmon/oxp-sensors to platform/x86 to match the enlarged scope - power supply: - Add inhibit-charge-awake (needed by oxpec) - Add additional battery health status values ("blown fuse" and "cell imbalance") (needed by dell-ddv) - powerwell-ec: Add driver for Portwell EC supporting GPIO and watchdog - thinkpad-acpi: Support camera shutter switch hotkey - tuxedo: Add virtual LampArray for TUXEDO NB04 devices - tools/power/x86/intel-speed-select: - Support displaying SST-PP revision 2 fields - Skip uncore frequency update on newer generations of CPUs - Miscellaneous cleanups / refactoring / improvements" * tag 'platform-drivers-x86-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (112 commits) thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m platform/x86: asus-wmi: fix build without CONFIG_SUSPEND docs: ABI: Fix "aassociated" to "associated" platform/x86: Add AMD ISP platform config for OV05C10 Documentation: admin-guide: pm: Add documentation for die_id platform/x86/intel-uncore-freq: Add attributes to show die_id platform/x86/intel: power-domains: Add interface to get Linux die ID Documentation: admin-guide: pm: Add documentation for agent_types platform/x86/intel-uncore-freq: Add attributes to show agent types platform/x86/tuxedo: Prevent invalid Kconfig state platform/x86: dell-ddv: Expose the battery health to userspace platform/x86: dell-ddv: Expose the battery manufacture date to userspace platform/x86: dell-ddv: Implement the battery matching algorithm power: supply: core: Add additional health status values platform/x86/amd/hsmp: acpi: Add sysfs files to display HSMP telemetry platform/x86/amd/hsmp: Report power via hwmon sensors platform/x86/amd/hsmp: Use a single DRIVER_VERSION for all hsmp modules platform/mellanox: mlxreg-dpu: Fix smatch warnings platform: mellanox: nvsw-sn2200: Fix .items in nvsw_sn2201_busbar_hotplug ... commit 9d230d500b0e5f7be863e2bf2386be5f80dd18aa Merge: bf373e4c786bfe 071d8e4c2a3b09 Author: Linus Torvalds Date: Thu May 29 09:11:39 2025 -0700 Merge tag 'driver-core-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core Pull driver core updates from Greg KH: "Here are the driver core / kernfs changes for 6.16-rc1. Not a huge number of changes this development cycle, here's the summary of what is included in here: - kernfs locking tweaks, pushing some global locks down into a per-fs image lock - rust driver core and pci device bindings added for new features. - sysfs const work for bin_attributes. The final churn of switching away from and removing the transitional struct members, "read_new", "write_new" and "bin_attrs_new" will come after the merge window to avoid unnecesary merge conflicts. - auxbus device creation helpers added - fauxbus fix for creating sysfs files after the probe completed properly - other tiny updates for driver core things. All of these have been in linux-next for over a week with no reported issues" * tag 'driver-core-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: kernfs: Relax constraint in draining guard Documentation: embargoed-hardware-issues.rst: Remove myself drivers: hv: fix up const issue with vmbus_chan_bin_attrs firmware_loader: use SHA-256 library API instead of crypto_shash API docs: debugfs: do not recommend debugfs_remove_recursive PM: wakeup: Do not expose 4 device wakeup source APIs kernfs: switch global kernfs_rename_lock to per-fs lock kernfs: switch global kernfs_idr_lock to per-fs lock driver core: auxiliary bus: Fix IS_ERR() vs NULL mixup in __devm_auxiliary_device_create() sysfs: constify attribute_group::bin_attrs sysfs: constify bin_attribute argument of bin_attribute::read/write() software node: Correct a OOB check in software_node_get_reference_args() devres: simplify devm_kstrdup() using devm_kmemdup() platform: replace magic number with macro PLATFORM_DEVID_NONE component: do not try to unbind unbound components driver core: auxiliary bus: add device creation helpers driver core: faux: Add sysfs groups after probing commit e5ef4cd2a47f27c0c9d8ff6c0f63a18937c071a3 Author: Niravkumar L Rabara Date: Tue May 27 07:57:07 2025 -0700 EDAC/altera: Use correct write width with the INTTEST register On the SoCFPGA platform, the INTTEST register supports only 16-bit writes. A 32-bit write triggers an SError to the CPU so do 16-bit accesses only. [ bp: AI-massage the commit message. ] Fixes: c7b4be8db8bc ("EDAC, altera: Add Arria10 OCRAM ECC support") Signed-off-by: Niravkumar L Rabara Signed-off-by: Matthew Gerlach Signed-off-by: Borislav Petkov (AMD) Acked-by: Dinh Nguyen Cc: stable@kernel.org Link: https://lore.kernel.org/20250527145707.25458-1-matthew.gerlach@altera.com commit 70523f335734b0b42f97647556d331edf684c7dc Author: Rafael J. Wysocki Date: Thu May 29 15:40:43 2025 +0200 Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" Revert commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()") because it introduced a significant power regression on systems that start with "nosmt" in the kernel command line. Namely, on such systems, SMT siblings permanently go offline early, when cpuidle has not been initialized yet, so after the above commit, hlt_play_dead() is called for them. Later on, when the processor attempts to enter a deep package C-state, including PC10 which is requisite for reaching minimum power in suspend-to-idle, it is not able to do that because of the SMT siblings staying in C1 (which they have been put into by HLT). As a result, the idle power (including power in suspend-to-idle) rises quite dramatically on those systems with all of the possible consequences, which (needless to say) may not be expected by their users. This issue is hard to debug and potentially dangerous, so it needs to be addressed as soon as possible in a way that will work for 6.15.y, hence the revert. Of course, after this revert, the issue that commit 96040f7273e2 attempted to address will be back and it will need to be fixed again later. Fixes: 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()") Reported-by: Todd Brandt Tested-by: Todd Brandt Cc: 6.15+ # 6.15+ Signed-off-by: Rafael J. Wysocki Acked-by: Dave Hansen Link: https://patch.msgid.link/12674167.O9o76ZdvQC@rjwysocki.net commit bf373e4c786bfe989e637195252698f45b157a68 Merge: 8ca154e4910eff 89ab97de44fec8 Author: Linus Torvalds Date: Thu May 29 08:22:07 2025 -0700 Merge tag 'devicetree-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DT Bindings: - Convert all remaining interrupt-controller bindings to DT schema - Convert Rockchip CDN-DP and Freescale TCON, M4IF, TigerP, LDB, PPC PMC, imx-drm, and ftm-quaddec to DT schema - Add bindings for fsl,vf610-pit, fsl,ls1021a-wdt, sgx,vz89te, maxim,max30208, ti,lp8864, and fairphone,fp5-sndcard - Add top-level constraints for renesas,vsp1 and renesas,fcp - Add missing constraint in amlogic,pinctrl-a4 'group' nodes - Adjust the allowed properties for dwc3-xilinx, sony,imx219, pci-iommu, and renesas,dsi - Add EcoNet vendor prefix - Fix the reserved-memory.yaml in fsl,qman-fqd - Drop obsolete numa.txt and cpu-topology.txt which are schemas in dtschema now - Drop Renesas RZ/N1S bindings - Ensure Arm cpu nodes don't allow undocumented properties. Add all the properties which are in use and undocumented. Drop the Mediatek cpufreq binding which is not a binding, but just what DT properties the driver uses. - Add compatibles for Renesas RZ/G3E and RZ/V2N Mali Bifrost GPU - Update documentation on defining child nodes with separate schemas - Add bindings to PSCI MAINTAINERS entry DT core: - Add new functions to simplify driver handling of 'memory-region' properties. Users to be added next cycle. - Simplify of_dma_set_restricted_buffer() to use of_for_each_phandle() - Add missing unlock on error in unittest_data_add()" * tag 'devicetree-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (87 commits) dt-bindings: timer: Add fsl,vf610-pit.yaml dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3E SoC ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card dt-bindings: arm/cpus: Allow 2 power-domains entries dt-bindings: usb: dwc3-xilinx: allow dma-coherent media: dt-bindings: sony,imx219: Allow props from video-interface-devices dt-bindings: soundwire: qcom: Document v2.1.0 version of IP block dt-bindings: watchdog: fsl-imx-wdt: add compatible string fsl,ls1021a-wdt dt-bindings: pinctrl: amlogic,pinctrl-a4: Add missing constraint on allowed 'group' node properties dt-bindings: display: rockchip: Convert cdn-dp-rockchip.txt to yaml dt-bindings: display: bridge: renesas,dsi: allow properties from dsi-controller dt-bindings: trivial-devices: Add VZ89TE to trivial media: dt-bindings: renesas,vsp1: add top-level constraints media: dt-bindings: renesas,fcp: add top-level constraints dt-bindings: trivial-devices: Add Maxim max30208 dt-bindings: soc: fsl,qman-fqd: Fix reserved-memory.yaml reference dt-bindings: interrupt-controller: Convert ti,omap-intc-irq to DT schema dt-bindings: interrupt-controller: Convert ti,omap4-wugen-mpu to DT schema dt-bindings: interrupt-controller: Convert ti,keystone-irq to DT schema dt-bindings: interrupt-controller: Convert technologic,ts4800-irqc to DT schema ... commit 8ca154e4910efff1b04e7750e007d75732c68323 Merge: 43db1111073049 206cc44588f72b Author: Linus Torvalds Date: Thu May 29 08:15:35 2025 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - A new virtio RTC driver - vhost scsi now logs write descriptors so migration works - Some hardening work in virtio core - An old spec compliance issue fixed in vhost net - A couple of cleanups, fixes in vringh, virtio-pci, vdpa * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio: reject shm region if length is zero virtio_rtc: Add RTC class driver virtio_rtc: Add Arm Generic Timer cross-timestamping virtio_rtc: Add PTP clocks virtio_rtc: Add module and driver core vringh: use bvec_kmap_local vhost: vringh: Use matching allocation type in resize_iovec() virtio-pci: Fix result size returned for the admin command completion vdpa/octeon_ep: Control PCI dev enabling manually vhost-scsi: log event queue write descriptors vhost-scsi: log control queue write descriptors vhost-scsi: log I/O queue write descriptors vhost-scsi: adjust vhost_scsi_get_desc() to log vring descriptors vhost: modify vhost_log_write() for broader users commit 43db1111073049220381944af4a3b8a5400eda71 Merge: 12e9b9e5223b0e e9f17038d814c0 Author: Linus Torvalds Date: Thu May 29 08:10:01 2025 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "As far as x86 goes this pull request "only" includes TDX host support. Quotes are appropriate because (at 6k lines and 100+ commits) it is much bigger than the rest, which will come later this week and consists mostly of bugfixes and selftests. s390 changes will also come in the second batch. ARM: - Add large stage-2 mapping (THP) support for non-protected guests when pKVM is enabled, clawing back some performance. - Enable nested virtualisation support on systems that support it, though it is disabled by default. - Add UBSAN support to the standalone EL2 object used in nVHE/hVHE and protected modes. - Large rework of the way KVM tracks architecture features and links them with the effects of control bits. While this has no functional impact, it ensures correctness of emulation (the data is automatically extracted from the published JSON files), and helps dealing with the evolution of the architecture. - Significant changes to the way pKVM tracks ownership of pages, avoiding page table walks by storing the state in the hypervisor's vmemmap. This in turn enables the THP support described above. - New selftest checking the pKVM ownership transition rules - Fixes for FEAT_MTE_ASYNC being accidentally advertised to guests even if the host didn't have it. - Fixes for the address translation emulation, which happened to be rather buggy in some specific contexts. - Fixes for the PMU emulation in NV contexts, decoupling PMCR_EL0.N from the number of counters exposed to a guest and addressing a number of issues in the process. - Add a new selftest for the SVE host state being corrupted by a guest. - Keep HCR_EL2.xMO set at all times for systems running with the kernel at EL2, ensuring that the window for interrupts is slightly bigger, and avoiding a pretty bad erratum on the AmpereOne HW. - Add workaround for AmpereOne's erratum AC04_CPU_23, which suffers from a pretty bad case of TLB corruption unless accesses to HCR_EL2 are heavily synchronised. - Add a per-VM, per-ITS debugfs entry to dump the state of the ITS tables in a human-friendly fashion. - and the usual random cleanups. LoongArch: - Don't flush tlb if the host supports hardware page table walks. - Add KVM selftests support. RISC-V: - Add vector registers to get-reg-list selftest - VCPU reset related improvements - Remove scounteren initialization from VCPU reset - Support VCPU reset from userspace using set_mpstate() ioctl x86: - Initial support for TDX in KVM. This finally makes it possible to use the TDX module to run confidential guests on Intel processors. This is quite a large series, including support for private page tables (managed by the TDX module and mirrored in KVM for efficiency), forwarding some TDVMCALLs to userspace, and handling several special VM exits from the TDX module. This has been in the works for literally years and it's not really possible to describe everything here, so I'll defer to the various merge commits up to and including commit 7bcf7246c42a ('Merge branch 'kvm-tdx-finish-initial' into HEAD')" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (248 commits) x86/tdx: mark tdh_vp_enter() as __flatten Documentation: virt/kvm: remove unreferenced footnote RISC-V: KVM: lock the correct mp_state during reset KVM: arm64: Fix documentation for vgic_its_iter_next() KVM: arm64: np-guest CMOs with PMD_SIZE fixmap KVM: arm64: Stage-2 huge mappings for np-guests KVM: arm64: Add a range to pkvm_mappings KVM: arm64: Convert pkvm_mappings to interval tree KVM: arm64: Add a range to __pkvm_host_test_clear_young_guest() KVM: arm64: Add a range to __pkvm_host_wrprotect_guest() KVM: arm64: Add a range to __pkvm_host_unshare_guest() KVM: arm64: Add a range to __pkvm_host_share_guest() KVM: arm64: Introduce for_each_hyp_page KVM: arm64: Handle huge mappings for np-guest CMOs KVM: arm64: nv: Release faulted-in VNCR page from mmu_lock critical section KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held KVM: arm64: nv: Hold mmu_lock when invalidating VNCR SW-TLB before translating RISC-V: KVM: add KVM_CAP_RISCV_MP_STATE_RESET RISC-V: KVM: Remove scounteren initialization KVM: RISC-V: remove unnecessary SBI reset state ... commit 12e9b9e5223b0e6e259b84bda216a54c8bfee200 Merge: 90b83efa670165 1d887d6f810dbf Author: Linus Torvalds Date: Thu May 29 08:01:53 2025 -0700 Merge tag 'ipe-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe Pull IPE update from Fan Wu: "A single commit from Jasjiv Singh, that adds an errno field to IPE policy load auditing to log failures with error details, not just successes. This improves the security audit trail and helps diagnose policy deployment issues" * tag 'ipe-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe: ipe: add errno field to IPE policy load auditing commit d0b497df02e9b2ebcb5771c7b16e424c0614a366 Author: Stephan Gerhold Date: Tue May 6 15:10:09 2025 +0200 mailbox: qcom-apcs-ipc: Assign OF node to clock controller child device Currently, the child device for the clock controller inside the APCS block is created without any OF node assigned, so the drivers need to rely on the parent device for obtaining any resources. Add support for defining the clock controller inside a "clock-controller" subnode to break up circular dependencies between the mailbox and required parent clocks of the clock controller. For backwards compatibility, if the subnode is not defined, reuse the OF node from the parent device. Signed-off-by: Stephan Gerhold Reviewed-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit c3c51387141db549c96db2fd4b8161fa0b4d7301 Author: Stephan Gerhold Date: Tue May 6 15:10:08 2025 +0200 dt-bindings: mailbox: qcom,apcs: Add separate node for clock-controller APCS "global" is sort of a "miscellaneous" hardware block that combines multiple registers inside the application processor subsystem. Two distinct use cases are currently stuffed together in a single device tree node: - Mailbox: to communicate with other remoteprocs in the system. - Clock: for controlling the CPU frequency. These two use cases have unavoidable circular dependencies: the mailbox is needed as early as possible during boot to start controlling shared resources like clocks and power domains, while the clock controller needs one of these shared clocks as its parent. Currently, there is no way to distinguish these two use cases for generic mechanisms like fw_devlink. This is currently blocking conversion of the deprecated custom "qcom,ipc" properties to the standard "mboxes", see e.g. commit d92e9ea2f0f9 ("arm64: dts: qcom: msm8939: revert use of APCS mbox for RPM"): 1. remoteproc &rpm needs mboxes = <&apcs1_mbox 8>; 2. The clock controller inside &apcs1_mbox needs clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>. 3. &rpmcc is a child of remoteproc &rpm The mailbox itself does not need any clocks and should probe early to unblock the rest of the boot process. The "clocks" are only needed for the separate clock controller. In Linux, these are already two separate drivers that can probe independently. Break up the circular dependency chain in the device tree by separating the clock controller into a separate child node. Deprecate the old approach of specifying the clock properties as part of the root node, but keep them for backwards compatibility. Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 30837a49bd0aba0f311d4056cd48753955f60d40 Author: Lang Yu Date: Fri May 23 10:04:54 2025 +0800 drm/amdkfd: Map wptr BO to GART unconditionally For simulation C models that don't run CP FW where adev->mes.sched_version is not populated correctly. This causes NULL dereference in amdgpu_amdkfd_free_gtt_mem(dev->adev, (void **)&pqn->q->wptr_bo_gart) and warning on unpinned BO in amdgpu_bo_gpu_offset(q->properties.wptr_bo). Compared with adding version check here and there, always map wptr BO to GART simplifies things. v2: Add NULL check in amdgpu_amdkfd_free_gtt_mem.(Philip) Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 684530526f07d488986bc34244034e54e00759a4 Author: Alex Deucher Date: Mon May 19 15:51:47 2025 -0400 drm/amdgpu/mes: remove some unused functions Nothing uses them so remove them. Leftover from MES bring up. Reviewed-by: Michael Chen Signed-off-by: Alex Deucher commit 40f970ba7a4ab77be2ffe6d50a70416c8876496a Author: Alex Deucher Date: Mon May 19 15:46:25 2025 -0400 drm/amdgpu/mes: add missing locking in helper functions We need to take the MES lock. Reviewed-by: Michael Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 82a277d529f3fa03d2374f961143afd97469e44e Author: Mario Limonciello Date: Tue May 27 10:59:42 2025 -0500 drm/amd: Export DMCUB version to sysfs For supported ASICs DMCU version is exported, but ASICs that support DMCUB there is no information exported to sysfs. Add an attribute for DMCUB. Reviewed-by: Lijo Lazar Link: https://lore.kernel.org/r/20250527155942.476354-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 324194b528b490d431af24b88c7596f480ed7c81 Author: Asad Kamal Date: Mon May 26 15:27:08 2025 +0800 drm/amd/pm: Enable static metrics table support Enable static metrics support to fetch board voltage and pldm version for smu_v13_0_14 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c7d43a148593e71563a4d3b83527d2917149526d Author: Asad Kamal Date: Mon May 26 15:23:41 2025 +0800 drm/amd/pm: Enable static metrics table support Enable static metrics support to fetch board voltage and pldm version for other smu_v13_0_6 program Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 347efe5b396c61bc129832910665d899ee86448e Author: Christophe JAILLET Date: Sat May 24 18:51:25 2025 +0200 drm/amd/display: Constify struct timing_generator_funcs 'struct timing_generator_funcs' are not modified in these drivers. Constifying these structures moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. Signed-off-by: Christophe JAILLET Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit c3e9826a22027a21d998d3e64882fa377b613006 Author: Wentao Liang Date: Mon May 26 10:37:31 2025 +0800 drm/amd/display: Add null pointer check for get_first_active_display() The function mod_hdcp_hdcp1_enable_encryption() calls the function get_first_active_display(), but does not check its return value. The return value is a null pointer if the display list is empty. This will lead to a null pointer dereference in mod_hdcp_hdcp2_enable_encryption(). Add a null pointer check for get_first_active_display() and return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND if the function return null. Fixes: 2deade5ede56 ("drm/amd/display: Remove hdcp display state with mst fix") Signed-off-by: Wentao Liang Reviewed-by: Alex Hung Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # v5.8 commit fce0afca3562ceb5386241159280590beeee2f51 Author: ganglxie Date: Thu May 22 15:14:28 2025 +0800 drm/amdgpu: Get mca address for old eeprom records after getting mca address for old eeprom records with 'address==0', it can be correctly parsed under none-nps1, or it will be dropped. Signed-off-by: ganglxie Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 31e837d242cbb58afed8e0d2a722745bc50ad154 Author: ganglxie Date: Thu May 22 14:28:52 2025 +0800 drm/amdgpu: handle old RAS eeprom data in non-nps1 mode Get MCA address from PA in nps1, then convert MCA address to PA in specific nps mode. Signed-off-by: ganglxie Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 90237b16ec1d7afa16e2173cc9a664377214cdd9 Author: Yifan Zhang Date: Wed May 21 18:06:28 2025 +0800 amd/amdkfd: fix a kfd_process ref leak This patch is to fix a kfd_prcess ref leak. Signed-off-by: Yifan Zhang Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 5ae9de5867dbf23e53d244dfd62216bec95234a8 Author: Arunpravin Paneer Selvam Date: Mon Dec 30 22:24:53 2024 +0530 drm/amdgpu: Add userq fence support to SDMAv6.0 Add userq fence support to SDMAv6.0 Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit 1091fba163834f51a02d5d149bd657804e6ab749 Author: Sunday Clement Date: Fri May 23 17:49:50 2025 -0400 drm/amdkfd: Identical code for different branches This patch removes the if/else statement in the cik_event_interrupt_wq function because it is redundant with both branches resulting in identical outcomes, this improves code readibility. Signed-off-by: Sunday Clement Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 978592136cfed3491330acfff12a90812d0c6a58 Author: Asad Kamal Date: Wed May 21 19:17:50 2025 +0800 drm/amd/pm: Optimize get gpu metrics data function Optimize get gpu metrics data function for smu_v13_0_12 to allocate metrics structure only once v2: Free and alloc moved to same function(Kevin) Signed-off-by: Asad Kamal Reviewed-by: Yang Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 4d2f6b4e4c7ed32e7fa39fcea37344a9eab99094 Author: John Olender Date: Tue Apr 29 07:24:28 2025 -0400 drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram The drm_mm allocator tolerated being passed end > mm->size, but the drm_buddy allocator does not. Restore the pre-buddy-allocator behavior of allowing such placements. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3448 Signed-off-by: John Olender Reviewed-by: Alex Deucher Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit bf394d28548c3c0a01e113fdef20ddb6cd2df106 Author: David (Ming Qiang) Wu Date: Wed May 14 18:59:11 2025 -0400 drm/amdgpu/vcn5.0.1: read back register after written The addition of register read-back in VCN v5.0.1 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit a8bce9b7a2ccb5cbbe9967a37e617a9ef963e540 Author: David (Ming Qiang) Wu Date: Wed May 14 18:58:37 2025 -0400 drm/amdgpu/vcn5: read back register after written The addition of register read-back in VCN v5.0.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 4d4275a0387790fbe0a016c075dcbb39d58b63ab Author: David (Ming Qiang) Wu Date: Wed May 14 18:56:35 2025 -0400 drm/amdgpu/vcn4.0.5: read back register after written The addition of register read-back in VCN v4.0.5 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 5b4c6413c89613cb46669b576d83658fe6e734da Author: David (Ming Qiang) Wu Date: Wed May 14 18:55:59 2025 -0400 drm/amdgpu/vcn4.0.3: read back register after written The addition of register read-back in VCN v4.0.3 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit a3810a5e37c58329aa2c7992f3172a423f4ae194 Author: David (Ming Qiang) Wu Date: Wed May 14 18:55:27 2025 -0400 drm/amdgpu/vcn4: read back register after written The addition of register read-back in VCN v4.0.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit b7a4842a917e3a251b5a6aa1a21a5daf6d396ef3 Author: David (Ming Qiang) Wu Date: Wed May 14 18:54:39 2025 -0400 drm/amdgpu/vcn3: read back register after written The addition of register read-back in VCN v3.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit d9e688b9148bb23629d32017344888dd67ec2ab1 Author: David (Ming Qiang) Wu Date: Wed May 14 18:54:01 2025 -0400 drm/amdgpu/vcn2.5: read back register after written The addition of register read-back in VCN v2.5 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 8c5ed7f5abe2cae3b0bf33d4f51f6fb03aadf3ff Author: David (Ming Qiang) Wu Date: Wed May 14 18:52:13 2025 -0400 drm/amdgpu/vcn2: read back register after written The addition of register read-back in VCN v2.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 988b1d2164a1cbe56616a1ded0c877a3ae753558 Author: Fangzhi Zuo Date: Tue May 20 15:30:25 2025 -0400 Revert "drm/amd/display: pause the workload setting in dm" This reverts commit 50f29ead1f1ba48983b6c5e3813b15e497714f55. Reason for revert: cause corruption on Dell U3224KB DP2 display. Signed-off-by: Fangzhi Zuo Reviewed-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0ef2803173f180fe31b5083b1dcf0f8fa6e5608f Author: David (Ming Qiang) Wu Date: Wed May 14 18:50:15 2025 -0400 drm/amdgpu/vcn1: read back register after written V3: drop changes where readbacks have implemented. This patch set is to add readbacks only. V2: use common register UVD_STATUS for readback (standard PCI MMIO behavior, i.e. readback post all writes to let the writes hit the hardware) add readback in ..._stop() for more coverage. Similar to the changes made for VCN v4.0.5 where readback to post the writes to avoid race with the doorbell, the addition of register readback support in other VCN versions is intended to prevent potential race conditions, even though such issues have not been observed yet. This change ensures consistency across different VCN variants and helps avoid similar issues. The overhead introduced is negligible. Reviewed-by: Ruijing Dong Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 040585df957d45ebec0297bad525f39471229987 Author: Aurabindo Pillai Date: Thu May 22 10:34:50 2025 -0400 drm/amd/display: Reuse Subvp debug option for FAMS FAMS is the successor to SubVP starting with DCN4x. Reuse the same debug option to disable FAMS for debugging purposes. Signed-off-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 1b824eef269db44d068bbc0de74c94a8e8f9ce02 Author: Aurabindo Pillai Date: Wed May 21 16:05:39 2025 -0400 Revert "drm/amd/display: more liberal vmin/vmax update for freesync" This reverts commit cfb2d41831ee5647a4ae0ea7c24971a92d5dfa0d since it causes regressions on certain configs. Revert until the issue can be isolated and debugged. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4238 Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 27eab4c644236a9324084a70fe79e511cbd07393 Author: Horatiu Vultur Date: Wed May 28 11:36:19 2025 +0200 net: lan966x: Make sure to insert the vlan tags also in host mode When running these commands on DUT (and similar at the other end) ip link set dev eth0 up ip link add link eth0 name eth0.10 type vlan id 10 ip addr add 10.0.0.1/24 dev eth0.10 ip link set dev eth0.10 up ping 10.0.0.2 The ping will fail. The reason why is failing is because, the network interfaces for lan966x have a flag saying that the HW can insert the vlan tags into the frames(NETIF_F_HW_VLAN_CTAG_TX). Meaning that the frames that are transmitted don't have the vlan tag inside the skb data, but they have it inside the skb. We already get that vlan tag and put it in the IFH but the problem is that we don't configure the HW to rewrite the frame when the interface is in host mode. The fix consists in actually configuring the HW to insert the vlan tag if it is different than 0. Reviewed-by: Maxime Chevallier Fixes: 6d2c186afa5d ("net: lan966x: Add vlan support.") Signed-off-by: Horatiu Vultur Link: https://patch.msgid.link/20250528093619.3738998-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit cb6a85f38f456b086c366e346ebb67ffa70c7243 Author: Gautham R. Shenoy Date: Thu May 29 14:21:43 2025 +0530 acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() commit 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") modified get_max_boost_ratio() to return the nominal_freq advertised in the _CPC object. This was for the purposes of computing the maximum frequency. The frequencies advertised in _CPC objects are in MHz. However, cpufreq expects the frequency to be in KHz. Since the nominal_freq returned by get_max_boost_ratio() was not in KHz but instead in MHz,the cpuinfo_max_frequency that was computed using this nominal_freq was incorrect and an invalid value which resulted in cpufreq reporting the P0 frequency as the cpuinfo_max_freq. Fix this by converting the nominal_freq to KHz before returning the same from get_max_boost_ratio(). Reported-by: Manu Bretelle Closes: https://lore.kernel.org/lkml/aDaB63tDvbdcV0cg@HQ-GR2X1W2P57/ Fixes: 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") Signed-off-by: Gautham R. Shenoy Cc: 6.14+ # 6.14+ Link: https://patch.msgid.link/20250529085143.709-1-gautham.shenoy@amd.com Signed-off-by: Rafael J. Wysocki commit 99d232804405e35d7a9af1536a057578a1442e81 Author: Steven Rostedt Date: Tue May 27 14:31:44 2025 -0400 ring-buffer: Simplify functions with __free(kfree) to free allocations The function rb_allocate_pages() allocates cpu_buffer and on error needs to free it. It has a single return. Use __free(kfree) and return directly on errors and have the return use return_ptr(cpu_buffer). The function alloc_buffer() allocates buffer and on error needs to free it. It has a single return. Use __free(kfree) and return directly on errors and have the return use return_ptr(buffer). The function __rb_map_vma() allocates a temporary array "pages". Have it use __free() and not worry about freeing it when returning. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250527143144.6edc4625@gandalf.local.home Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 60bc720e10eac397b3adae975095df77bc368b88 Author: Steven Rostedt Date: Tue May 27 12:20:09 2025 -0400 ring-buffer: Make ring_buffer_{un}map() simpler with guard(mutex) Convert the taking of the buffer->mutex and the cpu_buffer->mapping_lock over to guard(mutex) and simplify the ring_buffer_map() and ring_buffer_unmap() functions. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250527122009.267efb72@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit b2e7c6ed26e90fab1e5e626071e54e3b9ec9cb5a Author: Steven Rostedt Date: Tue May 27 14:52:16 2025 -0400 ring-buffer: Simplify ring_buffer_read_page() with guard() The function ring_buffer_read_page() had two gotos. One was simply returning "ret" and the other was unlocking the reader_lock. There's no reason to use goto to simply return the "ret" variable. Instead just return the value. The jump to the unlocking of the reader_lock can be replaced by guard(raw_spinlock_irqsave)(&cpu_buffer->reader_lock). With these two changes the "ret" variable is no longer used and can be removed. The return value on non-error is what was read and is stored in the "read" variable. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250527145216.0187cf36@gandalf.local.home Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit f0d8cbc8ccc6299046ceb5023a2af9e2b75c4106 Author: Steven Rostedt Date: Tue May 27 14:46:23 2025 -0400 ring-buffer: Simplify reset_disabled_cpu_buffer() with use of guard() Use guard(raw_spinlock_irqsave)() in reset_disabled_cpu_buffer() to simplify the locking. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250527144623.77a9cc47@gandalf.local.home Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit f115d2b70bff2665f67fa8e8dc5ed9452b696c44 Author: Steven Rostedt Date: Tue May 27 14:57:53 2025 -0400 ring-buffer: Remove jump to out label in ring_buffer_swap_cpu() The function ring_buffer_swap_cpu() has a bunch of jumps to the label out that simply returns "ret". There's no reason to jump to a label that simply returns a value. Just return directly from there. This goes back to almost the beginning when commit 8aabee573dff ("ring-buffer: remove unneeded get_online_cpus") was introduced. That commit removed a put_online_cpus() from that label, but never updated all the jumps to it that now no longer needed to do anything but return a value. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250527145753.6b45d840@gandalf.local.home Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 2d22216521b12c4b09479aa684504092cd67970b Author: Steven Rostedt Date: Tue May 27 15:51:16 2025 -0400 ring-buffer: Removed unnecessary if() goto out where out is the next line In the function ring_buffer_discard_commit() there's an if statement that jumps to the next line: if (rb_try_to_discard(cpu_buffer, event)) goto out; out: This was caused by the change that modified the way timestamps were taken in interrupt context, and removed the code between the if statement and the goto, but failed to update the conditional logic. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250527155116.227f35be@gandalf.local.home Fixes: a389d86f7fd0 ("ring-buffer: Have nested events still record running time stamp") Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 32dc0042528d385d83bf458e4cf3a49c5110afea Author: Masami Hiramatsu (Google) Date: Fri May 23 00:54:52 2025 +0900 tracing: Reset last-boot buffers when reading out all cpu buffers Reset the last-boot ring buffers when read() reads out all cpu buffers through trace_pipe/trace_pipe_raw. This prevents ftrace to unwind ring buffer read pointer next boot. Note that this resets only when all per-cpu buffers are empty, and read via read(2) syscall. For example, if you read only one of the per-cpu trace_pipe, it does not reset it. Also, reading buffer by splice(2) syscall does not reset because some data in the reader (the last) page. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/174792929202.496143.8184644221859580999.stgit@mhiramat.tok.corp.google.com Suggested-by: Steven Rostedt Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit c2a08311427cc8c5c547e5d700cb2f93d63fcb2a Author: Steven Rostedt Date: Tue Apr 1 16:25:54 2025 -0400 ring-buffer: Allow reserve_mem persistent ring buffers to be mmapped When the persistent ring buffer is created from the memory returned by reserve_mem there is nothing prohibiting it to be memory mapped to user space. The memory is the same as the pages allocated by alloc_page(). The way the memory is managed by the ring buffer code is slightly different though and needs to be addressed. The persistent memory uses the page->id for its own purpose where as the user mmap buffer currently uses that for the subbuf array mapped to user space. If the buffer is a persistent buffer, use the page index into that buffer as the identifier instead of the page->id. That is, the page->id for a persistent buffer, represents the order of the buffer is in the link list. ->id == 0 means it is the reader page. When a reader page is swapped, the new reader page's ->id gets zero, and the old reader page gets the ->id of the page that it swapped with. The user space mapping has the ->id is the index of where it was mapped in user space and does not change while it is mapped. Since the persistent buffer is fixed in its location, the index of where a page is in the memory range can be used as the "id" to put in the meta page array, and it can be mapped in the same order to user space as it is in the persistent memory. A new rb_page_id() helper function is used to get and set the id depending on if the page is a normal memory allocated buffer or a physical memory mapped buffer. Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Jann Horn Link: https://lore.kernel.org/20250401203332.246646011@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 4fc78a7c9ca994e1da5d3940704d4e8f0ea8c5e4 Author: Steven Rostedt Date: Wed May 28 12:15:55 2025 -0400 ring-buffer: Do not trigger WARN_ON() due to a commit_overrun When reading a memory mapped buffer the reader page is just swapped out with the last page written in the write buffer. If the reader page is the same as the commit buffer (the buffer that is currently being written to) it was assumed that it should never have missed events. If it does, it triggers a WARN_ON_ONCE(). But there just happens to be one scenario where this can legitimately happen. That is on a commit_overrun. A commit overrun is when an interrupt preempts an event being written to the buffer and then the interrupt adds so many new events that it fills and wraps the buffer back to the commit. Any new events would then be dropped and be reported as "missed_events". In this case, the next page to read is the commit buffer and after the swap of the reader page, the reader page will be the commit buffer, but this time there will be missed events and this triggers the following warning: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1127 at kernel/trace/ring_buffer.c:7357 ring_buffer_map_get_reader+0x49a/0x780 Modules linked in: kvm_intel kvm irqbypass CPU: 2 UID: 0 PID: 1127 Comm: trace-cmd Not tainted 6.15.0-rc7-test-00004-g478bc2824b45-dirty #564 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:ring_buffer_map_get_reader+0x49a/0x780 Code: 00 00 00 48 89 fe 48 c1 ee 03 80 3c 2e 00 0f 85 ec 01 00 00 4d 3b a6 a8 00 00 00 0f 85 8a fd ff ff 48 85 c0 0f 84 55 fe ff ff <0f> 0b e9 4e fe ff ff be 08 00 00 00 4c 89 54 24 58 48 89 54 24 50 RSP: 0018:ffff888121787dc0 EFLAGS: 00010002 RAX: 00000000000006a2 RBX: ffff888100062800 RCX: ffffffff8190cb49 RDX: ffff888126934c00 RSI: 1ffff11020200a15 RDI: ffff8881010050a8 RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffed1024d26982 R10: ffff888126934c17 R11: ffff8881010050a8 R12: ffff888126934c00 R13: ffff8881010050b8 R14: ffff888101005000 R15: ffff888126930008 FS: 00007f95c8cd7540(0000) GS:ffff8882b576e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f95c8de4dc0 CR3: 0000000128452002 CR4: 0000000000172ef0 Call Trace: ? __pfx_ring_buffer_map_get_reader+0x10/0x10 tracing_buffers_ioctl+0x283/0x370 __x64_sys_ioctl+0x134/0x190 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f95c8de48db Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007ffe037ba110 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffe037bb2b0 RCX: 00007f95c8de48db RDX: 0000000000000000 RSI: 0000000000005220 RDI: 0000000000000006 RBP: 00007ffe037ba180 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe037bb6f8 R14: 00007f95c9065000 R15: 00005575c7492c90 irq event stamp: 5080 hardirqs last enabled at (5079): [] _raw_spin_unlock_irqrestore+0x50/0x70 hardirqs last disabled at (5080): [] _raw_spin_lock_irqsave+0x63/0x70 softirqs last enabled at (4182): [] handle_softirqs+0x552/0x710 softirqs last disabled at (4159): [] __irq_exit_rcu+0x107/0x210 ---[ end trace 0000000000000000 ]--- The above was triggered by running on a kernel with both lockdep and KASAN as well as kmemleak enabled and executing the following command: # perf record -o perf-test.dat -a -- trace-cmd record --nosplice -e all -p function hackbench 50 With perf interjecting a lot of interrupts and trace-cmd enabling all events as well as function tracing, with lockdep, KASAN and kmemleak enabled, it could cause an interrupt preempting an event being written to add enough events to wrap the buffer. trace-cmd was modified to have --nosplice use mmap instead of reading the buffer. The way to differentiate this case from the normal case of there only being one page written to where the swap of the reader page received that one page (which is the commit page), check if the tail page is on the reader page. The difference between the commit page and the tail page is that the tail page is where new writes go to, and the commit page holds the first write that hasn't been committed yet. In the case of an interrupt preempting the write of an event and filling the buffer, it would move the tail page but not the commit page. Have the warning only trigger if the tail page is also on the reader page, and also print out the number of events dropped by a commit overrun as that can not yet be safely added to the page so that the reader can see there were events dropped. Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250528121555.2066527e@gandalf.local.home Fixes: fe832be05a8ee ("ring-buffer: Have mmapped ring buffer keep track of missed events") Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 589561cb455189154a7110a39d9fcc39965f3104 Author: Yang Shen Date: Thu May 29 14:17:04 2025 +0800 MAINTAINERS: Update HiSilicon SFC driver maintainer Add Yang Shen as the maintainer of the HiSilicon SFC driver, replacing Jay Fang. Signed-off-by: Yang Shen Reviewed-by: Jay Fang Link: https://patch.msgid.link/20250529061704.190725-1-shenyang39@huawei.com Signed-off-by: Mark Brown commit 3b5d1efc878adee4835165663297a75193343d37 Author: Yang Shen Date: Thu May 29 14:14:06 2025 +0800 MAINTAINERS: Update HiSilicon SPI Controller driver maintainer Add Yang Shen as the maintainer of the HiSilicon SPI Controller driver, replacing Jay Fang. Signed-off-by: Yang Shen Reviewed-by: Jay Fang Link: https://patch.msgid.link/20250529061406.183992-1-shenyang39@huawei.com Signed-off-by: Mark Brown commit f65dca1752b70ec4f678ae4dbdd5892335bcbbd8 Merge: 54d34165b4f786 54ec8b08216f3b Author: Paolo Abeni Date: Thu May 29 12:55:33 2025 +0200 Merge tag 'linux-can-fixes-for-6.16-20250529' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-05-29 this is a pull request of 1 patch for net/main. The patch is by Fedor Pchelkin and fixes a slab-out-of-bounds access in the kvaser_pciefd driver. linux-can-fixes-for-6.16-20250529 * tag 'linux-can-fixes-for-6.16-20250529' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: kvaser_pciefd: refine error prone echo_skb_max handling logic ==================== Link: https://patch.msgid.link/20250529075313.1101820-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni commit 54d34165b4f786d7fea8412a18fb4a54c1eab623 Author: Dan Carpenter Date: Wed May 28 11:11:09 2025 +0300 net/mlx4_en: Prevent potential integer overflow calculating Hz The "freq" variable is in terms of MHz and "max_val_cycles" is in terms of Hz. The fact that "max_val_cycles" is a u64 suggests that support for high frequency is intended but the "freq_khz * 1000" would overflow the u32 type if we went above 4GHz. Use unsigned long long type for the mutliplication to prevent that. Fixes: 31c128b66e5b ("net/mlx4_en: Choose time-stamping shift value according to HW frequency") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Link: https://patch.msgid.link/aDbFHe19juIJKjsb@stanley.mountain Signed-off-by: Paolo Abeni commit dabb90391028799fb524680feb4eb96eb904ca6f Author: Miklos Szeredi Date: Tue Apr 8 15:14:20 2025 +0200 fuse: increase readdir buffer size Increase the buffer size to the count requested by userspace. This improves performance. Signed-off-by: Miklos Szeredi Signed-off-by: Bernd Schubert commit 467e245d47e6662a4cbf4184d9e6d0b1b120c0bf Author: Miklos Szeredi Date: Wed Apr 16 12:44:55 2025 +0200 readdir: supply dir_context.count as readdir buffer size hint This is a preparation for large readdir buffers in fuse. Simply setting the fuse buffer size to the userspace buffer size should work, the record sizes are similar (fuse's is slightly larger than libc's, so no overflow should ever happen). Signed-off-by: Miklos Szeredi Signed-off-by: Jaco Kroon commit c31f91c6af96a5eb0632f4aee8d4e39cad7d7559 Author: Miklos Szeredi Date: Wed Apr 16 10:53:58 2025 +0200 fuse: don't allow signals to interrupt getdents copying When getting the directory contents, the entries are first fetched to a kernel buffer, then they are copied to userspace with dir_emit(). This second phase is non-blocking as long as the userspace buffer is not paged out, making it interruptible makes zero sense. Overload d_type as flags, since it only uses 4 bits from 32. Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit f3cb8bd908c72eb7b766eca05aac1685749eff02 Author: Joanne Koong Date: Mon May 12 15:58:40 2025 -0700 fuse: support large folios for writeback Add support for folios larger than one page size for writeback. Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit 906354c87f4917210aa4400708906200ae71614c Author: Joanne Koong Date: Mon May 12 15:58:38 2025 -0700 fuse: support large folios for readahead Add support for folios larger than one page size for readahead. Signed-off-by: Joanne Koong Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit ff7c3ee4842d87f8fad000039d87692eb03e31e7 Author: Joanne Koong Date: Mon May 12 15:58:37 2025 -0700 fuse: support large folios for queued writes Add support for folios larger than one page size for queued writes. Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit c91440c89fbd9d7d23430e5b4cb9e2fd779cc078 Author: Joanne Koong Date: Mon May 12 15:58:36 2025 -0700 fuse: support large folios for stores Add support for folios larger than one page size for stores. Also change variable naming from "this_num" to "nr_bytes". Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit cacc0645bcad3e20ad17e5942944c51cbe13297e Author: Joanne Koong Date: Mon May 12 15:58:35 2025 -0700 fuse: support large folios for symlinks Support large folios for symlinks and change the name from fuse_getlink_page() to fuse_getlink_folio(). Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 351a24eb48209b50e575a28a0abe07d551187ca8 Author: Joanne Koong Date: Mon May 12 15:58:34 2025 -0700 fuse: support large folios for folio reads Add support for folios larger than one page size for folio reads into the page cache. Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit d60a6015e1a2848fc04237bd37ac65b204772313 Author: Joanne Koong Date: Mon May 12 15:58:33 2025 -0700 fuse: support large folios for writethrough writes Add support for folios larger than one page size for writethrough writes. Signed-off-by: Joanne Koong Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit 63c69ad3d18a8032d50c65de5a3b87136f0cfb42 Author: Joanne Koong Date: Mon May 12 15:58:32 2025 -0700 fuse: refactor fuse_fill_write_pages() Refactor the logic in fuse_fill_write_pages() for copying out write data. This will make the future change for supporting large folios for writes easier. No functional changes. Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 3568a956932621cafadafc8b75fcf6dc06555105 Author: Joanne Koong Date: Mon May 12 15:58:31 2025 -0700 fuse: support large folios for retrieves Add support for folios larger than one page size for retrieves. Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 394244b24fdd09cbbe0290494073ad95a547b44f Author: Joanne Koong Date: Mon May 12 15:58:30 2025 -0700 fuse: support copying large folios Currently, all folios associated with fuse are one page size. As part of the work to enable large folios, this commit adds support for copying to/from folios larger than one page size. Signed-off-by: Joanne Koong Reviewed-by: Jeff Layton Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 293bb049380e14a176e98d3701b85b6b5d3140fd Author: Ard Biesheuvel Date: Wed Apr 2 08:05:31 2025 +0100 ARM: 9446/1: Disallow kernel mode NEON when IRQs are disabled Commit c79f81631142 ("ARM: 9283/1: permit non-nested kernel mode NEON in softirq context") relaxed the rules around the use of SIMD instructions in kernel mode on ARM, to allow such use when serving a softirq. To avoid having to preserve/restore kernel mode NEON state when such a softirq is taken, softirqs are now disabled when using the NEON from task context. However, the fact that the softirq API does not allow unmasking of softirqs with interrupts disabled was overlooked, resulting in a WARN() in some cases, as reported by Guenter: WARNING: CPU: 0 PID: 1145 at kernel/softirq.c:369 __local_bh_enable_ip+0x118/0x194 Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x7c/0xac dump_stack_lvl from __warn+0x7c/0x1b8 __warn from warn_slowpath_fmt+0x19c/0x1a4 warn_slowpath_fmt from __local_bh_enable_ip+0x118/0x194 __local_bh_enable_ip from crc_t10dif_arch+0xd4/0xe8 crc_t10dif_arch from crc_t10dif_wrapper+0x14/0x1c crc_t10dif_wrapper from crc_main_test+0x178/0x360 crc_main_test from kunit_try_run_case+0x78/0x1e0 kunit_try_run_case from kunit_generic_run_threadfn_adapter+0x1c/0x34 kunit_generic_run_threadfn_adapter from kthread+0x118/0x254 kthread from ret_from_fork+0x14/0x28 While disabling softirqs is not really needed when running with IRQs disabled (given that the only way a softirq can be delivered asynchrously is over the back of an IRQ), let's not complicate this logic more than needed, and simply disallow use of the NEON in kernel mode when IRQs are disabled. Another approach might be to only disable and re-enable softirqs if IRQs are enabled, but other than the test case above, there are no clear use cases for doing non-trivial arithmetic processing (hence using an accelerated SIMD implementation) with IRQs disabled. Reported-by: Guenter Roeck Tested-by: Guenter Roeck Link: https://lore.kernel.org/all/389b899f-893c-4855-9e30-d8920a5d6f91@roeck-us.net Reviewed-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) commit ba99c627aac85bc746fb4a6e2d79edb3ad100326 Author: Yanqing Wang Date: Wed May 28 15:53:51 2025 +0800 driver: net: ethernet: mtk_star_emac: fix suspend/resume issue Identify the cause of the suspend/resume hang: netif_carrier_off() is called during link state changes and becomes stuck while executing linkwatch_work(). To resolve this issue, call netif_device_detach() during the Ethernet suspend process to temporarily detach the network device from the kernel and prevent the suspend/resume hang. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Yanqing Wang Signed-off-by: Macpaul Lin Signed-off-by: Biao Huang Link: https://patch.msgid.link/20250528075351.593068-1-macpaul.lin@mediatek.com Signed-off-by: Paolo Abeni commit 4257271d2a5bd2d2a889a2f105dd6650c857988d Author: Geert Uytterhoeven Date: Tue May 27 21:33:41 2025 +0200 hinic3: Remove printed message during module init No driver should spam the kernel log when merely being loaded. Fixes: 17fcb3dc12bbee8e ("hinic3: module initialization and tx/rx logic") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/5310dac0b3ab4bd16dd8fb761566f12e73b38cab.1748357352.git.geert+renesas@glider.be Signed-off-by: Paolo Abeni commit f29ccaa07cf3d35990f4d25028cc55470d29372b Author: Charalampos Mitrodimas Date: Tue May 27 16:35:44 2025 +0000 net: tipc: fix refcount warning in tipc_aead_encrypt syzbot reported a refcount warning [1] caused by calling get_net() on a network namespace that is being destroyed (refcount=0). This happens when a TIPC discovery timer fires during network namespace cleanup. The recently added get_net() call in commit e279024617134 ("net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done") attempts to hold a reference to the network namespace. However, if the namespace is already being destroyed, its refcount might be zero, leading to the use-after-free warning. Replace get_net() with maybe_get_net(), which safely checks if the refcount is non-zero before incrementing it. If the namespace is being destroyed, return -ENODEV early, after releasing the bearer reference. [1]: https://lore.kernel.org/all/68342b55.a70a0220.253bc2.0091.GAE@google.com/T/#m12019cf9ae77e1954f666914640efa36d52704a2 Reported-by: syzbot+f0c4a4aba757549ae26c@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/68342b55.a70a0220.253bc2.0091.GAE@google.com/T/#m12019cf9ae77e1954f666914640efa36d52704a2 Fixes: e27902461713 ("net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done") Signed-off-by: Charalampos Mitrodimas Reviewed-by: Tung Nguyen Link: https://patch.msgid.link/20250527-net-tipc-warning-v2-1-df3dc398a047@posteo.net Signed-off-by: Paolo Abeni commit fd579a2ebbe4b7e6b388915a50d904e772a35c61 Author: David Howells Date: Tue May 27 16:01:43 2025 +0100 rxrpc: Fix return from none_validate_challenge() Fix the return value of none_validate_challenge() to be explicitly true (which indicates the source packet should simply be discarded) rather than implicitly true (because rxrpc_abort_conn() always returns -EPROTO which gets converted to true). Note that this change doesn't change the behaviour of the code (which is correct by accident) and, in any case, we *shouldn't* get a CHALLENGE packet to an rxnull connection (ie. no security). Reported-by: Dan Carpenter Closes: https://lists.infradead.org/pipermail/linux-afs/2025-April/009738.html Signed-off-by: David Howells cc: Marc Dionne cc: Jakub Kicinski cc: "David S. Miller" cc: Eric Dumazet cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Reviewed-by: Simon Horman Link: https://patch.msgid.link/10720.1748358103@warthog.procyon.org.uk Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE") Signed-off-by: Paolo Abeni commit f41a94aade120dc60322865f363cee7865f2df01 Author: Alok Tiwari Date: Tue May 27 06:08:16 2025 -0700 gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt Previously, the RX_BUFFERS_POSTED stat incorrectly reported the fill_cnt from RX queue 0 for all queues, resulting in inaccurate per-queue statistics. Fix this by correctly indexing priv->rx[idx].fill_cnt for each RX queue. Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.") Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20250527130830.1812903-1-alok.a.tiwari@oracle.com Signed-off-by: Paolo Abeni commit eb7fd7aa35bfcc1e1fda4ecc42ccfcb526cdc780 Author: Quentin Schulz Date: Tue May 27 13:56:23 2025 +0200 net: stmmac: platform: guarantee uniqueness of bus_id bus_id is currently derived from the ethernetX alias. If one is missing for the device, 0 is used. If ethernet0 points to another stmmac device or if there are 2+ stmmac devices without an ethernet alias, then bus_id will be 0 for all of those. This is an issue because the bus_id is used to generate the mdio bus id (new_bus->id in drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c stmmac_mdio_register) and this needs to be unique. This allows to avoid needing to define ethernet aliases for devices with multiple stmmac controllers (such as the Rockchip RK3588) for multiple stmmac devices to probe properly. Obviously, the bus_id isn't guaranteed to be stable across reboots if no alias is set for the device but that is easily fixed by simply adding an alias if this is desired. Fixes: 25c83b5c2e82 ("dt:net:stmmac: Add support to dwmac version 3.610 and 3.710") Signed-off-by: Quentin Schulz Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20250527-stmmac-mdio-bus_id-v2-1-a5ca78454e3c@cherry.de Signed-off-by: Paolo Abeni commit 54ec8b08216f3be2cc98b33633d3c8ea79749895 Author: Fedor Pchelkin Date: Wed May 28 22:27:12 2025 +0300 can: kvaser_pciefd: refine error prone echo_skb_max handling logic echo_skb_max should define the supported upper limit of echo_skb[] allocated inside the netdevice's priv. The corresponding size value provided by this driver to alloc_candev() is KVASER_PCIEFD_CAN_TX_MAX_COUNT which is 17. But later echo_skb_max is rounded up to the nearest power of two (for the max case, that would be 32) and the tx/ack indices calculated further during tx/rx may exceed the upper array boundary. Kasan reported this for the ack case inside kvaser_pciefd_handle_ack_packet(), though the xmit function has actually caught the same thing earlier. BUG: KASAN: slab-out-of-bounds in kvaser_pciefd_handle_ack_packet+0x2d7/0x92a drivers/net/can/kvaser_pciefd.c:1528 Read of size 8 at addr ffff888105e4f078 by task swapper/4/0 CPU: 4 UID: 0 PID: 0 Comm: swapper/4 Not tainted 6.15.0 #12 PREEMPT(voluntary) Call Trace: dump_stack_lvl lib/dump_stack.c:122 print_report mm/kasan/report.c:521 kasan_report mm/kasan/report.c:634 kvaser_pciefd_handle_ack_packet drivers/net/can/kvaser_pciefd.c:1528 kvaser_pciefd_read_packet drivers/net/can/kvaser_pciefd.c:1605 kvaser_pciefd_read_buffer drivers/net/can/kvaser_pciefd.c:1656 kvaser_pciefd_receive_irq drivers/net/can/kvaser_pciefd.c:1684 kvaser_pciefd_irq_handler drivers/net/can/kvaser_pciefd.c:1733 __handle_irq_event_percpu kernel/irq/handle.c:158 handle_irq_event kernel/irq/handle.c:210 handle_edge_irq kernel/irq/chip.c:833 __common_interrupt arch/x86/kernel/irq.c:296 common_interrupt arch/x86/kernel/irq.c:286 Tx max count definitely matters for kvaser_pciefd_tx_avail(), but for seq numbers' generation that's not the case - we're free to calculate them as would be more convenient, not taking tx max count into account. The only downside is that the size of echo_skb[] should correspond to the max seq number (not tx max count), so in some situations a bit more memory would be consumed than could be. Thus make the size of the underlying echo_skb[] sufficient for the rounded max tx value. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 8256e0ca6010 ("can: kvaser_pciefd: Fix echo_skb race") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Link: https://patch.msgid.link/20250528192713.63894-1-pchelkin@ispras.ru Signed-off-by: Marc Kleine-Budde commit 63bfd78aae9a90210b0d369bb2836cca90402a95 Merge: 3e515fc8601a1e b217785073f073 0409ac483a81a2 09febae220d2ea b176dab2389c3c Author: Stephen Boyd Date: Thu May 29 00:30:39 2025 -0700 Merge branches 'clk-amlogic', 'clk-allwinner', 'clk-rockchip' and 'clk-qcom' into clk-next * clk-amlogic: clk: meson: Do not enable by default during compile testing clk: meson-g12a: add missing fclk_div2 to spicc * clk-allwinner: clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support dt-bindings: allwinner: add H616 DE33 clock binding clk: sunxi-ng: h616: Add LVDS reset for LCD TCON dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset clk: sunxi: Do not enable by default during compile testing clk: sunxi-ng: Do not enable by default during compile testing * clk-rockchip: clk: rockchip: rk3528: add slab.h header include clk: rockchip: rk3576: add missing slab.h include clk: rockchip: rename gate-grf clk file clk: rockchip: rename branch_muxgrf to branch_grf_mux clk: rockchip: Pass NULL as reg pointer when registering GRF MMC clocks clk: rockchip: rk3036: mark ddrphy as critical clk: rockchip: rk3036: fix implementation of usb480m clock mux dt-bindings: clock: rk3036: add SCLK_USB480M clock-id clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region clk: rockchip: Support MMC clocks in GRF region dt-bindings: clock: Add GRF clock definition for RK3528 clk: rockchip: add GATE_GRFs for SAI MCLKOUT to rk3576 clk: rockchip: introduce GRF gates clk: rockchip: introduce auxiliary GRFs dt-bindings: clock: rk3576: add IOC gated clocks clk: rockchip: rk3568: Add PLL rate for 33.3MHz clk: rockchip: Drop empty init callback for rk3588 PLL type clk: rockchip: rk3588: Add PLL rate for 1500 MHz * clk-qcom: clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks clk: qcom: gcc: Set FORCE_MEM_CORE_ON for gcc_ufs_axi_clk for 8650/8750 clk: qcom: rpmh: make clkaN optional clk: qcom: Add support for Camera Clock Controller on QCS8300 clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz dt-bindings: clock: add SM6350 QCOM video clock bindings clk: qcom: gpucc-sm6350: Add *_wait_val values for GDSCs clk: qcom: gcc-sm6350: Add *_wait_val values for GDSCs clk: qcom: dispcc-sm6350: Add *_wait_val values for GDSCs clk: qcom: camcc-sm6350: Add *_wait_val values for GDSCs clk: qcom: Fix missing error check for dev_pm_domain_attach() commit 3e515fc8601a1ea85becf7d990ad8700e012a70a Merge: 7459da16c9a4bf 6bbc69e58aa836 a08f0ac32bf48e 29c98b13921eb1 3a4c538e13d65e Author: Stephen Boyd Date: Thu May 29 00:30:28 2025 -0700 Merge branches 'clk-socfpga', 'clk-sophgo', 'clk-thead' and 'clk-samsung' into clk-next * clk-socfpga: clk: socfpga: stratix10: Optimize local variables clk: socfpga: clk-pll: Optimize local variables * clk-sophgo: clk: sophgo: Add clock controller support for SG2044 SoC clk: sophgo: Add PLL clock controller support for SG2044 SoC dt-bindings: clock: sophgo: add clock controller for SG2044 dt-bindings: soc: sophgo: Add SG2044 top syscon device clk: sophgo: Add support for newly added precise compatible dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC * clk-thead: clk: thead: Add clock support for VO subsystem in T-HEAD TH1520 SoC dt-bindings: clock: thead: Add TH1520 VO clock controller * clk-samsung: clk: samsung: correct clock summary for hsi1 block clk: samsung: exynosautov920: Fix incorrect CLKS_NR_CPUCL0 definition clk: samsung: exynosautov920: add cpucl1/2 clock support dt-bindings: clock: exynosautov920: add cpucl1/2 clock definitions clk: samsung: exynosautov920: add cpucl0 clock support dt-bindings: clock: exynosautov920: add cpucl0 clock definitions clk: samsung: Use samsung CCF common function commit 7459da16c9a4bf324e7f5789f296e02e7bc24b68 Merge: 72b421e645a3d8 1ffbdb7aa89af5 f37f6ba2302e82 7a0c1872ee7db2 Author: Stephen Boyd Date: Thu May 29 00:30:17 2025 -0700 Merge branches 'clk-bindings', 'clk-renesas', 'clk-spacemit' and 'clk-cleanup' into clk-next * clk-bindings: dt-bindings: clock: Drop st,stm32h7-rcc.txt dt-bindings: clock: convert bcm2835-aux-clock to yaml dt-bindings: clock: Drop maxim,max77686.txt dt-bindings: clock: convert vf610-clock.txt to yaml format * clk-renesas: (26 commits) clk: renesas: r9a09g047: Add XSPI clock/reset clk: renesas: r9a09g047: Add support for xspi mux and divider dt-bindings: clock: renesas,r9a09g047-cpg: Add XSPI and GBETH PTP core clocks clk: renesas: Use str_on_off() helper clk: renesas: r9a09g057: Add clock and reset entries for USB2 dt-bindings: clock: renesas,r9a09g057-cpg: Add USB2 PHY and GBETH PTP core clocks clk: renesas: rzv2h: Use both CLK_ON and CLK_MON bits for clock state validation clk: renesas: rzv2h: Use str_on_off() helper in rzv2h_mod_clock_endisable() clk: renesas: rzv2h: Support static dividers without RMW clk: renesas: rzv2h: Add macro for defining static dividers clk: renesas: rzv2h: Add support for static mux clocks clk: renesas: r9a09g047: Add clock and reset entries for GE3D clk: renesas: rzv2h: Fix a typo clk: renesas: rzv2h: Add support for RZ/V2N SoC clk: renesas: rzv2h: Sort compatible list based on SoC part number dt-bindings: pinctrl: renesas: Document RZ/V2N SoC dt-bindings: clock: renesas: Document RZ/V2N SoC CPG dt-bindings: soc: renesas: Document SYS for RZ/V2N SoC dt-bindings: soc: renesas: Document Renesas RZ/V2N SoC variants and EVK clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert() ... * clk-spacemit: clk: spacemit: k1: Add TWSI8 bus and function clocks clk: spacemit: Add clock support for SpacemiT K1 SoC dt-bindings: clock: spacemit: Add spacemit,k1-pll dt-bindings: soc: spacemit: Add spacemit,k1-syscon * clk-cleanup: clk: test: Forward-declare struct of_phandle_args in kunit/clk.h clk: davinci: Use of_get_available_child_by_name() clk: bcm: rpi: Add NULL check in raspberrypi_clk_register() clk: bcm: rpi: Drop module alias clk: bcm: kona: Remove unused scaled_div_build commit b176dab2389c3c958ae14a44514fdecb42857b76 Merge: 0af2f6be1b4281 201bf08ba9e26e Author: Stephen Boyd Date: Wed May 28 23:03:20 2025 -0700 Merge tag 'qcom-clk-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - Camera clock controller driver for Qualcomm QCS8300 - Correct wait_val values for a variety of Qualcomm GDSCs - Fix Qualcomm X Elite UFS clock settings - Allow clkaN to be optional in the Qualcomm RPMh clock controller driver if command db doesn't define it commit 271683bb2cf32e5126c592b5d5e6a756fa374fd9 Author: Dong Chenchen Date: Tue May 27 19:41:52 2025 +0800 page_pool: Fix use-after-free in page_pool_recycle_in_ring syzbot reported a uaf in page_pool_recycle_in_ring: BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862 Read of size 8 at addr ffff8880286045a0 by task syz.0.284/6943 CPU: 0 UID: 0 PID: 6943 Comm: syz.0.284 Not tainted 6.13.0-rc3-syzkaller-gdfa94ce54f41 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:165 [inline] _raw_spin_unlock_bh+0x1b/0x40 kernel/locking/spinlock.c:210 spin_unlock_bh include/linux/spinlock.h:396 [inline] ptr_ring_produce_bh include/linux/ptr_ring.h:164 [inline] page_pool_recycle_in_ring net/core/page_pool.c:707 [inline] page_pool_put_unrefed_netmem+0x748/0xb00 net/core/page_pool.c:826 page_pool_put_netmem include/net/page_pool/helpers.h:323 [inline] page_pool_put_full_netmem include/net/page_pool/helpers.h:353 [inline] napi_pp_put_page+0x149/0x2b0 net/core/skbuff.c:1036 skb_pp_recycle net/core/skbuff.c:1047 [inline] skb_free_head net/core/skbuff.c:1094 [inline] skb_release_data+0x6c4/0x8a0 net/core/skbuff.c:1125 skb_release_all net/core/skbuff.c:1190 [inline] __kfree_skb net/core/skbuff.c:1204 [inline] sk_skb_reason_drop+0x1c9/0x380 net/core/skbuff.c:1242 kfree_skb_reason include/linux/skbuff.h:1263 [inline] __skb_queue_purge_reason include/linux/skbuff.h:3343 [inline] root cause is: page_pool_recycle_in_ring ptr_ring_produce spin_lock(&r->producer_lock); WRITE_ONCE(r->queue[r->producer++], ptr) //recycle last page to pool page_pool_release page_pool_scrub page_pool_empty_ring ptr_ring_consume page_pool_return_page //release all page __page_pool_destroy free_percpu(pool->recycle_stats); free(pool) //free spin_unlock(&r->producer_lock); //pool->ring uaf read recycle_stat_inc(pool, ring); page_pool can be free while page pool recycle the last page in ring. Add producer-lock barrier to page_pool_release to prevent the page pool from being free before all pages have been recycled. recycle_stat_inc() is empty when CONFIG_PAGE_POOL_STATS is not enabled, which will trigger Wempty-body build warning. Add definition for pool stat macro to fix warning. Suggested-by: Jakub Kicinski Link: https://lore.kernel.org/netdev/20250513083123.3514193-1-dongchenchen2@huawei.com Fixes: ff7d6b27f894 ("page_pool: refurbish version of page_pool code") Reported-by: syzbot+204a4382fcb3311f3858@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=204a4382fcb3311f3858 Signed-off-by: Dong Chenchen Reviewed-by: Toke Høiland-Jørgensen Reviewed-by: Mina Almasry Link: https://patch.msgid.link/20250527114152.3119109-1-dongchenchen2@huawei.com Signed-off-by: Jakub Kicinski commit 9ad0452c0277b816a435433cca601304cfac7c21 Author: Qasim Ijaz Date: Mon May 26 19:36:07 2025 +0100 net: ch9200: fix uninitialised access during mii_nway_restart In mii_nway_restart() the code attempts to call mii->mdio_read which is ch9200_mdio_read(). ch9200_mdio_read() utilises a local buffer called "buff", which is initialised with control_read(). However "buff" is conditionally initialised inside control_read(): if (err == size) { memcpy(data, buf, size); } If the condition of "err == size" is not met, then "buff" remains uninitialised. Once this happens the uninitialised "buff" is accessed and returned during ch9200_mdio_read(): return (buff[0] | buff[1] << 8); The problem stems from the fact that ch9200_mdio_read() ignores the return value of control_read(), leading to uinit-access of "buff". To fix this we should check the return value of control_read() and return early on error. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=3361c2d6f78a3e0892f9 Tested-by: syzbot Fixes: 4a476bd6d1d9 ("usbnet: New driver for QinHeng CH9200 devices") Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Link: https://patch.msgid.link/20250526183607.66527-1-qasdev00@gmail.com Signed-off-by: Jakub Kicinski commit 8542d6fac25c03b4bf36b2d762cfe60fda8491bb Author: Tengteng Yang Date: Tue May 27 11:04:19 2025 +0800 Fix sock_exceed_buf_limit not being triggered in __sk_mem_raise_allocated When a process under memory pressure is not part of any cgroup and the charged flag is false, trace_sock_exceed_buf_limit was not called as expected. This regression was introduced by commit 2def8ff3fdb6 ("sock: Code cleanup on __sk_mem_raise_allocated()"). The fix changes the default value of charged to true while preserving existing logic. Fixes: 2def8ff3fdb6 ("sock: Code cleanup on __sk_mem_raise_allocated()") Signed-off-by: Abel Wu Signed-off-by: Tengteng Yang Link: https://patch.msgid.link/20250527030419.67693-1-yangtengteng@bytedance.com Signed-off-by: Jakub Kicinski commit 1ce98bb2bb30713ec4374ef11ead0d7d3e856766 Author: Tamir Duberstein Date: Fri Apr 11 10:08:27 2025 -0400 rust: workqueue: remove HasWork::OFFSET Implement `HasWork::work_container_of` in `impl_has_work!`, narrowing the interface of `HasWork` and replacing pointer arithmetic with `container_of!`. Remove the provided implementation of `HasWork::get_work_offset` without replacement; an implementation is already generated in `impl_has_work!`. Remove the `Self: Sized` bound on `HasWork::work_container_of` which was apparently necessary to access `OFFSET` as `OFFSET` no longer exists. A similar API change was discussed on the hrtimer series[1]. Link: https://lore.kernel.org/all/20250224-hrtimer-v3-v6-12-rc2-v9-1-5bd3bf0ce6cc@kernel.org/ [1] Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20250411-no-offset-v3-1-c0b174640ec3@gmail.com Signed-off-by: Miguel Ojeda commit d6a0e0bfecccdcecb08defe75a137c7262352102 Author: Kees Cook Date: Wed May 28 11:26:22 2025 -0700 ubsan: integer-overflow: depend on BROKEN to keep this out of CI Depending on !COMPILE_TEST isn't sufficient to keep this feature out of CI because we can't stop it from being included in randconfig builds. This feature is still highly experimental, and is developed in lock-step with Clang's Overflow Behavior Types[1]. Depend on BROKEN to keep it from being enabled by anyone not expecting it. Link: https://discourse.llvm.org/t/rfc-v2-clang-introduce-overflowbehaviortypes-for-wrapping-and-non-wrapping-arithmetic/86507 [1] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505281024.f42beaa7-lkp@intel.com Fixes: 557f8c582a9b ("ubsan: Reintroduce signed overflow sanitizer") Acked-by: Eric Biggers Link: https://lore.kernel.org/r/20250528182616.work.296-kees@kernel.org Reviewed-by: Nathan Chancellor Acked-by: Marco Elver Signed-off-by: Kees Cook commit 90b83efa6701656e02c86e7df2cb1765ea602d07 Merge: 1b98f357dadd6e c5cebb241e27ed Author: Linus Torvalds Date: Wed May 28 15:52:42 2025 -0700 Merge tag 'bpf-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Pull bpf updates from Alexei Starovoitov: - Fix and improve BTF deduplication of identical BTF types (Alan Maguire and Andrii Nakryiko) - Support up to 12 arguments in BPF trampoline on arm64 (Xu Kuohai and Alexis Lothoré) - Support load-acquire and store-release instructions in BPF JIT on riscv64 (Andrea Parri) - Fix uninitialized values in BPF_{CORE,PROBE}_READ macros (Anton Protopopov) - Streamline allowed helpers across program types (Feng Yang) - Support atomic update for hashtab of BPF maps (Hou Tao) - Implement json output for BPF helpers (Ihor Solodrai) - Several s390 JIT fixes (Ilya Leoshkevich) - Various sockmap fixes (Jiayuan Chen) - Support mmap of vmlinux BTF data (Lorenz Bauer) - Support BPF rbtree traversal and list peeking (Martin KaFai Lau) - Tests for sockmap/sockhash redirection (Michal Luczaj) - Introduce kfuncs for memory reads into dynptrs (Mykyta Yatsenko) - Add support for dma-buf iterators in BPF (T.J. Mercier) - The verifier support for __bpf_trap() (Yonghong Song) * tag 'bpf-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (135 commits) bpf, arm64: Remove unused-but-set function and variable. selftests/bpf: Add tests with stack ptr register in conditional jmp bpf: Do not include stack ptr register in precision backtracking bookkeeping selftests/bpf: enable many-args tests for arm64 bpf, arm64: Support up to 12 function arguments bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem() bpf: Avoid __bpf_prog_ret0_warn when jit fails bpftool: Add support for custom BTF path in prog load/loadall selftests/bpf: Add unit tests with __bpf_trap() kfunc bpf: Warn with __bpf_trap() kfunc maybe due to uninitialized variable bpf: Remove special_kfunc_set from verifier selftests/bpf: Add test for open coded dmabuf_iter selftests/bpf: Add test for dmabuf_iter bpf: Add open coded dmabuf iterator bpf: Add dmabuf iterator dma-buf: Rename debugfs symbols bpf: Fix error return value in bpf_copy_from_user_dynptr libbpf: Use mmap to parse vmlinux BTF from sysfs selftests: bpf: Add a test for mmapable vmlinux BTF btf: Allow mmap of vmlinux btf ... commit 1b98f357dadd6ea613a435fbaef1a5dd7b35fd21 Merge: 47cf96fbe39383 f6bd8faeb113c8 Author: Linus Torvalds Date: Wed May 28 15:24:36 2025 -0700 Merge tag 'net-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "Core: - Implement the Device Memory TCP transmit path, allowing zero-copy data transmission on top of TCP from e.g. GPU memory to the wire. - Move all the IPv6 routing tables management outside the RTNL scope, under its own lock and RCU. The route control path is now 3x times faster. - Convert queue related netlink ops to instance lock, reducing again the scope of the RTNL lock. This improves the control plane scalability. - Refactor the software crc32c implementation, removing unneeded abstraction layers and improving significantly the related micro-benchmarks. - Optimize the GRO engine for UDP-tunneled traffic, for a 10% performance improvement in related stream tests. - Cover more per-CPU storage with local nested BH locking; this is a prep work to remove the current per-CPU lock in local_bh_disable() on PREMPT_RT. - Introduce and use nlmsg_payload helper, combining buffer bounds verification with accessing payload carried by netlink messages. Netfilter: - Rewrite the procfs conntrack table implementation, improving considerably the dump performance. A lot of user-space tools still use this interface. - Implement support for wildcard netdevice in netdev basechain and flowtables. - Integrate conntrack information into nft trace infrastructure. - Export set count and backend name to userspace, for better introspection. BPF: - BPF qdisc support: BPF-qdisc can be implemented with BPF struct_ops programs and can be controlled in similar way to traditional qdiscs using the "tc qdisc" command. - Refactor the UDP socket iterator, addressing long standing issues WRT duplicate hits or missed sockets. Protocols: - Improve TCP receive buffer auto-tuning and increase the default upper bound for the receive buffer; overall this improves the single flow maximum thoughput on 200Gbs link by over 60%. - Add AFS GSSAPI security class to AF_RXRPC; it provides transport security for connections to the AFS fileserver and VL server. - Improve TCP multipath routing, so that the sources address always matches the nexthop device. - Introduce SO_PASSRIGHTS for AF_UNIX, to allow disabling SCM_RIGHTS, and thus preventing DoS caused by passing around problematic FDs. - Retire DCCP socket. DCCP only receives updates for bugs, and major distros disable it by default. Its removal allows for better organisation of TCP fields to reduce the number of cache lines hit in the fast path. - Extend TCP drop-reason support to cover PAWS checks. Driver API: - Reorganize PTP ioctl flag support to require an explicit opt-in for the drivers, avoiding the problem of drivers not rejecting new unsupported flags. - Converted several device drivers to timestamping APIs. - Introduce per-PHY ethtool dump helpers, improving the support for dump operations targeting PHYs. Tests and tooling: - Add support for classic netlink in user space C codegen, so that ynl-c can now read, create and modify links, routes addresses and qdisc layer configuration. - Add ynl sub-types for binary attributes, allowing ynl-c to output known struct instead of raw binary data, clarifying the classic netlink output. - Extend MPTCP selftests to improve the code-coverage. - Add tests for XDP tail adjustment in AF_XDP. New hardware / drivers: - OpenVPN virtual driver: offload OpenVPN data channels processing to the kernel-space, increasing the data transfer throughput WRT the user-space implementation. - Renesas glue driver for the gigabit ethernet RZ/V2H(P) SoC. - Broadcom asp-v3.0 ethernet driver. - AMD Renoir ethernet device. - ReakTek MT9888 2.5G ethernet PHY driver. - Aeonsemi 10G C45 PHYs driver. Drivers: - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - refactor the steering table handling to significantly reduce the amount of memory used - add support for complex matches in H/W flow steering - improve flow streeing error handling - convert to netdev instance locking - Intel (100G, ice, igb, ixgbe, idpf): - ice: add switchdev support for LLDP traffic over VF - ixgbe: add firmware manipulation and regions devlink support - igb: introduce support for frame transmission premption - igb: adds persistent NAPI configuration - idpf: introduce RDMA support - idpf: add initial PTP support - Meta (fbnic): - extend hardware stats coverage - add devlink dev flash support - Broadcom (bnxt): - add support for RX-side device memory TCP - Wangxun (txgbe): - implement support for udp tunnel offload - complete PTP and SRIOV support for AML 25G/10G devices - Ethernet NICs embedded and virtual: - Google (gve): - add device memory TCP TX support - Amazon (ena): - support persistent per-NAPI config - Airoha: - add H/W support for L2 traffic offload - add per flow stats for flow offloading - RealTek (rtl8211): add support for WoL magic packet - Synopsys (stmmac): - dwmac-socfpga 1000BaseX support - add Loongson-2K3000 support - introduce support for hardware-accelerated VLAN stripping - Broadcom (bcmgenet): - expose more H/W stats - Freescale (enetc, dpaa2-eth): - enetc: add MAC filter, VLAN filter RSS and loopback support - dpaa2-eth: convert to H/W timestamping APIs - vxlan: convert FDB table to rhashtable, for better scalabilty - veth: apply qdisc backpressure on full ring to reduce TX drops - Ethernet switches: - Microchip (kzZ88x3): add ETS scheduler support - Ethernet PHYs: - RealTek (rtl8211): - add support for WoL magic packet - add support for PHY LEDs - CAN: - Adds RZ/G3E CANFD support to the rcar_canfd driver. - Preparatory work for CAN-XL support. - Add self-tests framework with support for CAN physical interfaces. - WiFi: - mac80211: - scan improvements with multi-link operation (MLO) - Qualcomm (ath12k): - enable AHB support for IPQ5332 - add monitor interface support to QCN9274 - add multi-link operation support to WCN7850 - add 802.11d scan offload support to WCN7850 - monitor mode for WCN7850, better 6 GHz regulatory - Qualcomm (ath11k): - restore hibernation support - MediaTek (mt76): - WiFi-7 improvements - implement support for mt7990 - Intel (iwlwifi): - enhanced multi-link single-radio (EMLSR) support on 5 GHz links - rework device configuration - RealTek (rtw88): - improve throughput for RTL8814AU - RealTek (rtw89): - add multi-link operation support - STA/P2P concurrency improvements - support different SAR configs by antenna - Bluetooth: - introduce HCI Driver protocol - btintel_pcie: do not generate coredump for diagnostic events - btusb: add HCI Drv commands for configuring altsetting - btusb: add RTL8851BE device 0x0bda:0xb850 - btusb: add new VID/PID 13d3/3584 for MT7922 - btusb: add new VID/PID 13d3/3630 and 13d3/3613 for MT7925 - btnxpuart: implement host-wakeup feature" * tag 'net-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1611 commits) selftests/bpf: Fix bpf selftest build warning selftests: netfilter: Fix skip of wildcard interface test net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames net: openvswitch: Fix the dead loop of MPLS parse calipso: Don't call calipso functions for AF_INET sk. selftests/tc-testing: Add a test for HFSC eltree double add with reentrant enqueue behaviour on netem net_sched: hfsc: Address reentrant enqueue adding class to eltree twice octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback octeontx2-pf: QOS: Perform cache sync on send queue teardown net: mana: Add support for Multi Vports on Bare metal net: devmem: ncdevmem: remove unused variable net: devmem: ksft: upgrade rx test to send 1K data net: devmem: ksft: add 5 tuple FS support net: devmem: ksft: add exit_wait to make rx test pass net: devmem: ksft: add ipv4 support net: devmem: preserve sockc_err page_pool: fix ugly page_pool formatting net: devmem: move list_add to net_devmem_bind_dmabuf. selftests: netfilter: nft_queue.sh: include file transfer duration in log message net: phy: mscc: Fix memory leak when using one step timestamping ... commit 4d9b5146f0d9147293155b569db9a19c8f5ff0a1 Author: Ian Rogers Date: Wed May 28 14:08:58 2025 -0700 perf symbol: Move demangling code out of symbol-elf.c symbol-elf.c is used when building with libelf, symbol-minimal is used otherwise. There is no reason the demangling code with no dependencies on libelf is part of symbol-elf.c so move to symbol.c. This allows demangling tests to pass with NO_LIBELF=1. Structurally, while moving the functions rename demangle_sym() to dso__demangle_sym() which is already a function exposed in symbol.h and the only purpose of which in symbol-elf.c was to call demangle_sym(). Change the calls to demangle_sym() in symbol-elf.c to calls to dso__demangle_sym(). Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528210858.499898-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 47cf96fbe393839b125a9b694a8cfdd3f4216baa Merge: bbff27b54e4271 217e3cbba3d661 Author: Linus Torvalds Date: Wed May 28 14:55:35 2025 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "The headline feature is the re-enablement of support for Arm's Scalable Matrix Extension (SME) thanks to a bumper crop of fixes from Mark Rutland. If matrices aren't your thing, then Ryan's page-table optimisation work is much more interesting. Summary: ACPI, EFI and PSCI: - Decouple Arm's "Software Delegated Exception Interface" (SDEI) support from the ACPI GHES code so that it can be used by platforms booted with device-tree - Remove unnecessary per-CPU tracking of the FPSIMD state across EFI runtime calls - Fix a node refcount imbalance in the PSCI device-tree code CPU Features: - Ensure register sanitisation is applied to fields in ID_AA64MMFR4 - Expose AIDR_EL1 to userspace via sysfs, primarily so that KVM guests can reliably query the underlying CPU types from the VMM - Re-enabling of SME support (CONFIG_ARM64_SME) as a result of fixes to our context-switching, signal handling and ptrace code Entry code: - Hook up TIF_NEED_RESCHED_LAZY so that CONFIG_PREEMPT_LAZY can be selected Memory management: - Prevent BSS exports from being used by the early PI code - Propagate level and stride information to the low-level TLB invalidation routines when operating on hugetlb entries - Use the page-table contiguous hint for vmap() mappings with VM_ALLOW_HUGE_VMAP where possible - Optimise vmalloc()/vmap() page-table updates to use "lazy MMU mode" and hook this up on arm64 so that the trailing DSB (used to publish the updates to the hardware walker) can be deferred until the end of the mapping operation - Extend mmap() randomisation for 52-bit virtual addresses (on par with 48-bit addressing) and remove limited support for randomisation of the linear map Perf and PMUs: - Add support for probing the CMN-S3 driver using ACPI - Minor driver fixes to the CMN, Arm-NI and amlogic PMU drivers Selftests: - Fix FPSIMD and SME tests to align with the freshly re-enabled SME support - Fix default setting of the OUTPUT variable so that tests are installed in the right location vDSO: - Replace raw counter access from inline assembly code with a call to the the __arch_counter_get_cntvct() helper function Miscellaneous: - Add some missing header inclusions to the CCA headers - Rework rendering of /proc/cpuinfo to follow the x86-approach and avoid repeated buffer expansion (the user-visible format remains identical) - Remove redundant selection of CONFIG_CRC32 - Extend early error message when failing to map the device-tree blob" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (83 commits) arm64: cputype: Add cputype definition for HIP12 arm64: el2_setup.h: Make __init_el2_fgt labels consistent, again perf/arm-cmn: Add CMN S3 ACPI binding arm64/boot: Disallow BSS exports to startup code arm64/boot: Move global CPU override variables out of BSS arm64/boot: Move init_pgdir[] and init_idmap_pgdir[] into __pi_ namespace perf/arm-cmn: Initialise cmn->cpu earlier kselftest/arm64: Set default OUTPUT path when undefined arm64: Update comment regarding values in __boot_cpu_mode arm64: mm: Drop redundant check in pmd_trans_huge() arm64/mm: Re-organise setting up FEAT_S1PIE registers PIRE0_EL1 and PIR_EL1 arm64/mm: Permit lazy_mmu_mode to be nested arm64/mm: Disable barrier batching in interrupt contexts arm64/cpuinfo: only show one cpu's info in c_show() arm64/mm: Batch barriers when updating kernel mappings mm/vmalloc: Enter lazy mmu mode while manipulating vmalloc ptes arm64/mm: Support huge pte-mapped pages in vmap mm/vmalloc: Gracefully unmap huge ptes mm/vmalloc: Warn on improper use of vunmap_range() arm64/mm: Hoist barriers out of set_ptes_anysz() loop ... commit 16b2da850f6f79bf9013516ce78b27a8abb10359 Author: Hans Zhang <18255117159@163.com> Date: Tue Apr 1 22:50:23 2025 +0800 PCI: cadence: Remove duplicate message code definitions The Cadence PCIe controller driver defines message codes in enum cdns_pcie_msg_code duplicating the existing PCIE_MSG_CODE_* definitions in drivers/pci/pci.h. The driver only uses ASSERT_INTA and DEASSERT_INTA codes from this enum. Remove the redundant Cadence-specific enum definitions and use the ones available in drivers/pci/pci.h. This helps in avoiding code duplication, maintaining consistency with the spec, and simplifying the code maintenance. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: commit message rewording] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250401145023.22948-1-18255117159@163.com commit bbff27b54e4271a42ea1dba93a76e51165f2dbaa Merge: 408aa67404405c aa264d9511aa5b Author: Linus Torvalds Date: Wed May 28 14:52:12 2025 -0700 Merge tag 'nios2_updates_for_v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux Pull nios2 updates fromDinh Nguyen: - Use strscpy() and simply setup_cpuinfo() - Remove conflicting mappings when flushing tlb entries - Force update_mmu_cache on spurious pagefaults * tag 'nios2_updates_for_v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: nios2: Replace strcpy() with strscpy() and simplify setup_cpuinfo() nios2: do not introduce conflicting mappings when flushing tlb entries nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults commit de0321bcc5fdd83631f0c2a6fdebfe0ad4e23449 Author: Niklas Cassel Date: Wed May 14 09:43:19 2025 +0200 PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding The kdoc for pci_epc_set_msix() says: "Invoke to set the required number of MSI-X interrupts." The kdoc for the callback pci_epc_ops->set_msix() says: "ops to set the requested number of MSI-X interrupts in the MSI-X capability register" pci_epc_ops::set_msix() does however expect the parameter 'interrupts' to be in the encoding as defined by the Table Size field. Nowhere in the kdoc does it say that the number of interrupts should be in Table Size encoding. It is very confusing that the API pci_epc_set_msix() and the callback function pci_epc_ops::set_msix() both take a parameter named 'interrupts', but they expect completely different encodings. Clean up the API and the callback function to have the same semantics, i.e. the parameter represents the number of interrupts, regardless of the internal encoding of that value. Also rename the parameter 'interrupts' to 'nr_irqs', in both the wrapper function and the callback function, such that the name is unambiguous. [bhelgaas: more specific subject] Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Cc: stable+noautosel@kernel.org # this is simply a cleanup Link: https://patch.msgid.link/20250514074313.283156-14-cassel@kernel.org commit f62da6e7270c2db5aef8a8b14f465896961a9372 Author: Niklas Cassel Date: Wed May 14 09:43:18 2025 +0200 PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding The kdoc for pci_epc_set_msi() says: "Invoke to set the required number of MSI interrupts." The kdoc for the callback pci_epc_ops::set_msi() says: "ops to set the requested number of MSI interrupts in the MSI capability register" pci_epc_ops::set_msi() does however expect the parameter 'interrupts' to be in the encoding as defined by the Multiple Message Capable (MMC) field of the MSI capability structure. Nowhere in the kdoc does it say that the number of interrupts should be in MMC encoding. It is very confusing that the API pci_epc_set_msi() and the callback function pci_epc_ops::set_msi() both take a parameter named 'interrupts', but they expect completely different encodings. Clean up the API and the callback function to have the same semantics, i.e. the parameter represents the number of interrupts, regardless of the internal encoding of that value. Also rename the parameter 'interrupts' to 'nr_irqs', in both the wrapper function and the callback function, such that the name is unambiguous. [bhelgaas: more specific subject] Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Cc: stable+noautosel@kernel.org # this is simply a cleanup Link: https://patch.msgid.link/20250514074313.283156-13-cassel@kernel.org commit 0917ed8f16b646c5e3cc481ccfa4709286b76691 Author: Niklas Cassel Date: Wed May 14 09:43:17 2025 +0200 PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding The kdoc for pci_epc_get_msix() says: "Invoke to get the number of MSI-X interrupts allocated by the RC" The kdoc for the callback pci_epc_ops->get_msix() says: "ops to get the number of MSI-X interrupts allocated by the RC from the MSI-X capability register" pci_epc_ops::get_msix() does however return the number of interrupts in the encoding as defined by the Table Size field. Nowhere in the kdoc does it say that the returned number of interrupts is in Table Size encoding. It is very confusing that the API pci_epc_get_msix() and the callback function pci_epc_ops::get_msix() don't return the same value. Clean up the API and the callback function to have the same semantics, i.e. return the number of interrupts, regardless of the internal encoding of that value. [bhelgaas: more specific subject] Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Damien Le Moal Cc: stable+noautosel@kernel.org # this is simply a cleanup Link: https://patch.msgid.link/20250514074313.283156-12-cassel@kernel.org commit f7f15fc53245385e39ef0aab4310d1682fd3c079 Author: Niklas Cassel Date: Wed May 14 09:43:16 2025 +0200 PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding The kdoc for API pci_epc_get_msi() says: "Invoke to get the number of MSI interrupts allocated by the RC" The kdoc for the callback pci_epc_ops::get_msi() says: "ops to get the number of MSI interrupts allocated by the RC from the MSI capability register" pci_epc_ops::get_msi() does however return the number of interrupts in the encoding as defined by the Multiple Message Enable (MME) field of the MSI Capability structure. Nowhere in the kdoc does it say that the returned number of interrupts is in MME encoding. It is very confusing that the API pci_epc_get_msi() and the callback function pci_epc_ops::get_msi() don't return the same value. Clean up the API and the callback function to have the same semantics, i.e. return the number of interrupts, regardless of the internal encoding of that value. [bhelgaas: more specific subject] Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Damien Le Moal Cc: stable+noautosel@kernel.org # this is simply a cleanup Link: https://patch.msgid.link/20250514074313.283156-11-cassel@kernel.org commit c8bcb01352a86bc5592403904109c22b66bd916e Author: Niklas Cassel Date: Wed May 14 09:43:15 2025 +0200 PCI: cadence-ep: Correct PBA offset in .set_msix() callback While cdns_pcie_ep_set_msix() writes the Table Size field correctly (N-1), the calculation of the PBA offset is wrong because it calculates space for (N-1) entries instead of N. This results in the following QEMU error when using PCI passthrough on a device which relies on the PCI endpoint subsystem: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align Fix the calculation of PBA offset in the MSI-X capability. [bhelgaas: more specific subject and commit log] Fixes: 3ef5d16f50f8 ("PCI: cadence: Add MSI-X support to Endpoint driver") Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Wilfred Mallawa Reviewed-by: Damien Le Moal Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250514074313.283156-10-cassel@kernel.org commit 810276362bad172d063d1f6be1cc2cb425b90103 Author: Niklas Cassel Date: Wed May 14 09:43:14 2025 +0200 PCI: dwc: ep: Correct PBA offset in .set_msix() callback While dw_pcie_ep_set_msix() writes the Table Size field correctly (N-1), the calculation of the PBA offset is wrong because it calculates space for (N-1) entries instead of N. This results in the following QEMU error when using PCI passthrough on a device which relies on the PCI endpoint subsystem: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align Fix the calculation of PBA offset in the MSI-X capability. [bhelgaas: more specific subject and commit log] Fixes: 83153d9f36e2 ("PCI: endpoint: Fix ->set_msix() to take BIR and offset as arguments") Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Wilfred Mallawa Reviewed-by: Damien Le Moal Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250514074313.283156-9-cassel@kernel.org commit e5327a655636e2ffb93d65f44777d9481aab3715 Author: Jerome Brunet Date: Thu Apr 24 10:34:05 2025 +0200 PCI: endpoint: pci-epf-vntb: Simplify ctrl/SPAD space allocation When allocating the shared ctrl/SPAD space, epf_ntb_config_spad_bar_alloc() should not try to handle the size quirks for underlying BAR, whether it is fixed size or alignment. This is already handled by pci_epf_alloc_space(). Also, when handling the alignment, this allocates more space than necessary. For example, with a SPAD size of 1024B and a ctrl size of 308B, the space necessary is 1332B. If the alignment is 1MB, epf_ntb_config_spad_bar_alloc() tries to allocate 2MB where 1MB would have been more than enough. Drop the handling of the BAR size quirks and let pci_epf_alloc_space() handle that. Just make sure the 32bits SPAD register are aligned on 32bits. Signed-off-by: Jerome Brunet Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250424-pci-ep-size-alignment-v5-2-2d4ec2af23f5@baylibre.com commit 84e2f918550e1063bd8e29faffe8ad491b7d8c52 Merge: 58ce2aec57a5d8 40493d97b329f8 Author: Dave Airlie Date: Thu May 29 07:43:02 2025 +1000 Merge tag 'drm-xe-next-fixes-2025-05-28' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - Two documentation fixes (Rodrigo) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aDc4Is-sQb3DPGO5@fedora commit 408aa67404405c8519ddee70bc0e6c55daa7c959 Merge: 1cbf99e47fef5a 0a84874c7e7dde Author: Linus Torvalds Date: Wed May 28 14:43:00 2025 -0700 Merge tag 'v6.16-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a buffer overflow regression in shash" * tag 'v6.16-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: shash - Fix buffer overrun in import function commit 58ce2aec57a5d8a2e678bf184f043047340c787e Merge: f8bb3ed3197966 ed5915cfce2abb Author: Dave Airlie Date: Thu May 29 07:36:18 2025 +1000 Merge tag 'drm-intel-next-fixes-2025-05-28' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Fix the enabling/disabling of DP audio SDP splitting Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aDaztAmV_erxo1Am@jlahtine-mobl commit e3e3775392f3f0f3e3044f8c162bf47858e01759 Author: Tigran Mkrtchyan Date: Thu May 15 21:04:15 2025 +0200 flexfiles/pNFS: update stats on NFS4ERR_DELAY for v4.1 DSes On NFS4ERR_DELAY nfs slient updates its stats, but misses for flexfiles v4.1 DSes. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Anna Schumaker commit c25a89770d1f216dcedfc2d25d56b604f62ce0bd Author: NeilBrown Date: Fri May 9 10:46:43 2025 +1000 nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer Instead of calling xchg() and unrcu_pointer() before nfsd_file_put_local(), we now pass pointer to the __rcu pointer and call xchg() and unrcu_pointer() inside that function. Where unrcu_pointer() is currently called the internals of "struct nfsd_file" are not known and that causes older compilers such as gcc-8 to complain. In some cases we have a __kernel (aka normal) pointer not an __rcu pointer so we need to cast it to __rcu first. This is strictly a weakening so no information is lost. Somewhat surprisingly, this cast is accepted by gcc-8. This has the pleasing result that the cmpxchg() which sets ro_file and rw_file, and also the xchg() which clears them, are both now in the nfsd code. Reported-by: Pali Rohár Reported-by: Vincent Mailhol Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 21fb44034695185f1dcbcb37354c842cabfe83c1 Author: NeilBrown Date: Fri May 9 10:46:42 2025 +1000 nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh() nfs_uuid_put() and nfs_close_local_fh() can race if a "struct nfs_file_localio" is released at the same time that nfsd calls nfs_localio_invalidate_clients(). It is important that neither of these functions completes after the other has started looking at a given nfs_file_localio and before it finishes. If nfs_uuid_put() exits while nfs_close_local_fh() is closing ro_file and rw_file it could return to __nfd_file_cache_purge() while some files are still referenced so the purge may not succeed. If nfs_close_local_fh() exits while nfsd_uuid_put() is still closing the files then the "struct nfs_file_localio" could be freed while nfsd_uuid_put() is still looking at it. This side is currently handled by copying the pointers out of ro_file and rw_file before deleting from the list in nfsd_uuid. We need to preserve this while ensuring that nfsd_uuid_put() does wait for nfs_close_local_fh(). This patch use nfl->uuid and nfl->list to provide the required interlock. nfs_uuid_put() removes the nfs_file_localio from the list, then drops locks and puts the two files, then reclaims the spinlock and sets ->nfs_uuid to NULL. nfs_close_local_fh() operates in the reverse order, setting ->nfs_uuid to NULL, then closing the files, then unlinking from the list. If nfs_uuid_put() finds that ->nfs_uuid is already NULL, it waits for the nfs_file_localio to be removed from the list. If nfs_close_local_fh() find that it has already been unlinked it waits for ->nfs_uuid to become NULL. This ensure that one of the two tries to close the files, but they each waits for the other. As nfs_uuid_put() is making the list empty, change from a list_for_each_safe loop to a while that always takes the first entry. This makes the intent more clear. Also don't move the list to a temporary local list as this would defeat the guarantees required for the interlock. Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 74fc55ab2a6a0c71628fcf3b9783aae7119b5199 Author: NeilBrown Date: Fri May 9 10:46:41 2025 +1000 nfs_localio: duplicate nfs_close_local_fh() nfs_close_local_fh() is called from two different places for quite different use case. It is called from nfs_uuid_put() when the nfs_uuid is being detached - possibly because the nfs server is not longer serving that filesystem. In this case there will always be an nfs_uuid and so rcu_read_lock() is not needed. It is also called when the nfs_file_localio is no longer needed. In this case there may not be an active nfs_uuid. These two can race, and handling the race properly while avoiding excessive locking will require different handling on each side. This patch prepares the way by opencoding nfs_close_local_fh() into nfs_uuid_put(), then simplifying the code there as befits the context. Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit e6f7e1487ab528a6c653bd0d42812ff2942846cd Author: NeilBrown Date: Fri May 9 10:46:40 2025 +1000 nfs_localio: simplify interface to nfsd for getting nfsd_file The nfsd_localio_operations structure contains nfsd_file_get() to get a reference to an nfsd_file. This is only used in one place, where nfsd_open_local_fh() is also used. This patch combines the two, calling nfsd_open_local_fh() passing a pointer to where the nfsd_file pointer might be stored. If there is a pointer there an nfsd_file_get() can get a reference, that reference is returned. If not a new nfsd_file is acquired, stored at the pointer, and returned. When we store a reference we also increase the refcount on the net, as that refcount is decrements when we clear the stored pointer. We now get an extra reference *before* storing the new nfsd_file at the given location. This avoids possible races with the nfsd_file being freed before the final reference can be taken. This patch moves the rcu_dereference() needed after fetching from ro_file or rw_file into the nfsd code where the 'struct nfs_file' is fully defined. This avoids an error reported by older versions of gcc such as gcc-8 which complain about rcu_dereference() use in contexts where the structure (which will supposedly be accessed) is not fully defined. Reported-by: Pali Rohár Reported-by: Vincent Mailhol Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 77e82fb2c6c27c122e785f543ae0062f7783c886 Author: NeilBrown Date: Fri May 9 10:46:39 2025 +1000 nfs_localio: always hold nfsd net ref with nfsd_file ref Having separate nfsd_file_put and nfsd_file_put_local in struct nfsd_localio_operations doesn't make much sense. The difference is that nfsd_file_put doesn't drop a reference to the nfs_net which is what keeps nfsd from shutting down. Currently, if nfsd tries to shutdown it will invalidate the files stored in the list from the nfs_uuid and this will drop all references to the nfsd net that the client holds. But the client could still hold some references to nfsd_files for active IO. So nfsd might think is has completely shut down local IO, but hasn't and has no way to wait for those active IO requests to complete. So this patch changes nfsd_file_get to nfsd_file_get_local and has it increase the ref count on the nfsd net and it replaces all calls to ->nfsd_put_file to ->nfsd_put_file_local. It also changes ->nfsd_open_local_fh to return with the refcount on the net elevated precisely when a valid nfsd_file is returned. This means that whenever the client holds a valid nfsd_file, there will be an associated count on the nfsd net, and so the count can only reach zero when all nfsd_files have been returned. nfs_local_file_put() is changed to call nfs_to_nfsd_file_put_local() instead of replacing calls to one with calls to the other because this will help a later patch which changes nfs_to_nfsd_file_put_local() to take an __rcu pointer while nfs_local_file_put() doesn't. Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit ed9be317330c7390df7db9e1d046698c02001bd2 Author: NeilBrown Date: Fri May 9 10:46:38 2025 +1000 nfs_localio: use cmpxchg() to install new nfs_file_localio Rather than using nfs_uuid.lock to protect installing a new ro_file or rw_file, change to use cmpxchg(). Removing the file already uses xchg() so this improves symmetry and also makes the code a little simpler. Also remove the optimisation of not taking the lock, and not removing the nfs_file_localio from the linked list, when both ->ro_file and ->rw_file are already NULL. Given that ->nfs_uuid was not NULL, it is extremely unlikely that neither ->ro_file or ->rw_file is NULL so this optimisation can be of little value and it complicates understanding of the code - why can the list_del_init() be skipped? Finally, move the assignment of NULL to ->nfs_uuid until after the last action on the nfs_file_localio (the list_del_init). As soon as this is NULL a racing nfs_close_local_fh() can bypass all the locking and go on to free the nfs_file_localio, so we must be certain to be finished with it first. Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 111f9e4b0dcdd493094dad98ecbed490887710c0 Author: Chuck Lever Date: Wed May 21 16:34:14 2025 -0400 SUNRPC: Remove dead code from xs_tcp_tls_setup_socket() xs_tcp_tls_finish_connecting() already marks the upper xprt connected, so the same code in xs_tcp_tls_setup_socket() is never executed. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 0bd2f6b8996d4f1ca4573652454987826730a04a Author: Chuck Lever Date: Wed May 21 16:34:13 2025 -0400 SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls Engineers at Hammerspace noticed that sometimes mounting with "xprtsec=tls" hangs for a minute or so, and then times out, even when the NFS server is reachable and responsive. kTLS shuts off data_ready callbacks if strp->msg_ready is set to mitigate data_ready callbacks when a full TLS record is not yet ready to be read from the socket. Normally msg_ready is clear when the first TLS record arrives on a socket. However, I observed that sometimes tls_setsockopt() sets strp->msg_ready, and that prevents forward progress because tls_data_ready() becomes a no-op. Moreover, Jakub says: "If there's a full record queued at the time when [tlshd] passes the socket back to the kernel, it's up to the reader to read the already queued data out." So SunRPC cannot expect a data_ready call when ingress data is already waiting. Add an explicit poll after SunRPC's upper transport is set up to pick up any data that arrived after the TLS handshake but before transport set-up is complete. Reported-by: Steve Sears Suggested-by: Jakub Kacinski Fixes: 75eb6af7acdf ("SUNRPC: Add a TCP-with-TLS RPC transport class") Tested-by: Mike Snitzer Reviewed-by: Mike Snitzer Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit dd862da61e91123ca745e06c03ba39ce71a929d9 Author: NeilBrown Date: Mon May 26 14:08:25 2025 +1000 nfs: fix incorrect handling of large-number NFS errors in nfs4_do_mkdir() A recent commit introduced nfs4_do_mkdir() which reports an error from nfs4_call_sync() by returning it with ERR_PTR(). This is a problem as nfs4_call_sync() can return negative NFS-specific errors with values larger than MAX_ERRNO (4095). One example is NFS4ERR_DELAY which has value 10008. This "pointer" gets to PTR_ERR_OR_ZERO() in nfs4_proc_mkdir() which chooses ZERO because it isn't in the range of value errors. Ultimately the pointer is dereferenced. This patch changes nfs4_do_mkdir() to report the dentry pointer and status separately - pointer as a return value, status in an "int *" parameter. The same separation is used for _nfs4_proc_mkdir() and the two are combined only in nfs4_proc_mkdir() after the status has passed through nfs4_handle_exception(), which ensures the error code does not exceed MAX_ERRNO. It also fixes a problem in the even when nfs4_handle_exception() updated the error value, the original 'alias' was still returned. Reported-by: Anna Schumaker Fixes: 8376583b84a1 ("nfs: change mkdir inode_operation to return alternate dentry if needed.") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 80c4de6ab44c14e910117a02f2f8241ffc6ec54a Author: Li Lingfeng Date: Tue Mar 4 21:05:33 2025 +0800 nfs: ignore SB_RDONLY when remounting nfs In some scenarios, when mounting NFS, more than one superblock may be created. The final superblock used is the last one created, but only the first superblock carries the ro flag passed from user space. If a ro flag is added to the superblock via remount, it will trigger the issue described in Link[1]. Link[2] attempted to address this by marking the superblock as ro during the initial mount. However, this introduced a new problem in scenarios where multiple mount points share the same superblock: [root@a ~]# mount /dev/sdb /mnt/sdb [root@a ~]# echo "/mnt/sdb *(rw,no_root_squash)" > /etc/exports [root@a ~]# echo "/mnt/sdb/test_dir2 *(ro,no_root_squash)" >> /etc/exports [root@a ~]# systemctl restart nfs-server [root@a ~]# mount -t nfs -o rw 127.0.0.1:/mnt/sdb/test_dir1 /mnt/test_mp1 [root@a ~]# mount | grep nfs4 127.0.0.1:/mnt/sdb/test_dir1 on /mnt/test_mp1 type nfs4 (rw,relatime,... [root@a ~]# mount -t nfs -o ro 127.0.0.1:/mnt/sdb/test_dir2 /mnt/test_mp2 [root@a ~]# mount | grep nfs4 127.0.0.1:/mnt/sdb/test_dir1 on /mnt/test_mp1 type nfs4 (ro,relatime,... 127.0.0.1:/mnt/sdb/test_dir2 on /mnt/test_mp2 type nfs4 (ro,relatime,... [root@a ~]# When mounting the second NFS, the shared superblock is marked as ro, causing the previous NFS mount to become read-only. To resolve both issues, the ro flag is no longer applied to the superblock during remount. Instead, the ro flag on the mount is used to control whether the mount point is read-only. Fixes: 281cad46b34d ("NFS: Create a submount rpc_op") Link[1]: https://lore.kernel.org/all/20240604112636.236517-3-lilingfeng@huaweicloud.com/ Link[2]: https://lore.kernel.org/all/20241130035818.1459775-1-lilingfeng3@huawei.com/ Signed-off-by: Li Lingfeng Signed-off-by: Anna Schumaker commit 8cd9b785943c57a136536250da80ba1eb6f8eb18 Author: Li Lingfeng Date: Tue Mar 4 21:05:32 2025 +0800 nfs: clear SB_RDONLY before getting superblock As described in the link, commit 52cb7f8f1778 ("nfs: ignore SB_RDONLY when mounting nfs") removed the check for the ro flag when determining whether to share the superblock, which caused issues when mounting different subdirectories under the same export directory via NFSv3. However, this change did not affect NFSv4. For NFSv3: 1) A single superblock is created for the initial mount. 2) When mounted read-only, this superblock carries the SB_RDONLY flag. 3) Before commit 52cb7f8f1778 ("nfs: ignore SB_RDONLY when mounting nfs"): Subsequent rw mounts would not share the existing ro superblock due to flag mismatch, creating a new superblock without SB_RDONLY. After the commit: The SB_RDONLY flag is ignored during superblock comparison, and this leads to sharing the existing superblock even for rw mounts. Ultimately results in write operations being rejected at the VFS layer. For NFSv4: 1) Multiple superblocks are created and the last one will be kept. 2) The actually used superblock for ro mounts doesn't carry SB_RDONLY flag. Therefore, commit 52cb7f8f1778 doesn't affect NFSv4 mounts. Clear SB_RDONLY before getting superblock when NFS_MOUNT_UNSHARED is not set to fix it. Fixes: 52cb7f8f1778 ("nfs: ignore SB_RDONLY when mounting nfs") Closes: https://lore.kernel.org/all/12d7ea53-1202-4e21-a7ef-431c94758ce5@app.fastmail.com/T/ Signed-off-by: Li Lingfeng Signed-off-by: Anna Schumaker commit 1ff4716f420b5a6e6ef095b23bb5db76f46be7fc Author: Mike Snitzer Date: Tue May 13 12:08:31 2025 -0400 NFS: always probe for LOCALIO support asynchronously It was reported that NFS client mounts of AWS Elastic File System (EFS) volumes is slow, this is because the AWS firewall disallows LOCALIO (because it doesn't consider the use of NFS_LOCALIO_PROGRAM valid), see: https://bugzilla.redhat.com/show_bug.cgi?id=2335129 Switch to performing the LOCALIO probe asynchronously to address the potential for the NFS LOCALIO protocol being disallowed and/or slowed by the remote server's response. While at it, fix nfs_local_probe_async() to always take/put a reference on the nfs_client that is using the LOCALIO protocol. Also, unexport the nfs_local_probe() symbol and make it private to fs/nfs/localio.c This change has the side-effect of initially issuing reads, writes and commits over the wire via SUNRPC until the LOCALIO probe completes. Suggested-by: Jeff Layton # to always probe async Fixes: 76d4cb6345da ("nfs: probe for LOCALIO when v4 client reconnects to server") Cc: stable@vger.kernel.org # 6.14+ Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 04a15263662ab864725d8b60407e2dd5ba525514 Author: Mike Snitzer Date: Fri May 9 16:39:49 2025 -0400 pnfs/flexfiles: connect to NFSv3 DS using TLS if MDS connection uses TLS Implementation follows bones of the pattern that was established in commit a35518cae4b325 ("NFSv4.1/pnfs: fix NFS with TLS in pnfs"). Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker commit 62d2cde203defb6702cab2c318c3346b11cdaeac Author: Mike Snitzer Date: Tue May 13 15:50:44 2025 -0400 NFS: add localio to sysfs The Linux NFS client and server added support for LOCALIO in Linux v6.12. It is useful to know if a client and server negotiated LOCALIO be used, so expose it through the 'localio' attribute. Suggested-by: Anna Schumaker Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker commit f72a67598cd797ac33d32cd3c10f321b51c6d9df Author: Christoph Hellwig Date: Wed May 7 06:48:54 2025 +0200 nfs: use writeback_iter directly Stop using write_cache_pages and use writeback_iter directly. This removes an indirect call per written folio and makes the code easier to follow. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 66a49813501c77700a7fe504e0d28aa126b115cb Author: Christoph Hellwig Date: Wed May 7 06:48:53 2025 +0200 nfs: refactor nfs_do_writepage Use early returns wherever possible to simplify the code. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 66beed5acaf27137007459e7e53bf8d6f1b799cc Author: Christoph Hellwig Date: Wed May 7 06:48:52 2025 +0200 nfs: don't return AOP_WRITEPAGE_ACTIVATE from nfs_do_writepage nfs_do_writepage is a successful return that requires the caller to unlock the folio. Using it here requires special casing both in nfs_do_writepage and nfs_writepages_callback and leaves a land mine in nfs_wb_folio in case it ever set the flag. Remove it and just unconditionally unlock in nfs_writepages_callback. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit b6354e60dd01d700a99d1f8c2f20d8ed530b0f45 Author: Christoph Hellwig Date: Wed May 7 06:48:51 2025 +0200 nfs: fold nfs_page_async_flush into nfs_do_writepage Fold nfs_page_async_flush into its only caller to clean up the code a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 3a3065352f73381d3a1aa0ccab44aec3a5a9b365 Author: Han Young Date: Sun May 4 20:57:04 2025 +0800 NFSv4: Always set NLINK even if the server doesn't support it fattr4_numlinks is a recommended attribute, so the client should emulate it even if the server doesn't support it. In decode_attr_nlink function in nfs4xdr.c, nlink is initialized to 1. However, this default value isn't set to the inode due to the check in nfs_fhget. So if the server doesn't support numlinks, inode's nlink will be zero, the mount will fail with error "Stale file handle". Set the nlink to 1 if the server doesn't support it. Signed-off-by: Han Young Signed-off-by: Anna Schumaker commit 77be29b7a3f896bd96808ba6781481a1f6afa66c Author: Benjamin Coddington Date: Thu May 1 08:29:42 2025 -0400 NFSv4: Allow FREE_STATEID to clean up delegations The NFS client's list of delegations can grow quite large (well beyond the delegation watermark) if the server is revoking or there are repeated events that expire state. Once this happens, the revoked delegations can cause a performance problem for subsequent walks of the servers->delegations list when the client tries to test and free state. If we can determine that the FREE_STATEID operation has completed without error, we can prune the delegation from the list. Since the NFS client combines TEST_STATEID with FREE_STATEID in its minor version operations, there isn't an easy way to communicate success of FREE_STATEID. Rather than re-arrange quite a number of calling paths to break out the separate procedures, let's signal the success of FREE_STATEID by setting the stateid's type. Set NFS4_FREED_STATEID_TYPE for stateids that have been successfully discarded from the server, and use that type to signal that the delegation can be cleaned up. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 4d4832ed13ff505fe0371544b4773e79be2bb964 Author: Scott Mayhew Date: Wed Apr 30 07:12:29 2025 -0400 NFSv4: Don't check for OPEN feature support in v4.1 fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't be sending it to v4.1 servers. Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS") Signed-off-by: Scott Mayhew Reviewed-by: Jeff Layton Reviewed-by: Benjamin Coddington Cc: stable@vger.kernel.org # 6.11+ Signed-off-by: Anna Schumaker commit 243fea134633ba3d64aceb4c16129c59541ea2c6 Author: Olga Kornievskaia Date: Fri Apr 25 14:09:21 2025 -0400 NFSv4.2: fix listxattr to return selinux security label Currently, when NFS is queried for all the labels present on the file via a command example "getfattr -d -m . /mnt/testfile", it does not return the security label. Yet when asked specifically for the label (getfattr -n security.selinux) it will be returned. Include the security label when all attributes are queried. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit aba41e90aadeca8d4656f90639aa5f91ce564f1c Author: Sagi Grimberg Date: Fri Apr 25 15:49:19 2025 +0300 NFSv4.2: fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated nfs_setattr will flush all pending writes before updating a file time attributes. However when the client holds delegated timestamps, it can update its timestamps locally as it is the authority for the file times attributes. The client will later set the file attributes by adding a setattr to the delegreturn compound updating the server time attributes. Fix nfs_setattr to avoid flushing pending writes when the file time attributes are delegated and the mtime/atime are set to a fixed timestamp (ATTR_[MODIFY|ACCESS]_SET. Also, when sending the setattr procedure over the wire, we need to clear the correct attribute bits from the bitmask. I was able to measure a noticable speedup when measuring untar performance. Test: $ time tar xzf ~/dir.tgz Baseline: 1m13.072s Patched: 0m49.038s Which is more than 30% latency improvement. Signed-off-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit d2e1d783f2c619cf9d8242b67a0ab0d2915f2920 Author: Anna Schumaker Date: Fri Apr 11 15:47:32 2025 -0400 NFS: Add support for fallocate(FALLOC_FL_ZERO_RANGE) This implements a suggestion from Trond that we can mimic FALLOC_FL_ZERO_RANGE by sending a compound that first does a DEALLOCATE to punch a hole in a file, and then an ALLOCATE to fill the hole with zeroes. There might technically be a race here, but once the DEALLOCATE finishes any reads from the region would return zeroes anyway, so I don't expect it to cause problems. Signed-off-by: Anna Schumaker commit 4c10fa44bc5f700e2ea21de2fbae520ba21f19d9 Author: Max Kellermann Date: Wed Apr 23 15:22:50 2025 +0200 fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() Sometimes, when a file was read while it was being truncated by another NFS client, the kernel could deadlock because folio_unlock() was called twice, and the second call would XOR back the `PG_locked` flag. Most of the time (depending on the timing of the truncation), nobody notices the problem because folio_unlock() gets called three times, which flips `PG_locked` back off: 1. vfs_read, nfs_read_folio, ... nfs_read_add_folio, nfs_return_empty_folio 2. vfs_read, nfs_read_folio, ... netfs_read_collection, netfs_unlock_abandoned_read_pages 3. vfs_read, ... nfs_do_read_folio, nfs_read_add_folio, nfs_return_empty_folio The problem is that nfs_read_add_folio() is not supposed to unlock the folio if fscache is enabled, and a nfs_netfs_folio_unlock() check is missing in nfs_return_empty_folio(). Rarely this leads to a warning in netfs_read_collection(): ------------[ cut here ]------------ R=0000031c: folio 10 is not locked WARNING: CPU: 0 PID: 29 at fs/netfs/read_collect.c:133 netfs_read_collection+0x7c0/0xf00 [...] Workqueue: events_unbound netfs_read_collection_worker RIP: 0010:netfs_read_collection+0x7c0/0xf00 [...] Call Trace: netfs_read_collection_worker+0x67/0x80 process_one_work+0x12e/0x2c0 worker_thread+0x295/0x3a0 Most of the time, however, processes just get stuck forever in folio_wait_bit_common(), waiting for `PG_locked` to disappear, which never happens because nobody is really holding the folio lock. Fixes: 000dbe0bec05 ("NFS: Convert buffered read paths to use netfs when fscache is enabled") Cc: stable@vger.kernel.org Signed-off-by: Max Kellermann Reviewed-by: Dave Wysochanski Signed-off-by: Anna Schumaker commit 793908d60b8745c386b9f4e29eb702f74ceb0886 Author: Jerome Brunet Date: Thu Apr 24 10:34:04 2025 +0200 PCI: endpoint: Retain fixed-size BAR size as well as aligned size When allocating space for an endpoint function on a BAR with a fixed size, the size saved in 'struct pci_epf_bar.size' should be the fixed size as expected by pci_epc_set_bar(). However, if pci_epf_alloc_space() increased the allocation size to accommodate iATU alignment requirements, it previously saved the larger aligned size in .size, which broke pci_epc_set_bar(). To solve this, keep the fixed BAR size in .size and save the aligned size in a new .aligned_size for use when deallocating it. Fixes: 2a9a801620ef ("PCI: endpoint: Add support to specify alignment for buffers allocated to BARs") Signed-off-by: Jerome Brunet [mani: commit message fixup] Signed-off-by: Manivannan Sadhasivam [bhelgaas: more specific subject, commit log, wrap comment to match file] Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250424-pci-ep-size-alignment-v5-1-2d4ec2af23f5@baylibre.com commit 1cbf99e47fef5a0a8cd421487e642283092f07b0 Merge: b1fd8bd0cc18cd 5dff41a8637756 Author: Linus Torvalds Date: Wed May 28 13:36:38 2025 -0700 Merge tag 'jfs-6.16' of github.com:kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "A few small fixes for jfs" * tag 'jfs-6.16' of github.com:kleikamp/linux-shaggy: jfs: fix array-index-out-of-bounds read in add_missing_indices jfs: Fix null-ptr-deref in jfs_ioc_trim jfs: validate AG parameters in dbMount() to prevent crashes commit 2fbdb6d8e03b70668c0876e635506540ae92ab05 Author: Pan Taixi Date: Mon May 26 09:37:31 2025 +0800 tracing: Fix compilation warning on arm32 On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is unsigned long. This hence triggers a compilation warning as min() asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t solves this issue and works on other target architectures as well. Compilation warning details: kernel/trace/trace.c: In function 'tracing_splice_read_pipe': ./include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ ./include/linux/minmax.h:26:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ ... kernel/trace/trace.c:6771:8: note: in expansion of macro 'min' min((size_t)trace_seq_used(&iter->seq), ^~~ Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250526013731.1198030-1-pantaixi@huaweicloud.com Fixes: f5178c41bb43 ("tracing: Fix oob write in trace_seq_to_buffer()") Reviewed-by: Jeongjun Park Signed-off-by: Pan Taixi Signed-off-by: Steven Rostedt (Google) commit d78eb800f8f5169db89a28380631aefc224a76bb Author: Aurabindo Pillai Date: Wed May 21 15:59:56 2025 -0400 drm/amd/display: Add some missing register headers for DCN401 Add some HDCP related register headers for future use. Signed-off-by: Aurabindo Pillai Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 3e9d9df850f3f93261a3259751394643f100a52a Author: Pratap Nirujogi Date: Sun Mar 9 16:53:01 2025 -0400 drm/amd/amdgpu: Add GPIO resources required for amdisp ISP is a child device to GFX, and its device specific information is not available in ACPI. Adding the 2 GPIO resources required for ISP_v4_1_1 in amdgpu_isp driver. - GPIO 0 to allow sensor driver to enable and disable sensor module. - GPIO 85 to allow ISP driver to enable and disable ISP RGB streaming mode. Signed-off-by: Pratap Nirujogi Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 2c7f023219966777be0687e15b57689894304cd3 Author: Jens Axboe Date: Wed May 28 13:45:44 2025 -0600 io_uring/net: only consider msg_inq if larger than 1 Currently retry and general validity of msg_inq is gated on it being larger than zero, but it's entirely possible for this to be slightly inaccurate. In particular, if FIN is received, it'll return 1. Just use larger than 1 as the check. This covers both the FIN case, and at the same time, it doesn't make much sense to retry a recv immediately if there's even just a single 1 byte of valid data in the socket. Leave the SOCK_NONEMPTY flagging when larger than 0 still, as an app may use that for the final receive. Cc: stable@vger.kernel.org Reported-by: Christian Mazakas Fixes: 7c71a0af81ba ("io_uring/net: improve recv bundles") Signed-off-by: Jens Axboe commit b1fd8bd0cc18cd8572ac0da21418cce2ee45e04f Merge: 2c26b68cd5c516 6f8b4788266c7d Author: Linus Torvalds Date: Wed May 28 12:40:39 2025 -0700 Merge tag 'dlm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This fixes delays when shutting down SCTP connections, and updates dlm Kconfig for SCTP" * tag 'dlm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: drop SCTP Kconfig dependency dlm: reject SCTP configuration if not enabled dlm: use SHUT_RDWR for SCTP shutdown dlm: mask sk_shutdown value commit 2c26b68cd5c51689b8cee9cb6a21abb5d2ab2d0f Merge: d87d73895fcdbe 425364dc49f050 Author: Linus Torvalds Date: Wed May 28 12:21:12 2025 -0700 Merge tag 'nfsd-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "The marquee feature for this release is that the limit on the maximum rsize and wsize has been raised to 4MB. The default remains at 1MB, but risk-seeking administrators now have the ability to try larger I/O sizes with NFS clients that support them. Eventually the default setting will be increased when we have confidence that this change will not have negative impact. With v6.16, NFSD now has its own debugfs file system where we can add experimental features and make them available outside of our development community without impacting production deployments. The first experimental setting added is one that makes all NFS READ operations use vfs_iter_read() instead of the NFSD splice actor. The plan is to eventually retire the splice actor, as that will enable a number of new capabilities such as the use of struct bio_vec from the top to the bottom of the NFSD stack. Jeff Layton contributed a number of observability improvements. The use of dprintk() in a number of high-traffic code paths has been replaced with static trace points. This release sees the continuation of efforts to harden the NFSv4.2 COPY operation. Soon, the restriction on async COPY operations can be lifted. Many thanks to the contributors, reviewers, testers, and bug reporters who participated during the v6.16 development cycle" * tag 'nfsd-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (60 commits) xdrgen: Fix code generated for counted arrays SUNRPC: Bump the maximum payload size for the server NFSD: Add a "default" block size NFSD: Remove NFSSVC_MAXBLKSIZE_V2 macro NFSD: Remove NFSD_BUFSIZE sunrpc: Remove the RPCSVC_MAXPAGES macro svcrdma: Adjust the number of entries in svc_rdma_send_ctxt::sc_pages svcrdma: Adjust the number of entries in svc_rdma_recv_ctxt::rc_pages sunrpc: Adjust size of socket's receive page array dynamically SUNRPC: Remove svc_rqst :: rq_vec SUNRPC: Remove svc_fill_write_vector() NFSD: Use rqstp->rq_bvec in nfsd_iter_write() SUNRPC: Export xdr_buf_to_bvec() NFSD: De-duplicate the svc_fill_write_vector() call sites NFSD: Use rqstp->rq_bvec in nfsd_iter_read() sunrpc: Replace the rq_bvec array with dynamically-allocated memory sunrpc: Replace the rq_pages array with dynamically-allocated memory sunrpc: Remove backchannel check in svc_init_buffer() sunrpc: Add a helper to derive maxpages from sv_max_mesg svcrdma: Reduce the number of rdma_rw contexts per-QP ... commit d87d73895fcdbe6e45813efc473544433862364f Merge: e9d712653633a0 7acd1b315cdcc0 Author: Linus Torvalds Date: Wed May 28 12:12:08 2025 -0700 Merge tag 'ext4_for_linus-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "New ext4 features and performance improvements: - Fast commit performance improvements - Multi-fsblock atomic write support for bigalloc file systems - Large folio support for regular files This last can result in really stupendous performance for the right workloads. For example, see [1] where the Kernel Test Robot reported over 37% improvement on a large sequential I/O workload. There are also the usual bug fixes and cleanups. Of note are cleanups of the extent status tree to fix potential races that could result in the extent status tree getting corrupted under heavy simultaneous allocation and deallocation to a single file" Link: https://lore.kernel.org/all/202505161418.ec0d753f-lkp@intel.com/ [1] * tag 'ext4_for_linus-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (52 commits) ext4: Add a WARN_ON_ONCE for querying LAST_IN_LEAF instead ext4: Simplify flags in ext4_map_query_blocks() ext4: Rename and document EXT4_EX_FILTER to EXT4_EX_QUERY_FILTER ext4: Simplify last in leaf check in ext4_map_query_blocks ext4: Unwritten to written conversion requires EXT4_EX_NOCACHE ext4: only dirty folios when data journaling regular files ext4: Add atomic block write documentation ext4: Enable support for ext4 multi-fsblock atomic write using bigalloc ext4: Add multi-fsblock atomic write support with bigalloc ext4: Add support for EXT4_GET_BLOCKS_QUERY_LEAF_BLOCKS ext4: Make ext4_meta_trans_blocks() non-static for later use ext4: Check if inode uses extents in ext4_inode_can_atomic_write() ext4: Document an edge case for overwrites jbd2: remove journal_t argument from jbd2_superblock_csum() jbd2: remove journal_t argument from jbd2_chksum() ext4: remove sb argument from ext4_superblock_csum() ext4: remove sbi argument from ext4_chksum() ext4: enable large folio for regular file ext4: make online defragmentation support large folios ext4: make the writeback path support large folios ... commit e9d712653633a05ffff19c39809a7c1820edb2bf Merge: b04f9f88936c7b eeb0819318cc0c Author: Linus Torvalds Date: Wed May 28 12:08:26 2025 -0700 Merge tag 'ntfs3_for_6.16' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs updates from Konstantin Komarov: "Added: - missing direct_IO in ntfs_aops_cmpr - handling of hdr_first_de() return value Fixed: - handling of InitializeFileRecordSegment operation. Removed: - ability to change compression on mounted volume - redundant NULL check" * tag 'ntfs3_for_6.16' of https://github.com/Paragon-Software-Group/linux-ntfs3: fs/ntfs3: remove ability to change compression on mounted volume fs/ntfs3: Fix handling of InitializeFileRecordSegment fs/ntfs3: Add missing direct_IO in ntfs_aops_cmpr fs/ntfs3: handle hdr_first_de() return value fs/ntfs3: Drop redundant NULL check commit b04f9f88936c7b1113b4a74e4b3e6b46858a4c9a Merge: c69d8e9de00995 4dc784e92d4fcf Author: Linus Torvalds Date: Wed May 28 12:05:30 2025 -0700 Merge tag 'for-linus-6.16-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs update from Mike Marshall: "Convert to use the new mount API. Code from Eric Sandeen at redhat that converts orangefs over to the new mount API" * tag 'for-linus-6.16-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: Convert to use the new mount API commit c69d8e9de00995ebc69392a470da99256127fdf1 Merge: a56baa225308e6 46a557694b4648 Author: Linus Torvalds Date: Wed May 28 12:02:04 2025 -0700 Merge tag 'exfat-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Fix xfstests generic/482 test failure - Fix double free in delayed_free * tag 'exfat-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: do not clear volume dirty flag during sync exfat: fix double free in delayed_free commit a56baa225308e697163e74bae0cc623a294073d4 Merge: b08494a8f7416e b83825a8f56a34 Author: Linus Torvalds Date: Wed May 28 11:59:25 2025 -0700 Merge tag 'for-6.16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "A fixup to the xarray conversion sent in the main 6.16 batch. It was not included because it would cause rebase/refresh of like 80 patches, right before sending the early pull request last week. It's fixing a bug when zoned mode is enabled on btrfs so it's not affecting most people" * tag 'for-6.16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails commit c7a48ea9b919e2fa0e4a1d9938fdb03e9afe276c Author: Anubhav Shelat Date: Thu Apr 3 12:04:12 2025 -0400 perf trace: Always print return value for syscalls returning a pid The syscalls that were consistently observed were set_robust_list and rseq. This is because perf cannot find their child process. This change ensures that the return value is always printed. Before: 0.256 ( 0.001 ms): set_robust_list(head: 0x7f09c77dba20, len: 24) = 0.259 ( 0.001 ms): rseq(rseq: 0x7f09c77dc0e0, rseq_len: 32, sig: 1392848979) = After: 0.270 ( 0.002 ms): set_robust_list(head: 0x7f0bb14a6a20, len: 24) = 0 0.273 ( 0.002 ms): rseq(rseq: 0x7f0bb14a70e0, rseq_len: 32, sig: 1392848979) = 0 Committer notes: As discussed in the thread in the Link: tag below, these two don't return a pid, but for syscalls returning one, we need to print the result and if we manage to find the children in 'perf trace' data structures, then print its name as well. Fixes: 11c8e39f5133aed9 ("perf trace: Infrastructure to show COMM strings for syscalls returning PIDs") Reviewed-by: Howard Chu Signed-off-by: Anubhav Shelat Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dapeng Mi Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250403160411.159238-2-ashelat@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit df7996076b1e1ba8a0690542d0e40f703f2f9eb7 Author: meowmeowbeanz Date: Wed May 28 10:56:58 2025 -0700 ASoC: amd: yc: Add support for Lenovo Yoga 7 16ARP8 Add DMI quirk entry for Lenovo Yoga 7 16ARP8 (83BS) to enable digital microphone support via ACP driver. Fixes microphone detection on this specific model which was previously falling back to non-functional generic audio paths. Tested-by: meowmeowbeanz Signed-off-by: meowmeowbeanz Link: https://patch.msgid.link/20250528-yoga-7-16arp8-microphone-fix-v1-1-bfeed2ecd0c2@gmx.com Signed-off-by: Mark Brown commit e8718f9866e5aa25724bc85a518ed5d6ad9d4bb4 Author: Leo Yan Date: Wed May 28 16:35:19 2025 +0100 perf script: Print PERF_AUX_FLAG_COLLISION flag Print out the collision flag for AUX trace data. This is helpful for inspecting sample collisions. After: 0x217b60@/data_nvme1n1/niayan01/upstream/perf.data [0x40]: event: 11 . . ... raw event: size 64 bytes . 0000: 0b 00 00 00 00 00 40 00 d2 ef 3f 00 00 00 00 00 ......@...?..... . 0010: ff 0f 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ................ . 0020: 1c 01 00 00 1c 01 00 00 10 bf 38 d6 11 01 00 00 ..........8..... . 0030: 03 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 ................ 3 1176120114960 0x217b60 [0x40]: PERF_RECORD_AUX offset: 0x3fefd2 size: 0xfff flags: 0x8 [C] The added character '[C]' indicates the collision. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250528153519.188644-1-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 55423e9c534d6b6139f7984d59c627eb86d5ce2e Author: Dr. David Alan Gilbert Date: Sun May 4 00:40:30 2025 +0100 smb: client: Remove an unused function and variable SMB2_QFS_info() has been unused since 2018's commit 730928c8f4be ("cifs: update smb2_queryfs() to use compounding") sign_CIFS_PDUs has been unused since 2009's commit 2edd6c5b0517 ("[CIFS] NTLMSSP support moving into new file, old dead code removed") Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Steve French commit 0dad79cf81999a314affbc5a535898d30c3d8ee4 Author: Namhyung Kim Date: Fri May 23 15:21:57 2025 -0700 perf mem: Show absolute percent in mem_stat output Currently the output sums up to 100% for each entry. But it can be confusing when it's displayed with 'overhead'. Before: $ perf mem report -F overhead,sample,cache,comm ... # -------------- Cache -------------- # Overhead Samples L1 L2 L3 L1-buf Other Command # ........ ............ ................................... ............... # 25.38% 517 34.6% 0.0% 15.8% 23.3% 26.2% swapper 9.03% 239 35.4% 0.8% 9.1% 22.1% 32.6% chrome 8.61% 233 45.3% 1.2% 8.9% 22.7% 21.9% Chrome_ChildIOT 7.81% 189 33.6% 0.4% 5.5% 35.9% 24.6% Isolated Web Co 3.73% 103 40.4% 0.3% 2.7% 39.4% 17.2% gnome-shell Let's convert it to use absolute percent value so that it can add up to the overhead for that entry. After: # -------------- Cache -------------- # Overhead Samples L1 L2 L3 L1-buf Other Command # ........ ............ ................................... ............... # 25.38% 517 8.8% 0.0% 4.0% 5.9% 6.7% swapper 9.03% 239 3.2% 0.1% 0.8% 2.0% 2.9% chrome 8.61% 233 3.9% 0.1% 0.8% 2.0% 1.9% Chrome_ChildIOT 7.81% 189 2.6% 0.0% 0.4% 2.8% 1.9% Isolated Web Co 3.73% 103 1.5% 0.0% 0.1% 1.5% 0.6% gnome-shell This aligns well with the existing 'mem' sort key. $ perf mem report -s comm,mem -H ... # # Overhead Samples Command / Memory access # ......................... .......................................... # 25.38% 517 swapper 8.78% 150 L1 hit 6.66% 72 RAM hit 5.92% 137 LFB/MAB hit 4.02% 157 L3 hit 0.00% 1 L3 miss 9.03% 239 chrome 3.19% 117 L1 hit 2.94% 35 RAM hit 1.99% 48 LFB/MAB hit 0.82% 32 L3 hit 0.08% 5 L2 hit 0.00% 2 L3 miss We can add an option or a config to change the setting later. Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250523222157.1259998-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7a6710d01542f928ab558a0de9578d81f181caf4 Author: Namhyung Kim Date: Fri May 23 15:21:56 2025 -0700 perf mem: Display sort order only if it's available IOW it's not used when -F option is used alone. Let's make it conditional to skip printing incorrect information. Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250523222157.1259998-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 00a23c000e13d4c66f38eefd530dc377cc90ec14 Author: Ravi Bangoria Date: Fri May 23 15:21:55 2025 -0700 perf mem: Describe overhead calculation in brief Unlike perf-report which uses sample period for overhead calculation, perf-mem overhead is calculated using sample weight. Describe perf-mem overhead calculation method in it's man page. Reviewed-by: Leo Yan Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250523222157.1259998-1-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit e9ba21fb5dcf88a9c0dee28df16866d3824adaf1 Merge: 8e86e73626527e d6c8097803cbc3 Author: Paolo Bonzini Date: Wed May 28 13:21:16 2025 -0400 Merge tag 'kvm-s390-next-6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD * Fix interaction between some filesystems and Secure Execution * Some cleanups and refactorings, preparing for an upcoming big series commit a4a859eb6704a8aa46aa1cec5396c8d41383a26b Author: Dapeng Mi Date: Thu Apr 3 06:08:10 2025 +0000 perf record: Fix incorrect --user-regs comments The comment of "--user-regs" option is not correct, fix it. "on interrupt," -> "in user space," Fixes: 84c417422798c897 ("perf record: Support direct --user-regs arguments") Reviewed-by: Ian Rogers Signed-off-by: Dapeng Mi Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250403060810.196028-1-dapeng1.mi@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 74d6a606c2b39fd830d2d7a6363bc5688b4e4b56 Author: Tamir Duberstein Date: Wed Apr 9 10:43:16 2025 -0400 rust: retain pointer mut-ness in `container_of!` Avoid casting the input pointer to `*const _`, allowing the output pointer to be `*mut` if the input is `*mut`. This allows a number of `*const` to `*mut` conversions to be removed at the cost of slightly worse ergonomics when the macro is used with a reference rather than a pointer; the only example of this was in the macro's own doctest. Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250409-container-of-mutness-v1-1-64f472b94534@gmail.com Signed-off-by: Miguel Ojeda commit b08494a8f7416e5f09907318c5460ad6f6e2a548 Merge: a61e2603814372 f8bb3ed3197966 Author: Linus Torvalds Date: Wed May 28 09:46:39 2025 -0700 Merge tag 'drm-next-2025-05-28' of https://gitlab.freedesktop.org/drm/kernel Pull drm updates from Dave Airlie: "As part of building up nova-core/nova-drm pieces we've brought in some rust abstractions through this tree, aux bus being the main one, with devres changes also in the driver-core tree. Along with the drm core abstractions and enough nova-core/nova-drm to use them. This is still all stub work under construction, to build the nova driver upstream. The other big NVIDIA related one is nouveau adds support for Hopper/Blackwell GPUs, this required a new GSP firmware update to 570.144, and a bunch of rework in order to support multiple fw interfaces. There is also the introduction of an asahi uapi header file as a precursor to getting the real driver in later, but to unblock userspace mesa packages while the driver is trapped behind rust enablement. Otherwise it's the usual mixture of stuff all over, amdgpu, i915/xe, and msm being the main ones, and some changes to vsprintf. new drivers: - bring in the asahi uapi header standalone - nova-drm: stub driver rust dependencies (for nova-core): - auxiliary - bus abstractions - driver registration - sample driver - devres changes from driver-core - revocable changes core: - add Apple fourcc modifiers - add virtio capset definitions - extend EXPORT_SYNC_FILE for timeline syncobjs - convert to devm_platform_ioremap_resource - refactor shmem helper page pinning - DP powerup/down link helpers - extended %p4cc in vsprintf.c to support fourcc prints - change vsprintf %p4cn to %p4chR, remove %p4cn - Add drm_file_err function - IN_FORMATS_ASYNC property - move sitronix from tiny to their own subdir rust: - add drm core infrastructure rust abstractions (device/driver, ioctl, file, gem) dma-buf: - adjust sg handling to not cache map on attach - allow setting dma-device for import - Add a helper to sort and deduplicate dma_fence arrays docs: - updated drm scheduler docs - fbdev todo update - fb rendering - actual brightness ttm: - fix delayed destroy resv object bridge: - add kunit tests - convert tc358775 to atomic - convert drivers to devm_drm_bridge_alloc - convert rk3066_hdmi to bridge driver scheduler: - add kunit tests panel: - refcount panels to improve lifetime handling - Powertip PH128800T004-ZZA01 - NLT NL13676BC25-03F, Tianma TM070JDHG34-00 - Himax HX8279/HX8279-D DDIC - Visionox G2647FB105 - Sitronix ST7571 - ZOTAC rotation quirk vkms: - allow attaching more displays i915: - xe3lpd display updates - vrr refactor - intel_display struct conversions - xe2hpd memory type identification - add link rate/count to i915_display_info - cleanup VGA plane handling - refactor HDCP GSC - fix SLPC wait boosting reference counting - add 20ms delay to engine reset - fix fence release on early probe errors xe: - SRIOV updates - BMG PCI ID update - support separate firmware for each GT - SVM fix, prelim SVM multi-device work - export fan speed - temp disable d3cold on BMG - backup VRAM in PM notifier instead of suspend/freeze - update xe_ttm_access_memory to use GPU for non-visible access - fix guc_info debugfs for VFs - use copy_from_user instead of __copy_from_user - append PCIe gen5 limitations to xe_firmware document amdgpu: - DSC cleanup - DC Scaling updates - Fused I2C-over-AUX updates - DMUB updates - Use drm_file_err in amdgpu - Enforce isolation updates - Use new dma_fence helpers - USERQ fixes - Documentation updates - SR-IOV updates - RAS updates - PSP 12 cleanups - GC 9.5 updates - SMU 13.x updates - VCN / JPEG SR-IOV updates amdkfd: - Update error messages for SDMA - Userptr updates - XNACK fixes radeon: - CIK doorbell cleanup nouveau: - add support for NVIDIA r570 GSP firmware - enable Hopper/Blackwell support nova-core: - fix task list - register definition infrastructure - move firmware into own rust module - register auxiliary device for nova-drm nova-drm: - initial driver skeleton msm: - GPU: - ACD (adaptive clock distribution) for X1-85 - drop fictional address_space_size - improve GMU HFI response time out robustness - fix crash when throttling during boot - DPU: - use single CTL path for flushing on DPU 5.x+ - improve SSPP allocation code for better sharing - Enabled SmartDMA on SM8150, SC8180X, SC8280XP, SM8550 - Added SAR2130P support - Disabled DSC support on MSM8937, MSM8917, MSM8953, SDM660 - DP: - switch to new audio helpers - better LTTPR handling - DSI: - Added support for SA8775P - Added SAR2130P support - HDMI: - Switched to use new helpers for ACR data - Fixed old standing issue of HPD not working in some cases amdxdna: - add dma-buf support - allow empty command submits renesas: - add dma-buf support - add zpos, alpha, blend support panthor: - fail properly for NO_MMAP bos - add SET_LABEL ioctl - debugfs BO dumping support imagination: - update DT bindings - support TI AM68 GPU hibmc: - improve interrupt handling and HPD support virtio: - add panic handler support rockchip: - add RK3588 support - add DP AUX bus panel support ivpu: - add heartbeat based hangcheck mediatek: - prepares support for MT8195/99 HDMIv2/DDCv2 anx7625: - improve HPD tegra: - speed up firmware loading * tag 'drm-next-2025-05-28' of https://gitlab.freedesktop.org/drm/kernel: (1627 commits) drm/nouveau/tegra: Fix error pointer vs NULL return in nvkm_device_tegra_resource_addr() drm/xe: Default auto_link_downgrade status to false drm/xe/guc: Make creation of SLPC debugfs files conditional drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue() drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read drm/i915/ptl: Use everywhere the correct DDI port clock select mask drm/nouveau/kms: add support for GB20x drm/dp: add option to disable zero sized address only transactions. drm/nouveau: add support for GB20x drm/nouveau/gsp: add hal for fifo.chan.doorbell_handle drm/nouveau: add support for GB10x drm/nouveau/gf100-: track chan progress with non-WFI semaphore release drm/nouveau/nv50-: separate CHANNEL_GPFIFO handling out from CHANNEL_DMA drm/nouveau: add helper functions for allocating pinned/cpu-mapped bos drm/nouveau: add support for GH100 drm/nouveau: improve handling of 64-bit BARs drm/nouveau/gv100-: switch to volta semaphore methods drm/nouveau/gsp: support deeper page tables in COPY_SERVER_RESERVED_PDES drm/nouveau/gsp: init client VMMs with NV0080_CTRL_DMA_SET_PAGE_DIRECTORY drm/nouveau/gsp: fetch level shift and PDE from BAR2 VMM ... commit a61e26038143727d9b0f1bc01b0370f77f2ad7e4 Merge: 3d413f0cfd7ef0 5e1ff2314797bf Author: Linus Torvalds Date: Wed May 28 09:17:20 2025 -0700 Merge tag 'media/v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - v4l2-core fix: V4L2_BUF_TYPE_VIDEO_OVERLAY is capture, not output - New driver: Amlogic C3 ISP - New sensor drivers: ST VD55G1 and VD56G3, OmniVision OV02C10 - amlogic: c3-mipi-csi2: Handle 64-bits division - a fix for 64-bits division at the amlogic c3-mipi-csi2 driver - Changes at atomisp to support mainline mt9m114 driver and remove deprecated GPIO APIs - various cleanups, fixes and enhancements * tag 'media/v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (314 commits) media: rkvdec: h264: Support High 10 and 4:2:2 profiles media: rkvdec: Add get_image_fmt ops media: rkvdec: Initialize the m2m context before the controls media: rkvdec: h264: Limit minimum profile to constrained baseline media: mediatek: jpeg: support 34bits media: verisilicon: Free post processor buffers on error media: platform: mtk-mdp3: Remove unused mdp_get_plat_device media: amlogic: c3-mipi-csi2: Handle 64-bits division media: uvcvideo: Use dev_err_probe for devm_gpiod_get_optional media: uvcvideo: Fix deferred probing error media: uvcvideo: Rollback non processed entities on error media: uvcvideo: Send control events for partial succeeds media: uvcvideo: Return the number of processed controls media: uvcvideo: Do not turn on the camera for some ioctls media: uvcvideo: Make power management granular media: uvcvideo: Increase/decrease the PM counter per IOCTL media: uvcvideo: Create uvc_pm_(get|put) functions media: uvcvideo: Keep streaming state in the file handle Documentation: media: Add documentation file c3-isp.rst Documentation: media: Add documentation file metafmt-c3-isp.rst ... commit 9883494c45a13dc88d27dde4f988c04823b42a2f Author: Zhiguo Niu Date: Wed May 14 16:45:49 2025 +0800 f2fs: fix to correct check conditions in f2fs_cross_rename Should be "old_dir" here. Fixes: 5c57132eaf52 ("f2fs: support project quota") Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a6c397a31f58a1d577c2c8d04b624e9baa31951c Author: Zhiguo Niu Date: Wed May 14 16:45:48 2025 +0800 f2fs: use d_inode(dentry) cleanup dentry->d_inode no logic changes. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c836d3b8d94e3dd381e7d4bb918875084f85715e Author: Chao Yu Date: Fri May 23 11:25:45 2025 +0800 f2fs: fix to skip f2fs_balance_fs() if checkpoint is disabled Syzbot reports a f2fs bug as below: INFO: task syz-executor328:5856 blocked for more than 144 seconds. Not tainted 6.15.0-rc6-syzkaller-00208-g3c21441eeffc #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor328 state:D stack:24392 pid:5856 tgid:5832 ppid:5826 task_flags:0x400040 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5382 [inline] __schedule+0x168f/0x4c70 kernel/sched/core.c:6767 __schedule_loop kernel/sched/core.c:6845 [inline] schedule+0x165/0x360 kernel/sched/core.c:6860 io_schedule+0x81/0xe0 kernel/sched/core.c:7742 f2fs_balance_fs+0x4b4/0x780 fs/f2fs/segment.c:444 f2fs_map_blocks+0x3af1/0x43b0 fs/f2fs/data.c:1791 f2fs_expand_inode_data+0x653/0xaf0 fs/f2fs/file.c:1872 f2fs_fallocate+0x4f5/0x990 fs/f2fs/file.c:1975 vfs_fallocate+0x6a0/0x830 fs/open.c:338 ioctl_preallocate fs/ioctl.c:290 [inline] file_ioctl fs/ioctl.c:-1 [inline] do_vfs_ioctl+0x1b8f/0x1eb0 fs/ioctl.c:885 __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The root cause is after commit 84b5bb8bf0f6 ("f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable"), we will get chance to allow f2fs_is_checkpoint_ready() to return true once below conditions are all true: 1. checkpoint is disabled 2. there are not enough free segments 3. there are enough free blocks Then it will cause f2fs_balance_fs() to trigger foreground GC. void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) ... if (!f2fs_is_checkpoint_ready(sbi)) return; And the testcase mounts f2fs image w/ gc_merge,checkpoint=disable, so deadloop will happen through below race condition: - f2fs_do_shutdown - vfs_fallocate - gc_thread_func - file_start_write - __sb_start_write(SB_FREEZE_WRITE) - f2fs_fallocate - f2fs_expand_inode_data - f2fs_map_blocks - f2fs_balance_fs - prepare_to_wait - wake_up(gc_wait_queue_head) - io_schedule - bdev_freeze - freeze_super - sb->s_writers.frozen = SB_FREEZE_WRITE; - sb_wait_write(sb, SB_FREEZE_WRITE); - if (sbi->sb->s_writers.frozen >= SB_FREEZE_WRITE) continue; : cause deadloop This patch fix to add check condition in f2fs_balance_fs(), so that if checkpoint is disabled, we will just skip trigger foreground GC to avoid such deadloop issue. Meanwhile let's remove f2fs_is_checkpoint_ready() check condition in f2fs_balance_fs(), since it's redundant, due to the main logic in the function is to check: a) whether checkpoint is disabled b) there is enough free segments f2fs_balance_fs() still has all logics after f2fs_is_checkpoint_ready()'s removal. Reported-by: syzbot+aa5bb5f6860e08a60450@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/682d743a.a00a0220.29bc26.0289.GAE@google.com Fixes: 84b5bb8bf0f6 ("f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable") Cc: Qi Han Signed-off-by: Chao Yu Reviewed-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit 68e7f31eecf1d622c59ef470da24762e6550cd06 Author: Chao Yu Date: Fri May 23 15:33:04 2025 +0800 f2fs: clean up to check bi_status w/ BLK_STS_OK Check bi_status w/ BLK_STS_OK instead of 0 for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 019a8912425e231511042a4eae48b7a9e459453c Author: Chao Yu Date: Fri May 23 15:33:03 2025 +0800 f2fs: introduce is_{meta,node}_folio Just cleanup, no changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 24bcc31fc75b760e7813e1c8257a7439e045e8ad Author: Arnaldo Carvalho de Melo Date: Wed May 28 12:53:08 2025 -0300 Revert "perf thread: Ensure comm_lock held for comm_list" This reverts commit 8f454c95817d15ee529d58389612ea4b34f5ffb3. 'perf top' is freezing on exit sometimes, bisected to this one, revert. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Bill Wendling Cc: Chaitanya S Prakash Cc: Fei Lang Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephen Brennan Link: https://lore.kernel.org/r/aDcyvvOKZkRYbjul@x1 Signed-off-by: Arnaldo Carvalho de Melo commit deecd282bc39bc9b64e50a0f628a8080da27359a Author: yohan.joung Date: Mon May 12 16:36:10 2025 +0900 f2fs: add ckpt_valid_blocks to the section entry when performing buffered writes in a large section, overhead is incurred due to the iteration through ckpt_valid_blocks within the section. when SEGS_PER_SEC is 128, this overhead accounts for 20% within the f2fs_write_single_data_page routine. as the size of the section increases, the overhead also grows. to handle this problem ckpt_valid_blocks is added within the section entries. Test insmod null_blk.ko nr_devices=1 completion_nsec=1 submit_queues=8 hw_queue_depth=64 max_sectors=512 bs=4096 memory_backed=1 make_f2fs /dev/block/nullb0 make_f2fs -s 128 /dev/block/nullb0 fio --bs=512k --size=1536M --rw=write --name=1 --filename=/mnt/test_dir/seq_write --ioengine=io_uring --iodepth=64 --end_fsync=1 before SEGS_PER_SEC 1 2556MiB/s SEGS_PER_SEC 128 2145MiB/s after SEGS_PER_SEC 1 2556MiB/s SEGS_PER_SEC 128 2556MiB/s Signed-off-by: yohan.joung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 249ad438e1d98b30b1ad9283bb4c4a37c4858294 Author: yohan.joung Date: Mon May 12 16:36:09 2025 +0900 f2fs: add a method for calculating the remaining blocks in the current segment in LFS mode. In LFS mode, the previous segment cannot use invalid blocks, so the remaining blocks from the next_blkoff of the current segment to the end of the section are calculated. Signed-off-by: yohan.joung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d6c8097803cbc3bb8d875baef542e6d77d10c203 Author: Claudio Imbrenda Date: Wed May 28 11:55:02 2025 +0200 KVM: s390: Simplify and move pv code All functions in kvm/gmap.c fit better in kvm/pv.c instead. Move and rename them appropriately, then delete the now empty kvm/gmap.c and kvm/gmap.h. Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Steffen Eiden Reviewed-by: Christoph Schlameuss Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20250528095502.226213-5-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250528095502.226213-5-imbrenda@linux.ibm.com> commit 200197908dc4afe03a75234478e6a14634a0a788 Author: Claudio Imbrenda Date: Wed May 28 11:55:01 2025 +0200 KVM: s390: Refactor and split some gmap helpers Refactor some gmap functions; move the implementation into a separate file with only helper functions. The new helper functions work on vm addresses, leaving all gmap logic in the gmap functions, which mostly become just wrappers. The whole gmap handling is going to be moved inside KVM soon, but the helper functions need to touch core mm functions, and thus need to stay in the core of kernel. Reviewed-by: Steffen Eiden Reviewed-by: Christoph Schlameuss Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20250528095502.226213-4-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250528095502.226213-4-imbrenda@linux.ibm.com> commit 7e42ad66fb5d0902b1f8d4d9a8fee898b685046a Author: Claudio Imbrenda Date: Wed May 28 11:55:00 2025 +0200 KVM: s390: Remove unneeded srcu lock All paths leading to handle_essa() already hold the kvm->srcu. Remove unneeded srcu locking from handle_essa(). Add lockdep assertion to make sure we will always be holding kvm->srcu when entering handle_essa(). Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Christian Borntraeger Reviewed-by: Christoph Schlameuss Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20250528095502.226213-3-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250528095502.226213-3-imbrenda@linux.ibm.com> commit af941f3dd8d75d0f6ae911f25a1e68cdc5db2cfd Author: Claudio Imbrenda Date: Wed May 28 11:54:59 2025 +0200 s390: Remove unneeded includes Many files don't need to include asm/tlb.h or asm/gmap.h. On the other hand, asm/tlb.h does need to include asm/gmap.h. Remove all unneeded includes so that asm/tlb.h is not directly used by s390 arch code anymore. Remove asm/gmap.h from a few other files as well, so that now only KVM code, mm/gmap.c, and asm/tlb.h include it. Reviewed-by: Christoph Schlameuss Reviewed-by: Steffen Eiden Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20250528095502.226213-2-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250528095502.226213-2-imbrenda@linux.ibm.com> commit ab73b29efd36f8916c6cc9954e912c4723c9a1b0 Author: David Hildenbrand Date: Fri May 16 14:39:46 2025 +0200 s390/uv: Improve splitting of large folios that cannot be split while dirty Currently, starting a PV VM on an iomap-based filesystem with large folio support, such as XFS, will not work. We'll be stuck in unpack_one()->gmap_make_secure(), because we can't seem to make progress splitting the large folio. The problem is that we require a writable PTE but a writable PTE under such filesystems will imply a dirty folio. So whenever we have a writable PTE, we'll have a dirty folio, and dirty iomap folios cannot currently get split, because split_folio()->split_huge_page_to_list_to_order()->filemap_release_folio() will fail in iomap_release_folio(). So we will not make any progress splitting such large folios. Until dirty folios can be split more reliably, let's manually trigger writeback of the problematic folio using filemap_write_and_wait_range(), and retry the split immediately afterwards exactly once, before looking up the folio again. Should this logic be part of split_folio()? Likely not; most split users don't have to split so eagerly to make any progress. For now, this seems to affect xfs, zonefs and erofs, and this patch makes it work again (tested on xfs only). While this could be considered a fix for commit 6795801366da ("xfs: Support large folios"), commit df2f9708ff1f ("zonefs: enable support for large folios") and commit ce529cc25b18 ("erofs: enable large folios for iomap mode"), before commit eef88fe45ac9 ("s390/uv: Split large folios in gmap_make_secure()"), we did not try splitting large folios at all. So it's all rather part of making SE compatible with file systems that support large folios. But to have some "Fixes:" tag, let's just use eef88fe45ac9. Not CCing stable, because there are a lot of dependencies, and it simply not working is not critical in stable kernels. Reported-by: Sebastian Mitterle Closes: https://issues.redhat.com/browse/RHEL-58218 Fixes: eef88fe45ac9 ("s390/uv: Split large folios in gmap_make_secure()") Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20250516123946.1648026-4-david@redhat.com Message-ID: <20250516123946.1648026-4-david@redhat.com> Reviewed-by: Claudio Imbrenda Signed-off-by: Claudio Imbrenda commit 3d413f0cfd7ef0fe478e98fafcc084209520abd0 Merge: b5628b81bd19fa 654d61b8e0e2f8 Author: Linus Torvalds Date: Wed May 28 08:34:19 2025 -0700 Merge tag 'audit-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: - Always record AUDIT_ANOM events when auditing is enabled. Prior to this patch we only recorded AUDIT_ANOM events if auditing was enabled and the admin/distro had explicitly configured audit beyond the defaults. Considering that AUDIT_ANOM events are anomolous events considered to be "security relevant", it seems wise to record these events as long as auditing is enabled, even if the system is running with a default audit configuration. - Mark the audit_log_vformat() function with the __printf() attribute to quiet GCC. * tag 'audit-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: record AUDIT_ANOM_* events regardless of presence of rules audit: mark audit_log_vformat() with __printf() attribute commit b5628b81bd19fa52d6a35e49336c58d7188eaf1b Merge: 1bc8c83af962a7 05f1a939225ec8 Author: Linus Torvalds Date: Wed May 28 08:28:58 2025 -0700 Merge tag 'selinux-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: - Reduce the SELinux impact on path walks. Add a small directory access cache to the per-task SELinux state. This cache allows SELinux to cache the most recently used directory access decisions in order to avoid repeatedly querying the AVC on path walks where the majority of the directories have similar security contexts/labels. My performance measurements are crude, but prior to this patch the time spent in SELinux code on a 'make allmodconfig' run was 103% that of __d_lookup_rcu(), and with this patch the time spent in SELinux code dropped to 63% of __d_lookup_rcu(), a ~40% improvement. Additional improvments can be expected in the future, but those will require additional SELinux policy/toolchain support. - Add support for wildcards in genfscon policy statements. This patch allows for wildcards in the genfscon patch matching logic as opposed to the prefix matching that was used prior to this change. Adding wilcard support allows for more expressive and efficient path matching in the policy which is especially helpful for sysfs, and has resulted in a ~15% boot time reduction in Android. SELinux policies can opt into wilcard matching by using the "genfs_seclabel_wildcard" policy capability. - Unify the error/OOM handling of the SELinux network caches. A failure to allocate memory for the SELinux network caches isn't fatal as the object label can still be safely returned to the caller, it simply means that we cannot add the new data to the cache, at least temporarily. This patch corrects this behavior for the InfiniBand cache and does some minor cleanup. - Minor improvements around constification, 'likely' annotations, and removal of bogus comments. * tag 'selinux-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix the kdoc header for task_avdcache_update selinux: remove a duplicated include selinux: reduce path walk overhead selinux: support wildcard match in genfscon selinux: drop copy-paste comment selinux: unify OOM handling in network hashtables selinux: add likely hints for fast paths selinux: contify network namespace pointer selinux: constify network address pointer commit 40493d97b329f8185c0f04dc0ef2b9ffc58e7f3b Author: Rodrigo Vivi Date: Wed May 21 12:51:48 2025 -0400 drm/xe: Add missing documentation of rpa_freq While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime. Fixes: c6aac2fa77a3 ("drm/xe: Introduce the RPa information") Cc: Vinay Belgaumkar Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Reviewed-by: Vinay Belgaumkar Link: https://lore.kernel.org/r/20250521165146.39616-4-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 39578fa40420fb11dbe4f42225a347e945d8fd0e) Signed-off-by: Thomas Hellström commit 55f8aa083604ce098c9d6a0911c6bcde15d03a80 Author: Rodrigo Vivi Date: Wed May 21 12:51:47 2025 -0400 drm/xe: Make xe_gt_freq part of the Documentation The documentation was created with the creation of the component, however it has never been actually shown in the actual Documentation. While doing this, fixes the identation style, to avoid new warnings while building htmldocs. Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs") Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250521165146.39616-3-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit af53f0fd99c3bbb3afd29f1612c9e88c5a92cc01) Signed-off-by: Thomas Hellström commit 1bc8c83af962a7f0e52c1ee254acbcb1d9204a5e Merge: 7af6e3febb919e 74e5b13a1b0f10 Author: Linus Torvalds Date: Wed May 28 08:17:19 2025 -0700 Merge tag 'lsm-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm update from Paul Moore: "One minor LSM framework patch to move the selinux_netlink_send() hook under the CONFIG_SECURITY_NETWORK Kconfig knob" * tag 'lsm-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: Move security_netlink_send to under CONFIG_SECURITY_NETWORK commit 7af6e3febb919e8520a5946649993f7edb0495c7 Merge: cbaed2f58c55c1 fe3aebf27dc187 Author: Linus Torvalds Date: Wed May 28 08:12:33 2025 -0700 Merge tag 'integrity-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "Carrying the IMA measurement list across kexec is not a new feature, but is updated to address a couple of issues: - Carrying the IMA measurement list across kexec required knowing apriori all the file measurements between the "kexec load" and "kexec execute" in order to measure them before the "kexec load". Any delay between the "kexec load" and "kexec exec" exacerbated the problem. - Any file measurements post "kexec load" were not carried across kexec, resulting in the measurement list being out of sync with the TPM PCR. With these changes, the buffer for the IMA measurement list is still allocated at "kexec load", but copying the IMA measurement list is deferred to after quiescing the TPM. Two new kexec critical data records are defined" * tag 'integrity-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: do not copy measurement list to kdump kernel ima: measure kexec load and exec events as critical data ima: make the kexec extra memory configurable ima: verify if the segment size has changed ima: kexec: move IMA log copy from kexec load to execute ima: kexec: define functions to copy IMA log at soft boot ima: kexec: skip IMA segment validation after kexec soft reboot kexec: define functions to map and unmap segments ima: define and call ima_alloc_kexec_file_buf() ima: rename variable the seq_file "file" to "ima_kexec_file" commit cbaed2f58c55c13f96250359478bd8fff3ac4c6e Merge: 48cfc5791d83b6 4b59f4fd0a36c3 Author: Linus Torvalds Date: Wed May 28 08:09:37 2025 -0700 Merge tag 'Smack-for-6.16' of https://github.com/cschaufler/smack-next Pull smack update from Casey Schaufler: "One trivial kernel doc fix" * tag 'Smack-for-6.16' of https://github.com/cschaufler/smack-next: security/smack/smackfs: small kernel-doc fixes commit 48cfc5791d83b630fd90a1b64a15a6d09c186f99 Merge: 96d40793abc653 f0cd6012c40da9 Author: Linus Torvalds Date: Wed May 28 07:47:10 2025 -0700 Merge tag 'hardening-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - Update overflow helpers to ease refactoring of on-stack flex array instances (Gustavo A. R. Silva, Kees Cook) - lkdtm: Use SLAB_NO_MERGE instead of constructors (Harry Yoo) - Simplify CONFIG_CC_HAS_COUNTED_BY (Jan Hendrik Farr) - Disable u64 usercopy KUnit test on 32-bit SPARC (Thomas Weißschuh) - Add missed designated initializers now exposed by fixed randstruct (Nathan Chancellor, Kees Cook) - Document compilers versions for __builtin_dynamic_object_size - Remove ARM_SSP_PER_TASK GCC plugin - Fix GCC plugin randstruct, add selftests, and restore COMPILE_TEST builds - Kbuild: induce full rebuilds when dependencies change with GCC plugins, the Clang sanitizer .scl file, or the randstruct seed. - Kbuild: Switch from -Wvla to -Wvla-larger-than=1 - Correct several __nonstring uses for -Wunterminated-string-initialization * tag 'hardening-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (23 commits) Revert "hardening: Disable GCC randstruct for COMPILE_TEST" lib/tests: randstruct: Add deep function pointer layout test lib/tests: Add randstruct KUnit test randstruct: gcc-plugin: Remove bogus void member net: qede: Initialize qede_ll_ops with designated initializer scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops md/bcache: Mark __nonstring look-up table integer-wrap: Force full rebuild when .scl file changes randstruct: Force full rebuild when seed changes gcc-plugins: Force full rebuild when plugins change kbuild: Switch from -Wvla to -Wvla-larger-than=1 hardening: simplify CONFIG_CC_HAS_COUNTED_BY overflow: Fix direct struct member initialization in _DEFINE_FLEX() kunit/overflow: Add tests for STACK_FLEX_ARRAY_SIZE() helper overflow: Add STACK_FLEX_ARRAY_SIZE() helper input/joystick: magellan: Mark __nonstring look-up table const watchdog: exar: Shorten identity name to fit correctly mod_devicetable: Enlarge the maximum platform_device_id name length overflow: Clarify expectations for getting DEFINE_FLEX variable sizes compiler_types: Identify compiler versions for __builtin_dynamic_object_size ... commit 96d40793abc65341c4274169a4444fcfe5f0e6da Merge: feacb1774bd5ea a9b33aae79cea2 Author: Linus Torvalds Date: Wed May 28 07:45:39 2025 -0700 Merge tag 'seccomp-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - selftest fixes for arm32 (Neill Kapron, Terry Tritton) - documentation typo fix (Sumanth Gavini) * tag 'seccomp-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests: seccomp: Fix "performace" to "performance" selftests/seccomp: fix negative_ENOSYS tracer tests on arm32 selftests/seccomp: fix syscall_restart test for arm compat commit 89ab97de44fec8eecedd1d327d418c5781303c05 Author: Frank Li Date: Thu May 22 16:57:09 2025 -0400 dt-bindings: timer: Add fsl,vf610-pit.yaml Add binding doc fsl,vf610-pit.yaml to fix below CHECK_DTB warnings: arch/arm/boot/dts/nxp/vf/vf610m4-colibri.dtb: /soc/bus@40000000/pit@40037000: failed to match any schema with compatible: ['fsl,vf610-pit'] Signed-off-by: Frank Li Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250522205710.502779-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit fd03f82a026cc03cb8051a8c6487c99f96c9029f Author: Heiko Stuebner Date: Wed May 28 00:51:19 2025 +0200 drm/bridge: analogix_dp: Fix clk-disable removal Commit 6579a03e68ff ("drm/bridge: analogix_dp: Remove the unnecessary calls to clk_disable_unprepare() during probing") removed the mismatched clock_disable calls from analogix_dp_probe. But that patch was created and sent before commit e5e9fa9f7aad ("drm/bridge: analogix_dp: Add support to get panel from the DP AUX bus") was merged, so couldn't know about this change. So in the original patch the last change is if (ret) { dev_err(&pdev->dev, "failed to request irq\n"); - goto err_disable_clk; + return ERR_PTR(ret); } disable_irq(dp->irq); return dp; - -err_disable_clk: - clk_disable_unprepare(dp->clock); - return ERR_PTR(ret); } EXPORT_SYMBOL_GPL(analogix_dp_probe); the analogix_dp_core.c actually now has the runtime-pm handling between disable_irq() and return do introducing another goto err_clk_disable there. So remove that one too and return an error pointer, to not create build breakage. Fixes: 6579a03e68ff ("drm/bridge: analogix_dp: Remove the unnecessary calls to clk_disable_unprepare() during probing") Signed-off-by: Heiko Stuebner Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250527225120.3361663-1-heiko@sntech.de Signed-off-by: Dmitry Baryshkov commit b9457813016841df82eaa39f1f00ddebf385f352 Author: Tommaso Merciai Date: Wed May 28 09:30:40 2025 +0200 dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3E SoC Add a compatible string for the Renesas RZ/G3E SoC variants that include a Mali-G52 GPU. These variants share the same restrictions on interrupts, clocks, and power domains as the RZ/G2L SoC, so extend the existing schema validation accordingly. Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250528073040.904033-1-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Rob Herring (Arm) commit 6dd7a0fde91f252858f4d4cff4245577319b7b88 Author: Ian Rogers Date: Tue May 27 20:26:36 2025 -0700 perf test trace_summary: Skip --bpf-summary tests if no libbpf If perf is built without libbpf (e.g. NO_LIBBPF=1) then the --bpf-summary perf trace tests will fail. Skip the tests as this is expected behavior. Signed-off-by: Ian Rogers Acked-by: Howard Chu Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528032637.198960-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8755f940a0a6c4485181708c5e82936c31250c67 Author: Ian Rogers Date: Tue May 27 20:26:35 2025 -0700 perf test intel-pt: Skip jitdump test if no libelf jitdump support is only present if building with libelf. Skip the intel-pt jitdump test if perf isn't compiled with libelf support. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528032637.198960-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 040a008d0e5006123ac1b6e96b9de615e587ab7e Author: Ian Rogers Date: Tue May 27 20:26:34 2025 -0700 perf intel-tpebs: Avoid race when evlist is being deleted Reading through the evsel->evlist may seg fault if a sample arrives when the evlist is being deleted. Detect this case and ignore samples arriving when the evlist is being deleted. Fixes: bcfab08db7fb38bf ("perf intel-tpebs: Filter non-workload samples") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alex Gaynor Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528032637.198960-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 07f2b1287c970e0706c0e8fbb358ca4c1e7f8d4e Author: Ian Rogers Date: Tue May 27 20:26:32 2025 -0700 perf test demangle-java: Don't segv if demangling fails The buffer returned by dso__demangle_sym() may be NULL, don't segv in strcmp if this happens. Currently this happens for NO_LIBELF=1 builds. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andi Kleen Cc: Andreas Hindborg Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Danilo Krummrich Cc: Dmitriy Vyukov Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephen Brennan Cc: Trevor Gross Cc: Weilin Wang Link: https://lore.kernel.org/r/20250528032637.198960-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fef8f648bb47726d96a5701fe31ed606268da73d Author: Ian Rogers Date: Tue May 27 20:26:31 2025 -0700 perf symbol: Fix use-after-free in filename__read_build_id The same buf is used for the program headers and reading notes. As the notes memory may be reallocated then this corrupts the memory pointed to by the phdr. Using the same buffer is in any case a logic error. Rather than deal with the duplicated code, introduce an elf32 boolean and a union for either the elf32 or elf64 headers that are in use. Let the program headers have their own memory and grow the buffer for notes as necessary. Before `perf list -j` compiled with asan would crash with: ``` ==4176189==ERROR: AddressSanitizer: heap-use-after-free on address 0x5160000070b8 at pc 0x555d3b15075b bp 0x7ffebb5a8090 sp 0x7ffebb5a8088 READ of size 8 at 0x5160000070b8 thread T0 #0 0x555d3b15075a in filename__read_build_id tools/perf/util/symbol-minimal.c:212:25 #1 0x555d3ae43aff in filename__sprintf_build_id tools/perf/util/build-id.c:110:8 ... 0x5160000070b8 is located 312 bytes inside of 560-byte region [0x516000006f80,0x5160000071b0) freed by thread T0 here: #0 0x555d3ab21840 in realloc (perf+0x264840) (BuildId: 12dff2f6629f738e5012abdf0e90055518e70b5e) #1 0x555d3b1506e7 in filename__read_build_id tools/perf/util/symbol-minimal.c:206:11 ... previously allocated by thread T0 here: #0 0x555d3ab21423 in malloc (perf+0x264423) (BuildId: 12dff2f6629f738e5012abdf0e90055518e70b5e) #1 0x555d3b1503a2 in filename__read_build_id tools/perf/util/symbol-minimal.c:182:9 ... ``` Note: this bug is long standing and not introduced by the other asan fix in commit fa9c4977fbfb ("perf symbol-minimal: Fix double free in filename__read_build_id"). Fixes: b691f64360ecec49 ("perf symbols: Implement poor man's ELF parser") Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20250528032637.198960-2-irogers@google.com Cc: Mark Rutland Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Howard Chu Cc: Alice Ryhl Cc: Dmitry Vyukov Cc: Peter Zijlstra Cc: Adrian Hunter Cc: Weilin Wang Cc: Andreas Hindborg Cc: Arnaldo Carvalho de Melo Cc: Danilo Krummrich Cc: Jiri Olsa Cc: Namhyung Kim Cc: Miguel Ojeda Cc: James Clark Cc: Jiapeng Chong Cc: Andi Kleen Cc: Alexander Shishkin Cc: Kan Liang Cc: Stephen Brennan Cc: Benno Lossin Cc: Björn Roy Baron Cc: Ingo Molnar Cc: Trevor Gross Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2a2a7f5e7deffa363b438308812989ded126a48a Author: Ian Rogers Date: Tue May 27 14:50:35 2025 -0700 perf pmu: Avoid segv for missing name/alias_name in wildcarding The pmu name or alias_name fields may be NULL and should be skipped if so. This is done in all loops of perf_pmu___name_match except the final wildcard loop which was an oversight. Fixes: 63e287131cf0c59b ("perf pmu: Rename name matching for no suffix or wildcard variants") Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250527215035.187992-1-irogers@google.com [ Fixup the Fixes: tag to the right commit ] Signed-off-by: Arnaldo Carvalho de Melo commit 4c04654455c09b4905b84c350d88f718260a4cd4 Author: Ian Rogers Date: Wed Mar 12 22:29:51 2025 -0700 perf machine: Factor creating a "live" machine out of dwarf-unwind Factor out for use in places other than the dwarf unwinding tests for libunwind. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anne Macedo Cc: Dmitriy Vyukov Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yicong Yang Link: https://lore.kernel.org/r/20250313052952.871958-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 05e6d2ff6b6f9cc1d8dd06ee5d2b6623636b6571 Author: Luca Weiss Date: Wed May 7 10:01:37 2025 +0200 ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Document the bindings for the sound card on Fairphone 5 which uses the older non-audioreach audio architecture. Acked-by: Rob Herring (Arm) Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250507-fp5-dp-sound-v4-1-4098e918a29e@fairphone.com Signed-off-by: Rob Herring (Arm) commit bd428b8c79ed8e8658570e70c62c0092500e2eac Author: David Hildenbrand Date: Fri May 16 14:39:45 2025 +0200 s390/uv: Always return 0 from s390_wiggle_split_folio() if successful Let's consistently return 0 if the operation was successful, and just detect ourselves whether splitting is required -- folio_test_large() is a cheap operation. Update the documentation. Should we simply always return -EAGAIN instead of 0, so we don't have to handle it in the caller? Not sure, staring at the documentation, this way looks a bit cleaner. Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20250516123946.1648026-3-david@redhat.com Message-ID: <20250516123946.1648026-3-david@redhat.com> Reviewed-by: Claudio Imbrenda Signed-off-by: Claudio Imbrenda commit 3ec8a8330a1aa846dffbf1d64479213366c55b54 Author: David Hildenbrand Date: Fri May 16 14:39:44 2025 +0200 s390/uv: Don't return 0 from make_hva_secure() if the operation was not successful If s390_wiggle_split_folio() returns 0 because splitting a large folio succeeded, we will return 0 from make_hva_secure() even though a retry is required. Return -EAGAIN in that case. Otherwise, we'll return 0 from gmap_make_secure(), and consequently from unpack_one(). In kvm_s390_pv_unpack(), we assume that unpacking succeeded and skip unpacking this page. Later on, we run into issues and fail booting the VM. So far, this issue was only observed with follow-up patches where we split large pagecache XFS folios. Maybe it can also be triggered with shmem? We'll cleanup s390_wiggle_split_folio() a bit next, to also return 0 if no split was required. Fixes: d8dfda5af0be ("KVM: s390: pv: fix race when making a page secure") Cc: stable@vger.kernel.org Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20250516123946.1648026-2-david@redhat.com Message-ID: <20250516123946.1648026-2-david@redhat.com> Reviewed-by: Claudio Imbrenda Signed-off-by: Claudio Imbrenda commit bc4005ef43104da589951dba69291360c6a11ae7 Author: Bram Vlerick Date: Wed May 28 10:25:48 2025 +0200 ASoC: tas571x: fix tas5733 num_controls Commit e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") introduces a separate struct for the tas5733 controls but did not update the num_controls with the correct ARRAY_SIZE. Fixes: e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") Signed-off-by: Bram Vlerick Acked-by: Peter Korsgaard Link: https://patch.msgid.link/20250528-tas5733-fix-controls-size-v1-1-5c70595accaf@openpixelsystems.org Signed-off-by: Mark Brown commit 8e86e73626527e5a69bf5263d6bbe9c2a86b4319 Merge: 4e02d4f9734fa5 4dbe28c0fabd69 Author: Paolo Bonzini Date: Tue May 27 12:17:06 2025 -0400 Merge branch 'kvm-lockdep-common' into HEAD Introduce new mutex locking functions mutex_trylock_nest_lock() and mutex_lock_killable_nest_lock() and use them to clean up locking of all vCPUs for a VM. For x86, this removes some complex code that was used instead of lockdep's "nest_lock" feature. For ARM and RISC-V, this removes a lockdep warning when the VM is configured to have more than MAX_LOCK_DEPTH vCPUs, and removes a fair amount of duplicate code by sharing the logic across all architectures. Signed-off-by: Paolo BOnzini commit 4dbe28c0fabd69842890ba38f185b96664cba26a Author: Paolo Bonzini Date: Wed May 28 10:34:30 2025 +0200 rust: add helper for mutex_trylock After commit c5b6ababd21a ("locking/mutex: implement mutex_trylock_nested", currently in the KVM tree) mutex_trylock() will be a macro when lockdep is enabled. Rust therefore needs the corresponding helper. Just add it and the rust/bindings/bindings_helpers_generated.rs Makefile rules will do their thing. Reported-by: Stephen Rothwell Signed-off-by: Paolo Bonzini Message-ID: <20250528083431.1875345-1-pbonzini@redhat.com> Acked-by: Miguel Ojeda Reviewed-by: Alice Ryhl Signed-off-by: Paolo Bonzini commit 4557cc834712eca4eae7adbd9f0a06bdd8f79c99 Author: Karol Wachowski Date: Thu May 15 11:41:24 2025 +0200 accel/ivpu: Reorder Doorbell Unregister and Command Queue Destruction Refactor ivpu_cmdq_unregister() to ensure the doorbell is unregistered before destroying the command queue. The NPU firmware requires doorbells to be unregistered prior to command queue destruction. If doorbell remains registered when command queue destroy command is sent firmware will automatically unregister the doorbell, making subsequent unregister attempts no-operations (NOPs). Ensure compliance with firmware expectations by moving the doorbell unregister call ahead of the command queue destruction logic, thus preventing unnecessary NOP operation. Fixes: 465a3914b254 ("accel/ivpu: Add API for command queue create/destroy/submit") Signed-off-by: Karol Wachowski Reviewed-by: Jeff Hugo Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250515094124.255141-1-jacek.lawrynowicz@linux.intel.com commit 1c2c0e29f24360b3130c005a3c261cb8c7b363c6 Author: Jacek Lawrynowicz Date: Tue May 6 11:20:30 2025 +0200 accel/ivpu: Use firmware names from upstream repo Use FW names from linux-firmware repo instead of deprecated ones. The vpu_37xx.bin style names were never released and were only used for internal testing, so it is safe to remove them. Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support") Cc: stable@vger.kernel.org # v6.13+ Reviewed-by: Lizhi Hou Reviewed-by: Jeff Hugo Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250506092030.280276-1-jacek.lawrynowicz@linux.intel.com commit a01e93ee44f7ed76f872d0ede82f8d31bf0a048a Author: Jacek Lawrynowicz Date: Tue May 6 11:13:03 2025 +0200 accel/ivpu: Improve buffer object logging - Fix missing alloc log when drm_gem_handle_create() fails in drm_vma_node_allow() and open callback is not called - Add ivpu_bo->ctx_id that enables to log the actual context id instead of using 0 as default - Add couple WARNs and errors so we can catch more memory corruption issues Fixes: 37dee2a2f433 ("accel/ivpu: Improve buffer object debug logs") Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Jeff Hugo Reviewed-by: Lizhi Hou Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250506091303.262034-1-jacek.lawrynowicz@linux.intel.com commit f6bd8faeb113c8ab783466bc5bc1a5442ae85176 Merge: acea6b132d813a 57a92d14659df3 Author: Paolo Abeni Date: Wed May 28 10:03:53 2025 +0200 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Merge in late fixes to prepare for the 6.16 net-next PR. No conflicts nor adjacent changes. Signed-off-by: Paolo Abeni commit acea6b132d813a12ac414f6b1efb05921623afc0 Author: Saket Kumar Bhaskar Date: Tue May 27 11:11:38 2025 +0530 selftests/bpf: Fix bpf selftest build warning On linux-next, build for bpf selftest displays a warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'. Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") changed the header guard from _LINUX_IF_XDP_H to _UAPI_LINUX_IF_XDP_H in include/uapi/linux/if_xdp.h. To resolve the warning, update tools/include/uapi/linux/if_xdp.h to align with the changes in include/uapi/linux/if_xdp.h Fixes: 8066e388be48 ("net: add UAPI to the header guard in various network headers") Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/c2bc466d-dff2-4d0d-a797-9af7f676c065@linux.ibm.com/ Tested-by: Venkat Rao Bagalkote Signed-off-by: Saket Kumar Bhaskar Acked-by: Daniel Borkmann Link: https://patch.msgid.link/20250527054138.1086006-1-skb99@linux.ibm.com Signed-off-by: Paolo Abeni commit 6da5f1b4b4a06ebd3af1510ebd3ecf60a5037936 Author: Phil Sutter Date: Tue May 27 11:41:17 2025 +0200 selftests: netfilter: Fix skip of wildcard interface test The script is supposed to skip wildcard interface testing if unsupported by the host's nft tool. The failing check caused script abort due to 'set -e' though. Fix this by running the potentially failing nft command inside the if-conditional pipe. Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks") Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso Link: https://patch.msgid.link/20250527094117.18589-1-phil@nwl.cc Signed-off-by: Paolo Abeni commit 34ecde3c56066ba79e5ec3d93c5b14ea83e3603e Author: Jens Axboe Date: Tue May 27 17:01:31 2025 -0600 iomap: don't lose folio dropbehind state for overwrites DONTCACHE I/O must have the completion punted to a workqueue, just like what is done for unwritten extents, as the completion needs task context to perform the invalidation of the folio(s). However, if writeback is started off filemap_fdatawrite_range() off generic_sync() and it's an overwrite, then the DONTCACHE marking gets lost as iomap_add_to_ioend() don't look at the folio being added and no further state is passed down to help it know that this is a dropbehind/DONTCACHE write. Check if the folio being added is marked as dropbehind, and set IOMAP_IOEND_DONTCACHE if that is the case. Then XFS can factor this into the decision making of completion context in xfs_submit_ioend(). Additionally include this ioend flag in the NOMERGE flags, to avoid mixing it with unrelated IO. Since this is the 3rd flag that will cause XFS to punt the completion to a workqueue, add a helper so that each one of them can get appropriately commented. This fixes extra page cache being instantiated when the write performed is an overwrite, rather than newly instantiated blocks. Fixes: b2cd5ae693a3 ("iomap: make buffered writes work with RWF_DONTCACHE") Signed-off-by: Jens Axboe Link: https://lore.kernel.org/5153f6e8-274d-4546-bf55-30a5018e0d03@kernel.dk Reviewed-by: Dave Chinner Signed-off-by: Christian Brauner commit 206cc44588f72b49ad4d7e21a7472ab2a72a83df Author: Sami Uddin Date: Mon May 12 07:51:53 2025 +0930 virtio: reject shm region if length is zero Prevent usage of shared memory regions where the length is zero, as such configurations are not valid and may lead to unexpected behavior. Signed-off-by: Sami Uddin Message-Id: <20250511222153.2332-1-sami.md.ko@gmail.com> Signed-off-by: Michael S. Tsirkin commit 57a92d14659df3e7e7e0052358c8cc68bbbc3b5e Author: Horatiu Vultur Date: Fri May 23 10:27:16 2025 +0200 net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames We have noticed that when PHY timestamping is enabled, L2 frames seems to be modified by changing two 2 bytes with a value of 0. The place were these 2 bytes seems to be random(or I couldn't find a pattern). In most of the cases the userspace can ignore these frames but if for example those 2 bytes are in the correction field there is nothing to do. This seems to happen when configuring the HW for IPv4 even that the flow is not enabled. These 2 bytes correspond to the UDPv4 checksum and once we don't enable clearing the checksum when using L2 frames then the frame doesn't seem to be changed anymore. Fixes: 7d272e63e0979d ("net: phy: mscc: timestamping and PHC support") Signed-off-by: Horatiu Vultur Link: https://patch.msgid.link/20250523082716.2935895-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit 0bdc924bfb319fb10d1113cbf091fc26fb7b1f99 Author: Faicker Mo Date: Fri May 23 03:41:43 2025 +0000 net: openvswitch: Fix the dead loop of MPLS parse The unexpected MPLS packet may not end with the bottom label stack. When there are many stacks, The label count value has wrapped around. A dead loop occurs, soft lockup/CPU stuck finally. stack backtrace: UBSAN: array-index-out-of-bounds in /build/linux-0Pa0xK/linux-5.15.0/net/openvswitch/flow.c:662:26 index -1 is out of range for type '__be32 [3]' CPU: 34 PID: 0 Comm: swapper/34 Kdump: loaded Tainted: G OE 5.15.0-121-generic #131-Ubuntu Hardware name: Dell Inc. PowerEdge C6420/0JP9TF, BIOS 2.12.2 07/14/2021 Call Trace: show_stack+0x52/0x5c dump_stack_lvl+0x4a/0x63 dump_stack+0x10/0x16 ubsan_epilogue+0x9/0x36 __ubsan_handle_out_of_bounds.cold+0x44/0x49 key_extract_l3l4+0x82a/0x840 [openvswitch] ? kfree_skbmem+0x52/0xa0 key_extract+0x9c/0x2b0 [openvswitch] ovs_flow_key_extract+0x124/0x350 [openvswitch] ovs_vport_receive+0x61/0xd0 [openvswitch] ? kernel_init_free_pages.part.0+0x4a/0x70 ? get_page_from_freelist+0x353/0x540 netdev_port_receive+0xc4/0x180 [openvswitch] ? netdev_port_receive+0x180/0x180 [openvswitch] netdev_frame_hook+0x1f/0x40 [openvswitch] __netif_receive_skb_core.constprop.0+0x23a/0xf00 __netif_receive_skb_list_core+0xfa/0x240 netif_receive_skb_list_internal+0x18e/0x2a0 napi_complete_done+0x7a/0x1c0 bnxt_poll+0x155/0x1c0 [bnxt_en] __napi_poll+0x30/0x180 net_rx_action+0x126/0x280 ? bnxt_msix+0x67/0x80 [bnxt_en] handle_softirqs+0xda/0x2d0 irq_exit_rcu+0x96/0xc0 common_interrupt+0x8e/0xa0 Fixes: fbdcdd78da7c ("Change in Openvswitch to support MPLS label depth of 3 in ingress direction") Signed-off-by: Faicker Mo Acked-by: Ilya Maximets Reviewed-by: Aaron Conole Link: https://patch.msgid.link/259D3404-575D-4A6D-B263-1DF59A67CF89@zenlayer.com Signed-off-by: Paolo Abeni commit 6e9f2df1c550ead7cecb3e450af1105735020c92 Author: Kuniyuki Iwashima Date: Thu May 22 15:18:56 2025 -0700 calipso: Don't call calipso functions for AF_INET sk. syzkaller reported a null-ptr-deref in txopt_get(). [0] The offset 0x70 was of struct ipv6_txoptions in struct ipv6_pinfo, so struct ipv6_pinfo was NULL there. However, this never happens for IPv6 sockets as inet_sk(sk)->pinet6 is always set in inet6_create(), meaning the socket was not IPv6 one. The root cause is missing validation in netlbl_conn_setattr(). netlbl_conn_setattr() switches branches based on struct sockaddr.sa_family, which is passed from userspace. However, netlbl_conn_setattr() does not check if the address family matches the socket. The syzkaller must have called connect() for an IPv6 address on an IPv4 socket. We have a proper validation in tcp_v[46]_connect(), but security_socket_connect() is called in the earlier stage. Let's copy the validation to netlbl_conn_setattr(). [0]: Oops: general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077] CPU: 2 UID: 0 PID: 12928 Comm: syz.9.1677 Not tainted 6.12.0 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:txopt_get include/net/ipv6.h:390 [inline] RIP: 0010: Code: 02 00 00 49 8b ac 24 f8 02 00 00 e8 84 69 2a fd e8 ff 00 16 fd 48 8d 7d 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 53 02 00 00 48 8b 6d 70 48 85 ed 0f 84 ab 01 00 RSP: 0018:ffff88811b8afc48 EFLAGS: 00010212 RAX: dffffc0000000000 RBX: 1ffff11023715f8a RCX: ffffffff841ab00c RDX: 000000000000000e RSI: ffffc90007d9e000 RDI: 0000000000000070 RBP: 0000000000000000 R08: ffffed1023715f9d R09: ffffed1023715f9e R10: ffffed1023715f9d R11: 0000000000000003 R12: ffff888123075f00 R13: ffff88810245bd80 R14: ffff888113646780 R15: ffff888100578a80 FS: 00007f9019bd7640(0000) GS:ffff8882d2d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f901b927bac CR3: 0000000104788003 CR4: 0000000000770ef0 PKRU: 80000000 Call Trace: calipso_sock_setattr+0x56/0x80 net/netlabel/netlabel_calipso.c:557 netlbl_conn_setattr+0x10c/0x280 net/netlabel/netlabel_kapi.c:1177 selinux_netlbl_socket_connect_helper+0xd3/0x1b0 security/selinux/netlabel.c:569 selinux_netlbl_socket_connect_locked security/selinux/netlabel.c:597 [inline] selinux_netlbl_socket_connect+0xb6/0x100 security/selinux/netlabel.c:615 selinux_socket_connect+0x5f/0x80 security/selinux/hooks.c:4931 security_socket_connect+0x50/0xa0 security/security.c:4598 __sys_connect_file+0xa4/0x190 net/socket.c:2067 __sys_connect+0x12c/0x170 net/socket.c:2088 __do_sys_connect net/socket.c:2098 [inline] __se_sys_connect net/socket.c:2095 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:2095 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xaa/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f901b61a12d Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9019bd6fa8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f901b925fa0 RCX: 00007f901b61a12d RDX: 000000000000001c RSI: 0000200000000140 RDI: 0000000000000003 RBP: 00007f901b701505 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f901b5b62a0 R15: 00007f9019bb7000 Modules linked in: Fixes: ceba1832b1b2 ("calipso: Set the calipso socket label to match the secattr.") Reported-by: syzkaller Reported-by: John Cheung Closes: https://lore.kernel.org/netdev/CAP=Rh=M1LzunrcQB1fSGauMrJrhL6GGps5cPAKzHJXj6GQV+-g@mail.gmail.com/ Signed-off-by: Kuniyuki Iwashima Acked-by: Paul Moore Link: https://patch.msgid.link/20250522221858.91240-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit fc6895345fe682e68bc594a186cbf90d35b3bf7c Merge: 67af4ec948e8ce 2945ff733dee95 Author: Paolo Abeni Date: Wed May 28 08:55:37 2025 +0200 Merge branch 'net_sched-hfsc-address-reentrant-enqueue-adding-class-to-eltree-twice' Pedro Tammela says: ==================== net_sched: hfsc: Address reentrant enqueue adding class to eltree twice Savino says: "We are writing to report that this recent patch (141d34391abbb315d68556b7c67ad97885407547) can be bypassed, and a UAF can still occur when HFSC is utilized with NETEM. The patch only checks the cl->cl_nactive field to determine whether it is the first insertion or not, but this field is only incremented by init_vf. By using HFSC_RSC (which uses init_ed), it is possible to bypass the check and insert the class twice in the eltree. Under normal conditions, this would lead to an infinite loop in hfsc_dequeue for the reasons we already explained in this report. However, if TBF is added as root qdisc and it is configured with a very low rate, it can be utilized to prevent packets from being dequeued. This behavior can be exploited to perform subsequent insertions in the HFSC eltree and cause a UAF." To fix both the UAF and the infinite loop, with netem as an hfsc child, check explicitly in hfsc_enqueue whether the class is already in the eltree whenever the HFSC_RSC flag is set. Also add a TDC test to reproduce the UAF scenario. ==================== Link: https://patch.msgid.link/20250522181448.1439717-1-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit 2945ff733dee951ed64d0f13cba22348bfc1f438 Author: Pedro Tammela Date: Thu May 22 15:14:48 2025 -0300 selftests/tc-testing: Add a test for HFSC eltree double add with reentrant enqueue behaviour on netem Reproduce the UAF scenario where netem is a child of HFSC and HFSC is configured to use the eltree. In such case, this TDC test would cause the HFSC class to be added to the eltree twice resulting in a UAF. Reviewed-by: Victor Nogueira Signed-off-by: Pedro Tammela Link: https://patch.msgid.link/20250522181448.1439717-3-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit ac9fe7dd8e730a103ae4481147395cc73492d786 Author: Pedro Tammela Date: Thu May 22 15:14:47 2025 -0300 net_sched: hfsc: Address reentrant enqueue adding class to eltree twice Savino says: "We are writing to report that this recent patch (141d34391abbb315d68556b7c67ad97885407547) [1] can be bypassed, and a UAF can still occur when HFSC is utilized with NETEM. The patch only checks the cl->cl_nactive field to determine whether it is the first insertion or not [2], but this field is only incremented by init_vf [3]. By using HFSC_RSC (which uses init_ed) [4], it is possible to bypass the check and insert the class twice in the eltree. Under normal conditions, this would lead to an infinite loop in hfsc_dequeue for the reasons we already explained in this report [5]. However, if TBF is added as root qdisc and it is configured with a very low rate, it can be utilized to prevent packets from being dequeued. This behavior can be exploited to perform subsequent insertions in the HFSC eltree and cause a UAF." To fix both the UAF and the infinite loop, with netem as an hfsc child, check explicitly in hfsc_enqueue whether the class is already in the eltree whenever the HFSC_RSC flag is set. [1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141d34391abbb315d68556b7c67ad97885407547 [2] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L1572 [3] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L677 [4] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/sch_hfsc.c#L1574 [5] https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigR_eIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis_0G7VEk=@willsroot.io/T/#u Fixes: 37d9cf1a3ce3 ("sched: Fix detection of empty queues in child qdiscs") Reported-by: Savino Dicanosa Reported-by: William Liu Acked-by: Jamal Hadi Salim Tested-by: Victor Nogueira Signed-off-by: Pedro Tammela Link: https://patch.msgid.link/20250522181448.1439717-2-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit 67af4ec948e8ce3ea53a9cf614d01fddf172e56d Author: Hariprasad Kelam Date: Thu May 22 17:28:42 2025 +0530 octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback This patch addresses below issues, 1. Active traffic on the leaf node must be stopped before its send queue is reassigned to the parent. This patch resolves the issue by marking the node as 'Inner'. 2. During a system reboot, the interface receives TC_HTB_LEAF_DEL and TC_HTB_LEAF_DEL_LAST callbacks to delete its HTB queues. In the case of TC_HTB_LEAF_DEL_LAST, although the same send queue is reassigned to the parent, the current logic still attempts to update the real number of queues, leadning to below warnings New queues can't be registered after device unregistration. WARNING: CPU: 0 PID: 6475 at net/core/net-sysfs.c:1714 netdev_queue_update_kobjects+0x1e4/0x200 Fixes: 5e6808b4c68d ("octeontx2-pf: Add support for HTB offload") Signed-off-by: Hariprasad Kelam Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250522115842.1499666-1-hkelam@marvell.com Signed-off-by: Paolo Abeni commit 479c58016099d19686e36f6c50f912360839a7fa Author: Hariprasad Kelam Date: Thu May 22 15:17:41 2025 +0530 octeontx2-pf: QOS: Perform cache sync on send queue teardown QOS is designed to create a new send queue whenever a class is created, ensuring proper shaping and scheduling. However, when multiple send queues are created and deleted in a loop, SMMU errors are observed. This patch addresses the issue by performing an data cache sync during the teardown of QOS send queues. Fixes: ab6dddd2a669 ("octeontx2-pf: qos send queues management") Signed-off-by: Hariprasad Kelam Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250522094742.1498295-1-hkelam@marvell.com Signed-off-by: Paolo Abeni commit 290e5d3c49f687c1567bde634dc33d57b0674919 Author: Haiyang Zhang Date: Mon May 19 09:20:36 2025 -0700 net: mana: Add support for Multi Vports on Bare metal To support Multi Vports on Bare metal, increase the device config response version. And, skip the register HW vport, and register filter steps, when the Bare metal hostmode is set. Signed-off-by: Haiyang Zhang Link: https://patch.msgid.link/1747671636-5810-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Paolo Abeni commit feacb1774bd5eac6382990d0f6d1378dc01dd78f Merge: 3b66e6b3c09864 273cc949655c70 Author: Linus Torvalds Date: Tue May 27 21:12:50 2025 -0700 Merge tag 'sched_ext-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext updates from Tejun Heo: - More in-kernel idle CPU selection improvements. Expand topology awareness coverage add scx_bpf_select_cpu_and() to allow more flexibility. The idle CPU selection kfuncs can now be called from unlocked contexts too. - A bunch of reorganization changes to lay the foundation for multiple hierarchical scheduler support. This isn't ready yet and the included changes don't make meaningful behavior differences. One notable change is replacing some static_key tests with dynamic tests as the test results may differ depending on the scheduler instance. This isn't expected to cause meaningful performance difference. - Other minor and doc updates. - There were multiple patches in for-6.15-fixes which conflicted with changes in for-6.16. for-6.15-fixes were pulled three times into for-6.16 to resolve the conflicts. * tag 'sched_ext-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: (49 commits) sched_ext: Call ops.update_idle() after updating builtin idle bits sched_ext, docs: convert mentions of "CFS" to "fair-class scheduler" selftests/sched_ext: Update test enq_select_cpu_fails sched_ext: idle: Consolidate default idle CPU selection kfuncs selftests/sched_ext: Add test for scx_bpf_select_cpu_and() via test_run sched_ext: idle: Allow scx_bpf_select_cpu_and() from unlocked context sched_ext: idle: Validate locking correctness in scx_bpf_select_cpu_and() sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c sched_ext, docs: add label sched_ext: Explain the temporary situation around scx_root dereferences sched_ext: Add @sch to SCX_CALL_OP*() sched_ext: Cleanup [__]scx_exit/error*() sched_ext: Add @sch to SCX_CALL_OP*() sched_ext: Clean up scx_root usages Documentation: scheduler: Changed lowercase acronyms to uppercase sched_ext: Avoid NULL scx_root deref in __scx_exit() sched_ext: Add RCU protection to scx_root in DSQ iterator sched_ext: Clean up SCX_EXIT_NONE handling in scx_disable_workfn() sched_ext: Move disable machinery into scx_sched sched_ext: Move event_stats_cpu into scx_sched ... commit 3b66e6b3c098646f75c54e269dd963e2281c555c Merge: 91ad250cbe5785 82648b8b2ae0a0 Author: Linus Torvalds Date: Tue May 27 20:59:53 2025 -0700 Merge tag 'cgroup-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - cgroup rstat shared the tracking tree across all controllers with the rationale being that a cgroup which is using one resource is likely to be using other resources at the same time (ie. if something is allocating memory, it's probably consuming CPU cycles). However, this turned out to not scale very well especially with memcg using rstat for internal operations which made memcg stat read and flush patterns substantially different from other controllers. JP Kobryn split the rstat tree per controller. - cgroup BPF support was hooking into cgroup init/exit paths directly. Convert them to use a notifier chain instead so that other usages can be added easily. The two of the patches which implement this are mislabeled as belonging to sched_ext instead of cgroup. Sorry. - Relatively minor cpuset updates - Documentation updates * tag 'cgroup-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (23 commits) sched_ext: Convert cgroup BPF support to use cgroup_lifetime_notifier sched_ext: Introduce cgroup_lifetime_notifier cgroup: Minor reorganization of cgroup_create() cgroup, docs: cpu controller's interaction with various scheduling policies cgroup, docs: convert space indentation to tab indentation cgroup: avoid per-cpu allocation of size zero rstat cpu locks cgroup, docs: be specific about bandwidth control of rt processes cgroup: document the rstat per-cpu initialization cgroup: helper for checking rstat participation of css cgroup: use subsystem-specific rstat locks to avoid contention cgroup: use separate rstat trees for each subsystem cgroup: compare css to cgroup::self in helper for distingushing css cgroup: warn on rstat usage by early init subsystems cgroup/cpuset: drop useless cpumask_empty() in compute_effective_exclusive_cpumask() cgroup/rstat: Improve cgroup_rstat_push_children() documentation cgroup: fix goto ordering in cgroup_init() cgroup: fix pointer check in css_rstat_init() cgroup/cpuset: Add warnings to catch inconsistency in exclusive CPUs cgroup/cpuset: Fix obsolete comment in cpuset_css_offline() cgroup/cpuset: Always use cpu_active_mask ... commit 91ad250cbe57855362c99642a454294e8d314c7d Merge: f1975e4765e5df 23227e71b69af9 Author: Linus Torvalds Date: Tue May 27 20:49:06 2025 -0700 Merge tag 'wq-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Fix statistic update race condition and a couple documentation updates" * tag 'wq-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix typo in comment workqueue: Fix race condition in wq->stats incrementation workqueue: Better document teardown for delayed_work commit f1975e4765e5df2b91d400d4ac25c9243a25e92a Merge: c35328632ed89e 23b8bacf154759 Author: Linus Torvalds Date: Tue May 27 20:43:35 2025 -0700 Merge tag 'sysctl-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl updates from Joel Granados: - Move kern_table members out of kernel/sysctl.c Moved a subset (tracing, panic, signal, stack_tracer and sparc) out of the kern_table array. The goal is for kern_table to only have sysctl elements. All this increases modularity by placing the ctl_tables closer to where they are used while reducing the chances of merge conflicts in kernel/sysctl.c. - Fixed sysctl unit test panic by relocating it to selftests * tag 'sysctl-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: sysctl: Close test ctl_headers with a for loop sysctl: call sysctl tests with a for loop sysctl: Add 0012 to test the u8 range check sysctl: move u8 register test to lib/test_sysctl.c sparc: mv sparc sysctls into their own file under arch/sparc/kernel stack_tracer: move sysctl registration to kernel/trace/trace_stack.c tracing: Move trace sysctls into trace.c signal: Move signal ctl tables into signal.c panic: Move panic ctl tables into panic.c commit c35328632ed89efeb616603e7fa151ac730fafe4 Merge: 5cf5240991bcea f440518f379d22 Author: Linus Torvalds Date: Tue May 27 20:40:36 2025 -0700 Merge tag 'm68k-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - One more strscpy() conversion - Fix detection of real Mac II - defconfig updates * tag 'm68k-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v6.15-rc1 m68k: mac: Fix macintosh_config for Mac II m68k: Replace strcpy() with strscpy() in hardware_proc_show() commit 5cf5240991bcea3c0f38e36e65e1742d6db7912c Merge: 23022f545610cc 7f9bbc1140ff87 Author: Linus Torvalds Date: Tue May 27 20:36:30 2025 -0700 Merge tag 'for-linus-6.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - A fix for running as a Xen dom0 on the iMX8QXP Arm platform - An update of the xen.config adding XEN_UNPOPULATED_ALLOC for better support of PVH dom0 - A fix of the Xen balloon driver when running without CONFIG_XEN_UNPOPULATED_ALLOC - A fix of the dm_op Xen hypercall on Arm needed to pass user space buffers to the hypervisor in certain configurations * tag 'for-linus-6.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/arm: call uaccess_ttbr0_enable for dm_op hypercall xen/x86: fix initial memory balloon target xen: enable XEN_UNPOPULATED_ALLOC as part of xen.config xen: swiotlb: Wire up map_resource callback commit c5cebb241e27ed0c3f4c1d2ce63089398e0ed17e Author: Alexei Starovoitov Date: Tue May 27 17:27:04 2025 -0700 bpf, arm64: Remove unused-but-set function and variable. Remove unused-but-set function and variable to fix the build warning: arch/arm64/net/bpf_jit_comp.c: In function 'arch_bpf_trampoline_size': 2547 | int nregs, ret; | ^~~~~ Fixes: 9014cf56f13d ("bpf, arm64: Support up to 12 function arguments") Reported-by: kernel test robot Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Xu Kuohai Link: https://lore.kernel.org/bpf/20250528002704.21197-1-alexei.starovoitov@gmail.com Closes: https://lore.kernel.org/oe-kbuild-all/202505280643.h0qYcSCM-lkp@intel.com/ commit 23022f545610cceacd765bcd6c19102fa11755e0 Merge: c89756bcf406af 3ee7d949634224 Author: Linus Torvalds Date: Tue May 27 20:09:06 2025 -0700 Merge tag 'dma-mapping-6.16-2025-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux Pull dma-mapping updates from Marek Szyprowski: "New two step DMA mapping API, which is is a first step to a long path to provide alternatives to scatterlist and to remove hacks, abuses and design mistakes related to scatterlists. This new approach optimizes some calls to DMA-IOMMU layer and cache maintenance by batching them, reduces memory usage as it is no need to store mapped DMA addresses to unmap them, and reduces some function call overhead. It is a combination effort of many people, lead and developed by Christoph Hellwig and Leon Romanovsky" * tag 'dma-mapping-6.16-2025-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux: docs: core-api: document the IOVA-based API dma-mapping: add a dma_need_unmap helper dma-mapping: Implement link/unlink ranges API iommu/dma: Factor out a iommu_dma_map_swiotlb helper dma-mapping: Provide an interface to allow allocate IOVA iommu: add kernel-doc for iommu_unmap_fast iommu: generalize the batched sync after map interface dma-mapping: move the PCI P2PDMA mapping helpers to pci-p2pdma.h PCI/P2PDMA: Refactor the p2pdma mapping helpers commit 375700bab5b150e876e42d894a9a7470881f8a61 Author: Jens Axboe Date: Fri May 23 13:13:11 2025 -0600 llist: make llist_add_batch() a static inline The function is small enough that it should be, and it's a (very) hot path for io_uring. Doing this actually reduces my vmlinux text size for my standard build/test box. Before: axboe@r7625 ~/g/linux (test)> size vmlinux text data bss dec hex filename 19892174 5938310 2470432 28300916 1afd674 vmlinux After: axboe@r7625 ~/g/linux (test)> size vmlinux text data bss dec hex filename 19891878 5938310 2470436 28300624 1afd550 vmlinux Link: https://lkml.kernel.org/r/f1d104c6-7ac8-457a-a53d-6bb741421b2f@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Andrew Morton commit 5ef2dccfcca8d864e2f4c5b1628a22b446bc009a Author: Wang Yaxin Date: Wed May 21 09:31:57 2025 +0800 delayacct: remove redundant code and adjust indentation Remove redundant code and adjust indentation of xxx_delay_max/min. Link: https://lkml.kernel.org/r/20250521093157668iQrhhcMjA-th5LQf4-A3c@zte.com.cn Signed-off-by: Wang Yaxin Signed-off-by: Jiang Kun Cc: Balbir Singh Cc: xu xin Cc: Yang Yang Signed-off-by: Andrew Morton commit 2e227ff5e2729b5f4e0771826e3f6b61dd6a1b6b Author: Chanho Min Date: Wed May 21 16:25:59 2025 +0900 squashfs: add optional full compressed block caching The commit 93e72b3c612adcaca1 ("squashfs: migrate from ll_rw_block usage to BIO") removed caching of compressed blocks in SquashFS, causing fio performance regression in workloads with repeated file reads. Without caching, every read triggers disk I/O, severely impacting performance in tools like fio. This patch introduces a new CONFIG_SQUASHFS_COMP_CACHE_FULL Kconfig option to enable caching of all compressed blocks, restoring performance to pre-BIO migration levels. When enabled, all pages in a BIO are cached in the page cache, reducing disk I/O for repeated reads. The fio test results with this patch confirm the performance restoration: For example, fio tests (iodepth=1, numjobs=1, ioengine=psync) show a notable performance restoration: Disable CONFIG_SQUASHFS_COMP_CACHE_FULL: IOPS=815, BW=102MiB/s (107MB/s)(6113MiB/60001msec) Enable CONFIG_SQUASHFS_COMP_CACHE_FULL: IOPS=2223, BW=278MiB/s (291MB/s)(16.3GiB/59999msec) The tradeoff is increased memory usage due to caching all compressed blocks. The CONFIG_SQUASHFS_COMP_CACHE_FULL option allows users to enable this feature selectively, balancing performance and memory usage for workloads with frequent repeated reads. Link: https://lkml.kernel.org/r/20250521072559.2389-1-chanho.min@lge.com Signed-off-by: Chanho Min Reviewed-by Phillip Lougher Signed-off-by: Andrew Morton commit 4496e1c1354bd4837bcc1414f6e1a4d042857903 Author: Arnd Bergmann Date: Wed May 21 18:03:19 2025 +0200 crash_dump, nvme: select CONFIGFS_FS as built-in Configfs can be configured as a loadable module, which causes a link-time failure for dm-crypt crash dump support: crash_dump_dm_crypt.c:(.text+0x3a4): undefined reference to `config_item_init_type_name' aarch64-linux-ld: kernel/crash_dump_dm_crypt.o: in function `configfs_dmcrypt_keys_init': crash_dump_dm_crypt.c:(.init.text+0x90): undefined reference to `config_group_init' aarch64-linux-ld: crash_dump_dm_crypt.c:(.init.text+0xb4): undefined reference to `configfs_register_subsystem' aarch64-linux-ld: crash_dump_dm_crypt.c:(.init.text+0xd8): undefined reference to `configfs_unregister_subsystem' This could be avoided with a dependency on CONFIGFS_FS=y, but the dependency has an additional problem of causing Kconfig dependency loops since most other uses select the symbol. Using a simple 'select CONFIGFS_FS' here in turn fails with CONFIG_DM_CRYPT=m, because that still only causes configfs to be a loadable module. The only version I found that fixes this reliably uses an additional Kconfig symbol to ensure the 'select' actually turns on configfs as builtin, with two additional changes to avoid dependency loops with nvme and sysfs. There is no compile-time dependency between configfs and sysfs, so selecting configfs from a driver with sysfs disabled does not cause link failures, only the default /sys/kernel/config mount point will not be created. Link: https://lkml.kernel.org/r/20250521160359.2132363-1-arnd@kernel.org Fixes: 6b23858fd63b ("crash_dump: make dm crypt keys persist for the kdump kernel") Fixes: 1fb470408497 ("nvme-loop: add configfs dependency") Signed-off-by: Arnd Bergmann Cc: Andreas Hindborg Cc: Breno Leitao Cc: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Coiby Xu Cc: Jens Axboe Cc: Sagi Grimberg Signed-off-by: Andrew Morton commit c544a952ba61b1a025455098033c17e0573ab085 Author: Nikhil Dhama Date: Mon Apr 7 16:22:19 2025 +0530 mm: pcp: increase pcp->free_count threshold to trigger free_high In old pcp design, pcp->free_factor gets incremented in nr_pcp_free() which is invoked by free_pcppages_bulk(). So, it used to increase free_factor by 1 only when we try to reduce the size of pcp list and free_high used to trigger only for order > 0 and order < costly_order and pcp->free_factor > 0. For iperf3 I noticed that with older design in kernel v6.6, pcp list was drained mostly when pcp->count > high (more often when count goes above 530). and most of the time pcp->free_factor was 0, triggering very few high order flushes. But this is changed in the current design, introduced in commit 6ccdcb6d3a74 ("mm, pcp: reduce detecting time of consecutive high order page freeing"), where pcp->free_factor is changed to pcp->free_count to keep track of the number of pages freed contiguously. In this design, pcp->free_count is incremented on every deallocation, irrespective of whether pcp list was reduced or not. And logic to trigger free_high is if pcp->free_count goes above batch (which is 63) and there are two contiguous page free without any allocation. With this design, for iperf3, pcp list is getting flushed more frequently because free_high heuristics is triggered more often now. I observed that high order pcp list is drained as soon as both count and free_count goes above 63. Due to this more aggressive high order flushing, applications doing contiguous high order allocation will require to go to global list more frequently. On a 2-node AMD machine with 384 vCPUs on each node, connected via Mellonox connectX-7, I am seeing a ~30% performance reduction if we scale number of iperf3 client/server pairs from 32 to 64. Though this new design reduced the time to detect high order flushes, but for application which are allocating high order pages more frequently it may be flushing the high order list pre-maturely. This motivates towards tuning on how late or early we should flush high order lists. So, in this patch, we increased the pcp->free_count threshold to trigger free_high from "batch" to "batch + pcp->high_min / 2" as suggested by Ying [1], In the original pcp->free_factor solution, free_high is triggered for contiguous freeing with size ranging from "batch" to "pcp->high + batch". So, the average value is "batch + pcp->high / 2". While in the pcp->free_count solution, free_high will be triggered for contiguous freeing with size "batch". So, to restore the original behavior, we can use the threshold "batch + pcp->high_min / 2" This new threshold keeps high order pages in pcp list for a longer duration which can help the application doing high order allocations frequently. With this patch performace to Iperf3 is restored and score for other benchmarks on the same machine are as follows: iperf3 lmbench3 netperf kbuild (AF_UNIX) (SCTP_STREAM_MANY) ------- --------- ----------------- ------ v6.6 vanilla (base) 100 100 100 100 v6.12 vanilla 69 113 98.5 98.8 v6.12 + this patch 100 110.3 100.2 99.3 netperf-tcp: 6.12 6.12 vanilla this_patch Hmean 64 732.14 ( 0.00%) 730.45 ( -0.23%) Hmean 128 1417.46 ( 0.00%) 1419.44 ( 0.14%) Hmean 256 2679.67 ( 0.00%) 2676.45 ( -0.12%) Hmean 1024 8328.52 ( 0.00%) 8339.34 ( 0.13%) Hmean 2048 12716.98 ( 0.00%) 12743.68 ( 0.21%) Hmean 3312 15787.79 ( 0.00%) 15887.25 ( 0.63%) Hmean 4096 17311.91 ( 0.00%) 17332.68 ( 0.12%) Hmean 8192 20310.73 ( 0.00%) 20465.09 ( 0.76%) Link: https://lore.kernel.org/all/875xjmuiup.fsf@DESKTOP-5N7EMDA/ [1] Link: https://lkml.kernel.org/r/20250407105219.55351-1-nikhil.dhama@amd.com Fixes: 6ccdcb6d3a74 ("mm, pcp: reduce detecting time of consecutive high order page freeing") Signed-off-by: Nikhil Dhama Suggested-by: Huang Ying Reviewed-by: Huang Ying Cc: Raghavendra K T Cc: Mel Gorman Cc: Bharata B Rao Signed-off-by: Andrew Morton commit 05275594a311cd7427a64b8bcc6097645c0344af Author: Fan Ni Date: Mon May 5 11:22:44 2025 -0700 mm/hugetlb: convert use of struct page to folio in __unmap_hugepage_range() In __unmap_hugepage_range(), the "page" pointer always points to the first page of a huge page, which guarantees there is a folio associating with it. Convert the "page" pointer to use folio. Link: https://lkml.kernel.org/r/20250505182345.506888-6-nifan.cxl@gmail.com Signed-off-by: Fan Ni Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Sidhartha Kumar Cc: "Vishal Moola (Oracle)" Signed-off-by: Andrew Morton commit 7f4b6065d9a842721a04632fc219aa453d1b2f5c Author: Fan Ni Date: Mon May 5 11:22:43 2025 -0700 mm/hugetlb: refactor __unmap_hugepage_range() to take folio instead of page The function __unmap_hugepage_range() has two kinds of users: 1) unmap_hugepage_range(), which passes in the head page of a folio. Since unmap_hugepage_range() already takes folio and there are no other uses of the folio struct in the function, it is natural for __unmap_hugepage_range() to take folio also. 2) All other uses, which pass in NULL pointer. In both cases, we can pass in folio. Refactor __unmap_hugepage_range() to take folio. Link: https://lkml.kernel.org/r/20250505182345.506888-5-nifan.cxl@gmail.com Signed-off-by: Fan Ni Acked-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Sidhartha Kumar Cc: "Vishal Moola (Oracle)" Signed-off-by: Andrew Morton commit 81edb1ba3232afd45ae7f3f492a91019571b18c9 Author: Fan Ni Date: Mon May 5 11:22:42 2025 -0700 mm/hugetlb: refactor unmap_hugepage_range() to take folio instead of page The function unmap_hugepage_range() has two kinds of users: 1) unmap_ref_private(), which passes in the head page of a folio. Since unmap_ref_private() already takes folio and there are no other uses of the folio struct in the function, it is natural for unmap_hugepage_range() to take folio also. 2) All other uses, which pass in NULL pointer. In both cases, we can pass in folio. Refactor unmap_hugepage_range() to take folio. Link: https://lkml.kernel.org/r/20250505182345.506888-4-nifan.cxl@gmail.com Signed-off-by: Fan Ni Reviewed-by: Muchun Song Reviewed-by: Sidhartha Kumar Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: "Vishal Moola (Oracle)" Signed-off-by: Andrew Morton commit b0752f1a709740fd6ae518e969a25f90ec6a100f Author: Fan Ni Date: Mon May 5 11:22:41 2025 -0700 mm/hugetlb: pass folio instead of page to unmap_ref_private() Patch series "Let unmap_hugepage_range() and several related functions take folio instead of page", v4. This patch (of 4): unmap_ref_private() has only a single user, which passes in &folio->page. Let it take the folio directly. Link: https://lkml.kernel.org/r/20250505182345.506888-2-nifan.cxl@gmail.com Link: https://lkml.kernel.org/r/20250505182345.506888-3-nifan.cxl@gmail.com Signed-off-by: Fan Ni Reviewed-by: Muchun Song Reviewed-by: Sidhartha Kumar Reviewed-by: Oscar Salvador Reviewed-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Cc: "Vishal Moola (Oracle)" Signed-off-by: Andrew Morton commit 163786f71a12237841b998db39e48fa574f861fd Merge: 429d410bf9eff7 affffcbb87266b Author: Jakub Kicinski Date: Tue May 27 19:19:37 2025 -0700 Merge branch 'devmem-tcp-minor-cleanups-and-ksft-improvements' Mina Almasry says: ==================== Devmem TCP minor cleanups and ksft improvements v2: https://lore.kernel.org/20250519023517.4062941-1-almasrymina@google.com ==================== Link: https://patch.msgid.link/20250523230524.1107879-1-almasrymina@google.com Signed-off-by: Jakub Kicinski commit affffcbb87266b76b6f83edb39ae404604ffc6b5 Author: Mina Almasry Date: Fri May 23 23:05:24 2025 +0000 net: devmem: ncdevmem: remove unused variable This variable is unused and can be removed. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-9-almasrymina@google.com Signed-off-by: Jakub Kicinski commit baa18bc5353fcb99bc49944c51c6c7829cb1da55 Author: Mina Almasry Date: Fri May 23 23:05:23 2025 +0000 net: devmem: ksft: upgrade rx test to send 1K data The current test just sends "hello\nworld" and verifies that is the string received on the RX side. That is fine, but improve the test a bit by sending 1K data. The test should be improved further to send more data, but for now this should be a welcome improvement. The test will send a repeating pattern of 0x01, 0x02, ... 0x06. The ncdevmem `-v 7` flag will verify this pattern. ncdevmem will provide useful debugging info when the test fails, such as the frags received and verified fine, and which frag exactly failed, what was the expected byte pattern, and what is the actual byte pattern received. All this debug information will be useful when the test fails. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-8-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 243d47a5e1e47b2b72d654d7278fc8bff0199b0c Author: Mina Almasry Date: Fri May 23 23:05:22 2025 +0000 net: devmem: ksft: add 5 tuple FS support ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple FS support, but the ksft is currently 3-tuple only. Support drivers that have 5-tuple FS supported by adding a ksft arg. Signed-off-by: Mina Almasry fix 5-tuple fix 5-tuple Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-7-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 57605ae8e1b61be0029b4ff39298e6eaef824948 Author: Mina Almasry Date: Fri May 23 23:05:21 2025 +0000 net: devmem: ksft: add exit_wait to make rx test pass This exit_wait seems necessary to make the rx side test pass for me. I think this is just missed from the original test add patch. Add it now. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-6-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 12d31142e63a1ff78b93e998a519e22e2425cf18 Author: Mina Almasry Date: Fri May 23 23:05:20 2025 +0000 net: devmem: ksft: add ipv4 support ncdevmem supports both ipv4 and ipv6, but the ksft is currently ipv6-only. Propagate the ipv4 support to the ksft, so that folks that are limited to these networks can also test. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-5-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 85cea17d15c9d6c54d6dfe27e7246337eb6a025d Author: Mina Almasry Date: Fri May 23 23:05:19 2025 +0000 net: devmem: preserve sockc_err Preserve the error code returned by sock_cmsg_send and return that on err. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-4-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 170ebc60b79a5745addf7b408bce9b86bbd7c29d Author: Mina Almasry Date: Fri May 23 23:05:18 2025 +0000 page_pool: fix ugly page_pool formatting Minor cleanup; this line is badly formatted. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-3-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 88e47c93b3a2a45b55f03f238b68be826917bb2e Author: Mina Almasry Date: Fri May 23 23:05:17 2025 +0000 net: devmem: move list_add to net_devmem_bind_dmabuf. It's annoying for the list_add to be outside net_devmem_bind_dmabuf, but the list_del is in net_devmem_unbind_dmabuf. Make it consistent by having both the list_add/del be inside the net_devmem_[un]bind_dmabuf. Cc: ap420073@gmail.com Signed-off-by: Mina Almasry Tested-by: Taehee Yoo Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250523230524.1107879-2-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 429d410bf9eff7bc930e5850277c87ed47ceaeea Author: Florian Westphal Date: Fri May 23 14:16:57 2025 +0200 selftests: netfilter: nft_queue.sh: include file transfer duration in log message Paolo Abeni says: Recently the nipa CI infra went through some tuning, and the mentioned self-test now often fails. The failing test is the sctp+nfqueue one, where the file transfer takes too long and hits the timeout (1 minute). Because SCTP nfqueue tests had timeout related issues before (esp. on debug kernels) print the file transfer duration in the PASS/FAIL message. This would aallow us to see if there is/was an unexpected slowdown (CI keeps logs around) or 'creeping slowdown' where things got slower over time until 'fail point' was reached. Output of altered lines looks like this: PASS: tcp and nfqueue in forward chan (duration: 2s) PASS: tcp via loopback (duration: 2s) PASS: sctp and nfqueue in forward chain (duration: 42s) PASS: sctp and nfqueue in output chain with GSO (duration: 21s) Reported-by: Paolo Abeni Link: https://patch.msgid.link/20250523121700.20011-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 7831003165d37ecb7b33843fcee05cada0359a82 Author: Nitin Rawat Date: Mon May 26 21:08:12 2025 +0530 scsi: ufs: qcom: Prevent calling phy_exit() before phy_init() Prevent calling phy_exit() before phy_init() to avoid abnormal power count and the following warning during boot up. [5.146763] phy phy-1d80000.phy.0: phy_power_on was called before phy_init Fixes: 7bac65687510 ("scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_sequence()") Signed-off-by: Nitin Rawat Link: https://lore.kernel.org/r/20250526153821.7918-2-quic_nitirawa@quicinc.com Reviewed-by: Konrad Dybcio Signed-off-by: Martin K. Petersen commit 846992645b25ec4253167e3f931e4597eb84af56 Author: Horatiu Vultur Date: Thu May 22 13:57:22 2025 +0200 net: phy: mscc: Fix memory leak when using one step timestamping Fix memory leak when running one-step timestamping. When running one-step sync timestamping, the HW is configured to insert the TX time into the frame, so there is no reason to keep the skb anymore. As in this case the HW will never generate an interrupt to say that the frame was timestamped, then the frame will never released. Fix this by freeing the frame in case of one-step timestamping. Fixes: 7d272e63e0979d ("net: phy: mscc: timestamping and PHC support") Signed-off-by: Horatiu Vultur Link: https://patch.msgid.link/20250522115722.2827199-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit c77b37dafb81660b939f82d81b637b91b0207cfe Author: Can Guo Date: Thu May 22 10:15:37 2025 +0800 scsi: ufs: qcom: Call ufs_qcom_cfg_timers() in clock scaling path ufs_qcom_cfg_timers() is clock freq dependent like ufs_qcom_set_core_clk_ctrl(), hence move ufs_qcom_cfg_timers() call to clock scaling path. In addition, do not assume the devfreq OPP freq is always the 'core_clock' freq although 'core_clock' is the first clock phandle in device tree, use ufs_qcom_opp_freq_to_clk_freq() to find the core clk freq. Signed-off-by: Can Guo Co-developed-by: Ziqi Chen Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/20250522021537.999107-4-quic_ziqichen@quicinc.com Reported-by: Luca Weiss Closes: https://lore.kernel.org/linux-arm-msm/D9FZ9U3AEXW4.1I12FX3YQ3JPW@fairphone.com/ Tested-by: Luca Weiss Reviewed-by: Bean Huo Tested-by: Loïc Minier Signed-off-by: Martin K. Petersen commit 8c5bcb3daeef9bc54c9939c36dca9a626126eb59 Author: Can Guo Date: Thu May 22 10:15:36 2025 +0800 scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq On some platforms, the devfreq OPP freq may be different than the unipro core clock freq. Implement ufs_qcom_opp_freq_to_clk_freq() and use it to find the unipro core clk freq. Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop") Signed-off-by: Can Guo Co-developed-by: Ziqi Chen Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/20250522021537.999107-3-quic_ziqichen@quicinc.com Reported-by: Luca Weiss Closes: https://lore.kernel.org/linux-arm-msm/D9FZ9U3AEXW4.1I12FX3YQ3JPW@fairphone.com/ Tested-by: Luca Weiss Reviewed-by: Bean Huo Tested-by: Loïc Minier Signed-off-by: Martin K. Petersen commit 663d0c19f3acc0d697f623d34b8eb3b438bf2bda Author: Ziqi Chen Date: Thu May 22 10:15:35 2025 +0800 scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear() The vop freq_to_gear() may return a gear greater than the negotiated max gear. Return the negotiated max gear if the mapped gear is greater. Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop") Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/20250522021537.999107-2-quic_ziqichen@quicinc.com Reported-by: Neil Armstrong Closes: https://lore.kernel.org/all/c7f2476a-943a-4d73-ad80-802c91e5f880@linaro.org/ Tested-by: Neil Armstrong Reviewed-by: Bean Huo Tested-by: Loïc Minier Signed-off-by: Martin K. Petersen commit 0ae992637cf7011af0128e6136f3b595de54e03e Author: Tomas Henzl Date: Wed May 21 18:51:48 2025 +0200 scsi: aacraid: Remove useless code There isn't a AAC_MIN_NATIVE_SIZE defined so remove eight useless lines. When at it remove also an unused #define No functional change. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20250521165148.8856-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen commit c8426f258a0aa4c2fa0fb87806b73592b03dacac Author: mrigendrachaubey Date: Sat May 24 09:25:16 2025 +0530 scsi: core: devinfo: Fix typo in comment Correct a minor typo in a comment within scsi_devinfo.c, replacing "compatibile" with the correct spelling "compatible". Signed-off-by: mrigendrachaubey Link: https://lore.kernel.org/r/20250524035516.27341-1-mrigendra.chaubey@gmail.com Signed-off-by: Martin K. Petersen commit e97633492f5a3eca7b3ff03b4ef6f993017f7955 Author: Ziqi Chen Date: Thu May 22 16:12:28 2025 +0800 scsi: ufs: core: Don't perform UFS clkscaling during host async scan When preparing for UFS clock scaling, the UFS driver will quiesce all sdevs queues in the UFS SCSI host tagset list and then unquiesce them in ufshcd_clock_scaling_unprepare(). If the UFS SCSI host async scan is in progress at this time, some LUs may be added to the tagset list between UFS clkscale prepare and unprepare. This can cause two issues: 1. During clock scaling, there may be I/O requests issued through new added queues that have not been quiesced, leading to task abort issue. 2. These new added queues that have not been quiesced will be unquiesced as well when UFS clkscale is unprepared, resulting in warning prints. Therefore, use the mutex lock scan_mutex in ufshcd_clock_scaling_prepare() and ufshcd_clock_scaling_unprepare() to protect it. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/20250522081233.2358565-1-quic_ziqichen@quicinc.com Suggested-by: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 33f1b3677a13dda60a2a59858f7916672e7f1546 Author: Christoph Hellwig Date: Mon May 26 07:47:45 2025 +0200 sctp: mark sctp_do_peeloff static sctp_do_peeloff is only used inside of net/sctp/socket.c, so mark it static. Signed-off-by: Christoph Hellwig Acked-by: Xin Long Link: https://patch.msgid.link/20250526054745.2329201-1-hch@lst.de Signed-off-by: Jakub Kicinski commit 3b9935586a9b54d2da27901b830d3cf46ad66a1e Author: Rengarajan S Date: Fri May 23 23:03:26 2025 +0530 net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices Maximum OTP and EEPROM size for hearthstone PCI1xxxx devices are 8 Kb and 64 Kb respectively. Adjust max size definitions and return correct EEPROM length based on device. Also prevent out-of-bound read/write. Signed-off-by: Rengarajan S Link: https://patch.msgid.link/20250523173326.18509-1-rengarajan.s@microchip.com Signed-off-by: Jakub Kicinski commit 7a91722e0dd47bc5d1b4b8416966bf993c93a72f Author: Jiawen Wu Date: Fri May 23 16:04:38 2025 +0800 net: txgbe: Support the FDIR rules assigned to VFs When SR-IOV is enabled, the FDIR rule is supported to filter packets to VFs. The action queue id is calculated as an absolute id. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/BE7EA355FDDAAA97+20250523080438.27968-2-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 06ac0776d549d93adf23c823b810118980265ad9 Author: Jiawen Wu Date: Fri May 23 16:04:37 2025 +0800 net: libwx: Fix statistics of multicast packets When SR-IOV is enabled, the number of multicast packets is mistakenly counted starting from queue 0. It would be a wrong count that includes the packets received on VF. Fix it to count from the correct offset. Fixes: c52d4b898901 ("net: libwx: Redesign flow when sriov is enabled") Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/F70910CFE86C1F6F+20250523080438.27968-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 1d887d6f810dbf908da9709393c95ae1a649d587 Author: Jasjiv Singh Date: Thu Mar 13 14:51:01 2025 -0700 ipe: add errno field to IPE policy load auditing Users of IPE require a way to identify when and why an operation fails, allowing them to both respond to violations of policy and be notified of potentially malicious actions on their systems with respect to IPE. This patch introduces a new error field to the AUDIT_IPE_POLICY_LOAD event to log policy loading failures. Currently, IPE only logs successful policy loads, but not failures. Tracking failures is crucial to detect malicious attempts and ensure a complete audit trail for security events. The new error field will capture the following error codes: * -ENOKEY: Key used to sign the IPE policy not found in the keyring * -ESTALE: Attempting to update an IPE policy with an older version * -EKEYREJECTED: IPE signature verification failed * -ENOENT: Policy was deleted while updating * -EEXIST: Same name policy already deployed * -ERANGE: Policy version number overflow * -EINVAL: Policy version parsing error * -EPERM: Insufficient permission * -ENOMEM: Out of memory (OOM) * -EBADMSG: Policy is invalid Here are some examples of the updated audit record types: AUDIT_IPE_POLICY_LOAD(1422): audit: AUDIT1422 policy_name="Test_Policy" policy_version=0.0.1 policy_digest=sha256:84EFBA8FA71E62AE0A537FAB962F8A2BD1053964C4299DCA 92BFFF4DB82E86D3 auid=1000 ses=3 lsm=ipe res=1 errno=0 The above record shows a new policy has been successfully loaded into the kernel with the policy name, version, and hash with the errno=0. AUDIT_IPE_POLICY_LOAD(1422) with error: audit: AUDIT1422 policy_name=? policy_version=? policy_digest=? auid=1000 ses=3 lsm=ipe res=0 errno=-74 The above record shows a policy load failure due to an invalid policy (-EBADMSG). By adding this error field, we ensure that all policy load attempts, whether successful or failed, are logged, providing a comprehensive audit trail for IPE policy management. Signed-off-by: Jasjiv Singh Signed-off-by: Fan Wu commit 65484f9dfd3c707f0bb9a615ec987bb82d6e3e7d Merge: 3920a758800762 82d1096ca8b5db Author: Jakub Kicinski Date: Tue May 27 17:52:03 2025 -0700 Merge branch 'refactor-phy-reset-handling-and' Thangaraj Samynathan says: ==================== Refactor PHY reset handling and fix WOL This patch series refines the PHY reset and initialization logic in the lan743x driver. Enhance the robustness of the driver initialization process and prevent WOL-related issues during suspend/resume cycles. ==================== Link: https://patch.msgid.link/20250526053048.287095-1-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski commit 82d1096ca8b5dbb3158d707e6fb3ad21c3403a49 Author: Thangaraj Samynathan Date: Mon May 26 11:00:48 2025 +0530 net: lan743x: Fix PHY reset handling during initialization and WOL Remove lan743x_phy_init from lan743x_hardware_init as it resets the PHY registers, causing WOL to fail on subsequent attempts. Add a call to lan743x_hw_reset_phy in the probe function to ensure the PHY is reset during device initialization. Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Thangaraj Samynathan Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250526053048.287095-3-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski commit 68927eb52d0af04863584930db06075d2610e194 Author: Thangaraj Samynathan Date: Mon May 26 11:00:47 2025 +0530 net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy rename the function to lan743x_hw_reset_phy to better describe it operation. Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Thangaraj Samynathan Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250526053048.287095-2-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski commit 3920a758800762917177a6b5ab39707d8e376fe6 Author: Sergio Perez Gonzalez Date: Sun May 25 21:20:31 2025 -0600 net: macb: Check return value of dma_set_mask_and_coherent() Issue flagged by coverity. Add a safety check for the return value of dma_set_mask_and_coherent, go to a safe exit if it returns error. Link: https://scan7.scan.coverity.com/#/project-view/53936/11354?selectedIssue=1643754 Signed-off-by: Sergio Perez Gonzalez Reviewed-by: Claudiu Beznea Link: https://patch.msgid.link/20250526032034.84900-1-sperezglz@gmail.com Signed-off-by: Jakub Kicinski commit e9cb929670a1e98b592b30f03f06e9e20110f318 Author: Greg Kroah-Hartman Date: Thu May 22 13:21:47 2025 +0200 net: phy: fix up const issues in to_mdio_device() and to_phy_device() Both to_mdio_device() and to_phy_device() "throw away" the const pointer attribute passed to them and return a non-const pointer, which generally is not a good thing overall. Fix this up by using container_of_const() which was designed for this very problem. Cc: Alexander Lobakin Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Fixes: 7eab14de73a8 ("mdio, phy: fix -Wshadow warnings triggered by nested container_of()") Signed-off-by: Greg Kroah-Hartman Link: https://patch.msgid.link/2025052246-conduit-glory-8fc9@gregkh Signed-off-by: Jakub Kicinski commit cb575e5e9fd1cba99f1514c36375e74609f92e70 Author: Saeed Mahameed Date: Fri May 23 00:41:16 2025 +0300 net: Kconfig NET_DEVMEM selects GENERIC_ALLOCATOR GENERIC_ALLOCATOR is a non-prompt kconfig, meaning users can't enable it selectively. All kconfig users of GENERIC_ALLOCATOR select it, except of NET_DEVMEM which only depends on it, there is no easy way to turn GENERIC_ALLOCATOR on unless we select other unnecessary configs that will select it. Instead of depending on it, select it when NET_DEVMEM is enabled. Signed-off-by: Saeed Mahameed Reviewed-by: Dragos Tatulea Signed-off-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Reviewed-by: Mina Almasry Link: https://patch.msgid.link/1747950086-1246773-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d9d836bfa5e6e255c411733b4b1ce7a1f8346c54 Author: Hangbin Liu Date: Mon May 26 01:46:00 2025 +0000 selftests: net: move wait_local_port_listen to lib.sh The function wait_local_port_listen() is the only function defined in net_helper.sh. Since some tests source both lib.sh and net_helper.sh, we can simplify the setup by moving wait_local_port_listen() to lib.sh. With this change, net_helper.sh becomes redundant and can be removed. Signed-off-by: Hangbin Liu Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250526014600.9128-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 08f8bad0255c7319f4ffe53d0f0eab50fa2cb5e9 Author: Christophe JAILLET Date: Sun May 25 11:21:24 2025 +0200 cxgb4: Constify struct thermal_zone_device_ops 'struct thermal_zone_device_ops' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 2912 1064 0 3976 f88 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o After: ===== text data bss dec hex filename 3040 936 0 3976 f88 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o Signed-off-by: Christophe JAILLET Link: https://patch.msgid.link/e6416e0d15ea27a55fe1fb4e349928ac7bae1b95.1748164843.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 82fb5a369b8de625660c8c7f82e5286ec195be5e Author: Christophe JAILLET Date: Sun May 25 11:13:17 2025 +0200 mlxsw: core_thermal: Constify struct thermal_zone_device_ops 'struct thermal_zone_device_ops' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. While at it, also constify a struct thermal_zone_params. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 24899 8036 0 32935 80a7 drivers/net/ethernet/mellanox/mlxsw/core_thermal.o After: ===== text data bss dec hex filename 25379 7556 0 32935 80a7 drivers/net/ethernet/mellanox/mlxsw/core_thermal.o Signed-off-by: Christophe JAILLET Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/4516676973f5adc1cdb76db1691c0f98b6fa6614.1748164348.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit a540ee75945a96f606c6ac955bfed5410d318f7d Author: Dan Carpenter Date: Fri May 23 19:00:12 2025 +0300 net/mlx5: HWS, Fix an error code in mlx5hws_bwc_rule_create_complex() This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same. Fixes: 17e0accac577 ("net/mlx5: HWS, support complex matchers") Signed-off-by: Dan Carpenter Reviewed-by: Yevgeny Kliteynik Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/aDCbjNcquNC68Hyj@stanley.mountain Signed-off-by: Jakub Kicinski commit c8ef20fe7274c5766a317f9193b70bed717b6b3d Author: Zilin Guan Date: Fri May 23 11:47:17 2025 +0000 tipc: use kfree_sensitive() for aead cleanup The tipc_aead_free() function currently uses kfree() to release the aead structure. However, this structure contains sensitive information, such as key's SALT value, which should be securely erased from memory to prevent potential leakage. To enhance security, replace kfree() with kfree_sensitive() when freeing the aead structure. This change ensures that sensitive data is explicitly cleared before memory deallocation, aligning with the approach used in tipc_aead_init() and adhering to best practices for handling confidential information. Signed-off-by: Zilin Guan Reviewed-by: Tung Nguyen Link: https://patch.msgid.link/20250523114717.4021518-1-zilin@seu.edu.cn Signed-off-by: Jakub Kicinski commit 09d7ff0694ea133c50ad905fd6e548c13f8af458 Author: Donald Hunter Date: Fri May 23 11:30:31 2025 +0100 tools: ynl: parse extack for sub-messages Extend the Python YNL extack decoding to handle sub-messages in the same way that YNL C does. This involves retaining the input values so that they are available during extack decoding. ./tools/net/ynl/pyynl/cli.py --family rt-link --do newlink --create \ --json '{ "linkinfo": {"kind": "netkit", "data": {"policy": 10} } }' Netlink error: Invalid argument nl_len = 92 (76) nl_flags = 0x300 nl_type = 2 error: -22 extack: {'msg': 'Provided default xmit policy not supported', 'bad-attr': '.linkinfo.data(netkit).policy'} Signed-off-by: Donald Hunter Link: https://patch.msgid.link/20250523103031.80236-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 126cd7852a62c6fab11a4a4cb6fa96421929ab69 Author: Jeremy Kerr Date: Mon May 26 10:44:33 2025 +0800 net: mctp: start tx queue on netdev open We stop queues in ndo_stop, so they need to be restarted in ndo_open. This allows us to resume tx after a link down/up cycle. Suggested-by: Nitin Singh Fixes: 0791c0327a6e ("net: mctp: Add MCTP USB transport driver") Signed-off-by: Jeremy Kerr Link: https://patch.msgid.link/20250526-dev-mctp-usb-v1-1-c7bd6cb75aa0@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit c6bb8a21cdad8c975a3a646b9e5c8df01ad29783 Author: Wentao Liang Date: Sun May 25 00:34:25 2025 +0800 net/mlx5: Add error handling in mlx5_query_nic_vport_node_guid() The function mlx5_query_nic_vport_node_guid() calls the function mlx5_query_nic_vport_context() but does not check its return value. A proper implementation can be found in mlx5_nic_vport_query_local_lb(). Add error handling for mlx5_query_nic_vport_context(). If it fails, free the out buffer via kvfree() and return error code. Fixes: 9efa75254593 ("net/mlx5_core: Introduce access functions to query vport RoCE fields") Cc: stable@vger.kernel.org # v4.5 Signed-off-by: Wentao Liang Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250524163425.1695-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski commit c59783780c8ad66f6076a9a7c74df3e006e29519 Author: Christophe JAILLET Date: Sat May 24 09:29:11 2025 +0200 net: airoha: Fix an error handling path in airoha_alloc_gdm_port() If register_netdev() fails, the error handling path of the probe will not free the memory allocated by the previous airoha_metadata_dst_alloc() call because port->dev->reg_state will not be NETREG_REGISTERED. So, an explicit airoha_metadata_dst_free() call is needed in this case to avoid a memory leak. Fixes: af3cf757d5c9 ("net: airoha: Move DSA tag in DMA descriptor") Signed-off-by: Christophe JAILLET Acked-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/1b94b91345017429ed653e2f05d25620dc2823f9.1746715755.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 0795b05a59b1371b18ffbf09d385296b12e9f5d5 Author: Wei Fang Date: Fri May 23 16:37:59 2025 +0800 net: phy: clear phydev->devlink when the link is deleted There is a potential crash issue when disabling and re-enabling the network port. When disabling the network port, phy_detach() calls device_link_del() to remove the device link, but it does not clear phydev->devlink, so phydev->devlink is not a NULL pointer. Then the network port is re-enabled, but if phy_attach_direct() fails before calling device_link_add(), the code jumps to the "error" label and calls phy_detach(). Since phydev->devlink retains the old value from the previous attach/detach cycle, device_link_del() uses the old value, which accesses a NULL pointer and causes a crash. The simplified crash log is as follows. [ 24.702421] Call trace: [ 24.704856] device_link_put_kref+0x20/0x120 [ 24.709124] device_link_del+0x30/0x48 [ 24.712864] phy_detach+0x24/0x168 [ 24.716261] phy_attach_direct+0x168/0x3a4 [ 24.720352] phylink_fwnode_phy_connect+0xc8/0x14c [ 24.725140] phylink_of_phy_connect+0x1c/0x34 Therefore, phydev->devlink needs to be cleared when the device link is deleted. Fixes: bc66fa87d4fd ("net: phy: Add link between phy dev and mac dev") Signed-off-by: Wei Fang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250523083759.3741168-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 8bc3c234dcb65a018120dab96c83845cc7ff35c6 Author: Christian Marangi Date: Thu May 22 18:53:11 2025 +0200 net: phy: mediatek: Add Airoha AN7583 PHY support Add Airoha AN7583 PHY support based on Airoha AN7581 with the small difference that BMCR_PDOWN is enabled by default and needs to be cleared to make the internal PHY correctly work. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250522165313.6411-4-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit d76556db10bf41cd3ae1ad1d705245afe077a701 Author: Christian Marangi Date: Thu May 22 18:53:10 2025 +0200 net: dsa: mt7530: Add AN7583 support Add Airoha AN7583 Switch support. This is based on Airoha EN7581 that is based on Mediatek MT7988 Switch. Airoha AN7583 require additional tweak to the GEPHY_CONN_CFG register to make the internal PHY work. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250522165313.6411-3-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit fef1848809230ab6ca5338e0c02ed2ac6e786775 Author: Christian Marangi Date: Thu May 22 18:53:09 2025 +0200 dt-bindings: net: dsa: mediatek,mt7530: Add airoha,an7583-switch Add airoha,an7583-switch additional compatible to the mt7530 DSA Switch Family. This is an exact match of the airoha,en7581-switch (based on mt7988-switch) with the additional requirement of tweak on the GEPHY_CONN_CFG registers to make the internal PHY actually work. Signed-off-by: Christian Marangi Acked-by: Conor Dooley Link: https://patch.msgid.link/20250522165313.6411-2-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 54ca9be0bc589a0e45959ba73c76cf3f65110c63 Author: Chao Yu Date: Tue May 13 13:57:21 2025 +0800 f2fs: introduce FAULT_VMALLOC Introduce a new fault type FAULT_VMALLOC to simulate no memory error in f2fs_vmalloc(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 70dd07c888451503c3e93b6821e10d1ea1ec9930 Author: Chao Yu Date: Tue May 13 13:57:20 2025 +0800 f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx .init_{,de}compress_ctx uses kvmalloc() to alloc memory, it will try to allocate physically continuous page first, it may cause more memory allocation pressure, let's use vmalloc instead to mitigate it. [Test] cd /data/local/tmp touch file f2fs_io setflags compression file f2fs_io getflags file for i in $(seq 1 10); do sync; echo 3 > /proc/sys/vm/drop_caches;\ time f2fs_io write 512 0 4096 zero osync file; truncate -s 0 file;\ done [Result] Before After Delta 21.243 21.694 -2.12% For compression, we recommend to use ioctl to compress file data in background for workaround. For decompression, only zstd will be affected. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5827e3c720e5a881bf97451e3c280445f67cba04 Author: Chao Yu Date: Tue May 13 11:19:07 2025 +0800 f2fs: add f2fs_bug_on() in f2fs_quota_read() mapping_read_folio_gfp() will return a folio, it should always be uptodate, let's check folio uptodate status to detect any potenial bug. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9b6fc9888e03dbe69768ace00091173b169aec39 Author: Chao Yu Date: Mon May 12 19:54:41 2025 +0800 f2fs: add f2fs_bug_on() to detect potential bug Add f2fs_bug_on() to check whether memory preallocation will fail or not after radix_tree_preload(GFP_NOFS | __GFP_NOFAIL). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d005af3b6756e533caf688060281a91e1dae3479 Author: Eric Biggers Date: Mon May 12 22:48:25 2025 -0700 f2fs: remove unused sbi argument from checksum functions Since __f2fs_crc32() now calls crc32() directly, it no longer uses its sbi argument. Remove that, and simplify its callers accordingly. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c89756bcf406af313d191cfe3709e7c175c5b0cd Merge: 3702a515edec51 3e0c509fbdb106 Author: Linus Torvalds Date: Tue May 27 16:48:47 2025 -0700 Merge tag 'pm-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "Once again, the changes are dominated by cpufreq updates, but this time the majority of them are cpufreq core changes, mostly related to the introduction of policy locking guards and __free() usage, and fixes related to boost handling. Still, there is also a significant update of the intel_pstate driver making it register an energy model when running on a hybrid platform which is used for enabling energy-aware scheduling (EAS) if the driver operates in the passive mode (and schedutil is used as the cpufreq governor for all CPUs which is the passive mode default). There are some amd-pstate driver updates too, for a good measure, including the "Requested CPU Min frequency" BIOS option support and new online/offline callbacks. In the cpuidle space, the most significant change is the addition of a C1 demotion on/off sysfs knob to intel_idle which should help some users to configure their systems more precisely. There is also the conversion of the PSCI cpuidle driver to a faux device one and there are two small updates of cpuidle governors. Device power management is also modified quite a bit, especially the handling of devices with asynchronous suspend and resume enabled during system transitions. They are now going to be handled more asynchronously during suspend transitions and somewhat less aggressively during resume transitions. Apart from the above, the operating performance points (OPP) library is now going to use mutex locking guards and scope-based cleanup helpers and there is the usual bunch of assorted fixes and code cleanups. Specifics: - Fix potential division-by-zero error in em_compute_costs() (Yaxiong Tian) - Fix typos in energy model documentation and example driver code (Moon Hee Lee, Atul Kumar Pant) - Rearrange the energy model management code and add a new function for adjusting a CPU energy model after adjusting the capacity of the given CPU to it (Rafael Wysocki) - Refactor cpufreq_online(), add and use cpufreq policy locking guards, use __free() in policy reference counting, and clean up core cpufreq code on top of that (Rafael Wysocki) - Fix boost handling on CPU suspend/resume and sysfs updates (Viresh Kumar) - Fix des_perf clamping with max_perf in amd_pstate_update() (Dhananjay Ugwekar) - Add offline, online and suspend callbacks to the amd-pstate driver, rename and use the existing amd_pstate_epp callbacks in it (Dhananjay Ugwekar) - Add support for the "Requested CPU Min frequency" BIOS option to the amd-pstate driver (Dhananjay Ugwekar) - Reset amd-pstate driver mode after running selftests (Swapnil Sapkal) - Avoid shadowing ret in amd_pstate_ut_check_driver() (Nathan Chancellor) - Add helper for governor checks to the schedutil cpufreq governor and move cpufreq-specific EAS checks to cpufreq (Rafael Wysocki) - Populate the cpu_capacity sysfs entries from the intel_pstate driver after registering asym capacity support (Ricardo Neri) - Add support for enabling Energy-aware scheduling (EAS) to the intel_pstate driver when operating in the passive mode on a hybrid platform (Rafael Wysocki) - Drop redundant cpus_read_lock() from store_local_boost() in the cpufreq core (Seyediman Seyedarab) - Replace sscanf() with kstrtouint() in the cpufreq code and use a symbol instead of a raw number in it (Bowen Yu) - Add support for autonomous CPU performance state selection to the CPPC cpufreq driver (Lifeng Zheng) - OPP: Add dev_pm_opp_set_level() (Praveen Talari) - Introduce scope-based cleanup headers and mutex locking guards in OPP core (Viresh Kumar) - Switch OPP to use kmemdup_array() (Zhang Enpei) - Optimize bucket assignment when next_timer_ns equals KTIME_MAX in the menu cpuidle governor (Zhongqiu Han) - Convert the cpuidle PSCI driver to a faux device one (Sudeep Holla) - Add C1 demotion on/off sysfs knob to the intel_idle driver (Artem Bityutskiy) - Fix typos in two comments in the teo cpuidle governor (Atul Kumar Pant) - Fix denying of auto suspend in pm_suspend_timer_fn() (Charan Teja Kalla) - Move debug runtime PM attributes to runtime_attrs[] (Rafael Wysocki) - Add new devm_ functions for enabling runtime PM and runtime PM reference counting (Bence Csókás) - Remove size arguments from strscpy() calls in the hibernation core code (Thorsten Blum) - Adjust the handling of devices with asynchronous suspend enabled during system suspend and resume to start resuming them immediately after resuming their parents and to start suspending such a device immediately after suspending its first child (Rafael Wysocki) - Adjust messages printed during tasks freezing to avoid using pr_cont() (Andrew Sayers, Paul Menzel) - Clean up unnecessary usage of !! in pm_print_times_init() (Zihuan Zhang) - Add missing wakeup source attribute relax_count to sysfs and remove the space character at the end ofi the string produced by pm_show_wakelocks() (Zijun Hu) - Add configurable pm_test delay for hibernation (Zihuan Zhang) - Disable asynchronous suspend in ucsi_ccg_probe() to prevent the cypd4226 device on Tegra boards from suspending prematurely (Jon Hunter) - Unbreak printing PM debug messages during hibernation and clean up some related code (Rafael Wysocki) - Add a systemd service to run cpupower and change cpupower binding's Makefile to use -lcpupower (John B. Wyatt IV, Francesco Poli)" * tag 'pm-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (72 commits) cpufreq: CPPC: Add support for autonomous selection cpufreq: Update sscanf() to kstrtouint() cpufreq: Replace magic number OPP: switch to use kmemdup_array() PM: freezer: Rewrite restarting tasks log to remove stray *done.* PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() cpufreq: drop redundant cpus_read_lock() from store_local_boost() cpupower: do not install files to /etc/default/ cpupower: do not call systemctl at install time cpupower: do not write DESTDIR to cpupower.service PM: sleep: Introduce pm_sleep_transition_in_progress() cpufreq/amd-pstate: Avoid shadowing ret in amd_pstate_ut_check_driver() cpufreq: intel_pstate: Document hybrid processor support cpufreq: intel_pstate: EAS: Increase cost for CPUs using L3 cache cpufreq: intel_pstate: EAS support for hybrid platforms PM: EM: Introduce em_adjust_cpu_capacity() PM: EM: Move CPU capacity check to em_adjust_new_capacity() PM: EM: Documentation: Fix typos in example driver code cpufreq: Drop policy locking from cpufreq_policy_is_good_for_eas() PM: sleep: Introduce pm_suspend_in_progress() ... commit 3702a515edec515fcc7e085053da636fefac88d6 Merge: 049294830bfaa1 db0e4d5429c909 Author: Linus Torvalds Date: Tue May 27 16:32:30 2025 -0700 Merge tag 'acpi-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "The most significant part of these changes is an ACPICA update covering two upstream ACPICA releases, 20241212 and 20250404, that have not been included into the kernel code base yet. Among other things, it adds definitions needed to address GCC 15's -Wunterminated-string-initialization warnings, adds support for three new tables (MRRM, ERDT, RIMT), extends support for two tables (RAS2, DMAR), and fixes some issues. On top of the above, there is a new parser for the MRRM table, more changes related to GCC 15's -Wunterminated-string-initialization warnings, a CPPC library update including functions related to autonomous CPU performance state selection, a couple of new quirks, some assorted fixes and some code cleanups. Specifics: - Fix two ACPICA SLAB cache leaks (Seunghun Han) - Add EINJv2 get error type action and define Error Injection Actions in hex values to avoid inconsistencies between the specification and the code (Zaid Alali) - Fix typo in comments for SRAT structures (Adam Lackorzynski) - Prevent possible loss of data in ACPICA because of u32 to u8 conversions (Saket Dumbre) - Fix reading FFixedHW operation regions in ACPICA (Daniil Tatianin) - Add support for printing AML arguments when the ACPICA debug level is ACPI_LV_TRACE_POINT (Mario Limonciello) - Drop a stale comment about the file content from actbl2.h (Sudeep Holla) - Apply pack(1) to union aml_resource (Tamir Duberstein) - Fix overflow check in the ACPICA version of vsnprintf() (gldrk) - Interpret SIDP structures in DMAR added revision 3.4 of the VT-d specification (Alexey Neyman) - Add typedef and other definitions related to MRRM to ACPICA (Tony Luck) - Add definitions for RIMT to ACPICA (Sunil V L) - Fix spelling mistake "Incremement" -> "Increment" in the ACPICA utilities code (Colin Ian King) - Add typedef and other definitions for ERDT to ACPICA (Tony Luck) - Introduce ACPI_NONSTRING and use it (Kees Cook, Ahmed Salem) - Rename structure and field names of the RAS2 table in actbl2.h (Shiju Jose) - Fix up whitespace in acpica/utcache.c (Zhe Qiao) - Avoid sequence overread in a call to strncmp() in ap_get_table_length() and replace strncpy() with memcpy() in ACPICA in some places (Ahmed Salem) - Update copyright year in all ACPICA files (Saket Dumbre) - Add __nonstring annotations for unterminated strings in the static ACPI tables parsing code (Kees Cook) - Add support for parsing the MRRM ACPI table and sysfs files to describe memory regions listed in it (Tony Luck, Anil Keshavamurthy) - Remove an (explicitly) unused header file include from the VIOT ACPI table parser file (Andy Shevchenko) - Improve logging around acpi_initialize_tables() (Bartosz Szczepanek) - Clean up the initialization of CPU data structures in the ACPI processor driver (Zhang Rui) - Remove an obsolete comment regarding the C-states handling in the ACPI processor driver (Giovanni Gherdovich) - Simplify PCC shared memory region handling (Sudeep Holla) - Rework and extend functions for reading CPPC register values and for updating CPPC registers (Lifeng Zheng) - Add three functions related to autonomous CPU performance state selection to the CPPC library (Lifeng Zheng) - Turn the acpi_pci_root_remap_iospace() fwnode_handle parameter into a const pointer (Pei Xiao) - Round battery capacity percengate in the ACPI battery driver to the closest integer to avoid user confusion (shitao) - Make the ACPI battery driver report the current as a negative number to the power supply framework when the battery is discharging as documented (Peter Marheine) - Add TUXEDO InfinityBook Pro AMD Gen9 to the acpi_ec_no_wakeup[] list to prevent spurious wakeups from suspend-to-idle (Werner Sembach) - Convert the APEI EINJ driver to a faux device one (Sudeep Holla, Jon Hunter) - Remove redundant calls to einj_get_available_error_type() from the APEI EINJ driver (Zaid Alali) - Fix a typo for MECHREVO in irq1_edge_low_force_override[] (Mingcong Bai) - Add an LPS0 check() callback to the AMD pinctrl driver and fix up config symbol dependencies in it (Mario Limonciello, Rafael Wysocki) - Avoid initializing the ACPI platform profile driver on non-ACPI platforms (Alexandre Ghiti) - Document that references to ACPI data (non-device) nodes should use string-only references in hierarchical data node packages (Sakari Ailus) - Fail the ACPI bus registration if acpi_kobj registration fails (Armin Wolf)" * tag 'acpi-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (65 commits) ACPI: MRRM: Fix default max memory region ACPI: bus: Bail out if acpi_kobj registration fails ACPI: platform_profile: Avoid initializing on non-ACPI platforms pinctrl: amd: Fix hibernation support with CONFIG_SUSPEND unset ACPI: tables: Improve logging around acpi_initialize_tables() ACPI: VIOT: Remove (explicitly) unused header ACPI: Add documentation for exposing MRRM data ACPI: MRRM: Add /sys files to describe memory ranges ACPI: MRRM: Minimal parse of ACPI MRRM table ACPICA: Update copyright year ACPICA: Logfile: Changes for version 20250404 ACPICA: Replace strncpy() with memcpy() ACPICA: Apply ACPI_NONSTRING in more places ACPICA: Avoid sequence overread in call to strncmp() ACPICA: Adjust the position of code lines ACPICA: actbl2.h: ACPI 6.5: RAS2: Rename structure and field names of the RAS2 table ACPICA: Apply ACPI_NONSTRING ACPICA: Introduce ACPI_NONSTRING ACPICA: actbl2.h: ERDT: Add typedef and other definitions ACPICA: infrastructure: Add new DMT_BUF types and shorten a long name ... commit 049294830bfaa1c4b56d5ccf21075f6f9990799e Merge: 35a8b02e071a83 01daf71a4f5706 Author: Linus Torvalds Date: Tue May 27 16:28:02 2025 -0700 Merge tag 'thermal-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These add support for a new feature, Platform Temperature Control (PTC), to the Intel int340x thermal driver, add support for the Airoha EN7581 thermal sensor and the IPQ5018 platform, fix up the ACPI thermal zones handling, fix other assorted issues and clean up code Specifics: - Add Platform Temperature Control (PTC) support to the Intel int340x thermal driver (Srinivas Pandruvada) - Make the Hisilicon thermal driver compile by default when ARCH_HISI is set (Krzysztof Kozlowski) - Clean up printk() format by using %pC instead of %pCn in the bcm2835 thermal driver (Luca Ceresoli) - Fix variable name coding style in the AmLogic thermal driver (Enrique Isidoro Vazquez Ramos) - Fix missing debugfs entry removal on failure by using the devm_ variant in the LVTS thermal driver (AngeloGioacchino Del Regno) - Remove the unused lvts_debugfs_exit() function as the devm_ variant introduced before takes care of removing the debugfs entry in the LVTS driver (Arnd Bergmann) - Add the Airoha EN7581 thermal sensor support along with its DT bindings (Christian Marangi) - Add ipq5018 compatible string DT binding, cleanup and add its suppot to the QCom Tsens thermal driver (Sricharan Ramabadhran, George Moussalem) - Fix comments typos in the Airoha driver (Christian Marangi, Colin Ian King) - Address a sparse warning by making a local variable static in the QCom thermal driver (George Moussalem) - Fix the usage of the _SCP control method in the driver for ACPI thermal zones (Armin Wolf)" * tag 'thermal-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: qcom: ipq5018: make ops_ipq5018 struct static thermal/drivers/airoha: Fix spelling mistake "calibrarion" -> "calibration" ACPI: thermal: Execute _SCP before reading trip points ACPI: OSI: Stop advertising support for "3.0 _SCP Extensions" thermal/drivers/airoha: Fix spelling mistake thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens thermal/drivers/qcom/tsens: Add support for tsens v1 without RPM thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible thermal/drivers: Add support for Airoha EN7581 thermal sensor dt-bindings: thermal: Add support for Airoha EN7581 thermal sensor thermal/drivers/mediatek/lvts: Remove unused lvts_debugfs_exit thermal/drivers/mediatek/lvts: Fix debugfs unregister on failure thermal/drivers/amlogic: Rename Uptat to uptat to follow kernel coding style vsprintf: remove redundant and unused %pCn format specifier thermal/drivers/bcm2835: Use %pC instead of %pCn thermal/drivers/hisi: Do not enable by default during compile testing thermal: int340x: processor_thermal: Platform temperature control documentation thermal: intel: int340x: Enable platform temperature control thermal: intel: int340x: Add platform temperature control interface commit 35a8b02e071a83dd2d42a8446a00a56f6147dc06 Merge: 418da6ee1ea620 d2c6acff6386f4 Author: Linus Torvalds Date: Tue May 27 16:23:25 2025 -0700 Merge tag 'mmc-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Scan the eMMC boot areas for partition table - Clarify purpose of mmc_can* functions by renaming them to mmc_card_can* - Clarify helpers for host capabilities by renaming them to mmc_host_can* - Add support for graceful host removal for SD and eMMC - Further avoid re-storing power to the eMMC before a shutdown - Add quirk to disable DDR50 tuning and use it for some Swissbit SD-cards MMC host: - mtk-sd: Add support for Dimensity 1200 MT6893 - mtk-sd: Fix condition to enable single burst type - mtk-sd: Optimize several code-paths by aggregating register-writes - renesas_sdhi: Add support for the Renesas RZ/V2N variant - sdhci-msm: Add support for the SM7150 variant - sdhci-esdhc-imx: Re-factor the system PM logic - sdhci-esdhc-imx: Lots of improvements around the tuning support - sdhci-of-arasan: Add support for the Renesas RZ/N1D variant - sdhci-of-dwcmhsc: Add Sophgo SG2044 support - sdhci-of-esdhc: Add support for the LS1021a variant - sdhci-of-k1: Add new driver to support for SpacemiT K1 controller - sdhci-pic32: Convert microchip,sdhci-pic32 DT doc to json schema - wmt-sdmmc: Convert DT doc to json schema" * tag 'mmc-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (59 commits) dt-bindings: mmc: sdhci-of-dwcmhsc: Allow use of a power-domain mmc: sdhci-esdhc-imx: fix few build warnings mmc: bcm2835: Use str_read_write() helper mmc: host: sdhci-esdhc-imx: refactor the system PM logic mmc: sdhci: export APIs for sdhci irq wakeup mmc: sdhci-of-k1: add support for SpacemiT K1 SoC dt-bindings: mmc: spacemit,sdhci: add support for K1 SoC mmc: core: Scan the eMMC boot areas for partition table dt-binding: mmc: microchip,sdhci-pic32: convert text based binding to json schema mmc: rename mmc_boot_partition_access() to mmc_host_can_access_boot() mmc: rename mmc_host_uhs() to mmc_host_can_uhs() mmc: rename mmc_host_done_complete() to mmc_host_can_done_complete() mmc: rename mmc_host_cmd23() to mmc_host_can_cmd23() mmc: sdhci-esdhc-imx: fix defined but not used warnings dt-bindings: mmc: vt8500-sdmmc: Convert to YAML dt-bindings: mmc: sdhci-msm: Add the SM7150 compatible dt-bindings: mmc: fsl,esdhc: add compatible string fsl,ls1021a-esdhc mmc: cavium-thunderx: Use non-hybrid PCI devres API dt-bindings: mmc: mtk-sd: Add support for Dimensity 1200 MT6893 dt-bindings: mmc: sdhci-of-dwcmhsc: Add Sophgo SG2044 support ... commit 418da6ee1ea62090f6b66d95b8fcf7db2f42c00f Merge: c7c18635363f06 36795548dcc841 Author: Linus Torvalds Date: Tue May 27 16:19:30 2025 -0700 Merge tag 'pmdomain-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain updates from Ulf Hansson: "pmdomain core: - Add residency reflection for domain-idlestates to debugfs - Add genpd helper to correct the usage/rejected counters pmdomain providers: - mediatek: Add support for Dimensity 1200 MT6893 - qcom: Add support for SM4450 power domains - rockchip: Add support for RK3562 SoC - sunxi: Add support for Allwinner H6/H616 PRCM PPU - ti: Fix STANDBY handling of OMAP2+ PER power domain cpuidle-psci: - Correct the domain-idlestate statistics in debugfs" * tag 'pmdomain-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (23 commits) pmdomain: ti: Fix STANDBY handling of PER power domain pmdomain: amlogic: Constify some structures pmdomain: core: Use genpd->opp_table to simplify error/remove path pmdomain: core: Simplify return statement in genpd_power_off() pmdomain: core: Convert genpd_power_off() to void pmdomain: core: Convert to device_awake_path() pmdomain: mediatek: Add error messages for missing regmaps pmdomain: arm: Do not enable by default during compile testing pmdomain: qcom: rpmhpd: Add SM4450 power domains dt-bindings: power: qcom,rpmpd: Add SM4450 compatible pmdomain: sunxi: add H6 PRCM PPU driver dt-bindings: power: Add Allwinner H6/H616 PRCM PPU pmdomain: bcm: bcm2835-power: Use devm_clk_get_optional pmdomain: rockchip: Add support for RK3562 SoC dt-bindings: power: rockchip: Add support for RK3562 SoC pmdomain: mediatek: Add support for Dimensity 1200 MT6893 pmdomain: mediatek: Bump maximum bus protect data array elements dt-bindings: power: mediatek: Support Dimensity 1200 MT6893 MTCMOS pmdomain: core: Reset genpd->states to avoid freeing invalid data pmdomain: core: Add residency reflection for domain-idlestates to debugfs ... commit c7c18635363f06c1943514c2f4c8170b325302e8 Merge: 5722a6cecfff3e b1d8766052eb05 Author: Linus Torvalds Date: Tue May 27 16:14:56 2025 -0700 Merge tag 'for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - support charge_types in extensions Power-supply drivers: - new driver for Pegatron Chagall battery - new driver for Maxim MAX8971 charger - new driver for Huawei Matebook E Go - bq27xxx: retry failed I2C transmissions - bq24190: add BQ24193 support - misc small cleanups and fixes Reset drivers: - new driver for Toradex SMARC Embedded Controller - reboot-mode: add support for modes containing / in DT - atmel,at91sam9260-reset: support sama7d65 - syscon-reboot: add Google GS101 support - misc small cleanups and fixes" * tag 'for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits) power: supply: rt9471: Simplify definition of some struct linear_range power: supply: max77976: add EXTCON dependency power: supply: Add support for Maxim MAX8971 charger dt-bindings: power: supply: Document Maxim MAX8971 charger power: supply: max17040: adjust thermal channel scaling power: reset: syscon-reboot: add gs101-specific reset dt-bindings: reset: syscon-reboot: add google,gs101-reboot power: supply: add Huawei Matebook E Go psy driver power: supply: Add driver for Pegatron Chagall battery dt-bindings: power: supply: Document Pegatron Chagall fuel gauge dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning power: reset: add Toradex Embedded Controller dt-bindings: power: reset: add toradex,smarc-ec power: supply: support charge_types in extensions power: supply: max77705: Fix workqueue error handling in probe power: supply: wm831x: Constify struct chg_map and some arrays power: bq24190: Add BQ24193 support dt-bindings: power: supply: bq24190: Add BQ24193 compatible power: supply: sysfs: Remove duplicate NUL termination ... commit 5722a6cecfff3e381b96bbbd7e9b3911731e80d9 Merge: 350d9ab73654c4 b00d6864a4c948 Author: Linus Torvalds Date: Tue May 27 15:53:55 2025 -0700 Merge tag 'spi-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The bulk of the changes in this release are driver work, as well as new device support we have some important work on performance over several drivers, and big overhauls for maintainability on a couple too. Highlights include: - Big cleanups of the sh-msiof driver from Geert Uytterhoeven, and of the NXP FSPI driver from Haibo Chen - Performance improvements for the AXI SPI engine - Support for writes to memory mapped flashes on Renesas devices - Integrated DMA support for Tegra210 QSPI, used by the Tegra234 - DMA support for Amlogic SPI controllers - Support for AMD HID2, Qualcomm IPQ5018, Renesas RZ/G3E, Rockchip RK3528 and Samsung Exynos Autov920 An update to fix some issues with the Atmel QSPI driver runtime PM pulled in a new API from the PM core, and the Renesas memory mapped write changes pull in some code that's shared in drivers/memory" * tag 'spi-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (90 commits) spi: spi-qpic-snand: return early on error from qcom_spi_io_op() spi: loopback-test: fix up const pointer issue in rx_ranges_cmp() spi: gpio: fix const issue in spi_to_spi_gpio() spi: spi-qpic-snand: remove superfluous parameters of qcom_spi_check_error() dt-bindings: spi: samsung: add exynosautov920-spi compatible spi: spi-qpic-snand: reuse qcom_spi_check_raw_flash_errors() spi: dt-bindings: Add rk3528-spi compatible spi: spi_amd: Update Kconfig dependencies spi: spi_amd: Add HIDDMA basic write support spi: spi_amd: Remove read{q,b} usage on DMA buffer spi: sh-msiof: Move register definitions to spi: sh-msiof: Document frame start sync pulse mode spi: sh-msiof: Double maximum DMA transfer size using two groups spi: sh-msiof: Simplify BRG's Division Ratio spi: sh-msiof: Increase TX FIFO size for R-Car V4H/V4M spi: sh-msiof: Correct RX FIFO size for R-Car Gen3 spi: sh-msiof: Correct RX FIFO size for R-Car Gen2 spi: sh-msiof: Add core support for dual-group transfers spi: sh-msiof: Correct SIMDR2_GRPMASK spi: sh-msiof: SIFCTR bitfield conversion ... commit 350d9ab73654c47ea3cf6214ef2ccd159bf134ad Merge: c971f11dbf1bff dcd711021389c4 Author: Linus Torvalds Date: Tue May 27 15:49:58 2025 -0700 Merge tag 'regulator-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This is a very quiet release, there was no work on the core and a good chunk of the updates were the result of conversions to use newer GPIO APIs. We did gain support for Analog ADP5055 and TI TPS65214 devices, and there's a new restart handler for the PCA9450 which allows devices using it to be properly power cycled on reboot, but otherwise it's minor fixes and API updates" * tag 'regulator-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (24 commits) regulator: qcom_spmi: Constify struct spmi_voltage_range regulator: max8952: Correct Samsung "Electronics" spelling in copyright headers regulator: dt-bindings: mt6357: Drop fixed compatible requirement regulator: gpio: Use dev_err_probe regulator: pca9450: Add restart handler regulator: da9121: Fix Wvoid-pointer-to-enum-cast warning regulator: tps65219: Add TI TPS65214 Regulator Support regulator: tps65219: Add support for TPS65215 Regulator IRQs regulator: tps65219: Add support for TPS65215 regulator resources regulator: tps65219: Update struct names regulator: pf9453: convert to use maple tree register cache regulator: max20086: Change enable gpio to optional regulator: max20086: Fix MAX200086 chip id regulator: adp5055: Remove unneeded semicolon regulator: adp5055: remove duplicate device table regulator: adp5055: Add driver for adp5055 regulator: dt-bindings: adi,adp5055-regulator: Add adp5055 support regulator: don't compare raw GPIO descriptor pointers regulator: rpi-panel-attiny: use new GPIO line value setter callbacks regulator: rpi-panel-attiny: use lock guards for the state mutex ... commit c971f11dbf1bff3d1226b92015302326c7c292c3 Merge: aacc73ceeb8bf6 1c12fbdf40e17d Author: Linus Torvalds Date: Tue May 27 15:44:26 2025 -0700 Merge tag 'regmap-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This release we have one new feature, support for chips that report edge interrupts but don't provide distinct readback of that status per line, plus a few cleanups" * tag 'regmap-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: irq: Add support for chips without separate IRQ status regmap-irq: Use dedicated interrupt wake setters regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ regcache: Use sort()'s default swap() implementation commit aacc73ceeb8bf664426f0e53db2778a59325bd9f Merge: a9e6060bb2a6ca 8b8ef309093ff1 Author: Linus Torvalds Date: Tue May 27 15:22:01 2025 -0700 Merge tag 'gpio-updates-for-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We have three new drivers, some refactoring in the GPIO core, lots of various changes across many drivers, new configfs interface for the virtual gpio-aggregator module and DT-bindings updates. The treewide conversion of GPIO drivers to using the new value setter callbacks is ongoing with another round of GPIO drivers updated. You will also see these commits coming in from other subsystems as with the relevant changes merged into mainline last cycle, I've started converting GPIO providers located elsewhere than drivers/gpio/. GPIO core: - use more lock guards where applicable - refactor GPIO ACPI code and shrink it in the process by 8% - move GPIO ACPI quirks into a separate file - remove unneeded #ifdef - convert GPIO devres helpers to using devm_add_action() where applicable which shrinks and simplifies the code - refactor GPIO descriptor validation in GPIO consumer interfaces - don't allow setting values on input lines in the GPIO core which will take off the burden from GPIO drivers of checking this down the line - provide gpiod_is_equal() as a way of safely comparing two GPIO descriptors (the only current user is in regulator core) New drivers: - add the GPIO module for the max77759 multifunction device - add the GPIO driver for the VeriSilicon BLZP1600 GPIO controller - add the GPIO driver for the Spacemit K1 SoC Driver improvements: - convert more drivers to using the new GPIO line value setter callbacks - convert more drivers to making the irq_chip immutable as is recommended by the interrupt subsystem - extend build testing coverage by enabling more modules to be built with COMPILE_TEST=y - extend the gpio-aggregator module with a configfs interface that makes the setup easier for user-space than the existing driver-level sysfs attributes and also adds more advanced configuration features (such as referring to aggregated lines by their original names or modifying their names as exposed by the aggregated chip) - add a missing mutex_destroy() in gpio-imx-scu - add an OF polarity quirk for s5m8767 - allow building gpio-vf610 as a loadable module - make gpio-mxc not hardcode its GPIO base number with GPIO SYSFS interface disabled (another small step towards getting rid of the global GPIO numberspace) - add support for level-triggered interrupts to gpio-pca953x - don't double-check the ngpios property in gpio-ds4520 as GPIO core already does it - don't double-check the number of GPIOs in gpio-imx-scu as GPIO core already does it - remove unused callbacks from gpio-max3191x DT bindings: - add device-tree bindings for max77759, spacemit,k1 and blzp1600 (new drivers added this cycle) - document more properties for gpio-vf610 and gpio-tegra186 - document a new pca95xx variant - fix style of examples in several GPIO DT-binding documents Misc: - TODO list updates" * tag 'gpio-updates-for-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (123 commits) gpio: timberdale: select GPIOLIB_IRQCHIP gpio: lpc18xx: select GPIOLIB_IRQCHIP gpio: grgpio: select GPIOLIB_IRQCHIP gpio: bcm-kona: select GPIOLIB_IRQCHIP dt-bindings: gpio: vf610: add ngpios and gpio-reserved-ranges gpio: davinci: select GPIOLIB_IRQCHIP gpiolib-acpi: Update file references in the Documentation and MAINTAINERS gpiolib: acpi: Move quirks to a separate file gpiolib: acpi: Add acpi_gpio_need_run_edge_events_on_boot() getter gpiolib: acpi: Handle deferred list via new API gpiolib: acpi: Make sure we fill struct acpi_gpio_info gpiolib: acpi: Switch to use enum in acpi_gpio_in_ignore_list() gpiolib: acpi: Use temporary variable for struct acpi_gpio_info gpiolib: remove unneeded #ifdef gpio: mpc8xxx: select GPIOLIB_IRQCHIP gpio: pxa: select GPIOLIB_IRQCHIP gpio: pxa: Make irq_chip immutable gpio: timberdale: Make irq_chip immutable gpio: xgene-sb: Make irq_chip immutable gpio: davinci: Make irq_chip immutable ... commit a9e6060bb2a6cae6d43a98ec0794844ad01273d3 Merge: 11147c16a6e064 534e9cf3782f1b Author: Linus Torvalds Date: Tue May 27 15:05:18 2025 -0700 Merge tag 'sound-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We've received a lot of activities in this cycle, mostly about leaf driver codes rather than the core part, but with a good mixture of code cleanups and new driver additions. Below are some highlights: ASoC: - Support for automatically enumerating DAIs from standards conforming SoundWire SDCA devices; not much used as of this writing, rather for future implementations - Conversion of quite a few drivers to newer GPIO APIs - Continued cleanups and helper usages in allover places - Support for a wider range of Intel AVS platforms - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32 Everest Semiconductor ES8375 and ES8389, Longsoon-1 AC'97 controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers HD-audio: - Lots of cleanups of TAS2781 codec drivers - A new HD-audio control bound via ACPI for Nvidia - Support for Tegra264, Intel WCL, usual new codec quirks USB-audio: - Fix a race at removal of MIDI device - Pioneer DJM-V10 support, Scarlett2 driver cleanups Misc: - Cleanups of deprecated PCI functions - Removal of unused / dead function codes" * tag 'sound-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (364 commits) firmware: cs_dsp: Fix OOB memory read access in KUnit test ASoC: codecs: add support for ES8375 ASoC: dt-bindings: Add Everest ES8375 audio CODEC ALSA: hda: acpi: Make driver's match data const static ALSA: hda: acpi: Use SYSTEM_SLEEP_PM_OPS() ALSA: atmel: Replace deprecated strcpy() with strscpy() ALSA: core: fix up bus match const issues. ASoC: wm_adsp: Make cirrus_dir const ASoC: tegra: Tegra264 support in isomgr_bw ASoC: tegra: AHUB: Add Tegra264 support ASoC: tegra: ADX: Add Tegra264 support ASoC: tegra: AMX: Add Tegra264 support ASoC: tegra: I2S: Add Tegra264 support ASoC: tegra: Update PLL rate for Tegra264 ASoC: tegra: ASRC: Update ARAM address ASoC: tegra: ADMAIF: Add Tegra264 support ASoC: tegra: CIF: Add Tegra264 support dt-bindings: ASoC: Document Tegra264 APE support dt-bindings: ASoC: admaif: Add missing properties ASoC: dt-bindings: audio-graph-card2: reference audio-graph routing property ... commit 11147c16a6e0649cc95f8bb90302e4a99ece30bc Merge: d48d8380d92ba2 c0c980f237e822 Author: Linus Torvalds Date: Tue May 27 15:01:47 2025 -0700 Merge tag 'pwm/for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm updates from Uwe Kleine-König: "This time around the pwm changes for the next release contain three new drivers (loongson, mc33xs2410 and rzg2l-gpt) and the usual collection of cleanups in both the core and drivers, support for new variants in existing drivers, conversion of dt bindings to yaml and documentation updates. Thanks for contributions and reviews go to Alexey Charkov, AngeloGioacchino Del Regno, Bartosz Golaszewski, Biju Das, Binbin Zhou, Dan Carpenter, Dimitri Fedrau, Geert Uytterhoeven, George Stark, Huacai Chen, Juxin Gao, Krzysztof Kozlowski, Kuninori Morimoto, Laurent Pinchart, Neil Armstrong, Nuno Sá, Rob Herring, and Trevor Gamblin" * tag 'pwm/for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (39 commits) dt-bindings: timer: renesas,tpu: remove binding documentation pwm: adp5585: make sure to include mod_devicetable.h pwm: Tidyup PWM menu for Renesas pwm: Restore alphabetic ordering in Kconfig and Makefile pwm: Formally describe the procedure used to pick a hardware waveform setting pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after rounding up pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible requests ARM: shmobile: defconfig: Enable more support for RZN1D-DB/EB arm64: defconfig: Add Renesas MSIOF sound support arm64: defconfig: Enable Renesas RZ/G2L GPT config pwm: add support for NXPs high-side switch MC33XS2410 dt-bindings: pwm: add support for MC33XS2410 pwm: rzg2l-gpt: Accept requests for too high period length dt-bindings: pwm: vt8500-pwm: Convert to YAML dt-bindings: pwm: mediatek,pwm-disp: Add compatible for MT6893 pwm: Fix various formatting issues in kernel-doc pwm: Add support for RZ/G2L GPT dt-bindings: pwm: Add RZ/G2L GPT binding pwm: Better document return value of pwm_round_waveform_might_sleep() pwm: loongson: Fix an error code in probe() ... commit d48d8380d92ba2db4fcf81c566093276dbbb4ebc Merge: bad14b5d2c9520 3e552ccf405c0d Author: Linus Torvalds Date: Tue May 27 14:54:35 2025 -0700 Merge tag 'chrome-platform-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome-platform updates from Tzung-Bi Shih: "New: - Support MT8192 Spherion and MT8186 Corsola devices in of_hw_prober - Turn cros_ec_proto from bool into tristate - Support Pin Assignment E in cros_ec_typec for USB-C to DP cables Improvements: - Avoid -Wflex-array-member-not-at-end warnings Cleanups: - Remove a redundant dependency in Kconfig for cros_kbd_led_backlight" * tag 'chrome-platform-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: kunit: Avoid -Wflex-array-member-not-at-end platform/chrome: cros_ec_typec: Set Pin Assignment E in DP PORT VDO platform/chrome: of_hw_prober: Support touchscreen probing on Squirtle platform/chrome: of_hw_prober: Support trackpad probing on Corsola family platform/chrome: cros_kbd_led_backlight: Fix build dependencies platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency platform/chrome: cros_ec_proto: Allow to build as module platform/chrome: cros_ec_debugfs: Avoid -Wflex-array-member-not-at-end warnings platform/chrome: cros_kbd_led_backlight: Avoid -Wflex-array-member-not-at-end warnings platform/chrome: cros_ec_proto: Avoid -Wflex-array-member-not-at-end warnings platform/chrome: of_hw_prober: Support Google Spherion commit bad14b5d2c9520740f3411182d833ff15f130e26 Author: Linus Torvalds Date: Tue May 27 14:40:30 2025 -0700 Remove legacy 'cc-disable-warning' use from the generic build scripts This just converts the 'cc-disable-warning' uses in the generic makefile extrawarn script to use the plain 'cc-option' form instead. Partly to clean things up, and partly just to have the new form get some proper test coverage. I'll leave the various random other uses of 'cc-disable-warning' alone and let subsystem maintainers decide if they want to convert to the new unified model. Signed-off-by: Linus Torvalds commit 550ccb178de2f379f5e1a1833dd6f4bdafef4b68 Author: Linus Torvalds Date: Tue May 27 14:35:51 2025 -0700 Make 'cc-option' work correctly for the -Wno-xyzzy pattern This is the follow-up to commit a79be02bba5c ("Fix mis-uses of 'cc-option' for warning disablement") where I mentioned that the best fix would be to just make 'cc-option' a bit smarter, and work for all compiler options, including the '-Wno-xyzzy' pattern that it used to accept unknown options for. It turns out that fixing cc-option is pretty straightforward: just rewrite any '-Wno-xyzzy' option pattern to use '-Wxyzzy' instead for testing. That makes the whole artificial distinction between 'cc-option' and 'cc-disable-warning' go away, and we can happily forget about the odd build rule that you have to treat compiler options that disable warnings specially. The 'cc-disable-warning' helper remains as a backwards compatibility syntax for now, but is implemented in terms of the new and improved cc-option. Acked-by: Masahiro Yamada Cc: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Weißschuh Cc: Nathan Chancellor Signed-off-by: Linus Torvalds commit 5ffb537e416ee22dbfb3d552102e50da33fec7f6 Author: Yonghong Song Date: Fri May 23 21:13:40 2025 -0700 selftests/bpf: Add tests with stack ptr register in conditional jmp Add two tests: - one test has 'rX r10' where rX is not r10, and - another test has 'rX rY' where rX and rY are not r10 but there is an early insn 'rX = r10'. Without previous verifier change, both tests will fail. Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250524041340.4046304-1-yonghong.song@linux.dev commit e2d2115e56c4a02377189bfc3a9a7933552a7b0f Author: Yonghong Song Date: Fri May 23 21:13:35 2025 -0700 bpf: Do not include stack ptr register in precision backtracking bookkeeping Yi Lai reported an issue ([1]) where the following warning appears in kernel dmesg: [ 60.643604] verifier backtracking bug [ 60.643635] WARNING: CPU: 10 PID: 2315 at kernel/bpf/verifier.c:4302 __mark_chain_precision+0x3a6c/0x3e10 [ 60.648428] Modules linked in: bpf_testmod(OE) [ 60.650471] CPU: 10 UID: 0 PID: 2315 Comm: test_progs Tainted: G OE 6.15.0-rc4-gef11287f8289-dirty #327 PREEMPT(full) [ 60.654385] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE [ 60.656682] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 60.660475] RIP: 0010:__mark_chain_precision+0x3a6c/0x3e10 [ 60.662814] Code: 5a 30 84 89 ea e8 c4 d9 01 00 80 3d 3e 7d d8 04 00 0f 85 60 fa ff ff c6 05 31 7d d8 04 01 48 c7 c7 00 58 30 84 e8 c4 06 a5 ff <0f> 0b e9 46 fa ff ff 48 ... [ 60.668720] RSP: 0018:ffff888116cc7298 EFLAGS: 00010246 [ 60.671075] RAX: 54d70e82dfd31900 RBX: ffff888115b65e20 RCX: 0000000000000000 [ 60.673659] RDX: 0000000000000001 RSI: 0000000000000004 RDI: 00000000ffffffff [ 60.676241] RBP: 0000000000000400 R08: ffff8881f6f23bd3 R09: 1ffff1103ede477a [ 60.678787] R10: dffffc0000000000 R11: ffffed103ede477b R12: ffff888115b60ae8 [ 60.681420] R13: 1ffff11022b6cbc4 R14: 00000000fffffff2 R15: 0000000000000001 [ 60.684030] FS: 00007fc2aedd80c0(0000) GS:ffff88826fa8a000(0000) knlGS:0000000000000000 [ 60.686837] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 60.689027] CR2: 000056325369e000 CR3: 000000011088b002 CR4: 0000000000370ef0 [ 60.691623] Call Trace: [ 60.692821] [ 60.693960] ? __pfx_verbose+0x10/0x10 [ 60.695656] ? __pfx_disasm_kfunc_name+0x10/0x10 [ 60.697495] check_cond_jmp_op+0x16f7/0x39b0 [ 60.699237] do_check+0x58fa/0xab10 ... Further analysis shows the warning is at line 4302 as below: 4294 /* static subprog call instruction, which 4295 * means that we are exiting current subprog, 4296 * so only r1-r5 could be still requested as 4297 * precise, r0 and r6-r10 or any stack slot in 4298 * the current frame should be zero by now 4299 */ 4300 if (bt_reg_mask(bt) & ~BPF_REGMASK_ARGS) { 4301 verbose(env, "BUG regs %x\n", bt_reg_mask(bt)); 4302 WARN_ONCE(1, "verifier backtracking bug"); 4303 return -EFAULT; 4304 } With the below test (also in the next patch): __used __naked static void __bpf_jmp_r10(void) { asm volatile ( "r2 = 2314885393468386424 ll;" "goto +0;" "if r2 <= r10 goto +3;" "if r1 >= -1835016 goto +0;" "if r2 <= 8 goto +0;" "if r3 <= 0 goto +0;" "exit;" ::: __clobber_all); } SEC("?raw_tp") __naked void bpf_jmp_r10(void) { asm volatile ( "r3 = 0 ll;" "call __bpf_jmp_r10;" "r0 = 0;" "exit;" ::: __clobber_all); } The following is the verifier failure log: 0: (18) r3 = 0x0 ; R3_w=0 2: (85) call pc+2 caller: R10=fp0 callee: frame1: R1=ctx() R3_w=0 R10=fp0 5: frame1: R1=ctx() R3_w=0 R10=fp0 ; asm volatile (" \ @ verifier_precision.c:184 5: (18) r2 = 0x20202000256c6c78 ; frame1: R2_w=0x20202000256c6c78 7: (05) goto pc+0 8: (bd) if r2 <= r10 goto pc+3 ; frame1: R2_w=0x20202000256c6c78 R10=fp0 9: (35) if r1 >= 0xffe3fff8 goto pc+0 ; frame1: R1=ctx() 10: (b5) if r2 <= 0x8 goto pc+0 mark_precise: frame1: last_idx 10 first_idx 0 subseq_idx -1 mark_precise: frame1: regs=r2 stack= before 9: (35) if r1 >= 0xffe3fff8 goto pc+0 mark_precise: frame1: regs=r2 stack= before 8: (bd) if r2 <= r10 goto pc+3 mark_precise: frame1: regs=r2,r10 stack= before 7: (05) goto pc+0 mark_precise: frame1: regs=r2,r10 stack= before 5: (18) r2 = 0x20202000256c6c78 mark_precise: frame1: regs=r10 stack= before 2: (85) call pc+2 BUG regs 400 The main failure reason is due to r10 in precision backtracking bookkeeping. Actually r10 is always precise and there is no need to add it for the precision backtracking bookkeeping. One way to fix the issue is to prevent bt_set_reg() if any src/dst reg is r10. Andrii suggested to go with push_insn_history() approach to avoid explicitly checking r10 in backtrack_insn(). This patch added push_insn_history() support for cond_jmp like 'rX rY' operations. In check_cond_jmp_op(), if any of rX or rY is a stack pointer, push_insn_history() will record such information, and later backtrack_insn() will do bt_set_reg() properly for those register(s). [1] https://lore.kernel.org/bpf/Z%2F8q3xzpU59CIYQE@ly-workstation/ Reported by: Yi Lai Fixes: 407958a0e980 ("bpf: encapsulate precision backtracking bookkeeping") Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250524041335.4046126-1-yonghong.song@linux.dev commit 0e71bcdcf1f0b10b435932907fb0d205deecf7a0 Author: Namhyung Kim Date: Fri May 23 17:27:54 2025 -0700 perf test: Add AMD IBS sw filter test The kernel v6.14 added 'swfilt' to support privilege filtering in software so that IBS can be used by regular users. Add a test case in x86 to verify the behavior. $ sudo perf test -vv 'IBS software filter' 113: AMD IBS software filtering: --- start --- test child forked, pid 178826 check availability of IBS swfilt run perf record with modifier and swfilt [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.000 MB /dev/null ] [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.000 MB /dev/null ] [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.000 MB /dev/null ] [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 0.000 MB /dev/null ] check number of samples with swfilt [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.037 MB - ] [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.041 MB - ] ---- end(0) ---- 113: AMD IBS software filtering : Ok Reviewed-by: Ravi Bangoria Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo # On a 9950x3d Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250524002754.1266681-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fa9b3578ed628641504ab74958bbe36a42c2615a Author: Yicong Yang Date: Fri Apr 25 11:38:45 2025 +0800 perf mem: Count L2 HITM for c2c statistic L2 HITM is not counted in c2c statistic decoding. Count it for lcl_hitm like how we handle L2 Peer snoop. Reviewed-by: Leo Yan Signed-off-by: Yicong Yang Cc: CaiJingtao Cc: Catalin Marinas Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Jonathan Cameron Cc: Junhao He Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: Yushan Wang Cc: Zeng Tao Cc: xueshan2@huawei.com Link: https://lore.kernel.org/r/20250425033845.57671-4-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 846b62b3433d2e87018576ab386f7a96390f66e4 Author: Yicong Yang Date: Fri Apr 25 11:38:44 2025 +0800 perf arm-spe: Add support for SPE Data Source packet on HiSilicon HIP12 Add data source encoding for HiSilicon HIP12 and coresponding mapping to the perf's memory data source. This will help to synthesize the data and support upper layer tools like perf-mem and perf-c2c. Reviewed-by: Leo Yan Signed-off-by: Yicong Yang Cc: CaiJingtao Cc: Catalin Marinas Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Jonathan Cameron Cc: Junhao He Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: Yushan Wang Cc: Zeng Tao Cc: xueshan2@huawei.com Link: https://lore.kernel.org/r/20250425033845.57671-3-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit a39a3fbe312619fe2ccef0b17e5f53dff011fb1a Author: Rob Herring (Arm) Date: Tue May 27 15:21:09 2025 -0500 dt-bindings: arm/cpus: Allow 2 power-domains entries Some platforms have both "perf" and "psci" power domains, so allow 2 entries. Signed-off-by: Rob Herring (Arm) commit 6579a03e68ffa5feb2d2823dea16ca7466f6de16 Author: Damon Ding Date: Sun Mar 2 16:30:43 2025 +0800 drm/bridge: analogix_dp: Remove the unnecessary calls to clk_disable_unprepare() during probing With the commit f37952339cc2 ("drm/bridge: analogix_dp: handle clock via runtime PM"), the PM operations can help enable/disable the clock. The err_disable_clk label and clk_disable_unprepare() operations are no longer necessary because the analogix_dp_resume() will not be called during probing. Fixes: f37952339cc2 ("drm/bridge: analogix_dp: handle clock via runtime PM") Suggested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: Damon Ding Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250302083043.3197235-1-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit be9b3f9a54101c19226c25ba7163d291183777a0 Author: Nicolas Frattaroli Date: Tue May 27 19:57:08 2025 +0200 drm/connector: only call HDMI audio helper plugged cb if non-null On driver remove, sound/soc/codecs/hdmi-codec.c calls the plugged_cb with NULL as the callback function and codec_dev, as seen in its hdmi_remove function. The HDMI audio helper then happily tries calling said null function pointer, and produces an Oops as a result. Fix this by only executing the callback if fn is non-null. This means the .plugged_cb and .plugged_cb_dev members still get appropriately cleared. Fixes: baf616647fe6 ("drm/connector: implement generic HDMI audio helpers") Signed-off-by: Nicolas Frattaroli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250527-hdmi-audio-helper-remove-fix-v1-1-6cf77de364d8@collabora.com Signed-off-by: Dmitry Baryshkov commit c98cc9797b7009308fff73d41bc1d08642dab77a Author: Steven Rostedt Date: Tue May 27 10:58:20 2025 -0400 ring-buffer: Move cpus_read_lock() outside of buffer->mutex Running a modified trace-cmd record --nosplice where it does a mmap of the ring buffer when '--nosplice' is set, caused the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc7-test-00002-gfb7d03d8a82f #551 Not tainted ------------------------------------------------------ trace-cmd/1113 is trying to acquire lock: ffff888100062888 (&buffer->mutex){+.+.}-{4:4}, at: ring_buffer_map+0x11c/0xe70 but task is already holding lock: ffff888100a5f9f8 (&cpu_buffer->mapping_lock){+.+.}-{4:4}, at: ring_buffer_map+0xcf/0xe70 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&cpu_buffer->mapping_lock){+.+.}-{4:4}: __mutex_lock+0x192/0x18c0 ring_buffer_map+0xcf/0xe70 tracing_buffers_mmap+0x1c4/0x3b0 __mmap_region+0xd8d/0x1f70 do_mmap+0x9d7/0x1010 vm_mmap_pgoff+0x20b/0x390 ksys_mmap_pgoff+0x2e9/0x440 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #4 (&mm->mmap_lock){++++}-{4:4}: __might_fault+0xa5/0x110 _copy_to_user+0x22/0x80 _perf_ioctl+0x61b/0x1b70 perf_ioctl+0x62/0x90 __x64_sys_ioctl+0x134/0x190 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #3 (&cpuctx_mutex){+.+.}-{4:4}: __mutex_lock+0x192/0x18c0 perf_event_init_cpu+0x325/0x7c0 perf_event_init+0x52a/0x5b0 start_kernel+0x263/0x3e0 x86_64_start_reservations+0x24/0x30 x86_64_start_kernel+0x95/0xa0 common_startup_64+0x13e/0x141 -> #2 (pmus_lock){+.+.}-{4:4}: __mutex_lock+0x192/0x18c0 perf_event_init_cpu+0xb7/0x7c0 cpuhp_invoke_callback+0x2c0/0x1030 __cpuhp_invoke_callback_range+0xbf/0x1f0 _cpu_up+0x2e7/0x690 cpu_up+0x117/0x170 cpuhp_bringup_mask+0xd5/0x120 bringup_nonboot_cpus+0x13d/0x170 smp_init+0x2b/0xf0 kernel_init_freeable+0x441/0x6d0 kernel_init+0x1e/0x160 ret_from_fork+0x34/0x70 ret_from_fork_asm+0x1a/0x30 -> #1 (cpu_hotplug_lock){++++}-{0:0}: cpus_read_lock+0x2a/0xd0 ring_buffer_resize+0x610/0x14e0 __tracing_resize_ring_buffer.part.0+0x42/0x120 tracing_set_tracer+0x7bd/0xa80 tracing_set_trace_write+0x132/0x1e0 vfs_write+0x21c/0xe80 ksys_write+0xf9/0x1c0 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #0 (&buffer->mutex){+.+.}-{4:4}: __lock_acquire+0x1405/0x2210 lock_acquire+0x174/0x310 __mutex_lock+0x192/0x18c0 ring_buffer_map+0x11c/0xe70 tracing_buffers_mmap+0x1c4/0x3b0 __mmap_region+0xd8d/0x1f70 do_mmap+0x9d7/0x1010 vm_mmap_pgoff+0x20b/0x390 ksys_mmap_pgoff+0x2e9/0x440 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e other info that might help us debug this: Chain exists of: &buffer->mutex --> &mm->mmap_lock --> &cpu_buffer->mapping_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cpu_buffer->mapping_lock); lock(&mm->mmap_lock); lock(&cpu_buffer->mapping_lock); lock(&buffer->mutex); *** DEADLOCK *** 2 locks held by trace-cmd/1113: #0: ffff888106b847e0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x192/0x390 #1: ffff888100a5f9f8 (&cpu_buffer->mapping_lock){+.+.}-{4:4}, at: ring_buffer_map+0xcf/0xe70 stack backtrace: CPU: 5 UID: 0 PID: 1113 Comm: trace-cmd Not tainted 6.15.0-rc7-test-00002-gfb7d03d8a82f #551 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x6e/0xa0 print_circular_bug.cold+0x178/0x1be check_noncircular+0x146/0x160 __lock_acquire+0x1405/0x2210 lock_acquire+0x174/0x310 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? __mutex_lock+0x169/0x18c0 __mutex_lock+0x192/0x18c0 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? function_trace_call+0x296/0x370 ? __pfx___mutex_lock+0x10/0x10 ? __pfx_function_trace_call+0x10/0x10 ? __pfx___mutex_lock+0x10/0x10 ? _raw_spin_unlock+0x2d/0x50 ? ring_buffer_map+0x11c/0xe70 ? ring_buffer_map+0x11c/0xe70 ? __mutex_lock+0x5/0x18c0 ring_buffer_map+0x11c/0xe70 ? do_raw_spin_lock+0x12d/0x270 ? find_held_lock+0x2b/0x80 ? _raw_spin_unlock+0x2d/0x50 ? rcu_is_watching+0x15/0xb0 ? _raw_spin_unlock+0x2d/0x50 ? trace_preempt_on+0xd0/0x110 tracing_buffers_mmap+0x1c4/0x3b0 __mmap_region+0xd8d/0x1f70 ? ring_buffer_lock_reserve+0x99/0xff0 ? __pfx___mmap_region+0x10/0x10 ? ring_buffer_lock_reserve+0x99/0xff0 ? __pfx_ring_buffer_lock_reserve+0x10/0x10 ? __pfx_ring_buffer_lock_reserve+0x10/0x10 ? bpf_lsm_mmap_addr+0x4/0x10 ? security_mmap_addr+0x46/0xd0 ? lock_is_held_type+0xd9/0x130 do_mmap+0x9d7/0x1010 ? 0xffffffffc0370095 ? __pfx_do_mmap+0x10/0x10 vm_mmap_pgoff+0x20b/0x390 ? __pfx_vm_mmap_pgoff+0x10/0x10 ? 0xffffffffc0370095 ksys_mmap_pgoff+0x2e9/0x440 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fb0963a7de2 Code: 00 00 00 0f 1f 44 00 00 41 f7 c1 ff 0f 00 00 75 27 55 89 cd 53 48 89 fb 48 85 ff 74 3b 41 89 ea 48 89 df b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 5b 5d c3 0f 1f 00 48 8b 05 e1 9f 0d 00 64 RSP: 002b:00007ffdcc8fb878 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb0963a7de2 RDX: 0000000000000001 RSI: 0000000000001000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdcc8fbe68 R14: 00007fb096628000 R15: 00005633e01a5c90 The issue is that cpus_read_lock() is taken within buffer->mutex. The memory mapped pages are taken with the mmap_lock held. The buffer->mutex is taken within the cpu_buffer->mapping_lock. There's quite a chain with all these locks, where the deadlock can be fixed by moving the cpus_read_lock() outside the taking of the buffer->mutex. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250527105820.0f45d045@gandalf.local.home Fixes: 117c39200d9d7 ("ring-buffer: Introducing ring-buffer mapping functions") Signed-off-by: Steven Rostedt (Google) commit 577ce77c84189bb227813bc43e26a37a8d0b316d Author: Radhey Shyam Pandey Date: Fri May 16 18:48:36 2025 +0530 dt-bindings: usb: dwc3-xilinx: allow dma-coherent On Versal Gen 2 SoC the LPD USB DMA controller is coherent with the CPU so allow specifying the information. Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1747401516-286356-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Rob Herring (Arm) commit 08fbd355be3d60c98dbab082df70f9d8d252a298 Author: Alexander Stein Date: Thu May 15 16:29:42 2025 +0200 media: dt-bindings: sony,imx219: Allow props from video-interface-devices Allow properties from video-interface-devices. The change is identical to commit b6339ecfd0865 ("media: dt-bindings: sony,imx290: Allow props from video-interface-devices") Signed-off-by: Alexander Stein Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20250515142945.1348722-1-alexander.stein@ew.tq-group.com Signed-off-by: Rob Herring (Arm) commit 3e188f8f68be1bdc97936051d34bb88172d0254e Author: Krzysztof Kozlowski Date: Mon May 19 10:04:54 2025 +0200 dt-bindings: soundwire: qcom: Document v2.1.0 version of IP block All Qualcomm SoC Soundwire controllers are version-detectable (even 1.x), however certain unidentified quirks might be potentially needed, so document v2.1 version used on Qualcomm SM8650 and SM8750 SoCs, fallbacking to v2.0. Suggested-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250519080453.29858-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 368556dd234dc4a506a35a0c99c0eee2ab475c77 Author: Kees Cook Date: Mon Apr 21 13:41:57 2025 -0700 wifi: iwlwifi: mld: Work around Clang loop unrolling bug The nested loop in iwl_mld_send_proto_offload() confuses Clang into thinking there could be a final loop iteration past the end of the "nsc" array (which is only 4 entries). The FORTIFY checking in memcmp() (via ipv6_addr_cmp()) notices this (due to the available bytes in the out-of-bounds position of &nsc[4] being 0), and errors out, failing the build. For some reason (likely due to architectural loop unrolling configurations), this is only exposed on ARM builds currently. Due to Clang's lack of inline tracking[1], the warning is not very helpful: include/linux/fortify-string.h:719:4: error: call to '__read_overflow' declared with 'error' attribute: detected read beyond size of object (1st parameter) 719 | __read_overflow(); | ^ 1 error generated. But this was tracked down to iwl_mld_send_proto_offload()'s ipv6_addr_cmp() call. An upstream Clang bug has been filed[2] to track this. For now fix the build by explicitly bounding the inner loop by "n_nsc", which is what "c" is already limited to. Reported-by: Nathan Chancellor Closes: https://github.com/ClangBuiltLinux/linux/issues/2076 Link: https://github.com/llvm/llvm-project/pull/73552 [1] Link: https://github.com/llvm/llvm-project/issues/136603 [2] Link: https://lore.kernel.org/r/20250421204153.work.935-kees@kernel.org Signed-off-by: Kees Cook commit cf0da5b0e00ed24e39b7ee64537e530c6cf7fc77 Author: Frank Li Date: Thu May 22 15:47:31 2025 -0400 dt-bindings: watchdog: fsl-imx-wdt: add compatible string fsl,ls1021a-wdt Add compatible string fsl,ls1021a-wdt for ls1021a SoC. fsl,ls1021a-wdt allow big-endian property. Signed-off-by: Frank Li Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250522194732.493624-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit b18d797fa4e85b3a4a3a3e0a3c712210f88698ae Author: Rob Herring (Arm) Date: Wed May 7 16:58:51 2025 -0500 dt-bindings: pinctrl: amlogic,pinctrl-a4: Add missing constraint on allowed 'group' node properties The "^group-[0-9a-z-]+$" nodes schema doesn't constrain the allowed properties as the referenced common schemas don't have constraints. Add the missing "unevaluatedProperties" constraint. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507215852.2748420-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 5722bcd7d373768f9a20517ce271f661bb9bb258 Merge: 015a99fa76650e a1d98e4ffb972a Author: Christian Brauner Date: Tue May 27 21:06:30 2025 +0200 Merge patch series "dropbehind fixes and cleanups" Jens Axboe says: As per the thread here: https://lore.kernel.org/linux-fsdevel/20250525083209.GS2023217@ZenIV/ there was an issue with the dropbehind support, and hence it got reverted (effectively) for the 6.15 kernel release. The problem stems from the fact that the folio can get redirtied and/or scheduled for writeback after the initial dropbehind test, and before we have it locked again for invalidation. Patches 1+2 add a generic helper that both the read and write side can use, and which checks for !dirty && !writeback before going ahead with the invalidation. Patch 3 reverts the FOP_DONTCACHE disable, and patches 4 and 5 do a bit of cleanup work to further unify how the read and write side handling works. This can reasonably be considered a 2 part series, as 1-3 fix the issue and could go to stable, while 4-5 just cleanup the code. * patches from https://lore.kernel.org/20250527133255.452431-1-axboe@kernel.dk: mm/filemap: unify dropbehind flag testing and clearing mm/filemap: unify read/write dropbehind naming Revert "Disable FOP_DONTCACHE for now due to bugs" mm/filemap: use filemap_end_dropbehind() for read invalidation mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback Link: https://lore.kernel.org/20250527133255.452431-1-axboe@kernel.dk Signed-off-by: Christian Brauner commit a1d98e4ffb972ab007f5de850ef53c2a46cacf15 Author: Jens Axboe Date: Tue May 27 07:28:56 2025 -0600 mm/filemap: unify dropbehind flag testing and clearing The read and write side does this a bit differently, unify it such that the _{read,write} helpers check the bit before locking, and the generic handler is in charge of clearing the bit and invalidating, once under the folio lock. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/20250527133255.452431-6-axboe@kernel.dk Signed-off-by: Christian Brauner commit 1da7a06d9ce4edea3370945af8bfcc71b7744788 Author: Jens Axboe Date: Tue May 27 07:28:55 2025 -0600 mm/filemap: unify read/write dropbehind naming The read side is filemap_end_dropbehind_read(), while the write side used folio_ as the prefix rather than filemap_. The read side makes more sense, unify the naming such that the write side follows that. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/20250527133255.452431-5-axboe@kernel.dk Signed-off-by: Christian Brauner commit 7b2b67dbd449afd00fc7279b1ab7ffa3d26fe0c9 Author: Jens Axboe Date: Tue May 27 07:28:54 2025 -0600 Revert "Disable FOP_DONTCACHE for now due to bugs" This reverts commit 478ad02d6844217cc7568619aeb0809d93ade43d. Both the read and write side dirty && writeback races should be resolved now, revert the commit that disabled FOP_DONTCACHE for filesystems. Link: https://lore.kernel.org/linux-fsdevel/20250525083209.GS2023217@ZenIV/ Signed-off-by: Jens Axboe Link: https://lore.kernel.org/20250527133255.452431-4-axboe@kernel.dk Signed-off-by: Christian Brauner commit 25b065a744ff0c1099bb357be1c40030b5a14c07 Author: Jens Axboe Date: Tue May 27 07:28:53 2025 -0600 mm/filemap: use filemap_end_dropbehind() for read invalidation Use the filemap_end_dropbehind() helper rather than calling folio_unmap_invalidate() directly, as we need to check if the folio has been redirtied or marked for writeback once the folio lock has been re-acquired. Cc: stable@vger.kernel.org Reported-by: Trond Myklebust Fixes: 8026e49bff9b ("mm/filemap: add read support for RWF_DONTCACHE") Link: https://lore.kernel.org/linux-fsdevel/ba8a9805331ce258a622feaca266b163db681a10.camel@hammerspace.com/ Signed-off-by: Jens Axboe Link: https://lore.kernel.org/20250527133255.452431-3-axboe@kernel.dk Signed-off-by: Christian Brauner commit 095f627add86a6ddda2c2cfd563b0ee05d0172b2 Author: Jens Axboe Date: Tue May 27 07:28:52 2025 -0600 mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback It's possible for the folio to either get marked for writeback or redirtied. Add a helper, filemap_end_dropbehind(), which guards the folio_unmap_invalidate() call behind check for the folio being both non-dirty and not under writeback AFTER the folio lock has been acquired. Use this helper folio_end_dropbehind_write(). Cc: stable@vger.kernel.org Reported-by: Al Viro Fixes: fb7d3bc41493 ("mm/filemap: drop streaming/uncached pages when writeback completes") Link: https://lore.kernel.org/linux-fsdevel/20250525083209.GS2023217@ZenIV/ Signed-off-by: Jens Axboe Link: https://lore.kernel.org/20250527133255.452431-2-axboe@kernel.dk Signed-off-by: Christian Brauner commit 0ec33c81d9c7342f03864101ddb2e717a0cce03e Author: Pavel Begunkov Date: Tue May 27 18:07:33 2025 +0100 io_uring/zcrx: fix area release on registration failure On area registration failure there might be no ifq set and it's not safe to access area->ifq in the release path without checking it first. Cc: stable@vger.kernel.org Fixes: f12ecf5e1c5ec ("io_uring/zcrx: fix late dma unmap for a dead dev") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bc02878678a5fec28bc77d33355cdba735418484.1748365640.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 015a99fa76650e7d6efa3e36f20c0f5b346fe9ce Merge: 3e443d167327b1 869c788909b93a Author: Linus Torvalds Date: Tue May 27 11:27:09 2025 -0700 Merge tag 'nolibc-20250526-for-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc Pull nolibc updates from Thomas Weißschuh: - New supported architectures: m68k, SPARC (32 and 64 bit) - Compatibility with kselftest_harness.h - A more robust mechanism to include all of nolibc from each header - Split existing features into new headers to simplify adoption - Compatibility with UBSAN and it is used in the testsuite - Many small new features focussing on usage in kselftests * tag 'nolibc-20250526-for-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc: (83 commits) selftests: harness: Stop using setjmp()/longjmp() selftests: harness: Add "variant" and "self" to test metadata selftests: harness: Add teardown callback to test metadata selftests: harness: Move teardown conditional into test metadata selftests: harness: Don't set setup_completed for fixtureless tests selftests: harness: Implement test timeouts through pidfd selftests: harness: Remove dependency on libatomic selftests: harness: Remove inline qualifier for wrappers selftests: harness: Mark functions without prototypes static selftests: harness: Ignore unused variant argument warning selftests: harness: Use C89 comment style selftests: harness: Add kselftest harness selftest selftests/nolibc: drop include guards around standard headers tools/nolibc: move NULL and offsetof() to sys/stddef.h tools/nolibc: move uname() and friends to sys/utsname.h tools/nolibc: move makedev() and friends to sys/sysmacros.h tools/nolibc: move getrlimit() and friends to sys/resource.h tools/nolibc: move reboot() to sys/reboot.h tools/nolibc: move prctl() to sys/prctl.h tools/nolibc: move mount() to sys/mount.h ... commit 3e443d167327b10966166c1953631936547b03d0 Merge: 95bf3760eb9cee d6d886005d32e4 Author: Linus Torvalds Date: Tue May 27 11:22:19 2025 -0700 Merge tag 'docs-6.16' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "A moderately busy cycle for documentation this time around: - The most significant change is the replacement of the old kernel-doc script (a monstrous collection of Perl regexes that predates the Git era) with a Python reimplementation. That, too, is a horrifying collection of regexes, but in a much cleaner and more maintainable structure that integrates far better with the Sphinx build system. This change has been in linux-next for the full 6.15 cycle; the small number of problems that turned up have been addressed, seemingly to everybody's satisfaction. The Perl kernel-doc script remains in tree (as scripts/kernel-doc.pl) and can be used with a command-line option if need be. Unless some reason to keep it around materializes, it will probably go away in 6.17. Credit goes to Mauro Carvalho Chehab for doing all this work. - Some RTLA documentation updates - A handful of Chinese translations - The usual collection of typo fixes, general updates, etc" * tag 'docs-6.16' of git://git.lwn.net/linux: (85 commits) Docs: doc-guide: update sphinx.rst Sphinx version number docs: doc-guide: clarify latest theme usage Documentation/scheduler: Fix typo in sched-stats domain field description scripts: kernel-doc: prevent a KeyError when checking output docs: kerneldoc.py: simplify exception handling logic MAINTAINERS: update linux-doc entry to cover new Python scripts docs: align with scripts/syscall.tbl migration Documentation: NTB: Fix typo Documentation: ioctl-number: Update table intro docs: conf.py: drop backward support for old Sphinx versions Docs: driver-api/basics: add kobject_event interfaces Docs: relay: editing cleanups docs: fix "incase" typo in coresight/panic.rst Fix spelling error for 'parallel' docs: admin-guide: fix typos in reporting-issues.rst docs: dmaengine: add explanation for DMA_ASYNC_TX capability Documentation: leds: improve readibility of multicolor doc docs: fix typo in firmware-related section docs: Makefile: Inherit PYTHONPYCACHEPREFIX setting as env variable Documentation: ioctl-number: Update outdated submission info ... commit 95bf3760eb9ceeb93febdc280695347b1e0a89c1 Merge: 97851c601636a0 5c9e0062989e5d Author: Linus Torvalds Date: Tue May 27 11:17:45 2025 -0700 Merge tag 'lkmm.2025.05.25a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull lkmm updates from Paul McKenney: "Update LKMM documentation: - Cross-references, typos, broken URLs (Akira Yokosawa) - Clarify SRCU explanation (Uladzislau Rezki)" * tag 'lkmm.2025.05.25a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools/memory-model/Documentation: Fix SRCU section in explanation.txt tools/memory-model: docs/references: Remove broken link to imgtec.com tools/memory-model: docs/ordering: Fix trivial typos tools/memory-model: docs/simple.txt: Fix trivial typos tools/memory-model: docs/README: Update introduction of locking.txt commit a3b2347343e077e81d3c169f32c9b2cb1364f4cc Author: Miguel Ojeda Date: Fri May 2 23:51:32 2025 +0200 Documentation: rust: testing: add docs on the new KUnit `#[test]` tests There was no documentation yet on the KUnit-based `#[test]`s. Thus add it now. It includes an explanation about the `assert*!` macros being mapped to KUnit and the support for `-> Result` introduced in these series. Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-8-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 0a8d4eab17e6f94d83e1ee4c58c21e613934ac66 Author: Miguel Ojeda Date: Fri May 2 23:51:31 2025 +0200 Documentation: rust: rename `#[test]`s to "`rusttest` host tests" Now that `rusttest`s are not really used much, clarify the section of the documentation that describes them. In addition, free the section name for the KUnit-based `#[test]`s that will be added afterwards. To do so, rename the section into `rusttest` host tests. Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-7-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 2d6c87d0d6a0c0acf6b4dd9eec9ed44a82886836 Author: Miguel Ojeda Date: Fri May 2 23:51:30 2025 +0200 rust: str: take advantage of the `-> Result` support in KUnit `#[test]`'s Since now we have support for returning `-> Result`s, we can convert some of these tests to use the feature, and serve as a first user for it too. Thus convert them, which allows us to remove some `unwrap()`s. We keep the actual assertions we want to make as explicit ones with `assert*!`s. Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-6-ojeda@kernel.org [ Split the `CString` simplification into a new commit. - Miguel ] Signed-off-by: Miguel Ojeda commit 1486554392e242da5cbe95092d8dfec887bb8cca Author: Miguel Ojeda Date: Mon May 26 20:01:42 2025 +0200 rust: str: simplify KUnit tests `format!` macro Simplify the `format!` macro used in the tests by using `CString::try_from_fmt` and directly `unwrap()`ing. This will allow us to change both `unwrap()`s here in order to showcase the `?` operator support now that the tests are KUnit ones. Reviewed-by: David Gow Acked-by: Danilo Krummrich [ Split from the next commit as suggested by Tamir. - Miguel ] Signed-off-by: Miguel Ojeda commit 028df914e5466a02326829427bb8e26a31a05545 Author: Miguel Ojeda Date: Fri May 2 23:51:29 2025 +0200 rust: str: convert `rusttest` tests into KUnit In general, we should aim to test as much as possible within the actual kernel, and not in the build host. Thus convert these `rusttest` tests into KUnit tests. Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-5-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 897d1df6532f05814acd364af9055cd6628fd1b3 Author: Miguel Ojeda Date: Fri May 2 23:51:28 2025 +0200 rust: add `kunit_tests` to the prelude It is convenient to have certain things in the `kernel` prelude, and means kernel developers will find it even easier to start writing tests. And, anyway, nobody should need to use this identifier for anything else. Thus add it to the prelude. Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-4-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 950b306c296ec1e90d2d76f1974d2de2375a3d82 Author: Miguel Ojeda Date: Fri May 2 23:51:27 2025 +0200 rust: kunit: support checked `-> Result`s in KUnit `#[test]`s Currently, return values of KUnit `#[test]` functions are ignored. Thus introduce support for `-> Result` functions by checking their returned values. At the same time, require that test functions return `()` or `Result`, which should avoid mistakes, especially with non-`#[must_use]` types. Other types can be supported in the future if needed. With this, a failing test like: #[test] fn my_test() -> Result { f()?; Ok(()) } will output: [ 3.744214] KTAP version 1 [ 3.744287] # Subtest: my_test_suite [ 3.744378] # speed: normal [ 3.744399] 1..1 [ 3.745817] # my_test: ASSERTION FAILED at rust/kernel/lib.rs:321 [ 3.745817] Expected is_test_result_ok(my_test()) to be true, but is false [ 3.747152] # my_test.speed: normal [ 3.747199] not ok 1 my_test [ 3.747345] not ok 4 my_test_suite Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-3-ojeda@kernel.org [ Used `::kernel` for paths. - Miguel ] Signed-off-by: Miguel Ojeda commit 36174d16f3ec072f9e07b6c6d59ba91b2d52f9e2 Author: Miguel Ojeda Date: Fri May 2 23:51:26 2025 +0200 rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s The KUnit `#[test]` support that landed recently is very basic and does not map the `assert*!` macros into KUnit like the doctests do, so they panic at the moment. Thus implement the custom mapping in a similar way to doctests, reusing the infrastructure there. In Rust 1.88.0, the `file()` method in `Span` may be stable [1]. However, it was changed recently (from `SourceFile`), so we need to do something different in previous versions. Thus create a helper for it and use it to get the path. With this, a failing test suite like: #[kunit_tests(my_test_suite)] mod tests { use super::*; #[test] fn my_first_test() { assert_eq!(42, 43); } #[test] fn my_second_test() { assert!(42 >= 43); } } will properly map back to KUnit, printing something like: [ 1.924325] KTAP version 1 [ 1.924421] # Subtest: my_test_suite [ 1.924506] # speed: normal [ 1.924525] 1..2 [ 1.926385] # my_first_test: ASSERTION FAILED at rust/kernel/lib.rs:251 [ 1.926385] Expected 42 == 43 to be true, but is false [ 1.928026] # my_first_test.speed: normal [ 1.928075] not ok 1 my_first_test [ 1.928723] # my_second_test: ASSERTION FAILED at rust/kernel/lib.rs:256 [ 1.928723] Expected 42 >= 43 to be true, but is false [ 1.929834] # my_second_test.speed: normal [ 1.929868] not ok 2 my_second_test [ 1.930032] # my_test_suite: pass:0 fail:2 skip:0 total:2 [ 1.930153] # Totals: pass:0 fail:2 skip:0 total Link: https://github.com/rust-lang/rust/pull/140514 [1] Reviewed-by: David Gow Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250502215133.1923676-2-ojeda@kernel.org [ Required `KUNIT=y` like for doctests. Used the `cfg_attr` from the TODO comment and clarified its comment now that the stabilization is in beta and thus quite likely stable in Rust 1.88.0. Simplified the `new_body` code by introducing a new variable. Added `#[allow(clippy::incompatible_msrv)]`. - Miguel ] Signed-off-by: Miguel Ojeda commit ca56fbd5081e1c4340799040ee9cb849ee45249d Merge: d4965578267e2e 149ead9d7e3de7 Author: Alexei Starovoitov Date: Tue May 27 10:50:32 2025 -0700 Merge branch 'bpf-arm64-support-up-to-12-arguments' Alexis Lothoré says: ==================== this is the v2 of the many args series for arm64, being itself a revival of Xu Kuhoai's work to enable larger arguments count for BPF programs on ARM64 ([1]). The discussions in v1 shed some light on some issues around specific cases, for example with functions passing struct on stack with custom packing/alignment attributes: those cases can not be properly detected with the current BTF info. So this new revision aims to separate concerns with a simpler implementation, just accepting additional args on stack if we can make sure about the alignment constraints (and so, refusing attachment to functions passing structs on stacks). I then checked if the specific alignment constraints could be checked with larger scalar types rather than structs, but it appears that this use case is in fact rejected at the verifier level (see a9b59159d338 ("bpf: Do not allow btf_ctx_access with __int128 types")). So in the end the specific alignment corner cases raised in [1] can not really happen in the kernel in its current state. This new revision still brings support for the standard cases as a first step, it will then be possible to iterate on top of it to add the more specific cases like struct passed on stack and larger types. [1] https://lore.kernel.org/all/20230917150752.69612-1-xukuohai@huaweicloud.com/#t Changes in v3: - switch back -EOPNOTSUPP to -ENOTSUPP - fix comment style - group intializations for arg_aux - remove some unneeded round_up - Link to v2: https://lore.kernel.org/r/20250522-many_args_arm64-v2-0-d6afdb9cf819@bootlin.com Changes in v2: - remove alignment computation from btf.c - deduce alignment constraints directly in jit compiler for simple types - deny attachment to functions with "corner-cases" arguments (ie: structs on stack) - remove custom tests, as the corresponding use cases are locked either by the JIT comp or the verifier - drop RFC - Link to v1: https://lore.kernel.org/r/20250411-many_args_arm64-v1-0-0a32fe72339e@bootlin.com ==================== Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Xu Kuohai Link: https://patch.msgid.link/20250527-many_args_arm64-v3-0-3faf7bb8e4a2@bootlin.com Signed-off-by: Alexei Starovoitov commit 149ead9d7e3de786786ce496133325b3f358ec8a Author: Alexis Lothoré (eBPF Foundation) Date: Tue May 27 12:06:04 2025 +0200 selftests/bpf: enable many-args tests for arm64 Now that support for up to 12 args is enabled for tracing programs on ARM64, enable the existing tests for this feature on this architecture. Signed-off-by: Alexis Lothoré (eBPF Foundation) Link: https://lore.kernel.org/r/20250527-many_args_arm64-v3-2-3faf7bb8e4a2@bootlin.com Signed-off-by: Alexei Starovoitov commit 9014cf56f13d8ce21329837c148f723490950e28 Author: Xu Kuohai Date: Tue May 27 12:06:03 2025 +0200 bpf, arm64: Support up to 12 function arguments Currently ARM64 bpf trampoline supports up to 8 function arguments. According to the statistics from commit 473e3150e30a ("bpf, x86: allow function arguments up to 12 for TRACING"), there are about 200 functions accept 9 to 12 arguments, so adding support for up to 12 function arguments. Due to bpf only supporting function arguments up to 16 bytes, according to AAPCS64, starting from the first argument, each argument is first attempted to be loaded to 1 or 2 smallest registers from x0-x7, if there are no enough registers to hold the entire argument, then all remaining arguments starting from this one are pushed to the stack for passing. There are some non-trivial cases for which it is not possible to correctly read arguments from/write arguments to the stack: for example struct variables may have custom packing/alignment attributes that are invisible in BTF info. Such cases are denied for now to make sure not to read incorrect values. Signed-off-by: Xu Kuohai Co-developed-by: Alexis Lothoré (eBPF Foundation) Signed-off-by: Alexis Lothoré (eBPF Foundation) Link: https://lore.kernel.org/r/20250527-many_args_arm64-v3-1-3faf7bb8e4a2@bootlin.com Signed-off-by: Alexei Starovoitov commit 97851c601636a0e40f8237b83a6b70fc5e231e0c Merge: dd3922cf9d4d14 ba575cea29fd82 Author: Linus Torvalds Date: Tue May 27 10:48:36 2025 -0700 Merge tag 'ratelimit.2025.05.25a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull rate-limit updates from Paul McKenney: "lib/ratelimit: Reduce false-positive and silent misses: - Reduce open-coded use of ratelimit_state structure fields. - Convert the ->missed field to atomic_t. - Count misses that are due to lock contention. - Eliminate jiffies=0 special case. - Reduce ___ratelimit() false-positive rate limiting (Petr Mladek). - Allow zero ->burst to hard-disable rate limiting. - Optimize away atomic operations when a miss is guaranteed. - Warn if ->interval or ->burst are negative (Petr Mladek). - Simplify the resulting code. A smoke test and stress test have been created, but they are not yet ready for mainline. With luck, we will offer them for the v6.17 merge window" * tag 'ratelimit.2025.05.25a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: ratelimit: Drop redundant accesses to burst ratelimit: Use nolock_ret restructuring to collapse common case code ratelimit: Use nolock_ret label to collapse lock-failure code ratelimit: Use nolock_ret label to save a couple of lines of code ratelimit: Simplify common-case exit path ratelimit: Warn if ->interval or ->burst are negative ratelimit: Avoid atomic decrement under lock if already rate-limited ratelimit: Avoid atomic decrement if already rate-limited ratelimit: Don't flush misses counter if RATELIMIT_MSG_ON_RELEASE ratelimit: Force re-initialization when rate-limiting re-enabled ratelimit: Allow zero ->burst to disable ratelimiting ratelimit: Reduce ___ratelimit() false-positive rate limiting ratelimit: Avoid jiffies=0 special case ratelimit: Count misses due to lock contention ratelimit: Convert the ->missed field to atomic_t drm/amd/pm: Avoid open-coded use of ratelimit_state structure's internals drm/i915: Avoid open-coded use of ratelimit_state structure's ->missed field random: Avoid open-coded use of ratelimit_state structure's ->missed field ratelimit: Create functions to handle ratelimit_state internals commit d4965578267e2e81f67c86e2608481e77e9c8569 Author: Hou Tao Date: Mon May 26 14:25:34 2025 +0800 bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem() bpf_map_lookup_percpu_elem() helper is also available for sleepable bpf program. When BPF JIT is disabled or under 32-bit host, bpf_map_lookup_percpu_elem() will not be inlined. Using it in a sleepable bpf program will trigger the warning in bpf_map_lookup_percpu_elem(), because the bpf program only holds rcu_read_lock_trace lock. Therefore, add the missed check. Reported-by: syzbot+dce5aae19ae4d6399986@syzkaller.appspotmail.com Closes: https://lore.kernel.org/bpf/000000000000176a130617420310@google.com/ Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250526062534.1105938-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 86bc9c742426a16b52a10ef61f5b721aecca2344 Author: KaFai Wan Date: Mon May 26 21:33:58 2025 +0800 bpf: Avoid __bpf_prog_ret0_warn when jit fails syzkaller reported an issue: WARNING: CPU: 3 PID: 217 at kernel/bpf/core.c:2357 __bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Modules linked in: CPU: 3 UID: 0 PID: 217 Comm: kworker/u32:6 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 RIP: 0010:__bpf_prog_ret0_warn+0xa/0x20 kernel/bpf/core.c:2357 Call Trace: bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] cls_bpf_classify+0x74a/0x1110 net/sched/cls_bpf.c:105 ... When creating bpf program, 'fp->jit_requested' depends on bpf_jit_enable. This issue is triggered because of CONFIG_BPF_JIT_ALWAYS_ON is not set and bpf_jit_enable is set to 1, causing the arch to attempt JIT the prog, but jit failed due to FAULT_INJECTION. As a result, incorrectly treats the program as valid, when the program runs it calls `__bpf_prog_ret0_warn` and triggers the WARN_ON_ONCE(1). Reported-by: syzbot+0903f6d7f285e41cdf10@syzkaller.appspotmail.com Closes: https://lore.kernel.org/bpf/6816e34e.a70a0220.254cdc.002c.GAE@google.com Fixes: fa9dd599b4da ("bpf: get rid of pure_initcall dependency to enable jits") Signed-off-by: KaFai Wan Link: https://lore.kernel.org/r/20250526133358.2594176-1-mannkafai@gmail.com Signed-off-by: Alexei Starovoitov commit 1ae7a84ed85317b12a3395470f0cfcc900b2a61a Author: Jiayuan Chen Date: Fri May 16 22:47:02 2025 +0800 bpftool: Add support for custom BTF path in prog load/loadall This patch exposes the btf_custom_path feature to bpftool, allowing users to specify a custom BTF file when loading BPF programs using prog load or prog loadall commands. The argument 'btf_custom_path' in libbpf is used for those kernels that don't have CONFIG_DEBUG_INFO_BTF enabled but still want to perform CO-RE relocations. Suggested-by: Quentin Monnet Reviewed-by: Quentin Monnet Signed-off-by: Jiayuan Chen Link: https://lore.kernel.org/r/20250516144708.298652-1-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 92de53d247dffdf29d2abecf7deb4760dde98d6c Author: Yonghong Song Date: Fri May 23 13:53:31 2025 -0700 selftests/bpf: Add unit tests with __bpf_trap() kfunc Add some inline-asm tests and C tests where __bpf_trap() or __builtin_trap() is used in the code. The __builtin_trap() test is guarded with llvm21 ([1]) since otherwise the compilation failure will happen. [1] https://github.com/llvm/llvm-project/pull/131731 Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20250523205331.1291734-1-yonghong.song@linux.dev Tested-by: Eduard Zingerman Signed-off-by: Alexei Starovoitov commit dd3922cf9d4d1421e5883614d1a6add912131c00 Merge: 350a604221d252 e396dd85172c60 Author: Linus Torvalds Date: Tue May 27 10:21:04 2025 -0700 Merge tag 'x86_sev_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull AMD SEV update from Borislav Petkov: "Add a virtual TPM driver glue which allows a guest kernel to talk to a TPM device emulated by a Secure VM Service Module (SVSM) - a helper module of sorts which runs at a different privilege level in the SEV-SNP VM stack. The intent being that a TPM device is emulated by a trusted entity and not by the untrusted host which is the default assumption in the confidential computing scenarios" * tag 'x86_sev_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Register tpm-svsm platform device tpm: Add SNP SVSM vTPM driver svsm: Add header with SVSM_VTPM_CMD helpers x86/sev: Add SVSM vTPM probe/send_command functions commit 350a604221d252e7431649353dd600e42bc9e944 Merge: ada1b0436b5a29 824c6384e8d927 Author: Linus Torvalds Date: Tue May 27 10:17:03 2025 -0700 Merge tag 'x86_mtrr_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull mtrr update from Borislav Petkov: "A single change to verify the presence of fixed MTRR ranges before accessing the respective MSRs" * tag 'x86_mtrr_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mtrr: Check if fixed-range MTRRs exist in mtrr_save_fixed_ranges() commit ada1b0436b5a290923b072b2eb0368a7869bf680 Merge: 664a231d90aa45 ea3b0b7f541b95 Author: Linus Torvalds Date: Tue May 27 10:13:06 2025 -0700 Merge tag 'edac_updates_for_v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - ie31200: Add support for Raptor Lake-S and Alder Lake-S compute dies - Rework how RRL registers per channel tracking is done in order to support newer hardware with different RRL configurations and refactor that code. Add support for Granite Rapids server - i10nm: explicitly set RRL modes to fix any wrong BIOS programming - Properly save and restore Retry Read error Log channel configuration info on Intel drivers - igen6: Handle correctly the case of fused off memory controllers on Arizona Beach and Amston Lake SoCs before adding support for them - the usual set of fixes and cleanups * tag 'edac_updates_for_v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/bluefield: Don't use bluefield_edac_readl() result on error EDAC/i10nm: Fix the bitwise operation between variables of different sizes EDAC/ie31200: Add two Intel SoCs for EDAC support EDAC/{skx_common,i10nm}: Add RRL support for Intel Granite Rapids server EDAC/{skx_common,i10nm}: Refactor show_retry_rd_err_log() EDAC/{skx_common,i10nm}: Refactor enable_retry_rd_err_log() EDAC/{skx_common,i10nm}: Structure the per-channel RRL registers EDAC/i10nm: Explicitly set the modes of the RRL register sets EDAC/{skx_common,i10nm}: Fix the loss of saved RRL for HBM pseudo channel 0 EDAC/skx_common: Fix general protection fault EDAC/igen6: Add Intel Amston Lake SoCs support EDAC/igen6: Add Intel Arizona Beach SoCs support EDAC/igen6: Skip absent memory controllers commit f95695f2c46592b4260032736a9bfc6e2a01c77c Author: Yonghong Song Date: Fri May 23 13:53:26 2025 -0700 bpf: Warn with __bpf_trap() kfunc maybe due to uninitialized variable Marc Suñé (Isovalent, part of Cisco) reported an issue where an uninitialized variable caused generating bpf prog binary code not working as expected. The reproducer is in [1] where the flags “-Wall -Werror” are enabled, but there is no warning as the compiler takes advantage of uninitialized variable to do aggressive optimization. The optimized code looks like below: ; { 0: bf 16 00 00 00 00 00 00 r6 = r1 ; bpf_printk("Start"); 1: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0x0 ll 0000000000000008: R_BPF_64_64 .rodata 3: b4 02 00 00 06 00 00 00 w2 = 0x6 4: 85 00 00 00 06 00 00 00 call 0x6 ; DEFINE_FUNC_CTX_POINTER(data) 5: 61 61 4c 00 00 00 00 00 w1 = *(u32 *)(r6 + 0x4c) ; bpf_printk("pre ipv6_hdrlen_offset"); 6: 18 01 00 00 06 00 00 00 00 00 00 00 00 00 00 00 r1 = 0x6 ll 0000000000000030: R_BPF_64_64 .rodata 8: b4 02 00 00 17 00 00 00 w2 = 0x17 9: 85 00 00 00 06 00 00 00 call 0x6 The verifier will report the following failure: 9: (85) call bpf_trace_printk#6 last insn is not an exit or jmp The above verifier log does not give a clear hint about how to fix the problem and user may take quite some time to figure out that the issue is due to compiler taking advantage of uninitialized variable. In llvm internals, uninitialized variable usage may generate 'unreachable' IR insn and these 'unreachable' IR insns may indicate uninitialized variable impact on code optimization. So far, llvm BPF backend ignores 'unreachable' IR hence the above code is generated. With clang21 patch [2], those 'unreachable' IR insn are converted to func __bpf_trap(). In order to maintain proper control flow graph for bpf progs, [2] also adds an 'exit' insn after bpf_trap() if __bpf_trap() is the last insn in the function. The new code looks like: ; { 0: bf 16 00 00 00 00 00 00 r6 = r1 ; bpf_printk("Start"); 1: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0x0 ll 0000000000000008: R_BPF_64_64 .rodata 3: b4 02 00 00 06 00 00 00 w2 = 0x6 4: 85 00 00 00 06 00 00 00 call 0x6 ; DEFINE_FUNC_CTX_POINTER(data) 5: 61 61 4c 00 00 00 00 00 w1 = *(u32 *)(r6 + 0x4c) ; bpf_printk("pre ipv6_hdrlen_offset"); 6: 18 01 00 00 06 00 00 00 00 00 00 00 00 00 00 00 r1 = 0x6 ll 0000000000000030: R_BPF_64_64 .rodata 8: b4 02 00 00 17 00 00 00 w2 = 0x17 9: 85 00 00 00 06 00 00 00 call 0x6 10: 85 10 00 00 ff ff ff ff call -0x1 0000000000000050: R_BPF_64_32 __bpf_trap 11: 95 00 00 00 00 00 00 00 exit In kernel, a new kfunc __bpf_trap() is added. During insn verification, any hit with __bpf_trap() will result in verification failure. The kernel is able to provide better log message for debugging. With llvm patch [2] and without this patch (no __bpf_trap() kfunc for existing kernel), e.g., for old kernels, the verifier outputs 10: kfunc '__bpf_trap' is referenced but wasn't resolved Basically, kernel does not support __bpf_trap() kfunc. This still didn't give clear signals about possible reason. With llvm patch [2] and with this patch, the verifier outputs 10: (85) call __bpf_trap#74479 unexpected __bpf_trap() due to uninitialized variable? It gives much better hints for verification failure. [1] https://github.com/msune/clang_bpf/blob/main/Makefile#L3 [2] https://github.com/llvm/llvm-project/pull/131731 Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20250523205326.1291640-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 664a231d90aa450f9f6f029bee3a94dd08e1aac6 Merge: b1456f6dc167f7 54d14f25664bbb Author: Linus Torvalds Date: Tue May 27 09:53:02 2025 -0700 Merge tag 'x86_cache_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control updates from Borislav Petkov: "Carve out the resctrl filesystem-related code into fs/resctrl/ so that multiple architectures can share the fs API for manipulating their respective hw resource control implementation. This is the second step in the work towards sharing the resctrl filesystem interface, the next one being plugging ARM's MPAM into the aforementioned fs API" * tag 'x86_cache_for_v6.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) MAINTAINERS: Add reviewers for fs/resctrl x86,fs/resctrl: Move the resctrl filesystem code to live in /fs/resctrl x86/resctrl: Always initialise rid field in rdt_resources_all[] x86/resctrl: Relax some asm #includes x86/resctrl: Prefer alloc(sizeof(*foo)) idiom in rdt_init_fs_context() x86/resctrl: Squelch whitespace anomalies in resctrl core code x86/resctrl: Move pseudo lock prototypes to include/linux/resctrl.h x86/resctrl: Fix types in resctrl_arch_mon_ctx_{alloc,free}() stubs x86/resctrl: Move enum resctrl_event_id to resctrl.h x86/resctrl: Move the filesystem bits to headers visible to fs/resctrl fs/resctrl: Add boiler plate for external resctrl code x86/resctrl: Add 'resctrl' to the title of the resctrl documentation x86/resctrl: Split trace.h x86/resctrl: Expand the width of domid by replacing mon_data_bits x86/resctrl: Add end-marker to the resctrl_event_id enum x86/resctrl: Move is_mba_sc() out of core.c x86/resctrl: Drop __init/__exit on assorted symbols x86/resctrl: Resctrl_exit() teardown resctrl but leave the mount point x86/resctrl: Check all domains are offline in resctrl_exit() x86/resctrl: Rename resctrl_sched_in() to begin with "resctrl_arch_" ... commit d848bba68034847e39b82694be7fabed0e9d0d1e Author: Yonghong Song Date: Fri May 23 13:53:21 2025 -0700 bpf: Remove special_kfunc_set from verifier Currently, the verifier has both special_kfunc_set and special_kfunc_list. When adding a new kfunc usage to the verifier, it is often confusing about whether special_kfunc_set or special_kfunc_list or both should add that kfunc. For example, some kfuncs, e.g., bpf_dynptr_from_skb, bpf_dynptr_clone, bpf_wq_set_callback_impl, does not need to be in special_kfunc_set. To avoid potential future confusion, special_kfunc_set is deleted and btf_id_set_contains(&special_kfunc_set, ...) is removed. The code is refactored with a new func check_special_kfunc(), which contains all codes covered by original branch meta.btf == btf_vmlinux && btf_id_set_contains(&special_kfunc_set, meta.func_id) There is no functionality change. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20250523205321.1291431-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit db22b1382b96450967a7289900a22a70f073c9da Merge: 079e5c56a5c41d 7594dcb71ff87f Author: Alexei Starovoitov Date: Tue May 27 09:51:26 2025 -0700 Merge branch 'replace-config_dmabuf_sysfs_stats-with-bpf' T.J. Mercier says: ==================== Replace CONFIG_DMABUF_SYSFS_STATS with BPF Until CONFIG_DMABUF_SYSFS_STATS was added [1] it was only possible to perform per-buffer accounting with debugfs which is not suitable for production environments. Eventually we discovered the overhead with per-buffer sysfs file creation/removal was significantly impacting allocation and free times, and exacerbated kernfs lock contention. [2] dma_buf_stats_setup() is responsible for 39% of single-page buffer creation duration, or 74% of single-page dma_buf_export() duration when stressing dmabuf allocations and frees. I prototyped a change from per-buffer to per-exporter statistics with a RCU protected list of exporter allocations that accommodates most (but not all) of our use-cases and avoids almost all of the sysfs overhead. While that adds less overhead than per-buffer sysfs, and less even than the maintenance of the dmabuf debugfs_list, it's still *additional* overhead on top of the debugfs_list and doesn't give us per-buffer info. This series uses the existing dmabuf debugfs_list to implement a BPF dmabuf iterator, which adds no overhead to buffer allocation/free and provides per-buffer info. The list has been moved outside of CONFIG_DEBUG_FS scope so that it is always populated. The BPF program loaded by userspace that extracts per-buffer information gets to define its own interface which avoids the lack of ABI stability with debugfs. This will allow us to replace our use of CONFIG_DMABUF_SYSFS_STATS, and the plan is to remove it from the kernel after the next longterm stable release. [1] https://lore.kernel.org/linux-media/20201210044400.1080308-1-hridya@google.com [2] https://lore.kernel.org/all/20220516171315.2400578-1-tjmercier@google.com v1: https://lore.kernel.org/all/20250414225227.3642618-1-tjmercier@google.com v1 -> v2: Make the DMA buffer list independent of CONFIG_DEBUG_FS per Christian König Add CONFIG_DMA_SHARED_BUFFER check to kernel/bpf/Makefile per kernel test robot Use BTF_ID_LIST_SINGLE instead of BTF_ID_LIST_GLOBAL_SINGLE per Song Liu Fixup comment style, mixing code/declarations, and use ASSERT_OK_FD in selftest per Song Liu Add BPF_ITER_RESCHED feature to bpf_dmabuf_reg_info per Alexei Starovoitov Add open-coded iterator and selftest per Alexei Starovoitov Add a second test buffer from the system dmabuf heap to selftests Use the BPF program we'll use in production for selftest per Alexei Starovoitov https://r.android.com/c/platform/system/bpfprogs/+/3616123/2/dmabufIter.c https://r.android.com/c/platform/system/memory/libmeminfo/+/3614259/1/libdmabufinfo/dmabuf_bpf_stats.cpp v2: https://lore.kernel.org/all/20250504224149.1033867-1-tjmercier@google.com v2 -> v3: Rebase onto bpf-next/master Move get_next_dmabuf() into drivers/dma-buf/dma-buf.c, along with the new get_first_dmabuf(). This avoids having to expose the dmabuf list and mutex to the rest of the kernel, and keeps the dmabuf mutex operations near each other in the same file. (Christian König) Add Christian's RB to dma-buf: Rename debugfs symbols Drop RFC: dma-buf: Remove DMA-BUF statistics v3: https://lore.kernel.org/all/20250507001036.2278781-1-tjmercier@google.com v3 -> v4: Fix selftest BPF program comment style (not kdoc) per Alexei Starovoitov Fix dma-buf.c kdoc comment style per Alexei Starovoitov Rename get_first_dmabuf / get_next_dmabuf to dma_buf_iter_begin / dma_buf_iter_next per Christian König Add Christian's RB to bpf: Add dmabuf iterator v4: https://lore.kernel.org/all/20250508182025.2961555-1-tjmercier@google.com v4 -> v5: Add Christian's Acks to all patches Add Song Liu's Acks Move BTF_ID_LIST_SINGLE and DEFINE_BPF_ITER_FUNC closer to usage per Song Liu Fix open-coded iterator comment style per Song Liu Move iterator termination check to its own subtest per Song Liu Rework selftest buffer creation per Song Liu Fix spacing in sanitize_string per BPF CI v5: https://lore.kernel.org/all/20250512174036.266796-1-tjmercier@google.com v5 -> v6: Song Liu: Init test buffer FDs to -1 Zero-init udmabuf_create for future proofing Bail early for iterator fd/FILE creation failure Dereference char ptr to check for NUL in sanitize_string() Move map insertion from create_test_buffers() to test_dmabuf_iter() Add ACK to selftests/bpf: Add test for open coded dmabuf_iter v6: https://lore.kernel.org/all/20250513163601.812317-1-tjmercier@google.com v6 -> v7: Zero uninitialized name bytes following the end of name strings per s390x BPF CI Reorder sanitize_string bounds checks per Song Liu Add Song's Ack to: selftests/bpf: Add test for dmabuf_iter Rebase onto bpf-next/master per BPF CI ==================== Link: https://patch.msgid.link/20250522230429.941193-1-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit 7594dcb71ff87f9f0b11a13b32309c96960f880a Author: T.J. Mercier Date: Thu May 22 23:04:29 2025 +0000 selftests/bpf: Add test for open coded dmabuf_iter Use the same test buffers as the traditional iterator and a new BPF map to verify the test buffers can be found with the open coded dmabuf iterator. Signed-off-by: T.J. Mercier Acked-by: Christian König Acked-by: Song Liu Link: https://lore.kernel.org/r/20250522230429.941193-6-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit ae5d2c59ecd78df65254f4a40178b34f752bc1a9 Author: T.J. Mercier Date: Thu May 22 23:04:28 2025 +0000 selftests/bpf: Add test for dmabuf_iter This test creates a udmabuf, and a dmabuf from the system dmabuf heap, and uses a BPF program that prints dmabuf metadata with the new dmabuf_iter to verify they can be found. Signed-off-by: T.J. Mercier Acked-by: Christian König Acked-by: Song Liu Link: https://lore.kernel.org/r/20250522230429.941193-5-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit 6eab7ac7c5eea7628b92cd5f9427bbd963a954ec Author: T.J. Mercier Date: Thu May 22 23:04:27 2025 +0000 bpf: Add open coded dmabuf iterator This open coded iterator allows for more flexibility when creating BPF programs. It can support output in formats other than text. With an open coded iterator, a single BPF program can traverse multiple kernel data structures (now including dmabufs), allowing for more efficient analysis of kernel data compared to multiple reads from procfs, sysfs, or multiple traditional BPF iterator invocations. Signed-off-by: T.J. Mercier Acked-by: Christian König Acked-by: Song Liu Link: https://lore.kernel.org/r/20250522230429.941193-4-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit 76ea95534995adde1aa3cb1aa97ef33f50a617a9 Author: T.J. Mercier Date: Thu May 22 23:04:26 2025 +0000 bpf: Add dmabuf iterator The dmabuf iterator traverses the list of all DMA buffers. DMA buffers are refcounted through their associated struct file. A reference is taken on each buffer as the list is iterated to ensure each buffer persists for the duration of the bpf program execution without holding the list mutex. Signed-off-by: T.J. Mercier Reviewed-by: Christian König Acked-by: Song Liu Link: https://lore.kernel.org/r/20250522230429.941193-3-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit 89f9dba365e1b85caef556d28654c6d336629eef Author: T.J. Mercier Date: Thu May 22 23:04:25 2025 +0000 dma-buf: Rename debugfs symbols Rename the debugfs list and mutex so it's clear they are now usable without the need for CONFIG_DEBUG_FS. The list will always be populated to support the creation of a BPF iterator for dmabufs. Signed-off-by: T.J. Mercier Reviewed-by: Christian König Acked-by: Song Liu Link: https://lore.kernel.org/r/20250522230429.941193-2-tjmercier@google.com Signed-off-by: Alexei Starovoitov commit a784d606acbb22cd63d03d653f59f446d09df57d Merge: e3de7984e45155 63fe298652d4ed Author: Mark Brown Date: Tue May 27 17:33:01 2025 +0100 ASoC: codecs: wcd93xx: Few regulator supplies fixes Merge series from Krzysztof Kozlowski : Fix cleanup paths in wcd9335 and wcd937x codec drivers. commit 8f56770d114b0261bc8d69bbc7ce8ce0c196d630 Author: Maxim Levitsky Date: Mon May 12 14:04:07 2025 -0400 RISC-V: KVM: use kvm_trylock_all_vcpus when locking all vCPUs Use kvm_trylock_all_vcpus instead of a custom implementation when locking all vCPUs of a VM. Compile tested only. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Acked-by: Peter Zijlstra (Intel) Reviewed-by: Anup Patel Tested-by: Anup Patel Message-ID: <20250512180407.659015-7-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit b586c5d21954f203ba40c6120307d2e370c668d7 Author: Maxim Levitsky Date: Mon May 12 14:04:06 2025 -0400 KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs Use kvm_trylock_all_vcpus instead of a custom implementation when locking all vCPUs of a VM, to avoid triggering a lockdep warning, in the case in which the VM is configured to have more than MAX_LOCK_DEPTH vCPUs. This fixes the following false lockdep warning: [ 328.171264] BUG: MAX_LOCK_DEPTH too low! [ 328.175227] turning off the locking correctness validator. [ 328.180726] Please attach the output of /proc/lock_stat to the bug report [ 328.187531] depth: 48 max: 48! [ 328.190678] 48 locks held by qemu-kvm/11664: [ 328.194957] #0: ffff800086de5ba0 (&kvm->lock){+.+.}-{3:3}, at: kvm_ioctl_create_device+0x174/0x5b0 [ 328.204048] #1: ffff0800e78800b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.212521] #2: ffff07ffeee51e98 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.220991] #3: ffff0800dc7d80b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.229463] #4: ffff07ffe0c980b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.237934] #5: ffff0800a3883c78 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.246405] #6: ffff07fffbe480b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Acked-by: Marc Zyngier Acked-by: Peter Zijlstra (Intel) Message-ID: <20250512180407.659015-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c560bc9286e66713819c2f30b9ff32ee79d7f75e Author: Maxim Levitsky Date: Mon May 12 14:04:05 2025 -0400 x86: KVM: SVM: use kvm_lock_all_vcpus instead of a custom implementation Use kvm_lock_all_vcpus instead of sev's own implementation. Because kvm_lock_all_vcpus uses the _nest_lock feature of lockdep, which ignores subclasses, there is no longer a need to use separate subclasses for source and target VMs. No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Acked-by: Peter Zijlstra (Intel) Message-ID: <20250512180407.659015-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit e4a454ced74c0ac97c8bd32f086ee3ad74528780 Author: Maxim Levitsky Date: Mon May 12 14:04:04 2025 -0400 KVM: add kvm_lock_all_vcpus and kvm_trylock_all_vcpus In a few cases, usually in the initialization code, KVM locks all vCPUs of a VM to ensure that userspace doesn't do funny things while KVM performs an operation that affects the whole VM. Until now, all these operations were implemented using custom code, and all of them share the same problem: Lockdep can't cope with simultaneous locking of a large number of locks of the same class. However if these locks are taken while another lock is already held, which is luckily the case, it is possible to take advantage of little known _nest_lock feature of lockdep which allows in this case to have an unlimited number of locks of same class to be taken. To implement this, create two functions: kvm_lock_all_vcpus() and kvm_trylock_all_vcpus() Both functions are needed because some code that will be replaced in the subsequent patches, uses mutex_trylock, instead of regular mutex_lock. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Acked-by: Marc Zyngier Acked-by: Peter Zijlstra (Intel) Message-ID: <20250512180407.659015-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit fb49f07ba1d9d8c9bd8854878ae6b5b21ff9ac45 Author: Maxim Levitsky Date: Mon May 12 14:04:03 2025 -0400 locking/mutex: implement mutex_lock_killable_nest_lock KVM's SEV intra-host migration code needs to lock all vCPUs of the source and the target VM, before it proceeds with the migration. The number of vCPUs that belong to each VM is not bounded by anything except a self-imposed KVM limit of CONFIG_KVM_MAX_NR_VCPUS vCPUs which is significantly larger than the depth of lockdep's lock stack. Luckily, the locks in both of the cases mentioned above, are held under the 'kvm->lock' of each VM, which means that we can use the little known lockdep feature called a "nest_lock" to support this use case in a cleaner way, compared to the way it's currently done. Implement and expose 'mutex_lock_killable_nest_lock' for this purpose. Signed-off-by: Maxim Levitsky Acked-by: Peter Zijlstra (Intel) Message-ID: <20250512180407.659015-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c5b6ababd21ab6bb251e5a2b4db110e76fb00a26 Author: Maxim Levitsky Date: Mon May 12 14:04:02 2025 -0400 locking/mutex: implement mutex_trylock_nested Despite the fact that several lockdep-related checks are skipped when calling trylock* versions of the locking primitives, for example mutex_trylock, each time the mutex is acquired, a held_lock is still placed onto the lockdep stack by __lock_acquire() which is called regardless of whether the trylock* or regular locking API was used. This means that if the caller successfully acquires more than MAX_LOCK_DEPTH locks of the same class, even when using mutex_trylock, lockdep will still complain that the maximum depth of the held lock stack has been reached and disable itself. For example, the following error currently occurs in the ARM version of KVM, once the code tries to lock all vCPUs of a VM configured with more than MAX_LOCK_DEPTH vCPUs, a situation that can easily happen on modern systems, where having more than 48 CPUs is common, and it's also common to run VMs that have vCPU counts approaching that number: [ 328.171264] BUG: MAX_LOCK_DEPTH too low! [ 328.175227] turning off the locking correctness validator. [ 328.180726] Please attach the output of /proc/lock_stat to the bug report [ 328.187531] depth: 48 max: 48! [ 328.190678] 48 locks held by qemu-kvm/11664: [ 328.194957] #0: ffff800086de5ba0 (&kvm->lock){+.+.}-{3:3}, at: kvm_ioctl_create_device+0x174/0x5b0 [ 328.204048] #1: ffff0800e78800b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.212521] #2: ffff07ffeee51e98 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.220991] #3: ffff0800dc7d80b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.229463] #4: ffff07ffe0c980b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.237934] #5: ffff0800a3883c78 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 [ 328.246405] #6: ffff07fffbe480b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0 Luckily, in all instances that require locking all vCPUs, the 'kvm->lock' is taken a priori, and that fact makes it possible to use the little known feature of lockdep, called a 'nest_lock', to avoid this warning and subsequent lockdep self-disablement. The action of 'nested lock' being provided to lockdep's lock_acquire(), causes the lockdep to detect that the top of the held lock stack contains a lock of the same class and then increment its reference counter instead of pushing a new held_lock item onto that stack. See __lock_acquire for more information. Signed-off-by: Maxim Levitsky Acked-by: Peter Zijlstra (Intel) Message-ID: <20250512180407.659015-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 4e02d4f9734fa55e3eb18be9b759cd42d93497ec Merge: 3e89d5fdc70fa9 72df72e1c6ddfb Author: Paolo Bonzini Date: Tue May 27 12:15:49 2025 -0400 Merge tag 'kvm-x86-svm-6.16' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.16: - Wait for target vCPU to acknowledge KVM_REQ_UPDATE_PROTECTED_GUEST_STATE to fix a race between AP destroy and VMRUN. - Decrypt and dump the VMSA in dump_vmcb() if debugging enabled for the VM. - Add support for ALLOWED_SEV_FEATURES. - Add #VMGEXIT to the set of handlers special cased for CONFIG_RETPOLINE=y. - Treat DEBUGCTL[5:2] as reserved to pave the way for virtualizing features that utilize those bits. - Don't account temporary allocations in sev_send_update_data(). - Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM, via Bus Lock Threshold. commit 3e89d5fdc70fa92710ca581a6df96dcb2c8bf9e1 Merge: 3e0797f6dd7817 907092bf7cbdde Author: Paolo Bonzini Date: Tue May 27 12:15:38 2025 -0400 Merge tag 'kvm-x86-vmx-6.16' of https://github.com/kvm-x86/linux into HEAD KVM VMX changes for 6.16: - Explicitly check MSR load/store list counts to fix a potential overflow on 32-bit kernels. - Flush shadow VMCSes on emergency reboot. - Revert mem_enc_ioctl() back to an optional hook, as it's nullified when SEV or TDX is disabled via Kconfig. - Macrofy the handling of vt_x86_ops to eliminate a pile of boilerplate code needed for TDX, and to optimize CONFIG_KVM_INTEL_TDX=n builds. commit 3e0797f6dd78178758ea33c3e82fc079079cf772 Merge: db44dcbdf814fa d166453ebd2925 Author: Paolo Bonzini Date: Tue May 27 12:15:26 2025 -0400 Merge tag 'kvm-x86-selftests-6.16' of https://github.com/kvm-x86/linux into HEAD KVM selftests changes for 6.16: - Add support for SNP to the various SEV selftests. - Add a selftest to verify fastops instructions via forced emulation. - Add MGLRU support to the access tracking perf test. commit db44dcbdf814fa035a9c7a8d7485a963b8001578 Merge: 5d816c13995872 edaf3eded38625 Author: Paolo Bonzini Date: Tue May 27 12:15:01 2025 -0400 Merge tag 'kvm-x86-pir-6.16' of https://github.com/kvm-x86/linux into HEAD KVM x86 posted interrupt changes for 6.16: Refine and optimize KVM's software processing of the PIR, and ultimately share PIR harvesting code between KVM and the kernel's Posted MSI handler commit 5d816c139958725a738ca8a39d9979c707d0d8ae Merge: ebd38b26ecb52b 6a3d704959bd04 Author: Paolo Bonzini Date: Tue May 27 12:14:47 2025 -0400 Merge tag 'kvm-x86-mmu-6.16' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.16: - Refine and harden handling of spurious faults. - Use kvm_x86_call() instead of open coding static_call(). commit ebd38b26ecb52bc000e794cc6fef8f8af673ab48 Merge: cd1be30b44d930 37d8bad41d2b0a Author: Paolo Bonzini Date: Tue May 27 12:14:36 2025 -0400 Merge tag 'kvm-x86-misc-6.16' of https://github.com/kvm-x86/linux into HEAD KVM x86 misc changes for 6.16: - Unify virtualization of IBRS on nested VM-Exit, and cross-vCPU IBPB, between SVM and VMX. - Advertise support to userspace for WRMSRNS and PREFETCHI. - Rescan I/O APIC routes after handling EOI that needed to be intercepted due to the old/previous routing, but not the new/current routing. - Add a module param to control and enumerate support for device posted interrupts. - Misc cleanups. commit 39d86db34e41b96bd86f1955cd0ce6cd9c5fca4c Author: Ming Lei Date: Tue May 27 23:34:05 2025 +0800 loop: add file_start_write() and file_end_write() file_start_write() and file_end_write() should be added around ->write_iter(). Recently we switch to ->write_iter() from vfs_iter_write(), and the implied file_start_write() and file_end_write() are lost. Also we never add them for dio code path, so add them back for covering both. Cc: Jeff Moyer Fixes: f2fed441c69b ("loop: stop using vfs_iter_{read,write} for buffered I/O") Fixes: bc07c10a3603 ("block: loop: support DIO & AIO") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250527153405.837216-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit cd1be30b44d930d8082618cd8f8c57e87758fe33 Author: Edward Adam Davis Date: Tue May 27 16:44:37 2025 +0800 KVM: VMX: use __always_inline for is_td_vcpu and is_td is_td() and is_td_vcpu() are used in no-instrumentation sections; use __always_inline instead of inline. vmlinux.o: error: objtool: vmx_handle_nmi+0x47: call to is_td_vcpu.isra.0() leaves .noinstr.text section Fixes: 7172c753c26a ("KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a struct") Signed-off-by: Edward Adam Davis Message-ID: Signed-off-by: Paolo Bonzini commit eda4623cf989d033c07355be1469e44f321ce8ae Author: Pavel Begunkov Date: Tue May 27 16:27:57 2025 +0100 io_uring/zcrx: init id for xa_find xa_find() interprets id as the lower bound and thus expects it initialised. Reported-by: syzbot+c3ff04150c30d3df0f57@syzkaller.appspotmail.com Fixes: 76f1cc98b23ce ("io_uring/zcrx: add support for multiple ifqs") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/faea44ef63131e6968f635e1b6b7ca6056f1f533.1748359655.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b1456f6dc167f7f101746e495bede2bac3d0e19f Merge: 6376c0770656f3 6c58d2791d6046 Author: Linus Torvalds Date: Tue May 27 09:04:15 2025 -0700 Merge tag 'timers-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer core updates from Thomas Gleixner: "Updates for the time/timer core code: - Rework the initialization of the posix-timer kmem_cache and move the cache pointer into the timer_data structure to prevent false sharing - Switch the alarmtimer code to lock guards - Improve the CPU selection criteria in the per CPU validation of the clocksource watchdog to avoid arbitrary selections (or omissions) on systems with a small number of CPUs - The usual cleanups and improvements" * tag 'timers-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/nohz: Remove unused tick_nohz_full_add_cpus_to() clocksource: Fix the CPUs' choice in the watchdog per CPU verification alarmtimer: Switch spin_{lock,unlock}_irqsave() to guards alarmtimer: Remove dead return value in clock2alarm() time/jiffies: Change register_refined_jiffies() to void __init timers: Remove unused __round_jiffies(_up) posix-timers: Initialize cache early and move pointer into __timer_data commit 6376c0770656f3bdf7f411faf068371b6932aeca Merge: 5e8bbb2caa4e67 29857e6f4e30b4 Author: Linus Torvalds Date: Tue May 27 09:01:26 2025 -0700 Merge tag 'timers-clocksource-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull clocksource updates from Thomas Gleixner: "Updates for clocksource/clockevent drivers: - The final conversion of text formatted device tree binding to schemas - A new driver fot the System Timer Module on S32G NXP SoCs - A new driver fot the Econet HPT timer - The usual improvements and device tree binding updates" * tag 'timers-clocksource-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) clocksource/drivers/renesas-ostm: Unconditionally enable reprobe support dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support dt-bindings: timer: Convert marvell,armada-370-timer to DT schema dt-bindings: timer: Convert ti,keystone-timer to DT schema dt-bindings: timer: Convert st,spear-timer to DT schema dt-bindings: timer: Convert socionext,milbeaut-timer to DT schema dt-bindings: timer: Convert snps,arc-timer to DT schema dt-bindings: timer: Convert snps,archs-rtc to DT schema dt-bindings: timer: Convert snps,archs-gfrc to DT schema dt-bindings: timer: Convert lsi,zevio-timer to DT schema dt-bindings: timer: Convert jcore,pit to DT schema dt-bindings: timer: Convert img,pistachio-gptimer to DT schema dt-bindings: timer: Convert ezchip,nps400-timer to DT schema dt-bindings: timer: Convert cirrus,clps711x-timer to DT schema dt-bindings: timer: Convert altr,timer-1.0 to DT schema dt-bindings: timer: Add ESWIN EIC7700 CLINT clocksource/drivers: Add EcoNet Timer HPT driver dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer dt-bindings: timer: Convert arm,mps2-timer to DT schema dt-bindings: timer: Add Sophgo SG2044 ACLINT timer ... commit 5e8bbb2caa4e679c8e3d4815ed8515d825af6fab Merge: 44ed0f35df343d aad823aa3a7d67 Author: Linus Torvalds Date: Tue May 27 08:31:21 2025 -0700 Merge tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer cleanups from Thomas Gleixner: "Another set of timer API cleanups: - Convert init_timer*(), try_to_del_timer_sync() and destroy_timer_on_stack() over to the canonical timer_*() namespace convention. There is another large conversion pending, which has not been included because it would have caused a gazillion of merge conflicts in next. The conversion scripts will be run towards the end of the merge window and a pull request sent once all conflict dependencies have been merged" * tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: treewide, timers: Rename destroy_timer_on_stack() as timer_destroy_on_stack() treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try() timers: Rename init_timers() as timers_init() timers: Rename NEXT_TIMER_MAX_DELTA as TIMER_NEXT_MAX_DELTA timers: Rename __init_timer_on_stack() as __timer_init_on_stack() timers: Rename __init_timer() as __timer_init() timers: Rename init_timer_on_stack_key() as timer_init_key_on_stack() timers: Rename init_timer_key() as timer_init_key() commit dc3e0f17f74558e8a2fce00608855f050de10230 Author: Namjae Jeon Date: Tue May 27 11:23:01 2025 +0900 ksmbd: allow a filename to contain special characters on SMB3.1.1 posix extension If client send SMB2_CREATE_POSIX_CONTEXT to ksmbd, Allow a filename to contain special characters. Reported-by: Philipp Kerling Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 571781eb7ffefa65b0e922c8031e42b4411a40d4 Author: Namjae Jeon Date: Wed May 21 09:02:29 2025 +0900 ksmbd: provide zero as a unique ID to the Mac client The Mac SMB client code seems to expect the on-disk file identifier to have the semantics of HFS+ Catalog Node Identifier (CNID). ksmbd provides the inode number as a unique ID to the client, but in the case of subvolumes of btrfs, there are cases where different files have the same inode number, so the mac smb client treats it as an error. There is a report that a similar problem occurs when the share is ZFS. Returning UniqueId of zero will make the Mac client to stop using and trusting the file id returned from the server. Reported-by: Justin Turner Arthur Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 44ed0f35df343d00b8d38006854f96e333104a66 Merge: 2bd1bea5fa6aa7 4e7bca76e3fed5 Author: Linus Torvalds Date: Tue May 27 08:15:26 2025 -0700 Merge tag 'irq-msi-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull MSI updates from Thomas Gleixner: "Updates for the MSI subsystem (core code and PCI): - Switch the MSI descriptor locking to lock guards - Replace a broken and naive implementation of PCI/MSI-X control word updates in the PCI/TPH driver with a properly serialized variant in the PCI/MSI core code. - Remove the MSI descriptor abuse in the SCCI/UFS/QCOM driver by replacing the direct access to the MSI descriptors with the proper API function calls. People will never understand that APIs exist for a reason... - Provide core infrastructre for the upcoming PCI endpoint library extensions. Currently limited to ARM GICv3+, but in theory extensible to other architectures. - Provide a MSI domain::teardown() callback, which allows drivers to undo the effects of the prepare() callback. - Move the MSI domain::prepare() callback invocation to domain creation time to avoid redundant (and in case of ARM/GIC-V3-ITS confusing) invocations on every allocation. In combination with the new teardown callback this removes some ugly hacks in the GIC-V3-ITS driver, which pretended to work around the short comings of the core code so far. With this update the code is correct by design and implementation. - Make the irqchip MSI library globally available, provide a MSI parent domain creation helper and convert a bunch of (PCI/)MSI drivers over to the modern MSI parent mechanism. This is the first step to get rid of at least one incarnation of the three PCI/MSI management schemes. - The usual small cleanups and improvements" * tag 'irq-msi-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) PCI/MSI: Use bool for MSI enable state tracking PCI: tegra: Convert to MSI parent infrastructure PCI: xgene: Convert to MSI parent infrastructure PCI: apple: Convert to MSI parent infrastructure irqchip/msi-lib: Honour the MSI_FLAG_NO_AFFINITY flag irqchip/mvebu: Convert to msi_create_parent_irq_domain() helper irqchip/gic: Convert to msi_create_parent_irq_domain() helper genirq/msi: Add helper for creating MSI-parent irq domains irqchip: Make irq-msi-lib.h globally available irqchip/gic-v3-its: Use allocation size from the prepare call genirq/msi: Engage the .msi_teardown() callback on domain removal genirq/msi: Move prepare() call to per-device allocation irqchip/gic-v3-its: Implement .msi_teardown() callback genirq/msi: Add .msi_teardown() callback as the reverse of .msi_prepare() irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable() platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() genirq/msi: Rename msi_[un]lock_descs() ... commit 2bd1bea5fa6aa79bc563a57919730eb809651b28 Merge: c0f182c979cfea 38c1e73fdeb379 Author: Linus Torvalds Date: Tue May 27 08:07:32 2025 -0700 Merge tag 'irq-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq cleanups from Thomas Gleixner: "A set of cleanups for the generic interrupt subsystem: - Consolidate on one set of functions for the interrupt domain code to get rid of pointlessly duplicated code with only marginal different semantics. - Update the documentation accordingly and consolidate the coding style of the irqdomain header" * tag 'irq-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) irqdomain: Consolidate coding style irqdomain: Fix kernel-doc and add it to Documentation Documentation: irqdomain: Update it Documentation: irq-domain.rst: Simple improvements Documentation: irq/concepts: Minor improvements Documentation: irq/concepts: Add commas and reflow irqdomain: Improve kernel-docs of functions irqdomain: Make struct irq_domain_info variables const irqdomain: Use irq_domain_instantiate()'s return value as initializers irqdomain: Drop irq_linear_revmap() pinctrl: keembay: Switch to irq_find_mapping() irqchip/armada-370-xp: Switch to irq_find_mapping() gpu: ipu-v3: Switch to irq_find_mapping() gpio: idt3243x: Switch to irq_find_mapping() sh: Switch to irq_find_mapping() powerpc: Switch to irq_find_mapping() irqdomain: Drop irq_domain_add_*() functions powerpc: Switch irq_domain_add_nomap() to use fwnode thermal: Switch to irq_domain_create_linear() soc: Switch to irq_domain_create_*() ... commit c0f182c979cfead8fff08108a11fbd2fe885dd33 Merge: 60c1d948f79dc6 3e402acd5c4f9d Author: Linus Torvalds Date: Tue May 27 08:00:46 2025 -0700 Merge tag 'irq-drivers-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq controller updates from Thomas Gleixner: "Update for interrupt chip drivers: - Convert the generic interrupt chip to lock guards to remove copy & pasta boilerplate code and gotos. - A new driver fot the interrupt controller in the EcoNet EN751221 MIPS SoC. - Extend the SG2042-MSI driver to support the new SG2044 SoC - Updates and cleanups for the (ancient) VT8500 driver - Improve the scalability of the ARM GICV4.1 ITS driver by utilizing node local copies a VM's interrupt translation table when possible. This results in a 12% reduction of VM IPI latency in certain workloads. - The usual cleanups and improvements all over the place" * tag 'irq-drivers-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) irqchip/irq-pruss-intc: Simplify chained interrupt handler setup irqchip/gic-v4.1: Use local 4_1 ITS to generate VSGI irqchip/econet-en751221: Switch to of_fwnode_handle() irqchip/irq-vt8500: Switch to irq_domain_create_*() irqchip/econet-en751221: Switch to irq_domain_create_linear() irqchip/irq-vt8500: Use fewer global variables and add error handling irqchip/irq-vt8500: Use a dedicated chained handler function irqchip/irq-vt8500: Don't require 8 interrupts from a chained controller irqchip/irq-vt8500: Drop redundant copy of the device node pointer irqchip/irq-vt8500: Split up ack/mask functions irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack() irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller irqchip/sg2042-msi: Introduce configurable chipinfo for SG2042 irqchip/sg2042-msi: Rename functions and data structures to be SG2042 agnostic dt-bindings: interrupt-controller: Add Sophgo SG2044 MSI controller genirq/generic-chip: Fix incorrect lock guard conversions genirq/generic-chip: Remove unused lock wrappers irqchip: Convert generic irqchip locking to guards gpio: mvebu: Convert generic irqchip locking to guard() ARM: orion/gpio:: Convert generic irqchip locking to guard() ... commit 60c1d948f79dc6626bf2fe4f2d2fba51e18a1e04 Merge: 0c1494015fea09 a510bb87da72aa Author: Linus Torvalds Date: Tue May 27 07:46:58 2025 -0700 Merge tag 'irq-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq core updates from Thomas Gleixner: "Updates for the generic interrupt subsystem core code: - Address a long standing subtle problem in the CPU hotplug code for affinity-managed interrupts. Affinity-managed interrupts are shut down by the core code when the last CPU in the affinity set goes offline and started up again when the first CPU in the affinity set becomes online again. This unfortunately does not take into account whether an interrupt has been disabled before the last CPU goes offline and starts up the interrupt unconditionally when the first CPU becomes online again. That's obviously not what drivers expect. Address this by preserving the disabled state for affinity-managed interrupts accross these CPU hotplug operations. All non-managed interrupts are not affected by this because startup/shutdown is coupled to request/free_irq() which obviously has to reset state. - Support three-cell scheme interrupts to allow GPIO drivers to specify interrupts from an already existing scheme - Switch the interrupt subsystem core to lock guards. This gets rid of quite some copy & pasta boilerplate code all over the place. - The usual small cleanups and improvements all over the place" * tag 'irq-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (59 commits) genirq/irqdesc: Remove double locking in hwirq_show() genirq: Retain disable depth for managed interrupts across CPU hotplug genirq: Bump the size of the local variable for sprintf() genirq/manage: Use the correct lock guard in irq_set_irq_wake() genirq: Consistently use '%u' format specifier for unsigned int variables genirq: Ensure flags in lock guard is consistently initialized genirq: Fix inverted condition in handle_nested_irq() genirq/cpuhotplug: Fix up lock guards conversion brainf..t genirq: Use scoped_guard() to shut clang up genirq: Remove unused remove_percpu_irq() genirq: Remove irq_[get|put]_desc*() genirq/manage: Rework irq_set_irqchip_state() genirq/manage: Rework irq_get_irqchip_state() genirq/manage: Rework teardown_percpu_nmi() genirq/manage: Rework prepare_percpu_nmi() genirq/manage: Rework disable_percpu_irq() genirq/manage: Rework irq_percpu_is_enabled() genirq/manage: Rework enable_percpu_irq() genirq/manage: Rework irq_set_parent() genirq/manage: Rework can_request_irq() ... commit 0c1494015fea0935fbf6cd9d99c008fcbe1e4165 Merge: 914873bc7df913 8278fd6006a02e Author: Linus Torvalds Date: Tue May 27 07:44:22 2025 -0700 Merge tag 'core-entry-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core entry code updates from Thomas Gleixner: "Updates for the generic and architecture entry code: - Move LoongArch and RISC-V ret_from_fork() implementations to C code so that syscall_exit_user_mode() can be inlined - Split the RISC-V ret_from_fork() implementation into return to user and return to kernel, which gives a measurable performance improvement - Inline syscall_exit_user_mode() which benefits all architectures by avoiding a function call and letting the compiler do better optimizations" * tag 'core-entry-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: LoongArch: entry: Fix include order entry: Inline syscall_exit_to_user_mode() LoongArch: entry: Migrate ret_from_fork() to C riscv: entry: Split ret_from_fork() into user and kernel riscv: entry: Convert ret_from_fork() to C commit 9d4f22fd563e0cd02e8448e84d057e7c0132a586 Author: Peter Hilber Date: Fri May 9 18:07:25 2025 +0200 virtio_rtc: Add RTC class driver Expose the virtio-rtc UTC-like clock as an RTC clock to userspace - if it is present, and if it does not step on leap seconds. The RTC class enables the virtio-rtc device to resume the system from sleep states on RTC alarm. Support RTC alarm if the virtio-rtc alarm feature is present. The virtio-rtc device signals an alarm by marking an alarmq buffer as used. Peculiarities ------------- A virtio-rtc clock is a bit special for an RTC clock in that - the clock may step (also backwards) autonomously at any time and - the device, and its notification mechanism, will be reset during boot or resume from sleep. The virtio-rtc device avoids that the driver might miss an alarm. The device signals an alarm whenever the clock has reached or passed the alarm time, and also when the device is reset (on boot or resume from sleep), if the alarm time is in the past. Open Issue ---------- The CLOCK_BOOTTIME_ALARM will use the RTC clock to wake up from sleep, and implicitly assumes that no RTC clock steps will occur during sleep. The RTC class driver does not know whether the current alarm is a real-time alarm or a boot-time alarm. Perhaps this might be handled by the driver also setting a virtio-rtc monotonic alarm (which uses a clock similar to CLOCK_BOOTTIME_ALARM). The virtio-rtc monotonic alarm would just be used to wake up in case it was a CLOCK_BOOTTIME_ALARM alarm. Otherwise, the behavior should not differ from other RTC class drivers. Signed-off-by: Peter Hilber Acked-by: Alexandre Belloni Message-Id: <20250509160734.1772-5-quic_philber@quicinc.com> Signed-off-by: Michael S. Tsirkin commit e2ef16757bbe1d4566093179944e9ebe730b2701 Author: Peter Hilber Date: Fri May 9 18:07:24 2025 +0200 virtio_rtc: Add Arm Generic Timer cross-timestamping For platforms using the Arm Generic Timer, add precise cross-timestamping support to virtio_rtc. Always report the CP15 virtual counter as the HW counter in use by arm_arch_timer, since the Linux kernel's usage of the Arm Generic Timer should always be compatible with this. Signed-off-by: Peter Hilber Message-Id: <20250509160734.1772-4-quic_philber@quicinc.com> Signed-off-by: Michael S. Tsirkin commit 9a17125a18f9ae1e1233a8e2d919059445b9d6fd Author: Peter Hilber Date: Fri May 9 18:07:23 2025 +0200 virtio_rtc: Add PTP clocks Expose the virtio_rtc clocks as PTP clocks to userspace, similar to ptp_kvm. virtio_rtc can expose multiple clocks, e.g. a UTC clock and a monotonic clock. Userspace should distinguish different clocks through the name assigned by the driver. In particular, UTC-like clocks can also be distinguished by if and how leap seconds are smeared. udev rules such as the following can be used to get different symlinks for different clock types: SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 0/variant 0", SYMLINK += "ptp_virtio" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 1/variant 0", SYMLINK += "ptp_virtio_tai" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 2/variant 0", SYMLINK += "ptp_virtio_monotonic" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 3/variant 0", SYMLINK += "ptp_virtio_smear_unspecified" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 3/variant 1", SYMLINK += "ptp_virtio_smear_noon_linear" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 3/variant 2", SYMLINK += "ptp_virtio_smear_sls" SUBSYSTEM=="ptp", ATTR{clock_name}=="Virtio PTP type 4/variant 0", SYMLINK += "ptp_virtio_maybe_smeared" The preferred PTP clock reading method is ioctl PTP_SYS_OFFSET_PRECISE2, through the ptp_clock_info.getcrosststamp() op. For now, PTP_SYS_OFFSET_PRECISE2 will return -EOPNOTSUPP through a weak function. PTP_SYS_OFFSET_PRECISE2 requires cross-timestamping support for specific clocksources, which will be added in the following. If the clocksource specific code is enabled, check that the Virtio RTC device supports the respective HW counter before obtaining an actual cross-timestamp from the Virtio device. The Virtio RTC device response time may be higher than the timekeeper seqcount increment interval. Therefore, obtain the cross-timestamp before calling get_device_system_crosststamp(). As a fallback, support the ioctl PTP_SYS_OFFSET_EXTENDED2 for all platforms. Assume that concurrency issues during PTP clock removal are avoided by the posix_clock framework. Kconfig recursive dependencies prevent virtio_rtc from implicitly enabling PTP_1588_CLOCK, therefore just warn the user if PTP_1588_CLOCK is not available. Since virtio_rtc should in the future also expose clocks as RTC class devices, do not depend VIRTIO_RTC on PTP_1588_CLOCK. Signed-off-by: Peter Hilber Message-Id: <20250509160734.1772-3-quic_philber@quicinc.com> Signed-off-by: Michael S. Tsirkin commit 0623c759276885c3ae88197ba6fb5c9c6ba8612f Author: Peter Hilber Date: Fri May 9 18:07:22 2025 +0200 virtio_rtc: Add module and driver core Add the virtio_rtc module and driver core. The virtio_rtc module implements a driver compatible with the proposed Virtio RTC device specification. The Virtio RTC (Real Time Clock) device provides information about current time. The device can provide different clocks, e.g. for the UTC or TAI time standards, or for physical time elapsed since some past epoch. The driver can read the clocks with simple or more accurate methods. Implement the core, which interacts with the Virtio RTC device. Apart from this, the core does not expose functionality outside of the virtio_rtc module. Follow-up patches will expose PTP clocks and an RTC Class device. Provide synchronous messaging, which is enough for the expected time synchronization use cases through PTP clocks (similar to ptp_kvm) or RTC Class device. Signed-off-by: Peter Hilber Message-Id: <20250509160734.1772-2-quic_philber@quicinc.com> Signed-off-by: Michael S. Tsirkin commit 169294a14b3f80ce184fe832ff640b67a1b9eb3b Author: Christoph Hellwig Date: Thu May 1 09:22:30 2025 -0500 vringh: use bvec_kmap_local Use the bvec_kmap_local helper rather than digging into the bvec internals. Signed-off-by: Christoph Hellwig Message-Id: <20250501142244.2888227-1-hch@lst.de> Signed-off-by: Michael S. Tsirkin Reviewed-by: Chaitanya Kulkarni commit 8b3f9967b1fd481ed932f453c38aec99f3c90d95 Author: Kees Cook Date: Fri Apr 25 23:22:15 2025 -0700 vhost: vringh: Use matching allocation type in resize_iovec() In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct kvec *", but the returned type will be "struct iovec *". These have the same allocation size, so there is no bug: struct kvec { void *iov_base; /* and that should *never* hold a userland pointer */ size_t iov_len; }; struct iovec { void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ }; Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Message-Id: <20250426062214.work.334-kees@kernel.org> Signed-off-by: Michael S. Tsirkin commit 9ef41ebf787fcbde99ac404ae473f8467641f983 Author: Israel Rukshin Date: Tue Apr 22 13:33:45 2025 +0300 virtio-pci: Fix result size returned for the admin command completion The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes larger than the actual result data size. This occurs because the result_sg_size field of the command is filled with the result length from virtqueue_get_buf(), which includes both the data size and an additional 8 bytes of status. This oversized result size causes two issues: 1. The state transferred to the destination includes 8 bytes of extra data at the end. 2. The allocated buffer in the kernel may be smaller than the returned size, leading to failures when reading beyond the allocated size. The commit fixes this by subtracting the status size from the result of virtqueue_get_buf(). This fix has been tested through live migrations with virtio-net, virtio-net-transitional, and virtio-blk devices. Fixes: 704806ca400e ("virtio: Extend the admin command to include the result size") Signed-off-by: Israel Rukshin Reviewed-by: Parav Pandit Reviewed-by: Max Gurtovoy Message-Id: <1745318025-23103-1-git-send-email-israelr@nvidia.com> Signed-off-by: Michael S. Tsirkin commit eec812774d307f0beee12f7129a440ad314a544a Author: Philipp Stanner Date: Thu May 8 10:51:35 2025 +0200 vdpa/octeon_ep: Control PCI dev enabling manually PCI region request functions such as pci_request_region() currently have the problem of becoming sometimes managed functions, if pcim_enable_device() instead of pci_enable_device() was called. The PCI subsystem wants to remove this deprecated behavior from its interfaces. octeopn_ep enables its device with pcim_enable_device() (for VF. PF uses manual management), but does so only to get automatic disablement. The driver wants to manage its PCI resources for VF manually, without devres. The easiest way not to use automatic resource management at all is by also handling device enable- and disablement manually. Replace pcim_enable_device() with pci_enable_device(). Add the necessary calls to pci_disable_device(). Signed-off-by: Philipp Stanner Acked-by: Vamsi Attunuru Message-Id: <20250508085134.24084-2-phasta@kernel.org> Signed-off-by: Michael S. Tsirkin Tested-by: Lei Yang Signed-off-by: Philipp Stanner <phasta@kernel.org>
Acked-by: Vamsi Attunuru <vattunuru@marvell.com>
commit ed5915cfce2abb9a553c3737badebd4a11d6c9c7 Author: Joonas Lahtinen Date: Thu May 22 09:41:27 2025 +0300 Revert "drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1" This reverts commit d6e020819612a4a06207af858e0978be4d3e3140. The IS_DGFX check was put in place because error capture of buffer objects is expected to be broken on devices with VRAM. Userspace fix[1] to the impacted media driver has been submitted, merged and a new driver release is out as 25.2.3 where the capture flag is dropped on DG1 thus unblocking the usage of media driver on DG1. [1] https://github.com/intel/media-driver/commit/93c07d9b4b96a78bab21f6acd4eb863f4313ea4a Cc: stable@vger.kernel.org # v6.0+ Cc: Ville Syrjälä Cc: Andi Shyti Cc: Matthew Auld Cc: Thomas Hellström Cc: Tvrtko Ursulin Acked-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20250522064127.24293-1-joonas.lahtinen@linux.intel.com [Joonas: Update message to point out the merged userspace fix] Signed-off-by: Joonas Lahtinen (cherry picked from commit d2dc30e0aa252830f908c8e793d3139d51321370) Signed-off-by: Joonas Lahtinen commit 25eeba495b2fc16037647c1a51bcdf6fc157af5c Author: Ville Syrjälä Date: Mon May 12 21:22:15 2025 +0200 drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1 The intel-media-driver is currently broken on DG1 because it uses EXEC_CAPTURE with recovarable contexts. Relax the check to allow that. I've also submitted a fix for the intel-media-driver: https://github.com/intel/media-driver/pull/1920 Cc: stable@vger.kernel.org # v6.0+ Cc: Matthew Auld Cc: Thomas Hellström Testcase: igt/gem_exec_capture/capture-invisible Fixes: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts") Reviewed-by: Andi Shyti Signed-off-by: Ville Syrjälä Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250411144313.11660-2-ville.syrjala@linux.intel.com (cherry picked from commit d6e020819612a4a06207af858e0978be4d3e3140) Signed-off-by: Joonas Lahtinen commit 208c1559c5b18894e3380b3807b6364bd14f7584 Author: Mingzhe Zou Date: Tue May 27 13:16:01 2025 +0800 bcache: reserve more RESERVE_BTREE buckets to prevent allocator hang Reported an IO hang and unrecoverable error in our testing environment. After careful research, we found that bch_allocator_thread is stuck, the call stack is as follows: [<0>] __switch_to+0xbc/0x108 [<0>] __closure_sync+0x7c/0xbc [bcache] [<0>] bch_prio_write+0x430/0x448 [bcache] [<0>] bch_allocator_thread+0xb44/0xb70 [bcache] [<0>] kthread+0x124/0x130 [<0>] ret_from_fork+0x10/0x18 Moreover, the RESERVE_BTREE type bucket slot are empty and journal_full occurs at the same time. When the cache disk is first used, the sb.nJournal_buckets defaults to 0. So, only 8 RESERVE_BTREE type buckets are reserved. If RESERVE_BTREE type buckets used up or btree_check_reserve() failed when request handle btree split, the request will be repeatedly retried and wait for alloc thread to fill in. After the alloc thread fills the buckets, it will call bch_prio_write(). If journal_full occurs simultaneously at this time, journal_reclaim() and btree_flush_write() will be called sequentially, journal_write cannot be completed. This is a low probability event, we believe that reserve more RESERVE_BTREE buckets can avoid the worst situation. Fixes: 682811b3ce1a ("bcache: fix for allocator and register thread race") Signed-off-by: Mingzhe Zou Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20250527051601.74407-4-colyli@kernel.org Signed-off-by: Jens Axboe commit 5a08e49f2359a14629f27da99aaf0f1c3a68b850 Author: Robert Pang Date: Tue May 27 13:16:00 2025 +0800 bcache: remove unused constants Remove constants MAX_NEED_GC and MAX_SAVE_PRIO in btree.c that have been unused since initial commit. Signed-off-by: Robert Pang Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20250527051601.74407-3-colyli@kernel.org Signed-off-by: Jens Axboe commit 1e46ed947ec658f89f1a910d880cd05e42d3763e Author: Linggang Zeng Date: Tue May 27 13:15:59 2025 +0800 bcache: fix NULL pointer in cache_set_flush() 1. LINE#1794 - LINE#1887 is some codes about function of bch_cache_set_alloc(). 2. LINE#2078 - LINE#2142 is some codes about function of register_cache_set(). 3. register_cache_set() will call bch_cache_set_alloc() in LINE#2098. 1794 struct cache_set *bch_cache_set_alloc(struct cache_sb *sb) 1795 { ... 1860 if (!(c->devices = kcalloc(c->nr_uuids, sizeof(void *), GFP_KERNEL)) || 1861 mempool_init_slab_pool(&c->search, 32, bch_search_cache) || 1862 mempool_init_kmalloc_pool(&c->bio_meta, 2, 1863 sizeof(struct bbio) + sizeof(struct bio_vec) * 1864 bucket_pages(c)) || 1865 mempool_init_kmalloc_pool(&c->fill_iter, 1, iter_size) || 1866 bioset_init(&c->bio_split, 4, offsetof(struct bbio, bio), 1867 BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER) || 1868 !(c->uuids = alloc_bucket_pages(GFP_KERNEL, c)) || 1869 !(c->moving_gc_wq = alloc_workqueue("bcache_gc", 1870 WQ_MEM_RECLAIM, 0)) || 1871 bch_journal_alloc(c) || 1872 bch_btree_cache_alloc(c) || 1873 bch_open_buckets_alloc(c) || 1874 bch_bset_sort_state_init(&c->sort, ilog2(c->btree_pages))) 1875 goto err; ^^^^^^^^ 1876 ... 1883 return c; 1884 err: 1885 bch_cache_set_unregister(c); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1886 return NULL; 1887 } ... 2078 static const char *register_cache_set(struct cache *ca) 2079 { ... 2098 c = bch_cache_set_alloc(&ca->sb); 2099 if (!c) 2100 return err; ^^^^^^^^^^ ... 2128 ca->set = c; 2129 ca->set->cache[ca->sb.nr_this_dev] = ca; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 2138 return NULL; 2139 err: 2140 bch_cache_set_unregister(c); 2141 return err; 2142 } (1) If LINE#1860 - LINE#1874 is true, then do 'goto err'(LINE#1875) and call bch_cache_set_unregister()(LINE#1885). (2) As (1) return NULL(LINE#1886), LINE#2098 - LINE#2100 would return. (3) As (2) has returned, LINE#2128 - LINE#2129 would do *not* give the value to c->cache[], it means that c->cache[] is NULL. LINE#1624 - LINE#1665 is some codes about function of cache_set_flush(). As (1), in LINE#1885 call bch_cache_set_unregister() ---> bch_cache_set_stop() ---> closure_queue() -.-> cache_set_flush() (as below LINE#1624) 1624 static void cache_set_flush(struct closure *cl) 1625 { ... 1654 for_each_cache(ca, c, i) 1655 if (ca->alloc_thread) ^^ 1656 kthread_stop(ca->alloc_thread); ... 1665 } (4) In LINE#1655 ca is NULL(see (3)) in cache_set_flush() then the kernel crash occurred as below: [ 846.712887] bcache: register_cache() error drbd6: cannot allocate memory [ 846.713242] bcache: register_bcache() error : failed to register device [ 846.713336] bcache: cache_set_free() Cache set 2f84bdc1-498a-4f2f-98a7-01946bf54287 unregistered [ 846.713768] BUG: unable to handle kernel NULL pointer dereference at 00000000000009f8 [ 846.714790] PGD 0 P4D 0 [ 846.715129] Oops: 0000 [#1] SMP PTI [ 846.715472] CPU: 19 PID: 5057 Comm: kworker/19:16 Kdump: loaded Tainted: G OE --------- - - 4.18.0-147.5.1.el8_1.5es.3.x86_64 #1 [ 846.716082] Hardware name: ESPAN GI-25212/X11DPL-i, BIOS 2.1 06/15/2018 [ 846.716451] Workqueue: events cache_set_flush [bcache] [ 846.716808] RIP: 0010:cache_set_flush+0xc9/0x1b0 [bcache] [ 846.717155] Code: 00 4c 89 a5 b0 03 00 00 48 8b 85 68 f6 ff ff a8 08 0f 84 88 00 00 00 31 db 66 83 bd 3c f7 ff ff 00 48 8b 85 48 ff ff ff 74 28 <48> 8b b8 f8 09 00 00 48 85 ff 74 05 e8 b6 58 a2 e1 0f b7 95 3c f7 [ 846.718026] RSP: 0018:ffffb56dcf85fe70 EFLAGS: 00010202 [ 846.718372] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 846.718725] RDX: 0000000000000001 RSI: 0000000040000001 RDI: 0000000000000000 [ 846.719076] RBP: ffffa0ccc0f20df8 R08: ffffa0ce1fedb118 R09: 000073746e657665 [ 846.719428] R10: 8080808080808080 R11: 0000000000000000 R12: ffffa0ce1fee8700 [ 846.719779] R13: ffffa0ccc0f211a8 R14: ffffa0cd1b902840 R15: ffffa0ccc0f20e00 [ 846.720132] FS: 0000000000000000(0000) GS:ffffa0ce1fec0000(0000) knlGS:0000000000000000 [ 846.720726] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 846.721073] CR2: 00000000000009f8 CR3: 00000008ba00a005 CR4: 00000000007606e0 [ 846.721426] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 846.721778] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 846.722131] PKRU: 55555554 [ 846.722467] Call Trace: [ 846.722814] process_one_work+0x1a7/0x3b0 [ 846.723157] worker_thread+0x30/0x390 [ 846.723501] ? create_worker+0x1a0/0x1a0 [ 846.723844] kthread+0x112/0x130 [ 846.724184] ? kthread_flush_work_fn+0x10/0x10 [ 846.724535] ret_from_fork+0x35/0x40 Now, check whether that ca is NULL in LINE#1655 to fix the issue. Signed-off-by: Linggang Zeng Signed-off-by: Mingzhe Zou Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20250527051601.74407-2-colyli@kernel.org Signed-off-by: Jens Axboe commit 15bc5c00d10fb643df7939d34438d50ffa732cb2 Author: Viresh Kumar Date: Tue May 27 11:03:26 2025 +0530 rust: opp: Move `cfg(CONFIG_OF)` attribute to the top of doc test Move the `#[cfg(CONFIG_OF)]` attribute to the top of the documentation test block and hide it. This applies the condition to the entire test and improves readability. Placing configuration flags like `CONFIG_OF` at the top serves as a clear indicator of the conditions under which the example is valid, effectively acting like configuration metadata for the example itself. Suggested-by: Miguel Ojeda Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/9d93c783cc4419f16dd8942a4359d74bc0149203.1748323971.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit e3de7984e45155888eebbca5a32c1cc5f29fa859 Author: Bram Vlerick Date: Tue May 27 13:08:49 2025 +0200 ASoC: tas571x: add separate tas5733 controls The controls between the tas5717 and tas5733 should not be shared since the biquad and register setup is not identical. For example, writing to 0x5c on the tas5717 modifies ch2_bq[10] while on the tas5733 this is ch1_cross_bq[3]. see https://www.ti.com/lit/ds/symlink/tas5733l.pdf and https://www.ti.com/lit/ds/symlink/tas5717.pdf for more details on the register maps. Signed-off-by: Bram Vlerick Link: https://patch.msgid.link/20250527-tas5733-biquad-fix-v1-1-0d3d941700bb@openpixelsystems.org Signed-off-by: Mark Brown commit 39cdf87a97fdab067e82138ad4611b764f3eae15 Author: Dan Carpenter Date: Tue May 27 08:45:21 2025 +0300 cpuidle: psci: Fix uninitialized variable in dt_idle_state_present() If the first cpu_node = of_cpu_device_node_get() fails then the cleanup.h code will try to free "state_node" but it hasn't been initialized yet. Declare the device_nodes where they are initialized to fix this. Fixes: 5836ebeb4a2b ("cpuidle: psci: Avoid initializing faux device if no DT idle states are present") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aDVRcfU8O8sez1x7@stanley.mountain Signed-off-by: Rafael J. Wysocki commit 9375e5e3557bf98e9c293aa32a9d2985eed16b5e Author: Dan Carpenter Date: Tue May 27 08:54:04 2025 +0300 ACPI: MRRM: Silence error code static checker warning The error code is not set correctly on if kasprintf() fails. On the first iteration it would return -EINVAL and subsequent iterations would return success. Set it to -ENOMEM. In real life, this allocation will not fail and if it did the system will not boot so this change is mostly to silence static checker warnings more than anything else. Fixes: 04f53540f791 ("ACPI: MRRM: Add /sys files to describe memory ranges") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aDVTfEm-Jch7FuHG@stanley.mountain Signed-off-by: Rafael J. Wysocki commit ce57cc1269c580abfca5b79cb40243b01aac357c Author: Dan Carpenter Date: Tue May 27 08:43:34 2025 +0300 ACPI: APEI: EINJ: Clean up on error in einj_probe() Call acpi_put_table() before returning the error code. Fixes: e54b1dc1c4f0 ("ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type()") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aDVRBok33LZhXcId@stanley.mountain Signed-off-by: Rafael J. Wysocki commit 8450f1e0d3d0e0b200eb14d14dfb8ef5ddb9bda9 Author: Zixian Zeng Date: Sun May 25 22:58:41 2025 +0800 spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042 Add bindings for the SOPHGO SG2042 SPI-NOR flash controller, which is compatible with SOPHGO SG2044. Signed-off-by: Zixian Zeng Acked-by: Conor Dooley Reviewed-by: Chen Wang Link: https://patch.msgid.link/20250525-sfg-spifmc-v2-1-a3732b6f5ab4@gmail.com Signed-off-by: Mark Brown commit b83825a8f56a34e7352e424aae64ffe6b88247d1 Author: Josef Bacik Date: Mon May 19 14:03:01 2025 -0400 btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails In the zoned mode there's a bug in the extent buffer tree conversion to xarray. The reference for eb is dropped and code continues but the references get dropped by releasing the batch. Reported-by: Johannes Thumshirn Reported-by: kernel test robot Link: https://lore.kernel.org/linux-btrfs/202505191521.435b97ac-lkp@intel.com/ Fixes: 19d7f65f032f ("btrfs: convert the buffer_radix to an xarray") Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 217e3cbba3d6613bee9ac33ddc330f8676eb9eca Merge: 53a087046ad9a9 00b39d150986c7 Author: Will Deacon Date: Tue May 27 12:26:54 2025 +0100 Merge branch 'for-next/vdso' into for-next/core * for-next/vdso: arm64: vdso: Use __arch_counter_get_cntvct() commit 53a087046ad9a9b3cea2e92f9c5a06011f6e78b0 Merge: f92f17a7bbe731 33c4618d0ac041 Author: Will Deacon Date: Tue May 27 12:26:43 2025 +0100 Merge branch 'for-next/sme-fixes' into for-next/core * for-next/sme-fixes: (35 commits) arm64/fpsimd: Allow CONFIG_ARM64_SME to be selected arm64/fpsimd: ptrace: Gracefully handle errors arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state arm64/fpsimd: ptrace: Do not present register data for inactive mode arm64/fpsimd: ptrace: Save task state before generating SVE header arm64/fpsimd: ptrace/prctl: Ensure VL changes leave task in a valid state arm64/fpsimd: ptrace/prctl: Ensure VL changes do not resurrect stale data arm64/fpsimd: Make clone() compatible with ZA lazy saving arm64/fpsimd: Clear PSTATE.SM during clone() arm64/fpsimd: Consistently preserve FPSIMD state during clone() arm64/fpsimd: Remove redundant task->mm check arm64/fpsimd: signal: Use SMSTOP behaviour in setup_return() arm64/fpsimd: Add task_smstop_sm() arm64/fpsimd: Factor out {sve,sme}_state_size() helpers arm64/fpsimd: Clarify sve_sync_*() functions arm64/fpsimd: ptrace: Consistently handle partial writes to NT_ARM_(S)SVE arm64/fpsimd: signal: Consistently read FPSIMD context arm64/fpsimd: signal: Mandate SVE payload for streaming-mode state arm64/fpsimd: signal: Clear PSTATE.SM when restoring FPSIMD frame only arm64/fpsimd: Do not discard modified SVE state ... commit f92f17a7bbe73141dee58b7ef59aa16f6b9468e7 Merge: 3b9552cf340ef4 b225219a4002aa Author: Will Deacon Date: Tue May 27 12:26:30 2025 +0100 Merge branch 'for-next/selftests' into for-next/core * for-next/selftests: kselftest/arm64: Set default OUTPUT path when undefined kselftest/arm64: fp-ptrace: Adjust to new inactive mode behaviour kselftest/arm64: fp-ptrace: Adjust to new VL change behaviour kselftest/arm64: tpidr2: Adjust to new clone() behaviour kselftest/arm64: fp-ptrace: Fix expected FPMR value when PSTATE.SM is changed commit 4db7384ce55c4d7bfb9876fabd8d8778b2ff90ff Author: Josef Bacik Date: Mon May 19 14:03:01 2025 -0400 btrfs: don't drop a reference if btrfs_check_write_meta_pointer() fails In the zoned mode there's a bug in the extent buffer tree conversion to xarray. The reference for eb is dropped and code continues but the references get dropped by releasing the batch. Reported-by: Johannes Thumshirn Fixes: 19d7f65f032f ("btrfs: convert the buffer_radix to an xarray") Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3b9552cf340ef4f6e2ff8b612f3e47c31a86aa1f Merge: 3557a45d2ab892 7ff37d29fd5c27 Author: Will Deacon Date: Tue May 27 12:26:22 2025 +0100 Merge branch 'for-next/psci' into for-next/core * for-next/psci: firmware: psci: Fix refcount leak in psci_dt_init commit 3557a45d2ab89211de1d367ff30af9e69c859aab Merge: c73497194ad539 8c138a189f6db2 Author: Will Deacon Date: Tue May 27 12:26:15 2025 +0100 Merge branch 'for-next/perf' into for-next/core * for-next/perf: perf/arm-cmn: Add CMN S3 ACPI binding perf/arm-cmn: Initialise cmn->cpu earlier perf/amlogic: Replace smp_processor_id() with raw_smp_processor_id() in meson_ddr_pmu_create() perf/arm-cmn: Fix REQ2/SNP2 mixup perf: Do not enable by default during compile testing perf: arm-ni: Fix missing platform_set_drvdata() perf: arm-ni: Unregister PMUs on probe failure perf/arm-cmn: Remove CMN-600 DTC domain special case commit c73497194ad5390ec095af3dcdc5f9fc4c23789b Merge: 9d27622f7d0cd1 90530521079eec Author: Will Deacon Date: Tue May 27 12:26:06 2025 +0100 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64/boot: Disallow BSS exports to startup code arm64/boot: Move global CPU override variables out of BSS arm64/boot: Move init_pgdir[] and init_idmap_pgdir[] into __pi_ namespace arm64: mm: Drop redundant check in pmd_trans_huge() arm64/mm: Permit lazy_mmu_mode to be nested arm64/mm: Disable barrier batching in interrupt contexts arm64/mm: Batch barriers when updating kernel mappings mm/vmalloc: Enter lazy mmu mode while manipulating vmalloc ptes arm64/mm: Support huge pte-mapped pages in vmap mm/vmalloc: Gracefully unmap huge ptes mm/vmalloc: Warn on improper use of vunmap_range() arm64/mm: Hoist barriers out of set_ptes_anysz() loop arm64: hugetlb: Use __set_ptes_anysz() and __ptep_get_and_clear_anysz() arm64/mm: Refactor __set_ptes() and __ptep_get_and_clear() mm/page_table_check: Batch-check pmds/puds just like ptes arm64: hugetlb: Refine tlb maintenance scope arm64: hugetlb: Cleanup huge_pte size discovery mechanisms arm64: pageattr: Explicitly bail out when changing permissions for vmalloc_huge mappings arm64: Support ARM64_VA_BITS=52 when setting ARCH_MMAP_RND_BITS_MAX arm64/mm: Remove randomization of the linear map commit 9d27622f7d0cd146283de47b0a2bcebd0879469f Merge: dc64de40339bc1 7bb797757bf572 Author: Will Deacon Date: Tue May 27 12:25:58 2025 +0100 Merge branch 'for-next/misc' into for-next/core * for-next/misc: arm64/cpuinfo: only show one cpu's info in c_show() arm64: Extend pr_crit message on invalid FDT arm64: Kconfig: remove unnecessary selection of CRC32 arm64: Add missing includes for mem_encrypt commit dc64de40339bc1a7d7c52f5d3b42094e596dac12 Merge: 48055fb8823bb5 363cd2b81cfdf7 Author: Will Deacon Date: Tue May 27 12:24:18 2025 +0100 Merge branch 'for-next/fixes' into for-next/core Merge in for-next/fixes, as subsequent improvements to our early PI code that disallow BSS exports depend on the 'arm64_use_ng_mappings' fix here. * for-next/fixes: arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays commit 48055fb8823bb5e8266096ee13bc23112a02585f Merge: b5b6910f83b80e 80834997154271 Author: Will Deacon Date: Tue May 27 12:24:12 2025 +0100 Merge branch 'for-next/entry' into for-next/core * for-next/entry: arm64: el2_setup.h: Make __init_el2_fgt labels consistent, again arm64: Update comment regarding values in __boot_cpu_mode arm64/mm: Re-organise setting up FEAT_S1PIE registers PIRE0_EL1 and PIR_EL1 arm64: enable PREEMPT_LAZY commit b5b6910f83b80e2f088f529538352907605f0407 Merge: 328d35b755ffab e04796c8b59807 Author: Will Deacon Date: Tue May 27 12:24:02 2025 +0100 Merge branch 'for-next/efi' into for-next/core * for-next/efi: arm64/fpsimd: Avoid unnecessary per-CPU buffers for EFI runtime calls commit 328d35b755ffab37fd74ced2c5795e45de466241 Merge: 9bd2e7c65c8977 226ff35039d058 Author: Will Deacon Date: Tue May 27 12:23:50 2025 +0100 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: arm64: cputype: Add cputype definition for HIP12 arm64: Expose AIDR_EL1 via sysfs arm64/cpufeature: Add missing id_aa64mmfr4 feature reg update commit 9bd2e7c65c8977c2a06e4c144a59a7ef24a017ce Merge: 0af2f6be1b4281 59529bbe642de4 Author: Will Deacon Date: Tue May 27 12:23:32 2025 +0100 Merge branch 'for-next/acpi' into for-next/core * for-next/acpi: firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES commit b4608e944177531334a79f3df2cd14275b47808c Author: Thangaraj Samynathan Date: Tue May 27 16:02:44 2025 +0530 spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts Fixes a probe failure that occurs when dual SPI controllers are enabled and INTx interrupts are used. Reduces the minimum required number of interrupt vectors to 1 and registers a shared ISR when the allocated vectors are fewer than the number of controllers. This change ensures that the probe succeeds even with limited vectors, restoring INTx functionality when multiple SPI controllers are present. Signed-off-by: Thangaraj Samynathan Link: https://patch.msgid.link/20250527103244.26861-1-thangaraj.s@microchip.com Signed-off-by: Mark Brown commit 16719d48197bbd8cff121b32acec67d954335437 Author: Qasim Ijaz Date: Mon May 26 20:18:20 2025 +0100 ASoC: codecs: fix out-of-bounds access on invalid clock config get_coeff() returns –EINVAL when no table entry matches. The driver then uses that value as an index into coeff_div[], causing an OOB access. To fix lets abort the hw_params call instead. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Signed-off-by: Qasim Ijaz Link: https://patch.msgid.link/20250526191820.72577-1-qasdev00@gmail.com Signed-off-by: Mark Brown commit 63fe298652d4eda07d738bfcbbc59d1343a675ef Author: Krzysztof Kozlowski Date: Mon May 26 11:47:03 2025 +0200 ASoC: codecs: wcd9375: Fix double free of regulator supplies Driver gets regulator supplies in probe path with devm_regulator_bulk_get(), so should not call regulator_bulk_free() in error and remove paths to avoid double free. Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-3-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown commit dc59189d32fc3dbddcf418fd4b418fb61f24ade6 Author: Krzysztof Kozlowski Date: Mon May 26 11:47:02 2025 +0200 ASoC: codecs: wcd937x: Drop unused buck_supply Last user of wcd937x_priv->buck_supply was removed in commit 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply"). Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-2-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown commit 9079db287fc3e38e040b0edeb0a25770bb679c8e Author: Krzysztof Kozlowski Date: Mon May 26 11:47:01 2025 +0200 ASoC: codecs: wcd9335: Fix missing free of regulator supplies Driver gets and enables all regulator supplies in probe path (wcd9335_parse_dt() and wcd9335_power_on_reset()), but does not cleanup in final error paths and in unbind (missing remove() callback). This leads to leaked memory and unbalanced regulator enable count during probe errors or unbind. Fix this by converting entire code into devm_regulator_bulk_get_enable() which also greatly simplifies the code. Fixes: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-1-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown commit 6682bfc1b227fecedc6dad064ef240ec8abfe32d Author: Alok Tiwari Date: Thu May 22 00:43:55 2025 -0700 Doc: networking: Fix various typos in rds.rst Corrected "sages" to "messages" in the bitmap allocation description. Fixed "competed" to "completed" in the recv path datagram handling section. Corrected "privatee" to "private" in the multipath RDS section. Fixed "mutlipath" to "multipath" in the transport capabilities description. These changes improve documentation clarity and maintain consistency. Signed-off-by: Alok Tiwari Acked-by: Randy Dunlap Reviewed-by: Allison Henderson Link: https://patch.msgid.link/20250522074413.3634446-1-alok.a.tiwari@oracle.com Signed-off-by: Paolo Abeni commit f95633adc177416ac21f16db9ce1e75c74db805a Author: Mark Bloch Date: Thu May 22 10:13:56 2025 +0300 net/mlx5e: Allow setting MAC address of representors A representor netdev does not correspond to real hardware that needs to be updated when setting the MAC address. The default eth_mac_addr() is sufficient for simply updating the netdev's MAC address with validation. Signed-off-by: Mark Bloch Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Reviewed-by: Simon Horman Link: https://patch.msgid.link/1747898036-1121904-1-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni commit 08ae62e1729fac589aae0be2ace848464760fd77 Merge: 28fcb4b56f929f 5fa6f024596016 Author: Paolo Abeni Date: Tue May 27 11:54:55 2025 +0200 Merge branch 'octeontx2-pf-do-not-detect-macsec-block-based-on-silicon' Subbaraya Sundeep says: ==================== octeontx2-pf: Do not detect MACSEC block based on silicon Out of various silicon variants of CN10K series some have hardware MACSEC block for offloading MACSEC operations and some do not. AF driver already has the information of whether MACSEC is present or not on running silicon. Hence fetch that information from AF via mailbox message. ==================== Link: https://patch.msgid.link/1747894516-4565-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit 5fa6f024596016edaed72c664fd3b4338529df73 Author: Subbaraya Sundeep Date: Thu May 22 11:45:48 2025 +0530 octeontx2-pf: macsec: Get MACSEC capability flag from AF The presence of MACSEC block is currently figured out based on the running silicon variant. This may not be correct all the times since the MACSEC block can be fused out. Hence get the macsec info from AF via mailbox. Signed-off-by: Subbaraya Sundeep Reviewed-by: Simon Horman Link: https://patch.msgid.link/1747894548-4657-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit 732038370e5546169899dcb1feb1e955e5d8b4ba Author: Subbaraya Sundeep Date: Thu May 22 11:45:28 2025 +0530 octeontx2-af: Add MACSEC capability flag MACSEC block may be fused out on some silicons hence modify get_hw_cap mailbox message to set a capability flag in its response message based on MACSEC block availability. Signed-off-by: Subbaraya Sundeep Reviewed-by: Simon Horman Link: https://patch.msgid.link/1747894528-4611-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit 28fcb4b56f929f4627f3c4c6c6dc61b292b8e55d Author: Bui Quang Minh Date: Thu May 22 11:01:15 2025 +0700 xsk: add missing virtual address conversion for page In commit 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()"), when converting from netmem to page, I missed a call to page_address() around skb_frag_page(frag) to get the virtual address of the page. This commit uses skb_frag_address() helper to fix the issue. Fixes: 7ead4405e06f ("xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc()") Reviewed-by: Alexander Lobakin Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250522040115.5057-1-minhquangbui99@gmail.com Signed-off-by: Paolo Abeni commit d8d85ef0a631df9127f202e6371bb33a0b589952 Author: Stanislav Fomichev Date: Wed May 21 20:11:28 2025 -0700 af_packet: move notifier's packet_dev_mc out of rcu critical section Syzkaller reports the following issue: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:578 __mutex_lock+0x106/0xe80 kernel/locking/mutex.c:746 team_change_rx_flags+0x38/0x220 drivers/net/team/team_core.c:1781 dev_change_rx_flags net/core/dev.c:9145 [inline] __dev_set_promiscuity+0x3f8/0x590 net/core/dev.c:9189 netif_set_promiscuity+0x50/0xe0 net/core/dev.c:9201 dev_set_promiscuity+0x126/0x260 net/core/dev_api.c:286 packet_dev_mc net/packet/af_packet.c:3698 [inline] packet_dev_mclist_delete net/packet/af_packet.c:3722 [inline] packet_notifier+0x292/0xa60 net/packet/af_packet.c:4247 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] unregister_netdevice_many_notify+0x15d8/0x2330 net/core/dev.c:11972 rtnl_delete_link net/core/rtnetlink.c:3522 [inline] rtnl_dellink+0x488/0x710 net/core/rtnetlink.c:3564 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6955 netlink_rcv_skb+0x219/0x490 net/netlink/af_netlink.c:2534 Calling `PACKET_ADD_MEMBERSHIP` on an ops-locked device can trigger the `NETDEV_UNREGISTER` notifier, which may require disabling promiscuous and/or allmulti mode. Both of these operations require acquiring the netdev instance lock. Move the call to `packet_dev_mc` outside of the RCU critical section. The `mclist` modifications (add, del, flush, unregister) are protected by the RTNL, not the RCU. The RCU only protects the `sklist` and its associated `sks`. The delayed operation on the `mclist` entry remains within the RTNL. Reported-by: syzbot+b191b5ccad8d7a986286@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b191b5ccad8d7a986286 Fixes: ad7c7b2172c3 ("net: hold netdev instance lock during sysfs operations") Signed-off-by: Stanislav Fomichev Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250522031129.3247266-1-stfomichev@gmail.com Signed-off-by: Paolo Abeni commit 35a7a2f55504eaf2356de6e213ba9902e9bc5065 Merge: b2908a989c594f 393d070135ad01 Author: Paolo Abeni Date: Tue May 27 11:05:25 2025 +0200 Merge branch 'vsock-sock_linger-rework' Michal Luczaj says: ==================== vsock: SOCK_LINGER rework Change vsock's lingerning to wait on close() until all data is sent, i.e. until workers picked all the packets for processing. v5: https://lore.kernel.org/r/20250521-vsock-linger-v5-0-94827860d1d6@rbox.co v4: https://lore.kernel.org/r/20250501-vsock-linger-v4-0-beabbd8a0847@rbox.co v3: https://lore.kernel.org/r/20250430-vsock-linger-v3-0-ddbe73b53457@rbox.co v2: https://lore.kernel.org/r/20250421-vsock-linger-v2-0-fe9febd64668@rbox.co v1: https://lore.kernel.org/r/20250407-vsock-linger-v1-0-1458038e3492@rbox.co Signed-off-by: Michal Luczaj ==================== Link: https://patch.msgid.link/20250522-vsock-linger-v6-0-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit 393d070135ad01f954ca8289c3ee134950e2d0c8 Author: Michal Luczaj Date: Thu May 22 01:18:25 2025 +0200 vsock/test: Add test for an unexpectedly lingering close() There was an issue with SO_LINGER: instead of blocking until all queued messages for the socket have been successfully sent (or the linger timeout has been reached), close() would block until packets were handled by the peer. Add a test to alert on close() lingering when it should not. Signed-off-by: Michal Luczaj Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20250522-vsock-linger-v6-5-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit 8b07b7e5c253981ccbab2f2506e07f5ef1082181 Author: Michal Luczaj Date: Thu May 22 01:18:24 2025 +0200 vsock/test: Introduce enable_so_linger() helper Add a helper function that sets SO_LINGER. Adapt the caller. Signed-off-by: Michal Luczaj Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20250522-vsock-linger-v6-4-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit e78e0596c762609ee5a92bd9d38351694b52f249 Author: Michal Luczaj Date: Thu May 22 01:18:23 2025 +0200 vsock/test: Introduce vsock_wait_sent() helper Distill the virtio_vsock_sock::bytes_unsent checking loop (ioctl SIOCOUTQ) and move it to utils. Tweak the comment. Signed-off-by: Michal Luczaj Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20250522-vsock-linger-v6-3-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit 5ec40864aaecc4bd66fe67541d4a41091ed664a5 Author: Michal Luczaj Date: Thu May 22 01:18:22 2025 +0200 vsock: Move lingering logic to af_vsock core Lingering should be transport-independent in the long run. In preparation for supporting other transports, as well as the linger on shutdown(), move code to core. Generalize by querying vsock_transport::unsent_bytes(), guard against the callback being unimplemented. Do not pass sk_lingertime explicitly. Pull SOCK_LINGER check into vsock_linger(). Flatten the function. Remove the nested block by inverting the condition: return early on !timeout. Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250522-vsock-linger-v6-2-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit 1c39f5dbbfd2b44602d46936fe55361205196257 Author: Michal Luczaj Date: Thu May 22 01:18:21 2025 +0200 vsock/virtio: Linger on unsent data Currently vsock's lingering effectively boils down to waiting (or timing out) until packets are consumed or dropped by the peer; be it by receiving the data, closing or shutting down the connection. To align with the semantics described in the SO_LINGER section of man socket(7) and to mimic AF_INET's behaviour more closely, change the logic of a lingering close(): instead of waiting for all data to be handled, block until data is considered sent from the vsock's transport point of view. That is until worker picks the packets for processing and decrements virtio_vsock_sock::bytes_unsent down to 0. Note that (some interpretation of) lingering was always limited to transports that called virtio_transport_wait_close() on transport release. This does not change, i.e. under Hyper-V and VMCI no lingering would be observed. The implementation does not adhere strictly to man page's interpretation of SO_LINGER: shutdown() will not trigger the lingering. This follows AF_INET. Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250522-vsock-linger-v6-1-2ad00b0e447e@rbox.co Signed-off-by: Paolo Abeni commit b2908a989c594f9eb1c93016abc1382f97ee02b1 Author: Stefano Radaelli Date: Wed May 21 23:28:15 2025 +0200 net: phy: add driver for MaxLinear MxL86110 PHY Add support for the MaxLinear MxL86110 Gigabit Ethernet PHY, a low-power, cost-optimized transceiver supporting 10/100/1000 Mbps over twisted-pair copper, compliant with IEEE 802.3. The driver implements basic features such as: - Device initialization - RGMII interface timing configuration - Wake-on-LAN support - LED initialization and control via /sys/class/leds This driver has been tested on multiple Variscite boards, including: - VAR-SOM-MX93 (i.MX93) - VAR-SOM-MX8M-PLUS (i.MX8MP) Example boot log showing driver probe: [ 7.692101] imx-dwmac 428a0000.ethernet eth0: PHY [stmmac-0:00] driver [MXL86110 Gigabit Ethernet] (irq=POLL) Signed-off-by: Stefano Radaelli Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250521212821.593057-1-stefano.radaelli21@gmail.com Signed-off-by: Paolo Abeni commit f484a3029a261ce96b36131825479683879ffe22 Merge: 358bea91ce6b4f ca8bf8f38334b8 Author: Paolo Abeni Date: Tue May 27 09:10:05 2025 +0200 Merge branch 'wireguard-updates-for-6-16' Jason A. Donenfeld says: ==================== wireguard updates for 6.16 This small series contains mostly cleanups and one new feature: 1) Kees' __nonstring annotation comes to wireguard. 2) Two selftest fixes, one to help with compilation on gcc 15, and one removing stale config options. 3) Adoption of NLA_POLICY_MASK. 4) Jordan has added the ability to run: # wg set ... peer ... allowed-ips -192.168.1.0/24 Which will remove the allowed IP for that peer. Previously you had to replace all the IPs non-atomically, or move it to a dummy peer atomically, which wasn't very clean. ==================== Link: https://patch.msgid.link/20250521212707.1767879-1-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit ca8bf8f38334b8855738a6d1222904668e593f2a Author: Jason A. Donenfeld Date: Wed May 21 23:27:07 2025 +0200 wireguard: selftests: specify -std=gnu17 for bash GCC 15 defaults to C23, which bash can't compile under, so specify gnu17 explicitly. Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250521212707.1767879-6-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit ba3d7b93dbe3202bf8ead473d75885af773068bc Author: Jordan Rife Date: Wed May 21 23:27:06 2025 +0200 wireguard: allowedips: add WGALLOWEDIP_F_REMOVE_ME flag The current netlink API for WireGuard does not directly support removal of allowed ips from a peer. A user can remove an allowed ip from a peer in one of two ways: 1. By using the WGPEER_F_REPLACE_ALLOWEDIPS flag and providing a new list of allowed ips which omits the allowed ip that is to be removed. 2. By reassigning an allowed ip to a "dummy" peer then removing that peer with WGPEER_F_REMOVE_ME. With the first approach, the driver completely rebuilds the allowed ip list for a peer. If my current configuration is such that a peer has allowed ips 192.168.0.2 and 192.168.0.3 and I want to remove 192.168.0.2 the actual transition looks like this. [192.168.0.2, 192.168.0.3] <-- Initial state [] <-- Step 1: Allowed ips removed for peer [192.168.0.3] <-- Step 2: Allowed ips added back for peer This is true even if the allowed ip list is small and the update does not need to be batched into multiple WG_CMD_SET_DEVICE requests, as the removal and subsequent addition of ips is non-atomic within a single request. Consequently, wg_allowedips_lookup_dst and wg_allowedips_lookup_src may return NULL while reconfiguring a peer even for packets bound for ips a user did not intend to remove leading to unintended interruptions in connectivity. This presents in userspace as failed calls to sendto and sendmsg for UDP sockets. In my case, I ran netperf while repeatedly reconfiguring the allowed ips for a peer with wg. /usr/local/bin/netperf -H 10.102.73.72 -l 10m -t UDP_STREAM -- -R 1 -m 1024 send_data: data send error: No route to host (errno 113) netperf: send_omni: send_data failed: No route to host While this may not be of particular concern for environments where peers and allowed ips are mostly static, systems like Cilium manage peers and allowed ips in a dynamic environment where peers (i.e. Kubernetes nodes) and allowed ips (i.e. pods running on those nodes) can frequently change making WGPEER_F_REPLACE_ALLOWEDIPS problematic. The second approach avoids any possible connectivity interruptions but is hacky and less direct, requiring the creation of a temporary peer just to dispose of an allowed ip. Introduce a new flag called WGALLOWEDIP_F_REMOVE_ME which in the same way that WGPEER_F_REMOVE_ME allows a user to remove a single peer from a WireGuard device's configuration allows a user to remove an ip from a peer's set of allowed ips. This enables incremental updates to a device's configuration without any connectivity blips or messy workarounds. A corresponding patch for wg extends the existing `wg set` interface to leverage this feature. $ wg set wg0 peer allowed-ips +192.168.88.0/24,-192.168.0.1/32 When '+' or '-' is prepended to any ip in the list, wg clears WGPEER_F_REPLACE_ALLOWEDIPS and sets the WGALLOWEDIP_F_REMOVE_ME flag on any ip prefixed with '-'. Signed-off-by: Jordan Rife [Jason: minor style nits, fixes to selftest, bump of wireguard-tools version] Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250521212707.1767879-5-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit c8529020070cdb8d0739d07f2ebc27a0c1f186f7 Author: Jason A. Donenfeld Date: Wed May 21 23:27:05 2025 +0200 wireguard: netlink: use NLA_POLICY_MASK where possible Rather than manually validating flags against the various __ALL_* constants, put this in the netlink policy description and have the upper layer machinery check it for us. Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250521212707.1767879-4-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit 71e5da46e78c1cd24e2feed251a2845327447ad8 Author: Kees Cook Date: Wed May 21 23:27:04 2025 +0200 wireguard: global: add __nonstring annotations for unterminated strings When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to correctly identify the char array as "not a C string" and thereby eliminate the warning: ../drivers/net/wireguard/cookie.c:29:56: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 29 | static const u8 mac1_key_label[COOKIE_KEY_LABEL_LEN] = "mac1----"; | ^~~~~~~~~~ ../drivers/net/wireguard/cookie.c:30:58: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 30 | static const u8 cookie_key_label[COOKIE_KEY_LABEL_LEN] = "cookie--"; | ^~~~~~~~~~ ../drivers/net/wireguard/noise.c:28:38: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (38 chars into 37 available) [-Wunterminated-string-initialization] 28 | static const u8 handshake_name[37] = "Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/wireguard/noise.c:29:39: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (35 chars into 34 available) [-Wunterminated-string-initialization] 29 | static const u8 identifier_name[34] = "WireGuard v1 zx2c4 Jason@zx2c4.com"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The arrays are always used with their fixed size, so use __nonstring. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Signed-off-by: Kees Cook Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250521212707.1767879-3-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit e74e9ee2c80080f7492dd188da6794b45578ea41 Author: WangYuli Date: Wed May 21 23:27:03 2025 +0200 wireguard: selftests: cleanup CONFIG_UBSAN_SANITIZE_ALL Commit 918327e9b7ff ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL") removed the CONFIG_UBSAN_SANITIZE_ALL configuration option. Eliminate invalid configurations to improve code readability. Reviewed-by: Simon Horman Signed-off-by: WangYuli Signed-off-by: Jason A. Donenfeld Link: https://patch.msgid.link/20250521212707.1767879-2-Jason@zx2c4.com Signed-off-by: Paolo Abeni commit 358bea91ce6b4f02e5df0143382c96d7083504bc Merge: 5bccdc51f90c31 ae9fcd5a0f8ab7 Author: Paolo Abeni Date: Tue May 27 08:25:45 2025 +0200 Merge branch 'net-convert-dev_set_mac_address-to-struct-sockaddr_storage' Kees Cook says: ==================== net: Convert dev_set_mac_address() to struct sockaddr_storage As part of the effort to allow the compiler to reason about object sizes, we need to deal with the problematic variably sized struct sockaddr, which has no internal runtime size tracking. In much of the network stack the use of struct sockaddr_storage has been adopted. Continue the transition toward this for more of the internal APIs. Specifically: - inet_addr_is_any() - netif_set_mac_address() - dev_set_mac_address() - dev_set_mac_address_user() Only a few callers of dev_set_mac_address() needed adjustment; all others were already using struct sockaddr_storage internally. v1: https://lore.kernel.org/all/20250520222452.work.063-kees@kernel.org/ ==================== Link: https://patch.msgid.link/20250521204310.it.500-kees@kernel.org Signed-off-by: Paolo Abeni commit ae9fcd5a0f8ab7e12619e1c66312a03b842935c3 Author: Kees Cook Date: Wed May 21 13:46:16 2025 -0700 net: core: Convert dev_set_mac_address_user() to use struct sockaddr_storage Convert callers of dev_set_mac_address_user() to use struct sockaddr_storage. Add sanity checks on dev->addr_len usage. Signed-off-by: Kees Cook Acked-by: Gustavo A. R. Silva Link: https://patch.msgid.link/20250521204619.2301870-8-kees@kernel.org Signed-off-by: Paolo Abeni commit 6b12e0a3c3c9565c7dc106e2a8b1d433b1aa8eb6 Author: Kees Cook Date: Wed May 21 13:46:15 2025 -0700 rtnetlink: do_setlink: Use struct sockaddr_storage Instead of a heap allocating a variably sized struct sockaddr and lying about the type in the call to netif_set_mac_address(), use a stack allocated struct sockaddr_storage. This lets us drop the cast and avoid the allocation. Putting "ss" on the stack means it will get a reused stack slot since it is the same size (128B) as other existing single-scope stack variables, like the vfinfo array (128B), so no additional stack space is used by this function. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-7-kees@kernel.org Signed-off-by: Paolo Abeni commit 9ca6804ab7c34f65fcf2e29333a39e7807c30b60 Author: Kees Cook Date: Wed May 21 13:46:14 2025 -0700 net: core: Convert dev_set_mac_address() to struct sockaddr_storage All users of dev_set_mac_address() are now using a struct sockaddr_storage. Convert the internal data type to struct sockaddr_storage, drop the casts, and update pointer types. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-6-kees@kernel.org Signed-off-by: Paolo Abeni commit 79deac8d538d2835abe5677d42aeb237c618af92 Author: Kees Cook Date: Wed May 21 13:46:13 2025 -0700 net: usb: r8152: Convert to use struct sockaddr_storage internally To support coming API type changes, switch to sockaddr_storage usage internally. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-5-kees@kernel.org Signed-off-by: Paolo Abeni commit 7da6117ea144517e46f4f4b248eb22751224cac7 Author: Kees Cook Date: Wed May 21 13:46:12 2025 -0700 ieee802154: Use struct sockaddr_storage with dev_set_mac_address() Switch to struct sockaddr_storage for calling dev_set_mac_address(). Add a temporary cast to struct sockaddr, which will be removed in a subsequent patch. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-4-kees@kernel.org Signed-off-by: Paolo Abeni commit db586cad6f451504ec2b14ec812e1e92effe40db Author: Kees Cook Date: Wed May 21 13:46:11 2025 -0700 net/ncsi: Use struct sockaddr_storage for pending_mac To avoid future casting with coming API type changes, switch struct ncsi_dev_priv::pending_mac to a full struct sockaddr_storage. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-3-kees@kernel.org Signed-off-by: Paolo Abeni commit 161972650d6795ea00f8b72557cf3c3e593ed250 Author: Kees Cook Date: Wed May 21 13:46:10 2025 -0700 net: core: Switch netif_set_mac_address() to struct sockaddr_storage In order to avoid passing around struct sockaddr that has a size the compiler cannot reason about (nor track at runtime), convert netif_set_mac_address() to take struct sockaddr_storage. This is just a cast conversion, so there is are no binary changes. Following patches will make actual allocation changes. Acked-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-2-kees@kernel.org Signed-off-by: Paolo Abeni commit ed449ddbd867f2cc02d6890c231431f264a876eb Author: Kees Cook Date: Wed May 21 13:46:09 2025 -0700 net: core: Convert inet_addr_is_any() to sockaddr_storage All the callers of inet_addr_is_any() have a sockaddr_storage-backed sockaddr. Avoid casts and switch prototype to the actual object being used. Reviewed-by: Kuniyuki Iwashima Reviewed-by: Martin K. Petersen # SCSI Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250521204619.2301870-1-kees@kernel.org Signed-off-by: Paolo Abeni commit 32374234ab0101881e7d0c6a8ef7ebce566c46c9 Author: Suraj Gupta Date: Wed May 21 23:46:08 2025 +0530 net: xilinx: axienet: Fix Tx skb circular buffer occupancy check in dmaengine xmit In Dmaengine flow, driver maintains struct skbuf_dma_descriptor rings each element of which corresponds to a skb. In Tx datapath, compare available space in skb ring with number of skbs instead of skb fragments. Replace x * (MAX_SKB_FRAGS) in netif_txq_completed_wake() and netif_txq_maybe_stop() with x * (1 skb) to fix the comparison. Fixes: 6a91b846af85 ("net: axienet: Introduce dmaengine support") Signed-off-by: Suraj Gupta Reviewed-by: Sean Anderson Link: https://patch.msgid.link/20250521181608.669554-1-suraj.gupta2@amd.com Signed-off-by: Paolo Abeni commit 0a84874c7e7dde5cdddc80a82093120e924a348b Author: Herbert Xu Date: Mon May 26 16:56:46 2025 +0800 crypto: shash - Fix buffer overrun in import function Only set the partial block length to zero if the algorithm is block-only. Otherwise the descriptor context could be empty, e.g., for digest_null. Reported-by: syzbot+4851c19615d35f0e4d68@syzkaller.appspotmail.com Fixes: 7650f826f7b2 ("crypto: shash - Handle partial blocks in API") Signed-off-by: Herbert Xu commit 914873bc7df913db988284876c16257e6ab772c6 Merge: 24244df067c551 ad9b861824ac55 Author: Linus Torvalds Date: Mon May 26 21:41:14 2025 -0700 Merge tag 'x86-build-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: "Add the CONFIG_X86_NATIVE_CPU=y build option to locally optimize the kernel build with '-march=native'" * tag 'x86-build-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kbuild/64: Restrict clang versions that can use '-march=native' x86/kbuild/64: Test for the availability of the -mtune=native compiler flag x86/kbuild/64: Add the CONFIG_X86_NATIVE_CPU option to locally optimize the kernel with '-march=native' commit 24244df067c5514ad72b8ad371208b1139dfd0f0 Merge: 0aee0617267866 bdb30d565f4b53 Author: Linus Torvalds Date: Mon May 26 21:21:12 2025 -0700 Merge tag 'x86-entry-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso updates from Ingo Molnar: "Two changes to simplify the x86 vDSO code a bit" * tag 'x86-entry-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Remove redundant #ifdeffery around in_ia32_syscall() x86/vdso: Remove #ifdeffery around page setup variants commit 0aee0617267866555b4e35bd11e1fbb291fa9743 Merge: 020fca04c689b0 06aa9378df017e Author: Linus Torvalds Date: Mon May 26 21:18:59 2025 -0700 Merge tag 'x86-debug-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug updates from Ingo Molnar: "Move the x86 page fault tracepoints to generic code, because other architectures would like to make use of them as well" * tag 'x86-debug-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tracing, x86/mm: Move page fault tracepoints to generic x86/tracing, x86/mm: Remove redundant trace_pagefault_key commit 020fca04c689b0405899c8532e1d8748e49a2152 Merge: 785cdec46e9227 f449bf98b7b637 Author: Linus Torvalds Date: Mon May 26 21:15:06 2025 -0700 Merge tag 'x86-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc x86 cleanups: kernel-doc updates and a string API transition patch" * tag 'x86-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/power: hibernate: Fix W=1 build kernel-doc warnings x86/mm/pat: Fix W=1 build kernel-doc warning x86/CPU/AMD: Replace strcpy() with strscpy() commit 72ab5136e86fcbccebb4a423d83332f41a7bd697 Author: Kent Overstreet Date: Mon May 26 11:12:53 2025 -0400 bcachefs: Don't rewind to run a recovery pass we already ran Fix a small regression from the "run recovery passes" rewrite, which enabled async recovery passes. This fixes getting stuck in a loop in recovery. Signed-off-by: Kent Overstreet commit 686db67a8ebecdc6eb7b9ca8ef8eddb99bdf1083 Author: Kent Overstreet Date: Sun May 25 11:51:33 2025 -0400 bcachefs: Move unicode message to after the startup message Signed-off-by: Kent Overstreet commit 1cda5b88e6d13ebf42078253abbb2ed0efe9ab0a Author: Kent Overstreet Date: Sat May 24 19:53:03 2025 -0400 bcachefs: Fix missing commit in check_dirents Other repair code seems to be doing commits themselves, but check_key_has_snapshot() does not. Signed-off-by: Kent Overstreet commit 9e2c3c2ed4772cb0e2ad5b0def08c2c943483445 Author: Kent Overstreet Date: Sat May 24 15:29:50 2025 -0400 bcachefs: Fix lost rebalance wakeups Fix a missing wakeup in 'bcachefs set-file-option' -> xattr option update -> inode_write this was missing because the wakeup needs to happen after transaction commit. Also, add a 'kick' counter, to make sure we don't miss a wakeup that occured right after we finished checking the rebalance_work btree. Signed-off-by: Kent Overstreet commit dc37dcca8cb71d7ddddfd5035619eeb27c5aab8d Author: Kent Overstreet Date: Sat May 24 15:24:00 2025 -0400 bcachefs: bch2_kthread_io_clock_wait_once() Add a version of bch2_kthread_io_clock_wait() that only schedules once - behaving more like schedule_timeout(). This will be used for fixing rebalance wakeups. Signed-off-by: Kent Overstreet commit ff875d4b474739662d7fefece7532ff77c8b3b70 Author: Kent Overstreet Date: Sat May 24 14:37:20 2025 -0400 bcachefs: Ensure we print output of run_recovery_pass if it errors Also, don't error out in bucket_ref_update_err(): we don't want to return -BCH_ERR_cannot_rewind_recovery if it's not an insert, if it's an overwrite we continue. Signed-off-by: Kent Overstreet commit 785cdec46e9227f9433884ed3b436471e944007c Merge: ddddf9d64f7361 6a7c3c2606105a Author: Linus Torvalds Date: Mon May 26 16:04:17 2025 -0700 Merge tag 'x86-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core x86 updates from Ingo Molnar: "Boot code changes: - A large series of changes to reorganize the x86 boot code into a better isolated and easier to maintain base of PIC early startup code in arch/x86/boot/startup/, by Ard Biesheuvel. Motivation & background: | Since commit | | c88d71508e36 ("x86/boot/64: Rewrite startup_64() in C") | | dated Jun 6 2017, we have been using C code on the boot path in a way | that is not supported by the toolchain, i.e., to execute non-PIC C | code from a mapping of memory that is different from the one provided | to the linker. It should have been obvious at the time that this was a | bad idea, given the need to sprinkle fixup_pointer() calls left and | right to manipulate global variables (including non-pointer variables) | without crashing. | | This C startup code has been expanding, and in particular, the SEV-SNP | startup code has been expanding over the past couple of years, and | grown many of these warts, where the C code needs to use special | annotations or helpers to access global objects. This tree includes the first phase of this work-in-progress x86 boot code reorganization. Scalability enhancements and micro-optimizations: - Improve code-patching scalability (Eric Dumazet) - Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR (Andrew Cooper) CPU features enumeration updates: - Thorough reorganization and cleanup of CPUID parsing APIs (Ahmed S. Darwish) - Fix, refactor and clean up the cacheinfo code (Ahmed S. Darwish, Thomas Gleixner) - Update CPUID bitfields to x86-cpuid-db v2.3 (Ahmed S. Darwish) Memory management changes: - Allow temporary MMs when IRQs are on (Andy Lutomirski) - Opt-in to IRQs-off activate_mm() (Andy Lutomirski) - Simplify choose_new_asid() and generate better code (Borislav Petkov) - Simplify 32-bit PAE page table handling (Dave Hansen) - Always use dynamic memory layout (Kirill A. Shutemov) - Make SPARSEMEM_VMEMMAP the only memory model (Kirill A. Shutemov) - Make 5-level paging support unconditional (Kirill A. Shutemov) - Stop prefetching current->mm->mmap_lock on page faults (Mateusz Guzik) - Predict valid_user_address() returning true (Mateusz Guzik) - Consolidate initmem_init() (Mike Rapoport) FPU support and vector computing: - Enable Intel APX support (Chang S. Bae) - Reorgnize and clean up the xstate code (Chang S. Bae) - Make task_struct::thread constant size (Ingo Molnar) - Restore fpu_thread_struct_whitelist() to fix CONFIG_HARDENED_USERCOPY=y (Kees Cook) - Simplify the switch_fpu_prepare() + switch_fpu_finish() logic (Oleg Nesterov) - Always preserve non-user xfeatures/flags in __state_perm (Sean Christopherson) Microcode loader changes: - Help users notice when running old Intel microcode (Dave Hansen) - AMD: Do not return error when microcode update is not necessary (Annie Li) - AMD: Clean the cache if update did not load microcode (Boris Ostrovsky) Code patching (alternatives) changes: - Simplify, reorganize and clean up the x86 text-patching code (Ingo Molnar) - Make smp_text_poke_batch_process() subsume smp_text_poke_batch_finish() (Nikolay Borisov) - Refactor the {,un}use_temporary_mm() code (Peter Zijlstra) Debugging support: - Add early IDT and GDT loading to debug relocate_kernel() bugs (David Woodhouse) - Print the reason for the last reset on modern AMD CPUs (Yazen Ghannam) - Add AMD Zen debugging document (Mario Limonciello) - Fix opcode map (!REX2) superscript tags (Masami Hiramatsu) - Stop decoding i64 instructions in x86-64 mode at opcode (Masami Hiramatsu) CPU bugs and bug mitigations: - Remove X86_BUG_MMIO_UNKNOWN (Borislav Petkov) - Fix SRSO reporting on Zen1/2 with SMT disabled (Borislav Petkov) - Restructure and harmonize the various CPU bug mitigation methods (David Kaplan) - Fix spectre_v2 mitigation default on Intel (Pawan Gupta) MSR API: - Large MSR code and API cleanup (Xin Li) - In-kernel MSR API type cleanups and renames (Ingo Molnar) PKEYS: - Simplify PKRU update in signal frame (Chang S. Bae) NMI handling code: - Clean up, refactor and simplify the NMI handling code (Sohil Mehta) - Improve NMI duration console printouts (Sohil Mehta) Paravirt guests interface: - Restrict PARAVIRT_XXL to 64-bit only (Kirill A. Shutemov) SEV support: - Share the sev_secrets_pa value again (Tom Lendacky) x86 platform changes: - Introduce the header namespace (Ingo Molnar) - i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to (Mario Limonciello) Fixes and cleanups: - x86 assembly code cleanups and fixes (Uros Bizjak) - Misc fixes and cleanups (Andi Kleen, Andy Lutomirski, Andy Shevchenko, Ard Biesheuvel, Bagas Sanjaya, Baoquan He, Borislav Petkov, Chang S. Bae, Chao Gao, Dan Williams, Dave Hansen, David Kaplan, David Woodhouse, Eric Biggers, Ingo Molnar, Josh Poimboeuf, Juergen Gross, Malaya Kumar Rout, Mario Limonciello, Nathan Chancellor, Oleg Nesterov, Pawan Gupta, Peter Zijlstra, Shivank Garg, Sohil Mehta, Thomas Gleixner, Uros Bizjak, Xin Li)" * tag 'x86-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (331 commits) x86/bugs: Fix spectre_v2 mitigation default on Intel x86/bugs: Restructure ITS mitigation x86/xen/msr: Fix uninitialized variable 'err' x86/msr: Remove a superfluous inclusion of x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only x86/mm/64: Make 5-level paging support unconditional x86/mm/64: Make SPARSEMEM_VMEMMAP the only memory model x86/mm/64: Always use dynamic memory layout x86/bugs: Fix indentation due to ITS merge x86/cpuid: Rename hypervisor_cpuid_base()/for_each_possible_hypervisor_cpuid_base() to cpuid_base_hypervisor()/for_each_possible_cpuid_base_hypervisor() x86/cpu/intel: Rename CPUID(0x2) descriptors iterator parameter x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter x86/cpuid: Rename cpuid_get_leaf_0x2_regs() to cpuid_leaf_0x2() x86/cpuid: Rename have_cpuid_p() to cpuid_feature() x86/cpuid: Set as the main CPUID header x86/cpuid: Move CPUID(0x2) APIs into x86/msr: Add rdmsrl_on_cpu() compatibility wrapper x86/mm: Fix kernel-doc descriptions of various pgtable methods x86/asm-offsets: Export certain 'struct cpuinfo_x86' fields for 64-bit asm use too x86/boot: Defer initialization of VM space related global variables ... commit ddddf9d64f7361323da663637adb4a02466bfc99 Merge: eaed94d1f68c34 e7d952cc39fca3 Author: Linus Torvalds Date: Mon May 26 15:40:23 2025 -0700 Merge tag 'perf-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events updates from Ingo Molnar: "Core & generic-arch updates: - Add support for dynamic constraints and propagate it to the Intel driver (Kan Liang) - Fix & enhance driver-specific throttling support (Kan Liang) - Record sample last_period before updating on the x86 and PowerPC platforms (Mark Barnett) - Make perf_pmu_unregister() usable (Peter Zijlstra) - Unify perf_event_free_task() / perf_event_exit_task_context() (Peter Zijlstra) - Simplify perf_event_release_kernel() and perf_event_free_task() (Peter Zijlstra) - Allocate non-contiguous AUX pages by default (Yabin Cui) Uprobes updates: - Add support to emulate NOP instructions (Jiri Olsa) - selftests/bpf: Add 5-byte NOP uprobe trigger benchmark (Jiri Olsa) x86 Intel PMU enhancements: - Support Intel Auto Counter Reload [ACR] (Kan Liang) - Add PMU support for Clearwater Forest (Dapeng Mi) - Arch-PEBS preparatory changes: (Dapeng Mi) - Parse CPUID archPerfmonExt leaves for non-hybrid CPUs - Decouple BTS initialization from PEBS initialization - Introduce pairs of PEBS static calls x86 AMD PMU enhancements: - Use hrtimer for handling overflows in the AMD uncore driver (Sandipan Das) - Prevent UMC counters from saturating (Sandipan Das) Fixes and cleanups: - Fix put_ctx() ordering (Frederic Weisbecker) - Fix irq work dereferencing garbage (Frederic Weisbecker) - Misc fixes and cleanups (Changbin Du, Frederic Weisbecker, Ian Rogers, Ingo Molnar, Kan Liang, Peter Zijlstra, Qing Wang, Sandipan Das, Thorsten Blum)" * tag 'perf-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits) perf/headers: Clean up a bit perf/uapi: Clean up a bit perf/uapi: Fix PERF_RECORD_SAMPLE comments in mips/perf: Remove driver-specific throttle support xtensa/perf: Remove driver-specific throttle support sparc/perf: Remove driver-specific throttle support loongarch/perf: Remove driver-specific throttle support csky/perf: Remove driver-specific throttle support arc/perf: Remove driver-specific throttle support alpha/perf: Remove driver-specific throttle support perf/apple_m1: Remove driver-specific throttle support perf/arm: Remove driver-specific throttle support s390/perf: Remove driver-specific throttle support powerpc/perf: Remove driver-specific throttle support perf/x86/zhaoxin: Remove driver-specific throttle support perf/x86/amd: Remove driver-specific throttle support perf/x86/intel: Remove driver-specific throttle support perf: Only dump the throttle log for the leader perf: Fix the throttle logic for a group perf/core: Add the is_event_in_freq_mode() helper to simplify the code ... commit eaed94d1f68c3476834e07409f5fc9bd8efd6395 Merge: 3ba121c9f36f0c 90ca9410dab21c Author: Linus Torvalds Date: Mon May 26 15:19:58 2025 -0700 Merge tag 'sched-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Core & fair scheduler changes: - Tweak wait_task_inactive() to force dequeue sched_delayed tasks (John Stultz) - Adhere to place_entity() constraints (Peter Zijlstra) - Allow decaying util_est when util_avg > CPU capacity (Pierre Gondois) - Fix up wake_up_sync() vs DELAYED_DEQUEUE (Xuewen Yan) Energy management: - Introduce sched_update_asym_prefer_cpu() (K Prateek Nayak) - cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change (K Prateek Nayak) - Align uclamp and util_est and call before freq update (Xuewen Yan) CPU isolation: - Make use of more than one housekeeping CPU (Phil Auld) RT scheduler: - Fix race in push_rt_task() (Harshit Agarwal) - Add kernel cmdline option for rt_group_sched (Michal Koutný) Scheduler topology support: - Improve topology_span_sane speed (Steve Wahl) Scheduler debugging: - Move and extend the sched_process_exit() tracepoint (Andrii Nakryiko) - Add RT_GROUP WARN checks for non-root task_groups (Michal Koutný) - Fix trace_sched_switch(.prev_state) (Peter Zijlstra) - Untangle cond_resched() and live-patching (Peter Zijlstra) Fixes and cleanups: - Misc fixes and cleanups (K Prateek Nayak, Michal Koutný, Peter Zijlstra, Xuewen Yan)" * tag 'sched-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) sched/uclamp: Align uclamp and util_est and call before freq update sched/util_est: Simplify condition for util_est_{en,de}queue() sched/fair: Fixup wake_up_sync() vs DELAYED_DEQUEUE sched,livepatch: Untangle cond_resched() and live-patching sched/core: Tweak wait_task_inactive() to force dequeue sched_delayed tasks sched/fair: Adhere to place_entity() constraints sched/debug: Print the local group's asym_prefer_cpu cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change sched/topology: Introduce sched_update_asym_prefer_cpu() sched/fair: Use READ_ONCE() to read sg->asym_prefer_cpu sched/isolation: Make use of more than one housekeeping cpu sched/rt: Fix race in push_rt_task sched: Add annotations to RT_GROUP_SCHED fields sched: Add RT_GROUP WARN checks for non-root task_groups sched: Do not construct nor expose RT_GROUP_SCHED structures if disabled sched: Bypass bandwitdh checks with runtime disabled RT_GROUP_SCHED sched: Skip non-root task_groups with disabled RT_GROUP_SCHED sched: Add commadline option for RT_GROUP_SCHED toggling sched: Always initialize rt_rq's task_group sched: Remove unneeed macro wrap ... commit 3ba121c9f36f0c2734147365e5aeccf759a40b63 Merge: b3570b00dc3062 4ed9d82bf5b21d Author: Linus Torvalds Date: Mon May 26 15:13:53 2025 -0700 Merge tag 'objtool-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Speed up SHT_GROUP reindexing (Josh Poimboeuf) - Fix up st_info in COMDAT group section (Rong Xu) * tag 'objtool-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Speed up SHT_GROUP reindexing objtool: Fix up st_info in COMDAT group section commit b3570b00dc3062c5a5e8d9602b923618d679636a Merge: 3349ada3cffdbe 94ec70880fd376 Author: Linus Torvalds Date: Mon May 26 14:42:07 2025 -0700 Merge tag 'locking-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "Futexes: - Add support for task local hash maps (Sebastian Andrzej Siewior, Peter Zijlstra) - Implement the FUTEX2_NUMA ABI, which feature extends the futex interface to be NUMA-aware. On NUMA-aware futexes a second u32 word containing the NUMA node is added to after the u32 futex value word (Peter Zijlstra) - Implement the FUTEX2_MPOL ABI, which feature extends the futex interface to be mempolicy-aware as well, to further refine futex node mappings and lookups (Peter Zijlstra) Locking primitives: - Misc cleanups (Andy Shevchenko, Borislav Petkov, Colin Ian King, Ingo Molnar, Nam Cao, Peter Zijlstra) Lockdep: - Prevent abuse of lockdep subclasses (Waiman Long) - Add number of dynamic keys to /proc/lockdep_stats (Waiman Long) Plus misc cleanups and fixes" * tag 'locking-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) selftests/futex: Fix spelling mistake "unitiliazed" -> "uninitialized" futex: Correct the kernedoc return value for futex_wait_setup(). tools headers: Synchronize prctl.h ABI header futex: Use RCU_INIT_POINTER() in futex_mm_init(). selftests/futex: Use TAP output in futex_numa_mpol selftests/futex: Use TAP output in futex_priv_hash futex: Fix kernel-doc comments futex: Relax the rcu_assign_pointer() assignment of mm->futex_phash in futex_mm_init() futex: Fix outdated comment in struct restart_block locking/lockdep: Add number of dynamic keys to /proc/lockdep_stats locking/lockdep: Prevent abuse of lockdep subclass locking/lockdep: Move hlock_equal() to the respective #ifdeffery futex,selftests: Add another FUTEX2_NUMA selftest selftests/futex: Add futex_numa_mpol selftests/futex: Add futex_priv_hash selftests/futex: Build without headers nonsense tools/perf: Allow to select the number of hash buckets tools headers: Synchronize prctl.h ABI header futex: Implement FUTEX2_MPOL futex: Implement FUTEX2_NUMA ... commit 3349ada3cffdbe4579872a004360daa31938f683 Merge: d8cb068359f621 8682a5749a3d2b Author: Linus Torvalds Date: Mon May 26 14:38:57 2025 -0700 Merge tag 'powerpc-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Madhavan Srinivasan: - Support for dynamic preemption - Migrate powerpc boards GPIO driver to new setter API - Added new PMU for KVM host-wide measurement - Enhancement to htmdump driver to support more functions - Added character device for couple RTAS supported APIs - Minor fixes and cleanup Thanks to Amit Machhiwal, Athira Rajeev, Bagas Sanjaya, Bartosz Golaszewski, Christophe Leroy, Eddie James, Gaurav Batra, Gautam Menghani, Geert Uytterhoeven, Haren Myneni, Hari Bathini, Jiri Slaby (SUSE), Linus Walleij, Michal Suchanek, Naveen N Rao (AMD), Nilay Shroff, Ricardo B. Marlière, Ritesh Harjani (IBM), Sathvika Vasireddy, Shrikanth Hegde, Stephen Rothwell, Sourabh Jain, Thorsten Blum, Vaibhav Jain, Venkat Rao Bagalkote, and Viktor Malik. * tag 'powerpc-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (52 commits) MAINTAINERS: powerpc: Remove myself as a reviewer powerpc/iommu: Use str_disabled_enabled() helper powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers powerpc/mm/fault: Use str_write_read() helper function powerpc: Replace strcpy() with strscpy() in proc_ppc64_init() powerpc/pseries/iommu: Fix kmemleak in TCE table userspace view powerpc/kernel: Fix ppc_save_regs inclusion in build powerpc: Transliterate author name and remove FIXME powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition KVM: PPC: Book3S HV: Fix IRQ map warnings with XICS on pSeries KVM Guest powerpc/8xx: Reduce alignment constraint for kernel memory powerpc/boot: Fix build with gcc 15 powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface powerpc/pseries/htmdump: Add htm capabilities support to htmdump module powerpc/pseries/htmdump: Add htm flags support to htmdump module powerpc/pseries/htmdump: Add htm setup support to htmdump module powerpc/pseries/htmdump: Add htm info support to htmdump module powerpc/pseries/htmdump: Add htm status support to htmdump module powerpc/pseries/htmdump: Add htm start support to htmdump module powerpc/pseries/htmdump: Add htm configure support to htmdump module ... commit d8cb068359f6210d790828714081d4ccb47014ff Merge: ba450370980aea 774a1fa880bc94 Author: Linus Torvalds Date: Mon May 26 14:36:05 2025 -0700 Merge tag 's390-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - Large rework of the protected key crypto code to allow for asynchronous handling without memory allocation - Speed up system call entry/exit path by re-implementing lazy ASCE handling - Add module autoload support for the diag288_wdt watchdog device driver - Get rid of s390 specific strcpy() and strncpy() implementations, and switch all remaining users to strscpy() when possible - Various other small fixes and improvements * tag 's390-6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (51 commits) s390/pci: Serialize device addition and removal s390/pci: Allow re-add of a reserved but not yet removed device s390/pci: Prevent self deletion in disable_slot() s390/pci: Remove redundant bus removal and disable from zpci_release_device() s390/crypto: Extend protected key conversion retry loop s390/pci: Fix __pcilg_mio_inuser() inline assembly s390/ptrace: Always inline regs_get_kernel_stack_nth() and regs_get_register() s390/thread_info: Cleanup header includes s390/extmem: Add workaround for DCSS unload diag s390/crypto: Rework protected key AES for true asynch support s390/cpacf: Rework cpacf_pcc() to return condition code s390/mm: Fix potential use-after-free in __crst_table_upgrade() s390/mm: Add mmap_assert_write_locked() check to crst_table_upgrade() s390/string: Remove strcpy() implementation s390/con3270: Use strscpy() instead of strcpy() s390/boot: Use strspcy() instead of strcpy() s390: Simple strcpy() to strscpy() conversions s390/pkey/crypto: Introduce xflags param for pkey in-kernel API s390/pkey: Provide and pass xflags within pkey and zcrypt layers s390/uv: Remove uv_get_secret_metadata function ... commit 3b5260d12b1fe76b566fe182de8abc586b827ed0 Author: Al Viro Date: Fri May 23 19:20:36 2025 -0400 Don't propagate mounts into detached trees All versions up to 6.14 did not propagate mount events into detached tree. Shortly after 6.14 a merge of vfs-6.15-rc1.mount.namespace (130e696aa68b) has changed that. Unfortunately, that has caused userland regressions (reported in https://lore.kernel.org/all/CAOYeF9WQhFDe+BGW=Dp5fK8oRy5AgZ6zokVyTj1Wp4EUiYgt4w@mail.gmail.com/) Straight revert wouldn't be an option - in particular, the variant in 6.14 had a bug that got fixed in d1ddc6f1d9f0 ("fix IS_MNT_PROPAGATING uses") and we don't want to bring the bug back. This is a modification of manual revert posted by Christian, with changes needed to avoid reintroducing the breakage in scenario described in d1ddc6f1d9f0. Cc: stable@vger.kernel.org Reported-by: Allison Karlitskaya Tested-by: Allison Karlitskaya Acked-by: Christian Brauner Co-developed-by: Christian Brauner Signed-off-by: Al Viro commit ba450370980aeae32197b74c27e4563281cd3aaa Merge: 2d2435e1c843ce 772e50a76ee664 Author: Linus Torvalds Date: Mon May 26 14:29:44 2025 -0700 Merge tag 'linux_kselftest-kunit-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit updates from Shuah Khan: - Enable qemu_config for riscv32, sparc 64-bit, PowerPC 32-bit BE and 64-bit LE - Enable CONFIG_SPARC32 to clearly differentiate between sparc 32-bit and 64-bit configurations - Enable CONFIG_CPU_BIG_ENDIAN to clearly differentiate between powerpc LE and BE configurations - Add feature to list available architectures to kunit tool - Fixes to bugs and changes to documentation * tag 'linux_kselftest-kunit-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Fix wrong parameter to kunit_deactivate_static_stub() kunit: tool: add test counts to JSON output Documentation: kunit: improve example on testing static functions kunit: executor: Remove const from kunit_filter_suites() allocation type kunit: qemu_configs: Disable faulting tests on 32-bit SPARC kunit: qemu_configs: Add 64-bit SPARC configuration kunit: qemu_configs: sparc: Explicitly enable CONFIG_SPARC32=y kunit: qemu_configs: Add PowerPC 32-bit BE and 64-bit LE kunit: qemu_configs: powerpc: Explicitly enable CONFIG_CPU_BIG_ENDIAN=y kunit: tool: Implement listing of available architectures kunit: qemu_configs: Add riscv32 config kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests commit 2d2435e1c843ced85e55885282c866208ff9f676 Merge: 07046958f6ddaa 1107dc4c5b0618 Author: Linus Torvalds Date: Mon May 26 14:25:23 2025 -0700 Merge tag 'linux_kselftest-next-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: "Fixes: - cpufreq test to not double suspend in rtcwake case - compile error in pid_namespace test - run_kselftest.sh to use readlink if realpath is not available - cpufreq basic read and update testcases - ftrace to add poll to a gen_file so test can find it at run-time - spelling errors in perf_events test" * tag 'linux_kselftest-next-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/run_kselftest.sh: Use readlink if realpath is not available selftests/timens: timerfd: Use correct clockid type in tclock_gettime() selftests/timens: Make run_tests() functions static selftests/timens: Print TAP headers selftests: pid_namespace: add missing sys/mount.h include in pid_max.c kselftest: cpufreq: Get rid of double suspend in rtcwake case selftests/cpufreq: Fix cpufreq basic read and update testcases selftests/ftrace: Convert poll to a gen_file selftests/perf_events: Fix spelling mistake "sycnhronize" -> "synchronize" commit 02e66dacb5b7ae21518fb24f8cb69295302bbfad Author: David Wronek Date: Tue Apr 22 23:17:05 2025 +0300 dt-bindings: mailbox: qcom: Add the SM7150 APCS compatible Add compatible for the Qualcomm SM7150 APCS block to the Qualcomm APCS binding. Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Signed-off-by: Jassi Brar commit 529015a0e77a57e17801e4a3338d74674e1f5704 Author: Yuntao Dai Date: Tue May 20 15:44:24 2025 +0800 mailbox: sophgo: add mailbox driver for CV18XX series SoC Add mailbox controller driver for CV18XX SoCs, which provides 8 channels and each channel has an 8-byte FIFO. Signed-off-by: Yuntao Dai Signed-off-by: Junhui Liu Signed-off-by: Jassi Brar commit fca8d64001fcfb26f7698c2052e1fc6634133ebc Author: Yuntao Dai Date: Tue May 20 15:44:23 2025 +0800 dt-bindings: mailbox: add Sophgo CV18XX series SoC Introduce the mailbox module for CV18XX series SoC, which is responsible for interchanging messages between asymmetric processors. Signed-off-by: Yuntao Dai Signed-off-by: Junhui Liu Signed-off-by: Jassi Brar commit 2149ec83ef7d273d35998903617422f1b3bd4846 Author: Peng Fan Date: Fri Apr 11 21:14:14 2025 +0800 mailbox: Use guard/scoped_guard for spinlock Use guard and scoped_guard for chan->lock and mbox->poll_hrt_lock to simplify code. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 16da9a653c5bf5d97fb296420899fe9735aa9c3c Author: Peng Fan Date: Fri Apr 11 21:14:13 2025 +0800 mailbox: Use guard/scoped_guard for con_mutex Use guard and scoped_guard for con_mutex to simplify code. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 9be022476fea62b32aa05d9d370e0175155731e6 Author: Peng Fan Date: Fri Apr 11 21:14:12 2025 +0800 mailbox: Remove devm_mbox_controller_unregister Commit e898d9cdd3a9("mailbox: Add device-managed registration functions") introduced device-managed API for mailbox, but in the past 7 years, there is no user for devm_mbox_controller_unregister. So remove it. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit cb7e2ec3706f7ddedde2504b1b4342046c9a92e3 Author: Peng Fan Date: Fri Apr 11 21:14:11 2025 +0800 mailbox: Propagate correct error return value In case of_property_match_string fails, it makes more sense to return its error value to caller, not force the value to ERR_PTR(-EINVAL). Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit dddbd233e67e792bb0a3f9694a4707e6be29b2c6 Author: Peng Fan Date: Fri Apr 11 21:14:10 2025 +0800 mailbox: Not protect module_put with spin_lock_irqsave &chan->lock is not supposed to protect 'chan->mbox'. And in __mbox_bind_client, try_module_get is also not protected by &chan->lock. So move module_put out of the lock protected region. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 8da4988b6e645f3eaa590ea16f433583364fd09c Author: Peng Fan Date: Fri Apr 11 21:14:09 2025 +0800 mailbox: Use dev_err when there is error Use dev_err to show the error log instead of using dev_dbg. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 9fcebcb37c3e0a4b6eb40768cc5a5faebf166fbe Author: Jason-JH Lin Date: Mon Apr 21 11:55:47 2025 +0800 mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting Add cmdq_gctl_value_toggle() to configure GCE_CTRL_BY_SW and GCE_DDR_EN together in the same GCE_GCTL_VALUE register. For the SoCs whose GCE is located in MMINFRA and uses MMINFRA_AO power, this allows it to be written without enabling the clocks. Otherwise, all GCE registers should be written after the GCE clocks are enabled. Move this function into cmdq_runtime_resume() and cmdq_runtime_suspend() to ensure it is called when the GCE clock is enabled. Fixes: 7abd037aa581 ("mailbox: mtk-cmdq: add gce ddr enable support flow") Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit f5cb07ec6aabd1bb56adbdeb5f0d70cb524db2cd Author: Peng Fan Date: Sun May 25 16:47:24 2025 +0800 mailbox: imx: Fix TXDB_V2 sending i.MX95 features several processing domains, Cortex-M7, Cortex-A55 secure, Cortex-A55 non-secure. Each domain could communicate with SCMI firmware with a dedicated MU. But the current NXP SCMI firmware is not a RTOS, all processing logic codes are in interrupt context. So if high priority Cortex-M7 is communicating with SCMI firmware and requires a bit more time to handle the SCMI call, Linux MU TXDB_V2 will be timeout with high possiblity in 1000us(the current value in imx-mailbox.c). Per NXP SCMI firmware design, if timeout, there is no recover logic, so SCMI agents should never timeout and always wait until the check condition met. Based on the upper reason, enlarge the timeout value to 10ms which is less chance to timeout, and retry if timeout really happends. Fixes: 5bfe4067d350 ("mailbox: imx: support channel type tx doorbell v2") Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit d635ba4207c31940398c41caa0cedd80f3b9c9c7 Author: Yue Haibing Date: Fri Apr 11 15:57:47 2025 +0800 mailbox: mchp-ipc-sbi: Fix COMPILE_TEST build error If COMPILE_TEST is y but RISCV_SBI is n, build fails: drivers/mailbox/mailbox-mchp-ipc-sbi.c: In function 'mchp_ipc_sbi_chan_send': drivers/mailbox/mailbox-mchp-ipc-sbi.c:119:23: error: storage size of 'ret' isn't known struct sbiret ret; ^~~ CC drivers/nvmem/lpc18xx_otp.o drivers/mailbox/mailbox-mchp-ipc-sbi.c:121:15: error: implicit declaration of function 'sbi_ecall' [-Werror=implicit-function-declaration] ret = sbi_ecall(SBI_EXT_MICROCHIP_TECHNOLOGY, command, channel, ^~~~~~~~~ move COMPILE_TEST to ARCH_MICROCHIP dependency as other drivers. Fixes: e4b1d67e7141 ("mailbox: add Microchip IPC support") Signed-off-by: Yue Haibing Signed-off-by: Jassi Brar commit 07046958f6ddaa1e05ac64d1e11e77b6db9a00ce Merge: 66fd704da45429 9c80e443379861 Author: Linus Torvalds Date: Mon May 26 14:20:50 2025 -0700 Merge tag 'next.2025.05.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux Pull RCU updates from Joel Fernandes: - Removed swake_up_one_online() workaround - Reverted an incorrect rcuog wake-up fix from offline softirq - Rust RCU Guard methods marked as inline - Updated MAINTAINERS with Joel’s and Zqiang's new email address - Replaced magic constant in rcu_seq_done_exact() with named constant - Added warning mechanism to validate rcu_seq_done_exact() - Switched SRCU polling API to use rcu_seq_done_exact() - Commented on redundant delta check in rcu_seq_done_exact() - Made ->gpwrap tests in rcutorture more frequent - Fixed reuse of ARM64 images in rcutorture - rcutorture improved to check Kconfig and reader conflict handling - Extracted logic from rcu_torture_one_read() for clarity - Updated LWN RCU API documentation links - Enabled --do-rt in torture.sh for CONFIG_PREEMPT_RT - Added tests for SRCU up/down reader primitives - Added comments and delays checks in rcutorture - Deprecated srcu_read_lock_lite() and srcu_read_unlock_lite() via checkpatch - Added --do-normal and --do-no-normal to torture.sh - Added RCU Rust binding tests to torture.sh - Reduced CPU overcommit and removed MAXSMP/CPUMASK_OFFSTACK in TREE01 - Replaced kmalloc() with kcalloc() in rcuscale - Refined listRCU example code for stale data elimination - Fixed hardirq count bug for x86 in cpu_stall_cputime - Added safety checks in rcu/nocb for offloaded rdp access - Other miscellaneous changes * tag 'next.2025.05.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (27 commits) rcutorture: Fix issue with re-using old images on ARM64 rcutorture: Remove MAXSMP and CPUMASK_OFFSTACK from TREE01 rcutorture: Reduce TREE01 CPU overcommit torture: Check for "Call trace:" as well as "Call Trace:" rcutorture: Perform more frequent testing of ->gpwrap torture: Add testing of RCU's Rust bindings to torture.sh torture: Add --do-{,no-}normal to torture.sh checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite() rcutorture: Comment invocations of tick_dep_set_task() rcu/nocb: Add Safe checks for access offloaded rdp rcuscale: using kcalloc() to relpace kmalloc() doc/RCU/listRCU: refine example code for eliminating stale data doc: Update LWN RCU API links in whatisRCU.rst Revert "rcu/nocb: Fix rcuog wake-up from offline softirq" rust: sync: rcu: Mark Guard methods as inline rcu/cpu_stall_cputime: fix the hardirq count for x86 architecture rcu: Remove swake_up_one_online() bandaid MAINTAINERS: Update Zqiang's email address rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RT srcu: Use rcu_seq_done_exact() for polling API ... commit 66fd704da45429e40aca6b4b09ca0267e27b29de Merge: 14418ddcc2c205 ecc1ca9185c377 Author: Linus Torvalds Date: Mon May 26 14:12:31 2025 -0700 Merge tag 'tpmdd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "This is only a small pull request with fixes, as possible features moved to +1 release" * tag 'tpmdd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm_crb: ffa_tpm: fix/update comments describing the CRB over FFA ABI tpm_crb_ffa: use dev_xx() macro to print log tpm_ffa_crb: access tpm service over FF-A direct message request v2 tpm: remove kmalloc failure error message commit 14418ddcc2c2055743ac7ee53d5ac2cf8a8660a7 Merge: 15d90a5e552453 2297554f01df6d Author: Linus Torvalds Date: Mon May 26 13:47:28 2025 -0700 Merge tag 'v6.16-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Fix memcpy_sglist to handle partially overlapping SG lists - Use memcpy_sglist to replace null skcipher - Rename CRYPTO_TESTS to CRYPTO_BENCHMARK - Flip CRYPTO_MANAGER_DISABLE_TEST into CRYPTO_SELFTESTS - Hide CRYPTO_MANAGER - Add delayed freeing of driver crypto_alg structures Compression: - Allocate large buffers on first use instead of initialisation in scomp - Drop destination linearisation buffer in scomp - Move scomp stream allocation into acomp - Add acomp scatter-gather walker - Remove request chaining - Add optional async request allocation Hashing: - Remove request chaining - Add optional async request allocation - Move partial block handling into API - Add ahash support to hmac - Fix shash documentation to disallow usage in hard IRQs Algorithms: - Remove unnecessary SIMD fallback code on x86 and arm/arm64 - Drop avx10_256 xts(aes)/ctr(aes) on x86 - Improve avx-512 optimisations for xts(aes) - Move chacha arch implementations into lib/crypto - Move poly1305 into lib/crypto and drop unused Crypto API algorithm - Disable powerpc/poly1305 as it has no SIMD fallback - Move sha256 arch implementations into lib/crypto - Convert deflate to acomp - Set block size correctly in cbcmac Drivers: - Do not use sg_dma_len before mapping in sun8i-ss - Fix warm-reboot failure by making shutdown do more work in qat - Add locking in zynqmp-sha - Remove cavium/zip - Add support for PCI device 0x17D8 to ccp - Add qat_6xxx support in qat - Add support for RK3576 in rockchip-rng - Add support for i.MX8QM in caam Others: - Fix irq_fpu_usable/kernel_fpu_begin inconsistency during CPU bring-up - Add new SEV/SNP platform shutdown API in ccp" * tag 'v6.16-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (382 commits) x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining crypto: qat - add missing header inclusion crypto: api - Redo lookup on EEXIST Revert "crypto: testmgr - Add hash export format testing" crypto: marvell/cesa - Do not chain submitted requests crypto: powerpc/poly1305 - add depends on BROKEN for now Revert "crypto: powerpc/poly1305 - Add SIMD fallback" crypto: ccp - Add missing tee info reg for teev2 crypto: ccp - Add missing bootloader info reg for pspv5 crypto: sun8i-ce - move fallback ahash_request to the end of the struct crypto: octeontx2 - Use dynamic allocated memory region for lmtst crypto: octeontx2 - Initialize cptlfs device info once crypto: xts - Only add ecb if it is not already there crypto: lrw - Only add ecb if it is not already there crypto: testmgr - Add hash export format testing crypto: testmgr - Use ahash for generic tfm crypto: hmac - Add ahash support crypto: testmgr - Ignore EEXIST on shash allocation crypto: algapi - Add driver template support to crypto_inst_setname crypto: shash - Set reqsize in shash_alg ... commit e9f17038d814c0185e017a3fa62305a12d52f45c Author: Paolo Bonzini Date: Mon May 26 16:31:13 2025 -0400 x86/tdx: mark tdh_vp_enter() as __flatten In some cases tdx_tdvpr_pa() is not fully inlined into tdh_vp_enter(), which causes the following warning: vmlinux.o: warning: objtool: tdh_vp_enter+0x8: call to tdx_tdvpr_pa() leaves .noinstr.text section This happens if the compiler considers tdx_tdvpr_pa() to be "large", for example because CONFIG_SPARSEMEM adds two function calls to page_to_section() and __section_mem_map_addr(): ({ const struct page *__pg = (pg); \ int __sec = page_to_section(__pg); \ (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ }) Because exiting the noinstr section is a no-no, just mark tdh_vp_enter() for full inlining. Reported-by: kernel test robot Analyzed-by: Xiaoyao Li Closes: https://lore.kernel.org/oe-kbuild-all/202505240530.5KktQ5mX-lkp@intel.com/ Signed-off-by: Paolo Bonzini commit 15d90a5e5524532b7456a24f4626cf28c1629c4c Merge: 14f19dc6440f23 289c99bec7eed9 Author: Linus Torvalds Date: Mon May 26 13:32:06 2025 -0700 Merge tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull CRC updates from Eric Biggers: "Cleanups for the kernel's CRC (cyclic redundancy check) code: - Use __ro_after_init where appropriate - Remove unnecessary static_key on s390 - Rename some source code files - Rename the crc32 and crc32c crypto API modules - Use subsys_initcall instead of arch_initcall - Restore maintainers for crc_kunit.c - Fold crc16_byte() into crc16.c - Add some SPDX license identifiers" * tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crc32: add SPDX license identifier lib/crc16: unexport crc16_table and crc16_byte() w1: ds2406: use crc16() instead of crc16_byte() loop MAINTAINERS: add crc_kunit.c back to CRC LIBRARY lib/crc: make arch-optimized code use subsys_initcall crypto: crc32 - remove "generic" from file and module names x86/crc: drop "glue" from filenames sparc/crc: drop "glue" from filenames s390/crc: drop "glue" from filenames powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S powerpc/crc: drop "glue" from filenames arm64/crc: drop "glue" from filenames arm/crc: drop "glue" from filenames s390/crc32: Remove no-op module init and exit functions s390/crc32: Remove have_vxrs static key lib/crc: make the CPU feature static keys __ro_after_init commit 5bccdc51f90c3194fda4bab92c521c2e2eb4e887 Author: Baris Can Goral Date: Wed May 21 19:10:37 2025 +0300 replace strncpy with strscpy_pad The strncpy() function is actively dangerous to use since it may not NULL-terminate the destination string, resulting in potential memory content exposures, unbounded reads, or crashes. Link: https://github.com/KSPP/linux/issues/90 In addition, strscpy_pad is more appropriate because it also zero-fills any remaining space in the destination if the source is shorter than the provided buffer size. Signed-off-by: Baris Can Goral Reviewed-by: Allison Henderson Link: https://patch.msgid.link/20250521161036.14489-1-goralbaris@gmail.com Signed-off-by: Paolo Abeni commit 14f19dc6440f23f417c83207c117b54698aa3934 Merge: f83fcb87f824b0 c07d3aede2b268 Author: Linus Torvalds Date: Mon May 26 13:27:40 2025 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt update from Eric Biggers: "Add support for 'hardware-wrapped inline encryption keys' to fscrypt. When enabled on supported platforms, this feature protects file contents keys from certain attacks, such as cold boot attacks. This feature uses the block layer support for wrapped keys which was merged in 6.15. Wrapped key support has existed out-of-tree in Android for a long time, and it's finally ready for upstream now that there is a platform on which it works end-to-end with upstream. Specifically, it works on the Qualcomm SM8650 HDK, using the Qualcomm ICE (Inline Crypto Engine) and HWKM (Hardware Key Manager). The corresponding driver support is included in the SCSI tree for 6.16. Validation for this feature includes two new tests that were already merged into xfstests (generic/368 and generic/369)" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fscrypt: add support for hardware-wrapped keys commit 1f7c9d52b12ded6c99b5623d1e81bba7bb76c2f4 Merge: 4d526b02df59ef 7917be17092818 Author: Paolo Bonzini Date: Mon May 26 16:27:00 2025 -0400 Merge tag 'kvm-riscv-6.16-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.16 - Add vector registers to get-reg-list selftest - VCPU reset related improvements - Remove scounteren initialization from VCPU reset - Support VCPU reset from userspace using set_mpstate() ioctl commit 4d526b02df59efb9b966f66e6cace836c4cfc5d8 Merge: 85502b2214d50b 1b85d923ba8c9e Author: Paolo Bonzini Date: Mon May 26 16:19:46 2025 -0400 Merge tag 'kvmarm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 6.16 * New features: - Add large stage-2 mapping support for non-protected pKVM guests, clawing back some performance. - Add UBSAN support to the standalone EL2 object used in nVHE/hVHE and protected modes. - Enable nested virtualisation support on systems that support it (yes, it has been a long time coming), though it is disabled by default. * Improvements, fixes and cleanups: - Large rework of the way KVM tracks architecture features and links them with the effects of control bits. This ensures correctness of emulation (the data is automatically extracted from the published JSON files), and helps dealing with the evolution of the architecture. - Significant changes to the way pKVM tracks ownership of pages, avoiding page table walks by storing the state in the hypervisor's vmemmap. This in turn enables the THP support described above. - New selftest checking the pKVM ownership transition rules - Fixes for FEAT_MTE_ASYNC being accidentally advertised to guests even if the host didn't have it. - Fixes for the address translation emulation, which happened to be rather buggy in some specific contexts. - Fixes for the PMU emulation in NV contexts, decoupling PMCR_EL0.N from the number of counters exposed to a guest and addressing a number of issues in the process. - Add a new selftest for the SVE host state being corrupted by a guest. - Keep HCR_EL2.xMO set at all times for systems running with the kernel at EL2, ensuring that the window for interrupts is slightly bigger, and avoiding a pretty bad erratum on the AmpereOne HW. - Add workaround for AmpereOne's erratum AC04_CPU_23, which suffers from a pretty bad case of TLB corruption unless accesses to HCR_EL2 are heavily synchronised. - Add a per-VM, per-ITS debugfs entry to dump the state of the ITS tables in a human-friendly fashion. - and the usual random cleanups. commit 85502b2214d50ba0ddf2a5fb454e4d28a160d175 Merge: 2bb0e398852fa3 a867688c8cbb1b Author: Paolo Bonzini Date: Mon May 26 16:12:13 2025 -0400 Merge tag 'loongarch-kvm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD LoongArch KVM changes for v6.16 1. Don't flush tlb if HW PTW supported. 2. Add LoongArch KVM selftests support. commit 2bb0e398852fa3f3ac9e1a6a6f756c09fe4997f6 Author: Paolo Bonzini Date: Mon May 26 16:12:01 2025 -0400 Documentation: virt/kvm: remove unreferenced footnote Replace it with just the URL. Reported-by: Stephen Rothwell Signed-off-by: Paolo Bonzini commit f83fcb87f824b0bfbf1200590cc80f05e66488a7 Merge: 79b98edf918e81 f3e2e53823b98d Author: Linus Torvalds Date: Mon May 26 12:56:01 2025 -0700 Merge tag 'xfs-merge-6.16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Carlos Maiolino: - Atomic writes for XFS - Remove experimental warnings for pNFS, scrub and parent pointers * tag 'xfs-merge-6.16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (26 commits) xfs: add inode to zone caching for data placement xfs: free the item in xfs_mru_cache_insert on failure xfs: remove the EXPERIMENTAL warning for pNFS xfs: remove some EXPERIMENTAL warnings xfs: Remove deprecated xfs_bufd sysctl parameters xfs: stop using set_blocksize xfs: allow sysadmins to specify a maximum atomic write limit at mount time xfs: update atomic write limits xfs: add xfs_calc_atomic_write_unit_max() xfs: add xfs_file_dio_write_atomic() xfs: commit CoW-based atomic writes atomically xfs: add large atomic writes checks in xfs_direct_write_iomap_begin() xfs: add xfs_atomic_write_cow_iomap_begin() xfs: refine atomic write size check in xfs_file_write_iter() xfs: refactor xfs_reflink_end_cow_extent() xfs: allow block allocator to take an alignment hint xfs: ignore HW which cannot atomic write a single block xfs: add helpers to compute transaction reservation for finishing intent items xfs: add helpers to compute log item overhead xfs: separate out setting buftarg atomic writes limits ... commit f0b50730bdd8f2734e548de541e845c0d40dceb6 Author: Wentao Liang Date: Wed May 21 21:36:20 2025 +0800 net/mlx5_core: Add error handling inmlx5_query_nic_vport_qkey_viol_cntr() The function mlx5_query_nic_vport_qkey_viol_cntr() calls the function mlx5_query_nic_vport_context() but does not check its return value. This could lead to undefined behavior if the query fails. A proper implementation can be found in mlx5_nic_vport_query_local_lb(). Add error handling for mlx5_query_nic_vport_context(). If it fails, free the out buffer via kvfree() and return error code. Fixes: 9efa75254593 ("net/mlx5_core: Introduce access functions to query vport RoCE fields") Cc: stable@vger.kernel.org # v4.5 Signed-off-by: Wentao Liang Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250521133620.912-1-vulab@iscas.ac.cn Signed-off-by: Paolo Abeni commit 79b98edf918e8146047e08817e2a42937428be02 Merge: 522544fc71c27b b4a29efc51461e Author: Linus Torvalds Date: Mon May 26 12:47:41 2025 -0700 Merge tag 'erofs-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "In this cycle, Intel QAT hardware accelerators are supported to improve DEFLATE decompression performance. I've tested it with the enwik9 dataset of 1 MiB pclusters on our Intel Sapphire Rapids bare-metal server and a PL0 ESSD, and the sequential read performance even surpasses LZ4 software decompression on this setup. In addition, a `fsoffset` mount option is introduced for file-backed mounts to specify the filesystem offset in order to adapt customized container formats. And other improvements and minor cleanups. Summary: - Add a `fsoffset` mount option to specify the filesystem offset - Support Intel QAT accelerators to boost up the DEFLATE algorithm - Initialize per-CPU workers and CPU hotplug hooks lazily to avoid unnecessary overhead when EROFS is not mounted - Fix file handle encoding for 64-bit NIDs - Minor cleanups" * tag 'erofs-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: support DEFLATE decompression by using Intel QAT erofs: clean up erofs_{init,exit}_sysfs() erofs: add 'fsoffset' mount option to specify filesystem offset erofs: lazily initialize per-CPU workers and CPU hotplug hooks erofs: refine readahead tracepoint erofs: avoid using multiple devices with different type erofs: fix file handle encoding for 64-bit NIDs commit 57ee9584fd8606deef66d7b65fa4dcf94f6843aa Author: Horatiu Vultur Date: Wed May 21 14:41:59 2025 +0200 net: lan966x: Fix 1-step timestamping over ipv4 or ipv6 When enabling 1-step timestamping for ptp frames that are over udpv4 or udpv6 then the inserted timestamp is added at the wrong offset in the frame, meaning that will modify the frame at the wrong place, so the frame will be malformed. To fix this, the HW needs to know which kind of frame it is to know where to insert the timestamp. For that there is a field in the IFH that says the PDU_TYPE, which can be NONE which is the default value, IPV4 or IPV6. Therefore make sure to set the PDU_TYPE so the HW knows where to insert the timestamp. Like I mention before the issue is not seen with L2 frames because by default the PDU_TYPE has a value of 0, which represents the L2 frames. Fixes: 77eecf25bd9d2f ("net: lan966x: Update extraction/injection for timestamping") Signed-off-by: Horatiu Vultur Link: https://patch.msgid.link/20250521124159.2713525-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit 522544fc71c27b4b432386c7919f71ecc79a3bfb Merge: 8fdabcd9c01d9a 9caea9208fc3fb Author: Linus Torvalds Date: Mon May 26 12:43:30 2025 -0700 Merge tag 'bcachefs-2025-05-24' of git://evilpiepirate.org/bcachefs Pull bcachefs updates from Kent Overstreet: - Poisoned extents can now be moved: this lets us handle bitrotted data without deleting it. For now, reading from poisoned extents only returns -EIO: in the future we'll have an API for specifying "read this data even if there were bitflips". - Incompatible features may now be enabled at runtime, via "opts/version_upgrade" in sysfs. Toggle it to incompatible, and then toggle it back - option changes via the sysfs interface are persistent. - Various changes to support deployable disk images: - RO mounts now use less memory - Images may be stripped of alloc info, particularly useful for slimming them down if they will primarily be mounted RO. Alloc info will be automatically regenerated on first RW mount, and this is quite fast - Filesystem images generated with 'bcachefs image' will be automatically resized the first time they're mounted on a larger device The images 'bcachefs image' generates with compression enabled have been comparable in size to those generated by squashfs and erofs - but you get a full RW capable filesystem - Major error message improvements for btree node reads, data reads, and elsewhere. We now build up a single error message that lists all the errors encountered, actions taken to repair, and success/failure of the IO. This extends to other error paths that may kick off other actions, e.g. scheduling recovery passes: actions we took because of an error are included in that error message, with grouping/indentation so we can see what caused what. - New option, 'rebalance_on_ac_only'. Does exactly what the name suggests, quite handy with background compression. - Repair/self healing: - We can now kick off recovery passes and run them in the background if we detect errors. Currently, this is just used by code that walks backpointers. We now also check for missing backpointers at runtime and run check_extents_to_backpointers if required. The messy 6.14 upgrade left missing backpointers for some users, and this will correct that automatically instead of requiring a manual fsck - some users noticed this as copygc spinning and not making progress. In the future, as more recovery passes come online, we'll be able to repair and recover from nearly anything - except for unreadable btree nodes, and that's why you're using replication, of course - without shutting down the filesystem. - There's a new recovery pass, for checking the rebalance_work btree, which tracks extents that rebalance will process later. - Hardening: - Close the last known hole in btree iterator/btree locking assertions: path->should_be_locked paths must stay locked until the end of the transaction. This shook out a few bugs, including a performance issue that was causing unnecessary path_upgrade transaction restarts. - Performance: - Faster snapshot deletion: this is an incompatible feature, as it requires new sentinal values, for safety. Snapshot deletion no longer has to do a full metadata scan, it now just scans the inodes btree: if an extent/dirent/xattr is present for a given snapshot ID, we already require that an inode be present with that same snapshot ID. If/when users hit scalability limits again (ridiculously huge filesystems with lots of inodes, and many sparse snapshots), let me know - the next step will be to add an index from snapshot ID -> inode number, which won't be too hard. - Faster device removal: the "scan for pointers to this device" no longer does a full metadata scan, instead it walks backpointers. Like fast snapshot deletion this is another incompat feature: it also requires a new sentinal value, because we don't want to reuse these device IDs until after a fsck. - We're now coalescing redundant accounting updates prior to transaction commit, taking some pressure off the journal. Shortly we'll also be doing multiple extent updates in a transaction in the main write path, which combined with the previous should drastically cut down on the amount of metadata updates we have to journal. - Stack usage improvements: All allocator state has been moved off the stack - Debug improvements: - enumerated refcounts: The debug code previously used for filesystem write refs is now a small library, and used for other heavily used refcounts. Different users of a refcount are enumerated, making it much easier to debug refcount issues. - Async object debugging: There's a new kconfig option that makes various async objects (different types of bios, data updates, write ops, etc.) visible in debugfs, and it should be fast enough to leave on in production. - Various sets of assertions no longer require CONFIG_BCACHEFS_DEBUG, instead they're controlled by module parameters and static keys, meaning users won't need to compile custom kernels as often to help debug issues. - bch2_trans_kmalloc() calls can be tracked (there's a new kconfig option). With it on you can check the btree_transaction_stats in debugfs to see the bch2_trans_kmalloc() calls a transaction did when it used the most memory. * tag 'bcachefs-2025-05-24' of git://evilpiepirate.org/bcachefs: (218 commits) bcachefs: Don't mount bs > ps without TRANSPARENT_HUGEPAGE bcachefs: Fix btree_iter_next_node() for new locking asserts bcachefs: Ensure we don't use a blacklisted journal seq bcachefs: Small check_fix_ptr fixes bcachefs: Fix opts.recovery_pass_last bcachefs: Fix allocate -> self healing path bcachefs: Fix endianness in casefold check/repair bcachefs: Path must be locked if trans->locked && should_be_locked bcachefs: Simplify bch2_path_put() bcachefs: Plumb btree_trans for more locking asserts bcachefs: Clear trans->locked before unlock bcachefs: Clear should_be_locked before unlock in key_cache_drop() bcachefs: bch2_path_get() reuses paths if upgrade_fails & !should_be_locked bcachefs: Give out new path if upgrade fails bcachefs: Fix btree_path_get_locks when not doing trans restart bcachefs: btree_node_locked_type_nowrite() bcachefs: Kill bch2_path_put_nokeep() bcachefs: bch2_journal_write_checksum() bcachefs: Reduce stack usage in data_update_index_update() bcachefs: bch2_trans_log_str() ... commit 8fdabcd9c01d9ac585d8109a921e0734a69479fb Merge: a56d3133bd875d e320050eb75e91 Author: Linus Torvalds Date: Mon May 26 12:35:08 2025 -0700 Merge tag 'gfs2-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Fix the long-standing warnings in inode_to_wb() when CONFIG_LOCKDEP is enabled: gfs2 doesn't support cgroup writeback and so inode->i_wb will never change. This is the counterpart of commit 9e888998ea4d ("writeback: fix false warning in inode_to_wb()") - Fix a hang introduced by commit 8d391972ae2d ("gfs2: Remove __gfs2_writepage()"): prevent gfs2_logd from creating transactions for jdata pages while trying to flush the log - Fix a race between gfs2_create_inode() and gfs2_evict_inode() by deallocating partially created inodes on the gfs2_create_inode() error path - Fix a bug in the journal head lookup code that could cause mount to fail after successful recovery - Various smaller fixes and cleanups from various people * tag 'gfs2-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (23 commits) gfs2: No more gfs2_find_jhead caching gfs2: Get rid of duplicate log head lookup gfs2: Simplify clean_journal gfs2: Simplify gfs2_log_pointers_init gfs2: Move gfs2_log_pointers_init gfs2: Minor comments fix gfs2: Don't start unnecessary transactions during log flush gfs2: Move gfs2_trans_add_databufs gfs2: Rename jdata_dirty_folio to gfs2_jdata_dirty_folio gfs2: avoid inefficient use of crc32_le_shift() gfs2: Do not call iomap_zero_range beyond eof gfs: don't check for AOP_WRITEPAGE_ACTIVATE in gfs2_write_jdata_batch gfs2: Fix usage of bio->bi_status in gfs2_end_log_write gfs2: deallocate inodes in gfs2_create_inode gfs2: Move GIF_ALLOC_FAILED check out of gfs2_ea_dealloc gfs2: Move gfs2_dinode_dealloc gfs2: Don't reread inodes unnecessarily gfs2: gfs2_create_inode error handling fix gfs2: Remove unnecessary NULL check before free_percpu() gfs2: check sb_min_blocksize return value ... commit a56d3133bd875d90ef3237f24e37b75b6d0326a9 Merge: 5e82ed5ca4b510 c6b1908224593d Author: Linus Torvalds Date: Mon May 26 12:28:55 2025 -0700 Merge tag 'configfs-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux Pull configfs updates from Andreas Hindborg: - Allow creation of rw files with custom permissions. This allows drivers to better protect secrets written through configfs - Fix a bug where an error condition did not cause an early return while populating attributes - Report ENOMEM rather than EFAULT when kvasprintf() fails in config_item_set_name() - Add a Rust API for configfs. This allows Rust drivers to use configfs through a memory safe interface * tag 'configfs-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux: MAINTAINERS: add configfs Rust abstractions rust: configfs: add a sample demonstrating configfs usage rust: configfs: introduce rust support for configfs configfs: Correct error value returned by API config_item_set_name() configfs: Do not override creating attribute file failure in populate_attrs() configfs: Delete semicolon from macro type_print() definition configfs: Add CONFIGFS_ATTR_PERM helper commit 5e82ed5ca4b510e0ff53af1e12e94e6aa1fe5a93 Merge: 49fffac983ac52 eeb133a6341280 Author: Linus Torvalds Date: Mon May 26 12:24:43 2025 -0700 Merge tag 'for-6.16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "Apart from numerous cleanups, there are some performance improvements and one minor mount option update. There's one more radix-tree conversion (one remaining), and continued work towards enabling large folios (almost finished). Performance: - extent buffer conversion to xarray gains throughput and runtime improvements on metadata heavy operations doing writeback (sample test shows +50% throughput, -33% runtime) - extent io tree cleanups lead to performance improvements by avoiding unnecessary searches or repeated searches - more efficient extent unpinning when committing transaction (estimated run time improvement 3-5%) User visible changes: - remove standalone mount option 'nologreplay', deprecated in 5.9, replacement is 'rescue=nologreplay' - in scrub, update reporting, add back device stats message after detected errors (accidentally removed during recent refactoring) Core: - convert extent buffer radix tree to xarray - in subpage mode, move block perfect compression out of experimental build - in zoned mode, introduce sub block groups to allow managing special block groups, like the one for relocation or tree-log, to handle some corner cases of ENOSPC - in scrub, simplify bitmaps for block tracking status - continued preparations for large folios: - remove assertions for folio order 0 - add support where missing: compression, buffered write, defrag, hole punching, subpage, send - fix fsync of files with no hard links not persisting deletion - reject tree blocks which are not nodesize aligned, a precaution from 4.9 times - move transaction abort calls closer to the error sites - remove usage of some struct bio_vec internals - simplifications in extent map - extent IO cleanups and optimizations - error handling improvements - enhanced ASSERT() macro with optional format strings - cleanups: - remove unused code - naming unifications, dropped __, added prefix - merge similar functions - use common helpers for various data structures" * tag 'for-6.16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (198 commits) btrfs: move misplaced comment of btrfs_path::keep_locks btrfs: remove standalone "nologreplay" mount option btrfs: use a single variable to track return value at btrfs_page_mkwrite() btrfs: don't return VM_FAULT_SIGBUS on failure to set delalloc for mmap write btrfs: simplify early error checking in btrfs_page_mkwrite() btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite() btrfs: fix wrong start offset for delalloc space release during mmap write btrfs: fix harmless race getting delayed ref head count when running delayed refs btrfs: log error codes during failures when writing super blocks btrfs: simplify error return logic when getting folio at prepare_one_folio() btrfs: return real error from __filemap_get_folio() calls btrfs: remove superfluous return value check at btrfs_dio_iomap_begin() btrfs: fix invalid data space release when truncating block in NOCOW mode btrfs: update Kconfig option descriptions btrfs: update list of features built under experimental config btrfs: send: remove btrfs_debug() calls btrfs: use boolean for delalloc argument to btrfs_free_reserved_extent() btrfs: use boolean for delalloc argument to btrfs_free_reserved_bytes() btrfs: fold error checks when allocating ordered extent and update comments btrfs: check we grabbed inode reference when allocating an ordered extent ... commit 3e0c509fbdb106ba2d2fa13beafe58f4ba11e13d Merge: 76524ffd103833 6cfb07e61b7ba5 Author: Rafael J. Wysocki Date: Mon May 26 21:24:27 2025 +0200 Merge branch 'pm-tools' Merge a cpupower utility update for 6.16-rc1 that adds a systemd service to run cpupower and changes binding's Makefile to use -lcpupower (John B. Wyatt IV, Francesco Poli). * pm-tools: cpupower: do not install files to /etc/default/ cpupower: do not call systemctl at install time cpupower: do not write DESTDIR to cpupower.service cpupower: change binding's makefile to use -lcpupower cpupower: add a systemd service to run cpupower commit 76524ffd103833a8189ca4b5998ee0ce4a000591 Merge: af86d7e88e3069 40d3b40dce375d eca64130413421 Author: Rafael J. Wysocki Date: Mon May 26 21:21:58 2025 +0200 Merge branches 'pm-runtime' and 'pm-sleep' Merge updates related to system sleep handling and runtime PM for 6.16-rc1: - Fix denying of auto suspend in pm_suspend_timer_fn() (Charan Teja Kalla). - Move debug runtime PM attributes to runtime_attrs[] (Rafael Wysocki). - Add new devm_ functions for enabling runtime PM and runtime PM reference counting (Bence Csókás). - Remove size arguments from strscpy() calls in the hibernation core code (Thorsten Blum). - Adjust the handling of devices with asynchronous suspend enabled during system suspend and resume to start resuming them immediately after resuming their parents and to start suspending such a device immediately after suspending its first child (Rafael Wysocki). - Adjust messages printed during tasks freezing to avoid using pr_cont() (Andrew Sayers, Paul Menzel). - Clean up unnecessary usage of !! in pm_print_times_init() (Zihuan Zhang). - Add missing wakeup source attribute relax_count to sysfs and remove the space character at the end ofi the string produced by pm_show_wakelocks() (Zijun Hu). - Add configurable pm_test delay for hibernation (Zihuan Zhang). - Disable asynchronous suspend in ucsi_ccg_probe() to prevent the cypd4226 device on Tegra boards from suspending prematurely (Jon Hunter). - Unbreak printing PM debug messages during hibernation and clean up some related code (Rafael Wysocki). * pm-runtime: PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() PM: sysfs: Move debug runtime PM attributes to runtime_attrs[] PM: runtime: Add new devm functions * pm-sleep: PM: freezer: Rewrite restarting tasks log to remove stray *done.* PM: sleep: Introduce pm_sleep_transition_in_progress() PM: sleep: Introduce pm_suspend_in_progress() PM: sleep: Print PM debug messages during hibernation ucsi_ccg: Disable async suspend in ucsi_ccg_probe() PM: hibernate: add configurable delay for pm_test PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks() PM: wakeup: Add missing wakeup source attribute relax_count PM: sleep: Remove unnecessary !! PM: sleep: Use two lines for "Restarting..." / "done" messages PM: sleep: Make suspend of devices more asynchronous PM: sleep: Suspend async parents after suspending children PM: sleep: Resume children after resuming the parent PM: hibernate: Remove size arguments when calling strscpy() commit af86d7e88e3069f19138cabb3d32dd1e39bf3f9e Merge: f34dc283434730 5836ebeb4a2b7e Author: Rafael J. Wysocki Date: Mon May 26 21:18:34 2025 +0200 Merge branch 'pm-cpuidle' Merge cpuidle updates for 6.16-rc1: - Optimize bucket assignment when next_timer_ns equals KTIME_MAX in the menu cpuidle governor (Zhongqiu Han). - Convert the cpuidle PSCI driver to a faux device one (Sudeep Holla). - Add C1 demotion on/off sysfs knob to the intel_idle driver (Artem Bityutskiy). - Fix typos in two comments in the teo cpuidle governor (Atul Kumar Pant). * pm-cpuidle: cpuidle: psci: Avoid initializing faux device if no DT idle states are present Documentation: ABI: testing: document the new cpuidle sysfs file Documentation: admin-guide: pm: Document intel_idle C1 demotion intel_idle: Add C1 demotion on/off sysfs knob cpuidle: psci: Transition to the faux device interface cpuidle: menu: Optimize bucket assignment when next_timer_ns equals KTIME_MAX cpuidle: teo: Fix typos in two comments commit 49fffac983ac52aea0ab94914be3f56bcf92d5dc Merge: 6f59de9bc0d576 6faaf6e0faf1cc Author: Linus Torvalds Date: Mon May 26 12:13:22 2025 -0700 Merge tag 'for-6.16/io_uring-20250523' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: - Avoid indirect function calls in io-wq for executing and freeing work. The design of io-wq is such that it can be a generic mechanism, but as it's just used by io_uring now, may as well avoid these indirect calls - Clean up registered buffers for networking - Add support for IORING_OP_PIPE. Pretty straight forward, allows creating pipes with io_uring, particularly useful for having these be instantiated as direct descriptors - Clean up the coalescing support fore registered buffers - Add support for multiple interface queues for zero-copy rx networking. As this feature was merged for 6.15 it supported just a single ifq per ring - Clean up the eventfd support - Add dma-buf support to zero-copy rx - Clean up and improving the request draining support - Clean up provided buffer support, most notably with an eye toward making the legacy support less intrusive - Minor fdinfo cleanups, dropping support for dumping what credentials are registered - Improve support for overflow CQE handling, getting rid of GFP_ATOMIC for allocating overflow entries where possible - Improve detection of cases where io-wq doesn't need to spawn a new worker unnecessarily - Various little cleanups * tag 'for-6.16/io_uring-20250523' of git://git.kernel.dk/linux: (59 commits) io_uring/cmd: warn on reg buf imports by ineligible cmds io_uring/io-wq: only create a new worker if it can make progress io_uring/io-wq: ignore non-busy worker going to sleep io_uring/io-wq: move hash helpers to the top trace/io_uring: fix io_uring_local_work_run ctx documentation io_uring: finish IOU_OK -> IOU_COMPLETE transition io_uring: add new helpers for posting overflows io_uring: pass in struct io_big_cqe to io_alloc_ocqe() io_uring: make io_alloc_ocqe() take a struct io_cqe pointer io_uring: split alloc and add of overflow io_uring: open code io_req_cqe_overflow() io_uring/fdinfo: get rid of dumping credentials io_uring/fdinfo: only compile if CONFIG_PROC_FS is set io_uring/kbuf: unify legacy buf provision and removal io_uring/kbuf: refactor __io_remove_buffers io_uring/kbuf: don't compute size twice on prep io_uring/kbuf: drop extra vars in io_register_pbuf_ring io_uring/kbuf: use mem_is_zero() io_uring/kbuf: account ring io_buffer_list memory io_uring: drain based on allocates reqs ... commit 6f59de9bc0d576eb5a5edfea470527902315e924 Merge: 3e406741b19890 533c87e2ed7424 Author: Linus Torvalds Date: Mon May 26 11:39:36 2025 -0700 Merge tag 'for-6.16/block-20250523' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - ublk updates: - Add support for updating the size of a ublk instance - Zero-copy improvements - Auto-registering of buffers for zero-copy - Series simplifying and improving GET_DATA and request lookup - Series adding quiesce support - Lots of selftests additions - Various cleanups - NVMe updates via Christoph: - add per-node DMA pools and use them for PRP/SGL allocations (Caleb Sander Mateos, Keith Busch) - nvme-fcloop refcounting fixes (Daniel Wagner) - support delayed removal of the multipath node and optionally support the multipath node for private namespaces (Nilay Shroff) - support shared CQs in the PCI endpoint target code (Wilfred Mallawa) - support admin-queue only authentication (Hannes Reinecke) - use the crc32c library instead of the crypto API (Eric Biggers) - misc cleanups (Christoph Hellwig, Marcelo Moreira, Hannes Reinecke, Leon Romanovsky, Gustavo A. R. Silva) - MD updates via Yu: - Fix that normal IO can be starved by sync IO, found by mkfs on newly created large raid5, with some clean up patches for bdev inflight counters - Clean up brd, getting rid of atomic kmaps and bvec poking - Add loop driver specifically for zoned IO testing - Eliminate blk-rq-qos calls with a static key, if not enabled - Improve hctx locking for when a plug has IO for multiple queues pending - Remove block layer bouncing support, which in turn means we can remove the per-node bounce stat as well - Improve blk-throttle support - Improve delay support for blk-throttle - Improve brd discard support - Unify IO scheduler switching. This should also fix a bunch of lockdep warnings we've been seeing, after enabling lockdep support for queue freezing/unfreezeing - Add support for block write streams via FDP (flexible data placement) on NVMe - Add a bunch of block helpers, facilitating the removal of a bunch of duplicated boilerplate code - Remove obsolete BLK_MQ pci and virtio Kconfig options - Add atomic/untorn write support to blktrace - Various little cleanups and fixes * tag 'for-6.16/block-20250523' of git://git.kernel.dk/linux: (186 commits) selftests: ublk: add test for UBLK_F_QUIESCE ublk: add feature UBLK_F_QUIESCE selftests: ublk: add test case for UBLK_U_CMD_UPDATE_SIZE traceevent/block: Add REQ_ATOMIC flag to block trace events ublk: run auto buf unregisgering in same io_ring_ctx with registering io_uring: add helper io_uring_cmd_ctx_handle() ublk: remove io argument from ublk_auto_buf_reg_fallback() ublk: handle ublk_set_auto_buf_reg() failure correctly in ublk_fetch() selftests: ublk: add test for covering UBLK_AUTO_BUF_REG_FALLBACK selftests: ublk: support UBLK_F_AUTO_BUF_REG ublk: support UBLK_AUTO_BUF_REG_FALLBACK ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG ublk: prepare for supporting to register request buffer automatically ublk: convert to refcount_t selftests: ublk: make IO & device removal test more stressful nvme: rename nvme_mpath_shutdown_disk to nvme_mpath_remove_disk nvme: introduce multipath_always_on module param nvme-multipath: introduce delayed removal of the multipath head node nvme-pci: derive and better document max segments limits nvme-pci: use struct_size for allocation struct nvme_dev ... commit 92a251c3df8ea1991cd9fe00f1ab0cfce18d7711 Author: Jack Morgenstein Date: Wed May 21 14:36:02 2025 +0300 RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work The cited commit fixed a crash when cma_netevent_callback was called for a cma_id while work on that id from a previous call had not yet started. The work item was re-initialized in the second call, which corrupted the work item currently in the work queue. However, it left a problem when queue_work fails (because the item is still pending in the work queue from a previous call). In this case, cma_id_put (which is called in the work handler) is therefore not called. This results in a userspace process hang (zombie process). Fix this by calling cma_id_put() if queue_work fails. Fixes: 45f5dcdd0497 ("RDMA/cma: Fix workqueue crash in cma_netevent_work_handler") Link: https://patch.msgid.link/r/4f3640b501e48d0166f312a64fdadf72b059bd04.1747827103.git.leon@kernel.org Signed-off-by: Jack Morgenstein Signed-off-by: Feng Liu Reviewed-by: Vlad Dumitrescu Signed-off-by: Leon Romanovsky Reviewed-by: Sharath Srinivasan Reviewed-by: Kalesh AP Signed-off-by: Jason Gunthorpe commit ef2233850edc4cc0d5fc6136fcdb004a1ddfa7db Merge: 260ce16e579d37 0ff41df1cb268f Author: Jason Gunthorpe Date: Mon May 26 15:32:29 2025 -0300 Merge tag 'v6.15' into rdma.git for-next Following patches need the RDMA rc branch since we are past the RC cycle now. Merge conflicts resolved based on Linux-next: - For RXE odp changes keep for-next version and fixup new places that need to call is_odp_mr() https://lore.kernel.org/r/20250422143019.500201bd@canb.auug.org.au https://lore.kernel.org/r/20250514122455.3593b083@canb.auug.org.au - irdma is keeping the while/kfree bugfix from -rc and the pf/cdev_info change from for-next https://lore.kernel.org/r/20250513130630.280ee6c5@canb.auug.org.au Signed-off-by: Jason Gunthorpe commit 3e406741b19890c3d8a2ed126aa7c23b106ca9e1 Merge: a2e43397e57e94 7ec091c5598642 Author: Linus Torvalds Date: Mon May 26 11:32:28 2025 -0700 Merge tag 'vfs-6.16-rc1.selftests' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs selftests updates from Christian Brauner: "This contains various cleanups, fixes, and extensions for out filesystem selftests" * tag 'vfs-6.16-rc1.selftests' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: selftests/fs/mount-notify: add a test variant running inside userns selftests/filesystems: create setup_userns() helper selftests/filesystems: create get_unique_mnt_id() helper selftests/fs/mount-notify: build with tools include dir selftests/mount_settattr: remove duplicate syscall definitions selftests/pidfd: move syscall definitions into wrappers.h selftests/fs/statmount: build with tools include dir selftests/filesystems: move wrapper.h out of overlayfs subdir selftests/mount_settattr: ensure that ext4 filesystem can be created selftests/mount_settattr: add missing STATX_MNT_ID_UNIQUE define selftests/mount_settattr: don't define sys_open_tree() twice commit a2e43397e57e9451954b2a1d3bf4ac195ac185ad Merge: c5bfc48d5472fc 2cb0e96cb01b4d Author: Linus Torvalds Date: Mon May 26 11:28:42 2025 -0700 Merge tag 'vfs-6.16-rc1.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull iomap updates from Christian Brauner: - More fallout and preparatory work associated with the folio batch prototype posted a while back. Mainly this just cleans up some of the helpers and pushes some pos/len trimming further down in the write begin path. - Add missing flag descriptions to the iomap documentation * tag 'vfs-6.16-rc1.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: iomap: rework iomap_write_begin() to return folio offset and length iomap: push non-large folio check into get folio path iomap: helper to trim pos/bytes to within folio iomap: drop pos param from __iomap_[get|put]_folio() iomap: drop unnecessary pos param from iomap_write_[begin|end] iomap: resample iter->pos after iomap_write_begin() calls iomap: trace: Add missing flags to [IOMAP_|IOMAP_F_]FLAGS_STRINGS Documentation: iomap: Add missing flags description commit f34dc2834347301d4652464867f096048df546ff Merge: e481e10ab59c73 922607a2b462b8 Author: Rafael J. Wysocki Date: Mon May 26 20:19:40 2025 +0200 Merge branch 'pm-cpufreq' Merge cpufreq updates for 6.16-rc1: - Refactor cpufreq_online(), add and use cpufreq policy locking guards, use __free() in policy reference counting, and clean up core cpufreq code on top of that (Rafael Wysocki). - Fix boost handling on CPU suspend/resume and sysfs updates (Viresh Kumar). - Fix des_perf clamping with max_perf in amd_pstate_update() (Dhananjay Ugwekar). - Add offline, online and suspend callbacks to the amd-pstate driver, rename and use the existing amd_pstate_epp callbacks in it (Dhananjay Ugwekar). - Add support for the "Requested CPU Min frequency" BIOS option to the amd-pstate driver (Dhananjay Ugwekar). - Reset amd-pstate driver mode after running selftests (Swapnil Sapkal). - Add helper for governor checks to the schedutil cpufreq governor and move cpufreq-specific EAS checks to cpufreq (Rafael Wysocki). - Populate the cpu_capacity sysfs entries from the intel_pstate driver after registering asym capacity support (Ricardo Neri). - Add support for enabling Energy-aware scheduling (EAS) to the intel_pstate driver when operating in the passive mode on a hybrid platform (Rafael Wysocki). - Avoid shadowing ret in amd_pstate_ut_check_driver() (Nathan Chancellor). - Drop redundant cpus_read_lock() from store_local_boost() in the cpufreq core (Seyediman Seyedarab). - Replace sscanf() with kstrtouint() in the cpufreq code and use a symbol instead of a raw number in it (Bowen Yu). - Add support for autonomous CPU performance state selection to the CPPC cpufreq driver (Lifeng Zheng). * pm-cpufreq: (31 commits) cpufreq: CPPC: Add support for autonomous selection cpufreq: Update sscanf() to kstrtouint() cpufreq: Replace magic number cpufreq: drop redundant cpus_read_lock() from store_local_boost() cpufreq/amd-pstate: Avoid shadowing ret in amd_pstate_ut_check_driver() cpufreq: intel_pstate: Document hybrid processor support cpufreq: intel_pstate: EAS: Increase cost for CPUs using L3 cache cpufreq: intel_pstate: EAS support for hybrid platforms cpufreq: Drop policy locking from cpufreq_policy_is_good_for_eas() cpufreq: intel_pstate: Populate the cpu_capacity sysfs entries arch_topology: Relocate cpu_scale to topology.[h|c] cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq cpufreq/sched: schedutil: Add helper for governor checks amd-pstate-ut: Reset amd-pstate driver mode after running selftests cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver cpufreq: Force sync policy boost with global boost on sysfs update cpufreq: Preserve policy's boost state after resume cpufreq: Introduce policy_set_boost() cpufreq: Don't unnecessarily call set_boost() ... commit c5bfc48d5472fc60abafb510668d7bc3b5ecb401 Merge: 7d7a103d299eb5 4e83ae6ec87ddd Author: Linus Torvalds Date: Mon May 26 11:17:01 2025 -0700 Merge tag 'vfs-6.16-rc1.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull coredump updates from Christian Brauner: "This adds support for sending coredumps over an AF_UNIX socket. It also makes (implicit) use of the new SO_PEERPIDFD ability to hand out pidfds for reaped peer tasks The new coredump socket will allow userspace to not have to rely on usermode helpers for processing coredumps and provides a saf way to handle them instead of relying on super privileged coredumping helpers This will also be significantly more lightweight since the kernel doens't have to do a fork()+exec() for each crashing process to spawn a usermodehelper. Instead the kernel just connects to the AF_UNIX socket and userspace can process it concurrently however it sees fit. Support for userspace is incoming starting with systemd-coredump There's more work coming in that direction next cycle. The rest below goes into some details and background Coredumping currently supports two modes: (1) Dumping directly into a file somewhere on the filesystem. (2) Dumping into a pipe connected to a usermode helper process spawned as a child of the system_unbound_wq or kthreadd For simplicity I'm mostly ignoring (1). There's probably still some users of (1) out there but processing coredumps in this way can be considered adventurous especially in the face of set*id binaries The most common option should be (2) by now. It works by allowing userspace to put a string into /proc/sys/kernel/core_pattern like: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h The "|" at the beginning indicates to the kernel that a pipe must be used. The path following the pipe indicator is a path to a binary that will be spawned as a usermode helper process. Any additional parameters pass information about the task that is generating the coredump to the binary that processes the coredump In the example the core_pattern shown causes the kernel to spawn systemd-coredump as a usermode helper. There's various conceptual consequences of this (non-exhaustive list): - systemd-coredump is spawned with file descriptor number 0 (stdin) connected to the read-end of the pipe. All other file descriptors are closed. That specifically includes 1 (stdout) and 2 (stderr). This has already caused bugs because userspace assumed that this cannot happen (Whether or not this is a sane assumption is irrelevant) - systemd-coredump will be spawned as a child of system_unbound_wq. So it is not a child of any userspace process and specifically not a child of PID 1. It cannot be waited upon and is in a weird hybrid upcall which are difficult for userspace to control correctly - systemd-coredump is spawned with full kernel privileges. This necessitates all kinds of weird privilege dropping excercises in userspace to make this safe - A new usermode helper has to be spawned for each crashing process This adds a new mode: (3) Dumping into an AF_UNIX socket Userspace can set /proc/sys/kernel/core_pattern to: @/path/to/coredump.socket The "@" at the beginning indicates to the kernel that an AF_UNIX coredump socket will be used to process coredumps The coredump socket must be located in the initial mount namespace. When a task coredumps it opens a client socket in the initial network namespace and connects to the coredump socket: - The coredump server uses SO_PEERPIDFD to get a stable handle on the connected crashing task. The retrieved pidfd will provide a stable reference even if the crashing task gets SIGKILLed while generating the coredump. That is a huge attack vector right now - By setting core_pipe_limit non-zero userspace can guarantee that the crashing task cannot be reaped behind it's back and thus process all necessary information in /proc/. The SO_PEERPIDFD can be used to detect whether /proc/ still refers to the same process The core_pipe_limit isn't used to rate-limit connections to the socket. This can simply be done via AF_UNIX socket directly - The pidfd for the crashing task will contain information how the task coredumps. The PIDFD_GET_INFO ioctl gained a new flag PIDFD_INFO_COREDUMP which can be used to retreive the coredump information If the coredump gets a new coredump client connection the kernel guarantees that PIDFD_INFO_COREDUMP information is available. Currently the following information is provided in the new @coredump_mask extension to struct pidfd_info: * PIDFD_COREDUMPED is raised if the task did actually coredump * PIDFD_COREDUMP_SKIP is raised if the task skipped coredumping (e.g., undumpable) * PIDFD_COREDUMP_USER is raised if this is a regular coredump and doesn't need special care by the coredump server * PIDFD_COREDUMP_ROOT is raised if the generated coredump should be treated as sensitive and the coredump server should restrict access to the generated coredump to sufficiently privileged users" * tag 'vfs-6.16-rc1.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: mips, net: ensure that SOCK_COREDUMP is defined selftests/coredump: add tests for AF_UNIX coredumps selftests/pidfd: add PIDFD_INFO_COREDUMP infrastructure coredump: validate socket name as it is written coredump: show supported coredump modes pidfs, coredump: add PIDFD_INFO_COREDUMP coredump: add coredump socket coredump: reflow dump helpers a little coredump: massage do_coredump() coredump: massage format_corename() commit e481e10ab59c73571595230fa2ca44f9ad1e0e17 Merge: ba09aae9400a1b 4a6b1cf0d4c02d Author: Rafael J. Wysocki Date: Mon May 26 20:14:58 2025 +0200 Merge branch 'pm-em' Merge energy model management code updates for 6.16-rc1: - Fix potential division-by-zero error in em_compute_costs() (Yaxiong Tian). - Fix typos in energy model documentation and example driver code (Moon Hee Lee, Atul Kumar Pant). - Rearrange the energy model management code and add a new function for adjusting a CPU energy model after adjusting the capacity of the given CPU to it (Rafael Wysocki). * pm-em: PM: EM: Introduce em_adjust_cpu_capacity() PM: EM: Move CPU capacity check to em_adjust_new_capacity() PM: EM: Documentation: Fix typos in example driver code PM: EM: Documentation: fix typo in energy-model.rst PM: EM: Fix potential division-by-zero error in em_compute_costs() commit db0e4d5429c909db9c252be59bd872ab628c78c6 Merge: f5b4df96ee890a 113e04276018bd dc918c34e2ac86 dd133162c9cff5 6db0261f3776bd Author: Rafael J. Wysocki Date: Mon May 26 19:42:29 2025 +0200 Merge branches 'acpi-resource', 'acpi-pm', 'acpi-platform-profile' and 'acpi-docs' Merge an ACPI resources management update, ACPI power management updates, an ACPI platform profile driver fix and an ACPI documentation update related to device properties for 6.16-rc1: - Fix a typo for MECHREVO in irq1_edge_low_force_override[] (Mingcong Bai). - Add an LPS0 check() callback to the AMD pinctrl driver and fix up config symbol dependencies in it (Mario Limonciello, Rafael Wysocki). - Avoid initializing the ACPI platform profile driver on non-ACPI platforms (Alexandre Ghiti). - Document that references to ACPI data (non-device) nodes should use string-only references in hierarchical data node packages (Sakari Ailus). * acpi-resource: ACPI: resource: fix a typo for MECHREVO in irq1_edge_low_force_override[] * acpi-pm: pinctrl: amd: Fix hibernation support with CONFIG_SUSPEND unset pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' pinctrl: amd: Add an LPS0 check() callback ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case * acpi-platform-profile: ACPI: platform_profile: Avoid initializing on non-ACPI platforms * acpi-docs: Documentation: ACPI: Use all-string data node references commit f5b4df96ee890a075b3004f913fea8d2143df7ca Merge: 0a17adc6be08c5 eba614b8280a97 234f71555019d3 9cd51eefae3c87 e54b1dc1c4f083 Author: Rafael J. Wysocki Date: Mon May 26 19:31:50 2025 +0200 Merge branches 'acpi-pci', 'acpi-battery', 'acpi-ec' and 'acpi-apei' Merge an ACPI PCI root driver update, ACPI battery driver updates, an ACPI EC driver update and APEI updates for 6.16-rc1: - Turn the acpi_pci_root_remap_iospace() fwnode_handle parameter into a const pointer (Pei Xiao). - Round battery capacity percengate in the ACPI battery driver to the closest integer to avoid user confusion (shitao). - Make the ACPI battery driver report the current as a negative number to the power supply framework when the battery is discharging as documented (Peter Marheine). - Add TUXEDO InfinityBook Pro AMD Gen9 to the acpi_ec_no_wakeup[] list to prevent spurious wakeups from suspend-to-idle (Werner Sembach). - Convert the APEI EINJ driver to a faux device one (Sudeep Holla, Jon Hunter). - Remove redundant calls to einj_get_available_error_type() from the APEI EINJ driver (Zaid Alali). * acpi-pci: ACPI: PCI: Constify fwnode_handle in acpi_pci_root_remap_iospace() * acpi-battery: ACPI: battery: negate current when discharging ACPI: battery: Round capacity percengate to closest integer * acpi-ec: ACPI: EC: Add device to acpi_ec_no_wakeup[] qurik list * acpi-apei: ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type() ACPI: APEI: EINJ: Fix probe error message ACPI: APEI: EINJ: Transition to the faux device interface commit 7d7a103d299eb5b95d67873c5ea7db419eaaebc0 Merge: 2ca3534623f41d db56723ceaec87 Author: Linus Torvalds Date: Mon May 26 10:30:02 2025 -0700 Merge tag 'vfs-6.16-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull pidfs updates from Christian Brauner: "Features: - Allow handing out pidfds for reaped tasks for AF_UNIX SO_PEERPIDFD socket option SO_PEERPIDFD is a socket option that allows to retrieve a pidfd for the process that called connect() or listen(). This is heavily used to safely authenticate clients in userspace avoiding security bugs due to pid recycling races (dbus, polkit, systemd, etc.) SO_PEERPIDFD currently doesn't support handing out pidfds if the sk->sk_peer_pid thread-group leader has already been reaped. In this case it currently returns EINVAL. Userspace still wants to get a pidfd for a reaped process to have a stable handle it can pass on. This is especially useful now that it is possible to retrieve exit information through a pidfd via the PIDFD_GET_INFO ioctl()'s PIDFD_INFO_EXIT flag Another summary has been provided by David Rheinsberg: > A pidfd can outlive the task it refers to, and thus user-space > must already be prepared that the task underlying a pidfd is > gone at the time they get their hands on the pidfd. For > instance, resolving the pidfd to a PID via the fdinfo must be > prepared to read `-1`. > > Despite user-space knowing that a pidfd might be stale, several > kernel APIs currently add another layer that checks for this. In > particular, SO_PEERPIDFD returns `EINVAL` if the peer-task was > already reaped, but returns a stale pidfd if the task is reaped > immediately after the respective alive-check. > > This has the unfortunate effect that user-space now has two ways > to check for the exact same scenario: A syscall might return > EINVAL/ESRCH/... *or* the pidfd might be stale, even though > there is no particular reason to distinguish both cases. This > also propagates through user-space APIs, which pass on pidfds. > They must be prepared to pass on `-1` *or* the pidfd, because > there is no guaranteed way to get a stale pidfd from the kernel. > > Userspace must already deal with a pidfd referring to a reaped > task as the task may exit and get reaped at any time will there > are still many pidfds referring to it In order to allow handing out reaped pidfd SO_PEERPIDFD needs to ensure that PIDFD_INFO_EXIT information is available whenever a pidfd for a reaped task is created by PIDFD_INFO_EXIT. The uapi promises that reaped pidfds are only handed out if it is guaranteed that the caller sees the exit information: TEST_F(pidfd_info, success_reaped) { struct pidfd_info info = { .mask = PIDFD_INFO_CGROUPID | PIDFD_INFO_EXIT, }; /* * Process has already been reaped and PIDFD_INFO_EXIT been set. * Verify that we can retrieve the exit status of the process. */ ASSERT_EQ(ioctl(self->child_pidfd4, PIDFD_GET_INFO, &info), 0); ASSERT_FALSE(!!(info.mask & PIDFD_INFO_CREDS)); ASSERT_TRUE(!!(info.mask & PIDFD_INFO_EXIT)); ASSERT_TRUE(WIFEXITED(info.exit_code)); ASSERT_EQ(WEXITSTATUS(info.exit_code), 0); } To hand out pidfds for reaped processes we thus allocate a pidfs entry for the relevant sk->sk_peer_pid at the time the sk->sk_peer_pid is stashed and drop it when the socket is destroyed. This guarantees that exit information will always be recorded for the sk->sk_peer_pid task and we can hand out pidfds for reaped processes - Hand a pidfd to the coredump usermode helper process Give userspace a way to instruct the kernel to install a pidfd for the crashing process into the process started as a usermode helper. There's still tricky race-windows that cannot be easily or sometimes not closed at all by userspace. There's various ways like looking at the start time of a process to make sure that the usermode helper process is started after the crashing process but it's all very very brittle and fraught with peril The crashed-but-not-reaped process can be killed by userspace before coredump processing programs like systemd-coredump have had time to manually open a PIDFD from the PID the kernel provides them, which means they can be tricked into reading from an arbitrary process, and they run with full privileges as they are usermode helper processes Even if that specific race-window wouldn't exist it's still the safest and cleanest way to let the kernel provide the pidfd directly instead of requiring userspace to do it manually. In parallel with this commit we already have systemd adding support for this in [1] When the usermode helper process is forked we install a pidfd file descriptor three into the usermode helper's file descriptor table so it's available to the exec'd program Since usermode helpers are either children of the system_unbound_wq workqueue or kthreadd we know that the file descriptor table is empty and can thus always use three as the file descriptor number Note, that we'll install a pidfd for the thread-group leader even if a subthread is calling do_coredump(). We know that task linkage hasn't been removed yet and even if this @current isn't the actual thread-group leader we know that the thread-group leader cannot be reaped until @current has exited - Allow telling when a task has not been found from finding the wrong task when creating a pidfd We currently report EINVAL whenever a struct pid has no tasked attached anymore thereby conflating two concepts: (1) The task has already been reaped (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader This is causing issues for non-threaded workloads as in where they expect ESRCH to be reported, not EINVAL So allow userspace to reliably distinguish between (1) and (2) - Make it possible to detect when a pidfs entry would outlive the struct pid it pinned - Add a range of new selftests Cleanups: - Remove unneeded NULL check from pidfd_prepare() for passed struct pid - Avoid pointless reference count bump during release_task() Fixes: - Various fixes to the pidfd and coredump selftests - Fix error handling for replace_fd() when spawning coredump usermode helper" * tag 'vfs-6.16-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: pidfs: detect refcount bugs coredump: hand a pidfd to the usermode coredump helper coredump: fix error handling for replace_fd() pidfs: move O_RDWR into pidfs_alloc_file() selftests: coredump: Raise timeout to 2 minutes selftests: coredump: Fix test failure for slow machines selftests: coredump: Properly initialize pointer net, pidfs: enable handing out pidfds for reaped sk->sk_peer_pid pidfs: get rid of __pidfd_prepare() net, pidfs: prepare for handing out pidfds for reaped sk->sk_peer_pid pidfs: register pid in pidfs net, pidfd: report EINVAL for ESRCH release_task: kill the no longer needed get/put_pid(thread_pid) pidfs: ensure consistent ENOENT/ESRCH reporting exit: move wake_up_all() pidfd waiters into __unhash_process() selftest/pidfd: add test for thread-group leader pidfd open for thread pidfd: improve uapi when task isn't found pidfd: remove unneeded NULL check from pidfd_prepare() selftests/pidfd: adapt to recent changes commit 45ca7e9f0730ae36fc610e675b990e9cc9ca0714 Author: Stefano Garzarella Date: Wed May 21 14:17:05 2025 +0200 vsock/virtio: fix `rx_bytes` accounting for stream sockets In `struct virtio_vsock_sock`, we maintain two counters: - `rx_bytes`: used internally to track how many bytes have been read. This supports mechanisms like .stream_has_data() and sock_rcvlowat(). - `fwd_cnt`: used for the credit mechanism to inform available receive buffer space to the remote peer. These counters are updated via virtio_transport_inc_rx_pkt() and virtio_transport_dec_rx_pkt(). Since the beginning with commit 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko"), we call virtio_transport_dec_rx_pkt() in virtio_transport_stream_do_dequeue() only when we consume the entire packet, so partial reads, do not update `rx_bytes` and `fwd_cnt`. This is fine for `fwd_cnt`, because we still have space used for the entire packet, and we don't want to update the credit for the other peer until we free the space of the entire packet. However, this causes `rx_bytes` to be stale on partial reads. Previously, this didn’t cause issues because `rx_bytes` was used only by .stream_has_data(), and any unread portion of a packet implied data was still available. However, since commit 93b808876682 ("virtio/vsock: fix logic which reduces credit update messages"), we now rely on `rx_bytes` to determine if a credit update should be sent when the data in the RX queue drops below SO_RCVLOWAT value. This patch fixes the accounting by updating `rx_bytes` with the number of bytes actually read, even on partial reads, while leaving `fwd_cnt` untouched until the packet is fully consumed. Also introduce a new `buf_used` counter to check that the remote peer is honoring the given credit; this was previously done via `rx_bytes`. Fixes: 93b808876682 ("virtio/vsock: fix logic which reduces credit update messages") Signed-off-by: Stefano Garzarella Link: https://patch.msgid.link/20250521121705.196379-1-sgarzare@redhat.com Signed-off-by: Paolo Abeni commit 2ca3534623f41dd0398c9f1cbc47fb874653c7cf Merge: 8dd53535f1e129 2b3c61b87519ff Author: Linus Torvalds Date: Mon May 26 09:55:56 2025 -0700 Merge tag 'vfs-6.16-rc1.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount updates from Christian Brauner: "This contains minor mount updates for this cycle: - mnt->mnt_devname can never be NULL so simplify the code handling that case - Add a comment about concurrent changes during statmount() and listmount() - Update the STATMOUNT_SUPPORTED macro - Convert mount flags to an enum" * tag 'vfs-6.16-rc1.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: statmount: update STATMOUNT_SUPPORTED macro fs: convert mount flags to enum ->mnt_devname is never NULL mount: add a comment about concurrent changes with statmount()/listmount() commit f5b60d6a575a7573a15e08aad129382aa39c228c Merge: fdb061195f53e5 73db1b5dab6fe1 Author: Paolo Abeni Date: Mon May 26 18:53:40 2025 +0200 Merge tag 'nf-next-25-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following batch contains Netfilter updates for net-next, specifically 26 patches: 5 patches adding/updating selftests, 4 fixes, 3 PREEMPT_RT fixes, and 14 patches to enhance nf_tables): 1) Improve selftest coverage for pipapo 4 bit group format, from Florian Westphal. 2) Fix incorrect dependencies when compiling a kernel without legacy ip{6}tables support, also from Florian. 3) Two patches to fix nft_fib vrf issues, including selftest updates to improve coverage, also from Florian Westphal. 4) Fix incorrect nesting in nft_tunnel's GENEVE support, from Fernando F. Mancera. 5) Three patches to fix PREEMPT_RT issues with nf_dup infrastructure and nft_inner to match in inner headers, from Sebastian Andrzej Siewior. 6) Integrate conntrack information into nft trace infrastructure, from Florian Westphal. 7) A series of 13 patches to allow to specify wildcard netdevice in netdev basechain and flowtables, eg. table netdev filter { chain ingress { type filter hook ingress devices = { eth0, eth1, vlan* } priority 0; policy accept; } } This also allows for runtime hook registration on NETDEV_{UN}REGISTER event, from Phil Sutter. netfilter pull request 25-05-23 * tag 'nf-next-25-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: (26 commits) selftests: netfilter: Torture nftables netdev hooks netfilter: nf_tables: Add notifications for hook changes netfilter: nf_tables: Support wildcard netdev hook specs netfilter: nf_tables: Sort labels in nft_netdev_hook_alloc() netfilter: nf_tables: Handle NETDEV_CHANGENAME events netfilter: nf_tables: Wrap netdev notifiers netfilter: nf_tables: Respect NETDEV_REGISTER events netfilter: nf_tables: Prepare for handling NETDEV_REGISTER events netfilter: nf_tables: Have a list of nf_hook_ops in nft_hook netfilter: nf_tables: Pass nf_hook_ops to nft_unregister_flowtable_hook() netfilter: nf_tables: Introduce nft_register_flowtable_ops() netfilter: nf_tables: Introduce nft_hook_find_ops{,_rcu}() netfilter: nf_tables: Introduce functions freeing nft_hook objects netfilter: nf_tables: add packets conntrack state to debug trace info netfilter: conntrack: make nf_conntrack_id callable without a module dependency netfilter: nf_dup_netdev: Move the recursion counter struct netdev_xmit netfilter: nft_inner: Use nested-BH locking for nft_pcpu_tun_ctx netfilter: nf_dup{4, 6}: Move duplication check to task_struct netfilter: nft_tunnel: fix geneve_opt dump selftests: netfilter: nft_fib.sh: add type and oif tests with and without VRFs ... ==================== Link: https://patch.msgid.link/20250523132712.458507-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 0a17adc6be08c55467df96a49bc0e74d09010a84 Merge: 5349b0051b12d6 0edd1d13de5eb3 f35e5b3ccfd351 Author: Rafael J. Wysocki Date: Mon May 26 18:37:38 2025 +0200 Merge branches 'acpi-processor' and 'acpi-cppc' Merge ACPI processor driver updates and ACPI CPPC library updates for 6.16-rc1: - Clean up the initialization of CPU data structures in the ACPI processor driver (Zhang Rui). - Remove an obsolete comment regarding the C-states handling in the ACPI processor driver (Giovanni Gherdovich). - Simplify PCC shared memory region handling (Sudeep Holla). - Rework and extend functions for reading CPPC register values and for updating CPPC registers (Lifeng Zheng). - Add three functions related to autonomous CPU performance state selection to the CPPC library (Lifeng Zheng). * acpi-processor: ACPI: processor: idle: Remove redundant pr->power.count assignment ACPI: processor: idle: Set pr->flags.power unconditionally ACPI: processor: idle: Remove obsolete comment * acpi-cppc: ACPI: CPPC: Add three functions related to autonomous selection ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel() ACPI: CPPC: Refactor register value get and set ABIs ACPI: CPPC: Add cppc_set_reg_val() ACPI: CPPC: Extract cppc_get_reg_val_in_pcc() ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val() ACPI: CPPC: Optimize cppc_get_perf() ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional ACPI: CPPC: Simplify PCC shared memory region handling ACPI: PCC: Simplify PCC shared memory region handling commit 5349b0051b12d6f774d9ebd9846eba96d39c8af4 Merge: 57356d98c0a5ac 059717c2ba1f74 Author: Rafael J. Wysocki Date: Mon May 26 18:36:39 2025 +0200 Merge branch 'acpi-tables' Merge updates related to the handling of static (data-only) ACPI tables for 6.16-rc1: - Add __nonstring annotations for unterminated strings in the static ACPI tables parsing code (Kees Cook). - Add support for parsing the MRRM ACPI table and sysfs files to describe memory regions listed in it (Tony Luck, Anil Keshavamurthy). - Remove an (explicitly) unused header file include from the VIOT ACPI table parser file (Andy Shevchenko). - Improve logging around acpi_initialize_tables() (Bartosz Szczepanek). * acpi-tables: ACPI: MRRM: Fix default max memory region ACPI: tables: Improve logging around acpi_initialize_tables() ACPI: VIOT: Remove (explicitly) unused header ACPI: Add documentation for exposing MRRM data ACPI: MRRM: Add /sys files to describe memory ranges ACPI: MRRM: Minimal parse of ACPI MRRM table ACPI: tables: Add __nonstring annotations for unterminated strings commit 57356d98c0a5acf49cdafab7894248f29694b08d Merge: 94a370fc8def60 0e9fd691a70265 Author: Rafael J. Wysocki Date: Mon May 26 18:35:01 2025 +0200 Merge branch 'acpica' Merge ACPICA updates, including two upstream releases 20241212 and 20250404, for 6.16-rc1: - Fix two ACPICA SLAB cache leaks (Seunghun Han). - Add EINJv2 get error type action and define Error Injection Actions in hex values to avoid inconsistencies between the specification and the code (Zaid Alali). - Fix typo in comments for SRAT structures (Adam Lackorzynski). - Prevent possible loss of data in ACPICA because of u32 to u8 conversions (Saket Dumbre). - Fix reading FFixedHW operation regions in ACPICA (Daniil Tatianin). - Add support for printing AML arguments when the ACPICA debug level is ACPI_LV_TRACE_POINT (Mario Limonciello). - Drop a stale comment about the file content from actbl2.h (Sudeep Holla). - Apply pack(1) to union aml_resource (Tamir Duberstein). - Fix overflow check in the ACPICA version of vsnprintf() (gldrk). - Interpret SIDP structures in DMAR added revision 3.4 of the VT-d specification (Alexey Neyman). - Add typedef and other definitions related to MRRM to ACPICA (Tony Luck). - Add definitions for RIMT to ACPICA (Sunil V L). - Fix spelling mistake "Incremement" -> "Increment" in the ACPICA utilities code (Colin Ian King). - Add typedef and other definitions for ERDT to ACPICA (Tony Luck). - Introduce ACPI_NONSTRING and use it (Kees Cook, Ahmed Salem). - Rename structure and field names of the RAS2 table in actbl2.h (Shiju Jose). - Fix up whitespace in acpica/utcache.c (Zhe Qiao). - Avoid sequence overread in a call to strncmp() in ap_get_table_length() and replace strncpy() with memcpy() in ACPICA in some places (Ahmed Salem). - Update copyright year in all ACPICA files (Saket Dumbre). * acpica: (30 commits) ACPICA: Update copyright year ACPICA: Logfile: Changes for version 20250404 ACPICA: Replace strncpy() with memcpy() ACPICA: Apply ACPI_NONSTRING in more places ACPICA: Avoid sequence overread in call to strncmp() ACPICA: Adjust the position of code lines ACPICA: actbl2.h: ACPI 6.5: RAS2: Rename structure and field names of the RAS2 table ACPICA: Apply ACPI_NONSTRING ACPICA: Introduce ACPI_NONSTRING ACPICA: actbl2.h: ERDT: Add typedef and other definitions ACPICA: infrastructure: Add new DMT_BUF types and shorten a long name ACPICA: Utilities: Fix spelling mistake "Incremement" -> "Increment" ACPICA: MRRM: Some cleanups ACPICA: actbl2: Add definitions for RIMT ACPICA: actbl2.h: MRRM: Add typedef and other definitions ACPICA: infrastructure: Add new header and ACPI_DMT_BUF26 types ACPICA: Interpret SIDP structures in DMAR ACPICA: utilities: Fix overflow check in vsnprintf() ACPICA: Apply pack(1) to union aml_resource ACPICA: Drop stale comment about the header file content ... commit 8dd53535f1e129b7d75c512dc271bff76461ab6b Merge: 181d8e399f50c0 1afe9e7da8c0ab Author: Linus Torvalds Date: Mon May 26 09:33:44 2025 -0700 Merge tag 'vfs-6.16-rc1.super' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs freezing updates from Christian Brauner: "This contains various filesystem freezing related work for this cycle: - Allow the power subsystem to support filesystem freeze for suspend and hibernate. Now all the pieces are in place to actually allow the power subsystem to freeze/thaw filesystems during suspend/resume. Filesystems are only frozen and thawed if the power subsystem does actually own the freeze. If the filesystem is already frozen by the time we've frozen all userspace processes we don't care to freeze it again. That's userspace's job once the process resumes. We only actually freeze filesystems if we absolutely have to and we ignore other failures to freeze. We could bubble up errors and fail suspend/resume if the error isn't EBUSY (aka it's already frozen) but I don't think that this is worth it. Filesystem freezing during suspend/resume is best-effort. If the user has 500 ext4 filesystems mounted and 4 fail to freeze for whatever reason then we simply skip them. What we have now is already a big improvement and let's see how we fare with it before making our lives even harder (and uglier) than we have to. - Allow efivars to support freeze and thaw Allow efivarfs to partake to resync variable state during system hibernation and suspend. Add freeze/thaw support. This is a pretty straightforward implementation. We simply add regular freeze/thaw support for both userspace and the kernel. efivars is the first pseudofilesystem that adds support for filesystem freezing and thawing. The simplicity comes from the fact that we simply always resync variable state after efivarfs has been frozen. It doesn't matter whether that's because of suspend, userspace initiated freeze or hibernation. Efivars is simple enough that it doesn't matter that we walk all dentries. There are no directories and there aren't insane amounts of entries and both freeze/thaw are already heavy-handed operations. If userspace initiated a freeze/thaw cycle they would need CAP_SYS_ADMIN in the initial user namespace (as that's where efivarfs is mounted) so it can't be triggered by random userspace. IOW, we really really don't care" * tag 'vfs-6.16-rc1.super' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: f2fs: fix freezing filesystem during resize kernfs: add warning about implementing freeze/thaw efivarfs: support freeze/thaw power: freeze filesystems during suspend/resume libfs: export find_next_child() super: add filesystem freezing helpers for suspend and hibernate gfs2: pass through holder from the VFS for freeze/thaw super: use common iterator (Part 2) super: use a common iterator (Part 1) super: skip dying superblocks early super: simplify user_get_super() super: remove pointless s_root checks fs: allow all writers to be frozen locking/percpu-rwsem: add freezable alternative to down_read commit fdb061195f53e5b6d12595fc32a1a9c1130f0c23 Merge: 34d26315db39d2 e7a37c9e428a29 Author: Paolo Abeni Date: Mon May 26 18:30:47 2025 +0200 Merge tag 'ipsec-next-2025-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== 1) Remove some unnecessary strscpy_pad() size arguments. From Thorsten Blum. 2) Correct use of xso.real_dev on bonding offloads. Patchset from Cosmin Ratiu. 3) Add hardware offload configuration to XFRM_MSG_MIGRATE. From Chiachang Wang. 4) Refactor migration setup during cloning. This was done after the clone was created. Now it is done in the cloning function itself. From Chiachang Wang. 5) Validate assignment of maximal possible SEQ number. Prevent from setting to the maximum sequrnce number as this would cause for traffic drop. From Leon Romanovsky. 6) Prevent configuration of interface index when offload is used. Hardware can't handle this case.i From Leon Romanovsky. 7) Always use kfree_sensitive() for SA secret zeroization. From Zilin Guan. ipsec-next-2025-05-23 * tag 'ipsec-next-2025-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: use kfree_sensitive() for SA secret zeroization xfrm: prevent configuration of interface index when offload is used xfrm: validate assignment of maximal possible SEQ number xfrm: Refactor migration setup during the cloning process xfrm: Migrate offload configuration bonding: Fix multiple long standing offload races bonding: Mark active offloaded xfrm_states xfrm: Add explicit dev to .xdo_dev_state_{add,delete,free} xfrm: Remove unneeded device check from validate_xmit_xfrm xfrm: Use xdo.dev instead of xdo.real_dev net/mlx5: Avoid using xso.real_dev unnecessarily xfrm: Remove unnecessary strscpy_pad() size arguments ==================== Link: https://patch.msgid.link/20250523075611.3723340-1-steffen.klassert@secunet.com Signed-off-by: Paolo Abeni commit 34d26315db39d26666736478f8ea0ed9dae5418a Merge: 0a9b2c9fd1688c 3e20585abf2233 Author: Paolo Abeni Date: Mon May 26 18:11:23 2025 +0200 Merge tag 'linux-can-next-for-6.16-20250522' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2025-05-22 this is a pull request of 22 patches for net-next/main. The series by Biju Das contains 19 patches and adds RZ/G3E CANFD support to the rcar_canfd driver. The patch by Vincent Mailhol adds a struct data_bittiming_params to group FD parameters as a preparation patch for CAN-XL support. Felix Maurer's patch imports tst-filter from can-tests into the kernel self tests and Vincent Mailhol adds support for physical CAN interfaces. linux-can-next-for-6.16-20250522 * tag 'linux-can-next-for-6.16-20250522' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (22 commits) selftests: can: test_raw_filter.sh: add support of physical interfaces selftests: can: Import tst-filter from can-tests can: dev: add struct data_bittiming_params to group FD parameters can: rcar_canfd: Add RZ/G3E support can: rcar_canfd: Enhance multi_channel_irqs handling can: rcar_canfd: Add external_clk variable to struct rcar_canfd_hw_info can: rcar_canfd: Add sh variable to struct rcar_canfd_hw_info can: rcar_canfd: Add struct rcanfd_regs variable to struct rcar_canfd_hw_info can: rcar_canfd: Add shared_can_regs variable to struct rcar_canfd_hw_info can: rcar_canfd: Add ch_interface_mode variable to struct rcar_canfd_hw_info can: rcar_canfd: Add {nom,data}_bittiming variables to struct rcar_canfd_hw_info can: rcar_canfd: Add max_cftml variable to struct rcar_canfd_hw_info can: rcar_canfd: Add max_aflpn variable to struct rcar_canfd_hw_info can: rcar_canfd: Add rnc_field_width variable to struct rcar_canfd_hw_info can: rcar_canfd: Update RCANFD_GAFLCFG macro can: rcar_canfd: Add rcar_canfd_setrnc() can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro can: rcar_canfd: Update RCANFD_GERFL_ERR macro can: rcar_canfd: Drop RCANFD_GAFLCFG_GETRNC macro can: rcar_canfd: Use of_get_available_child_by_name() ... ==================== Link: https://patch.msgid.link/20250522084128.501049-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni commit ba5cb47b56e5d89f0a5eb5163ffbfda1e3e7cef0 Author: Subbaraya Sundeep Date: Wed May 21 16:00:43 2025 +0530 octeontx2-af: Send Link events one by one Send link events one after another otherwise new message is overwriting the message which is being processed by PF. Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register") Signed-off-by: Subbaraya Sundeep Reviewed-by: Michal Swiatkowski Reviewed-by: Simon Horman Link: https://patch.msgid.link/1747823443-404-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit 4bf7b97eb390f0a0730572101e0ce3367d31a770 Author: Patrick Miller Date: Wed Oct 2 02:28:48 2024 +0000 rust: make section names plural Clean Rust documentation section headers to use plural names. Suggested-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1110 Signed-off-by: Patrick Miller Link: https://lore.kernel.org/r/20241002022749.390836-1-paddymills@proton.me [ Removed the `init` one that doesn't apply anymore and reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 181d8e399f50c0683b12d40432bb6e1ca5c58d37 Merge: a1ae8ce78bb260 76145cb37ff063 Author: Linus Torvalds Date: Mon May 26 09:02:39 2025 -0700 Merge tag 'vfs-6.16-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "This contains the usual selections of misc updates for this cycle. Features: - Use folios for symlinks in the page cache FUSE already uses folios for its symlinks. Mirror that conversion in the generic code and the NFS code. That lets us get rid of a few folio->page->folio conversions in this path, and some of the few remaining users of read_cache_page() / read_mapping_page() - Try and make a few filesystem operations killable on the VFS inode->i_mutex level - Add sysctl vfs_cache_pressure_denom for bulk file operations Some workloads need to preserve more dentries than we currently allow through out sysctl interface A HDFS servers with 12 HDDs per server, on a HDFS datanode startup involves scanning all files and caching their metadata (including dentries and inodes) in memory. Each HDD contains approximately 2 million files, resulting in a total of ~20 million cached dentries after initialization To minimize dentry reclamation, they set vfs_cache_pressure to 1. Despite this configuration, memory pressure conditions can still trigger reclamation of up to 50% of cached dentries, reducing the cache from 20 million to approximately 10 million entries. During the subsequent cache rebuild period, any HDFS datanode restart operation incurs substantial latency penalties until full cache recovery completes To maintain service stability, more dentries need to be preserved during memory reclamation. The current minimum reclaim ratio (1/100 of total dentries) remains too aggressive for such workload. This patch introduces vfs_cache_pressure_denom for more granular cache pressure control The configuration [vfs_cache_pressure=1, vfs_cache_pressure_denom=10000] effectively maintains the full 20 million dentry cache under memory pressure, preventing datanode restart performance degradation - Avoid some jumps in inode_permission() using likely()/unlikely() - Avid a memory access which is most likely a cache miss when descending into devcgroup_inode_permission() - Add fastpath predicts for stat() and fdput() - Anonymous inodes currently don't come with a proper mode causing issues in the kernel when we want to add useful VFS debug assert. Fix that by giving them a proper mode and masking it off when we report it to userspace which relies on them not having any mode - Anonymous inodes currently allow to change inode attributes because the VFS falls back to simple_setattr() if i_op->setattr isn't implemented. This means the ownership and mode for every single user of anon_inode_inode can be changed. Block that as it's either useless or actively harmful. If specific ownership is needed the respective subsystem should allocate anonymous inodes from their own private superblock - Raise SB_I_NODEV and SB_I_NOEXEC on the anonymous inode superblock - Add proper tests for anonymous inode behavior - Make it easy to detect proper anonymous inodes and to ensure that we can detect them in codepaths such as readahead() Cleanups: - Port pidfs to the new anon_inode_{g,s}etattr() helpers - Try to remove the uselib() system call - Add unlikely branch hint return path for poll - Add unlikely branch hint on return path for core_sys_select - Don't allow signals to interrupt getdents copying for fuse - Provide a size hint to dir_context for during readdir() - Use writeback_iter directly in mpage_writepages - Update compression and mtime descriptions in initramfs documentation - Update main netfs API document - Remove useless plus one in super_cache_scan() - Remove unnecessary NULL-check guards during setns() - Add separate separate {get,put}_cgroup_ns no-op cases Fixes: - Fix typo in root= kernel parameter description - Use KERN_INFO for infof()|info_plog()|infofc() - Correct comments of fs_validate_description() - Mark an unlikely if condition with unlikely() in vfs_parse_monolithic_sep() - Delete macro fsparam_u32hex() - Remove unused and problematic validate_constant_table() - Fix potential unsigned integer underflow in fs_name() - Make file-nr output the total allocated file handles" * tag 'vfs-6.16-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (43 commits) fs: Pass a folio to page_put_link() nfs: Use a folio in nfs_get_link() fs: Convert __page_get_link() to use a folio fs/read_write: make default_llseek() killable fs/open: make do_truncate() killable fs/open: make chmod_common() and chown_common() killable include/linux/fs.h: add inode_lock_killable() readdir: supply dir_context.count as readdir buffer size hint vfs: Add sysctl vfs_cache_pressure_denom for bulk file operations fuse: don't allow signals to interrupt getdents copying Documentation: fix typo in root= kernel parameter description include/cgroup: separate {get,put}_cgroup_ns no-op case kernel/nsproxy: remove unnecessary guards fs: use writeback_iter directly in mpage_writepages fs: remove useless plus one in super_cache_scan() fs: add S_ANON_INODE fs: remove uselib() system call device_cgroup: avoid access to ->i_rdev in the common case in devcgroup_inode_permission() fs/fs_parse: Remove unused and problematic validate_constant_table() fs: touch up predicts in inode_permission() ... commit a1ae8ce78bb2600490d49a8f1ee88767b0e64381 Merge: dc762851444b32 759cfedc5ee7e5 Author: Linus Torvalds Date: Mon May 26 08:46:59 2025 -0700 Merge tag 'vfs-6.16-rc1.mount.api' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount api conversions from Christian Brauner: "This converts the bfs and omfs filesystems to the new mount api" * tag 'vfs-6.16-rc1.mount.api' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: omfs: convert to new mount API bfs: convert bfs to use the new mount api commit eb71feaacaaca227ae8f91c8578cf831553c5ab5 Author: Benno Lossin Date: Sun May 25 19:34:45 2025 +0200 rust: list: fix path of `assert_pinned!` Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all items from pin-init into the pin-init crate, including the `assert_pinned!` macro. Thus fix the path of the sole user of the `assert_pinned!` macro. This occurrence was missed in the commit above, since it is in a macro rule that has no current users (although binder is a future user). Cc: stable@kernel.org Fixes: dbd5058ba60c ("rust: make pin-init its own crate") Signed-off-by: Benno Lossin Link: https://lore.kernel.org/r/20250525173450.853413-1-lossin@kernel.org [ Reworded slightly as discussed in the list. - Miguel ] Signed-off-by: Miguel Ojeda commit 0a9b2c9fd1688c7ecbff0702855577a3f8eef1df Author: Jeremy Kerr Date: Wed May 21 17:33:36 2025 +0800 net: mctp: use nlmsg_payload() for netlink message data extraction Jakub suggests: > I have a different request :) Matt, once this ends up in net-next > (end of this week) could you refactor it to use nlmsg_payload() ? > It doesn't exist in net but this is exactly why it was added. This refactors the additions to both mctp_dump_addrinfo(), and mctp_rtm_getneigh() - two cases where we're calling nlh_data() on an an incoming netlink message, without a prior nlmsg_parse(). For the neigh.c case, we cannot hit the failure where the nlh does not contain a full ndmsg at present, as the core handler (net/core/neighbour.c, neigh_get()) has already validated the size through neigh_valid_req_get(), and would have failed the get operation before the MCTP hander is called. However, relying on that is a bit fragile, so apply the nlmsg_payload refector here too. Reviewed-by: Simon Horman Signed-off-by: Jeremy Kerr Link: https://patch.msgid.link/20250521-mctp-nlmsg-payload-v2-1-e85df160c405@codeconstruct.com.au Signed-off-by: Paolo Abeni commit 31eaaa5cb5e3a11290e037dbe00c90eb9f48b78a Merge: e272bbc9bf3716 c683e378c0907e Author: Paolo Abeni Date: Mon May 26 17:32:58 2025 +0200 Merge branch 'add-the-capability-to-consume-sram-for-hwfd-descriptor-queue-in-airoha_eth-driver' Lorenzo Bianconi says: ==================== Add the capability to consume SRAM for hwfd descriptor queue in airoha_eth driver In order to improve packet processing and packet forwarding performances, EN7581 SoC supports consuming SRAM instead of DRAM for hw forwarding descriptors queue. For downlink hw accelerated traffic request to consume SRAM memory for hw forwarding descriptors queue. Moreover, in some configurations QDMA blocks require a contiguous block of system memory for hwfd buffers queue. Introduce the capability to allocate hw buffers forwarding queue via the reserved-memory DTS property instead of running dmam_alloc_coherent(). v2: https://lore.kernel.org/r/20250509-airopha-desc-sram-v2-0-9dc3d8076dfb@kernel.org v1: https://lore.kernel.org/r/20250507-airopha-desc-sram-v1-0-d42037431bfa@kernel.org ==================== Link: https://patch.msgid.link/20250521-airopha-desc-sram-v3-0-a6e9b085b4f0@kernel.org Signed-off-by: Paolo Abeni commit c683e378c0907e66cee939145edf936c254ff1e3 Author: Lorenzo Bianconi Date: Wed May 21 09:16:39 2025 +0200 net: airoha: Add the capability to allocate hfwd descriptors in SRAM In order to improve packet processing and packet forwarding performances, EN7581 SoC supports consuming SRAM instead of DRAM for hw forwarding descriptors queue. For downlink hw accelerated traffic request to consume SRAM memory for hw forwarding descriptors queue. Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250521-airopha-desc-sram-v3-4-a6e9b085b4f0@kernel.org Signed-off-by: Paolo Abeni commit 3a1ce9e3d01bbf3912c3e3f81cb554d558eb715b Author: Lorenzo Bianconi Date: Wed May 21 09:16:38 2025 +0200 net: airoha: Add the capability to allocate hwfd buffers via reserved-memory In some configurations QDMA blocks require a contiguous block of system memory for hwfd buffers queue. Introduce the capability to allocate hw buffers forwarding queue via the reserved-memory DTS property instead of running dmam_alloc_coherent(). Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250521-airopha-desc-sram-v3-3-a6e9b085b4f0@kernel.org Signed-off-by: Paolo Abeni commit 09aa788f98da3e2f41ce158cc691d6d52e808bc9 Author: Lorenzo Bianconi Date: Wed May 21 09:16:37 2025 +0200 net: airoha: Do not store hfwd references in airoha_qdma struct Since hfwd descriptor and buffer queues are allocated via dmam_alloc_coherent() we do not need to store their references in airoha_qdma struct. This patch does not introduce any logical changes, just code clean-up. Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250521-airopha-desc-sram-v3-2-a6e9b085b4f0@kernel.org Signed-off-by: Paolo Abeni commit 2d13b45f8086a7142260cf19f4976b1e767fdcec Author: Lorenzo Bianconi Date: Wed May 21 09:16:36 2025 +0200 dt-bindings: net: airoha: Add EN7581 memory-region property Introduce memory-region and memory-region-names properties for the ethernet node available on EN7581 SoC in order to reserve system memory for hw forwarding buffers queue used by the QDMA modules. Signed-off-by: Lorenzo Bianconi Acked-by: Conor Dooley Link: https://patch.msgid.link/20250521-airopha-desc-sram-v3-1-a6e9b085b4f0@kernel.org Signed-off-by: Paolo Abeni commit e272bbc9bf3716be58e7a4b2296213c1218b2923 Merge: e8c35bfce4c131 cdae5bccab29a8 Author: Paolo Abeni Date: Mon May 26 17:25:45 2025 +0200 Merge branch 'add-functions-for-txgbe-aml-devices' Jiawen Wu says: ==================== Support phylink and link/gpio irqs for AML 25G/10G devices, and complete PTP and SRIOV. ==================== Link: https://patch.msgid.link/ Signed-off-by: Paolo Abeni commit cdae5bccab29a8e7810b682e886dfd8cd5a52ff3 Author: Jiawen Wu Date: Wed May 21 14:44:02 2025 +0800 net: txgbe: Implement SRIOV for AML devices Since .mac_link_up and .mac_link_down are changed for AML 25G/10G NICs, the SR-IOV related function should be invoked in these new functions, to bring VFs link up. Signed-off-by: Jiawen Wu Link: https://patch.msgid.link/BA8B302B7AAB6EA6+20250521064402.22348-10-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 182af02690fbb3ba1015cba1e5e758d2ecab94f0 Author: Jiawen Wu Date: Wed May 21 14:44:01 2025 +0800 net: txgbe: Implement PTP for AML devices Support PTP clock and 1PPS output signal for AML devices. Signed-off-by: Jiawen Wu Link: https://patch.msgid.link/F2F6E5E8899D2C20+20250521064402.22348-9-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit d84a3ff9aae815c51c40b9b61e1bf26b7256eebf Author: Jiawen Wu Date: Wed May 21 14:44:00 2025 +0800 net: txgbe: Restrict the use of mismatched FW versions The new added mailbox commands require a new released firmware version. Otherwise, a lot of logs "Unknown FW command" would be printed. And the devices may not work properly. So add the test command in the probe function. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/18283F17BE0FA335+20250521064402.22348-8-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit c0f2e5113e2f073e88ea18e8912a9ee2558a0d6f Author: Jiawen Wu Date: Wed May 21 14:43:59 2025 +0800 net: txgbe: Correct the currect link settings For AML 25G/10G devices, some of the information returned from phylink_ethtool_ksettings_get() is not correct, since there is a fixed-link mode. So add additional corrections. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/C94BF867617C544D+20250521064402.22348-7-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 343929799ace121cd9b795c526b2ad7aefe54458 Author: Jiawen Wu Date: Wed May 21 14:43:58 2025 +0800 net: txgbe: Support to handle GPIO IRQs for AML devices The driver needs to handle GPIO interrupts to identify SFP module and configure PHY by sending mailbox messages to firmware. Since the SFP module needs to wait for ready to get information when it is inserted, workqueue is added to handle delayed tasks. And each SW-FW interaction takes time to wait, so they are processed in the workqueue instead of IRQ handler function. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/399624AF221E8E28+20250521064402.22348-6-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 6f8b4c01a8cd989a08a2eb6aab87e899ee450f93 Author: Jiawen Wu Date: Wed May 21 14:43:57 2025 +0800 net: txgbe: Implement PHYLINK for AML 25G/10G devices There is a new PHY attached to AML 25G/10G NIC, which is different from SP 10G/1G NIC. But the PHY configuration is handed over to firmware, and also I2C is controlled by firmware. So the different PHYLINK fixed-link mode is added for these devices. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/987B973A5929CD48+20250521064402.22348-5-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 39709fe4bacda6748759522738e33464d6704dc0 Author: Jiawen Wu Date: Wed May 21 14:43:56 2025 +0800 net: txgbe: Distinguish between 40G and 25G devices For the following patches to support PHYLINK for AML 25G devices, separate MAC type wx_mac_aml40 to maintain the driver of 40G devices. Because 40G devices will complete support later, not now. And this patch makes the 25G devices use some PHYLINK interfaces, but it is not yet create PHYLINK and cannot be used on its own. It is just preparation for the next patches. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/592B1A6920867D0C+20250521064402.22348-4-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 78cafb1bb7e9b3c27d36b0c8670494ab2b8dc1da Author: Jiawen Wu Date: Wed May 21 14:43:55 2025 +0800 net: wangxun: Use specific flag bit to simplify the code Most of the different code that requires MAC type in the common library is due to NGBE only supports a few queues and pools, unlike TXGBE, which supports 128 queues and 64 pools. This difference accounts for most of the hardware configuration differences in the driver code. So add a flag bit "WX_FLAG_MULTI_64_FUNC" for them to clean-up the driver code. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/C731132E124D75E5+20250521064402.22348-3-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 893e4656d46248458a832736144f8477c416b284 Author: Jiawen Wu Date: Wed May 21 14:43:54 2025 +0800 net: txgbe: Remove specified SP type Since AML devices are going to reuse some definitions, remove the "SP" qualifier from these definitions. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/8EF712EC14B8FF70+20250521064402.22348-2-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit dc762851444b32057709cb40e7cdb3054e60b646 Merge: 6d5b940e1e14fc fb5a381d624bf6 Author: Linus Torvalds Date: Mon May 26 08:23:09 2025 -0700 Merge tag 'vfs-6.16-rc1.writepage' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull final writepage conversion from Christian Brauner: "This converts vboxfs from ->writepage() to ->writepages(). This was the last user of the ->writepage() method. So remove ->writepage() completely and all references to it" * tag 'vfs-6.16-rc1.writepage' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: Remove aops->writepage mm: Remove swap_writepage() and shmem_writepage() ttm: Call shmem_writeout() from ttm_backup_backup_page() i915: Use writeback_iter() shmem: Add shmem_writeout() writeback: Remove writeback_use_writepage() migrate: Remove call to ->writepage vboxsf: Convert to writepages 9p: Add a migrate_folio method commit e8c35bfce4c131c8a0777d25d9adfcbb0db8314b Author: Tristram Ha Date: Tue May 20 16:07:20 2025 -0700 net: dsa: microchip: Add SGMII port support to KSZ9477 switch The KSZ9477 switch driver uses the XPCS driver to operate its SGMII port. However there are some hardware bugs in the KSZ9477 SGMII module so workarounds are needed. There was a proposal to update the XPCS driver to accommodate KSZ9477, but the new code is not generic enough to be used by other vendors. It is better to do all these workarounds inside the KSZ9477 driver instead of modifying the XPCS driver. There are 3 hardware issues. The first is the MII_ADVERTISE register needs to be write once after reset for the correct code word to be sent. The XPCS driver disables auto-negotiation first before configuring the SGMII/1000BASE-X mode and then enables it back. The KSZ9477 driver then writes the MII_ADVERTISE register before enabling auto-negotiation. In 1000BASE-X mode the MII_ADVERTISE register will be set, so KSZ9477 driver does not need to write it. The second issue is the MII_BMCR register needs to set the exact speed and duplex mode when running in SGMII mode. During link polling the KSZ9477 will check the speed and duplex mode are different from previous ones and update the MII_BMCR register accordingly. The last issue is 1000BASE-X mode does not work with auto-negotiation on. The cause is the local port hardware does not know the link is up and so network traffic is not forwarded. The workaround is to write 2 additional bits when 1000BASE-X mode is configured. Note the SGMII interrupt in the port cannot be masked. As that interrupt is not handled in the KSZ9477 driver the SGMII interrupt bit will not be set even when the XPCS driver sets it. Signed-off-by: Tristram Ha Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/20250520230720.23425-1-Tristram.Ha@microchip.com Signed-off-by: Paolo Abeni commit 6d5b940e1e14fcc20b5a3536647fe3c41b07d4f5 Merge: 0ff41df1cb268f 4e5c53e0380635 Author: Linus Torvalds Date: Mon May 26 08:02:43 2025 -0700 Merge tag 'vfs-6.16-rc1.async.dir' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs directory lookup updates from Christian Brauner: "This contains cleanups for the lookup_one*() family of helpers. We expose a set of functions with names containing "lookup_one_len" and others without the "_len". This difference has nothing to do with "len". It's rater a historical accident that can be confusing. The functions without "_len" take a "mnt_idmap" pointer. This is found in the "vfsmount" and that is an important question when choosing which to use: do you have a vfsmount, or are you "inside" the filesystem. A related question is "is permission checking relevant here?". nfsd and cachefiles *do* have a vfsmount but *don't* use the non-_len functions. They pass nop_mnt_idmap and refuse to work on filesystems which have any other idmap. This work changes nfsd and cachefile to use the lookup_one family of functions and to explictily pass &nop_mnt_idmap which is consistent with all other vfs interfaces used where &nop_mnt_idmap is explicitly passed. The remaining uses of the "_one" functions do not require permission checks so these are renamed to be "_noperm" and the permission checking is removed. This series also changes these lookup function to take a qstr instead of separate name and len. In many cases this simplifies the call" * tag 'vfs-6.16-rc1.async.dir' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: VFS: change lookup_one_common and lookup_noperm_common to take a qstr Use try_lookup_noperm() instead of d_hash_and_lookup() outside of VFS VFS: rename lookup_one_len family to lookup_noperm and remove permission check cachefiles: Use lookup_one() rather than lookup_one_len() nfsd: Use lookup_one() rather than lookup_one_len() VFS: improve interface for lookup_one functions commit 405b0d610745fb5e84fc2961d9b960abb9f3d107 Author: Nikita Zhandarovich Date: Tue May 20 14:32:39 2025 +0300 net: usb: aqc111: fix error handling of usbnet read calls Syzkaller, courtesy of syzbot, identified an error (see report [1]) in aqc111 driver, caused by incomplete sanitation of usb read calls' results. This problem is quite similar to the one fixed in commit 920a9fa27e78 ("net: asix: add proper error handling of usb read errors"). For instance, usbnet_read_cmd() may read fewer than 'size' bytes, even if the caller expected the full amount, and aqc111_read_cmd() will not check its result properly. As [1] shows, this may lead to MAC address in aqc111_bind() being only partly initialized, triggering KMSAN warnings. Fix the issue by verifying that the number of bytes read is as expected and not less. [1] Partial syzbot report: BUG: KMSAN: uninit-value in is_valid_ether_addr include/linux/etherdevice.h:208 [inline] BUG: KMSAN: uninit-value in usbnet_probe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 is_valid_ether_addr include/linux/etherdevice.h:208 [inline] usbnet_probe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x4d1/0xd90 drivers/base/dd.c:658 __driver_probe_device+0x268/0x380 drivers/base/dd.c:800 ... Uninit was stored to memory at: dev_addr_mod+0xb0/0x550 net/core/dev_addr_lists.c:582 __dev_addr_set include/linux/netdevice.h:4874 [inline] eth_hw_addr_set include/linux/etherdevice.h:325 [inline] aqc111_bind+0x35f/0x1150 drivers/net/usb/aqc111.c:717 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396 ... Uninit was stored to memory at: ether_addr_copy include/linux/etherdevice.h:305 [inline] aqc111_read_perm_mac drivers/net/usb/aqc111.c:663 [inline] aqc111_bind+0x794/0x1150 drivers/net/usb/aqc111.c:713 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usb_probe_interface+0xd01/0x1310 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] ... Local variable buf.i created at: aqc111_read_perm_mac drivers/net/usb/aqc111.c:656 [inline] aqc111_bind+0x221/0x1150 drivers/net/usb/aqc111.c:713 usbnet_probe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 Reported-by: syzbot+3b6b9ff7b80430020c7b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3b6b9ff7b80430020c7b Tested-by: syzbot+3b6b9ff7b80430020c7b@syzkaller.appspotmail.com Fixes: df2d59a2ab6c ("net: usb: aqc111: Add support for getting and setting of MAC address") Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250520113240.2369438-1-n.zhandarovich@fintech.ru Signed-off-by: Paolo Abeni commit 65271f868cb1dca709ff69e45939bbef8d6d0b70 Author: Wentao Liang Date: Mon May 26 10:56:27 2025 +0800 regulator: max14577: Add error check for max14577_read_reg() The function max14577_reg_get_current_limit() calls the function max14577_read_reg(), but does not check its return value. A proper implementation can be found in max14577_get_online(). Add a error check for the max14577_read_reg() and return error code if the function fails. Fixes: b0902bbeb768 ("regulator: max14577: Add regulator driver for Maxim 14577") Cc: stable@vger.kernel.org # v3.14 Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20250526025627.407-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit 9c96808f10d84156b5e98e16176b725ec5a1386f Author: Christophe JAILLET Date: Sun May 25 14:47:35 2025 +0200 thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops 'struct thermal_zone_device_ops' could be left unmodified in this driver. Constifying this structure moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. While at it, also constify a struct thermal_zone_params. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 26422 12584 512 39518 9a5e drivers/platform/x86/acerhdf.o After: ===== text data bss dec hex filename 26646 12360 512 39518 9a5e drivers/platform/x86/acerhdf.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e502fadf2c6b24fc4ec3a7880533f7ca68429720.1748177235.git.christophe.jaillet@wanadoo.fr Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 46a557694b464881b3c2c4a0ba389a6436419a37 Author: Yuezhang Mo Date: Thu Apr 10 17:26:14 2025 -0600 exfat: do not clear volume dirty flag during sync xfstests generic/482 tests the file system consistency after each FUA operation. It fails when run on exfat. exFAT clears the volume dirty flag with a FUA operation during sync. Since s_lock is not held when data is being written to a file, sync can be executed at the same time. When data is being written to a file, the FAT chain is updated first, and then the file size is updated. If sync is executed between updating them, the length of the FAT chain may be inconsistent with the file size. To avoid the situation where the file system is inconsistent but the volume dirty flag is cleared, this commit moves the clearing of the volume dirty flag from exfat_fs_sync() to exfat_put_super(), so that the volume dirty flag is not cleared until unmounting. After the move, there is no additional action during sync, so exfat_fs_sync() can be deleted. Reviewed-by: Sungjong Seo Signed-off-by: Yuezhang Mo Signed-off-by: Namjae Jeon commit 1f3d9724e16d62c7d42c67d6613b8512f2887c22 Author: Namjae Jeon Date: Tue Apr 1 13:50:39 2025 +0900 exfat: fix double free in delayed_free The double free could happen in the following path. exfat_create_upcase_table() exfat_create_upcase_table() : return error exfat_free_upcase_table() : free ->vol_utbl exfat_load_default_upcase_table : return error exfat_kill_sb() delayed_free() exfat_free_upcase_table() <--------- double free This patch set ->vol_util as NULL after freeing it. Reported-by: Jianzhou Zhao Signed-off-by: Namjae Jeon commit 7d476f18abeba3241cd3a2b712b2666a23b6f6dd Author: Imre Deak Date: Tue May 20 17:22:19 2025 +0300 drm/i915/dp: Fix the enabling/disabling of audio SDP splitting Adjust the enabling/disabling steps of the DP audio SDP splitting according to a recent Bspec update. This moves the enabling to the audio codec enable sequence after the transcoder is enabled and disables SDP splitting explicitly during the audio disable sequence. Bspec requires waiting for a vblank event after the transcoder is enabled and before SDP splitting is enabled. There is no need for an explicit wait for this, since after the transcoder is enabled this vblank event is guaranteed to have happened via a flip done wait (see intel_atomic_commit_tail() -> drm_atomic_helper_wait_for_flip_done()). The bspec update is for LNL+ only, but the HW team clarified that this has been always the intended sequence on all platforms and bspec will be updated everywhere accordingly. The way SDP splitting was originally enabled matched the version of bspec at that time. Adding here the Fixes: line still, since this change fixes a FIFO underrun on PTL during output enabling when DSC is enabled. Bspec: 49283, 68943 Fixes: 8853750dbad8 ("drm/i915: Enable SDP split for DP2.0") Cc: Vinod Govindapillai Acked-by: Jani Nikula Reviewed-by: Vinod Govindapillai Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250520142219.1688401-1-imre.deak@intel.com (cherry picked from commit 56764c845aa5be14cd53702fc9f2da23e25857de) Signed-off-by: Joonas Lahtinen commit 21d8a6857bc11f3fa14b19768d840cf6d1f3fccd Author: Viresh Kumar Date: Mon May 26 11:05:03 2025 +0530 rust: opp: Make the doctest example depend on CONFIG_OF The doctest example uses a function only available for CONFIG_OF and so the build with doc tests fails when it isn't enabled. error[E0599]: no function or associated item named `from_of_cpumask` found for struct `rust_doctest_kernel_alloc_kbox_rs_4::kernel::opp::Table` in the current scope Fix this by making the doctest depend on CONFIG_OF. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505260856.ZQWHW2xT-lkp@intel.com/ Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/a80bfedcb4d94531dc27d3b48062db5042078e88.1748237646.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit ba09aae9400a1b353dbc3eeac91120baa9bac151 Merge: a5806cd506af5a 03eadcbd981b4c Author: Rafael J. Wysocki Date: Mon May 26 12:41:39 2025 +0200 Merge tag 'opp-updates-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge operating performance points (OPP) updates for 6.16 from Viresh Kumar: "- OPP: Add dev_pm_opp_set_level() (Praveen Talari). - Introduce scope-based cleanup headers and mutex locking guards in OPP core (Viresh Kumar). - switch to use kmemdup_array() (Zhang Enpei)." * tag 'opp-updates-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: switch to use kmemdup_array() OPP: Add dev_pm_opp_set_level() OPP: Use mutex locking guards OPP: Define and use scope-based cleanup helpers OPP: Use scope-based OF cleanup helpers OPP: Return opp_table from dev_pm_opp_get_opp_table_ref() OPP: Return opp from dev_pm_opp_get() OPP: Remove _get_opp_table_kref() commit f4ba2ea57da51d616b689c4b8826c517ff5a8523 Author: Jaroslav Kysela Date: Fri May 23 17:41:51 2025 +0200 firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache) KASAN reported out of bounds access - cs_dsp_ctl_cache_init_multiple_offsets(). The code uses mock_coeff_template.length_bytes (4 bytes) for register value allocations. But later, this length is set to 8 bytes which causes test code failures. As fix, just remove the lenght override, keeping the original value 4 for all operations. Cc: Simon Trimmer Cc: Charles Keepax Cc: Richard Fitzgerald Cc: patches@opensource.cirrus.com Cc: stable@vger.kernel.org Signed-off-by: Jaroslav Kysela Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250523154151.1252585-1-perex@perex.cz Signed-off-by: Mark Brown commit d979b783d61f7f1f95664031b71a33afc74627b2 Author: Jaroslav Kysela Date: Fri May 23 17:58:14 2025 +0200 firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info) KASAN reported out of bounds access - cs_dsp_mock_wmfw_add_info(), because the source string length was rounded up to the allocation size. Cc: Simon Trimmer Cc: Charles Keepax Cc: Richard Fitzgerald Cc: patches@opensource.cirrus.com Cc: stable@vger.kernel.org Signed-off-by: Jaroslav Kysela Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250523155814.1256762-1-perex@perex.cz Signed-off-by: Mark Brown commit 354ad60e123dad8e231e7443735020806f3c57d0 Author: Usama Arif Date: Fri May 23 17:52:40 2025 +0100 mm: slub: only warn once when allocating slab obj extensions fails In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Change this to warning only once. Signed-off-by: Usama Arif Reported-by: Vlad Poenaru Closes: https://lore.kernel.org/all/17fab2d6-5a74-4573-bcc3-b75951508f0a@gmail.com/ Reviewed-by: Shakeel Butt Reviewed-by: SeongJae Park Acked-by: Harry Yoo Signed-off-by: Vlastimil Babka commit f62bb41740462bf9fde4b110df5c7d3bc223fb3c Author: John Madieu Date: Mon May 19 00:08:12 2025 +0200 arm64: dts: renesas: rzg3e-smarc-som: Reduce I2C2 clock frequency Lower the I2C2 bus clock frequency on the RZ/G3E SMARC SoM from 1MHz to 400kHz to improve compatibility with a wider range of I2C peripherals. As the GreenPAK device is programmed to operate at 400kHz, the previous 1MHz setting was too aggressive, causing it to experience timing issues. Fixes: f7a98e256ee3 ("arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol") Signed-off-by: John Madieu Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250518220812.1480696-1-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3bfb22cecfe6b6f0d8ee56ef4b533cf68599c5d9 Author: Álvaro Fernández Rojas Date: Wed May 21 10:03:25 2025 +0200 mtd: rawnand: brcmnand: legacy exec_op implementation Commit 3c8260ce7663 ("mtd: rawnand: brcmnand: exec_op implementation") removed legacy interface functions, breaking < v5.0 controllers support. In order to fix older controllers we need to add an alternative exec_op implementation which doesn't rely on low level registers. Fixes: 3c8260ce7663 ("mtd: rawnand: brcmnand: exec_op implementation") Signed-off-by: Álvaro Fernández Rojas Reviewed-by: David Regan Reviewed-by: Florian Fainelli Reviewed-by: William Zhang Signed-off-by: Miquel Raynal commit 44ed1f5ff73e9e115b6f5411744d5a22ea1c855b Author: Wentao Liang Date: Mon May 26 11:43:44 2025 +0800 mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk The function sunxi_nfc_hw_ecc_write_chunk() calls the sunxi_nfc_hw_ecc_write_chunk(), but does not call the configuration function sunxi_nfc_randomizer_config(). Consequently, the randomization might not conduct correctly, which will affect the lifespan of NAND flash. A proper implementation can be found in sunxi_nfc_hw_ecc_write_page_dma(). Add the sunxi_nfc_randomizer_config() to config randomizer. Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support") Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Wentao Liang Signed-off-by: Miquel Raynal commit e45b7196df60a4aef86c3998611c91fcc93d21f3 Author: Qiu Yutan Date: Wed May 21 10:14:08 2025 +0800 net: neigh: use kfree_skb_reason() in neigh_resolve_output() and neigh_connected_output() Replace kfree_skb() used in neigh_resolve_output() and neigh_connected_output() with kfree_skb_reason(). Following new skb drop reason is added: /* failed to fill the device hard header */ SKB_DROP_REASON_NEIGH_HH_FILLFAIL Signed-off-by: Qiu Yutan Signed-off-by: Jiang Kun Reviewed-by: Kuniyuki Iwashima Reviewed-by: Xu Xin Signed-off-by: David S. Miller commit 8ceeef23a3a7b077caa98be713c09a4cdfbd018f Author: Stanislav Fomichev Date: Tue May 20 13:30:44 2025 -0700 selftests: ncdevmem: add tx test with multiple IOVs Use prime 3 for length to make offset slowly drift away. Signed-off-by: Stanislav Fomichev Acked-by: Mina Almasry Signed-off-by: David S. Miller commit 61f24c6885d6d509c485b71bdde75b499f5d19b6 Author: Stanislav Fomichev Date: Tue May 20 13:30:43 2025 -0700 selftests: ncdevmem: make chunking optional Add new -z argument to specify max IOV size. By default, use single large IOV. Signed-off-by: Stanislav Fomichev Reviewed-by: Mina Almasry Signed-off-by: David S. Miller commit 384492c48e6a88c9a7f0376d8e8ac7f557988e92 Author: Stanislav Fomichev Date: Tue May 20 13:30:42 2025 -0700 net: devmem: support single IOV with sendmsg sendmsg() with a single iov becomes ITER_UBUF, sendmsg() with multiple iovs becomes ITER_IOVEC. iter_iov_len does not return correct value for UBUF, so teach to treat UBUF differently. Cc: Al Viro Cc: Pavel Begunkov Cc: Mina Almasry Fixes: bd61848900bf ("net: devmem: Implement TX path") Signed-off-by: Stanislav Fomichev Acked-by: Mina Almasry Reviewed-by: Pavel Begunkov Signed-off-by: David S. Miller commit 03bcbbb3995ba5df43af9aba45334e35f2dfe27b Author: Thomas Zimmermann Date: Tue May 20 09:14:00 2025 +0200 dummycon: Trigger redraw when switching consoles with deferred takeover Signal vt subsystem to redraw console when switching to dummycon with deferred takeover enabled. Makes the console switch to fbcon and displays the available output. With deferred takeover enabled, dummycon acts as the placeholder until the first output to the console happens. At that point, fbcon takes over. If the output happens while dummycon is not active, it cannot inform fbcon. This is the case if the vt subsystem runs in graphics mode. A typical graphical boot starts plymouth, a display manager and a compositor; all while leaving out dummycon. Switching to a text-mode console leaves the console with dummycon even if a getty terminal has been started. Returning true from dummycon's con_switch helper signals the vt subsystem to redraw the screen. If there's output available dummycon's con_putc{s} helpers trigger deferred takeover of fbcon, which sets a display mode and displays the output. If no output is available, dummycon remains active. v2: - make the comment slightly more verbose (Javier) Signed-off-by: Thomas Zimmermann Reported-by: Andrei Borzenkov Closes: https://bugzilla.suse.com/show_bug.cgi?id=1242191 Tested-by: Andrei Borzenkov Acked-by: Javier Martinez Canillas Fixes: 83d83bebf401 ("console/fbcon: Add support for deferred console takeover") Cc: Hans de Goede Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: # v4.19+ Link: https://lore.kernel.org/r/20250520071418.8462-1-tzimmermann@suse.de commit d91c0751d0a622bd29b6078a6d0e183c8342a574 Author: Eric Biggers Date: Tue May 13 21:54:07 2025 -0700 ksmbd: remove unnecessary softdep on crc32 ksmbd accesses crc32 using normal function calls (as opposed to e.g. the generic crypto infrastructure's name-based algorithm resolution), so there is no need to declare a module softdep. Signed-off-by: Eric Biggers Acked-by: Namjae Jeon Signed-off-by: Steve French commit eb21736021865112f8e1bec20fe55f995bc4e771 Author: Eric Biggers Date: Tue May 13 21:50:34 2025 -0700 ksmbd: use SHA-256 library API instead of crypto_shash API ksmbd_gen_sd_hash() does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Signed-off-by: Eric Biggers Acked-by: Namjae Jeon Signed-off-by: Steve French commit 2297554f01df6d3d4e98a3915c183ce3e491740a Author: Eric Biggers Date: Sun May 18 12:32:12 2025 -0700 x86/fpu: Fix irq_fpu_usable() to return false during CPU onlining irq_fpu_usable() incorrectly returned true before the FPU is initialized. The x86 CPU onlining code can call sha256() to checksum AMD microcode images, before the FPU is initialized. Since sha256() recently gained a kernel-mode FPU optimized code path, a crash occurred in kernel_fpu_begin_mask() during hotplug CPU onlining. (The crash did not occur during boot-time CPU onlining, since the optimized sha256() code is not enabled until subsys_initcalls run.) Fix this by making irq_fpu_usable() return false before fpu__init_cpu() has run. To do this without adding any additional overhead to irq_fpu_usable(), replace the existing per-CPU bool in_kernel_fpu with kernel_fpu_allowed which tracks both initialization and usage rather than just usage. The initial state is false; FPU initialization sets it to true; kernel-mode FPU sections toggle it to false and then back to true; and CPU offlining restores it to the initial state of false. Fixes: 11d7956d526f ("crypto: x86/sha256 - implement library instead of shash") Reported-by: Ayush Jain Closes: https://lore.kernel.org/r/20250516112217.GBaCcf6Yoc6LkIIryP@fat_crate.local Signed-off-by: Eric Biggers Tested-by: Ayush Jain Reviewed-by: Thomas Gleixner Signed-off-by: Herbert Xu commit c7622a4e44d9d008e0e5edcc46c71854c50cf4a8 Author: Alexandre Belloni Date: Mon May 26 00:21:52 2025 +0200 rtc: m41t80: reduce verbosity The driver currently uses dev_err for messages that have a very low probability of being read by the user as the error will probably never happen and the systems with the RTC probably don't have any user able to read the message. Moreover, the only user action after getting this message is the restart the action so drop the level to dev_dbg. Link: https://lore.kernel.org/r/20250525222153.1472917-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 1a7ed2fffbe3096f1b15787b913547db887733c3 Author: A. Niyas Ahamed Mydeen Date: Wed Apr 2 17:35:46 2025 +0530 rtc: m41t80: kickstart ocillator upon failure The ocillator on the m41t62 (and other chips of this type) needs a kickstart upon a failure; the RTC read routine will notice the oscillator failure and fail reads. This is added in the RTC write routine; this allows the system to know that the time in the RTC is accurate. This is following the procedure described in section 3.11 of "https://www.st.com/resource/en/datasheet/m41t62.pdf" Signed-off-by: A. Niyas Ahamed Mydeen Reviewed-by: Corey Minyard Link: https://lore.kernel.org/r/20250402120546.336657-2-nmydeen@mvista.com Signed-off-by: Alexandre Belloni commit 818b6709e1cb0637cbdc67402c17759df39471b4 Author: Ciprian Marian Costea Date: Thu Apr 3 13:33:44 2025 +0300 rtc: s32g: add NXP S32G2/S32G3 SoC support Add a RTC driver for NXP S32G2/S32G3 SoCs. RTC tracks clock time during system suspend. It can be a wakeup source for the S32G2/S32G3 SoC based boards. The RTC module from S32G2/S32G3 is not battery-powered and it is not kept alive during system reset. Co-developed-by: Bogdan Hamciuc Signed-off-by: Bogdan Hamciuc Co-developed-by: Ghennadi Procopciuc Signed-off-by: Ghennadi Procopciuc Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20250403103346.3064895-3-ciprianmarian.costea@oss.nxp.com Signed-off-by: Alexandre Belloni commit 8568d8b4daecb8c1ac6a7a883ee2da7b70f11b20 Author: Ciprian Marian Costea Date: Thu Apr 3 13:33:43 2025 +0300 dt-bindings: rtc: add schema for NXP S32G2/S32G3 SoCs RTC tracks clock time during system suspend and it is used as a wakeup source on S32G2/S32G3 architecture. RTC from S32G2/S32G3 is not battery-powered and it is not kept alive during system reset. Co-developed-by: Bogdan-Gabriel Roman Signed-off-by: Bogdan-Gabriel Roman Co-developed-by: Ghennadi Procopciuc Signed-off-by: Ghennadi Procopciuc Signed-off-by: Ciprian Marian Costea Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250403103346.3064895-2-ciprianmarian.costea@oss.nxp.com Signed-off-by: Alexandre Belloni commit f4daa80d6be7d3c55ca72a8e560afc4e21f886aa Author: Gary Guo Date: Sat May 17 09:55:59 2025 +0100 rust: compile libcore with edition 2024 for 1.87+ Rust 1.87 (released on 2025-05-15) compiles core library with edition 2024 instead of 2021 [1]. Ensure that the edition matches libcore's expectation to avoid potential breakage. [ J3m3 reported in Zulip [2] that the `rust-analyzer` target was broken after this patch -- indeed, we need to avoid `core-cfgs` since those are passed to the `rust-analyzer` target. So, instead, I tweaked the patch to create a new `core-edition` variable and explicitly mention the `--edition` flag instead of reusing `core-cfg`s. In addition, pass a new argument using this new variable to `generate_rust_analyzer.py` so that we set the right edition there. By the way, for future reference: the `filter-out` change is needed for Rust < 1.87, since otherwise we would skip the `--edition=2021` we just added, ending up with no edition flag, and thus the compiler would default to the 2015 one. [2] https://rust-for-linux.zulipchat.com/#narrow/channel/291565/topic/x/near/520206547 - Miguel ] Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust/pull/138162 [1] Reported-by: est31 Closes: https://github.com/Rust-for-Linux/linux/issues/1163 Signed-off-by: Gary Guo Link: https://lore.kernel.org/r/20250517085600.2857460-1-gary@garyguo.net Signed-off-by: Miguel Ojeda commit df523db15a06c37cbabad8f477ae87d08c9081f2 Author: Miguel Ojeda Date: Mon Mar 24 22:03:52 2025 +0100 rust: dma: add missing Markdown code span Add missing Markdown code span. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: ad2907b4e308 ("rust: add dma coherent allocator abstraction") Reviewed-by: Benno Lossin Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250324210359.1199574-6-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit f54c750333381bfeaa0e4a69b9563d4e4e21f1b3 Author: Miguel Ojeda Date: Mon Mar 24 22:03:56 2025 +0100 rust: task: add missing Markdown code spans and intra-doc links Add missing Markdown code spans and also convert them into intra-doc links. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: e0020ba6cbcb ("rust: add PidNamespace") Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250324210359.1199574-10-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 1dbaf8b1bafb8557904eb54b98bb323a3061dd2c Author: Miguel Ojeda Date: Mon Mar 24 22:03:54 2025 +0100 rust: pci: fix docs related to missing Markdown code spans In particular: - Add missing Markdown code spans. - Improve title for `DeviceId`, adding a link to the struct in the C side, rather than referring to `bindings::`. - Convert `TODO` from documentation to a normal comment, and put code in block. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: 1bd8b6b2c5d3 ("rust: pci: add basic PCI device / driver abstractions") Reviewed-by: Benno Lossin Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250324210359.1199574-8-ojeda@kernel.org [ Prefixed link text with `struct`. - Miguel ] Signed-off-by: Miguel Ojeda commit abd21a163d4188c180cabb6747b1d94e3c0586b9 Author: Miguel Ojeda Date: Mon Mar 24 22:03:51 2025 +0100 rust: alloc: add missing Markdown code span Add missing Markdown code span. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test") Reviewed-by: Benno Lossin Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250324210359.1199574-5-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 673ec360cfb099a5f44dabee0f0e6c9b282efa7e Author: Miguel Ojeda Date: Mon Mar 24 22:03:50 2025 +0100 rust: alloc: add missing Markdown code spans Add missing Markdown code spans. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: b6a006e21b82 ("rust: alloc: introduce allocation flags") Reviewed-by: Benno Lossin Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20250324210359.1199574-4-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 9f047636831a61ce0840929555245dd17695206a Author: Miguel Ojeda Date: Mon Mar 24 22:03:55 2025 +0100 rust: platform: fix docs related to missing Markdown code spans Convert `TODO` from documentation to a normal comment, and put code in block. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: 683a63befc73 ("rust: platform: add basic platform device / driver abstractions") Reviewed-by: Benno Lossin Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250324210359.1199574-9-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 69157b00b526c31522a00b9908bfd53fa21b47f2 Author: Arnd Bergmann Date: Thu May 22 16:38:49 2025 +0200 platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m When CONFIG_HWMON is built as a loadable module, the HSMP drivers cannot be built-in: ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/amd_hsmp.ko] undefined! ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/hsmp_acpi.ko] undefined! Enforce that through the usual Kconfig dependnecy trick. Fixes: 92c025db52bb ("platform/x86/amd/hsmp: Report power via hwmon sensors") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250522144422.2824083-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 7ff5f091409f1c1bca6374bcce54d71e8328d17f Author: Luke Jones Date: Sat May 24 12:13:42 2025 +0200 platform/x86: asus-wmi: fix build without CONFIG_SUSPEND The patch "Refactor Ally suspend/resume" introduced an acpi_s2idle_dev_ops for use with ROG Ally which caused a build error if CONFIG_SUSPEND was not defined. Signed-off-by: Luke Jones Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505090418.DaeaXe4i-lkp@intel.com/ Fixes: feea7bd6b02d ("platform/x86: asus-wmi: Refactor Ally suspend/resume") Link: https://lore.kernel.org/r/20250524101343.57883-2-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d09a8a4ab57849d0401d7c0bc6583e367984d9f7 Author: Simon Horman Date: Tue May 20 15:33:33 2025 +0100 net: ethernet: mtk_eth_soc: Correct spelling Correct spelling of platforms, various, and initial. As flagged by codespell. Signed-off-by: Simon Horman Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller commit b3456571cea18e64b9eaf55044db56d45326134d Author: Simon Horman Date: Tue May 20 15:25:41 2025 +0100 net: dlink: Correct endian treatment of t_SROM data As it's name suggests, parse_eeprom() parses EEPROM data. This is done by reading data, 16 bits at a time as follows: for (i = 0; i < 128; i++) ((__le16 *) sromdata)[i] = cpu_to_le16(read_eeprom(np, i)); sromdata is at the same memory location as psrom. And the type of psrom is a pointer to struct t_SROM. As can be seen in the loop above, data is stored in sromdata, and thus psrom, as 16-bit little-endian values. However, the integer fields of t_SROM are host byte order. In the case of the led_mode field this results in a but which has been addressed by commit e7e5ae71831c ("net: dlink: Correct endianness handling of led_mode"). In the case of the remaining fields, which are updated by this patch, I do not believe this does not result in any bugs. But it does seem best to correctly annotate the endianness of integers. Flagged by Sparse as: .../dl2k.c:344:35: warning: restricted __le32 degrades to integer Compile tested only. No run-time change intended. Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit bb91f7547f79434e8818d3f235437e021d34c1cb Author: Hariprasad Kelam Date: Tue May 20 11:39:52 2025 +0530 octeontx2-af: NPC: Clear Unicast rule on nixlf detach The AF driver assigns reserved MCAM entries (for unicast, broadcast, etc.) based on the NIXLF number. When a NIXLF is detached, these entries are disabled. For example, PF NIXLF -------------------- PF0 0 SDP-VF0 1 If the user unbinds both PF0 and SDP-VF0 interfaces and then binds them in reverse order PF NIXLF --------------------- SDP-VF0 0 PF0 1 In this scenario, the PF0 unicast entry is getting corrupted because the MCAM entry contains stale data (SDP-VF0 ucast data) This patch resolves the issue by clearing the unicast MCAM entry during NIXLF detach Signed-off-by: Hariprasad Kelam Signed-off-by: David S. Miller commit ab535361efdf8129dc593f8f2d80b76767c07813 Author: Gregory CLEMENT Date: Fri May 23 09:58:15 2025 +0200 MIPS: SMP: Move the AP sync point before the calibration delay In the calibration delay process, some resources are shared, so it's better to move it after the parallel execution part. Thanks to the patch optimizing CPU delay calibration, this change has no impact on the boot time improvements gained from CPU parallel boot. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit 79ee1d20e37cd553cc961962fca8107e69a0c293 Author: Caleb James DeLisle Date: Wed May 21 21:33:33 2025 +0000 mips: econet: Fix incorrect Kconfig dependencies config ECONET selects SERIAL_OF_PLATFORM and that depends on SERIAL_8250 so we need to select SERIAL_8250 directly. Also do not enable DEBUG_ZBOOT unless DEBUG_KERNEL is set. Signed-off-by: Caleb James DeLisle Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505211654.CBdIsoTq-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202505211451.WRjyf3a9-lkp@intel.com/ Signed-off-by: Thomas Bogendoerfer commit 260ce16e579d375ba8f1ac945308343522f98d50 Author: Ajit Khaparde Date: Fri May 23 13:29:52 2025 +0530 RDMA/bnxt_re: Support extended stats for Thor2 VF The driver currently checks if the user is querying VF RoCE statistics. It will not send the query_roce_stats_ext HWRM command if it is for a VF. But Thor2 VF can support extended statistics. Allow query of extended stats for Thor2 VFs. Signed-off-by: Ajit Khaparde Signed-off-by: Shravya KN Link: https://patch.msgid.link/20250523075952.1267827-1-kalesh-anakkur.purayil@broadcom.com Reviewed-by: Damodharam Ammepalli Reviewed-by: Kalesh AP Signed-off-by: Leon Romanovsky commit 6e7272afc9ab556be01de19b54bea3a1f9a9668f Author: Junxian Huang Date: Fri May 23 10:34:33 2025 +0800 RDMA/hns: Fix endian issue in trace events Avoid using __le32 directly in trace events to fix sparse complains: drivers/infiniband/hw/hns/./hns_roce_trace.h:48:1: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/hns/./hns_roce_trace.h:48:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roce_trace.h:48:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roce_trace.h:90:1: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/hns/./hns_roce_trace.h:90:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roce_trace.h:90:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roce_trace.h:173:1: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/hns/./hns_roce_trace.h:173:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roce_trace.h:173:1: sparse: sparse: restricted __le32 degrades to integer Fixes: 6c98c8670806 ("RDMA/hns: Add trace for WQE dumping") Fixes: 1e63e2f96613 ("RDMA/hns: Add trace for AEQE dumping") Fixes: 6bd18dabf1c9 ("RDMA/hns: Add trace for CMDQ dumping") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505170327.TNOpreil-lkp@intel.com/ Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250523023433.2171003-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit e91fb8b9d0edec86a1ef26490bc80af96210863d Author: Leon Romanovsky Date: Wed May 21 14:34:58 2025 +0300 RDMA/mlx5: Avoid flexible array warning The following warning is reported by sparse tool: drivers/infiniband/hw/mlx5/fs.c:1664:26: warning: array of flexible structures Avoid it by simply splitting array into two separate structs. Link: https://patch.msgid.link/7b891b96a9fc053d01284c184d25ae98d35db2d4.1747827041.git.leon@kernel.org Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 45611fe821af0e09cb9dc2dfd2418b2e1e1831f3 Author: Vlad Dumitrescu Date: Wed May 21 14:34:17 2025 +0300 IB/cm: Remove dead code and adjust naming Drop ib_send_cm_mra parameters which are always constant. Remove branch which is never taken. Adjust name to ib_prepare_cm_mra, which better reflects its functionality - no MRA is actually sent. Adjust name of related tracepoints. Push setting of the constant service timeout to cm.c and drop IB_CM_MRA_FLAG_DELAY. Signed-off-by: Vlad Dumitrescu Reviewed-by: Sean Hefty Link: https://patch.msgid.link/cdd2a237acf2b495c19ce02e4b1c42c41c6751c2.1747827207.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 259e9bd07c57b0fd8588f68e9adbe2c41170f4fe Author: Daisuke Matsuda Date: Sat May 24 14:43:28 2025 +0000 RDMA/core: Avoid hmm_dma_map_alloc() for virtual DMA devices Drivers such as rxe, which use virtual DMA, must not call into the DMA mapping core since they lack physical DMA capabilities. Otherwise, a NULL pointer dereference is observed as shown below. This patch ensures the RDMA core handles virtual and physical DMA paths appropriately. This fixes the following kernel oops: BUG: kernel NULL pointer dereference, address: 00000000000002fc #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1028eb067 P4D 1028eb067 PUD 105da0067 PMD 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 3 UID: 1000 PID: 1854 Comm: python3 Tainted: G W 6.15.0-rc1+ #11 PREEMPT(voluntary) Tainted: [W]=WARN Hardware name: Trigkey Key N/Key N, BIOS KEYN101 09/02/2024 RIP: 0010:hmm_dma_map_alloc+0x25/0x100 Code: 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 49 89 d6 49 c1 e6 0c 41 55 41 54 53 49 39 ce 0f 82 c6 00 00 00 49 89 fc 87 fc 02 00 00 20 0f 84 af 00 00 00 49 89 f5 48 89 d3 49 89 cf RSP: 0018:ffffd3d3420eb830 EFLAGS: 00010246 RAX: 0000000000001000 RBX: ffff8b727c7f7400 RCX: 0000000000001000 RDX: 0000000000000001 RSI: ffff8b727c7f74b0 RDI: 0000000000000000 RBP: ffffd3d3420eb858 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 00007262a622a000 R14: 0000000000001000 R15: ffff8b727c7f74b0 FS: 00007262a62a1080(0000) GS:ffff8b762ac3e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000002fc CR3: 000000010a1f0004 CR4: 0000000000f72ef0 PKRU: 55555554 Call Trace: ib_init_umem_odp+0xb6/0x110 [ib_uverbs] ib_umem_odp_get+0xf0/0x150 [ib_uverbs] rxe_odp_mr_init_user+0x71/0x170 [rdma_rxe] rxe_reg_user_mr+0x217/0x2e0 [rdma_rxe] ib_uverbs_reg_mr+0x19e/0x2e0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xd9/0x150 [ib_uverbs] ib_uverbs_cmd_verbs+0xd19/0xee0 [ib_uverbs] ? mmap_region+0x63/0xd0 ? __pfx_ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x10/0x10 [ib_uverbs] ib_uverbs_ioctl+0xba/0x130 [ib_uverbs] __x64_sys_ioctl+0xa4/0xe0 x64_sys_call+0x1178/0x2660 do_syscall_64+0x7e/0x170 ? syscall_exit_to_user_mode+0x4e/0x250 ? do_syscall_64+0x8a/0x170 ? do_syscall_64+0x8a/0x170 ? syscall_exit_to_user_mode+0x4e/0x250 ? do_syscall_64+0x8a/0x170 ? syscall_exit_to_user_mode+0x4e/0x250 ? do_syscall_64+0x8a/0x170 ? do_user_addr_fault+0x1d2/0x8d0 ? irqentry_exit_to_user_mode+0x43/0x250 ? irqentry_exit+0x43/0x50 ? exc_page_fault+0x93/0x1d0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7262a6124ded Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00 RSP: 002b:00007fffd08c3960 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fffd08c39f0 RCX: 00007262a6124ded RDX: 00007fffd08c3a10 RSI: 00000000c0181b01 RDI: 0000000000000007 RBP: 00007fffd08c39b0 R08: 0000000014107820 R09: 00007fffd08c3b44 R10: 000000000000000c R11: 0000000000000246 R12: 00007fffd08c3b44 R13: 000000000000000c R14: 00007fffd08c3b58 R15: 0000000014107960 Fixes: 1efe8c0670d6 ("RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage") Closes: https://lore.kernel.org/all/3e8f343f-7d66-4f7a-9f08-3910623e322f@gmail.com/ Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250524144328.4361-1-dskmtsd@gmail.com Signed-off-by: Leon Romanovsky commit 9857af0fcff385c75433f2162c30c62eb912ef6d Author: Carlos Llamas Date: Sat May 24 22:07:58 2025 +0000 binder: fix yet another UAF in binder_devices Commit e77aff5528a18 ("binderfs: fix use-after-free in binder_devices") addressed a use-after-free where devices could be released without first being removed from the binder_devices list. However, there is a similar path in binder_free_proc() that was missed: ================================================================== BUG: KASAN: slab-use-after-free in binder_remove_device+0xd4/0x100 Write of size 8 at addr ffff0000c773b900 by task umount/467 CPU: 12 UID: 0 PID: 467 Comm: umount Not tainted 6.15.0-rc7-00138-g57483a362741 #9 PREEMPT Hardware name: linux,dummy-virt (DT) Call trace: binder_remove_device+0xd4/0x100 binderfs_evict_inode+0x230/0x2f0 evict+0x25c/0x5dc iput+0x304/0x480 dentry_unlink_inode+0x208/0x46c __dentry_kill+0x154/0x530 [...] Allocated by task 463: __kmalloc_cache_noprof+0x13c/0x324 binderfs_binder_device_create.isra.0+0x138/0xa60 binder_ctl_ioctl+0x1ac/0x230 [...] Freed by task 215: kfree+0x184/0x31c binder_proc_dec_tmpref+0x33c/0x4ac binder_deferred_func+0xc10/0x1108 process_one_work+0x520/0xba4 [...] ================================================================== Call binder_remove_device() within binder_free_proc() to ensure the device is removed from the binder_devices list before being kfreed. Cc: stable@vger.kernel.org Fixes: 12d909cac1e1 ("binderfs: add new binder devices to binder_devices") Reported-by: syzbot+4af454407ec393de51d6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=4af454407ec393de51d6 Tested-by: syzbot+4af454407ec393de51d6@syzkaller.appspotmail.com Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20250524220758.915028-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 40617439d572645207c1866dfb086de0be438a14 Author: Masahiro Yamada Date: Thu May 22 16:17:22 2025 +0900 docs/core-api/symbol-namespaces: drop table of contents and section numbering The manually updated table of contents and section numbering are hard to maintain. Make changes similar to the following commits: 5e8f0ba38a4d ("docs/kbuild/makefiles: throw out the local table of contents") 1a4c1c9df72e ("docs/kbuild/makefiles: drop section numbering, use references") Signed-off-by: Masahiro Yamada commit 9c036cfbb75bb58ecce589f547fdb8af153493a6 Author: Masahiro Yamada Date: Thu May 22 16:17:20 2025 +0900 modpost: check forbidden MODULE_IMPORT_NS("module:") at compile time Explicitly adding MODULE_IMPORT_NS("module:...") is not allowed. Currently, this is only checked at run time. That is, when such a module is loaded, an error message like the following is shown: foo: module tries to import module namespace: module:bar Obviously, checking this at compile time improves usability. In such a case, modpost will report the following error at compile time: ERROR: modpost: foo: explicitly importing namespace "module:bar" is not allowed. Signed-off-by: Masahiro Yamada commit 8f81d8529e19c84b014e4239d2012373274d138d Author: Masahiro Yamada Date: Wed May 14 14:46:33 2025 +0900 kbuild: move kbuild syntax processing to scripts/Makefile.build scripts/Makefile.lib is included by the following Makefiles: scripts/Makefile.build scripts/Makefile.modfinal scripts/Makefile.package scripts/Makefile.vmlinux scripts/Makefile.vmlinux_o However, the last four do not need to process Kbuild syntax such as obj-*, lib-*, subdir-*, etc. Move the relevant code to scripts/Makefile.build. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 2adde2eb1638336e17f887070e6dfc52205d464b Author: Henrik Lindström Date: Mon May 12 18:10:06 2025 +0200 Makefile: remove dependency on archscripts for header installation archscripts has nothing to do with headers_install. Signed-off-by: Henrik Lindström Reviewed-by: Nicolas Schier Signed-off-by: Masahiro Yamada commit cf9d692629fa3017989367ac86bf34109176cdad Author: Sami Tolvanen Date: Wed May 7 23:14:09 2025 +0000 Documentation/kbuild: Add new gendwarfksyms kABI rules Document the "byte_size" and "type_string" kABI stability rules. Signed-off-by: Sami Tolvanen Signed-off-by: Masahiro Yamada commit 881bf900bc880ee3ad88c0dd74253785088a25d7 Author: Sami Tolvanen Date: Wed May 7 23:14:08 2025 +0000 Documentation/kbuild: Drop section numbers Change the gendwarfksyms documentation to use proper chapter, section, and subsection adornments instead of fragile section numbers. Suggested-by: Masahiro Yamada Signed-off-by: Sami Tolvanen Signed-off-by: Masahiro Yamada commit c9083467f7b97e7c06b7a9038c4f18095329bd37 Author: Sami Tolvanen Date: Wed May 7 23:14:07 2025 +0000 gendwarfksyms: Add a kABI rule to override type strings In rare situations where distributions must make significant changes to otherwise opaque data structures that have inadvertently been included in the published ABI, keeping symbol versions stable using the existing kABI macros can become tedious. For example, Android decided to switch to a newer io_uring implementation in the 5.10 GKI kernel "to resolve a huge number of potential, and known, problems with the codebase," requiring "horrible hacks" with genksyms: "A number of the io_uring structures get used in other core kernel structures, only as "opaque" pointers, so there is not any real ABI breakage. But, due to the visibility of the structures going away, the CRC values of many scheduler variables and functions were changed." -- https://r.android.com/2425293 While these specific changes probably could have been hidden from gendwarfksyms using the existing kABI macros, this may not always be the case. Add a last resort kABI rule that allows distribution maintainers to fully override a type string for a symbol or a type. Also add a more informative error message in case we find a non-existent type references when calculating versions. Suggested-by: Giuliano Procida Signed-off-by: Sami Tolvanen Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit db59d74e5da144111fc133fb1bf72e6392bdb04e Author: Sami Tolvanen Date: Wed May 7 23:14:06 2025 +0000 gendwarfksyms: Add a kABI rule to override byte_size attributes A data structure can be partially opaque to modules if its allocation is handled by the core kernel, and modules only need to access some of its members. In this situation, it's possible to append new members to the structure without breaking the ABI, as long as the layout for the original members remains unchanged. For example, consider the following struct: struct s { unsigned long a; void *p; }; gendwarfksyms --stable --dump-dies produces the following type expansion: variable structure_type s { member base_type long unsigned int byte_size(8) encoding(7) a data_member_location(0) , member pointer_type { base_type void } byte_size(8) p data_member_location(8) } byte_size(16) To append new members, we can use the KABI_IGNORE() macro to hide them from gendwarfksyms --stable: struct s { /* old members with unchanged layout */ unsigned long a; void *p; /* new members not accessed by modules */ KABI_IGNORE(0, unsigned long n); }; However, we can't hide the fact that adding new members changes the struct size, as seen in the updated type string: variable structure_type s { member base_type long unsigned int byte_size(8) encoding(7) a data_member_location(0) , member pointer_type { base_type void } byte_size(8) p data_member_location(8) } byte_size(24) In order to support this use case, add a kABI rule that makes it possible to override the byte_size attribute for types: /* * struct s allocation is handled by the kernel, so * appending new members without changing the original * layout won't break the ABI. */ KABI_BYTE_SIZE(s, 16); This results in a type string that's unchanged from the original and therefore, won't change versions for symbols that reference the changed structure. Signed-off-by: Sami Tolvanen Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit ff2c5f5a9e01b9fc3b4959c2b3f40843cc0a5ecb Author: Sami Tolvanen Date: Wed May 7 23:14:05 2025 +0000 gendwarfksyms: Clean up kABI rule look-ups Reduce code duplication by moving kABI rule look-ups to separate functions. Signed-off-by: Sami Tolvanen Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit 707f853d7fa3ce323a6875487890c213e34d81a0 Author: Peter Zijlstra Date: Fri May 2 16:12:09 2025 +0200 module: Provide EXPORT_SYMBOL_GPL_FOR_MODULES() helper Helper macro to more easily limit the export of a symbol to a given list of modules. Eg: EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm"); will limit the use of said function to kvm.ko, any other module trying to use this symbol will refure to load (and get modpost build failures). Requested-by: Masahiro Yamada Requested-by: Christoph Hellwig Signed-off-by: Peter Zijlstra Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit 0267cbf297bf7ed9ef5181feceea9fe03c84318e Author: Peter Zijlstra Date: Fri May 2 16:12:08 2025 +0200 module: Account for the build time module name mangling Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle the module name with s/-/_/g. Since this happens late in the build, only the kernel needs to bother with this, the modpost tool still sees the original name. Reported-by: Sean Christopherson Signed-off-by: Peter Zijlstra Tested-by: Sean Christopherson Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit 754f8733fc09dd92093cfbd34fa71a42d152b250 Author: Peter Zijlstra Date: Fri May 2 16:12:07 2025 +0200 module: Extend the module namespace parsing Instead of only accepting "module:${name}", extend it with a comma separated list of module names and add tail glob support. That is, something like: "module:foo-*,bar" is now possible. Signed-off-by: Peter Zijlstra Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit 520b1a147d918eb07132c847ad5598a17d3ff7ca Author: Peter Zijlstra Date: Fri May 2 16:12:06 2025 +0200 module: Add module specific symbol namespace support Designate the "module:${modname}" symbol namespace to mean: 'only export to the named module'. Notably, explicit imports of anything in the "module:" space is forbidden. Signed-off-by: Peter Zijlstra Reviewed-by: Petr Pavlu Signed-off-by: Masahiro Yamada commit 6b91ff002c67b2502009f99115c4b7fe5b7b8248 Author: Peter Zijlstra Date: Fri May 2 16:12:05 2025 +0200 modpost: Use for() loop Slight cleanup by using a for() loop instead of while(). This makes it clearer what is the iteration and what is the actual work done. Signed-off-by: Peter Zijlstra Signed-off-by: Masahiro Yamada commit 94ec70880fd376dd5cc60ba2bd7ddf830b3d4f28 Merge: cdb7d2d68cde61 78272d44970c07 Author: Ingo Molnar Date: Sun May 25 10:10:08 2025 +0200 Merge branch 'locking/futex' into locking/core, to pick up pending futex changes Signed-off-by: Ingo Molnar commit e7d952cc39fca34386ec9f15f68cb2eaac01b5ae Author: Ingo Molnar Date: Sat May 24 11:23:25 2025 +0200 perf/headers: Clean up a bit Do a bit of readability spring cleaning: - Fix misaligned structure member in perf_addr_filter: the new struct perf_addr_filter::action member was too long, but when it was added it was not aligned properly. Align all fields to the customary column 41 alignment of most of the rest of the header. - Adjust the vertical alignment of the definition of other structures and definitions as well, so that the 'most of' in the previous paragraph changes to 'all of'. ;-) - Prettify the assignments in perf_clear_branch_entry_bitfields() - Move comments from CPP definitions to outside the macro - Move perf_guest_info_callbacks and related defines from the front of the header closer to where it's used within the header. - And more #endif markers for larger CPP blocks and standardize #if/#else/#endif blocks to the following nomenclature: #ifdef CONFIG_FOO ... #else /* !CONFIG_FOO: */ ... #endif /* !CONFIG_FOO */ - Standardize on consistently using the 'extern' storage class where appropriate, we had cases where method prototypes sometimes omitted the storage class: extern void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu); int perf_event_read_local(struct perf_event *event, u64 *value, u64 *enabled, u64 *running); extern u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running); Which is obviously a bit confusing and adds unnecessary noise. - s/__u64/u64 and similar cleanups: there's no point in using __u64 in non-UAPI headers, and doing so only adds unnecessary visual noise. - Harmonize all multi-parameter function prototypes along the following style: extern struct perf_event * perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, struct task_struct *task, perf_overflow_handler_t callback, void *context); - etc. Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Ian Rogers Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit b4a29efc51461edf1a02e9da656d4480cabd24b0 Author: Bo Liu Date: Thu May 22 05:49:31 2025 -0400 erofs: support DEFLATE decompression by using Intel QAT This patch introduces the use of the Intel QAT to offload EROFS data decompression, aiming to improve the decompression performance. A 285MiB dataset is used with the following command to create EROFS images with different cluster sizes: $ mkfs.erofs -zdeflate,level=9 -C{4096,16384,65536,131072,262144} Fio is used to test the following read patterns: $ fio -filename=testfile -bs=4k -rw=read -name=job1 $ fio -filename=testfile -bs=4k -rw=randread -name=job1 $ fio -filename=testfile -bs=4k -rw=randread --io_size=14m -name=job1 Here are some performance numbers for reference: Processors: Intel(R) Xeon(R) 6766E (144 cores) Memory: 512 GiB |-----------------------------------------------------------------------------| | | Cluster size | sequential read | randread | small randread(5%) | |-----------|--------------|-----------------|-----------|--------------------| | Intel QAT | 4096 | 538 MiB/s | 112 MiB/s | 20.76 MiB/s | | Intel QAT | 16384 | 699 MiB/s | 158 MiB/s | 21.02 MiB/s | | Intel QAT | 65536 | 917 MiB/s | 278 MiB/s | 20.90 MiB/s | | Intel QAT | 131072 | 1056 MiB/s | 351 MiB/s | 23.36 MiB/s | | Intel QAT | 262144 | 1145 MiB/s | 431 MiB/s | 26.66 MiB/s | | deflate | 4096 | 499 MiB/s | 108 MiB/s | 21.50 MiB/s | | deflate | 16384 | 422 MiB/s | 125 MiB/s | 18.94 MiB/s | | deflate | 65536 | 452 MiB/s | 159 MiB/s | 13.02 MiB/s | | deflate | 131072 | 452 MiB/s | 177 MiB/s | 11.44 MiB/s | | deflate | 262144 | 466 MiB/s | 194 MiB/s | 10.60 MiB/s | Signed-off-by: Bo Liu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250522094931.28956-1-liubo03@inspur.com [ Gao Xiang: refine the commit message. ] Signed-off-by: Gao Xiang commit 97e69f12edb19a17589ca0b6f3988b2a28af87c8 Author: Kent Overstreet Date: Sat May 24 14:20:58 2025 -0400 bcachefs: Fix missing BTREE_UPDATE_internal_snapshot_node Repair code will do updates on older snapshot versions, so needs the correct annotation. Reported-by: syzbot+42581416dba62b364750@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 7098ba57c443868cab250a3a5db72c89ffbd9026 Author: Kent Overstreet Date: Sat May 24 01:56:10 2025 -0400 bcachefs: fix REFLINK_P_MAY_UPDATE_OPTIONS If we're doing a reflink copy of existing reflinked data, we may only set REFLINK_P_MAY_UPDATE_OPTIONS if it was set on the reflink pointer we're copying from. Signed-off-by: Kent Overstreet commit bf1c27c6d540c84f2de00e43b2efcbd214c8d63c Author: Ryan Wanner Date: Mon Apr 14 14:41:22 2025 -0700 dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt Add SAMA7D65 RTT compatible to DT bindings documentation. Signed-off-by: Ryan Wanner Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/183474a65377f4030360166a5f2659af7323e82b.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Alexandre Belloni commit 0a68f5be7883ecda536a62f4877a373cfec05089 Author: Ryan Wanner Date: Mon Apr 14 14:41:21 2025 -0700 dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc Add SAMA7D65 RTC compatible to DT bindings documentation. Signed-off-by: Ryan Wanner Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/a274485331628be0bcf382b1ba489d4555fa49c8.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Alexandre Belloni commit 5af9f1fa576874b24627d4c05e3a84672204c200 Author: Liu Dalin Date: Fri May 9 16:44:16 2025 +0800 rtc: loongson: Add missing alarm notifications for ACPI RTC events When an application sets and enables an alarm on Loongson RTC devices, the alarm notification fails to propagate to userspace because the ACPI event handler omits calling rtc_update_irq(). As a result, processes waiting via select() or poll() on RTC device files fail to receive alarm notifications. The ACPI interrupt is also triggered multiple times. In loongson_rtc_handler, we need to clear TOY_MATCH0_REG to resolve this issue. Fixes: 09471d8f5b39 ("rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr()") Fixes: 1b733a9ebc3d ("rtc: Add rtc driver for the Loongson family chips") Signed-off-by: Liu Dalin Reviewed-by: Binbin Zhou Link: https://lore.kernel.org/r/20250509084416.7979-1-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni commit d9f82683b123ce315cc36c4b20a5bc3d8644f947 Author: Jingbao Qiu Date: Wed May 7 21:56:20 2025 +0200 rtc: sophgo: add rtc support for Sophgo CV1800 SoC Implement the RTC driver for CV1800, which able to provide time alarm. Signed-off-by: Jingbao Qiu Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250507195626.502240-1-alexander.sverdlin@gmail.com Signed-off-by: Alexandre Belloni commit 3639b35857e2cc5a75de6f2bb10a1cc3f949193f Author: Johan Hovold Date: Wed Apr 23 15:03:18 2025 +0200 rtc: stm32: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423130318.31244-8-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 149834a414e1fc25411a2e0e913ba3127e5758c9 Author: Johan Hovold Date: Wed Apr 23 15:03:17 2025 +0200 rtc: s3c: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: ae05c95074e0 ("rtc: s3c: add s3c_rtc_data structure to use variant data instead of s3c_cpu_type") Signed-off-by: Johan Hovold Fixes: 0d297df03890 ("ARM: s3c: simplify platform code") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423130318.31244-7-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit d5e85c8bfaa630c5e854ac712b7f7d1f696c9954 Author: Johan Hovold Date: Wed Apr 23 15:03:16 2025 +0200 rtc: pm8xxx: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: 5a418558cdae ("rtc: pm8xxx: add support for devicetree") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423130318.31244-6-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit c61f165617b19ad47be98791adb82ec7df9fa96b Author: Johan Hovold Date: Wed Apr 23 15:03:15 2025 +0200 rtc: jz4740: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: 24e1f2c9383e ("rtc: ingenic: Only support probing from devicetree") Signed-off-by: Johan Hovold Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20250423130318.31244-5-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit ac45f6e2473b36932d26fdf325d47c733f947ed8 Author: Johan Hovold Date: Wed Apr 23 15:03:14 2025 +0200 rtc: da9063: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: 80ca3277bc7f ("rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423130318.31244-4-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 5f28ab049fb3179112dc04f1e8e9a475b8655602 Author: Johan Hovold Date: Wed Apr 23 15:03:13 2025 +0200 rtc: cpcap: drop unused module alias The driver only supports OF probe so drop the unused platform module alias. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Johan Hovold Reviewed-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250423130318.31244-3-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 9f05c3943eb621d3f5d6eaced5ac7c2d58f582a8 Author: Johan Hovold Date: Wed Apr 23 15:03:12 2025 +0200 rtc: at91rm9200: drop unused module alias The driver only support OF probe so drop the unused platform module alias. Fixes: 288d9cf1764a ("rtc: at91rm9200: use of_device_get_match_data()") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423130318.31244-2-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit ead4532832795f700fd8962cb1f2aad74f3dfca7 Author: Johan Hovold Date: Wed Apr 23 09:51:41 2025 +0200 rtc: pm8xxx: fix uefi offset lookup On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On platforms where the offset is stored in a Qualcomm specific UEFI variable the variables are also accessed in a non-standard way, which means that the OS cannot assume that the variable service is available by the time the driver probes. Use the new 'qcom,uefi-rtc-info' property to determine whether to probe defer until the UEFI offset becomes available so that the offset can be used also when the RTC driver is built in or when a dependency of the UEFI variable driver is built as a module (e.g. the driver for the SCM interconnects). Fixes: bba38b874886 ("rtc: pm8xxx: add support for uefi offset") Reported-by: Rob Clark Link: https://lore.kernel.org/lkml/CAF6AEGsfke=x0p1b2-uNX6DuQfRyEjVbJaxTbVLDT2YvSkGJbg@mail.gmail.com/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250423075143.11157-3-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit b23b91d56863d280af81c9ca11594484782ceea5 Author: Johan Hovold Date: Wed Apr 23 09:51:40 2025 +0200 dt-bindings: rtc: qcom-pm8xxx: add uefi-variable offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On platforms where the offset is stored in a Qualcomm specific UEFI variable the variables are also accessed in a non-standard way, which means that the OS cannot assume that the variable service is available by the time the RTC driver probes. Add a 'qcom,uefi-rtc-info' boolean flag to indicate that the RTC offset is stored in a Qualcomm specific UEFI variable so that the OS can determine whether to wait for it to become available. The UEFI variable is 882f8c2b-9646-435f-8de5-f208ff80c1bd-RTCInfo and holds a 12-byte structure where the first four bytes is a GPS time offset in little-endian byte order. Link: https://lore.kernel.org/all/aAecIkgmTTlThKEZ@hovoldconsulting.com/ Signed-off-by: Johan Hovold Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250423075143.11157-2-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 7498dca1d0d17c16a21f0e27fbb6414cf2645289 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:40 2025 +0200 rtc: amlogic: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250417074640.81363-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni commit d8a0f6af1d36806d05883bdc5684aeae3689f927 Author: Alexandre Belloni Date: Tue Apr 8 16:42:03 2025 +0200 rtc: interface: silence KMSAN warning KMSAN complains that alarm->time can be used uninitialized. Pass 0 to trace_rtc_read_alarm in case it has not been set. Link: https://lore.kernel.org/r/20250408144203.3869821-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 00286d7d643d3c98e48d9cc3a9f471b37154f462 Author: Wolfram Sang Date: Tue May 6 09:52:11 2025 +0200 i3c: controllers do not need to depend on I3C The Kconfig file for controller drivers is only sourced if the I3C symbol is enabled. No need to check for that in individual drivers. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250506075247.1545-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit cd1a6a0c69e75bf64b44b00186136e563f392b50 Author: Carlos Song Date: Sun Apr 27 16:32:29 2025 +0800 i3c: master: svc: switch to bulk clk API for flexible clock support Use the clk_bulk API to handle clocks, so the code can support different numbers of clocks more easily. Make the code cleaner and more flexible. No change in functionality. Signed-off-by: Carlos Song Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250427083230.3325700-3-carlos.song@nxp.com Signed-off-by: Alexandre Belloni commit 489c773a68de187ad11482433119811949fbb88d Author: Carlos Song Date: Sun Apr 27 16:32:28 2025 +0800 dt-bindings: i3c: silvaco,i3c-master: add i.MX94 and i.MX95 I3C Add compatible string "nxp,imx94-i3c" and "nxp,imx95-i3c" for the i.MX94 chip and i.MX95 chip. Backward is compatible with "silvaco,i3c-master-v1". Also i.MX94 and i.MX95 I3C only need two clocks and Legacy I3C needs three clocks. So add restrictions for clock and clock-names properties for different Socs. Signed-off-by: Carlos Song Reviewed-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250427083230.3325700-2-carlos.song@nxp.com Signed-off-by: Alexandre Belloni commit 7917be170928189fefad490d1a1237fdfa6b856f Author: Radim Krčmář Date: Fri May 23 12:47:28 2025 +0200 RISC-V: KVM: lock the correct mp_state during reset Currently, the kvm_riscv_vcpu_sbi_system_reset() function locks vcpu->arch.mp_state_lock when updating tmp->arch.mp_state.mp_state which is incorrect hence fix it. Fixes: 2121cadec45a ("RISCV: KVM: Introduce mp_state_lock to avoid lock inversion") Signed-off-by: Radim Krčmář Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250523104725.2894546-4-rkrcmar@ventanamicro.com Signed-off-by: Anup Patel commit 37c3714498fbc4abde82b8d9d1127c43e4271ac6 Author: Kever Yang Date: Tue May 6 10:57:10 2025 +0800 dt-bindings: watchdog: Add rk3562 compatible Add rockchip,rk3562-wdt for rk3562. Signed-off-by: Kever Yang Reviewed-by: Heiko Stuebner Acked-by: Rob Herring (Arm) Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250506025715.33595-2-kever.yang@rock-chips.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 76d009ad9527573578f6b4f6432448e297a6a715 Author: Thomas Richard Date: Mon Apr 14 16:57:24 2025 +0200 dt-bindings: watchdog: fsl,scu-wdt: Document imx8qm Add an entry for 'fsl,imx8qm-sc-wdt' as imx8qm also contains the SCU watchdog block. Signed-off-by: Thomas Richard Acked-by: Rob Herring (Arm) Acked-by: Oliver Graute Reviewed-by: Frank Li Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250414-imx8qm-watchdog-v2-1-449265a9da4e@bootlin.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bd3f54ec559b554671e5a683e05794abe3a609df Author: Daniel Lezcano Date: Thu Apr 10 10:26:14 2025 +0200 watchdog: Add the Watchdog Timer for the NXP S32 platform The S32 platform has several Watchdog Timer available and tied with a CPU. The SWT0 is the only one which directly asserts the reset line, other SWT require an external setup to configure the reset behavior which is not part of this change. As a side note, in the NXP documentation, the s32g2 and s32g3 reference manuals refer the watchdog as the 'Software Timer Watchdog' where the name can be misleading as it is actually a hardware watchdog. The maximum watchdog timeout value depends on the clock feeding the SWT counter which is 32bits wide. On the s32g274-rb2, the clock has a rate of 51MHz which result on 83 seconds maximum timeout. The timeout can be specified via the device tree with the usual existing bindings 'timeout-sec' or via the module param timeout. The watchdog can be loaded with the 'nowayout' option, preventing the watchdog to be stopped. The watchdog can be started at boot time with the 'early-enable' option, thus letting the watchdog framework to service the watchdog counter. The watchdog support the magic character to stop when the userspace releases the device. Cc: Ghennadi Procopciuc Cc: Thomas Fossati Signed-off-by: Daniel Lezcano Tested-by: Alexandru-Catalin Ionita Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250410082616.1855860-3-daniel.lezcano@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 45421ffbb4af3d29110c8c2ec92e06f3fec5096f Author: Daniel Lezcano Date: Thu Apr 10 10:26:13 2025 +0200 dt-bindings: watchdog: Add NXP Software Watchdog Timer Describe the Software Watchdog Timer available on the S32G platforms. Cc: Ghennadi Procopciuc Cc: Thomas Fossati Signed-off-by: Daniel Lezcano Reviewed-by: Rob Herring (Arm) Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250410082616.1855860-2-daniel.lezcano@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 60625ff9085247f818eb0eb5f1512377ba511b33 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:35:31 2025 +0200 watchdog: Correct kerneldoc warnings Correct kerneldoc syntax or drop kerneldoc entirely for function comments not being kerneldoc to fix warnings like: pretimeout_noop.c:19: warning: Function parameter or struct member 'wdd' not described in 'pretimeout_noop' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250406203531.61322-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b6f8a417e17f1929bb8e7e6ba9f4677f1f3ce364 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:35:30 2025 +0200 watchdog: stm32: Fix wakeup source leaks on device unbind Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250406203531.61322-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 13b5fb3331436b6ec497763d733d3d749b161b01 Author: Krzysztof Kozlowski Date: Fri Apr 4 14:39:41 2025 +0200 watchdog: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250404123941.362620-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f8cdcc98c9833b8527121922b374148cafb8108d Author: Gustavo A. R. Silva Date: Thu Mar 27 11:12:11 2025 -0600 watchdog: cros-ec: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/watchdog/cros_ec_wdt.c:29:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tzung-Bi Shih Reviewed-by: Kees Cook Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/Z-WG6_uhWsy_FCq3@kspp Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 325f510fcd9cda5a44bcb662b74ba4e3dabaca10 Author: Marcus Folkesson Date: Wed Mar 26 09:29:51 2025 +0100 watchdog: da9052_wdt: respect TWDMIN We have to wait at least the minimium time for the watchdog window (TWDMIN) before writings to the wdt register after the watchdog is activated. Otherwise the chip will assert TWD_ERROR and power down to reset mode. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-4-a38a560fef0e@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8807f0afacc480ea9b8c143e765868907b5c4c47 Author: Marcus Folkesson Date: Wed Mar 26 09:29:50 2025 +0100 watchdog: da9052_wdt: do not disable wdt during probe If the watchog is started by the bootloader, we do not want the watchdog to be disabled. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-3-a38a560fef0e@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ec90349a9433937e2fd83a57e16f40bce1fc1481 Author: Marcus Folkesson Date: Wed Mar 26 09:29:49 2025 +0100 watchdog: da9052_wdt: use timeout value from external inputs Introduce the `timeout` module parameter and pass it to watchdog_init_timeout(). If the parameter is not set or contains an invalid value, fallback on the `timeout-secs` devicetree property value. If none of the above is valid, go for the old default value. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-2-a38a560fef0e@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 776d14d201ae8b266208e0eae6510692bc58d9f2 Author: Marcus Folkesson Date: Wed Mar 26 09:29:48 2025 +0100 watchdog: da9052_wdt: add support for nowayout Add nowayout module parameter for not stopping the watchdog when userspace application quits. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-1-a38a560fef0e@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 628e124404b3db5e10e17228e680a2999018ab33 Author: Leo Yan Date: Mon Mar 31 18:27:59 2025 +0100 perf tests switch-tracking: Fix timestamp comparison The test might fail on the Arm64 platform with the error: # perf test -vvv "Track with sched_switch" Missing sched_switch events # The issue is caused by incorrect handling of timestamp comparisons. The comparison result, a signed 64-bit value, was being directly cast to an int, leading to incorrect sorting for sched events. The case does not fail everytime, usually I can trigger the failure after run 20 ~ 30 times: # while true; do perf test "Track with sched_switch"; done 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : FAILED! 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok 106: Track with sched_switch : FAILED! 106: Track with sched_switch : Ok 106: Track with sched_switch : Ok I used cross compiler to build Perf tool on my host machine and tested on Debian / Juno board. Generally, I think this issue is not very specific to GCC versions. As both internal CI and my local env can reproduce the issue. My Host Build compiler: # aarch64-linux-gnu-gcc --version aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 Juno Board: # lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm Fix this by explicitly returning 0, 1, or -1 based on whether the result is zero, positive, or negative. Fixes: d44bc558297222d9 ("perf tests: Add a test for tracking with sched_switch") Reviewed-by: Ian Rogers Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: James Clark Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250331172759.115604-1-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1b56e7d465cec2ac753f7aec281f7f949446ffcb Merge: 8b819afa494034 ae3392c0f12f17 Author: Greg Kroah-Hartman Date: Sat May 24 08:29:32 2025 +0200 Merge tag 'counter-updates-for-6.16b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Second set of Counter updates for 6.16 Adds compatible for STM32MP25 SoC and enables respective encoder capability for stm32-timer-cnt. Implements watch_validate callback for microchip-tcb-capture. * tag 'counter-updates-for-6.16b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: microchip-tcb-capture: Add watch validation support counter: stm32-timer-cnt: add support for stm32mp25 commit f8bb3ed3197966fb60bedcbdc126d2bd5bc0a77f Author: Dan Carpenter Date: Fri May 23 19:07:58 2025 +0300 drm/nouveau/tegra: Fix error pointer vs NULL return in nvkm_device_tegra_resource_addr() The nvkm_device_tegra_resource() function returns a mix of error pointers and NULL. The callers only expect it to return NULL on error. Change it to only return NULL. Fixes: 76b8f81a5b92 ("drm/nouveau: improve handling of 64-bit BARs") Signed-off-by: Dan Carpenter Reviewed-by: Timur Tabi Signed-off-by: Dave Airlie Link: https://lore.kernel.org/dri-devel/334404bdf60765cb5a8e855a74c688bc537531ee.camel@nvidia.com/T/#t commit 9caea9208fc3fbdbd4a41a2de8c6a0c969b030f9 Author: Kent Overstreet Date: Fri May 23 21:59:12 2025 -0400 bcachefs: Don't mount bs > ps without TRANSPARENT_HUGEPAGE Large folios aren't supported without TRANSPARENT_HUGEPAGE Signed-off-by: Kent Overstreet commit 3f2f028814abf68ce4d74bfd2627cb84d2afa389 Author: Kent Overstreet Date: Fri May 23 20:11:43 2025 -0400 bcachefs: Fix btree_iter_next_node() for new locking asserts We can't unlock a should_be_locked path unless we're in a transaction restart. Signed-off-by: Kent Overstreet commit 521f9584c2bd48198ac9d9b99a372b1306f3bb97 Author: Kent Overstreet Date: Fri May 23 14:03:06 2025 -0400 bcachefs: Ensure we don't use a blacklisted journal seq Different versions differ on the size of the blacklist range; it is theoretically possible that we could end up with blacklisted journal sequence numbers newer than the newest seq we find in the journal, and pick a new start seq that's blacklisted. Explicitly check for this in bch2_fs_journal_start(). Signed-off-by: Kent Overstreet commit 9b133c0d74b17db2dc0d2d70b6591b0ebb604463 Author: Kent Overstreet Date: Fri May 23 14:19:25 2025 -0400 bcachefs: Small check_fix_ptr fixes We don't want to change the bucket gen, on gen mismatch: it's possible to have multiple btree nodes with different gens in the same bucket that we want to keep, if we have to recover from btree node scan. It's also not necessary to set g->gen_valid; add a comment to that effect. Signed-off-by: Kent Overstreet commit cade003209cfe728de2ef880d5704cc322a7ce1f Author: Kent Overstreet Date: Fri May 23 18:31:53 2025 -0400 bcachefs: Fix opts.recovery_pass_last This was lost in the giant recovery pass rework - but it's used heavily by bcachefs subcommand utilities. Signed-off-by: Kent Overstreet commit f351d91edd507391518a4f5870185fa5bf38446b Author: Kent Overstreet Date: Fri May 23 18:30:10 2025 -0400 bcachefs: Fix allocate -> self healing path When we go to allocate and find taht a bucket in the freespace btree is actually allocated, we're supposed to return nonzero to tell the allocator to skip it. This fixes an emergency read only due to a bucket/ptr gen mismatch - we also don't return the correct bucket gen when this happens. Signed-off-by: Kent Overstreet commit 016c4b48b86d18b14f8a45beabefc5ccf7caf594 Author: Kent Overstreet Date: Fri May 23 13:13:44 2025 -0400 bcachefs: Fix endianness in casefold check/repair Fixes: 010c89468134 ("bcachefs: Check for casefolded dirents in non casefolded dirs") Signed-off-by: Kent Overstreet commit 9bba618694cc905b898661c18e3e40955573ef5e Merge: a5806cd506af5a 108a76779829a5 Author: Arnd Bergmann Date: Fri May 23 23:59:45 2025 +0200 Merge tag 'riscv-sophgo-dt-for-v6.16' of https://github.com/sophgo/linux into soc/late RISC-V Devicetrees for v6.16 Sophgo: Add Pinctrl & SPI support for SG2042 SoC, and refactor the dts of cv18xx to facilitate adding support for arm core later (SG200X has two cores, one is RISC-V and another is ARM64). Also add initial support for Sophgo SG2044/SRD3-10. SRD3-10 board bases on Sophgo SG2044 SoC and initial support includes uart only. This part of the changes involves some modifications to dts and bindings. Signed-off-by: Chen Wang * tag 'riscv-sophgo-dt-for-v6.16' of https://github.com/sophgo/linux: riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10 dt-bindings: riscv: sophgo: Add SG2044 compatible string dt-bindings: interrupt-controller: Add Sophgo SG2044 PLIC dt-bindings: interrupt-controller: Add Sophgo SG2044 CLINT mswi riscv: dts: sopgho: use SOC_PERIPHERAL_IRQ to calculate interrupt number riscv: dts: sophgo: rename header file cv18xx.dtsi to cv180x.dtsi riscv: dts: sophgo: Move riscv cpu definition to a separate file riscv: dts: sophgo: Move all soc specific device into soc dtsi file riscv: sophgo: dts: Add spi controller for SG2042 riscv: dts: sophgo: sg2042: add pinctrl support Link: https://lore.kernel.org/r/MA0P287MB22622FA23ECF9B9216735FA0FE9CA@MA0P287MB2262.INDP287.PROD.OUTLOOK.COM Signed-off-by: Arnd Bergmann commit 002619c8736ca2125070ffef74d4617ba2406620 Merge: 73230fffcbbe05 879ede53958f7b Author: Dave Airlie Date: Sat May 24 07:45:40 2025 +1000 Merge tag 'drm-xe-next-fixes-2025-05-23' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - Fix a SLPC debugfs NULL pointer dereference (Aradhya) - Fix an arbitrary value sysfs read return (Aradhya) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aDAxCgfm7HJbrchD@fedora commit 73230fffcbbe0559f2334d284711667eac8d92fd Merge: c4f8ac095fc910 f4c7baa0699b69 Author: Dave Airlie Date: Sat May 24 07:43:11 2025 +1000 Merge tag 'drm-intel-next-fixes-2025-05-22' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Fix for Thunderbolt sink disconnect on MTL/ARL/LNL - Fix for DDI port clock select mask on PTL+ - Add error checks for alloc_ordered_workqueue() and alloc_workqueue() in display Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aC7LQUtxXKgOVTVt@jlahtine-mobl commit 4673dec88da803fa23f1af9e04761683a30dd6aa Author: Dan Carpenter Date: Fri May 23 19:09:03 2025 +0300 drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe() The devm_drm_panel_alloc() function returns error pointers, it doesn't return NULL. Update the check to match. Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver") Signed-off-by: Dan Carpenter Reviewed-by: Krzysztof Kozlowski Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/aDCdn9r_ZAUTRpWn@stanley.mountain Signed-off-by: Dmitry Baryshkov commit 022546cdbf26ec6f42af7e2706702d5703df42f6 Author: Arnd Bergmann Date: Fri May 23 14:11:22 2025 +0200 drm/panel: nt37801: select CONFIG_DRM_DISPLAY_DSC_HELPER The newly added driver uses the DSC helper module, but does not select its Kconfig symbol, so configurations are possible that cause a link failure: ERROR: modpost: "drm_dsc_pps_payload_pack" [drivers/gpu/drm/panel/panel-novatek-nt37801.ko] undefined! Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250523121127.2269693-1-arnd@kernel.org Signed-off-by: Dmitry Baryshkov commit 9f153b7fb5ae45c7d426851f896487927f40e501 Merge: 6eed708a569370 be9b359e056a78 Author: Dave Jiang Date: Fri May 23 13:26:24 2025 -0700 Merge branch 'for-6.16/cxl-features-ras' into cxl-for-next Add CXL RAS Features support. Features include "patrol scrub control", "error check scrub", "perform maintenance", and "memory sparing". This support connects the RAS Featurs to EDAC. commit be9b359e056a78bb6cc2e17cf457338f6aef57f9 Author: Shiju Jose Date: Wed May 21 13:47:46 2025 +0100 cxl/edac: Add CXL memory device soft PPR control feature Post Package Repair (PPR) maintenance operations may be supported by CXL devices that implement CXL.mem protocol. A PPR maintenance operation requests the CXL device to perform a repair operation on its media. For example, a CXL device with DRAM components that support PPR features may implement PPR Maintenance operations. DRAM components may support two types of PPR, hard PPR (hPPR), for a permanent row repair, and Soft PPR (sPPR), for a temporary row repair. Soft PPR is much faster than hPPR, but the repair is lost with a power cycle. During the execution of a PPR Maintenance operation, a CXL memory device: - May or may not retain data - May or may not be able to process CXL.mem requests correctly, including the ones that target the DPA involved in the repair. These CXL Memory Device capabilities are specified by Restriction Flags in the sPPR Feature and hPPR Feature. Soft PPR maintenance operation may be executed at runtime, if data is retained and CXL.mem requests are correctly processed. For CXL devices with DRAM components, hPPR maintenance operation may be executed only at boot because typically data may not be retained with hPPR maintenance operation. When a CXL device identifies error on a memory component, the device may inform the host about the need for a PPR maintenance operation by using an Event Record, where the Maintenance Needed flag is set. The Event Record specifies the DPA that should be repaired. A CXL device may not keep track of the requests that have already been sent and the information on which DPA should be repaired may be lost upon power cycle. The userspace tool requests for maintenance operation if the number of corrected error reported on a CXL.mem media exceeds error threshold. CXL spec 3.2 section 8.2.10.7.1.2 describes the device's sPPR (soft PPR) maintenance operation and section 8.2.10.7.1.3 describes the device's hPPR (hard PPR) maintenance operation feature. CXL spec 3.2 section 8.2.10.7.2.1 describes the sPPR feature discovery and configuration. CXL spec 3.2 section 8.2.10.7.2.2 describes the hPPR feature discovery and configuration. Add support for controlling CXL memory device soft PPR (sPPR) feature. Register with EDAC driver, which gets the memory repair attr descriptors from the EDAC memory repair driver and exposes sysfs repair control attributes for PRR to the userspace. For example CXL PPR control for the CXL mem0 device is exposed in /sys/bus/edac/devices/cxl_mem0/mem_repairX/ Add checks to ensure the memory to be repaired is offline and originates from a CXL DRAM or CXL gen_media error record reported in the current boot, before requesting a PPR operation on the device. Note: Tested with QEMU patch for CXL PPR feature. https://lore.kernel.org/linux-cxl/20250509172229.726-1-shiju.jose@huawei.com/T/#m70b2b010f43f7f4a6f9acee5ec9008498bf292c3 Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-9-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 079e5c56a5c41d285068939ff7b0041ab10386fa Author: Mykyta Yatsenko Date: Fri May 23 19:17:05 2025 +0100 bpf: Fix error return value in bpf_copy_from_user_dynptr On error, copy_from_user returns number of bytes not copied to destination, but current implementation of copy_user_data_sleepable does not handle that correctly and returns it as error value, which may confuse user, expecting meaningful negative error value. Fixes: a498ee7576de ("bpf: Implement dynptr copy kfuncs") Reported-by: Dan Carpenter Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250523181705.261585-1-mykyta.yatsenko5@gmail.com commit 588ca944c27729c7f950d1f44c6d6700a919969a Author: Shiju Jose Date: Wed May 21 13:47:45 2025 +0100 cxl/edac: Add CXL memory device memory sparing control feature Memory sparing is defined as a repair function that replaces a portion of memory with a portion of functional memory at that same DPA. The subclasses for this operation vary in terms of the scope of the sparing being performed. The cacheline sparing subclass refers to a sparing action that can replace a full cacheline. Row sparing is provided as an alternative to PPR sparing functions and its scope is that of a single DDR row. As per CXL r3.2 Table 8-125 foot note 1. Memory sparing is preferred over PPR when possible. Bank sparing allows an entire bank to be replaced. Rank sparing is defined as an operation in which an entire DDR rank is replaced. Memory sparing maintenance operations may be supported by CXL devices that implement CXL.mem protocol. A sparing maintenance operation requests the CXL device to perform a repair operation on its media. For example, a CXL device with DRAM components that support memory sparing features may implement sparing maintenance operations. The host may issue a query command by setting query resources flag in the input payload (CXL spec 3.2 Table 8-120) to determine availability of sparing resources for a given address. In response to a query request, the device shall report the resource availability by producing the memory sparing event record (CXL spec 3.2 Table 8-60) in which the Channel, Rank, Nibble Mask, Bank Group, Bank, Row, Column, Sub-Channel fields are a copy of the values specified in the request. During the execution of a sparing maintenance operation, a CXL memory device: - may not retain data - may not be able to process CXL.mem requests correctly. These CXL memory device capabilities are specified by restriction flags in the memory sparing feature readable attributes. When a CXL device identifies error on a memory component, the device may inform the host about the need for a memory sparing maintenance operation by using DRAM event record, where the 'maintenance needed' flag may set. The event record contains some of the DPA, Channel, Rank, Nibble Mask, Bank Group, Bank, Row, Column, Sub-Channel fields that should be repaired. The userspace tool requests for maintenance operation if the 'maintenance needed' flag set in the CXL DRAM error record. CXL spec 3.2 section 8.2.10.7.1.4 describes the device's memory sparing maintenance operation feature. CXL spec 3.2 section 8.2.10.7.2.3 describes the memory sparing feature discovery and configuration. Add support for controlling CXL memory device memory sparing feature. Register with EDAC driver, which gets the memory repair attr descriptors from the EDAC memory repair driver and exposes sysfs repair control attributes for memory sparing to the userspace. For example CXL memory sparing control for the CXL mem0 device is exposed in /sys/bus/edac/devices/cxl_mem0/mem_repairX/ Use case ======== 1. CXL device identifies a failure in a memory component, report to userspace in a CXL DRAM trace event with DPA and other attributes of memory to repair such as channel, rank, nibble mask, bank Group, bank, row, column, sub-channel. 2. Rasdaemon process the trace event and may issue query request in sysfs check resources available for memory sparing if either of the following conditions met. - 'maintenance needed' flag set in the event record. - 'threshold event' flag set for CVME threshold feature. - When the number of corrected error reported on a CXL.mem media to the userspace exceeds the threshold value for corrected error count defined by the userspace policy. 3. Rasdaemon process the memory sparing trace event and issue repair request for memory sparing. Kernel CXL driver shall report memory sparing event record to the userspace with the resource availability in order rasdaemon to process the event record and issue a repair request in sysfs for the memory sparing operation in the CXL device. Note: Based on the feedbacks from the community 'query' sysfs attribute is removed and reporting memory sparing error record to the userspace are not supported. Instead userspace issues sparing operation and kernel does the same to the CXL memory device, when 'maintenance needed' flag set in the DRAM event record. Add checks to ensure the memory to be repaired is offline and if online, then originates from a CXL DRAM error record reported in the current boot before requesting a memory sparing operation on the device. Note: Tested memory sparing feature control with QEMU patch "hw/cxl: Add emulation for memory sparing control feature" https://lore.kernel.org/linux-cxl/20250509172229.726-1-shiju.jose@huawei.com/T/#m5f38512a95670d75739f9dad3ee91b95c7f5c8d6 Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-8-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 0b5ccb0de1e2cf83f18f012f0e6ba4365be9dd4b Author: Shiju Jose Date: Wed May 21 13:47:44 2025 +0100 cxl/edac: Support for finding memory operation attributes from the current boot Certain operations on memory, such as memory repair, are permitted only when the address and other attributes for the operation are from the current boot. This is determined by checking whether the memory attributes for the operation match those in the CXL gen_media or CXL DRAM memory event records reported during the current boot. The CXL event records must be backed up because they are cleared in the hardware after being processed by the kernel. Support is added for storing CXL gen_media or CXL DRAM memory event records in xarrays. Old records are deleted when they expire or when there is an overflow and which depends on platform correctly report Event Record Timestamp field of CXL spec Table 8-55 Common Event Record Format. Additionally, helper functions are implemented to find a matching record in the xarray storage based on the memory attributes and repair type. Add validity check, when matching attributes for sparing, using the validity flag in the DRAM event record, to ensure that all required attributes for a requested repair operation are valid and set. Reviewed-by: Dave Jiang Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-7-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 077ee5f7ddcfd482ecac504b3f711aa5e4c049fe Author: Shiju Jose Date: Wed May 21 13:47:43 2025 +0100 cxl/edac: Add support for PERFORM_MAINTENANCE command Add support for PERFORM_MAINTENANCE command. CXL spec 3.2 section 8.2.10.7.1 describes the Perform Maintenance command. This command requests the device to execute the maintenance operation specified by the maintenance operation class and the maintenance operation subclass. Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-6-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 85fb6a16ad14eab95e98bbba4f7d361f5cb83746 Author: Shiju Jose Date: Wed May 21 13:47:42 2025 +0100 cxl/edac: Add CXL memory device ECS control feature CXL spec 3.2 section 8.2.10.9.11.2 describes the DDR5 ECS (Error Check Scrub) control feature. The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM Specification (JESD79-5) and allows the DRAM to internally read, correct single-bit errors, and write back corrected data bits to the DRAM array while providing transparency to error counts. The ECS control allows the requester to change the log entry type, the ECS threshold count (provided the request falls within the limits specified in DDR5 mode registers), switch between codeword mode and row count mode, and reset the ECS counter. Register with EDAC device driver, which retrieves the ECS attribute descriptors from the EDAC ECS and exposes the ECS control attributes to userspace via sysfs. For example, the ECS control for the memory media FRU0 in CXL mem0 device is located at /sys/bus/edac/devices/cxl_mem0/ecs_fru0/ Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-5-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 0c6e6f1357cbdc158d555346a728aa4aeb0d7011 Author: Shiju Jose Date: Wed May 21 13:47:41 2025 +0100 cxl/edac: Add CXL memory device patrol scrub control feature CXL spec 3.2 section 8.2.10.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. Allow specifying the number of hours within which the patrol scrub must be completed, subject to minimum and maximum limits reported by the device. Also allow disabling scrub allowing trade-off error rates against performance. Add support for patrol scrub control on CXL memory devices. Register with the EDAC device driver, which retrieves the scrub attribute descriptors from EDAC scrub and exposes the sysfs scrub control attributes to userspace. For example, scrub control for the CXL memory device "cxl_mem0" is exposed in /sys/bus/edac/devices/cxl_mem0/scrubX/. Additionally, add support for region-based CXL memory patrol scrub control. CXL memory regions may be interleaved across one or more CXL memory devices. For example, region-based scrub control for "cxl_region1" is exposed in /sys/bus/edac/devices/cxl_region1/scrubX/. [dj: A few formatting fixes from Jonathan] Reviewed-by: Dave Jiang Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Shiju Jose Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-4-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit f76e0bbc8bc34c55fd5da569b9e1126cf42b09ec Author: Shiju Jose Date: Wed May 21 13:47:40 2025 +0100 cxl: Update prototype of function get_support_feature_info() Add following changes to function get_support_feature_info() 1. Make generic to share between cxl-fwctl and cxl-edac paths. 2. Rename get_support_feature_info() to cxl_feature_info() 3. Change parameter const struct fwctl_rpc_cxl *rpc_in to const uuid_t *uuid. Suggested-by: Dan Williams Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Shiju Jose Reviewed-by: Fan Ni Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-3-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit ee4f03245554d86592a926080091d706395578f7 Author: Shiju Jose Date: Wed May 21 13:47:39 2025 +0100 EDAC: Update documentation for the CXL memory patrol scrub control feature Update the Documentation/edac/scrub.rst to include use cases and policies for CXL memory device-based, CXL region-based patrol scrub control and CXL Error Check Scrub (ECS). Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Shiju Jose Reviewed-by: Fan Ni Reviewed-by: Alison Schofield Acked-by: Dan Williams Link: https://patch.msgid.link/20250521124749.817-2-shiju.jose@huawei.com Signed-off-by: Dave Jiang commit 46bc169f6f07eca9a7d2346c703ea59bff385e22 Author: Johan Hovold Date: Wed Apr 2 15:26:34 2025 +0200 arm64: Kconfig: switch to HAVE_PWRCTRL The HAVE_PWRCTRL symbol has been renamed to reflect the pwrctrl framework name. Switch to the non-deprecated symbol. Signed-off-by: Johan Hovold Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250402132634.18065-5-johan+linaro@kernel.org commit d5fc1909349e1999427c86de31e98c4fa6e0b721 Author: Johan Hovold Date: Wed Apr 2 15:26:33 2025 +0200 wifi: ath12k: switch to PCI_PWRCTRL_PWRSEQ The PCI_PWRCTRL_PWRSEQ and HAVE_PWRCTRL symbols have been renamed to reflect the pwrctrl framework name. Switch to the non-deprecated symbols. Signed-off-by: Johan Hovold Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Jeff Johnson # drivers/net/wireless/ath/... Acked-by: Manivannan Sadhasivam Acked-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250402132634.18065-4-johan+linaro@kernel.org commit 52ddd0265bca80be19438f184cc9ce0bf4cf5a4f Author: Johan Hovold Date: Wed Apr 2 15:26:32 2025 +0200 wifi: ath11k: switch to PCI_PWRCTRL_PWRSEQ The PCI_PWRCTRL_PWRSEQ and HAVE_PWRCTRL symbols have been renamed to reflect the pwrctrl framework name. Switch to the non-deprecated symbols. Signed-off-by: Johan Hovold Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Jeff Johnson # drivers/net/wireless/ath/... Acked-by: Manivannan Sadhasivam Acked-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250402132634.18065-3-johan+linaro@kernel.org commit 13bbf6a5f065f235bba69f6c21272d992ed5d5d0 Author: Johan Hovold Date: Wed Apr 2 15:26:31 2025 +0200 PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module Commits b88cbaaa6fa1 ("PCI/pwrctrl: Rename pwrctl files to pwrctrl") and 3f925cd62874 ("PCI/pwrctrl: Rename pwrctrl functions and structures") renamed the "pwrctl" framework to "pwrctrl" for consistency reasons. Rename also the Kconfig symbols so that they reflect the new name while adding entries for the deprecated ones. The old symbols can be removed once everything that depends on them has been updated. Note that no deprecated symbol is added for the new slot driver to avoid having to add a user visible option. Rename the new slot module to reflect the framework name and match the other pwrctrl modules. Signed-off-by: Johan Hovold Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Manivannan Sadhasivam Acked-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250402132634.18065-2-johan+linaro@kernel.org commit 8b926f237743f020518162c62b93cb7107a2b5eb Author: Brian Norris Date: Wed Apr 9 11:53:13 2025 -0700 PCI/pwrctrl: Cancel outstanding rescan work when unregistering It's possible to trigger use-after-free here by: (a) forcing rescan_work_func() to take a long time and (b) utilizing a pwrctrl driver that may be unloaded for some reason Cancel outstanding work to ensure it is finished before we allow our data structures to be cleaned up. [bhelgaas: tidy commit log] Fixes: 8f62819aaace ("PCI/pwrctl: Rescan bus on a separate thread") Signed-off-by: Brian Norris Signed-off-by: Brian Norris Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Bartosz Golaszewski Cc: Konrad Dybcio Link: https://patch.msgid.link/20250409115313.1.Ia319526ed4ef06bec3180378c9a008340cec9658@changeid commit 534e9cf3782f1bd6adf0bd7d17ff414ea12a6bf2 Merge: aca89f1be6bd31 43a38a0ff8c63e Author: Takashi Iwai Date: Fri May 23 20:45:16 2025 +0200 Merge tag 'asoc-v6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Additional v6.16 updates A couple more updates on top of the last set I sent you, a new driver for the ES8375 and a fix for the Cirrus KUnit tests from Jaroslav. commit 059717c2ba1f745f35f4bbb8991e408c12031f1e Author: Anil S Keshavamurthy Date: Fri May 23 13:20:01 2025 -0400 ACPI: MRRM: Fix default max memory region Per the spec, the default max memory region must be 1 covering all system memory. When platform does not provide ACPI MRRM table or when CONFIG_ACPI is opted out, the acpi_mrrm_max_mem_region() function defaults to returning 1 region complying to RDT spec. Signed-off-by: Anil S Keshavamurthy Reviewed-by: Tony Luck Link: https://patch.msgid.link/20250523172001.1761634-1-anil.s.keshavamurthy@intel.com Signed-off-by: Rafael J. Wysocki commit bfccacdf93f6d80e51f070426d4942e7693f2716 Merge: 8259eb0e06d8f6 3c0421c93ce4ff Author: Andrii Nakryiko Date: Fri May 23 10:06:28 2025 -0700 Merge branch 'allow-mmap-of-sys-kernel-btf-vmlinux' Lorenz Bauer says: ==================== Allow mmap of /sys/kernel/btf/vmlinux I'd like to cut down the memory usage of parsing vmlinux BTF in ebpf-go. With some upcoming changes the library is sitting at 5MiB for a parse. Most of that memory is simply copying the BTF blob into user space. By allowing vmlinux BTF to be mmapped read-only into user space I can cut memory usage by about 75%. Signed-off-by: Lorenz Bauer --- Changes in v5: - Fix error return of btf_parse_raw_mmap (Andrii) - Link to v4: https://lore.kernel.org/r/20250510-vmlinux-mmap-v4-0-69e424b2a672@isovalent.com Changes in v4: - Go back to remap_pfn_range for aarch64 compat - Dropped btf_new_no_copy (Andrii) - Fixed nits in selftests (Andrii) - Clearer error handling in the mmap handler (Andrii) - Fixed build on s390 - Link to v3: https://lore.kernel.org/r/20250505-vmlinux-mmap-v3-0-5d53afa060e8@isovalent.com Changes in v3: - Remove slightly confusing calculation of trailing (Alexei) - Use vm_insert_page (Alexei) - Simplified libbpf code - Link to v2: https://lore.kernel.org/r/20250502-vmlinux-mmap-v2-0-95c271434519@isovalent.com Changes in v2: - Use btf__new in selftest - Avoid vm_iomap_memory in btf_vmlinux_mmap - Add VM_DONTDUMP - Add support to libbpf - Link to v1: https://lore.kernel.org/r/20250501-vmlinux-mmap-v1-0-aa2724572598@isovalent.com --- ==================== Link: https://patch.msgid.link/20250520-vmlinux-mmap-v5-0-e8c941acc414@isovalent.com Signed-off-by: Andrii Nakryiko commit 3c0421c93ce4ff0f5f2612666122c34fc941d569 Author: Lorenz Bauer Date: Tue May 20 14:01:19 2025 +0100 libbpf: Use mmap to parse vmlinux BTF from sysfs Teach libbpf to use mmap when parsing vmlinux BTF from /sys. We don't apply this to fall-back paths on the regular file system because there is no way to ensure that modifications underlying the MAP_PRIVATE mapping are not visible to the process. Signed-off-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Tested-by: Alan Maguire Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-3-e8c941acc414@isovalent.com commit 828226b69ff54d57afd7b3cb56095ef8186ba290 Author: Lorenz Bauer Date: Tue May 20 14:01:18 2025 +0100 selftests: bpf: Add a test for mmapable vmlinux BTF Add a basic test for the ability to mmap /sys/kernel/btf/vmlinux. Ensure that the data is valid BTF and that it is padded with zero. Signed-off-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Tested-by: Alan Maguire Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-2-e8c941acc414@isovalent.com commit a539e2a6d51d1c12d89eec149ccc72ec561639bc Author: Lorenz Bauer Date: Tue May 20 14:01:17 2025 +0100 btf: Allow mmap of vmlinux btf User space needs access to kernel BTF for many modern features of BPF. Right now each process needs to read the BTF blob either in pieces or as a whole. Allow mmaping the sysfs file so that processes can directly access the memory allocated for it in the kernel. remap_pfn_range is used instead of vm_insert_page due to aarch64 compatibility issues. Signed-off-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Tested-by: Alan Maguire Reviewed-by: Shakeel Butt Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-1-e8c941acc414@isovalent.com commit 96959283a58d91ae20d025546f00e16f0a555208 Author: Michael Kelley Date: Mon May 19 21:01:43 2025 -0700 Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests The Hyper-V host provides guest VMs with a range of MMIO addresses that guest VMBus drivers can use. The VMBus driver in Linux manages that MMIO space, and allocates portions to drivers upon request. As part of managing that MMIO space in a Generation 2 VM, the VMBus driver must reserve the portion of the MMIO space that Hyper-V has designated for the synthetic frame buffer, and not allocate this space to VMBus drivers other than graphics framebuffer drivers. The synthetic frame buffer MMIO area is described by the screen_info data structure that is passed to the Linux kernel at boot time, so the VMBus driver must access screen_info for Generation 2 VMs. (In Generation 1 VMs, the framebuffer MMIO space is communicated to the guest via a PCI pseudo-device, and access to screen_info is not needed.) In commit a07b50d80ab6 ("hyperv: avoid dependency on screen_info") the VMBus driver's access to screen_info is restricted to when CONFIG_SYSFB is enabled. CONFIG_SYSFB is typically enabled in kernels built for Hyper-V by virtue of having at least one of CONFIG_FB_EFI, CONFIG_FB_VESA, or CONFIG_SYSFB_SIMPLEFB enabled, so the restriction doesn't usually affect anything. But it's valid to have none of these enabled, in which case CONFIG_SYSFB is not enabled, and the VMBus driver is unable to properly reserve the framebuffer MMIO space for graphics framebuffer drivers. The framebuffer MMIO space may be assigned to some other VMBus driver, with undefined results. As an example, if a VM is using a PCI pass-thru NVMe controller to host the OS disk, the PCI NVMe controller is probed before any graphics devices, and the NVMe controller is assigned a portion of the framebuffer MMIO space. Hyper-V reports an error to Linux during the probe, and the OS disk fails to get setup. Then Linux fails to boot in the VM. Fix this by having CONFIG_HYPERV always select SYSFB. Then the VMBus driver in a Gen 2 VM can always reserve the MMIO space for the graphics framebuffer driver, and prevent the undefined behavior. But don't select SYSFB when building for HYPERV_VTL_MODE as VTLs other than VTL 0 don't have a framebuffer and aren't subject to the issue. Adding SYSFB in such cases is harmless, but would increase the image size for no purpose. Fixes: a07b50d80ab6 ("hyperv: avoid dependency on screen_info") Signed-off-by: Michael Kelley Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/stable/20250520040143.6964-1-mhklinux%40outlook.com Link: https://lore.kernel.org/r/20250520040143.6964-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250520040143.6964-1-mhklinux@outlook.com> commit e89f91222ab3aef84af316567ebc815a10313f3a Author: Michael Kelley Date: Wed May 14 15:55:08 2025 -0700 Drivers: hv: vmbus: Add comments about races with "channels" sysfs dir The VMBus driver code has some inherent races in the creation of the "channels" sysfs subdirectory and its per-channel numbered subdirectories. These races have not generally been recognized or understood. Add some comments to call them out. No code changes. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20250514225508.52629-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250514225508.52629-1-mhklinux@outlook.com> commit f77276d1c9597ade06f3facbceb51bd1abf1bd5c Author: Michael Kelley Date: Mon May 19 21:44:35 2025 -0700 Documentation: hyperv: Update VMBus doc with new features and info Starting in the 6.15 kernel, VMBus interrupts are automatically assigned away from a CPU that is being taken offline. Add documentation describing this case. Also add details of Hyper-V behavior when the primary channel of a VMBus device is closed as the result of unbinding the device's driver. This behavior has not changed, but it was not previously documented. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20250520044435.7734-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250520044435.7734-1-mhklinux@outlook.com> commit dd1af0c4c56d7c60eaf7f30f9d816ed1befbd7d7 Author: Michael Kelley Date: Tue May 13 21:44:40 2025 -0700 PCI: hv: Remove unnecessary flex array in struct pci_packet struct pci_packet contains a "message" field that is a flex array of struct pci_message. struct pci_packet is usually followed by a second struct in a containing struct that is defined locally in individual functions in pci-hyperv.c. As such, the compiler flag -Wflex-array-member-not-at-end (introduced in gcc-14) generates multiple warnings such as: drivers/pci/controller/pci-hyperv.c:3809:35: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] The Linux kernel intends to introduce this compiler flag in standard builds, so the current code is problematic in generating these warnings. The "message" field is used only to locate the start of the second struct, and not as an array. Because the second struct can be addressed directly, the "message" field is not really necessary. Rather than try to fix its usage to meet the requirements of -Wflex-array-member-not-at-end, just eliminate the field and either directly reference the second struct, or use "pkt + 1" when "pkt" is dynamically allocated. Reported-by: Gustavo A. R. Silva Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20250514044440.48924-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250514044440.48924-1-mhklinux@outlook.com> commit cd1769e1fef9ab8fbdfafb67b2c327418867afb6 Author: Long Li Date: Mon May 5 17:56:37 2025 -0700 Drivers: hv: Remove hv_alloc/free_* helpers There are no users for those functions, remove them. Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1746492997-4599-6-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu Message-ID: <1746492997-4599-6-git-send-email-longli@linuxonhyperv.com> commit a60822bc11b12e6c43cf25a610174ac44f744b27 Author: Long Li Date: Mon May 5 17:56:36 2025 -0700 Drivers: hv: Use kzalloc for panic page allocation To prepare for removal of hv_alloc_* and hv_free* functions, use kzalloc/kfree directly for panic reporting page. Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1746492997-4599-5-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu Message-ID: <1746492997-4599-5-git-send-email-longli@linuxonhyperv.com> commit 0315fef2aff9f251ddef8a4b53db9187429c3553 Author: Long Li Date: Mon May 5 17:56:35 2025 -0700 uio_hv_generic: Align ring size to system page Following the ring header, the ring data should align to system page boundary. Adjust the size if necessary. Cc: stable@vger.kernel.org Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus") Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1746492997-4599-4-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu Message-ID: <1746492997-4599-4-git-send-email-longli@linuxonhyperv.com> commit c951ab8fd3589cf6991ed4111d2130816f2e3ac2 Author: Long Li Date: Mon May 5 17:56:34 2025 -0700 uio_hv_generic: Use correct size for interrupt and monitor pages Interrupt and monitor pages should be in Hyper-V page size (4k bytes). This can be different from the system page size. This size is read and used by the user-mode program to determine the mapped data region. An example of such user-mode program is the VMBus driver in DPDK. Cc: stable@vger.kernel.org Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus") Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1746492997-4599-3-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu Message-ID: <1746492997-4599-3-git-send-email-longli@linuxonhyperv.com> commit 09eea7ad0b8e973dcf5ed49902838e5d68177f8e Author: Long Li Date: Mon May 5 17:56:33 2025 -0700 Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary There are use cases that interrupt and monitor pages are mapped to user-mode through UIO, so they need to be system page aligned. Some Hyper-V allocation APIs introduced earlier broke those requirements. Fix this by using page allocation functions directly for interrupt and monitor pages. Cc: stable@vger.kernel.org Fixes: ca48739e59df ("Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code") Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1746492997-4599-2-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu Message-ID: <1746492997-4599-2-git-send-email-longli@linuxonhyperv.com> commit 43cb39ad260a168abf6da3a48f394afff92d436b Author: Roman Kisel Date: Wed May 7 11:22:26 2025 -0700 arch/x86: Provide the CPU number in the wakeup AP callback When starting APs, confidential guests and paravisor guests need to know the CPU number, and the pattern of using the linear search has emerged in several places. With N processors that leads to the O(N^2) time complexity. Provide the CPU number in the AP wake up callback so that one can get the CPU number in constant time. Suggested-by: Michael Kelley Signed-off-by: Roman Kisel Reviewed-by: Tom Lendacky Reviewed-by: Thomas Gleixner Reviewed-by: Michael Kelley Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250507182227.7421-3-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250507182227.7421-3-romank@linux.microsoft.com> commit 86c48271e0d60c82665e9fd61277002391efcef7 Author: Roman Kisel Date: Wed May 7 11:22:25 2025 -0700 x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap() To start an application processor in SNP-isolated guest, a hypercall is used that takes a virtual processor index. The hv_snp_boot_ap() function uses that START_VP hypercall but passes as VP index to it what it receives as a wakeup_secondary_cpu_64 callback: the APIC ID. As those two aren't generally interchangeable, that may lead to hung APs if the VP index and the APIC ID don't match up. Update the parameter names to avoid confusion as to what the parameter is. Use the APIC ID to the VP index conversion to provide the correct input to the hypercall. Cc: stable@vger.kernel.org Fixes: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest") Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250507182227.7421-2-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250507182227.7421-2-romank@linux.microsoft.com> commit d684f9b28809b783e8473727fdf14595b36d8fd3 Author: Roman Kisel Date: Mon Apr 28 14:07:42 2025 -0700 PCI: hv: Get vPCI MSI IRQ domain from DeviceTree The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on arm64. It won't be able to do that in the VTL mode where only DeviceTree can be used. Update the hyperv-pci driver to get vPCI MSI IRQ domain in the DeviceTree case, too. Signed-off-by: Roman Kisel Acked-by: Bjorn Helgaas Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-12-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-12-romank@linux.microsoft.com> commit ab7e531a8212394608838c31e9dfac69fafa6c8a Author: Roman Kisel Date: Mon Apr 28 14:07:41 2025 -0700 ACPI: irq: Introduce acpi_get_gsi_dispatcher() Using acpi_irq_create_hierarchy() in the cases where the code also handles OF leads to code duplication as the ACPI subsystem doesn't provide means to compute the IRQ domain parent whereas the OF does. Introduce acpi_get_gsi_dispatcher() so that the drivers relying on both ACPI and OF may use irq_domain_create_hierarchy() in the common code paths. No functional changes. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250428210742.435282-11-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-11-romank@linux.microsoft.com> commit 18a34bb5221e2b79dbcba5bb50d92beb45b68e15 Author: Roman Kisel Date: Mon Apr 28 14:07:40 2025 -0700 Drivers: hv: vmbus: Introduce hv_get_vmbus_root_device() The ARM64 PCI code for hyperv needs to know the VMBus root device, and it is private. Provide a function that returns it. Rename it from "hv_dev" as "hv_dev" as a symbol is very overloaded. No functional changes. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-10-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-10-romank@linux.microsoft.com> commit 1dc5df133b98eca75d079e4485ade6b601cadf59 Author: Roman Kisel Date: Mon Apr 28 14:07:39 2025 -0700 Drivers: hv: vmbus: Get the IRQ number from DeviceTree The VMBus driver uses ACPI for interrupt assignment on arm64 hence it won't function in the VTL mode where only DeviceTree can be used. Update the VMBus driver to discover interrupt configuration from DT. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-9-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-9-romank@linux.microsoft.com> commit 23aa0c355921a39111f1646ef6592da20af9394c Author: Roman Kisel Date: Mon Apr 28 14:07:38 2025 -0700 dt-bindings: microsoft,vmbus: Add interrupt and DMA coherence properties To boot in the VTL mode, VMBus on arm64 needs interrupt description which the binding documentation lacks. The transactions on the bus are DMA coherent which is not mentioned as well. Add the interrupt property and the DMA coherence property to the VMBus binding. Update the example to match that. Fix typos. Signed-off-by: Roman Kisel Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250428210742.435282-8-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-8-romank@linux.microsoft.com> commit e956ee9491d90c4107ca6e7c4f2210d806c89f9b Author: Roman Kisel Date: Mon Apr 28 14:07:37 2025 -0700 arm64, x86: hyperv: Report the VTL the system boots in The hyperv guest code might run in various Virtual Trust Levels. Report the level when the kernel boots in the non-default (0) one. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-7-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-7-romank@linux.microsoft.com> commit 1f5538a8e2fd3602cd507897c16ee647360a0423 Author: Roman Kisel Date: Mon Apr 28 14:07:36 2025 -0700 arm64: hyperv: Initialize the Virtual Trust Level field Various parts of the hyperv code need to know what VTL the kernel runs at, most notably VMBus needs that to establish communication with the host. Initialize the Virtual Trust Level field to enable booting in the Virtual Trust Level. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-6-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-6-romank@linux.microsoft.com> commit e7e6902fbd19b25630cf6a258c44cb385f16b1c8 Author: Roman Kisel Date: Mon Apr 28 14:07:35 2025 -0700 Drivers: hv: Provide arch-neutral implementation of get_vtl() To run in the VTL mode, Hyper-V drivers have to know what VTL the system boots in, and the arm64/hyperv code does not have the means to compute that. Refactor the code to hoist the function that detects VTL, make it arch-neutral to be able to employ it to get the VTL on arm64. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/20250428210742.435282-5-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-5-romank@linux.microsoft.com> commit f41ceff1748612b9e1538becc13dc2f1617d9d14 Author: Roman Kisel Date: Mon Apr 28 14:07:34 2025 -0700 Drivers: hv: Enable VTL mode for arm64 Kconfig dependencies for arm64 guests on Hyper-V require that be ACPI enabled, and limit VTL mode to x86/x64. To enable VTL mode on arm64 as well, update the dependencies. Since VTL mode requires DeviceTree instead of ACPI, don’t require arm64 guests on Hyper-V to have ACPI unconditionally. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-4-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-4-romank@linux.microsoft.com> commit 36ebd328a57ac6138470ecaea2f9ec0864e3db0f Author: Roman Kisel Date: Mon Apr 28 14:07:33 2025 -0700 arm64: hyperv: Use SMCCC to detect hypervisor presence The arm64 Hyper-V startup path relies on ACPI to detect running under a Hyper-V compatible hypervisor. That doesn't work on non-ACPI systems. Hoist the ACPI detection logic into a separate function. Then use the vendor-specific hypervisor service call (implemented recently in Hyper-V) via SMCCC in the non-ACPI case. Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-3-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-3-romank@linux.microsoft.com> commit 13423063c7cb7d1c34104a78cae85eb0281bae90 Author: Roman Kisel Date: Mon Apr 28 14:07:32 2025 -0700 arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID The KVM/arm64 uses SMCCC to detect hypervisor presence. That code is private, and it follows the SMCCC specification. Other existing and emerging hypervisor guest implementations can and should use that standard approach as well. Factor out a common infrastructure that the guests can use, update KVM to employ the new API. The central notion of the SMCCC method is the UUID of the hypervisor, and the new API follows that. No functional changes. Validated with a KVM/arm64 guest. Signed-off-by: Roman Kisel Acked-by: Arnd Bergmann Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20250428210742.435282-2-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250428210742.435282-2-romank@linux.microsoft.com> commit a9c0b33ef2306327dd2db02c6274107065ff9307 Author: Shradha Gupta Date: Tue Apr 15 04:19:38 2025 -0700 tools: hv: Enable debug logs for hv_kvp_daemon Allow the KVP daemon to log the KVP updates triggered in the VM with a new debug flag(-d). When the daemon is started with this flag, it logs updates and debug information in syslog with loglevel LOG_DEBUG. This information comes in handy for debugging issues where the key-value pairs for certain pools show mismatch/incorrect values. The distro-vendors can further consume these changes and modify the respective service files to redirect the logs to specific files as needed. Signed-off-by: Shradha Gupta Reviewed-by: Naman Jain Reviewed-by: Dexuan Cui Link: https://lore.kernel.org/r/1744715978-8185-1-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1744715978-8185-1-git-send-email-shradhagupta@linux.microsoft.com> commit b4fe7398def6df344442b884d2288f80205cbd2d Author: Jon Pan-Doh Date: Thu May 22 18:21:26 2025 -0500 PCI/AER: Add sysfs attributes for log ratelimits Allow userspace to read/write log ratelimits per device (including enable/disable). Create aer/ sysfs directory to store them and any future AER configs. The new sysfs files are: /sys/bus/pci/devices/*/aer/correctable_ratelimit_burst /sys/bus/pci/devices/*/aer/correctable_ratelimit_interval_ms /sys/bus/pci/devices/*/aer/nonfatal_ratelimit_burst /sys/bus/pci/devices/*/aer/nonfatal_ratelimit_interval_ms The default values are ratelimit_burst=10, ratelimit_interval_ms=5000, so if we try to emit more than 10 messages in a 5 second period, some are suppressed. Update AER sysfs ABI filename to reflect the broader scope of AER sysfs attributes (e.g. stats and ratelimits). Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats -> sysfs-bus-pci-devices-aer Tested using aer-inject[1]. Configured correctable log ratelimit to 5. Sent 6 AER errors. Observed 5 errors logged while AER stats (cat /sys/bus/pci/devices//aer_dev_correctable) shows 6. Disabled ratelimiting and sent 6 more AER errors. Observed all 6 errors logged and accounted in AER stats (12 total errors). [1] https://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git [bhelgaas: note fatal errors are not ratelimited, "aer_report" -> "aer_info", replace ratelimit_log_enable toggle with *_ratelimit_interval_ms] Signed-off-by: Karolina Stolarek Signed-off-by: Jon Pan-Doh Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-21-helgaas@kernel.org commit 24816cc298ee9cc01003b10b888427faada4403d Author: Jon Pan-Doh Date: Thu May 22 18:21:25 2025 -0500 PCI/AER: Add ratelimits to PCI AER Documentation Add ratelimits section for rationale and defaults. [bhelgaas: note fatal errors are not ratelimited] Signed-off-by: Karolina Stolarek Signed-off-by: Jon Pan-Doh Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Paul E. McKenney Link: https://patch.msgid.link/20250522232339.1525671-20-helgaas@kernel.org commit a57f2bfb4a5863f83087867c0e671f2418212d23 Author: Jon Pan-Doh Date: Thu May 22 18:21:24 2025 -0500 PCI/AER: Ratelimit correctable and non-fatal error logging Spammy devices can flood kernel logs with AER errors and slow/stall execution. Add per-device ratelimits for AER correctable and non-fatal uncorrectable errors that use the kernel defaults (10 per 5s). Logging of fatal errors is not ratelimited. There are two AER logging entry points: - aer_print_error() is used by DPC and native AER - pci_print_aer() is used by GHES and CXL The native AER aer_print_error() case includes a loop that may log details from multiple devices, which are ratelimited individually. If we log details for any device, we also log the Error Source ID from the Root Port or RCEC. If no such device details are found, we still log the Error Source from the ERR_* Message, ratelimited by the Root Port or RCEC that received it. The DPC aer_print_error() case is not ratelimited, since this only happens for fatal errors. The CXL pci_print_aer() case is ratelimited by the Error Source device. The GHES pci_print_aer() case is via aer_recover_work_func(), which searches for the Error Source device. If the device is not found, there's no per-device ratelimit, so we use a system-wide ratelimit that covers all error types (correctable, non-fatal, and fatal). Sargun at Meta reported internally that a flood of AER errors causes RCU CPU stall warnings and CSD-lock warnings. Tested using aer-inject[1]. Sent 11 AER errors. Observed 10 errors logged while AER stats (cat /sys/bus/pci/devices//aer_dev_correctable) show true count of 11. [1] https://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git [bhelgaas: commit log, factor out trace_aer_event() and aer_print_rp_info() changes to previous patches, enable Error Source logging if any downstream detail will be printed, don't ratelimit fatal errors, "aer_report" -> "aer_info", "cor_log_ratelimit" -> "correctable_ratelimit", "uncor_log_ratelimit" -> "nonfatal_ratelimit"] Reported-by: Sargun Dhillon Signed-off-by: Jon Pan-Doh Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-19-helgaas@kernel.org commit d72bae423004aa7b4d94c34a7fd0b48b64305a08 Author: Bjorn Helgaas Date: Thu May 22 18:21:23 2025 -0500 PCI/AER: Simplify add_error_device() Return -ENOSPC error early so the usual path through add_error_device() is the straightline code. Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-18-helgaas@kernel.org commit 94bc15c3484aa1dbbd01aee8f9eaa5dc347a01a8 Author: Bjorn Helgaas Date: Thu May 22 18:21:22 2025 -0500 PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index Previously aer_get_device_error_info() and aer_print_error() took a pointer to struct aer_err_info and a pointer to a pci_dev. Typically the pci_dev was one of the elements of the aer_err_info.dev[] array (DPC was an exception, where the dev[] array was unused). Convert aer_get_device_error_info() and aer_print_error() to take an index into the aer_err_info.dev[] array instead. A future patch will add per-device ratelimit information, so the index makes it convenient to find the ratelimit associated with the device. To accommodate DPC, set info->dev[0] to the DPC port before using these interfaces. Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-17-helgaas@kernel.org commit ecc1ca9185c377822c66cbf61ecfed914455d884 Author: Stuart Yoder Date: Wed Apr 30 10:47:23 2025 -0500 tpm_crb: ffa_tpm: fix/update comments describing the CRB over FFA ABI -Fix the comment describing the 'start' function, which was a cut/paste mistake for a different function. -The comment for DIRECT_REQ and DIRECT_RESP only mentioned AArch32 and listed 32-bit function IDs. Update to include 64-bit. Signed-off-by: Stuart Yoder Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8d67b79bcc96f85cbd8c16a64e6e8899d5be522c Author: Yeoreum Yun Date: Tue Apr 15 19:50:13 2025 +0100 tpm_crb_ffa: use dev_xx() macro to print log Instead of pr_xxx() macro, use dev_xxx() to print log. This patch changes some error log level to warn log level when the tpm_crb_ffa secure partition doesn't support properly but system can run without it. (i.e) unsupport of direct message ABI or unsupported ABI version Signed-off-by: Yeoreum Yun Reviewed-by: Stefano Garzarella Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit a85b55ee64a5da58c6e2c69e2648023189210eae Author: Yeoreum Yun Date: Tue Apr 15 19:50:12 2025 +0100 tpm_ffa_crb: access tpm service over FF-A direct message request v2 For secure partition with multi service, tpm_ffa_crb can access tpm service with direct message request v2 interface according to chapter 3.3, TPM Service Command Response Buffer Interface Over FF-A specificationi v1.0 BET. This patch reflects this spec to access tpm service over FF-A direct message request v2 ABI. Acked-by: Sudeep Holla Signed-off-by: Yeoreum Yun Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8dc9c078ab1870dff8613a5688de589c4175b679 Author: Colin Ian King Date: Wed Apr 30 09:34:35 2025 +0100 tpm: remove kmalloc failure error message The kmalloc failure message is just noise. Remove it and replace -EFAULT with -ENOMEM as standard for out of memory allocation error returns. Link: https://lore.kernel.org/linux-integrity/20250430083435.860146-1-colin.i.king@gmail.com/ Signed-off-by: Colin Ian King Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 09683a6184ad6fd635831402316651392b56cc3a Author: Karolina Stolarek Date: Thu May 22 18:21:21 2025 -0500 PCI/AER: Rename struct aer_stats to aer_info Update name to reflect the broader definition of structs/variables that are stored (e.g. ratelimits). This is a preparatory patch for adding rate limit support. [bhelgaas: "aer_report" -> "aer_info"] Signed-off-by: Karolina Stolarek Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-16-helgaas@kernel.org commit 36c5932074aaedebf905374dba2399a529215aa1 Author: Karolina Stolarek Date: Thu May 22 18:21:20 2025 -0500 PCI/AER: Reduce pci_print_aer() correctable error level to KERN_WARNING Some existing logs in pci_print_aer() log with error severity by default. Convert them to use KERN_WARNING for correctable errors and KERN_ERR for uncorrectable errors. [bhelgaas: commit log] Signed-off-by: Karolina Stolarek Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-15-helgaas@kernel.org commit 82013ff394ea58fced098a1fdc001b46cc3dd5ee Author: Bjorn Helgaas Date: Thu May 22 18:21:19 2025 -0500 PCI/ERR: Add printk level to pcie_print_tlp_log() aer_print_error() produces output at a printk level (KERN_ERR/KERN_WARNING/ etc) that depends on the kind of error, and it calls pcie_print_tlp_log(), which previously always produced output at KERN_ERR. Add a "level" parameter so aer_print_error() can control the level of the pcie_print_tlp_log() output to match. Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-14-helgaas@kernel.org commit c8f6791e33a7757025285db26f3b382cdcb7f7cd Author: Karolina Stolarek Date: Thu May 22 18:21:18 2025 -0500 PCI/AER: Check log level once and remember it When reporting an AER error, we check its type multiple times to determine the log level for each message. Do this check only in the top-level functions (aer_isr_one_error(), pci_print_aer()) and save the level in struct aer_err_info. [bhelgaas: save log level in struct aer_err_info instead of passing it as a parameter] Signed-off-by: Karolina Stolarek Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-13-helgaas@kernel.org commit 6bb4befbd65fa7f99688fb707e376637e5acfe36 Author: Bjorn Helgaas Date: Thu May 22 18:21:17 2025 -0500 PCI/AER: Trace error event before ratelimiting As with the AER statistics, we always want to emit trace events, even if the actual dmesg logging is rate limited. Call trace_aer_event() immediately after pci_dev_aer_stats_incr() so both happen before ratelimiting. Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-12-helgaas@kernel.org commit 88a7765e62b9e4c79c7ca2c7b749ae04f54a5668 Author: Bjorn Helgaas Date: Thu May 22 18:21:16 2025 -0500 PCI/AER: Update statistics before ratelimiting There are two AER logging entry points: - aer_print_error() is used by DPC (dpc_process_error()) and native AER handling (aer_process_err_devices()). - pci_print_aer() is used by GHES (aer_recover_work_func()) and CXL (cxl_handle_rdport_errors()) Both use __aer_print_error() to print the AER error bits. Previously __aer_print_error() also incremented the AER statistics via pci_dev_aer_stats_incr(). Call pci_dev_aer_stats_incr() early in the entry points instead of in __aer_print_error() so we update the statistics even if the actual printing of error bits is rate limited by a future change. Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-11-helgaas@kernel.org commit ad9839137cf9fb0f0c2d531bd04bc4382e6f2de9 Author: Bjorn Helgaas Date: Thu May 22 18:21:15 2025 -0500 PCI/AER: Simplify pci_print_aer() Simplify pci_print_aer() by initializing the struct aer_err_info "info" with a designated initializer list (it was previously initialized with memset()) and using pci_name(). Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-10-helgaas@kernel.org commit 57964ba39057a76f3485437347bb4219be9c5b52 Author: Bjorn Helgaas Date: Thu May 22 18:21:14 2025 -0500 PCI/AER: Initialize aer_err_info before using it Previously the struct aer_err_info "e_info" was allocated on the stack without being initialized, so it contained junk except for the fields we explicitly set later. Initialize "e_info" at declaration with a designated initializer list, which initializes the other members to zero. Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-9-helgaas@kernel.org commit ca2426a570ab4bdf6185aea034ee09184420bd0d Author: Bjorn Helgaas Date: Thu May 22 18:21:13 2025 -0500 PCI/AER: Move aer_print_source() earlier in file Move aer_print_source() earlier in the file so a future change can use it from aer_print_error(), where it's easier to rate limit it. Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-8-helgaas@kernel.org commit 99c3fd0de8eb4e35459aaac5c1aa315a1a6843a6 Author: Jon Pan-Doh Date: Thu May 22 18:21:12 2025 -0500 PCI/AER: Rename aer_print_port_info() to aer_print_source() Rename aer_print_port_info() to aer_print_source() to be more descriptive. This logs the Error Source ID logged by a Root Port or Root Complex Event Collector when it receives an ERR_COR, ERR_NONFATAL, or ERR_FATAL Message. [bhelgaas: aer_print_rp_info() -> aer_print_source()] Signed-off-by: Jon Pan-Doh Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-7-helgaas@kernel.org commit f40bd2865501437bf5dfc7167be7b5c8f536b323 Author: Bjorn Helgaas Date: Thu May 22 18:21:11 2025 -0500 PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc Use PCI_BUS_NUM(), PCI_SLOT(), PCI_FUNC() to extract the bus number, device, and function number directly from the Error Source ID. There's no need to shift and mask it explicitly. Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-6-helgaas@kernel.org commit 6a1eda745967a1e84f6e4cae14c118c97319891e Author: Bjorn Helgaas Date: Thu May 22 18:21:10 2025 -0500 PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type() Previously we decoded the AER Error Source ID in aer_isr_one_error_type(), then again in find_source_device() if we didn't find any devices with errors logged in their AER Capabilities. Consolidate this so we only decode and log the Error Source ID once in aer_isr_one_error_type(). Add a "found" parameter so we can add a note when we didn't find any downstream devices with errors logged in their AER Capability. This changes the dmesg logging when we found no devices with errors logged: - pci 0000:00:01.0: AER: Correctable error message received from 0000:02:00.0 - pci 0000:00:01.0: AER: found no error details for 0000:02:00.0 + pci 0000:00:01.0: AER: Correctable error message received from 0000:02:00.0 (no details found) Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/20250522232339.1525671-5-helgaas@kernel.org commit 6fc4dae74afcf29ef82afbaaa9b082893871eda4 Author: Bjorn Helgaas Date: Thu May 22 18:21:09 2025 -0500 PCI/AER: Factor COR/UNCOR error handling out from aer_isr_one_error() aer_isr_one_error() duplicates the Error Source ID logging and AER error processing for Correctable Errors and Uncorrectable Errors. Factor out the duplicated code to aer_isr_one_error_type(). aer_isr_one_error() doesn't need the struct aer_rpc pointer, so pass it the Root Port or RCEC pci_dev pointer instead. Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/20250522232339.1525671-4-helgaas@kernel.org commit a0b62cc310239c7f1323fb20bd3789f21bdd8615 Author: Bjorn Helgaas Date: Thu May 22 18:21:08 2025 -0500 PCI/DPC: Log Error Source ID only when valid DPC Error Source ID is only valid when the DPC Trigger Reason indicates that DPC was triggered due to reception of an ERR_NONFATAL or ERR_FATAL Message (PCIe r6.0, sec 7.9.14.5). When DPC was triggered by ERR_NONFATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE) or ERR_FATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE) from a downstream device, log the Error Source ID (decoded into domain/bus/device/function). Don't print the source otherwise, since it's not valid. For DPC trigger due to reception of ERR_NONFATAL or ERR_FATAL, the dmesg logging changes: - pci 0000:00:01.0: DPC: containment event, status:0x000d source:0x0200 - pci 0000:00:01.0: DPC: ERR_FATAL detected + pci 0000:00:01.0: DPC: containment event, status:0x000d, ERR_FATAL received from 0000:02:00.0 and when DPC triggered for other reasons, where DPC Error Source ID is undefined, e.g., unmasked uncorrectable error: - pci 0000:00:01.0: DPC: containment event, status:0x0009 source:0x0200 - pci 0000:00:01.0: DPC: unmasked uncorrectable error detected + pci 0000:00:01.0: DPC: containment event, status:0x0009: unmasked uncorrectable error detected Previously the "containment event" message was at KERN_INFO and the "%s detected" message was at KERN_WARNING. Now the single message is at KERN_WARNING. Fixes: 26e515713342 ("PCI: Add Downstream Port Containment driver") Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/20250522232339.1525671-3-helgaas@kernel.org commit a424b598e6a6c1e69a2bb801d6fd16e805ab2c38 Author: Bjorn Helgaas Date: Thu May 22 18:21:07 2025 -0500 PCI/DPC: Initialize aer_err_info before using it Previously the struct aer_err_info "info" was allocated on the stack without being initialized, so it contained junk except for the fields we explicitly set later. Initialize "info" at declaration so it starts as all zeros. Fixes: 8aefa9b0d910 ("PCI/DPC: Print AER status in DPC event handling") Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-2-helgaas@kernel.org commit 43a38a0ff8c63ee156d997cd13063c63cd55d812 Merge: fe6446215bfad1 de2b3119f9f7e2 Author: Mark Brown Date: Fri May 23 16:52:28 2025 +0100 ASoC: codecs: add support for ES8375 Merge series from Zhang Yi : The driver is for codec ES8375 of everest-semi. commit b00d6864a4c948529dc6ddd2df76bf175bf27c63 Merge: 72b17676d36830 76ebfa371f0ff8 Author: Mark Brown Date: Fri May 23 16:51:35 2025 +0100 spi: spi-qpic-snand: extend bitmasks usage Merge series from Gabor Juhos : The two patches in the series are extending the usage of FIELD_PREP() macro and predefined bitmasks usage in the driver. commit 72b17676d3683040a0add8988ec051a2a5adafd7 Author: Gabor Juhos Date: Thu May 15 22:13:29 2025 +0200 spi: spi-qpic-snand: return early on error from qcom_spi_io_op() When submitting of the descriptors fails, it is quite likely that the register read buffer contains no valid data. Even if the data is valid the function returns with an error code anyway. Change the code to return early if qcom_submit_descs() fails to avoid superfluously copying possibly invalid data. Also change the return statement at the end of the function to use zero value to indicate success obviusly. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250515-qpic-snand-early-error-v1-1-681c87611213@gmail.com Signed-off-by: Mark Brown commit 533c87e2ed742454957f14d7bef9f48d5a72e72d Author: Ming Lei Date: Fri May 23 00:35:21 2025 +0800 selftests: ublk: add test for UBLK_F_QUIESCE Add test generic_11 for covering new control command of UBLK_U_CMD_QUIESCE_DEV. Add 'quiesce -n dev_id' sub-command on ublk utility for transitioning device state to quiesce states, then verify the feature via generic_10 by doing quiesce and recovery. Cc: Yoav Cohen Link: https://lore.kernel.org/linux-block/DM4PR12MB632807AB7CDCE77D1E5AB7D0A9B92@DM4PR12MB6328.namprd12.prod.outlook.com/ Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250522163523.406289-4-ming.lei@redhat.com Signed-off-by: Jens Axboe commit b465ae7b2524170cb14fa25dbcb84923bfb1a0a9 Author: Ming Lei Date: Fri May 23 00:35:20 2025 +0800 ublk: add feature UBLK_F_QUIESCE Add feature UBLK_F_QUIESCE, which adds control command `UBLK_U_CMD_QUIESCE_DEV` for quiescing device, then device state can become `UBLK_S_DEV_QUIESCED` or `UBLK_S_DEV_FAIL_IO` finally from ublk_ch_release() with ublk server cooperation. This feature can help to support to upgrade ublk server application by shutting down ublk server gracefully, meantime keep ublk block device persistent during the upgrading period. The feature is only available for UBLK_F_USER_RECOVERY. Suggested-by: Yoav Cohen Link: https://lore.kernel.org/linux-block/DM4PR12MB632807AB7CDCE77D1E5AB7D0A9B92@DM4PR12MB6328.namprd12.prod.outlook.com/ Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250522163523.406289-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit f40b1f2670f084d2879e4a125a75ff7788ec67ba Author: Ming Lei Date: Fri May 23 00:35:19 2025 +0800 selftests: ublk: add test case for UBLK_U_CMD_UPDATE_SIZE Add test generic_10 for covering new control command of UBLK_U_CMD_UPDATE_SIZE. Add 'update_size -s|--size size_in_bytes' sub-command on ublk utility for supporting this feature, then verify the feature via generic_10. Cc: Omri Mann Cc: Jared Holzman Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250522163523.406289-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 17b7d785fc7fc94b94acc080e09de4b5023fbc1e Author: Yumeng Fang Date: Fri May 23 16:54:45 2025 +0800 i2c: Use str_read_write() helper Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Yumeng Fang Signed-off-by: Yunjian Long Signed-off-by: Wolfram Sang commit 927244f6efff6df5f8f2ab58c7d1eec9f90cc3f2 Author: Ritesh Harjani (IBM) Date: Thu May 22 19:21:10 2025 +0530 traceevent/block: Add REQ_ATOMIC flag to block trace events Filesystems like XFS can implement atomic write I/O using either REQ_ATOMIC flag set in the bio or via CoW operation. It will be useful if we have a flag in trace events to distinguish between the two. This patch adds char 'U' (Untorn writes) to rwbs field of the trace events if REQ_ATOMIC flag is set in the bio. ================= xfs_io-4238 [009] ..... 4148.126843: block_rq_issue: 259,0 WFSU 16384 () 768 + 32 none,0,0 [xfs_io] -0 [009] d.h1. 4148.129864: block_rq_complete: 259,0 WFSU () 768 + 32 none,0,0 [0] =============== xfs_io-4237 [010] ..... 4143.325616: block_rq_issue: 259,0 WS 16384 () 768 + 32 none,0,0 [xfs_io] -0 [010] d.H1. 4143.329138: block_rq_complete: 259,0 WS () 768 + 32 none,0,0 [0] Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/44317cb2ec4588f6a2c1501a96684e6a1196e8ba.1747921498.git.ritesh.list@gmail.com Signed-off-by: Jens Axboe commit 9c7dcf4c16ef521657450a82dc26775d6f556209 Merge: 17a3a30e8e3df7 2b2805404c926b Author: Wolfram Sang Date: Fri May 23 17:18:16 2025 +0200 Merge tag 'i2c-host-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow i2c-host updates for v6.16 Cleanups and refactorings - Many drivers switched to dev_err_probe() - Generic cleanups applied to designware, iproc, ismt, mlxbf, npcm7xx, qcom-geni, pasemi, and thunderx - davinci: declare I2C mangling support among I2C features - designware: clean up DTS handling - designware: fix PM runtime on driver unregister - imx: improve error logging during probe - lpc2k: improve checks in probe error path - xgene-slimpro: improve PCC shared memory handling - pasemi: improve error handling in reset, smbus clear, timeouts - tegra: validate buffer length during transfers - wmt: convert binding to YAML format Improvements and extended support: - microchip-core: add SMBus support - mlxbf: add support for repeated start in block transfers - mlxbf: improve timer configuration - npcm: attempt clock toggle recovery before failing init - octeon: add support for block mode operations - pasemi: add support for unjam device feature - riic: add support for bus recovery New device support: - MediaTek Dimensity 1200 (MT6893) - Sophgo SG2044 - Renesas RZ/V2N (R9A09G056) - Rockchip RK3528 - AMD ISP (new driver) Misc changes: - core: add support for Write Disable-aware SPD commit 01daf71a4f57062055f68f8163ed1ad88fb47990 Author: George Moussalem Date: Thu May 22 09:48:51 2025 +0400 thermal: qcom: ipq5018: make ops_ipq5018 struct static Fix a sparse warning by making the ops_ipq5018 struct static. Fixes: 04b31cc53fe0 ("thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505202356.S21Sc7bk-lkp@intel.com/ Signed-off-by: George Moussalem Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250522-ipq5018-tsens-sparse-v1-1-97edaaaef27c@outlook.com Signed-off-by: Rafael J. Wysocki commit 879b141b7cfa09763f932f15f19e9bc0bcb020d5 Merge: a5806cd506af5a b3f6fcd8404f9f c6f0d53ebf358f 70892277ca2dba b3f3c493e96350 04cfc1ae14f3e9 bdcea7e396916c 33647d0be323f9 81244074b518ae 320302baed05c6 51c33f333bbf7b 5e2ff240b31a37 Author: Joerg Roedel Date: Fri May 23 17:14:32 2025 +0200 Merge branches 'fixes', 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'fsl/pamu', 'mediatek', 'renesas/ipmmu', 's390', 'intel/vt-d', 'amd/amd-vi' and 'core' into next commit 320302baed05c6456164652541f23d2a96522c06 Author: Lu Baolu Date: Tue May 20 15:58:49 2025 +0800 iommu/vt-d: Restore context entry setup order for aliased devices Commit 2031c469f816 ("iommu/vt-d: Add support for static identity domain") changed the context entry setup during domain attachment from a set-and-check policy to a clear-and-reset approach. This inadvertently introduced a regression affecting PCI aliased devices behind PCIe-to-PCI bridges. Specifically, keyboard and touchpad stopped working on several Apple Macbooks with below messages: kernel: platform pxa2xx-spi.3: Adding to iommu group 20 kernel: input: Apple SPI Keyboard as /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.3/spi_master/spi2/spi-APP000D:00/input/input0 kernel: DMAR: DRHD: handling fault status reg 3 kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set kernel: DMAR: DRHD: handling fault status reg 3 kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00 kernel: DMAR: DRHD: handling fault status reg 3 kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set kernel: DMAR: DRHD: handling fault status reg 3 kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00 Fix this by restoring the previous context setup order. Fixes: 2031c469f816 ("iommu/vt-d: Add support for static identity domain") Closes: https://lore.kernel.org/all/4dada48a-c5dd-4c30-9c85-5b03b0aa01f0@bfh.ch/ Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20250514060523.2862195-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20250520075849.755012-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 18e899017500f1992d3816e326972c8954fbff2a Author: Colin Ian King Date: Thu May 22 09:31:57 2025 +0100 thermal/drivers/airoha: Fix spelling mistake "calibrarion" -> "calibration" There is a spelling mistake in a dev_info message. Fix it. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250522083157.1957240-1-colin.i.king@gmail.com Signed-off-by: Rafael J. Wysocki commit 94a370fc8def6038dbc02199db9584b0b3690f1a Author: Armin Wolf Date: Sun May 18 20:51:11 2025 +0200 ACPI: bus: Bail out if acpi_kobj registration fails The ACPI sysfs code will fail to initialize if acpi_kobj is NULL, together with some ACPI drivers. Follow the other firmware subsystems and bail out if the kobject cannot be registered. Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20250518185111.3560-2-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 528b541b71cf03e263272b051b70696f92258e9d Author: David Regan Date: Thu May 22 10:25:17 2025 -0700 mtd: nand: brcmnand: fix NAND timeout when accessing eMMC When booting a board to NAND and accessing NAND while eMMC transactions are occurring the NAND will sometimes timeout. This is due to both NAND and eMMC controller sharing the same data bus on BCMBCA chips. Fix is to extend NAND timeout to allow eMMC transactions time to complete. Signed-off-by: David Regan Reviewed-by: William Zhang Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal commit dd133162c9cff5951a692fab9811fadf46a46457 Author: Alexandre Ghiti Date: Thu May 22 16:13:56 2025 +0200 ACPI: platform_profile: Avoid initializing on non-ACPI platforms The platform profile driver is loaded even on platforms that do not have ACPI enabled. The initialization of the sysfs entries was recently moved from platform_profile_register() to the module init call, and those entries need acpi_kobj to be initialized which is not the case when ACPI is disabled. This results in the following warning: WARNING: CPU: 5 PID: 1 at fs/sysfs/group.c:131 internal_create_group+0xa22/0xdd8 Modules linked in: CPU: 5 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 6.15.0-rc7-dirty #6 PREEMPT Tainted: [W]=WARN Hardware name: riscv-virtio,qemu (DT) epc : internal_create_group+0xa22/0xdd8 ra : internal_create_group+0xa22/0xdd8 Call Trace: internal_create_group+0xa22/0xdd8 sysfs_create_group+0x22/0x2e platform_profile_init+0x74/0xb2 do_one_initcall+0x198/0xa9e kernel_init_freeable+0x6d8/0x780 kernel_init+0x28/0x24c ret_from_fork+0xe/0x18 Fix this by checking if ACPI is enabled before trying to create sysfs entries. Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") Signed-off-by: Alexandre Ghiti Reviewed-by: Arnd Bergmann Reviewed-by: Mark Pearson Link: https://patch.msgid.link/20250522141410.31315-1-alexghiti@rivosinc.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 3d5bef5d47c371e17041cd6c84e9c08e54ea9e63 Author: Miguel Ojeda Date: Sun Apr 13 02:56:50 2025 +0200 rust: add C FFI types to the prelude Rust kernel code is supposed to use the custom mapping of C FFI types, i.e. those from the `ffi` crate, rather than the ones coming from `core`. Thus, to minimize mistakes and to simplify the code everywhere, just provide them in the `kernel` prelude and ask in the Coding Guidelines to use them directly, i.e. as a single segment path. After this lands, we can start cleaning up the existing users. Ideally, we would use something like Clippy's `disallowed-types` to prevent the use of the `core` ones, but that one sees through aliases. Link: https://lore.kernel.org/rust-for-linux/CANiq72kc4gzfieD-FjuWfELRDXXD2vLgPv4wqk3nt4pjdPQ=qg@mail.gmail.com/ Reviewed-by: Danilo Krummrich Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250413005650.1745894-1-ojeda@kernel.org [ Reworded content of the documentation to focus on how to use the aliases first. - Miguel ] Signed-off-by: Miguel Ojeda commit fe6446215bfad11cf3b446f38b28dc7708973c25 Author: Jaroslav Kysela Date: Fri May 23 12:21:02 2025 +0200 firmware: cs_dsp: Fix OOB memory read access in KUnit test KASAN reported out of bounds access - cs_dsp_mock_bin_add_name_or_info(), because the source string length was rounded up to the allocation size. Cc: Simon Trimmer Cc: Charles Keepax Cc: Richard Fitzgerald Cc: patches@opensource.cirrus.com Cc: stable@vger.kernel.org Signed-off-by: Jaroslav Kysela Link: https://patch.msgid.link/20250523102102.1177151-1-perex@perex.cz Reviewed-by: Richard Fitzgerald Signed-off-by: Mark Brown commit 882826f58b2c48cafc7084a799207e76f2c74fe0 Author: Arnd Bergmann Date: Wed May 21 15:55:43 2025 +0200 ALSA: usb-audio: qcom: fix USB_XHCI dependency SND_USB_AUDIO_QMI depends on USB_XHCI_SIDEBAND, but that is a bool symbol and allows it to be built-in even when XHCI itself is in a loadable module. That configuration causes a link failure: arm-linux-gnueabi-ld: sound/usb/qcom/qc_audio_offload.o: in function `uaudio_event_ring_cleanup_free': qc_audio_offload.c:(.text+0x7dc): undefined reference to `xhci_sideband_remove_interrupter' arm-linux-gnueabi-ld: sound/usb/qcom/qc_audio_offload.o: in function `uaudio_endpoint_setup': qc_audio_offload.c:(.text+0xe88): undefined reference to `xhci_sideband_add_endpoint' Add the extra dependency on USB_XHCI itself. Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250521135551.2111109-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit e2d8ae899760ff71168d08047962caae07ab36a1 Author: Arnd Bergmann Date: Fri May 23 14:11:47 2025 +0200 ASoC: qdsp6: fix compile-testing without CONFIG_OF The driver builds cleanly only when CONFIG_OF is enabled, otherwise the compiler notices an unused symbol: sound/soc/qcom/qdsp6/q6usb.c:401:34: error: 'q6usb_dai_device_id' defined but not used [-Werror=unused-const-variable=] The driver does not support legacy board files, so the of_match_ptr() annotation has no use here and can be removed to avoid the warning. Fixes: e0dd9240f13a ("ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250523121152.2292574-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 662a9ece32add94469138ae66999ee16cb37a531 Author: Arnd Bergmann Date: Fri May 23 14:09:43 2025 +0200 usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n When the USB5744 option is disabled, the onboard_usb driver warns about unused functions: drivers/usb/misc/onboard_usb_dev.c:358:12: error: 'onboard_dev_5744_i2c_write_byte' defined but not used [-Werror=unused-function] 358 | static int onboard_dev_5744_i2c_write_byte(struct i2c_client *client, u16 addr, u8 data) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/misc/onboard_usb_dev.c:313:12: error: 'onboard_dev_5744_i2c_read_byte' defined but not used [-Werror=unused-function] 313 | static int onboard_dev_5744_i2c_read_byte(struct i2c_client *client, u16 addr, u8 *data) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Extend the #ifdef block a little further to cover all of these functions. Ideally we'd use use if(IS_ENABLED()) instead, but that doesn't currently work because the i2c_transfer() and i2c_smbus_write_word_data() function declarations are hidden when CONFIG_I2C is disabled. Fixes: 1143d41922c0 ("usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250523120947.2170302-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6faaf6e0faf1cc9a1359cfe6ecb4d9711b4a9f29 Author: Pavel Begunkov Date: Fri May 23 10:04:46 2025 +0100 io_uring/cmd: warn on reg buf imports by ineligible cmds For IORING_URING_CMD_FIXED-less commands io_uring doesn't pull buf_index from the sqe, so imports might succeed if the index coincide, e.g. when it's 0, but otherwise it's error prone. Warn if someone tries to import without the flag. Signed-off-by: Pavel Begunkov Reviewed-by: Anuj Gupta Link: https://lore.kernel.org/r/a1c2c88e53c3fe96978f23d50c6bc66c2c79c337.1747991070.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2b3c61b87519ff5d52fd9d6eb2632975f4e18b04 Author: Dmitry V. Levin Date: Mon May 12 01:49:53 2025 +0300 statmount: update STATMOUNT_SUPPORTED macro According to commit 8f6116b5b77b ("statmount: add a new supported_mask field"), STATMOUNT_SUPPORTED macro shall be updated whenever a new flag is added. Fixes: 7a54947e727b ("Merge patch series "fs: allow changing idmappings"") Signed-off-by: "Dmitry V. Levin" Link: https://lore.kernel.org/20250511224953.GA17849@strace.io Signed-off-by: Christian Brauner commit 101f2bbab541116ab861b9c3ac0ece07a7eaa756 Author: Stephen Brennan Date: Wed May 7 15:34:01 2025 -0700 fs: convert mount flags to enum In prior kernel versions (5.8-6.8), commit 9f6c61f96f2d9 ("proc/mounts: add cursor") introduced MNT_CURSOR, a flag used by readers from /proc/mounts to keep their place while reading the file. Later, commit 2eea9ce4310d8 ("mounts: keep list of mounts in an rbtree") removed this flag and its value has since been repurposed. For debuggers iterating over the list of mounts, cursors should be skipped as they are irrelevant. Detecting whether an element is a cursor can be difficult. Since the MNT_CURSOR flag is a preprocessor constant, it's not present in debuginfo, and since its value is repurposed, we cannot hard-code it. For this specific issue, cursors are possible to detect in other ways, but ideally, we would be able to read the mount flag definitions out of the debuginfo. For that reason, convert the mount flags to an enum. Link: https://github.com/osandov/drgn/pull/496 Signed-off-by: Stephen Brennan Link: https://lore.kernel.org/20250507223402.2795029-1-stephen.s.brennan@oracle.com Signed-off-by: Christian Brauner commit 7fc711739eb8c30955fd8a85be0db7d5a0aa10ae Author: Al Viro Date: Mon Apr 21 04:35:09 2025 +0100 ->mnt_devname is never NULL Not since 8f2918898eb5 "new helpers: vfs_create_mount(), fc_mount()" back in 2018. Get rid of the dead checks... Signed-off-by: Al Viro Link: https://lore.kernel.org/20250421033509.GV2023217@ZenIV Signed-off-by: Christian Brauner commit a68cb18624503a09a1b10e72c3bcc90f2eeb3ded Author: Christian Brauner Date: Wed Apr 16 10:19:05 2025 +0200 mount: add a comment about concurrent changes with statmount()/listmount() Add some comments in there highlighting a few non-obvious assumptions. Link: https://lore.kernel.org/20250416-zerknirschen-aluminium-14a55639076f@brauner Signed-off-by: Christian Brauner commit 0b2b066f8a854ff485319f697d16c5f565c32112 Author: Jens Axboe Date: Fri May 23 06:08:49 2025 -0600 io_uring/io-wq: only create a new worker if it can make progress Hashed work is serialized by io-wq, intended to be used for cases like serializing buffered writes to a regular file, where the file system will serialize the workers anyway with a mutex or similar. Since they would be forcibly serialized and blocked, it's more efficient for io-wq to handle these individually rather than issue them in parallel. If a worker is currently handling a hashed work item and gets blocked, don't create a new worker if the next work item is also hashed and mapped to the same bucket. That new worker would not be able to make any progress anyway. Reported-by: Fengnan Chang Reported-by: Diangang Li Link: https://lore.kernel.org/io-uring/20250522090909.73212-1-changfengnan@bytedance.com/ Signed-off-by: Jens Axboe commit 8343cae362e147a5d4505c2da0e161a4d9e9fbde Author: Jens Axboe Date: Fri May 23 06:05:37 2025 -0600 io_uring/io-wq: ignore non-busy worker going to sleep When an io-wq worker goes to sleep, it checks if there's work to do. If there is, it'll create a new worker. But if this worker is currently idle, it'll either get woken right back up immediately, or someone else has already created the necessary worker to handle this work. Only go through the worker creation logic if the current worker is currently handling a work item. That means it's being scheduled out as part of handling that work, not just going to sleep on its own. Signed-off-by: Jens Axboe commit e37dfc0530815ead6e8ddab2a4ccce3be31af954 Author: Jens Axboe Date: Fri May 23 06:04:29 2025 -0600 io_uring/io-wq: move hash helpers to the top Just in preparation for using them higher up in the function, move these generic helpers. Signed-off-by: Jens Axboe commit b41ac97fe0a6876edbc6fc90dfd05513ba7332ed Author: Kent Overstreet Date: Tue Apr 9 23:53:57 2024 -0400 bcachefs: Path must be locked if trans->locked && should_be_locked If path->should_be_locked is true, that means user code (of the btree API) has seen, in this transaction, something guarded by the node this path has locked, and we have to keep it locked until the end of the transaction. Assert that we're not violating this; should_be_locked should also be cleared only in _very_ special situations. Signed-off-by: Kent Overstreet commit 22e921a6f9b8ec4c9ccbef4accae1494c6695745 Author: Kent Overstreet Date: Thu May 22 15:52:15 2025 -0400 bcachefs: Simplify bch2_path_put() Simplify the "do we need to keep this locked?" checks. Signed-off-by: Kent Overstreet commit 80a160e49414972b712f30b9b287d88197fe3077 Author: Kent Overstreet Date: Thu May 22 15:33:14 2025 -0400 bcachefs: Plumb btree_trans for more locking asserts Signed-off-by: Kent Overstreet commit df92f3500b3f78b8e0ed3faa95c15a834ea9a821 Author: Kent Overstreet Date: Thu May 22 16:04:15 2025 -0400 bcachefs: Clear trans->locked before unlock We're adding new should_be_locked assertions: it's going to be illegal to unlock a should_be_locked path when trans->locked is true. Signed-off-by: Kent Overstreet commit eb34365adae033659384d1dedae99f73abd9815a Author: Kent Overstreet Date: Thu May 22 16:03:08 2025 -0400 bcachefs: Clear should_be_locked before unlock in key_cache_drop() We're adding new should_be_locked assertions, also add a comment explaining why clearing should_be_locked is safe here. Signed-off-by: Kent Overstreet commit be9fecdcdaf730dbf2ca70dbe5b6d42922df50d6 Author: Kent Overstreet Date: Thu May 22 18:12:54 2025 -0400 bcachefs: bch2_path_get() reuses paths if upgrade_fails & !should_be_locked Small additional optimization over the previous patch, bringing us closer to the original behaviour, except when we need to clone to avoid a transaction restart. Signed-off-by: Kent Overstreet commit aac49471b6c4a15cdb4bdade8c19527075af073d Author: Kent Overstreet Date: Thu May 22 18:00:45 2025 -0400 bcachefs: Give out new path if upgrade fails Avoid transaction restarts due to failure to upgrade - we can traverse a new iterator without a transaction restart. Signed-off-by: Kent Overstreet commit 66782b2acbc3291faba7e14d9b22b77a4f3f94e4 Author: Kent Overstreet Date: Thu May 22 16:54:31 2025 -0400 bcachefs: Fix btree_path_get_locks when not doing trans restart btree_path_get_locks, on failure, shouldn't unlock if we're not issuing a transaction restart: we might drop locks we're not supposed to (if path->should_be_locked is set). Signed-off-by: Kent Overstreet commit 5b7b342c402df2cfb1d9a8ea79613742d61d1293 Author: Kent Overstreet Date: Thu May 22 18:03:32 2025 -0400 bcachefs: btree_node_locked_type_nowrite() Small helper to improve locking assertions. Signed-off-by: Kent Overstreet commit 659489f37bd0471d5a77abdfe86eb105ad11297e Author: Kent Overstreet Date: Thu May 22 15:40:24 2025 -0400 bcachefs: Kill bch2_path_put_nokeep() bch2_path_put_nokeep() was intended for paths we wouldn't need to preserve for a transaction restart - it always frees them right away when the ref hits 0. But since paths are shared, freeing unconditionally is a bug, the path might have been used elsewhere and have should_be_locked set, i.e. we need to keep it locked until the end of the transaction. Signed-off-by: Kent Overstreet commit 73db1b5dab6fe17baf9fe2b0d7c8dfd1d4a5b3e5 Author: Phil Sutter Date: Wed May 21 22:44:34 2025 +0200 selftests: netfilter: Torture nftables netdev hooks Add a ruleset which binds to various interface names via netdev-family chains and flowtables and massage the notifiers by frequently renaming interfaces to match these names. While doing so: - Keep an 'nft monitor' running in background to receive the notifications - Loop over 'nft list ruleset' to exercise ruleset dump codepath - Have iperf running so the involved chains/flowtables see traffic If supported, also test interface wildcard support separately by creating a flowtable with 'wild*' interface spec and quickly add/remove matching dummy interfaces. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 465b9ee0ee7bc268d7f261356afd6c4262e48d82 Author: Phil Sutter Date: Wed May 21 22:44:33 2025 +0200 netfilter: nf_tables: Add notifications for hook changes Notify user space if netdev hooks are updated due to netdev add/remove events. Send minimal notification messages by introducing NFT_MSG_NEWDEV/DELDEV message types describing a single device only. Upon NETDEV_CHANGENAME, the callback has no information about the interface's old name. To provide a clear message to user space, include the hook's stored interface name in the notification. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 6d07a289504a246aa97cdac0fec61a15834801b7 Author: Phil Sutter Date: Wed May 21 22:44:32 2025 +0200 netfilter: nf_tables: Support wildcard netdev hook specs User space may pass non-nul-terminated NFTA_DEVICE_NAME attribute values to indicate a suffix wildcard. Expect for multiple devices to match the given prefix in nft_netdev_hook_alloc() and populate 'ops_list' with them all. When checking for duplicate hooks, compare the shortest prefix so a device may never match more than a single hook spec. Finally respect the stored prefix length when hooking into new devices from event handlers. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 6f670935b4703af1ef58b2cba7faf2bd154cce39 Author: Phil Sutter Date: Wed May 21 22:44:31 2025 +0200 netfilter: nf_tables: Sort labels in nft_netdev_hook_alloc() No point in having err_hook_alloc, just call return directly. Also rename err_hook_dev - it's not about the hook's device but freeing the hook itself. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 7b4856493d7801018c48bab6f8ab8482aba8be76 Author: Phil Sutter Date: Wed May 21 22:44:30 2025 +0200 netfilter: nf_tables: Handle NETDEV_CHANGENAME events For the sake of simplicity, treat them like consecutive NETDEV_REGISTER and NETDEV_UNREGISTER events. If the new name matches a hook spec and registration fails, escalate the error and keep things as they are. To avoid unregistering the newly registered hook again during the following fake NETDEV_UNREGISTER event, leave hooks alone if their interface spec matches the new name. Note how this patch also skips for NETDEV_REGISTER if the device is already registered. This is not yet possible as the new name would have to match the old one. This will change with wildcard interface specs, though. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 9669c1105b16fa9e02bc599464b3f96988c92ed0 Author: Phil Sutter Date: Wed May 21 22:44:29 2025 +0200 netfilter: nf_tables: Wrap netdev notifiers Handling NETDEV_CHANGENAME events has to traverse all chains/flowtables twice, prepare for this. No functional change intended. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit a331b78a552551d0e404e58e6390b1c828d6af8f Author: Phil Sutter Date: Wed May 21 22:44:28 2025 +0200 netfilter: nf_tables: Respect NETDEV_REGISTER events Hook into new devices if their name matches the hook spec. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 104031ac89804cda09b0363156a0769aae0f875c Author: Phil Sutter Date: Wed May 21 22:44:27 2025 +0200 netfilter: nf_tables: Prepare for handling NETDEV_REGISTER events Put NETDEV_UNREGISTER handling code into a switch, no functional change intended as the function is only called for that event yet. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 73319a8ee18b9cf0b2dac87f8521595e0381ba0c Author: Phil Sutter Date: Wed May 21 22:44:26 2025 +0200 netfilter: nf_tables: Have a list of nf_hook_ops in nft_hook Supporting a 1:n relationship between nft_hook and nf_hook_ops is convenient since a chain's or flowtable's nft_hooks may remain in place despite matching interfaces disappearing. This stabilizes ruleset dumps in that regard and opens the possibility to claim newly added interfaces which match the spec. Also it prepares for wildcard interface specs since these will potentially match multiple interfaces. All spots dealing with hook registration are updated to handle a list of multiple nf_hook_ops, but nft_netdev_hook_alloc() only adds a single item for now to retain the old behaviour. The only expected functional change here is how vanishing interfaces are handled: Instead of dropping the respective nft_hook, only the matching nf_hook_ops are dropped. To safely remove individual ops from the list in netdev handlers, an rcu_head is added to struct nf_hook_ops so kfree_rcu() may be used. There is at least nft_flowtable_find_dev() which may be iterating through the list at the same time. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 91a089d0569d3ddfa70d0b630ec164e00dc3359b Author: Phil Sutter Date: Wed May 21 22:44:25 2025 +0200 netfilter: nf_tables: Pass nf_hook_ops to nft_unregister_flowtable_hook() The function accesses only the hook's ops field, pass it directly. This prepares for nft_hooks holding a list of nf_hook_ops in future. While at it, make use of the function in __nft_unregister_flowtable_net_hooks() as well. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 21aa0a03eb5360bc55b25f5599523896beac27df Author: Phil Sutter Date: Wed May 21 22:44:24 2025 +0200 netfilter: nf_tables: Introduce nft_register_flowtable_ops() Facilitate binding and registering of a flowtable hook via a single function call. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit e225376d78fb2d85e99a2436a9e65765dc1ac234 Author: Phil Sutter Date: Wed May 21 22:44:23 2025 +0200 netfilter: nf_tables: Introduce nft_hook_find_ops{,_rcu}() Also a pretty dull wrapper around the hook->ops.dev comparison for now. Will search the embedded nf_hook_ops list in future. The ugly cast to eliminate the const qualifier will vanish then, too. Since this future list will be RCU-protected, also introduce an _rcu() variant here. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 75e20bcdce24b34e9bf71a7a731f9294fb2c633c Author: Phil Sutter Date: Wed May 21 22:44:22 2025 +0200 netfilter: nf_tables: Introduce functions freeing nft_hook objects Pointless wrappers around kfree() for now, prep work for an embedded list of nf_hook_ops. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 7e5c6aa67e6f6133c5a2c53852e1dd9af2c0c3fc Author: Florian Westphal Date: Thu May 22 15:49:34 2025 +0200 netfilter: nf_tables: add packets conntrack state to debug trace info Add the minimal relevant info needed for userspace ("nftables monitor trace") to provide the conntrack view of the packet: - state (new, related, established) - direction (original, reply) - status (e.g., if connection is subject to dnat) - id (allows to query ctnetlink for remaining conntrack state info) Example: trace id a62 inet filter PRE_RAW packet: iif "enp0s3" ether [..] [..] trace id a62 inet filter PRE_MANGLE conntrack: ct direction original ct state new ct id 32 trace id a62 inet filter PRE_MANGLE packet: [..] [..] trace id a62 inet filter IN conntrack: ct direction original ct state new ct status dnat-done ct id 32 [..] In this case one can see that while NAT is active, the new connection isn't subject to a translation. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 90869f43d06dfc836def2f53850a878f829e443e Author: Florian Westphal Date: Thu May 22 15:49:33 2025 +0200 netfilter: conntrack: make nf_conntrack_id callable without a module dependency While nf_conntrack_id() doesn't need any functionaliy from conntrack, it does reside in nf_conntrack_core.c -- callers add a module dependency on conntrack. Followup patch will need to compute the conntrack id from nf_tables_trace.c to include it in nf_trace messages emitted to userspace via netlink. I don't want to introduce a module dependency between nf_tables and conntrack for this. Since trace is slowpath, the added indirection is ok. One alternative is to move nf_conntrack_id to the netfilter/core.c, but I don't see a compelling reason so far. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f37ad91270397a6d053e8623bdb3cf79859691d2 Author: Sebastian Andrzej Siewior Date: Mon May 12 12:28:46 2025 +0200 netfilter: nf_dup_netdev: Move the recursion counter struct netdev_xmit nf_dup_skb_recursion is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Move nf_dup_skb_recursion to struct netdev_xmit, provide wrappers. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Pablo Neira Ayuso commit ba36fada9ab487634f61f92769c95bc148aa8f49 Author: Sebastian Andrzej Siewior Date: Mon May 12 12:28:45 2025 +0200 netfilter: nft_inner: Use nested-BH locking for nft_pcpu_tun_ctx nft_pcpu_tun_ctx is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Make a struct with a nft_inner_tun_ctx member (original nft_pcpu_tun_ctx) and a local_lock_t and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Pablo Neira Ayuso commit a1f1acb9c5db9b385c9b3eb1f27f897c06df49ae Author: Sebastian Andrzej Siewior Date: Mon May 12 12:28:44 2025 +0200 netfilter: nf_dup{4, 6}: Move duplication check to task_struct nf_skb_duplicated is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Due to the recursion involved, the simplest change is to make it a per-task variable. Move the per-CPU variable nf_skb_duplicated to task_struct and name it in_nf_duplicate. Add it to the existing bitfield so it doesn't use additional memory. Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Valentin Schneider Acked-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Pablo Neira Ayuso commit 22a9613de4c29d7d0770bfb8a5a9d73eb8df7dad Author: Fernando Fernandez Mancera Date: Wed May 21 11:41:08 2025 +0200 netfilter: nft_tunnel: fix geneve_opt dump When dumping a nft_tunnel with more than one geneve_opt configured the netlink attribute hierarchy should be as follow: NFTA_TUNNEL_KEY_OPTS | |--NFTA_TUNNEL_KEY_OPTS_GENEVE | | | |--NFTA_TUNNEL_KEY_GENEVE_CLASS | |--NFTA_TUNNEL_KEY_GENEVE_TYPE | |--NFTA_TUNNEL_KEY_GENEVE_DATA | |--NFTA_TUNNEL_KEY_OPTS_GENEVE | | | |--NFTA_TUNNEL_KEY_GENEVE_CLASS | |--NFTA_TUNNEL_KEY_GENEVE_TYPE | |--NFTA_TUNNEL_KEY_GENEVE_DATA | |--NFTA_TUNNEL_KEY_OPTS_GENEVE ... Otherwise, userspace tools won't be able to fetch the geneve options configured correctly. Fixes: 925d844696d9 ("netfilter: nft_tunnel: add support for geneve opts") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso commit 996d62ece03137b2462308acc15acadebe357c66 Author: Florian Westphal Date: Wed May 21 11:38:49 2025 +0200 selftests: netfilter: nft_fib.sh: add type and oif tests with and without VRFs Replace the existing VRF test with a more comprehensive one. It tests following combinations: - fib type (returns address type, e.g. unicast) - fib oif (route output interface index - both with and without 'iif' keyword (changes result, e.g. 'fib daddr type local' will be true when the destination address is configured on the local machine, but 'fib daddr . iif type local' will only be true when the destination address is configured on the incoming interface. Add all types of addresses to test with for both ipv4 and ipv6: - local address on the incoming interface - local address on another interface - local address on another interface thats part of a vrf - address on another host The ruleset stores obtained results from 'fib' in nftables sets and then queries the sets to check that it has the expected results. Perform one pass while packets are coming in on interface NOT part of a VRF and then again when it was added and make sure fib returns the expected routes and address types for the various addresses in the setup. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9a119669fb1924cd9658c16da39a5a585e129e50 Author: Florian Westphal Date: Wed May 21 11:38:48 2025 +0200 netfilter: nf_tables: nft_fib: consistent l3mdev handling fib has two modes: 1. Obtain output device according to source or destination address 2. Obtain the type of the address, e.g. local, unicast, multicast. 'fib daddr type' should return 'local' if the address is configured in this netns or unicast otherwise. 'fib daddr . iif type' should return 'local' if the address is configured on the input interface or unicast otherwise, i.e. more restrictive. However, if the interface is part of a VRF, then 'fib daddr type' returns unicast even if the address is configured on the incoming interface. This is broken for both ipv4 and ipv6. In the ipv4 case, inet_dev_addr_type must only be used if the 'iif' or 'oif' (strict mode) was requested. Else inet_addr_type_dev_table() needs to be used and the correct dev argument must be passed as well so the correct fib (vrf) table is used. In the ipv6 case, the bug is similar, without strict mode, dev is NULL so .flowi6_l3mdev will be set to 0. Add a new 'nft_fib_l3mdev_master_ifindex_rcu()' helper and use that to init the .l3mdev structure member. For ipv6, use it from nft_fib6_flowi_init() which gets called from both the 'type' and the 'route' mode eval functions. This provides consistent behaviour for all modes for both ipv4 and ipv6: If strict matching is requested, the input respectively output device of the netfilter hooks is used. Otherwise, use skb->dev to obtain the l3mdev ifindex. Without this, most type checks in updated nft_fib.sh selftest fail: FAIL: did not find veth0 . 10.9.9.1 . local in fibtype4 FAIL: did not find veth0 . dead:1::1 . local in fibtype6 FAIL: did not find veth0 . dead:9::1 . local in fibtype6 FAIL: did not find tvrf . 10.0.1.1 . local in fibtype4 FAIL: did not find tvrf . 10.9.9.1 . local in fibtype4 FAIL: did not find tvrf . dead:1::1 . local in fibtype6 FAIL: did not find tvrf . dead:9::1 . local in fibtype6 FAIL: fib expression address types match (iif in vrf) (fib errounously returns 'unicast' for all of them, even though all of these addresses are local to the vrf). Fixes: f6d0cbcf09c5 ("netfilter: nf_tables: add fib expression") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 61fc01f8f7f8e299b9fed5a5e5e068ef0e40593d Author: Arnd Bergmann Date: Thu May 22 11:21:41 2025 +0100 crypto: qat - add missing header inclusion Without this header, the build of the new qat_6xxx driver fails when CONFIG_PCI_IOV is not set: In file included from drivers/crypto/intel/qat/qat_common/adf_gen6_shared.c:7: drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.h: In function 'adf_gen4_init_pf_pfvf_ops': drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.h:13:34: error: 'adf_pfvf_comms_disabled' undeclared (first use in this function) 13 | pfvf_ops->enable_comms = adf_pfvf_comms_disabled; | ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 17fd7514ae68 ("crypto: qat - add qat_6xxx driver") Signed-off-by: Arnd Bergmann Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 0a3cf32da469ff1df6e016f5f82b439a63d14461 Author: Herbert Xu Date: Mon May 19 18:29:38 2025 +0800 crypto: api - Redo lookup on EEXIST When two crypto algorithm lookups occur at the same time with different names for the same algorithm, e.g., ctr(aes-generic) and ctr(aes), they will both be instantiated. However, only one of them can be registered. The second instantiation will fail with EEXIST. Avoid failing the second lookup by making it retry, but only once because there are tricky names such as gcm_base(ctr(aes),ghash) that will always fail, despite triggering instantiation and EEXIST. Reported-by: Ingo Franzki Fixes: 2825982d9d66 ("[CRYPTO] api: Added event notification") Signed-off-by: Herbert Xu commit e60acc420368e3fcb8c158207d37a502c4eee9e2 Author: Jihed Chaibi Date: Wed May 21 23:48:51 2025 +0200 usb: typec: tipd: fix typo in TPS_STATUS_HIGH_VOLAGE_WARNING macro "VOLAGE" should become "VOLTAGE" Signed-off-by: Jihed Chaibi Reviewed-by: Brigham Campbell Link: https://lore.kernel.org/r/20250521214851.386796-1-jihed.chaibi.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae4432e01dd967a64f6670a152d91d5328032726 Author: Greg Kroah-Hartman Date: Wed May 21 15:35:24 2025 +0200 USB: typec: fix const issue in typec_match() typec_match() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/2025052126-scholar-stainless-ad55@gregkh Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Greg Kroah-Hartman commit 5f5cc794fac605afd3bef8065e33096aeacf6257 Author: Greg Kroah-Hartman Date: Wed May 21 15:41:40 2025 +0200 USB: gadget: udc: fix const issue in gadget_match_driver() gadget_match_driver() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Link: https://lore.kernel.org/r/2025052139-rash-unsaddle-7c5e@gregkh Signed-off-by: Greg Kroah-Hartman commit d1d89e8eee6f0e91cfad2a0375ad679fd5c1ae83 Author: Greg Kroah-Hartman Date: Wed May 21 15:41:46 2025 +0200 USB: gadget: fix up const issue with struct usb_function_instance In struct usb_function, the struct usb_function_instance pointer variable "fi" is listed as const, but it is written to in numerous places, making the const marking of it a total lie. Fix this up by just removing the const pointer attribute as this is modified in numerous places. Link: https://lore.kernel.org/r/2025052145-undress-puma-f7cf@gregkh Signed-off-by: Greg Kroah-Hartman commit 2596313a4d91afd94608e06cf877adedbdb656be Merge: 342e4955a1f1ce d3a889482bd5ab Author: Greg Kroah-Hartman Date: Fri May 23 12:23:01 2025 +0200 Merge tag 'usb-serial-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB serial updates for 6.16-rc1 Here are the USB serial updates for 6.16-rc1, including: - fix of an incorrect const cast - removal of a bogus read urb sanity check - support for a couple of new pl2303 device types All have been in linux-next with no reported issues. * tag 'usb-serial-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB USB: serial: bus: fix const issue in usb_serial_device_match() USB: serial: ti_usb_3410_5052: drop bogus read urb check commit de2b3119f9f7e2b5b74838272618e5d4a6f1d076 Author: Zhang Yi Date: Fri May 23 10:55:02 2025 +0800 ASoC: codecs: add support for ES8375 The driver is for codec es8375 of everest Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250523025502.23214-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit f70d0f893b945aa42576853212645f4d889332b4 Author: Zhang Yi Date: Fri May 23 10:55:01 2025 +0800 ASoC: dt-bindings: Add Everest ES8375 audio CODEC Add device tree binding documentation for Everest ES8375 Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250523025502.23214-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 1b85d923ba8c9e6afaf19e26708411adde94fba8 Merge: 7f3225fe8bc2b4 bf809a0aab2f3a Author: Marc Zyngier Date: Fri May 23 10:59:43 2025 +0100 Merge branch kvm-arm64/misc-6.16 into kvmarm-master/next * kvm-arm64/misc-6.16: : . : Misc changes and improvements for 6.16: : : - Add a new selftest for the SVE host state being corrupted by a guest : : - Keep HCR_EL2.xMO set at all times for systems running with the kernel at EL2, : ensuring that the window for interrupts is slightly bigger, and avoiding : a pretty bad erratum on the AmpereOne HW : : - Replace a couple of open-coded on/off strings with str_on_off() : : - Get rid of the pKVM memblock sorting, which now appears to be superflous : : - Drop superflous clearing of ICH_LR_EOI in the LR when nesting : : - Add workaround for AmpereOne's erratum AC04_CPU_23, which suffers from : a pretty bad case of TLB corruption unless accesses to HCR_EL2 are : heavily synchronised : : - Add a per-VM, per-ITS debugfs entry to dump the state of the ITS tables : in a human-friendly fashion : . KVM: arm64: Fix documentation for vgic_its_iter_next() KVM: arm64: vgic-its: Add debugfs interface to expose ITS tables arm64: errata: Work around AmpereOne's erratum AC04_CPU_23 KVM: arm64: nv: Remove clearing of ICH_LR.EOI if ICH_LR.HW == 1 KVM: arm64: Drop sort_memblock_regions() KVM: arm64: selftests: Add test for SVE host corruption KVM: arm64: Force HCR_EL2.xMO to 1 at all times in VHE mode KVM: arm64: Replace ternary flags with str_on_off() helper Signed-off-by: Marc Zyngier commit 7f3225fe8bc2b4a406160d3efdb900bd01037aea Merge: 35e4d7fe699d67 538fbac74019c1 Author: Marc Zyngier Date: Fri May 23 10:58:57 2025 +0100 Merge branch kvm-arm64/nv-nv into kvmarm-master/next * kvm-arm64/nv-nv: : . : Flick the switch on the NV support by adding the missing piece : in the form of the VNCR page management. From the cover letter: : : "This is probably the most interesting bit of the whole NV adventure. : So far, everything else has been a walk in the park, but this one is : where the real fun takes place. : : With FEAT_NV2, most of the NV support revolves around tricking a guest : into accessing memory while it tries to access system registers. The : hypervisor's job is to handle the context switch of the actual : registers with the state in memory as needed." : . KVM: arm64: nv: Release faulted-in VNCR page from mmu_lock critical section KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held KVM: arm64: nv: Hold mmu_lock when invalidating VNCR SW-TLB before translating KVM: arm64: Document NV caps and vcpu flags KVM: arm64: Allow userspace to request KVM_ARM_VCPU_EL2* KVM: arm64: nv: Remove dead code from ERET handling KVM: arm64: nv: Plumb TLBI S1E2 into system instruction dispatch KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2 KVM: arm64: nv: Program host's VNCR_EL2 to the fixmap address KVM: arm64: nv: Handle VNCR_EL2 invalidation from MMU notifiers KVM: arm64: nv: Handle mapping of VNCR_EL2 at EL2 KVM: arm64: nv: Handle VNCR_EL2-triggered faults KVM: arm64: nv: Add userspace and guest handling of VNCR_EL2 KVM: arm64: nv: Add pseudo-TLB backing VNCR_EL2 KVM: arm64: nv: Don't adjust PSTATE.M when L2 is nesting KVM: arm64: nv: Move TLBI range decoding to a helper KVM: arm64: nv: Snapshot S1 ASID tagging information during walk KVM: arm64: nv: Extract translation helper from the AT code KVM: arm64: nv: Allocate VNCR page when required arm64: sysreg: Add layout for VNCR_EL2 Signed-off-by: Marc Zyngier commit 35e4d7fe699d673500edc488b16b46882c773143 Merge: fef3acf5ae8011 3e4d5972205875 Author: Marc Zyngier Date: Fri May 23 10:58:34 2025 +0100 Merge branch kvm-arm64/at-fixes-6.16 into kvmarm-master/next * kvm-arm64/at-fixes-6.16: : . : Set of fixes for Address Translation (AT) instruction emulation, : which affect the (not yet upstream) NV support. : : From the cover letter: : : "Here's a small series of fixes for KVM's implementation of address : translation (aka the AT S1* instructions), addressing a number of : issues in increasing levels of severity: : : - We misreport PAR_EL1.PTW in a number of occasions, including state : that is not possible as per the architecture definition : : - We don't handle access faults at all, and that doesn't play very : well with the rest of the VNCR stuff : : - AT S1E{0,1} from EL2 with HCR_EL2.{E2H,TGE}={1,1} will absolutely : take the host down, no questions asked" : . KVM: arm64: Don't feed uninitialised data to HCR_EL2 KVM: arm64: Teach address translation about access faults KVM: arm64: Fix PAR_EL1.{PTW,S} reporting on AT S1E* Signed-off-by: Marc Zyngier commit fef3acf5ae801109119c07568677d8acfd16ccda Merge: 6eb0ed96293f7c 98dbe56a016a4e Author: Marc Zyngier Date: Fri May 23 10:58:15 2025 +0100 Merge branch kvm-arm64/fgt-masks into kvmarm-master/next * kvm-arm64/fgt-masks: (43 commits) : . : Large rework of the way KVM deals with trap bits in conjunction with : the CPU feature registers. It now draws a direct link between which : the feature set, the system registers that need to UNDEF to match : the configuration and bits that need to behave as RES0 or RES1 in : the trap registers that are visible to the guest. : : Best of all, these definitions are mostly automatically generated : from the JSON description published by ARM under a permissive : license. : . KVM: arm64: Handle TSB CSYNC traps KVM: arm64: Add FGT descriptors for FEAT_FGT2 KVM: arm64: Allow sysreg ranges for FGT descriptors KVM: arm64: Add context-switch for FEAT_FGT2 registers KVM: arm64: Add trap routing for FEAT_FGT2 registers KVM: arm64: Add sanitisation for FEAT_FGT2 registers KVM: arm64: Add FEAT_FGT2 registers to the VNCR page KVM: arm64: Use HCR_EL2 feature map to drive fixed-value bits KVM: arm64: Use HCRX_EL2 feature map to drive fixed-value bits KVM: arm64: Allow kvm_has_feat() to take variable arguments KVM: arm64: Use FGT feature maps to drive RES0 bits KVM: arm64: Validate FGT register descriptions against RES0 masks KVM: arm64: Switch to table-driven FGU configuration KVM: arm64: Handle PSB CSYNC traps KVM: arm64: Use KVM-specific HCRX_EL2 RES0 mask KVM: arm64: Remove hand-crafted masks for FGT registers KVM: arm64: Use computed FGT masks to setup FGT registers KVM: arm64: Propagate FGT masks to the nVHE hypervisor KVM: arm64: Unconditionally configure fine-grain traps KVM: arm64: Use computed masks as sanitisers for FGT registers ... Signed-off-by: Marc Zyngier commit 6eb0ed96293f7c2d5e0b170698169a04f7d95d1a Merge: cb86616c39f8be 69018866d2baa0 Author: Marc Zyngier Date: Fri May 23 10:57:44 2025 +0100 Merge branch kvm-arm64/mte-frac into kvmarm-master/next * kvm-arm64/mte-frac: : . : Prevent FEAT_MTE_ASYNC from being accidently exposed to a guest, : courtesy of Ben Horgan. From the cover letter: : : "The ID_AA64PFR1_EL1.MTE_frac field is currently hidden from KVM. : However, when ID_AA64PFR1_EL1.MTE==2, ID_AA64PFR1_EL1.MTE_frac==0 : indicates that MTE_ASYNC is supported. On a host with : ID_AA64PFR1_EL1.MTE==2 but without MTE_ASYNC support a guest with the : MTE capability enabled will incorrectly see MTE_ASYNC advertised as : supported. This series fixes that." : . KVM: selftests: Confirm exposing MTE_frac does not break migration KVM: arm64: Make MTE_frac masking conditional on MTE capability arm64/sysreg: Expose MTE_frac so that it is visible to KVM Signed-off-by: Marc Zyngier commit cb86616c39f8be7b9eaf0db4508b47d328b91e80 Merge: a90e0017541dbd 446692759b0732 Author: Marc Zyngier Date: Fri May 23 10:57:32 2025 +0100 Merge branch kvm-arm64/ubsan-el2 into kvmarm-master/next * kvm-arm64/ubsan-el2: : . : Add UBSAN support to the EL2 portion of KVM, reusing most of the : existing logic provided by CONFIG_IBSAN_TRAP. : : Patches courtesy of Mostafa Saleh. : . KVM: arm64: Handle UBSAN faults KVM: arm64: Introduce CONFIG_UBSAN_KVM_EL2 ubsan: Remove regs from report_ubsan_failure() arm64: Introduce esr_is_ubsan_brk() Signed-off-by: Marc Zyngier commit a90e0017541dbd2e6c1e40e501efefc938590390 Merge: 67bd641517b04d c353fde17d8f7e Author: Marc Zyngier Date: Fri May 23 10:56:25 2025 +0100 Merge branch kvm-arm64/pkvm-np-thp-6.16 into kvmarm-master/next * kvm-arm64/pkvm-np-thp-6.16: (21 commits) : . : Large mapping support for non-protected pKVM guests, courtesy of : Vincent Donnefort. From the cover letter: : : "This series adds support for stage-2 huge mappings (PMD_SIZE) to pKVM : np-guests, that is installing PMD-level mappings in the stage-2, : whenever the stage-1 is backed by either Hugetlbfs or THPs." : . KVM: arm64: np-guest CMOs with PMD_SIZE fixmap KVM: arm64: Stage-2 huge mappings for np-guests KVM: arm64: Add a range to pkvm_mappings KVM: arm64: Convert pkvm_mappings to interval tree KVM: arm64: Add a range to __pkvm_host_test_clear_young_guest() KVM: arm64: Add a range to __pkvm_host_wrprotect_guest() KVM: arm64: Add a range to __pkvm_host_unshare_guest() KVM: arm64: Add a range to __pkvm_host_share_guest() KVM: arm64: Introduce for_each_hyp_page KVM: arm64: Handle huge mappings for np-guest CMOs KVM: arm64: Extend pKVM selftest for np-guests KVM: arm64: Selftest for pKVM transitions KVM: arm64: Don't WARN from __pkvm_host_share_guest() KVM: arm64: Add .hyp.data section KVM: arm64: Unconditionally cross check hyp state KVM: arm64: Defer EL2 stage-1 mapping on share KVM: arm64: Move hyp state to hyp_vmemmap KVM: arm64: Introduce {get,set}_host_state() helpers KVM: arm64: Use 0b11 for encoding PKVM_NOPAGE KVM: arm64: Fix pKVM page-tracking comments ... Signed-off-by: Marc Zyngier commit 819aad967d4a71af18cd889097363c0a9d377c7a Merge: ea15e046263b19 431e2b874e417b Author: David S. Miller Date: Fri May 23 10:24:19 2025 +0100 Merge branch 'so_passrights' Kuniyuki Iwashima says: ==================== af_unix: Introduce SO_PASSRIGHTS. As long as recvmsg() or recvmmsg() is used with cmsg, it is not possible to avoid receiving file descriptors via SCM_RIGHTS. This series introduces a new socket option, SO_PASSRIGHTS, to allow disabling SCM_RIGHTS. The option is enabled by default. See patch 8 for background/context. This series is related to [0], but is split into a separate series, as most of the patches are specific to af_unix. The v2 of the BPF LSM extension part will be posted later, once this series is merged into net-next and has landed in bpf-next. [0]: https://lore.kernel.org/bpf/20250505215802.48449-1-kuniyu@amazon.com/ Changes: v5: * Patch 4 * Fix BPF selftest failure (setget_sockopt.c) v4: https://lore.kernel.org/netdev/20250515224946.6931-1-kuniyu@amazon.com/ * Patch 6 * Group sk->sk_scm_XXX bits by struct * Patch 9 * Remove errno handling v3: https://lore.kernel.org/netdev/20250514165226.40410-1-kuniyu@amazon.com/ * Patch 3 * Remove inline in scm.c * Patch 4 & 5 & 8 * Return -EOPNOTSUPP in getsockopt() * Patch 5 * Add CONFIG_SECURITY_NETWORK check for SO_PASSSEC * Patch 6 * Add kdoc for sk_scm_unused * Update sk_scm_XXX under lock_sock() in setsockopt() * Patch 7 * Update changelog (recent change -> aed6ecef55d7) v2: https://lore.kernel.org/netdev/20250510015652.9931-1-kuniyu@amazon.com/ * Added patch 4 & 5 to reuse sk_txrehash for scm_recv() flags v1: https://lore.kernel.org/netdev/20250508013021.79654-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit 431e2b874e417b557f236199bdcc520e6e9ddb28 Author: Kuniyuki Iwashima Date: Mon May 19 13:58:00 2025 -0700 selftest: af_unix: Test SO_PASSRIGHTS. scm_rights.c has various patterns of tests to exercise GC. Let's add cases where SO_PASSRIGHTS is disabled. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 77cbe1a6d8730a07f99f9263c2d5f2304cf5e830 Author: Kuniyuki Iwashima Date: Mon May 19 13:57:59 2025 -0700 af_unix: Introduce SO_PASSRIGHTS. As long as recvmsg() or recvmmsg() is used with cmsg, it is not possible to avoid receiving file descriptors via SCM_RIGHTS. This behaviour has occasionally been flagged as problematic, as it can be (ab)used to trigger DoS during close(), for example, by passing a FUSE-controlled fd or a hung NFS fd. For instance, as noted on the uAPI Group page [0], an untrusted peer could send a file descriptor pointing to a hung NFS mount and then close it. Once the receiver calls recvmsg() with msg_control, the descriptor is automatically installed, and then the responsibility for the final close() now falls on the receiver, which may result in blocking the process for a long time. Regarding this, systemd calls cmsg_close_all() [1] after each recvmsg() to close() unwanted file descriptors sent via SCM_RIGHTS. However, this cannot work around the issue at all, because the final fput() may still occur on the receiver's side once sendmsg() with SCM_RIGHTS succeeds. Also, even filtering by LSM at recvmsg() does not work for the same reason. Thus, we need a better way to refuse SCM_RIGHTS at sendmsg(). Let's introduce SO_PASSRIGHTS to disable SCM_RIGHTS. Note that this option is enabled by default for backward compatibility. Link: https://uapi-group.org/kernel-features/#disabling-reception-of-scm_rights-for-af_unix-sockets #[0] Link: https://github.com/systemd/systemd/blob/v257.5/src/basic/fd-util.c#L612-L628 #[1] Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3f84d577b79d2fce8221244f2509734940609ca6 Author: Kuniyuki Iwashima Date: Mon May 19 13:57:58 2025 -0700 af_unix: Inherit sk_flags at connect(). For SOCK_STREAM embryo sockets, the SO_PASS{CRED,PIDFD,SEC} options are inherited from the parent listen()ing socket. Currently, this inheritance happens at accept(), because these attributes were stored in sk->sk_socket->flags and the struct socket is not allocated until accept(). This leads to unintentional behaviour. When a peer sends data to an embryo socket in the accept() queue, unix_maybe_add_creds() embeds credentials into the skb, even if neither the peer nor the listener has enabled these options. If the option is enabled, the embryo socket receives the ancillary data after accept(). If not, the data is silently discarded. This conservative approach works for SO_PASS{CRED,PIDFD,SEC}, but would not for SO_PASSRIGHTS; once an SCM_RIGHTS with a hung file descriptor was sent, it'd be game over. To avoid this, we will need to preserve SOCK_PASSRIGHTS even on embryo sockets. Commit aed6ecef55d7 ("af_unix: Save listener for embryo socket.") made it possible to access the parent's flags in sendmsg() via unix_sk(other)->listener->sk->sk_socket->flags, but this introduces an unnecessary condition that is irrelevant for most sockets, accept()ed sockets and clients. Therefore, we moved SOCK_PASSXXX into struct sock. Let’s inherit sk->sk_scm_recv_flags at connect() to avoid receiving SCM_RIGHTS on embryo sockets created from a parent with SO_PASSRIGHTS=0. Note that the parent socket is locked in connect() so we don't need READ_ONCE() for sk_scm_recv_flags. Now, we can remove !other->sk_socket check in unix_maybe_add_creds() to avoid slow SOCK_PASS{CRED,PIDFD} handling for embryo sockets created from a parent with SO_PASS{CRED,PIDFD}=0. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 0e81cfd971dc4833c699dcd8924e54a5021bc4e8 Author: Kuniyuki Iwashima Date: Mon May 19 13:57:57 2025 -0700 af_unix: Move SOCK_PASS{CRED,PIDFD,SEC} to struct sock. As explained in the next patch, SO_PASSRIGHTS would have a problem if we assigned a corresponding bit to socket->flags, so it must be managed in struct sock. Mixing socket->flags and sk->sk_flags for similar options will look confusing, and sk->sk_flags does not have enough space on 32bit system. Also, as mentioned in commit 16e572626961 ("af_unix: dont send SCM_CREDENTIALS by default"), SOCK_PASSCRED and SOCK_PASSPID handling is known to be slow, and managing the flags in struct socket cannot avoid that for embryo sockets. Let's move SOCK_PASS{CRED,PIDFD,SEC} to struct sock. While at it, other SOCK_XXX flags in net.h are grouped as enum. Note that assign_bit() was atomic, so the writer side is moved down after lock_sock() in setsockopt(), but the bit is only read once in sendmsg() and recvmsg(), so lock_sock() is not needed there. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 7d8d93fdde50b86bbbf46a203c368ed320e729ab Author: Kuniyuki Iwashima Date: Mon May 19 13:57:56 2025 -0700 net: Restrict SO_PASS{CRED,PIDFD,SEC} to AF_{UNIX,NETLINK,BLUETOOTH}. SCM_CREDENTIALS and SCM_SECURITY can be recv()ed by calling scm_recv() or scm_recv_unix(), and SCM_PIDFD is only used by scm_recv_unix(). scm_recv() is called from AF_NETLINK and AF_BLUETOOTH. scm_recv_unix() is literally called from AF_UNIX. Let's restrict SO_PASSCRED and SO_PASSSEC to such sockets and SO_PASSPIDFD to AF_UNIX only. Later, SOCK_PASS{CRED,PIDFD,SEC} will be moved to struct sock and united with another field. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit ae4f2f59e1f9c7c9cab1641a3c9645e587f0bc72 Author: Kuniyuki Iwashima Date: Mon May 19 13:57:55 2025 -0700 tcp: Restrict SO_TXREHASH to TCP socket. sk->sk_txrehash is only used for TCP. Let's restrict SO_TXREHASH to TCP to reflect this. Later, we will make sk_txrehash a part of the union for other protocol families. Note that we need to modify BPF selftest not to get/set SO_TEREHASH for non-TCP sockets. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 38b95d588f8fd07027ad8dbca3e1d2b5c13413ae Author: Kuniyuki Iwashima Date: Mon May 19 13:57:54 2025 -0700 scm: Move scm_recv() from scm.h to scm.c. scm_recv() has been placed in scm.h since the pre-git era for no particular reason (I think), which makes the file really fragile. For example, when you move SOCK_PASSCRED from include/linux/net.h to enum sock_flags in include/net/sock.h, you will see weird build failure due to terrible dependency. To avoid the build failure in the future, let's move scm_recv(_unix())? and its callees to scm.c. Note that only scm_recv() needs to be exported for Bluetooth. scm_send() should be moved to scm.c too, but I'll revisit later. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3041bbbeb41b807d2e24d7d78d9cc1387d95898a Author: Kuniyuki Iwashima Date: Mon May 19 13:57:53 2025 -0700 af_unix: Don't pass struct socket to maybe_add_creds(). We will move SOCK_PASS{CRED,PIDFD,SEC} from struct socket.flags to struct sock for better handling with SOCK_PASSRIGHTS. Then, we don't need to access struct socket in maybe_add_creds(). Let's pass struct sock to maybe_add_creds() and its caller queue_oob(). While at it, we append the unix_ prefix and fix double spaces around the pid assignment. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 350d4546295949c8a29e345b340e57772813037a Author: Kuniyuki Iwashima Date: Mon May 19 13:57:52 2025 -0700 af_unix: Factorise test_bit() for SOCK_PASSCRED and SOCK_PASSPIDFD. Currently, the same checks for SOCK_PASSCRED and SOCK_PASSPIDFD are scattered across many places. Let's centralise the bit tests to make the following changes cleaner. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 35de409aa30269a3b106fe957a95f7a2b7e21a60 Author: Herbert Xu Date: Fri May 23 17:20:59 2025 +0800 Revert "crypto: testmgr - Add hash export format testing" This reverts commit 18c438b228558e05ede7dccf947a6547516fc0c7. The s390 hmac and sha3 algorithms are failing the test. Revert the change until they have been fixed. Reported-by: Ingo Franzki Link: https://lore.kernel.org/all/623a7fcb-b4cb-48e6-9833-57ad2b32a252@linux.ibm.com/ Signed-off-by: Herbert Xu commit 4e83ae6ec87dddac070ba349d3b839589b1bb957 Author: Christian Brauner Date: Fri May 23 10:47:06 2025 +0200 mips, net: ensure that SOCK_COREDUMP is defined For historical reasons mips has to override the socket enum values but the defines are all the same. So simply move the ARCH_HAS_SOCKET_TYPES scope. Fixes: a9194f88782a ("coredump: add coredump socket") Suggested-by: Arnd Bergmann Signed-off-by: Christian Brauner commit db26d62d79e4068934ad0dccdb92715df36352b9 Author: David Howells Date: Fri May 23 08:57:52 2025 +0100 netfs: Fix undifferentiation of DIO reads from unbuffered reads On cifs, "DIO reads" (specified by O_DIRECT) need to be differentiated from "unbuffered reads" (specified by cache=none in the mount parameters). The difference is flagged in the protocol and the server may behave differently: Windows Server will, for example, mandate that DIO reads are block aligned. Fix this by adding a NETFS_UNBUFFERED_READ to differentiate this from NETFS_DIO_READ, parallelling the write differentiation that already exists. cifs will then do the right thing. Fixes: 016dc8516aec ("netfs: Implement unbuffered/DIO read support") Signed-off-by: David Howells Link: https://lore.kernel.org/3444961.1747987072@warthog.procyon.org.uk Reviewed-by: "Paulo Alcantara (Red Hat)" Reviewed-by: Viacheslav Dubeyko cc: Steve French cc: netfs@lists.linux.dev cc: v9fs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 2b2805404c926b8dcd5c5c13d240722da714906e Author: Arnd Bergmann Date: Tue May 20 17:25:45 2025 +0200 i2c: mlxbf: avoid 64-bit division The 64-bit division in mlxbf_i2c_get_ticks() causes link failures when compile-testing on 32-bit machines: ERROR: modpost: "__udivdi3" [drivers/i2c/busses/i2c-mlxbf.ko] undefined! Change this to a div_u64(), which should replace the constant division with a a multiply/shift combination in the mlxbf_i2c_get_ticks(). The frequency calculation functions require a slow library call but should be used much rarer. Fixes: 053859002c20 ("i2c: mlxbf: Allow build with COMPILE_TEST") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250520152600.1975628-1-arnd@kernel.org Signed-off-by: Andi Shyti commit 3b7d8d151a7ebebc5257766110c102ab173b5844 Author: Enrico Zanda Date: Tue May 13 23:02:47 2025 +0200 i2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250513210246.528370-2-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit bdf4442f4c7e8feb0733ee4de4d4ff7aa8b1c11d Author: Heikki Krogerus Date: Tue May 13 15:40:15 2025 +0300 i2c: designware: Don't warn about missing get_clk_rate_khz Converting the WARN_ON() to a dev_dbg() message in i2c_dw_clk_rate(). That removes the need to supply a dummy implementation for the callback (or alternatively a dummy clk device) when the fallback path is preferred where the existing values already in the clock registers are used - when a firmware has programmed the clock registers. The fallback path was introduced in commit 4fec76e0985c ("i2c: designware: Fix wrong setting for {ss,fs,hs}_{h,l}cnt registers"). Signed-off-by: Heikki Krogerus Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250513124015.2568924-1-heikki.krogerus@linux.intel.com Signed-off-by: Andi Shyti commit 2fe2b969d911a09abcd6a47401a3c66c38a310e6 Author: Tan En De Date: Sat Apr 12 10:33:03 2025 +0800 i2c: designware: Invoke runtime suspend on quick slave re-registration Replaced pm_runtime_put() with pm_runtime_put_sync_suspend() to ensure the runtime suspend is invoked immediately when unregistering a slave. This prevents a race condition where suspend was skipped when unregistering and registering slave in quick succession. For example, consider the rapid sequence of `delete_device -> new_device -> delete_device -> new_device`. In this sequence, it is observed that the dw_i2c_plat_runtime_suspend() might not be invoked after `delete_device` operation. This is because after `delete_device` operation, when the pm_runtime_put() is about to trigger suspend, the following `new_device` operation might race and cancel the suspend. If that happens, during the `new_device` operation, dw_i2c_plat_runtime_resume() is skipped (since there was no suspend), which means `i_dev->init()`, i.e. i2c_dw_init_slave(), is skipped. Since i2c_dw_init_slave() is skipped, i2c_dw_configure_fifo_slave() is skipped too, which leaves `DW_IC_INTR_MASK` unconfigured. If we inspect the interrupt mask register using devmem, it will show as zero. Example shell script to reproduce the issue: ``` #!/bin/sh SLAVE_LADDR=0x1010 SLAVE_BUS=13 NEW_DEVICE=/sys/bus/i2c/devices/i2c-$SLAVE_BUS/new_device DELETE_DEVICE=/sys/bus/i2c/devices/i2c-$SLAVE_BUS/delete_device # Create initial device echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE sleep 2 # Rapid sequence of # delete_device -> new_device -> delete_device -> new_device echo $SLAVE_LADDR > $DELETE_DEVICE echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE echo $SLAVE_LADDR > $DELETE_DEVICE echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE # Using devmem to inspect IC_INTR_MASK will show as zero ``` Signed-off-by: Tan En De Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250412023303.378600-1-ende.tan@starfivetech.com Signed-off-by: Andi Shyti commit e981364d89bff9d41583e2281d40e5c82d5e7c5d Author: Chris Babroski Date: Tue May 6 19:30:59 2025 +0000 i2c-mlxbf: Improve I2C bus timing configuration Update the I2C bus timing configuration on BlueField to match the configuration recommended and verified by the HW team. I2C block read failures were found on BlueField 3 during communication with a device that requires the use of repeated start conditions. Testing showed that these failures were caused by the I2C transaction getting aborted early due to a short bus "timeout" configuration value. This value determines how long the clock can be held low before the I2C transaction is aborted. Upon further inspection, it was also found that other I2C bus timing configuration values used by the kernel driver do not match the configuration that is recommended by the HW team and used in the BlueField BSP I2C drivers. Signed-off-by: Chris Babroski Reviewed-by: Asmaa Mnebhi Reviewed-by: Khalil Blaiech Link: https://lore.kernel.org/r/20250506193059.321345-2-cbabroski@nvidia.com Signed-off-by: Andi Shyti commit 6bdc662c05c5b0061dfb083e78ce67d86d60dc02 Author: Chris Babroski Date: Tue May 6 19:30:58 2025 +0000 i2c-mlxbf: Add repeated start condition support Add support for SMBus repeated start conditions to the Mellanox I2C driver. This support is specifically enabled for the I2C_FUNC_SMBUS_WRITE_I2C_BLOCK implementation which is required for communication with a specific I2C device on BlueField 3. Signed-off-by: Chris Babroski Reviewed-by: Asmaa Mnebhi Reviewed-by: Khalil Blaiech Link: https://lore.kernel.org/r/20250506193059.321345-1-cbabroski@nvidia.com Signed-off-by: Andi Shyti commit 24d9f60505208b6031f14e89963e668127919e3a Author: Enrico Zanda Date: Sun May 11 22:39:21 2025 +0200 i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250511203920.325704-2-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit 29b0b4ce6417b29bbcaabfa05fbe88e0a88b08f6 Author: Alexey Charkov Date: Tue May 6 14:38:15 2025 +0400 dt-bindings: i2c: i2c-wmt: Convert to YAML Rewrite the textual description for the WonderMedia I2C controller as YAML schema, and switch the filename to follow the compatible string. The controller only supports two bus speeds (100kHz and 400kHz) so restrict clock-frequency values accordingly. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250506-vt8500-i2c-binding-v3-1-401c3e090a88@gmail.com Signed-off-by: Andi Shyti commit d6ceb4053826361d3561c49cff8d55f849ac1492 Author: prashanth kumar burujukindi Date: Wed Apr 30 12:23:39 2025 +0100 i2c: microchip-corei2c: add smbus support Add hardware support for the SMBUS commands smbus_quick, smbus_byte, smbus_byte_data, smbus_word_data and smbus_block_data, replacing the fallback to software emulation Signed-off-by: prashanth kumar burujukindi Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20250430-preview-dormitory-85191523283d@spud Signed-off-by: Andi Shyti commit 053859002c20f6b8475343fdf04a0eaca34bb3f4 Author: Andi Shyti Date: Mon May 5 23:58:54 2025 +0200 i2c: mlxbf: Allow build with COMPILE_TEST Extend the Kconfig dependency to include COMPILE_TEST so the Mellanox BlueField I2C driver can be built on non-ARM64 platforms for compile testing purposes. Signed-off-by: Andi Shyti Cc: Khalil Blaiech Cc: Asmaa Mnebhi Link: https://lore.kernel.org/r/20250505215854.2896383-1-andi.shyti@kernel.org commit 66e64b457c238cc8f43870b3ff137b7d660fdb81 Author: Geert Uytterhoeven Date: Tue May 6 15:02:06 2025 +0200 i2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP The AMD Image Signal Processor I2C functionality is only present on AMD platforms with ISP support, and its platform device is instantiated by the AMD ISP driver. Hence add a dependency on DRM_AMD_ISP, to prevent asking the user about this driver when configuring a kernel that does not support the AMD ISP. Fixes: d6263c468a76 ("i2c: amd-isp: Add ISP i2c-designware driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Pratap Nirujogi Link: https://lore.kernel.org/r/3888f892b8c4d8c8acd17e56581e726ace7f7092.1746536495.git.geert+renesas@glider.be Signed-off-by: Andi Shyti commit 34c5f34df95f71fc500ff0e942210ebc97d2ef65 Author: Dr. David Alan Gilbert Date: Fri May 9 18:35:20 2025 +0100 mfd: sm501: Remove unused sm501_find_clock sm501_find_clock() was added in 2007 as part of commit b6d6454fdb66 ("[PATCH] mfd: SM501 core driver") but hasn't been used. Remove it. Signed-off-by: "Dr. David Alan Gilbert" Link: https://lore.kernel.org/r/20250509173521.49596-1-linux@treblig.org Signed-off-by: Lee Jones commit 950a3c38f73d8167409b2d229ce5139b2be4eff7 Author: Christophe JAILLET Date: Sun May 11 22:42:30 2025 +0200 mfd: 88pm886: Constify struct regmap_irq_chip and some other structures 'struct regmap_irq_chip' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security, especially when the structure holds some function pointers. While at it, also constify some other structures. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 5032 3304 64 8400 20d0 drivers/mfd/88pm886.o After: ===== text data bss dec hex filename 5800 2536 64 8400 20d0 drivers/mfd/88pm886.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/1681629840761e30494cb8920668710df60a81b8.1746996137.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit bdc76c19db1b969d3d7d5da9cccfb39c6bbe6a5c Author: Nícolas F. R. A. Prado Date: Fri May 2 12:43:21 2025 -0400 dt-bindings: mfd: syscon: Add mediatek,mt8365-infracfg-nao The register space described by DT node of compatible mediatek,mt8365-infracfg-nao exposes a variety of unrelated registers, including registers for controlling bus protection on the MT8365 SoC, which is used by the power domain controller through a syscon. Add this compatible to the syscon binding. Signed-off-by: Nícolas F. R. A. Prado Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250502-mt8365-infracfg-nao-compatible-v1-1-e40394573f98@collabora.com Signed-off-by: Lee Jones commit 37ef4aa4039c42f4b15dc7e40d3e437b7f031522 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:16 2025 +0200 mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-8-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit 82ae581e56c36dbaee4e8da12d52018eeca01d4a Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:15 2025 +0200 mfd: rt5033: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-7-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit fd37695dae093533d444237c86c3181a7339abb4 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:14 2025 +0200 mfd: max8925: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-6-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit a59a56cc4fb1f7d101f7ce1f5396ceaa2e304b71 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:13 2025 +0200 mfd: max77705: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-5-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit 6c7115cdf6440e1e2f15e21efe92e2b757940627 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:12 2025 +0200 mfd: max77541: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-4-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit d905d06e64b0eb3da43af6186c132f5282197998 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:11 2025 +0200 mfd: max14577: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-3-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit 2c8294c9aaa0f799c440d10e3582ef410be881bd Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:10 2025 +0200 mfd: as3722: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-2-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit 6d0b2398b2638208d68ba06601f776cd5d983b75 Author: Krzysztof Kozlowski Date: Sun Apr 6 21:50:09 2025 +0200 mfd: 88pm886: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Karel Balej Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-1-318e14bdba0a@linaro.org Signed-off-by: Lee Jones commit 54a425bd3f5b1bb9152bd10b0a125c392012b08a Author: Krzysztof Kozlowski Date: Thu May 1 16:51:27 2025 +0200 dt-bindings: mfd: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. While re-indenting, drop unused labels. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501145125.59952-4-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit f9a9ad91da2d0fea42b30cde63f993f85f9702d1 Author: Krzysztof Kozlowski Date: Thu May 1 16:51:26 2025 +0200 dt-bindings: mfd: Drop unrelated nodes from DTS example Binding example should not contain other nodes, e.g. consumers of resource providers, because this is completely redundant and adds unnecessary bloat. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501145125.59952-3-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 70becbeb7f064a47a1d02ea9b1443be17f4de7af Author: Dmitry Baryshkov Date: Fri Apr 25 20:47:03 2025 +0300 dt-bindings: mfd: syscon: Add qcom,apq8064-sps-sic Add compat for Smart Peripheral System (SPS) Interrupt Controller (SIC) present on Qualcomm APQ8064 SoC. Signed-off-by: Dmitry Baryshkov Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250425-fix-nexus-4-v3-3-da4e39e86d41@oss.qualcomm.com Signed-off-by: Lee Jones commit 6d31da9b65006912757cdc48a0e6e91665344865 Author: Dmitry Baryshkov Date: Fri Apr 25 20:47:02 2025 +0300 dt-bindings: mfd: syscon: Add qcom,apq8064-mmss-sfpb Add compat string for Qualcomm MultiMedia SubSystem System FPB. Signed-off-by: Dmitry Baryshkov Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250425-fix-nexus-4-v3-2-da4e39e86d41@oss.qualcomm.com Signed-off-by: Lee Jones commit 59d60c16ed41475f3b5f7b605e75fbf8e3628720 Author: Alexey Gladkov Date: Sat Apr 26 18:16:32 2025 +0200 mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE The name used in the macro does not exist. drivers/mfd/stmpe-spi.c:132:26: error: use of undeclared identifier 'stmpe_id' 132 | MODULE_DEVICE_TABLE(spi, stmpe_id); Fixes: e789995d5c61 ("mfd: Add support for STMPE SPI interface") Signed-off-by: Alexey Gladkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/79d5a847303e45a46098f2d827d3d8a249a32be3.1745591072.git.legion@kernel.org Signed-off-by: Lee Jones commit 401c16f0b47e4f2c1dd7ba95844ac7f2494d9b06 Author: Frank Wunderlich Date: Tue Apr 22 15:24:28 2025 +0200 dt-bindings: mfd: syscon: Add mt7988-topmisc Add compatible for Mediatek mt7988 topmisc syscon. This hardware block contains 2 functional blocks - a powercontroller which is not needed (switched by atf) - a multiplexer for high-speed Combo-Phy This compatible is only for the multiplexer part. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-6-linux@fw-web.de Signed-off-by: Lee Jones commit f41cc37f4bc0e8cd424697bf6e26586cadcf4b9b Author: Christophe JAILLET Date: Mon Apr 21 17:00:35 2025 +0200 mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe() If devm_of_platform_populate() fails, some clean-up needs to be done, as already done in the remove function. Add a new devm_add_action_or_reset() to fix the leak in the probe and remove the need of a remove function. Fixes: c695abab2429 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/69471e839efc0249a504492a8de3497fcdb6a009.1745247209.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit b70b84556eeca5262d290e8619fe0af5b7664a52 Author: Christophe JAILLET Date: Mon Apr 21 17:00:34 2025 +0200 mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove() exynos_lpass_disable() is called twice in the remove function. Remove one of these calls. Fixes: 90f447170c6f ("mfd: exynos-lpass: Add runtime PM support") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/74d69e8de10308c9855db6d54155a3de4b11abfd.1745247209.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit 484f0f59f09edd1f6fa63703c12eb30d72a519ac Author: Christophe JAILLET Date: Mon Apr 21 17:00:33 2025 +0200 mfd: exynos-lpass: Fix an error handling path in exynos_lpass_probe() If an error occurs after a successful regmap_init_mmio(), regmap_exit() should be called as already done in the .remove() function. Switch to devm_regmap_init_mmio() to avoid the leak and simplify the .remove() function. Fixes: c414df12bdf7 ("mfd: exynos-lpass: Add missing remove() function") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/38414eecb1096840946756ae86887aea2a489c1b.1745247209.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit 9bc2d48514a584af85292da181cc9a4fd6c39f31 Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:25 2025 +0200 dt-bindings: mfd: mediatek,mt8195-scpsys: Add support for MT6893 Add a compatible string for the scpsys block found in the MediaTek Dimensity 1200 (MT6893) SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250416120225.147826-1-angelogioacchino.delregno@collabora.com Signed-off-by: Lee Jones commit 9282dc393d6b0436233a336d4904e6003f4e4435 Author: André Draszik Date: Wed Apr 9 21:37:53 2025 +0100 MAINTAINERS: add myself as reviewer for Samsung S2M MFD I'm working on a Samsung device which includes this MFD and would like to be Cc'ed to further contributions and help on reviewing them. Add me as reviewer. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-32-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 217c445c40c0a83854504d7167d7db707717bcb2 Author: André Draszik Date: Wed Apr 9 21:37:44 2025 +0100 mfd: sec: Add myself as module author Add myself as module author, so people know whom to complain to about after the recent updates. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-23-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 10008dcc623441acb3bdb67069ee8d62c2aa79f1 Author: André Draszik Date: Wed Apr 9 21:37:43 2025 +0100 mfd: sec-irq: Convert to using REGMAP_IRQ_REG() macros Use REGMAP_IRQ_REG macro helpers instead of open coding. This makes the code a bit shorter and more obvious. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-22-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 55684cbb537c02a027a0948220450f5b37db1e70 Author: André Draszik Date: Wed Apr 9 21:37:42 2025 +0100 mfd: sec-common: Convert to using MFD_CELL macros Use MFD_CELL macro helpers instead of open coding. This makes the code a bit shorter and more obvious. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-21-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 2b897a1c2b667fce1fd9dcf318dbab5992c3e506 Author: André Draszik Date: Wed Apr 9 21:37:41 2025 +0100 mfd: sec-common: Use sizeof(*var), not sizeof(struct type_of_var) Using sizeof(*var) is generally preferred over using the size of its open-coded type when allocating memory. This helps avoiding bugs when the variable type changes but the memory allocation isn't updated, and it simplifies renaming of the struct if ever necessary. No functional change. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-20-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 856c6514d5ab491a5ad4be6e797d0d5283ad51aa Author: André Draszik Date: Wed Apr 9 21:37:40 2025 +0100 mfd: sec: Don't compare against NULL / 0 for errors, use ! Follow general style and use if (!arg) instead of comparing against NULL. While at it, drop a useless init in sec-irq.c. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-19-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit adf91d9e1983dec3d5fabc273e8ff89918b852c1 Author: André Draszik Date: Wed Apr 9 21:37:39 2025 +0100 mfd: sec: Change device_type to int Now that sec-i2c doesn't match device type by pointer casting anymore, we can switch the device type from unsigned long to int easily. This saves a few bytes in struct sec_pmic_dev due to member alignment. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-18-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit aaaeae7e2ad1574fad3c68e249f02fa87a600516 Author: André Draszik Date: Wed Apr 9 21:37:38 2025 +0100 mfd: sec-i2c: Rework platform data and regmap instantiating Instead of a large open-coded switch statement, just add both regmap config and device type to the OF match data. This allows us to have all related information in one place, and avoids a long switch() statement. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-17-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 0c33784aeaeb8867682e520bf28042b6ffce200a Author: André Draszik Date: Wed Apr 9 21:37:37 2025 +0100 mfd: sec-common: Don't ignore errors from sec_irq_init() sec_irq_init() can fail, we shouldn't continue and ignore the error in that case, but actually error out. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-16-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit fcc7f3b675b26c81ba07dc35eb849e6ea9afce7f Author: André Draszik Date: Wed Apr 9 21:37:36 2025 +0100 mfd: sec-irq: s2dos05 doesn't support interrupts The commit bf231e5febcf ("mfd: sec-core: Add support for the Samsung s2dos05") adding s2dos05 support didn't add anything related to IRQ support, so I assume this works without IRQs. Rather than printing a warning message in sec_irq_init() due to the missing IRQ number, or returning an error due to a missing irq chip regmap, just return early explicitly. This will become particularly important once errors from sec_irq_init() aren't ignored anymore in an upcoming patch and helps the reader of this code while reasoning about what the intention might be here. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-15-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 1cea1b6b2c89ef67ebd09e43d85d7308f86a538c Author: André Draszik Date: Wed Apr 9 21:37:35 2025 +0100 mfd: sec-i2c: s2dos05/s2mpu05: Use explicit regmap config and drop default When support for PMICs without compatibles was removed in commit f736d2c0caa8 ("mfd: sec: Remove PMICs without compatibles"), sec_regmap_config effectively became an orphan, because S5M8763X was the only user left of it before removal, using the default: case of the switch statement. When s2dos05 and s2mpu05 support was added in commit bf231e5febcf ("mfd: sec-core: Add support for the Samsung s2dos05") and commit ed33479b7beb ("mfd: sec: Add support for S2MPU05 PMIC"), they ended up using that orphaned regmap_config in a non-obvious way due to the default: case of the device type switch matching statement taking effect again. To make things more obvious, and to help the reader of this code while reasoning about what the intention might be here, and to ensure future additions to support new devices in this driver don't forget to add a regmap config, add an explicit regmap config for these two devices, and completely remove the generic regmap config as it becomes an orphan again that shouldn't be used by any device. Note that this commit doesn't fix the issue that s2dos05_regmap_config ands2mpu05_regmap_config really are incomplete, but I have no documentation on them. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-14-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 176a30687bb5bd5c401ee1142381841988386e6e Author: André Draszik Date: Wed Apr 9 21:37:34 2025 +0100 mfd: sec: Use dev_err_probe() where appropriate dev_err_probe() exists to simplify code and harmonise error messages, there's no reason not to use it here. While at it, harmonise some error messages. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-13-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit ada2b490c72bf6521aab135ba6e866639f9b0220 Author: André Draszik Date: Wed Apr 9 21:37:33 2025 +0100 mfd: sec-i2c: Sort struct of_device_id entries and the device type switch Sort struct of_device_id entries and the device type switch in _probe() alphabetically, which makes it easier to find the right place where to insert new entries in the future. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-12-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit d58b81c436f00259019ad11f2a9af19d84496de3 Author: André Draszik Date: Wed Apr 9 21:37:32 2025 +0100 mfd: sec-common: Fix multiple trivial whitespace issues Rectify a couple of alignment problems reported by Checkpatch. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-11-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit b355f0cb92bd5e48d850e32960ac18fb1394cf8e Author: André Draszik Date: Wed Apr 9 21:37:31 2025 +0100 mfd: sec: Merge separate core and irq modules There is no reason to have these two kernel modules separate. Having them merged into one kernel module also slightly reduces memory consumption and module load times a little. mapped size (lsmod): before: after: sec_core 20480 sec_core 24576 sec_irq 16384 ---------------- total 36864 Section sizes (size -A): before: after: sec_core 6780 sec_core 13239 sec_irq 8046 ---------------- Total 14826 Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-10-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 5338709089b75f57a9b3b7b17a0424ecab5f2fd8 Author: André Draszik Date: Wed Apr 9 21:37:30 2025 +0100 mfd: sec: Add support for S2MPG10 PMIC Add support for Samsung's S2MPG10 PMIC, which is a Power Management IC for mobile applications with buck converters, various LDOs, power meters, RTC, clock outputs, and additional GPIOs interfaces. Contrary to existing Samsung S2M series PMICs supported, communication is not via I2C, but via the Samsung ACPM firmware. This commit adds the core driver. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-9-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 680ef57915db0f715e99a683c15f0f9f7c700e64 Author: André Draszik Date: Wed Apr 9 21:37:29 2025 +0100 mfd: sec: Split into core and transport (i2c) drivers As a preparation for adding support for Samsung's S2MPG10, which is connected via SPEEDY / ACPM rather than I2C, split out (move) all I2C-specific driver code into its own kernel module, sec-i2c, and make the existing sec-core module be just the transport-agnostic core driver kernel module. At the same time, update all defconfigs that reference the old kconfig symbol name. While at it, also update file header comments and module description(s) to drop references to 'mfd', and update comments to be C-style, not C++. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-8-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 8b88b5e4d58151d8a37250afc978f253cd8cc4fb Author: André Draszik Date: Wed Apr 9 21:37:28 2025 +0100 mfd: sec: Move private internal API to internal header sec_irq_init() is an internal API for the core driver, and doesn't belong into the public header. Due to an upcoming split of the driver into a core and i2c driver, we'll also be adding more internal APIs, which again shouldn't be in the public header. Move it into a new internal include. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-7-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 5bef1b7f10a81b61863f11aaa146a773cbc64e61 Author: André Draszik Date: Wed Apr 9 21:37:27 2025 +0100 mfd: sec: Update includes to add missing and remove superfluous ones This driver misses to include some of the respective headers of some of the APIs used. It also includes headers that aren't needed (e.g. due to previous driver rework where includes weren't updated). It is good practice to directly include all headers used, which avoids implicit dependencies and spurious build breakage if someone rearranged headers, as this could cause the implicit includes to be dropped. Include the relevant headers explicitly and drop superfluous ones. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-6-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 271dc4fbede4274d0729eec10a33bd772df2837a Author: André Draszik Date: Wed Apr 9 21:37:26 2025 +0100 mfd: sec: Sort includes alphabetically Sorting headers alphabetically helps locating duplicates, and makes it easier to figure out where to insert new headers. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-5-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit b3379422b460ea8c0556df300d547d63e5569cda Author: André Draszik Date: Wed Apr 9 21:37:25 2025 +0100 mfd: sec-core: Drop non-existing forward declarations sec_irq_resume() was removed in commit 6445b84abf91 ("mfd: Add s2mps11 irq driver") and sec_irq_exit() in commit 3dc6f4aaafbe ("mfd: sec: Use devm_mfd_add_devices and devm_regmap_add_irq_chip") while the prototypes were left. They should be removed. Do so. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-4-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 72d856ee1927442cefe97a159fde347e59555f88 Author: André Draszik Date: Wed Apr 9 21:37:22 2025 +0100 dt-bindings: mfd: samsung,s2mps11: add s2mpg10 The Samsung S2MPG10 PMIC is similar to the existing PMICs supported by this binding. It is a Power Management IC for mobile applications with buck converters, various LDOs, power meters, RTC, clock outputs, and additional GPIOs interfaces. Unlike other Samsung PMICs, communication is not via I2C, but via the Samsung ACPM firmware, it therefore doesn't need a 'reg' property but needs to be a child of the ACPM firmware node instead. S2MPG10 can also act as a system power controller allowing implementation of a true cold-reset of the system. Support for the other components like regulators and power meters will be added in subsequent future patches. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-1-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones commit 20e805cec0641697079a5d41f732573d7eb9be01 Author: Ryan Wanner Date: Mon Apr 14 14:41:25 2025 -0700 dt-bindings: mfd: syscon: Add microchip,sama7d65-secumod Add SAMA7D65 SECUMOD compatible string to DT bindings documentation. Signed-off-by: Ryan Wanner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/2fdd14313d9cf008dbc4a63a91ba0cb5cf372ad6.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Lee Jones commit f7c636be96a151ce86f9291bed31145b61e50261 Author: Ryan Wanner Date: Mon Apr 14 14:41:24 2025 -0700 dt-bindings: mfd: syscon: atmel,sama5d2-secumod: Convert to yaml Convert Microchip AT91 secumod to YAML format. Signed-off-by: Ryan Wanner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/a999a719a652ec834f1176d69a3e9b207cbd63e6.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Lee Jones commit 9c998b9d3128d6def5f0517342714c0721042462 Author: Ryan Wanner Date: Mon Apr 14 14:41:23 2025 -0700 dt-bindings: mfd: atmel: Add microchip,sama7d65-gpbr Add SAMA7D65 GPBR compatible to DT bindings documentation. Signed-off-by: Ryan Wanner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/ddbcb306699b8c09f3210d714c0701afa1a7cb96.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Lee Jones commit cf5c739af8ff024a211ece4381ea71874428607b Author: Bartosz Golaszewski Date: Mon Apr 7 09:24:15 2025 +0200 mfd: ucb1x00: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-mfd-v1-3-43f4d86d01d1@linaro.org Signed-off-by: Lee Jones commit 651974212cacef4ad24c4f97d52b6761f2219e96 Author: Bartosz Golaszewski Date: Mon Apr 7 09:24:14 2025 +0200 mfd: tps65010: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-mfd-v1-2-43f4d86d01d1@linaro.org Signed-off-by: Lee Jones commit 3745b5ca35298885035fd5e3a133be7292cbe2fc Author: Bartosz Golaszewski Date: Mon Apr 7 09:24:13 2025 +0200 mfd: sm501: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-mfd-v1-1-43f4d86d01d1@linaro.org Signed-off-by: Lee Jones commit ba1a455393c430c97235cb593d40a3ea7ad8acca Author: Artur Weber Date: Sun Mar 16 19:18:52 2025 +0100 mfd: bcm590xx: Drop unused "id" member of bcm590xx struct The "id" member of the bcm590xx struct is unused and will be confusing once we add an actual PMU ID storage value. Drop it; a replacement will be introduced in a future commit. Signed-off-by: Artur Weber Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250316-bcm59054-v7-4-4281126be1b8@gmail.com Signed-off-by: Lee Jones commit 879ede53958f7bab79a88888f77e0ca91f0f77da Author: Aradhya Bhatia Date: Fri May 16 12:43:55 2025 +0000 drm/xe: Default auto_link_downgrade status to false xe_pcode_read() can return back successfully without updating the variable 'val'. This can cause an arbitrary value to show up in the sysfs file. Allow the auto_link_downgrade_status to default to 0 to avoid any arbitrary value from coming up. Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes") Reviewed-by: Tejas Upadhyay Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250516124355.4872-1-aradhya.bhatia@intel.com Signed-off-by: Matt Roper (cherry picked from commit a7f87deac2295d11865048bcb9c2de369b52ed93) Signed-off-by: Thomas Hellström commit e22d7acf9f47b01c9a538f3dac5c8e8d46fbca96 Author: Aradhya Bhatia Date: Fri May 16 14:19:02 2025 +0000 drm/xe/guc: Make creation of SLPC debugfs files conditional Platforms that do not support SLPC are exempted from the GuC PC support. The GuC PC does not get initialized, and neither do its BOs get created. This causes a problem because the GuC PC debugfs file is still being created. Whenever the file is attempted to read, it causes a NULL pointer dereference on the supposed BO of the GuC PC. So, make the creation of SLPC debugfs files conditional to when SLPC features are supported. Fixes: aaab5404b16f ("drm/xe: Introduce GuC PC debugfs") Suggested-by: Matt Roper Reviewed-by: Tejas Upadhyay Reviewed-by: Stuart Summers Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250516141902.5614-1-aradhya.bhatia@intel.com Signed-off-by: Matt Roper (cherry picked from commit 17486cf3df5320752cc67ee8bcb2379d1b9de76c) Signed-off-by: Thomas Hellström commit 7f9bbc1140ff8796230bc2634055763e271fd692 Author: Stefano Stabellini Date: Mon May 12 14:54:52 2025 -0700 xen/arm: call uaccess_ttbr0_enable for dm_op hypercall dm_op hypercalls might come from userspace and pass memory addresses as parameters. The memory addresses typically correspond to buffers allocated in userspace to hold extra hypercall parameters. On ARM, when CONFIG_ARM64_SW_TTBR0_PAN is enabled, they might not be accessible by Xen, as a result ioreq hypercalls might fail. See the existing comment in arch/arm64/xen/hypercall.S regarding privcmd_call for reference. For privcmd_call, Linux calls uaccess_ttbr0_enable before issuing the hypercall thanks to commit 9cf09d68b89a. We need to do the same for dm_op. This resolves the problem. Cc: stable@kernel.org Fixes: 9cf09d68b89a ("arm64: xen: Enable user access before a privcmd hvc call") Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Message-ID: Signed-off-by: Juergen Gross commit 74287971dbb3fe322bb316afd9e7fb5807e23bee Author: Roger Pau Monne Date: Wed May 14 10:04:26 2025 +0200 xen/x86: fix initial memory balloon target When adding extra memory regions as ballooned pages also adjust the balloon target, otherwise when the balloon driver is started it will populate memory to match the target value and consume all the extra memory regions added. This made the usage of the Xen `dom0_mem=,max:` command line parameter for dom0 not work as expected, as the target won't be adjusted and when the balloon is started it will populate memory straight to the 'max:' value. It would equally affect domUs that have memory != maxmem. Kernels built with CONFIG_XEN_UNPOPULATED_ALLOC are not affected, because the extra memory regions are consumed by the unpopulated allocation driver, and then balloon_add_regions() becomes a no-op. Reported-by: John Fixes: 87af633689ce ('x86/xen: fix balloon target initialization for PVH dom0') Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Tested-by: Marek Marczykowski-Górecki Message-ID: <20250514080427.28129-1-roger.pau@citrix.com> Signed-off-by: Juergen Gross commit d24c6b78ac550072df359c17e6aadddf079257d0 Author: Roger Pau Monne Date: Wed May 14 11:20:36 2025 +0200 xen: enable XEN_UNPOPULATED_ALLOC as part of xen.config PVH dom0 is useless without XEN_UNPOPULATED_ALLOC, as otherwise it will very likely balloon out all dom0 memory to map foreign and grant pages. Enable it by default as part of xen.config. This also requires enabling MEMORY_HOTREMOVE and ZONE_DEVICE. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Message-ID: <20250514092037.28970-1-roger.pau@citrix.com> Signed-off-by: Juergen Gross commit 406251a408f51a5ff1b7d41a1d590b35aff5b0fa Author: John Ernberg Date: Mon May 12 07:14:50 2025 +0000 xen: swiotlb: Wire up map_resource callback When running Xen on iMX8QXP, an Arm SoC without IOMMU, DMA performed via its eDMA v3 DMA engine fail with a mapping error. The eDMA performs DMA between RAM and MMIO space, and it's the MMIO side that cannot be mapped. MMIO->RAM DMA access cannot be bounce buffered if it would straddle a page boundary and on Xen the MMIO space is 1:1 mapped for Arm, and x86 PV Dom0. Cases where MMIO space is not 1:1 mapped, such as x86 PVH Dom0, requires an IOMMU present to deal with the mapping. Considering the above the map_resource callback can just be wired to the existing dma_direct_map_resource() function. There is nothing to do for unmap so the unmap callback is not needed. Signed-off-by: John Ernberg Reviewed-by: Stefano Stabellini Message-ID: <20250512071440.3726697-1-john.ernberg@actia.se> Signed-off-by: Juergen Gross commit 0ffca606e902151fbe09d4356c493fe79ca93956 Author: Ian Rogers Date: Thu May 15 11:14:17 2025 -0700 perf pmu intel: Adjust cpumaks for sub-NUMA clusters on graniterapids On graniterapids the cache home agent (CHA) and memory controller (IMC) PMUs all have their cpumask set to per-socket information. In order for per NUMA node aggregation to work correctly the PMUs cpumask needs to be set to CPUs for the relevant sub-NUMA grouping. For example, on a 2 socket graniterapids machine with sub NUMA clustering of 3, for uncore_cha and uncore_imc PMUs the cpumask is "0,120" leading to aggregation only on NUMA nodes 0 and 3: ``` $ perf stat --per-node -e 'UNC_CHA_CLOCKTICKS,UNC_M_CLOCKTICKS' -a sleep 1 Performance counter stats for 'system wide': N0 1 277,835,681,344 UNC_CHA_CLOCKTICKS N0 1 19,242,894,228 UNC_M_CLOCKTICKS N3 1 277,803,448,124 UNC_CHA_CLOCKTICKS N3 1 19,240,741,498 UNC_M_CLOCKTICKS 1.002113847 seconds time elapsed ``` By updating the PMUs cpumasks to "0,120", "40,160" and "80,200" then the correctly 6 NUMA node aggregations are achieved: ``` $ perf stat --per-node -e 'UNC_CHA_CLOCKTICKS,UNC_M_CLOCKTICKS' -a sleep 1 Performance counter stats for 'system wide': N0 1 92,748,667,796 UNC_CHA_CLOCKTICKS N0 0 6,424,021,142 UNC_M_CLOCKTICKS N1 0 92,753,504,424 UNC_CHA_CLOCKTICKS N1 1 6,424,308,338 UNC_M_CLOCKTICKS N2 0 92,751,170,084 UNC_CHA_CLOCKTICKS N2 0 6,424,227,402 UNC_M_CLOCKTICKS N3 1 92,745,944,144 UNC_CHA_CLOCKTICKS N3 0 6,423,752,086 UNC_M_CLOCKTICKS N4 0 92,725,793,788 UNC_CHA_CLOCKTICKS N4 1 6,422,393,266 UNC_M_CLOCKTICKS N5 0 92,717,504,388 UNC_CHA_CLOCKTICKS N5 0 6,421,842,618 UNC_M_CLOCKTICKS 1.003406645 seconds time elapsed ``` In general, having the perf tool adjust cpumasks isn't desirable as ideally the PMU driver would be advertising the correct cpumask. Signed-off-by: Ian Rogers Tested-by: Kan Liang Tested-by: Weilin Wang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250515181417.491401-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9e893dab828577adb166cc2badfb4711f1cd6e4c Author: Arnaldo Carvalho de Melo Date: Thu May 22 19:01:47 2025 -0300 perf tests trace_summary.sh: Run in exclusive mode And it is being successfull only when running alone, probably because there are some tests that add the vfs_getname probe that gets used by 'perf trace' and alter how it does syscall arg pathname resolution. This should be removed or made a fallback to the preferred BPF mode of getting syscall parameters, but till then, run this in exclusive mode. For reference, here are some of the tests that run close to this one: 127: perf record offcpu profiling tests : Ok 128: perf all PMU test : Ok 129: perf stat --bpf-counters test : Ok 130: Check Arm CoreSight trace data recording and synthesized samples: Skip 131: Check Arm CoreSight disassembly script completes without errors : Skip 132: Check Arm SPE trace data recording and synthesized samples : Skip 133: Test data symbol : Ok 134: Miscellaneous Intel PT testing : Skip 135: test Intel TPEBS counting mode : Skip 136: perf script task-analyzer tests : Ok 137: Check open filename arg using perf trace + vfs_getname : Ok 138: perf trace summary : Ok Cc: Adrian Hunter Cc: Howard Chu Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/aC-hHTgArwlF_zu9@x1 Signed-off-by: Arnaldo Carvalho de Melo commit dd8633bd09bcd346fc3c38ce516e73083eb841a6 Author: Namhyung Kim Date: Thu May 22 07:25:51 2025 -0700 perf test: Add cgroup summary test case for 'perf trace' $ sudo ./perf test -vv 112 112: perf trace summary: --- start --- test child forked, pid 1018940 testing: perf trace -s -- true testing: perf trace -S -- true testing: perf trace -s --summary-mode=thread -- true testing: perf trace -S --summary-mode=total -- true testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true testing: perf trace -as --summary-mode=total --no-bpf-summary -- true testing: perf trace -as --summary-mode=thread --bpf-summary -- true testing: perf trace -as --summary-mode=total --bpf-summary -- true testing: perf trace -aS --summary-mode=total --bpf-summary -- true testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true ---- end(0) ---- 112: perf trace summary : Ok Reviewed-by: Howard Chu Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250522142551.1062417-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 59df607bf8b482588fae63fb3e1d666ed866f491 Author: Gautam Menghani Date: Mon May 19 12:51:44 2025 -0700 perf python: Add counting.py as example for counting perf events Add counting.py - a python version of counting.c to demonstrate measuring and reading of counts for given perf events. Committer testing: Build perf and make the generated python binding somewhere you can point to to avoid using the one in the distro python3-perf (fedora, may be different in other distros): $ make -k O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin Copy /tmp/build/perf-tools-next/python/perf.cpython-313-x86_64-linux-gnu.so to somewhere outside this toolbox container and then use it with root: # export PYTHONPATH=/root/python/ # ls -la /root/python/ total 10640 drwxr-xr-x. 1 root root 72 May 21 11:40 . dr-xr-x---. 1 root root 574 May 21 11:40 .. -rwxr-xr-x. 1 acme acme 10894360 May 21 11:40 perf.cpython-313-x86_64-linux-gnu.so # tools/perf/python/counting.py | head -5 For evsel(software/cpu-clock/) val: 2930946 enable: 2932479 run: 2932479 For evsel(software/cpu-clock/) val: 2924975 enable: 2926267 run: 2926267 For evsel(software/cpu-clock/) val: 2921017 enable: 2922430 run: 2922430 For evsel(software/cpu-clock/) val: 2914966 enable: 2916549 run: 2916549 For evsel(software/cpu-clock/) val: 2910027 enable: 2911589 run: 2911589 # Signed-off-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra [ make the API take a CPU and thread then compute from these the appropriate indices. ] Signed-off-by: Ian Rogers Link: https://lore.kernel.org/linux-perf-users/CAP-5=fWb-=hCYmpg7U5N9C94EucQGTOS7YwR2-fo4ptOexzxyg@mail.gmail.com/ Link: https://lore.kernel.org/r/20250519195148.1708988-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit aa6848374023ea14664e6812e0f64e1a28044936 Author: Gautam Menghani Date: Mon May 19 12:51:43 2025 -0700 perf python: Add evlist close support Add support for the evlist close function. Signed-off-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250519195148.1708988-7-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo commit 739621f65702d532527aec124b0818d3a1521b5e Author: Gautam Menghani Date: Mon May 19 12:51:42 2025 -0700 perf python: Add evsel read method Add the evsel read method to enable python to read counter data for the given evsel. Signed-off-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/linux-perf-users/20250512055748.479786-1-gautam@linux.ibm.com/ Link: https://lore.kernel.org/r/20250519195148.1708988-6-irogers@google.com [ make the API take a CPU and thread then compute from these the appropriate indices. ] Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo commit 3b4991dcb49e1d99129ead644858cf7f77b8fb6b Author: Gautam Menghani Date: Mon May 19 12:51:41 2025 -0700 perf python: Add support for 'struct perf_counts_values' to return counter data Add support for the perf_counts_values struct to enable the python bindings to read and return the counter data. Committer notes: Use T_ULONG instead of Py_T_ULONG, as all the other PyMemberDef arrays, fixing the build with older python3 versions. Use { .name = NULL, } to finish the new PyMemberDef pyrf_counts_values_members array, again as the other arrays to please some clang versions, ditto for PyGetSetDef. Signed-off-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250519195148.1708988-5-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo commit 17a2a72df3b632a14c25b4e3117deb57860b548c Author: Gao Xiang Date: Thu May 22 16:49:53 2025 +0800 erofs: clean up erofs_{init,exit}_sysfs() Get rid of useless `goto`s. No logic changes. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250522084953.412096-1-hsiangkao@linux.alibaba.com commit 09febae220d2ea51da324215be7d6871de6aa5f5 Merge: 0af2f6be1b4281 276036283716b9 Author: Stephen Boyd Date: Thu May 22 16:16:59 2025 -0700 Merge tag 'v6.16-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: - Ability to handle different "General Register Files" syscons, not just a single system-one, plus ability to model individual gates found there. - For whatever reason Rockchip also moved the mmc-phase-clocks from the clock-unit for the GRF on some newer socs like the rk3528 (before moving them fully to the mmc controller itself on the rk3576), so add a new clock-variant for the phases, reusing the new GRF handling. - The old rk3036 got real handling of the usb480m mux and some PLL rates were added. * tag 'v6.16-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3528: add slab.h header include clk: rockchip: rk3576: add missing slab.h include clk: rockchip: rename gate-grf clk file clk: rockchip: rename branch_muxgrf to branch_grf_mux clk: rockchip: Pass NULL as reg pointer when registering GRF MMC clocks clk: rockchip: rk3036: mark ddrphy as critical clk: rockchip: rk3036: fix implementation of usb480m clock mux dt-bindings: clock: rk3036: add SCLK_USB480M clock-id clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region clk: rockchip: Support MMC clocks in GRF region dt-bindings: clock: Add GRF clock definition for RK3528 clk: rockchip: add GATE_GRFs for SAI MCLKOUT to rk3576 clk: rockchip: introduce GRF gates clk: rockchip: introduce auxiliary GRFs dt-bindings: clock: rk3576: add IOC gated clocks clk: rockchip: rk3568: Add PLL rate for 33.3MHz clk: rockchip: Drop empty init callback for rk3588 PLL type clk: rockchip: rk3588: Add PLL rate for 1500 MHz commit 8259eb0e06d8f64c700f5fbdb28a5c18e10de291 Author: Jiayuan Chen Date: Fri May 16 22:17:12 2025 +0800 bpf, sockmap: Avoid using sk_socket after free when sending The sk->sk_socket is not locked or referenced in backlog thread, and during the call to skb_send_sock(), there is a race condition with the release of sk_socket. All types of sockets(tcp/udp/unix/vsock) will be affected. Race conditions: ''' CPU0 CPU1 backlog::skb_send_sock sendmsg_unlocked sock_sendmsg sock_sendmsg_nosec close(fd): ... ops->release() -> sock_map_close() sk_socket->ops = NULL free(socket) sock->ops->sendmsg ^ panic here ''' The ref of psock become 0 after sock_map_close() executed. ''' void sock_map_close() { ... if (likely(psock)) { ... // !! here we remove psock and the ref of psock become 0 sock_map_remove_links(sk, psock) psock = sk_psock_get(sk); if (unlikely(!psock)) goto no_psock; <=== Control jumps here via goto ... cancel_delayed_work_sync(&psock->work); <=== not executed sk_psock_put(sk, psock); ... } ''' Based on the fact that we already wait for the workqueue to finish in sock_map_close() if psock is held, we simply increase the psock reference count to avoid race conditions. With this patch, if the backlog thread is running, sock_map_close() will wait for the backlog thread to complete and cancel all pending work. If no backlog running, any pending work that hasn't started by then will fail when invoked by sk_psock_get(), as the psock reference count have been zeroed, and sk_psock_drop() will cancel all jobs via cancel_delayed_work_sync(). In summary, we require synchronization to coordinate the backlog thread and close() thread. The panic I catched: ''' Workqueue: events sk_psock_backlog RIP: 0010:sock_sendmsg+0x21d/0x440 RAX: 0000000000000000 RBX: ffffc9000521fad8 RCX: 0000000000000001 ... Call Trace: ? die_addr+0x40/0xa0 ? exc_general_protection+0x14c/0x230 ? asm_exc_general_protection+0x26/0x30 ? sock_sendmsg+0x21d/0x440 ? sock_sendmsg+0x3e0/0x440 ? __pfx_sock_sendmsg+0x10/0x10 __skb_send_sock+0x543/0xb70 sk_psock_backlog+0x247/0xb80 ... ''' Fixes: 4b4647add7d3 ("sock_map: avoid race between sock_map_close and sk_psock_put") Reported-by: Michal Luczaj Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Reviewed-by: John Fastabend Link: https://lore.kernel.org/r/20250516141713.291150-1-jiayuan.chen@linux.dev commit 0409ac483a81a28bd10bdaa247733e6f35a7eef8 Merge: 0af2f6be1b4281 be0e9a37278727 Author: Stephen Boyd Date: Thu May 22 16:14:17 2025 -0700 Merge tag 'sunxi-clk-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Chen-Yu Tsai: - Add support for DE (display engine) 3.3 clocks on H616 - Add missing LVDS reset control on H616 - Do not enable by default during compile testing * tag 'sunxi-clk-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support dt-bindings: allwinner: add H616 DE33 clock binding clk: sunxi-ng: h616: Add LVDS reset for LCD TCON dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset clk: sunxi: Do not enable by default during compile testing clk: sunxi-ng: Do not enable by default during compile testing commit b217785073f073f17fef54735cbbc8a03193b9b1 Merge: 0af2f6be1b4281 0afce85ed26c73 Author: Stephen Boyd Date: Thu May 22 15:46:48 2025 -0700 Merge tag 'clk-meson-v6.16-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Fix Amlogic G12 SPICC clock sources - Compile test Amlogic clocks only if ARCH_MESON is set * tag 'clk-meson-v6.16-1' of https://github.com/BayLibre/clk-meson: clk: meson: Do not enable by default during compile testing clk: meson-g12a: add missing fclk_div2 to spicc commit 3a4c538e13d65ed891f8c52efe9d2af7a73450b3 Merge: 0af2f6be1b4281 81214185e7e1fc Author: Stephen Boyd Date: Thu May 22 15:32:50 2025 -0700 Merge tag 'samsung-clk-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung Pull Samsung SoC clock driver updates from Krzysztof Kozlowski: - Add Samsung ExynosAutov920 CPU cluster CL0, CL1 and CL2 clock controllers - Fix Samsung ExynosAutov920 HSI1 USBDRD clock parents - Minor cleanup for Samsung Exynos4 clk drivers * tag 'samsung-clk-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: correct clock summary for hsi1 block clk: samsung: exynosautov920: Fix incorrect CLKS_NR_CPUCL0 definition clk: samsung: exynosautov920: add cpucl1/2 clock support dt-bindings: clock: exynosautov920: add cpucl1/2 clock definitions clk: samsung: exynosautov920: add cpucl0 clock support dt-bindings: clock: exynosautov920: add cpucl0 clock definitions clk: samsung: Use samsung CCF common function commit 1ffbdb7aa89af52c9c1cbfe9aaaafbb4117a9ed3 Merge: bef96521310e8d 28548f3f7994dd Author: Stephen Boyd Date: Thu May 22 15:26:04 2025 -0700 Merge tag 'renesas-clk-for-v6.16-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add Expanded Serial Peripheral Interface (xSPI) clocks and resets on Renesas RZ/G3E * tag 'renesas-clk-for-v6.16-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a09g047: Add XSPI clock/reset clk: renesas: r9a09g047: Add support for xspi mux and divider dt-bindings: clock: renesas,r9a09g047-cpg: Add XSPI and GBETH PTP core clocks clk: renesas: Use str_on_off() helper commit 29c98b13921eb15548954f18bf5d96b6e62d69de Merge: 0af2f6be1b4281 50d4b157fa96bf Author: Stephen Boyd Date: Thu May 22 15:21:43 2025 -0700 Merge tag 'thead-clk-for-v6.16' of https://github.com/pdp7/linux into clk-thead Pull T-HEAD clk driver updates from Drew Fustini: - Clk driver for Video Output (VO) subsystem in the T-HEAD TH1520 SoC * tag 'thead-clk-for-v6.16' of https://github.com/pdp7/linux: clk: thead: Add clock support for VO subsystem in T-HEAD TH1520 SoC dt-bindings: clock: thead: Add TH1520 VO clock controller commit f7819f7988f9c7292315c522d65301ced5cfa7db Author: Igor Korotin Date: Wed Apr 2 17:00:47 2025 +0100 docs: rust: quick-start: update Ubuntu instructions Split installation instructions for Ubuntu into 2 different sections: - For Ubuntu 25.04: this release provides easy-to-install Rust packages. - For Ubuntu 24.10 and below: these releases provide rust-1.80 and bindgen-0.65, which do not set their tools as defaults. The instructions for these versions have been updated to configure Rust tools properly. Signed-off-by: Igor Korotin Link: https://lore.kernel.org/r/20250402160047.1827500-1-igor.korotin@yahoo.com [ Dropped 24.10 -- it is soon out of support and their `bindgen` issue (reported as issue #2086639) was never patched anyway. Removed trailing spaces. Split into subheaders. Added `rustfmt` link. Removed spurious backquotes. Reworded contents slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit de7cd3e4d6387df6a5ae8c4c32ff0479ebe0efb5 Author: Igor Korotin Date: Mon May 19 17:45:53 2025 +0100 rust: use absolute paths in macros referencing core and kernel Macros and auto-generated code should use absolute paths, `::core::...` and `::kernel::...`, for core and kernel references. This prevents issues where user-defined modules named `core` or `kernel` could be picked up instead of the `core` or `kernel` crates. Thus clean some references up. Suggested-by: Benno Lossin Closes: https://github.com/Rust-for-Linux/linux/issues/1150 Signed-off-by: Igor Korotin Reviewed-by: Benno Lossin Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250519164615.3310844-1-igor.korotin.linux@gmail.com [ Applied `rustfmt`. Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 977c4308ee4270cf46e2c66b37de8e04670daa0c Author: Rudraksha Gupta Date: Thu May 22 05:02:31 2025 -0700 rust: arm: fix unknown (to Clang) argument '-mno-fdpic' Currently rust on arm fails to compile due to '-mno-fdpic'. This flag disables a GCC feature that we don't want for kernel builds, so let's skip it as it doesn't apply to Clang. UPD include/generated/asm-offsets.h CALL scripts/checksyscalls.sh RUSTC L rust/core.o BINDGEN rust/bindings/bindings_generated.rs BINDGEN rust/bindings/bindings_helpers_generated.rs CC rust/helpers/helpers.o Unable to generate bindings: clang diagnosed error: error: unknown argument: '-mno-fdpic' make[2]: *** [rust/Makefile:369: rust/bindings/bindings_helpers_generated.rs] Error 1 make[2]: *** Deleting file 'rust/bindings/bindings_helpers_generated.rs' make[2]: *** Waiting for unfinished jobs.... Unable to generate bindings: clang diagnosed error: error: unknown argument: '-mno-fdpic' make[2]: *** [rust/Makefile:349: rust/bindings/bindings_generated.rs] Error 1 make[2]: *** Deleting file 'rust/bindings/bindings_generated.rs' make[1]: *** [/home/pmos/build/src/linux-next-next-20250521/Makefile:1285: prepare] Error 2 make: *** [Makefile:248: __sub-make] Error 2 [ Naresh provided the draft diff [1]. Ben explained [2]: FDPIC is only relevant with no-MMU targets, and then only for userspace. When configured for the arm-*-uclinuxfdpiceabi target, GCC enables FDPIC by default to facilitate compiling userspace programs. FDPIC is never used for the kernel, and we pass -mno-fdpic when building the kernel to override the default and make sure FDPIC is disabled. and [3]: -mno-fdpic disables a GCC feature that we don't want for kernel builds. clang does not support this feature, so it always behaves as though -mno-fdpic is passed. Therefore, it should be fine to mix the two, at least as far as FDPIC is concerned. [1] https://lore.kernel.org/rust-for-linux/CA+G9fYt4otQK4pHv8pJBW9e28yHSGCDncKquwuJiJ_1ou0pq0w@mail.gmail.com/ [2] https://lore.kernel.org/rust-for-linux/aAKrq2InExQk7f_k@dell-precision-5540/ [3] https://lore.kernel.org/rust-for-linux/aAo_F_UP1Gd4jHlZ@dell-precision-5540/ - Miguel ] Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/all/CA+G9fYvOanQBYXKSg7C6EU30k8sTRC0JRPJXYu7wWK51w38QUQ@mail.gmail.com/ Suggested-by: Miguel Ojeda Acked-by: Naresh Kamboju Signed-off-by: Rudraksha Gupta Link: https://lore.kernel.org/r/20250522-rust-mno-fdpic-arm-fix-v2-1-a6f691d9c198@gmail.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit 6888a036cfc3d617d0843ecc9bd8504e91fb9de6 Merge: 5ead949920c773 c04eeeb2af8ea2 Author: Martin KaFai Lau Date: Thu May 22 14:26:59 2025 -0700 Merge branch 'selftests-bpf-test-sockmap-sockhash-redirection' Michal Luczaj says: ==================== selftests/bpf: Test sockmap/sockhash redirection The idea behind this series is to comprehensively test the BPF redirection: BPF_MAP_TYPE_SOCKMAP, BPF_MAP_TYPE_SOCKHASH x sk_msg-to-egress, sk_msg-to-ingress, sk_skb-to-egress, sk_skb-to-ingress x AF_INET, SOCK_STREAM, AF_INET6, SOCK_STREAM, AF_INET, SOCK_DGRAM, AF_INET6, SOCK_DGRAM, AF_UNIX, SOCK_STREAM, AF_UNIX, SOCK_DGRAM, AF_VSOCK, SOCK_STREAM, AF_VSOCK, SOCK_SEQPACKET New module is introduced, sockmap_redir: all supported and unsupported redirect combinations are tested for success and failure respectively. Code is pretty much stolen/adapted from Jakub Sitnicki's sockmap_redir_matrix.c [1]. Usage: $ cd tools/testing/selftests/bpf $ make $ sudo ./test_progs -t sockmap_redir ... Summary: 1/576 PASSED, 0 SKIPPED, 0 FAILED [1]: https://github.com/jsitnicki/sockmap-redir-matrix/blob/main/sockmap_redir_matrix.c Changes in v3: - Drop unrelated changes; sockmap_listen, test_sockmap_listen, doc - Collect tags [Jakub, John] - Introduce BPF verdict programs especially for sockmap_redir [Jiayuan] - Link to v2: https://lore.kernel.org/r/20250411-selftests-sockmap-redir-v2-0-5f9b018d6704@rbox.co Changes in v2: - Verify that the unsupported redirect combos do fail [Jakub] - Dedup tests in sockmap_listen - Cosmetic changes and code reordering - Link to v1: https://lore.kernel.org/bpf/42939687-20f9-4a45-b7c2-342a0e11a014@rbox.co/ ==================== Link: https://patch.msgid.link/20250515-selftests-sockmap-redir-v3-0-a1ea723f7e7e@rbox.co Signed-off-by: Martin KaFai Lau commit 200577f69f29a58c90c67c83a0df6d12850e1d09 Author: Shakeel Butt Date: Wed May 14 11:41:58 2025 -0700 memcg: objcg stock trylock without irq disabling There is no need to disable irqs to use objcg per-cpu stock, so let's just not do that but consume_obj_stock() and refill_obj_stock() will need to use trylock instead to avoid deadlock against irq. One consequence of this change is that the charge request from irq context may take slowpath more often but it should be rare. Link: https://lkml.kernel.org/r/20250514184158.3471331-8-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 0ccf1806d44f7c567c73d6ef076a8f6c8c16c74b Author: Shakeel Butt Date: Wed May 14 11:41:57 2025 -0700 memcg: no stock lock for cpu hot-unplug Previously on the cpu hot-unplug, the kernel would call drain_obj_stock() with objcg local lock. However local lock was not needed as the stock which was accessed belongs to a dead cpu but we kept it there to disable irqs as drain_obj_stock() may call mod_objcg_mlstate() which required irqs disabled. However there is no need to disable irqs now for mod_objcg_mlstate(), so we can remove the local lock altogether from cpu hot-unplug path. Link: https://lkml.kernel.org/r/20250514184158.3471331-7-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit eee8a1778cab9efd5ba0eee1c081b4a4b396375b Author: Shakeel Butt Date: Wed May 14 11:41:56 2025 -0700 memcg: make __mod_memcg_lruvec_state re-entrant safe against irqs Let's make __mod_memcg_lruvec_state re-entrant safe and name it mod_memcg_lruvec_state(). The only thing needed is to convert the usage of __this_cpu_add() to this_cpu_add(). There are two callers of mod_memcg_lruvec_state() and one of them i.e. __mod_objcg_mlstate() will be re-entrant safe as well, so, rename it mod_objcg_mlstate(). The last caller __mod_lruvec_state() still calls __mod_node_page_state() which is not re-entrant safe yet, so keep it as is. Link: https://lkml.kernel.org/r/20250514184158.3471331-6-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit e52401e7247bb36cabba389ae32fb75a12a6e94b Author: Shakeel Butt Date: Wed May 14 11:41:55 2025 -0700 memcg: make count_memcg_events re-entrant safe against irqs Let's make count_memcg_events re-entrant safe against irqs. The only thing needed is to convert the usage of __this_cpu_add() to this_cpu_add(). In addition, with re-entrant safety, there is no need to disable irqs. Also add warnings for in_nmi() as it is not safe against nmi context. Link: https://lkml.kernel.org/r/20250514184158.3471331-5-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 8814e3b8692b31e0150a894dd70c14ca0b7b746a Author: Shakeel Butt Date: Wed May 14 11:41:54 2025 -0700 memcg: make mod_memcg_state re-entrant safe against irqs Let's make mod_memcg_state re-entrant safe against irqs. The only thing needed is to convert the usage of __this_cpu_add() to this_cpu_add(). In addition, with re-entrant safety, there is no need to disable irqs. mod_memcg_state() is not safe against nmi, so let's add warning if someone tries to call it in nmi context. Link: https://lkml.kernel.org/r/20250514184158.3471331-4-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit c7163535cdaf7305aac14745483abb54684a43d5 Author: Shakeel Butt Date: Wed May 14 11:41:53 2025 -0700 memcg: move preempt disable to callers of memcg_rstat_updated Let's move the explicit preempt disable code to the callers of memcg_rstat_updated and also remove the memcg_stats_lock and related functions which ensures the callers of stats update functions have disabled preemption because now the stats update functions are explicitly disabling preemption. Link: https://lkml.kernel.org/r/20250514184158.3471331-3-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 8a4b42b955286c122c4402b458acbc1d92953fbd Author: Shakeel Butt Date: Wed May 14 11:41:52 2025 -0700 memcg: memcg_rstat_updated re-entrant safe against irqs Patch series "memcg: make memcg stats irq safe", v2. This series converts memcg stats to be irq safe i.e. memcg stats can be updated in any context (task, softirq or hardirq) without disabling the irqs. This is still not nmi-safe on all architectures but after this series converting memcg charging and stats nmi-safe will be easier. This patch (of 7): memcg_rstat_updated() is used to track the memcg stats updates for optimizing the flushes. At the moment, it is not re-entrant safe and the callers disabled irqs before calling. However to achieve the goal of updating memcg stats without irqs, memcg_rstat_updated() needs to be re-entrant safe against irqs. This patch makes memcg_rstat_updated() re-entrant safe using this_cpu_* ops. On archs with CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS, this patch is also making memcg_rstat_updated() nmi safe. [lorenzo.stoakes@oracle.com: fix build] Link: https://lkml.kernel.org/r/22f69e6e-7908-4e92-96ca-5c70d535c439@lucifer.local Link: https://lkml.kernel.org/r/20250514184158.3471331-1-shakeel.butt@linux.dev Link: https://lkml.kernel.org/r/20250514184158.3471331-2-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Tested-by: Alexei Starovoitov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit cc79061b8fc119807111b615aa791562374b15b2 Author: Baolin Wang Date: Tue May 13 14:56:35 2025 +0800 mm: khugepaged: decouple SHMEM and file folios' collapse Originally, the file pages collapse was intended for tmpfs/shmem to merge into THP in the background. However, now not only tmpfs/shmem can support large folios, but some other file systems (such as XFS, erofs ...) also support large folios. Therefore, it is time to decouple the support of file folios collapse from SHMEM. Link: https://lkml.kernel.org/r/ce5c2314e0368cf34bda26f9bacf01c982d4da17.1747119309.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Acked-by: Zi Yan Cc: Dev Jain Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Michal Hocko Cc: Mike Rapoport Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 19e0713bbe4a682b651dfd3773d2a06a9d61c47b Author: Ryan Chung Date: Tue May 13 16:44:11 2025 +0900 selftests/eventfd: correct test name and improve messages - Rename test from eventfd_chek_flag_cloexec_and_nonblock to eventfd_check_flag_cloexec_and_nonblock. - Make the RDWR‐flag comment declarative: “The kernel automatically adds the O_RDWR flag.” - Update semaphore‐flag failure message to: “eventfd semaphore flag check failed: …” Link: https://lkml.kernel.org/r/20250513074411.6965-1-seokwoo.chung130@gmail.com Signed-off-by: Ryan Chung Reviewed-by: Wen Yang Cc: Shuah Khan Signed-off-by: Andrew Morton commit 780138b123816d717dbc0771d4c87e9a8a01963d Author: Casey Chen Date: Tue May 13 12:26:02 2025 -0600 alloc_tag: check mem_profiling_support in alloc_tag_init If mem_profiling_support is false, for example by sysctl.vm.mem_profiling=never, alloc_tag_init should skip module tags allocation, codetag type registration and procfs init. Link: https://lkml.kernel.org/r/20250513182602.121843-1-cachen@purestorage.com Signed-off-by: Casey Chen Reviewed-by: Yuanyuan Zhong Acked-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 6a4b3551ba1079e8831fb2821765a49b7fd33dbd Author: SeongJae Park Date: Mon May 12 17:27:15 2025 -0700 Docs/damon: update titles and brief introductions to explain DAMOS DAMON was initially developed only for data access monitoring, and then extended for not only access monitoring but also access-aware system operations (DAMOS). But the documents have old titles and brief introductions for only the monitoring part. Update the titles and the brief introductions to explain DAMOS part together. Link: https://lkml.kernel.org/r/20250513002715.40126-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 03f83209e8e72df7eb6ed0afc60adca492844082 Author: SeongJae Park Date: Mon May 12 17:27:14 2025 -0700 selftests/damon/_damon_sysfs: read tried regions directories in order Kdamond.update_schemes_tried_regions() reads and stores tried regions information out of address order. It makes debugging a test failure difficult. Change the behavior to do the reading and writing in the address order. Link: https://lkml.kernel.org/r/20250513002715.40126-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 094fb14913c7c92b2fa8b398fe6a4b8f143aec25 Author: SeongJae Park Date: Mon May 12 17:27:13 2025 -0700 mm/damon/tests/core-kunit: add a test for damos_set_filters_default_reject() DAMOS filters' default reject behavior is not very simple. Actually there was a mistake[1] during the development. Add a kunit test for validating the behavior. Link: https://lkml.kernel.org/r/20250513002715.40126-5-sj@kernel.org Link: https://lore.kernel.org/20250227002913.19359-1-sj@kernel.org [1] Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit a82cf30010665a3602cc6051d760e19e9174ae3d Author: SeongJae Park Date: Mon May 12 17:27:12 2025 -0700 mm/damon/paddr: remove unused variable, folio_list, in damon_pa_stat() Commit c0cb9d91bf297 ("mm/damon/paddr: report filter-passed bytes back for DAMOS_STAT action") added unused variable in damon_pa_stat(), due to a copy-and-paste error. Remove it. Link: https://lkml.kernel.org/r/20250513002715.40126-4-sj@kernel.org Fixes: c0cb9d91bf29 ("mm/damon/paddr: report filter-passed bytes back for DAMOS_STAT action") Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 0bac6b1a1111977c769e1933e0b0fc24e3647d97 Author: SeongJae Park Date: Mon May 12 17:27:11 2025 -0700 mm/damon/sysfs-schemes: fix wrong comment on damons_sysfs_quota_goal_metric_strs A comment on damos_sysfs_quota_goal_metric_strs is simply wrong, due to a copy-and-paste error. Fix it. Link: https://lkml.kernel.org/r/20250513002715.40126-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 591c4c78be06360fe31b31401564bdb2d2b79995 Author: SeongJae Park Date: Mon May 12 17:27:10 2025 -0700 mm/damon/core: warn and fix nr_accesses[_bp] corruption Patch series "mm/damon: minor fixups and improvements for code, tests, and documents". Yet another batch of miscellaneous DAMON changes. Fix and improve minor problems in code, tests and documents. This patch (of 6): For a bug such as double aggregation reset[1], ->nr_accesses and/or ->nr_accesses_bp of damon_region could be corrupted. Such corruption can make monitoring results pretty inaccurate, so the root causing bug should be investigated. Meanwhile, the corruption itself can easily be fixed but silently fixing it will hide the bug. Fix the corruption as soon as found, but WARN_ONCE() so that we can be aware of the existence of the bug while keeping the system running in a more sane way. Link: https://lkml.kernel.org/r/20250513002715.40126-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250513002715.40126-2-sj@kernel.org Link: https://lore.kernel.org/20250302214145.356806-1-sj@kernel.org [1] Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 2aad4edf6e1018b28b7000faec56b7b6e585c8e1 Author: Alexei Starovoitov Date: Fri May 16 17:34:46 2025 -0700 mm: rename try_alloc_pages() to alloc_pages_nolock() The "try_" prefix is confusing, since it made people believe that try_alloc_pages() is analogous to spin_trylock() and NULL return means EAGAIN. This is not the case. If it returns NULL there is no reason to call it again. It will most likely return NULL again. Hence rename it to alloc_pages_nolock() to make it symmetrical to free_pages_nolock() and document that NULL means ENOMEM. Link: https://lkml.kernel.org/r/20250517003446.60260-1-alexei.starovoitov@gmail.com Signed-off-by: Alexei Starovoitov Acked-by: Vlastimil Babka Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Harry Yoo Cc: Andrii Nakryiko Cc: Kumar Kartikeya Dwivedi Cc: Michal Hocko Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Signed-off-by: Andrew Morton commit 5fc4b770fc35c05874dd2dd5bf1f03d354025b62 Author: Mark Brown Date: Sun May 18 15:04:42 2025 +0100 selftests/mm: deduplicate second mmap() of 5*PAGE_SIZE at base The map_fixed_noreplace test does two blocks of test starting from a mapping of 5 pages at the base address, logging a test result for each initial mapping. These are logged with the same test name, causing test automation software to see two reports for the same test in a single run. Tweak the log message for the second one to deduplicate. Link: https://lkml.kernel.org/r/20250518-selftests-mm-map-fixed-noreplace-dup-v1-1-1a11a62c5e9f@kernel.org Signed-off-by: Mark Brown Cc: Shuah Khan Signed-off-by: Andrew Morton commit 6669d1aaa0c45a50a4cc5f1756ab03578eaebd18 Author: Lorenzo Stoakes Date: Wed May 14 09:40:24 2025 +0100 mm: remove WARN_ON_ONCE() in file_has_valid_mmap_hooks() Having encountered a trinity report in linux-next (Linked in the 'Closes' tag) it appears that there are legitimate situations where a file-backed mapping can be acquired but no file->f_op->mmap or file->f_op->mmap_prepare is set, at which point do_mmap() should simply error out with -ENODEV. Since previously we did not warn in this scenario and it appears we rely upon this, restore this situation, while retaining a WARN_ON_ONCE() for the case where both are set, which is absolutely incorrect and must be addressed and thus always requires a warning. If further work is required to chase down precisely what is causing this, then we can later restore this, but it makes no sense to hold up this series to do so, as this is existing and apparently expected behaviour. Link: https://lkml.kernel.org/r/20250514084024.29148-1-lorenzo.stoakes@oracle.com Fixes: c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file callback") Signed-off-by: Lorenzo Stoakes Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505141434.96ce5e5d-lkp@intel.com Reviewed-by: Vlastimil Babka Reviewed-by: Pedro Falcato Acked-by: David Hildenbrand Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit cc0535acd1b439cfc854dfd27618b6f790497661 Author: Lorenzo Stoakes Date: Tue May 13 15:57:06 2025 +0100 MAINTAINERS: add kernel/fork.c to relevant sections Currently kernel/fork.c both contains absolutely key logic relating to a number of kernel subsystems and also has absolutely no assignment in MAINTAINERS. Correct this by placing this file in relevant sections - mm core, exec and the scheduler so people know who to contact when making changes here. scripts/get_maintainers.pl can perfectly well handle a file being in multiple sections, so this functions correctly. Intent is that we keep putting changes to kernel/fork.c through Andrew's tree. Link: https://lkml.kernel.org/r/20250513145706.122101-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Peter Zijlstra (Intel) Acked-by: Michal Hocko Acked-by: Vlastimil Babka Reviewed-by: Kees Cook Acked-by: David Hildenbrand Acked-by: Liam R. Howlett Cc: Ben Segall Cc: Dietmar Eggemann Cc: Ingo Molnar Cc: Juri Lelli Cc: Mel Gorman Cc: Mike Rapoport Cc: Steven Rostedt Cc: Suren Baghdasaryan Cc: Valentin Schneider Cc: Vincent Guittot Signed-off-by: Andrew Morton commit 698c0089cdf0b27d37f0b24824b682c23de5f72d Author: Baolin Wang Date: Mon May 12 10:57:12 2025 +0800 mm: convert do_set_pmd() to take a folio In do_set_pmd(), we always use the folio->page to build PMD mappings for the entire folio. Since all callers of do_set_pmd() already hold a stable folio, converting do_set_pmd() to take a folio is safe and more straightforward. In addition, to ensure the extensibility of do_set_pmd() for supporting larger folios beyond PMD size, we keep the 'page' parameter to specify which page within the folio should be mapped. No functional changes expected. Link: https://lkml.kernel.org/r/9b488f4ecb4d3fd8634e3d448dd0ed6964482480.1747017104.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Zi Yan Acked-by: David Hildenbrand Cc: Dev Jain Cc: Johannes Weiner Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 5053383829ab2b17dc4766a832004c848f4af9df Author: Baolin Wang Date: Mon May 12 10:57:11 2025 +0800 mm: khugepaged: convert set_huge_pmd() to take a folio We've already gotten the stable locked folio in collapse_pte_mapped_thp(), so just use folio for set_huge_pmd() to set the PMD entry, which is more straightforward. Moreover, we will check the folio size in do_set_pmd(), so we can remove the unnecessary VM_BUG_ON() in set_huge_pmd(). While we are at it, we can also remove the PageTransHuge(), as it currently has no callers. Link: https://lkml.kernel.org/r/110c3e1ec5fe7854a0e2c95ffcbc985817180ed7.1747017104.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Cc: Dev Jain Cc: Johannes Weiner Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton commit a624c424d5d3778863ac67f87a374c22b1520c27 Author: David Hildenbrand Date: Mon May 12 14:34:24 2025 +0200 mm/io-mapping: track_pfn() -> "pfnmap tracking" track_pfn() does not exist, let's simply refer to it as "pfnmap tracking". Link: https://lkml.kernel.org/r/20250512123424.637989-12-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 11c82e71817779fc002d47c5beb6ad9df444289a Author: David Hildenbrand Date: Mon May 12 14:34:23 2025 +0200 drm/i915: track_pfn() -> "pfnmap tracking" track_pfn() does not exist, let's simply refer to it as "pfnmap tracking". Link: https://lkml.kernel.org/r/20250512123424.637989-11-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 99e27b047c4ce17feed4bb5c5cb2f1521470afcd Author: David Hildenbrand Date: Mon May 12 14:34:22 2025 +0200 x86/mm/pat: inline memtype_match() into memtype_erase() Let's just have it in a single function. The resulting function is certainly small enough and readable. Link: https://lkml.kernel.org/r/20250512123424.637989-10-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 81baf8450165ac57cca52f73b541a1056a2ca676 Author: David Hildenbrand Date: Mon May 12 14:34:21 2025 +0200 x86/mm/pat: remove MEMTYPE_*_MATCH The "memramp() shrinking" scenario no longer applies, so let's remove that now-unnecessary handling. Link: https://lkml.kernel.org/r/20250512123424.637989-9-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit b3662fb91b98fc9503589ea98634fd48eee19426 Author: David Hildenbrand Date: Mon May 12 14:34:20 2025 +0200 x86/mm/pat: remove strict_prot parameter from reserve_pfn_range() Always set to 0, so let's remove it. Link: https://lkml.kernel.org/r/20250512123424.637989-8-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit cba4dbeb7bfcf8b69d491288c3bf877ead883214 Author: David Hildenbrand Date: Mon May 12 14:34:19 2025 +0200 mm: remove VM_PAT It's unused, so let's remove it. Link: https://lkml.kernel.org/r/20250512123424.637989-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7bd7d74ec01954fde9eb65b065eb55bcda4f86e2 Author: David Hildenbrand Date: Mon May 12 14:34:18 2025 +0200 x86/mm/pat: remove old pfnmap tracking interface We can now get rid of the old interface along with get_pat_info() and follow_phys(). Link: https://lkml.kernel.org/r/20250512123424.637989-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f8e97613fed25758ddf52159b87e1c66e619a23a Author: David Hildenbrand Date: Mon May 12 14:34:17 2025 +0200 mm: convert VM_PFNMAP tracking to pfnmap_track() + pfnmap_untrack() Let's use our new interface. In remap_pfn_range(), we'll now decide whether we have to track (full VMA covered) or only lookup the cachemode (partial VMA covered). Remember what we have to untrack by linking it from the VMA. When duplicating VMAs (e.g., splitting, mremap, fork), we'll handle it similar to anon VMA names, and use a kref to share the tracking. Once the last VMA un-refs our tracking data, we'll do the untracking, which simplifies things a lot and should sort our various issues we saw recently, for example, when partially unmapping/zapping a tracked VMA. This change implies that we'll keep tracking the original PFN range even after splitting + partially unmapping it: not too bad, because it was not working reliably before. The only thing that kind-of worked before was shrinking such a mapping using mremap(): we managed to adjust the reservation in a hacky way, now we won't adjust the reservation but leave it around until all involved VMAs are gone. If that ever turns out to be an issue, we could hook into VM splitting code and split the tracking; however, that adds complexity that might not be required, so we'll keep it simple for now. Link: https://lkml.kernel.org/r/20250512123424.637989-5-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit db44863a4d9df3604c4ff76507bb2056b6392e58 Author: David Hildenbrand Date: Mon May 12 14:34:16 2025 +0200 mm: introduce pfnmap_track() and pfnmap_untrack() and use them for memremap Let's provide variants of track_pfn_remap() and untrack_pfn() that won't mess with VMAs, and replace the usage in mm/memremap.c. Add some documentation. Link: https://lkml.kernel.org/r/20250512123424.637989-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e1e1a3ae7f9f0cb06e80af0f24927be63149d081 Author: David Hildenbrand Date: Mon May 12 14:34:15 2025 +0200 mm: convert track_pfn_insert() to pfnmap_setup_cachemode*() ... by factoring it out from track_pfn_remap() into pfnmap_setup_cachemode() and provide pfnmap_setup_cachemode_pfn() as a replacement for track_pfn_insert(). For PMDs/PUDs, we keep checking a single pfn only. Add some documentation, and also document why it is valid to not check the whole pfn range. We'll reuse pfnmap_setup_cachemode() from core MM next. Link: https://lkml.kernel.org/r/20250512123424.637989-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit ed1a7814036c60ced6198548558342ef75af3ad8 Author: David Hildenbrand Date: Mon May 12 14:34:14 2025 +0200 x86/mm/pat: factor out setting cachemode into pgprot_set_cachemode() VM_PAT annoyed me too much and wasted too much of my time, let's clean PAT handling up and remove VM_PAT. This should sort out various issues with VM_PAT we discovered recently, and will hopefully make the whole code more stable and easier to maintain. In essence: we stop letting PAT mode mess with VMAs and instead lift what to track/untrack to the MM core. We remember per VMA which pfn range we tracked in a new struct we attach to a VMA (we have space without exceeding 192 bytes), use a kref to share it among VMAs during split/mremap/fork, and automatically untrack once the kref drops to 0. This implies that we'll keep tracking a full pfn range even after partially unmapping it, until fully unmapping it; but as that case was mostly broken before, this at least makes it work in a way that is least intrusive to VMA handling. Shrinking with mremap() used to work in a hacky way, now we'll similarly keep the original pfn range tacked even after this form of partial unmap. Does anybody care about that? Unlikely. If we run into issues, we could likely handled that (adjust the tracking) when our kref drops to 1 while freeing a VMA. But it adds more complexity, so avoid that for now. Briefly tested with the new pfnmap selftests [1]. This patch (of 11): Let's factor it out to make the code easier to grasp. Drop one comment where it is now rather obvious what is happening. Use it also in pgprot_writecombine()/pgprot_writethrough() where clearing the old cachemode might not be required, but given that we are already doing a function call, no need to care about this micro-optimization. Link: https://lkml.kernel.org/r/20250512123424.637989-1-david@redhat.com Link: https://lkml.kernel.org/r/20250512123424.637989-2-david@redhat.com Link: https://lkml.kernel.org/r/20250509153033.952746-1-david@redhat.com [1] Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Acked-by: Ingo Molnar [x86 bits] Reviewed-by: Liam R. Howlett Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Dave Airlie Cc: David Hildenbrand Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Jann Horn Cc: Jonas Lahtinen Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Xu Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Tvrtko Ursulin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4df65651f7075481e44c03bb39855a38783d87ac Author: Baolin Wang Date: Fri May 9 08:45:21 2025 +0800 mm: mincore: use pte_batch_hint() to batch process large folios When I tested the mincore() syscall, I observed that it takes longer with 64K mTHP enabled on my Arm64 server. The reason is the mincore_pte_range() still checks each PTE individually, even when the PTEs are contiguous, which is not efficient. Thus we can use pte_batch_hint() to get the batch number of the present contiguous PTEs, which can improve the performance. I tested the mincore() syscall with 1G anonymous memory populated with 64K mTHP, and observed an obvious performance improvement: w/o patch w/ patch changes 6022us 549us +91% Moreover, I also tested mincore() with disabling mTHP/THP, and did not see any obvious regression for base pages. Link: https://lkml.kernel.org/r/99cb00ee626ceb6e788102ca36821815cd832237.1746697240.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Barry Song Reviewed-by: Dev Jain Acked-by: David Hildenbrand Cc: Dev Jain Cc: Ryan Roberts Cc: Zi Yan Signed-off-by: Andrew Morton commit 83b6d498d027002e79c2ce40b5729137500c3170 Author: Zhongkun He Date: Fri May 9 16:35:28 2025 +0800 mm: cma: set early_pfn and bitmap as a union in cma_memrange Since early_pfn and bitmap are never used at the same time, they can be defined as a union to reduce the size of the data structure. This change can save 8 * u64 entries per CMA. Link: https://lkml.kernel.org/r/20250509083528.1360952-1-hezhongkun.hzk@bytedance.com Signed-off-by: Zhongkun He Signed-off-by: Andrew Morton commit 2616b370323a953c437ed2bf40a277e9deaa3709 Author: David Hildenbrand Date: Fri May 9 17:30:32 2025 +0200 selftests/mm: add simple VM_PFNMAP tests based on mmap'ing /dev/mem Let's test some basic functionality using /dev/mem. These tests will implicitly cover some PAT (Page Attribute Handling) handling on x86. These tests will only run when /dev/mem access to the first two pages in physical address space is possible and allowed; otherwise, the tests are skipped. On current x86-64 with PAT inside a VM, all tests pass: TAP version 13 1..6 # Starting 6 tests from 1 test cases. # RUN pfnmap.madvise_disallowed ... # OK pfnmap.madvise_disallowed ok 1 pfnmap.madvise_disallowed # RUN pfnmap.munmap_split ... # OK pfnmap.munmap_split ok 2 pfnmap.munmap_split # RUN pfnmap.mremap_fixed ... # OK pfnmap.mremap_fixed ok 3 pfnmap.mremap_fixed # RUN pfnmap.mremap_shrink ... # OK pfnmap.mremap_shrink ok 4 pfnmap.mremap_shrink # RUN pfnmap.mremap_expand ... # OK pfnmap.mremap_expand ok 5 pfnmap.mremap_expand # RUN pfnmap.fork ... # OK pfnmap.fork ok 6 pfnmap.fork # PASSED: 6 / 6 tests passed. # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0 However, we are able to trigger: [ 27.888251] x86/PAT: pfnmap:1790 freeing invalid memtype [mem 0x00000000-0x00000fff] There are probably more things worth testing in the future, such as MAP_PRIVATE handling. But this set of tests is sufficient to cover most of the things we will rework regarding PAT handling. Link: https://lkml.kernel.org/r/20250509153033.952746-1-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Cc: Shuah Khan Cc: Ingo Molnar Cc: Peter Xu Cc: Dev Jain Signed-off-by: Andrew Morton commit 3f12680913fda8de06c21e836dd5f246fe1684e5 Author: Yuquan Wang Date: Thu May 8 10:27:19 2025 +0800 mm: numa_memblks: introduce numa_add_reserved_memblk acpi_parse_cfmws() currently adds empty CFMWS ranges to numa_meminfo with the expectation that numa_cleanup_meminfo moves them to numa_reserved_meminfo. There is no need for that indirection when it is known in advance that these unpopulated ranges are meant for numa_reserved_meminfo in support of future hotplug / CXL provisioning. Introduce and use numa_add_reserved_memblk() to add the empty CFMWS ranges directly. Link: https://lkml.kernel.org/r/20250508022719.3941335-1-wangyuquan1236@phytium.com.cn Signed-off-by: Yuquan Wang Reviewed-by: Alison Schofield Cc: Bruno Faccini Cc: Chen Baozi Cc: Dan Williams Cc: David Hildenbrand Cc: Haibo Xu Cc: Huacai Chen Cc: Joanthan Cameron Cc: Len Brown Cc: Mike Rapoport Cc: Robert Richter Signed-off-by: Andrew Morton commit 5c5f0468d172ddec2e333d738d2a1f85402cf0bc Author: Jeongjun Park Date: Fri May 9 01:56:20 2025 +0900 mm/vmalloc: fix data race in show_numa_info() The following data-race was found in show_numa_info(): ================================================================== BUG: KCSAN: data-race in vmalloc_info_show / vmalloc_info_show read to 0xffff88800971fe30 of 4 bytes by task 8289 on cpu 0: show_numa_info mm/vmalloc.c:4936 [inline] vmalloc_info_show+0x5a8/0x7e0 mm/vmalloc.c:5016 seq_read_iter+0x373/0xb40 fs/seq_file.c:230 proc_reg_read_iter+0x11e/0x170 fs/proc/inode.c:299 .... write to 0xffff88800971fe30 of 4 bytes by task 8287 on cpu 1: show_numa_info mm/vmalloc.c:4934 [inline] vmalloc_info_show+0x38f/0x7e0 mm/vmalloc.c:5016 seq_read_iter+0x373/0xb40 fs/seq_file.c:230 proc_reg_read_iter+0x11e/0x170 fs/proc/inode.c:299 .... value changed: 0x0000008f -> 0x00000000 ================================================================== According to this report,there is a read/write data-race because m->private is accessible to multiple CPUs. To fix this, instead of allocating the heap in proc_vmalloc_init() and passing the heap address to m->private, vmalloc_info_show() should allocate the heap. Link: https://lkml.kernel.org/r/20250508165620.15321-1-aha310510@gmail.com Fixes: 8e1d743f2c26 ("mm: vmalloc: support multiple nodes in vmallocinfo") Signed-off-by: Jeongjun Park Suggested-by: Eric Dumazet Suggested-by: Andrew Morton Reviewed-by: "Uladzislau Rezki (Sony)" Signed-off-by: Andrew Morton commit a08f0ac32bf48e7bb70b75fc42d8e2d376825496 Merge: 0af2f6be1b4281 41b08610dd262d Author: Stephen Boyd Date: Thu May 22 14:55:12 2025 -0700 Merge tag 'riscv-sophgo-clk-for-v6.16' of https://github.com/sophgo/linux into clk-sophgo Pull RISC-V Sophgo clk driver updates from Chen Wang: - Replace compatible for Sophgo CV1800 series SoC - Add clock support for Sophgo SG2044 * tag 'riscv-sophgo-clk-for-v6.16' of https://github.com/sophgo/linux: clk: sophgo: Add clock controller support for SG2044 SoC clk: sophgo: Add PLL clock controller support for SG2044 SoC dt-bindings: clock: sophgo: add clock controller for SG2044 dt-bindings: soc: sophgo: Add SG2044 top syscon device clk: sophgo: Add support for newly added precise compatible dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC commit d2c6acff6386f43ed307822454b970c831c48f1b Author: Jonas Karlman Date: Sun May 18 22:06:52 2025 +0000 dt-bindings: mmc: sdhci-of-dwcmhsc: Allow use of a power-domain The commit 7e856617a1f3 ("dt-bindings: mmc: Add support for rk3576 eMMC") limited use of power-domains to Rockchip RK3576. Remove the power-domains: false to allow use of power-domains with more controllers, e.g. with SDHCI on Rockchip RK3528. Signed-off-by: Jonas Karlman Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250518220707.669515-6-jonas@kwiboo.se Signed-off-by: Ulf Hansson commit c04eeeb2af8ea2c3f764d2d093bb9b435024a019 Author: Michal Luczaj Date: Thu May 15 00:15:31 2025 +0200 selftests/bpf: sockmap_listen cleanup: Drop af_inet SOCK_DGRAM redir tests Remove tests covered by sockmap_redir. Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-8-a1ea723f7e7e@rbox.co commit f3de1cf621f7e8f7653a24b9e0f21ac7aefbbf27 Author: Michal Luczaj Date: Thu May 15 00:15:30 2025 +0200 selftests/bpf: sockmap_listen cleanup: Drop af_unix redir tests Remove tests covered by sockmap_redir. Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-7-a1ea723f7e7e@rbox.co commit 9266e49d608cb5b8857863ef1d787fe9ccca0ee8 Author: Michal Luczaj Date: Thu May 15 00:15:29 2025 +0200 selftests/bpf: sockmap_listen cleanup: Drop af_vsock redir tests Remove tests covered by sockmap_redir. Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-6-a1ea723f7e7e@rbox.co commit f0709263a07ef076ac4e55f0d68e04d521b2184c Author: Michal Luczaj Date: Thu May 15 00:15:28 2025 +0200 selftests/bpf: Add selftest for sockmap/hashmap redirection Test redirection logic. All supported and unsupported redirect combinations are tested for success and failure respectively. BPF_MAP_TYPE_SOCKMAP BPF_MAP_TYPE_SOCKHASH x sk_msg-to-egress sk_msg-to-ingress sk_skb-to-egress sk_skb-to-ingress x AF_INET, SOCK_STREAM AF_INET6, SOCK_STREAM AF_INET, SOCK_DGRAM AF_INET6, SOCK_DGRAM AF_UNIX, SOCK_STREAM AF_UNIX, SOCK_DGRAM AF_VSOCK, SOCK_STREAM AF_VSOCK, SOCK_SEQPACKET Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-5-a1ea723f7e7e@rbox.co commit f266905bb3d828e678e80d235fbd3e46d8c04a50 Author: Michal Luczaj Date: Thu May 15 00:15:27 2025 +0200 selftests/bpf: Introduce verdict programs for sockmap_redir Instead of piggybacking on test_sockmap_listen, introduce test_sockmap_redir especially for sockmap redirection tests. Suggested-by: Jiayuan Chen Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-4-a1ea723f7e7e@rbox.co commit b57482b0fe8e370e2895b9925a733c21cfec183a Author: Michal Luczaj Date: Thu May 15 00:15:26 2025 +0200 selftests/bpf: Add u32()/u64() to sockmap_helpers Add integer wrappers for convenient sockmap usage. While there, fix misaligned trailing slashes. Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-3-a1ea723f7e7e@rbox.co commit d87857946ded5acfe273404c4126f75d8e7619c8 Author: Michal Luczaj Date: Thu May 15 00:15:25 2025 +0200 selftests/bpf: Add socket_kind_to_str() to socket_helpers Add function that returns string representation of socket's domain/type. Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-2-a1ea723f7e7e@rbox.co commit fb1131d5e181604a6ef06a691709213decfe42bd Author: Michal Luczaj Date: Thu May 15 00:15:24 2025 +0200 selftests/bpf: Support af_unix SOCK_DGRAM socket pair creation Handle af_unix in init_addr_loopback(). For pair creation, bind() the peer socket to make SOCK_DGRAM connect() happy. Signed-off-by: Michal Luczaj Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250515-selftests-sockmap-redir-v3-1-a1ea723f7e7e@rbox.co commit ea15e046263b19e91ffd827645ae5dfa44ebd044 Merge: 43a1ce8f42cb45 ed73728fd14e14 Author: Jakub Kicinski Date: Thu May 22 14:05:18 2025 -0700 Merge tag 'wireless-next-2025-05-22' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Lots of new things, notably: * ath12k: monitor mode for WCN7850, better 6 GHz regulatory * brcmfmac: SAE for some Cypress devices * iwlwifi: rework device configuration * mac80211: scan improvements with MLO * mt76: EHT improvements, new device IDs * rtw88: throughput improvements * rtw89: MLO, STA/P2P concurrency improvements, SAR * tag 'wireless-next-2025-05-22' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (389 commits) wifi: mt76: mt7925: add rfkill_poll for hardware rfkill wifi: mt76: support power delta calculation for 5 TX paths wifi: mt76: fix available_antennas setting wifi: mt76: mt7996: fix RX buffer size of MCU event wifi: mt76: mt7996: change max beacon size wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS wifi: mt76: mt7996: drop fragments with multicast or broadcast RA wifi: mt76: mt7996: set EHT max ampdu length capability wifi: mt76: mt7996: fix beamformee SS field wifi: mt76: remove capability of partial bandwidth UL MU-MIMO wifi: mt76: mt7925: add test mode support wifi: mt76: mt7925: extend MCU support for testmode wifi: mt76: mt7925: ensure all MCU commands wait for response wifi: mt76: mt7925: refine the sniffer commnad wifi: mt76: mt7925: prevent multiple scan commands wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init() wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init() wifi: mt76: mt7925: add RNR scan support for 6GHz wifi: mt76: add mt76_connac_mcu_build_rnr_scan_param routine wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check ... ==================== Link: https://patch.msgid.link/20250522165501.189958-50-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit aca89f1be6bd3196dedc368e257351c1e561082e Author: Takashi Iwai Date: Thu May 22 22:52:51 2025 +0200 ALSA: hda: acpi: Make driver's match data const static The driver's match data, nvidia_hda_data, is referred only locally, and should be static. Also, as it's a read-only data, it can be gracefully const, too. Fixes: 4b214c9bbe26 ("ALSA: hda - Add new driver for HDA controllers listed via ACPI") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505230426.k8ruTgnr-lkp@intel.com/ Link: https://patch.msgid.link/20250522205252.4056-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit ebaa3bf415e7faaf41f5a440aa00574539f0c2ab Author: Takashi Iwai Date: Thu May 22 22:46:23 2025 +0200 ALSA: hda: acpi: Use SYSTEM_SLEEP_PM_OPS() The dev_pm_ops definition must be SYSTEM_SLEEP_PM_OPS() instead of SET_SYSTEM_SLEEP_PM_OPS(); otherwise it leads compile warnings without CONFIG_PM_SLEEP. The latest patch version I took was back to an old macro (likely mistakenly), and I overlooked it at applying. Fix it now. Fixes: 4b214c9bbe26 ("ALSA: hda - Add new driver for HDA controllers listed via ACPI") Reported-by: Randy Dunlap Closes: https://lore.kernel.org/20250522203020.1478369-1-rdunlap@infradead.org Link: https://patch.msgid.link/20250522204624.1757-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 43a1ce8f42cb45d028a8e5f1c2748fb3eff48fb3 Merge: 33e1b1b3991ba8 3aa1dc3c9060e3 Author: Jakub Kicinski Date: Thu May 22 13:46:13 2025 -0700 Merge tag 'for-net-next-2025-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: core: - Add support for SIOCETHTOOL ETHTOOL_GET_TS_INFO - Separate CIS_LINK and BIS_LINK link types - Introduce HCI Driver protocol drivers: - btintel_pcie: Do not generate coredump for diagnostic events - btusb: Add HCI Drv commands for configuring altsetting - btusb: Add RTL8851BE device 0x0bda:0xb850 - btusb: Add new VID/PID 13d3/3584 for MT7922 - btusb: Add new VID/PID 13d3/3630 and 13d3/3613 for MT7925 - btnxpuart: Implement host-wakeup feature * tag 'for-net-next-2025-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (23 commits) Bluetooth: btintel: Check dsbr size from EFI variable Bluetooth: MGMT: iterate over mesh commands in mgmt_mesh_foreach() Bluetooth: btusb: Add new VID/PID 13d3/3584 for MT7922 Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling Bluetooth: L2CAP: Fix not checking l2cap_chan security level Bluetooth: separate CIS_LINK and BIS_LINK link types Bluetooth: btusb: Add new VID/PID 13d3/3630 for MT7925 Bluetooth: add support for SIOCETHTOOL ETHTOOL_GET_TS_INFO Bluetooth: btintel_pcie: Dump debug registers on error Bluetooth: ISO: Fix getpeername not returning sockaddr_iso_bc fields Bluetooth: ISO: Fix not using SID from adv report Revert "Bluetooth: btusb: add sysfs attribute to control USB alt setting" Revert "Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL" Bluetooth: btusb: Add HCI Drv commands for configuring altsetting Bluetooth: Introduce HCI Driver protocol Bluetooth: btnxpuart: Implement host-wakeup feature dt-bindings: net: bluetooth: nxp: Add support for host-wakeup Bluetooth: btusb: Add RTL8851BE device 0x0bda:0xb850 Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware() Bluetooth: btmtksdio: Fix wakeup source leaks on device unbind ... ==================== Link: https://patch.msgid.link/20250522171048.3307873-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 273cc949655c70001778eb0b9e7db993df845912 Author: Tejun Heo Date: Wed May 21 12:23:06 2025 -1000 sched_ext: Call ops.update_idle() after updating builtin idle bits BPF schedulers that use both builtin CPU idle mechanism and ops.update_idle() may want to use the latter to create interlocking between ops.enqueue() and CPU idle transitions so that either ops.enqueue() sees the idle bit or ops.update_idle() sees the task queued somewhere. This can prevent race conditions where CPUs go idle while tasks are waiting in DSQs. For such interlocking to work, ops.update_idle() must be called after builtin CPU masks are updated. Relocate the invocation. Currently, there are no ordering requirements on transitions from idle and this relocation isn't expected to make meaningful differences in that direction. This also makes the ops.update_idle() behavior semantically consistent: any action performed in this callback should be able to override the builtin idle state, not the other way around. Signed-off-by: Tejun Heo Reviewed-and-tested-by: Andrea Righi Acked-by: Changwoo Min commit 82648b8b2ae0a0ff371e2a98133844658cfaae9a Author: Tejun Heo Date: Wed May 14 00:46:12 2025 -0400 sched_ext: Convert cgroup BPF support to use cgroup_lifetime_notifier Replace explicit cgroup_bpf_inherit/offline() calls from cgroup creation/destruction paths with notification callback registered on cgroup_lifetime_notifier. Signed-off-by: Tejun Heo commit 9e8c67a9e526f497d606d721cf6b92dd68d90806 Author: Tejun Heo Date: Wed May 14 00:44:44 2025 -0400 sched_ext: Introduce cgroup_lifetime_notifier Other subsystems may make use of the cgroup hierarchy with the cgroup_bpf support being one such example. For such a feature, it's useful to be able to hook into cgroup creation and destruction paths to perform feature-specific initializations and cleanups. Add cgroup_lifetime_notifier which generates CGROUP_LIFETIME_ONLINE and CGROUP_LIFETIME_OFFLINE events whenever cgroups are created and destroyed, respectively. The next patch will convert cgroup_bpf to use the new notifier and other uses are planned. Signed-off-by: Tejun Heo commit cd22cbad1b800e55f5bd38c58be16f9d0b171d9a Author: Tejun Heo Date: Wed May 14 00:43:41 2025 -0400 cgroup: Minor reorganization of cgroup_create() cgroup_bpf init and exit handling will be moved to a notifier chain. In prepartion, reorganize cgroup_create() a bit so that the new cgroup is fully initialized before any outside changes are made. - cgrp->ancestors[] initialization and the hierarchical nr_descendants and nr_frozen_descendants updates were in the same loop. Separate them out and do the former earlier and do the latter later. - Relocate cgroup_bpf_inherit() call so that it's after all cgroup initializations are complete. No visible behavior changes expected. Signed-off-by: Tejun Heo commit 2a6c0136ae9ac44f2b097e469d4cee95cd11e4f8 Author: Kent Overstreet Date: Tue May 6 21:54:35 2025 -0400 bcachefs: bch2_journal_write_checksum() We need to delay checksumming the journal write; we don't know the blocksize until after we allocate the write. Signed-off-by: Kent Overstreet commit d385ca5603a3af3c5cc85d16e42e6063a257ea55 Author: Kent Overstreet Date: Thu May 22 12:50:22 2025 -0400 bcachefs: Reduce stack usage in data_update_index_update() Separate tracepoint message generation and other slowpath code into non-inline functions, and use bch2_trans_log_str() instead of using a printbuf for our journal message. Signed-off-by: Kent Overstreet commit 7d886a82bf9cb2b3b0e591a915c89c4696598149 Author: Kent Overstreet Date: Thu May 22 12:49:56 2025 -0400 bcachefs: bch2_trans_log_str() The data update path doesn't need a printbuf for its log message - this will help reduce stack usage. Signed-off-by: Kent Overstreet commit 4a9eb20efa9f07b54382bb2713439fc09336d45a Author: Kent Overstreet Date: Thu May 22 12:34:40 2025 -0400 bcachefs: Kill bkey_buf usage in data_update_index_update() Reduce stack usage - bkey_buf has a 96 byte buffer on the stack, but the btree_trans bump allocator works just fine here. Signed-off-by: Kent Overstreet commit d16e7994c8b2ed38beb8bae6f4b1292987b627af Author: Shashank Balaji Date: Thu May 22 11:08:14 2025 +0900 cgroup, docs: cpu controller's interaction with various scheduling policies The cpu controller interface files account for or affect processes differently based on their scheduling policy, and the underlying scheduler used (fair-class vs. BPF scheduler). Document these differences Signed-off-by: Shashank Balaji Signed-off-by: Tejun Heo commit aa3a7b6261d8530da3d06c61d21b1acda54abf52 Author: Shashank Balaji Date: Thu May 22 11:08:13 2025 +0900 sched_ext, docs: convert mentions of "CFS" to "fair-class scheduler" Mentions of CFS are stale since the fair-class scheduler is implemented using EEVDF. So, convert such mentions to "fair-class scheduler" to stay algorithm-name agnostic. Signed-off-by: Shashank Balaji Signed-off-by: Tejun Heo commit 79bfa4b38ad6fd6da6e568b5be2e1fff32565a93 Author: Shashank Balaji Date: Thu May 22 11:08:12 2025 +0900 cgroup, docs: convert space indentation to tab indentation The paragraphs on cpu.uclamp.{min,max} are space indented. Convert them to tab indentation to make them uniform with the other paragraphs. Signed-off-by: Shashank Balaji Signed-off-by: Tejun Heo commit 2b6d96503255a3ed676cd70f8368870c6d6a25c6 Author: Fedor Pchelkin Date: Tue Mar 25 19:32:13 2025 +0300 jffs2: check jffs2_prealloc_raw_node_refs() result in few other places Fuzzing hit another invalid pointer dereference due to the lack of checking whether jffs2_prealloc_raw_node_refs() completed successfully. Subsequent logic implies that the node refs have been allocated. Handle that. The code is ready for propagating the error upwards. KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 5835 Comm: syz-executor145 Not tainted 5.10.234-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:jffs2_link_node_ref+0xac/0x690 fs/jffs2/nodelist.c:600 Call Trace: jffs2_mark_erased_block fs/jffs2/erase.c:460 [inline] jffs2_erase_pending_blocks+0x688/0x1860 fs/jffs2/erase.c:118 jffs2_garbage_collect_pass+0x638/0x1a00 fs/jffs2/gc.c:253 jffs2_reserve_space+0x3f4/0xad0 fs/jffs2/nodemgmt.c:167 jffs2_write_inode_range+0x246/0xb50 fs/jffs2/write.c:362 jffs2_write_end+0x712/0x1110 fs/jffs2/file.c:302 generic_perform_write+0x2c2/0x500 mm/filemap.c:3347 __generic_file_write_iter+0x252/0x610 mm/filemap.c:3465 generic_file_write_iter+0xdb/0x230 mm/filemap.c:3497 call_write_iter include/linux/fs.h:2039 [inline] do_iter_readv_writev+0x46d/0x750 fs/read_write.c:740 do_iter_write+0x18c/0x710 fs/read_write.c:866 vfs_writev+0x1db/0x6a0 fs/read_write.c:939 do_pwritev fs/read_write.c:1036 [inline] __do_sys_pwritev fs/read_write.c:1083 [inline] __se_sys_pwritev fs/read_write.c:1078 [inline] __x64_sys_pwritev+0x235/0x310 fs/read_write.c:1078 do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x67/0xd1 Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 2f785402f39b ("[JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.") Fixes: f560928baa60 ("[JFFS2] Allocate node_ref for wasted space when skipping to page boundary") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit ec9e6f22bce433b260ea226de127ec68042849b0 Author: Artem Sadovnikov Date: Fri Mar 7 16:34:09 2025 +0000 jffs2: check that raw node were preallocated before writing summary Syzkaller detected a kernel bug in jffs2_link_node_ref, caused by fault injection in jffs2_prealloc_raw_node_refs. jffs2_sum_write_sumnode doesn't check return value of jffs2_prealloc_raw_node_refs and simply lets any error propagate into jffs2_sum_write_data, which eventually calls jffs2_link_node_ref in order to link the summary to an expectedly allocated node. kernel BUG at fs/jffs2/nodelist.c:592! invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 1 PID: 31277 Comm: syz-executor.7 Not tainted 6.1.128-syzkaller-00139-ge10f83ca10a1 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:jffs2_link_node_ref+0x570/0x690 fs/jffs2/nodelist.c:592 Call Trace: jffs2_sum_write_data fs/jffs2/summary.c:841 [inline] jffs2_sum_write_sumnode+0xd1a/0x1da0 fs/jffs2/summary.c:874 jffs2_do_reserve_space+0xa18/0xd60 fs/jffs2/nodemgmt.c:388 jffs2_reserve_space+0x55f/0xaa0 fs/jffs2/nodemgmt.c:197 jffs2_write_inode_range+0x246/0xb50 fs/jffs2/write.c:362 jffs2_write_end+0x726/0x15d0 fs/jffs2/file.c:301 generic_perform_write+0x314/0x5d0 mm/filemap.c:3856 __generic_file_write_iter+0x2ae/0x4d0 mm/filemap.c:3973 generic_file_write_iter+0xe3/0x350 mm/filemap.c:4005 call_write_iter include/linux/fs.h:2265 [inline] do_iter_readv_writev+0x20f/0x3c0 fs/read_write.c:735 do_iter_write+0x186/0x710 fs/read_write.c:861 vfs_iter_write+0x70/0xa0 fs/read_write.c:902 iter_file_splice_write+0x73b/0xc90 fs/splice.c:685 do_splice_from fs/splice.c:763 [inline] direct_splice_actor+0x10c/0x170 fs/splice.c:950 splice_direct_to_actor+0x337/0xa10 fs/splice.c:896 do_splice_direct+0x1a9/0x280 fs/splice.c:1002 do_sendfile+0xb13/0x12c0 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __x64_sys_sendfile64+0x1cf/0x210 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Fix this issue by checking return value of jffs2_prealloc_raw_node_refs before calling jffs2_sum_write_data. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Cc: stable@vger.kernel.org Fixes: 2f785402f39b ("[JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.") Signed-off-by: Artem Sadovnikov Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 73e9bb465f4ab8cdfc99a1a2252ae80d7587bfc0 Author: Thorsten Blum Date: Tue Apr 22 19:47:57 2025 +0200 ubifs: Fix grammar in error message s/much/many/ Reviewed-by: Zhihao Cheng Signed-off-by: Thorsten Blum Signed-off-by: Richard Weinberger commit b80a61173d08e10b502578cbcb7a55febeff983b Author: Thorsten Blum Date: Thu May 22 20:01:09 2025 +0200 ALSA: atmel: Replace deprecated strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. Use strscpy() to copy the long name because there's no string to format with sprintf(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250522180111.12144-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit d18bbb7b8a7b21238dd05f7ddb7d90e2a50171bf Merge: 547c5775a742d9 62f134ab190c5f Author: Takashi Iwai Date: Thu May 22 20:34:24 2025 +0200 Merge branch 'for-linus' into for-next Sync with the pending 6.15 fixes. Signed-off-by: Takashi Iwai commit 547c5775a742d9c83891b629b75d1d4c8e88d8c0 Merge: 4fe238513407d8 7ce3bf76c3adfb Author: Takashi Iwai Date: Thu May 22 20:30:34 2025 +0200 Merge tag 'asoc-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.16 The changes in this release are quite large, mainly in drivers rather than the core. This is partly due to cleanups that touch a lot of drivers and partly due to several relatively large new drivers. - Support for automatically enumerating DAIs from standards conforming SoundWire SDCA devices, further work is required for these to be useful in an actual card. - Conversion of quite a few drivers to newer GPIO APIs. - More helpers and cleanups from Mormimoto-san. - Support for a wider range of AVS platforms. - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32, Everest Semiconductor ES8389, Longsoon-1 AC'97 controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers. commit 62f134ab190c5fd5c9f68fe638ad8e13bb8a4cb4 Author: Greg Kroah-Hartman Date: Thu May 22 12:08:05 2025 +0200 ALSA: core: fix up bus match const issues. In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match bus callback was changed to have the driver be a const pointer. Unfortunately that const attribute was thrown away when container_of() is called, which is not correct and was not caught by the compiler due to how container_of() is implemented. Fix this up by correctly preserving the const attribute of the driver passed to the bus match function which requires the hdac_driver match function to also take a const pointer for the driver structure. Cc: Jaroslav Kysela Cc: Takashi Iwai Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Greg Kroah-Hartman Link: https://patch.msgid.link/2025052204-hyphen-thermal-3e72@gregkh Signed-off-by: Takashi Iwai commit 462e244faba02d92c9e349f9877abc4a6564f4e7 Merge: f709b78aecab51 688abe2860fd9c Author: Takashi Iwai Date: Thu May 22 20:29:00 2025 +0200 Merge tag 'asoc-fix-v6.15-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.15 A couple more small fixes for v6.15, both of which could also easily wait until the merge window. commit 3aa1dc3c9060e335e82e9c182bf3d1db29220b1b Author: Kees Cook Date: Tue May 20 09:31:35 2025 -0700 Bluetooth: btintel: Check dsbr size from EFI variable Since the size of struct btintel_dsbr is already known, we can just start there instead of querying the EFI variable size. If the final result doesn't match what we expect also fail. This fixes a stack buffer overflow when the EFI variable is larger than struct btintel_dsbr. Reported-by: zepta Closes: https://lore.kernel.org/all/CAPBS6KoaWV9=dtjTESZiU6KK__OZX0KpDk-=JEH8jCHFLUYv3Q@mail.gmail.com Fixes: eb9e749c0182 ("Bluetooth: btintel: Allow configuring drive strength of BRI") Signed-off-by: Kees Cook Signed-off-by: Luiz Augusto von Dentz commit 3bb88524b7d030160bb3c9b35f928b2778092111 Author: Dmitry Antipov Date: Tue May 20 11:42:30 2025 +0300 Bluetooth: MGMT: iterate over mesh commands in mgmt_mesh_foreach() In 'mgmt_mesh_foreach()', iterate over mesh commands rather than generic mgmt ones. Compile tested only. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Signed-off-by: Dmitry Antipov Signed-off-by: Luiz Augusto von Dentz commit 71d9d3522aec301e4a1c4eae4b5e0656fc4a7262 Author: Liwei Sun Date: Tue May 13 14:13:54 2025 +0800 Bluetooth: btusb: Add new VID/PID 13d3/3584 for MT7922 A new variant of MT7922 wireless device has been identified. The device introduces itself as MEDIATEK MT7922, so treat it as MediaTek device. With this patch, btusb driver works as expected: [ 3.151162] Bluetooth: Core ver 2.22 [ 3.151185] Bluetooth: HCI device and connection manager initialized [ 3.151189] Bluetooth: HCI socket layer initialized [ 3.151191] Bluetooth: L2CAP socket layer initialized [ 3.151194] Bluetooth: SCO socket layer initialized [ 3.295718] Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106163512 [ 4.676634] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 4.676637] Bluetooth: BNEP filters: protocol multicast [ 4.676640] Bluetooth: BNEP socket layer initialized [ 5.560453] Bluetooth: hci0: Device setup in 2320660 usecs [ 5.560457] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. [ 5.619197] Bluetooth: hci0: AOSP extensions version v1.00 [ 5.619204] Bluetooth: hci0: AOSP quality report is supported [ 5.619301] Bluetooth: MGMT ver 1.23 [ 6.741247] Bluetooth: RFCOMM TTY layer initialized [ 6.741258] Bluetooth: RFCOMM socket layer initialized [ 6.741261] Bluetooth: RFCOMM ver 1.11 lspci output: 04:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter USB information: T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3584 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I: If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I:* If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: Liwei Sun Signed-off-by: Luiz Augusto von Dentz commit c27046c98bd26d4270c076e7d851d68aaaf964a3 Author: En-Wei Wu Date: Thu May 8 22:15:20 2025 +0800 Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling Use skb_pull() and skb_pull_data() to safely parse QCA dump packets. This avoids direct pointer math on skb->data, which could lead to invalid access if the packet is shorter than expected. Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support") Signed-off-by: En-Wei Wu Signed-off-by: Luiz Augusto von Dentz commit 631c8682c3b8ce2678b2d849b3f28e5568853591 Author: Luiz Augusto von Dentz Date: Wed May 7 15:00:30 2025 -0400 Bluetooth: L2CAP: Fix not checking l2cap_chan security level l2cap_check_enc_key_size shall check the security level of the l2cap_chan rather than the hci_conn since for incoming connection request that may be different as hci_conn may already been encrypted using a different security level. Fixes: 522e9ed157e3 ("Bluetooth: l2cap: Check encryption key size on incoming connection") Signed-off-by: Luiz Augusto von Dentz commit 33e1b1b3991ba8c0d02b2324a582e084272205d6 Merge: 3ccf3f441f93f1 5cdb2c77c4c3d3 Author: Jakub Kicinski Date: Thu May 22 09:42:41 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc8). Conflicts: 80f2ab46c2ee ("irdma: free iwdev->rf after removing MSI-X") 4bcc063939a5 ("ice, irdma: fix an off by one in error handling code") c24a65b6a27c ("iidc/ice/irdma: Update IDC to support multiple consumers") https://lore.kernel.org/20250513130630.280ee6c5@canb.auug.org.au No extra adjacent changes. Signed-off-by: Jakub Kicinski commit 4518e5a60c7fbf0cdff393c2681db39d77b4f87e Author: Li RongQing Date: Wed May 21 11:46:47 2025 +0800 vfio/type1: Fix error unwind in migration dirty bitmap allocation When setting up dirty page tracking at the vfio IOMMU backend for device migration, if an error is encountered allocating a tracking bitmap, the unwind loop fails to free previously allocated tracking bitmaps. This occurs because the wrong loop index is used to generate the tracking object. This results in unintended memory usage for the life of the current DMA mappings where bitmaps were successfully allocated. Use the correct loop index to derive the tracking object for freeing during unwind. Fixes: d6a4c185660c ("vfio iommu: Implementation of ioctl for dirty pages tracking") Signed-off-by: Li RongQing Link: https://lore.kernel.org/r/20250521034647.2877-1-lirongqing@baidu.com Signed-off-by: Alex Williamson commit 5ead949920c773d4c3a42988391c2e6d0f32650f Author: Mykyta Yatsenko Date: Thu May 22 02:38:13 2025 +0100 selftests/bpf: Add SKIP_LLVM makefile variable Introduce SKIP_LLVM makefile variable that allows to avoid using llvm dependencies when building BPF selftests. This is different from existing feature-llvm, as the latter is a result of automatic detection and should not be set by user explicitly. Avoiding llvm dependencies could be useful for environments that do not have them, given that as of now llvm dependencies are required only by jit_disasm_helpers.c. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250522013813.125428-1-mykyta.yatsenko5@gmail.com commit 8b819afa494034ba413fecd5745cdf91e2b2b335 Merge: bdc319f1c9bf9d 5fed7fe33c2cd7 Author: Greg Kroah-Hartman Date: Thu May 22 18:25:27 2025 +0200 Merge tag 'icc-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.16 This pull request contains the interconnect changes for the 6.16-rc1 merge window. The core and driver changes are listed below. Core changes: - Add support for dynamic id allocation, that allows creating multiple instances of the same provider Driver changes: - Add driver for the EPSS L3 instances on SA8775P SoC - Add QoS support for SM8650 SoC - Add some missing nodes for SM8650 - Misc dt-binding style and indentation fixes Signed-off-by: Georgi Djakov * tag 'icc-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: sm8650: remove regmap config for mc_virt & clk_virt interconnect: qcom: sm8650: add the MASTER_APSS_NOC dt-bindings: interconnect: sm8650: document the MASTER_APSS_NOC interconnect: qcom: sm8650: enable QoS configuration dt-bindings: interconnect: Correct indentation and style in DTS example interconnect: qcom: sa8775p: Add dynamic icc node id support interconnect: qcom: icc-rpmh: Add dynamic icc node id support interconnect: qcom: Add multidev EPSS L3 support interconnect: core: Add dynamic id allocation support dt-bindings: interconnect: Add EPSS L3 compatible for SA8775P commit 3ccf3f441f93f18edbd482d2ef606e5153c5542c Merge: db807e5ef8eea6 8f7b00307bf146 Author: Jakub Kicinski Date: Thu May 22 09:15:07 2025 -0700 Merge branch 'net-mlx5-convert-mlx5-to-netdev-instance-locking' Tariq Toukan says: ==================== net/mlx5: Convert mlx5 to netdev instance locking Cosmin Ratiu says: mlx5 manages multiple netdevices, from basic Ethernet to Infiniband netdevs. This patch series converts the driver to use netdev instance locking for everything in preparation for TCP devmem Zero Copy. Because mlx5 is tightly coupled with the ipoib driver, a series of changes first happen in ipoib to allow it to work with mlx5 netdevs that use instance locking: IB/IPoIB: Enqueue separate work_structs for each flushed interface IB/IPoIB: Replace vlan_rwsem with the netdev instance lock IB/IPoIB: Allow using netdevs that require the instance lock A small patch then avoids dropping RTNL during firmware update: net/mlx5e: Don't drop RTNL during firmware flash The main patch then converts all mlx5 netdevs to use instance locking: net/mlx5e: Convert mlx5 netdevs to instance locking ==================== Link: https://patch.msgid.link/1747829342-1018757-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 8f7b00307bf14676b7e7f0210110a36aa0ff3e93 Author: Cosmin Ratiu Date: Wed May 21 15:09:02 2025 +0300 net/mlx5e: Convert mlx5 netdevs to instance locking This patch convert mlx5 to use the new netdev instance lock in addition to the pre-existing state_lock (and the RTNL). mlx5e_priv.state_lock was already used throughout mlx5 to protect against concurrent state modifications on the same netdev, usually in addition to the RTNL. The new netdev instance lock will eventually replace it, but for now, it is acquired in addition to the existing locks in the order RTNL -> instance lock -> state_lock. All three netdev types handled by mlx5 are converted to the new style of locking, because they share a lot of code related to initializing channels and dealing with NAPI, so it's better to convert all three rather than introduce different assumptions deep in the call stack depending on the type of device. Because of the nature of the call graphs in mlx5, it wasn't possible to incrementally convert parts of the driver to use the new lock, since either all call paths into NAPI have to possess the new lock if the *_locked variants are used, or none of them can have the lock. One area which required extra care is the interaction between closing channels and devlink health reporter tasks. Previously, the recovery tasks were unconditionally acquiring the RTNL, which could lead to deadlocks in these scenarios: T1: mlx5e_close (== .ndo_stop(), has RTNL) -> mlx5e_close_locked -> mlx5e_close_channels -> mlx5e_ptp_close -> mlx5e_ptp_close_queues -> mlx5e_ptp_close_txqsqs -> mlx5e_ptp_close_txqsq -> cancel_work_sync(&ptpsq->report_unhealthy_work) waits for T2: mlx5e_ptpsq_unhealthy_work -> mlx5e_reporter_tx_ptpsq_unhealthy -> mlx5e_health_report -> devlink_health_report -> devlink_health_reporter_recover -> mlx5e_tx_reporter_ptpsq_unhealthy_recover which does: rtnl_lock(); => Deadlock. Another similar instance of this is: T1: mlx5e_close (== .ndo_stop(), has RTNL) -> mlx5e_close_locked -> mlx5e_close_channels -> mlx5e_ptp_close -> mlx5e_ptp_close_queues -> mlx5e_ptp_close_txqsqs -> mlx5e_ptp_close_txqsq -> cancel_work_sync(&sq->recover_work) waits for T2: mlx5e_tx_err_cqe_work -> mlx5e_reporter_tx_err_cqe -> mlx5e_health_report -> devlink_health_report -> devlink_health_reporter_recover -> mlx5e_tx_reporter_err_cqe_recover which does: rtnl_lock(); => Another deadlock. Fix that by using the same pattern previously done in mlx5e_tx_timeout_work, where the RTNL was repeatedly tried to be acquired until either: a) it is successfully acquired or b) there's no need for the work to be done any more (channel is being closed). Now, for all three recovery tasks, the instance lock is repeatedly tried to be acquired until successful or the channel/SQ is closed. As a side-effect, drop the !test_bit(MLX5E_STATE_OPENED, &priv->state) check from mlx5e_tx_timeout_work, it's weaker than !test_bit(MLX5E_STATE_CHANNELS_ACTIVE, &priv->state) and unnecessary. Future patches will introduce new call paths (from netdev queue management ops) which can close channels (and call cancel_work_sync on the recovery tasks) without the RTNL lock and only with the netdev instance lock. Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747829342-1018757-6-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d7d4f9f7365a53dc5ae21fd117770e5781caae41 Author: Cosmin Ratiu Date: Wed May 21 15:09:01 2025 +0300 net/mlx5e: Don't drop RTNL during firmware flash There's no explanation in the original commit of why that was done, but presumably flashing takes a long time and holding RTNL for so long blocks other interactions with the netdev layer. However, the stack is moving towards netdev instance locking and dropping and reacquiring RTNL in the context of flashing introduces locking ordering issues: RTNL must be acquired before the netdev instance lock and released after it. This patch therefore takes the simpler approach by no longer dropping and reacquiring the RTNL, as soon RTNL for ethtool will be removed, leaving only the instance lock to protect against races. Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747829342-1018757-5-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit fd07ba1680ba3c82d6a19a5c8c02af0a42045674 Author: Cosmin Ratiu Date: Wed May 21 15:09:00 2025 +0300 IB/IPoIB: Allow using netdevs that require the instance lock After the last patch removing vlan_rwsem, it is an incremental step to allow ipoib to work with netdevs that require the instance lock. In several places, netdev_lock() is changed to netdev_lock_ops_to_full() which takes care of not acquiring the lock again when the netdev is already locked. In ipoib_ib_tx_timeout_work() and __ipoib_ib_dev_flush() for HEAVY flushes, the netdev lock is acquired/released. This is needed because these functions end up calling .ndo_stop()/.ndo_open() on subinterfaces, and the device may expect the netdev instance lock to be held. ipoib_set_mode() now explicitly acquires ops lock while manipulating the features, mtu and tx queues. Finally, ipoib_napi_enable()/ipoib_napi_disable() now use the *_locked variants of the napi_enable()/napi_disable() calls and optionally acquire the netdev lock themselves depending on the dev they operate on. Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Reviewed-by: Leon Romanovsky Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747829342-1018757-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 463e5176969795a1d80205842e210c539c16fc81 Author: Cosmin Ratiu Date: Wed May 21 15:08:59 2025 +0300 IB/IPoIB: Replace vlan_rwsem with the netdev instance lock vlan_rwsem was added more than a decade ago to work around a deadlock involving the original mutex being acquired twice, once from the wq. Subsequent changes then tweaked it to partially protect access to ipoib_dev_priv->child_intfs together with the RTNL. Flushing the wq synchronously was also since then refactored to happen separately. This semaphore unfortunately prevents updating ipoib to work with devices that require the netdev lock, because of lock ordering issues between RTNL, vlan_rwsem and the netdev instance locks of parent and child devices. To uncomplicate things, this commit replaces vlan_rwsem with the netdev instance lock of the parent device. Both parent child_intfs list and the children's list membership in it require holding the parent netdev instance lock. All call paths were carefully reviewed and no-longer-needed ASSERT_RTNL calls were dropped. Some non-trivial changes: - ipoib_match_gid_pkey_addr() now only acquires the instance lock and iterates through child_intfs for the first level of recursion (the parent), as it's not possible to have multiple levels of nested subinterfaces. - ipoib_open() and ipoib_stop() schedule tasks on the global workqueue to open/stop child interfaces to avoid potentially acquiring nested netdev instance locks. To avoid the device going away between the task scheduling and execution, netdev_hold/netdev_put are used. Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Reviewed-by: Leon Romanovsky Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747829342-1018757-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 5f85120e7462c9fc51cb9c52bc6e81b13d4c93e1 Author: Cosmin Ratiu Date: Wed May 21 15:08:58 2025 +0300 IB/IPoIB: Enqueue separate work_structs for each flushed interface Previously, flushing a netdevice involved first flushing all child devices from the flush task itself. That requires holding the lock that protects the list for the entire duration of the flush. This poses a problem when converting from vlan_rwsem to the netdev instance lock (next patch), because holding the parent lock while trying to acquire a child lock makes lockdep unhappy, rightfully. Fix this by splitting a big flush task into individual flush tasks (all are already created in their respective ipoib_dev_priv structs) and defining a helper function to enqueue all of them while holding the list lock. In ipoib_set_mac, the function is not used and the task is enqueued directly, because in the subsequent patches locking is changed and this function may be called with the netdev instance lock held. This is effectively a noop, the wq is single-threaded and ordered and will execute the same flush operations in the same order as before. Furthermore, there should be no new races because ipoib_parent_unregister_pre() calls flush_workqueue() after stopping new work generation to wait for pending work to complete. flush_workqueue() waits for all currently enqueued work to finish before returning. Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Reviewed-by: Leon Romanovsky Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747829342-1018757-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 28be240c763a44932bfe573f09e145d182e52609 Author: Caleb Sander Mateos Date: Thu May 22 09:04:50 2025 -0600 trace/io_uring: fix io_uring_local_work_run ctx documentation The comment for the tracepoint io_uring_local_work_run refers to a field "tctx" and a type "io_uring_ctx", neither of which exist. "tctx" looks to mean "ctx" and "io_uring_ctx" should be "io_ring_ctx". Signed-off-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250522150451.2385652-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 0b261d7c1cd32dc93cbc92425fb55e67b24c6638 Author: Leon Romanovsky Date: Thu May 22 14:36:18 2025 +0300 RDMA/rxe: Break endless pagefault loop for RO pages RO pages has "perm" equal to 0, that caused to the situation where such pages were marked as needed to have fault and caused to infinite loop. Fixes: eedd5b1276e7 ("RDMA/umem: Store ODP access mask information in PFN") Reported-by: Daisuke Matsuda Closes: https://lore.kernel.org/all/3016329a-4edd-4550-862f-b298a1b79a39@gmail.com/ Link: https://patch.msgid.link/096fab178d48ed86942ee22eafe9be98e29092aa.1747913377.git.leonro@nvidia.com Tested-by: Daisuke Matsuda Signed-off-by: Leon Romanovsky commit bdc319f1c9bf9d8c41467ab7e2ecb1a73f86a6fd Merge: 0ca7cb70894eea 408c97c4a5e0b6 Author: Greg Kroah-Hartman Date: Thu May 22 18:04:43 2025 +0200 Merge tag 'coresight-next-v6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: updates for Linux v6.16 CoreSight self-hosted trace driver subsystem updates for Linux v6.16 includes: - Clear CLAIM tags on device probe if self-hosted tags are set. - Support for perf AUX pause/resume for CoreSight ETM PMU driver, with trace collection at pause. - Miscellaneous fixes for the subsystem Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (27 commits) coresight: prevent deactivate active config while enabling the config coresight: holding cscfg_csdev_lock while removing cscfg from csdev coresight/etm4: fix missing disable active config coresight: etm4x: Fix timestamp bit field handling coresight: tmc: fix failure to disable/enable ETF after reading Documentation: coresight: Document AUX pause and resume coresight: perf: Update buffer on AUX pause coresight: tmc: Re-enable sink after buffer update coresight: perf: Support AUX trace pause and resume coresight: etm4x: Hook pause and resume callbacks coresight: Introduce pause and resume APIs for source coresight: etm4x: Extract the trace unit controlling coresight: cti: Replace inclusion by struct fwnode_handle forward declaration coresight: Disable MMIO logging for coresight stm driver coresight: replicator: Fix panic for clearing claim tag coresight: Add a KUnit test for coresight_find_default_sink() coresight: Remove extern from function declarations coresight: Remove inlines from static function definitions coresight: Clear self hosted claim tag on probe coresight: etm3x: Convert raw base pointer to struct coresight access ... commit e485502c37b097b0bd773baa7e2741bf7bd2909a Author: Mario Limonciello Date: Thu May 22 09:13:28 2025 -0500 Revert "drm/amd: Keep display off while going into S4" commit 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4") attempted to keep displays off during the S4 sequence by not resuming display IP. This however leads to hangs because DRM clients such as the console can try to access registers and cause a hang. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4155 Fixes: 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4") Reviewed-by: Alex Deucher Link: https://lore.kernel.org/r/20250522141328.115095-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 914e0dc5082a335ea5e7d905e99e1a1cde001369 Author: Ming Lei Date: Thu May 22 23:20:40 2025 +0800 ublk: run auto buf unregisgering in same io_ring_ctx with registering UBLK_F_AUTO_BUF_REG requires that the buffer registered automatically is unregistered in same `io_ring_ctx`, so check it explicitly. Document this requirement for UBLK_F_AUTO_BUF_REG. Drop WARN_ON_ONCE() which is triggered from userspace code path. Fixes: 99c1e4eb6a3f ("ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG") Reported-by: Caleb Sander Mateos Reviewed-by: Caleb Sander Mateos Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250522152043.399824-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 3a91f28fab43f093c72312148288d125ae160c2d Author: Ming Lei Date: Thu May 22 23:20:39 2025 +0800 io_uring: add helper io_uring_cmd_ctx_handle() Add helper io_uring_cmd_ctx_handle() for driver to track per-context resource, such as registered kernel io buffer. Suggested-by: Caleb Sander Mateos Signed-off-by: Ming Lei Reviewed-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250522152043.399824-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 42f520f70d6ca066808026d0b6163040ee1d9b9d Author: Lijo Lazar Date: Tue May 13 18:57:21 2025 +0530 drm/amd/pm: Fetch partition metrics on SMUv13.0.12 Add support to fetch compute partition related metrics in SMUv13.0.12 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fa75a9680b381647999f6a6329a993a99a6fd1fa Author: Aurabindo Pillai Date: Wed May 21 10:22:46 2025 -0400 Revert "drm/amd/display: [FW Promotion] Release 0.1.11.0" This reverts commit 81fc9ca25f02c53c055b842a40f2a915bd0bd5e0 since it introduces incompatbility with older firmware Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a359288ccb4dd8edb086e7de8fdf6e36f544c922 Author: Philip Yang Date: Wed May 14 11:13:52 2025 -0400 drm/amdgpu: seq64 memory unmap uses uninterruptible lock To unmap and free seq64 memory when drm node close to free vm, if there is signal accepted, then taking vm lock failed and leaking seq64 va mapping, and then dmesg has error log "still active bo inside vm". Change to use uninterruptible lock fix the mapping leaking and no dmesg error log. Signed-off-by: Philip Yang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b758667f55a09bc86ac0cb230c4e0e5ca931a3a5 Author: Mangesh Gadre Date: Tue May 13 13:20:20 2025 +0800 drm/amdgpu: update ras support check update ras support check for vcn 5.0.1 Signed-off-by: Mangesh Gadre Reviewed-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 25e9fb6e3ad885a83437f4aab1039bbbaab13d92 Author: Mangesh Gadre Date: Fri May 16 08:06:00 2025 +0800 drm/amdgpu: Enable RAS for jpeg 5.0.1 Enable jpeg ras posion processing and aca error logging Signed-off-by: Mangesh Gadre Reviewed-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8d74ce4e5524b39e991bfa025f1382e54c5f710a Author: Mangesh Gadre Date: Wed May 14 13:17:02 2025 +0800 drm/amdgpu: Add jpeg poison status reg added registers to enable jpeg ras Signed-off-by: Mangesh Gadre Reviewed-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5035caf18d88cde5a1fd661dbb45b1229816c07e Author: Mangesh Gadre Date: Fri May 16 07:52:14 2025 +0800 drm/amdgpu: Enable RAS for vcn 5.0.1 Enable vcn ras posion processing and aca error logging Signed-off-by: Mangesh Gadre Reviewed-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 076873e5b360ccd91687e23c6ca0042a0356b9eb Author: Wayne Lin Date: Tue May 20 09:34:42 2025 +0800 drm/amd/display: Add a new dcdebugmask to allow skip detection LT Under specific embedded scenarios, we might still use DP interface rather than eDP interface. Under such case, detection link training is unnecessary. Add a new dcdebugmask value that can be used to skip the detection LT Reviewed-by: Tom Chung Link: https://lore.kernel.org/amd-gfx/20250521063934.2111323-1-Wayne.Lin@amd.com/ Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher commit 02fd27e6cf853e55cebcefb4aa7a9828a6848510 Author: Melissa Wen Date: Fri Apr 25 17:52:30 2025 -0300 drm/amd/display: no 3D and blnd LUT as DPP color caps for DCN401 Match what is declared as DPP color caps with hw caps. DCN401 has MPC shaper + 3D LUTs that are movable before and after blending (get from plane or stream), but no DPP blend LUTs. Signed-off-by: Melissa Wen Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit f9f403218e1ca947a1a017be01da6ae7fb637eba Author: Melissa Wen Date: Tue May 13 18:38:17 2025 -0300 drm/amd/display: only collect data if debug gamut_remap is available Color gamut_remap state log may be not available for some hw versions, so prevent null pointer dereference by checking if there is a function to collect data for this hw version. Signed-off-by: Melissa Wen Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit dd64956685fa48358c4152d952070c8c073e5f89 Author: Tvrtko Ursulin Date: Mon May 19 17:37:12 2025 +0100 drm/amdgpu: Remove duplicated "context still alive" check When amdgpu_ctx_mgr_fini() calls amdgpu_ctx_mgr_entity_fini() it contains the exact same "context still alive" check as it will do next. Remove the duplicated copy. Reviewed-by: Christian König Signed-off-by: Tvrtko Ursulin Cc: Alex Deucher Cc: Christian König Signed-off-by: Alex Deucher commit 16f2c942b6e44a0c3970134c8c460c7fd465ac9d Author: Tvrtko Ursulin Date: Mon May 19 17:37:11 2025 +0100 drm/amdgpu: Make amdgpu_ctx_mgr_entity_fini static Function amdgpu_ctx_mgr_entity_fini() only has a single local caller so lets make it local. Reviewed-by: Christian König Signed-off-by: Tvrtko Ursulin Cc: Alex Deucher Cc: Christian König Signed-off-by: Alex Deucher commit e90bd6d898165c281b5582361857e7bc8e0f917d Author: Alex Deucher Date: Wed May 7 16:51:38 2025 -0400 drm/amdgpu: Update runtime pm checks Don't enable BACO when in passthrough. PCI resets don't work correctly when in BACO. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f55fcf15a9c585d0a3f294307f1499d3759459c6 Author: Mangesh Gadre Date: Wed May 14 12:31:36 2025 +0800 drm/amdgpu: Add vcn poison status reg added register to enable vcn ras Signed-off-by: Mangesh Gadre Reviewed-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 74956242a0dfe4ef7fef0f9a4e8f7ea7415be97b Author: Lijo Lazar Date: Fri May 16 20:16:57 2025 +0530 drm/amd/pm: Use external link order for xgmi data xgmi_port_num interface reports external link number for port number. To be consistent, use the external link number for reporting other XGMI link data also. v2: For invalid link number return -EINVAL (Kevin) Signed-off-by: Lijo Lazar Acked-by: Yang Wang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8f9f3854a14efe34824d278a6127aed54b1294fc Author: Jihed Chaibi Date: Sat May 17 05:09:35 2025 +0200 drm/radeon: fixing typo in macro name "ENABLE" is currently misspelled in SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS Signed-off-by: Jihed Chaibi Signed-off-by: Alex Deucher commit ae6f4ab96be19395b8977f65670ae60d01096a83 Author: Jihed Chaibi Date: Sat May 17 05:06:09 2025 +0200 drm/amdgpu: fixing typo in macro name "ENABLE" is currently misspelled in SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS PS: checkpatch.pl is complaining about the presence of a space at the start of drivers/gpu/drm/amd/include/atomfirmware.h line: 1716 This is propably because this file uses (two) spaces and not tabs. Signed-off-by: Jihed Chaibi Signed-off-by: Alex Deucher commit 05daa7c739f43aec4358f5a4c291e1b2d0fc7885 Author: Daniil Ryabov Date: Sat May 17 02:35:16 2025 +0300 drm/amd/display: fix typo in comments Fix double 'u' in 'frequuency' Signed-off-by: Daniil Ryabov Signed-off-by: Alex Deucher commit 57d4100cc94fe5a8dcabd72a66ed1d5c6f14291a Author: Leonardo Gomes Date: Sat May 17 11:20:55 2025 -0300 drm/amd/display: Adjust set_value function with prefix to help in ftrace Adjust set_value function in hw_hpd.c file to have prefix to help in ftrace, the name change from 'set_value' to 'dal_hw_hpd_set_value' Signed-off-by: Leonardo da Silva Gomes Co-developed-by: Derick Frias Signed-off-by: Derick Frias Signed-off-by: Alex Deucher commit f0e9c6f67a02eea72aab9f598b884395876b971b Author: Leonardo Gomes Date: Sat May 17 11:20:54 2025 -0300 drm/amd/display: Adjust get_value function with prefix to help in ftrace Adjust get_value function in hw_hpd.c file to have prefix to help in ftrace, the name change from 'get_value' to 'dal_hw_hpd_get_value' Signed-off-by: Leonardo da Silva Gomes Co-developed-by: Derick Frias Signed-off-by: Derick Frias Signed-off-by: Alex Deucher commit 4cd694fdbf453a6fe875ad6236b04d7b9a5e49db Author: Lijo Lazar Date: Mon May 5 16:55:34 2025 +0530 drm/amd/pm: Fetch partition metrics on SMUv13.0.6 Add support to fetch compute partition related metrics in SMUv13.0.6 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cbbab29246c8b22c3d6285756dd14992cbaa2d5e Author: Lijo Lazar Date: Mon May 5 15:18:06 2025 +0530 drm/amdgpu: Add sysfs nodes for partition Add sysfs nodes to provide compute paritition specific data. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 54a01f775194a8b5acc6bd735aa0d092469dcff7 Author: Lijo Lazar Date: Mon May 5 16:53:29 2025 +0530 drm/amd/pm: Add support to query partition metrics Add interfaces to query compute partition related metrics data. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1b2231de416312f96e29b9761bd06de1d637492e Author: Stanley.Yang Date: Tue May 13 20:10:05 2025 +0800 drm/amdgpu: Register aqua vanjaram jpeg poison irq Register aqua vanjaram jpeg poison irq, add jpeg poison handle. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4c4a89149608c5b006570b933e893a06c45edfe1 Author: Stanley.Yang Date: Tue May 13 19:46:08 2025 +0800 drm/amdgpu: Register aqua vanjaram vcn poison irq Register aqua vanjaram vcn poison irq, add vcn poison handle. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1327d8f4061c08c29ea8ce7bb89e209d3c1e8b29 Author: Lijo Lazar Date: Tue Apr 29 08:37:38 2025 +0530 drm/amd/pm: Use macro to initialize metrics table Helps to keep a build time check about usage of right datatype and avoids maintenance as new versions get added. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 2ed4fd99690ba1efab204f03be80fabd6c0ec3cf Author: Asad Kamal Date: Wed Apr 30 00:40:50 2025 +0800 drm/amd/pm: Fill pldm version for SMU v13.0.6 SOCs Fetch pldm version from static metrics table for SMU v13.0.6 SOCs Signed-off-by: Asad Kamal Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7f30f8ef6547d67c1932697d6b5b971665b43e5b Author: Asad Kamal Date: Wed Apr 30 00:25:01 2025 +0800 drm/amd/pm: Update pmfw headers for smu_v_13_0_6 Update pmfw headers for smu_v_13_0_6 to include pldm version as part of statics metrics table Signed-off-by: Asad Kamal Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0132ba7ff0f613915d332a30fcf14cf66e317f98 Author: Jesse.Zhang Date: Thu May 15 15:02:13 2025 +0800 drm/amdgpu: Fix eviction fence worker race during fd close The current cleanup order during file descriptor close can lead to a race condition where the eviction fence worker attempts to access a destroyed mutex from the user queue manager: [ 517.294055] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 517.294060] WARNING: CPU: 8 PID: 2030 at kernel/locking/mutex.c:564 [ 517.294094] Workqueue: events amdgpu_eviction_fence_suspend_worker [amdgpu] The issue occurs because: 1. We destroy the user queue manager (including its mutex) first 2. Then try to destroy eviction fences which may have pending work 3. The eviction fence worker may try to access the already-destroyed mutex Fix this by reordering the cleanup to: 1. First mark the fd as closing and destroy eviction fences, which flushes any pending work 2. Then safely destroy the user queue manager after we're certain no more fence work will be executed The copy in amdgpu_driver_postclose_kms() needs to be removed (Christian) Reviewed-by: Christian König Reviewed-by: Prike Liang Reviewed-by: Arvind Yadav Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher commit b2c11e27080d8556664c20c30ca3527ffa99bec4 Author: Prike Liang Date: Wed Apr 30 10:34:14 2025 +0800 drm/amdgpu: lock the eviction fence for wq signals it Lock and refer to the eviction fence before the eviction fence schedules work queue tries to signal it. Suggested-by: Christian König Signed-off-by: Prike Liang Acked-by: Alex Deucher Reviewed-by: Arvind Yadav Reviewed-by: Christian König Signed-off-by: Alex Deucher commit eed6a6b2264078806163424b7cb70a3b47cb8e97 Author: Andrey Vatoropin Date: Wed Apr 2 14:12:25 2025 +0000 drm/amdkfd: Change svm_range_get_info return type Static analysis shows that pointer "svms" cannot be NULL because it points to the object "struct svm_range_list". Remove the extra NULL check. It is meaningless and harms the readability of the code. In the function svm_range_get_info() there is no possibility of failure. Therefore, the caller of the function svm_range_get_info() does not need a return value. Change the function svm_range_get_info() return type from "int" to "void". Since the function svm_range_get_info() has a return type of "void". The caller of the function svm_range_get_info() does not need a return value. Delete extra code. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Vatoropin Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ea3b0b7f541b9511abe2b89547c95458804f38e2 Author: David Thompson Date: Tue Mar 18 17:47:47 2025 -0400 EDAC/bluefield: Don't use bluefield_edac_readl() result on error The bluefield_edac_readl() routine returns an uninitialized result on error paths. In those cases the calling routine should not use the uninitialized result. The driver should simply log the error, and then return early. Fixes: e41967575474 ("EDAC/bluefield: Use Arm SMC for EMI access on BlueField-2") Signed-off-by: David Thompson Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shravan Kumar Ramani Link: https://lore.kernel.org/20250318214747.12271-1-davthompson@nvidia.com commit d90f0bce579c66ac1066edf36203bd5596fd978b Merge: 4e2e6841ff761c 7f332f9fe9d854 Author: Alexei Starovoitov Date: Thu May 22 08:40:57 2025 -0700 Merge branch 's390-bpf-use-kernel-s-expoline-thunks' Ilya Leoshkevich says: ==================== This series simplifies the s390 JIT by replacing the generation of expolines (Spectre mitigation) with using the ones from the kernel text. This is possible thanks to the V!=R s390 kernel rework. Patch 1 is a small prerequisite for arch/s390 that I would like to get in via the BPF tree. It has Heiko's Acked-by. Patches 2 and 3 are the implementation. ==================== Link: https://patch.msgid.link/20250519223646.66382-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 7f332f9fe9d854c1680fea223b6cb04530859a1a Author: Ilya Leoshkevich Date: Mon May 19 23:30:06 2025 +0100 s390/bpf: Use kernel's expoline thunks Simplify the JIT code by replacing the custom expolines with the ones defined in the kernel text. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250519223646.66382-4-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 9053ba042fc7c0e718566932288cc88b3bb2dbe1 Author: Ilya Leoshkevich Date: Mon May 19 23:30:05 2025 +0100 s390/bpf: Add macros for calling external functions After the V!=R rework (commit c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address spaces")), kernel and BPF programs are allocated within a 4G region, making it possible to use relative addressing to directly use kernel functions from BPF code. Add two new macros for calling kernel functions from BPF code: EMIT6_PCREL_RILB_PTR() and EMIT6_PCREL_RILC_PTR(). Factor out parts of the existing macros that are helpful for implementing the new ones. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250519223646.66382-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit f7562001c8b854390899b53d06ba4202c89339e6 Author: Ilya Leoshkevich Date: Mon May 19 23:30:04 2025 +0100 s390: always declare expoline thunks It would be convenient to use the following pattern in the BPF JIT: if (nospec_uses_trampoline()) emit_call(__s390_indirect_jump_r1); Unfortunately with CONFIG_EXPOLINE=n the compiler complains about the missing prototype of __s390_indirect_jump_r1(). One could wrap the whole "if" statement in an #ifdef, but this clutters the code. Instead, declare expoline thunk prototypes even when compiling without expolines. When using the above code structure and compiling without expolines, references to them are optimized away, and there are no linker errors. Acked-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250519223646.66382-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit db807e5ef8eea6948bb4993466623046f52d3056 Author: Taehee Yoo Date: Tue May 20 07:11:55 2025 +0000 eth: bnxt: fix deadlock when xdp is attached or detached When xdp is attached or detached, dev->ndo_bpf() is called by do_setlink(), and it acquires netdev_lock() if needed. Unlike other drivers, the bnxt driver is protected by netdev_lock while xdp is attached/detached because it sets dev->request_ops_lock to true. So, the bnxt_xdp(), that is callback of ->ndo_bpf should not acquire netdev_lock(). But the xdp_features_{set | clear}_redirect_target() was changed to acquire netdev_lock() internally. It causes a deadlock. To fix this problem, bnxt driver should use xdp_features_{set | clear}_redirect_target_locked() instead. Splat looks like: ============================================ WARNING: possible recursive locking detected 6.15.0-rc6+ #1 Not tainted -------------------------------------------- bpftool/1745 is trying to acquire lock: ffff888131b85038 (&dev->lock){+.+.}-{4:4}, at: xdp_features_set_redirect_target+0x1f/0x80 but task is already holding lock: ffff888131b85038 (&dev->lock){+.+.}-{4:4}, at: do_setlink.constprop.0+0x24e/0x35d0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->lock); lock(&dev->lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by bpftool/1745: #0: ffffffffa56131c8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_setlink+0x1fe/0x570 #1: ffffffffaafa75a0 (&net->rtnl_mutex){+.+.}-{4:4}, at: rtnl_setlink+0x236/0x570 #2: ffff888131b85038 (&dev->lock){+.+.}-{4:4}, at: do_setlink.constprop.0+0x24e/0x35d0 stack backtrace: CPU: 1 UID: 0 PID: 1745 Comm: bpftool Not tainted 6.15.0-rc6+ #1 PREEMPT(undef) Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 Call Trace: dump_stack_lvl+0x7a/0xd0 print_deadlock_bug+0x294/0x3d0 __lock_acquire+0x153b/0x28f0 lock_acquire+0x184/0x340 ? xdp_features_set_redirect_target+0x1f/0x80 __mutex_lock+0x1ac/0x18a0 ? xdp_features_set_redirect_target+0x1f/0x80 ? xdp_features_set_redirect_target+0x1f/0x80 ? __pfx_bnxt_rx_page_skb+0x10/0x10 [bnxt_en ? __pfx___mutex_lock+0x10/0x10 ? __pfx_netdev_update_features+0x10/0x10 ? bnxt_set_rx_skb_mode+0x284/0x540 [bnxt_en ? __pfx_bnxt_set_rx_skb_mode+0x10/0x10 [bnxt_en ? xdp_features_set_redirect_target+0x1f/0x80 xdp_features_set_redirect_target+0x1f/0x80 bnxt_xdp+0x34e/0x730 [bnxt_en 11cbcce8fa11cff1dddd7ef358d6219e4ca9add3] dev_xdp_install+0x3f4/0x830 ? __pfx_bnxt_xdp+0x10/0x10 [bnxt_en 11cbcce8fa11cff1dddd7ef358d6219e4ca9add3] ? __pfx_dev_xdp_install+0x10/0x10 dev_xdp_attach+0x560/0xf70 dev_change_xdp_fd+0x22d/0x280 do_setlink.constprop.0+0x2989/0x35d0 ? __pfx_do_setlink.constprop.0+0x10/0x10 ? lock_acquire+0x184/0x340 ? find_held_lock+0x32/0x90 ? rtnl_setlink+0x236/0x570 ? rcu_is_watching+0x11/0xb0 ? trace_contention_end+0xdc/0x120 ? __mutex_lock+0x946/0x18a0 ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xa95/0x28f0 ? rcu_is_watching+0x11/0xb0 ? rcu_is_watching+0x11/0xb0 ? cap_capable+0x172/0x350 rtnl_setlink+0x2cd/0x570 Fixes: 03df156dd3a6 ("xdp: double protect netdev->xdp_flags with netdev->lock") Signed-off-by: Taehee Yoo Reviewed-by: Simon Horman Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250520071155.2462843-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 8b53f46eb430fe5b42d485873b85331d2de2c469 Author: Florian Westphal Date: Wed May 21 11:38:47 2025 +0200 netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy With a VRF, ipv4 and ipv6 FIB expression behave differently. fib daddr . iif oif Will return the input interface name for ipv4, but the real device for ipv6. Example: If VRF device name is tvrf and real (incoming) device is veth0. First round is ok, both ipv4 and ipv6 will yield 'veth0'. But in the second round (incoming device will be set to "tvrf"), ipv4 will yield "tvrf" whereas ipv6 returns "veth0" for the second round too. This makes ipv6 behave like ipv4. A followup patch will add a test case for this, without this change it will fail with: get element inet t fibif6iif { tvrf . dead:1::99 . tvrf } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAIL: did not find tvrf . dead:1::99 . tvrf in fibif6iif Alternatively we could either not do anything at all or change ipv4 to also return the lower/real device, however, nft (userspace) doc says "iif: if fib lookup provides a route then check its output interface is identical to the packets input interface." which is what the nft fib ipv4 behaviour is. Fixes: f6d0cbcf09c5 ("netfilter: nf_tables: add fib expression") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 98287045c9797fd3dd30422d92077e511809b4b9 Author: Florian Westphal Date: Wed May 21 11:38:46 2025 +0200 selftests: netfilter: move fib vrf test to nft_fib.sh It was located in conntrack_vrf.sh because that already had the VRF bits. Lets not add to this and move it to nft_fib.sh where this belongs. No functional changes for the subtest intended. The subtest is limited, it only covered 'fib oif' (route output interface query) when the incoming interface is part of a VRF. Next we can extend it to cover 'fib type' for VRFs and also check fib results when there is an unrelated VRF in same netns. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 839340f7c7bb9a83b95bdf1abbef6dff990e35f5 Author: Florian Westphal Date: Wed May 21 11:38:45 2025 +0200 selftests: netfilter: nft_fib.sh: add 'type' mode tests fib can either lookup the interface id/name of the output interface that would be used for the given address, or it can check for the type of the address according to the fib, e.g. local, unicast, multicast and so on. This can be used to e.g. make a locally configured address only reachable through its interface. Example: given eth0:10.1.1.1 and eth1:10.1.2.1 then 'fib daddr type' for 10.1.1.1 arriving on eth1 will be 'local', but 'fib daddr . iif type' is expected to return 'unicast', whereas 'fib daddr' and 'fib daddr . iif' are expected to indicate 'local' if such a packet arrives on eth0. So far nft_fib.sh only covered oif/oifname, not type. Repeat tests both with default and a policy (ip rule) based setup. Also try to run all remaining tests even if a subtest has failed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c38eb2973c18d34a8081d173a6ad298461f4a37c Author: Florian Westphal Date: Fri May 16 16:12:13 2025 +0200 netfilter: xtables: support arpt_mark and ipv6 optstrip for iptables-nft only builds Its now possible to build a kernel that has no support for the classic xtables get/setsockopt interfaces and builtin tables. In this case, we have CONFIG_IP6_NF_MANGLE=n and CONFIG_IP_NF_ARPTABLES=n. For optstript, the ipv6 code is so small that we can enable it if netfilter ipv6 support exists. For mark, check if either classic arptables or NFT_ARP_COMPAT is set. Fixes: a9525c7f6219 ("netfilter: xtables: allow xtables-nft only builds") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d31c1cafc4a7b790f752f2816e275d14fcb9aeef Author: Florian Westphal Date: Tue May 6 15:07:11 2025 +0200 selftests: netfilter: nft_concat_range.sh: add coverage for 4bit group representation Pipapo supports a more compact '4 bit group' format that is chosen when the memory needed for the default exceeds a threshold (2mb). Add coverage for those code paths, the existing tests use small sets that are handled by the default representation. This comes with a test script run-time increase, but I think its ok: normal: 2m35s -> 3m9s debug: 3m24s -> 5m29s (with KSFT_MACHINE_SLOW=yes). Cc: Stefano Brivio Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 471db2c2d4f80ee94225a1ef246e4f5011733e50 Author: Lin.Cao Date: Thu May 15 10:07:13 2025 +0800 drm/scheduler: signal scheduled fence when kill job When an entity from application B is killed, drm_sched_entity_kill() removes all jobs belonging to that entity through drm_sched_entity_kill_jobs_work(). If application A's job depends on a scheduled fence from application B's job, and that fence is not properly signaled during the killing process, application A's dependency cannot be cleared. This leads to application A hanging indefinitely while waiting for a dependency that will never be resolved. Fix this issue by ensuring that scheduled fences are properly signaled when an entity is killed, allowing dependent applications to continue execution. Signed-off-by: Lin.Cao Reviewed-by: Philipp Stanner Signed-off-by: Christian König Link: https://lore.kernel.org/r/20250515020713.1110476-1-lincao12@amd.com commit a95fadf4a2998949f41e31a03326d2a46a360f0d Author: Lukas Bulwahn Date: Tue Mar 25 10:21:59 2025 +0100 MAINTAINERS: Adjust the file entry in SIEMENS IPC LED DRIVERS Commit 835a0c10d33b ("leds: Rename simple directory to simatic") renames the driver's directory to drivers/leds/simatic, but misses to adjust the SIEMENS IPC LED DRIVERS section in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Adjust the file entry to this renaming. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20250325092159.213463-1-lukas.bulwahn@redhat.com Signed-off-by: Lee Jones commit 70a9d374293b42055626d59c2eeeff4d624806bf Author: Wolfram Sang Date: Tue Mar 18 10:12:12 2025 +0100 mfd: tps65010: Use per-client debugfs directory The I2C core now provides a debugfs entry for each client. Let this driver use it instead of the root directory. Further improvements by this change: automatic support of multiple instances. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250318091234.22170-1-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 1d2aeee6dd629084cc524ec2d00100e70aa3c824 Author: Wolfram Sang Date: Tue Mar 18 10:13:41 2025 +0100 mfd: aat2870: Use per-client debugfs directory The I2C core now provides a debugfs entry for each client. Let this driver use it instead of the custom directory in debugfs root. Further improvements by this change: automatic clean up on removal, support of multiple instances. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250318091426.22258-2-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 18e6c1d2a7e2b35311c5b82abd7d4ee8ef541369 Merge: e36d96a2a1aae8 3f51b232c1da8e 8824dc7f947ac5 5d61bb1675ff76 ef7f3631a44b8e Author: Lee Jones Date: Thu May 22 15:49:34 2025 +0100 Merge branches 'ib-firmware-mfd-6.16', 'ib-mfd-clocksource-pwm-6.16', 'ib-mfd-gpio-nvmem-6.16', 'ib-mfd-regulator-6.16' and 'ib-mfd-regulator-6.16-1' into ibs-for-mfd-merged commit 4e2e6841ff761cc15a54e8bebcf35d7325ec78a2 Author: Di Shen Date: Tue May 20 13:49:43 2025 +0800 bpf: Revert "bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe attach logic" This reverts commit 4a8f635a6054. Althought get_pid_task() internally already calls rcu_read_lock() and rcu_read_unlock(), the find_vpid() was not. The documentation for find_vpid() clearly states: "Must be called with the tasklist_lock or rcu_read_lock() held." Add proper rcu_read_lock/unlock() to protect the find_vpid(). Fixes: 4a8f635a6054 ("bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe attach logic") Reported-by: Xuewen Yan Signed-off-by: Di Shen Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20250520054943.5002-1-xuewen.yan@unisoc.com Signed-off-by: Alexei Starovoitov commit bfc6270ab3ff9478a4cad4d49482854d632dbce3 Author: Alison Schofield Date: Wed May 21 16:36:23 2025 -0700 cxl/features: Remove the inline specifier from to_cxlfs() to_cxlfs() was declared 'inline' in the header but only defined in drivers/cxl/core/features.c. This has worked because features.c was the only file using the function and the definition happened to be available in the same compilation unit. However, in preparation for a second .c file using the header and needing to call the function, the inline specifier became an issue. Sparse flagged the declaration as invalid since 'inline' requires a visible definition at the point of use. Defining the function in the header was considered but rejected, as it depends on internal symbols not visible at that level. Remove the inline specifier to correct the linkage violation. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Shiju Jose Link: https://patch.msgid.link/20250521233625.1745849-1-alison.schofield@intel.com Signed-off-by: Dave Jiang commit 774a1fa880bc949d88b5ddec9494a13be733dfa8 Author: Niklas Schnelle Date: Thu May 22 14:13:15 2025 +0200 s390/pci: Serialize device addition and removal Prior changes ensured that when zpci_release_device() is called and it removed the zdev from the zpci_list this instance can not be found via the zpci_list anymore even while allowing re-add of reserved devices. This only accounts for the overall lifetime and zpci_list addition and removal, it does not yet prevent concurrent add of a new instance for the same underlying device. Such concurrent add would subsequently cause issues such as attempted re-use of the same IOMMU sysfs directory and is generally undesired. Introduce a new zpci_add_remove_lock mutex to serialize adding a new device with removal. Together this ensures that if a struct zpci_dev is not found in the zpci_list it was either already removed and torn down, or its removal and tear down is in progress with the zpci_add_remove_lock held. Cc: stable@vger.kernel.org Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") Reviewed-by: Gerd Bayer Tested-by: Gerd Bayer Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 4b1815a52d7eb03b3e0e6742c6728bc16a4b2d1d Author: Niklas Schnelle Date: Thu May 22 14:13:14 2025 +0200 s390/pci: Allow re-add of a reserved but not yet removed device The architecture assumes that PCI functions can be removed synchronously as PCI events are processed. This however clashes with the reference counting of struct pci_dev which allows device drivers to hold on to a struct pci_dev reference even as the underlying device is removed. To bridge this gap commit 2a671f77ee49 ("s390/pci: fix use after free of zpci_dev") keeps the struct zpci_dev in ZPCI_FN_STATE_RESERVED state until common code releases the struct pci_dev. Only when all references are dropped, the struct zpci_dev can be removed and freed. Later commit a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") moved the deletion of the struct zpci_dev from the zpci_list in zpci_release_device() to the point where the device is reserved. This was done to prevent handling events for a device that is already being removed, e.g. when the platform generates both PCI event codes 0x304 and 0x308. In retrospect, deletion from the zpci_list in the release function without holding the zpci_list_lock was also racy. A side effect of this handling is that if the underlying device re-appears while the struct zpci_dev is in the ZPCI_FN_STATE_RESERVED state, the new and old instances of the struct zpci_dev and/or struct pci_dev may clash. For example when trying to create the IOMMU sysfs files for the new instance. In this case, re-adding the new instance is aborted. The old instance is removed, and the device will remain absent until the platform issues another event. Fix this by allowing the struct zpci_dev to be brought back up right until it is finally removed. To this end also keep the struct zpci_dev in the zpci_list until it is finally released when all references have been dropped. Deletion from the zpci_list from within the release function is made safe by using kref_put_lock() with the zpci_list_lock. This ensures that the releasing code holds the last reference. Cc: stable@vger.kernel.org Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") Reviewed-by: Gerd Bayer Tested-by: Gerd Bayer Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 47c397844869ad0e6738afb5879c7492f4691122 Author: Niklas Schnelle Date: Thu May 22 14:13:13 2025 +0200 s390/pci: Prevent self deletion in disable_slot() As disable_slot() takes a struct zpci_dev from the Configured to the Standby state. In Standby there is still a hotplug slot so this is not usually a case of sysfs self deletion. This is important because self deletion gets very hairy in terms of locking (see for example recover_store() in arch/s390/pci/pci_sysfs.c). Because the pci_dev_put() is not within the critical section of the zdev->state_lock however, disable_slot() can turn into a case of self deletion if zPCI device event handling slips between the mutex_unlock() and the pci_dev_put(). If the latter is the last put and zpci_release_device() is called this then tries to remove the hotplug slot via zpci_exit_slot() which will try to remove the hotplug slot directory the disable_slot() is part of i.e. self deletion. Prevent this by widening the zdev->state_lock critical section to include the pci_dev_put() which is then guaranteed to happen with the struct zpci_dev still in Standby state ensuring it will not lead to a zpci_release_device() call as at least the zPCI event handling code still holds a reference. Cc: stable@vger.kernel.org Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") Reviewed-by: Gerd Bayer Tested-by: Gerd Bayer Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit d76f9633296785343d45f85199f4138cb724b6d2 Author: Niklas Schnelle Date: Thu May 22 14:13:12 2025 +0200 s390/pci: Remove redundant bus removal and disable from zpci_release_device() Remove zpci_bus_remove_device() and zpci_disable_device() calls from zpci_release_device(). These calls were done when the device transitioned into the ZPCI_FN_STATE_STANDBY state which is guaranteed to happen before it enters the ZPCI_FN_STATE_RESERVED state. When zpci_release_device() is called the device is known to be in the ZPCI_FN_STATE_RESERVED state which is also checked by a WARN_ON(). Cc: stable@vger.kernel.org Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") Reviewed-by: Gerd Bayer Reviewed-by: Julian Ruess Tested-by: Gerd Bayer Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 050a3e71ce24c6f18d70679d68056f76375ff51c Author: Mikulas Patocka Date: Mon May 19 23:56:11 2025 -0400 dm mpath: replace spin_lock_irqsave with spin_lock_irq Replace spin_lock_irqsave/spin_unlock_irqrestore with spin_lock_irq/spin_unlock_irq at places where it is known that interrupts are enabled. Signed-off-by: Mikulas Patocka Signed-off-by: Benjamin Marzinski commit 0ca7cb70894eeaf3f401f43d364977076fea0293 Merge: 16d693749866f2 0c86e33819785f Author: Greg Kroah-Hartman Date: Thu May 22 15:54:52 2025 +0200 Merge tag 'iio-for-6.16a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: New device support, features and cleanup for 6.16 - take 2 Note - last minute rebase was to drop a typo patch that I'd accidentally picked up (in the microblaze arch Kconfig) Take 2 is due to that rebase messing up some fixes tags that were referring to patches after that point. There is a known merge conflict due to changes in neighbouring lines. Stephen's resolution in linux-next is: https://lore.kernel.org/linux-next/20250506155728.65605bae@canb.auug.org.au/ Added 3 named IIO reviewers to MAINTAINERS. This is a reflection of those who have been doing much of this work for some time. Lars-Peter is removed from the entry having moved on to other topics. Thanks Nuno, David and Andy for stepping up and Lars-Peter for all your hard work in the past! Includes the usual mix of new device support, features and general cleanup. This time we also have some tree wide changes. - Rip out the iio_device_claim_direct_scoped() as it proved hard to work with. This series includes quite a few related cleanups such as use of guard or factoring code out to allow direct returns. - Switch from iio_device_claim/release_direct_mode() to new iio_device_claim/release_direct() which is structured so that sparse can warn on failed releases. There were a few false positives but those were mostly in code that benefited from being cleaned up as part of this process. - Introduce iio_push_to_buffers_with_ts() to replace the _timestamp() version over time. This version takes the size of the supplied buffer which the core checks is at least as big as expected by calculation from channel descriptions of those channels enabled. Use this in an initial set of drivers. - Add macros for IIO_DECLARE_BUFFER_WITH_TS() and IIO_DECLARE_DMA_BUFFER_WITH_TS() to avoid lots of fiddly code to ensure correctly aligned buffers for timestamps being added onto the end of channel data. New device support ------------------ adi,ad3530r - New driver for AD3530, AD3530R, AD3531 and AD3531R DACs with programmable gain controls. R variants have internal references. adi,ad7476 - Add support (dt compatible only) for the Rohm BU79100G ADC which is fully compatible with the ti,ads7866. adi,ad7606 - Support ad7606c-16 and ad7606c-18 devices. Includes switch to dynamic channel information allocation. adi,ad7380 - Add support for the AD7389-4 dfrobot,sen0322 - New driver for this oxygen sensor. mediatek,mt2701-auxadc - Add binding for MT6893 which is fully compatible with already supported MT8173. meson-saradc - Support the GXLX SoCs. Mostly this is a workaround for some unrelated clock control bits found in the ADC register map. nuvoton,nct7201 - New driver for NCT7201 and NCT7202 I2C ADCs. rohm,bd79124 - New driver for this 12-bit, 8-channel SAR ADC. - Switch to new set_rv etc gpio callbacks that were added in 6.15. rohm,bd79703 - Add support for BD79700, BD79701 and BD79702 DACs that have subsets of functionality of the already supported bd79703. Included making this driver suitable for support device variants. st,stm32-lptimer - Add support for stm32pm25 to this trigger. Features -------- Beyond IIO - Property iterator for named children. core - Enable writes for 64 bit integers used for standard IIO ABI elements. Previously these could be read only. - Helper library that should avoid code duplication for simpler ADC bindings that have a child node per channel. - Enforce that IIO_DMA_MINALIGN is always at least 8 (almost always true and simplifies code on all significant architectures) core/backend - Add support to control source of data - useful when the HDL includes things like generated ramps for testing purposes. Enable this for adi-axi-dac adi,ad3552-hs - Add debugfs related callbacks to allow debug access to register contents. adi,ad4000 - Support SPI offload with appropriate FPGA firmware along with improving documentation. adi,ad7293 - Add support for external reference voltage. adi,ad7606 - Support SPI offload. adi,ad7768-1 - Support reset GPIO. adi,admv8818 - Support filter frequencies beyond 2^32. adi,adxl345 - Add single and double tap events. hid-sensor-prox - Support 16-bit report sizes as seen on some Intel platforms. invensense,icm42600 - Enable use of named interrupts to avoid problems with some wiring choices. Get the interrupt by name, but fallback to previous assumption on the first being INT1 if no names are supplied. microchip,mcp3911 - Add reset gpio support. rohm,bh7150 - Add reset gpio support. st,stm32 - Add support to control oversampling. ti,adc128s052 - Add support for ROHM BD79104 which is early compatible with the TI parts already supported by this driver. Includes some general driver cleanup and a separate dt binding. - Simplify reference voltage handling by assuming it is fixed after enabling the supply. winsen,mhz19b - New driver for this C02 sensor. Cleanup and minor fixes ----------------------- dt-bindings - Correct indentation and style for DTS examples. - Use unevalutateProperties for SPI devices instead of additionalProperties to allow generic SPI properties from spi-peripheral-props.yaml ABI Docs - Add missing docs for sampling_frequency when it applies only to events. Treewide - Various minor tweaks, comment fixes and similar. - Sort TI ADCs in Kconfig that had gotten out of order. - Switch various drives that provide GPIO chip functionality to the new callbacks with return values. - Standardize on { } formatting for all array sentinels. - Make use of aligned_s64 in a few places to replace either wrong types or manually defined equivalents. - Drop places where spi bits_per_word is set to 8 because that is the default anyway. adi,ad_sigma_delta library - Avoid a potential use of uninitialized data if reg_size has a value that is not supported (no drivers hit this but it is reasonable hardening) adi,ad4030 - Add error checking for scan types and no longer store it in state. - Rework code to reduce duplication. - Move setting the mode from buffer preenable() to update_scan_mode(), better matching expected semantics of the two different callbacks. - Improve data marshalling comments. adi,ad4695 - Use u16 for buffer elements as oversampling is not yet supported except with SPI offload (which doesn't use this path). adi,ad5592r - Clean up destruction of mutexes. - Use lock guards to simplify code (later patch fixes a missed unlock) adi,ad5933 - Correct some incorrect settling times. adi,ad7091 - Deduplicate handling of writable vs volatile registers as they are the inverse of each other for this device. adi,ad7124 - Fix 3db Filter frequency. - Remove ability to directly write the filter frequency (which was broken) - Register naming improvements. adi,ad7606 - Add a missing return value check. - Fill in max sampling rates for all chips. - Use devm_mutex_init() - Fix up some kernel-doc formatting issues. - Remove some camel case that snuck in. - Drop setting address field in channels as easily established from other fields. - Drop unnecessary parameter to ad76060_scale_setup_cb_t. adi,ad7768-1 - Convert to regmap. - Factor out buffer allocation. - Tidy up headers. adi,ad7944 - Stop setting bits_per_word in SPI xfers with no data. adi,ad9832 - Add of_device_id table rather than just relying on fallbacks. - Use FIELD_PREP() to set values of fields. adi,admv1013 - Cleanup a pointless ternary. adi,admv8818 - Fix up LPF Band 5 frequency which was slightly wrong. - Fix an integer overflow. - Fix range calculation adi,adt7316 - Replace irqd_get_trigger_type(irq_get_irq_data()) with simpler irq_get_trigger_type() adi,adxl345 - Use regmap cache instead of various state variables that were there to reduce bus accesses. - Make regmap return value checking consistent across all call sites. adi,axi-dac - Add a check on number of channels (0 to 15 valid) allwinner,sun20i - Use new adc-helpers to replace local parsing code for channel nodes. bosch,bmp290 - Move to local variables for sensor data marshalling removing the need for a messy definition that has to work for all supported parts. Follow up fix adds a missing initialization. dynaimage,al3010 and dynaimage,al3320a - Various minor cleanup to bring these drivers inline with reviewed feedback given on a new driver. - Fix an error path in which power down is not called when it should be. - Switch to regmap. google,cros_ec - Fix up a flexible array in middle of structure warning. - Flush fifo when changing the timeout to avoid potential long wait for samples. hid-sensor-rotation - Remove an __aligned(16) marking that doesn't seem to be justified. kionix,kxcjk-1013 - Deduplicate code for setting up interrupts. microchip,mcp3911 - Fix handling of conversion results register which differs across supported devices. idt,zopt2201 - Avoid duplicating register lists as all volatile registers are the inverse of writeable registers on this device. renesas,rzg2l - Use new adc-helpers to replace local parsing code for channel nodes. ti,ads1298 - Fix a missing Kconfig dependency. * tag 'iio-for-6.16a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (260 commits) dt-bindings: iio: adc: Add ROHM BD79100G iio: adc: add support for Nuvoton NCT7201 dt-bindings: iio: adc: add NCT7201 ADCs iio: chemical: Add driver for SEN0322 dt-bindings: trivial-devices: Document SEN0322 iio: adc: ad7768-1: reorganize driver headers iio: bmp280: zero-init buffer iio: ssp_sensors: optimalize -> optimize HID: sensor-hub: Fix typo and improve documentation iio: admv1013: replace redundant ternary operator with just len iio: chemical: mhz19b: Fix error code in probe() iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros iio: make IIO_DMA_MINALIGN minimum of 8 bytes iio: pressure: zpa2326_spi: remove bits_per_word = 8 iio: pressure: ms5611_spi: remove bits_per_word = 8 ... commit 8cbc95f983bcec7e042266766ffe0d68980e4290 Author: Miguel Ojeda Date: Tue Mar 25 19:43:09 2025 +0100 rust: workaround `bindgen` issue with forward references to `enum` types `bindgen` currently generates the wrong type for an `enum` when there is a forward reference to it. For instance: enum E; enum E { A }; generates: pub const E_A: E = 0; pub type E = i32; instead of the expected: pub const E_A: E = 0; pub type E = ffi::c_uint; The issue was reported to upstream `bindgen` [1]. Now, both GCC and Clang support silently these forward references to `enum` types, unless `-Wpedantic` is passed, and it turns out that some headers in the kernel depend on them. Thus, depending on how the headers are included, which in turn may depend on the kernel configuration or the architecture, we may get a different type on the Rust side for a given C `enum`. That can be quite confusing, to say the least, especially since developers may only notice issues when building for other architectures like in [2]. In particular, they may end up forcing a cast and adding an `#[allow(clippy::unnecessary_cast)]` like it was done in commit 94e05a66ea3e ("rust: hrtimer: allow timer restart from timer handler"), which isn't great. Instead, let's have a section at the top of our `bindings_helper.h` that `#include`s the headers with the affected types -- hopefully there are not many cases and there is a single ordering that covers all cases. This allows us to remove the cast and the `#[allow]`, thus keeping the correct code in the source files. When the issue gets resolved in upstream `bindgen` (and we update our minimum `bindgen` version), we can easily remove this section at the top. Link: https://github.com/rust-lang/rust-bindgen/issues/3179 [1] Link: https://lore.kernel.org/rust-for-linux/87tt7md1s6.fsf@kernel.org/ [2] Acked-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250325184309.97170-1-ojeda@kernel.org [ Added extra paragraph on the comment to clarify that the workaround may not be possible in some cases. - Miguel ] Signed-off-by: Miguel Ojeda commit 7ce3bf76c3adfbfcfa712d5090428f67c97db201 Merge: fd4b6c0fdf71d7 7d852b34be4df6 Author: Mark Brown Date: Thu May 22 14:38:05 2025 +0100 Add Tegra264 support in AHUB drivers Merge series from "Sheetal ." : The patch series includes the necessary changes to enable support for the Tegra264 platforms in AHUB drivers. commit 4ff4d86f6cceb6bea583bdb230e5439655778cce Author: Kory Maincent Date: Mon May 19 10:45:05 2025 +0200 net: Add support for providing the PTP hardware source in tsinfo Multi-PTP source support within a network topology has been merged, but the hardware timestamp source is not yet exposed to users. Currently, users only see the PTP index, which does not indicate whether the timestamp comes from a PHY or a MAC. Add support for reporting the hwtstamp source using a hwtstamp-source field, alongside hwtstamp-phyindex, to describe the origin of the hardware timestamp. Remove HWTSTAMP_SOURCE_UNSPEC enum value as it is not used at all. Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20250519-feature_ptp_source-v4-1-5d10e19a0265@bootlin.com Signed-off-by: Paolo Abeni commit 70a299ed2e03e7ef26e5be7889bab1a47960ed25 Author: Chaoyi Chen Date: Tue May 20 10:47:18 2025 +0800 dt-bindings: display: rockchip: Convert cdn-dp-rockchip.txt to yaml Convert cdn-dp-rockchip.txt to yaml. Add new "port@1" property which represents the CDN DP output to keep the same style as the other display interfaces. This patch also changes the constraints for "phys" and "extcon". For the original binding, only one phy and the corresponding extcon can be specified. In the new binding, one or two phys can be specified. Since the RK3399 has two DP-USB PHYs, specifying one allows output via the corresponding PHY, while specifying two lets the driver choose one PHY for output. This rule also applies to extcon, which provides the cable state for the corresponding PHY. Signed-off-by: Chaoyi Chen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250520024718.142-3-kernel@airkyi.com Signed-off-by: Rob Herring (Arm) commit 1c12fbdf40e17df2efc24bf2009a0c3bfa75bfa7 Author: Mathieu Dubois-Briand Date: Thu May 22 14:06:20 2025 +0200 regmap: irq: Add support for chips without separate IRQ status Some GPIO chips allow to rise an IRQ on GPIO level changes but do not provide an IRQ status for each separate line: only the current gpio level can be retrieved. Add support for these chips, emulating IRQ status by comparing GPIO levels with the levels during the previous interrupt. Signed-off-by: Mathieu Dubois-Briand Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250522-mdb-max7360-support-v9-5-74fc03517e41@bootlin.com Signed-off-by: Mark Brown commit fd4b6c0fdf71d71f2bbc2f9aceb6f0814b4d93e2 Author: Richard Fitzgerald Date: Thu May 22 11:38:16 2025 +0100 ASoC: wm_adsp: Make cirrus_dir const The cirrus_dir pointer should be const data but was missing the second const needed to achieve this. I haven't marked this as a 'Fixes' because it isn't causing any bugs, it's only a code improvement. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250522103816.543919-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 5963edd98a2159f2114b08e402a7341c1e7dd293 Merge: 4d1c69e53ea7ae 695d702f42bf4b Author: Arnd Bergmann Date: Thu May 22 13:22:02 2025 +0200 Merge tag 'soc_fsl-6.16-1' of https://github.com/chleroy/linux into soc/drivers FSL SOC Changes for 6.16: - Various fixes and cleanups from Ioana on fsl-mc bus driver - Other misc fixes on fsl-mc bus driver - A build fix on DPAA2 driver - Some preparation work from Kees on qbman driver - Some cleanup on FSL qe interrupt driver init * tag 'soc_fsl-6.16-1' of https://github.com/chleroy/linux: soc: fsl: qe: Consolidate chained IRQ handler install/remove bus: fsl-mc: Use strscpy() instead of strscpy_pad() soc: fsl: qbman: Remove const from portal->cgrs allocation type bus: fsl_mc: Fix driver_managed_dma check bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value bus: fsl-mc: drop useless cleanup bus: fsl-mc: add the dprc_get_mem() command to the whitelist bus: fsl-mc: fix GET/SET_TAILDROP command ids bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device bus: fsl-mc: fix double-free on mc_dev soc: fsl: Do not enable DPAA2_CONSOLE by default during compile testing Link: https://lore.kernel.org/r/9e5b3e8e-3280-4ff9-915b-9a8b934bac22@csgroup.eu Signed-off-by: Arnd Bergmann commit ed73728fd14e14714a86b4826fb7115d9dade1b6 Merge: 783e2a47530241 e54b870212c079 Author: Johannes Berg Date: Thu May 22 13:13:07 2025 +0200 Merge tag 'mt76-next-2025-05-21' of https://github.com/nbd168/wireless Felix Fietkau says: =================== mt76 patches for 6.16 - fixes - EHT improvements - new device ids =================== Signed-off-by: Johannes Berg commit 783e2a47530241ed4d8271ba5f91c60d12534521 Merge: 0b0ff976af94fc 886bb3624e4c99 Author: Johannes Berg Date: Thu May 22 13:09:53 2025 +0200 Merge tag 'ath-next-20250521' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath Jeff Johnson says: ================== ath.git patches for v6.16 ath12k: Add monitor mode support for WCN7850. Enhance regulatory support including 6 GHz power modes. In addition, perform the usual set of bug fixes and cleanups across all supported drivers. ================== Signed-off-by: Johannes Berg commit 16066e29d3f5a45cd1ced62dacfce45c9560be1d Merge: e32697dec4a6db 840bb13005f2d0 Author: Arnd Bergmann Date: Thu May 22 13:06:27 2025 +0200 Merge tag 'arm-soc/for-6.16/maintainers' of https://github.com/Broadcom/stblinux into soc/arm This pull request contains MAINTAINERS file update for Broadcom SoCs, please pull the following for 6.16: - Krzysztof updates the BCM2711/BCM283X entry to also match on the bcm2712 pattern to cover the Raspberry Pi 5 files * tag 'arm-soc/for-6.16/maintainers' of https://github.com/Broadcom/stblinux: ARM: broadcom: MAINTAINERS: Cover bcm2712 files Link: https://lore.kernel.org/r/20250513140808.2047729-1-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit e32697dec4a6db500001771451346864f37811ab Merge: acda1d3a0ec754 55da73fa7a68cc Author: Arnd Bergmann Date: Thu May 22 13:05:31 2025 +0200 Merge tag 'davinci-updates-for-v6.16-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into soc/arm TI DaVinci updates for v6.16-rc1 - remove support for the da830 SoC - increase the panel FIFO threshold in da850-evm * tag 'davinci-updates-for-v6.16-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: ARM: dts: davinci: da850-evm: Increase fifo threshold ARM: davinci: remove support for da830 Link: https://lore.kernel.org/r/20250519090232.13147-1-brgl@bgdev.pl Signed-off-by: Arnd Bergmann commit e7f3d11567c2c79c4342791ba91c500b434ce147 Author: Greg Kroah-Hartman Date: Thu May 22 12:59:14 2025 +0200 spi: loopback-test: fix up const pointer issue in rx_ranges_cmp() When a list head is a const pointer, the list entry for that head also must remain a const pointer, otherwise we are just "throwing it away" for no good reason. Fix this up by properly marking these structures as const. Cc: Mark Brown Signed-off-by: Greg Kroah-Hartman Link: https://patch.msgid.link/2025052213-semifinal-sublevel-d631@gregkh Signed-off-by: Mark Brown commit 2712a7d362904d0c4283ae91fac8cea6ecd6f9c2 Author: Greg Kroah-Hartman Date: Thu May 22 12:57:26 2025 +0200 spi: gpio: fix const issue in spi_to_spi_gpio() While the struct spi_device * passed into spi_to_spi_gpio() is a const one, the struct spi_bitbang * that is retrieved from the controller field in the spi_device is NOT a const pointer, as it is coming from the spi_controller_get_devdata() call, and then passed to container_of() which would strip off the const attribute for no good reason (i.e. if a const pointer is passed to container_of() it still is const coming out). Fix this all up by properly declaring the struct spi_bitbang * as not const. Cc: Mark Brown Signed-off-by: Greg Kroah-Hartman Link: https://patch.msgid.link/2025052225-scallion-ritzy-dbbd@gregkh Signed-off-by: Mark Brown commit ae006498a0723e1cbb14fb7c56a1fa4642791897 Merge: 5c9876f9d1b78a bd088836a10e41 Author: Arnd Bergmann Date: Thu May 22 13:01:41 2025 +0200 Merge tag 'v6.16-rockchip-defconfig64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/defconfig Enable Rockchip SAI and ES8328 modules. * tag 'v6.16-rockchip-defconfig64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: defconfig: Enable Rockchip SAI and ES8328 Link: https://lore.kernel.org/r/4060740.R56niFO833@phil Signed-off-by: Arnd Bergmann commit 5234f2c3e3010f1b9c90b617e92c4b38e3240914 Author: Caleb Sander Mateos Date: Wed May 21 10:07:19 2025 -0600 ublk: remove io argument from ublk_auto_buf_reg_fallback() The argument has been unused since the function was added, so remove it. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250521160720.1893326-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 5c9876f9d1b78ad303ba2c86ce7cb547ef24dcd9 Merge: a34a3ddc6b32e9 543e0ecee19ec6 Author: Arnd Bergmann Date: Thu May 22 13:00:11 2025 +0200 Merge tag 'mtk-defconfig-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/defconfig MediaTek ARM64 defconfig updates for v6.16 This enables some drivers as modules to enable fully booting some of the supported MediaTek boards; In particular, this enables the following drivers as module: - PHYs for PCIe, HDMI, DSI and DisplayPort for all boards - MediaTek UART DMA Controller, also for all boards - MDP3 driver for MT8186/88/95 (Chromebooks and Genio variants) - Auxiliary ADC for the MT6357/58/59 PMICs found on both Genio EVK and Chromebooks based on designs with MT8183/86/88/92/95 SoCs - iTE IT5205 Type-C USB Alternate Mode Passive MUX, found on both Chromebooks and Genio EVKs with MT8188/95 - Richtek RT1715 Type-C PD Controller, found on all Genio boards - Himax HX8279 DSI panel DriverIC and KD070FHFID015 panel, found on various revisions of the Genio Evaluation Kit boards. * tag 'mtk-defconfig-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: arm64: defconfig: Enable configs for MediaTek Genio EVK boards arm64: defconfig: mediatek: enable PHY drivers Link: https://lore.kernel.org/r/20250520114356.1194450-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 631b2af2f35737750af284be22e63da56bf20139 Author: Zhe Qiao Date: Wed Apr 30 14:06:03 2025 +0800 PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root() In the pci_acpi_scan_root() function, when creating a PCI bus fails, we need to free up the previously allocated memory, which can avoid invalid memory usage and save resources. Fixes: 789befdfa389 ("arm64: PCI: Migrate ACPI related functions to pci-acpi.c") Signed-off-by: Zhe Qiao [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250430060603.381504-1-qiaozhe@iscas.ac.cn commit a34a3ddc6b32e988a85951c78a08fd1bb7cec7c0 Merge: 74b1d172c3b59c 4b77122818239b Author: Arnd Bergmann Date: Thu May 22 12:59:45 2025 +0200 Merge tag 'qcom-arm64-defconfig-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig One more Qualcomm Arm64 defconfig update for v6.16 Enable global clock controller and TLMM pinctrl drivers for IPQ5424 to make this boot. * tag 'qcom-arm64-defconfig-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable IPQ5424 RDP466 base configs Link: https://lore.kernel.org/r/20250520025119.40021-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 74b1d172c3b59ccff03761d9aad4bba54c0bf862 Merge: 93b07587bb256c 60c6d3797239d0 Author: Arnd Bergmann Date: Thu May 22 12:59:04 2025 +0200 Merge tag 'riscv-config-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/defconfig RISC-V config for v6.16 PM_GENERIC_DOMAINS is enabled because T-Head SoCs need to use it and spacemit's gpio and clock controller are enabled for more obvious reasons. Signed-off-by: Conor Dooley * tag 'riscv-config-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: defconfig: spacemit: enable clock controller driver for SpacemiT K1 riscv: defconfig: spacemit: enable gpio support for K1 SoC riscv: Enable PM_GENERIC_DOMAINS for T-Head SoCs Link: https://lore.kernel.org/r/20250516-joystick-mortified-385820b1ad0b@spud Signed-off-by: Arnd Bergmann commit e54b870212c079bef4ff61238f8c1278a14d1863 Author: Allan Wang Date: Wed May 7 13:31:31 2025 +0800 wifi: mt76: mt7925: add rfkill_poll for hardware rfkill Add mac80211 rfkill_poll ops to monitor hardware rfkill state and state change will be updated. Signed-off-by: Allan Wang Link: https://patch.msgid.link/20250507053131.4173691-1-allan.wang@mediatek.com Signed-off-by: Felix Fietkau commit 56e38675c5bdd185e52387bf75de8237d4cda106 Author: Shayne Chen Date: Thu May 15 11:29:52 2025 +0800 wifi: mt76: support power delta calculation for 5 TX paths One variant of MT7992 has 5 TX paths, so extend the power delta function to support it. Also, rename nss_delta to path_delta since the value is based on the number of TX paths rather tha the number of spatial streams. (path delta [0.5 dBm] = 10 * log(path number) [dBm] * 2) Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-9-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 249173e94dd5edef9e704f89513de7d9715ddf22 Author: Shayne Chen Date: Thu May 15 11:29:51 2025 +0800 wifi: mt76: fix available_antennas setting Check if available_antennas_tx and available_antennas_rx are already set during the per-chip initialization phase; otherwise, they could be overwritten with incorrect values. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-8-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 42cb27af34de4acf680606fad2c1f2932110591f Author: Shayne Chen Date: Thu May 15 11:29:50 2025 +0800 wifi: mt76: mt7996: fix RX buffer size of MCU event Some management frames are first processed by the firmware and then passed to the driver through the MCU event rings. In CONNAC3, event rings do not support scatter-gather and have a size limitation of 2048 bytes. If a packet sized between 1728 and 2048 bytes arrives from an event ring, the ring will hang because the driver attempts to use scatter-gather to process it. To fix this, include the size of struct skb_shared_info in the MCU RX buffer size to prevent scatter-gather from being used for event skb in mt76_dma_rx_fill_buf(). Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-7-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 79e788fcb2043eabf99e73f6af35a79ccca365c4 Author: Peter Chiu Date: Thu May 15 11:29:49 2025 +0800 wifi: mt76: mt7996: change max beacon size According to hardware capability, the maximum beacon size is 2048 bytes minus the size of TLV headers. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-6-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit d5012734fc4bd5371e2e8dea8c2f3d28287573b8 Author: Peter Chiu Date: Thu May 15 11:29:48 2025 +0800 wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS The maximum TX path and NSS may differ on a band. For example, one variant of the MT7992 has 5 TX paths and 4 NSS on the 5 GHz band. To address this, add orig_antenna_mask to record the maximum NSS and prevent setting an invalid NSS in mt7996_set_antenna(). Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-5-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 80fda1cd7b0a1edd0849dc71403a070d0922118d Author: Benjamin Lin Date: Thu May 15 11:29:47 2025 +0800 wifi: mt76: mt7996: drop fragments with multicast or broadcast RA IEEE 802.11 fragmentation can only be applied to unicast frames. Therefore, drop fragments with multicast or broadcast RA. This patch addresses vulnerabilities such as CVE-2020-26145. Signed-off-by: Benjamin Lin Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-4-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 8b2f574845e33d02e7fbad2d3192a8b717567afa Author: Peter Chiu Date: Thu May 15 11:29:46 2025 +0800 wifi: mt76: mt7996: set EHT max ampdu length capability Set the max AMPDU length in the EHT MAC CAP. Without this patch, the peer station cannot obtain the correct capability, which prevents achieving peak throughput on the 2 GHz band. Fixes: 1816ad9381e0 ("wifi: mt76: mt7996: add max mpdu len capability") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-3-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 5c78949fc7cd772d483a8abe126fe90937c0f002 Author: Howard Hsu Date: Thu May 15 11:29:45 2025 +0800 wifi: mt76: mt7996: fix beamformee SS field Fix the beamformee SS field for the mt7996, mt7992 and mt7990 chipsets. For the mt7992, this value shall be set to 0x4, while the others shall be set to 0x3. Fixes: 5b20557593d4 ("wifi: mt76: connac: adjust phy capabilities based on band constraints") Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-2-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 08419f9e9bbb58f6eeb61990797e6084db6500ec Author: Howard Hsu Date: Thu May 15 11:29:44 2025 +0800 wifi: mt76: remove capability of partial bandwidth UL MU-MIMO The firmware only supports full bandwidth UL MU-MIMO, so remove the partial bandwidth capability from HE PHY CAP. Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250515032952.1653494-1-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 0a41b6751e4fe5094f17e5e14908cf3713d58d60 Author: Michael Lo Date: Mon May 5 16:36:18 2025 -0700 wifi: mt76: mt7925: add test mode support The test mode interface allows controlled execution of chip-level operations such as continuous transmission, reception tests, and register access, which are essential during bring-up, diagnostics, and factory testing. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Michael Lo Link: https://patch.msgid.link/20250505233618.1951021-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit ba7fe3b064639e3e2687b68e5fb2223380114794 Author: Michael Lo Date: Mon May 5 16:36:17 2025 -0700 wifi: mt76: mt7925: extend MCU support for testmode Add MCU command and its handling needed for testmode support on MT7925. This enables low-level chip testing features such as continuous TX/RX.. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Michael Lo Link: https://patch.msgid.link/20250505233618.1951021-1-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit aa97ff5782cf01cf2163593e1f57bbde63a06047 Author: Michael Lo Date: Mon Apr 14 09:39:54 2025 +0800 wifi: mt76: mt7925: ensure all MCU commands wait for response Modify MCU command sending functions to wait for a response, ensuring consistent behavior across all commands and improves reliability by confirming that each command is processed successfully. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250414013954.1151774-3-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit bd02eebfc0b3502fe8322cf229b4c801416d1007 Author: Ming Yen Hsieh Date: Mon Apr 14 09:39:53 2025 +0800 wifi: mt76: mt7925: refine the sniffer commnad Remove a duplicate call to `mt76_mcu_send_msg` to fix redundant operations in the sniffer command handling. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250414013954.1151774-2-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 122f270aca2c86d7de264ab67161c845e0691d73 Author: Ming Yen Hsieh Date: Mon Apr 14 09:39:52 2025 +0800 wifi: mt76: mt7925: prevent multiple scan commands Add a check to ensure only one scan command is active at a time by testing the MT76_HW_SCANNING state. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250414013954.1151774-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit efb95439c1477bbc955cacd0179c35e7861b437c Author: Henry Martin Date: Mon Apr 7 14:19:00 2025 +0800 wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init() devm_ioremap() returns NULL on error. Currently, mt7915_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference. Prevent null pointer dereference in mt7915_mmio_wed_init(). Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Henry Martin Link: https://patch.msgid.link/20250407061900.85317-1-bsdhenrymartin@gmail.com Signed-off-by: Felix Fietkau commit 8f30e2b059757d8711a823e4c9c023db62a1d171 Author: Henry Martin Date: Mon Apr 7 11:23:49 2025 +0800 wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init() devm_ioremap() returns NULL on error. Currently, mt7996_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference. Prevent null pointer dereference in mt7996_mmio_wed_init() Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support") Signed-off-by: Henry Martin Link: https://patch.msgid.link/20250407032349.83360-1-bsdhenrymartin@gmail.com Signed-off-by: Felix Fietkau commit 8284815ca161e0fa0861cc4085f1c0141e10a34d Author: Ming Yen Hsieh Date: Fri Mar 21 09:38:29 2025 +0800 wifi: mt76: mt7925: add RNR scan support for 6GHz Enhance the mt7925 to include RNR scan support. It adds the necessary RNR information to the scan command. Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250321013829.3598-2-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 913a61826787669471b5b27b304dd2d0deedd7c8 Author: Ming Yen Hsieh Date: Fri Mar 21 09:38:28 2025 +0800 wifi: mt76: add mt76_connac_mcu_build_rnr_scan_param routine Introduce mt76_connac_mcu_build_rnr_scan_param routine for handling RNR scan. This is a preliminary patch to enable RNR scan in mt7921 and mt7925 driver. Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250321013829.3598-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 7e1fcf687c2fb22ad25cf3fae322a37452f5f560 Author: Feng Jiang Date: Wed Apr 2 14:24:15 2025 +0800 wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202504011739.HvUKtUUe-lkp@intel.com/ Fixes: 3ba20af886d1 ("wifi: mt76: scan: set vif offchannel link for scanning/roc") Signed-off-by: Feng Jiang Link: https://patch.msgid.link/20250402062415.25434-1-jiangfeng@kylinos.cn Signed-off-by: Felix Fietkau commit c48cd2e82b6606dc171e89623599d40140645ce9 Merge: b5125e69fb6c6e 6332351622db25 Author: Arnd Bergmann Date: Thu May 22 12:55:44 2025 +0200 Merge tag 'juno-updates-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/dt Armv8 Juno/FVP updates for v6.16 Few updates to the Arm FVP(Fixed Virtual Platform) device tree, enhancing support for system tracing, power management, and firmware coexistence: 1. ETE and TRBE support Adds CoreSight ETE and TRBE nodes for the FVP Rev C model. These are disabled by default as they need to be enabled explicitly via model parameters. 2. CPU idle states and system timer for idle broadcast Introduces CPU idle state definitions but disabled by default due to potential performance impact on the model. Also adds a system-level broadcast timer for use when CPUs enter deep idle states where local timers stop. 3. Firmware memory reservation Reserves 64MB at the end of the first DRAM bank to prevent conflicts with FF-A firmware or similar configurations that rely on this region. 4. Drop the unnecessary clock-frequency property in the timer nodes The boot/secure firmware must configure the timer clock frequency and the non-secure OS must be able to read the same. The clock-frequency is generally used when the firmware is broken which is not the case on most of the fast models and Juno platform. As noted above some of the changes are disabled by default where applicable to ensure backward compatibility and avoid unintended performance impact on platforms using default model parameters. * tag 'juno-updates-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: fvp: Add ETE and TRBE nodes for Rev C model arm64: dts: arm: Drop the clock-frequency property from timer nodes arm64: dts: fvp: Reserve 64MB for the FF-A firmware in memory map arm64: dts: fvp: Add CPU idle states for Rev C model arm64: dts: fvp: Add system timer for broadcast during CPU idle Link: https://lore.kernel.org/r/20250513143827.3606686-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit dfc970ad61973111932fc282ebab8d825056d5ab Author: Philipp Stanner Date: Thu May 22 10:46:27 2025 +0200 PCI: Remove function pcim_intx() prototype from pci.h The subsystem-internal header pci.h still contains the function prototype of pcim_intx(), which has since been made public in the global header. Remove the redundant function prototype. Signed-off-by: Philipp Stanner [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250522084626.150148-2-phasta@kernel.org commit 226ff35039d05826b738160eff05844c0fa5c2a0 Author: Yicong Yang Date: Fri Apr 25 11:38:43 2025 +0800 arm64: cputype: Add cputype definition for HIP12 Add MIDR encoding for HiSilicon HIP12 which is used on HiSilicon HIP12 SoCs. Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20250425033845.57671-2-yangyicong@huawei.com Signed-off-by: Will Deacon commit 80834997154271da58fd69fa7fdfe8238750960e Author: Rob Herring (Arm) Date: Tue May 20 17:27:37 2025 -0500 arm64: el2_setup.h: Make __init_el2_fgt labels consistent, again Commit 5b39db6037e7 ("arm64: el2_setup.h: Rename some labels to be more diff-friendly") reworked the labels in __init_el2_fgt to say what's skipped rather than what the target location is. The exception was "set_fgt_" which is where registers are written. In reviewing the BRBE additions, Will suggested "set_debug_fgt_" where HDFGxTR_EL2 are written. Doing that would partially revert commit 5b39db6037e7 undoing the goal of minimizing additions here, but it would follow the convention for labels where registers are written. So let's do both. Branches that skip something go to a "skip" label and places that set registers have a "set" label. This results in some double labels, but it makes things entirely consistent. While we're here, the SME skip label was incorrectly named, so fix it. Reported-by: Will Deacon Cc: Dave Martin Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250520-arm-brbe-v19-v22-2-c1ddde38e7f8@kernel.org Signed-off-by: Will Deacon commit 7d852b34be4df61ae4327b47c39701d0f7ffcc70 Author: Sheetal Date: Mon May 12 05:17:47 2025 +0000 ASoC: tegra: Tegra264 support in isomgr_bw Tegra264 supports max 32 channels, hence calculating the max bandwidth using the channel info from soc_data. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-12-sheetal@nvidia.com Signed-off-by: Mark Brown commit 4152d33ab162d5378f57cd757e1de5cb4867dfb4 Author: Sheetal Date: Mon May 12 05:17:46 2025 +0000 ASoC: tegra: AHUB: Add Tegra264 support Add Tegra264 AHUB support with following changes: - Update Tegra264 IP instances: DMIC(2), DSPK(1), AMX(6), ADX(6), I2S(8). - Update register offsets for Tegra264. - Add soc_data for Tegra264 chip-specific variations. - Increase channels_max to 32 for Tegra264 DAIs. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-11-sheetal@nvidia.com Signed-off-by: Mark Brown commit 7dc8299fbb1c8e6373e8e55d562b7674ee37b2b0 Author: Sheetal Date: Mon May 12 05:17:45 2025 +0000 ASoC: tegra: ADX: Add Tegra264 support Add Tegra264 ADX support with following changes: - Add soc_data for Tegra264-specific variations - Tegra264 ADX supports 32 input channels, hence update the playback DAI channels_max parameter and CIF configuration API. - Register offsets and default values are updated to align with Tegra264. - Add 128 byte map controls for Tegra264 to accommodate each byte per channel (32channels x 32bits). Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-10-sheetal@nvidia.com Signed-off-by: Mark Brown commit fd509c6f8e4028539bf35d80e3bcdce7b3ba0f9f Author: Sheetal Date: Mon May 12 05:17:44 2025 +0000 ASoC: tegra: AMX: Add Tegra264 support Add Tegra264 AMX support with following changes: - Add soc_data for Tegra264-specific variations - Tegra264 AMX supports 32 output channels, hence update the capture DAI channels_max parameter and CIF configuration API. - Register offsets and default values are updated to align with Tegra264. - Add 128 byte map controls for Tegra264 to accommodate each byte per channel (32channels x 32bits). Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-9-sheetal@nvidia.com Signed-off-by: Mark Brown commit b3354438d89867654b4a95a9630fd3393e275e33 Author: Sheetal Date: Mon May 12 05:17:43 2025 +0000 ASoC: tegra: I2S: Add Tegra264 support Add Tegra264 I2S support with following changes: - Add soc_data for Tegra264-specific variations - Tegra264 I2S supports 32 audio channels, hence update the TDM config, CIF configuration API and DAI channel_max parameter. - Register offsets and default values are updated to align with Tegra264. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-8-sheetal@nvidia.com Signed-off-by: Mark Brown commit 1fb500476f609008ee1c499540af32c4fa5a19de Author: Sheetal Date: Mon May 12 05:17:42 2025 +0000 ASoC: tegra: Update PLL rate for Tegra264 The PLLs should be set with a VCO frequency in the 900MHz – 1GHz range to minimize jitter and ppm error for Tegra264. Add the PLLA rate accordingly. Therefore, use 983040000 frequency is for multiple of 8K frequencies and 993484800 frequency is for multiple of 11.025K frequencies. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-7-sheetal@nvidia.com Signed-off-by: Mark Brown commit fa83757df3f40c05b5ab4154253e8aeefa31a9a6 Author: Sheetal Date: Mon May 12 05:17:41 2025 +0000 ASoC: tegra: ASRC: Update ARAM address The ARAM address for Tegra264 has been updated. To maintain backward compatibility given its chip-specific nature, it's now included in the soc_data. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-6-sheetal@nvidia.com Signed-off-by: Mark Brown commit 7668c6378b0577893bcf8c0f272b6ed099e0787d Author: Sheetal Date: Mon May 12 05:17:40 2025 +0000 ASoC: tegra: ADMAIF: Add Tegra264 support Add Tegra264 I2S support with following changes: - Add soc_data for Tegra264-specific variations - Tegra264 supports 32 RX and 32 TX ADMAIF channels and each ADMAIF stream supports max 32 channels. To accommodate the change dais, CIF configuration API and driver components are updated. - Register offsets and default values are updated to align with Tegra264. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-5-sheetal@nvidia.com Signed-off-by: Mark Brown commit 35c0d1de8e669878797e40cc625f4bdc37c3e084 Author: Sheetal Date: Mon May 12 05:17:39 2025 +0000 ASoC: tegra: CIF: Add Tegra264 support In Tegra264, the CIF register data bit positions are changed for I2S, AMX, ADX and ADMAIF AHUB modules, as they now support a maximum of 32 channels. tegra264_set_cif API added to set the CIF for IPs supporting 32 channels. Signed-off-by: Sheetal Link: https://patch.msgid.link/20250512051747.1026770-4-sheetal@nvidia.com Signed-off-by: Mark Brown commit 628dafc476eb658544ad6b5b3592bfcd82597051 Author: Sheetal Date: Mon May 12 05:17:38 2025 +0000 dt-bindings: ASoC: Document Tegra264 APE support Add Tegra264 compatible strings to APE subsystem device bindings: - audio-graph-card: Due to different PLL clock rate. - admaif: Due to 32 channels supported and register offset changes. - i2s: Due to 32 channels supported and register offset changes. - amx/adx: Due to 32 channels supported and register offset changes. - asrc: Due to different ARAM address. - ahub: Due to AHUB IPs number of instances updates. - for future proofing the T264 compatibility is added for other device nodes. These bindings enable the enhanced audio features of Tegra264 while maintaining compatibility with existing platforms. Signed-off-by: Sheetal Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250512051747.1026770-3-sheetal@nvidia.com Signed-off-by: Mark Brown commit 37240f703041439cd8a39abd670dbfc0e75b725c Author: Sheetal Date: Mon May 12 05:17:37 2025 +0000 dt-bindings: ASoC: admaif: Add missing properties Add optional interconnect and iommu properties to admaif yaml. These properties are supported from Tegra186 SoC onwards. This fixes below dtbs_check error for Tegra194 and Tegra234: 'interconnect-names', 'interconnects', 'iommus' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Sheetal Acked-by: "Rob Herring (Arm)" Link: https://patch.msgid.link/20250512051747.1026770-2-sheetal@nvidia.com Signed-off-by: Mark Brown commit cbeaa41dfe26b72639141e87183cb23e00d4b0dd Author: Miguel Ojeda Date: Tue May 20 20:55:55 2025 +0200 objtool/rust: relax slice condition to cover more `noreturn` Rust functions Developers are indeed hitting other of the `noreturn` slice symbols in Nova [1], thus relax the last check in the list so that we catch all of them, i.e. *_4core5slice5index22slice_index_order_fail *_4core5slice5index24slice_end_index_len_fail *_4core5slice5index26slice_start_index_len_fail *_4core5slice5index29slice_end_index_overflow_fail *_4core5slice5index31slice_start_index_overflow_fail These all exist since at least Rust 1.78.0, thus backport it too. See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: stable@vger.kernel.org # Needed in 6.12.y and later. Cc: John Hubbard Cc: Timur Tabi Cc: Kane York Cc: Josh Poimboeuf Cc: Peter Zijlstra Reported-by: Joel Fernandes Fixes: 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") Closes: https://lore.kernel.org/rust-for-linux/20250513180757.GA1295002@joelnvbox/ [1] Tested-by: Joel Fernandes Link: https://lore.kernel.org/r/20250520185555.825242-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 195746046c256ce5324772394c886ba798859fca Author: I Hsin Cheng Date: Tue Mar 11 21:33:57 2025 +0800 rust: list: Add examples for linked list Add basic examples for the structure "List", which also serve as unit tests for basic list methods. It includes the following manipulations: * List creation * List emptiness check * List insertion through push_front(), push_back() * List item removal through pop_front(), pop_back() * Push one list to another through push_all_back() The method "remove()" doesn't have an example here because insertion with push_front() or push_back() will take the ownership of the item, which means we can't keep any valid reference to the node we want to remove, unless Cursor is used. The "remove" example through Cursor is already demonstrated with commit 52ae96f5187c ("rust: list: make the cursor point between elements"). Link: https://github.com/Rust-for-Linux/linux/issues/1121 Signed-off-by: I Hsin Cheng Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250311133357.90322-1-richard120310@gmail.com [ Removed prelude import and spurious newlines. Formatted comments with the usual style. Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 28669b2f37e9b7e98b62d0be2e10a5bf31c2b16f Author: I Hsin Cheng Date: Mon Mar 10 15:38:52 2025 +0800 rust: list: Use "List::is_empty()" to perform checking when possible "List::is_empty()" provides a straight forward convention to check whether a given "List" is empty or not. There're numerous places in the current implementation still use "self.first.is_null()" to perform the equivalent check, replace them with "List::is_empty()". Signed-off-by: I Hsin Cheng Link: https://lore.kernel.org/r/20250310073853.427954-1-richard120310@gmail.com Reviewed-by: Benno Lossin [ Rebased dropping the cases that do not apply anymore. - Miguel ] Signed-off-by: Miguel Ojeda commit ef7f3631a44b8e0990ab8ffcbed4b2c3a4270883 Author: Artur Weber Date: Thu May 15 16:16:35 2025 +0200 regulator: bcm590xx: Add support for BCM59054 regulators The BCM59056 and BCM59054 are very similar in terms of regulators. Add the register definitions for the BCM59054 and enable support for it in the driver. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250515-bcm59054-v9-8-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit d92f474420e5bb2c8b773a4fe9cf93b6051dc1ff Author: Artur Weber Date: Thu May 15 16:16:34 2025 +0200 regulator: bcm590xx: Rename BCM59056-specific data as such Previously, the driver used the BCM590XX prefix for register data specific to the BCM59056. As we will be introducing other regulators to this driver as well, make the BCM59056-specific values use the BCM59056 prefix. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250515-bcm59054-v9-7-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 75dc12b4450269821fca4c8634f5185d28cf2117 Author: Artur Weber Date: Thu May 15 16:16:33 2025 +0200 regulator: bcm590xx: Store regulator descriptions in table Instead of filling in the regulator description programatically, store the data in a struct. This will make it a bit nicer to introduce support for other BCM590xx chips besides the BCM59056. To do this, add a new struct type, bcm590xx_reg_data, to store all of the necessary information. Drop the old IS_LDO, IS_GPLDO... macros in favor of the "type" field in this struct. Adapt the old bcm590xx_reg struct to the new types. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250515-bcm59054-v9-6-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 37512643e1f889549e4f9632d6bccef6804cb776 Author: Artur Weber Date: Thu May 15 16:16:32 2025 +0200 regulator: bcm590xx: Use dev_err_probe for regulator register error Instead of calling dev_err() and returning PTR_ERR(...) separately, use a single "return dev_err_probe" statement. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250515-bcm59054-v9-5-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit d310cdbb4ee6285f374d4dfc32173c35f8a2273e Author: Artur Weber Date: Thu May 15 16:16:31 2025 +0200 mfd: bcm590xx: Add PMU ID/revision parsing function The BCM590xx PMUs have two I2C registers for reading the PMU ID and revision. The revision is useful for subdevice drivers, since different revisions may have slight differences in behavior (for example - BCM59054 has different regulator configurations for revision A0 and A1). Check the PMU ID register and make sure it matches the DT compatible. Fetch the digital and analog revision from the PMUREV register so that it can be used in subdevice drivers. Also add some known revision values to bcm590xx.h, for convenience when writing subdevice drivers. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Link: https://lore.kernel.org/r/20250515-bcm59054-v9-4-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 6adf48a3aa316ce360e02dd10222e96da9a0eff5 Author: Artur Weber Date: Thu May 15 16:16:30 2025 +0200 mfd: bcm590xx: Add support for multiple device types + BCM59054 compatible The BCM59054 is another chip from the BCM590xx line of PMUs, commonly used on devices with the BCM21664/BCM23550 chipsets. Prepare the BCM590xx driver for supporting other devices by adding the PMUID register values for supported chip types and store them in the MFD data struct as "pmu_id". (These will be checked against the actual PMUID register values in a later commit.) Then, add a DT compatible for the BCM59054, and provide the PMU ID as OF match data. Signed-off-by: Artur Weber Reviewed-by: Stanislav Jakubek Link: https://lore.kernel.org/r/20250515-bcm59054-v9-3-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 13980ebf8e9431975fe834df9df31dea39cb9a45 Author: Artur Weber Date: Thu May 15 16:16:29 2025 +0200 dt-bindings: mfd: brcm,bcm59056: Add compatible for BCM59054 The BCM59054 MFD is fairly similar to the BCM59056, and will use the same driver. Add compatible and specify the allowed regulator nodes. Signed-off-by: Artur Weber Reviewed-by: "Rob Herring (Arm)" Reviewed-by: Stanislav Jakubek Link: https://lore.kernel.org/r/20250515-bcm59054-v9-2-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 9d56594f3ebf6ea4b23884412d3fde11f39518d2 Author: Artur Weber Date: Thu May 15 16:16:28 2025 +0200 dt-bindings: mfd: brcm,bcm59056: Convert to YAML Convert devicetree bindings for the Broadcom BCM59056 PMU MFD from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. The bindings have been split into two parts: the MFD binding and a separate binding for the regulator node, to simplify the addition of other models later (which have different regulators). Signed-off-by: Artur Weber Reviewed-by: "Rob Herring (Arm)" Reviewed-by: Stanislav Jakubek Link: https://lore.kernel.org/r/20250515-bcm59054-v9-1-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones commit 249c3a0e53acefc2b06d3b3e1fc28fb2081f878d Author: FUJITA Tomonori Date: Sat Mar 8 13:45:06 2025 +0900 rust: module: place cleanup_module() in .exit.text section Place cleanup_module() in .exit.text section. Currently, cleanup_module() is likely placed in the .text section. It's inconsistent with the layout of C modules, where cleanup_module() is placed in .exit.text. [ Boqun asked for an example of how the section changed to be put in the log. Tomonori provided the following examples: C module: $ objdump -t ~/build/x86/drivers/block/loop.o|grep clean 0000000000000000 l O .exit.data 0000000000000008 __UNIQUE_ID___addressable_cleanup_module412 0000000000000000 g F .exit.text 000000000000009c cleanup_module Rust module without this patch: $ objdump -t ~/build/x86/samples/rust/rust_minimal.o|grep clean 00000000000002b0 g F .text 00000000000000c6 cleanup_module 0000000000000000 g O .exit.data 0000000000000008 _R...___UNIQUE_ID___addressable_cleanup_module Rust module with this patch: $ objdump -t ~/build/x86/samples/rust/rust_minimal.o|grep clean 0000000000000000 g F .exit.text 00000000000000c6 cleanup_module 0000000000000000 g O .exit.data 0000000000000008 _R...___UNIQUE_ID___addressable_cleanup_module - Miguel ] Signed-off-by: FUJITA Tomonori Acked-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20250308044506.14458-1-fujita.tomonori@gmail.com Signed-off-by: Miguel Ojeda commit bb941ea789f803cce766ca1e0f7c59a362aaf99a Author: Miguel Ojeda Date: Tue May 20 20:21:25 2025 +0200 rust: remove unneeded Rust 1.87.0 `allow(clippy::ptr_eq)` For the Rust 1.87.0 release, Clippy was expected to warn with: error: use `core::ptr::eq` when comparing raw pointers --> rust/kernel/list.rs:438:12 | 438 | if self.first == item { | ^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::eq(self.first, item)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq = note: `-D clippy::ptr-eq` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::ptr_eq)]` However, a backport to relax a bit the `clippy::ptr_eq` finally landed, and thus Clippy did not warn by the time the release happened. Thus remove the `allow`s added back then, which were added just in case the backport did not land in time. See commit a39f30870927 ("rust: allow Rust 1.87.0's `clippy::ptr_eq` lint") for details. Link: https://github.com/rust-lang/rust/pull/140859 [1] Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250520182125.806758-1-ojeda@kernel.org [ Reworded for clarity. - Miguel ] Signed-off-by: Miguel Ojeda commit 396639299e95fbb915c6ff12cb42391f04741ab3 Author: Kuninori Morimoto Date: Tue May 13 23:40:20 2025 +0000 ASoC: dt-bindings: audio-graph-card2: reference audio-graph routing property audio-graph.yaml already has "routing" property, let's reference it. Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/875xi4axln.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ae3392c0f12f179b969ce17856ed18bf8d69a35e Author: Dharma Balasubiramani Date: Tue May 20 20:51:46 2025 +0530 counter: microchip-tcb-capture: Add watch validation support The Timer Counter Block (TCB) exposes several kinds of events to the Counter framework, but not every event is meaningful on every hardware channel. Add a `watch_validate()` callback so userspace may register only the combinations actually supported: * Channel 0 (COUNTER_MCHP_EVCHN_CV, COUNTER_MCHP_EVCHN_RA) - COUNTER_EVENT_CAPTURE - COUNTER_EVENT_CHANGE_OF_STATE - COUNTER_EVENT_OVERFLOW * Channel 1 (COUNTER_MCHP_EVCHN_RB) - COUNTER_EVENT_CAPTURE * Channel 2 (COUNTER_MCHP_EVCHN_RC) - COUNTER_EVENT_THRESHOLD Any other request is rejected with `-EINVAL`. Signed-off-by: Dharma Balasubiramani Link: https://lore.kernel.org/r/20250520-counter-tcb-v3-1-4631e2aff7ed@microchip.com Signed-off-by: William Breathitt Gray commit 17a3a30e8e3df77d1d1f5bc705b903604a1eedc9 Author: Cosmin Tanislav Date: Wed May 7 15:19:15 2025 +0300 i2c: atr: add passthrough flag Some I2C ATRs can have other I2C ATRs as children. The I2C messages of the child ATRs need to be forwarded as-is if the parent I2C ATR can only do static mapping. In the case of GMSL, the deserializer I2C ATR actually doesn't have I2C address remapping hardware capabilities, but it is able to select which GMSL link to talk to, allowing it to change the address of the serializer. The child ATRs need to have their alias pools defined in such a way to prevent overlapping addresses between them, but there's no way around this without orchestration between multiple ATR instances. To allow for this use-case, add a flag that allows unmapped addresses to be passed through, since they are already remapped by the child ATRs. There's no case where an address that has not been remapped by the child ATR will hit the parent ATR. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Reviewed-by: Romain Gantois Signed-off-by: Wolfram Sang commit 18355307dc56c198365c6b6b359a4a24db013685 Author: Cosmin Tanislav Date: Wed May 7 15:19:13 2025 +0300 i2c: atr: add static flag Some I2C ATRs do not support dynamic remapping, only static mapping of direct children. Mappings will only be added or removed as a result of devices being added or removed from a child bus. The ATR pool will have to be big enough to accommodate all devices expected to be added to the child buses. Add a new flag that prevents old mappings to be replaced or new mappings to be created in the alias finding code paths. That mens adding a flags parameter to i2c_atr_new() and an i2c_atr_flags enum. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Reviewed-by: Romain Gantois Signed-off-by: Wolfram Sang commit b09d8a9cce2664cdcef91f10eed9557321ce4a81 Author: Cosmin Tanislav Date: Wed May 7 15:19:12 2025 +0300 i2c: atr: allow replacing mappings in attach_addr() It is possible for aliases to be exhausted while we are still attaching children. Allow replacing mapping on attach by calling i2c_atr_replace_mapping_by_addr() if i2c_atr_create_mapping_by_addr() fails. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 02426327e2286d16fdd86b4ba0b56af9939160f3 Author: Cosmin Tanislav Date: Wed May 7 15:19:11 2025 +0300 i2c: atr: deduplicate logic in attach_addr() This is the same logic as in i2c_atr_create_mapping_by_addr(). Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Reviewed-by: Romain Gantois Signed-off-by: Wolfram Sang commit 5efe815ad7355655f3a6ce9593530afd6ecc6d21 Author: Cosmin Tanislav Date: Wed May 7 15:19:10 2025 +0300 i2c: atr: do not create mapping in detach_addr() It is useless to create a new mapping just to detach it immediately. Use the newly added i2c_atr_find_mapping_by_addr() function to avoid it, and exit without logging an error if not found. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 5988589eb38124f6eb311ada0f92a0b68625659d Author: Cosmin Tanislav Date: Wed May 7 15:19:09 2025 +0300 i2c: atr: split up i2c_atr_get_mapping_by_addr() The i2c_atr_get_mapping_by_addr() function handles three separate usecases: finding an existing mapping, creating a new mapping, or replacing an existing mapping if a new mapping cannot be created because there aren't enough aliases available. Split up the function into three different functions handling its individual usecases to prepare for better usage of each one. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 42a70dc49edfc230fe79e3e8141b5b8d537e7a91 Author: Cosmin Tanislav Date: Wed May 7 15:19:08 2025 +0300 i2c: atr: find_mapping() -> get_mapping() A find operation implies that a null result is not an error. Use get naming to clarify things and to prepare for splitting up the logic inside this function. Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit ec8c1b92eaec3efebff717b5c13da3b5e87f2dcc Author: Tomi Valkeinen Date: Wed May 7 15:19:07 2025 +0300 i2c: atr: Fix lockdep for nested ATRs When we have an ATR, and another ATR as a subdevice of the first ATR, we get lockdep warnings for the i2c_atr.lock and i2c_atr_chan.orig_addrs_lock. This is because lockdep uses a static key for the locks, and doesn't see the locks of the separate ATR instances as separate. Fix this by generating a dynamic lock key per lock instance. Signed-off-by: Tomi Valkeinen Signed-off-by: Cosmin Tanislav Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 44889ff67cee7b9ee2d305690ce7a5488b137a66 Author: Ingo Molnar Date: Thu May 22 09:51:22 2025 +0200 perf/uapi: Clean up a bit When applying a recent commit to the header I noticed that we have accumulated quite a bit of historic noise in this header, so do a bit of spring cleaning: - Define bitfields in a vertically aligned fashion, like perf_event_mmap_page::capabilities already does. This makes it easier to see the distribution and sizing of bits within a word, at a glance. The following is much more readable: __u64 cap_bit0 : 1, cap_bit0_is_deprecated : 1, cap_user_rdpmc : 1, cap_user_time : 1, cap_user_time_zero : 1, cap_user_time_short : 1, cap_____res : 58; Than: __u64 cap_bit0:1, cap_bit0_is_deprecated:1, cap_user_rdpmc:1, cap_user_time:1, cap_user_time_zero:1, cap_user_time_short:1, cap_____res:58; So convert all bitfield definitions from the latter style to the former style. - Fix typos and grammar - Fix capitalization - Remove whitespace noise - Harmonize the definitions of various generations and groups of PERF_MEM_ ABI values. - Vertically align all definitions and assignments to the same column (48), as the first definition (enum perf_type_id), throughout the entire header. - And in general make the code and comments to be more in sync with each other and to be more readable overall. No change in functionality. Copy the changes over to tools/include/uapi/linux/perf_event.h. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Ian Rogers Link: https://lore.kernel.org/r/20250521221529.2547099-1-irogers@google.com commit b338a2ae9b316df1d81b5289badcc8cbbbfe1b2b Author: Matthias Fend Date: Wed May 14 12:10:08 2025 +0200 leds: tps6131x: Add support for Texas Instruments TPS6131X flash LED driver The TPS61310/TPS61311 is a flash LED driver with I2C interface. Its power stage is capable of supplying a maximum total current of roughly 1500mA. The TPS6131x provides three constant-current sinks, capable of sinking up to 2 x 400mA (LED1 and LED3) and 800mA (LED2) in flash mode. In torch mode each sink (LED1, LED2, LED3) supports currents up to 175mA. Signed-off-by: Matthias Fend Link: https://lore.kernel.org/r/20250514-leds-tps6131x-v5-2-a4fb9e7f2c47@emfend.at Signed-off-by: Lee Jones commit 0d12bb1a7fb6aee144cc2c710573763221b4c245 Author: Matthias Fend Date: Wed May 14 12:10:07 2025 +0200 dt-bindings: leds: Add Texas Instruments TPS6131x flash LED driver Document Texas Instruments TPS61310/TPS61311 flash LED driver devicetree bindings. Signed-off-by: Matthias Fend Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250514-leds-tps6131x-v5-1-a4fb9e7f2c47@emfend.at Signed-off-by: Lee Jones commit bf809a0aab2f3a3a97264f217f2dbee0913b2ed7 Author: Marc Zyngier Date: Thu May 22 09:15:02 2025 +0100 KVM: arm64: Fix documentation for vgic_its_iter_next() As reported by the build robot, the documentation for vgic_its_iter_next() contains a typo. Fix it. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505221421.KAuWlmSr-lkp@intel.com/ Signed-off-by: Marc Zyngier commit f4b18ff2c147d3b56384fcc8adb30bf733bf2300 Author: Ian Rogers Date: Wed May 21 15:15:28 2025 -0700 perf/uapi: Fix PERF_RECORD_SAMPLE comments in AAUX data for PERF_SAMPLE_AUX appears last. PERF_SAMPLE_CGROUP is missing from the comment. This makes the comment match that in the perf_event_open man page. Signed-off-by: Ian Rogers Signed-off-by: Ingo Molnar Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20250521221529.2547099-1-irogers@google.com commit 8b8ef309093ff196967a21ee51a9cdb404a13bf6 Author: Peng Fan Date: Thu May 22 15:11:53 2025 +0800 gpio: timberdale: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 2993d2dd8ff4 ("gpio: timberdale: Make irq_chip immutable") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-4-98ceae7c4c3c@nxp.com Signed-off-by: Bartosz Golaszewski commit 01e4397d0c1c9ae434c574f45359ad0c226a864b Author: Peng Fan Date: Thu May 22 15:11:52 2025 +0800 gpio: lpc18xx: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 289e42df1358 ("gpio: lpc18xx: Make irq_chip immutable") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-3-98ceae7c4c3c@nxp.com Signed-off-by: Bartosz Golaszewski commit 3dff3563cc11e90f046902f0b2be40e82f5ee251 Author: Peng Fan Date: Thu May 22 15:11:51 2025 +0800 gpio: grgpio: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: a30be40bf1d4 ("gpio: grgpio: Make irq_chip immutable") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-2-98ceae7c4c3c@nxp.com Signed-off-by: Bartosz Golaszewski commit 86fabf1b174069465ea12b4140cb35543fd0c738 Author: Peng Fan Date: Thu May 22 15:11:50 2025 +0800 gpio: bcm-kona: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 7b04f98027af ("gpio: bcm-kona: make irq_chip immutable") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-1-98ceae7c4c3c@nxp.com Signed-off-by: Bartosz Golaszewski commit bdcea7e396916c1cc4a7611c33554e5ecf93a54f Author: AngeloGioacchino Del Regno Date: Wed May 21 17:15:48 2025 +0200 iommu/mediatek: Fix compatible typo for mediatek,mt6893-iommu-mm Fix the "mediatek.mt6893-iommu-mm" compatible string typo, as the dot was actually meant to be a comma: "mediatek,mt6893-iommu-mm". Fixes: f6a1e89ab6e3 ("iommu/mediatek: Add support for Dimensity 1200 MT6893 MM IOMMU") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250521151548.185910-1-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel commit e320050eb75e914aa5e12de2a9ab830c9a2ce311 Author: Andreas Gruenbacher Date: Fri May 16 02:58:02 2025 +0200 gfs2: No more gfs2_find_jhead caching We are no longer calling gfs2_find_jhead() on the same log twice, so there is no more reason for keeping the log contents cached across those calls. In addition, log head lookup and log header writing didn't go through the same address space and so the caching wasn't even fully working, anyway. Signed-off-by: Andreas Gruenbacher commit 93bd5edbd6480e3466320ecf97a105f51249c474 Author: Andreas Gruenbacher Date: Fri May 16 04:33:49 2025 +0200 gfs2: Get rid of duplicate log head lookup Currently at mount time, the recovery code looks up the current log head and, if necessary, replays the log and writes a recovery header to indicate that the log is clean. It does that for each log that may need recovery. We also know that our own log will always be checked as part of that process. Then, the mount code looks up the log head of our own log again. The double log head lookup can be costly, but more importantly, it is unnecessary because we can trivially compute the position of the log head after recovery; all we need to do for that is bump the position and lh_sequence by one when writing a recovery header. With that in mind, move the call to gfs2_log_pointers_init() into gfs2_recover_func() and get rid of the double lookup in gfs2_make_fs_rw(). Signed-off-by: Andreas Gruenbacher commit 2ebb94ab93c3e4052f1d76275534d0ff46fc9b91 Author: Andreas Gruenbacher Date: Sat May 17 08:28:14 2025 +0200 gfs2: Simplify clean_journal In function clean_journal(), update @head to point at the log header that indicates successful recovery: this is where logging needs to resume. Signed-off-by: Andreas Gruenbacher commit 8a43d2187691f1f2b9db66f6b08afcc8a1b3095a Author: Andreas Gruenbacher Date: Fri May 16 05:34:20 2025 +0200 gfs2: Simplify gfs2_log_pointers_init Move the initialization of sdp->sd_log_sequence and sdp->sd_log_flush_head inside gfs2_log_pointers_init(). Use gfs2_replay_incr_blk(). Before this change, the log head lookup code in freeze_go_xmote_bh() didn't update sdp->sd_log_flush_head. This is now fixed, but the code in freeze_go_xmote_bh() appears to be pretty useless in the first place: on a frozen filesystem, the log head will not change. Signed-off-by: Andreas Gruenbacher commit 703a4af35647f0f7f77e8942053251d71d221170 Author: Andreas Gruenbacher Date: Fri May 16 05:24:22 2025 +0200 gfs2: Move gfs2_log_pointers_init Move gfs2_log_pointers_init to recovery.c: there is no need for inlining this function. Signed-off-by: Andreas Gruenbacher commit 91793971f3b6db17f234d875e70ebf921901dee4 Author: Andreas Gruenbacher Date: Wed May 14 21:53:00 2025 +0200 gfs2: Minor comments fix Commit 40829760096df ("gfs2: Convert gfs2_find_jhead() to use a folio") replaced grab_cache_page() by filemap_grab_folio(), but the comments were still referring to grab_cache_page(). Signed-off-by: Andreas Gruenbacher commit 5a90f8d499225512a385585ffe3e28f687263d47 Author: Andreas Gruenbacher Date: Fri Mar 28 22:47:02 2025 +0100 gfs2: Don't start unnecessary transactions during log flush Commit 8d391972ae2d ("gfs2: Remove __gfs2_writepage()") changed the log flush code in gfs2_ail1_start_one() to call aops->writepages() instead of aops->writepage(). For jdata inodes, this means that we will now try to reserve log space and start a transaction before we can determine that the pages in question have already been journaled. When this happens in the context of gfs2_logd(), it can now appear that not enough log space is available for freeing up log space, and we will lock up. Fix that by issuing journal writes directly instead of going through aops->writepages() in the log flush code. Fixes: 8d391972ae2d ("gfs2: Remove __gfs2_writepage()") Signed-off-by: Andreas Gruenbacher commit d50a64e3c55e59e45e415c65531b0d76ad4cea36 Author: Andreas Gruenbacher Date: Wed Mar 26 22:21:08 2025 +0100 gfs2: Move gfs2_trans_add_databufs Move gfs2_trans_add_databufs() to trans.c. Pass in a glock instead of a gfs2_inode. Signed-off-by: Andreas Gruenbacher commit 2f022736ee483cffd40f91d9562bc93cea7cba93 Author: Andreas Gruenbacher Date: Thu Mar 20 16:28:38 2025 +0100 gfs2: Rename jdata_dirty_folio to gfs2_jdata_dirty_folio Signed-off-by: Andreas Gruenbacher commit b6ccde39b1c1292ad4442e9410e2c4c2510fe759 Author: Eric Biggers Date: Sun May 11 11:31:33 2025 -0700 gfs2: avoid inefficient use of crc32_le_shift() __get_log_header() was using crc32_le_shift() to update a CRC with four zero bytes. However, this is about 5x slower than just CRC'ing four zero bytes in the normal way. Just do that instead. (We could instead make crc32_le_shift() faster on short lengths. But all its callers do just fine without it, so I'd like to just remove it.) Signed-off-by: Eric Biggers Signed-off-by: Andreas Gruenbacher commit 87faee382d294a35f3dad06dd0c27cdbee12cb97 Author: Andreas Gruenbacher Date: Wed May 7 21:05:40 2025 +0200 gfs2: Do not call iomap_zero_range beyond eof Since commit eb65540aa9fc ("iomap: warn on zero range of a post-eof folio"), iomap_zero_range() warns when asked to zero a folio beyond eof. The warning triggers on the following code path: gfs2_fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) __gfs2_punch_hole() gfs2_block_zero_range() iomap_zero_range() In __gfs2_punch_hole(), gfs2 zeroes out partial folios at the beginning and at the end of the specified range, whether those folios are beyond eof or not. This may add folios to the page cache which are entirely beyond eof, which isn't of any use. Avoid that by truncating the range to zero out at eof. Signed-off-by: Andreas Gruenbacher commit e9a4af22af8fad2dd779e16759d86fb4cf037a73 Author: Christoph Hellwig Date: Mon May 5 11:18:28 2025 +0200 gfs: don't check for AOP_WRITEPAGE_ACTIVATE in gfs2_write_jdata_batch __gfs2_jdata_write_folio can't return AOP_WRITEPAGE_ACTIVATE, so don't check for it in gfs2_write_jdata_batch. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher commit 4fe238513407d83f38bf5782e8bcdd7b8baeb85d Author: Shenghao Ding Date: Thu May 22 09:43:47 2025 +0800 ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib Calibration data getting function for SPI and I2C HDA drivers are almost same, which read the calibration data from UEFI. To put them into tas2781_hda lib for code cleanup is more reasonable than to still keep them in the codec driver. For tas2781 codec driver, there're two different sources for calibrated data, one is from bin file, generated in factory test, requested and read in codec driver side; the other is from user space during device bootup. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250522014347.1163-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit f4c7baa0699b69edb6887a992283b389761e0e81 Author: Haoxiang Li Date: Fri May 16 15:16:54 2025 +0300 drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue() Add check for the return value of alloc_ordered_workqueue() and alloc_workqueue(). Furthermore, if some allocations fail, cleanup works are added to avoid potential memory leak problem. Fixes: 40053823baad ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20d3d096c6a4907636f8a1389b3b4dd753ca356e.1747397638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit dcab7a228f4ea9cda3f5b0a1f0679e046d23d7f7) Signed-off-by: Joonas Lahtinen commit 9cb15478916e849d62a6ec44b10c593b9663328c Author: Imre Deak Date: Mon May 19 16:34:17 2025 +0300 drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read Due to a problem in the iTBT DP-in adapter's firmware the sink on a TBT link may get disconnected inadvertently if the SINK_COUNT_ESI and the DP_LINK_SERVICE_IRQ_VECTOR_ESI0 registers are read in a single AUX transaction. Work around the issue by reading these registers in separate transactions. The issue affects MTL+ platforms and will be fixed in the DP-in adapter firmware, however releasing that firmware fix may take some time and is not guaranteed to be available for all systems. Based on this apply the workaround on affected platforms. See HSD #13013007775. v2: Cc'ing Mika Westerberg. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147 Cc: Mika Westerberg Cc: stable@vger.kernel.org Reviewed-by: Mika Westerberg Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250519133417.1469181-1-imre.deak@intel.com (cherry picked from commit c3a48363cf1f76147088b1adb518136ac5df86a0) Signed-off-by: Joonas Lahtinen commit a38b3232d618653155032a51208e974511c151e4 Author: Imre Deak Date: Mon May 12 17:26:00 2025 +0300 drm/i915/ptl: Use everywhere the correct DDI port clock select mask The PTL XELPDP_PORT_CLOCK_CTL register XELPDP_DDI_CLOCK_SELECT field's size is 5 bits vs. the earlier platforms where its size is 4 bits. Make sure the field is read-out/programmed everywhere correctly, according to the above. Cc: Mika Kahola Cc: stable@vger.kernel.org # v6.13+ Tested-by: Mika Kahola Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250512142600.824347-1-imre.deak@intel.com (cherry picked from commit d0bf684bd42db22e7d131a038f8f78927fa6a72a) Signed-off-by: Joonas Lahtinen commit b495021a973e2468497689bd3e29b736747b896f Author: Jiri Slaby (SUSE) Date: Thu May 22 07:38:35 2025 +0200 tty: serial: 8250_omap: fix TX with DMA for am33xx Commit 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo") introduced an error in the TX DMA handling for 8250_omap. When the OMAP_DMA_TX_KICK flag is set, the "skip_byte" is pulled from the kfifo and emitted directly in order to start the DMA. While the kfifo is updated, dma->tx_size is not decreased. This leads to uart_xmit_advance() called in omap_8250_dma_tx_complete() advancing the kfifo by one too much. In practice, transmitting N bytes has been seen to result in the last N-1 bytes being sent repeatedly. This change fixes the problem by moving all of the dma setup after the OMAP_DMA_TX_KICK handling and using kfifo_len() instead of the DMA size for the 4-byte cutoff check. This slightly changes the behaviour at buffer wraparound, but it still transmits the correct bytes somehow. Now, the "skip_byte" would no longer be accounted to the stats. As previously, dma->tx_size included also this skip byte, up->icount.tx was updated by aforementioned uart_xmit_advance() in omap_8250_dma_tx_complete(). Fix this by using the uart_fifo_out() helper instead of bare kfifo_get(). Based on patch by Mans Rullgard Signed-off-by: "Jiri Slaby (SUSE)" Fixes: 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo") Link: https://lore.kernel.org/all/20250506150748.3162-1-mans@mansr.com/ Reported-by: Mans Rullgard Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250522053835.3495975-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit c36ec00d7f67590cb03e233959cd92fe969753a3 Author: Sheng Yong Date: Sat May 17 17:05:43 2025 +0800 erofs: add 'fsoffset' mount option to specify filesystem offset When attempting to use an archive file, such as APEX on android, as a file-backed mount source, it fails because EROFS image within the archive file does not start at offset 0. As a result, a loop or a dm device is still needed to attach the image file at an appropriate offset first. Similarly, if an EROFS image within a block device does not start at offset 0, it cannot be mounted directly either. To address this issue, this patch adds a new mount option `fsoffset=x' to accept a start offset for the primary device. The offset should be aligned to the block size. EROFS will add this offset before performing read requests. Signed-off-by: Sheng Yong Signed-off-by: Wang Shuai Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250517090544.2687651-1-shengyong1@xiaomi.com [ Gao Xiang: minor update on documentation and the error message. ] Reviewed-by: Hongbo Li Signed-off-by: Gao Xiang commit 3da895b23901964fcf23450f10b529d45069f333 Merge: 945301db34f14e 01e035fd0380b2 Author: Jakub Kicinski Date: Wed May 21 20:44:24 2025 -0700 Merge branch 'net-mlx5-hws-set-of-fixes-and-adjustments' Tariq Toukan says: ==================== net/mlx5: HWS, set of fixes and adjustments This patch series by Yevgeny and Vlad introduces a set of steering fixes and adjustments. ==================== Link: https://patch.msgid.link/1747766802-958178-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 01e035fd0380b285d72725adb5a45f1d73549db8 Author: Yevgeny Kliteynik Date: Tue May 20 21:46:42 2025 +0300 net/mlx5: HWS, handle modify header actions dependency Having adjacent accelerated modify header actions (so-called pattern-argument actions) may result in inconsistent outcome. These inconsistencies can take the form of writes to the same field or a read coupled with a write to the same field. The solution is to detect such dependencies and insert nops between the offending actions. The existing implementation had a few issues, which pretty much required a complete rewrite of the code that handles these dependencies. In the new implementation we're doing the following: * Checking any two adjacent actions for conflicts (not just odd-even pairs). * Marking 'set' and 'add' action fields as destination, rather than source, for the purposes of checking for conflicts. * Checking all types of actions ('add', 'set', 'copy') for dependencies. * Managing offsets of the args in the buffer - copy the action args to the right place in the buffer. * Checking that after inserting nops we're still within the number of supported actions - return an error otherwise. Signed-off-by: Vlad Dogaru Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747766802-958178-5-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 0b6e452caf03da63aeb2e84475771d6fb6d6cd99 Author: Yevgeny Kliteynik Date: Tue May 20 21:46:41 2025 +0300 net/mlx5: HWS, fix typo - 'nope' to 'nop' Fix typo - rename 'nope_locations' to 'nop_locations', which describes the locations of 'nop' actions. To shorten the lines, this renaming also required some refactoring. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747766802-958178-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit b206d9ec19dfc2db706883ff6b46b259831a033d Author: Vlad Dogaru Date: Tue May 20 21:46:40 2025 +0300 net/mlx5: HWS, register reformat actions with fw Hardware steering handles actions differently from firmware, but for termination rules that use encapsulation the firmware needs to be aware of the action. Fix this by registering reformat actions with the firmware the first time this is needed. To do this, add a third possible owner for an action, and also a lock to protect against registration of the same action from different threads. Signed-off-by: Vlad Dogaru Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747766802-958178-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit ca7690dae1269f454572c163ed5271feed060af5 Author: Vlad Dogaru Date: Tue May 20 21:46:39 2025 +0300 net/mlx5: SWS, fix reformat id error handling The firmware reformat id is a u32 and can't safely be returned as an int. Because the functions also need a way to signal error, prefer to return the id as an output parameter and keep the return code only for success/error. While we're at it, also extract some duplicate code to fetch the reformat id from a more generic struct pkt_reformat. Signed-off-by: Vlad Dogaru Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1747766802-958178-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 945301db34f14eaa0be794458b67aead74ff79fa Author: Eric Dumazet Date: Tue May 20 12:19:08 2025 +0000 net: add debug checks in ____napi_schedule() and napi_poll() While tracking an IDPF bug, I found that idpf_vport_splitq_napi_poll() was not following NAPI rules. It can indeed return @budget after napi_complete() has been called. Add two debug conditions in networking core to hopefully catch this kind of bugs sooner. IDPF bug will be fixed in a separate patch. [ 72.441242] repoll requested for device eth1 idpf_vport_splitq_napi_poll [idpf] but napi is not scheduled. [ 72.446291] list_del corruption. next->prev should be ff31783d93b14040, but was ff31783d93b10080. (next=ff31783d93b10080) [ 72.446659] kernel BUG at lib/list_debug.c:67! [ 72.446816] Oops: invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 72.447031] CPU: 156 UID: 0 PID: 16258 Comm: ip Tainted: G W 6.15.0-dbg-DEV #1944 NONE [ 72.447340] Tainted: [W]=WARN [ 72.447702] RIP: 0010:__list_del_entry_valid_or_report (lib/list_debug.c:65) [ 72.450630] Call Trace: [ 72.450720] [ 72.450797] net_rx_action (include/linux/list.h:215 include/linux/list.h:287 net/core/dev.c:7385 net/core/dev.c:7516) [ 72.450928] ? lock_release (kernel/locking/lockdep.c:?) [ 72.451059] ? clockevents_program_event (kernel/time/clockevents.c:?) [ 72.451222] handle_softirqs (kernel/softirq.c:579) [ 72.451356] ? do_softirq (kernel/softirq.c:480) [ 72.451480] ? idpf_vc_xn_exec (drivers/net/ethernet/intel/idpf/idpf_virtchnl.c:462) idpf [ 72.451635] do_softirq (kernel/softirq.c:480) [ 72.451750] [ 72.451828] [ 72.451905] __local_bh_enable_ip (kernel/softirq.c:?) [ 72.452051] idpf_vc_xn_exec (drivers/net/ethernet/intel/idpf/idpf_virtchnl.c:462) idpf [ 72.452210] idpf_send_delete_queues_msg (drivers/net/ethernet/intel/idpf/idpf_virtchnl.c:2083) idpf [ 72.452390] idpf_vport_stop (drivers/net/ethernet/intel/idpf/idpf_lib.c:837 drivers/net/ethernet/intel/idpf/idpf_lib.c:868) idpf [ 72.452541] ? idpf_vport_stop (include/linux/bottom_half.h:? include/linux/netdevice.h:4762 drivers/net/ethernet/intel/idpf/idpf_lib.c:855) idpf [ 72.452695] idpf_initiate_soft_reset (drivers/net/ethernet/intel/idpf/idpf_lib.c:?) idpf [ 72.452867] idpf_change_mtu (drivers/net/ethernet/intel/idpf/idpf_lib.c:2189) idpf [ 72.453015] netif_set_mtu_ext (net/core/dev.c:9437) [ 72.453157] ? packet_notifier (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 net/packet/af_packet.c:4240) [ 72.453292] netif_set_mtu (net/core/dev.c:9515) [ 72.453416] dev_set_mtu (net/core/dev_api.c:?) [ 72.453534] bond_change_mtu (drivers/net/bonding/bond_main.c:4833) [ 72.453666] netif_set_mtu_ext (net/core/dev.c:9437) [ 72.453803] do_setlink (net/core/rtnetlink.c:3116) [ 72.453925] ? rtnl_newlink (net/core/rtnetlink.c:3901) [ 72.454055] ? rtnl_newlink (net/core/rtnetlink.c:3901) [ 72.454185] ? rtnl_newlink (net/core/rtnetlink.c:3901) [ 72.454314] ? trace_contention_end (include/trace/events/lock.h:122) [ 72.454467] ? __mutex_lock (arch/x86/include/asm/preempt.h:85 kernel/locking/mutex.c:611 kernel/locking/mutex.c:746) [ 72.454597] ? cap_capable (include/trace/events/capability.h:26) [ 72.454721] ? security_capable (security/security.c:?) [ 72.454857] rtnl_newlink (net/core/rtnetlink.c:?) [ 72.454982] ? lock_is_held_type (kernel/locking/lockdep.c:5599 kernel/locking/lockdep.c:5938) [ 72.455121] ? __lock_acquire (kernel/locking/lockdep.c:?) [ 72.455256] ? __change_page_attr_set_clr (arch/x86/mm/pat/set_memory.c:685) [ 72.455438] ? __lock_acquire (kernel/locking/lockdep.c:?) [ 72.455582] ? rtnetlink_rcv_msg (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 net/core/rtnetlink.c:6885) [ 72.455721] ? lock_acquire (kernel/locking/lockdep.c:5866) [ 72.455848] ? rtnetlink_rcv_msg (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 net/core/rtnetlink.c:6885) [ 72.455987] ? lock_release (kernel/locking/lockdep.c:?) [ 72.456117] ? rcu_read_unlock (include/linux/rcupdate.h:341 include/linux/rcupdate.h:871) [ 72.456249] ? __pfx_rtnl_newlink (net/core/rtnetlink.c:3956) [ 72.456388] rtnetlink_rcv_msg (net/core/rtnetlink.c:6955) [ 72.456526] ? rtnetlink_rcv_msg (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 net/core/rtnetlink.c:6885) [ 72.456671] ? lock_acquire (kernel/locking/lockdep.c:5866) [ 72.456802] ? net_generic (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 include/net/netns/generic.h:45) [ 72.456929] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6858) [ 72.457082] netlink_rcv_skb (net/netlink/af_netlink.c:2534) [ 72.457212] netlink_unicast (net/netlink/af_netlink.c:1313) [ 72.457344] netlink_sendmsg (net/netlink/af_netlink.c:1883) [ 72.457476] __sock_sendmsg (net/socket.c:712) [ 72.457602] ____sys_sendmsg (net/socket.c:?) [ 72.457735] ? _copy_from_user (arch/x86/include/asm/uaccess_64.h:126 arch/x86/include/asm/uaccess_64.h:134 arch/x86/include/asm/uaccess_64.h:141 include/linux/uaccess.h:178 lib/usercopy.c:18) [ 72.457875] ___sys_sendmsg (net/socket.c:2620) [ 72.458042] ? __call_rcu_common (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:119 arch/x86/include/asm/irqflags.h:159 kernel/rcu/tree.c:3107) [ 72.458185] ? mntput_no_expire (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 fs/namespace.c:1457) [ 72.458324] ? lock_acquire (kernel/locking/lockdep.c:5866) [ 72.458451] ? mntput_no_expire (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 fs/namespace.c:1457) [ 72.458588] ? lock_release (kernel/locking/lockdep.c:?) [ 72.458718] ? mntput_no_expire (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 fs/namespace.c:1457) [ 72.458856] __x64_sys_sendmsg (net/socket.c:2652) [ 72.458997] ? do_syscall_64 (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:119 include/linux/entry-common.h:198 arch/x86/entry/syscall_64.c:90) [ 72.459136] do_syscall_64 (arch/x86/entry/syscall_64.c:?) [ 72.459259] ? exc_page_fault (arch/x86/mm/fault.c:1542) [ 72.459387] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 72.459555] RIP: 0033:0x7fd15f17cbd0 Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250520121908.1805732-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 8fa18a3e8c0dee9ce060e83257419c8ce39ae3fb Author: Nelson Escobar Date: Wed May 21 01:19:29 2025 +0000 net/enic: Allow at least 8 RQs to always be used Enic started using netif_get_num_default_rss_queues() to set the number of RQs used in commit cc94d6c4d40c ("enic: Adjust used MSI-X wq/rq/cq/interrupt resources in a more robust way") This resulted in machines with less than 16 cpus using less than 8 RQs. Allow enic to use at least 8 RQs no matter how many cpus are in the machine to not impact existing enic workloads after a kernel upgrade. Reviewed-by: John Daley Reviewed-by: Satish Kharat Signed-off-by: Nelson Escobar Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250521-enic_min_8rq-v1-1-691bd2353273@cisco.com Signed-off-by: Jakub Kicinski commit 17fcb3dc12bbee8ec3e32ca1f60898f252e06b2d Author: Fan Gong Date: Tue May 20 13:26:59 2025 +0300 hinic3: module initialization and tx/rx logic This is [1/3] part of hinic3 Ethernet driver initial submission. With this patch hinic3 is a valid kernel module but non-functional driver. The driver parts contained in this patch: Module initialization. PCI driver registration but with empty id_table. Auxiliary driver registration. Net device_ops registration but open/stop are empty stubs. tx/rx logic. All major data structures of the driver are fully introduced with the code that uses them but without their initialization code that requires management interface with the hw. Co-developed-by: Xin Guo Signed-off-by: Xin Guo Signed-off-by: Fan Gong Co-developed-by: Gur Stavi Signed-off-by: Gur Stavi Link: https://patch.msgid.link/76a137ffdfe115c737c2c224f0c93b60ba53cc16.1747736586.git.gur.stavi@huawei.com Signed-off-by: Jakub Kicinski commit bd15b2b26c982540d973b1d672c8aa37dae25a8b Author: Sumanth Gavini Date: Tue May 20 00:21:19 2025 -0700 nfc: Correct Samsung "Electronics" spelling in copyright headers Fix the misspelling of "Electronics" in copyright headers across: - s3fwrn5 driver - virtual_ncidev driver Signed-off-by: Sumanth Gavini Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250520072119.176018-1-sumanth.gavini@yahoo.com Signed-off-by: Jakub Kicinski commit edb888d29748cee674006a52e544925dacc7728e Author: Alok Tiwari Date: Mon May 19 07:17:19 2025 -0700 emulex/benet: correct command version selection in be_cmd_get_stats() Logic here always sets hdr->version to 2 if it is not a BE3 or Lancer chip, even if it is BE2. Use 'else if' to prevent multiple assignments, setting version 0 for BE2, version 1 for BE3 and Lancer, and version 2 for others. Fixes potential incorrect version setting when BE2_chip and BE3_chip/lancer_chip checks could both be true. Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20250519141731.691136-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski commit 731bdd97466a280d6bdd8eceeb13d9fab6f26cbd Author: JP Kobryn Date: Wed May 21 18:32:02 2025 -0700 cgroup: avoid per-cpu allocation of size zero rstat cpu locks Subsystem rstat locks are dynamically allocated per-cpu. It was discovered that a panic can occur during this allocation when the lock size is zero. This is the case on non-smp systems, since arch_spinlock_t is defined as an empty struct. Prevent this allocation when !CONFIG_SMP by adding a pre-processor conditional around the affected block. Signed-off-by: JP Kobryn Reported-by: Klara Modin Fixes: 748922dcfabd ("cgroup: use subsystem-specific rstat locks to avoid contention") Signed-off-by: Tejun Heo commit bfc0c6fecf3bd2da93beb565ccfb9e704cadddcc Author: Kent Overstreet Date: Wed May 21 15:54:56 2025 -0400 bcachefs: Drop empty accounting updates Signed-off-by: Kent Overstreet commit 136d082abc2adcdc10a472e29710826eee7f5f80 Author: Kent Overstreet Date: Wed May 21 03:19:18 2025 -0400 bcachefs: Improve trace_trans_restart_upgrade - Convert to a 'fs_str' tracepoint that just emits as a string: this lets us build up the tracepoint with a printbuf, using our pretty printers, and they're much easier to manage - Include locks_held, before and after - Include the btree node pointer we failed on (error pointer, null, or real node) Signed-off-by: Kent Overstreet commit f638b84224348dd58a348617e6f648e967e1b1ce Author: Kent Overstreet Date: Tue May 20 22:59:58 2025 -0400 bcachefs: fix bch2_inum_snapshot_to_path() Signed-off-by: Kent Overstreet commit 2faa8ab0d03cd4e619024a257f69b7e51ac82c15 Author: Kent Overstreet Date: Tue May 20 20:15:39 2025 -0400 bcachefs: fix duplicate printk Signed-off-by: Kent Overstreet commit 4ba99dde330b2d4b6de65f27ced60e7f0fbc21c2 Author: Kent Overstreet Date: Mon May 19 10:31:44 2025 -0400 bcachefs: BCH_INODE_has_case_insensitive Add a flag for tracking whether a directory has case-insensitive descendents - so that overlayfs can disallow mounting, even though the filesystem supports case insensitivity. This is a new on disk format version, with a (cheap) upgrade to ensure the flag is correctly set on existing inodes. Create, rename and fssetxattr are all plumbed to ensure the new flag is set, and we've got new fsck code that hooks into check_inode(0. Signed-off-by: Kent Overstreet commit 77eac89c7943a4ed5c9bc42def9b3140d951184f Author: Kent Overstreet Date: Mon May 19 10:10:19 2025 -0400 bcachefs: bch2_inode_find_by_inum_snapshot() Move a fsck.c helper into inode.c, eliminate some duplicate and organize the inode lookup helpers. Signed-off-by: Kent Overstreet commit 77aeaa2f0fcac2d68fe1af61169fe26d5fac9a22 Author: Kent Overstreet Date: Mon May 19 09:48:50 2025 -0400 bcachefs: bch2_inum_snapshot_to_path() Add a better helper for printing out paths of inodes when we don't know the subvolume, for fsck. Signed-off-by: Kent Overstreet commit 7c4f22af251ae32762cbacb998f86977535ee0f2 Author: Kent Overstreet Date: Mon May 19 09:17:39 2025 -0400 bcachefs: bch2_rename_trans() only runs rename-to-dir code if needed Signed-off-by: Kent Overstreet commit 011d644b769609ecf6ceef71a1411c4a9e008a5b Author: Kent Overstreet Date: Mon May 19 09:12:49 2025 -0400 bcachefs: subvol_inum_eq() Signed-off-by: Kent Overstreet commit c3a7fd95e02a33cad16f3c455e482951bcbc7224 Author: Kent Overstreet Date: Mon May 19 09:15:31 2025 -0400 bcachefs: Don't set bi_casefold on non directories bi_casefold only makes sense for directories, and since it's one of the variable length fields setting it unnecessarily wastes space. Signed-off-by: Kent Overstreet commit a96c5e504538cf150ec6e3b19702f8c658298323 Author: Alan Huang Date: Mon May 19 19:51:04 2025 +0800 bcachefs: Remove duplicate call to bch2_trans_begin() There is one in for_each_btree_key_max(). Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit c631bb41f5a9cf266762290166a00132a04f215d Author: Kent Overstreet Date: Fri May 16 16:45:44 2025 -0400 bcachefs: Call bch2_bkey_set_needs_rebalance() earlier in write path There's no reason to be running this inside our transaction; it forces us to copy the key we're updating to a temporary, which we'd like to skip. Signed-off-by: Kent Overstreet commit f132a78095b6a67f717657a09640539cb847d2d6 Author: Kent Overstreet Date: Fri May 16 17:07:06 2025 -0400 bcachefs: Simplify bch2_extent_atomic_end() It used to be that we had a fixed maximum number of btree paths to work with - 64. That's no longer the case, so bch2_extent_atomic_end() doesn't have to be as strict. Signed-off-by: Kent Overstreet commit 7fd643c032ae0ced53d57fc23981c4d3d269d352 Author: Kent Overstreet Date: Fri May 16 20:43:18 2025 -0400 bcachefs: Coalesce accounting in trans commit Accounting has gotten quite heavy, and there's lots of redundancy in accounting updates within a transaction, as we often add/delete multiple extents that touch the same accountign counters. This will reduce the amount of data that we journal, and reduce pressure downstream on the btree write buffer. Signed-off-by: Kent Overstreet commit e8f9992b0aab188ce37ef011a3ec8613f02d05aa Author: Kent Overstreet Date: Fri May 16 20:26:01 2025 -0400 bcachefs: Split out accounting in transaction commit There can be a lot of rendundancy in accounting updates within a single btree transaction. Split out accounting updates so that they can be deduped, in the next commit. Signed-off-by: Kent Overstreet commit 247abee6ae6d2c6f283857b16fbf4bf201e72061 Author: Kent Overstreet Date: Fri May 16 20:23:58 2025 -0400 bcachefs: btree_trans_subbuf Signed-off-by: Kent Overstreet commit 81c42933a50766f5230384375e28b5cd64a46113 Author: Kent Overstreet Date: Sat May 17 22:32:51 2025 -0400 bcachefs: Make accounting mismatch errors more readable Signed-off-by: Kent Overstreet commit 51e23c9d60a42f8da4d2f4d48c86eb00c4e351ea Author: Kent Overstreet Date: Sat May 17 19:54:39 2025 -0400 bcachefs: async objs now support bch_write_ops Signed-off-by: Kent Overstreet commit 8c3fc7cca38459751489f5015f3282a64e452b7e Author: Kent Overstreet Date: Sat May 17 19:53:50 2025 -0400 bcachefs: fix bch2_debugfs_flush_buf() when tabstops are in use Signed-off-by: Kent Overstreet commit 6b86da9282b0f6a3fb7aae709dca9feb4c8316b5 Author: Kent Overstreet Date: Sat May 17 15:58:23 2025 -0400 bcachefs: fsck: Include loops in error messages This fixes the subvol loop checking and directory loop checking to print the loop. Signed-off-by: Kent Overstreet commit 39cea302f13a0a9dc4cf39248529a42e79d06842 Author: Kent Overstreet Date: Fri May 9 17:01:05 2025 -0400 bcachefs: bch2_check_bucket_backpointer_mismatch() Detect buckets with missing backpointers, and run repair on demand. __bch2_move_data_phys() now calls bch2_check_bucket_backpointer_mismatch() as it walks buckets, which checks for missing backpointers by comparing backpointers against bucket sector counts. When missing backpointers are detected, we kick off bch2_check_extents_to_backpointers() asynchronously - right away if we're trying to evacuate, or with a threshold if we're just running copygc. Signed-off-by: Kent Overstreet commit 15f969326ee296f7b7faf7704105a99fa02c288d Author: Kent Overstreet Date: Sat May 17 15:05:26 2025 -0400 bcachefs: Improve bucket_bitmap code Add some more helpers, and mismatches is now a superset of the empty bitmap - simplifies most checks. Signed-off-by: Kent Overstreet commit 06977ea82b5df669c833399b4b8e2f163a8bcfbc Author: Kent Overstreet Date: Fri May 9 23:28:01 2025 -0400 bcachefs: Run recovery passes asynchronously When we request a recovery pass to be run online, i.e. not during recovery, if it's an online pass it'll now be run in the background, instead of waiting for the next mount. To avoid situations where recovery passes are running continuously, this also includes ratelimiting: if the RUN_RECOVERY_PASS_ratelimit flag is passed, the pass may be deferred until later - depending on the runtime and last run stats in the recovery_passes superblock section. Signed-off-by: Kent Overstreet commit d4b30ed90c778bd5612fc82c2a5536de66d95184 Author: Kent Overstreet Date: Wed May 14 15:54:20 2025 -0400 bcachefs: bch2_run_explicit_recovery_pass() cleanup Consolidate the run_explicit_recovery_pass() interfaces by adding a flags parameter; this will also let us add a RUN_RECOVERY_PASS_ratelimit flag. Signed-off-by: Kent Overstreet commit 06266465cc8a23ae037eb48ede9bdcd5eed8621c Author: Kent Overstreet Date: Sat May 10 18:23:41 2025 -0400 bcachefs: bch2_recovery_pass_status_to_text() Show recovery pass status in sysfs - important now that we're running them automatically in the background. Signed-off-by: Kent Overstreet commit 7ed4c14e20be2b113e111ec9fa1803c778e00280 Author: Kent Overstreet Date: Tue May 13 17:36:55 2025 -0400 bcachefs: Reduce usage of recovery.curr_pass We want recovery.curr_pass to be private to the recovery passes code, for better showing recovery pass status; also, it may rewind and is generally not the correct member to use. Signed-off-by: Kent Overstreet commit ab355520305ce4ab7331757c35b1042b32cae52e Author: Kent Overstreet Date: Sat May 10 17:45:45 2025 -0400 bcachefs: __bch2_run_recovery_passes() Consolidate bch2_run_recovery_passes() and bch2_run_online_recovery_passes(), prep work for automatically scheduling and running recovery passes in the background. - Now takes a mask of which passes to run, automatic background repair will pass in sb.recovery_passes_required. - Skips passes that are failing: a pass that failed may be reattempted after another pass succeeds (some passes depend on repair done by other passes for successful completion). - bch2_recovery_passes_match() helper to skip alloc passes on a filesystem without alloc info. Signed-off-by: Kent Overstreet commit 68708efcac711946ffeb1803eb54ebaf44675010 Author: Kent Overstreet Date: Sat May 10 18:21:49 2025 -0400 bcachefs: struct bch_fs_recovery bch_fs has gotten obnoxiously big, let's start organizing thins a bit better. Signed-off-by: Kent Overstreet commit 878713b5f56aa4b3dce5bdb7f34952a10183b106 Author: Kent Overstreet Date: Fri May 16 23:12:09 2025 -0400 bcachefs: kill copy in bch2_disk_accounting_mod() Signed-off-by: Kent Overstreet commit 295dbf50e5f60cbc41416aff1feadd876d17e492 Author: Kent Overstreet Date: Fri May 16 17:29:53 2025 -0400 bcachefs: Optimize bch2_trans_start_alloc_update() Avoid doing more updates if we already have one. Signed-off-by: Kent Overstreet commit 9469556a5fc1457d0a55f391010dfb82f7c5e20a Author: Kent Overstreet Date: Thu May 15 07:45:52 2025 -0400 bcachefs: btree key cache asserts Signed-off-by: Kent Overstreet commit a78a11900ecbb358710f65f78eee45e3b5691180 Author: Kent Overstreet Date: Fri May 16 17:18:27 2025 -0400 bcachefs: journal path now uses discard_opt_enabled() Signed-off-by: Kent Overstreet commit 8a6fa52e07bc8d2e5535e1e2c64b621d34fef9c7 Author: Kent Overstreet Date: Fri May 16 17:21:00 2025 -0400 bcachefs: relock_fail tracepoint now includes btree Signed-off-by: Kent Overstreet commit 84b9f17195b2d4914763feee00ca44be42c9f8e2 Author: Kent Overstreet Date: Thu May 15 10:08:06 2025 -0400 bcachefs: do_rebalance_scan() now only updates bch_extent_rebalance This ensures that our pending rebalance work accounting is accurate quickly. Signed-off-by: Kent Overstreet commit bde41d9a58f159da8330b499cced04c40104f7f3 Author: Kent Overstreet Date: Thu May 15 09:15:24 2025 -0400 bcachefs: better error message for subvol_fs_path_parent_wrong Signed-off-by: Kent Overstreet commit fdd0807f812204c36bfe71710c8a796731ee3777 Author: Kent Overstreet Date: Thu May 15 08:41:26 2025 -0400 bcachefs: Improve bch2_repair_inode_hash_info() Improve this so it can be used by fsck.c check_inode(); it provides a much better error message than the check_inode() version. Signed-off-by: Kent Overstreet commit 123d2d09ff599ec11a01687f472c7bdc3b3b6f12 Author: Kent Overstreet Date: Thu May 15 08:31:02 2025 -0400 bcachefs: bch2_inode_find_snapshot_root() Factor out a small common helper. Signed-off-by: Kent Overstreet commit 4a67b94bd816b56768fe06d880f02ae0bf6ceade Author: Alan Huang Date: Tue May 13 02:44:26 2025 +0800 bcachefs: Early return to avoid unnecessary lock Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 688321f97e0820024c259a066cd197e9e69cb8c8 Author: Alan Huang Date: Thu May 15 22:29:50 2025 +0800 bcachefs: Kill BTREE_TRIGGER_bucket_invalidate Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit e882906929c55a9561641944d24c11dc3f338225 Author: Kent Overstreet Date: Wed May 14 17:58:00 2025 -0400 bcachefs: Fix opt hooks in sysfs for non sb option We weren't checking if the option changed for non-superblock options - this led to rebalance not waking up when enabling the "rebalance_enabled" option. Signed-off-by: Kent Overstreet commit 648c1142c9f1ad914c9fd79cedbd6b92ac788cd6 Author: Kent Overstreet Date: Wed May 14 10:44:21 2025 -0400 bcachefs: fix can_write_extent() Failing to check the return value of bch2_dev_rcu(): we could (technically) race with device removal. Signed-off-by: Kent Overstreet commit c7378d0e5e23db8c7da8173d7961620078071796 Author: Kent Overstreet Date: Tue May 13 13:49:51 2025 -0400 bcachefs: Add tracepoint, counter for io_move_created_rebalance Internal moves shouldn't add new rebalance_work, but it's been reported that this seems to be happening. Add a tracepoint and counter so we can see what's going on. Signed-off-by: Kent Overstreet commit e4e513f2d51d3852a7af90d50c890815a8af70b5 Author: Kent Overstreet Date: Thu May 8 17:19:10 2025 -0400 bcachefs: move_buckets in rhashtable when allocated Signed-off-by: Kent Overstreet commit fb7e78cc251bb931dea2b41bffbea344bdac5ddb Author: Kent Overstreet Date: Thu May 8 17:17:17 2025 -0400 bcachefs: Move pending buckets queue to buckets_in_flight Signed-off-by: Kent Overstreet commit 49188a9313e2209d064082378eafe5baf5a27bba Author: Kent Overstreet Date: Thu May 8 17:01:49 2025 -0400 bcachefs: kill move_bucket_in_flight Small cleanup/simplification, and prep work for the next patch, which will add checking if buckets don't get evacuated because they're missing backpointers. Signed-off-by: Kent Overstreet commit b42fac043f95512911f3e496585a0844747dc593 Author: Kent Overstreet Date: Tue May 13 10:53:23 2025 -0400 bcachefs: bch2_fs_emergency_read_only2() More error message cleanup: instead of multiple printk()s per error, we want to be building up a single error message in a printbuf, so that it can be printed with indenting that shows grouping and avoid errors getting interspersed or lost in the log. This gets rid of most calls to bch2_fs_emergency_read_only(). We still have calls to - bch2_fatal_error() - bch2_fs_fatal_error() - bch2_fs_fatal_err_on() that need work. Signed-off-by: Kent Overstreet commit ac4c7ac90eb7f5ea013b8842b2d803742f4484c0 Author: Kent Overstreet Date: Mon May 12 15:14:19 2025 -0400 bcachefs: Extra write buffer asserts Signed-off-by: Kent Overstreet commit 7ad7497862a2484333fa6a054aeab11a9b2f979b Author: Kent Overstreet Date: Mon May 12 14:54:07 2025 -0400 bcachefs: add missing locking in bch2_write_point_to_text() Signed-off-by: Kent Overstreet commit 177ac4925f4cbcfb672cb46f1d443a3d6c8a4b11 Author: Kent Overstreet Date: Sat May 10 17:19:05 2025 -0400 bcachefs: Don't rewind recovery if not in recovery Signed-off-by: Kent Overstreet commit 367cad09664aaf2d37e1b694eab6a14d0b5dedef Author: Kent Overstreet Date: Sat May 10 17:16:11 2025 -0400 bcachefs: Rename fsck_running, recovery_running flags Slightly more readable. Signed-off-by: Kent Overstreet commit 5b1247ca5f286c50dfe58d461c91bc20fe80a749 Author: Kent Overstreet Date: Sat May 10 15:53:10 2025 -0400 bcachefs: debug_check_bkey_unpack Signed-off-by: Kent Overstreet commit 34aeb820f900529bd40680399d379fa04a952850 Author: Kent Overstreet Date: Sat May 10 15:49:38 2025 -0400 bcachefs: debug_check_bset_lookups Signed-off-by: Kent Overstreet commit c4e38894407d27742c1fc8d0d64d8145c83077d5 Author: Kent Overstreet Date: Sat May 10 15:25:56 2025 -0400 bcachefs: debug_check_iterators no longer requires BCACHEFS_DEBUG Signed-off-by: Kent Overstreet commit 110bb6cb8b48bd6736d8e7c08a4236d443f8064a Author: Kent Overstreet Date: Sat May 10 15:12:13 2025 -0400 bcachefs: debug_check_btree_locking modparam Don't put btree locking asserts behind CONFIG_BCACHEFS_DEBUG, put them behind a module parameter. Signed-off-by: Kent Overstreet commit 284251557562f6e8f0ce439cb52a6b9645b4e9a4 Author: Kent Overstreet Date: Sat May 10 14:14:06 2025 -0400 bcachefs: Debug params are now static_keys We'd like users to be able to debug without building custom kernels, so this will help us get rid of CONFIG_BCACHEFS_DEBUG, at least for most things. Signed-off-by: Kent Overstreet commit b51b4055c3cd516cba9e0aee3d8ecfba1d75c047 Author: Kent Overstreet Date: Sat May 10 13:24:25 2025 -0400 bcachefs: Slim down inlined part of bch2_btree_path_upgrade() Signed-off-by: Kent Overstreet commit 001c1d146f38620d6d969b66421460a5d8fd966d Author: Kent Overstreet Date: Fri May 9 23:22:23 2025 -0400 bcachefs: online_fsck_mutex -> run_recovery_passes_lock Prep work for automatically running recovery passes asynchronously. Signed-off-by: Kent Overstreet commit e21f99772112cea57d8389a03d184e69141194b1 Author: Kent Overstreet Date: Fri May 9 18:24:20 2025 -0400 bcachefs: bch_sb_field_recovery_passes New superblock section for statistics on recovery passes - last time ran (successfully), last runtime. This will be used by self healing code to determine when to kick off potentially expensive recovery passes. Signed-off-by: Kent Overstreet commit 20a4b7f3b802f37e44a3c10f97d6ae1aae4daa4e Author: Kent Overstreet Date: Fri May 9 18:12:59 2025 -0400 bcachefs: recovery_passes_types.h -> recovery_passes_format.h Signed-off-by: Kent Overstreet commit 3b7b0c3996b570f9c305c6f3df475a719920d65c Author: Kent Overstreet Date: Fri May 9 23:15:40 2025 -0400 bcachefs: print label correctly in sb_member_to_text() Signed-off-by: Kent Overstreet commit 13ffcbae86dadbf7711f42e4940bafae88a87e1f Author: Kent Overstreet Date: Fri May 9 16:25:21 2025 -0400 bcachefs: "buckets with backpointer mismatches" now allocated on demand More self healing work: we're going to be calling check_bucket_backpointer_mismatch() at runtime, outside of fsck. Then when we need to we'll kick off the full check_extents_to_backpointers recovery pass. Signed-off-by: Kent Overstreet commit 7f9dada701aa357cecf432cf2f345fd3897f92ed Author: Kent Overstreet Date: Fri May 9 15:27:36 2025 -0400 bcachefs: delete dead items in bch_dev Signed-off-by: Kent Overstreet commit 3ffda8c219d636012cfc2b5dae0bf19d831a53e0 Author: Kent Overstreet Date: Fri May 9 15:16:14 2025 -0400 bcachefs: kill dead code in move_data_phys() Signed-off-by: Kent Overstreet commit 82067c916994dd1bfec65496144dc16e17899e36 Author: Kent Overstreet Date: Thu May 8 23:21:28 2025 -0400 bcachefs: buckets_in_flight on stack copygc runs with a full stack available, there's no reason to dynamically allocate this. Signed-off-by: Kent Overstreet commit 1dfa01ef24151547a2a622e90ad73b082b1bc739 Author: Kent Overstreet Date: Thu May 8 14:24:12 2025 -0400 bcachefs: bch2_copygc_dev_wait_amount() Factor out the per-device calculations, for better introspection. Signed-off-by: Kent Overstreet commit 970dde8271b607876bfdbb66b941ffda35e74973 Author: Kent Overstreet Date: Wed May 7 16:34:35 2025 -0400 bcachefs: Add missing include fix debug build in userspace Signed-off-by: Kent Overstreet commit 8c69e2b52ea81b102ace48debd114467199ca77a Author: Kent Overstreet Date: Wed May 7 14:26:18 2025 -0400 bcachefs: Knob for manual snapshot deletion Add 'opts.snapshot_deletion_enabled', enabled by default. This may be turned off so that the new sysfs knob, 'internal/trigger_delete_dead_snapshots', may be used instead - this will allow snapshot deletion to be profiled more easily. Signed-off-by: Kent Overstreet commit a8539ad8fa88e39c3f566b7c35029f25ab90b72e Author: Kent Overstreet Date: Sat May 3 21:26:04 2025 -0400 bcachefs: bcachefs_metadata_version_fast_device_removal Fast device removal, that uses backpointers to find pointers to the device being removed instead of a full metadata scan. This requires BCH_SB_MEMBER_DELETED_UUID, which is an incompatible change - hence the version number bump. We don't fully trust backpointers, so we don't want to reuse device indexes until after a fsck has verified that there aren't any pointers to removed devices. Signed-off-by: Kent Overstreet commit 09fa6c3039d8bb22351ad071ea4656dd4f331d18 Author: Kent Overstreet Date: Sat May 3 21:36:23 2025 -0400 bcachefs: bch2_dev_data_drop_by_backpointers() Currently, device removal has to scan all metadata for pointers to the device being removed. Add a new method, with the same interface as bch2_dev_data_drop(), that scans by backpointers instead - this will drastically speed up device removal. Signed-off-by: Kent Overstreet commit b3f80d09236e4915d7deedfaf15d7bdaef6f14d2 Author: Kent Overstreet Date: Sat May 3 21:55:26 2025 -0400 bcachefs: BCH_SB_MEMBER_DELETED_UUID Add a sentinal value for devices that have been removed, but don't want to reuse their index until a fsck has completed. Signed-off-by: Kent Overstreet commit 66e9a7f13916fb0630cc48e0c21c474607aa3967 Author: Kent Overstreet Date: Tue May 6 00:51:39 2025 -0400 bcachefs: bch2_dev_remove_stripes() respects degraded flags Signed-off-by: Kent Overstreet commit 96fc7d8adb7881f7ffffcd6ab2be3b43fc5a5978 Author: Kent Overstreet Date: Mon May 5 20:35:36 2025 -0400 bcachefs: opts.rebalance_on_ac_only Add an option for setting rebalance to only run when connected to mains power. Signed-off-by: Kent Overstreet commit 502222041c810b5d5ba5d45512e0a131c7f07d0a Author: Kent Overstreet Date: Mon May 5 21:19:17 2025 -0400 bcachefs: __bch2_fs_free() cleanup Signed-off-by: Kent Overstreet commit 39430cfd27ed2e1243374ea28479773506e119c3 Author: Kent Overstreet Date: Sun May 4 15:02:53 2025 -0400 bcachefs: Improve bch2_extent_ptr_set_cached() Preferentially keep existing cached pointers instead of adding new ones. Signed-off-by: Kent Overstreet commit fbe728f9569b683564421a9190be53e60111a864 Author: Kent Overstreet Date: Mon May 5 21:15:34 2025 -0400 bcachefs: improve check_inode_hash_info_matches_root() error message Signed-off-by: Kent Overstreet commit 84bd6afee121b9e9bcc26f88cb55e0ee5c7a8f56 Author: Kent Overstreet Date: Sun May 4 16:24:43 2025 -0400 bcachefs: inline bch2_ob_ptr() This was an oversight, we want bch2_alloc_sectors_append_ptrs_inlined() fully inlined. Signed-off-by: Kent Overstreet commit e02888faab24494f91016d578e3dc9dce81e3d71 Author: Kent Overstreet Date: Sun May 4 14:45:54 2025 -0400 bcachefs: bch2_dev_in_target() no longer takes rcu_read_lock() Minor optimization, the caller generally has it already. Signed-off-by: Kent Overstreet commit 7d4f2687ef8a625742c5df4e2d42f50ba398f3a2 Author: Kent Overstreet Date: Sat May 3 19:14:54 2025 -0400 bcachefs: bch2_journal_write() refactoring Make the locking easier to follow; also take io_refs earlier, in __journal_write_alloc(). Signed-off-by: Kent Overstreet commit 88f62ed60ceebf387140c8e59df8db827668d09a Author: Kent Overstreet Date: Fri May 2 13:23:22 2025 -0400 bcachefs: delete_dead_snapshot_keys_v2() Since extents, dirents and xattrs require an inode with the corresponding snapshot ID to exists, we can avoid a lot of scanning by only scanning those trees for keys to process if the correspending inode exists. Signed-off-by: Kent Overstreet commit e9756dd29f33ede1a595d9fb5e0e2586f7542c1f Author: Kent Overstreet Date: Fri May 2 12:37:36 2025 -0400 bcachefs: bcachefs_metadata_version_snapshot_deletion_v2 We're going to be speeding up snapshot deletion, by only having it process the extents/dirents/xattrs btrees if an inode of a given snapshot ID was present. This raises the possibility of 'bkey_in_missing_snapshot' errors popping up, if we ever accidentally don't do the corresponding inode update, or if the new algorithm has bugs. So instead of deleting snapshot IDs, add a new deleted flag, so that 'key in missing snapshot' errors can more definitively tell what happened and automatically repair. Signed-off-by: Kent Overstreet commit 08d14d90a42a96f409ef3bb1fd073ca0a6bace27 Author: Kent Overstreet Date: Fri May 2 12:33:17 2025 -0400 bcachefs: BCH_SNAPSHOT_DELETED -> BCH_SNAPSHOT_WILL_DELETE We're going to be speeding up snapshot deletion, by only having it process the extents/dirents/xattrs btrees if an inode of a given snapshot ID was present. This raises the possibility of 'bkey_in_missing_snapshot' errors popping up, if we ever accidentally don't do the corresponding inode update, or if the new algorithm has bugs. So we'll want to be able to differentiate more definitively between 'snapshot went missing' (and perhaps needs to be reconstructed), and 'key in snapshot that was deleted'. So instead of deleting snapshot IDs, we'll be adding a new deleted flag and leaving them permanently. Signed-off-by: Kent Overstreet commit 3f8e97726557f2130c2992bf214c9e936b4a0877 Author: Kent Overstreet Date: Fri May 2 14:43:45 2025 -0400 bcachefs: Skip unrelated snapshot trees in snapshot deletion Don't scan keys in inodes for which the snapshot tree doesn't match any we're deleting from. Signed-off-by: Kent Overstreet commit 0afdf4969e0ac24f63b499c6c75731564a072eb8 Author: Kent Overstreet Date: Thu May 1 15:14:04 2025 -0400 bcachefs: BCH_FSCK_ERR_snapshot_key_missing_inode_snapshot We're going to be doing some snapshot deletion performance improvements, and those will strictly require that if an extent/dirent/xattr is present, an inode is present in that snapshot ID. We already check for this, but we don't repair it on disk: this patch adds that repair and turns it into a real fsck_err(). Signed-off-by: Kent Overstreet commit 855070dc0b349eb4f17cfbe7e73829b1b2851bdc Author: Kent Overstreet Date: Sat May 3 16:48:00 2025 -0400 bcachefs: get_inodes_all_snapshots() now includes whiteouts The next patch is going to change lookup_inode_for_snapshot to rigorously require that a extent/dirent/xattr keys have a corresponding inode key present - whiteouts included, so this simplifies the checks lookup_inode_for_snapshot() will have to do. Signed-off-by: Kent Overstreet commit a9421140fc5a5647191704c8a5e93bf2aaeb2c0a Author: Kent Overstreet Date: Sat May 3 18:17:26 2025 -0400 bcachefs: bch2_inode_unpack() cleanup bi_snapshot is now handled like other fields Signed-off-by: Kent Overstreet commit 00757984d55e769a108fee6cfabee1b289c9516f Author: Kent Overstreet Date: Sat May 3 18:16:49 2025 -0400 bcachefs: Improve bch2_request_incompat_feature() message Signed-off-by: Kent Overstreet commit 3c97ebea61e3ebdbab5b2564296a86d601b632e6 Author: Alan Huang Date: Sun May 4 04:03:42 2025 +0800 bcachefs: Fix inconsistent req->ec There is req->ec = erasure_code above. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 6f2bbd57474b3f8448c30cb1b986fbf127bb103e Author: Kent Overstreet Date: Thu May 1 15:18:40 2025 -0400 bcachefs: kill inode_walker_entry.snapshot redundant Signed-off-by: Kent Overstreet commit 7b8c41c178742c680e6acb610a760f9e007cfeac Author: Kent Overstreet Date: Fri May 2 12:23:59 2025 -0400 bcachefs: Add comments for inode snapshot requirements Signed-off-by: Kent Overstreet commit 15dbd0d8146356a43003784ce38aabae32e96197 Author: Kent Overstreet Date: Thu May 1 14:47:39 2025 -0400 bcachefs: snapshot delete progress indicator Signed-off-by: Kent Overstreet commit e3006cb010150cefde5739d2b8c2e8f7b876eb84 Author: Kent Overstreet Date: Wed Apr 16 09:28:10 2025 -0400 bcachefs: Don't emit bch_sb_field_members_v1 if not required In 'bcachefs_metadata_extent_flags', we stopped requireding members_v1 to be present - only that either v1 or v2 is present. Signed-off-by: Kent Overstreet commit 9180c5f91804e9b381d11b6c19cbefa5c5490b2b Author: Alan Huang Date: Fri May 2 04:01:32 2025 +0800 bcachefs: Rename x_name to x_name_and_value The flexible array contains name and value, the x_name is misleading. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit a42f709f9ac1dc7b4ff32ab428acf7abaf3358b9 Author: Kent Overstreet Date: Wed Apr 30 22:26:00 2025 -0400 bcachefs: Improve bch2_disk_groups_to_text() Print out the actual name of each path/label, instead of just the integer indexes. Signed-off-by: Kent Overstreet commit c53e5c0c191ec6cc85c630249cbd68a2adb3f715 Author: Kent Overstreet Date: Wed Apr 30 23:10:44 2025 -0400 docs: bcachefs: add casefolding reference Signed-off-by: Kent Overstreet commit 8a6b883e78bfed6909e21c2afb6138b603d1ee6c Author: Kent Overstreet Date: Wed Apr 30 22:05:49 2025 -0400 bcachefs: Fix setting ca->name in device add Device add doesn't get the devide index and attach to the filesystem until after attaching the block device, and setting the device name from the block device name - these needs some minor tweaks. Signed-off-by: Kent Overstreet commit 5ce11d9d1bd5dfd8876d35bd9e61f38f47807c42 Author: Kent Overstreet Date: Tue Apr 29 14:41:37 2025 -0400 bcachefs: sysfs trigger_recalc_capacity For bug diagnosis Signed-off-by: Kent Overstreet commit ae0386e111253eee0f71ae3f32635a3ba22e5a7b Author: Gustavo A. R. Silva Date: Wed Apr 30 13:22:01 2025 -0600 bcachefs: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Refactor a couple of structs that contain flexible arrays in the middle by replacing them with unions. So, with these changes, fix the following warnings: fs/bcachefs/disk_accounting.c:429:51: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] fs/bcachefs/ec_types.h:8:41: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kent Overstreet commit 98e5e36d8c58ab41c28367d3bfc9ec4e8795e421 Author: Kent Overstreet Date: Mon Apr 28 22:00:01 2025 -0400 bcachefs: bch2_dev_add() can run on a non-started fs Signed-off-by: Kent Overstreet commit a349868b5e2503271bedf5f0b6e3638552047e0f Author: Kent Overstreet Date: Mon Apr 28 14:50:07 2025 -0400 bcachefs: bch2_fs_open() now takes a darray Signed-off-by: Kent Overstreet commit cf95296295bebadcf8b4a695064d2df35e0c127e Author: Kent Overstreet Date: Mon Apr 28 11:45:56 2025 -0400 bcachefs: bch2_trans_update_ip() Allow btree_insert_entry.ip_allocated to be passed in, so we get better info on where alloc updates are coming from. Signed-off-by: Kent Overstreet commit 7677859a47a464f1c5603077809d4bc13f2d549f Author: Kent Overstreet Date: Sat Apr 26 12:39:17 2025 -0400 bcachefs: Run most explicit recovery passes persistent If we detect an error that requires running a recovery pass, and we're not in recovery, we won't be able to fix it until the next mount - make sure we're noting in the superblock that it needs to run. Signed-off-by: Kent Overstreet commit aff2b6a7fc285287f7ffc6691aca333a63b18230 Author: Kent Overstreet Date: Sat Apr 26 12:38:53 2025 -0400 bcachefs: provide unlocked version of run_explicit_recovery_pass_persistent Signed-off-by: Kent Overstreet commit c21f41f6905be4fc5059a10a5bba94105ba87269 Author: Kent Overstreet Date: Thu Apr 24 17:55:20 2025 -0400 bcachefs: bch2_dirent_to_text() shows casefolded dirents Signed-off-by: Kent Overstreet commit cd3cdb1ef706a1ac725194d81858d58375739b25 Author: Kent Overstreet Date: Tue Apr 22 09:14:19 2025 -0400 bcachefs: Single err message for btree node reads Like we just did with the data read path, emit a single error message per btree node reads, nicely formatted, with all the actions we took grouped together. Signed-off-by: Kent Overstreet commit 9c2472658be20d04c6dc34d5314a7e99cc4fed25 Author: Kent Overstreet Date: Tue Apr 22 20:38:50 2025 -0400 bcachefs: bch2_mark_btree_validate_failure() Signed-off-by: Kent Overstreet commit d31f155964aee6e6141967fc392a9a99b221e117 Author: Kent Overstreet Date: Tue Apr 22 09:02:15 2025 -0400 bcachefs: bch2_fsck_err_opt() Signed-off-by: Kent Overstreet commit 600a9207c8def056b4681fde8158c463576d5aca Author: Kent Overstreet Date: Thu Apr 24 09:27:10 2025 -0400 bcachefs: Plumb printbuf through bch2_btree_lost_data() Part of the ongoing project to improve error messages by building them up in printbufs and emitting them all at once, so that we can easily see what events are related in the log. Signed-off-by: Kent Overstreet commit 300904700f14e4e05db2a16cf8e3890c8e856cf8 Author: Kent Overstreet Date: Thu Apr 24 09:28:56 2025 -0400 bcachefs: kill bch2_run_explicit_recovery_pass_persistent() No longer has users, so we can kill it and rename bch2_run_explicit_recovery_pass_persistent_locked(). Signed-off-by: Kent Overstreet commit 3aecbb01a168bf6396955e5da0533f6e5f000441 Author: Kent Overstreet Date: Thu Apr 24 09:13:28 2025 -0400 bcachefs: Remove redundant calls to btree_lost_data() The btree node read path calls this before returning the read error. Signed-off-by: Kent Overstreet commit 3be132f93cff2586be482cb81807ff83899f572e Author: Kent Overstreet Date: Thu Apr 24 09:09:56 2025 -0400 bcachefs: bch2_btree_lost_data() now handles snapshots tree We have a consolidated places for "this btree lost data, run this repair", so use it. Signed-off-by: Kent Overstreet commit b3bbd47f8314997b7a13cfe0b2048a19a5b62fcf Author: Kent Overstreet Date: Tue Apr 22 09:16:49 2025 -0400 bcachefs: Kill redundant error message in topology repair The btree node read path already logs btree node read errors, this isn't needed. Signed-off-by: Kent Overstreet commit 156d9e8341e8aad55b0e79b2dc54003cb14e5077 Author: Kent Overstreet Date: Tue Apr 22 05:49:20 2025 -0400 bcachefs: Emit a single log message on data read error Instead of emitting a message immediately when we get an error in the read path, and then another at the end if we successfully retry - emit one single log message before returning from bch2_rbio_retry(). Signed-off-by: Kent Overstreet commit 353b89c6e6df522c221997a527358854b1c826d7 Author: Kent Overstreet Date: Tue Apr 22 05:45:48 2025 -0400 bcachefs: bch2_io_failures_to_text() Pretty printer for bch_io_failures, to be used for better read error messages. Signed-off-by: Kent Overstreet commit dbc18c97f1f0d336e3c4f6bb50f34c5255216995 Author: Kent Overstreet Date: Tue Apr 22 06:03:33 2025 -0400 bcachefs: print_string_as_lines: avoid printing empty line If the final line in in the message to be printed is blang, don't print it. This happens with indented printbufs - after a newline we emit spaces up to the indent level. Signed-off-by: Kent Overstreet commit 41e51769b8a649dd3db7070370cb6aa127f86307 Author: Kent Overstreet Date: Mon Apr 21 13:02:51 2025 -0400 bcachefs: Make various async objs visible in debugfs Add async objs list for - promote_op - bch_read_bio - btree_read_bio - btree_write_bio This gets us introspection on in-flight async ops, and because under the hood it uses fast_lists (percpu slot buffer on top of a radix tree), it'll be fast enough to enable in production. This will be very helpful for debugging "something got stuck" issues, which have been cropping up from time to time (in the CI, especially with folio writeback). Signed-off-by: Kent Overstreet commit 0499a82b18b5ddee0d97d2cfcae0c0120f858c1f Author: Kent Overstreet Date: Mon Apr 21 12:01:50 2025 -0400 bcachefs: Async object debugging Debugging infrastructure for async objs: this lets us easily create fast_lists for various object types so they'll be visible in debugfs. Add new object types to the BCH_ASYNC_OBJS_TYPES() enum, and drop a pretty-printer wrapper in async_objs.c. Signed-off-by: Kent Overstreet commit d49bafdc5d1659171d988888ebfc773629f8ca97 Author: Kent Overstreet Date: Sat Sep 28 16:22:38 2024 -0400 bcachefs: fast_list A fast "list" data structure, which is actually a radix tree, with an IDA for slot allocation and a percpu buffer on top of that. Items cannot be added or moved to the head or tail, only added at some (arbitrary) position and removed. The advantage is that adding, removing and iteration is generally lockless, only hitting the lock in ida when the percpu buffer is full or empty. Signed-off-by: Kent Overstreet commit 989b4c375a330c8f0cd18aa891c67ac56bec2984 Author: Kent Overstreet Date: Sun Feb 2 11:23:07 2025 -0500 bcachefs: bch2_read_bio_to_text Pretty printer for struct bch_read_bio. Signed-off-by: Kent Overstreet commit 5f0de475f967a094bd596913ffbe9ad9b33b4e3a Author: Kent Overstreet Date: Mon Apr 21 12:04:10 2025 -0400 bcachefs: bch2_bio_to_text() Pretty printer for struct bio, to be used for async object debugging. This is pretty minimal, we'll add more to it as we discover what we need. Signed-off-by: Kent Overstreet commit cca2c0d224c17c99fb2ee7674284f89ce8389f3a Author: Kent Overstreet Date: Fri Apr 18 21:54:12 2025 -0400 bcachefs: bch_dev.io_ref -> enumerated_ref Convert device IO refs to enumerated_refs, for easier debugging of refcount issues. Simple conversion: enumerate all users and convert to the new helpers. Signed-off-by: Kent Overstreet commit c9b1d94a2196fcfd1985ff8728b22abda400b1ac Author: Kent Overstreet Date: Fri Apr 18 14:56:09 2025 -0400 bcachefs: bch_fs.writes -> enumerated_refs Drop the single-purpose write ref code in bcachefs.h, and convert to enumarated refs. Signed-off-by: Kent Overstreet commit f5241e41272858b983da45ac7f8a6ad58c4ba71f Author: Kent Overstreet Date: Fri Apr 18 14:56:09 2025 -0400 bcachefs: enumerated_ref.c Factor out the debug code for rw filesystem refs into a small library. In release mode an enumerated ref is a normal percpu refcount, but in debug mode all enumerated users of the ref get their own atomic_long_t ref - making it much easier to chase down refcount usage bugs for when a refcount has many users. For debugging, we have enumerated_ref_to_text(), which prints the current value of each different user. Additionally, in debug mode enumerated_ref_stop() has a 10 second timeout, after which it will dump outstanding refcounts. Signed-off-by: Kent Overstreet commit 6d67de1079993e09e7a867a6936a8163ece98792 Author: Kent Overstreet Date: Sat Apr 19 19:13:40 2025 -0400 bcachefs: for_each_rw_member_rcu() Signed-off-by: Kent Overstreet commit e14e06e91dadcd1c65f08ba5a02716d3e855fc74 Author: Kent Overstreet Date: Sun Apr 20 11:27:18 2025 -0400 bcachefs: __bch2_fs_read_write() no longer depends on io_ref Signed-off-by: Kent Overstreet commit 9fa4a8a3bdb14c1a36ff439643e00ca416e04b66 Author: Kent Overstreet Date: Fri Apr 18 22:11:15 2025 -0400 bcachefs: for_each_online_member_rcu() Signed-off-by: Kent Overstreet commit 2483dd1243584432c8b407f09673500c00095cd3 Author: Kent Overstreet Date: Sun Apr 20 11:23:53 2025 -0400 bcachefs: recalc_capacity() no longer depends on io_ref Signed-off-by: Kent Overstreet commit c53be0ffaa501d25f58ac2e56b7e5710f3408a50 Author: Kent Overstreet Date: Sat Apr 19 00:57:55 2025 -0400 bcachefs: bch2_target_to_text() no longer depends on io_ref Signed-off-by: Kent Overstreet commit 834f9475aabd84f60760ac8ceffc45eedff4a176 Author: Kent Overstreet Date: Fri Mar 14 09:46:25 2025 -0400 bcachefs: bch2_check_rebalance_work() Add a pass for checking the rebalance_work btree. Signed-off-by: Kent Overstreet commit 09279bba72f809eeb1f02d39a462e8e1d06fa32a Author: Alan Huang Date: Fri Apr 18 15:52:10 2025 +0800 bcachefs: Kill dead code Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 62095464e9d2a2340a6b08a90fb280ea2b091a28 Author: Kent Overstreet Date: Thu Apr 17 12:42:13 2025 -0400 bcachefs: Fix struct with flex member ABI warning This pops up when buliding in userspace. The structs aren't actually variable length, but no way to tell the compiler that... Signed-off-by: Kent Overstreet commit 9e260e4590e044dc5887f9eb21dfaf479226e7d4 Author: Kent Overstreet Date: Sat Apr 20 17:40:47 2024 -0400 docs: bcachefs: idle work scheduling design doc People have been asking to see the plan for this, so - bcachefs has various background tasks that need to be scheduled to balance efficiency, predictability of performance, etc. The design and philosophy hasn't changed too much since bcache, which was primarily designed for server usage, with sustained load in mind. These days we're seeing more desktop usage - where we really want to let the system idle effictively, to reduce total power usage - while also still balancing previous concerns, we still want to let work accumulate to a degree. This lays out all the requirements and starts to sketch out the algorithm I have in mind. Signed-off-by: Kent Overstreet commit fe27298b92001d51797ddc26ca0d7c3d4a0f04d4 Author: Kent Overstreet Date: Tue Apr 15 21:35:28 2025 -0400 bcachefs: bch2_move_data_btree() can now walk roots Signed-off-by: Kent Overstreet commit 3484840ece849ee700c7cf8e0d44d5536b29fa08 Author: Kent Overstreet Date: Sun Apr 13 16:31:34 2025 -0400 bcachefs: bch2_move_data_btree() can move btree nodes Signed-off-by: Kent Overstreet commit 7a274285d3706608d788efcbd9982f08531dd9ec Author: Kent Overstreet Date: Thu Apr 3 19:51:05 2025 -0400 bcachefs: plumb btree_id through move_pred_fd Signed-off-by: Kent Overstreet commit f3c8eaf7a133ef122dfd97e6f6f972265cc84fb0 Author: Kent Overstreet Date: Thu Apr 3 19:42:02 2025 -0400 bcachefs: Plumb target parameter through btree_node_rewrite_pos() Signed-off-by: Kent Overstreet commit ecedc87cfaf016e7e857a209e1b2685a28d59566 Author: Kent Overstreet Date: Thu Apr 3 19:33:54 2025 -0400 bcachefs: export bch2_move_data_phys() Signed-off-by: Kent Overstreet commit 0ca375b1779f22f703f956b22ea2bdbc69c247eb Author: Kent Overstreet Date: Tue Apr 15 14:09:34 2025 -0400 bcachefs: BCH_MEMBER_RESIZE_ON_MOUNT Signed-off-by: Kent Overstreet commit 530112d88ebd7405fb61711892b2a680048984c7 Author: Kent Overstreet Date: Tue Apr 15 15:15:36 2025 -0400 bcachefs: BCH_FEATURE_small_image We can't go RW if it's an image file that hasn't been resized. Signed-off-by: Kent Overstreet commit 203852d9db68e14b50b119cbd123def7e7c9efd0 Author: Kent Overstreet Date: Thu Apr 3 14:19:23 2025 -0400 bcachefs: BCH_FEATURE_no_alloc_info If a filesystem is going to only be used read-only, and will be a deployable image, we can strip out alloc info for a substantial reduction in metadata size - around half, due to backpointers. Alloc info will be regenerated on first read-write mount. Remounting RW is disallowed for now, since we don't yet have check_allocations running in RW mode. Signed-off-by: Kent Overstreet commit 576493133f26a172b8db4313448206d30750c9b2 Author: Kent Overstreet Date: Wed Apr 16 09:23:15 2025 -0400 bcachefs: Print features on startup with -o verbose Signed-off-by: Kent Overstreet commit 0dc73809e93aeb905acf9fa88502c73534cfa83d Author: Kent Overstreet Date: Wed Apr 16 06:48:31 2025 -0400 bcachefs: Shrink superblock downgrade table Don't generate entries for versions that won't be able to mount. Signed-off-by: Kent Overstreet commit 1c8dfd7ba50dbbb72113caf4fa7868512cdad2f4 Author: Kent Overstreet Date: Tue Apr 15 23:35:48 2025 -0400 bcachefs: sb_validate() no longer requires members_v1 Signed-off-by: Kent Overstreet commit d12bd4101825c14222ecbe4c6fba9c03ce42f624 Author: Kent Overstreet Date: Tue Apr 15 19:21:52 2025 -0400 bcachefs: Add a recovery pass for making sure root inode is readable If the root inode/subvolume is unreadable we can repair automatically - but only if we're still in recovery, so that we can rewind to the appropriate recovery pass. Signed-off-by: Kent Overstreet commit bdad8962c94d3e557317b3d0691a507177f27a22 Author: Kent Overstreet Date: Tue Apr 15 19:15:43 2025 -0400 bcachefs: Flag for repair on missing subvolume Instead of going emegency read only with a bch2_fs_inconsistent() call, log the error and recovery pass appropriately. If we're still in recovery it'll be repaired immediately, otherwise it'll be repaired on the next mount. Signed-off-by: Kent Overstreet commit ebf561b2083d797da4673207044855ccd764195b Author: Kent Overstreet Date: Tue Apr 15 17:31:47 2025 -0400 bcachefs: print_str_as_lines() -> print_str() bch2_print_string_as_lines() is a low level helper that allows messages longer than 1k to be printed without truncation. But we should always be printing with the helpers that take a filesystem object, if we're in fsck they direct output to the userspace process controlling fsck instead of the dmesg log. Signed-off-by: Kent Overstreet commit 040c762152f5f4fb1b13e8a46c17ecb4e670d96d Author: Kent Overstreet Date: Tue Apr 15 14:08:42 2025 -0400 bcachefs: bch2_dev_missing_bkey() Part of the ongoing project to kill off bch2_(fs|trans)_inconsistent calls - they generally need to be replaced with either - a fsck_err() call that can repair the error, or - logging an error of the appropriate type in the superblock, and flagging the appropriate recovery pass to repair the error Signed-off-by: Kent Overstreet commit 2085325171f2f2d33a94101e58266f325c286e95 Author: Kent Overstreet Date: Tue Apr 15 13:55:16 2025 -0400 bcachefs: Simplify bch2_count_fsck_err() Signed-off-by: Kent Overstreet commit bb36a12921e5fc76f3b26a80ab0217d3dc62a473 Author: Kent Overstreet Date: Tue Apr 15 13:45:39 2025 -0400 bcachefs: bch2_run_explicit_recovery_pass_printbuf() We prefer helpers that emit log messages to printbufs rather than printing them directly; that way, we can ensure that different log messages from the same event are grouped together and formatted appropriately in the dmesg log. Signed-off-by: Kent Overstreet commit 5022d0e18394c1c1cd41b5aae9ae6056b49ce678 Author: Kent Overstreet Date: Tue Apr 15 10:20:46 2025 -0400 bcachefs: Incompatible features may now be enabled at runtime version_upgrade is now a runtime option. In the future we'll want to add compatible upgrades at runtime, and call the full check_version_upgrade() when the option changes, but we don't have compatible optional upgrades just yet. Signed-off-by: Kent Overstreet commit c79eb06da4c34f29ca8bd23ddf7c1d7c1cd16121 Author: Kent Overstreet Date: Tue Apr 15 09:54:01 2025 -0400 bcachefs: Clean up option pre/post hooks, small fixes The helpers are now: - bch2_opt_hook_pre_set() - bch2_opts_hooks_pre_set() - bch2_opt_hook_post_set Fix a bug where the filesystem discard option would incorrectly be changed when setting the device option, and don't trigger rebalance scans unnecessarily (when options aren't changing). Signed-off-by: Kent Overstreet commit 83ecd1b122f49c907ea3c4178f32bd37223e7fac Author: Kent Overstreet Date: Sun Apr 13 08:20:47 2025 -0400 bcachefs: Use drop_locks_do() in bch2_inode_hash_find() Signed-off-by: Kent Overstreet commit c02e5b57283ad6fd8dec8d834bd340bf2627fcee Author: Kent Overstreet Date: Wed Apr 2 15:12:49 2025 -0400 bcachefs: Single device mode Single device filesystems are now identified by the block device name, not the UUID - and single device filesystems with the same UUID can be mounted simultaneously, without any special options. This allocates a new bit in the superblock, BCH_SB_MULTI_DEVICE, which indicates whether a filesystem has ever been multi device. Signed-off-by: Kent Overstreet commit 58c36e6710d3b3cc050c35c42954cb03c3e01c59 Author: Kent Overstreet Date: Thu Apr 3 13:10:03 2025 -0400 bcachefs: Initialize c->name earlier on single dev filesystems On single device filesystems, c->name contains the block device name, not the UUID. Initialize this earlier, so that single device mode can use it for initializing sysfs/debugfs. Signed-off-by: Kent Overstreet commit 0e43bf5a6a8f440f887b0472367a824c37a4031b Author: Alan Huang Date: Tue Apr 15 13:33:07 2025 +0800 bcachefs: Simplify logic Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 152bae193c480d53283541f5e4e2d1100f8500d3 Author: Alan Huang Date: Tue Apr 15 13:33:06 2025 +0800 bcachefs: Remove spurious +1/-1 operation Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit f013b4ca356d37b2cc2e84a096c02dad592b1574 Author: Alan Huang Date: Tue Apr 15 13:33:04 2025 +0800 bcachefs: Kill bch2_trans_unlock_noassert Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet commit 6f03e30e7c6b759c7e9a67ca1c41f896db7b421a Author: Kent Overstreet Date: Sun Apr 13 17:59:10 2025 -0400 bcachefs: Clean up duplicated code in bch2_journal_halt() It's now a wrapper around bch2_journal_halt_locked(). Signed-off-by: Kent Overstreet commit 03f8f9a1292ed3a7160a497f7a36a37d0062b1ca Author: Kent Overstreet Date: Sun Apr 13 16:29:36 2025 -0400 bcachefs: bch2_dev_allocator_set_rw() Add a helper that lets us change bch_member.data_allowed at runtime. Signed-off-by: Kent Overstreet commit 2e0d51d00e84790dfad4191e0f50c33b7cac387c Author: Kent Overstreet Date: Sun Apr 13 13:52:12 2025 -0400 bcachefs: bch2_dev_journal_alloc() now respects data_allowed Signed-off-by: Kent Overstreet commit 93ac4d5f92fc33dc3ba6a60a66e177ac1f4be032 Author: Kent Overstreet Date: Sun Apr 13 07:47:47 2025 -0400 bcachefs: Improve bch2_btree_cache_to_text() Make the output slightly clearer, and include a counter for "nodes we couldn't free because we would have gone under our reserve". Signed-off-by: Kent Overstreet commit e50fe14c5430d30c5464ebdaef7d0e9684480aca Author: Kent Overstreet Date: Sun Apr 13 07:45:13 2025 -0400 bcachefs: __btree_node_reclaim_checks() Factor out a helper so we're not duplicating checks after locking the btree node. Signed-off-by: Kent Overstreet commit 68aaeb7c8bc8fd82805b5045c606bc5fe00cbea8 Author: Kent Overstreet Date: Sun Apr 13 07:42:46 2025 -0400 bcachefs: kill BTREE_CACHE_NOT_FREED_INCREMENT() Small cleanup, just always increment the counters. Signed-off-by: Kent Overstreet commit ef8dd631f788810e19138771a7e72956467bef0f Author: Kent Overstreet Date: Sun Apr 6 13:50:20 2025 -0400 bcachefs: Improve opts.degraded Kill 'opts.very_degraded', and make 'opts.degraded' a persistent option, stored in the superblock. It's now an enum, with available choices ask/yes/very/no. "ask" mode will be handled by the mount helper, for prompting the user (on a machine used interactively) for whether to do a degraded mount. Signed-off-by: Kent Overstreet commit 2758c28acabc16317f690874ac930aae50a4e461 Author: Kent Overstreet Date: Sun Apr 13 05:23:40 2025 -0400 bcachefs: export bch2_chacha20 Needed for userspcae. Signed-off-by: Kent Overstreet commit dd1b99f7060f781bea9973036ee96daa856f08c0 Author: Integral Date: Tue Apr 8 18:31:29 2025 +0800 bcachefs: indent error messages of invalid compression This patch uses printbuf_indent_add_nextline() to set a consistent indentation level for error messages of invalid compression. In my previous patch [1], the newline is added by using '\n' in the argument of prt_str(). This patch replaces prt_str() with prt_printf() to make indentation level work correctly. [1] Link: https://lore.kernel.org/20250406152659.205997-2-integral@archlinuxcn.org Signed-off-by: Integral Signed-off-by: Kent Overstreet commit 84ccd47d265579dd23768e69b5204801ad6b5eca Author: Integral Date: Sun Apr 6 23:26:59 2025 +0800 bcachefs: split error messages of invalid compression into two lines When an invalid compression type or level is passed as an argument to `--compression`, two error messages are squashed into one line: > bcachefs format --compression=lzo bcachefs-comp.img invalid option: invalid compression typecompression: parse error > bcachefs format --compression=lz4:16 bcachefs-comp.img invalid option: invalid compression levelcompression: parse error To resolve this issue, add a newline character at the end of the first error message to separate them into two lines. Signed-off-by: Integral Signed-off-by: Kent Overstreet commit 0e790469bf3044022cb02025abdae775c9908ca8 Author: Integral Date: Sun Apr 6 22:53:28 2025 +0800 bcachefs: early return for negative values when parsing BCH_OPT_UINT Currently, when passing a negative integer as argument, the error message is "too big" due to casting to an unsigned integer: > bcachefs format --block_size=-1 bcachefs.img invalid option: block_size: too big (max 65536) When negative value in argument detected, return early before calling bch2_opt_validate(). A new error code `BCH_ERR_option_negative` is added. Signed-off-by: Integral Signed-off-by: Kent Overstreet commit 3a2a0d08b225047ac1d2504059c45a5acf8072b8 Author: Kent Overstreet Date: Thu Apr 3 20:56:09 2025 -0400 bcachefs: move_data_phys: stats are not required Signed-off-by: Kent Overstreet commit d4d71b58e5139afc5f9bda0139b99404eb216d8a Author: Kent Overstreet Date: Sat Apr 5 17:36:04 2025 -0400 bcachefs: RO mounts now use less memory Defer memory allocations only needed in RW mode until we actually go RW. This is part of improved support for RO images. Signed-off-by: Kent Overstreet commit a17e985be9831bf866795fe5e3da219d2061ce6c Author: Kent Overstreet Date: Sat Apr 5 19:30:43 2025 -0400 bcachefs: Move various init code to _init_early() _init_early() is for initialization that cannot fail, and often must happen for teardown partway through initialization to work. Signed-off-by: Kent Overstreet commit 31813dcf379d7fc513530e3a9cf7b60cd2aa2a9d Author: Kent Overstreet Date: Sat Apr 5 19:41:35 2025 -0400 bcachefs: alphabetize init function calls Signed-off-by: Kent Overstreet commit 25ee021c7fc22797ac34b9b9fb9b24921b647901 Author: Kent Overstreet Date: Sat Apr 5 19:26:19 2025 -0400 bcachefs: simplify journal pin initialization Signed-off-by: Kent Overstreet commit 2767f4f258b8d034a99830fafdb46a8c52910bce Author: Kent Overstreet Date: Sat Apr 5 19:23:52 2025 -0400 bcachefs: btree_io_complete_wq -> btree_write_complete_wq Signed-off-by: Kent Overstreet commit c9b5d9cd26bde01a0591cd8eeed8847da997f576 Author: Kent Overstreet Date: Thu Apr 3 22:30:39 2025 -0400 bcachefs: bch2_kvmalloc() mem alloc profiling Signed-off-by: Kent Overstreet commit bcaea61adc1c19094cafbf0269fe99227b2ac89c Author: Kent Overstreet Date: Thu Apr 3 12:18:39 2025 -0400 bcachefs: add missing include Hygeine, and fix build in userspace. Signed-off-by: Kent Overstreet commit b974357c63d0b26606210942dc5659d755089d4e Author: Kent Overstreet Date: Wed Apr 2 14:40:06 2025 -0400 bcachefs: bch2_snapshot_table_make_room() Add a better helper for check_snapshot_exists(). create_snapids() can't be changed to use this, unfortunately, because the transaction that creates new snapshot will also be inserting other keys (e.g. root inode) that reference that snapshot ID, and they expect the snapshot table to already be updated. Signed-off-by: Kent Overstreet commit ea27e8ca5d8e117b17a3d76c39404d206c5ebdeb Author: Kent Overstreet Date: Wed Apr 2 11:59:39 2025 -0400 bcachefs: darray: provide typedefs for primitive types Signed-off-by: Kent Overstreet commit 2a81bd454c45c89b167b6c2bd3ba7b5a489b0830 Author: Kent Overstreet Date: Wed Apr 2 17:23:22 2025 -0400 bcachefs: reduce new_stripe_alloc_buckets() stack usage Signed-off-by: Kent Overstreet commit a0b0b9bb9e3cb896a5585701fa6b340d2ada6f63 Author: Kent Overstreet Date: Mon Mar 31 17:50:52 2025 -0400 bcachefs: alloc_request no longer on stack Signed-off-by: Kent Overstreet commit 95f2315af7536c220301421eff6291c80ec321e5 Author: Kent Overstreet Date: Mon Mar 31 17:57:06 2025 -0400 bcachefs: alloc_request.ptrs2 Signed-off-by: Kent Overstreet commit e038213658f09bc775a67cf8e18f0aec4b0f7679 Author: Kent Overstreet Date: Mon Mar 31 17:13:22 2025 -0400 bcachefs: alloc_request.ca Signed-off-by: Kent Overstreet commit 7f65d1cf5c30cf3e634cd8a02ea8563f7af53e89 Author: Kent Overstreet Date: Mon Mar 31 17:08:43 2025 -0400 bcachefs: alloc_request.counters Signed-off-by: Kent Overstreet commit 4d00e88d21d6369a2c5ff0fbdec82d418ef10230 Author: Kent Overstreet Date: Mon Mar 31 15:52:39 2025 -0400 bcachefs: alloc_request.usage Signed-off-by: Kent Overstreet commit a0312f425177ce7d70da10b726ba2c7b133089f1 Author: Kent Overstreet Date: Mon Mar 31 17:54:43 2025 -0400 bcachefs: alloc_request: deallocate_extra_replicas() Signed-off-by: Kent Overstreet commit ac0952b0e50934a15fdd67a2ff376e6ab8152c39 Author: Kent Overstreet Date: Mon Mar 31 15:46:45 2025 -0400 bcachefs: new_stripe_alloc_buckets() takes alloc_request More stack usage improvements: instead of creating a new alloc_request (currently on the stack), save/restore just the fields we need to reuse. This is a bit tricky, because we're doing a normal alloc_foreground.c allocation, which calls into ec.c to get a stripe, which then does more normal allocations - some of the fields get reused, and used differently. So we have to save and restore them - but the stack usage improvements will be well worth it. Signed-off-by: Kent Overstreet commit 7100344301d80f09ea64c37c35ea10163d35d433 Author: Kent Overstreet Date: Mon Mar 31 15:37:28 2025 -0400 bcachefs: bch2_ec_stripe_head_get() takes alloc_request Signed-off-by: Kent Overstreet commit 9259883b79e14aaf127c0ef59b5ccca8e04e77ae Author: Kent Overstreet Date: Fri Mar 21 21:13:53 2025 -0400 bcachefs: bch2_bucket_alloc_trans() takes alloc_request Signed-off-by: Kent Overstreet commit 799c41830332121b067c26b43887a95a4f848c22 Author: Kent Overstreet Date: Fri Mar 21 21:06:43 2025 -0400 bcachefs: alloc_request.data_type Signed-off-by: Kent Overstreet commit ad63f9f1e9a10792847bc46f0226323f238a171d Author: Kent Overstreet Date: Fri Mar 21 20:42:42 2025 -0400 bcachefs: struct alloc_request Add a struct for common state for satisfying an on disk allocation, instead of passing the same long list of items to every function. This will help with stack usage, performance, and perhaps enable some code cleanups. Signed-off-by: Kent Overstreet commit d02755b8c5f38e737037e0ff0820eb66ab63c4f5 Author: Kent Overstreet Date: Tue Apr 1 14:29:31 2025 -0400 bcachefs: trace bch2_trans_kmalloc() We're occasionally seeing the WARN_ON() for bump allocator usage exceeding BTREE_TRANS_MEM_MAX; add some tracing so we can see what's going on. Signed-off-by: Kent Overstreet commit caa6baa45f809bd932362030b16a8bb3e1dae083 Author: Roxana Nicolescu Date: Thu Mar 27 14:50:09 2025 +0000 bcachefs: replace memcpy with memcpy_and_pad for jset_entry_log->d buff This was achieved before by zero-ing out the source buffer and then copying the bytes into the destination buffer. This can also be done with memcpy_and_pad which will zero out only the destination buffer if its size is bigger than the size of the source buffer. This is already used in the same way in journal_transaction_name(). Moreover, zero-ing the source buffer was done twice, first in __bch2_fs_log_msg() and then in bch2_trans_log_msg(). And this method may also require allocating some extra memory for the source buffer. In conclusion, using memcpy_and_pad is better even tough the result is the same because it brings uniformity with what's already used in journal_transaction_name, it avoids code duplication and reallocating extra memory. Signed-off-by: Roxana Nicolescu Signed-off-by: Kent Overstreet commit 4e2caf82ce958d1fae96a6d6ba23ea9e80c597b4 Author: Roxana Nicolescu Date: Thu Mar 27 14:50:05 2025 +0000 bcachefs: replace strncpy() with memcpy_and_pad in journal_transaction_name Strncpy is now deprecated. The buffer destination is not required to be NULL-terminated, but we also want to zero out the rest of the buffer as it is already done in other places. Link: https://github.com/KSPP/linux/issues/90 Signed-off-by: Roxana Nicolescu Signed-off-by: Kent Overstreet commit 8c087d2ddf5d4d8c07bec96531a5f5629066cd00 Author: Kent Overstreet Date: Tue Mar 11 09:46:06 2025 -0400 bcachefs: Rebalance now skips poisoned extents Let's not move poisoned extents unnecessarily, since we can't guard against introducing more bitrot. Signed-off-by: Kent Overstreet commit cb8336ca42e493a76b3cc05b76a51a2eed26cdaa Author: Kent Overstreet Date: Tue Mar 11 10:02:40 2025 -0400 bcachefs: Data move can read from poisoned extents Now, if an extent is poisoned we can move it even if there was a checksum error. We'll have to give it a new checksum, but the poison bit means that userspace will still see the appropriate error when they try to read it. Signed-off-by: Kent Overstreet commit 760be1ad5e71b3a23644849cbf3c2245c4dc83f3 Author: Kent Overstreet Date: Mon Mar 10 14:03:25 2025 -0400 bcachefs: Poison extents that can't be read due to checksum errors Copygc needs to be able to move extents that have bitrotted. We don't want to delete them - in the future we'll have an API for "read me the data even if there's checksum errors", and in general we don't want to delete anything unless the user asks us to. That will require writing it with a new checksum, which means we can't forget that there was a checksum error so we return the correct error to userspace. Rebalance also wants to skip bad extents; we can now use the poison flag for that. This is currently disabled by default, as we want read fua support so that we can distinguish between transient and permanent errors from the device. It may be enabled with the module parameter: poison_extents_on_checksum_error Signed-off-by: Kent Overstreet commit 6659ba3b18f71282c7c54f3bffcfecfac73f202f Author: Kent Overstreet Date: Mon Mar 10 13:33:41 2025 -0400 bcachefs: Be precise about bch_io_failures If the extent we're reading from changes, due to be being overwritten or moved (possibly partially) - we need to reset bch_io_failures so that we don't accidentally mark a new extent as poisoned prematurely. This means we have to separately track (in the retry path) the extent we previously read from. Signed-off-by: Kent Overstreet commit 0e5f1f3f8fad0d195099e4a8e7c43ffe71676047 Author: Kent Overstreet Date: Sat Mar 29 17:59:30 2025 -0400 bcachefs: bch2_subvolume_wait_for_pagecache_and_delete() cleanup Signed-off-by: Kent Overstreet commit 220a29d0af240c7ebf6ac1efae8b7a339f7e2026 Merge: d42d440746f8a2 3e2b7229890408 Author: Jakub Kicinski Date: Wed May 21 15:56:11 2025 -0700 Merge branch 'net-phy-add-support-for-new-aeonsemi-phys' Christian Marangi says: ==================== net: phy: Add support for new Aeonsemi PHYs Add support for new Aeonsemi 10G C45 PHYs. These PHYs intergate an IPC to setup some configuration and require special handling to sync with the parity bit. The parity bit is a way the IPC use to follow correct order of command sent. Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1, AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1, AS21210PB1 that all register with the PHY ID 0x7500 0x7500 before the firmware is loaded. The big special thing about this PHY is that it does provide a generic PHY ID in C45 register that change to the correct one one the firmware is loaded. In practice: - MMD 0x7 ID 0x7500 0x9410 -> FW LOAD -> ID 0x7500 0x9422 To handle this, we operate on .match_phy_device where we check the PHY ID, if the ID match the generic one, we load the firmware and we return 0 (PHY driver doesn't match). Then PHY core will try the next PHY driver in the list and this time the PHY is correctly filled in and we register for it. To help in the matching and not modify part of the PHY device struct, .match_phy_device is extended to provide also the current phy_driver is trying to match for. This add the extra benefits that some other PHY can simplify their .match_phy_device OP. ==================== Link: https://patch.msgid.link/20250517201353.5137-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 3e2b72298904081ba16b7e98b156eaca07f2db27 Author: Christian Marangi Date: Sat May 17 22:13:50 2025 +0200 dt-bindings: net: Document support for Aeonsemi PHYs Add Aeonsemi PHYs and the requirement of a firmware to correctly work. Also document the max number of LEDs supported and what PHY ID expose when no firmware is loaded. Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1, AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1, AS21210PB1 that all register with the PHY ID 0x7500 0x9410 on C45 registers before the firmware is loaded. Reviewed-by: Rob Herring (Arm) Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250517201353.5137-7-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 830877d89edcd834e4b4d0fcc021ff619d89505e Author: Christian Marangi Date: Sat May 17 22:13:49 2025 +0200 net: phy: Add support for Aeonsemi AS21xxx PHYs Add support for Aeonsemi AS21xxx 10G C45 PHYs. These PHYs integrate an IPC to setup some configuration and require special handling to sync with the parity bit. The parity bit is a way the IPC use to follow correct order of command sent. Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1, AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1, AS21210PB1 that all register with the PHY ID 0x7500 0x7510 before the firmware is loaded. They all support up to 5 LEDs with various HW mode supported. While implementing it was found some strange coincidence with using the same logic for implementing C22 in MMD regs in Broadcom PHYs. For reference here the AS21xxx PHY name logic: AS21x1xxB1 ^ ^^ | |J: Supports SyncE/PTP | |P: No SyncE/PTP support | 1: Supports 2nd Serdes | 2: Not 2nd Serdes support 0: 10G, 5G, 2.5G 5: 5G, 2.5G 2: 2.5G Reviewed-by: Andrew Lunn Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250517201353.5137-6-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit d6c45707ac84c2d9f274ece1cea4dddb97996bde Author: Christian Marangi Date: Sat May 17 22:13:48 2025 +0200 net: phy: introduce genphy_match_phy_device() Introduce new API, genphy_match_phy_device(), to provide a way to check to match a PHY driver for a PHY device based on the info stored in the PHY device struct. The function generalize the logic used in phy_bus_match() to check the PHY ID whether if C45 or C22 ID should be used for matching. This is useful for custom .match_phy_device function that wants to use the generic logic under some condition. (example a PHY is already setup and provide the correct PHY ID) Reviewed-by: Russell King (Oracle) Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250517201353.5137-5-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 1b76b2497aba90ce77a83b0af5943480fec5823f Author: Christian Marangi Date: Sat May 17 22:13:47 2025 +0200 net: phy: nxp-c45-tja11xx: simplify .match_phy_device OP Simplify .match_phy_device OP by using a generic function and using the new phy_id PHY driver info instead of hardcoding the matching PHY ID with new variant for macsec and no_macsec PHYs. Also make use of PHY_ID_MATCH_MODEL macro and drop PHY_ID_MASK define to introduce phy_id and phy_id_mask again in phy_driver struct. Reviewed-by: Russell King (Oracle) Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250517201353.5137-4-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 5253972cb9555c81fd021d4d61d95733fd25ee5b Author: Christian Marangi Date: Sat May 17 22:13:46 2025 +0200 net: phy: bcm87xx: simplify .match_phy_device OP Simplify .match_phy_device OP by using a generic function and using the new phy_id PHY driver info instead of hardcoding the matching PHY ID. Reviewed-by: Russell King (Oracle) Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250517201353.5137-3-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 31afd6bc55cc0093c3e5b0a368319e423d4de8ea Author: Christian Marangi Date: Sat May 17 22:13:45 2025 +0200 net: phy: pass PHY driver to .match_phy_device OP Pass PHY driver pointer to .match_phy_device OP in addition to phydev. Having access to the PHY driver struct might be useful to check the PHY ID of the driver is being matched for in case the PHY ID scanned in the phydev is not consistent. A scenario for this is a PHY that change PHY ID after a firmware is loaded, in such case, the PHY ID stored in PHY device struct is not valid anymore and PHY will manually scan the ID in the match_phy_device function. Having the PHY driver info is also useful for those PHY driver that implement multiple simple .match_phy_device OP to match specific MMD PHY ID. With this extra info if the parsing logic is the same, the matching function can be generalized by using the phy_id in the PHY driver instead of hardcoding. Rust wrapper callback is updated to align to the new match_phy_device arguments. Suggested-by: Russell King (Oracle) Reviewed-by: Russell King (Oracle) Signed-off-by: Christian Marangi Reviewed-by: Benno Lossin # for Rust Reviewed-by: FUJITA Tomonori Link: https://patch.msgid.link/20250517201353.5137-2-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit d42d440746f8a2dd04b17102993fc85a162dc75a Author: Jiawen Wu Date: Mon May 19 14:33:57 2025 +0800 net: libwx: Fix log level There is a log should be printed as info level, not error level. Fixes: 9bfd65980f8d ("net: libwx: Add sriov api for wangxun nics") Signed-off-by: Jiawen Wu Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/67409DB57B87E2F0+20250519063357.21164-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit f44092606a3f153bb7e6b277006b1f4a5b914cfc Author: Justin Lai Date: Tue May 20 12:20:31 2025 +0800 rtase: Use min() instead of min_t() Use min() instead of min_t() to avoid the possibility of casting to the wrong type. Signed-off-by: Justin Lai Reviewed-by: Joe Damato Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250520042031.9297-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski commit c6634c98e6151ed626a566fbadb54337bb94c532 Merge: 51ebe6b14f6690 c93f75b2d755c3 Author: Jakub Kicinski Date: Wed May 21 15:40:17 2025 -0700 Merge branch 'net-faster-and-simpler-crc32c-computation' Eric Biggers says: ==================== net: faster and simpler CRC32C computation Update networking code that computes the CRC32C of packets to just call crc32c() without unnecessary abstraction layers. The result is faster and simpler code. Patches 1-7 add skb_crc32c() and remove the overly-abstracted and inefficient __skb_checksum(). Patches 8-10 replace skb_copy_and_hash_datagram_iter() with skb_copy_and_crc32c_datagram_iter(), eliminating the unnecessary use of the crypto layer. This unblocks the conversion of nvme-tcp to call crc32c() directly instead of using the crypto layer, which patch 9 does. v1: https://lore.kernel.org/20250511004110.145171-1-ebiggers@kernel.org ==================== Link: https://patch.msgid.link/20250519175012.36581-1-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit c93f75b2d755c35b596084ddd3feb3528284a53f Author: Eric Biggers Date: Mon May 19 10:50:12 2025 -0700 net: remove skb_copy_and_hash_datagram_iter() Now that skb_copy_and_hash_datagram_iter() is no longer used, remove it. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-11-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 427fff9aff295e2c117ed26237d1f4e3d87750a3 Author: Eric Biggers Date: Mon May 19 10:50:11 2025 -0700 nvme-tcp: use crc32c() and skb_copy_and_crc32c_datagram_iter() Now that the crc32c() library function directly takes advantage of architecture-specific optimizations and there also now exists a function skb_copy_and_crc32c_datagram_iter(), it is unnecessary to go through the crypto_ahash API. Just use those functions. This is much simpler, and it also improves performance due to eliminating the crypto API overhead. Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-10-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit ea6342d98928e243f2024fb97a9b4d42ee55dfba Author: Eric Biggers Date: Mon May 19 10:50:10 2025 -0700 net: add skb_copy_and_crc32c_datagram_iter() Since skb_copy_and_hash_datagram_iter() is used only with CRC32C, the crypto_ahash abstraction provides no value. Add skb_copy_and_crc32c_datagram_iter() which just calls crc32c() directly. This is faster and simpler. It also doesn't have the weird dependency issue where skb_copy_and_hash_datagram_iter() depends on CONFIG_CRYPTO_HASH=y without that being expressed explicitly in the kconfig (presumably because it was too heavyweight for NET to select). The new function is conditional on the hidden boolean symbol NET_CRC32C, which selects CRC32. So it gets compiled only when something that actually needs CRC32C packet checksums is enabled, it has no implicit dependency, and it doesn't depend on the heavyweight crypto layer. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-9-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit b82f72292ab4c65250bd734281464a6ab1ff4133 Author: Eric Biggers Date: Mon May 19 10:50:09 2025 -0700 lib/crc32: remove unused support for CRC32C combination crc32c_combine() and crc32c_shift() are no longer used (except by the KUnit test that tests them), and their current implementation is very slow. Remove them. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-8-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 70c96c7cb9f035d5b960021f2450afa6240e66b4 Author: Eric Biggers Date: Mon May 19 10:50:08 2025 -0700 net: fold __skb_checksum() into skb_checksum() Now that the only remaining caller of __skb_checksum() is skb_checksum(), fold __skb_checksum() into skb_checksum(). This makes struct skb_checksum_ops unnecessary, so remove that too and simply do the "regular" net checksum. It also makes the wrapper functions csum_partial_ext() and csum_block_add_ext() unnecessary, so remove those too and just use the underlying functions. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-7-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 99de9d4022e5004f95f425f798f0aa01e87949ff Author: Eric Biggers Date: Mon May 19 10:50:07 2025 -0700 sctp: use skb_crc32c() instead of __skb_checksum() Make sctp_compute_cksum() just use the new function skb_crc32c(), instead of calling __skb_checksum() with a skb_checksum_ops struct that does CRC32C. This is faster and simpler. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-6-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 62673b7df998b669229f9aaf85a25cb5c24d5e40 Author: Eric Biggers Date: Mon May 19 10:50:06 2025 -0700 RDMA/siw: use skb_crc32c() instead of __skb_checksum() Instead of calling __skb_checksum() with a skb_checksum_ops struct that does CRC32C, just call the new function skb_crc32c(). This is faster and simpler. Acked-by: Leon Romanovsky Reviewed-by: Bernard Metzler Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-5-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 86edc94da1063a327d8d4bfc82b31df427db3e5c Author: Eric Biggers Date: Mon May 19 10:50:05 2025 -0700 net: use skb_crc32c() in skb_crc32c_csum_help() Instead of calling __skb_checksum() with a skb_checksum_ops struct that does CRC32C, just call the new function skb_crc32c(). This is faster and simpler. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-4-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit a5bd029c733b8ae790d5873e2afeb88b58e3a151 Author: Eric Biggers Date: Mon May 19 10:50:04 2025 -0700 net: add skb_crc32c() Add skb_crc32c(), which calculates the CRC32C of a sk_buff. It will replace __skb_checksum(), which unnecessarily supports arbitrary checksums. Compared to __skb_checksum(), skb_crc32c(): - Uses the correct type for CRC32C values (u32, not __wsum). - Does not require the caller to provide a skb_checksum_ops struct. - Is faster because it does not use indirect calls and does not use the very slow crc32c_combine(). According to commit 2817a336d4d5 ("net: skb_checksum: allow custom update/combine for walking skb") which added __skb_checksum(), the original motivation for the abstraction layer was to avoid code duplication for CRC32C and other checksums in the future. However: - No additional checksums showed up after CRC32C. __skb_checksum() is only used with the "regular" net checksum and CRC32C. - Indirect calls are expensive. Commit 2544af0344ba ("net: avoid indirect calls in L4 checksum calculation") worked around this using the INDIRECT_CALL_1 macro. But that only avoided the indirect call for the net checksum, and at the cost of an extra branch. - The checksums use different types (__wsum and u32), causing casts to be needed. - It made the checksums of fragments be combined (rather than chained) for both checksums, despite this being highly counterproductive for CRC32C due to how slow crc32c_combine() is. This can clearly be seen in commit 4c2f24549644 ("sctp: linearize early if it's not GSO") which tried to work around this performance bug. With a dedicated function for each checksum, we can instead just use the proper strategy for each checksum. As shown by the following tables, the new function skb_crc32c() is faster than __skb_checksum(), with the improvement varying greatly from 5% to 2500% depending on the case. The largest improvements come from fragmented packets, mainly due to eliminating the inefficient crc32c_combine(). But linear packets are improved too, especially shorter ones, mainly due to eliminating indirect calls. These benchmarks were done on AMD Zen 5. On that CPU, Linux uses IBRS instead of retpoline; an even greater improvement might be seen with retpoline: Linear sk_buffs Length in bytes __skb_checksum cycles skb_crc32c cycles =============== ===================== ================= 64 43 18 256 94 77 1420 204 161 16384 1735 1642 Nonlinear sk_buffs (even split between head and one fragment) Length in bytes __skb_checksum cycles skb_crc32c cycles =============== ===================== ================= 64 579 22 256 829 77 1420 1506 194 16384 4365 1682 Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-3-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 55d22ee0358597185f8f5272558ec7cf1a49eb41 Author: Eric Biggers Date: Mon May 19 10:50:03 2025 -0700 net: introduce CONFIG_NET_CRC32C Add a hidden kconfig symbol NET_CRC32C that will group together the functions that calculate CRC32C checksums of packets, so that these don't have to be built into NET-enabled kernels that don't need them. Make skb_crc32c_csum_help() (which is called only when IP_SCTP is enabled) conditional on this symbol, and make IP_SCTP select it. Signed-off-by: Eric Biggers Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20250519175012.36581-2-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 51ebe6b14f669019a9e59e315d7c460065468f8e Merge: e6b3527c3b0a67 4e4dc6db2b92bc Author: Jakub Kicinski Date: Wed May 21 15:38:43 2025 -0700 Merge branch 'tools-ynl-gen-add-support-for-inherited-selector-and-therefore-tc' Jakub Kicinski says: ==================== tools: ynl-gen: add support for "inherited" selector and therefore TC Add C codegen support for constructs needed by TC, namely passing sub-message selector from a lower nest, and sub-messages with fixed headers. ==================== Link: https://patch.msgid.link/20250520161916.413298-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b5125e69fb6c6e0d073a9cf10c80aef28f2c6ad6 Merge: 13649a41bec2f0 654ac800d4ac6b Author: Arnd Bergmann Date: Thu May 22 00:15:20 2025 +0200 Merge tag 'qcom-arm64-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt More Qualcomm Arm64 DeviceTree updates for v6.16 Support for CPU frequency scaling is enabled on the X Elite platform. Also on X Elite, support for the HP EliteBook Ultra G1q is introduced. Support for the QCS6490 RB3gen2 Industrial Mezzanine is also added. PCIe controllers and PHYs are described and enabled across IPQ5018, IPQ5332, and IPQ5424. On IPQ9474 the missing MHI register range is added. The TCSR block is described and used to enable download mode flags on IPQ5018. The venus video encoder/decoder is enabled on the MSM8998-based Lenovo Miix 630 laptop. The crypto engine is enabled on QCM2290 and QCS615. Bluetooth is enabled on the QCM2210-based RB1 board. The Fairphone FP5 gains Displayport sound support. SAR2130P display nodes are added. On 8cx Gen3 the sensor remoteproc (SLPI) is introduced and this is enabled on Lenovo Thinkpad X13s and the CRD. The SDM845-based Samsung Galaxy S9 gains graphics, modem and initial sound support. On SDX75 the QPIC BAM and NAND support is added, and these are enabled on the IDP board. LLCC is added for SM8750. SM8550 gains Iris video decoder support. For X Elite, Lenovo ThinkPad T14s support for the SDX62 modem, as well as audio headset, is added. ASUS Vivobook S 15 gains Bluetooth support, Microsoft Surface Laptop 7 models gets support for DP over USB Type-C, HP Omnibook X 14 gains audio support. The devkit gets the USB multiport controller and the two USB Type-A ports described. Additionally a variety of Devicetree fixes are introduced, primarily identified through binding validation. * tag 'qcom-arm64-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (58 commits) arm64: dts: qcom: sm4450: Add RPMh power domains support arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add retimers, dp altmode support arm64: dts: qcom: ipq5424: Enable PCIe PHYs and controllers arm64: dts: qcom: ipq5424: Add PCIe PHYs and controller nodes arm64: dts: qcom: sc7280: Mark FastRPC context banks as dma-coherent arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & QPIC NAND support arm64: dts: qcom: sdx75: Add QPIC NAND support arm64: dts: qcom: sdx75: Add QPIC BAM support arm64: dts: qcom: qcm2290: Add crypto engine arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties arm64: dts: qcom: qcs615: Fix up UFS clocks arm64: dts: qcom: sa8775p: Clean up the PSCI PDs arm64: dts: qcom: msm8996-oneplus: Add SLPI VDD_PX arm64: dts: qcom: sm6350-pdx213: Wire up USB regulators arm64: dts: qcom: msm8998-yoshino: Add QUSB2PHY VDD supply arm64: dts: qcom: msm8998-mtp: Add QUSB2PHY VDD supply arm64: dts: qcom: msm8998-fxtec: Add QUSB2PHY VDD supply arm64: dts: qcom: qcs615: Remove disallowed property from AOSS_QMP node arm64: dts: qcom: msm8998: Remove mdss_hdmi_phy phandle argument ... Link: https://lore.kernel.org/r/20250520024248.38904-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 13649a41bec2f09c747e3fa1634d56eb19992c02 Merge: 9896dde15a677e b2c547cffe2f67 Author: Arnd Bergmann Date: Thu May 22 00:14:35 2025 +0200 Merge tag 'qcom-arm32-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt More Arm32 DeviceTree updates for v6.16 This adds missing LVDS clocks to APQ8064 display controller. The unused HDMI HPD gpio on ifc6410 is dropped (chip uses pinmuxed hpd function). Missing timer clocks are added to MSM8960 to address bindings warning. * tag 'qcom-arm32-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: apq8064-ifc6410: drop HDMI HPD GPIO ARM: dts: qcom: apq8064: link LVDS clocks ARM: dts: qcom-msm8960: add missing clocks to the timer node Link: https://lore.kernel.org/r/20250520024716.39418-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 9896dde15a677e16da76965b8ddee93f2d5e493e Merge: 1e1ce25fb70d6b 99af08feb7fad3 Author: Arnd Bergmann Date: Thu May 22 00:12:54 2025 +0200 Merge tag 'mtk-dts64-for-v6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt Additional MediaTek ARM64 DTS updates for v6.16 This addresses devicetree binding warnings happening on the MDP3 nodes in mt8188 dts, reverts the commit adding the SCP firmware-name as strongly suggested by Arnd, and also adds some more late commits. In particular: - MT6359 PMIC - Renamed PMIC RTC node to fix dtbs_check warning - MT7988(A) - Support for SPI controllers was added to SoC and BPI-R4 - Support for XSPHY, USB and PCIe2 was added as well - Fan and cooling maps were added to BPI-R4 machine - Added BananaPi R4 2G5 machine variant - MT8365 - Added touchscreen support to MT8365 Genio EVK - MT8188 - Addressed dtbs_check warnings for MDP3 nodes - MT8390 (Genio) - Reverted SCP firmware-name addition * tag 'mtk-dts64-for-v6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (42 commits) Revert "arm64: dts: mediatek: mt8390-genio-common: Add firmware-name for scp0" arm64: dts: mediatek: mt8188: Address binding warnings for MDP3 nodes arm64: dts: mt6359: Rename RTC node to match binding expectations arm64: dts: mt8365-evk: Add goodix touchscreen support arm64: dts: mediatek: mt8188: Add missing #reset-cells property arm64: dts: airoha: en7581: Add PCIe nodes to EN7581 SoC evaluation board arm64: dts: airoha: en7581: Add gpio-ranges property for gpio controller arm64: dts: mediatek: mt7988a-bpi-r4: configure spi-nodes arm64: dts: mediatek: mt7988a-bpi-r4: Add fan and coolingmaps arm64: dts: mediatek: mt7988: add phy calibration efuse subnodes arm64: dts: mediatek: mt7988: move uart0 and spi1 pins to soc dtsi arm64: dts: mediatek: mt7988: add spi controllers arm64: dts: mediatek: mt7988a-bpi-r4: enable xsphy arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2 arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4 dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant arm64: dts: mt6359: Add missing 'compatible' property to regulators node arm/arm64: dts: mediatek: Add missing "#sound-dai-cells" to linux,bt-sco arm64: dts: mediatek: mt8390-genio-common: Set ssusb2 default dual role mode to host arm64: dts: mediatek: mt8395-genio-1200-evk: Disable unused backlight ... Link: https://lore.kernel.org/r/20250520114356.1194450-1-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 1e1ce25fb70d6b0505a5b59fce7bf89943865fc0 Merge: f9930aef2c86c3 9e010737dd434e Author: Arnd Bergmann Date: Thu May 22 00:11:16 2025 +0200 Merge tag 'v6.16-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt RK3036 usbphy addition and two Sonoff iHost adjustments. * tag 'v6.16-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add rk3036 usb2phy nodes and enable them on kylin ARM: dts: rockchip: Sonoff-iHost: correct IO domain voltages ARM: dts: rockchip: Sonoff-iHost: adjust SDIO for stability Link: https://lore.kernel.org/r/3652020.5fSG56mABF@phil Signed-off-by: Arnd Bergmann commit f9930aef2c86c3a4bcec1aff9617cbc85de146c4 Merge: b9e82beb37eb65 dfab90b9580c2f Author: Arnd Bergmann Date: Thu May 22 00:10:10 2025 +0200 Merge tag 'v6.16-rockchip-dts64-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt Power-domains needed for stability, dropping of unnecessary assigned-clocks (handled by cpufreq) and fixes for dtc W=1 warnings. * tag 'v6.16-rockchip-dts64-3' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: move rk3562 pinctrl node outside the soc node arm64: dts: rockchip: fix rk3562 pcie unit addresses arm64: dts: rockchip: move rk3528 pinctrl node outside the soc node arm64: dts: rockchip: remove a double-empty line from rk3576 core dtsi arm64: dts: rockchip: move rk3576 pinctrl node outside the soc node arm64: dts: rockchip: fix rk3576 pcie unit addresses arm64: dts: rockchip: Drop assigned-clock* from cpu nodes on rk3588 arm64: dts: rockchip: Add missing SFC power-domains to rk3576 Link: https://lore.kernel.org/r/4798229.ejJDZkT8p0@phil Signed-off-by: Arnd Bergmann commit b9e82beb37eb65da4b4c6b82bdc0f270a0979407 Merge: ebe6d8f00d8f1e 1631cbdb808963 Author: Arnd Bergmann Date: Thu May 22 00:09:51 2025 +0200 Merge tag 'v6.16-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New SoC the RK3562 (4xA53, Mali-G52) with one evaluation board. New boards: - Cobra and PP1516 from Theobroma-Systems (build around the PX30) - Radxa Rock 5B+ (rk3588) - Rockchip RK3399 industrial eval board New peripherals: - GMAC + SDMMC/SDIO on rk3528 - SAI + HDMI-audio on rk3576 Interesting general updates: - move rk3528 i2c + uart aliases as requested - rk3568 PCIe3 MSI to use GIC ITS - update deprecated dwmac reset properties on some px30 boards - updates for cypress usb hubs on some Theobroma boards Binding taken with Greg's blessing https://lore.kernel.org/all/2025051550-polish-prude-ed56@gregkh/ * tag 'v6.16-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (35 commits) arm64: dts: rockchip: Improve LED config for NanoPi R5S arm64: dts: rockchip: add px30-pp1516 base dtsi and board variants dt-bindings: arm: rockchip: add PX30-PP1516 boards from Theobroma Systems arm64: dts: rockchip: add px30-cobra base dtsi and board variants dt-bindings: arm: rockchip: add PX30-Cobra boards from Theobroma Systems arm64: dts: rockchip: move reset to dedicated eth-phy node on ringneck arm64: dts: rockchip: add basic mdio node to px30 arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma dt-bindings: usb: cypress,hx3: Add support for all variants arm64: dts: rockchip: move rk3528 i2c+uart aliases to board files arm64: dts: rockchip: drop wrong spdif clock from edp1 on rk3588 arm64: dts: rockchip: Add RK3562 evb2 devicetree arm64: dts: rockchip: add core dtsi for RK3562 SoC dt-bindings: arm: rockchip: Add rk3562 evb2 board dt-bindings: soc: rockchip: Add rk3562 syscon compatibles dt-bindings: rockchip: pmu: Add rk3562 compatible arm64: dts: rockchip: Enable Ethernet controller on Radxa E20C arm64: dts: rockchip: Add GMAC nodes for RK3528 ... Link: https://lore.kernel.org/r/3998939.iIbC2pHGDl@phil Signed-off-by: Arnd Bergmann commit ebe6d8f00d8f1e47702ed63a67507d257dee1a45 Merge: 591ad24c6cda67 9179e4a26bf257 Author: Arnd Bergmann Date: Thu May 22 00:07:27 2025 +0200 Merge tag 'mvebu-dt64-6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.16 (part 1) Clean up unused pinctrl-names in pca9555 nodes * tag 'mvebu-dt64-6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: Drop unused "pinctrl-names" Link: https://lore.kernel.org/r/87tt5kpqy9.fsf@BLaptop.bootlin.com Signed-off-by: Arnd Bergmann commit 591ad24c6cda6756aec0bbfd2e719fc020bfec17 Merge: 17e6320b0d0f43 652eea251dd852 Author: Arnd Bergmann Date: Thu May 22 00:02:03 2025 +0200 Merge tag 'renesas-dts-for-v6.16-tag4' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.16 (take four) - Fix White Hawk ARD Audio breakage. * tag 'renesas-dts-for-v6.16-tag4' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: white-hawk-ard-audio: Fix TPU0 groups Link: https://lore.kernel.org/r/cover.1747817851.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 17e6320b0d0f435f0d136602218b7815043d589e Merge: 00000994fe3226 1064013303c6dd Author: Arnd Bergmann Date: Wed May 21 23:59:55 2025 +0200 Merge tag 'renesas-dts-for-v6.16-tag3' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.16 (take three) - Silence a DTC warning, - Add an extra compatible value to avoid future issues. * tag 'renesas-dts-for-v6.16-tag3' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: riscv: dts: renesas: Add specific RZ/Five cache compatible arm64: dts: renesas: sparrow-hawk: Disable dtc spi_bus_bridge check Link: https://lore.kernel.org/r/cover.1747399860.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 00000994fe32264d45e4e011d258779bfb26f6b0 Merge: ced334a21c58dd d50108706a63df Author: Arnd Bergmann Date: Wed May 21 23:57:48 2025 +0200 Merge tag 'riscv-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt RISC-V Devicetrees for v6.16 Starfive: All Starfive this time (again), enabling the usb3 port on the framework laptop mainboard, and a few cleanup patches that are syncing things with the dts used by U-Boot. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: jh7110-common: bootph-pre-ram hinting needed by boot loader riscv: dts: starfive: jh7110-common: add eeprom node to i2c5 riscv: dts: starfive: jh7110-common: qspi flash setting read-delay 2 cycles max 100MHz riscv: dts: starfive: jh7110-common: add CPU BUS PERH QSPI clocks to syscrg riscv: dts: starfive: jh7110-common: use macros for MMC0 pins riscv: dts: starfive: fml13v01: enable USB 3.0 port Link: https://lore.kernel.org/r/20250516-gap-exploring-f8f516ab4e1c@spud Signed-off-by: Arnd Bergmann commit ced334a21c58dd7e35f39ea2992419cbd92b1849 Merge: ea15963b2653b0 ec32344d2a3b84 Author: Arnd Bergmann Date: Wed May 21 23:57:19 2025 +0200 Merge tag 'microchip-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip ARM64 device tree updates for v6.16 This update includes: - fix CPU node "enable-method" property dependencies * tag 'microchip-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: arm64: dts: microchip: sparx5: Fix CPU node "enable-method" property dependencies Link: https://lore.kernel.org/r/20250516055607.11248-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit ea15963b2653b0adfdabf82a54f036a62e513272 Merge: 0feaf3c056b883 36e9e1ab594519 Author: Arnd Bergmann Date: Wed May 21 23:55:13 2025 +0200 Merge tag 'at91-dt-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip AT91 device tree updates for v6.16 This update includes: - more controllers enabled for SAMA7D65 SoC (Ethernet, Flexcoms, SRAM, DRAM, RTC, RTT, GBPR) - cleanups and fixes for Calao boards * tag 'at91-dt-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: microchip: sama7g54_curiosity: Add fixed-partitions for spi-nor flash ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support ARM: dts: microchip: sama7d65_curiosity: add EEPROM ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity ARM: dts: microchip: sama7d65: Enable GMAC interface ARM: dts: microchip: sama7d65: Add FLEXCOMs to sama7d65 SoC ARM: dts: microchip: sama7d65: Add gmac interfaces for sama7d65 SoC ARM: dts: at91: at91sam9263: fix NAND chip selects ARM: dts: at91: usb_a9g20: move wrong RTC node ARM: dts: at91: calao_usb: simplify chosen node ARM: dts: at91: usb_a9260: use 'stdout-path' ARM: dts: at91: calao_usb: simplify memory node ARM: dts: at91: usb_a9263: fix GPIO for Dataflash chip select ARM: dts: at91: usb_a9g20: add SPI EEPROM Link: https://lore.kernel.org/r/20250516055330.10852-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 0feaf3c056b88351d13ec527be89262aeec7b96f Merge: 38181494e45aa0 a3cd12acb7b74d Author: Arnd Bergmann Date: Wed May 21 23:52:34 2025 +0200 Merge tag 'sunxi-dt-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt Allwinner device tree changes for 6.16 Introduce Allwinner A523 / A527 / T527 SoC family w/ three new devices: - Radxa Cubie A5E - X96Q-Pro+ - Avaota-A1 Also enable EMAC0 ethernet MAC on A523 family for Cubie A5E & Avaota-A1. Note: the SoC has two different ethernet controllers. Changes to existing SoCs: - Enable GPU on H616 with all boards enabled - Set maximum MMC frequency for the A100 Changes to existing boards: - Add WiFi/BT header on PINE64 A64 boards - Add hp-det-gpios for Anbernic RG35XX - Add support for PHY LEDs on Bananapi (the original one) Add new devices for existing SoCs: - YuzukiHD Chameleon based on H6 - Liontron H-A133L based on A133 (compatible with A100) Tree wide cleanups: - Use preferred node names for cooling maps - Align wifi node name with bindings - Drop spurious 'clock-latency-ns' properties for H5 & H6 * tag 'sunxi-dt-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (27 commits) arm64: dts: allwinner: a100: add Liontron H-A133L board support dt-bindings: arm: sunxi: Add Liontron H-A133L board name dt-bindings: vendor-prefixes: Add Liontron name ARM: dts: bananapi: add support for PHY LEDs arm64: dts: allwinner: a100: set maximum MMC frequency arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC dt-bindings: sram: sunxi-sram: Add A523 compatible arm64: dts: allwinner: a64: Add WiFi/BT header on SOPINE Baseboard arm64: dts: allwinner: a64: Add WiFi/BT header on PINE A64 arm64: dts: allwinner: correct the model name for Radxa Cubie A5E ARM: dts: allwinner: Align wifi node name with bindings arm64: dts: allwinner: Align wifi node name with bindings arm64: dts: allwinner: h616: enable Mali GPU for all boards arm64: dts: allwinner: h616: Add Mali GPU node arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX arm64: dts: allwinner: h5/h6: Drop spurious 'clock-latency-ns' properties arm/arm64: dts: allwinner: Use preferred node names for cooling maps arm64: dts: allwinner: h616: add YuzukiHD Chameleon support ... Link: https://lore.kernel.org/r/aCaeZJ2t4S_xhgjp@wens.tw Signed-off-by: Arnd Bergmann commit 38181494e45aa09404b276022cb2fdc9111006d3 Merge: ba32d96e90c113 518e8ffa00c874 Author: Arnd Bergmann Date: Wed May 21 23:51:17 2025 +0200 Merge tag 'stm32-dt-for-v6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.16, round 1 Highlights: ---------- - MCU: - Add low power timer on STM32F746 - Add STM32H747 High end MCU support. It embeds: - dual-core (Cortex-M7 + Cortex-M4) - up to 2 Mbytes flash - 1 Mbyte of internal RAM - Add STM32H747i-disco board support. Detailed information can be found at: https://www.st.com/en/evaluation-tools/stm32h747i-disco.html - MPU: - STM32MP13: - Add VREFINT calibration support based on ADC. - STMP32MP15: - Add new Ultratronik Fly board support: - based on STM32MP157C SoC - 1GB of DDR3 - Several connections are available on this boards: 2*USB2.0, 1*USB2.0 MiniUSB, Debug UART, 1*UART, 1*USART, SDcard, RJ45, ... - STM32MP25: - Add OCTOSPI support on STM32MP25 SoCs - Add SPI NOR flash support on STM32MP257F-EV1 connected to OSPI1 - Add Low power timer TIMER (LPTIM) on STM32MP25 SoCs and use LPTIM3 as low power broadcast timer on STM32MP257F-EV1. * tag 'stm32-dt-for-v6.16-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (22 commits) ARM: dts: stm32: add initial support for stm32mp157-ultra-fly-sbc board MAINTAINERS: Add entry for ULTRATRONIK BOARD SUPPORT dt-bindings: arm: stm32: Document Ultratronik's Fly board DT binding dt-bindings: vendor-prefixes: Add Ultratronik arm64: dts: st: use lptimer3 as tick broadcast source on stm32mp257f-ev1 arm64: dts: st: add low-power timer nodes on stm32mp251 arm64: defconfig: enable STM32 LP timer clockevent driver arm64: dts: st: Add SPI NOR flash support on stm32mp257f-ev1 board arm64: dts: st: Add ospi port1 pinctrl entries in stm32mp25-pinctrl.dtsi arm64: dts: st: Add OMM node on stm32mp251 ARM: dts: stm32: support STM32h747i-disco board ARM: dts: stm32: add an extra pin map for USART1 on stm32h743 ARM: dts: stm32: add pin map for UART8 controller on stm32h743 ARM: dts: stm32: add uart8 node for stm32h743 MCU dt-bindings: clock: stm32h7: rename USART{7,8}_CK to UART{7,8}_CK ARM: stm32: add a new SoC - STM32H747 dt-bindings: arm: stm32: add compatible for stm32h747i-disco board ARM: dts: stm32h7-pinctrl: add _a suffix to u[s]art_pins phandles ARM: dts: st: stm32: Align wifi node name with bindings ARM: dts: stm32: add low power timer on STM32F746 ... Link: https://lore.kernel.org/r/2f101efb-6d58-48d8-983a-57e30a34827c@foss.st.com Signed-off-by: Arnd Bergmann commit ba32d96e90c113b8aa1b362c4cbb10a6bd1be62c Merge: 759dd3fea1d976 3aa64cd126b4fd Author: Arnd Bergmann Date: Wed May 21 23:48:02 2025 +0200 Merge tag 'spacemit-dt-for-6.16-1' of https://github.com/spacemit-com/linux into soc/dt RISC-V SpacemiT DT changes for 6.16 - Add clock driver, fix for pinctrl/uart - Add gpio support, enable LED heartbeat * tag 'spacemit-dt-for-6.16-1' of https://github.com/spacemit-com/linux: riscv: dts: spacemit: add gpio LED for system heartbeat riscv: dts: spacemit: add gpio support for K1 SoC riscv: dts: spacemit: Acquire clocks for UART riscv: dts: spacemit: Acquire clocks for pinctrl riscv: dts: spacemit: Add clock tree for SpacemiT K1 dt-bindings: clock: spacemit: Add spacemit,k1-pll dt-bindings: soc: spacemit: Add spacemit,k1-syscon Link: https://lore.kernel.org/r/20250514044841-GYA524674@gentoo Signed-off-by: Arnd Bergmann commit 759dd3fea1d97663c256960072554f2062aac86e Merge: 2b183108bcbdc8 f2420037d90a83 Author: Arnd Bergmann Date: Wed May 21 23:47:20 2025 +0200 Merge tag 'qcom-arm32-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm32 DeviceTree updates for v6.16 Introduce support for the AP8064-based LG Nexus 4. MSM8226 is extended with modem-related features, the LTE-capable variant MSM8926 is introduced, and modem support is enabled on Samsung Galaxy Tab 4. Display-related clocks and power-domains are defined for the simple framebuffer of Motorola Moto G, to allow booting without clk_ignore_unused and pd_ignore_unused. On MSM8960 SDCC BAM and thermal sensor (tsens) is introduced. * tag 'qcom-arm32-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: apq8064: move replicator out of soc node ARM: dts: qcom: apq8064: use new compatible for SPS SIC device ARM: dts: qcom: apq8064: use new compatible for SFPB device ARM: dts: qcom: apq8064 merge hw splinlock into corresponding syscon device ARM: dts: qcom: apq8064: add missing clocks to the timer node ARM: dts: qcom: apq8064-lg-nexus4-mako: Enable WiFi ARM: dts: qcom: msm8226-motorola-falcon: specify vddio_disp output voltage ARM: dts: qcom: msm8226-motorola-falcon: limit TPS65132 to 5.4V ARM: dts: qcom: msm8226-motorola-falcon: add I2C clock frequencies ARM: dts: qcom: msm8226-motorola-falcon: add clocks, power-domain to simpleFB ARM: dts: qcom: ipq4019: Drop redundant CPU "clock-latency" ARM: dts: qcom: sdx55/sdx65: Fix CPU power-domain-names ARM: dts: qcom: msm8974: Use the header with DSI phy clock IDs ARM: dts: qcom: msm8226: Use the header with DSI phy clock IDs Link: https://lore.kernel.org/r/20250513214111.43401-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 2b183108bcbdc8b4c06409a9ee616aeab6df40c9 Merge: 12a75f2d9f7317 e58afb3e1f365b Author: Arnd Bergmann Date: Wed May 21 23:46:02 2025 +0200 Merge tag 'dt-vt8500-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt VT8500 DTS ARM changes for v6.16 1. New board: VIA APC Rock/Paper. 2. Add SCC ID register/socinfo node. 3. List all timer interrupts. * tag 'dt-vt8500-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: vt8500: list all four timer interrupts ARM: dts: vt8500: add DT nodes for the system config ID register ARM: dts: vt8500: Add VIA APC Rock/Paper board dt-bindings: arm: vt8500: Add VIA APC Rock/Paper boards Link: https://lore.kernel.org/r/20250513104216.25803-5-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 12a75f2d9f73172161d096fc61cacc4989250604 Merge: c307e9c1a47298 a18226be95c7ae Author: Arnd Bergmann Date: Wed May 21 23:41:02 2025 +0200 Merge tag 'qcom-arm64-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm64 DeviceTree updates for v6.16 The Snapdragon X Plus platform and related reference device is introduced. Devicetree for the Xiaomi Redmi Note 8 is added. Tsens and thermal zones are added for IPQ5332 and IPQ5424. IPQ6018 gains 1.2GHz and 1.5GHz CPU frequencies. The IPQ5424 gains MMC, LEDs and buttons, while the IPQ9574 gains NSS clock controller and SPI NAND support. IPQ6018 SMEM is transitioned to be described directly in the reserved-memory node. Display and GPU are enabled in the QCM6490-based Fairphone FP5. On QCS6490 Rb3Gen2 ADC channels for thermal profiling are added and Bluetooth is enabled. The USB Type-C orientation GPIO is added on the QCS6490 Rb3Gen2 and the vision mezzanine is described. The Fairphone FP5 gains touchscreen and USB Type-C display support, and the QCM6490 IDP board gains a required listed of protected clocks. The camera subsystem in SC7280 is described and UFS is transitioned to use operating points. On MSM8916, MSM8919 and MSM8939, and devices on these platforms, the UART pinctrl state is cleaned up. The MSM8953 platform gains another UART and interconnects. On SA8775P CTCU and ETR nodes are added, and the CPUfreq throttling interrupts are added. Samsung Galaxy S9 SM-G9600 gains a description of the MAX77705 used for charging, fuel gauge, haptic, and LED, as well as the PMIC used for display and touchscreen, which then is used to enable the touchscreen. The LPG/PWM node is added to PM8937 and Xiaomi Redmi 5A gains display backlight control. Display and GPU are enabled for the Nothing Phone (1). QCS615 platform gains command DB definition. The QCS8300 platform gains description of more QUP instances, CPUfreq, PCIe SMMU and the SPMI controller. On SAR2130P PCIe EP device nodes are added. On SDM630 missing resets are added for SDCC. Then on Fairphone FP3 modem is enabled, and firmware-path are defined on ADSP and WCNSS. The SDM845 RB3/DragonBoard845c and the QRB5165 RB5 has the sensors DSP enabled, and the vision mezzanine on both gets their CMA configuration cleaned up. Xiaomi Pocophone F1 gains touchscreen support. On the SM7325 Nothing Phone (1), display, GPU, and camera EEPROMs are described. On SM8450 the PCIe endpoint controller is described. For SM8550 OPP tables are described for PCIe and QUP. SM8750 gains RPMh sleep stats. SM8650 gians OSM L3 scaling and variety of OPP tables and missing interconnect definitions. The thermal trip points for CPU cores and GPU are raised in reliance on hardware throttling. SM8650 is also transitioned to per-CPU interrupt partitions, in order to properly describe the PMU interrupts. Missing Coresight ETE instances are added. On SM8750 the cluster idle states are corrected, then audio and compute DSPs are introduced, together with the crypto and rng blocks. Modem support is added and enabled on MTP and QRD devices. On SC8280XP overlays are introduced for those running Linux at EL2 on these devices. A few more temp-alarm instances are added for the PMICs. On the X Elite platform GPU cooling and watchdog is introduced, together with a number of smaller fixes. Dell XPS13 gains support for USB Type-C display, the QCP gains WiFi/BT power sequence, and a few devices learns about HBR3. The RTC support is enabled and regulators that are feeding resources that should be always on is marked as such on a variety of boards. The Lenovo Thinkpad T14s DeviceTree is split in two, in order to describe the LCD and OLED variants. Missing properties for the crypto BAM is introduced on a variety of platforms, taking care of a long standing error message in the kernel log during boot. DSI phy clock ids are transitioned to use identifiers from the PHY header file and VBIF region size is corrected, across a large number of platforms. A couple of DWC3 quirks are added across a lot of platforms. The arm32-for-6.15 pull request was accidentally merged into the arm64-for-6.16 branch and this wasn't discovered until a significant number of commits would have to be rebased. As such this is kept here as well. * tag 'qcom-arm64-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (308 commits) arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce touchscreen support arm64: dts: qcom: sdm845-xiaomi-beryllium-tianma: introduce touchscreen support arm64: dts: qcom: sdm845-xiaomi-beryllium-common: add touchscreen related nodes arm64: dts: qcom: qcs8300: add the pcie smmu node arm64: dts: qcom: x1e80100-*: Drop useless DP3 compatible override arm64: dts: qcom: msm8953: Add interconnects arm64: dts: qcom: msm8953: Add uart_5 arm64: dts: qcom: sm8350: Use q6asm defines for reg arm64: dts: qcom: sm7325-nothing-spacewar: Use q6asm defines for reg arm64: dts: qcom: sdm850*: Use q6asm defines for reg arm64: dts: qcom: sdm845*: Use q6asm defines for reg arm64: dts: qcom: sc7280: Use q6asm defines for reg arm64: dts: qcom: sc7180-acer-aspire1: Use q6asm defines for reg arm64: dts: qcom: qrb5165-rb5: Use q6asm defines for reg arm64: dts: qcom: msm8996*: Use q6asm defines for reg arm64: dts: qcom: msm8953: Use q6asm defines for reg arm64: dts: qcom: msm8916-modem-qdsp6: Use q6asm defines for reg arm64: dts: qcom: apq8096-db820c: Use q6asm defines for reg arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch ... Link: https://lore.kernel.org/r/20250511235241.15192-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit c307e9c1a472983b1485c058af33f63f8978e5f4 Merge: 7e1a0dfb3f5996 7efb8b92165fea Author: Arnd Bergmann Date: Wed May 21 23:28:23 2025 +0200 Merge tag 'nuvoton-arm-6.16-devicetree' of https://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/dt Nuvoton ARM devicetree updates for v6.16 - MMC, OHCI, UDC and EDAC blocks added to the NPCM7XX DTSI - Fixes for GPIO hog names in the NPCM730 and RunBMC Olympus platforms * tag 'nuvoton-arm-6.16-devicetree' of https://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: nuvoton: Add MMC Nodes ARM: dts: nuvoton: Add OHCI node ARM: dts: nuvoton: Add UDC nodes ARM: dts: nuvoton: Add EDAC node ARM: dts: nuvoton: Align GPIO hog name with bindings Link: https://lore.kernel.org/r/CACPK8Xe=f_hNNWUGL670x4-OeKgDB+2P+mxp5BaTLW==T5jE_A@mail.gmail.com Signed-off-by: Arnd Bergmann commit 4d1c69e53ea7ae344d2502474739719e63a79169 Merge: 07a3c038bd9cc3 936badf282388b Author: Arnd Bergmann Date: Wed May 21 23:16:12 2025 +0200 Merge tag 'qcom-drivers-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers More Qualcomm driver updates for v6.16 Allow HP EliteBook Ultra G1q to use QSSECOM for UEFI variable acecss. Add missing compatible for IPQ5018 TCSR block. Fix a kernel-doc warning in SCM driver. * tag 'qcom-drivers-for-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: docs: firmware: qcom_scm: Fix kernel-doc warning firmware: qcom: scm: Allow QSEECOM for HP EliteBook Ultra G1q dt-bindings: mfd: qcom,tcsr: Add compatible for ipq5018 Link: https://lore.kernel.org/r/20250520024916.39712-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 07a3c038bd9cc3af3536f0b3e06b5b5516ccaaf0 Merge: a65dc234cd690a 51b081cdb92377 Author: Arnd Bergmann Date: Wed May 21 23:14:37 2025 +0200 Merge tag 'riscv-cache-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V cache drivers for v6.16 SiFive: Add support for the Eswin EIC7700 SoC, which needs to make sure of the non-standard cache-ops provided by the ccache driver. Bindings: Conversions for two Marvell bindings to yaml, and additions of two soc-specific compatibles to the axm45mp bindings. Signed-off-by: Conor Dooley * tag 'riscv-cache-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: dt-bindings: cache: add QiLai compatible to ax45mp dt-bindings: cache: Convert marvell,tauros2-cache to DT schema dt-bindings: cache: Convert marvell,{feroceon,kirkwood}-cache to DT schema dt-bindings: cache: add specific RZ/Five compatible to ax45mp cache: sifive_ccache: Add ESWIN EIC7700 support dt-bindings: cache: sifive,ccache0: Add ESWIN EIC7700 SoC compatibility Link: https://lore.kernel.org/r/20250516-liability-facility-667fc14a2a85@spud Signed-off-by: Arnd Bergmann commit a65dc234cd690adde1949232dc538e6d07b833fb Merge: 7148b42e85420b 388d0cc33cc6fc Author: Arnd Bergmann Date: Wed May 21 23:13:49 2025 +0200 Merge tag 'memory-controller-drv-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.16, part two Few fixes for STM32 Octo Memory Manager driver introduced for the same cycle in few commits before. These fixes were reported only after wider coverage by bots through linux-next exposure. * tag 'memory-controller-drv-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: stm32_omm: Fix error handling in stm32_omm_disable_child() memory: stm32_omm: Fix NULL vs IS_ERR() check in probe() memory: stm32_omm: Fix error handling in stm32_omm_configure() memory: stm32: Fix spelling mistake "resset" -> "reset" Link: https://lore.kernel.org/r/20250516082415.7871-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 7148b42e85420bd0d8028a5c5c3611e1c59f6e1f Merge: f1706e0e1a74b0 598995027b9181 Author: Arnd Bergmann Date: Wed May 21 23:12:35 2025 +0200 Merge tag 'samsung-drivers-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC drivers for v6.16, part two Add CPU hotplug support on Google GS101 by toggling respective bits in secondary PMU intr block (Power Management Unit (PMU) Interrupt Generation) from the main PMU driver. * tag 'samsung-drivers-6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-pmu: enable CPU hotplug support for gs101 MAINTAINERS: Add google,gs101-pmu-intr-gen.yaml binding file dt-bindings: soc: samsung: exynos-pmu: gs101: add google,pmu-intr-gen phandle dt-bindings: soc: google: Add gs101-pmu-intr-gen binding documentation Link: https://lore.kernel.org/r/20250516082037.7248-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 7e1a0dfb3f5996c74cf39337ecd958342bffe442 Author: William A. Kennington III Date: Thu May 15 16:15:54 2025 +0930 arm64: dts: nuvoton: Add pinctrl This is critical to support multifunction pins shared between devices as well as generic GPIOs. Signed-off-by: William A. Kennington III Link: https://patch.msgid.link/20250416015902.2091251-1-william@wkennington.com Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20250515-nuvoton-arm64-dt-v1-1-25769b8c1509@codeconstruct.com.au Signed-off-by: Arnd Bergmann commit f1706e0e1a74b095cbc60375b9b1e6205f5f4c98 Author: Henry Martin Date: Thu May 15 16:00:44 2025 +0930 soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop() devm_kasprintf() returns NULL when memory allocation fails. Currently, aspeed_lpc_enable_snoop() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Henry Martin Link: https://patch.msgid.link/20250401074647.21300-1-bsdhenrymartin@gmail.com [arj: Fix Fixes: tag to use subject from 3772e5da4454] Signed-off-by: Andrew Jeffery Signed-off-by: Arnd Bergmann commit d9f0a97e859bdcef51f9c187b1eb712eb13fd3ff Author: Su Hui Date: Thu May 15 16:00:43 2025 +0930 soc: aspeed: lpc: Fix impossible judgment condition smatch error: drivers/soc/aspeed/aspeed-lpc-snoop.c:169 aspeed_lpc_snoop_config_irq() warn: platform_get_irq() does not return zero platform_get_irq() return non-zero IRQ number or negative error code, change '!lpc_snoop->irq' to 'lpc_snoop->irq < 0' to fix this. Fixes: 9f4f9ae81d0a ("drivers/misc: add Aspeed LPC snoop driver") Signed-off-by: Su Hui Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20231027020703.1231875-1-suhui@nfschina.com Signed-off-by: Andrew Jeffery Signed-off-by: Arnd Bergmann commit e4f59f873c3ffe2a0150e11115a83e2dfb671dbf Author: Joel Stanley Date: Thu May 15 16:00:42 2025 +0930 ARM: aspeed: Don't select SRAM The ASPEED devices have SRAM, but don't require it for basic function (or any function; there's no known users of the driver). Fixes: 8c2ed9bcfbeb ("arm: Add Aspeed machine") Signed-off-by: Joel Stanley Link: https://patch.msgid.link/20250115103942.421429-1-joel@jms.id.au Signed-off-by: Andrew Jeffery Signed-off-by: Arnd Bergmann commit 886bb3624e4c9914a943b63fcfdf30b8d2f2b66e Author: Baochen Qiang Date: Wed May 21 22:29:31 2025 +0530 wifi: ath12k: fix regdomain update failure when connection establishes Commit 7ed3e88664e3 ("wifi: ath12k: update regulatory rules when connection established") introduced a call to ath12k_reg_handle_chan_list() upon connection to update the regulatory domain in cfg80211 based on the power type received from the AP. However, this update fails because ah->regd_updated was already set to true during the earlier regulatory update triggered when the interface was added. To resolve this, reset ah->regd_updated before calling ath12k_reg_handle_chan_list() to ensure the update proceeds correctly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Fixes: 7ed3e88664e3 ("wifi: ath12k: update regulatory rules when connection established") Signed-off-by: Baochen Qiang Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250521-ath12k-fix-ah-regd_updated-v1-3-9737de5bf98e@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 37e775a0a9d79a031d28d9e21480f99f448e9215 Author: Baochen Qiang Date: Wed May 21 22:29:30 2025 +0530 wifi: ath12k: fix regdomain update failure when adding interface Commit 4c546023d71a ("wifi: ath12k: update regulatory rules when interface added"), introduced a call to ath12k_reg_handle_chan_list() during interface addition to update the regulatory domain based on the interface type. While this works initially, subsequent updates (e.g., after an interface delete/re-add cycle) fail because ah->regd_updated is never reset. To address this, reset ah->regd_updated before calling ath12k_reg_handle_chan_list() to allow the update to proceed. However, this change exposes another issue: a timeout occurs when waiting for the 11D scan to complete, as seen in the log: ath12k_pci 0000:05:00.0: failed to receive 11d scan complete: timed out This happens because during interface down, ar->state_11d is set to ATH12K_11D_PREPARING, and during interface up, the host waits for ar->completed_11d_scan even though the scan hasn't started yet. Fix this by updating the wait condition to check for ATH12K_11D_RUNNING, which is the only state where a scan complete event is expected. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Fixes: 4c546023d71a ("wifi: ath12k: update regulatory rules when interface added") Signed-off-by: Baochen Qiang Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250521-ath12k-fix-ah-regd_updated-v1-2-9737de5bf98e@oss.qualcomm.com Signed-off-by: Jeff Johnson commit d662c14a51910ba0ad66afd248b601ba30b9f7f1 Author: Baochen Qiang Date: Wed May 21 22:29:29 2025 +0530 wifi: ath12k: fix regdomain update failure after 11D scan completes In the current implementation of ath12k_regd_update(), the ah->regd_updated flag is used to ensure that the regulatory domain is updated only once per radio. During MAC registration, this function is called to push the default regulatory domain to cfg80211. At that point, the hardware state is not on and hence ah->regd_updated remains false. However, after commit 4c546023d71a ("wifi: ath12k: update regulatory rules when interface added"), ath12k_reg_handle_chan_list() is invoked when an interface is added, which in turn calls ath12k_regd_update(). By this time, hardware state is on and consecutively ah->regd_updated becomes true. Later, when the 11D scan completes and a new regulatory domain is received from the firmware, the host attempts to update cfg80211 again via ath12k_regd_update(). But since ah->regd_updated is already true, the update is skipped. >From the user's perspective, this results in a failure to connect to 6 GHz APs, as the default regulatory domain (the only one pushed to cfg80211) does not include 6 GHz support. To resolve this, reset the ah->regd_updated flag when handling the 11D regulatory domain update. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Fixes: 591de41d7008 ("wifi: ath12k: add 11d scan offload support") Signed-off-by: Baochen Qiang Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250521-ath12k-fix-ah-regd_updated-v1-1-9737de5bf98e@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 0c905cadf38b49d53deee25819f0eaa46091c83a Merge: 922607a2b462b8 6c9bb86922728c Author: Rafael J. Wysocki Date: Wed May 21 22:49:34 2025 +0200 Merge tag 'cpufreq-arm-updates-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge ARM CPUFreq updates for 6.16 from Viresh Kumar: "- Rust abstractions for CPUFreq framework (Viresh Kumar). - Rust abstractions for OPP framework (Viresh Kumar). - Basic Rust abstractions for Clk and Cpumask frameworks (Viresh Kumar). - Minor cleanup to the SCMI cpufreq driver (Mike Tipton)." * tag 'cpufreq-arm-updates-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (24 commits) cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs cpufreq: Add Rust-based cpufreq-dt driver rust: opp: Extend OPP abstractions with cpufreq support rust: cpufreq: Extend abstractions for driver registration rust: cpufreq: Extend abstractions for policy and driver ops rust: cpufreq: Add initial abstractions for cpufreq framework rust: opp: Add abstractions for the configuration options rust: opp: Add abstractions for the OPP table rust: opp: Add initial abstractions for OPP framework rust: cpu: Add from_cpu() rust: macros: enable use of hyphens in module names rust: clk: Add initial abstractions rust: clk: Add helpers for Rust code MAINTAINERS: Add entry for Rust cpumask API rust: cpumask: Add initial abstractions rust: cpumask: Add few more helpers rust: devres: require a bound device rust: pci: move iomap_region() to impl Device rust: device: implement Bound device context rust: pci: preserve device context in AsRef ... commit 922607a2b462b813c4b461feca04aed0c97d4cfe Author: Lifeng Zheng Date: Wed May 7 11:19:41 2025 +0800 cpufreq: CPPC: Add support for autonomous selection Add sysfs interfaces for CPPC autonomous selection in the cppc_cpufreq driver. Signed-off-by: Lifeng Zheng Reviewed-by: Sumit Gupta Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250507031941.2812701-1-zhenglifeng1@huawei.com [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 9172dbf3a6d30fb80aa2f550003961450bb4c0bb Author: Ming Lei Date: Wed May 21 10:54:59 2025 +0800 ublk: handle ublk_set_auto_buf_reg() failure correctly in ublk_fetch() If ublk_set_auto_buf_reg() fails, we need to unlock and return, otherwise `ub->mutex` is leaked. Fixes: 99c1e4eb6a3f ("ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG") Reported-by: Caleb Sander Mateos Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250521025502.71041-2-ming.lei@redhat.com Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 1da98dc52b948a6063415d8bae0c60ef89044a8c Author: Bowen Yu Date: Mon May 19 15:09:38 2025 +0800 cpufreq: Update sscanf() to kstrtouint() In store_scaling_setspeed(), sscanf is still used to read to sysfs. Newer kstrtox provide more features including overflow protection, better errorhandling and allows for other systems of numeration. It is therefore better to update sscanf() to kstrtouint(). Signed-off-by: Bowen Yu Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250519070938.931396-1-yubowen8@huawei.com Signed-off-by: Rafael J. Wysocki commit 9c5075fc9d322670d4a82881bf41922a90fe423a Author: Bowen Yu Date: Mon May 19 15:09:08 2025 +0800 cpufreq: Replace magic number Setting the length of str_governor with a magic number could cause overflow when max length increases, it is better to use the defined macro in this case. Signed-off-by: Bowen Yu Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250519070908.930879-1-yubowen8@huawei.com Signed-off-by: Rafael J. Wysocki commit c597ce56e9078c6fc27e44470e4c699bac2d3027 Author: Daniel Dadap Date: Wed May 21 09:38:36 2025 -0500 ALSA: hda/tegra: Switch to two-argument strscpy() strscpy() is used in this driver with char[] struct member destinations, so it is possible to use the simplified two-argument variant which was added by commit e6584c3964f2 ("string: Allow 2-argument strscpy()"). Signed-off-by: Daniel Dadap Link: https://patch.msgid.link/aC3lbOTYxWvYR9dl@ddadap-lakeline.nvidia.com Signed-off-by: Takashi Iwai commit 4b214c9bbe26b2d86fd20a5548ac3733fcf36f21 Author: Daniel Dadap Date: Wed May 21 09:35:29 2025 -0500 ALSA: hda - Add new driver for HDA controllers listed via ACPI Some systems expose HD-Audio controllers via objects in the ACPI tables which encapsulate the controller's interrupt and the base address for the HDA registers in an ACPI _CRS object, for example, as listed in this ACPI table dump excerpt: Device (HDA0) { Name (_HID, "NVDA2014") // _HID: Hardware ID ... Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { Memory32Fixed (ReadWrite, 0x36078000, // Address Base 0x00008000, // Address Length ) Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) { 0x0000021E, } }) } Add support for HDA controllers discovered through ACPI, including support for some platforms which expose such HDA controllers on NVIDIA SoCs. This is done with a new driver which uses existing infrastructure for extracting resource information from _CRS objects and plumbs the parsed resource information through to the existing HDA infrastructure to enable HD-Audio functionality on such devices. Although this driver is in the sound/pci/hda/ directory, it targets devices which are not actually enumerated on the PCI bus. This is because it depends upon the Intel "Azalia" infrastructure which has traditionally been usedvfor PCI-based devices. Signed-off-by: Daniel Dadap Link: https://patch.msgid.link/aC3ksXJUM9DlKiz6@ddadap-lakeline.nvidia.com Signed-off-by: Takashi Iwai commit 4e4dc6db2b92bced802bdc19c8ef46a1821151be Author: Jakub Kicinski Date: Tue May 20 09:19:16 2025 -0700 tools: ynl: add a sample for TC Add a very simple TC dump sample with decoding of fq_codel attrs: # ./tools/net/ynl/samples/tc dummy0: fq_codel limit: 10240p target: 5ms new_flow_cnt: 0 proving that selector passing (for stats) works. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-13-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 33baf6f73a7ce7ca6a05f9ac2c0758f34f04a423 Author: Jakub Kicinski Date: Tue May 20 09:19:15 2025 -0700 netlink: specs: tc: add qdisc dump to TC spec Hook TC qdisc dump in the TC qdisc get, it only supported doit until now and dumping will be used by the sample code. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-12-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e06c9d25159c0b12518c68ffe3e400d49d5284e0 Author: Jakub Kicinski Date: Tue May 20 09:19:14 2025 -0700 tools: ynl: enable codegen for TC We are ready to support most of TC. Enable C code gen. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-11-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4e9806a8f49463074f9a5797c34e0740f4602910 Author: Jakub Kicinski Date: Tue May 20 09:19:13 2025 -0700 tools: ynl-gen: support weird sub-message formats TC uses all possible sub-message formats: - nested attrs - fixed headers + nested attrs - fixed headers - empty Nested attrs are already supported for rt-link. Add support for remaining 3. The empty and fixed headers ones are fairly trivial, we can fake a Binary or Flags type instead of a Nest. For fixed headers + nest we need to teach nest parsing and nest put to handle fixed headers. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 092b34b937353eaa6164ceb1f520b1f640aee54f Author: Jakub Kicinski Date: Tue May 20 09:19:12 2025 -0700 tools: ynl-gen: support local attrs in _multi_parse The _multi_parse() helper calls the _attr_get() method of each attr, but it only respects what code the helper wants to emit, not what local variables it needs. Local variables will soon be needed, support them. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a66a170b68af0d588f4eadb9e5813c4edefe24f5 Author: Jakub Kicinski Date: Tue May 20 09:19:11 2025 -0700 tools: ynl-gen: move fixed header info from RenderInfo to Struct RenderInfo describes a request-response exchange. Struct describes a parsed attribute set. For ease of parsing sub-messages with fixed headers move fixed header info from RenderInfo to Struct. No functional changes. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cb39645d9a6a8b84f2e820db7c2b49ebd4b18b2c Author: Jakub Kicinski Date: Tue May 20 09:19:10 2025 -0700 tools: ynl-gen: support passing selector to a nest In rtnetlink all submessages had the selector at the same level of nesting as the submessage. We could refer to the relevant attribute from the current struct. In TC, stats are one level of nesting deeper than "kind". Teach the code-gen about structs which need to be passed a selector by the caller for parsing. Because structs are "topologically sorted" one pass of propagating the selectors down is enough. For generating netlink message we depend on the presence bits so no selector passing needed there. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ba5a199b2401de3d5df1fba4d5dcd92908461a07 Author: Jakub Kicinski Date: Tue May 20 09:19:09 2025 -0700 netlink: specs: tc: drop the family name prefix from attrs All attribute sets and messages are prefixed with tc-. The C codegen also adds the family name to all structs. We end up with names like struct tc_tc_act_attrs. Remove the tc- prefixes to shorten the names. This should not impact Python as the attr set names are never exposed to user, they are only used to refer to things internally, in the encoder / decoder. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f9aec8025ab5fc440fcc56f31298750d9b039acc Author: Jakub Kicinski Date: Tue May 20 09:19:08 2025 -0700 netlink: specs: tc: add C naming info Add naming info needed by C code gen. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit eb1f803f9851e1bf40924a06c1db349540290bac Author: Jakub Kicinski Date: Tue May 20 09:19:07 2025 -0700 netlink: specs: tc: use tc-gact instead of tc-gen as struct name There is a define in the uAPI header called tc_gen which expands to the "generic" TC action fields. This helps other actions include the base fields without having to deal with nested structs. A couple of actions (sample, gact) do not define extra fields, so the spec used a common tc-gen struct for both of them. Unfortunately this struct does not exist in C. Let's use gact's (generic act's) struct for basic actions. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e9033a846eb9a8ca21dee880b9ac2f5988ceb5f0 Author: Jakub Kicinski Date: Tue May 20 09:19:06 2025 -0700 netlink: specs: tc: remove duplicate nests tc-act-stats-attrs and tca-stats-attrs are almost identical. The only difference is that the latter has sub-message decoding for app, rather than declaring it as a binary attr. tc-act-police-attrs and tc-police-attrs are identical but for the TODO annotations. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250520161916.413298-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8b8762eeec59b959fbca60afffe21265bce67168 Author: Jakub Kicinski Date: Tue May 20 09:19:05 2025 -0700 tools: ynl-gen: add makefile deps for neigh Kory is reporting build issues after recent additions to YNL if the system headers are old. Link: https://lore.kernel.org/20250519164949.597d6e92@kmaincent-XPS-13-7390 Reported-by: Kory Maincent Fixes: 0939a418b3b0 ("tools: ynl: submsg: reverse parse / error reporting") Tested-by: Kory Maincent Link: https://patch.msgid.link/20250520161916.413298-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4e7bca76e3fed58437dcd7f747d1c8d98507379e Author: Hans Zhang Date: Sat May 17 00:52:22 2025 +0800 PCI/MSI: Use bool for MSI enable state tracking Convert pci_msi_enable and pci_msi_enabled() to use bool type for clarity. No functional changes, only code cleanup. Signed-off-by: Hans Zhang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250516165223.125083-2-18255117159@163.com commit 0589aff47314c06b61df112139d36940ac3951ca Author: Ian Rogers Date: Mon May 19 12:51:40 2025 -0700 perf python: Add evsel cpus and threads functions Allow access to cpus and thread_map structs associated with an evsel. Signed-off-by: Ian Rogers Acked-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250519195148.1708988-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3ee2255c4fc2b7d424d5f5c744364189b659f123 Author: Ian Rogers Date: Mon May 19 12:51:39 2025 -0700 libperf threadmap: Add perf_thread_map__idx() Allow computation of thread map index from a PID. Note, with a 'struct perf_cpu_map' the sorted nature allows for a binary search to compute the index which isn't currently possible with a 'struct perf_thread_map' as they aren't guaranteed sorted. Signed-off-by: Ian Rogers Acked-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250519195148.1708988-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit eead8a0114775c7250ae27197ac3f3e5bbc567df Author: Ian Rogers Date: Mon May 19 12:51:38 2025 -0700 libperf threadmap: Don't segv for index 0 for the NULL 'struct perf_thread_map' pointer perf_thread_map__nr() returns length 1 if the perf_thread_map is NULL, meaning index 0 is valid. When perf_thread_map__pid() of index 0 is read then return the expected "any" -1 value. Assert this is only done for index 0. Signed-off-by: Ian Rogers Acked-by: Gautam Menghani Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Howard Chu Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250519195148.1708988-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 21fb366b2f45761125230e89a73c0fe29d55d9cf Author: Ravi Bangoria Date: Tue May 20 05:32:48 2025 +0000 perf test amd: Skip amd-ibs-period test on kernel < v6.15 Bunch of IBS kernel fixes went in v6.15-rc1 [1]. The amd-ibs-period test will fail without those kernel patches. Skip the test on system running kernel older than v6.15 to distinguish genuine new failures vs known failure due to old kernel. Since all the related IBS fixes went in -rc1 itself, the ">= 6.15" check will work for any custom compiled v6.15-* kernel as well. Reported-by: Arnaldo Carvalho de Melo Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Ravi Bangoria Closes: https://lore.kernel.org/r/aCfuGXUnNIbnYo_r@x1 Link: https://lore.kernel.org/r/20250115054438.1021-1-ravi.bangoria@amd.com [1] Signed-off-by: Arnaldo Carvalho de Melo commit 8f454c95817d15ee529d58389612ea4b34f5ffb3 Author: Ian Rogers Date: Mon May 19 15:46:45 2025 -0700 perf thread: Ensure comm_lock held for comm_list Add thread safety annotations for comm_list and add locking for two instances where the list is accessed without the lock held (in contradiction to ____thread__set_comm()). Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Bill Wendling Cc: Chaitanya S Prakash Cc: Fei Lang Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephen Brennan Link: https://lore.kernel.org/r/20250519224645.1810891-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6fe064491bd3433ce42b04d5b933eb368c48271e Author: Ian Rogers Date: Mon May 19 15:46:44 2025 -0700 perf rwsem: Add clang's -Wthread-safety annotations Add annotations used by clang's -Wthread-safety. Fix dsos compilation errors caused by a lock of annotations. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Bill Wendling Cc: Chaitanya S Prakash Cc: Fei Lang Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephen Brennan Link: https://lore.kernel.org/r/20250519224645.1810891-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ab2c742d75ac2f52f0172907bfbc898475f75273 Author: Ian Rogers Date: Mon May 19 15:46:43 2025 -0700 perf dso: Minor refactor to allow clang's Wthread-safety analysis The pattern: ``` if (x) { lock(...) } block1; if (x) { unlock(...) } ``` defeats clang's -Wthread-safety analysis where it complains of locks held on one path and not another. Add helper functions for "block1" then restructure as: ``` if (x) { lock(...); block1(); unlock(...); } else { block1(); } ``` Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Bill Wendling Cc: Chaitanya S Prakash Cc: Fei Lang Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephen Brennan Link: https://lore.kernel.org/r/20250519224645.1810891-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0f529570ecaf99244dc86b8af13618f0d07b0e44 Author: Gabor Juhos Date: Tue May 20 21:08:56 2025 +0200 spi: spi-qpic-snand: remove superfluous parameters of qcom_spi_check_error() The qcom_spi_check_error() function determines the errors of a previous page read operation solely by using the cached register values in the register read buffer. The data pointed by the 'data_buf' and the 'oob_buf' parameters are not used for that at all. Remove the superfluous parameters of the function along with the related local variables to simplify the code. Also, remove the variables from the caller functions which became unused due to the change. Note: Althought the similar parse_read_errors() function in the 'qcom_nand' driver has the same parameters, but that function passes down the pointers to check_for_erased_page() at the end of the function. It is not clear, that a similar call is missing here, or the superfluous parameters are simply leftovers of the development process. Nevertheless, if additional code is needed, the parameters can be added back later. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250520-qpic-snand-superfluous-params-v1-1-86dd4963e90f@gmail.com Signed-off-by: Mark Brown commit 477d16c0919e82a7f5f673a6e3ae39a17c773037 Author: Faraz Ata Date: Wed May 21 14:13:24 2025 +0530 dt-bindings: spi: samsung: add exynosautov920-spi compatible Add "samsung,exynosautov920-spi" dedicated compatible for SPI found in ExynosAutov920 SoC. Signed-off-by: Faraz Ata Link: https://patch.msgid.link/20250521084324.2759530-1-faraz.ata@samsung.com Signed-off-by: Mark Brown commit 4026c6b51cb9ffd1eea2206191552f8aa3cb55ea Author: Gabor Juhos Date: Wed May 14 12:16:38 2025 +0200 spi: spi-qpic-snand: reuse qcom_spi_check_raw_flash_errors() The qcom_spi_check_raw_flash_errors() function can be used to verify the flash status after raw operations. Move the function slightly up in the code and change the qcom_spi_read_last_cw() function to call it instead of using an open coded implementation of the same check. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250514-qpic-snand-error-check-v1-1-c0ebd3aae72a@gmail.com Signed-off-by: Mark Brown commit c164679bed3a5f0d235723c2395d9a5122b151c4 Author: Ilya Leoshkevich Date: Thu May 15 17:52:13 2025 +0200 scripts/gdb/symbols: determine KASLR offset on s390 during early boot Using lx-symbols during s390 early boot fails with: Error occurred in Python: 'utf-8' codec can't decode byte 0xcb in position 0: invalid continuation byte The reason is that s390 decompressor's startup_kernel() does not create vmcoreinfo note, and sets vmcore_info to kernel's physical base. This confuses get_vmcore_s390(). Fix by handling this special case. Extract vm_layout.kaslr_offset from the kernel image in physical memory, which is placed there by the decompressor using the __bootdata_preserved mechanism, and generate a synthetic vmcoreinfo note from it. Link: https://lkml.kernel.org/r/20250515155811.114392-4-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Jan Kiszka Cc: Kieran Bingham Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit e97c4a27cb9c4c06fdc6d0760d7ea031c98b58a5 Author: Ilya Leoshkevich Date: Thu May 15 17:52:12 2025 +0200 scripts/gdb/symbols: factor out pagination_off() Move the code that turns off pagination into a separate function. It will be useful later in order to prevent hangs when loading symbols for kernel image in physical memory during s390 early boot. Link: https://lkml.kernel.org/r/20250515155811.114392-3-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Jan Kiszka Cc: Kieran Bingham Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 3545414f2590177a76f86c985130dc4824d3adc9 Author: Ilya Leoshkevich Date: Thu May 15 17:52:11 2025 +0200 scripts/gdb/symbols: factor out get_vmlinux() Patch series "scripts/gdb/symbols: determine KASLR offset on s390 during early boot". I noticed that debugging s390 early boot using the support I introduced in commit 28939c3e9925 ("scripts/gdb/symbols: determine KASLR offset on s390") does not work. The reason is that decompressor does not provide the vmcoreinfo note, so KASLR offset needs to be extracted in a different way, which this series implements. Patches 1-2 are trivial refactorings, and patch 3 is the implementation. This patch (of 3): Move the code that determines the current vmlinux file into a separate function. It will be useful later in order to analyze the kernel image in physical memory during s390 early boot. Link: https://lkml.kernel.org/r/20250515155811.114392-1-iii@linux.ibm.com Link: https://lkml.kernel.org/r/20250515155811.114392-2-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Jan Kiszka Cc: Kieran Bingham Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 85915c6cabf74d1f693fd09d95c25d838b82c840 Author: Sravan Kumar Gundu Date: Fri May 16 17:40:31 2025 +0000 kernel/panic.c: format kernel-doc comments kernel-doc function comment don't follows documentation commenting style misinterpreting arguments description with function description. Please see latest docs generated before applying this patch https://docs.kernel.org/driver-api/basics.html#c.panic Link: https://lkml.kernel.org/r/20250516174031.2937-1-sravankumarlpu@gmail.com Signed-off-by: Sravan Kumar Gundu Cc: Greg Kroah-Hartman Cc: Jani Nikula Cc: John Ogness Cc: Petr Mladek Cc: Shuah Khan Signed-off-by: Andrew Morton commit f68b5d165c906d11948c78e5d4b55a3e0975bba4 Author: Casey Connolly Date: Sat May 17 23:32:38 2025 +0100 mailmap: update and consolidate Casey Connolly's name and email I've used several email addresses and a previous name to contribute. Consolidate all of these to my primary email and update my name. Link: https://lkml.kernel.org/r/20250517223237.15647-2-casey.connolly@linaro.org Signed-off-by: Casey Connolly Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton commit 84e437640ba43259c81048ded6adb5357a844360 Author: Christoph Hellwig Date: Fri May 16 21:31:13 2025 +0900 nilfs2: remove wbc->for_reclaim handling Since commit 013a07052a1a ("nilfs2: convert metadata aops from writepage to writepages"), nilfs_mdt_write_folio can't be called from reclaim context any more. Remove the code keyed of the wbc->for_reclaim flag, which is now only set for writing out swap or shmem pages inside the swap code, but never passed to file systems. Link: https://lkml.kernel.org/r/20250508054938.15894-7-hch@lst.de Link: https://lkml.kernel.org/r/20250516123417.6779-1-konishi.ryusuke@gmail.com Signed-off-by: Christoph Hellwig Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 8e02b1b7fcffcde7cc7d7749513ac1b0fbbfcf0a Author: Linus Walleij Date: Fri May 9 09:25:09 2025 +0200 fork: define a local GFP_VMAP_STACK The current allocation of VMAP stack memory is using (THREADINFO_GFP & ~__GFP_ACCOUNT) which is a complicated way of saying (GFP_KERNEL | __GFP_ZERO): : define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_ZERO) : define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) This is an unfortunate side-effect of independent changes blurring the picture: commit 19809c2da28aee5860ad9a2eff760730a0710df0 changed (THREADINFO_GFP | __GFP_HIGHMEM) to just THREADINFO_GFP since highmem became implicit. commit 9b6f7e163cd0f468d1b9696b785659d3c27c8667 then added stack caching and rewrote the allocation to (THREADINFO_GFP & ~__GFP_ACCOUNT) as cached stacks need to be accounted separately. However that code, when it eventually accounts the memory does this: ret = memcg_kmem_charge(vm->pages[i], GFP_KERNEL, 0) so the memory is charged as a GFP_KERNEL allocation. Define a unique GFP_VMAP_STACK to use GFP_KERNEL | __GFP_ZERO and move the comment there. Link: https://lkml.kernel.org/r/20250509-gfp-stack-v1-1-82f6f7efc210@linaro.org Signed-off-by: Linus Walleij Reported-by: Mateusz Guzik Cc: Pasha Tatashin Signed-off-by: Andrew Morton commit d82893c52a64dd5698362ba1d7cb232a18839c87 Author: Pasha Tatashin Date: Fri May 9 08:29:28 2025 +0200 fork: check charging success before zeroing stack No need to do zero cached stack if memcg charge fails, so move the charging attempt before the memset operation. [linus.walleij@linaro.org: rebased] Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-3-e6c69dd356f2@linaro.org Signed-off-by: Pasha Tatashin Link: https://lore.kernel.org/20240311164638.2015063-6-pasha.tatashin@soleen.com Signed-off-by: Linus Walleij Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton commit 90eb270d8eb46c2d54a13b938643fbc9cf56eaea Author: Pasha Tatashin Date: Fri May 9 08:29:27 2025 +0200 fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code There are two data types: "struct vm_struct" and "struct vm_stack" that have the same local variable names: vm_stack, or vm, or s, which makes the code confusing to read. Change the code so the naming is consistent: struct vm_struct is always called vm_area struct vm_stack is always called vm_stack One change altering vfree(vm_stack) to vfree(vm_area->addr) may look like a semantic change but it is not: vm_area->addr points to the vm_stack. This was done to improve readability. [linus.walleij@linaro.org: rebased and added new users of the variable names, address review comments] Link: https://lore.kernel.org/20240311164638.2015063-4-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-2-e6c69dd356f2@linaro.org Signed-off-by: Pasha Tatashin Signed-off-by: Linus Walleij Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton commit 85e1f758b6d770c9d9a7c7de4937e2eb2c200aea Author: Pasha Tatashin Date: Fri May 9 08:29:26 2025 +0200 fork: clean-up ifdef logic around stack allocation Patch series "fork: Page operation cleanups in the fork code", v3. This patchset consists of outtakes from a 1 year+ old patchset from Pasha, which all stand on their own. See: https://lore.kernel.org/all/20240311164638.2015063-1-pasha.tatashin@soleen.com/ These are good cleanups for readability so I split these off, rebased on v6.15-rc1, addressed review comments and send them separately. All mentions of dynamic stack are removed from the patchset as we have no idea whether that will go anywhere. This patch (of 3): There is unneeded OR in the ifdef functions that are used to allocate and free kernel stacks based on direct map or vmap. Therefore, clean up by changing the order so OR is no longer needed. [linus.walleij@linaro.org: rebased] Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-1-e6c69dd356f2@linaro.org Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-0-e6c69dd356f2@linaro.org Signed-off-by: Pasha Tatashin Link: https://lore.kernel.org/20240311164638.2015063-3-pasha.tatashin@soleen.com Signed-off-by: Linus Walleij Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton commit 2536c5c7d6ae5e1d844aa21f28b326b5e7f815ef Author: Max Kellermann Date: Sun May 4 20:08:31 2025 +0200 kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count Expose a simple counter to userspace for monitoring tools. Link: https://lkml.kernel.org/r/20250504180831.4190860-3-max.kellermann@ionos.com Signed-off-by: Max Kellermann Cc: Core Minyard Cc: Doug Anderson Cc: Joel Granados Cc: Kees Cook Cc: Song Liu Signed-off-by: Andrew Morton commit aaf05e96e93cb9c8fc8d35fc4525715530397655 Author: Max Kellermann Date: Sun May 4 20:08:30 2025 +0200 kernel/watchdog: add /sys/kernel/{hard,soft}lockup_count Patch series "sysfs: add counters for lockups and stalls", v2. Commits 9db89b411170 ("exit: Expose "oops_count" to sysfs") and 8b05aa263361 ("panic: Expose "warn_count" to sysfs") added counters for oopses and warnings to sysfs, and these two patches do the same for hard/soft lockups and RCU stalls. All of these counters are useful for monitoring tools to detect whether the machine is healthy. If the kernel has experienced a lockup or a stall, it's probably due to a kernel bug, and I'd like to detect that quickly and easily. There is currently no way to detect that, other than parsing dmesg. Or observing indirect effects: such as certain tasks not responding, but then I need to observe all tasks, and it may take a while until these effects become visible/measurable. I'd rather be able to detect the primary cause more quickly, possibly before everything falls apart. This patch (of 2): There is /proc/sys/kernel/hung_task_detect_count, /sys/kernel/warn_count and /sys/kernel/oops_count but there is no userspace-accessible counter for hard/soft lockups. Having this is useful for monitoring tools. Link: https://lkml.kernel.org/r/20250504180831.4190860-1-max.kellermann@ionos.com Link: https://lkml.kernel.org/r/20250504180831.4190860-2-max.kellermann@ionos.com Signed-off-by: Max Kellermann Cc: Cc: Core Minyard Cc: Doug Anderson Cc: Joel Granados Cc: Song Liu Cc: Kees Cook Signed-off-by: Andrew Morton commit cc66e4863ac3a00c709bfcbec685d48c184172b5 Author: Coiby Xu Date: Fri May 2 09:12:42 2025 +0800 x86/crash: make the page that stores the dm crypt keys inaccessible This adds an addition layer of protection for the saved copy of dm crypt key. Trying to access the saved copy will cause page fault. Link: https://lkml.kernel.org/r/20250502011246.99238-9-coxu@redhat.com Signed-off-by: Coiby Xu Suggested-by: Pingfan Liu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 5eb3f60554216b02e9c0f18356709ee4befe72e7 Author: Coiby Xu Date: Fri May 2 09:12:41 2025 +0800 x86/crash: pass dm crypt keys to kdump kernel 1st kernel will build up the kernel command parameter dmcryptkeys as similar to elfcorehdr to pass the memory address of the stored info of dm crypt key to kdump kernel. Link: https://lkml.kernel.org/r/20250502011246.99238-8-coxu@redhat.com Signed-off-by: Coiby Xu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit e1e6cd01d93359e22be84a23c8bb24ee4e04e142 Author: Coiby Xu Date: Fri May 2 09:12:40 2025 +0800 Revert "x86/mm: Remove unused __set_memory_prot()" This reverts commit 693bbf2a50447353c6a47961e6a7240a823ace02 as kdump LUKS support (CONFIG_CRASH_DM_CRYPT) depends on __set_memory_prot. [akpm@linux-foundation.org: x86 set_memory.h needs pgtable_types.h] Link: https://lkml.kernel.org/r/20250502011246.99238-7-coxu@redhat.com Signed-off-by: Coiby Xu Cc: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 62f17d9df6924cf805de5ae970470615c1c8d9f2 Author: Coiby Xu Date: Fri May 2 09:12:39 2025 +0800 crash_dump: retrieve dm crypt keys in kdump kernel Crash kernel will retrieve the dm crypt keys based on the dmcryptkeys command line parameter. When user space writes the key description to /sys/kernel/config/crash_dm_crypt_key/restore, the crash kernel will save the encryption keys to the user keyring. Then user space e.g. cryptsetup's --volume-key-keyring API can use it to unlock the encrypted device. Link: https://lkml.kernel.org/r/20250502011246.99238-6-coxu@redhat.com Signed-off-by: Coiby Xu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 9ebfa8dcaea77a8ef02d0f9478717a138b0ad828 Author: Coiby Xu Date: Fri May 2 09:12:38 2025 +0800 crash_dump: reuse saved dm crypt keys for CPU/memory hot-plugging When there are CPU and memory hot un/plugs, the dm crypt keys may need to be reloaded again depending on the solution for crash hotplug support. Currently, there are two solutions. One is to utilizes udev to instruct user space to reload the kdump kernel image and initrd, elfcorehdr and etc again. The other is to only update the elfcorehdr segment introduced in commit 247262756121 ("crash: add generic infrastructure for crash hotplug support"). For the 1st solution, the dm crypt keys need to be reloaded again. The user space can write true to /sys/kernel/config/crash_dm_crypt_key/reuse so the stored keys can be re-used. For the 2nd solution, the dm crypt keys don't need to be reloaded. Currently, only x86 supports the 2nd solution. If the 2nd solution gets extended to all arches, this patch can be dropped. Link: https://lkml.kernel.org/r/20250502011246.99238-5-coxu@redhat.com Signed-off-by: Coiby Xu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 479e58549b0fa7e80f1e0b9e69e0a2a8e6711132 Author: Coiby Xu Date: Fri May 2 09:12:37 2025 +0800 crash_dump: store dm crypt keys in kdump reserved memory When the kdump kernel image and initrd are loaded, the dm crypts keys will be read from keyring and then stored in kdump reserved memory. Assume a key won't exceed 256 bytes thus MAX_KEY_SIZE=256 according to "cryptsetup benchmark". Link: https://lkml.kernel.org/r/20250502011246.99238-4-coxu@redhat.com Signed-off-by: Coiby Xu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 180cf31af7c313790f1e0fba1c7aa42512144dd5 Author: Coiby Xu Date: Fri May 2 09:12:36 2025 +0800 crash_dump: make dm crypt keys persist for the kdump kernel A configfs /sys/kernel/config/crash_dm_crypt_keys is provided for user space to make the dm crypt keys persist for the kdump kernel. Take the case of dumping to a LUKS-encrypted target as an example, here is the life cycle of the kdump copies of LUKS volume keys, 1. After the 1st kernel loads the initramfs during boot, systemd uses an user-input passphrase to de-crypt the LUKS volume keys or simply TPM-sealed volume keys and then save the volume keys to specified keyring (using the --link-vk-to-keyring API) and the keys will expire within specified time. 2. A user space tool (kdump initramfs loader like kdump-utils) create key items inside /sys/kernel/config/crash_dm_crypt_keys to inform the 1st kernel which keys are needed. 3. When the kdump initramfs is loaded by the kexec_file_load syscall, the 1st kernel will iterate created key items, save the keys to kdump reserved memory. 4. When the 1st kernel crashes and the kdump initramfs is booted, the kdump initramfs asks the kdump kernel to create a user key using the key stored in kdump reserved memory by writing yes to /sys/kernel/crash_dm_crypt_keys/restore. Then the LUKS encrypted device is unlocked with libcryptsetup's --volume-key-keyring API. 5. The system gets rebooted to the 1st kernel after dumping vmcore to the LUKS encrypted device is finished Eventually the keys have to stay in the kdump reserved memory for the kdump kernel to unlock encrypted volumes. During this process, some measures like letting the keys expire within specified time are desirable to reduce security risk. This patch assumes, 1) there are 128 LUKS devices at maximum to be unlocked thus MAX_KEY_NUM=128. 2) a key description won't exceed 128 bytes thus KEY_DESC_MAX_LEN=128. And here is a demo on how to interact with /sys/kernel/config/crash_dm_crypt_keys, # Add key #1 mkdir /sys/kernel/config/crash_dm_crypt_keys/7d26b7b4-e342-4d2d-b660-7426b0996720 # Add key #1's description echo cryptsetup:7d26b7b4-e342-4d2d-b660-7426b0996720 > /sys/kernel/config/crash_dm_crypt_keys/description # how many keys do we have now? cat /sys/kernel/config/crash_dm_crypt_keys/count 1 # Add key# 2 in the same way # how many keys do we have now? cat /sys/kernel/config/crash_dm_crypt_keys/count 2 # the tree structure of /crash_dm_crypt_keys configfs tree /sys/kernel/config/crash_dm_crypt_keys/ /sys/kernel/config/crash_dm_crypt_keys/ ├── 7d26b7b4-e342-4d2d-b660-7426b0996720 │   └── description ├── count ├── fce2cd38-4d59-4317-8ce2-1fd24d52c46a │   └── description Link: https://lkml.kernel.org/r/20250502011246.99238-3-coxu@redhat.com Signed-off-by: Coiby Xu Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Jan Pazdziora Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit bf454ec31add6790f6cdc88328e38901fcbbade6 Author: Coiby Xu Date: Fri May 2 09:12:35 2025 +0800 kexec_file: allow to place kexec_buf randomly Patch series "Support kdump with LUKS encryption by reusing LUKS volume keys", v9. LUKS is the standard for Linux disk encryption, widely adopted by users, and in some cases, such as Confidential VMs, it is a requirement. With kdump enabled, when the first kernel crashes, the system can boot into the kdump/crash kernel to dump the memory image (i.e., /proc/vmcore) to a specified target. However, there are two challenges when dumping vmcore to a LUKS-encrypted device: - Kdump kernel may not be able to decrypt the LUKS partition. For some machines, a system administrator may not have a chance to enter the password to decrypt the device in kdump initramfs after the 1st kernel crashes; For cloud confidential VMs, depending on the policy the kdump kernel may not be able to unseal the keys with TPM and the console virtual keyboard is untrusted. - LUKS2 by default use the memory-hard Argon2 key derivation function which is quite memory-consuming compared to the limited memory reserved for kdump. Take Fedora example, by default, only 256M is reserved for systems having memory between 4G-64G. With LUKS enabled, ~1300M needs to be reserved for kdump. Note if the memory reserved for kdump can't be used by 1st kernel i.e. an user sees ~1300M memory missing in the 1st kernel. Besides users (at least for Fedora) usually expect kdump to work out of the box i.e. no manual password input or custom crashkernel value is needed. And it doesn't make sense to derivate the keys again in kdump kernel which seems to be redundant work. This patchset addresses the above issues by making the LUKS volume keys persistent for kdump kernel with the help of cryptsetup's new APIs (--link-vk-to-keyring/--volume-key-keyring). Here is the life cycle of the kdump copies of LUKS volume keys, 1. After the 1st kernel loads the initramfs during boot, systemd use an user-input passphrase to de-crypt the LUKS volume keys or TPM-sealed key and then save the volume keys to specified keyring (using the --link-vk-to-keyring API) and the key will expire within specified time. 2. A user space tool (kdump initramfs loader like kdump-utils) create key items inside /sys/kernel/config/crash_dm_crypt_keys to inform the 1st kernel which keys are needed. 3. When the kdump initramfs is loaded by the kexec_file_load syscall, the 1st kernel will iterate created key items, save the keys to kdump reserved memory. 4. When the 1st kernel crashes and the kdump initramfs is booted, the kdump initramfs asks the kdump kernel to create a user key using the key stored in kdump reserved memory by writing yes to /sys/kernel/crash_dm_crypt_keys/restore. Then the LUKS encrypted device is unlocked with libcryptsetup's --volume-key-keyring API. 5. The system gets rebooted to the 1st kernel after dumping vmcore to the LUKS encrypted device is finished After libcryptsetup saving the LUKS volume keys to specified keyring, whoever takes this should be responsible for the safety of these copies of keys. The keys will be saved in the memory area exclusively reserved for kdump where even the 1st kernel has no direct access. And further more, two additional protections are added, - save the copy randomly in kdump reserved memory as suggested by Jan - clear the _PAGE_PRESENT flag of the page that stores the copy as suggested by Pingfan This patchset only supports x86. There will be patches to support other architectures once this patch set gets merged. This patch (of 9): Currently, kexec_buf is placed in order which means for the same machine, the info in the kexec_buf is always located at the same position each time the machine is booted. This may cause a risk for sensitive information like LUKS volume key. Now struct kexec_buf has a new field random which indicates it's supposed to be placed in a random position. Note this feature is enabled only when CONFIG_CRASH_DUMP is enabled. So it only takes effect for kdump and won't impact kexec reboot. Link: https://lkml.kernel.org/r/20250502011246.99238-1-coxu@redhat.com Link: https://lkml.kernel.org/r/20250502011246.99238-2-coxu@redhat.com Signed-off-by: Coiby Xu Suggested-by: Jan Pazdziora Acked-by: Baoquan He Cc: "Daniel P. Berrange" Cc: Dave Hansen Cc: Dave Young Cc: Liu Pingfan Cc: Milan Broz Cc: Ondrej Kozina Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton commit 36adf6fe6cbe59a22f64c004b201685cb6f38c42 Author: Andrea Righi Date: Wed May 21 09:34:07 2025 +0200 selftests/sched_ext: Update test enq_select_cpu_fails With commit 08699d20467b6 ("sched_ext: idle: Consolidate default idle CPU selection kfuncs") allowing scx_bpf_select_cpu_dfl() to be invoked from multiple contexts, update the test to validate that the kfunc behaves correctly when used from ops.enqueue() and via BPF test_run. Additionally, rename the test to enq_select_cpu, dropping "fails" from the name, as the logic has now been inverted. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit a730e3f7a48bc591bfa838c5d922e5a80ea51738 Author: Andrea Righi Date: Wed May 21 09:34:06 2025 +0200 sched_ext: idle: Consolidate default idle CPU selection kfuncs There is no reason to restrict scx_bpf_select_cpu_dfl() invocations to ops.select_cpu() while allowing scx_bpf_select_cpu_and() to be used from multiple contexts, as both provide equivalent functionality, with the latter simply accepting an additional "allowed" cpumask. Therefore, unify the two APIs, enabling both kfuncs to be used from ops.select_cpu(), ops.enqueue(), and unlocked contexts (e.g., via BPF test_run). This allows schedulers to implement a consistent idle CPU selection policy and helps reduce code duplication. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 6333f2974ce9fbe9c51b964da285ede903492a05 Merge: 3fc5aea250af44 c8754c7deab4cb Author: Arnd Bergmann Date: Wed May 21 19:25:07 2025 +0200 Merge tag 'riscv-sophgo-soc-for-v6.16' of https://github.com/sophgo/linux into soc/drivers RISC-V SoC for v6.16 Sophgo: Add support for SG2044 TOP syscon device. The SG2044 TOP device provide PLL clock function in its area. Add RTC support for CV1800 series SoC. The device is called RTC, but contains control registers of other HW blocks in its address space, most notably of Power-on-Reset (PoR) module, DW8051 IP (MCU core), accompanying SRAM, hence putting it in SoC subsystem. Signed-off-by: Chen Wang * tag 'riscv-sophgo-soc-for-v6.16' of https://github.com/sophgo/linux: soc: sophgo: cv1800: rtcsys: New driver (handling RTC only) dt-bindings: soc: sophgo: add RTC support for Sophgo CV1800 series soc: sophgo: sg2044: Add support for SG2044 TOP syscon device Link: https://lore.kernel.org/r/MA0P287MB2262B041A26A0F5EAD1E296CFE91A@MA0P287MB2262.INDP287.PROD.OUTLOOK.COM Signed-off-by: Arnd Bergmann commit 3fc5aea250af440988bef5afd0138441103de5fa Merge: 5bba2c46756821 2c04e58e30ce85 Author: Arnd Bergmann Date: Wed May 21 19:23:43 2025 +0200 Merge tag 'qcom-drivers-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.16 Allow list QSEECOM for EFI variable services on on the Asus Zenbook A14, and block list TZMEM on the SM7150 platform to avoid issues with rmtfs. Extend the last-level cache (llcc) driver to support version 6 of the hardware and enable SM8750 support. Also add socinfo for the SM8750 platform. Re-enable UCSI support on SC8280XP, now that the reported crash has been dealt with, and filter the altmode notifications to avoid spurious hotplug events being propagated to user space. Add SM7150 support to pd-mapper. * tag 'qcom-drivers-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: llcc-qcom: Add support for SM8750 soc: qcom: llcc-qcom: Add support for LLCC V6 dt-bindings: cache: qcom,llcc: Document SM8750 LLCC block soc: qcom: socinfo: add SM8750 SoC ID dt-bindings: arm: qcom,ids: add SoC ID for SM8750 dt-bindings: soc: qcom: qcom,rpm: add missing clock/-names properties dt-bindings: soc: qcom,rpm: add missing clock-controller node soc: qcom: smem: Update max processor count firmware: qcom: tzmem: disable sm7150 platform soc: qcom: pd-mapper: Add support for SM7150 soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events soc: qcom: smp2p: Fix fallback to qcom,ipc parse soc: qcom: pmic_glink: enable UCSI on sc8280xp firmware: qcom: scm: Allow QSEECOM on Asus Zenbook A14 dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement Link: https://lore.kernel.org/r/20250513215656.44448-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 5bba2c46756821a207954450928e581c5908059e Merge: 382af529bec441 d47f1233374597 Author: Arnd Bergmann Date: Wed May 21 19:22:13 2025 +0200 Merge tag 'soc-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/drivers VT8500 (and FSL) SoC drivers for v6.16 1. VT8500: Add SCC socinfo/hwinfo driver. 2. Cleanup unused function in PowerPC Freescale QE driver to have W=1 builds warnings free. * tag 'soc-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: soc: fsl: qe: remove unused qe_ic_from_irq function ARM: vt8500: MAINTAINERS: Include vt8500 soc driver in maintainers entry soc: Add VIA/WonderMedia SoC identification driver dt-bindings: hwinfo: Add VIA/WonderMedia SoC identification Link: https://lore.kernel.org/r/20250513104216.25803-6-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 382af529bec441e6e965f8fe9fef0482ad5eee0b Merge: 50c77033bced32 87b480e04af458 Author: Arnd Bergmann Date: Wed May 21 19:21:24 2025 +0200 Merge tag 'amlogic-driver-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers Amlogic Driver for v6.16: - Amlogic clk measure memory usage optimization - Amlogic clk measure support for S4 & C3 Socs - Amlogic A4/A5 reset controller bindings * tag 'amlogic-driver-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller soc: amlogic: clk-measure: Add support for S4 soc: amlogic: clk-measure: Add support for C3 dt-bindings: soc: amlogic: S4 supports clk-measure dt-bindings: soc: amlogic: C3 supports clk-measure soc: amlogic: clk-measure: Define MSR_CLK's register offset separately soc: amlogic: clk-measure: Optimize the memory size of clk-measure Link: https://lore.kernel.org/r/04908842-4c55-44a0-b74c-3aca82a1f204@linaro.org Signed-off-by: Arnd Bergmann commit 93b07587bb256c45110dd339a304278175cc53f1 Author: Tudor Ambarus Date: Tue May 13 12:17:54 2025 +0200 arm64: defconfig: enable ACPM protocol and Exynos mailbox Enable the Samsung Exynos ACPM protocol and its transport layer, the Exynos mailbox driver. Samsung Exynos platforms implement ACPM to provide support for PMIC, clock frequency scaling, clock configuration and temperature sensors. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20250207-gs101-acpm-dt-v4-4-230ba8663a2d@linaro.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250513101754.23158-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit acda1d3a0ec754a08285c2faf6a00733f189636d Author: Andy Shevchenko Date: Tue May 13 12:10:25 2025 +0200 ARM: s3c: stop including gpio.h The driver does not use legacy GPIO API, stop including this header. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250331093650.4028999-1-andriy.shevchenko@linux.intel.com Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250513101023.21552-8-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 816a748bee7b3ae6d5052094d4027c75cc912264 Merge: 53c3712fd5c0c8 04e7638dd64af2 Author: Arnd Bergmann Date: Wed May 21 19:13:59 2025 +0200 Merge tag 'dt64-cleanup-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM64 DTS for v6.16 Two cleanups which were missed on mailing lists - align GPIO node names with DT bindings for Mediatek mt7622 and Nvidia Tegra210-p2894. * tag 'dt64-cleanup-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: tegra: tegra210-p2894: Align GPIO hog node name with preferred style arm64: dts: mediatek: mt7622: Align GPIO hog name with bindings Link: https://lore.kernel.org/r/20250513104216.25803-4-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 53c3712fd5c0c81212329833da50b7365c85b7db Merge: 709c8afa15066c f0911f29478992 Author: Arnd Bergmann Date: Wed May 21 19:12:38 2025 +0200 Merge tag 'amlogic-arm64-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT for v6.16: - Amlogic A4 Pinctrl support - UART RX/TX pull-up pinconf properties for all SoCs - SARADC support for the S905L SoC variant - Drop clock-latency in CPU node - Amlogic clk measure support for S4 & C3 Socs - Amlogic S6/S7/S7D initial support - I2C default pull-up bias pinconf property on Amlogic GXL based boards - Amlogic A4 & A5 Reset Controller support - New Boards: - Amlogic S6 BL209 Reference Board - Amlogic S7 BP201 Reference Board - Amlogic S7D BM202 Reference Board - Amlogic S805Y xiaomi-aquaman/Mi TV Stick * tag 'amlogic-arm64-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: (21 commits) arm64: dts: amlogic: Add A5 Reset Controller arm64: dts: amlogic: Add A4 Reset Controller arm64: dts: amlogic: add support for xiaomi-aquaman/Mi TV Stick dt-bindings: arm: amlogic: add S805Y and Mi TV Stick arm64: dts: amlogic: gxl: set i2c bias to pull-up arm64: dts: add support for S7D based Amlogic BM202 arm64: dts: add support for S7 based Amlogic BP201 arm64: dts: add support for S6 based Amlogic BL209 dt-bindings: arm: amlogic: add S7D support dt-bindings: arm: amlogic: add S7 support dt-bindings: arm: amlogic: add S6 support arm64: dts: amlogic: S4: Add clk-measure controller node arm64: dts: amlogic: C3: Add clk-measure controller node arm64: dts: amlogic: Drop redundant CPU "clock-latency" arm64: dts: amlogic: gxlx-s905l-p271: add saradc compatible arm64: dts: amlogic: a1: enable UART RX and TX pull up by default arm64: dts: amlogic: axg: enable UART RX and TX pull up by default arm64: dts: amlogic: g12: enable UART RX and TX pull up by default arm64: dts: amlogic: gxl: enable UART RX and TX pull up by default arm64: dts: amlogic: gxbb: enable UART RX and TX pull up by default ... Link: https://lore.kernel.org/r/5f7d3fa4-2d9d-450b-b384-abdd903284dc@linaro.org Signed-off-by: Arnd Bergmann commit 709c8afa15066c4fd65ae3da80851dbefc7ae597 Merge: e04381e7b74a66 2c1879a440315e Author: Arnd Bergmann Date: Wed May 21 19:09:46 2025 +0200 Merge tag 'amlogic-arm-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM DT for v6.16: - UART RX/TX pull-up pinconf properties for all SoCs - New Boards: - Meson8 TCU Fernsehfee 3.0 * tag 'amlogic-arm-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: amlogic: meson8-fernsehfee3: Describe regulators ARM: dts: amlogic: Add TCU Fernsehfee 3.0 dt-bindings: arm: amlogic: Add TCU Fernsehfee 3.0 board dt-bindings: vendor-prefixes: Add TC Unterhaltungselektronik AG ARM: dts: amlogic: meson8b: enable UART RX and TX pull up by default ARM: dts: amlogic: meson8: enable UART RX and TX pull up by default Link: https://lore.kernel.org/r/838c5305-5c5b-4232-b7fe-86598dc50ace@linaro.org Signed-off-by: Arnd Bergmann commit e04381e7b74a663694deab15801925a2852a69fd Merge: 87901f69400a25 aaf02428fdd50b Author: Arnd Bergmann Date: Wed May 21 19:08:29 2025 +0200 Merge tag 'samsung-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.16 1. Tesla FSD: Add Ethernet. 2. ExynosAutov920: Add more serial nodes, clock controllers for CPU cluster CL0, CL1 and CL2. 3. New Exynos7870 SoC with pretty decent coverage: pin controllers, clock controllers, I2C, MMC, serial and USB. New boards using Exynos7870: Samsung Galaxy J7 Prime, Samsung Galaxy A2 Core and Samsung Galaxy J6. 4. Google GS101: Add pmu-intr-gen syscon node for proper CPU hotplug. 5. Switch USI (serial engines) nodes to new samsung,mode constant coming with DT bindings v6.15-rc1. * tag 'samsung-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: gs101: add pmu-intr-gen syscon node arm64: dts: exynos: add initial support for Samsung Galaxy J6 arm64: dts: exynos: add initial support for Samsung Galaxy A2 Core arm64: dts: exynos: add initial support for Samsung Galaxy J7 Prime arm64: dts: exynos: add initial devicetree support for exynos7870 dt-bindings: arm: samsung: add compatibles for exynos7870 devices arm64: dts: exynosautov920: add cpucl1/2 clock DT nodes arm64: dts: exynosautov920: add cpucl0 clock DT nodes arm64: dts: exynos: Add DT node for all UART ports arm64: dts: exynos: update all samsung,mode constants arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Link: https://lore.kernel.org/r/20250513101023.21552-6-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit e87c7478a31b4e481db6123c10754d87d37c2a3d Merge: 509710c6fdcee7 42cfb00c919e59 Author: Arnd Bergmann Date: Wed May 21 19:07:25 2025 +0200 Merge tag 'ti-k3-config-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig TI K3 defconfig updates for v6.16 - Enable Cadence DSI and PHY driver support for DSI support on BeagleBone-AI64, BeaglePlay, BeagleY-AI, All TI EVMs etc. - Enable hardware spinlock and Quadrature Encoder Pulse (QEP) support for AM64-SK and other boards. - Enable TMP102 driver to support Phytec phyCORE-AM68x/TDA4x and the phyGATE-Tauri-L-iMX8MM - Enable TPIC2810 for AM64-SK LED GPIO control. * tag 'ti-k3-config-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable TPIC2810 GPIO expander arm64: defconfig: Enable TMP102 as module arm64: defconfig: Enable hwspinlock and eQEP for K3 arm64: defconfig: Add CDNS_DSI and CDNS_PHY config Link: https://lore.kernel.org/r/20250512144738.dv63fd4fyuly3s44@diocese Signed-off-by: Arnd Bergmann commit 50c77033bced322c2138bc803c6d55b82b5cca51 Merge: a97bf0c6aa5c37 877afe1ee34df5 Author: Arnd Bergmann Date: Wed May 21 19:04:33 2025 +0200 Merge tag 'ti-driver-soc-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI SoC driver updates for v6.16 - ti_sci: Bug fix in CPU latency conversion from us to ms for TISCI protocol - k3-socinfo: Add JTAG ID for AM62LX - Code cleanups: wkup_m3_ipc: Use dev_err_probe, k3-ringacc: use device_match_of_probe and knav_qmss_queue: drop unnecessary NULL check * tag 'ti-driver-soc-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: wkup_m3_ipc: Use dev_err_probe firmware: ti_sci: Convert CPU latency constraint from us to ms soc: ti: k3-socinfo: Add JTAG ID for AM62LX soc: ti: knav_qmss_queue: Remove unnecessary NULL check before free_percpu() soc: ti: k3-ringacc: Use device_match_of_node() Link: https://lore.kernel.org/r/20250512144719.mpkyw2jbyzslb5hy@yearly Signed-off-by: Arnd Bergmann commit a97bf0c6aa5c37504ea10436d3b5b763f5665140 Merge: b892924264c19a 1c64de886b8893 Author: Arnd Bergmann Date: Wed May 21 19:03:42 2025 +0200 Merge tag 'reset-for-v6.16' of git://git.pengutronix.de/pza/linux into soc/drivers Reset controller updates for v6.16 * Add T-HEAD TH1520 and Renesas RZ/V2H(P) USB2PHY reset controller drivers. * Add devm_reset_control_array_get_exclusive_released() variant to allow using the acquire/release hand-off mechanism for exclusive reset controls bundled into reset control arrays. * Add Sophgo SG2044 reset controller to device tree bindings. * tag 'reset-for-v6.16' of git://git.pengutronix.de/pza/linux: dt-bindings: reset: sophgo: Add SG2044 bindings. MAINTAINERS: Add entry for Renesas RZ/V2H(P) USB2PHY Port Reset driver reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P) dt-bindings: reset: Document RZ/V2H(P) USB2PHY reset reset: Add devm_reset_control_array_get_exclusive_released() reset: thead: Add TH1520 reset controller driver dt-bindings: reset: Add T-HEAD TH1520 SoC Reset Controller Link: https://lore.kernel.org/r/20250513092516.3331585-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit 87901f69400a25bf5e24c71b4de42b18dab3beda Author: Krzysztof Kozlowski Date: Tue May 13 12:10:24 2025 +0200 ARM: dts: samsung: sp5v210-aries: Align wifi node name with bindings Recently DT bindings expect 'wifi' as node name: s5pv210-fascinate4g.dtb: wlan@1: $nodename:0: 'wlan@1' does not match '^wifi(@.*)?$' Link: https://lore.kernel.org/r/20250424084655.105011-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250513101023.21552-7-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 0d2992d30af6a9d4e38e8471e02e0e1d205e10a7 Merge: 828497fba7b855 108f878d435437 Author: Mark Brown Date: Wed May 21 18:01:20 2025 +0100 Add DAPM/ASoC helpers to create SDCA drivers Merge series from Charles Keepax : Add helper functions to add DAPM widgets, routes, ALSA controls, and DAI drivers, these will be used to create SDCA function device drivers. This series should provide most of the core functionality needed to get a device registered and have a working DAPM graph within the device. There are some features that still need additional work, these are marked with FIXMEs in the code. The two main things are SDCA Clock Muxes (not used in our devices and needs some ASoC core work), and better support for more complex SDCA volume control definitions (our parts have fairly simple volumes, and SDCA has a large amount of flexibility in how the volume control is specified). The next steps in the process are to add helpers for the DAI ops themselves, some IRQ handling, and firmware download. And finally we should be able to actually add the SDCA class driver itself. commit b65e4b56e9f406f291656b3e92723952c180fbab Author: Alexander Potapenko Date: Wed May 7 18:00:12 2025 +0200 kmsan: rework kmsan_in_runtime() handling in kmsan_report() kmsan_report() calls used to require entering/leaving the runtime around them. To simplify the things, drop this requirement and move calls to kmsan_enter_runtime()/kmsan_leave_runtime() into kmsan_report(). Link: https://lkml.kernel.org/r/20250507160012.3311104-5-glider@google.com Signed-off-by: Alexander Potapenko Cc: Marco Elver Cc: Bart Van Assche Cc: Kent Overstreet Cc: Dmitriy Vyukov Cc: Ilya Leoshkevich Signed-off-by: Andrew Morton commit e17c1f15b0ccfa4802cedbd464d00ece50a10cf1 Author: Alexander Potapenko Date: Wed May 7 18:00:11 2025 +0200 kmsan: enter the runtime around kmsan_internal_memmove_metadata() call kmsan_internal_memmove_metadata() transitively calls stack_depot_save() (via kmsan_internal_chain_origin() and kmsan_save_stack_with_flags()), which may allocate memory. Guard it with kmsan_enter_runtime() and kmsan_leave_runtime() to avoid recursion. This bug was spotted by CONFIG_WARN_CAPABILITY_ANALYSIS=y Link: https://lkml.kernel.org/r/20250507160012.3311104-4-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Marco Elver Cc: Bart Van Assche Cc: Kent Overstreet Cc: Dmitriy Vyukov Cc: Ilya Leoshkevich Signed-off-by: Andrew Morton commit ce6a1c978f9c2beb38dbb1793799614255094290 Author: Alexander Potapenko Date: Wed May 7 18:00:10 2025 +0200 kmsan: drop the declaration of kmsan_save_stack() This function is not defined anywhere. Link: https://lkml.kernel.org/r/20250507160012.3311104-3-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Marco Elver Cc: Bart van Assche Cc: Dmitriy Vyukov Cc: Ilya Leoshkevich Cc: Kent Overstreet Signed-off-by: Andrew Morton commit 8312ab31d362fcb6d68f1f2da4d1e89bc5d3f48c Author: Alexander Potapenko Date: Wed May 7 18:00:09 2025 +0200 kmsan: fix usage of kmsan_enter_runtime() in kmsan_vmap_pages_range_noflush() Only enter the runtime to call __vmap_pages_range_noflush(), so that error handling does not skip kmsan_leave_runtime(). This bug was spotted by CONFIG_WARN_CAPABILITY_ANALYSIS=y Link: https://lkml.kernel.org/r/20250507160012.3311104-2-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Marco Elver Cc: Bart Van Assche Cc: Kent Overstreet Cc: Dmitriy Vyukov Cc: Ilya Leoshkevich Signed-off-by: Andrew Morton commit 1c1db467068d5e57e58756666f7dc54c9dda9b2c Author: Alexander Potapenko Date: Wed May 7 18:00:08 2025 +0200 kmsan: apply clang-format to files mm/kmsan/ KMSAN source files are expected to be formatted with clang-format, fix some nits that slipped in. No functional change. Link: https://lkml.kernel.org/r/20250507160012.3311104-1-glider@google.com Signed-off-by: Alexander Potapenko Cc: Ilya Leoshkevich Cc: Bart van Assche Cc: Dmitriy Vyukov Cc: Kent Overstreet Cc: Macro Elver Signed-off-by: Andrew Morton commit e341f9c3c8412e57fe0042a33a2640245ecdf619 Author: Joshua Hahn Date: Mon May 5 11:23:28 2025 -0700 mm/mempolicy: Weighted Interleave Auto-tuning On machines with multiple memory nodes, interleaving page allocations across nodes allows for better utilization of each node's bandwidth. Previous work by Gregory Price [1] introduced weighted interleave, which allowed for pages to be allocated across nodes according to user-set ratios. Ideally, these weights should be proportional to their bandwidth, so that under bandwidth pressure, each node uses its maximal efficient bandwidth and prevents latency from increasing exponentially. Previously, weighted interleave's default weights were just 1s -- which would be equivalent to the (unweighted) interleave mempolicy, which goes through the nodes in a round-robin fashion, ignoring bandwidth information. This patch has two main goals: First, it makes weighted interleave easier to use for users who wish to relieve bandwidth pressure when using nodes with varying bandwidth (CXL). By providing a set of "real" default weights that just work out of the box, users who might not have the capability (or wish to) perform experimentation to find the most optimal weights for their system can still take advantage of bandwidth-informed weighted interleave. Second, it allows for weighted interleave to dynamically adjust to hotplugged memory with new bandwidth information. Instead of manually updating node weights every time new bandwidth information is reported or taken off, weighted interleave adjusts and provides a new set of default weights for weighted interleave to use when there is a change in bandwidth information. To meet these goals, this patch introduces an auto-configuration mode for the interleave weights that provides a reasonable set of default weights, calculated using bandwidth data reported by the system. In auto mode, weights are dynamically adjusted based on whatever the current bandwidth information reports (and responds to hotplug events). This patch still supports users manually writing weights into the nodeN sysfs interface by entering into manual mode. When a user enters manual mode, the system stops dynamically updating any of the node weights, even during hotplug events that shift the optimal weight distribution. A new sysfs interface "auto" is introduced, which allows users to switch between the auto (writing 1 or Y) and manual (writing 0 or N) modes. The system also automatically enters manual mode when a nodeN interface is manually written to. There is one functional change that this patch makes to the existing weighted_interleave ABI: previously, writing 0 directly to a nodeN interface was said to reset the weight to the system default. Before this patch, the default for all weights were 1, which meant that writing 0 and 1 were functionally equivalent. With this patch, writing 0 is invalid. Link: https://lkml.kernel.org/r/20250520141236.2987309-1-joshua.hahnjy@gmail.com [joshua.hahnjy@gmail.com: wordsmithing changes, simplification, fixes] Link: https://lkml.kernel.org/r/20250511025840.2410154-1-joshua.hahnjy@gmail.com [joshua.hahnjy@gmail.com: remove auto_kobj_attr field from struct sysfs_wi_group] Link: https://lkml.kernel.org/r/20250512142511.3959833-1-joshua.hahnjy@gmail.com https://lore.kernel.org/linux-mm/20240202170238.90004-1-gregory.price@memverge.com/ [1] Link: https://lkml.kernel.org/r/20250505182328.4148265-1-joshua.hahnjy@gmail.com Co-developed-by: Gregory Price Signed-off-by: Gregory Price Signed-off-by: Joshua Hahn Suggested-by: Yunjeong Mun Suggested-by: Oscar Salvador Suggested-by: Ying Huang Suggested-by: Harry Yoo Reviewed-by: Harry Yoo Reviewed-by: Huang Ying Reviewed-by: Honggyu Kim Cc: Dan Williams Cc: Dave Jiang Cc: Greg Kroah-Hartman Cc: Joanthan Cameron Cc: Johannes Weiner Cc: Len Brown Signed-off-by: Andrew Morton commit 179fa6e8c2b632949dd9b63681ff696f03a8e1dd Merge: c07da6de0eb87a 6a9d340b1f9910 Author: Arnd Bergmann Date: Wed May 21 18:54:51 2025 +0200 Merge tag 'ti-k3-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 device tree updates for v6.16 Generic Fixups/Cleanups: * am62*: emmc - drop disable-wp, Add bootphase tags to support MMC boot SoC Specific features and Fixes: AM62Ax: * C7x and R5F support added * Bug fix for emmc clock to point to default * CPUFreq thermal throttling on thermal alert AM62P5: * Add RNG Node (common to J722s) * Bug fix for emmc clock to point to default (common to J722S) AM625: * Wakeup R5 node * Bug fix for emmc clock to point to default * PRUSS-M support * New GPU bindings AM64: * Switch to 64-bit address space for PCIe0 * Add PCIe control nodes for main_conf region * Reserve timer nodes used by MCU F/w. AM65: * MMC: Add missing delay timing values for SDR and legacy modes * Add compatible for AM65x syscon and PCIe control properties (dtbs_check fixes) J7200: * PCIe control node to scm_conf, switch to 64-bit address space for PCIe1. J721E: * PCIe control node to scm_conf, switch to 64-bit address space for PCIe0,1. J721S2: * GPU node for Imagination Tech Rouge BXS GPU. * PCIe control node to scm_conf, switch to 64-bit address space for PCIe1. J722s/AM67A: * Switch serdes status to be enabled by board file than at SoC level. * Switch to 64-bit address space for PCIe0. J784S4/J742S2/AM69: * Add ASPCIE0 and enable output for PCIe1 * Fix length of serdes_ln_ctrl. * Switch to 64-bit address space for PCIe0,1. Board Specific: AM62Ax: * SK: co-processors C7x, R5, PWM support added * phycore-som: co-processors C7x, R5 AM62P5: * Add Toradex Verdin AM62P boards with Dahlia, Ivy, Mallow and Yavia support. * SK: Add remote processor support, PWM AM625: * Add BeagleBoard.org PocketBeagle-2 support * phycore-som: Enable R5F support * Verdin: Add eeprom compatible fallback * SK: Enable PWM, voltage supplies, clock, i2cmux rename for camera overlays (dtbs_check fixes) * BeaglePlay: Add voltage supplies for camera overlays (dtbs_check fixes) * phyboard-lyra: Add cooling maps for fan * emmc bug fixes: add non-removable flag for eMMC. AM65: * EVM: Add missing power supply description ofr Rocktech panel (dtbs_check fixes) J721E: * EVM: Enable OSPI1 * EVM/SK: Dt nodes description for mandatory power suplpies for panel and sensors (dtbs_check fixes) J721S2/AM68: * Add phyBOARD-Izar-AM68x * am68-SK: Fix regulator hierarchy J722s/AM67A: * EVM: Add mux controls for CSI2, power regulator nodes and add overlays for quad IMX219 and TEVI OV5640. * BeagleY-AI: Add bootph for main_gpio1 J784S4/J742S2/AM69: * usxgmii expansion board: Drop un-necessary pinctrl-names * evm: Add overlay for USB0 Type-A option * tag 'ti-k3-dt-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (86 commits) arm64: dts: ti: k3-j722s-evm: Add overlay for TEVI OV5640 arm64: dts: ti: k3-j722s-evm: Add overlay for quad IMX219 arm64: dts: ti: j722s-evm: Add MUX to control CSI2RX arm64: dts: ti: j722s-evm: Add DT nodes for power regulators arm64: dts: ti: k3-am62a-phycore-som: Reserve main_timer2 for C7x DSP arm64: dts: ti: k3-am62a-phycore-som: Reserve main_rti4 for C7x DSP arm64: dts: ti: k3-am62a-phycore-som: Enable Co-processors arm64: dts: ti: k3-am62-phycore-som: Enable Co-processors arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert arm64: dts: ti: k3-j721e-common-proc-board: Enable OSPI1 on J721E arm64: dts: ti: k3-j721s2: Add GPU node arm64: dts: ti: k3-am62: New GPU binding details arm64: dts: ti: k3-am62-main: Add PRUSS-M node arm64: dts: ti: k3-am64: Reserve timers used by MCU FW arm64: dts: ti: k3-am62a7-sk: Reserve main_rti4 for C7x DSP arm64: dts: ti: k3-am62a7-sk: Reserve main_timer2 for C7x DSP arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors ... Link: https://lore.kernel.org/r/20250512144807.yn64klchtmjjl6ac@protrude Signed-off-by: Arnd Bergmann commit c07da6de0eb87a328d8905585a9ca1076c6ee216 Author: Nikolaos Pasaloukos Date: Mon May 12 13:33:17 2025 +0000 arm64: dts: blaize-blzp1600: Enable GPIO support Blaize BLZP1600 uses the custom silicon provided from VeriSilicon to add GPIO support. This interface is used to control signals on many other peripherals, such as Ethernet, USB, SD and eMMC. Signed-off-by: Nikolaos Pasaloukos Link: https://lore.kernel.org/r/20250512133302.151621-1-nikolaos.pasaloukos@blaize.com Signed-off-by: Arnd Bergmann commit 828497fba7b855243826bd96531920dc6bb93ec9 Merge: 15c2b04abe8639 8c4d2cc1e1cb9b Author: Mark Brown Date: Wed May 21 17:50:09 2025 +0100 ASoC: Add Intel machine driver support for CS35L63 Merge series from Stefan Binding : This adds support to the Intel machine drivers for CS35L63 codecs using soundwire, and also adds match entries for the CDB35L63-CB2 on MTL systems. commit 7e358b8cc138918381757d5e796b971bc238c6ee Merge: 24822c4b476c7d a4c95b924d5137 Author: Arnd Bergmann Date: Wed May 21 18:50:08 2025 +0200 Merge tag 'thead-dt-for-v6.16' of https://github.com/pdp7/linux into soc/dt T-HEAD Devicetrees for v6.16 There are several additions for the T-Head TH1520 SoC: - AON (Always-On) node which serves as a power-domain controller - Reset controller node - VO (Video Output) clock controller node These changes have all been tested in linux-next with the corresponding driver patches. Signed-off-by: Drew Fustini * tag 'thead-dt-for-v6.16' of https://github.com/pdp7/linux: riscv: dts: thead: Add device tree VO clock controller riscv: dts: thead: Introduce reset controller node riscv: dts: thead: Introduce power domain nodes with aon firmware commit 24822c4b476c7d7387eec21711d7908a86728d8a Author: Matthew Gerlach Date: Thu Apr 24 07:43:41 2025 -0700 dt-bindings: clock: socfpga: convert to yaml Convert the clock device tree bindings to yaml for the Altera SoCFPGA Cyclone5, Arria5, and Arria10 chip families. Since the clock nodes are subnodes to Altera SOCFPGA Clock Manager, the yaml was added to socfpga-clk-manager.yaml. Signed-off-by: Matthew Gerlach Signed-off-by: Dinh Nguyen commit dc9f08bac28bcd4c1b7a79d39c816dfdf5279818 Author: Shashank Balaji Date: Tue May 20 23:07:45 2025 +0900 cgroup, docs: be specific about bandwidth control of rt processes Signed-off-by: Shashank Balaji Signed-off-by: Tejun Heo commit 3e20585abf2233da5212e6fb2f7c7ea0f337cd09 Author: Vincent Mailhol Date: Wed May 21 23:18:53 2025 +0900 selftests: can: test_raw_filter.sh: add support of physical interfaces Allow the user to specify a physical interface through the $CANIF environment variable. Add a $BITRATE environment variable set with a default value of 500000. If $CANIF is omitted or if it starts with vcan (e.g. vcan1), the test will use the virtual can interface type. Otherwise, it will assume that the provided interface is a physical can interface. For example: CANIF=can1 BITRATE=1000000 ./test_raw_filter.sh will run set the can1 interface with a bitrate of one million and run the tests on it. Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 77442ffa83e8ed49d1c5192b90f9950b192e09e5 Author: Felix Maurer Date: Wed May 21 15:16:09 2025 +0200 selftests: can: Import tst-filter from can-tests Tests for the can subsystem have been in the can-tests repository[1] so far. Start moving the tests to kernel selftests by importing the current tst-filter test. The test is now named test_raw_filter and is substantially updated to be more aligned with the kernel selftests, follow the coding style, and simplify the validation of received CAN frames. We also include documentation of the test design. The test verifies that the single filters on raw CAN sockets work as expected. We intend to import more tests from can-tests and add additional test cases in the future. The goal of moving the CAN selftests into the tree is to align the tests more closely with the kernel, improve testing of CAN in general, and to simplify running the tests automatically in the various kernel CI systems. [1]: https://github.com/linux-can/can-tests Signed-off-by: Felix Maurer Reviewed-by: Vincent Mailhol Link: https://patch.msgid.link/87d289f333cba7bbcc9d69173ea1c320e4b5c3b8.1747833283.git.fmaurer@redhat.com Signed-off-by: Marc Kleine-Budde commit 772e50a76ee664e75581624f512df4e45582605a Author: Tzung-Bi Shih Date: Tue May 20 08:20:49 2025 +0000 kunit: Fix wrong parameter to kunit_deactivate_static_stub() kunit_deactivate_static_stub() accepts real_fn_addr instead of replacement_addr. In the case, it always passes NULL to kunit_deactivate_static_stub(). Fix it. Link: https://lore.kernel.org/r/20250520082050.2254875-1-tzungbi@kernel.org Fixes: e047c5eaa763 ("kunit: Expose 'static stub' API to redirect functions") Signed-off-by: Tzung-Bi Shih Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 4e9d73034196ac8ab496bb47583197b36ba13327 Author: Haibo Chen Date: Tue May 20 11:46:12 2025 +0800 dt-bindings: gpio: vf610: add ngpios and gpio-reserved-ranges Add optional ngpios and gpio-reserved-ranges property. Reviewed-by: Frank Li Signed-off-by: Haibo Chen Acked-by: Conor Dooley Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250520-gpio-dts-v3-1-04771c6cf325@nxp.com Signed-off-by: Bartosz Golaszewski commit a510bb87da72aa8d1504b0e4b343cfe013ee8a89 Author: Claudiu Beznea Date: Wed May 21 17:25:41 2025 +0300 genirq/irqdesc: Remove double locking in hwirq_show() &desc->lock is acquired on 2 consecutive lines in hwirq_show(). This leads obviously to a deadlock. Drop the raw_spin_lock_irq() and keep guard(). Fixes: 5d964a9f7cd8 ("genirq/irqdesc: Switch to lock guards") Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250521142541.3832130-1-claudiu.beznea.uj@bp.renesas.com commit 29857e6f4e30b475e0713fc7a65a962745c429ab Merge: 0af2f6be1b4281 d204e391a0d83d Author: Thomas Gleixner Date: Wed May 21 17:42:19 2025 +0200 Merge tag 'timers-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daniel.lezcano/linux into timers/drivers - Add the System Timer Module driver for the S32G NXP platforms (Daniel Lezcano) - Convert the remaining text formatted DT bindings in schemas (Rob Herring) - Fix a Kconfig dependency on the atmel TCB driver to prevent a compilation warning when CONFIG_OF is disabled (Arnd Bergmann) - Fix self-pinging and support gettimeleft in the watchdog part of the tegra186 timer (Pohsun Su) - Add the Sophgo SG2044 ACLINT timer binding (Inochi Amaoto) - Add the EcoNet Timer HPT driver along with the DT bindings (Caleb James DeLisle) - Add the Renesas R9A09G056 compatible string bindings and enable reprobe support on the Renesas OSTM (Lab Prabhakar) Link: https://lore.kernel.org/all/aCy43_obHEdIpwWg@mai.linaro.org commit d3a889482bd5abf2bbdc1ec3d2d49575aa160c9c Author: Charles Yeh Date: Wed May 21 21:23:54 2025 +0800 USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB Add new bcd (0x905) to support PL2303GT-2AB (TYPE_HXN). Add new bcd (0x1005) to support PL2303GC-Q20 (TYPE_HXN). Signed-off-by: Charles Yeh Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit eb4e0298a05684f88fbd2106fc482f859f804aa6 Author: Andy Shevchenko Date: Wed May 21 16:55:37 2025 +0300 regmap-irq: Use dedicated interrupt wake setters Use enable_irq_wake() and disable_irq_wake() instead of calling low-level irq_set_irq_wake() with a parameter. No functional changes. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250521135538.1086717-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 92cd405b648605db4da866f3b9818b271ae84ef0 Author: Greg Kroah-Hartman Date: Wed May 21 15:41:34 2025 +0200 USB: serial: bus: fix const issue in usb_serial_device_match() usb_serial_device_match() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 46550e2b878d60923c72f0526a7aac02e8eda3d5 Author: Pali Rohár Date: Sun May 4 20:22:44 2025 +0200 include: pe.h: Fix PE definitions * Rename constants to their standard PE names: - MZ_MAGIC -> IMAGE_DOS_SIGNATURE - PE_MAGIC -> IMAGE_NT_SIGNATURE - PE_OPT_MAGIC_PE32_ROM -> IMAGE_ROM_OPTIONAL_HDR_MAGIC - PE_OPT_MAGIC_PE32 -> IMAGE_NT_OPTIONAL_HDR32_MAGIC - PE_OPT_MAGIC_PE32PLUS -> IMAGE_NT_OPTIONAL_HDR64_MAGIC - IMAGE_DLL_CHARACTERISTICS_NX_COMPAT -> IMAGE_DLLCHARACTERISTICS_NX_COMPAT * Import constants and their description from readpe and file projects which contains current up-to-date information: - IMAGE_FILE_MACHINE_* - IMAGE_FILE_* - IMAGE_SUBSYSTEM_* - IMAGE_DLLCHARACTERISTICS_* - IMAGE_DLLCHARACTERISTICS_EX_* - IMAGE_DEBUG_TYPE_* * Add missing IMAGE_SCN_* constants and update their incorrect description * Fix incorrect value of IMAGE_SCN_MEM_PURGEABLE constant * Add description for win32_version and loader_flags PE fields Signed-off-by: Pali Rohár Signed-off-by: Ard Biesheuvel commit 8bb9d6ccd36062d16baa707b759809e1f494017e Author: Jens Axboe Date: Thu May 8 14:48:33 2025 -0600 io_uring: finish IOU_OK -> IOU_COMPLETE transition IOU_COMPLETE is more descriptive, in that it explicitly says that the return value means "please post a completion for this request". This patch completes the transition from IOU_OK to IOU_COMPLETE, replacing existing IOU_OK users. This is a purely mechanical change. Signed-off-by: Jens Axboe commit 15c2b04abe863978e23ab97d1055638ad631475f Author: Kuninori Morimoto Date: Tue May 13 23:39:27 2025 +0000 ASoC: dt-bindings: audio-graph-card2: add missing mic-det-gpios The yaml has "hp-det-gpios" property, but Audio-Graph-Card2 can handle "mic-det-gpios" too. Add it. Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/877c2kaxn4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 23205562ffc8de20f57afdd984858cab29e77968 Author: Pauli Virtanen Date: Sat May 3 17:08:21 2025 +0300 Bluetooth: separate CIS_LINK and BIS_LINK link types Use separate link type id for unicast and broadcast ISO connections. These connection types are handled with separate HCI commands, socket API is different, and hci_conn has union fields that are different in the two cases, so they shall not be mixed up. Currently in most places it is attempted to distinguish ucast by bacmp(&c->dst, BDADDR_ANY) but it is wrong as dst is set for bcast sink hci_conn in iso_conn_ready(). Additionally checking sync_handle might be OK, but depends on details of bcast conn configuration flow. To avoid complicating it, use separate link types. Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 5bd5c716f7ec3e25d8d3b8a7566e192a26f9c7ce Author: Jiande Lu Date: Tue Apr 29 18:16:05 2025 +0800 Bluetooth: btusb: Add new VID/PID 13d3/3630 for MT7925 Add VID 13d3 & PID 3630 for MediaTek MT7925 USB Bluetooth chip. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=07 Lev=01 Prnt=01 Port=10 Cnt=02 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3630 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: Jiande Lu Signed-off-by: Luiz Augusto von Dentz commit dd0ccf858057b793beb3779be7576d92c93cf828 Author: Pauli Virtanen Date: Sun Apr 27 14:27:25 2025 +0300 Bluetooth: add support for SIOCETHTOOL ETHTOOL_GET_TS_INFO Bluetooth needs some way for user to get supported so_timestamping flags for the different socket types. Use SIOCETHTOOL API for this purpose. As hci_dev is not associated with struct net_device, the existing implementation can't be reused, so we add a small one here. Add support (only) for ETHTOOL_GET_TS_INFO command. The API differs slightly from netdev in that the result depends also on socket type. Signed-off-by: Pauli Virtanen Acked-by: Willem de Bruijn Signed-off-by: Luiz Augusto von Dentz commit 190377500fdefce2bda3bbd08409f4f4d813b2d1 Author: Chandrashekar Devegowda Date: Thu Apr 24 08:01:47 2025 +0530 Bluetooth: btintel_pcie: Dump debug registers on error Dumping debug registers on GP1 MSIx and error conditions, such as TX completion timeout, aiding in understanding the controller's state during errors. The register dump includes: - Boot stage - IPC control - IPC status - Mailbox registers HCI traces: = Vendor Diagnostic (len 199) 2d 2d 2d 2d 20 44 75 6d 70 20 6f 66 20 64 65 62 ---- Dump of deb 75 67 20 72 65 67 69 73 74 65 72 73 20 2d 2d 2d ug registers --- 62 6f 6f 74 20 73 74 61 67 65 3a 20 30 78 61 30 boot stage: 0xa0 66 61 30 30 34 37 69 70 63 20 73 74 61 74 75 73 fa0047ipc status 3a 20 30 78 30 30 30 30 30 30 30 34 69 70 63 20 : 0x00000004ipc 63 6f 6e 74 72 6f 6c 3a 20 30 78 30 30 30 30 30 control: 0x00000 30 30 30 69 70 63 20 73 6c 65 65 70 20 63 6f 6e 000ipc sleep con 74 72 6f 6c 3a 20 30 78 30 30 30 30 30 30 30 30 trol: 0x00000000 6d 62 6f 78 20 73 74 61 74 75 73 3a 20 30 78 30 mbox status: 0x0 30 30 30 30 30 30 30 72 78 71 3a 20 63 72 5f 74 0000000rxq: cr_t 69 61 3a 20 37 20 63 72 5f 68 69 61 3a 20 37 74 ia: 7 cr_hia: 7t 78 71 3a 20 63 72 5f 74 69 61 3a 20 36 20 63 72 xq: cr_tia: 6 cr 5f 68 69 61 3a 20 36 _hia: 6 Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 0a766a0affb563789a0ebaab41d68964ae94fc0e Author: Luiz Augusto von Dentz Date: Tue Apr 15 11:26:55 2025 -0400 Bluetooth: ISO: Fix getpeername not returning sockaddr_iso_bc fields If the socket is a broadcast receiver fields from sockaddr_iso_bc shall be part of the values returned to getpeername since some of these fields are updated while doing the PA and BIG sync procedures. Signed-off-by: Luiz Augusto von Dentz commit e2d471b7806b09744d65a64bcf41337468f2443b Author: Luiz Augusto von Dentz Date: Fri Apr 11 12:37:50 2025 -0400 Bluetooth: ISO: Fix not using SID from adv report Up until now it has been assumed that the application would be able to enter the advertising SID in sockaddr_iso_bc.bc_sid, but userspace has no access to SID since the likes of MGMT_EV_DEVICE_FOUND cannot carry it, so it was left unset (0x00) which means it would be unable to synchronize if the broadcast source is using a different SID e.g. 0x04: > HCI Event: LE Meta Event (0x3e) plen 57 LE Extended Advertising Report (0x0d) Num reports: 1 Entry 0 Event type: 0x0000 Props: 0x0000 Data status: Complete Address type: Random (0x01) Address: 0B:82:E8:50:6D:C8 (Non-Resolvable) Primary PHY: LE 1M Secondary PHY: LE 2M SID: 0x04 TX power: 127 dBm RSSI: -55 dBm (0xc9) Periodic advertising interval: 180.00 msec (0x0090) Direct address type: Public (0x00) Direct address: 00:00:00:00:00:00 (OUI 00-00-00) Data length: 0x1f 06 16 52 18 5b 0b e1 05 16 56 18 04 00 11 30 4c ..R.[....V....0L 75 69 7a 27 73 20 53 32 33 20 55 6c 74 72 61 uiz's S23 Ultra Service Data: Broadcast Audio Announcement (0x1852) Broadcast ID: 14748507 (0xe10b5b) Service Data: Public Broadcast Announcement (0x1856) Data[2]: 0400 Unknown EIR field 0x30[16]: 4c75697a27732053323320556c747261 < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) plen 14 Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x00 (<- Invalid) Adv address type: Random (0x01) Adv address: 0B:82:E8:50:6D:C8 (Non-Resolvable) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 So instead this changes now allow application to set HCI_SID_INVALID which will make hci_le_pa_create_sync to wait for a report, update the conn->sid using the report SID and only then issue PA create sync command: < HCI Command: LE Periodic Advertising Create Sync Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x04 Adv address type: Random (0x01) Adv address: 0B:82:E8:50:6D:C8 (Non-Resolvable) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) Status: Success (0x00) Sync handle: 64 Advertising SID: 0x04 Advertiser address type: Random (0x01) Advertiser address: 0B:82:E8:50:6D:C8 (Non-Resolvable) Advertiser PHY: LE 2M (0x02) Periodic advertising interval: 180.00 msec (0x0090) Advertiser clock accuracy: 0x05 Signed-off-by: Luiz Augusto von Dentz commit 96ace5519f8ff12644be626b278a02d742b7694c Author: Hsin-chen Chuang Date: Wed Apr 16 09:53:38 2025 +0000 Revert "Bluetooth: btusb: add sysfs attribute to control USB alt setting" This reverts commit b16b327edb4d030fb4c8fe38c7d299074d47ee3f. The sysfs node introduced by this patch could potentially race with user space. The original motivation - Support configuring altsetting from the user space will be added by another series. Cc: chromeos-bluetooth-upstreaming@chromium.org Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz commit f330734a6315ab3360a524946ea624675b246956 Author: Hsin-chen Chuang Date: Wed Apr 16 09:53:37 2025 +0000 Revert "Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL" This reverts commit 75ddcd5ad40ecd9fbc9f5a7a2ed0e1e74921db3c. This patch doesn't work quite well - It's observed that with this patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes send out no packet for Transparent codec; MTK chips may generate SCO data with a wrong handle for CVSD codec; RTK could split the data with a wrong packet size for Transparent codec; ... etc. Cc: chromeos-bluetooth-upstreaming@chromium.org Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz commit 7d70989fcea7f79afe018a7e34d3486406c7a94e Author: Hsin-chen Chuang Date: Wed Apr 16 09:53:36 2025 +0000 Bluetooth: btusb: Add HCI Drv commands for configuring altsetting Although commit 75ddcd5ad40e ("Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL") has enabled the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, it's observed that with the patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes send out no packet for Transparent codec; MTK chips may generate SCO data with a wrong handle for CVSD codec; RTK could split the data with a wrong packet size for Transparent codec; ... etc. To address the issue above one needs to reset the altsetting back to zero when there is no active SCO connection, which is the same as the BlueZ behavior, and another benefit is the bus doesn't need to reserve bandwidth when no SCO connection. This patch adds "Supported Altsettings" and "Switch Altsetting" commands that allow the user space program to configure the altsetting freely. This patch is tested on ChromeOS devices. The USB Bluetooth models (CVSD, TRANS alt3, and TRANS alt6) could pass the stress HFP test narrow band speech and wide band speech. Cc: chromeos-bluetooth-upstreaming@chromium.org Fixes: b16b327edb4d ("Bluetooth: btusb: add sysfs attribute to control USB alt setting") Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz commit 04425292a62c15d1fde714522beaf8f3c2ed1de9 Author: Hsin-chen Chuang Date: Wed Apr 16 09:53:35 2025 +0000 Bluetooth: Introduce HCI Driver protocol Although commit 75ddcd5ad40e ("Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL") has enabled the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, it's observed that with the patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes send out no packet for Transparent codec; MTK chips may generate SCO data with a wrong handle for CVSD codec; RTK could split the data with a wrong packet size for Transparent codec; ... etc. To address the issue above one needs to reset the altsetting back to zero when there is no active SCO connection, which is the same as the BlueZ behavior, and another benefit is the bus doesn't need to reserve bandwidth when no SCO connection. This patch adds the infrastructure that allow the user space program to talk to Bluetooth drivers directly: - Define the new packet type HCI_DRV_PKT which is specifically used for communication between the user space program and the Bluetooth drviers - hci_send_frame intercepts the packets and invokes drivers' HCI Drv callbacks (so far only defined for btusb) - 2 kinds of events to user space: Command Status and Command Complete, the former simply returns the status while the later may contain additional response data. Cc: chromeos-bluetooth-upstreaming@chromium.org Fixes: b16b327edb4d ("Bluetooth: btusb: add sysfs attribute to control USB alt setting") Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz commit c50b56664e48b66b0249230ec16378082088c7ec Author: Neeraj Sanjay Kale Date: Mon Apr 14 23:29:52 2025 +0530 Bluetooth: btnxpuart: Implement host-wakeup feature This implements host wakeup feature by reading the device tree property wakeup-source and 'wakeup' interrupt, and nxp,wakeout-pin, and configuring it as a FALLING EDGE triggered interrupt. When host is suspended, a trigger from the WAKE_OUT pin of the controller wakes it up. To enable this feature, both device tree properties are needed to be defined. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit a12a5f5ff0c98f204409a252257e69d5b82fe9df Author: Neeraj Sanjay Kale Date: Mon Apr 14 23:29:51 2025 +0530 dt-bindings: net: bluetooth: nxp: Add support for host-wakeup Add support for host wakeup on interrupt. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit c4dbb1bdada90168dd5fa2f7e4553cb0e1dad3c8 Author: WangYuli Date: Tue Apr 15 10:33:50 2025 +0800 Bluetooth: btusb: Add RTL8851BE device 0x0bda:0xb850 The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=b850 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms Co-developed-by: Hao Li Signed-off-by: Hao Li Signed-off-by: WangYuli Signed-off-by: Luiz Augusto von Dentz commit bd3cb3c5aec80f70762c34fdd3068f07b212108e Author: Chen Ni Date: Thu Apr 10 15:34:56 2025 +0800 Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Signed-off-by: Luiz Augusto von Dentz commit ee3e4209e66d44180a41d5ca7271361a2a28fccf Author: Krzysztof Kozlowski Date: Sun Apr 6 22:10:17 2025 +0200 Bluetooth: btmtksdio: Fix wakeup source leaks on device unbind Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit ba6535e8b494931471df9666addf0f1e5e6efa27 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:10:16 2025 +0200 Bluetooth: btmrvl_sdio: Fix wakeup source leaks on device unbind Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit 689b5a8071c4fb9af89216d4d1ffa027db16e531 Author: Kiran K Date: Wed Apr 2 07:41:48 2025 +0530 Bluetooth: btintel_pcie: Do not generate coredump for diagnostic events All Intel diagnostic events are part of HCI traces and there is no need to generate coredump for the same. Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit bbf56029322c06a9227f09c2064f50278111159a Author: Youn MÉLOIS Date: Tue Apr 1 12:24:35 2025 +0000 Bluetooth: btusb: Add new VID/PID 13d3/3613 for MT7925 Add VID 13d3 & PID 3613 for MediaTek MT7925 USB Bluetooth chip. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3613 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I: If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I:* If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: Youn Melois Signed-off-by: Luiz Augusto von Dentz commit 582847f9702461b0a1cba3efdb2b8135bf940d53 Author: Lukas Bulwahn Date: Wed May 7 15:30:43 2025 +0200 Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the compiler option '-fsanitize-coverage=trace-pc' by now. The commit however misses the important use of this config option in Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally to CFLAGS_KCOV, as all compilers provide that option now. Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") Signed-off-by: Lukas Bulwahn Reviewed-by: Nathan Chancellor Reviewed-by: Dmitry Vyukov Signed-off-by: Arnd Bergmann commit 3dcb524d785373fd43b129f01f32bd394fe167e0 Author: Ivan Hu Date: Mon Mar 31 15:45:04 2025 +0800 efi/efi_test: Fix missing pending status update in getwakeuptime The pending status was not being passed to user space, leading to false test alarms when using the pending status. This patch ensures that the pending status is correctly updated and exposed to user space when calling getwakeuptime, preventing incorrect handling of the pending status. Signed-off-by: Ivan Hu Signed-off-by: Ard Biesheuvel commit c353fde17d8f7e710884532da50393cd22ddbfbe Author: Vincent Donnefort Date: Wed May 21 13:48:34 2025 +0100 KVM: arm64: np-guest CMOs with PMD_SIZE fixmap With the introduction of stage-2 huge mappings in the pKVM hypervisor, guest pages CMO is needed for PMD_SIZE size. Fixmap only supports PAGE_SIZE and iterating over the huge-page is time consuming (mostly due to TLBI on hyp_fixmap_unmap) which is a problem for EL2 latency. Introduce a shared PMD_SIZE fixmap (hyp_fixblock_map/hyp_fixblock_unmap) to improve guest page CMOs when stage-2 huge mappings are installed. On a Pixel6, the iterative solution resulted in a latency of ~700us, while the PMD_SIZE fixmap reduces it to ~100us. Because of the horrendous private range allocation that would be necessary, this is disabled for 64KiB pages systems. Suggested-by: Quentin Perret Signed-off-by: Vincent Donnefort Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250521124834.1070650-11-vdonnefort@google.com Signed-off-by: Marc Zyngier commit db14091d8f75852d960b18834c7bdb1b7c2bb74f Author: Vincent Donnefort Date: Wed May 21 13:48:33 2025 +0100 KVM: arm64: Stage-2 huge mappings for np-guests Now np-guests hypercalls with range are supported, we can let the hypervisor to install block mappings whenever the Stage-1 allows it, that is when backed by either Hugetlbfs or THPs. The size of those block mappings is limited to PMD_SIZE. Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-10-vdonnefort@google.com Signed-off-by: Marc Zyngier commit 3669ddd8fa8b5a46d96b9c54a6fa519a17e4a4fa Author: Quentin Perret Date: Wed May 21 13:48:32 2025 +0100 KVM: arm64: Add a range to pkvm_mappings In preparation for supporting stage-2 huge mappings for np-guest, add a nr_pages member for pkvm_mappings to allow EL1 to track the size of the stage-2 mapping. Signed-off-by: Quentin Perret Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-9-vdonnefort@google.com Signed-off-by: Marc Zyngier commit b38c9775f73941ee59aebc0a489aa5c22e632def Author: Quentin Perret Date: Wed May 21 13:48:31 2025 +0100 KVM: arm64: Convert pkvm_mappings to interval tree In preparation for supporting stage-2 huge mappings for np-guest, let's convert pgt.pkvm_mappings to an interval tree. No functional change intended. Suggested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-8-vdonnefort@google.com Signed-off-by: Marc Zyngier commit c4d99a833d34d8041a568f0c076379ae53c47896 Author: Vincent Donnefort Date: Wed May 21 13:48:30 2025 +0100 KVM: arm64: Add a range to __pkvm_host_test_clear_young_guest() In preparation for supporting stage-2 huge mappings for np-guest. Add a nr_pages argument to the __pkvm_host_test_clear_young_guest hypercall. This range supports only two values: 1 or PMD_SIZE / PAGE_SIZE (that is 512 on a 4K-pages system). Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-7-vdonnefort@google.com Signed-off-by: Marc Zyngier commit 0eb802b3b4ecfb10046bc325f47e7fd741c72ffe Author: Vincent Donnefort Date: Wed May 21 13:48:29 2025 +0100 KVM: arm64: Add a range to __pkvm_host_wrprotect_guest() In preparation for supporting stage-2 huge mappings for np-guest. Add a nr_pages argument to the __pkvm_host_wrprotect_guest hypercall. This range supports only two values: 1 or PMD_SIZE / PAGE_SIZE (that is 512 on a 4K-pages system). Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-6-vdonnefort@google.com Signed-off-by: Marc Zyngier commit f28f1d02f4eaac05c2ad6bf7264a8696dc21d011 Author: Vincent Donnefort Date: Wed May 21 13:48:28 2025 +0100 KVM: arm64: Add a range to __pkvm_host_unshare_guest() In preparation for supporting stage-2 huge mappings for np-guest. Add a nr_pages argument to the __pkvm_host_unshare_guest hypercall. This range supports only two values: 1 or PMD_SIZE / PAGE_SIZE (that is 512 on a 4K-pages system). Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-5-vdonnefort@google.com Signed-off-by: Marc Zyngier commit 4274385ebf090461b46b9bddb0f7c526182ba3c0 Author: Vincent Donnefort Date: Wed May 21 13:48:27 2025 +0100 KVM: arm64: Add a range to __pkvm_host_share_guest() In preparation for supporting stage-2 huge mappings for np-guest. Add a nr_pages argument to the __pkvm_host_share_guest hypercall. This range supports only two values: 1 or PMD_SIZE / PAGE_SIZE (that is 512 on a 4K-pages system). Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-4-vdonnefort@google.com Signed-off-by: Marc Zyngier commit 3db771fa23ed6aecdf28ce4b806309198eea84e2 Author: Vincent Donnefort Date: Wed May 21 13:48:26 2025 +0100 KVM: arm64: Introduce for_each_hyp_page Add a helper to iterate over the hypervisor vmemmap. This will be particularly handy with the introduction of huge mapping support for the np-guest stage-2. Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-3-vdonnefort@google.com Signed-off-by: Marc Zyngier commit 944a1ed8cc3ea6c5b16b6aca11475ced0daf68a9 Author: Vincent Donnefort Date: Wed May 21 13:48:25 2025 +0100 KVM: arm64: Handle huge mappings for np-guest CMOs clean_dcache_guest_page() and invalidate_icache_guest_page() accept a size as an argument. But they also rely on fixmap, which can only map a single PAGE_SIZE page. With the upcoming stage-2 huge mappings for pKVM np-guests, those callbacks will get size > PAGE_SIZE. Loop the CMOs on a PAGE_SIZE basis until the whole range is done. Signed-off-by: Vincent Donnefort Link: https://lore.kernel.org/r/20250521124834.1070650-2-vdonnefort@google.com Signed-off-by: Marc Zyngier commit d5702dd22427789bc2178e942d92a2245e87b31a Merge: cd6b97bc897101 48d56450729308 Author: Marc Zyngier Date: Wed May 21 14:33:43 2025 +0100 Merge branch kvm-arm64/pkvm-selftest-6.16 into kvm-arm64/pkvm-np-thp-6.16 * kvm-arm64/pkvm-selftest-6.16: : . : pKVM selftests covering the memory ownership transitions by : Quentin Perret. From the initial cover letter: : : "We have recently found a bug [1] in the pKVM memory ownership : transitions by code inspection, but it could have been caught with a : test. : : Introduce a boot-time selftest exercising all the known pKVM memory : transitions and importantly checks the rejection of illegal transitions. : : The new test is hidden behind a new Kconfig option separate from : CONFIG_EL2_NVHE_DEBUG on purpose as that has side effects on the : transition checks ([1] doesn't reproduce with EL2 debug enabled). : : [1] https://lore.kernel.org/kvmarm/20241128154406.602875-1-qperret@google.com/" : . KVM: arm64: Extend pKVM selftest for np-guests KVM: arm64: Selftest for pKVM transitions KVM: arm64: Don't WARN from __pkvm_host_share_guest() KVM: arm64: Add .hyp.data section Signed-off-by: Marc Zyngier commit cd6b97bc897101652a203839912e17bb3d1a2db8 Merge: b4432656b36e5c 43c475504a39e9 Author: Marc Zyngier Date: Wed May 21 14:33:39 2025 +0100 Merge branch kvm-arm64/pkvm-6.16 into kvm-arm64/pkvm-np-thp-6.16 * kvm-arm64/pkvm-6.16: : . : pKVM memory management cleanups, courtesy of Quentin Perret. : From the cover letter: : : "This series moves the hypervisor's ownership state to the hyp_vmemmap, : as discussed in [1]. The two main benefits are: : : 1. much cheaper hyp state lookups, since we can avoid the hyp stage-1 : page-table walk; : : 2. de-correlates the hyp state from the presence of a mapping in the : linear map range of the hypervisor; which enables a bunch of : clean-ups in the existing code and will simplify the introduction of : other features in the future (hyp tracing, ...)" : . KVM: arm64: Unconditionally cross check hyp state KVM: arm64: Defer EL2 stage-1 mapping on share KVM: arm64: Move hyp state to hyp_vmemmap KVM: arm64: Introduce {get,set}_host_state() helpers KVM: arm64: Use 0b11 for encoding PKVM_NOPAGE KVM: arm64: Fix pKVM page-tracking comments KVM: arm64: Track SVE state in the hypervisor vcpu structure Signed-off-by: Marc Zyngier commit 869c788909b93a78ead1ca28c42b95eeb0779215 Author: Thomas Weißschuh Date: Mon May 5 17:15:30 2025 +0200 selftests: harness: Stop using setjmp()/longjmp() Usage of longjmp() was added to ensure that teardown is always run in commit 63e6b2a42342 ("selftests/harness: Run TEARDOWN for ASSERT failures") However instead of calling longjmp() to the teardown handler it is easier to just call the teardown handler directly from __bail(). Any potential duplicate teardown invocations are harmless as the actual handler will only ever be executed once since commit fff37bd32c76 ("selftests/harness: Fix fixture teardown"). Additionally this removes a incompatibility with nolibc, which does not support setjmp()/longjmp(). Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-12-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit f46ddc2cbac34d73f959c798505d81413866ecf0 Author: Thomas Weißschuh Date: Mon May 5 17:15:29 2025 +0200 selftests: harness: Add "variant" and "self" to test metadata To get rid of setjmp()/longjmp(), the variant and self need to be usable from __bail(). Make them available from the test metadata. Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-11-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 5f036a2a8e0985e52f7cf63a06f51911b5e8cae2 Author: Thomas Weißschuh Date: Mon May 5 17:15:28 2025 +0200 selftests: harness: Add teardown callback to test metadata To get rid of setjmp()/longjmp(), the teardown logic needs to be usable from __bail(). Introduce a new callback for it. Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-10-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 906dbc17d61c3877b93407dafdff443fc6e21d7f Author: Thomas Weißschuh Date: Mon May 5 17:15:27 2025 +0200 selftests: harness: Move teardown conditional into test metadata To get rid of setjmp()/longjmp(), the teardown logic needs to be usable from __bail(). To access the atomic teardown conditional from there, move it into the test metadata. This also allows the removal of "setup_completed". Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-9-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit fb25e99bce8d6e72d976c6e9a6a238298936ae94 Author: Thomas Weißschuh Date: Mon May 5 17:15:26 2025 +0200 selftests: harness: Don't set setup_completed for fixtureless tests This field is unused and has no meaning for tests without fixtures. Don't set it for them. Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-8-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 73a3cde97677933f292d678fcc84bae5d9ac2651 Author: Thomas Weißschuh Date: Mon May 5 17:15:25 2025 +0200 selftests: harness: Implement test timeouts through pidfd Make the kselftest harness compatible with nolibc which does not implement signals by replacing the signal logic with pidfds. The code also becomes simpler. Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-7-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 67ee52611b4d7a0da38e82409b86607c3a43fe8d Author: Thomas Weißschuh Date: Mon May 5 17:15:24 2025 +0200 selftests: harness: Remove dependency on libatomic __sync_bool_compare_and_swap() is deprecated and requires libatomic on GCC. Compiler toolchains don't necessarily have libatomic available, so avoid this requirement by using atomics that don't need libatomic. Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-6-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 5cccec7239c4765f5339951b1aa9063b80cfc29f Author: Thomas Weißschuh Date: Mon May 5 17:15:23 2025 +0200 selftests: harness: Remove inline qualifier for wrappers The pointers to the wrappers are stored in function pointers, preventing them from actually being inlined. Remove the inline qualifier, aligning these wrappers with the other functions defined through macros. Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-5-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit c2bcc8e9577a35f9cf4707f8bb0b58bce30991aa Author: Thomas Weißschuh Date: Mon May 5 17:15:22 2025 +0200 selftests: harness: Mark functions without prototypes static With -Wmissing-prototypes the compiler will warn about non-static functions which don't have a prototype defined. As they are not used from a different compilation unit they don't need to be defined globally. Avoid the issue by marking the functions static. Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-4-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 6c409e0d87e340c2ce16fc3a1dd5b625c73fe54b Author: Thomas Weißschuh Date: Mon May 5 17:15:21 2025 +0200 selftests: harness: Ignore unused variant argument warning For tests without fixtures the variant argument is unused. This is intentional, prevent to compiler from complaining. Example warning: harness-selftest.c: In function 'wrapper_standalone_pass': ../kselftest_harness.h:181:52: error: unused parameter 'variant' [-Werror=unused-parameter] 181 | struct __fixture_variant_metadata *variant) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../kselftest_harness.h:156:25: note: in expansion of macro '__TEST_IMPL' 156 | #define TEST(test_name) __TEST_IMPL(test_name, -1) | ^~~~~~~~~~~ harness-selftest.c:15:1: note: in expansion of macro 'TEST' 15 | TEST(standalone_pass) { | ^~~~ Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-3-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 575eca2c8c7d40a1dccb0e3abc58ed13f45c4e8a Author: Thomas Weißschuh Date: Mon May 5 17:15:20 2025 +0200 selftests: harness: Use C89 comment style All comments in this file use C89 comment style. Except for this one. Change it to get one step closer to C89 compatibility. Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-2-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit df82ffc5a3c18b21ea0140faed81241c7d273e88 Author: Thomas Weißschuh Date: Mon May 5 17:15:19 2025 +0200 selftests: harness: Add kselftest harness selftest Add a selftest for the kselftest harness itself so any changes can be validated. Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-1-ee4dd5257135@linutronix.de Signed-off-by: Thomas Weißschuh commit 2011097c17c6c947efd57ade071927c13784dcbc Author: Thomas Weißschuh Date: Thu May 15 21:57:55 2025 +0200 selftests/nolibc: drop include guards around standard headers Nolibc now provides all the headers required by nolibc-test.c. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-9-74f82eea3b59@weissschuh.net Acked-by: Willy Tarreau commit 2217abe09ce4e0dcbe17ed83b44cb48de11fae1d Author: Thomas Weißschuh Date: Thu May 15 21:57:54 2025 +0200 tools/nolibc: move NULL and offsetof() to sys/stddef.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-8-74f82eea3b59@weissschuh.net commit 0f971358dcf34ca4e430e828582cb1c70cfe1f70 Author: Thomas Weißschuh Date: Thu May 15 21:57:53 2025 +0200 tools/nolibc: move uname() and friends to sys/utsname.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-7-74f82eea3b59@weissschuh.net commit e1211e2206356785365f065ece4965a997903f69 Author: Thomas Weißschuh Date: Thu May 15 21:57:52 2025 +0200 tools/nolibc: move makedev() and friends to sys/sysmacros.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-6-74f82eea3b59@weissschuh.net commit 9089524753b480b7a169004c46296d1e45103a31 Author: Thomas Weißschuh Date: Thu May 15 21:57:51 2025 +0200 tools/nolibc: move getrlimit() and friends to sys/resource.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-5-74f82eea3b59@weissschuh.net commit 2efb9050909f1fc0db39b2600bada8341ebc56c3 Author: Thomas Weißschuh Date: Thu May 15 21:57:50 2025 +0200 tools/nolibc: move reboot() to sys/reboot.h This is the location regular userspace expects this definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-4-74f82eea3b59@weissschuh.net commit 3edd5365f99eeff38c5d31d9809afa6231e6de2d Author: Thomas Weißschuh Date: Thu May 15 21:57:49 2025 +0200 tools/nolibc: move prctl() to sys/prctl.h This is the location regular userspace expects this definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-3-74f82eea3b59@weissschuh.net commit 6e7c805a93a07ca9b1de49e8a020ab6c05e93f4e Author: Thomas Weißschuh Date: Thu May 15 21:57:48 2025 +0200 tools/nolibc: move mount() to sys/mount.h This is the location regular userspace expects this definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-2-74f82eea3b59@weissschuh.net commit 7281be583117d7ff12c52684ffc732e6ffca8f58 Author: Thomas Weißschuh Date: Thu May 15 21:57:47 2025 +0200 tools/nolibc: move ioctl() to sys/ioctl.h This is the location regular userspace expects this definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-1-74f82eea3b59@weissschuh.net commit 59303930326ac00bec5ec61321d662a165350939 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:16 2025 +0200 tools/nolibc: implement wait() in terms of waitpid() Newer architectures like riscv 32-bit are missing sys_wait4(). Make use of the fact that wait(&status) is defined to be equivalent to waitpid(-1, status, 0) to implement it on all architectures. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-15-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 5e7392dc82ed7bf3e734cbca77a1c6fd044ec871 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:15 2025 +0200 tools/nolibc: fall back to sys_clock_gettime() in gettimeofday() Newer architectures (like riscv32) do not implement sys_gettimeofday(). In those cases fall back to sys_clock_gettime(). While that does not support the timezone argument of sys_gettimeofday(), specifying this argument invokes undefined behaviour, so it's safe to ignore. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-14-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit a009a0c6faa9e7ffac13d55ef6cdac1f9a68efbe Author: Thomas Weißschuh Date: Mon Apr 28 14:40:14 2025 +0200 tools/nolibc: add fopen() This is used in various selftests and will be handy when integrating those with nolibc. Only the standard POSIX modes are supported. No extensions nor the (noop) "b" from ISO C are accepted. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-13-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 256dc7339d466f4d928be48ced6d590a99d447cc Author: Thomas Weißschuh Date: Mon Apr 28 14:40:13 2025 +0200 tools/nolibc: add namespace functionality This is used in various selftests and will be handy when integrating those with nolibc. Not all configurations support namespaces, so skip the tests where necessary. Also if the tests are running without privileges. Enable the namespace configuration for those architectures where it is not enabled by default. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-12-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 7ff3c71a4795f524b4dc643db4d00d4467be26a0 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:12 2025 +0200 tools/nolibc: add difftime() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-11-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit da69cfb17b2afbb8692b74eefb844f85febb6674 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:11 2025 +0200 tools/nolibc: add timerfd functionality This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-10-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit fa7bf84486e48c65c5e450248b5d6922352203d1 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:10 2025 +0200 tools/nolibc: add timer functions This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-9-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 50647213e115cbf5eb92c56a076af34dcd984174 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:09 2025 +0200 tools/nolibc: add clock_getres(), clock_gettime() and clock_settime() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-8-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 857faddd16c52b267da6519ba03d4578046f056f Merge: c8e1927e7f7d63 0f9a1739dd0e1c Author: Ard Biesheuvel Date: Wed May 21 15:32:06 2025 +0200 Merge branch 'efi-sbat' into efi/next commit 1e10b8534f5af42b7da528c254595f2a0cf4997d Author: Thomas Weißschuh Date: Mon Apr 28 14:40:08 2025 +0200 tools/nolibc: add support for access() and faccessat() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-7-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit bf5e8a78beded3503bbcfe86b3094a42ce492556 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:07 2025 +0200 tools/nolibc: add abs() and friends This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-6-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 801f020b5f3d6159826ca38f63cd55e5536b35dd Author: Thomas Weißschuh Date: Mon Apr 28 14:40:06 2025 +0200 tools/nolibc: add getrandom() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-5-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 55175d8659d22bfde30d4a1277328f090d8c0c2f Author: Thomas Weißschuh Date: Mon Apr 28 14:40:05 2025 +0200 tools/nolibc: add mremap() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-4-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 2337d39f7233fc3fb9d90489f0d48904eb129a2e Author: Thomas Weißschuh Date: Mon Apr 28 14:40:04 2025 +0200 tools/nolibc: add more stat() variants Add fstat(), fstatat() and lstat(). All of them use the existing implementation based on statx(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-3-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 7a7cd445d9275be8e4650d390156595685c3ac03 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:03 2025 +0200 tools/nolibc: add %m printf format The %m format can be used to format the current errno. It is non-standard but supported by other commonly used libcs like glibc and musl, so applications do rely on them. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-2-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 05b6b2a9efa4b40b7bc1668f887b7d98f719efb1 Author: Thomas Weißschuh Date: Mon Apr 28 14:40:02 2025 +0200 tools/nolibc: add strstr() This is used in various selftests and will be handy when integrating those with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-1-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh commit 1f421ddf494d3263842bcf430a683aaf33c3e31c Author: Thomas Weißschuh Date: Wed Apr 30 11:35:33 2025 +0200 tools/nolibc: use poll-related definitions from UAPI headers The UAPI headers already provide definitions for these symbols. Using them makes the code shorter, more robust and compatible with applications using linux/poll.h directly. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250430-poll-v1-2-44b5ceabdeee@linutronix.de Signed-off-by: Thomas Weißschuh commit dc2c656e1f687d9f8decc4ee10092ee7258722c1 Author: Thomas Weißschuh Date: Wed Apr 30 11:35:32 2025 +0200 tools/nolibc: move poll() to poll.h This is the location regular userspace expects the definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250430-poll-v1-1-44b5ceabdeee@linutronix.de Signed-off-by: Thomas Weißschuh commit 66a4f9bb1e895aa64f0e786f4cd9864929242e4f Author: Daniel Palmer Date: Sun Apr 27 07:47:38 2025 +0900 tools/nolibc: Add m68k support Add nolibc support for m68k. Should be helpful for nommu where linking libc can bloat even hello world to the point where you get an OOM just trying to load it. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20250426224738.284874-1-daniel@0x0f.com Signed-off-by: Thomas Weißschuh commit 443c6467fcd65d10506b473cc6b187f95bcb2b22 Author: Thomas Weißschuh Date: Thu Apr 24 13:48:13 2025 +0200 selftests/nolibc: always run nolibc header check Prevent regressions of issues validates by the header check by always running it together with the nolibc selftests. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250424-nolibc-header-check-v1-3-011576b6ed6f@linutronix.de commit 3785289f97e2118b157332ffaae9fd2ec71237c8 Author: Thomas Weißschuh Date: Thu Apr 24 13:48:12 2025 +0200 tools/nolibc: include nolibc.h early from all header files Inclusion of any nolibc header file should also bring all other headers. On the other hand it should also be possible to include any nolibc header files in any order. Currently this is implemented by including the catch-all nolibc.h after the headers own definitions. This is problematic if one nolibc header depends on another one. The first header has to include the other one before defining any symbols. That in turn will include the rest of nolibc while the current header has not defined anything yet. If any other part of nolibc depends on definitions from the current header, errors are encountered. This is already the case today. Effectively nolibc can only be included in the order of nolibc.h. Restructure the way "nolibc.h" is included. Move it to the beginning of the header files and before the include guards. Now any header will behave exactly like "nolibc.h" while the include guards prevent any duplicate definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250424-nolibc-header-check-v1-2-011576b6ed6f@linutronix.de commit a6a054c8ad32b04c2e5d3cc5592fa737a2bb771f Author: Thomas Weißschuh Date: Thu Apr 24 13:48:11 2025 +0200 tools/nolibc: add target to check header usability Each nolibc header should be valid for inclusion irrespective of any special ordering requirements. Add a new make target, based on the old kbuild "make header_check" target to validate this requirement. For now the check fails, but the following commits will fix the issues. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250424-nolibc-header-check-v1-1-011576b6ed6f@linutronix.de commit 0f9a1739dd0e1ca3942e51dc3ec18f0d68c23be5 Author: Vitaly Kuznetsov Date: Tue May 13 14:58:07 2025 +0200 efi: zboot specific mechanism for embedding SBAT section SBAT is a mechanism which improves SecureBoot revocations of UEFI binaries by introducing a generation-based technique. Compromised or vulnerable UEFI binaries can be prevented from booting by bumping the minimal required generation for the specific component in the bootloader. More information on the SBAT can be obtained here: https://github.com/rhboot/shim/blob/main/SBAT.md Upstream Linux kernel does not currently participate in any way in SBAT as there's no existing policy in how SBAT generation number should be defined. Keep the status quo and provide a mechanism for distro vendors and anyone else who signs their kernel for SecureBoot to include their own SBAT data. This leaves the decision on the policy to the vendor. Basically, each distro implementing SecureBoot today, will have an option to inject their own SBAT data during kernel build and before it gets signed by their SecureBoot CA. Different distro do not need to agree on the common SBAT component names or generation numbers as each distro ships its own 'shim' with their own 'vendor_cert'/'vendor_db' Implement support for embedding SBAT data for architectures using zboot (arm64, loongarch, riscv). Put '.sbat' section in between '.data' and '.text' as the former also covers '.bss' and thus must be the last one. Reviewed-by: Ard Biesheuvel Signed-off-by: Vitaly Kuznetsov Signed-off-by: Ard Biesheuvel commit 0c86e33819785fe50616b6ee3fb35c1e4be406d5 Author: Matti Vaittinen Date: Wed May 14 09:25:13 2025 +0300 dt-bindings: iio: adc: Add ROHM BD79100G The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has no MOSI pin. ADC results can be read from MISO by clocking in 16 bits. The 4 leading bits will be zero, last 12 containig the data. Device has only VCC supply pin, which acts also as a VFS, determining the voltage for full 12-bits. Specifying it is mandatory. This seems identical to the ti,ads7866. Support ROHM BU79100G using ti,ads7866 as a fallback. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://patch.msgid.link/4907a096eee1f54afae834213cf721b551382d4e.1747203712.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 5aef97a9126e2441744e0faab4850e6274e23519 Author: Eason Yang Date: Mon May 12 16:31:56 2025 +0800 iio: adc: add support for Nuvoton NCT7201 Add Nuvoton NCT7201/NCT7202 system voltage monitor 12-bit ADC driver NCT7201/NCT7202 supports up to 12 analog voltage monitor inputs and up to 4 SMBus addresses by ADDR pin. Meanwhile, ALERT# hardware event pins for independent alarm signals, and all the threshold values could be set for system protection without any timing delay. It also supports reset input RSTIN# to recover system from a fault condition. Currently, only single-edge mode conversion and threshold events are supported. Signed-off-by: Eason Yang Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250512083156.3300006-3-j2anfernee@gmail.com Signed-off-by: Jonathan Cameron commit c8c2db399758427a42747d89e220a7d5b7b55bfb Author: Eason Yang Date: Mon May 12 16:31:55 2025 +0800 dt-bindings: iio: adc: add NCT7201 ADCs Add a binding specification for the Nuvoton NCT7201/NCT7202 up to 12-bit ADCs with I2C interface. Signed-off-by: Eason Yang Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250512083156.3300006-2-j2anfernee@gmail.com Signed-off-by: Jonathan Cameron commit d524b3e0efa01db32f43957e58b4251c1eb48a5f Author: Tóth János Date: Tue May 6 11:01:16 2025 +0200 iio: chemical: Add driver for SEN0322 Add support for the DFRobot SEN0322 oxygen sensor. To instantiate (assuming device is connected to I2C-2): echo 'sen0322 0x73' > /sys/class/i2c-dev/i2c-2/device/new_device To get the oxygen concentration (assuming device is iio:device0) multiply the values read from: /sys/bus/iio/devices/iio:device0/in_concentration_raw /sys/bus/iio/devices/iio:device0/in_concentration_scale Datasheet: https://wiki.dfrobot.com/Gravity_I2C_Oxygen_Sensor_SKU_SEN0322 Signed-off-by: Tóth János Link: https://patch.msgid.link/20250506-iio-chemical-sen0322-v4-2-1465ac8dc190@gmail.com Signed-off-by: Jonathan Cameron commit 844ca960dfe00bee5ef1e82b626478fa3aa280ac Author: Tóth János Date: Tue May 6 11:01:15 2025 +0200 dt-bindings: trivial-devices: Document SEN0322 Add documentation for the DFRobot SEN0322 oxygen sensor. Acked-by: Krzysztof Kozlowski Signed-off-by: Tóth János Link: https://patch.msgid.link/20250506-iio-chemical-sen0322-v4-1-1465ac8dc190@gmail.com Signed-off-by: Jonathan Cameron commit 034c71a287d0e39c73d88015d8fcaa01072be440 Author: Jonathan Santos Date: Thu May 8 14:03:04 2025 -0300 iio: adc: ad7768-1: reorganize driver headers Remove kernel.h since it adds a lot of unnecessary dependencies. Add specific headers to ensure all functions and macros used in the driver are directly declared. Suggested-by: Andy Shevchenko Signed-off-by: Jonathan Santos Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/1f7677d31a0165cb30d7eb3b4d613e1337937f9a.1746662899.git.Jonathan.Santos@analog.com Signed-off-by: Jonathan Cameron commit 018f50909e66941916b5422ed7aee7475285b0c0 Author: David Lechner Date: Tue May 6 13:49:57 2025 -0500 iio: bmp280: zero-init buffer Zero-initialize the buffer used with iio_push_to_buffers_with_ts(). The struct used for the buffer has holes in it, so we need to make sure that the holes are zeroed out rather than containing uninitialized data from the stack. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-iio/aBoBR5D1UMjsSUfZ@stanley.mountain/ Fixes: 872c8014e05e ("iio: pressure: bmp280: drop sensor_data array") Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250506-iio-pressure-bmp280-zero-init-buffer-v1-1-0935c31558ac@baylibre.com Signed-off-by: Jonathan Cameron commit ed7a1e88ad46fa73eeaec14294ddae6a5a518245 Author: Ahelenia Ziemiańska Date: Tue May 6 21:10:02 2025 +0200 iio: ssp_sensors: optimalize -> optimize Signed-off-by: Ahelenia Ziemiańska Link: https://patch.msgid.link/5a64aa3034c6127d7587de9b7045a12892c01ee5.1746558529.git.nabijaczleweli@nabijaczleweli.xyz Signed-off-by: Jonathan Cameron commit 27737b8407585c0160063b9b39e888d486d86188 Author: Chelsy Ratnawat Date: Tue May 6 22:57:45 2025 -0700 HID: sensor-hub: Fix typo and improve documentation Includes the following corrections - - Changed Measurment -> Measurement - Changed clode -> close - Gyro -> gyro Signed-off-by: Chelsy Ratnawat Reviewed-by: David Lechner Link: https://patch.msgid.link/20250507055745.4069933-1-chelsyratnawat2001@gmail.com Signed-off-by: Jonathan Cameron commit 6cdb4009c20186cc3aed7b09187d1cd366960d78 Author: Colin Ian King Date: Wed May 7 14:45:02 2025 +0100 iio: admv1013: replace redundant ternary operator with just len The variable ret is being assigned a return value and non-zero error return paths are taken at all stages. At the end of the function ret is always zero, so the ternary operator checking for zero ret is redundant and can be replaced with just len instead. Signed-off-by: Colin Ian King Reviewed-by: David Lechner Link: https://patch.msgid.link/20250507134502.254736-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron commit 805bbd3ac96dd66410d44b8ed1faa45f43ef1afb Author: Dan Carpenter Date: Wed May 7 15:59:00 2025 +0300 iio: chemical: mhz19b: Fix error code in probe() Return -ENOMEM if devm_iio_device_alloc() fails. Don't return success. Fixes: 4572a70b3681 ("iio: chemical: Add support for Winsen MHZ19B CO2 sensor") Signed-off-by: Dan Carpenter Reviewed-by: David Lechner Acked-by: Gyeyoung Baek Link: https://patch.msgid.link/aBtZFLFlr0slcYSi@stanley.mountain Signed-off-by: Jonathan Cameron commit 04c129077689ee8f01bf3443377bd95d96871339 Author: David Lechner Date: Wed May 7 15:42:46 2025 -0500 iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS Use IIO_DECLARE_BUFFER_WITH_TS() to declare the buffer that gets used with iio_push_to_buffers_with_ts(). This makes the code a bit easier to read and understand. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-7-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit edeb67fbbf4b59a025a27891b92a9fc07e77d2f2 Author: David Lechner Date: Wed May 7 15:42:45 2025 -0500 iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS Use IIO_DECLARE_BUFFER_WITH_TS() to declare the buffer that gets used with iio_push_to_buffers_with_ts(). This makes the code a bit easier to read and understand. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-6-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit 6d06978f918db6c2710bfc6138fdd6131dc939c7 Author: David Lechner Date: Wed May 7 15:42:44 2025 -0500 iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS Use IIO_DECLARE_DMA_BUFFER_WITH_TS() to declare the buffer that gets used with iio_push_to_buffers_with_ts(). This makes the code a bit easier to read and understand. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-5-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit 76a67e394d11e63d427dde89831166f29c335d68 Author: David Lechner Date: Wed May 7 15:42:43 2025 -0500 iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS Rename AD4695_MAX_CHANNELS to AD4695_MAX_VIN_CHANNELS. It has been a point of confusion that this macro is only the voltage input channels and not all channels. Reviewed-by: Trevor Gamblin Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-4-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit 51924ff5ab16e05e0b4fd12f9b2cf6c122f36e89 Author: David Lechner Date: Wed May 7 15:42:42 2025 -0500 iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS Use IIO_DECLARE_DMA_BUFFER_WITH_TS() to declare the buffer that gets used with iio_push_to_buffers_with_ts(). This makes the code a bit easier to read and understand. Reviewed-by: Trevor Gamblin Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-3-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit 63fc53526d3090b27bd06bb43b92e8bc85f46fb1 Author: David Lechner Date: Wed May 7 15:42:41 2025 -0500 iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros Add new macros to help with the common case of declaring a buffer that is safe to use with iio_push_to_buffers_with_ts(). This is not trivial to do correctly because of the alignment requirements of the timestamp. This will make it easier for both authors and reviewers. To avoid double __align() attributes in cases where we also need DMA alignment, add a 2nd variant IIO_DECLARE_DMA_BUFFER_WITH_TS(). Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-2-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit fa19c303254bae5b8d105ecdc7d714d092f2adda Author: David Lechner Date: Wed May 7 15:42:40 2025 -0500 iio: make IIO_DMA_MINALIGN minimum of 8 bytes Add a condition to ensure that IIO_DMA_MINALIGN is at least 8 bytes. On some 32-bit architectures, IIO_DMA_MINALIGN is 4. In many cases, drivers are using this alignment for buffers that include a 64-bit timestamp that is used with iio_push_to_buffers_with_ts(), which expects the timestamp to be aligned to 8 bytes. To handle this, we can just make IIO_DMA_MINALIGN at least 8 bytes. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-1-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron commit 666eae6c6dab46cb5023170651286c47a693f661 Author: David Lechner Date: Mon May 5 14:20:41 2025 -0500 iio: pressure: zpa2326_spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the zpa2326 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-14-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 5b6bfe1354be25e9ebf8e48cdb721294d51a8c0f Author: David Lechner Date: Mon May 5 14:20:40 2025 -0500 iio: pressure: ms5611_spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ms5611 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-13-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 10918e71ac930c17b6ee9b26f3351c4701c839e0 Author: David Lechner Date: Mon May 5 14:20:39 2025 -0500 iio: pressure: bmp280-spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the bmp280 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Since no other SPI settings are changed, we can also remove the call to spi_setup(). Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-12-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 3108b5e0bc4f15d48bb43224e6ecc9b7171f26ab Author: David Lechner Date: Mon May 5 14:20:38 2025 -0500 iio: magnetometer: rm3100-spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the rm3100 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-11-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit c48919febc15b7af18be38ba47a43594aa3ccf8a Author: David Lechner Date: Mon May 5 14:20:37 2025 -0500 iio: magnetometer: hmc5843_spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the hmc5843 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-10-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 6a1ebdb8a352bfdd53e726a15827a5d0485bad0f Author: David Lechner Date: Mon May 5 14:20:36 2025 -0500 iio: imu: adis: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the adis driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-9-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 3de7492148c7c43c3686cbae476ea3e5f22120c0 Author: David Lechner Date: Mon May 5 14:20:35 2025 -0500 iio: gyro: adxrs450: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the adxrs450 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-8-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit bfc50ab35a2256d78ad60aa77e83a03aa207639e Author: David Lechner Date: Mon May 5 14:20:34 2025 -0500 iio: dac: ltc2688: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ltc2688 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-7-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 3cdd2953b36732b3ad3e72f35a59c6a5fd7713e8 Author: David Lechner Date: Mon May 5 14:20:33 2025 -0500 iio: dac: ad5791: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ad5791 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-6-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 57e382e67ca3b372cef43a1bedc6fda54d9d3c6f Author: David Lechner Date: Mon May 5 14:20:32 2025 -0500 iio: dac: ad5766: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ad5766 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-5-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit f92bb6b71b042af8a1dc5aa897a20e0ca23392f1 Author: David Lechner Date: Mon May 5 14:20:31 2025 -0500 iio: dac: ad5761: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ad5761 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-4-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 2fa33f8710f763108fab3cc04bed31c0b3aba232 Author: David Lechner Date: Mon May 5 14:20:30 2025 -0500 iio: chemical: bme680_spi: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the bme680 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Since no other SPI settings are changed, we can also remove the call to spi_setup(). Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-3-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 0115e17e9fded16017ffde8207252fc0f21ddf8d Author: David Lechner Date: Mon May 5 14:20:29 2025 -0500 iio: adc: ti-tsc2046: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ti-tsc2046 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Oleksij Rempel Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-2-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 02b70dfe2f61cc245906e78deea774a1842e6573 Author: David Lechner Date: Mon May 5 14:20:28 2025 -0500 iio: adc: ad4030: remove bits_per_word = 8 Remove setting bits_per_word = 8 from the ad4030 driver. This is the default value for SPI transfers, so it is not necessary to explicitly set it. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-1-341f85fcfe11@baylibre.com Signed-off-by: Jonathan Cameron commit 3c5dfea39a245b2dad869db24e2830aa299b1cf2 Author: Arthur-Prince Date: Wed Apr 30 16:07:37 2025 -0300 iio: adc: ti-ads1298: Kconfig: add kfifo dependency to fix module build Add dependency to Kconfig’s ti-ads1298 because compiling it as a module failed with an undefined kfifo symbol. Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver") Signed-off-by: Arthur-Prince Co-developed-by: Mariana Valério Signed-off-by: Mariana Valério Link: https://patch.msgid.link/20250430191131.120831-1-r2.arthur.prince@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 157517b5e88d87721c90687538f643cceeb886f5 Author: Matti Vaittinen Date: Mon Apr 28 10:02:17 2025 +0300 iio: ti-adc128s052: Drop variable vref According to Jonathan, variable reference voltages are very rare. It is unlikely it is needed, and supporting it makes the code a bit more complex. Simplify the driver and drop the variable vref support. Suggested-by: Jonathan Cameron Signed-off-by: Matti Vaittinen Reviewed-by: David Lechner Link: https://patch.msgid.link/59106e24332743a7f9eb0b13ad6a2f5595ab485a.1745823530.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit ce45446e520c85db022f8bcd7f0334b042ff3571 Author: Marcelo Schmitt Date: Tue Apr 15 09:21:10 2025 -0300 iio: adc: ad4000: Avoid potential double data word read Currently, SPI-Engine offload module always sends 32-bit data elements to DMA engine. Appropriately, when set for SPI offloading, the IIO driver uses 32 storagebits for IIO ADC channel buffer elements. However, setting SPI transfer length according to storagebits (32-bits in case of offload) can lead to unnecessarily long transfers for ADCs that are 16-bit or less precision. Adjust AD4000 single-shot read to run transfers of 2 bytes when that is enough to get all ADC data bits. Fixes: 59b51edf717b ("iio: adc: ad4000: Add support for SPI offload") Suggested-by: David Lechner Signed-off-by: Marcelo Schmitt Reviewed-by: David Lechner Link: https://patch.msgid.link/8f765cfd6e93fad4e755dd95d709b7bea2a388e2.1744718916.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron commit f45a27b990a14c30e4edea7f3a427b03785b22c3 Author: Marcus Folkesson Date: Mon Apr 28 08:54:13 2025 +0200 iio: adc: mcp3911: add reset management Add support for optional HW reset. If specified, a reset will be asserted during driver probe. Co-developed-by: Lukas Rauber Signed-off-by: Lukas Rauber Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250428-mcp3911-fixes-v2-3-406e39330c3d@gmail.com Signed-off-by: Jonathan Cameron commit 94264cc9abbbec29c261bcb94aaaaa32e1535595 Author: Marcus Folkesson Date: Mon Apr 28 08:54:12 2025 +0200 dt-bindings: iio: adc: mcp3911: add reset-gpios The MCP391X family provides an active low reset signal that is still not described in the bindings. Add reset-gpios to the bindings and the example. Co-developed-by: Lukas Rauber Signed-off-by: Lukas Rauber Signed-off-by: Marcus Folkesson Acked-by: Conor Dooley Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250428-mcp3911-fixes-v2-2-406e39330c3d@gmail.com Signed-off-by: Jonathan Cameron commit f62c49d8f32d6ce8871b01795498352775aa61db Author: Marcus Folkesson Date: Mon Apr 28 08:54:11 2025 +0200 iio: adc: mcp3911: fix device dependent mappings for conversion result registers The conversion result registers differs between devices. Make sure the mapping is correct by using a device dependent .get_raw() callback function. Fixes: 732ad34260d3 ("iio: adc: mcp3911: add support for the whole MCP39xx family") Co-developed-by: Lukas Rauber Signed-off-by: Lukas Rauber Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250428-mcp3911-fixes-v2-1-406e39330c3d@gmail.com Signed-off-by: Jonathan Cameron commit 15c82338b3640daab2b7a2718a9eed93cfd8537a Author: David Lechner Date: Mon Apr 28 15:23:04 2025 -0500 iio: adc: ad4695: use u16 for buffer elements Change the type of the buffer elements to u16 since we currently only support 16-bit word size. The code was originally written to also allow for 32-bit word size when oversampling is enabled, but so far, oversampling is only implemented when using SPI offload and therefore doesn't use this buffer. AD4695_MAX_CHANNEL_SIZE macro is dropped since it no longer adds any value. AD4695_MAX_CHANNELS + 2 is changed to AD4695_MAX_CHANNELS + 1 because previously we were overallocating. AD4695_MAX_CHANNELS is the number of of voltage channels and + 1 is for the temperature channel. Signed-off-by: David Lechner Reviewed-by: Trevor Gamblin Link: https://patch.msgid.link/20250428-iio-introduce-iio_declare_buffer_with_ts-v4-2-6f7f6126f1cb@baylibre.com Signed-off-by: Jonathan Cameron commit 93583174a3dffdcf604507106cb1d404bd65669d Author: Kim Seer Paller Date: Tue Apr 29 10:19:18 2025 +0800 iio: dac: ad3530r: Add driver for AD3530R and AD3531R The AD3530/AD3530R (8-channel) and AD3531/AD3531R (4-channel) are low-power, 16-bit, buffered voltage output DACs with software- programmable gain controls, providing full-scale output spans of 2.5V or 5V for reference voltages of 2.5V. These devices operate from a single 2.7V to 5.5V supply and are guaranteed monotonic by design. The "R" variants include a 2.5V, 5ppm/°C internal reference, which is disabled by default. Support for monitoring internal die temperature, output voltages, and current of a selected channel via the MUXOUT pin using an external ADC is currently not implemented. Reviewed-by: David Lechner Signed-off-by: Kim Seer Paller Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250429-togreg-v7-3-0af9c543b545@analog.com Signed-off-by: Jonathan Cameron commit 6856e3617158c9a1990fb0d080734506abf36b89 Author: Kim Seer Paller Date: Tue Apr 29 10:19:17 2025 +0800 dt-bindings: iio: dac: Add adi,ad3530r.yaml Document the AD3530/AD3530R (8-channel) and AD3531/AD3531R (4-channel) low-power, 16-bit, buffered voltage output DACs with software- programmable gain controls. They provide full-scale output spans of 2.5V or 5V for reference voltages of 2.5V. These devices operate on a single 2.7V to 5.5V supply and are guaranteed to be monotonic by design. The "R" variants include a 2.5V, 5ppm/°C internal reference, which is disabled by default. Reviewed-by: Krzysztof Kozlowski Reviewed-by: David Lechner Signed-off-by: Kim Seer Paller Link: https://patch.msgid.link/20250429-togreg-v7-2-0af9c543b545@analog.com Signed-off-by: Jonathan Cameron commit 0cec113181c525a7dcfea3b366f56ef531d5bdf1 Author: Kim Seer Paller Date: Tue Apr 29 10:19:16 2025 +0800 iio: ABI: add new DAC powerdown mode Add a new powerdown mode for DACs with 7.7kohm and 32kohm resistor to GND. Reviewed-by: David Lechner Signed-off-by: Kim Seer Paller Link: https://patch.msgid.link/20250429-togreg-v7-1-0af9c543b545@analog.com Signed-off-by: Jonathan Cameron commit 7e00d74eacf77c98a60e7c754a9e5f73d8832095 Author: Chelsy Ratnawat Date: Thu May 1 17:36:55 2025 -0700 HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback() Fixed a typo in "registered" and improved grammar for better readability and consistency with kernel-doc standards. No functional changes. Signed-off-by: Chelsy Ratnawat Reviewed-by: David Lechner Link: https://patch.msgid.link/20250502003655.1943000-1-chelsyratnawat2001@gmail.com Signed-off-by: Jonathan Cameron commit 413e1d6a95fcbbc048b6fce32c523e0a225275cb Author: David Lechner Date: Mon Apr 28 21:17:14 2025 -0500 iio: adc: ad7606: explicit timestamp alignment Use struct with aligned_s64 timestamp to make timestamp alignment explicit. Technically, what we have works because for all known architectures, IIO_DMA_MINALIGN is a multiple of __alignof__(s64). But this way, we don't have to make people read the comments to know why there are extra elements in each buffer. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250428-iio-adc-ad7606-fix-buffer-alignment-v1-1-88dfc57e5df0@baylibre.com Signed-off-by: Jonathan Cameron commit 64794edd47ecda20aa065479f4d20b31d482a561 Author: Antoniu Miclaus Date: Fri May 2 13:00:16 2025 +0300 MAINTAINERS: add maintainers for ad4851 driver Add the ad4851 entry in the MAINTAINERS file. Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250502100016.26279-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit 017294e5a68ab2d09b380f912b30d36fc81edaa1 Author: David Lechner Date: Fri May 2 10:42:16 2025 -0500 iio: adc: ad7606_spi: add offload scan mask check Validate the scan mask when SPI offloading is being used. Since this family of ADCs is simultaneous sampling, there isn't a way to selectively disable channels when reading sample data. (Technically, AD7616 has a sequencer so the driver could have some control, but that is for another day). For "regular" IIO triggered buffer reads, this isn't a problem and the IIO core will demux the data and ignore data from disabled channels. However, since SPI offloading is done completely in hardware, we don't have a way to do the same. So before this patch, if less than all channels were enabled, the data would be misplaced in the buffer. By adding a check in update_scan_mode, we can fail to enable the buffer instead of having bad data returned to userspace. Fixes: e96d35faf357 ("iio: adc: ad7606: add SPI offload support") Signed-off-by: David Lechner Reviewed-by: Andy Shevchenko Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250502-iio-adc-ad7606_spi-fix-offload-scan-mask-check-v2-1-e70c6d71baa3@baylibre.com Signed-off-by: Jonathan Cameron commit 6eb974967a86d16bd4d19a9bf4869f4a8b85c572 Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:35 2025 +0200 dt-bindings: iio: adc: Add compatible for Dimensity 1200 MT6893 Add a compatible for the Dimensity 1200 (MT6893) SoC; The AUXADC IP in this chip is fully compatible with the one found in MT8173. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250416120235.147889-1-angelogioacchino.delregno@collabora.com Signed-off-by: Jonathan Cameron commit cdbc8b99ad3b50dc1a5a8bfca3beb4f8e415e207 Author: Antoniu Miclaus Date: Tue Apr 22 11:55:29 2025 +0300 iio: dac: ad7293: add adc reference configuration Add support for configurating the ADC reference (internal/external). According to the datasheet, the external reference is enabled by default. Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250422085529.4407-2-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit 55d0392fb177307d99cc5e5b9d1234413f0e7cb1 Author: Antoniu Miclaus Date: Tue Apr 22 11:55:28 2025 +0300 dt-bindings: iio: dac: ad7293: add vrefin support Add support for vrefin supply responsible for providing external reference to the SAR ADC within the part. Signed-off-by: Antoniu Miclaus Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250422085529.4407-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit fc0b0e82260f3b93f63325a89b4e4e17737b1421 Author: Arthur Pilone Date: Mon Apr 21 11:55:34 2025 -0300 iio: adc: ad7091r-base: Remove duplicate code on volatile reg check Both ad7091r_writeable_reg() and ad7091r_volatile_reg() perform the same test, checking whether a given 'reg' code is AD7091R_REG_RESULT or AD7091R_REG_ALERT. As the volatile ad7091r registers happen to be the only read-only ones, the volatile_reg() function now returns the negated output of writeable_reg(). Co-developed-by: Bruno Stephan Signed-off-by: Bruno Stephan Co-developed-by: Andre de Lima Signed-off-by: Andre de Lima Signed-off-by: Arthur Pilone Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250421145534.91146-1-arthurpilone@usp.br Signed-off-by: Jonathan Cameron commit 872c8014e05ed47b8a7c0f5ba4311279a637150b Author: David Lechner Date: Tue Apr 22 14:28:36 2025 -0500 iio: pressure: bmp280: drop sensor_data array Drop the sensor_data array from struct bmp280_data and replace it using local structs in each interrupt handler. The sensor_data array in struct bmp280_data is not used to share data between functions and isn't used for DMA, so there isn't really a need to have it in the struct. Instead, we can use the struct pattern for scan data in each interrupt handler. This has the advantage of allowing us to see the actual layout of each scan buffer for each different type of supported sensor. It also avoid juggling values between local variables and the array which makes the code a bit simpler by avoiding some extra assignments. We can also drop the BME280_NUM_MAX_CHANNELS macro as it is no longer used. Suggested-by: Jonathan Cameron Link: https://lore.kernel.org/linux-iio/20250421135540.1a667221@jic23-huawei/ Signed-off-by: David Lechner Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250422-iio-pressure-bmp280-rework-push-to-buffers-v1-1-ee722f29aeca@baylibre.com Signed-off-by: Jonathan Cameron commit 162129a27c693230fd15531d083b4574c9101a6b Author: Gyeyoung Baek Date: Thu Apr 24 04:41:00 2025 +0900 MAINTAINERS: Add WINSEN MHZ19B Add undersigned as a maintainer for the WINSEN MHZ19B. Signed-off-by: Gyeyoung Baek Link: https://patch.msgid.link/20250423194100.53934-5-gye976@gmail.com Signed-off-by: Jonathan Cameron commit 4572a70b3681e38055c78d12fb68cd147bdbee7d Author: Gyeyoung Baek Date: Thu Apr 24 04:40:59 2025 +0900 iio: chemical: Add support for Winsen MHZ19B CO2 sensor Add support for Winsen MHZ19B CO2 sensor. Datasheet: https://www.winsen-sensor.com/d/files/infrared-gas-sensor/mh-z19b-co2-ver1_0.pdf Signed-off-by: Gyeyoung Baek Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250423194100.53934-4-gye976@gmail.com Signed-off-by: Jonathan Cameron commit fd3730b2c7190454113a7fecc3be853c7628eb0f Author: Gyeyoung Baek Date: Thu Apr 24 04:40:58 2025 +0900 dt-bindings: Add device tree support for Winsen MHZ19B CO2 sensor Add device tree support for Winsen MHZ19B sensor. Signed-off-by: Gyeyoung Baek Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250423194100.53934-3-gye976@gmail.com Signed-off-by: Jonathan Cameron commit 028239a644b0da8637fc0c531bd4531d93824b02 Author: Gyeyoung Baek Date: Thu Apr 24 04:40:57 2025 +0900 dt-bindings: Add Winsen to the vendor prefixes Add Winsen to the vendor prefixes. Signed-off-by: Gyeyoung Baek Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250423194100.53934-2-gye976@gmail.com Signed-off-by: Jonathan Cameron commit 7ba4251181243ddd388be8d0c70564b5d9a8c3ca Author: Gustavo Vaz Date: Wed Apr 23 17:46:31 2025 -0300 iio: accel: kxcjk-1013: Deduplicate setup interrupt functions The contents of kxcjk1013_setup_any_motion_interrupt and kxcj1013_setup_new_data_interrupt are very similar. Deduplicate these functions by introducing a generic function named kxcjk1013_setup_interrupt that has an additional flag indicating if it's a new data interrupt. Signed-off-by: Gustavo Vaz Co-developed-by: Francisco Henriques Signed-off-by: Francisco Henriques Link: https://patch.msgid.link/20250423204631.16460-1-gustavo.vaz@usp.br Signed-off-by: Jonathan Cameron commit e50cf7e2e6e0e1fe106384eab938faf712e6230f Author: Gwendal Grignou Date: Wed Apr 23 15:05:06 2025 -0700 iio: cros_ec_sensors: Flush when changing the FIFO timeout |hwfifo_timeout| is used by the EC firmware only when new samples are available. When the timeout changes, espcially when the new timeout is shorter than the current one, send the samples waiting in the FIFO to the host. Inline the call to transmit |hwfifo_timeout| value to the firmware. Now flush when a sensor is suspended (ODR set to 0) as well. Signed-off-by: Gwendal Grignou Link: https://patch.msgid.link/20250423220506.2061021-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 50ed17cdfd7f32f1b0f87da0aaabcd5e8dd23f19 Author: Beatriz Viana Costa Date: Wed Apr 23 21:21:44 2025 -0300 iio: light: zopt2201: Remove code duplication in scale write functions Consolidate duplicated logic from zopt2201_write_scale_als_by_idx() and zopt2201_write_scale_uvb_by_idx() into a new generic helper function zopt2201_write_scale_by_idx(). This function takes an additional parameter: a pointer to a zopt2201_scale array. To support this, the previously anonymous and duplicated struct used in the scale arrays was promoted to a named struct: zopt2201_scale. This change also corrects an incorrect array access that existed in zopt2201_write_scale_uvb_by_idx(). Signed-off-by: Beatriz Viana Costa Co-developed-by: Gabriela Victor Signed-off-by: Gabriela Victor Link: https://patch.msgid.link/20250424002144.23260-1-beatrizvianacosta16@gmail.com Signed-off-by: Jonathan Cameron commit 52c43d80fa8370eb877fc63b1fc1eec67e1b1410 Author: Marius Cristea Date: Thu Apr 24 11:06:33 2025 +0300 iio: adc: PAC1934: fix typo in documentation link Fix a typo,(PAC1934 -> PAC193X), into the link from an application note related to the ACPI device definition. Fixes: 0fb528c8255b ("iio: adc: adding support for PAC193x") Reported-by: Matteo Martelli Closes: https://patch.msgid.link/172794015844.2520.11909797050797595912@njaxe.localdomain Signed-off-by: Marius Cristea Reviewed-by: David Lechner Link: https://patch.msgid.link/20250424-pac1934-doc_link-v1-1-9832445cb270@microchip.com Signed-off-by: Jonathan Cameron commit dadf2477e3d67bb8b53ca8b7c2ace720dc5c440f Author: Olivier Moysan Date: Thu Apr 24 17:16:03 2025 +0200 iio: adc: stm32: add oversampling support Add oversampling support for STM32H7, STM32MP15 & STM32MP13. STM32F4 ADC has no oversampling feature. The current support of the oversampling feature aims at increasing the data SNR, without changing the data resolution. As the oversampling by itself increases data resolution, a right shift is applied to keep the initial resolution. Only the oversampling ratio corresponding to a power of two are supported here, to get a direct link between right shift and oversampling ratio. (2^n ratio <=> n right shift) The oversampling ratio is shared by all channels, whatever channel type. (e.g. single ended or differential). Oversampling can be configured using IIO ABI: - oversampling_ratio_available - oversampling_ratio Co-developed-by: Fabrice Gasnier Signed-off-by: Fabrice Gasnier Signed-off-by: Olivier Moysan Reviewed-by: David Lechner Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250424151604.626758-1-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron commit 60638e2a2d4bc03798f00d5ab65ce9b83cb8b03b Author: Gabriel Shahrouzi Date: Sat Apr 19 21:30:09 2025 -0400 staging: iio: ad5933: Correct settling cycles encoding per datasheet The AD5933 datasheet (Table 13) lists the maximum cycles to be 0x7FC (2044). Clamp the user input to the maximum effective value of 0x7FC cycles. Fixes: f94aa354d676 ("iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer") Cc: stable@vger.kernel.org Signed-off-by: Gabriel Shahrouzi Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250420013009.847851-1-gshahrouzi@gmail.com Signed-off-by: Jonathan Cameron commit b31a74075cb4ca2bb202a2e17d133ef3c9ee891f Author: David Lechner Date: Fri Apr 18 15:08:53 2025 -0500 iio: orientation: hid-sensor-rotation: remove unnecessary alignment Remove __aligned(16) in the scan data struct in the hid-sensor-rotation driver. There is nothing in the code that requires this alignment. Signed-off-by: David Lechner Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250418-iio-orientation-hid-sensor-rotation-remove-alignment-v1-1-6da68eae7ecf@baylibre.com Signed-off-by: Jonathan Cameron commit 6b7c0e9ddaccaac85e88e374260006d97f4b13f9 Author: David Lechner Date: Fri Apr 18 14:58:22 2025 -0500 iio: adc: hx711: use struct with aligned_s64 timestamp Use a struct with aligned s64_timestamp instead of a padded array for the buffer used for iio_push_to_buffers_with_ts(). This makes it easier to see the correctness of the size and alignment of the buffer. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250418-iio-prefer-aligned_s64-timestamp-v1-3-4c6080710516@baylibre.com Signed-off-by: Jonathan Cameron commit 0c2cdd1af6cc12d68932a837472e94fc1f2776d5 Author: Lothar Rubusch Date: Mon Apr 14 18:42:38 2025 +0000 iio: accel: adxl345: set the tap suppress bit permanently Set the suppress bit feature to the double tap detection, whenever double tap is enabled. This impedes the suppress bit dangling in any state, and thus varying in sensitivity for double tap detection. Any tap event is defined by a rising signal edge above threshold, i.e. duration time starts counting; and the falling edge under threshold within duration time, i.e. then the tap event is issued. This means duration is used individually for each tap event. For double tap detection after a single tap, a latency time needs to be specified. Usually tap events, i.e. spikes above and returning below threshold will be ignored within latency. After latency, the window time starts counting for a second tap detection which has to happen within a duration time. If the suppress bit is not set, spikes within latency time are ignored. Setting the suppress bit will invalidate the double tap function. The sensor will thus be able to save the window time for double tap detection, and follow a more strict definition of what signal qualifies for a double tap. In a summary having the suppress bit set, fewer signal spikes will be considered as double taps. This is an optional add on to double tap, thus a separate patch. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250414184245.100280-5-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 5b307f5aaf080e10adb97e60d0af926f7ff0edb1 Author: Lothar Rubusch Date: Mon Apr 14 18:42:37 2025 +0000 iio: accel: adxl345: add double tap feature Add the double tap feature of the sensor. The interrupt handler needs to catch and forward the event to the IIO channel. The single tap implementation now is extended to deal with double tap as well. Doubletap introduces window and latency times, both in us. Since both times are scaled, the 8-bit register value is stored in hardware, where the scaled value in [us] is stored as member variable. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250414184245.100280-4-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 7478933f036123ff1b374b2dcdcb2ca749cdbf6a Author: Lothar Rubusch Date: Mon Apr 14 18:42:36 2025 +0000 iio: accel: adxl345: add single tap feature Add the single tap feature with a threshold in 62.5mg/LSB points and a scaled duration in us. Keep singletap threshold in regmap cache but the scaled value of duration in us as member variable. Both use IIO channels for individual enable of the x/y/z axis. Initializes threshold and duration with reasonable content. When an interrupt is caught it will be pushed to the according IIO channel. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250414184245.100280-3-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 5aec2b6e19de9c3d71ac599e01d20b5720fbeb68 Author: Lothar Rubusch Date: Mon Apr 14 18:42:35 2025 +0000 iio: accel: adxl345: introduce adxl345_push_event function Move the fifo handling into a separate function. This is a preparation for a generic handling of the interrupt status register results. The function is supposed to handle particular sensor events, and later to forward them to the iio channel. This is needed to read out the interrupt status register. The function shall return occurring errors, if any, or 0 in case of handled events or read fifo content. Thus migrate fifo read-out and push fifo content to iio channels into this function to be built up with additional event handling. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250414184245.100280-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 1851c0f29d8a75ceeb1de1ac1379196a1f2aabaf Author: Dan Carpenter Date: Wed Apr 16 14:09:33 2025 +0300 iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() This code was converted to use guard locks but one of the unlocks was accidentally overlooked. Delete it. Fixes: 135e101f4dd6 ("iio: dac: ad5592r: use lock guards") Signed-off-by: Dan Carpenter Reviewed-by: Andy Shevchenko Reviewed-by: Nuno Sá Reviewed-by: Bartosz Golaszewski Link: https://patch.msgid.link/Z_-P7bsD3KL5K25R@stanley.mountain Signed-off-by: Jonathan Cameron commit 3012a122b2253fc4ea6070eb69b0b4531d27b3d8 Author: Gabriel Shahrouzi Date: Thu Apr 17 13:33:33 2025 -0400 iio: frequency: ad9832: Remove unused parameter from data documentation This is a leftover from the patch: commit 566564e80b0e ("staging: iio: ad9832: use clock framework for clock reference"). The AD9832 driver uses the Common Clock Framework (CCF) to obtain the master clock (MCLK) frequency rather than relying on a frequency value passed from platform data. Signed-off-by: Gabriel Shahrouzi Link: https://patch.msgid.link/20250417173333.607844-1-gshahrouzi@gmail.com Signed-off-by: Jonathan Cameron commit 85c9e6d592e1c171fd013965b2b1b07302db5884 Author: Siddharth Menon Date: Wed Apr 16 19:18:56 2025 +0530 iio: frequency: ad9832: Use FIELD_PREP macro to set bit fields Use bitfield and bitmask macros to clearly specify AD9832 SPI command fields to make register write code more readable. Suggested-by: Marcelo Schmitt Reviewed-by: Marcelo Schmitt Signed-off-by: Siddharth Menon Link: https://patch.msgid.link/20250416140259.13431-1-simeddon@gmail.com Signed-off-by: Jonathan Cameron commit 8f2d5147dd580f410c060dd710114a20979d7c69 Author: David Lechner Date: Thu Apr 17 11:52:35 2025 -0500 iio: addac: ad74413r: use aligned_s64 for timestamp Follow the pattern of other drivers and use aligned_s64 for the timestamp. Technically there was no issue here since AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX == 16 and IIO_DMA_MINALIGN is always a multiple of 8. But best to conform in case someone copies this to new code and then tweaks something. Also move the unaligned.h header while touching this since it was the only one not in alphabetical order. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250417-iio-more-timestamp-alignment-v1-3-eafac1e22318@baylibre.com Signed-off-by: Jonathan Cameron commit c88ec0d8ad8fc2ca522fe40546906f25bad53484 Author: David Lechner Date: Thu Apr 17 11:52:34 2025 -0500 iio: adc: mt6360-adc: use aligned_s64 for timestamp Follow the pattern of other drivers and use aligned_s64 for the timestamp. This will ensure that the timestamp is correctly aligned on all architectures. It also ensures that the struct itself it also 8-byte aligned so we can drop the explicit __aligned(8) attribute. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250417-iio-more-timestamp-alignment-v1-2-eafac1e22318@baylibre.com Signed-off-by: Jonathan Cameron commit f4cd499970cc9a0ade52132075d4faabf5ef77f5 Author: Jonathan Cameron Date: Sun Apr 13 11:34:43 2025 +0100 iio: magnetometer: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-21-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 77e8a16a7d820af111679952ded15a795471abdd Author: Jonathan Cameron Date: Sun Apr 13 11:34:42 2025 +0100 iio: pressure: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: Matti Vaittinen # ROHM BM1390 Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-20-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 886a446b76afddfad307488e95e87f23a08ffd51 Author: Jonathan Cameron Date: Sun Apr 13 11:34:41 2025 +0100 iio: pressure: zpa2326: Use aligned_s64 for the timestamp On x86_32 s64 fields are only 32-bit aligned. Hence force the alignment of the field and padding in the structure by using aligned_s64 instead. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-19-jic23@kernel.org Signed-off-by: Jonathan Cameron commit fc11c42dd13710342c05008a0bccf426247cb101 Author: Jonathan Cameron Date: Sun Apr 13 11:34:40 2025 +0100 iio: proximity: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-18-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 175c3f72154e4ef64ba56b0ee35110082ea475b4 Author: Jonathan Cameron Date: Sun Apr 13 11:34:39 2025 +0100 iio: proximity: irsd200: Use a struct for scan and iio_push_to_buffers_with_ts() The driver previously used an array of two s64, then type cast the pointer to write an s16 to the start. The code is made more readable using a structure. At the same time switch to the new iio_push_to_buffers_with_ts() helper to enable runtime checking of the size of the source buffer. Note that this approach uses a structure with holes, so use memset() to ensure those do not contain old kernel data as this data is passed to userspace. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-17-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 85eb82b3c2a4af98fce7f9a578d5970425ca36a8 Author: Jonathan Cameron Date: Sun Apr 13 11:34:38 2025 +0100 iio: resolver: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-16-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 1a715f5a47269a8d0088020198c3bfde9b34454d Author: Jonathan Cameron Date: Sun Apr 13 11:34:37 2025 +0100 iio: temperature: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-15-jic23@kernel.org Signed-off-by: Jonathan Cameron commit cb4691913d9edafe1d126548dfcdc748733da00b Author: Jonathan Cameron Date: Sun Apr 13 11:34:35 2025 +0100 iio: chemical: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-13-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 838a65c1d650b72849fe79ec4d52583542d7e346 Author: Jonathan Cameron Date: Sun Apr 13 11:34:34 2025 +0100 iio: accel: hid: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. For this case, the length being provided is already passed into the caller function so reuse that. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-12-jic23@kernel.org Signed-off-by: Jonathan Cameron commit edfafbd82f1d416ff4710b93d9fb38e742751685 Author: Jonathan Cameron Date: Sun Apr 13 11:34:33 2025 +0100 iio: accel: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-11-jic23@kernel.org Signed-off-by: Jonathan Cameron commit c65d3f3f938600345146df9f5cac7681c9f1b15e Author: Jonathan Cameron Date: Sun Apr 13 11:34:32 2025 +0100 iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-10-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 4d15307225ff15ed7352c01e570fdcca9bf0fe2c Author: Jonathan Cameron Date: Sun Apr 13 11:34:31 2025 +0100 iio: adc: ti-ads131e08: Use new iio_push_to_buffers_with_ts() to provide length sanity check. By providing the size of the buffer used, runtime checks can be performed to ensure not overrun. Also change the pushed data pointer to be that of the structure that also contains the timestamp. Not an actual bug but semantically incorrect to push the channel data when we want the storage with the timestamp as well. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-9-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 2d1168263bcb84c38f3475f2336b30ede4235ae1 Author: Jonathan Cameron Date: Sun Apr 13 11:34:30 2025 +0100 iio: dummy: Switch to iio_push_to_buffers_with_ts() and provide size of storage Provide the storage size so that the helper can sanity check that it is large enough for the configured channels. Reviewed-by: Nuno Sá Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-8-jic23@kernel.org Signed-off-by: Jonathan Cameron commit fda643a9530c86e503a90791392443cd47f3c997 Author: Jonathan Cameron Date: Sun Apr 13 11:34:29 2025 +0100 iio: dummy: Use a fixed structure to build up scan to push to buffers. It has long been discouraged for drivers to make use of iio_dev->scan_bytes directly as that is an implementation detail of the core. As such our example driver should definitely not be doing so. In order to illustrate the more complex case, where a DMA safe buffer is needed, continue to kzalloc() the storage (but with a structure definition to provide an explicit data layout). Also add comments on when a DMA safe buffer is necessary and the two common ways of obtaining one. Whilst we have a mixture of signed and unsigned channels, the unsigned channels have ranges that can be stored in a signed value - hence use signed storage for all channels, simplifying the structure definition. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-7-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 8f08055bc67a355aca55856cc810b89645506a5f Author: Jonathan Cameron Date: Sun Apr 13 11:34:28 2025 +0100 iio: introduced iio_push_to_buffers_with_ts() that takes a data_total_len argument. Check that data_total_len argument against iio_dev->scan_bytes. The size needs to be at least as big as the scan. It can be larger, which is typical if only part of fixed sized storage is used due to a subset of channels being enabled. Reviewed-by: Nuno Sá Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-6-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 0b9c738f9c4dc27d8ddda15a80360150fb5a1c33 Author: Angelo Dureghello Date: Tue Apr 15 09:44:12 2025 +0200 docs: iio: ad3552r: fix malformed table Fix malformed table. Fixes: ede84c455659 ("docs: iio: add documentation for ad3552r driver") Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250415-wip-bl-ad3552r-fix-doc-table-v1-1-717ffd320c9d@baylibre.com Signed-off-by: Jonathan Cameron commit 342e4955a1f1ce28c70a589999b76365082dbf10 Author: Dave Penkler Date: Wed May 21 14:16:56 2025 +0200 usb: usbtmc: Fix timeout value in get_stb wait_event_interruptible_timeout requires a timeout argument in units of jiffies. It was being called in usbtmc_get_stb with the usb timeout value which is in units of milliseconds. Pass the timeout argument converted to jiffies. Fixes: 048c6d88a021 ("usb: usbtmc: Add ioctls to set/get usb timeout") Cc: stable@vger.kernel.org Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250521121656.18174-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit acb3dac2805d3342ded7dbbd164add32bbfdf21c Author: Dave Penkler Date: Wed May 21 14:16:55 2025 +0200 usb: usbtmc: Fix read_stb function and get_stb ioctl The usbtmc488_ioctl_read_stb function relied on a positive return from usbtmc_get_stb to reset the srq condition in the driver. The USBTMC_IOCTL_GET_STB case tested for a positive return to return the stb to the user. Commit: ("usb: usbtmc: Fix erroneous get_stb ioctl error returns") changed the return value of usbtmc_get_stb to 0 on success instead of returning the value of usb_control_msg which is positive in the normal case. This change caused the function usbtmc488_ioctl_read_stb and the USBTMC_IOCTL_GET_STB ioctl to no longer function correctly. Change the test in usbtmc488_ioctl_read_stb to test for failure first and return the failure code immediately. Change the test for the USBTMC_IOCTL_GET_STB ioctl to test for 0 instead of a positive value. Fixes: cac01bd178d6 ("usb: usbtmc: Fix erroneous get_stb ioctl error returns") Cc: stable@vger.kernel.org Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250521121656.18174-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 59c11a7a9a138a28c7dff81032a7b7b6f1794540 Author: Lukas Bulwahn Date: Tue May 13 13:59:12 2025 +0200 LICENSES: add CC0-1.0 license text Commit cbbd847d107f ("tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file") turns the tools/arch/x86/kcpuid/cpuid.csv to be an auto-generated file from an input file maintained at x86-cpuid.org project. The x86-cpuid.org project clearly states that the auto-generated file is to be licensed with CC0-1.0 (see Link below). So, the SPDX-License-Identifier CC0-1.0 in the file is correct as intended. The spdxcheck.py script reports that tools/arch/x86/kcpuid/cpuid.csv uses an Invalid License ID: CC0-1.0, though, as the LICENSES directory in the kernel tree does not contain a file with license information for CC0-1.0. Add a suitable CC0-1.0 file with the license text into LICENSES/deprecated to make spdxcheck.py happy. The directory deprecated is the best fit, by exclusion of the alternatives. CC0-1.0 should not be considered among the preferred licenses in the kernel, nor is it a license exception case or intended for dual-licensing some copyrighted material. So, deprecated is the best fit here, even if the license and its use is fine and it does not suggest to actually deprecate use of this license. The license text for the CC0-1.0 file was obtained from the spdx license-list-data git repository (see Link below). Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.4/LICENSE.rst Link: https://github.com/spdx/license-list-data/blob/main/text/CC0-1.0.txt Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 16d693749866f2e4731f2aa1c553f185804dd392 Author: Jiri Slaby (SUSE) Date: Sat May 17 20:23:29 2025 -0700 irqdomain: spmi: Switch to irq_domain_create_tree() irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: "Jiri Slaby (SUSE)" Cc: Stephen Boyd Link: https://lore.kernel.org/r/20250319092951.37667-37-jirislaby@kernel.org Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250518032330.2959766-5-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 77ca75e80c7197f71038d53d0e793d136f8a30ef Author: Jean-Francois Bortolotti Date: Sat May 17 20:23:28 2025 -0700 spmi: add a spmi driver for Apple SoC The connected PMU contains several useful nvmem cells such as RTC offset, boot failure counters, reboot/shutdown selector, and a few others. In addition M3+ machines have their USB-PD controller connected via SPMI. Signed-off-by: Jean-Francois Bortolotti Reviewed-by: Sven Peter Reviewed-by: Alyssa Rosenzweig Co-developed-by: Sasha Finkelstein Signed-off-by: Sasha Finkelstein Link: https://lore.kernel.org/r/20250409-spmi-v4-2-eb81ecfd1f64@gmail.com Reviewed-by: Neal Gompa Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250518032330.2959766-4-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8cc68226a3a6a4854e3aca0521d074646db100d6 Author: Sasha Finkelstein Date: Sat May 17 20:23:27 2025 -0700 dt-bindings: spmi: Add Apple SPMI controller Add bindings for the SPMI controller present on most Apple SoCs Reviewed-by: "Rob Herring (Arm)" Reviewed-by: Sven Peter Signed-off-by: Sasha Finkelstein Link: https://lore.kernel.org/r/20250409-spmi-v4-1-eb81ecfd1f64@gmail.com Reviewed-by: Neal Gompa Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250518032330.2959766-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit cdd18ef9825953a756f4e0fda734254ec08c4055 Author: WangYuli Date: Sat May 17 20:23:26 2025 -0700 spmi: Only use Hikey 970 SPMI controller driver when ARM64 SPMI_HISI3670, the Hikey 970 SPMI controller driver, is only required to use the Kirin 970 SPMI bus. And the Kirin 970 is an ARM64-based SoC, it cannot be used on platforms of other architectures. Link: https://lore.kernel.org/all/b4810f476e41e7de4efdf28b42472ae4ffe7defe.1597647359.git.mchehab+huawei@kernel.org/ Reported-by: Wentao Guan Closes: https://github.com/deepin-community/kernel/pull/604 Signed-off-by: WangYuli Link: https://lore.kernel.org/r/23BAA675A75EF4F5+20250218050552.57711-1-wangyuli@uniontech.com Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250518032330.2959766-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0be5eac879f28a11b02c6480b86980f9a5688454 Author: Chen Ni Date: Wed May 14 11:26:37 2025 +0800 hpet: Remove unnecessary NULL check before unregister_sysctl_table() unregister_sysctl_table() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Acked-by: Clemens Ladisch Link: https://lore.kernel.org/r/20250514032637.2317639-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 1bd6406fb5f36c2bb1e96e27d4c3e9f4d09edde4 Author: Wupeng Ma Date: Sat May 10 11:30:40 2025 +0800 VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notify During our test, it is found that a warning can be trigger in try_grab_folio as follow: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1678 at mm/gup.c:147 try_grab_folio+0x106/0x130 Modules linked in: CPU: 0 UID: 0 PID: 1678 Comm: syz.3.31 Not tainted 6.15.0-rc5 #163 PREEMPT(undef) RIP: 0010:try_grab_folio+0x106/0x130 Call Trace: follow_huge_pmd+0x240/0x8e0 follow_pmd_mask.constprop.0.isra.0+0x40b/0x5c0 follow_pud_mask.constprop.0.isra.0+0x14a/0x170 follow_page_mask+0x1c2/0x1f0 __get_user_pages+0x176/0x950 __gup_longterm_locked+0x15b/0x1060 ? gup_fast+0x120/0x1f0 gup_fast_fallback+0x17e/0x230 get_user_pages_fast+0x5f/0x80 vmci_host_unlocked_ioctl+0x21c/0xf80 RIP: 0033:0x54d2cd ---[ end trace 0000000000000000 ]--- Digging into the source, context->notify_page may init by get_user_pages_fast and can be seen in vmci_ctx_unset_notify which will try to put_page. However get_user_pages_fast is not finished here and lead to following try_grab_folio warning. The race condition is shown as follow: cpu0 cpu1 vmci_host_do_set_notify vmci_host_setup_notify get_user_pages_fast(uva, 1, FOLL_WRITE, &context->notify_page); lockless_pages_from_mm gup_pgd_range gup_huge_pmd // update &context->notify_page vmci_host_do_set_notify vmci_ctx_unset_notify notify_page = context->notify_page; if (notify_page) put_page(notify_page); // page is freed __gup_longterm_locked __get_user_pages follow_trans_huge_pmd try_grab_folio // warn here To slove this, use local variable page to make notify_page can be seen after finish get_user_pages_fast. Fixes: a1d88436d53a ("VMCI: Fix two UVA mapping bugs") Cc: stable Closes: https://lore.kernel.org/all/e91da589-ad57-3969-d979-879bbd10dddd@huawei.com/ Signed-off-by: Wupeng Ma Link: https://lore.kernel.org/r/20250510033040.901582-1-mawupeng1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 97ce0fe2b7240d47d9124daa92217e478c21a3ba Author: Hans de Goede Date: Wed May 7 11:07:28 2025 +0200 mei: vsc: Cast tx_buf to (__be32 *) when passed to cpu_to_be32_array() Commit f88c0c72ffb0 ("mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type") changed the type of tx_buf from "void *" to "struct vsc_tp_packet *" and added a cast to (u32 *) when passing it to cpu_to_be32_array() and the same change was made for rx_buf. This triggers the type-check warning in sparse: vsc-tp.c:327:28: sparse: expected restricted __be32 [usertype] *dst vsc-tp.c:327:28: sparse: got unsigned int [usertype] * vsc-tp.c:343:42: sparse: expected restricted __be32 const [usertype] *src vsc-tp.c:343:42: sparse: got unsigned int [usertype] * Fix this by casting to (__be32 *) instead. Note actually changing the type of the buffers to "be32 *" is not an option this buffer does actually contain a "struct vsc_tp_packet" and is used as such most of the time. vsc_tp_rom_xfer() re-uses the buffers as just dumb arrays of 32 bit words to talk to the device before the firmware has booted, to avoid needing to allocate a separate buffer. Fixes: f88c0c72ffb0 ("mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505071634.kZ0I7Va6-lkp@intel.com/ Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250507090728.115910-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 46a4d12a005c58317e89b5644774c683365dc2ca Author: Roxana Nicolescu Date: Thu May 1 20:05:00 2025 +0000 char: tlclk: Fix correct sysfs directory path for tlclk The tlckl driver does not create a platform device anymore. It was recently changed to use a faux device instead. Therefore the sysfs path has changed from /sys/devices/platform/telco_clock to /sys/devices/faux/telco_clock. Fixes: 72239a78f9f5 ("tlclk: convert to use faux_device") Signed-off-by: Roxana Nicolescu Link: https://lore.kernel.org/r/20250501200457.18506-1-nicolescu.roxana@protonmail.com Signed-off-by: Greg Kroah-Hartman commit c29f2c773afc2b56edffa9b4372d07322018a689 Author: Dan Carpenter Date: Fri Mar 21 17:35:35 2025 +0300 wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv() The "msta_link" pointer has two NULL checks. Delete the second check. Signed-off-by: Dan Carpenter Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/fde7246b-08a2-4c2f-b2dc-c3fd0e6b300b@stanley.mountain Signed-off-by: Felix Fietkau commit f22037407cb40a4e7bfa4b5d1853fa6c2f3bef6f Author: Lorenzo Bianconi Date: Tue Mar 25 17:12:05 2025 +0100 Revert "wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()" In mt76_connac_mcu_sta_basic_tlv() link_conf is always not NULL. Revert the commit '9890624c1b39 ("wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()")' in order to fix the following warning: drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:394 mt76_connac_mcu_sta_basic_tlv() warn: variable dereferenced before check 'link_conf' This reverts commit 9890624c1b3948c1c7f1d0e19ef0bb7680b8c80d. Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250325-mt76_connac_mcu_sta_basic_tlv-link_conf-revert-v1-1-b84efefb74ee@kernel.org Signed-off-by: Felix Fietkau commit 187de25110c8ac8d52e24f8c596ebdcbcd55bbbf Author: sunliming Date: Sat Apr 19 11:15:28 2025 +0800 wifi: mt76: mt7996: fix uninitialized symbol warning Fix below smatch warnings: drivers/net/wireless/mediatek/mt76/mt7996/main.c:952 mt7996_mac_sta_add_links() error: uninitialized symbol 'err'. drivers/net/wireless/mediatek/mt76/mt7996/main.c:1133 mt7996_set_rts_threshold() error: uninitialized symbol 'ret'. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202504101051.1ya4Z4va-lkp@intel.com/ Signed-off-by: sunliming Link: https://patch.msgid.link/20250419031528.2073892-1-sunliming@linux.dev Signed-off-by: Felix Fietkau commit a0bdd3d1b94d22dd9d255fd148eb9183ea0a822f Author: Qasim Ijaz Date: Mon Apr 21 12:13:44 2025 +0100 wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy() In mt7996_stop_phy() the mt7996_phy structure is dereferenced before the null sanity check which could lead to a null deref. Fix by moving the dereference operation after the sanity check. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Qasim Ijaz Link: https://patch.msgid.link/20250421111344.11484-1-qasdev00@gmail.com Signed-off-by: Felix Fietkau commit cb423ddad0f6e6f55b1700422ab777b25597cc83 Author: Qasim Ijaz Date: Mon Apr 21 12:25:44 2025 +0100 wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor() The function mt7996_set_monitor() dereferences phy before the NULL sanity check. Fix this to avoid NULL pointer dereference by moving the dereference after the check. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Qasim Ijaz Link: https://patch.msgid.link/20250421112544.13430-1-qasdev00@gmail.com Signed-off-by: Felix Fietkau commit 7011faebe543f8f094fdb3281d0ec9e1eab81309 Author: Samuel Williams Date: Sat May 10 19:53:09 2025 -0500 wifi: mt76: mt7921: add 160 MHz AP for mt7922 device This allows mt7922 in hostapd mode to transmit up to 1.4 Gbps. Signed-off-by: Samuel Williams Link: https://patch.msgid.link/20250511005316.1118961-1-sam8641@gmail.com Signed-off-by: Felix Fietkau commit ca872e0ad97159375da8f3d05cac1f48239e01d7 Author: Michael Lo Date: Fri May 9 16:35:12 2025 +0800 wifi: mt76: mt7925: fix host interrupt register initialization ensure proper interrupt handling and aligns with the hardware spec by updating the register offset for MT_WFDMA0_HOST_INT_ENA. Cc: stable@vger.kernel.org Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250509083512.455095-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 1d81e893b422a6f0ae70f8648867c2e73edfb413 Author: Leon Yen Date: Fri May 9 16:21:17 2025 +0800 wifi: mt76: mt7925: introduce thermal protection Add thermal protection to prevent the chip from possible overheating due to prolonged high traffic and adverse operating conditions. Signed-off-by: Leon Yen Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20250509082117.453819-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 3c0e4f606d8693795a2c965d6f4987b1bfc31097 Author: Henk Vergonet Date: Fri Apr 18 16:39:14 2025 +0200 wifi: mt76: mt76x2: Add support for LiteOn WN4516R,WN4519R Adds support for: - LiteOn WN4516R - LiteOn WN4519R Both use: - A nonstandard USB connector - Mediatek chipset MT7600U - ASIC revision: 76320044 Disabled VHT support on ASIC revision 76320044: This fixes the 5G connectibity issue on LiteOn WN4519R module see https://github.com/openwrt/mt76/issues/971 And may also fix the 5G issues on the XBox One Wireless Adapter see https://github.com/openwrt/mt76/issues/200 I have looked at the FCC info related to the MT7632U chip as mentioned in here: https://github.com/openwrt/mt76/issues/459 These confirm the chipset does not support 'ac' mode and hence VHT should be turned of. Signed-off-by: Henk Vergonet Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250418143914.31384-1-henk.vergonet@gmail.com Signed-off-by: Felix Fietkau commit 939481cd87bda817ba5fe9d36267017cabe936e3 Author: Christophe JAILLET Date: Fri Apr 18 00:28:01 2025 +0200 wifi: mt76: Remove an unneeded local variable in mt76x02_dma_init() Remove 't' which is unneeded since commit f3950a414143 ("mt76: set txwi_size according to the driver value") This slightly simplifies the code. Signed-off-by: Christophe JAILLET Link: https://patch.msgid.link/e86d5602bdd8b6bd22258ee69536992f39470bf5.1744928865.git.christophe.jaillet@wanadoo.fr Signed-off-by: Felix Fietkau commit d9bc625861d490cb76ae8af86fac6f8ab0655a18 Author: Qasim Ijaz Date: Mon Apr 21 12:05:50 2025 +0100 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links If link_conf_dereference_protected() or mt7996_vif_link() or link_sta_dereference_protected() fail the code jumps to the error_unlink label and returns ret which is uninitialised. Fix this by setting err before jumping to error_unlink. Fixes: c7e4fc362443 ("wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support") Fixes: dd82a9e02c05 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks") Signed-off-by: Qasim Ijaz Link: https://patch.msgid.link/20250421110550.9839-1-qasdev00@gmail.com Signed-off-by: Felix Fietkau commit 3dbfb8abe3fd3fff81a95bd8ac2a48741f63e872 Author: Shayne Chen Date: Fri Mar 28 10:28:47 2025 +0800 Revert "wifi: mt76: mt7996: fill txd by host driver" This reverts commit 3b522cadedfe6e9e0e8193d7d4ab5aa8d0c73209. The MTK connac3 has introduced new hardware, SDO (Software Defined Offload), to offload the process of filling the TX descriptor. Initially, there were some issues, but after several fixes, it should now be stable, allowing us to revert this commit. Additionally, activating SDO is essential for the proper functioning of features like TX checksum offload. Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250328022847.1612082-1-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit caf4b347c5dc40fdd125793b5e82ba9fc4de5275 Author: Charles Han Date: Mon Apr 7 17:55:51 2025 +0800 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init devm_kasprintf() can return a NULL pointer on failure,but this returned value in mt7996_thermal_init() is not checked. Add NULL check in mt7996_thermal_init(), to handle kernel NULL pointer dereference error. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Charles Han Link: https://patch.msgid.link/20250407095551.32127-1-hanchunchao@inspur.com Signed-off-by: Felix Fietkau commit cadebdad959bf25edd544da6dd1a9750e876deb6 Author: Allan Wang Date: Tue Apr 1 16:35:25 2025 +0800 wifi: mt76: mt7925: add EHT preamble puncturing Add mt7925 EHT preamble puncturing. Signed-off-by: Allan Wang Link: https://patch.msgid.link/20250401083525.2734333-1-allan.wang@mediatek.com Signed-off-by: Felix Fietkau commit 88224119863c39fa67581874e1ba218fa56113b4 Author: Dan Carpenter Date: Fri Mar 21 17:35:40 2025 +0300 wifi: mt76: mt7925: Fix logical vs bitwise typo This was supposed to be & instead of &&. Fixes: f0317215b367 ("wifi: mt76: mt7925: add EHT control support based on the CLC data") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/d323a443-4e81-4064-8563-b62274b53ef4@stanley.mountain Signed-off-by: Felix Fietkau commit 1529e335f93dd72fead39bd28fab5b51b6f3ca80 Author: StanleyYP Wang Date: Thu Mar 20 09:59:26 2025 +0800 wifi: mt76: mt7996: rework radar HWRDD idx The definition of MT_RX_SEL (for rdd_rx_sel) is mixed with the definition of HWRDD idx. For example, MT_RX_SEL2 is for background HWRDD idx, not an option of rdd_rx_sel. Additionally, HWRDD idx does not exactly map to band idx for Connac 3 chips. So, add mt7996_get_rdd_idx as a helper function. Finally, remove some parts of the code inherited from the legacy chips. For instance, 1. rdd_state is used for single-band-dual-HWRDD chips (for 80+80), especially the 76xx series. 2. rdd_rx_sel is also used for single-band-dual-HWRDD chips rx_sel = 0 => RDD0 for WF0, RDD1 for WF2 rx_sel = 1 => RDD0 for WF1, RDD1 for WF3 Chip Variants | 5G rdd idx | Background rdd idx ---------------------------|----------------|------------------- MT7996 (except 205/255) | 1 | 2 MT7992 | 1 | 2 MT7990 | 1 | 2 Signed-off-by: StanleyYP Wang Reviewed-by: Shayne Chen Reviewed-by: Money Wang Link: https://patch.msgid.link/20250320015926.3948672-1-StanleyYP.Wang@mediatek.com Signed-off-by: Felix Fietkau commit 758e0cc3a4928c550820171ce8bc9176ecac6386 Author: StanleyYP Wang Date: Thu Mar 20 09:59:18 2025 +0800 wifi: mt76: mt7915: rework radar HWRDD idx The definition of MT_RX_SEL (for rdd_rx_sel) is mixed with the definition of HWRDD idx. For example, MT_RX_SEL2 is for background HWRDD idx, not an option of rdd_rx_sel. Therefore, add mt7915_get_rdd_idx as a helper function to get the HWRDD idx for each variants. Additionally, remove some parts of the code inherited from the legacy chips. For instance, 1. rdd_state is used for single-band-dual-HWRDD chips (for 80+80), especially the 76xx series. 2. rdd_rx_sel is also used for single-band-dual-HWRDD chips rx_sel = 0 => RDD0 for WF0, RDD1 for WF2 rx_sel = 1 => RDD0 for WF1, RDD1 for WF3 Chip Variants | 5G rdd idx(=bandidx)| Background rdd idx -------------------------------|---------------------|------------------- MT7915A | 0 | 2 MT7915D | 1 | 2 MT7916 2G + 5G (2T2R+1R) | 1 | 2 MT7916 2G + 5G (3T3R) | 1 | N/A MT7981 2G + 5G | 1 | N/A MT7986 2G + 5G (one adie DBDC) | 1 | N/A MT7986 5G (one adie) | 1 (bandidx=MT_BAND1)| N/A MT7986 2G + 5G (dual adie) | 1 | N/A Signed-off-by: StanleyYP Wang Reviewed-by: Shayne Chen Link: https://patch.msgid.link/20250320015918.3948643-1-StanleyYP.Wang@mediatek.com Signed-off-by: Felix Fietkau commit 888208d1ccc41bebe97744445787183b17bb3ea4 Author: StanleyYP Wang Date: Thu Mar 20 09:59:09 2025 +0800 wifi: mt76: mt7915: set correct background radar capability Some of the variants do not support background radar, so add a helper to report background radar capability. For mt7916, only the variant of 5G 2T2R + 1R supports background radar. Signed-off-by: StanleyYP Wang Reviewed-by: Shayne Chen Link: https://patch.msgid.link/20250320015909.3948612-1-StanleyYP.Wang@mediatek.com Signed-off-by: Felix Fietkau commit 8d63161d2e92d124bd59e1c42904b7ed256ceb94 Author: Peter Chiu Date: Wed Apr 9 22:07:50 2025 +0800 wifi: mt76: mt7996: add PCI device id for mt7990 Add PCI device IDs to enable support for mt7990 chipsets. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-11-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 14d3990eb7c37e4f3273f9130bd964a6511e4ebd Author: StanleyYP Wang Date: Wed Apr 9 22:07:49 2025 +0800 wifi: mt76: mt7996: rework background radar check for mt7990 The MT7990 comes in 2T2R and 3T3R variants, with only the 2T2R supporting background radar. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-10-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit b7ddeb9cc43949de58b6a422162db0a196c5d383 Author: Shayne Chen Date: Wed Apr 9 22:07:48 2025 +0800 wifi: mt76: connac: rework TX descriptor and TX free for mt7990 Adjust the TX descriptor and TX free for updated hardware fields. This is a preliminary patch to support mt7990 chipset. Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Co-developed-by: Benjamin Lin Signed-off-by: Benjamin Lin Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-9-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 6d72f267c6812abb59fec773ac74a195bca11a66 Author: Peter Chiu Date: Wed Apr 9 22:07:47 2025 +0800 wifi: mt76: mt7996: adjust HW capabilities for mt7990 This is a preliminary patch to support mt7990 chipset. Co-developed-by: Howard Hsu Signed-off-by: Howard Hsu Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Peter Chiu Link: https://patch.msgid.link/20250409140750.724437-8-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 7316813a9cb3a521874c56041e1a0d1e2c7f3402 Author: StanleyYP Wang Date: Wed Apr 9 22:07:46 2025 +0800 wifi: mt76: mt7996: add eeprom support for mt7990 Add eeprom definition and default bin file for mt7990. This is a preliminary patch to support mt7990 chipset. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-7-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit f6c87411d15fc4efadec944c7925e8f73c1972b2 Author: StanleyYP Wang Date: Wed Apr 9 22:07:45 2025 +0800 wifi: mt76: mt7996: rework register mapping for mt7990 Rework register offset and l1/l2/cbtop mapping for mt7990. This is a preliminary patch to support mt7990 chipset. Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: StanleyYP Wang Link: https://patch.msgid.link/20250409140750.724437-6-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 9ba4a76db9eb0596c3950933ec029d6b40c39cc6 Author: Peter Chiu Date: Wed Apr 9 22:07:44 2025 +0800 wifi: mt76: mt7996: rework DMA configuration for mt7990 Modify DMA ring setting for mt7990. This is a preliminary patch to support mt7990 chipset. Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-5-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 76d13deb1aa9ac93c079dc5508d924ec01585558 Author: Peter Chiu Date: Wed Apr 9 22:07:43 2025 +0800 wifi: mt76: mt7996: rework WA mcu command for mt7990 Since mt7990 lacks WA firmware, some WA commands are not supported or need to be refactored to use the SDO command. This is a preliminary patch to support mt7990 chipset. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-4-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit a4e32b306a304dda5707281492d96b6dd7a91275 Author: StanleyYP Wang Date: Wed Apr 9 22:07:42 2025 +0800 wifi: mt76: connac: add support to load firmware for mt7990 Add firmware download support. Note that mt7990 does not have WA and DSP firmwares. This is a preliminary patch to support mt7990 chipset. Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-3-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 7014fe5358601d882b2809dea9fd1f6be409c943 Author: Shayne Chen Date: Wed Apr 9 22:07:41 2025 +0800 wifi: mt76: mt7996: add macros for pci device ids The chipset name (i.e., brand name) used by the driver may cause confusion with the PCI device ID when adding support for new chipsets. | Chipset name | PCI device id | |--------------|----------------| | 7996 | 0x7990, 0x7991 | | 7992 | 0x7992, 0x799a | | 7990 | 0x7993, 0x799b | To prevent confusion, replace the code that directly uses the device ID with macros. This is a preliminary patch to support mt7990 chipset. Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250409140750.724437-2-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau commit 4d95514d14e87427459ef9e9b5b81c8fe5ebb37c Author: Akshay Gupta Date: Mon Apr 28 06:30:34 2025 +0000 misc: amd-sbi: Add document for AMD SB IOCTL description - This document provides AMD side band IOCTL description defined for APML and its usage. Multiple AMD custom protocols defined for side band system management uses this IOCTL. User space C-APIs are made available by esmi_oob_library [1], which is provided by the E-SMS project [2]. Link: https://github.com/amd/esmi_oob_library [1] Link: https://www.amd.com/en/developer/e-sms.html [2] Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-11-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit cf141287b77485ed7624ac1756b85cc801748c7c Author: Akshay Gupta Date: Mon Apr 28 06:30:33 2025 +0000 misc: amd-sbi: Add support for register xfer - Provide user register access over IOCTL. Both register read and write are supported. - APML interface does not provide a synchronization method. By defining, a register access path, we use APML modules and library for all APML transactions. Without having to use external tools such as i2c-tools, which may cause race conditions. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-10-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 69b1ba83d21c4a89f6fcfbca1d515a60df65cf9e Author: Akshay Gupta Date: Mon Apr 28 06:30:32 2025 +0000 misc: amd-sbi: Add support for read MCA register protocol - AMD provides custom protocol to read Machine Check Architecture(MCA) registers over sideband. The information is accessed for range of MCA registers by passing register address and thread ID to the protocol. MCA register read command using the register address to access Core::X86::Msr::MCG_CAP which determines the number of MCA banks. Access is read-only Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-9-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit bb13a84ed6b78200952b264b4d7a024b730e8246 Author: Akshay Gupta Date: Mon Apr 28 06:30:31 2025 +0000 misc: amd-sbi: Add support for CPUID protocol - AMD provides custom protocol to read Processor feature capabilities and configuration information through side band. The information is accessed by providing CPUID Function, extended function and thread ID to the protocol. Undefined function returns 0. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-8-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 35ac2034db72bbbc73609aab5f05ff6e0d38fdd0 Author: Akshay Gupta Date: Mon Apr 28 06:30:30 2025 +0000 misc: amd-sbi: Add support for AMD_SBI IOCTL The present sbrmi module only support reporting power via hwmon. However, AMD data center range of processors support various system management functionality using custom protocols defined in Advanced Platform Management Link (APML) specification. Register a miscdevice, which creates a device /dev/sbrmiX with an IOCTL interface for the user space to invoke the APML Mailbox protocol, which is already defined in sbrmi_mailbox_xfer(). The APML protocols depend on a set of RMI registers. Having an IOCTL as a single entry point will help in providing synchronization among these protocols as multiple transactions on RMI register set may create race condition. Support for other protocols will be added in subsequent patches. APML mailbox protocol returns additional error codes written by SMU firmware in the out-bound register 0x37. These errors include, invalid core, message not supported over platform and others. This additional error codes can be used to provide more details to user space. Open-sourced and widely used https://github.com/amd/esmi_oob_library will continue to provide user-space programmable API. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-7-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 587d2c625146c7ff62325ebb9a8668e666400dc4 Author: Akshay Gupta Date: Mon Apr 28 06:30:29 2025 +0000 misc: amd-sbi: Optimize the wait condition for mailbox command completion - optimize the wait condition to indicate command completion by replacing the do while loop with regmap subsystem API regmap_read_poll_timeout() Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-6-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 013f7e7131bd84a83ed3b70855b2667a89bb3c98 Author: Akshay Gupta Date: Mon Apr 28 06:30:28 2025 +0000 misc: amd-sbi: Use regmap subsystem - regmap subsystem provides multiple benefits over direct smbus APIs - subsystem adds another abstraction layer on top of struct i2c_client to make it easy to read or write registers. - The subsystem can be helpful in following cases - Different types of bus (i2c/i3c), we have plans to support i3c. - Different Register address size (1byte/2byte) Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-5-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit f4dc6406631ec46f608be7078f50777990c87b47 Author: Akshay Gupta Date: Mon Apr 28 06:30:27 2025 +0000 misc: amd-sbi: Move hwmon device sensor as separate entity - Move hwmon device sensor to misc as only power is reported through hwmon sensor. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-4-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 43470595e72bd4448fcf0cd720c4d37c34035eb7 Author: Akshay Gupta Date: Mon Apr 28 06:30:26 2025 +0000 misc: amd-sbi: Move protocol functionality to core file - This is done to utilize the protocol functionality into other domains. - Increase the scalability of the module with different bus(i2c/i3c) Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20250428063034.2145566-3-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit e1565867640506166b6c4182dec9ee955492d003 Author: Akshay Gupta Date: Mon Apr 28 06:30:25 2025 +0000 hwmon/misc: amd-sbi: Move core sbrmi from hwmon to misc This is done to support other functionality provided by the SBRMI, which does not fit in the hwmon subsystem. Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Akshay Gupta Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20250428063034.2145566-2-akshay.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit fb410aa423b2e0bc82534e92dd4121a2046b609f Author: Rengarajan S Date: Tue May 13 14:45:57 2025 +0530 misc: microchip: pci1xxxx: Add GPIO Wakeup Support The patch adds PIO asynchronous wakeup support while PIO PCIe Endpoint function is in D3 state. When such a wakeup event occurs, the PIO asserts a PIO_WAKE signal, which in turn triggers PCIe Wake signaling. This wake request should trigger the PCIe Host to take the PIO PCIe Endpoint function into the D0 device state. The device supports up to 96 PIOs distributed across three GPIO banks. During suspend and resume, the driver checks the status of each GPIO bank to determine if any GPIOs with wake masking enabled have triggered an event. Upon resume, PIOxx_STATUS register must be cleared by software explicitly to enable the detection of the next transition. Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20250513091557.3660-3-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7c970c657cf77ae0f230012138d8871ed573c7c7 Author: Rengarajan S Date: Tue May 13 14:45:56 2025 +0530 misc: microchip: pci1xxxx: Add PCIe Hot reset disable support for Rev C0 and later devices Systems that issue PCIe hot reset requests during a suspend/resume cycle cause PCI1XXXX device revisions prior to C0 to get its GPIO configuration registers reset to hardware default values. This results in device inaccessibility and GPIO read/write failure. Starting with Revision C0, support was added in the device hardware (via the Hot Reset Disable Bit) to allow resetting only the PCIe interface and its associated logic, but preserving the GPIO configurations during a hot reset. This patch enables the hot reset disable feature during suspend/ resume for C0 and later revisions of the device. mchp_pci1xxxx_gpio is an auxiliary child of mchp_pci1xxxx_gp and does not have access to system register address space for reading the device revision. Hence, the device revision is retrieved directly from PCIe config space. Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20250513091557.3660-2-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7b386d7454b610534026b279aa150e5a9e584082 Author: Roxana Nicolescu Date: Tue May 6 11:00:07 2025 +0000 misc: lis3lv02d: Fix correct sysfs directory path for lis3lv02d The lis3lv02d driver does not create a platform device anymore. It was recently changed to use a faux device instead. Therefore the sysfs path has changed from /sys/devices/platform/lis3lv02d to /sys/devices/faux/lis3lv02d. Fixes: 3b18ccb5472b ("misc: lis3lv02d: convert to use faux_device") Signed-off-by: Roxana Nicolescu Link: https://lore.kernel.org/r/20250506110002.36477-1-nicolescu.roxana@protonmail.com Signed-off-by: Greg Kroah-Hartman commit 57483a362741e4f0f3f4d2fc82d48f82fd0986d9 Author: Tiffany Y. Yang Date: Sat May 10 01:34:40 2025 +0000 binder: Create safe versions of binder log files Binder defines several seq_files that can be accessed via debugfs or binderfs. Some of these files (e.g., 'state' and 'transactions') contain more granular information about binder's internal state that is helpful for debugging, but they also leak userspace address data through user-defined 'cookie' or 'ptr' values. Consequently, access to these files must be heavily restricted. Add two new files, 'state_hashed' and 'transactions_hashed', that reproduce the information in the original files but use the kernel's raw pointer obfuscation to hash any potential user addresses. This approach allows systems to grant broader access to the new files without having to change the security policy around the existing ones. In practice, userspace populates these fields with user addresses, but within the driver, these values only serve as unique identifiers for their associated binder objects. Consequently, binder logs can obfuscate these values and still retain meaning. While this strategy prevents leaking information about the userspace memory layout in the existing log files, it also decouples log messages about binder objects from their user-defined identifiers. Acked-by: Carlos Llamas Tested-by: Carlos Llamas Signed-off-by: "Tiffany Y. Yang" Link: https://lore.kernel.org/r/20250510013435.1520671-7-ynaffit@google.com Signed-off-by: Greg Kroah-Hartman commit 91f1bbaa783d26b379d65ef7b4b2b947c338c749 Author: Tiffany Y. Yang Date: Sat May 10 01:34:38 2025 +0000 binder: Refactor binder_node print synchronization The binder driver outputs information about each dead binder node by iterating over the dead nodes list, and it prints the state of each live node in the system by traversing each binder_proc's proc->nodes tree. Both cases require similar logic to maintain the global lock ordering while accessing each node. Create a helper function to synchronize around printing binder nodes in a list. Opportunistically make minor cosmetic changes to binder print functions. Acked-by: Carlos Llamas Signed-off-by: "Tiffany Y. Yang" Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250510013435.1520671-5-ynaffit@google.com Signed-off-by: Greg Kroah-Hartman commit 8c0a559825281764061a127632e5ad273f0466ad Author: Dmitry Antipov Date: Sat May 17 17:09:56 2025 +0000 binder: fix use-after-free in binderfs_evict_inode() Running 'stress-ng --binderfs 16 --timeout 300' under KASAN-enabled kernel, I've noticed the following: BUG: KASAN: slab-use-after-free in binderfs_evict_inode+0x1de/0x2d0 Write of size 8 at addr ffff88807379bc08 by task stress-ng-binde/1699 CPU: 0 UID: 0 PID: 1699 Comm: stress-ng-binde Not tainted 6.14.0-rc7-g586de92313fc-dirty #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 Call Trace: dump_stack_lvl+0x1c2/0x2a0 ? __pfx_dump_stack_lvl+0x10/0x10 ? __pfx__printk+0x10/0x10 ? __pfx_lock_release+0x10/0x10 ? __virt_addr_valid+0x18c/0x540 ? __virt_addr_valid+0x469/0x540 print_report+0x155/0x840 ? __virt_addr_valid+0x18c/0x540 ? __virt_addr_valid+0x469/0x540 ? __phys_addr+0xba/0x170 ? binderfs_evict_inode+0x1de/0x2d0 kasan_report+0x147/0x180 ? binderfs_evict_inode+0x1de/0x2d0 binderfs_evict_inode+0x1de/0x2d0 ? __pfx_binderfs_evict_inode+0x10/0x10 evict+0x524/0x9f0 ? __pfx_lock_release+0x10/0x10 ? __pfx_evict+0x10/0x10 ? do_raw_spin_unlock+0x4d/0x210 ? _raw_spin_unlock+0x28/0x50 ? iput+0x697/0x9b0 __dentry_kill+0x209/0x660 ? shrink_kill+0x8d/0x2c0 shrink_kill+0xa9/0x2c0 shrink_dentry_list+0x2e0/0x5e0 shrink_dcache_parent+0xa2/0x2c0 ? __pfx_shrink_dcache_parent+0x10/0x10 ? __pfx_lock_release+0x10/0x10 ? __pfx_do_raw_spin_lock+0x10/0x10 do_one_tree+0x23/0xe0 shrink_dcache_for_umount+0xa0/0x170 generic_shutdown_super+0x67/0x390 kill_litter_super+0x76/0xb0 binderfs_kill_super+0x44/0x90 deactivate_locked_super+0xb9/0x130 cleanup_mnt+0x422/0x4c0 ? lockdep_hardirqs_on+0x9d/0x150 task_work_run+0x1d2/0x260 ? __pfx_task_work_run+0x10/0x10 resume_user_mode_work+0x52/0x60 syscall_exit_to_user_mode+0x9a/0x120 do_syscall_64+0x103/0x210 ? asm_sysvec_apic_timer_interrupt+0x1a/0x20 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0xcac57b Code: c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 31 f6 e9 05 00 00 00 0f 1f 44 00 00 f3 0f 1e fa b8 RSP: 002b:00007ffecf4226a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007ffecf422720 RCX: 0000000000cac57b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffecf422850 RBP: 00007ffecf422850 R08: 0000000028d06ab1 R09: 7fffffffffffffff R10: 3fffffffffffffff R11: 0000000000000246 R12: 00007ffecf422718 R13: 00007ffecf422710 R14: 00007f478f87b658 R15: 00007ffecf422830 Allocated by task 1705: kasan_save_track+0x3e/0x80 __kasan_kmalloc+0x8f/0xa0 __kmalloc_cache_noprof+0x213/0x3e0 binderfs_binder_device_create+0x183/0xa80 binder_ctl_ioctl+0x138/0x190 __x64_sys_ioctl+0x120/0x1b0 do_syscall_64+0xf6/0x210 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 1705: kasan_save_track+0x3e/0x80 kasan_save_free_info+0x46/0x50 __kasan_slab_free+0x62/0x70 kfree+0x194/0x440 evict+0x524/0x9f0 do_unlinkat+0x390/0x5b0 __x64_sys_unlink+0x47/0x50 do_syscall_64+0xf6/0x210 entry_SYSCALL_64_after_hwframe+0x77/0x7f This 'stress-ng' workload causes the concurrent deletions from 'binder_devices' and so requires full-featured synchronization to prevent list corruption. I've found this issue independently but pretty sure that syzbot did the same, so Reported-by: and Closes: should be applicable here as well. Cc: stable@vger.kernel.org Reported-by: syzbot+353d7b75658a95aa955a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=353d7b75658a95aa955a Fixes: e77aff5528a18 ("binderfs: fix use-after-free in binder_devices") Signed-off-by: Dmitry Antipov Acked-by: Carlos Llamas Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250517170957.1317876-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 5fddfbc0cbc55a6b506f8cd07c58a152a3b535d6 Merge: e02cdc0e7fb0b5 2b1424cd131cfa Author: Christian Brauner Date: Wed May 21 14:35:34 2025 +0200 Merge patch series "netfs: Miscellaneous fixes" David Howells says: Here are some miscellaneous fixes and changes for netfslib, if you could pull them: (1) Fix an oops in write-retry due to mis-resetting the I/O iterator. (2) Fix the recording of transferred bytes for short DIO reads. (3) Fix a request's work item to not require a reference, thereby avoiding the need to get rid of it in BH/IRQ context. (4) Fix waiting and waking to be consistent about the waitqueue used. * patches from https://lore.kernel.org/20250519090707.2848510-1-dhowells@redhat.com: netfs: Fix wait/wake to be consistent about the waitqueue used netfs: Fix the request's work item to not require a ref netfs: Fix setting of transferred bytes with short DIO reads netfs: Fix oops in write-retry from mis-resetting the subreq iterator Link: https://lore.kernel.org/20250519090707.2848510-1-dhowells@redhat.com Signed-off-by: Christian Brauner commit 2b1424cd131cfaba4cf7040473133d26cddac088 Author: David Howells Date: Mon May 19 10:07:04 2025 +0100 netfs: Fix wait/wake to be consistent about the waitqueue used Fix further inconsistencies in the use of waitqueues (clear_and_wake_up_bit() vs private waitqueue). Move some of this stuff from the read and write sides into common code so that it can be done in fewer places. To make this work, async I/O needs to set NETFS_RREQ_OFFLOAD_COLLECTION to indicate that a workqueue will do the collecting and places that call the wait function need to deal with it returning the amount transferred. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Signed-off-by: David Howells Link: https://lore.kernel.org/20250519090707.2848510-5-dhowells@redhat.com cc: Marc Dionne cc: Steve French cc: Ihor Solodrai cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Dominique Martinet cc: Christian Schoenebeck cc: Paulo Alcantara cc: Jeff Layton cc: v9fs@lists.linux.dev cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 20d72b00ca814d748f5663484e5c53bb2bf37a3a Author: David Howells Date: Mon May 19 10:07:03 2025 +0100 netfs: Fix the request's work item to not require a ref When the netfs_io_request struct's work item is queued, it must be supplied with a ref to the work item struct to prevent it being deallocated whilst on the queue or whilst it is being processed. This is tricky to manage as we have to get a ref before we try and queue it and then we may find it's already queued and is thus already holding a ref - in which case we have to try and get rid of the ref again. The problem comes if we're in BH or IRQ context and need to drop the ref: if netfs_put_request() reduces the count to 0, we have to do the cleanup - but the cleanup may need to wait. Fix this by adding a new work item to the request, ->cleanup_work, and dispatching that when the refcount hits zero. That can then synchronously cancel any outstanding work on the main work item before doing the cleanup. Adding a new work item also deals with another problem upstream where it's sometimes changing the work func in the put function and requeuing it - which has occasionally in the past caused the cleanup to happen incorrectly. As a bonus, this allows us to get rid of the 'was_async' parameter from a bunch of functions. This indicated whether the put function might not be permitted to sleep. Fixes: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers") Signed-off-by: David Howells Link: https://lore.kernel.org/20250519090707.2848510-4-dhowells@redhat.com cc: Paulo Alcantara cc: Marc Dionne cc: Steve French cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 34eb98c6598c4057640ca56dd1fad6555187473a Author: Paulo Alcantara Date: Mon May 19 10:07:02 2025 +0100 netfs: Fix setting of transferred bytes with short DIO reads A netfslib request comprises an ordered stream of subrequests that, when doing an unbuffered/DIO read, are contiguous. The subrequests may be performed in parallel, but may not be fully completed. For instance, if we try and make a 256KiB DIO read from a 3-byte file with a 64KiB rsize and 256KiB bsize, netfslib will attempt to make a read of 256KiB, broken up into four 64KiB subreads, with the expectation that the first will be short and the subsequent three be completely devoid - but we do all four on the basis that the file may have been changed by a third party. The read-collection code, however, walks through all the subreqs and advances the notion of how much data has been read in the stream to the start of each subreq plus its amount transferred (which are 3, 0, 0, 0 for the example above) - which gives an amount apparently read of 3*64KiB - which is incorrect. Fix the collection code to cut short the calculation of the transferred amount with the first short subrequest in an unbuffered read; everything beyond that must be ignored as there's a hole that cannot be filled. This applies both to shortness due to hitting the EOF and shortness due to an error. This is achieved by setting a flag on the request when we collect the first short subrequest (collection is done in ascending order). This can be tested by mounting a cifs volume with rsize=65536,bsize=262144 and doing a 256k DIO read of a very small file (e.g. 3 bytes). read() should return 3, not >3. This problem came in when netfs_read_collection() set rreq->transferred to stream->transferred, even for DIO. Prior to that, netfs_rreq_assess_dio() just went over the list and added up the subreqs till it met a short one - but now the subreqs are discarded earlier. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reported-by: Nicolas Baranger Closes: https://lore.kernel.org/all/10bec2430ed4df68bde10ed95295d093@3xo.fr/ Signed-off-by: "Paulo Alcantara (Red Hat)" Signed-off-by: David Howells Link: https://lore.kernel.org/20250519090707.2848510-3-dhowells@redhat.com cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 4481f7f2b3df123ec77e828c849138f75cff2bf2 Author: David Howells Date: Mon May 19 10:07:01 2025 +0100 netfs: Fix oops in write-retry from mis-resetting the subreq iterator Fix the resetting of the subrequest iterator in netfs_retry_write_stream() to use the iterator-reset function as the iterator may have been shortened by a previous retry. In such a case, the amount of data to be written by the subrequest is not "subreq->len" but "subreq->len - subreq->transferred". Without this, KASAN may see an error in iov_iter_revert(): BUG: KASAN: slab-out-of-bounds in iov_iter_revert lib/iov_iter.c:633 [inline] BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x443/0x5a0 lib/iov_iter.c:611 Read of size 4 at addr ffff88802912a0b8 by task kworker/u32:7/1147 CPU: 1 UID: 0 PID: 1147 Comm: kworker/u32:7 Not tainted 6.15.0-rc6-syzkaller-00052-g9f35e33144ae #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_unbound netfs_write_collection_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 iov_iter_revert lib/iov_iter.c:633 [inline] iov_iter_revert+0x443/0x5a0 lib/iov_iter.c:611 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x166d/0x1a50 fs/netfs/write_retry.c:231 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x23fd/0x3830 fs/netfs/write_collect.c:374 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Fixes: cd0277ed0c18 ("netfs: Use new folio_queue data type and iterator instead of xarray iter") Reported-by: syzbot+25b83a6f2c702075fcbc@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=25b83a6f2c702075fcbc Signed-off-by: David Howells Link: https://lore.kernel.org/20250519090707.2848510-2-dhowells@redhat.com Tested-by: syzbot+25b83a6f2c702075fcbc@syzkaller.appspotmail.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit e02cdc0e7fb0b5fe9287b2434c5c09fd9a58cb9e Merge: a1b4a25abb3f81 4b1ca12dd3f252 Author: Christian Brauner Date: Wed May 21 14:34:43 2025 +0200 Merge patch series "netfs: Miscellaneous cleanups" David Howells says: Here are some miscellaneous very minor cleanups for netfslib for the next merge window, primarily from Max Kellermann, if you could pull them. (1) Remove NETFS_SREQ_SEEK_DATA_READ. (2) Remove NETFS_INVALID_WRITE. (3) Remove NETFS_ICTX_WRITETHROUGH. (4) Remove NETFS_READ_HOLE_CLEAR. (5) Reorder structs to eliminate holes. (6) Remove netfs_io_request::ractl. (7) Only provide proc_link field if CONFIG_PROC_FS=y. (8) Remove folio_queue::marks3. (9) Remove NETFS_RREQ_DONT_UNLOCK_FOLIOS. (10) Remove NETFS_RREQ_BLOCKED. * patches from https://lore.kernel.org/20250519134813.2975312-1-dhowells@redhat.com: fs/netfs: remove unused flag NETFS_RREQ_BLOCKED fs/netfs: remove unused flag NETFS_RREQ_DONT_UNLOCK_FOLIOS folio_queue: remove unused field `marks3` fs/netfs: declare field `proc_link` only if CONFIG_PROC_FS=y fs/netfs: remove `netfs_io_request.ractl` fs/netfs: reorder struct fields to eliminate holes fs/netfs: remove unused enum choice NETFS_READ_HOLE_CLEAR fs/netfs: remove unused flag NETFS_ICTX_WRITETHROUGH fs/netfs: remove unused source NETFS_INVALID_WRITE fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ Link: https://lore.kernel.org/20250519134813.2975312-1-dhowells@redhat.com Signed-off-by: Christian Brauner commit 4b1ca12dd3f2529dc788cf4f18259ed62006ccb8 Author: Max Kellermann Date: Mon May 19 14:48:07 2025 +0100 fs/netfs: remove unused flag NETFS_RREQ_BLOCKED NETFS_RREQ_BLOCKED was added by commit 016dc8516aec ("netfs: Implement unbuffered/DIO read support") but has never been used either. Without NETFS_RREQ_BLOCKED, NETFS_RREQ_NONBLOCK makes no sense, and thus can be removed as well. Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-12-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 67b916719a15c33fd18d6e8298828caeef428d00 Author: Max Kellermann Date: Mon May 19 14:48:06 2025 +0100 fs/netfs: remove unused flag NETFS_RREQ_DONT_UNLOCK_FOLIOS NETFS_RREQ_DONT_UNLOCK_FOLIOS has never been used ever since it was added by commit 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers"). Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-11-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 6bb09e5db3a07cf3e03f25f725bd8edc959e38ba Author: Max Kellermann Date: Mon May 19 14:48:05 2025 +0100 folio_queue: remove unused field `marks3` The last user was removed by commit e2d46f2ec332 ("netfs: Change the read result collector to only use one work item"). Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-10-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 07c08bac9302012d9a91d40e95c8f98800f7d787 Author: Max Kellermann Date: Mon May 19 14:48:04 2025 +0100 fs/netfs: declare field `proc_link` only if CONFIG_PROC_FS=y This field is only used for the "proc" filesystem. Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-9-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 3dc00bca8dc8226f79f6958293a2777f0691cfb5 Author: Max Kellermann Date: Mon May 19 14:48:03 2025 +0100 fs/netfs: remove `netfs_io_request.ractl` Since this field is only used by netfs_prepare_read_iterator() when called by netfs_readahead(), we can simply pass it as parameter. This shrinks the struct from 576 to 568 bytes. Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-8-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 314ee7035febc86f4f9452fb90a6c2165a183fe5 Author: Max Kellermann Date: Mon May 19 14:48:02 2025 +0100 fs/netfs: reorder struct fields to eliminate holes This shrinks `struct netfs_io_stream` from 104 to 96 bytes and `struct netfs_io_request` from 600 to 576 bytes. [DH: Modified as the patch to turn netfs_io_request::error into a short was removed from the set] Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-7-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit d46a7b217d6abbaea78ce5abf4b295e3c1d819d9 Author: Max Kellermann Date: Mon May 19 14:48:01 2025 +0100 fs/netfs: remove unused enum choice NETFS_READ_HOLE_CLEAR This choice was added by commit 3a11b3a86366 ("netfs: Pass more information on how to deal with a hole in the cache") but the last user was removed by commit 86b374d061ee ("netfs: Remove fs/netfs/io.c"). Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-6-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 9fcf235e91fae9f3e99f4e09d332ed09296b11ec Author: Max Kellermann Date: Mon May 19 14:48:00 2025 +0100 fs/netfs: remove unused flag NETFS_ICTX_WRITETHROUGH This flag was added by commit 41d8e7673a77 ("netfs: Implement a write-through caching option") but it was never used. Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-5-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 9cd78ca04fb827f42d7c0d492b96fbb940451266 Author: Max Kellermann Date: Mon May 19 14:47:59 2025 +0100 fs/netfs: remove unused source NETFS_INVALID_WRITE This enum choice was added by commit 16af134ca4b7 ("netfs: Extend the netfs_io_*request structs to handle writes") and its only user was later removed by commit c245868524cc ("netfs: Remove the old writeback code"). Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-4-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit c1a606cd75fbe98d261b224b6dfb76d47f40dc12 Author: Max Kellermann Date: Mon May 19 14:47:58 2025 +0100 fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ This flag was added by commit 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers") but its only user was removed by commit 86b374d061ee ("netfs: Remove fs/netfs/io.c"). Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/20250519134813.2975312-3-dhowells@redhat.com cc: Paulo Alcantara cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 3335a1bbd62417fc60a043c7f64684c99cb841a2 Author: Arnd Bergmann Date: Tue May 13 14:34:42 2025 +0200 ALSA: qc_audio_offload: try to reduce address space confusion uaudio_transfer_buffer_setup() allocates a buffer for the subs->dev device, and the returned address for the buffer is a CPU local virtual address that may or may not be in the linear mapping, as well as a DMA address token that is accessible by the USB device, and this in turn may or may not correspond to the physical address. The use in the driver however assumes that these addresses are the linear map and the CPU physical address, respectively. Both are nonportable here, but in the end only the virtual address gets used by converting it to a physical address that gets mapped into a second iommu. Make this more explicit by pulling the conversion out first and warning if it is not part of the linear map, and using the actual physical address to map into the iommu in place of the dma address that may already be iommu-mapped into the usb host. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250513123442.159936-4-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5c7ef5001292d70d09d90bc2251f7d869b9d135c Author: Arnd Bergmann Date: Tue May 13 14:34:41 2025 +0200 ALSA: qc_audio_offload: avoid leaking xfer_buf allocation The info->xfer_buf_cpu member is set to a NULL value because the allocation happens in a different function and is only assigned to the function argument but never passed back. Pass it by reference instead to have a handle that can actually be freed by the final usb_free_coherent() call. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250513123442.159936-3-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 485ae08592521893c9251b89d4098503934da024 Author: Arnd Bergmann Date: Tue May 13 14:34:40 2025 +0200 ALSA: qc_audio_offload: rename dma/iova/va/cpu/phys variables While trying to understand a bug in the audio offload code, I had to spend extra time due to unfortunate nameing of local variables and struct members. Change these to more conventional names that reflect the actual usage: - pointers to the CPU virtual addresses of a dma buffer get a _cpu suffix to disambiguate them for MMIO virtual addresses - MMIO virtual addresses that are mapped explicitly through the IOMMU get a _iova suffix consistently, rather than a mix of iova and va. - DMA addresses (dma_addr_t) that are in a device address space (linear or IOMMU) get a _dma suffix in place of the _pa suffix. - CPU physical (phys_addr_t) addresses get a _pa suffix. There is still a mixup with dma addresses here that I address in another patch. No functional changes are intended here. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250513123442.159936-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit e7144a2b3ac8d11fc106b0d161a03a898c8d6822 Author: Christophe JAILLET Date: Fri May 9 12:19:40 2025 +0200 ALSA: usb-audio: qcom: Fix an error handling path in qc_usb_audio_probe() If an error occurs after a successful qc_usb_audio_offload_init_qmi_dev() call, qc_usb_audio_cleanup_qmi_dev() should be called to release some resources as already done in the remove function. Add the missing qc_usb_audio_cleanup_qmi_dev(). Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/335f54da099240d9b6c7aca0397c7d8c6bb629ac.1746785961.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit b803c4a4f78834b31ebfbbcea350473333760559 Author: Vincent Mailhol Date: Fri May 2 02:12:10 2025 +0900 can: dev: add struct data_bittiming_params to group FD parameters This is a preparation patch for the introduction of CAN XL. CAN FD and CAN XL uses similar bittiming parameters. Add one level of nesting for all the CAN FD parameters. Typically: priv->can.data_bittiming; becomes: priv->can.fd.data_bittiming; This way, the CAN XL equivalent (to be introduced later) would be: priv->can.xl.data_bittiming; Add the new struct data_bittiming_params which contains all the data bittiming parameters, including the TDC and the callback functions. This done, update all the CAN FD drivers to make use of the new layout. Acked-by: Oliver Hartkopp Signed-off-by: Vincent Mailhol Link: https://patch.msgid.link/20250501171213.2161572-2-mailhol.vincent@wanadoo.fr [mkl: fix rcar_canfd] Signed-off-by: Marc Kleine-Budde commit 851013e9c7558f3d0cabe54ad3a45c5ae284e674 Merge: 9ab0ac0e532afd be53aa05200853 Author: Marc Kleine-Budde Date: Wed May 21 14:31:28 2025 +0200 Merge patch series "Add support for RZ/G3E CANFD" Biju Das says: The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H and RZ/G2L, but differs in some hardware parameters: * No external clock, but instead has ram clock. * Support up to 6 channels. * 20 interrupts. v8->v9: * Collected tags. * Added missing header bitfield.h. * Fixed logical error ch->BIT(ch) in rcar_canfd_global_error(). * Removed unneeded double space in rcar_canfd_setrnc(). * Updated commit description in patch#15. v7->v8: * Collected tags. * Updated commit description for patch#{5,9,15,16,17}. * Replaced the macro RCANFD_GERFL_EEF0_7->RCANFD_GERFL_EEF. * Dropped the redundant macro RCANFD_GERFL_EEF(ch). * Added patch for dropping the mask operation in RCANFD_GAFLCFG_SETRNC macro. * Converted RCANFD_GAFLCFG_SETRNC->rcar_canfd_setrnc(). * Updated RCANFD_GAFLCFG macro by replacing the parameter ch->w, where w is the GAFLCFG index used in the hardware manual. * Renamed the parameter x->page_num in RCANFD_GAFLECTR_AFLPN macro to make it clear. * Renamed the parameter x->cftml in RCANFD_CFCC_CFTML macro to make it clear. * Updated {rzg2l,car_gen3_hw_info} with ch_interface_mode = 0. * Updated {rzg2l,rcar_gen3}_hw_info with shared_can_regs = 0. * Started using struct rcanfd_regs instead of LUT for reg offsets. * Started using struct rcar_canfd_shift_data instead of LUT for shift data. * Renamed only_internal_clks->external_clk to avoid negation. * Updated rcar_canfd_hw_info tables with external_clk entries. * Replaced 10->sizeof(name) in scnprintf(). v6->v7: * Collected tags * Replaced 'aswell'->'as well' in patch#11 commit description. v5->v6: * Replaced RCANFD_RNC_PER_REG macro with rnc_stride variable. * Updated commit description for patch#7 and #8 * Dropped mask_table: AFLPN_MASK is replaced by max_aflpn variable. CFTML_MASK is replaced by max_cftml variable. BITTIMING MASK's are replaced by {nom,data}_bittiming variables. * Collected tag from Geert. v4->v5: * Collected tag from Geert. * The rules for R-Car Gen3/4 could be kept together, reducing the number of lines. Similar change for rzg2l-canfd aswell. * Keeping interrupts and resets together allows to keep a clear separation between RZ/G2L and RZ/G3E, at the expense of only a single line. * Retained the tags for binding patches as it is trivial changes. * Dropped the unused macro RCANFD_GAFLCFG_GETRNC. * Updated macro RCANFD_GERFL_ERR by using gpriv->channels_mask and dropped unused macro RCANFD_GERFL_EEF0_7. * Replaced RNC mask in RCANFD_GAFLCFG_SETRNC macro by using info->num_supported_rules variable. * Updated the macro RCANFD_GAFLCFG by using info->rnc_field_width variable. * Updated shift value in RCANFD_GAFLCFG_SETRNC macro by using a formula (32 - (n % rnc_per_reg + 1) * field_width). * Replaced the variable name shared_can_reg->shared_can_regs. * Improved commit description for patch{#11,#12}by replacing has->have. * Dropped RCANFD_EEF_MASK and RCANFD_RNC_MASK as it is taken care by gpriv->channels_mask and info->num_supported_rules. * Dropped RCANFD_FIRST_RNC_SH and RCANFD_SECOND_RNC_SH by using a formula (32 - (n % rnc_per_reg + 1) * rnc_field_width. * Improved commit description by "All SoCs supports extenal clock"-> "All existing SoCs support an external clock". * Updated error description in probe as "cannot get enabled ram clock" * Updated r9a09g047_hw_info table. v3->v4: * Added Rb tag from Rob for patch#2. * Added prefix RCANFD_* to enum rcar_canfd_reg_offset_id. * Added prefix RCANFD_* to enum rcar_canfd_mask_id. * Added prefix RCANFD_* to enum rcar_canfd_shift_id. v2->v3: * Collected tags. * Dropped reg_gen4() and is_gen4() by adding mask_table, shift_table, regs, ch_interface_mode and shared_can_reg variables to struct rcar_canfd_hw_info. v1->v2: * Split the series with fixes patch separately. * Added patch for Simplify rcar_canfd_probe() using of_get_available_child_by_name() as dependency patch hit on can-next. * Added Rb tag from Vincent Mailhol. * Dropped redundant comment from commit description for patch#3. Link: https://patch.msgid.link/20250417054320.14100-1-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit be53aa052008538d67d9ad23f6f8160df390e1d6 Author: Biju Das Date: Thu Apr 17 06:43:20 2025 +0100 can: rcar_canfd: Add RZ/G3E support The CAN-FD IP found on the RZ/G3E SoC is similar to R-Car Gen4, but it has no external clock instead it has clk_ram, it has 6 channels and supports 20 interrupts. Add support for RZ/G3E CAN-FD driver. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-20-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 0853b7e479a69d1e335665ceec9898c5b9ecc810 Author: Biju Das Date: Thu Apr 17 06:43:19 2025 +0100 can: rcar_canfd: Enhance multi_channel_irqs handling Currently multi_channel_irqs has only 2 channels. But RZ/G3E has six channels. Enhance multi_channel_irqs handling to support more than two channels. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-19-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit e5258b337de26c97cf210858407e0fc881bc0e3d Author: Biju Das Date: Thu Apr 17 06:43:18 2025 +0100 can: rcar_canfd: Add external_clk variable to struct rcar_canfd_hw_info All existing SoCs support an external clock, but RZ/G3E has only internal clocks. Add external_clk variable to struct rcar_canfd_hw_info to handle this difference. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-18-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit c5670c23d67dd81e71262bb7c5942502cd9df62e Author: Biju Das Date: Thu Apr 17 06:43:17 2025 +0100 can: rcar_canfd: Add sh variable to struct rcar_canfd_hw_info R-Car Gen3 and Gen4 have some differences in the shift bits. Introduce a struct rcar_canfd_shift_data to hold these values and add the struct rcar_canfd_shift_data variable sh to struct rcar_canfd_hw_info to handle these differences. After this, drop the unused functions reg_gen4() and is_gen4(). Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-17-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 5026d2acaefab81857390c00c771ee6a2fa65461 Author: Biju Das Date: Thu Apr 17 06:43:16 2025 +0100 can: rcar_canfd: Add struct rcanfd_regs variable to struct rcar_canfd_hw_info R-Car Gen3 and Gen4 have some differences in the register offsets. Add struct rcanfd_regs variable regs to the struct rcar_canfd_hw_info to handle these differences. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-16-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 836cc711fc18747fc936ac62abd61a64465f00cc Author: Biju Das Date: Thu Apr 17 06:43:15 2025 +0100 can: rcar_canfd: Add shared_can_regs variable to struct rcar_canfd_hw_info R-Car Gen4 has shared regs for both CAN-FD and Classical CAN operations. Add shared_can_regs variable to struct rcar_canfd_hw_info to handle this difference. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-15-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit c10e5510101112932fc2955a5ff97ecf8448a9d1 Author: Biju Das Date: Thu Apr 17 06:43:14 2025 +0100 can: rcar_canfd: Add ch_interface_mode variable to struct rcar_canfd_hw_info R-Car Gen4 has channel specific interface mode bit for setting CAN-FD or Classical CAN mode whereas on R-Car Gen3 it is global. Add a ch_interface_mode variable to struct rcar_canfd_hw_info to handle this difference. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-14-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit b5a9f2ec427cbdfe915c377fdd61812636b2cdc2 Author: Biju Das Date: Thu Apr 17 06:43:13 2025 +0100 can: rcar_canfd: Add {nom,data}_bittiming variables to struct rcar_canfd_hw_info Both R-Car Gen4 and R-Car Gen3 have different bit timing parameters Add {nom,data}_bittiming variables to struct rcar_canfd_hw_info to handle this difference. Since the mask used in the macros are max value - 1, replace that as well. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-13-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 04d7a3a4660fb94b1398027a9089af95014115f1 Author: Biju Das Date: Thu Apr 17 06:43:12 2025 +0100 can: rcar_canfd: Add max_cftml variable to struct rcar_canfd_hw_info R-Car Gen3 has CFTML max positional value is 15 whereas on R-Car Gen4 it is 31. Add a max_cftml variable to struct rcar_canfd_hw_info to handle this difference. While at it, rename the parameter x->cftml in RCANFD_CFCC_CFTML macro to make it clear. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-12-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 2d6cb8ff94166f3965b3fc3637faecf295a8c708 Author: Biju Das Date: Thu Apr 17 06:43:11 2025 +0100 can: rcar_canfd: Add max_aflpn variable to struct rcar_canfd_hw_info R-Car Gen3 has maximum acceptance filter list page number of 31 whereas on R-Car Gen4 it is 127. Add max_aflpn variable to struct rcar_canfd_hw_info in order to support RZ/G3E that has max AFLPN of 63. While at it, rename the parameter x->page_num in RCANFD_GAFLECTR_AFLPN macro to make it clear. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-11-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit e9ffa12e02e193395e594df8977157121b107c21 Author: Biju Das Date: Thu Apr 17 06:43:10 2025 +0100 can: rcar_canfd: Add rnc_field_width variable to struct rcar_canfd_hw_info The shift and w value in rcar_canfd_setrnc() are dictated by the field width: - R-Car Gen4 packs 2 values in a 32-bit word, using a field width of 16 bits, - R-Car Gen3 packs up to 4 values in a 32-bit word, using a field width of 8 bits. Add rnc_field_width variable to struct rcar_canfd_hw_info to handle this difference. The rnc_stride is 32 / rnc_field_width and the index parameter w is calculated by ch / rnc_stride. The shift value in rcar_canfd_setrnc() is computed by using (32 - (ch % rnc_stride + 1) * rnc_field_width). Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-10-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit a2427e44942bb772cf4e416df45b569a0e35b1cb Author: Biju Das Date: Thu Apr 17 06:43:09 2025 +0100 can: rcar_canfd: Update RCANFD_GAFLCFG macro Update RCANFD_GAFLCFG macro by replacing the parameter ch->w, where w is the GAFLCFG index used in the hardware manual. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-9-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 6b9f8b53a1f3ad8e7880e3ad0e08074f5d7fd404 Author: Biju Das Date: Thu Apr 17 06:43:08 2025 +0100 can: rcar_canfd: Add rcar_canfd_setrnc() Add rcar_canfd_setrnc() to replace the macro RCANFD_GAFLCFG_SETRNC. While at it, replace int->unsigned int for local variables offset, page and num_rules in rcar_canfd_configure_afl_rules(). Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-8-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit c9e17c91f1656f90b06e5cd2f39dfaab08de9611 Author: Biju Das Date: Thu Apr 17 06:43:07 2025 +0100 can: rcar_canfd: Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro Drop the mask operation in RCANFD_GAFLCFG_SETRNC macro as the num_rules can never be larger than number of supported rules. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-7-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit b75fcf2af2dbbc5f913cf1b9194ed01ce9c068b6 Author: Biju Das Date: Thu Apr 17 06:43:06 2025 +0100 can: rcar_canfd: Update RCANFD_GERFL_ERR macro Replace the macro RCANFD_GERFL_EEF0_7->RCANFD_GERFL_EEF. The macros RCANFD_GERFL_EEF* in RCANFD_GERFL_ERR can be replaced by FIELD_PREP() and drop the redundant macro RCANFD_GERFL_EEF(ch). Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250417054320.14100-6-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 05e7f5a90c306dd1b94d3f15ab084755c03f1202 Author: Biju Das Date: Thu Apr 17 06:43:05 2025 +0100 can: rcar_canfd: Drop RCANFD_GAFLCFG_GETRNC macro Drop the unused macro RCANFD_GAFLCFG_GETRNC. Reviewed-by: Geert Uytterhoeven Reviewed-by: Vincent Mailhol Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-5-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 56f3dc3ea4ab0c495bbdb402f2a9a12850a5e077 Author: Biju Das Date: Thu Apr 17 06:43:04 2025 +0100 can: rcar_canfd: Use of_get_available_child_by_name() Simplify rcar_canfd_probe() using of_get_available_child_by_name(). While at it, move of_node_put(child) inside the if block to avoid additional check if of_child is NULL. Reviewed-by: Vincent Mailhol Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-4-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit e623c6e56bdf776b001313934709f9ff38b7dda6 Author: Biju Das Date: Thu Apr 17 06:43:03 2025 +0100 dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047) SoC, which supports up to six channels. The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H and RZ/G2L, but differs in some hardware parameters: * No external clock, but instead has ram clock. * Support up to 6 channels. * 20 interrupts. Reviewed-by: "Rob Herring (Arm)" Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-3-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 466c8ef7b66bf4595537333e96c7334e1ceb454a Author: Biju Das Date: Thu Apr 17 06:43:02 2025 +0100 dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema RZ/G3E SoC has 20 interrupts, 2 resets and 6 channels that need more branching with conditional schema. Simplify the conditional schema with if statements rather than the complex if-else statements to prepare for supporting RZ/G3E SoC. Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://patch.msgid.link/20250417054320.14100-2-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit a1b4a25abb3f8181433309a4b189f15fd26a8d84 Merge: 0af2f6be1b4281 f1745496d3fba3 Author: Christian Brauner Date: Wed May 21 14:30:48 2025 +0200 Merge netfs API documentation updates Bring in the netfs API documentation updates which had been in the vfs-6.16.misc branch for most of this cycle. So don't needlessly rewrite the vfs-6.16.misc by dropping it from that branch and moving it to vfs-6.16.netfs. Simply merge vfs-6.16.misc into vfs-6.16.netfs. Signed-off-by: Christian Brauner commit fe91c24a551c6f120f372faa5193d616a9f0b15a Author: Hector Martin Date: Fri May 9 13:24:52 2025 +0100 nvmem: Add apple-spmi-nvmem driver Add a driver for a series of SPMI-attached PMICs present on Apple devices Reviewed-by: Neal Gompa Reviewed-by: Alyssa Rosenzweig Signed-off-by: Hector Martin Co-developed-by: Sasha Finkelstein Signed-off-by: Sasha Finkelstein Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250509122452.11827-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4833245492676ce96ff95761b0adead4ef4509de Author: Sasha Finkelstein Date: Fri May 9 13:24:51 2025 +0100 dt-bindings: spmi: Add Apple SPMI NVMEM Add bindings for exposing SPMI registers of Apple PMICs as NVMEM cells Reviewed-by: Alyssa Rosenzweig Signed-off-by: Sasha Finkelstein Reviewed-by: "Rob Herring (Arm)" Reviewed-by: Neal Gompa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250509122452.11827-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit 01465f296a6871222b185c350423978d44431c96 Author: Geert Uytterhoeven Date: Fri May 9 13:24:50 2025 +0100 nvmem: Remove unused nvmem cell table support Board files are deprecated by DT, and the last user of nvmem_add_cell_table() was removed by commit 2af4fcc0d3574482 ("ARM: davinci: remove unused board support") in v6.3. Hence remove all support for nvmem cell tables, and update the documentation. Device drivers can still register a single cell using nvmem_add_one_cell() (which was not documented before). Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250509122452.11827-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit fe8abdd175d7b547ae1a612757e7902bcd62e9cf Author: Peter Korsgaard Date: Fri May 9 13:24:07 2025 +0100 nvmem: zynqmp_nvmem: unbreak driver after cleanup Commit 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") changed the driver to expect the device pointer to be passed as the "context", but in nvmem the context parameter comes from nvmem_config.priv which is never set - Leading to null pointer exceptions when the device is accessed. Fixes: 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") Cc: stable Signed-off-by: Peter Korsgaard Reviewed-by: Michal Simek Tested-by: Michal Simek Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250509122407.11763-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7a93add1d31f14e0b7e937163904dee1e864a9a8 Author: Arnd Bergmann Date: Fri May 9 13:24:06 2025 +0100 nvmem: rmem: select CONFIG_CRC32 The newly added crc checking leads to a link failure if CRC32 itself is disabled: x86_64-linux-ld: vmlinux.o: in function `rmem_eyeq5_checksum': rmem.c:(.text+0x52341b): undefined reference to `crc32_le_arch' Fixes: 7e606c311f70 ("nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM") Cc: stable Signed-off-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250509122407.11763-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman commit ff9102041208532e9f890ae8a9074da467beadab Author: Krzysztof Kozlowski Date: Thu May 1 19:53:04 2025 +0200 mux: MAINTAINERS: Mark as Odd Fixes Over last year, several patches for drivers/mux/ were not picked up, even after multiple pings or resends, so mark the mux subsystem as odd fixes to clarify actual status of lack of maintainers with dedicated time and indicate that someone could help here. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501175303.144102-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 071d8e4c2a3b0999a9b822e2eb8854784a350f8a Author: Michal Koutný Date: Mon May 5 14:12:00 2025 +0200 kernfs: Relax constraint in draining guard The active reference lifecycle provides the break/unbreak mechanism but the active reference is not truly active after unbreak -- callers don't use it afterwards but it's important for proper pairing of kn->active counting. Assuming this mechanism is in place, the WARN check in kernfs_should_drain_open_files() is too sensitive -- it may transiently catch those (rightful) callers between kernfs_unbreak_active_protection() and kernfs_put_active() as found out by Chen Ridong: kernfs_remove_by_name_ns kernfs_get_active // active=1 __kernfs_remove // active=0x80000002 kernfs_drain ... wait_event //waiting (active == 0x80000001) kernfs_break_active_protection // active = 0x80000001 // continue kernfs_unbreak_active_protection // active = 0x80000002 ... kernfs_should_drain_open_files // warning occurs kernfs_put_active To avoid the false positives (mind panic_on_warn) remove the check altogether. (This is meant as quick fix, I think active reference break/unbreak may be simplified with larger rework.) Fixes: bdb2fd7fc56e1 ("kernfs: Skip kernfs_drain_open_files() more aggressively") Link: https://lore.kernel.org/r/kmmrseckjctb4gxcx2rdminrjnq2b4ipf7562nvfd432ld5v5m@2byj5eedkb2o/ Cc: Chen Ridong Signed-off-by: Michal Koutný Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20250505121201.879823-1-mkoutny@suse.com Signed-off-by: Greg Kroah-Hartman commit 282582820ed7f60addd15223674fd6b99251e233 Author: Michael Ellerman Date: Tue May 20 20:28:55 2025 +1000 Documentation: embargoed-hardware-issues.rst: Remove myself I'm no longer able to perform this role since I left IBM. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8734czh8yg.fsf@mpe.ellerman.id.au Signed-off-by: Greg Kroah-Hartman commit a3245ebdfac846ce0b563a3ed474be2e15381f9f Merge: 3ab311289cf1cd 9c78317b42e7c3 Author: Greg Kroah-Hartman Date: Wed May 21 14:15:08 2025 +0200 Merge tag 'iio-fixes-for-6.15b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of fixes for 6.15 (or 6.16 merge window) Usual mixed bag. adi,ad4851 - Avoid a buffer overrun due to bug in pointer arithmetic. adi,ad7173 - Fix compiling if gpiolib is not enabled adi,ad7606 - Fix raw reads for 18-bit chips by ensuring we mask out upper bits as some SPI controllers do not do so for 18bit words. - Fix wrong masking for register writes. adi,ad7944 - Mask high bits for raw reads. adi,axi-adc - Add check on whether the busy flag has cleared before first access. invensense,icm42600 - Fix the temperature offset to take scale into account. nxp,fxls8962af - Fix temperature to be in milli degrees Celsius not degrees. - Fix sign of temperature channel. * tag 'iio-fixes-for-6.15b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: accel: fxls8962af: Fix temperature scan element sign iio: accel: fxls8962af: Fix temperature calculation iio: adc: ad7944: mask high bits on direct read iio: adc: ad4851: fix ad4858 chan pointer handling iio: imu: inv_icm42600: Fix temperature calculation iio: dac: adi-axi-dac: fix bus read iio: adc: ad7606_spi: fix reg write value mask iio: adc: ad7606: fix raw read for 18-bit chips iio: adc: ad7173: fix compiling without gpiolib commit 3ab311289cf1cd579e914b775a4449c964057b2c Author: Gustavo A. R. Silva Date: Tue May 13 12:53:26 2025 +0200 w1: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/w1/w1_netlink.c:198:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/w1/w1_netlink.c:219:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Reviewed-by: Kees Cook Signed-off-by: "Gustavo A. R. Silva" Link: https://lore.kernel.org/r/Z_RflBe5iDGTMFjV@kspp Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250513105326.27385-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit b808f1cc9c2e4a0263df21806f8f334edff8e988 Merge: d28b0977909d7d 9761037d28327e Author: Greg Kroah-Hartman Date: Wed May 21 14:13:40 2025 +0200 Merge tag 'mux-drv-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into char-misc-next Krzysztof writes: Mux drivers for v6.16 Few cleanups and fixes for the mux drivers: 1. Simplify with spi_get_device_match_data(). 2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings. 3. GPIO mux: add optional regulator for Lenovo T14s laptop headset. 4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to changes in the syscon code. * tag 'mux-drv-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux: mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning mux: gpio: add optional regulator support dt-bindings: mux: add optional regulator binding to gpio mux mux: mmio: Do not use syscon helper to build regmap mux: adg792a: remove incorrect of_match_ptr annotation mux: adgs1408: simplify with spi_get_device_match_data() mux: mmio: Add missing word in error message commit d28b0977909d7df4b46c6740ee0db30b2c576043 Merge: 2b0634cc1f3695 6348f62ef7ecc5 Author: Greg Kroah-Hartman Date: Wed May 21 14:11:43 2025 +0200 Merge tag 'mhi-for-v6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Fix conflict between MHI power up and SYSERR state transitions by issuing MHI reset only if the device is in SYSERR state while in SBL/PBL EEs. The device won't respond to reset if it is not in SYSERR state in SBL/PBL EEs. - Remove redundant call to pci_assign_resource() since PCI core calls this API internally. - Add Telit FN920C04 modem which is based on Qcom SDX35 chipset. * tag 'mhi-for-v6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Add Telit FN920C04 modem support bus: mhi: host: pci_generic: Remove redundant assign resource usage bus: mhi: host: Fix conflict between power_up and SYSERR commit 2b0634cc1f3695347343ce92baf98d703e288378 Merge: 4a6e2325afc980 6f18d174b73d0c Author: Greg Kroah-Hartman Date: Wed May 21 14:10:37 2025 +0200 Merge tag 'mhi-fixes-for-v6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Endpoint ============ - Increment the rd_offset after writing the buffer to avoid MHI host accessing the incomplete/wrong buffer element. * tag 'mhi-fixes-for-v6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: ep: Update read pointer only after buffer is written commit 4a6e2325afc980920b48d5337a5fd3d1649b0aff Merge: 893579d9e3e26b 6ebf1982038af1 Author: Greg Kroah-Hartman Date: Wed May 21 14:08:44 2025 +0200 Merge tag 'fpga-for-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.16-rc1 - Peter hands over the maintain role of m10bmc-sec driver to Matthew. - Qasim's change fix potential NULL pointer for fpga test. All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt() fpga: m10bmc-sec: change contact for secure update driver commit 893579d9e3e26bed34de0bcffacd75b38c330df1 Merge: b1b102bfcdb5e9 08e2a660b16019 Author: Greg Kroah-Hartman Date: Wed May 21 14:07:53 2025 +0200 Merge tag 'counter-updates-for-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter updates for 6.16 An update to allow for larger count values in interrupt-cnt. * tag 'counter-updates-for-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: interrupt-cnt: Convert atomic_t -> atomic_long_t commit b1b102bfcdb5e9e979a36b2c94882c0b2d42ddfd Merge: 81e9edc1a8d657 7351312632e831 Author: Greg Kroah-Hartman Date: Wed May 21 14:06:10 2025 +0200 Merge tag 'counter-fixes-for-6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter fixes for 6.15 A fix to prevent a race condition when accessing the Count enable component in interrupt-cnt. * tag 'counter-fixes-for-6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: interrupt-cnt: Protect enable/disable OPs with mutex commit 81e9edc1a8d657291409d70d93361d8277d226d8 Author: Christian Schrefl Date: Sat May 17 13:06:15 2025 +0200 rust: miscdevice: fix typo in MiscDevice::ioctl documentation Fixes one small typo (`utilties` to `utilities`) in the documentation of `MiscDevice::ioctl`. Fixes: f893691e7426 ("rust: miscdevice: add base miscdevice abstraction") Signed-off-by: Christian Schrefl Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250517-rust_miscdevice_fix_typo-v1-1-8c30a6237ba9@gmail.com Signed-off-by: Greg Kroah-Hartman commit 003d15b30f3690b14315822439edc2c3f823c6cd Author: Yoshihiro Shimoda Date: Wed May 7 19:09:47 2025 +0900 PCI: rcar-gen4: Document how to obtain platform firmware Renesas R-Car V4H (r8a779g0) has PCIe controller, and it requires specific firmware downloading. So, add a document about the firmware how to get. Signed-off-by: Yoshihiro Shimoda [kwilczynski: commit log, refactor the document content and then add this new file to a correct index under the top-level PCI documentation] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250507100947.608875-1-yoshihiro.shimoda.uh@renesas.com commit a3b4ca60f93ff3e8b41fffbf63bb02ef3b169c5e Merge: 4dd6566b5a8ca1 7b6724fe9a6ba6 Author: Christian Brauner Date: Fri May 16 18:21:32 2025 +0200 Merge patch series "coredump: add coredump socket" Christian Brauner says: Coredumping currently supports two modes: (1) Dumping directly into a file somewhere on the filesystem. (2) Dumping into a pipe connected to a usermode helper process spawned as a child of the system_unbound_wq or kthreadd. For simplicity I'm mostly ignoring (1). There's probably still some users of (1) out there but processing coredumps in this way can be considered adventurous especially in the face of set*id binaries. The most common option should be (2) by now. It works by allowing userspace to put a string into /proc/sys/kernel/core_pattern like: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h The "|" at the beginning indicates to the kernel that a pipe must be used. The path following the pipe indicator is a path to a binary that will be spawned as a usermode helper process. Any additional parameters pass information about the task that is generating the coredump to the binary that processes the coredump. In the example core_pattern shown above systemd-coredump is spawned as a usermode helper. There's various conceptual consequences of this (non-exhaustive list): - systemd-coredump is spawned with file descriptor number 0 (stdin) connected to the read-end of the pipe. All other file descriptors are closed. That specifically includes 1 (stdout) and 2 (stderr). This has already caused bugs because userspace assumed that this cannot happen (Whether or not this is a sane assumption is irrelevant.). - systemd-coredump will be spawned as a child of system_unbound_wq. So it is not a child of any userspace process and specifically not a child of PID 1. It cannot be waited upon and is in a weird hybrid upcall which are difficult for userspace to control correctly. - systemd-coredump is spawned with full kernel privileges. This necessitates all kinds of weird privilege dropping excercises in userspace to make this safe. - A new usermode helper has to be spawned for each crashing process. This series adds a new mode: (3) Dumping into an AF_UNIX socket. Userspace can set /proc/sys/kernel/core_pattern to: @/path/to/coredump.socket The "@" at the beginning indicates to the kernel that an AF_UNIX coredump socket will be used to process coredumps. The coredump socket must be located in the initial mount namespace. When a task coredumps it opens a client socket in the initial network namespace and connects to the coredump socket. - The coredump server should use SO_PEERPIDFD to get a stable handle on the connected crashing task. The retrieved pidfd will provide a stable reference even if the crashing task gets SIGKILLed while generating the coredump. - By setting core_pipe_limit non-zero userspace can guarantee that the crashing task cannot be reaped behind it's back and thus process all necessary information in /proc/. The SO_PEERPIDFD can be used to detect whether /proc/ still refers to the same process. The core_pipe_limit isn't used to rate-limit connections to the socket. This can simply be done via AF_UNIX socket directly. - The pidfd for the crashing task will contain information how the task coredumps. The PIDFD_GET_INFO ioctl gained a new flag PIDFD_INFO_COREDUMP which can be used to retreive the coredump information. If the coredump gets a new coredump client connection the kernel guarantees that PIDFD_INFO_COREDUMP information is available. Currently the following information is provided in the new @coredump_mask extension to struct pidfd_info: * PIDFD_COREDUMPED is raised if the task did actually coredump. * PIDFD_COREDUMP_SKIP is raised if the task skipped coredumping (e.g., undumpable). * PIDFD_COREDUMP_USER is raised if this is a regular coredump and doesn't need special care by the coredump server. * PIDFD_COREDUMP_ROOT is raised if the generated coredump should be treated as sensitive and the coredump server should restrict access to the generated coredump to sufficiently privileged users. - The coredump server should mark itself as non-dumpable. - A container coredump server in a separate network namespace can simply bind to another well-know address and systemd-coredump fowards coredumps to the container. - Coredumps could in the future also be handled via per-user/session coredump servers that run only with that users privileges. The coredump server listens on the coredump socket and accepts a new coredump connection. It then retrieves SO_PEERPIDFD for the client, inspects uid/gid and hands the accepted client to the users own coredump handler which runs with the users privileges only (It must of coure pay close attention to not forward crashing suid binaries.). The new coredump socket will allow userspace to not have to rely on usermode helpers for processing coredumps and provides a safer way to handle them instead of relying on super privileged coredumping helpers. This will also be significantly more lightweight since no fork()+exec() for the usermodehelper is required for each crashing process. The coredump server in userspace can just keep a worker pool. * patches from https://lore.kernel.org/20250516-work-coredump-socket-v8-0-664f3caf2516@kernel.org: selftests/coredump: add tests for AF_UNIX coredumps selftests/pidfd: add PIDFD_INFO_COREDUMP infrastructure coredump: validate socket name as it is written coredump: show supported coredump modes pidfs, coredump: add PIDFD_INFO_COREDUMP coredump: add coredump socket coredump: reflow dump helpers a little coredump: massage do_coredump() coredump: massage format_corename() Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-0-664f3caf2516@kernel.org Signed-off-by: Christian Brauner commit 7b6724fe9a6ba64b77d1e544cc92999dbca2b940 Author: Christian Brauner Date: Fri May 16 13:25:36 2025 +0200 selftests/coredump: add tests for AF_UNIX coredumps Add a simple test for generating coredumps via AF_UNIX sockets. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-9-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 4d6575949d914c5fb8ec2d6ca3a706f9a2b434b7 Author: Christian Brauner Date: Fri May 16 13:25:35 2025 +0200 selftests/pidfd: add PIDFD_INFO_COREDUMP infrastructure Add PIDFD_INFO_COREDUMP infrastructure so we can use it in tests. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-8-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 16195d2c7dd22342b66df717c13421c3147a0b9b Author: Christian Brauner Date: Fri May 16 13:25:34 2025 +0200 coredump: validate socket name as it is written In contrast to other parameters written into /proc/sys/kernel/core_pattern that never fail we can validate enabling the new AF_UNIX support. This is obviously racy as hell but it's always been that way. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-7-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Jann Horn Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit c72d9146375fa12becb4657b4d2105a460bfb058 Author: Christian Brauner Date: Fri May 16 13:25:33 2025 +0200 coredump: show supported coredump modes Allow userspace to discover what coredump modes are supported. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-6-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Jann Horn Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 1d8db6fd698de1f73b1a7d72aea578fdd18d9a87 Author: Christian Brauner Date: Fri May 16 13:25:32 2025 +0200 pidfs, coredump: add PIDFD_INFO_COREDUMP Extend the PIDFD_INFO_COREDUMP ioctl() with the new PIDFD_INFO_COREDUMP mask flag. This adds the @coredump_mask field to struct pidfd_info. When a task coredumps the kernel will provide the following information to userspace in @coredump_mask: * PIDFD_COREDUMPED is raised if the task did actually coredump. * PIDFD_COREDUMP_SKIP is raised if the task skipped coredumping (e.g., undumpable). * PIDFD_COREDUMP_USER is raised if this is a regular coredump and doesn't need special care by the coredump server. * PIDFD_COREDUMP_ROOT is raised if the generated coredump should be treated as sensitive and the coredump server should restrict to the generated coredump to sufficiently privileged users. The kernel guarantees that by the time the connection is made the all PIDFD_INFO_COREDUMP info is available. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-5-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Alexander Mikhalitsyn Reviewed-by: Jann Horn Signed-off-by: Christian Brauner commit a9194f88782afa1386641451a6c76beaa60485a0 Author: Christian Brauner Date: Fri May 16 13:25:31 2025 +0200 coredump: add coredump socket Coredumping currently supports two modes: (1) Dumping directly into a file somewhere on the filesystem. (2) Dumping into a pipe connected to a usermode helper process spawned as a child of the system_unbound_wq or kthreadd. For simplicity I'm mostly ignoring (1). There's probably still some users of (1) out there but processing coredumps in this way can be considered adventurous especially in the face of set*id binaries. The most common option should be (2) by now. It works by allowing userspace to put a string into /proc/sys/kernel/core_pattern like: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h The "|" at the beginning indicates to the kernel that a pipe must be used. The path following the pipe indicator is a path to a binary that will be spawned as a usermode helper process. Any additional parameters pass information about the task that is generating the coredump to the binary that processes the coredump. In the example core_pattern shown above systemd-coredump is spawned as a usermode helper. There's various conceptual consequences of this (non-exhaustive list): - systemd-coredump is spawned with file descriptor number 0 (stdin) connected to the read-end of the pipe. All other file descriptors are closed. That specifically includes 1 (stdout) and 2 (stderr). This has already caused bugs because userspace assumed that this cannot happen (Whether or not this is a sane assumption is irrelevant.). - systemd-coredump will be spawned as a child of system_unbound_wq. So it is not a child of any userspace process and specifically not a child of PID 1. It cannot be waited upon and is in a weird hybrid upcall which are difficult for userspace to control correctly. - systemd-coredump is spawned with full kernel privileges. This necessitates all kinds of weird privilege dropping excercises in userspace to make this safe. - A new usermode helper has to be spawned for each crashing process. This series adds a new mode: (3) Dumping into an AF_UNIX socket. Userspace can set /proc/sys/kernel/core_pattern to: @/path/to/coredump.socket The "@" at the beginning indicates to the kernel that an AF_UNIX coredump socket will be used to process coredumps. The coredump socket must be located in the initial mount namespace. When a task coredumps it opens a client socket in the initial network namespace and connects to the coredump socket. - The coredump server uses SO_PEERPIDFD to get a stable handle on the connected crashing task. The retrieved pidfd will provide a stable reference even if the crashing task gets SIGKILLed while generating the coredump. - By setting core_pipe_limit non-zero userspace can guarantee that the crashing task cannot be reaped behind it's back and thus process all necessary information in /proc/. The SO_PEERPIDFD can be used to detect whether /proc/ still refers to the same process. The core_pipe_limit isn't used to rate-limit connections to the socket. This can simply be done via AF_UNIX sockets directly. - The pidfd for the crashing task will grow new information how the task coredumps. - The coredump server should mark itself as non-dumpable. - A container coredump server in a separate network namespace can simply bind to another well-know address and systemd-coredump fowards coredumps to the container. - Coredumps could in the future also be handled via per-user/session coredump servers that run only with that users privileges. The coredump server listens on the coredump socket and accepts a new coredump connection. It then retrieves SO_PEERPIDFD for the client, inspects uid/gid and hands the accepted client to the users own coredump handler which runs with the users privileges only (It must of coure pay close attention to not forward crashing suid binaries.). The new coredump socket will allow userspace to not have to rely on usermode helpers for processing coredumps and provides a safer way to handle them instead of relying on super privileged coredumping helpers that have and continue to cause significant CVEs. This will also be significantly more lightweight since no fork()+exec() for the usermodehelper is required for each crashing process. The coredump server in userspace can e.g., just keep a worker pool. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-4-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Kuniyuki Iwashima Reviewed-by: Alexander Mikhalitsyn Reviewed-by: Jann Horn Signed-off-by: Christian Brauner commit b216af2eb4618caec6bef32d5886a9700b0ecfeb Author: Kan Liang Date: Tue May 20 11:16:44 2025 -0700 mips/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-17-kan.liang@linux.intel.com commit 5fa541ab04fcdb5ca1257143802fbd9028c13ddb Author: Kan Liang Date: Tue May 20 11:16:43 2025 -0700 xtensa/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Max Filippov Link: https://lore.kernel.org/r/20250520181644.2673067-16-kan.liang@linux.intel.com commit e4806c17bfd5d6f4363557854cbace786311d527 Author: Kan Liang Date: Tue May 20 11:16:42 2025 -0700 sparc/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-15-kan.liang@linux.intel.com commit b82f8885d1fd46d88c554877a0d87e9a1c3d7165 Author: Kan Liang Date: Tue May 20 11:16:41 2025 -0700 loongarch/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-14-kan.liang@linux.intel.com commit 141fedea798f3a89d791ff2eef3c6afd4906dcb7 Author: Kan Liang Date: Tue May 20 11:16:40 2025 -0700 csky/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Guo Ren Link: https://lore.kernel.org/r/20250520181644.2673067-13-kan.liang@linux.intel.com commit a33d4d5325cce88ecea81c2468d85fa3fe720ab8 Author: Kan Liang Date: Tue May 20 11:16:39 2025 -0700 arc/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vineet Gupta Link: https://lore.kernel.org/r/20250520181644.2673067-12-kan.liang@linux.intel.com commit 8c977a17996eb106e9dfd8d37d2eb510dd2c235e Author: Kan Liang Date: Tue May 20 11:16:38 2025 -0700 alpha/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-11-kan.liang@linux.intel.com commit f1a6fe2ab1d937370e3f334cbf519c794eef4411 Author: Kan Liang Date: Tue May 20 11:16:37 2025 -0700 perf/apple_m1: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-10-kan.liang@linux.intel.com commit 15073765285b965f70e4a29eb9a8d2a94e9abd48 Author: Kan Liang Date: Tue May 20 11:16:36 2025 -0700 perf/arm: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Leo Yan Link: https://lore.kernel.org/r/20250520181644.2673067-9-kan.liang@linux.intel.com commit 6792f74e8d6cbb062396ce4baabad21836b39ad2 Author: Kan Liang Date: Tue May 20 11:16:35 2025 -0700 s390/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Richter Link: https://lore.kernel.org/r/20250520181644.2673067-8-kan.liang@linux.intel.com commit 954617a7ccfe12808c30668a204eccc4ca7f089f Author: Kan Liang Date: Tue May 20 11:16:34 2025 -0700 powerpc/perf: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-7-kan.liang@linux.intel.com commit 6693da2181e435fcd8fdf776983c1b26ffee81c6 Author: Kan Liang Date: Tue May 20 11:16:33 2025 -0700 perf/x86/zhaoxin: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-6-kan.liang@linux.intel.com commit d058c7d538e77297fe721d4d2e679ca7d2eff69b Author: Kan Liang Date: Tue May 20 11:16:32 2025 -0700 perf/x86/amd: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250520181644.2673067-5-kan.liang@linux.intel.com commit b8328f67206c672a7140fd3a259892e17d96bbe6 Author: Kan Liang Date: Tue May 20 11:16:31 2025 -0700 perf/x86/intel: Remove driver-specific throttle support The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250520181644.2673067-4-kan.liang@linux.intel.com commit e800ac51202f053018f3d6acb1819ecec4d75a2c Author: Kan Liang Date: Tue May 20 11:16:30 2025 -0700 perf: Only dump the throttle log for the leader The PERF_RECORD_THROTTLE records are dumped for all throttled events. It's not necessary for group events, which are throttled altogether. Optimize it by only dump the throttle log for the leader. The sample right after the THROTTLE record must be generated by the actual target event. It is good enough for the perf tool to locate the actual target event. Suggested-by: Namhyung Kim Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20250520181644.2673067-3-kan.liang@linux.intel.com commit 9734e25fbf5ae68eb04234b2cd14a4b36ab89141 Author: Kan Liang Date: Tue May 20 11:16:29 2025 -0700 perf: Fix the throttle logic for a group The current throttle logic doesn't work well with a group, e.g., the following sampling-read case. $ perf record -e "{cycles,cycles}:S" ... $ perf report -D | grep THROTTLE | tail -2 THROTTLE events: 426 ( 9.0%) UNTHROTTLE events: 425 ( 9.0%) $ perf report -D | grep PERF_RECORD_SAMPLE -a4 | tail -n 5 0 1020120874009167 0x74970 [0x68]: PERF_RECORD_SAMPLE(IP, 0x1): ... sample_read: .... group nr 2 ..... id 0000000000000327, value 000000000cbb993a, lost 0 ..... id 0000000000000328, value 00000002211c26df, lost 0 The second cycles event has a much larger value than the first cycles event in the same group. The current throttle logic in the generic code only logs the THROTTLE event. It relies on the specific driver implementation to disable events. For all ARCHs, the implementation is similar. Only the event is disabled, rather than the group. The logic to disable the group should be generic for all ARCHs. Add the logic in the generic code. The following patch will remove the buggy driver-specific implementation. The throttle only happens when an event is overflowed. Stop the entire group when any event in the group triggers the throttle. The MAX_INTERRUPTS is set to all throttle events. The unthrottled could happen in 3 places. - event/group sched. All events in the group are scheduled one by one. All of them will be unthrottled eventually. Nothing needs to be changed. - The perf_adjust_freq_unthr_events for each tick. Needs to restart the group altogether. - The __perf_event_period(). The whole group needs to be restarted altogether as well. With the fix, $ sudo perf report -D | grep PERF_RECORD_SAMPLE -a4 | tail -n 5 0 3573470770332 0x12f5f8 [0x70]: PERF_RECORD_SAMPLE(IP, 0x2): ... sample_read: .... group nr 2 ..... id 0000000000000a28, value 00000004fd3dfd8f, lost 0 ..... id 0000000000000a29, value 00000004fd3dfd8f, lost 0 Suggested-by: "Peter Zijlstra (Intel)" Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20250520181644.2673067-2-kan.liang@linux.intel.com commit 78272d44970c07899c78661f6b7492b5a7e14a90 Author: Colin Ian King Date: Tue May 20 09:06:57 2025 +0100 selftests/futex: Fix spelling mistake "unitiliazed" -> "uninitialized" There is a spelling mistake in a fail error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20250520080657.30726-1-colin.i.king@gmail.com commit 73c6c02b4febbb2c2761e559f31af8c7b87e81a5 Author: Sebastian Andrzej Siewior Date: Sat May 17 17:14:55 2025 +0200 futex: Correct the kernedoc return value for futex_wait_setup(). The kerneldoc for futex_wait_setup() states it can return "0" or "<1". This isn't true because the error case is "<0" not less than 1. Document that <0 is returned on error. Drop the possible return values and state possible reasons. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: André Almeida Link: https://lore.kernel.org/r/20250517151455.1065363-6-bigeasy@linutronix.de commit 4140e2b31bedd87bfc53362441165979aa4fc5d8 Author: Sebastian Andrzej Siewior Date: Sat May 17 17:14:54 2025 +0200 tools headers: Synchronize prctl.h ABI header The prctl.h ABI header was slightly updated during the development of the interface. In particular the "immutable" parameter became a bit in the option argument. Synchronize prctl.h ABI header again and make use of the definition in the testsuite and "perf bench futex". Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: André Almeida Link: https://lore.kernel.org/r/20250517151455.1065363-5-bigeasy@linutronix.de commit 279f2c2c8e2169403d01190f042efa6e41731578 Author: Sebastian Andrzej Siewior Date: Sat May 17 17:14:53 2025 +0200 futex: Use RCU_INIT_POINTER() in futex_mm_init(). There is no need for an explicit NULL pointer initialisation plus a comment why it is okay. RCU_INIT_POINTER() can be used for NULL initialisations and it is documented. This has been build tested with gcc version 9.3.0 (Debian 9.3.0-22) on a x86-64 defconfig. Fixes: 094ac8cff7858 ("futex: Relax the rcu_assign_pointer() assignment of mm->futex_phash in futex_mm_init()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250517151455.1065363-4-bigeasy@linutronix.de commit 7d4f494767918c80f2a99831728159b2aa398872 Author: Sebastian Andrzej Siewior Date: Sat May 17 17:14:52 2025 +0200 selftests/futex: Use TAP output in futex_numa_mpol Use TAP output for easier automated testing. Suggested-by: André Almeida Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: André Almeida Link: https://lore.kernel.org/r/20250517151455.1065363-3-bigeasy@linutronix.de commit 2b7363602973d1073f0e1775698fa62477a9a495 Author: Sebastian Andrzej Siewior Date: Sat May 17 17:14:51 2025 +0200 selftests/futex: Use TAP output in futex_priv_hash Use TAP output for easier automated testing. Suggested-by: André Almeida Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: André Almeida Link: https://lore.kernel.org/r/20250517151455.1065363-2-bigeasy@linutronix.de commit 90ca9410dab21c407706726b86b6e50c6698b5af Author: Xuewen Yan Date: Thu Apr 17 12:34:57 2025 +0800 sched/uclamp: Align uclamp and util_est and call before freq update The commit dfa0a574cbc47 ("sched/uclamg: Handle delayed dequeue") has add the sched_delayed check to prevent double uclamp_dec/inc. However, it put the uclamp_rq_inc() after enqueue_task(). This may lead to the following issues: When a task with uclamp goes through enqueue_task() and could trigger cpufreq update, its uclamp won't even be considered in the cpufreq update. It is only after enqueue will the uclamp be added to rq buckets, and cpufreq will only pick it up at the next update. This could cause a delay in frequency updating. It may affect the performance(uclamp_min > 0) or power(uclamp_max < 1024). So, just like util_est, put the uclamp_rq_inc() before enqueue_task(). And as for the sched_delayed_task, same as util_est, using the sched_delayed flag to prevent inc the sched_delayed_task's uclamp, using the ENQUEUE_DELAYED flag to allow inc the sched_delayed_task's uclamp which is being woken up. Signed-off-by: Xuewen Yan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20250417043457.10632-3-xuewen.yan@unisoc.com commit 0212696a844631a923aa6cedd74ebbb3cf434e51 Author: Xuewen Yan Date: Thu Apr 17 12:34:56 2025 +0800 sched/util_est: Simplify condition for util_est_{en,de}queue() To prevent double enqueue/dequeue of the util-est for sched_delayed tasks, commit 729288bc6856 ("kernel/sched: Fix util_est accounting for DELAY_DEQUEUE") added the corresponding check. This check excludes double en/dequeue during task migration and priority changes. In fact, these conditions can be simplified. For util_est_dequeue, we know that sched_delayed flag is set in dequeue_entity. When the task is sleeping, we need to call util_est_dequeue to subtract util-est from the cfs_rq. At this point, sched_delayed has not yet been set. If we find that sched_delayed is already set, it indicates that this task has already called dequeue_task_fair once. In this case, there is no need to call util_est_dequeue again. Therefore, simply checking the sched_delayed flag should be sufficient to prevent unnecessary util_est updates during the dequeue. For util_est_enqueue, our goal is to add the util_est to the cfs_rq when task enqueue. However, we don't want to add the util_est of a sched_delayed task to the cfs_rq because the task is sleeping. Therefore, we can exclude the util_est_enqueue for sched_delayed tasks by checking the sched_delayed flag. However, when waking up a delayed task, the sched_delayed flag is cleared after util_est_enqueue. As a result, if we only check the sched_delayed flag, we would miss the util_est_enqueue. Since waking up a sched_delayed task calls enqueue_task with the ENQUEUE_DELAYED flag, we can determine whether to call util_est_enqueue by checking if the enqueue_flag contains ENQUEUE_DELAYED. Signed-off-by: Xuewen Yan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20250417043457.10632-2-xuewen.yan@unisoc.com commit aa3ee4f0b7541382c9f6f43f7408d73a5d4f4042 Author: Xuewen Yan Date: Mon Mar 3 18:52:39 2025 +0800 sched/fair: Fixup wake_up_sync() vs DELAYED_DEQUEUE Delayed dequeued feature keeps a sleeping task enqueued until its lag has elapsed. As a result, it stays also visible in rq->nr_running. So when in wake_affine_idle(), we should use the real running-tasks in rq to check whether we should place the wake-up task to current cpu. On the other hand, add a helper function to return the nr-delayed. Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue") Signed-off-by: Xuewen Yan Reviewed-and-tested-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20250303105241.17251-2-xuewen.yan@unisoc.com commit a481f0ebf213e0ccb85f70c07bfcd733d2dc6783 Author: David Tadokoro Date: Wed May 21 04:58:31 2025 -0300 staging: rtl8723bs: remove unnecessary braces for single statement blocks Remove all unnecessary braces for single-statement blocks in `os_dep/recv_linux.c` to conform to code style rules. Warnings reported by checkpatch.pl: * WARNING: braces {} are not necessary for single statement blocks * WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: David Tadokoro Link: https://lore.kernel.org/r/20250521075831.485199-1-davidbtadokoro@gmail.com Signed-off-by: Greg Kroah-Hartman commit dff8e5d7404b1011d0d70318d87b8a69cbc94bff Author: Rogério Fernandes Pereira Date: Sat May 3 17:24:30 2025 -0300 staging: rtl8723bs: Removed multiple blank lines of rtw_pwrctrl.c Removed multiple blank lines in file rtw_pwrctrl.c Found by checkpatch.pl Signed-off-by: Rogério Fernandes Pereira Link: https://lore.kernel.org/r/20250503202430.6053-1-rfp2005@gmail.com Signed-off-by: Greg Kroah-Hartman commit d2f8d185ba268b06c47bf3c7828896c738303b19 Author: Eric Florin Date: Sun May 18 19:04:52 2025 -0700 staging: sm750fb: rename `hw_sm750le_setBLANK` Rename `hw_sm750le_setBLANK` to `hw_sm750le_set_blank` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/b49d1a00628a3475fdfbff4055d8347d35a802a9.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit f2cf2a38d37a302edc8c7d1efd5cb7dcec98ba7f Author: Eric Florin Date: Sun May 18 19:04:51 2025 -0700 staging: sm750fb: rename `hw_sm750_setBLANK` Rename `hw_sm750_setBLANK` to `hw_sm750_set_blank` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/e00a39ffba89e000fdf8dc277166297d995aa891.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit f3147cede43ed4a3f50f79f1e19d32416246ef9c Author: Eric Florin Date: Sun May 18 19:04:50 2025 -0700 staging: sm750fb: rename `hw_sm750_setColReg` Rename `hw_sm750_setColReg` to `hw_sm750_set_col_reg` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/3d4bb87742eee4a6792bbdae893256f621ffffe6.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 3f001e6d00a4189d309db0a0be2fc1fbf0491cb5 Author: Eric Florin Date: Sun May 18 19:04:49 2025 -0700 staging: sm750fb: rename `hw_sm750_crtc_setMode` Rename `hw_sm750_crtc_setMode` to `hw_sm750_crtc_set_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/40d4a1f5b05bcb0eefdd787b9df329fceb96105e.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit b6822fc35175abf04aa54c725978dafb08739802 Author: Eric Florin Date: Sun May 18 19:04:48 2025 -0700 staging: sm750fb: rename `hw_sm750_crtc_checkMode` Rename `hw_sm750_crtc_checkMode` to `hw_sm750_crtc_check_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/546e9abb8eac1be75f47b51460ab69a5736d8a99.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 1bfa73953100dbdffd85adf1a9a1d6f00c2c741d Author: Eric Florin Date: Sun May 18 19:04:47 2025 -0700 staging: sm750fb: rename `hw_sm750_output_setMode` Rename `hw_sm750_output_setMode` to `hw_sm750_output_set_mode` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/32daa589cf80d2f6f67ed257aa9397128a5458d2.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 2a7639ea2ec6fe11d652effbf4ec666d3275c730 Author: Eric Florin Date: Sun May 18 19:04:46 2025 -0700 staging: sm750fb: rename `hw_sm750le_deWait` Rename `hw_sm750le_deWait` to `hw_sm750le_de_wait` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/0e5332f7758ad24cc5bca36671fd811c87881db7.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 1e8990b29bf3ae9c2709a82b35ee70cab86a7284 Author: Eric Florin Date: Sun May 18 19:04:45 2025 -0700 staging: sm750fb: rename `hw_sm750_deWait` Rename `hw_sm750_deWait` to `hw_sm750_de_wait` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/2d94a42ca51de9fddddb64f74e217dfb2e0c7d1c.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 70fbc2891ac754363987d7efb7ff6c97743a1842 Author: Eric Florin Date: Sun May 18 19:04:44 2025 -0700 staging: sm750fb: rename `hw_sm750_initAccel` Rename `hw_sm750_initAccel` to `hw_sm750_init_accel` to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/3c84dccaf38161d6de6ff560d4f10bb3d344cc51.1747619816.git.ericflorin@google.com Signed-off-by: Greg Kroah-Hartman commit 7aca10d57deb658daebe9d18f45587f774fb149d Author: Andreas Kleinbichler Date: Fri May 16 17:25:44 2025 +0200 staging: gpib: switch to kmalloc(sizeof(*status)) Fix checkpatch warning: Prefer kmalloc(sizeof(*status)...) over kmalloc(sizeof(struct gpib_status_byte)...) Signed-off-by: Andreas Kleinbichler Link: https://lore.kernel.org/r/aCdY-OgvoTUjcIeF@andreas-VirtualBox Signed-off-by: Greg Kroah-Hartman commit 5aac95320d0f17f1098960e903ce5e087f42bc70 Author: Dave Penkler Date: Tue May 20 17:51:00 2025 +0200 staging: gpib: Fix secondary address restriction GPIB secondary addresses have valid values between 0 and 31 inclusive. The Make Secondary Address function MSA, used to form the protocol byte, was using the gpib_address_restrict function erroneously restricting the address range to 0 through 30. Remove the call to gpib_address_restrict and simply trim the address to 5 bits. Fixes: 2da03e7e31aa ("staging: gpib: Add user api include files") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250520155100.5808-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7a7f07f248a60c10da9b751bcb1cb00d61f7fb30 Author: Dave Penkler Date: Fri May 9 13:30:14 2025 +0200 staging: gpib: Fix uapi include header guard name When gpib_user.h was renamed to gpio.h the include guard name was not changed accordingly. Change the include guard name to correspond with the file name and cleanup the comments after the #endif. Fixes: c7184cbf5530 ("staging: gpib: Rename common include file") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250509113014.9105-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit e8186a376483edc9b0bac2a66f2f3b07fb005082 Author: Dave Penkler Date: Fri May 2 09:21:50 2025 +0200 staging: gpib: Avoid unused variable warning This addresses a warning produced by make W=1 with the configuration parameter CONFIG_GPIB_PCMCIA=y ines/ines_gpib.c:1115:28: warning: variable 'dev' set but not used [-Wunused-but-set-variable] Remove the declaration and assignment of the unused variable. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250502072150.32714-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit cfa6673eae0281d0840838b9a488b7d2d1e78377 Author: Dave Penkler Date: Fri May 2 09:21:49 2025 +0200 staging: gpib: Declare driver entry points static Many of this driver's entry points were unecessarily not declared static. Remove the declarations from the include file. Make the declarations static in the .c file. Remove an uneccessary forward declaration in the .c file. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250502072150.32714-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 034a456869a071c635a9997e0bf3947a6cb20b25 Author: Dave Penkler Date: Fri May 2 09:21:48 2025 +0200 staging: gpib: Fix PCMCIA config identifier The PCMCIA config identifier in the ines_exit_module function was never changed because it was misspelled in the original commit. Update the config parameter to use the correct identifier from gpib/Kconfig Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250502072150.32714-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81cf4d7d2379df853a0cbb8486286783c7380ac3 Author: Nicolas Pitre Date: Tue May 20 13:16:44 2025 -0400 vt: add VT_GETCONSIZECSRPOS to retrieve console size and cursor position The console dimension and cursor position are available through the /dev/vcsa interface already. However the /dev/vcsa header format uses single-byte fields therefore those values are clamped to 255. As surprizing as this may seem, some people do use 240-column 67-row screens (a 1920x1080 monitor with 8x16 pixel fonts) which is getting close to the limit. Monitors with higher resolution are not uncommon these days (3840x2160 producing a 480x135 character display) and it is just a matter of time before someone with, say, a braille display using the Linux VT console and BRLTTY on such a screen reports a bug about missing and oddly misaligned screen content. Let's add VT_GETCONSIZECSRPOS for the retrieval of console size and cursor position without byte-sized limitations. The actual console size limit as encoded in vt.c is 32767x32767 so using a short here is appropriate. Then this can be used to get the cursor position when /dev/vcsa reports 255. The screen dimension may already be obtained using TIOCGWINSZ and adding the same information to VT_GETCONSIZECSRPOS might be redundant. However applications that care about cursor position also care about display size and having 2 separate system calls to obtain them separately is wasteful. Also, the cursor position can be queried by writing "\e[6n" to a tty and reading back the result but that may be done only by the actual application using that tty and not a sideline observer. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250520171851.1219676-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 80fa7a03378588582eb40f89b6f418c0c256cf24 Author: Nicolas Pitre Date: Tue May 20 13:16:43 2025 -0400 vt: bracketed paste support This is comprised of 3 aspects: - Take note of when applications advertise bracketed paste support via "\e[?2004h" and "\e[?2004l". - Insert bracketed paste markers ("\e[200~" and "\e[201~") around pasted content in paste_selection() when bracketed paste is active. - Add TIOCL_GETBRACKETEDPASTE to return bracketed paste status so user space daemons implementing cut-and-paste functionality (e.g. gpm, BRLTTY) may know when to insert bracketed paste markers. Link: https://en.wikipedia.org/wiki/Bracketed-paste Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250520171851.1219676-2-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit c4c7ead7b86c1e7f11c64915b7e5bb6d2e242691 Author: Nicolas Pitre Date: Thu May 15 11:30:52 2025 -0400 vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl() They are listed amon those cmd values that "treat 'arg' as an integer" which is wrong. They should instead fall into the default case. Probably nobody ever relied on that code since 2009 but still. Fixes: e92166517e3c ("tty: handle VT specific compat ioctls in vt driver") Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/pr214s15-36r8-6732-2pop-159nq85o48r7@syhkavp.arg Signed-off-by: Greg Kroah-Hartman commit 63f0d28dcabe2733ddb8d0b3813a52bb585b7642 Author: Nicolas Pitre Date: Wed May 7 10:13:23 2025 -0400 vt: process the full-width ASCII fallback range programmatically This shaves about 170 bytes from ucs.o. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-9-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 6802f3591fdc732d2460eed3112b02cc07acab8f Author: Nicolas Pitre Date: Wed May 7 10:13:22 2025 -0400 vt: make use of ucs_get_fallback() when glyph is unavailable Attempt to display a fallback character when given character doesn't have an available glyph. The substitution may not be as good as the original character but still way more helpful than a squared question mark. Example substitutions: À -> A, ç -> c, ø -> o, ─ -> -, © -> C, etc. See gen_ucs_fallback_table.py for a comprehensive list. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-8-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit fe26933cf1e151ce0a5d858c263e8dacb2f12cee Author: Nicolas Pitre Date: Wed May 7 10:13:21 2025 -0400 vt: add ucs_get_fallback() This is the code querying the newly introduced tables. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-7-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit de45d93f00e2a161c11199fa9a4f515ce2930f01 Author: Nicolas Pitre Date: Wed May 7 10:13:20 2025 -0400 vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.py The generated table maps complex characters to their simpler fallback forms for a terminal display when corresponding glyphs are unavailable. A page-based approach is used to reduce compiled binary footprint. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-6-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 5071ddc18e17797248151ca2bea1b8d4e67d996f Author: Nicolas Pitre Date: Wed May 7 10:13:19 2025 -0400 vt: introduce gen_ucs_fallback_table.py to create ucs_fallback_table.h The generated table maps complex characters to their simpler fallback forms for a terminal display when corresponding glyphs are unavailable. This includes diacritics, symbols as well as many drawing characters. Fallback characters aren't perfect replacements, obviously. But they are still far more useful than a bunch of squared question marks. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250507141535.40655-5-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit bb9a1516765252619ef0e36e9ecf3aedbe7b5710 Author: Nicolas Pitre Date: Wed May 7 10:13:18 2025 -0400 vt: move glyph determination to a separate function No logical changes. Make it easier for enhancements to come. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-4-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 68e7a421ab4f0ca97dcfff638bc5c784bf28eebd Author: Nicolas Pitre Date: Wed May 7 10:13:17 2025 -0400 vt: make sure displayed double-width characters are remembered as such And to do so we ensure the Unicode screen buffer is initialized when double-width characters are encountered. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250507141535.40655-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit a16014c0db3aed66379bfd7b042e251478b02868 Author: Nicolas Pitre Date: Wed May 7 10:13:16 2025 -0400 vt: ucs.c: fix misappropriate in_range() usage The in_range() helper accepts a start and a length, not a start and an end. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250507141535.40655-2-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 063a896456c339fc181cbd04a08ce409b7866f83 Author: Kuan-Wei Chiu Date: Thu May 15 16:13:11 2025 +0800 serial: max3100: Replace open-coded parity calculation with parity8() Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu Link: https://lore.kernel.org/r/20250515081311.775559-1-visitorckw@gmail.com Signed-off-by: Greg Kroah-Hartman commit 857eec4678805d24391c17c9f3c4d9d21b63371e Author: Krzysztof Kozlowski Date: Wed May 14 14:51:28 2025 +0200 dt-bindings: serial: 8250_omap: Drop redundant properties The binding references in-kernel serial.yaml, so there is no need to explicitly list its properties. Note that rts-gpio is also redundant because DTS should be simply converted to -gpios variants. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250514125127.56149-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 669bd383024ee3c6175b90f17e7e15703a78fb8f Author: Rob Herring (Arm) Date: Wed May 7 10:49:22 2025 -0500 dt-bindings: serial: Convert socionext,milbeaut-usio-uart to DT schema Convert the Socionext Milbeaut UART binding to DT schema. It is a straight-forward conversion. Reviewed-by: Thierry Reding Signed-off-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250507154924.1602842-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 76619c4fce711acbfd732909644d40c1caf27041 Author: Rob Herring (Arm) Date: Wed May 7 10:49:36 2025 -0500 dt-bindings: serial: Convert microchip,pic32mzda-uart to DT schema Convert the Microchip PIC32 UART binding to DT schema. The binding was unclear there are 3 interrupts. The functions were determined from the driver. The 'cts-gpios' property is covered by serial.yaml schema. Signed-off-by: "Rob Herring (Arm)" Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250507154937.1603190-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7282b8add2988b93f35a155d927d08e14558c7b8 Author: Rob Herring (Arm) Date: Tue May 6 17:00:15 2025 -0500 dt-bindings: serial: Convert arm,sbsa-uart to DT schema Convert the Arm SBSA UART binding to DT schema. It is a straight-forward conversion. Signed-off-by: "Rob Herring (Arm)" Reviewed-by: Thierry Reding Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20250506220016.2545637-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6259530ccd7af47522c8414f8546fe59de9ddc18 Author: Rob Herring (Arm) Date: Wed May 7 10:49:08 2025 -0500 dt-bindings: serial: Convert snps,arc-uart to DT schema Convert the Synopsys ARC UART binding to DT schema. Drop the "aliases" portion which is not relevant to this schema. Reviewed-by: Thierry Reding Signed-off-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250507154909.1602497-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2446bd692e33788835c2daf65eec385c53486404 Author: Rob Herring (Arm) Date: Wed May 7 10:44:02 2025 -0500 dt-bindings: serial: Convert marvell,armada-3700-uart to DT schema Convert the Marvell Armada-3700 UART binding to DT schema. It is a straight-forward conversion. Drop the long deprecated single interrupt support. Signed-off-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250507154408.1595932-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6f5ff13bbc20b99a623f37ba85730929a36a5100 Author: Rob Herring (Arm) Date: Tue May 6 17:00:28 2025 -0500 dt-bindings: serial: Convert lantiq,asc to DT schema Convert the Lantiq SoC ASC UART binding to DT schema. There are no such clock identifier defines nor a user with clocks, so drop the example with clocks. Signed-off-by: "Rob Herring (Arm)" Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20250506220029.2546179-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit a34fc8836f680fb56a61d7b864dfb7a5432e5bdc Author: Rob Herring (Arm) Date: Tue May 6 17:00:19 2025 -0500 dt-bindings: serial: Convert cirrus,ep7209-uart to DT schema Convert the Cirrus EP7209 UART binding to DT schema. There is no user of "cirrus,ep7312-uart" other than the example, so drop it. Drop the "aliases" node part as it is not relevant to the schema. The modem control GPIOs are covered by the serial.yaml schema and don't have to be listed in the schema. Signed-off-by: "Rob Herring (Arm)" Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20250506220021.2545820-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1dd624430d531abf43a5bba4f9a10821bdf4d9d9 Author: Rob Herring (Arm) Date: Tue May 6 17:00:11 2025 -0500 dt-bindings: serial: Convert arm,mps2-uart to DT schema Convert the Arm MPS2 UART binding to DT schema. It is a straight-forward conversion. Signed-off-by: "Rob Herring (Arm)" Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20250506220012.2545470-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 30b3aecad9fcf519824f40fc7c5e139c91b48591 Author: Rob Herring (Arm) Date: Tue May 6 17:00:47 2025 -0500 dt-bindings: serial: Convert nxp,lpc3220-hsuart to DT schema Convert the NXP LPC3220 HS UART binding to DT schema. It is a straight-forward conversion. Signed-off-by: "Rob Herring (Arm)" Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20250506220048.2546915-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2ff5d5f6fe983d04f85a8ae46f99b561508f0a46 Author: Rob Herring (Arm) Date: Tue May 6 17:00:24 2025 -0500 dt-bindings: serial: Convert cnxt,cx92755-usart to DT schema Convert the Conexant Digicolor USART binding to DT schema. It is a straight-forward conversion. Signed-off-by: "Rob Herring (Arm)" Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20250506220025.2545995-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit e3975aa899c0a3bbc10d035e699b142cd1373a71 Author: Dustin Lundquist Date: Tue May 6 11:18:45 2025 -0700 serial: jsm: fix NPE during jsm_uart_port_init No device was set which caused serial_base_ctrl_add to crash. BUG: kernel NULL pointer dereference, address: 0000000000000050 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 16 UID: 0 PID: 368 Comm: (udev-worker) Not tainted 6.12.25-amd64 #1 Debian 6.12.25-1 RIP: 0010:serial_base_ctrl_add+0x96/0x120 Call Trace: serial_core_register_port+0x1a0/0x580 ? __setup_irq+0x39c/0x660 ? __kmalloc_cache_noprof+0x111/0x310 jsm_uart_port_init+0xe8/0x180 [jsm] jsm_probe_one+0x1f4/0x410 [jsm] local_pci_probe+0x42/0x90 pci_device_probe+0x22f/0x270 really_probe+0xdb/0x340 ? pm_runtime_barrier+0x54/0x90 ? __pfx___driver_attach+0x10/0x10 __driver_probe_device+0x78/0x110 driver_probe_device+0x1f/0xa0 __driver_attach+0xba/0x1c0 bus_for_each_dev+0x8c/0xe0 bus_add_driver+0x112/0x1f0 driver_register+0x72/0xd0 jsm_init_module+0x36/0xff0 [jsm] ? __pfx_jsm_init_module+0x10/0x10 [jsm] do_one_initcall+0x58/0x310 do_init_module+0x60/0x230 Tested with Digi Neo PCIe 8 port card. Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM") Cc: stable Signed-off-by: Dustin Lundquist Link: https://lore.kernel.org/r/3f31d4f75863614655c4673027a208be78d022ec.camel@null-ptr.net Signed-off-by: Greg Kroah-Hartman commit dab6bbc807a37d7922d5310552ddf8eec8383076 Author: Dharma Balasubiramani Date: Fri May 2 09:10:00 2025 -0700 dt-bindings: serial: atmel,at91-usart: add microchip,sama7d65-usart Add SAMA7D65 USART compatible to DT bindings documentation. Signed-off-by: Dharma Balasubiramani Signed-off-by: Ryan Wanner Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/ba19dff5c20bd022cf5391ac909a85ab5e1797b4.1746201835.git.Ryan.Wanner@microchip.com Signed-off-by: Greg Kroah-Hartman commit 9110fadda376ee1377a478dbae5e168243b081f3 Author: Arnd Bergmann Date: Tue May 20 18:20:48 2025 +0200 ALSA: hda/cs35l41_hda: select FW_CS_DSP When compile-testing this driver, the missing FW_CS_DSP module causes a link failure: aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_shutdown_dsp': cs35l41_hda.c:(.text+0x7e4): undefined reference to `cs_dsp_stop' aarch64-linux-ld: cs35l41_hda.c:(.text+0x7ec): undefined reference to `cs_dsp_power_down' aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_hda_remove': cs35l41_hda.c:(.text+0x14b4): undefined reference to `cs_dsp_remove' aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_smart_amp.isra.0': cs35l41_hda.c:(.text+0x189c): undefined reference to `cs_dsp_halo_init' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1bd4): undefined reference to `cs_dsp_power_up' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c38): undefined reference to `cs_dsp_run' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c80): undefined reference to `cs_dsp_get_ctl' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c90): undefined reference to `cs_dsp_coeff_read_ctrl' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1cd4): undefined reference to `cs_dsp_get_ctl' aarch64-linux-ld: cs35l41_hda.c:(.text+0x1ce4): undefined reference to `cs_dsp_coeff_read_ctrl' Fixes: bdd9ea9187c4 ("ALSA: hda/hda_cs_dsp_ctl: Delete hda_cs_dsp_ctl module") Signed-off-by: Arnd Bergmann Reviewed-by: Richard Fitzgerald Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250520162101.3929551-1-arnd@kernel.org commit 1143d41922c0f87504f095417ba1870167970143 Author: Jonathan Stroud Date: Fri May 16 18:02:40 2025 +0530 usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence Introduce i2c APIs to read/write for proper configuration register programming. It ensures that read-modify-write sequence is performed and reserved bit in Runtime Flags 2 register are not touched. Also legacy smbus block write inserted an extra count value into the i2c data stream which breaks the register write on the usb5744. Switching to new read/write i2c APIs fixes both issues. Fixes: 6782311d04df ("usb: misc: onboard_usb_dev: add Microchip usb5744 SMBus programming support") Cc: stable Signed-off-by: Jonathan Stroud Co-developed-by: Radhey Shyam Pandey Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1747398760-284021-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman commit d01ccb5b62b753c7ce527b1b38834c0ad2e9ae50 Author: Mike Looijmans Date: Wed May 7 15:11:43 2025 +0200 dt-bindings: usb: ti,usb8041: Add binding for TI USB8044 hub controller The TI USB8044 is similar to the USB8041. Signed-off-by: Mike Looijmans Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507131143.2243079-2-mike.looijmans@topic.nl Signed-off-by: Greg Kroah-Hartman commit ab44b9259bb39a09d92ab9ebff8e575c8ba0ff22 Author: Mike Looijmans Date: Wed May 7 15:11:42 2025 +0200 usb: misc: onboard_usb_dev: Add support for TI TUSB8044 hub The TUSB8044 is similar to the TUSB8041. This adds the PID/VID values and allows to specify the reset GPIO signal on the board. Signed-off-by: Mike Looijmans Link: https://lore.kernel.org/r/20250507131143.2243079-1-mike.looijmans@topic.nl Signed-off-by: Greg Kroah-Hartman commit b48a2e0ba39838c2b6f7ee95d7b373050224c6f8 Author: Chen Ni Date: Mon May 19 14:31:20 2025 +0800 usb: gadget: lpc32xx_udc: Use USB API functions rather than constants Use the function usb_endpoint_type() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250519063120.724793-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit ebaac1027a26ed62e0b6f24cd2d2cdf4a3ce73f2 Author: Chen Ni Date: Mon May 19 14:25:44 2025 +0800 usb: gadget: epautoconf: Use USB API functions rather than constants Use the function usb_endpoint_type() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250519062545.724727-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 48175e2e6eaf8642fbd9d36746fc094099ee65cf Author: Chen Ni Date: Mon May 19 14:22:29 2025 +0800 usb: dwc2: gadget: Use USB API functions rather than constants Use the function usb_endpoint_type() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250519062229.724664-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit eb25dcf0c5946b4c167d5a9b049f0c1fec80ff80 Author: Chen Ni Date: Mon May 19 14:13:17 2025 +0800 usb: core: config: Use USB API functions rather than constants Use the function usb_endpoint_num() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250519061317.724602-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 657bfcbbfa38c8372408ca3f3085381b637838bd Author: Pritam Manohar Sutar Date: Fri May 16 12:43:33 2025 +0530 usb: dwc3-exynos: add support for ExynosAutov920 This SoC has a DWC3 compatible controllers. It needs "ref" and "susp_clk" for it's operation. Add required changes in exynos dwc3 glue layer to support this SoC. Acked-by: Thinh Nguyen Reviewed-by: Alim Akhtar Signed-off-by: Pritam Manohar Sutar Link: https://lore.kernel.org/r/20250516071333.3223226-3-pritam.sutar@samsung.com Signed-off-by: Greg Kroah-Hartman commit 6f399a100810a9c9af28e1d66e2c379ba03018d0 Author: Pritam Manohar Sutar Date: Fri May 16 12:43:32 2025 +0530 dt-bindings: usb: samsung,exynos-dwc3: add dt-schema ExynosAutov920 Add a dedicated compatible for USB controller found in this SoC Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Signed-off-by: Pritam Manohar Sutar Link: https://lore.kernel.org/r/20250516071333.3223226-2-pritam.sutar@samsung.com Signed-off-by: Greg Kroah-Hartman commit f4ecdc352646f7d23f348e5c544dbe3212c94fc8 Author: Pawel Laszczak Date: Tue May 13 05:30:09 2025 +0000 usb: cdnsp: Fix issue with detecting command completion event In some cases, there is a small-time gap in which CMD_RING_BUSY can be cleared by controller but adding command completion event to event ring will be delayed. As the result driver will return error code. This behavior has been detected on usbtest driver (test 9) with configuration including ep1in/ep1out bulk and ep2in/ep2out isoc endpoint. Probably this gap occurred because controller was busy with adding some other events to event ring. The CMD_RING_BUSY is cleared to '0' when the Command Descriptor has been executed and not when command completion event has been added to event ring. To fix this issue for this test the small delay is sufficient less than 10us) but to make sure the problem doesn't happen again in the future the patch introduces 10 retries to check with delay about 20us before returning error code. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Signed-off-by: Pawel Laszczak Acked-by: Peter Chen Link: https://lore.kernel.org/r/PH7PR07MB9538AA45362ACCF1B94EE9B7DD96A@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 2852788cfbe9ca1ab68509d65804413871f741f9 Author: Pawel Laszczak Date: Tue May 13 06:54:03 2025 +0000 usb: cdnsp: Fix issue with detecting USB 3.2 speed Patch adds support for detecting SuperSpeedPlus Gen1 x2 and SuperSpeedPlus Gen2 x2 speed. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Signed-off-by: Pawel Laszczak Acked-by: Peter Chen Link: https://lore.kernel.org/r/PH7PR07MB95387AD98EDCA695FECE52BADD96A@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 89bb3dc13ac29a563f4e4c555e422882f64742bd Author: Mathias Nyman Date: Wed May 14 16:25:20 2025 +0300 usb: Flush altsetting 0 endpoints before reinitializating them after reset. usb core avoids sending a Set-Interface altsetting 0 request after device reset, and instead relies on calling usb_disable_interface() and usb_enable_interface() to flush and reset host-side of those endpoints. xHCI hosts allocate and set up endpoint ring buffers and host_ep->hcpriv during usb_hcd_alloc_bandwidth() callback, which in this case is called before flushing the endpoint in usb_disable_interface(). Call usb_disable_interface() before usb_hcd_alloc_bandwidth() to ensure URBs are flushed before new ring buffers for the endpoints are allocated. Otherwise host driver will attempt to find and remove old stale URBs from a freshly allocated new ringbuffer. Cc: stable Fixes: 4fe0387afa89 ("USB: don't send Set-Interface after reset") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250514132520.225345-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e33ebb133a245a48b543d6eb79768a66f233656b Author: Bjorn Andersson Date: Thu May 8 22:42:11 2025 -0500 usb: dwc3: qcom: Use bulk clock API and devres The Qualcomm DWC3 glue driver duplicates the logic of the bulk clock API to acquire, prepare, and unprepare the controller's clocks. It also manages the life cycle of these handled explicitly. Transition to the bulk clock API and manage the resources using devres, to clean up the code. The resource acquisition is moved above the initial reset pulse, to handle resource issues before the state is touched - other than this, this no functional change. Signed-off-by: Bjorn Andersson Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250508-dwc3-clk-bulk-v2-1-bad3427e88d4@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 4f78a9c7b8e86f8544e0363a22b367df6620b9ab Author: Aleksandrs Vinarskis Date: Mon May 12 11:20:28 2025 +0200 dt-bindings: usb: Add Parade PS8833 Type-C retimer variant Appears to behave similarly to Parade PS8830. Found on some Qualcomm Snapdragon X1 devices, such as Asus Zenbook A14. Acked-by: Krzysztof Kozlowski Signed-off-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/r/20250512092745.249293-2-alex.vinarskis@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1c06aff9b82fc3795a80feeb23935b9a44b07e71 Author: Prashanth K Date: Tue May 6 16:19:12 2025 +0530 usb: gadget: u_serial: Avoid double unlock of serial_port_lock Avoid unlocking serial_port_lock twice in gserial_suspend(), this can occur if gserial_wakeup_host() fails. And since wakeup is performed outside spinlock, check if the port is valid before proceeding again. Fixes: 3baea29dc0a7 ("usb: gadget: u_serial: Implement remote wakeup capability") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aBHatifO5bjR1yPt@stanley.mountain/ Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20250506104912.3750934-1-prashanth.k@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit a541acceedf4f639f928f41fbb676b75946dc295 Author: Hongyu Xie Date: Mon May 19 10:33:28 2025 +0800 usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device SanDisk 3.2 Gen2 storage device(0781:55e8) doesn't work well with UAS. Log says, [ 6.507865][ 3] [ T159] usb 2-1.4: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd [ 6.540314][ 3] [ T159] usb 2-1.4: New USB device found, idVendor=0781, idProduct=55e8, bcdDevice= 0.01 [ 6.576304][ 3] [ T159] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 6.584727][ 3] [ T159] usb 2-1.4: Product: SanDisk 3.2 Gen2 [ 6.590459][ 3] [ T159] usb 2-1.4: Manufacturer: SanDisk [ 6.595845][ 3] [ T159] usb 2-1.4: SerialNumber: 03021707022525140940 [ 7.230852][ 0] [ T265] usbcore: registered new interface driver usb-storage [ 7.251247][ 0] [ T265] scsi host3: uas [ 7.255280][ 0] [ T265] usbcore: registered new interface driver uas [ 7.270498][ 1] [ T192] scsi 3:0:0:0: Direct-Access SanDisk Extreme Pro DDE1 0110 PQ: 0 ANSI: 6 [ 7.299588][ 3] [ T192] scsi 3:0:0:1: Enclosure SanDisk SES Device 0110 PQ: 0 ANSI: 6 [ 7.321681][ 3] [ T192] sd 3:0:0:0: Attached scsi generic sg1 type 0 [ 7.328185][ 3] [ T192] scsi 3:0:0:1: Attached scsi generic sg2 type 13 [ 7.328804][ 0] [ T191] sd 3:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB) [ 7.343486][ 0] [ T191] sd 3:0:0:0: [sda] 4096-byte physical blocks [ 7.364611][ 0] [ T191] sd 3:0:0:0: [sda] Write Protect is off [ 7.370524][ 0] [ T191] sd 3:0:0:0: [sda] Mode Sense: 3d 00 10 00 [ 7.390655][ 0] [ T191] sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA [ 7.401363][ 0] [ T191] sd 3:0:0:0: [sda] Optimal transfer size 1048576 bytes [ 7.436010][ 0] [ T191] sda: sda1 [ 7.450850][ 0] [ T191] sd 3:0:0:0: [sda] Attached SCSI disk [ 7.470218][ 4] [ T262] scsi 3:0:0:1: Failed to get diagnostic page 0x1 [ 7.474869][ 0] [ C0] sd 3:0:0:0: [sda] tag#0 data cmplt err -75 uas-tag 2 inflight: CMD [ 7.476911][ 4] [ T262] scsi 3:0:0:1: Failed to bind enclosure -19 [ 7.485330][ 0] [ C0] sd 3:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 28 00 00 10 00 [ 7.491593][ 4] [ T262] ses 3:0:0:1: Attached Enclosure device [ 38.066980][ 4] [ T192] sd 3:0:0:0: [sda] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD IN [ 38.076012][ 4] [ T192] sd 3:0:0:0: [sda] tag#4 CDB: Read(10) 28 00 00 00 01 08 00 00 f8 00 [ 38.086485][ 4] [ T192] sd 3:0:0:0: [sda] tag#3 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 38.095515][ 4] [ T192] sd 3:0:0:0: [sda] tag#3 CDB: Read(10) 28 00 00 00 00 10 00 00 08 00 [ 38.104122][ 4] [ T192] sd 3:0:0:0: [sda] tag#2 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD IN [ 38.113152][ 4] [ T192] sd 3:0:0:0: [sda] tag#2 CDB: Read(10) 28 00 00 00 00 88 00 00 78 00 [ 38.121761][ 4] [ T192] sd 3:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD IN [ 38.130791][ 4] [ T192] sd 3:0:0:0: [sda] tag#1 CDB: Read(10) 28 00 00 00 00 48 00 00 30 00 [ 38.139401][ 4] [ T192] sd 3:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD [ 38.148170][ 4] [ T192] sd 3:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 28 00 00 10 00 [ 38.178980][ 2] [ T304] scsi host3: uas_eh_device_reset_handler start [ 38.901540][ 2] [ T304] usb 2-1.4: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd [ 38.936791][ 2] [ T304] scsi host3: uas_eh_device_reset_handler success Device decriptor is below, Bus 002 Device 006: ID 0781:55e8 SanDisk Corp. SanDisk 3.2 Gen2 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.20 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x0781 SanDisk Corp. idProduct 0x55e8 bcdDevice 0.01 iManufacturer 1 SanDisk iProduct 2 SanDisk 3.2 Gen2 iSerial 3 03021707022525140940 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0079 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 896mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 1 bNumEndpoints 4 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 98 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Command pipe (0x01) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Status pipe (0x02) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-in pipe (0x03) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-out pipe (0x04) Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x002a bNumDeviceCaps 3 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x0000f41e BESL Link Power Management (LPM) Supported BESL value 1024 us Deep BESL value 61440 us SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x000e Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 10 micro seconds bU2DevExitLat 2047 micro seconds SuperSpeedPlus USB Device Capability: bLength 20 bDescriptorType 16 bDevCapabilityType 10 bmAttributes 0x00000001 Sublink Speed Attribute count 1 Sublink Speed ID count 0 wFunctionalitySupport 0x1100 bmSublinkSpeedAttr[0] 0x000a4030 Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus bmSublinkSpeedAttr[1] 0x000a40b0 Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus Device Status: 0x0000 (Bus Powered) So ignore UAS driver for this device. Signed-off-by: Hongyu Xie Cc: stable Link: https://lore.kernel.org/r/20250519023328.1498856-1-xiehongyu1@kylinos.cn Signed-off-by: Greg Kroah-Hartman commit 19f795591947596b5b9efa86fd4b9058e45786e9 Author: Jiayi Li Date: Thu May 8 13:59:47 2025 +0800 usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE This device exhibits I/O errors during file transfers due to unstable link power management (LPM) behavior. The kernel logs show repeated warm resets and eventual disconnection when LPM is enabled: [ 3467.810740] hub 2-0:1.0: state 7 ports 6 chg 0000 evt 0020 [ 3467.810740] usb usb2-port5: do warm reset [ 3467.866444] usb usb2-port5: not warm reset yet, waiting 50ms [ 3467.907407] sd 0:0:0:0: [sda] tag#12 sense submit err -19 [ 3467.994423] usb usb2-port5: status 02c0, change 0001, 10.0 Gb/s [ 3467.994453] usb 2-5: USB disconnect, device number 4 The error -19 (ENODEV) occurs when the device disappears during write operations. Adding USB_QUIRK_NO_LPM disables link power management for this specific device, resolving the stability issues. Signed-off-by: Jiayi Li Cc: stable Link: https://lore.kernel.org/r/20250508055947.764538-1-lijiayi@kylinos.cn Signed-off-by: Greg Kroah-Hartman commit f9bd09ef2c04104a2be718fa8fc3939bb0ba1299 Author: Cosmo Chou Date: Tue May 13 21:08:34 2025 +0800 usb: typec: tcpm: Use configured PD revision for negotiation Initialize negotiated_rev and negotiated_rev_prime based on the port's configured PD revision (rev_major) rather than always defaulting to PD_MAX_REV. This ensures ports start PD communication using their appropriate revision level. This allows proper communication with devices that require specific PD revision levels, especially for the hardware designed for PD 1.0 or 2.0 specifications. Signed-off-by: Cosmo Chou Reviewed-by: Heikki Krogerus Reviewed-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20250513130834.1612602-1-chou.cosmo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 324d45e53f1a36c88bc649dc39e0c8300a41be0a Author: RD Babiera Date: Tue May 6 23:28:53 2025 +0000 usb: typec: tcpm: move tcpm_queue_vdm_unlocked to asynchronous work A state check was previously added to tcpm_queue_vdm_unlocked to prevent a deadlock where the DisplayPort Alt Mode driver would be executing work and attempting to grab the tcpm_lock while the TCPM was holding the lock and attempting to unregister the altmode, blocking on the altmode driver's cancel_work_sync call. Because the state check isn't protected, there is a small window where the Alt Mode driver could determine that the TCPM is in a ready state and attempt to grab the lock while the TCPM grabs the lock and changes the TCPM state to one that causes the deadlock. The callstack is provided below: [110121.667392][ C7] Call trace: [110121.667396][ C7] __switch_to+0x174/0x338 [110121.667406][ C7] __schedule+0x608/0x9f0 [110121.667414][ C7] schedule+0x7c/0xe8 [110121.667423][ C7] kernfs_drain+0xb0/0x114 [110121.667431][ C7] __kernfs_remove+0x16c/0x20c [110121.667436][ C7] kernfs_remove_by_name_ns+0x74/0xe8 [110121.667442][ C7] sysfs_remove_group+0x84/0xe8 [110121.667450][ C7] sysfs_remove_groups+0x34/0x58 [110121.667458][ C7] device_remove_groups+0x10/0x20 [110121.667464][ C7] device_release_driver_internal+0x164/0x2e4 [110121.667475][ C7] device_release_driver+0x18/0x28 [110121.667484][ C7] bus_remove_device+0xec/0x118 [110121.667491][ C7] device_del+0x1e8/0x4ac [110121.667498][ C7] device_unregister+0x18/0x38 [110121.667504][ C7] typec_unregister_altmode+0x30/0x44 [110121.667515][ C7] tcpm_reset_port+0xac/0x370 [110121.667523][ C7] tcpm_snk_detach+0x84/0xb8 [110121.667529][ C7] run_state_machine+0x4c0/0x1b68 [110121.667536][ C7] tcpm_state_machine_work+0x94/0xe4 [110121.667544][ C7] kthread_worker_fn+0x10c/0x244 [110121.667552][ C7] kthread+0x104/0x1d4 [110121.667557][ C7] ret_from_fork+0x10/0x20 [110121.667689][ C7] Workqueue: events dp_altmode_work [110121.667697][ C7] Call trace: [110121.667701][ C7] __switch_to+0x174/0x338 [110121.667710][ C7] __schedule+0x608/0x9f0 [110121.667717][ C7] schedule+0x7c/0xe8 [110121.667725][ C7] schedule_preempt_disabled+0x24/0x40 [110121.667733][ C7] __mutex_lock+0x408/0xdac [110121.667741][ C7] __mutex_lock_slowpath+0x14/0x24 [110121.667748][ C7] mutex_lock+0x40/0xec [110121.667757][ C7] tcpm_altmode_enter+0x78/0xb4 [110121.667764][ C7] typec_altmode_enter+0xdc/0x10c [110121.667769][ C7] dp_altmode_work+0x68/0x164 [110121.667775][ C7] process_one_work+0x1e4/0x43c [110121.667783][ C7] worker_thread+0x25c/0x430 [110121.667789][ C7] kthread+0x104/0x1d4 [110121.667794][ C7] ret_from_fork+0x10/0x20 Change tcpm_queue_vdm_unlocked to queue for tcpm_queue_vdm_work, which can perform the state check while holding the TCPM lock while the Alt Mode lock is no longer held. This requires a new struct to hold the vdm data, altmode_vdm_event. Fixes: cdc9946ea637 ("usb: typec: tcpm: enforce ready state when queueing alt mode vdm") Cc: stable Signed-off-by: RD Babiera Reviewed-by: Heikki Krogerus Reviewed-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20250506232853.1968304-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 0736299d090f5c6a1032678705c4bc0a9511a3db Author: Amit Sunil Dhamne Date: Fri May 2 16:57:03 2025 -0700 usb: typec: tcpm/tcpci_maxim: Fix bounds check in process_rx() Register read of TCPC_RX_BYTE_CNT returns the total size consisting of: PD message (pending read) size + 1 Byte for Frame Type (SOP*) This is validated against the max PD message (`struct pd_message`) size without accounting for the extra byte for the frame type. Note that the struct pd_message does not contain a field for the frame_type. This results in false negatives when the "PD message (pending read)" is equal to the max PD message size. Fixes: 6f413b559f86 ("usb: typec: tcpci_maxim: Chip level TCPC driver") Signed-off-by: Amit Sunil Dhamne Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Kyle Tso Cc: stable Link: https://lore.kernel.org/stable/20250502-b4-new-fix-pd-rx-count-v1-1-e5711ed09b3d%40google.com Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250502-b4-new-fix-pd-rx-count-v1-1-e5711ed09b3d@google.com Signed-off-by: Greg Kroah-Hartman commit cad37faac66c3822add86caf02fa0884d309a45f Author: Sumanth Gavini Date: Sat May 17 10:56:04 2025 -0700 docs: ABI: Fix "aassociated" to "associated" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Reviewed-by: Armin Wolf Link: https://lore.kernel.org/r/20250517175626.1363502-1-sumanth.gavini@yahoo.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 538fbac74019c13dac341b20fbcc1e96c9a8d01e Author: Marc Zyngier Date: Wed May 21 11:04:11 2025 +0100 KVM: arm64: nv: Release faulted-in VNCR page from mmu_lock critical section The conversion to kvm_release_faultin_page() missed the requirement for this to be called within a critical section with mmu_lock held for write. Move this call up to satisfy this requirement. Fixes: 069a05e535496 ("KVM: arm64: nv: Handle VNCR_EL2-triggered faults") Signed-off-by: Marc Zyngier commit beab7d058309bfe0460a441b1c73639941e33d38 Author: Marc Zyngier Date: Wed May 21 10:58:29 2025 +0100 KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held Calling invalidate_vncr_va() without the mmu_lock held for write is a bad idea, and lockdep tells you about that. Fixes: 4ffa72ad8f37e ("KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2") Signed-off-by: Marc Zyngier commit 85c4aa0a456409511f4383811a88a3cb6b3af75c Author: Hans Zhang <18255117159@163.com> Date: Tue May 6 11:31:01 2025 +0800 xhci: Add missing parameter description to xhci_get_endpoint_index() Fix kernel-doc warning by documenting the @desc parameter: drivers/usb/host/xhci.c:1369: warning: Function parameter or struct member 'desc' not described in 'xhci_get_endpoint_index' Add detailed description of the @desc parameter and clarify the indexing logic for control endpoints vs other types. This brings the documentation in line with kernel-doc requirements while maintaining technical accuracy. Signed-off-by: Hans Zhang <18255117159@163.com> Link: https://lore.kernel.org/r/20250506033101.206180-1-18255117159@163.com Signed-off-by: Greg Kroah-Hartman commit f27c6da58f1129609a7de66e0034bde70f1349f4 Author: Niklas Neronin Date: Thu May 15 16:56:19 2025 +0300 usb: xhci: rename 'irq_control' to 'imod' The Interrupt Register Set contains Interrupt Moderation register (IMOD). The IMOD register contains the following fields: - Bits 15:0: Interrupt Moderation Interval (IMODI) - Bits 31:16: Interrupt Moderation Counter (IMODC) In the xHCI driver, the pointer currently named 'irq_control' refers to the IMOD register. However, the name 'irq_control' does not accurately describe the register or its contents, and the xHCI specification does not use the term "irq control" or "interrupt control" for this register. To improve clarity and better align with the xHCI specification, the pointer is renamed to 'imod'. Additionally, the IMOD register fields IMODI & IMODC have their own masks, which are also renamed for consistency: * 'ER_IRQ_INTERVAL_MASK' -> 'IMODI_MASK' * 'ER_IRQ_COUNTER_MASK' -> 'IMODC_MASK' Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-23-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bf9cce90da311aae5723681d74495099e417e8c7 Author: Niklas Neronin Date: Thu May 15 16:56:18 2025 +0300 usb: xhci: rename 'irq_pending' to 'iman' The Interrupt Register Set contains Interrupt Management register (IMAN). The IMAN register contains the following fields: - Bit 0: Interrupt Pending (IP) - Bit 1: Interrupt Enable (IE) - Bits 31:2: RsvdP (Reserved and Preserved) Tn the xhci driver, the pointer currently named 'irq_pending' refers to the IMAN register. However, the name "irq_pending" only describes one of the fields within the IMAN register, rather than the entire register itself. To improve clarity and better align with the xHCI specification, the pointer is renamed to 'iman'. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-22-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5f5816d190c1adaf41efd5c2ca880c53adc0e9d3 Author: Niklas Neronin Date: Thu May 15 16:56:17 2025 +0300 usb: xhci: cleanup IMOD register comments Patch does not contain any functional changes. Add missing macro descriptions with specific bit definitions for each data field and reordered them accordingly. Remove "HW use only" from Interrupt Moderation Counter. xHCI Specification 1.2, section 5.5.2.2, states "This counter may be directly written by software at any time to alter the interrupt rate." Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-21-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 74d7a757e8bcb753850c5e379c087c8424528f6a Author: Niklas Neronin Date: Thu May 15 16:56:16 2025 +0300 usb: xhci: rework Event Ring Segment Table Address mask Event Ring Segment Table Base Address Register contain two fields: - Bits 5:0: RsvdP (Reserved and Preserved) - Bits 63:6: Event Ring Segment Table Base Address Currently, an inverted RsvdP mask (ERST_BASE_RSVDP) is used to extract bits 63:6. Replaces the inverted mask with a non-inverted mask, 'ERST_BASE_ADDRESS_MASK', which makes the code easier to read. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-20-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7c6df26c3be7b1806cd2f2aad8fd4a5329d9145d Author: Niklas Neronin Date: Thu May 15 16:56:15 2025 +0300 usb: xhci: rework Event Ring Segment Table Size mask Event Ring Segment Table Size Register contain two fields: - Bits 15:0: Event Ring Segment Table Size - Bits 31:16: RsvdZ (Reserved and Zero) The current mask 'ERST_SIZE_MASK' refers to the RsvdZ bits (31:16). Change the mask to refer to bits 15:0, which are the Event Ring Segment Table Size bits. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-19-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e1db856bd28891d70008880d7f1d3b8d1ea948fd Author: Niklas Neronin Date: Thu May 15 16:56:14 2025 +0300 usb: xhci: remove '0' write to write-1-to-clear register xHCI specification 1.2, section 5.5.2.1. Interrupt Pending bit is RW1C (Write-1-to-clear), which means that writing '0' to is has no effect and is removed. The Interrupt Pending (IP) bit is cleared at the start of interrupt handling; xhci_clear_interrupt_pending(). This could theoretically cause a new interrupt to be issued before the xhci driver reaches the interrupter disable functions. To address this, the IP bit is read after Interrupt Enable is disabled, and a debug message is issued if the IP bit is still set. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-18-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f5bce30ad25e74899c54dda01c80ca6e2e7dc01b Author: Niklas Neronin Date: Thu May 15 16:56:13 2025 +0300 usb: xhci: guarantee that IMAN register is flushed Add read call to guarantee that the write to the IMAN register has been flushed. xHCI specification 1.2, section 5.5.2.1, Note: "Most systems have write buffers that minimize overhead, but this may require a read operation to guarantee that the write has been flushed from the posted buffer." Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-17-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9f7f74735ac295c9c32ac9152c362414e18d35cc Author: Niklas Neronin Date: Thu May 15 16:56:12 2025 +0300 usb: xhci: improve Interrupt Management register macros The Interrupt Management register (IMAN), contains three fields: - Bit 0: Interrupt Pending (IP) - Bit 1: Interrupt Enable (IE) - Bits 31:2: RsvdP (Reserved and Preserved) Currently, there are multiple macros for both the IP and IE fields. Consolidates them into single mask macros for better clarity and maintainability. Comment "THIS IS BUGGY - FIXME - IP IS WRITE 1 TO CLEAR" refers to the fact that both macros 'ER_IRQ_ENABLE' and 'ER_IRQ_DISABLE' clear the IP bit by writing '0' before modifying the IE bit. However, the IP bit is actually cleared by writing '1'. To prevent any regression, this behavior has not been altered. Instead, when the IE bit is modified, the IP macro is used explicitly to highlight this "quirk". Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-16-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1fdeb069053f65e974c6fd945c85fcb854e6c199 Author: Niklas Neronin Date: Thu May 15 16:56:11 2025 +0300 usb: xhci: set requested IMODI to the closest supported value The function configures the Interrupt Moderation Interval (IMODI) via bits 15:0 in the Interrupt Moderation Register. The IMODI value is specified in increments of 250 nanoseconds. For instance, an IMODI register value of 16 corresponds to 4000 nanoseconds, resulting in an interrupt every ~1ms. Currently, the function fails when a requested IMODI value is too large, only logging a warning message for secondary interrupters. Prevent this by automatically adjusting the IMODI value to the nearest supported value. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-15-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3d5b8a0e0af4df8fe70b244a5d84a559b6ad5558 Author: Niklas Neronin Date: Thu May 15 16:56:10 2025 +0300 usb: xhci: cleanup xhci_mem_init() Cleanup indentation, spacing and comment formats. Remove the "// " prefix from trace messages, as it is unnecessary and distracting. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-14-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 83d98dea48eb61667465583022ae03b0c4056aa1 Author: Niklas Neronin Date: Thu May 15 16:56:09 2025 +0300 usb: xhci: add individual allocation checks in xhci_mem_init() Break up the existing multi-allocation checks into individual checks. Add missing allocation check for 'xhci->interrupters'. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-13-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit daed871b67abc156edbe099d5a4c573a65f8fc78 Author: Niklas Neronin Date: Thu May 15 16:56:08 2025 +0300 usb: xhci: move initialization of the primary interrupter Move the primary interrupter (0) initialization from xhci_mem_init() to xhci_init(). This change requires us to save the allocated interrupter somewhere before initialization. Therefore, store it in the 'interrupters' array and rework xhci_add_interrupter() to retrieve the interrupter from the array. This is part of the ongoing effort to separate allocation and initialization. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0ff49390aad8a6483687fc66f64c8c52b6d6f3a4 Author: Niklas Neronin Date: Thu May 15 16:56:07 2025 +0300 usb: xhci: remove error handling from xhci_add_interrupter() Remove redundant error handling from xhci_add_interrupter() instead of trying to accommodate them in future changes. ======== Reasoning for the removal ======== Function xhci_add_interrupter() is invoked in two scenarios: Primary Interrupter Setup (ID 0): The maximum number of interrupters is always greater than zero, and the primary interrupter is always allocated as part of the driver's initialization process. In case of failure, the xHCI driver errors and exits. Secondary Interrupter Creation (ID >= 1): The interrupter is pre-allocated, and an empty slot is identified before invoking xhci_add_interrupter(). In both cases, the existing error handling within xhci_add_interrupter() is redundant and unnecessary. Upcoming Changes: In the subsequent commit, interrupter initialization will move from xhci_mem_init() to xhci_init(). This change is necessary to facilitate the ability to restart the xHCI driver without re-allocating memory. As a result, the allocated interrupter must be stored in the interrupters pointer array before initialization. Consequently, xhci_create_secondary_interrupter() would need to handle pointer removal for allocated 'interrupters' array upon failure, although xhci_add_interrupter() will never fail. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d41031bc8d80116e21e948e2dd38c6c7238165c9 Author: Niklas Neronin Date: Thu May 15 16:56:06 2025 +0300 usb: xhci: move enabling of USB 3 device notifications Relocated the enabling of USB 3.0 device notifications from xhci_mem_init() to xhci_init(). Introduced xhci_set_dev_notifications() function to handle the notification settings. Simplify 'DEV_NOTE_FWAKE' masks by directly using the 'ENABLE_DEV_NOTE' value (1 << 1) instead of using the 'ENABLE_DEV_NOTE' macro. Macro 'ENABLE_DEV_NOTE' is removed. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 943f7fddaa49cc797a2ccdff84f69ae4e6b87d40 Author: Niklas Neronin Date: Thu May 15 16:56:05 2025 +0300 usb: xhci: move doorbell array pointer assignment Move the assignment of the doorbell array pointer from xhci_mem_init() to xhci_init(). The assignment now utilizes the newly introduced xhci_set_doorbell_ptr() function. Doorbell Array Offset mask (DBOFF_MASK) is updated to directly specify its bit range as 31:2, rather than using inverted reserved bits 1:0. This change simplifies the mask representation, making it more intuitive and easier to understand. Remove the "// " prefix from trace messages, as it is unnecessary and distracting. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 44455f666b4ba3c3394966827e8923c491274b38 Author: Niklas Neronin Date: Thu May 15 16:56:04 2025 +0300 usb: xhci: move DCBAA pointer write Move the Device Context Base Address Array (DCBAA) pointer write from xhci_mem_init() to xhci_init(). This is part of the ongoing effort to separate allocation and initialization. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1711b255484a1a0613a194ca7897efba6db17159 Author: Niklas Neronin Date: Thu May 15 16:56:03 2025 +0300 usb: xhci: refactor xhci_set_cmd_ring_deq() Refactor xhci_set_cmd_ring_deq() making the code more understandable by using more descriptive constants and separating operations logically. - Remove 'CMD_RING_RSVD_BITS' the macro is misleading, the reserved bits are 5:4, yet the mask is for bits 5:0. - Introduce masks 'CMD_RING_PTR_MASK' and 'CMD_RING_CYCLE' to clearly define the bits for the Command Ring pointer and Command Ring Cycle. - Simplifying the process of setting the command ring address by separating the DMA address calculation and the Command Ring Control register (crcr) updates. - Remove the "// " prefix from trace messages, as it is unnecessary and distracting. Note: In the current implementation, the cycle bit is not cleared before applying the OR operation. Although this hasn't caused issues so far because the bit is '0' before reaching this function, the bit is now cleared before being set to prevent potential future problems and simplify the process. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 743cb737a62fc22d1e472bc07258a6f8430a399c Author: Niklas Neronin Date: Thu May 15 16:56:02 2025 +0300 usb: xhci: move command ring pointer write Move command ring pointer write from xhci_mem_init() to xhci_init(), and utilize the xhci_set_cmd_ring_deq() function. The xhci_set_cmd_ring_deq() function is nearly identical to the Command Ring Control register code in xhci_mem_init(). The only notable change is the use of: xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg, xhci->cmd_ring->dequeue) instead of: xhci->cmd_ring->first_seg->dma but they are effectively the same in this context. The former represents the exact position of the dequeue pointer, while the latter is the first DMA in the first segment. Before use, the dequeue pointer is at the first DMA in the first segment. The xhci_set_cmd_ring_deq() function is moved without modification, except for (long unsigned long) -> (unsigned long long) due to checkpatch.pl. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 84f007707f21f46323ca310da0e4639d73c22b72 Author: Niklas Neronin Date: Thu May 15 16:56:01 2025 +0300 usb: xhci: move device slot enabling register write Refactor the setting of the Number of Device Slots Enabled field into a separate function, relocating it to xhci_init(). The xHCI driver consistently sets the number of enabled device slots to the maximum value. The new function is named to reflect this behavior. Remove the "// " prefix from trace messages, as it is unnecessary and distracting. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 22f9b3c2f33d1dd8bf32f7c20f4eb16489259013 Author: Niklas Neronin Date: Thu May 15 16:56:00 2025 +0300 usb: xhci: relocate pre-allocation initialization Move pre-allocation initialization from xhci_mem_init() to xhci_init(). This change is part of an ongoing effort to separate initialization from allocation within the xhci driver. By doing so, it will enable future patches to re-initialize xhci driver memory without the necessity of fully recreating it. Additionally, compliance mode recovery initialization has been adjusted to only occur after successful memory allocation. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 59d50e53e070ce03c811e31c4fb583d3b0f88cfc Author: Xu Rao Date: Thu May 15 16:55:59 2025 +0300 usb: xhci: Add debugfs support for xHCI port bandwidth In many projects, you need to obtain the available bandwidth of the xhci roothub port. Refer to xhci rev1_2 and use the TRB_GET_BW command to obtain it. hardware tested: 03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 (prog-if 30 [XHCI]) Subsystem: Huawei Technologies Co., Ltd. Raven USB 3.1 Flags: bus master, fast devsel, latency 0, IRQ 30 Memory at c0300000 (64-bit, non-prefetchable) [size=1M] Capabilities: [48] Vendor Specific Information: Len=08 Capabilities: [50] Power Management version 3 Capabilities: [64] Express Endpoint, MSI 00 Capabilities: [a0] MSI: Enable- Count=1/8 Maskable- 64bit+ Capabilities: [c0] MSI-X: Enable+ Count=8 Masked- Kernel driver in use: xhci_hcd test progress: 1. cd /sys/kernel/debug/usb/xhci/0000:03:00.3/port_bandwidth# ls FS_BW HS_BW SS_BW 2. test fs speed device cat FS_BW port[1] available bw: 90%. port[2] available bw: 90%. port[3] available bw: 90%. port[4] available bw: 90%. port[5] available bw: 0%. port[6] available bw: 0%. port[7] available bw: 0%. port[8] available bw: 0%. plug in fs usb audio ID 0d8c:013c cat FS_BW port[1] available bw: 76%. port[2] available bw: 76%. port[3] available bw: 76%. port[4] available bw: 76%. port[5] available bw: 0%. port[6] available bw: 0%. port[7] available bw: 0%. port[8] available bw: 0%. 3. test hs speed device cat HS_BW port[1] available bw: 79%. port[2] available bw: 79%. port[3] available bw: 79%. port[4] available bw: 79%. port[5] available bw: 0%. port[6] available bw: 0%. port[7] available bw: 0%. port[8] available bw: 0%. plug in hs usb video ID 0408:1040 cat HS_BW port[1] available bw: 39%. port[2] available bw: 39%. port[3] available bw: 39%. port[4] available bw: 39%. port[5] available bw: 0%. port[6] available bw: 0%. port[7] available bw: 0%. port[8] available bw: 0%. 4.cat SS_BW port[1] available bw: 0%. port[2] available bw: 0%. port[3] available bw: 0%. port[4] available bw: 0%. port[5] available bw: 90%. port[6] available bw: 90%. port[7] available bw: 90%. port[8] available bw: 90%. Signed-off-by: Xu Rao Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 597f5c2f4128350bd5f549af6074417d296b4618 Author: Michal Pecio Date: Thu May 15 16:55:58 2025 +0300 usb: xhci: Don't log transfer ring segment list on errors The error message above used to span two lines, rarely more. A recent cleanup concentrated useful information from it in one line, but then it added printing the list of all ring segments, which is even longer than before. It provides no new information in usual cases and little in unusual ones, but adds noise to the log. Drop it. Signed-off-by: Michal Pecio Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250515135621.335595-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 70892277ca2dbad30ce89acf62fb62045d4bc59b Author: Connor Abbott Date: Tue May 20 15:08:56 2025 -0400 iommu/arm-smmu-qcom: Make set_stall work when the device is on Up until now we have only called the set_stall callback during initialization when the device is off. But we will soon start calling it to temporarily disable stall-on-fault when the device is on, so handle that by checking if the device is on and writing SCTLR. Signed-off-by: Connor Abbott Reviewed-by: Rob Clark Link: https://lore.kernel.org/r/20250520-msm-gpu-fault-fixes-next-v8-3-fce6ee218787@gmail.com [will: Fix "mixed declarations and code" warning from sparse] Signed-off-by: Will Deacon commit d6d886005d32e4380cee3d1095908875505ac2c6 Author: Randy Dunlap Date: Mon May 19 15:04:13 2025 -0700 Docs: doc-guide: update sphinx.rst Sphinx version number Update the minimum version number to match both Documentation/Changes and Documentation/conf.py. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Mauro Carvalho Chehab Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <20250519220413.2914890-1-rdunlap@infradead.org> commit 6381f9950440f78bc89b4384292a613e721f604e Merge: d5f4d0d2d7fcaa 36f6f7e2d4d094 Author: Greg Kroah-Hartman Date: Wed May 21 12:26:51 2025 +0200 Merge tag 'thunderbolt-for-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v6.16 merge window This includes following USB4/Thunderbolt changes for the v6.16 merge window: - Enable wake on connect and disconnect over system suspend. - Add mapping between Type-C ports and USB4 ports on non-Chrome systems. - Expose tunneling related events to userspace. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: Documentation/admin-guide: Document Thunderbolt/USB4 tunneling events thunderbolt: Notify userspace about firmware CM tunneling events thunderbolt: Notify userspace about software CM tunneling events thunderbolt: Introduce domain event message handler usb: typec: Connect Type-C port with associated USB4 port thunderbolt: Add Thunderbolt/USB4 <-> USB3 match function thunderbolt: Expose usb4_port_index() to other modules thunderbolt: Fix a logic error in wake on connect thunderbolt: Use wake on connect and disconnect over suspend commit d5f4d0d2d7fcaa68adf12e470177c29aa818a421 Merge: ab6dc9a6c721c2 0f73628e9da1ee Author: Greg Kroah-Hartman Date: Wed May 21 12:26:05 2025 +0200 Merge tag 'thunderbolt-for-v6.15-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Fix for v6.15-rc7 This includes a single USB4/Thunderbolt fix for v6.15-rc7: - Prevent crash in tb_cfg_request_dequeue(). This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.15-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Do not double dequeue a configuration request commit 5ccab49c104c2237f1573961857d9b173fcd9a12 Author: Randy Dunlap Date: Mon May 19 15:36:13 2025 -0700 docs: doc-guide: clarify latest theme usage We have been using the Alabaster theme as the default theme since Sept. 2022. Keep the information on the RTD theme around in case someone wants to try it with the DOCS_THEME environment variable. Fixes: 26d797ffc1c0 ("docs: update sphinx.rst to reflect the default theme change") Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Mauro Carvalho Chehab Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <20250519223613.37277-1-rdunlap@infradead.org> commit c4941af28ca3c70c80169867039ed207d20b7add Author: Madadi Vineeth Reddy Date: Tue May 20 15:37:52 2025 +0530 Documentation/scheduler: Fix typo in sched-stats domain field description Fixes a typo in the description of the 23rd field of the scheduling domain statistics, which was missing the word "cpu". Fixes: 7c8cd569ff66 ("docs: Update Schedstat version to 17") Signed-off-by: Madadi Vineeth Reddy Signed-off-by: Jonathan Corbet Message-ID: <20250520100752.39921-1-vineethr@linux.ibm.com> commit 4347566404a0f01e9dc654a0b806a582ee63f68b Author: Peng Fan Date: Wed May 21 15:20:48 2025 +0800 gpio: davinci: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 3f50bb3124d7 ("gpio: davinci: Make irq_chip immutable") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505210606.PudPm5pC-lkp@intel.com/ Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20250521072048.1053190-1-peng.fan@oss.nxp.com Signed-off-by: Bartosz Golaszewski commit d3e75291838a877440b462dcfec4b4414c705863 Author: Naveen Manohar Date: Wed May 21 11:48:40 2025 +0800 ASoC: Intel: sof_sdw: Add support for wclrvp & ocelot in WCL platform Add an entry in the soundwire quirk table for Wildcat boards to support WCL RVP Signed-off-by: Naveen Manohar Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250521034840.8083-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 990b5c07f677a0b633b41130a70771337c18343e Author: Kalesh AP Date: Tue May 20 09:29:09 2025 +0530 RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc Driver currently supports modifying GEN0_EXT0 CC parameters through debugfs hook. Fixed to return -EOPNOTSUPP instead of -EINVAL in bnxt_re_configure_cc() when the user tries to modify any other CC parameters. Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook") Signed-off-by: Kalesh AP Link: https://patch.msgid.link/20250520035910.1061918-4-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky commit e3d57a00d4d1f36689e9eab80b60d5024361efec Author: Gautam R A Date: Tue May 20 09:29:08 2025 +0530 RDMA/bnxt_re: Fix missing error handling for tx_queue bnxt_re_fill_gen0_ext0() did not return an error when attempting to modify CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE, leading to silent failures. Fixed this by returning -EOPNOTSUPP for tx_queue modifications and ensuring proper error propagation in bnxt_re_configure_cc(). Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook") Signed-off-by: Gautam R A Link: https://patch.msgid.link/20250520035910.1061918-3-kalesh-anakkur.purayil@broadcom.com Reviewed-by: Kalesh AP Signed-off-by: Leon Romanovsky commit 0f45b538ba2a597364b25cb1b69582090ee9cb96 Merge: 274fd5fe911956 ec0c0aab15243b Author: Bartosz Golaszewski Date: Wed May 21 12:04:30 2025 +0200 Merge tag 'intel-gpio-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.16-1 * Split GPIO ACPI quirks to its own file * Refactored GPIO ACPI library to shrink the code The following is an automated git shortlog grouped by driver: gpiolib: - acpi: Update file references in the Documentation and MAINTAINERS - acpi: Move quirks to a separate file - acpi: Add acpi_gpio_need_run_edge_events_on_boot() getter - acpi: Handle deferred list via new API - acpi: Make sure we fill struct acpi_gpio_info - acpi: Switch to use enum in acpi_gpio_in_ignore_list() - acpi: Use temporary variable for struct acpi_gpio_info - acpi: Deduplicate some code in __acpi_find_gpio() - acpi: Reuse struct acpi_gpio_params in struct acpi_gpio_lookup - acpi: Rename par to params for better readability - acpi: Reduce memory footprint for struct acpi_gpio_params - acpi: Remove index parameter from acpi_gpio_property_lookup() - acpi: Improve struct acpi_gpio_info memory footprint commit 58d7a965bb2b014d467445d38cdb07099b1f0f77 Author: Gautam R A Date: Tue May 20 09:29:07 2025 +0530 RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output The inactivity_cp parameter in debugfs was not being read or written correctly, resulting in "Invalid argument" errors. Fixed this by ensuring proper mapping of inactivity_cp in both the map_cc_config_offset_gen0_ext0 and bnxt_re_fill_gen0_ext0() functions. Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook") Signed-off-by: Gautam R A Link: https://patch.msgid.link/20250520035910.1061918-2-kalesh-anakkur.purayil@broadcom.com Reviewed-by: Kalesh AP Signed-off-by: Leon Romanovsky commit b5185ea1a6bd35957e556129bb92a64f83aa65e4 Author: Harald Freudenberger Date: Wed May 21 10:01:18 2025 +0200 s390/crypto: Extend protected key conversion retry loop CI runs show that the protected key conversion retry loop runs into timeout if a master key change was initiated on the addressed crypto resource shortly before the conversion request. This patch extends the retry logic to run in total 5 attempts with increasing delay (200, 400, 800 and 1600 ms) in case of a busy card. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Signed-off-by: Heiko Carstens commit c4abe6234246c75cdc43326415d9cff88b7cf06c Author: Heiko Carstens Date: Mon May 19 18:07:11 2025 +0200 s390/pci: Fix __pcilg_mio_inuser() inline assembly Use "a" constraint for the shift operand of the __pcilg_mio_inuser() inline assembly. The used "d" constraint allows the compiler to use any general purpose register for the shift operand, including register zero. If register zero is used this my result in incorrect code generation: 8f6: a7 0a ff f8 ahi %r0,-8 8fa: eb 32 00 00 00 0c srlg %r3,%r2,0 <---- If register zero is selected to contain the shift value, the srlg instruction ignores the contents of the register and always shifts zero bits. Therefore use the "a" constraint which does not permit to select register zero. Fixes: f058599e22d5 ("s390/pci: Fix s390_mmio_read/write with MIO") Cc: stable@vger.kernel.org Reported-by: Niklas Schnelle Reviewed-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 27565cfcd78315ce0410adb79ae14d49e325a2b1 Author: Mauro Carvalho Chehab Date: Wed May 21 11:02:15 2025 +0200 scripts: kernel-doc: prevent a KeyError when checking output If a file sent to KernelFiles.msg() method doesn't exist, instead of producing a KeyError, output an error message. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/linux-doc/cover.1747719873.git.mchehab+huawei@kernel.org/T/#ma43ae9d8d0995b535cf5099e5381dace0410de04 Signed-off-by: Mauro Carvalho Chehab Acked-by: Akira Yokosawa Signed-off-by: Jonathan Corbet Message-ID: <4efa177f2157a7ec009cc197dfc2d87e6f32b165.1747817887.git.mchehab+huawei@kernel.org> commit 2f3f7ba1ae6ee492bad2974cc3c93c0c238f1063 Author: Mauro Carvalho Chehab Date: Wed May 21 11:02:14 2025 +0200 docs: kerneldoc.py: simplify exception handling logic Get rid of logger.verbose() which is causing the logger to not work. Also, instead of having try/except everywhere, place them on a common place. While here, get rid of some bogus logs. Signed-off-by: Mauro Carvalho Chehab Acked-by: Akira Yokosawa Signed-off-by: Jonathan Corbet Message-ID: commit 411c08ccdc8657ff082f43463ae97fcceb231eab Author: Mauro Carvalho Chehab Date: Wed May 21 11:02:13 2025 +0200 MAINTAINERS: update linux-doc entry to cover new Python scripts Changes to ABI and kernel-doc need to be c/c linux-doc. Update the maintainer's entry to cover those files. Signed-off-by: Mauro Carvalho Chehab Acked-by: Akira Yokosawa Signed-off-by: Jonathan Corbet Message-ID: commit 6a7c3c2606105a41dde81002c0037420bc1ddf00 Author: Pawan Gupta Date: Tue May 20 22:35:20 2025 -0700 x86/bugs: Fix spectre_v2 mitigation default on Intel Commit 480e803dacf8 ("x86/bugs: Restructure spectre_v2 mitigation") inadvertently changed the spectre-v2 mitigation default from eIBRS to IBRS on Intel. While splitting the spectre_v2 mitigation in select/update/apply functions, eIBRS and IBRS selection logic was separated in select and update. This caused IBRS selection to not consider that eIBRS mitigation is already selected, fix it. Fixes: 480e803dacf8 ("x86/bugs: Restructure spectre_v2 mitigation") Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250520-eibrs-fix-v1-1-91bacd35ed09@linux.intel.com commit 3053a2c5086d56ce7f64cfb5816b4124769c0ccd Author: Connor Abbott Date: Tue May 20 15:08:55 2025 -0400 iommu/arm-smmu: Move handing of RESUME to the context fault handler The upper layer fault handler is now expected to handle everything required to retry the transaction or dump state related to it, since we enable threaded IRQs. This means that we can take charge of writing RESUME, making sure that we always write it after writing FSR as recommended by the specification. The iommu handler should write -EAGAIN if a transaction needs to be retried. This avoids tricky cross-tree changes in drm/msm, since it never wants to retry the transaction and it already returns 0 from its fault handler. Therefore it will continue to correctly terminate the transaction without any changes required. devcoredumps from drm/msm will temporarily be broken until it is fixed to collect devcoredumps inside its fault handler, but fixing that first would actually be worse because MMU-500 ignores writes to RESUME unless all fields of FSR (except SS of course) are clear and raises an interrupt when only SS is asserted. Right now, things happen to work most of the time if we collect a devcoredump, because RESUME is written asynchronously in the fault worker after the fault handler clears FSR and finishes, although there will be some spurious faults, but if this is changed before this commit fixes the FSR/RESUME write order then SS will never be cleared, the interrupt will never be cleared, and the whole system will hang every time a fault happens. It will therefore help bisectability if this commit goes first. I've changed the TBU path to also accept -EAGAIN and do the same thing, while keeping the old -EBUSY behavior. Although the old path was broken because you'd get a storm of interrupts due to returning IRQ_NONE that would eventually result in the interrupt being disabled, and I think it was dead code anyway, so it should eventually be deleted. Note that drm/msm never uses TBU so this is untested. Signed-off-by: Connor Abbott Link: https://lore.kernel.org/r/20250520-msm-gpu-fault-fixes-next-v8-2-fce6ee218787@gmail.com Signed-off-by: Will Deacon commit 1650620774fa83135e39cc5778684dd516c11c3e Author: Connor Abbott Date: Tue May 20 15:08:54 2025 -0400 iommu/arm-smmu-qcom: Enable threaded IRQ for Adreno SMMUv2/MMU500 The recommended flow for stall-on-fault in SMMUv2 is the following: 1. Resolve the fault. 2. Write to FSR to clear the fault bits. 3. Write RESUME to retry or fail the transaction. MMU500 is designed with this sequence in mind. For example, experimentally we have seen on MMU500 that writing RESUME does not clear FSR.SS unless the original fault is cleared in FSR, so 2 must come before 3. FSR.SS is allowed to signal a fault (and does on MMU500) so that if we try to do 2 -> 1 -> 3 (while exiting from the fault handler after 2) we can get duplicate faults without hacks to disable interrupts. However, resolving the fault typically requires lengthy operations that can stall, like bringing in pages from disk. The only current user, drm/msm, dumps GPU state before failing the transaction which indeed can stall. Therefore, from now on we will require implementations that want to use stall-on-fault to also enable threaded IRQs. Do that with the Adreno MMU implementations. Signed-off-by: Connor Abbott Link: https://lore.kernel.org/r/20250520-msm-gpu-fault-fixes-next-v8-1-fce6ee218787@gmail.com Signed-off-by: Will Deacon commit ec18d5c41e01c9833cf12ad97be76981301bb956 Author: Greg Kroah-Hartman Date: Wed May 21 11:29:34 2025 +0200 drivers: hv: fix up const issue with vmbus_chan_bin_attrs In commit 9bec944506fa ("sysfs: constify attribute_group::bin_attrs"), the bin_attributes are now required to be const. Due to merge issues, the original commit could not modify this structure (it came in through a different branch.) Fix this up now by setting the variable properly. Cc: Thomas Weißschuh Cc: Naman Jain Fixes: 9bec944506fa ("sysfs: constify attribute_group::bin_attrs") Signed-off-by: Greg Kroah-Hartman commit ec0c0aab15243bbc6140a7cedd01e2dd9ad19878 Author: Andy Shevchenko Date: Fri May 16 12:52:34 2025 +0300 gpiolib-acpi: Update file references in the Documentation and MAINTAINERS The recent changes in the gpiolib-acpi.c need also updates in the Documentation and MAINTAINERS. Do the necessary changes here. Fixes: babb541af627 ("gpiolib: acpi: Move quirks to a separate file") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250516193436.09bdf8cc@canb.auug.org.au Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Acked-by: Ilpo Järvinen Signed-off-by: Andy Shevchenko commit 9edfde64eefdb1bd4f5c7e09ac983db3b3379270 Merge: 44aa9861d89bba 92dc572852ddca Author: Andy Shevchenko Date: Thu May 15 13:11:28 2025 +0300 Merge patch series "gpiolib: acpi: Split quirks to its own file" Andy Shevchenko says: The GPIO ACPI helpers use a few quirks which consumes approximately 20% of the file. Besides that the necessary bits are sparse and being directly referred. Split them to a separate file. There is no functional change. For the new file I used the Hans' authorship of Hans as he the author of all those bits (expect very tiny changes made by this series). Link: https://lore.kernel.org/r/20250513100514.2492545-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 92dc572852ddcae687590cb159189004d58e382e Author: Andy Shevchenko Date: Tue May 13 13:00:34 2025 +0300 gpiolib: acpi: Move quirks to a separate file The gpiolib-acpi.c is huge enough even without DMI quirks. Move them to a separate file for a better maintenance. No functional change intended. Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 5666a8777add09d1167de308df2147983486a0af Author: Andy Shevchenko Date: Tue May 13 13:00:33 2025 +0300 gpiolib: acpi: Add acpi_gpio_need_run_edge_events_on_boot() getter Add acpi_gpio_need_run_edge_events_on_boot() getter which moves towards isolating the GPIO ACPI and quirk APIs. It will helps splitting them completely in the next changes. No functional changes. Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 44aa9861d89bba204695af1ed7974b2897d23136 Merge: 71114cd1d38698 7c010d46337214 Author: Andy Shevchenko Date: Wed Apr 9 17:54:43 2025 +0300 Merge patch series "gpiolib: acpi: Fix missing info filling" Andy Shevchenko says: Kees reported that code, while being refactored, missed the point of filling the info structure which supplies GPIO flags to the upper layer. Indeed, without that part the GPIO expander get no IRQ on Intel Edison, for example. Fix this in this series. Link: https://lore.kernel.org/r/20250409132942.2550719-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit a594877663d1e3d5cf57ec8af739582fc5c47cec Author: Andy Shevchenko Date: Tue May 13 13:00:32 2025 +0300 gpiolib: acpi: Handle deferred list via new API Introduce a new API and handle deferred list via it which moves towards isolating the GPIO ACPI and quirk APIs. It will helps splitting them completely in the next changes. No functional changes. Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 7c010d463372140006bf96985a306d6cbfc6e118 Author: Andy Shevchenko Date: Wed Apr 9 16:27:54 2025 +0300 gpiolib: acpi: Make sure we fill struct acpi_gpio_info The previous refactoring missed the filling of the struct acpi_gpio_info and that's how the lot of the code got eliminated. Restore those pieces by passing the pointer all down in the call stack. With this, the code grows by ~6%, but in conjunction with the previous refactoring it still gives -387 bytes add/remove: 2/0 grow/shrink: 5/1 up/down: 852/-35 (817) Function old new delta acpi_dev_gpio_irq_wake_get_by 129 695 +566 acpi_find_gpio 216 354 +138 acpi_find_gpio.__UNIQUE_ID_ddebug504 - 56 +56 acpi_dev_gpio_irq_wake_get_by.__UNIQUE_ID_ddebug506 - 56 +56 acpi_populate_gpio_lookup 536 548 +12 acpi_gpio_property_lookup 414 426 +12 acpi_get_gpiod_by_index 307 319 +12 __acpi_find_gpio 638 603 -35 Total: Before=14154, After=14971, chg +5.77% As a positive side effect, it improves memory footprint for struct acpi_gpio_lookup. `pahole` difference before and after: - /* size: 64, cachelines: 1, members: 4 */ - /* member types with holes: 1, total: 1 */ + /* size: 32, cachelines: 1, members: 4 */ Reported-by: Kees Bakker Closes: https://lore.kernel.org/r/9715c8dd-38df-48fd-a9d1-7a78163dc989@ijzerbout.nl Fixes: 8b4f52ef7a41 ("gpiolib: acpi: Deduplicate some code in __acpi_find_gpio()") Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit b24fd5bc8e6d6b6006db65b5956c2c2cd0ee5a7b Author: Andy Shevchenko Date: Tue May 13 13:00:31 2025 +0300 gpiolib: acpi: Switch to use enum in acpi_gpio_in_ignore_list() Switch to use enum instead of pointers in acpi_gpio_in_ignore_list() which moves towards isolating the GPIO ACPI and quirk APIs. It will helps splitting them completely in the next changes. No functional changes. Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit f89a915e68de2327d6fd9e69c2aae730d6fe51c6 Author: Andy Shevchenko Date: Wed Apr 9 16:27:53 2025 +0300 gpiolib: acpi: Use temporary variable for struct acpi_gpio_info Use temporary variable to access the struct acpi_gpio_info members. This will help further changes to be cleaner. No functional change intended. Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit d43548f422f27219eff5ce1897336af2c4f15091 Author: Marc Zyngier Date: Tue May 20 15:41:16 2025 +0100 KVM: arm64: nv: Hold mmu_lock when invalidating VNCR SW-TLB before translating When translating a VNCR translation fault, we start by marking the current SW-managed TLB as invalid, so that we can populate it in place. This is, however, done without the mmu_lock held. A consequence of this is that another CPU dealing with TLBI emulation can observe a translation still flagged as valid, but with invalid walk results (such as pgshift being 0). Bad things can result from this, such as a BUG() in pgshift_level_to_ttl(). Fix it by taking the mmu_lock for write to perform this local invalidation, and use invalidate_vncr() instead of open-coding the write to the 'valid' flag. Fixes: 069a05e535496 ("KVM: arm64: nv: Handle VNCR_EL2-triggered faults") Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250520144116.3667978-1-maz@kernel.org Signed-off-by: Marc Zyngier commit 08dcbe30be481bc66eb5ee1e82a577d64e451612 Author: Jacky Bai Date: Fri May 16 18:04:23 2025 +0800 pinctrl: freescale: Add support for imx943 pinctrl The i.MX943 System Manager (SM) firmware supports the System Control Management Interface (SCMI) pinctrl protocol, similar to the i.MX95 SM. The base offset for the i.MX943 IOMUXC Daisy input register differs from that of the i.MX95. Update the pinctrl-imx-scmi driver to add support for i.MX943. Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/20250516100423.1685732-1-ping.bai@nxp.com Signed-off-by: Linus Walleij commit 2e9ba1d9a31f68b4deb5f9e62a9201a51b00abf7 Author: Thomas Richard Date: Tue May 20 15:28:27 2025 +0200 pinctrl: core: add devm_pinctrl_register_mappings() Using devm_pinctrl_register_mappings(), the core can automatically unregister pinctrl mappings. Reviewed-by: Linus Walleij Signed-off-by: Thomas Richard Link: https://lore.kernel.org/20250520-aaeon-up-board-pinctrl-support-v6-3-dcb3756be3c6@bootlin.com Signed-off-by: Linus Walleij commit 223657cfc87c3d5b9c2172014181c8ed7acf58e8 Author: Thomas Richard Date: Tue May 20 15:28:26 2025 +0200 pinctrl: remove extern specifier for functions in machine.h Extern is the default specifier for a function, no need to define it. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Thomas Richard Link: https://lore.kernel.org/20250520-aaeon-up-board-pinctrl-support-v6-2-dcb3756be3c6@bootlin.com Signed-off-by: Linus Walleij commit 0b0ff976af94fc2437b62e3798f11aacc3798613 Author: Aditya Kumar Singh Date: Fri May 16 16:02:08 2025 +0530 wifi: mac80211: accept probe response on link address as well If a random MAC address is not requested during scan request, unicast probe response frames are only accepted if the destination address matches the interface address. This works fine for non-ML interfaces. However, with MLO, the same interface can have multiple links, and a scan on a link would be requested with the link address. In such cases, the probe response frame gets dropped which is incorrect. Therefore, add logic to check if any of the link addresses match the destination address if the interface address does not match. Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250516-bug_fix_mlo_scan-v2-2-12e59d9110ac@oss.qualcomm.com Signed-off-by: Johannes Berg commit 78a7a126dc5b8e3c5a3d4da9f513e0236d2dc1a3 Author: Aditya Kumar Singh Date: Fri May 16 16:02:07 2025 +0530 wifi: mac80211: validate SCAN_FLAG_AP in scan request during MLO When an AP interface is already beaconing, a subsequent scan is not allowed unless the user space explicitly sets the flag NL80211_SCAN_FLAG_AP in the scan request. If this flag is not set, the scan request will be returned with the error code -EOPNOTSUPP. However, this restriction currently applies only to non-ML interfaces. For ML interfaces, scans are allowed without this flag being explicitly set by the user space which is wrong. This is because the beaconing check currently uses only the deflink, which does not get set during MLO. Hence to fix this, during MLO, use the existing helper ieee80211_num_beaconing_links() to know if any of the link is beaconing. Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250516-bug_fix_mlo_scan-v2-1-12e59d9110ac@oss.qualcomm.com Signed-off-by: Johannes Berg commit da1b9a55ff116cb040528ef664c70a4eec03ae99 Author: Christian Lamparter Date: Fri May 16 20:41:06 2025 +0200 wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback() Robert Morris reported: |If a malicious USB device pretends to be an Intersil p54 wifi |interface and generates an eeprom_readback message with a large |eeprom->v1.len, p54_rx_eeprom_readback() will copy data from the |message beyond the end of priv->eeprom. | |static void p54_rx_eeprom_readback(struct p54_common *priv, | struct sk_buff *skb) |{ | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; | struct p54_eeprom_lm86 *eeprom = (struct p54_eeprom_lm86 *) hdr->data; | | if (priv->fw_var >= 0x509) { | memcpy(priv->eeprom, eeprom->v2.data, | le16_to_cpu(eeprom->v2.len)); | } else { | memcpy(priv->eeprom, eeprom->v1.data, | le16_to_cpu(eeprom->v1.len)); | } | [...] The eeprom->v{1,2}.len is set by the driver in p54_download_eeprom(). The device is supposed to provide the same length back to the driver. But yes, it's possible (like shown in the report) to alter the value to something that causes a crash/panic due to overrun. This patch addresses the issue by adding the size to the common device context, so p54_rx_eeprom_readback no longer relies on possibly tampered values... That said, it also checks if the "firmware" altered the value and no longer copies them. The one, small saving grace is: Before the driver tries to read the eeprom, it needs to upload >a< firmware. the vendor firmware has a proprietary license and as a reason, it is not present on most distributions by default. Cc: Reported-by: Robert Morris Closes: https://lore.kernel.org/linux-wireless/28782.1747258414@localhost/ Fixes: 7cb770729ba8 ("p54: move eeprom code into common library") Signed-off-by: Christian Lamparter Link: https://patch.msgid.link/20250516184107.47794-1-chunkeey@gmail.com Signed-off-by: Johannes Berg commit d7500fbfb12067ee7313f13f4c58f771be3018ab Author: Bert Karwatzki Date: Wed May 21 00:34:29 2025 +0200 wifi: check if socket flags are valid Checking the SOCK_WIFI_STATUS flag bit in sk_flags may give wrong results since sk_flags are part of a union and the union is used otherwise. Add sk_requests_wifi_status() which checks if sk is non-NULL, sk is a full socket (so flags are valid) and checks the flag bit. Fixes: 76a853f86c97 ("wifi: free SKBTX_WIFI_STATUS skb tx_flags flag") Suggested-by: Johannes Berg Signed-off-by: Bert Karwatzki Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250520223430.6875-1-spasswolf@web.de [edit commit message, fix indentation] Signed-off-by: Johannes Berg commit 61ab72c2c6bf24f28b3dbfd3126e984d5afa8424 Author: David Kaplan Date: Fri May 16 14:32:11 2025 -0500 x86/bugs: Restructure ITS mitigation Restructure the ITS mitigation to use select/update/apply functions like the other mitigations. There is a particularly complex interaction between ITS and Retbleed as CDT (Call Depth Tracking) is a mitigation for both, and either its=stuff or retbleed=stuff will attempt to enable CDT. retbleed_update_mitigation() runs first and will check the necessary pre-conditions for CDT if either ITS or Retbleed stuffing is selected. If checks pass and ITS stuffing is selected, it will select stuffing for Retbleed as well. its_update_mitigation() runs after and will either select stuffing if retbleed stuffing was enabled, or fall back to the default (aligned thunks) if stuffing could not be enabled. Enablement of CDT is done exclusively in retbleed_apply_mitigation(). its_apply_mitigation() is only used to enable aligned thunks. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/20250516193212.128782-1-david.kaplan@amd.com commit 412751aa6991501d7defeadecfede59043d1b5e8 Merge: e95534e107d2e9 a5806cd506af5a Author: Ingo Molnar Date: Wed May 21 08:42:51 2025 +0200 Merge tag 'v6.15-rc7' into x86/core, to pick up fixes Pick up build fixes from upstream to make this tree more testable. Signed-off-by: Ingo Molnar commit e95534e107d2e9e136aa4d7cbededb3827e80074 Author: Xin Li (Intel) Date: Sat May 17 09:57:12 2025 -0700 x86/xen/msr: Fix uninitialized variable 'err' xen_read_msr_safe() currently passes an uninitialized argument 'err' to xen_do_read_msr(). But as xen_do_read_msr() may not set the argument, xen_read_msr_safe() could return err with an unpredictable value. To ensure correctness, initialize err to 0 (representing success) in xen_read_msr_safe(). Do the same in xen_read_msr(), even err is not used after being passed to xen_do_read_msr(). Closes: https://lore.kernel.org/xen-devel/aBxNI_Q0-MhtBSZG@stanley.mountain/ Reported-by: Dan Carpenter Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250517165713.935384-1-xin@zytor.com commit 0413bcf0fc460a68a2a7a8354aee833293d7d693 Author: Herbert Xu Date: Thu May 8 13:22:16 2025 +0800 crypto: marvell/cesa - Do not chain submitted requests This driver tries to chain requests together before submitting them to hardware in order to reduce completion interrupts. However, it even extends chains that have already been submitted to hardware. This is dangerous because there is no way of knowing whether the hardware has already read the DMA memory in question or not. Fix this by splitting the chain list into two. One for submitted requests and one for requests that have not yet been submitted. Only extend the latter. Reported-by: Klaus Kudielka Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining crypto requests in TDMA mode") Cc: Signed-off-by: Herbert Xu commit 5b9db9c16f428ada473314ad1c49e55681be7a72 Author: Radim Krčmář Date: Thu May 15 16:37:25 2025 +0200 RISC-V: KVM: add KVM_CAP_RISCV_MP_STATE_RESET Add a toggleable VM capability to reset the VCPU from userspace by setting MP_STATE_INIT_RECEIVED through IOCTL. Reset through a mp_state to avoid adding a new IOCTL. Do not reset on a transition from STOPPED to RUNNABLE, because it's better to avoid side effects that would complicate userspace adoption. The MP_STATE_INIT_RECEIVED is not a permanent mp_state -- IOCTL resets the VCPU while preserving the original mp_state -- because we wouldn't gain much from having a new state it in the rest of KVM, but it's a very non-standard use of the IOCTL. Signed-off-by: Radim Krčmář Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250515143723.2450630-5-rkrcmar@ventanamicro.com Signed-off-by: Anup Patel commit 5bc40978675241aad7175fadc857262118588805 Author: Atish Patra Date: Thu May 15 16:11:18 2025 -0700 RISC-V: KVM: Remove scounteren initialization Scounteren CSR controls the direct access the hpmcounters and cycle/ instret/time from the userspace. It's the supervisor's responsibility to set it up correctly for it's user space. They hypervisor doesn't need to decide the policy on behalf of the supervisor. Signed-off-by: Atish Patra Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250515-fix_scounteren_vs-v3-1-729dc088943e@rivosinc.com Signed-off-by: Anup Patel commit 9f0e6b98c1a13ac1f38d559b548b8f122572ae18 Author: Radim Krčmář Date: Thu Apr 3 13:25:22 2025 +0200 KVM: RISC-V: remove unnecessary SBI reset state The SBI reset state has only two variables -- pc and a1. The rest is known, so keep only the necessary information. The reset structures make sense if we want userspace to control the reset state (which we do), but I'd still remove them now and reintroduce with the userspace interface later -- we could probably have just a single reset state per VM, instead of a reset state for each VCPU. Reviewed-by: Andrew Jones Signed-off-by: Radim Krčmář Link: https://lore.kernel.org/r/20250403112522.1566629-6-rkrcmar@ventanamicro.com Signed-off-by: Anup Patel commit a1c66842f1b5a054af2f3d9b4d12b8674f5f558f Author: Radim Krčmář Date: Thu Apr 3 13:25:21 2025 +0200 KVM: RISC-V: refactor sbi reset request The same code is used twice and SBI reset sets only two variables. Reviewed-by: Andrew Jones Signed-off-by: Radim Krčmář Link: https://lore.kernel.org/r/20250403112522.1566629-5-rkrcmar@ventanamicro.com Signed-off-by: Anup Patel commit 9ffecf04144db5517eae204e65b7cde75ac920e0 Author: Radim Krčmář Date: Thu Apr 3 13:25:20 2025 +0200 KVM: RISC-V: refactor vector state reset Do not depend on the reset structures. vector.datap is a kernel memory pointer that needs to be preserved as it is not a part of the guest vector data. Reviewed-by: Andrew Jones Signed-off-by: Radim Krčmář Link: https://lore.kernel.org/r/20250403112522.1566629-4-rkrcmar@ventanamicro.com Signed-off-by: Anup Patel commit a29c19e13de1b0a37697ee86fccb190a86ade9ce Author: Atish Patra Date: Mon May 5 12:46:53 2025 -0700 RISC-V: KVM: Remove experimental tag for RISC-V RISC-V KVM port is no longer experimental. Let's remove it to avoid confusion. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20250505-kvm_tag_change-v1-1-6dbf6af240af@rivosinc.com Signed-off-by: Anup Patel commit f80e9cc5c6c35ef46c8b980f076911d885941b7d Author: Atish Patra Date: Wed Apr 30 01:16:30 2025 -0700 KVM: riscv: selftests: Add vector extension tests Add vector related tests with the ISA extension standard template. However, the vector registers are bit tricky as the register length is variable based on vlenb value of the system. That's why the macros are defined with a default and overidden with actual value at runtime. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20250430-kvm_selftest_improve-v3-3-eea270ff080b@rivosinc.com Signed-off-by: Anup Patel commit 3608b174ece5633dbd1f9afe37a48a2a9a0f0499 Author: Atish Patra Date: Wed Apr 30 01:16:29 2025 -0700 KVM: riscv: selftests: Decode stval to identify exact exception type Currently, the sbi_pmu_test continues if the exception type is illegal instruction because access to hpmcounter will generate that. However illegal instruction exception may occur due to the other reasons which should result in test assertion. Use the stval to decode the exact type of instructions and which csrs are being accessed if it is csr access instructions. Assert in all cases except if it is a csr access instructions that access valid PMU related registers. Take this opportunity to remove the CSR_CYCLEH reference as the test is compiled for RV64 only. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20250430-kvm_selftest_improve-v3-2-eea270ff080b@rivosinc.com Signed-off-by: Anup Patel commit e23bb06b17f81982450beb880b9c5a7fb4251164 Author: Atish Patra Date: Wed Apr 30 01:16:28 2025 -0700 KVM: riscv: selftests: Align the trap information wiht pt_regs The current exeception register structure in selftests are missing few registers (e.g stval). Instead of adding it manually, change the ex_regs to align with pt_regs to make it future proof. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20250430-kvm_selftest_improve-v3-1-eea270ff080b@rivosinc.com Signed-off-by: Anup Patel commit 8682a5749a3d2b416b57709115c0351b50c8efcb Author: Naveen N Rao (AMD) Date: Sun Apr 20 22:02:48 2025 +0530 MAINTAINERS: powerpc: Remove myself as a reviewer I haven't been able to participate and help with this as much as I had hoped, and it doesn't look like I will be able to spend time on powerpc going forward. Signed-off-by: Naveen N Rao (AMD) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420163248.1746379-1-naveen@kernel.org commit e6b3527c3b0a676c710e91798c2709cc0538d312 Merge: 7f7c6bb74d4eec a98326c151ea3d Author: Jakub Kicinski Date: Tue May 20 20:00:54 2025 -0700 Merge branch 'net-airoha-add-per-flow-stats-support-to-hw-flowtable-offloading' Lorenzo Bianconi says: ==================== net: airoha: Add per-flow stats support to hw flowtable offloading Introduce per-flow stats accounting to the flowtable hw offload in the airoha_eth driver. Flow stats are split in the PPE and NPU modules: - PPE: accounts for high 32bit of per-flow stats - NPU: accounts for low 32bit of per-flow stats v1: https://lore.kernel.org/20250514-airoha-en7581-flowstats-v1-0-c00ede12a2ca@kernel.org ==================== Link: https://patch.msgid.link/20250516-airoha-en7581-flowstats-v2-0-06d5fbf28984@kernel.org Signed-off-by: Jakub Kicinski commit a98326c151ea3d92e9496858cc2dacccd0870941 Author: Lorenzo Bianconi Date: Fri May 16 10:00:01 2025 +0200 net: airoha: ppe: Disable packet keepalive Since netfilter flowtable entries are now refreshed by flow-stats polling, we can disable hw packet keepalive used to periodically send packets belonging to offloaded flows to the kernel in order to refresh flowtable entries. Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250516-airoha-en7581-flowstats-v2-3-06d5fbf28984@kernel.org Signed-off-by: Jakub Kicinski commit b81e0f2b58be37628b2e12f8dffdd63c84573e75 Author: Lorenzo Bianconi Date: Fri May 16 10:00:00 2025 +0200 net: airoha: Add FLOW_CLS_STATS callback support Introduce per-flow stats accounting to the flowtable hw offload in the airoha_eth driver. Flow stats are split in the PPE and NPU modules: - PPE: accounts for high 32bit of per-flow stats - NPU: accounts for low 32bit of per-flow stats FLOW_CLS_STATS can be enabled or disabled at compile time. Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250516-airoha-en7581-flowstats-v2-2-06d5fbf28984@kernel.org Signed-off-by: Jakub Kicinski commit c52918744ee1e49cea86622a2633b9782446428f Author: Lorenzo Bianconi Date: Fri May 16 09:59:59 2025 +0200 net: airoha: npu: Move memory allocation in airoha_npu_send_msg() caller Move ppe_mbox_data struct memory allocation from airoha_npu_send_msg routine to the caller one. This is a preliminary patch to enable wlan NPU offloading and flow counter stats support. Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250516-airoha-en7581-flowstats-v2-1-06d5fbf28984@kernel.org Signed-off-by: Jakub Kicinski commit 5de775df3362090a6e90046d1f2d83fe62489aa0 Author: Dan Carpenter Date: Wed Apr 23 20:22:05 2025 +0300 rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send() The "ret" variable isn't initialized if we don't enter the loop. For example, if "channel->state" is not SMD_CHANNEL_OPENED. Fixes: 33e3820dda88 ("rpmsg: smd: Use spinlock in tx path") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/aAkhvV0nSbrsef1P@stanley.mountain Signed-off-by: Bjorn Andersson commit 7f7c6bb74d4eeca8e83c7ad31a761c3fda558799 Merge: 5b1ced44692ad6 002dba13c824f1 Author: Jakub Kicinski Date: Tue May 20 19:18:26 2025 -0700 Merge branch 'ipv6-follow-up-for-rtnl-free-rtm_newroute-series' Kuniyuki Iwashima says: ==================== ipv6: Follow up for RTNL-free RTM_NEWROUTE series. Patch 1 removes rcu_read_lock() in fib6_get_table(). Patch 2 removes rtnl_is_held arg for lwtunnel_valid_encap_type(), which was short-term fix and is no longer used. Patch 3 fixes RCU vs GFP_KERNEL report by syzkaller. Patch 4~7 reverts GFP_ATOMIC uses to GFP_KERNEL. v1: https://lore.kernel.org/20250514201943.74456-1-kuniyu@amazon.com ==================== Link: https://patch.msgid.link/20250516022759.44392-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 002dba13c824f1cf86f618f0d23d1f0ad3c93bbb Author: Kuniyuki Iwashima Date: Thu May 15 19:27:23 2025 -0700 ipv6: Revert two per-cpu var allocation for RTM_NEWROUTE. These two commits preallocated two per-cpu variables in ip6_route_info_create() as fib_nh_common_init() and fib6_nh_init() were expected to be called under RCU. * commit d27b9c40dbd6 ("ipv6: Preallocate nhc_pcpu_rth_output in ip6_route_info_create().") * commit 5720a328c3e9 ("ipv6: Preallocate rt->fib6_nh->rt6i_pcpu in ip6_route_info_create().") Now these functions can be called without RCU and can use GFP_KERNEL. Let's revert the commits. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-8-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit d465bd07d16e37cd3aa25539ab187b372853808d Author: Kuniyuki Iwashima Date: Thu May 15 19:27:22 2025 -0700 ipv6: Pass gfp_flags down to ip6_route_info_create_nh(). Since commit c4837b9853e5 ("ipv6: Split ip6_route_info_create()."), ip6_route_info_create_nh() uses GFP_ATOMIC as it was expected to be called under RCU. Now, we can call it without RCU and use GFP_KERNEL. Let's pass gfp_flags to ip6_route_info_create_nh(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-7-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 5e4a8cc7beb8567293e6d4230b14e95167759214 Author: Kuniyuki Iwashima Date: Thu May 15 19:27:21 2025 -0700 Revert "ipv6: Factorise ip6_route_multipath_add()." Commit 71c0efb6d12f ("ipv6: Factorise ip6_route_multipath_add().") split a loop in ip6_route_multipath_add() so that we can put rcu_read_lock() between ip6_route_info_create() and ip6_route_info_create_nh(). We no longer need to do so as ip6_route_info_create_nh() does not require RCU now. Let's revert the commit to simplify the code. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit cefe6e131cc4f032110efe1687295e133f3d5964 Author: Kuniyuki Iwashima Date: Thu May 15 19:27:20 2025 -0700 Revert "ipv6: sr: switch to GFP_ATOMIC flag to allocate memory during seg6local LWT setup" The previous patch fixed the same issue mentioned in commit 14a0087e7236 ("ipv6: sr: switch to GFP_ATOMIC flag to allocate memory during seg6local LWT setup"). Let's revert it. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Andrea Mayer Link: https://patch.msgid.link/20250516022759.44392-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 8e5f1bb812741821e2a8ac221fba45cab6c73e43 Author: Kuniyuki Iwashima Date: Thu May 15 19:27:19 2025 -0700 ipv6: Narrow down RCU critical section in inet6_rtm_newroute(). Commit 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE.") added rcu_read_lock() covering ip6_route_info_create_nh() and __ip6_ins_rt() to guarantee that nexthop and netdev will not go away. However, as reported by syzkaller [0], ip_tun_build_state() calls dst_cache_init() with GFP_KERNEL during the RCU critical section. ip6_route_info_create_nh() fetches nexthop or netdev depending on whether RTA_NH_ID is set, and struct fib6_info holds a refcount of either of them by nexthop_get() or netdev_get_by_index(). netdev_get_by_index() looks up a dev and calls dev_hold() under RCU. So, we need RCU only around nexthop_find_by_id() and nexthop_get() ( and a few more nexthop code). Let's add rcu_read_lock() there and remove rcu_read_lock() in ip6_route_add() and ip6_route_multipath_add(). Now these functions called from fib6_add() need RCU: - inet6_rt_notify() - fib6_drop_pcpu_from() (via fib6_purge_rt()) - rt6_flush_exceptions() (via fib6_purge_rt()) - ip6_ignore_linkdown() (via rt6_multipath_rebalance()) All callers of inet6_rt_notify() need RCU, so rcu_read_lock() is added there. [0]: [ BUG: Invalid wait context ] 6.15.0-rc4-syzkaller-00746-g836b313a14a3 #0 Tainted: G W ---------------------------- syz-executor234/5832 is trying to lock: ffffffff8e021688 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0x284/0x16b0 mm/percpu.c:1782 other info that might help us debug this: context-{5:5} 1 lock held by syz-executor234/5832: 0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] 0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] 0: ffffffff8df3b860 (rcu_read_lock){....}-{1:3}, at: ip6_route_add+0x4d/0x2f0 net/ipv6/route.c:3913 stack backtrace: CPU: 0 UID: 0 PID: 5832 Comm: syz-executor234 Tainted: G W 6.15.0-rc4-syzkaller-00746-g836b313a14a3 #0 PREEMPT(full) Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4831 [inline] check_wait_context kernel/locking/lockdep.c:4903 [inline] __lock_acquire+0xbcf/0xd20 kernel/locking/lockdep.c:5185 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5866 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:746 pcpu_alloc_noprof+0x284/0x16b0 mm/percpu.c:1782 dst_cache_init+0x37/0xc0 net/core/dst_cache.c:145 ip_tun_build_state+0x193/0x6b0 net/ipv4/ip_tunnel_core.c:687 lwtunnel_build_state+0x381/0x4c0 net/core/lwtunnel.c:137 fib_nh_common_init+0x129/0x460 net/ipv4/fib_semantics.c:635 fib6_nh_init+0x15e4/0x2030 net/ipv6/route.c:3669 ip6_route_info_create_nh+0x139/0x870 net/ipv6/route.c:3866 ip6_route_add+0xf6/0x2f0 net/ipv6/route.c:3915 inet6_rtm_newroute+0x284/0x1c50 net/ipv6/route.c:5732 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6955 netlink_rcv_skb+0x219/0x490 net/netlink/af_netlink.c:2534 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x758/0x8d0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:727 ____sys_sendmsg+0x505/0x830 net/socket.c:2566 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2655 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 Fixes: 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE.") Reported-by: syzbot+bcc12d6799364500fbec@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=bcc12d6799364500fbec Reported-by: Eric Dumazet Closes: https://lore.kernel.org/netdev/CANn89i+r1cGacVC_6n3-A-WSkAa_Nr+pmxJ7Gt+oP-P9by2aGw@mail.gmail.com/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit f0a56c17e64bb5e7cdb9295df2b5fc21e4949005 Author: Kuniyuki Iwashima Date: Thu May 15 19:27:18 2025 -0700 inet: Remove rtnl_is_held arg of lwtunnel_valid_encap_type(_attr)?(). Commit f130a0cc1b4f ("inet: fix lwtunnel_valid_encap_type() lock imbalance") added the rtnl_is_held argument as a temporary fix while I'm converting nexthop and IPv6 routing table to per-netns RTNL or RCU. Now all callers of lwtunnel_valid_encap_type() do not hold RTNL. Let's remove the argument. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit f1a8d107d91db7923518abd987ddcb3cd6ea6af4 Author: Kuniyuki Iwashima Date: Thu May 15 19:27:17 2025 -0700 ipv6: Remove rcu_read_lock() in fib6_get_table(). Once allocated, the IPv6 routing table is not freed until netns is dismantled. fib6_get_table() uses rcu_read_lock() while iterating net->ipv6.fib_table_hash[], but it's not needed and rather confusing. Because some callers have this pattern, table = fib6_get_table(); rcu_read_lock(); /* ... use table here ... */ rcu_read_unlock(); [ See: addrconf_get_prefix_route(), ip6_route_del(), rt6_get_route_info(), rt6_get_dflt_router() ] and this looks illegal but is actually safe. Let's remove rcu_read_lock() in fib6_get_table() and pass true to the last argument of hlist_for_each_entry_rcu() to bypass the RCU check. Note that protection is not needed but RCU helper is used to avoid data-race. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250516022759.44392-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit fd2963e729ed69ced422c230a3f70fa6d5a5ce25 Author: Christophe JAILLET Date: Sun May 18 20:26:43 2025 +0200 scsi: target: core: Constify struct target_opcode_descriptor Instances of 'struct target_opcode_descriptor' are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 53602 19750 0 73352 11e88 drivers/target/target_core_spc.o After: ===== text data bss dec hex filename 58594 14758 0 73352 11e88 drivers/target/target_core_spc.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/889ee46e75db33e8ab997a627a1d3d651ad648db.1747592774.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen commit 7f0047cb9d42786b62f7ad91c1a17e55940d2dfb Author: Christophe JAILLET Date: Sun May 18 20:26:42 2025 +0200 scsi: target: core: Constify enabled() in struct target_opcode_descriptor Constify the first argument of the enabled() function in struct target_opcode_descriptor. This is the first step in order to constify struct target_opcode_descriptor. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4290cf1dbe100c1b1edf2ede5e5aef19b04ee7f2.1747592774.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen commit 0c52f621f5be7fa8dc04ca9382b8cdc8ff94b714 Author: Yihang Li Date: Thu May 15 09:35:04 2025 +0800 scsi: hisi_sas: Fix warning detected by sparse LKP reports below warning when building for RISC-V with randconfig configuration. drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:4554:25: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __le32 [usertype] *[assigned] ptr @@ got unsigned int * @@ Type cast to fix this warning. Fixes: 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505150705.k9ZzMxf1-lkp@intel.com/ Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20250515013504.3234016-1-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 9ad5249b37b59baaf2da1014f397c2e23b605075 Author: Shivasharan S Date: Wed May 14 02:09:41 2025 -0700 scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer Fix _ctl_get_mpt_mctp_passthru_adapter() to return the correct IOC pointer to caller based on dev_index. Signed-off-by: Shivasharan S Link: https://lore.kernel.org/r/1747213781-31545-1-git-send-email-shivasharan.srikanteshwara@broadcom.com Fixes: c72be4b5bb7c ("scsi: mpt3sas: Add support for MCTP Passthrough commands") Signed-off-by: Martin K. Petersen commit 25c2758e6e720bed930cdd03f19d8c0c97fc7522 Author: Chen Ni Date: Wed May 14 11:28:45 2025 +0800 scsi: sg: Remove unnecessary NULL check before unregister_sysctl_table() unregister_sysctl_table() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250514032845.2317700-1-nichen@iscas.ac.cn Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 53755903b9357e69b2dd6a02fafbb1e30c741895 Author: ping.gao Date: Fri May 16 16:38:12 2025 +0800 scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort() After UFS_ABORT_TASK has been processed successfully, the host will generate MCQ IRQ for ABORT TAG with response OCS_ABORTED. This results in ufshcd_compl_one_cqe() calling ufshcd_release_scsi_cmd(). But ufshcd_mcq_abort() already calls ufshcd_release_scsi_cmd(), resulting in __ufshcd_release() being called twice. This means hba->clk_gating.active_reqs will be decreased twice, making it go negative. Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort(). Fixes: f1304d442077 ("scsi: ufs: mcq: Added ufshcd_mcq_abort()") Signed-off-by: ping.gao Link: https://lore.kernel.org/r/20250516083812.3894396-1-ping.gao@samsung.com Reviewed-by: Peter Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5b1ced44692ad64a616bdb5f30894d7d337854e6 Merge: 04ff99f4b9f967 bbdf9ec61053ae Author: Jakub Kicinski Date: Tue May 20 18:36:37 2025 -0700 Merge branch 'net-bcmgenet-64bit-stats-and-expose-more-stats-in-ethtool' Zak Kemble says: ==================== net: bcmgenet: 64bit stats and expose more stats in ethtool Hi, this patchset updates the bcmgenet driver with new 64bit statistics via ndo_get_stats64 and rtnl_link_stats64, now reports hardware discarded packets in the rx_missed_errors stat and exposes more stats in ethtool. v1: https://lore.kernel.org/20250513144107.1989-1-zakkemble@gmail.com v2: https://lore.kernel.org/20250515145142.1415-1-zakkemble@gmail.com ==================== Link: https://patch.msgid.link/20250519113257.1031-1-zakkemble@gmail.com Signed-off-by: Jakub Kicinski commit bbdf9ec61053ae0e3731634905c51964d3fc43f1 Author: Zak Kemble Date: Mon May 19 12:32:57 2025 +0100 net: bcmgenet: expose more stats in ethtool Expose more per-queue and overall stats in ethtool Signed-off-by: Zak Kemble Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250519113257.1031-4-zakkemble@gmail.com Signed-off-by: Jakub Kicinski commit e985b97ac1b13e9653b326f62eab1d44cd34e203 Author: Zak Kemble Date: Mon May 19 12:32:56 2025 +0100 net: bcmgenet: count hw discarded packets in missed stat Hardware discarded packets are now counted in their own missed stat instead of being lumped in with general errors. Signed-off-by: Zak Kemble Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250519113257.1031-3-zakkemble@gmail.com Signed-off-by: Jakub Kicinski commit 59aa6e3072aa7e51e9040e8c342d0c0825c5f48f Author: Zak Kemble Date: Mon May 19 12:32:55 2025 +0100 net: bcmgenet: switch to use 64bit statistics Update the driver to use ndo_get_stats64, rtnl_link_stats64 and u64_stats_t counters for statistics. Signed-off-by: Zak Kemble Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250519113257.1031-2-zakkemble@gmail.com Signed-off-by: Jakub Kicinski commit 7727a9d414c9617e295bb3a3ca396da2268eb316 Author: Nitin Rawat Date: Thu Mar 27 13:54:28 2025 -0700 scsi: ufs: qcom: dt-bindings: Document the SM8750 UFS Controller Document the UFS Controller on the SM8750 Platform. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Signed-off-by: Nitin Rawat Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20250327-sm8750_ufs_master-v3-1-bad1f5398d0a@oss.qualcomm.com Reviewed-by: Bjorn Andersson Signed-off-by: Martin K. Petersen commit 934a5c3230b9cc0759dec5485b3e442c148a8f50 Author: Alok Tiwari Date: Sat May 17 12:24:10 2025 -0700 scsi: mvsas: Fix typos in SAS/SATA VSP register comments Correct spelling mistakes of the SAS/SATA Vendor Specific Port Registers. Fixed "Vednor" to "Vendor" in VSR_PHY_VS0 and VSR_PHY_VS1 comments. This is a non-functional change aimed at improving code clarity. Signed-off-by: Alok Tiwari Link: https://lore.kernel.org/r/20250517192422.310489-1-alok.a.tiwari@oracle.com Signed-off-by: Martin K. Petersen commit 9000f663c511cac5beb04ee49066ff2dc9f8dd4c Author: Chen Ni Date: Mon May 19 16:54:57 2025 +0800 scsi: fnic: Replace memset() with eth_zero_addr() Use eth_zero_addr() to assign the zero address to the given address array instead of memset() when second argument is address of zero. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250519085457.918720-1-nichen@iscas.ac.cn Reviewed-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit 04ff99f4b9f967bb5493f3e2b489444017b7fc8b Merge: 4c2bd7913f52b1 4ba1c5bb4811f5 Author: Jakub Kicinski Date: Tue May 20 18:17:45 2025 -0700 Merge branch 'net-phy-fixed_phy-simplifications-and-improvements' Heiner Kallweit says: ==================== net: phy: fixed_phy: simplifications and improvements This series includes two types of changes: - All callers pass PHY_POLL, therefore remove irq argument - constify the passed struct fixed_phy_status *status ==================== Link: https://patch.msgid.link/4d4c468e-300d-42c7-92a1-eabbdb6be748@gmail.com Signed-off-by: Jakub Kicinski commit 4ba1c5bb4811f560a86697311cb4e9741e047a5d Author: Heiner Kallweit Date: Sat May 17 22:37:29 2025 +0200 net: phy: fixed_phy: constify status argument where possible Constify the passed struct fixed_phy_status *status where possible. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/d1764b62-8538-408b-a4e3-b63715481a38@gmail.com Signed-off-by: Jakub Kicinski commit d23b4af5df3900fb0b4e1a05cb8119dd1c395519 Author: Heiner Kallweit Date: Sat May 17 22:35:56 2025 +0200 net: phy: fixed_phy: remove irq argument from fixed_phy_register All callers pass PHY_POLL, therefore remove irq argument from fixed_phy_register(). Note: I keep the irq argument in fixed_phy_add_gpiod() for now, for the case that somebody may want to use a GPIO interrupt in the future, by e.g. adding a call to fwnode_irq_get() to fixed_phy_get_gpiod(). Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/31cdb232-a5e9-4997-a285-cb9a7d208124@gmail.com Signed-off-by: Jakub Kicinski commit 3f1716ee0f6c63795e6d225e3f5ec3825cd2bd57 Author: Heiner Kallweit Date: Sat May 17 22:34:32 2025 +0200 net: phy: fixed_phy: remove irq argument from fixed_phy_add All callers pass PHY_POLL, therefore remove irq argument from fixed_phy_add(). Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Acked-by: Greg Ungerer Link: https://patch.msgid.link/b3b9b3bc-c310-4a54-b376-c909c83575de@gmail.com Signed-off-by: Jakub Kicinski commit 4c2bd7913f52b1e5c978edf56cdef39c30a1f603 Author: Jakub Kicinski Date: Sat May 17 13:08:10 2025 -0700 net: let lockdep compare instance locks AFAIU always returning -1 from lockdep's compare function basically disables checking of dependencies between given locks. Try to be a little more precise about what guarantees that instance locks won't deadlock. Right now we only nest them under protection of rtnl_lock. Mostly in unregister_netdevice_many() and dev_close_many(). Acked-by: Stanislav Fomichev Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250517200810.466531-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6a7e8b5d632834f2722cdabf81bd0b9eef3a214d Author: Sumanth Gavini Date: Fri May 16 20:25:33 2025 -0700 selftests: net: Fix spellings Fix "withouth" to "without" Fix "instaces" to "instances" Signed-off-by: Sumanth Gavini Reviewed-by: Andrea Mayer Link: https://patch.msgid.link/20250517032535.1176351-1-sumanth.gavini@yahoo.com Signed-off-by: Jakub Kicinski commit 20d9b73217c6109ae69679ebb28ccfaf87e55c14 Author: Sumanth Gavini Date: Fri May 16 18:59:37 2025 -0700 selftests: nci: Fix "Electrnoics" to "Electronics" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250517020003.1159640-1-sumanth.gavini@yahoo.com Signed-off-by: Jakub Kicinski commit f792709e0baad67224180d73d51c2f090003adde Author: Stanislav Fomichev Date: Fri May 16 16:22:05 2025 -0700 selftests: net: validate team flags propagation Cover three recent cases: 1. missing ops locking for the lowers during netdev_sync_lower_features 2. missing locking for dev_set_promiscuity (plus netdev_ops_assert_locked with a comment on why/when it's needed) 3. rcu lock during team_change_rx_flags Verified that each one triggers when the respective fix is reverted. Not sure about the placement, but since it all relies on teaming, added to the teaming directory. One ugly bit is that I add NETIF_F_LRO to netdevsim; there is no way to trigger netdev_sync_lower_features without it. Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20250516232205.539266-1-stfomichev@gmail.com Signed-off-by: Jakub Kicinski commit fa919a30dd471364db09d7cf6a02c487352fda4e Author: Lee Trager Date: Fri May 16 09:46:41 2025 -0700 eth: fbnic: Replace kzalloc/fbnic_fw_init_cmpl with fbnic_fw_alloc_cmpl Replace the pattern of calling and validating kzalloc then fbnic_fw_init_cmpl with a single function, fbnic_fw_alloc_cmpl. Signed-off-by: Lee Trager Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250516164804.741348-1-lee@trager.us Signed-off-by: Jakub Kicinski commit d65a74d614db264374ec60a36e01e02917f7b3c5 Merge: af295892a7abbf 26948c2430412b Author: Jakub Kicinski Date: Tue May 20 18:11:06 2025 -0700 Merge branch 'add-built-in-2-5g-ethernet-phy-support-on-mt7988' Sky Huang says: ==================== Add built-in 2.5G ethernet phy support on MT7988 From: Sky Huang This patchset adds support for built-in 2.5Gphy on MT7988, sort file and config sequence in related Kconfig and Makefile. ==================== Link: https://patch.msgid.link/20250516102327.2014531-1-SkyLake.Huang@mediatek.com Signed-off-by: Jakub Kicinski commit 26948c2430412b667fcc2302dcff15ca45b3cd52 Author: Sky Huang Date: Fri May 16 18:23:27 2025 +0800 net: phy: mediatek: add driver for built-in 2.5G ethernet PHY on MT7988 Add support for internal 2.5Gphy on MT7988. This driver will load necessary firmware and add appropriate time delay to make sure that firmware works stably. The firmware loading procedure takes about 11ms in this driver. Signed-off-by: Sky Huang Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250516102327.2014531-3-SkyLake.Huang@mediatek.com Signed-off-by: Jakub Kicinski commit 6d243c80fe9178878f4924804d35f1ed24f590cb Author: Sky Huang Date: Fri May 16 18:23:26 2025 +0800 net: phy: mediatek: Sort config and file names in Kconfig and Makefile Sort config and file names in Kconfig and Makefile in drivers/net/phy/mediatek/ in alphabetical order. Signed-off-by: Sky Huang Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250516102327.2014531-2-SkyLake.Huang@mediatek.com Signed-off-by: Jakub Kicinski commit af295892a7abbf05a3c2ba7abc4d81bb448623d6 Author: Petr Malat Date: Fri May 16 10:17:28 2025 +0200 sctp: Do not wake readers in __sctp_write_space() Function __sctp_write_space() doesn't set poll key, which leads to ep_poll_callback() waking up all waiters, not only these waiting for the socket being writable. Set the key properly using wake_up_interruptible_poll(), which is preferred over the sync variant, as writers are not woken up before at least half of the queue is available. Also, TCP does the same. Signed-off-by: Petr Malat Acked-by: Xin Long Link: https://patch.msgid.link/20250516081727.1361451-1-oss@malat.biz Signed-off-by: Jakub Kicinski commit 83d9623161283f5f6883ee3fdb88ef2177b8a5f1 Author: ChunHao Lin Date: Fri May 16 13:56:22 2025 +0800 net: phy: realtek: add RTL8127-internal PHY RTL8127-internal PHY is RTL8261C which is a integrated 10Gbps PHY with ID 0x001cc890. It follows the code path of RTL8125/RTL8126 internal NBase-T PHY. Signed-off-by: ChunHao Lin Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250516055622.3772-1-hau@realtek.com Signed-off-by: Jakub Kicinski commit 0d777aa2ca77584b339ce195db86fe0ee7dda5d5 Author: Aditya Kumar Singh Date: Tue May 20 10:06:52 2025 +0530 wifi: ath12k: fix mac pdev frequency range update The current implementation of per-pdev frequency range updates assumes that each pdev supports only a single band. As a result in ath12k_regd_update(), bands are handled using an if-else structure, which limits updates to only one of the band per pdev. This assumption does not hold for all chipsets. For example, the WCN7850 supports multiple bands within a single pdev. Hence to accommodate such cases, update the logic to account for all band cases by handling each band in a separate if conditions instead of the previous if-else structure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: 13324cecbb2c ("wifi: ath12k: Update frequency range if reg rules changes") Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250520-fix_freq_range_update-v1-1-e061fd147b87@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 08e3cc13b0d050860f41b4eaaa21c789af968b98 Author: Yury Norov Date: Wed Mar 26 11:51:58 2025 -0400 wifi: carl9170: micro-optimize carl9170_tx_shift_bm() The function calls bitmap_empty() just before find_first_bit(). Both functions are O(N). Because find_first_bit() returns >= nbits in case of empty bitmap, the bitmap_empty() test may be avoided. Signed-off-by: Yury Norov Acked-by: Christian Lamparter Link: https://patch.msgid.link/20250326155200.39895-1-yury.norov@gmail.com Signed-off-by: Jeff Johnson commit b98b70c103dec4b321864f81678d4415521750f3 Author: Wei Fang Date: Fri May 16 13:27:34 2025 +0800 net: enetc: fix the error handling in enetc4_pf_netdev_create() Fix the handling of err_wq_init and err_reg_netdev paths in enetc4_pf_netdev_create() function. Fixes: 6c5bafba347b ("net: enetc: add MAC filtering for i.MX95 ENETC PF") Signed-off-by: Wei Fang Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250516052734.3624191-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 3e3169e64e3154770f263451cc821b4c3f043cc0 Author: Hugo Villeneuve Date: Tue May 20 11:11:12 2025 -0400 dt-bindings: display: bridge: renesas,dsi: allow properties from dsi-controller Allow to inherit valid properties from the dsi-controller. This fixes the following warning when adding a panel property: rzg2lc.dtb: dsi@10850000: '#address-cells', '#size-cells', 'panel@0' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/display/bridge/renesas,dsi.yaml# Also add a panel property to the example. Signed-off-by: Hugo Villeneuve Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250520151112.3278569-1-hugo@hugovil.com Signed-off-by: Rob Herring (Arm) commit 294d4a1c79c1e83adf283cb164488cf7d9e2a257 Author: Rodrigo Gobbi Date: Wed May 14 21:00:40 2025 -0300 dt-bindings: trivial-devices: Add VZ89TE to trivial Add sgx,vz89te part number since it is similar to sgx,vz89x, which is documented in trivial-devices.yaml. Signed-off-by: Rodrigo Gobbi Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250515000225.79239-1-rodrigo.gobbi.7@gmail.com Signed-off-by: Rob Herring (Arm) commit 25b6d5def6f8d3081f69c8b73cb934942c11e63a Merge: b615ce5fbefb7d 02f5e7c1f3ea18 Author: Andrii Nakryiko Date: Tue May 20 16:22:30 2025 -0700 Merge branch 'libbpf-support-multi-split-btf' Alan Maguire says: ==================== libbpf: support multi-split BTF In discussing handling of inlines in BTF [1], one area which we may need support for in the future is multiple split BTF, where split BTF sits atop another split BTF which sits atop base BTF. This two-patch series fixes one issue discovered when testing multi-split BTF and extends the split BTF test to cover multi-split BTF also. [1] https://lore.kernel.org/dwarves/20250416-btf_inline-v1-0-e4bd2f8adae5@meta.com/ ==================== Link: https://patch.msgid.link/20250519165935.261614-1-alan.maguire@oracle.com Signed-off-by: Andrii Nakryiko commit 02f5e7c1f3ea18c99403b23b8bb400bd07b0c456 Author: Alan Maguire Date: Mon May 19 17:59:35 2025 +0100 selftests/bpf: Test multi-split BTF Extend split BTF test to cover case where we create split BTF on top of existing split BTF and add info to it; ensure that such BTF can be created and handled by searching within it, dumping/comparing to expected. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250519165935.261614-3-alan.maguire@oracle.com commit 4e29128a9acec2a622734844bedee013e2901bdf Author: Alan Maguire Date: Mon May 19 17:59:34 2025 +0100 libbpf/btf: Fix string handling to support multi-split BTF libbpf handling of split BTF has been written largely with the assumption that multiple splits are possible, i.e. split BTF on top of split BTF on top of base BTF. One area where this does not quite work is string handling in split BTF; the start string offset should be the base BTF string section length + the base BTF string offset. This worked in the past because for a single split BTF with base the start string offset was always 0. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250519165935.261614-2-alan.maguire@oracle.com commit bc8169003b41e89fe7052e408cf9fdbecb4017fe Author: Eric Biggers Date: Tue May 20 10:39:29 2025 +0800 crypto: powerpc/poly1305 - add depends on BROKEN for now As discussed in the thread containing https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the Power10-optimized Poly1305 code is currently not safe to call in softirq context. Disable it for now. It can be re-enabled once it is fixed. Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 16766292c697f31ccfc338d4040f2d5f03df777c Author: Herbert Xu Date: Tue May 20 10:35:29 2025 +0800 Revert "crypto: powerpc/poly1305 - Add SIMD fallback" This reverts commit c66d7ebbe2fa14e41913adb421090a7426f59786. Link: https://lore.kernel.org/all/02c22854-eebf-4ad1-b89e-8c2b65ab8236@csgroup.eu/ Signed-off-by: Herbert Xu commit 1c9977b263475373b31bbf86af94a5c9ae2be42c Author: Nícolas F. R. A. Prado Date: Tue May 20 17:15:58 2025 -0400 pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms Commit 3ef9f710efcb ("pinctrl: mediatek: Add EINT support for multiple addresses") introduced an access to the 'soc' field of struct mtk_pinctrl in mtk_eint_do_init() and for that an include of pinctrl-mtk-common-v2.h. However, pinctrl drivers relying on the v1 common driver include pinctrl-mtk-common.h instead, which provides another definition of struct mtk_pinctrl that does not contain an 'soc' field. Since mtk_eint_do_init() can be called both by v1 and v2 drivers, it will now try to dereference an invalid pointer when called on v1 platforms. This has been observed on Genio 350 EVK (MT8365), which crashes very early in boot (the kernel trace can only be seen with earlycon). In order to fix this, since 'struct mtk_pinctrl' was only needed to get a 'struct mtk_eint_pin', make 'struct mtk_eint_pin' a parameter of mtk_eint_do_init() so that callers need to supply it, removing mtk_eint_do_init()'s dependency on any particular 'struct mtk_pinctrl'. Fixes: 3ef9f710efcb ("pinctrl: mediatek: Add EINT support for multiple addresses") Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/20250520-genio-350-eint-null-ptr-deref-fix-v2-1-6a3ca966a7ba@collabora.com Signed-off-by: Linus Walleij commit a660d9e885d6382235a2b0e3f57d056950b3e4d2 Author: Alexander Stein Date: Wed May 14 15:13:40 2025 +0200 pinctrl: freescale: Enable driver if platform is enabled. The pinctrl drivers are not enabled in defconfig. Instead of listing each driver in the defconfig, enable then by default if the platform/soc support is enabled as well. Signed-off-by: Alexander Stein Acked-by: Esben Haabendal Link: https://lore.kernel.org/20250514131342.755840-2-alexander.stein@ew.tq-group.com Signed-off-by: Linus Walleij commit 939be10e5e51e59960ff8874be4bdfb270c58914 Author: Alexander Stein Date: Wed May 14 15:13:39 2025 +0200 pinctrl: freescale: Depend imx-scu driver on OF Although the driver itself does not depend on OF itself, it selects PINCTRL_IMX which depends on OF. So only select PINCTRL_IMX if OF is already selected to ensure dependencies are met. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/20250514131342.755840-1-alexander.stein@ew.tq-group.com Signed-off-by: Linus Walleij commit ae8b3a83fb9de394f609035041cd7a668fda2ab3 Author: Jihed Chaibi Date: Sat May 17 02:26:04 2025 +0200 rust: str: fix typo in comment Fix a typo ("then" to "than") in a comment. Signed-off-by: Jihed Chaibi Reviewed-by: Benno Lossin Fixes: fffed679eeea ("rust: str: add `Formatter` type") Link: https://lore.kernel.org/r/20250517002604.603223-1-jihed.chaibi.dev@gmail.com [ Reworded. - Miguel ] Signed-off-by: Miguel Ojeda commit 7e6f4a0a7512eca93cecff3bcb37f0ed164949a2 Author: Wolfram Sang Date: Mon May 19 13:13:14 2025 +0200 i2c: remove 'of_node' member from i2c_boardinfo There is no user of this member anymore. We can remove it. Reviewed-by: Andi Shyti Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit f67b89b6dae3e0db447bd3bbbb6c64be5beea8ee Author: Wolfram Sang Date: Mon May 19 13:13:13 2025 +0200 i2c: use only 'fwnode' for client devices No client sets 'of_node' anymore, so we don't need to handle the case in the core anymore. Reviewed-by: Andi Shyti Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 89b4fb2e61a0ca493bed6e81b048043de35dc440 Author: Wolfram Sang Date: Mon May 19 13:13:12 2025 +0200 i2c: powermac: convert of_node usage to fwnode 'of_node' in i2c_boardinfo is deprecated in favor of 'fwnode'. The I2C core handles them equally, so simply convert this driver to fwnode. Reviewed-by: Andy Shevchenko Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit ea33f91f754cb982116a8447a30b549720af3e82 Author: Benno Lossin Date: Mon May 19 16:39:51 2025 +0200 MAINTAINERS: mailmap: update Benno Lossin's email address Update Benno Lossin's email address to `@kernel.org`. Signed-off-by: Benno Lossin Link: https://lore.kernel.org/r/20250519143952.11412-1-lossin@kernel.org [ Fixed email in `.mailmap`. - Miguel ] Signed-off-by: Miguel Ojeda commit e764295a270ce733820681bada131238ab2eb81b Author: Andrea Righi Date: Thu May 15 21:11:45 2025 +0200 selftests/sched_ext: Add test for scx_bpf_select_cpu_and() via test_run Update the allowed_cpus selftest to include a check to validate the behavior of scx_bpf_select_cpu_and() when invoked via a BPF test_run call. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 4ac760bdf2b666a11ac66460bbc83c63bc9b1797 Author: Andrea Righi Date: Thu May 15 21:11:44 2025 +0200 sched_ext: idle: Allow scx_bpf_select_cpu_and() from unlocked context Allow scx_bpf_select_cpu_and() to be used from an unlocked context, in addition to ops.enqueue() or ops.select_cpu(). This enables schedulers, including user-space ones, to implement a consistent idle CPU selection policy and helps reduce code duplication. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 686d1337237161833684d8554c6e3ea2d692bd41 Author: Andrea Righi Date: Thu May 15 21:11:43 2025 +0200 sched_ext: idle: Validate locking correctness in scx_bpf_select_cpu_and() Validate locking correctness when accessing p->nr_cpus_allowed and p->cpus_ptr inside scx_bpf_select_cpu_and(): if the rq lock is held, access is safe; otherwise, require that p->pi_lock is held. This allows to catch potential unsafe calls to scx_bpf_select_cpu_and(). Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 617a77018f683905ed4e8cd693df51243908353f Author: Andrea Righi Date: Thu May 15 21:11:42 2025 +0200 sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c Relocate the scx_kf_allowed_if_unlocked(), so it can be used from other source files (e.g., ext_idle.c). No functional change. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 3a453297582f066f1fc8acc287c7633b21bb12cc Author: Shashank Balaji Date: Tue May 20 23:07:46 2025 +0900 sched_ext, docs: add label Signed-off-by: Shashank Balaji Signed-off-by: Tejun Heo commit a9b33aae79cea2e55fd9204069a29b2e59f012a5 Author: Sumanth Gavini Date: Fri May 16 18:17:22 2025 -0700 selftests: seccomp: Fix "performace" to "performance" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Link: https://lore.kernel.org/r/20250517011725.1149510-1-sumanth.gavini@yahoo.com Signed-off-by: Kees Cook commit c4f8ac095fc91084108ec21117eb9c1fff64725d Merge: 7c1a9408ce5f34 276c53c66e032c Author: Dave Airlie Date: Wed May 21 05:49:31 2025 +1000 Merge tag 'nova-next-v6.16-2025-05-20' of https://gitlab.freedesktop.org/drm/nova into drm-next Nova changes for v6.16 auxiliary: - bus abstractions - implementation for driver registration - add sample driver drm: - implement __drm_dev_alloc() - DRM core infrastructure Rust abstractions - device, driver and registration - DRM IOCTL - DRM File - GEM object - IntoGEMObject rework - generically implement AlwaysRefCounted through IntoGEMObject - refactor unsound from_gem_obj() into as_ref() - refactor into_gem_obj() into as_raw() driver-core: - merge topic/device-context-2025-04-17 from driver-core tree - implement Devres::access() - fix: doctest build under `!CONFIG_PCI` - accessor for Device::parent() - fix: conditionally expect `dead_code` for `parent()` - impl TryFrom<&Device> bus devices (PCI, platform) nova-core: - remove completed Vec extentions from task list - register auxiliary device for nova-drm - derive useful traits for Chipset - add missing GA100 chipset - take &Device in Gpu::new() - infrastructure to generate register definitions - fix register layout of NV_PMC_BOOT_0 - move Firmware into own (Rust) module - fix: select AUXILIARY_BUS nova-drm: - initial driver skeleton (depends on drm and auxiliary bus abstractions) - fix: select AUXILIARY_BUS Rust (dependencies): - implement Opaque::zeroed() - implement Revocable::try_access_with() - implement Revocable::access() From: Danilo Krummrich Link: https://lore.kernel.org/r/aCxAf3RqQAXLDhAj@cassiopeiae commit dfab90b9580c2fbc4e8bb4ceee97cdd75832a6e7 Author: Heiko Stuebner Date: Mon May 19 00:04:48 2025 +0200 arm64: dts: rockchip: move rk3562 pinctrl node outside the soc node The non-mmio pinctrl node is not supposed to be inside the soc simple-bus as dtc points out: ../arch/arm64/boot/dts/rockchip/rk3562.dtsi:1115.20-1181.5: Warning (simple_bus_reg): /soc/pinctrl: missing or empty reg/ranges property Move the pinctrl node outside and adapt the indentation. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-7-heiko@sntech.de commit 25d3e1d2558caf823902e3b1b83901f5ac65af8d Author: Heiko Stuebner Date: Mon May 19 00:04:47 2025 +0200 arm64: dts: rockchip: fix rk3562 pcie unit addresses The rk3562 pcie node currently uses the apb register as its unit address which is the second reg area defined in the binding. As can be seen by the dtc warnings like ../arch/arm64/boot/dts/rockchip/rk3562.dtsi:624.26-675.5: Warning (simple_bus_reg): /soc/pcie@ff500000: simple-bus unit address format error, expected "fe000000" using the first reg area as the unit address seems to be preferred. This is the dbi area per the binding, so adapt the unit address accordingly and move the nodes to their new position. With the move also move the reg + reg-names below the compatible, as is the preferred position. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-6-heiko@sntech.de commit 7d086f78fe09fb94eb3b2e12436f2feed21d9c1e Author: Heiko Stuebner Date: Mon May 19 00:04:46 2025 +0200 arm64: dts: rockchip: move rk3528 pinctrl node outside the soc node The non-mmio pinctrl node is not supposed to be inside the soc simple-bus as dtc points out: ../arch/arm64/boot/dts/rockchip/rk3528.dtsi:870.20-936.5: Warning (simple_bus_reg): /soc/pinctrl: missing or empty reg/ranges property Move the pinctrl node outside and adapt the indentation. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-5-heiko@sntech.de commit f8b11d8cfbfc8a0232c1e7cc6af10583c8bdb3f1 Author: Heiko Stuebner Date: Mon May 19 00:04:45 2025 +0200 arm64: dts: rockchip: remove a double-empty line from rk3576 core dtsi Two empty lines between nodes, is one too many. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-4-heiko@sntech.de commit 8ff721f60257d550daf524fc559c0f0d2176b198 Author: Heiko Stuebner Date: Mon May 19 00:04:44 2025 +0200 arm64: dts: rockchip: move rk3576 pinctrl node outside the soc node The non-mmio pinctrl node is not supposed to be inside the soc simple-bus as dtc points out: ../arch/arm64/boot/dts/rockchip/rk3576.dtsi:2351.20-2417.5: Warning (simple_bus_reg): /soc/pinctrl: missing or empty reg/ranges property Move the pinctrl node outside and adapt the indentation. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505150745.PQT9TLYX-lkp@intel.com/ Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-3-heiko@sntech.de commit 4d2587e0e1ce7145a38802fa281f4f1f411ec56f Author: Heiko Stuebner Date: Mon May 19 00:04:43 2025 +0200 arm64: dts: rockchip: fix rk3576 pcie unit addresses The rk3576 pcie nodes currently use the apb register as their unit address which is the second reg area defined in the binding. As can be seen by the dtc warnings like ../arch/arm64/boot/dts/rockchip/rk3576.dtsi:1346.24-1398.5: Warning (simple_bus_reg): /soc/pcie@2a200000: simple-bus unit address format error, expected "22000000" ../arch/arm64/boot/dts/rockchip/rk3576.dtsi:1400.24-1452.5: Warning (simple_bus_reg): /soc/pcie@2a210000: simple-bus unit address format error, expected "22400000" using the first reg area as the unit address seems to be preferred. This is the dbi area per the binding, so adapt the unit address accordingly and move the nodes to their new position. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505150745.PQT9TLYX-lkp@intel.com/ Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250518220449.2722673-2-heiko@sntech.de commit 6e0f32da68fac556327666f8f81dfae7405d1c25 Author: Diederik de Haas Date: Mon May 19 12:18:28 2025 +0200 arm64: dts: rockchip: Drop assigned-clock* from cpu nodes on rk3588 The assigned-clocks and assigned-clock-rates properties were moved from the scmi_clk node onto cpu nodes in commit 87810bda8a84 ("arm64: dts: rockchip: Fix SCMI assigned clocks on rk3588s") During review of v1 of that patch set, the following comment was made: why aren't you using OPP tables to define CPU frequencies. Assigned-clocks looks like a temporary hack because you haven't done proper OPP tables. Some time later, proper OPP tables for rk3588 were added in commit 276856db91b4 ("arm64: dts: rockchip: Add OPP data for CPU cores on RK3588") So this 'temporary hack' is no longer needed. Dropping it fixes the following dtb validation issues: cpu@0: Unevaluated properties are not allowed ('assigned-clock-rates', 'assigned-clocks' were unexpected) cpu@400: Unevaluated properties are not allowed ('assigned-clock-rates', 'assigned-clocks' were unexpected) cpu@600: Unevaluated properties are not allowed ('assigned-clock-rates', 'assigned-clocks' were unexpected) Link: https://lore.kernel.org/linux-rockchip/CAL_JsqL_EogoKOQ1xwU75=rJSC4o7yV3Jej4vadtacX2Pt3-hw@mail.gmail.com/ Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250519101909.62754-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit ede1fa1384c230c9823f6bf1849cf50c5fc8a83e Author: Sebastian Reichel Date: Tue May 20 13:14:27 2025 +0200 arm64: dts: rockchip: Add missing SFC power-domains to rk3576 Add the power-domains for the RK3576 SFC nodes according to the TRM part 1. This fixes potential SErrors when accessing the SFC registers without other peripherals (e.g. eMMC) doing a prior power-domain enable. For example this is easy to trigger on the Rock 4D, which enables the SFC0 interface, but does not enable the eMMC interface at the moment. Cc: stable@vger.kernel.org Fixes: 36299757129c8 ("arm64: dts: rockchip: Add SFC nodes for rk3576") Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250520-rk3576-fix-fspi-pmdomain-v1-1-f07c6e62dadd@kernel.org Signed-off-by: Heiko Stuebner commit 7acd1b315cdcc03b11a3aa1f9c9c85d99ddb4f0e Author: Ritesh Harjani (IBM) Date: Mon May 19 23:49:30 2025 +0530 ext4: Add a WARN_ON_ONCE for querying LAST_IN_LEAF instead We added the documentation in ext4_map_blocks() for usage of EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF flag. But It's better to add a WARN_ON_ONCE in case if anyone tries using this flag with CREATE to avoid a random issue later. Since depth can change with CREATE and it needs to be re-calculated before using it in there. Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Ojaswin Mujoo Link: https://patch.msgid.link/ee6e82a224c50b432df9ce1ce3333c50182d8473.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 618320daa9673ce2b6adae5ad6fbf16e878ff6c9 Author: Ritesh Harjani (IBM) Date: Mon May 19 23:49:29 2025 +0530 ext4: Simplify flags in ext4_map_query_blocks() Now that we have EXT4_EX_QUERY_FILTER mask, let's use that to simplify the filtering of flags for passing to ext4_ext_map_blocks() in ext4_map_query_blocks() function. This allows us to kill the query_flags local variable which is not needed anymore. Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/4ae735e83e6f43341e53e2d289e59156a8360134.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 9597376bdb6e5830448ba40aacd3ebd705fe35cc Author: Ritesh Harjani (IBM) Date: Mon May 19 23:49:28 2025 +0530 ext4: Rename and document EXT4_EX_FILTER to EXT4_EX_QUERY_FILTER Rename EXT4_EX_FILTER to EXT4_EX_QUERY_FILTER to better describe its purpose as a filter mask used specifically in ext4_map_query_blocks(). Add a comment explaining that this macro is used to filter flags needed when querying the on-disk extent tree. We will later use EXT4_EX_QUERY_FILTER mask to add another EXT4_GET_BLOCKS_QUERY needed to lookup in on-disk extent tree. Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/51f05d0ba286372eb8693af95bd4b10194b53141.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 797ac3ca24ca1af396e84d16c79c523cfefe1737 Author: Ritesh Harjani (IBM) Date: Mon May 19 23:49:27 2025 +0530 ext4: Simplify last in leaf check in ext4_map_query_blocks This simplifies the check for last in leaf in ext4_map_query_blocks() and fixes this cocci warning. cocci warnings: (new ones prefixed by >>) >> fs/ext4/inode.c:573:49-51: WARNING !A || A && B is equivalent to !A || B Fixes: 5bb12b1837c0 ("ext4: Add support for EXT4_GET_BLOCKS_QUERY_LEAF_BLOCKS") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505191524.auftmOwK-lkp@intel.com/ Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Ojaswin Mujoo Link: https://patch.msgid.link/5fd5c806218c83f603c578c95997cf7f6da29d74.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 3be4bb7e71477c0b9708bd6f1975db0ffc72cce4 Author: Ritesh Harjani (IBM) Date: Mon May 19 23:49:26 2025 +0530 ext4: Unwritten to written conversion requires EXT4_EX_NOCACHE This fixes the atomic write patch series after it was rebased on top of extent status cache cleanup series i.e. 'commit 402e38e6b71f57 ("ext4: prevent stale extent cache entries caused by concurrent I/O writeback")' After the above series, EXT4_GET_BLOCKS_IO_CONVERT_EXT flag which has EXT4_GET_BLOCKS_IO_SUBMIT flag set, requires that the io submit context of any kind should pass EXT4_EX_NOCACHE to avoid caching unncecessary extents in the extent status cache. This patch fixes that by adding the EXT4_EX_NOCACHE flag in ext4_convert_unwritten_extents_atomic() for unwritten to written conversion calls to ext4_map_blocks(). Fixes: b86629c2b299 ("ext4: Add multi-fsblock atomic write support with bigalloc") Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Ojaswin Mujoo Link: https://patch.msgid.link/ea0ad9378ff6d31d73f4e53f87548e3a20817689.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 5779f6f9a64ffc3e002a37ab1f78521d9a5c0100 Author: Beleswar Padhi Date: Tue May 13 11:15:10 2025 +0530 remoteproc: k3: Refactor release_tsp() functions into common driver The release_tsp() implementations in the TI K3 R5, DSP and M4 remoteproc drivers release the TI-SCI processor control of a remote processor, which is auto triggered upon device removal. Refactor these functions into ti_k3_common.c driver as k3_release_tsp() and use this common function throughout in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-37-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit c52d5f1d2aaca18b57b71d1c146e03fd08bbd91a Author: Beleswar Padhi Date: Tue May 13 11:15:09 2025 +0530 remoteproc: k3: Refactor reserved_mem_init() functions into common driver The reserved_mem_init() implementations in the R5, DSP and M4 remoteproc drivers initialize the reserved memory regions associated with the remote processor. Refactor these functions into the ti_k3_common.c driver as k3_reserved_mem_init() and use this common function throughout in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-36-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 744270b336c70b6f063b51db0241bc428e8b34e9 Author: Beleswar Padhi Date: Tue May 13 11:15:08 2025 +0530 remoteproc: k3: Refactor mem_release() functions into common driver The mem_release() implementations in the TI K3 R5, DSP and M4 remoteproc drivers release the reserved memory of the device, which get auto triggered upon device removal. Refactor these functions into ti_k3_common.c driver as k3_mem_release() and use this common function in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-35-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit c1724028012999910130165645705cf7df52a7ae Author: Beleswar Padhi Date: Tue May 13 11:15:07 2025 +0530 remoteproc: k3: Refactor of_get_memories() functions into common driver The of_get_memories() implementations in the TI K3 R5, DSP and M4 remoteproc drivers initialize and assign memory regions used by the remote processor in the same way. Refactor these implementations into ti_k3_common.c driver as k3_rproc_of_get_memories() use this common function for mem initialization in R5, DSP and M4 drivers. Note: The TCM addresses for R5 core are configurable based on the 'loczrama' setting. Therefore, override the bus_addr assignment done by the common function for TCMs of R5 remote processors by reading the 'loczrama' DT property in k3_r5_core_of_get_internal_memories(). Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-34-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 9179f8bfa98d1b0a30f4d75f4d695e7b4a3c9847 Author: Beleswar Padhi Date: Tue May 13 11:15:06 2025 +0530 remoteproc: k3: Refactor .da_to_va rproc ops into common driver The .da_to_va rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers return the Kernel virtual address for a corresponding rproc device address. Refactor the implementations into the ti_k3_common.c driver as k3_rproc_da_to_va and use this common function for address translation of DDR and internal memory regions in R5, DSP and M4 drivers. Note: The R5 SRAM memory translations are still handled in the .da_to_va ops of the R5 remoteproc driver. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-33-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 1d7f38dde722f8ba4a0ade6256edf7731402804a Author: Beleswar Padhi Date: Tue May 13 11:15:05 2025 +0530 remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driver The .get_loaded_rsc_table rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers return a pointer to the resource table that was pre-loaded at the base address of the DDR region reserved for firmware usage. Refactor the implementations into ti_k3_common.c driver as k3_get_loaded_rsc_table() and register this common function as .get_loaded_rsc_table ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-32-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 8715d4c04a5e4a7aae8d2fbe0fae19dad01bb1d0 Author: Beleswar Padhi Date: Tue May 13 11:15:04 2025 +0530 remoteproc: k3: Refactor .detach rproc ops into common driver The .detach rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers are NOPs. Refactor the implementations into ti_k3_common.c driver as k3_rproc_detach() and register this common function as .detach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-31-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 80e8a868c90ed03228510a669449c8e4999436fd Author: Beleswar Padhi Date: Tue May 13 11:15:03 2025 +0530 remoteproc: k3: Refactor .attach rproc ops into common driver The .attach rproc ops implementations in TI K3 R5, DSP and M4 drivers are NOPs. Refactor the implementations into ti_k3_common.c driver as k3_rproc_attach() and register this common function as .attach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-30-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit bbd0f6490b23ccebde8eb76c7f6dbc8d2e6ddf95 Author: Beleswar Padhi Date: Tue May 13 11:15:02 2025 +0530 remoteproc: k3: Refactor .stop rproc ops into common driver The .stop rproc ops implementations in TI K3 DSP and M4 remoteproc drivers put the remote processor into reset. Refactor the implementations into ti_k3_common.c driver as k3_rproc_stop() and register this common function as .stop ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-29-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit f55ab2fa244441b986cf57382b0e3fead91803f8 Author: Beleswar Padhi Date: Tue May 13 11:15:01 2025 +0530 remoteproc: k3: Refactor .start rproc ops into common driver The k3_dsp_rproc_start() function sets the boot vector and releases the reset on the remote processor. Whereas, the k3_m4_rproc_start() function only needs to release the reset. Refactor the k3_m4_rproc_start() into ti_k3_common.c as k3_rproc_start() and align the DSP and M4 drivers to invoke this common function when releasing the reset on the remote processor. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-28-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 3059abb7d3653f3be0a91259940ac58d321a319d Author: Beleswar Padhi Date: Tue May 13 11:15:00 2025 +0530 remoteproc: k3: Refactor .unprepare rproc ops into common driver The .unprepare rproc ops implementations in TI K3 DSP and M4 remoteproc drivers assert the module reset on the remote processor. Refactor the implementations into ti_k3_common.c driver as k3_rproc_unprepare() and register this common function as .unprepare ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-27-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit de277002ff14584aa1de96d893370a45b2824e70 Author: Beleswar Padhi Date: Tue May 13 11:14:59 2025 +0530 remoteproc: k3: Refactor .prepare rproc ops into common driver The .prepare rproc ops implementations in TI K3 DSP and M4 remoteproc drivers deasserts the local and module reset of the processor to allow firmware loading into internal memory. Refactor the implementations into the ti_k3_common.c driver as k3_rproc_prepare() and register this common function as .prepare ops in the DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-26-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit b80151c41ac53c19a10ccac8ff1b24bf08b17e5f Author: Beleswar Padhi Date: Tue May 13 11:14:58 2025 +0530 remoteproc: k3-dsp: Assert local reset during .prepare callback The ti_k3_dsp_remoteproc.c driver asserts the local reset in probe and releases the module reset in .prepare callback. This is done to ensure the core does not execute bogus code when module reset is deasserted. Put both of these operations together in .prepare callback, which is more suitable as it ensures local reset is asserted for subsequent core start operations from sysfs. This is done to align the .prepare callback of DSP with the M4 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-25-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 41d746b3423aea5f9f5b8ca5a7368515d9f1fe68 Author: Beleswar Padhi Date: Tue May 13 11:14:57 2025 +0530 remoteproc: k3-dsp: Don't override rproc ops in IPC-only mode Currently, the driver overrides the rproc ops when booting in IPC-only mode. Remove these overrides and register the ops unconditionally. This requires to have IPC-only mode checks in the .prepare and .unprepare ops and returning early. The other rproc ops are invoked when booting either in IPC-only mode or in remoteproc mode but not both. This is done to align the rproc ops implementations of DSP driver with M4 driver and can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-24-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 6fdad99c94d721182100071be02873f2b41b6490 Author: Beleswar Padhi Date: Tue May 13 11:14:56 2025 +0530 remoteproc: k3: Refactor rproc_request_mbox() implementations into common driver The rproc_request_mbox() implementations in TI K3 R5, DSP and M4 remoteproc drivers acquire the mailbox channel and send the same message through the acquired channel. Refactor the above function into the ti_k3_common.c driver as k3_rproc_request_mbox() and use it throughout R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-23-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 67de5d0e6d65ef2016650e2e5c05153a3376fb61 Author: Beleswar Padhi Date: Tue May 13 11:14:55 2025 +0530 remoteproc: k3-m4: Ping the mbox while acquiring the channel The TI K3 M4 remoteproc driver acquires the mailbox channel in probe but sends a message through the acquired channel later in .attach()/.start() callbacks. Put both the things together in the form of 'k3_m4_rproc_request_mbox()' function and invoke that in the probe routine. This is done to align the rproc_request_mbox() implementation with R5 and DSP drivers which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-22-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 23e16e210befaf2ce48feec25c11ce5b89f16039 Author: Beleswar Padhi Date: Tue May 13 11:14:54 2025 +0530 remoteproc: k3: Refactor rproc_release() implementation into common driver The rproc_release() implementations in TI K3 DSP and M4 remoteproc drivers deassert reset in the same way. Refactor the above function into the ti_k3_common.c driver as k3_rproc_release() and use it throughout DSP and M4 drivers for releasing the reset from the remote processor. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-21-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 3b8127fc51eb9254551b465bd6eec7ef94a3dc90 Author: Beleswar Padhi Date: Tue May 13 11:14:53 2025 +0530 remoteproc: k3-m4: Introduce central function to release rproc from reset Currently, the TI K3 M4 remoteproc driver assumes all of the M4 devices have local resets. Even though its true for all existing M4 devices, keep room for future devices which possibly may not have local resets and only have a module reset. Therefore introduce a central function, k3_m4_rproc_release() which handles both type of devices (with and without local resets), and use it throughout the driver to release the remote processor from reset. Also, for devices with local reset, Assert the module reset back in case the local reset deassert operation failed. This is done to align the reset release implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-20-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 334a841e33f41ef22ad7b33f77902a41c76117be Author: Beleswar Padhi Date: Tue May 13 11:14:52 2025 +0530 remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets The k3_dsp_rproc_release() function erroneously deasserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly deassert only the global reset for devices that do not have a local reset. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-19-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit af5af3a417a1b4a7790bc06caa4d8ff158da45e8 Author: Beleswar Padhi Date: Tue May 13 11:14:51 2025 +0530 remoteproc: k3: Refactor rproc_reset() implementation into common driver The rproc_reset() implementations in TI K3 DSP and M4 remoteproc drivers assert reset in the same way. Refactor the above function into the ti_k3_common.c driver as k3_rproc_reset() and use it throughout DSP and M4 drivers for resetting the remote processor. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-18-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit ca8921f44c9464ba0ee285f1e616279ca30fa710 Author: Beleswar Padhi Date: Tue May 13 11:14:50 2025 +0530 remoteproc: k3-m4: Introduce central function to put rproc into reset Currently, the TI K3 M4 remoteproc driver assumes all of the M4 devices have local resets. Even though its true for all existing M4 devices, keep room for future devices which possibly may not have local resets and only have a module reset. Therefore introduce a central function, k3_m4_rproc_reset() which handles both type of devices (with and without local resets), and use it throughout the driver to put the remote processor into reset. This is done to align the reset implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-17-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 754d13dfe263c704b9c2e3cd86cc37cf877a0789 Author: Beleswar Padhi Date: Tue May 13 11:14:49 2025 +0530 remoteproc: k3-dsp: Correct Reset logic for devices without lresets The k3_dsp_rproc_reset() function erroneously asserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly assert the local reset for devices that support it and only the global reset for those that do not. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-16-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 9352aadafe4d2994359da3bdb96a3247e64715cd Author: Beleswar Padhi Date: Tue May 13 11:14:48 2025 +0530 remoteproc: k3: Refactor .kick rproc ops into common driver The .kick rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers sends a mailbox message to the remote processor in the same way. Refactor the implementations into a common function 'k3_rproc_kick()' in the ti_k3_common.c driver. Signed-off-by: Beleswar Padhi Acked-by: Andrew Davis Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-15-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 95dac7e212a5932b3ed8b1db95343df54b4ade15 Author: Beleswar Padhi Date: Tue May 13 11:14:47 2025 +0530 remoteproc: k3: Refactor mailbox rx_callback functions into common driver The mailbox .rx_callback implementations in TI K3 R5, DSP and M4 remoteproc drivers handle inbound mailbox messages in the same way. Introduce a common driver 'ti_k3_common.c' and refactor the implementations into a common function 'k3_rproc_mbox_callback'() in it. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-14-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit fa2399cbb35ad11323ef90d00bdc59cc33e5465d Author: Beleswar Padhi Date: Tue May 13 11:14:46 2025 +0530 remoteproc: k3: Refactor shared data structures The TI K3 R5, DSP and M4 remoteproc drivers share the same data structure definitions. Refactor the shared data structures into a new common header file, 'ti_k3_common.h', and update the drivers to use the unified data structures. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-13-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 52a04c1c61c6487871734bd8dc3ee56df458b821 Author: Beleswar Padhi Date: Tue May 13 11:14:45 2025 +0530 remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory info The ti_k3_m4_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_rproc_mem_data structure to store memory information. This aligns with DSP and R5 drivers, and can be refactored out later. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-12-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit b810142db6f978253d7468258b3132a2799547f7 Author: Beleswar Padhi Date: Tue May 13 11:14:44 2025 +0530 remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rproc Add a pointer to the rproc struct within k3_m4_rproc internal struct. This is done to align the M4 internal rproc data structure with R5 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-11-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit db47cfd8fc1ffb0832c899750aca5661a3475f1c Author: Beleswar Padhi Date: Tue May 13 11:14:43 2025 +0530 remoteproc: k3-{m4/dsp}: Add a void ptr member in rproc internal struct Introduce a void pointer in the k3_{m4/dsp}_rproc internal data structure which can be used to point to any private data needed by the driver. Currently, the M4/DSP drivers do not have any private data, so the pointer can be left pointing to NULL. This is done to align the data structures with R5 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-10-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 02074bf5e27a17cd7d4cf55fbefd010f6d97be3c Author: Beleswar Padhi Date: Tue May 13 11:14:42 2025 +0530 remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory info The ti_k3_r5_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_r5_rproc_mem_data structure to store memory information. This aligns with K3 DSP and M4 drivers, and can be refactored out later. Signed-off-by: Beleswar Padhi Reviewed-by: Andrew Davis Tested-by: Judith Mendez Link: https://lore.kernel.org/r/20250513054510.3439842-9-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 95cd198a64272ddeaebbbdd330b56daa7421fad6 Author: Beleswar Padhi Date: Tue May 13 11:14:41 2025 +0530 remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4 Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv data structure of the R5 remote processor with that of the DSP and M4, move the above members from k3_r5_core to k3_r5_rproc struct. Additionally, introduce a void *priv pointer in k3_r5_rproc that can be typecasted to point to the k3_r5_core structure. This abstraction is done to ensure common functionalities across R5, DSP and M4 drivers can be refactored at a later stage. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-8-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 11d35a94d5914c31169dc0655a2de6df705ab6f4 Author: Beleswar Padhi Date: Tue May 13 11:14:40 2025 +0530 remoteproc: k3-r5: Re-order k3_r5_release_tsp() function The TI-SCI processor control handle, 'tsp', will be refactored from k3_r5_core struct into k3_r5_rproc struct in a future commit. So, the 'tsp' pointer will be initialized inside k3_r5_cluster_rproc_init() now. Move the k3_r5_release_tsp() function, which releases the tsp handle, above k3_r5_cluster_rproc_init(), so that the later can register the former as a devm action. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-7-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit b9229c0732f3f4bd9cd7470bdccd995ff803c73e Author: Beleswar Padhi Date: Tue May 13 11:14:39 2025 +0530 remoteproc: k3-r5: Re-order internal memory initialization functions The internal memory struct pointer, 'mem', will be refactored from k3_r5_core struct into k3_r5_rproc struct in a future commit. Therefore, move the internal memory initialization function, k3_r5_core_of_get_internal_memories() above k3_r5_cluster_rproc_init() so that the former can be invoked by the later. While at it, also re-order the k3_r5_core_of_get_sram_memories() to keep all the internal memory initialization functions at one place. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-6-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 23532524594c211871054a15c425812a4ac35102 Author: Beleswar Padhi Date: Tue May 13 11:14:38 2025 +0530 remoteproc: k3-m4: Don't assert reset in detach routine The rproc_detach() function invokes __rproc_detach() before rproc_unprepare_device(). The __rproc_detach() function sets the rproc->state to "RPROC_DETACHED". However, the TI K3 M4 driver erroneously looks for "RPROC_ATTACHED" state in its .unprepare ops to identify IPC-only mode; which leads to resetting the rproc in detach routine. Therefore, correct the IPC-only mode detection logic to look for "RPROC_DETACHED" in k3_m4_rproc_unprepare() function. Fixes: ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem") Signed-off-by: Beleswar Padhi Reviewed-by: Hari Nagalla Reviewed-by: Martyn Welch Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250513054510.3439842-5-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 701177511abd295e0fc2499796e466d8ff12165c Author: Beleswar Padhi Date: Tue May 13 11:14:37 2025 +0530 remoteproc: k3-r5: Refactor sequential core power up/down operations The existing implementation of the waiting mechanism in "k3_r5_cluster_rproc_init()" waits for the "released_from_reset" flag to be set as part of the firmware boot process in "k3_r5_rproc_start()". The "k3_r5_cluster_rproc_init()" function is invoked in the probe routine which causes unexpected failures in cases where the firmware is unavailable at boot time, resulting in probe failure and removal of the remoteproc handles in the sysfs paths. To address this, the waiting mechanism is refactored out of the probe routine into the appropriate "k3_r5_rproc_{prepare/unprepare}()" functions. This allows the probe routine to complete without depending on firmware booting, while still maintaining the required power-synchronization between cores. Further, this wait mechanism is dropped from "k3_r5_rproc_{start/stop}()" functions as they deal with Core Run/Halt operations, and as such, there is no constraint in Running or Halting the cores of a cluster in order. Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before powering up core1") Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-4-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 349d62ab207f55f039c3ddb40b36e95c2f0b3ed0 Author: Siddharth Vadapalli Date: Tue May 13 11:14:36 2025 +0530 remoteproc: k3-dsp: Drop check performed in k3_dsp_rproc_{mbox_callback/kick} Commit ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during probe routine") introduced a check in the "k3_dsp_rproc_mbox_callback()" and "k3_dsp_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is responsible for attaching to a remote core, updates the state of the remote core to "RPROC_ATTACHED" only after invoking "rproc_start_subdevices()". The "rproc_start_subdevices()" function triggers the probe of the Virtio RPMsg devices associated with the remote core, which require that the "k3_dsp_rproc_kick()" and "k3_dsp_rproc_mbox_callback()" callbacks are functional. Hence, drop the check in the callbacks. Fixes: ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during probe routine") Signed-off-by: Siddharth Vadapalli Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-3-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 9995dbfc2235efabdb3759606d522e1a7ec3bdcb Author: Siddharth Vadapalli Date: Tue May 13 11:14:35 2025 +0530 remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick} Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is responsible for attaching to a remote core, updates the state of the remote core to "RPROC_ATTACHED" only after invoking "rproc_start_subdevices()". The "rproc_start_subdevices()" function triggers the probe of the Virtio RPMsg devices associated with the remote core, which require that the "k3_r5_rproc_kick()" and "k3_r5_rproc_mbox_callback()" callbacks are functional. Hence, drop the check in the callbacks. Fixes: f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") Signed-off-by: Siddharth Vadapalli Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250513054510.3439842-2-b-padhi@ti.com Signed-off-by: Mathieu Poirier commit 6f1a182a8750a679698366b021969a57ec589313 Author: Ming Lei Date: Tue May 20 12:54:36 2025 +0800 selftests: ublk: add test for covering UBLK_AUTO_BUF_REG_FALLBACK Add test for covering UBLK_AUTO_BUF_REG_FALLBACK: - pass '--auto_zc_fallback' to null target, which requires both F_AUTO_BUF_REG and F_SUPPORT_ZERO_COPY for handling UBLK_AUTO_BUF_REG_FALLBACK - add ->buf_index() method for returning invalid buffer index to trigger UBLK_AUTO_BUF_REG_FALLBACK - add generic_09 for running the test - add --auto_zc_fallback test in stress_03/stress_04/stress_05 Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-7-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 8ccebc19ee3db03284504d340e5cd2de4141350b Author: Ming Lei Date: Tue May 20 12:54:35 2025 +0800 selftests: ublk: support UBLK_F_AUTO_BUF_REG Enable UBLK_F_AUTO_BUF_REG support for ublk utility by argument `--auto_zc`, meantime support this feature in null, loop and stripe target code. Add function test generic_08 for covering basic UBLK_F_AUTO_BUF_REG feature. Also cover UBLK_F_AUTO_BUF_REG in stress_03, stress_04 and stress_05 test too. 'fio/t/io_uring -p0 /dev/ublkb0' shows that F_AUTO_BUF_REG can improve IOPS by 50% compared with F_SUPPORT_ZERO_COPY in my test VM. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-6-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 53f427e7944b4f288866cc4a69835086e0958c6a Author: Ming Lei Date: Tue May 20 12:54:34 2025 +0800 ublk: support UBLK_AUTO_BUF_REG_FALLBACK For UBLK_F_AUTO_BUF_REG, buffer is registered to uring_cmd context automatically with the provided buffer index. User may provide one wrong buffer index, or the specified buffer is registered by application already. Add UBLK_AUTO_BUF_REG_FALLBACK for supporting to auto buffer registering fallback by completing the uring_cmd and telling ublk server the register failure via UBLK_AUTO_BUF_REG_FALLBACK, then ublk server still can register the buffer from userspace. So we can provide reliable way for supporting auto buffer register. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-5-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 99c1e4eb6a3fbbec27c7c70e5fce15cdc1422893 Author: Ming Lei Date: Tue May 20 12:54:33 2025 +0800 ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG Add UBLK_F_AUTO_BUF_REG for supporting to register buffer automatically to local io_uring context with provided buffer index. Add UAPI structure `struct ublk_auto_buf_reg` for holding user parameter to register request buffer automatically, one 'flags' field is defined, and there is still 32bit available for future extension, such as, adding one io_ring FD field for registering buffer to external io_uring. `struct ublk_auto_buf_reg` is populated from ublk uring_cmd's sqe->addr, and all existing ublk commands are data-less, so it is just fine to reuse sqe->addr for this purpose. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-4-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 9e6b4756b35426801cae84a5a1d7a3e0d480d197 Author: Ming Lei Date: Tue May 20 12:54:32 2025 +0800 ublk: prepare for supporting to register request buffer automatically UBLK_F_SUPPORT_ZERO_COPY requires ublk server to issue explicit buffer register/unregister uring_cmd for each IO, this way is not only inefficient, but also introduce dependency between buffer consumer and buffer register/ unregister uring_cmd, please see tools/testing/selftests/ublk/stripe.c in which backing file IO has to be issued one by one by IOSQE_IO_LINK. Prepare for adding feature UBLK_F_AUTO_BUF_REG for addressing the existing zero copy limitation: - register request buffer automatically to ublk uring_cmd's io_uring context before delivering io command to ublk server - unregister request buffer automatically from the ublk uring_cmd's io_uring context when completing the request - io_uring will unregister the buffer automatically when uring is exiting, so we needn't worry about accident exit For using this feature, ublk server has to create one sparse buffer table Reviewed-by: Caleb Sander Mateos Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit b1c3b4695a4d5f7a3bf43f1f7eb774bfa79b86a7 Author: Ming Lei Date: Tue May 20 12:54:31 2025 +0800 ublk: convert to refcount_t Convert to refcount_t and prepare for supporting to register bvec buffer automatically, which needs to initialize reference counter as 2, and kref doesn't provide this interface, so convert to refcount_t. Reviewed-by: Caleb Sander Mateos Suggested-by: Caleb Sander Mateos Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250520045455.515691-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 3fee1257ab6be5b52c9f002f27d5620583a8dc40 Author: Ming Lei Date: Mon May 19 11:16:20 2025 +0800 selftests: ublk: make IO & device removal test more stressful __run_io_and_remove() is used in several stress tests for running heavy IO vs. removing device meantime. However, sequential `readwrite` is taken in the fio script, which isn't correct, we should take random IO for saturating ublk device. Also turns out '--num_jobs=4' isn't stressful enough, so change it to '--num_jobs=$(nproc)'. Finally we don't cover single queue test in `test_stress_02.sh`, so add single queue test which can trigger request tag recycling easier. With above change the issue in #1 can be reproduced reliably in stress_02.sh. Link:https://lore.kernel.org/linux-block/mruqwpf4tqenkbtgezv5oxwq7ngyq24jzeyqy4ixzvivatbbxv@4oh2wzz4e6qn/ #1 Cc: Jared Holzman Cc: Shinichiro Kawasaki Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250519031620.245749-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 39eb810157521058372d88da7300fe7dcd016bf6 Merge: 496a3bc5e46c64 9e221d8cf90b85 Author: Jens Axboe Date: Tue May 20 10:13:53 2025 -0600 Merge tag 'nvme-6.16-2025-05-20' of git://git.infradead.org/nvme into for-6.16/block Pull NVMe updates from Christoph: "nvme updates for Linux 6.16 - add per-node DMA pools and use them for PRP/SGL allocations (Caleb Sander Mateos, Keith Busch) - nvme-fcloop refcounting fixes (Daniel Wagner) - support delayed removal of the multipath node and optionally support the multipath node for private namespaces (Nilay Shroff) - support shared CQs in the PCI endpoint target code (Wilfred Mallawa) - support admin-queue only authentication (Hannes Reinecke) - use the crc32c library instead of the crypto API (Eric Biggers) - misc cleanups (Christoph Hellwig, Marcelo Moreira, Hannes Reinecke, Leon Romanovsky, Gustavo A. R. Silva)" * tag 'nvme-6.16-2025-05-20' of git://git.infradead.org/nvme: (42 commits) nvme: rename nvme_mpath_shutdown_disk to nvme_mpath_remove_disk nvme: introduce multipath_always_on module param nvme-multipath: introduce delayed removal of the multipath head node nvme-pci: derive and better document max segments limits nvme-pci: use struct_size for allocation struct nvme_dev nvme-pci: add a symolic name for the small pool size nvme-pci: use a better encoding for small prp pool allocations nvme-pci: rename the descriptor pools nvme-pci: remove struct nvme_descriptor nvme-pci: store aborted state in flags variable nvme-pci: don't try to use SGLs for metadata on the admin queue nvme-pci: make PRP list DMA pools per-NUMA-node nvme-pci: factor out a nvme_init_hctx_common() helper dmapool: add NUMA affinity support nvme-fc: do not reference lsrsp after failure nvmet-fcloop: don't wait for lport cleanup nvmet-fcloop: add missing fcloop_callback_host_done nvmet-fc: take tgtport refs for portentry nvmet-fc: free pending reqs on tgtport unregister nvmet-fcloop: drop response if targetport is gone ... commit ba5f102eec56d61ef590d16ae53e47a4c882d7db Author: Thomas Richter Date: Tue May 20 11:37:26 2025 +0200 perf ftrace: Use process/session specific trace settings Executing 'perf ftrace' commands 'ftrace', 'profile' and 'latency' leave tracing disabled as can seen in this output: # echo 1 > /sys/kernel/debug/tracing/tracing_on # cat /sys/kernel/debug/tracing/tracing_on 1 # perf ftrace trace --graph-opts depth=5 sleep 0.1 > /dev/null # cat /sys/kernel/debug/tracing/tracing_on 0 # The 'tracing_on' file is not restored to its value before the command. To fix that this patch uses the .../tracing/instances/XXX subdirectory feature. Each 'perf ftrace' invocation creates its own session/process specific subdirectory and does not change the global state in the .../tracing directory itself. Use rmdir(../tracing/instances/dir) to stop process/session specific tracing and delete all process/session specific setings. Reported-by: Alexander Egorenkov Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Thomas Richter Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Namhyung Kim Cc: Sumanth Korikkar Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20250520093726.2009696-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 70e5f38e734572ca5a56cff48cf01a0f31917099 Author: Chukun Pan Date: Tue May 20 18:01:01 2025 +0800 spi: dt-bindings: Add rk3528-spi compatible This adds a compatible string for the SPI controller on RK3528. Signed-off-by: Chukun Pan Acked-by: Conor Dooley Link: https://patch.msgid.link/20250520100102.1226725-2-amadeus@jmu.edu.cn Signed-off-by: Mark Brown commit 7cbb015e2d3d6f180256cde0c908eab21268e7b9 Author: Arnd Bergmann Date: Tue May 20 11:00:46 2025 +0200 parisc: fix building with gcc-15 The decompressor is built with the default C dialect, which is now gnu23 on gcc-15, and this clashes with the kernel's bool type definition: In file included from include/uapi/linux/posix_types.h:5, from arch/parisc/boot/compressed/misc.c:7: include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant 11 | false = 0, Add the -std=gnu11 argument here, as we do for all other architectures. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Helge Deller commit e48b92f9e140ff632ad426c0a94e3630a61e45d8 Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:51:16 2025 -0300 tools headers: Synchronize linux/bits.h with the kernel sources To pick up the changes in this cset: 0312e94abe484b9e ("treewide: fix typo 'unsigned __init128' -> 'unsigned __int128'") This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/linux/bits.h include/linux/bits.h This required picking the const_true() define in linux/compiler.h as a prep patch as that macro is used in the new linux/bits.h Please see tools/include/uapi/README for further details. Acked-by: Vincent Mailhol Acked-by: Yury Norov [NVIDIA] Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250519214126.1652491-8-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e6428c3492a34ed728b6152cf073efb3250a6d94 Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:48:19 2025 -0300 tools headers compiler: Pick the const_true() define from the kernel sources The sync of include/linux/bits.h with the kernel sources will make use of this define, so add it to the tools/include/linux/compiler. variant used to build tools/ living code. Acked-by: Vincent Mailhol Acked-by: Yury Norov [NVIDIA] Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250519214126.1652491-7-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fa7a1e8d2d65a17bc5d6a9978d1352e0b0ef59d2 Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:37:20 2025 -0300 tools headers: Synchronize uapi/linux/bits.h with the kernel sources To pick up the changes in this cset: 1e7933a575ed8af4 ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/bits.h include/uapi/linux/bits.h Please see tools/include/uapi/README for further details. Acked-by: Vincent Mailhol Acked-by: Yury Norov [NVIDIA] Cc: Adrian Hunter Cc: I Hsin Cheng Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250519214126.1652491-6-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 83dcc12fa54ed05dd18af80defbde4205dfdc137 Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:33:58 2025 -0300 tools headers: Sync the linux/unaligned.h copy with the kernel sources To pick up the changes in: acea9943271b6290 ("vdso: Address variable shadowing in macros") Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/linux/unaligned.h include/linux/unaligned.h Please see tools/include/uapi/README for further details. Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peng Jiang Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20250519214126.1652491-5-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 444f03645f148362cfa982c105804ebc09b411b9 Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:27:54 2025 -0300 tools headers x86 cpufeatures: Sync with the kernel sources to pick ZEN6 and Indirect Target Selection (ITS) bits To pick the changes from: 24ee8d9432b5744f ("x86/CPU/AMD: Add X86_FEATURE_ZEN6") 2665281a07e19550 ("x86/its: Add "vmexit" option to skip mitigation on some CPUs") 8754e67ad4ac692c ("x86/its: Add support for ITS-safe indirect thunk") 159013a7ca18c271 ("x86/its: Enumerate Indirect Target Selection (ITS) bug") This causes these perf files to be rebuilt and brings some X86_FEATURE that will be used when updating the copies of tools/arch/x86/lib/mem{cpy,set}_64.S with the kernel sources: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Please see tools/include/uapi/README for further details. Cc: Adrian Hunter Cc: Borislav Petkov Cc: Dave Hansen Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Pawan Gupta Cc: Yazen Ghannam Link: https://lore.kernel.org/r/20250519214126.1652491-4-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 57cdcab46647a634601fd8c81114f2a591442d5d Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:22:41 2025 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 159013a7ca18c271 ("x86/its: Enumerate Indirect Target Selection (ITS) bug") That cause no changes to tooling as it doesn't include a new MSR to be captured by the tools/perf/trace/beauty/tracepoints/x86_msr.sh script, for instance: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh | head static const char * const x86_MSRs[] = { [0x00000000] = "IA32_P5_MC_ADDR", [0x00000001] = "IA32_P5_MC_TYPE", [0x00000010] = "IA32_TSC", [0x00000017] = "IA32_PLATFORM_ID", [0x0000001b] = "IA32_APICBASE", [0x00000020] = "KNC_PERFCTR0", [0x00000021] = "KNC_PERFCTR1", [0x00000028] = "KNC_EVNTSEL0", [0x00000029] = "KNC_EVNTSEL1", $ Just silences this perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Please see tools/include/uapi/README for further details. Cc: Adrian Hunter Cc: Dave Hansen Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Pawan Gupta Link: https://lore.kernel.org/r/20250519214126.1652491-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b705ca3d24638b4ffb575a7175edb6d28f05634a Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:15:45 2025 -0300 tools include UAPI: Sync linux/vhost.h with the kernel sources To get the changes in: a940e0a685575424 ("vhost: fix VHOST_*_OWNER documentation") That just changed lines in comments This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Please see tools/include/uapi/README for further details. Acked-by: Stefano Garzarella Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Michael S. Tsirkin Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250519214126.1652491-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 735a3ac37012bbb6bb96145e90e9281beb7c27f2 Author: Leo Yan Date: Mon May 19 09:27:55 2025 +0100 perf test probe_vfs_getname: Add regex for searching probe line Since commit 611851010c74046c ("fs: dedup handling of struct filename init and refcounts bumps"), the kernel has been refactored to use a new inline function initname(), moving name initialization into it. As a result, the perf probe test can no longer find the source line that matches the defined regular expressions. This causes the script to fail when attempting to add probes. Add a regular expression to search for the call site of initname(). This provides a valid source line number for adding the probe. Keeps the older regular expressions for passing test on older kernels. Fixes: 611851010c74046c ("fs: dedup handling of struct filename init and refcounts bumps") Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Leo Yan Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Christian Brauner Cc: Ian Rogers Cc: Jakub Brnak Cc: Jiri Olsa Cc: Kan Liang Cc: Mateusz Guzik Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250519082755.1669187-1-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 408c97c4a5e0b634dcd15bf8b8808b382e888164 Author: Yeoreum Yun Date: Wed May 14 17:19:51 2025 +0100 coresight: prevent deactivate active config while enabling the config While enable active config via cscfg_csdev_enable_active_config(), active config could be deactivated via configfs' sysfs interface. This could make UAF issue in below scenario: CPU0 CPU1 (sysfs enable) load module cscfg_load_config_sets() activate config. // sysfs (sys_active_cnt == 1) ... cscfg_csdev_enable_active_config() lock(csdev->cscfg_csdev_lock) // here load config activate by CPU1 unlock(csdev->cscfg_csdev_lock) deactivate config // sysfs (sys_activec_cnt == 0) cscfg_unload_config_sets() unload module // access to config_desc which freed // while unloading module. cscfg_csdev_enable_config To address this, use cscfg_config_desc's active_cnt as a reference count which will be holded when - activate the config. - enable the activated config. and put the module reference when config_active_cnt == 0. Fixes: f8cce2ff3c04 ("coresight: syscfg: Add API to activate and enable configurations") Suggested-by: Suzuki K Poulose Signed-off-by: Yeoreum Yun Reviewed-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250514161951.3427590-4-yeoreum.yun@arm.com commit 53b9e2659719b04f5ba7593f2af0f2335f75e94a Author: Yeoreum Yun Date: Wed May 14 17:19:50 2025 +0100 coresight: holding cscfg_csdev_lock while removing cscfg from csdev There'll be possible race scenario for coresight config: CPU0 CPU1 (perf enable) load module cscfg_load_config_sets() activate config. // sysfs (sys_active_cnt == 1) ... cscfg_csdev_enable_active_config() lock(csdev->cscfg_csdev_lock) deactivate config // sysfs (sys_activec_cnt == 0) cscfg_unload_config_sets() cscfg_remove_owned_csdev_configs() // here load config activate by CPU1 unlock(csdev->cscfg_csdev_lock) iterating config_csdev_list could be raced with config_csdev_list's entry delete. To resolve this race , hold csdev->cscfg_csdev_lock() while cscfg_remove_owned_csdev_configs() Fixes: 02bd588e12df ("coresight: configuration: Update API to permit dynamic load/unload") Signed-off-by: Yeoreum Yun Reviewed-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250514161951.3427590-3-yeoreum.yun@arm.com commit 895b12b7d7b8c651f73f57a1ea040d35aa7048cb Author: Yeoreum Yun Date: Wed May 14 17:19:49 2025 +0100 coresight/etm4: fix missing disable active config When etm4 device is disabled via sysfs, it should disable its active count. Fixes: 7ebd0ec6cf94 ("coresight: configfs: Allow configfs to activate configuration") Signed-off-by: Yeoreum Yun Reviewed-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250514161951.3427590-2-yeoreum.yun@arm.com commit ac4e317a95a1092b5da5b9918b7118759342641c Author: Toke Høiland-Jørgensen Date: Wed Apr 2 13:22:16 2025 +0200 wifi: ath9k_htc: Abort software beacon handling if disabled A malicious USB device can send a WMI_SWBA_EVENTID event from an ath9k_htc-managed device before beaconing has been enabled. This causes a device-by-zero error in the driver, leading to either a crash or an out of bounds read. Prevent this by aborting the handling in ath9k_htc_swba() if beacons are not enabled. Reported-by: Robert Morris Closes: https://lore.kernel.org/r/88967.1743099372@localhost Fixes: 832f6a18fc2a ("ath9k_htc: Add beacon slots") Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250402112217.58533-1-toke@toke.dk Signed-off-by: Jeff Johnson commit 4a5a99bc79cdc4be63933653682b0261a67a0c9f Author: Wentao Liang Date: Mon May 19 23:42:24 2025 +0800 mtd: nand: sunxi: Add randomizer configuration before randomizer enable In sunxi_nfc_hw_ecc_read_chunk(), the sunxi_nfc_randomizer_enable() is called without the config of randomizer. A proper implementation can be found in sunxi_nfc_hw_ecc_read_chunks_dma(). Add sunxi_nfc_randomizer_config() before the start of randomization. Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support") Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Wentao Liang Signed-off-by: Miquel Raynal commit ee811bc733be5c57a2bfecdf2f6f5d4db466200a Author: Leo Yan Date: Mon May 19 18:49:44 2025 +0100 coresight: etm4x: Fix timestamp bit field handling Timestamps in the trace data appear as all zeros on recent kernels, although the feature works correctly on old kernels (e.g., v6.12). Since commit c382ee674c8b ("arm64/sysreg/tools: Move TRFCR definitions to sysreg"), the TRFCR_ELx_TS_{VIRTUAL|GUEST_PHYSICAL|PHYSICAL} macros were updated to remove the bit shift. As a result, the driver no longer shifts bits when operates the timestamp field. Fix this by using the FIELD_PREP() and FIELD_GET() helpers. Reported-by: Tamas Zsoldos Fixes: c382ee674c8b ("arm64/sysreg/tools: Move TRFCR definitions to sysreg") Signed-off-by: Leo Yan Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250519174945.2245271-2-leo.yan@arm.com commit 1d79596e86613727006161439f3781e74bdb9fac Author: Niklas Cassel Date: Tue May 6 11:51:39 2025 +0200 PCI: dwc: ep: Fix errno typo Fix errno typo in kernel-doc comments. Fixes: 7cbebc86c72a ("PCI: dwc: ep: Add Kernel-doc comments for APIs") Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250506095138.482485-2-cassel@kernel.org commit 1cbc77e0bc32304f574d06c57467914c6168d413 Author: Aishwarya R Date: Mon May 5 09:13:51 2025 +0530 wifi: ath12k: remove redundant regulatory rules intersection logic in host Whenever there is a change in the country code settings from the user, driver does an intersection of the regulatory rules for this new country with the original regulatory rules which were reported during initialization time. There is also similar logic running in firmware with a difference that the intersection in firmware is only done when the country code is configuration during boot up time (BDF/OTP). Firmware logic does not kick in when no country code is configured during device bring up time as the device is always expected to have the country code configured properly in the deployment. There is a debug/test use case that requires absolute regulatory rules to be used for a user configured country code when the device is not configured with a particular country code during boot up time. To support the above test use case, remove the redundant regulatory rules intersection logic in the host driver. Depend on the intersection logic in firmware when the device comes up with pre-configured country code. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aishwarya R Signed-off-by: Rajat Soni Link: https://patch.msgid.link/20250505034351.1365914-1-quic_rajson@quicinc.com Signed-off-by: Jeff Johnson commit e66396cd08049ff3ec1a2c4653a5233fc7f323ba Author: Mohan Kumar G Date: Mon May 5 21:05:36 2025 +0530 wifi: ath12k: Send MCS15 support to firmware during peer assoc As per IEEE 802.11be-2024 - 9.4.2.321, EHT operation element contains MCS15 Disable subfield as the sixth bit, which is set when MCS15 support is not enabled. During association, firmware will use this MCS15 flag to enable or disable the reception of PPDU with EHT-MCS15 capability. Send MCS15 support to firmware through WMI command during peer assoc. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Co-developed-by: Dhanavandhana Kannan Signed-off-by: Dhanavandhana Kannan Signed-off-by: Mohan Kumar G Link: https://patch.msgid.link/20250505153536.3275145-1-quic_mkumarg@quicinc.com Signed-off-by: Jeff Johnson commit 089803c40193ccce21da04d9f047468eba3aa47f Author: Leon Romanovsky Date: Tue May 20 16:46:32 2025 +0300 vfio/mlx5: Enable the DMA link API Remove intermediate scatter-gather table completely and enable new DMA link API. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Acked-by: Yishai Hadas Link: https://lore.kernel.org/r/f71638d50c9c79a462f2e0423501b1de77617656.1747747694.git.leon@kernel.org Signed-off-by: Alex Williamson commit ac6c973a480bcbd1161974b6b8ec6fd12e87b506 Author: Leon Romanovsky Date: Tue May 20 16:46:31 2025 +0300 vfio/mlx5: Rewrite create mkey flow to allow better code reuse Change the creation of mkey to be performed in multiple steps: data allocation, DMA setup and actual call to HW to create that mkey. In this new flow, the whole input to MKEY command is saved to eliminate the need to keep array of pointers for DMA addresses for receive list and in the future patches for send list too. In addition to memory size reduce and elimination of unnecessary data movements to set MKEY input, the code is prepared for future reuse. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Acked-by: Yishai Hadas Link: https://lore.kernel.org/r/d4ad0384fbd1e23a607cbbe9e5756748f3a761d9.1747747694.git.leon@kernel.org Signed-off-by: Alex Williamson commit 674ebb64cd5dc40827b8ac8c95bb72d328ed59ff Author: Leon Romanovsky Date: Tue May 20 16:46:30 2025 +0300 vfio/mlx5: Explicitly use number of pages instead of allocated length allocated_length is a multiple of page size and number of pages, so let's change the functions to accept number of pages. This improves code readability, simplifies buffer handling, and enables combining DMA send/receive operations, as will be introduced in the next patches. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Acked-by: Yishai Hadas Link: https://lore.kernel.org/r/76f39993d2ca0311b3bcfe56038a669d03926815.1747747694.git.leon@kernel.org Signed-off-by: Alex Williamson commit 6ef04555b252e60913d3dc80b45f048bfef33d0f Merge: 1dcf2cf102d72e 3ee7d949634224 Author: Alex Williamson Date: Tue May 20 08:31:44 2025 -0600 Merge branch 'dma-mapping-for-6.16-two-step-api' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux into v6.16/vfio/next Merge two step DMA mapping API as basis for mlx5-vfio-pci uses. Signed-off-by: Alex Williamson commit e26268ff1dcae5662c1b96c35f18cfa6ab73d9de Author: Brian Foster Date: Fri May 16 13:38:00 2025 -0400 ext4: only dirty folios when data journaling regular files fstest generic/388 occasionally reproduces a crash that looks as follows: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: ext4_block_zero_page_range+0x30c/0x380 [ext4] ext4_truncate+0x436/0x440 [ext4] ext4_process_orphan+0x5d/0x110 [ext4] ext4_orphan_cleanup+0x124/0x4f0 [ext4] ext4_fill_super+0x262d/0x3110 [ext4] get_tree_bdev_flags+0x132/0x1d0 vfs_get_tree+0x26/0xd0 vfs_cmd_create+0x59/0xe0 __do_sys_fsconfig+0x4ed/0x6b0 do_syscall_64+0x82/0x170 ... This occurs when processing a symlink inode from the orphan list. The partial block zeroing code in the truncate path calls ext4_dirty_journalled_data() -> folio_mark_dirty(). The latter calls mapping->a_ops->dirty_folio(), but symlink inodes are not assigned an a_ops vector in ext4, hence the crash. To avoid this problem, update the ext4_dirty_journalled_data() helper to only mark the folio dirty on regular files (for which a_ops is assigned). This also matches the journaling logic in the ext4_symlink() creation path, where ext4_handle_dirty_metadata() is called directly. Fixes: d84c9ebdac1e ("ext4: Mark pages with journalled data dirty") Signed-off-by: Brian Foster Link: https://patch.msgid.link/20250516173800.175577-1-bfoster@redhat.com Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@kernel.org commit 0bf1f51e34c4e260095fc7306c564c7fe01503e3 Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:55 2025 +0530 ext4: Add atomic block write documentation Add an initial documentation around atomic writes support in ext4. Acked-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/d3893b9f5ad70317abae72046e81e4c180af91bf.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 642e0dc73c5def8270ff7c55d750ff36a6ea5d10 Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:54 2025 +0530 ext4: Enable support for ext4 multi-fsblock atomic write using bigalloc Last couple of patches added the needed support for multi-fsblock atomic writes using bigalloc. This patch ensures that filesystem advertizes the needed atomic write unit min and max values for enabling multi-fsblock atomic write support with bigalloc. Acked-by: Darrick J. Wong Co-developed-by: Ojaswin Mujoo Signed-off-by: Ojaswin Mujoo Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/5e45d7ed24499024b9079436ba6698dae5298e29.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit b86629c2b2998338b4a715058b402e47d0b36206 Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:53 2025 +0530 ext4: Add multi-fsblock atomic write support with bigalloc EXT4 supports bigalloc feature which allows the FS to work in size of clusters (group of blocks) rather than individual blocks. This patch adds atomic write support for bigalloc so that systems with bs = ps can also create FS using - mkfs.ext4 -F -O bigalloc -b 4096 -C 16384 With bigalloc ext4 can support multi-fsblock atomic writes. We will have to adjust ext4's atomic write unit max value to cluster size. This can then support atomic write of size anywhere between [blocksize, clustersize]. This patch adds the required changes to enable multi-fsblock atomic write support using bigalloc in the next patch. In this patch for block allocation: we first query the underlying region of the requested range by calling ext4_map_blocks() call. Here are the various cases which we then handle depending upon the underlying mapping type: 1. If the underlying region for the entire requested range is a mapped extent, then we don't call ext4_map_blocks() to allocate anything. We don't need to even start the jbd2 txn in this case. 2. For an append write case, we create a mapped extent. 3. If the underlying region is entirely a hole, then we create an unwritten extent for the requested range. 4. If the underlying region is a large unwritten extent, then we split the extent into 2 unwritten extent of required size. 5. If the underlying region has any type of mixed mapping, then we call ext4_map_blocks() in a loop to zero out the unwritten and the hole regions within the requested range. This then provide a single mapped extent type mapping for the requested range. Note: We invoke ext4_map_blocks() in a loop with the EXT4_GET_BLOCKS_ZERO flag only when the underlying extent mapping of the requested range is not entirely a hole, an unwritten extent, or a fully mapped extent. That is, if the underlying region contains a mix of hole(s), unwritten extent(s), and mapped extent(s), we use this loop to ensure that all the short mappings are zeroed out. This guarantees that the entire requested range becomes a single, uniformly mapped extent. It is ok to do so because we know this is being done on a bigalloc enabled filesystem where the block bitmap represents the entire cluster unit. Note having a single contiguous underlying region of type mapped, unwrittn or hole is not a problem. But the reason to avoid writing on top of mixed mapping region is because, atomic writes requires all or nothing should get written for the userspace pwritev2 request. So if at any point in time during the write if a crash or a sudden poweroff occurs, the region undergoing atomic write should read either complete old data or complete new data. But it should never have a mix of both old and new data. So, we first convert any mixed mapping region to a single contiguous mapped extent before any data gets written to it. This is because normally FS will only convert unwritten extents to written at the end of the write in ->end_io() call. And if we allow the writes over a mixed mapping and if a sudden power off happens in between, we will end up reading mix of new data (over mapped extents) and old data (over unwritten extents), because unwritten to written conversion never went through. So to avoid this and to avoid writes getting torned due to mixed mapping, we first allocate a single contiguous block mapping and then do the write. Acked-by: Darrick J. Wong Co-developed-by: Ojaswin Mujoo Signed-off-by: Ojaswin Mujoo Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/c4965ac3407cbc773f0bc954d0966d9696f5038a.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 5bb12b1837c0bf7ddc84e27812f1693a126fe27a Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:52 2025 +0530 ext4: Add support for EXT4_GET_BLOCKS_QUERY_LEAF_BLOCKS There can be a case where there are contiguous extents on the adjacent leaf nodes of on-disk extent trees. So when someone tries to write to this contiguous range, ext4_map_blocks() call will split by returning 1 extent at a time if this is not already cached in extent_status tree cache (where if these extents when cached can get merged since they are contiguous). This is fine for a normal write however in case of atomic writes, it can't afford to break the write into two. Now this is also something that will only happen in the slow write case where we call ext4_map_blocks() for each of these extents spread across different leaf nodes. However, there is no guarantee that these extent status cache cannot be reclaimed before the last call to ext4_map_blocks() in ext4_map_blocks_atomic_write_slow(). Hence this patch adds support of EXT4_GET_BLOCKS_QUERY_LEAF_BLOCKS. This flag checks if the requested range can be fully found in extent status cache and return. If not, it looks up in on-disk extent tree via ext4_map_query_blocks(). If the found extent is the last entry in the leaf node, then it goes and queries the next lblk to see if there is an adjacent contiguous extent in the adjacent leaf node of the on-disk extent tree. Even though there can be a case where there are multiple adjacent extent entries spread across multiple leaf nodes. But we only read an adjacent leaf block i.e. in total of 2 extent entries spread across 2 leaf nodes. The reason for this is that we are mostly only going to support atomic writes with upto 64KB or maybe max upto 1MB of atomic write support. Acked-by: Darrick J. Wong Co-developed-by: Ojaswin Mujoo Signed-off-by: Ojaswin Mujoo Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/6bb563e661f5fbd80e266a9e6ce6e29178f555f6.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 255e7bc2127cbd3a718a55d2da5b2d3f015adcd7 Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:51 2025 +0530 ext4: Make ext4_meta_trans_blocks() non-static for later use Let's make ext4_meta_trans_blocks() non-static for use in later functions during ->end_io conversion for atomic writes. We will need this function to estimate journal credits for a special case. Instead of adding another wrapper around it, let's make this non-static. Reviewed-by: Ojaswin Mujoo Acked-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/23ce80d4286f792831ce99d13558182ee228fedb.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 1c972b1d13dde34c9897d991283e2c54209b44e9 Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:50 2025 +0530 ext4: Check if inode uses extents in ext4_inode_can_atomic_write() EXT4 only supports doing atomic write on inodes which uses extents, so add a check in ext4_inode_can_atomic_write() which gets called during open. Reviewed-by: Ojaswin Mujoo Acked-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/86bb502c979398a736ab371d8f35f6866a477f6c.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit 9fa6121684dad974c8c2b2aceb0df2b27f0627fe Author: Ritesh Harjani (IBM) Date: Fri May 16 01:20:49 2025 +0530 ext4: Document an edge case for overwrites ext4_iomap_overwrite_begin() clears the flag for IOMAP_WRITE before calling ext4_iomap_begin(). Document this above ext4_map_blocks() call as it is easy to miss it when focusing on write paths alone. Reviewed-by: Ojaswin Mujoo Acked-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/fd50ba05440042dff77d555e463a620a79f8d0e9.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o commit fff6f35b9b2f0c79c9eb6106311530864d8f1394 Author: Eric Biggers Date: Mon May 12 22:38:09 2025 -0700 jbd2: remove journal_t argument from jbd2_superblock_csum() Since jbd2_superblock_csum() no longer uses its journal_t argument, remove it. Signed-off-by: Eric Biggers Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250513053809.699974-5-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 76005718cf8bfdb6b0f818ea75ca6a4b3bee34cd Author: Eric Biggers Date: Mon May 12 22:38:08 2025 -0700 jbd2: remove journal_t argument from jbd2_chksum() Since jbd2_chksum() no longer uses its journal_t argument, remove it. Signed-off-by: Eric Biggers Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250513053809.699974-4-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 6017dbb7b67a3ca90d339ca32fe6dde425686435 Author: Eric Biggers Date: Mon May 12 22:38:07 2025 -0700 ext4: remove sb argument from ext4_superblock_csum() Since ext4_superblock_csum() no longer uses its sb argument, remove it. Signed-off-by: Eric Biggers Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250513053809.699974-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 6cbab5f95e49ec8a9f21784fae3ff0ee09b2dfbc Author: Eric Biggers Date: Mon May 12 22:38:06 2025 -0700 ext4: remove sbi argument from ext4_chksum() Since ext4_chksum() no longer uses its sbi argument, remove it. Signed-off-by: Eric Biggers Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250513053809.699974-2-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 7ac67301e82f02b77a5c8e7377a1f414ef108b84 Author: Zhang Yi Date: Mon May 12 14:33:19 2025 +0800 ext4: enable large folio for regular file Besides fsverity, fscrypt, and the data=journal mode, ext4 now supports large folios for regular files. Enable this feature by default. However, since we cannot change the folio order limitation of mappings on active inodes, setting the journal=data mode via ioctl on an active inode will not take immediate effect in non-delalloc mode. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-9-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 01e807e18fd87937f515926b79152dfa4f13b735 Author: Zhang Yi Date: Mon May 12 14:33:18 2025 +0800 ext4: make online defragmentation support large folios move_extent_per_page() currently assumes that each folio is the size of PAGE_SIZE and only copies data for one page. ext4_move_extents() should call move_extent_per_page() for each page. To support larger folios, simply modify the calculations for the block start and end offsets within the folio based on the provided range of 'data_offset_in_page' and 'block_len_in_page'. This function will continue to handle PAGE_SIZE of data at a time and will not convert this function to manage an entire folio. Additionally, we use the source folio to copy data, so it doesn't matter if the source and dest folios are different in size. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-8-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit cd9f76de6ae9a5a0ca6201b1f06cf116a6a3e3a2 Author: Zhang Yi Date: Mon May 12 14:33:17 2025 +0800 ext4: make the writeback path support large folios In mpage_map_and_submit_buffers(), the 'lblk' is now aligned to PAGE_SIZE. Convert it to be aligned to folio size. Additionally, modify the wbc->nr_to_write update to reduce the number of pages in a single folio, ensuring that the entire writeback path can support large folios. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-7-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 0e32d86170121c2d43508e923cb171fb58953b42 Author: Zhang Yi Date: Mon May 12 14:33:16 2025 +0800 ext4: correct the journal credits calculations of allocating blocks The journal credits calculation in ext4_ext_index_trans_blocks() is currently inadequate. It only multiplies the depth of the extents tree and doesn't account for the blocks that may be required for adding the leaf extents themselves. After enabling large folios, we can easily run out of handle credits, triggering a warning in jbd2_journal_dirty_metadata() on filesystems with a 1KB block size. This occurs because we may need more extents when iterating through each large folio in ext4_do_writepages()->mpage_map_and_submit_extent(). Therefore, we should modify ext4_ext_index_trans_blocks() to include a count of the leaf extents in the worst case as well. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit d6bf294773a472fe4694b92714af482f5c6aa4c6 Author: Zhang Yi Date: Mon May 12 14:33:15 2025 +0800 ext4/jbd2: convert jbd2_journal_blocks_per_page() to support large folio jbd2_journal_blocks_per_page() returns the number of blocks in a single page. Rename it to jbd2_journal_blocks_per_folio() and make it returns the number of blocks in the largest folio, preparing for the calculation of journal credits blocks when allocating blocks within a large folio in the writeback path. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-5-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 2e9466fc5d7c74a0aeeb388c3c2a4c02b7069d58 Author: Zhang Yi Date: Mon May 12 14:33:14 2025 +0800 ext4: make __ext4_block_zero_page_range() support large folio The partial block zero range helper __ext4_block_zero_page_range() currently only supports folios of PAGE_SIZE in size. The calculations for the start block and the offset within a folio for the given range are incorrect. Modify the implementation to use offset_in_folio() instead of directly masking PAGE_SIZE - 1, which will be able to support for large folios. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 16705e52e6291c6ab4249aaf1cdf0b8e88afe775 Author: Zhang Yi Date: Mon May 12 14:33:13 2025 +0800 ext4: make regular file's buffered write path support large folios The current buffered write path in ext4 can only allocate and handle folios of PAGE_SIZE size. To support larger folios, modify ext4_da_write_begin() and ext4_write_begin() to allocate higher-order folios, and trim the write length if it exceeds the folio size. Additionally, in ext4_da_do_write_end(), use offset_in_folio() instead of PAGE_SIZE. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit fdbd0df9d4a36c9091d4f7e8cdfbe76c94aab0ab Author: Zhang Yi Date: Mon May 12 14:33:12 2025 +0800 ext4: make ext4_mpage_readpages() support large folios ext4_mpage_readpages() currently assumes that each folio is the size of PAGE_SIZE. Modify it to atomically calculate the number of blocks per folio and iterate through the blocks in each folio, which would allow for support of larger folios. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250512063319.3539411-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1a77a028a392fab66dd637cdfac3f888450d00af Author: Zhang Yi Date: Tue May 6 09:20:09 2025 +0800 ext4: ensure i_size is smaller than maxbytes The inode i_size cannot be larger than maxbytes, check it while loading inode from the disk. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250506012009.3896990-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit dbe27f06fa38b9bfc598f8864ae1c5d5831d9992 Author: Zhang Yi Date: Tue May 6 09:20:08 2025 +0800 ext4: factor out ext4_get_maxbytes() There are several locations that get the correct maxbytes value based on the inode's block type. It would be beneficial to extract a common helper function to make the code more clear. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250506012009.3896990-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 29ec9bed2395061350249ae356fb300dd82a78e7 Author: Zhang Yi Date: Tue May 6 09:20:07 2025 +0800 ext4: fix incorrect punch max_end For the extents based inodes, the maxbytes should be sb->s_maxbytes instead of sbi->s_bitmap_maxbytes. Additionally, for the calculation of max_end, the -sb->s_blocksize operation is necessary only for indirect-block based inodes. Correct the maxbytes and max_end value to correct the behavior of punch hole. Fixes: 2da376228a24 ("ext4: limit length to bitmap_maxbytes - blocksize in punch_hole") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250506012009.3896990-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit b5e58bcd79625423487fa3ecba8e8411b5396327 Author: Zhang Yi Date: Tue May 6 09:20:06 2025 +0800 ext4: fix out of bounds punch offset Punching a hole with a start offset that exceeds max_end is not permitted and will result in a negative length in the truncate_inode_partial_folio() function while truncating the page cache, potentially leading to undesirable consequences. A simple reproducer: truncate -s 9895604649994 /mnt/foo xfs_io -c "pwrite 8796093022208 4096" /mnt/foo xfs_io -c "fpunch 8796093022213 25769803777" /mnt/foo kernel BUG at include/linux/highmem.h:275! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 3 UID: 0 PID: 710 Comm: xfs_io Not tainted 6.15.0-rc3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:zero_user_segments.constprop.0+0xd7/0x110 RSP: 0018:ffffc90001cf3b38 EFLAGS: 00010287 RAX: 0000000000000005 RBX: ffffea0001485e40 RCX: 0000000000001000 RDX: 000000000040b000 RSI: 0000000000000005 RDI: 000000000040b000 RBP: 000000000040affb R08: ffff888000000000 R09: ffffea0000000000 R10: 0000000000000003 R11: 00000000fffc7fc5 R12: 0000000000000005 R13: 000000000040affb R14: ffffea0001485e40 R15: ffff888031cd3000 FS: 00007f4f63d0b780(0000) GS:ffff8880d337d000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000001ae0b038 CR3: 00000000536aa000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: truncate_inode_partial_folio+0x3dd/0x620 truncate_inode_pages_range+0x226/0x720 ? bdev_getblk+0x52/0x3e0 ? ext4_get_group_desc+0x78/0x150 ? crc32c_arch+0xfd/0x180 ? __ext4_get_inode_loc+0x18c/0x840 ? ext4_inode_csum+0x117/0x160 ? jbd2_journal_dirty_metadata+0x61/0x390 ? __ext4_handle_dirty_metadata+0xa0/0x2b0 ? kmem_cache_free+0x90/0x5a0 ? jbd2_journal_stop+0x1d5/0x550 ? __ext4_journal_stop+0x49/0x100 truncate_pagecache_range+0x50/0x80 ext4_truncate_page_cache_block_range+0x57/0x3a0 ext4_punch_hole+0x1fe/0x670 ext4_fallocate+0x792/0x17d0 ? __count_memcg_events+0x175/0x2a0 vfs_fallocate+0x121/0x560 ksys_fallocate+0x51/0xc0 __x64_sys_fallocate+0x24/0x40 x64_sys_call+0x18d2/0x4170 do_syscall_64+0xa7/0x220 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fix this by filtering out cases where the punching start offset exceeds max_end. Fixes: 982bf37da09d ("ext4: refactor ext4_punch_hole()") Reported-by: Liebes Wang Closes: https://lore.kernel.org/linux-ext4/ac3a58f6-e686-488b-a9ee-fc041024e43d@huawei.com/ Tested-by: Liebes Wang Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Baokun Li Link: https://patch.msgid.link/20250506012009.3896990-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit af98b0157adf6504fade79b3e6cb260c4ff68e37 Author: Jeongjun Park Date: Wed May 14 22:08:55 2025 +0900 jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata() Since handle->h_transaction may be a NULL pointer, so we should change it to call is_handle_aborted(handle) first before dereferencing it. And the following data-race was reported in my fuzzer: ================================================================== BUG: KCSAN: data-race in jbd2_journal_dirty_metadata / jbd2_journal_dirty_metadata write to 0xffff888011024104 of 4 bytes by task 10881 on cpu 1: jbd2_journal_dirty_metadata+0x2a5/0x770 fs/jbd2/transaction.c:1556 __ext4_handle_dirty_metadata+0xe7/0x4b0 fs/ext4/ext4_jbd2.c:358 ext4_do_update_inode fs/ext4/inode.c:5220 [inline] ext4_mark_iloc_dirty+0x32c/0xd50 fs/ext4/inode.c:5869 __ext4_mark_inode_dirty+0xe1/0x450 fs/ext4/inode.c:6074 ext4_dirty_inode+0x98/0xc0 fs/ext4/inode.c:6103 .... read to 0xffff888011024104 of 4 bytes by task 10880 on cpu 0: jbd2_journal_dirty_metadata+0xf2/0x770 fs/jbd2/transaction.c:1512 __ext4_handle_dirty_metadata+0xe7/0x4b0 fs/ext4/ext4_jbd2.c:358 ext4_do_update_inode fs/ext4/inode.c:5220 [inline] ext4_mark_iloc_dirty+0x32c/0xd50 fs/ext4/inode.c:5869 __ext4_mark_inode_dirty+0xe1/0x450 fs/ext4/inode.c:6074 ext4_dirty_inode+0x98/0xc0 fs/ext4/inode.c:6103 .... value changed: 0x00000000 -> 0x00000001 ================================================================== This issue is caused by missing data-race annotation for jh->b_modified. Therefore, the missing annotation needs to be added. Reported-by: syzbot+de24c3fe3c4091051710@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=de24c3fe3c4091051710 Fixes: 6e06ae88edae ("jbd2: speedup jbd2_journal_dirty_metadata()") Signed-off-by: Jeongjun Park Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250514130855.99010-1-aha310510@gmail.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit e80325ef5cc2d9de13845ab32c50d5012357d42b Author: Christoph Hellwig Date: Mon May 5 11:16:04 2025 +0200 ext4: use writeback_iter in ext4_journalled_submit_inode_data_buffers Use writeback_iter directly instead of write_cache_pages for a nicer code structure and less indirect calls. Signed-off-by: Christoph Hellwig Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20250505091604.3449879-1-hch@lst.de Signed-off-by: Theodore Ts'o commit 32a93f5bc9b9812fc710f43a4d8a6830f91e4988 Author: Jan Kara Date: Tue Apr 29 19:55:36 2025 +0200 ext4: fix calculation of credits for extent tree modification Luis and David are reporting that after running generic/750 test for 90+ hours on 2k ext4 filesystem, they are able to trigger a warning in jbd2_journal_dirty_metadata() complaining that there are not enough credits in the running transaction started in ext4_do_writepages(). Indeed the code in ext4_do_writepages() is racy and the extent tree can change between the time we compute credits necessary for extent tree computation and the time we actually modify the extent tree. Thus it may happen that the number of credits actually needed is higher. Modify ext4_ext_index_trans_blocks() to count with the worst case of maximum tree depth. This can reduce the possible number of writers that can operate in the system in parallel (because the credit estimates now won't fit in one transaction) but for reasonably sized journals this shouldn't really be an issue. So just go with a safe and simple fix. Link: https://lore.kernel.org/all/20250415013641.f2ppw6wov4kn4wq2@offworld Reported-by: Davidlohr Bueso Reported-by: Luis Chamberlain Tested-by: kdevops@lists.linux.dev Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20250429175535.23125-2-jack@suse.cz Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 2bae25a802dcc2d69ea4ca87fe0dac5e64257a2f Author: Siddarth Gundu Date: Tue May 20 17:00:12 2025 +0530 ALSA: amd7930: replace strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. Both the destination and source buffer are of fixed length so strscpy with 2-arguments is used. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Siddarth Gundu Link: https://patch.msgid.link/20250520113012.70270-1-siddarthsgml@gmail.com Signed-off-by: Takashi Iwai commit 3318f7b5cefbff96b1bb49584ac38d2c9997a830 Author: Rob Clark Date: Mon May 19 10:51:28 2025 -0700 iommu/io-pgtable-arm: Add quirk to quiet WARN_ON() In situations where mapping/unmapping sequence can be controlled by userspace, attempting to map over a region that has not yet been unmapped is an error. But not something that should spam dmesg. Now that there is a quirk, we can also drop the selftest_running flag, and use the quirk instead for selftests. Acked-by: Robin Murphy Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20250519175348.11924-6-robdclark@gmail.com [will: Rename quirk to IO_PGTABLE_QUIRK_NO_WARN per Robin's suggestion] Signed-off-by: Will Deacon commit 46d40b2479ab6417db4d7174f7a938c994435b3f Author: Shinji Nomoto Date: Tue May 20 15:27:04 2025 +0900 doc: hwmon: acpi_power_meter: Add information about enabling the power capping feature. To enable the power capping feature of the acpi_power_meter driver on systems other than IBM products, you must explicitly specify the force_cap_on module parameter. Add information to the documentation about enabling the power capping feature with this driver, including the above, to improve user convenience. Signed-off-by: Shinji Nomoto Link: https://lore.kernel.org/r/20250520062707.1657667-1-fj5851bi@fujitsu.com Signed-off-by: Guenter Roeck commit a867688c8cbb1b83667a6665362d89e8c762e820 Author: Bibo Mao Date: Tue May 20 20:20:26 2025 +0800 KVM: selftests: Add supported test cases for LoongArch Some common KVM test cases are supported on LoongArch now as following: coalesced_io_test demand_paging_test dirty_log_perf_test dirty_log_test guest_print_test hardware_disable_test kvm_binary_stats_test kvm_create_max_vcpus kvm_page_table_test memslot_modification_stress_test memslot_perf_test set_memory_region_test And other test cases are not supported by LoongArch such as rseq_test, since it is not supported on LoongArch physical machine either. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 304b93b1a044de4050651e6bcb931581f9e0386f Author: Bibo Mao Date: Tue May 20 20:20:26 2025 +0800 KVM: selftests: Add ucall test support for LoongArch Add ucall test support for LoongArch, ucall method on LoongArch uses undefined mmio area. It will cause vCPU exiting to hypervisor so that hypervisor can communicate with vCPU. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 2ebf31d59f583449422f4b2dad59b0130e750117 Author: Bibo Mao Date: Tue May 20 20:20:26 2025 +0800 KVM: selftests: Add core KVM selftests support for LoongArch Add core KVM selftests support for LoongArch, it includes exception handler, mmu page table setup and vCPU startup entry support. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 21872c74b07b5f2e29f7bf7a8981e1e84c3ed5f7 Author: Bibo Mao Date: Tue May 20 20:20:23 2025 +0800 KVM: selftests: Add KVM selftests header files for LoongArch Add KVM selftests header files for LoongArch, including processor.h and kvm_util_arch.h. It mainly contains LoongArch CSR register and page table entry definition. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit a5460d191915e420c1c2bd52c6963d416eb9172a Author: Bibo Mao Date: Tue May 20 20:20:23 2025 +0800 KVM: selftests: Add VM_MODE_P47V47_16K VM mode On LoongArch system, 16K page is used in general and GVA width is 47 bit while GPA width is 47 bit also, here add new VM mode VM_MODE_P47V47_16K. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 05d70ebf74c9383a0a7eddc0d866efece7039b8c Author: Bibo Mao Date: Tue May 20 20:20:18 2025 +0800 LoongArch: KVM: Do not flush tlb if HW PTW supported With HW PTW supported, invalid TLB is not added when page fault happens. But for EXCCODE_TLBM exception, stale TLB may exist because of the last read access. Thus TLB flush operation is necessary for the EXCCODE_TLBM exception, but not necessary for other tyeps of page fault exceptions. With SW PTW supported, invalid TLB is added in the TLB refill exception. TLB flush operation is necessary for all types of page fault exceptions. Here remove unnecessary TLB flush opereation with HW PTW supported. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit fecd903c3c028da67a89a5e2efa41d288999b70c Author: Bibo Mao Date: Tue May 20 20:20:18 2025 +0800 LoongArch: KVM: Add ecode parameter for exception handlers For some KVM exception types, they share the same exception handler. To show the difference, ecode (exception code) is added as a new parameter in exception handlers. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 99af08feb7fad3df79bda1628e4ee8b6eb1f6a32 Author: AngeloGioacchino Del Regno Date: Tue May 20 13:10:02 2025 +0200 Revert "arm64: dts: mediatek: mt8390-genio-common: Add firmware-name for scp0" As clearly seen on other non-MediaTek platforms, this is known to eventually produce regressions in the future, as drivers may break ABI and stop working with older firmware versions. Although the firmware-name property was used in multiple MediaTek devicetrees for the System Companion Processor (SCP) node, avoid doing the same on MT8390 to lessen eventual ABI breakages that may happen with a driver update to change the firmware retrieval logic for the SCP. This reverts commit 2f0066dae66f30386ecd6408410e27a4d6818c15. Link: https://lore.kernel.org/r/20250520111002.282841-1-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 4a81656c8eaaa20675a3f67f452d02203c1e82f7 Author: AngeloGioacchino Del Regno Date: Tue May 20 12:40:24 2025 +0200 arm64: dts: mediatek: mt8188: Address binding warnings for MDP3 nodes Address various dt-binding warnings for most of the MDP3 nodes by adding and removing interrupts and power domains where required. Also, remove the mediatek,mt8195-mdp3-rdma fallback compatible from the main MDP3 RDMA node as the two have never really been fully compatible. Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250520104024.3706723-1-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit cfe035d8662cfbd6edff9bd89c4b516bbb34c350 Author: Julien Massot Date: Wed May 14 10:19:58 2025 +0200 arm64: dts: mt6359: Rename RTC node to match binding expectations Rename the node 'mt6359rtc' to 'rtc', as required by the binding. Fix the following dtb-check error: mediatek/mt8395-radxa-nio-12l.dtb: pmic: 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+' Fixes: 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes") Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250514-mt8395-dtb-errors-v2-3-d67b9077c59a@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b28c4af8e44b58e61791a82c2b71e0b13e9f5b6a Author: Louis-Alexis Eyraud Date: Thu May 15 12:04:11 2025 +0200 arm64: dts: mt8365-evk: Add goodix touchscreen support The Mediatek Genio 350-EVK board has on the DSI0 connector a StarTek KD070FHFID015 display panel that uses a Goodix GT9271 I2C capacitive touch controller. The mt8365-evk devicetree already have the display panel support but lacks the touchscreen support, so add it. Signed-off-by: Louis-Alexis Eyraud Link: https://lore.kernel.org/r/20250515-mt8365-evk-enable-touchscreen-v1-1-7ba3c87b2a71@collabora.com [Angelo: Reordered regulator nodes and interurpts-extended property] Signed-off-by: AngeloGioacchino Del Regno commit cf57ec7b9fc546bd233427df5d8f0c6ab1ea3997 Author: Julien Massot Date: Fri May 16 16:12:14 2025 +0200 arm64: dts: mediatek: mt8188: Add missing #reset-cells property The binding now require the '#reset-cells' property but the devicetree has not been updated which trigger dtb-check errors. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Julien Massot Link: https://lore.kernel.org/r/20250516-dtb-check-mt8188-v2-2-fb60bef1b8e1@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 781cffe8d43d94f6b49f8428d4c7277b6d2bf85e Author: Lorenzo Bianconi Date: Sat May 17 17:19:44 2025 +0200 arm64: dts: airoha: en7581: Add PCIe nodes to EN7581 SoC evaluation board Introduce PCIe controller nodes to EN7581 SoC and EN7581 evaluation board. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20250517-en7581-evb-pcie-v1-2-97297eb063bb@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit ed0c3aacf569be16adb757852fc4abefdaa85b10 Author: Lorenzo Bianconi Date: Sat May 17 17:19:43 2025 +0200 arm64: dts: airoha: en7581: Add gpio-ranges property for gpio controller Introduce missing gpio-ranges property for Airoha EN7581 gpio controller Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20250517-en7581-evb-pcie-v1-1-97297eb063bb@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit 6b7642e9d095d33d8034b8b396a2de9e5ecb25a7 Author: Frank Wunderlich Date: Fri May 16 20:01:42 2025 +0200 arm64: dts: mediatek: mt7988a-bpi-r4: configure spi-nodes Configure and enable SPI nodes on Bananapi R4 board. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20250516180147.10416-13-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 0f63e96e2ab422d1d35def1da75d3df299bf503e Author: Frank Wunderlich Date: Fri May 16 20:01:41 2025 +0200 arm64: dts: mediatek: mt7988a-bpi-r4: Add fan and coolingmaps Add Fan and cooling maps for Bananapi-R4 board. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20250516180147.10416-12-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit e4950b016c727feb0c39ad12cfcb6182c9ef3814 Author: Frank Wunderlich Date: Fri May 16 20:01:38 2025 +0200 arm64: dts: mediatek: mt7988: add phy calibration efuse subnodes MT7988 contains buildin mt753x switch which needs calibration data from efuse. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20250516180147.10416-9-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 9ab0ac0e532afd167b3bec39b2eb25c53486dcb5 Author: Subbaraya Sundeep Date: Thu May 15 23:14:08 2025 +0530 octeontx2-pf: Add tracepoint for NIX_PARSE_S The NIX_PARSE_S structure populated by hardware in the NIX RX CQE has parsing information for the received packet. A tracepoint to dump the all words of NIX_PARSE_S is helpful in debugging packet parser. Signed-off-by: Subbaraya Sundeep Signed-off-by: Ratheesh Kannoth Link: https://patch.msgid.link/1747331048-15347-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit b9ebd166b006f77cef4530b4bf4a291a112da4f2 Author: Frank Wunderlich Date: Fri May 16 20:01:36 2025 +0200 arm64: dts: mediatek: mt7988: move uart0 and spi1 pins to soc dtsi In order to use uart0 or spi1 there is only 1 possible pin definition so move them to soc dtsi to reuse them in other boards and avoiding conflict if defined twice. Suggested-by: Daniel Golle Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20250516180147.10416-7-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit bf7c2ce439ca811dc1697b4bc19ab57bd8f13be3 Author: Frank Wunderlich Date: Fri May 16 20:01:35 2025 +0200 arm64: dts: mediatek: mt7988: add spi controllers Add SPI controllers for mt7988. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20250516180147.10416-6-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit bb5872c4b6cb0a8687b424b9970b2c3cca2ededd Author: Frank Wunderlich Date: Tue Apr 22 15:24:31 2025 +0200 arm64: dts: mediatek: mt7988a-bpi-r4: enable xsphy Enable XS-Phy on Bananapi R4 for pcie2. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-9-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 2400b24dfecea9a628f63089bf7eeb9a43b91021 Author: Frank Wunderlich Date: Tue Apr 22 15:24:30 2025 +0200 arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2 First usb and third pcie controller on mt7988 need a xs-phy to work properly. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-8-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 97ba5f51c251911d379386853cfc0fceb7f5d2b4 Author: Frank Wunderlich Date: Tue Apr 22 15:24:25 2025 +0200 arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4 Sinovoip has released other variants of Bananapi-R4 board. The known changes affecting only the LAN SFP+ slot which is replaced by a 2.5G phy with optional PoE. Just move the common parts to a new dtsi and keep differences (only i2c for lan-sfp) in dts. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-3-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 7ff8907cdcd778ce5ee232fde1e39ed1541e1a0c Author: Frank Wunderlich Date: Tue Apr 22 15:24:24 2025 +0200 dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant Add new compatible for Bananapi R4 with 2.5G phy. Base board is compatible with existing BPI-R4 only 1 SFP is replaced by RJ45 port and use mt7988 internal phy. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-2-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 31be641d74267d98317ef5a2b90e6200511cabb3 Author: Heiner Kallweit Date: Thu May 15 10:11:54 2025 +0200 net: phy: make mdio consumer / device layer a separate module After having factored out the provider part from mdio_bus.c, we can make the mdio consumer / device layer a separate module. This also allows to remove Kconfig symbol MDIO_DEVICE. The module init / exit functions from mdio_bus.c no longer have to be called from phy_device.c. The link order defined in drivers/net/phy/Makefile ensures that init / exit functions are called in the right order. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/dba6b156-5748-44ce-b5e2-e8dc2fcee5a7@gmail.com Signed-off-by: Paolo Abeni commit 8c4d2cc1e1cb9b8c9f26af6c5f19e0c7233e6f81 Author: Richard Fitzgerald Date: Fri May 16 16:20:48 2025 +0100 ASoC: Intel: soc-acpi-intel-mtl-match: Add match for CDB35L63-CB2 This adds a match entry for using all the amps on a CDB35L63-CB2 board without the CS42L43 codec. Configuration is: SDW3: 1x CS35L63 (OUT1) SDW1: 1x CS35L63 (OUT2) Speaker playback and amp feedback are aggregated. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20250516152107.210994-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 898cd43bde30744e0b821efdf960781c240d4e6c Author: Stefan Binding Date: Fri May 16 16:20:47 2025 +0100 ASoC: intel: sof_sdw: Add support for CS35L63 into machine driver CS35L63 is very similar to CS35L56, and uses the same driver, so we can use the same configuration. Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20250516152107.210994-2-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 108f878d435437f649da32dea9f0d4f684eba3ba Author: Charles Keepax Date: Fri May 16 14:10:11 2025 +0100 ASoC: SDCA: Create DAI drivers from DisCo Use the previously parsed DisCo information from ACPI to create the DAI drivers required to connect an SDCA Function into an ASoC soundcard. Create DAI driver structures and populate the supported sample rates and sample widths into them based on the Input/Output Terminal and any attach Clock Source entities. More complex relationships with channels etc. will be added later as constraints as part of the DAI startup. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit c3ca24e3fcb656c6afe702b69e6e9efcc3ff1128 Author: Charles Keepax Date: Fri May 16 14:10:10 2025 +0100 ASoC: SDCA: Create ALSA controls from DisCo Use the previously parsed DisCo information from ACPI to create the ALSA controls required by an SDCA Function. This maps all User and Application level SDCA Controls to ALSA controls. Typically controls marked with those access levels are just volumes and mutes. SDCA defines volume controls as an integer in 1/256ths of a dB and then provides a mechanism to specify what values are valid (range templates). Currently only a simple case of a single linear volume range with a power of 2 step size is supported. This allows the code to expose the volume control using a simple shift. This will need expanded in the future, to support more complex ranges and probably also some additional control types but this should be sufficient to for a first pass. For non-dataport terminal widgets also add a pin switch to allow that endpoint to be turned on/off. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 2c8b3a8e6aa877583e5dc2f669a8adc896a771d4 Author: Charles Keepax Date: Fri May 16 14:10:09 2025 +0100 ASoC: SDCA: Create DAPM widgets and routes from DisCo Use the previously parsed DisCo information from ACPI to create DAPM widgets and routes representing a SDCA Function. For the most part SDCA maps well to the DAPM abstractions. The primary point of interest is the SDCA Power Domain Entities (PDEs), which actually control the power status of the device. Whilst these PDEs are the primary widgets the other parts of the SDCA graph are added to maintain a consistency with the hardware abstract, and allow routing to take effect. As for the PDEs themselves the code currently only handle PS0 and PS3 (basically on and off), the two intermediate power states are not commonly used and don't map well to ASoC/DAPM. Other minor points of slightly complexity include, the Group Entities (GEs) these set the value of several other controls, typically Selector Units (SUs) for enabling a cetain jack configuration. Multiple SUs being controlled by a GE are easily modelled creating a single control and sharing it among the controlled muxes. SDCA also has a slight habit of having fully connected paths, relying more on activating the PDEs to enable functionality. This doesn't map quite so perfectly to DAPM which considers the path a reason to power the PDE. Whilst in the current specification Mixer Units are defined as fixed-function, in DAPM we create a virtual control for each input (which defaults to connected). This allows paths to be connected/disconnected, providing a more ASoC style approach to managing the power. PIN_SWITCHs will also be added for non-dataport terminal entities in a later patch along with the other ALSA controls, providing greater flexibility in power management. A top level helper sdca_asoc_populate_component() is exported that counts and allocates everything, however, the intermediate counting and population functions are also exported. This will allow end drivers to do allocation and add custom handling, which is probably fairly likely for the early SDCA devices. Clock muxes are currently not fully supported, so some future work will also be required there. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 737379e5062e26c59fe069a8bdad2ee363d52686 Author: Charles Keepax Date: Fri May 16 14:10:08 2025 +0100 ASoC: dapm: Add component level pin switches The core currently supports pin switches for source/sink widgets, but only at the card level. SDCA components specify the fabric at the level of the individual components, to support this add helpers to allow component level pin switches. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 3849c958eeeb8e340112b983068c5547babc7274 Author: Charles Keepax Date: Fri May 16 14:10:07 2025 +0100 ASoC: SDCA: Move allocation of PDE delays array Move the allocation of the PDE delays array until after the size has been adjusted, this saves an additional division and simplifies the code slightly. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 96bd04e738f8154b1d798842e89a4fa8b85d2636 Author: Charles Keepax Date: Fri May 16 14:10:06 2025 +0100 ASoC: SDCA: Remove regmap module macros There is no need to include MODULE_LICENSE() and MODULE_DESCRIPTION() in sdca_regmap.c as this file is part of a larger module that already defines these. Fixes: e3f7caf74b79 ("ASoC: SDCA: Add generic regmap SDCA helpers") Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 52b97d43b7c52da481758931a111a091da5e4802 Author: Charles Keepax Date: Fri May 16 14:10:05 2025 +0100 ASoC: SDCA: Fix minor typo Fix minor typo SDAC -> SDCA. Fixes: 42b144cb6a2d ("ASoC: SDCA: Add SDCA Control parsing") Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20250516131011.221310-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 5b31d2d81a4bcdd9915e7b152fb3cdc3dc7f4ecb Merge: dbb79974193a29 ec23a899d96f9e Author: Mark Brown Date: Tue May 20 10:34:25 2025 +0100 spi: sh-msiof: Transfer size improvements and I2S Merge series from Geert Uytterhoeven : This patch series (A) improves single transfer sizes in the MSIOF driver, using two methods: - By increasing the assumed FIFO sizes, impacting both PIO and DMA transfers, - By using two groups, impacting DMA transfers, and (B) lets the recently-introduced MSIOF I2S drive reuse the SPI driver's register definitions. All of this is covered with a thick sauce of fixes for (harmless) bugs, cleanups, and refactorings. Note that the driver uses the limitations as specified in the hardware documentation. For discovering the actual FIFO sizes, I wrote some crude test code that can be found at [2]. This is based on spi/for-next and sound-asoc/for-next, and has been tested on a variery of R-Car SoCs. [1] https://lore.kernel.org/cover.1746180072.git.geert+renesas@glider.be [2] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/msiof-fifo commit dcd711021389c4d19b3310cc37f09813659dfee2 Merge: e9be77134469df c451e2da54bce1 Author: Mark Brown Date: Tue May 20 10:34:15 2025 +0100 fix: Correct Samsung 'Electronics' spelling in Merge series from Sumanth Gavini : This series fixes the misspelling of "Electronics" as "Electrnoics" across multiple subsystems (MFD, NFC, EXTCON). Each patch targets a different subsystem for easier review. The changes are mechanical and do not affect functionality. Sumanth Gavini (6): nfc: s3fwrn5: Correct Samsung "Electronics" spelling in copyright headers nfc: virtual_ncidev: Correct Samsung "Electronics" spelling in copyright headers extcon: extcon-max77693: Correct Samsung "Electronics" spelling in copyright headers mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers mfd: maxim: Correct Samsung "Electronics" spelling in headers regulator: max8952: Correct Samsung "Electronics" spelling in copyright headers drivers/extcon/extcon-max77693.c | 2 +- drivers/nfc/s3fwrn5/core.c | 2 +- drivers/nfc/s3fwrn5/firmware.c | 2 +- drivers/nfc/s3fwrn5/firmware.h | 2 +- drivers/nfc/s3fwrn5/i2c.c | 2 +- drivers/nfc/s3fwrn5/nci.c | 2 +- drivers/nfc/s3fwrn5/nci.h | 2 +- drivers/nfc/s3fwrn5/phy_common.c | 4 ++-- drivers/nfc/s3fwrn5/phy_common.h | 4 ++-- drivers/nfc/s3fwrn5/s3fwrn5.h | 2 +- drivers/nfc/virtual_ncidev.c | 2 +- include/linux/mfd/max14577-private.h | 2 +- include/linux/mfd/max14577.h | 2 +- include/linux/mfd/max77686-private.h | 2 +- include/linux/mfd/max77686.h | 2 +- include/linux/mfd/max77693-private.h | 2 +- include/linux/mfd/max77693.h | 2 +- include/linux/mfd/max8997-private.h | 2 +- include/linux/mfd/max8997.h | 2 +- include/linux/mfd/max8998-private.h | 2 +- include/linux/mfd/max8998.h | 2 +- include/linux/regulator/max8952.h | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) -- 2.43.0 commit 831962e9d7b774d858cfeefc3848e06a2d5599df Merge: e4dca67b2463e6 5b5bf5922f4c10 Author: Mark Brown Date: Tue May 20 10:34:09 2025 +0100 Add sound card support for QCS9100 and QCS9075 Merge series from Mohammad Rafi Shaik : This patchset adds support for sound card on Qualcomm QCS9100 and QCS9075 boards. commit c5a219395b4e6312102a505bfe73aac8f8bada8c Author: Andrew Davis Date: Fri May 16 09:17:22 2025 -0500 regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ If either REGMAP_IRQ or REGMAP_MDIO are set then REGMAP is also set. This then enables the selecting of IRQ_DOMAIN or MDIO_BUS from REGMAP based on the above two symbols respectively. This makes it very easy to end up with "circular dependencies". Instead select the IRQ_DOMAIN or MDIO_BUS from the symbols that make use of them. This is almost equivalent to before but makes it less likely to end up with false circular dependency detections. Signed-off-by: Andrew Davis Reported-by: Krzysztof Kozlowski Closes: https://lore.kernel.org/r/bfe991fa-f54c-4d58-b2e0-34c4e4eb48f4@linaro.org/ Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250516141722.13772-1-afd@ti.com Signed-off-by: Mark Brown commit 688abe2860fd9c644705b9e11cb9649eb891b879 Author: Wentao Liang Date: Mon May 19 15:57:39 2025 +0800 ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params() The function sdm845_slim_snd_hw_params() calls the functuion snd_soc_dai_set_channel_map() but does not check its return value. A proper implementation can be found in msm_snd_hw_params(). Add error handling for snd_soc_dai_set_channel_map(). If the function fails and it is not a unsupported error, return the error code immediately. Fixes: 5caf64c633a3 ("ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga") Cc: stable@vger.kernel.org # v5.6 Signed-off-by: Wentao Liang Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250519075739.1458-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit 64639da56bb6228752d586d4a11aa19802852c10 Author: Sumanth Gavini Date: Sat May 17 01:25:27 2025 -0700 docs: i2c: Fix "resitors" to "resistors" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Signed-off-by: Wolfram Sang commit 5c52473b4496b3514444b55b1230d772cae2baa0 Author: Xu Yang Date: Wed May 7 18:27:14 2025 +0800 i2c: core: add useful info when defer probe Add an useful info when failed to get irq/wakeirq due to -EPROBE_DEFER. Before: [ 15.737361] i2c 2-0050: deferred probe pending: (reason unknown) After: [ 15.816295] i2c 2-0050: deferred probe pending: tcpci: can't get irq Signed-off-by: Xu Yang Reviewed-by: Carlos Song Reviewed-by: Frank Li Signed-off-by: Wolfram Sang commit a374cfbf609017f77a985357656be07a2da22c5f Author: Niklas Cassel Date: Thu May 15 15:56:27 2025 +0200 ata: libata-eh: Keep DIPM disabled while modifying the allowed LPM states Currently, it is possible that LPM is enabled while calling the set_lpm() callback. The current code performs a SET FEATURES command to disable DIPM if policy < ATA_LPM_MED_POWER_WITH_DIPM, this means that it will currently disable DIPM for policies: ATA_LPM_UNKNOWN, ATA_LPM_MAX_POWER, ATA_LPM_MED_POWER (but not for policy ATA_LPM_MED_POWER_WITH_DIPM). The code called after calling the set_lpm() callback will later perform a SET FEATURES command to enable DIPM, if policy >= ATA_LPM_MED_POWER_WITH_DIPM. As we can see DIPM will not be disabled before calling set_lpm() if the LPM policy is: ATA_LPM_MED_POWER_WITH_DIPM, ATA_LPM_MIN_POWER_WITH_PARTIAL, or ATA_LPM_MIN_POWER. Make sure that we always disable DIPM before calling the set_lpm() callback. This is because the set_lpm() callback is the function (for AHCI) that sets the proper bits in PxSCTL.IPM, reflecting the support of the HBA. PxSCTL.IPM controls the LPM states that the device is allowed to enter. If the device tries to enter a state disabled by PxSCTL.IPM, the host will NAK the transition. If we do not disable DIPM before modifying PxSCTL.IPM, it is possible that DIPM will try (and will be allowed to) enter a LPM state that the HBA does not support (since we have not yet written PxSCTL.IPM, the HBA wasn't able to NAK the transition). While at it, remove the guard of host support for DIPM around the disabling of DIPM. While it makes sense to take host support for DIPM into account when enabling DIPM, it makes zero sense to take host support into account when disabling DIPM. If the host does not support DIPM, that is an even bigger reason why DIPM should be disabled on the device side. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 6d915e2812b3faae71d54b914f6351a562204b79 Author: Niklas Cassel Date: Thu May 15 15:56:26 2025 +0200 ata: libata-eh: Rename no_dipm variable to be more clear Rename the no_dipm variable to host_has_dipm, by inverting the expression, and and also having a clearer name. No functional change. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 22cfba10dbfb3b4ded7038a543b74110d6d2de85 Author: Niklas Cassel Date: Thu May 15 15:56:25 2025 +0200 ata: libata-eh: Rename hipm and dipm variables Rename the hipm and dipm variables to have a clearer name. Also fold in the usage of no_dipm, as that is required in order to give the dipm variable a more descriptive name. No functional change. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 62eef53ab5ede2dba18ce4c5e7d031e05ab74025 Author: Niklas Cassel Date: Thu May 15 15:56:24 2025 +0200 ata: libata-eh: Add ata_eh_set_lpm() WARN_ON_ONCE link->lpm_policy is initialized to ATA_LPM_UNKNOWN in ata_eh_reset(). ata_eh_set_lpm() is then only called if link->lpm_policy != ap->target_lpm_policy (after reset) and then only if link->lpm_policy > ATA_LPM_MAX_POWER (before revalidation). This means that ata_eh_set_lpm() is currently never called with policy == ATA_LPM_UNKNOWN. Add a WARN_ON_ONCE so that it is more obvious from reading the code that this function is never called with policy == ATA_LPM_UNKNOWN. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 381d43b26282377a7e2f7ddfdd0147ad72353621 Author: Niklas Cassel Date: Thu May 15 15:56:23 2025 +0200 ata: libata-eh: Update DIPM comments to reflect reality The comments describing which LPM policies that has DIPM enabled predates the introduction of the LPM policies ATA_LPM_MIN_POWER_WITH_PARTIAL and ATA_LPM_MED_POWER_WITH_DIPM. Update the DIPM comments to reflect reality. Also remove the sentence that claims that "Order device and link configurations such that the host always allows DIPM requests." This comment is written before 24e0e61db3cb ("ata: libata: disallow dev-initiated LPM transitions to unsupported states"). Even though the set_lpm() call is done before enabling DIPM, the host will not always allow DIPM requests. For all LPM polcies where DIPM is enabled, only DIPM requests to LPM states that are supported by the HBA will be allowed. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 90ffe1f093e85ebb70212909607e0c0517aa65a5 Author: Philipp Stanner Date: Mon May 19 13:30:00 2025 +0200 PCI: Remove hybrid-devres usage warnings from kernel-doc pci/iomap.c still contains warnings about those functions not behaving in a managed manner if pcim_enable_device() was called. Since all hybrid behavior that users could know about has been removed by now, those explicit warnings are no longer necessary. Remove the hybrid-devres usage warnings from the kernel-doc. Signed-off-by: Philipp Stanner [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20250519112959.25487-8-phasta@kernel.org commit bcfc67157e413cbb41d363f8ee961a01130d0a73 Author: Philipp Stanner Date: Mon May 19 13:29:59 2025 +0200 PCI: Remove redundant set of request functions When the demangling of the hybrid devres functions within PCI was implemented, it was necessary to implement several PCI functions a second time to avoid cyclic calls, since the hybrid functions in pci.c call the managed functions in devres.c, which in turn can be directly used outside of PCI and needed request infrastructure, too. Therefore, __pcim_request_region_range(), __pci_release_region_range() and wrappers around them were implemented. The hybrid nature has recently been removed from all functions in pci.c. Therefore, the functions in devres.c can now directly use their counterparts in pci.c without causing a call-cycle. Remove __pcim_request_region_range(), __pcim_request_region_range() and the wrappers. Use the corresponding request functions from pci.c in devres.c Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20250519112959.25487-7-phasta@kernel.org commit 85826c11e77bb8bd18fbdae9bd04e51b4711c6f7 Author: Philipp Stanner Date: Mon May 19 13:29:58 2025 +0200 PCI: Remove exclusive requests flags from _pcim_request_region() pcim_request_region_exclusive(), the only user in PCI devres that needed exclusive region requests, has been removed. All features related to exclusive requests can, therefore, be removed, too. Remove them. Signed-off-by: Philipp Stanner [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250519112959.25487-6-phasta@kernel.org commit 652eea251dd852f02cef6223f367220acb3d1867 Author: Thuan Nguyen Date: Mon May 19 06:43:24 2025 +0000 arm64: dts: renesas: white-hawk-ard-audio: Fix TPU0 groups White Hawk ARD audio uses a clock generated by the TPU, but commit 3d144ef10a44 ("pinctrl: renesas: r8a779g0: Fix TPU suffixes") renamed pin group "tpu_to0_a" to "tpu_to0_b". Update DTS accordingly otherwise the sound driver does not receive a clock signal. Fixes: 3d144ef10a448f89 ("pinctrl: renesas: r8a779g0: Fix TPU suffixes") Signed-off-by: Thuan Nguyen Signed-off-by: Duy Nguyen Reviewed-by: Geert Uytterhoeven Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/TYCPR01MB8740608B675365215ADB0374B49CA@TYCPR01MB8740.jpnprd01.prod.outlook.com Signed-off-by: Geert Uytterhoeven commit faefb0a59c5914b7b8f737e2ec5c82822e5bc4c7 Author: Caleb James DeLisle Date: Wed May 7 13:45:00 2025 +0000 MAINTAINERS: Add entry for newly added EcoNet platform. Add a MAINTAINERS entry as part of integration of the EcoNet MIPS platform. Signed-off-by: Caleb James DeLisle Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 0ec4887009729297f7c10368084e41a8a9fbbd0e Author: Caleb James DeLisle Date: Wed May 7 13:44:59 2025 +0000 mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board Add DTS files in support of EcoNet platform, including SmartFiber XP8421-B, a low cost commercially available board based on EN751221. Signed-off-by: Caleb James DeLisle Signed-off-by: Thomas Bogendoerfer commit abc2d0bc2cb7c1412b8b254c0446f94b3e203c7c Author: Caleb James DeLisle Date: Wed May 7 13:44:58 2025 +0000 dt-bindings: vendor-prefixes: Add SmartFiber Add "smartfiber" vendor prefix for manufactorer of EcoNet based boards. Signed-off-by: Caleb James DeLisle Acked-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 35fb26f94dfa1b291086b84b2421f957214824d1 Author: Caleb James DeLisle Date: Wed May 7 13:44:57 2025 +0000 mips: Add EcoNet MIPS platform support Add platform support for EcoNet MIPS SoCs. Signed-off-by: Caleb James DeLisle Signed-off-by: Thomas Bogendoerfer commit be8b4173719a61fdd8379e86895d855775cf5f91 Author: Caleb James DeLisle Date: Wed May 7 13:44:56 2025 +0000 dt-bindings: mips: Add EcoNet platform binding Document the top-level device tree binding for EcoNet MIPS-based SoCs. Signed-off-by: Caleb James DeLisle Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 274fd5fe911956cdebeeed65981b7182d57c2773 Author: Bartosz Golaszewski Date: Mon May 19 13:10:43 2025 +0200 gpiolib: remove unneeded #ifdef We are already within another `#ifdef CONFIG_GPIOLIB_IRQCHIP` in gpiochip_to_irq() so there's no need for another guard. Remove it. Acked-by: Peng Fan Link: https://lore.kernel.org/r/20250519-gpio-irq-kconfig-fixes-v1-3-fe6ba1c6116d@linaro.org Signed-off-by: Bartosz Golaszewski commit 8da238b15cf5eb8a8dd318bd47e4d6050f5ca5d0 Author: Bartosz Golaszewski Date: Mon May 19 13:10:42 2025 +0200 gpio: mpc8xxx: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 7688a54d5b53 ("gpio: mpc8xxx: Make irq_chip immutable") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505180309.1nosQMkI-lkp@intel.com/ Acked-by: Peng Fan Link: https://lore.kernel.org/r/20250519-gpio-irq-kconfig-fixes-v1-2-fe6ba1c6116d@linaro.org Signed-off-by: Bartosz Golaszewski commit e2d9a7ead8ffbf562c4f38d3115f98d1933e360a Author: Bartosz Golaszewski Date: Mon May 19 13:10:41 2025 +0200 gpio: pxa: select GPIOLIB_IRQCHIP This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 20117cf426b6 ("gpio: pxa: Make irq_chip immutable") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505181429.mzyIatOU-lkp@intel.com/ Acked-by: Peng Fan Link: https://lore.kernel.org/r/20250519-gpio-irq-kconfig-fixes-v1-1-fe6ba1c6116d@linaro.org Signed-off-by: Bartosz Golaszewski commit 2695b3c7fe4fa06a377ea0d66e3fe5fdb60310f0 Author: Eric Biggers Date: Sun May 11 11:28:36 2025 -0700 MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine() bcm963xx_nvram_checksum() was using crc32_le_combine() to update a CRC with four zero bytes. However, this is about 5x slower than just CRC'ing four zero bytes in the normal way. Just do that instead. (We could instead make crc32_le_combine() faster on short lengths. But all its callers do just fine without it, so I'd like to just remove it.) Signed-off-by: Eric Biggers Signed-off-by: Thomas Bogendoerfer commit 3590692a136d75e39cd67b0f23e032669fcdbcd2 Author: Charan Pedumuru Date: Wed May 7 06:29:35 2025 +0000 mips: dts: pic32: pic32mzda: Rename the sdhci nodename to match with common mmc-controller binding Rename the sdhci nodename from "sdhci@" to "mmc@" to align with linux common mmc-controller binding. Signed-off-by: Charan Pedumuru Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 4cc7543eb494daae7d6282e17459e1b06eff82aa Author: Gregory CLEMENT Date: Mon May 5 14:57:58 2025 +0200 MIPS: SMP: Move the AP sync point before the non-parallel aware functions When CONFIG_HOTPLUG_PARALLEL is enabled, the code executing before cpuhp_ap_sync_alive() is executed in parallel, while after it is serialized. The functions set_cpu_sibling_map() and set_cpu_core_map() were not designed to be executed in parallel, so by moving the cpuhp_ap_sync_alive() before cpuhp_ap_sync_alive(), we then ensure they will be called serialized. The measurement done on EyeQ5 did not show any relevant boot time increase after applying this patch. Fixes: 76c43eb507bc ("MIPS: SMP: Implement parallel CPU bring up for EyeQ") Reported-by: Huacai Chen Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit e7a37c9e428a2912a4eec160e633503cd72e1ee6 Author: Zilin Guan Date: Wed May 14 08:48:39 2025 +0000 xfrm: use kfree_sensitive() for SA secret zeroization High-level copy_to_user_* APIs already redact SA secret fields when redaction is enabled, but the state teardown path still freed aead, aalg and ealg structs with plain kfree(), which does not clear memory before deallocation. This can leave SA keys and other confidential data in memory, risking exposure via post-free vulnerabilities. Since this path is outside the packet fast path, the cost of zeroization is acceptable and prevents any residual key material. This patch replaces those kfree() calls unconditionally with kfree_sensitive(), which zeroizes the entire buffer before freeing. Signed-off-by: Zilin Guan Signed-off-by: Steffen Klassert commit 6c9bb86922728c7a4cceb99f131e00dd87514f20 Author: Mike Tipton Date: Wed May 14 20:53:12 2025 -0700 cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs Currently, all SCMI devices with performance domains attempt to register a cpufreq driver, even if their performance domains aren't used to control the CPUs. The cpufreq framework only supports registering a single driver, so only the first device will succeed. And if that device isn't used for the CPUs, then cpufreq will scale the wrong domains. To avoid this, return early from scmi_cpufreq_probe() if the probing SCMI device isn't referenced by the CPU device phandles. This keeps the existing assumption that all CPUs are controlled by a single SCMI device. Signed-off-by: Mike Tipton Reviewed-by: Peng Fan Reviewed-by: Cristian Marussi Reviewed-by: Sudeep Holla Tested-by: Cristian Marussi Signed-off-by: Viresh Kumar commit c410aabd0321468b6569f31931aa32ddc5897ca9 Merge: a374f28700abd2 06149d8f221689 Author: Viresh Kumar Date: Tue May 20 11:24:12 2025 +0530 Merge branch 'rust/cpufreq-dt' into cpufreq/arm/linux-next commit 06149d8f2216894cee86106c701d13141948f159 Author: Viresh Kumar Date: Thu Feb 1 10:36:24 2024 +0530 cpufreq: Add Rust-based cpufreq-dt driver Introduce a Rust-based implementation of the cpufreq-dt driver, covering most of the functionality provided by the existing C version. Some features, such as retrieving platform data from `cpufreq-dt-platdev.c`, are still pending. The driver has been tested with QEMU, and frequency scaling works as expected. Signed-off-by: Viresh Kumar commit 14f47156cf390606eb719da9ad1058f87af0a291 Author: Viresh Kumar Date: Tue Jan 7 12:53:32 2025 +0530 rust: opp: Extend OPP abstractions with cpufreq support Extend the OPP abstractions to include support for interacting with the cpufreq core, including the ability to retrieve frequency tables from OPP table. Signed-off-by: Viresh Kumar commit c6af9a1191d042839e56abff69e8b0302d117988 Author: Viresh Kumar Date: Wed Jan 24 12:36:33 2024 +0530 rust: cpufreq: Extend abstractions for driver registration Extend the cpufreq abstractions to support driver registration from Rust. Reviewed-by: Danilo Krummrich Signed-off-by: Viresh Kumar commit 6ebdd7c9317737123b260a24e2780018008f1295 Author: Viresh Kumar Date: Wed May 7 15:32:25 2025 +0530 rust: cpufreq: Extend abstractions for policy and driver ops Extend the cpufreq abstractions to include support for policy handling and driver operations. Signed-off-by: Viresh Kumar commit 2207856ff0bc8d953d6e89bda70b8978c2de8bab Author: Viresh Kumar Date: Tue Jan 7 12:51:08 2025 +0530 rust: cpufreq: Add initial abstractions for cpufreq framework Introduce initial Rust abstractions for the cpufreq core. This includes basic representations for cpufreq flags, relation types, and the cpufreq table. Signed-off-by: Viresh Kumar commit b2446a16dbf2347a07af0cf994ca36576d94df77 Author: Yikai Tsai Date: Mon May 19 16:40:51 2025 +0800 hwmon: (isl28022) Fix current reading calculation According to the ISL28022 datasheet, bit15 of the current register is representing -32768. Fix the calculation to properly handle this bit, ensuring correct measurements for negative values. Signed-off-by: Yikai Tsai Link: https://lore.kernel.org/r/20250519084055.3787-2-yikai.tsai.wiwynn@gmail.com Signed-off-by: Guenter Roeck commit ce32e2d47ce6c472a931eabe53f841c62b6abfe5 Author: Viresh Kumar Date: Mon Dec 18 11:15:13 2023 +0530 rust: opp: Add abstractions for the configuration options Introduce Rust abstractions for the OPP core configuration options, enabling safe access to various configurable aspects of the OPP framework. Signed-off-by: Viresh Kumar commit d52c7e868fbc134d88bb04d5909f2df2f9da5202 Author: Viresh Kumar Date: Mon Dec 18 11:15:13 2023 +0530 rust: opp: Add abstractions for the OPP table Introduce Rust abstractions for `struct opp_table`, enabling access to OPP tables from Rust. Signed-off-by: Viresh Kumar commit 8f835497b32b59c0ba8b5e1805b7e89dd38cd9f9 Author: Viresh Kumar Date: Mon Dec 18 11:15:13 2023 +0530 rust: opp: Add initial abstractions for OPP framework Introduce initial Rust abstractions for the Operating Performance Points (OPP) framework. This includes bindings for `struct dev_pm_opp` and `struct dev_pm_opp_data`, laying the groundwork for further OPP integration. Signed-off-by: Viresh Kumar commit 3accb57d56a9bcf1cab1e908e88a235e899a2e82 Author: Viresh Kumar Date: Wed Jan 8 16:18:38 2025 +0530 rust: cpu: Add from_cpu() This implements cpu::from_cpu(), which returns a reference to Device for a CPU. The C struct is created at initialization time for CPUs and is never freed and so ARef isn't returned from this function. The new helper will be used by Rust based cpufreq drivers. Signed-off-by: Viresh Kumar commit a4e3b76e4d5c265824e686661a79f75df09c4834 Author: Anisse Astier Date: Wed Jan 22 14:39:52 2025 +0100 rust: macros: enable use of hyphens in module names Some modules might need naming that contains hyphens "-" to match the auto-probing by name in the platform devices that comes from the device tree. But Rust identifier cannot contain hyphens, so replace them with underscores. Signed-off-by: Anisse Astier Reviewed-by: Alice Ryhl [ Viresh: Replace "-" with '-', minor commit log fix, rename variable and fix line length checkpatch warnings ] Reviewed-by: Benno Lossin Signed-off-by: Viresh Kumar commit 9e221d8cf90b8599a6a3d62a1ebb712468f42a35 Author: Nilay Shroff Date: Wed May 14 18:33:17 2025 +0530 nvme: rename nvme_mpath_shutdown_disk to nvme_mpath_remove_disk In the NVMe context, the term "shutdown" has a specific technical meaning. To avoid confusion, this commit renames the nvme_mpath_ shutdown_disk function to nvme_mpath_remove_disk to better reflect its purpose (i.e. removing the disk from the system). However, nvme_mpath_remove_disk was already in use, and its functionality is related to releasing or putting the head node disk. To resolve this naming conflict and improve clarity, the existing nvme_mpath_ remove_disk function is also renamed to nvme_mpath_put_disk. This renaming improves code readability and better aligns function names with their actual roles. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Nilay Shroff Signed-off-by: Christoph Hellwig commit 737af5f0011a400c79c7fa7bce2f5bcb69be35d7 Author: Nilay Shroff Date: Wed May 14 18:33:16 2025 +0530 nvme: introduce multipath_always_on module param Currently, a multipath head disk node is not created for single- ported NVMe adapters or private namespaces with non-unique NSID. However, creating a head node in these cases can help transparently handle transient PCIe link failures. Without a head node, features like delayed removal cannot be leveraged, making it difficult to tolerate such link failures. To address this, this commit introduces nvme_core module parameter multipath_always_on. When multipath_always_on is set to true, it forces the creation of a multipath head node regardless NVMe disk or namespace type. So this option allows the use of delayed removal of head node functionality even for single-ported NVMe disks and private namespaces with a unique NSID and thus helps transparently handle transient PCIe link failures. By default multipath_always_on is set to false, thus preserving the existing behavior. Setting it to true enables improved fault tolerance in PCIe setups. Moreover, please note that enabling this option would also implicitly enable nvme_core.multipath. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Nilay Shroff Signed-off-by: Christoph Hellwig commit 62188639ec160eb77cb758c3a95947ebc918e76f Author: Nilay Shroff Date: Wed May 14 18:33:15 2025 +0530 nvme-multipath: introduce delayed removal of the multipath head node Currently, the multipath head node of an NVMe disk is removed immediately as soon as all paths of the disk are removed. However, this can cause issues in scenarios where: - The disk hot-removal followed by re-addition. - Transient PCIe link failures that trigger re-enumeration, temporarily removing and then restoring the disk. In these cases, removing the head node prematurely may lead to a head disk node name change upon re-addition, requiring applications to reopen their handles if they were performing I/O during the failure. To address this, introduce a delayed removal mechanism of head disk node. During transient failure, instead of immediate removal of head disk node, the system waits for a configurable timeout, allowing the disk to recover. During transient disk failure, if application sends any IO then we queue it instead of failing such IO immediately. If the disk comes back online within the timeout, the queued IOs are resubmitted to the disk ensuring seamless operation. In case disk couldn't recover from the failure then queued IOs are failed to its completion and application receives the error. So this way, if disk comes back online within the configured period, the head node remains unchanged, ensuring uninterrupted workloads without requiring applications to reopen device handles. A new sysfs attribute, named "delayed_removal_secs" is added under head disk blkdev for user who wish to configure time for the delayed removal of head disk node. The default value of this attribute is set to zero second ensuring no behavior change unless explicitly configured. Link: https://lore.kernel.org/linux-nvme/Y9oGTKCFlOscbPc2@infradead.org/ Link: https://lore.kernel.org/linux-nvme/Y+1aKcQgbskA2tra@kbusch-mbp.dhcp.thefacebook.com/ Suggested-by: Keith Busch Suggested-by: Christoph Hellwig [nilay: reworked based on the original idea/POC from Christoph and Keith] Reviewed-by: Hannes Reinecke Signed-off-by: Nilay Shroff Signed-off-by: Christoph Hellwig commit 414a4c93f1741b820597a746ff64d9cbc69d9f64 Author: Christoph Hellwig Date: Tue May 13 09:06:49 2025 +0200 nvme-pci: derive and better document max segments limits Redefine the max segments and max integrity limits based on the limiting factors. This keeps exactly the same values for 4k PAGE_SIZE systems, but increases the number of segments for larger page size as it properly derives the scatterlist allocation based limit for them instead of assuming a 4k PAGE_SIZE. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch commit de65e642644a20576af4e9d88fcbd911766c6b57 Author: Christoph Hellwig Date: Mon May 12 17:20:44 2025 +0200 nvme-pci: use struct_size for allocation struct nvme_dev This avoids open coding the variable size array arithmetics. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos Reviewed-by: Leon Romanovsky commit f01e389e88b27a55674bc11d5d44dc75f0d83745 Author: Leon Romanovsky Date: Mon May 12 17:17:27 2025 +0200 nvme-pci: add a symolic name for the small pool size Open coding magic numbers in multiple places is never a good idea. Signed-off-by: Leon Romanovsky [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos commit a43d304f3abea73883f99287396a6e1eb57c3637 Author: Christoph Hellwig Date: Mon May 12 17:16:04 2025 +0200 nvme-pci: use a better encoding for small prp pool allocations Add a separate flag to encode that the transfer is using the small page sized pool, and use a normal 0..n count for the number of descriptors. Contains improvements and suggestions from Kanchan Joshi and Leon Romanovsky . Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Leon Romanovsky commit 357b536b3633afc174905f791cc00fd9fd2932b0 Author: Christoph Hellwig Date: Mon May 12 17:13:33 2025 +0200 nvme-pci: rename the descriptor pools They are used for both PRPs and SGLs, and we use descriptor elsewhere when referring to their allocations, so use that name here as well. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos Reviewed-by: Leon Romanovsky commit 1755b32516bb42123b0030080226d6079999621d Author: Christoph Hellwig Date: Sat May 10 05:49:41 2025 +0200 nvme-pci: remove struct nvme_descriptor There is no real point in having a union of two pointer types here, just use a void pointer as we mix and match types between the arms of the union between the allocation and freeing side already. Also rename the nr_allocations field to nr_descriptors to better describe what it does. Signed-off-by: Christoph Hellwig [leon: ported forward to include metadata SGL support] Signed-off-by: Leon Romanovsky Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi commit 906573c3bfe382d326952c1a72ee9a06448c1db1 Author: Leon Romanovsky Date: Sat May 10 05:47:03 2025 +0200 nvme-pci: store aborted state in flags variable Instead of keeping dedicated "bool aborted" variable, switch to a flags flags that can be used for other flags as well. Signed-off-by: Leon Romanovsky Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos commit a40c20a605ed48159ea3d9a2bd4532c167995aa3 Author: Christoph Hellwig Date: Sun May 11 06:04:27 2025 +0200 nvme-pci: don't try to use SGLs for metadata on the admin queue No admin command defined in an NVMe specification supports metadata, but to protect against vendor specific commands using metadata ensure that we don't try to use SGLs for metadata on the admin queue, as NVMe does not support SGLs on the admin queue for the PCI transport. Do this by checking if the data transfer has been setup using SGLs as that is required for using SGLs for metadata. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Leon Romanovsky commit d977506f8863807129d7a11f4057dfb1b38085ea Author: Caleb Sander Mateos Date: Mon May 12 15:50:40 2025 +0200 nvme-pci: make PRP list DMA pools per-NUMA-node NVMe commands with over 8 KB of discontiguous data allocate PRP list pages from the per-nvme_device dma_pool prp_page_pool or prp_small_pool. Each call to dma_pool_alloc() and dma_pool_free() takes the per-dma_pool spinlock. These device-global spinlocks are a significant source of contention when many CPUs are submitting to the same NVMe devices. On a workload issuing 32 KB reads from 16 CPUs (8 hypertwin pairs) across 2 NUMA nodes to 23 NVMe devices, we observed 2.4% of CPU time spent in _raw_spin_lock_irqsave called from dma_pool_alloc and dma_pool_free. Ideally, the dma_pools would be per-hctx to minimize contention. But that could impose considerable resource costs in a system with many NVMe devices and CPUs. As a compromise, allocate per-NUMA-node PRP list DMA pools. Map each nvme_queue to the set of DMA pools corresponding to its device and its hctx's NUMA node. This reduces the _raw_spin_lock_irqsave overhead by about half, to 1.2%. Preventing the sharing of PRP list pages across NUMA nodes also makes them cheaper to initialize. Link: https://lore.kernel.org/linux-nvme/CADUfDZqa=OOTtTTznXRDmBQo1WrFcDw1hBA7XwM7hzJ-hpckcA@mail.gmail.com/T/#u Signed-off-by: Caleb Sander Mateos Reviewed-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit b9d1ec530cdb631a3298de97c7b2ccc6145e1798 Author: Caleb Sander Mateos Date: Fri Apr 25 20:06:35 2025 -0600 nvme-pci: factor out a nvme_init_hctx_common() helper nvme_init_hctx() and nvme_admin_init_hctx() are very similar. In preparation for adding more logic, factor out a nvme_init_hctx-common() helper. Signed-off-by: Caleb Sander Mateos Reviewed-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit 1c9a93bf1d01729c54e9acbaa538db81f16563b2 Author: Keith Busch Date: Fri Apr 25 20:06:34 2025 -0600 dmapool: add NUMA affinity support Introduce dma_pool_create_node(), like dma_pool_create() but taking an additional NUMA node argument. Allocate struct dma_pool on the desired node, and store the node on dma_pool for allocating struct dma_page. Make dma_pool_create() an alias for dma_pool_create_node() with node set to NUMA_NO_NODE. Signed-off-by: Keith Busch Signed-off-by: Caleb Sander Mateos Reviewed-by: Jens Axboe Reviewed-by: John Garry Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit 0164d1350a651fd208a8c7138443dc4af82e0fa5 Author: Daniel Wagner Date: Wed May 7 14:23:10 2025 +0200 nvme-fc: do not reference lsrsp after failure The lsrsp object is maintained by the LLDD. The lifetime of the lsrsp object is implicit. Because there is no explicit cleanup/free call into the LLDD, it is not safe to assume after xml_rsp_fails, that the lsrsp is still valid. The LLDD could have freed the object already. With the recent changes how fcloop tracks the resources, this is the case. Thus don't access lsrsp after xml_rsp_fails. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 3466b7a6b713071190888526d3b9c58cda60b55f Author: Daniel Wagner Date: Wed May 7 14:23:06 2025 +0200 nvmet-fcloop: don't wait for lport cleanup The lifetime of the fcloop_lsreq is not tight to the lifetime of the host or target port, thus there is no need anymore to synchronize the cleanup path anymore. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit d7f7c6eb809ae36466a503b20689956b86e13827 Author: Daniel Wagner Date: Wed May 7 14:23:02 2025 +0200 nvmet-fcloop: add missing fcloop_callback_host_done Add the missing fcloop_call_host_done calls so that the caller frees resources when something goes wrong. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 596cba55adb473f26bfd3f6dd78f169810069531 Author: Daniel Wagner Date: Wed May 7 14:23:09 2025 +0200 nvmet-fc: take tgtport refs for portentry Ensure that the tgtport is not going away as long portentry has a pointer on it. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit bbccbf791e6ffea86877eafb7489a63c6f7aef6d Author: Daniel Wagner Date: Wed May 7 14:23:08 2025 +0200 nvmet-fc: free pending reqs on tgtport unregister When nvmet_fc_unregister_targetport is called by the LLDD, it's not possible to communicate with the host, thus all pending request will not be process. Thus explicitly free them. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 84eedced1c5b84fe4f9740e4594b2dc99b569388 Author: Daniel Wagner Date: Wed May 7 14:23:07 2025 +0200 nvmet-fcloop: drop response if targetport is gone When the target port is gone, the lsrsp pointer is invalid. Thus don't call the done function anymore instead just drop the response. This happens when the target sends a disconnect association. After this the target starts tearing down all resources and doesn't expect any response. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 772042dd38eeb9caaed1476a873cd8359e893775 Author: Daniel Wagner Date: Wed May 7 14:23:05 2025 +0200 nvmet-fcloop: allocate/free fcloop_lsreq directly fcloop depends on the host or the target to allocate the fcloop_lsreq object. This means that the lifetime of the fcloop_lsreq is tied to either the host or the target. Consequently, the host or the target must cooperate during shutdown. Unfortunately, this approach does not work well when the target forces a shutdown, as there are dependencies that are difficult to resolve in a clean way. The simplest solution is to decouple the lifetime of the fcloop_lsreq object by managing them directly within fcloop. Since this is not a performance-critical path and only a small number of LS objects are used during setup and cleanup, it does not significantly impact performance to allocate them during normal operation. Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 2b559a3eb56b6e1a51ca6f4a17778a1b4e14a591 Author: Daniel Wagner Date: Wed May 7 14:23:04 2025 +0200 nvmet-fcloop: prevent double port deletion The delete callback can be called either via the unregister function or from the transport directly. Thus it is necessary ensure resources are not freed multiple times. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 47a827cd7929d0550c3496d70b417fcb5649b27b Author: Daniel Wagner Date: Wed May 7 14:23:03 2025 +0200 nvmet-fcloop: access fcpreq only when holding reqlock The abort handling logic expects that the state and the fcpreq are only accessed when holding the reqlock lock. While at it, only handle the aborts in the abort handler. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 88ea8f814d8d006e78a4986a8c9e910788c8a5ec Author: Daniel Wagner Date: Wed May 7 14:23:01 2025 +0200 nvmet-fcloop: update refs on tfcp_req Track the lifetime of the in-flight tfcp_req to ensure the object is not freed too early. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit fbaed6a810a3c4aa68fe3d486608469d15c9d4e8 Author: Daniel Wagner Date: Wed May 7 14:23:00 2025 +0200 nvmet-fcloop: refactor fcloop_delete_local_port Use the newly introduced fcloop_lport_lookup instead of the open coded version. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit d54a9d7f6d74ee385d496f0efd282ce9d4fbfcbc Author: Daniel Wagner Date: Wed May 7 14:22:59 2025 +0200 nvmet-fcloop: refactor fcloop_nport_alloc and track lport The checks for a valid input values are mixed with the logic to insert a newly allocated nport. Refactor the function so that first the checks are done. This allows to untangle the setup steps into a more linear form which reduces the complexity of the functions. Also start tracking lport when a lport is assigned to a nport. This ensures, that the lport is not going away as long it is still referenced by a nport. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit b999efc8cf41420f9d9f8b08c111ad80e49b274e Author: Daniel Wagner Date: Wed May 7 14:22:58 2025 +0200 nvmet-fcloop: remove nport from list on last user The nport object has an association with the rport and lport object, that means we can only remove an nport object from the global nport_list after the last user of an rport or lport is gone. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit d6c40d87e7fed4b10f2fe93c90487145e2622ebf Author: Daniel Wagner Date: Wed May 7 14:22:57 2025 +0200 nvmet-fcloop: track ref counts for nports A nport object is always used in association with targerport, remoteport, tport and rport objects. Add explicit references for any of the associated object. This ensures that nport is not removed too early on shutdown sequences. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 6b262697dafeb8d558f9ddb2207159ec770e213e Author: Hannes Reinecke Date: Wed May 7 10:28:18 2025 +0200 nvmet-auth: use SHASH_DESC_ON_STACK Use SHASH_DESC_ON_STACK to avoid explicit allocation. Signed-off-by: Hannes Reinecke Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit fee45888a3e445999dec66301797c768f7d16028 Author: Hannes Reinecke Date: Wed May 7 10:28:17 2025 +0200 nvme-auth: use SHASH_DESC_ON_STACK Use SHASH_DESC_ON_STACK to avoid explicit allocation. Signed-off-by: Hannes Reinecke Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit 87b4d5ec0dca44e316c37ca84cd00c31cc8e8e14 Author: Wilfred Mallawa Date: Thu Apr 24 15:13:53 2025 +1000 nvmet: simplify the nvmet_req_init() interface Now that a submission queue holds a reference to its completion queue, there is no need to pass the cq argument to nvmet_req_init(), so remove it. Signed-off-by: Wilfred Mallawa Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit 94ee8708c91f6640d968e3064ee806fe94f30463 Author: Wilfred Mallawa Date: Thu Apr 24 15:13:52 2025 +1000 nvmet: support completion queue sharing The NVMe PCI transport specification allows for completion queues to be shared by different submission queues. This patch allows a submission queue to keep track of the completion queue it is using with reference counting. As such, it can be ensured that a completion queue is not deleted while a submission queue is actively using it. This patch enables completion queue sharing in the pci-epf target driver. For fabrics drivers, completion queue sharing is not enabled as it is not possible as per the fabrics specification. However, this patch modifies the fabrics drivers to correctly integrate the new API that supports completion queue sharing. Signed-off-by: Wilfred Mallawa Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit bb78836b3a7cad311ea40106de8891b18a318620 Author: Wilfred Mallawa Date: Thu Apr 24 15:13:51 2025 +1000 nvmet: fabrics: add CQ init and destroy With struct nvmet_cq now having a reference count, this patch amends the target fabrics call chain to initialize and destroy/put a completion queue. Signed-off-by: Wilfred Mallawa Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit cbc5acdbbcf7dc11b64ab09efd21f6bd02d77d02 Author: Wilfred Mallawa Date: Thu Apr 24 15:13:50 2025 +1000 nvmet: cq: prepare for completion queue sharing For the PCI transport, the NVMe specification allows submission queues to share completion queues, however, this is not supported in the current NVMe target implementation. This is a preparatory patch to allow for completion queue (CQ) sharing between different submission queues (SQ). To support queue sharing, reference counting completion queues is required. This patch adds the refcount_t field ref to struct nvmet_cq coupled with respective nvmet_cq_init(), nvmet_cq_get(), nvmet_cq_put(), nvmet_cq_is_deletable() and nvmet_cq_destroy() functions. A CQ reference count is initialized with nvmet_cq_init() when a CQ is created. Using nvmet_cq_get(), a reference to a CQ is taken when an SQ is created that uses the respective CQ. Similarly. when an SQ is destroyed, the reference count to the respective CQ from the SQ being destroyed is decremented with nvmet_cq_put(). The last reference to a CQ is dropped on a CQ deletion using nvmet_cq_put(), which invokes nvmet_cq_destroy() to fully cleanup after the CQ. The helper function nvmet_cq_in_use() is used to determine if any SQs are still using the CQ pending deletion. In which case, the CQ must not be deleted. This should protect scenarios where a bad host may attempt to delete a CQ without first having deleted SQ(s) using that CQ. Additionally, this patch adds an array of struct nvmet_cq to the nvmet_ctrl structure. This allows for the controller to keep track of CQs as they are created and destroyed, similar to the current tracking done for SQs. The memory for this array is freed when the controller is freed. A struct nvmet_ctrl reference is also added to the nvmet_cq structure to allow for CQs to be removed from the controller whilst keeping the new API similar to the existing API for SQs. Sample callchain with CQ refcounting for the PCI endpoint target (pci-epf): i. nvmet_execute_create_cq -> nvmet_pci_epf_create_cq -> nvmet_cq_create -> nvmet_cq_init [cq refcount=1] ii. nvmet_execute_create_sq -> nvmet_pci_epf_create_sq -> nvmet_sq_create -> nvmet_sq_init -> nvmet_cq_get [cq refcount=2] iii. nvmet_execute_delete_sq - > nvmet_pci_epf_delete_sq -> -> nvmet_sq_destroy -> nvmet_cq_put [cq refcount 1] iv. nvmet_execute_delete_cq -> nvmet_pci_epf_delete_cq -> nvmet_cq_put [cq refcount 0] Signed-off-by: Wilfred Mallawa Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit b3649f829a842f4f09a0912781936fc2f2d02253 Author: Wilfred Mallawa Date: Thu Apr 24 15:13:49 2025 +1000 nvmet: add a helper function for cqid checking This patch adds a new helper function nvmet_check_io_cqid(). It is to be used when parsing host commands for IO CQ creation/deletion and IO SQ creation to ensure that the specified IO completion queue identifier (CQID) is not 0 (Admin queue ID). This is a check that already occurs in the nvmet_execute_x() functions prior to nvmet_check_cqid. With the addition of this helper function, the CQ ID checks in the nvmet_execute_x() function can be removed, and instead simply call nvmet_check_io_cqid() in place of nvmet_check_cqid(). Signed-off-by: Wilfred Mallawa Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit c91a20129185d5153cd845c857b4f9fce61e28d1 Author: Hannes Reinecke Date: Tue Apr 22 11:15:55 2025 +0200 nvmet-auth: authenticate on admin queue only Do not start authentication on I/O queues as it doesn't really add value, and secure concatenation disallows it anyway. Authentication commands on I/O queues are not aborted, so the host may still run the authentication protocol on I/O queues. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit f791252b649653fe0477da79aa40c82d5bc407de Author: Hannes Reinecke Date: Tue Apr 22 11:15:56 2025 +0200 nvme-auth: do not re-authenticate queues with no prior authentication When sending 'connect' the queues can figure out from the return code whether authentication is required or not. But reauthentication doesn't disconnect the queues, so this check is not available. Rather we need to check whether the queue had been authenticated initially to figure out if we need to reauthenticate. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6b868deaa1c3ad5737e59074985efccf39e7fea2 Author: Eric Biggers Date: Tue Feb 25 22:28:40 2025 -0800 nvmet-tcp: switch to using the crc32c library Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Signed-off-by: Eric Biggers Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 5df496e9ef12e85dcc21488069bbf1b0285aca00 Author: Marcelo Moreira Date: Thu Apr 3 20:23:56 2025 -0300 nvmet: replace strncpy with strscpy The strncpy() function is deprecated for NUL-terminated strings as explained in the "strncpy() on NUL-terminated strings" section of Documentation/process/deprecated.rst. The key issues are: - strncpy() fails to guarantee NULL-termination when source > destination - it unnecessarily zero-pads short strings, causing performance overhead strscpy() is the proper replacement because: - it guarantees NULL-termination - it avoids redundant zero-padding - it aligns with current kernel string-copying best practice memcpy() was rejected because: - NQN buffers (subsysnqn/hostnqn) are treated as NULL-terminated strings: - strcmp() usage in nvmet_host_allowed() (discovery.c) - strscpy() to copy subsysnqn in nvmet_execute_disc_identify() seq_buf wasn't used because: - this is a simple fixed-size buffer copy - there is no need for progressive string construction features Signed-off-by: Marcelo Moreira Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 674f872b7cefab4564ec8b34c799a4a653e34513 Author: Hannes Reinecke Date: Thu Apr 3 08:55:20 2025 +0200 nvme-tcp: open-code nvme_tcp_queue_request() for R2T When handling an R2T PDU we short-circuit nvme_tcp_queue_request() as we should not attempt to send consecutive PDUs. So open-code nvme_tcp_queue_request() for R2T and drop the last argument. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg commit 73becfd6d80307c35999ced6f213a8f16af3b01e Author: Hannes Reinecke Date: Tue Apr 15 08:00:21 2025 +0200 nvme-tcp: remove redundant check to ctrl->opts When checking for secure concatenation we have already validated that 'ctrl->opts' is set, so we can remove this check. Reported-by: Dan Carpenter Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit deed1904512c7e44f449a522af6676a8640e5989 Author: Gustavo A. R. Silva Date: Fri Mar 28 08:25:08 2025 -0600 nvme-loop: avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the structure. Notice that `struct nvme_loop_iod` is a flexible structure --a structure that contains a flexible-array member. Fix the following warning: drivers/nvme/target/loop.c:36:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f685204c57e87d2a88b159c7525426d70ee745c9 Merge: e41703aca2f5ac 84b21e61ebd649 Author: Jakub Kicinski Date: Mon May 19 20:09:07 2025 -0700 Merge branch 'queue_api-reduce-risk-of-name-collision-over-txq' Gur Stavi says: ==================== queue_api: reduce risk of name collision over txq Rename local variable in macros from txq to _txq. When macro parameter get_desc is expended it is likely to have a txq token that refers to a different txq variable at the caller's site. ==================== Link: https://patch.msgid.link/cover.1747559621.git.gur.stavi@huawei.com Signed-off-by: Jakub Kicinski commit 84b21e61ebd64931d865ce3df49d930db8c9e2cd Author: Gur Stavi Date: Sun May 18 13:00:54 2025 +0300 queue_api: reduce risk of name collision over txq Rename local variable in macros from txq to _txq. When macro parameter get_desc is expended it is likely to have a txq token that refers to a different txq variable at the caller's site. Signed-off-by: Gur Stavi Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/95b60d218f004308486d92ed17c8cc6f28bac09d.1747559621.git.gur.stavi@huawei.com Signed-off-by: Jakub Kicinski commit e41703aca2f5ac0634c937e260f79ab8ab0a3f88 Merge: c6a957d067912f 494565a7450267 Author: Jakub Kicinski Date: Mon May 19 20:07:41 2025 -0700 Merge branch '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== idpf: add initial PTP support Milena Olech says: This patch series introduces support for Precision Time Protocol (PTP) to Intel(R) Infrastructure Data Path Function (IDPF) driver. PTP feature is supported when the PTP capability is negotiated with the Control Plane (CP). IDPF creates a PTP clock and sets a set of supported functions. During the PTP initialization, IDPF requests a set of PTP capabilities and receives a writeback from the CP with the set of supported options. These options are: - get time of the PTP clock - set the time of the PTP clock - adjust the PTP clock - Tx timestamping Each feature is considered to have direct access, where the operations on PCIe BAR registers are allowed, or the mailbox access, where the virtchnl messages are used to perform any PTP action. Mailbox access means that PTP requests are sent to the CP through dedicated secondary mailbox and the CP reads/writes/modifies desired resource - PTP Clock or Tx timestamp registers. Tx timestamp capabilities are negotiated only for vports that have UPLINK_VPORT flag set by the CP. Capabilities provide information about the number of available Tx timestamp latches, their indexes and size of the Tx timestamp value. IDPF requests Tx timestamp by setting the TSYN bit and the requested timestamp index in the context descriptor for the PTP packets. When the completion tag for that packet is received, IDPF schedules a worker to read the Tx timestamp value. * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: idpf: add support for Rx timestamping idpf: add Tx timestamp flows idpf: add Tx timestamp capabilities negotiation idpf: add PTP clock configuration idpf: add mailbox access to read PTP clock time idpf: negotiate PTP capabilities and get PTP clock idpf: move virtchnl structures to the header file virtchnl: add PTP virtchnl definitions idpf: add initial PTP support idpf: change the method for mailbox workqueue allocation ==================== Link: https://patch.msgid.link/20250516170645.1172700-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 4b59f4fd0a36c31876344d7e0cfdcb0202d09cf2 Author: Randy Dunlap Date: Thu May 1 18:44:21 2025 -0700 security/smack/smackfs: small kernel-doc fixes Add function short descriptions to the kernel-doc where missing. Correct a verb and add ending periods to sentences. smackfs.c:1080: warning: missing initial short description on line: * smk_net4addr_insert smackfs.c:1343: warning: missing initial short description on line: * smk_net6addr_insert Signed-off-by: Randy Dunlap Cc: Casey Schaufler Cc: linux-security-module@vger.kernel.org Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" commit c6a957d067912f1ab4e3be4c92d3730c21d1ddb8 Author: Sumanth Gavini Date: Fri May 16 15:51:48 2025 -0700 selftests: drv-net: Fix "envirnoments" to "environments" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250516225156.1122058-1-sumanth.gavini@yahoo.com Signed-off-by: Jakub Kicinski commit a462903fa22541f212134fba81084315ad843e6e Author: Johannes Berg Date: Fri May 16 13:59:27 2025 +0200 net: netlink: reduce extack cookie size Seems like the extack cookie hasn't found any users outside of wireless, which always uses nl_set_extack_cookie_u64(). Thus, allocating 20 bytes for it is pointless, reduce that to 8 bytes, and add a BUILD_BUG_ON() to ensure it's enough (obviously it is, for a u64, but in case it changes again.) Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250516115927.38209-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 936badf282388be78094e55bd5e2c96f86635e48 Author: Unnathi Chalicheemala Date: Thu Apr 3 13:38:24 2025 -0700 docs: firmware: qcom_scm: Fix kernel-doc warning Add description for members of qcom_scm_desc struct to avoid: drivers/firmware/qcom/qcom_scm.h:56: warning: Function parameter or struct member 'svc' not described in 'qcom_scm_desc' drivers/firmware/qcom/qcom_scm.h:56: warning: Function parameter or struct member 'cmd' not described in 'qcom_scm_desc' drivers/firmware/qcom/qcom_scm.h:56: warning: Function parameter or struct member 'owner' not described in 'qcom_scm_desc' Signed-off-by: Unnathi Chalicheemala Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250403-fix_scm_doc_warn-v1-1-9cd36345db77@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 Author: Takashi Iwai Date: Mon May 19 23:20:30 2025 +0200 ALSA: usb-audio: Kill timer properly at removal The USB-audio MIDI code initializes the timer, but in a rare case, the driver might be freed without the disconnect call. This leaves the timer in an active state while the assigned object is released via snd_usbmidi_free(), which ends up with a kernel warning when the debug configuration is enabled, as spotted by fuzzer. For avoiding the problem, put timer_shutdown_sync() at snd_usbmidi_free(), so that the timer can be killed properly. While we're at it, replace the existing timer_delete_sync() at the disconnect callback with timer_shutdown_sync(), too. Reported-by: syzbot+d8f72178ab6783a7daea@syzkaller.appspotmail.com Closes: https://lore.kernel.org/681c70d7.050a0220.a19a9.00c6.GAE@google.com Cc: Link: https://patch.msgid.link/20250519212031.14436-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 58f5fbeb367ff6f30a2448b2cad70f70b2de4b06 Author: Amir Goldstein Date: Fri May 16 21:28:03 2025 +0200 fanotify: support watching filesystems and mounts inside userns An unprivileged user is allowed to create an fanotify group and add inode marks, but not filesystem, mntns and mount marks. Add limited support for setting up filesystem, mntns and mount marks by an unprivileged user under the following conditions: 1. User has CAP_SYS_ADMIN in the user ns where the group was created 2.a. User has CAP_SYS_ADMIN in the user ns where the sb was created OR (in case setting up a mntns mark) 2.b. User has CAP_SYS_ADMIN in the user ns associated with the mntns Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250516192803.838659-3-amir73il@gmail.com commit 90d1238047a6479674db4b35264e9519186af9e8 Author: Amir Goldstein Date: Fri May 16 21:28:02 2025 +0200 fanotify: remove redundant permission checks FAN_UNLIMITED_QUEUE and FAN_UNLIMITED_MARK flags are already checked as part of the CAP_SYS_ADMIN check for any FANOTIFY_ADMIN_INIT_FLAGS. Remove the individual CAP_SYS_ADMIN checks for these flags. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250516192803.838659-2-amir73il@gmail.com commit ff05770d7baeac9dbbc84956119a4b119b5b242b Author: Peter Ujfalusi Date: Mon May 19 11:08:55 2025 +0300 ALSA: hda: hda-intel: add Wildcat Lake support One more PCI ID. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250519080855.16977-6-peter.ujfalusi@linux.intel.com commit 3d1a2707350fb1b54b62d9267e0dd55ed4283c85 Author: Peter Ujfalusi Date: Mon May 19 11:08:54 2025 +0300 ALSA: hda: intel-dsp-config: Add WCL support WCL uses the same receipt as PTL and PTL-H Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250519080855.16977-5-peter.ujfalusi@linux.intel.com commit 6b04629ae97a8e4ed0e9941db29faf61ed1ee2f5 Author: Peter Ujfalusi Date: Mon May 19 11:08:53 2025 +0300 ASoC: SOF: Intel: add initial support for WCL Clone PTL and adjust the number of cores from 5 to 3. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Acked-by: Mark Brown Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250519080855.16977-4-peter.ujfalusi@linux.intel.com commit 4c2f4d75ae762849eb5d05a2d0685193bcbd12ea Author: Kai Vehmanen Date: Mon May 19 11:08:52 2025 +0300 ALSA: hda: add HDMI codec ID for Intel WCL Add HDMI codec ID for Intel Wildcat Lake platform. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250519080855.16977-3-peter.ujfalusi@linux.intel.com commit 22f2dc03553fb3f407fbd5e6b5b4f9c747927cb2 Author: Peter Ujfalusi Date: Mon May 19 11:08:51 2025 +0300 PCI: Add Intel Wildcat Lake audio Device ID Add Wildcat Lake (WCL) audio Device ID. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Acked-by: Krzysztof Wilczyński Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250519080855.16977-2-peter.ujfalusi@linux.intel.com commit d787415a3977a1a51db1dcf19ea3205dc234e792 Author: Siddarth Gundu Date: Tue May 20 01:18:33 2025 +0530 ALSA: dbri: replace strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. Both the destination and source buffer are of fixed length so strscpy with 2-arguments is used. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Siddarth Gundu Link: https://patch.msgid.link/20250519194833.106463-1-siddarthsgml@gmail.com Signed-off-by: Takashi Iwai commit 654ac800d4ac6bd4bffa7e98997a1e0d336999b1 Author: Ajit Pandey Date: Thu Apr 17 22:37:41 2025 +0530 arm64: dts: qcom: sm4450: Add RPMh power domains support Add device node for RPMh power domains on Qualcomm SM4450 platform. Signed-off-by: Ajit Pandey Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250417-sm4450_rpmhpd-v1-3-361846750d3a@quicinc.com Signed-off-by: Bjorn Andersson commit 299038d824180f21803282e445459ec5d7397c10 Author: Jens Glathe Date: Thu Apr 17 18:35:44 2025 +0200 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add retimers, dp altmode support comparing with CRD and other dts for a more complete support of the 7X only retimers, gpios, regulators, dp outputs Tested-by: Rob Clark Tested-by: Jos Dehaes Signed-off-by: Jens Glathe Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250417-slim7x-retimer-v2-1-dbe2dd511137@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson commit b970a4dddf7eddd48c21a3d49bd7a1708bfe3ea4 Author: Manikanta Mylavarapu Date: Wed Apr 16 17:55:38 2025 +0530 arm64: dts: qcom: ipq5424: Enable PCIe PHYs and controllers Enable the PCIe controller and PHY nodes corresponding to RDP466. The IPQ5424 RDP466 does not have a wake gpio because it does not support low power mode. It only supports a perst gpio. Signed-off-by: Manikanta Mylavarapu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250416122538.2953658-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit ab7f31a3830d7ab2cbc8e4be56c424e66adc5dbe Author: Manikanta Mylavarapu Date: Wed Apr 16 17:55:37 2025 +0530 arm64: dts: qcom: ipq5424: Add PCIe PHYs and controller nodes Add PCIe0, PCIe1, PCIe2, PCIe3 (and corresponding PHY) devices found on IPQ5424 platform. The PCIe0 & PCIe1 are 1-lane Gen3 host whereas PCIe2 & PCIe3 are 2-lane Gen3 host. Signed-off-by: Manikanta Mylavarapu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250416122538.2953658-2-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 2a49326081e1e5f08e0e6d65a1632652ee11a319 Author: Xilin Wu Date: Wed Apr 16 18:54:18 2025 +0800 arm64: dts: qcom: sc7280: Mark FastRPC context banks as dma-coherent The FastRPC context banks are DMA-coherent on sc7280 platform. Mark them as such. This allows LLM inferencing on the CDSP using Qualcomm AI Engine Direct SDK on the qcs6490 platform. Signed-off-by: Xilin Wu Link: https://lore.kernel.org/r/20250416-sc7280-fastrpc-dma-v1-1-60ca91116b1e@radxa.com Signed-off-by: Bjorn Andersson commit d838ac6903eede0c2840bebd8788afa95a5aa0fb Author: Kaushal Kumar Date: Tue Apr 15 12:57:56 2025 +0530 arm64: dts: qcom: sdx75-idp: Enable QPIC BAM & QPIC NAND support Enable QPIC BAM and QPIC NAND devicetree nodes for Qualcomm SDX75-IDP board. Signed-off-by: Kaushal Kumar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415072756.20046-6-quic_kaushalk@quicinc.com Signed-off-by: Bjorn Andersson commit c25dcb4d42a9506d5270179bb32cf538a1a28423 Author: Kaushal Kumar Date: Tue Apr 15 12:57:55 2025 +0530 arm64: dts: qcom: sdx75: Add QPIC NAND support Add devicetree node to enable support for QPIC NAND controller on Qualcomm SDX75 platform. Signed-off-by: Kaushal Kumar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415072756.20046-5-quic_kaushalk@quicinc.com Signed-off-by: Bjorn Andersson commit 5cf0ebd4800dc5b67a332c9f56d20882c41d6099 Author: Kaushal Kumar Date: Tue Apr 15 12:57:54 2025 +0530 arm64: dts: qcom: sdx75: Add QPIC BAM support Add devicetree node to enable support for QPIC BAM DMA controller on Qualcomm SDX75 platform. Signed-off-by: Kaushal Kumar Link: https://lore.kernel.org/r/20250415072756.20046-4-quic_kaushalk@quicinc.com Signed-off-by: Bjorn Andersson commit 831e7dcc06cd3eff2213c691413e4bd0550ddcdf Author: Loic Poulain Date: Mon Mar 31 14:36:41 2025 +0200 arm64: dts: qcom: qcm2290: Add crypto engine Add Qualcomm Crypto Engine (QCE) and BAM related nodes for this SoC. Signed-off-by: Loic Poulain Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250331123641.1590573-1-loic.poulain@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit fff7f1c8442b2b2be565892b0d42bb9ef9723fb3 Author: Maud Spierings Date: Fri Mar 28 19:46:45 2025 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth Add bluetooth for the asus vivobook s15 Describe wlan configuration Reviewed-by: Dmitry Baryshkov Acked-by: Konrad Dybcio Signed-off-by: Maud Spierings Link: https://lore.kernel.org/r/20250328-asus_qcom_display-v7-1-322d2bff937d@hotmail.com Signed-off-by: Bjorn Andersson commit 435c3642a6a82c774f2897d72e6ed794a1dbaba1 Author: Krishna Chaitanya Chundru Date: Fri Mar 28 15:58:29 2025 +0530 arm64: dts: qcom: x1e80100: Add PCIe lane equalization preset properties Add PCIe lane equalization preset properties for 8 GT/s and 16 GT/s data rates used in lane equalization procedure. Signed-off-by: Krishna Chaitanya Chundru Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250328-preset_v6-v9-1-22cfa0490518@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit ea172f61f4fdb17aaaf8def980ee309a3b727eea Author: Konrad Dybcio Date: Thu Mar 27 02:47:14 2025 +0100 arm64: dts: qcom: qcs615: Fix up UFS clocks The clocks are out of order with the bindings' expectations. Reorder them to resolve the errors. Fixes: a6a9d10e7969 ("arm64: dts: qcom: qcs615: add UFS node") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-12-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit f275447923600ba463133ae5c15c079bccf6b5a6 Author: Konrad Dybcio Date: Thu Mar 27 02:47:13 2025 +0100 arm64: dts: qcom: sa8775p: Clean up the PSCI PDs Because SA8775P comes with two disjoint CPU clusters, we have to follow a similar topology description like the one in sm8750.dtsi, so: system_pd cluster0_pd cpu_pd0 ... cluster1_pd cpu_pd4 ... Do that & wire it up to APPS RSC to make the bindings checker happy. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-11-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 27880745470afe3ad97967c4751a1ecdb5d245ce Author: Konrad Dybcio Date: Thu Mar 27 02:47:12 2025 +0100 arm64: dts: qcom: msm8996-oneplus: Add SLPI VDD_PX The PX line powers some hardware related to sensors. Assume the board doesn't reinvent what MTP has established and hook up LVS2 @ 1.8V as such. This fixes the 'is required' type of bindings validator errors. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-10-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit a30e5b31751ca8a5d5f79f10b594926ac094965d Author: Konrad Dybcio Date: Thu Mar 27 02:47:11 2025 +0100 arm64: dts: qcom: sm6350-pdx213: Wire up USB regulators Wire up the regulators based on the downstream release to appease the devicetree checker. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-9-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit b108ca47ea14068ca38cf9129d3592dc4ee79e5d Author: Konrad Dybcio Date: Thu Mar 27 02:47:10 2025 +0100 arm64: dts: qcom: msm8998-yoshino: Add QUSB2PHY VDD supply Set the supply as required by bindings, to silence the warning: 'vdd-supply' is a required property The value is inferred from MTP schematics, but it shouldn't change between boards due to specific electrical characteristics. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-8-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 3e060720fa26cb5262f16ed60022c0f816be56fd Author: Konrad Dybcio Date: Thu Mar 27 02:47:09 2025 +0100 arm64: dts: qcom: msm8998-mtp: Add QUSB2PHY VDD supply Set the supply as required by bindings, to silence the warning: 'vdd-supply' is a required property Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-7-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit bd0eaca2f1be0ea72b7e0b9433c6102c47b28eed Author: Konrad Dybcio Date: Thu Mar 27 02:47:08 2025 +0100 arm64: dts: qcom: msm8998-fxtec: Add QUSB2PHY VDD supply Set the supply as required by bindings, to silence the warning: 'vdd-supply' is a required property The value is inferred from MTP schematics, but it shouldn't change between boards due to specific electrical characteristics. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-6-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 7185c9cd0e2281b113dacbf3c160ffcce06c912d Author: Konrad Dybcio Date: Thu Mar 27 02:47:07 2025 +0100 arm64: dts: qcom: qcs615: Remove disallowed property from AOSS_QMP node AOSS_QMP is not allowed to be a power domain provider, remove the associated -cells property. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-5-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 7ebdb205d4b9dd839a93a9b8975ce8ccf86b882a Author: Konrad Dybcio Date: Thu Mar 27 02:47:06 2025 +0100 arm64: dts: qcom: msm8998: Remove mdss_hdmi_phy phandle argument The node has #clock-cells = <0>, as it only provides a single clock output. This leads to a turbo sneaky bug, where the dt checker shows that we have additional clocks in the array: clock-controller@c8c0000: clocks: [[3, 0], [39, 178], [156, 1], [156, 0], [157, 1], [157, 0], [158], [0], [0], [0], [39, 184]] is too long ..which happens due to dtc interpreting <&mdss_hdmi_phy 0> as <&mdss_hdmi_phy>, <0> after taking cells into account. Remove the superfluous argument to both silence the warning and fix the index-based lookup of subsequent entries in "clocks". Fixes: 2150c87db80c ("arm64: dts: qcom: msm8998: add HDMI nodes") Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-4-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit facf5df87129d273cc1f7dac0d1b4ec715bdcce3 Author: Konrad Dybcio Date: Thu Mar 27 02:47:05 2025 +0100 arm64: dts: qcom: sdm845: Add specific APPS RSC compatible SDM845 comes in a couple firmware flavors, some of which don't support PSCI in OSI mode. That prevents the power domain exepcted by the RSC node from providing useful information on system power collapse. Use the platform-specific compatible to allow not passing one. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-3-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit a9fa18f839c4e2f33c8d0f327a9a970ec29a457b Author: Konrad Dybcio Date: Thu Mar 27 02:47:04 2025 +0100 arm64: dts: qcom: sc7180: Add specific APPS RSC compatible SC7180 comes in a couple firmware flavors, some of which don't support PSCI in OSI mode. That prevents the power domain exepcted by the RSC node from providing useful information on system power collapse. Use the platform-specific compatible to allow not passing one. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-2-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 1838d9297f9345900f0417ac8a4ea78a51449f19 Author: Praveenkumar I Date: Mon Mar 17 15:30:29 2025 +0530 arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers Enable the PCIe controller and PHY nodes for RDP 441. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Praveenkumar I Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20250317100029.881286-5-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 9ef45543627021143dc1044a041d4117c882e926 Author: Praveenkumar I Date: Mon Mar 17 15:30:28 2025 +0530 arm64: dts: qcom: ipq5332: Add PCIe related nodes Add phy and controller nodes for pcie0_x1 and pcie1_x2. Signed-off-by: Praveenkumar I Signed-off-by: Varadarajan Narayanan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250317100029.881286-4-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit c249a0b6a4229141ccc1a3c0e2bf9f3b2750b592 Author: Varadarajan Narayanan Date: Mon Mar 17 15:30:27 2025 +0530 arm64: dts: qcom: ipq9574: Add MHI to pcie nodes Append the MHI range to the pcie nodes. Append the MHI register range to IPQ9574. This is an optional range used by the dwc controller driver to print debug stats via the debugfs file 'link_transition_count'. Convert reg-names to vertical list. Signed-off-by: Varadarajan Narayanan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250317100029.881286-3-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 541d0b2f4dcd9514265b3a3f7f797525caabc1db Author: Dmitry Baryshkov Date: Sat Mar 8 03:42:28 2025 +0200 arm64: dts: qcom: sar2130p: add display nodes Add display controller, two DSI hosts, two DSI PHYs and a single DP controller. Link DP to the QMP Combo PHY. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250308-sar2130p-display-v1-10-1d4c30f43822@linaro.org Signed-off-by: Bjorn Andersson commit b20bb726603e16ce68876a309fec49335ed5ffe0 Author: Dzmitry Sankouski Date: Tue Feb 25 19:39:03 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add modem support Add support for modem and ipa(IP Accelerator). Add spss reserved memory node. Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-12-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 70005c18c9f7e1afd432b989002f379032c893b8 Author: Dzmitry Sankouski Date: Tue Feb 25 19:39:02 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add graphics support Add support for gpu and panel. Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-11-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 58782c229e3e17100657af8cfa4b962b76244f4e Author: Dzmitry Sankouski Date: Tue Feb 25 19:39:01 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add initial sound support Add support for sound (headphones and mics only) Also redefine slpi reserved memory, because adsp_mem overlaps with slpi_mem inherited from sdm845.dtsi. Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-10-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 9380e0a1d4498301798c71e7dbb3e61ce76f288d Author: Dmitry Baryshkov Date: Fri Feb 7 22:41:20 2025 +0200 arm64: dts: qcom: qrb2210-rb1: add Bluetooth support Add support for the onboard WCN3950 BT/WiFi chip. Corresponding firmware has been merged to linux-firmware and should be available in the next release. Bluetooth: hci0: setting up wcn399x Bluetooth: hci0: QCA Product ID :0x0000000f Bluetooth: hci0: QCA SOC Version :0x40070120 Bluetooth: hci0: QCA ROM Version :0x00000102 Bluetooth: hci0: QCA Patch Version:0x00000001 Bluetooth: hci0: QCA controller version 0x01200102 Bluetooth: hci0: QCA Downloading qca/cmbtfw12.tlv Bluetooth: hci0: QCA Downloading qca/cmnv12.bin Bluetooth: hci0: QCA setup on UART is completed Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250207-rb1-bt-v4-6-d810fc8c94a9@linaro.org Signed-off-by: Bjorn Andersson commit f3921fb7fdc23dd946b0c082f5fedca9ce75d506 Author: JP Kobryn Date: Wed May 14 17:19:37 2025 -0700 cgroup: document the rstat per-cpu initialization The calls to css_rstat_init() occur at different places depending on the context. Document the conditions that determine which point of initialization is used. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 93b35663f2018ff2accf4336a909081883eda76b Author: JP Kobryn Date: Wed May 14 17:19:36 2025 -0700 cgroup: helper for checking rstat participation of css There are a few places where a conditional check is performed to validate a given css on its rstat participation. This new helper tries to make the code more readable where this check is performed. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 748922dcfabdd655d25fb6dd09a60e694a3d35e6 Author: JP Kobryn Date: Wed May 14 17:19:35 2025 -0700 cgroup: use subsystem-specific rstat locks to avoid contention It is possible to eliminate contention between subsystems when updating/flushing stats by using subsystem-specific locks. Let the existing rstat locks be dedicated to the cgroup base stats and rename them to reflect that. Add similar locks to the cgroup_subsys struct for use with individual subsystems. Lock initialization is done in the new function ss_rstat_init(ss) which replaces cgroup_rstat_boot(void). If NULL is passed to this function, the global base stat locks will be initialized. Otherwise, the subsystem locks will be initialized. Change the existing lock helper functions to accept a reference to a css. Then within these functions, conditionally select the appropriate locks based on the subsystem affiliation of the given css. Add helper functions for this selection routine to avoid repeated code. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 5da3bfa029d6809e192d112f39fca4dbe0137aaf Author: JP Kobryn Date: Wed May 14 17:19:34 2025 -0700 cgroup: use separate rstat trees for each subsystem Different subsystems may call cgroup_rstat_updated() within the same cgroup, resulting in a tree of pending updates from multiple subsystems. When one of these subsystems is flushed via cgroup_rstat_flushed(), all other subsystems with pending updates on the tree will also be flushed. Change the paradigm of having a single rstat tree for all subsystems to having separate trees for each subsystem. This separation allows for subsystems to perform flushes without the side effects of other subsystems. As an example, flushing the cpu stats will no longer cause the memory stats to be flushed and vice versa. In order to achieve subsystem-specific trees, change the tree node type from cgroup to cgroup_subsys_state pointer. Then remove those pointers from the cgroup and instead place them on the css. Finally, change update/flush functions to make use of the different node type (css). These changes allow a specific subsystem to be associated with an update or flush. Separate rstat trees will now exist for each unique subsystem. Since updating/flushing will now be done at the subsystem level, there is no longer a need to keep track of updated css nodes at the cgroup level. The list management of these nodes done within the cgroup (rstat_css_list and related) has been removed accordingly. Conditional guards for checking validity of a given css were placed within css_rstat_updated/flush() to prevent undefined behavior occuring from kfunc usage in bpf programs. Guards were also placed within css_rstat_init/exit() in order to help consolidate calls to them. At call sites for all four functions, the existing guards were removed. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit c030a41ef8f94f60a2dd7f899d2c8921d7b4756f Author: Feng Wei Date: Tue Apr 1 19:26:03 2025 +0800 i2c: mlxbf: Use str_read_write() helper Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Feng Wei Signed-off-by: Shao Mingyin Link: https://lore.kernel.org/r/20250401192603311H5OxuFmUSbPc4VnQQkhZr@zte.com.cn Signed-off-by: Andi Shyti commit 8ae92c691d6fba3d568884ec9950d309408c3aa5 Author: Philipp Stanner Date: Thu Apr 17 10:25:12 2025 +0200 i2c: thunderx: Use non-hybrid PCI devres API thunderx enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417082511.22272-3-phasta@kernel.org Signed-off-by: Andi Shyti commit db9354b46ef6f4922576261277085b5e0e87a638 Author: Philipp Stanner Date: Thu Apr 17 10:25:11 2025 +0200 i2c: ismt: Use non-hybrid PCI devres API ismt enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_region() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_region() with one to the always-managed pcim_request_region(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417082511.22272-2-phasta@kernel.org Signed-off-by: Andi Shyti commit 1b5d623e2ebb8d961ee6a2cf7adee4d4775adb94 Author: Marcus Folkesson Date: Wed Mar 26 15:39:47 2025 +0100 i2c: davinci: add I2C_FUNC_PROTOCOL_MANGLING to feature list The driver do support I2C_M_IGNORE_NAK, so add I2C_FUNC_PROTOCOL_MANGLING to the feature list. Signed-off-by: Marcus Folkesson Acked-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250326-i2c-v1-1-82409ebe9f2b@gmail.com Signed-off-by: Andi Shyti commit 76648b013c551d119898879cf9d856ca7b4a8eec Author: Yao Zi Date: Thu Apr 17 12:01:17 2025 +0000 dt-bindings: i2c: i2c-rk3x: Add compatible string for RK3528 Document I2C controllers integrated in RK3528, which are compatible with the RK3399 variant. Signed-off-by: Yao Zi Reviewed-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20250417120118.17610-4-ziyao@disroot.org Signed-off-by: Andi Shyti commit 4d6d35d3417dcab14a9b1b9771c3cd62e8ed442b Author: Yo-Jung (Leo) Lin Date: Wed Apr 30 19:26:16 2025 +0800 i2c: smbus: introduce Write Disable-aware SPD instantiating functions Some SMBus controllers may restrict writes to addresses where SPD sensors may reside. This may lead to some SPD sensors not functioning correctly, and might need extra handling. Introduce new SPD-instantiating functions that are aware of this, and use them instead. Signed-off-by: Yo-Jung Lin (Leo) Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250430-for-upstream-i801-spd5118-no-instantiate-v2-1-2f54d91ae2c7@canonical.com Signed-off-by: Andi Shyti commit 8b284979f7fb2f1acfd88a6b96c8863c410eb27f Author: Lad Prabhakar Date: Thu May 1 21:33:10 2025 +0100 dt-bindings: i2c: renesas,riic: Document RZ/V2N (R9A09G056) support Document support for the I2C Bus Interface (RIIC) found on the Renesas RZ/V2N (R9A09G056) SoC. The RIIC IP is identical to that on RZ/V2H(P), so `renesas,riic-r9a09g057` will be used as a fallback compatible, enabling reuse of the existing driver without changes. Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250501203310.140137-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Andi Shyti commit ba9e1b5254783528e10b45b1f0fb40e21f4ff88a Author: Lad Prabhakar Date: Thu May 1 21:40:03 2025 +0100 i2c: riic: Implement bus recovery Implement I2C bus recovery support for the RIIC controller by making use of software-controlled SCL and SDA line manipulation. The controller allows forcing SCL and SDA levels through control bits, which enables generation of manual clock pulses and a stop condition to free a stuck bus. This implementation wires up the bus recovery mechanism using i2c_generic_scl_recovery and provides get/set operations for SCL and SDA. This allows the RIIC driver to recover from bus hang scenarios where SDA is held low by a slave. Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/20250501204003.141134-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Andi Shyti commit 218d2318185b165d254b4ddc013f99d3906e1859 Author: Inochi Amaoto Date: Mon Apr 14 06:35:02 2025 +0800 dt-bindings: i2c: dw: Add Sophgo SG2044 SoC I2C controller Add compatible string for Sophgo SG2044 SoC I2C controller which can be used specifically for the SG2044 SoC. Signed-off-by: Inochi Amaoto Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250413223507.46480-9-inochiama@gmail.com Signed-off-by: Andi Shyti commit b6c540d740390ba672a8a98d672ba6252dd11c48 Author: Inochi Amaoto Date: Mon Apr 14 06:34:55 2025 +0800 dt-bindings: i2c: dw: merge duplicate compatible entry. Each vendor have an items entry of its own compatible, It is needless and some can be merged as it share the same base "snps,designware-i2c" compatible. Merge the duplicate compatible entry into one item entry. Signed-off-by: Inochi Amaoto Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250413223507.46480-2-inochiama@gmail.com Signed-off-by: Andi Shyti commit a6e04f05ce0b070ab39d5775580e65c7d943da0b Author: Akhil R Date: Thu Apr 24 11:03:20 2025 +0530 i2c: tegra: check msg length in SMBUS block read For SMBUS block read, do not continue to read if the message length passed from the device is '0' or greater than the maximum allowed bytes. Signed-off-by: Akhil R Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20250424053320.19211-1-akhilrajeev@nvidia.com Signed-off-by: Andi Shyti commit 090c3a4a264bb6859b464379fa2cc9570139b456 Author: Hector Martin Date: Sun Apr 27 11:30:46 2025 +0000 i2c: pasemi: Log bus reset causes This ensures we get all information we need to debug issues when users forward us their logs. Signed-off-by: Hector Martin Reviewed-by: Neal Gompa Reviewed-by: Alyssa Rosenzweig Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-4-af28568296c0@svenpeter.dev Signed-off-by: Andi Shyti commit f4f64fa8a60398d3543e7385a63756cb0281e38b Author: Hector Martin Date: Sun Apr 27 11:30:45 2025 +0000 i2c: pasemi: Improve error recovery Add handling for all the missing error condition, and better recovery in pasemi_smb_clear(). Reviewed-by: Alyssa Rosenzweig Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Co-developed-by: Sven Peter Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-3-af28568296c0@svenpeter.dev Signed-off-by: Andi Shyti commit 390b8f5834cf9af98cc2e783f7d10d63ead7f56a Author: Sven Peter Date: Sun Apr 27 11:30:44 2025 +0000 i2c: pasemi: Improve timeout handling The hardware (supposedly) has a 25ms timeout for clock stretching and the driver uses 100ms which should be plenty. The interrupt path however misses handling for errors while waiting for the completion and the polling path uses an open-coded readx_poll_timeout. Note that we drop reg_write(smbus, REG_SMSTA, status) while fixing those issues here which will be done anyway whenever the next transaction starts via pasemi_smb_clear. Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-2-af28568296c0@svenpeter.dev Signed-off-by: Andi Shyti commit 88fe3078b54c9efaea7d1adfcf295e37dfb0274f Author: Hector Martin Date: Sun Apr 27 11:30:43 2025 +0000 i2c: pasemi: Enable the unjam machine The I2C bus can get stuck under some conditions (desync between controller and device). The pasemi controllers include an unjam feature that is enabled on reset, but was being disabled by the driver. Keep it enabled by explicitly setting the UJM bit in the CTL register. This should help recover the bus from certain conditions, which would otherwise remain stuck forever. Signed-off-by: Hector Martin Reviewed-by: Neal Gompa Reviewed-by: Alyssa Rosenzweig Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-1-af28568296c0@svenpeter.dev Signed-off-by: Andi Shyti commit 25909e19c22b0f5a78bc7667598f849c86af91bd Author: Andi Shyti Date: Fri Apr 18 23:16:35 2025 +0200 i2c: iproc: Remove unnecessary double negation True is true when greater than '0', no need for double negation inside the if statement. Link: https://lore.kernel.org/r/20250418211635.2666234-11-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit d7d58a72f567c3aa4327b22c68a2255a96401534 Author: Andi Shyti Date: Fri Apr 18 23:16:34 2025 +0200 i2c: iproc: When there's an error treat it as an error If the xfer fails, it indicates a real error. Log it with an error message instead of a debug message to reflect its severity. Link: https://lore.kernel.org/r/20250418211635.2666234-10-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit 23c0794194ea559fd73471a832fa1e61d08e96c4 Author: Andi Shyti Date: Sat Apr 26 22:19:20 2025 +0200 i2c: iproc: Move function and avoid prototypes Shuffle a bit the code in order to avoid prototypes. Link: https://lore.kernel.org/r/20250426201920.272135-1-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit d21836663f624ce46300be885e2357326972ed82 Author: Andi Shyti Date: Fri Apr 18 23:16:32 2025 +0200 i2c: iproc: Fix indentation of bcm_iproc_i2c_slave_init() Adjust the indentation of the bcm_iproc_i2c_slave_init() function definition to match standard kernel coding style. Don't end the line with an open parenthesis. Link: https://lore.kernel.org/r/20250418211635.2666234-8-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit 9f64de0f8522ec5b2d3208b6d3b47e8b8a0f0c3c Author: Andi Shyti Date: Fri Apr 18 23:16:31 2025 +0200 i2c: iproc: Replace udelay() with usleep_range() Replace udelay(100) with usleep_range(100, 200) as recommended by kernel documentation. The delay is not in atomic context, so busy-waiting is unnecessary. Also update the comment for clarity. Link: https://lore.kernel.org/r/20250418211635.2666234-7-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit eb9b9b1e193e93da38b4773d90686cc7ffb077ec Author: Andi Shyti Date: Fri Apr 18 23:16:30 2025 +0200 i2c: iproc: Remove stray blank line in slave ISR Drop an unnecessary blank line in bcm_iproc_i2c_slave_isr(). Link: https://lore.kernel.org/r/20250418211635.2666234-6-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit 9277b5f2767a5339f3286c22f5f1397b13560aea Author: Andi Shyti Date: Fri Apr 18 23:16:29 2025 +0200 i2c: iproc: Fix alignment to match the open parenthesis Alignment should match the open parenthesis but in some places it didn't Link: https://lore.kernel.org/r/20250418211635.2666234-5-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit f7a2df37daaeb2a74cf197ee4dab474fbad0b217 Author: Andi Shyti Date: Fri Apr 18 23:16:28 2025 +0200 i2c: iproc: Use u32 instead of uint32_t In the kernel u32 should be used instead of unit32_t. Link: https://lore.kernel.org/r/20250418211635.2666234-4-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit 8f1e88d40cd10a44274e48f33d9ff61c59309731 Author: Andi Shyti Date: Fri Apr 18 23:16:27 2025 +0200 i2c: iproc: Use dev_err_probe in probe Use dev_err_probe() instead of dev_err() and then return. Link: https://lore.kernel.org/r/20250418211635.2666234-3-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit d3e80014e1413ec15503b65956f10f198540699e Author: Andi Shyti Date: Fri Apr 18 23:16:26 2025 +0200 i2c: iproc: Drop unnecessary initialisation of 'ret' The 'ret' variable doesn't need to be initialised, as it is always assigned before use. While here, reorder the variable declarations in reverse Christmas tree style, by line length. Link: https://lore.kernel.org/r/20250418211635.2666234-2-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit d6263c468a761cd4c89887073614394ac48441e1 Author: Pratap Nirujogi Date: Thu Apr 24 14:49:26 2025 -0400 i2c: amd-isp: Add ISP i2c-designware driver The camera sensor is connected via ISP I2C bus in AMD SOC architectures. Add new I2C designware driver to support new camera sensors on AMD HW. Co-developed-by: Venkata Narendra Kumar Gutta Signed-off-by: Venkata Narendra Kumar Gutta Co-developed-by: Bin Du Signed-off-by: Bin Du Signed-off-by: Pratap Nirujogi Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250424184952.1290019-1-pratap.nirujogi@amd.com Signed-off-by: Andi Shyti commit 9cf1a28acb4184f9a77ff7c893d14853ccf52b4f Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:03:03 2025 +0200 dt-bindings: i2c: i2c-mt65xx: Add MediaTek Dimensity 1200 MT6893 Add support for the MediaTek Dimensity 1200 (MT6893) SoC; this chip's multiple I2C controller instances are fully compatible with the ones found in the MT8192 SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120303.148017-1-angelogioacchino.delregno@collabora.com Signed-off-by: Andi Shyti commit 63ef02da5ddb725555cd41f125ec0bd8e893da3a Author: Aryan Srivastava Date: Tue Mar 25 08:29:46 2025 +1300 i2c: octeon: add block-mode i2c operations Add functions to perform block read and write operations. This applies for cases where the requested operation is for >8 bytes of data. When not using the block mode transfer, the driver will attempt a series of 8 byte i2c operations until it reaches the desired total. For example, for a 40 byte request the driver will complete 5 separate transactions. This results in large transactions taking a significant amount of time to process. Add block mode such that the driver can request larger transactions, up to 1024 bytes per transfer. Many aspects of the block mode transfer is common with the regular 8 byte operations. Use generic functions for parts of the message construction and sending the message. The key difference for the block mode is the usage of separate FIFO buffer to store data. Write to this buffer in the case of a write (before command send). Read from this buffer in the case of a read (after command send). Data is written into this buffer by placing data into the MSB onwards. This means the bottom 8 bits of the data will match the top 8 bits, and so on and so forth. Set specific bits in message for block mode, enable block mode transfers from global i2c management registers, construct message, send message, read or write from FIFO buffer as required. The block-mode transactions result in a significant speed increase in large i2c requests. Signed-off-by: Aryan Srivastava Link: https://lore.kernel.org/r/20250324192946.3078712-2-aryan.srivastava@alliedtelesis.co.nz Signed-off-by: Andi Shyti commit e1902d658e427601414d3e941d9254100e48c7fc Author: Sven Peter Date: Tue Apr 15 15:36:56 2025 +0000 i2c: pasemi: Sort includes alphabetically No functional changes. Signed-off-by: Sven Peter Reviewed-by: Alyssa Rosenzweig Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20250415-pasemi-fixes-v2-2-c543bf53151a@svenpeter.dev Signed-off-by: Andi Shyti commit 8e82bca35fb4ca9a9959cd0e7c90cda69eb1812f Author: Sven Peter Date: Tue Apr 15 15:36:55 2025 +0000 i2c: pasemi: Use correct bits.h include When changing the #defines to use BIT and GENMASK the bitfield.h include was added instead of the correct bits.h include. Reported-by: Andy Shevchenko Signed-off-by: Sven Peter Reviewed-by: Alyssa Rosenzweig Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20250415-pasemi-fixes-v2-1-c543bf53151a@svenpeter.dev Signed-off-by: Andi Shyti commit 688d389cdf8cacf56bb76d60a9cdaed13e96dae6 Author: Andy Shevchenko Date: Wed Apr 16 13:17:02 2025 +0300 i2c: designware: Use better constants from units.h When we use constants in a time or frequency related contexts, it's better to utilise the respective definitions that have encoded units in them. This will make code better to read and understand. Signed-off-by: Andy Shevchenko Acked-by: Jarkko Nikula Acked-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250416101702.2128740-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andi Shyti commit 6df65313eda980f00eaa1a340d298e818b097b4d Author: Enrico Zanda Date: Tue Apr 15 20:34:47 2025 +0200 i2c: scx200_acb: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-11-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit e7d8a0de7039f57e7f4495f30ce13868aa8e03f2 Author: Enrico Zanda Date: Tue Apr 15 20:34:46 2025 +0200 i2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit 26e3e92e134a1f4eb70c82af0008766bc014a3f6 Author: Enrico Zanda Date: Tue Apr 15 20:34:44 2025 +0200 i2c: virtio: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-8-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit a070c9e07ab15e85e92de5bde4ac9eed031a63e5 Author: Enrico Zanda Date: Tue Apr 15 20:34:43 2025 +0200 i2c: viperboard: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-7-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit 61e26ca6920fc8f12747a2594bf8cc42f399cec9 Author: Enrico Zanda Date: Tue Apr 15 20:34:42 2025 +0200 i2c: viapro: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-6-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit 05ac621b1e538a248abcba6eaef41b769d1a368a Author: Enrico Zanda Date: Tue Apr 15 20:34:40 2025 +0200 i2c: via: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-4-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit c4f62651f2f7c3e15741fe3804b8763ea8f05d2b Author: Enrico Zanda Date: Tue Apr 15 20:34:39 2025 +0200 i2c: uniphier: Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-3-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit ca0585ac9ef4779197f93e063c7468ec82efcd1f Author: Enrico Zanda Date: Tue Apr 15 20:34:38 2025 +0200 i2c: uniphier(-f): Replace dev_err() with dev_err_probe() in probe function This simplifies the code while improving log. Signed-off-by: Enrico Zanda Link: https://lore.kernel.org/r/20250415183447.396277-2-e.zanda1@gmail.com Signed-off-by: Andi Shyti commit 38010591a0fc3203f1cee45b01ab358b72dd9ab2 Author: Tali Perry Date: Fri Mar 28 19:32:50 2025 +0000 i2c: npcm: Add clock toggle recovery During init of the bus, the module checks that the bus is idle. If one of the lines are stuck try to recover them first before failing. Sometimes SDA and SCL are low if improper reset occurs (e.g., reboot). Signed-off-by: Tali Perry Signed-off-by: Mohammed Elbadry Reviewed-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250328193252.1570811-1-mohammed.0.elbadry@gmail.com Signed-off-by: Andi Shyti commit 504cb3ce5215da58c07a923379fa9b1ce6797161 Author: Christophe JAILLET Date: Sat Mar 29 15:37:07 2025 +0100 i2c: rzv2m: Constify struct i2c_algorithm 'struct i2c_algorithm' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 11027 646 16 11689 2da9 drivers/i2c/busses/i2c-rzv2m.o After: ===== text data bss dec hex filename 11107 566 16 11689 2da9 drivers/i2c/busses/i2c-rzv2m.o Signed-off-by: Christophe JAILLET Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/537d93441ced53bffa6553b8ec93d007e64cb9a5.1743258995.git.christophe.jaillet@wanadoo.fr Signed-off-by: Andi Shyti commit f4a5f881523196efee8c97ab292a30f295258fef Author: Alexander Stein Date: Tue Apr 8 12:02:59 2025 +0200 i2c: imx: add some dev_err_probe calls Add corresponding error messages if DMA channels are not available during probe. Using dev_err_probe adds deferred probe messages as well. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250408100300.556703-1-alexander.stein@ew.tq-group.com Signed-off-by: Andi Shyti commit 7b174126124560f15e392fe5767face99e61ddb1 Author: Sudeep Holla Date: Fri Apr 11 12:23:03 2025 +0100 i2c: xgene-slimpro: Simplify PCC shared memory region handling The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this xgene-slimpro I2C driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Cc: Andi Shyti Cc: linux-i2c@vger.kernel.org Signed-off-by: Sudeep Holla Acked-by: Andi Shyti Link: https://lore.kernel.org/r/20250411112303.1149086-1-sudeep.holla@arm.com Signed-off-by: Andi Shyti commit b7a886e7e9e814e9fb30ec85935c098bf7f3d78d Author: Chenyuan Yang Date: Sat Apr 12 14:37:13 2025 -0500 i2c: lpc2k: Add check for clk_enable() Add check for the return value of clk_enable() to catch the potential error. This is similar to the commit 8332e6670997 ("spi: zynq-qspi: Add check for clk_enable()"). Signed-off-by: Chenyuan Yang Link: https://lore.kernel.org/r/20250412193713.105838-1-chenyuan0y@gmail.com Signed-off-by: Andi Shyti commit 5a1934f1c23feb525facdfa643600124a611c974 Author: Zhang Songyi Date: Thu Mar 20 01:43:21 2025 +0100 i2c: npcm7xx: Remove redundant ret variable Return value from npcm_i2c_get_slave_addr() directly instead of taking this in another redundant variable. This improvement has been suggested by Zeal Robot Signed-off-by: Zhang Songyi Link: https://lore.kernel.org/r/20250320004321.1914366-1-andi.shyti@kernel.org Signed-off-by: Andi Shyti commit db5194b793d5c40e1a510989bf4199c261b291ea Author: Andy Shevchenko Date: Sat Mar 22 16:47:36 2025 +0200 i2c: qcom-geni: Use generic definitions for bus frequencies Since we have generic definitions for bus frequencies, let's use them. Signed-off-by: Andy Shevchenko Reviewed-by: Christopher Obbard Reviewed-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250322144736.472777-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andi Shyti commit 541a4219bd66bef56d93dbd306dc64a4d70ae99e Author: JP Kobryn Date: Wed May 14 17:19:33 2025 -0700 cgroup: compare css to cgroup::self in helper for distingushing css Adjust the implementation of css_is_cgroup() so that it compares the given css to cgroup::self. Rename the function to css_is_self() in order to reflect that. Change the existing css->ss NULL check to a warning in the true branch. Finally, adjust call sites to use the new function name. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit b2713a5ad396179e28bfbab892f3fcb9bdf04ce0 Author: JP Kobryn Date: Wed May 14 17:19:32 2025 -0700 cgroup: warn on rstat usage by early init subsystems An early init subsystem that attempts to make use of rstat can lead to failures during early boot. The reason for this is the timing in which the css's of the root cgroup have css_online() invoked on them. At the point of this call, there is a stated assumption that a cgroup has "successfully completed all allocations" [0]. An example of a subsystem that relies on the previously mentioned assumption [0] is the memory subsystem. Within its implementation of css_online(), work is queued to asynchronously begin flushing via rstat. In the early init path for a given subsystem, having rstat enabled leads to this sequence: cgroup_init_early() for_each_subsys(ss, ssid) if (ss->early_init) cgroup_init_subsys(ss, true) cgroup_init_subsys(ss, early_init) css = ss->css_alloc(...) init_and_link_css(css, ss, ...) ... online_css(css) online_css(css) ss = css->ss ss->css_online(css) Continuing to use the memory subsystem as an example, the issue with this sequence is that css_rstat_init() has not been called yet. This means there is now a race between the pending async work to flush rstat and the call to css_rstat_init(). So a flush can occur within the given cgroup while the rstat fields are not initialized. Since we are in the early init phase, the rstat fields cannot be initialized because they require per-cpu allocations. So it's not possible to have css_rstat_init() called early enough (before online_css()). This patch treats the combination of early init and rstat the same as as other invalid conditions. [0] Documentation/admin-guide/cgroup-v1/cgroups.rst (section: css_online) Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit ce7ff26606045413afcbdfcfaa8778e1a208089a Author: Rae Moar Date: Fri May 16 20:16:15 2025 +0000 kunit: tool: add test counts to JSON output Add the test counts to the JSON output from kunit.py. For example: ... "git_branch": "kselftest", "misc": { "tests": 2, "passed": 1. "failed": 1, "crashed": 0, "skipped": 0, "errors": 0, } ... To output the JSON using the following command: ./tools/testing/kunit/kunit.py run example --json This has been requested by KUnit users. The counts are in a "misc" field because the JSON output needs to be compliant with the KCIDB submission guide. There are no counts fields but there is a "misc" field in the guide. Link: https://lore.kernel.org/r/20250516201615.1237037-1-rmoar@google.com Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit d208025db6d657f975790bf7775cc9a3314348aa Author: Rae Moar Date: Fri May 16 19:06:31 2025 +0000 Documentation: kunit: improve example on testing static functions The documentation on testing static functions using the KUnit macros VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT is lacking clarity and missing key steps in the example. This has caused bugs and confusion among developers. Improve wording of description and add missing steps to the example. This entails adding the "#include " line and the "MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);" line. Both of which were missing from the original example and key to exposing static functions. Link: https://lore.kernel.org/r/20250516190631.1214081-1-rmoar@google.com Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a60a98c9579336637e3f76c846ee327bf7150e69 Merge: 2a8aadb1080730 e23cba0ab49a9c Author: Rafael J. Wysocki Date: Mon May 19 20:58:39 2025 +0200 Merge tag 'thermal-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Merge updates of multiple thermal drivers for 6.16 from Daniel Lezcano: "- Make the Hisilicon driver to compile by default when ARCH_HISI is set (Krzysztof Kozlowski) - Cleanup printk format with use of %pC instead of %pCn in the bcm2835 driver (Luca Ceresoli) - Fix variable naming coding style in the AmLogic driver (Enrique Isidoro Vazquez Ramos) - Fix missing debugfs entry removal on failure by using the devm_ variant in the LVTS driver (AngeloGioacchino Del Regno) - Remove the unused lvts_debugfs_exit() function as the devm variant introduced before takes care of removing the debugfs entry in the LVTS driver (Arnd Bergmann) - Add the Airoha EN7581 thermal sensor support along with its DT bindings (Christian Marangi) - Add ipq5018 compatible string DT binding, cleanup and add its suppot in the QCom Tsens driver driver (Sricharan Ramabadhran and George Moussalem) - Fix comments typos in the Airoha driver (Christian Marangi)" * tag 'thermal-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/drivers/airoha: Fix spelling mistake thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens thermal/drivers/qcom/tsens: Add support for tsens v1 without RPM thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible thermal/drivers: Add support for Airoha EN7581 thermal sensor dt-bindings: thermal: Add support for Airoha EN7581 thermal sensor thermal/drivers/mediatek/lvts: Remove unused lvts_debugfs_exit thermal/drivers/mediatek/lvts: Fix debugfs unregister on failure thermal/drivers/amlogic: Rename Uptat to uptat to follow kernel coding style vsprintf: remove redundant and unused %pCn format specifier thermal/drivers/bcm2835: Use %pC instead of %pCn thermal/drivers/hisi: Do not enable by default during compile testing commit 2a8aadb108073055c65bb62897e21cfad438400d Merge: 3f7cd28ae3d1a1 fdccdb6578991b Author: Rafael J. Wysocki Date: Mon May 19 20:53:36 2025 +0200 Merge branch 'thermal-intel' Merge an update of the Intel int340x thermal driver adding Platform Temperature Control (PTC) support to it (Srinivas Pandruvada). * thermal-intel: thermal: int340x: processor_thermal: Platform temperature control documentation thermal: intel: int340x: Enable platform temperature control thermal: intel: int340x: Add platform temperature control interface commit 21597378dd5123a4d547c014b7d953a88575c910 Author: Qunqin Zhao Date: Mon May 19 11:44:02 2025 -0700 Input: atkbd - do not reset keyboard by default on Loongson The keyboard is properly initialized by the firmware on Loongson platform, so full reset of the keyboard is not needed. Switch the default to avoid performing full reset of the keyboard. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Link: https://lore.kernel.org/r/20250401094154.11527-1-zhaoqunqin@loongson.cn Signed-off-by: Dmitry Torokhov commit 1dcf2cf102d72e0bbf0d7533756c9a0ccb6e91d3 Author: Longfang Liu Date: Sat May 10 16:11:55 2025 +0800 hisi_acc_vfio_pci: update function return values. In this driver file, many functions call sub-functions and use ret to store the error code of the sub-functions. However, instead of directly returning ret to the caller, they use a converted error code, which prevents the end-user from clearly understanding the root cause of the error. Therefore, the code needs to be modified to directly return the error code from the sub-functions. Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-7-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 2777a40998deb36f96b6afc48bd397cf58a4edf0 Author: Longfang Liu Date: Sat May 10 16:11:54 2025 +0800 hisi_acc_vfio_pci: bugfix live migration function without VF device driver If the VF device driver is not loaded in the Guest OS and we attempt to perform device data migration, the address of the migrated data will be NULL. The live migration recovery operation on the destination side will access a null address value, which will cause access errors. Therefore, live migration of VMs without added VF device drivers does not require device data migration. In addition, when the queue address data obtained by the destination is empty, device queue recovery processing will not be performed. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-6-liulongfang@huawei.com Signed-off-by: Alex Williamson commit db6525a8573957faea28850392f4744e5f8f7a53 Author: Longfang Liu Date: Sat May 10 16:11:53 2025 +0800 hisi_acc_vfio_pci: bugfix the problem of uninstalling driver In a live migration scenario. If the number of VFs at the destination is greater than the source, the recovery operation will fail and qemu will not be able to complete the process and exit after shutting down the device FD. This will cause the driver to be unable to be unloaded normally due to abnormal reference counting of the live migration driver caused by the abnormal closing operation of fd. Therefore, make sure the migration file descriptor references are always released when the device is closed. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-5-liulongfang@huawei.com Signed-off-by: Alex Williamson commit e63c466398731bb7867f42f44b76fa984de59db2 Author: Longfang Liu Date: Sat May 10 16:11:52 2025 +0800 hisi_acc_vfio_pci: bugfix cache write-back issue At present, cache write-back is placed in the device data copy stage after stopping the device operation. Writing back to the cache at this stage will cause the data obtained by the cache to be written back to be empty. In order to ensure that the cache data is written back successfully, the data needs to be written back into the stop device stage. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-4-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 3495cec0787721ba7a9d5c19d0bbb66d182de584 Author: Longfang Liu Date: Sat May 10 16:11:51 2025 +0800 hisi_acc_vfio_pci: add eq and aeq interruption restore In order to ensure that the task packets of the accelerator device are not lost during the migration process, it is necessary to send an EQ and AEQ command to the device after the live migration is completed and to update the completion position of the task queue. Let the device recheck the completed tasks data and if there are uncollected packets, device resend a task completion interrupt to the software. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-3-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 8bb7170c5a055ea17c6857c256ee73c10ff872eb Author: Longfang Liu Date: Sat May 10 16:11:50 2025 +0800 hisi_acc_vfio_pci: fix XQE dma address error The dma addresses of EQE and AEQE are wrong after migration and results in guest kernel-mode encryption services failure. Comparing the definition of hardware registers, we found that there was an error when the data read from the register was combined into an address. Therefore, the address combination sequence needs to be corrected. Even after fixing the above problem, we still have an issue where the Guest from an old kernel can get migrated to new kernel and may result in wrong data. In order to ensure that the address is correct after migration, if an old magic number is detected, the dma address needs to be updated. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Reviewed-by: Shameer Kolothum Link: https://lore.kernel.org/r/20250510081155.55840-2-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 07970d048cddeb56fa17925d7c37cb2400322aab Author: Jason Gunthorpe Date: Mon Apr 14 10:46:39 2025 -0300 vfio/type1: Remove Fine Grained Superpages detection VFIO is looking to enable an optimization where it can rely on a fast unmap operation that returned the size of a larger IOPTE. Due to how the test was constructed this would only ever succeed on the AMDv1 page table that supported an 8k contiguous size. Nothing else supports this. Alex says the performance win was fairly minor, so lets remove this code. Always use iommu_iova_to_phys() to extent contiguous pages. Signed-off-by: Jason Gunthorpe Reviewed-by: Alejandro Jimenez Tested-by: Alejandro Jimenez Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/0-v2-97fa1da8d983+412-vfio_fgsp_jgg@nvidia.com Signed-off-by: Alex Williamson commit 72df72e1c6ddfb6e0c2bce174d5879bc095540c8 Author: Nikunj A Dadhania Date: Fri May 2 05:03:46 2025 +0000 KVM: selftests: Add test to verify KVM_CAP_X86_BUS_LOCK_EXIT Add a test case to verify x86's bus lock exit functionality, which is now supported on both Intel and AMD. Trigger bus lock exits by performing a split-lock access, i.e. an atomic access that splits two cache lines. Verify that the correct number of bus lock exits are generated, and that the counter is incremented correctly and at the appropriate time based on the underlying architecture. Generate bus locks in both L1 and L2 (if nested virtualization is enabled), as SVM's functionality in particular requires non-trivial logic to do the right thing when running nested VMs. Signed-off-by: Nikunj A Dadhania Co-developed-by: Manali Shukla Signed-off-by: Manali Shukla Link: https://lore.kernel.org/r/20250502050346.14274-6-manali.shukla@amd.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 89f9edf4c69ddd345b07be414e6a99ace0757ff5 Author: Manali Shukla Date: Fri May 2 05:03:45 2025 +0000 KVM: SVM: Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM CPUs Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM CPUs with Bus Lock Threshold, which is close enough to VMX's Bus Lock Detection VM-Exit to allow reusing KVM_CAP_X86_BUS_LOCK_EXIT. The biggest difference between the two features is that Threshold is fault-like, whereas Detection is trap-like. To allow the guest to make forward progress, Threshold provides a per-VMCB counter which is decremented every time a bus lock occurs, and a VM-Exit is triggered if and only if the counter is '0'. To provide Detection-like semantics, initialize the counter to '0', i.e. exit on every bus lock, and when re-executing the guilty instruction, set the counter to '1' to effectively step past the instruction. Note, in the unlikely scenario that re-executing the instruction doesn't trigger a bus lock, e.g. because the guest has changed memory types or patched the guilty instruction, the bus lock counter will be left at '1', i.e. the guest will be able to do a bus lock on a different instruction. In a perfect world, KVM would ensure the counter is '0' if the guest has made forward progress, e.g. if RIP has changed. But trying to close that hole would incur non-trivial complexity, for marginal benefit; the intent of KVM_CAP_X86_BUS_LOCK_EXIT is to allow userspace rate-limit bus locks, not to allow for precise detection of problematic guest code. And, it's simply not feasible to fully close the hole, e.g. if an interrupt arrives before the original instruction can re-execute, the guest could step past a different bus lock. Suggested-by: Sean Christopherson Signed-off-by: Manali Shukla Link: https://lore.kernel.org/r/20250502050346.14274-5-manali.shukla@amd.com [sean: fix typo in comment] Signed-off-by: Sean Christopherson commit 241dfac96279ce9de47a6d4478dd3d41f262835f Author: Vignesh C Date: Mon May 12 12:28:49 2025 +0530 wifi: ath12k: Fix scan initiation failure handling During a code review, it is observed that in the scenario where scan initiation fails, the current code schedules the ar->scan.timeout workqueue which is not necessary. In the scan initiation failure scenario, exit the code instead of scheduling the ar->scan.timeout workqueue. Compile tested only. Signed-off-by: Vignesh C Link: https://patch.msgid.link/20250512065849.2833232-1-quic_vignc@quicinc.com Signed-off-by: Jeff Johnson commit 246eb353fbe9136ab3dd2ef979764a13984989e2 Author: P Praneesh Date: Wed May 7 22:41:19 2025 +0530 wifi: ath12k: fix memory leak in WMI firmware stats Memory allocated for firmware pdev, vdev and beacon statistics are not released during rmmod. Below kmemleak trace is seen for this memory leak: unreferenced object 0xffff8e76aebdfa00 (size 256): comm "softirq", pid 0, jiffies 4299272453 hex dump (first 32 bytes): 28 19 71 c3 76 8e ff ff 28 19 71 c3 76 8e ff ff (.q.v...(.q.v... 9f ff ff ff f4 d4 03 00 aa 88 09 00 bd 40 23 00 .............@#. backtrace (crc dfe1b440): __kmalloc_cache_noprof+0x2b0/0x370 ath12k_wmi_tlv_fw_stats_data_parse.isra.0+0x44e/0x730 [ath12k] ath12k_wmi_tlv_iter+0x5e/0x140 [ath12k] ath12k_update_stats_event+0x85/0x300 [ath12k] ath12k_wmi_op_rx+0x624/0xd70 [ath12k] ath12k_htc_rx_completion_handler+0x1f4/0x330 [ath12k] ath12k_ce_recv_process_cb+0x218/0x300 [ath12k] ath12k_pci_ce_workqueue+0x1b/0x30 [ath12k] process_one_work+0x219/0x680 bh_worker+0x198/0x1f0 tasklet_action+0x13/0x30 handle_softirqs+0xca/0x460 __irq_exit_rcu+0xbe/0x110 irq_exit_rcu+0x9/0x30 common_interrupt+0xa7/0xc0 asm_common_interrupt+0x26/0x40 Fix this by calling ath12k_fw_stats_reset() before hardware unregister. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: b8a0d83fe4c7 ("wifi: ath12k: move firmware stats out of debugfs") Signed-off-by: P Praneesh Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250507-fw-stats-mem-leak-v1-1-8d4d1d8ec0e8@quicinc.com Signed-off-by: Jeff Johnson commit 6b67d2cf14ea997061f61e9c8afd4e1c0f22acb9 Author: Johan Hovold Date: Fri Mar 21 10:52:19 2025 +0100 wifi: ath12k: fix ring-buffer corruption Users of the Lenovo ThinkPad X13s have reported that Wi-Fi sometimes breaks and the log fills up with errors like: ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492 ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1460, expected 1484 which based on a quick look at the ath11k driver seemed to indicate some kind of ring-buffer corruption. Miaoqing Pan tracked it down to the host seeing the updated destination ring head pointer before the updated descriptor, and the error handling for that in turn leaves the ring buffer in an inconsistent state. While this has not yet been observed with ath12k, the ring-buffer implementation is very similar to the ath11k one and it suffers from the same bugs. Add the missing memory barrier to make sure that the descriptor is read after the head pointer to address the root cause of the corruption while fixing up the error handling in case there are ever any (ordering) bugs on the device side. Note that the READ_ONCE() are only needed to avoid compiler mischief in case the ring-buffer helpers are ever inlined. Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Cc: stable@vger.kernel.org # 6.3 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218623 Link: https://lore.kernel.org/20250310010217.3845141-3-quic_miaoqing@quicinc.com Cc: Miaoqing Pan Signed-off-by: Johan Hovold Reviewed-by: Miaoqing Pan Link: https://patch.msgid.link/20250321095219.19369-1-johan+linaro@kernel.org Signed-off-by: Jeff Johnson commit 89142d34d5602c7447827beb181fa06eb08b9d5c Author: Rajat Soni Date: Wed Apr 30 10:25:38 2025 +0530 wifi: ath12k: fix memory leak in ath12k_service_ready_ext_event Currently, in ath12k_service_ready_ext_event(), svc_rdy_ext.mac_phy_caps is not freed in the failure case, causing a memory leak. The following trace is observed in kmemleak: unreferenced object 0xffff8b3eb5789c00 (size 1024): comm "softirq", pid 0, jiffies 4294942577 hex dump (first 32 bytes): 00 00 00 00 01 00 00 00 00 00 00 00 7b 00 00 10 ............{... 01 00 00 00 00 00 00 00 01 00 00 00 1f 38 00 00 .............8.. backtrace (crc 44e1c357): __kmalloc_noprof+0x30b/0x410 ath12k_wmi_mac_phy_caps_parse+0x84/0x100 [ath12k] ath12k_wmi_tlv_iter+0x5e/0x140 [ath12k] ath12k_wmi_svc_rdy_ext_parse+0x308/0x4c0 [ath12k] ath12k_wmi_tlv_iter+0x5e/0x140 [ath12k] ath12k_service_ready_ext_event.isra.0+0x44/0xd0 [ath12k] ath12k_wmi_op_rx+0x2eb/0xd70 [ath12k] ath12k_htc_rx_completion_handler+0x1f4/0x330 [ath12k] ath12k_ce_recv_process_cb+0x218/0x300 [ath12k] ath12k_pci_ce_workqueue+0x1b/0x30 [ath12k] process_one_work+0x219/0x680 bh_worker+0x198/0x1f0 tasklet_action+0x13/0x30 handle_softirqs+0xca/0x460 __irq_exit_rcu+0xbe/0x110 irq_exit_rcu+0x9/0x30 Free svc_rdy_ext.mac_phy_caps in the error case to fix this memory leak. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Rajat Soni Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250430-wmi-mem-leak-v1-1-fcc9b49c2ddc@quicinc.com Signed-off-by: Jeff Johnson commit a9610bc482ef9c77ee0f3b7c077e0b49732769b8 Author: Miaoqing Pan Date: Thu Apr 24 08:57:03 2025 +0800 wifi: ath12k: support usercase-specific firmware overrides Introduce 'firmware-name' property to allow end-users and/or integrators to decide which usecase-specific firmware to run on the WCN7850 platform. This is necessary due to resource limitations such as memory capacity and CPU capability, or performance and power optimization for different application scenarios. Currently, there are two firmwares, both files can be executed interchangeably. For example: - ath12k/WCN7850/hw2.0/amss.bin, ath12k/WCN7850/hw2.0/m3.bin ath12k/WCN7850/hw2.0/board-2.bin - ath12k/WCN7850/hw2.0/ncm825/amss.bin, ath12k/WCN7850/hw2.0/ncm825/m3.bin ath12k/WCN7850/hw2.0/board-2.bin The former is the default firmware, suitable for most WiFi 7 STA functions. The latter adds support for commercial-quality SAP and optimizes power consumption for IoT applications. And both use the same BDF/regdb data within the main board-2.bin. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Miaoqing Pan Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250424005703.2479907-3-quic_miaoqing@quicinc.com Signed-off-by: Jeff Johnson commit 607d6e49dae5336bd9f7356b0e227d8571450bd1 Author: Miaoqing Pan Date: Thu Apr 24 08:57:02 2025 +0800 dt-bindings: net: wireless: ath12k: describe firmware-name property Introduce 'firmware-name' property to allow end-users and/or integrators to decide which usecase-specific firmware to run on the WCN7850 platform. This is necessary due to resource limitations such as memory capacity and CPU capability, or performance and power optimization for different application scenarios. Two firmwares are supported: 'WCN7850/hw2.0' and 'WCN7850/hw2.0/ncm825'. The former is the default firmware, suitable for most WiFi 7 STA functions. The latter adds support for commercial-quality SAP and optimizes power consumption for IoT applications. Signed-off-by: Miaoqing Pan Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250424005703.2479907-2-quic_miaoqing@quicinc.com Signed-off-by: Jeff Johnson commit 167e6fc7a4471db2c88bb8da32ac444734a41cea Author: Yingying Tang Date: Wed Apr 23 11:26:50 2025 +0530 wifi: ath12k: Adjust the process of resource release for ahb bus Due to the change in the resource release order in ath12k_core_deinit(), the resource release order in the AHB bus removal process needs to be adjusted accordingly. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Fixes: 6cee30f0da75 ("wifi: ath12k: add AHB driver support for IPQ5332") Signed-off-by: Yingying Tang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250423055650.16230-3-quic_yintang@quicinc.com Signed-off-by: Jeff Johnson commit aabd3be90579ed088aa34f0584ab6836c735c76f Author: Yingying Tang Date: Wed Apr 23 11:26:49 2025 +0530 wifi: ath12k: Reorder and relocate the release of resources in ath12k_core_deinit() Ath12k panic notifier is registered in driver loading process. But it is not unregistered if ATH12K_FLAG_QMI_FAIL is set(e.g. load BDF failed) and unload driver. It causes a dirty node in panic notifier list since ath12k panic notifier is not unregistered from list but the buffer of this node is freed in driver unloading process. If load driver again there will be a page fault error due to this dirty node in panic notifier list. This issue is caused by asymmetry between ath12k_core_init() and ath12k_core_deinit(). Reorder and relocate the release of resources in ath12k_core_deinit() to avoid this asymmetry issue. Call Trace: ? show_regs+0x67/0x70 ? __die_body+0x20/0x70 ? __die+0x2b/0x40 ? page_fault_oops+0x15d/0x500 ? search_bpf_extables+0x63/0x90 ? notifier_chain_register+0x21/0xe0 ? search_exception_tables+0x5f/0x70 ? kernelmode_fixup_or_oops.isra.0+0x61/0x80 ? __bad_area_nosemaphore+0x179/0x240 ? bad_area_nosemaphore+0x16/0x20 ? do_user_addr_fault+0x312/0x7f0 ? prb_read_valid+0x1c/0x30 ? exc_page_fault+0x78/0x180 ? asm_exc_page_fault+0x27/0x30 ? notifier_chain_register+0x21/0xe0 ? notifier_chain_register+0x55/0xe0 atomic_notifier_chain_register+0x2c/0x50 ath12k_core_init+0x7e/0x110 [ath12k] ath12k_pci_probe+0xaba/0xba0 [ath12k] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-02903-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 809055628bce8 ("wifi: ath12k: add panic handler") Signed-off-by: Yingying Tang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250423055650.16230-2-quic_yintang@quicinc.com Signed-off-by: Jeff Johnson commit 84873d542e95de3e00ac6e8c95ebeba9f29d6092 Author: Vinith Kumar R Date: Fri Apr 25 06:58:02 2025 +0530 wifi: ath12k: print device dp stats in debugfs Print the data path related device specific stats in debugfs. These device_dp_stats are exposed in the ath12k debugfs directory. Output of device_dp_stats: root@CDCWLEX0799743-LIN:/home/qctest# cat /sys/kernel/debug/ath12k/pci-0000\:58\:00.0/device_dp_stats DEVICE RX STATS: err ring pkts: 0 Invalid RBM: 0 RXDMA errors: Overflow: 0 MPDU len: 0 FCS: 0 Decrypt: 0 TKIP MIC: 0 Unencrypt: 0 MSDU len: 0 MSDU limit: 0 WiFi parse: 0 AMSDU parse: 0 SA timeout: 0 DA timeout: 0 Flow timeout: 0 Flush req: 0 AMSDU frag: 0 Multicast echo: 0 AMSDU mismatch: 0 Unauth WDS: 0 AMSDU or WDS: 0 REO errors: Desc addr zero: 0 Desc inval: 0 AMPDU in non BA: 0 Non BA dup: 0 BA dup: 0 Frame 2k jump: 0 BAR 2k jump: 0 Frame OOR: 155 BAR OOR: 0 No BA session: 0 Frame SN equal SSN: 0 PN check fail: 0 2k err: 0 PN err: 0 Desc blocked: 0 HAL REO errors: ring0: 0 ring1: 0 ring2: 0 ring3: 0 ring4: 0 ring5: 0 ring6: 0 ring7: 0 DEVICE TX STATS: TCL Ring Full Failures: ring0: 0 ring1: 0 ring2: 0 ring3: 0 Misc Transmit Failures: 0 tx_wbm_rel_source: 0:986 1:0 2:0 3:57 4:0 tqm_rel_reason: 0:1043 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0 10:0 11:0 12:0 13:0 14:0 fw_tx_status: 0:57 1:0 2:0 3:0 4:0 5:0 6:0 tx_enqueued: 0:329 1:145 2:464 3:105 tx_completed: 0:329 1:145 2:464 3:105 radio0 tx_pending: 0 REO Rx Received: Ring1: 0:201 1:0 2:0 Ring2: 0:0 1:0 2:0 Ring3: 0:6152 1:0 2:0 Ring4: 0:9 1:0 2:0 Ring5: 0:0 1:0 2:0 Ring6: 0:0 1:0 2:0 Ring7: 0:0 1:0 2:0 Ring8: 0:0 1:0 2:0 Rx WBM REL SRC Errors: TQM: 0:0 1:0 2:0 Rxdma: 0:0 1:0 2:0 Reo: 0:155 1:0 2:0 FW: 0:0 1:0 2:0 SW: 0:0 1:0 2:0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Vinith Kumar R Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250425012802.698914-4-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit c5c62287e6901c1dcac414e8e739bf9fdc72c505 Author: Vinith Kumar R Date: Fri Apr 25 06:58:01 2025 +0530 wifi: ath12k: Add device dp stats support Add support for data path related device specific stats. This information helps to debug connectivity and performance issues in AP, STA, and Mesh modes. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Vinith Kumar R Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250425012802.698914-3-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit b602f1f2d6d4d4197aec137185875ad8b155747f Author: Vinith Kumar R Date: Fri Apr 25 06:58:00 2025 +0530 wifi: ath12k: change soc name to device name To have consistent nomenclature, replace the use of the term "soc" with the term "device". Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Vinith Kumar R Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250425012802.698914-2-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 3126f1c52af5bc8d40d2c984907daeb501f6b739 Author: P Praneesh Date: Thu Apr 24 11:21:04 2025 +0530 wifi: ath12k: Fix invalid RSSI values in station dump When processing a "station dump" command, the driver retrieves RSSI values from the HAL_PHYRX_RSSI_LEGACY TLV received from the monitor destination ring, and reports them to userspace. Currently, the RSSI values reported are improper because the hardware has not been configured to update them properly. To fix this, enable the HTT_RX_FILTER_TLV_FLAGS_PPDU_START_USER_INFO in the filter setup to ensure the correct RSSI values are returned in the HAL_PHYRX_RSSI_LEGACY TLV, resulting in correct RSSI values being reported to userspace. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00218-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Signed-off-by: Sowjanya vardhineni Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250424055104.2503723-1-quic_svardhin@quicinc.com Signed-off-by: Jeff Johnson commit c0c980f237e822fd9cc6c0ab5b60ce8efe76464e Author: Kuninori Morimoto Date: Thu Apr 10 01:10:48 2025 +0000 dt-bindings: timer: renesas,tpu: remove binding documentation commit 1c4b5ecb7ea1 ("remove the h8300 architecture") removes Renesas TPU timer driver. Let's remove its binding documentation. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87semglt2g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Uwe Kleine-König commit b615ce5fbefb7d9bd1739b0aee54825349ae7438 Author: Mykyta Yatsenko Date: Fri May 16 20:55:22 2025 +0100 selftests/bpf: Remove unnecessary link dependencies Remove llvm dependencies from binaries that do not use llvm libraries. Filter out libxml2 from llvm dependencies, as it seems that it is not actually used. This patch reduced link dependencies for BPF selftests. The next line was adding llvm dependencies to every target in the makefile, while the only targets that require those are test runnners (test_progs, test_progs-no_alu32,...): ``` $(OUTPUT)/$(TRUNNER_BINARY): LDLIBS += $$(LLVM_LDLIBS) ``` Before this change: ldd linux/tools/testing/selftests/bpf/veristat linux-vdso.so.1 (0x00007ffd2c3fd000) libelf.so.1 => /lib64/libelf.so.1 (0x00007fe1dcf89000) libz.so.1 => /lib64/libz.so.1 (0x00007fe1dcf6f000) libm.so.6 => /lib64/libm.so.6 (0x00007fe1dce94000) libzstd.so.1 => /lib64/libzstd.so.1 (0x00007fe1dcddd000) libxml2.so.2 => /lib64/libxml2.so.2 (0x00007fe1dcc54000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fe1dca00000) libc.so.6 => /lib64/libc.so.6 (0x00007fe1dc600000) /lib64/ld-linux-x86-64.so.2 (0x00007fe1dcfb1000) liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fe1dc9d4000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fe1dcc38000) After: ldd linux/tools/testing/selftests/bpf/veristat linux-vdso.so.1 (0x00007ffc83370000) libelf.so.1 => /lib64/libelf.so.1 (0x00007f4b87515000) libz.so.1 => /lib64/libz.so.1 (0x00007f4b874fb000) libc.so.6 => /lib64/libc.so.6 (0x00007f4b87200000) libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f4b87444000) /lib64/ld-linux-x86-64.so.2 (0x00007f4b8753d000) Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250516195522.311769-1-mykyta.yatsenko5@gmail.com commit 9c5e285f602f3f9a8e095094737c176234cde5c3 Author: Nuno Sá Date: Mon May 12 13:39:14 2025 +0100 pwm: adp5585: make sure to include mod_devicetable.h Explicitly include mod_devicetable.h for struct platform_device_id. Reviewed-by: Laurent Pinchart Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20250512-dev-adp5589-fw-v3-22-092b14b79a88@analog.com Signed-off-by: Uwe Kleine-König commit 6eed708a5693709ff0d4dd8512b6934be30d4283 Author: Li Ming Date: Fri May 16 22:32:20 2025 +0800 cxl/feature: Remove redundant code of get supported features In cxlctl_get_supported_features(), there is a code block that handles the case where the requested is equal to 0. But the code following the code block can also handle this situation. So the code block is not needed. Signed-off-by: Li Ming Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250516143220.35302-1-ming.li@zohomail.com Signed-off-by: Dave Jiang commit b522a8b6ef362eaaef76bb8faee2cba4f14fc242 Author: Thorsten Blum Date: Mon May 19 12:56:25 2025 +0200 ALSA: n64: Replace deprecated strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250519105628.491675-1-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit 2c5975498e55ec261dfe715199979784e24895bb Author: Sumanth Gavini Date: Sat May 17 04:03:16 2025 -0700 docs: ABI: Fix "firwmare" to "firmware" Fix misspelling reported by codespell Signed-off-by: Sumanth Gavini Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250517110332.1289718-1-sumanth.gavini@yahoo.com Signed-off-by: Dave Jiang commit 1cb0f56d96185cb20e63e191fc291191823e6f52 Author: Paul Chaignon Date: Mon May 19 15:43:57 2025 +0200 bpf: WARN_ONCE on verifier bugs Throughout the verifier's logic, there are multiple checks for inconsistent states that should never happen and would indicate a verifier bug. These bugs are typically logged in the verifier logs and sometimes preceded by a WARN_ONCE. This patch reworks these checks to consistently emit a verifier log AND a warning when CONFIG_DEBUG_KERNEL is enabled. The consistent use of WARN_ONCE should help fuzzers (ex. syzkaller) expose any situation where they are actually able to reach one of those buggy verifier states. Acked-by: Andrii Nakryiko Signed-off-by: Paul Chaignon Link: https://lore.kernel.org/r/aCs1nYvNNMq8dAWP@mail.gmail.com Signed-off-by: Alexei Starovoitov commit 30deb51a677b96f0faf20373995fe0fb4a78b8b8 Author: Jing Zhang Date: Thu Feb 20 14:42:46 2025 -0800 KVM: arm64: vgic-its: Add debugfs interface to expose ITS tables This commit introduces a debugfs interface to display the contents of the VGIC Interrupt Translation Service (ITS) tables. The ITS tables map Device/Event IDs to Interrupt IDs and target processors. Exposing this information through debugfs allows for easier inspection and debugging of the interrupt routing configuration. The debugfs interface presents the ITS table data in a tabular format: Device ID: 0x0, Event ID Range: [0 - 31] EVENT_ID INTID HWINTID TARGET COL_ID HW ----------------------------------------------- 0 8192 0 0 0 0 1 8193 0 0 0 0 2 8194 0 2 2 0 Device ID: 0x18, Event ID Range: [0 - 3] EVENT_ID INTID HWINTID TARGET COL_ID HW ----------------------------------------------- 0 8225 0 0 0 0 1 8226 0 1 1 0 2 8227 0 3 3 0 Device ID: 0x10, Event ID Range: [0 - 7] EVENT_ID INTID HWINTID TARGET COL_ID HW ----------------------------------------------- 0 8229 0 3 3 1 1 8230 0 0 0 1 2 8231 0 1 1 1 3 8232 0 2 2 1 4 8233 0 3 3 1 The output is generated using the seq_file interface, allowing for efficient handling of potentially large ITS tables. This interface is read-only and does not allow modification of the ITS tables. It is intended for debugging and informational purposes only. Signed-off-by: Jing Zhang Link: https://lore.kernel.org/r/20250220224247.2017205-1-jingzhangos@google.com Signed-off-by: Marc Zyngier commit a556bd882b9482f1b7ea00fcf07f9bc169f404c8 Author: Jesung Yang Date: Wed May 7 04:48:41 2025 +0900 docs: align with scripts/syscall.tbl migration Update the documentation to reflect the migration of the following architectures to the centralized syscall table format: arc, arm64, csky, hexagon, loongarch, nios2, openrisc, riscv As of commit 3db80c999debbad ("riscv: convert to generic syscall table"), these architectures no longer rely on include/uapi/asm-generic/unistd.h. Instead, syscall table headers (syscall_table_{32,64}.h) are generated by scripts/syscalltbl.sh based on entries in scripts/syscall.tbl, with ABIs specified in arch/*/kernel/Makefile.syscalls. For the convenience of developers working with older kernel versions, the original documentation is fully retained, with new sections added to cover the scripts/syscall.tbl approach. Verified with `make htmldocs`. Signed-off-by: Jesung Yang Link: https://lore.kernel.org/lkml/20240704143611.2979589-1-arnd@kernel.org Signed-off-by: Jonathan Corbet Message-ID: <20250506194841.1567737-1-y.j3ms.n@gmail.com> commit 54538c24eeac901ddefe2238142fabf2839ee1a0 Author: Utkarsh Tiwari Date: Mon May 19 13:32:47 2025 +0530 Documentation: NTB: Fix typo Fix 'peace' to 'piece' in the ntb documentation Signed-off-by: Utkarsh Tiwari Signed-off-by: Jonathan Corbet Message-ID: <20250519080248.648971-1-utkarsh02t@gmail.com> commit 6e9a2f8dbe93c8004c2af2c0158888628b7ca034 Author: Scott Mayhew Date: Wed Apr 16 11:23:38 2025 -0400 NFSv4: xattr handlers should check for absent nfs filehandles The nfs inodes for referral anchors that have not yet been followed have their filehandles zeroed out. Attempting to call getxattr() on one of these will cause the nfs client to send a GETATTR to the nfs server with the preceding PUTFH sans filehandle. The server will reply NFS4ERR_NOFILEHANDLE, leading to -EIO being returned to the application. For example: $ strace -e trace=getxattr getfattr -n system.nfs4_acl /mnt/t/ref getxattr("/mnt/t/ref", "system.nfs4_acl", NULL, 0) = -1 EIO (Input/output error) /mnt/t/ref: system.nfs4_acl: Input/output error +++ exited with 1 +++ Have the xattr handlers return -ENODATA instead. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit e5296637a322b840d772f88f4d58b4bc72b29058 Author: Jeff Layton Date: Tue Apr 8 09:43:15 2025 -0400 nfs: add a refcount tracker for struct net as held by the nfs_client These are long-held references to the netns, so make sure the refcount tracker is aware of them. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker commit fadc0f3bb2de8c570ced6d9c1f97222213d93140 Author: Nikhil Jha Date: Wed Mar 19 13:02:40 2025 -0400 sunrpc: don't immediately retransmit on seqno miss RFC2203 requires that retransmitted messages use a new gss sequence number, but the same XID. This means that if the server is just slow (e.x. overloaded), the client might receive a response using an older seqno than the one it has recorded. Currently, Linux's client immediately retransmits in this case. However, this leads to a lot of wasted retransmits until the server eventually responds faster than the client can resend. Client -> SEQ 1 -> Server Client -> SEQ 2 -> Server Client <- SEQ 1 <- Server (misses, expecting seqno = 2) Client -> SEQ 3 -> Server (immediate retransmission on miss) Client <- SEQ 2 <- Server (misses, expecting seqno = 3) Client -> SEQ 4 -> Server (immediate retransmission on miss) ... and so on ... This commit makes it so that we ignore messages with bad checksums due to seqnum mismatch, and rely on the usual timeout behavior for retransmission instead of doing so immediately. Signed-off-by: Nikhil Jha Acked-by: Chuck Lever Signed-off-by: Anna Schumaker commit 08d6ee6d8a10aef958c2af16bb121070290ed589 Author: Nikhil Jha Date: Wed Mar 19 13:02:39 2025 -0400 sunrpc: implement rfc2203 rpcsec_gss seqnum cache This implements a sequence number cache of the last three (right now hardcoded) sent sequence numbers for a given XID, as suggested by the RFC. From RFC2203 5.3.3.1: "Note that the sequence number algorithm requires that the client increment the sequence number even if it is retrying a request with the same RPC transaction identifier. It is not infrequent for clients to get into a situation where they send two or more attempts and a slow server sends the reply for the first attempt. With RPCSEC_GSS, each request and reply will have a unique sequence number. If the client wishes to improve turn around time on the RPC call, it can cache the RPCSEC_GSS sequence number of each request it sends. Then when it receives a response with a matching RPC transaction identifier, it can compute the checksum of each sequence number in the cache to try to match the checksum in the reply's verifier." Signed-off-by: Nikhil Jha Acked-by: Chuck Lever Signed-off-by: Anna Schumaker commit 4d4eb38795b5cbc66103ae2582bccead5bf0f736 Merge: 8cdf00b843ea3c a5806cd506af5a Author: Arnaldo Carvalho de Melo Date: Mon May 19 11:12:36 2025 -0300 Merge remote-tracking branch 'torvalds/master' into perf-tools-next To pick up changes for other tools/ libraries used by perf and for header synchronization with the kernel sources originals. Signed-off-by: Arnaldo Carvalho de Melo commit 36795548dcc841c73f03793ed6cf741a88130922 Author: Sukrut Bellary Date: Tue Mar 18 16:00:40 2025 -0700 pmdomain: ti: Fix STANDBY handling of PER power domain Per AM335x TRM[1](section 8.1.4.3 Power mode), in case of STANDBY, PER domain should be ON. So, fix the PER power domain handling on standby. [1] https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf Signed-off-by: Sukrut Bellary Reviewed-by: Kevin Hilman Tested-by: Judith Mendez Link: https://lore.kernel.org/r/20250318230042.3138542-3-sbellary@baylibre.com Signed-off-by: Ulf Hansson commit 5fed7fe33c2cd7104fc87b7bc699a7be892befa2 Merge: b0779ea486061a b1244645ad6c79 Author: Georgi Djakov Date: Mon May 19 17:09:50 2025 +0300 Merge branch 'icc-sa8775p' into icc-next Add Epoch Subsystem (EPSS) L3 provider support on SA8775P SoCs. Current interconnect framework is based on static IDs for creating node and registering with framework. This becomes a limitation for topologies where there are multiple instances of same interconnect provider. Modified interconnect framework APIs to create and link icc node with dynamic IDs, this will help to overcome the dependency on static IDs. * icc-sa8775p dt-bindings: interconnect: Add EPSS L3 compatible for SA8775P interconnect: core: Add dynamic id allocation support interconnect: qcom: Add multidev EPSS L3 support interconnect: qcom: icc-rpmh: Add dynamic icc node id support interconnect: qcom: sa8775p: Add dynamic icc node id support Link: https://lore.kernel.org/r/20250415095343.32125-1-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit b0779ea486061a1756892f4ea43e258e5dd559cd Author: Neil Armstrong Date: Mon May 19 15:57:02 2025 +0200 interconnect: qcom: sm8650: remove regmap config for mc_virt & clk_virt The mc_virt & clk_virt nodes are virtual and doesn't have associated registers, thus the regmap config will fail with: qnoc-sm8650 interconnect-0: error -EINVAL: invalid resource (null) Remove the regmap config since QoS will never be applied to those virtual nodes. Reported-by: Pengyu Luo Fixes: 40ef9b6b778f ("interconnect: qcom: sm8650: enable QoS configuration") Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250519-topic-sm8650-upstream-icc-qos-fix-v1-1-6ace779250aa@linaro.org Signed-off-by: Georgi Djakov commit d5048aca8d9d7f31ecd8b8279ea20cfbbf80e59f Author: Bagas Sanjaya Date: Thu May 8 07:58:39 2025 +0700 Documentation: ioctl-number: Update table intro Introduction paragraph to the ioctl numbers table states that only ioctls in up to ancient Linux kernel version (v2.6.31) for x86 arch are listed. This is inaccurate as the table also lists ioctls from non-x86 archs and the kernel is continously developed (currently in v6.x). Update the paragraph accordingly. Signed-off-by: Bagas Sanjaya Signed-off-by: Jonathan Corbet Message-ID: <20250508005838.8381-2-bagasdotme@gmail.com> commit b26717852db7e2a6b5518177bc852a90e89fd1f1 Author: Mauro Carvalho Chehab Date: Wed May 7 14:11:17 2025 +0200 docs: conf.py: drop backward support for old Sphinx versions Since commit 5e25b972a22b ("docs: changes: update Python minimal version"), the minimal Sphinx version is 3.4.3. Drop support for older versions from the config file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <20250507121117.317810-1-mchehab+huawei@kernel.org> commit 1884847909afb5b980c8b48f80a7d2ce0a4061ca Author: Randy Dunlap Date: Thu May 8 17:55:38 2025 -0700 Docs: driver-api/basics: add kobject_event interfaces Add the kernel-doc comments from lib/kobject_uevent.c to the "Kernel objects manipulation" section of driver API Basics. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Rafael J. Wysocki Cc: Danilo Krummrich Signed-off-by: Jonathan Corbet Message-ID: <20250509005538.685678-1-rdunlap@infradead.org> commit 14e991154de2bfc923d3f36aa238733b3530c65b Author: Randy Dunlap Date: Sun May 11 19:32:33 2025 -0700 Docs: relay: editing cleanups Cleanup some punctuation, capital letter, and a missing word in relay.rst. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Andrew Morton Cc: Jens Axboe Cc: Tom Zanussi Signed-off-by: Jonathan Corbet Message-ID: <20250512023233.107582-1-rdunlap@infradead.org> commit 52092c1d501bb56432c667d397008faad8acbd90 Author: Hendrik Hamerlinck Date: Tue May 13 13:09:31 2025 +0200 docs: fix "incase" typo in coresight/panic.rst Corrects a spelling mistake in Documentation/trace/coresight/panic.rst where "incase" was used instead of "in case". Signed-off-by: Hendrik Hamerlinck Signed-off-by: Jonathan Corbet Message-ID: <20250513110931.15072-1-hendrik.hamerlinck@hammernet.be> commit 8e9987485d9ae233fdd5b3f8e6857d28bcfe6a04 Author: Philipp Stanner Date: Mon May 19 13:29:57 2025 +0200 PCI: Remove pcim_request_region_exclusive() pcim_request_region_exclusive() was only needed for redirecting the relatively exotic exclusive request functions in pci.c in case of them operating in managed mode. The managed nature has been removed from those functions and no one else uses pcim_request_region_exclusive(). Remove pcim_request_region_exclusive(). Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20250519112959.25487-5-phasta@kernel.org commit b4fb90fb930193bf391b0fd8e9e4fa63b347e3ed Author: Philipp Stanner Date: Mon May 19 13:29:56 2025 +0200 Documentation/driver-api: Update pcim_enable_device() pcim_enable_device() is not related anymore to switching the mode of operation of any functions. It merely sets up a devres callback for automatically disabling the PCI device on driver detach. Adjust the function's documentation. Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250519112959.25487-4-phasta@kernel.org commit 51f6aec99cb0493b6c288ba55bed2ef9fb6242ca Author: Philipp Stanner Date: Mon May 19 13:29:55 2025 +0200 PCI: Remove hybrid devres nature from request functions All functions based on __pci_request_region() and its release counter part support "hybrid mode", where the functions become managed if the PCI device was enabled with pcim_enable_device(). Removing this undesirable feature requires to remove all users who activated their device with that function and use one of the affected request functions. These users were: ASoC alsa cardreader cirrus i2c mmc mtd mtd mxser net spi vdpa vmwgfx all of which have been ported to always-managed pcim_ functions by now. The hybrid nature can, thus, be removed from the aforementioned PCI functions. Remove all function guards and documentation in pci.c related to the hybrid redirection. Adjust the visibility of pcim_release_region(). Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20250519112959.25487-3-phasta@kernel.org commit 61bd8e76021e779f7ba3c761919b533fb3f6f584 Merge: 61704413dec076 71c9475b1e2cc4 Author: Ulf Hansson Date: Mon May 19 14:26:54 2025 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.15-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit dbb79974193a2932e828ebbd216efb428c81dc63 Author: Raju Rangoju Date: Fri May 16 15:36:58 2025 +0530 spi: spi_amd: Update Kconfig dependencies Add X86 and SPI_MEM as dependencies for the spi_amd driver to ensure it is built only on relevant platforms and with the required SPI memory framework. Co-developed-by: Akshata MukundShetty Signed-off-by: Akshata MukundShetty Signed-off-by: Raju Rangoju Link: https://patch.msgid.link/20250516100658.585654-4-Raju.Rangoju@amd.com Signed-off-by: Mark Brown commit a5733666c775eb852409261d7a6363883d97ff93 Author: Raju Rangoju Date: Fri May 16 15:36:57 2025 +0530 spi: spi_amd: Add HIDDMA basic write support SPI index mode has hardware limitation of transferring only 64 bytes per transaction due to fixed number of FIFO registers. This constraint leads to performance issues when reading/writing data to/from NAND/NOR flash devices, as the controller must issue multiple requests to read/write 64-byte chunks, even if the slave can transfer up to 2 or 4 KB in a single transaction. The AMD HID2 SPI controller supports DMA mode, allowing for reading/writing up to 4 KB of data in a single transaction. The existing spi_amd driver already supports HID2 DMA read operations. This patch introduces changes to implement HID2 DMA single mode basic write support for the HID2 SPI controller. Co-developed-by: Krishnamoorthi M Signed-off-by: Krishnamoorthi M Co-developed-by: Akshata MukundShetty Signed-off-by: Akshata MukundShetty Signed-off-by: Raju Rangoju Link: https://patch.msgid.link/20250516100658.585654-3-Raju.Rangoju@amd.com Signed-off-by: Mark Brown commit 8cd079e69dc51e707b0a7ce105b01f6dbb66ddc1 Author: Raju Rangoju Date: Fri May 16 15:36:56 2025 +0530 spi: spi_amd: Remove read{q,b} usage on DMA buffer Add changes to replace the usage of read{q,b} MMIO accessors with direct memory copy logic for reading data from DMA buffer. Co-developed-by: Krishnamoorthi M Signed-off-by: Krishnamoorthi M Signed-off-by: Raju Rangoju Link: https://patch.msgid.link/20250516100658.585654-2-Raju.Rangoju@amd.com Signed-off-by: Mark Brown commit 61704413dec076ffff50013fbb2c86dab458c1dd Author: Haibo Chen Date: Fri May 16 15:46:23 2025 +0800 mmc: sdhci-esdhc-imx: fix few build warnings drivers/mmc/host/sdhci-esdhc-imx.c:1566 sdhci_esdhc_imx_hwinit() warn: inconsistent indenting drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_min'. drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_max'. Fixes: be953af79cc6 ("mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning") Fixes: 541a95e64d76 ("mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing") Reported-by: kernel test robot Closes: https://lore.kernel.org/all/202505160225.Csr5USfq-lkp@intel.com/ Acked-by: Adrian Hunter Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/20250516-b4-usdhc-v2-1-3fccd02f5602@nxp.com Signed-off-by: Ulf Hansson commit e249e584d052c76f1b5f2c4df2bde0260389b4ce Author: Yumeng Fang Date: Thu May 15 20:42:01 2025 +0800 mmc: bcm2835: Use str_read_write() helper Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Yumeng Fang Link: https://lore.kernel.org/r/20250515204201502Kzmj4I6k5Fv2FjqyEjF6n@zte.com.cn Signed-off-by: Ulf Hansson commit 676a83855614635af3bf31ad3f8fec4031f81354 Author: Luke Wang Date: Wed May 14 17:49:03 2025 +0800 mmc: host: sdhci-esdhc-imx: refactor the system PM logic Current suspend/resume logic has one issue. In suspend, will config register when call sdhci_suspend_host(), but at this time, can't guarantee host in runtime resume state. If not, the per clock is gate off, access register will hang. In sdhci_esdhc_suspend/sdhci_esdhc_resume, remove sdhci_suspend_host() and sdhci_resume_host(), all are handled in runtime PM callbacks except the wakeup irq setting. For wakeup irq setting, use pm_runtime_get_sync() in sdhci_esdhc_suspend() to make sure clock gate on. Remove pinctrl_pm_select_default_state() in sdhci_esdhc_resume, because pm_runtime_force_resume() already config the pinctrl state according to ios timing, and here config the default pinctrl state again is wrong for SDIO3.0 device if it keep power in suspend. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250514094903.1771642-2-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit b8b0f46d1550d624dd595201b1f5bc638dd4fbfe Author: Luke Wang Date: Wed May 14 17:49:02 2025 +0800 mmc: sdhci: export APIs for sdhci irq wakeup Export the sdhci_enable_irq_wakeups() and sdhci_disable_irq_wakeups, so other driver can use them. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250514094903.1771642-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit fed55f49fad181be9dfb93c06efc4ab2b71a72a9 Author: D Scott Phillips Date: Tue May 13 11:45:14 2025 -0700 arm64: errata: Work around AmpereOne's erratum AC04_CPU_23 On AmpereOne AC04, updates to HCR_EL2 can rarely corrupt simultaneous translations for data addresses initiated by load/store instructions. Only instruction initiated translations are vulnerable, not translations from prefetches for example. A DSB before the store to HCR_EL2 is sufficient to prevent older instructions from hitting the window for corruption, and an ISB after is sufficient to prevent younger instructions from hitting the window for corruption. Signed-off-by: D Scott Phillips Reviewed-by: Oliver Upton Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20250513184514.2678288-1-scott@os.amperecomputing.com Signed-off-by: Marc Zyngier commit e5502d15b0f363db106540d5ae4946e04282059c Author: Yixun Lan Date: Fri May 9 21:22:12 2025 +0800 mmc: sdhci-of-k1: add support for SpacemiT K1 SoC The SDHCI controller found in SpacemiT K1 SoC features SD, SDIO, eMMC support, such as: - Compatible for 4-bit SDIO 3.0 UHS-I protocol, up to SDR104 - Compatible for 4-bit SD 3.0 UHS-I protocol, up to SDR104 - Compatible for 8bit eMMC5.1, up to HS400 Signed-off-by: Yixun Lan Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250509-20-k1-sdhci-v3-2-526c35feaa20@gentoo.org Signed-off-by: Ulf Hansson commit 7464fee9d7878a97109ff7c132bb04a6ad8c615d Author: Yixun Lan Date: Fri May 9 21:22:11 2025 +0800 dt-bindings: mmc: spacemit,sdhci: add support for K1 SoC Add support for the SD/eMMC Host Controller found in SpacemiT K1 SoC, The controller supports data transmission of MMC, SDIO, SD protocol. Reviewed-by: Rob Herring (Arm) Signed-off-by: Yixun Lan Link: https://lore.kernel.org/r/20250509-20-k1-sdhci-v3-1-526c35feaa20@gentoo.org Signed-off-by: Ulf Hansson commit f440518f379d22c95329e9e0e0fb6caaafa0f8b0 Author: Geert Uytterhoeven Date: Mon Apr 14 09:24:25 2025 +0200 m68k: defconfig: Update defconfigs for v6.15-rc1 - Drop CONFIG_PRIME_NUMBERS=m (auto-modular since commit 313b38a6ecb46db4 ("lib/prime_numbers: convert self-test to KUnit")), - Drop CONFIG_TEST_PRINTF=m (Replaced by auto-modular CONFIG_PRINTF_KUNIT_TEST in commit 7a79e7daa84e2302 ("printf: convert self-test to KUnit")), - Drop CONFIG_TEST_SCANF=m (Replaced by auto-modular CONFIG_SCANF_KUNIT_TEST in commit 97c1f302f2bc318e ("scanf: convert self-test to KUnit")), - Drop CONFIG_TEST_BLACKHOLE_DEV=m (replaced by auto-modular CONFIG_BLACKHOLE_DEV_KUNIT_TEST in commit b341f6fd45abb188 ("blackhole_dev: convert self-test to KUnit")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/e7d9ff0ef58efaa3e0adcb7207e6b44d948caa25.1744615371.git.geert@linux-m68k.org commit 2dbe93d1e4d730e6e730310035906aa85fa5eee6 Author: Anish Dabhane Date: Sun May 18 19:31:03 2025 +0530 Fix spelling error for 'parallel' Signed-off-by: Anish Dabhane Signed-off-by: Jonathan Corbet Message-ID: <20250518140107.21310-1-anishdabhane71@gmail.com> commit 8c138a189f6db295ceb32258d46ac061df0823e5 Author: Robin Murphy Date: Mon May 19 11:56:04 2025 +0100 perf/arm-cmn: Add CMN S3 ACPI binding An ACPI binding for CMN S3 was not yet finalised when the driver support was originally written, but v1.2 of DEN0093 "ACPI for Arm Components" has at last been published; support ACPI systems using the proper HID. Cc: stable@vger.kernel.org Fixes: 0dc2f4963f7e ("perf/arm-cmn: Support CMN S3") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/7dafe147f186423020af49d7037552ee59c60e97.1747652164.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 95112d977fbc46121f4a230543d56981dcb5df9f Author: Shivam Sharma <10sharmashivam@gmail.com> Date: Sun May 18 17:26:58 2025 +0000 docs: admin-guide: fix typos in reporting-issues.rst Correct pin-point to pinpoint, If that the case to If that is the case, and its only slightly modified to it's only slightly modified in Documentation/admin-guide/reporting-issues.rst for proper spelling and grammar. Signed-off-by: Shivam Sharma <10sharmashivam@gmail.com> Acked-by: Thorsten Leemhuis Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Message-ID: <20250518172658.6983-1-10sharmashivam@gmail.com> commit f0534aace311f4fa1d25fc44a86edcbb24e3434e Author: Loic Poulain Date: Wed May 7 15:45:38 2025 +0200 mmc: core: Scan the eMMC boot areas for partition table It appears that some vendors provision the boot areas with valid part tables (GPT) in order to have identifiable partitions for device and firmware specific data, such has the qualcomm CDT (Qualcomm Config Data Table). Additionally, these boot areas can be utilized to host device-specific IDs, calibration data, and other critical information. Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/20250507134538.575912-1-loic.poulain@oss.qualcomm.com Signed-off-by: Ulf Hansson commit a8ae8a0e848e3506c95e45e7cb6e640502495f1a Merge: b8fa067c4a76e9 40d48527a587b5 Author: David S. Miller Date: Mon May 19 12:10:43 2025 +0100 Merge tag 'ovpn-net-next-20250515' of https://github.com/OpenVPN/ovpn-net-next Antonio Quartulli says: ==================== ovpn: pull request for net-next: ovpn 2025-05-15 this is a new version of the previous pull request. These time I have removed the fixes that we are still discussing, so that we don't hold the entire series back. There is a new fix though: it's about properly checking the return value of skb_to_sgvec_nomark(). I spotted the issue while testing pings larger than the iface's MTU on a TCP VPN connection. I have added various Closes and Link tags where applicable, so that we have references to GitHub tickets and other public discussions. Since I have resent the PR, I have also added Andrew's Reviewed-by to the first patch. Please pull or let me know if something should be changed! ==================== Signed-off-by: David S. Miller Patchset highlights: - update MAINTAINERS entry for ovpn - extend selftest with more cases - avoid crash in selftest in case of getaddrinfo() failure - fix ndo_start_xmit return value on error - set ignore_df flag for IPv6 packets - drop useless reg_state check in keepalive worker - retain skb's dst when entering xmit function - fix check on skb_to_sgvec_nomark() return value commit 5b5bf5922f4c104e4e829c0dbfdd9399b7cfc434 Author: Mohammad Rafi Shaik Date: Mon May 19 14:02:44 2025 +0530 ASoC: qcom: sc8280xp: Add sound card support for QCS9100 and QCS9075 Add compatibles for sound card on Qualcomm QCS9100 and QCS9075 boards. Signed-off-by: Mohammad Rafi Shaik Reviewed-by: Srinivas Kandagatla Link: https://patch.msgid.link/20250519083244.4070689-3-mohammad.rafi.shaik@oss.qualcomm.com Reviewed-by: Dmitry Baryshkov Signed-off-by: Mark Brown commit 689a95178f31ccfc9af0a11abcb11f2a200095bc Author: Mohammad Rafi Shaik Date: Mon May 19 14:02:43 2025 +0530 ASoC: dt-bindings: qcom,sm8250: Add QCS9100 and QCS9075 sound card Document the bindings for the Qualcomm QCS9100 and QCS9075 board specific sound card. The bindings are the same as for other newer Qualcomm ADSP sound cards, thus keep them in existing qcom,sm8250.yaml file, even though Linux driver is separate. Signed-off-by: Mohammad Rafi Shaik Link: https://patch.msgid.link/20250519083244.4070689-2-mohammad.rafi.shaik@oss.qualcomm.com Signed-off-by: Mark Brown commit e717c661e2d1a660e96c40b0fe9933e23a1d7747 Author: Martin Povišer Date: Sun May 18 20:50:46 2025 +1000 ASoC: apple: mca: Constrain channels according to TDM mask We don't (and can't) configure the hardware correctly if the number of channels exceeds the weight of the TDM mask. Report that constraint in startup of FE. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250518-mca-fixes-v1-1-ee1015a695f6@gmail.com Signed-off-by: Mark Brown commit ec23a899d96f9ee3389abe6c516d09cae2fde5e3 Author: Geert Uytterhoeven Date: Fri May 16 15:32:24 2025 +0200 spi: sh-msiof: Move register definitions to Move the MSIOF register and register bit definitions from the MSIOF SPI driver to the existing header file , so they can be shared with the MSIOF I2S driver. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/066d1086973eb309006258484e9fe8138807e565.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 8f836868d848a9b84c38ae1f8e7366e01927c024 Author: Geert Uytterhoeven Date: Fri May 16 15:32:23 2025 +0200 spi: sh-msiof: Document frame start sync pulse mode Unused, but nice to have it documented. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/3d3acaab4a4125106a0655d28c09c050341c5eeb.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit acb47aa9b1e2f47121cf2233fcaf998151ab5410 Author: Geert Uytterhoeven Date: Fri May 16 15:32:22 2025 +0200 spi: sh-msiof: Double maximum DMA transfer size using two groups The maximum DMA transfer size is limited by the maximum values that can be written to the word count fields (WDLENx) in the Transmit and Control Data Registers (SITDR2/SIRDR2). As all MSIOF variants support transferring data of multiple (two or four) groups, the maximum size can be doubled by using two groups instead of one, thus reducing setup overhead for very large SPI transfers. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/bad522c76b8d225c195433977b22f95015cf2612.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 39d0856f4102b6b61fdc650f90a1d9231e2bab17 Author: Geert Uytterhoeven Date: Fri May 16 15:32:21 2025 +0200 spi: sh-msiof: Simplify BRG's Division Ratio As FIELD_PREP() masks the value to be stored in the field, the Baud Rate Generator's Division Ratio handling can be simplified from a look-up table to a single subtraction. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/e736221942b0381fb53dc64109a1389f7ec5f44a.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 5b91dc7e3e371e7263b95c0d31151c645d6652a6 Author: Geert Uytterhoeven Date: Fri May 16 15:32:20 2025 +0200 spi: sh-msiof: Increase TX FIFO size for R-Car V4H/V4M The MSIOF transmit FIFOs on R-Car V4H and V4M have 256 stages. Add a new family-specific match entry to handle this. Add quirk match entries for older R-Car Gen4 Socs (R-Car V3U and S4-8) that have transmit FIFOs with only 64 stages, just like on R-Car Gen3. Update the (unused) definition of SIFCTR_TFUA for consistency. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/69cb5fc48f034d37484fa127b9864a1971a83417.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit f669c2827dd691b10fcf4e4c5546869a51d0a46e Author: Geert Uytterhoeven Date: Fri May 16 15:32:19 2025 +0200 spi: sh-msiof: Correct RX FIFO size for R-Car Gen3 According to the R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 28, 2017, the MSIOF receive FIFOs on R-Car Gen3 SoCs have room for 256 words of 32 bits. Note that this change has no actual impact on the behavior of the driver, as SPI_CONTROLLER_MUST_TX is set, and transfer size is currenty limited to the minimum of the transmit and receive FIFO sizes. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/6f74508ea4681aa0b7c6bf6810eab026725e75a3.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 1ab2c8c45f5c5df6707cc848686e674f4ec5c3d9 Author: Geert Uytterhoeven Date: Fri May 16 15:32:18 2025 +0200 spi: sh-msiof: Correct RX FIFO size for R-Car Gen2 According to Renesas Technical Updates TN-RCS-S068A/E, the MSIOF receive FIFOs on R-Car Gen2 SoCs have room for 128 words of 32 bits. Note that this change has no actual impact on the behavior of the driver, as SPI_CONTROLLER_MUST_TX is set, and transfer size is currenty limited to the minimum of the transmit and receive FIFO sizes. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/fd11933f932df81d84f417a21e2179bd4fdcfdc1.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 955f7ce6680564963765e5fc1c3e71027a39a806 Author: Geert Uytterhoeven Date: Fri May 16 15:32:17 2025 +0200 spi: sh-msiof: Add core support for dual-group transfers All MSIOF variants support transferring data of multiple (2 or 4) groups. Add definitions for the register bits related to multiple groups, and enhance sh_msiof_spi_set_mode_regs() to accept a second group size. For now the second group is unused. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/be75e20cfcd2a6c0d73ab09e0126f902911adc69.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit acedbff0f0de1c116a0f8d943c4cf005f61f6143 Author: Geert Uytterhoeven Date: Fri May 16 15:32:16 2025 +0200 spi: sh-msiof: Correct SIMDR2_GRPMASK The Group Output Mask is not a single bit, but a bit field, containing one bit for each of the four possible groups. Correct the definition. Note that this change has no direct impact, as the driver only uses the first group. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/ad268d67807cb7e544eddaf7a056793482a965d4.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 8f3903b382f73eb5c36d342dea838d991e4bbe08 Author: Geert Uytterhoeven Date: Fri May 16 15:32:15 2025 +0200 spi: sh-msiof: SIFCTR bitfield conversion Convert MSIOF FIFO Control Register field accesses to use the FIELD_PREP() bitfield access macro. This gets rid of explicit shifts and custom field preparation macros. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/0bf4c366381a8999c9755285272897300852bc18.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit bd8d6658e7084ff9e78da9623633e79c9d31ad68 Author: Geert Uytterhoeven Date: Fri May 16 15:32:14 2025 +0200 spi: sh-msiof: SICTR bitfield conversion Convert MSIOF Control Register field accesses to use the FIELD_PREP() bitfield access macro. This gets rid of explicit shifts. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/4511c678c8fce5969eb50ffa7372d53396ff80ff.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit c2cc4b72fc14c84fdb1bc49ec98af252ed64fbf3 Author: Geert Uytterhoeven Date: Fri May 16 15:32:13 2025 +0200 spi: sh-msiof: SITSCR/SIRSCR bitfield conversion Convert MSIOF Transmit and Receive Clock Select Register field accesses to use the FIELD_PREP() bitfield access macro. This gets rid of explicit shifts and custom field preparation macros. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/f2462c99b6ea2e45b995ab4509c2f039043da032.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 386cc5207ba2b68a4672cb68810c44412531e74e Author: Geert Uytterhoeven Date: Fri May 16 15:32:12 2025 +0200 spi: sh-msiof: SITMDR2 and SIRMDR2 bitfield conversion Convert MSIOF Transmit and Receive Mode Register 2 field accesses to use the FIELD_PREP() bitfield access macro. This gets rid of explicit shifts and custom field preparation macros. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/135b92d010a71e2c224feab3a5792724b4e60ff1.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 6bae252a9452ca8496670230a7821c34450763a2 Author: Geert Uytterhoeven Date: Fri May 16 15:32:11 2025 +0200 spi: sh-msiof: SITMDR1/SIRMDR1 bitfield conversion Convert MSIOF Transmit and Receive Mode Register 1 field accesses to use the FIELD_PREP() bitfield access macro. This gets rid of explicit shifts. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/9685c54e752b8ef4256c9b281e9d8292e71d222e.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 74cb19c943ddb46f3d06323c3d0469f14282c8ca Author: Geert Uytterhoeven Date: Fri May 16 15:32:10 2025 +0200 spi: sh-msiof: Make words/fs unsigned in FIFO helpers Make the words and fs parameters of the various FIFO filler and emptier functions unsigned, as they can never be negative. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/a7b13ecb1811148227ec8c883079085ed1ea6eac.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit b4eec5cdf112e3a4e286fb79fe507b09e2fca66f Author: Geert Uytterhoeven Date: Fri May 16 15:32:09 2025 +0200 spi: sh-msiof: Make words/bits unsigned in sh_msiof_spi_txrx_once() Make the words and bits parameters of sh_msiof_spi_txrx_once() unsigned, as that matches what is passed by the caller. This allows us to replace min_t() by the safer min(). Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/30eff1052642a4bcb0f1bc4bed7aae25d355a7dc.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 3dd5ed19a2e8283f9ead5f2fd09b267a337ab86d Author: Geert Uytterhoeven Date: Fri May 16 15:32:08 2025 +0200 spi: sh-msiof: Use bool for boolean flags Use bools instead of integers for boolean flags, which allows us to remove the "!!" idiom from several expressions. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/35cd51bdfb3c810911a5be757e0ce5bb29dcc755.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 74df74ee83acfea4e9a6b47386c7907379c9295f Author: Geert Uytterhoeven Date: Fri May 16 15:32:07 2025 +0200 spi: sh-msiof: Complete using dev in sh_msiof_spi_probe() Commit c4887bd4b35b225f ("spi: sh-msiof: use dev in sh_msiof_spi_probe()") forgot to convert one instance. Signed-off-by: Geert Uytterhoeven Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/88d271b2d16c6ad7f174858894573f91cec1bc90.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 0941d5166629cb766000530945e54b4e49680c68 Author: Geert Uytterhoeven Date: Fri May 16 15:32:06 2025 +0200 spi: sh-msiof: Fix maximum DMA transfer size The maximum amount of data to transfer in a single DMA request is calculated from the FIFO sizes (which is technically not 100% correct, but a simplification, as it is limited by the maximum word count values in the Transmit and Control Data Registers). However, in case there is both data to transmit and to receive, the transmit limit is overwritten by the receive limit. Fix this by using the minimum applicable FIFO size instead. Move the calculation outside the loop, so it is not repeated for each individual DMA transfer. As currently tx_fifo_size is always equal to rx_fifo_size, this bug had no real impact. Fixes: fe78d0b7691c0274 ("spi: sh-msiof: Fix FIFO size to 64 word from 256 word") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/d9961767a97758b2614f2ee8afe1bd56dc900a60.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit ee44d3fc9d8b882cbc98acf2d3c773aba971aa67 Author: Geert Uytterhoeven Date: Fri May 16 15:32:05 2025 +0200 spi: sh-msiof: Remove unneeded compatible values The Clock-Synchronized Serial Interfaces with FIFO (MSIOF) driver matches against both SoC-specific and family-specific compatible values to maintain backwards-compatibility with old DTBs predating the introduction of the family-specific compatible values. For RZ/G1, the SoC-specific compatible match entry can be removed from the driver: their DT always had the family-specific compatible values, and thus there was never a need to add the SoC-specific compatible values to the driver. For R-Car Gen2 and M3-W, the SoC-specific compatible match entries can be removed, too, as there are a few points in time where DT backwards-compatibility was broken for other reasons: - Legacy DT clock support is no longer supported since commit 58256143cff7c2e0 ("clk: renesas: Remove R-Car Gen2 legacy DT clock support") in v5.5, and the addition of "renesas,rcar-gen2-msiof" to DTS in v4.11 predates the completion of the clock conversion in v4.15, - Legacy DT LVDS support is no longer supported since commit 841281fe52a769fe ("drm: rcar-du: Drop LVDS device tree backward compatibility") in v5.18, and the addition of "renesas,rcar-gen3-msiof" in commit 8b51f97138ca22b6 ("arm64: dts: r8a7796: Use R-Car Gen 3 fallback binding for msiof nodes") in v4.11 predates the LVDS conversion in commit 58e8ed2ee9abe718 ("arm64: dts: renesas: Convert to new LVDS DT bindings") in v4.20. For R-Car H3, the SoC-specific compatible match entry cannot be removed, as its purpose is to handle an SoC-specific quirk. Suggested-by: Kuninori Morimoto Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/d33393ac7536bc3f0f624b079f70d80dd19843db.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 0e1c7d0591ac4054c67529e200a9edfaf5344f4a Author: Geert Uytterhoeven Date: Fri May 16 15:32:04 2025 +0200 spi: sh-msiof: Drop comma after OF match table sentinel It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Add a comment to clarify the purpose of the empty element. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/2ab5745407339ba54b63c3e6410082c7c566bf95.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit e9be77134469df4a11da898bec2bfc137700a9f3 Author: Christophe JAILLET Date: Sun May 18 14:16:21 2025 +0200 regulator: qcom_spmi: Constify struct spmi_voltage_range 'struct spmi_voltage_range' are only modified at runtime to compile a field, n_voltages, that could be computed at compile time. So, simplify spmi_calculate_num_voltages() and compute n_voltages at compile time within the SPMI_VOLTAGE_RANGE macro. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 85437 26776 512 112725 1b855 drivers/regulator/qcom_spmi-regulator.o After: ===== text data bss dec hex filename 86857 24760 512 112129 1b601 drivers/regulator/qcom_spmi-regulator.o Signed-off-by: Christophe JAILLET Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/ef2a4b6df61e19470ddf6cbd1f3ca1ce88a3c1a0.1747570556.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit c451e2da54bce183fbb270ec01ab3ca725ddf943 Author: Sumanth Gavini Date: Sun May 18 01:57:32 2025 -0700 regulator: max8952: Correct Samsung "Electronics" spelling in copyright headers Fix the misspelling of 'Electronics' in max8952 driver copyright headers. Signed-off-by: Sumanth Gavini Link: https://patch.msgid.link/20250518085734.88890-7-sumanth.gavini@yahoo.com Signed-off-by: Mark Brown commit e4dca67b2463e6abe775876c9cb049ea5b1c8e0d Author: Shenghao Ding Date: Sun May 18 21:24:51 2025 +0800 ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib Drop the I2C in one comment, for these registers are also used in SPI driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to tas2781_fmwlib.c, because the macros are only referenced in only fwlib. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250518132451.707-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 152c773fb4d200985705218e0314fbd7875a3292 Author: Shuming Fan Date: Mon May 19 17:06:45 2025 +0800 ASoC: rt722: make regmap cache-only in probe This patch makes sure the access to the codecs is cached until the device is enumerated. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20250519090645.2620292-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 98dbe56a016a4ea457ef312637a625d3c627dbd9 Author: Marc Zyngier Date: Mon Jan 27 11:58:38 2025 +0000 KVM: arm64: Handle TSB CSYNC traps The architecture introduces a trap for TSB CSYNC that fits in the same EC as LS64 and PSB CSYNC. Let's deal with it in a similar way. It's not that we expect this to be useful any time soon anyway. Signed-off-by: Marc Zyngier commit af2d78dcadbc2386610566ab2052fee78993fb53 Author: Marc Zyngier Date: Fri Apr 25 14:00:01 2025 +0100 KVM: arm64: Add FGT descriptors for FEAT_FGT2 Bulk addition of all the FGT2 traps reported with EC == 0x18, as described in the 2025-03 JSON drop. Signed-off-by: Marc Zyngier commit f654e9e47eac95424b8ef4b285f331604460174b Author: Marc Zyngier Date: Fri Apr 25 13:53:18 2025 +0100 KVM: arm64: Allow sysreg ranges for FGT descriptors Just like we allow sysreg ranges for Coarse Grained Trap descriptors, allow them for Fine Grain Traps as well. This comes with a warning that not all ranges are suitable for this particular definition of ranges. Signed-off-by: Marc Zyngier commit 1ba41c816007107e0f774d6803e0cbbbb40a47e0 Author: Marc Zyngier Date: Tue Apr 22 21:20:18 2025 +0100 KVM: arm64: Add context-switch for FEAT_FGT2 registers Just like the rest of the FGT registers, perform a switch of the FGT2 equivalent. This avoids the host configuration leaking into the guest... Signed-off-by: Marc Zyngier commit fc631df00c4cef4a95b25ac87842b9d1ec9ceaa1 Author: Marc Zyngier Date: Fri Apr 25 17:42:49 2025 +0100 KVM: arm64: Add trap routing for FEAT_FGT2 registers Similarly to the FEAT_FGT registers, pick the correct FEAT_FGT2 register when a sysreg trap indicates they could be responsible for the exception. Signed-off-by: Marc Zyngier commit 4bc0fe089840695538aff879e25efab2cdad22bd Author: Marc Zyngier Date: Tue Apr 22 21:16:34 2025 +0100 KVM: arm64: Add sanitisation for FEAT_FGT2 registers Just like the FEAT_FGT registers, treat the FGT2 variant the same way. THis is a large update, but a fairly mechanical one. The config dependencies are extracted from the 2025-03 JSON drop. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit df56f1ccb0ec02570a0740703c63cac6bf0ec57c Author: Marc Zyngier Date: Tue Apr 22 19:21:46 2025 +0100 KVM: arm64: Add FEAT_FGT2 registers to the VNCR page The FEAT_FGT2 registers are part of the VNCR page. Describe the corresponding offsets and add them to the vcpu sysreg enumeration. Signed-off-by: Marc Zyngier commit b2a324ff01feac7ea1ffe5a521cffc2749e9f113 Author: Marc Zyngier Date: Tue Feb 4 10:46:41 2025 +0000 KVM: arm64: Use HCR_EL2 feature map to drive fixed-value bits Similarly to other registers, describe which HCR_EL2 bit depends on which feature, and use this to compute the RES0 status of these bits. An additional complexity stems from the status of some bits such as E2H and RW, which do not had a RESx status, but still take a fixed value due to implementation choices in KVM. Signed-off-by: Marc Zyngier commit beed4448418ee2e2f48a9d5d6c01fe79df200bc2 Author: Marc Zyngier Date: Sun Feb 9 14:51:23 2025 +0000 KVM: arm64: Use HCRX_EL2 feature map to drive fixed-value bits Similarly to other registers, describe which HCR_EL2 bit depends on which feature, and use this to compute the RES0 status of these bits. Signed-off-by: Marc Zyngier commit a764b56bf90b6d758ff21408c13cd686c2519ef9 Author: Marc Zyngier Date: Sun Feb 9 13:38:35 2025 +0000 KVM: arm64: Allow kvm_has_feat() to take variable arguments In order to be able to write more compact (and easier to read) code, let kvm_has_feat() and co take variable arguments. This enables constructs such as: #define FEAT_SME ID_AA64PFR1_EL1, SME, IMP if (kvm_has_feat(kvm, FEAT_SME)) [...] which is admitedly more readable. Signed-off-by: Marc Zyngier commit c6cbe6a4c1bdce88bb0384df0e3679e4ef81dcd6 Author: Marc Zyngier Date: Sun Feb 9 14:45:29 2025 +0000 KVM: arm64: Use FGT feature maps to drive RES0 bits Another benefit of mapping bits to features is that it becomes trivial to define which bits should be handled as RES0. Let's apply this principle to the guest's view of the FGT registers. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit e760eab4069cd8b93e82651086324480efa3ee03 Author: Charan Pedumuru Date: Wed May 7 06:29:36 2025 +0000 dt-binding: mmc: microchip,sdhci-pic32: convert text based binding to json schema Update text binding to YAML. Changes during conversion: Add appropriate include statements for interrupts and clock-names to resolve errors identified by `dt_binding_check` and `dtbs_check`. Signed-off-by: Charan Pedumuru Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507-mchp-sdhci-v1-2-ed29de05295a@gmail.com Signed-off-by: Ulf Hansson commit 03eadcbd981b4c9b10ec89a046deeccb115c98b3 Author: Zhang Enpei Date: Thu May 15 20:13:12 2025 +0800 OPP: switch to use kmemdup_array() Use kmemdup_array() to avoid multiplication and possible overflows. Signed-off-by: Zhang Enpei Signed-off-by: Viresh Kumar commit eeb0819318cc0c30161821d429ca022dfbedc6ac Author: Konstantin Komarov Date: Mon May 19 11:07:07 2025 +0200 fs/ntfs3: remove ability to change compression on mounted volume Remove all the code related to changing compression on the fly because it's not safe and not maintainable. Signed-off-by: Konstantin Komarov commit d01d7020560116876c6e39e056737b8f81f153e0 Author: Viresh Kumar Date: Thu Feb 20 16:45:47 2025 +0530 rust: clk: Add initial abstractions Add initial abstractions for the clk APIs. These provide the minimal functionality needed for common use cases, making them straightforward to introduce in the first iteration. These will be used by Rust based cpufreq / OPP layers to begin with. Tested-by: Daniel Almeida Reviewed-by: Daniel Almeida Signed-off-by: Viresh Kumar commit b7b7b981cb037d250ad06c3a6558d69e04ed77c7 Author: Viresh Kumar Date: Thu Feb 20 16:34:00 2025 +0530 rust: clk: Add helpers for Rust code Non-trivial C macros and inlined C functions cannot be used directly in the Rust code and are used via functions ("helpers") that wrap those so that they can be called from Rust. In order to prepare for adding Rust abstractions for the clock APIs, add clock helpers required by the Rust implementation. Reviewed-by: Daniel Almeida Signed-off-by: Viresh Kumar commit ab49f64078da82ae5c362900b65a872f8a9bd585 Author: Viresh Kumar Date: Tue Feb 25 10:05:41 2025 +0530 MAINTAINERS: Add entry for Rust cpumask API Update the MAINTAINERS file to include the Rust abstractions for cpumask API. Yury has indicated that he does not wish to maintain the Rust code but would like to be listed as a reviewer. Signed-off-by: Viresh Kumar Reviewed-by: Yury Norov commit 8961b8cb3099abd06486394aaf12dd535baaf070 Author: Viresh Kumar Date: Thu Jun 6 15:23:39 2024 +0530 rust: cpumask: Add initial abstractions Add initial Rust abstractions for struct cpumask, covering a subset of its APIs. Additional APIs can be added as needed. These abstractions will be used in upcoming Rust support for cpufreq and OPP frameworks. Signed-off-by: Viresh Kumar Reviewed-by: Yury Norov [NVIDIA] commit a7e735169db72c6c991a5f8397fb094a80ea3391 Author: Viresh Kumar Date: Fri Apr 11 13:53:37 2025 +0530 rust: cpumask: Add few more helpers Add few more cpumask helpers that are required by the Rust abstraction. Signed-off-by: Viresh Kumar Acked-by: Yury Norov [NVIDIA] commit f526a128c942b8e46ada8e92399424fb8e2a2589 Merge: f720efda2db5e6 eaff6b62d3439c Author: Viresh Kumar Date: Tue Apr 29 09:38:41 2025 +0530 Merge commit 'eaff6b62d343' of pm/linux-next into commit 'f720efda2db5' of driver-core/driver-core-next Merge cpufreq dependencies from the PM tree with driver-core dependencies. commit 29d1697c8c8f64e4d8bb988f957ca1d4980937dc Author: Marc Zyngier Date: Wed May 14 11:35:00 2025 +0100 KVM: arm64: Document NV caps and vcpu flags Describe the two new vcpu flags that control NV, together with the capabilities that advertise them. Reviewed-by: Oliver Upton Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20250514103501.2225951-18-maz@kernel.org Signed-off-by: Marc Zyngier commit a7484c80e5ca1ae0c397bb8003bc588f0dcf43f4 Author: Marc Zyngier Date: Wed May 14 11:34:59 2025 +0100 KVM: arm64: Allow userspace to request KVM_ARM_VCPU_EL2* Since we're (almost) feature complete, let's allow userspace to request KVM_ARM_VCPU_EL2* by bumping KVM_VCPU_MAX_FEATURES up. We also now advertise the features to userspace with new capabilities. It's going to be great... Reviewed-by: Oliver Upton Reviewed-by: Joey Gouly Reviewed-by: Ganapatrao Kulkarni Link: https://lore.kernel.org/r/20250514103501.2225951-17-maz@kernel.org Signed-off-by: Marc Zyngier commit 6ec4c371d4223adae6f9c0f7f1bd014d381b2170 Author: Marc Zyngier Date: Wed May 14 11:34:58 2025 +0100 KVM: arm64: nv: Remove dead code from ERET handling Cleanly, this code cannot trigger, since we filter this from the caller. Drop it. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-16-maz@kernel.org Signed-off-by: Marc Zyngier commit aa98df31f6b42d3379869b82588bebaec4ce474b Author: Marc Zyngier Date: Wed May 14 11:34:57 2025 +0100 KVM: arm64: nv: Plumb TLBI S1E2 into system instruction dispatch Now that we have to handle TLBI S1E2 in the core code, plumb the sysinsn dispatch code into it, so that these instructions don't just UNDEF anymore. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-15-maz@kernel.org Signed-off-by: Marc Zyngier commit 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929 Author: Marc Zyngier Date: Wed May 14 11:34:56 2025 +0100 KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2 A TLBI by VA for S1 must take effect on our pseudo-TLB for VNCR and potentially knock the fixmap mapping. Even worse, that TLBI must be able to work cross-vcpu. For that, we track on a per-VM basis if any VNCR is mapped, using an atomic counter. Whenever a TLBI S1E2 occurs and that this counter is non-zero, we take the long road all the way back to the core code. There, we iterate over all vcpus and check whether this particular invalidation has any damaging effect. If it does, we nuke the pseudo TLB and the corresponding fixmap. Yes, this is costly. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-14-maz@kernel.org Signed-off-by: Marc Zyngier commit 73e1b621b25d7d45cebf9940cad3b377d3b94791 Author: Marc Zyngier Date: Wed May 14 11:34:55 2025 +0100 KVM: arm64: nv: Program host's VNCR_EL2 to the fixmap address Since we now have a way to map the guest's VNCR_EL2 on the host, we can point the host's VNCR_EL2 to it and go full circle! Note that we unconditionally assign the fixmap to VNCR_EL2, irrespective of the guest's version being mapped or not. We want to take a fault on first access, so the fixmap either contains something guranteed to be either invalid or a guest mapping. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-13-maz@kernel.org Signed-off-by: Marc Zyngier commit 7270cc9157f474dfc46750a34c9d7defc686b2eb Author: Marc Zyngier Date: Wed May 14 11:34:54 2025 +0100 KVM: arm64: nv: Handle VNCR_EL2 invalidation from MMU notifiers During an invalidation triggered by an MMU notifier, we need to make sure we can drop the *host* mapping that would have been translated by the stage-2 mapping being invalidated. For the moment, the invalidation is pretty brutal, as we nuke the full IPA range, and therefore any VNCR_EL2 mapping. At some point, we'll be more light-weight, and the code is able to deal with something more targetted. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-12-maz@kernel.org Signed-off-by: Marc Zyngier commit 2a359e072596fcb2e9e85017a865e3618a2fe5b5 Author: Marc Zyngier Date: Wed May 14 11:34:53 2025 +0100 KVM: arm64: nv: Handle mapping of VNCR_EL2 at EL2 Now that we can handle faults triggered through VNCR_EL2, we need to map the corresponding page at EL2. But where, you'll ask? Since each CPU in the system can run a vcpu, we need a per-CPU mapping. For that, we carve a NR_CPUS range in the fixmap, giving us a per-CPU va at which to map the guest's VNCR's page. The mapping occurs both on vcpu load and on the back of a fault, both generating a request that will take care of the mapping. That mapping will also get dropped on vcpu put. Yes, this is a bit heavy handed, but it is simple. Eventually, we may want to have a per-VM, per-CPU mapping, which would avoid all the TLBI overhead. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-11-maz@kernel.org Signed-off-by: Marc Zyngier commit 069a05e53549685d2b5e54ceb51db1fd04aa50d7 Author: Marc Zyngier Date: Wed May 14 11:34:52 2025 +0100 KVM: arm64: nv: Handle VNCR_EL2-triggered faults As VNCR_EL2.BADDR contains a VA, it is bound to trigger faults. These faults can have multiple source: - We haven't mapped anything on the host: we need to compute the resulting translation, populate a TLB, and eventually map the corresponding page - The permissions are out of whack: we need to tell the guest about this state of affairs Note that the kernel doesn't support S1POE for itself yet, so the particular case of a VNCR page mapped with no permissions or with write-only permissions is not correctly handled yet. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-10-maz@kernel.org Signed-off-by: Marc Zyngier commit 6fb75733f148ecd6c1898df0098b37f70a80f002 Author: Marc Zyngier Date: Wed May 14 11:34:51 2025 +0100 KVM: arm64: nv: Add userspace and guest handling of VNCR_EL2 Plug VNCR_EL2 in the vcpu_sysreg enum, define its RES0/RES1 bits, and make it accessible to userspace when the VM is configured to support FEAT_NV2. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-9-maz@kernel.org Signed-off-by: Marc Zyngier commit ea8d3cf46d57bc1e131ca66ebc3e9aabe40234ef Author: Marc Zyngier Date: Wed May 14 11:34:50 2025 +0100 KVM: arm64: nv: Add pseudo-TLB backing VNCR_EL2 FEAT_NV2 introduces an interesting problem for NV, as VNCR_EL2.BADDR is a virtual address in the EL2&0 (or EL2, but we thankfully ignore this) translation regime. As we need to replicate such mapping in the real EL2, it means that we need to remember that there is such a translation, and that any TLBI affecting EL2 can possibly affect this translation. It also means that any invalidation driven by an MMU notifier must be able to shoot down any such mapping. All in all, we need a data structure that represents this mapping, and that is extremely close to a TLB. Given that we can only use one of those per vcpu at any given time, we only allocate one. No effort is made to keep that structure small. If we need to start caching multiple of them, we may want to revisit that design point. But for now, it is kept simple so that we can reason about it. Oh, and add a braindump of how things are supposed to work, because I will definitely page this out at some point. Yes, pun intended. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-8-maz@kernel.org Signed-off-by: Marc Zyngier commit bd914a981446df475be27ef9c5e86961e6f39c5a Author: Marc Zyngier Date: Wed May 14 11:34:49 2025 +0100 KVM: arm64: nv: Don't adjust PSTATE.M when L2 is nesting We currently check for HCR_EL2.NV being set to decide whether we need to repaint PSTATE.M to say EL2 instead of EL1 on exit. However, this isn't correct when L2 is itself a hypervisor, and that L1 as set its own HCR_EL2.NV. That's because we "flatten" the state and inherit parts of the guest's own setup. In that case, we shouldn't adjust PSTATE.M, as this is really EL1 for both us and the guest. Instead of trying to try and work out how we ended-up with HCR_EL2.NV being set by introspecting both the host and guest states, use a per-CPU flag to remember the context (HYP or not), and use that information to decide whether PSTATE needs tweaking. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-7-maz@kernel.org Signed-off-by: Marc Zyngier commit 85bba00425ae0b4b30938ebfdde6d986e5423aff Author: Marc Zyngier Date: Wed May 14 11:34:48 2025 +0100 KVM: arm64: nv: Move TLBI range decoding to a helper As we are about to expand out TLB invalidation capabilities to support recursive virtualisation, move the decoding of a TLBI by range into a helper that returns the base, the range and the ASID. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-6-maz@kernel.org Signed-off-by: Marc Zyngier commit a0ec2b822caba9ccdefa397918071e591b19e144 Author: Marc Zyngier Date: Wed May 14 11:34:47 2025 +0100 KVM: arm64: nv: Snapshot S1 ASID tagging information during walk We currently completely ignore any sort of ASID tagging during a S1 walk, as AT doesn't care about it. However, such information is required if we are going to create anything that looks like a TLB from this walk. Let's capture it both the nG and ASID information while walking the page tables. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-5-maz@kernel.org Signed-off-by: Marc Zyngier commit 34fa9dece52757727ed2ffd5cf4713c6cd0b707f Author: Marc Zyngier Date: Wed May 14 11:34:46 2025 +0100 KVM: arm64: nv: Extract translation helper from the AT code The address translation infrastructure is currently pretty tied to the AT emulation. However, we also need to features that require the use of VAs, such as VNCR_EL2 (and maybe one of these days SPE), meaning that we need a slightly more generic infrastructure. Start this by introducing a new helper (__kvm_translate_va()) that performs a S1 walk for a given translation regime, EL and PAN settings. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-4-maz@kernel.org Signed-off-by: Marc Zyngier commit 469c4713d48028186e4bbf4b74ebce273af9a394 Author: Marc Zyngier Date: Wed May 14 11:34:45 2025 +0100 KVM: arm64: nv: Allocate VNCR page when required If running a NV guest on an ARMv8.4-NV capable system, let's allocate an additional page that will be used by the hypervisor to fulfill system register accesses. Reviewed-by: Ganapatrao Kulkarni Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-3-maz@kernel.org Signed-off-by: Marc Zyngier commit fb3066904a4e2562cbcf71b26b0f0dc7a262280c Author: Marc Zyngier Date: Wed May 14 11:34:44 2025 +0100 arm64: sysreg: Add layout for VNCR_EL2 Now that we're about to emulate VNCR_EL2, we need its full layout. Add it to the sysreg file. Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250514103501.2225951-2-maz@kernel.org Signed-off-by: Marc Zyngier commit 72942d65385641fb91b467f2ea210b4ca6bda58e Author: Mario Limonciello Date: Sat May 17 15:26:30 2025 -0500 crypto: ccp - Add missing tee info reg for teev2 The tee info reg for teev2 is the same as teev1. Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 52e8ae868a824045f204a848b445e4747acad2a7 Author: Mario Limonciello Date: Sat May 17 15:26:29 2025 -0500 crypto: ccp - Add missing bootloader info reg for pspv5 The bootloader info reg for pspv5 is the same as pspv4. Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit c822831b426307a6ca426621504d3c7f99765a39 Author: Ovidiu Panait Date: Fri May 16 15:06:56 2025 +0300 crypto: sun8i-ce - move fallback ahash_request to the end of the struct 'struct ahash_request' has a flexible array at the end, so it must be the last member in a struct, to avoid overwriting other struct members. Therefore, move 'fallback_req' to the end of the 'sun8i_ce_hash_reqctx' struct. Fixes: 56f6d5aee88d ("crypto: sun8i-ce - support hash algorithms") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit d15cbe7137caae0de4fcd368e6f4d89b42b6538b Author: Bharat Bhushan Date: Fri May 16 14:14:41 2025 +0530 crypto: octeontx2 - Use dynamic allocated memory region for lmtst Current driver uses static LMTST region allocated by firmware. Firmware allocated memory for LMTST is available in PF/VF BAR2. Using this memory have performance impact as this is mapped as device memory. There is another option to allocate contiguous memory at run time and map this in LMT MAP table with the help of AF driver. With this patch dynamic allocated memory is used for LMTST. Also add myself as maintainer for crypto octeontx2 driver Signed-off-by: Bharat Bhushan Signed-off-by: Herbert Xu commit 57b1e1c0901c9a035cd19b3b08bc8b87edbf69c1 Author: Bharat Bhushan Date: Fri May 16 14:14:40 2025 +0530 crypto: octeontx2 - Initialize cptlfs device info once Function otx2_cptlf_set_dev_info() initializes common fields of cptlfs data-struct. This function is called every time a cptlf is initialized but this needs be done once for a cptlf block. So this initialization is moved to early device probe code to avoid redundant initialization. Signed-off-by: Bharat Bhushan Signed-off-by: Herbert Xu commit 270b6f13454cb7f2f7058c50df64df409c5dcf55 Author: Herbert Xu Date: Thu May 15 16:34:04 2025 +0800 crypto: xts - Only add ecb if it is not already there Only add ecb to the cipher name if it isn't already ecb. Also use memcmp instead of strncmp since these strings are all stored in an array of length CRYPTO_MAX_ALG_NAME. Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Signed-off-by: Herbert Xu commit 3d73909bddc2ebb3224a8bc2e5ce00e9df70c15d Author: Herbert Xu Date: Thu May 15 16:28:08 2025 +0800 crypto: lrw - Only add ecb if it is not already there Only add ecb to the cipher name if it isn't already ecb. Also use memcmp instead of strncmp since these strings are all stored in an array of length CRYPTO_MAX_ALG_NAME. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202505151503.d8a6cf10-lkp@intel.com Signed-off-by: Herbert Xu commit 18c438b228558e05ede7dccf947a6547516fc0c7 Author: Herbert Xu Date: Thu May 15 13:54:56 2025 +0800 crypto: testmgr - Add hash export format testing Ensure that the hash state can be exported to and imported from the generic algorithm. Signed-off-by: Herbert Xu commit c2a813545ed4810540dcc8ebdcb21092fda80be5 Author: Herbert Xu Date: Thu May 15 13:54:54 2025 +0800 crypto: testmgr - Use ahash for generic tfm As shash is being phased out, use ahash for the generic tfm. Signed-off-by: Herbert Xu commit c3103416d5217655d707d9417aaf66f184e3d72f Author: Herbert Xu Date: Thu May 15 13:54:51 2025 +0800 crypto: hmac - Add ahash support Add ahash support to hmac so that drivers that can't do hmac in hardware do not have to implement duplicate copies of hmac. Signed-off-by: Herbert Xu commit 8e69871836669177d2d2a5acec5c8dca3319d2f1 Author: Herbert Xu Date: Thu May 15 13:54:49 2025 +0800 crypto: testmgr - Ignore EEXIST on shash allocation Soon hmac will support ahash. For compatibility hmac still supports shash so it is possible for two hmac algorithms to be registered at the same time. The shash algorithm will have the driver name "hmac-shash(XXX-driver)". Due to a quirk in the API, there is no way to locate the shash algorithm using the name "hmac(XXX-driver)". It has to be addressed as either "hmac(XXX)" or "hmac-shash(XXX-driver)". Looking it up with "hmac(XXX-driver)" will simply trigger the creation of another instance, and on the second instantiation this will fail with EEXIST. Catch the error EEXIST along with ENOENT since it is expected. If a real shash algorithm came this way, it would be addressed using the proper name "hmac-shash(XXX-driver)". Signed-off-by: Herbert Xu commit 91b6ff579dda7660a9d11778f9dc4dd0a879de22 Author: Herbert Xu Date: Thu May 15 13:54:47 2025 +0800 crypto: algapi - Add driver template support to crypto_inst_setname Add support to crypto_inst_setname for having a driver template name that differs from the algorithm template name. Signed-off-by: Herbert Xu commit 32a9fd8f498bffd99c5d5441015136206e351ae4 Author: Herbert Xu Date: Thu May 15 13:54:44 2025 +0800 crypto: shash - Set reqsize in shash_alg Make reqsize static for shash algorithms. Signed-off-by: Herbert Xu commit 8cf4c341f1931c20c564ab2ee0f9eb990a606cac Author: Herbert Xu Date: Thu May 15 13:54:42 2025 +0800 crypto: hmac - Add export_core and import_core Add export_import and import_core so that hmac can be used as a fallback by block-only drivers. Signed-off-by: Herbert Xu commit a05a8bc5705165fe3ce9ea79048a5ff807e4651f Author: Herbert Xu Date: Thu May 15 13:54:40 2025 +0800 crypto: hmac - Zero shash desc in setkey The shash desc needs to be zeroed after use in setkey as it is not finalised (finalisation automatically zeroes it). Also remove the final function as it's been superseded by finup. Signed-off-by: Herbert Xu commit 9d7a0ab1c75365158b28a5f7fa516061ea40b1b8 Author: Herbert Xu Date: Thu May 15 13:54:37 2025 +0800 crypto: ahash - Handle partial blocks in API Provide an option to handle the partial blocks in the ahash API. Almost every hash algorithm has a block size and are only able to hash partial blocks on finalisation. As a first step disable virtual address support for algorithms with state sizes larger than HASH_MAX_STATESIZE. This is OK as virtual addresses are currently only used on synchronous fallbacks. This means ahash_do_req_chain only needs to handle synchronous fallbacks, removing the complexities of saving the request state. Also move the saved request state into the ahash_request object as nesting is no longer possible. Add a scatterlist to ahash_request to store the partial block. Signed-off-by: Herbert Xu commit c6a12f394c488cf6a7ca35c1ad51e0e88897de2e Author: Herbert Xu Date: Thu May 15 13:54:35 2025 +0800 crypto: hash - Add export_core and import_core hooks Add export_core and import_core hooks. These are intended to be used by algorithms which are wrappers around block-only algorithms, but are not themselves block-only, e.g., hmac. Signed-off-by: Herbert Xu commit cd5a4d53069ccd7cd48d201c981d5a8a99c93fc4 Author: Herbert Xu Date: Thu May 15 13:54:33 2025 +0800 crypto: hash - Move core export and import into internel/hash.h The core export and import functions are targeted at implementors so move them into internal/hash.h. Signed-off-by: Herbert Xu commit 7d39f32c8c77ad14bfdb49f41d87c97024d0eb63 Author: Rob Herring (Arm) Date: Tue May 13 13:41:23 2025 -0500 dt-bindings: crypto: Convert Marvell CESA to DT schema Convert the Marvell CESA binding to DT schema format. The marvell-cesa.txt and mv_cesa.txt are duplicate bindings. The clock properties are quite varied for each platform hence the if/then schemas. The old binding was fairly accurate with reality. The original binding didn't mention there is 1 interrupt per CESA engine. Based on users, there's a maximum of 2 engines. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 7eff621c460249fbbd1775faa7d4245af1b23d8d Author: Rob Herring (Arm) Date: Tue May 13 13:41:16 2025 -0500 dt-bindings: crypto: Convert img,hash-accelerator to DT schema Convert the Imagination Technologies hardware hash accelerator binding to DT schema format. It's a straight forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 036454de0fec8d9789f3730f701e8df6049b5635 Author: Rob Herring (Arm) Date: Tue May 13 13:41:10 2025 -0500 dt-bindings: crypto: Convert hisilicon,hip0{6,7}-sec to DT schema Convert the HiSilicon HIP06/7 Security Accelerator binding to DT schema format. It's a straight forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit b525ac4be3e98abe8b77311469dccaf9d15877ff Author: Rob Herring (Arm) Date: Tue May 13 13:41:02 2025 -0500 dt-bindings: crypto: Convert brcm,spum-crypto to DT schema Convert the Broadcom SPUM/SPU2 binding to DT schema format. It's a straight forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit bbd8265d457e5f4d439803acfd3d46a157a5c70b Author: Rob Herring (Arm) Date: Tue May 13 13:40:56 2025 -0500 dt-bindings: crypto: Convert axis,artpec6-crypto to DT schema Convert the Axis Crypto engine binding to DT schema format. It's a straight forward conversion. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit aa238d34d3a98253f019e8c2e1cef0309b487fef Author: Rob Herring (Arm) Date: Tue May 13 13:40:50 2025 -0500 dt-bindings: crypto: Convert amd,ccp-seattle-v1a to DT schema Convert the AMD Cryptographic Coprocessor binding to DT schema format. It's a straight forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 7996ace661a7f910fe7c7cc5b4b1cd6d72686b83 Author: Rob Herring (Arm) Date: Tue May 13 13:40:41 2025 -0500 dt-bindings: crypto: Drop obsolete mediatek,eip97-crypto The mediatek,eip97-crypto binding is half abandoned. The driver was dropped in 2020 as the Mediatek platforms use InsideSecure block and the driver for it. All the platforms except MT7623 were updated. A patch to update it was submitted, but never addressed the review comments. Link: https://lore.kernel.org/all/20210303080923.16761-1-vic.wu@mediatek.com/ Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 768613340842dc458c72a8ff5c6d2c8f11d42a2c Author: Rob Herring (Arm) Date: Tue May 13 13:40:28 2025 -0500 dt-bindings: crypto: fsl,sec-v4.0: Add fsl,sec-v6.0 The fsl,sec-v6.0 binding is the same as the fsl,sec-v4.0 binding, so add it to the existing schema and drop the old .txt binding. The compatibles in the .txt binding don't match the 1 user. Follow the user for the schema. Signed-off-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 662c62bb83a9780c25e2d1d8bae6c2cc9a7c6663 Author: Suman Kumar Chakraborty Date: Tue May 13 11:25:27 2025 +0100 crypto: qat - enable reporting of error counters for GEN6 devices Enable the reporting of error counters through sysfs for QAT GEN6 devices and update the ABI documentation. This enables the reporting of the following: - errors_correctable - hardware correctable errors that allow the system to recover without data loss. - errors_nonfatal: errors that can be isolated to specific in-flight requests. - errors_fatal: errors that cannot be contained to a request, requiring a Function Level Reset (FLR) upon occurrence. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 7f3401d0a506dac688948a62ef8ef7b18cc791e1 Author: Suman Kumar Chakraborty Date: Tue May 13 11:25:26 2025 +0100 crypto: qat - enable RAS support for GEN6 devices Enable the reporting and handling of errors for QAT GEN6 devices. Errors are categorized as correctable, non-fatal, or fatal. Error handling involves reading the error source registers (ERRSOU0 to ERRSOU3) to determine the source of the error and then decoding the actual source reading specific registers. The action taken depends on the error type: - Correctable and Non-Fatal errors. These error are logged, cleared and the corresponding counter is incremented. - Fatal errors. These errors are logged, cleared and a Function Level Reset (FLR) is scheduled. This reports and handles the following errors: - Accelerator engine (AE) correctable errors - Accelerator engine (AE) uncorrectable errors - Chassis push-pull (CPP) errors - Host interface (HI) parity errors - Internal memory parity errors - Receive interface (RI) errors - Transmit interface (TI) errors - Interface for system-on-chip (SoC) fabric (IOSF) primary command parity errors - Shared RAM and slice module (SSM) errors Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 63935e2ee1f2a371e511f853737b9efebc238bc7 Author: John Allen Date: Mon May 12 18:17:05 2025 +0000 crypto: ccp - Add support for PCI device 0x17D8 Add a new CCP/PSP PCI device ID. Signed-off-by: John Allen Signed-off-by: Herbert Xu commit 7c1a9408ce5f34ded5a85db81cf80e0975901685 Merge: 72dc7c0585cbdb fc5c669c902c30 Author: Dave Airlie Date: Mon May 19 11:05:57 2025 +1000 Merge tag 'drm-msm-next-2025-05-16' of https://gitlab.freedesktop.org/drm/msm into drm-next Updates for v6.16 CI: - uprev mesa GPU: - ACD (Adaptive Clock Distribution) support for X1-85. This is required enable the higher frequencies. - Drop fictional `address_space_size`. For some older devices, the address space size is limited to 4GB to avoid potential 64b rollover math problems in the fw. For these, an `ADRENO_QUIRK_4GB_VA` quirk is added. For everyone else we get the address space size from the SMMU `ias` (input address sizes), which is usually 48b. - Improve robustness when GMU HFI responses time out - Fix crash when throttling GPU immediately during boot - Fix for rgb565_predicator on Adreno 7c3 - Remove `MODULE_FIRMWARE()`s for GPU, the GPU can load the firmware after probe and having partial set of fw (ie. sqe+gmu but not zap) causes problems MDSS: - Added SAR2130P support to MDSS driver DPU: - Changed to use single CTL path for flushing on DPU 5.x+ - Improved SSPP allocation code to allow sharing of SSPP between planes - Enabled SmartDMA on SM8150, SC8180X, SC8280XP, SM8550 - Added SAR2130P support - Disabled DSC support on MSM8937, MSM8917, MSM8953, SDM660 - Misc fixes DP: - Switch to use new helpers for DP Audio / HDMI codec handling - Fixed LTTPR handling DSI: - Added support for SA8775P - Added SAR2130P support MDP4: - Fixed LCDC / LVDS controller on HDMI: - Switched to use new helpers for ACR data - Fixed old standing issue of HPD not working in some cases Signed-off-by: Dave Airlie From: Rob Clark Link: https://lore.kernel.org/r/CAF6AEGv2Go+nseaEwRgeZbecet-h+Pf2oBKw1CobCF01xu2XVg@mail.gmail.com commit 72dc7c0585cbdb5509bf22eb9d3575ff0f5f7a2a Merge: 5dca4335ba3316 2f0268ca1cac45 Author: Dave Airlie Date: Mon May 19 09:00:37 2025 +1000 Merge tag 'amd-drm-next-6.16-2025-05-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amdgpu: - Misc code cleanups - UserQ fixes - MALL reporting fix - DP AUX fixes - DCN 3.5 fixes - DP MST fixes - DC DMI quirks cleanup - RAS fixes - SR-IOV updates - GC 9.5 updates - Misc display fixes - VCN 4.0.5 powergating race fix - SMU 13.x updates - Paritioning fixes - VCN 5.0.1 SR-IOV updates - JPEG 5.0.1 SR-IOV updates amdkfd: - Fix spurious warning in interrupt code - XNACK fixes radeon: - CIK doorbell cleanup Signed-off-by: Dave Airlie From: Alex Deucher Link: https://lore.kernel.org/r/20250516204609.2437472-1-alexander.deucher@amd.com commit eb43efd062d10bacdf6b50df0e300a7049474e51 Author: Thorsten Blum Date: Tue Apr 15 09:24:33 2025 +0200 m68k: Replace memcpy() + manual NUL-termination with strscpy() Use strscpy() to safely copy the command-line string instead of memcpy() followed by a manual NUL-termination. The source string is also NUL-terminated and meets the __must_be_cstr() requirement of strscpy(). No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Greg Ungerer commit 245bb7b95aff5f20884c0b635eacb96645eadc84 Author: Mohammad Mahdi Anbaraki Date: Thu Apr 3 21:41:59 2025 +0330 m68k/kernel: replace strncpy() with strscpy() Swapped out strncpy() for strscpy() in parse_uboot_commandline() while copying to commandp. strscpy() makes sure the string is properly null- terminated and gives a more useful return value so it's just a safer choice overall. Link: https://github.com/KSPP/linux/issues/90 Signed-off-by: Mohammad Mahdi Anbaraki Signed-off-by: Greg Ungerer commit 0c4aba403f4f294c15e2bbc8e1164aa68bc233bd Author: Bartosz Golaszewski Date: Mon Apr 7 09:20:15 2025 +0200 m68k: coldfire: gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Greg Ungerer commit 108a76779829a5e8001b1051080aaa93e7fc02ea Author: Inochi Amaoto Date: Sun May 4 18:45:52 2025 +0800 riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX replace newly added precise compatible with old one for existed clock device of CV18XX series SoCs. Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250504104553.1447819-4-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit ae5bac370ed40ce09d4d0f35e7149f4dc6ec893f Author: Inochi Amaoto Date: Mon Apr 14 06:35:04 2025 +0800 riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10 Sophgo SG2044 SRD3-10 board bases on Sophgo SG2044 SoC. This board includes 5 uart ports, 5 pcie x8 slots, 1 1G Ethernet port, 1 microSD slot. Add initial device tree of this board with uart support. Link: https://lore.kernel.org/r/20250413223507.46480-11-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 22db96e4abc925596750f10b8b4b9a9fba403970 Author: Inochi Amaoto Date: Mon Apr 14 06:35:03 2025 +0800 dt-bindings: riscv: sophgo: Add SG2044 compatible string Add compatible string for the Sophgo SG2044 SoC and the SRD3-10 board. Acked-by: Rob Herring (Arm) Reviewed-by: Chen Wang Link: https://lore.kernel.org/r/20250413223507.46480-10-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit beb207286061427197e413815ee3228a950d1d5c Author: Inochi Amaoto Date: Mon Apr 14 06:34:58 2025 +0800 dt-bindings: interrupt-controller: Add Sophgo SG2044 PLIC The SG2044 implement a standard T-HEAD C900 PLIC, which is already supported by the kernel. Add compatible string for Sophgo SG2044 plic. Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250413223507.46480-5-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit bced6beb166547af11a9c641f1a0a338db0f74cc Author: Inochi Amaoto Date: Mon Apr 14 06:34:57 2025 +0800 dt-bindings: interrupt-controller: Add Sophgo SG2044 CLINT mswi As SG2044 also implements an enhanced ACLINT as SG2042, add necessary compatible string for SG2044 SoC. Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250413223507.46480-4-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit e595fa85dbd2618c4ed51a5e3186111356fa499d Author: Inochi Amaoto Date: Wed Apr 30 09:26:53 2025 +0800 riscv: dts: sopgho: use SOC_PERIPHERAL_IRQ to calculate interrupt number Since riscv and arm architecture use different interrupt definitions, use a macro SOC_PERIPHERAL_IRQ mask this difference. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250430012654.235830-5-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit a0cd6d17f8c8c3b47e8930e47de81e5af3c30f5c Author: Inochi Amaoto Date: Wed Apr 30 09:26:52 2025 +0800 riscv: dts: sophgo: rename header file cv18xx.dtsi to cv180x.dtsi As the cv18xx.dtsi serves as a common peripheral header for all riscv cv180x/cv181x/sg200x SoCs, it not cover the entire cv18xx series as there is cv182x and cv183x. So rename the header file to make it precise. Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250430012654.235830-4-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 0212bd4fadbd30b2eb9982deab5e74f2fdff9bff Author: Inochi Amaoto Date: Wed Apr 30 09:26:51 2025 +0800 riscv: dts: sophgo: Move riscv cpu definition to a separate file As sg2000 and sg2002 can boot from an arm a53 core, it is not suitable to left the riscv cpu definition in the common peripheral header. Move the riscv related device into a separate header file, so the arm subsystem can reuse the common peripheral header. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250430012654.235830-3-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 33da812c45485eab5d001f5986d00e9a70bdfa77 Author: Inochi Amaoto Date: Wed Apr 30 09:26:50 2025 +0800 riscv: dts: sophgo: Move all soc specific device into soc dtsi file Although the cv1800b/cv1812h/sg2000/sg2002 share most peripherals, some basic peripherals, like clock, pinctrl, clint and plint, are not shared. These are caused by not only historical reason (plic, clint), but also the fact the device is not the same (clock, pinctrl). It is good to override device compatible when the SoC number is small, but now it is a burden for maintenance, and it is kind of annoyed to explain why using override. So it is time to move this out of the common peripheral header. Move all soc related peripheral device from common peripheral header to the soc specific header to get rid of most compatible override. Reviewed-by: Yixun Lan Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250430012654.235830-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 73ab31a8f3fbd4dfb45e5ca3aea97f71f90774cb Author: Zixian Zeng Date: Fri Apr 25 10:28:14 2025 +0800 riscv: sophgo: dts: Add spi controller for SG2042 Add spi controllers for SG2042. SG2042 uses the upstreamed Synopsys DW SPI IP. Signed-off-by: Zixian Zeng Link: https://lore.kernel.org/r/20250425-sfg-spi-v6-3-2dbe7bb46013@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 1cb666ec5a216c12d5aa1fb5225802b6090c4c57 Author: Inochi Amaoto Date: Tue Feb 11 13:17:56 2025 +0800 riscv: dts: sophgo: sg2042: add pinctrl support Add pinctrl node and related pin configuration for SG2042 SoC. Link: https://lore.kernel.org/r/20250211051801.470800-9-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit ac9dcca23615b2131d6510d237b70269fdef2ad4 Author: Dongli Zhang Date: Wed Apr 2 23:29:53 2025 -0700 vhost-scsi: log event queue write descriptors Log write descriptors for the event queue, leveraging vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. There is only one path for event queue. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang Reviewed-by: Mike Christie Message-Id: <20250403063028.16045-9-dongli.zhang@oracle.com> Signed-off-by: Michael S. Tsirkin commit a94c96a352b56bf7aa519ed3084d3d5ac5e76910 Author: Dongli Zhang Date: Wed Apr 2 23:29:52 2025 -0700 vhost-scsi: log control queue write descriptors Log write descriptors for the control queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. For Task Management Requests, similar to the I/O queue, store the log buffer during the submission path and log it in the completion or error handling path. For Asynchronous Notifications, only the submission path is involved. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang Message-Id: <20250403063028.16045-8-dongli.zhang@oracle.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Mike Christie commit c2c5c259aad628b3e0b4def7d9c02faad92eda11 Author: Dongli Zhang Date: Wed Apr 2 23:29:51 2025 -0700 vhost-scsi: log I/O queue write descriptors Log write descriptors for the I/O queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. In addition, introduce a vhost-scsi specific function to log vring descriptors. In this function, the 'partial' argument is set to false, and the 'len' argument is set to 0, because vhost-scsi always logs all pages shared by a vring descriptor. Add WARN_ON_ONCE() since vhost-scsi doesn't support VIRTIO_F_ACCESS_PLATFORM. The per-cmd log buffer is allocated on demand in the submission path after VHOST_F_LOG_ALL is set. Return -ENOMEM on allocation failure, in order to send SAM_STAT_TASK_SET_FULL to the guest. It isn't reclaimed in the completion path. Instead, it is reclaimed when VHOST_F_LOG_ALL is removed, or during VHOST_SCSI_SET_ENDPOINT when all commands are destroyed. Store the log buffer during the submission path and log it in the completion path. Logging is also required in the error handling path of the submission process. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang Message-Id: <20250403063028.16045-7-dongli.zhang@oracle.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Mike Christie commit e5e6b15b0dadfce456dbd04d2ab564be4d939f6f Author: Dongli Zhang Date: Wed Apr 2 23:29:50 2025 -0700 vhost-scsi: adjust vhost_scsi_get_desc() to log vring descriptors Adjust vhost_scsi_get_desc() to facilitate logging of vring descriptors. Add new arguments to allow passing the log buffer and length to vhost_get_vq_desc(). In addition, reset 'log_num' since vhost_get_vq_desc() may reset it only after certain condition checks. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang Reviewed-by: Mike Christie Message-Id: <20250403063028.16045-6-dongli.zhang@oracle.com> Signed-off-by: Michael S. Tsirkin commit 41cff026cff53a661ab5483aa20e549943dee115 Author: Dongli Zhang Date: Wed Apr 2 23:29:49 2025 -0700 vhost: modify vhost_log_write() for broader users Currently, the only user of vhost_log_write() is vhost-net. The 'len' argument prevents logging of pages that are not tainted by the RX path. Adjustments are needed since more drivers (i.e. vhost-scsi) begin using vhost_log_write(). So far vhost-net RX path may only partially use pages shared via the last vring descriptor. Unlike vhost-net, vhost-scsi always logs all pages shared via vring descriptors. To accommodate this, use (len == U64_MAX) to indicate whether the driver would log all pages of vring descriptors, or only pages that are tainted by the driver. In addition, removes BUG(). Suggested-by: Joao Martins Signed-off-by: Dongli Zhang Message-Id: <20250403063028.16045-5-dongli.zhang@oracle.com> Signed-off-by: Michael S. Tsirkin commit 5dca4335ba3316b5433b85f2325311ae144cf68a Merge: 7cf346fcf99815 6cc6e08d454247 Author: Dave Airlie Date: Mon May 19 07:18:42 2025 +1000 Merge tag 'topic/drm-next-nouveau-r570-2025-05-19-1' of https://gitlab.freedesktop.org/drm/kernel into drm-next drm/nouveau: r570 and hopper/blackwell support This series implements support for booting GSP-RM firmware version 570.144, and adds support for GH100, GB10x, and GB20x GPUs. Signed-off-by: Dave Airlie commit 6cc6e08d4542473d79ea83d9123d9d35e9c01c92 Author: Ben Skeggs Date: Tue Feb 4 08:55:17 2025 +1000 drm/nouveau/kms: add support for GB20x Adds basic support for the new display classes available on GB20x GPUs. Most of the changes here deal with HW method moves, with the only other change of note being tweaks to skip allocation of CTXDMA objects, which aren't required on Blackwell display. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit f0ddbb1eed1898286d2bd99fd6ab64ca9700d267 Author: Dave Airlie Date: Tue Mar 4 01:56:03 2025 +1000 drm/dp: add option to disable zero sized address only transactions. Some older NVIDIA and some newer NVIDIA hardware/firmware seems to have issues with address only transactions (firmware rejects them). Add an option to the core drm dp to avoid address only transactions, This just puts the MOT flag removal on the last message of the transfer and avoids the start of transfer transaction. This with the flag set in nouveau, allows eDP probing on GB203 device. Signed-off-by: Dave Airlie Reviewed-by: Ben Skeggs Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 284ad706ad2f50974d66dd1a22e985a5a4d329de Author: Ben Skeggs Date: Tue Feb 4 08:54:57 2025 +1000 drm/nouveau: add support for GB20x This commit adds support for the GB20x GPUs found on GeForce RTX 50xx series boards. Beyond a few miscellaneous register moves and HW class ID plumbing, this reuses most of the code added to support GH100/GB10x. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 56c36f590a551eaf49bfffbba8702cffeaaa8280 Author: Ben Skeggs Date: Wed Feb 26 07:49:00 2025 +1000 drm/nouveau/gsp: add hal for fifo.chan.doorbell_handle The doorbell register on GB20x GPUs has additional fields. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 32cb1cc358ffed248f7762ba4c1d0625a2bfddaa Author: Ben Skeggs Date: Mon Nov 25 10:27:02 2024 +1000 drm/nouveau: add support for GB10x This commit enables basic support for the GB100/GB102 Blackwell GPUs. Beyond HW class ID plumbing there's very little change here vs GH100. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 862450a85b85a3e88e9065c9d2421f3ef17d054c Author: Ben Skeggs Date: Wed Jun 19 14:23:04 2024 +1000 drm/nouveau/gf100-: track chan progress with non-WFI semaphore release From VOLTA_CHANNEL_GPFIFO_A onwards, HW no longer updates the GET/GP_GET pointers in USERD following channel progress, but instead updates on a timer for compatibility, and SW is expected to implement its own method of tracking channel progress (typically via non-WFI semaphore release). Nouveau has been making use of the compatibility mode up until now, however, from BLACKWELL_CHANNEL_GPFIFO_A HW no longer supports USERD writeback at all. Allocate a per-channel buffer in system memory, and append a non-WFI semaphore release to the end of each push buffer segment to simulate the pointers previously read from USERD. This change is implemented for Fermi (which is the first to support non- WFI semaphore release) onwards, as readback from system memory is likely faster than BAR1 reads. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit d1fb887a08d8a21284e9a4be476f103353a32e7a Author: Ben Skeggs Date: Wed Jun 19 14:15:22 2024 +1000 drm/nouveau/nv50-: separate CHANNEL_GPFIFO handling out from CHANNEL_DMA Primarily a cleanup to allow for changes in newer CHANNEL_GPFIFO classes to be more easily implemented. Compared to the prior implementation, this submits userspace push buffer segments as subroutines and uses the NV_RAMUSERD_TOP_LEVEL_GET registers to track the main (kernel) push buffer progress. Fixes a number of sporadic failures seen during piglit runs. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 627664de4b8e908b0e9073031dd5e0b6d565e759 Author: Ben Skeggs Date: Tue Mar 11 18:21:19 2025 +1000 drm/nouveau: add helper functions for allocating pinned/cpu-mapped bos Replace some awkward sequences that are repeated in a number of places with helper functions. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 44f93b209e2afdef8524eff3a50716334cd406c6 Author: Ben Skeggs Date: Mon Nov 25 10:21:18 2024 +1000 drm/nouveau: add support for GH100 This commit enables basic support for Hopper GPUs, and is intended primarily as a base supporting Blackwell GPUs, which reuse most of the code added here. Advanced features such as Confidential Compute are not supported. Beyond a few miscellaneous register moves and HW class ID plumbing, the bulk of the changes implemented here are to support the GSP-RM boot sequence used on Hopper/Blackwell GPUs, as well as a new page table layout. There should be no changes here that impact prior GPUs. Signed-off-by: Ben Skeggs Co-developed-by: Timur Tabi Signed-off-by: Timur Tabi Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 76b8f81a5b928cfb81d0c1477ab9be1e7d03660c Author: Ben Skeggs Date: Fri Mar 21 13:35:17 2025 +1000 drm/nouveau: improve handling of 64-bit BARs GPUs exist now with a 64-bit BAR0, which mean that BAR1 and BAR2's indices (as passed to pci_resource_len() etc) are bumped up by one. Modify nvkm_device.resource_addr/size() to take an enum instead of an integer bar index, and take IORESOURCE_MEM_64 into account when translating to the "raw" bar id. [airlied: fixup ERR_PTR] Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit b1ca384772b657df433acf0c36f0771d5ebe1138 Author: Ben Skeggs Date: Fri Feb 7 14:16:11 2025 +1000 drm/nouveau/gv100-: switch to volta semaphore methods HOPPER_CHANNEL_GPFIFO_A removes the SEMAPHORE[A-D] methods that are currently used by nouveau to implement fences on GF100 and newer. Switch to the newer SEM methods available from VOLTA_CHANNEL_GPFIFO, which are also available on the Hopper/Blackwell host classes. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 6c3ac7bcfcff1409c6b29dd074332960d30acc29 Author: Ben Skeggs Date: Fri May 9 05:21:17 2025 +1000 drm/nouveau/gsp: support deeper page tables in COPY_SERVER_RESERVED_PDES Use data from 'struct nvkm_vmm_page/desc' to determine which PDEs need to be mirrored to RM instead of hardcoded values for pre-Hopper page tables. Needed to support Hopper/Blackwell. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit bc7849720b5275297b58db73a20d9a15dda5f353 Author: Ben Skeggs Date: Thu May 8 10:02:49 2025 +1000 drm/nouveau/gsp: init client VMMs with NV0080_CTRL_DMA_SET_PAGE_DIRECTORY The current code using NV90F1_CTRL_CMD_VASPACE_COPY_SERVER_RESERVED_PDES not only requires changes to support the new page table layout used on Hopper/Blackwell GPUs, but is also broken in that it always mirrors the PDEs used for virtual address 0, rather than the area reserved for RM. This works fine for the non-NVK case where the kernel has full control of the VMM layout and things end up in the right place, but NVK puts its kernel reserved area much higher in the address space. Fixing the code to work at any VA is not enough as some parts of RM want the reserved area in a specific location, and NVK would then hit other assertions in RM instead. Fortunately, it appears that RM never needs to allocate anything within its reserved area for DRM clients, and the COPY_SERVER_RESERVED_PDES control call primarily serves to allow RM to locate the root page table when initialising a channel's instance block. Flag VMMs allocated by the DRM driver as externally owned, and use NV0080_CTRL_CMD_DMA_SET_PAGE_DIRECTORY to inform RM of the root page table in a similar way to NVIDIA's UVM driver. The COPY_SERVER_RESERVED_PDES paths are kept for the golden context image and gr scrubber channel, where RM needs the reserved area. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 708d81a9f529a1bfdec62021690d03ae4ee2e964 Author: Ben Skeggs Date: Thu Feb 13 18:17:53 2025 +1000 drm/nouveau/gsp: fetch level shift and PDE from BAR2 VMM When mirroring BAR2 page tables to RM, we need to know the level shift for the root page table (which is currently hardcoded), as well as the raw PDE value (which is currently hardcoded in GP1xx-AD1xx format). In order to support GH100/GBxxx, modify the code to determine the page shift from per-GPU info in nvkm_vmm_page, as well as read the relevant PDE back from the root page table rather than recalculating it. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 82df73d8ee007f62616fb6eb2e6bf6dc3b32c573 Author: Ben Skeggs Date: Thu Feb 13 07:42:28 2025 +1000 drm/nouveau/mmu: bump up the maximum page table depth GH100/GBxxx have 6-level page tables. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 0adfd612c02f57c55ceac63a23baa702249fc612 Author: Ben Skeggs Date: Thu Jan 30 17:28:02 2025 +1000 drm/nouveau/instmem: add hal for set_bar0_window_addr() GH100/GBxxx have moved the register that controls where in VRAM the the BAR0 NV_PRAMIN window points. Add a HAL for this, as the BAR0 window is needed for BAR2 bootstrap. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 2f89bb3264af414a96ef875035c6c5afae01c7da Author: Ben Skeggs Date: Fri Jan 31 01:56:33 2025 +1000 drm/nouveau/pci: add PRI address of config space mirror to nvkm_pci_func These registers have moved on GH100/GBxxx, and the GSP-RM init code uses hardcoded values from earlier GPUs to fill GspSystemInfo. Replace the per-GPU accessors in nvkm_pci_func with region info, and use it when initialising GspSystemInfo. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 53dac0623853457ec7564152528b686b8d5dfabe Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add support for 570.144 Add r570-specific HAL routines, and support loading of GSP-RM version 570.144 if firmware is available. There should be no impact on r535, or non-GSP paths. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 1b9d7b9df8f3e33a577bf00861250d3669bf2000 Author: Ben Skeggs Date: Wed May 14 09:19:56 2025 +1000 drm/nouveau/gsp: add common client alloc code 570.144 has incompatible changes to NV0000_ALLOC_PARAMETERS. Factor out the common code so it can be shared. Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie commit 9c86a6010ae5bbc67770d649829e8f3dc302d2b9 Author: Ben Skeggs Date: Tue Apr 1 05:22:41 2025 +1000 drm/nouveau/gsp: add hal for gsp.sr_data_size() 570.86.15 uses a slightly different calculation for the size of the sysmem buffer needed to store GSP-RM's vidmem data across suspend. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit f82fb646e12e3f64c4576d8f537b343f16966be9 Author: Ben Skeggs Date: Thu Nov 14 13:02:39 2024 +1000 drm/nouveau/gsp: add hal for disp.chan.dmac_alloc() 565.57.01 has incompatible changes to NV50VAIO_CHANNELDMA_ALLOCATION_PARAMETERS. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 8887abb8cb6fb4647fb8b1f023b612c201512150 Author: Ben Skeggs Date: Thu Nov 14 13:02:39 2024 +1000 drm/nouveau/gsp: add hal for fifo.rc_triggered() 565.57.01 has incompatible changes to rpc_rc_triggered_v17_02. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 3194beda36231a1faae94e6fdf900bad265df1bf Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for fifo.rsvd_chids 555.42.02 reserves some CHIDs for internal use. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 27b13dc5d0515e3c9065f14d52a491248b12a291 Author: Ben Skeggs Date: Wed Nov 20 12:59:53 2024 +1000 drm/nouveau/gsp: add hal for fifo.chan.alloc 570.86.16 has incompatible changes to NV_CHANNEL_ALLOC_PARAMS. At the same time, remove the duplicated channel allocation code from golden context init. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 37a82fa33034d7d54ff049a162c732fbe4f94b93 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.dp.get_caps() 555.42.02 has incompatible changes to NV0073_CTRL_CMD_DP_GET_CAPS. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit cf6b2b5e18d1b390cae2a05e4912c468e3de14fd Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.get_active() 555.42.02 has incompatible changes to NV0073_CTRL_CMD_SYSTEM_GET_ACTIVE. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit bfbae411ed1a15aa6647351c2e1e1a3d418bdc84 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.get_connect_state() 555.42.02 has incompatible changes to NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 1cf5940bdbee4446df387a8b70cda05bb920f693 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.get_supported() 555.42.02 has incompatible changes to NV0073_CTRL_CMD_SYSTEM_GET_SUPPORTED. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit c21b039715ce9f4a10b77782e636c39dd8869869 Author: Ben Skeggs Date: Wed Jan 29 10:29:40 2025 +1000 drm/nouveau/gsp: add hals for fbsr.suspend/resume() 555.42.02 has incompatible changes to FBSR. At the same time, move the calling of FBSR functions from the instmem subdev's suspend/resume paths, to GSP's. This is needed to fix ordering issues that arise from changes to FBSR in newer RM versions. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 207c445b31aa6e080b51881a288bfffafd6011a4 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for gsp.set_rmargs() 555.42.02 has incompatible changes to GSP_ARGUMENTS_CACHED. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 2f9974fdd56a5cb65476707fa21636b3a90e1dc9 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for gr.get_ctxbufs_info() NV2080_CTRL_CMD_INTERNAL_STATIC_KGR_GET_CONTEXT_BUFFERS_INFO has incompatible changes in 550.40.07. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit f308c9ffdc2b4e7532504899d058bbb850353577 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for fifo.ectx_size() NV2080_CTRL_CMD_INTERNAL_GET_CONSTRUCTED_FALCON_INFO is moved to NV2080_CTRL_CMD_GPU_GET_CONSTRUCTED_FALCON_INFO in 550.40.07. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 727937b337feff684818ff7728b86d2196c87012 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for fifo.xlat_rm_engine_type() 550.40.07 has incompatible changes to RM_ENGINE_TYPE defines. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit e0ed9434aa45f09143647d9d3439fbb7baa097a0 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.chan.set_pushbuf() 550.40.07 has incompatible changes to NV2080_CTRL_CMD_INTERNAL_DISPLAY_CHANNEL_PUSHBUFFER. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 6854ce2c942da5180936c676ff29c4dc1899a844 Author: Ben Skeggs Date: Thu Nov 14 13:02:38 2024 +1000 drm/nouveau/gsp: add hal for disp.get_static_info() 550.40.07 has incompatible changes to NV2080_CTRL_CMD_INTERNAL_DISPLAY_GET_STATIC_INFO. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit a3f3232903213530f9ae675de4a3be0970ea9eea Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for disp.dp.set_indexed_link_rates() 545.23.06 has incompatible changes to NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 8f8d9bca2ff0e85d0818fcdf7f7f0068fe290c92 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for disp.bl_ctrl() 545.23.06 has incompatible changes to NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit e95bb6b6ebde01c4642f132fbd5c0af19658b622 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for gsp.drop_send_user_shared_data() 545.23.06 removes NV_VGPU_MSG_EVENT_GSP_SEND_USER_SHARED_DATA, but has another event (NVLINK_FAULT_UP) in its place. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 20235009c11d839b371298ae96dfd12ef2355c27 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for gsp.xlat_mc_engine_idx() 545.23.06 has incompatible changes to MC_ENGINE_IDX definitions. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 7bb77eacdb85d7628a541938f5752528eb1d4029 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for gsp.get_static_info() 545.23.06 has incompatible changes to a number of definitions that impact the layout of GspStaticConfigInfo. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit aa733b3ee6bd4450cd3278e12df5e547e8bbe92a Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for gsp.set_system_info() 545.23.06 has incompatible changes to GspSystemInfo. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 57fe0d30a0a6fafc0b89ab3d8ec8d81f6742f1b6 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: add hal for wpr config info + meta init 545.23.06 increases the libos3 heap size requirements, and GH100/GBxxx will need their own implementation entirely. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 38cafe9bd914dd4039c1bdcba8e47b95f961846b Author: Ben Skeggs Date: Thu May 8 06:48:37 2025 +1000 drm/nouveau/gsp: add defines for rmapi object handles Add header containing defines for RMAPI handles used by NVKM, and use them in place of magic values when calling RM_ALLOC. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 7c2d25f1e408bb7d18b867718f9961de3c2f23da Author: Ben Skeggs Date: Sat Feb 15 03:21:47 2025 +1000 drm/nouveau/gsp: add common code for engines/engine objects With minimal to no direct HW programming required, most nvkm_engine implementations are nearly identical when running on top of GSP-RM. Add a common implementation of the boilerplate, and use nvkm_rm_gpu to expose the correct class IDs. As they're now handled by common code, and there's no support for them prior to GSP-RM support - this deletes the GA100 NVDEC/NVJPG/OFA HALs, the GA102 NVENC/OFA HALs, and the AD102 GR/NVDEC/NVENC/NVJPG/OFA HALs. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 678bb27e8473c90841636e0232680c7c94f76aec Author: Ben Skeggs Date: Tue Feb 18 20:51:56 2025 +1000 drm/nouveau/gsp: add channel class id to gpu hal Use channel class ID from nvkm_rm_gpu, instead of copying it from the non-GSP HALs. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit cd3c62282b61d634b0ed098bb772680088282227 Author: Ben Skeggs Date: Tue Feb 18 20:33:39 2025 +1000 drm/nouveau/gsp: add usermode class id to gpu hal Use usermode class ID from nvkm_rm_gpu, instead of copying it from the non-GSP HALs. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 0fac5141d646638d64851cea4f493204faee1282 Author: Ben Skeggs Date: Tue Feb 18 20:11:55 2025 +1000 drm/nouveau/gsp: add display class ids to gpu hal Use display class IDs from nvkm_rm_gpu, instead of copying them from the non-GSP HALs. Removes the AD102 display HAL, which is no longer required as there's no support for it without GSP-RM. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit befe75ae0db90dcbe94fe2670d94b8b7a4855666 Author: Ben Skeggs Date: Sat Feb 15 02:55:45 2025 +1000 drm/nouveau/gsp: add gpu hal stubs With GSP-RM handling the majority of the HW programming, NVKM's usual HALs are more elaborate than necessary, resulting in a fair amount of duplicated boilerplate. Adds 'nvkm_rm_gpu' which serves to provide GPU-specific constants and functions in a more streamlined manner. This is initially used in subsequent commits to store engine class IDs, and replace the per-engine/engobj boilerplate with common code for all GSP-RM supported engines - and is further extended when adding GH100, GB10x and GB20x support. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 0c6aa94f991b00b6799be66880918b68344eb92b Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: switch to a simpler GSP-RM header layout Rather than using OpenRM's directory structure for headers, move to a layout that's split roughly around RM API boundaries. Also move the headers from include/nvrm to subdev/gsp/rm/r535/nvrm, with the rest of the r535-specific code. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit c472d828348cafa7874816f4ad2a2314d0000419 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: move subdev/engine impls to subdev/gsp/rm/r535/ Move all the remaining GSP-RM code together underneath a versioned path, to make the code easier to work with when adding support for a newer RM version. Aside from adjusting include paths, no code change is intended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 594766ca3e5398b861cdd71687db82e483f67edb Author: Ben Skeggs Date: Wed Jan 22 21:21:03 2025 +1000 drm/nouveau/gsp: move booter handling to GPU-specific code GH100/GBxxx have significant changes to the GSP-RM boot process. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 7f022236b55be48b46e9a2041b2fbca6acf1a71b Author: Ben Skeggs Date: Tue Feb 4 08:38:19 2025 +1000 drm/nouveau/gsp: move firmware loading to GPU-specific code GH100/GBxxx use a slightly different set of firmwares to boot GSP-RM. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit f964336483159da1f4ca67d7abef3d82e725ed36 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: split device handling out on its own Split handling of NV01_DEVICE (and other related objects) out into its own module. Aside from moving the function pointers, no code change is intended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 45a78c640510af520c26737d10ad5eacb3d72841 Author: Ben Skeggs Date: Thu Nov 14 13:02:37 2024 +1000 drm/nouveau/gsp: split client handling out on its own Split NV01_ROOT handling out into its own module. Aside from moving the function pointers, no code change is intended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit be33f49980b557f2d6367bff6a2573ebabf310c9 Author: Ben Skeggs Date: Thu Nov 14 13:02:36 2024 +1000 drm/nouveau/gsp: split rm alloc handling out on its own Split base RM_ALLOC handling out into its own module. Aside from moving the function pointers, no code change is intended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 063d193f12b8c5c07cfe2e10972b2a687786284d Author: Ben Skeggs Date: Thu Nov 14 13:02:36 2024 +1000 drm/nouveau/gsp: split rm ctrl handling out on its own Split base RM_CONTROL handling out into its own module. Aside from moving the function pointers, no code change is intended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 8a8b1ec5261f20d86c76c8fb235ee2441744bc10 Author: Ben Skeggs Date: Thu Nov 14 13:02:36 2024 +1000 drm/nouveau/gsp: split rpc handling out on its own Later patches in the series add HALs around various RM APIs in order to support a newer version of GSP-RM firmware. In order to do this, begin by splitting the code up into "modules" that roughly represent RM's API boundaries so they can be more easily managed. Aside from moving the RPC function pointers, no code change is indended. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 4848de6e4161886c4ab55aa68d5777c449a683c2 Author: Ben Skeggs Date: Fri Feb 21 06:26:13 2025 +1000 drm/nouveau/ofa: bump max instances to 2 560.28.03 supports more NVENC instances. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 9cc5c1951b9bb497b9fa48e7e0db0b7fba948fdf Author: Ben Skeggs Date: Mon Nov 18 09:47:14 2024 +1000 drm/nouveau/nvenc: bump max instances to 4 570.86.16 supports more NVENC instances. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 52cae0b140d3d3f46589f62155000476bee63e73 Author: Ben Skeggs Date: Mon Nov 25 10:46:40 2024 +1000 drm/nouveau/ce: bump max instances to 20 560.28.03 supports more copy engine instances. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit b8a90901db9d2b50093e105f2e016624c627c610 Author: Ben Skeggs Date: Tue May 13 05:48:56 2025 +1000 drm/nouveau/gsp: remove gsp-specific chid allocation path In order to specify a channel ID to RM during channel allocation, the channel ID is broken down into a "userd page" index and an index into that page. It was assumed that RM would enforce that the same physical block of memory be used for all CHIDs within a "userd page", and the GSP paths override NVKM's normal CHID allocation to handle this. However, none of that turns out to be necessary. Remove the GSP-specific code and use the regular CHID allocation path. Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie commit 7904bcdcf6b56602a049ed2b47282db63671fa99 Author: Ben Skeggs Date: Wed Feb 5 03:12:51 2025 +1000 drm/nouveau/gsp: fix rm shutdown wait condition Though the initial upstreamed GSP-RM version in nouveau was 535.113.01, the code was developed against earlier versions. 535.42.02 modified the mailbox value used by GSP-RM to signal shutdown has completed, which was missed at the time. I'm not aware of any issues caused by this, but noticed the bug while working on GB20x support. Signed-off-by: Ben Skeggs Reviewed-by: Dave Airlie Reviewed-by: Timur Tabi Tested-by: Timur Tabi Signed-off-by: Dave Airlie commit 22c3335c5dcd33063fe1894676a3a6ff1008d506 Merge: b04d17062193dc 771c5a7d984364 Author: Miguel Ojeda Date: Sun May 18 20:56:03 2025 +0200 Merge tag 'alloc-next-v6.16-2025-05-13' of https://github.com/Rust-for-Linux/linux into rust-next Pull alloc updates from Danilo Krummrich: "Box: - Support for type coercion, e.g. 'Box' to 'Box' if T implements U Vec: - Implement new methods (prerequisites for nova-core and binder) - Vec::truncate() - Vec::resize() - Vec::clear() - Vec::pop() - Vec::push_within_capacity() - New error type: PushError - Vec::drain_all() - Vec::retain() - Vec::remove() - New error type: RemoveError - Vec::insert_within_capacity - New error type: InsertError - Simplify Vec::push() using Vec::spare_capacity_mut() - Split Vec::set_len() into Vec::inc_len() and Vec::dec_len() - Add type invariant Vec::len() <= Vec::capacity - Simplify Vec::truncate() using Vec::dec_len()" * tag 'alloc-next-v6.16-2025-05-13' of https://github.com/Rust-for-Linux/linux: rust: alloc: add Vec::insert_within_capacity rust: alloc: add Vec::remove rust: alloc: add Vec::retain rust: alloc: add Vec::drain_all rust: alloc: add Vec::push_within_capacity rust: alloc: add Vec::pop rust: alloc: add Vec::clear rust: alloc: replace `Vec::set_len` with `inc_len` rust: alloc: refactor `Vec::truncate` using `dec_len` rust: alloc: add `Vec::dec_len` rust: alloc: add Vec::len() <= Vec::capacity invariant rust: alloc: allow coercion from `Box` to `Box` if T implements U rust: alloc: use `spare_capacity_mut` to reduce unsafe rust: alloc: add Vec::resize method rust: alloc: add Vec::truncate method rust: alloc: add missing invariant in Vec::set_len() commit b04d17062193dcc0fe5fc87adee5091319a482a0 Merge: 06ff274f25e964 9de1a293c8ece0 Author: Miguel Ojeda Date: Sun May 18 20:42:49 2025 +0200 Merge tag 'pin-init-v6.16' of https://github.com/Rust-for-Linux/linux into rust-next Pull pin-init updates from Benno Lossin: "Added: - 'Wrapper' trait for creating pin-initializers for wrapper structs with a structurally pinned value such as 'UnsafeCell' or 'MaybeUninit'. - 'MaybeZeroable' derive macro to try to derive 'Zeroable', but not error if not all fields implement it. This is needed to derive 'Zeroable' for all bindgen-generated structs. - 'unsafe fn cast_[pin_]init()' functions to unsafely change the initialized type of an initializer. These are utilized by the 'Wrapper' implementations. Changed: - Added support for visibility in 'Zeroable' derive macro. - Added support for 'union's in 'Zeroable' derive macro. Upstream dev news: - The CI has been streamlined & some bugs with it have been fixed. I also added new workflows to check if the user-space version and the one in the kernel tree have diverged. - I also started to use the issues [1] tab to keep track of any problems or unexpected/unwanted things. This should help folks report and diagnose issues w.r.t. 'pin-init' better. [1] https://github.com/rust-for-linux/pin-init/issues" * tag 'pin-init-v6.16' of https://github.com/Rust-for-Linux/linux: rust: pin-init: improve documentation for `Zeroable` derive macros rust: pin-init: fix typos rust: pin-init: add `MaybeZeroable` derive macro rust: pin-init: allow `Zeroable` derive macro to also be applied to unions rust: pin-init: allow `pub` fields in `derive(Zeroable)` rust: pin-init: Update the structural pinning link in readme. rust: pin-init: Update Changelog and Readme rust: pin-init: Implement `Wrapper` for `UnsafePinned` behind feature flag. rust: pin-init: Add the `Wrapper` trait. rust: pin-init: add `cast_[pin_]init` functions to change the initialized type rust: pin-init: examples: use `allow` instead of `expect` rust: pin-init: examples: conditionally enable `feature(lint_reasons)` rust: pin-init: internal: skip rustfmt formatting of kernel-only module rust: pin-init: synchronize README.md commit 06ff274f25e96435147f2a7f4262a3d80204f064 Merge: 373827fce225ae fa616196fbea12 Author: Miguel Ojeda Date: Sun May 18 20:36:56 2025 +0200 Merge tag 'rust-xarray-for-v6.16' of https://github.com/Rust-for-Linux/linux into rust-next Pull XArray updates from Andreas Hindborg: "Introduce Rust support for the 'xarray' data structure: - Add a Rust abstraction for the 'xarray' data structure. This abstraction allows Rust code to leverage the 'xarray' to store types that implement 'ForeignOwnable'. This support is a dependency for memory backing feature of the Rust null block driver, which is waiting to be merged. - Set up an entry in MAINTAINERS for the XArray Rust support. Patches will go to the new Rust XArray tree and then via the Rust subsystem tree for now. 'kernel' crate: - Allow 'ForeignOwnable' to carry information about the pointed-to type. This helps asserting alignment requirements for the pointer passed to the foreign language." * tag 'rust-xarray-for-v6.16' of https://github.com/Rust-for-Linux/linux: MAINTAINERS: add entry for Rust XArray API rust: xarray: Add an abstraction for XArray rust: types: add `ForeignOwnable::PointedTo` commit 373827fce225ae239e68d8d8b4709d62a7b209d9 Merge: edc5e6e019c99b 67918590497242 Author: Miguel Ojeda Date: Sun May 18 20:04:27 2025 +0200 Merge tag 'rust-timekeeping-for-v6.16-v2' of https://github.com/Rust-for-Linux/linux into rust-next Pull timekeeping updates from Andreas Hindborg: - Morph the Rust hrtimer subsystem into the Rust timekeeping subsystem, covering delay, sleep, timekeeping, timers. This new subsystem has all the relevant timekeeping C maintainers listed in the entry. - Replace 'Ktime' with 'Delta' and 'Instant' types to represent a duration of time and a point in time. - Temporarily add 'Ktime' to 'hrtimer' module to allow 'hrtimer' to delay converting to 'Instant' and 'Delta'. * tag 'rust-timekeeping-for-v6.16-v2' of https://github.com/Rust-for-Linux/linux: MAINTAINERS: rust: Add a new section for all of the time stuff rust: time: Introduce Instant type rust: time: Introduce Delta type rust: time: Add PartialEq/Eq/PartialOrd/Ord trait to Ktime rust: hrtimer: Add Ktime temporarily commit a0b018a495a3f68693e45ab570fae8191d907d86 Author: Valentin Schneider Date: Tue Apr 29 13:32:39 2025 +0200 module: Remove outdated comment about text_size The text_size bit referred to by the comment has been removed as of commit ac3b43283923 ("module: replace module_layout with module_memory") and is thus no longer relevant. Remove it and comment about the contents of the masks array instead. Signed-off-by: Valentin Schneider Link: https://lore.kernel.org/r/20250429113242.998312-23-vschneid@redhat.com Signed-off-by: Petr Pavlu commit 60b57b9cb002df575a54635da1c55f361533deb7 Author: Petr Pavlu Date: Thu Mar 6 14:13:54 2025 +0100 module: Make .static_call_sites read-only after init Section .static_call_sites holds data structures that need to be sorted and processed only at module load time. This initial processing happens in static_call_add_module(), which is invoked as a callback to the MODULE_STATE_COMING notification from prepare_coming_module(). The section is never modified afterwards. Make it therefore read-only after module initialization to avoid any (non-)accidental modifications. Reviewed-by: Sami Tolvanen Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20250306131430.7016-4-petr.pavlu@suse.com Signed-off-by: Petr Pavlu commit f7984942630b0508c44276ceaa3a3a47d8fd3d2c Author: Petr Pavlu Date: Thu Mar 6 14:13:53 2025 +0100 module: Add a separate function to mark sections as read-only after init Move the logic to mark special sections as read-only after module initialization into a separate function, along other related code in strict_rwx.c. Use a table with names of such sections to make it easier to add more. Reviewed-by: Sami Tolvanen Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20250306131430.7016-3-petr.pavlu@suse.com Signed-off-by: Petr Pavlu commit 7bba3167c08a3bebda6e5fcc0179482b4517ba5b Author: Petr Pavlu Date: Thu Mar 6 14:13:52 2025 +0100 module: Constify parameters of module_enforce_rwx_sections() Minor cleanup, this is a non-functional change. Reviewed-by: Sami Tolvanen Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20250306131430.7016-2-petr.pavlu@suse.com Signed-off-by: Petr Pavlu commit d00d16bcbc2553a3ac9acccf2d6444cda5502adf Author: Patrisious Haddad Date: Tue May 13 14:03:41 2025 +0300 RDMA/mlx5: Add support for 200Gbps per lane speeds Add support for 200Gbps per lane speeds speed when querying PTYS and report it back correctly when needed. Signed-off-by: Patrisious Haddad Reviewed-by: Maor Gottlieb Link: https://patch.msgid.link/b842d2f523e9b82e221378c444ebd5860d612959.1747134197.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 972db388d40ded1a5ef8ce09d92ef1e2b9e40f07 Author: Yishai Hadas Date: Tue May 13 14:02:40 2025 +0300 RDMA/mlx5: Remove the redundant MLX5_IB_STAGE_UAR stage The MLX5_IB_STAGE_UAR stage in the RDMA driver is redundant and should be removed. Responsibility for initializing the device's UAR pointer (mdev->priv.uar) lies with mlx5_core, which already sets it during the mlx5_load() process. At present, the RDMA UAR stage overwrites this pointer, which was correctly initialized by mlx5_core, creating the risk of inconsistency. Ownership and management of the UAR pointer should remain exclusively within mlx5_core. In the current upstream code, we luckily receive the same pointer, since mlx5_get_uars_page() still finds available BF registers for that UAR, allowing it to be shared. However, future changes in mlx5_core may expose this flaw. For instance, if mlx5_alloc_bfreg() is invoked twice before the RDMA UAR stage runs, the RDMA driver may overwrite the UAR allocated by mlx5_core. This could lead to real bugs. For example, if mlx5_ib is unloaded (rmmod), it might free the UAR, leaving mlx5_core with a dangling reference to an invalid UAR. Signed-off-by: Yishai Hadas Reviewed-by: Fan Li Link: https://patch.msgid.link/feaa84ec6f20468b4935c439923e9266122a93d0.1747134130.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 9220aa8a6779b586ef11bcd5473d103f7cf60756 Author: Xin Li (Intel) Date: Mon May 12 01:45:50 2025 -0700 x86/msr: Remove a superfluous inclusion of The following commit: efef7f184f2e ("x86/msr: Add explicit includes of ") added a superfluous inclusion of to drivers/acpi/processor_throttling.c. Remove it. Fixes: efef7f184f2e ("x86/msr: Add explicit includes of ") Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250512084552.1586883-2-xin@zytor.com commit f660fd2ca15a3743f65f6110ae60d5b80500d856 Author: Jens Axboe Date: Fri May 16 13:39:32 2025 -0600 io_uring: add new helpers for posting overflows Add two helpers, one for posting overflows for lockless_cq rings, and one for non-lockless_cq rings. The former can allocate sanely with GFP_KERNEL, but needs to grab the completion lock for posting, while the latter must do non-sleeping allocs as it already holds the completion lock. While at it, mark the overflow handling functions as __cold as well, as they should not generally be called during normal operations of the ring. Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit c80bdb1c55719cd6308d648a7920272a3be09e34 Author: Jens Axboe Date: Fri May 16 13:16:44 2025 -0600 io_uring: pass in struct io_big_cqe to io_alloc_ocqe() Rather than pass extra1/extra2 separately, just pass in the (now) named io_big_cqe struct instead. The callers that don't use/support CQE32 will now just pass a single NULL, rather than two seperate mystery zero values. Move the clearing of the big_cqe elements into io_alloc_ocqe() as well, so it can get moved out of the generic code. Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 072d37b52c914271319b9f7e596ff3cba02e249c Author: Jens Axboe Date: Fri May 16 09:45:24 2025 -0600 io_uring: make io_alloc_ocqe() take a struct io_cqe pointer The number of arguments to io_alloc_ocqe() is a bit unwieldy. Make it take a struct io_cqe pointer rather than three separate CQE args. One path already has that readily available, add an io_init_cqe() helper for the remaining two. Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 10f466abc404443cb72ab3384f297345ac7415e1 Author: Jens Axboe Date: Fri May 16 09:39:14 2025 -0600 io_uring: split alloc and add of overflow Add a new helper, io_alloc_ocqe(), that simply allocates and fills an overflow entry. Then it can get done outside of the locking section, and hence use more appropriate gfp_t allocation flags rather than always default to GFP_ATOMIC. Inspired by a previous series from Pavel: https://lore.kernel.org/io-uring/cover.1747209332.git.asml.silence@gmail.com/ Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 201bf08ba9e26eeb0a96ba3fd5c026f531b31aed Author: Taniya Das Date: Mon Apr 14 14:30:41 2025 +0530 clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks Update the force mem core bit for UFS ICE clock and UFS PHY AXI clock to force the core on signal to remain active during halt state of the clk. If force mem core bit of the clock is not set, the memories of the subsystem will not retain the logic across power states. This is required for the MCQ feature of UFS. Signed-off-by: Taniya Das Reviewed-by: Imran Shaik Link: https://lore.kernel.org/r/20250414-gcc_ufs_mem_core-v1-2-67b5529b9b5d@quicinc.com Signed-off-by: Bjorn Andersson commit da94a81ea6c6f1cd2f389c5631e33c145ac7b35b Author: Taniya Das Date: Mon Apr 14 14:30:40 2025 +0530 clk: qcom: gcc: Set FORCE_MEM_CORE_ON for gcc_ufs_axi_clk for 8650/8750 Update the force mem core bit for UFS AXI clock to force the core on signal to remain active during halt state of the clk. If force mem core bit of the clock is not set, the memories of the subsystem will not retain the logic across power states. This is required for the MCQ feature of the UFS driver. Signed-off-by: Taniya Das Reviewed-by: Imran Shaik Link: https://lore.kernel.org/r/20250414-gcc_ufs_mem_core-v1-1-67b5529b9b5d@quicinc.com Signed-off-by: Bjorn Andersson commit 166e65bc6ce317be41368d9340b870edbdbaa2aa Author: Pengyu Luo Date: Mon Apr 14 01:22:04 2025 +0800 clk: qcom: rpmh: make clkaN optional On SM8650, clkaN are missing in cmd-db for some specific devices. This caused a boot failure. Printing log during initramfs phase, I found [ 0.053281] clk-rpmh 17a00000.rsc:clock-controller: missing RPMh resource address for clka1 Adding the optional property to avoid probing failure which causes countless deferred probe. In the downstream tree,similar workarounds are introduced for SM7635, SM8550, SM8635, SM8650, SM8750. Signed-off-by: Pengyu Luo Link: https://lore.kernel.org/r/20250413172205.175789-1-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson commit 1003cea3c7764ae582302c395f82e1cf7e5cd8f6 Author: Imran Shaik Date: Thu Mar 27 15:32:27 2025 +0530 clk: qcom: Add support for Camera Clock Controller on QCS8300 The QCS8300 Camera clock controller is a derivative of SA8775P, but has few additional clocks and offset differences. Hence, add support for QCS8300 Camera clock controller by extending the SA8775P CamCC. Reviewed-by: Dmitry Baryshkov Signed-off-by: Imran Shaik Link: https://lore.kernel.org/r/20250327-qcs8300-mm-patches-v6-1-b3fbde2820a6@quicinc.com Signed-off-by: Bjorn Andersson commit b2c547cffe2f67e18a3a276905649cc95aa7f293 Author: Dmitry Baryshkov Date: Sun Feb 9 07:05:00 2025 +0200 ARM: dts: qcom: apq8064-ifc6410: drop HDMI HPD GPIO There is no need to specify separate HPD gpio for the HDMI block. Use built-in HPD in order to detect if the monitor is plugged or not. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250209-fd-hdmi-hpd-v4-16-6224568ed87f@linaro.org Signed-off-by: Bjorn Andersson commit e07d2d57a1c7254d25597dcdd34f318a91ec9398 Author: Dmitry Baryshkov Date: Fri Feb 7 22:41:18 2025 +0200 arm64: dts: qcom: qcm2290: fix (some) of QUP interconnects While adding interconnect support for the QCM2290 platform some of them got the c&p error, rogue MASTER_APPSS_PROC for the config_noc interconnect. Turn that into SLAVE_QUP_0 as expected. Fixes: 5b970ff0193d ("arm64: dts: qcom: qcm2290: Hook up interconnects") Reported-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250207-rb1-bt-v4-4-d810fc8c94a9@linaro.org Signed-off-by: Bjorn Andersson commit f285543c5a00b4329a321edfd674010c874e3862 Author: Konrad Dybcio Date: Sat May 17 19:27:54 2025 +0200 arm64: dts: qcom: sc8280xp-crd: Enable SLPI Enable the SLPI remoteproc and declare the firmware path. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250517-topic-8280_slpi-v2-5-1f96f86ac3ae@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit f5421c52983865c32eef72c4585234d043dd980c Author: Dmitry Baryshkov Date: Sat May 17 19:27:53 2025 +0200 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: enable sensors DSP Enable SLPI / Sensors DSP present on the SC8280XP platforms / Lenovo X13s laptop. Signed-off-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250517-topic-8280_slpi-v2-4-1f96f86ac3ae@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit d6470588beafdfebd84c857b78473db6388832a1 Author: Konrad Dybcio Date: Sat May 17 19:27:52 2025 +0200 arm64: dts: qcom: sc8280xp: Add SLPI SC8280XP features a SLPI (Sensor Low Power Island) core. Describe it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250517-topic-8280_slpi-v2-3-1f96f86ac3ae@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9522803addbee74269245259fecbb33d01a4a796 Author: Konrad Dybcio Date: Sat May 17 19:27:51 2025 +0200 arm64: dts: qcom: sc8280xp: Fix node order Certain /soc@0 subnodes are very out of order. Reshuffle them. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250517-topic-8280_slpi-v2-2-1f96f86ac3ae@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit eeb133a6341280a1315c12b5b24a42e1fbf35487 Author: Sun YangKai Date: Sat May 17 22:34:16 2025 +0800 btrfs: move misplaced comment of btrfs_path::keep_locks Commit 925baeddc5b0 ("Btrfs: Start btree concurrency work.") added the comment for the field keep_locks. This got moved later but without the comment, so move it to the right place and fix the comment style. Signed-off-by: Sun YangKai Reviewed-by: David Sterba Signed-off-by: David Sterba commit 695d702f42bf4bd335e30f542ca710af081ee2a3 Author: Chen Ni Date: Thu May 15 16:39:19 2025 +0800 soc: fsl: qe: Consolidate chained IRQ handler install/remove Chained irq handlers usually set up handler data as well. irq_set_chained_handler_and_data() can set both under irq_desc->lock. Replace the two calls with one. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250515083919.3811473-1-nichen@iscas.ac.cn Signed-off-by: Christophe Leroy commit d35ef47a43f8a01252e89b1fd4a52c91017b5d59 Author: Heiko Carstens Date: Fri May 9 15:42:48 2025 +0200 s390/ptrace: Always inline regs_get_kernel_stack_nth() and regs_get_register() Both regs_get_kernel_stack_nth() and regs_get_register() are not inlined. With the new ftrace funcgraph-args feature they show up in function graph tracing: 4) | sched_core_idle_cpu(cpu=4) { 4) 0.257 us | regs_get_register(regs=0x37fe00afa10, offset=2); 4) 0.218 us | regs_get_register(regs=0x37fe00afa10, offset=3); 4) 0.225 us | regs_get_register(regs=0x37fe00afa10, offset=4); 4) 0.239 us | regs_get_register(regs=0x37fe00afa10, offset=5); 4) 0.239 us | regs_get_register(regs=0x37fe00afa10, offset=6); 4) 0.245 us | regs_get_kernel_stack_nth(regs=0x37fe00afa10, n=20); This is subtoptimal, since both functions are supposed to be ftrace internal helper functions. If they appear in ftrace traces this reduces readability significantly, plus this adds tons of extra useless extra entries. Address this by moving both functions and required helpers to ptrace.h and always inline them. This way they don't appear in traces anymore. In addition the overhead that comes with functions calls is also reduced. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 5c4a8632e86aa68514eef9480b0b838d1aa3f24a Author: Heiko Carstens Date: Fri May 9 15:42:47 2025 +0200 s390/thread_info: Cleanup header includes asm/thread_info.h requires PAGE_SIZE, which is defined in vdso/page.h, but doesn't need to include asm/lowcore.h or asm/page.h. Therefore change the includes accordingly and reduce header dependencies. Signed-off-by: Heiko Carstens commit 38988c35b7f57a18db1ebc8494cc1fb17c2e7b41 Author: Gerald Schaefer Date: Mon May 12 15:37:55 2025 +0200 s390/extmem: Add workaround for DCSS unload diag When calling the diag for DCSS unload on a non-IPL CPU, the sclp maximum memory detection on the next IPL would falsely return the end of the previously loaded DCSS. This is because of an issue in z/VM, so work around it by always calling the diag for DCSS unload on IPL CPU 0. That CPU cannot be set offline, so the dcss_diag() call can directly be scheduled to CPU 0. The wrong maximum memory value returned by sclp would only affect KASAN kernels. When a DCSS within the falsely reported extra memory range is loaded and accessed again, it would result in a kernel crash: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 001c0000a3ffe000 TEID: 001c0000a3ffe803 Fault in home space mode while using kernel ASCE. AS:000000039955400b R2:00000003fe3b400b R3:000000037a2a8007 S:0000000000000020 Oops: 0010 ilc:3 [#1]SMP [...] CPU: 2 UID: 0 PID: 1563 Comm: mount Kdump: loaded Not tainted 6.15.0-rc5-11546-g3ea93fb3d026-dirty #7 NONE Hardware name: IBM 3931 A01 704 (z/VM 7.4.0) Krnl PSW : 0704c00180000000 000da6f2b338faf2 (kasan_check_range+0x172/0x310) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 Krnl GPRS: 0000000000000040 001c0000a3ffe000 000000051fff0000 0000000000001000 0000000000000000 000da6f233380ff6 00000000000001f8 0000000000000000 001c0000a3ffe200 0000000000000040 001c0000a3ffe200 0000000000000200 000003ff97a2cfa8 0000000000000000 0000000000000010 000da672b58af070 Krnl Code: 000da6f2b338fae2: 41101008 la %r1,8(%r1) 000da6f2b338fae6: eca100268064 cgrj %r10,%r1,8,000da6f2b338fb32 #000da6f2b338faec: ebe00002000c srlg %r14,%r0,2 >000da6f2b338faf2: e3b010000002 ltg %r11,0(%r1) 000da6f2b338faf8: a77400a8 brc 7,000da6f2b338fc48 000da6f2b338fafc: 41b01008 la %r11,8(%r1) 000da6f2b338fb00: b904001b lgr %r1,%r11 000da6f2b338fb04: e3a0b0000002 ltg %r10,0(%r11) Call Trace: [<000da6f2b338faf2>] kasan_check_range+0x172/0x310 [<000da6f2b3390b3c>] __asan_memcpy+0x3c/0x90 [<000da6f233380ff6>] dcssblk_submit_bio+0x3a6/0x620 [dcssblk] [<000da6f2b3eb403c>] __submit_bio+0x25c/0x4a0 [<000da6f2b3eb43bc>] __submit_bio_noacct+0x13c/0x450 [<000da6f2b3eb4bde>] submit_bio_noacct_nocheck+0x50e/0x620 [<000da6f2b34f4978>] mpage_readahead+0x318/0x3f0 [<000da6f2b31edbe6>] read_pages+0x156/0x740 [<000da6f2b31ee594>] page_cache_ra_unbounded+0x3c4/0x610 [<000da6f2b31ef094>] force_page_cache_ra+0x1f4/0x2d0 [<000da6f2b31d092e>] filemap_get_pages+0x2ce/0xaa0 [<000da6f2b31d1428>] filemap_read+0x328/0x9a0 [<000da6f2b3e9b7e8>] blkdev_read_iter+0x228/0x3b0 [<000da6f2b340f7a6>] vfs_read+0x5b6/0x7f0 [<000da6f2b34110be>] ksys_read+0x10e/0x1e0 [<000da6f2b4e7acb2>] __do_syscall+0x122/0x1f0 [<000da6f2b4e93ffe>] system_call+0x6e/0x90 Last Breaking-Event-Address: [<000da6f2b338faac>] kasan_check_range+0x12c/0x310 Kernel panic - not syncing: Fatal exception: panic_on_oops Reviewed-by: Heiko Carstens Signed-off-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit 31026ed5b7c88973be997cd896045ab4d9f0c524 Merge: 3919600d32b92e 6cd87cb5ef6ca5 Author: Heiko Carstens Date: Sat May 17 10:50:27 2025 +0200 Merge branch 'prot-key-async' Harald Freudenberger says: ==================== This is a complete rework of the protected key AES (PAES) implementation. The goal of this rework is to implement the 4 modes (ecb, cbc, ctr, xts) in a real asynchronous fashion: - init(), exit() and setkey() are synchronous and don't allocate any memory. - the encrypt/decrypt functions first try to do the job in a synchronous manner. If this fails, for example the protected key got invalid caused by a guest suspend/resume or guest migration action, the encrypt/decrypt is transferred to an instance of the crypto engine (see below) for asynchronous processing. These postponed requests are then handled by the crypto engine by invoking the do_one_request() callback but may of course again run into a still not converted key or the key is getting invalid. If the key is still not converted, the first thread does the conversion and updates the key status in the transformation context. The conversion is invoked via pkey API with a new flag PKEY_XFLAG_NOMEMALLOC. Note that once there is an active requests enqueued to get async processed via crypto engine, further requests also need to go via crypto engine to keep the request sequence. This patch together with the pkey/zcrypt/AP extensions to support the new PKEY_XFLAG_NOMEMMALOC should toughen the paes crypto algorithms to truly meet the requirements for in-kernel skcipher implementations and the usage patterns for the dm-crypt and dm-integrity layers. The new flag PKEY_XFLAG_NOMEMALLOC tells the PKEY layer (and subsidiary layers) that it must not allocate any memory causing IO operations. Note that the patches for this pkey/zcrypt/AP extensions are currently in the features branch but may be seen in the master branch with the next merge. There is still some confusion about the way how paes treats the key within the transformation context. The tfm context may be shared by multiple requests running en/decryption with the same key. So the tfm context is supposed to be read-only. The s390 protected key support is in fact an encrypted key with the wrapping key sitting in the firmware. On each invocation of a protected key instruction the firmware unwraps the pkey and performs the operation. Part of the protected key is a hash about the wrapping key used - so the firmware is able to detect if a protected key matches to the wrapping key or not. If there is a mismatch the cpacf operation fails with cc 1 (key invalid). Such a situation can occur for example with a kvm live guest migration to another machine where the guest simple awakens in a new environment. As the wrapping key is NOT transfered, after the reawakening all protected key cpacf operations fail with "key invalid". There exist other situations where a protected key cpacf operation may run into "key invalid" and thus the code needs to be prepared for such cpacf failures. The recovery is simple: via pkey API the source key material (in real cases this is usually a secure key bound to a HSM) needs to generate a new protected key which is the wrapped by the wrapping key of the current firmware. So the paes tfms hold the source key material to be able to re-generate the protected key at any time. A naive implementation would hold the protected key in some kind of running context (for example the request context) and only the source key would be stored in the tfm context. But the derivation of the protected key from the source key is an expensive and time consuming process often involving interaction with a crypto card. And such a naive implementation would then for every tfm in use trigger the derivation process individual. So why not store the protected key in tfm context and only the very first process hitting the "invalid key" cc runs the derivation and updates the protected key stored in the tfm. The only really important thing is that the protected key update and cloning from this value needs to be done in a atomic fashion. Please note that there are still race conditions where the protected key stored in the tfm may get updated by an (outdated) protected key value. This is not an issue and the code handles this correctly by again re-deriving the protected key. The only fact that matters, is that the protected key must always be in a state where the cpacf instructions can figure out if it is valid (the hash part of the protected key matches to the hash of the wrapping key) or invalid (and refuse the crypto operation with "invalid key"). Changelog: v1 - first version. Applied and tested on top of the mentioned pkey/zcrypt/AP changes. Selftests and multithreaded testcases executed via AP_ALG interface run successful and even instrumented code (with some sleeps to force asynch pathes) ran fine. Code is good enough for a first code review and collecting feedback. v2 - A new patch which does a slight rework of the cpacf_pcc() inline function to return the condition code. A rework of the paes implementation based on feedback from Herbert and Ingo: - the spinlock is now consequently used to protect updates and changes on the protected key and protected key state within the transformation context. - setkey() is now synchronous - the walk is now held in the request context and thus the postponing of a request to the engine and later processing can continue at exactly the same state. - the param block needed for the cpacf instructions is constructed once and held in the request context. - if a request can't get handled synchronous, it is postponed for asynch processing via an instance of the crpyto engine. With v2 comes a patch which updates the crypto engine docu in Documentation/crypto. Feel free to use it or drop it or do some rework - at least it needs some review. v2 was only posted internal to collect some feedback within IBM. v3 - Slight improvements based on feedback from Finn. v4 - With feedback from Holger and Herbert Xu. Holger gave some good hints about better readability of the code and I picked nearly all his suggestions. Herbert noted that once a request goes via engine to keep the sequence as long as there are requests enqueued the following requests should also go via engine. This is now realized via a via_engine_ctr atomic counter in the tfm context. Stress tested with lots of debug code to run through all the failure paths of the code. Looks good. v5 - Fixed two typos and 1 too long line in the commit message found by Holger. Added Acked-by and Reviewed-by. Removed patch #3 which updates the crypto engine docu - this will go separate. All prepared for picking in the s390 subsystem. ==================== Link: https://lore.kernel.org/r/20250514090955.72370-1-freude@linux.ibm.com/ Signed-off-by: Heiko Carstens commit 6cd87cb5ef6ca50ae17c371482ceaab1d635e232 Author: Harald Freudenberger Date: Wed May 14 11:09:55 2025 +0200 s390/crypto: Rework protected key AES for true asynch support This is a complete rework of the protected key AES (PAES) implementation. The goal of this rework is to implement the 4 modes (ecb, cbc, ctr, xts) in a real asynchronous fashion: - init(), exit() and setkey() are synchronous and don't allocate any memory. - the encrypt/decrypt functions first try to do the job in a synchronous manner. If this fails, for example the protected key got invalid caused by a guest suspend/resume or guest migration action, the encrypt/decrypt is transferred to an instance of the crypto engine (see below) for asynchronous processing. These postponed requests are then handled by the crypto engine by invoking the do_one_request() callback but may of course again run into a still not converted key or the key is getting invalid. If the key is still not converted, the first thread does the conversion and updates the key status in the transformation context. The conversion is invoked via pkey API with a new flag PKEY_XFLAG_NOMEMALLOC. Note that once there is an active requests enqueued to get async processed via crypto engine, further requests also need to go via crypto engine to keep the request sequence. This patch together with the pkey/zcrypt/AP extensions to support the new PKEY_XFLAG_NOMEMMALOC should toughen the paes crypto algorithms to truly meet the requirements for in-kernel skcipher implementations and the usage patterns for the dm-crypt and dm-integrity layers. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Acked-by: Herbert Xu Link: https://lore.kernel.org/r/20250514090955.72370-3-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit e3bcd0f7a9b31ca5ac5825b6d808bf5226f4c706 Author: Harald Freudenberger Date: Wed May 14 11:09:54 2025 +0200 s390/cpacf: Rework cpacf_pcc() to return condition code Some of the pcc sub-functions have a protected key as input and thus may run into the situation that this key may be invalid for example due to live guest migration to another physical hardware. Rework the inline assembler function cpacf_pcc() to return the condition code (cc) as return value: 0 - cc code 0 (normal completion) 1 - cc code 1 (prot key wkvp mismatch or src op out of range) 2 - cc code 2 (something invalid, scalar multiply infinity, ...) Note that cc 3 (partial completion) is handled within the asm code and never returned. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250514090955.72370-2-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 09230b7554824c9db1712324efcf3595c67fd326 Author: Kirill A. Shutemov Date: Fri May 16 15:33:06 2025 +0300 x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only PARAVIRT_XXL is exclusively utilized by XEN_PV, which is only compatible with 64-bit machines. Clearly designate PARAVIRT_XXL as 64-bit only and remove ifdefs to support CONFIG_PGTABLE_LEVELS < 5. Signed-off-by: Kirill A. Shutemov Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250516123306.3812286-5-kirill.shutemov@linux.intel.com commit 7212b58d6d7133e4cd3c2295e1fb54febe284156 Author: Kirill A. Shutemov Date: Fri May 16 15:33:05 2025 +0300 x86/mm/64: Make 5-level paging support unconditional Both Intel and AMD CPUs support 5-level paging, which is expected to become more widely adopted in the future. All major x86 Linux distributions have the feature enabled. Remove CONFIG_X86_5LEVEL and related #ifdeffery for it to make it more readable. Suggested-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Signed-off-by: Ingo Molnar Reviewed-by: Ard Biesheuvel Reviewed-by: Borislav Petkov (AMD) Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250516123306.3812286-4-kirill.shutemov@linux.intel.com commit cba5d9b3e99d6268d7909a65c2bd78f4d195aead Author: Kirill A. Shutemov Date: Fri May 16 15:33:04 2025 +0300 x86/mm/64: Make SPARSEMEM_VMEMMAP the only memory model 5-level paging only supports SPARSEMEM_VMEMMAP. CONFIG_X86_5LEVEL is being phased out, making 5-level paging support mandatory. Make CONFIG_SPARSEMEM_VMEMMAP mandatory for x86-64 and eliminate any associated conditional statements. Signed-off-by: Kirill A. Shutemov Signed-off-by: Ingo Molnar Reviewed-by: Ard Biesheuvel Reviewed-by: Borislav Petkov (AMD) Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250516123306.3812286-3-kirill.shutemov@linux.intel.com commit 1bffe6f6890cb40a8d26aec1ffe5f95e2bd09ac2 Author: Kirill A. Shutemov Date: Fri May 16 15:33:03 2025 +0300 x86/mm/64: Always use dynamic memory layout Dynamic memory layout is used by KASLR and 5-level paging. CONFIG_X86_5LEVEL is going to be removed, making 5-level paging support unconditional which requires unconditional support of dynamic memory layout. Remove CONFIG_DYNAMIC_MEMORY_LAYOUT. Signed-off-by: Kirill A. Shutemov Signed-off-by: Ingo Molnar Reviewed-by: Ard Biesheuvel Reviewed-by: Borislav Petkov (AMD) Cc: Jan Kiszka Cc: Kieran Bingham Cc: H. Peter Anvin Cc: Dave Hansen Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250516123306.3812286-2-kirill.shutemov@linux.intel.com commit a0f3fe547eb35a2dc298a78da73da73304f41ce1 Author: Borislav Petkov (AMD) Date: Fri May 16 16:31:38 2025 +0200 x86/bugs: Fix indentation due to ITS merge No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar commit ca559503b89c30bc49178d0e4a1e0b23f991fb9f Author: Kan Liang Date: Fri May 16 11:28:38 2025 -0700 perf/core: Add the is_event_in_freq_mode() helper to simplify the code Add a helper to check if an event is in freq mode to improve readability. No functional changes. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250516182853.2610284-2-kan.liang@linux.intel.com commit 0d5c604be4cd08bd04075932bfb57da9aaf8820e Author: Vicki Pfau Date: Tue May 13 15:54:01 2025 -0700 Input: xpad - send LED and auth done packets to all Xbox One controllers This mirrors what SDL does, and is closer to Windows's behavior as-is. Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20250513225411.2718072-4-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 898170cc80f200b91ab6b89d8d5119bc7cbb84d8 Author: Pierre-Loup A. Griffais Date: Tue May 13 15:54:00 2025 -0700 Input: xpad - add the ByoWave Proteus controller Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20250513225411.2718072-3-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 036ec442510b04c8740ec6c2d9e995d25719535f Author: Vicki Pfau Date: Tue May 13 15:53:59 2025 -0700 Input: xpad - allow delaying init packets Some Xbox One controllers will only start processing the init packets after sending the GIP announce packet. While most controllers send this packet immediately, others will delay for some time, e.g. if a dongle needs to connect to an actual controller first. In those cases, we want to delay until we receive the announce packet before sending the init sequence. Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20250513225411.2718072-2-vi@endrift.com Signed-off-by: Dmitry Torokhov commit b8fa067c4a76e9a28f2003a50ff9b60f00b11168 Merge: 9e1f7a3119cd4c 3c6abbe85bccd8 Author: Jakub Kicinski Date: Fri May 16 18:01:34 2025 -0700 Merge branch 'vsock-test-improve-sigpipe-test-reliability' Stefano Garzarella says: ==================== vsock/test: improve sigpipe test reliability Running the tests continuously I noticed that sometimes the sigpipe test would fail due to a race between the control message of the test and the vsock transport messages. While I was at it I also improved the test by checking the errno we expect. v1: https://lore.kernel.org/20250508142005.135857-1-sgarzare@redhat.com ==================== Link: https://patch.msgid.link/20250514141927.159456-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 3c6abbe85bccd8efb5d9147a022b1d4012cb1809 Author: Stefano Garzarella Date: Wed May 14 16:19:27 2025 +0200 vsock/test: check also expected errno on sigpipe test In the sigpipe test, we expect send() to fail, but we do not check if send() fails with the errno we expect (EPIPE). Add this check and repeat the send() in case of EINTR as we do in other tests. Signed-off-by: Stefano Garzarella Link: https://patch.msgid.link/20250514141927.159456-4-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 135a8a4d25a2937b2727e3857471f305d78496da Author: Stefano Garzarella Date: Wed May 14 16:19:26 2025 +0200 vsock/test: retry send() to avoid occasional failure in sigpipe test When the other peer calls shutdown(SHUT_RD), there is a chance that the send() call could occur before the message carrying the close information arrives over the transport. In such cases, the send() might still succeed. To avoid this race, let's retry the send() call a few times, ensuring the test is more reliable. Sleep a little before trying again to avoid flooding the other peer and filling its receive buffer, causing false-negative. Signed-off-by: Stefano Garzarella Link: https://patch.msgid.link/20250514141927.159456-3-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit a7262ed4b163c411b450d74f2c7b34bde19ac78e Author: Stefano Garzarella Date: Wed May 14 16:19:25 2025 +0200 vsock/test: add timeout_usleep() to allow sleeping in timeout sections The timeout API uses signals, so we have documented not to use sleep(), but we can use nanosleep(2) since POSIX.1 explicitly specifies that it does not interact with signals. Let's provide timeout_usleep() for that. Signed-off-by: Stefano Garzarella Link: https://patch.msgid.link/20250514141927.159456-2-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 9e1f7a3119cd4c5678f226033a9b9fb98917700b Merge: 622b91e0f94600 d5d1813b28b9a0 Author: Jakub Kicinski Date: Fri May 16 16:32:08 2025 -0700 Merge branch 'tools-ynl-gen-support-sub-messages-and-rt-link' Jakub Kicinski says: ==================== tools: ynl-gen: support sub-messages and rt-link Sub-messages are how we express "polymorphism" in YNL. Donald added the support to specs and Python a while back, support them in C, too. Sub-message is a nest, but the interpretation of the attribute types within that nest depends on a value of another attribute. For example in rt-link the "kind" attribute contains the link type (veth, bonding, etc.) and based on that the right enum has to be applied to interpret link-specific attributes. The last message is probably the most interesting to look at, as it adds a fairly advanced sample. This patch only contains enough support for rtnetlink, we will need a little more complexity to support TC, where sub-messages may contain fixed headers, and where the selector may be in a different nest than the submessage. ==================== Link: https://patch.msgid.link/20250515231650.1325372-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d5d1813b28b9a02e4d014ea898ab5dfb32818d01 Author: Jakub Kicinski Date: Thu May 15 16:16:50 2025 -0700 tools: ynl: add a sample for rt-link Add a fairly complete example of rt-link usage. If run without any arguments it simply lists the interfaces and some of their attrs. If run with an arg it tries to create and delete a netkit device. 1 # ./tools/net/ynl/samples/rt-link 1 2 Trying to create a Netkit interface 3 Testing error message for policy being bad: 4 Kernel error: 'Provided default xmit policy not supported' (bad attribute: .linkinfo.data(netkit).policy) 5 1: lo: mtu 65536 6 2: wlp0s1: mtu 1500 7 3: enp0s13: mtu 1500 8 4: dummy0: mtu 1500 kind dummy altname one two 9 5: nk0: mtu 1500 kind netkit primary 0 policy forward 10 6: nk1: mtu 1500 kind netkit primary 1 policy blackhole 11 Trying to delete a Netkit interface (ifindex 6) Sample creates the device first, it sets an invalid value for a netkit attribute to trigger reverse parsing. Line 4 shows the error with the attribute path correctly generated by YNL. Then sample fixes the bad attribute and re-issues the request, with NLM_F_ECHO set. This flag causes the notification to be looped back to the initiating socket (our socket). Sample parses this notification to save the ifindex of the created netkit. Sample then proceeds to list the devices. Line 8 above shows a dummy device with two alt names. Lines 9 and 10 show the netkit devices the sample itself created. The "primary" and "policy" attrs are from inside the netkit submsg. The string values are auto-generated for the enums by YNL. To clean up sample deletes the interface it created (line 11). Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6bab77ced3ffbce3d6c5b5bcce17da7c8a3f8266 Author: Jakub Kicinski Date: Thu May 15 16:16:49 2025 -0700 tools: ynl: enable codegen for all rt- families Switch from including Classic netlink families one by one to excluding. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0939a418b3b092aa8a97a59752084896e4a7c813 Author: Jakub Kicinski Date: Thu May 15 16:16:48 2025 -0700 tools: ynl: submsg: reverse parse / error reporting Reverse parsing lets YNL convert bad and missing attr pointers from extack into a string like "missing attribute nest1.nest2.attr_name". It's a feature that's unique to YNL C AFAIU (even the Python YNL can't do nested reverse parsing). Add support for reverse-parsing of sub-messages. To simplify the logic and the code annotate the type policies with extra metadata. Mark the selectors and the messages with the information we need. We assume that key / selector always precedes the sub-message while parsing (and also if there are multiple sub-messages like in rt-link they are interleaved selector 1 ... submsg 1 ... selector 2 .. submsg 2, not selector 1 ... selector 2 ... submsg 1 ... submsg 2). The rt-link sample in a subsequent changes shows reverse parsing of sub-messages in action. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b9e03e263610a8d872c753bc882676d3cba1797b Author: Jakub Kicinski Date: Thu May 15 16:16:47 2025 -0700 tools: ynl-gen: submsg: support parsing and rendering sub-messages Adjust parsing and rendering appropriately to make sub-messages work. Rendering is pretty trivial, as the submsg -> netlink conversion looks like rendering a nest in which only one attr was set. Only trick is that we use the enum value of the sub-message rather than the nest as the type, and effectively skip one layer of nesting. A real double nested struct would look like this: [SELECTOR] [SUBMSG] [NEST] [MSG1-ATTR] A submsg "is" the nest so by skipping I mean: [SELECTOR] [SUBMSG] [MSG1-ATTR] There is no extra validation in YNL if caller has set the selector matching the submsg type (e.g. link type = "macvlan" but the nest attrs are set to carry "veth"). Let the kernel handle that. Parsing side is a little more specialized as we need to render and insert a new kind of function which switches between what to parse based on the selector. But code isn't too complicated. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6366d267788fd9dba20d6dff61e3e05d48ddb0b8 Author: Jakub Kicinski Date: Thu May 15 16:16:46 2025 -0700 tools: ynl-gen: submsg: render the structs The easiest (or perhaps only sane) way to support submessages in C is to treat them as if they were nests. Build fake attributes to that effect in the codegen. Render the submsg as a big nest of all possible values. With this in place the main missing part is to hook in the switch which selects how to parse based on the key. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 3186a8e55ae3428ec1e06af09075e20885376e4e Author: Jakub Kicinski Date: Thu May 15 16:16:45 2025 -0700 tools: ynl-gen: submsg: plumb thru an empty type Hook in handling of sub-messages, for now treat them as ignored attrs. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 99b76908a7a3df629a83555333ce0b97824e4734 Author: Jakub Kicinski Date: Thu May 15 16:16:44 2025 -0700 tools: ynl-gen: prepare for submsg structs Prepare for constructing Struct() instances which represent sub-messages rather than nested attributes. Restructure the code / indentation to more easily insert a case where nested reference comes from annotation other than the 'nested-attributes' property. Make sure we don't construct the Struct() object from scratch in multiple places as the constructor will soon have more arguments. This should cause no functional change. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c9c048993d4c0b8a188ae717ca4a1dadd02d29b5 Author: Jakub Kicinski Date: Thu May 15 16:16:43 2025 -0700 tools: ynl-gen: factor out the annotation of pure nested struct We're about to add some code here for sub-messages. Factor out the nest-related logic to make the code readable. No functional change. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit dc3f63bc3e33a485f8c7112f1520d597a588639c Author: Jakub Kicinski Date: Thu May 15 16:16:42 2025 -0700 netlink: specs: rt-link: add C naming info for ovpn C naming info for OVPN which was added since I adjusted the existing attrs. Also add missing reference to a header needed for a bridge struct. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250515231650.1325372-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 622b91e0f94600d1c797b7c82ec67a6e221e74ec Author: Oleksij Rempel Date: Thu May 15 10:20:51 2025 +0200 net: phy: microchip: document where the LAN88xx PHYs are used The driver uses the name LAN88xx for PHYs with phy_id = 0x0007c132. But with this placeholder name no documentation can be found on the net. Document the fact that these PHYs are build into the LAN7800 and LAN7850 USB/Ethernet controllers. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250515082051.2644450-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 7b151e4efdde7cc7cfaae66e497d12487a70c6e9 Author: Heiner Kallweit Date: Wed May 14 20:54:29 2025 +0200 net: phy: fixed_phy: remove fixed_phy_register_with_gpiod Since its introduction 6 yrs ago this functions has never had a user. So remove it. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/ccbeef28-65ae-4e28-b1db-816c44338dee@gmail.com Signed-off-by: Jakub Kicinski commit 9cd5ef0b8c04c46a15c8f5d002f02ea0d0477790 Author: Eric Dumazet Date: Thu May 15 10:03:54 2025 +0000 net: rfs: add sock_rps_delete_flow() helper RFS can exhibit lower performance for workloads using short-lived flows and a small set of 4-tuple. This is often the case for load-testers, using a pair of hosts, if the server has a single listener port. Typical use case : Server : tcp_crr -T128 -F1000 -6 -U -l30 -R 14250 Client : tcp_crr -T128 -F1000 -6 -U -l30 -c -H server | grep local_throughput This is because RFS global hash table contains stale information, when the same RSS key is recycled for another socket and another cpu. Make sure to undo the changes and go back to initial state when a flow is disconnected. Performance of the above test is increased by 22 %, going from 372604 transactions per second to 457773. Signed-off-by: Eric Dumazet Reported-by: Octavian Purdila Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250515100354.3339920-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit f24f7b2f3af9e008ded20f804d7829ee2efd43f2 Author: ChunHao Lin Date: Thu May 15 17:53:03 2025 +0800 r8169: add support for RTL8127A This adds support for 10Gbs chip RTL8127A. Signed-off-by: ChunHao Lin Reviewed-by: Heiner Kallweit Link: https://patch.msgid.link/20250515095303.3138-1-hau@realtek.com Signed-off-by: Jakub Kicinski commit 12889ce926e9a9baf6b83d809ba316af539b89e2 Author: Moon Yeounsu Date: Thu May 15 16:53:31 2025 +0900 net: dlink: add synchronization for stats update This patch synchronizes code that accesses from both user-space and IRQ contexts. The `get_stats()` function can be called from both context. `dev->stats.tx_errors` and `dev->stats.collisions` are also updated in the `tx_errors()` function. Therefore, these fields must also be protected by synchronized. There is no code that accessses `dev->stats.tx_errors` between the previous and updated lines, so the updating point can be moved. Signed-off-by: Moon Yeounsu Link: https://patch.msgid.link/20250515075333.48290-1-yyyynoom@gmail.com Signed-off-by: Jakub Kicinski commit b66b76a82c8879d764ab89adc21ee855ffd292d5 Author: Carolina Jubran Date: Wed May 14 23:03:52 2025 +0300 net/mlx5e: Reuse per-RQ XDP buffer to avoid stack zeroing overhead CONFIG_INIT_STACK_ALL_ZERO introduces a performance cost by zero-initializing all stack variables on function entry. The mlx5 XDP RX path previously allocated a struct mlx5e_xdp_buff on the stack per received CQE, resulting in measurable performance degradation under this config. This patch reuses a mlx5e_xdp_buff stored in the mlx5e_rq struct, avoiding per-CQE stack allocations and repeated zeroing. With this change, XDP_DROP and XDP_TX performance matches that of kernels built without CONFIG_INIT_STACK_ALL_ZERO. Performance was measured on a ConnectX-6Dx using a single RX channel (1 CPU at 100% usage) at ~50 Mpps. The baseline results were taken from net-next-6.15. Stack zeroing disabled: - XDP_DROP: * baseline: 31.47 Mpps * baseline + per-RQ allocation: 32.31 Mpps (+2.68%) - XDP_TX: * baseline: 12.41 Mpps * baseline + per-RQ allocation: 12.95 Mpps (+4.30%) Stack zeroing enabled: - XDP_DROP: * baseline: 24.32 Mpps * baseline + per-RQ allocation: 32.27 Mpps (+32.7%) - XDP_TX: * baseline: 11.80 Mpps * baseline + per-RQ allocation: 12.24 Mpps (+3.72%) Reported-by: Sebastiano Miano Reported-by: Samuel Dobron Link: https://lore.kernel.org/all/CAMENy5pb8ea+piKLg5q5yRTMZacQqYWAoVLE1FE9WhQPq92E0g@mail.gmail.com/ Signed-off-by: Carolina Jubran Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Acked-by: Jesper Dangaard Brouer Link: https://patch.msgid.link/1747253032-663457-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 15d7b3dfafa98270eade6c77d2336790dde0a40d Author: Frank Wunderlich Date: Sat May 10 19:49:32 2025 +0200 net: phy: mediatek: do not require syscon compatible for pio property Current implementation requires syscon compatible for pio property which is used for driving the switch leds on mt7988. Replace syscon_regmap_lookup_by_phandle with of_parse_phandle and device_node_to_regmap to get the regmap already assigned by pinctrl driver. Signed-off-by: Frank Wunderlich Link: https://patch.msgid.link/20250510174933.154589-1-linux@fw-web.de Signed-off-by: Jakub Kicinski commit 172e1570e1d31260f11f43e828d98aff020726a8 Author: Aloka Dixit Date: Tue Apr 8 11:45:01 2025 -0700 wifi: ath12k: pass link_conf for tx_arvif retrieval Three out of four callers to ath12k_mac_get_tx_arvif() have link_conf pointer already set for other operations. Pass it as a parameter. Modify ath12k_control_beaconing() to set link_conf first. Signed-off-by: Aloka Dixit Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408184501.3715887-4-aloka.dixit@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 892c83aa39cb4c1a4c63fbc51d6f6bd76bfa1ec9 Author: Sibi Sankar Date: Wed Oct 30 18:38:40 2024 +0530 arm64: dts: qcom: x1e80100: Enable cpufreq Enable cpufreq on X1E80100 SoCs through the SCMI perf protocol node. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20241030130840.2890904-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 06e3c7ec804524767f529404d023993fbca9ea43 Author: Sibi Sankar Date: Wed Oct 30 18:38:39 2024 +0530 arm64: dts: qcom: x1e80100: Add cpucp mailbox and sram nodes Add the cpucp mailbox and sram nodes required by SCMI perf protocol on X1E80100 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20241030130840.2890904-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 9c6ee9a760c52207eae64cb6b20cd1d93c3761ff Author: Johan Hovold Date: Fri Mar 28 09:41:54 2025 +0100 arm64: dts: qcom: x1e80100-hp-x14: drop bogus USB retimer Jens reported that the sanity checks added to the new ps883x USB retimer driver breaks USB and display on the HP X14. Turns out the X14 only has a retimer on one of the ports, but this initially went unnoticed due to the missing sanity check (and error handling) in the retimer driver. Drop the non-existing retimer from the devicetree to enable the second USB port and the display subsystem. Note that this also matches the ACPI tables. Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14") Cc: Jens Glathe Signed-off-by: Johan Hovold Tested-by: Jens Glathe Tested-by: Juerg Haefliger Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20250328084154.16759-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 5603525e40e3257ea507ff34f8acd5790fb8bc49 Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:33 2025 +0000 arm64: dts: qcom: x1e78100-t14s: Enable audio headset support On Lenovo ThinkPad T14s, the headset is connected via a HiFi mux to support CTIA and OMTP headsets. This switch is used to minimise pop and click during headset type switching. Enable the mux controls required to power this switch along with wiring up gpio that control the headset switching. Without this, headset audio will be very noisy and might see headset detection errors. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Tested-by: Christopher Obbard Reviewed-by: Johan Hovold Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20250327100633.11530-7-srinivas.kandagatla@linaro.org Signed-off-by: Bjorn Andersson commit 03026046589d9baca0d24348faa76c72899de48f Author: Johan Hovold Date: Thu Mar 27 09:14:27 2025 +0100 arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem Enable PCIe5 and the SDX62 modem present on some T14s. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250327081427.19693-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 4bcf9525bc49d2ee2fa17950a26c43a90ca006ba Author: Ramasamy Kaliappan Date: Thu Mar 27 10:43:20 2025 +0530 wifi: ath12k: update EMLSR capabilities of ML Station When EMLSR operation is enabled for an ML Station, EMLSR transition timeout, padding delay and transition delay should be updated to Firmware. Above parameters will be used by Firmware to do EMLSR operation such as sending EML operation mode notification frame, initial control frame etc. Obtain above parameters from EML capabilities information present in ieee80211_sta object and update the same to Firmware in peer assoc WMI command sent for ML station. MLO is not enabled in WCN7850 and hence this change is not applicable to it as of now. This can be a leverage once it is enabled in future. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250327051320.3253783-5-quic_ramess@quicinc.com Signed-off-by: Jeff Johnson commit 8cdf00b843ea3ca0e920176937bbc906b0b5bb04 Author: Chun-Tse Shao Date: Mon Mar 3 10:32:41 2025 -0800 perf record: Fix a asan runtime error in util/maps.c If I build perf with asan and run Zstd test: $ make -C tools/perf O=/tmp/perf DEBUG=1 EXTRA_CFLAGS="-O0 -g -fno-omit-frame-pointer -fsanitize=undefined" $ /tmp/perf/perf test "Zstd perf.data compression/decompression" -vv 83: Zstd perf.data compression/decompression: ... util/maps.c:1046:5: runtime error: null pointer passed as argument 2, which is declared to never be null ... The issue was caused by `bsearch`. The patch adds a check to ensure argument 2 and 3 are not NULL and 0. Testing with the commands above confirms that the runtime error is resolved. Reviewed-by: Ian Rogers Signed-off-by: Chun-Tse Shao Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ben Gainey Cc: Christophe Leroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Terrell Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250303183646.327510-2-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 208c0e16834472bb3a4b456a69dbdd1ad05eab49 Author: Chun-Tse Shao Date: Mon Mar 3 10:32:40 2025 -0800 perf record: Add 8-byte aligned event type PERF_RECORD_COMPRESSED2 The original PERF_RECORD_COMPRESS is not 8-byte aligned, which can cause asan runtime error: # Build with asan $ make -C tools/perf O=/tmp/perf DEBUG=1 EXTRA_CFLAGS="-O0 -g -fno-omit-frame-pointer -fsanitize=undefined" # Test success with many asan runtime errors: $ /tmp/perf/perf test "Zstd perf.data compression/decompression" -vv 83: Zstd perf.data compression/decompression: ... util/session.c:1959:13: runtime error: member access within misaligned address 0x7f69e3f99653 for type 'union perf_event', which requires 13 byte alignment 0x7f69e3f99653: note: pointer points here d0 3a 50 69 44 00 00 00 00 00 08 00 bb 07 00 00 00 00 00 00 44 00 00 00 00 00 00 00 ff 07 00 00 ^ util/session.c:2163:22: runtime error: member access within misaligned address 0x7f69e3f99653 for type 'union perf_event', which requires 8 byte alignment 0x7f69e3f99653: note: pointer points here d0 3a 50 69 44 00 00 00 00 00 08 00 bb 07 00 00 00 00 00 00 44 00 00 00 00 00 00 00 ff 07 00 00 ^ ... Since there is no way to align compressed data in zstd compression, this patch add a new event type `PERF_RECORD_COMPRESSED2`, which adds a field `data_size` to specify the actual compressed data size. The `header.size` contains the total record size, including the padding at the end to make it 8-byte aligned. Tested with `Zstd perf.data compression/decompression` Signed-off-by: Chun-Tse Shao Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ben Gainey Cc: Christophe Leroy Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Terrell Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250303183646.327510-1-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit eca641304134213f835cb7df65f873f415f197b6 Author: Paul Menzel Date: Sun May 11 19:46:47 2025 +0200 PM: freezer: Rewrite restarting tasks log to remove stray *done.* `pr_cont()` unfortunately does not work here, as other parts of the Linux kernel log between the two log lines: [18445.295056] r8152-cfgselector 4-1.1.3: USB disconnect, device number 5 [18445.295112] OOM killer enabled. [18445.295115] Restarting tasks ... [18445.295185] usb 3-1: USB disconnect, device number 2 [18445.295193] usb 3-1.1: USB disconnect, device number 3 [18445.296262] usb 3-1.5: USB disconnect, device number 4 [18445.297017] done. [18445.297029] random: crng reseeded on system resumption `pr_cont()` also uses the default log level, normally warning, if the corresponding log line is interrupted. Therefore, replace the `pr_cont()`, and explicitly log it as a separate line with log level info: Restarting tasks: Starting […] Restarting tasks: Done Signed-off-by: Paul Menzel Link: https://patch.msgid.link/20250511174648.950430-1-pmenzel@molgen.mpg.de [ rjw: Rebase on top of an earlier analogous change ] Signed-off-by: Rafael J. Wysocki commit 6a3d704959bd04ab37fc588aff70b3078f3c90e8 Author: Sean Christopherson Date: Mon Mar 31 11:27:03 2025 -0700 KVM: x86/mmu: Use kvm_x86_call() instead of manual static_call() Use KVM's preferred kvm_x86_call() wrapper to invoke static calls related to mirror page tables. No functional change intended. Fixes: 77ac7079e66d ("KVM: x86/tdp_mmu: Propagate building mirror page tables") Fixes: 94faba8999b9 ("KVM: x86/tdp_mmu: Propagate tearing down mirror page tables") Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20250331182703.725214-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 6cfb07e61b7ba503e71a287aee4482a1412b6571 Merge: 82f2b0b97b36ee e5174365c13246 Author: Rafael J. Wysocki Date: Fri May 16 22:07:53 2025 +0200 Merge tag 'linux-cpupower-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge cpupower utility update for 6.16 from Shuah Khan: "Adds systemd service to run cpupower and changes binding's makefile to use -lcpupower. cpupower: add a systemd service to run cpupower cpupower: do not write DESTDIR to cpupower.service cpupower: do not call systemctl at install time cpupower: do not install files to /etc/default/ cpupower: change binding's makefile to use -lcpupower" * tag 'linux-cpupower-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: do not install files to /etc/default/ cpupower: do not call systemctl at install time cpupower: do not write DESTDIR to cpupower.service cpupower: change binding's makefile to use -lcpupower cpupower: add a systemd service to run cpupower commit 40d3b40dce375d6f1c1dbf08d79eed3aed6c691d Author: Charan Teja Kalla Date: Thu May 15 12:11:25 2025 +0530 PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() pm_runtime_put_autosuspend() schedules a hrtimer to expire at "dev->power.timer_expires". If the hrtimer's callback, pm_suspend_timer_fn(), observes that the current time equals "dev->power.timer_expires", it unexpectedly bails out instead of proceeding with runtime suspend. pm_suspend_timer_fn(): if (expires > 0 && expires < ktime_get_mono_fast_ns()) { dev->power.timer_expires = 0; rpm_suspend(..) } Additionally, as ->timer_expires is not cleared, all the future auto suspend requests will not schedule hrtimer to perform auto suspend. rpm_suspend(): if ((rpmflags & RPM_AUTO) &&...) { if (!(dev->power.timer_expires && ...) { <-- this will fail. hrtimer_start_range_ns(&dev->power.suspend_timer,...); } } Fix this by as well checking if current time reaches the set expiration. Co-developed-by: Patrick Daly Signed-off-by: Patrick Daly Signed-off-by: Charan Teja Kalla Link: https://patch.msgid.link/20250515064125.1211561-1-quic_charante@quicinc.com Signed-off-by: Rafael J. Wysocki commit d166453ebd2925edde24872d9b8ac60065eb0618 Author: James Houghton Date: Thu May 8 18:46:48 2025 +0000 KVM: selftests: access_tracking_perf_test: Use MGLRU for access tracking Use MGLRU's debugfs interface to do access tracking instead of page_idle. The logic to use the page_idle bitmap is left in, as it is useful for kernels that do not have MGLRU built in. When MGLRU is enabled, page_idle will report pages as still idle even after being accessed, as MGLRU doesn't necessarily clear the Idle folio flag when accessing an idle page, so the test will not attempt to use page_idle if MGLRU is enabled but otherwise not usable. Aging pages with MGLRU is much faster than marking pages as idle with page_idle. Co-developed-by: Axel Rasmussen Signed-off-by: Axel Rasmussen Signed-off-by: James Houghton Link: https://lore.kernel.org/r/20250508184649.2576210-8-jthoughton@google.com [sean: print parsed features, not raw string] Signed-off-by: Sean Christopherson commit a5f95d3d02d92421edceb597f93c7348e54a5264 Author: Muna Sinada Date: Thu Apr 24 15:14:04 2025 -0700 wifi: ath12k: Prevent multicast duplication for dynamic VLAN Since dynamic VLAN traffic is software encrypted and encapsulated, mac80211 handles the duplication on each link for MLO dynamic VLAN multicast. Currently in ath12k_mac_op_tx(), all multicast frames are duplicated and are assigned a mcbc_gsn. This is causing dynamic VLAN multicast traffic to be dropped in hardware. Prevent dynamic VLAN multicast traffic from being duplicated again in the driver. Check if incoming packet is a dynamic VLAN packet and avoid defaulting to multicast conditional. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Muna Sinada Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250424221404.1262597-1-muna.sinada@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 55cbbf25fbde8ed713a55a29f399adda8540e135 Author: Thiraviyam Mariyappan Date: Tue Apr 22 15:12:55 2025 +0530 wifi: ath12k: Enable AST index based address search in Station Mode Currently, TCL performs the TX address search for each entry during transmission, which may lead to packet delays. To mitigate this issue, enable AST index-based address search during transmission in station mode. This AST index-based search is not enabled in AP mode due to the complexity involved in fetching peer information. Implement changes to retrieve the offset of ast_idx/ast_hash values from the PEER_MAP3 event, update the vdev search type to ADDRX, and enable AST lookup in the bank configuration. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250422094255.131226-1-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6c262794ad9dba9ad23224d002e1ba5451f71fa3 Author: Kang Yang Date: Mon Apr 21 10:34:44 2025 +0800 wifi: ath12k: enable monitor mode for WCN7850 Enable monitor mode for WCN7850. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-14-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 1cf514fdc7904e0a29d694487e0c36d3595e3717 Author: Kang Yang Date: Mon Apr 21 10:34:43 2025 +0800 wifi: ath12k: use different packet offset for WCN7850 In ath12k_dp_mon_rx_merg_msdus(), will set packet offset to 8. This is a right value for QCN9274. But WCN7850 use different hardware rings for monitor mode because it doesn't have RX MON component. So the packet offset is different. With current offset, upper-layer application will failed to parse the payload correctly. Should use different value for those who don't have RX MON component. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-13-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit f4dd79e9b5d3cae04e166186e7b325453cdbaf7e Author: Kang Yang Date: Mon Apr 21 10:34:42 2025 +0800 wifi: ath12k: init monitor parameters for WCN7850 Some monitor parameters are only initialized for QCN9274, but WCN7850 also needs them, so initialize them for WCN7850 as well. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-12-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 72bfbf19b7da6edc6db1d8ea81751ee6d31fe2f2 Author: Kang Yang Date: Mon Apr 21 10:34:41 2025 +0800 wifi: ath12k: add support to reap and process mon dest ring WCN7850 uses error dst ring as mon dest ring. Each time hardware receives a packet, will fill the payload into mon dest ring. The mon dest ring may store many MSDUs, which belonged to different MPDUs. Need to retrieve MSDUs based on the PPDU ID, only processing the MSDUs with same PPDU ID each time. The PPDU ID is used in cycles, the difference between the PPDU IDs of the two rings must be checked. If the status PPDU ID minus the dest PPDU ID is greater than 20000, it is considered a wrap-around case. After reaping the mon dest ring, should prepare packet and deliver it to mac80211 when status PPDU ID is equal to dest PPDU ID. Then start to process next PPDU if exists. But if dest PPDU ID > status PPDU ID, should hold on to mon dest ring processing. If it exceeds 16 consecutive times, status PPDU ID will be forcibly set to dest PPDU ID to avoid backpressure issue. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-11-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit ac885978a5ab49809784b3ad20b4cbf7f14c664a Author: Kang Yang Date: Mon Apr 21 10:34:40 2025 +0800 wifi: ath12k: use ath12k_buffer_addr in ath12k_dp_rx_link_desc_return() Currently, ath12k_dp_rx_link_desc_return() takes struct hal_reo_dest_ring as its second input. This struct is converted to struct hal_wbm_release_ring and passed into ath12k_hal_rx_msdu_link_desc_set(), where it is converted again. This double conversion is both strange and inefficient. In ath12k_hal_rx_msdu_link_desc_set(), only buf_addr_info is actually used. To simplify the code and improve readability, directly passes buf_addr_info when calling ath12k_dp_rx_link_desc_return(). Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-10-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit a69bbf89d751ba2d6da21d773c4e29c91c5e53c4 Author: Kang Yang Date: Mon Apr 21 10:34:39 2025 +0800 wifi: ath12k: fix macro definition HAL_RX_MSDU_PKT_LENGTH_GET Currently, HAL_RX_MSDU_PKT_LENGTH_GET uses u32_get_bits to obtain the MSDU length from the MSDU description. This is not right. Because all halphy descriptions are little endian. So use le32_get_bits for HAL_RX_MSDU_PKT_LENGTH_GET. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-9-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 78d3d907d0f1c7c0df866876e9e551cf22d5aafb Author: Kang Yang Date: Mon Apr 21 10:34:38 2025 +0800 wifi: ath12k: add support to reap and process monitor status ring WCN7850 uses monitor status ring to store status buffer. Status buffer contains many TLVs such as MPDU START/END. From these TLVs, can get necessary information about related payload, such as PPDU ID. Add helper function to reap status buffer from monitor status ring so that can parse TLVs later by ath12k_dp_mon_parse_rx_dest(). Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-8-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 5f15468f5fd3353dc012bcecfa0de2b9390db572 Author: Kang Yang Date: Mon Apr 21 10:34:37 2025 +0800 wifi: ath12k: add monitor mode handler by monitor status ring interrupt Monitor status ring interrupt is configured in previous patch. So add handler function __ath12k_dp_mon_process_ring() for monitor mode. Will implement detail processing in patch 7 and 10. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-7-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 18d26d156c22a914e9d461d0305a8448841b31fd Author: Kang Yang Date: Mon Apr 21 10:34:36 2025 +0800 wifi: ath12k: add interrupt configuration for mon status ring The monitor mode design is: 1. Hardware captures packets on the air. 2. Hardware stores the packets into related rings. 3. When the ring buffer reaches the interrupt threshold, it triggers the interrupt. 4. Reap and process the ring buffer in ath12k_dp_service_srng(). Here the interrupt thresholds are intr_timer_thres_us, low_threshold and intr_batch_cntr_thres_entries. An interrupt will be triggered once: 1. Number of packets in the ring reaches intr_batch_cntr_thres_entries. 2. Number of packets in the ring reaches low_threshold(by timer). 3. Timer reaches intr_timer_thres_us. So, add interrupt configuration for the mon status ring, then start to process ring buffers when the interrupt arrives. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-6-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 4cd8b48f5d88ca0006952de93583ff827cbdd33c Author: Kang Yang Date: Mon Apr 21 10:34:35 2025 +0800 wifi: ath12k: add ring config for monitor mode on WCN7850 For WCN7850, it doesn't have an RX MON component(RX MON dest ring and RX MON buffer ring). So it can only reuse the mon status ring, RX refill ring, and error dst ring for monitor mode. Every time the hardware captures a packet, it will store status information into the status ring and store the MSDU payload buffer address into the error dst ring. When host reaps the MSDU payload and consumes a buffer, it will replenish the RX refill ring to indicate a new buffer. The configuration of the error dst/RX ring already exists. But there is no configuration for mon status ring. So add ring configuration for it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-5-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit c703c6acd6672a3f7005d76ff53f8ab04ad6c90e Author: Kang Yang Date: Mon Apr 21 10:34:34 2025 +0800 wifi: ath12k: add srng config template for mon status ring Currently, the hw_srng_config_template does not have a template for mon status ring. But srng config template is necessary during ring initialization. So add a template for mon status ring. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-4-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 5887ffb18703cd64afcc2f6364a5db11ce2751c3 Author: Kang Yang Date: Mon Apr 21 10:34:33 2025 +0800 wifi: ath12k: avoid call ath12k_dp_mon_parse_rx_dest_tlv() for WCN7850 WCN7850 doesn't have RX MON component. So it's monitor mode design is quite different from AP based chips like QCN9274, which have RX MON component. ath12k_dp_mon_parse_rx_dest_tlv() is such a specific function for AP based chips. So don't call this function for WCN7850. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-3-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 07a273d1e6f4b1aa537a4028b5b0ee0022cc16ec Author: Kang Yang Date: Mon Apr 21 10:34:32 2025 +0800 wifi: ath12k: parse msdu_end tlv in ath12k_dp_mon_rx_parse_status_tlv() Currently, error bitmap and decap format are parsed in ath12k_dp_mon_parse_rx_dest_tlv(). Then stored into dp_rx_mon_mpdu_list. ath12k_dp_mon_parse_rx_dest_tlv() and dp_rx_mon_mpdu_list are only used by QCN9274. For WCN7850, error bitmap and decap format are also needed. So need to parse MSDU END TLV in ath12k_dp_mon_rx_parse_status_tlv(), this is the common function for WCN7850 and QCN9274. Then store error bitmap and decap format so that QCN9274 can fetch them when processing MSDU payload. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250421023444.1778-2-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 1ab2e9046b4f3b298274ad4cc08ff456d3e4274e Author: Lingbo Kong Date: Fri Apr 18 14:40:08 2025 +0800 wifi: ath12k: Abort scan before removing link interface to prevent duplicate deletion Currently, when ath12k performs the remove link interface operation, if there is an ongoing scan operation on the arvif, ath12k may execute the remove link interface operation multiple times on the same arvif. This occurs because, during the remove link operation, if a scan operation is present on the arvif, ath12k may receive a WMI_SCAN_EVENT_COMPLETED event from the firmware. Upon receiving this event, ath12k will continue to execute the ath12k_scan_vdev_clean_work() function, performing the remove link interface operation on the same arvif again. To address this issue, before executing the remove link interface operation, ath12k needs to check if there is an ongoing scan operation on the current arvif. If such an operation exists, it should be aborted. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Lingbo Kong Tested-by: Lorenzo Stoakes Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418064008.7172-1-quic_lingbok@quicinc.com Signed-off-by: Jeff Johnson commit 29cb3d26d01c275ea652010cc62f324793e34a31 Author: Baochen Qiang Date: Fri Apr 18 10:55:48 2025 +0800 wifi: ath12k: use WMI_VDEV_SET_TPC_POWER_CMDID when EXT_TPC_REG_SUPPORT for 6 GHz When station is connected to a 6 GHz AP, there are 2 ways to configure the power limit to firmware. The first way is to send 2 WMI commands WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G to firmware, the second way is to send WMI_VDEV_SET_TPC_POWER_CMDID to firmware which includes more parameters for power control. When firmware advertises WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, it supports WMI_VDEV_SET_TPC_POWER_CMDID, ath12k uses it to send more parameters to firmware. As chanctx is needed to extract necessary info for this command, save it beforehand in ath12k_mac_op_assign_vif_chanctx(). Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-15-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit 9a9e8ea7f6d31351039343e9e3b1927c61a2ccc3 Author: Baochen Qiang Date: Fri Apr 18 10:55:47 2025 +0800 wifi: ath12k: add handler for WMI_VDEV_SET_TPC_POWER_CMDID Add the handler for WMI_VDEV_SET_TPC_POWER_CMDID, it is for 6 GHz band. A subsequent patch will call this handler to send power parameters to firmware. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-14-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit aeda163bb0c7b9fc58bdd6ae90c0eef4f4050b7b Author: Baochen Qiang Date: Fri Apr 18 10:55:46 2025 +0800 wifi: ath12k: fill parameters for vdev set TPC power WMI command Prepare the parameters which are needed for WMI command WMI_VDEV_SET_TPC_POWER_CMDID. This helper will be used in a following patch. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-13-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit b0501a0ee772222e3a7fa5c94eb7c6b16fe20610 Author: Baochen Qiang Date: Fri Apr 18 10:55:45 2025 +0800 wifi: ath12k: save max transmit power in vdev start response event from firmware Save the max transmit power received in the vdev start response event from firmware. A subsequent patch will use this to calculate the final power Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-12-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit cccbb9d0dd6ab9e3353066217e9ab5b44bd761d3 Author: Baochen Qiang Date: Fri Apr 18 10:55:44 2025 +0800 wifi: ath12k: add parse of transmit power envelope element The Transmit Power Envelope element conveys the local maximum transmit power for various transmission bandwidths, this element is present in various frames, e.g. beacon and probe response etc, transmitted by AP. A station shall determine a local maximum transmit power from it. So parse and save them for later use. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-11-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit d6b11d0ddadb9e7addd0f582f31ae8e6c256ba9d Author: Baochen Qiang Date: Fri Apr 18 10:55:43 2025 +0800 wifi: ath12k: save power spectral density(PSD) of regulatory rule Currently the power spectral density (PSD) report from firmware is ignored. Since it is needed by cfg80211, report it in struct ieee80211_reg_rule such that cfg80211 can use it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-10-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit 7ed3e88664e328bb7cda5e71568b83426b3f3289 Author: Baochen Qiang Date: Fri Apr 18 10:55:42 2025 +0800 wifi: ath12k: update regulatory rules when connection established Once connection to AP established we know the exact power type, it is time to update regulatory rules based on such info. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-9-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit 4c546023d71a2b175ae7dd17b42efcd5a832a1ca Author: Baochen Qiang Date: Fri Apr 18 10:55:41 2025 +0800 wifi: ath12k: update regulatory rules when interface added There are two power types for 6 GHz regulatory, one is AP, another is client. The client power type is used for station interface, and AP power type is used for AP/mesh point interface. When firmware boots up, WMI_REG_CHAN_LIST_CC_EXT_EVENTID is sent from firmware at an early stage, the interface mode is not decided at this point, then ath12k select reg rules of AP type as default. After interface created, ath12k needs to update reg rules to the exact power type matching the interface type. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-8-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit ee2fc1f7347e8393b94d35a0d2b9d24920c9b24f Author: Baochen Qiang Date: Fri Apr 18 10:55:40 2025 +0800 wifi: ath12k: determine interface mode in _op_add_interface() Currently interface mode is determined each time a vdev is created. In MLO scenario where there could be multiple vdevs this is just a waste of time. Move related logic into a new helper ath12k_mac_determine_vdev_type() and call it once in ath12k_mac_op_add_interface(). Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-7-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit eaa027a1d83f87c83f0b4138ca2427875a21b446 Author: Baochen Qiang Date: Fri Apr 18 10:55:39 2025 +0800 wifi: ath12k: store reg info for later use Currently we only build regdomain when channel list event is received. That event is received when driver boots or when a new country code is sent to firmware. At either time we may have no information about interface mode or AP's power type, consequently WMI_REG_INDOOR_AP is selected. In upcoming patches we will rebuild regdomain once those information is available. For that purpose reg info has to be stored/refreshed each time a new channel list event is received. The stored reg info would be freed in ath12k_reg_free() when it is not needed. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-6-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit 75639b743515537b6ee56bb89c857aaf8726713a Author: Baochen Qiang Date: Fri Apr 18 10:55:38 2025 +0800 wifi: ath12k: move reg info handling outside The reg info is allocated in ath12k_reg_chan_list_event() but validated in ath12k_reg_handle_chan_list(). Currently this is good since reg info would be freed regardless of validation results. However in an upcoming patch the reg info might need to be stored for later use if the result is good. Since we can not tell the result from return value of ath12k_reg_handle_chan_list(), we need to move validation out of it. Add a new helper ath12k_reg_validate_reg_info() and call it in ath12k_reg_chan_list_event(), based on the result we can choose to store or free it in the following patch. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-5-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit fafa6ff0823b79bfe4d1950e7bd51bb1c6dd49cf Author: Baochen Qiang Date: Fri Apr 18 10:55:37 2025 +0800 wifi: ath12k: add support to select 6 GHz regulatory type For 6 GHz band, firmware offers 3 types of regulatory rules for AP mode and 6 for station mode in WMI_REG_CHAN_LIST_CC_EXT_EVENTID event. In ath12k_reg_build_regd() current code by default chooses WMI_REG_INDOOR_AP type rules from AP mode reg list to build regdomain, regardless of the interface mode and power type, hence is not correct. Pass interface mode (wmi_vdev_type) and AP power type (ieee80211_ap_reg_power) as new arguments to ath12k_reg_build_regd() such that we can choose correct rules based on them. Currently ath12k_reg_build_regd() is called only by ath12k_reg_chan_list_event() when driver boots, at that time these two arguments are not determined yet, hence by default pass WMI_VDEV_TYPE_UNSPEC and IEEE80211_REG_UNSET_AP, this results in WMI_REG_INDOOR_AP being chosen at last. In upcoming patches the rules would be updated when these two arguments could be determined. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-4-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit c96bce15c568fdb8edd29b35aeb0f20c2524108c Author: Baochen Qiang Date: Fri Apr 18 10:55:36 2025 +0800 wifi: ath12k: refactor ath12k_reg_build_regd() Currently we pass intersect flag to tell ath12k_reg_build_regd() whether regulatory rulse are intersected. This flag is determined in ath12k_reg_handle_chan_list() and has no other users. Move related logic into ath12k_reg_build_regd() to make code clear. Also relocate ath12k_reg_is_world_alpha() to avoid forward declaration, and refine it for code simplicity. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-3-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit 9e8e55c5832d4f905d7ca306f976669d523e9ff2 Author: Baochen Qiang Date: Fri Apr 18 10:55:35 2025 +0800 wifi: ath12k: refactor ath12k_reg_chan_list_event() ath12k_reg_chan_list_event() is doing quite some work: allocate/free reg_info, parse chan list event and store required info in reg_info, process reg_info, build regd and queue work item for later processing etc, which makes it hard to read. Refactor this function: 1. extract reg_info processing and regd building into a new helper ath12k_reg_handle_chan_list(). 2. extract reg_info free into a new helper ath12k_reg_reset_reg_info(). Note the refactor also benefit some upcoming patches where these helpers are getting called. Also relocate these two helpers and the existing ath12k_reg_is_world_alpha() to reg.c to reflect what they are doing. And update fw to firmware while relocating. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-2-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit ef115c265a21e3c11deee7f73bd1061775a7bf20 Author: Baochen Qiang Date: Fri Apr 18 10:55:34 2025 +0800 wifi: ath12k: fix a possible dead lock caused by ab->base_lock spin_lock/spin_unlock are used in ath12k_reg_chan_list_event to acquire/release ab->base_lock. For now this is safe because that function is only called in soft IRQ context. But ath12k_reg_chan_list_event() will be called from process context in an upcoming patch, and this can result in a deadlock if ab->base_lock is acquired in process context and then soft IRQ occurs on the same CPU and tries to acquire that lock. Fix it by using spin_lock_bh and spin_unlock_bh instead. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-1-c869c86cad60@quicinc.com Signed-off-by: Jeff Johnson commit d1b4ccc24ea66552dd718d2fb2f305ea9ecf8363 Author: Kang Yang Date: Wed Apr 16 10:20:11 2025 +0800 wifi: ath12k: delete mon reap timer Currently mon reap timer is not used, and it is not needed anymore for WCN7850. So remove related code. This change does not affect QCN9274, as the mon reap timer is not used for QCN9274. Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250416022011.1935-1-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 7971bda2fe57cd86ba8e1588366c1633cbd007c3 Author: Dinesh Karthikeyan Date: Thu Apr 17 12:22:37 2025 +0530 wifi: ath12k: Add support to simulate firmware crash Add debugfs support to simulate firmware crash to test firmware restart. Usage: ----- echo assert > /sys/kernel/debug/ath12k/pci-0000\:58\:00.0/simulate_fw_crash Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan Signed-off-by: Ramya Gnanasekar Signed-off-by: Maharaja Kennadyrajan Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250417065237.2507613-1-maharaja.kennadyrajan@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 944242787695ec86ff00d925391d5b54902c546a Author: Marc Zyngier Date: Tue May 13 18:28:19 2025 +0100 PCI: tegra: Convert to MSI parent infrastructure In an effort to move ARM64 away from the legacy MSI setup, convert the Tegra PCIe driver to the MSI-parent infrastructure and let each device have its own MSI domain. [ tglx: Moved the struct out of the function call argument ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-10-maz@kernel.org commit ae79351ef280805e0881fd2011b74ed008a4e151 Author: Marc Zyngier Date: Tue May 13 18:28:18 2025 +0100 PCI: xgene: Convert to MSI parent infrastructure In an effort to move ARM64 away from the legacy MSI setup, convert the XGENE PCIe driver to the MSI-parent infrastructure and let each device have its own MSI domain. [ tglx: Moved the struct out of the function call argument ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-9-maz@kernel.org commit 5d627a9484ec447348f7c485359b1baf6d120f0f Author: Marc Zyngier Date: Tue May 13 18:28:17 2025 +0100 PCI: apple: Convert to MSI parent infrastructure In an effort to move ARM64 away from the legacy MSI setup, convert the Apple PCIe driver to the MSI-parent infrastructure and let each device have its own MSI domain. [ tglx: Moved the struct out of the function call argument ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Acked-by: Alyssa Rosenzweig Link: https://lore.kernel.org/all/20250513172819.2216709-8-maz@kernel.org commit 06526443a34c06879664eb5ae247c5e93dde7ed9 Author: Marc Zyngier Date: Tue May 13 18:28:16 2025 +0100 irqchip/msi-lib: Honour the MSI_FLAG_NO_AFFINITY flag Bad MSI implementations multiplex MSIs onto a single downstream interrupt, meaning they have no concept of individual affinity. The old MSI code did a reasonable job at this by honouring the MSI_FLAG_NO_AFFINITY, but the new shiny device MSI code doesn't. Teach it about the sad reality of existing hardware. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-7-maz@kernel.org commit b35961ce0a979fa9c2b0d30a346d3a74ef670aa6 Author: Marc Zyngier Date: Tue May 13 18:28:14 2025 +0100 irqchip/mvebu: Convert to msi_create_parent_irq_domain() helper Switch the MVEBU family of interrupt chip drivers over to the common helper function to create the interrupt domains. [ tglx: Moved the struct out of the function call argument and fix up the of_node_to_fwnode() instances ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-5-maz@kernel.org commit c6b77822347afc17623120dbc4d10c6658304622 Author: Marc Zyngier Date: Tue May 13 18:28:13 2025 +0100 irqchip/gic: Convert to msi_create_parent_irq_domain() helper Switch the GIC family of interrupt chip drivers over to the common helper function to create the interrupt domains. [ tglx: Moved the struct out of the function call argument ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-4-maz@kernel.org commit e4d001b54f78769ba1a1404c2801ae95e19fd893 Author: Marc Zyngier Date: Tue May 13 18:28:12 2025 +0100 genirq/msi: Add helper for creating MSI-parent irq domains Creating an irq domain that serves as an MSI parent requires a substantial amount of esoteric boiler-plate code, some of which is often provided twice (such as the bus token). To make things a bit simpler for the unsuspecting MSI tinkerer, provide a helper that does it for them, and serves as documentation of what needs to be provided. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-3-maz@kernel.org commit e51b27438a10391fdc94dd2046d9ffa9c2679c74 Author: Marc Zyngier Date: Tue May 13 18:28:11 2025 +0100 irqchip: Make irq-msi-lib.h globally available Move irq-msi-lib.h into include/linux/irqchip, making it available to compilation units outside of drivers/irqchip. This requires some churn in drivers to fetch it from the new location, generated using this script: git grep -l -w \"irq-msi-lib.h\" | \ xargs sed -i -e 's:"irq-msi-lib.h":\:' Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-2-maz@kernel.org commit 6a08164de9fce377fe2144ba3f9302ffdffe29af Merge: 7dd20bf2f01043 fdc348121f2465 Author: Thomas Gleixner Date: Fri May 16 21:09:51 2025 +0200 Merge irq/cleanup fragments into irq/msi Pick up the PCI changes to avoid conflicts. commit 38c1e73fdeb37962324a3265ef95618dfa4552ab Author: Thomas Gleixner Date: Tue May 6 14:22:59 2025 +0200 irqdomain: Consolidate coding style Now that the file has been thrown through the mincer, finish the job and consolidate the coding style. Signed-off-by: Thomas Gleixner commit a10024e671d12c8125a8f31d08c67245f6dee16d Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:50 2025 +0100 irqdomain: Fix kernel-doc and add it to Documentation irqdomain.c's kernel-doc exists, but is not plugged into Documentation/ yet. Before plugging it in, fix it first: irq_domain_get_irq_data() and irq_domain_set_info() were documented twice. Identically, by both definitions for CONFIG_IRQ_DOMAIN_HIERARCHY and !CONFIG_IRQ_DOMAIN_HIERARCHY. Therefore, switch the second kernel-doc into an ordinary comment -- change "/**" to simple "/*". This avoids sphinx's: WARNING: Duplicate C declaration Next, in commit b7b377332b96 ("irqdomain: Fix the kernel-doc and plug it into Documentation"), irqdomain.h's (header) kernel-doc was added into core-api/genericirq.rst. But given the amount of irqdomain functions and structures, move all these to core-api/irq/irq-domain.rst now. Finally, add these newly fixed irqdomain.c's (source) docs there as well. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-58-jirislaby@kernel.org commit a4efe303e50e3222591ab6ec5eb0ea92b7260d96 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:49 2025 +0100 Documentation: irqdomain: Update it The irqdomain documentaion became obsolete over time. Update and extend it a bit with respect to the current code and HW. Most notably the doubled documentation of irq_domain (from .rst and .h) was unified and let only in .rst. A reference link was added to .h. Furthermore: * Add some 'struct' keywords, so that the respective structs are hyperlinked * :c:member: use where appropriate to mark a member of a struct * Rephrase some wording to improve readability/understanding Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-57-jirislaby@kernel.org commit 95cfac1b2f85ed883b1748d7955e00f0980c1bb3 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:48 2025 +0100 Documentation: irq-domain.rst: Simple improvements The improvements include: * Capitals in headlines. * Add commas: for easier reading, it is always desired to add commas at some places in text. Like before adverbs or after fronted sentences. * 3rd person -> add 's' to verbs. * End some sentences with period and start a new one. Avoid thus heavy sentences. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-56-jirislaby@kernel.org commit 225942f06e93dc4c24ce50df92e0eb5bcd2afbac Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:47 2025 +0100 Documentation: irq/concepts: Minor improvements Just note in the docs: 1) A PCI device as an example for shared interrupts 2) A sparse tree can be used for interrupts too 3) i8259s which have 8 pins [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-55-jirislaby@kernel.org commit 2f7bd3293e4512323fd5334ef13cf2826de27666 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:46 2025 +0100 Documentation: irq/concepts: Add commas and reflow For easier reading, it is always desired to add commas at some places in text. Like before adverbs or after fronted sentences. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-54-jirislaby@kernel.org commit 2272a78b3f4a7a1621f00ac6e9c9232d12b7ff01 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:45 2025 +0100 irqdomain: Improve kernel-docs of functions Many of irqdomain.h's functions are referenced in Documentation/ but are not properly documented. Therefore, document these. And use "Returns:" tag consistently, so that it is properly generated in the resulting docs. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-53-jirislaby@kernel.org commit 66cbf17fe67156608421e717975c415a85c08466 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:44 2025 +0100 irqdomain: Make struct irq_domain_info variables const This is just expressing it explicitly as irq_domain_instantiate() takes const already. No functional change. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-52-jirislaby@kernel.org commit 18e743e911020eb74cc4eaf549c18ed12a5acb9a Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:43 2025 +0100 irqdomain: Use irq_domain_instantiate()'s return value as initializers This makes the code more compact. Note that irq_domain_create_hierarchy()'s handling of size is now part of info's initializer (using the ternary operator). That makes more sense while reading it. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-51-jirislaby@kernel.org commit 14ebb11ba895c9223d9a453a17df2fd81410c96c Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:42 2025 +0100 irqdomain: Drop irq_linear_revmap() irq_linear_revmap() is deprecated and unused now. So remove it. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-50-jirislaby@kernel.org commit 609f900ad6093af6f97a313c4bacf4ca3757db4a Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:40 2025 +0100 pinctrl: keembay: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250319092951.37667-48-jirislaby@kernel.org commit 31b3ad400245b5ddf8081394330ba460f8b431e7 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:39 2025 +0100 irqchip/armada-370-xp: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-47-jirislaby@kernel.org commit e68664c08e3980f394d0bf22c64ce3cd2a3929e2 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:37 2025 +0100 gpu: ipu-v3: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-45-jirislaby@kernel.org commit 30b6692ceda0dae971e9471479285b6b2b914aee Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:36 2025 +0100 gpio: idt3243x: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250319092951.37667-44-jirislaby@kernel.org commit f569ac9cabfd983d3d3904dbc9d7dbbf13368f4b Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:35 2025 +0100 sh: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-43-jirislaby@kernel.org commit 8035d9f2665e2de138007e2341d8b6d0e46c5606 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:34 2025 +0100 powerpc: Switch to irq_find_mapping() irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Acked-by: Christophe Leroy # for 8xx Link: https://lore.kernel.org/all/20250319092951.37667-42-jirislaby@kernel.org commit 42b8b16fe56c206fde7fbae0116769d0addef4b7 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:33 2025 +0100 irqdomain: Drop irq_domain_add_*() functions Most irq_domain_add_*() functions are unused now, so drop them. The remaining ones are moved to the deprecated section and will be removed during the merge window after the patches in various trees have been merged. Note: The Chinese docs are touched but unfinished. I cannot parse those. [ tglx: Remove the leftover in irq-domain.rst and handle merge logistics ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-41-jirislaby@kernel.org commit 813da4f379e789c428d2e0a44730f852e090d47d Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:32 2025 +0100 powerpc: Switch irq_domain_add_nomap() to use fwnode All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement. Therefore, to align with the rest of the kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept a fwnode_handle instead of a device_node. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-40-jirislaby@kernel.org commit 29dea335e3553ca285fc76177a7bbf942c6767a4 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:31 2025 +0100 thermal: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fixed up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-39-jirislaby@kernel.org commit 6e4e30d70a91c04ccd563b3127486a736ddf0f3c Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:27 2025 +0100 soc: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Acked-by: Christophe Leroy # For soc/fsl Link: https://lore.kernel.org/all/20250319092951.37667-35-jirislaby@kernel.org commit b625f934ba1c4c7feb026a484564b1f922f254c2 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:26 2025 +0100 sh: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-34-jirislaby@kernel.org commit bf9935e479399b6f261e0f592e85d17a5486192f Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:25 2025 +0100 powerpc: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Christophe Leroy # For 8xx Link: https://lore.kernel.org/all/20250319092951.37667-33-jirislaby@kernel.org commit 219182fe2190ddaf6288bf24dd9a43d2c96316d2 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:23 2025 +0100 pinctrl: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250319092951.37667-31-jirislaby@kernel.org commit 4b5e1d97154df4e0e2dabfc3e6bef68b87265a55 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:22 2025 +0100 PCI: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix and convert the new instance in dwc/pcie-amd-mdb.c ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-30-jirislaby@kernel.org commit e9bf22564413c489275a01f184e90cc457669881 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:21 2025 +0100 nios2: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-29-jirislaby@kernel.org commit e0c27a82c27f7aef5db530da98f390b73d71b1e8 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:20 2025 +0100 net: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-28-jirislaby@kernel.org commit d8566886f2387cdb3562c4b69f91d0f0eec672c0 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:19 2025 +0100 misc: hi6421-spmi-pmic: Switch to irq_domain_create_simple() irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-27-jirislaby@kernel.org commit 0810f121e029e55a7846dfa5c6b106eabb0927fa Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:18 2025 +0100 MIPS: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-26-jirislaby@kernel.org commit a36aa0f7226a25c8789c63347d97620dd47ab6e1 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:17 2025 +0100 mfd: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-25-jirislaby@kernel.org commit 8529e33bfe98f613dbb6f8e9ad6b94b501b36c98 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:16 2025 +0100 memory: omap-gpmc: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-24-jirislaby@kernel.org commit b9a7f080e72bb44fe04a4e877077213c854b914a Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:15 2025 +0100 mailbox: qcom-ipcc: Switch to irq_domain_create_tree() irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-23-jirislaby@kernel.org commit affdc0d1bdfa544fed26ae07c4e136af86465507 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:14 2025 +0100 irqchip: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Acked-by: Changhuang Liang Link: https://lore.kernel.org/all/20250319092951.37667-22-jirislaby@kernel.org commit 7f68126a8766773a403ff754bd2cbce0df2306f6 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:13 2025 +0100 iio: Switch to irq_domain_create_simple() irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-21-jirislaby@kernel.org commit 3fd83ff1d9232efb0953b720086e6a9e02ecb166 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:12 2025 +0100 i2c: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-20-jirislaby@kernel.org commit 493e1092676257b81be4c013405f1271497a0ed1 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:11 2025 +0100 gpu: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-19-jirislaby@kernel.org commit 9cf19f061ccc98b63367b16551c290016b7d6b13 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:10 2025 +0100 gpio: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-18-jirislaby@kernel.org commit 6be00e43351e61ff9985d7a6fbd0c61414a26b57 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:09 2025 +0100 EDAC/altera: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-17-jirislaby@kernel.org commit 13c984392b28651e9665cc0b05375fa37895bacb Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:08 2025 +0100 bus: moxtet: Switch to irq_domain_create_simple() irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-16-jirislaby@kernel.org commit 4dcb0045a363b9d32472f527bd06a6816e6a4275 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:07 2025 +0100 ARM: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-15-jirislaby@kernel.org commit 80f2405bf204c6dd5ccfad8a96ebebe818f01214 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:06 2025 +0100 ARC: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-14-jirislaby@kernel.org commit c7131b12080ad9c74eadd4f62386c8642168bec7 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:05 2025 +0100 irqdomain: Make irq_domain_create_hierarchy() an inline There is no reason to export the function as an extra symbol. It is simple enough and is just a wrapper to already exported functions. Therefore, switch the exported function to an inline. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-13-jirislaby@kernel.org commit e847a847aea5728dfcd13b558b9d82b79f9a85c7 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:04 2025 +0100 irqdomain: Drop of_node_to_fwnode() All uses of of_node_to_fwnode() in non-irqdomain code were changed to "officially" defined of_fwnode_handle(). Therefore, the former can be dropped along with the last uses in the irqdomain code. Due to merge logistics the inline cannot be dropped immediately. Move it to a deprecated section, which will be removed during the merge window. [ tglx: Handle merge logistics ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-12-jirislaby@kernel.org commit b712918091c9c712a77f1c85c29e5bb750e9e281 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:03 2025 +0100 x86/io_apic: Switch to of_fwnode_handle() of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-11-jirislaby@kernel.org commit f09831892c801b3875a247dc631fcbc2e704ca1f Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:01 2025 +0100 powerpc: Switch to of_fwnode_handle() of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-9-jirislaby@kernel.org commit 87228532e7e96871b4def877002562bfa285e6c7 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:28:59 2025 +0100 irqchip: Switch to of_fwnode_handle() of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Reviewed-by: Antonio Borneo Reviewed-by: Herve Codina Reviewed-by: Anup Patel Acked-by: Herve Codina # irq-lan966x-oic Link: https://lore.kernel.org/all/20250319092951.37667-7-jirislaby@kernel.org commit b11fcb51e2b278739509637bb0705c20f9cb138a Author: James Houghton Date: Thu May 8 18:46:47 2025 +0000 KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests libcgroup.o is built separately from KVM selftests and cgroup selftests, so different compiler flags used by the different selftests will not conflict with each other. Signed-off-by: James Houghton Link: https://lore.kernel.org/r/20250508184649.2576210-7-jthoughton@google.com Signed-off-by: Sean Christopherson commit 38e1dd578142bd3ed4f43e3657562c1e6af597e7 Author: Sean Christopherson Date: Thu May 8 18:46:46 2025 +0000 cgroup: selftests: Add API to find root of specific controller Add an API in the cgroups library to find the root of a specific controller. KVM selftests will use the API to find the memory controller. Search for the controller on both v1 and v2 mounts, as KVM selftests' usage will be completely oblivious of v1 versus v2. Signed-off-by: James Houghton Link: https://lore.kernel.org/r/20250508184649.2576210-6-jthoughton@google.com Signed-off-by: Sean Christopherson commit 2c754a84ff16ae835cea470c4146fabe94fa129f Author: James Houghton Date: Thu May 8 18:46:45 2025 +0000 cgroup: selftests: Move cgroup_util into its own library KVM selftests will soon need to use some of the cgroup creation and deletion functionality from cgroup_util. Suggested-by: David Matlack Signed-off-by: James Houghton Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20250508184649.2576210-5-jthoughton@google.com Signed-off-by: Sean Christopherson commit 3a7f9e518c6a83d54c84c101e23ffc8aa12df139 Author: Sean Christopherson Date: Thu May 8 18:46:44 2025 +0000 cgroup: selftests: Move memcontrol specific helpers out of common cgroup_util.c Move a handful of helpers out of cgroup_util.c and into test_memcontrol.c that have nothing to with cgroups in general, in anticipation of making cgroup_util.c a generic library that can be used by other selftests. Make read_text() and write_text() non-static so test_memcontrol.c can use them. Signed-off-by: James Houghton Acked-by: Michal Koutný Link: https://lore.kernel.org/r/20250508184649.2576210-4-jthoughton@google.com Signed-off-by: Sean Christopherson commit 26dcdfa01c33b4b52fd8bd3798dc221a9de7529c Author: Maxim Levitsky Date: Thu May 8 18:46:43 2025 +0000 KVM: selftests: access_tracking_perf_test: Add option to skip the sanity check Add an option to skip sanity check of number of still idle pages, and set it by default to skip, in case hypervisor or NUMA balancing is detected. Signed-off-by: Maxim Levitsky Co-developed-by: James Houghton Signed-off-by: James Houghton Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20250508184649.2576210-3-jthoughton@google.com Signed-off-by: Sean Christopherson commit d612a07931e261c537978aad096e7340b687cd0c Author: Arnd Bergmann Date: Wed Apr 23 18:43:49 2025 +0200 ext4: avoid -Wformat-security warning check_igot_inode() prints a variable string, which causes a harmless warning with 'make W=1': fs/ext4/inode.c:4763:45: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] 4763 | ext4_error_inode(inode, function, line, 0, err_str); Use a trivial "%s" format string instead. Signed-off-by: Arnd Bergmann Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250423164354.2780635-1-arnd@kernel.org Signed-off-by: Theodore Ts'o commit 5288b9e28f8a6f464746ddabcf9bf49d1323acfc Author: Pavel Begunkov Date: Wed May 14 09:07:20 2025 +0100 io_uring: open code io_req_cqe_overflow() A preparation patch, just open code io_req_cqe_overflow(). Signed-off-by: Pavel Begunkov Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 16256648cd0877aed9ede41d5d4ad3c1d65d9b2b Author: Jens Axboe Date: Fri May 16 12:33:28 2025 -0600 io_uring/fdinfo: get rid of dumping credentials It's a faily obscure feature, and registered credentials would for that mostly be a static thing. Don't bother including code to dump the personalities indices. Signed-off-by: Jens Axboe commit 9a109266278f200ae0b64508273fea3db8af7a9e Author: Jens Axboe Date: Fri May 16 12:10:12 2025 -0600 io_uring/fdinfo: only compile if CONFIG_PROC_FS is set Rather than wrap fdinfo.c in one big if, handle it on the Makefile side instead. io_uring.c already conditionally sets fops->fdinfo() anyway. Signed-off-by: Jens Axboe commit 6fe9b60f3504c7047451c5b8df14308dad440ff1 Author: Yu Zhang(Yuriy) Date: Wed Nov 27 10:27:42 2024 +0800 wifi: ath11k: support DBS and DFS compatibility Now some chips which support 'support_dual_stations' will enable DBS, but will disable DFS. Restructure the ath11k_mac_setup_iface_combinations function to support DBS and DFS compatibility. About 'support_dual_station' feature can refer: https://msgid.link/20230714023801.2621802-2-quic_cjhuang@quicinc.com Add a ieee80211_iface_combination to support DBS and DFS compatibility, one combination can support DFS(same with non dual sta), another combination can support DBS. When running different scenarios that will use different ieee80211_iface_combination due to mac80211 will go through all of possible interface combinations. In addition, maximum number of interfaces of these types should be total allowed in this group. The chips affected are: QCA6390 hw2.0 WCN6855 hw2.0 WCN6855 hw2.1 Other chips are not affected. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-00410-QCAHKSWPL_SILICONZ-2 Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1 Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-04402-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-05266-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Yu Zhang (Yuriy) Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Acked-by: Jeff Johnson Tested-by: Mihai Moldovan Link: https://patch.msgid.link/20241127022742.4016870-1-quic_yuzha@quicinc.com Signed-off-by: Jeff Johnson commit ab52e3e44fe9b666281752e2481d11e25b0e3fdd Author: Johan Hovold Date: Fri Mar 21 15:53:02 2025 +0100 wifi: ath11k: fix rx completion meta data corruption Add the missing memory barrier to make sure that the REO dest ring descriptor is read after the head pointer to avoid using stale data on weakly ordered architectures like aarch64. This may fix the ring-buffer corruption worked around by commit f9fff67d2d7c ("wifi: ath11k: Fix SKB corruption in REO destination ring") by silently discarding data, and may possibly also address user reported errors like: ath11k_pci 0006:01:00.0: msdu_done bit in attention is not set Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Cc: stable@vger.kernel.org # 5.6 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218005 Signed-off-by: Johan Hovold Tested-by: Clayton Craft Link: https://patch.msgid.link/20250321145302.4775-1-johan+linaro@kernel.org Signed-off-by: Jeff Johnson commit 6d037a372f817e9fcb56482f37917545596bd776 Author: Johan Hovold Date: Fri Mar 21 10:49:16 2025 +0100 wifi: ath11k: fix ring-buffer corruption Users of the Lenovo ThinkPad X13s have reported that Wi-Fi sometimes breaks and the log fills up with errors like: ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492 ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1460, expected 1484 which based on a quick look at the driver seemed to indicate some kind of ring-buffer corruption. Miaoqing Pan tracked it down to the host seeing the updated destination ring head pointer before the updated descriptor, and the error handling for that in turn leaves the ring buffer in an inconsistent state. Add the missing memory barrier to make sure that the descriptor is read after the head pointer to address the root cause of the corruption while fixing up the error handling in case there are ever any (ordering) bugs on the device side. Note that the READ_ONCE() are only needed to avoid compiler mischief in case the ring-buffer helpers are ever inlined. Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218623 Link: https://lore.kernel.org/20250310010217.3845141-3-quic_miaoqing@quicinc.com Cc: Miaoqing Pan Cc: stable@vger.kernel.org # 5.6 Signed-off-by: Johan Hovold Reviewed-by: Miaoqing Pan Tested-by: Steev Klimaszewski Tested-by: Jens Glathe Tested-by: Clayton Craft Link: https://patch.msgid.link/20250321094916.19098-1-johan+linaro@kernel.org Signed-off-by: Jeff Johnson commit cd2e7bae92bd7e65063ab8d04721d2b711ba4cbe Author: Muhammad Usama Anjum Date: Mon Apr 28 13:02:41 2025 +0500 wifi: ath11k: Fix QMI memory reuse logic Firmware requests 2 segments at first. The first segment is of 6799360 whose allocation fails due to dma remapping not available. The success is returned to firmware. Then firmware asks for 22 smaller segments instead of 2 big ones. Those get allocated successfully. At suspend/ hibernation time, these segments aren't freed as they will be reused by firmware after resuming. After resuming, the firmware asks for the 2 segments again with the first segment of 6799360 size. Since chunk->vaddr is not NULL, the type and size are compared with the previous type and size to know if it can be reused or not. Unfortunately, it is detected that it cannot be reused and this first smaller segment is freed. Then we continue to allocate 6799360 size memory which fails and ath11k_qmi_free_target_mem_chunk() is called which frees the second smaller segment as well. Later success is returned to firmware which asks for 22 smaller segments again. But as we had freed 2 segments already, we'll allocate the first 2 new smaller segments again and reuse the remaining 20. Hence 20 small segments are being reused instead of 22. Add skip logic when vaddr is set, but size/type don't match. Use the same skip and success logic as used when dma_alloc_coherent() fails. By skipping, the possibility of resume failure due to kernel failing to allocate memory for QMI can be avoided. kernel: ath11k_pci 0000:03:00.0: failed to allocate dma memory for qmi (524288 B type 1) ath11k_pci 0000:03:00.0: failed to allocate qmi target memory: -22 Tested-on: WCN6855 WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.6 Signed-off-by: Muhammad Usama Anjum Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20250428080242.466901-1-usama.anjum@collabora.com Signed-off-by: Jeff Johnson commit 3de7361f7cd9c7b79acba5a3c72588ee1d83f031 Merge: 2b61bb1d9aa601 d871198ee431d9 Author: Jens Axboe Date: Fri May 16 12:31:19 2025 -0600 Merge branch 'io_uring-6.15' into for-6.16/io_uring Merge in 6.15 io_uring fixes, mostly so that the fdinfo changes can get easily extended without causing merge conflicts. * io_uring-6.15: io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo() io_uring/memmap: don't use page_address() on a highmem page io_uring/uring_cmd: fix hybrid polling initialization issue io_uring/sqpoll: Increase task_work submission batch size io_uring: ensure deferred completions are flushed for multishot io_uring: always arm linked timeouts prior to issue io_uring/fdinfo: annotate racy sq/cq head/tail reads io_uring: fix 'sync' handling of io_fallback_tw() io_uring: don't duplicate flushing in io_req_post_cqe commit 2f0268ca1cac4561b4710882c2d27afa32e42cb3 Author: fanhuang Date: Tue Apr 29 17:07:03 2025 +0800 drm/amdgpu/jpeg: sriov support for jpeg_v5_0_1 initialization table handshake with mmsch Signed-off-by: fanhuang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 56fc141a5c54e33c1d4104942eca6ed90eeda7a4 Author: fanhuang Date: Tue Apr 29 17:06:20 2025 +0800 drm/amdgpu/vcn: sriov support for vcn_v5_0_1 initialization table handshake with mmsch Signed-off-by: fanhuang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7ce316620da14ec44343449c27ab696d0f1e8c6c Author: Taimur Hassan Date: Sun May 11 22:06:10 2025 -0500 drm/amd/display: Promote DAL to 3.2.334 This version brings along following update: -Support external tunneling feature -Modify DCN401 DMUB reset & halt sequence -Fix the typo in dcn401 Hubp block -Skip backend validation for virtual monitors Acked-by: Wayne Lin Signed-off-by: Taimur Hassan Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 81fc9ca25f02c53c055b842a40f2a915bd0bd5e0 Author: Taimur Hassan Date: Sun May 11 20:18:48 2025 -0400 drm/amd/display: [FW Promotion] Release 0.1.11.0 Refactoring some DMUB related structs and enum. Acked-by: Wayne Lin Signed-off-by: Taimur Hassan Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 29e82a27166ce8068e773fab9e6c4dd47e44ce1f Author: Ovidiu Bunea Date: Thu May 8 17:41:37 2025 -0400 drm/amd/display: Add GPINT retries to ips_query_residency_info [why & how] GPINTs can timeout without returning any data. Since this path is only for testing purposes, it should retry several times to ensure data is collected. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Ovidiu Bunea Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6d8f73885e9851a32fdeec3503ae7814ad018881 Author: Dillon Varone Date: Fri May 9 11:31:46 2025 -0400 drm/amd/display: Modify DCN401 DMUB reset & halt sequence [WHY&HOW] If DMCUB is already disabled or reset, no need to send the halt command again. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Dillon Varone Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4a16285aa1d468f566cac0613350b5f77b15f4a7 Author: Samson Tam Date: Fri May 9 11:18:50 2025 -0400 drm/amd/display: add support for 2nd sharpening range [Why & How] Add support for 2nd sharpening range for cases where we want override existing DCN sharpening range. Reviewed-by: Alvin Lee Signed-off-by: Samson Tam Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5dd63a0bfce52d9f802c44f3e56787b5c4b48629 Author: Nevenko Stupar Date: Thu May 8 15:37:29 2025 -0400 drm/amd/display: Fix the typo in dcn401 Hubp block [Why & How] Fix the typo for hubp_clear_tiling, currently calls hubp2_clear_tiling for dcn401 instead of intended hubp401_clear_tiling. Reviewed-by: Aurabindo Pillai Signed-off-by: Nevenko Stupar Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit eee5e5b35821a09567b21f092324d3aee78bdd44 Author: Chiawen Huang Date: Fri Apr 25 11:45:36 2025 +0800 drm/amd/display: Skip backend validation for virtual monitors [Why&How] Virtual monitors are now being validated during set_mode. Virtual monitors should not undergo backend validation, as the backend is intended only for physical monitors. Virtual sinks have no real backend part information and should be excluded from this validation. Reviewed-by: Aric Cyr Signed-off-by: Chiawen Huang Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 40bae1aea03d7aaa1148f652ce460e5ae931d098 Author: Karthi Kandasamy Date: Mon Mar 3 23:15:10 2025 +0100 drm/amd/display: Move mcache allocation programming from DML to resource [Why] mcache allocation programming is not part of DML's core responsibilities. Keeping this logic in DML leads to poor separation of concerns and complicates maintenance. [How] Refactored code to move mcache parameter preparation and mcache ID assignment into the resource file. Reviewed-by: Alvin Lee Signed-off-by: Karthi Kandasamy Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 17accf4f228c68a062ca24a79ee22aa96e278512 Author: Cruise Hung Date: Fri Apr 25 20:04:10 2025 +0800 drm/amd/display: Support external tunneling feature [Why & How] The original code only supports the tunneling for embedded one. To support external tunneling feature, it needs to check Tunneling_Support bit register. Reviewed-by: Wenjing Liu Reviewed-by: Jun Lei Signed-off-by: Cruise Hung Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fe1903bc9585d5feb94f17d34626d8bbf31e0c14 Author: Yihan Zhu Date: Thu Apr 17 16:48:16 2025 -0400 drm/amd/display: init local variable to fix format errors [WHY & HOW] Uninitialized local variables will cause format checker complain about them. Reviewed-by: Charlene Liu Signed-off-by: Yihan Zhu Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c9b4fa034c808200ae45758501a4ab803ac532be Author: Tomasz Siemek Date: Fri Apr 11 15:05:42 2025 +0200 drm/amd/display: Extend dc_plane_get_status with flags [WHY] dc_plane_get_status may be used for reading other plane properties in the future. [HOW] Provide API for choosing plane properties to read. Reviewed-by: Charlene Liu Reviewed-by: Aric Cyr Reviewed-by: Swapnil Patel Signed-off-by: Tomasz Siemek Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 13d0724f0ffe92971ef5a0da819f75c76c01d92e Author: Arvind Yadav Date: Thu May 15 12:44:46 2025 +0530 drm/amdgpu: fix use-after-unlock in eviction fence destroy The eviction fence destroy path incorrectly calls dma_fence_put() on evf_mgr->ev_fence after releasing the ev_fence_lock. This introduces a potential use-after-unlock or race because another thread concurrently modifies evf_mgr->ev_fence. Fix this by grabbing a local reference to evf_mgr->ev_fence under the lock and using that for dma_fence_put() after waiting. Cc: Alex Deucher Reviewed-by: Christian König Reviewed-by: Sunil Khatri Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit cc473057bbcc937b8a40792fa8509878ad3d401f Author: Lijo Lazar Date: Thu May 8 18:15:54 2025 +0530 drm/amdgpu: Allow NPS2-CPX combination for VFs CPX partition mode is compatible with NPS2 on aquavanjaram VFs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 67cc7f9096fa31918919468a66147ca49441f682 Author: fanhuang Date: Tue Apr 29 16:56:52 2025 +0800 drm/amdgpu/mmsch: Add MMSCH v5_0 support for sriov These structures are basically ported from MMSCH v4_0 The structures are the same as v4_0 except for the init header Signed-off-by: fanhuang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3aa37922c66a63bdb75e6bb7a861b7349eafae45 Author: Lijo Lazar Date: Thu May 8 17:34:41 2025 +0530 drm/amdgpu: Use compatible NPS mode info Compatible NPS modes for a partition mode are exposed through xcp_config interface. To determine if a compute partition mode is valid, check if the current NPS mode is part of compatible NPS modes. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a343a64faab5866322e44307b63516b211b541e Author: Lijo Lazar Date: Tue May 13 19:06:43 2025 +0530 drm/amd/pm: Move SMUv13.0.12 function declarations Move them to SMUv13.0.6 header file as they are used only in SMU v13.0.6. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 58c397890f16e8eba7c903afb52b947dab3cc900 Author: Asad Kamal Date: Wed Apr 30 00:48:07 2025 +0800 drm/amdgpu: Add pldm version reporting Add pldm version reporting through sysfs node Signed-off-by: Asad Kamal Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e3d0870a90a8e3f63c486438ac6a77ab828f8d8d Author: Amber Lin Date: Tue Apr 29 16:11:55 2025 -0400 drm/amdkfd: Support chain runlists of XNACK+/XNACK- If the MEC firmware supports chaining runlists of XNACK+/XNACK- processes, set SQ_CONFIG1 chicken bit and SET_RESOURCES bit 28. When the MEC/HWS supports it, KFD checks the XNACK+/XNACK- processes mix happens or not. If it does, enter over-subscription. Signed-off-by: Amber Lin Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 9c16e1575842386d04449f479e90e35c940b341b Author: Dr. David Alan Gilbert Date: Wed May 14 02:16:10 2025 +0100 drm/radeon/cik: Clean up doorbells Free doorbells in the error paths of cik_init and in cik_fini. Build tested only. Suggested-by: Christophe JAILLET Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit b4206774fe8231187e5863ff861160db77d4960b Author: Rosen Penev Date: Sun Apr 20 21:00:44 2025 -0700 wifi: ath9k: ahb: do ioremap resource in one step Simplifies probe slightly and adds extra error codes. Switching from devm_ioremap to the platform variant ends up calling devm_request_mem_region, which reserves the memory region for the various wmacs. Per board, there is only one wmac and after some fairly thorough analysis, there are no overlapping memory regions between wmacs and other devices on the ahb. Tested on a TP-Link Archer C7v2. Signed-off-by: Rosen Penev Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250421040044.44887-1-rosenp@gmail.com Signed-off-by: Jeff Johnson commit bd8402eec9aa3f9d6c797bd51b3c5b4b029673af Author: Christophe JAILLET Date: Sat Apr 19 10:29:17 2025 +0200 wifi: ath10k: Constify structures in hw.c Structures defined in hw.c are not modified in this driver. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 10357 951 0 11308 2c2c drivers/net/wireless/ath/ath10k/hw.o After: ===== text data bss dec hex filename 11125 203 0 11328 2c40 drivers/net/wireless/ath/ath10k/hw.o Signed-off-by: Christophe JAILLET Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/504b4d5276d13f5f9c3bffcfdaf244006312c22b.1745051315.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jeff Johnson commit 2ef2d31925f0414ff0f37862b6c33f62b49089c5 Author: Colin Ian King Date: Fri Apr 18 12:56:27 2025 +0100 wifi: ath10k: Fix spelling mistake "comple" -> "complete" There is a spelling mistake in a ath10k_warn message. Fix it and remove space before colon to tidy up message. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250418115627.534833-1-colin.i.king@gmail.com Signed-off-by: Jeff Johnson commit 88c3aaf46ce8878a8314b791b99b8d621f7badeb Author: Aditya Kumar Singh Date: Thu Apr 17 11:19:14 2025 +0530 wifi: ath12k: Use scan link ID 15 for all scan operations According to the code documentation in ath12k_mac_op_hw_scan(), "if no links of an ML VIF are already active on the radio corresponding to the given scan frequency, the scan link (link ID 15) should be used". This rule should apply to non-ML interfaces as well to maintain uniformity across the driver. However, currently, link 0 is selected as the scan link during non-ML operations. Update the code to use scan link ID 15 in all cases. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250417-fix_scan_vdev_handling-v3-2-9ec42513d26b@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 8dc8340c197854bdd7aaa4a1b0f1a75646667596 Author: Aditya Kumar Singh Date: Thu Apr 17 11:19:13 2025 +0530 wifi: ath12k: handle scan link during vdev create For scanning purposes, the driver can use link ID 15 (scan link). A future change will make non-ML interfaces to select the scan link. In this scenario, arvif->link_id will be used to retrieve the link configuration in ath12k_mac_vdev_create(). However, link ID 15 is not recognized as a valid link ID in the upper kernel, which will result in a failure to fetch link_conf and subsequently cause the scan to fail. To avoid this issue, ensure link_conf is fetched only when the link ID is within the valid range. Since link_conf cannot be retrieved using the scan link, use vif->addr as the Ethernet address for creating the scan vdev. This address will serve as the source address (address 2) in the probe request frames during scanning. Additionally, use the automatic Tx power value for the vdev. As this is a scan vdev, these values do not affect the scan functionality. Note that vif->addr will only be taken when a valid link_conf can not be fetched. Otherwise, link_conf's address will be taken as address 2. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250417-fix_scan_vdev_handling-v3-1-9ec42513d26b@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 31d48b93b1f8697254c4d7fa922eaaa3b28a7ab8 Author: Wen Gong Date: Thu Apr 17 10:42:27 2025 +0800 wifi: ath12k: read country code from SMBIOS for WCN7850 Read the country code from SMBIOS and send it to the firmware. The firmware will then indicate the regulatory domain information for the country code, which ath12k will use. dmesg: [ 1242.637253] ath12k_pci 0000:02:00.0: worldwide regdomain setting from SMBIOS [ 1242.637259] ath12k_pci 0000:02:00.0: bdf variant name not found. [ 1242.637261] ath12k_pci 0000:02:00.0: SMBIOS bdf variant name not set. [ 1242.927543] ath12k_pci 0000:02:00.0: set current country pdev id 0 alpha2 00 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-02582-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Signed-off-by: Wen Gong Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20250417024227.1712-1-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 8af94e772ef7bede90895318a3fda6c68a652774 Author: Qu Wenruo Date: Wed May 14 13:11:03 2025 +0930 btrfs: remove standalone "nologreplay" mount option Standalone "nologreplay" mount option has been marked deprecated since commit 74ef00185eb8 ("btrfs: introduce "rescue=" mount option"), which dates back to v5.9 (2020). Furthermore there is no other filesystem with the same named mount option, so this one is btrfs specific and we will not hit the same problem when removing "norecovery" mount option. So let's remove the standalone "nologreplay" mount option. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 827547bc3a2a2af6391260de8874008c5a52f238 Author: Nikunj A Dadhania Date: Fri May 2 05:03:44 2025 +0000 KVM: SVM: Add architectural definitions/assets for Bus Lock Threshold Virtual machines can exploit bus locks to degrade the performance of the system. Bus locks can be caused by Non-WB(Write back) and misaligned locked RMW (Read-modify-Write) instructions and require systemwide synchronization among all processors which can result into significant performance penalties. To address this issue, the Bus Lock Threshold feature is introduced to provide ability to hypervisor to restrict guests' capability of initiating mulitple buslocks, thereby preventing system slowdowns. Support for the buslock threshold is indicated via CPUID function 0x8000000A_EDX[29]. On the processors that support the Bus Lock Threshold feature, the VMCB provides a Bus Lock Threshold enable bit and an unsigned 16-bit Bus Lock threshold count. VMCB intercept bit VMCB Offset Bits Function 14h 5 Intercept bus lock operations Bus lock threshold count VMCB Offset Bits Function 120h 15:0 Bus lock counter When a VMRUN instruction is executed, the bus lock threshold count is loaded into an internal count register. Before the processor executes a bus lock in the guest, it checks the value of this register: - If the value is greater than '0', the processor successfully executes the bus lock and decrements the count. - If the value is '0', the bus lock is not executed, and a #VMEXIT to the VMM is taken. The bus lock threshold #VMEXIT is reported to the VMM with the VMEXIT code A5h, SVM_EXIT_BUS_LOCK. Signed-off-by: Nikunj A Dadhania Co-developed-by: Manali Shukla Signed-off-by: Manali Shukla Link: https://lore.kernel.org/r/20250502050346.14274-4-manali.shukla@amd.com [sean: rewrite shortlog] Signed-off-by: Sean Christopherson commit faad6645e1128ec2187d56009e2b76d603772d5f Author: Manali Shukla Date: Fri May 2 05:03:43 2025 +0000 x86/cpufeatures: Add CPUID feature bit for the Bus Lock Threshold Misbehaving guests can cause bus locks to degrade the performance of the system. The Bus Lock Threshold feature can be used to address this issue by providing capability to the hypervisor to limit guest's ability to generate bus lock, thereby preventing system slowdown due to performance penalities. When the Bus Lock Threshold feature is enabled, the processor checks the bus lock threshold count before executing the buslock and decides whether to trigger bus lock exit or not. The value of the bus lock threshold count '0' generates bus lock exits, and if the value is greater than '0', the bus lock is executed successfully and the bus lock threshold count is decremented. Presence of the Bus Lock threshold feature is indicated via CPUID function 0x8000000A_EDX[29]. Signed-off-by: Manali Shukla Reviewed-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250502050346.14274-3-manali.shukla@amd.com Signed-off-by: Sean Christopherson commit e9628b011bbd7f9cc13fb9c15267695c996338c7 Author: Manali Shukla Date: Fri May 2 05:03:42 2025 +0000 KVM: x86: Make kvm_pio_request.linear_rip a common field for user exits Move and rename kvm_pio_request.linear_rip to kvm_vcpu_arch.cui_linear_rip so that the field can be used by other userspace exit completion flows that need to take action if and only if userspace has not modified RIP. No functional changes intended. Suggested-by: Sean Christopherson Signed-off-by: Manali Shukla Link: https://lore.kernel.org/r/20250502050346.14274-2-manali.shukla@amd.com Signed-off-by: Sean Christopherson commit fd3d883aa5196ed39786bba7bb703e75276b6b4c Merge: a0982afa0992a9 f6b1eebbdbc753 Author: Rafael J. Wysocki Date: Fri May 16 18:39:08 2025 +0200 Merge tag 'amd-pstate-v6.16-2025-05-15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge an amd-pstate driver fix for 6.16 (5/15/25) from Mario Liminciello: "Fix an error caught with -Werror in amd-pstate-ut." * tag 'amd-pstate-v6.16-2025-05-15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Avoid shadowing ret in amd_pstate_ut_check_driver() commit d761c14d902e41c1e4c9b57f0e57593b7dfc56a9 Author: Sean Christopherson Date: Thu May 8 18:46:42 2025 +0000 KVM: selftests: Extract guts of THP accessor to standalone sysfs helpers Extract the guts of thp_configured() and get_trans_hugepagesz() to standalone helpers so that the core logic can be reused for other sysfs files, e.g. to query numa_balancing. Opportunistically assert that the initial fscanf() read at least one byte, and add a comment explaining the second call to fscanf(). Signed-off-by: Maxim Levitsky Signed-off-by: James Houghton Link: https://lore.kernel.org/r/20250508184649.2576210-2-jthoughton@google.com Signed-off-by: Sean Christopherson commit 1c587ee610b05e28a46584a7bae8c9db1510c90b Author: Christian Brauner Date: Fri May 16 13:25:30 2025 +0200 coredump: reflow dump helpers a little They look rather messy right now. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-3-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Jann Horn Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit d4fde206ab9fb55fd88133178e1fff941c5875c6 Author: Christian Brauner Date: Fri May 16 13:25:29 2025 +0200 coredump: massage do_coredump() We're going to extend the coredump code in follow-up patches. Clean it up so we can do this more easily. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-2-664f3caf2516@kernel.org Acked-by: Luca Boccassi Reviewed-by: Jann Horn Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 727b55105aeb2014823fe7bdbe0f465446e33b83 Author: Christian Brauner Date: Fri May 16 13:25:28 2025 +0200 coredump: massage format_corename() We're going to extend the coredump code in follow-up patches. Clean it up so we can do this more easily. Link: https://lore.kernel.org/20250516-work-coredump-socket-v8-1-664f3caf2516@kernel.org Acked-by: Serge Hallyn Acked-by: Luca Boccassi Reviewed-by: Jann Horn Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 494565a74502671d8c27aa52490bd178170caf5e Author: Milena Olech Date: Wed Apr 16 14:19:25 2025 +0200 idpf: add support for Rx timestamping Add Rx timestamp function when the Rx timestamp value is read directly from the Rx descriptor. In order to extend the Rx timestamp value to 64 bit in hot path, the PHC time is cached in the receive groups. Add supported Rx timestamp modes. Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: YiFei Zhu Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 1a49cf814fe1edf94615c7b08aff65d9f2d439a3 Author: Milena Olech Date: Wed Apr 16 14:19:23 2025 +0200 idpf: add Tx timestamp flows Add functions to request Tx timestamp for the PTP packets, read the Tx timestamp when the completion tag for that packet is being received, extend the Tx timestamp value and set the supported timestamping modes. Tx timestamp is requested for the PTP packets by setting a TSYN bit and index value in the Tx context descriptor. The driver assumption is that the Tx timestamp value is ready to be read when the completion tag is received. Then the driver schedules delayed work and the Tx timestamp value read is requested through virtchnl message. At the end, the Tx timestamp value is extended to 64-bit and provided back to the skb. Reviewed-by: Jacob Keller Co-developed-by: Josh Hay Signed-off-by: Josh Hay Signed-off-by: Milena Olech Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 4901e83a94ef0a8baf27916f31daf59b0a68547f Author: Milena Olech Date: Wed Apr 16 14:19:20 2025 +0200 idpf: add Tx timestamp capabilities negotiation Tx timestamp capabilities are negotiated for the uplink Vport. Driver receives information about the number of available Tx timestamp latches, the size of Tx timestamp value and the set of indexes used for Tx timestamping. Add function to get the Tx timestamp capabilities and parse the uplink vport flag. Reviewed-by: Alexander Lobakin Reviewed-by: Jacob Keller Co-developed-by: Emil Tantilov Signed-off-by: Emil Tantilov Co-developed-by: Pavan Kumar Linga Signed-off-by: Pavan Kumar Linga Signed-off-by: Milena Olech Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit d5dba8f7206dae408d94f06a3bac449c564f9411 Author: Milena Olech Date: Wed Apr 16 14:19:18 2025 +0200 idpf: add PTP clock configuration PTP clock configuration operations - set time, adjust time and adjust frequency are required to control the clock and maintain synchronization process. Extend get PTP capabilities function to request for the clock adjustments and add functions to enable these actions using dedicated virtchnl messages. Reviewed-by: Alexander Lobakin Reviewed-by: Willem de Bruijn Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 5a27503d3862c8ff812bfdbbe3b04964fa4e25af Author: Milena Olech Date: Wed Apr 16 14:19:11 2025 +0200 idpf: add mailbox access to read PTP clock time When the access to read PTP clock is specified as mailbox, the driver needs to send virtchnl message to perform PTP actions. Message is sent using idpf_mbq_opc_send_msg_to_peer_drv mailbox opcode, with the parameters received during PTP capabilities negotiation. Add functions to recognize PTP messages, move them to dedicated secondary mailbox, read the PTP clock time and cross timestamp using mailbox messages. Reviewed-by: Alexander Lobakin Reviewed-by: Willem de Bruijn Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 5cb8805d2366b20ee4d7afff586d8acf17649330 Author: Milena Olech Date: Wed Apr 16 14:19:08 2025 +0200 idpf: negotiate PTP capabilities and get PTP clock PTP capabilities are negotiated using virtchnl command. Add get capabilities function, direct access to read the PTP clock. Set initial PTP capabilities exposed to the stack. Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Willem de Bruijn Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit c5d0607f424e4091c879688383ac4754739a1669 Author: Milena Olech Date: Wed Apr 16 14:19:06 2025 +0200 idpf: move virtchnl structures to the header file Move virtchnl structures to the header file to expose them for the PTP virtchnl file. Reviewed-by: Alexander Lobakin Reviewed-by: Willem de Bruijn Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit bf27283ba5943f8e874843a8a05acbd82a2e911a Author: Milena Olech Date: Wed Apr 16 14:19:04 2025 +0200 virtchnl: add PTP virtchnl definitions PTP capabilities are negotiated using virtchnl commands. There are two available modes of the PTP support: direct and mailbox. When the direct access to PTP resources is negotiated, virtchnl messages returns a set of registers that allow read/write directly. When the mailbox access to PTP resources is negotiated, virtchnl messages are used to access PTP clock and to read the timestamp values. Virtchnl API covers both modes and exposes a set of PTP capabilities. Using virtchnl API, the driver recognizes also HW abilities - maximum adjustment of the clock and the basic increment value. Additionally, API allows to configure the secondary mailbox, dedicated exclusively for PTP purposes. Reviewed-by: Alexander Lobakin Reviewed-by: Willem de Bruijn Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 8d5e12c5921c671767a845dd0d69e77026cd1e15 Author: Milena Olech Date: Wed Apr 16 14:19:02 2025 +0200 idpf: add initial PTP support PTP feature is supported if the VIRTCHNL2_CAP_PTP is negotiated during the capabilities recognition. Initial PTP support includes PTP initialization and registration of the clock. Reviewed-by: Alexander Lobakin Reviewed-by: Vadim Fedorenko Reviewed-by: Willem de Bruijn Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Mina Almasry Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 9525a12d6b0b17ec255d24856d04342bedf1c050 Author: Milena Olech Date: Wed Apr 16 14:19:00 2025 +0200 idpf: change the method for mailbox workqueue allocation Since workqueues are created per CPU, the works scheduled to this workqueues are run on the CPU they were assigned. It may result in overloaded CPU that is not able to handle virtchnl messages in relatively short time. Allocating workqueue with WQ_UNBOUND and WQ_HIGHPRI flags allows scheduler to queue virtchl messages on less loaded CPUs, what eliminates delays. Reviewed-by: Alexander Lobakin Reviewed-by: Jacob Keller Signed-off-by: Milena Olech Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 75a9001bab36f0456f6aae1ab0aa487db456464a Author: Changbin Du Date: Tue May 6 17:49:07 2025 +0800 perf/x86/intel/ds: Remove redundant assignments to sample.period The perf_sample_data_init() has already set the period of sample, so no need to do it again. Signed-off-by: Changbin Du Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250506094907.2724-1-changbin.du@huawei.com commit 9c80e443379861a6b374db3c5bb830167cbe0676 Merge: 36f8e3087562bc f50ad4b73e1bdf cbb44d9c45e91e Author: Joel Fernandes Date: Fri May 16 11:18:16 2025 -0400 Merge branches 'rcu/misc-for-6.16', 'rcu/seq-counters-for-6.16' and 'rcu/torture-for-6.16' into rcu/for-next commit cbb44d9c45e91ec132a48812bde06a6e608ea6e1 Author: Joel Fernandes Date: Thu Apr 10 10:51:53 2025 -0400 rcutorture: Fix issue with re-using old images on ARM64 On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 instance instead of 36 for starting. Fix it by checking for Image files, instead of bzImage which ARM does not seem to have. With this I see all 36 instances running at the same time in the batch. Tested-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 9ffc09de883d262bf5b40dbdc8b34ce11c58ba0d Author: Paul E. McKenney Date: Thu May 8 16:42:30 2025 -0700 rcutorture: Remove MAXSMP and CPUMASK_OFFSTACK from TREE01 Back in the day, rcutorture was about the only thing that tested off-stack CPU masks, but now any arm64 system with more than 256 CPUs tests it full time. In fact, it is necessary to hack the kernel to prevent such a system from testing off-stack CPU masks. This means that there is no longer much point in rcutorture going out of its way to test this. And given the differences in how CPUMASK_OFFSTACK is enabled in x86 and arm64, rcutorture would need to go out of its way. This commit therefore removes CONFIG_CPUMASK_OFFSTACK=y (and the CONFIG_MAXSMP=y required to enable it on x86) from TREE01. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 4b5eb4b6b22486dff5dcc9bb9985c4ed769593f5 Author: Paul E. McKenney Date: Thu May 8 16:42:29 2025 -0700 rcutorture: Reduce TREE01 CPU overcommit The TREE01.boot nr_cpus kernel boot parameter has been set to 43 for more than seven years, but it can cause RCU CPU stall warnings on arm64, most of the time involving the stop-machine subsystem. This should not be too surprising, given that this causes 43 vCPUs to spin with interrupts disabled when there are only eight physical CPUs. The point of this CPU overcommit is to test the ability of expedited RCU grace period initialization to handle races with incoming CPUs that have never previously been online. But limiting to 17 CPUs instead of 43 allows time for this code to be exercised, and eliminates (or at least greatly reduces) the incidence of RCU CPU stall warnings on arm64. So this commit therefore sets nr_cpus=17 in TREE01.boot. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit d72e6c0bce15468445b1668869287011d2bab882 Author: Paul E. McKenney Date: Thu May 8 16:42:28 2025 -0700 torture: Check for "Call trace:" as well as "Call Trace:" Different architectures capitalize their splats differently. Who knew? This commit therefore checks for both arm64 "Call trace:" and x86 "Call Trace:". Reported-by: Joel Fernandes Closes: https://lore.kernel.org/all/553c33d8-2b51-4772-8aef-97b0163bc78e@nvidia.com/ Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit aafe12f980640c33882a1d09992560cdf11fbd6f Author: Joel Fernandes Date: Sun Feb 16 06:52:20 2025 -0500 rcutorture: Perform more frequent testing of ->gpwrap Currently, the ->gpwrap is not tested (at all per my testing) due to the requirement of a large delta between a CPU's rdp->gp_seq and its node's rnp->gpseq. This results in no testing of ->gpwrap being set. This patch by default adds 5 minutes of testing with ->gpwrap forced by lowering the delta between rdp->gp_seq and rnp->gp_seq to just 8 GPs. All of this is configurable, including the active time for the setting and a full testing cycle. By default, the first 25 minutes of a test will have the _default_ behavior there is right now (ULONG_MAX / 4) delta. Then for 5 minutes, we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe this is reasonable since we at least add a little bit of testing for usecases where ->gpwrap is set. [ Apply fix for Dan Carpenter's bug report on init path cleanup. ] [ Apply kernel doc warning fix from Akira Yokosawa. ] Tested-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 7e01c4c5cff293627209bac4337b1971b2f57d4e Author: Paul E. McKenney Date: Wed Mar 12 15:54:48 2025 -0700 torture: Add testing of RCU's Rust bindings to torture.sh This commit adds a --do-rcu-rust parameter to torture.sh, which invokes a rust_doctests_kernel kunit run. Note that kunit wants a clean source tree, so this runs "make mrproper", which might come as a surprise to some users. Should there be a --mrproper parameter to torture.sh to make the user explicitly ask for it? Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit fa11a54cf6cc21f1e18dc7ba71de662561fddc55 Author: Paul E. McKenney Date: Sun Mar 9 09:00:35 2025 -0700 torture: Add --do-{,no-}normal to torture.sh Right now, torture.sh runs normal runs unconditionally, which can be slow and thus annoying when you only want to test --kcsan or --kasan runs. This commit therefore adds a --do-normal argument so that "--kcsan --do-no-kasan --do-no-normal" runs only KCSAN runs. Note that specifying "--do-no-kasan --do-no-kcsan --do-no-normal" gets normal runs, so you should not try to use this as a synonym for --do-none. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit b9af71a26dff591e214dcd3dca7b94c908ccb825 Author: Paul E. McKenney Date: Thu Mar 6 08:10:00 2025 -0800 checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite() Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs. As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have happened had I thought a bit harder a few months ago. Therefore, mark them deprecated. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit ed0d0db095dd2b3a609f07d49d1342be9fb5c49d Author: Paul E. McKenney Date: Sun Feb 9 05:09:26 2025 -0800 rcutorture: Comment invocations of tick_dep_set_task() The rcu_torture_reader() and rcu_torture_fwd_prog_cr() functions run CPU-bound for extended periods of time (tens or even hundreds of milliseconds), so they invoke tick_dep_set_task() and tick_dep_clear_task() to ensure that the scheduling-clock tick helps move grace periods forward. So why doesn't rcu_torture_fwd_prog_nr() also invoke tick_dep_set_task() and tick_dep_clear_task()? Because the point of this function is to test RCU's ability to (eventually) force grace periods forward even when the tick has been disabled during long CPU-bound kernel execution. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 90530521079eec58b574341032a77746838874ee Author: Ard Biesheuvel Date: Thu May 8 13:43:32 2025 +0200 arm64/boot: Disallow BSS exports to startup code BSS might be uninitialized when entering the startup code, so forbid the use by the startup code of any variables that live after __bss_start in the linker map. Signed-off-by: Ard Biesheuvel Tested-by: Yeoreum Yun Reviewed-by: Yeoreum Yun Link: https://lore.kernel.org/r/20250508114328.2460610-8-ardb+git@google.com [will: Drop export of 'memstart_offset_seed', as this has been removed] Signed-off-by: Will Deacon commit 4afff6cc9a55b1a6ce4bf6fdf2084acd9ca34195 Author: Ard Biesheuvel Date: Thu May 8 13:43:31 2025 +0200 arm64/boot: Move global CPU override variables out of BSS Accessing BSS will no longer be permitted from the startup code in arch/arm64/kernel/pi, as some of it executes before BSS is cleared. Clearing BSS earlier would involve managing cache coherency explicitly in software, which is a hassle we prefer to avoid. So move some variables that are assigned by the startup code out of BSS and into .data. Signed-off-by: Ard Biesheuvel Tested-by: Yeoreum Yun Reviewed-by: Yeoreum Yun Link: https://lore.kernel.org/r/20250508114328.2460610-7-ardb+git@google.com Signed-off-by: Will Deacon commit 93d0d6f8a654b623addb40f23e5c7696bc93fbd5 Author: Ard Biesheuvel Date: Thu May 8 13:43:30 2025 +0200 arm64/boot: Move init_pgdir[] and init_idmap_pgdir[] into __pi_ namespace init_pgdir[] is only referenced from the startup code, but lives after BSS in the linker map. Before tightening the rules about accessing BSS from startup code, move init_pgdir[] into the __pi_ namespace, so it does not need to be exported explicitly. For symmetry, do the same with init_idmap_pgdir[], although it lives before BSS. Signed-off-by: Ard Biesheuvel Tested-by: Yeoreum Yun Reviewed-by: Yeoreum Yun Link: https://lore.kernel.org/r/20250508114328.2460610-6-ardb+git@google.com Signed-off-by: Will Deacon commit 425364dc49f050b6008b43408aa96d42105a9c1d Author: Chuck Lever Date: Fri May 16 09:37:12 2025 -0400 xdrgen: Fix code generated for counted arrays When an XDR counted array has a maximum element count, xdrgen adds a bounds check to the encoder or decoder for that type. But in cases where the .x provides no maximum element count, such as struct notify4 { /* composed from notify_type4 or notify_deviceid_type4 */ bitmap4 notify_mask; notifylist4 notify_vals; }; struct CB_NOTIFY4args { stateid4 cna_stateid; nfs_fh4 cna_fh; notify4 cna_changes<>; }; xdrgen is supposed to omit that bounds check. Some of the Jinja2 templates handle that correctly, but a few are incorrect and leave the bounds check in place with a maximum of zero, which causes encoding/decoding of that type to fail unconditionally. Reported-by: Jeff Layton Signed-off-by: Chuck Lever commit dd26402642a0899fde59ea6b0852fad3d799b4cc Author: George Moussalem Date: Thu May 15 21:46:05 2025 +0400 mtd: spinand: esmt: fix id code for F50D1G41LB Upon detecting the ID for the ESMT F50D1G41LB chip, the fifth byte returned is always 0x00 instead of the expected JEDEC continuation code of 0x7f. This causes detection to fail: [ 0.304399] spi-nand spi0.0: unknown raw ID c8117f7f00 [ 0.508943] spi-nand: probe of spi0.0 failed with error -524 So let's revert back to the 4 byte ID code for this chip specifically. Fixes: 4bd14b2fd8a8 ("mtd: spinand: esmt: Extend IDs to 5 bytes") Signed-off-by: George Moussalem Signed-off-by: Miquel Raynal commit 56fce75470041b5b0d92ae10637416e1a4cceb1b Author: Álvaro Fernández Rojas Date: Wed May 14 08:14:54 2025 +0200 mtd: rawnand: brcmnand: remove unused parameters last_cmd and last_byte are now unused brcmnand_host members. last_addr is only written and never read so we can remove it too. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: William Zhang Signed-off-by: Miquel Raynal commit 496a3bc5e46c6485a50730ffbcbc92fc53120425 Author: Christoph Hellwig Date: Tue May 13 09:14:33 2025 +0200 blk-mq: add a copyright notice to blk-mq-dma.c blk-mq-dma.c was split from blk-merge.c which has no copyright notice, but except for some boilerplate code and comments left from the old version this is all my code, so add my copyright. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250513071433.836797-2-hch@lst.de Signed-off-by: Jens Axboe commit b0a4158554b9017467435069c1b327f35987b495 Author: Christoph Hellwig Date: Tue May 13 09:14:32 2025 +0200 blk-mq: move the DMA mapping code to a separate file While working on the new DMA API I kept getting annoyed how it was placed right in the middle of the bio splitting code in blk-merge.c. Split it out into a separate file. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250513071433.836797-1-hch@lst.de Signed-off-by: Jens Axboe commit bcfab08db7fb38bf292838f2b693233fb4f486eb Author: Ian Rogers Date: Wed Apr 30 13:01:08 2025 -0700 perf intel-tpebs: Filter non-workload samples If perf is running with a benchmark then we want the retirement latency samples associated with the benchmark rather than from the system as a whole. Use the workload's PID to filter out samples that aren't from the workload or its children. Signed-off-by: Ian Rogers Tested-by: Weilin Wang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250430200108.243234-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 191679ec7bb9af3eadfe68ede3932a692ab0d677 Author: Alok Tiwari Date: Fri May 16 03:38:49 2025 -0700 cxl/Documentation: Fix typo in sysfs write_bandwidth attribute path Fix a typo in the sysfs documentation for the CXL "write_bandwidth" attribute path. The attribute was incorrectly documented as write_banwidth. Update it to the correct write_bandwidth to align with the actual implementation. Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20250516103855.3820882-1-alok.a.tiwari@oracle.com Signed-off-by: Dave Jiang commit 766797c295b563449db2a3ce33342c3c04c5541a Author: Konstantin Komarov Date: Wed Apr 23 21:01:15 2025 +0300 fs/ntfs3: Fix handling of InitializeFileRecordSegment Make the logic of handling the InitializeFileRecordSegment operation similar to that in windows. Signed-off-by: Konstantin Komarov commit 597704e201068db3d104de3c7a4d447ff8209127 Author: Robin Murphy Date: Mon May 12 18:11:54 2025 +0100 perf/arm-cmn: Initialise cmn->cpu earlier For all the complexity of handling affinity for CPU hotplug, what we've apparently managed to overlook is that arm_cmn_init_irqs() has in fact always been setting the *initial* affinity of all IRQs to CPU 0, not the CPU we subsequently choose for event scheduling. Oh dear. Cc: stable@vger.kernel.org Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver") Signed-off-by: Robin Murphy Reviewed-by: Ilkka Koskinen Link: https://lore.kernel.org/r/b12fccba6b5b4d2674944f59e4daad91cd63420b.1747069914.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit b225219a4002aae9b5d71cf0f912ac02d38f0212 Author: tanze Date: Thu May 15 13:18:39 2025 +0800 kselftest/arm64: Set default OUTPUT path when undefined When running 'make' in tools/testing/selftests/arm64/ without explicitly setting the OUTPUT variable, the build system will creates test directories (e.g., /bti) in the root filesystem due to OUTPUT defaulting to an empty string. This causes unintended pollution of the root directory. This patch adds proper handling for the OUTPUT variable: Sets OUTPUT to the current directory (.) if not specified Signed-off-by: tanze Link: https://lore.kernel.org/r/20250515051839.3409658-1-tanze@kylinos.cn Signed-off-by: Will Deacon commit 694f574f741a9e5dd60c39aae5aaa34c18231e96 Author: Ben Horgan Date: Tue May 13 13:45:25 2025 +0100 arm64: Update comment regarding values in __boot_cpu_mode The values stored in __boot_cpu_mode were changed without updating the comment. Rectify that. Signed-off-by: Ben Horgan Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20250513124525.677736-1-ben.horgan@arm.com Signed-off-by: Will Deacon commit 13c63ce358832e01575d3b186210966e17f9ff68 Author: Gavin Shan Date: Thu May 8 18:52:51 2025 +1000 arm64: mm: Drop redundant check in pmd_trans_huge() pmd_val(pmd) is redundant because a positive pmd_present(pmd) ensures a positive pmd_val(pmd) according to their definitions like below. #define pmd_val(x) ((x).pmd) #define pmd_present(pmd) pte_present(pmd_pte(pmd)) #define pte_present(pte) (pte_valid(pte) || pte_present_invalid(pte)) #define pte_valid(pte) (!!(pte_val(pte) & PTE_VALID)) #define pte_present_invalid(pte) \ ((pte_val(pte) & (PTE_VALID | PTE_PRESENT_INVALID)) == PTE_PRESENT_INVALID) pte_present() can't be positive unless either of the flag PTE_VALID or PTE_PRESENT_INVALID is set. In this case, pmd_val(pmd) should be positive either. So lets drop the redundant check pmd_val(pmd) and no functional changes intended. Signed-off-by: Gavin Shan Reviewed-by: Dev Jain Reviewed-by: Anshuman Khandual Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20250508085251.204282-1-gshan@redhat.com Signed-off-by: Will Deacon commit 29e31da4ed26c3ffc9afa70427f84f60fe50600b Author: Anshuman Khandual Date: Tue Apr 29 10:35:11 2025 +0530 arm64/mm: Re-organise setting up FEAT_S1PIE registers PIRE0_EL1 and PIR_EL1 mov_q cannot really move PIE_E[0|1] macros into a general purpose register as expected if those macro constants contain some 128 bit layout elements, that are required for D128 page tables. The primary issue is that for D128, PIE_E[0|1] are defined in terms of 128-bit types with shifting and masking, which the assembler can't accommodate. Instead pre-calculate these PIRE0_EL1/PIR_EL1 constants into asm-offsets.h based PIE_E0_ASM/PIE_E1_ASM which can then be used in arch/arm64/mm/proc.S. While here also drop PTE_MAYBE_NG/PTE_MAYBE_SHARED assembly overrides which are not required any longer, as the compiler toolchains are smart enough to compute both the PIE_[E0|E1]_ASM constants in all scenarios. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Ryan Roberts Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20250429050511.1663235-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 3f7cd28ae3d1a1d6f151178469cfaef1b07fdbcc Author: Armin Wolf Date: Thu Apr 10 18:54:55 2025 +0200 ACPI: thermal: Execute _SCP before reading trip points As specified in section 11.4.13 of the ACPI specification the operating system is required to evaluate the _ACx and _PSV objects after executing the _SCP control method. Move the execution of the _SCP control method before the invocation of acpi_thermal_get_trip_points() to avoid missing updates to the _ACx and _PSV objects. Fixes: b09872a652d3 ("ACPI: thermal: Fold acpi_thermal_get_info() into its caller") Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20250410165456.4173-3-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 8cf4fdac9bdead7bca15fc56fdecdf78d11c3ec6 Author: Armin Wolf Date: Thu Apr 10 18:54:54 2025 +0200 ACPI: OSI: Stop advertising support for "3.0 _SCP Extensions" As specified in section 5.7.2 of the ACPI specification the feature group string "3.0 _SCP Extensions" implies that the operating system evaluates the _SCP control method with additional parameters. However the ACPI thermal driver evaluates the _SCP control method without those additional parameters, conflicting with the above feature group string advertised to the firmware thru _OSI. Stop advertising support for this feature string to avoid confusing the ACPI firmware. Fixes: e5f660ebef68 ("ACPI / osi: Collect _OSI handling into one single file") Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20250410165456.4173-2-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 36f8e3087562bc3f55f584fb42d105dfdf6686f4 Author: Zqiang Date: Wed May 7 19:26:04 2025 +0800 rcu/nocb: Add Safe checks for access offloaded rdp For built with CONFIG_PROVE_RCU=y and CONFIG_PREEMPT_RT=y kernels, Disable BH does not change the SOFTIRQ corresponding bits in preempt_count(), but change current->softirq_disable_cnt, this resulted in the following splat: WARNING: suspicious RCU usage kernel/rcu/tree_plugin.h:36 Unsafe read of RCU_NOCB offloaded state! stack backtrace: CPU: 0 UID: 0 PID: 22 Comm: rcuc/0 Call Trace: [ 0.407907] [ 0.407910] dump_stack_lvl+0xbb/0xd0 [ 0.407917] dump_stack+0x14/0x20 [ 0.407920] lockdep_rcu_suspicious+0x133/0x210 [ 0.407932] rcu_rdp_is_offloaded+0x1c3/0x270 [ 0.407939] rcu_core+0x471/0x900 [ 0.407942] ? lockdep_hardirqs_on+0xd5/0x160 [ 0.407954] rcu_cpu_kthread+0x25f/0x870 [ 0.407959] ? __pfx_rcu_cpu_kthread+0x10/0x10 [ 0.407966] smpboot_thread_fn+0x34c/0xa50 [ 0.407970] ? trace_preempt_on+0x54/0x120 [ 0.407977] ? __pfx_smpboot_thread_fn+0x10/0x10 [ 0.407982] kthread+0x40e/0x840 [ 0.407990] ? __pfx_kthread+0x10/0x10 [ 0.407994] ? rt_spin_unlock+0x4e/0xb0 [ 0.407997] ? rt_spin_unlock+0x4e/0xb0 [ 0.408000] ? __pfx_kthread+0x10/0x10 [ 0.408006] ? __pfx_kthread+0x10/0x10 [ 0.408011] ret_from_fork+0x40/0x70 [ 0.408013] ? __pfx_kthread+0x10/0x10 [ 0.408018] ret_from_fork_asm+0x1a/0x30 [ 0.408042] Currently, triggering an rdp offloaded state change need the corresponding rdp's CPU goes offline, and at this time the rcuc kthreads has already in parking state. this means the corresponding rcuc kthreads can safely read offloaded state of rdp while it's corresponding cpu is online. This commit therefore add softirq_count() check for Preempt-RT kernels. Suggested-by: Joel Fernandes Reviewed-by: Frederic Weisbecker Signed-off-by: Zqiang Signed-off-by: Joel Fernandes commit bed3af437f38f9a7a8b8a7de153a421f023c6e0b Author: Su Hui Date: Tue Apr 22 09:51:45 2025 +0800 rcuscale: using kcalloc() to relpace kmalloc() It's safer to using kcalloc() because it can prevent overflow problem. Reviewed-by: Paul E. McKenney Signed-off-by: Su Hui Signed-off-by: Joel Fernandes commit 79ea7f43f8d5aeefc711d4ce322e0a7fbf41de14 Author: Wei Yang Date: Tue Feb 18 00:50:47 2025 +0000 doc/RCU/listRCU: refine example code for eliminating stale data This patch adjust the example code with following two purpose: * reduce the confusion on not releasing e->lock * emphasize e is valid and not stale with e->lock held Signed-off-by: Wei Yang CC: Boqun Feng CC: Alan Huang Reviewed-by: Alan Huang Link: https://lore.kernel.org/r/20250218005047.27258-1-richard.weiyang@gmail.com Signed-off-by: Boqun Feng Signed-off-by: Joel Fernandes commit 1708bf2cc46a3136cc5928c1027b2a3d25a41f94 Author: Paul E. McKenney Date: Mon Mar 17 16:21:50 2025 -0700 doc: Update LWN RCU API links in whatisRCU.rst This commit adds the 2024 LWN RCU API article set. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit b95d15980a0f2727a421392ebb50fc6338e43b02 Author: Frederic Weisbecker Date: Tue Dec 31 18:07:12 2024 +0100 Revert "rcu/nocb: Fix rcuog wake-up from offline softirq" This reverts commit f7345ccc62a4b880cf76458db5f320725f28e400. swake_up_one_online() has been removed because hrtimers can now assign a proper online target to hrtimers queued from offline CPUs. Therefore remove the related hackery. Link: https://lore.kernel.org/all/20241231170712.149394-4-frederic@kernel.org/ Reviewed-by: Usama Arif Reviewed-by: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Joel Fernandes commit 9520371e3daa75cd508b262ac16a732d3ffc9a30 Author: I Hsin Cheng Date: Wed Mar 19 10:26:40 2025 +0800 rust: sync: rcu: Mark Guard methods as inline Currently the implementation of "Guard" methods are basically wrappers around rcu's function within kernel. Building the kernel with llvm 18.1.8 on x86_64 machine will generate the following symbols: $ nm vmlinux | grep ' _R'.*Guard | rustfilt ffffffff817b6c90 T ::new ffffffff817b6cb0 T ::unlock ffffffff817b6cd0 T ::drop ffffffff817b6c90 T ::default These Rust symbols are basically wrappers around functions "rcu_read_lock" and "rcu_read_unlock". Marking them as inline can reduce the generation of these symbols, and saves the size of code generation for 132 bytes. $ ./scripts/bloat-o-meter vmlinux_old vmlinux_new (Output is demangled for readability) add/remove: 0/10 grow/shrink: 0/1 up/down: 0/-132 (-132) Function old new delta rust_driver_pci::SampleDriver::probe 1041 1034 -7 kernel::sync::rcu::Guard::default 9 - -9 kernel::sync::rcu::Guard::drop 9 - -9 kernel::sync::rcu::read_lock 9 - -9 kernel::sync::rcu::Guard::unlock 9 - -9 kernel::sync::rcu::Guard::new 9 - -9 __pfx__kernel::sync::rcu::Guard::default 16 - -16 __pfx__kernel::sync::rcu::Guard::drop 16 - -16 __pfx__kernel::sync::rcu::read_lock 16 - -16 __pfx__kernel::sync::rcu::Guard::unlock 16 - -16 __pfx__kernel::sync::rcu::Guard::new 16 - -16 Total: Before=23365955, After=23365823, chg -0.00% Link: https://github.com/Rust-for-Linux/linux/issues/1145 Signed-off-by: I Hsin Cheng Reviewed-by: Joel Fernandes Reviewed-by: Benno Lossin Reviewed-by: Charalampos Mitrodimas Acked-by: Miguel Ojeda Signed-off-by: Joel Fernandes commit da6b85598af30e9fec34d82882d7e1e39f3da769 Author: Yongliang Gao Date: Sun Feb 16 16:41:09 2025 +0800 rcu/cpu_stall_cputime: fix the hardirq count for x86 architecture When counting the number of hardirqs in the x86 architecture, it is essential to add arch_irq_stat_cpu to ensure accuracy. For example, a CPU loop within the rcu_read_lock function. Before: [ 70.910184] rcu: INFO: rcu_preempt self-detected stall on CPU [ 70.910436] rcu: 3-....: (4999 ticks this GP) idle=*** [ 70.910711] rcu: hardirqs softirqs csw/system [ 70.910870] rcu: number: 0 657 0 [ 70.911024] rcu: cputime: 0 0 2498 ==> 2498(ms) [ 70.911278] rcu: (t=5001 jiffies g=3677 q=29 ncpus=8) After: [ 68.046132] rcu: INFO: rcu_preempt self-detected stall on CPU [ 68.046354] rcu: 2-....: (4999 ticks this GP) idle=*** [ 68.046628] rcu: hardirqs softirqs csw/system [ 68.046793] rcu: number: 2498 663 0 [ 68.046951] rcu: cputime: 0 0 2496 ==> 2496(ms) [ 68.047244] rcu: (t=5000 jiffies g=3825 q=4 ncpus=8) Fixes: be42f00b73a0 ("rcu: Add RCU stall diagnosis information") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501090842.SfI6QPGS-lkp@intel.com/ Signed-off-by: Yongliang Gao Reviewed-by: Neeraj Upadhyay Link: https://lore.kernel.org/r/20250216084109.3109837-1-leonylgao@gmail.com Signed-off-by: Boqun Feng Signed-off-by: Joel Fernandes commit 0999f6156013107aecc5b968386b5945d42ba177 Author: Frederic Weisbecker Date: Tue Dec 31 18:07:11 2024 +0100 rcu: Remove swake_up_one_online() bandaid It's now ok to perform a wake-up from an offline CPU because the resulting armed scheduler bandwidth hrtimers are now correctly targeted by hrtimer infrastructure. Remove the obsolete hackerry. Link: https://lore.kernel.org/all/20241231170712.149394-3-frederic@kernel.org/ Reviewed-by: Usama Arif Reviewed-by: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Joel Fernandes commit 79b265a2e75d0745dcac5a7d5128fc8596ede502 Author: Zqiang Date: Fri May 16 19:20:24 2025 +0800 MAINTAINERS: Update Zqiang's email address This patch updates Zqiang's email address to qiang.zhang@linux.dev. Signed-off-by: Zqiang Acked-by: Joel Fernandes Signed-off-by: Joel Fernandes commit db8266017e0a703809c83453112c8d5ceb4f03af Author: Conor Dooley Date: Fri May 16 10:59:39 2025 +0100 dt-bindings: PCI: microchip,pcie-host: Fix DMA coherency property PolarFire SoC may be configured in a way that requires non-coherent DMA handling. On RISC-V, buses are coherent by default & the dma-noncoherent property is required to denote buses or devices that are non-coherent. For some reason, instead of adding dma-noncoherent to the binding the pointless, NOP, property dma-coherent was. Swap dma-coherent for dma-noncoherent. Fixes: 04aa999eb96fd ("dt-bindings: PCI: microchip,pcie-host: Allow dma-noncoherent") Signed-off-by: Conor Dooley Signed-off-by: Krzysztof Wilczyński Link: https://lore.kernel.org/r/20250516-datebook-senator-ff7a1c30cbd5@spud commit 54d14f25664bbb75c2928dd0d64a095c0f488176 Author: James Morse Date: Thu May 15 16:58:55 2025 +0000 MAINTAINERS: Add reviewers for fs/resctrl resctrl has existed for quite a while as a filesystem interface private to arch/x86. To allow other architectures to support the same user interface for similar hardware features, it has been moved to /fs/. Add those with a vested interest in the common code as reviewers. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Acked-by: Reinette Chatre Acked-by: Dave Martin Tested-by: Fenghua Yu Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-26-james.morse@arm.com commit 7168ae330e8105296210b2b2d31d791d5c073345 Author: James Morse Date: Thu May 15 16:58:54 2025 +0000 x86,fs/resctrl: Move the resctrl filesystem code to live in /fs/resctrl Resctrl is a filesystem interface to hardware that provides cache allocation policy and bandwidth control for groups of tasks or CPUs. To support more than one architecture, resctrl needs to live in /fs/. Move the code that is concerned with the filesystem interface to /fs/resctrl. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-25-james.morse@arm.com commit f6b25be204b8661e4c32fa770a4c9e3a113ee325 Author: James Morse Date: Thu May 15 16:58:53 2025 +0000 x86/resctrl: Always initialise rid field in rdt_resources_all[] x86 has an array, rdt_resources_all[], of all possible resources. The for-each-resource walkers depend on the rid field of all resources being initialised. If the array ever grows due to another architecture adding a resource type that is not defined on x86, the for-each-resources walkers will loop forever. Initialise all the rid values in resctrl_arch_late_init() before any for-each-resource walker can be called. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-24-james.morse@arm.com commit b7b57edbf5681c7d0ed504a3a4e912bb68661ab9 Author: Dave Martin Date: Thu May 15 16:58:52 2025 +0000 x86/resctrl: Relax some asm #includes checkpatch.pl identifies some direct #includes of asm headers that can be satisfied by including the corresponding header instead. Fix them. No intentional functional change. Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Peter Newman Tested-by: Shaopeng Tan Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-23-james.morse@arm.com commit df3dc0efcc01d6aae8ebd3e479fe0d55f894854b Author: Dave Martin Date: Thu May 15 16:58:51 2025 +0000 x86/resctrl: Prefer alloc(sizeof(*foo)) idiom in rdt_init_fs_context() rdt_init_fs_context() sizes a typed allocation using an explicit sizeof(type) expression, which checkpatch.pl complains about. Since this code is about to be factored out and made generic, this is a good opportunity to fix the code to size the allocation based on the target pointer instead, to reduce the chance of future mis- maintenance. Fix it. No functional change. Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Peter Newman Tested-by: Shaopeng Tan Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-22-james.morse@arm.com commit 5e2ff240b31a37226260587e33707efc3c41e451 Author: Jason Gunthorpe Date: Wed May 14 09:48:55 2025 -0300 iommu: Clear the freelist after iommu_put_pages_list() The commit below reworked how iommu_put_pages_list() worked to not do list_del() on every entry. This was done expecting all the callers to already re-init the list so doing a per-item deletion is not efficient. It was missed that fq_ring_free_locked() re-uses its list after calling iommu_put_pages_list() and so the leftover list reaches free'd struct pages and will crash or WARN/BUG/etc. Reinit the list to empty in fq_ring_free_locked() after calling iommu_put_pages_list(). Audit to see if any other callers of iommu_put_pages_list() need the list to be empty: - iommu_dma_free_fq_single() and iommu_dma_free_fq_percpu() immediately frees the memory - iommu_v1_map_pages(), v1_free_pgtable(), domain_exit(), riscv_iommu_map_pages() uses a stack variable which goes out of scope - intel_iommu_tlb_sync() uses a gather in a iotlb_sync() callback, the caller re-inits the gather Fixes: 13f43d7cf3e0 ("iommu/pages: Formalize the freelist API") Reported-by: Borah, Chaitanya Kumar Closes: https://lore.kernel.org/r/SJ1PR11MB61292CE72D7BE06B8810021CB997A@SJ1PR11MB6129.namprd11.prod.outlook.com Tested-by: Borah, Chaitanya Kumar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-7d4dfa6140f7+11f04-iommu_freelist_init_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 556f48a5093b1edb1b8a594af633303269dec329 Author: Dave Martin Date: Thu May 15 16:58:50 2025 +0000 x86/resctrl: Squelch whitespace anomalies in resctrl core code checkpatch.pl complains about some whitespace anomalies in the resctrl core code. This doesn't matter, but since this code is about to be factored out and made generic, this is a good opportunity to fix these issues and so reduce future checkpatch fuzz. Fix them. No functional change. Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Peter Newman Tested-by: Shaopeng Tan Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-21-james.morse@arm.com commit 92c749e4aa90cd684d87cb5bde6a9d51e83fe6e3 Author: Wei-Lin Chang Date: Mon May 12 21:32:23 2025 +0800 KVM: arm64: nv: Remove clearing of ICH_LR.EOI if ICH_LR.HW == 1 In the case of ICH_LR.HW == 1, bit 41 of LR is just a part of pINTID without EOI meaning, and bit 41 will be zeroed by the subsequent clearing of ICH_LR_PHYS_ID_MASK anyway. No functional changes intended. Signed-off-by: Wei-Lin Chang Link: https://lore.kernel.org/r/20250512133223.866999-1-r09922117@csie.ntu.edu.tw Signed-off-by: Marc Zyngier commit 69018866d2baa014413e340744bfb342ec0cdbcd Author: Ben Horgan Date: Mon May 12 12:41:12 2025 +0100 KVM: selftests: Confirm exposing MTE_frac does not break migration When MTE is supported but MTE_ASYMM is not (ID_AA64PFR1_EL1.MTE == 2) ID_AA64PFR1_EL1.MTE_frac == 0xF indicates MTE_ASYNC is unsupported and MTE_frac == 0 indicates it is supported. As MTE_frac was previously unconditionally read as 0 from the guest and user-space, check that using SET_ONE_REG to set it to 0 succeeds but does not change MTE_frac from unsupported (0xF) to supported (0). This is required as values originating from KVM from user-space must be accepted to avoid breaking migration. Also, to allow this MTE field to be tested, enable KVM_ARM_CAP_MTE for the set_id_regs test. No effect on existing tests is expected. Signed-off-by: Ben Horgan Link: https://lore.kernel.org/r/20250512114112.359087-4-ben.horgan@arm.com Signed-off-by: Marc Zyngier commit fe21ff5d4b46c06c4e43a310fdb781d1e6b5173e Author: Ben Horgan Date: Mon May 12 12:41:11 2025 +0100 KVM: arm64: Make MTE_frac masking conditional on MTE capability If MTE_frac is masked out unconditionally then the guest will always see ID_AA64PFR1_EL1_MTE_frac as 0. However, a value of 0 when ID_AA64PFR1_EL1_MTE is 2 indicates that MTE_ASYNC is supported. Hence, for a host with ID_AA64PFR1_EL1_MTE==2 and ID_AA64PFR1_EL1_MTE_frac==0xf (MTE_ASYNC unsupported) the guest would see MTE_ASYNC advertised as supported whilst the host does not support it. Hence, expose the sanitised value of MTE_frac to the guest and user-space. As MTE_frac was previously hidden, always 0, and KVM must accept values from KVM provided by user-space, when ID_AA64PFR1_EL1.MTE is 2 allow user-space to set ID_AA64PFR1_EL1.MTE_frac to 0. However, ignore it to avoid incorrectly claiming hardware support for MTE_ASYNC in the guest. Note that linux does not check the value of ID_AA64PFR1_EL1_MTE_frac and wrongly assumes that MTE async faults can be generated even on hardware that does nto support them. This issue is not addressed here. Signed-off-by: Ben Horgan Link: https://lore.kernel.org/r/20250512114112.359087-3-ben.horgan@arm.com Signed-off-by: Marc Zyngier commit 5799a2983fea4f22f6aaa291aee3b704db81d29f Author: Ben Horgan Date: Mon May 12 12:41:10 2025 +0100 arm64/sysreg: Expose MTE_frac so that it is visible to KVM KVM exposes the sanitised ID registers to guests. Currently these ignore the ID_AA64PFR1_EL1.MTE_frac field, meaning guests always see a value of zero. This is a problem for platforms without the MTE_ASYNC feature where ID_AA64PFR1_EL1.MTE==0x2 and ID_AA64PFR1_EL1.MTE_frac==0xf. KVM forces MTE_frac to zero, meaning the guest believes MTE_ASYNC is supported, when no async fault will ever occur. Before KVM can fix this, the architecture needs to sanitise the ID register field for MTE_frac. Linux itself does not use MTE_frac field and just assumes MTE async faults can be generated if MTE is supported. Signed-off-by: Ben Horgan Link: https://lore.kernel.org/r/20250512114112.359087-2-ben.horgan@arm.com Signed-off-by: Marc Zyngier commit d204e391a0d83d73fc312e71fc62896c4d8bae79 Author: Lad Prabhakar Date: Thu May 15 19:22:07 2025 +0100 clocksource/drivers/renesas-ostm: Unconditionally enable reprobe support Previously, the OSTM driver's platform probe path was only enabled for selected SoCs (e.g., RZ/G2L and RZ/V2H) due to issues on RZ/Ax (ARM32) SoCs, which encountered IRQ conflicts like: /soc/timer@e803b000: used for clock events genirq: Flags mismatch irq 16. 00215201 (timer@e803c000) vs. 00215201 (timer@e803c000) Failed to request irq 16 for /soc/timer@e803c000 renesas_ostm e803c000.timer: probe with driver renesas_ostm failed with error -16 These issues have since been resolved by commit 37385c0772a4 ("clocksource/drivers/renesas-ostm: Avoid reprobe after successful early probe"), which prevents reprobe on successfully initialized early timers. With this fix in place, there is no longer a need to restrict platform probing based on SoC-specific configs. This change unconditionally enables reprobe support for all SoCs, simplifying the logic and avoiding the need to update the configuration for every new Renesas SoC with OSTM. Additionally, the `ostm_of_table` is now marked with `__maybe_unused` to fix a build warning when `CONFIG_OF` is disabled. RZ/A1 and RZ/A2 remain unaffected with this change. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250515182207.329176-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Daniel Lezcano commit f0e0c374379cc0b99698d3786d78d936c6c4bf38 Author: Lad Prabhakar Date: Thu May 15 19:22:06 2025 +0100 dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support Document support for the Renesas OS Timer (OSTM) found on the Renesas RZ/V2N (R9A09G056) SoC. The OSTM IP on RZ/V2N is identical to that on other RZ families, so no driver changes are required as `renesas,ostm` will be used as fallback compatible. Also update the bindings to require the "resets" property for RZ/V2N by inverting the logic: all SoCs except RZ/A1 and RZ/A2 now require the "resets" property. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250515182207.329176-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Daniel Lezcano commit 5c977f1023156938915c57d362fddde8fad2b052 Author: Benjamin Marzinski Date: Thu May 15 21:55:29 2025 -0400 dm-mpath: Don't grab work_mutex while probing paths Grabbing the work_mutex keeps probe_active_paths() from running at the same time as multipath_message(). The only messages that could interfere with probing the paths are "disable_group", "enable_group", and "switch_group". These messages could force multipath to pick a new pathgroup while probe_active_paths() was probing the current pathgroup. If the multipath device has a hardware handler, and it switches active pathgroups while there is outstanding IO to a path device, it's possible that IO to the path will fail, even if the path would be usable if it was in the active pathgroup. To avoid this, do not clear the current pathgroup for the *_group messages while probe_active_paths() is running. Instead set a flag, and probe_active_paths() will clear the current pathgroup when it finishes probing the paths. For this to work correctly, multipath needs to check current_pg before next_pg in choose_pgpath(), but before this patch next_pg was only ever set when current_pg was cleared, so this doesn't change the current behavior when paths aren't being probed. Even with this change, it is still possible to switch pathgroups while the probe is running, but only if all the paths have failed, and the probe function will skip them as well in this case. If multiple DM_MPATH_PROBE_PATHS requests are received at once, there is no point in repeatedly issuing test IOs. Instead, the later probes should wait for the current probe to complete. If current pathgroup is still the same as the one that was just checked, the other probes should skip probing and just check the number of valid paths. Finally, probing the paths should quit early if the multipath device is trying to suspend, instead of continuing to issue test IOs, delaying the suspend. While this patch will not change the behavior of existing multipath users which don't use the DM_MPATH_PROBE_PATHS ioctl, when that ioctl is used, the behavior of the "disable_group", "enable_group", and "switch_group" messages can change subtly. When these messages return, the next IO to the multipath device will no longer be guaranteed to choose a new pathgroup. Instead, choosing a new pathgroup could be delayed by an in-progress DM_MPATH_PROBE_PATHS ioctl. The userspace multipath tools make no assumptions about what will happen to IOs after sending these messages, so this change will not effect already released versions of them, even if the DM_MPATH_PROBE_PATHS ioctl is run alongside them. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 76ebfa371f0ff8ff8a42a9415f61432d6c48fa55 Author: Gabor Juhos Date: Thu May 15 20:58:06 2025 +0200 spi: spi-qpic-snand: extend FIELD_PREP() macro usage Large part of the code uses the FIELD_PREP() macro already to construct values to be written to hardware registers. Change the code to use also the macro for more registers of which the corresponding bitmasks are defined already. This makes the code more readable. It also syncs the affected codes with their counterparts in the 'qcom_nandc' driver, so it makes it easier to spot the differences between the two implementations. No functional changes intended. Signed-off-by: Gabor Juhos Reviewed-by: Md Sadre Alam Link: https://patch.msgid.link/20250515-qpic-snand-use-bitmasks-v1-2-11729aeae73b@gmail.com Signed-off-by: Mark Brown commit 2abf107dcd797c60c86e9f17319cd1658862f6b2 Author: Gabor Juhos Date: Thu May 15 20:58:05 2025 +0200 spi: spi-qpic-snand: use CW_PER_PAGE_MASK bitmask Change the code to use the already defined CW_PER_PAGE_MASK bitmask along with the FIELD_PREP() macro instead of using magic values. This makes the code more readable. It also syncs the affected codes with their counterparts in the 'qcom_nandc' driver, so it makes it easier to spot the differences between the two implementations. No functional changes intended. Signed-off-by: Gabor Juhos Reviewed-by: Md Sadre Alam Link: https://patch.msgid.link/20250515-qpic-snand-use-bitmasks-v1-1-11729aeae73b@gmail.com Signed-off-by: Mark Brown commit a28206060dc5848a1a2a15b7f6ac6223d869084d Author: Talhah Peerbhai Date: Fri May 16 01:27:41 2025 +0300 ASoC: amd: yc: Add quirk for Lenovo Yoga Pro 7 14ASP9 Similar to many other Lenovo models with AMD chips, the Lenovo Yoga Pro 7 14ASP9 (product name 83HN) requires a specific quirk to ensure internal mic detection. This patch adds a quirk fixing this. Signed-off-by: Talhah Peerbhai Link: https://patch.msgid.link/20250515222741.144616-1-talhah.peerbhai@gmail.com Signed-off-by: Mark Brown commit c132d8d5ddfdc1f91fb1d0feee84912daa357f0d Author: Shengjiu Wang Date: Fri May 16 16:03:34 2025 +0800 ASoC: fsl_xcvr: update platform driver name XCVR driver is not only used for i.MX8MP platform, so update driver name to make it more generic. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250516080334.3272878-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 628479afc7a157bca3430a75e759ed06c1a81c66 Author: Chen-Yu Tsai Date: Fri May 16 13:05:48 2025 +0800 ASoC: soc-utils: Check string pointer validity in snd_soc_dlc_is_dummy() In the recently added snd_soc_dlc_is_dummy(), the helper uses the .name and .dai_name fields without checking their validity. For .name, this field is NULL if the component is matched by .of_node instead. In fact, only one of these fields may be set. This caused a NULL pointer dereference on MediaTek MT8195 and MT8188 platforms with the subsequent conversion to snd_soc_dlc_is_dummy() in their machine drivers. The codecs are all matches through the device tree, so their .name fields are empty. For .dai_name, there are cases where this field is empty, such as for the following component definitions: #define COMP_EMPTY() { } #define COMP_PLATFORM(_name) { .name = _name } #define COMP_AUX(_name) { .name = _name } #define COMP_CODEC_CONF(_name) { .name = _name } Or the single link CPU DAI case in the simple audio card family, as covered by simple_util_canonicalize_cpu(), in which the .dai_name field is explicitly cleared. To fix this, check the validity of the fields before using them in string comparison. Fixes: 3e021f3b8115 ("ASoC: soc-utils: add snd_soc_dlc_is_dummy()") Cc: Kuninori Morimoto Signed-off-by: Chen-Yu Tsai Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20250516050549.407133-1-wenst@chromium.org Signed-off-by: Mark Brown commit e23cba0ab49a9cf95e9bc3a86cfbf336b0e285f6 Author: Christian Marangi Date: Wed May 14 23:39:12 2025 +0200 thermal/drivers/airoha: Fix spelling mistake Fix various spelling mistake in airoha_thermal_setup_monitor() and define. Reported-by: Alok Tiwari Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250514213919.2321490-1-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano commit 04b31cc53fe0df0e87a37d18a3c0363d7dee218f Author: Sricharan Ramabadhran Date: Fri Feb 28 09:11:38 2025 +0400 thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens IPQ5018 has tsens IP V1.0, 5 sensors of which 4 are in use and 1 interrupt. The IP does not have a RPM, hence use init routine for tsens v1.0 without RPM which does not early enable. Reviewed-by: Dmitry Baryshkov Signed-off-by: Sricharan Ramabadhran Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/DS7PR19MB8883BD0E36C08DD1D03CE1CB9DCC2@DS7PR19MB8883.namprd19.prod.outlook.com Signed-off-by: Daniel Lezcano commit 19f9b02ebc8fe3babefbe76a37c74c5f4c174de1 Author: George Moussalem Date: Fri Feb 28 09:11:37 2025 +0400 thermal/drivers/qcom/tsens: Add support for tsens v1 without RPM Adding generic support for SoCs with tsens v1.0 IP with no RPM. Due to lack of RPM, tsens has to be reset and enabled in the driver init. SoCs can have support for more sensors than those which will actually be enabled. As such, init will only enable those explicitly added to the hw_ids array. Co-developed-by: Sricharan Ramabadhran Signed-off-by: Sricharan Ramabadhran Signed-off-by: George Moussalem Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/DS7PR19MB8883C5D7974C7735E23923769DCC2@DS7PR19MB8883.namprd19.prod.outlook.com Signed-off-by: Daniel Lezcano commit e3f90f167a49902cda2408f7e91cca0dcfd5040a Author: George Moussalem Date: Fri Feb 28 09:11:36 2025 +0400 thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ TSENS v2.0+ leverage features not available to prior versions such as updated interrupts init routine, masked interrupts, and watchdog. Currently, the checks in place evaluate whether the IP version is greater than v1 which invalidates when updates to v1 or v1 minor versions are implemented. As such, update the conditional statements to strictly evaluate whether the version is greater than or equal to v2 (inclusive). Signed-off-by: George Moussalem Reviewed-by: Dmitry Baryshkov Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/DS7PR19MB8883434CAA053648E22AA8AC9DCC2@DS7PR19MB8883.namprd19.prod.outlook.com Signed-off-by: Daniel Lezcano commit 77c6d28192ef59ae62fa05ae6697990d2366e88d Author: Sricharan Ramabadhran Date: Fri Feb 28 09:11:35 2025 +0400 dt-bindings: thermal: qcom-tsens: Add ipq5018 compatible IPQ5018 has tsens v1.0 block with 5 sensors of which 4 are in use and 1 interrupt. Acked-by: Rob Herring Signed-off-by: Sricharan Ramabadhran Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/DS7PR19MB88835BD1063C4D5451E14B0E9DCC2@DS7PR19MB8883.namprd19.prod.outlook.com Signed-off-by: Daniel Lezcano commit 42de37f40e1bc818df216dfa0918c114cfb5941d Author: Christian Marangi Date: Sun May 11 20:49:55 2025 +0200 thermal/drivers: Add support for Airoha EN7581 thermal sensor Add support for Airoha EN7581 thermal sensor. This provide support for reading the CPU or SoC Package sensor and to setup trip points for hot and critical condition. An interrupt is fired to react on this and doesn't require passive poll to read the temperature. The thermal regs provide a way to read the ADC value from an external register placed in the Chip SCU regs. Monitor will read this value and fire an interrupt if the trip condition configured is reached. The Thermal Trip and Interrupt logic is conceptually similar to Mediatek LVTS Thermal but differ in register mapping and actual function/bug workaround. The implementation only share some register names but from functionality observation it's very different and used only for the basic function of periodically poll the temp and trip the interrupt. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250511185003.3754495-2-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano commit fd55708d58c4b1155dc224d2abfb7dd99e12af7a Author: Christian Marangi Date: Sun May 11 20:49:54 2025 +0200 dt-bindings: thermal: Add support for Airoha EN7581 thermal sensor Add support for Airoha EN7581 thermal sensor and monitor. This is a simple sensor for the CPU or SoC Package that provide thermal sensor and trip point for hot low and critical condition to fire interrupt and react on the abnormal state. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250511185003.3754495-1-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano commit 3159c96ac2cb3a104ce8ee5b8a4afe98e4b8fcad Author: Arnd Bergmann Date: Mon May 5 07:24:52 2025 +0200 thermal/drivers/mediatek/lvts: Remove unused lvts_debugfs_exit When debugfs is disabled, the function has no reference any more: drivers/thermal/mediatek/lvts_thermal.c:266:13: error: 'lvts_debugfs_exit' defined but not used [-Werror=unused-function] 266 | static void lvts_debugfs_exit(struct lvts_domain *lvts_td) { } | ^~~~~~~~~~~~~~~~~ Fixes: ef280c17a840 ("thermal/drivers/mediatek/lvts: Fix debugfs unregister on failure") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250505052502.1812867-1-arnd@kernel.org Signed-off-by: Daniel Lezcano commit b49825661af93d9b8d7236f914803f136896f8fd Author: AngeloGioacchino Del Regno Date: Wed Apr 2 10:38:52 2025 +0200 thermal/drivers/mediatek/lvts: Fix debugfs unregister on failure When running the probe function for this driver, the function lvts_debugfs_init() gets called in lvts_domain_init() which, in turn, gets called in lvts_probe() before registering threaded interrupt handlers. Even though it's unlikely, the last call may fail and, if it does, there's nothing removing the already created debugfs folder and files. In order to fix that, instead of calling the lvts debugfs cleanup function upon failure, register a devm action that will take care of calling that upon failure or driver removal. Since devm was used, also delete the call to lvts_debugfs_exit() in the lvts_remove() callback, as now that's done automatically. Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20250402083852.20624-1-angelogioacchino.delregno@collabora.com Signed-off-by: Daniel Lezcano commit 0f2bd5a049ce80aa240c6b5beee2f8d9e5538c75 Author: Enrique Isidoro Vazquez Ramos Date: Tue Mar 25 13:30:44 2025 -0600 thermal/drivers/amlogic: Rename Uptat to uptat to follow kernel coding style The variable Uptat uses CamelCase, which violates the kernel's coding style that mandates snake_case for variable names. This is a purely cosmetic change with no functional impact. Compilation tested with: - checkpatch.pl --strict passed (no new warnings/errors). Signed-off-by: Enrique Isidoro Vazquez Ramos Link: https://lore.kernel.org/r/Z-MEZNMLUmj75uxN@debian.debian Signed-off-by: Daniel Lezcano commit 592ebd77e65d91de0dbc5f08c05159ba91d2d709 Author: Luca Ceresoli Date: Tue Mar 11 10:21:23 2025 +0100 vsprintf: remove redundant and unused %pCn format specifier %pC and %pCn print the same string, and commit 900cca294425 ("lib/vsprintf: add %pC{,n,r} format specifiers for clocks") introducing them does not clarify any intended difference. It can be assumed %pC is a default for %pCn as some other specifiers do, but not all are consistent with this policy. Moreover there is now no other suffix other than 'n', which makes a default not really useful. All users in the kernel were using %pC except for one which has been converted. So now remove %pCn and all the unnecessary extra code and documentation. Acked-by: Stephen Boyd Reviewed-by: Geert Uytterhoeven Signed-off-by: Luca Ceresoli Reviewed-by: Petr Mladek Tested-by: Petr Mladek Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20250311-vsprintf-pcn-v2-2-0af40fc7dee4@bootlin.com Signed-off-by: Daniel Lezcano commit b0d71cb44ab676ba7ede46083cdfd4ac92b2fbea Author: Luca Ceresoli Date: Tue Mar 11 10:21:22 2025 +0100 thermal/drivers/bcm2835: Use %pC instead of %pCn The %pC and %pCn printk format specifiers produce the exact same string. In preparation for removing %pCn, use %pC. Reviewed-by: Geert Uytterhoeven Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20250311-vsprintf-pcn-v2-1-0af40fc7dee4@bootlin.com Signed-off-by: Daniel Lezcano commit 5f9ab5df8c519aba050b50442c99ac328fefe8ea Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:37 2025 +0200 thermal/drivers/hisi: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20250417074638.81329-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano commit 279f225951e3c77a1708d77f557b4cc7bdbd76ed Author: James Morse Date: Thu May 15 16:58:49 2025 +0000 x86/resctrl: Move pseudo lock prototypes to include/linux/resctrl.h The resctrl pseudo-lock feature allows an architecture to allocate data into particular cache portions, which are then treated as reserved to avoid that data ever being evicted. Setting this up is deeply architecture specific as it involves disabling prefetchers etc. It is not possible to support this kind of feature on arm64. Risc-V is assumed to be the same. The prototypes for the architecture code were added to x86's asm/resctrl.h, with other architectures able to provide stubs for their architecture. This forces other architectures to provide identical stubs. Move the prototypes and stubs to linux/resctrl.h, and switch between them using the existing Kconfig symbol. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-20-james.morse@arm.com commit 272ed1c28c9db60b9bd50d49feae463df50b3ef6 Author: James Morse Date: Thu May 15 16:58:48 2025 +0000 x86/resctrl: Fix types in resctrl_arch_mon_ctx_{alloc,free}() stubs resctrl_arch_mon_ctx_alloc() and resctrl_arch_mon_ctx_free() take an enum resctrl_event_id that is already defined in resctrl_types.h to be accessible to asm/resctrl.h. The x86 stubs take an int. Fix that. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-19-james.morse@arm.com commit 7bdb619c7f9f0a7264b2d69ad0472bf2c785e52a Author: James Morse Date: Thu May 15 16:58:47 2025 +0000 x86/resctrl: Move enum resctrl_event_id to resctrl.h resctrl_types.h contains common types and constants to enable architectures to use these types in their definitions within asm/resctrl.h. enum resctrl_event_id was placed in resctrl_types.h for resctrl_arch_get_cdp_enabled() and resctrl_arch_set_cdp_enabled(), but these two functions are no longer inlined by any architecture. Move enum resctrl_event_id to resctrl.h. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-18-james.morse@arm.com commit 3d95a49b365e06d1b4c4e5a426fdc70449a334f3 Author: James Morse Date: Thu May 15 16:58:46 2025 +0000 x86/resctrl: Move the filesystem bits to headers visible to fs/resctrl Once the filesystem parts of resctrl move to fs/resctrl, it cannot rely on definitions in x86's internal.h. Move definitions in internal.h that need to be shared between the filesystem and architecture code to header files that fs/resctrl can include. Doing this separately means the filesystem code only moves between files of the same name, instead of having these changes mixed in too. Co-developed-by: Dave Martin Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-17-james.morse@arm.com commit 4334d83904fc8b1a4bd5c0829164511456feb600 Author: Rob Herring (Arm) Date: Mon May 5 21:23:00 2025 -0500 dt-bindings: timer: Convert marvell,armada-370-timer to DT schema Convert the Marvell Armada 37x/380/XP Timer binding to DT schema format. Update the compatible entries to match what is in use. "marvell,armada-380-timer" in particular was missing. Signed-off-by: Rob Herring (Arm) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20250506022301.2588282-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 4d54b0b401f4ba97cbd0d65ddfe3dda2576a2500 Author: Rob Herring (Arm) Date: Mon May 5 21:23:29 2025 -0500 dt-bindings: timer: Convert ti,keystone-timer to DT schema Convert the TI Keystone Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022330.2589598-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 379967d0c7942acf4df9bf68f5be3a79b5f3ae82 Author: Rob Herring (Arm) Date: Mon May 5 21:23:25 2025 -0500 dt-bindings: timer: Convert st,spear-timer to DT schema Convert the ST SPEAr Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022326.2589389-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 7e5ce1944d0f4543e233e7c3011f37d59c4bbf85 Author: Rob Herring (Arm) Date: Mon May 5 21:23:20 2025 -0500 dt-bindings: timer: Convert socionext,milbeaut-timer to DT schema Convert the Socionext Milbeaut Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022322.2589193-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 960a2f4c7f5fc4231b9295d44a28721830d3e316 Author: Rob Herring (Arm) Date: Mon May 5 21:23:16 2025 -0500 dt-bindings: timer: Convert snps,arc-timer to DT schema Convert the Synopsys ARC Local Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022317.2589010-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 58ac7dc3ca92cba2238f9af71d018af177439938 Author: Rob Herring (Arm) Date: Mon May 5 21:23:12 2025 -0500 dt-bindings: timer: Convert snps,archs-rtc to DT schema Convert the Synopsys ARC HS RTC Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022313.2588796-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 49f2f4d16fab95d6aba0da7460aef632ddc67858 Author: Rob Herring (Arm) Date: Mon May 5 21:23:08 2025 -0500 dt-bindings: timer: Convert snps,archs-gfrc to DT schema Convert the Synopsys ARC HS 64-bit Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022309.2588605-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit e1e9fad1499c029e6052b13e9974f5cc2ccf7c89 Author: Rob Herring (Arm) Date: Mon May 5 21:22:56 2025 -0500 dt-bindings: timer: Convert lsi,zevio-timer to DT schema Convert the TI NSPIRE Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022257.2588136-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit f8470be859a8660c1993fa44053c473c82eb454b Author: Rob Herring (Arm) Date: Mon May 5 21:22:52 2025 -0500 dt-bindings: timer: Convert jcore,pit to DT schema Convert the J-Core PIT Timer binding to DT schema format. It's a straight-forward conversion. Since the 'reg' entries are based on number of cores, we can't put constraints on it. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022253.2587999-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit e7ddb13fa6203cad3546104c4f5edbbc70cc59cf Author: Rob Herring (Arm) Date: Mon May 5 21:22:48 2025 -0500 dt-bindings: timer: Convert img,pistachio-gptimer to DT schema Convert the ImgTec Pistachio Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022249.2587839-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 2b3b58f233afb4b1edf779c95e8106fe7c707c7c Author: Rob Herring (Arm) Date: Mon May 5 21:22:35 2025 -0500 dt-bindings: timer: Convert ezchip,nps400-timer to DT schema Convert the EZChip NPS400 Timer bindings to DT schema format. It's a straight-forward conversion. The 2 bindings only differ in compatible and one required property, so the schemas can be combined. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022237.2587355-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit d65a30c30e54666cf63ba671e93d2fcbc8863a54 Author: Rob Herring (Arm) Date: Mon May 5 21:22:14 2025 -0500 dt-bindings: timer: Convert cirrus,clps711x-timer to DT schema Convert the Cirrus CLPS711x timer binding to DT schema format. It's a straight-forward conversion. Drop the aliases node and second example which aren't relevant. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022215.2586595-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 60160c4bf6ffefe26e4a40315160d828eda2bfff Author: Rob Herring (Arm) Date: Mon May 5 21:22:01 2025 -0500 dt-bindings: timer: Convert altr,timer-1.0 to DT schema Convert the Altera Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250506022202.2586157-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 6d1ca2236dbe987f0fb9fa194916fb453024b553 Author: Darshan Prajapati Date: Thu Apr 10 20:55:17 2025 +0530 dt-bindings: timer: Add ESWIN EIC7700 CLINT Add compatible string for ESWIN EIC7700 CLINT. Signed-off-by: Darshan Prajapati Reviewed-by: Samuel Holland Signed-off-by: Pinkesh Vaghela Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250410152519.1358964-9-pinkesh.vaghela@einfochips.com Signed-off-by: Daniel Lezcano commit 3b4c33ac87d0d11308f4445ecec2a124e2e77724 Author: Caleb James DeLisle Date: Wed May 7 13:44:55 2025 +0000 clocksource/drivers: Add EcoNet Timer HPT driver Introduce a clocksource driver for the so-called high-precision timer (HPT) in the EcoNet EN751221 and EN751627 MIPS SoCs. It's a 32 bit upward-counting one-shot timer which relies on the crystal so it is unaffected by CPU power mode. On MIPS 34K devices (single core) there is one timer, and on 1004K devices (dual core) there are two. Each timer has two sets of count/compare registers so that there is one for each of the VPEs on the core. Because each core has 2 VPEs, register selection takes the CPU number / 2 for the timer corrisponding to the core, then CPU number % 2 for the register corrisponding to the VPE. These timers use a percpu-devid IRQ to route interrupts to the VPE which set the event. Signed-off-by: Caleb James DeLisle Link: https://lore.kernel.org/r/20250507134500.390547-3-cjd@cjdns.fr Signed-off-by: Daniel Lezcano commit 30fddbd5325459102e448c9a26a1bc15ef563381 Author: Caleb James DeLisle Date: Wed May 7 13:44:54 2025 +0000 dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer Add device tree bindings for the so-called high-precision timer (HPT) in the EcoNet EN751221 SoC. Signed-off-by: Caleb James DeLisle Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250507134500.390547-2-cjd@cjdns.fr Signed-off-by: Daniel Lezcano commit 7aeeac55658f68181c9dd6af07717db07cfeab7a Author: Rob Herring (Arm) Date: Mon May 5 21:22:09 2025 -0500 dt-bindings: timer: Convert arm,mps2-timer to DT schema Convert the Arm MPS2 Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Reviewed-by: Liviu Dudau Link: https://lore.kernel.org/r/20250506022210.2586404-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit f4cc1801987e4854870d98ed8a38db0b29298a30 Author: Inochi Amaoto Date: Mon Apr 14 06:34:56 2025 +0800 dt-bindings: timer: Add Sophgo SG2044 ACLINT timer Like SG2042, SG2044 implements an enhanced ACLINT, so add necessary compatible string for SG2044 SoC. Signed-off-by: Inochi Amaoto Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250413223507.46480-3-inochiama@gmail.com Signed-off-by: Daniel Lezcano commit c55cddf6201c3c88b66dd37207d87e555c34f6cb Author: Rob Herring (Arm) Date: Mon May 5 21:22:31 2025 -0500 dt-bindings: timer: Convert cnxt,cx92755-timer to DT schema Convert the Conexant Digicolor SoCs Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20250506022232.2587186-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit c3205f0f855d17f09fc67bcc9e7897038c8d8e08 Author: Rob Herring (Arm) Date: Mon May 5 21:22:23 2025 -0500 dt-bindings: timer: Convert csky,gx6605s-timer to DT schema Convert the C-SKY gx6605s timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Acked-by: Guo Ren Link: https://lore.kernel.org/r/20250506022224.2586860-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 157265afbdf257c99280511a3a557933d5b2e9f1 Author: Rob Herring (Arm) Date: Mon May 5 21:22:27 2025 -0500 dt-bindings: timer: Convert csky,mptimer to DT schema Convert the C-SKY Multi-processor timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Acked-by: Guo Ren Link: https://lore.kernel.org/r/20250506022228.2587029-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit ea1ab43e5cec8704556fcdd38082a08160b2b2ce Author: Rob Herring (Arm) Date: Mon May 5 21:23:04 2025 -0500 dt-bindings: timer: Convert marvell,orion-timer to DT schema Convert the Marvell Orion Timer binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20250506022305.2588431-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit 39b27ddf4d680fc908b2fc788039406e2e1c4601 Author: robelin Date: Wed May 7 12:43:11 2025 +0800 clocksource/drivers/timer-tegra186: Remove unused bits The intention to keep the unsed if(0) block is gone now. Remove them for clean codes. Signed-off-by: robelin Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20250507044311.3751033-4-robelin@nvidia.com Signed-off-by: Daniel Lezcano commit b42d781e0350c969ef8155b800e33400f5f8b8a6 Author: Pohsun Su Date: Wed May 7 12:43:10 2025 +0800 clocksource/drivers/timer-tegra186: Fix watchdog self-pinging This change removes watchdog self-pinging behavior. The timer irq handler is triggered due to the 1st expiration, the handler disables and enables watchdog but also implicitly clears the expiration count so the count can only be 0 or 1. Since this watchdog supports opened, configured, or pinged by systemd, We remove this behavior or the watchdog may not bark when systemd crashes since the 5th expiration never comes. Signed-off-by: Pohsun Su Signed-off-by: Robert Lin Link: https://lore.kernel.org/r/20250507044311.3751033-3-robelin@nvidia.com Signed-off-by: Daniel Lezcano commit 28c842c8b0f5d1c2da823b11326e63cdfdbc3def Author: Pohsun Su Date: Wed May 7 12:43:09 2025 +0800 clocksource/drivers/timer-tegra186: Add WDIOC_GETTIMELEFT support This change adds support for WDIOC_GETTIMELEFT so userspace programs can get the number of seconds before system reset by the watchdog timer via ioctl. Signed-off-by: Pohsun Su Signed-off-by: Robert Lin Link: https://lore.kernel.org/r/20250507044311.3751033-2-robelin@nvidia.com Signed-off-by: Daniel Lezcano commit eb7bc6920153a7d025c0b0001d5a6462fe08034f Author: J. Neuschäfer Date: Sat Apr 12 14:56:20 2025 +0200 dt-bindings: timer: Convert fsl,gtm to YAML Convert fsl,gtm.txt to YAML so that device trees using a Freescale General-purpose Timers Module can be properly validated. Reviewed-by: Rob Herring (Arm) Signed-off-by: J. Neuschäfer Link: https://lore.kernel.org/r/20250412-gtm-yaml-v2-1-e4d2292ffefc@posteo.net Signed-off-by: Daniel Lezcano commit b8239054194ad67aff7d244185ef46890c5ae71a Author: Arnd Bergmann Date: Wed Apr 9 17:53:08 2025 +0200 clocksource/drivers/atmel_tcb: Fix kconfig dependency Build-testing this driver on arm without CONFIG_OF produces a warning: drivers/clocksource/timer-atmel-tcb.c:368:34: error: 'atmel_tcb_of_match' defined but not used [-Werror=unused-const-variable=] 368 | static const struct of_device_id atmel_tcb_of_match[] = { | ^~~~~~~~~~~~~~~~~~ Change the dependency to require CONFIG_OF for build testing to avoid the warning. Testing remains possible on all architectures as CONFIG_OF is user-selectable. Cc: Nicolas Ferre Cc: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250409155313.1096915-1-arnd@kernel.org Signed-off-by: Daniel Lezcano commit cec32ac7582712346edd474a01fb553f5bf0efb9 Author: Daniel Lezcano Date: Thu Apr 17 17:16:19 2025 +0200 clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms STM supports commonly required system and application software timing functions. STM includes a 32-bit count-up timer and four 32-bit compare channels with a separate interrupt source for each channel. The timer is driven by the STM module clock divided by an 8-bit prescale value (1 to 256). STM has the following features: • One 32-bit count-up timer with an 8-bit prescaler • Four 32-bit compare channels • An independent interrupt source for each channel • Ability to stop the timer in Debug mode The s32g platform is declined into two versions, the s32g2 and the s32g3. The former has a STM block with 8 timers and the latter has 12 timers. The platform is designed to have one usable STM instance per core on the system which is composed of 3 x Cortex-M3 + 4 Cortex-A53 for the s32g2 and 3 x Cortex-M3 + 8 Cortex-A53 for the s32g3. There is a special STM instance called STM_TS which is dedicated to the timestamp. The 7th STM instance STM_07 is directly tied to the STM_TS which means it is not usable as a clockevent. The driver instantiate each STM described in the device tree as a clocksource and a clockevent conforming to the reference manual even if the Linux system does not use all of the clocksource. Each clockevent will have a cpumask set for a specific CPU. Given the counter is shared between the clocksource and the clockevent, the STM module can not be disabled by one or another so the refcounting mechanism is used to stop the counter when it reaches zero and to start it when it is one. The suspend and resume relies on the refcount to stop the module. As the device tree will have multiple STM entries, the driver can be probed in parallel with the async option but it is not enabled yet. However, the driver code takes care of preventing a race by putting a lock to protect the number of STM instances global variable which means it is ready to support the option when enough testing will be done with the underlying time framework. Cc: Ghennadi Procopciuc Cc: Krzysztof Kozlowski Cc: Thomas Fossati Suggested-by: Ghennadi Procopciuc Link: https://lore.kernel.org/r/20250417151623.121109-3-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano commit eec34ebb65aab20d2488808770b7f080104d4426 Author: Daniel Lezcano Date: Thu Apr 17 17:16:18 2025 +0200 dt-bindings: timer: Add NXP System Timer Module Add the System Timer Module description found on the NXP s32 platform and the compatible for the s32g2 variant. Cc: Ghennadi Procopciuc Cc: Thomas Fossati Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250417151623.121109-2-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano commit bff70402d6d67843fe319338e4c56e1cba13fbd8 Author: James Morse Date: Thu May 15 16:58:45 2025 +0000 fs/resctrl: Add boiler plate for external resctrl code Add Makefile and Kconfig for fs/resctrl. Add ARCH_HAS_CPU_RESCTRL for the common parts of the resctrl interface and make X86_CPU_RESCTRL select this. Adding an include of asm/resctrl.h to linux/resctrl.h allows the /fs/resctrl files to switch over to using this header instead. Co-developed-by: Dave Martin Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-16-james.morse@arm.com commit 3bf8ce828419810f45a272948805cf9a2b685529 Author: Ahmed S. Darwish Date: Thu May 15 22:28:59 2025 +0200 x86/cpuid: Rename hypervisor_cpuid_base()/for_each_possible_hypervisor_cpuid_base() to cpuid_base_hypervisor()/for_each_possible_cpuid_base_hypervisor() In order to let all the APIs under have a shared "cpuid_" namespace, rename hypervisor_cpuid_base() to cpuid_base_hypervisor(). To align with the new style, also rename: for_each_possible_hypervisor_cpuid_base(function) to: for_each_possible_cpuid_base_hypervisor(function) Adjust call-sites accordingly. Suggested-by: Ingo Molnar Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Dave Hansen Cc: David Woodhouse Cc: H. Peter Anvin Cc: John Ogness Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/aCZOi0Oohc7DpgTo@lx-t490 commit 003e86077143ebeaa5299fb2bc907ae3b6650028 Author: James Morse Date: Thu May 15 16:58:44 2025 +0000 x86/resctrl: Add 'resctrl' to the title of the resctrl documentation The resctrl documentation is titled "User Interface for Resource Control feature". Once the documentation follows the code in a move to the filesystem, this appears in the list of filesystems, but doesn't contain the name of the filesystem, making it hard to find. Add 'resctrl' to the title. Suggested-by: Reinette Chatre Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-15-james.morse@arm.com commit 68b44b05f4c880c42109a91d2e0e7faa94f40529 Author: Aditya Kumar Singh Date: Thu May 15 23:31:21 2025 +0530 wifi: mac80211: handle non-MLO mode as well in ieee80211_num_beaconing_links() Currently, ieee80211_num_beaconing_links() returns 0 when the interface operates in non-ML mode. However, non-MLO mode is equivalent to having a single link. Therefore, the function can handle the non-MLO case as well. This adjustment will also eliminate the need for deflink usage in certain scenarios. Hence, implement changes to handle the non-MLO case as well. There is no change in functionality, and no existing user-visible bug is getting fixed. This update simply makes the function generic to handle all cases. Suggested-by: Johannes Berg Link: https://lore.kernel.org/linux-wireless/16499ad8e4b060ee04c8a8b3615fe8952aa7b07b.camel@sipsolutions.net/ Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250515-fix_num_beaconing_links-v1-1-4a39e2704314@oss.qualcomm.com Signed-off-by: Johannes Berg commit 84eed951638ffd550cb4aaf0d185d3e81ae3f4cd Merge: 06c4b203681858 3cc35394fac15d Author: Johannes Berg Date: Fri May 16 08:57:57 2025 +0200 Merge tag 'rtw-next-2025-05-16' of https://github.com/pkshih/rtw Ping-Ke Shih says: ================== rtw-next patches for v6.16 Some fixes and refinements across drivers, and regular development of MLO and STA + P2P concurrency. Major changes are listed below. rtw88: * improve throughput for RTL8814AU rtw89: * support MLO * improve user experience for STA + P2P concurrency * dynamic antenna gain (DAG) with different power by antenna * load SAR tables from ACPI ================== Link: https://patch.msgid.link/17e74675-70cc-43d7-a797-afb937030d34@RTEXMBS04.realtek.com.tw/ Signed-off-by: Johannes Berg commit 119deb95b0bc2793d4b002549444ce0aec346b4f Author: Ahmed S. Darwish Date: Thu May 8 17:02:36 2025 +0200 x86/cpu/intel: Rename CPUID(0x2) descriptors iterator parameter The CPUID(0x2) descriptors iterator has been renamed from: for_each_leaf_0x2_entry() to: for_each_cpuid_0x2_desc() since it iterates over CPUID(0x2) cache and TLB "descriptors", not "entries". In the macro's x86/cpu call-site, rename the parameter denoting the parsed descriptor at each iteration from 'entry' to 'desc'. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-8-darwi@linutronix.de commit 4b21e71ad6cc93d39d78176de269a0dc9a318fc6 Author: Ahmed S. Darwish Date: Thu May 8 17:02:35 2025 +0200 x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter The CPUID(0x2) descriptors iterator has been renamed from: for_each_leaf_0x2_entry() to: for_each_cpuid_0x2_desc() since it iterates over CPUID(0x2) cache and TLB "descriptors", not "entries". In the macro's x86/cacheinfo call-site, rename the parameter denoting the parsed descriptor at each iteration from 'entry' to 'desc'. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-7-darwi@linutronix.de commit e7df7289f1481993c9f326aea801323a1d3d0c5f Author: Ahmed S. Darwish Date: Thu May 8 17:02:34 2025 +0200 x86/cpuid: Rename cpuid_get_leaf_0x2_regs() to cpuid_leaf_0x2() Rename the CPUID(0x2) register accessor function: cpuid_get_leaf_0x2_regs(regs) to: cpuid_leaf_0x2(regs) for consistency with other accessors that return full CPUID registers outputs like: cpuid_leaf(regs) cpuid_subleaf(regs) In the same vein, rename the CPUID(0x2) iteration macro: for_each_leaf_0x2_entry() to: for_each_cpuid_0x2_desc() to include "cpuid" in the macro name, and since what is iterated upon is CPUID(0x2) cache and TLB "descriptos", not "entries". Prefix an underscore to that iterator macro parameters, so that the newly renamed 'desc' parameter do not get mixed with "union leaf_0x2_regs :: desc[]" in the macro's implementation. Adjust all the affected call-sites accordingly. While at it, use "CPUID(0x2)" instead of "CPUID leaf 0x2" as this is the recommended style. No change in functionality intended. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-6-darwi@linutronix.de commit 270f00bcc9525c8ba667349ba3e8c4dbcbbf70fb Author: James Morse Date: Thu May 15 16:58:43 2025 +0000 x86/resctrl: Split trace.h trace.h contains all the tracepoints. After the move to /fs/resctrl, some of these will be left behind. All the pseudo_lock tracepoints remain part of the architecture. The lone tracepoint in monitor.c moves to /fs/resctrl. Split trace.h so that each C file includes a different trace header file. This means the trace header files are not modified when they are moved. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-14-james.morse@arm.com commit 2a65660385444e9d9deffe995c71ee20443ef76e Author: James Morse Date: Thu May 15 16:58:42 2025 +0000 x86/resctrl: Expand the width of domid by replacing mon_data_bits MPAM platforms retrieve the cache-id property from the ACPI PPTT table. The cache-id field is 32 bits wide. Under resctrl, the cache-id becomes the domain-id, and is packed into the mon_data_bits union bitfield. The width of cache-id in this field is 14 bits. Expanding the union would break 32bit x86 platforms as this union is stored as the kernfs kn->priv pointer. This saved allocating memory for the priv data storage. The firmware on MPAM platforms have used the PPTT cache-id field to expose the interconnect's id for the cache, which is sparse and uses more than 14 bits. Use of this id is to enable PCIe direct cache injection hints. Using this feature with VFIO means the value provided by the ACPI table should be exposed to user-space. To support cache-id values greater than 14 bits, convert the mon_data_bits union to a structure. These are shared between control and monitor groups, and are allocated on first use. The list of allocated struct mon_data is free'd when the filesystem is umount()ed. Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-13-james.morse@arm.com commit d4fb6b8e4640adeff9673ae398525be7382d3197 Author: James Morse Date: Thu May 15 16:58:41 2025 +0000 x86/resctrl: Add end-marker to the resctrl_event_id enum The resctrl_event_id enum gives names to the counter event numbers on x86. These are used directly by resctrl. To allow the MPAM driver to keep an array of these the size of the enum needs to be known. Add a 'num_events' enum entry which can be used to size an array. This is added to the enum to reduce conflicts with another series, which in turn requires get_arch_mbm_state() to have a default case. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-12-james.morse@arm.com commit 06aa9378df017ea7482b1bfdcd750104c8b3c407 Author: Nam Cao Date: Mon May 12 12:50:59 2025 +0200 x86/tracing, x86/mm: Move page fault tracepoints to generic Page fault tracepoints are interesting for other architectures as well. Move them to be generic. Signed-off-by: Nam Cao Signed-off-by: Ingo Molnar Cc: Dave Hansen Cc: Gabriele Monaco Cc: H. Peter Anvin Cc: John Ogness Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org Link: https://lore.kernel.org/r/89c2f284adf9b4c933f0e65811c50cef900a5a95.1747046848.git.namcao@linutronix.de commit d49ae4172cffa51cc72bdbd668fdd2e64b0a929f Author: Nam Cao Date: Mon May 12 12:50:58 2025 +0200 x86/tracing, x86/mm: Remove redundant trace_pagefault_key trace_pagefault_key is used to optimize the pagefault tracepoints when it is disabled. However, tracepoints already have built-in static_key for this exact purpose. Remove this redundant key. Signed-off-by: Nam Cao Signed-off-by: Ingo Molnar Cc: Dave Hansen Cc: Gabriele Monaco Cc: H. Peter Anvin Cc: John Ogness Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org Link: https://lore.kernel.org/r/827c7666d2989f08742a4fb869b1ed5bfaaf1dbf.1747046848.git.namcao@linutronix.de commit 28d51df0dbaad038a69af134b92314ce7c2196e2 Author: Arnd Bergmann Date: Fri May 16 10:08:22 2025 +0200 Documentation: update binutils-2.30 version reference The change to binutils-2.30 missed one reference in the Documentation that needs to be updated to match. Reported-by: Eric Biggers Signed-off-by: Arnd Bergmann commit 6c72fb8d8bd7bfaafdeda3a91c535ecf52283ec9 Author: James Morse Date: Thu May 15 16:58:40 2025 +0000 x86/resctrl: Move is_mba_sc() out of core.c is_mba_sc() is defined in core.c, but has no callers there. It does not access any architecture private structures. Move this to rdtgroup.c where the majority of callers are. This makes the move of the filesystem code to /fs/ cleaner. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-11-james.morse@arm.com commit e43a93c41982e82c1b703dd7fa9c1d965260fbb3 Author: Stefan Binding Date: Thu May 15 17:28:33 2025 +0100 ALSA: hda: cs35l41: Fix swapped l/r audio channels for Acer Helios laptops Fixes audio channel assignment from ACPI using configuration table. Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20250515162848.405055-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit d64cbb5ed9227566c068ac9300a85912234d10aa Author: Stefan Binding Date: Thu May 15 17:28:32 2025 +0100 ALSA: hda/realtek: Add support for Acer Helios Laptops using CS35L41 HDA Laptops use 2 CS35L41 Amps with HDA, using External boost with I2C. Similar to previous Acer laptops, these laptops also need the ALC255_FIXUP_PREDATOR_SUBWOOFER quirk to function properly. Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20250515162848.405055-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit a3d14d1602ca11429d242d230c31af8f822f614f Merge: 1c116e5569ef3b 7b9938a14460e8 Author: Takashi Iwai Date: Fri May 16 09:58:27 2025 +0200 Merge branch 'for-linus' into for-next Back-merge of 6.15 devel branch for further development of HD-audio stuff. Signed-off-by: Takashi Iwai commit 1c116e5569ef3bd33be1d6f687b0270c0932838d Author: Chen Ni Date: Fri May 16 15:09:38 2025 +0800 ALSA: usb: fcp: Use USB API functions rather than constants Use the function usb_endpoint_num() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250516070938.12520-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai commit f616e702a2093805e3d5b912c98743230f37699f Author: Chen Ni Date: Fri May 16 15:04:16 2025 +0800 ALSA: scarlett2: Use USB API functions rather than constants Use the function usb_endpoint_num() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250516070416.12458-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai commit 6f0ee1d220f5f3b31a2251f34a24656c503b58c4 Author: František Kučera Date: Thu May 15 14:23:46 2025 +0200 ALSA: usb-audio: Rename Pioneer mixer channel controls so alsamixer can show the controls in correct categories: capture/playback Fixes: 171bb5123fbc ("ALSA: usb-audio: Add Pioneer DJ DJM-V10 support") Signed-off-by: František Kučera Link: https://patch.msgid.link/20250515122345.3911-2-franta-linux@frantovo.cz Signed-off-by: Takashi Iwai commit bd59f6170968314c82e2b65f8bbaec55896b7a5f Author: Borislav Petkov (AMD) Date: Thu May 15 19:16:41 2025 +0200 futex: Fix kernel-doc comments Fix those: ./kernel/futex/futex.h:208: warning: Function parameter or struct member 'drop_hb_ref' not described in 'futex_q' ./kernel/futex/waitwake.c:343: warning: expecting prototype for futex_wait_queue(). Prototype was for futex_do_wait() instead ./kernel/futex/waitwake.c:594: warning: Function parameter or struct member 'task' not described in 'futex_wait_setup' Fixes: 93f1b6d79a73 ("futex: Move futex_queue() into futex_wait_setup()") Reported-by: Stephen Rothwell Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Acked-by: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250512185641.0450a99b@canb.auug.org.au # report Link: https://lore.kernel.org/r/20250515171641.24073-1-bp@kernel.org # submission commit f3fe7e1830c54abb24fcb0d6d98dd403e3e5fafd Author: Wei Wang Date: Tue May 13 11:07:39 2025 +0800 iommu/vt-d: Change dmar_ats_supported() to return boolean According to "Function return values and names" in coding-style.rst, the dmar_ats_supported() function should return a boolean instead of an integer. Also, rename "ret" to "supported" to be more straightforward. Signed-off-by: Wei Wang Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20250509140021.4029303-3-wei.w.wang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 3df2ebcee9fb3bd2597d1758795471a3a3b2203c Author: Wei Wang Date: Tue May 13 11:07:38 2025 +0800 iommu/vt-d: Eliminate pci_physfn() in dmar_find_matched_satc_unit() The function dmar_find_matched_satc_unit() contains a duplicate call to pci_physfn(). This call is unnecessary as pci_physfn() has already been invoked by the caller. Removing the redundant call simplifies the code and improves efficiency a bit. Signed-off-by: Wei Wang Link: https://lore.kernel.org/r/20250509140021.4029303-2-wei.w.wang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 868720fe15d1a6a1bddc28ad7b7e4b62448ee36b Author: Lu Baolu Date: Tue May 13 11:07:37 2025 +0800 iommu/vt-d: Replace spin_lock with mutex to protect domain ida The domain ID allocator is currently protected by a spin_lock. However, ida_alloc_range can potentially block if it needs to allocate memory to grow its internal structures. Replace the spin_lock with a mutex which allows sleep on block. Thus, the memory allocation flags can be updated from GFP_ATOMIC to GFP_KERNEL to allow blocking memory allocations if necessary. Introduce a new mutex, did_lock, specifically for protecting the domain ida. The existing spinlock will remain for protecting other intel_iommu fields. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250430021135.2370244-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit f93b4ac5929a5754fc4edba26b43d0c9fa57d576 Author: Lu Baolu Date: Tue May 13 11:07:36 2025 +0800 iommu/vt-d: Use ida to manage domain id Switch the intel iommu driver to use the ida mechanism for managing domain IDs, replacing the previous fixed-size bitmap. The previous approach allocated a bitmap large enough to cover the maximum number of domain IDs supported by the hardware, regardless of the actual number of domains in use. This led to unnecessary memory consumption, especially on systems supporting a large number of iommu units but only utilizing a small number of domain IDs. The ida allocator dynamically manages the allocation and freeing of integer IDs, only consuming memory for the IDs that are currently in use. This significantly optimizes memory usage compared to the fixed-size bitmap. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250430021135.2370244-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 6f5dc7658094610debe2fad1b09a2034e14857b1 Author: Jason Gunthorpe Date: Tue May 13 11:07:35 2025 +0800 iommu/vt-d: Restore WO permissions on second-level paging entries VT-D HW can do WO permissions on the second-stage but not the first-stage page table formats. The commit eea53c581688 ("iommu/vt-d: Remove WO permissions on second-level paging entries") wanted to make this uniform for VT-D by disabling the support for WO permissions in the second-stage. This isn't consistent with how other drivers are working. Instead if the underlying HW can support WO, it should. For instance AMD already supports WO on its second stage (v1) format and not its first (v2). If WO support needs to be discoverable it should be done through an iommu_domain capability flag. Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/0-v1-c26553717e90+65f-iommu_vtd_ss_wo_jgg@nvidia.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 51c33f333bbf7bdb6aa2a327e3a3e4bbb2591511 Author: Mario Limonciello Date: Mon May 12 12:30:32 2025 -0500 iommu/amd: Allow matching ACPI HID devices without matching UIDs A BIOS upgrade has changed the IVRS DTE UID for a device that no longer matches the UID in the SSDT. In this case there is only one ACPI device on the system with that _HID but the _UID mismatch. IVRS: ``` Subtable Type : F0 [Device Entry: ACPI HID Named Device] Device ID : 0060 Data Setting (decoded below) : 40 INITPass : 0 EIntPass : 0 NMIPass : 0 Reserved : 0 System MGMT : 0 LINT0 Pass : 1 LINT1 Pass : 0 ACPI HID : "MSFT0201" ACPI CID : 0000000000000000 UID Format : 02 UID Length : 09 UID : "\_SB.MHSP" ``` SSDT: ``` Device (MHSP) { Name (_ADR, Zero) // _ADR: Address Name (_HID, "MSFT0201") // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID ``` To handle this case; while enumerating ACPI devices in get_acpihid_device_id() count the number of matching ACPI devices with a matching _HID. If there is exactly one _HID match then accept it even if the UID doesn't match. Other operating systems allow this, but the current IVRS spec leaves some ambiguity whether to allow or disallow it. This should be clarified in future revisions of the spec. Output 'Firmware Bug' for this case to encourage it to be solved in the BIOS. Signed-off-by: Mario Limonciello Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20250512173129.1274275-1-superm1@kernel.org Signed-off-by: Joerg Roedel commit e436576b0231542f6f233279f0972989232575a8 Author: Rolf Eike Beer Date: Mon May 12 15:14:46 2025 +0200 iommu: make inclusion of arm/arm-smmu-v3 directory conditional Nothing in there is active if CONFIG_ARM_SMMU_V3 is not enabled, so the whole directory can depend on that switch as well. Fixes: e86d1aa8b60f ("iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory") Signed-off-by: Rolf Eike Beer Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/2434059.NG923GbCHz@devpool92.emlix.com Signed-off-by: Joerg Roedel commit 01c13a1d0e347a47d705fa16419d24569f3b00c4 Author: Rolf Eike Beer Date: Mon May 12 15:13:43 2025 +0200 iommu: make inclusion of riscv directory conditional Nothing in there is active if CONFIG_RISCV_IOMMU is not enabled, so the whole directory can depend on that switch as well. Fixes: 5c0ebbd3c6c6 ("iommu/riscv: Add RISC-V IOMMU platform device driver") Signed-off-by: Rolf Eike Beer Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/2235451.Icojqenx9y@devpool92.emlix.com Signed-off-by: Joerg Roedel commit 85ef671f9727aac580924cc1ce1ca0892524beee Author: Rolf Eike Beer Date: Mon May 12 15:12:52 2025 +0200 iommu: make inclusion of amd directory conditional Nothing in there is active if CONFIG_AMD_IOMMU is not enabled, so the whole directory can depend on that switch as well. Fixes: cbe94c6e1a7d ("iommu/amd: Move Kconfig and Makefile bits down into amd directory") Signed-off-by: Rolf Eike Beer Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/1894970.atdPhlSkOF@devpool92.emlix.com Signed-off-by: Joerg Roedel commit ddcc66cfe83ad0d6ec7cc5f94084767772fe5c9e Author: Rolf Eike Beer Date: Mon May 12 15:11:51 2025 +0200 iommu: make inclusion of intel directory conditional Nothing in there is active if CONFIG_INTEL_IOMMU is not enabled, so the whole directory can depend on that switch as well. Fixes: ab65ba57e3ac ("iommu/vt-d: Move Kconfig and Makefile bits down into intel directory") Signed-off-by: Rolf Eike Beer Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/3818749.MHq7AAxBmi@devpool92.emlix.com Signed-off-by: Joerg Roedel commit 9548feff840a05d61783e6316d08ed37e115f3b1 Author: Rolf Eike Beer Date: Mon May 12 15:10:44 2025 +0200 iommu: remove duplicate selection of DMAR_TABLE This is already done in intel/Kconfig. Fixes: 70bad345e622 ("iommu: Fix compilation without CONFIG_IOMMU_INTEL") Signed-off-by: Rolf Eike Beer Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/2232605.Mh6RI2rZIc@devpool92.emlix.com Signed-off-by: Joerg Roedel commit 04cfc1ae14f3e95cd5a72aceab42b1387442f495 Author: Colin Ian King Date: Wed Apr 30 16:18:53 2025 +0100 iommu/fsl_pamu: remove trailing space after \n There is an extraenous space after \n in a pr_debug message. Remove it. Signed-off-by: Colin Ian King Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250430151853.923614-1-colin.i.king@gmail.com Signed-off-by: Joerg Roedel commit 36e9e1ab594519972b0b468aec9b8e9591ddd0ac Author: Mihai Sain Date: Tue Apr 29 09:45:47 2025 +0300 ARM: dts: microchip: sama7g54_curiosity: Add fixed-partitions for spi-nor flash Add fixed-partitions for spi-nor flash to match the at91 boot flow and layout of the nand flash. Partitions can be listed from /proc/mtd: [root@sama7g54 ~]$ cat /proc/mtd | grep qspi mtd6: 00040000 00001000 "qspi1: at91bootstrap" mtd7: 00100000 00001000 "qspi1: u-boot" mtd8: 00040000 00001000 "qspi1: u-boot env" mtd9: 00080000 00001000 "qspi1: device tree" mtd10: 00600000 00001000 "qspi1: kernel" [root@sama7g54 ~]$ mtdinfo /dev/mtd10 mtd10 Name: qspi1: kernel Type: nor Eraseblock size: 4096 bytes, 4.0 KiB Amount of eraseblocks: 1536 (6291456 bytes, 6.0 MiB) Minimum input/output unit size: 1 byte Sub-page size: 1 byte Character device major/minor: 90:20 Bad blocks are allowed: false Device is writable: true Signed-off-by: Mihai Sain Link: https://lore.kernel.org/r/20250429064547.5807-1-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea commit e634fd7166105c1444249e57fdd01938911f5244 Author: Ryan Wanner Date: Mon Apr 14 14:41:28 2025 -0700 ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board Add RTT timer with backup register for SAMA7D65_Curiosity board. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/463581224a07bf122c6907d34a0c5c71b1cc73e1.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea commit 4b3d951f288c2ae4f082f13b22899ed190156a65 Author: Ryan Wanner Date: Mon Apr 14 14:41:27 2025 -0700 ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Add RTT support for SAMA7D65 SoC. The GPBR is added so the SoC is able to store the RTT time data. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/e8868ef06102241b47883ba10edaed751831be6d.1744666011.git.Ryan.Wanner@microchip.com [claudiu.beznea: keep nodes sorted by their address] Signed-off-by: Claudiu Beznea commit f5b56abe58b06c5882d0f00f53bfe5073462f694 Author: Ryan Wanner Date: Mon Apr 14 14:41:26 2025 -0700 ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support Add SRAM, secumod, UDDRC, and DDR3phy to enable support for low power modes. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/354ecd628fdd292d2125570a6b10a93cbecb7706.1744666011.git.Ryan.Wanner@microchip.com [claudiu.beznea: keep nodes sorted by their address] Signed-off-by: Claudiu Beznea commit 0bbc54da32f6c9d01b5d3baea93bdb4d49b880fb Author: Ryan Wanner Date: Tue Apr 1 09:13:22 2025 -0700 ARM: dts: microchip: sama7d65_curiosity: add EEPROM If the MAC address is not fetched and loaded by U-boot then Linux will have to load the address. The EEPROM and nvmem-layout to describe EUI48 MAC address regions. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/96ee6832d9b55acfae8d3560f625798025dfd89c.1743523114.git.Ryan.Wanner@microchip.com [claudiu.beznea: added nvmem properties in gmac0 node before the status one] Signed-off-by: Claudiu Beznea commit e65a13a2909658f9fce765d1127274d526c4d490 Author: Ryan Wanner Date: Tue Apr 1 09:13:21 2025 -0700 ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity Add MCP16502 to the sama7d65_curiosity board to control voltages in the MPU. The device is connected to twi 10 interface Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/60f6b7764227bb42c74404e8ca1388477183b7b5.1743523114.git.Ryan.Wanner@microchip.com [claudiu.beznea: drop regulator-suspend-voltage for ldo2 as it is not needed] Signed-off-by: Claudiu Beznea commit 7116fb2f15cbc16bc3567468816699fa95e5850e Author: Ryan Wanner Date: Tue Apr 1 09:13:20 2025 -0700 ARM: dts: microchip: sama7d65: Enable GMAC interface Enable GMAC0 interface for sama7d65_curiosity board. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/fca0c1deb74006cdedbdd71061dec9dabf1e9b9a.1743523114.git.Ryan.Wanner@microchip.com [claudiu.beznea: move gmac0 node to keep the nodes alphanumerically sorted, dropped status property on the PHY node, added missing blank line] Signed-off-by: Claudiu Beznea commit b51e4aea3ecfe81053dfbb20411b578fc8c6a7ea Author: Ryan Wanner Date: Tue Apr 1 09:13:19 2025 -0700 ARM: dts: microchip: sama7d65: Add FLEXCOMs to sama7d65 SoC Add FLEXCOMs to the SAMA7D65 SoC device tree. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/d474fcd850978261ac889950ac1c3a36bc6d3926.1743523114.git.Ryan.Wanner@microchip.com [claudiu.beznea: use vendor specific properties at the end of the node, align DMA entries, add missing spaces] Signed-off-by: Claudiu Beznea commit 37aa981a332003a97957ec912dbb4fb1da84e611 Author: Ryan Wanner Date: Tue Apr 1 09:13:18 2025 -0700 ARM: dts: microchip: sama7d65: Add gmac interfaces for sama7d65 SoC Add support for GMAC interfaces on SAMA7D65 SoC. Signed-off-by: Ryan Wanner Link: https://lore.kernel.org/r/05b107796b6f3a173d0dd0a5b2107b675cfd994e.1743523114.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea commit d81bab116b485643a08f2147165cc257b3734188 Author: Brian Masney Date: Fri Mar 28 14:38:58 2025 -0400 tools/bootconfig: specify LDFLAGS as an argument to CC Explicitly specify LDFLAGS as an argument to CC so that this can be overridden by the user. Link: https://lore.kernel.org/all/20250328183858.1417835-3-bmasney@redhat.com/ Signed-off-by: Brian Masney Signed-off-by: Masami Hiramatsu (Google) commit 9c8cedef3d2d55a327c5122fe7cdff0e1fd8a157 Author: Brian Masney Date: Fri Mar 28 14:38:57 2025 -0400 tools/bootconfig: allow overriding CFLAGS assignment Allow overriding the CFLAGS assignment so that the user can pass in an outside value. Link: https://lore.kernel.org/all/20250328183858.1417835-2-bmasney@redhat.com/ Signed-off-by: Brian Masney Signed-off-by: Masami Hiramatsu (Google) commit 08effa6b77f7dbb4727f811daef0f6085c0d63c8 Author: Praveen Balakrishnan Date: Fri May 16 00:47:57 2025 +0100 docs: ipmi: fix spelling and grammar mistakes Corrected various spelling and grammatical mistakes in Documentation/driver-api/ipmi.rst to improve readability. No changes to the technical content has been made. Signed-off-by: Praveen Balakrishnan Message-ID: <20250515234757.19710-1-praveen.balakrishnan@magd.ox.ac.uk> Reviewed-by: Randy Dunlap Signed-off-by: Corey Minyard commit 894fbb55e60cab4ea740f6c65a08b5f8155221f4 Author: Vladimir Oltean Date: Wed May 14 17:32:49 2025 +0300 net: stmmac: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the stmmac driver to the new API, so that timestamping configuration can be removed from the ndo_eth_ioctl() path completely. The existing timestamping calls are guarded by netif_running(). For stmmac_hwtstamp_get() that is probably unnecessary, since no hardware access is performed. But for stmmac_hwtstamp_set() I've preserved it, since at least some IPs probably need pm_runtime_resume_and_get() to access registers, which is otherwise called by __stmmac_open(). Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250514143249.1808377-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 3cc35394fac15d533639c9c9e42f28d28936a4a0 Author: Chin-Yen Lee Date: Tue May 13 20:52:03 2025 +0800 wifi: rtw89: fix firmware scan delay unit for WiFi 6 chips The scan delay unit of firmware command for WiFi 6 chips is microsecond, but is wrong set now and lead to abnormal work for net-detect. Correct the unit to avoid the error. Fixes: e99dd80c8a18 ("wifi: rtw89: wow: add delay option for net-detect") Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250513125203.6858-1-pkshih@realtek.com commit 4c2c372de2e108319236203cce6de44d70ae15cd Author: Alexey Kodanev Date: Tue May 13 12:13:04 2025 +0000 wifi: rtw88: fix the 'para' buffer size to avoid reading out of bounds Set the size to 6 instead of 2, since 'para' array is passed to 'rtw_fw_bt_wifi_control(rtwdev, para[0], ¶[1])', which reads 5 bytes: void rtw_fw_bt_wifi_control(struct rtw_dev *rtwdev, u8 op_code, u8 *data) { ... SET_BT_WIFI_CONTROL_DATA1(h2c_pkt, *data); SET_BT_WIFI_CONTROL_DATA2(h2c_pkt, *(data + 1)); ... SET_BT_WIFI_CONTROL_DATA5(h2c_pkt, *(data + 4)); Detected using the static analysis tool - Svace. Fixes: 4136214f7c46 ("rtw88: add BT co-existence support") Signed-off-by: Alexey Kodanev Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250513121304.124141-1-aleksei.kodanev@bell-sw.com commit abb258eb78a9dd9c76a298f4a73c74ffeef06597 Author: Vladimir Oltean Date: Wed May 14 18:19:30 2025 +0300 net: lan743x: implement ndo_hwtstamp_get() Permit programs such as "hwtstamp_ctl -i eth0" to retrieve the current timestamping configuration of the NIC, rather than returning "Device driver does not have support for non-destructive SIOCGHWTSTAMP." The driver configures all channels with the same timestamping settings. On TX, retrieve the settings of the first channel, those should be representative for the entire NIC. On RX, save the filter settings in a new adapter field. Signed-off-by: Vladimir Oltean Reviewed-by: Gerhard Engleder Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250514151931.1988047-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 958a857a626cd9144889a66115eb4230d922a2f5 Author: Vladimir Oltean Date: Wed May 14 18:19:29 2025 +0300 net: lan743x: convert to ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the lan743x driver to the new API, so that timestamping configuration can be removed from the ndo_eth_ioctl() path completely. Signed-off-by: Vladimir Oltean Reviewed-by: Gerhard Engleder Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250514151931.1988047-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b178c1a23c5f53bdaad4f915e01d674169206c28 Author: Zong-Zhe Yang Date: Sun May 11 11:52:17 2025 +0800 wifi: rtw89: mcc: avoid redundant recalculations if no chance to improve MCC will track the changes of beacon offset, and trigger a recalculation when the difference is larger than the tolerance. It means that a better pattern is expected after recalculating. However, in the cases which get a worse beacon offset, there is no chance to improve the pattern even if recalculating. So, bypass them. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-7-pkshih@realtek.com commit 7cf346fcf99815a29b2c18409e617f9cf2c40a6d Merge: e31b74b1078f8a eff82fb0d266ee Author: Dave Airlie Date: Fri May 16 10:44:43 2025 +1000 Merge tag 'drm-intel-next-fixes-2025-05-15' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Stop writing ALPM registers when PSR is enabled - Use the correct connector while computing the link BPP limit on MST Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aCWlWk5rTE7TH1pN@jlahtine-mobl commit 122b74ac9b9d19cfbc5f319ca5c0da0efc8be9fb Author: Zong-Zhe Yang Date: Sun May 11 11:52:16 2025 +0800 wifi: rtw89: mcc: deal with non-periodic NoA Originally, MCC just took periodic NoA into account. When the connected GO announces non-periodic NoA and GC side is during MCC, sometimes GC cannot receive beacons well if the MCC scheduling conflicts with the non-periodic NoA planning. After the loss exceeds the tolerable amount, beacon filter will report connection loss. However, in this case, the loss is acceptable. So now, MCC will calculate the range of non-periodic NoA. And then, don't care beacon loss during the range. Besides, rtw89_mcc_fill_role_limit() only makes sense for GC. Remove the redundant check of GO. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-6-pkshih@realtek.com commit eec9dfad1b217fadb82b6e87827a234620ed6868 Author: Zong-Zhe Yang Date: Sun May 11 11:52:15 2025 +0800 wifi: rtw89: mcc: introduce calculation of anchor pattern In the cases that two MCC roles' TBTTs are too close or too far, original MCC pattern calculation logic will lead to a result that both roles might not cover its TBTT with sufficient time. Introduce a new calculation logic called anchor pattern for these corner cases. It allows to choose one role as anchor to put its TBTT in the middle of its duration directly. For now, a P2P role has a higher priority to be chosen as an anchor. Then, if able, another role might need to depend on courtesy mechanism to take time from anchor. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-5-pkshih@realtek.com commit 7662708c00af2edd73d68aa17f5686163818f646 Author: Zong-Zhe Yang Date: Sun May 11 11:52:14 2025 +0800 wifi: rtw89: mcc: add courtesy mechanism conditions to P2P roles In one enablement of courtesy mechanism, there is one provider and one receiver. And, receiver can use the provider's time in a given period. But, to make P2P NoA protocol work as expected as possible, GO should be present at the time it doesn't announce absent, and GC should not use the time when GO announces absent. So, don't enable courtesy mechanism if provider is GO or receiver is GC. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-4-pkshih@realtek.com commit 8ee99b998fc4a0c1aece047bb2f933903cf35f23 Author: Zong-Zhe Yang Date: Sun May 11 11:52:13 2025 +0800 wifi: rtw89: mcc: drop queued chanctx changes when stopping When MCC is about to stop, there may be some chanctx changes which are queued for work but have not yet been run. To avoid these changes from being processed in a wrong state (e.g. next new MCC instance), cancel the queued work and drop queued changes. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-3-pkshih@realtek.com commit 46b607974866f59d707d19fc6d954bb3d2c15512 Author: Zong-Zhe Yang Date: Sun May 11 11:52:12 2025 +0800 wifi: rtw89: mcc: pass whom to stop at when pausing chanctx When stopping MCC, FW can stop at a given MCC role following H2C command. When pausing chanctx during MCC, in general, the caller expects to process things with its chanctx. So, pass the caller as target and let FW stop MCC at it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250511035217.10410-2-pkshih@realtek.com commit f24d0d8c3cd7e4237f802c4d2f3bd4ac04572948 Author: Bitterblue Smith Date: Sat May 10 16:12:34 2025 +0300 wifi: rtw88: Fix the random "error beacon valid" messages for USB All the USB devices have a problem in AP mode: uploading the updated beacon to the chip's reserved page can randomly fail: [34996.474304] rtw88_8723du 1-2:1.2: error beacon valid [34996.474788] rtw88_8723du 1-2:1.2: failed to download drv rsvd page [34999.956369] rtw88_8723du 1-2:1.2: error beacon valid [34999.956846] rtw88_8723du 1-2:1.2: failed to download drv rsvd page [34999.956855] rtw88_8723du 1-2:1.2: failed to download beacon [35017.978296] rtw88_8723du 1-2:1.2: error beacon valid [35017.978805] rtw88_8723du 1-2:1.2: failed to download drv rsvd page [35017.978823] rtw88_8723du 1-2:1.2: failed to download beacon [35023.200395] rtw88_8723du 1-2:1.2: error beacon valid [35023.200869] rtw88_8723du 1-2:1.2: failed to download drv rsvd page [35023.200875] rtw88_8723du 1-2:1.2: failed to download beacon [35478.680547] rtw88_8723du 1-2:1.2: error beacon valid [35478.681023] rtw88_8723du 1-2:1.2: failed to download drv rsvd page Disable some beacon-related hardware functions before uploading the beacon and enable them again after. Tested with RTL8723DU, RTL8812BU, RTL8822CE. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/c248c40a-d432-47ed-90e0-d81ee6c32464@gmail.com commit 80fe0bc1659c0ccc79d082e426fa376be5df9c04 Author: Bitterblue Smith Date: Sat May 10 15:22:24 2025 +0300 wifi: rtw88: usb: Upload the firmware in bigger chunks RTL8811AU stops responding during the firmware download on some systems: [ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0 [ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0 [ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110 [ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110 [ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode [ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110 Maybe it takes too long when writing the firmware 4 bytes at a time. Write 196 bytes at a time for RTL8821AU, RTL8811AU, and RTL8812AU, and 254 bytes at a time for RTL8723DU. These are the sizes used in their official drivers. Tested with all these chips. Cc: stable@vger.kernel.org Link: https://github.com/lwfinger/rtw88/issues/344 Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/43f1daad-3ec0-4a3b-a50c-9cd9eb2c2f52@gmail.com commit 490340faddea461319652ce36dbc7c1b4482c35e Author: Bitterblue Smith Date: Sat May 10 15:21:25 2025 +0300 wifi: rtw88: usb: Reduce control message timeout to 500 ms RTL8811AU stops responding during the firmware download on some systems: [ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0 [ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0 [ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110 [ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110 [ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode [ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110 Each write takes 30 seconds to fail because that's the timeout currently used for control messages in rtw_usb_write(). In this scenario the firmware download takes at least 2000 seconds. Because this is done from the USB probe function, the long delay makes other things in the system hang. Reduce the timeout to 500 ms. This is the value used by the official USB wifi drivers from Realtek. Of course this only makes things hang for ~30 seconds instead of ~30 minutes. It doesn't fix the firmware download. Tested with RTL8822CU, RTL8812BU, RTL8811CU, RTL8814AU, RTL8811AU, RTL8812AU, RTL8821AU, RTL8723DU. Cc: stable@vger.kernel.org Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support") Link: https://github.com/lwfinger/rtw88/issues/344 Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/1e35dd26-3f10-40b1-b2b4-f72184a26611@gmail.com commit dda27a47c036d981ec664ac57e044a21035ffe12 Author: Ping-Ke Shih Date: Fri May 9 09:34:33 2025 +0800 wifi: rtw89: pci: enlarge retry times of RX tag to 1000 RX tag is sequence number to ensure RX DMA is complete. On platform Gigabyte X870 AORUS ELITE WIFI7, sometimes it needs longer retry times to complete RX DMA, or driver throws warnings and connection drops: rtw89_8922ae 0000:07:00.0: failed to update 162 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to update 163 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to update 32 RXBD info: -11 rtw89_8922ae 0000:07:00.0: failed to release TX skbs Fixes: 0bc7d1d4e63c ("wifi: rtw89: pci: validate RX tag for RXQ and RPQ") Reported-by: Samuel Reyes Closes: https://lore.kernel.org/linux-wireless/f4355539f3ac46bbaf9c586d059a8cbb@realtek.com/T/#t Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250509013433.7573-1-pkshih@realtek.com commit d105652b33245162867ac769bea336976e67efb8 Author: Dian-Syuan Yang Date: Wed May 7 11:12:03 2025 +0800 wifi: rtw89: leave idle mode when setting WEP encryption for AP mode Due to mac80211 triggering the hardware to enter idle mode, it fails to install WEP key causing connected station can't ping successfully. Currently, it forces the hardware to leave idle mode before driver adding WEP keys. Signed-off-by: Dian-Syuan Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250507031203.8256-1-pkshih@realtek.com commit a70cf04b08f44f41bce14659aa7012674b15d9de Author: Ping-Ke Shih Date: Tue May 6 09:53:56 2025 +0800 wifi: rtw89: pci: configure manual DAC mode via PCI config API only To support 36-bit DMA, configure chip proprietary bit via PCI config API or chip DBI interface. However, the PCI device mmap isn't set yet and the DBI is also inaccessible via mmap, so only if the bit can be accessible via PCI config API, chip can support 36-bit DMA. Otherwise, fallback to 32-bit DMA. With NULL mmap address, kernel throws trace: BUG: unable to handle page fault for address: 0000000000001090 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: Oops: 0002 [#1] PREEMPT SMP PTI CPU: 1 UID: 0 PID: 71 Comm: irq/26-pciehp Tainted: G OE 6.14.2-061402-generic #202504101348 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE RIP: 0010:rtw89_pci_ops_write16+0x12/0x30 [rtw89_pci] RSP: 0018:ffffb0ffc0acf9d8 EFLAGS: 00010206 RAX: ffffffffc158f9c0 RBX: ffff94865e702020 RCX: 0000000000000000 RDX: 0000000000000718 RSI: 0000000000001090 RDI: ffff94865e702020 RBP: ffffb0ffc0acf9d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000015 R13: 0000000000000719 R14: ffffb0ffc0acfa1f R15: ffffffffc1813060 FS: 0000000000000000(0000) GS:ffff9486f3480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000001090 CR3: 0000000090440001 CR4: 00000000000626f0 Call Trace: rtw89_pci_read_config_byte+0x6d/0x120 [rtw89_pci] rtw89_pci_cfg_dac+0x5b/0xb0 [rtw89_pci] rtw89_pci_probe+0xa96/0xbd0 [rtw89_pci] ? __pfx___device_attach_driver+0x10/0x10 ? __pfx___device_attach_driver+0x10/0x10 local_pci_probe+0x47/0xa0 pci_call_probe+0x5d/0x190 pci_device_probe+0xa7/0x160 really_probe+0xf9/0x370 ? pm_runtime_barrier+0x55/0xa0 __driver_probe_device+0x8c/0x140 driver_probe_device+0x24/0xd0 __device_attach_driver+0xcd/0x170 bus_for_each_drv+0x99/0x100 __device_attach+0xb4/0x1d0 device_attach+0x10/0x20 pci_bus_add_device+0x59/0x90 pci_bus_add_devices+0x31/0x80 pciehp_configure_device+0xaa/0x170 pciehp_enable_slot+0xd6/0x240 pciehp_handle_presence_or_link_change+0xf1/0x180 pciehp_ist+0x162/0x1c0 irq_thread_fn+0x24/0x70 irq_thread+0xef/0x1c0 ? __pfx_irq_thread_fn+0x10/0x10 ? __pfx_irq_thread_dtor+0x10/0x10 ? __pfx_irq_thread+0x10/0x10 kthread+0xfc/0x230 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x47/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Fixes: 1fd4b3fe52ef ("wifi: rtw89: pci: support 36-bit PCI DMA address") Reported-by: Bitterblue Smith Closes: https://lore.kernel.org/linux-wireless/ccaf49b6-ff41-4917-90f1-f53cadaaa0da@gmail.com/T/#u Closes: https://github.com/openwrt/openwrt/issues/17025 Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250506015356.7995-1-pkshih@realtek.com commit fc78561595e2fc6ceb8da56b083847227ba9320e Author: Dave Jiang Date: Wed May 14 17:09:23 2025 -0700 cxl: doc/linux/access-coordinates Update access coordinates calculation methods Add documentation on how to calculate the access coordinates for a given CXL region in detail. Reviewed-by: Gregory Price Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20250515000923.2590820-4-dave.jiang@intel.com Signed-off-by: Dave Jiang commit 1ce91b37b2661ebeca71982eadf3e3d5e0584a2f Author: Dave Jiang Date: Wed May 14 17:09:22 2025 -0700 cxl: docs/platform/acpi/srat Add generic target documentation Add description in the SRAT document to describe the Generic Port Affinity sub-table. Reviewed-by: Gregory Price Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20250515000923.2590820-3-dave.jiang@intel.com Signed-off-by: Dave Jiang commit 49cee8fe5e6c6af2c6a76448840ae2eef9641084 Author: Dave Jiang Date: Wed May 14 17:09:21 2025 -0700 cxl: docs/platform/cdat reference documentation Add documentation for CDAT structures for CXL usages. Reviewed-by: Gregory Price Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20250515000923.2590820-2-dave.jiang@intel.com Signed-off-by: Dave Jiang commit f97bdc61c76f654effa7b78e10338e64794da9fd Author: Alison Schofield Date: Mon May 12 14:42:22 2025 -0700 Documentation: Update the CXL Maturity Map Changes for extended-linear cache, hetero-interleave, and HPA->DPA address translation. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512214225.1389484-1-alison.schofield@intel.com Signed-off-by: Dave Jiang commit d51b9d81f7883f526b26e3ab903e646274aebeb1 Merge: 74d3da135f69a9 82f2b0b97b36ee Author: Dmitry Torokhov Date: Thu May 15 16:20:39 2025 -0700 Merge tag 'v6.15-rc6' into next Sync up with mainline to bring in xpad controller changes. commit 1107dc4c5b06188a3fb4897ceb197eb320a52e85 Author: Yosry Ahmed Date: Tue Mar 18 16:05:10 2025 +0000 selftests/run_kselftest.sh: Use readlink if realpath is not available 'realpath' is not always available, fallback to 'readlink -f' if is not available. They seem to work equally well in this context. Link: https://lore.kernel.org/r/20250318160510.3441646-1-yosry.ahmed@linux.dev Signed-off-by: Yosry Ahmed Signed-off-by: Shuah Khan commit 87948df5af4bb27effb0a187abaf54f41a54fe35 Author: Jakub Kicinski Date: Tue May 13 15:20:11 2025 -0700 tools: ynl-gen: array-nest: support arrays of nests TC needs arrays of nests, but just a put for now. Fairly straightforward addition. Link: https://patch.msgid.link/20250513222011.844106-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7ee4fa04a8a27c7790a8fcd3093de3eb51aebb95 Author: Chen Ni Date: Wed May 14 23:33:54 2025 +0100 cdrom: Remove unnecessary NULL check before unregister_sysctl_table() unregister_sysctl_table() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Link: https://lore.kernel.org/lkml/20250514032139.2317578-1-nichen@iscas.ac.cn Reviewed-by: Phillip Potter Link: https://lore.kernel.org/lkml/aCURuvkmz-fw3Nnp@equinox Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20250514223354.1429-2-phil@philpotter.co.uk Signed-off-by: Jens Axboe commit 12bf25d1659b1ec55e44fad2485155707062df79 Author: Sandeep Dhavale Date: Tue May 6 15:57:41 2025 -0700 erofs: lazily initialize per-CPU workers and CPU hotplug hooks Currently, when EROFS is built with per-CPU workers, the workers are started and CPU hotplug hooks are registered during module initialization. This leads to unnecessary worker start/stop cycles during CPU hotplug events, particularly on Android devices that frequently suspend and resume. This change defers the initialization of per-CPU workers and the registration of CPU hotplug hooks until the first EROFS mount. This ensures that these resources are only allocated and managed when EROFS is actually in use. The tear down of per-CPU workers and unregistration of CPU hotplug hooks still occurs during z_erofs_exit_subsystem(), but only if they were initialized. Signed-off-by: Sandeep Dhavale Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20250506225743.308517-1-dhavale@google.com Signed-off-by: Gao Xiang commit 4eb56b0761e75034dd35067a81da4c280c178262 Author: Gao Xiang Date: Wed May 14 20:08:20 2025 +0800 erofs: refine readahead tracepoint - trace_erofs_readpages => trace_erofs_readahead; - Rename a redundant statement `nrpages = readahead_count(rac);`; - Move the tracepoint to the beginning of z_erofs_readahead(). Signed-off-by: Gao Xiang Reviewed-by: Hongbo Li Link: https://lore.kernel.org/r/20250514120820.2739288-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang commit e31b74b1078f8a9b2b1a2693044908d262d96715 Merge: e11c70ccd5a114 07c39476a75bf2 Author: Dave Airlie Date: Fri May 16 07:29:33 2025 +1000 Merge tag 'mediatek-drm-next-20250515' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next - 20250515 1. Prepare for support MT8195/88 HDMIv2 and DDCv2 2. DPI: Cleanups and add support for more formats 3. Cleanups and sanitization 4. Replace custom compare_dev with component_compare_of Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://lore.kernel.org/r/20250514233647.15907-1-chunkuang.hu@kernel.org commit 1e7dbad6d1fe4b35ccd2aa8fea9496d837af4430 Author: Chuck Lever Date: Mon Apr 28 15:37:02 2025 -0400 SUNRPC: Bump the maximum payload size for the server Increase the maximum server-side RPC payload to 4MB. The default remains at 1MB. An API to adjust the operational maximum was added in 2006 by commit 596bbe53eb3a ("[PATCH] knfsd: Allow max size of NFSd payload to be configured"). To adjust the operational maximum using this API, shut down the NFS server. Then echo a new value into: /proc/fs/nfsd/max_block_size And restart the NFS server. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 8a81f16de64fc4e654a2a85ec46c57a8e43819b8 Author: Chuck Lever Date: Mon Apr 28 15:37:01 2025 -0400 NFSD: Add a "default" block size We'd like to increase the maximum r/wsize that NFSD can support, but without introducing possible regressions. So let's add a default setting of 1MB. A subsequent patch will raise the maximum value but leave the default alone. No behavior change is expected. Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit cdc29154d327534c50d65e1a9ad7023a03b21034 Author: Chuck Lever Date: Mon Apr 28 15:37:00 2025 -0400 NFSD: Remove NFSSVC_MAXBLKSIZE_V2 macro The 8192-byte maximum is a protocol-defined limit, and we already have a symbolic constant defined whose name matches the name of the limit defined in the protocol. Replace the duplicate. No change in behavior is expected. Reviewed-by: NeilBrown Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever commit 58d721684d13fe8efd02a773137e5e8b0911ac14 Author: Chuck Lever Date: Mon Apr 28 15:36:59 2025 -0400 NFSD: Remove NFSD_BUFSIZE Clean up: The documenting comment for NFSD_BUFSIZE is quite stale. NFSD_BUFSIZE is used only for NFSv4 Reply these days; never for NFSv2 or v3, and never for RPC Calls. Even so, the byte count estimate does not include the size of the NFSv4 COMPOUND Reply HEADER or the RPC auth flavor. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 0af165bb903cdc005066494cc931076dafd76894 Author: Chuck Lever Date: Mon Apr 28 15:36:58 2025 -0400 sunrpc: Remove the RPCSVC_MAXPAGES macro It is no longer used. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 56ab43f50d708e155f013ef60cc1b4fe39bed42e Author: Chuck Lever Date: Mon Apr 28 15:36:57 2025 -0400 svcrdma: Adjust the number of entries in svc_rdma_send_ctxt::sc_pages Allow allocation of more entries in the sc_pages[] array when the maximum size of an RPC message is increased. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 81381d1a90dea186ce4585d9bd3cdc40b50e9c48 Author: Chuck Lever Date: Mon Apr 28 15:36:56 2025 -0400 svcrdma: Adjust the number of entries in svc_rdma_recv_ctxt::rc_pages Allow allocation of more entries in the rc_pages[] array when the maximum size of an RPC message is increased. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit f4126823c1fd677d9811a0252830c6c73ddb7e99 Author: Chuck Lever Date: Mon Apr 28 15:36:55 2025 -0400 sunrpc: Adjust size of socket's receive page array dynamically As a step towards making NFSD's maximum rsize and wsize variable at run-time, make sk_pages a flexible array. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 1259560b988c959abf9b84da0b9e56c2863b6837 Author: Chuck Lever Date: Tue May 6 20:15:08 2025 -0400 SUNRPC: Remove svc_rqst :: rq_vec Clean up: This array is no longer used. On a system with 8-byte pointers and 4KB pages, pahole reports that the rq_vec[] array accounts for 4144 bytes. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b406c6b78198f123e08061c45d56803459785975 Author: Chuck Lever Date: Thu May 8 11:56:40 2025 -0400 SUNRPC: Remove svc_fill_write_vector() Clean up: This API is no longer used. Signed-off-by: Chuck Lever commit 1969823caf163593c82df9f9589074720bed2eea Author: Chuck Lever Date: Tue May 6 16:42:25 2025 -0400 NFSD: Use rqstp->rq_bvec in nfsd_iter_write() If we can get rid of all uses of rq_vec, then it can be removed. Replace one use of rqstp::rq_vec with rqstp::rq_bvec. The feeling of layering violation grows stronger now that is included in fs/nfsd/vfs.c. Suggested-by: Christoph Hellwig Signed-off-by: Chuck Lever commit 62bf165c04bfbba96af85ec649a435e38ff0b5b0 Author: Chuck Lever Date: Thu May 8 11:21:17 2025 -0400 SUNRPC: Export xdr_buf_to_bvec() Prepare xdr_buf_to_bvec() to be invoked from upper layer protocol code. Signed-off-by: Chuck Lever commit f2e597353d50f05a600dddbf84a362839cf1c224 Author: Chuck Lever Date: Fri May 9 13:39:23 2025 -0400 NFSD: De-duplicate the svc_fill_write_vector() call sites All three call sites do the same thing. I'm struggling with this a bit, however. struct xdr_buf is an XDR layer object and unmarshaling a WRITE payload is clearly a task intended to be done by the proc and xdr functions, not by VFS. This feels vaguely like a layering violation. Signed-off-by: Chuck Lever commit 2a48f3adc2ddb922ea5dc602e2e52952df91a99c Author: Chuck Lever Date: Tue May 6 14:33:11 2025 -0400 NFSD: Use rqstp->rq_bvec in nfsd_iter_read() If we can get rid of all uses of rq_vec, then it can be removed. Replace one use of rqstp::rq_vec with rqstp::rq_bvec. Suggested-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 59cf7346542babdaae99e72365174eab4fa276ac Author: Chuck Lever Date: Mon Apr 28 15:36:54 2025 -0400 sunrpc: Replace the rq_bvec array with dynamically-allocated memory As a step towards making NFSD's maximum rsize and wsize variable at run-time, replace the fixed-size rq_bvec[] array in struct svc_rqst with a chunk of dynamically-allocated memory. The rq_bvec[] array contains enough bio_vecs to handle each page in a maximum size RPC message. On a system with 8-byte pointers and 4KB pages, pahole reports that the rq_bvec[] array is 4144 bytes. This patch replaces that array with a single 8-byte pointer field. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit ed603bcf4feac05df937bf78bc7feb75f988a971 Author: Chuck Lever Date: Mon Apr 28 15:36:52 2025 -0400 sunrpc: Replace the rq_pages array with dynamically-allocated memory As a step towards making NFSD's maximum rsize and wsize variable at run-time, replace the fixed-size rq_vec[] array in struct svc_rqst with a chunk of dynamically-allocated memory. On a system with 8-byte pointers and 4KB pages, pahole reports that the rq_pages[] array is 2080 bytes. This patch replaces that with a single 8-byte pointer field. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 1a58791292ebb58cde3c0c708e41bb063b9dec6f Author: Chuck Lever Date: Mon Apr 28 15:36:51 2025 -0400 sunrpc: Remove backchannel check in svc_init_buffer() The server's backchannel uses struct svc_rqst, but does not use the pages in svc_rqst::rq_pages. It's rq_arg::pages and rq_res::pages comes from the RPC client's page allocator. Currently, svc_init_buffer() skips allocating pages in rq_pages for that reason. Except that, svc_rqst::rq_pages is filled anyway when a backchannel svc_rqst is passed to svc_recv() -> and then to svc_alloc_arg(). This isn't really a problem at the moment, except that these pages are allocated but then never used, as far as I can tell. The problem is that later in this series, in addition to populating the entries of rq_pages[], svc_init_buffer() will also allocate the memory underlying the rq_pages[] array itself. If that allocation is skipped, then svc_alloc_args() chases a NULL pointer for ingress backchannel requests. This approach avoids introducing extra conditional logic in svc_alloc_args(), which is a hot path. Acked-by: Jeff Layton Reviewed-by: NeilBrown Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever commit eff042ddf4b9587fa7394d502b93e06ec6015177 Author: Chuck Lever Date: Mon Apr 28 15:36:50 2025 -0400 sunrpc: Add a helper to derive maxpages from sv_max_mesg This page count is to be used to allocate various arrays of pages and bio_vecs, replacing the fixed RPCSVC_MAXPAGES value. The documenting comment is somewhat stale -- of course NFSv4 COMPOUND procedures may have multiple payloads. Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 59243315890578a040a2d50ae9e001a2ef2fcb62 Author: Chuck Lever Date: Mon Apr 28 15:36:49 2025 -0400 svcrdma: Reduce the number of rdma_rw contexts per-QP There is an upper bound on the number of rdma_rw contexts that can be created per QP. This invisible upper bound is because rdma_create_qp() adds one or more additional SQEs for each ctxt that the ULP requests via qp_attr.cap.max_rdma_ctxs. The QP's actual Send Queue length is on the order of the sum of qp_attr.cap.max_send_wr and a factor times qp_attr.cap.max_rdma_ctxs. The factor can be up to three, depending on whether MR operations are required before RDMA Reads. This limit is not visible to RDMA consumers via dev->attrs. When the limit is surpassed, QP creation fails with -ENOMEM. For example: svcrdma's estimate of the number of rdma_rw contexts it needs is three times the number of pages in RPCSVC_MAXPAGES. When MAXPAGES is about 260, the internally-computed SQ length should be: 64 credits + 10 backlog + 3 * (3 * 260) = 2414 Which is well below the advertised qp_max_wr of 32768. If RPCSVC_MAXPAGES is increased to 4MB, that's 1040 pages: 64 credits + 10 backlog + 3 * (3 * 1040) = 9434 However, QP creation fails. Dynamic printk for mlx5 shows: calc_sq_size:618:(pid 1514): send queue size (9326 * 256 / 64 -> 65536) exceeds limits(32768) Although 9326 is still far below qp_max_wr, QP creation still fails. Because the total SQ length calculation is opaque to RDMA consumers, there doesn't seem to be much that can be done about this except for consumers to try to keep the requested rdma_rw ctxt count low. Fixes: 2da0f610e733 ("svcrdma: Increase the per-transport rw_ctx count") Reviewed-by: NeilBrown Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever commit d50108706a63dfd896db42172bf9f6aebec219c5 Author: E Shattow Date: Fri May 2 03:30:44 2025 -0700 riscv: dts: starfive: jh7110-common: bootph-pre-ram hinting needed by boot loader Add bootph-pre-ram hinting to jh7110-common.dtsi: - i2c5_pins and i2c-pins subnode for connection to eeprom - eeprom node - qspi flash configuration subnode - memory node - mmc0 for eMMC - mmc1 for SD Card - uart0 for serial console With this the U-Boot SPL secondary program loader may drop such overrides. Signed-off-by: E Shattow Acked-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 635918111453aa5c6c74d9dec9fe1f2037e531ed Author: E Shattow Date: Fri May 2 03:30:43 2025 -0700 riscv: dts: starfive: jh7110-common: add eeprom node to i2c5 StarFive VisionFive2 and similar JH7110 boards have an eeprom compatible with Atmel 24c04. Add the node so this may be used with the at24 driver. Signed-off-by: E Shattow Reviewed-by: Hal Feng Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 59404dceb303712faa9507b27c6fb14d8629c528 Author: E Shattow Date: Fri May 2 03:30:42 2025 -0700 riscv: dts: starfive: jh7110-common: qspi flash setting read-delay 2 cycles max 100MHz Use qspi flash read-delay and spi-max-frequency settings compatible with U-Boot bootloader. Observations from testing on Pine64 Star64 hardware within U-Boot bootloader and read-delay=2 are spi-max-frequency less than 49.8MHz fails to write, corrupt data writes at 25MHz to 49.799999MHz, and valid data writes at 49.8MHz to 100MHz (not tested above 100MHz). No valid spi-max-frequency was found for 1 Reviewed-by: Hal Feng Acked-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 724a6718ce216f904192211f71973643f97384ec Author: E Shattow Date: Fri May 2 03:30:41 2025 -0700 riscv: dts: starfive: jh7110-common: add CPU BUS PERH QSPI clocks to syscrg Add syscrg clock assignments for CPU, BUS, PERH, and QSPI as required by boot loader before kernel. Signed-off-by: E Shattow Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 71385a893cea3e3bc752aa75e3e616073cda7889 Author: Icenowy Zheng Date: Thu Apr 24 14:06:05 2025 +0800 riscv: dts: starfive: jh7110-common: use macros for MMC0 pins The pin names of MMC0 pinmux is defined in the pinctrl dt binding header associated with starfive,jh7110-pinctrl . Include the header file and use these names instead of raw numbers for defining MMC0 pinmux. Signed-off-by: Icenowy Zheng Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit a2e7f6c48740bac078863227ce91a40f65d428c9 Author: Sandie Cao Date: Mon Mar 24 10:09:58 2025 +0800 riscv: dts: starfive: fml13v01: enable USB 3.0 port Add usb_cdns3 and usb0_pins configuration to support super speed USB device on the FML13V01 board. Signed-off-by: Sandie Cao Tested-by: Maud Spierings Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 46f7676c81533545f7e8e82e58880603f984cf0f Author: Bjorn Andersson Date: Tue May 13 16:52:46 2025 +0100 Revert "remoteproc: core: Clear table_sz when rproc_shutdown" Clearing the table_sz on cleanup seemed reasonable, but further discussions concluded that this merely working around the issue and that the fix is incomplete. As such, revert commit efdde3d73ab2 ("remoteproc: core: Clear table_sz when rproc_shutdown") to avoid carrying a partial fix. Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250513-revert-rproc-table-sz-v1-1-a8c6b5d6f8a7@kernel.org Signed-off-by: Mathieu Poirier commit bc740420d7ae7878696d5ad9f3dbcb11e2599b2e Author: James Morse Date: Thu May 15 16:58:39 2025 +0000 x86/resctrl: Drop __init/__exit on assorted symbols Because ARM's MPAM controls are probed using MMIO, resctrl can't be initialised until enough CPUs are online to have determined the system-wide supported num_closid. Arm64 also supports 'late onlined secondaries', where only a subset of CPUs are online during boot. These two combine to mean the MPAM driver may not be able to initialise resctrl until user-space has brought 'enough' CPUs online. To allow MPAM to initialise resctrl after __init text has been free'd, remove all the __init markings from resctrl. The existing __exit markings cause these functions to be removed by the linker as it has never been possible to build resctrl as a module. MPAM has an error interrupt which causes the driver to reset and disable itself. Remove the __exit markings to allow the MPAM driver to tear down resctrl when an error occurs. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-10-james.morse@arm.com commit 8c992e24a0627a6ba508184c07766862c8bb3e54 Author: James Morse Date: Thu May 15 16:58:38 2025 +0000 x86/resctrl: Resctrl_exit() teardown resctrl but leave the mount point resctrl_exit() was intended for use when the 'resctrl' module was unloaded. resctrl can't be built as a module, and the kernfs helpers are not exported so this is unlikely to change. MPAM has an error interrupt which indicates the MPAM driver has gone haywire. Should this occur tasks could run with the wrong control values, leading to bad performance for important tasks. In this scenario the MPAM driver will reset the hardware, but it needs a way to tell resctrl that no further configuration should be attempted. In particular, moving tasks between control or monitor groups does not interact with the architecture code, so there is no opportunity for the arch code to indicate that the hardware is no-longer functioning. Using resctrl_exit() for this leaves the system in a funny state as resctrl is still mounted, but cannot be un-mounted because the sysfs directory that is typically used has been removed. Dave Martin suggests this may cause systemd trouble in the future as not all filesystems can be unmounted. Add calls to remove all the files and directories in resctrl, and remove the sysfs_remove_mount_point() call that leaves the system in a funny state. When triggered, this causes all the resctrl files to disappear. resctrl can be unmounted, but not mounted again. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-9-james.morse@arm.com commit 8eb7ad66badc71e0d8547cf6195a2a6190090152 Author: James Morse Date: Thu May 15 16:58:37 2025 +0000 x86/resctrl: Check all domains are offline in resctrl_exit() resctrl_exit() removes things like the resctrl mount point directory and unregisters the filesystem prior to freeing data structures that were allocated during resctrl_init(). This assumes that there are no online domains when resctrl_exit() is called. If any domain were online, the limbo or overflow handler could be scheduled to run. Add a check for any online control or monitor domains, and document that the architecture code is required to offline all monitor and control domains before calling resctrl_exit(). Suggested-by: Reinette Chatre Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Babu Moger Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-8-james.morse@arm.com commit 7704fb81bc87254e8772f387b62153b135bb1932 Author: James Morse Date: Thu May 15 16:58:36 2025 +0000 x86/resctrl: Rename resctrl_sched_in() to begin with "resctrl_arch_" resctrl_sched_in() loads the architecture specific CPU MSRs with the CLOSID and RMID values. This function was named before resctrl was split to have architecture specific code, and generic filesystem code. This function is obviously architecture specific, but does not begin with 'resctrl_arch_', making it the odd one out in the functions an architecture needs to support to enable resctrl. Rename it for consistency. This is purely cosmetic. Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Shaopeng Tan Reviewed-by: Tony Luck Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: Carl Worth # arm64 Tested-by: Shaopeng Tan Tested-by: Peter Newman Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-7-james.morse@arm.com commit 276c53c66e032c8e7cc0da63555f2742eb1afd69 Author: Alexandre Courbot Date: Thu May 15 17:23:20 2025 +0900 gpu: drm: nova: select AUXILIARY_BUS instead of depending on it CONFIG_AUXILIARY_BUS cannot be enabled explicitly, and unless we select it we have no way to include it (and thus to enable NOVA_DRM) unless another driver happens to do it for us. Fixes: cdeaeb9dd762 ("drm: nova-drm: add initial driver skeleton") Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250515-aux_bus-v2-3-47c70f96ae9b@nvidia.com Signed-off-by: Danilo Krummrich commit a6fdda6dfeb0b900979b3aac3a661ecec9e67711 Author: Alexandre Courbot Date: Thu May 15 17:23:19 2025 +0900 gpu: nova-core: select AUXILIARY_BUS instead of depending on it CONFIG_AUXILIARY_BUS cannot be enabled explicitly, and unless we select it we have no way to include it (and thus to enable NOVA_CORE) unless another driver happens to do it for us. Fixes: e041d81a0377 ("gpu: nova-core: register auxiliary device for nova-drm") Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250515-aux_bus-v2-2-47c70f96ae9b@nvidia.com Signed-off-by: Danilo Krummrich commit 80a8bcc65290bc95c11accd875fb3dd19fc7287e Author: Alexandre Courbot Date: Thu May 15 17:23:18 2025 +0900 samples: rust: select AUXILIARY_BUS instead of depending on it CONFIG_AUXILIARY_BUS cannot be enabled explicitly, and unless we select it we have no way to include it (and thus to enable the auxiliary driver sample) unless a driver happens to do it for us. Fixes: 96609a1969f4 ("samples: rust: add Rust auxiliary driver sample") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250515-aux_bus-v2-1-47c70f96ae9b@nvidia.com Signed-off-by: Danilo Krummrich commit dcb1d3d3b77bdb30d2ec97f540d58ee35f1b1c82 Author: Amit Singh Tomar Date: Thu May 15 16:58:35 2025 +0000 x86/resctrl: Remove the limit on the number of CLOSID Resctrl allocates and finds free CLOSID values using the bits of a u32. This restricts the number of control groups that can be created by user-space. MPAM has an architectural limit of 2^16 CLOSID values, Intel x86 could be extended beyond 32 values. There is at least one MPAM platform which supports more than 32 CLOSID values. Replace the fixed size bitmap with calls to the bitmap API to allocate an array of a sufficient size. ffs() returns '1' for bit 0, hence the existing code subtracts 1 from the index to get the CLOSID value. find_first_bit() returns the bit number which does not need adjusting. [ morse: fixed the off-by-one in the allocator and the wrong not-found value. Removed the limit. Rephrase the commit message. ] Signed-off-by: Amit Singh Tomar Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Peter Newman Tested-by: Shaopeng Tan Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-6-james.morse@arm.com commit 94f7531430285b4ec600693f7222c2ca29bd7472 Author: Yury Norov [NVIDIA] Date: Thu May 15 16:58:34 2025 +0000 x86/resctrl: Optimize cpumask_any_housekeeping() With the lack of cpumask_any_andnot_but(), cpumask_any_housekeeping() has to abuse cpumask_nth() functions. Update cpumask_any_housekeeping() to use the new cpumask_any_but() and cpumask_any_andnot_but(). These two functions understand RESCTRL_PICK_ANY_CPU, which simplifies cpumask_any_housekeeping() significantly. Signed-off-by: Yury Norov [NVIDIA] Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: James Morse Reviewed-by: Reinette Chatre Reviewed-by: Shaopeng Tan Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: James Morse Tested-by: Shaopeng Tan Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-5-james.morse@arm.com commit 1119e5519dcdb7b3527f5d85accf9c7aa02b2b28 Author: Jakub Kicinski Date: Tue May 13 15:17:52 2025 -0700 net: sched: uapi: add more sanely named duplicate defines The TCA_FLOWER_KEY_CFM enum has a UNSPEC and MAX with _OPT in the name, but the real attributes don't. Add a MAX that more reasonably matches the attrs. The PAD in TCA_TAPRIO is the only attr which doesn't have _ATTR in it, perhaps signifying that it's not a real attr? If so interesting idea in abstract but it makes codegen painful. Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250513221752.843102-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2da35e4b4df99d3dd29bacf0c054e6988013d4ec Merge: bebd7b262638af 572be9bf9d0d96 Author: Jakub Kicinski Date: Thu May 15 11:30:11 2025 -0700 Merge branch 'tcp-receive-side-improvements' Eric Dumazet says: ==================== tcp: receive side improvements We have set tcp_rmem[2] to 15 MB for about 8 years at Google, but had some issues for high speed flows on very small RTT. TCP rx autotuning has a tendency to overestimate the RTT, thus tp->rcvq_space.space and sk->sk_rcvbuf. This makes TCP receive queues much bigger than necessary, to a point cpu caches are evicted before application can copy the data, on cpus using DDIO. This series aims to fix this. - First patch adds tcp_rcvbuf_grow() tracepoint, which was very convenient to study the various issues fixed in this series. - Seven patches fix receiver autotune issues. - Two patches fix sender side issues. - Final patch increases tcp_rmem[2] so that TCP speed over WAN can meet modern needs. Tested on a 200Gbit NIC, average max throughput of a single flow: Before: 73593 Mbit. After: 122514 Mbit. ==================== Link: https://patch.msgid.link/20250513193919.1089692-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 572be9bf9d0d96242dd7977ce456009b6c690dce Author: Eric Dumazet Date: Tue May 13 19:39:19 2025 +0000 tcp: increase tcp_rmem[2] to 32 MB Last change to tcp_rmem[2] happened in 2012, in commit b49960a05e32 ("tcp: change tcp_adv_win_scale and tcp_rmem[2]") TCP performance on WAN is mostly limited by tcp_rmem[2] for receivers. After this series improvements, it is time to increase the default. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-12-edumazet@google.com Signed-off-by: Jakub Kicinski commit c4221a8cc3a719a3926a330c4fe15e2b15abe662 Author: Eric Dumazet Date: Tue May 13 19:39:18 2025 +0000 tcp: always use tcp_limit_output_bytes limitation This partially reverts commit c73e5807e4f6 ("tcp: tsq: no longer use limit_output_bytes for paced flows") Overriding the tcp_limit_output_bytes sysctl value for FQ enabled flows has the following problem: It allows TCP to queue around 2 ms worth of data per flow, defeating tcp_rcv_rtt_update() accuracy on the receiver, forcing it to increase sk->sk_rcvbuf even if the real RTT is around 100 us. After this change, we keep enough packets in flight to fill the pipe, and let receive queues small enough to get good cache behavior (cpu caches and/or NIC driver page pools). Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-11-edumazet@google.com Signed-off-by: Jakub Kicinski commit 9ea3bfa61b09e5ae4802661fa9a54438c615c096 Author: Eric Dumazet Date: Tue May 13 19:39:17 2025 +0000 tcp: increase tcp_limit_output_bytes default value to 4MB Last change happened in 2018 with commit c73e5807e4f6 ("tcp: tsq: no longer use limit_output_bytes for paced flows") Modern NIC speeds got a 4x increase since then. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-10-edumazet@google.com Signed-off-by: Jakub Kicinski commit a00f135cd986f7d23f59723f4f9d531f38867d9d Author: Eric Dumazet Date: Tue May 13 19:39:16 2025 +0000 tcp: skip big rtt sample if receive queue is not empty tcp_rcv_rtt_update() role is to keep an estimation of RTT (tp->rcv_rtt_est.rtt_us) for receivers. If an application is too slow to drain the TCP receive queue, it is better to leave the RTT estimation small, so that tcp_rcv_space_adjust() does not inflate tp->rcvq_space.space and sk->sk_rcvbuf. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-9-edumazet@google.com Signed-off-by: Jakub Kicinski commit b879dcb1aeeca278eacaac0b1e2425b1c7599f9f Author: Eric Dumazet Date: Tue May 13 19:39:15 2025 +0000 tcp: always seek for minimal rtt in tcp_rcv_rtt_update() tcp_rcv_rtt_update() goal is to maintain an estimation of the RTT in tp->rcv_rtt_est.rtt_us, used by tcp_rcv_space_adjust() When TCP TS are enabled, tcp_rcv_rtt_update() is using EWMA to smooth the samples. Change this to immediately latch the incoming value if it is lower than tp->rcv_rtt_est.rtt_us, so that tcp_rcv_space_adjust() does not overshoot tp->rcvq_space.space and sk->sk_rcvbuf. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-8-edumazet@google.com Signed-off-by: Jakub Kicinski commit cd171461b90a2d2cf230943df60d580174633718 Author: Eric Dumazet Date: Tue May 13 19:39:14 2025 +0000 tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows tcp_rcv_state_process() must tweak tp->advmss for TS enabled flows before the call to tcp_init_transfer() / tcp_init_buffer_space(). Otherwise tp->rcvq_space.space is off by 120 bytes (TCP_INIT_CWND * TCPOLEN_TSTAMP_ALIGNED). Signed-off-by: Eric Dumazet Reviewed-by: Wei Wang Link: https://patch.msgid.link/20250513193919.1089692-7-edumazet@google.com Signed-off-by: Jakub Kicinski commit d59fc95be9d0fd05ed3ccc11b4a2f832bdf2ee03 Author: Eric Dumazet Date: Tue May 13 19:39:13 2025 +0000 tcp: remove zero TCP TS samples for autotuning For TCP flows using ms RFC 7323 timestamp granularity tcp_rcv_rtt_update() can be fed with 1 ms samples, breaking TCP autotuning for data center flows with sub ms RTT. Instead, rely on the window based samples, fed by tcp_rcv_rtt_measure() tcp_rcvbuf_grow() for a 10 second TCP_STREAM sesssion now looks saner. We can see rcvbuf is kept at a reasonable value. 222.234976: tcp:tcp_rcvbuf_grow: time=348 rtt_us=330 copied=110592 inq=0 space=40960 ooo=0 scaling_ratio=230 rcvbuf=131072 ... 222.235276: tcp:tcp_rcvbuf_grow: time=300 rtt_us=288 copied=126976 inq=0 space=110592 ooo=0 scaling_ratio=230 rcvbuf=246187 ... 222.235569: tcp:tcp_rcvbuf_grow: time=294 rtt_us=288 copied=184320 inq=0 space=126976 ooo=0 scaling_ratio=230 rcvbuf=282659 ... 222.235833: tcp:tcp_rcvbuf_grow: time=264 rtt_us=244 copied=373760 inq=0 space=184320 ooo=0 scaling_ratio=230 rcvbuf=410312 ... 222.236142: tcp:tcp_rcvbuf_grow: time=308 rtt_us=219 copied=424960 inq=20480 space=373760 ooo=0 scaling_ratio=230 rcvbuf=832022 ... 222.236378: tcp:tcp_rcvbuf_grow: time=236 rtt_us=219 copied=692224 inq=49152 space=404480 ooo=0 scaling_ratio=230 rcvbuf=900407 ... 222.236602: tcp:tcp_rcvbuf_grow: time=225 rtt_us=219 copied=730112 inq=49152 space=643072 ooo=0 scaling_ratio=230 rcvbuf=1431534 ... 222.237050: tcp:tcp_rcvbuf_grow: time=229 rtt_us=219 copied=1160192 inq=49152 space=680960 ooo=0 scaling_ratio=230 rcvbuf=1515876 ... 222.237618: tcp:tcp_rcvbuf_grow: time=305 rtt_us=218 copied=2228224 inq=49152 space=1111040 ooo=0 scaling_ratio=230 rcvbuf=2473271 ... 222.238591: tcp:tcp_rcvbuf_grow: time=224 rtt_us=218 copied=3063808 inq=360448 space=2179072 ooo=0 scaling_ratio=230 rcvbuf=4850803 ... 222.240647: tcp:tcp_rcvbuf_grow: time=260 rtt_us=218 copied=2752512 inq=0 space=2703360 ooo=0 scaling_ratio=230 rcvbuf=6017914 ... 222.243535: tcp:tcp_rcvbuf_grow: time=224 rtt_us=218 copied=2834432 inq=49152 space=2752512 ooo=0 scaling_ratio=230 rcvbuf=6127331 ... 222.245108: tcp:tcp_rcvbuf_grow: time=240 rtt_us=218 copied=2883584 inq=49152 space=2785280 ooo=0 scaling_ratio=230 rcvbuf=6200275 ... 222.245333: tcp:tcp_rcvbuf_grow: time=224 rtt_us=218 copied=2859008 inq=0 space=2834432 ooo=0 scaling_ratio=230 rcvbuf=6309692 ... 222.301021: tcp:tcp_rcvbuf_grow: time=222 rtt_us=218 copied=2883584 inq=0 space=2859008 ooo=0 scaling_ratio=230 rcvbuf=6364400 ... 222.989242: tcp:tcp_rcvbuf_grow: time=225 rtt_us=218 copied=2899968 inq=0 space=2883584 ooo=0 scaling_ratio=230 rcvbuf=6419108 ... 224.139553: tcp:tcp_rcvbuf_grow: time=224 rtt_us=218 copied=3014656 inq=65536 space=2899968 ooo=0 scaling_ratio=230 rcvbuf=6455580 ... 224.584608: tcp:tcp_rcvbuf_grow: time=232 rtt_us=218 copied=3014656 inq=49152 space=2949120 ooo=0 scaling_ratio=230 rcvbuf=6564997 ... 230.145560: tcp:tcp_rcvbuf_grow: time=223 rtt_us=218 copied=2981888 inq=0 space=2965504 ooo=0 scaling_ratio=230 rcvbuf=6601469 ... Signed-off-by: Eric Dumazet Reviewed-by: Wei Wang Link: https://patch.msgid.link/20250513193919.1089692-6-edumazet@google.com Signed-off-by: Jakub Kicinski commit ea33537d82921e71f852ea2ed985acc562125efe Author: Eric Dumazet Date: Tue May 13 19:39:12 2025 +0000 tcp: add receive queue awareness in tcp_rcv_space_adjust() If the application can not drain fast enough a TCP socket queue, tcp_rcv_space_adjust() can overestimate tp->rcvq_space.space. Then sk->sk_rcvbuf can grow and hit tcp_rmem[2] for no good reason. Fix this by taking into acount the number of available bytes. Keeping sk->sk_rcvbuf at the right size allows better cache efficiency. Signed-off-by: Eric Dumazet Reviewed-by: Wei Wang Link: https://patch.msgid.link/20250513193919.1089692-5-edumazet@google.com Signed-off-by: Jakub Kicinski commit 63ad7dfedfaee60d9ab40f9f2ec4fb488fa9b1ec Author: Eric Dumazet Date: Tue May 13 19:39:11 2025 +0000 tcp: adjust rcvbuf in presence of reorders This patch takes care of the needed provisioning when incoming packets are stored in the out of order queue. This part was not implemented in the correct way, we need to decouple it from tcp_rcv_space_adjust() logic. Without it, stalls in the pipe could happen. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit 65c5287892e9a881e41758cbf071df6ec9c24a76 Author: Eric Dumazet Date: Tue May 13 19:39:10 2025 +0000 tcp: fix sk_rcvbuf overshoot Current autosizing in tcp_rcv_space_adjust() is too aggressive. Instead of betting on possible losses and over estimate BDP, it is better to only account for slow start. The following patch is then adding a more precise tuning in the events of packet losses. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250513193919.1089692-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit c1269d3d12b88151ee4c109624b5022d53a11738 Author: Eric Dumazet Date: Tue May 13 19:39:09 2025 +0000 tcp: add tcp_rcvbuf_grow() tracepoint Provide a new tracepoint to better understand tcp_rcv_space_adjust() (currently broken) behavior. Call it only when tcp_rcv_space_adjust() has a chance to make a change. I chose to leave trace_tcp_rcv_space_adjust() as is, because commit 6163849d289b ("net: introduce a new tracepoint for tcp_rcv_space_adjust") intent was to get it called after each data delivery to user space. Tested: Pair of hosts in the same rack. Ideally, sk->sk_rcvbuf should be kept small. echo "4096 131072 33554432" >/proc/sys/net/ipv4/tcp_rmem ./netserver perf record -C10 -e tcp:tcp_rcvbuf_grow sleep 30 Trace for a TS enabled TCP flow (with standard ms granularity) perf script // We can see that sk_rcvbuf is growing very fast to tcp_mem[2] 260.500397: tcp:tcp_rcvbuf_grow: time=291 rtt_us=274 copied=110592 inq=0 space=41080 ooo=0 scaling_ratio=230 rcvbuf=131072 ... 260.501333: tcp:tcp_rcvbuf_grow: time=555 rtt_us=364 copied=333824 inq=0 space=110592 ooo=0 scaling_ratio=230 rcvbuf=1399144 ... 260.501664: tcp:tcp_rcvbuf_grow: time=331 rtt_us=330 copied=798720 inq=0 space=333824 ooo=0 scaling_ratio=230 rcvbuf=4110551 ... 260.502003: tcp:tcp_rcvbuf_grow: time=340 rtt_us=330 copied=1040384 inq=49152 space=798720 ooo=0 scaling_ratio=230 rcvbuf=7006410 ... 260.502483: tcp:tcp_rcvbuf_grow: time=479 rtt_us=330 copied=2658304 inq=49152 space=1040384 ooo=0 scaling_ratio=230 rcvbuf=7006410 ... 260.502899: tcp:tcp_rcvbuf_grow: time=416 rtt_us=413 copied=4026368 inq=147456 space=2658304 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.504233: tcp:tcp_rcvbuf_grow: time=493 rtt_us=487 copied=4800512 inq=196608 space=4026368 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.504792: tcp:tcp_rcvbuf_grow: time=559 rtt_us=551 copied=5672960 inq=49152 space=4800512 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.506614: tcp:tcp_rcvbuf_grow: time=610 rtt_us=607 copied=6688768 inq=180224 space=5672960 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.507280: tcp:tcp_rcvbuf_grow: time=666 rtt_us=656 copied=6868992 inq=49152 space=6688768 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.507979: tcp:tcp_rcvbuf_grow: time=699 rtt_us=699 copied=7000064 inq=0 space=6868992 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.508681: tcp:tcp_rcvbuf_grow: time=703 rtt_us=699 copied=7208960 inq=0 space=7000064 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.509426: tcp:tcp_rcvbuf_grow: time=744 rtt_us=737 copied=7569408 inq=0 space=7208960 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.510213: tcp:tcp_rcvbuf_grow: time=787 rtt_us=770 copied=7880704 inq=49152 space=7569408 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.511013: tcp:tcp_rcvbuf_grow: time=801 rtt_us=798 copied=8339456 inq=0 space=7880704 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.511860: tcp:tcp_rcvbuf_grow: time=847 rtt_us=824 copied=8601600 inq=49152 space=8339456 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.512710: tcp:tcp_rcvbuf_grow: time=850 rtt_us=846 copied=8814592 inq=65536 space=8601600 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.514428: tcp:tcp_rcvbuf_grow: time=871 rtt_us=865 copied=8855552 inq=49152 space=8814592 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.515333: tcp:tcp_rcvbuf_grow: time=905 rtt_us=882 copied=9228288 inq=49152 space=8855552 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.516237: tcp:tcp_rcvbuf_grow: time=905 rtt_us=896 copied=9371648 inq=49152 space=9228288 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.517149: tcp:tcp_rcvbuf_grow: time=911 rtt_us=909 copied=9543680 inq=49152 space=9371648 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.518070: tcp:tcp_rcvbuf_grow: time=921 rtt_us=921 copied=9793536 inq=0 space=9543680 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.520895: tcp:tcp_rcvbuf_grow: time=948 rtt_us=947 copied=10203136 inq=114688 space=9793536 ooo=0 scaling_ratio=230 rcvbuf=24622616 ... 260.521853: tcp:tcp_rcvbuf_grow: time=959 rtt_us=954 copied=10293248 inq=57344 space=10203136 ooo=0 scaling_ratio=230 rcvbuf=24691992 ... 260.522818: tcp:tcp_rcvbuf_grow: time=964 rtt_us=959 copied=10330112 inq=0 space=10293248 ooo=0 scaling_ratio=230 rcvbuf=24691992 ... 260.524760: tcp:tcp_rcvbuf_grow: time=979 rtt_us=969 copied=10633216 inq=49152 space=10330112 ooo=0 scaling_ratio=230 rcvbuf=24691992 ... 260.526709: tcp:tcp_rcvbuf_grow: time=975 rtt_us=973 copied=12013568 inq=163840 space=10633216 ooo=0 scaling_ratio=230 rcvbuf=25136755 ... 260.527694: tcp:tcp_rcvbuf_grow: time=985 rtt_us=976 copied=12025856 inq=32768 space=12013568 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.530655: tcp:tcp_rcvbuf_grow: time=991 rtt_us=986 copied=12050432 inq=98304 space=12025856 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.533626: tcp:tcp_rcvbuf_grow: time=993 rtt_us=989 copied=12124160 inq=0 space=12050432 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.538606: tcp:tcp_rcvbuf_grow: time=1000 rtt_us=994 copied=12222464 inq=49152 space=12124160 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.545605: tcp:tcp_rcvbuf_grow: time=1005 rtt_us=998 copied=12263424 inq=81920 space=12222464 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.553626: tcp:tcp_rcvbuf_grow: time=1005 rtt_us=999 copied=12320768 inq=12288 space=12263424 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.589749: tcp:tcp_rcvbuf_grow: time=1001 rtt_us=1000 copied=12398592 inq=16384 space=12320768 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 260.806577: tcp:tcp_rcvbuf_grow: time=1010 rtt_us=1000 copied=12402688 inq=32768 space=12398592 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 261.002386: tcp:tcp_rcvbuf_grow: time=1002 rtt_us=1000 copied=12419072 inq=98304 space=12402688 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 261.803432: tcp:tcp_rcvbuf_grow: time=1013 rtt_us=1000 copied=12468224 inq=49152 space=12419072 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 261.829533: tcp:tcp_rcvbuf_grow: time=1004 rtt_us=1000 copied=12615680 inq=0 space=12468224 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... 265.505435: tcp:tcp_rcvbuf_grow: time=1007 rtt_us=1000 copied=12632064 inq=32768 space=12615680 ooo=0 scaling_ratio=230 rcvbuf=33554432 ... We also see rtt_us going gradually to 1000 usec, causing massive overshoot. Trace for a usec TS enabled TCP flow (us granularity) perf script // We can see that sk_rcvbuf is growing to a smaller value, thanks to tight rtt_us values. 1509.273955: tcp:tcp_rcvbuf_grow: time=396 rtt_us=377 copied=110592 inq=0 space=41080 ooo=0 scaling_ratio=230 rcvbuf=131072 ... 1509.274366: tcp:tcp_rcvbuf_grow: time=412 rtt_us=365 copied=129024 inq=0 space=110592 ooo=0 scaling_ratio=230 rcvbuf=1399144 ... 1509.274738: tcp:tcp_rcvbuf_grow: time=372 rtt_us=355 copied=194560 inq=0 space=129024 ooo=0 scaling_ratio=230 rcvbuf=1399144 ... 1509.275020: tcp:tcp_rcvbuf_grow: time=282 rtt_us=257 copied=401408 inq=0 space=194560 ooo=0 scaling_ratio=230 rcvbuf=1399144 ... 1509.275190: tcp:tcp_rcvbuf_grow: time=170 rtt_us=144 copied=741376 inq=229376 space=401408 ooo=0 scaling_ratio=230 rcvbuf=3021625 ... 1509.275300: tcp:tcp_rcvbuf_grow: time=110 rtt_us=110 copied=1146880 inq=65536 space=741376 ooo=0 scaling_ratio=230 rcvbuf=4642390 ... 1509.275449: tcp:tcp_rcvbuf_grow: time=149 rtt_us=106 copied=1310720 inq=737280 space=1146880 ooo=0 scaling_ratio=230 rcvbuf=5498637 ... 1509.275560: tcp:tcp_rcvbuf_grow: time=111 rtt_us=107 copied=1388544 inq=430080 space=1310720 ooo=0 scaling_ratio=230 rcvbuf=5498637 ... 1509.275674: tcp:tcp_rcvbuf_grow: time=114 rtt_us=113 copied=1495040 inq=421888 space=1388544 ooo=0 scaling_ratio=230 rcvbuf=5498637 ... 1509.275800: tcp:tcp_rcvbuf_grow: time=126 rtt_us=126 copied=1572864 inq=77824 space=1495040 ooo=0 scaling_ratio=230 rcvbuf=5498637 ... 1509.275968: tcp:tcp_rcvbuf_grow: time=168 rtt_us=161 copied=1863680 inq=172032 space=1572864 ooo=0 scaling_ratio=230 rcvbuf=5498637 ... 1509.276129: tcp:tcp_rcvbuf_grow: time=161 rtt_us=161 copied=1941504 inq=204800 space=1863680 ooo=0 scaling_ratio=230 rcvbuf=5782790 ... 1509.276288: tcp:tcp_rcvbuf_grow: time=159 rtt_us=158 copied=1990656 inq=131072 space=1941504 ooo=0 scaling_ratio=230 rcvbuf=5782790 ... 1509.276900: tcp:tcp_rcvbuf_grow: time=228 rtt_us=226 copied=2883584 inq=266240 space=1990656 ooo=0 scaling_ratio=230 rcvbuf=5782790 ... 1509.277819: tcp:tcp_rcvbuf_grow: time=242 rtt_us=236 copied=3022848 inq=0 space=2883584 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.278072: tcp:tcp_rcvbuf_grow: time=253 rtt_us=247 copied=3055616 inq=49152 space=3022848 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.279560: tcp:tcp_rcvbuf_grow: time=268 rtt_us=264 copied=3133440 inq=180224 space=3055616 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.279833: tcp:tcp_rcvbuf_grow: time=274 rtt_us=270 copied=3424256 inq=0 space=3133440 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.282187: tcp:tcp_rcvbuf_grow: time=277 rtt_us=273 copied=3465216 inq=180224 space=3424256 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.284685: tcp:tcp_rcvbuf_grow: time=292 rtt_us=292 copied=3481600 inq=147456 space=3465216 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.284983: tcp:tcp_rcvbuf_grow: time=297 rtt_us=295 copied=3702784 inq=45056 space=3481600 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.285596: tcp:tcp_rcvbuf_grow: time=311 rtt_us=310 copied=3723264 inq=40960 space=3702784 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.285909: tcp:tcp_rcvbuf_grow: time=313 rtt_us=304 copied=3846144 inq=196608 space=3723264 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.291654: tcp:tcp_rcvbuf_grow: time=322 rtt_us=311 copied=3960832 inq=49152 space=3846144 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.291986: tcp:tcp_rcvbuf_grow: time=333 rtt_us=330 copied=4075520 inq=360448 space=3960832 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.292319: tcp:tcp_rcvbuf_grow: time=332 rtt_us=332 copied=4079616 inq=65536 space=4075520 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.292666: tcp:tcp_rcvbuf_grow: time=348 rtt_us=347 copied=4177920 inq=212992 space=4079616 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.293015: tcp:tcp_rcvbuf_grow: time=349 rtt_us=345 copied=4276224 inq=262144 space=4177920 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.293371: tcp:tcp_rcvbuf_grow: time=356 rtt_us=346 copied=4415488 inq=49152 space=4276224 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... 1509.515798: tcp:tcp_rcvbuf_grow: time=424 rtt_us=411 copied=4833280 inq=81920 space=4415488 ooo=0 scaling_ratio=230 rcvbuf=12316197 ... Signed-off-by: Eric Dumazet Reviewed-by: Wei Wang Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250513193919.1089692-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit bebd7b262638af611a0e699ba37c43ec2238801b Merge: 21c608a88f4fdd ef935650e044fc Author: Jakub Kicinski Date: Thu May 15 11:22:32 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc7). Conflicts: tools/testing/selftests/drivers/net/hw/ncdevmem.c 97c4e094a4b2 ("tests/ncdevmem: Fix double-free of queue array") 2f1a805f32ba ("selftests: ncdevmem: Implement devmem TCP TX") https://lore.kernel.org/20250514122900.1e77d62d@canb.auug.org.au Adjacent changes: net/core/devmem.c net/core/devmem.h 0afc44d8cdf6 ("net: devmem: fix kernel panic when netlink socket close after module unload") bd61848900bf ("net: devmem: Implement TX path") Signed-off-by: Jakub Kicinski commit 5da703ef4e4a82b2f9a00f2b3a1eae5657e68a92 Author: Yury Norov [NVIDIA] Date: Thu May 15 16:58:33 2025 +0000 cpumask: Add cpumask_{first,next}_andnot() API With the lack of the functions, client code has to abuse less efficient cpumask_nth(). Signed-off-by: Yury Norov [NVIDIA] Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: James Morse Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: Fenghua Yu Tested-by: James Morse Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-4-james.morse@arm.com commit 13f0a02bf4c1c5888c736cedef9ca50de666adb3 Author: Yury Norov [NVIDIA] Date: Thu May 15 16:58:32 2025 +0000 find: Add find_first_andnot_bit() The function helps to implement cpumask_andnot() APIs. Signed-off-by: Yury Norov [NVIDIA] Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: James Morse Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: James Morse Tested-by: Tony Luck Tested-by: Fenghua Yu Link: https://lore.kernel.org/20250515165855.31452-3-james.morse@arm.com commit 189572bf4e005431051319def435ac4b7e4489ca Author: Yury Norov [NVIDIA] Date: Thu May 15 16:58:31 2025 +0000 cpumask: Relax cpumask_any_but() Similarly to other cpumask search functions, accept -1, and consider it as 'any CPU' hint. This helps users to avoid coding special cases. Signed-off-by: Yury Norov [NVIDIA] Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: James Morse Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Tested-by: James Morse Tested-by: Tony Luck Tested-by: Fenghua Yu Link: https://lore.kernel.org/20250515165855.31452-2-james.morse@arm.com commit 532b9e11b8540eb543ebec9cba851c5691e10b5b Author: Nilay Shroff Date: Thu May 15 19:14:39 2025 +0530 block: fix elv_update_nr_hw_queues() to reattach elevator When nr_hw_queues is updated, the elevator needs to be switched to ensure that we exit elevator and reattach it to ensure that hctx-> sched_tags is correctly allocated for the new hardware queues. However, elv_update_nr_hw_queues() currently only switches the elevator if the queue is not registered. This is incorrect, as it prevents reattaching the elevator after updating nr_hw_queues, which in turn inhibits allocation of sched_tags. Fix this by allowing the elevator switch if the queue is registered, ensuring proper reattachment and resource allocation. Fixes: 596dce110b7d ("block: simplify elevator reattachment for updating nr_hw_queues") Signed-off-by: Nilay Shroff Link: https://lore.kernel.org/r/20250515134511.548270-1-nilay@linux.ibm.com Signed-off-by: Jens Axboe commit 24b7a2331fcdf6de103ea85e67eede43c0372f77 Author: Zhang Yi Date: Wed Apr 23 16:52:57 2025 +0800 ext4: clairfy the rules for modifying extents Add a comment at the beginning of extents_status.c to clarify the rules for loading, mapping, modifying, and removing extents and blocks. Suggested-by: Jan Kara Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-10-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1b4d2a0b794669e54914e3f429c08e49ea40b40c Author: Zhang Yi Date: Wed Apr 23 16:52:56 2025 +0800 ext4: check env when mapping and modifying extents Add ext4_check_map_extents_env() to the places where loading extents, mapping blocks, removing blocks, and modifying extents, excluding the I/O writeback context. This function will verify whether the locking mechanisms in place are adequate. Suggested-by: Jan Kara Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-9-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit ed16618c380c32c68c06186d0ccbb0d5e0586e59 Author: Andrew Zaborowski Date: Fri May 9 01:04:29 2025 +0200 x86/sgx: Prevent attempts to reclaim poisoned pages TL;DR: SGX page reclaim touches the page to copy its contents to secondary storage. SGX instructions do not gracefully handle machine checks. Despite this, the existing SGX code will try to reclaim pages that it _knows_ are poisoned. Avoid even trying to reclaim poisoned pages. The longer story: Pages used by an enclave only get epc_page->poison set in arch_memory_failure() but they currently stay on sgx_active_page_list until sgx_encl_release(), with the SGX_EPC_PAGE_RECLAIMER_TRACKED flag untouched. epc_page->poison is not checked in the reclaimer logic meaning that, if other conditions are met, an attempt will be made to reclaim an EPC page that was poisoned. This is bad because 1. we don't want that page to end up added to another enclave and 2. it is likely to cause one core to shut down and the kernel to panic. Specifically, reclaiming uses microcode operations including "EWB" which accesses the EPC page contents to encrypt and write them out to non-SGX memory. Those operations cannot handle MCEs in their accesses other than by putting the executing core into a special shutdown state (affecting both threads with HT.) The kernel will subsequently panic on the remaining cores seeing the core didn't enter MCE handler(s) in time. Call sgx_unmark_page_reclaimable() to remove the affected EPC page from sgx_active_page_list on memory error to stop it being considered for reclaiming. Testing epc_page->poison in sgx_reclaim_pages() would also work but I assume it's better to add code in the less likely paths. The affected EPC page is not added to &node->sgx_poison_page_list until later in sgx_encl_release()->sgx_free_epc_page() when it is EREMOVEd. Membership on other lists doesn't change to avoid changing any of the lists' semantics except for sgx_active_page_list. There's a "TBD" comment in arch_memory_failure() about pre-emptive actions, the goal here is not to address everything that it may imply. This also doesn't completely close the time window when a memory error notification will be fatal (for a not previously poisoned EPC page) -- the MCE can happen after sgx_reclaim_pages() has selected its candidates or even *inside* a microcode operation (actually easy to trigger due to the amount of time spent in them.) The spinlock in sgx_unmark_page_reclaimable() is safe because memory_failure() runs in process context and no spinlocks are held, explicitly noted in a mm/memory-failure.c comment. Signed-off-by: Andrew Zaborowski Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Tony Luck Cc: balrogg@gmail.com Cc: linux-sgx@vger.kernel.org Link: https://lore.kernel.org/r/20250508230429.456271-1-andrew.zaborowski@intel.com commit 6ade6e81f898f7f533207b23849ac8cc0ea8c755 Author: Ilpo Järvinen Date: Wed May 14 16:28:21 2025 +0300 PCI: Update Link Speed after retraining PCIe Link Retraining can alter Link Speed. pcie_retrain_link() that performs the Link Training is called from bwctrl and ASPM driver. While bwctrl listens for Link Bandwidth Management Status (LBMS) to pick up changes in Link Speed, there is a race between pcie_reset_lbms() clearing LBMS after the Link Training and pcie_bwnotif_irq() reading the Link Status register. If LBMS is already cleared when the irq handler reads the register, the interrupt handler will return early with IRQ_NONE and won't update the Link Speed. When Link Speed update originates from bwctrl, pcie_bwctrl_change_speed() ensures Link Speed is updated after the retraining. ASPM driver, however, calls pcie_retrain_link() but does not update the Link Speed after retraining which can result in stale Link Speed. Also, it is possible to have ASPM support with CONFIG_PCIEPORTBUS=n in which case bwctrl will not be built in (and thus won't update the Link Speed at all). To ensure Link Speed is not left stale after Link Training, move the call to pcie_update_link_speed() from pcie_bwctrl_change_speed() into pcie_retrain_link(). Suggested-by: Lukas Wunner Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/linux-pci/aBCjpfyYmlkJ12AZ@wunner.de Link: https://lore.kernel.org/r/20250514132821.15705-1-ilpo.jarvinen@linux.intel.com commit 1ce06d45d92242ffd9c576b736e1e755531fe6dd Author: Filipe Manana Date: Wed May 14 12:24:25 2025 +0100 btrfs: use a single variable to track return value at btrfs_page_mkwrite() We have two variables to track return values, ret and ret2, with types vm_fault_t (an unsigned int type) and int, which makes it a bit confusing and harder to keep track. So use a single variable, of type int, and under the 'out' label return vmf_error(ret) in case ret contains an error, otherwise return VM_FAULT_NOPAGE. This is equivalent to what we had before and it's simpler. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d8cddf2a1d71ab9dea59822ccb9bbb780f50ce0a Author: Filipe Manana Date: Wed May 14 12:18:07 2025 +0100 btrfs: don't return VM_FAULT_SIGBUS on failure to set delalloc for mmap write If the call to btrfs_set_extent_delalloc() fails we are always returning VM_FAULT_SIGBUS, which is odd since the error means "bad access" and the most likely cause for btrfs_set_extent_delalloc() is -ENOMEM, which should be translated to VM_FAULT_OOM. Instead of returning VM_FAULT_SIGBUS return vmf_error(ret2), which gives us a more appropriate return value, and we use that everywhere else too. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a08625f8250622f538641efa159a946b4b546165 Author: Filipe Manana Date: Tue May 13 10:27:44 2025 +0100 btrfs: simplify early error checking in btrfs_page_mkwrite() We have this entangled error checks early at btrfs_page_mkwrite(): 1) Try to reserve delalloc space by calling btrfs_delalloc_reserve_space() and storing the return value in the ret2 variable; 2) If the reservation succeed, call file_update_time() and store the return value in ret2 and also set the local variable 'reserved' to true (1); 3) Then do an error check on ret2 to see if any of the previous calls failed and if so, jump either to the 'out' label or to the 'out_noreserve' label, depending on whether 'reserved' is true or not. This is unnecessarily complex. Instead change this to a simpler and more straightforward approach: 1) Call btrfs_delalloc_reserve_space(), if that returns an error jump to the 'out_noreserve' label; 2) The call file_update_time() and if that returns an error jump to the 'out' label. Like this there's less nested if statements, no need to use a local variable to track if space was reserved and if statements are used only to check errors. Also move the call to extent_changeset_free() out of the 'out_noreserve' label and under the 'out' label since the changeset is allocated only if the call to reserve delalloc space succeeded. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf1c74ccba9893adee482fbf6ce84b781e5008a3 Author: Filipe Manana Date: Mon May 12 08:55:42 2025 +0100 btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite() In the last call to btrfs_delalloc_release_space() where the value of the variable 'ret' is never zero, we pass the expression 'ret != 0' as the value for the argument 'qgroup_free', which always evaluates to true. Make this less confusing and more clear by explicitly passing true instead. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 17a85f520469a1838379de8ad24f63e778f7c277 Author: Filipe Manana Date: Wed May 14 10:30:58 2025 +0100 btrfs: fix wrong start offset for delalloc space release during mmap write If we're doing a mmap write against a folio that has i_size somewhere in the middle and we have multiple sectors in the folio, we may have to release excess space previously reserved, for the range going from the rounded up (to sector size) i_size to the folio's end offset. We are calculating the right amount to release and passing it to btrfs_delalloc_release_space(), but we are passing the wrong start offset of that range - we're passing the folio's start offset instead of the end offset, plus 1, of the range for which we keep the reservation. This may result in releasing more space then we should and eventually trigger an underflow of the data space_info's bytes_may_use counter. So fix this by passing the start offset as 'end + 1' instead of 'page_start' to btrfs_delalloc_release_space(). Fixes: d0b7da88f640 ("Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f924ca36d2f788d40a57ea48825ff51cba4e700 Author: Ahmed S. Darwish Date: Thu May 8 17:02:32 2025 +0200 x86/cpuid: Rename have_cpuid_p() to cpuid_feature() In order to let all the APIs under have a shared "cpuid_" namespace, rename have_cpuid_p() to cpuid_feature(). Adjust all call-sites accordingly. Suggested-by: Ingo Molnar Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-4-darwi@linutronix.de commit 968e3000680713f712bcf02c51c4d7bb7d4d7685 Author: Ahmed S. Darwish Date: Thu May 8 17:02:31 2025 +0200 x86/cpuid: Set as the main CPUID header The main CPUID header was originally a storefront for the headers: Now that the latter CPUID(0x2) header has been merged into the former, there is no practical difference between and . Migrate all users to the header, in preparation of the removal of . Don't remove just yet, in case some new code in -next started using it. Suggested-by: Ingo Molnar Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: H. Peter Anvin Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-3-darwi@linutronix.de commit cdc8be31cb324a0c52529f192e39a44abcfff513 Author: Ahmed S. Darwish Date: Thu May 8 17:02:30 2025 +0200 x86/cpuid: Move CPUID(0x2) APIs into Move all of the CPUID(0x2) APIs at into , in order centralize all CPUID APIs into the latter. While at it, separate the different CPUID leaf parsing APIs using header comments like "CPUID(0xN) parsing: ". Suggested-by: Ingo Molnar Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-2-darwi@linutronix.de commit 9c78317b42e7c32523c91099859bc4721e9f75dd Author: Sean Nyekjaer Date: Mon May 5 21:20:08 2025 +0200 iio: accel: fxls8962af: Fix temperature scan element sign Mark the temperature element signed, data read from the TEMP_OUT register is in two's complement format. This will avoid the temperature being mishandled and miss displayed. Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") Suggested-by: Marcelo Schmitt Cc: stable@vger.kernel.org Reviewed-by: Marcelo Schmitt Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250505-fxls-v4-2-a38652e21738@geanix.com Signed-off-by: Jonathan Cameron commit 16038474e3a0263572f36326ef85057aaf341814 Author: Sean Nyekjaer Date: Mon May 5 21:20:07 2025 +0200 iio: accel: fxls8962af: Fix temperature calculation According to spec temperature should be returned in milli degrees Celsius. Add in_temp_scale to calculate from Celsius to milli Celsius. Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") Cc: stable@vger.kernel.org Reviewed-by: Marcelo Schmitt Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250505-fxls-v4-1-a38652e21738@geanix.com Signed-off-by: Jonathan Cameron commit 7cdfbc0113d087348b8e65dd79276d0f57b89a10 Author: David Lechner Date: Mon May 5 13:28:40 2025 -0500 iio: adc: ad7944: mask high bits on direct read Apply a mask to the raw value received over the SPI bus for unsigned direct reads. As we found recently, SPI controllers may not set unused bits to 0 when reading with bits_per_word != {8,16,32}. The ad7944 uses bits_per_word of 14 and 18, so we need to mask the value to be sure we returning the correct value to userspace during a direct read. Fixes: d1efcf8871db ("iio: adc: ad7944: add driver for AD7944/AD7985/AD7986") Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250505-iio-adc-ad7944-max-high-bits-on-direct-read-v1-1-b173facceefe@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit 18049c8cff9cc89daadc4df6975f7d9069638926 Author: Yabin Cui Date: Thu May 8 16:26:42 2025 -0700 perf/aux: Allocate non-contiguous AUX pages by default perf always allocates contiguous AUX pages based on aux_watermark. However, this contiguous allocation doesn't benefit all PMUs. For instance, ARM SPE and TRBE operate with virtual pages, and Coresight ETR allocates a separate buffer. For these PMUs, allocating contiguous AUX pages unnecessarily exacerbates memory fragmentation. This fragmentation can prevent their use on long-running devices. This patch modifies the perf driver to be memory-friendly by default, by allocating non-contiguous AUX pages. For PMUs requiring contiguous pages (Intel BTS and some Intel PT), the existing PERF_PMU_CAP_AUX_NO_SG capability can be used. For PMUs that don't require but can benefit from contiguous pages (some Intel PT), a new capability, PERF_PMU_CAP_AUX_PREFER_LARGE, is added to maintain their existing behavior. Signed-off-by: Yabin Cui Signed-off-by: Ingo Molnar Reviewed-by: James Clark Reviewed-by: Anshuman Khandual Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250508232642.148767-1-yabinc@google.com commit baad9190e6465fdbe458f59cf04c2b2032ec4797 Author: Ingo Molnar Date: Thu May 15 17:49:16 2025 +0200 x86/msr: Add rdmsrl_on_cpu() compatibility wrapper Add a simple rdmsrl_on_cpu() compatibility wrapper for rdmsrq_on_cpu(), to make life in -next easier, where the PM tree recently grew more uses of the old API. Reported-by: Stephen Rothwell Signed-off-by: Ingo Molnar Acked-by: Mario Limonciello Cc: "H. Peter Anvin" Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Link: https://lore.kernel.org/r/20250512145517.6e0666e3@canb.auug.org.au commit 1c5721ca89a1c8ae71082d3a102b39fd1ec0a205 Author: Chun-Tse Shao Date: Thu May 15 12:55:51 2025 -0300 perf test: Allow tolerance for leader sampling test There is a known issue that the leader sampling is inconsistent, since throttle only affect leader, not the slave. The detail is in [1]. To maintain test coverage, this patch sets a tolerance rate of 80% to accommodate the throttled samples and prevent test failures due to throttling. [1] lore.kernel.org/20250328182752.769662-1-ctshao@google.com Suggested-by: Ian Rogers Suggested-by: Thomas Richter Reviewed-by: Ian Rogers Signed-off-by: Chun-Tse Shao Co-developed-by: Thomas Richter Signed-off-by: Thomas Richter Tested-by: Thomas Richter Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Namhyung Kim Cc: Sumanth Korikkar Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20250430140611.599078-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3e402acd5c4f9d447849b9bfb5a5c61f10668b7e Author: Chen Ni Date: Thu May 15 16:34:50 2025 +0800 irqchip/irq-pruss-intc: Simplify chained interrupt handler setup The chained interrupt handler setup installs the handler and handler data with two function call.s irq_set_chained_handler_and_data() can set both in one operation. Replace the two calls with one. Signed-off-by: Chen Ni Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250515083450.3811411-1-nichen@iscas.ac.cn commit 1adf711919de7c9e1b281a4d9cd9e3a81f3a70f7 Author: Shivank Garg Date: Wed Apr 30 11:29:59 2025 +0000 x86/mm: Fix kernel-doc descriptions of various pgtable methods So 'make W=1' complains about a couple of kernel-doc descriptions in our MM primitives in pgtable.c: arch/x86/mm/pgtable.c:623: warning: Function parameter or struct member 'reserve' not described in 'reserve_top_address' arch/x86/mm/pgtable.c:672: warning: Function parameter or struct member 'p4d' not described in 'p4d_set_huge' arch/x86/mm/pgtable.c:672: warning: Function parameter or struct member 'addr' not described in 'p4d_set_huge' ... so on Fix them all up, add missing parameter documentation, and fix various spelling inconsistencies while at it. [ mingo: Harmonize kernel-doc annotations some more. ] Signed-off-by: Shivank Garg Signed-off-by: Ingo Molnar Cc: Dave Hansen Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: https://lore.kernel.org/r/20250514062637.3287779-1-shivankg@amd.com commit 20117cf426b677e7aced4e7a1b2b37f6080a46dc Author: Peng Fan Date: Fri May 9 12:45:40 2025 +0800 gpio: pxa: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify pxa_muxed_gpio_chip, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-9-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 2993d2dd8ff4e8257a88d4d3f8ffc6df95928b94 Author: Peng Fan Date: Fri May 9 12:45:39 2025 +0800 gpio: timberdale: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify timbgpio_irqchip, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-8-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 580b3264cb252cae00fa62d58443af09c25f7d61 Author: Peng Fan Date: Fri May 9 12:45:38 2025 +0800 gpio: xgene-sb: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify xgene_gpio_sb_irq_chip, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-7-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 3f50bb3124d76653de0bcfe251faa357711e3ae6 Author: Peng Fan Date: Fri May 9 12:45:37 2025 +0800 gpio: davinci: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify gpio_irqchip, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-6-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 62be72bdb00ef52a0d0f02ce077e36b1f48ef0ae Author: Peng Fan Date: Fri May 9 12:45:36 2025 +0800 gpio: davinci: Update irq chip data Use "struct davinci_gpio_controller *chips" as irq chip data to prepare for immutable irq chip, then it will be easy to get gpio_chip pointer in irq mask/unmask. No functional change. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-5-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 7688a54d5b53f2e3160c00f19b00bc601fa3ec98 Author: Peng Fan Date: Fri May 9 12:45:35 2025 +0800 gpio: mpc8xxx: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-4-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 289e42df1358abf85e49a140f7224c2abd170b2e Author: Peng Fan Date: Fri May 9 12:45:34 2025 +0800 gpio: lpc18xx: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify lpc18xx_gpio_pin_ic, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-3-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit a30be40bf1d4437646b6885e7e4e71530e6f82c1 Author: Peng Fan Date: Fri May 9 12:45:33 2025 +0800 gpio: grgpio: Make irq_chip immutable Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Constify grgpio_irq_chip, flag the irq_chip as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-2-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 7b04f98027afd2cc329d00191dfc8284b382565d Author: Peng Fan Date: Fri May 9 12:45:32 2025 +0800 gpio: bcm-kona: make irq_chip immutable The gpiolib is moving to make irq_chip immutable, otherwise there is warning: "not an immutable chip, please consider fixing it!" The bcm_gpio_irq_chip already has irq hooks configured correctly, bcm_kona_gpio_irq_mask/bcm_kona_gpio_irq_unmask calls gpiochip_disable_irq/ gpiochip_enable_irq, and bcm_kona_gpio_irq_reqres/irq_release_resources calls gpiochip_reqres_irq/gpiochip_relres_irq. So just need to flag it as IRQCHIP_IMMUTABLE. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250509-gpio-v1-1-639377c98288@nxp.com Signed-off-by: Bartosz Golaszewski commit 833c086f22ecebe576af42051733796d1690dd71 Author: Ahmad Fatoum Date: Wed May 7 19:28:01 2025 +0200 gpio: TODO: add item about GPIO drivers reading struct gpio_chip::base drivers/pinctrl/pinctrl-at91.c uses struct gpio_chip::base to find out which bit to set in a register: dev_dbg(npct->dev, "enable pin %u as GPIO\n", offset); mask = 1 << (offset - chip->base); This adds a non-obvious dependency on the global numberspace from the GPIO driver itself, even if all consumers use the descriptor API. More such instances may exist and will need to be fixed in the quest for removal of the global numberspace, so add a reminder about it to the TODO list. Link: https://lore.kernel.org/all/1d00c056-3d61-4c22-bedd-3bae0bf1ddc4@pengutronix.de/ Suggested-by: Bartosz Golaszewski Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20250507-gpio-chip-base-readback-v1-1-ade56e38480b@pengutronix.de Signed-off-by: Bartosz Golaszewski commit 0a45c1a002705c8622738fbd2a2913acf886ea27 Author: Ahmad Fatoum Date: Wed May 7 15:07:25 2025 +0200 gpio: mxc: configure dynamic GPIO base for CONFIG_GPIO_SYSFS=n i.MX GPIO numbering has been deterministic since commit 7e6086d9e54a ("gpio/mxc: specify gpio base for device tree probe"), a year after device tree support was first added back in 2011. Reverting to dynamically allocated GPIO base now would break most systems making use of the sysfs API. These systems will be eventually broken by the removal of the sysfs API, but that would result in GPIO scripts not working instead of essentially toggling at random according to probe order, which would happen if we unconditionally set base to -1. Yet, the warning is annoying and has resulted in many rejected attempts to remove it over the years[1][2][3]. As the i.MX GPIO driver is device tree only, GPIO_SYSFS is the only consumer of the deterministic GPIO numbering. Let's therefore restrict the static base and the warning that comes with it to configurations with CONFIG_GPIO_SYSFS enabled. [1]: https://lore.kernel.org/all/20230226205319.1013332-1-dario.binacchi@amarulasolutions.com/ [2]: https://lore.kernel.org/all/20230506085928.933737-2-haibo.chen@nxp.com/ [3]: https://lore.kernel.org/all/20241121145515.3087855-1-catalin.popescu@leica-geosystems.com/ Signed-off-by: Ahmad Fatoum Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250507-b4-imx-gpio-base-warning-v2-1-d43d09e2c6bf@pengutronix.de Signed-off-by: Bartosz Golaszewski commit 788019eb559fd0b365f501467ceafce540e377cc Author: Brian Norris Date: Wed May 14 13:13:16 2025 -0700 genirq: Retain disable depth for managed interrupts across CPU hotplug Affinity-managed interrupts can be shut down and restarted during CPU hotunplug/plug. Thereby the interrupt may be left in an unexpected state. Specifically: 1. Interrupt is affine to CPU N 2. disable_irq() -> depth is 1 3. CPU N goes offline 4. irq_shutdown() -> depth is set to 1 (again) 5. CPU N goes online 6. irq_startup() -> depth is set to 0 (BUG! driver expects that the interrupt still disabled) 7. enable_irq() -> depth underflow / unbalanced enable_irq() warning This is only a problem for managed interrupts and CPU hotplug, all other cases like request()/free()/request() truly needs to reset a possibly stale disable depth value. Provide a startup function, which takes the disable depth into account, and invoked it for the managed interrupts in the CPU hotplug path. This requires to change irq_shutdown() to do a depth increment instead of setting it to 1, which allows to retain the disable depth, but is harmless for the other code paths using irq_startup(), which will still reset the disable depth unconditionally to keep the original correct behaviour. A kunit tests will be added separately to cover some of these aspects. [ tglx: Massaged changelog ] Suggested-by: Thomas Gleixner Signed-off-by: Brian Norris Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250514201353.3481400-2-briannorris@chromium.org commit 21c608a88f4fdd55180a228ca297206ef588847c Author: Chen Ni Date: Wed May 14 14:40:53 2025 +0800 net: prestera: Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250514064053.2513921-1-nichen@iscas.ac.cn Signed-off-by: Jakub Kicinski commit ee39bae6c141876f5b4c001f6b12b4f8ffb4cd08 Author: Chen Ni Date: Wed May 14 15:24:19 2025 +0800 net/mlx5: Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Acked-by: Mark Bloch Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250514072419.2707578-1-nichen@iscas.ac.cn Signed-off-by: Jakub Kicinski commit a4a39c81e1043b153bde3ef5cb3cf94222ffd918 Author: Andy Shevchenko Date: Thu May 15 11:55:16 2025 +0300 genirq: Bump the size of the local variable for sprintf() GCC is not happy about a sprintf() call on a buffer that might be too small for the given formatting string. kernel/irq/debugfs.c:233:26: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] Fix this by bumping the size of the local variable for sprintf(). Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250515085516.2913290-1-andriy.shevchenko@linux.intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202505151057.xbyXAbEn-lkp@intel.com/ commit f1a3fac4095c7bc0b30e2aa9921c232af8faeae0 Author: Nianyao Tang Date: Thu May 15 14:53:59 2025 +0000 irqchip/gic-v4.1: Use local 4_1 ITS to generate VSGI On multi-node GICv4.1 system, VSGI senders always use one certain 4_1 ITS, because find_4_1_its() returns the first its_node in the list, regardless of which node the VSGI sender is on. This brings guest VSGI performance drop when VM is not running on the same node as this returned ITS. On a 2-socket environment, each with one ITS and 32 cpu, GICv4.1 enabled, 4U8G guest, 4 vcpu is running on same socket. When the VM is on socket0, kvm-unit-tests ipi_hw result is 850ns. When the VM is on socket1, it is 750ns. The reason is that the VSGI sender always uses the last reported ITS (that on socket1) to inject VSGI. The access from a CPU to a other-socket ITS will cost 100ns more compared to an access to the local ITS. Using the local ITS results in a 12% reduction in IPI latency. Modify find_4_1_its() to return the first per-CPU local_4_1_its, which is initialized when the VPE table is inherited from the ITS or from another CPU. If it fails to find a local 4_1 ITS, it returns any 4_1 ITS like before. Suggested-by: Marc Zyngier Signed-off-by: Nianyao Tang Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/all/20250515145359.2795959-1-tangnianyao@huawei.com commit 241b9b584d50e01f7eb50c0555aa570502bcc8c5 Author: Bart Van Assche Date: Wed May 14 13:50:33 2025 -0700 dm-zone: Use bdev_*() helper functions where applicable Improve code readability by using bdev_is_zone_aligned() and bdev_offset_from_zone_start() where applicable. No functionality has been changed. This patch is a reworked version of a patch from Pankaj Raghav. See also https://lore.kernel.org/linux-block/20220923173618.6899-11-p.raghav@samsung.com/. Cc: Damien Le Moal Cc: Pankaj Raghav Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Signed-off-by: Mikulas Patocka commit 3da732687d72078e52cc7f334a482383e84ca156 Author: Matthew Sakai Date: Mon May 12 21:10:10 2025 -0400 dm vdo indexer: don't read request structure after enqueuing The function get_volume_page_protected may place a request on a queue for another thread to process asynchronously. When this happens, the volume should not read the request from the original thread. This can not currently cause problems, due to the way request processing is handled, but it is not safe in general. Reviewed-by: Ken Raeburn Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit dbc5ba08ec5ff799a32f27ac79702a2cfc2200cd Author: Jens Axboe Date: Thu May 15 07:39:41 2025 -0600 block/blk-throttle: silence !BLK_DEV_IO_TRACE variable warnings If blk-throttle is enabled but blktrace is not, then the compiler will notice that the following two variables are unused: ../block/blk-throttle.c: In function 'throtl_pending_timer_fn': ../block/blk-throttle.c:1153:30: warning: unused variable 'bio_cnt_w' [-Wunused-variable] 1153 | unsigned int bio_cnt_w = sq_queued(sq, WRITE); | ^~~~~~~~~ ../block/blk-throttle.c:1152:30: warning: unused variable 'bio_cnt_r' [-Wunused-variable] 1152 | unsigned int bio_cnt_r = sq_queued(sq, READ); | ^~~~~~~~~ Silence that my annotating them with __maybe_unused. Fixes: 28ad83b774a6 ("blk-throttle: Split the service queue") Link: https://lore.kernel.org/all/20250515130830.9671-1-aishwarya.tcv@arm.com/ Reported-by: Aishwarya Reviewed-by: Yu Kuai Signed-off-by: Jens Axboe commit ce45dc4bb22e96b59a07e19b67e915d99dd5281b Author: Lukas Wunner Date: Fri Apr 25 11:24:22 2025 +0200 PCI: Limit visibility of match_driver flag to PCI core Since commit 58d9a38f6fac ("PCI: Skip attaching driver in device_add()"), PCI enumeration is split into two steps: In the first step, all devices are published in sysfs with device_add(). In the second step, drivers are bound to the devices with device_attach(). To delay driver binding until the second step, a "bool match_driver" in struct pci_dev is used. Instead of a bool, use a bit in the "unsigned long priv_flags" to shrink struct pci_dev a little and prevent use of the bool outside the PCI core (as has happened with commit cbbc00be2ce3 ("iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices")). Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Link: https://patch.msgid.link/d22a9e5b81d6bd8dd1837607d6156679b3b1199c.1745572340.git.lukas@wunner.de commit 3be5fa236649da6404f1bca1491bf02d4b0d5cce Author: Lukas Wunner Date: Fri Apr 25 11:24:21 2025 +0200 Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices" Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") changed IRQ handling on PCI driver probing. It inadvertently broke resume from system sleep on AMD platforms: https://lore.kernel.org/r/20150926164651.GA3640@pd.tnic/ This was fixed by two independent commits: * 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") * cbbc00be2ce3 ("iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices") The breaking change and one of these two fixes were subsequently reverted: * fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled"") * 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()"") This rendered the second fix unnecessary, so revert it as well. It used the match_driver flag in struct pci_dev, which is internal to the PCI core and not supposed to be touched by arbitrary drivers. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Acked-by: Joerg Roedel Link: https://patch.msgid.link/9a3ddff5cc49512044f963ba0904347bd404094d.1745572340.git.lukas@wunner.de commit 4c0327250aaf53a665b9331eb5ae91ee647a1f7e Merge: 67fa756408a535 c50d295c37f264 Author: Paolo Abeni Date: Thu May 15 15:23:42 2025 +0200 Merge branch 'net-cover-more-per-cpu-storage-with-local-nested-bh-locking' Sebastian Andrzej Siewior says: ==================== net: Cover more per-CPU storage with local nested BH locking I was looking at the build-time defined per-CPU variables in net/ and added the needed local-BH-locks in order to be able to remove the current per-CPU lock in local_bh_disable() on PREMPT_RT. The work is not yet complete, I just wanted to post what I have so far instead of sitting on it. v3: https://lore.kernel.org/all/20250430124758.1159480-1-bigeasy@linutronix.de/ v2: https://lore.kernel.org/all/20250414160754.503321-1-bigeasy@linutronix.de v1: https://lore.kernel.org/all/20250309144653.825351-1-bigeasy@linutronix.de ==================== Link: https://patch.msgid.link/20250512092736.229935-1-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit c50d295c37f2648a8d9e8a572fedaad027d134bb Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:36 2025 +0200 rds: Use nested-BH locking for rds_page_remainder rds_page_remainder is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Allison Henderson Cc: linux-rdma@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-16-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 0af5928f358c40c1fe5ede79f66f040e23124044 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:35 2025 +0200 rds: Acquire per-CPU pointer within BH disabled section rds_page_remainder_alloc() obtains the current CPU with get_cpu() while disabling preemption. Then the CPU number is used to access the per-CPU data structure via per_cpu(). This can be optimized by relying on local_bh_disable() to provide a stable CPU number/ avoid migration and then using this_cpu_ptr() to retrieve the data structure. Cc: Allison Henderson Cc: linux-rdma@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-15-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit aaaaa6639cf56eac4c5e58981e7d1b279ba9f4c9 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:34 2025 +0200 rds: Disable only bottom halves in rds_page_remainder_alloc() rds_page_remainder_alloc() is invoked from a preemptible context or a tasklet. There is no need to disable interrupts for locking. Use local_bh_disable() instead of local_irq_save() for locking. Cc: Allison Henderson Cc: linux-rdma@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-14-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 82d9e6b9a0a164719a8df7584d9f7e42de443698 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:33 2025 +0200 mptcp: Use nested-BH locking for hmac_storage mptcp_delegated_actions is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Matthieu Baerts Cc: Mat Martineau Cc: Geliang Tang Cc: mptcp@lists.linux.dev Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-13-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 20d677d389e7df6963ca9a41cd0f88954a65ba7b Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:32 2025 +0200 net/sched: Use nested-BH locking for sch_frag_data_storage sch_frag_data_storage is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add local_lock_t to the struct and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-12-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 7fe70c06a182a140be9996b02256d907e114479a Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:31 2025 +0200 net/sched: act_mirred: Move the recursion counter struct netdev_xmit mirred_nest_level is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Move mirred_nest_level to struct netdev_xmit as u8, provide wrappers. Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Juri Lelli Link: https://patch.msgid.link/20250512092736.229935-11-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 3af4cdd67f32529c177b885d4ca491710e961928 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:30 2025 +0200 openvswitch: Move ovs_frag_data_storage into the struct ovs_pcpu_storage ovs_frag_data_storage is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Move ovs_frag_data_storage into the struct ovs_pcpu_storage which already provides locking for the structure. Cc: Aaron Conole Cc: Eelco Chaudron Cc: Ilya Maximets Cc: dev@openvswitch.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Aaron Conole Link: https://patch.msgid.link/20250512092736.229935-10-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 672318331b44753ab7bd8545558939c38b4c1132 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:29 2025 +0200 openvswitch: Use nested-BH locking for ovs_pcpu_storage ovs_pcpu_storage is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. The data structure can be referenced recursive and there is a recursion counter to avoid too many recursions. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. Add an owner of the struct which is the current task and acquire the lock only if the structure is not owned by the current task. Cc: Aaron Conole Cc: Eelco Chaudron Cc: Ilya Maximets Cc: dev@openvswitch.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Aaron Conole Link: https://patch.msgid.link/20250512092736.229935-9-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 035fcdc4d240c873c89b76b752dd9921bc88c1ba Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:28 2025 +0200 openvswitch: Merge three per-CPU structures into one exec_actions_level is a per-CPU integer allocated at compile time. action_fifos and flow_keys are per-CPU pointer and have their data allocated at module init time. There is no gain in splitting it, once the module is allocated, the structures are allocated. Merge the three per-CPU variables into ovs_pcpu_storage, adapt callers. Cc: Aaron Conole Cc: Eelco Chaudron Cc: Ilya Maximets Cc: dev@openvswitch.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Aaron Conole Link: https://patch.msgid.link/20250512092736.229935-8-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 9c607d4b6589d4d380a85784514bcf4cceee1e11 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:27 2025 +0200 xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46] nat_keepalive_sk_ipv[46] is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Use sock_bh_locked which has a sock pointer and a local_lock_t. Use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Steffen Klassert Cc: Herbert Xu Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-7-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit b9eef3391de028fdd88fd7a2f81a4834fc98c9ac Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:26 2025 +0200 xdp: Use nested-BH locking for system_page_pool system_page_pool is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Make a struct with a page_pool member (original system_page_pool) and a local_lock_t and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Andrew Lunn Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jesper Dangaard Brouer Cc: John Fastabend Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-6-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit bc57eda646cea6a9077ba1b781bf64bc0ab836a7 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:25 2025 +0200 ipv6: sr: Use nested-BH locking for hmac_storage hmac_storage is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: David Ahern Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-5-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 1c0829788a6e6e165846b9bedd0b908ef16260b6 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:24 2025 +0200 ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT The statistics are incremented with raw_cpu_inc() assuming it always happens with bottom half disabled. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this is no longer true. Use this_cpu_inc() on PREEMPT_RT for the increment to not worry about preemption. Cc: David Ahern Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-4-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit c99dac52ffad5df88c9c52ab2008b182743bdcc1 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:23 2025 +0200 net: dst_cache: Use nested-BH locking for dst_cache::cache dst_cache::cache is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-3-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 32471b2f481dea8624f27669d36ffd131d24b732 Author: Sebastian Andrzej Siewior Date: Mon May 12 11:27:22 2025 +0200 net: page_pool: Don't recycle into cache on PREEMPT_RT With preemptible softirq and no per-CPU locking in local_bh_disable() on PREEMPT_RT the consumer can be preempted while a skb is returned. Avoid the race by disabling the recycle into the cache on PREEMPT_RT. Cc: Jesper Dangaard Brouer Cc: Ilias Apalodimas Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20250512092736.229935-2-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 1631cbdb808963354ef6b6454bc617cd15f90718 Author: Diederik de Haas Date: Tue May 13 18:57:27 2025 +0200 arm64: dts: rockchip: Improve LED config for NanoPi R5S The NanoPi R5S has 4 GPIO LEDs, a RED one for SYStem power and 3 green LEDs meant to indicate that a cable is connected to either of the 2.5GbE LAN ports or the 1GbE WAN port. In the NanoPi R5S schematic (2204; page 19) as well as on the PCB and on the case, SYS is used and not POWER. So replace 'power' with 'sys'. But keep the 'power_led' label/phandle even though the kernel doesn't use it, but it may be used outside of it. The SYStem LED already had "heartbeat" as its default-trigger. Set the default-trigger to "netdev" for the NICs so they will show when LAN1/LAN2/WAN is connected and set their default-state to "off". Also assign labels as close as possible to the labels on the case, while still being descriptive enough in their own right. Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250513170056.96259-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 276036283716b9135525b195675ea42801bde204 Author: Heiko Stuebner Date: Thu May 15 10:26:52 2025 +0200 clk: rockchip: rk3528: add slab.h header include The newly added GRF types introduced kzalloc usage into the rk3528. At least for the similar rk3576 driver, the kernel-test-robot reported the missing prototype, which warranted adding a slab.h include. While it did not complain about the rk3528, so the header might be included "accidentially" right now, add a real include to make sure we keep it included in the future. Fixes: 306d2f5ddaa7 ("clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250515082652.2503063-2-heiko@sntech.de commit 92da5c3cba23ee4be2c043bb63a551c89c48de18 Author: Heiko Stuebner Date: Thu May 15 10:26:51 2025 +0200 clk: rockchip: rk3576: add missing slab.h include The change for auxiliary GRFs introduced kzalloc usage into the rk3576 clock driver, but missed adding the header for its prototype. Add it now. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505150941.KWKskr2c-lkp@intel.com/ Fixes: 70a114daf207 ("clk: rockchip: introduce auxiliary GRFs") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250515082652.2503063-1-heiko@sntech.de commit 56198acdbf0d57200e49311e16d6bf16498128f7 Author: Heiko Stuebner Date: Wed May 14 17:07:45 2025 +0200 arm64: dts: rockchip: add px30-pp1516 base dtsi and board variants PP1516 are Touchscreen devices built around the PX30 SoC and companion devices to PX30-Cobra, again with multiple display options. The devices feature an EMMC, OTG port and a 720x1280 display with a touchscreen and camera Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-7-heiko@sntech.de Signed-off-by: Heiko Stuebner commit b8310e4d391ad123048de738ac023ef8b7ebdbfc Author: Heiko Stuebner Date: Wed May 14 17:07:44 2025 +0200 dt-bindings: arm: rockchip: add PX30-PP1516 boards from Theobroma Systems PP1516 are Touchscreen devices built around the PX30 SoC and companion devices to PX30-Cobra, again with multiple display options. The devices feature an EMMC, OTG port and a 720x1280 display with a touchscreen and camera Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-6-heiko@sntech.de Signed-off-by: Heiko Stuebner commit bb510ddc9d3eda3d6e1276d301e923e7021e9972 Author: Heiko Stuebner Date: Wed May 14 17:07:43 2025 +0200 arm64: dts: rockchip: add px30-cobra base dtsi and board variants Cobra are Touchscreen devices built around the PX30 SoC using a variety of display options. The devices feature an EMMC, network port, usb host + OTG ports and a 720x1280 display with a touchscreen. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-5-heiko@sntech.de Signed-off-by: Heiko Stuebner commit e2a6b301ca6054fc72905810d084690ec0ee1aed Author: Heiko Stuebner Date: Wed May 14 17:07:42 2025 +0200 dt-bindings: arm: rockchip: add PX30-Cobra boards from Theobroma Systems Cobra are Touchscreen devices built around the PX30 SoC using a variety of display options. The devices feature an EMMC, network port, usb host + OTG ports and a 720x1280 display with a touchscreen. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-4-heiko@sntech.de Signed-off-by: Heiko Stuebner commit e463625af7f92c4a9f097f7fb87f6baaad6e762a Author: Heiko Stuebner Date: Wed May 14 17:07:41 2025 +0200 arm64: dts: rockchip: move reset to dedicated eth-phy node on ringneck Using snps,reset-* properties to handle the ethernet-phy resets is deprecated and instead a real phy node should be used. Move the Ringneck phy-reset properties to such a node Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-3-heiko@sntech.de Signed-off-by: Heiko Stuebner commit ede4837a504ca7e5811217060aa8300b8d0cf7f2 Author: Heiko Stuebner Date: Wed May 14 17:07:40 2025 +0200 arm64: dts: rockchip: add basic mdio node to px30 Using snps,reset-* properties for handling the phy-reset is deprecated and instead a real phy node should be defined that then contains the reset-gpios handling. To facilitate this, add the core mdio node under the px30's gmac, similar to how the other Rockchip socs already do this. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-2-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 0afce85ed26c73860bb6e99a0657e1d90d533256 Author: Krzysztof Kozlowski Date: Fri Apr 4 13:56:57 2025 +0200 clk: meson: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20250404-kconfig-defaults-clk-v1-1-4d2df5603332@linaro.org Signed-off-by: Jerome Brunet commit febd8c6ab52c683b447fe22fc740918c86feae43 Author: Quentin Schulz Date: Fri Apr 25 17:18:10 2025 +0200 arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou The u2phy0_host port is the part of the USB PHY0 (namely the HOST0_DP/DM lanes) which routes directly to the USB2.0 HOST controller[1]. The other lanes of the PHY are routed to the USB3.0 OTG controller (dwc3), which we do use. The HOST0_DP/DM lanes aren't routed on RK3399 Puma so let's simply disable the USB2.0 controllers. USB3 OTG has been known to be unstable on RK3399 Puma Haikou for a while, one of the recurring issues being that only USB2 is detected and not USB3 in host mode. Reading the justification above and seeing that we are keeping u2phy0_host in the Haikou carrierboard DTS probably may have bothered you since it should be changed to u2phy0_otg. The issue is that if it's switched to that, USB OTG on Haikou is entirely broken. I have checked the routing in the Gerber file, the lanes are going to the expected ball pins (that is, NOT HOST0_DP/DM). u2phy0_host is for sure the wrong part of the PHY to use, but it's the only one that works at the moment for that board so keep it until we figure out what exactly is broken. No intended functional change. [1] https://rockchip.fr/Rockchip%20RK3399%20TRM%20V1.3%20Part2.pdf Chapter 2 USB2.0 PHY Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Quentin Schulz Signed-off-by: Lukasz Czechowski Link: https://lore.kernel.org/r/20250425-onboard_usb_dev-v2-5-4a76a474a010@thaumatec.com Signed-off-by: Heiko Stuebner commit 3373af1d76bacd054b37f3e10266dd335ce425f8 Author: Quentin Schulz Date: Fri Apr 25 17:18:09 2025 +0200 arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma The u2phy1_host port is the part of the USB PHY1 (namely the HOST1_DP/DM lanes) which routes directly to the USB2.0 HOST controller[1]. The other lanes of the PHY are routed to the USB3.0 OTG controller (dwc3), which we do use. The HOST1_DP/DM lanes aren't routed on RK3399 Puma so let's simply disable the USB2.0 controllers and associated part in USB2.0 PHY. No intended functional change. [1] https://rockchip.fr/Rockchip%20RK3399%20TRM%20V1.3%20Part2.pdf Chapter 2 USB2.0 PHY Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Quentin Schulz Signed-off-by: Lukasz Czechowski Link: https://lore.kernel.org/r/20250425-onboard_usb_dev-v2-4-4a76a474a010@thaumatec.com Signed-off-by: Heiko Stuebner commit d7cc532df95f7f159e40595440e4e4b99481457b Author: Lukasz Czechowski Date: Fri Apr 25 17:18:08 2025 +0200 arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma Currently, the onboard Cypress CYUSB3304 USB hub is not defined in the device tree, and hub reset pin is provided as vcc5v0_host regulator to usb phy. This causes instability issues, as a result of improper reset duration. The fixed regulator device requests the GPIO during probe in its inactive state (except if regulator-boot-on property is set, in which case it is requested in the active state). Considering gpio is GPIO_ACTIVE_LOW for Puma, it means it’s driving it high. Then the regulator gets enabled (because regulator-always-on property), which drives it to its active state, meaning driving it low. The Cypress CYUSB3304 USB hub actually requires the reset to be asserted for at least 5 ms, which we cannot guarantee right now since there's no delay in the current config, meaning the hub may sometimes work or not. We could add delay as offered by fixed-regulator but let's rather fix this by using the proper way to model onboard USB hubs. Define hub_2_0 and hub_3_0 nodes, as the onboard Cypress hub consist of two 'logical' hubs, for USB2.0 and USB3.0. Use the 'reset-gpios' property of hub to assign reset pin instead of using regulator. Rename the vcc5v0_host regulator to cy3304_reset to be more meaningful. Pin is configured to output-high by default, which sets the hub in reset state during pin controller initialization. This allows to avoid double enumeration of devices in case the bootloader has setup the USB hub before the kernel. The vdd-supply and vdd2-supply properties in hub nodes are added to provide correct dt-bindings, although power supplies are always enabled based on HW design. Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Cc: stable@vger.kernel.org # 6.6 Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table in drivers/usb/misc/onboard_usb_dev.c driver Signed-off-by: Lukasz Czechowski Link: https://lore.kernel.org/r/20250425-onboard_usb_dev-v2-3-4a76a474a010@thaumatec.com Signed-off-by: Heiko Stuebner commit 1ad4b5a7de16806afc1aeaf012337e62af04e001 Author: Lukasz Czechowski Date: Fri Apr 25 17:18:07 2025 +0200 dt-bindings: usb: cypress,hx3: Add support for all variants The Cypress HX3 hubs use different default PID value depending on the variant. Update compatibles list. Becasuse all hub variants use the same driver data, allow the dt node to have two compatibles: leftmost which matches the HW exactly, and the second one as fallback. Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family") Cc: stable@vger.kernel.org # 6.6 Cc: stable@vger.kernel.org # Backport of the patch ("dt-bindings: usb: usb-device: relax compatible pattern to a contains") from list: https://lore.kernel.org/linux-usb/20250418-dt-binding-usb-device-compatibles-v2-1-b3029f14e800@cherry.de/ Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table in drivers/usb/misc/onboard_usb_dev.c driver Signed-off-by: Lukasz Czechowski Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250425-onboard_usb_dev-v2-2-4a76a474a010@thaumatec.com [taken with Greg's blessing] Signed-off-by: Heiko Stuebner commit daf004f87c3520c414992893e2eadd5db5f86a5a Author: Da Xue Date: Mon May 12 10:26:16 2025 -0400 clk: meson-g12a: add missing fclk_div2 to spicc SPICC is missing fclk_div2, which means fclk_div5 and fclk_div7 indexes are wrong on this clock. This causes the spicc module to output sclk at 2.5x the expected rate when clock index 3 is picked. Adding the missing fclk_div2 resolves this. [jbrunet: amended commit description] Fixes: a18c8e0b7697 ("clk: meson: g12a: add support for the SPICC SCLK Source clocks") Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Da Xue Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20250512142617.2175291-1-da@libre.computer Signed-off-by: Jerome Brunet commit 3b0bca979344b2e26de8f4c175bed975b1d54e8f Author: Rob Herring (Arm) Date: Mon May 12 16:57:56 2025 -0500 dt-bindings: ata: Convert arasan,cf-spear1340 to DT schema Convert the Arasan/SPEAr Compact Flash Controller to DT schema format. The "clock-frequency" property isn't actually used. Add a single "clocks" entry as the Linux driver supports a single clock though the platform still doesn't have clocks in DT. Signed-off-by: Rob Herring (Arm) Signed-off-by: Damien Le Moal commit 6130ed3cd0b4c5e22757e7aa1819abd66f0987e3 Author: Rob Herring (Arm) Date: Mon May 12 16:57:48 2025 -0500 dt-bindings: ata: Convert marvell,orion-sata to DT schema Convert the Marvell Orion SATA Controller to DT schema format. The clocks and clock-names properties were missing. The names for phy-names were incorrect. The maximum "nr-ports" was determined from the Linux driver. Signed-off-by: Rob Herring (Arm) Signed-off-by: Damien Le Moal commit ca7cf1f41f387ba5f015f96e17aa05dcd3cdc1dc Author: Rob Herring (Arm) Date: Mon May 12 16:57:41 2025 -0500 dt-bindings: ata: Convert cavium,ebt3000-compact-flash to DT schema Convert the Cavium Compact Flash Controller to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Damien Le Moal commit b562d788e27ab0a8016951672793525e35bf6eec Author: Rob Herring (Arm) Date: Mon May 12 16:57:29 2025 -0500 dt-bindings: ata: Convert apm,xgene-ahci to DT schema Convert the APM X-Gene AHCI SATA Controller to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Signed-off-by: Damien Le Moal commit 2de72bb42c149ba7908291bd3dd46e315a7fe65f Author: Rob Herring (Arm) Date: Mon May 12 16:57:23 2025 -0500 dt-bindings: ata: Convert st,ahci to DT schema Convert the ST AHCI SATA Controller to DT schema format. The phy-names changes from "ahci_phy" to "sata-phy" with the inclusion of ahci-common.yaml. That's an ABI change, but the Linux driver at least ignores the names. The binding uses "ports-implemented" property, so including ahci-common.yaml is required. Signed-off-by: Rob Herring (Arm) Signed-off-by: Damien Le Moal commit 7dbfa4266c5e1e72db274bcb60d17691bbea513e Author: Filipe Manana Date: Mon May 12 12:31:24 2025 +0100 btrfs: fix harmless race getting delayed ref head count when running delayed refs When running delayed references we are reading the number of ready delayed ref heads without taking any lock which can make KCSAN report a race since we can have concurrent tasks updating that number, such as for example when freeing a tree block which will end up decrementing that counter or when adding a new delayed ref while COWing a tree block which will increment that counter. This is a harmless race since running one more or one less delayed ref head doesn't result in any problem, in the critical section of a transaction commit we always run any remaining delayed refs and at that point no one can create more. So fix this harmless race by annotating the read with data_race(). Reported-by: cen zhang Link: https://lore.kernel.org/linux-btrfs/CAFRLqsUCLMz0hY-GaPj1Z=fhkgRHjxVXHZ8kz0PvkFN0b=8L2Q@mail.gmail.com/ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4469e95fe5d13f1788c6f5eb88d04365fd319a71 Author: Filipe Manana Date: Sun May 11 14:50:08 2025 +0100 btrfs: log error codes during failures when writing super blocks When writing super blocks, at write_dev_supers(), we log an error message when we get some error but we don't show which error we got and we have that information. So enhance the error messages with the error codes. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f2bc221507fa1e787b87c783f4c699e5feb8957 Author: Filipe Manana Date: Sat May 10 14:08:39 2025 +0100 btrfs: simplify error return logic when getting folio at prepare_one_folio() There's no need to have special logic to return -EAGAIN in case the call to __filemap_get_folio() fails, because when FGP_NOWAIT is passed to __filemap_get_folio() it returns ERR_PTR(-EAGAIN) if it needs to do something that would imply blocking. The reason we have this logic is from the days before we migrated to the folio interface, when we called pagecache_get_page() which would return NULL instead of an error pointer. So remove this special casing and always return the error that the call to __filemap_get_folio() returned. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 443e4d0e1c622885cb3d048619b4cc2c27a812bd Author: Filipe Manana Date: Sat May 10 13:59:54 2025 +0100 btrfs: return real error from __filemap_get_folio() calls We have a few places that always assume a -ENOMEM error happened in case a call to __filemap_get_folio() returns an error, which is just too much of an assumption and even if it would be the case at some point in time, it's not future proof and there's nothing in the documentation that guarantees that only ERR_PTR(-ENOMEM) can be returned with the flags we are passing to it. So use the exact error returned by __filemap_get_folio() instead. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ca84913d490dad56b5ca7580be064b039039bd34 Author: Filipe Manana Date: Fri May 9 17:29:55 2025 +0100 btrfs: remove superfluous return value check at btrfs_dio_iomap_begin() In the if statement that checks the return value from btrfs_check_data_free_space(), there's no point to check if 'ret' is not zero in the else branch, since the main if branch checked that it's zero, so in the else branch it necessarily has a non-zero value. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d3914d6030aa6be2993dfc223d096ff93018c236 Author: Filipe Manana Date: Fri May 9 17:08:50 2025 +0100 btrfs: fix invalid data space release when truncating block in NOCOW mode If when truncating a block we fail to reserve data space and then we proceed anyway because we can do a NOCOW write, if we later get an error when trying to get the folio from the inode's mapping, we end up releasing data space that we haven't reserved, screwing up the bytes_may_use counter from the data space_info, eventually resulting in an underflow when all other reservations done by other tasks are released, if any, or right away if there are no other reservations at the moment. This is because when we get an error when trying to grab the block's folio we call btrfs_delalloc_release_space(), which releases metadata (which we have reserved) and data (which we haven't reserved). Fix this by calling btrfs_delalloc_release_space() only if we did reserve data space, that is, if we aren't falling back to NOCOW, meaning the local variable @only_release_metadata has a false value, otherwise release only metadata by calling btrfs_delalloc_release_metadata(). Fixes: 6d4572a9d71d ("btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c16b984cdbaf3a96c671bc2952c1064af983683d Author: David Sterba Date: Tue May 6 13:04:26 2025 +0200 btrfs: update Kconfig option descriptions Expand what the options do and if they are OK to be enabled. Signed-off-by: David Sterba commit 5f9b394e3295ed82af8da81d3326e5577a140cc8 Author: David Sterba Date: Tue May 6 13:04:25 2025 +0200 btrfs: update list of features built under experimental config The list is out of date, the extent shrinker got fixed in 6.13. Add new entries: the COW fixup warning in 6.15, rund robin policies in 6.14. Signed-off-by: David Sterba commit 585e944a31e3e87bc17169a9b519093e77bfdd61 Author: David Sterba Date: Wed May 7 18:28:06 2025 +0200 btrfs: send: remove btrfs_debug() calls There are debugging prints for each emitted send command and other related actions. This does not seem right as the number of commands can be high and dumping that to the system log will likely hit some rate limiting. This should be done by trace points that are more lightweight and can keep up with high frequency. Signed-off-by: David Sterba commit 9f6fa5b34492a5ad5f796113061780212744fd5d Author: Filipe Manana Date: Wed May 7 16:33:45 2025 +0100 btrfs: use boolean for delalloc argument to btrfs_free_reserved_extent() We are using an integer for the 'delalloc' argument but all we need is a boolean, so switch the type to 'bool' and rename the parameter to 'is_delalloc' to better match the fact that it's a boolean. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ba4ec9a5a018379825f7c6d97910cae2bd14481a Author: Filipe Manana Date: Wed May 7 16:28:51 2025 +0100 btrfs: use boolean for delalloc argument to btrfs_free_reserved_bytes() We are using an integer for the 'delalloc' argument but all we need is a boolean, so switch the type to 'bool' and rename the parameter to 'is_delalloc' to better match the fact that it's a boolean. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 87417e0cbbf30447e3549d16a682deebcd87aa9c Author: Filipe Manana Date: Wed May 7 16:05:06 2025 +0100 btrfs: fold error checks when allocating ordered extent and update comments Instead of having an error check and return on each branch of the if statement, move the error check to happen after that if branch, reducing source code and object code sizes. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1840174 163742 16136 2020052 1ed2d4 fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1840138 163742 16136 2020016 1ed2b0 fs/btrfs/btrfs.ko While at it and moving the comments, update the comments to be more clear about how qgroup reserved space is released and the intricacies of how it's managed for COW writes. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 08c649a5637371cb6bf8f3e974323cf59a7f434b Author: Filipe Manana Date: Tue May 6 15:56:45 2025 +0100 btrfs: check we grabbed inode reference when allocating an ordered extent When allocating an ordered extent we call igrab() to get a reference on the inode and attach it to the ordered extent. For an ordered extent we always must have an inode reference since we during its life cycle we need to access the inode for several things like for example: * Inserting the ordered extent right after allocating it, when calling insert_ordered_extent() - we need to lock the inode's ordered_tree_lock; * In the bio submission path we need to add checksums to the ordered extent and we end up at btrfs_add_ordered_sum(), where again we need to grab the inode from the ordered extent to lock the inode's ordered_tree_lock; * When finishing an ordered extent, at btrfs_finish_ordered_extent(), we need again to access its inode in order to lock the inode's ordered_tree_lock; * Etc etc etc. Everywhere we deal with an ordered extent we always expect its inode to be not NULL, the only exception being btrfs_put_ordered_extent() where we check if it's NULL before calling btrfs_add_delayed_iput(), even though we have already assumed it's not NULL when calling the tracepoint trace_btrfs_ordered_extent_put() since the tracepoint dereferences the inode to extract its number and root without ever checking it's NULL. The igrab() call can return NULL if the inode is about to be freed or is being freed (its state has I_FREEING or I_WILL_FREE set), and that's why there's such check at btrfs_put_ordered_extent(). The igrab() and NULL check were introduced in commit 5fd02043553b ("Btrfs: finish ordered extents in their own thread") but even back then we always needed and assumed igrab() returned a non-NULL pointer, since for example when removing an ordered extent, at btrfs_remove_ordered_extent(), we assumed the inode pointer was not NULL in order to access the inode's ordered extent tree. In fact whenever we allocate an ordered extent we are holding an inode reference and the inode is not being freed or going to be freed (which happens in the final iput), and since we depend on the inode for the life cycle of the ordered extent, just make ordered extent allocation to fail in case igrab() returns NULL and trigger a warning, to make it clear it's not expected. This allows to remove the confusing NULL inode check at btrfs_put_ordered_extent(). Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1f2889f5594a2bc4c6a52634c4a51b93e785def5 Author: Filipe Manana Date: Wed May 7 13:05:36 2025 +0100 btrfs: fix qgroup reservation leak on failure to allocate ordered extent If we fail to allocate an ordered extent for a COW write we end up leaking a qgroup data reservation since we called btrfs_qgroup_release_data() but we didn't call btrfs_qgroup_free_refroot() (which would happen when running the respective data delayed ref created by ordered extent completion or when finishing the ordered extent in case an error happened). So make sure we call btrfs_qgroup_free_refroot() if we fail to allocate an ordered extent for a COW write. Fixes: 7dbeaad0af7d ("btrfs: change timing for qgroup reserved space for ordered extents to fix reserved space leak") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 4ad57e1e224a349cede42e1fcb8abded0e4850ab Author: Qu Wenruo Date: Wed May 7 13:55:42 2025 +0930 btrfs: scrub: reduce memory usage of struct scrub_sector_verification That structure records needed info for block verification (either data checksum pointer, or expected tree block generation). But there is also a boolean to tell if this block belongs to a metadata or not, as the data checksum pointer and expected tree block generation is already a union, we need a dedicated bit to tell if this block is a metadata or not. However such layout means we're wasting 63 bits for x86_64, which is a huge memory waste. Thanks to the recent bitmap aggregation, we can easily move this single-bit-per-block member to a new sub-bitmap. And since we already have six 16 bits long bitmaps, adding another bitmap won't even increase any memory usage for x86_64, as we need two 64 bits long anyway. This will reduce the following memory usages: - sizeof(struct scrub_sector_verification) From 16 bytes to 8 bytes on x86_64. - scrub_stripe::sectors From 16 * 16 to 16 * 8 bytes. - Per-device scrub_ctx memory usage From 128 * (16 * 16) to 128 * (16 * 8), which saves 16KiB memory. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e2945f73b076bbd5c0bbb8f0da1e52180de9bda Author: Qu Wenruo Date: Sat Apr 26 08:06:50 2025 +0930 btrfs: handle aligned EOF truncation correctly for subpage cases [BUG] For the following fsx -e 1 run, the btrfs still fails the run on 64K page size with 4K fs block size: READ BAD DATA: offset = 0x26b3a, size = 0xfafa, fname = /mnt/btrfs/junk OFFSET GOOD BAD RANGE 0x26b3a 0x0000 0x15b4 0x0 operation# (mod 256) for the bad data may be 21 [...] LOG DUMP (28 total operations): 1( 1 mod 256): SKIPPED (no operation) 2( 2 mod 256): SKIPPED (no operation) 3( 3 mod 256): SKIPPED (no operation) 4( 4 mod 256): SKIPPED (no operation) 5( 5 mod 256): WRITE 0x1ea90 thru 0x285e0 (0x9b51 bytes) HOLE 6( 6 mod 256): ZERO 0x1b1a8 thru 0x20bd4 (0x5a2d bytes) 7( 7 mod 256): FALLOC 0x22b1a thru 0x272fa (0x47e0 bytes) INTERIOR 8( 8 mod 256): WRITE 0x741d thru 0x13522 (0xc106 bytes) 9( 9 mod 256): MAPWRITE 0x73ee thru 0xdeeb (0x6afe bytes) 10( 10 mod 256): FALLOC 0xb719 thru 0xb994 (0x27b bytes) INTERIOR 11( 11 mod 256): COPY 0x15ed8 thru 0x18be1 (0x2d0a bytes) to 0x25f6e thru 0x28c77 12( 12 mod 256): ZERO 0x1615e thru 0x1770e (0x15b1 bytes) 13( 13 mod 256): SKIPPED (no operation) 14( 14 mod 256): DEDUPE 0x20000 thru 0x27fff (0x8000 bytes) to 0x1000 thru 0x8fff 15( 15 mod 256): SKIPPED (no operation) 16( 16 mod 256): CLONE 0xa000 thru 0xffff (0x6000 bytes) to 0x36000 thru 0x3bfff 17( 17 mod 256): ZERO 0x14adc thru 0x1b78a (0x6caf bytes) 18( 18 mod 256): TRUNCATE DOWN from 0x3c000 to 0x1e2e3 ******WWWW 19( 19 mod 256): CLONE 0x4000 thru 0x11fff (0xe000 bytes) to 0x16000 thru 0x23fff 20( 20 mod 256): FALLOC 0x311e1 thru 0x3681b (0x563a bytes) PAST_EOF 21( 21 mod 256): FALLOC 0x351c5 thru 0x40000 (0xae3b bytes) EXTENDING 22( 22 mod 256): WRITE 0x920 thru 0x7e51 (0x7532 bytes) 23( 23 mod 256): COPY 0x2b58 thru 0xc508 (0x99b1 bytes) to 0x117b1 thru 0x1b161 24( 24 mod 256): TRUNCATE DOWN from 0x40000 to 0x3c9a5 25( 25 mod 256): SKIPPED (no operation) 26( 26 mod 256): MAPWRITE 0x25020 thru 0x26b06 (0x1ae7 bytes) 27( 27 mod 256): SKIPPED (no operation) 28( 28 mod 256): READ 0x26b3a thru 0x36633 (0xfafa bytes) ***RRRR*** [CAUSE] The involved operations are: fallocating to largest ever: 0x40000 21 pollute_eof 0x24000 thru 0x2ffff (0xc000 bytes) 21 falloc from 0x351c5 to 0x40000 (0xae3b bytes) 28 read 0x26b3a thru 0x36633 (0xfafa bytes) At operation #21 a pollute_eof is done, by memory mapped write into range [0x24000, 0x2ffff). At this stage, the inode size is 0x24000, which is block aligned. Then fallocate happens, and since it's expanding the inode, it will call btrfs_truncate_block() to truncate any unaligned range. But since the inode size is already block aligned, btrfs_truncate_block() does nothing and exits. However remember the folio at 0x20000 has some range polluted already, although it will not be written back to disk, it still affects the page cache, resulting the later operation #28 to read out the polluted value. [FIX] Instead of early exit from btrfs_truncate_block() if the range is already block aligned, do extra filio zeroing if the fs block size is smaller than the page size and we're truncating beyond EOF. This is to address exactly the above case where memory mapped write can still leave some garbage beyond EOF. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8e4f21f2b13d6cc29b59ad7faaac7aafbf3569e3 Author: Qu Wenruo Date: Sat Apr 26 08:06:49 2025 +0930 btrfs: handle unaligned EOF truncation correctly for subpage cases [BUG] The following fsx sequence will fail on btrfs with 64K page size and 4K fs block size: #fsx -d -e 1 -N 4 $mnt/junk -S 36386 READ BAD DATA: offset = 0xe9ba, size = 0x6dd5, fname = /mnt/btrfs/junk OFFSET GOOD BAD RANGE 0xe9ba 0x0000 0x03ac 0x0 operation# (mod 256) for the bad data may be 3 ... LOG DUMP (4 total operations): 1( 1 mod 256): WRITE 0x6c62 thru 0x1147d (0xa81c bytes) HOLE ***WWWW 2( 2 mod 256): TRUNCATE DOWN from 0x1147e to 0x5448 ******WWWW 3( 3 mod 256): ZERO 0x1c7aa thru 0x28fe2 (0xc839 bytes) 4( 4 mod 256): MAPREAD 0xe9ba thru 0x1578e (0x6dd5 bytes) ***RRRR*** [CAUSE] Only 2 operations are really involved in this case: 3 pollute_eof 0x5448 thru 0xffff (0xabb8 bytes) 3 zero from 0x1c7aa to 0x28fe3, (0xc839 bytes) 4 mapread 0xe9ba thru 0x1578e (0x6dd5 bytes) At operation 3, fsx pollutes beyond EOF, that is done by mmap() and write into that mmap() range beyond EOF. Such write will fill the range beyond EOF, but it will never reach disk as ranges beyond EOF will not be marked dirty nor uptodate. Then we zero_range for [0x1c7aa, 0x28fe3], and since the range is beyond our isize (which was 0x5448), we should zero out any range beyond EOF (0x5448). During btrfs_zero_range(), we call btrfs_truncate_block() to dirty the unaligned head block. But that function only really zeroes out the block at [0x5000, 0x5fff], it doesn't bother any range other that that block, since those ranges will not be marked dirty nor written back. So the range [0x6000, 0xffff] is still polluted, and later mapread() will return the poisoned value. [FIX] Enhance btrfs_truncate_block() by: - Pass a @start/@end pair to indicate the full truncation range This is to handle the following truncation case: Page size is 64K, fs block size is 4K, truncate range is [6K, 60K] 0 32K 64K | |///////////////////////////////////| | 6K 60K The range is not aligned for its head block, so we need to call btrfs_truncate_block() with @from = 6K, @front = 0, @len = 0. But with that information we only know to zero the range [6K, 8K), if we zero out the range [6K, 64K), the last block will also be zeroed, causing data loss. So here we need the full range we're truncating, so that we can avoid over-truncation. - Rename @from to @offset As now the parameter is only utilized to locate a block, it's not really carrying the old @from meaning well. - Remove @front parameter With the full truncate range passed in, we can determine if the @offset is at the head or tail block. - Skip truncation if @offset is not in the head nor tail blocks The call site in hole punch unconditionally call btrfs_truncate_block() without even checking the range is aligned or not. If the @offset is neither in the head nor in tail block, it means we can safely ignore it. - Skip truncate if the range inside the target block is already aligned - Make btrfs_truncate_block() zero all blocks beyond EOF Since we have the original range, we know exactly if we're doing truncation beyond EOF (the @end will be (u64)-1). If we're doing truncation beyond EOF, then enlarge the truncation range to the folio end, to address the possibly polluted ranges. Otherwise still keep the zero range inside the block, as we can have large data folios soon, always truncating every blocks inside the same folio can be costly for large folios. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 3649833a58b6cae14651900629e74e9a710e0fb6 Author: Boris Burkov Date: Mon Mar 17 16:47:38 2025 -0700 btrfs: fix broken drop_caches on extent buffer folios The (correct) commit e41c81d0d30e ("mm/truncate: Replace page_mapped() call in invalidate_inode_page()") replaced the page_mapped(page) check with a refcount check. However, this refcount check does not work as expected with drop_caches for btrfs's metadata pages. Btrfs has a per-sb metadata inode with cached pages, and when not in active use by btrfs, they have a refcount of 3. One from the initial call to alloc_pages(), one (nr_pages == 1) from filemap_add_folio(), and one from folio_attach_private(). We would expect such pages to get dropped by drop_caches. However, drop_caches calls into mapping_evict_folio() via mapping_try_invalidate() which gets a reference on the folio with find_lock_entries(). As a result, these pages have a refcount of 4, and fail this check. For what it's worth, such pages do get reclaimed under memory pressure, so I would say that while this behavior is surprising, it is not really dangerously broken. When I asked the mm folks about the expected refcount in this case, I was told that the correct thing to do is to donate the refcount from the original allocation to the page cache after inserting it. Therefore, attempt to fix this by adding a put_folio() to the critical spot in alloc_extent_buffer() where we are sure that we have really allocated and attached new pages. We must also adjust folio_detach_private() to properly handle being the last reference to the folio and not do a use-after-free after folio_detach_private(). extent_buffers allocated by clone_extent_buffer() and alloc_dummy_extent_buffer() are unmapped, so this transfer of ownership from allocation to insertion in the mapping does not apply to them. However, we can still folio_put() them safely once they are finished being allocated and have called folio_attach_private(). Finally, removing the generic put_folio() for the allocation from btrfs_detach_extent_buffer_folios() means we need to be careful to do the appropriate put_folio() in allocation failure paths in alloc_extent_buffer(), clone_extent_buffer() and alloc_dummy_extent_buffer(). Link: https://lore.kernel.org/linux-mm/ZrwhTXKzgDnCK76Z@casper.infradead.org/ Tested-by: Klara Modin Reviewed-by: Daniel Vacek Reviewed-by: Filipe Manana Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 1886b77f5bf1f463663aea0cb94980a0d3e35298 Author: Filipe Manana Date: Mon May 5 16:36:21 2025 +0100 btrfs: use verbose assert at peek_discard_list() We now have a verbose variant of ASSERT() so that we can print the value of the block group's discard_index. So use it for better problem analysis in case the assertion is triggered. Reviewed-by: Boris Burkov Reviewed-by: Daniel Vacek Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1b660424a6f33da62c2aa03d21dd1cf4cb39a692 Author: Qu Wenruo Date: Mon May 5 19:33:47 2025 +0930 btrfs: scrub: aggregate small bitmaps into a larger one Currently we have several small bitmaps inside scrub_stripe: - extent_sector_bitmap - error_bitmap - io_error_bitmap - csum_error_bitmap - meta_error_bitmap - meta_gen_error_bitmap All those bitmaps are at most 16 bits long, but unsigned long is either 32 or 64 (more common) bits. This means we're wasting 1/2 or 3/4 space for each bitmap. And we can have 128 scrub_stripe for each device, such wasted space adds up quickly. Instead of using a single unsigned long for each bitmap, aggregate them into a larger bitmap, just like what we're doing for subpage support. This reduces 24 bytes from each scrub_stripe structure on x86_64 systems. This will need a lot of macros converting direct bitmap/bit operations into our scrub_stripe specific helpers, but all those helpers are very small and can be inlined. So overall the overhead shouldn't be that huge, and we save quite some memory space. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f2c19541e421b3235efc515dad88b581f00592ae Author: Qu Wenruo Date: Mon May 5 18:56:18 2025 +0930 btrfs: scrub: fix a wrong error type when metadata bytenr mismatches When the bytenr doesn't match for a metadata tree block, we will report it as an csum error, which is incorrect and should be reported as a metadata error instead. Fixes: a3ddbaebc7c9 ("btrfs: scrub: introduce a helper to verify one metadata block") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5bc3b7e2b5f840a4131093b66fd3c1ab604ba9a9 Author: Filipe Manana Date: Fri May 2 11:23:02 2025 +0100 btrfs: defrag: use list_last_entry() at defrag_collect_targets() Instead of using list_entry() against the list's prev entry, use list_last_entry(), which removes the need to know the last member is accessed through the prev list pointer and the naming makes it easier to reason about what we are doing. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 58fe389a2a2497bbb4e6be3afeaa20c5d5640102 Author: Filipe Manana Date: Thu May 1 13:21:34 2025 +0100 btrfs: simplify csum list release at btrfs_put_ordered_extent() Instead of extracting each element by grabbing the list's first member in a local list_head variable, then extracting the csum with list_entry() and iterating with a while loop checking for list emptyness, use the iteration helper list_for_each_entry_safe(). This also removes the need to delete elements from the list with list_del() since the ordered extent is freed immediately after. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4cde0724c9b3bdcb3ce2f0d45c85186111281e34 Author: Filipe Manana Date: Thu May 1 13:11:40 2025 +0100 btrfs: simplify extracting delayed node at btrfs_first_prepared_delayed_node() Instead of grabbing the next pointer from the list and then doing a list_entry() call, we can simply use list_first_entry(), removing the need for list_head variable. Also there's no need to check if the list is empty before attempting to extract the first element, we can use list_first_entry_or_null(), removing the need for a special if statement and the 'out' label. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32bc875cbc159dc18ac588b64717a70b444e4656 Author: Filipe Manana Date: Thu May 1 13:05:10 2025 +0100 btrfs: simplify extracting delayed node at btrfs_first_delayed_node() Instead of grabbing the next pointer from the list and then doing a list_entry() call, we can simply use list_first_entry(), removing the need for list_head variable. Also there's no need to check if the list is empty before attempting to extract the first element, we can use list_first_entry_or_null(), removing the need for a special if statement and the 'out' label. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c5d12d5b621258eb07f4106dc9196affed1c22d0 Author: Filipe Manana Date: Thu May 1 12:54:03 2025 +0100 btrfs: raid56: use list_last_entry() at cache_rbio() Instead of using list_entry() against the list's prev entry, use list_last_entry(), which removes the need to know the last member is accessed through the prev list pointer and the naming makes it easier to reason about what we are doing. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d26d16a43272d714c06bf33509b84797863fcf9c Author: Filipe Manana Date: Thu May 1 12:47:35 2025 +0100 btrfs: simplify cow only root list extraction during transaction commit There's no need to keep a local variable to extract the first member of the list and then do a list_entry() call, we can use list_first_entry() instead, removing the need for the temporary variable and extracting the first element in a single step. Also, there's no need to do a list_del_init() followed by list_add_tail(), instead we can use list_move_tail(). We are in transaction commit critical section where we don't need to worry about concurrency and that's why we don't take any locks and can use list_move_tail() (we do assert early at commit_cowonly_roots() that we are in the critical section, that the transaction's state is TRANS_STATE_COMMIT_DOING). Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a20f732822833f7e3c8b3aa8628159d5c12e7648 Author: Filipe Manana Date: Thu May 1 12:23:17 2025 +0100 btrfs: simplify getting and extracting previous transaction at clean_pinned_extents() Instead of detecting if there is a previous transaction by comparing the current transaction's list prev member to the head of the transaction list (fs_info->trans_list), use the list_is_first() helper which contains that logic and the naming makes sense since a new transaction is always added to the end of the list fs_info->trans_list with list_add_tail(). We are also extracting the previous transaction with list_last_entry() against the transaction, which is correct but confusing because that function is usually meant to be used against a pointer to the start of a list and not a member of a list. It is easier to reason by either calling list_first_entry() against the list fs_info->trans_list, since we can never have more than two transactions in the list, or by calling list_prev_entry() against the transaction. So change that to use the later method. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d887f03fdb113e62643f948997e0a3974f695cc8 Author: Filipe Manana Date: Thu May 1 12:14:41 2025 +0100 btrfs: simplify getting and extracting previous transaction during commit Instead of detecting if there is a previous transaction by comparing the current transaction's list prev member to the head of the transaction list (fs_info->trans_list), use the list_is_first() helper which contains that logic and the naming makes sense since a new transaction is always added to the end of the list fs_info->trans_list with list_add_tail(). And instead of extracting the previous transaction with the more generic list_entry() helper against the current transaction's list prev member, use the more specific list_prev_entry() helper, which makes it clear what we are doing and is shorter. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8c4cfa99c2cdf90c2444167d9aab075885019936 Author: David Sterba Date: Wed Apr 30 18:45:21 2025 +0200 btrfs: move transaction aborts to the error site in add_to_free_space_tree() Transaction aborts should be done next to the place the error happens, which was not done in add_to_free_space_tree(). Signed-off-by: David Sterba commit 11f25fad92ade05c5f84907222ea3f88afdc1767 Author: David Sterba Date: Wed Apr 30 18:45:20 2025 +0200 btrfs: move transaction aborts to the error site in remove_from_free_space_tree() Transaction aborts should be done next to the place the error happens, which was not done in remove_from_free_space_tree(). Signed-off-by: David Sterba commit addaa67e3328403c272593c6776bbe90425f01d7 Author: David Sterba Date: Wed Apr 30 18:45:19 2025 +0200 btrfs: move transaction aborts to the error site in convert_free_space_to_extents() Transaction aborts should be done next to the place the error happens, which was not done in convert_free_space_to_extents(). The DEBUG_WARN() is removed because we get the abort message. Signed-off-by: David Sterba commit 14338d46614d151a1789f370ca1a77831017f9f2 Author: David Sterba Date: Wed Apr 30 18:45:18 2025 +0200 btrfs: move transaction aborts to the error site in convert_free_space_to_bitmaps() Transaction aborts should be done next to the place the error happens, which was not done in convert_free_space_to_bitmaps(). The DEBUG_WARN() is removed because we get the abort message. Signed-off-by: David Sterba commit ce6920dba8fbab888bb5e913a37ed406edb7ce4e Author: Qu Wenruo Date: Fri May 2 09:30:35 2025 +0930 btrfs: scrub: move error reporting members to stack Currently the following members of scrub_stripe are only utilized for error reporting: - init_error_bitmap - init_nr_io_errors - init_nr_csum_errors - init_nr_meta_errors - init_nr_meta_gen_errors There is no need to put all those members into scrub_stripe, which take 24 bytes for each stripe, and we have 128 stripes for each device. Instead introduce a structure, scrub_error_records, and move all above members into that structure. And allocate such structure from stack inside scrub_stripe_read_repair_worker(). Since that function is called from a workqueue context, we have more than enough stack space for just 24 bytes. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ec1f3a207cdf314eae4d4ae145f1ffdb829f0652 Author: Qu Wenruo Date: Thu May 1 08:37:54 2025 +0930 btrfs: scrub: update device stats when an error is detected [BUG] Since the migration to the new scrub_stripe interface, scrub no longer updates the device stats when hitting an error, no matter if it's a read or checksum mismatch error. E.g: BTRFS info (device dm-2): scrub: started on devid 1 BTRFS error (device dm-2): unable to fixup (regular) error at logical 13631488 on dev /dev/mapper/test-scratch1 physical 13631488 BTRFS warning (device dm-2): checksum error at logical 13631488 on dev /dev/mapper/test-scratch1, physical 13631488, root 5, inode 257, offset 0, length 4096, links 1 (path: file) BTRFS error (device dm-2): unable to fixup (regular) error at logical 13631488 on dev /dev/mapper/test-scratch1 physical 13631488 BTRFS warning (device dm-2): checksum error at logical 13631488 on dev /dev/mapper/test-scratch1, physical 13631488, root 5, inode 257, offset 0, length 4096, links 1 (path: file) BTRFS info (device dm-2): scrub: finished on devid 1 with status: 0 Note there is no line showing the device stats error update. [CAUSE] In the migration to the new scrub_stripe interface, we no longer call btrfs_dev_stat_inc_and_print(). [FIX] - Introduce a new bitmap for metadata generation errors * A new bitmap @meta_gen_error_bitmap is introduced to record which blocks have metadata generation mismatch errors. * A new counter for that bitmap @init_nr_meta_gen_errors, is also introduced to store the number of generation mismatch errors that are found during the initial read. This is for the error reporting at scrub_stripe_report_errors(). * New dedicated error message for unrepaired generation mismatches * Update @meta_gen_error_bitmap if a transid mismatch is hit - Add btrfs_dev_stat_inc_and_print() calls to the following call sites * scrub_stripe_report_errors() * scrub_write_endio() This is only for the write errors. This means there is a minor behavior change: - The timing of device stats error message Since we concentrate the error messages at scrub_stripe_report_errors(), the device stats error messages will all show up in one go, after the detailed scrub error messages: BTRFS error (device dm-2): unable to fixup (regular) error at logical 13631488 on dev /dev/mapper/test-scratch1 physical 13631488 BTRFS warning (device dm-2): checksum error at logical 13631488 on dev /dev/mapper/test-scratch1, physical 13631488, root 5, inode 257, offset 0, length 4096, links 1 (path: file) BTRFS error (device dm-2): unable to fixup (regular) error at logical 13631488 on dev /dev/mapper/test-scratch1 physical 13631488 BTRFS warning (device dm-2): checksum error at logical 13631488 on dev /dev/mapper/test-scratch1, physical 13631488, root 5, inode 257, offset 0, length 4096, links 1 (path: file) BTRFS error (device dm-2): bdev /dev/mapper/test-scratch1 errs: wr 0, rd 0, flush 0, corrupt 1, gen 0 BTRFS error (device dm-2): bdev /dev/mapper/test-scratch1 errs: wr 0, rd 0, flush 0, corrupt 2, gen 0 Fixes: e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 45a59513b4b2d9b822b241c73b57b29b9e92b245 Author: Naohiro Aota Date: Wed Apr 23 11:43:53 2025 +0900 btrfs: add support for reclaiming from sub-space space_info Modify btrfs_async_{data,metadata}_reclaim() to run the reclaim process on the sub-spaces as well. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 635da7ea9a12b1db28ab7db260e3d64108e18f15 Author: Naohiro Aota Date: Wed Apr 23 11:43:52 2025 +0900 btrfs: add block reserve for treelog We need to add a dedicated block_rsv for tree-log, because the block_rsv serves for a tree node allocation in btrfs_alloc_tree_block(). Currently, tree-log tree uses fs_info->empty_block_rsv, which is shared across trees and points to the normal metadata space_info. Instead, we add a dedicated block_rsv and that block_rsv can use the dedicated sub-space_info. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit df0766407485ccae80a9142f7d1f4f105ff1016d Author: Naohiro Aota Date: Wed Apr 23 11:43:51 2025 +0900 btrfs: use proper data space_info for zoned mode Now that, we have data sub-space for the zoned mode. Tweak some space_info functions to use proper space_info for a file. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit cc0517fe779f2186545ac9c6a3439809b98b24f1 Author: Naohiro Aota Date: Wed Apr 23 11:43:50 2025 +0900 btrfs: tweak extent/chunk allocation for space_info sub-space Make the extent allocator and the chunk allocator aware of the sub-space. It now uses BTRFS_SUB_GROUP_DATA_RELOC sub-space for data relocation block group, and uses BTRFS_SUB_GROUP_TREELOG for metadata tree-log block group. And, it needs to check the space_info is the right one when a block group candidate is given. Also, new block group should now belong to the specified one. Now that, block_group->space_info is always set before btrfs_add_bg_to_space_info(), we no longer need to "find" the space_info. So, rename the variable name to address that as well. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9a3023b8289b49abaddf668079c74e7d0cf42ca1 Author: Naohiro Aota Date: Wed Apr 23 11:43:49 2025 +0900 btrfs: introduce tree-log sub-space_info Introduce the tree-log sub-space_info, which is sub-space of metadata space_info and dedicated for tree-log node allocation. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit f92ee31e031c7819126d2febdda0c3e91f5d2eb9 Author: Naohiro Aota Date: Wed Apr 23 11:43:48 2025 +0900 btrfs: introduce btrfs_space_info sub-group Current code assumes we have only one space_info for each block group type (DATA, METADATA, and SYSTEM). We sometime need multiple space infos to manage special block groups. One example is handling the data relocation block group for the zoned mode. That block group is dedicated for writing relocated data and we cannot allocate any regular extent from that block group, which is implemented in the zoned extent allocator. This block group still belongs to the normal data space_info. So, when all the normal data block groups are full and there is some free space in the dedicated block group, the space_info looks to have some free space, while it cannot allocate normal extent anymore. That results in a strange ENOSPC error. We need to have a space_info for the relocation data block group to represent the situation properly. Adds a basic infrastructure for having a "sub-group" of a space_info: creation and removing. A sub-group space_info belongs to one of the primary space_infos and has the same flags as its parent. This commit first introduces the relocation data sub-space_info, and the next commit will introduce tree-log sub-space_info. In the future, it could be useful to implement tiered storage for btrfs e.g. by implementing a sub-group space_info for block groups resides on a fast storage. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit 4d5a047e0736a9d5c504212ed64ca8e2fcc3735b Author: Naohiro Aota Date: Wed Apr 23 11:43:47 2025 +0900 btrfs: add space_info parameter for block group creation Add struct btrfs_space_info parameter to btrfs_make_block_group(), its related functions and related struct. Passed space_info will have a new block group. Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 098a442d5b6d440602604dc1a88706a2a91bce4e Author: Naohiro Aota Date: Wed Apr 23 11:43:46 2025 +0900 btrfs: add space_info argument to btrfs_chunk_alloc() Take a btrfs_space_info argument in btrfs_chunk_alloc(). New block group will belong to that space_info. Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1cfdbe0d53b27b4b4a4f4cf2a4e430bc65ba2ba5 Author: Naohiro Aota Date: Wed Apr 23 11:43:45 2025 +0900 btrfs: factor out check_removing_space_info() from btrfs_free_block_groups() Factor out check_removing_space_info() from btrfs_free_block_groups(). It sanity checks a to-be-removed space_info. There is no functional change. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4ec06a9ddb9c165c16ff119b90a7cbaf35f0daa6 Author: Naohiro Aota Date: Wed Apr 23 11:43:44 2025 +0900 btrfs: factor out do_async_reclaim_{data,metadata}_space() Factor out the main part of btrfs_async_reclaim_data_space() to do_async_reclaim_data_space(), so it can take data space_info parameter it is working on. Do the same for metadata. There is no functional change. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac5578fef380e68e539a2238ba63dd978a450ef2 Author: Naohiro Aota Date: Wed Apr 23 11:43:43 2025 +0900 btrfs: factor out init_space_info() from create_space_info() Factor out initialization of the space_info struct, which is used in a later patch. There is no functional change. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c34e71966fa03df1581ff44ddc6dbb64cc4c440 Author: Naohiro Aota Date: Wed Apr 23 11:43:42 2025 +0900 btrfs: pass struct btrfs_inode to btrfs_free_reserved_data_space_noquota() As well as the last patch, pass struct btrfs_inode to the function and let it distinguish which data space it is working on in a later patch. There is no functional change with this commit. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5d39fda880bed9acaaa0b31601008751e27aabc8 Author: Naohiro Aota Date: Wed Apr 23 11:43:41 2025 +0900 btrfs: pass btrfs_space_info to btrfs_reserve_data_bytes() Pass struct btrfs_space_info to btrfs_reserve_data_bytes() to allow reserving the data from multiple data space_info candidates. This is a preparation for the following commits and there is no functional change. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 66864101d1b76f7f3417274a954b160e81903a94 Author: Filipe Manana Date: Tue Apr 22 16:21:25 2025 +0100 btrfs: make extent unpinning more efficient when committing transaction At btrfs_finish_extent_commit() we have this loop that keeps finding an extent range to unpin in the transaction's pinned_extents io tree, caches the extent state and then passes that cached extent state to btrfs_clear_extent_dirty(), which will free that extent state since we clear the only bit it can have set. So on each loop iteration we do a full io tree search and the cached state is used only to avoid having a tree search done by btrfs_clear_extent_dirty(). During the lifetime of a transaction we can pin many thousands of extents, resulting in a large and deep rb tree that backs the io tree. For example, for the following fs_mark run on a 12 cores boxes: $ cat test.sh #!/bin/bash DEV=/dev/nullb0 MNT=/mnt/nullb0 FILES=100000 THREADS=$(nproc --all) echo "performance" | \ tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $DEV mount $DEV $MNT OPTS="-S 0 -L 8 -n $FILES -s 0 -t $THREADS -k" for ((i = 1; i <= $THREADS; i++)); do OPTS="$OPTS -d $MNT/d$i" done fs_mark $OPTS umount $MNT an histogram for the number of ranges (elements) in the pinned extents io tree of a transaction was the following: Count: 76 Range: 5440.000 - 51088.000; Mean: 27354.368; Median: 28312.000; Stddev: 9800.767 Percentiles: 90th: 40486.000; 95th: 43322.000; 99th: 51088.000 5440.000 - 6805.809: 1 ### 6805.809 - 10652.034: 1 ### 10652.034 - 13326.178: 3 ######## 13326.178 - 16671.590: 8 ###################### 16671.590 - 20856.773: 7 #################### 20856.773 - 26092.528: 13 #################################### 26092.528 - 32642.571: 19 ##################################################### 32642.571 - 40836.818: 17 ############################################### 40836.818 - 51088.000: 7 #################### We can improve on this by grabbing the next state before calling btrfs_clear_extent_dirty(), avoiding a full tree search on the next iteration which always has an O(log n) complexity while grabbing the next element (rb_next() rbtree operation) is in the worst case O(log n) too, but very often much less than that, making it more efficient. Here follow histograms for the execution times, in nanoseconds, of btrfs_finish_extent_commit() before and after applying this patch and all the other patches in the same patchset. Before patchset: Count: 32 Range: 3925691.000 - 269990635.000; Mean: 133814526.906; Median: 122758052.000; Stddev: 65776550.375 Percentiles: 90th: 228672087.000; 95th: 265187000.000; 99th: 269990635.000 3925691.000 - 5993208.660: 1 #### 5993208.660 - 75878537.656: 4 ################## 75878537.656 - 115840974.514: 12 ##################################################### 115840974.514 - 176850157.761: 6 ########################### 176850157.761 - 269990635.000: 9 ######################################## After patchset: Count: 32 Range: 1849393.000 - 231491064.000; Mean: 126978584.625; Median: 123732897.000; Stddev: 58007821.806 Percentiles: 90th: 203055491.000; 95th: 219952699.000; 99th: 231491064.000 1849393.000 - 2997642.092: 1 #### 2997642.092 - 88111637.071: 9 ##################################### 88111637.071 - 142818264.414: 9 ##################################### 142818264.414 - 231491064.000: 13 ##################################################### Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 93ef6c232a1a9343469672dbd9761117ba9c5bd2 Author: Filipe Manana Date: Tue Apr 22 15:19:12 2025 +0100 btrfs: remove variable to track trimmed bytes at btrfs_finish_extent_commit() We don't need to keep track of discarded (trimmed) bytes at btrfs_finish_extent_commit() but we are declaring a local variable for that and passing a reference to the btrfs_discard_extent() calls when we are processing delete block groups. So instead pass NULL to btrfs_discard_extent() and remove that variable. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 25983713922494cbf823689bf4847cea3f841935 Author: Filipe Manana Date: Tue Apr 22 15:04:51 2025 +0100 btrfs: don't BUG_ON() when unpinning extents during transaction commit In the final phase of a transaction commit, when unpinning extents at btrfs_finish_extent_commit(), there's no need to BUG_ON() if we fail to unpin an extent range. All that can happen is that we fail to return the extent range to the in-memory free space cache, meaning no future space allocations can reuse that extent range while the fs is mounted. So instead return the error to the caller and make it abort the transaction, so that the error is noticed and prevent misteriously leaking space. We keep track of the first error we get while unpinning an extent range and keep trying to unpin all the following extent ranges, so that we attempt to do all discards. The transaction abort will deal with all resource cleanups. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b2460c2aee9a757bf0b438dde5b5ee71afc54e44 Author: Filipe Manana Date: Wed Apr 23 10:41:31 2025 +0100 btrfs: remove unnecessary NULL checks before freeing extent state When manipulating extent bits for an io tree range, we have this pattern: if (prealloc) btrfs_free_extent_state(prealloc); but this is not needed nowadays since btrfs_free_extent_state() ignores a NULL pointer argument, following the common pattern of kernel and btrfs freeing functions, as well as libc and other user space libraries. So remove the NULL checks, reducing source code and object size. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit aa2c80a9ae279578acbb5f5674e7345199d8173b Author: Filipe Manana Date: Thu Apr 17 13:03:42 2025 +0100 btrfs: avoid re-searching tree when setting bits in an extent range When setting bits for an extent range (set_extent_bit()), if the current extent state record starts after the target range, we always do a jump to the 'search_again' label, which will cause us to do a full tree search for the next state if the current state ends before the target range. Unless we need to reschedule, we can just grab the next state and process it, avoiding a full tree search, even if that next state is not contiguous, as we'll allocate and insert a new prealloc state if needed. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b61dd9b1cb9caf0cb3caddd9af868a786883d8a7 Author: Filipe Manana Date: Thu Apr 17 16:22:50 2025 +0100 btrfs: avoid repeated extent state processing when setting extent bits When setting bits for an extent range, if we find an extent state with its start offset greater than current start offset, we insert a new extent state to cover the gap, with its end offset computed and stored in the @this_end local variable, and after the insertion we update the current start offset to @this_end + 1. However if the insert_state() call resulted in an extent state merge then the end offset of the merged extent may be greater than @this_end and if that's the case, since we jump to the 'search_again' label, we'll do a full tree search that will leave us in the same extent state - this is harmless but wastes time by doing a pointless tree search and extent state processing. So improve on this by updating the current start offset to the end offset of the inserted state plus 1. This also removes the use of the @this_end variable and directly set the value in the prealloc extent state to avoid any confusion and misuse in the future. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8faab454c59efbe13707b74963a4bc9a8a55fb49 Author: Filipe Manana Date: Wed Apr 16 17:05:11 2025 +0100 btrfs: simplify last record detection at set_extent_bit() There's no need to compare the current extent state's end offset to (u64)-1 to check if we have the last possible record and to check as as well if after updating the start offset to the end offset of the current record plus one we are still inside the target range. Instead we can simplify and exit if the current extent state ends at or after the target range and then remove the check for the (u64)-1 as well as the check to see if the updated start offset (to last_end + 1) is still inside the target range. Besides the simplification, this also avoids seaching for the next extent state record (through next_state()) when the current extent state record ends at the same offset as our target range, which is pointless and only wastes times iterating through the rb tree. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 41d69d4d78d8b179bf3bcdfc56d28a12b3a608d2 Author: Filipe Manana Date: Wed Apr 16 16:00:28 2025 +0100 btrfs: exit after state split error at set_extent_bit() If split_state() returned an error we call extent_io_tree_panic() which will trigger a BUG() call. However if CONFIG_BUG is disabled, which is an uncommon and exotic scenario, then we fallthrough and hit a use after free when calling set_state_bits() since the extent state record which the local variable 'prealloc' points to was freed by split_state(). So jump to the label 'out' after calling extent_io_tree_panic() and set the 'prealloc' pointer to NULL since split_state() has already freed it when it hit an error. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 67f10a10187b17ac62abddf66d16cec9d0f89a7c Author: Filipe Manana Date: Wed Apr 16 15:56:53 2025 +0100 btrfs: exit after state insertion failure at set_extent_bit() If insert_state() state failed it returns an error pointer and we call extent_io_tree_panic() which will trigger a BUG() call. However if CONFIG_BUG is disabled, which is an uncommon and exotic scenario, then we fallthrough and call cache_state() which will dereference the error pointer, resulting in an invalid memory access. So jump to the 'out' label after calling extent_io_tree_panic(), it also makes the code more clear besides dealing with the exotic scenario where CONFIG_BUG is disabled. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0edc1a5c543c024934e7418aa76d2e8309e0303f Author: Filipe Manana Date: Wed Apr 16 16:18:10 2025 +0100 btrfs: simplify last record detection at btrfs_convert_extent_bit() There's no need to compare the current extent state's end offset to (u64)-1 to check if we have the last possible record and to check as as well if after updating the start offset to the end offset of the current record plus one we are still inside the target range. Instead we can simplify and exit if the current extent state ends at or after the target range and then remove the check for the (u64)-1 as well as the check to see if the updated start offset (to last_end + 1) is still inside the target range. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit be2270262fa732660b3b568175701cd732eda1da Author: Filipe Manana Date: Wed Apr 16 15:43:25 2025 +0100 btrfs: avoid re-searching tree when converting bits in an extent range When converting bits for an extent range (btrfs_convert_extent_bit()), if the current extent state record starts after the target range, we always do a jump to the 'search_again' label, which will cause us to do a full tree search for the next state if the current state ends before the target range. Unless we need to reschedule, we can just grab the next state and process it, avoiding a full tree search, even if that next state is not contiguous, as we'll allocate and insert a new prealloc state if needed. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit eeb808422f9be2ca8ba30c0ef1d68f04c7654d87 Author: Filipe Manana Date: Thu Apr 17 16:44:34 2025 +0100 btrfs: avoid repeated extent state processing when converting extent bits When converting bits for an extent range, if we find an extent state with its start offset greater than current start offset, we insert a new extent state to cover the gap, with its end offset computed and stored in the @this_end local variable, and after the insertion we update the current start offset to @this_end + 1. However if the insert_state() call resulted in an extent state merge then the end offset of the merged extent may be greater than @this_end and if that's the case, since we jump to the 'search_again' label, we'll do a full tree search that will leave us in the same extent state - this is harmless but wastes time by doing a pointless tree search and extent state processing. So improve on this by updating the current start offset to the end offset of the inserted state plus 1. This also removes the use of the @this_end variable and directly set the value in the prealloc extent state to avoid any confusion and misuse in the future. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 240dd0e1bbe57fdcaaf7aede4b35d47ebf32dd48 Author: Filipe Manana Date: Wed Apr 16 15:24:48 2025 +0100 btrfs: avoid unnecessary next node searches when clearing bits from extent range When clearing bits for a range in an io tree, at clear_state_bit(), we always go search for the next node (through next_state() -> rb_next()) and return it. However if the current extent state record ends at or after the target range passed to btrfs_clear_extent_bit_changeset() or btrfs_convert_extent_bit(), we are just wasting time finding that next node since we won't use it in those functions. Improve on this by skipping the next node search if the current node ends at or after the target range. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3bf179e36da917c5d9bec71c714573ed1649b7c1 Author: Filipe Manana Date: Thu Apr 10 17:11:14 2025 +0100 btrfs: exit after state insertion failure at btrfs_convert_extent_bit() If insert_state() state failed it returns an error pointer and we call extent_io_tree_panic() which will trigger a BUG() call. However if CONFIG_BUG is disabled, which is an uncommon and exotic scenario, then we fallthrough and call cache_state() which will dereference the error pointer, resulting in an invalid memory access. So jump to the 'out' label after calling extent_io_tree_panic(), it also makes the code more clear besides dealing with the exotic scenario where CONFIG_BUG is disabled. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2a72dd999610f9a8e2ddc0eaaf054cd66e45cde7 Author: Filipe Manana Date: Thu Apr 10 17:01:59 2025 +0100 btrfs: exit after state split error at btrfs_convert_extent_bit() If split_state() returned an error we call extent_io_tree_panic() which will trigger a BUG() call. However if CONFIG_BUG is disabled, which is an uncommon and exotic scenario, then we fallthrough and hit a use after free when calling set_state_bits() since the extent state record which the local variable 'prealloc' points to was freed by split_state(). So jump to the label 'out' after calling extent_io_tree_panic() and set the 'prealloc' pointer to NULL since split_state() has already freed it when it hit an error. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5f9c554a6c1219dee1a3484db2e19881d35a0788 Author: Filipe Manana Date: Thu Apr 10 16:40:29 2025 +0100 btrfs: remove duplicate error check at btrfs_convert_extent_bit() There's no need to check if split_state() returned an error twice, instead unify into a single if statement after setting 'prealloc' to NULL, because on error split_state() frees the 'prealloc' extent state record. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f2a24bef553891d91d3ae1745b748cdf5cc58145 Author: Filipe Manana Date: Wed Apr 9 18:15:03 2025 +0100 btrfs: simplify last record detection at btrfs_clear_extent_bit_changeset() Instead of checking for an end offset of (u64)-1 (U64_MAX) for the current extent state's end, and then checking after updating the current start offset if it's now beyond the range's end offset, we can simply stop if the current extent state's end is greater than or equals to our range's end offset. This helps remove one comparison under the 'next' label and allows to remove the if statement that checks if the start offset is greater than the end offset under the 'search_again' label. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6c28102f9ac4eea321e5421c248ca17983a9760d Author: Filipe Manana Date: Wed Apr 9 17:15:35 2025 +0100 btrfs: avoid extra tree search at btrfs_clear_extent_bit_changeset() When we find an extent state that starts before our range's start we split it and jump into the 'search_again' label with our start offset remaining the same, making us then go to the 'again' label and search again for an extent state that contains the 'start' offset, and this time it finds the same extent state but with its start offset set to our range's start offset (due to the split). This is because we have consumed the preallocated extent state record and we may need to split again, and by jumping to 'again' we release the spinlock, allocate a new prealloc state and restart the search. However we may not need to restart and allocate a new extent state in case we don't find extent states that cross our end offset, therefore no need for further extent state splits, or we may be able to do an atomic allocation (which is quick even if it fails). In these cases it's a waste to restart the search. So change the behaviour to do the restart only if we need to reschedule, otherwise fall through - if we need to allocate an extent state for split operations, we will try an atomic allocation and if that fails we will do the restart as before. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c832378622d53e0516d7688cbb2e76786e854d1e Author: Filipe Manana Date: Thu Apr 10 13:26:40 2025 +0100 btrfs: use bools for local variables at btrfs_clear_extent_bit_changeset() Several variables are defined as integers but used as booleans, and the 'delete' variable can be made const since it's not changed after being declared. So change them to proper booleans and simplify setting their value. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5af1eae78d882efeaaa9a95e6ac7d70a8bf5fb9f Author: Filipe Manana Date: Thu Apr 10 12:59:05 2025 +0100 btrfs: add missing error return to btrfs_clear_extent_bit_changeset() We have a couple error branches where we have an error stored in the 'err' variable and then jump to the 'out' label, however we don't return that error, we just return 0. Normally this is not a problem since those error branches call extent_io_tree_panic() which triggers a BUG() call, however it's possible to have rather exotic kernel config with CONFIG_BUG disabled in which case the BUG() call does nothing and we fallthrough. So make sure to return the error, not just to fix that exotic case but also to make the code less confusing. While at it also rename the 'err' variable to 'ret' since this is the style we prefer and use more widely. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2187540b6f4d92b4bf7622244dc2cbfa61ff1855 Author: Filipe Manana Date: Wed Apr 9 16:17:16 2025 +0100 btrfs: exit after state split error at btrfs_clear_extent_bit_changeset() If split_state() returned an error we call extent_io_tree_panic() which will trigger a BUG() call. However if CONFIG_BUG is disabled, which is an uncommon and exotic scenario, then we fallthrough and hit a use after free when calling clear_state_bit() since the extent state record which the local variable 'prealloc' points to was freed by split_state(). So jump to the label 'out' after calling extent_io_tree_panic() and set the 'prealloc' pointer to NULL since split_state() has already freed it when it hit an error. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f389e7b982a14421dc6ec935552c39ea23da2f43 Author: Filipe Manana Date: Wed Apr 9 15:27:35 2025 +0100 btrfs: remove duplicate error check at btrfs_clear_extent_bit_changeset() There's no need to check if split_state() returned an error twice, instead unify into a single if statement after setting 'prealloc' to NULL, because on error split_state() frees the 'prealloc' extent state record. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 007fa63225683f540456a631045de681473d31d5 Author: Qu Wenruo Date: Mon Apr 28 10:16:19 2025 +0930 btrfs: get rid of btrfs_read_dev_super() The function is introduced by commit a512bbf855ff ("Btrfs: superblock duplication") at the beginning of btrfs. It leaved a comment saying we'd need a special mount option to read all super blocks, but it's never been implemented and there was not need/request for it. The check/rescue tools are able to start from a specific copy and use it as primary eventually. This means btrfs_read_dev_super() is always reading the first super block, making all the code finding the latest super block unnecessary. Just remove that function and replace all call sites with btrfs_read_disk_super(bdev, 0, false). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 63f32b7b5d5a9107d04fb11cc85d5cd695f85e19 Author: Qu Wenruo Date: Mon Apr 28 10:06:50 2025 +0930 btrfs: merge btrfs_read_dev_one_super() into btrfs_read_disk_super() We have two functions to read a super block from a block device: - btrfs_read_dev_one_super() Exported from disk-io.c - btrfs_read_disk_super() Local to volumes.c And they have some minor differences: - btrfs_read_dev_one_super() uses @copy_num Meanwhile btrfs_read_disk_super() relies on the physical and expected bytenr passed from the caller. The parameter list of btrfs_read_dev_one_super() is more user friendly. - btrfs_read_disk_super() makes sure the label is NUL terminated We do not need two different functions doing the same job, so merge the behavior into btrfs_read_disk_super() by: - Remove btrfs_read_dev_one_super() - Export btrfs_read_disk_super() The name pairs with btrfs_release_disk_super() perfectly. - Change the parameter list of btrfs_read_disk_super() to mimic btrfs_read_dev_one_super() All existing callers are calculating the physical address and expect bytenr before calling btrfs_read_disk_super() already. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 13ae88706a8c3db412ba7a7a07dcc55e8f1eb53c Author: Daniel Vacek Date: Fri Apr 25 09:23:57 2025 +0200 btrfs: get rid of goto in alloc_test_extent_buffer() The `free_eb` label is used only once. Simplify by moving the code inplace. Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5e121ae687b8c16294230d69ea16a49a08d5e332 Author: Josef Bacik Date: Mon Apr 28 10:52:57 2025 -0400 btrfs: use buffer xarray for extent buffer writeback operations Currently we have this ugly back and forth with the btree writeback where we find the folio, find the eb associated with that folio, and then attempt to writeback. This results in two different paths for subpage ebs and >= page size ebs. Clean this up by adding our own infrastructure around looking up tagged ebs and writing the ebs out directly. This allows us to unify the subpage and >= pagesize IO paths, resulting in a much cleaner writeback path for extent buffers. I ran this through fsperf on a VM with 8 CPUs and 16GiB of RAM. I used smallfiles100k, but reduced the files to 1k to make it run faster, the results are as follows, with the statistically significant improvements marked with *, there were no regressions. fsperf was run with -n 10 for both runs, so the baseline is the average 10 runs and the test is the average of 10 runs. smallfiles100k results metric baseline current stdev diff ================================================================================ avg_commit_ms 68.58 58.44 3.35 -14.79% * commits 270.60 254.70 16.24 -5.88% dev_read_iops 48 48 0 0.00% dev_read_kbytes 1044 1044 0 0.00% dev_write_iops 866117.90 850028.10 14292.20 -1.86% dev_write_kbytes 10939976.40 10605701.20 351330.32 -3.06% elapsed 49.30 33 1.64 -33.06% * end_state_mount_ns 41251498.80 35773220.70 2531205.32 -13.28% * end_state_umount_ns 1.90e+09 1.50e+09 14186226.85 -21.38% * max_commit_ms 139 111.60 9.72 -19.71% * sys_cpu 4.90 3.86 0.88 -21.29% write_bw_bytes 42935768.20 64318451.10 1609415.05 49.80% * write_clat_ns_mean 366431.69 243202.60 14161.98 -33.63% * write_clat_ns_p50 49203.20 20992 264.40 -57.34% * write_clat_ns_p99 827392 653721.60 65904.74 -20.99% * write_io_kbytes 2035940 2035940 0 0.00% write_iops 10482.37 15702.75 392.92 49.80% * write_lat_ns_max 1.01e+08 90516129 3910102.06 -10.29% * write_lat_ns_mean 366556.19 243308.48 14154.51 -33.62% * As you can see we get about a 33% decrease runtime, with a 50% throughput increase, which is pretty significant. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 4bc0a3cb75c264e945e08dcc590e3c722a3ee58f Author: Josef Bacik Date: Mon Apr 28 10:52:56 2025 -0400 btrfs: set DIRTY and WRITEBACK tags on the buffer_tree In preparation for changing how we do writeout of extent buffers, start tagging the extent buffer xarray with DIRTY and WRITEBACK to make it easier to find extent buffers that are in either state. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 19d7f65f032f898df8c164d378be502901772eb7 Author: Josef Bacik Date: Mon Apr 28 10:52:55 2025 -0400 btrfs: convert the buffer_radix to an xarray In order to fully utilize xarray tagging to improve writeback we need to convert the buffer_radix to a proper xarray. This conversion is relatively straightforward as the radix code uses the xarray underneath. Using xarray directly allows for quite a lot less code. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 656e9f51de3a02eb708c384d4d0152cfb969ea8b Author: David Sterba Date: Tue Apr 29 12:56:41 2025 +0200 btrfs: rename btrfs_discard workqueue to btrfs-discard We use the "btrfs-" prefix for our workqueues, the discard has underscore instead of dash, so unify it. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 13d6d866e8ca25555f0599fe9408cb86afda85f2 Author: David Sterba Date: Wed Apr 23 08:29:14 2025 +0200 btrfs: on unknown chunk allocation policy fallback to regular We have only two chunk allocation policies right now and the switch/cases don't handle an unknown one properly. The error is in the impossible category (the policy is stored only in memory), we don't have to BUG(), falling back to regular policy should be safe. Signed-off-by: David Sterba commit 3329d3d83313b138ed6d571fb2337a7cca054fa8 Author: David Sterba Date: Wed Apr 23 18:53:59 2025 +0200 btrfs: reformat comments in acls_after_inode_item() Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit f24d25544f4fa03cf8df0f59389e1afa355e2826 Author: David Sterba Date: Wed Apr 23 18:53:58 2025 +0200 btrfs: switch int dev_replace_is_ongoing variables/parameters to bool Both the variable and the parameter are used as logical indicators so convert them to bool. Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit f963e0128b180e8ab501bf1d5772fce17c36d68f Author: David Sterba Date: Wed Apr 23 18:53:57 2025 +0200 btrfs: trivial conversion to return bool instead of int Old code has a lot of int for bool return values, bool is recommended and done in new code. Convert the trivial cases that do simple 0/false and 1/true. Functions comment are updated if needed. Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 73d6bcf41bd2e9906060bcc8b182cdb9775e61f9 Author: Qu Wenruo Date: Wed Apr 23 16:36:14 2025 +0930 btrfs: subpage: reject tree blocks which are not nodesize aligned When btrfs subpage support (fs block < page size) was introduced, a subpage filesystem will only reject tree blocks which cross page boundaries. This used to be a compromise to simplify the tree block handling and still allowing subpage cases to read some old converted filesystems which did not have proper chunk alignment. But in practice, suppose we have the following unaligned tree block on a 64K page sized system: 0 32K 44K 60K 64K | |///////////////| | Although btrfs has no problem reading the tree block at [44K, 60K), if extent allocator is allocating another tree block, it may choose the range [60K, 74K), as extent allocator has no awareness if it's a subpage metadata request or not. Then we'd get -EINVAL from the following sequence: btrfs_alloc_tree_block() |- btrfs_reserve_extent() | Which returned range [60K, 74K) |- btrfs_init_new_buffer() |- btrfs_find_create_tree_block() |- alloc_extent_buffer() |- check_eb_alignment() Which returned -EINVAL, because the range crosses page boundary. This situation will not fix itself and should mostly mark the fs read-only. Thankfully we didn't really get such reports in the real world because: - The original unaligned tree block is only caused by older btrfs-convert It's before the btrfs-convert rework was done in v4.6, where converted btrfs filesystem can have metadata block groups which are not aligned to nodesize nor stripe size (64K). But after btrfs-progs v4.6, all chunks allocated will be stripe (64K) aligned, thus no more such problem. Considering how old the fix is (v4.6 was released almost 10 years ago), subpage support for btrfs was introduced in v5.15, it should be safe to reject those unaligned tree blocks. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 406698623a7dd80bac516fd762c0bd0294606383 Author: Daniel Vacek Date: Wed Apr 23 10:51:22 2025 +0200 btrfs: move folio initialization to one place in attach_eb_folio_to_filemap() This is just a trivial change. The code looks a bit more readable this way, IMO. Move initialization of existing_folio to the beginning of the retry loop so it's set to NULL at one place. Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit c779b7980c98740341d88806e60d926403dc7597 Author: David Sterba Date: Wed Apr 23 17:57:24 2025 +0200 btrfs: raid56: rename parameter err to status in endio helpers Trivial renames to unify the naming of blk_status_t variables/parameters. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 853b5727c93dae24f13958774c5059146c026097 Author: David Sterba Date: Wed Apr 23 17:57:23 2025 +0200 btrfs: change return type of btrfs_alloc_dummy_sum() to int The type blk_status_t is from block layer and not related to checksums in our context. Use int internally and do the conversions to blk_status_t as needed in btrfs_submit_chunk(). Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit d2080c7a00cf3ec39ecf5ee6f835c7560bd2ab3f Author: David Sterba Date: Wed Apr 23 17:57:22 2025 +0200 btrfs: rename ret2 to ret in btrfs_submit_compressed_read() We can now rename 'ret2' to 'ret' and use it for generic errors. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit a83134b48a55e8770bade8732c655e9137799821 Author: David Sterba Date: Wed Apr 23 17:57:21 2025 +0200 btrfs: rename ret to status in btrfs_submit_compressed_read() We're using 'status' for the blk_status_t variables, rename 'ret' so we can use it for generic errors. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 79cbc151f982894c484d41be91597c84e07fbc44 Author: David Sterba Date: Wed Apr 23 17:57:20 2025 +0200 btrfs: simplify reading bio status in end_compressed_writeback() We don't need to have a separate variable to read the bio status, 'ret' works for that just fine so remove 'error'. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 9c0b0807ece11ea6adb346cf792fe5adaf8e0723 Author: David Sterba Date: Wed Apr 23 17:57:19 2025 +0200 btrfs: rename error to ret in btrfs_submit_chunk() We can now rename 'error' to 'ret' and use it for generic errors. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit beaa7cdb6a1fef3baa3048ddf74dd43e4d481f55 Author: David Sterba Date: Wed Apr 23 17:57:18 2025 +0200 btrfs: rename ret to status in btrfs_submit_chunk() We're using 'status' for the blk_status_t variables, rename 'ret' so we can use it for proper return type. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 64c13195dd82537c60dea8b2891beeb4db9a5cd5 Author: David Sterba Date: Wed Apr 23 17:57:17 2025 +0200 btrfs: change return type of btrfs_bio_csum() to int The type blk_status_t is from block layer and not related to checksums in our context. Use int internally and do the conversions to blk_status_t as needed. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit a24d185c3675f58691a013b58ba4a02a9763ac9f Author: David Sterba Date: Wed Apr 23 17:57:16 2025 +0200 btrfs: change return type of btree_csum_one_bio() to int The type blk_status_t is from block layer and not related to checksums in our context. Use int internally and do the conversions to blk_status_t as needed in btrfs_bio_csum(). Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 9b20d242af41197956c9d3cb6b5bbe7706da5d4d Author: David Sterba Date: Wed Apr 23 17:57:15 2025 +0200 btrfs: change return type of btrfs_csum_one_bio() to int The type blk_status_t is from block layer and not related to checksums in our context. Use int internally and do the conversions to blk_status_t as needed in btrfs_bio_csum(). Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 6f6e7e98b081d47d997ae8753539a51bee29856d Author: David Sterba Date: Wed Apr 23 17:57:14 2025 +0200 btrfs: change return type of btrfs_lookup_bio_sums() to int The type blk_status_t is from block layer and not related to checksums in our context. Use int internally and do the conversions to blk_status_t as needed in btrfs_submit_chunk(). Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit ae8ce87165b0ca3d23c88e0767d91b6b1da08732 Author: David Sterba Date: Wed Apr 23 17:57:13 2025 +0200 btrfs: drop redundant local variable in raid_wait_write_end_io() The bio status is read only once, no variable needed for that. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit c0ee55f796b5f7d2e3f075559ee81f7a481d20b6 Author: David Sterba Date: Wed Apr 23 09:30:48 2025 +0200 btrfs: merge __setup_root() to btrfs_alloc_root() There's only one caller of __setup_root() so merge it there. Signed-off-by: David Sterba commit 05a6ec865d091fe8244657df8063f74e704d1711 Author: David Sterba Date: Tue Apr 22 17:55:41 2025 +0200 btrfs: use unsigned types for constants defined as bit shifts The unsigned type is a recommended practice (CWE-190, CWE-194) for bit shifts to avoid problems with potential unwanted sign extensions. Although there are no such cases in btrfs codebase, follow the recommendation. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit d4d788a776b49c1e8961104caa2b715bc49074af Author: David Sterba Date: Tue Apr 22 17:32:17 2025 +0200 btrfs: remove unused btrfs_io_stripe::length First added (but not effectively used) in 02c372e1f016e5 ("btrfs: add support for inserting raid stripe extents"). The structure is initialized to zeros so the only use in btrfs_insert_one_raid_extent() u64 length = bioc->stripes[i].length; struct btrfs_raid_stride *raid_stride = &stripe_extent->strides[i]; if (length == 0) length = bioc->size; the 'if' always happens. Last use in 4016358e852861 ("btrfs: remove unused variable length in btrfs_insert_one_raid_extent()") was an obvious cleanup. It seems to be safe to remove, raid-stripe-tree works without using it since 6.6. This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 2d44a15afd4c6f80dd8ac10e710a28e54e5e15c2 Author: David Sterba Date: Tue Apr 22 18:21:51 2025 +0200 btrfs: use list_first_entry() everywhere Using the helper makes it a bit more clear that we're accessing the first list entry. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 9e0a739a9e83eb28ceb0b1e97861c88f177a7f18 Author: David Sterba Date: Thu Apr 17 11:17:03 2025 +0200 btrfs: convert ASSERT(0) with handled errors to DEBUG_WARN() The use of ASSERT(0) is maybe useful for some cases but more like a notice for developers. Assertions can be compiled in independently so convert it to a debugging helper. The difference is that it's just a warning and will not end up in BUG(). The converted cases are in connection with proper error handling. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit ed50ab0fec1a881a379bea7187994ff6cbe2fc58 Author: David Sterba Date: Thu Apr 17 11:17:02 2025 +0200 btrfs: convert WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG)) to DEBUG_WARN Use the conditional warning instead of typing the whole condition. Optional message is printed where it seems clear what could be the problem. Conversion is left out in btree_csum_one_bio() because of the additional condition. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 3db15c6ca6feb2c5000a1cbb39c33866e0349abd Author: David Sterba Date: Thu Apr 17 11:17:01 2025 +0200 btrfs: add debug build only WARN Add conditional WARN() wrapper that's enabled only in debug build. It should be used for unexpected conditions that should be noisy. Use it instead of ASSERT(0). As it will not lead to BUG() make sure that continuing is still possible, e.g. the error is handled anyway. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 94cb8d7144340e760644b2f104586da4717d1f32 Author: David Sterba Date: Thu Apr 17 11:17:00 2025 +0200 btrfs: use verbose ASSERT() in volumes.c The file volumes.c has about 40 assertions and half of them are suitable for ASSERT() with additional data. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 19468a623a9109c0efe236571773e9e3ce46e87f Author: David Sterba Date: Thu Apr 17 11:16:59 2025 +0200 btrfs: enhance ASSERT() to take optional format string Currently ASSERT() prints the stringified condition and without macro expansions so simple constants like BTRFS_MAX_METADATA_BLOCKSIZE remain readable in the output. There are expressions where we'd like to see the exact values but all we get is something like: assertion failed: em->start <= start && start < extent_map_end(em), in fs/btrfs/extent_map.c:613 It would be nice to be able to print any additional information to help understand the problem. With some preprocessor magic and compile-time optimizations we can enhance ASSERT to work like that as well: ASSERT(value > limit, "value=%llu limit=%llu", value, limit); with free-form printk arguments that will be part of the assertion message. Pros: - helps debugging and understanding reported problems - the optional format is verified at compile-time Cons: - increases the .ko size - writing the assertion code is repetitive (condition, format, values) - format and variable type must match (extra lookup) - needs gcc 8.x and newer, otherwise it's the short format Recommended use is for non-trivial expressions, so basic ASSERT(value) can be used for pointers or sometimes integers. The format has been slightly updated to also print the result of the evaluation of the condition, appended to the stringified condition as "condition :: ". Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 023beaeca6127ca6b85e1576f489185b6d95a66e Author: Yangtao Li Date: Thu Apr 17 08:26:49 2025 -0600 btrfs: remove BTRFS_REF_LAST from enum btrfs_ref_type Commit b28b1f0ce44c ("btrfs: delayed-ref: Introduce better documented delayed ref structures") introduced BTRFS_REF_LAST, which can be used for sanity checking, e.g. in switch/case or for loops. In btrfs_ref_type() there is an assertion ASSERT(ref->type == BTRFS_REF_DATA || ref->type == BTRFS_REF_METADATA); to validate the values so we don't need the ending enum. Signed-off-by: Yangtao Li Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8d243aa9a85d66d5b5c423adae3f837954f72513 Author: Christoph Hellwig Date: Wed Apr 9 13:10:42 2025 +0200 btrfs: use bvec_kmap_local() in btrfs_decompress_buf2page() This removes the last direct poke into bvec internals in btrfs. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit adbfd189c4695862c464da87b3e574241452d73d Author: Christoph Hellwig Date: Wed Apr 9 13:10:41 2025 +0200 btrfs: scrub: use virtual addresses directly Instead of the old @page and @page_offset pair inside scrub, here we can directly use the virtual address for a sector. This has the following benefit: - Simplified parameters A single @kaddr will repair @page and @page_offset. - No more unnecessary kmap/kunmap calls Since all pages utilized by scrub is allocated by scrub, and no highmem is allowed, we do not need to do any kmap/kunmap. And add an ASSERT() inside the new scrub_stripe_get_kaddr() to catch any unexpected highmem page. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cd678925e9f20e671fdb67a9e1d358ad445a8cc9 Author: Qu Wenruo Date: Wed Apr 9 13:10:40 2025 +0200 btrfs: raid56: store a physical address in structure sector_ptr Instead of using a @page + @pg_offset pair inside sector_ptr structure, use a single physical address instead. This allows us to grab both the page and offset from a single u64 value. Although we still need an extra bool value, @has_paddr, to distinguish if the sector is properly mapped (as the 0 physical address is totally valid). This change doesn't change the size of structure sector_ptr, but reduces the parameters of several functions. Note: the original idea and patch is from Christoph Hellwig (https://lore.kernel.org/linux-btrfs/20250409111055.3640328-7-hch@lst.de/) but the final implementation is different. Reviewed-by: Josef Bacik Reviewed-by: Christoph Hellwig [ Use physical addresses instead to handle highmem. ] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 6f3f722df7254b7e652e042a93f7e2b011223af0 Author: Christoph Hellwig Date: Wed Apr 9 13:10:39 2025 +0200 btrfs: simplify bvec iteration in index_one_bio() Flatten the two loops by open coding bio_for_each_segment() and advancing the iterator one sector at a time. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo [ Fix a bug that @offset is not increased. ] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 959ddf28390bae9019f0681ea8a239181be1c0f9 Author: Christoph Hellwig Date: Wed Apr 9 13:10:38 2025 +0200 btrfs: move kmapping out of btrfs_check_sector_csum() Move kmapping the page out of btrfs_check_sector_csum(). This allows using bvec_kmap_local() where suitable and reduces the number of kmap*() calls in the raid56 code. This also means btrfs_check_sector_csum() will only accept a properly kmapped address. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 3240b2c97bb862352411713592d4094420691abd Author: Christoph Hellwig Date: Wed Apr 9 13:10:37 2025 +0200 btrfs: pass a physical address to btrfs_repair_io_failure() Using physical address has the following advantages: - All involved callers only need a single pointer Instead of the old @folio + @offset pair. - No complex poking into the bio_vec structure As a bio_vec can be single or multiple paged, grabbing the real page can be quite complex if the bio_vec is a multi-page one. Instead bvec_phys() will always give a single physical address, and it cab be easily converted to a page. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f6b2d8b134b2413b7b3a937a4fe57c8b05fea62e Author: Christoph Hellwig Date: Wed Apr 9 13:10:36 2025 +0200 btrfs: track the next file offset in struct btrfs_bio_ctrl The bio implementation is not something we should really mess around, and we shouldn't recalculate the pos from the folio over and over. Instead just track then end of the current bio in logical file offsets in the btrfs_bio_ctrl, which is much simpler and easier to read. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8cad6fed82147d8fb7fdc96b4247404a214372cf Author: Christoph Hellwig Date: Wed Apr 9 13:10:35 2025 +0200 btrfs: remove the alignment checks in end_bbio_data_read() end_bbio_data_read() checks that each iterated folio fragment is aligned and justifies that with block drivers advancing the bio. But block driver only advance bi_iter, while end_bbio_data_read() uses bio_for_each_folio_all() to iterate the immutable bi_io_vec array that can't be changed by drivers at all. Furthermore btrfs has already did the alignment check of the file offset inside submit_one_sector(), and the size is fixed to fs block size, there is no need to re-do the alignment check again inside the endio function. So just remove the unnecessary alignment check along with the incorrect comment. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit ecf5b757c74cb8e487a4e7cf2e90b9a3103d764a Author: Charles Han Date: Thu Apr 10 17:07:22 2025 +0800 btrfs: update and correct description of btrfs_get_or_create_delayed_node() The comment mistakenly says the function is returning PTR_ERR instead of ERR_PTR. Fix it and update it so it's more descriptive. Signed-off-by: Charles Han Reviewed-by: David Sterba [ Enhance the function comment. ] Signed-off-by: David Sterba commit ea2a8bacb103f0efcc0693c22fc72f310fe056ef Author: Yangtao Li Date: Mon Apr 14 06:52:31 2025 -0600 btrfs: simplify return logic from btrfs_delayed_ref_init() Make this simpler by returning directly when there's no other cleanup needed. Signed-off-by: Yangtao Li Reviewed-by: David Sterba Signed-off-by: David Sterba commit c900f415be72f1611f0268f1e42473ed69befec1 Author: Yangtao Li Date: Mon Apr 14 21:53:40 2025 -0600 btrfs: reuse exit helper for cleanup in btrfs_bioset_init() Do not duplicate the cleanup after failed initialization in btrfs_bioset_init() and reuse the exit function btrfs_bioset_exit(). Signed-off-by: Yangtao Li Reviewed-by: David Sterba Signed-off-by: David Sterba commit af4fc2818d8da70c1e283865cd4b41d80e5b8a84 Author: David Sterba Date: Tue Apr 15 09:02:13 2025 +0200 btrfs: rename iov_iter iterator parameter in btrfs_buffered_write() Using 'i' for a parameter is confusing and conforming to current preferences, so rename it to 'iter'. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 9b230082680aff899e2ae984b23a9ab4ff8fd6b4 Author: Qu Wenruo Date: Mon Mar 17 17:40:54 2025 +1030 btrfs: enable large data folios support for defrag Currently we reject large folios for defrag gracefully, but the implementation itself is already mostly large folios compatible. There are several parts of defrag in btrfs: - Extent map checking Aka, defrag_collect_targets(), which prepares a list of target ranges that should be defragged. This part is completely folio unrelated, thus it doesn't care about the folio size. - Target folio preparation Aka, defrag_prepare_one_folio(), which lock and read (if needed) the target folio. Since folio read and lock are already supporting large folios, this part needs only minor changes. - Redirty the target range of the folio This is already done in a way supporting large folios. So it's pretty straightforward to enable large folios for defrag: - Do not reject large folios for experimental builds This affects the large folio check inside defrag_prepare_one_folio(). - Wait for ordered extents of the whole folio in defrag_prepare_one_folio() - Lock the whole extent range for all involved folios in defrag_one_range() - Allow the folios[] array to be partially empty Since we can have large folios, folios[] will not always be full. This affects: * How to allocate folios in defrag_one_range() Now we cannot use page index, but use the end position of the folio as an iterator. * How to free the folios[] array If we hit an empty slot, it means we have large folios and already hit the end of the array. * How to mark the range dirty Instead of use page index directly, we have to go through each folio, and check if the folio covers the defrag target inside defrag_one_locked_target(). Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 7bf9bfa94684c860479ef125eee4331673f54b5b Author: Qu Wenruo Date: Mon Apr 7 18:13:33 2025 +0930 btrfs: prepare compression paths for large data folios All compression algorithms inside btrfs are not supporting large folios due to the following points: - btrfs_calc_input_length() is assuming page sized folio - kmap_local_folio() usages are using offset_in_page() Prepare them to support large data folios by: - Add a folio parameter to btrfs_calc_input_length() And use that folio parameter to calculate the correct length. Since we're here, also add extra ASSERT()s to make sure the parameter @cur is inside the folio range. This affects only zlib and zstd. Lzo compresses at most one block at a time, thus not affected. - Use offset_in_folio() to calculate the kmap_local_folio() offset This affects all 3 algorithms. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9a36bad6c394f23b5a8deecaca9e47acce6be8b7 Author: Filipe Manana Date: Tue Apr 8 17:37:03 2025 +0100 btrfs: rename __tree_search() to remove double underscore prefix There's no need to have a double underscore prefix as there's no variant of the function without it. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7e8866903225fe7bc35d46614f11e5b90594abb8 Author: Filipe Manana Date: Tue Apr 8 17:34:24 2025 +0100 btrfs: rename __lookup_extent_mapping() to remove double underscore prefix There's no need to have a double underscore prefix as there's no variant of the function without it anymore. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d846a6d3b09fa046e061ea6ec6daba67e66a7101 Author: Filipe Manana Date: Tue Apr 8 17:31:16 2025 +0100 btrfs: rename remaining exported extent map functions Rename all the exported functions from extent_map.h that don't have a 'btrfs_' prefix in their names, so that they are consistent with all the other functions, to make it clear they are btrfs specific functions and to avoid potential name collisions in the future with functions defined elsewhere in the kernel. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ae98ae2a50d72b01d0a61cb21e1ac75bfcebc5f3 Author: Filipe Manana Date: Tue Apr 8 17:13:12 2025 +0100 btrfs: rename functions to allocate and free extent maps These functions are exported and don't have a 'btrfs_' prefix in their names, which goes against coding style conventions. Rename them to have such prefix, making it clear they are from btrfs and avoiding potential collisions in the future with functions defined elsewhere outside btrfs. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2e871330cea44f7459726b0d83252949ae76166f Author: Filipe Manana Date: Tue Apr 8 16:52:09 2025 +0100 btrfs: rename extent map functions to get block start, end and check if in tree These functions are exported and don't have a 'btrfs_' prefix in their names, which goes against coding style conventions. Rename them to have such prefix, making it clear they are from btrfs and avoiding potential collisions in the future with functions defined elsewhere outside btrfs. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 962162ffa64f311a8c0cfbf1acfe7a8da126d4b0 Author: Filipe Manana Date: Tue Apr 8 16:41:15 2025 +0100 btrfs: rename exported extent map compression functions These functions are exported and don't have a 'btrfs_' prefix in their names, which goes against coding style conventions. Rename them to have such prefix, making it clear they are from btrfs and avoiding potential collisions in the future with functions defined elsewhere outside btrfs. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cff6df108b39b0433aea16c35ee806ffca662bee Author: Filipe Manana Date: Tue Apr 8 12:08:49 2025 +0100 btrfs: tracepoints: remove no longer used tracepoints for eb locking There are several tracepoints for extent buffer locks that are not used anymore: * btrfs_tree_read_unlock_blocking * btrfs_set_lock_blocking_read * btrfs_set_lock_blocking_write * btrfs_tree_read_lock_atomic These stopped being used after we switched extent buffer locks from a custom implementation to rw semaphores in commit 196d59ab9ccc ("btrfs: switch extent buffer tree lock to rw_semaphore"). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 81eb6ce8b55a0f6757e9f87702bd6437ea834c65 Author: Filipe Manana Date: Tue Apr 8 12:01:06 2025 +0100 btrfs: tracepoints: add btrfs prefix to names where it's missing Most of our tracepoints have the 'btrfs_' prefix in their names but a few of them are missing, making it inconsistent. So add the prefix to the ones that are missing it, creating consistency, making it clear for users these are btrfs tracepoints and eventually avoid name collisions with other tracepoints defined by other kernel subsystems. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9d072bfab534b8a4ba2f75ea5aca70c325832c46 Author: Filipe Manana Date: Mon Apr 7 12:15:25 2025 +0100 btrfs: make btrfs_find_contiguous_extent_bit() return bool instead of int The function needs only to return true or false, so there's no need to return an integer. Currently it returns 0 when a range with the given bits is set and 1 when not found, which is a bit counter intuitive too. So change the function to return a bool instead, returning true when a range is found and false otherwise. Update the function's documentation to mention the return value too. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 00ba32e5be977fc156fa5a2e5bdf6d1f6570452f Author: Filipe Manana Date: Mon Apr 7 11:57:05 2025 +0100 btrfs: remove double underscore prefix from __set_extent_bit() Now that set_extent_bit() was renamed to btrfs_set_extent_bit(), there's no need to have a __set_extent_bit() function, we can just remove the double underscore prefix, which we try to avoid according to the coding style conventions. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 94bd699a08eda0607a651536c4ecbcad6c9fe5b3 Author: Filipe Manana Date: Fri Apr 4 16:45:12 2025 +0100 btrfs: rename remaining exported functions from extent-io-tree.h Rename the remaning exported functions that don't have a 'btrfs_' prefix. By convention exported functions should have such prefix to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b351161f4f6643868c9803ba99e57b20a227cd9c Author: Filipe Manana Date: Fri Apr 4 16:31:24 2025 +0100 btrfs: rename free_extent_state() to include a btrfs prefix This is an exported function so it should have a 'btrfs_' prefix by convention, to make it clear it's btrfs specific and to avoid collisions with functions from elsewhere in the kernel. Rename the function to add 'btrfs_' prefix to it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f81c2aea711205c1a4f41e4aaf960053eddba0b9 Author: Filipe Manana Date: Fri Apr 4 16:07:19 2025 +0100 btrfs: rename the functions to count, test and get bit ranges in io trees These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a 'btrfs_' prefix to their names to make it clear they are from btrfs. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e965835c9829b1188879f75d678e19f7ec110ac6 Author: Filipe Manana Date: Fri Apr 4 12:17:13 2025 +0100 btrfs: rename the functions to init and release an extent io tree These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a 'btrfs_' prefix to their name to make it clear they are from btrfs. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 20612db4628d96ed0ca037d8b9cecd44d86270ed Author: Filipe Manana Date: Fri Apr 4 12:04:04 2025 +0100 btrfs: directly grab inode at __btrfs_debug_check_extent_io_range() We've tested that we are dealing with io tree that is associated to an inode (its owner is IO_TREE_INODE_IO), so there's no need to call btrfs_extent_io_tree_to_inode() in a separate line and we just assign tree->inode to the local inode variable when we declare it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 02c340c2781177242386ac5f31cc498a6929ed44 Author: Filipe Manana Date: Fri Apr 4 11:09:07 2025 +0100 btrfs: rename the functions to get inode and fs_info from an extent io tree These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a 'btrfs_' prefix to their name to make it clear they are from btrfs. Also remove the 'const' suffix from extent_io_tree_to_inode_const() since there's no non-const variant anymore and makes the naming consistent with extent_io_tree_to_fs_info() (no 'const' suffix and returns a const pointer). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 66da9c1bed97554f1b40c5086c7ade22292e5eca Author: Filipe Manana Date: Thu Apr 3 15:19:49 2025 +0100 btrfs: rename the functions to search for bits in extent ranges These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a 'btrfs_' prefix to their name to make it clear they are from btrfs. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 791b3455aca10bc28e996c2ff81bc1e078248cf3 Author: Filipe Manana Date: Thu Apr 3 15:00:26 2025 +0100 btrfs: rename set_extent_bit() to include a btrfs prefix This is an exported function so it should have a 'btrfs_' prefix by convention, to make it clear it's btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So rename it to btrfs_set_extent_bit(). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9d222562b415f19efd32d7a5290f40bb07feea3b Author: Filipe Manana Date: Wed Apr 2 11:50:08 2025 +0100 btrfs: rename the functions to clear bits for an extent range These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. One of them has a double underscore prefix which is also discouraged. So remove double underscore prefix where applicable and add a 'btrfs_' prefix to their name to make it clear they are from btrfs. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2cb9ac3faadc964f2640f55246c1f4f6c5ea76be Author: Filipe Manana Date: Mon Mar 31 15:29:21 2025 +0100 btrfs: rename __lock_extent() and __try_lock_extent() These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. Their double underscore prefix is also discouraged. So remove their double underscore prefix, add a 'btrfs_' prefix to their name to make it clear they are from btrfs and a '_bits' suffix to avoid collision with btrfs_lock_extent() and btrfs_try_lock_extent(). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b696440e5e13490bbd23f7c4656a861db04d14d7 Author: Filipe Manana Date: Mon Mar 31 14:38:24 2025 +0100 btrfs: add btrfs prefix to dio lock and unlock extent functions These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a prefix to their name. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 242570e80bfdf3f98ca13031c723edd72c69bdc2 Author: Filipe Manana Date: Mon Mar 31 14:23:42 2025 +0100 btrfs: add btrfs prefix to main lock, try lock and unlock extent functions These functions are exported so they should have a 'btrfs_' prefix by convention, to make it clear they are btrfs specific and to avoid collisions with functions from elsewhere in the kernel. So add a prefix to their name. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 41708a4c23500ebd024d66adaafe0e6022df29a9 Author: Filipe Manana Date: Mon Apr 7 17:52:22 2025 +0100 btrfs: add btrfs prefix to trace events for extent state alloc and free These trace events don't have the 'btrfs_' prefix in their name, unlike the other trace events from extent-io-tree.c. So add the prefix to make them consistent and follow coding style conventions too. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 024b3bc190c06fd77d3db8126a63b1efeb641df9 Author: Filipe Manana Date: Thu Apr 3 15:53:31 2025 +0100 btrfs: remove extent_io_tree_to_inode() and is_inode_io_tree() These functions aren't used outside extent-io-tree.c, but yet one of them (extent_io_tree_to_inode()) is unnecessarily exported in the header. Furthermore their single use is in a pattern like this: if (is_inode_io_tree(tree)) foo(extent_io_tree_to_inode(tree), ...); So we're effectively unnecessarily adding more indirection, checking twice if tree->owner == IO_TREE_INODE_IO before getting the inode and doing a non-inline function call to get tree->inode. Simplify this by removing these helper functions and instead doing thing like this: if (tree->owner == IO_TREE_INODE_IO) foo(tree->inode, ...); Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9633f48190d8187c0622cb3ebcb65503809ab3f9 Author: David Sterba Date: Fri Apr 4 20:19:38 2025 +0200 btrfs: tree-checker: more unlikely annotations Add more unlikely annotations to branches that lead to EUCLEAN, overall in the tree checker this helps to reorder instructions for the no-error case. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 2b14b74b992187933069cb3316c691dbd5707f47 Author: Qu Wenruo Date: Fri Apr 4 10:10:51 2025 +1030 btrfs: use folio_contains() for EOF detection Currently we use the following pattern to detect if the folio contains the end of a file: if (folio->index == end_index) folio_zero_range(); But that only works if the folio is page sized. For the following case, it will not work and leave the range beyond EOF uninitialized: The page size is 4K, and the fs block size is also 4K. 16K 20K 24K | | | | | EOF at 22K And we have a large folio sized 8K at file offset 16K. In that case, the old "folio->index == end_index" will not work, thus the range [22K, 24K) will not be zeroed out. Fix the following call sites which use the above pattern: - add_ra_bio_pages() - extent_writepage() Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e1fcad644b405928b4bf74b1cfd9322008992019 Author: Qu Wenruo Date: Fri Apr 4 10:20:21 2025 +1030 btrfs: remove unnecessary early exits in delalloc folio lock and unlock Inside functions unlock_delalloc_folio() and lock_delalloc_folios(), we have the following early exits: if (index == locked_folio->index && end_index == index) return; This allows us to exit early if the range is inside the same locked folio. However the current check relies on page sized folios, if we have a large folio that contains @index but not at @index, then the early exit will no longer trigger. Furthermore without the above early check, the existing code can handle it well, as both __process_folios_contig() and lock_delalloc_folios() will skip any folio page lock/unlock if it's on the locked folio. Here we remove the early exits and let the existing code handle the same index case, to make the code a little simpler. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 0f987c099d22c3b8c7d94fd13f957792e46f79c9 Author: Filipe Manana Date: Thu Apr 3 16:23:41 2025 +0100 btrfs: tracepoints: use btrfs_root_id() to get the id of a root Instead of open coding btrfs_root_id() to get the ID of a root, use the helper in the trace points, which also makes the code less verbose. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05efe3eb3b2ac139c4cfa3768c3adac7aeec8d3a Author: Qu Wenruo Date: Mon Mar 17 17:40:52 2025 +1030 btrfs: zlib: prepare copy_data_into_buffer() for large data folios The function itself is already taking large folios into consideration, just remove the ASSERT(!folio_test_large()) line. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3a8f948633a673204066ee4c7adf5314dee7a4c1 Author: Qu Wenruo Date: Mon Mar 17 17:40:51 2025 +1030 btrfs: subpage: prepare for large data folios The subpage handling code has two locations not supporting large folios: - btrfs_attach_subpage() Which is doing a metadata specific ASSERT() check. But for the future large data folios support, that check is too generic. Since it's metadata specific, only check the ASSERT() for metadata. - btrfs_subpage_assert() Just remove the "ASSERT(folio_order(folio) == 0)" check. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c08d45de63f64e7de53b4b64b23b15b4e452f06f Author: Qu Wenruo Date: Mon Mar 17 17:40:50 2025 +1030 btrfs: prepare end_bbio_data_write() for large data folios The function is doing an ASSERT() checking the folio order, but all later functions are handling large folios properly, thus we can safely remove that ASSERT(). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b4e9aaad09314b21aa09d9dfae97d07cce84c11a Author: Qu Wenruo Date: Mon Mar 17 17:40:49 2025 +1030 btrfs: prepare prepare_one_folio() for large data folios The only blockage is the ASSERT() rejecting large folios, just remove it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f45e538b0002bac23a1d2b27002088aa89279b74 Author: Qu Wenruo Date: Mon Mar 17 17:40:48 2025 +1030 btrfs: prepare btrfs_page_mkwrite() for large data folios The function btrfs_page_mkwrite() has an explicit ASSERT() checking the folio order. To make it support large data folios, we need to: - Remove the ASSERT(folio_order(folio) == 0) - Use folio_contains() to check if the folio covers the last page Otherwise the code is already supporting large folios well. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4a636a43741c2706868fb97dff9a83d398ac9e3 Author: Qu Wenruo Date: Mon Mar 17 17:40:47 2025 +1030 btrfs: send: prepare put_file_data() for large data folios Currently put_file_data() can only accept a page sized folio. However the function itself is not that complex, it's just copying data from filemap folio into the send buffer. Make it support large data folios: - Change the loop to use file offset instead of page index - Calculate @pg_offset and @cur_len after getting the folio - Remove the "WARN_ON(folio_order(folio));" line Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 70a376475d68c9c4fb6d98cdf78f0912950293d3 Author: Qu Wenruo Date: Mon Mar 17 17:40:46 2025 +1030 btrfs: send: remove the again label inside put_file_data() The again label is here to retry to get the folio for the current index. When triggering that label, there is no advance of the iterator. So it can be replaced by a simple "continue" and remove the again label. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit dcb5bcccb7f84dad9ab0e040d5203b72fec0dea4 Author: David Sterba Date: Wed Apr 2 01:18:12 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_insert_inode_extref() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit f6a359e3071a1861b446057e5ee0dfe86bf88c89 Author: David Sterba Date: Wed Apr 2 01:18:11 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_del_inode_extref() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit c7341d033750f440dd9273117ed0de06fc420193 Author: David Sterba Date: Wed Apr 2 01:18:10 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_encoded_read_inline() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit 5e8632035a173a8c54c17301ecff69c79babb4bf Author: David Sterba Date: Wed Apr 2 01:18:09 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in can_nocow_extent() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit 2c5563a394f800f7642afed46f5b9e6e1abfeb14 Author: David Sterba Date: Wed Apr 2 01:18:08 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_set_inode_index_count() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit 516748f584fd4308e93a503cbc876969b012de63 Author: David Sterba Date: Wed Apr 2 01:18:07 2025 +0200 btrfs: use BTRFS_PATH_AUTO_FREE in may_destroy_subvol() This is the trivial pattern for path auto free, initialize at the beginning and free at the end with simple goto -> return conversions. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit e235418118774fbe52cc558991aa769d2dbc9292 Author: David Sterba Date: Wed Apr 2 01:18:06 2025 +0200 btrfs: do more trivial BTRFS_PATH_AUTO_FREE conversions The most trivial pattern for the auto freeing when the variable is declared with the macro and the final btrfs_free_path() is removed. There are almost none goto -> return conversions and there's no other function cleanup. Reviewed-by: Daniel Vacek Signed-off-by: David Sterba commit c6a43322a3ab01da6c7588c29a0a918b9d797c11 Author: Filipe Manana Date: Wed Apr 2 14:10:53 2025 +0100 btrfs: remove redundant record start offset check at test_range_bit() It's pointless to check if the current record's start offset is greater than the end offset, as before we just tested if it was greater than the start offset - and if it's not it means it's less than or equal to the start offset, so it can not be greater than the end offset, as our start offset is always smaller than the end offset. So remove that check and also add an assertion to verify the start offset is smaller then the end offset. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53828c759ad7d281a8e7f26b7c1102db9ec678f2 Author: Filipe Manana Date: Wed Apr 2 13:31:46 2025 +0100 btrfs: simplify last record detection at test_range_bit() The overflow detection for the start offset of the next record is not really necessary, we can just stop iterating if the current record ends at or after out end offset. This removes the need to test if the current record end offset is (u64)-1 and to check if adding 1 to the current end offset results in 0. By testing only if the current record ends at or after the end offset, we also don't need anymore to test the new start offset at the head of the while loop. This makes both the source code and assembly code simpler, more efficient and shorter (reducing the object text size). Also remove the pointless initialization to NULL of the state variable, as we don't use it before the first assignment to it. This may help avoid some warnings with clang tools such as the one reported/fixed by commit 966de47ff0c9 ("btrfs: remove redundant initialization of variables in log_new_ancestors"). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c54c245f809aab1c81c626a4a667faba86b63adf Author: Filipe Manana Date: Wed Apr 2 13:23:45 2025 +0100 btrfs: remove redundant check at find_first_extent_bit_state() The tree_search() function always returns an entry that either contains the search offset or the first entry in the tree that starts after the offset. So checking at find_first_extent_bit_state() if the returned entry ends at or after the search offset is pointless. Remove the check. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 56ec21a6dd2775ab73237e87c8725fe8c36d04d1 Author: Filipe Manana Date: Wed Apr 2 13:07:33 2025 +0100 btrfs: fix documentation for tree_search_for_insert() There are several things wrong with the documentation: 1) At the top it's only mentioned that we search for an entry containing the given offset, but when such entry does not exists we search for the first entry that starts and ends after that offset; 2) It mentions that @node_ret and @parent_ret aren't changed if the returned entry contains the given offset - that is true only if the returned entry starts exactly at @offset, otherwise those arguments are changed; 3) It mentions that if no entry containing offset is found then we return the first entry ending before the offset - that is not true, we return the first entry that starts and ends after that offset; 4) It also mentions that NULL is never returned. This is false as in case there's no entry containing offset or any entry that starts and ends after offset, NULL is returned. So fix the documentation. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 131a4be1c03705ec4d94fc191c7621039d7f26f1 Author: Filipe Manana Date: Tue Apr 1 12:27:38 2025 +0100 btrfs: simplify last record detection at test_range_bit_exists() Instead of keeping track of the minimum start offset of the next record and detecting overflow every time we update that offset to be the sum of current record's end offset plus one, we can simply exit when the current record ends at or beyond our end offset and forget about updating the start offset on every iteration and testing for it at the top of the loop. This makes both the source code and assembly code simpler, more efficient and shorter (reducing the object text size). Also remove the pointless initialization to NULL of the state variable, as we don't use it before the first assignment to it. This may help avoid some warnings with clang tools such as the one reported/fixed by commit 966de47ff0c9 ("btrfs: remove redundant initialization of variables in log_new_ancestors"). Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c4e33a8431cc1a4c87c9cdee427c60f40079eea5 Author: Filipe Manana Date: Tue Apr 1 16:12:52 2025 +0100 btrfs: use clear_extent_bits() instead of clear_extent_bit() where possible Several places are using clear_extent_bit() and passing a NULL value for the 'cached' argument, which is pointless as they can use instead clear_extent_bits(). Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 39c5714cb4933a41a8820fb02a9fe1cc1f82335a Author: Filipe Manana Date: Tue Apr 1 12:23:14 2025 +0100 btrfs: use clear_extent_bits() at chunk_map_device_clear_bits() Instead of using __clear_extent_bit() we can use clear_extent_bits() since we pass a NULL value for the cached and changeset arguments. Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c757c024fc0ac8b7c5c08f72dfb6c1f51cc12de8 Author: Filipe Manana Date: Tue Apr 1 12:21:35 2025 +0100 btrfs: use clear_extent_bit() at try_release_extent_state() Instead of using __clear_extent_bit() we can use clear_extent_bit() since we pass a NULL value for the changeset argument. Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit af566bdaff543edaad516bd57e1b0064326246c9 Author: Qu Wenruo Date: Tue Apr 1 18:20:29 2025 +1030 btrfs: fix the file offset calculation inside btrfs_decompress_buf2page() [BUG WITH EXPERIMENTAL LARGE FOLIOS] When testing the experimental large data folio support with compression, there are several ASSERT()s triggered from btrfs_decompress_buf2page() when running fsstress with compress=zstd mount option: - ASSERT(copy_len) from btrfs_decompress_buf2page() - VM_BUG_ON(offset + len > PAGE_SIZE) from memcpy_to_page() [CAUSE] Inside btrfs_decompress_buf2page(), we need to grab the file offset from the current bvec.bv_page, to check if we even need to copy data into the bio. And since we're using single page bvec, and no large folio, every page inside the folio should have its index properly setup. But when large folios are involved, only the first page (aka, the head page) of a large folio has its index properly initialized. The other pages inside the large folio will not have their indexes properly initialized. Thus the page_offset() call inside btrfs_decompress_buf2page() will result garbage, and completely screw up the @copy_len calculation. [FIX] Instead of using page->index directly, go with page_pgoff(), which can handle non-head pages correctly. So introduce a helper, file_offset_from_bvec(), to get the file offset from a single page bio_vec, so the copy_len calculation can be done correctly. Reviewed-by: Filipe Manana Reviewed-by: Sweet Tea Dorminy Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 6aa79c4f25197cc54479dc87d79ecd45571fb062 Author: David Sterba Date: Thu Mar 27 17:19:18 2025 +0100 btrfs: use rb_entry_safe() where possible to simplify code Simplify conditionally reading an rb_entry(), there's the rb_entry_safe() helper that checks the node pointer for NULL so we don't have to write it explicitly. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit c4669e4a8b660143ad1fc9743dcb2a3d81a74b42 Author: Filipe Manana Date: Tue Mar 25 17:26:37 2025 +0000 btrfs: pass a pointer to get_range_bits() to cache first search result Allow get_range_bits() to take an extent state pointer to pointer argument so that we can cache the first extent state record in the target range, so that a caller can use it for subsequent operations without doing a full tree search. Currently the only user is try_release_extent_state(), which then does a call to __clear_extent_bit() which can use such a cached state record. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32c523c578e8489f55663ce8a8860079c8deb414 Author: Filipe Manana Date: Tue Mar 25 12:55:54 2025 +0000 btrfs: allow folios to be released while ordered extent is finishing When the release_folio callback (from struct address_space_operations) is invoked we don't allow the folio to be released if its range is currently locked in the inode's io_tree, as it may indicate the folio may be needed by the task that locked the range. However if the range is locked because an ordered extent is finishing, then we can safely allow the folio to be released because ordered extent completion doesn't need to use the folio at all. When we are under memory pressure, the kernel starts writeback of dirty pages (folios) with the goal of releasing the pages from the page cache after writeback completes, however this often is not possible on btrfs because: * Once the writeback completes we queue the ordered extent completion; * Once the ordered extent completion starts, we lock the range in the inode's io_tree (at btrfs_finish_one_ordered()); * If the release_folio callback is called while the folio's range is locked in the inode's io_tree, we don't allow the folio to be released, so the kernel has to try to release memory elsewhere, which may result in triggering more writeback or releasing other pages from the page cache which may be more useful to have around for applications. In contrast, when the release_folio callback is invoked after writeback finishes and before ordered extent completion starts or locks the range, we allow the folio to be released, as well as when the release_folio callback is invoked after ordered extent completion unlocks the range. Improve on this by detecting if the range is locked for ordered extent completion and if it is, allow the folio to be released. This detection is achieved by adding a new extent flag in the io_tree that is set when the range is locked during ordered extent completion. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cbfb4cbf459d9be4782bdf4fa688dbe3ca455992 Author: Filipe Manana Date: Tue Mar 25 13:29:44 2025 +0000 btrfs: update comment for try_release_extent_state() Drop reference to pages from the comment since the function is fully folio aware and works regardless of how many pages are in the folio. Also while at it, capitalize the first word and make it more explicit that release_folio is a callback from struct address_space_operations. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1e5773e0bab761c853eaf7286394905a544ef02d Author: Qu Wenruo Date: Thu Mar 27 19:20:01 2025 +1030 btrfs: prepare btrfs_punch_hole_lock_range() for large data folios The function btrfs_punch_hole_lock_range() needs to make sure there is no other folio in the range, thus it goes with filemap_range_has_page(), which works pretty fine. But if we have large folios, under the following case filemap_range_has_page() will always return true, forcing btrfs_punch_hole_lock_range() to do a very time consuming busy loop: start end | | |//|//|//|//| | | | | | | | |//|//| \ / \ / Folio A Folio B In the above case, folio A and B contain our start/end indexes, and there are no other folios in the range. Thus we do not need to retry inside btrfs_punch_hole_lock_range(). To prepare for large data folios, introduce a helper, check_range_has_page(), which will: - Shrink the search range towards page boundaries If the rounded down end (exclusive, otherwise it can underflow when @end is inside the folio at file offset 0) is no larger than the rounded up start, it means the range contains no other pages other than the ones covering @start and @end. Can return false directly in that case. - Grab all the folios inside the range - Skip any large folios that cover the start and end indexes - If any other folios are found return true - Otherwise return false This new helper is going to handle both large folios and regular ones. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit be8ef7990c6775c2bb1374abbde8f5408c527eba Author: Qu Wenruo Date: Wed Mar 26 13:24:21 2025 +1030 btrfs: prepare btrfs_buffered_write() for large data folios This involves the following modifications: - Set the order flags for __filemap_get_folio() inside prepare_one_folio() This will allow __filemap_get_folio() to create a large folio if the address space supports it. - Limit the initial @write_bytes inside copy_one_range() If the largest folio boundary splits the initial write range, there is no way we can write beyond the largest folio boundary. This is done by a simple helper calc_write_bytes(). - Release exceeding reserved space if the folio is smaller than expected Which is doing the same handling when short copy happens. All the preparations should not change the behavior when the largest folio order is 0. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 581bb9e761f93df37c40ff8e6904796aa6d8aa41 Author: Qu Wenruo Date: Thu Mar 27 12:44:58 2025 +1030 btrfs: refactor how we handle reserved space inside copy_one_range() There are several things not ideal in copy_one_range(): - Unnecessary temporary variables * block_offset * reserve_bytes * dirty_blocks * num_blocks * release_bytes These are utilized to handle short-copy cases. - Inconsistent handling of btrfs_delalloc_release_extents() There is a hidden behavior that, after reserving metadata for X bytes of data write, we have to call btrfs_delalloc_release_extents() with X once and only once. Calling btrfs_delalloc_release_extents(X - 4K) and btrfs_delalloc_release_extents(4K) will cause outstanding extents accounting to go wrong. This is because the outstanding extents mechanism is not designed to handle shrinking of reserved space. Improve above situations by: - Use a single @reserved_start and @reserved_len pair Now we reserve space for the initial range, and if a short copy happened and we need to shrink the reserved space, we can easily calculate the new length, and update @reserved_len. - Introduce helpers to shrink reserved data and metadata space This is done by two new helpers, shrink_reserved_space() and btrfs_delalloc_shrink_extents(). The later will do a better calculation if we need to modify the outstanding extents, and the first one will be utilized inside copy_one_range(). - Manually unlock, release reserved space and return if no byte is copied Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 5c41f6010ef8139bf19c63419498fd1d38d3ed2b Author: Filipe Manana Date: Fri Mar 28 12:26:59 2025 +0000 btrfs: remove EXTENT_UPTODATE io tree flag The EXTENT_UPTODATE io tree flag is now used only to mark ranges in the fs_info->excluded_extents as used by super blocks and not available for extent allocation (to prevent adding those ranges as free space in the in memory space caches). As we can use any flag for that purpose, and we are using EXTENT_DIRTY for the pinned extents io tree for example, remove the EXTENT_UPTODATE flag and use instead EXTENT_DIRTY for the excluded extents io tree. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit db3f796c7ceda9226a168c364a5b17afd8ddcc76 Author: Filipe Manana Date: Fri Mar 28 12:14:54 2025 +0000 btrfs: stop searching for EXTENT_DIRTY bit in the excluded extents io tree At btrfs_add_new_free_space() we keep searching for ranges in the excluded extents io tree that have the EXTENT_DIRTY bit set, however we never ever set that bit for ranges in that tree. That is a leftover from when that function used the global freed extents trees (fs_info->freed_extents[2]), where we used both the EXTENT_DIRTY and EXTENT_UPTODATE bits, but those trees are gone with commit fe119a6eeb67 ("btrfs: switch to per-transaction pinned extents"), which introduced the fs_info->excluded_extents io tree, where only EXTENT_UPTODATE is set. So remove the EXTENT_DIRTY bit search at btrfs_add_new_free_space(). Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d2c41835fd284b73d61239ff5d637167f2563895 Author: Filipe Manana Date: Fri Mar 28 11:27:09 2025 +0000 btrfs: remove leftover EXTENT_UPTODATE clear from an inode's io_tree After commit 52b029f42751 ("btrfs: remove unnecessary EXTENT_UPTODATE state in buffered I/O path") we never set EXTENT_UPTODATE in an inode's io_tree anymore, but we still have some code attempting to clear that bit from an inode's io_tree. Remove that code as it doesn't do anything anymore. The sole use of the EXTENT_UPTODATE bit is for the excluded extents io_tree (fs_info->excluded_extents), which is used to track the locations of super blocks, so that their ranges are never marked as free, making them unavailable for extent allocation. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5e85262e542d6da8898bb8563a724ad98f6fc936 Author: Filipe Manana Date: Thu Mar 20 16:05:50 2025 +0000 btrfs: fix fsync of files with no hard links not persisting deletion If we fsync a file (or directory) that has no more hard links, because while a process had a file descriptor open on it, the file's last hard link was removed and then the process did an fsync against the file descriptor, after a power failure or crash the file still exists after replaying the log. This behaviour is incorrect since once an inode has no more hard links it's not accessible anymore and we insert an orphan item into its subvolume's tree so that the deletion of all its items is not missed in case of a power failure or crash. So after log replay the file shouldn't exist anymore, which is also the behaviour on ext4, xfs, f2fs and other filesystems. Fix this by not ignoring inodes with zero hard links at btrfs_log_inode_parent() and by committing an inode's delayed inode when we are not doing a fast fsync (either BTRFS_INODE_COPY_EVERYTHING or BTRFS_INODE_NEEDS_FULL_SYNC is set in the inode's runtime flags). This last step is necessary because when removing the last hard link we don't delete the corresponding ref (or extref) item, instead we record the change in the inode's delayed inode with the BTRFS_DELAYED_NODE_DEL_IREF flag, so that when the delayed inode is committed we delete the ref/extref item from the inode's subvolume tree - otherwise the logging code will log the last hard link and therefore upon log replay the inode is not deleted. The base code for a fstests test case that reproduces this bug is the following: . ./common/dmflakey _require_scratch _require_dm_target flakey _require_mknod _scratch_mkfs >>$seqres.full 2>&1 || _fail "mkfs failed" _require_metadata_journaling $SCRATCH_DEV _init_flakey _mount_flakey touch $SCRATCH_MNT/foo # Commit the current transaction and persist the file. _scratch_sync # A fifo to communicate with a background xfs_io process that will # fsync the file after we deleted its hard link while it's open by # xfs_io. mkfifo $SCRATCH_MNT/fifo tail -f $SCRATCH_MNT/fifo | \ $XFS_IO_PROG $SCRATCH_MNT/foo >>$seqres.full & XFS_IO_PID=$! # Give some time for the xfs_io process to open a file descriptor for # the file. sleep 1 # Now while the file is open by the xfs_io process, delete its only # hard link. rm -f $SCRATCH_MNT/foo # Now that it has no more hard links, make the xfs_io process fsync it. echo "fsync" > $SCRATCH_MNT/fifo # Terminate the xfs_io process so that we can unmount. echo "quit" > $SCRATCH_MNT/fifo wait $XFS_IO_PID unset XFS_IO_PID # Simulate a power failure and then mount again the filesystem to # replay the journal/log. _flakey_drop_and_remount # We don't expect the file to exist anymore, since it was fsynced when # it had no more hard links. [ -f $SCRATCH_MNT/foo ] && echo "file foo still exists" _unmount_flakey # success, all done echo "Silence is golden" status=0 exit A test case for fstests will be submitted soon. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 846b534075f45d5b5490819a348aa1057f8112a6 Author: Mark Harmstone Date: Tue Mar 18 15:56:42 2025 +0000 btrfs: fix typo in space info explanation There's an explanation of how space info works at the top of fs/btrfs/space-info.c, which makes reference to a variable called bytes_may_reserve. There's nothing called that in the code, and wasn't at time the comment was written; as far I can tell this is a typo, and it should actually be bytes_may_use. Reviewed-by: Johannes Thumshirn Signed-off-by: Mark Harmstone Signed-off-by: David Sterba commit 062f3d02a21ce4ec212fa53f8e05db65554b09d1 Author: Daniel Vacek Date: Tue Mar 18 10:54:38 2025 +0100 btrfs: remove unused flag EXTENT_BUFFER_IN_TREE This flag is set after inserting the eb to the buffer tree and cleared on it's removal. It was added in commit 34b41acec1ccc0 ("Btrfs: use a bit to track if we're in the radix tree") and wanted to make use of it, faa2dbf004e89e ("Btrfs: add sanity tests for new qgroup accounting code"). Both are 10+ years old, we can remove the flag. Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit c61660ec341e65650e58c92d0af71184aa216ff0 Author: Daniel Vacek Date: Tue Mar 25 17:31:38 2025 +0100 btrfs: remove unused flag EXTENT_BUFFER_CORRUPT This flag is no longer being used. It was added by commit a826d6dcb32d ("Btrfs: check items for correctness as we search") but it's no longer being used after commit f26c92386028 ("btrfs: remove reada infrastructure"). Reviewed-by: Qu Wenruo Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit 350362e95fbbe86008c240093697756d52049686 Author: Daniel Vacek Date: Tue Mar 25 17:31:37 2025 +0100 btrfs: remove unused flag EXTENT_BUFFER_READAHEAD This flag is no longer being used. It was added by commit ab0fff03055d ("btrfs: add READAHEAD extent buffer flag") and used in commits: 79fb65a1f6d9 ("Btrfs: don't call readahead hook until we have read the entire eb") 78e62c02abb9 ("btrfs: Remove extent_io_ops::readpage_io_failed_hook") 371cdc0700c7 ("btrfs: introduce subpage metadata validation check") Finally all the code using it was removed by commit f26c92386028 ("btrfs: remove reada infrastructure"). Reviewed-by: Qu Wenruo Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit 40f47f6d722e1e0e24c8f21ce4d7c63a6169771f Author: Daniel Vacek Date: Tue Mar 25 17:31:36 2025 +0100 btrfs: remove unused flag EXTENT_BUFFER_READ_ERR This flag was added by commit 656f30dba7ab ("Btrfs: be aware of btree inode write errors to avoid fs corruption") but it stopped being used after commit 046b562b20a5 ("btrfs: use a separate end_io handler for read_extent_buffer"). Reviewed-by: Qu Wenruo Signed-off-by: Daniel Vacek Reviewed-by: David Sterba Signed-off-by: David Sterba commit ced47a4db4bf823419a68f36943d243fb6ae4bb1 Author: Qu Wenruo Date: Thu Mar 20 13:53:27 2025 +1030 btrfs: factor out the main loop of btrfs_buffered_write() into a helper Inside the main loop of btrfs_buffered_write() we are doing a lot of heavy lifting inside a while() loop. This makes it pretty hard to read, factor out the content into a helper, copy_one_range() to do the work. This has no functional change, but with some minor variable renames, e.g. rename all "sector" into "block". Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit af821cba725f31d7305db26cffb07f4d2b96f34f Author: Qu Wenruo Date: Thu Mar 20 13:30:59 2025 +1030 btrfs: factor out space reservation code from btrfs_buffered_write() Inside the main loop of btrfs_buffered_write(), we have a complex data and metadata space reservation code, which tries to reserve space for a COW write, if failed then fallback to check if we can do a NOCOW write. Factor out that part of code into a dedicated helper, reserve_space(), to make the main loop a little easier to read. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit afe990fb59c152adef5a80c9168e990e2610b1f7 Author: Qu Wenruo Date: Thu Mar 20 13:07:31 2025 +1030 btrfs: cleanup the reserved space inside loop of btrfs_buffered_write() Inside the main loop of btrfs_buffered_write(), if something wrong happened, there is a out-of-loop cleanup path to release the reserved space. This behavior saves some code lines, but makes it much harder to read, as we need to check release_bytes to make sure when we need to do the cleanup. Factor out the cleanup part into a helper, release_reserved_space(), to do the cleanup inside the main loop, so that we can move @release_bytes inside the loop. This will make later refactoring of the main loop much easier. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 563bd2b78581313599f7ca63d3a07b8b81a3fb01 Author: Qu Wenruo Date: Thu Mar 20 10:04:22 2025 +1030 btrfs: remove force_page_uptodate variable from btrfs_buffered_write() Commit c87c299776e4 ("btrfs: make buffered write to copy one page a time") changed how the variable @force_page_uptodate was updated. Before that commit the variable was only initialized to false at the beginning of the function, and after hitting a short copy, the next retry on the same folio would force the folio to be read from the disk. But after the commit, the variable is always initialized to false at the beginning of the loop's scope, causing prepare_one_folio() never to get a true value passed in. The change in behavior is not a huge deal, it only makes a difference on how we handle short copies: Old: Allow the buffer to be split The first short copy will be rejected, that's the same for both cases. But for the next retry, we require the folio to be read from disk. Then even if we hit a short copy again, since the folio is already uptodate, we do not need to handle partial uptodate range, and can continue, marking the short copied range as dirty and continue. This will split the buffer write into the folio as two buffered writes. New: Do not allow the buffer to be split The first short copy will be rejected, that's the same for both cases. For the next retry, we do nothing special, thus if the short copy happened again, we reject it again, until either the short copy is gone, or we failed to fault in the buffer. This will mean the buffer write into the folio will either fail or succeed, no splitting will happen. To me, either solution is fine, but the new one makes it simpler and requires no special handling, so I prefer that solution. And since @force_page_uptodate is always false when passed into prepare_one_folio(), we can just remove the variable. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit d03e3a9370c85cfc07cd5c816196dc66b888a536 Author: Qu Wenruo Date: Sat Mar 15 19:19:26 2025 +1030 btrfs: move block perfect compression out of experimental features Commit 1d2fbb7f1f9e ("btrfs: allow compression even if the range is not page aligned") introduced the block perfect compression for block size < page size cases. Before that commit, if the fs block size is smaller than page size (aka subpage cases), compressed write is only enabled if the dirty range is fully page aligned. This block perfect compression support was introduced in v6.13, and has been tested for two kernel releases. I believe it's time to move it out of experimental features so that we can get more tests in the real world. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 06c4b2036818585542a16f286d88ad8e7b7a8252 Merge: 63a9a727d373fa 379f7682d062a6 Author: Johannes Berg Date: Thu May 15 13:56:38 2025 +0200 Merge tag 'iwlwifi-next-2025-05-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== iwlwifi features, notably a rework of the transport configuration ==================== Link: https://patch.msgid.link/MW5PR11MB5810DD2655DE461E98A618DDA390A@MW5PR11MB5810.namprd11.prod.outlook.com/ Signed-off-by: Johannes Berg commit a9fa13105b2ee9291c4fbbc7259fdec41dd42990 Merge: 4a5883a5861589 29552dcc044a23 Author: Mark Brown Date: Thu May 15 14:08:51 2025 +0200 ASoC: mediatek: mt8183-afe-pcm: Shorten source code Merge series from Chen-Yu Tsai : This series is meant as an example on how to use macros and range cases to shorten the MediaTek audio frontend drivers. The drivers have large tables describing the registers and register fields for every supported audio DMA interface. (Some are actually skipped!) There's a lot of duplication which can be eliminated using macros. This should serve as a reference for the MT8196 AFE driver that I had commented on. The three patches tackle separate tables in the driver. The remaining one that could be tackled is the list of DAIs; but that one has more differences between each entry, so I haven't done it yet. commit 90b85567e45736b662d034be536a76ba0f4c7ca8 Author: Pratap Nirujogi Date: Wed May 14 17:54:59 2025 -0400 platform/x86: Add AMD ISP platform config for OV05C10 ISP device specific configuration is not available in ACPI. Add swnode graph to configure the missing device properties for the OV05C10 camera device supported on amdisp platform. Add support to create i2c-client dynamically when amdisp i2c adapter is available. Co-developed-by: Benjamin Chan Signed-off-by: Benjamin Chan Reviewed-by: Mario Limonciello Reviewed-by: Hans de Goede Reviewed-by: Armin Wolf Signed-off-by: Pratap Nirujogi Link: https://lore.kernel.org/r/20250514215623.522746-1-pratap.nirujogi@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e636e3f7421b2ff8e706a835f78f071cb0d8e197 Author: Srinivas Pandruvada Date: Thu May 8 16:02:42 2025 -0700 Documentation: admin-guide: pm: Add documentation for die_id Add documentation to describe die_id attribute. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250508230250.1186619-6-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen commit 247b43fcd8722914282fbd432e9cc41cd3971e31 Author: Srinivas Pandruvada Date: Thu May 8 16:02:41 2025 -0700 platform/x86/intel-uncore-freq: Add attributes to show die_id For domains with agents to control cores (compute dies) show matching Linux CPU die ID. Linux CPU ID is a logical die ID, so this may not match physical die ID or domain_id. So, a mapping is required to get Linux CPU die ID. This attribute is only presented when CPUID enumerates die ids. This attribute can be used by orchestration software like Kubernetes to target specific dies for uncore frequency control. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250508230250.1186619-5-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen commit e37be5d85c602e07c1e2930c2cc98ebd46f9ecf7 Author: Srinivas Pandruvada Date: Thu May 8 16:02:40 2025 -0700 platform/x86/intel: power-domains: Add interface to get Linux die ID The die ID in the Linux topology sysfs is a logical identifier that differs from the one presented in CPUID leaf 0x1F or via MSR 0x54. Introduce an interface that returns the Linux CPU die ID based on a given package ID and power domain ID. This mapping is stored during the CPU online callback in an array. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250508230250.1186619-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen commit bfbe7729d6dd2e2c8ef44f9179ad11ab766150e6 Author: Srinivas Pandruvada Date: Thu May 8 16:02:39 2025 -0700 Documentation: admin-guide: pm: Add documentation for agent_types Add documentation to describe agent_types attribute. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250508230250.1186619-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen commit b98fa870fce2335433f20b2213e526b8d99e15dc Author: Srinivas Pandruvada Date: Thu May 8 16:02:38 2025 -0700 platform/x86/intel-uncore-freq: Add attributes to show agent types Currently, users need detailed hardware information to understand the scope of controls within each uncore domain. Uncore frequency controls manage subsystems such as core, cache, memory, and I/O. The UFS TPMI provides this information, which can be used to present the scope more clearly. Each uncore domain consists of one or more agent types, with each agent type controlling one or more uncore hardware subsystems. For example, a single agent might control both the core and cache. Introduce a new attribute called "agent_types." This attribute displays a list of agents, separated by space character. The string representations for agent types are as follows: For core agent: core For cache agent: cache For memory agent: memory For I/O agent: io These agent types are read during probe time for each cluster and stored as part of the struct uncore_data. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250508230250.1186619-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9e010737dd434e3eee1fa75938abea0dc2fab8e2 Author: Heiko Stuebner Date: Sat May 3 22:15:12 2025 +0200 ARM: dts: rockchip: add rk3036 usb2phy nodes and enable them on kylin The rk3036 does contain a usb2phy, just until now it was just used implicitly without additional configuration. As we now have the bits in place for it getting actually controlled, add the necessary phy-node to the GRF simple-mfd. Enable the phy-ports in the same patch to not create bisectability issues, as hooking up the phys to the usb controllers would create probe deferrals until a board enables them. Doing everything in one patch, solves that issue. Only rk3036-kylin actually enabled the usb controllers, so is the only board affected. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503201512.991277-4-heiko@sntech.de commit 34d2730fbbddfdffd656d36a13f8fdb886a3b5e1 Author: Heiko Stuebner Date: Sun May 11 00:01:06 2025 +0200 arm64: dts: rockchip: move rk3528 i2c+uart aliases to board files Even though they will be the same for all boards, i2c and uart aliases are supposed to live in the individual board files, to not create aliases for disabled nodes. So move the newly added aliases for rk3528 over to the Radxa E20C board, which is the only rk3528 board right now. Fixes: d3a05f490d04 ("arm64: dts: rockchip: Add I2C controllers for RK3528") Suggested-by: Arnd Bergmann Reviewed-by: Yao Zi Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250510220106.2108414-1-heiko@sntech.de commit 67fa756408a5359941bea2c021740da5e9ed490d Merge: c16608005ccb99 fa00077d8fd672 Author: Paolo Abeni Date: Thu May 15 13:26:20 2025 +0200 Merge branch 'octeontx2-improve-mailbox-tracing' Subbaraya Sundeep says: ==================== octeontx2: Improve mailbox tracing Octeontx2 VF,PF and AF devices communicate using hardware shared mailbox region where VFs can only to talk to its PFs and PFs can only talk to AF. AF does the entire resource management for all PFs and VFs. The shared mbox region is used for synchronous requests (requests from PF to AF or VF to PF) and async notifications (notifications from AF to PFs or PF to VFs). Sending a request to AF from VF involves various stages like 1. VF allocates message in shared region 2. Triggers interrupt to PF 3. PF upon receiving interrupt from VF will copy the message from VF<->PF region to PF<->AF region 4. Triggers interrupt to AF 5. AF processes it and writes response in PF<->AF region 6. Triggers interrupt to PF 7. PF copies responses from PF<->AF region to VF<->PF region 8. Triggers interrupt to Vf 9. VF reads response in VF<->PF region Due to various stages involved, Tracepoints are used in mailbox code for debugging. Existing tracepoints need some improvements so that maximum information can be inferred from trace logs during an issue. This patchset tries to enhance existing tracepoints and also adds a couple of tracepoints. ==================== Link: https://patch.msgid.link/1747136408-30685-1-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit fa00077d8fd6728a7cda48d0795d885ea2006a92 Author: Subbaraya Sundeep Date: Tue May 13 17:10:08 2025 +0530 octeontx2: Add new tracepoint otx2_msg_status Apart from netdev interface Octeontx2 PF does the following: 1. Sends its own requests to AF and receives responses from AF. 2. Receives async messages from AF. 3. Forwards VF requests to AF, sends respective responses from AF to VFs. 4. Sends async messages to VFs. This patch adds new tracepoint otx2_msg_status to display the status of PF wrt mailbox handling. Signed-off-by: Subbaraya Sundeep Link: https://patch.msgid.link/1747136408-30685-5-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit 27d27a06b48e0781fd9e207646eba0e14ee0e439 Author: Subbaraya Sundeep Date: Tue May 13 17:10:07 2025 +0530 octeontx2: Add pcifunc also to mailbox tracepoints This patch adds pcifunc which represents PF and VF device to the tracepoints otx2_msg_alloc, otx2_msg_send, otx2_msg_process so that it is easier to correlate which device allocated the message, which device forwarded it and which device processed that message. Also add message id in otx2_msg_send tracepoint to check which message is sent at any point of time from a device. Signed-off-by: Subbaraya Sundeep Link: https://patch.msgid.link/1747136408-30685-4-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit ba7b63670312d4ad2ce5e4d43652c6b38d3fb56f Author: Subbaraya Sundeep Date: Tue May 13 17:10:06 2025 +0530 octeontx2-af: Display names for CPT and UP messages Mailbox UP messages and CPT messages names are not being displayed with their names in trace log files. Add those messages too in otx2_mbox_id2name. Signed-off-by: Subbaraya Sundeep Link: https://patch.msgid.link/1747136408-30685-3-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit aa2263b3c3e2286575ff286bb538847b4ab4ba49 Author: Subbaraya Sundeep Date: Tue May 13 17:10:05 2025 +0530 octeontx2-af: convert dev_dbg to tracepoint in mbox Use tracepoint instead of dev_dbg since the entire mailbox code uses tracepoints for debugging. Signed-off-by: Subbaraya Sundeep Link: https://patch.msgid.link/1747136408-30685-2-git-send-email-sbhatta@marvell.com Signed-off-by: Paolo Abeni commit c16608005ccb99fbde3a4cd96eab28e16f148abf Author: Shay Drory Date: Tue May 13 11:19:22 2025 +0300 net: Look for bonding slaves in the bond's network namespace Update the for_each_netdev_in_bond_rcu macro to iterate through network devices in the bond's network namespace instead of always using init_net. This change is safe because: 1. **Bond-Slave Namespace Relationship**: A bond device and its slaves must reside in the same network namespace. The bond device's namespace is established at creation time and cannot change. 2. **Slave Movement Implications**: Any attempt to move a slave device to a different namespace automatically removes it from the bond, as per kernel networking stack rules. This maintains the invariant that slaves must exist in the same namespace as their bond. This change is part of an effort to enable Link Aggregation (LAG) to work properly inside custom network namespaces. Previously, the macro would only find slave devices in the initial network namespace, preventing proper bonding functionality in custom namespaces. Signed-off-by: Shay Drory Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250513081922.525716-1-mbloch@nvidia.com Signed-off-by: Paolo Abeni commit 40d48527a587b5c2bd4b7ba00974732a93052cae Author: Antonio Quartulli Date: Tue May 13 01:17:22 2025 +0200 ovpn: fix check for skb_to_sgvec_nomark() return value Depending on the data offset, skb_to_sgvec_nomark() may use less scatterlist elements than what was forecasted by the previous call to skb_cow_data(). It specifically happens when 'skbheadlen(skb) < offset', because in this case we entirely skip the skb's head, which would have required its own scatterlist element. For this reason, it doesn't make sense to check that skb_to_sgvec_nomark() returns the same value as skb_cow_data(), but we can rather check for errors only, as it happens in other parts of the kernel. Signed-off-by: Antonio Quartulli commit 0ca74dfabdfe9c6274b11554adc46b79d6f44955 Author: Antonio Quartulli Date: Fri May 9 15:32:13 2025 +0200 ovpn: improve 'no route to host' debug message When debugging a 'no route to host' error it can be beneficial to know the address of the unreachable destination. Print it along the debugging text. While at it, add a missing parenthesis in a different debugging message inside ovpn_peer_endpoints_update(). Signed-off-by: Antonio Quartulli commit adcdaac57d3ccb38f2f1b0a8da31b5c1403385f0 Author: Antonio Quartulli Date: Wed Apr 30 02:35:18 2025 +0200 ovpn: drop useless reg_state check in keepalive worker The keepalive worker is cancelled before calling unregister_netdevice_queue(), therefore it will never hit a situation where the reg_state can be different than NETDEV_REGISTERED. For this reason, checking reg_state is useless and the condition can be removed. Signed-off-by: Antonio Quartulli commit 944f8b6abab6a456254cf9617131144adac1a506 Author: Antonio Quartulli Date: Tue May 6 15:01:00 2025 +0200 selftest/net/ovpn: extend coverage with more test cases To increase code coverage, extend the ovpn selftests with the following cases: * connect UDP peers using a mix of IPv6 and IPv4 at the transport layer * run full test with tunnel MTU equal to transport MTU (exercising IP layer fragmentation) * ping "LAN IP" served by VPN peer ("LAN behind a client" test case) Signed-off-by: Antonio Quartulli commit 47e8e9d29eaae43abbb2e1ac202545249792f6f2 Author: Antonio Quartulli Date: Wed May 7 14:26:30 2025 +0200 ovpn: fix ndo_start_xmit return value on error ndo_start_xmit is basically expected to always return NETDEV_TX_OK. However, in case of error, it was currently returning NET_XMIT_DROP, which is not a valid netdev_tx_t return value, leading to misinterpretation. Change ndo_start_xmit to always return NETDEV_TX_OK to signal back to the caller that the packet was handled (even if dropped). Effects of this bug can be seen when sending IPv6 packets having no peer to forward them to: $ ip netns exec ovpn-server oping -c20 fd00:abcd:220:201::1 PING fd00:abcd:220:201::1 (fd00:abcd:220:201::1) 56 bytes of data.00:abcd:220:201 :1 ping_send failed: No buffer space available ping_sendto: No buffer space available ping_send failed: No buffer space available ping_sendto: No buffer space available ... Fixes: c2d950c4672a ("ovpn: add basic interface creation/destruction/management routines") Reported-by: Gert Doering Closes: https://github.com/OpenVPN/ovpn-net-next/issues/5 Tested-by: Gert Doering Acked-by: Gert Doering Link: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31591.html Signed-off-by: Antonio Quartulli commit 8624daf9f27dc9c58e266319b44d5c0f8d6a67df Author: Antonio Quartulli Date: Tue May 6 14:56:54 2025 +0200 selftest/net/ovpn: fix crash in case of getaddrinfo() failure getaddrinfo() may fail with error code different from EAI_FAIL or EAI_NONAME, however in this case we still try to free the results object, thus leading to a crash. Fix this by bailing out on any possible error. Fixes: 959bc330a439 ("testing/selftests: add test tool and scripts for ovpn module") Signed-off-by: Antonio Quartulli commit 4ca6438da45688dae5c5958f640560f9496f21a4 Author: Antonio Quartulli Date: Wed May 7 09:58:31 2025 +0200 ovpn: don't drop skb's dst when xmitting packet When routing a packet to a LAN behind a peer, ovpn needs to inspect the route entry that brought the packet there in the first place. If this packet is truly routable, the route entry provides the GW to be used when looking up the VPN peer to send the packet to. However, the route entry is currently dropped before entering the ovpn xmit function, because the IFF_XMIT_DST_RELEASE priv_flag is enabled by default. Clear the IFF_XMIT_DST_RELEASE flag during interface setup to allow the route entry (skb's dst) to survive and thus be inspected by the ovpn routing logic. Fixes: a3aaef8cd173 ("ovpn: implement peer lookup logic") Reported-by: Gert Doering Closes: https://github.com/OpenVPN/ovpn-net-next/issues/2 Tested-by: Gert Doering Acked-by: Gert Doering # as a primary user Link: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31583.html Signed-off-by: Antonio Quartulli commit 4e51141f1dce46189b347e59d008b7ca01044bf5 Author: Antonio Quartulli Date: Tue May 6 01:05:01 2025 +0200 ovpn: set skb->ignore_df = 1 before sending IPv6 packets out IPv6 user packets (sent over the tunnel) may be larger than the outgoing interface MTU after encapsulation. When this happens ovpn should allow the kernel to fragment them because they are "locally generated". To achieve the above, we must set skb->ignore_df = 1 so that ip6_fragment() can be made aware of this decision. Failing to do so will result in ip6_fragment() dropping the packet thinking it was "routed". No change is required in the IPv4 path, because when calling udp_tunnel_xmit_skb() we already pass the 'df' argument set to 0, therefore the resulting datagram is allowed to be fragmented if need be. Fixes: 08857b5ec5d9 ("ovpn: implement basic TX path (UDP)") Reported-by: Gert Doering Closes: https://github.com/OpenVPN/ovpn-net-next/issues/3 Tested-by: Gert Doering Acked-by: Gert Doering # as primary user Link: https://mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31577.html Signed-off-by: Antonio Quartulli commit 142e17cfb09ec0f1e8f09de25e81061b1b827da4 Author: Antonio Quartulli Date: Tue Apr 22 22:52:35 2025 +0200 MAINTAINERS: update git URL for ovpn Signed-off-by: Antonio Quartulli commit 8170a0c968f41dc8f29b7b52b714cae690267d51 Author: Antonio Quartulli Date: Thu Apr 17 21:25:36 2025 +0200 MAINTAINERS: add Sabrina as official reviewer for ovpn Sabrina put quite some effort in reviewing the ovpn module during its official submission to netdev. For this reason she obtain extensive knowledge of the module architecture and implementation. Make her an official reviewer, so that I can be supported in reviewing and acking new patches. Acked-by: Sabrina Dubroca Reviewed-by: Andrew Lunn Signed-off-by: Antonio Quartulli commit e24431a2bc20313b25f75852511381ea664d45bc Merge: 10465365f3b094 82534f446daa0d Author: Paolo Abeni Date: Thu May 15 12:59:20 2025 +0200 Merge branch 'eth-fbnic-add-devlink-dev-flash-support' Lee Trager says: ==================== eth: fbnic: Add devlink dev flash support fbnic supports updating firmware using signed PLDM images. PLDM images are written into the flash. Flashing does not interrupt the operation of the device. V4: https://lore.kernel.org/netdev/20250510002851.3247880-1-lee@trager.us/T/#t V3: https://lore.kernel.org/lkml/20241111043058.1251632-1-lee@trager.us/T/ V2: https://lore.kernel.org/all/20241022013941.3764567-1-lee@trager.us/ ==================== Link: https://patch.msgid.link/20250512190109.2475614-1-lee@trager.us Signed-off-by: Paolo Abeni commit 82534f446daa0d2a995c9d64697add7265dff625 Author: Lee Trager Date: Mon May 12 11:54:01 2025 -0700 eth: fbnic: Add devlink dev flash support Add support to update the CMRT and control firmware as well as the UEFI driver on fbnic using devlink dev flash. Make sure the shutdown / quiescence paths like suspend take the devlink lock to prevent them from interrupting the FW flashing process. Signed-off-by: Lee Trager Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250512190109.2475614-6-lee@trager.us Signed-off-by: Paolo Abeni commit 2a4ada8a99e6ba3dd0399c36b572579b4526bac0 Author: Lee Trager Date: Mon May 12 11:54:00 2025 -0700 eth: fbnic: Add mailbox support for PLDM updates Add three new mailbox messages to support PLDM upgrades: * FW_START_UPGRADE - Enables driver to request starting a firmware upgrade by specifying the component to be upgraded and its size. * WRITE_CHUNK - Allows firmware to request driver to send a chunk of data at the specified offset. * FINISH_UPGRADE - Allows firmware to cancel the upgrade process and return an error. Signed-off-by: Lee Trager Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250512190109.2475614-5-lee@trager.us Signed-off-by: Paolo Abeni commit cc083264ad756c2ff34a97da6fce94a9568dffa1 Author: Lee Trager Date: Mon May 12 11:53:59 2025 -0700 eth: fbnic: Add support for multiple concurrent completion messages Extend fbnic mailbox to support multiple concurrent completion messages at once. This enables fbnic to support running multiple operations at once which depend on a response from firmware via the mailbox. Signed-off-by: Lee Trager Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250512190109.2475614-4-lee@trager.us Signed-off-by: Paolo Abeni commit bb7e124e30fd44b29f60086c77eb6242e3b0158f Author: Lee Trager Date: Mon May 12 11:53:58 2025 -0700 eth: fbnic: Accept minimum anti-rollback version from firmware fbnic supports applying firmware which may not be rolled back. This is implemented in firmware however it is useful for the driver to know the minimum supported firmware version. This will enable the driver validate new firmware before it is sent to the NIC. If it is too old the driver can provide a clear message that the version is too old. Signed-off-by: Lee Trager Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250512190109.2475614-3-lee@trager.us Signed-off-by: Paolo Abeni commit e505e140738005715b1b20eb848711b21a1b3c76 Author: Lee Trager Date: Mon May 12 11:53:57 2025 -0700 pldmfw: Don't require send_package_data or send_component_table to be defined Not all drivers require send_package_data or send_component_table when updating firmware. Instead of forcing drivers to implement a stub allow these functions to go undefined. Signed-off-by: Lee Trager Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Jacob Keller Link: https://patch.msgid.link/20250512190109.2475614-2-lee@trager.us Signed-off-by: Paolo Abeni commit 1c4193917eb3279788968639f24d72ffeebdec6b Author: Mohan Kumar D Date: Mon May 12 06:42:58 2025 +0000 ALSA: hda/tegra: Add Tegra264 support Update HDA driver to support Tegra264 differences from legacy HDA, which includes: clocks/resets, always power on, and hardware-managed FPCI/IPFS initialization. The driver retrieves this chip-specific information from soc_data. Signed-off-by: Mohan Kumar D Signed-off-by: Sheetal Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250512064258.1028331-4-sheetal@nvidia.com commit 3bc2f3ba7b4d81523f89dfa369edb56507bd63e6 Author: Sheetal Date: Mon May 12 06:42:57 2025 +0000 dt-bindings: Document Tegra264 HDA Support For Tegra264 device there is one clock, two resets and no power-domain. Add the Tegra264 compatible and necessary logic to the binding doc to determine appropriate clocks, resets and power-domain properties based on the compatible string. Signed-off-by: Sheetal Reviewed-by: Rob Herring (Arm) Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250512064258.1028331-3-sheetal@nvidia.com commit 494475e5e1c11efa77979e421ee7a3d8e5e8f304 Author: Sheetal Date: Mon May 12 06:42:56 2025 +0000 dt-bindings: Update Tegra194 and Tegra234 HDA bindings - Tegra194 and Tegra234 HDA is not compatible with Tegra30, hence update them as standalone compatibles. Also, add necessary logic to the binding doc as HDA clocks and resets for Tegra194 and Tegra234 are different from Tegra30. This fixes below dtbs_check errors: - compatible: 'oneOf' conditional failed, one must be fixed: ['nvidia,tegra194-hda'] is too short 'nvidia,tegra30-hda' was expected 'nvidia,tegra132-hda' was expected - compatible: 'oneOf' conditional failed, one must be fixed: ['nvidia,tegra234-hda'] is too short 'nvidia,tegra30-hda' was expected 'nvidia,tegra132-hda' was expected - hda@3510000: clock-names:1: 'hda2hdmi' was expected - hda@3510000: reset-names:1: 'hda2hdmi' was expected Signed-off-by: Sheetal Reviewed-by: Rob Herring (Arm) Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250512064258.1028331-2-sheetal@nvidia.com commit 10465365f3b094ba9a9795f212d13dee594bcfe7 Author: Dimitri Fedrau Date: Mon May 12 14:03:42 2025 +0200 net: phy: marvell-88q2xxx: Enable temperature measurement in probe again Enabling of the temperature sensor was moved from mv88q2xxx_hwmon_probe to mv88q222x_config_init with the consequence that the sensor is only usable when the PHY is configured. Enable the sensor in mv88q2xxx_hwmon_probe as well to fix this. Signed-off-by: Dimitri Fedrau Link: https://patch.msgid.link/20250512-marvell-88q2xxx-hwmon-enable-at-probe-v4-1-9256a5c8f603@gmail.com Signed-off-by: Paolo Abeni commit 76145cb37ff0636fdf2a15320b2c2421915df32b Merge: 4fae90d04a58cd 4ec373b74e96f9 Author: Christian Brauner Date: Thu May 15 12:14:34 2025 +0200 Merge patch series "Use folios for symlinks in the page cache" Matthew Wilcox (Oracle) says: FUSE already uses folios for its symlinks. Mirror that conversion in the generic code and the NFS code. That lets us get rid of a few folio->page->folio conversions in this path, and some of the few remaining users of read_cache_page() / read_mapping_page(). * patches from https://lore.kernel.org/20250514171316.3002934-1-willy@infradead.org: fs: Pass a folio to page_put_link() nfs: Use a folio in nfs_get_link() fs: Convert __page_get_link() to use a folio Link: https://lore.kernel.org/20250514171316.3002934-1-willy@infradead.org Signed-off-by: Christian Brauner commit 4ec373b74e96f92cf273631d31c82ec53727cf02 Author: Matthew Wilcox (Oracle) Date: Wed May 14 18:13:14 2025 +0100 fs: Pass a folio to page_put_link() All callers now have a folio. Pass it to page_put_link(), saving a hidden call to compound_head(). Also add kernel-doc for page_get_link() and page_put_link(). Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/20250514171316.3002934-4-willy@infradead.org Signed-off-by: Christian Brauner commit cc8e87f312e0d3715d2f5121dff53918a6d6da5f Author: Matthew Wilcox (Oracle) Date: Wed May 14 18:13:13 2025 +0100 nfs: Use a folio in nfs_get_link() Mirror the changes to __page_get_link() by retrieving a folio from the page cache instead of a page. Removes two hidden calls to compound_head(). Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/20250514171316.3002934-3-willy@infradead.org Signed-off-by: Christian Brauner commit 5f152cc012f42e19d40088039c07eec3736b0705 Author: Matthew Wilcox (Oracle) Date: Wed May 14 18:13:12 2025 +0100 fs: Convert __page_get_link() to use a folio Retrieve a folio from the page cache instead of a page and operate on it. Removes two hidden calls to compound_head(). Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/20250514171316.3002934-2-willy@infradead.org Signed-off-by: Christian Brauner commit 4fae90d04a58cd9882c5158b6b1d22d0cf544fc0 Merge: e0410e956b97e8 2e1a8fbff51bb9 Author: Christian Brauner Date: Thu May 15 12:03:18 2025 +0200 Merge patch series "include/linux/fs.h: add inode_lock_killable()" Try and make a few filesystem operations killable on the VFS inode->i_mutex level. * patches from https://lore.kernel.org/20250513150327.1373061-1-max.kellermann@ionos.com: fs/read_write: make default_llseek() killable fs/open: make do_truncate() killable fs/open: make chmod_common() and chown_common() killable include/linux/fs.h: add inode_lock_killable() Link: https://lore.kernel.org/20250513150327.1373061-1-max.kellermann@ionos.com Signed-off-by: Christian Brauner commit 2e1a8fbff51bb9bdf0fe9c6602855e308efcfcdb Author: Max Kellermann Date: Tue May 13 17:03:27 2025 +0200 fs/read_write: make default_llseek() killable Allows killing processes that are waiting for the inode lock. Signed-off-by: Max Kellermann Link: https://lore.kernel.org/20250513150327.1373061-4-max.kellermann@ionos.com Signed-off-by: Christian Brauner commit d68687564280b09d80e7cf8ce20bb71880586d3a Author: Max Kellermann Date: Tue May 13 17:03:26 2025 +0200 fs/open: make do_truncate() killable Allows killing processes that are waiting for the inode lock. Signed-off-by: Max Kellermann Link: https://lore.kernel.org/20250513150327.1373061-3-max.kellermann@ionos.com Signed-off-by: Christian Brauner commit 28a3f6ab2fe0c8275680dff228957474d74fdc94 Author: Max Kellermann Date: Tue May 13 17:03:25 2025 +0200 fs/open: make chmod_common() and chown_common() killable Allows killing processes that are waiting for the inode lock. Signed-off-by: Max Kellermann Link: https://lore.kernel.org/20250513150327.1373061-2-max.kellermann@ionos.com Signed-off-by: Christian Brauner commit d8c5507cd140d9471472ece673e70250b957c595 Author: Max Kellermann Date: Tue May 13 17:03:24 2025 +0200 include/linux/fs.h: add inode_lock_killable() Prepare for making inode operations killable while they're waiting for the lock. Signed-off-by: Max Kellermann Link: https://lore.kernel.org/20250513150327.1373061-1-max.kellermann@ionos.com Signed-off-by: Christian Brauner commit 12cbd157344848b1bd726ecadce27532d79b785a Author: Frank Li Date: Tue Apr 29 01:42:34 2025 -0400 i3c: master: svc: skip address resend on repeat START According to the I3C specification, address arbitration only happens during the START. Repeated START do not initiate arbitration, and In-Band Interrupts (IBIs) cannot occur at this stage. Resending the address upon a NACK in a repeat START is therefore redundant and unnecessary. Avoid redundant retries, improving efficiency and ensuring protocol compliance. Signed-off-by: Frank Li Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20250429054234.4013929-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 81f2a9af982120104d5e9211b15f3a83281972c1 Author: Stanley Chu Date: Tue Apr 15 13:18:08 2025 +0800 i3c: master: svc: Emit STOP asap in the IBI transaction Queuing the IBI request does not need to be done earlier than emitting the STOP. Emitting STOP immediately after receiving the IBI request can complete the IBI transaction earlier and return the bus to idle. Signed-off-by: Stanley Chu Reviewed-by: Frank Li Acked-by: Miquel Raynal Link: https://lore.kernel.org/r/20250415051808.88091-3-yschu@nuvoton.com Signed-off-by: Alexandre Belloni commit 8d29fa6d921ca4f9f63f73598833e53ece1d3b4e Author: Stanley Chu Date: Tue Apr 15 13:18:07 2025 +0800 i3c: master: svc: Receive IBI requests in interrupt context Moving the job from workqueue to ISR for two reasons. 1. Improve bus utilization. If the requests are postponed to be received in the workqueue thread, the SDA line remains low for a long time while the system loading is high. During this period, the bus is not available for other targets to raise requests. 2. Ensure prompt response to requests. For timing-critical requests, the target may encouter a failure or the event is missed if the request is not received in time. IBI request is short, ISR can receive the data quickly and then queue a work to handle it in the bottom half. Signed-off-by: Stanley Chu Reviewed-by: Frank Li Acked-by: Miquel Raynal Link: https://lore.kernel.org/r/20250415051808.88091-2-yschu@nuvoton.com Signed-off-by: Alexandre Belloni commit 4a5883a5861589d486f768df2630f79c1d1e0c45 Merge: dd4eb861d0521a db13e3d58c682e Author: Mark Brown Date: Thu May 15 11:43:58 2025 +0200 cs35l56: Log tuning unique identifiers during firmware Merge series from Simon Trimmer : These two patches introduce a log message when provisioning the cs35l56 family of devices that uniquely identifies the firmware tuning. commit dd4eb861d0521acca1b7e07683a7e90b2e01f66a Merge: 723059ee896f9f c8e7d528284a0b Author: Mark Brown Date: Thu May 15 11:43:48 2025 +0200 ASoC: codecs: add support for ES8389 Merge series from Zhang Yi : The driver is for codec ES8389 of everest-semi. commit db6b8b9bafa741faaf174751e3342a64483b8039 Merge: fea017a99ba5e2 794056966da84f Author: Jonathan Corbet Date: Thu May 15 03:41:15 2025 -0600 Merge tag 'Chinese-doc-6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs/linux into docs-mw Chinese translation docs for 6.16-rc1 from Alex Shi This is the Chinese translation subtree for 6.16-rc1. It just includes few changes: - MAINTAINERS: Change Yanteng's email address - docs/zh_CN: Add how-to of Chinese translation - Add networking translation index - Docs/zh_CN: Translate msg_zerocopy.rst to Simplified Chinese Signed-off-by: Alex Shi commit bd916806632d1a22a10a30d5ab7cce549791a563 Author: Jarkko Nikula Date: Wed Apr 9 17:04:01 2025 +0300 i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler Move "unexpected INTR_STATUS" error print before calling the IO handler as it is more consistent that way. Otherwise it may be confusing if generic interrupt related prints are mixed with IO handler prints. Since this error print is more indication of missing code rather than runtime error downgrade it to dev_warn_once(). Reviewed-by: Frank Li Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250409140401.299251-5-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 7479d2675c50a53ff802fad2e8176f830e342bb1 Author: Jarkko Nikula Date: Wed Apr 9 17:04:00 2025 +0300 i3c: mipi-i3c-hci: Change name of INTR_STATUS bit 11 INTR_STATUS bit 11 INTR_HC_RESET_CANCEL was probably projected for the MIPI I3C HCI specification version 2 but was not ever implemented. This bit is first time specified in the v1.2 as HC_SEQ_CANCEL_STAT "Host Controller Cancelled Transaction Sequence". Update the definition and debug print of it accordingly. While at it, change DBG() print to dev_dbg(). Reviewed-by: Frank Li Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250409140401.299251-4-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit a7035a8ee96648bfbd2cd747308bca41122500ab Author: Jarkko Nikula Date: Wed Apr 9 17:03:59 2025 +0300 i3c: mipi-i3c-hci: Clear INTR_STATUS unconditionally Status fields in INTR_STATUS register are write 1 to clear so do it unconditionally and move clearing of them out of an if block. Suggested-by: Frank Li Signed-off-by: Jarkko Nikula Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250409140401.299251-3-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 279c24021b838e76ca8441e9446e0ab45271153a Author: Jarkko Nikula Date: Wed Apr 9 17:03:58 2025 +0300 i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() Return IRQ_HANDLED from the i3c_hci_irq_handler() only if some INTR_STATUS bit was set or if DMA/PIO handler handled it. Currently it returns IRQ_HANDLED in case INTR_STATUS is zero and IO handler returns false. Which could be the case if interrupt comes from other device or is spurious. Reviewed-by: Frank Li Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250409140401.299251-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit eeeec6c5475e914157feab00bdcaed79132e47a2 Author: Jarkko Nikula Date: Wed Apr 9 17:03:57 2025 +0300 i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Since MIPI I3C HCI specification version v0.8 INTR_STATUS bits 9:0 are reserved. Version v0.5 has bits 9 and 5:0 in use but not handled by the current driver code and not needed in DMA transfers. PIO transfers with v0.5 would require changes to both core.c: i3c_hci_irq_handler() and pio.c: hci_pio_irq_handler() though. For these reasons don't enable signal updates from INTR_STATUS bits 9:0. It allow to get rid of "unexpected INTR_STATUS" error messages on old v0.5 IP version and is a no-op for later versions starting from v0.8. Signed-off-by: Jarkko Nikula Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250409140401.299251-1-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit e0410e956b97e8b50b2aa7b02ba70e5f09b31ebe Author: Miklos Szeredi Date: Tue May 13 17:10:08 2025 +0200 readdir: supply dir_context.count as readdir buffer size hint This is a preparation for large readdir buffers in fuse. Simply setting the fuse buffer size to the userspace buffer size should work, the record sizes are similar (fuse's is slightly larger than libc's, so no overflow should ever happen). Signed-off-by: Miklos Szeredi Signed-off-by: Jaco Kroon Link: https://lore.kernel.org/20250513151012.1476536-1-mszeredi@redhat.com Signed-off-by: Christian Brauner commit 5fbfae69e78d242c5efb2a4b62eeea883af145ee Author: Manivannan Sadhasivam Date: Mon May 5 19:54:42 2025 +0530 PCI: qcom-ep: Mask PTM_UPDATING interrupt When PTM is enabled, PTM_UPDATING interrupt will be fired for each PTM context update, which will be once every 10ms in the case of auto context update. Since the interrupt is not strictly needed for making use of PTM, mask it to avoid the overhead of processing it. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Link: https://patch.msgid.link/20250505-pcie-ptm-v4-4-02d26d51400b@linaro.org commit 852a1fdd34a82d719bd67a55111f13a72891a868 Author: Manivannan Sadhasivam Date: Mon May 5 19:54:41 2025 +0530 PCI: dwc: Add debugfs support for PTM context Synopsys Designware PCIe IPs support PTM capability as defined in the PCIe spec r6.0, sec 6.21. The PTM context information is exposed through Vendor Specific Extended Capability (VSEC) registers on supported controller implementation. Hence, add support for exposing these context information to userspace through the debugfs interface for the DWC controllers (both RC and EP). Currently, only Qcom controllers are supported. For adding support for other DWC vendor controllers, dwc_pcie_ptm_vsec_ids[] needs to be extended. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Link: https://patch.msgid.link/20250505-pcie-ptm-v4-3-02d26d51400b@linaro.org commit 87a9d0cd6748b658a0c8f8c957c3260ed901f094 Author: Manivannan Sadhasivam Date: Mon May 5 19:54:40 2025 +0530 PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init() Upcoming PTM debugfs interface relies on the DWC PCIe mode to expose the relevant debugfs attributes to userspace. So pass the mode to dwc_pcie_debugfs_init() API from host and ep drivers and save it in 'struct dw_pcie::mode'. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Link: https://patch.msgid.link/20250505-pcie-ptm-v4-2-02d26d51400b@linaro.org commit 132833405e61463d47d6badff1b8080b09b5808e Author: Manivannan Sadhasivam Date: Mon May 5 19:54:39 2025 +0530 PCI: Add debugfs support for exposing PTM context Precision Time Management (PTM) mechanism defined in PCIe spec r6.0, sec 6.21 allows precise coordination of timing information across multiple components in a PCIe hierarchy with independent local time clocks. PCI core already supports enabling PTM in the root port and endpoint devices through PTM Extended Capability registers. But the PTM context supported by the PTM capable components such as Root Complex (RC) and Endpoint (EP) controllers were not exposed as of now. Part of the reason is that the spec doesn't define how the context information is exposed to the software and left it to the vendor implementation. So there is no standardized way to get access to the context information and each vendor have defined their own way. This commit adds debugfs support to expose the PTM context to userspace from both PCIe RC and EP controllers. Since the context information is exposed in a vendor specific way, the debugfs interface allows the controller drivers to implement callbacks for each attribute, to be called by the generic PTM driver. The Controller drivers are expected to call pcie_ptm_create_debugfs() to create the debugfs attributes for the PTM context and call pcie_ptm_destroy_debugfs() to destroy them. The drivers should also populate the relevant callbacks in the 'struct pcie_ptm_ops' structure based on the controller implementation. Below PTM context are exposed through debugfs: PCIe RC ======= 1. PTM Local clock 2. PTM T2 timestamp 3. PTM T3 timestamp 4. PTM Context valid PCIe EP ======= 1. PTM Local clock 2. PTM T1 timestamp 3. PTM T4 timestamp 4. PTM Master clock 5. PTM Context update Signed-off-by: Manivannan Sadhasivam [kwilczynski: fix overflow issue reported by Dan Carpenter from https://lore.kernel.org/linux-pci/b41c1754-c6b7-4805-9f14-7c643d6c5304@suswa.mountain] Signed-off-by: Krzysztof Wilczyński Link: https://patch.msgid.link/20250505-pcie-ptm-v4-1-02d26d51400b@linaro.org commit e7b9cea718eee4585a947b10086ca51ad27ef5d4 Author: Yafang Shao Date: Sun May 11 16:36:24 2025 +0800 vfs: Add sysctl vfs_cache_pressure_denom for bulk file operations On our HDFS servers with 12 HDDs per server, a HDFS datanode[0] startup involves scanning all files and caching their metadata (including dentries and inodes) in memory. Each HDD contains approximately 2 million files, resulting in a total of ~20 million cached dentries after initialization. To minimize dentry reclamation, we set vfs_cache_pressure to 1. Despite this configuration, memory pressure conditions can still trigger reclamation of up to 50% of cached dentries, reducing the cache from 20 million to approximately 10 million entries. During the subsequent cache rebuild period, any HDFS datanode restart operation incurs substantial latency penalties until full cache recovery completes. To maintain service stability, we need to preserve more dentries during memory reclamation. The current minimum reclaim ratio (1/100 of total dentries) remains too aggressive for our workload. This patch introduces vfs_cache_pressure_denom for more granular cache pressure control. The configuration [vfs_cache_pressure=1, vfs_cache_pressure_denom=10000] effectively maintains the full 20 million dentry cache under memory pressure, preventing datanode restart performance degradation. Link: https://hadoop.apache.org/docs/r1.2.1/hdfs_design.html#NameNode+and+DataNodes [0] Signed-off-by: Yafang Shao Link: https://lore.kernel.org/20250511083624.9305-1-laoar.shao@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 8d9117009dd690f647a66912f429c96335069907 Author: Miklos Szeredi Date: Tue May 13 13:23:31 2025 +0200 fuse: don't allow signals to interrupt getdents copying When getting the directory contents, the entries are first fetched to a kernel buffer, then they are copied to userspace with dir_emit(). This second phase is non-blocking as long as the userspace buffer is not paged out, making it interruptible makes zero sense. Overload d_type as flags, since it only uses 4 bits from 32. Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/20250513112335.1473177-1-mszeredi@redhat.com Signed-off-by: Christian Brauner commit 2389d8dc38fee18176c49e9c4804f5ecc55807fa Author: Ilpo Järvinen Date: Tue Apr 22 14:55:47 2025 +0300 PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag PCIe BW controller counted LBMS assertions for the purposes of the Target Speed quirk (pcie_failed_link_retrain()). It was also a plan to expose the LBMS count through sysfs to allow better diagnosing link related issues. Lukas Wunner suggested, however, that adding a trace event would be better for diagnostics purposes, leaving only pcie_failed_link_retrain() as a user of the lbms_count. The logic in pcie_failed_link_retrain() does not require keeping count of LBMS assertions, so replace lbms_count with a simple flag in pci_dev's priv_flags. The reduced complexity allows removing pcie_bwctrl_lbms_rwsem. Since pcie_failed_link_retrain() runs before bwctrl is probed during boot, the LBMS in Link Status register still has to be checked by the quirk. The priv_flags numbering is not continuous because hotplug code added a few flags to fill numbers 4-5 (hotplug and bwctrl changes are routed through in different branches). Suggested-by: Lukas Wunner Signed-off-by: Ilpo Järvinen [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas [kwilczynski: squashed a fix to resolve build failures from https://lore.kernel.org/all/20250508090036.1528-1-ilpo.jarvinen@linux.intel.com] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Lukas Wunner Link: https://patch.msgid.link/20250422115548.1483-1-ilpo.jarvinen@linux.intel.com commit c82b48b63a939e9b0f40bd00f95bcea4502fcada Author: Leon Romanovsky Date: Tue May 13 13:59:19 2025 +0300 xfrm: prevent configuration of interface index when offload is used Both packet and crypto offloads perform decryption while packet is arriving to the HW from the wire. It means that there is no possible way to perform lookup on XFRM if_id as it can't be set to be "before' HW. So instead of silently ignore this configuration, let's warn users about misconfiguration. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit e86212b6b13a20c5ad404c5597933f57fd0f1519 Author: Leon Romanovsky Date: Tue May 13 13:56:22 2025 +0300 xfrm: validate assignment of maximal possible SEQ number Users can set any seq/seq_hi/oseq/oseq_hi values. The XFRM core code doesn't prevent from them to set even 0xFFFFFFFF, however this value will cause for traffic drop. Is is happening because SEQ numbers here mean that packet with such number was processed and next number should be sent on the wire. In this case, the next number will be 0, and it means overflow which causes to (expected) packet drops. While it can be considered as misconfiguration and handled by XFRM datapath in the same manner as any other SEQ number, let's add validation to easy for packet offloads implementations which need to configure HW with next SEQ to send and not with current SEQ like it is done in core code. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit 29552dcc044a233be84ab9b64539fdc7d8f4314e Author: Chen-Yu Tsai Date: Thu May 15 15:38:23 2025 +0800 ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg() mt8183_is_volatile_reg() is a large switch-case block that lists out every register that is volatile. Since many pairs of registers have consecutive addresses, the cases can be compressed down with the ellipsis, i.e. GCC extension "case ranges" [1] to cover more addresses in one case, shortening the source code. This is not completely the same, since the addresses are 4-byte aligned, and using the case ranges feature adds all unaligned addresses in between. In practice this doesn't matter since the unaligned addresses are blocked by the regmap core. This also ends up compiling slightly smaller with a reduction of 128 bytes in the text section. [1] https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250515073825.4155297-4-wenst@chromium.org Signed-off-by: Mark Brown commit 0be889823f93429dab396cb7ac061d02046bd962 Author: Chen-Yu Tsai Date: Thu May 15 15:38:22 2025 +0800 ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data table using macros The irq_data table describes all the supported interrupts for the audio frontend. The parameters are either the same or can be derived from the interrupt number. This results in a very long table (in source code) that can be shortened with macros. Do just that. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250515073825.4155297-3-wenst@chromium.org Signed-off-by: Mark Brown commit 91c2685430f217ae8f2866e4372948eaf123b5c4 Author: Chen-Yu Tsai Date: Thu May 15 15:38:21 2025 +0800 ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros The memif_data table describes all the supported PCM channels for the audio frontend. Most of the fields are either the same or can be derived from the interface's name. This results in a very long table (in source code) that can be shortened with macros. Do just that. Some "convenience" macros were added to cover non-existent register fields that would otherwise require multiple layers of macros to handle. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250515073825.4155297-2-wenst@chromium.org Signed-off-by: Mark Brown commit f09222980d775199de2f5d739cf453f7bf39aa4a Author: Chen Linxuan Date: Tue May 13 12:20:49 2025 +0800 fs: fuse: add dev id to /dev/fuse fdinfo This commit add fuse connection device id to fdinfo of opened /dev/fuse files. Related discussions can be found at links below. Link: https://lore.kernel.org/all/CAJfpegvEYUgEbpATpQx8NqVR33Mv-VK96C+gbTag1CEUeBqvnA@mail.gmail.com/ Signed-off-by: Chen Linxuan Signed-off-by: Miklos Szeredi commit 4614fd6342ab69feebb067d5db84a9bfb9aada9f Author: Vishwaroop A Date: Tue May 13 20:00:42 2025 +0000 spi: dt-bindings: tegra: Document IOMMU property for Tegra234 QSPI Add the 'iommus' property to the Tegra QSPI device tree binding. The property is needed for Tegra234 when using the internal DMA controller, and is not supported on other Tegra chips, as DMA is handled by an external controller. Signed-off-by: Vishwaroop A Acked-by: Conor Dooley Reviewed-by: Jon Hunter Link: https://patch.msgid.link/20250513200043.608292-1-va@nvidia.com Signed-off-by: Mark Brown commit 017f1b0bae08e8b456cf35cbdaae93ec19b50f0a Author: Vishwaroop A Date: Tue May 13 20:00:43 2025 +0000 spi: tegra210-quad: Add support for internal DMA Add support for internal DMA in Tegra234 devices. Tegra234 has an internal DMA controller, while Tegra241 continues to use an external DMA controller (GPCDMA). This patch adds support for both internal and external DMA controllers. Signed-off-by: Vishwaroop A Reviewed-by: Jon Hunter Link: https://patch.msgid.link/20250513200043.608292-2-va@nvidia.com Signed-off-by: Mark Brown commit 723059ee896f9f302cfd36f49eac192ed4cfd3e1 Author: Konrad Dybcio Date: Wed May 14 19:53:38 2025 +0200 ASoC: q6apm-lpass-dais: Print APM port id in decimal on enable error Change the port enable failure error message format specifier to make it less confusing. Take the chance to align the style ('fail'->'Failed') while at it. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250514-topic-asoc_print_hexdec-v1-1-85e90947ec4f@oss.qualcomm.com Signed-off-by: Mark Brown commit 25219c2578b32c96087569d074e32c8ae634d602 Author: Ard Biesheuvel Date: Wed May 14 12:42:46 2025 +0200 x86/asm-offsets: Export certain 'struct cpuinfo_x86' fields for 64-bit asm use too Expose certain 'struct cpuinfo_x86' fields via asm-offsets for x86_64 too, so that it will be possible to set CPU capabilities from 64-bit asm code. 32-bit already used these fields, so simply move those offset exports into the unified asm-offsets.c file. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250514104242.1275040-12-ardb+git@google.com commit 379f7682d062a6574545f9bc31d5e2b73cf32996 Author: Miri Korenblit Date: Sun May 11 19:53:21 2025 +0300 wifi: iwlwifi: mld: allow 2 ROCs on the same vif In the current code, if an ROC is started on a vif that already has an active ROC we reject it and warn. But really there is no such limitation. The actual limitation is to not have 2 ROCs of the same type simultaneously. Add a helper function to find a vif that has an active ROC of a given type, and only if one exist - reject the ROC. This allows also to remove bss_roc_vif. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.1f8c55198578.I17cb191596ed4e97a4854108f8ca5ca197662a62@changeid commit 11e9f4263cbdb7de9f69a9a4f343def478eaa421 Author: Johannes Berg Date: Sun May 11 19:53:20 2025 +0300 wifi: iwlwifi: fw: api: include required headers in rs/location Various headers are required for these to build properly. Include the needed files. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.956281013349.I4c537dffb82f5e5042e4a880cde3c6da38a56cbc@changeid commit 22a67414f4bae22c21c82ebb1b65d40280b4ef59 Author: Miri Korenblit Date: Sun May 11 19:53:19 2025 +0300 wifi: iwlwifi: rename ctx-info-gen3 to ctx-info-v2 Context info was introduced in 22000, and was significantly changed in ax210. The new version of context info was called 'gen3', probably because in 22000, the gen2 transport was added. But this name is just wrong: - if 'gen' enumerates transports, there was not a gen3 transport, just a few modifications to gen1/2 transports needed for ax210. - if 'gen' enumerates devices, then we can just use the device names. Also, context info will soon become a lib, agnostic of the transport generations. Simply replace 'gen3' with 'v2'. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.a580bd8d4f74.Ie413a02233f1a5ad538e13071c09760b9d97be3b@changeid commit f60c366794314a7f2f622837dfdf874e119d4b19 Author: Miri Korenblit Date: Sun May 11 19:53:18 2025 +0300 wifi: iwlwifi: fix a wrong comment iwl_pcie_apply_destination is used in all generation. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.7eaf79a07226.I615cfd21001208b366c94a5fcb8e30a7d97f0ac2@changeid commit 737ed29a1cfafe2b87e7e6c98650139d878e6740 Author: Miri Korenblit Date: Sun May 11 19:53:17 2025 +0300 wifi: iwlwifi: map iwl_context_info to the matching struct Map iwl_context_info to the matching struct in the FW. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.a7240935006e.I75e2e13421b5dac2c1bdbd01fdfd34c38f2d3d8c@changeid commit 5619221bf636a5f5246e054224ac9dd5e9f74354 Author: Miri Korenblit Date: Sun May 11 19:53:16 2025 +0300 wifi: iwlwifi: remove unused macro TFD_QUEUE_SIZE_MAX_GEN3 is not used, remove it. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.a0154cca6afb.Ifb4915e0acd51be6a75d33a8b96b3f7b0928b312@changeid commit c700a942493921eb750708d69a2496cfdb0f386e Author: Miri Korenblit Date: Sun May 11 19:53:15 2025 +0300 wifi: iwlwifi: unify iwlagn_scd_bc_tbl_entry and iwl_gen3_bc_tbl_entry As those are now the same, unify and adjust the documentation. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.b7ddfade8fec.I2bf97252c4bd751077ade204767eed02d815614d@changeid commit 6204d5130a64d16c3f97e2dfe43c606eb3a195b3 Author: Miri Korenblit Date: Sun May 11 19:53:14 2025 +0300 wifi: iwlwifi: use bc entries instead of bc table also for pre-ax210 iwlagn_scd_bc_tbl is used for pre-ax210 devices, and iwl_gen3_bc_tbl_entry is used for ax210 and on. But there is no difference between the the 22000 version and the AX210+ one. In order to unify the two, as first step make iwlagn_scd_bc_tbl an entry as well, and adjust the code. In a later patch both structures will be unified. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.645cd82ebf48.Iaa7e88179372d60ef31157e379737b5babe54012@changeid commit f74cb4d02cd7746a4902f27926da10283e12fd79 Author: Miri Korenblit Date: Sun May 11 19:53:13 2025 +0300 wifi: iwlwifi: remove GEN3 from a couple of macros 'GEN3' here really means 'AX210'. Rename. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.b7fb5b854ded.Ib52b84c6e36e312b2eeb84a3cf71c6185fb52ee7@changeid commit 1c97c73cdab0afc47465791b7b793141eada85eb Author: Miri Korenblit Date: Sun May 11 19:53:12 2025 +0300 wifi: iwlwifi: use normal versioning convention for iwl_tx_cmd We have iwl_tx_cmd for devices older than 22000, iwl_tx_cmd_gen2 for 22000 devices, and iwl_tx_cmd_gen3 ax210 and up. But the convention for all other APIs is to have the latest version without any prefix and the older ones - with a _vX prefix, where X is the highest version that this struct support. The term 'gen' was introduced as the name of the (back then) new transport, and should not be used as a device name (for that we have the actual names: 22000, ax210, etc.) Now as a new transport, called 'gen3', is going to be written and it can be confused with this API. Move iwl_tx_cmd to use the regular versioning convention. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.806e40c8f767.Ibc0e95e43a6fa6d47f72823bf804314d5db84618@changeid commit 579724de9ee349b5a110fa9e9f65b53fb6bf834e Author: Miri Korenblit Date: Sun Apr 27 22:22:45 2025 +0300 wifi: iwlwifi: stop supporting TX_CMD_API_S_VER_8 This version is not used on any device. Don't support it. Signed-off-by: Miri Korenblit commit 5e1ff2314797bf53636468a97719a8222deca9ae Author: Jonas Karlman Date: Thu May 1 15:55:50 2025 -0400 media: rkvdec: h264: Support High 10 and 4:2:2 profiles Add support and enable decoding of H264 High 10 and 4:2:2 profiles. Decoded CAPTURE buffer width is aligned to 64 pixels to accommodate HW requirement of 10-bit format buffers, fixes decoding of all the 4:2:2 and 10bit 4:2:2 flusters tests except two stream that present some visual artifacts. - Hi422FREXT17_SONY_A - Hi422FREXT19_SONY_A The get_image_fmt() ops is implemented to select an image format required for the provided SPS control, and returns RKVDEC_IMG_FMT_ANY for other controls. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit d35c64eccf3b15a38a168a8c36096b960e8fbc1d Author: Jonas Karlman Date: Thu May 1 15:55:49 2025 -0400 media: rkvdec: Add get_image_fmt ops Add support for a get_image_fmt() ops that returns the required image format. The CAPTURE format is reset when the required image format changes and the buffer queue is not busy. Signed-off-by: Jonas Karlman Tested-by: Nicolas Dufresne Reviewed-by: Jonas Karlman Co-developed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit d43d7db3c8a1868dcbc6cb8de90a3cdf309d6cbb Author: Nicolas Dufresne Date: Thu May 1 15:55:48 2025 -0400 media: rkvdec: Initialize the m2m context before the controls Setting up the control handler calls into .s_ctrl ops. While validating the controls the ops may need to access some of the context state, which could lead to a crash if not properly initialized. Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 45029d3ee28c6bb85173f21adace914979fa33a6 Author: Sebastian Fricke Date: Thu May 1 15:55:47 2025 -0400 media: rkvdec: h264: Limit minimum profile to constrained baseline Neither the hardware nor the kernel API support FMO/ASO features required by the full baseline profile. Therefore limit the minimum profile to the constrained baseline profile explicitly. Suggested-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 7560349ee0d9441642da6d38c3822d08fffdd2fb Author: Jianhua Lin Date: Thu Apr 24 17:08:24 2025 +0800 media: mediatek: jpeg: support 34bits The HW iommu is able to support a 34-bit iova address-space (16GB), enable this feature for the encoder/decoder driver by shifting the address by two bits and setting the extended address registers. Signed-off-by: Jianhua Lin Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 11beb0fc346e00c412b3bfd19013206f6b655604 Author: Detlev Casanova Date: Fri Apr 25 15:24:47 2025 -0400 media: verisilicon: Free post processor buffers on error During initialization, the post processor allocates the same number of buffers as the buf queue. As the init function is called in streamon(), if an allocation fails, streamon will return an error and streamoff() will not be called, keeping all post processor buffers allocated. To avoid that, all post proc buffers are freed in case of an allocation error. Fixes: 26711491a807 ("media: verisilicon: Refactor postprocessor to store more buffers") Signed-off-by: Detlev Casanova Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 59f94c57b5175cd094f2ded4f0437217bce2447d Author: Dr. David Alan Gilbert Date: Wed Feb 5 02:18:34 2025 +0000 media: platform: mtk-mdp3: Remove unused mdp_get_plat_device mdp_get_plat_device() was added in 2022 but has remained unused. Remove it. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit f15e87340afd4f5a35575e112aa4bdb0a138aa26 Author: Thorsten Blum Date: Mon Feb 10 23:42:44 2025 +0100 powerpc/iommu: Use str_disabled_enabled() helper Remove hard-coded strings by using the str_disabled_enabled() helper. Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250210224246.363318-1-thorsten.blum@linux.dev commit f36a28192e3cbef6952c1b82d4ef78f26a0d2cad Author: Thorsten Blum Date: Fri Jan 17 12:46:20 2025 +0100 powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers Remove hard-coded strings by using the str_enabled_disabled() and str_on_off() helper functions. Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250117114625.64903-2-thorsten.blum@linux.dev commit ff27a9a0c66cfeb6a15d8f2ab4754f312ecd71e7 Author: Thorsten Blum Date: Mon Feb 10 11:06:46 2025 +0100 powerpc/mm/fault: Use str_write_read() helper function Remove hard-coded strings by using the str_write_read() helper function. Signed-off-by: Thorsten Blum Reviewed-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250210100648.1440-2-thorsten.blum@linux.dev commit 7e99a4a60d8fc9b24a3f9632011bf7e197f1aff9 Author: Thorsten Blum Date: Mon Apr 21 20:31:08 2025 +0200 powerpc: Replace strcpy() with strscpy() in proc_ppc64_init() strcpy() is deprecated; use strscpy() instead. Don't cast the destination buffer from 'u8[]' to 'char *' to satisfy the __must_be_array() requirement of strscpy(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250421183110.436265-1-thorsten.blum@linux.dev commit d36e3f11fe8b55b801bdbe84ad51f612b1bd84da Author: Gaurav Batra Date: Mon May 12 17:46:53 2025 -0500 powerpc/pseries/iommu: Fix kmemleak in TCE table userspace view When a device is opened by a userspace driver, via VFIO interface, DMA window is created. This DMA window has TCE Table and a corresponding data for userview of TCE table. When the userspace driver closes the device, all the above infrastructure is free'ed and the device control given back to kernel. Both DMA window and TCE table is getting free'ed. But due to a code bug, userview of the TCE table is not getting free'ed. This is resulting in a memory leak. Befow is the information from KMEMLEAK unreferenced object 0xc008000022af0000 (size 16777216): comm "senlib_unit_tes", pid 9346, jiffies 4294983174 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): kmemleak_vmalloc+0xc8/0x1a0 __vmalloc_node_range+0x284/0x340 vzalloc+0x58/0x70 spapr_tce_create_table+0x4b0/0x8d0 tce_iommu_create_table+0xcc/0x170 [vfio_iommu_spapr_tce] tce_iommu_create_window+0x144/0x2f0 [vfio_iommu_spapr_tce] tce_iommu_ioctl.part.0+0x59c/0xc90 [vfio_iommu_spapr_tce] vfio_fops_unl_ioctl+0x88/0x280 [vfio] sys_ioctl+0xf4/0x160 system_call_exception+0x164/0x310 system_call_vectored_common+0xe8/0x278 unreferenced object 0xc008000023b00000 (size 4194304): comm "senlib_unit_tes", pid 9351, jiffies 4294984116 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): kmemleak_vmalloc+0xc8/0x1a0 __vmalloc_node_range+0x284/0x340 vzalloc+0x58/0x70 spapr_tce_create_table+0x4b0/0x8d0 tce_iommu_create_table+0xcc/0x170 [vfio_iommu_spapr_tce] tce_iommu_create_window+0x144/0x2f0 [vfio_iommu_spapr_tce] tce_iommu_create_default_window+0x88/0x120 [vfio_iommu_spapr_tce] tce_iommu_ioctl.part.0+0x57c/0xc90 [vfio_iommu_spapr_tce] vfio_fops_unl_ioctl+0x88/0x280 [vfio] sys_ioctl+0xf4/0x160 system_call_exception+0x164/0x310 system_call_vectored_common+0xe8/0x278 Fixes: f431a8cde7f1 ("powerpc/iommu: Reimplement the iommu_table_group_ops for pSeries") Signed-off-by: Gaurav Batra Reviewed-by: Nilay Shroff Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250512224653.35697-1-gbatra@linux.ibm.com commit 9748f2f54f66743ac77275c34886a9f890e18409 Author: Sheng Yong Date: Thu May 15 09:48:37 2025 +0800 erofs: avoid using multiple devices with different type For multiple devices, both primary and extra devices should be the same type. `erofs_init_device` has already guaranteed that if the primary is a file-backed device, extra devices should also be regular files. However, if the primary is a block device while the extra device is a file-backed device, `erofs_init_device` will get an ENOTBLK, which is not treated as an error in `erofs_fc_get_tree`, and that leads to an UAF: erofs_fc_get_tree get_tree_bdev_flags(erofs_fc_fill_super) erofs_read_superblock erofs_init_device // sbi->dif0 is not inited yet, // return -ENOTBLK deactivate_locked_super free(sbi) if (err is -ENOTBLK) sbi->dif0.file = filp_open() // sbi UAF So if -ENOTBLK is hitted in `erofs_init_device`, it means the primary device must be a block device, and the extra device is not a block device. The error can be converted to -EINVAL. Fixes: fb176750266a ("erofs: add file-backed mount support") Signed-off-by: Sheng Yong Reviewed-by: Gao Xiang Reviewed-by: Hongbo Li Link: https://lore.kernel.org/r/20250515014837.3315886-1-shengyong1@xiaomi.com Signed-off-by: Gao Xiang commit e11c70ccd5a1143d8d259c8b66e93598278c20d4 Merge: 1faeeb315fdbd0 9b8f32002cddf7 Author: Dave Airlie Date: Thu May 15 13:17:01 2025 +1000 Merge tag 'drm-misc-next-2025-05-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v6.16-rc1: Once more, with async flips. UAPI Changes: - Add IN_FORMATS_ASYNC property, use in i915. Cross-subsystem Changes: - Remove some unused debug code in dma-buf. Core Changes: Driver Changes: - Add Novatek NT37801 panel. - Allow submitting empty commands in amdxdna. - Convert cirrus to use managed request_all_regions. - Move Sitronix from tiny to their own place. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/23ded62c-6a62-4195-9c08-4dfb81eafd72@linux.intel.com commit 4cde0e4224ce70bb6e91930a8850b59194151838 Author: Vladimir Oltean Date: Mon May 12 14:44:22 2025 +0300 net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver cpsw->slaves[slave_no].phy should be equal to netdev->phydev, because it is assigned from phy_attach_direct(). The latter is indirectly called from the two identically named cpsw_slave_open() functions, one in cpsw.c and another in cpsw_new.c. Thus, the driver should not need custom logic to find the PHY, the core can find it, and phy_do_ioctl_running() achieves exactly that. However, that is only the case for cpsw_new and for the cpsw driver in dual EMAC mode. This is explained in more detail in the previous commit. Thus, allow the simpler core logic to execute for cpsw_new, and move cpsw_ndo_ioctl() to cpsw.c. Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20250512114422.4176010-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 36d9b54258098f6ea96a7c400577a17f1c1f9fce Author: Vladimir Oltean Date: Mon May 12 14:44:21 2025 +0300 net: cpsw: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the two cpsw drivers to the new API, so that the ndo_eth_ioctl() path can be removed completely. The cpsw_hwtstamp_get() and cpsw_hwtstamp_set() methods (and their shim definitions, for the case where CONFIG_TI_CPTS is not enabled) must have their prototypes adjusted. These methods are used by two drivers (cpsw and cpsw_new), with vastly different configurations: - cpsw has two operating modes: - "dual EMAC" - enabled through the "dual_emac" device tree property - creates one net_device per EMAC / slave interface (but there is no bridging offload) - "switch mode" - default - there is a single net_device, with two EMACs/slaves behind it (and switching between them happens unbeknownst to the network stack). - cpsw_new always registers one net_device for each EMAC which doesn't have status = "disabled". In terms of switching, it has two modes: - "dual EMAC": default, no switching between ports, no switchdev offload. - "switch mode": enabled through the "switch_mode" devlink parameter, offloads the Linux bridge through switchdev Essentially, in 3 out of 4 operating modes, there is a bijective relation between the net_device and the slave. Timestamping can thus be configured on individual slaves. But in the "switch mode" of the cpsw driver, ndo_eth_ioctl() targets a single slave, designated using the "active_slave" device tree property. To deal with these different cases, the common portion of the drivers, cpsw_priv.c, has the cpsw_slave_index() function pointer, set to separate, identically named cpsw_slave_index_priv() by the 2 drivers. This is all relevant because cpsw_ndo_ioctl() has the old-style phy_has_hwtstamp() logic which lets the PHY handle the timestamping ioctls. Normally, that logic should be obsoleted by the more complex logic in the core, which permits dynamically selecting the timestamp provider - see dev_set_hwtstamp_phylib(). But I have doubts as to how this works for the "switch mode" of the dual EMAC driver, because the core logic only engages if the PHY is visible through ndev->phydev (this is set by phy_attach_direct()). In cpsw.c, we have: cpsw_ndo_open() -> for_each_slave(priv, cpsw_slave_open, priv); // continues on errors -> of_phy_connect() -> phy_connect_direct() -> phy_attach_direct() OR -> phy_connect() -> phy_connect_direct() -> phy_attach_direct() The problem for "switch mode" is that the behavior of phy_attach_direct() called twice in a row for the same net_device (once for each slave) is probably undefined. For sure it will overwrite dev->phydev. I don't see any explicit error checks for this case, and even if there were, the for_each_slave() call makes them non-fatal to cpsw_ndo_open() anyway. I have no idea what is the extent to which this provides a usable result, but the point is: only the last attached PHY will be visible in dev->phydev, and this may well be a different PHY than cpsw->slaves[slave_no].phy for the "active_slave". In dual EMAC mode, as well as in cpsw_new, this should not be a problem. I don't know whether PHY timestamping is a use case for the cpsw "switch mode" as well, and I hope that there isn't, because for the sake of simplicity, I've decided to deliberately break that functionality, by refusing all PHY timestamping. Keeping it would mean blocking the old API from ever being removed. In the new dev_set_hwtstamp_phylib() API, it is not possible to operate on a phylib PHY other than dev->phydev, and I would very much prefer not adding that much complexity for bizarre driver decisions. Final point about the cpsw_hwtstamp_get() conversion: we don't need to propagate the unnecessary "config.flags = 0;", because dev_get_hwtstamp() provides a zero-initialized struct kernel_hwtstamp_config. Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20250512114422.4176010-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b70cb459890b7590c6d909da8c1e7ecfaf6535fb Author: Eric Sandeen Date: Thu Jan 16 12:49:32 2025 -0600 ufs: convert ufs to the new mount API Convert ufs to the new mount API Removed a BUG_ON from show_options(); worst case, it prints a null string where the BUG_ON would have fired. Signed-off-by: Eric Sandeen Signed-off-by: Al Viro commit 20be746bbc18698a8252f0be4fa7dcfb0ed48f90 Author: Al Viro Date: Fri Jan 17 00:53:37 2025 -0500 ufs: reject multiple conflicting -o ufstype=... on mount Have ufs_parse_options() refuse to change an already set flavour, and move the "can't change the flavour" logics on remount there, while we are at it - the only difference is that flavour is already set. Signed-off-by: Al Viro commit f8e77914dac472d6a8a2f4e2d3da67f056581630 Author: Al Viro Date: Thu Jan 16 23:47:14 2025 -0500 ufs: split ->s_mount_opt - don't mix flavour and on-error Signed-off-by: Al Viro commit 510de8363f2c3d8e67fa9dfb2366e821382036e0 Author: Hongbo Li Date: Wed May 7 09:40:15 2025 +0000 erofs: fix file handle encoding for 64-bit NIDs EROFS uses NID to indicate the on-disk inode offset, which can exceed 32 bits. However, the default encode_fh uses the ino32, thus it doesn't work if the image is larger than 128GiB. Let's introduce our own helpers to encode file handles. It's easy to reproduce: 1. prepare an erofs image with nid bigger than U32_MAX 2. mount -t erofs foo.img /mnt/erofs 3. set exportfs with configuration: /mnt/erofs *(rw,sync, no_root_squash) 4. mount -t nfs $IP:/mnt/erofs /mnt/nfs 5. md5sum /mnt/nfs/foo # foo is the file which nid bigger than U32_MAX. # you will get ESTALE error. In the case of overlayfs, the underlying filesystem's file handle is encoded in ovl_fb.fid, which is similar to NFS's case. If the NID of file is larger than U32_MAX, the overlay will get -ESTALE error when calls exportfs_decode_fh. Fixes: 3e917cc305c6 ("erofs: make filesystem exportable") Signed-off-by: Hongbo Li Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20250507094015.14007-1-lihongbo22@huawei.com Signed-off-by: Gao Xiang commit 265e1d5c63e378a0601d3aa33f46e52b74b2b331 Merge: a1dc1deeacbe65 33d4cc81fcd930 Author: Jakub Kicinski Date: Wed May 14 19:32:55 2025 -0700 Merge branch 'misc-drivers-sw-timestamp-changes' Jason Xing says: ==================== misc drivers' sw timestamp changes This series modified three outstanding drivers among more than 100 drivers because the software timestamp generation is too early. The idea of this series is derived from the brief talk[1] with Willem. In conclusion, this series makes the generation of software timestamp near/before kicking the doorbell for drivers. [1]: https://lore.kernel.org/all/681b9d2210879_1f6aad294bc@willemb.c.googlers.com.notmuch/ v2: https://lore.kernel.org/20250508033328.12507-1-kerneljasonxing@gmail.com ==================== Link: https://patch.msgid.link/20250510134812.48199-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit 33d4cc81fcd930fdbcca7ac9e8959225cbec0a5e Author: Jason Xing Date: Sat May 10 21:48:12 2025 +0800 net: stmmac: generate software timestamp just before the doorbell Make sure the call of skb_tx_timestamp is as close as possbile to the doorbell. The patch also adjusts the order of setting SKBTX_IN_PROGRESS and generate software timestamp so that without SOF_TIMESTAMPING_OPT_TX_SWHW being set the software and hardware timestamps will not appear in the error queue of socket nearly at the same time (Please see __skb_tstamp_tx()). Signed-off-by: Jason Xing Link: https://patch.msgid.link/20250510134812.48199-4-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit aaed2789b30763da942bf89f44e025d0254ce6b8 Author: Jason Xing Date: Sat May 10 21:48:11 2025 +0800 net: cxgb4: generate software timestamp just before the doorbell Make sure the call of skb_tx_timestamp is as close as possible to the doorbell. Signed-off-by: Jason Xing Link: https://patch.msgid.link/20250510134812.48199-3-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit 285ad7477559b6b5ceed10ba7ecfed9d17c0e7c6 Author: Jason Xing Date: Sat May 10 21:48:10 2025 +0800 net: atlantic: generate software timestamp just before the doorbell Make sure the call of skb_tx_timestamp is as close as possible to the doorbell. Signed-off-by: Jason Xing Link: https://patch.msgid.link/20250510134812.48199-2-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit a1dc1deeacbe65ebd3968bc4d14f14f8d696b184 Author: Eric Biggers Date: Mon May 12 22:01:42 2025 -0700 net: apple: bmac: use crc32() instead of hand-rolled equivalent The calculation done by bmac_crc(addr) followed by taking the low 6 bits and reversing them is equivalent to taking the high 6 bits from crc32(~0, addr, ETH_ALEN). Just do that instead. Signed-off-by: Eric Biggers Link: https://patch.msgid.link/20250513050142.635391-1-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 88906f55954131ed2d3974e044b7fb48129b86ae Author: Eelco Chaudron Date: Mon May 12 10:08:24 2025 +0200 openvswitch: Stricter validation for the userspace action This change enhances the robustness of validate_userspace() by ensuring that all Netlink attributes are fully contained within the parent attribute. The previous use of nla_parse_nested_deprecated() could silently skip trailing or malformed attributes, as it stops parsing at the first invalid entry. By switching to nla_parse_deprecated_strict(), we make sure only fully validated attributes are copied for later use. Signed-off-by: Eelco Chaudron Reviewed-by: Simon Horman Acked-by: Ilya Maximets Link: https://patch.msgid.link/67eb414e2d250e8408bb8afeb982deca2ff2b10b.1747037304.git.echaudro@redhat.com Signed-off-by: Jakub Kicinski commit 73d952840d9f84d0ba94d21a35b3e8149f5a28ed Author: Heiner Kallweit Date: Sun May 11 23:13:25 2025 +0200 net: phy: remove Kconfig symbol MDIO_DEVRES MDIO_DEVRES is only set where PHYLIB/PHYLINK are set which select MDIO_DEVRES. So we can remove this symbol. Note: Due to circular module dependencies we can't simply make mdio_devres.c part of phylib. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/27cba535-f507-4b32-84a3-0744c783a465@gmail.com Signed-off-by: Jakub Kicinski commit 0aa4024b43a452843980e277327cd36aa0a6dafc Author: Eric Biggers Date: Mon May 12 21:14:02 2025 -0700 net/tg3: use crc32() instead of hand-rolled equivalent The calculation done by calc_crc() is equivalent to ~crc32(~0, buf, len), so just use that instead. Signed-off-by: Eric Biggers Link: https://patch.msgid.link/20250513041402.541527-1-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 685e7b1522f7ba279030fa5d0e984a5781961309 Author: Geert Uytterhoeven Date: Tue May 13 09:33:56 2025 +0200 dt-bindings: net: snps,dwmac: Align mdio node in example with bindings According to the bindings, the MDIO subnode should be called "mdio". Update the example to match this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/308d72c2fe8e575e6e137b99743329c2d53eceea.1747121550.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 4abc1f14e2b86f61ef7856f0f2c33fcf08d65c66 Author: Alper Ak Date: Tue May 13 12:24:51 2025 +0300 documentation: networking: devlink: Fix a typo in devlink-trap.rst Fix a typo in the documentation: "errorrs" -> "errors". Signed-off-by: Alper Ak Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250513092451.22387-1-alperyasinak1@gmail.com Signed-off-by: Jakub Kicinski commit 9325d53fe9adff354b6a93fda5f38c165947da0f Merge: 5f55f216843229 8e57cf09c84cac Author: Alexei Starovoitov Date: Wed May 14 17:48:57 2025 -0700 Merge branch 's390-bpf-remove-the-orig_call-null-check' Ilya Leoshkevich says: ==================== I've been looking at fixing the tailcall_bpf2bpf_hierarchy failures on s390. One of the challenges is that when a BPF trampoline calls a BPF prog A, the prologue of A sets the tail call count to 0. Therefore it would be useful to know whether the trampoline is attached to some other BPF prog B, in which case A should be called using an offset equal to tail_call_start, bypassing the tail call count initialization. The trampoline attachment point is passed to trampoline functions via the orig_call variable. Unfortunately in the case of calculating the size of a struct_ops trampoline it's NULL, and I could not think of a good reason to have it this way. This series makes it always non-NULL. ==================== Link: https://patch.msgid.link/20250512221911.61314-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 8e57cf09c84cac99eb31354a3cc70f8b8981bfc2 Author: Ilya Leoshkevich Date: Mon May 12 22:57:31 2025 +0200 s390/bpf: Remove the orig_call NULL check Now that orig_call can never be NULL, remove the respective check. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250512221911.61314-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 94bde253d3ae5d8a01cb958663b12daef1d06574 Author: Ilya Leoshkevich Date: Mon May 12 22:57:30 2025 +0200 bpf: Pass the same orig_call value to trampoline functions There is currently some confusion in the s390x JIT regarding whether orig_call can be NULL and what that means. Originally the NULL value was used to distinguish the struct_ops case, but this was superseded by BPF_TRAMP_F_INDIRECT (see commit 0c970ed2f87c ("s390/bpf: Fix indirect trampoline generation"). The remaining reason to have this check is that NULL can actually be passed to the arch_bpf_trampoline_size() call - but not to the respective arch_prepare_bpf_trampoline()! call - by bpf_struct_ops_prepare_trampoline(). Remove this asymmetry by passing stub_func to both functions, so that JITs may rely on orig_call never being NULL. Signed-off-by: Ilya Leoshkevich Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250512221911.61314-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 5f55f2168432298f5a55294831ab6a76a10cb3c3 Author: Ilya Leoshkevich Date: Mon May 12 14:26:15 2025 +0200 s390/bpf: Store backchain even for leaf progs Currently a crash in a leaf prog (caused by a bug) produces the following call trace: [<000003ff600ebf00>] bpf_prog_6df0139e1fbf2789_fentry+0x20/0x78 [<0000000000000000>] 0x0 This is because leaf progs do not store backchain. Fix by making all progs do it. This is what GCC and Clang-generated code does as well. Now the call trace looks like this: [<000003ff600eb0f2>] bpf_prog_6df0139e1fbf2789_fentry+0x2a/0x80 [<000003ff600ed096>] bpf_trampoline_201863462940+0x96/0xf4 [<000003ff600e3a40>] bpf_prog_05f379658fdd72f2_classifier_0+0x58/0xc0 [<000003ffe0aef070>] bpf_test_run+0x210/0x390 [<000003ffe0af0dc2>] bpf_prog_test_run_skb+0x25a/0x668 [<000003ffe038a90e>] __sys_bpf+0xa46/0xdb0 [<000003ffe038ad0c>] __s390x_sys_bpf+0x44/0x50 [<000003ffe0defea8>] __do_syscall+0x150/0x280 [<000003ffe0e01d5c>] system_call+0x74/0x98 Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250512122717.54878-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit ace2cd11a27231efcb8a116a597edab2eef34957 Author: Fabrice Gasnier Date: Fri Jan 10 10:19:17 2025 +0100 counter: stm32-timer-cnt: add support for stm32mp25 Add support for STM32MP25 SoC. There are new counter modes that may be implemented in later. Still, use newly introduced compatible to handle this new HW variant and avoid being blocked with existing compatible in SoC dtsi file. Modes supported currently still remains compatible. New timer 20 has encoder capability, add it to the list. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20250110091922.980627-4-fabrice.gasnier@foss.st.com Signed-off-by: William Breathitt Gray commit 07c39476a75bf2541dbdb37815b60cc134cf9aff Author: Tang Dongxing Date: Thu Apr 3 15:54:19 2025 +0800 drm/mediatek: Replace custom compare_dev with component_compare_of Remove the custom device comparison function compare_dev and replace it with the existing kernel helper component_compare_of Signed-off-by: Tang Dongxing Signed-off-by: Shao Mingyin Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250403155419406T5YhIJKId1FWor70EWWHG@zte.com.cn/ Signed-off-by: Chun-Kuang Hu commit 94c933716567084bfb9e79dcd81eb2b2308e84e1 Author: AngeloGioacchino Del Regno Date: Thu Apr 3 12:47:39 2025 +0200 drm/mediatek: mtk_drm_drv: Unbind secondary mmsys components on err When calling component_bind_all(), if a component that is included in the list fails, all of those that have been successfully bound will be unbound, but this driver has two components lists for two actual devices, as in, each mmsys instance has its own components list. In case mmsys0 (or actually vdosys0) is able to bind all of its components, but the secondary one fails, all of the components of the first are kept bound, while the ones of mmsys1/vdosys1 are correctly cleaned up. This is not right because, in case of a failure, the components are re-bound for all of the mmsys/vdosys instances without caring about the ones that were previously left in a bound state. Fix that by calling component_unbind_all() on all of the previous component masters that succeeded binding all subdevices when any of the other masters errors out. Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support") Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250403104741.71045-4-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 80805b62ea5b95eda54c225b989f929ca0691ab0 Author: AngeloGioacchino Del Regno Date: Thu Apr 3 12:47:38 2025 +0200 drm/mediatek: Fix kobject put for component sub-drivers In function mtk_drm_get_all_drm_priv(), this driver is incrementing the refcount for the sub-drivers of mediatek-drm with a call to device_find_child() when taking a reference to all of those child devices. When the component bind fails multiple times this results in a refcount_t overflow, as the reference count is never decremented: fix that by adding a call to put_device() for all of the mmsys devices in a loop, in error cases of mtk_drm_bind() and in the mtk_drm_unbind() callback. Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support") Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250403104741.71045-3-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 22918591fb747a6d16801e74a170cf98e886f83b Author: AngeloGioacchino Del Regno Date: Thu Apr 3 12:47:37 2025 +0200 drm/mediatek: mtk_drm_drv: Fix kobject put for mtk_mutex device ptr This driver is taking a kobject for mtk_mutex only once per mmsys device for each drm-mediatek driver instance, differently from the behavior with other components, but it is decrementing the kobj's refcount in a loop and once per mmsys: this is not right and will result in a refcount_t underflow warning when mediatek-drm returns multiple probe deferrals in one boot (or when manually bound and unbound). Besides that, the refcount for mutex_dev was not decremented for error cases in mtk_drm_bind(), causing another refcount_t warning but this time for overflow, when the failure happens not during driver bind but during component bind. In order to fix one of the reasons why this is happening, remove the put_device(xx->mutex_dev) loop from the mtk_drm_kms_init()'s put_mutex_dev label (and drop the label) and add a single call to correctly free the single incremented refcount of mutex_dev to the mtk_drm_unbind() function to fix the refcount_t underflow. Moreover, add the same call to the error cases in mtk_drm_bind() to fix the refcount_t overflow. Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support") Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250403104741.71045-2-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 8cefeddf9ad636df3d84a9f825a3e0c3ffdf5abb Merge: 86ea0b826fb26d 4229c28323db14 Author: Linus Walleij Date: Thu May 15 00:25:42 2025 +0200 Merge branch 'ib-armada-for-v6.16' into devel Signed-off-by: Linus Walleij commit 4229c28323db141eda69cb99427be75d3edba071 Author: Gabor Juhos Date: Wed May 14 21:18:38 2025 +0200 pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() The regmap_update_bits() function can fail, so propagate its error up to the stack instead of silently ignoring that. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-7-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit 6481c0a83367b0672951ccc876fbae7ee37b594b Author: Gabor Juhos Date: Wed May 14 21:18:37 2025 +0200 pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() The regmap_read() function can fail, so propagate its error up to the stack instead of silently ignoring that. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-6-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit bfa0ff804ffa8b1246ade8be08de98c9eb19d16f Author: Gabor Juhos Date: Wed May 14 21:18:36 2025 +0200 pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() The armada_37xx_gpio_direction_{in,out}put() functions can fail, so propagate their error values back to the stack instead of silently ignoring those. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-5-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit 57273ff8bb16f3842c2597b5bbcd49e7fa12edf7 Author: Gabor Juhos Date: Wed May 14 21:18:35 2025 +0200 pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() The regmap_read() function can fail, so propagate its error up to the stack instead of silently ignoring that. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-4-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit 0396a8731efd17aec4719ad9981fefeaa13ffa56 Author: Gabor Juhos Date: Wed May 14 21:18:34 2025 +0200 pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() The regmap_update_bits() function can fail, so propagate its error up to the stack instead of silently ignoring that. Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-3-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit e6ebd4942981f8ad37189bbb36a3c8495e21ef4c Author: Gabor Juhos Date: Wed May 14 21:18:33 2025 +0200 pinctrl: armada-37xx: set GPIO output value before setting direction Changing the direction before updating the output value in the OUTPUT_VAL register may result in a glitch on the output line if the previous value in the OUTPUT_VAL register is different from the one we want to set. In order to avoid that, update the output value before changing the direction. Cc: stable@vger.kernel.org Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior") Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-2-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 Author: Gabor Juhos Date: Wed May 14 21:18:32 2025 +0200 pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 The controller has two consecutive OUTPUT_VAL registers and both holds output value for 32 GPIOs. Due to a missing adjustment, the current code always uses the first register while setting the output value whereas it should use the second one for GPIOs > 31. Add the missing armada_37xx_update_reg() call to adjust the register according to the 'offset' parameter of the function to fix the issue. Cc: stable@vger.kernel.org Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior") Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij commit d8a9ea5d3bebd7b1641869e7cab3db615d4cc4e7 Author: Krzysztof Kozlowski Date: Thu May 1 19:34:13 2025 +0200 media: dt-bindings: renesas,vsp1: add top-level constraints Properties with variable number of items per each device are expected to have widest constraints in top-level "properties:" block and further customized (narrowed) in "if:then:". Add missing top-level constraints for clocks and clock-names. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501173411.134130-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 31b6c343639e118cb8cd600736c55b88713e8ff6 Author: Krzysztof Kozlowski Date: Thu May 1 19:34:12 2025 +0200 media: dt-bindings: renesas,fcp: add top-level constraints Properties with variable number of items per each device are expected to have widest constraints in top-level "properties:" block and further customized (narrowed) in "if:then:". Add missing top-level constraints for clocks and clock-names. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501173411.134130-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 4dd372de3fde1afab3adf231e8b2962c40200387 Author: Kuniyuki Iwashima Date: Wed May 14 14:40:20 2025 -0700 selftests/bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c. The custom syncookie test expects TCPOPT_WINDOW to be 7 based on the kernel’s behaviour at the time, but the upcoming series [0] will bump it to 10. Let's relax the test to allow any valid TCPOPT_WINDOW value in the range 1–14. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/netdev/20250513193919.1089692-1-edumazet@google.com/ #[0] Link: https://patch.msgid.link/20250514214021.85187-1-kuniyu@amazon.com commit 4dc784e92d4fcf22ae785ee5a7918458f11b06c0 Author: Eric Sandeen Date: Tue May 13 18:14:58 2025 -0400 orangefs: Convert to use the new mount API Convert the orangefs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. [sandeen: forward-port older patch, fix SB_POSIXACL handling] Signed-off-by: David Howells Co-developed-by: Eric Sandeen Signed-off-by: Eric Sandeen cc: Mike Marshall cc: Martin Brandenburg cc: devel@lists.orangefs.org Signed-off-by: Mike Marshall commit eb47bca4cc8ab06bd25385c87406e0f27ebdbf07 Author: Juerg Haefliger Date: Tue Apr 29 16:49:57 2025 +0200 firmware: qcom: scm: Allow QSEECOM for HP EliteBook Ultra G1q This is required to get access to efivars and uefi boot loader support. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20250429144957.2088284-5-juerg.haefliger@canonical.com Signed-off-by: Bjorn Andersson commit afc48c680438da813e42407009707350c87f8c43 Author: Juerg Haefliger Date: Tue Apr 29 16:49:56 2025 +0200 arm64: dts: qcom: x1e80100-hp-elitebook-ultra-g1q: DT for HP EliteBook Ultra G1q Introduce a device tree for the HP EliteBook Ultra G1q 14" AI laptop. It seems to be using the same baseboard as the HP OmniBook X 14 so just use that for now. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20250429144957.2088284-4-juerg.haefliger@canonical.com Signed-off-by: Bjorn Andersson commit d8e66f9ab0488970394140638e876847b0316df8 Author: Juerg Haefliger Date: Tue Apr 29 16:49:55 2025 +0200 dt-bindings: arm: qcom: Document HP EliteBook Ultra G1q Add a compatible for the HP EliteBook Ultra G1q 14 inch Notebook AI PC. The laptop is based on the Snapdragon X Elite (x1e80100) SoC. PDF link: http://www8.hp.com/h20195/v2/GetDocument.aspx?docname=c08996392 Signed-off-by: Juerg Haefliger Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250429144957.2088284-3-juerg.haefliger@canonical.com Signed-off-by: Bjorn Andersson commit 3858e56d17ad0fc238e0a7fd2a7f54426761fba2 Author: Juerg Haefliger Date: Tue Apr 29 16:49:54 2025 +0200 arm64: dts: qcom: x1e80100-hp-omnibook-x14: add sound label Add a label to the sound node to make it easier to override from other nodes. Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20250429144957.2088284-2-juerg.haefliger@canonical.com Signed-off-by: Bjorn Andersson commit 4becd72352b6861de0c24074a8502ca85080fd63 Author: Pengyu Luo Date: Sat Apr 5 18:55:28 2025 +0800 arm64: dts: qcom: sm8650: add the missing l2 cache node Only two little a520s share the same L2, every a720 has their own L2 cache. Fixes: d2350377997f ("arm64: dts: qcom: add initial SM8650 dtsi") Signed-off-by: Pengyu Luo Reviewed-by: Konrad Dybcio Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250405105529.309711-1-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson commit 9e7acf70cf6aa7b22f67d911f50a8cd510e8fb00 Author: Vincent Knecht Date: Mon Apr 14 18:45:12 2025 +0200 clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz Fix mclk0 & mclk1 parent map to use correct GPLL6 configuration and freq_tbl to use GPLL6 instead of GPLL0 so that they tick at 24 MHz. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Suggested-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20250414-gcc-msm8939-fixes-mclk-v2-resend2-v2-1-5ddcf572a6de@mailoo.org Signed-off-by: Bjorn Andersson commit d8dc4889afc92bd8757fcab607b734c684fce167 Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:57 2025 +0300 ARM: dts: qcom: apq8064: link LVDS clocks Link LVDS clocks to the from MDP4 to the MMCC and back from the MMCC to the MDP4 display controller. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-7-6b212160b44c@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit d12fbd11c5a3e98c2f6372252bf84b0e10dd91cc Author: Abel Vesa Date: Mon Mar 24 16:08:19 2025 +0200 arm64: dts: qcom: x1e001de-devkit: Enable support for both Type-A USB ports The Qualcomm X Elite Devkit has 2 USB-A ports, both connected to the USB multiport controller, each one via a separate NXP PTN3222 eUSB2-to-USB2 redriver to the eUSB2 PHY for High-Speed support, with a dedicated QMP PHY for SuperSpeed support. Describe each redriver and then enable each pair of PHYs and the USB controller itself, in order to enable support for the 2 USB-A ports. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-x1e001de-devkit-dts-enable-usb-a-ports-v1-1-81153b2d1edf@linaro.org Signed-off-by: Bjorn Andersson commit 6a563a9760af9d5476faf8b3fd419b0714ab0b4b Author: Nirmesh Kumar Singh Date: Sun Mar 23 18:03:33 2025 +0530 arm64: dts: qcom: Add industrial mezzanine support for qcs6490-rb3gen2 Add DTS support for Qualcomm qcs6490-rb3gen2 industrial mezzanine board. Signed-off-by: Sahil Chandna Signed-off-by: Nirmesh Kumar Singh Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250323123333.1622860-1-quic_nkumarsi@quicinc.com Signed-off-by: Bjorn Andersson commit 48274b40a3719a950b1062f8125c972a2df5c083 Author: Juerg Haefliger Date: Wed Mar 19 17:05:09 2025 +0100 arm64: dts: qcom: x1e80100-hp-omnibook-x14: Enable SMB2360 0 and 1 Commit d37e2646c8a5 ("arm64: dts: qcom: x1e80100-pmics: Enable all SMB2360 separately") disables all SMB2360s and let the board DTS explicitly enable them. The HP OmniBook DTS is from before this change and is missing the explicit enabling. Add that to get all USB root ports. Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14") Cc: stable@vger.kernel.org # 6.14 Signed-off-by: Juerg Haefliger Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20250319160509.1812805-1-juerg.haefliger@canonical.com Signed-off-by: Bjorn Andersson commit b81dcdad43daf10f79ae149826fff9e467b95e8b Author: Rudraksha Gupta Date: Tue Mar 18 22:10:47 2025 -0700 ARM: dts: qcom-msm8960: add missing clocks to the timer node In order to fix DT schema warning and describe hardware properly, add missing sleep clock to the timer node. Solved by Dmitry Baryshkov on the APQ8064 SoC Link: https://lore.kernel.org/all/20250318-fix-nexus-4-v2-6-bcedd1406790@oss.qualcomm.com/ Signed-off-by: Rudraksha Gupta Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-expressatt-solve-dts-errors-v1-1-14012a4bc315@gmail.com Signed-off-by: Bjorn Andersson commit 43fefd6c71291b5793e7c4052b6e3e54d1d87715 Author: George Moussalem Date: Mon May 12 18:36:47 2025 +0400 arm64: dts: qcom: ipq5018: enable the download mode support Enable support for download mode to collect RAM dumps in case of a system crash, allowing post mortem analysis. Signed-off-by: George Moussalem Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250512-ipq5018-syscon-v1-2-eb1ad2414c3c@outlook.com Signed-off-by: Bjorn Andersson commit 1d2c5d5f3f44ba45bf0e2ef9a51c77256b99afd2 Author: George Moussalem Date: Mon May 12 18:36:46 2025 +0400 dt-bindings: mfd: qcom,tcsr: Add compatible for ipq5018 Document the qcom,tcsr-ipq5018 compatible. Signed-off-by: George Moussalem Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250512-ipq5018-syscon-v1-1-eb1ad2414c3c@outlook.com Signed-off-by: Bjorn Andersson commit 25f185524c4722b2c18e2746c7c4aeb2107d571f Author: Dmitry Baryshkov Date: Fri Apr 25 21:26:13 2025 +0300 arm64: dts: qcom: msm8998-lenovo-miix-630: add Venus node Enable Venus on Lenovo Miix 630 and specify corresponding firmware file. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20250425-miix-630-venus-v2-1-cdfca385a0c8@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 22667f0b306f9cfa0c5be20166222f0e66272533 Author: Nitheesh Sekar Date: Wed May 14 09:52:14 2025 +0400 arm64: dts: qcom: ipq5018: Enable PCIe Enable the PCIe controller and PHY nodes for RDP 432-c2. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan Ramabadhran Acked-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/20250514-ipq5018-pcie-v10-2-5b42a8eff7ea@outlook.com Signed-off-by: Bjorn Andersson commit 18a5bf00a02ca54d51266b861518f2844c4f08d7 Author: Nitheesh Sekar Date: Wed May 14 09:52:13 2025 +0400 arm64: dts: qcom: ipq5018: Add PCIe related nodes Add phy and controller nodes for a 2-lane Gen2 and a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and one global interrupt. NOTE: the PCIe controller supports gen3, yet the phy is limited to gen2. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan R Reviewed-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/20250514-ipq5018-pcie-v10-1-5b42a8eff7ea@outlook.com Signed-off-by: Bjorn Andersson commit 295217420a44403a33c30f99d8337fe7b07eb02b Author: Alok Tiwari Date: Wed May 14 04:46:51 2025 -0700 arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node There is a typo in sm8350.dts where the node label mmeory@85200000 should be memory@85200000. This patch corrects the typo for clarity and consistency. Fixes: b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC") Cc: stable@vger.kernel.org Signed-off-by: Alok Tiwari Link: https://lore.kernel.org/r/20250514114656.2307828-1-alok.a.tiwari@oracle.com Signed-off-by: Bjorn Andersson commit 781621de1551233f6767976b44e93745ffcfa865 Author: Konrad Dybcio Date: Wed May 14 19:47:16 2025 +0200 arm64: dts: qcom: x1e80100-romulus: Enable DP over Type-C Both ports seem to work, just like on other X1E laptops. Tested with a Type-C-to-HDMI2.0 dock (translating into up to 2 DP lanes worth of bandwidth). Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250514-topic-romu_dp-v1-1-6242d6acb5e5@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit f3e2e53823b98d55da46ea72d32ac18bd7709c33 Author: Hans Holmberg Date: Wed May 14 10:50:37 2025 +0000 xfs: add inode to zone caching for data placement Placing data from the same file in the same zone is a great heuristic for reducing write amplification and we do this already - but only for sequential writes. To support placing data in the same way for random writes, reuse the xfs mru cache to map inodes to open zones on first write. If a mapping is present, use the open zone for data placement for this file until the zone is full. Signed-off-by: Hans Holmberg Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino commit 70b95cb86513d7f6d084ddc8e961a1cab9022e14 Author: Christoph Hellwig Date: Wed May 14 10:50:37 2025 +0000 xfs: free the item in xfs_mru_cache_insert on failure Call the provided free_func when xfs_mru_cache_insert as that's what the callers need to do anyway. Signed-off-by: Christoph Hellwig Signed-off-by: Hans Holmberg Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit cb4ff91492de79e1dd1daacf75c2bd7c54d23252 Author: Tejun Heo Date: Wed May 14 12:37:18 2025 -0400 sched_ext: Explain the temporary situation around scx_root dereferences Naked scx_root dereferences are being used as temporary markers to indicate that they need to be updated to point to the right scheduler instance. Explain the situation. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit d0445d7dd3fd9b15af7564c38d7aa3cbc29778ee Author: Mykyta Yatsenko Date: Wed May 14 12:32:20 2025 +0100 libbpf: Check bpf_map_skeleton link for NULL Avoid dereferencing bpf_map_skeleton's link field if it's NULL. If BPF map skeleton is created with the size, that indicates containing link field, but the field was not actually initialized with valid bpf_link pointer, libbpf crashes. This may happen when using libbpf-rs skeleton. Skeleton loading may still progress, but user needs to attach struct_ops map separately. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250514113220.219095-1-mykyta.yatsenko5@gmail.com commit 289c99bec7eed918ab37c62cbb29a2e3f58fb1fb Author: Eric Biggers Date: Tue May 13 22:24:09 2025 -0700 lib/crc32: add SPDX license identifier lib/crc32.c and include/linux/crc32.h got missed by the bulk SPDX conversion because of the nonstandard explanation of the license. However, crc32.c clearly states that it's licensed under the GNU General Public License, Version 2. And the comment in crc32.h clearly indicates that it's meant to have the same license as crc32.c. Therefore, apply SPDX-License-Identifier: GPL-2.0-only to both files. Reviewed-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250514052409.194822-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 51b081cdb92377d7f923912d589cab414db600c4 Author: Ben Zong-You Xie Date: Wed May 14 17:53:47 2025 +0800 dt-bindings: cache: add QiLai compatible to ax45mp Add a new compatible string for ax45mp-cache on QiLai SoC. Also, add allOf constraints to enforce specific cache-sets and cache-size values for qilai-ax45mp-cache. Signed-off-by: Ben Zong-You Xie Signed-off-by: Conor Dooley commit 55da73fa7a68ccbe23c94ecc070d2ee0013f4fbd Author: Adam Ford Date: Sun May 4 05:29:59 2025 -0500 ARM: dts: davinci: da850-evm: Increase fifo threshold When operating at low speeds, the display may throw an underflow error and the display itself goes blank. Increasing the fifo-th value appears to correct this problem and the display can now operate when the system is operating at speeds as low as 100MHz. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20250504102959.81830-1-aford173@gmail.com Signed-off-by: Bartosz Golaszewski commit 1275c70c4c1ca764cbf9ced01fb4286e4f49747e Author: Aaron Kling Date: Tue Apr 29 16:33:31 2025 -0500 dt-bindings: gpio: tegra186: Add gpio-ranges Add optional gpio-ranges property. Signed-off-by: Aaron Kling Reviewed-by: Linus Walleij Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250429-tegra186-pinctrl-v1-2-722c7c42394e@gmail.com Signed-off-by: Bartosz Golaszewski commit 72ea78335e782d7991934e39f2a998a3d134e4fd Author: Shiwu Zhang Date: Fri Mar 21 21:48:16 2025 +0800 drm/amdgpu: add debugfs for spirom IFWI dump Expose the debugfs file node for user space to dump the IFWI image on spirom. For one transaction between PSP and host, it will read out the images on both active and inactive partitions so a buffer with two times the size of maximum IFWI image (currently 16MByte) is needed. v2: move the vbios gfl macros to the common header and rename the bo triplet struct to spirom_bo for this specific usage (Hawking) v3: return directly the result of last command execution (Lijo) Signed-off-by: Shiwu Zhang Reviewed-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 64db76701351913a07fe3032210ef5e6ab13dea8 Author: Prike Liang Date: Mon May 12 15:09:21 2025 +0800 drm/amdgpu: fix userq resource double freed As the userq resource was already freed at the drm_release early phase, it should avoid freeing userq resource again at the later kms postclose callback. Signed-off-by: Prike Liang Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher commit 96a86dcb5b5ca65564efeaaeecfca669e79a57e1 Author: Jesse.Zhang Date: Tue May 13 10:09:04 2025 +0800 drm/amdgpu: Fix circular locking in userq creation A circular locking dependency was detected between the global `adev->userq_mutex` and per-file `userq_mgr->userq_mutex` when creating user queues. The issue occurs because: 1. `amdgpu_userq_suspend()` and `amdgpu_userq_resume` take `adev->userq_mutex` first, then `userq_mgr->userq_mutex` 2. While `amdgpu_userq_create()` takes them in reverse order This patch resolves the issue by: 1. Moving the `adev->userq_mutex` lock earlier in `amdgpu_userq_create()` to cover the `amdgpu_userq_ensure_ev_fence()` call 2. Releasing it after we're done with both queue creation and the scheduling halt check v2: remove unused adev->userq_mutex lock (Prike) Signed-off-by: Jesse Zhang Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 07c9db090b86e5211188e1b351303fbc673378cf Author: David (Ming Qiang) Wu Date: Mon May 12 15:14:43 2025 -0400 drm/amdgpu: read back register after written for VCN v4.0.5 On VCN v4.0.5 there is a race condition where the WPTR is not updated after starting from idle when doorbell is used. Adding register read-back after written at function end is to ensure all register writes are done before they can be used. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12528 Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Mario Limonciello Tested-by: Mario Limonciello Reviewed-by: Alex Deucher Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher commit f6a305d4748801a6c799ae9375b2ecff3aed094b Author: Melissa Wen Date: Tue Apr 22 11:58:11 2025 -0300 Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor" This reverts commit 272e6aab14bbf98d7a06b2b1cd6308a02d4a10a1. Applying degamma curve to the cursor by default breaks Linux userspace expectation. On Linux, AMD display manager enables cursor degamma ROM just for implict sRGB on HW versions where degamma is split into two blocks: degamma ROM for pre-defined TFs and `gamma correction` for user/custom curves, and degamma ROM settings doesn't apply to cursor plane. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1513 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2803 Reported-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4144 Signed-off-by: Melissa Wen Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit 2632a2013f58f0aab4b9fd042e67d78740ba0996 Author: Masami Hiramatsu (Google) Date: Wed May 14 16:04:18 2025 +0900 tracing: Record trace_clock and recover when reboot Record trace_clock information in the trace_scratch area and recover the trace_clock when boot, so that reader can docode the timestamp correctly. Note that since most trace_clocks records the timestamp in nano- seconds, this is not a bug. But some trace_clock, like counter and tsc will record the counter value. Only for those trace_clock user needs this information. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/174720625803.1925039.1815089037443798944.stgit@mhiramat.tok.corp.google.com Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 155fd6c3e2f02efdc71a9b62888942efc217aff0 Author: Steven Rostedt Date: Wed May 7 13:34:58 2025 -0400 tracing/sched: Use __string() instead of fixed lengths for task->comm The sched_switch and sched_waking events hardcoded the length of the comm it recorded because these events were created before the dynamic strings were implemented. Unfortunately, several other events copied this method. As the size of the comm may change in the future, make the string dynamic. The dynamic string requires a 4 byte meta data to hold the size and offset of the string. The amount stored in the ring buffer will then be the strlen(comm) + 5 (for the \n), and aligned to 4 bytes if there's no other strings. This means that a task comm can have up to 10 characters before it requires another 4 bytes in the ring buffer. Most tasks are usually less than that, so this should not be a problem, and it also allows the name to be extended over the TASK_COMM_LEN [1] Note, sched_switch and the sched_waking trace events still hardcode the length, as there is tooling that still requires that. An effort to update the tooling will be made to allow this to change in the future. [1] https://lore.kernel.org/all/20250507110444.963779-1-bhupesh@igalia.com/ Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Bhupesh Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Juri Lelli Link: https://lore.kernel.org/20250507133458.51bafd95@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit ac01fa73f5309a35eff83be61442a8891159b487 Author: Steven Rostedt Date: Sat May 10 16:37:30 2025 -0400 tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix Most tracepoints in the kernel are created with TRACE_EVENT(). The TRACE_EVENT() macro (and DECLARE_EVENT_CLASS() and DEFINE_EVENT() where in reality, TRACE_EVENT() is just a helper macro that calls those other two macros), will create not only a tracepoint (the function trace_() used in the kernel), it also exposes the tracepoint to user space along with defining what fields will be saved by that tracepoint. There are a few places that tracepoints are created in the kernel that are not exposed to userspace via tracefs. They can only be accessed from code within the kernel. These tracepoints are created with DEFINE_TRACE() Most of these tracepoints end with "_tp". This is useful as when the developer sees that, they know that the tracepoint is for in-kernel only (meaning it can only be accessed inside the kernel, either directly by the kernel or indirectly via modules and BPF programs) and is not exposed to user space. Instead of making this only a process to add "_tp", enforce it by making the DECLARE_TRACE() append the "_tp" suffix to the tracepoint. This requires adding DECLARE_TRACE_EVENT() macros for the TRACE_EVENT() macro to use that keeps the original name. Link: https://lore.kernel.org/all/20250418083351.20a60e64@gandalf.local.home/ Cc: netdev Cc: Jiri Olsa Cc: Peter Zijlstra Cc: David Ahern Cc: Juri Lelli Cc: Breno Leitao Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Gabriele Monaco Cc: Masami Hiramatsu Link: https://lore.kernel.org/20250510163730.092fad5b@gandalf.local.home Acked-by: Mathieu Desnoyers Acked-by: Andrii Nakryiko Signed-off-by: Steven Rostedt (Google) commit 45c28cdce7a1648c12bb8f546a67abf908db106e Author: Yury Norov Date: Tue Apr 29 15:51:18 2025 -0400 tracing: Cleanup upper_empty() in pid_list Instead of find_first_bit() use the dedicated bitmap_empty(), and make upper_empty() a nice one-liner. While there, fix opencoded BITS_PER_TYPE(). Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250429195119.620204-1-yury.norov@gmail.com Signed-off-by: Yury Norov Signed-off-by: Steven Rostedt (Google) commit a8433f7a267f9fcf14822c08ab89b6021a8ba536 Author: Tejun Heo Date: Wed May 14 11:11:48 2025 -0400 sched_ext: Add @sch to SCX_CALL_OP*() In preparation of hierarchical scheduling support, add @sch to scx_exit() and friends: - scx_exit/error() updated to take explicit @sch instead of assuming scx_root. - scx_kf_exit/error() added. These are to be used from kfuncs, don't take @sch and internally determine the scx_sched instance to abort. Currently, it's always scx_root but once multiple scheduler support is in place, it will be the scx_sched instance that invoked the kfunc. This simplifies many callsites and defers scx_sched lookup until error is triggered. - @sch is propagated to ops_cpu_valid() and ops_sanitize_err(). The CPU validity conditions in ops_cpu_valid() are factored into __cpu_valid() to implement kf_cpu_valid() which is the counterpart to scx_kf_exit/error(). - All users are converted. Most conversions are straightforward. check_rq_for_timeouts() and scx_softlockup() are updated to use explicit rcu_dereference*(scx_root) for safety as they may execute asynchronous to the exit path. scx_tick() is also updated to use rcu_dereference(). While not strictly necessary due to the preceding scx_enabled() test and IRQ disabled context, this removes the subtlety at no noticeable cost. No behavior changes intended. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi commit c4c286d747971c410739afc216972f1cc0923270 Author: Tejun Heo Date: Wed May 14 11:11:48 2025 -0400 sched_ext: Cleanup [__]scx_exit/error*() __scx_exit() is the base exit implementation and there are three wrappers on top of it - scx_exit(), __scx_error() and scx_error(). This is more confusing than helpful especially given that there are only a couple users of scx_exit() and __scx_error(). To simplify the situation: - Make __scx_exit() take va_list and rename it to scx_vexit(). This is to ease implementing more complex extensions on top. - Make scx_exit() a varargs wrapper around __scx_exit(). scx_exit() now takes both @kind and @exit_code. - Convert existing scx_exit() and __scx_error() users to use the new scx_exit(). - scx_error() remains unchanged. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi commit ab3f497ac18d48649376f75cd782c8392b8f09a6 Author: Tejun Heo Date: Wed May 14 11:11:48 2025 -0400 sched_ext: Add @sch to SCX_CALL_OP*() In preparation of hierarchical scheduling support, make SCX_CALL_OP*() take explicit @sch instead of assuming scx_root. As scx_root is still the only scheduler instance, this patch doesn't make any functional changes. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi commit d310fb40096896abe1928b88224129bf7122532f Author: Tejun Heo Date: Wed May 14 11:11:48 2025 -0400 sched_ext: Clean up scx_root usages - Always cache scx_root into local variable sch before using. - Don't use scx_root if cached sch is available. - Wrap !sch test with unlikely(). - Pass @scx into scx_cgroup_init/exit(). No behavior changes intended. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi commit eb68ba4af6da720caaf752b5618220efd5cf31dc Merge: 9e654f2bf309f7 08f959759e1e6e Author: Ulf Hansson Date: Wed May 14 17:07:56 2025 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.15-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit 9e654f2bf309f7ddb9ff2fb3f9b0297ae194d2cb Author: Wolfram Sang Date: Thu May 1 08:33:29 2025 +0200 mmc: rename mmc_boot_partition_access() to mmc_host_can_access_boot() It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers and reword it slightly. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250501063325.7262-10-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit f55f7da62166dcdd34a0661b94a43464ff7c626a Author: Wolfram Sang Date: Thu May 1 08:33:28 2025 +0200 mmc: rename mmc_host_uhs() to mmc_host_can_uhs() It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250501063325.7262-9-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit dc03e2e9f05ffa3cbb9a2dfc7dfb112847d5d966 Author: Wolfram Sang Date: Thu May 1 08:33:27 2025 +0200 mmc: rename mmc_host_done_complete() to mmc_host_can_done_complete() It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250501063325.7262-8-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 03b31a0638a1cb1c580de4d5054ec9f5caffdffc Author: Wolfram Sang Date: Thu May 1 08:33:26 2025 +0200 mmc: rename mmc_host_cmd23() to mmc_host_can_cmd23() It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250501063325.7262-7-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 5846efac138a650f7f95d68aaa4c40870bdbc352 Author: Randy Dunlap Date: Wed Apr 23 20:46:10 2025 -0700 mmc: sdhci-esdhc-imx: fix defined but not used warnings Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP. drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning: 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function] 1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host) drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning: 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function] 1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host) Fixes: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend") Signed-off-by: Randy Dunlap Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20250424034610.441532-1-rdunlap@infradead.org Signed-off-by: Ulf Hansson commit 1dfc7d1ab7839dff5b348d4f5915757203d4294c Author: Alexey Charkov Date: Wed Apr 23 14:53:29 2025 +0400 dt-bindings: mmc: vt8500-sdmmc: Convert to YAML Rewrite the textual description for the WonderMedia SDMMC controller as YAML schema, and switch the filename to follow the compatible string. Signed-off-by: Alexey Charkov Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250423-vt8500-sdmmc-binding-v2-1-ea4f17fd0638@gmail.com Signed-off-by: Ulf Hansson commit 3c018bf5a0ee3abe8d579d6a0dda616c3858d7b2 Author: Eder Zulian Date: Tue Apr 8 19:38:29 2025 +0200 dmaengine: idxd: Remove unused pointer and macro The pointer 'extern struct kmem_cache *idxd_desc_pool' and the macro '#define IDXD_ALLOCATED_BATCH_SIZE 128U' were introduced in commit bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") but they were never used. Signed-off-by: Eder Zulian Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20250408173829.892317-1-ezulian@redhat.com Signed-off-by: Vinod Koul commit a0ba0461c4f3750a310f77b1530768dccc0c8c39 Author: Danila Tikhonov Date: Tue Apr 22 23:17:12 2025 +0300 dt-bindings: mmc: sdhci-msm: Add the SM7150 compatible Add compatible for the SDHCI block found in SM7150. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20250422-sm7150-upstream-v1-11-bf9a9081631d@jiaxyga.com Signed-off-by: Ulf Hansson commit 88f2f360de9f6d8d068dd7ef084fc36d21f3cc9f Author: Frank Li Date: Thu Apr 17 11:13:00 2025 -0400 dt-bindings: mmc: fsl,esdhc: add compatible string fsl,ls1021a-esdhc Add compatible string fsl,ls1021a-esdhc for LS1021a SoC. Signed-off-by: Frank Li Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250417151300.3570021-1-Frank.Li@nxp.com Signed-off-by: Ulf Hansson commit c02c658cc987537468f6b99daa1e08a25ca7e5fa Author: Philipp Stanner Date: Thu Apr 17 11:27:43 2025 +0200 mmc: cavium-thunderx: Use non-hybrid PCI devres API cavium-thunderx enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Moreover, since both functions are already managed in this driver, the calls to pci_release_regions() are unnecessary. Remove the calls to pci_release_regions(). Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417092742.27887-2-phasta@kernel.org Signed-off-by: Ulf Hansson commit fe1c2abfc8a34e7e58940cb43a033fa86a785072 Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:45 2025 +0200 dt-bindings: mmc: mtk-sd: Add support for Dimensity 1200 MT6893 Add a compatible for the MediaTek Dimensity 1200 (MT6893) SoC. All of the MMC/SD controllers in this chip are compatible with the ones found in MT8183, but do also make use of an optional crypto clock when enabling HW disk encryption. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120245.147951-1-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 157d4ba8dfdfb1aebf8c2d059e5aa187abe06182 Author: Inochi Amaoto Date: Mon Apr 14 06:35:01 2025 +0800 dt-bindings: mmc: sdhci-of-dwcmhsc: Add Sophgo SG2044 support The sdhci IP of SG2044 is similar to it of SG2042. They share the same clock and controller configuration. Add compatible string for SG2044. Signed-off-by: Inochi Amaoto Reviewed-by: Chen Wang Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250413223507.46480-8-inochiama@gmail.com Signed-off-by: Ulf Hansson commit 920e6bfa6a11baf4fae0e5ce9e3b70f59ae0d47a Author: Axe Yang Date: Fri Apr 11 13:40:25 2025 +0800 mmc: mtk-sd: Add condition to enable 'single' burst type This change add a condition for 'single' burst type selection. Read AXI_LEN field from EMMC50_CFG2(AHB2AXI wrapper) register, if the value is not 0, it means the HWIP is using AXI as AMBA bus, which do not support 'single' burst type. Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Axe Yang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250411054134.31822-1-axe.yang@mediatek.com Signed-off-by: Ulf Hansson commit 1c7387579d743c02a3da7aefff1689a5a55c9b84 Author: Luke Wang Date: Wed Apr 9 15:55:50 2025 +0800 mmc: sdhci-esdhc-imx: switch standard tuning to manual tuning Current standard tuning has some limitations: 1. Standard tuning only try 40 times to find first pass window, but this pass window maybe not the best pass window. 2. Sometimes there are two tuning pass windows and the gap between those two windows may only have one cell. If tuning step > 1, the gap may just be skipped and host assumes those two windows as a continuous windows. This will cause a bad delay cell near the gap to be selected. 3. Standard tuning logic need to detect at least one success and failure to pass the tuning. If all cells in the tuning window pass, the hardware will not set the SDHCI_CTRL_TUNED_CLK bit, causing tuning failed. 4. Standard tuning logic only check the CRC, do not really compare the data pattern. If data pins are connected incorrectly, standard will not detect this kind of issue. Switch to manual tuning to avoid those limitations Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-7-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit 309d7ef65f46f01afd723401f7fc210244a08159 Author: Luke Wang Date: Wed Apr 9 15:55:49 2025 +0800 mmc: sdhci-esdhc-imx: verify tuning control status after configuration Enhance manual tuning configuration reliability by adding tuning control status checks per the i.MX Reference Manual recommendations. Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-6-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit 8cdba34313712e0dbc4c5650c8f2dcf315c13e6f Author: Haibo Chen Date: Wed Apr 9 15:55:48 2025 +0800 mmc: sdhci-esdhc-imx: widen auto-tuning window for manual tuning Expand the auto-tuning window width from 0 to 3 for manual tuning to account for sampling point shifts caused by temperature change. This change is based on hardware recommendation, providing enough margin for the auto-tuning logic to locate valid sampling points. When config the manual tuning final sample delay, need deduct the auto tuning window width according to the IP logic. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-5-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit be953af79cc67a3a073fd75cf2bd542353d2ad35 Author: Haibo Chen Date: Wed Apr 9 15:55:47 2025 +0800 mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning Expand the auto-tuning window width from 2 to 3 for standard tuning to account for sampling point shifts caused by temperature change. This change is based on hardware recommendation, providing 50% more margin for the auto-tuning logic to locate valid sampling points. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-4-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit d0aac7d811775a2e98a02c7f172e0a9e97d9e004 Author: Haibo Chen Date: Wed Apr 9 15:55:46 2025 +0800 mmc: sdhci-esdhc-imx: reset async FIFO before sending manual tuning command During manual tuning, residual data in the async FIFO from previous commands may impact with the tuning process. To ensure a clean state: 1. Set the RST_FIFO bit (SYS_CTRL[22]) to reset the async FIFO. 2. Poll the bit until self-cleared, confirming reset completion. This hardening ensures the tuning command starts with a clean FIFO state, improving the reliability of the manual tuning procedure. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-3-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit 0d7831f04d66e6107e9215c7d5f9f166c16d6f46 Author: Haibo Chen Date: Wed Apr 9 15:55:45 2025 +0800 mmc: sdhci-esdhc-imx: explicitly reset tuning circuit via RSTT bit According to the i.MX Reference Manual, the RSTT bit (SYS_CTRL[28]) is designed to reset the tuning circuit. While the Reference Manual states that clearing EXECUTE_TUNING bit from 1 to 0 in AUTOCMD12_ERR_STATUS can also set RSTT, this mechanism only works when the original EXECUTE_TUNING bit was 1. When the bit is already 0, the tuning circuit reset will not be triggered. This explicit reset approach strengthens the tuning reliability and aligns with the Reference Manual recommendations. Signed-off-by: Haibo Chen Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409075550.3413032-2-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit 0ea6055c96b8e79aa01a9eb440b77fb5cdf1c339 Author: Luke Wang Date: Wed Apr 9 15:26:04 2025 +0800 mmc: sdhci-esdhc-imx: calculate data timeout value based on clock Calculate data timeout value based on clock instead of using max value. Signed-off-by: Luke Wang Reviewed-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250409072604.3410459-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit 2e1a26ed6b3864576720364c793e4abf0681fcf5 Author: Wolfram Sang Date: Tue Apr 1 11:58:47 2025 +0200 mmc: rename mmc_can_gpio_ro() to mmc_host_can_gpio_ro() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'host'. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-12-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit da012e1eb5372be518e2667c1afa00996bb076e6 Author: Wolfram Sang Date: Tue Apr 1 11:58:46 2025 +0200 mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'host'. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-11-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit b89d05f654547859c96a2f9ec142d4ea773df236 Author: Wolfram Sang Date: Tue Apr 1 11:58:45 2025 +0200 mmc: rename mmc_can_trim() to mmc_card_can_trim() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-10-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit e3df5ae4761eb8373a72349f3cdbe7838dc5c538 Author: Wolfram Sang Date: Tue Apr 1 11:58:44 2025 +0200 mmc: rename mmc_can_sleep() to mmc_card_can_sleep() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-9-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 55e0961a8b56f8356261e4a9b5544daf4f552def Author: Wolfram Sang Date: Tue Apr 1 11:58:43 2025 +0200 mmc: rename mmc_can_secure_erase_trim() to mmc_card_can_secure_erase_trim() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-8-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 2abda0485610a6a7849a13576c8c13c3ba903db1 Author: Wolfram Sang Date: Tue Apr 1 11:58:42 2025 +0200 mmc: rename mmc_can_sanitize() to mmc_card_can_sanitize() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-7-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 07dd2b3204f5fe3010dd467c0a192d7efabc1abc Author: Wolfram Sang Date: Tue Apr 1 11:58:41 2025 +0200 mmc: rename mmc_can_reset() to mmc_card_can_reset() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Conversion was simplified by inverting the logic. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-6-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit d872c26741b6448abc948895056157c17251a944 Author: Wolfram Sang Date: Tue Apr 1 11:58:40 2025 +0200 mmc: rename mmc_can_poweroff_notify() to mmc_card_can_poweroff_notify() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit ceb5d3acb0c32beb3a8fbaf72f21e9eb1b58bd63 Author: Wolfram Sang Date: Tue Apr 1 11:58:39 2025 +0200 mmc: rename mmc_can_ext_csd() to mmc_card_can_ext_csd() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 5513d9bebbcca2eb30252ad6c2f0eaf73eec7121 Author: Wolfram Sang Date: Tue Apr 1 11:58:38 2025 +0200 mmc: rename mmc_can_erase() to mmc_card_can_erase() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 76d62cde684ba53dcbc6923b2ec90a024ee253f9 Author: Wolfram Sang Date: Tue Apr 1 11:58:37 2025 +0200 mmc: rename mmc_can_discard() to mmc_card_can_discard() mmc_can_* functions sometimes relate to the card and sometimes to the host. Make it obvious by renaming this function to include 'card'. Also, convert to proper bool type while we are here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250401095847.29271-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 7ea500bca61c2f04126cdfa6ee994d1645e2f71d Author: Feng Wei Date: Tue Apr 1 19:57:51 2025 +0800 mmc: alcor: Use str_read_write() helper Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Feng Wei Signed-off-by: Shao Mingyin Link: https://lore.kernel.org/r/20250401195751834zbm34YDvwPeQf7ooZBCdh@zte.com.cn Signed-off-by: Ulf Hansson commit 18da3ecdbaf6f140eb45818fd848b85d2c414db6 Author: Biju Das Date: Mon Apr 7 10:21:41 2025 +0100 mmc: renesas_sdhi: Use of_get_available_child_by_name() Use the helper of_get_available_child_by_name() to simplify renesas_sdhi_probe(). Signed-off-by: Biju Das Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20250407092144.35268-1-biju.das.jz@bp.renesas.com Signed-off-by: Ulf Hansson commit a06f633e18bcc4b5513fd54269ce60a1357450b1 Author: Wolfram Sang Date: Sat Apr 5 19:35:26 2025 +0200 dt-bindings: mmc: arasan,sdhci: Add Renesas RZ/N1D This instance has a wakeup irq defined. It is currently not used by the driver. Signed-off-by: Wolfram Sang Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250405173631.13564-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit b70721fd845d7be455fe2a6036b1afa660180a3b Author: AngeloGioacchino Del Regno Date: Tue Mar 25 12:07:01 2025 +0100 mmc: mtk-sd: Aggregate R/W for top_base iospace case where possible In case the controller uses the top_base iospace, most register read/writes can be changed from multiple RWs to a single read and a single write. Where possible, and where it makes sense, aggregate the multiple reads and writes to just one. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250325110701.52623-5-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 1649904e84aaa5c62584d0e3d5b29b221fc89558 Author: AngeloGioacchino Del Regno Date: Tue Mar 25 12:07:00 2025 +0100 mmc: mtk-sd: Do single write in function msdc_new_tx_setting Instead of reading and writing the LOOP_TEST_CONTROL register for each set or cleared bit, read it once, modify the contents in a local variable, and then write once. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250325110701.52623-4-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 091bf793eb06f01ca0e2ec2f327957cce816c96e Author: AngeloGioacchino Del Regno Date: Tue Mar 25 12:06:59 2025 +0100 mmc: mtk-sd: Aggregate writes for MSDC_PATCH_BIT1/2 setup Instead of continuously reading and writing to the patch bit 1/2 registers, prepare the final values to write to those and write just once per register during the setup phase. This makes the driver slightly smaller and also slightly improves the execution time of the msdc_init_hw function, called not only at probe time, but also when resuming from system suspend. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250325110701.52623-3-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 6cdf5f1d7d4dcc4bf3fff1de37711d653d4a6bf8 Author: AngeloGioacchino Del Regno Date: Tue Mar 25 12:06:58 2025 +0100 mmc: mtk-sd: Clarify patch bit register initialization and layout In preparation for cleaning up the msdc_init_hw register setting for the patch bit registers, add the necessary definitions for bits in the MSDC_PATCH_BIT and MSDC_PATCH_BIT1 registers and use them in place of "magic numbers" writes during initialization. This commit brings no functional differences. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250325110701.52623-2-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit c63d25cdc59ae2891b39ba2da950910291d9bcbf Author: Luke Wang Date: Fri Mar 28 19:25:17 2025 +0800 mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend For SoCs like i.MX6UL(L/Z) and i.MX7D, USDHC powers off completely during system power management (PM), causing the internal tuning status to be lost. To address this, save the tuning value when system suspend and restore it for any command issued after system resume when re-tuning is held. A typical case involves SDIO WiFi devices with the MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ flag, which retain power during system PM. To conserve power, WiFi switches to 1-bit mode and restores 4-bit mode upon resume. As per the specification, tuning commands are not supported in 1-bit mode. When sending CMD52 to restore 4-bit mode, re-tuning must be held. However, CMD52 still requires a correct sample point to avoid CRC errors, necessitating preservation of the previous tuning value. Signed-off-by: Luke Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250328112517.2624806-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson commit dfc29a10c43d3f2aec853c9bf8b0d9e8f0251a2f Author: Ulf Hansson Date: Mon Apr 7 17:27:55 2025 +0200 mmc: core: Add support for graceful host removal for SD An mmc host driver may allow to unbind from its corresponding host device. If an SD card is attached to the host, the mmc core will just try to cut the power for it, without obeying to the SD spec that potentially may damage the card. Let's fix this problem by implementing a graceful power-down of the card at host removal. Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250407152759.25160-6-ulf.hansson@linaro.org commit 5b793522904e315c7bd3c4c9db96b1ab98cd9714 Author: Ulf Hansson Date: Mon Apr 7 17:27:54 2025 +0200 mmc: core: Add support for graceful host removal for eMMC An mmc host driver may allow to unbind from its corresponding host device. If an eMMC card is attached to the host, the mmc core will just try to cut the power for it, without obeying to the eMMC spec. Potentially this may damage the card and it may also prevent us from successfully doing a re-initialization of it, which would typically happen if/when we try to re-bind the mmc host driver. To fix these problems, let's implement a graceful power-down of the card at host removal. Reported-by: Wolfram Sang Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250407152759.25160-5-ulf.hansson@linaro.org commit 900ef5355861aa33d712c7e7d8fcf923e762b4cd Author: Ulf Hansson Date: Mon Apr 7 17:27:53 2025 +0200 mmc: core: Convert into an enum for the poweroff-type for eMMC Currently we are only distinguishing between the suspend and the shutdown scenarios, which make a bool sufficient as in-parameter to the various PM functions for eMMC. However, to prepare for adding support for another scenario in a subsequent change, let's convert into using an enum. Suggested-by: Wolfram Sang Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250407152759.25160-4-ulf.hansson@linaro.org commit fa34c940e830e7af37b57f5fcdb17e2fc03dbf7f Author: Ulf Hansson Date: Mon Apr 7 17:27:52 2025 +0200 mmc: core: Further avoid re-storing power to the eMMC before a shutdown To manage a graceful power-off of the eMMC card during platform shutdown, the prioritized option is to use the poweroff-notification command, if the eMMC card supports it. During a suspend request we may decide to fall back to use the sleep command, instead of the poweroff-notification, unless the mmc host supports a complete power-cycle of the eMMC. For this reason, we may need to restore power and re-initialize the card, if it remains suspended when a shutdown request is received. However, the current condition to restore power and re-initialize the card doesn't take into account MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND properly. This may lead to doing a re-initialization when it really isn't needed, as the eMMC may already have been powered-off using the poweroff-notification command. Let's fix the condition to avoid this. Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250407152759.25160-3-ulf.hansson@linaro.org commit 3953e7e8c1eaab9cd96ca45d420fb4561111294f Author: Ulf Hansson Date: Mon Apr 7 17:27:51 2025 +0200 mmc: core: Convert mmc_can_poweroff_notify() into a bool It's really a true/false value that matters, let's make it clear by returning a bool instead. Reviewed-by: Avri Altman Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250407152759.25160-2-ulf.hansson@linaro.org commit 9510b38dc0ba358c93cbf5ee7c28820afb85937b Author: Erick Shepherd Date: Mon Mar 31 17:13:37 2025 -0500 mmc: Add quirk to disable DDR50 tuning Adds the MMC_QUIRK_NO_UHS_DDR50_TUNING quirk and updates mmc_execute_tuning() to return 0 if that quirk is set. This fixes an issue on certain Swissbit SD cards that do not support DDR50 tuning where tuning requests caused I/O errors to be thrown. Signed-off-by: Erick Shepherd Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250331221337.1414534-1-erick.shepherd@ni.com Signed-off-by: Ulf Hansson commit 7473647c350cfe9e071bfc2fa4ac5a3cc5ced8a0 Author: Wolfram Sang Date: Mon Mar 31 08:43:17 2025 +0200 mmc: renesas_sdhi: improve registering irqs The probe() function is convoluted enough, so merge sanity checks for number of irqs into one place. Also, change the error code for 'no irq' because ENXIO will not print a warning from the driver core. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250331064400.16677-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 8e127dbbf6c363e6b4bb486d631d936fd6d1646d Author: Lad Prabhakar Date: Wed Mar 26 14:39:37 2025 +0000 dt-bindings: mmc: renesas,sdhi: Document RZ/V2N support Add SDHI bindings for the Renesas RZ/V2N (a.k.a R9A09G056) SoC. Use `renesas,sdhi-r9a09g057` as a fallback since the SD/MMC block on RZ/V2N is identical to the one on RZ/V2H(P), allowing reuse of the existing driver without modifications. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250326143945.82142-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Ulf Hansson commit 44aa44051ffcb9fe2f230120c57d67c56f0d2d0f Author: Rob Herring (Arm) Date: Thu Mar 20 16:35:48 2025 -0500 dt-bindings: mmc: marvell,xenon-sdhci: Drop requiring 2 clocks The "axi" clock is optional on at least the "marvell,armada-ap806-sdhci" variant. Not sure what's correct here, so just drop the constraint. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250320-dt-marvell-mmc-v1-3-e51002ea0238@kernel.org Signed-off-by: Ulf Hansson commit 3974f06454ce1e8ee79581bab41ad587032dc671 Author: Rob Herring (Arm) Date: Thu Mar 20 16:35:47 2025 -0500 dt-bindings: mmc: marvell,xenon-sdhci: Add reference to sdhci-common.yaml The Marvell xenon-sdhci block is an SDHCI and can use properties from sdhci-common.yaml, so change the reference. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250320-dt-marvell-mmc-v1-2-e51002ea0238@kernel.org Signed-off-by: Ulf Hansson commit cff4ca59f946b53d155b48c07c9c02e30fac8de0 Author: Rob Herring (Arm) Date: Thu Mar 20 16:35:46 2025 -0500 dt-bindings: mmc: marvell,xenon-sdhci: Allow "dma-coherent" and "iommus" The Marvell xenon-sdhci block can be cache-coherent and needs the "dma-coherent" property. It can also be behind an IOMMU and needs the "iommus" property. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250320-dt-marvell-mmc-v1-1-e51002ea0238@kernel.org Signed-off-by: Ulf Hansson commit 6f3e123439662b29736b02ea35b94049b103b7e1 Author: Rob Herring (Arm) Date: Thu Mar 20 16:19:21 2025 -0500 dt-bindings: mmc: Remove redundant sdhci.txt The properties in sdhci.txt are documented in sdhci-common.yaml, too. Remove the txt binding. Signed-off-by: Rob Herring (Arm) Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250320211922.1135669-1-robh@kernel.org Signed-off-by: Ulf Hansson commit 7871da20d484d5c7e536bfd52845b6be4488ff30 Author: Zhang Yi Date: Wed Apr 23 16:52:55 2025 +0800 ext4: introduce ext4_check_map_extents_env() debug helper Loading and modifying the extents tree and extent status tree without holding the inode's i_rwsem or the mapping's invalidate_lock is not permitted, except during the I/O writeback. Add a new debug helper ext4_check_map_extents_env(), it will verify whether the extent loading/modifying context is safe. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-8-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 0b8e0bd45007d5740391e658c2581bd614207387 Author: Zhang Yi Date: Wed Apr 23 16:52:54 2025 +0800 ext4: factor out is_special_ino() Factor out the helper is_special_ino() to facilitate the checking of special inodes in the subsequent patches. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-7-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit f22a0ef2231a7d8374bb021eb86404d0e9de5a02 Author: Zhang Yi Date: Wed Apr 23 16:52:53 2025 +0800 ext4: prevent stale extent cache entries caused by concurrent get es_cache The EXT4_IOC_GET_ES_CACHE and EXT4_IOC_PRECACHE_EXTENTS currently invokes ext4_ext_precache() to preload the extent cache without holding the inode's i_rwsem. This can result in stale extent cache entries when competing with operations such as ext4_collapse_range() which calls ext4_ext_remove_space() or ext4_ext_shift_extents(). The problem arises when ext4_ext_remove_space() temporarily releases i_data_sem due to insufficient journal credits. During this interval, a concurrent EXT4_IOC_GET_ES_CACHE or EXT4_IOC_PRECACHE_EXTENTS may cache extent entries that are about to be deleted. As a result, these cached entries become stale and inconsistent with the actual extents. Loading the extents cache without holding the inode's i_rwsem or the mapping's invalidate_lock is not permitted besides during the writeback. Fix this by holding the i_rwsem during EXT4_IOC_GET_ES_CACHE and EXT4_IOC_PRECACHE_EXTENTS. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 151ff9325e5e17c97839a00b740726656b04647b Author: Zhang Yi Date: Wed Apr 23 16:52:52 2025 +0800 ext4: prevent stale extent cache entries caused by concurrent fiemap The ext4_fiemap() currently invokes ext4_ext_precache() and iomap_fiemap() to preload the extent cache and query mapping information without holding the inode's i_rwsem. This can result in stale extent cache entries when competing with operations such as ext4_collapse_range() which calls ext4_ext_remove_space() or ext4_ext_shift_extents(). The problem arises when ext4_ext_remove_space() temporarily releases i_data_sem due to insufficient journal credits. During this interval, a concurrent ext4_fiemap() may cache extent entries that are about to be deleted. As a result, these cached entries become stale and inconsistent with the actual extents. Loading the extents cache without holding the inode's i_rwsem or the mapping's invalidate_lock is not permitted besides during the writeback. Fix this by holding the i_rwsem in ext4_fiemap(). Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-5-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 402e38e6b71f5739119ca3107f375e112d63c7c5 Author: Zhang Yi Date: Wed Apr 23 16:52:51 2025 +0800 ext4: prevent stale extent cache entries caused by concurrent I/O writeback Currently, in the I/O writeback path, ext4_map_blocks() may attempt to cache additional unrelated extents in the extent status tree without holding the inode's i_rwsem and the mapping's invalidate_lock. This can lead to stale extent status entries remaining in certain scenarios, potentially causing data corruption. For example, when performing a collapse range in ext4_collapse_range(), it clears the extent cache and dirty pages before removing blocks and shifting extents. It also holds the i_data_sem during these two operations. However, both ext4_ext_remove_space() and ext4_ext_shift_extents() may briefly release the i_data_sem if journal credits are insufficient (ext4_datasem_ensure_credits()). If another writeback process writes dirty pages from other regions during this interval, it may cache extents that are about to be modified. Unless ext4_collapse_range() explicitly clears the extent cache again, these cached entries can become stale and inconsistent with the actual extents. 0 a n b c m | | | | | | [www][wwwwww][wwwwwwww]...[wwwww][wwww]... | | N M Assume that block a is dirty. The collapse range operation is removing data from n to m and drops i_data_sem immediately after removing the extent from b to c. At the same time, a concurrent writeback begins to write back block a; it will reloads the extent from [n, b) into the extent status tree since it does not hold the i_rwsem or the invalidate_lock. After the collapse range operation, it left the stale extent [n, b), which points logical block n to N, but the actual physical block of n should be M. Similarly, both ext4_insert_range() and ext4_truncate() have the same problem. ext4_punch_hole() survived since it re-add a hole extent entry after removing space since commit 9f1118223aa0 ("ext4: add a hole extent entry in cache after punch"). In most cases, during dirty page writeback, the block mapping information is likely to be found in the extent cache, making it less necessary to search for physical extents. Consequently, loading unrelated extent caches during writeback appears to be ineffective. Therefore, fix this by adds EXT4_EX_NOCACHE in the writeback path to prevent caching of unrelated extents, eliminating this potential source of corruption. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 86b349ce0312a397a6961e457108556e44a3d211 Author: Zhang Yi Date: Wed Apr 23 16:52:50 2025 +0800 ext4: generalize EXT4_GET_BLOCKS_IO_SUBMIT flag usage Currently, the EXT4_GET_BLOCKS_IO_SUBMIT flag is only used during data writeback to indicate that in ordered mode, the journal commit thread should skip re-submitting data and simply wait for I/O completion. To prepare for later patches that need to detect I/O submission context in ext4_map_blocks(), generalizes the meaning of EXT4_GET_BLOCKS_IO_SUBMIT. This flag will be set during: 1) data I/O writeback, 2) I/O completion extents conversion, 3) journal performing commit in fast_commit. This change doesn't affect current usage of this flag and provides a clear way to identify I/O submission context. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 53ce42accd2002cc490fc86000ac532530507a74 Author: Zhang Yi Date: Wed Apr 23 16:52:49 2025 +0800 ext4: ext4: unify EXT4_EX_NOCACHE|NOFAIL flags in ext4_ext_remove_space() When removing space, we should use EXT4_EX_NOCACHE because we don't need to cache extents, and we should also use EXT4_EX_NOFAIL to prevent metadata inconsistencies that may arise from memory allocation failures. While ext4_ext_remove_space() already uses these two flags in most places, they are missing in ext4_ext_search_right() and read_extent_tree_block() calls. Unify the flags to ensure consistent behavior throughout the extent removal process. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250423085257.122685-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 7d33e0ee5f98b3fc74566fa00d0926bc5deb8174 Author: Fabrizio Castro Date: Wed Apr 23 15:34:22 2025 +0100 arm64: dts: renesas: r9a09g057: Add DMAC nodes Add nodes for the DMAC IPs found on the Renesas RZ/V2H(P) SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20250423143422.3747702-7-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit 7de873201c44bff5b42f2e560098d463843b8a4c Author: Fabrizio Castro Date: Wed Apr 23 15:34:21 2025 +0100 dmaengine: sh: rz-dmac: Add RZ/V2H(P) support The DMAC IP found on the Renesas RZ/V2H(P) family of SoCs is similar to the version found on the Renesas RZ/G2L family of SoCs, but there are some differences: * It only uses one register area * It only uses one clock * It only uses one reset * Instead of using MID/IRD it uses REQ No * It is connected to the Interrupt Control Unit (ICU) * On the RZ/G2L there is only 1 DMAC, on the RZ/V2H(P) there are 5 Add specific support for the Renesas RZ/V2H(P) family of SoC by tackling the aforementioned differences. Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250423143422.3747702-6-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit 056a8aac1fce52da9ad0b6488eb074e3846f37c0 Author: Fabrizio Castro Date: Wed Apr 23 15:34:20 2025 +0100 dmaengine: sh: rz-dmac: Allow for multiple DMACs dma_request_channel() calls into __dma_request_channel() with NULL as value for np, which won't allow for the selection of the correct DMAC when multiple DMACs are available. Switch to using __dma_request_channel() directly so that we can choose the desired DMA for the channel. This is in preparation of adding DMAC support for the Renesas RZ/V2H(P) and similar SoCs. Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250423143422.3747702-5-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit 9002b75aa8e6f034ffbd1c1ccac46927a1cf0f12 Author: Fabrizio Castro Date: Wed Apr 23 15:34:19 2025 +0100 irqchip/renesas-rzv2h: Add rzv2h_icu_register_dma_req() On the Renesas RZ/V2H(P) family of SoCs, DMAC IPs are connected to the Interrupt Control Unit (ICU). For DMA transfers, a request number must be registered with the ICU, which means that the DMAC driver has to be able to instruct the ICU driver with the registration of such id. Export rzv2h_icu_register_dma_req() so that the DMAC driver can register the DMAC request number. Signed-off-by: Fabrizio Castro Reviewed-by: Thomas Gleixner Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250423143422.3747702-4-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit 22228b933ce2639d67168fd35423c1be196edab0 Author: Fabrizio Castro Date: Wed Apr 23 15:34:18 2025 +0100 dt-bindings: dma: rz-dmac: Document RZ/V2H(P) family of SoCs Document the Renesas RZ/V2H(P) family of SoCs DMAC block. The Renesas RZ/V2H(P) DMAC is very similar to the one found on the Renesas RZ/G2L family of SoCs, but there are some differences: * It only uses one register area * It only uses one clock * It only uses one reset * Instead of using MID/IRD it uses REQ No * It is connected to the Interrupt Control Unit (ICU) Signed-off-by: Fabrizio Castro Acked-by: Conor Dooley Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250423143422.3747702-3-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit ec52f10a31dc69c1ded30812bd17335ac23b1c60 Author: Fabrizio Castro Date: Wed Apr 23 15:34:17 2025 +0100 dt-bindings: dma: rz-dmac: Restrict properties for RZ/A1H Make sure we don't allow for the clocks, clock-names, resets, reset-names. and power-domains properties for the Renesas RZ/A1H SoC because its DMAC doesn't have clocks, resets, and power domains. Fixes: 209efec19c4c ("dt-bindings: dma: rz-dmac: Document RZ/A1H SoC") Signed-off-by: Fabrizio Castro Acked-by: Conor Dooley Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250423143422.3747702-2-fabrizio.castro.jz@renesas.com Signed-off-by: Vinod Koul commit 31f04b537152675adca2f97582660e3f178dcfff Author: Vinicius Costa Gomes Date: Wed Mar 12 15:15:10 2025 -0700 dmaengine: idxd: Narrow the restriction on BATCH to ver. 1 only Allow BATCH operations to be submitted and the capability to be exposed for DSA version 2 (or later) devices. DSA version 2 devices allow safe submission of BATCH operations. Signed-off-by: Anil Keshavamurthy Signed-off-by: Vinicius Costa Gomes Reviewed-by: Dave Jiang Reported-by: Yi Sun Tested-by: Yi Sun Link: https://lore.kernel.org/r/20250312221511.277954-1-vinicius.gomes@intel.com Signed-off-by: Vinod Koul commit fd447415e74bccd7362f760d4ea727f8e1ebfe91 Author: Henry Martin Date: Wed Apr 2 10:39:00 2025 +0800 dmaengine: ti: Add NULL check in udma_probe() devm_kasprintf() returns NULL when memory allocation fails. Currently, udma_probe() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA") Signed-off-by: Henry Martin Reviewed-by: Nathan Lynch Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20250402023900.43440-1-bsdhenrymartin@gmail.com Signed-off-by: Vinod Koul commit 00ff4d68a9ae4c9315c166f1fafa47f4c0a65f6f Author: Ben Collins Date: Mon May 5 13:53:07 2025 -0400 fsldma: Set correct dma_mask based on hw capability The driver currently hardcodes DMA_BIT_MASK to 36-bits, which is only correct on eloplus: elo3 supports 40-bits eloplus supports 36-bits elo supports 32-bits This is based on 0x08 cdar register documention in the respective reference manuals. Set the dma mask accordingly. Feedback from Arnd Bergmann: - Use match data to set address bit mask Signed-off-by: Ben Collins Cc: Arnd Bergmann Cc: Vinod Koul Cc: linuxppc-dev@lists.ozlabs.org Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/2025050513-complex-crane-2babb6@boujee-and-buff Signed-off-by: Vinod Koul commit a3cd12acb7b74d9b243cd893209972fc657d0bd3 Author: Andre Przywara Date: Mon May 5 17:47:29 2025 +0100 arm64: dts: allwinner: a100: add Liontron H-A133L board support The H-A133L board is an industrial development board made by Liontron. It contains a number of dedicated JST connectors, to connect external peripherals. It features: - Allwinner A133 SoC (4 * Arm Cortex-A53 cores at up to 1.6 GHz) - 1 GiB, 2 GiB or 4 GiB of LPDDR4 DRAM - between 16 and 128 GiB eMMC flash - AXP707 PMIC (compatible to AXP803) - 100 Mbit/s RJ45 Ethernet socket, using an JLSemi JL1101 PHY - XR829 WIFI+Bluetooth chip - 2 * USB 2.0 USB-A ports, plus three sets of USB pins on connectors (connected via a USB hub connected to USB1 on the SoC) - microSD card slot - 3.5mm A/V port - 12V power supply - connectors for an LVDS or MIPI-DSI panel Add the devicetree describing the board's peripherals and their connections. Despite being a devboard, the manufacturer does not publish a schematic (I asked), so the PMIC rail assignments were bases on BSP dumps, educated guesses and some experimentation. Dropping the always-on property from any of the rails carrying it will make the board hang as soon as the kernel turns off unused regulators. Signed-off-by: Andre Przywara Link: https://patch.msgid.link/20250505164729.18175-4-andre.przywara@arm.com [wens@csie.org: fix property in &usbphy; fix comment typo in &usb_otg] Signed-off-by: Chen-Yu Tsai commit 17502e7d7b7113346296f6758324798d536c31fd Author: Yi Sun Date: Fri May 9 08:03:04 2025 +0800 dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using Running IDXD workloads in a container with the /dev directory mounted can trigger a call trace or even a kernel panic when the parent process of the container is terminated. This issue occurs because, under certain configurations, Docker does not properly propagate the mount replica back to the original mount point. In this case, when the user driver detaches, the WQ is destroyed but it still calls destroy_workqueue() attempting to completes all pending work. It's necessary to check wq->wq and skip the drain if it no longer exists. Signed-off-by: Yi Sun Reviewed-by: Dave Jiang Reviewed-by: Anil S Keshavamurthy Link: https://lore.kernel.org/r/20250509000304.1402863-1-yi.sun@intel.com Signed-off-by: Vinod Koul commit 7e01511443c30a55a5ae78d3debd46d4d872517e Author: Thomas Gessler Date: Wed May 7 20:21:01 2025 +0200 dmaengine: xilinx_dma: Set dma_device directions Coalesce the direction bits from the enabled TX and/or RX channels into the directions bit mask of dma_device. Without this mask set, dma_get_slave_caps() in the DMAEngine fails, which prevents the driver from being used with an IIO DMAEngine buffer. Signed-off-by: Thomas Gessler Reviewed-by: Suraj Gupta Tested-by: Folker Schwesinger Link: https://lore.kernel.org/r/20250507182101.909010-1-thomas.gessler@brueckmann-gmbh.de Signed-off-by: Vinod Koul commit 543e0ecee19ec6fe7bca894057f7f9ae063dd5a4 Author: Nícolas F. R. A. Prado Date: Tue May 13 16:59:41 2025 -0400 arm64: defconfig: Enable configs for MediaTek Genio EVK boards Enable the missing configs to get all devices on the MediaTek Genio 1200, 700, 510 and 350 EVK boards probing, as indicated by the DT kselftest. This includes support for: Genio 1200/700/510/350: * MT6359/MT6357 PMICs Auxiliary ADC Genio 1200/700/510: * MDP3 (video scaling and color space conversion IP block) * ITE IT5205 Type-C USB Alternate Mode Passive MUX * Himax HX8279 controller based KD070FHFID078 DSI panel Genio 700/510: * Richtek RT1715 USB Type-C PD Controller Genio 1200: * MediaTek PCIe PHY * Mediatek MT6360 USB Type-C Port Controller Genio 350: * STARTEK KD070FHFID015 DSI panel * MediaTek UART DMA controller (APDMA) Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250513-genio-defconfig-v1-1-c3862f91b6b2@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit f52cd248d844f9451858992f924988ac413fdc7e Author: Vignesh Raman Date: Mon May 12 18:49:24 2025 +0530 arm64: defconfig: mediatek: enable PHY drivers The mediatek display driver fails to probe on mt8173-elm-hana and mt8183-kukui-jacuzzi-juniper-sku16 in v6.14-rc4 due to missing PHY configurations. Commit 924d66011f24 ("drm/mediatek: stop selecting foreign drivers") stopped selecting the MediaTek PHY drivers, requiring them to be explicitly enabled in defconfig. Enable the following PHY drivers for MediaTek platforms: CONFIG_PHY_MTK_HDMI=m for HDMI display CONFIG_PHY_MTK_MIPI_DSI=m for DSI display CONFIG_PHY_MTK_DP=m for DP display Fixes: 924d66011f24 ("drm/mediatek: stop selecting foreign drivers") Reviewed-by: Nícolas F. R. A. Prado Signed-off-by: Vignesh Raman Link: https://lore.kernel.org/r/20250512131933.1247830-1-vignesh.raman@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 21e12738779f74d9ae63faa995f5743656eadc07 Author: Sheetal Date: Mon May 12 05:00:10 2025 +0000 dmaengine: tegra210-adma: Add Tegra264 support Add Tegra264 ADMA support with following changes: - Add soc_data for Tegra264-specific variations. - Tegra264 supports 64 channels and 10 pages, hence update the global page configuration. - In Tegra264 FIFO and outstanding request configs are moved to global registers, hence add those registers offset in adma channel struct. Also, 'has_outstanding_reqs' is removed and configuration moved to the SoC data. - Update channel direction and mode bit positions as per Tegra264. - Register offsets are updated to align with Tegra264. Signed-off-by: Sheetal Link: https://lore.kernel.org/r/20250512050010.1025259-3-sheetal@nvidia.com Signed-off-by: Vinod Koul commit b81cd165e4a5599bd96c11adf40872fcbc5fa54f Author: Sheetal Date: Mon May 12 05:00:09 2025 +0000 dt-bindings: Document Tegra264 ADMA support Add Tegra264 ADMA support to the device tree bindings documentation. The Tegra264 ADMA hardware supports 64 DMA channels and requires specific register configurations. Signed-off-by: Sheetal Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250512050010.1025259-2-sheetal@nvidia.com Signed-off-by: Vinod Koul commit d7130902abb40e96f1ff486b9d143c006bf553e0 Author: Devendra K Verma Date: Tue May 13 12:33:14 2025 +0530 dmaengine: dw-edma: Add HDMA NATIVE map check The HDMA IP supports the HDMA_NATIVE map format as part of Vendor-Specific Extended Capability. Added the check for HDMA_NATIVE map format. The check for map format enables the IP specific function invocation during the DMA ops. Signed-off-by: Devendra K Verma Link: https://lore.kernel.org/r/20250513070314.577823-1-devverma@amd.com Signed-off-by: Vinod Koul commit 51590571433e32cacce10b11051c6ff056bf0aa8 Author: Brady Norander Date: Sun Mar 30 09:08:45 2025 -0400 ASoC: amd: use new ACP dev names for DAI links On AMD SoC platforms with an ACP2x gpu ip block (such as stoneyridge), the amdgpu driver will create several platform devices for the ACP ASoC driver to communicate with the ACP hardware block on the gpu. These platform devices include dma for audio and one or multiple i2s interfaces. The amdgpu driver has always created these platform devices with automatic ids. The ASoC machine drives hardcode the platform device name. This creates an issue where if the ACP platform devices are not the first to be created, the ids can be different to what the machine drivers expect, causing them to not find the ACP platform devices and failing to load. Switch to using static ids for these ACP platform devices so that the names never change. Depends on patch: drm/amdgpu: use static ids for ACP platform devs [1] [1] https://lore.kernel.org/all/20250325210517.2097188-1-bradynorander@gmail.com/ Signed-off-by: Brady Norander Link: https://patch.msgid.link/20250330130844.37870-2-bradynorander@gmail.com Signed-off-by: Mark Brown commit 0e4e9d75899cae4e7f379c50fa3d0121eff9641f Author: Krzysztof Kozlowski Date: Wed May 14 12:57:03 2025 +0200 ASoC: dt-bindings: mediatek: Simplify mediatek,clk-provider "mediatek,clk-provider" property is a string, not an string array, thus "items" is not really correct. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250514105702.28622-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 5fb3878216aece471af030b33a9fbef3babd8617 Author: I Hsin Cheng Date: Tue May 6 02:54:23 2025 +0800 ASoC: intel/sdw_utils: Assign initial value in asoc_sdw_rt_amp_spk_rtd_init() Initialize "ret" with "-EINVAL" to handle cases where "strstr()" for "codec_dai->component->name_prefix" doesn't find "-1" nor "-2". In that case "name_prefix" is invalid because for current implementation it's expected to have either "-1" or "-2" in it. (Maybe "-3", "-4" and so on in the future.) Link: https://scan5.scan.coverity.com/#/project-view/36179/10063?selectedIssue=1627120 Signed-off-by: I Hsin Cheng Link: https://patch.msgid.link/20250505185423.680608-1-richard120310@gmail.com Signed-off-by: Mark Brown commit 751bcc022fd13fa16222d1793147073a56574c7f Merge: 9f080c9f2099b5 6dfe26cb1c290f Author: Ilpo Järvinen Date: Wed May 14 15:57:29 2025 +0300 Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into for-next commit 9cfdd7752ba5f8cc9b8191e8c9aeeec246241fa4 Author: Nícolas F. R. A. Prado Date: Wed May 14 08:36:06 2025 -0400 regulator: dt-bindings: mt6357: Drop fixed compatible requirement Some of the regulators on the MT6357 PMIC currently reference the fixed-regulator dt-binding, which enforces the presence of a regulator-fixed compatible. However since all regulators on the MT6357 PMIC are handled by a single mt6357-regulator driver, probed through MFD, the compatibles don't serve any purpose. In fact they cause failures in the DT kselftest since they aren't probed by the fixed regulator driver as would be expected. Furthermore this is the only dt-binding in this family like this: mt6359-regulator and mt6358-regulator don't require those compatibles. Commit d77e89b7b03f ("arm64: dts: mediatek: mt6357: Drop regulator-fixed compatibles") removed the compatibles from Devicetree, but missed updating the binding, which still requires them, introducing dt-binding errors. Remove the compatible requirement by referencing the plain regulator dt-binding instead to fix the dt-binding errors. Fixes: d77e89b7b03f ("arm64: dts: mediatek: mt6357: Drop regulator-fixed compatibles") Signed-off-by: Nícolas F. R. A. Prado Link: https://patch.msgid.link/20250514-mt6357-regulator-fixed-compatibles-removal-bindings-v1-1-2421e9cc6cc7@collabora.com Signed-off-by: Mark Brown commit cb422594d62066a51add87f3dac760b11d62ef48 Author: Chun-Tse Shao Date: Tue May 13 14:45:03 2025 -0700 perf test: Add stat uniquifying test The `stat+uniquify.sh` test retrieves all uniquified `clockticks` events from `perf list -v clockticks` and check if `perf stat -e clockticks -A` contains all of them. Committer testing: root@x1:~# grep -m1 "model name" /proc/cpuinfo model name : 13th Gen Intel(R) Core(TM) i7-1365U root@x1:~# perf list clockticks List of pre-defined events (to be used in -e or -M): uncore_clock/clockticks/ [Kernel PMU event] uncore memory: unc_m_clockticks [Number of clocks. Unit: uncore_imc] root@x1:~# root@x1:~# perf test uniquifying 92: perf stat events uniquifying : Ok root@x1:~# perf test -vv uniquifying 92: perf stat events uniquifying: --- start --- test child forked, pid 1552628 stat event uniquifying test ---- end(0) ---- 92: perf stat events uniquifying : Ok root@x1:~# Signed-off-by: Chun-Tse Shao Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250513215401.2315949-4-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a0982afa0992a9b9ecfe610d6a31fc05bb15a05a Author: Seyediman Seyedarab Date: Mon May 12 21:57:26 2025 -0400 cpufreq: drop redundant cpus_read_lock() from store_local_boost() Lockdep reports a possible circular locking dependency [1] when cpu_hotplug_lock is acquired inside store_local_boost(), after policy->rwsem has already been taken by store(). However, the boost update is strictly per-policy and does not access shared state or iterate over all policies. Since policy->rwsem is already held, this is enough to serialize against concurrent topology changes for the current policy. Remove the cpus_read_lock() to resolve the lockdep warning and avoid unnecessary locking. [1] ====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc6-debug-gb01fc4eca73c #1 Not tainted ------------------------------------------------------ power-profiles-/588 is trying to acquire lock: ffffffffb3a7d910 (cpu_hotplug_lock){++++}-{0:0}, at: store_local_boost+0x56/0xd0 but task is already holding lock: ffff8b6e5a12c380 (&policy->rwsem){++++}-{4:4}, at: store+0x37/0x90 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&policy->rwsem){++++}-{4:4}: down_write+0x29/0xb0 cpufreq_online+0x7e8/0xa40 cpufreq_add_dev+0x82/0xa0 subsys_interface_register+0x148/0x160 cpufreq_register_driver+0x15d/0x260 amd_pstate_register_driver+0x36/0x90 amd_pstate_init+0x1e7/0x270 do_one_initcall+0x68/0x2b0 kernel_init_freeable+0x231/0x270 kernel_init+0x15/0x130 ret_from_fork+0x2c/0x50 ret_from_fork_asm+0x11/0x20 -> #1 (subsys mutex#3){+.+.}-{4:4}: __mutex_lock+0xc2/0x930 subsys_interface_register+0x7f/0x160 cpufreq_register_driver+0x15d/0x260 amd_pstate_register_driver+0x36/0x90 amd_pstate_init+0x1e7/0x270 do_one_initcall+0x68/0x2b0 kernel_init_freeable+0x231/0x270 kernel_init+0x15/0x130 ret_from_fork+0x2c/0x50 ret_from_fork_asm+0x11/0x20 -> #0 (cpu_hotplug_lock){++++}-{0:0}: __lock_acquire+0x10ed/0x1850 lock_acquire.part.0+0x69/0x1b0 cpus_read_lock+0x2a/0xc0 store_local_boost+0x56/0xd0 store+0x50/0x90 kernfs_fop_write_iter+0x132/0x200 vfs_write+0x2b3/0x590 ksys_write+0x74/0xf0 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x56/0x5e Signed-off-by: Seyediman Seyedarab Link: https://patch.msgid.link/20250513015726.1497-1-ImanDevel@gmail.com Signed-off-by: Rafael J. Wysocki commit 137359b7895f61cd07fcdbaf9d195567bde8cc85 Author: Ian Rogers Date: Tue May 13 14:45:02 2025 -0700 perf parse-events: Use wildcard processing to set an event to merge into The merge stat code fails for uncore events if they are repeated twice, for example `perf stat -e clockticks,clockticks -I 1000` as the counts of the second set of uncore events will be merged into the first counter. Reimplement the logic to have a first_wildcard_match so that merged later events correctly merge into the first wildcard event that they will be aggregated into. Signed-off-by: Ian Rogers Tested-by: Chun-Tse Shao Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250513215401.2315949-3-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7d45f402d3117e0be6de8a19034249abf7606705 Author: Ian Rogers Date: Tue May 13 14:45:01 2025 -0700 perf evlist: Make uniquifying counter names consistent 'perf stat' has different uniquification logic to 'perf record' and perf top. In the case of perf record and 'perf top' all hybrid event names are uniquified. 'perf stat' is more disciplined respecting name config terms, libpfm4 events, etc. 'perf stat' will uniquify hybrid events and the non-core PMU cases shouldn't apply to perf record or 'perf top'. For consistency, remove the uniquification for 'perf record' and 'perf top' and reuse the 'perf stat' uniquification, making the code more globally visible for this. Fix the detection of cross-PMU for disabling uniquify by correctly setting last_pmu. When setting uniquify on an evsel, make sure the PMUs between the 2 considered events differ otherwise the uniquify isn't adding value. Signed-off-by: Ian Rogers Tested-by: Chun-Tse Shao Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250513215401.2315949-2-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0ddce5549012a3f3b9ddcf59822aa0d1be61e8e8 Author: Jarkko Nikula Date: Tue May 13 14:17:39 2025 +0300 hwmon: (lm75) Fix I3C transfer buffer pointer for incoming data Use the I3C private transfer input buffer pointer for incoming data instead of output buffer. For now this is harmless since both of those pointers are union members but may confuse when reading the code. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20250513111739.508886-1-jarkko.nikula@linux.intel.com Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck commit 1ef3095b14057c6898468e90184bd0942977fbad Author: Ryan Roberts Date: Mon May 12 16:03:31 2025 +0100 arm64/mm: Permit lazy_mmu_mode to be nested lazy_mmu_mode is not supposed to permit nesting. But in practice this does happen with CONFIG_DEBUG_PAGEALLOC, where a page allocation inside a lazy_mmu_mode section (such as zap_pte_range()) will change permissions on the linear map with apply_to_page_range(), which re-enters lazy_mmu_mode (see stack trace below). The warning checking that nesting was not happening was previously being triggered due to this. So let's relax by removing the warning and tolerate nesting in the arm64 implementation. The first (inner) call to arch_leave_lazy_mmu_mode() will flush and clear the flag such that the remainder of the work in the outer nest behaves as if outside of lazy mmu mode. This is safe and keeps tracking simple. Code review suggests powerpc deals with this issue in the same way. ------------[ cut here ]------------ WARNING: CPU: 6 PID: 1 at arch/arm64/include/asm/pgtable.h:89 __apply_to_page_range+0x85c/0x9f8 Modules linked in: ip_tables x_tables ipv6 CPU: 6 UID: 0 PID: 1 Comm: systemd Not tainted 6.15.0-rc5-00075-g676795fe9cf6 #1 PREEMPT Hardware name: QEMU KVM Virtual Machine, BIOS 2024.08-4 10/25/2024 pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __apply_to_page_range+0x85c/0x9f8 lr : __apply_to_page_range+0x2b4/0x9f8 sp : ffff80008009b3c0 x29: ffff80008009b460 x28: ffff0000c43a3000 x27: ffff0001ff62b108 x26: ffff0000c43a4000 x25: 0000000000000001 x24: 0010000000000001 x23: ffffbf24c9c209c0 x22: ffff80008009b4d0 x21: ffffbf24c74a3b20 x20: ffff0000c43a3000 x19: ffff0001ff609d18 x18: 0000000000000001 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000003 x14: 0000000000000028 x13: ffffbf24c97c1000 x12: ffff0000c43a3fff x11: ffffbf24cacc9a70 x10: ffff0000c43a3fff x9 : ffff0001fffff018 x8 : 0000000000000012 x7 : ffff0000c43a4000 x6 : ffff0000c43a4000 x5 : ffffbf24c9c209c0 x4 : ffff0000c43a3fff x3 : ffff0001ff609000 x2 : 0000000000000d18 x1 : ffff0000c03e8000 x0 : 0000000080000000 Call trace: __apply_to_page_range+0x85c/0x9f8 (P) apply_to_page_range+0x14/0x20 set_memory_valid+0x5c/0xd8 __kernel_map_pages+0x84/0xc0 get_page_from_freelist+0x1110/0x1340 __alloc_frozen_pages_noprof+0x114/0x1178 alloc_pages_mpol+0xb8/0x1d0 alloc_frozen_pages_noprof+0x48/0xc0 alloc_pages_noprof+0x10/0x60 get_free_pages_noprof+0x14/0x90 __tlb_remove_folio_pages_size.isra.0+0xe4/0x140 __tlb_remove_folio_pages+0x10/0x20 unmap_page_range+0xa1c/0x14c0 unmap_single_vma.isra.0+0x48/0x90 unmap_vmas+0xe0/0x200 vms_clear_ptes+0xf4/0x140 vms_complete_munmap_vmas+0x7c/0x208 do_vmi_align_munmap+0x180/0x1a8 do_vmi_munmap+0xac/0x188 __vm_munmap+0xe0/0x1e0 __arm64_sys_munmap+0x20/0x38 invoke_syscall+0x48/0x104 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x4c/0x16c el0t_64_sync_handler+0x10c/0x140 el0t_64_sync+0x198/0x19c irq event stamp: 281312 hardirqs last enabled at (281311): [] bad_range+0x164/0x1c0 hardirqs last disabled at (281312): [] el1_dbg+0x24/0x98 softirqs last enabled at (281054): [] handle_softirqs+0x4cc/0x518 softirqs last disabled at (281019): [] __do_softirq+0x14/0x20 ---[ end trace 0000000000000000 ]--- Fixes: 5fdd05efa1cd ("arm64/mm: Batch barriers when updating kernel mappings") Reported-by: Catalin Marinas Closes: https://lore.kernel.org/linux-arm-kernel/aCH0TLRQslXHin5Q@arm.com/ Signed-off-by: Ryan Roberts Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20250512150333.5589-1-ryan.roberts@arm.com Signed-off-by: Will Deacon commit b81c688426a9785bcae93bab3705ed2cd5fab175 Author: Ryan Roberts Date: Mon May 12 11:22:40 2025 +0100 arm64/mm: Disable barrier batching in interrupt contexts Commit 5fdd05efa1cd ("arm64/mm: Batch barriers when updating kernel mappings") enabled arm64 kernels to track "lazy mmu mode" using TIF flags in order to defer barriers until exiting the mode. At the same time, it added warnings to check that pte manipulations were never performed in interrupt context, because the tracking implementation could not deal with nesting. But it turns out that some debug features (e.g. KFENCE, DEBUG_PAGEALLOC) do manipulate ptes in softirq context, which triggered the warnings. So let's take the simplest and safest route and disable the batching optimization in interrupt contexts. This makes these users no worse off than prior to the optimization. Additionally the known offenders are debug features that only manipulate a single PTE, so there is no performance gain anyway. There may be some obscure case of encrypted/decrypted DMA with the dma_free_coherent called from an interrupt context, but again, this is no worse off than prior to the commit. Some options for supporting nesting were considered, but there is a difficult to solve problem if any code manipulates ptes within interrupt context but *outside of* a lazy mmu region. If this case exists, the code would expect the updates to be immediate, but because the task context may have already been in lazy mmu mode, the updates would be deferred, which could cause incorrect behaviour. This problem is avoided by always ensuring updates within interrupt context are immediate. Fixes: 5fdd05efa1cd ("arm64/mm: Batch barriers when updating kernel mappings") Reported-by: syzbot+5c0d9392e042f41d45c5@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-arm-kernel/681f2a09.050a0220.f2294.0006.GAE@google.com/ Signed-off-by: Ryan Roberts Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20250512102242.4156463-1-ryan.roberts@arm.com Signed-off-by: Will Deacon commit eff82fb0d266eeaea26f99780c5d8987974df2e9 Author: Jouni Högander Date: Tue May 13 08:48:14 2025 +0300 drm/i915/alpm: Stop writing ALPM registers when PSR is enabled Currently we are seeing these on PTL: xe 0000:00:02.0: [drm] *ERROR* Timeout waiting for DDI BUF A to get active These seem to be caused by writing ALPM registers while Panel Replay is enabled. Fix this by writing ALPM registers only when Panel Replay is about to be enabled. v4: improve comment on intel_psr_panel_replay_enable_sink call v3: enable/disable ALPM from PSR code Fixes: 172757acd6f6 ("drm/i915/lobf: Add lobf enablement in post plane update") Signed-off-by: Jouni Högander Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250513054814.3702977-3-jouni.hogander@intel.com (cherry picked from commit a8eb102ce0944a9de2a62aa9d195861b7f26668a) Signed-off-by: Joonas Lahtinen commit 411c869ab8e46a7d51e65ad570376349b92a88f5 Author: Jouni Högander Date: Tue May 13 08:48:13 2025 +0300 drm/i915/alpm: Make intel_alpm_enable_sink available for PSR We want to enable sink ALPM from PSR code. Make intel_alpm_enable_sink available for PSR. v2: do not add kerneldoc comments Reviewed-by: Suraj Kandpal Signed-off-by: Jouni Högander Link: https://lore.kernel.org/r/20250513054814.3702977-2-jouni.hogander@intel.com (cherry picked from commit 2d278488761f0b5be651a3db41e615a964123d6c) Signed-off-by: Joonas Lahtinen commit bbcacab2e8ee373eb8f4bc613912e7c203deb820 Author: Christoph Hellwig Date: Wed May 7 08:06:35 2025 +0200 brd: avoid extra xarray lookups on first write The xarray can return the previous entry at a location. Use this fact to simplify the brd code when there is no existing page at a location. This also slighly improves the handling of racy discards as we now always have a page under RCU protection by the time we are ready to copy the data. Signed-off-by: Christoph Hellwig Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20250507060700.3929430-1-hch@lst.de Signed-off-by: Jens Axboe commit 62ada17a6217a50fbd1b23f10899890f56effc97 Author: Bard Liao Date: Thu May 8 14:20:29 2025 +0800 soundwire: only compute port params in specific stream states Currently, sdw_compute_master_ports() is blindly called for every single Manager runtime. However, we should not take into account the stream's bandwidth if the stream is just allocated or already deprepared. Fixes: 25befdf32aa4 ("soundwire: generic_bandwidth_allocation: count the bandwidth of active streams only") Link: https://github.com/thesofproject/linux/issues/5398 Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20250508062029.6596-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 1e332795d00655305cf0ae40be4e2eaa9a399d79 Author: Lukas Bulwahn Date: Wed May 14 08:55:13 2025 +0200 block: Remove obsolete configs BLK_MQ_{PCI,VIRTIO} Commit 9bc1e897a821 ("blk-mq: remove unused queue mapping helpers") makes the two config options, BLK_MQ_PCI and BLK_MQ_VIRTIO, have no remaining effect. Remove the two obsolete config options. Signed-off-by: Lukas Bulwahn Reviewed-by: Daniel Wagner Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20250514065513.463941-1-lukas.bulwahn@redhat.com Signed-off-by: Jens Axboe commit d028b57b77f91e4643abd661640f345cd34522b6 Author: Peter Ujfalusi Date: Wed Apr 30 15:47:14 2025 +0800 ASoC: SOF: Intel: hda: Set the mic_privacy flag for soundwire with ACE3+ The microphone privacy feature is introduced with ACE3, the soundwire driver needs to know this to be able to print the PVCCS register via register dump in sysfs. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20250430074714.94000-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e1f3f5be9e8e730290ebe6d490383af4d77f0f38 Author: Peter Ujfalusi Date: Wed Apr 30 15:47:13 2025 +0800 soundwire: intel: Add awareness of ACE3+ microphone privacy ACE3 introduced microphone privacy and along this feature it adds a new register in vendor specific SHIM to control and status reporting. The control of mic privacy via the SHIM register is only to enable the interrupt generation via soundwire, but not handled by the soundwire code as the mic privacy is not a feature of the soundwire IP. On the other hand, printing the register value brings value for debugging, so add a new flag to allow this conditionally. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20250430074714.94000-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit aab12022b076f0b385b7a9a78e1161bd2df5d1e3 Author: Charles Keepax Date: Tue Apr 29 11:18:08 2025 +0100 soundwire: bus: Add internal slave ID and use for IRQs Currently the SoundWire IRQ code uses the dev_num to create an IRQ mapping for each slave. However, there is an issue there, the dev_num is only allocated when the slave enumerates on the bus and enumeration may happen before or after probe of the slave driver. In the case enumeration happens after probe of the slave driver then the IRQ mapping will use dev_num before it is set. This could cause multiple slaves to use zero as their IRQ mapping. It is very desirable to have the IRQ mapped before the slave probe is called, so drivers can do resource allocation in probe as normal. To solve these issues add an internal ID created for each slave when it is probed and use that for mapping the IRQ. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20250429101808.348462-3-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 5b1a2927c4f63878d2c108cebad09358e69caa20 Author: Charles Keepax Date: Tue Apr 29 11:18:07 2025 +0100 soundwire: bus: Simplify sdw_assign_device_num() Simplify the code in sdw_assign_device_num(). Remove the new_device flag which can be simply handled inline and do a bit less shuffling of dev_num in and out of various variables. This patch should cause no functional changes. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20250429101808.348462-2-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 1064013303c6dd59f1586656f853765c6e870f8b Author: Conor Dooley Date: Mon May 12 14:48:15 2025 +0100 riscv: dts: renesas: Add specific RZ/Five cache compatible When the binding was originally written, it was assumed that all ax45mp-caches had the same properties etc. This has turned out to be incorrect, as the QiLai SoC has a different number of cache-sets. Add a specific compatible for the RZ/Five for property enforcement and in case there turns out to be additional differences between these implementations of the cache controller. Acked-by: Ben Zong-You Xie Signed-off-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/20250512-sphere-plenty-8ce4cd772745@spud Signed-off-by: Geert Uytterhoeven commit fb30a7c5964235f674d92fd12bd68f688f366067 Author: Geert Uytterhoeven Date: Mon May 12 10:45:12 2025 +0200 arm64: dts: renesas: sparrow-hawk: Disable dtc spi_bus_bridge check make dtbs: arch/arm64/boot/dts/renesas/r8a779g0.dtsi:1269.24-1283.5: Warning (spi_bus_bridge): /soc/spi@e6ea0000: incorrect #address-cells for SPI bus also defined at arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts:471.9-486.3 arch/arm64/boot/dts/renesas/r8a779g0.dtsi:1269.24-1283.5: Warning (spi_bus_bridge): /soc/spi@e6ea0000: incorrect #size-cells for SPI bus also defined at arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts:471.9-486.3 arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' The Sparrow Hawk uses the MSIOF module in I2S mode instead of SPI mode, triggering a conflict between the SPI bus bindings and dtc: - Serial engines that can be SPI controllers must use "spi" as their node names, - Dtc assumes nodes named "spi" are always SPI controllers. Fix this by disabling this specific warning for this board. Fixes: ca764d5321a2cee7 ("arm64: dts: renesas: sparrow-hawk: Add MSIOF Sound support") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/20250506192033.77338015@canb.auug.org.au Suggested-by: Rob Herring Link: https://lore.kernel.org/fbad3581f297d5b95a3b2813bbae7dba25a523fd.1747039399.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven commit 0c22287319741b4e7c7beaedac1f14fbe01a03b9 Author: Vidya Sagar Date: Thu May 8 10:50:21 2025 +0530 phy: tegra: p2u: Broaden architecture dependency Replace the ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC dependency with a more generic ARCH_TEGRA check for the Tegra194 PIPE2UPHY PHY driver. This allows the PHY driver to be built on all Tegra platforms instead of being limited to specific SoCs. Link: https://patchwork.kernel.org/project/linux-pci/patch/20250128044244.2766334-1-vidyas@nvidia.com/ Signed-off-by: Vidya Sagar Acked-by: Thierry Reding Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20250508052021.4135874-1-vidyas@nvidia.com Signed-off-by: Vinod Koul commit 80edd21db00c0829c276baafa8871ae02c6e9d91 Author: Frank Wang Date: Tue Apr 15 13:00:05 2025 +0800 phy: rockchip: inno-usb2: Add usb2 phy support for rk3562 RK3652 has one USB2.0 PHY with two ports, the OTG port support OTG and BC1.2, the SoC provide USB GRF and APB to access the registers. This adds vbus detection function control and make the below tuning to enhance the usb2-phy SQ for RK3562 SoC. - enable pre-emphasis during non-chirp phase - set HS eye height to 425mv Signed-off-by: Frank Wang Signed-off-by: William Wu Signed-off-by: Kever Yang Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250415050005.52773-2-kever.yang@rock-chips.com Signed-off-by: Vinod Koul commit abf55cdf9c5e58bac1feaff2e21bec43b898746c Author: Kever Yang Date: Tue Apr 15 13:00:04 2025 +0800 dt-bindings: phy: rockchip,inno-usb2phy: add rk3562 Add compatible for the USB2 phy in the Rockchip RK3562 SoC. Signed-off-by: Kever Yang Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250415050005.52773-1-kever.yang@rock-chips.com Signed-off-by: Vinod Koul commit 3ca48b955bb34a3b07dd915318d73a23740de282 Author: Heiko Stuebner Date: Sat May 3 22:15:11 2025 +0200 phy: rockchip: inno-usb2: add phy definition for rk3036 The usb2phy on rk3036 is very similar to rk3128 but not 100% identical. While most registers and bits are the same, a small fraction did get moved around. So we can re-use the phy-tuning function, but need a new set a bits. The biggest change might be that the phy on rk3036 does not support the charger detection, that rk3128 (and newer phys) have. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503201512.991277-3-heiko@sntech.de Signed-off-by: Vinod Koul commit d78b565371314e48242cb9383d0f9d331119ab2e Author: Heiko Stuebner Date: Sat May 3 22:15:10 2025 +0200 dt-bindings: phy: rockchip,inno-usb2phy: add rk3036 compatible Add compatible for the USB2 phy in the Rockchip RK3036 SoC. Apart from some bits that got swapped around in the phy registers, the block is nearly the same as the one on the rk3128. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250503201512.991277-2-heiko@sntech.de Signed-off-by: Vinod Koul commit 676e8cf70cb0533e1118e29898c9a9c33ae3a10f Author: Peter Zijlstra Date: Fri May 9 13:36:59 2025 +0200 sched,livepatch: Untangle cond_resched() and live-patching With the goal of deprecating / removing VOLUNTARY preempt, live-patch needs to stop relying on cond_resched() to make forward progress. Instead, rely on schedule() with TASK_FREEZABLE set. Just like live-patching, the freezer needs to be able to stop tasks in a safe / known state. [bigeasy: use likely() in __klp_sched_try_switch() and update comments] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Reviewed-by: Petr Mladek Tested-by: Petr Mladek Tested-by: Miroslav Benes Acked-by: Miroslav Benes Acked-by: Josh Poimboeuf Link: https://lore.kernel.org/r/20250509113659.wkP_HJ5z@linutronix.de commit 46a87260fc4f719f58e07a53cc1b70a38d98da37 Author: Adam Ford Date: Sun May 4 15:40:42 2025 -0500 phy: freescale: fsl-samsung-hdmi: Improve LUT search for best clock Searching the look-up-table runs so long as the frequency in the table is at or below the desired rate. This works well in most cases, but the next entry in the LUT might be closer to the nominal value than the lower one. Add some logic to check the higer value is any closer to the nominal value and use it. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20250504204043.418924-3-aford173@gmail.com Signed-off-by: Vinod Koul commit 41db4623346777be6ce694338b5adc570c4b671d Author: Adam Ford Date: Sun May 4 15:40:41 2025 -0500 phy: freescale: fsl-samsung-hdmi: Refactor finding PHY settings There are two functions, round_rate and set_rate that duplicate a lot of the same work, so simplify the code by creating a helper function that will identify the phy settings for a desired clock rate and return the structure with the corresponding settings. >From this structure, the round_rate and set_rate can both get what they need to achieve the clock setting closest to the desired rate as possible while minimizing the duplicated code. Also rename phy_clk_set_rate to fsl_samsung_hdmi_phy_clk_set_rate. Suggested-by: Uwe Kleine-König Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20250504204043.418924-2-aford173@gmail.com Signed-off-by: Vinod Koul commit be79213b4f9ab6e5abf870b97f8a1cab5bf049b3 Author: Adam Ford Date: Sun May 4 15:40:40 2025 -0500 phy: freescale: fsl-samsung-hdmi: Rename phy_clk_round_rate phy_clk_round_rate sounds like a generic helper function. In reality, it is unique to the phy-fsl-samsung-hdmi. Rename phy_clk_round_rate to fsl_samsung_hdmi_phy_clk_round_rate. No functional change intended. Suggested-by: Uwe Kleine-König Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20250504204043.418924-1-aford173@gmail.com Signed-off-by: Vinod Koul commit 3767474d7497a4d03f58118d02b742b903626d03 Author: Lad Prabhakar Date: Mon Apr 14 15:57:29 2025 +0100 phy: renesas: phy-rcar-gen3-usb2: Add USB2.0 PHY support for RZ/V2H(P) Add USB2.0 PHY support for RZ/V2H(P) SoC. On the RZ/V2H(P) SoC we need to configure the UTMI to a specific value as compared to other SoCs (which doesn't need configuring it). Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20250414145729.343133-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 9414ceb38a74470249dee69784d6079daa452c3a Author: Lad Prabhakar Date: Mon Apr 14 15:57:28 2025 +0100 phy: renesas: phy-rcar-gen3-usb2: Sort compatible entries by SoC part number Reorder the compatible entries in `rcar_gen3_phy_usb2_match_table` to maintain sorting based on SoC part numbers. Keep the entries ordered numerically while ensuring the existing generic compatible strings remain at the bottom. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20250414145729.343133-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 9c4fbefc962dd13694b4a5051f432ed435c92220 Author: Lad Prabhakar Date: Mon Apr 14 15:57:27 2025 +0100 dt-bindings: phy: renesas,usb2-phy: Document RZ/V2H(P) SoC Document USB2.0 phy bindings for RZ/V2H(P) ("R9A09gG57") SoC. RZ/V2H(P) USB2.0 phy is similar to one found on the RZ/G2L SoC, but it needs additional configuration to be done as compared RZ/G2L USB2.0 phy. To handle this difference a SoC specific compat string is added for RZ/V2H(P) SoC. Like the RZ/G2L SoC, the RZ/V2H(P) USB2.0 PHY requires the `resets` property and has two clocks. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250414145729.343133-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 31eebeef8cdd4c9bddc9d34053cab6553616d0b7 Author: Lad Prabhakar Date: Mon Apr 14 15:57:26 2025 +0100 dt-bindings: phy: renesas,usb2-phy: Add clock constraint for RZ/G2L family The RZ/G2L family requires two clocks for USB2 PHY, which are already defined in the DTSI files. Add a constraint in the DT binding document to ensure validation with `dtbs_check`. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250414145729.343133-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 4ed9d82bf5b21d65e2f18249eec89a6a84df8f23 Author: Josh Poimboeuf Date: Wed May 7 16:56:55 2025 -0700 objtool: Speed up SHT_GROUP reindexing After elf_update_group_sh_info() was introduced, a prototype version of "objtool klp diff" went from taking ~1s to several minutes, due to looping almost endlessly in elf_update_group_sh_info() while creating thousands of local symbols in a file with thousands of sections. Dramatically improve the performance by marking all symbols' correlated SHT_GROUP sections while reading the object. That way there's no need to search for it every time a symbol gets reindexed. Fixes: 2cb291596e2c ("objtool: Fix up st_info in COMDAT group section") Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Tested-by: Rong Xu Link: https://lkml.kernel.org/r/2a33e583c87e3283706f346f9d59aac20653b7fd.1746662991.git.jpoimboe@kernel.org commit d23bc38e8aa4efbd617bf660bb1a25fee9f6c177 Author: Mao Jinlong Date: Tue May 6 23:37:16 2025 -0700 coresight: tmc: fix failure to disable/enable ETF after reading ETF may fail to re-enable after reading, and driver->reading will not be set to false, this will cause failure to enable/disable to ETF. This change set driver->reading to false even if re-enabling fail. Fixes: 669c4614236a ("coresight: tmc: Don't enable TMC when it's not ready.") Co-developed-by: Yuanfang Zhang Signed-off-by: Yuanfang Zhang Signed-off-by: Mao Jinlong [ Added a comment to explain why we ignore the error ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250507063716.1945213-1-quic_jinlmao@quicinc.com commit 5161890f13623175924376bc423edb63d9cb28b5 Author: Leo Yan Date: Tue Apr 1 19:07:08 2025 +0100 Documentation: coresight: Document AUX pause and resume This adds description for AUX pause and resume. It gives introduction for what's AUX pause and resume and records usage examples. Signed-off-by: Leo Yan Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-8-leo.yan@arm.com commit 973f47a9886ac45525985790dffbf5ddeb5097a9 Author: Leo Yan Date: Tue Apr 1 19:07:07 2025 +0100 coresight: perf: Update buffer on AUX pause Due to sinks like ETR and ETB don't support interrupt handling, the hardware trace data might be lost for continuous running tasks. This commit takes advantage of the AUX pause for updating trace buffer to mitigate the trace data losing issue. The per CPU sink has its own interrupt handling. Thus, there will be a race condition between the updating buffer in NMI and sink's interrupt handler. To avoid the race condition, this commit disallows updating buffer on AUX pause for the per CPU sink. Currently, this is only applied for TRBE. Signed-off-by: Leo Yan Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-7-leo.yan@arm.com commit d5f7e4bea90f2e0630b0c76b0f6cf64304c5b514 Author: Leo Yan Date: Tue Apr 1 19:07:06 2025 +0100 coresight: tmc: Re-enable sink after buffer update The buffer update callbacks disable the sink before syncing data but misses to re-enable it afterward. This is fine in the general flow, because the sink will be re-enabled the next time the PMU event is activated. However, during AUX pause and resume, if the sink is disabled in the buffer update callback, there is no chance to re-enable it when AUX resumes. To address this, the callbacks now check the event state 'event->hw.state'. If the event is an active state (0), the sink is re-enabled. For the TMC ETR driver, buffer updates are not fully protected by the driver's spinlock. In this case, the sink is not re-enabled if its reference counter is 0, in order to avoid race conditions where the sink may have been completely disabled. Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-6-leo.yan@arm.com commit abffe22e93d7a25b69a8884fda6a50ed81d7ae06 Author: Leo Yan Date: Tue Apr 1 19:07:05 2025 +0100 coresight: perf: Support AUX trace pause and resume This commit supports AUX trace pause and resume in a perf session for Arm CoreSight. First, we need to decide which flag can indicate the CoreSight PMU event has started. The 'event->hw.state' cannot be used for this purpose because its initial value and the value after hardware trace enabling are both 0. On the other hand, the context value 'ctxt->event_data' stores the ETM private info. This pointer is valid only when the PMU event has been enabled. It is safe to permit AUX trace pause and resume operations only when it is not a NULL pointer. To achieve fine-grained control of the pause and resume, only the tracer is disabled and enabled. This avoids the unnecessary complexity and latency caused by manipulating the entire link path. Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-5-leo.yan@arm.com commit 0814151bae4b50d49514666b5f06920ce3eb829b Author: Leo Yan Date: Tue Apr 1 19:07:04 2025 +0100 coresight: etm4x: Hook pause and resume callbacks Add callbacks for pausing and resuming the tracer. A "paused" flag in the driver data indicates whether the tracer is paused. If the flag is set, the driver will skip starting the hardware trace. The flag is always set to false for the sysfs mode, meaning the tracer will never be paused in the case. Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-4-leo.yan@arm.com commit 5fa96c83b81e50833274f3b450ee9a8c0b2172bc Author: Leo Yan Date: Tue Apr 1 19:07:03 2025 +0100 coresight: Introduce pause and resume APIs for source Introduce APIs for pausing and resuming trace source and export as GPL symbols. Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-3-leo.yan@arm.com commit 40f682ae5086366d51e29e66eb8a344501245d0d Author: Leo Yan Date: Tue Apr 1 19:07:02 2025 +0100 coresight: etm4x: Extract the trace unit controlling The trace unit is controlled in the ETM hardware enabling and disabling. The sequential changes for support AUX pause and resume will reuse the same operations. Extract the operations in the etm4_{enable|disable}_trace_unit() functions. A minor improvement in etm4_enable_trace_unit() is for returning the timeout error to callers. Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250401180708.385396-2-leo.yan@arm.com commit cc52a697f87e8b2d88298827aca3f81398385572 Author: Ivaylo Ivanov Date: Sun May 4 17:45:27 2025 +0300 phy: exynos5-usbdrd: support Exynos USBDRD 3.2 4nm controller Add support for the Exynos USB 3.2 DRD 4nm controller. It's used in recent 4nm SoCs like Exynos2200 and Exynos2400. This device consists of 3 underlying and independent phys: SEC link control phy, Synopsys eUSB 2.0 and Synopsys USBDP/SS combophy. Unlike older device designs, where the internal phy blocks were all IP of Samsung, Synopsys phys are present. This means that the link controller is now mapped differently to account for missing bits and registers. The Synopsys phys also have separate register bases. As there are non-SEC PHYs present now, it doesn't make much sense to implement them in this driver. They are expected to be configured by external drivers, so pass phandles to them. USBDRD3.2 link controller set up is still required beforehand. This commit adds the necessary changes for USB HS to work. USB SS and DisplayPort are out of scope in this commit and will be introduced in the future. Signed-off-by: Ivaylo Ivanov Link: https://lore.kernel.org/r/20250504144527.1723980-11-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit c4098f3e6134e79e070ec44c58976e1f00d9bfad Author: Ivaylo Ivanov Date: Sun May 4 17:45:26 2025 +0300 phy: phy-snps-eusb2: add support for exynos2200 The Exynos2200 SoC reuses the Synopsis eUSB2 PHY IP, alongside an external repeater, for USB 2.0. Add support for it to the existing driver, while keeping in mind that it requires enabled more than the reference clock. Signed-off-by: Ivaylo Ivanov Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-10-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit e36a5d1ecc5f2bda92e4f954f41d65d1ddd5728e Author: Ivaylo Ivanov Date: Sun May 4 17:45:25 2025 +0300 phy: phy-snps-eusb2: refactor reference clock init Instead of matching frequencies with a switch and case, introduce a table-based lookup. This improves readability, reduces redundancy, and makes it easier to extend support for additional frequencies in the future. Signed-off-by: Ivaylo Ivanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-9-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit aba7a966b50d11deeb3e2f1a66182d150eeb7843 Author: Ivaylo Ivanov Date: Sun May 4 17:45:24 2025 +0300 phy: phy-snps-eusb2: make reset control optional Not all SoCs expose the reset line controls to the kernel, so make them optional. Signed-off-by: Ivaylo Ivanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-8-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit d460be705ae599c0cbfc1ee4ba6a41b225525609 Author: Ivaylo Ivanov Date: Sun May 4 17:45:23 2025 +0300 phy: phy-snps-eusb2: make repeater optional As described in the device tree bindings, it's not necessary for the SNPS eUSB2 phy to be connected to a repeater. In configurations where there are such instances, the driver probing fails and the usb controller does not work. Make the repeater optional to avoid that, which also lets us use the eUSB2 phy when it's connected to a repeater that is not configurable by the kernel (for example it's missing a driver), as long as it has been configured beforehand (usually by the bootloader). Signed-off-by: Ivaylo Ivanov Acked-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-7-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit 3983b4e9746da1b6091f1d9083f44ed3f12717cb Author: Ivaylo Ivanov Date: Sun May 4 17:45:22 2025 +0300 phy: phy-snps-eusb2: split phy init code The current phy init consists of hardware power-up, as well as QCOM-specific eUSB2 init code. Split it into two parts, to make room for such non-QCOM init code. Signed-off-by: Ivaylo Ivanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-6-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit 93dbe9b5b3a265c7e5466c7b6ada439b01577de5 Author: Ivaylo Ivanov Date: Sun May 4 17:45:21 2025 +0300 phy: phy-snps-eusb2: refactor constructs names As the driver now resides outside the phy subdirectory under a different name, refactor all definitions, structures and functions to explicitly specify what code is Qualcomm-specific and what is not. Signed-off-by: Ivaylo Ivanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-5-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit 8d3b5f6375466ffcd2cd98a0c84d31295470fe9d Author: Ivaylo Ivanov Date: Sun May 4 17:45:20 2025 +0300 phy: move phy-qcom-snps-eusb2 out of its vendor sub-directory As not only Qualcomm, but also Samsung is using the Synopsys eUSB2 IP (albeit with a different register layout) in their newer SoCs, move the driver out of its vendor sub-directory and rename it to phy-snps-eusb2. Suggested-by: Krzysztof Kozlowski Signed-off-by: Ivaylo Ivanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504144527.1723980-4-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit e4c9a7b475e5d0d9b2440ee48f91d1364eabd6cb Author: Ivaylo Ivanov Date: Sun May 4 17:45:19 2025 +0300 dt-bindings: phy: samsung,usb3-drd-phy: add exynos2200 support Document support for Exynos2200. As the USBDRD 3.2 4nm controller consists of Synopsys eUSB2.0 phy and USBDP/SS combophy, which will be handled by external drivers, define only the bus clocked used by the link controller. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250504144527.1723980-3-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit 59cf7546079e3d08d105369c48f8834970290082 Author: Ivaylo Ivanov Date: Sun May 4 17:45:18 2025 +0300 dt-bindings: phy: add exynos2200 eusb2 phy support Document the exynos2200 eUSB2 compatible. Unlike the currently documented Qualcomm SoCs, the driver doesn't make use of reset lines for reset control and uses more clocks. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250504144527.1723980-2-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Vinod Koul commit 1c7161ef0164716fdf4618b50747bd3002625e38 Author: Christoph Hellwig Date: Wed May 14 06:44:20 2025 +0200 xfs: remove the EXPERIMENTAL warning for pNFS The pNFS layout support has been around for 10 years without major issues, drop the EXPERIMENTAL warning. Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit ca43b74ac3040ae13be854e6a71ebd7a91e5fcfc Author: Darrick J. Wong Date: Tue May 13 07:35:29 2025 -0700 xfs: remove some EXPERIMENTAL warnings Online fsck was finished a year ago, in Linux 6.10. The exchange-range syscall and parent pointers were merged in the same cycle. None of these have encountered any serious errors in the year that they've been in the kernel (or the many many years they've been under development) so let's drop the shouty warnings. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit fe3aebf27dc1875b2a0d13431e2e8cf3cf350cca Author: Steven Chen Date: Tue May 13 07:31:29 2025 -0700 ima: do not copy measurement list to kdump kernel Kdump kernel doesn't need IMA to do integrity measurement. Hence the measurement list in 1st kernel doesn't need to be copied to kdump kernel. Here skip allocating buffer for measurement list copying if loading kdump kernel. Then there won't be the later handling related to ima_kexec_buffer. Signed-off-by: Steven Chen Tested-by: Baoquan He Acked-by: Baoquan He Signed-off-by: Mimi Zohar commit 6e7d71b3a0f9732863b6a1366c9d875cec52c842 Merge: c0a5c4084709a7 4abb9052a72bc9 Author: Carlos Maiolino Date: Wed May 14 12:38:53 2025 +0200 Merge branch 'atomic_writes-6.16' into xfs-6.16-merge Required update due to conflict with patch: xfs: stop using set_blocksize Conflicts: fs/xfs/xfs_buf.c Signed-off-by: Carlos Maiolino commit 7dd20bf2f010430b75b109e4d4101cd1616afba3 Author: Marc Zyngier Date: Tue May 13 17:31:44 2025 +0100 irqchip/gic-v3-its: Use allocation size from the prepare call Now that .msi_prepare() gets called at the right time and not with semi-random parameters, remove the ugly hack that tried to fix up the number of allocated vectors. It is now correct by construction. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513163144.2215824-6-maz@kernel.org commit 03c298760ed97c5981402d64c4eed9bc4f2f0a4e Author: Marc Zyngier Date: Tue May 13 17:31:43 2025 +0100 genirq/msi: Engage the .msi_teardown() callback on domain removal Kindly inform the MSI driver that the domain is torn down, providing the allocation context previously populated on domain creation. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513163144.2215824-5-maz@kernel.org commit 1396e89e09f00deb816e5f4a176d71d554922292 Author: Marc Zyngier Date: Tue May 13 17:31:42 2025 +0100 genirq/msi: Move prepare() call to per-device allocation The current device MSI infrastructure is subtly broken, as it will issue an .msi_prepare() callback into the MSI controller driver every time it needs to allocate an MSI. That's pretty wrong, as the contract (or unwarranted assumption, depending who you ask) between the MSI controller and the core code is that .msi_prepare() is called exactly once per device. This leads to some subtle breakage in some MSI controller drivers, as it gives the impression that there are multiple endpoints sharing a bus identifier (RID in PCI parlance, DID for GICv3+). It implies that whatever allocation the ITS driver (for example) has done on behalf of these devices cannot be undone, as there is no way to track the shared state. This is particularly bad for wire-MSI devices, for which .msi_prepare() is called for each input line. To address this issue, move the call to .msi_prepare() to take place at the point of irq domain allocation, which is the only place that makes sense. The msi_alloc_info_t structure is made part of the msi_domain_template, so that its life-cycle is that of the domain as well. Finally, the msi_info::alloc_data field is made to point at this allocation tracking structure, ensuring that it is carried around the block. This is all pretty straightforward, except for the non-device-MSI leftovers, which still have to call .msi_prepare() at the old spot. One day... Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513163144.2215824-4-maz@kernel.org commit 713335b6ee29f0045737a1ddfc685bc6040d4baf Author: Marc Zyngier Date: Tue May 13 17:31:41 2025 +0100 irqchip/gic-v3-its: Implement .msi_teardown() callback The ITS driver currently nukes the structure representing an endpoint device translating via an ITS on freeing the last LPI allocated for it. That's an unfortunate state of affair, as it is pretty common for a driver to allocate a single MSI, do something clever, teardown this MSI, and reallocate a whole bunch of them. The NVME driver does exactly that, amongst others. What happens in that case is that the core code is accidentaly issuing another .msi_prepare() call, even if it shouldn't. This luckily cancels the above behaviour and hides the problem. In order to fix the core code, start by implementing the new .msi_teardown() callback. Nothing calls it yet, so a side effect is that the its_dev structure will not be freed and that the DID will stay mapped. Not a big deal, and this will be solved in following patches. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513163144.2215824-3-maz@kernel.org commit 28026cf2dd84d961a62123b1fa941dc3c2c4a132 Author: Marc Zyngier Date: Tue May 13 17:31:40 2025 +0100 genirq/msi: Add .msi_teardown() callback as the reverse of .msi_prepare() While the MSI ops do have a .msi_prepare() callback that is responsible for setting up the relevant (usually per-device) allocation, there is no callback reversing this setup. For this purpose, add .msi_teardown() callback. In order to avoid breaking the ITS driver that suffers from related issues, do not call the callback just yet. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513163144.2215824-2-maz@kernel.org commit c0a5c4084709a78117c1c372aa4f813e1a98c313 Author: Zizhi Wo Date: Tue May 6 09:15:40 2025 +0800 xfs: Remove deprecated xfs_bufd sysctl parameters Commit 64af7a6ea5a4 ("xfs: remove deprecated sysctls") removed the deprecated xfsbufd-related sysctl interface, but forgot to delete the corresponding parameters: "xfs_buf_timer" and "xfs_buf_age". This patch removes those parameters and makes no other changes. Signed-off-by: Zizhi Wo Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino commit 6348f62ef7ecc5855b710a7d4ea682425c38bb80 Author: Daniele Palmas Date: Tue Apr 1 11:34:58 2025 +0200 bus: mhi: host: pci_generic: Add Telit FN920C04 modem support Add SDX35 based modem Telit FN920C04. $ lspci -vv 01:00.0 Unassigned class [ff00]: Qualcomm Device 011a Subsystem: Device 1c5d:2020 Signed-off-by: Daniele Palmas Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250401093458.2953872-1-dnlplm@gmail.com commit ce7cc522e9ffbad8663cb0b69eba928107b5909c Author: Subramanian Ananthanarayanan Date: Wed Apr 16 10:49:51 2025 +0530 bus: mhi: host: pci_generic: Remove redundant assign resource usage Avoid redundant usage of pci_assign_resource for BAR allocation. This is already taken care by PCI framework. Invocation of this API leads to unnecessary relocation of BAR space to a new memory address. Signed-off-by: Subramanian Ananthanarayanan Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krishna Chaitanya Chundru Link: https://patch.msgid.link/20250416-remove_assin_resource-v1-1-e92dd361fa0a@quicinc.com commit 4d92e7c5ccadc79764674ffc2c88d329aabbb7e0 Author: Jeff Hugo Date: Fri Mar 28 10:35:26 2025 -0600 bus: mhi: host: Fix conflict between power_up and SYSERR When mhi_async_power_up() enables IRQs, it is possible that we could receive a SYSERR notification from the device if the firmware has crashed for some reason. Then the SYSERR notification queues a work item that cannot execute until the pm_mutex is released by mhi_async_power_up(). So the SYSERR work item will be pending. If mhi_async_power_up() detects the SYSERR, it will handle it. If the device is in PBL, then the PBL state transition event will be queued, resulting in a work item after the pending SYSERR work item. Once mhi_async_power_up() releases the pm_mutex, the SYSERR work item can run. It will blindly attempt to reset the MHI state machine, which is the recovery action for SYSERR. PBL/SBL are not interrupt driven and will ignore the MHI Reset unless SYSERR is actively advertised. This will cause the SYSERR work item to timeout waiting for reset to be cleared, and will leave the host state in SYSERR processing. The PBL transition work item will then run, and immediately fail because SYSERR processing is not a valid state for PBL transition. This leaves the device uninitialized. This issue has a fairly unique signature in the kernel log: mhi mhi3: Requested to power ON Qualcomm Cloud AI 100 0000:36:00.0: Fatal error received from device. Attempting to recover mhi mhi3: Power on setup success mhi mhi3: Device failed to exit MHI Reset state mhi mhi3: Device MHI is not in valid state We cannot remove the SYSERR handling from mhi_async_power_up() because the device may be in the SYSERR state, but we missed the notification as the irq was fired before irqs were enabled. We also can't queue the SYSERR work item from mhi_async_power_up() if SYSERR is detected because that may result in a duplicate work item, and cause the same issue since the duplicate item will blindly issue MHI reset even if SYSERR is no longer active. Instead, add a check in the SYSERR work item to make sure that MHI reset is only issued if the device is in SYSERR state for PBL or SBL EEs. Fixes: a6e2e3522f29 ("bus: mhi: core: Add support for PM state transitions") Signed-off-by: Jeffrey Hugo Signed-off-by: Jeff Hugo Signed-off-by: Manivannan Sadhasivam Reviewed-by: Troy Hanson Reviewed-by: Manivannan Sadhasivam cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250328163526.3365497-1-jeff.hugo@oss.qualcomm.com commit ea31bdece29ac72ebe409cf2bb411abe6e31431a Author: Darrick J. Wong Date: Wed Apr 23 12:54:13 2025 -0700 xfs: stop using set_blocksize XFS has its own buffer cache for metadata that uses submit_bio, which means that it no longer uses the block device pagecache for anything. Create a more lightweight helper that runs the blocksize checks and flushes dirty data and use that instead. No more truncating the pagecache because XFS does not use it or care about it. Signed-off-by: Darrick J. Wong Reviewed-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino commit 6475ece803e7b41d5a3dcffffc35f6482d4cbb4d Merge: f0447f80aec83f 8098514bd5ca98 Author: Carlos Maiolino Date: Wed May 14 12:20:57 2025 +0200 Merge branch 'block-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block into xfs-6.16-merge Merging block tree into XFS because of some dependencies like bdev_validate_blocksize() Signed-off-by: Carlos Maiolino commit 1d6fc048b86b76db73073ded8e84b0fd8757c908 Author: Rob Herring (Arm) Date: Mon Apr 14 20:18:23 2025 -0500 dt-bindings: phy: rockchip: Convert RK3399 PCIe PHY to schema Convert the Rockchip RK3399 PCIe PHY to DT schema format. Move the example to the GRF binding as that has the complete block. Signed-off-by: Rob Herring (Arm) Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250415011824.2320039-1-robh@kernel.org Signed-off-by: Vinod Koul commit e75d564f64661086fcd65ed07268590259893448 Author: Xu Yang Date: Wed Apr 30 17:45:02 2025 +0800 phy: fsl-imx8mq-usb: add i.MX95 tuning support The i.MX8MP and i.MX95 USB3 PHY have different tuning parameter for same tuning field, this will add i.MX95 tuning support. Reviewed-by: Jun Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250430094502.2723983-4-xu.yang_2@nxp.com Signed-off-by: Vinod Koul commit b15ee09ddb987a122e74fb0fdf1bd6e864959fd3 Author: Xu Yang Date: Wed Apr 30 17:45:01 2025 +0800 phy: fsl-imx8mq-usb: fix phy_tx_vboost_level_from_property() The description of TX_VBOOST_LVL is wrong in register PHY_CTRL3 bit[31:29]. The updated description as below: 011: Corresponds to a launch amplitude of 0.844 V. 100: Corresponds to a launch amplitude of 1.008 V. 101: Corresponds to a launch amplitude of 1.156 V. This will fix the parsing function phy_tx_vboost_level_from_property() to return correct value. Fixes: 63c85ad0cd81 ("phy: fsl-imx8mp-usb: add support for phy tuning") Cc: stable@vger.kernel.org Reviewed-by: Jun Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250430094502.2723983-3-xu.yang_2@nxp.com Signed-off-by: Vinod Koul commit 7325e0995f414af1cfa38be965dc47248cb4ec45 Author: Xu Yang Date: Wed Apr 30 17:45:00 2025 +0800 dt-bindings: phy: imx8mq-usb: add imx95 tuning support The parameter value of below 3 properties are USB PHY specific. i.MX8MP and i.MX95 USB PHY has different meanings. This will enlarge parameters value and add constraints for them. - fsl,phy-tx-vref-tune-percent - fsl,phy-tx-rise-tune-percent - fsl,phy-comp-dis-tune-percent Reviewed-by: Jun Li Signed-off-by: Xu Yang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250430094502.2723983-2-xu.yang_2@nxp.com Signed-off-by: Vinod Koul commit 5b3a91b207c00a8d27f75ce8aaa9860844da72c8 Author: Xu Yang Date: Wed Apr 30 17:44:59 2025 +0800 dt-bindings: phy: imx8mq-usb: fix fsl,phy-tx-vboost-level-microvolt property The ticket TKT0676370 shows the description of TX_VBOOST_LVL is wrong in register PHY_CTRL3 bit[31:29]. 011: Corresponds to a launch amplitude of 1.12 V. 010: Corresponds to a launch amplitude of 1.04 V. 000: Corresponds to a launch amplitude of 0.88 V. After updated: 011: Corresponds to a launch amplitude of 0.844 V. 100: Corresponds to a launch amplitude of 1.008 V. 101: Corresponds to a launch amplitude of 1.156 V. This will correct it accordingly. Fixes: b2e75563dc39 ("dt-bindings: phy: imx8mq-usb: add phy tuning properties") Cc: stable@vger.kernel.org Reviewed-by: Jun Li Signed-off-by: Xu Yang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250430094502.2723983-1-xu.yang_2@nxp.com Signed-off-by: Vinod Koul commit 25c36b54eafc98b3ef004e2037cea1328d9b8bc5 Author: Kathiravan Thirumoorthy Date: Tue Apr 15 09:52:51 2025 +0530 phy: qcom-qusb2: reuse the IPQ6018 settings for IPQ5424 With the settings used in the commit 9c56a1de296e ("phy: qcom-qusb2: add QUSB2 support for IPQ5424"), compliance test cases especially eye-diagram (Host High-speed Signal Quality) tests are failing. Reuse the IPQ6018 settings for IPQ5424 as mentioned in the Hardware Design Document which helps to meet all the complaince requirement test cases. Fixes: 9c56a1de296e ("phy: qcom-qusb2: add QUSB2 support for IPQ5424") Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250415-revert_hs_phy_settings-v3-2-3a8f86211b59@oss.qualcomm.com Signed-off-by: Vinod Koul commit 8a040e13afd94a1f91acaf8e0505769d4f7f5af4 Author: Kathiravan Thirumoorthy Date: Tue Apr 15 09:52:50 2025 +0530 Revert "phy: qcom-qusb2: add QUSB2 support for IPQ5424" With the current settings, compliance tests especially eye diagram (Host High-speed Signal Quality) tests are failing. Reuse the IPQ6018 settings to overcome this issue, as mentioned in the Hardware Design Document. So revert the change which introduced the new settings and reuse the IPQ6018 settings in the subsequent patch. Fixes: 9c56a1de296e ("phy: qcom-qusb2: add QUSB2 support for IPQ5424") Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20250415-revert_hs_phy_settings-v3-1-3a8f86211b59@oss.qualcomm.com Signed-off-by: Vinod Koul commit 58eb5721a445ea0af310d1410d7117a1910627bc Author: Jon Hunter Date: Wed May 14 10:50:41 2025 +0100 genirq/manage: Use the correct lock guard in irq_set_irq_wake() Commit 8589e325ba4f ("genirq/manage: Rework irq_set_irq_wake()") updated the irq_set_irq_wake() to use the new guards for locking the interrupt descriptor. However, in doing so it inadvertently changed irq_set_irq_wake() such that the 'chip_bus_lock' is no longer acquired. This has caused system suspend tests to fail on some Tegra platforms. Fix this by correcting the guard used in irq_set_irq_wake() to ensure the 'chip_bus_lock' is held. Fixes: 8589e325ba4f ("genirq/manage: Rework irq_set_irq_wake()") Signed-off-by: Jon Hunter Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250514095041.1109783-1-jonathanh@nvidia.com commit 9f080c9f2099b5a81c85b3b7f95fd11fad428cc8 Author: Werner Sembach Date: Mon May 12 14:54:32 2025 +0200 platform/x86/tuxedo: Prevent invalid Kconfig state It was possible to create a uncompileable config, because of missing "Depends on" statements in the new Kconfig of the TUXEDO platform driver. Signed-off-by: Werner Sembach Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/a1d9134f-0567-4a53-a1e7-a55cd6b189a9@infradead.org/ Link: https://lore.kernel.org/r/20250512125450.31072-1-wse@tuxedocomputers.com Reviewed-by: Ilpo Järvinen Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Ilpo Järvinen commit c8e7d528284a0bb1cd462b994c464bf31d24a0ce Author: Zhang Yi Date: Wed May 14 17:45:46 2025 +0800 ASoC: dt-bindings: Add Everest ES8389 audio CODEC Add device tree binding documentation for Everest ES8389 which is different from ES8388 Signed-off-by: Zhang Yi Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250514094546.35508-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 0319c26889f795bd6a68c42a9af47b41d902eb5d Author: Zhang Yi Date: Wed May 14 17:45:45 2025 +0800 ASoC: codecs: add support for ES8389 The driver is for codec es8389 of everest which is different from ES8388 Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250514094546.35508-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 1bafd82d9a40cf09c6c40f1c09cc35b7050b1a9f Author: Herbert Xu Date: Sat May 10 18:43:33 2025 +0800 crypto: marvell/cesa - Avoid empty transfer descriptor The user may set req->src even if req->nbytes == 0. If there is no data to hash from req->src, do not generate an empty TDMA descriptor. Fixes: db509a45339f ("crypto: marvell/cesa - add TDMA support") Signed-off-by: Herbert Xu commit 8a4e047c6cc07676f637608a9dd675349b5de0a7 Author: Herbert Xu Date: Sat May 10 18:41:31 2025 +0800 crypto: marvell/cesa - Handle zero-length skcipher requests Do not access random memory for zero-length skcipher requests. Just return 0. Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Signed-off-by: Herbert Xu commit c66d7ebbe2fa14e41913adb421090a7426f59786 Author: Herbert Xu Date: Sat May 10 17:13:47 2025 +0800 crypto: powerpc/poly1305 - Add SIMD fallback Add a SIMD fallback path for poly1305-p10 by converting the 2^64 based hash state into a 2^44 base. In order to ensure that the generic fallback is actually 2^44, add ARCH_SUPPORTS_INT128 to powerpc and make poly1305-p10 depend on it. Fixes: ba8f8624fde2 ("crypto: poly1305-p10 - Glue code for optmized Poly1305 implementation for ppc64le") Signed-off-by: Herbert Xu commit 714ca27e9bf4608fcb1f627cd5599441f448771e Author: Yury Norov Date: Thu May 8 15:59:50 2025 -0400 crypto: iaa - Optimize rebalance_wq_table() The function opencodes for_each_cpu() by using a plain for-loop. The loop calls cpumask_weight() inside the conditional section. Because cpumask_weight() is O(1), the overall complexity of the function is O(node * node_cpus^2). Also, cpumask_nth() internally calls hweight(), which, if not hardware accelerated, is slower than cpumask_next() in for_each_cpu(). If switched to the dedicated for_each_cpu(), the rebalance_wq_table() can drop calling cpumask_weight(), together with some housekeeping code. This makes the overall complexity O(node * node_cpus), or simply speaking O(nr_cpu_ids). While there, fix opencoded for_each_possible_cpu() too. Signed-off-by: Yury Norov Signed-off-by: Herbert Xu commit 33cd93435cea665b24ca3f9b3d6af42afb3ba7bc Author: Dan Carpenter Date: Thu May 8 09:26:25 2025 +0300 crypto: qat/qat_6xxx - Fix NULL vs IS_ERR() check in adf_probe() The pcim_iomap_region() returns error pointers. It doesn't return NULL pointers. Update the check to match. Fixes: 17fd7514ae68 ("crypto: qat - add qat_6xxx driver") Signed-off-by: Dan Carpenter Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 3e4d597220587593dba505f5a7e932309155c54d Author: Marc Zyngier Date: Tue Apr 22 13:26:12 2025 +0100 KVM: arm64: Don't feed uninitialised data to HCR_EL2 When the guest executes an AT S1E{0,1} from EL2, and that its HCR_EL2.{E2H,TGE}=={1,1}, then this is a pure S1 translation that doesn't involve a guest-supplied S2, and the full S1 context is already in place. This allows us to take a shortcut and avoid save/restoring a bunch of registers. However, we set HCR_EL2 to a value suitable for the use of AT in guest context. And we do so by using the value that we saved. Or not. In the case described above, we restore whatever junk was on the stack, and carry on with it until the next entry. Needless to say, this is completely broken. But this also triggers the realisation that saving HCR_EL2 is a bit pointless. We are always in host context at the point where reach this code, and what we program to enter the guest is a known value (vcpu->arch.hcr_el2). Drop the pointless save/restore, and wrap the AT operations with writes that switch between guest and host values for HCR_EL2. Reported-by: D Scott Phillips Link: https://lore.kernel.org/r/20250422122612.2675672-4-maz@kernel.org Signed-off-by: Marc Zyngier commit ed648ab8043aab3135490d6c01f1c889c4bac62c Author: Marc Zyngier Date: Tue Apr 22 13:26:11 2025 +0100 KVM: arm64: Teach address translation about access faults It appears that our S1 PTW is completely oblivious of access faults. Teach the S1 translation code about it. Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20250422122612.2675672-3-maz@kernel.org Signed-off-by: Marc Zyngier commit 493b01de726d02e835c510d01df6880fa28d41b7 Author: Marc Zyngier Date: Tue Apr 22 13:26:10 2025 +0100 KVM: arm64: Fix PAR_EL1.{PTW,S} reporting on AT S1E* When an AT S1E* operation fails, we need to report whether the translation failed at S2, and whether this was during a S1 PTW. But these two bits are not independent. PAR_EL1.PTW can only be set of PAR_EL1.S is also set, and PAR_EL1.S can only be set on its own when the full S1 PTW has succeeded, but that the access itself is reporting a fault at S2. As a result, it makes no sense to carry both ptw and s2 as parameters to fail_s1_walk(), and they should be unified. This fixes a number of cases where we were reporting PTW=1 *and* S=0, which makes no sense. Link: https://lore.kernel.org/r/20250422122612.2675672-2-maz@kernel.org Signed-off-by: Marc Zyngier commit 74c2524a51ab7a0539eb5ec64ee594c981f3d8a0 Author: Alexander Stein Date: Tue Apr 29 11:01:52 2025 +0200 phy: freescale: imx8m-pcie: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20250429090152.1094243-1-alexander.stein@ew.tq-group.com Signed-off-by: Vinod Koul commit 6d0e2ada3ee5a554e908178d1fce851f5e63943d Author: André Draszik Date: Tue Apr 29 09:49:25 2025 +0100 phy: exynos5-usbdrd: s/FIELD_PREP_CONST/FIELD_PREP where appropriate Commit 9b6662a0f715 ("phy: exynos5-usbdrd: use GENMASK and FIELD_PREP for Exynos5 PHY registers") added FIELD_PREP_CONST() in many cases where FIELD_PREP() would have been more appropriate. It also switched existing uses of FIELD_PREP() to FIELD_PREP_CONST(). FIELD_PREP() is the preferred macro to use whenever possible while FIELD_PREP_CONST() is meant to be used in constant initialisers. Switch (back) to FIELD_PREP(). Fixes: 7e6c2ffe6c22 ("phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()") Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250429-exynos5-phy-field-prep-v1-2-39eb279a3e0e@linaro.org Signed-off-by: Vinod Koul commit b45791d48752418c805ae7417dcea85a40d5a41e Author: André Draszik Date: Tue Apr 29 09:49:24 2025 +0100 phy: exynos5-usbdrd: fix setting LINKSYSTEM_FLADJ on exynos7870 The code here is trying to set the FLADJ field to 0x20, so it should clear any previous value in that field before or'ing-in the new value. Fixes: 588d5d20ca8d ("phy: exynos5-usbdrd: add exynos7870 USBDRD support") Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250429-exynos5-phy-field-prep-v1-1-39eb279a3e0e@linaro.org Signed-off-by: Vinod Koul commit eb7a22f830f68997d76e660a02143c2bc72e7fb7 Author: Johan Hovold Date: Tue Apr 29 09:54:40 2025 +0200 phy: qcom: qmp-pcie: drop bogus x1e80100 qref supply The PCIe PHYs on x1e80100 do not a have a qref supply so stop requesting one. This also avoids the follow warning at boot: qcom-qmp-pcie-phy 1be0000.phy: supply vdda-qref not found, using dummy regulator Fixes: e961ec81a39b ("phy: qcom: qmp: Add phy register and clk setting for x1e80100 PCIe3") Cc: Qiang Yu Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20250429075440.19901-1-johan+linaro@kernel.org Signed-off-by: Vinod Koul commit b9b410cc1875120a0a2f84fd61c026cc994049e2 Author: Jan Kara Date: Tue May 13 15:17:46 2025 +0200 fanotify: Drop use of flex array in fanotify_fh We use flex array 'buf' in fanotify_fh to contain the file handle content. However the buffer is not a proper flex array. It has a preconfigured fixed size. Furthermore if fixed size is not big enough, we use external separately allocated buffer. Hence don't pretend buf is a flex array since we have to use special accessors anyway and instead just modify the accessors to do the pointer math without flex array. This fixes warnings that flex array is not the last struct member in fanotify_fid_event or fanotify_error_event. Signed-off-by: Jan Kara Reviewed-by: Amir Goldstein Link: https://patch.msgid.link/20250513131745.2808-2-jack@suse.cz commit db13e3d58c682e0bfc08410e4961b23f4bdbc2e5 Author: Simon Trimmer Date: Tue May 13 13:39:24 2025 +0000 ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load The cs35l56 smart amplifier has some informational firmware controls that are populated by a tuning bin file to unique values - logging these during firmware load identifies the specific configuration being used on that device instance. Signed-off-by: Simon Trimmer Acked-by: Takashi Iwai Link: https://patch.msgid.link/2fcc0e6fc5b8669acb026bebe44a4995ac83b967.1747142267.git.simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 823a036f049f5ea4afc55a2bc2e7f80a1acdef4a Author: Simon Trimmer Date: Tue May 13 13:39:23 2025 +0000 ASoC: cs35l56: Log tuning unique identifiers during firmware load The cs35l56 smart amplifier has some informational firmware controls that are populated by a tuning bin file to unique values - logging these during firmware load identifies the specific configuration being used on that device instance. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/47762a5f1ce2b178ad863c6698296aea09b72e10.1747142267.git.simont@opensource.cirrus.com Acked-by: Takashi Iwai Signed-off-by: Mark Brown commit 65cb56d49f6edea409600a3c61effc70ee5d43d8 Author: Gabor Juhos Date: Thu May 1 18:19:16 2025 +0200 spi: spi-qpic-snand: validate user/chip specific ECC properties The driver only supports 512 bytes ECC step size and 4 bit ECC strength at the moment, however it does not reject unsupported step/strength configurations. Due to this, whenever the driver is used with a flash chip which needs stronger ECC protection, the following warning is shown in the kernel log: [ 0.574648] spi-nand spi0.0: GigaDevice SPI NAND was found. [ 0.635748] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128 [ 0.649079] nand: WARNING: (null): the ECC used on your system is too weak compared to the one required by the NAND chip Although the message indicates that something is wrong, but it often gets unnoticed, which can cause serious problems. For example when the user writes something into the flash chip despite the warning, the written data may won't be readable by the bootloader or by the boot ROM. In the worst case, when the attached SPI NAND chip is the boot device, the board may not be able to boot anymore. Also, it is not even possible to create a backup of the flash, because reading its content results in bogus data. For example, dumping the first page of the flash gives this: # hexdump -C -n 2048 /dev/mtd0 00000000 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000040 0f 0f 0f 0f 0f 0f 0f 0d 0f 0f 0f 0f 0f 0f 0f 0f |................| 00000050 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 000001c0 0f 0f 0f 0f ff 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| 000001d0 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000200 0f 0f 0f 0f f5 5b ff ff 0f 0f 0f 0f 0f 0f 0f 0f |.....[..........| 00000210 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 000002f0 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 1f 0f 0f |................| 00000300 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 000003c0 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f ff 0f 0f 0f |................| 000003d0 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000400 0f 0f 0f 0f 0f 0f 0f 0f e9 74 c9 06 f5 5b ff ff |.........t...[..| 00000410 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 000005d0 0f 0f 0f 0f ff 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| 000005e0 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000600 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f c6 be 0f c3 |................| 00000610 e9 74 c9 06 f5 5b ff ff 0f 0f 0f 0f 0f 0f 0f 0f |.t...[..........| 00000620 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000770 0f 0f 0f 0f 8f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| 00000780 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000800 # Doing the same by using the downstream kernel results in different output: # hexdump -C -n 2048 /dev/mtd0 00000000 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f |................| * 00000800 # This patch adds some sanity checks to the code to prevent using the driver with unsupported ECC step/strength configurations. After the change, probing of the driver fails in such cases: [ 0.655038] spi-nand spi0.0: GigaDevice SPI NAND was found. [ 0.659159] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128 [ 0.669138] qcom_snand 79b0000.spi: only 4 bits ECC strength is supported [ 0.677476] nand: No suitable ECC configuration [ 0.689909] spi-nand spi0.0: probe with driver spi-nand failed with error -95 This helps to avoid the aforementioned hassles until support for 8 bit ECC strength gets implemented. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250501-qpic-snand-validate-ecc-v1-1-532776581a66@gmail.com Signed-off-by: Mark Brown commit 664bf117a30804b442a88a8462591bb23f5a0f22 Author: Wei Fang Date: Mon May 12 14:17:01 2025 +0800 net: enetc: fix implicit declaration of function FIELD_PREP The kernel test robot reported the following error: drivers/net/ethernet/freescale/enetc/ntmp.c: In function 'ntmp_fill_request_hdr': drivers/net/ethernet/freescale/enetc/ntmp.c:203:38: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration] 203 | cbd->req_hdr.access_method = FIELD_PREP(NTMP_ACCESS_METHOD, | ^~~~~~~~~~ Therefore, add "bitfield.h" to ntmp_private.h to fix this issue. Fixes: 4701073c3deb ("net: enetc: add initial netc-lib driver to support NTMP") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505101047.NTMcerZE-lkp@intel.com/ Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 065d5885f6180c534b7b176847b3e008f4e11850 Author: Mike Looijmans Date: Mon Apr 28 08:35:47 2025 +0200 phy-zynqmp: Postpone getting clock rate until actually needed At probe time the driver would display the following error and abort: xilinx-psgtr fd400000.phy: Invalid rate 0 for reference clock 0 At probe time, the associated GTR driver (e.g. SATA or PCIe) hasn't initialized the clock yet, so clk_get_rate() likely returns 0 if the clock is programmable. So this driver only works if the clock is fixed. The PHY driver doesn't need to know the clock frequency at probe yet, so wait until the associated driver initializes the lane before requesting the clock rate setting. In addition to allowing the driver to be used with programmable clocks, this also reduces the driver's runtime memory footprint by removing an array of pointers from struct xpsgtr_phy. Signed-off-by: Mike Looijmans Acked-by: Michal Simek Link: https://lore.kernel.org/r/20250428063648.22034-1-mike.looijmans@topic.nl Signed-off-by: Vinod Koul commit 838b2a28c0317cc5e4dca7dc82c45328cac317a3 Author: Jiawen Wu Date: Mon May 12 10:03:33 2025 +0800 net: wangxun: Correct clerical errors in comments There are wrong "#endif" comments in .h files need to be corrected. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1b1e949924fb59e98d9401681b139e92e75686ac Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:20 2025 +0200 dt-bindings: phy: mediatek,tphy: Add support for MT6893 Add a compatible string for the MediaTek Dimensity 1200 (MT6893) SoC: this chip integrates a MediaTek generic T-PHY version 2. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120220.147798-2-angelogioacchino.delregno@collabora.com Signed-off-by: Vinod Koul commit fe750a871d90e081c52ce1988e1fbc85576152a3 Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:19 2025 +0200 dt-bindings: phy: mediatek,dsi-phy: Add support for MT6893 Add support for the MediaTek Dimensity 1200 (MT6893) SoC: the DSI PHY found in this chip is fully compatible with the one found in the MT8183 SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120220.147798-1-angelogioacchino.delregno@collabora.com Signed-off-by: Vinod Koul commit 518e8ffa00c8744bef586079b73e22fb79d93b3c Author: Goran Rađenović Date: Thu May 8 16:38:16 2025 +0200 ARM: dts: stm32: add initial support for stm32mp157-ultra-fly-sbc board Add support for Ultratronik's stm32mp157c fly board. This board embeds a STM32MP157c SOC and 1GB of DDR3. Several connections are available on this boards: 2*USB2.0, 1*USB2.0 MiniUSB, Debug UART, 1*UART, 1*USART, SDcard, RJ45, ... This patch enables basic support for a kernel boot - SD-card or eMMC. Signed-off-by: Goran Rađenović Link: https://lore.kernel.org/r/20250508143818.2574558-5-goran.radni@gmail.com Signed-off-by: Alexandre Torgue commit 6c9bb5f36153689ccbbd63b5d8155972013108f4 Author: Goran Rađenović Date: Thu May 8 16:38:15 2025 +0200 MAINTAINERS: Add entry for ULTRATRONIK BOARD SUPPORT Add a new MAINTAINERS section for the ULTRATRONIK BOARD SUPPORT, covering the stm32mp157c-ultra-fly-sbc.dts board support file. This ensures that maintainers of this board are properly listed and can be notified for any relevant changes. Signed-off-by: Goran Rađenović Signed-off-by: Börge Strümpfel Link: https://lore.kernel.org/r/20250508143818.2574558-4-goran.radni@gmail.com Signed-off-by: Alexandre Torgue commit 21dc0aa4e777eeb68164332f2b9403179c28c9db Author: Goran Rađenović Date: Thu May 8 16:38:14 2025 +0200 dt-bindings: arm: stm32: Document Ultratronik's Fly board DT binding This commit documents ultra-fly-sbc devicetree binding based on STM32MP157 SoC. Signed-off-by: Goran Rađenović Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250508143818.2574558-3-goran.radni@gmail.com Signed-off-by: Alexandre Torgue commit 8605b4d36f0ac021d66a0725da5fbda34e0924fd Author: Goran Rađenović Date: Thu May 8 16:38:13 2025 +0200 dt-bindings: vendor-prefixes: Add Ultratronik Ultratronik GmbH is a German electronics company: https://www.ultratronik-ems.de/ Signed-off-by: Goran Rađenović Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250508143818.2574558-2-goran.radni@gmail.com Signed-off-by: Alexandre Torgue commit 5e281c436e4a2ed091d597b92aa55fc57306bc5e Author: Fabrice Gasnier Date: Wed May 14 10:10:39 2025 +0200 arm64: dts: st: use lptimer3 as tick broadcast source on stm32mp257f-ev1 During the low power modes the generic ARM timer is deactivated, so the the tick broadcast is used, based on LPTIMER3 which is clocked by LSE on STMicroelectronics boards. Signed-off-by: Patrick Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit e0919bca1ae28a5b7c9117140ac0dfb41b643278 Author: Fabrice Gasnier Date: Tue Apr 29 14:51:32 2025 +0200 arm64: dts: st: add low-power timer nodes on stm32mp251 Add low-power timer (LPTimer) support on STM32MP25 SoC. The full feature set is implemented in LPTIM1/2/3/4. LPTIM5 supports a smaller set of features (no capture/compare) channel. Still, LPTIM5 can be used as single PWM, counter, trigger or timer. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20250429125133.1574167-7-fabrice.gasnier@foss.st.com Signed-off-by: Alexandre Torgue commit 3cd55c729577f592342f73ca2455a6e3f6d07121 Author: Fabrice Gasnier Date: Tue Apr 29 14:51:31 2025 +0200 arm64: defconfig: enable STM32 LP timer clockevent driver Enable the STM32 LP timer MFD core and clockevent drivers used on STM32MP257F-EV1 board, for PSCI OSI. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20250429125133.1574167-6-fabrice.gasnier@foss.st.com Signed-off-by: Alexandre Torgue commit cad2492de91ce9b05ea09d0a1660f81310902ffb Author: Patrice Chotard Date: Mon May 12 08:29:33 2025 +0200 arm64: dts: st: Add SPI NOR flash support on stm32mp257f-ev1 board Add SPI NOR flash nor support on stm32mp257f-ev1 board. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250512-upstream_omm_ospi_dts-v10-3-fca0fbe6d10a@foss.st.com Signed-off-by: Alexandre Torgue commit 6dabe0d8622eafeb2e963796f59b214ea7fcb0b5 Author: Patrice Chotard Date: Mon May 12 08:29:32 2025 +0200 arm64: dts: st: Add ospi port1 pinctrl entries in stm32mp25-pinctrl.dtsi Add pinctrl entry related to OSPI's port1 in stm32mp25-pinctrl.dtsi Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250512-upstream_omm_ospi_dts-v10-2-fca0fbe6d10a@foss.st.com Signed-off-by: Alexandre Torgue commit 849380be00f8cf43e9df4a4990cdebbf25cb93d4 Author: Patrice Chotard Date: Mon May 12 08:29:31 2025 +0200 arm64: dts: st: Add OMM node on stm32mp251 Add Octo Memory Manager (OMM) entry on stm32mp251 and its two OSPI instance. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250512-upstream_omm_ospi_dts-v10-1-fca0fbe6d10a@foss.st.com Signed-off-by: Alexandre Torgue commit 49ba8fc6eab63165639ffbb9f976222d39739cab Author: Dario Binacchi Date: Sun Apr 27 09:43:27 2025 +0200 ARM: dts: stm32: support STM32h747i-disco board The board includes an STM32H747XI SoC with the following resources: - 2 Mbytes Flash - 1 Mbyte SRAM - LCD-TFT controller - MIPI-DSI interface - FD-CAN - USB 2.0 high-speed/full-speed - Ethernet MAC - camera interface Detailed information can be found at: https://www.st.com/en/evaluation-tools/stm32h747i-disco.html Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-9-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 8e71dfe46a4a1e9505b1a327470f879b63388968 Author: Dario Binacchi Date: Sun Apr 27 09:43:26 2025 +0200 ARM: dts: stm32: add an extra pin map for USART1 on stm32h743 Add an additional pin map configuration for using the USART1 controller on the stm32h743 MCU. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-8-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 47d16ab94b8e5e85aedba3cd22cfdf3877bf1dfb Author: Dario Binacchi Date: Sun Apr 27 09:43:25 2025 +0200 ARM: dts: stm32: add pin map for UART8 controller on stm32h743 Add a pin map configuration for using the UART8 controller on the stm32h743 MCU. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-7-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 07aa43adae2363c3734055aeba0789536fa0f8f2 Author: Dario Binacchi Date: Sun Apr 27 09:43:24 2025 +0200 ARM: dts: stm32: add uart8 node for stm32h743 MCU Add support for UART8 by applying the settings specified in the reference manual RM0433. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-6-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit ecab3c40fa49a2073c4c916ebff9496a6b5db7bd Author: Dario Binacchi Date: Sun Apr 27 09:43:23 2025 +0200 dt-bindings: clock: stm32h7: rename USART{7,8}_CK to UART{7,8}_CK As stated in the reference manual RM0433, the STM32H743 MCU has USART1/2/3/6, UART4/5/7/8, and LPUART1. The patches make all the clock macros for the serial ports consistent with the documentation. Signed-off-by: Dario Binacchi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250427074404.3278732-5-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit cb0c6e1244e18a2c2d69574d58f304feccfd3b2c Author: Dario Binacchi Date: Sun Apr 27 09:43:22 2025 +0200 ARM: stm32: add a new SoC - STM32H747 The STM32H747 is a dual-core MCU (Cortex-M7 running up to 480 MHz + Cortex-M4 running up to 240 MHz) containing from 1 to 2 Mbytes of Flash memory and 1 Mbyte of internal RAM. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-4-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 815d49f61ea049075482161f897aa13e1ae30cbb Author: Dario Binacchi Date: Sun Apr 27 09:43:21 2025 +0200 dt-bindings: arm: stm32: add compatible for stm32h747i-disco board The board includes an STM32H747XI SoC with the following resources: - 2 Mbytes Flash - 1 MByte SRAM - LCD-TFT controller - MIPI-DSI interface - FD-CAN - USB 2.0 high-speed/full-speed - Ethernet MAC - camera interface Detailed information can be found at: https://www.st.com/en/evaluation-tools/stm32h747i-disco.html Signed-off-by: Dario Binacchi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250427074404.3278732-3-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 6a36dca4375fce51b627f5a985a79fc8b8bd7f55 Author: Dario Binacchi Date: Sun Apr 27 09:43:20 2025 +0200 ARM: dts: stm32h7-pinctrl: add _a suffix to u[s]art_pins phandles Allow expanding possible configurations for the same peripheral, consistent with the scheme adopted in Linux. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250427074404.3278732-2-dario.binacchi@amarulasolutions.com Signed-off-by: Alexandre Torgue commit 988cca008ef29b64236c21de0f2387df3f849385 Author: Krzysztof Kozlowski Date: Thu Apr 24 10:47:06 2025 +0200 ARM: dts: st: stm32: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: stm32h750i-art-pi.dtb: bcrmf@1: $nodename:0: 'bcrmf@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250424084706.105049-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Torgue commit 1d0fec6f9023632d67e1b54172ae545a0b5a8fce Author: Ben Wolsieffer Date: Fri Apr 4 10:35:14 2025 -0400 ARM: dts: stm32: add low power timer on STM32F746 Add device tree node for the low power timer on the STM32F746. Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20250404143514.860126-1-ben.wolsieffer@hefring.com Signed-off-by: Alexandre Torgue commit 9358c00cbc35667cb0751b4a032e4d0f3ab618f1 Author: Olivier Moysan Date: Thu Apr 3 13:59:54 2025 +0200 ARM: dts: stm32: add vrefint support to adc on stm32mp13 Set STM32 ADC1&2 as consumers of BSEC, to retrieve vrefint calibration data on STM32MP13x SoCs. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20250403115954.1061528-3-olivier.moysan@foss.st.com Signed-off-by: Alexandre Torgue commit 4fa5147389685380c5da9532ef1f28a94c1fa092 Author: Olivier Moysan Date: Thu Apr 3 13:59:53 2025 +0200 ARM: dts: stm32: add vrefint calibration on stm32mp13 Describe vrefint calibration cell to be retrieved through bsec, on STM32MP13x SoCs family. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20250403115954.1061528-2-olivier.moysan@foss.st.com Signed-off-by: Alexandre Torgue commit 2063eedf3c9c4449fbf417c9b84ecd08251c3b34 Author: Rob Herring (Arm) Date: Wed Apr 16 15:24:17 2025 -0500 dt-bindings: phy: rockchip: Convert RK3399 Type-C PHY to schema Convert the Rockchip RK3399 Type-C PHY to DT schema format. Add the missing "power-domains" property and "port" and "orientation-switch" properties in the child nodes. Omit the previously deprecated properties as they aren't used anywhere. Drop the 2nd example which was pretty much identical to the 1st example. Signed-off-by: Rob Herring (Arm) Acked-by: Greg Kroah-Hartman Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250416202419.3836688-1-robh@kernel.org Signed-off-by: Vinod Koul commit 3b2b414927dcbd866c99ec92e3a214a69fc51c90 Author: Chen Ni Date: Tue Apr 15 16:12:00 2025 +0800 phy: rockchip: samsung-hdptx: Remove unneeded semicolon Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250415081200.349939-1-nichen@iscas.ac.cn Signed-off-by: Vinod Koul commit d14402a38c2d868cacb1facaf9be908ca6558e59 Author: Chenyuan Yang Date: Mon Apr 14 07:50:50 2025 -0500 phy: qcom-qmp-usb: Fix an NULL vs IS_ERR() bug The qmp_usb_iomap() helper function currently returns the raw result of devm_ioremap() for non-exclusive mappings. Since devm_ioremap() may return a NULL pointer and the caller only checks error pointers with IS_ERR(), NULL could bypass the check and lead to an invalid dereference. Fix the issue by checking if devm_ioremap() returns NULL. When it does, qmp_usb_iomap() now returns an error pointer via IOMEM_ERR_PTR(-ENOMEM), ensuring safe and consistent error handling. Signed-off-by: Chenyuan Yang Fixes: a5d6b1ac56cb ("phy: qcom-qmp-usb: fix memleak on probe deferral") CC: Johan Hovold CC: Krzysztof Kozlowski Reviewed-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250414125050.2118619-1-chenyuan0y@gmail.com Signed-off-by: Vinod Koul commit e00c9aea31035f46b04a13effaa801f8b3419d2a Author: Siddharth Vadapalli Date: Fri Apr 11 11:27:43 2025 +0530 dt-bindings: phy: cadence-torrent: enable PHY_TYPE_USXGMII The Cadence Torrent SERDES supports USXGMII protocol. Hence, update the bindings to allow PHY_TYPE_USXGMII. Since PHY_TYPE_USXGMII has the value of "12" while the existing maximum allowed PHY TYPE is "9", switch back to using "enum" property in the bindings to account for this discontinuity. Signed-off-by: Siddharth Vadapalli Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250411055743.623135-1-s-vadapalli@ti.com Signed-off-by: Vinod Koul commit 6a09ae8281986d5fb5ce0115135c05a5afb8718e Author: Richard Leitner Date: Wed May 7 09:51:31 2025 +0200 leds: flash: Add support for flash/strobe duration Add support for the new V4L2_CID_FLASH_DURATION control to the LEDs driver. Signed-off-by: Richard Leitner Link: https://lore.kernel.org/r/20250507-ov9282-flash-strobe-v4-2-72b299c1b7c9@linux.dev Signed-off-by: Lee Jones commit f1c86ab98640e9288049673ca2e4517a9df7ed83 Author: Christophe JAILLET Date: Fri May 2 16:51:22 2025 +0200 leds: rgb: leds-mt6370-rgb: Improve definition of some struct linear_range Use LINEAR_RANGE() instead of hand-writing it. It is more robust, should the layout of the structure change one day. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/1ce4245107e0a51dce502a007a69899bda018d5f.1746197460.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit cfa40f29df08c7ad296c81a2fac677830af83ec7 Author: Lee Jones Date: Thu May 1 09:19:13 2025 +0100 leds: led-test: Provide tests for the lookup and get infrastructure This API allows providers to offer an specific LED to be looked-up by a consumer. Consumers are then able to describe the aforementioned LED and take a reference on it. For convenience, we're testing both sides of the API in just one test function here. In reality, both the provider and the consumer would be logistically orthogonal. CMD: tools/testing/kunit/kunit.py run --kunitconfig drivers/leds RESULTS: [16:38:57] Configuring KUnit Kernel ... [16:38:57] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=20 [16:39:02] Starting KUnit Kernel (1/1)... [16:39:02] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [16:39:03] ===================== led (2 subtests) ===================== [16:39:03] [PASSED] led_test_class_register [16:39:03] [PASSED] led_test_class_add_lookup_and_get [16:39:03] ======================= [PASSED] led ======================= [16:39:03] ============================================================ [16:39:03] Testing complete. Ran 2 tests: passed: 2 [16:39:03] Elapsed time: 6.255s total, 0.001s configuring, 5.131s building, 1.106s running Link: https://lore.kernel.org/r/20250501081918.3621432-3-lee@kernel.org Signed-off-by: Lee Jones commit eb58933b78cdad9b879dc2dd248e7284341a1cfc Author: Lee Jones Date: Thu May 1 09:19:12 2025 +0100 leds: led-test: Fill out the registration test to cover more test cases Upon successful LED class device registration, it is expected that certain attributes are filled out in pre-defined ways. For instance, if provided, the .brightness_get() call-back should be called to populate the class device 'brightness' attribute, 'max_brightness' should be initialised as LED_FULL (at least until we can rid these pesky enums) and the sysfs group should be created with the class device name supplied by the caller. If subsequent registrations take place that would result in name conflicts, various outcomes are expected depending on which flags are set. If LED_REJECT_NAME_CONFLICT is disabled, registration should succeed resulting in an iteration on the provided name. Conversely, if it's enabled, then registration is expected to fail outright. We test for all of these scenarios here. Link: https://lore.kernel.org/r/20250501081918.3621432-2-lee@kernel.org Signed-off-by: Lee Jones commit 1d7f25483c8791f395dd857cce8a6a65bcfa295f Author: Lee Jones Date: Thu May 1 09:19:11 2025 +0100 leds: led-test: Remove standard error checking after KUNIT_ASSERT_*() If a KUNIT_ASSERT_*() call ends up in an assertion, the test is marked as a failure and the subsequent error checking is never executed, making it superfluous. Remove it for simplicity and to avoid confusion. Link: https://lore.kernel.org/r/20250501081918.3621432-1-lee@kernel.org Signed-off-by: Lee Jones commit b441b95a592c42f8448f9bd912b91e1e9b4262ff Author: Jesse Karjalainen Date: Sat Apr 26 05:04:54 2025 +0300 leds: pca995x: Fix typo in pca995x_of_match's of_device_id entry Remove the stray space between the '.' and the 'data' field name in the PCA995x device-tree match table. Signed-off-by: Jesse Karjalainen Link: https://lore.kernel.org/r/20250426020454.47059-1-jesse@ponkila.com Signed-off-by: Lee Jones commit 5039a33fed8851fcf384fae2bcb8fd4858edd597 Author: Lee Jones Date: Thu Apr 24 15:45:38 2025 +0100 leds: Provide skeleton KUnit testing for the LEDs framework Apply a very basic implementation of KUnit LED testing. More tests / use-cases will be added steadily over time. CMD: tools/testing/kunit/kunit.py run --kunitconfig drivers/leds OUTPUT: [15:34:19] Configuring KUnit Kernel ... [15:34:19] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=20 [15:34:22] Starting KUnit Kernel (1/1)... [15:34:22] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [15:34:23] ===================== led (1 subtest) ====================== [15:34:23] [PASSED] led_test_class_register [15:34:23] ======================= [PASSED] led ======================= [15:34:23] ============================================================ [15:34:23] Testing complete. Ran 1 tests: passed: 1 [15:34:23] Elapsed time: 4.268s total, 0.001s configuring, 3.048s building, 1.214s running Link: https://lore.kernel.org/r/20250424144544.1438584-1-lee@kernel.org Signed-off-by: Lee Jones commit d1d3205730735b652303a82ba49fcfef7c20510d Author: Bartosz Golaszewski Date: Wed Apr 23 09:53:53 2025 +0200 leds: tca6507: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-leds-v1-4-2f42d8fbb525@linaro.org Signed-off-by: Lee Jones commit e1cc2c8cc7ccccb52814d10c98de1252f8a7ae61 Author: Bartosz Golaszewski Date: Wed Apr 23 09:53:52 2025 +0200 leds: pca9532: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-leds-v1-3-2f42d8fbb525@linaro.org Signed-off-by: Lee Jones commit 2aafd2e41cf1434c680ea7410333a079a15747c3 Author: Bartosz Golaszewski Date: Wed Apr 23 09:53:51 2025 +0200 leds: pca955x: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-leds-v1-2-2f42d8fbb525@linaro.org Signed-off-by: Lee Jones commit ee08ec51a0a01ed8702a7f91e5102dad92319172 Author: Bartosz Golaszewski Date: Wed Apr 23 09:53:50 2025 +0200 leds: lgm-sso: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-leds-v1-1-2f42d8fbb525@linaro.org Signed-off-by: Lee Jones commit 4c6c3ca07b7a70e7b8fe5c25cbf0650c422a3a28 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:56 2025 +0200 leds: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250417074656.81626-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit f9a2eacb9107365c3f1e3061e2c435cafd554fc8 Author: Marek Behún Date: Thu Apr 17 09:05:07 2025 +0200 leds: turris-omnia: Drop commas in the terminator entries Drop commas in terminator entries of `struct attribute` array and `struct of_device_id` array. Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20250417070507.24929-1-kabel@kernel.org Signed-off-by: Lee Jones commit 982e0f042542fc0c2fbcb2b67fbedc431624ae59 Author: Andrew Davis Date: Mon Apr 7 13:35:55 2025 -0500 leds: lp8860: Disable GPIO with devm action This helps prevent mistakes like disable out of order in cleanup functions and forgetting to free on error paths (as was done here). This was the last thing the .remove() function did, so remove that too. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-6-afd@ti.com Signed-off-by: Lee Jones commit e0b95ba33c0f31ac91741921cc89986536595862 Author: Andrew Davis Date: Mon Apr 7 13:35:54 2025 -0500 leds: lp8860: Only unlock in lp8860_unlock_eeprom() Locking is a single register write, so no need to have the unlock function also lock. This removes the need to pass in the option and reduces the nesting level in the function. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-5-afd@ti.com Signed-off-by: Lee Jones commit b0d6394094ee657f50b42b44f4903014d90e912a Author: Andrew Davis Date: Mon Apr 7 13:35:53 2025 -0500 leds: lp8860: Enable regulator using enable_optional helper This allows the regulator to be optional which is the same as done here with all the checks for NULL. This also disables on remove for us, so remove the manual disabling. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-4-afd@ti.com Signed-off-by: Lee Jones commit 0cb55e16bd842364340d24e2e368b9d6c5800423 Author: Andrew Davis Date: Mon Apr 7 13:35:52 2025 -0500 leds: lp8860: Remove default regs when not caching If we are not using regmap caches, then the value will be read in every time, having a default value does not change anything in that case. Remove the unused defaults. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-3-afd@ti.com Signed-off-by: Lee Jones commit 87a59548af95db9b6b3a19fdd5b4e6c49bdbc285 Author: Andrew Davis Date: Mon Apr 7 13:35:51 2025 -0500 leds: lp8860: Use new mutex guards to cleanup function exits Use scoped mutex guards to simplify return paths. While here use devm_mutex_init() to register the muxex so it also is cleaned up automatically. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-2-afd@ti.com Signed-off-by: Lee Jones commit 4bab18dcb452e00e28e181eb2d7a3a3a6a5d1413 Author: Andrew Davis Date: Mon Apr 7 13:35:50 2025 -0500 leds: lp8860: Use regmap_multi_reg_write for EEPROM writes This helper does the same thing as manual looping, use it instead. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250407183555.409687-1-afd@ti.com Signed-off-by: Lee Jones commit bd3d14932923a717ebe475122ca7e17200f87a0c Author: Andy Shevchenko Date: Mon Apr 7 18:13:26 2025 +0300 leds: pca955x: Avoid potential overflow when filling default_label GCC compiler (Debian 14.2.0-17) is not happy about printing into a too short buffer (when build with `make W=1`): drivers/leds/leds-pca955x.c:554:33: note: ‘snprintf’ output between 2 and 12 bytes into a destination of size 8 Indeed, the buffer size is chosen based on some assumptions, while in general the assigned value might not fit (GCC can't prove it does). Fix this by changing the bits field in the struct pca955x_chipdef to u8, with a positive side effect of the better memory footprint, and convert loop iterator to be unsigned. With that done, update format specifiers accordingly. In one case join back string literal as it improves the grepping over the code based on the message and remove duplicating information (the driver name is printed as pert of the dev_*() output [1]) as we touch the same line anyway. Link: https://lore.kernel.org/r/4ac527f2-c59e-70a2-efd4-da52370ea557@dave.eu/ [1] Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250407151441.706378-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit e35ca991a777ef513040cbb36bc8245a031a2633 Author: Sven Schwermer Date: Fri Apr 4 20:40:36 2025 +0200 leds: multicolor: Fix intensity setting while SW blinking When writing to the multi_intensity file, don't unconditionally call led_set_brightness. By only doing this if blinking is inactive we prevent blinking from stopping if the blinking is in its off phase while the file is written. Instead, if blinking is active, the changed intensity values are applied upon the next blink. This is consistent with changing the brightness on monochrome LEDs with active blinking. Suggested-by: Jacek Anaszewski Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Reviewed-by: Tobias Deiminger Tested-by: Sven Schuchmann Signed-off-by: Sven Schwermer Link: https://lore.kernel.org/r/20250404184043.227116-1-sven@svenschwermer.de Signed-off-by: Lee Jones commit f85eb659a48cc2f0c98a122e760552b69e56c06f Author: Daniel Golle Date: Tue Apr 22 15:24:29 2025 +0200 phy: mediatek: xsphy: support type switch by pericfg Patch from Sam Shih found in MediaTek SDK released under GPL. Get syscon and use it to set the PHY type. Extend support to PCIe and SGMII mode in addition to USB2 and USB3. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250422132438.15735-7-linux@fw-web.de Signed-off-by: Vinod Koul commit b484b25a486962b568ada1f55c1b96dfd96b912d Author: Frank Wunderlich Date: Tue Apr 22 15:24:27 2025 +0200 dt-bindings: phy: mtk-xs-phy: support type switch by pericfg Add support for type switch by pericfg register between USB3/PCIe. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250422132438.15735-5-linux@fw-web.de Signed-off-by: Vinod Koul commit 117d09e2830d6ff6c1bb2dc5629f972504fde51e Author: Frank Wunderlich Date: Tue Apr 22 15:24:26 2025 +0200 dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible Add compatible for xs-phy on mt7988. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250422132438.15735-4-linux@fw-web.de Signed-off-by: Vinod Koul commit 25ac4834cae97f7787ba5562ce1511d7524955e0 Author: Kuninori Morimoto Date: Mon May 12 06:33:12 2025 +0000 pwm: Tidyup PWM menu for Renesas Because current PWM Kconfig is sorting by symbol name, it looks strange ordering in menuconfig. => [ ] Renesas R-Car PWM support => [ ] Renesas TPU PWM support [ ] Rockchip PWM support => [ ] Renesas RZ/G2L General PWM Timer support => [ ] Renesas RZ/G2L MTU3a PWM Timer support Let's use common CONFIG_PWM_RENESAS_xxx symbol name for Renesas, and sort it. Signed-off-by: Kuninori Morimoto Reviewed-by: Biju Das Link: https://lore.kernel.org/r/877c2mxrrr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Uwe Kleine-König commit 96ce677a0c6ba00fcb79e377c31d3c1a461c928e Merge: 84e351d8a5755c 976c4626c5f57d Author: Uwe Kleine-König Date: Wed May 14 10:07:05 2025 +0200 Merge tag 'renesas-arm-defconfig-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into pwm/for-next Renesas ARM defconfig updates for v6.16 (take two) - Enable modular support for the Renesas RZ/G2L GPT and MSIOF sound in the ARM64 defconfig, - Enable more support for RZN1D-DB/EB in shmobile_defconfig. It is merged into the pwm tree due to the next patch renaming PWM_RZG2L_GPT which has a use added in the arm64 defconfig. commit 64797551baec252f953fa8234051f88b0c368ed5 Author: Ard Biesheuvel Date: Tue May 13 13:11:59 2025 +0200 x86/boot: Defer initialization of VM space related global variables The global pseudo-constants 'page_offset_base', 'vmalloc_base' and 'vmemmap_base' are not used extremely early during the boot, and cannot be used safely until after the KASLR memory randomization code in kernel_randomize_memory() executes, which may update their values. So there is no point in setting these variables extremely early, and it can wait until after the kernel itself is mapped and running from its permanent virtual mapping. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250513111157.717727-9-ardb+git@google.com commit f449bf98b7b63702e86155fe5fa3c853c3bf1fda Author: Shivank Garg Date: Wed May 14 06:26:38 2025 +0000 x86/power: hibernate: Fix W=1 build kernel-doc warnings Warnings generated with 'make W=1': arch/x86/power/hibernate.c:47: warning: Function parameter or struct member 'pfn' not described in 'pfn_is_nosave' arch/x86/power/hibernate.c:92: warning: Function parameter or struct member 'max_size' not described in 'arch_hibernation_header_save' Add missing parameter documentation in hibernate functions to fix kernel-doc warnings. Signed-off-by: Shivank Garg Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250514062637.3287779-2-shivankg@amd.com commit bd6afa43eee175ba146f6f9a27d6d24eeaab0a45 Author: Shivank Garg Date: Wed May 14 06:26:40 2025 +0000 x86/mm/pat: Fix W=1 build kernel-doc warning Building the kernel with W=1 generates the following warning: arch/x86/mm/pat/memtype.c:692: warning: Function parameter or struct member 'pfn' not described in 'pat_pfn_immune_to_uc_mtrr' Add missing parameter documentation to fix the kernel-doc warning. Signed-off-by: Shivank Garg Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250514062637.3287779-3-shivankg@amd.com commit 388d0cc33cc6fc876e053644d6af694b9d5c639f Author: Patrice Chotard Date: Tue May 13 17:34:31 2025 +0200 memory: stm32_omm: Fix error handling in stm32_omm_disable_child() Fix stm32_omm_toggle_child_clock() return value test, we should exit only on non zero value. Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250513-stm32_omm_fix_typo-v1-1-5b90ec8b52e7@foss.st.com Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aB29hOrv0nU73RCn@stanley.mountain/ Signed-off-by: Krzysztof Kozlowski commit 04cb269c204398763a620d426cbee43064854000 Author: Yuanjun Gong Date: Tue May 13 20:37:44 2025 +0800 ASoC: tegra210_ahub: Add check to of_device_get_match_data() In tegra_ahub_probe(), check the result of function of_device_get_match_data(), return an error code in case it fails. Signed-off-by: Yuanjun Gong Link: https://patch.msgid.link/20250513123744.3041724-1-ruc_gongyuanjun@163.com Signed-off-by: Mark Brown commit f07f2b3fecac4096b2c89f2b89b5f564c279cfc8 Author: Rob Herring (Arm) Date: Mon May 12 16:57:05 2025 -0500 dt-bindings: ata: Convert ti,dm816-ahci to DT schema Convert the TI DM816 AHCI SATA Controller to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) Reviewed-by: Bartosz Golaszewski Signed-off-by: Damien Le Moal commit 439d47608bb3e5f7b5f5eb55c568576b60731c4d Author: Niklas Cassel Date: Mon May 12 10:44:00 2025 +0200 ata: libata: Print if port is external on boot Commit affccb16c117 ("ata: ahci: print the lpm policy on boot") added a lpm-pol print during boot, which shows the LPM policy used by each port. While the LPM policy is usually determined by the Kconfig CONFIG_SATA_MOBILE_LPM_POLICY, the Kconfig value is overridden e.g. if firmware has marked the port as hotplug capable / external. Commit f97106b10d9a ("ata: ahci: Add debug print for external port") did add a debug print to show if LPM was disabled because firmware has marked the port as external, however, because devices having broken LPM (even though they claim to support it) is more common than one would have hoped, print "ext" during boot if firmware has marked the port is external. This will make it easier to debug certain LPM issues, e.g. if firmware has enabled/marked only some of the ports as hotplug capable / external. Before (port marked as external by firmware): ata1: SATA max UDMA/133 abar m4096@0xfebd3000 port 0xfebd3100 irq 57 lpm-pol 0 After (port marked as external by firmware): ata1: SATA max UDMA/133 abar m4096@0xfebd3000 port 0xfebd3100 irq 57 lpm-pol 0 ext Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 93bd4a80efeb521314485a06d8c21157240497bb Author: Madhavan Srinivasan Date: Sun May 11 09:41:11 2025 +0530 powerpc/kernel: Fix ppc_save_regs inclusion in build Recent patch fixed an old commit 'fc2a5a6161a2 ("powerpc/64s: ppc_save_regs is now needed for all 64s builds")' which is to include building of ppc_save_reg.c only when XMON and KEXEC_CORE and PPC_BOOK3S are enabled. This was valid, since ppc_save_regs was called only in replay_system_reset() of old irq.c which was under BOOK3S. But there has been multiple refactoring of irq.c and have added call to ppc_save_regs() from __replay_soft_interrupts -> replay_soft_interrupts which is part of irq_64.c included under CONFIG_PPC64. And since ppc_save_regs is called in CRASH_DUMP path as part of crash_setup_regs in kexec.h, CONFIG_PPC32 also needs it. So with this recent patch which enabled the building of ppc_save_regs.c caused a build break when none of these (XMON, KEXEC_CORE, BOOK3S) where enabled as part of config. Patch to enable building of ppc_save_regs.c by defaults. Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250511041111.841158-1-maddy@linux.ibm.com commit 3aa64cd126b4fd298ba5d28227ea3f82cd6f541c Author: Yixun Lan Date: Thu Apr 24 17:40:51 2025 +0800 riscv: dts: spacemit: add gpio LED for system heartbeat Leverage GPIO to support system LED to indicate activity of CPUs. Link: https://lore.kernel.org/r/20250424-03-k1-gpio-v9-3-eaece8cc5a86@gentoo.org Signed-off-by: Yixun Lan commit 59333128999a7c46671567b7c02d6f71131bfff6 Author: Yixun Lan Date: Thu Apr 24 17:40:50 2025 +0800 riscv: dts: spacemit: add gpio support for K1 SoC Populate the GPIO node in the device tree for SpacemiT K1 SoC. Each of 32 pins will act as one bank and map pins to pinctrl controller. Link: https://lore.kernel.org/r/20250424-03-k1-gpio-v9-2-eaece8cc5a86@gentoo.org Signed-off-by: Yixun Lan commit 3b2802c2d665bcdcb176f8da894198a0654a317a Author: Yixun Lan Date: Thu Apr 24 15:48:09 2025 +0800 riscv: dts: spacemit: Acquire clocks for UART The K1 SoC features two clocks for UART controller, Acquire them explicitly in the driver. Also it is required to remove the clock-frequency properties from the uart node, otherwise the new clock properties are ignored by of_platform_serial_setup() in "8250_of.c". Reviewed-by: Alex Elder Reviewed-by: Haylen Chu Link: https://lore.kernel.org/r/20250424-05-dts-clock-v2-2-17d83a705c4c@gentoo.org Signed-off-by: Yixun Lan commit c4f3c45a47936da478f31f0975bc7ef2b98a9a9a Author: Yixun Lan Date: Thu Apr 24 15:48:08 2025 +0800 riscv: dts: spacemit: Acquire clocks for pinctrl Pinctrl of K1 SoC need two clocks, so explicitly acquire them. Reviewed-by: Alex Elder Reviewed-by: Haylen Chu Link: https://lore.kernel.org/r/20250424-05-dts-clock-v2-1-17d83a705c4c@gentoo.org Signed-off-by: Yixun Lan commit a6fafa64b03a1a15f33d2657d06c8e2c5f88feda Author: Haylen Chu Date: Thu May 8 11:15:29 2025 +0000 riscv: dts: spacemit: Add clock tree for SpacemiT K1 Describe the PLL and system controllers that're capable of generating clock signals in the devicetree. Signed-off-by: Haylen Chu Reviewed-by: Alex Elder Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250508111528.10508-2-heylenay@4d2.org Signed-off-by: Yixun Lan commit e668858ef7e31501912e3d7489569fc314fb4697 Merge: 0af2f6be1b4281 8090804045066a Author: Yixun Lan Date: Wed May 14 11:42:12 2025 +0800 Merge tag 'spacemit-clk-binding-for-6.16' of https://github.com/spacemit-com/linux into spacemit-dt-for-6.16 RISC-V SpacemiT Binding for 6.16 - Clock DT Binding needed by device tree commit 8bc3252436d371e7ac505f9f2685611090680a48 Author: Thorsten Blum Date: Sun Nov 10 17:21:37 2024 +0100 powerpc: Transliterate author name and remove FIXME The name is Mimi Phuong-Thao Vo. Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20241110162139.5179-2-thorsten.blum@linux.dev commit 3937f6db6e932c560a0f9ee2cd2a4fdcc314dadf Author: Eric Biggers Date: Mon May 12 19:21:15 2025 -0700 lib/crc16: unexport crc16_table and crc16_byte() Now that neither crc16_table nor crc16_byte() is used outside lib/crc16.c, fold them into lib/crc16.c. Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250513022115.39109-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 0769ebe279c0f07f5f01ef2dca9f425803039755 Author: Eric Biggers Date: Mon May 12 19:21:14 2025 -0700 w1: ds2406: use crc16() instead of crc16_byte() loop Instead of looping through each byte and calling crc16_byte(), instead just call crc16() on the whole buffer. No functional change. Acked-by: Krzysztof Kozlowski Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250513022115.39109-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 227cb4ca5a6502164f850d22aec3104d7888b270 Author: Thadeu Lima de Souza Cascardo Date: Tue Apr 15 11:53:04 2025 -0300 ext4: inline: fix len overflow in ext4_prepare_inline_data When running the following code on an ext4 filesystem with inline_data feature enabled, it will lead to the bug below. fd = open("file1", O_RDWR | O_CREAT | O_TRUNC, 0666); ftruncate(fd, 30); pwrite(fd, "a", 1, (1UL << 40) + 5UL); That happens because write_begin will succeed as when ext4_generic_write_inline_data calls ext4_prepare_inline_data, pos + len will be truncated, leading to ext4_prepare_inline_data parameter to be 6 instead of 0x10000000006. Then, later when write_end is called, we hit: BUG_ON(pos + len > EXT4_I(inode)->i_inline_size); at ext4_write_inline_data. Fix it by using a loff_t type for the len parameter in ext4_prepare_inline_data instead of an unsigned int. [ 44.545164] ------------[ cut here ]------------ [ 44.545530] kernel BUG at fs/ext4/inline.c:240! [ 44.545834] Oops: invalid opcode: 0000 [#1] SMP NOPTI [ 44.546172] CPU: 3 UID: 0 PID: 343 Comm: test Not tainted 6.15.0-rc2-00003-g9080916f4863 #45 PREEMPT(full) 112853fcebfdb93254270a7959841d2c6aa2c8bb [ 44.546523] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 44.546523] RIP: 0010:ext4_write_inline_data+0xfe/0x100 [ 44.546523] Code: 3c 0e 48 83 c7 48 48 89 de 5b 41 5c 41 5d 41 5e 41 5f 5d e9 e4 fa 43 01 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 0f 0b <0f> 0b 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 20 49 [ 44.546523] RSP: 0018:ffffb342008b79a8 EFLAGS: 00010216 [ 44.546523] RAX: 0000000000000001 RBX: ffff9329c579c000 RCX: 0000010000000006 [ 44.546523] RDX: 000000000000003c RSI: ffffb342008b79f0 RDI: ffff9329c158e738 [ 44.546523] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000 [ 44.546523] R10: 00007ffffffff000 R11: ffffffff9bd0d910 R12: 0000006210000000 [ 44.546523] R13: fffffc7e4015e700 R14: 0000010000000005 R15: ffff9329c158e738 [ 44.546523] FS: 00007f4299934740(0000) GS:ffff932a60179000(0000) knlGS:0000000000000000 [ 44.546523] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.546523] CR2: 00007f4299a1ec90 CR3: 0000000002886002 CR4: 0000000000770eb0 [ 44.546523] PKRU: 55555554 [ 44.546523] Call Trace: [ 44.546523] [ 44.546523] ext4_write_inline_data_end+0x126/0x2d0 [ 44.546523] generic_perform_write+0x17e/0x270 [ 44.546523] ext4_buffered_write_iter+0xc8/0x170 [ 44.546523] vfs_write+0x2be/0x3e0 [ 44.546523] __x64_sys_pwrite64+0x6d/0xc0 [ 44.546523] do_syscall_64+0x6a/0xf0 [ 44.546523] ? __wake_up+0x89/0xb0 [ 44.546523] ? xas_find+0x72/0x1c0 [ 44.546523] ? next_uptodate_folio+0x317/0x330 [ 44.546523] ? set_pte_range+0x1a6/0x270 [ 44.546523] ? filemap_map_pages+0x6ee/0x840 [ 44.546523] ? ext4_setattr+0x2fa/0x750 [ 44.546523] ? do_pte_missing+0x128/0xf70 [ 44.546523] ? security_inode_post_setattr+0x3e/0xd0 [ 44.546523] ? ___pte_offset_map+0x19/0x100 [ 44.546523] ? handle_mm_fault+0x721/0xa10 [ 44.546523] ? do_user_addr_fault+0x197/0x730 [ 44.546523] ? do_syscall_64+0x76/0xf0 [ 44.546523] ? arch_exit_to_user_mode_prepare+0x1e/0x60 [ 44.546523] ? irqentry_exit_to_user_mode+0x79/0x90 [ 44.546523] entry_SYSCALL_64_after_hwframe+0x55/0x5d [ 44.546523] RIP: 0033:0x7f42999c6687 [ 44.546523] Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff [ 44.546523] RSP: 002b:00007ffeae4a7930 EFLAGS: 00000202 ORIG_RAX: 0000000000000012 [ 44.546523] RAX: ffffffffffffffda RBX: 00007f4299934740 RCX: 00007f42999c6687 [ 44.546523] RDX: 0000000000000001 RSI: 000055ea6149200f RDI: 0000000000000003 [ 44.546523] RBP: 00007ffeae4a79a0 R08: 0000000000000000 R09: 0000000000000000 [ 44.546523] R10: 0000010000000005 R11: 0000000000000202 R12: 0000000000000000 [ 44.546523] R13: 00007ffeae4a7ac8 R14: 00007f4299b86000 R15: 000055ea61493dd8 [ 44.546523] [ 44.546523] Modules linked in: [ 44.568501] ---[ end trace 0000000000000000 ]--- [ 44.568889] RIP: 0010:ext4_write_inline_data+0xfe/0x100 [ 44.569328] Code: 3c 0e 48 83 c7 48 48 89 de 5b 41 5c 41 5d 41 5e 41 5f 5d e9 e4 fa 43 01 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 0f 0b <0f> 0b 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 20 49 [ 44.570931] RSP: 0018:ffffb342008b79a8 EFLAGS: 00010216 [ 44.571356] RAX: 0000000000000001 RBX: ffff9329c579c000 RCX: 0000010000000006 [ 44.571959] RDX: 000000000000003c RSI: ffffb342008b79f0 RDI: ffff9329c158e738 [ 44.572571] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000 [ 44.573148] R10: 00007ffffffff000 R11: ffffffff9bd0d910 R12: 0000006210000000 [ 44.573748] R13: fffffc7e4015e700 R14: 0000010000000005 R15: ffff9329c158e738 [ 44.574335] FS: 00007f4299934740(0000) GS:ffff932a60179000(0000) knlGS:0000000000000000 [ 44.575027] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.575520] CR2: 00007f4299a1ec90 CR3: 0000000002886002 CR4: 0000000000770eb0 [ 44.576112] PKRU: 55555554 [ 44.576338] Kernel panic - not syncing: Fatal exception [ 44.576517] Kernel Offset: 0x1a600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Reported-by: syzbot+fe2a25dae02a207717a0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=fe2a25dae02a207717a0 Fixes: f19d5870cbf7 ("ext4: add normal write support for inline data") Signed-off-by: Thadeu Lima de Souza Cascardo Cc: stable@vger.kernel.org Reviewed-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://patch.msgid.link/20250415-ext4-prepare-inline-overflow-v1-1-f4c13d900967@igalia.com Signed-off-by: Theodore Ts'o commit bc049387b41f41bee61e8cc338a5e99ca9798a09 Author: Kumar Kartikeya Dwivedi Date: Tue May 13 07:28:12 2025 -0700 bpf: Add support for __prog argument suffix to pass in prog->aux Instead of hardcoding the list of kfuncs that need prog->aux passed to them with a combination of fixup_kfunc_call adjustment + __ign suffix, combine both in __prog suffix, which ignores the argument passed in, and fixes it up to the prog->aux. This allows kfuncs to have the prog->aux passed into them without having to touch the verifier. Cc: Tejun Heo Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20250513142812.1021591-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit dc75c3ced10c611f524e9e444303a0249ce32e43 Author: Heiner Kallweit Date: Mon May 12 22:20:59 2025 +0200 net: phy: remove stub for mdiobus_register_board_info The functionality of mdiobus_register_board_info() typically isn't optional for the caller. Therefore remove the stub. Note: Currently we have only one caller of mdiobus_register_board_info(), in a DSA/PHYLINK context. Therefore CONFIG_MDIO_DEVICE is selected anyway. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/410a2222-c4e8-45b0-9091-d49674caeb00@gmail.com Signed-off-by: Jakub Kicinski commit ae605349e1fa5a29cdeecf52f92aa76850900d90 Author: Vladimir Oltean Date: Mon May 12 18:44:11 2025 +0300 net: mlxsw: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the mlxsw driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. The UAPI is still ioctl-only, but it's best to remove the "ioctl" mentions from the driver in case a netlink variant appears. Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250512154411.848614-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 9e619cd4fefd19cdce16e169d5827bc64ae01aa1 Author: Shakeel Butt Date: Tue May 6 15:55:33 2025 -0700 memcg: no irq disable for memcg stock lock There is no need to disable irqs to use memcg per-cpu stock, so let's just not do that. One consequence of this change is if the kernel while in task context has the memcg stock lock and that cpu got interrupted. The memcg charges on that cpu in the irq context will take the slow path of memcg charging. However that should be super rare and should be fine in general. Link: https://lkml.kernel.org/r/20250506225533.2580386-5-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Eric Dumaze Cc: Jakub Kacinski Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit c80509ef65e4e48b1a5cf9dbb98a3ee8be1accb3 Author: Shakeel Butt Date: Tue May 6 15:55:32 2025 -0700 memcg: completely decouple memcg and obj stocks Let's completely decouple the memcg and obj per-cpu stocks. This will enable us to make memcg per-cpu stocks to used without disabling irqs. Also it will enable us to make obj stocks nmi safe independently which is required to make kmalloc/slab safe for allocations from nmi context. Link: https://lkml.kernel.org/r/20250506225533.2580386-4-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Eric Dumaze Cc: Jakub Kacinski Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 3523dd7af41363f97044ca80cf835ba6e853b9f7 Author: Shakeel Butt Date: Tue May 6 15:55:31 2025 -0700 memcg: separate local_trylock for memcg and obj The per-cpu stock_lock protects cached memcg and cached objcg and their respective fields. However there is no dependency between these fields and it is better to have fine grained separate locks for cached memcg and cached objcg. This decoupling of locks allows us to make the memcg charge cache and objcg charge cache to be nmi safe independently. At the moment, memcg charge cache is already nmi safe and this decoupling will allow to make memcg charge cache work without disabling irqs. Link: https://lkml.kernel.org/r/20250506225533.2580386-3-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Eric Dumaze Cc: Jakub Kacinski Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 2fba5961c64c56d70fa8380da3b14f32b20a4580 Author: Shakeel Butt Date: Tue May 6 15:55:30 2025 -0700 memcg: simplify consume_stock Patch series "memcg: decouple memcg and objcg stocks", v3. The per-cpu memcg charge cache and objcg charge cache are coupled in a single struct memcg_stock_pcp and a single local lock is used to protect both of the caches. This makes memcg charging and objcg charging nmi safe challenging. Decoupling memcg and objcg stocks would allow us to make them nmi safe and even work without disabling irqs independently. This series completely decouples memcg and objcg stocks. To evaluate the impact of this series with and without PREEMPT_RT config, we ran varying number of netperf clients in different cgroups on a 72 CPU machine. $ netserver -6 $ netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K PREEMPT_RT config: ------------------ number of clients | Without series | With series 6 | 38559.1 Mbps | 38652.6 Mbps 12 | 37388.8 Mbps | 37560.1 Mbps 18 | 30707.5 Mbps | 31378.3 Mbps 24 | 25908.4 Mbps | 26423.9 Mbps 30 | 22347.7 Mbps | 22326.5 Mbps 36 | 20235.1 Mbps | 20165.0 Mbps !PREEMPT_RT config: ------------------- number of clients | Without series | With series 6 | 50235.7 Mbps | 51415.4 Mbps 12 | 49336.5 Mbps | 49901.4 Mbps 18 | 46306.8 Mbps | 46482.7 Mbps 24 | 38145.7 Mbps | 38729.4 Mbps 30 | 30347.6 Mbps | 31698.2 Mbps 36 | 26976.6 Mbps | 27364.4 Mbps No performance regression was observed. This patch (of 4): consume_stock() does not need to check gfp_mask for spinning and can simply trylock the local lock to decide to proceed or fail. No need to spin at all for local lock. One of the concern raised was that on PREEMPT_RT kernels, this trylock can fail more often due to tasks having lock_lock can be preempted. This can potentially cause the task which have preempted the task having the local_lock to take the slow path of memcg charging. However this behavior will only impact the performance if memcg charging slowpath is worse than two context switches and possibly scheduling delay behavior of current code. From the network intensive workload experiment it does not seem like the case. We ran varying number of netperf clients in different cgroups on a 72 CPU machine for PREEMPT_RT config. $ netserver -6 $ netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K number of clients | Without series | With series 6 | 38559.1 Mbps | 38652.6 Mbps 12 | 37388.8 Mbps | 37560.1 Mbps 18 | 30707.5 Mbps | 31378.3 Mbps 24 | 25908.4 Mbps | 26423.9 Mbps 30 | 22347.7 Mbps | 22326.5 Mbps 36 | 20235.1 Mbps | 20165.0 Mbps We don't see any significant performance difference for the network intensive workload with this series. Link: https://lkml.kernel.org/r/20250506225533.2580386-1-shakeel.butt@linux.dev Link: https://lkml.kernel.org/r/20250506225533.2580386-2-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Vlastimil Babka Cc: Alexei Starovoitov Cc: Eric Dumaze Cc: Jakub Kacinski Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 0cad6736f4b9bbe8129f367ed5818fa4aef6c2b5 Author: Feng Lee <379943137@qq.com> Date: Fri May 9 14:32:30 2025 +0800 mm: remove obsolete pgd_offset_gate() Remove pgd_offset_gate() completely and simply make the single caller use pgd_offset(). It appears that the gate area resides in the kernel-mapped segment exclusively on IA64. Therefore, removing pgd_offset_k is safe since IA64 is now obsolete. Link: https://lkml.kernel.org/r/tencent_503130C3CD56569191396268CF4D12F09A06@qq.com Signed-off-by: Feng Lee <379943137@qq.com> Reviewed-by: Barry Song Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: bibo mao Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: Lance Yang Cc: Peter Xu Signed-off-by: Andrew Morton commit 3c06ee7c24c27466c73209e00ee4c99e0115da1e Author: Lorenzo Stoakes Date: Fri May 9 13:13:36 2025 +0100 mm/vma: remove mmap() retry merge We have now introduced a mechanism that obviates the need for a reattempted merge via the mmap_prepare() file hook, so eliminate this functionality altogether. The retry merge logic has been the cause of a great deal of complexity in the past and required a great deal of careful manoeuvring of code to ensure its continued and correct functionality. It has also recently been involved in an issue surrounding maple tree state, which again points to its problematic nature. We make it much easier to reason about mmap() logic by eliminating this and simply writing a VMA once. This also opens the doors to future optimisation and improvement in the mmap() logic. For any device or file system which encounters unwanted VMA fragmentation as a result of this change (that is, having not implemented .mmap_prepare hooks), the issue is easily resolvable by doing so. Link: https://lkml.kernel.org/r/d5d8fc74f02b89d6bec5ae8bc0e36d7853b65cda.1746792520.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (Microsoft) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 439b3fb0b01005e08e91578278475269215e9a7f Author: Lorenzo Stoakes Date: Fri May 9 13:13:35 2025 +0100 mm: secretmem: convert to .mmap_prepare() hook Secretmem has a simple .mmap() hook which is easily converted to the new .mmap_prepare() callback. Importantly, it's a rare instance of an driver that manipulates a VMA which is mergeable (that is, not a VM_SPECIAL mapping) while also adjusting VMA flags which may adjust mergeability, meaning the retry merge logic might impact whether or not the VMA is merged. By using .mmap_prepare() there's no longer any need to retry the merge later as we can simply set the correct flags from the start. This change therefore allows us to remove the retry merge logic in a subsequent commit. Link: https://lkml.kernel.org/r/0f758474fa6a30197bdf25ba62f898a69d84eef3.1746792520.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Mike Rapoport (Microsoft) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit c84bf6dd2b836b49bb2662668ff1692350d28236 Author: Lorenzo Stoakes Date: Fri May 9 13:13:34 2025 +0100 mm: introduce new .mmap_prepare() file callback Patch series "eliminate mmap() retry merge, add .mmap_prepare hook", v2. During the mmap() of a file-backed mapping, we invoke the underlying driver file's mmap() callback in order to perform driver/file system initialisation of the underlying VMA. This has been a source of issues in the past, including a significant security concern relating to unwinding of error state discovered by Jann Horn, as fixed in commit 5de195060b2e ("mm: resolve faulty mmap_region() error path behaviour") which performed the recent, significant, rework of mmap() as a whole. However, we have had a fly in the ointment remain - drivers have a great deal of freedom in the .mmap() hook to manipulate VMA state (as well as page table state). This can be problematic, as we can no longer reason sensibly about VMA state once the call is complete (the ability to do - anything - here does rather interfere with that). In addition, callers may choose to do odd or unusual things which might interfere with subsequent steps in the mmap() process, and it may do so and then raise an error, requiring very careful unwinding of state about which we can make no assumptions. Rather than providing such an open-ended interface, this series provides an alternative, far more restrictive one - we expose a whitelist of fields which can be adjusted by the driver, along with immutable state upon which the driver can make such decisions: struct vm_area_desc { /* Immutable state. */ struct mm_struct *mm; unsigned long start; unsigned long end; /* Mutable fields. Populated with initial state. */ pgoff_t pgoff; struct file *file; vm_flags_t vm_flags; pgprot_t page_prot; /* Write-only fields. */ const struct vm_operations_struct *vm_ops; void *private_data; }; The mmap logic then updates the state used to either merge with a VMA or establish a new VMA based upon this logic. This is achieved via new file hook .mmap_prepare(), which is, importantly, invoked very early on in the mmap() process. If an error arises, we can very simply abort the operation with very little unwinding of state required. The existing logic contains another, related, peccadillo - since the .mmap() callback might do anything, it may also cause a previously unmergeable VMA to become mergeable with adjacent VMAs. Right now the logic will retry a merge like this only if the driver changes VMA flags, and changes them in such a way that a merge might succeed (that is, the flags are not 'special', that is do not contain any of the flags specified in VM_SPECIAL). This has also been the source of a great deal of pain - it's hard to reason about an .mmap() callback that might do - anything - but it's also hard to reason about setting up a VMA and writing to the maple tree, only to do it again utilising a great deal of shared state. Since .mmap_prepare() sets fields before the first merge is even attempted, the use of this callback obviates the need for this retry merge logic. A driver may only specify .mmap_prepare() or the deprecated .mmap() callback. In future we may add futher callbacks beyond .mmap_prepare() to faciliate all use cass as we convert drivers. In researching this change, I examined every .mmap() callback, and discovered only a very few that set VMA state in such a way that a. the VMA flags changed and b. this would be mergeable. In the majority of cases, it turns out that drivers are mapping kernel memory and thus ultimately set VM_PFNMAP, VM_MIXEDMAP, or other unmergeable VM_SPECIAL flags. Of those that remain I identified a number of cases which are only applicable in DAX, setting the VM_HUGEPAGE flag: * dax_mmap() * erofs_file_mmap() * ext4_file_mmap() * xfs_file_mmap() For this remerge to not occur and to impact users, each of these cases would require a user to mmap() files using DAX, in parts, immediately adjacent to one another. This is a very unlikely usecase and so it does not appear to be worthwhile to adjust this functionality accordingly. We can, however, very quickly do so if needed by simply adding an .mmap_prepare() callback to these as required. There are two further non-DAX cases I idenitfied: * orangefs_file_mmap() - Clears VM_RAND_READ if set, replacing with VM_SEQ_READ. * usb_stream_hwdep_mmap() - Sets VM_DONTDUMP. Both of these cases again seem very unlikely to be mmap()'d immediately adjacent to one another in a fashion that would result in a merge. Finally, we are left with a viable case: * secretmem_mmap() - Set VM_LOCKED, VM_DONTDUMP. This is viable enough that the mm selftests trigger the logic as a matter of course. Therefore, this series replace the .secretmem_mmap() hook with .secret_mmap_prepare(). This patch (of 3): Provide a means by which drivers can specify which fields of those permitted to be changed should be altered to prior to mmap()'ing a range (which may either result from a merge or from mapping an entirely new VMA). Doing so is substantially safer than the existing .mmap() calback which provides unrestricted access to the part-constructed VMA and permits drivers and file systems to do 'creative' things which makes it hard to reason about the state of the VMA after the function returns. The existing .mmap() callback's freedom has caused a great deal of issues, especially in error handling, as unwinding the mmap() state has proven to be non-trivial and caused significant issues in the past, for instance those addressed in commit 5de195060b2e ("mm: resolve faulty mmap_region() error path behaviour"). It also necessitates a second attempt at merge once the .mmap() callback has completed, which has caused issues in the past, is awkward, adds overhead and is difficult to reason about. The .mmap_prepare() callback eliminates this requirement, as we can update fields prior to even attempting the first merge. It is safer, as we heavily restrict what can actually be modified, and being invoked very early in the mmap() process, error handling can be performed safely with very little unwinding of state required. The .mmap_prepare() and deprecated .mmap() callbacks are mutually exclusive, so we permit only one to be invoked at a time. Update vma userland test stubs to account for changes. Link: https://lkml.kernel.org/r/cover.1746792520.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/adb36a7c4affd7393b2fc4b54cc5cfe211e41f71.1746792520.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: David Hildenbrand Cc: Jan Kara Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit d2def68ae06ab6a1f38bc1a2449b06ee4f108412 Author: Waiman Long Date: Thu May 1 21:04:43 2025 -0400 selftests: memcg: increase error tolerance of child memory.current check in test_memcg_protection() The test_memcg_protection() function is used for the test_memcg_min and test_memcg_low sub-tests. This function generates a set of parent/child cgroups like: parent: memory.min/low = 50M child 0: memory.min/low = 75M, memory.current = 50M child 1: memory.min/low = 25M, memory.current = 50M child 2: memory.min/low = 0, memory.current = 50M After applying memory pressure, the function expects the following actual memory usages. parent: memory.current ~= 50M child 0: memory.current ~= 29M child 1: memory.current ~= 21M child 2: memory.current ~= 0 In reality, the actual memory usages can differ quite a bit from the expected values. It uses an error tolerance of 10% with the values_close() helper. Both the test_memcg_min and test_memcg_low sub-tests can fail sporadically because the actual memory usage exceeds the 10% error tolerance. Below are a sample of the usage data of the tests runs that fail. Child Actual usage Expected usage %err ----- ------------ -------------- ---- 1 16990208 22020096 -12.9% 1 17252352 22020096 -12.1% 0 37699584 30408704 +10.7% 1 14368768 22020096 -21.0% 1 16871424 22020096 -13.2% The current 10% error tolerenace might be right at the time test_memcontrol.c was first introduced in v4.18 kernel, but memory reclaim have certainly evolved quite a bit since then which may result in a bit more run-to-run variation than previously expected. Increase the error tolerance to 15% for child 0 and 20% for child 1 to minimize the chance of this type of failure. The tolerance is bigger for child 1 because an upswing in child 0 corresponds to a smaller %err than a similar downswing in child 1 due to the way %err is used in values_close(). Before this patch, a 100 test runs of test_memcontrol produced the following results: 17 not ok 1 test_memcg_min 22 not ok 2 test_memcg_low After applying this patch, there were no test failure for test_memcg_min and test_memcg_low in 100 test runs. However, these tests may still fail once in a while if the memory usage goes beyond the newly extended range. Link: https://lkml.kernel.org/r/20250502010443.106022-3-longman@redhat.com Signed-off-by: Waiman Long Acked-by: Tejun Heo Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Signed-off-by: Andrew Morton commit fa6b8b5d9f97778bc44c8a9fe33a0e4b8fae5f92 Author: Waiman Long Date: Thu May 1 21:04:42 2025 -0400 selftests: memcg: allow low event with no memory.low and memory_recursiveprot on Patch series "memcg: Fix test_memcg_min/low test failures", v8. The test_memcontrol selftest consistently fails its test_memcg_low sub-test (with memory_recursiveprot enabled) and sporadically fails its test_memcg_min sub-test. This patchset fixes the test_memcg_min and test_memcg_low failures by adjusting the test_memcontrol selftest to fix these test failures. This patch (of 8): The test_memcontrol selftest consistently fails its test_memcg_low sub-test due to the fact that its 3rd test child cgroup which have a memmory.low of 0 have low event count. This happens when memory_recursiveprot mount option is enabled which is the default setting used by systemd to mount cgroup2 filesystem. This issue was originally fixed by commit cdc69458a5f3 ("cgroup: account for memory_recursiveprot in test_memcg_low()"). It was later reverted by commit 1d09069f5313 ("selftests: memcg: expect no low events in unprotected sibling") expecting the memory reclaim code would be fixed. However, it turns out the unprotected cgroup may still have some residual effective memory.low protection depending on the memory.low settings in its parent and its siblings. As a result, low events may still be triggered. One way to fix the test failure is to revert the revert commit. However, Michal suggested that it might be better to ignore the low event count with memory_recursiveprot enabled as low event may or may not happen depending on the actual test configuration. Modify the test_memcontrol.c to ignore low event in the 3rd child cgroup with memory_recursiveprot on. The 4th child cgroup has no memory usage and so has an effective low of 0. It has no low event count because the mem_cgroup_below_low() check in shrink_node_memcgs() is skipped as mem_cgroup_below_min() returns true. If we ever change mem_cgroup_below_min() in such a way that it no longer skips the no usage case, we will have to add code to explicitly skip it. With this patch applied, the test_memcg_low sub-test finishes successfully without failure in most cases. Though both test_memcg_low and test_memcg_min sub-tests may still fail occasionally if the memory.current values fall outside of the expected ranges. Link: https://lkml.kernel.org/r/20250502010443.106022-1-longman@redhat.com Link: https://lkml.kernel.org/r/20250502010443.106022-2-longman@redhat.com Signed-off-by: Waiman Long Suggested-by: Michal Koutný Acked-by: Michal Koutný Acked-by: Tejun Heo Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Waiman Long Signed-off-by: Andrew Morton commit 0d161eb27d69ceb371b3409184a1bb69d3c83de3 Author: Konrad Dybcio Date: Mon May 12 20:07:39 2025 +0200 net: ipa: Make the SMEM item ID constant It can't vary, stop storing the same magic number everywhere. Signed-off-by: Konrad Dybcio Reviewed-by: Alex Elder Link: https://patch.msgid.link/20250512-topic-ipa_smem-v1-1-302679514a0d@oss.qualcomm.com Signed-off-by: Jakub Kicinski commit 51672a6587a0238761e0f8556b67c8ddbd9dbd73 Author: Vladimir Oltean Date: Mon May 12 14:24:02 2025 +0300 net: enetc: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the ENETC driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. Move the enetc_hwtstamp_get() and enetc_hwtstamp_set() calls away from enetc_ioctl() to dedicated net_device_ops for the LS1028A PF and VF (NETC v4 does not yet implement enetc_ioctl()), adapt the prototypes and export these symbols (enetc_ioctl() is also exported). Signed-off-by: Vladimir Oltean Reviewed-by: Wei Fang Link: https://patch.msgid.link/20250512112402.4100618-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 904c6ad822b6dc115cbef2c1a119b89149fc5add Author: Jiawen Wu Date: Mon May 12 18:06:52 2025 +0800 net: txgbe: Fix pending interrupt For unknown reasons, sometimes the value of MISC interrupt is 0 in the IRQ handle function. In this case, wx_intr_enable() is also should be invoked to clear the interrupt. Otherwise, the next interrupt would never be reported. Fixes: a9843689e2de ("net: txgbe: add sriov function support") Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/F4F708403CE7090B+20250512100652.139510-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 38cb08c3fcd3f3b1d0225dcec8ae50fab5751549 Author: Lyude Paul Date: Tue May 13 18:09:57 2025 -0400 rust: drm: gem: Implement AlwaysRefCounted for all gem objects automatically Currently we are requiring AlwaysRefCounted in most trait bounds for gem objects, and implementing it by hand for our only current type of gem object. However, all gem objects use the same functions for reference counting - and all gem objects support reference counting. We're planning on adding support for shmem gem objects, let's move this around a bit by instead making IntoGEMObject require AlwaysRefCounted as a trait bound, and then provide a blanket AlwaysRefCounted implementation for any object that implements IntoGEMObject so all gem object types can use the same AlwaysRefCounted implementation. This also makes things less verbose by making the AlwaysRefCounted trait bound implicit for any IntoGEMObject bound. Signed-off-by: Lyude Paul Reviewed-by: Daniel Almeida Link: https://lore.kernel.org/r/20250513221046.903358-5-lyude@redhat.com Signed-off-by: Danilo Krummrich commit b36ff40b4abd0f468564cfe9805f0d8e850cafe9 Author: Lyude Paul Date: Tue May 13 18:09:56 2025 -0400 rust: drm: gem: s/into_gem_obj()/as_raw()/ There's a few changes here: * The rename, of course (this should also let us drop the clippy annotation here) * Return *mut bindings::drm_gem_object instead of &Opaque - the latter doesn't really have any benefit and just results in conversion from the rust type to the C type having to be more verbose than necessary. Signed-off-by: Lyude Paul Reviewed-by: Daniel Almeida Link: https://lore.kernel.org/r/20250513221046.903358-4-lyude@redhat.com [ Fixup s/into_gem_obj()/as_raw()/ in safety comment. - Danilo ] Signed-off-by: Danilo Krummrich commit c20219ee62340a5744b6d8cab709e1eba8f58a80 Merge: 9f607dc39b6658 578b856b5e72b7 Author: Jakub Kicinski Date: Tue May 13 15:26:32 2025 -0700 Merge branch 'net-mlx5-hws-complex-matchers-and-rehash-mechanism-fixes' Tariq Toukan says: ==================== net/mlx5: HWS, Complex Matchers and rehash mechanism fixes Motivation: ---------- A matcher can match a certain set of match parameters. However, the number and size of match params for a single matcher are limited — all the parameters must fit within a single definer. A common example of this limitation is IPv6 address matching, where matching both source and destination IPs requires more bits than a single definer can support. SW Steering addresses this limitation by chaining multiple Steering Table Entries (STEs) within the same matcher, where each STE matches on a subset of the parameters. In HW Steering, such chaining is not possible — the matcher's STEs are managed in a hash table, and a single definer is used to calculate the hash index for STEs. Overview: -------- To address this limitation in HW Steering, we introduce *Complex Matchers*, which consist of two chained matchers. This allows matching on twice as many parameters. Complex Matchers are filled with *Complex Rules* — rules that are split into two parts and inserted into their respective matchers. The first half of the Complex Matcher is a regular matcher and points to the second half, which is an *Isolated Matcher*. An Isolated Matcher has its own isolated table and is accessible only by traffic coming from the first half of the Complex Matcher. This splitting of matchers/rules into multiple parts is transparent to users. It is hidden behind the BWC HWS API. It becomes visible only when dumping steering debug information, where the Complex Matcher appears as two separate matchers: one in the user-created table and another in its isolated table. Implementation Details: ---------------------- All user actions are performed on the second part of the rules only. The first part handles matching and applies two actions: modify header (set metadata, see details below) and go-to-table (directing traffic to the isolated table containing the isolated matcher). Rule updates (updating rule actions) are applied to the second part of the rule since user-provided actions are not executed in the first matcher. We use REG_C_6 metadata register to set and match on unique per-rule tag (see details below). Splitting rules into two parts introduces new challenges: 1. Invalid Combinations Consider two rules with different matching values: - Rule 1: A+B - Rule 2: C+D Let's split the rules into two parts as follows: |-----Complex Matcher-------| | | | 1st matcher 2nd matcher | | |---| |---| | | | A | | B | | | |---| -----> |---| | | | C | | D | | | |---| |---| | | | |---------------------------| Splitting these rules results in invalid combinations: A+D and C+B: any packet that matched on A will be forwarded to the 2nd matcher, where it will try to match on B (which is legal, and it is what the user asked for), but it will also try to match on D (which is not what the user asked for). To resolve this, we assign unique tags to each rule on the first matcher and match on these tags on the second matcher: |----------| |---------| | A | | B, TagA | | action: | | | | set TagA | | | |----------| --> |---------| | C | | D, TagB | | action: | | | | set TagB | | | |----------| |---------| 2. Duplicated Entries: Consider two rules with overlapping values: - Rule 1: A+B - Rule 2: A+D Let's split the rules into two parts as follows: |---| |---| | A | | B | |---| --> |---| | | | D | |---| |---| This leads to the duplicated entries on the first matcher, which HWS doesn't allow: subsequent delete of either of the rules will delete the only entry in the first matcher, leaving the remaining rule broken. To address this, we use a reference count for entries in the first matcher and delete STEs only when their refcount reaches zero. Both challenges are resolved by having a per-matcher data structure (implemented with rhashtable) that manages refcounts for the first part of the rules and holds unique tags (managed via IDA) for these rules to set and to match on the second matcher. Limitations: ----------- We utilize metadata register REG_C_6 in this implementation, so its usage anywhere along the flow that might include the need for Complex Matcher is prohibited. The number and size of match parameters remain limited — now constrained by what can be represented by two definers instead of one. This architectural limitation arises from the structure of Complex Matchers. If future requirements demand more parameters, Complex Matchers can be extended beyond two matchers. Additionally, there is an implementation limit of 32 match parameters per matcher (disregarding parameter size). This limit can be lifted if needed. Patches: ------- - Patches 1-3: small additions/refactoring in preparation for Complex Matcher: exposed mlx5hws_table_ft_set_next_ft() in header, added definer function to convert field name enum to string, expose the polling function mlx5hws_bwc_queue_poll() in a header. - Patch 4: in preparation for Complex Matcher, this patch adds support for Isolated Matcher. - Patch 5: the main patch - Complex Matchers implementation. [2] Patch 6: fixing the usecase where rule insertion was failing, but rehash couldn't be initiated if the number of rules in the table is below the rehash threshold. Patch 7: fixing the usecase where many rules in parallel would require rehash, due to the way the counting of rules was done. Patch 8: fixing the case where rules were requiring action template extension in parallel, leading to unneeded extensions with the same templates. Patch 9: refactor and simplify the rehash loop. Patch 10: dump error completion details, which helps a lot in trying to understand what went wrong, especially during rehash. ==================== Link: https://patch.msgid.link/1746992290-568936-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 578b856b5e72b7b8cd2390a0e525e240d3e80c92 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:10 2025 +0300 net/mlx5: HWS, dump bad completion details Failing to insert/delete a rule should not happen. If it does happen, it would be good to know at which stage it happened and what was the failure. This patch adds printing of bad CQE details. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-11-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit ef94799a87415790d4297cf06075f99b70c420cd Author: Yevgeny Kliteynik Date: Sun May 11 22:38:09 2025 +0300 net/mlx5: HWS, rework rehash loop Reworking the rehash loop - simplifying the code and making it less error prone: - Instead of doing round-robin on all the queues with batch of rules in each cycle, just go over all the queues and move all the rules that belong to this queue. - If at some stage of moving the rule we get a failure (which should not happen), this can't be rolled back. So instead of aborting rehash and leaving the matcher in a broken state, allow the loop to continue: attempt to move the rest of the rules and delete the old matcher. A rule that failed to move to a new matcher will loose its match STE once the rehash is completed and the old matcher is deleted, so the rule won't match any traffic any more. This rule's packets will fall back to the steering pipeline w/o HW offload. Rehash procedure will return an error, which will cause the rule insertion to fail for the rule that started this whole rehash. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-10-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 041861b40f599311214a52075140db8be29fd27f Author: Yevgeny Kliteynik Date: Sun May 11 22:38:08 2025 +0300 net/mlx5: HWS, fix redundant extension of action templates When a rule is inserted into a matcher, we search for the suitable action template. If such template is not found, action template array is extended with the new template. However, when several threads are performing this in parallel, there is a race - we can end up with extending the action templates array with the same template. This patch is doing the following: - refactor the code to find action template index in rule create and update, have the common code in an auxiliary function - after locking all the queues, check again if the action template array still needs to be extended Signed-off-by: Vlad Dogaru Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-9-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 4c56b5cbc323a10ebb6595500fb78fd8a4762efd Author: Yevgeny Kliteynik Date: Sun May 11 22:38:07 2025 +0300 net/mlx5: HWS, fix counting of rules in the matcher Currently the counter that counts number of rules in a matcher is increased only when rule insertion is completed. In a multi-threaded usecase this can lead to a scenario that many rules can be in process of insertion in the same matcher, while none of them has completed the insertion and the rule counter is not updated. This results in a rule insertion failure for many of them at first attempt, which leads to all of them requiring rehash and requiring locking of all the queue locks. This patch fixes the case by increasing the rule counter in the beginning of insertion process and decreasing in case of any failure. Signed-off-by: Vlad Dogaru Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-8-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 9d4024edce1063b616fa8bf7b2363290503cc322 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:06 2025 +0300 net/mlx5: HWS, force rehash when rule insertion failed Rules are inserted into hash table in accordance with their hash index. When a certain number of rules is reached, the table is rehashed: a bigger new table is allocated and all the rules are moved there. But sometimes a new rule can't be inserted into the hash table because its index is full, even though the number of rules in the table is well below the threshold. The hash function is not perfect, so such cases are not rare. When that happens, we want to do the same rehash, in order to increase the table size and lower the probability for such cases. This patch fixes the usecase where rule insertion was failing, but rehash couldn't be initiated due to low number of rules: it adds flag that denotes that rehash is required, even if the number of rules in the table is below the rehash threshold. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-7-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 17e0accac577fd6ea2090934d71a8c6f36702a26 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:05 2025 +0300 net/mlx5: HWS, support complex matchers This patch adds support for Complex Matchers/Rules Overview: -------- A matcher can match on a certain set of match parameters. However, the number and size of match params for a single matcher are limited: all the parameters must fit within a single definer. A common example of this limitation is IPv6 address matching, where matching both source and destination IPs requires more bits than a single definer can support. SW Steering addresses this limitation by chaining multiple Steering Table Entries (STEs) within the same matcher, where each STE matches on a subset of the parameters. In HW Steering, such chaining is not possible — the matcher's STEs are managed in a hash table, and a single definer is used to calculate the hash index for STEs. To address this limitation in HW Steering, we introduce Complex Matchers, which consist of two chained matchers. This allows matching on twice as many parameters. Complex Matchers are filled with Complex Rules — rules that are split into two parts and inserted into their respective matchers. The first half of the Complex Matcher is a regular matcher and points to the second half, which is an Isolated Matcher. An Isolated Matcher has its own isolated table and is accessible only by traffic coming from the first half of the Complex Matcher. This splitting of matchers/rules into multiple parts is transparent to users. It is hidden under the BWC HWS API. It becomes visible only when dumping steering debug information, where the Complex Matcher appears as two separate matchers: one in the user-created table and another in its isolated table. Some implementation details: --------------------------- All user actions are performed on the second part of the rules only. The first part handles matching and applies two actions: modify header (set metadata, see details below) and go-to-table (directing traffic to the isolated table containing the isolated matcher). Rule updates (updating rule actions) are applied to the second part of the rule since user-provided actions are not executed in the first matcher. We use REG_C_6 metadata register to set and match on unique per-rule tag (see details below). Splitting rules into two parts introduces new challenges: 1. Invalid Combinations Consider two rules with different matching values: - Rule 1: A+B - Rule 2: C+D Let's split the rules into two parts as follows: |---| |---| | A | | B | |---| --> |---| | C | | D | |---| |---| Splitting these rules results in invalid combinations like A+D and C+B. To resolve this, we assign unique tags to each rule on the first matcher and match these tags on the second matcher (the tag is implemented through modify_hdr action that sets value to metadata register REG_C_6): |----------| |---------| | A | | B, TagA | | action: | | | | set TagA | | | |----------| --> |---------| | C | | D, TagB | | action: | | | | set TagB | | | |----------| |---------| 2. Duplicated Entries: Consider two rules with overlapping values: - Rule 1: A+B - Rule 2: A+D Let's split the rules into two parts as follows: |---| |---| | A | | B | |---| --> |---| | | | D | |---| |---| This leads to the duplicated entries on the first matcher, which HWS doesn't allow: subsequent delete of either of the rules will delete the only entry in the first matcher, leaving the remaining rule broken. To address this, we use a reference count for entries in the first matcher and delete STEs only when their refcount reaches zero. Both challenges are resolved by having a per-matcher data structure (implemented with rhashtable) that manages refcounts for the first part of the rules and holds unique tags (managed via IDA) for these rules to set and to match on the second matcher. Limitations: ----------- We utilize metadata register REG_C_6 in this implementation, so its usage anywhere along the steering of the flow that might include the need for Complex Matcher is prohibited. The number and size of match parameters remain limited — now it is constrained by what can be represented by two definers instead of one. This architectural limitation arises from the structure of Complex Matchers. If future requirements demand more parameters, Complex Matchers can be extended beyond two matchers. Additionally, there is an implementation limit of 32 match parameters per rule (disregarding parameter size). This limit can be lifted if needed. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-6-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit b816743a182f532faaeaa9aaed147ff09513e375 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:04 2025 +0300 net/mlx5: HWS, introduce isolated matchers In preparation for complex matcher support, introduce the isolated matcher. Isolated matcher is a matcher that has its own isolated table. It is used as the second half of the complex matcher: when the rule is split into two parts (complex rule), then matching on the first part will send the packet to the isolated matcher that will try to match on the second part. In case of miss, the packet goes back to the matcher's end flow table. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-5-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3c739d1624e3c3186a0a0248e91851a085f6e45b Author: Yevgeny Kliteynik Date: Sun May 11 22:38:03 2025 +0300 net/mlx5: HWS, expose polling function in header file In preparation for complex matcher, expose the function that is polling queue for completion (mlx5hws_bwc_queue_poll) in header file, so that it will be used by complex matcher code. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit fed5f4831281593a4bda2f8ef6912fdbcad6e670 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:02 2025 +0300 net/mlx5: HWS, add definer function to get field name str In preparation for complex matcher support, add function for converting definer fname to str, which will be used in following patches. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d2338a27fcee9158d0378d759152b8e0a5933c88 Author: Yevgeny Kliteynik Date: Sun May 11 22:38:01 2025 +0300 net/mlx5: HWS, expose function mlx5hws_table_ft_set_next_ft in header In preparation for complex matcher support, make function mlx5hws_table_ft_set_next_ft() non-static and expose it in header. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1746992290-568936-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 36b1ccbfa0c2f45fae3e07bf66e40d7fd6704874 Author: Lyude Paul Date: Tue May 13 18:09:55 2025 -0400 rust: drm: gem: Refactor IntoGEMObject::from_gem_obj() to as_ref() There's a few issues with this function, mainly: * This function -probably- should have been unsafe from the start. Pointers are not always necessarily valid, but you want a function that does field-projection for a pointer that can travel outside of the original struct to be unsafe, at least if I understand properly. * *mut Self is not terribly useful in this context, the majority of uses of from_gem_obj() grab a *mut Self and then immediately convert it into a &'a Self. It also goes against the ffi conventions we've set in the rest of the kernel thus far. * from_gem_obj() also doesn't follow the naming conventions in the rest of the DRM bindings at the moment, as_ref() would be a better name. So, let's: * Make from_gem_obj() unsafe * Convert it to return &'a Self * Rename it to as_ref() * Update all call locations Signed-off-by: Lyude Paul Reviewed-by: Daniel Almeida Link: https://lore.kernel.org/r/20250513221046.903358-3-lyude@redhat.com Signed-off-by: Danilo Krummrich commit 6ee48aee8c705717051109ff889f2a1d4f409ea9 Author: Lyude Paul Date: Tue May 13 18:09:54 2025 -0400 rust: drm: gem: Use NonNull for Object::dev There is usually not much of a reason to use a raw pointer in a data struct, so move this to NonNull instead. Signed-off-by: Lyude Paul Reviewed-by: Daniel Almeida Link: https://lore.kernel.org/r/20250513221046.903358-2-lyude@redhat.com Signed-off-by: Danilo Krummrich commit d542461211543522daecb34b7972d8ac1044bc97 Author: Alison Schofield Date: Tue May 13 14:58:09 2025 -0700 cxl: Sync up the driver-api/cxl documentation pmem.c regs.c mbox.c identifiers were missing. Add them to memory-devices.rst following their respective DOC comment includes. Two acpi.c identifiers were available, but not used in kernel-doc's: 1) Add add_cxl_resources to memory-devices.rst and fix up the Sphinx complaint on the ascii art by escaping it. 2) Add cxl_acpi_evaluate_qtg_dsm to access-coordinates.rst. core/features.c is new. Add a "DOC: cxl features" comment to the source and identifiers to memory_devices.rst. Signed-off-by: Alison Schofield Reviewed-by: Ira Weiny Link: https://patch.msgid.link/20250513215813.1419645-1-alison.schofield@intel.com Signed-off-by: Dave Jiang commit e5174365c13246ed8fd2d40900edec37be6f7a34 Author: Francesco Poli (wintermute) Date: Tue May 13 18:29:33 2025 +0200 cpupower: do not install files to /etc/default/ Improve the installation procedure for the systemd service unit 'cpupower.service', to be more distro-agnostic. Do not install the service unit configuration file to /etc/default/ (a directory that is used by Debian and Debian-derivatives and only rarely by other distros). Also, clarify the role of the configuration file in its own comments. Link: https://lore.kernel.org/linux-pm/20250509002206.bd2519ba52035d47c3c32aa6@paranoici.org/T/#ma8a3fa80acc4036af6c754e8ecabacc55b288ad1 Link: https://lore.kernel.org/r/20250513163937.61062-5-invernomuto@paranoici.org Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower") Signed-off-by: Francesco Poli (wintermute) Signed-off-by: Shuah Khan commit 4edef850a15c761039a50c119dbc8769b08ca45b Author: Francesco Poli (wintermute) Date: Tue May 13 18:29:32 2025 +0200 cpupower: do not call systemctl at install time Fix the installation procedure for the systemd service unit 'cpupower.service'. Do not call "systemctl daemon-reload" in the Makefile, but explain when this command should be manually issued in the README file. Link: https://lore.kernel.org/linux-pm/20250509002206.bd2519ba52035d47c3c32aa6@paranoici.org/T/#mfbb938f9c0d5a21173acb92a061eb9205fd0abfe Link: https://lore.kernel.org/r/20250513163937.61062-4-invernomuto@paranoici.org Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower") Signed-off-by: Francesco Poli (wintermute) Signed-off-by: Shuah Khan commit 2a0eaa78ff4aa09d3a70f4bdcff13f5efe0f5861 Author: Francesco Poli (wintermute) Date: Tue May 13 18:29:31 2025 +0200 cpupower: do not write DESTDIR to cpupower.service Fix the use of DESTDIR variable in the Makefile, as far as the installation of the systemd service unit 'cpupower.service' is concerned. This was caused by a misunderstanding about the purpose of the DESTDIR variable in the Makefile, which is instead meant to support staged installations: its value should not end up into installed file contents. Link: https://lore.kernel.org/linux-pm/20250509002206.bd2519ba52035d47c3c32aa6@paranoici.org/T/#mfbb938f9c0d5a21173acb92a061eb9205fd0abfe Link: https://www.gnu.org/prep/standards/html_node/DESTDIR.html Link: https://lore.kernel.org/r/20250513163937.61062-3-invernomuto@paranoici.org Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower") Signed-off-by: Francesco Poli (wintermute) Signed-off-by: Shuah Khan commit 86ea0b826fb26d3579f2fe5a68e44e5ac17f3301 Merge: a5fd6b67fe8199 a30692b4f81ba8 Author: Linus Walleij Date: Wed May 14 00:01:56 2025 +0200 Merge tag 'samsung-pinctrl-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v6.16 Refactor the driver suspend and resume to handle Google GS101 EINT GPIO pin banks and add the alive pin bank for that SoC. Signed-off-by: Linus Walleij commit a5fd6b67fe819972d8594132ebbbe2815b926f0b Author: Krzysztof Kozlowski Date: Fri May 9 17:01:15 2025 +0200 pinctrl: meson: Drop unused aml_pctl_find_group_by_name() aml_pctl_find_group_by_name() is not used anywhere, as reported by W=1 clang build: pinctrl-amlogic-a4.c:600:2: error: unused function 'aml_pctl_find_group_by_name' [-Werror,-Wunused-function] Fixes: 6e9be3abb78c ("pinctrl: Add driver support for Amlogic SoCs") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Xianwei Zhao Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/20250509150114.299962-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit ef60b8f5724da364500ddb7b8240c157ea65075e Author: Namhyung Kim Date: Thu May 1 15:53:37 2025 -0700 perf trace: Support --summary-mode=cgroup Add a new summary mode to collect stats for each cgroup. $ sudo ./perf trace -as --bpf-summary --summary-mode=cgroup -- sleep 1 Summary of events: cgroup /user.slice/user-657345.slice/user@657345.service/session.slice/org.gnome.Shell@x11.service, 535 events syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ ppoll 15 0 373.600 0.004 24.907 197.491 55.26% poll 15 0 1.325 0.001 0.088 0.369 38.76% close 66 0 0.567 0.007 0.009 0.026 3.55% write 150 0 0.471 0.001 0.003 0.010 3.29% recvmsg 94 83 0.290 0.000 0.003 0.037 16.39% ioctl 26 0 0.237 0.001 0.009 0.096 50.13% timerfd_create 66 0 0.236 0.003 0.004 0.024 8.92% timerfd_settime 70 0 0.160 0.001 0.002 0.012 7.66% writev 10 0 0.118 0.001 0.012 0.019 18.17% read 9 0 0.021 0.001 0.002 0.004 14.07% getpid 14 0 0.019 0.000 0.001 0.004 20.28% cgroup /system.slice/polkit.service, 94 events syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ ppoll 22 0 19.811 0.000 0.900 9.273 63.88% write 30 0 0.040 0.001 0.001 0.003 12.09% recvmsg 12 0 0.018 0.001 0.002 0.006 28.15% read 18 0 0.013 0.000 0.001 0.003 21.99% poll 12 0 0.006 0.000 0.001 0.001 4.48% cgroup /user.slice/user-657345.slice/user@657345.service/app.slice/app-org.gnome.Terminal.slice/gnome-terminal-server.service, 21 events syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ ppoll 4 0 17.476 0.003 4.369 13.298 69.65% recvmsg 15 12 0.068 0.002 0.005 0.014 26.53% writev 1 0 0.033 0.033 0.033 0.033 0.00% poll 1 0 0.005 0.005 0.005 0.005 0.00% ... It works only for --bpf-summary for now. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20250501225337.928470-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 54cec13d5726a88919b5bf3f47491b6c3fe67598 Author: Rodrigo Gobbi Date: Sat May 3 16:01:01 2025 -0300 dt-bindings: trivial-devices: Add Maxim max30208 The temperature sensor for maxim is a simple i2c driver, it's eligible to trivial devices. Signed-off-by: Rodrigo Gobbi Link: https://lore.kernel.org/r/20250503190509.33074-1-rodrigo.gobbi.7@gmail.com Signed-off-by: Rob Herring (Arm) commit 1090c38bbfd9ab7f22830c0e8a5c605e7d4ef084 Author: Rob Herring (Arm) Date: Wed May 7 10:42:31 2025 -0500 dt-bindings: soc: fsl,qman-fqd: Fix reserved-memory.yaml reference The reserved-memory.yaml reference needs the full path. No warnings were generated because the example has the wrong compatible string, so fix that too. Fixes: 304a90c4f75d ("dt-bindings: soc: fsl: Convert q(b)man-* to yaml format") Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507154231.1590634-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 896633412deec45d7bd6f378e93c05dcded83ccd Author: Rob Herring (Arm) Date: Mon May 5 09:49:16 2025 -0500 dt-bindings: interrupt-controller: Convert ti,omap-intc-irq to DT schema Convert the TI OMAP2/3 interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. "ti,intc-size" property isn't actually used with "ti,omap2-intc", so the 2 bindings can be combined. Link: https://lore.kernel.org/r/20250505144917.1294150-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 6248d8ccc161c09755d035e99a31b793766eed6a Author: Rob Herring (Arm) Date: Mon May 5 09:49:12 2025 -0500 dt-bindings: interrupt-controller: Convert ti,omap4-wugen-mpu to DT schema Convert the TI Wakeup Generator interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144913.1293967-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 94555704bea7936f139a7865adbf9829010b2fda Author: Rob Herring (Arm) Date: Mon May 5 09:49:07 2025 -0500 dt-bindings: interrupt-controller: Convert ti,keystone-irq to DT schema Convert the TI Keystone 2 interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144908.1293785-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit dd0cea00d80a3c2fdd71be02df8e9d4345045ea8 Author: Rob Herring (Arm) Date: Mon May 5 09:48:55 2025 -0500 dt-bindings: interrupt-controller: Convert technologic,ts4800-irqc to DT schema Convert the TS-4800 FPGA interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144856.1293370-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit c67d52fa7a0eaa2dba163af19107ac7465cf391d Author: Rob Herring (Arm) Date: Mon May 5 09:48:50 2025 -0500 dt-bindings: interrupt-controller: Convert st,spear3xx-shirq to DT schema Convert the SPEAr3xx Shared interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144851.1293180-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 9665ca7a7cd3c85d08349349e9a25e74b69f8b13 Author: Rob Herring (Arm) Date: Mon May 5 09:48:37 2025 -0500 dt-bindings: interrupt-controller: Convert snps,dw-apb-ictl to DT schema Convert the Synopsys DW-APB interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144842.1292840-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit f7c3cf504db71b01d38d69c22da71cb36394413b Author: Rob Herring (Arm) Date: Mon May 5 09:48:33 2025 -0500 dt-bindings: interrupt-controller: Convert snps,archs-intc to DT schema Convert the ARC-HS incore interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144834.1292666-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 76f75212f8f3d1c0e7180d3c0e706deb2eea9c57 Author: Rob Herring (Arm) Date: Mon May 5 09:48:29 2025 -0500 dt-bindings: interrupt-controller: Convert snps,archs-idu-intc to DT schema Convert the ARC-HS Interrupt Distribution Unit interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144830.1292495-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 66276d212fddb78c8818fd8abd6112470c809712 Author: Rob Herring (Arm) Date: Mon May 5 09:48:25 2025 -0500 dt-bindings: interrupt-controller: Convert snps,arc700-intc to DT schema Convert the Arc Core interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144826.1292329-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit fcec00d7f65e29f878f2045c915b6ebb78ed4ff5 Author: Rob Herring (Arm) Date: Mon May 5 09:48:20 2025 -0500 dt-bindings: interrupt-controller: Convert qca,ar7100-misc-intc to DT schema Convert the Qualcomm Atheros ath79 Misc interrupt controller binding to schema format. Adjust the compatible values to match what's actually in use. Link: https://lore.kernel.org/r/20250505144821.1292151-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit f3ce2e12a2c266f850bfd475b6be5d47d4249772 Author: Rob Herring (Arm) Date: Mon May 5 09:48:16 2025 -0500 dt-bindings: interrupt-controller: Convert qca,ar7100-cpu-intc to DT schema Convert the Qualcomm Atheros ath79 CPU interrupt controller binding to schema format. Link: https://lore.kernel.org/r/20250505144817.1291980-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit bbb1999ac126ac9b5627c06ec52391048de13d70 Author: Rob Herring (Arm) Date: Mon May 5 09:47:26 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,odmi-controller to DT schema Convert the Marvell On-Die Message interrupt controller binding to schema format. Drop the 'interrupt-controller' property which isn't relevant for an MSI controller. Link: https://lore.kernel.org/r/20250505144727.1290271-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 26c70ec8812f1cabd11de5e87bce303e0c9298f2 Author: Rob Herring (Arm) Date: Mon May 5 09:45:23 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,cp110-icu to DT schema Convert the Marvell ICU interrupt controller to DT schema format. Add the missing addressing properties to read and translate child node addresses. Drop the legacy binding description and example. Link: https://lore.kernel.org/r/20250505144524.1285795-1-robh@kernel.org Reviewed-by: Miquel Raynal Signed-off-by: Rob Herring (Arm) commit 270aaae0e720b4fe661b4dd912ba8794e29dd538 Author: Rob Herring (Arm) Date: Mon May 5 09:47:48 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,ap806-sei to DT schema Convert the Marvell SEI interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144749.1290862-1-robh@kernel.org Reviewed-by: Miquel Raynal Signed-off-by: Rob Herring (Arm) commit e11b723f4e7960905970686acc94d70fdc747a4f Author: Rob Herring (Arm) Date: Mon May 5 09:47:20 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,ap806-gicp to DT schema Convert the Marvell GICP MSI controller binding to schema format. It's a straight-forward conversion of the typical MSI controller. Link: https://lore.kernel.org/r/20250505144721.1290068-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit f7c17ceb9b9b8dfc361a1c958032069a9644f848 Author: Rob Herring (Arm) Date: Mon May 5 09:47:14 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,armada-8k-pic to DT schema Convert the Marvell 7K/8K PIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144715.1289866-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 4f879955f7c5bf1c9a4971fff779732c60bffb7e Author: Rob Herring (Arm) Date: Mon May 5 09:47:10 2025 -0500 dt-bindings: interrupt-controller: Convert lsi,zevio-intc to DT schema Convert the TI-NSPIRE interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. '#interrupt-cells' was missing from the property list, but used in the example, so add it. Link: https://lore.kernel.org/r/20250505144711.1289677-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 50175534158ea94dd78a68d58072a1a8ea2587db Author: Rob Herring (Arm) Date: Mon May 5 09:47:05 2025 -0500 dt-bindings: interrupt-controller: Convert jcore,aic to DT schema Convert the J-Core advanced interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144707.1289503-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit eb4d5a8296addb96c37a75074c7576122a6cb471 Author: Rob Herring (Arm) Date: Mon May 5 09:47:01 2025 -0500 dt-bindings: interrupt-controller: Convert img,pdc-intc to DT schema Convert the ImgTec Powerdown Controller (PDC) interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144703.1289335-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit ee35e2ae49550c612c8d0ff2d0d789bd61c5857c Author: Rob Herring (Arm) Date: Mon May 5 09:46:57 2025 -0500 dt-bindings: interrupt-controller: Convert google,goldfish-pic to DT schema Convert the Google Goldfish PIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144658.1289158-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit a911481b448a80f67adbf716625c91d2ab687e82 Author: Rob Herring (Arm) Date: Mon May 5 09:46:48 2025 -0500 dt-bindings: interrupt-controller: Convert ezchip,nps400-ic to DT schema Convert the EZchip NPS interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144649.1288786-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 1e7ed4dc22d30e842c61abcb591685221c9f28d7 Author: Rob Herring (Arm) Date: Mon May 5 09:46:39 2025 -0500 dt-bindings: interrupt-controller: Convert csky,mpintc to DT schema Convert the C-SKY Multi-processor interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144640.1288458-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 9a4d3926ea13df5a2e5d0d887a51bf408d854fa4 Author: Rob Herring (Arm) Date: Mon May 5 09:46:35 2025 -0500 dt-bindings: interrupt-controller: Convert csky,apb-intc to DT schema Convert the C-SKY APB interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144636.1288261-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 3cbc6d0702375b2b961fe157d2125c0bd2acd4f3 Author: Rob Herring (Arm) Date: Mon May 5 09:46:30 2025 -0500 dt-bindings: interrupt-controller: Convert cirrus,ep7209-intc to DT schema Convert the Cirrus EP7209 interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144631.1288086-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 928504c54d09a84aec40f7a1864356c6ae51c75c Author: Rob Herring (Arm) Date: Mon May 5 09:46:21 2025 -0500 dt-bindings: interrupt-controller: Convert brcm,bcm6345-l1-intc to DT schema Convert the Broadcom BCM6345 interrupt controller binding to schema format. The old schema indicated SoC specific compatibles should be present, but there are none in use. So drop them. The most number of CPUs on any platform seems to be 2, so document that as the maximum. Link: https://lore.kernel.org/r/20250505144622.1287712-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 930222f3d1a19c4200c6afd867eb9cd984855531 Author: Rob Herring (Arm) Date: Mon May 5 09:45:52 2025 -0500 dt-bindings: interrupt-controller: Convert arm,nvic to DT schema Convert the Arm NVIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144553.1286730-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 30eb852aabff590cd3b1d5cb089b2e4341d05679 Author: Rob Herring (Arm) Date: Mon May 5 09:45:47 2025 -0500 dt-bindings: interrupt-controller: Convert amazon,al-fic to DT schema Convert the Amazon FIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144548.1286525-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit a22fb93c49afc3c3ca37ccebfd6847bb68cba244 Author: Rob Herring (Arm) Date: Mon May 5 09:45:42 2025 -0500 dt-bindings: interrupt-controller: Convert al,alpine-msix to DT schema Convert the Amazaon Alpine MSIX controller binding to schema format. Drop the interrupt-controller property as the MSIX controller doesn't provide interrupts. The interrupt-parent property is required in this case for custom MSI mapping properties. Link: https://lore.kernel.org/r/20250505144543.1286351-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit fe972dd46a7ea89e2e9b27cca3286439ec30d8e8 Author: Rob Herring (Arm) Date: Mon May 5 09:45:33 2025 -0500 dt-bindings: interrupt-controller: Convert abilis,tb10x-ictl to DT schema Convert the Abilis TB10x interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144534.1286092-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit b1ae6881fbe3e86f74c2edb8c02681af6ab110b7 Author: Rob Herring (Arm) Date: Mon May 5 09:47:53 2025 -0500 dt-bindings: interrupt-controller: Convert microchip,pic32mzda-evic to DT schema Convert the Microchip PIC32 interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250505144754.1291072-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit a241f1a1b338b714e4d7417f71af9a93a9bd3c92 Author: Rob Herring (Arm) Date: Mon May 5 09:48:08 2025 -0500 dt-bindings: interrupt-controller: Convert chrp,open-pic to DT schema Convert the Open PIC interrupt controller binding to schema format. While the Linux kernel supports the "open-pic" compatible, that's not used in any upstream .dts file. It used for "device_type" though. Add "fsl,mpic" compatible which was not documented. Link: https://lore.kernel.org/r/20250505144809.1291619-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 1ee0fd43803bf82b5388db9b406c1b5e1a08cac8 Author: Rob Herring (Arm) Date: Mon May 5 09:46:25 2025 -0500 dt-bindings: interrupt-controller: Convert cdns,xtensa-{mx,pic} to DT schema Convert the Xtensa interrupt controller bindings to DT schema. Both only vary by the compatible string, so combine them into 1 schema doc. Acked-by: Max Filippov Link: https://lore.kernel.org/r/20250505144626.1287879-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 1276962ebc56a6535c6447f67110bd3bdbbbc584 Author: Rob Herring (Arm) Date: Mon May 5 09:49:00 2025 -0500 dt-bindings: interrupt-controller: Convert ti,cp-intc to DT schema Convert the TI Common Platform interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250505144903.1293558-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 29c29b1361096268fdb8b9ba5af0fcd75b038c94 Author: Rob Herring (Arm) Date: Mon May 5 09:46:11 2025 -0500 dt-bindings: interrupt-controller: Convert aspeed,ast2xxx-scu-ic to DT schema Convert the Aspeed SCU interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144613.1287360-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 815d7b2c13590a77b295d0330c31429d367f2ece Author: Rob Herring (Arm) Date: Mon May 5 09:46:04 2025 -0500 dt-bindings: interrupt-controller: Convert aspeed,ast2400-i2c-ic to DT schema Convert the Aspeed I2C interrupt controller binding to schema format. Drop the "#address-cells" and "#size-cells" as they are unused and incorrect anyways. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20250505144605.1287121-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit aacd3d6211e315642887acb9c73ef3413581a6f1 Author: Rob Herring (Arm) Date: Mon May 5 09:46:53 2025 -0500 dt-bindings: interrupt-controller: Convert faraday,ftintc010 to DT schema Convert the Faraday FTINTC010 interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250505144654.1288979-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 3151c26c811a484f5234499cff5930f8166a3823 Author: Rob Herring (Arm) Date: Mon May 5 09:45:56 2025 -0500 dt-bindings: interrupt-controller: Convert arm,versatile-fpga-irq to DT schema Convert the Arm Versatile FPGA interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250505144558.1286889-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit bac0fb596ecc65ef4952a8d27f1d186c5188aea9 Author: Rob Herring (Arm) Date: Mon May 5 09:47:42 2025 -0500 dt-bindings: interrupt-controller: Convert marvell,orion-bridge-intc to DT schema Convert the Marvell Orion bridge interrupt controller binding to schema format. marvell,orion-intc is already covered by mrvl,intc.yaml schema, so it can be dropped. Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20250505144743.1290672-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 5511d95c05e496bc231393724d66cfcb4552b666 Author: Rob Herring (Arm) Date: Mon May 5 09:46:16 2025 -0500 dt-bindings: interrupt-controller: Convert brcm,bcm2835-armctrl-ic to DT schema Convert the Broadcom BCM2835 ARMCTRL interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Link: https://lore.kernel.org/r/20250505144618.1287539-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 66eb172b5e149368f9b1d12ec0d8846bc1751a68 Author: Rob Herring (Arm) Date: Mon May 5 09:46:43 2025 -0500 dt-bindings: interrupt-controller: Convert cnxt,cx92755-ic to DT schema Convert the Conexant Digicolor interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20250505144644.1288617-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit f2e3df345c441ce2f24abc468812a73107cb8f20 Author: Rob Herring (Arm) Date: Wed May 7 10:42:53 2025 -0500 dt-bindings: Move altr,msi-controller to interrupt-controller directory While altr,msi-controller is used with PCI, it is not a PCI host bridge and is just an MSI provider. Move it with other MSI providers in the 'interrupt-controller' directory. Acked-by: Matthew Gerlach Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507154253.1593870-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 39922dc53c26842939e5d4d6bfeff8da677a9b33 Author: Namhyung Kim Date: Fri May 9 14:04:21 2025 -0700 perf report: Add 'tgid' sort key Sometimes we need to analyze the data in process level but current sort keys only work on thread level. Let's add 'tgid' sort key for that as 'pid' is already taken for thread. This will look mostly the same, but it only uses tgid instead of tid. Here's an example of a process with two threads (thloop). $ perf record -- perf test -w thloop $ perf report --stdio -s tgid,pid -H ... # # Overhead Tgid:Command / Pid:Command # ........... .......................... # 100.00% 2018407:perf 50.34% 2018407:perf 49.66% 2018409:perf Suggested-by: Stephane Eranian Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250509210421.197245-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2b61bb1d9aa601ec393054a61be0a707a5bea928 Author: Pavel Begunkov Date: Tue May 13 18:26:51 2025 +0100 io_uring/kbuf: unify legacy buf provision and removal Combine IORING_OP_PROVIDE_BUFFERS and IORING_OP_REMOVE_BUFFERS ->issue(), so that we can deduplicate ring locking and list lookups. This way we further reduce code for legacy provided buffers. Locking is also separated from buffer related handling, which makes it a bit simpler with label jumps. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f61af131622ad4337c2fb9f7c453d5b0102c7b90.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c724e801239ffc3714afe65cf6e721ddd04199d0 Author: Pavel Begunkov Date: Tue May 13 18:26:50 2025 +0100 io_uring/kbuf: refactor __io_remove_buffers __io_remove_buffers used for two purposes, the first is removing buffers for non ring based lists, which implies that it can be called multiple times for the same list. And the second is for destroying lists, which is not perfectly reentrable for ring based lists. It's confusing, so just have a helper for the legacy pbuf buffer removal, make sure it's not called for ring pbuf, and open code all ring pbuf destruction into io_put_bl(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0ae416b099d311ad23f285cea02f2c94c8ae9a6c.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 52a05d0cf8f3b4569c525153132a90661c32fe11 Author: Pavel Begunkov Date: Tue May 13 18:26:49 2025 +0100 io_uring/kbuf: don't compute size twice on prep The size in prep is calculated by io_provide_buffers_prep(), so remove the recomputation a few lines after. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7c97206561b74fce245cb22449c6082d2e066844.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4e9fda29d66b06caf5c81b8acbe0a504effc73fb Author: Pavel Begunkov Date: Tue May 13 18:26:48 2025 +0100 io_uring/kbuf: drop extra vars in io_register_pbuf_ring bl and free_bl variables in io_register_pbuf_ring() always point to the same list since we started to reallocate the pre-existent list. Drop free_bl. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d45c3342d74c9030f99376c777a4b3d59089074d.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 1724849072854a66861d461b298b04612702d685 Author: Pavel Begunkov Date: Tue May 13 18:26:47 2025 +0100 io_uring/kbuf: use mem_is_zero() Make use of mem_is_zero() for reserved fields checking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/11fe27b7a831329bcdb4ea087317ef123ba7c171.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 475a8d30371604a6363da8e304a608a5959afc40 Author: Pavel Begunkov Date: Tue May 13 18:26:46 2025 +0100 io_uring/kbuf: account ring io_buffer_list memory Follow the non-ringed pbuf struct io_buffer_list allocations and account it against the memcg. There is low chance of that being an actual problem as ring provided buffer should either pin user memory or allocate it, which is already accounted. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3985218b50d341273cafff7234e1a7e6d0db9808.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b9228817127430356c929847f111197776201225 Author: Namhyung Kim Date: Fri May 9 14:30:17 2025 -0700 perf test: Update sysfs path for core PMU caps While CPU is a system device, it'd be better to use a path for event_source devices when it checks PMU capability. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250509213017.204343-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1c3741611f92101fab5ed537531c742db38ba87d Author: Namhyung Kim Date: Fri May 9 14:30:16 2025 -0700 perf test: Fix LBR test by ignoring idle task I found 'perf record LBR tests' failing due to empty branch stacks. $ perf test -v LBR ... LBR system wide any branch test Lowering default frequency rate from 4000 to 1000. Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate. [ perf record: Woken up 8 times to write data ] [ perf record: Captured and wrote 3.142 MB /tmp/__perf_test.perf.data.dgSBl (3572 samples) ] LBR system wide any branch test: 3572 samples LBR system wide any branch test [Failed empty br stack ratio exceed 2%: 3%] LBR system wide any call test Lowering default frequency rate from 4000 to 1000. Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate. [ perf record: Woken up 8 times to write data ] [ perf record: Captured and wrote 3.337 MB /tmp/__perf_test.perf.data.dgSBl (3967 samples) ] LBR system wide any call test: 3967 samples LBR system wide any call test [Failed empty br stack ratio exceed 2%: 9%] ... The failing cases were in system-wide mode and I realized that the samples were from the idle tasks (swapper). I suspect going to/from idle state may affect the LBR contents. If we can skip empty branch stacks from the idle tasks, the failure should go away. I can see the following output in perf report -D. $ perf report -D | grep -m5 -A3 'branch stack: nr:0' ... -- ... branch stack: nr:0 ... thread: swapper:0 ...... dso: /proc/kcore -- ... branch stack: nr:0 ... thread: swapper:0 ...... dso: /proc/kcore -- ... branch stack: nr:0 ... thread: DefaultEventMan:10282 ...... dso: /proc/kcore -- ... branch stack: nr:0 ... thread: swapper:0 ...... dso: /proc/kcore -- ... branch stack: nr:0 ... thread: swapper:0 ...... dso: /proc/kcore $ perf report -D | grep -c 'branch stack: nr:0' 145 $ perf report -D | grep -A3 'branch stack: nr:0' | grep thread | grep -c swapper i36 $ perf report -D | grep -A3 'branch stack: nr:0' | grep thread | grep -cv swapper 9 Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250509213017.204343-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 891d3b8be32a69ae94d32e3f1e1ee01359020d49 Author: Borislav Petkov (AMD) Date: Tue May 13 13:04:05 2025 +0200 x86/bugs: Fix SRSO reporting on Zen1/2 with SMT disabled 1f4bb068b498 ("x86/bugs: Restructure SRSO mitigation") does this: if (boot_cpu_data.x86 < 0x19 && !cpu_smt_possible()) { setup_force_cpu_cap(X86_FEATURE_SRSO_NO); srso_mitigation = SRSO_MITIGATION_NONE; return; } and, in particular, sets srso_mitigation to NONE. This leads to reporting Speculative Return Stack Overflow: Vulnerable on Zen2 machines. There's a far bigger confusion with what SRSO_NO means and how it is used in the code but this will be a matter of future fixes and restructuring to how the SRSO mitigation gets determined. Fix the reporting issue for now. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: David Kaplan Link: https://lore.kernel.org/20250513110405.15872-1-bp@kernel.org commit 58dfd95956c406a364d5c26a23ae47e70f46075a Merge: a223ce195741ca dba600d0f2e9d2 Author: Dave Jiang Date: Tue May 13 13:29:47 2025 -0700 Merge branch 'for-6.16/cxl-docs' into cxl-for-next Detailed documentation for the entire CXL sub-system from platform, BIOS, to CXL driver, memory interface, memory hotplug, and others. commit aea3496bbc7c20037ecc35411264de109d700fc7 Author: James Clark Date: Tue May 13 10:57:30 2025 +0100 perf tools: Fix arm64 source package build Syscall tables are generated from rules in the kernel tree. Add the related files to the MANIFEST to fix the Perf source package build. Reported-by: Arnaldo Carvalho de Melo Fixes: bfb713ea53c746b0 ("perf tools: Fix arm64 build by generating unistd_64.h") Signed-off-by: James Clark Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250513-james-perf-src-pkg-fix-v1-1-bcfd0486dbd6@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 3eb5c49f71d0ecb290aba3bb2c9bb8a68b552623 Author: Ian Rogers Date: Mon May 12 11:47:00 2025 -0700 perf test: Hybrid improvements for metric value validation test On my alderlake I currently see for the "perf metrics value validation" test: ``` Total Test Count: 142 Passed Test Count: 139 [ Metric Relationship Error: The collected value of metric ['tma_fetch_latency', 'tma_fetch_bandwidth', 'tma_frontend_bound'] is [31.137028] in workload(s): ['perf bench futex hash -r 2 -s'] but expected value range is [tma_frontend_bound, tma_frontend_bound] Relationship rule description: 'Sum of the level 2 children should equal level 1 parent', Metric Relationship Error: The collected value of metric ['tma_memory_bound', 'tma_core_bound', 'tma_backend_bound'] is [6.564442] in workload(s): ['perf bench futex hash -r 2 -s'] but expected value range is [tma_backend_bound, tma_backend_bound] Relationship rule description: 'Sum of the level 2 children should equal level 1 parent', Metric Relationship Error: The collected value of metric ['tma_light_operations', 'tma_heavy_operations', 'tma_retiring'] is [57.806179] in workload(s): ['perf bench futex hash -r 2 -s'] but expected value range is [tma_retiring, tma_retiring] Relationship rule description: 'Sum of the level 2 children should equal level 1 parent'] Metric validation return with erros. Please check metrics reported with errors. ``` I suspect it is due to two metrics for different CPU types being enabled. Add a -cputype option to avoid this. The test still fails with: ``` Total Test Count: 115 Passed Test Count: 114 [ Wrong Metric Value Error: The collected value of metric ['tma_l2_hit_latency'] is [117.947088] in workload(s): ['perf bench futex hash -r 2 -s'] but expected value range is [0, 100]] Metric validation return with errors. Please check metrics reported with errors. ``` which is a reproducible genuine error and likely requires a metric fix. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250512184700.11691-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit dba600d0f2e9d2dea53891d95f1ff38d3e089275 Author: Gregory Price Date: Mon May 12 12:21:34 2025 -0400 cxl: docs - add self-referencing cross-links Add some crosslinks between pages in the CXL docs - mostly to the ACPI tables. Suggested-by: Bagas Sanjaya Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-18-gourry@gourry.net Signed-off-by: Dave Jiang commit df63e0120b5ee35896b05a5d96d686105509c3f7 Author: Gregory Price Date: Mon May 12 12:21:33 2025 -0400 cxl: docs/allocation/hugepages Add docs on how CXL capacity interacts with CMA and HugeTLB allocation interfaces. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-17-gourry@gourry.net Signed-off-by: Dave Jiang commit f109e77dde6e52439dce9fca19a0121c7cd04424 Author: Gregory Price Date: Mon May 12 12:21:32 2025 -0400 cxl: docs/allocation/reclaim Document a bit about how reclaim interacts with various CXL configurations. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-16-gourry@gourry.net Signed-off-by: Dave Jiang commit 419dc40b82374cc7c417f0af613b9e6ea1d34095 Author: Gregory Price Date: Mon May 12 12:21:31 2025 -0400 cxl: docs/allocation/page-allocator Document some interesting interactions that occur when exposing CXL memory capacity to page allocator. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-15-gourry@gourry.net Signed-off-by: Dave Jiang commit 78ab67510ed9933bb3622d313dde93c6739d37ae Author: Gregory Price Date: Mon May 12 12:21:30 2025 -0400 cxl: docs/allocation/dax Small example of accessing CXL memory capacity via DAX device Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-14-gourry@gourry.net Signed-off-by: Dave Jiang commit 641fdea6b90ee5bd0bab883c767abac69c5389b5 Author: Gregory Price Date: Mon May 12 12:21:29 2025 -0400 cxl: docs/linux/memory-hotplug Add documentation on how the CXL driver surfaces memory through the DAX driver and memory-hotplug. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-13-gourry@gourry.net Signed-off-by: Dave Jiang commit 36e9f71bd6fc0f7521c3f05bb57d3db1d821a11f Author: Gregory Price Date: Mon May 12 12:21:28 2025 -0400 cxl: docs/linux/dax-driver documentation Add documentation on how the CXL driver interacts with the DAX driver. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-12-gourry@gourry.net Signed-off-by: Dave Jiang commit ef3a43a69133a211118b5716615cd649ac73b8dc Author: Gregory Price Date: Mon May 12 12:21:27 2025 -0400 cxl: docs/linux/cxl-driver - add example configurations Add 4 example configurations: - single device - cross-host-bridge interleave - intra-host-bridge-interleave - multi-level interleave Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-11-gourry@gourry.net Signed-off-by: Dave Jiang commit 2e2865a1d0c56987d1eb328645911718f0e672da Author: Gregory Price Date: Mon May 12 12:21:26 2025 -0400 cxl: docs/linux - add cxl-driver theory of operation Add docs for the CXL driver that explains the base devices, decoder types, region types, mailbox interfaces, and decoder programming. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-10-gourry@gourry.net Signed-off-by: Dave Jiang commit bef826ead3cde244b1a7393bd0c7eee7bbbec8cf Author: Gregory Price Date: Mon May 12 12:21:25 2025 -0400 cxl: docs/linux - early boot configuration Document __init time configurations that affect CXL driver probe process and memory region configuration. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-9-gourry@gourry.net Signed-off-by: Dave Jiang commit 9bd8546e59542657a7c5a4ee02ea67d3e68f964a Author: Gregory Price Date: Mon May 12 12:21:24 2025 -0400 cxl: docs/linux - overview Add type-3 device configuration overview that explains the probe process for a type-3 device from early-boot through memory-hotplug. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-8-gourry@gourry.net Signed-off-by: Dave Jiang commit 8545940bd420e7a79c66bccee330a947581d259b Author: Gregory Price Date: Mon May 12 12:21:23 2025 -0400 cxl: docs/platform/example-configs documentation Add example ACPI Table configurations for different sample platforms. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-7-gourry@gourry.net Signed-off-by: Dave Jiang commit d1ba364627d5dc3429735c846ca2a8ea925073bd Author: Gregory Price Date: Mon May 12 12:21:22 2025 -0400 cxl: docs/platform/acpi reference documentation Add basic ACPI table information needed to understand the CXL driver probe process. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-6-gourry@gourry.net Signed-off-by: Dave Jiang commit e4528b9ef0b6e7df1e8eaede2a7f45566fb7970b Author: Gregory Price Date: Mon May 12 12:21:21 2025 -0400 cxl: docs/platform/bios-and-efi documentation Add some docs on CXL configurations done in bios/efi that affect linux configuration - information vendors may care to consider. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-5-gourry@gourry.net Signed-off-by: Dave Jiang commit 750d662c555227b14e8e3b11384e925265174af7 Author: Gregory Price Date: Mon May 12 12:21:20 2025 -0400 cxl: docs/devices - add cxl device and protocol reference Add a simple device primer sufficient to understand the theory of operation documentation. Signed-off-by: Gregory Price Link: https://patch.msgid.link/20250512162134.3596150-4-gourry@gourry.net Signed-off-by: Dave Jiang commit a3bf6b417b99b12db7b6c2d007c89a5623f9be0c Author: Gregory Price Date: Mon May 12 12:21:19 2025 -0400 cxl: docs - access-coordinates doc fixups Place the hierarchy diagram in access-coordinates.rst in a code block. Fix a few grammar issues. Suggested-by: Randy Dunlap Suggested-by: Bagas Sanjaya Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-3-gourry@gourry.net Signed-off-by: Dave Jiang commit a770647294bb679c48b5fbc49388f1d85e9f2e9f Author: Gregory Price Date: Mon May 12 12:21:18 2025 -0400 cxl: update documentation structure in prep for new docs Restructure the cxl folder to make adding docs per-page cleaner. Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20250512162134.3596150-2-gourry@gourry.net Signed-off-by: Dave Jiang commit 7f84f67418e3a10c4bba721081f5c4a2c22bea8a Author: Ian Rogers Date: Mon May 12 11:46:59 2025 -0700 perf list: Display the PMU name associated with a perf metric in JSON The 'perf stat --cputype' option can be used to filter which metrics will be applied, for this reason the JSON metrics have an associated PMU. List this PMU name in the 'perf list' output in JSON mode so that tooling may access it. An example of the new field is: ``` { "MetricGroup": "Backend", "MetricName": "tma_core_bound", "MetricExpr": "max(0, tma_backend_bound - tma_memory_bound)", "MetricThreshold": "tma_core_bound > 0.1 & tma_backend_bound > 0.2", "ScaleUnit": "100%", "BriefDescription": "This metric represents fraction of slots where ... "PublicDescription": "This metric represents fraction of slots where ... "Unit": "cpu_core" }, ``` Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250512184700.11691-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f5c0ecf196aaf78777f1606f1e0392c5e57c4530 Author: Rafael J. Wysocki Date: Fri May 9 15:03:35 2025 +0200 PM: sleep: Introduce pm_sleep_transition_in_progress() The "suspend in progress" check in device_wakeup_enable() does not cover hibernation, but arguably it should do that, so introduce pm_sleep_transition_in_progress() covering transitions during both system suspend and hibernation to use in there and use it also in pm_debug_messages_should_print(). Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/7820474.EvYhyI6sBW@rjwysocki.net [ rjw: Move the new function definition under CONFIG_PM_SLEEP ] Signed-off-by: Rafael J. Wysocki commit 4102ff8b1fdaa58846990cf5f99db2742d89bc2d Author: Ian Rogers Date: Mon May 12 12:46:22 2025 -0700 perf metricgroup: Binary search when resolving referred to metrics Unlike with events, metrics can be matched by name or a list of metric groups. However, when a metric refers to another metric it isn't referring to a group but the singular metric in question. Prior to this change every "id" in a metric expression is checked to see if it is a metric by scanning all the metrics in the metrics table. As the table is sorted my metric name we can speed the search in the resolution case by binary searching for the metric. Rename some of the metricgroup functions to make it clearer whether they match a metric by name or by both name and group. Before: ``` $ time perf test -v 10 10: PMU JSON event tests : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 10.5: Parsing of metric thresholds with fake PMUs : Ok real 0m15.972s user 0m13.176s sys 0m3.001s ``` After: ``` $ time perf test -v 10 10: PMU JSON event tests : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 10.5: Parsing of metric thresholds with fake PMUs : Ok real 0m5.343s user 0m1.871s sys 0m2.128s ``` Committer testing: root@number:~# grep -m1 'model name' /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# Before: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m9.286s user 0m9.354s sys 0m0.062s root@number:~# After: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m0.689s user 0m0.766s sys 0m0.042s root@number:~# time perf test 10 10: PMU JSON event tests : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 10.5: Parsing of metric thresholds with fake PMUs : Ok real 0m0.696s user 0m0.807s sys 0m0.064s root@number:~# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Thomas Richter Cc: Xu Yang Link: https://lore.kernel.org/r/20250512194622.33258-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 754baf426e099fbf3d2741e6b7fe89e2122bc00f Author: Ian Rogers Date: Mon May 12 12:46:21 2025 -0700 perf pmu: Change aliases from list to hashmap Finding an alias for things like perf_pmu__have_event() would need to search the aliases list, whilst this happens relatively infrequently it can be a significant overhead in testing. Switch to using a hashmap. Move common initialization code to perf_pmu__init(). Refactor the test 'struct perf_pmu_test_pmu' to not have perf pmu within it to better support the perf_pmu__init() function. Before: ``` $ time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m13.287s user 0m13.026s sys 0m0.532s ``` After: ``` $ time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m13.011s user 0m12.885s sys 0m0.485s ``` Committer testing: root@number:~# grep -m1 'model name' /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# Before: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m9.296s user 0m9.361s sys 0m0.063s root@number:~# After: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m9.286s user 0m9.354s sys 0m0.062s root@number:~# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Thomas Richter Cc: Xu Yang Link: https://lore.kernel.org/r/20250512194622.33258-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 375368a9617dbf843e563d9deb6bf45751f6d770 Author: Ian Rogers Date: Mon May 12 12:46:20 2025 -0700 perf fncache: Switch to using hashmap The existing fncache can get large in testing situations. As the bucket array is a fixed size this leads to it degrading to O(n) performance. Use a regular hashmap that can dynamically reallocate its array. Before: ``` $ time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m14.132s user 0m17.806s sys 0m0.557s ``` After: ``` $ time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m13.287s user 0m13.026s sys 0m0.532s ``` Committer notes: root@number:~# grep -m1 'model name' /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# Before: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m9.277s user 0m9.979s sys 0m0.055s root@number:~# After: root@number:~# time perf test "Parsing of PMU event table metrics" 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok real 0m9.296s user 0m9.361s sys 0m0.063s root@number:~# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Thomas Richter Cc: Xu Yang Link: https://lore.kernel.org/r/20250512194622.33258-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 051398f52b7cb0dbeda8da355b948fad3d23cb0f Author: Jake Rice Date: Tue May 13 13:03:44 2025 -0400 Documentation: scheduler: Changed lowercase acronyms to uppercase Everywhere else in this doc, the dispatch queue acronym (DSQ) is uppercase. There were a couple places where the acronym was written in lowercase. I changed them to uppercase to make it homogeneous. Signed-off-by: Jake Rice Signed-off-by: Tejun Heo commit fc5c669c902c3039aa41731b6c58c0960d0b1bbf Author: Dmitry Baryshkov Date: Mon May 5 15:56:26 2025 +0300 dt-bindings: display: msm: correct example in SM8350 MDSS schema Fix the interconnects in the example to follow the schema changes. Fixes: 60b8d3a2365a ("dt-bindings: display: msm: sm8350-mdss: Describe the CPU-CFG icc path") Reported-by: Rob Herring Closes: http://lore.kernel.org/r/CAL_JsqKr8Xd8uxFzE0YJTyD+V6N++VV8SX-GB5Xt0_BKkeoGUQ@mail.gmail.com Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651775/ Link: https://lore.kernel.org/r/20250505-sm8350-fix-example-v1-1-36d5d9ccba66@oss.qualcomm.com commit 553f648dbd9472ea55a6835446fe57f48491b355 Author: Heiko Stuebner Date: Thu May 8 20:27:52 2025 +0200 clk: rockchip: rename gate-grf clk file All Rockchip clock types live in files starting with clk-foo, so rename the newly added gate-grf-clock to follow that scheme. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250508182752.1925313-3-heiko@sntech.de commit e37fe0b9bf762dca9f16e0461d14038ec3898f8d Author: Heiko Stuebner Date: Thu May 8 20:27:51 2025 +0200 clk: rockchip: rename branch_muxgrf to branch_grf_mux We now have a number of new branch-types coming from the "General Register Files" (gates and mmc phase clocks). Their naming as branch_grf_foo is way nicer, so rename the old branch_muxgrf to a similar scheme. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250508182752.1925313-2-heiko@sntech.de commit 9d948b8804096d940022b1a3c483a5beb8b46574 Merge: 15ff5d0e90bb04 b0ca403a9e3811 Author: Dan Williams Date: Tue May 13 11:28:25 2025 -0700 Merge branch 'for-6.16/tsm-mr' into tsm-next Pick up a couple fixes for issues noticed in linux-next (constification of bin_attrs and missing 'static'). commit c2089976772364a3b910676693bf52497ab35475 Author: Hao Zhang Date: Fri May 9 18:14:19 2025 +0800 ARM: dts: rockchip: Sonoff-iHost: correct IO domain voltages Modify the corresponding vccio according to the schematic of Sonoff iHost. This change aligns the device tree with the actual hardware design and improves peripheral stability. Signed-off-by: Hao Zhang Link: https://lore.kernel.org/r/20250509101419.460473-3-hao.zhang@coolkit.cn Signed-off-by: Heiko Stuebner commit f9c7ba983f7b44fe698d580dec67552123520472 Author: Hao Zhang Date: Fri May 9 18:14:18 2025 +0800 ARM: dts: rockchip: Sonoff-iHost: adjust SDIO for stability Reduce max-frequency from 50MHz to 25MHz to improve WiFi module stability on some Sonoff iHost units. Remove unsupported or redundant properties, and keep only minimal, validated configuration. Signed-off-by: Hao Zhang Link: https://lore.kernel.org/r/20250509101419.460473-2-hao.zhang@coolkit.cn Signed-off-by: Heiko Stuebner commit 77fd359b6dfdba58f476d5c17097bab024af9467 Author: Christoph Hellwig Date: Mon May 12 06:23:54 2025 +0200 block: remove the same_page output argument to bvec_try_merge_page bvec_try_merge_page currently returns if the added page fragment is within the same page as the last page in the last current bio_vec. This information is used by __bio_iov_iter_get_pages so that we always have a single folio pin per page even when the page is split over multiple __bio_iov_iter_get_pages calls. Threading this through the entire lowlevel add page to bio logic is annoying and inefficient and leads to less code sharing than otherwise possible. Instead add code to __bio_iov_iter_get_pages that checks if the bio_vecs did not change and thus a merge into the last segment must have happened, and if there is an offset into the page for the currently added fragment, because if yes we must have already had a previous fragment of the same page in the last bio_vec. While this is still a bit ugly, it keeps the logic in the one place that needs it and allows for more code sharing. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250512042354.514329-1-hch@lst.de Signed-off-by: Jens Axboe commit d1ba22ab2becc8bf84d466791b970905abe99b23 Author: Zizhi Wo Date: Tue May 6 10:09:34 2025 +0800 blk-throttle: Prevents the bps restricted io from entering the bps queue again [BUG] There has an issue of io delayed dispatch caused by io splitting. Consider the following scenario: 1) If we set a BPS limit of 1MB/s and restrict the maximum IO size per dispatch to 4KB, submitting -two- 1MB IO requests results in completion times of 1s and 2s, which is expected. 2) However, if we additionally set an IOPS limit of 1,000,000/s with the same BPS limit of 1MB/s, submitting -two- 1MB IO requests again results in both completing in 2s, even though the IOPS constraint is being met. [CAUSE] This issue arises because BPS and IOPS currently share the same queue in the blkthrotl mechanism: 1) This issue does not occur when only BPS is limited because the split IOs return false in blk_should_throtl() and do not go through to throtl again. 2) For split IOs, even if they have been tagged with BIO_BPS_THROTTLED, they still get queued alternately in the same list due to continuous splitting and reordering. As a result, the two IO requests are both completed at the 2-second mark, causing an unintended delay. 3) It is not difficult to imagine that in this scenario, if N 1MB IOs are issued at once, all IOs will eventually complete together in N seconds. [FIX] With the queue separation introduced in the previous patches, we now have separate BPS and IOPS queues. For IOs that have already passed the BPS limitation, they do not need to re-enter the BPS queue and can directly placed to the IOPS queue. Since we have split the queues, when the IOPS queue is previously empty and a new bio is added to the first qnode->bios_iops list in the service_queue, we also need to update the disptime. This patch introduces "THROTL_TG_IOPS_WAS_EMPTY" flag to mark it. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-8-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit 28ad83b774a6f11126d45bf912bb8a7c16cb2b2b Author: Zizhi Wo Date: Tue May 6 10:09:33 2025 +0800 blk-throttle: Split the service queue This patch splits throtl_service_queue->nr_queued into "nr_queued_bps" and "nr_queued_iops", allowing separate accounting of BPS and IOPS queued bios. This prepares for future changes that need to check whether the BPS or IOPS queues are empty. To facilitate updating the number of IOs in the BPS and IOPS queues, the addition logic will be moved from throtl_add_bio_tg() to throtl_qnode_add_bio(), and similarly, the removal logic will be moved from tg_dispatch_one_bio() to throtl_pop_queued(). And introduce sq_queued() to calculate the total sum of sq->nr_queued. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-7-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit f2c4902bd08b854a23c3c2ab352382fd7eef959f Author: Zizhi Wo Date: Tue May 6 10:09:32 2025 +0800 blk-throttle: Split the blkthrotl queue This patch splits the single queue into separate bps and iops queues. Now, an IO request must first pass through the bps queue, then the iops queue, and finally be dispatched. Due to the queue splitting, we need to modify the throtl add/peek/pop function. Additionally, the patch modifies the logic related to tg_dispatch_time(). If bio needs to wait for bps, function directly returns the bps wait time; otherwise, it charges bps and returns the iops wait time so that bio can be directly placed into the iops queue afterward. Note that this may lead to more frequent updates to disptime, but the overhead is negligible for the slow path. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-6-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit c4da7bf54b1f76e7c5c8cc6d1c4db8b19af67c5d Author: Zizhi Wo Date: Tue May 6 10:09:31 2025 +0800 blk-throttle: Introduce flag "BIO_TG_BPS_THROTTLED" Subsequent patches will split the single queue into separate bps and iops queues. To prevent IO that has already passed through the bps queue at a single tg level from being counted toward bps wait time again, we introduce "BIO_TG_BPS_THROTTLED" flag. Since throttle and QoS operate at different levels, we reuse the value as "BIO_QOS_THROTTLED". We set this flag when charge bps and clear it when charge iops, as the bio will move to the upper-level tg or be dispatched. This patch does not involve functional changes. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-5-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit a404be5399d762f5737a4a731b42a38f552f2b44 Author: Zizhi Wo Date: Tue May 6 10:09:30 2025 +0800 blk-throttle: Split throtl_charge_bio() into bps and iops functions Split throtl_charge_bio() to facilitate subsequent patches that will separately charge bps and iops after queue separation. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-4-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit 3660cd4228d9330b618e2700491891f08824011d Author: Zizhi Wo Date: Tue May 6 10:09:29 2025 +0800 blk-throttle: Refactor tg_dispatch_time by extracting tg_dispatch_bps/iops_time tg_dispatch_time() contained both bps and iops throttling logic. We now split its internal logic into tg_dispatch_bps/iops_time() to improve code consistency for future separation of the bps and iops queues. Besides, merge time_before() from caller into throtl_extend_slice() to make code cleaner. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-3-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit fd6c08b26460436ec0f53e125f8ded98738806f1 Author: Zizhi Wo Date: Tue May 6 10:09:28 2025 +0800 blk-throttle: Rename tg_may_dispatch() to tg_dispatch_time() tg_may_dispatch() can directly indicate whether bio can be dispatched by returning the time to wait, without the need for the redundant "wait" parameter. Remove it and modify the function's return type accordingly. Since we have determined by the return time whether bio can be dispatched, rename tg_may_dispatch() to tg_dispatch_time(). Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Signed-off-by: Zizhi Wo Link: https://lore.kernel.org/r/20250506020935.655574-2-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit b0ca403a9e381140cf626ca94519fb468370fc3e Author: Cedric Xing Date: Tue May 13 11:41:54 2025 -0500 tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase Commit 9bec944506fa ("sysfs: constify attribute_group::bin_attrs") enforced the ro-after-init principle by making elements of bin_attrs_new pointing to const. To align with this change, introduce a temporary variable `bap` within the initialization loop. This improves code clarity by explicitly marking the initialization scope and eliminates the need for type casts when assigning to bin_attrs_new. Signed-off-by: Cedric Xing Link: https://patch.msgid.link/20250513164154.10109-1-cedric.xing@intel.com Signed-off-by: Dan Williams commit 553ad6fc2b282e5aa32c37e2494e7af806f52cea Author: Arunpravin Paneer Selvam Date: Tue May 13 17:15:50 2025 +0530 drm/amdgpu/userq: Fix DEBUG_LOCKS_WARN_ON(lock->magic != lock) Fix DEBUG_LOCKS_WARN_ON(lock->magic != lock) warning logs. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit bc5bab82d36067206a5cb865313f354e0dc911ae Author: Arunpravin Paneer Selvam Date: Tue May 13 17:07:58 2025 +0530 drm/amdgpu: Fix userq ttm_bo_pin and ttm_bo_unpin lockdep warnings The ttm_bo_pin and ttm_bo_unpin warnings are resolved by moving the doorbell bo reserve up before pin/unpin. WARNING: CPU: 11 PID: 1818 at drivers/gpu/drm/ttm/ttm_bo.c:592 ttm_bo_pin+0x1f6/0x270 [ttm] [ +0.000277] CPU: 11 UID: 1000 PID: 1818 Comm: Xwayland Tainted: G W 6.12.0+ #15 [ +0.000006] Tainted: [W]=WARN [ +0.000004] Hardware name: ASUS System Product Name/TUF GAMING B650-PLUS, BIOS 3072 12/20/2024 [ +0.000004] RIP: 0010:ttm_bo_pin+0x1f6/0x270 [ttm] [ +0.000005] RSP: 0018:ffff88846ca879d0 EFLAGS: 00010246 [ +0.000007] RAX: 0000000000000000 RBX: ffff88810b7ca848 RCX: 0000000000000000 [ +0.000004] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ +0.000005] RBP: ffff88846ca879e8 R08: 0000000000000000 R09: 0000000000000000 [ +0.000004] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88810b7ca848 [ +0.000004] R13: ffff88846c666250 R14: 1ffff1108d950f44 R15: ffff88846ca87aa0 [ +0.000005] FS: 00007c45ff436d00(0000) GS:ffff888409580000(0000) knlGS:0000000000000000 [ +0.000004] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000005] CR2: 00005b0c142a60e0 CR3: 000000012ce5a000 CR4: 0000000000f50ef0 [ +0.000004] PKRU: 55555554 [ +0.000004] Call Trace: [ +0.000004] [ +0.000005] ? show_regs+0x6c/0x80 [ +0.000007] ? __warn+0xd2/0x2d0 [ +0.000007] ? ttm_bo_pin+0x1f6/0x270 [ttm] [ +0.000031] ? report_bug+0x282/0x2f0 [ +0.000012] ? handle_bug+0x6e/0xc0 [ +0.000007] ? exc_invalid_op+0x18/0x50 [ +0.000007] ? asm_exc_invalid_op+0x1b/0x20 [ +0.000017] ? ttm_bo_pin+0x1f6/0x270 [ttm] [ +0.000014] amdgpu_bo_pin+0x365/0x9d0 [amdgpu] [ +0.000191] ? __pfx_amdgpu_bo_pin+0x10/0x10 [amdgpu] [ +0.000185] ? drm_gem_object_lookup+0x81/0xc0 [ +0.000008] ? kasan_save_alloc_info+0x37/0x60 [ +0.000007] ? __kasan_kmalloc+0xc3/0xd0 [ +0.000013] amdgpu_userqueue_get_doorbell_index+0xee/0x5f0 [amdgpu] [ +0.000209] amdgpu_userq_ioctl+0x6b4/0xd40 [amdgpu] [ +0.000193] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000211] ? lock_acquire+0x7c/0xc0 [ +0.000006] ? drm_dev_enter+0x51/0x190 [ +0.000015] drm_ioctl_kernel+0x18b/0x330 [ +0.000007] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000190] ? __pfx_drm_ioctl_kernel+0x10/0x10 [ +0.000005] ? lock_acquire+0x7c/0xc0 [ +0.000009] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? __kasan_check_write+0x14/0x30 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000011] drm_ioctl+0x589/0xd00 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000006] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000194] ? __pfx_drm_ioctl+0x10/0x10 [ +0.000006] ? __pm_runtime_resume+0x80/0x110 [ +0.000021] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? trace_hardirqs_on+0x53/0x60 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? _raw_spin_unlock_irqrestore+0x51/0x80 [ +0.000013] amdgpu_drm_ioctl+0xd2/0x1c0 [amdgpu] [ +0.000185] __x64_sys_ioctl+0x13a/0x1c0 [ +0.000010] x64_sys_call+0x11ad/0x25f0 [ +0.000007] do_syscall_64+0x91/0x180 [ +0.000007] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? irqentry_exit+0x77/0xb0 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? exc_page_fault+0x93/0x150 [ +0.000009] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000005] RIP: 0033:0x7c45ff924ded [ +0.000005] RSP: 002b:00007ffff7167810 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ +0.000008] RAX: ffffffffffffffda RBX: 00000000c0486456 RCX: 00007c45ff924ded [ +0.000004] RDX: 00007ffff7167870 RSI: 00000000c0486456 RDI: 000000000000000b [ +0.000004] RBP: 00007ffff7167860 R08: ffff800100000000 R09: 0000000000010000 [ +0.000005] R10: 00007ffff7167950 R11: 0000000000000246 R12: 00005b0c2a51bc48 [ +0.000004] R13: 000000000000000b R14: 0000000000000000 R15: 00007ffff7167950 [ +0.000022] [ +0.000004] irq event stamp: 80693 [ +0.000004] hardirqs last enabled at (80699): [] __up_console_sem+0x79/0xa0 [ +0.000005] hardirqs last disabled at (80704): [] __up_console_sem+0x5e/0xa0 [ +0.000005] softirqs last enabled at (80390): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000005] softirqs last disabled at (80385): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000006] ---[ end trace 0000000000000000 ]--- ------------------------------------------------------------------------------------------------------ [ +0.000006] WARNING: CPU: 10 PID: 1818 at drivers/gpu/drm/ttm/ttm_bo.c:611 ttm_bo_unpin+0x21f/0x2c0 [ttm] [ +0.000280] CPU: 10 UID: 1000 PID: 1818 Comm: Xwayland Tainted: G W 6.12.0+ #15 [ +0.000006] Tainted: [W]=WARN [ +0.000004] Hardware name: ASUS System Product Name/TUF GAMING B650-PLUS, BIOS 3072 12/20/2024 [ +0.000004] RIP: 0010:ttm_bo_unpin+0x21f/0x2c0 [ttm] [ +0.000005] RSP: 0018:ffff88846ca87888 EFLAGS: 00010246 [ +0.000007] RAX: 0000000000000000 RBX: ffff88810b7ca848 RCX: 0000000000000000 [ +0.000005] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ +0.000004] RBP: ffff88846ca878a0 R08: 0000000000000000 R09: 0000000000000000 [ +0.000004] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888164e90050 [ +0.000005] R13: ffff88846c666200 R14: 0000000000000001 R15: ffff888168402d28 [ +0.000004] FS: 00007c45ff436d00(0000) GS:ffff888409500000(0000) knlGS:0000000000000000 [ +0.000005] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000004] CR2: 00007c45f7373b20 CR3: 000000012ce5a000 CR4: 0000000000f50ef0 [ +0.000005] PKRU: 55555554 [ +0.000004] Call Trace: [ +0.000004] [ +0.000005] ? show_regs+0x6c/0x80 [ +0.000008] ? __warn+0xd2/0x2d0 [ +0.000007] ? ttm_bo_unpin+0x21f/0x2c0 [ttm] [ +0.000012] ? report_bug+0x282/0x2f0 [ +0.000013] ? handle_bug+0x6e/0xc0 [ +0.000006] ? exc_invalid_op+0x18/0x50 [ +0.000008] ? asm_exc_invalid_op+0x1b/0x20 [ +0.000017] ? ttm_bo_unpin+0x21f/0x2c0 [ttm] [ +0.000011] ? ttm_bo_unpin+0x217/0x2c0 [ttm] [ +0.000011] amdgpu_bo_unpin+0x45/0x250 [amdgpu] [ +0.000216] amdgpu_userq_ioctl+0x2c3/0xd40 [amdgpu] [ +0.000226] ? drm_dev_exit+0x2d/0x60 [ +0.000010] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000201] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? lock_acquire+0x7c/0xc0 [ +0.000006] ? drm_dev_enter+0x51/0x190 [ +0.000015] drm_ioctl_kernel+0x18b/0x330 [ +0.000007] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000188] ? __pfx_drm_ioctl_kernel+0x10/0x10 [ +0.000006] ? lock_acquire+0x7c/0xc0 [ +0.000008] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? __kasan_check_write+0x14/0x30 [ +0.000006] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000010] drm_ioctl+0x589/0xd00 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000006] ? __pfx_amdgpu_userq_ioctl+0x10/0x10 [amdgpu] [ +0.000211] ? __pfx_drm_ioctl+0x10/0x10 [ +0.000006] ? __pm_runtime_resume+0x80/0x110 [ +0.000020] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000006] ? trace_hardirqs_on+0x53/0x60 [ +0.000005] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? _raw_spin_unlock_irqrestore+0x51/0x80 [ +0.000013] amdgpu_drm_ioctl+0xd2/0x1c0 [amdgpu] [ +0.000186] __x64_sys_ioctl+0x13a/0x1c0 [ +0.000010] x64_sys_call+0x11ad/0x25f0 [ +0.000007] do_syscall_64+0x91/0x180 [ +0.000007] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? do_syscall_64+0x9d/0x180 [ +0.000007] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000010] ? __pfx___rseq_handle_notify_resume+0x10/0x10 [ +0.000005] ? __pfx_blkcg_maybe_throttle_current+0x10/0x10 [ +0.000013] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000009] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000008] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? syscall_exit_to_user_mode+0x95/0x260 [ +0.000008] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? do_syscall_64+0x9d/0x180 [ +0.000007] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? do_syscall_64+0x9d/0x180 [ +0.000011] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000010] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000009] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000008] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? irqentry_exit_to_user_mode+0x8b/0x260 [ +0.000007] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000006] ? irqentry_exit+0x77/0xb0 [ +0.000004] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000005] ? exc_page_fault+0x93/0x150 [ +0.000010] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000005] RIP: 0033:0x7c45ff924ded [ +0.000005] RSP: 002b:00007ffff7168790 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ +0.000008] RAX: ffffffffffffffda RBX: 00000000c0486456 RCX: 00007c45ff924ded [ +0.000005] RDX: 00007ffff71687f0 RSI: 00000000c0486456 RDI: 000000000000000b [ +0.000004] RBP: 00007ffff71687e0 R08: 00005b0c2a49b010 R09: 0000000000000007 [ +0.000004] R10: 00005b0c2a4d7140 R11: 0000000000000246 R12: 000000000000000b [ +0.000004] R13: 00007c45ff19e5cc R14: 00005b0c2a51c538 R15: 00005b0c2a51bbd8 [ +0.000022] [ +0.000005] irq event stamp: 87419 [ +0.000004] hardirqs last enabled at (87425): [] __up_console_sem+0x79/0xa0 [ +0.000005] hardirqs last disabled at (87430): [] __up_console_sem+0x5e/0xa0 [ +0.000005] softirqs last enabled at (87058): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000006] softirqs last disabled at (87053): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000005] ---[ end trace 0000000000000000 ]--- Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Reviewed-by: Jesse Zhang Signed-off-by: Alex Deucher commit 218caca4ba2fbdd244478b851a8c9af523e9d8bd Author: Arunpravin Paneer Selvam Date: Wed Apr 9 11:18:26 2025 +0530 drm/amdgpu/userq: Fix lock contention in userq fence Fix lockdep warnings. [ +0.000637] ================================ [ +0.000004] WARNING: inconsistent lock state [ +0.000004] 6.12.0+ #18 Tainted: G W OE [ +0.000004] -------------------------------- [ +0.000004] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [ +0.000004] Xwayland/1952 [HC0[0]:SC0[0]:HE1:SE1] takes: [ +0.000005] ffff8884636f4740 (&fence_drv->fence_list_lock){?...}-{2:2}, at: amdgpu_userq_fence_driver_destroy+0xb8/0x540 [amdgpu] [ +0.000208] {IN-HARDIRQ-W} state was registered at: [ +0.000004] lock_acquire.part.0+0x116/0x360 [ +0.000005] lock_acquire+0x7c/0xc0 [ +0.000005] _raw_spin_lock+0x2f/0x60 [ +0.000005] amdgpu_userq_fence_driver_process+0x75/0x400 [amdgpu] [ +0.000185] gfx_v12_0_eop_irq+0x29f/0x420 [amdgpu] [ +0.000210] amdgpu_irq_dispatch+0x2a4/0x7b0 [amdgpu] [ +0.000191] amdgpu_ih_process+0x1e1/0x3d0 [amdgpu] [ +0.000185] amdgpu_irq_handler+0x28/0xc0 [amdgpu] [ +0.000183] __handle_irq_event_percpu+0x1bb/0x590 [ +0.000005] handle_irq_event+0xab/0x1d0 [ +0.000005] handle_edge_irq+0x1fd/0xc10 [ +0.000005] __common_interrupt+0x83/0x190 [ +0.000004] common_interrupt+0xb1/0xe0 [ +0.000005] asm_common_interrupt+0x27/0x40 [ +0.000004] cpuidle_enter_state+0x2ba/0x530 [ +0.000005] cpuidle_enter+0x4f/0xb0 [ +0.000006] call_cpuidle+0x46/0xd0 [ +0.000005] do_idle+0x367/0x430 [ +0.000004] cpu_startup_entry+0x58/0x70 [ +0.000005] start_secondary+0x224/0x2b0 [ +0.000005] common_startup_64+0x13e/0x141 [ +0.000005] irq event stamp: 88271 [ +0.000004] hardirqs last enabled at (88271): [] _raw_spin_unlock_irqrestore+0x51/0x80 [ +0.000005] hardirqs last disabled at (88270): [] _raw_spin_lock_irqsave+0x74/0x80 [ +0.000005] softirqs last enabled at (87858): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000005] softirqs last disabled at (87849): [] __irq_exit_rcu+0x17e/0x1d0 [ +0.000005] other info that might help us debug this: [ +0.000004] Possible unsafe locking scenario: [ +0.000003] CPU0 [ +0.000004] ---- [ +0.000003] lock(&fence_drv->fence_list_lock); v2: Drop fence_list_flags and use xa_lock_irqsave() flags parameter (Christian) Fix merge conflicts. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9a9c3e1fe5256da14a0a307dff0478f90c55fc8c Author: Wayne Lin Date: Tue May 13 11:20:24 2025 +0800 drm/amd/display: Avoid flooding unnecessary info messages It's expected that we'll encounter temporary exceptions during aux transactions. Adjust logging from drm_info to drm_dbg_dp to prevent flooding with unnecessary log messages. Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case") Cc: Mario Limonciello Cc: Alex Deucher Signed-off-by: Wayne Lin Acked-by: Alex Deucher Link: https://lore.kernel.org/r/20250513032026.838036-1-Wayne.Lin@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3880cdbed1c4607e378f58fa924c5d6df900d1d3 Author: Tao Chen Date: Tue May 13 12:27:47 2025 +0800 bpf: Fix WARN() in get_bpf_raw_tp_regs syzkaller reported an issue: WARNING: CPU: 3 PID: 5971 at kernel/trace/bpf_trace.c:1861 get_bpf_raw_tp_regs+0xa4/0x100 kernel/trace/bpf_trace.c:1861 Modules linked in: CPU: 3 UID: 0 PID: 5971 Comm: syz-executor205 Not tainted 6.15.0-rc5-syzkaller-00038-g707df3375124 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:get_bpf_raw_tp_regs+0xa4/0x100 kernel/trace/bpf_trace.c:1861 RSP: 0018:ffffc90003636fa8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff81c6bc4c RDX: ffff888032efc880 RSI: ffffffff81c6bc83 RDI: 0000000000000005 RBP: ffff88806a730860 R08: 0000000000000005 R09: 0000000000000003 R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000004 R13: 0000000000000001 R14: ffffc90003637008 R15: 0000000000000900 FS: 0000000000000000(0000) GS:ffff8880d6cdf000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7baee09130 CR3: 0000000029f5a000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1934 [inline] bpf_get_stack_raw_tp+0x24/0x160 kernel/trace/bpf_trace.c:1931 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1316 [inline] __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run include/linux/filter.h:725 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2363 [inline] bpf_trace_run3+0x23f/0x5a0 kernel/trace/bpf_trace.c:2405 __bpf_trace_mmap_lock_acquire_returned+0xfc/0x140 include/trace/events/mmap_lock.h:47 __traceiter_mmap_lock_acquire_returned+0x79/0xc0 include/trace/events/mmap_lock.h:47 __do_trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline] trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline] __mmap_lock_do_trace_acquire_returned+0x138/0x1f0 mm/mmap_lock.c:35 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:204 [inline] stack_map_get_build_id_offset+0x535/0x6f0 kernel/bpf/stackmap.c:157 __bpf_get_stack+0x307/0xa10 kernel/bpf/stackmap.c:483 ____bpf_get_stack kernel/bpf/stackmap.c:499 [inline] bpf_get_stack+0x32/0x40 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1941 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1931 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 Tracepoint like trace_mmap_lock_acquire_returned may cause nested call as the corner case show above, which will be resolved with more general method in the future. As a result, WARN_ON_ONCE will be triggered. As Alexei suggested, remove the WARN_ON_ONCE first. Fixes: 9594dc3c7e71 ("bpf: fix nested bpf tracepoints with per-cpu data") Reported-by: syzbot+45b0c89a0fc7ae8dbadc@syzkaller.appspotmail.com Suggested-by: Alexei Starovoitov Signed-off-by: Tao Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250513042747.757042-1-chen.dylane@linux.dev Closes: https://lore.kernel.org/bpf/8bc2554d-1052-4922-8832-e0078a033e1d@gmail.com commit 4153eb38970a9f2328b01278c49b65fbdf84d4d2 Author: Abhinaba Rakshit Date: Tue Mar 18 15:13:24 2025 +0530 arm64: dts: qcom: qcs615: add QCrypto nodes Add the QCE and Crypto BAM DMA nodes. Signed-off-by: Abhinaba Rakshit Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-enable-qce-for-qcs615-v2-2-c5e05fe22572@quicinc.com Signed-off-by: Bjorn Andersson commit f6b1eebbdbc75377f98fc9774bb86ffc270dae8e Author: Nathan Chancellor Date: Mon May 12 23:28:55 2025 +0200 cpufreq/amd-pstate: Avoid shadowing ret in amd_pstate_ut_check_driver() Clang warns (or errors with CONFIG_WERROR=y): drivers/cpufreq/amd-pstate-ut.c:262:6: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 262 | if (ret) | ^~~ ret is declared at the top of the function and in the for loop so the initialization of ret is local to the loop. Remove the declaration in the for loop so that ret is always used initialized. Fixes: d26d16438bc5 ("amd-pstate-ut: Reset amd-pstate driver mode after running selftests") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505072226.g2QclhaR-lkp@intel.com/ Signed-off-by: Nathan Chancellor Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/20250512-amd-pstate-ut-uninit-ret-v1-1-fcb4104f502e@kernel.org Signed-off-by: Mario Limonciello commit f2420037d90a8354594b3da541e19dcbb60c75e1 Author: Dmitry Baryshkov Date: Tue Mar 18 15:22:03 2025 +0200 ARM: dts: qcom: apq8064: move replicator out of soc node The CoreSight static replicator device isn't a part of the system MMIO bus, as such it should not be a part of the soc node. Follow the example of other platforms and move it out of the soc bus to the top-level (and reoder ports to follow alphabetic order). Fixes: 7a5c275fd821 ("ARM: dts: qcom: Add apq8064 CoreSight components") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-10-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 92c377bcafcddd43d4dca1aa60c865cdd2d1dbbb Author: Dmitry Baryshkov Date: Tue Mar 18 15:22:02 2025 +0200 ARM: dts: qcom: apq8064: use new compatible for SPS SIC device Use new SoC-specific compatible to the SPS SIC in addition to the "syscon" compatible and rename the node to follow the purpose of it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-9-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 2a1282861b73a4b8e45904e079ed3279c3f1c93f Author: Dmitry Baryshkov Date: Tue Mar 18 15:22:01 2025 +0200 ARM: dts: qcom: apq8064: use new compatible for SFPB device Use new SoC-specific compatible for the SFPB device node in addition to the "syscon" compatible. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-8-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 325c6a441ae1f8fcb1db9bb945b8bdbd3142141e Author: Dmitry Baryshkov Date: Tue Mar 18 15:22:00 2025 +0200 ARM: dts: qcom: apq8064 merge hw splinlock into corresponding syscon device Follow up the expected way of describing the SFPB hwspinlock and merge hwspinlock node into corresponding syscon node, fixing several dt-schema warnings. Fixes: 24a9baf933dc ("ARM: dts: qcom: apq8064: Add hwmutex and SMEM nodes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-7-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 4b0eb149df58b6750cd8113e5ee5b3ac7cc51743 Author: Dmitry Baryshkov Date: Tue Mar 18 15:21:59 2025 +0200 ARM: dts: qcom: apq8064: add missing clocks to the timer node In order to fix DT schema warning and describe hardware properly, add missing sleep clock to the timer node. Fixes: f335b8af4fd5 ("ARM: dts: qcom: Add initial APQ8064 SoC and IFC6410 board device trees") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-6-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 5e1be5d4617f68030eeab0532cf134948e19f5a2 Author: David Heidelberg Date: Tue Mar 18 13:51:21 2025 +0100 ARM: dts: qcom: apq8064-lg-nexus4-mako: Enable WiFi The Wi-Fi setup is identical to that of the Sony Xperia Z (Yuga). Verified against the legacy kernel configuration inside arch/arm/mach-msm/board-8064-regulator.c using LineageOS 14.1 kernel sources. Signed-off-by: David Heidelberg Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-lg-nexus4-mako-enable-wifi-v1-1-e3b4a09d9f68@ixit.cz Signed-off-by: Bjorn Andersson commit 79af71c5fe44f3973c666bab3e9e5845812d3b8b Author: Khaled Elnaggar Date: Tue May 13 04:58:59 2025 +0300 docs: bpf: Fix bullet point formatting warning Fix indentation for a bullet list item in bpf_iterators.rst. According to reStructuredText rules, bullet list item bodies must be consistently indented relative to the bullet. The indentation of the first line after the bullet determines the alignment for the rest of the item body. Reported by smatch: /linux/Documentation/bpf/bpf_iterators.rst:55: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] Fixes: 7220eabff8cb ("bpf, docs: document open-coded BPF iterators") Signed-off-by: Khaled Elnaggar Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250513015901.475207-1-khaledelnaggarlinux@gmail.com commit 895ee6a22e3195b7c1fee140c842bdeedb89ed33 Author: Yury Norov [NVIDIA] Date: Fri May 9 12:20:08 2025 -0400 topology: make for_each_node_with_cpus() O(N) for_each_node_with_cpus() calls nr_cpus_node() at every iteration, which makes it O(N^2). Kernel tracks such nodes with N_CPU record in node_states array. Switching to it makes for_each_node_with_cpus() O(N). Andrea: Now we can include also offline nodes with CPUs assigned (assuming it's possible). If checking the online state is required, the user must use node_online() within the loop. CC: Andrea Righi CC:Tejun Heo Signed-off-by: Yury Norov [NVIDIA] commit 75499b3232b6b9194de3cce4ccd60e49c6b70cc0 Author: Luca Weiss Date: Wed Mar 26 19:09:29 2025 +0100 rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge When the mailbox driver has not probed yet, the error message "failed to parse smd edge" is just going to confuse users, so improve the error prints a bit. Cover the last remaining exits from qcom_smd_parse_edge with proper error prints, especially the one for the mbox_chan deserved dev_err_probe to handle EPROBE_DEFER nicely. And add one for ipc_regmap also to be complete. With this done, we can remove the outer print completely. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250326-apcs-mboxes-v3-1-e20f39e125f2@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 13be8795761b7967261e19a26d13f6ce19e53b0a Author: Chao Yu Date: Mon May 12 19:55:14 2025 +0800 f2fs: fix 32-bits hexademical number in fault injection doc FAULT_KMALLOC 0x000000001 There is one redundant '0' in 32-bits hexademical number of fault type, remove it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a9201960623287927bf5776de3f70fb2fbde7e02 Author: Chao Yu Date: Tue May 13 19:25:38 2025 +0800 f2fs: don't over-report free space or inodes in statvfs This fixes an analogus bug that was fixed in modern filesystems: a) xfs in commit 4b8d867ca6e2 ("xfs: don't over-report free space or inodes in statvfs") b) ext4 in commit f87d3af74193 ("ext4: don't over-report free space or inodes in statvfs") where statfs can report misleading / incorrect information where project quota is enabled, and the free space is less than the remaining quota. This commit will resolve a test failure in generic/762 which tests for this bug. generic/762 - output mismatch (see /share/git/fstests/results//generic/762.out.bad) --- tests/generic/762.out 2025-04-15 10:21:53.371067071 +0800 +++ /share/git/fstests/results//generic/762.out.bad 2025-05-13 16:13:37.000000000 +0800 @@ -6,8 +6,10 @@ root blocks2 is in range dir blocks2 is in range root bavail2 is in range -dir bavail2 is in range +dir bavail2 has value of 1539066 +dir bavail2 is NOT in range 304734.87 .. 310891.13 root blocks3 is in range ... (Run 'diff -u /share/git/fstests/tests/generic/762.out /share/git/fstests/results//generic/762.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: XXXXXXXXXXXXXX xfs: don't over-report free space or inodes in statvfs Cc: stable@kernel.org Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b278981b5ac109e6f6986b20a5cb19654aba8f68 Author: Krzysztof Kozlowski Date: Mon Apr 28 09:52:44 2025 +0200 dt-bindings: remoteproc: qcom,sm8150-pas: Add missing SC8180X compatible Commit 4b4ab93ddc5f ("dt-bindings: remoteproc: Consolidate SC8180X and SM8150 PAS files") moved SC8180X bindings from separate file into this one, but it forgot to add actual compatibles in top-level properties section making the entire binding un-selectable (no-op) for SC8180X PAS. Fixes: 4b4ab93ddc5f ("dt-bindings: remoteproc: Consolidate SC8180X and SM8150 PAS files") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250428075243.44256-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6a4adb7349241c00cefde8c765c1f64382b17563 Author: Konrad Dybcio Date: Sat May 3 00:37:59 2025 +0200 dt-bindings: remoteproc: qcom,sm8350-pas: Add SC8280XP From the software POV, it matches the SM8350's implementation. Describe it as such, with a fallback. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring (Arm) Tested-by: Dmitry Baryshkov # Lenovo X13s Link: https://lore.kernel.org/r/20250503-topic-8280_slpi-v1-1-9400a35574f7@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 0cb4b1b97041d8a1f773425208ded253c1cb5869 Author: Dan Carpenter Date: Wed Apr 2 13:59:51 2025 +0300 remoteproc: qcom_wcnss_iris: Add missing put_device() on error in probe The device_del() call matches with the device_add() but we also need to call put_device() to trigger the qcom_iris_release(). Fixes: 1fcef985c8bd ("remoteproc: qcom: wcnss: Fix race with iris probe") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/4604f7e0-3217-4095-b28a-3ff8b5afad3a@stanley.mountain Signed-off-by: Bjorn Andersson commit 8fc88fbd471044d66cb2fd85dc0d431866ed7448 Author: Luca Weiss Date: Wed May 7 10:01:41 2025 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Add the required nodes for sound playback via a connected external display (DisplayPort over USB-C). In user space just the following route needs to be set (e.g. using ALSA UCM): amixer -c0 cset name='DISPLAY_PORT_RX Audio Mixer MultiMedia1' 1 Afterwards one can play audio on the MultiMedia1 sound device, e.g.: aplay -D plughw:0,0 test.wav Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250507-fp5-dp-sound-v4-5-4098e918a29e@fairphone.com Signed-off-by: Bjorn Andersson commit b03342697435996c0dd1bf598b4e71ae5c4f94d8 Author: Viken Dadhaniya Date: Fri May 9 14:34:43 2025 +0530 arm64: dts: qcom: sa8775p: Add default pin configurations for QUP SEs Default pinctrl configurations for all QUP (Qualcomm Universal Peripheral) Serial Engines (SEs) are missing in the SoC device tree. These configurations are required by client teams when enabling any SEs as I2C, SPI, or Serial protocols. Add default pin configurations for Serial Engines (SEs) for all supported protocols, including I2C, SPI, and UART, to the sa8775p device tree. This change facilitates slave device driver clients to enable usecase with minimal modifications. Remove duplicate pin configurations from target-specific file as same pin configuration is included in the SoC device tree. Acked-by: Mukesh Kumar Savaliya Signed-off-by: Viken Dadhaniya Link: https://lore.kernel.org/r/20250509090443.4107378-1-quic_vdadhani@quicinc.com Signed-off-by: Bjorn Andersson commit 41661853ae8ed3bb89817bd7a9376f7cf12a596f Author: Dikshita Agarwal Date: Fri May 9 17:31:24 2025 +0200 arm64: dts: qcom: sm8550: add iris DT node Add DT entries for the sm8550 iris decoder. Since the firmware is required to be signed, only enable on Qualcomm development boards where the firmware is publicly distributed. Signed-off-by: Dikshita Agarwal Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250509-topic-sm8x50-upstream-iris-8550-dt-v4-1-22ced9179da3@linaro.org Signed-off-by: Bjorn Andersson commit cd81339e68cb11dbec90fd0d7de12a5c307c1fc7 Author: Melody Olvera Date: Mon May 12 13:54:44 2025 -0700 arm64: dts: qcom: sm8750: Add LLCC node Add LLCC node for SM8750 SoC. Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250512-sm8750_llcc_master-v5-4-d78dca6282a5@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 64d60a02036ce589ac8d6c374346a4e48755ff1d Author: Rob Herring (Arm) Date: Mon May 12 20:53:01 2025 -0500 dt-bindings: cache: Convert marvell,tauros2-cache to DT schema Convert the Marvell Tauros2 Cache binding to DT schema. Signed-off-by: Rob Herring (Arm) Reviewed-by: Andrew Lunn Signed-off-by: Conor Dooley commit 438d216e6791a2a7f546707afbb4ce02f792ebc3 Author: Rob Herring (Arm) Date: Mon May 12 20:52:51 2025 -0500 dt-bindings: cache: Convert marvell,{feroceon,kirkwood}-cache to DT schema Convert the Marvell Feroceon/Kirkwood Cache binding to DT schema format. Use "marvell,kirkwood-cache" for the filename instead as that's only compatible used in a .dts upstream. Signed-off-by: Rob Herring (Arm) Reviewed-by: Andrew Lunn Signed-off-by: Conor Dooley commit 96a8cb6d28cebd51a286fe4a8782dc8492813ac4 Author: Jiri Slaby (SUSE) Date: Tue May 13 10:47:39 2025 +0200 irqchip/econet-en751221: Switch to of_fwnode_handle() of_node_to_fwnode() is an irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513084739.2611747-1-jirislaby@kernel.org commit 6c58d2791d6046727d87db50a5e46644f195dcf9 Author: Alex Shi Date: Thu Apr 10 17:24:16 2025 +0800 tick/nohz: Remove unused tick_nohz_full_add_cpus_to() This function isn't used anywhere. Remove it. Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250410092423.9831-1-alexs@kernel.org commit 6a9e76f75c1a8fffbf45d4665daaf24e7d30095f Author: Werner Sembach Date: Tue Feb 11 14:39:06 2025 +0100 HID: multitouch: Disable touchpad on firmware level while not in use Using the new on_hid_hw_open and on_hid_hw_close functions to disable the touchpad on firmware level while not being in use. This safes some battery and triggers touchpad-disabled-leds hardwired to the touchpads firmware, that exist for example on some TongFang barebones. For a lengthy discussion with all the details see https://gitlab.freedesktop.org/libinput/libinput/-/issues/558 Signed-off-by: Werner Sembach Link: https://patch.msgid.link/20250211133950.422232-2-wse@tuxedocomputers.com Signed-off-by: Benjamin Tissoires commit a98e892c694284256296465a78d11072e2c5419f Author: Werner Sembach Date: Tue Feb 11 14:39:05 2025 +0100 HID: core: Add functions for HID drivers to react on first open and last close call Adds a new function to the hid_driver struct that is called when the userspace starts using the device, and another one that is called when userspace stop using the device. With this a hid driver can implement special suspend handling for devices currently not in use. Signed-off-by: Werner Sembach Link: https://patch.msgid.link/20250211133950.422232-1-wse@tuxedocomputers.com Signed-off-by: Benjamin Tissoires commit 08d7becc1a6b8c936e25d827becabfe3bff72a36 Author: Guilherme G. Piccoli Date: Sun Mar 23 14:36:24 2025 -0300 clocksource: Fix the CPUs' choice in the watchdog per CPU verification Right now, if the clocksource watchdog detects a clocksource skew, it might perform a per CPU check, for example in the TSC case on x86. In other words: supposing TSC is detected as unstable by the clocksource watchdog running at CPU1, as part of marking TSC unstable the kernel will also run a check of TSC readings on some CPUs to be sure it is synced between them all. But that check happens only on some CPUs, not all of them; this choice is based on the parameter "verify_n_cpus" and in some random cpumask calculation. So, the watchdog runs such per CPU checks on up to "verify_n_cpus" random CPUs among all online CPUs, with the risk of repeating CPUs (that aren't double checked) in the cpumask random calculation. But if "verify_n_cpus" > num_online_cpus(), it should skip the random calculation and just go ahead and check the clocksource sync between all online CPUs, without the risk of skipping some CPUs due to duplicity in the random cpumask calculation. Tests in a 4 CPU laptop with TSC skew detected led to some cases of the per CPU verification skipping some CPU even with verify_n_cpus=8, due to the duplicity on random cpumask generation. Skipping the randomization when the number of online CPUs is smaller than verify_n_cpus, solves that. Suggested-by: Thadeu Lima de Souza Cascardo Signed-off-by: Guilherme G. Piccoli Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney Link: https://lore.kernel.org/all/20250323173857.372390-1-gpiccoli@igalia.com commit a92e390e0d438e021de0e52065121484b6cca675 Author: Imre Deak Date: Fri May 9 21:03:28 2025 +0300 drm/i915/dp_mst: Use the correct connector while computing the link BPP limit on MST Atm, on an MST link in DSC mode intel_dp_compute_config_link_bpp_limits() calculates the maximum link bpp limit using the MST root connector's DSC capabilities. That's not correct in general: the decompression could be performed by a branch device downstream of the root branch device or the sink itself. Fix the above by passing to intel_dp_compute_config_link_bpp_limits() the actual connector being modeset, containing the correct DSC capabilities. Cc: Ankit Nautiyal Fixes: 1c5b72daff46 ("drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits") Reviewed-by: Ankit Nautiyal Reviewed-by: Luca Coelho Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250509180340.554867-2-imre.deak@intel.com (cherry picked from commit 266e2fcfe2ea0d062ea392cd22f6250ae0d11c04) Signed-off-by: Joonas Lahtinen commit 73b7fd4b209263a92726daca6453a37ecb89eb9d Author: Bagas Sanjaya Date: Mon May 12 14:42:16 2025 +0700 Documentation/gpu: Disambiguate SPI term Documentation/userspace-api/media/glossary.rst:170: WARNING: duplicate term description of SPI, other instance in gpu/amdgpu/amdgpu-glossary That's because SPI of amdgpu (Shader Processor Input) shares the same global glossary term as SPI of media subsystem (which is Serial Peripheral Interface Bus). Disambiguate the former from the latter to fix the warning. Note that adding context qualifiers in the term is strictly necessary in order to make Sphinx happy. Fixes: dd3d035a7838 ("Documentation/gpu: Add new entries to amdgpu glossary") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250509185845.60bf5e7b@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Signed-off-by: Alex Deucher commit 3b636026149d461d2d32fc686e08808646b3c20b Author: Jesse.Zhang Date: Fri May 9 09:55:17 2025 +0800 drm/amdgpu: Add GFX 9.5.0 support for per-queue/pipe reset This patch enables per-queue and per-pipe reset functionality for GFX IP v9.5.0 when using MEC firmware version 21 (0x15) or later. This change: 1. Refactors the pipe reset support check in gfx_v9_4_3_pipe_reset_support() to use the compute_supported_reset flags instead of hardcoding version checks. 2. Adds support for GFX9.5.0 (IP 9.5.0) with MEC firmware version >= 21 to enable per-queue and per-pipe reset capabilities. v2: Replaced mec version check with !!(adev->gfx.compute_supported_reset & AMDGPU_RESET_TYPE_PER_PIPE) (Lijo) Signed-off-by: Asad Kamal Signed-off-by: Jesse Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5d6fddac557303693591c40f486450e3660f2267 Author: Tao Zhou Date: Thu Apr 24 16:13:24 2025 +0800 drm/amdgpu: set vram type for GC 9.5.0 Set vram type so we can take different actions according to the type. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dc111f8fb199827a5227ed1806a6224235862241 Author: Tao Zhou Date: Mon Apr 14 15:47:57 2025 +0800 drm/amdgpu: set flip bits for RAS bad pages Make the code more general, user doesn't need to pay attention to the detail of flip bits setting. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7e340d3ceacf75e3e088fcc3dd4f8729d6c079c3 Author: Sebastian Aguilera Novoa Date: Sat May 3 00:59:46 2025 -0300 drm/amd/display/dc/irq: Remove duplications of hpd_ack function from IRQ The major of dcn and dce irqs share a copy-pasted collection of copy-pasted function, which is: hpd_ack. This patch removes the multiple copy-pasted by moving them to the irq_service.c and make the irq_service's calls the functions implemented by the irq_service.c instead. The hpd_ack function is replaced by hpd0_ack and hpd1_ack, the required constants are also added. The changes were not tested on actual hardware. I am only able to verify that the changes keep the code compileable and do my best to look repeatedly if I am not actually changing any code. Signed-off-by: Sebastian Aguilera Novoa Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit d8d47f739752227957d8efc0cb894761bfe1d879 Author: Melissa Wen Date: Wed Apr 30 11:11:47 2025 -0300 drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp Similar to commit 6a057072ddd1 ("drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe") that addresses a null pointer dereference on dcn20_update_dchubp_dpp. This is the same function hooked for update_dchubp_dpp in dcn401, with the same issue. Fix possible null pointer deference on dcn401_program_pipe too. Fixes: 63ab80d9ac0a ("drm/amd/display: DML2.1 Post-Si Cleanup") Signed-off-by: Melissa Wen Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit 533aa8bdbedb23ff0f1e5022b94b990bb677ed0e Author: Ce Sun Date: Tue May 6 20:17:33 2025 +0800 drm/amdgpu: Modify the count method of defer error The number of newly added de counts and the number of newly added error addresses remain consistent Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 085c997d4409458d2604742bb2fb221141c9ff6a Author: Alex Deucher Date: Wed May 7 09:57:59 2025 -0400 drm/amdkfd: drop warning in event_interrupt_isr_v1*() Commit ded8b3c36f17 ("drm/amdgpu: properly handle GC vs MM in amdgpu_vmid_mgr_init()") enables all 16 vmids for MMHUB on GC 10 and newer for KGD since there are no KFD resources using MMHUB. With this change, KFD starts seeing MMHUB vmids in it's range with no pasid set. As such there is no need to warn, we can just ignore those interrupts. Fixes: aded8b3c36f1 ("drm/amdgpu: properly handle GC vs MM in amdgpu_vmid_mgr_init()") Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 937467b7d5f790cd7bdc02ac3b25a7362e8b166e Author: Lijo Lazar Date: Tue May 6 16:38:27 2025 +0530 drm/amdgpu: Log RAS errors during load During driver load, RAS event manager may not be initialized. This will cause any ATHUB event during driver load to be skipped in dmesg log. Log the error in dmesg log for easier diagnosis. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 648a0dc0d78c369233b16878e4f351efe7fd8df6 Author: Jesse.Zhang Date: Fri May 9 17:18:16 2025 +0800 drm/amdgpu: Fix user queue deadlock by reordering mutex locking This resolves a deadlock between user queue management and GPU reset paths by enforcing consistent lock ordering. The deadlock occurred when: 1. Process exit path (amdgpu_userq_mgr_fini) would: - Take uqm->userq_mutex - Then try to take adev->userq_mutex for list operations 2. GPU reset path (amdgpu_userq_pre_reset) would: - Take adev->userq_mutex first (for list traversal) - Then take uqm->userq_mutex The solution establishes a strict top-down locking order: 1. Always take adev->userq_mutex before any uqm->userq_mutex 2. Maintain this order consistently across all code paths Changes made: - Reordered locking in amdgpu_userq_mgr_fini() to take device lock first - Kept existing proper order in amdgpu_userq_pre_reset() - Simplified the fini flow by removing redundant operations This prevents circular dependencies while maintaining thread safety during both normal operation and GPU reset scenarios. Fixes: 4ce60dbada96 ("drm/amdgpu: store userq_managers in a list in adev") Reviewed-by: Christian König Reviewed-by: Arvind Yadav Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher commit f71509fdd03e30789293133735e785ea0ca31060 Author: Ce Sun Date: Thu May 8 21:09:29 2025 +0800 drm/amdgpu: Fix the kernel panic caused by RAS records exceed threshold kernel panic caused by RAS records exceeding the threshold when load driver specifying RMA(bad_page_threshold=128) 1.Fix the warnings caused by disabling the interrupt source before it was enabled 2.Fix kernel panic when xcp sysfs is not initialized,null pointer appears during fini 3.Fix the memory leak caused by the device's early exit due to rma The first reason: [ 2744.246650] ------------[ cut here ]------------ [ 2744.246651] WARNING: CPU: 0 PID: 289 at /tmp/amd.BkfTLqYV/amd/amdgpu/amdgpu_irq.c:635 amdgpu_irq_put.cold+0x42/0x6e [amdgpu] [ 2744.247108] Modules linked in: amdgpu(OE+) amddrm_ttm_helper(OE) amdttm(OE) amdxcp(OE) amddrm_buddy(OE) amddrm_exec(OE) amd_sched(OE) amdkcl(OE) xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc overlay binfmt_misc intel_rapl_msr intel_rapl_common i10nm_edac nfit x86_pkg_temp_thermal intel_powerclamp coretemp ipmi_ssif kvm_intel nls_iso8859_1 kvm rapl isst_if_mbox_pci isst_if_mmio pmt_telemetry pmt_crashlog isst_if_common pmt_class mei_me mei acpi_ipmi ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter acpi_pad mac_hid sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath [ 2744.247167] linear mlx5_ib ib_uverbs ib_core ast i2c_algo_bit drm_vram_helper drm_ttm_helper ttm drm_kms_helper crct10dif_pclmul syscopyarea crc32_pclmul ghash_clmulni_intel mlx5_core sysfillrect sysimgblt aesni_intel mlxfw fb_sys_fops psample cec crypto_simd cryptd rc_core i2c_i801 nvme xhci_pci tls intel_pmt drm pci_hyperv_intf nvme_core i2c_smbus i2c_ismt xhci_pci_renesas wmi pinctrl_emmitsburg [ 2744.247194] CPU: 0 PID: 289 Comm: kworker/0:1 Tainted: G OE 5.15.0-70-generic #77-Ubuntu [ 2744.247197] Hardware name: Microsoft C278A/C278A, BIOS C2789.5.BS.1C23.AG.2 11/21/2024 [ 2744.247198] Workqueue: events work_for_cpu_fn [ 2744.247206] RIP: 0010:amdgpu_irq_put.cold+0x42/0x6e [amdgpu] [ 2744.247634] Code: 79 7f ff 44 89 ee 48 c7 c7 4d 5a 42 c2 89 55 d4 e8 90 09 bc bf 8b 55 d4 4c 89 e6 4c 89 ff e8 3c 76 7f ff 8b 55 d4 84 c0 75 07 <0f> 0b e9 95 79 7f ff 49 03 5c 24 08 f0 ff 0b 75 13 4c 89 e6 4c 89 [ 2744.247636] RSP: 0018:ffa0000019e27cb0 EFLAGS: 00010246 [ 2744.247639] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ff11000150fa87c0 [ 2744.247641] RDX: 0000000000000000 RSI: ffffffffc2222430 RDI: ff1100019f200000 [ 2744.247642] RBP: ffa0000019e27ce0 R08: 0000000000000003 R09: ffffffffffe41a08 [ 2744.247643] R10: 0000000000ffff0a R11: 0000000000000001 R12: ff1100019f22ce60 [ 2744.247644] R13: 0000000000000000 R14: 00000000ffffffea R15: ff1100019f200000 [ 2744.247645] FS: 0000000000000000(0000) GS:ff11007e7e400000(0000) knlGS:0000000000000000 [ 2744.247647] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2744.247649] CR2: 00007f3d2002819c CR3: 0000000006810003 CR4: 0000000000771ef0 [ 2744.247650] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2744.247651] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 [ 2744.247652] PKRU: 55555554 [ 2744.247653] Call Trace: [ 2744.247654] [ 2744.247656] sdma_v4_4_2_hw_fini+0x7a/0xc0 [amdgpu] [ 2744.247997] ? vcn_v4_0_3_hw_fini+0x5f/0xa0 [amdgpu] [ 2744.248336] amdgpu_ip_block_hw_fini+0x31/0x61 [amdgpu] [ 2744.248776] amdgpu_device_fini_hw+0x3bb/0x47b [amdgpu] [ 2744.249197] ? blocking_notifier_chain_unregister+0x56/0xb0 [ 2744.249202] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu] [ 2744.249482] amdgpu_driver_load_kms.cold+0x18/0x2e [amdgpu] [ 2744.249913] amdgpu_pci_probe+0x23e/0x590 [amdgpu] [ 2744.250187] local_pci_probe+0x48/0x90 [ 2744.250191] work_for_cpu_fn+0x17/0x30 [ 2744.250196] process_one_work+0x228/0x3d0 [ 2744.250198] worker_thread+0x223/0x420 [ 2744.250200] ? process_one_work+0x3d0/0x3d0 [ 2744.250201] kthread+0x127/0x150 [ 2744.250204] ? set_kthread_struct+0x50/0x50 [ 2744.250207] ret_from_fork+0x1f/0x30 [ 2744.250212] [ 2744.250213] ---[ end trace 488c997a88508bc3 ]--- The second reason: [ 5139.303446] Memory manager not clean during takedown. [ 5139.303509] WARNING: CPU: 145 PID: 117699 at drivers/gpu/drm/drm_mm.c:998 drm_mm_takedown+0x27/0x30 [drm] [ 5139.303542] Modules linked in: amdgpu(OE+) amddrm_ttm_helper(OE) amdttm(OE) amdxcp(OE) amddrm_buddy(OE) amddrm_exec(OE) amd_sched(OE) amdkcl(OE) xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc overlay intel_rapl_msr intel_rapl_common i10nm_edac nfit x86_pkg_temp_thermal intel_powerclamp coretemp ipmi_ssif kvm_intel binfmt_misc kvm nls_iso8859_1 rapl isst_if_mbox_pci pmt_telemetry pmt_crashlog isst_if_mmio pmt_class isst_if_common mei_me mei acpi_ipmi ipmi_si ipmi_devintf ipmi_msghandler acpi_pad acpi_power_meter mac_hid sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath [ 5139.303572] linear mlx5_ib ib_uverbs ib_core crct10dif_pclmul ast crc32_pclmul i2c_algo_bit ghash_clmulni_intel aesni_intel crypto_simd drm_vram_helper cryptd drm_ttm_helper mlx5_core ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec rc_core mlxfw psample intel_pmt nvme xhci_pci drm tls i2c_i801 pci_hyperv_intf nvme_core i2c_smbus i2c_ismt xhci_pci_renesas wmi pinctrl_emmitsburg [last unloaded: amdkcl] [ 5139.303588] CPU: 145 PID: 117699 Comm: modprobe Tainted: G U OE 5.15.0-70-generic #77-Ubuntu [ 5139.303590] Hardware name: Microsoft C278A/C278A, BIOS C2789.5.BS.1C23.AG.2 11/21/2024 [ 5139.303591] RIP: 0010:drm_mm_takedown+0x27/0x30 [drm] [ 5139.303605] Code: cc 66 90 0f 1f 44 00 00 48 8b 47 38 48 83 c7 38 48 39 f8 75 05 c3 cc cc cc cc 55 48 c7 c7 18 d0 10 c0 48 89 e5 e8 5a bc c3 c1 <0f> 0b 5d c3 cc cc cc cc 90 0f 1f 44 00 00 55 b9 15 00 00 00 48 89 [ 5139.303607] RSP: 0018:ffa00000325c3940 EFLAGS: 00010286 [ 5139.303608] RAX: 0000000000000000 RBX: ff1100012f5cecb0 RCX: 0000000000000027 [ 5139.303609] RDX: ff11007e7fa60588 RSI: 0000000000000001 RDI: ff11007e7fa60580 [ 5139.303610] RBP: ffa00000325c3940 R08: 0000000000000003 R09: fffffffff00c2b78 [ 5139.303610] R10: 000000000000002b R11: 0000000000000001 R12: ff1100012f5cec00 [ 5139.303611] R13: ff1100012138f068 R14: 0000000000000000 R15: ff1100012f5cec90 [ 5139.303611] FS: 00007f42ffca0000(0000) GS:ff11007e7fa40000(0000) knlGS:0000000000000000 [ 5139.303612] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5139.303613] CR2: 00007f23d945ab68 CR3: 00000001212ce005 CR4: 0000000000771ee0 [ 5139.303614] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 5139.303615] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 [ 5139.303615] PKRU: 55555554 [ 5139.303616] Call Trace: [ 5139.303617] [ 5139.303619] amdttm_range_man_fini_nocheck+0xfe/0x1c0 [amdttm] [ 5139.303625] amdgpu_ttm_fini+0x2ed/0x390 [amdgpu] [ 5139.303800] amdgpu_bo_fini+0x27/0xc0 [amdgpu] [ 5139.303959] gmc_v9_0_sw_fini+0x63/0x90 [amdgpu] [ 5139.304144] amdgpu_device_fini_sw+0x125/0x6a0 [amdgpu] [ 5139.304302] amdgpu_driver_release_kms+0x16/0x30 [amdgpu] [ 5139.304455] devm_drm_dev_init_release+0x4a/0x80 [drm] [ 5139.304472] devm_action_release+0x12/0x20 [ 5139.304476] release_nodes+0x3d/0xb0 [ 5139.304478] devres_release_all+0x9b/0xd0 [ 5139.304480] really_probe+0x11d/0x420 [ 5139.304483] __driver_probe_device+0x119/0x190 [ 5139.304485] driver_probe_device+0x23/0xc0 [ 5139.304487] __driver_attach+0xf7/0x1f0 [ 5139.304489] ? __device_attach_driver+0x140/0x140 [ 5139.304491] bus_for_each_dev+0x7c/0xd0 [ 5139.304493] driver_attach+0x1e/0x30 [ 5139.304494] bus_add_driver+0x148/0x220 [ 5139.304496] driver_register+0x95/0x100 [ 5139.304498] __pci_register_driver+0x68/0x70 [ 5139.304500] amdgpu_init+0xbc/0x1000 [amdgpu] [ 5139.304655] ? 0xffffffffc0b8f000 [ 5139.304657] do_one_initcall+0x46/0x1e0 [ 5139.304659] ? kmem_cache_alloc_trace+0x19e/0x2e0 [ 5139.304663] do_init_module+0x52/0x260 [ 5139.304665] load_module+0xb2b/0xbc0 [ 5139.304667] __do_sys_finit_module+0xbf/0x120 [ 5139.304669] __x64_sys_finit_module+0x18/0x20 [ 5139.304670] do_syscall_64+0x59/0xc0 [ 5139.304673] ? exit_to_user_mode_prepare+0x37/0xb0 [ 5139.304676] ? syscall_exit_to_user_mode+0x27/0x50 [ 5139.304678] ? __x64_sys_mmap+0x33/0x50 [ 5139.304680] ? do_syscall_64+0x69/0xc0 [ 5139.304681] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 5139.304684] RIP: 0033:0x7f42ffdbf88d [ 5139.304686] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 b5 0f 00 f7 d8 64 89 01 48 [ 5139.304687] RSP: 002b:00007ffcb7427158 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 5139.304688] RAX: ffffffffffffffda RBX: 000055ce8b8f3150 RCX: 00007f42ffdbf88d [ 5139.304689] RDX: 0000000000000000 RSI: 000055ce8b8f9a70 RDI: 000000000000000a [ 5139.304690] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000011 [ 5139.304690] R10: 000000000000000a R11: 0000000000000246 R12: 000055ce8b8f9a70 [ 5139.304691] R13: 000055ce8b8f2ec0 R14: 000055ce8b8f2ab0 R15: 000055ce8b8f9aa0 [ 5139.304692] [ 5139.304693] ---[ end trace 8536b052f7883003 ]--- Signed-off-by: Ce Sun Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b7674ae75bd679d7e7498c7a718f6e60a1243913 Author: Tao Zhou Date: Fri Apr 11 17:14:11 2025 +0800 drm/amdgu: get RAS retire flip bits for new type of HBM Get RAS retire flip bits for HBM with different types in various NPS modes. Also set flip row bit and MCA R13 bit in PA in different NPS modes. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9b5b71895bb23193597c7734cf337ec557d32e7c Author: Tao Zhou Date: Fri Apr 11 16:13:23 2025 +0800 drm/amdgpu: implement get_retire_flip_bits for UMC v12 The RAS bad page retire flip bits can be set per vram type, vram vendor and NPS mode. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 699bff37a56c814c414f5b7ca9e49ef8aae660b9 Author: Tao Zhou Date: Thu Apr 10 19:29:57 2025 +0800 drm/amdgpu: add get_retire_flip_bits for UMC Add the general interface to get flip bits for RAS bad page retirement. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 80f66ca7a45889d2a8eecf61c3069117b3279b3f Author: fanhuang Date: Tue May 6 14:49:18 2025 +0800 drm/amdgpu: add vcn v5_0_0 ip headers Add vcn v5_0_0 register offset and shift masks header files Only include the registers required for MMSCH initialization Signed-off-by: fanhuang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4ce5b991284ee423f602ccce84fc8bf2d273c757 Author: Tao Zhou Date: Wed Apr 2 16:06:58 2025 +0800 drm/amdgpu: adjust high bits for RAS retired page Per UMC address conversion algorithm, the high row bits of UMC MCA address are changed when they're converted into normalized address on specific ASICs. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1df57411a658fd8b411323f8dd0d67e789b9c777 Author: Tao Zhou Date: Thu Apr 3 16:51:20 2025 +0800 drm/amd: add definition for new memory type Support new version of HBM. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f5db59067c3130d186ddb619bcbdc6bea0ffb704 Author: ganglxie Date: Thu Apr 24 17:11:47 2025 +0800 Refine RAS bad page records counting and parsing in eeprom V3 there is only MCA records in V3, no need to care about PA records. recalculate the value of ras_num_bad_pages when parsing failed and go on with the left records instead of quit. Signed-off-by: ganglxie Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 3ab3d680ffef21d72164987f869a62d0ea67a591 Author: Taimur Hassan Date: Mon May 5 09:14:43 2025 -0400 drm/amd/display: Promote DC to 3.2.333 Summary * Refactor DMI quirks * Fix link-off issue triggered by quick unplug/replug * Fix race condition when submitting DMUB commands * Correct reply value when AUX Write incomplete * Backup / restore plane config only on update Acked-by: Tom Chung Signed-off-by: Taimur Hassan Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8989cb919b27cd0d2aadb7f1d144cedbb12e6fca Author: Michael Strauss Date: Mon Dec 4 16:30:39 2023 +0800 drm/amd/display: Add early 8b/10b channel equalization test pattern sequence [WHY] Early EQ pattern sequence is required for some LTTPR + old dongle combinations. [HOW] If DP_EARLY_8B10B_TPS2 chip cap is set, this new sequence programs phy to output TPS2 before initiating link training and writes TPS1 to LTTPR training pattern register as instructed by vendor. Add function to get embedded LTTPR target address offset. Reviewed-by: Wenjing Liu Signed-off-by: Michael Strauss Signed-off-by: TungYu Lu Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 90af999835130c506e7e58482474bef3414dd9fa Author: Sung Lee Date: Fri May 2 16:07:44 2025 -0400 drm/amd/display: Program triplebuffer on all pipes [WHY] Triplebuffer should be programmed on all pipes. Some code assumed it only needed to be called on top pipe, but as the HWSS function does not account for that, it must be called on every pipe. [HOW] Remove condition to not program triplebuffer on non-top/next pipe. Call the function unconditionally on all pipes. Reviewed-by: Dillon Varone Reviewed-by: Aric Cyr Signed-off-by: Sung Lee Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e91c91e506e156920ce9d5d901dced00b534d9ad Author: Taimur Hassan Date: Sun May 4 11:35:56 2025 -0400 drm/amd/display: [FW Promotion] Release 0.1.10.0 Refactoring some IPS and panel replay structs Acked-by: Tom Chung Signed-off-by: Taimur Hassan Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c8d7e0be8183f4375a5cf5c3efd0c678129ea4de Author: Samson Tam Date: Thu May 1 15:59:47 2025 -0400 drm/amd/display: disable EASF narrow filter sharpening [Why & How] Default should be 1 to disable EASF narrow filter sharpening. Reviewed-by: Alvin Lee Signed-off-by: Samson Tam Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea979dd40138e0132fb3e4372859a5efadce0f37 Author: Wayne Lin Date: Wed Apr 30 17:35:21 2025 +0800 drm/amd/display: Return the exact value for debugging [Why] It's unnecessary to set operation_result as invalid reply when p_notify->result != AUX_RET_SUCCESS. [How] Set operation_result as p_notify->result to better understand the reason for the error Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit de6485e3df24170d71706d6f2c55a496443c3803 Author: Mario Limonciello Date: Tue Apr 22 15:58:41 2025 -0500 drm/amd/display: Restructure DMI quirks [Why] DMI quirks are relatively big code that makes amdgpu_dm 200 lines larger. [How] Move DMI quirks into a dedicated source file and make all quirks variables for `struct amdgpu_display_manager`. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f8ad62c0a93e5dd94243e10f1b742232e4d6411e Author: Aurabindo Pillai Date: Tue Apr 29 05:03:30 2025 +0800 drm/amd/display: check stream id dml21 wrapper to get plane_id [Why & How] Fix a false positive warning which occurs due to lack of correct checks when querying plane_id in DML21. This fixes the warning when performing a mode1 reset (cat /sys/kernel/debug/dri/1/amdgpu_gpu_recover): [ 35.751250] WARNING: CPU: 11 PID: 326 at /tmp/amd.PHpyAl7v/amd/amdgpu/../display/dc/dml2/dml2_dc_resource_mgmt.c:91 dml2_map_dc_pipes+0x243d/0x3f40 [amdgpu] [ 35.751434] Modules linked in: amdgpu(OE) amddrm_ttm_helper(OE) amdttm(OE) amddrm_buddy(OE) amdxcp(OE) amddrm_exec(OE) amd_sched(OE) amdkcl(OE) drm_suballoc_helper drm_ttm_helper ttm drm_display_helper cec rc_core i2c_algo_bit rfcomm qrtr cmac algif_hash algif_skcipher af_alg bnep amd_atl intel_rapl_msr intel_rapl_common snd_hda_codec_hdmi snd_hda_intel edac_mce_amd snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm_amd snd_hda_core snd_hwdep snd_pcm kvm snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul polyval_clmulni polyval_generic btusb ghash_clmulni_intel sha256_ssse3 btrtl sha1_ssse3 snd_seq btintel aesni_intel btbcm btmtk snd_seq_device crypto_simd sunrpc cryptd bluetooth snd_timer ccp binfmt_misc rapl snd i2c_piix4 wmi_bmof gigabyte_wmi k10temp i2c_smbus soundcore gpio_amdpt mac_hid sch_fq_codel msr parport_pc ppdev lp parport efi_pstore nfnetlink dmi_sysfs ip_tables x_tables autofs4 hid_generic usbhid hid crc32_pclmul igc ahci xhci_pci libahci xhci_pci_renesas video wmi [ 35.751501] CPU: 11 UID: 0 PID: 326 Comm: kworker/u64:9 Tainted: G OE 6.11.0-21-generic #21~24.04.1-Ubuntu [ 35.751504] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE [ 35.751505] Hardware name: Gigabyte Technology Co., Ltd. X670E AORUS PRO X/X670E AORUS PRO X, BIOS F30 05/22/2024 [ 35.751506] Workqueue: amdgpu-reset-dev amdgpu_debugfs_reset_work [amdgpu] [ 35.751638] RIP: 0010:dml2_map_dc_pipes+0x243d/0x3f40 [amdgpu] [ 35.751794] Code: 6d 0c 00 00 8b 84 24 88 00 00 00 41 3b 44 9c 20 0f 84 fc 07 00 00 48 83 c3 01 48 83 fb 06 75 b3 4c 8b 64 24 68 4c 8b 6c 24 40 <0f> 0b b8 06 00 00 00 49 8b 94 24 a0 49 00 00 89 c3 83 f8 07 0f 87 [ 35.751796] RSP: 0018:ffffbfa3805d7680 EFLAGS: 00010246 [ 35.751798] RAX: 0000000000010000 RBX: 0000000000000006 RCX: 0000000000000000 [ 35.751799] RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000 [ 35.751800] RBP: ffffbfa3805d78f0 R08: 0000000000000000 R09: 0000000000000000 [ 35.751801] R10: 0000000000000000 R11: 0000000000000000 R12: ffffbfa383249000 [ 35.751802] R13: ffffa0e68f280000 R14: ffffbfa383249658 R15: 0000000000000000 [ 35.751803] FS: 0000000000000000(0000) GS:ffffa0edbe580000(0000) knlGS:0000000000000000 [ 35.751804] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 35.751805] CR2: 00005d847ef96c58 CR3: 000000041de3e000 CR4: 0000000000f50ef0 [ 35.751806] PKRU: 55555554 [ 35.751807] Call Trace: [ 35.751810] [ 35.751816] ? show_regs+0x6c/0x80 [ 35.751820] ? __warn+0x88/0x140 [ 35.751822] ? dml2_map_dc_pipes+0x243d/0x3f40 [amdgpu] [ 35.751964] ? report_bug+0x182/0x1b0 [ 35.751969] ? handle_bug+0x6e/0xb0 [ 35.751972] ? exc_invalid_op+0x18/0x80 [ 35.751974] ? asm_exc_invalid_op+0x1b/0x20 [ 35.751978] ? dml2_map_dc_pipes+0x243d/0x3f40 [amdgpu] [ 35.752117] ? math_pow+0x48/0xa0 [amdgpu] [ 35.752256] ? srso_alias_return_thunk+0x5/0xfbef5 [ 35.752260] ? math_pow+0x48/0xa0 [amdgpu] [ 35.752400] ? srso_alias_return_thunk+0x5/0xfbef5 [ 35.752403] ? math_pow+0x11/0xa0 [amdgpu] [ 35.752524] ? srso_alias_return_thunk+0x5/0xfbef5 [ 35.752526] ? core_dcn4_mode_programming+0xe4d/0x20d0 [amdgpu] [ 35.752663] ? srso_alias_return_thunk+0x5/0xfbef5 [ 35.752669] dml21_validate+0x3d4/0x980 [amdgpu] Reviewed-by: Austin Zheng Signed-off-by: Aurabindo Pillai Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1561782686ccc36af844d55d31b44c938dd412dc Author: George Shen Date: Thu Apr 24 10:02:59 2025 -0400 drm/amd/display: fix link_set_dpms_off multi-display MST corner case [Why & How] When MST config is unplugged/replugged too quickly, it can potentially result in a scenario where previous DC state has not been reset before the HPD link detection sequence begins. In this case, driver will disable the streams/link prior to re-enabling the link for link training. There is a bug in the current logic that does not account for the fact that current_state can be released and cleared prior to swapping to a new state (resulting in the pipe_ctx stream pointers to be cleared) in between disabling streams. To resolve this, cache the original streams prior to committing any stream updates. Reviewed-by: Wenjing Liu Signed-off-by: George Shen Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 53761b7ecd83e6fbb9f2206f8c980a6aa308c844 Author: John Olender Date: Wed Apr 16 02:54:26 2025 -0400 drm/amd/display: Defer BW-optimization-blocked DRR adjustments [Why & How] Instead of dropping DRR updates, defer them. This fixes issues where monitor continues to see incorrect refresh rate after VRR was turned off by userspace. Fixes: 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3546 Reviewed-by: Sun peng Li Signed-off-by: John Olender Signed-off-by: Aurabindo Pillai Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9334c491cd8f388232b9a187bf0ddb728482bd6f Author: Gabe Teeger Date: Fri Apr 25 10:31:39 2025 -0400 Revert: "drm/amd/display: Enable urgent latency adjustment on DCN35" This reverts commit 756c85e4d0dd ("drm/amd/display: Enable urgent latency adjustment on DCN35") Reason for revert: Negative power impact. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Gabe Teeger Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dd141b16b3a2979a01194615dfe87dbba9d87045 Author: Dillon Varone Date: Mon Apr 28 12:34:27 2025 -0400 drm/amd/display: Fix race in dmub_srv_wait_for_pending [WHY] If commands are being submitted to DMCUB while concurrently waiting for pending commands to complete, rptr and wptr may never match again, and reported command count will not update. [HOW] Modify dmub_srv_wait_for_pending to constantly check wptr and rptr match, and update inbox status whenever a message is sent to avoid the race and determine message completion or idle as quickly as possible. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Dillon Varone Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 762ef7d1e6eefad9896560bfcb9bcf7f1b6df9c1 Author: Andy Shevchenko Date: Thu May 8 23:08:07 2025 +0300 pinctrl: at91: Fix possible out-of-boundary access at91_gpio_probe() doesn't check that given OF alias is not available or something went wrong when trying to get it. This might have consequences when accessing gpio_chips array with that value as an index. Note, that BUG() can be compiled out and hence won't actually perform the required checks. Fixes: 6732ae5cb47c ("ARM: at91: add pinctrl support") Signed-off-by: Andy Shevchenko Closes: https://lore.kernel.org/r/202505052343.UHF1Zo93-lkp@intel.com/ Link: https://lore.kernel.org/20250508200807.1384558-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 7ac37f0dcd2e0b729fa7b5513908dc8ab802b540 Author: Wayne Lin Date: Fri Apr 25 14:44:02 2025 +0800 drm/amd/display: Correct the reply value when AUX write incomplete [Why] Now forcing aux->transfer to return 0 when incomplete AUX write is inappropriate. It should return bytes have been transferred. [How] aux->transfer is asked not to change original msg except reply field of drm_dp_aux_msg structure. Copy the msg->buffer when it's write request, and overwrite the first byte when sink reply 1 byte indicating partially written byte number. Then we can return the correct value without changing the original msg. Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 37052175016ca0d4816365fa333474867184d0af Author: Dillon Varone Date: Thu Apr 24 13:38:19 2025 -0400 drm/amd/display: Backup and restore plane configuration only on update [WHY&HOW] When backing up and restoring plane states for minimal transition cases, only configuration should be backed up and restored. Information only relevant to the object/allocation (like refcount) should be excluded. Also move this interface to dc_plane.h. Reviewed-by: Aurabindo Pillai Signed-off-by: Dillon Varone Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0a5c060b593ad152318f89e5564bfdfcff8a6ac0 Author: Tim Huang Date: Thu May 8 13:37:35 2025 +0800 drm/amdgpu: fix incorrect MALL size for GFX1151 On GFX1151, the reported MALL cache size reflects only half of its actual size; this adjustment corrects the discrepancy. Signed-off-by: Tim Huang Acked-by: Alex Deucher Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 4367ee3ed150d404dbafdaf930e52d2bd4157860 Author: Dr. David Alan Gilbert Date: Wed May 7 18:01:45 2025 +0100 drm/amd/pm: Remove remainder of mode2_reset_is_support The previous patch removed smu_mode2_reset_is_support() which was the only function to call through the mode2_reset_is_support() method pointer. Remove the remaining functions that were assigned to it and the pointer itself. See discussion at: https://lore.kernel.org/all/DM4PR12MB5165D85BD85BC8FC8BF7A3B48E88A@DM4PR12MB5165.namprd12.prod.outlook.com/ Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit da471b8b776b527b2bcc6d13532ea0649e862817 Author: Dr. David Alan Gilbert Date: Wed May 7 18:01:44 2025 +0100 drm/amd/pm: Remove unused smu_mode2_reset_is_support smu_mode2_reset_is_support() was added in 2020 by commit 5c03e5843e6b ("drm/amdgpu:add smu mode1/2 support for aldebaran") but has remained unused. See discussion at: https://lore.kernel.org/all/DM4PR12MB5165D85BD85BC8FC8BF7A3B48E88A@DM4PR12MB5165.namprd12.prod.outlook.com/ Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit f6da61b95652b6631aa9ea459e90079962cd6f77 Author: Dr. David Alan Gilbert Date: Wed May 7 18:01:43 2025 +0100 drm/amd/pm/smu13: Remove unused smu_v13_0_init_display_count smu_v13_0_init_display_count() was added in 2020 by commit c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") but is unused. See discussion on: https://lore.kernel.org/all/DM4PR12MB5165D85BD85BC8FC8BF7A3B48E88A@DM4PR12MB5165.namprd12.prod.outlook.com/ that it really isn't neede. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 010503a3cb3bcd9a952b6ccc8977629447a271e3 Author: Arvind Yadav Date: Thu May 8 11:28:18 2025 +0530 drm/amdgpu: Fix amdgpu_userq_wait_ioctl() warn missing error code 'r' To resolve the warning regarding the missing error code 'r' in amdgpu_userq_wait_ioctl(), assign the value 'r = -EINVAL'. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202505080458.rnV8YfiY-lkp@intel.com/ Cc: Alex Deucher Cc: Christian König Cc: Arunpravin Paneer Selvam Reviewed-by: Sunil Khatri Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit f10eb185ad0552d1ba3d16b559c30d7d1b9481fa Author: Arvind Yadav Date: Wed May 7 22:06:17 2025 +0530 drm/amdgpu: Fix NULL dereference in amdgpu_userq_restore_worker Switch cancel_delayed_work() to cancel_delayed_work_sync() to ensure the delayed work has finished executing before proceeding with resource cleanup. This prevents a potential use-after-free or NULL dereference if the resume_work is still running during finalization. BUG: kernel NULL pointer dereference, address: 0000000000000140 [ +0.000050] #PF: supervisor read access in kernel mode [ +0.000019] #PF: error_code(0x0000) - not-present page [ +0.000021] PGD 0 P4D 0 [ +0.000015] Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.000021] CPU: 17 UID: 0 PID: 196299 Comm: kworker/17:0 Tainted: G U 6.14.0-org-staging #1 [ +0.000032] Tainted: [U]=USER [ +0.000015] Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS ELITE/X570 AORUS ELITE, BIOS F39 03/22/2024 [ +0.000029] Workqueue: events amdgpu_userq_restore_worker [amdgpu] [ +0.000426] RIP: 0010:drm_exec_lock_obj+0x32/0x210 [drm_exec] [ +0.000025] Code: e5 41 57 41 56 41 55 49 89 f5 41 54 49 89 fc 48 83 ec 08 4c 8b 77 30 4d 85 f6 0f 85 c0 00 00 00 4c 8d 7f 08 48 39 77 38 74 54 <49> 8b bd f8 00 00 00 4c 89 fe 41 f6 04 24 01 75 3c e8 08 50 bc e0 [ +0.000046] RSP: 0018:ffffab1b04da3ce8 EFLAGS: 00010297 [ +0.000020] RAX: 0000000000000001 RBX: ffff930cc60e4bc0 RCX: 0000000000000000 [ +0.000025] RDX: 0000000000000004 RSI: 0000000000000048 RDI: ffffab1b04da3d88 [ +0.000028] RBP: ffffab1b04da3d10 R08: ffff930cc60e4000 R09: 0000000000000000 [ +0.000022] R10: ffffab1b04da3d18 R11: 0000000000000001 R12: ffffab1b04da3d88 [ +0.000023] R13: 0000000000000048 R14: 0000000000000000 R15: ffffab1b04da3d90 [ +0.000023] FS: 0000000000000000(0000) GS:ffff9313dea80000(0000) knlGS:0000000000000000 [ +0.000024] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000021] CR2: 0000000000000140 CR3: 000000018351a000 CR4: 0000000000350ef0 [ +0.000025] Call Trace: [ +0.000018] [ +0.000015] ? show_regs+0x69/0x80 [ +0.000022] ? __die+0x25/0x70 [ +0.000019] ? page_fault_oops+0x15d/0x510 [ +0.000024] ? do_user_addr_fault+0x312/0x690 [ +0.000024] ? sched_clock_cpu+0x10/0x1a0 [ +0.000028] ? exc_page_fault+0x78/0x1b0 [ +0.000025] ? asm_exc_page_fault+0x27/0x30 [ +0.000024] ? drm_exec_lock_obj+0x32/0x210 [drm_exec] [ +0.000024] drm_exec_prepare_obj+0x21/0x60 [drm_exec] [ +0.000021] amdgpu_vm_lock_pd+0x22/0x30 [amdgpu] [ +0.000266] amdgpu_userq_validate_bos+0x6c/0x320 [amdgpu] [ +0.000333] amdgpu_userq_restore_worker+0x4a/0x120 [amdgpu] [ +0.000316] process_one_work+0x189/0x3c0 [ +0.000021] worker_thread+0x2a4/0x3b0 [ +0.000022] kthread+0x109/0x220 [ +0.000018] ? __pfx_worker_thread+0x10/0x10 [ +0.000779] ? _raw_spin_unlock_irq+0x1f/0x40 [ +0.000560] ? __pfx_kthread+0x10/0x10 [ +0.000543] ret_from_fork+0x3c/0x60 [ +0.000507] ? __pfx_kthread+0x10/0x10 [ +0.000515] ret_from_fork_asm+0x1a/0x30 [ +0.000515] v2: Replace cancel_delayed_work() to cancel_delayed_work_sync() in amdgpu_userq_destroy() and amdgpu_userq_evict(). Cc: Alex Deucher Reviewed-by: Christian König Reviewed-by: Sunil Khatri Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 7dbbfb3c171a6f63b01165958629c9c26abf38ab Author: Philip Yang Date: Wed May 7 11:04:32 2025 -0400 drm/amdgpu: csa unmap use uninterruptible lock After process exit to unmap csa and free GPU vm, if signal is accepted and then waiting to take vm lock is interrupted and return, it causes memory leaking and below warning backtrace. Change to use uninterruptible wait lock fix the issue. WARNING: CPU: 69 PID: 167800 at amd/amdgpu/amdgpu_kms.c:1525 amdgpu_driver_postclose_kms+0x294/0x2a0 [amdgpu] Call Trace: drm_file_free.part.0+0x1da/0x230 [drm] drm_close_helper.isra.0+0x65/0x70 [drm] drm_release+0x6a/0x120 [drm] amdgpu_drm_release+0x51/0x60 [amdgpu] __fput+0x9f/0x280 ____fput+0xe/0x20 task_work_run+0x67/0xa0 do_exit+0x217/0x3c0 do_group_exit+0x3b/0xb0 get_signal+0x14a/0x8d0 arch_do_signal_or_restart+0xde/0x100 exit_to_user_mode_loop+0xc1/0x1a0 exit_to_user_mode_prepare+0xf4/0x100 syscall_exit_to_user_mode+0x17/0x40 do_syscall_64+0x69/0xc0 Signed-off-by: Philip Yang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 102419cdadca4231cde2cf1b2cc85fa13adfb302 Author: Aurabindo Pillai Date: Tue May 6 13:22:25 2025 -0400 drm/amd/display: use drm_dbg_driver() in amdgpu_dm.c Replace all use of DRM_DEBUG_DRIVER in amdgpu_dm.c with drm_dbg_driver(). The latter prints the instance of the drm device associated with the error which would helpful in debugging scenarios involving multiple GPUs Signed-off-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d3f960365b8c35449d22b780383dc9b40d96203e Author: Bartosz Golaszewski Date: Tue May 6 11:01:55 2025 +0200 gpio: ml-ioh: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-12-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 51227589e8388b452b4315907d2de5f7d5a06e87 Author: Bartosz Golaszewski Date: Tue May 6 11:01:54 2025 +0200 gpio: mc33880: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-11-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit dff5a31dcbd260eb61f0128876910809f04f1e3b Author: Bartosz Golaszewski Date: Tue May 6 11:01:53 2025 +0200 gpio: mb86s7x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-10-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 8f9da4401b82faa788b663402ea699ccfd756597 Author: Bartosz Golaszewski Date: Tue May 6 11:01:52 2025 +0200 gpio: max77620: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-9-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 66a6d0e5a77889cbec98152dadda70dd79f1678c Author: Bartosz Golaszewski Date: Tue May 6 11:01:51 2025 +0200 gpio: max732x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-8-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 1938913798082cd284ab59afcdf68c2bb5ba1686 Author: Bartosz Golaszewski Date: Tue May 6 11:01:50 2025 +0200 gpio: max730x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-7-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 75e80b69e1367b95a98107fc38351b5b865c568c Author: Bartosz Golaszewski Date: Tue May 6 11:01:49 2025 +0200 gpio: max3191x: remove unused callbacks This driver is input-only and as such doesn't need to define empty set() and direction_output() callbacks. Remove them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-6-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 2e6b7f5ffe08d42196b31322e6443a9874c79a03 Author: Bartosz Golaszewski Date: Tue May 6 11:01:48 2025 +0200 gpio: madera: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-5-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 1a7b6b536d509203325bccd88ae42499b45f5765 Author: Bartosz Golaszewski Date: Tue May 6 11:01:47 2025 +0200 gpio: lpc32xx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-4-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 4f71abfef92d9e302c7c62744fa806076b3ba819 Author: Bartosz Golaszewski Date: Tue May 6 11:01:46 2025 +0200 gpio: lpc18xx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-3-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 978d23c1db9a303f2fab817de28087ada5859a9a Author: Bartosz Golaszewski Date: Tue May 6 11:01:45 2025 +0200 gpio: lp87565: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-2-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit 30d15b8949828811e9df3dafc12e3d523ed6e154 Author: Bartosz Golaszewski Date: Tue May 6 11:01:44 2025 +0200 gpio: lp873x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-1-0fbdea5a9667@linaro.org Signed-off-by: Bartosz Golaszewski commit cf724e5e4161f3b1de59163a4f39ba59379f52a4 Merge: 2d8951aee844b7 752d0464b78a5b Author: Jens Axboe Date: Tue May 13 07:10:52 2025 -0600 Merge tag 'md-6.16-20250513' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-6.16/block Pull MD changes from Yu Kuai: - Fix that normal IO can be starved by sync IO, found by mkfs on newly created large raid5, with some clean up patches for bdev inflight counters. * tag 'md-6.16-20250513' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md: clean up accounting for issued sync IO md: fix is_mddev_idle() md: add a new api sync_io_depth md: record dm-raid gendisk in mddev block: export API to get the number of bdev inflight IO block: clean up blk_mq_in_flight_rw() block: WARN if bdev inflight counter is negative block: reuse part_in_flight_rw for part_in_flight blk-mq: remove blk_mq_in_flight() commit 6ac28cd23210836307d22b0e694a2a992127544e Merge: 3a1e07184d78f5 8824dc7f947ac5 Author: Bartosz Golaszewski Date: Tue May 13 15:11:12 2025 +0200 Merge tag 'ib-mfd-gpio-nvmem-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next Immutable branch between MFD, GPIO and NVMEM due for the v6.16 merge window commit 61479ae38cb7bf6083de302598b7d491ec54168a Author: Alexandre Courbot Date: Wed May 7 22:52:34 2025 +0900 gpu: nova-core: move Firmware to firmware module We will extend the firmware methods, so move it to its own module instead to keep gpu.rs focused. Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-7-fcb02749754d@nvidia.com [ Don't require a bound device, remove pub visibility from Firmware fields, use FIRMWARE_VERSION consistently. - Danilo ] Signed-off-by: Danilo Krummrich commit e4bc82af9e8b095c0f7a5aa9050b780002bd0933 Author: Alexandre Courbot Date: Wed May 7 22:52:33 2025 +0900 gpu: nova-core: fix layout of NV_PMC_BOOT_0 The layout of NV_PMC_BOOT_0 has two small issues: - The "chipset" field, while useful to identify a chip, is actually an aggregate of two distinct fields named "architecture" and "implementation". - The "architecture" field is split, with its MSB being at a different location than the rest of its bits. Redefine the register layout to match its actual definition as provided by OpenRM and expose the fully-constructed "architecture" field through our own "Architecture" type. The "chipset" pseudo-field is also useful to have, so keep providing it. Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-6-fcb02749754d@nvidia.com [ Use Result from kernel::prelude. - Danilo ] Signed-off-by: Danilo Krummrich commit c3f22262670da259d7cf1fda199d8f06f1d6ff6d Author: Alexandre Courbot Date: Wed May 7 22:52:32 2025 +0900 gpu: nova-core: define registers layout using helper macro Add the register!() macro, which defines a given register's layout and provide bit-field accessors with a way to convert them to a given type. This macro will allow us to make clear definitions of the registers and manipulate their fields safely. The long-term goal is to eventually move it to the kernel crate so it can be used by other drivers as well, but it was agreed to first land it into nova-core and make it mature there. To illustrate its usage, use it to define the layout for the Boot0 (renamed to NV_PMC_BOOT_0 to match OpenRM's naming scheme) and take advantage of its accessors. Suggested-by: Danilo Krummrich Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-5-fcb02749754d@nvidia.com [ Fix typo in commit message. - Danilo ] Signed-off-by: Danilo Krummrich commit 3b38cce83fa97348e7a926dd90304c18b9659308 Author: Bartosz Golaszewski Date: Wed May 7 16:35:51 2025 +0200 pinctrl: add stubs for OF-specific pinconf functions Allow building drivers using these interfaces with COMPILE_TEST enabled and OF disabled by providing stub definitions. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505072245.OgSXI1hh-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250507143551.47056-1-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 32b5361a0d10627343b2ded76f05e5d591627fd6 Author: Lijuan Gao Date: Tue May 6 14:23:01 2025 +0800 pinctrl: qcom: correct the ngpios entry for QCS8300 Correct the ngpios entry to account for the UFS_RESET pin, which is expected to be wired to the reset pin of the primary UFS memory and is exported as GPIOs in addition to the real GPIOs, allowing the UFS driver to toggle it. Fixes: 0c4cd2cc87c8 ("pinctrl: qcom: add the tlmm driver for QCS8300 platforms") Reviewed-by: Konrad Dybcio Signed-off-by: Lijuan Gao Link: https://lore.kernel.org/20250506-correct_gpio_ranges-v3-4-49a7d292befa@quicinc.com Signed-off-by: Linus Walleij commit d18cdb975ba8aad7046ff82df1a963fa21082a45 Author: Lijuan Gao Date: Tue May 6 14:23:00 2025 +0800 pinctrl: qcom: correct the ngpios entry for QCS615 Correct the ngpios entry to account for the UFS_RESET pin being exported as a GPIO in addition to the real GPIOs, allowing the UFS driver to toggle it. Fixes: b698f36a9d40 ("pinctrl: qcom: add the tlmm driver for QCS615 platform") Reviewed-by: Konrad Dybcio Signed-off-by: Lijuan Gao Link: https://lore.kernel.org/20250506-correct_gpio_ranges-v3-3-49a7d292befa@quicinc.com Signed-off-by: Linus Walleij commit b4b6c80ed8d1cca0fb262117c575571c26633711 Author: Lijuan Gao Date: Tue May 6 14:22:59 2025 +0800 dt-bindings: pinctrl: qcom: correct gpio-ranges in examples for qcs8300 Correct the gpio-ranges in the QCS8300 TLMM pin controller example to include the UFS_RESET pin, which is expected to be wired to the reset pin of the primary UFS memory. This allows the UFS driver to toggle it. Fixes: 5778535972e2 ("dt-bindings: pinctrl: describe qcs8300-tlmm") Acked-by: Rob Herring (Arm) Signed-off-by: Lijuan Gao Link: https://lore.kernel.org/20250506-correct_gpio_ranges-v3-2-49a7d292befa@quicinc.com Signed-off-by: Linus Walleij commit 2f87c9aa90e9f149a0c763dbd6ec662d2fbea977 Author: Lijuan Gao Date: Tue May 6 14:22:58 2025 +0800 dt-bindings: pinctrl: qcom: correct gpio-ranges in examples for qcs615 Correct the gpio-ranges in the QCS615 TLMM pin controller example to include the UFS_RESET pin, which is expected to be wired to the reset pin of the primary UFS memory. This allows the UFS driver to toggle it. Fixes: 55c487ea6084 ("dt-bindings: pinctrl: document the QCS615 Top Level Mode Multiplexer") Acked-by: Rob Herring (Arm) Signed-off-by: Lijuan Gao Link: https://lore.kernel.org/20250506-correct_gpio_ranges-v3-1-49a7d292befa@quicinc.com Signed-off-by: Linus Walleij commit f20af84c29b222f68df53bfa72dcfbd4a3491603 Author: Rafael J. Wysocki Date: Tue May 6 22:48:59 2025 +0200 cpufreq: intel_pstate: Document hybrid processor support Describe the support for hybrid processors in intel_pstate, including the CAS and EAS support, in the admin-guide documentation. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1935040.CQOukoFCf9@rjwysocki.net commit 05cf8b8c5118479637efe281e5eb98972d3a3386 Author: Rafael J. Wysocki Date: Tue May 6 22:47:53 2025 +0200 cpufreq: intel_pstate: EAS: Increase cost for CPUs using L3 cache On some hybrid platforms some efficient CPUs (E-cores) are not connected to the L3 cache, but there are no other differences between them and the other E-cores that use L3. In that case, it is generally more efficient to run "light" workloads on the E-cores that do not use L3 and allow all of the cores using L3, including P-cores, to go into idle states. For this reason, slightly increase the cost for all CPUs sharing the L3 cache to make EAS prefer CPUs that do not use it to the other CPUs of the same type (if any). Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2032776.usQuhbGJ8B@rjwysocki.net commit 7b010f9b906107ae4e5ac626329ab818b3f0a6b6 Author: Rafael J. Wysocki Date: Tue May 6 22:44:30 2025 +0200 cpufreq: intel_pstate: EAS support for hybrid platforms Modify intel_pstate to register EM perf domains for CPUs on hybrid platforms without SMT which causes EAS to be enabled on them when schedutil is used as the cpufreq governor (which requires intel_pstate to operate in the passive mode). This change is targeting platforms (for example, Lunar Lake) where the "little" CPUs (E-cores) are always more energy-efficient than the "big" or "performance" CPUs (P-cores) when run at the same HWP performance level, so it is sufficient to tell EAS that E-cores are always preferred (so long as there is enough spare capacity on one of them to run the given task). However, migrating tasks between CPUs of the same type too often is not desirable because it may hurt both performance and energy efficiency due to leaving warm caches behind. For this reason, register a separate perf domain for each CPU and choose the cost values for them so that the cost mostly depends on the CPU type, but there is also a small component of it depending on the performance level (utilization) which helps to balance the load between CPUs of the same type. The cost component related to the CPU type is computed with the help of the observation that the IPC metric value for a given CPU is inversely proportional to its performance-to-frequency scaling factor and the cost of running code on it can be assumed to be roughly proportional to that IPC ratio (in principle, the higher the IPC ratio, the more resources are utilized when running at a given frequency, so the cost should be higher). For all CPUs that are online at the system initialization time, EM perf domains are registered when the driver starts up, after asymmetric capacity support has been enabled. For the CPUs that become online later, EM perf domains are registered after setting the asymmetric capacity for them. Signed-off-by: Rafael J. Wysocki Tested-by: Christian Loehle Reviewed-by: Dietmar Eggemann Link: https://patch.msgid.link/6057101.MhkbZ0Pkbq@rjwysocki.net commit 0b224fcc89c3b478f6a53e842942080abd7867b3 Merge: f7e9228532beb5 4a6b1cf0d4c02d Author: Rafael J. Wysocki Date: Tue May 13 14:34:54 2025 +0200 Merge Energy Model management code changes for 6.16 commit 4a6b1cf0d4c02d6da2976c6314c264d20672937e Author: Rafael J. Wysocki Date: Tue May 6 22:41:21 2025 +0200 PM: EM: Introduce em_adjust_cpu_capacity() Add a function for updating the Energy Model for a CPU after its capacity has changed, which subsequently will be used by the intel_pstate driver. An EM_PERF_DOMAIN_ARTIFICIAL check is added to em_recalc_and_update() to prevent it from calling em_compute_costs() for an "artificial" perf domain with a NULL cb parameter which would cause it to crash. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Tested-by: Christian Loehle Reviewed-by: Dietmar Eggemann Link: https://patch.msgid.link/3637203.iIbC2pHGDl@rjwysocki.net commit 3e3ba654d3097e0031f2add215b12ff81c23814e Author: Rafael J. Wysocki Date: Tue May 6 22:39:35 2025 +0200 PM: EM: Move CPU capacity check to em_adjust_new_capacity() Move the check of the CPU capacity currently stored in the energy model against the arch_scale_cpu_capacity() value to em_adjust_new_capacity() so it will be done regardless of where the latter is called from. This will be useful when a new em_adjust_new_capacity() caller is added subsequently. While at it, move the pd local variable declaration in em_check_capacity_update() into the loop in which it is used. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Tested-by: Christian Loehle Reviewed-by: Dietmar Eggemann Link: https://patch.msgid.link/7810787.EvYhyI6sBW@rjwysocki.net commit c9b83cbe46c645712988a53ce513aaf56728dcd3 Author: Atul Kumar Pant Date: Sun May 11 12:41:41 2025 +0530 PM: EM: Documentation: Fix typos in example driver code Fix the API name to free the allocated table in the example driver code that modifies the EM. Also fix the passing of correct table when updating the cost. Signed-off-by: Atul Kumar Pant Link: https://patch.msgid.link/20250511071141.13237-1-atulpant.linux@gmail.com Signed-off-by: Rafael J. Wysocki commit f7e9228532beb5c0cbb11101384ed977806ef691 Author: Rafael J. Wysocki Date: Mon May 12 15:23:30 2025 +0200 cpufreq: Drop policy locking from cpufreq_policy_is_good_for_eas() Policy locking was added to cpufreq_policy_is_good_for_eas() by commit 4854649b1fb4 ("cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq") to address a theoretical race condition, but it turned out to introduce a circular locking dependency between the policy rwsem and sched_domains_mutex via cpuset_mutex. This leads to a board lockup on OdroidN2 that is based on the ARM64 Amlogic Meson SoC. Drop the policy locking from cpufreq_policy_is_good_for_eas() to address this issue. Fixes: 4854649b1fb4 ("cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq") Closes: https://lore.kernel.org/linux-pm/1bf3df62-0641-459f-99fc-fd511e564b84@samsung.com/ Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2806514.mvXUDI8C0e@rjwysocki.net commit a2a637ffdf8692e9a376383ca82a990036424fe0 Author: Alexandre Courbot Date: Wed May 7 22:52:31 2025 +0900 gpu: nova-core: take bound device in Gpu::new We will need to perform things like allocating DMA memory during device creation, so make sure to take the device context that will allow us to perform these actions. This also allows us to use Devres::access to obtain the BAR without holding a RCU lock. Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-4-fcb02749754d@nvidia.com Signed-off-by: Danilo Krummrich commit 44dda4353b9bd5dcc9cc30d97c0c3cfb00d8f987 Author: Alexandre Courbot Date: Wed May 7 22:52:30 2025 +0900 gpu: nova-core: add missing GA100 definition linux-firmware contains a directory for GA100, and it is a defined chipset in Nouveau. Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-3-fcb02749754d@nvidia.com Signed-off-by: Danilo Krummrich commit 297b2cd6ba2b708d987c30360f846cfbe79ad563 Author: Alexandre Courbot Date: Wed May 7 22:52:29 2025 +0900 gpu: nova-core: derive useful traits for Chipset We will commonly need to compare chipset versions, so derive the ordering traits to make that possible. Also derive Copy and Clone since passing Chipset by value will be more efficient than by reference. Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250507-nova-frts-v3-2-fcb02749754d@nvidia.com Signed-off-by: Danilo Krummrich commit 34a364ff04e960a4d47f558acf7fbafcc3085c1f Author: Rafael J. Wysocki Date: Fri May 9 15:02:27 2025 +0200 PM: sleep: Introduce pm_suspend_in_progress() Introduce pm_suspend_in_progress() to be used for checking if a system- wide suspend or resume transition is in progress, instead of comparing pm_suspend_target_state directly to PM_SUSPEND_ON, and use it where applicable. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Reviewed-by: Raag Jadav Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/2020901.PYKUYFuaPT@rjwysocki.net commit 1b17d4525bca3916644c41e01522df8fa0f8b90b Author: Rafael J. Wysocki Date: Fri May 9 14:51:47 2025 +0200 PM: sleep: Print PM debug messages during hibernation Commit cdb8c100d8a4 ("include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume") caused PM debug messages to only be printed during system-wide suspend and resume in progress, but it forgot about hibernation. Address this by adding a check for hibernation in progress to pm_debug_messages_should_print(). Fixes: cdb8c100d8a4 ("include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume") Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/4998903.GXAFRqVoOG@rjwysocki.net commit d559335f3f0cae88d9af49d6572297a30286286f Author: Jon Hunter Date: Mon May 12 15:26:53 2025 +0200 ucsi_ccg: Disable async suspend in ucsi_ccg_probe() Commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") had triggered a suspend issue on Tegra boards because it had reordered the syspend of devices with async suspend enabled with respect to some other devices. Specifically, the devices with async suspend enabled that have no children are now suspended before any other devices unless there are device links pointing to them as suppliers. The investigation that followed the failure report uncovered that async suspend was enabled for the cypd4226 device that was a Type-C controller with a dependency on USB PHY and it turned out that disabling async suspend for that device made the issue go away. Since async suspend takes dependencies between parents and children into account as well as other dependencies between devices represented by device links, this means that the cypd4226 has a dependency on another device that is not represented in any form in the kernel (a "hidden" dependency), in which case async suspend should not be enabled for it. Accordingly, make ucsi_ccg_probe() disable async suspend for the devices handled by, which covers the cypd4226 device on the Tegra boards as well as other devices likely to have similar "hidden" dependencies. Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") Closes: https://lore.kernel.org/linux-pm/c6cd714b-b0eb-42fc-b9b5-4f5f396fb4ec@nvidia.com/ Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Jon Hunter Signed-off-by: Rafael J. Wysocki Reviewed-by: Heikki Krogerus Link: https://patch.msgid.link/6180608.lOV4Wx5bFT@rjwysocki.net commit dc918c34e2ac8663969e9cf74be3577220697105 Author: Rafael J. Wysocki Date: Wed Apr 30 20:27:41 2025 +0200 pinctrl: amd: Fix hibernation support with CONFIG_SUSPEND unset After recent changes, pinctrl-amd will not support hibernation when CONFIG_HIBERNATION is set and CONFIG_SUSPEND isn't because it will not register amd_gpio_pm_ops then. Address this by restoring dependencies on CONFIG_PM_SLEEP where necessary for hibernation support. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Reviewed-by: Linus Walleij Link: https://patch.msgid.link/5889368.DvuYhMxLoT@rjwysocki.net commit 9f607dc39b6658ba8ea647bd99725e68c66071b7 Merge: 42bd96cb9ef444 795f86ff050509 Author: Paolo Abeni Date: Tue May 13 13:29:43 2025 +0200 Merge branch 'amd-xgbe-add-support-for-amd-renoir' Raju Rangoju says: ==================== amd-xgbe: add support for AMD Renoir Add support for a new AMD Ethernet device called "Renoir". It has a new PCI ID, add this to the current list of supported devices in the amd-xgbe devices. Also, the BAR1 addresses cannot be used to access the PCS registers on Renoir platform, use the indirect addressing via SMN instead. ==================== Link: https://patch.msgid.link/20250509155325.720499-1-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 795f86ff050509d34a0e2b8bf8beb943d7e81897 Author: Raju Rangoju Date: Fri May 9 21:23:25 2025 +0530 amd-xgbe: add support for new pci device id 0x1641 Add support for new pci device id 0x1641 to register Renoir device with PCIe. Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250509155325.720499-6-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit ab95bc9aa795aa987b16f6cc1192138e62036f99 Author: Raju Rangoju Date: Fri May 9 21:23:24 2025 +0530 amd-xgbe: Add XGBE_XPCS_ACCESS_V3 support to xgbe_pci_probe() A new version of XPCS access routines have been introduced, add the support to xgbe_pci_probe() to use these routines. Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250509155325.720499-5-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit e49479f30ef9b3576dbfd24c3d98f05567371dcd Author: Raju Rangoju Date: Fri May 9 21:23:23 2025 +0530 amd-xgbe: add support for new XPCS routines Add the necessary support to enable Renoir ethernet device. Since the BAR1 address cannot be used to access the XPCS registers on Renoir, use the smn functions. Some of the ethernet add-in-cards have dual PHY but share a single MDIO line (between the ports). In such cases, link inconsistencies are noticed during the heavy traffic and during reboot stress tests. Using smn calls helps avoid such race conditions. Suggested-by: Sudheesh Mavila Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250509155325.720499-4-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit bbbd7303ea1851e24365058d424163d5cbdbb678 Author: Raju Rangoju Date: Fri May 9 21:23:22 2025 +0530 amd-xgbe: reorganize the xgbe_pci_probe() code path Reorganize the xgbe_pci_probe() code path to convert if/else statements to switch case to help add future code. This helps code look cleaner. Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250509155325.720499-3-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 2d4407160f601876a88376b3789ce2f59df21f4b Author: Raju Rangoju Date: Fri May 9 21:23:21 2025 +0530 amd-xgbe: reorganize the code of XPCS access The xgbe_{read/write}_mmd_regs_v* functions have common code which can be moved to helper functions. Add new helper functions to calculate the mmd_address for v1/v2 of xpcs access. Signed-off-by: Raju Rangoju Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250509155325.720499-2-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 42bd96cb9ef444f209c3cda63e60b171a308ebd7 Merge: ac4d1baf97fdaa 25e37418c87249 Author: Paolo Abeni Date: Tue May 13 13:22:34 2025 +0200 Merge branch 'tools-ynl-gen-support-sub-types-for-binary-attributes' Jakub Kicinski says: ==================== tools: ynl-gen: support sub-types for binary attributes Binary attributes have sub-type annotations which either indicate that the binary object should be interpreted as a raw / C array of a simple type (e.g. u32), or that it's a struct. Use this information in the C codegen instead of outputting void * for all binary attrs. It doesn't make a huge difference in the genl families, but in classic Netlink there is a lot more structs. v1: https://lore.kernel.org/20250508022839.1256059-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250509154213.1747885-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 25e37418c87249369fe546f2cb6af578c16b68b9 Author: Jakub Kicinski Date: Fri May 9 08:42:13 2025 -0700 tools: ynl-gen: support struct for binary attributes Support using a struct pointer for binary attrs. Len field is maintained because the structs may grow with newer kernel versions. Or, which matters more, be shorter if the binary is built against newer uAPI than kernel against which it's executed. Since we are storing a pointer to a struct type - always allocate at least the amount of memory needed by the struct per current uAPI headers (unused mem is zeroed). Technically users should check the length field but per modern ASAN checks storing a short object under a pointer seems like a bad idea. Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250509154213.1747885-4-kuba@kernel.org Signed-off-by: Paolo Abeni commit 9ba8e351efd4d003a7fc22bc7455f0e95665cf44 Author: Jakub Kicinski Date: Fri May 9 08:42:12 2025 -0700 tools: ynl-gen: auto-indent else We auto-indent if statements (increase the indent of the subsequent line by 1), do the same thing for else branches without a block. There hasn't been any else branches before but we're about to add one. Reviewed-by: Donald Hunter Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250509154213.1747885-3-kuba@kernel.org Signed-off-by: Paolo Abeni commit 02a562bb2b0846f44bb4226b7ee7ef9821c3780e Author: Jakub Kicinski Date: Fri May 9 08:42:11 2025 -0700 tools: ynl-gen: support sub-type for binary attributes Sub-type annotation on binary attributes may indicate that the attribute carries an array of simple types (also referred to as "C array" in docs). Support rendering them as such in the C user code. For example for u32, instead of: struct { u32 arr; } _len; void *arr; render: struct { u32 arr; } _count; __u32 *arr; Note that count is the number of elements while len was the length in bytes. Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250509154213.1747885-2-kuba@kernel.org Signed-off-by: Paolo Abeni commit 21508c8c972ca0ff06b07af37adb4021ab527de2 Merge: 6883b680e703c6 c24a65b6a27c78 Author: Leon Romanovsky Date: Tue May 13 07:19:06 2025 -0400 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux into wip/leon-for-next Tony Nguyen says: ==================== Prepare for Intel IPU E2000 (GEN3) This is the first part in introducing RDMA support for idpf. ---------------------------------------------------------------- Tatyana Nikolova says: To align with review comments, the patch series introducing RDMA RoCEv2 support for the Intel Infrastructure Processing Unit (IPU) E2000 line of products is going to be submitted in three parts: 1. Modify ice to use specific and common IIDC definitions and pass a core device info to irdma. 2. Add RDMA support to idpf and modify idpf to use specific and common IIDC definitions and pass a core device info to irdma. 3. Add RDMA RoCEv2 support for the E2000 products, referred to as GEN3 to irdma. This first part is a 5 patch series based on the original "iidc/ice/irdma: Update IDC to support multiple consumers" patch to allow for multiple CORE PCI drivers, using the auxbus. Patches: 1) Move header file to new name for clarity and replace ice specific DSCP define with a kernel equivalent one in irdma 2) Unify naming convention 3) Separate header file into common and driver specific info 4) Replace ice specific DSCP define with a kernel equivalent one in ice 5) Implement core device info struct and update drivers to use it ---------------------------------------------------------------- v1: https://lore.kernel.org/20250505212037.2092288-1-anthony.l.nguyen@intel.com IWL reviews: [v5] https://lore.kernel.org/20250416021549.606-1-tatyana.e.nikolova@intel.com [v4] https://lore.kernel.org/20250225050428.2166-1-tatyana.e.nikolova@intel.com [v3] https://lore.kernel.org/20250207194931.1569-1-tatyana.e.nikolova@intel.com [v2] https://lore.kernel.org/20240824031924.421-1-tatyana.e.nikolova@intel.com [v1] https://lore.kernel.org/20240724233917.704-1-tatyana.e.nikolova@intel.com * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux: iidc/ice/irdma: Update IDC to support multiple consumers ice: Replace ice specific DSCP mapping num with a kernel define iidc/ice/irdma: Break iidc.h into two headers iidc/ice/irdma: Rename to iidc_* convention iidc/ice/irdma: Rename IDC header file ==================== Link: https://patch.msgid.link/20250509200712.2911060-1-anthony.l.nguyen@intel.com Signed-off-by: Leon Romanovsky commit 6883b680e703c6b2efddb4e7a8d891ce1803d06b Author: Shin'ichiro Kawasaki Date: Sat May 10 19:10:36 2025 +0900 RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction The commit 59c68ac31e15 ("iw_cm: free cm_id resources on the last deref") simplified cm_id resource management by freeing cm_id once all references to the cm_id were removed. The references are removed either upon completion of iw_cm event handlers or when the application destroys the cm_id. This commit introduced the use-after-free condition where cm_id_private object could still be in use by event handler works during the destruction of cm_id. The commit aee2424246f9 ("RDMA/iwcm: Fix a use-after-free related to destroying CM IDs") addressed this use-after- free by flushing all pending works at the cm_id destruction. However, still another use-after-free possibility remained. It happens with the work objects allocated for each cm_id_priv within alloc_work_entries() during cm_id creation, and subsequently freed in dealloc_work_entries() once all references to the cm_id are removed. If the cm_id's last reference is decremented in the event handler work, the work object for the work itself gets removed, and causes the use- after-free BUG below: BUG: KASAN: slab-use-after-free in __pwq_activate_work+0x1ff/0x250 Read of size 8 at addr ffff88811f9cf800 by task kworker/u16:1/147091 CPU: 2 UID: 0 PID: 147091 Comm: kworker/u16:1 Not tainted 6.15.0-rc2+ #27 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 Workqueue: 0x0 (iw_cm_wq) Call Trace: dump_stack_lvl+0x6a/0x90 print_report+0x174/0x554 ? __virt_addr_valid+0x208/0x430 ? __pwq_activate_work+0x1ff/0x250 kasan_report+0xae/0x170 ? __pwq_activate_work+0x1ff/0x250 __pwq_activate_work+0x1ff/0x250 pwq_dec_nr_in_flight+0x8c5/0xfb0 process_one_work+0xc11/0x1460 ? __pfx_process_one_work+0x10/0x10 ? assign_work+0x16c/0x240 worker_thread+0x5ef/0xfd0 ? __pfx_worker_thread+0x10/0x10 kthread+0x3b0/0x770 ? __pfx_kthread+0x10/0x10 ? rcu_is_watching+0x11/0xb0 ? _raw_spin_unlock_irq+0x24/0x50 ? rcu_is_watching+0x11/0xb0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Allocated by task 147416: kasan_save_stack+0x2c/0x50 kasan_save_track+0x10/0x30 __kasan_kmalloc+0xa6/0xb0 alloc_work_entries+0xa9/0x260 [iw_cm] iw_cm_connect+0x23/0x4a0 [iw_cm] rdma_connect_locked+0xbfd/0x1920 [rdma_cm] nvme_rdma_cm_handler+0x8e5/0x1b60 [nvme_rdma] cma_cm_event_handler+0xae/0x320 [rdma_cm] cma_work_handler+0x106/0x1b0 [rdma_cm] process_one_work+0x84f/0x1460 worker_thread+0x5ef/0xfd0 kthread+0x3b0/0x770 ret_from_fork+0x30/0x70 ret_from_fork_asm+0x1a/0x30 Freed by task 147091: kasan_save_stack+0x2c/0x50 kasan_save_track+0x10/0x30 kasan_save_free_info+0x37/0x60 __kasan_slab_free+0x4b/0x70 kfree+0x13a/0x4b0 dealloc_work_entries+0x125/0x1f0 [iw_cm] iwcm_deref_id+0x6f/0xa0 [iw_cm] cm_work_handler+0x136/0x1ba0 [iw_cm] process_one_work+0x84f/0x1460 worker_thread+0x5ef/0xfd0 kthread+0x3b0/0x770 ret_from_fork+0x30/0x70 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x2c/0x50 kasan_record_aux_stack+0xa3/0xb0 __queue_work+0x2ff/0x1390 queue_work_on+0x67/0xc0 cm_event_handler+0x46a/0x820 [iw_cm] siw_cm_upcall+0x330/0x650 [siw] siw_cm_work_handler+0x6b9/0x2b20 [siw] process_one_work+0x84f/0x1460 worker_thread+0x5ef/0xfd0 kthread+0x3b0/0x770 ret_from_fork+0x30/0x70 ret_from_fork_asm+0x1a/0x30 This BUG is reproducible by repeating the blktests test case nvme/061 for the rdma transport and the siw driver. To avoid the use-after-free of cm_id_private work objects, ensure that the last reference to the cm_id is decremented not in the event handler works, but in the cm_id destruction context. For that purpose, move iwcm_deref_id() call from destroy_cm_id() to the callers of destroy_cm_id(). In iw_destroy_cm_id(), call iwcm_deref_id() after flushing the pending works. During the fix work, I noticed that iw_destroy_cm_id() is called from cm_work_handler() and process_event() context. However, the comment of iw_destroy_cm_id() notes that the function "cannot be called by the event thread". Drop the false comment. Closes: https://lore.kernel.org/linux-rdma/r5676e754sv35aq7cdsqrlnvyhiq5zktteaurl7vmfih35efko@z6lay7uypy3c/ Fixes: 59c68ac31e15 ("iw_cm: free cm_id resources on the last deref") Cc: stable@vger.kernel.org Signed-off-by: Shin'ichiro Kawasaki Link: https://patch.msgid.link/20250510101036.1756439-1-shinichiro.kawasaki@wdc.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 3f51b232c1da8e59eb562f1d81533334827a4799 Author: Fabrice Gasnier Date: Tue Apr 29 14:51:30 2025 +0200 pwm: stm32-lp: Add support for stm32mp25 Add support for STM32MP25 SoC. A new compatible has been added to the dt-bindings. It represents handle new features, registers and bits diversity. It isn't used currently in the driver, as matching is done by retrieving MFD parent data. New dedicated capture/compare channels has been added: e.g. a new compare register for channel 2. Some controls (polarity / cc channel enable) are handled in CCMR register on this new variant (instead of wavepol bit). So, Low-power timer can now have up to two PWM outputs. Use device data from the MFD parent to configure the number of PWM channels e.g. 'npwm'. Update current get_state() and apply() ops to support either: - one PWM channel (as on older revision, or LPTIM5 on STM32MP25) - two PWM channels (e.g. LPTIM1/2/3/4 on STM32MP25 that has the full feature set) Introduce new routines to manage common prescaler, reload register and global enable bit. Signed-off-by: Fabrice Gasnier Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250429125133.1574167-5-fabrice.gasnier@foss.st.com Signed-off-by: Lee Jones commit ee92656eba26d1b8b52704d32280b4de59b7f069 Author: Johannes Berg Date: Sun May 11 19:53:10 2025 +0300 wifi: iwlwifi: cfg: reduce configuration struct size We don't need the CORES() match nor jacket (which really doesn't even make sense to match to the RF anyway), and since the subdevice masks we care about are contiguous, we can encode them as highest and lowest bit set (automatically.) By encoding whether to match or not as separate flags and taking advantage of the limited range of the RF type, step and ID we can reduce the amount of memory needed for the table, while also making the logic (apart perhaps from the subdevice mask) easier to understand. This reduces the size of the module by about 1.5KiB on x86-64. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.38a805a7c96f.Ieece00476cea6054b0827cd075eb8ba5943373df@changeid commit 5414bc8c57c41038b1994cd21a2cc0b8415c1544 Author: Fabrice Gasnier Date: Tue Apr 29 14:51:29 2025 +0200 clocksource/drivers/stm32-lptimer: Add support for stm32mp25 On stm32mp25, DIER (former IER) must only be modified when the lptimer is enabled. On earlier SoCs, it must be only be modified when it is disabled. There's also a new DIEROK flag, to ensure register access has completed. Add a new "set_evt" routine to be used on stm32mp25, called depending on the version register, read by the MFD core (LPTIM_VERR). Signed-off-by: Patrick Delaunay Signed-off-by: Fabrice Gasnier Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20250429125133.1574167-4-fabrice.gasnier@foss.st.com Signed-off-by: Lee Jones commit 4f8ceb0302b36c5f78bcc8d0e7cfa2372fba134c Author: Fabrice Gasnier Date: Tue Apr 29 14:51:28 2025 +0200 mfd: stm32-lptimer: Add support for stm32mp25 Add support for STM32MP25 SoC. A new hardware configuration register (HWCFGR2) has been added, to gather number of capture/compare channels, autonomous mode and input capture capability. The full feature set is implemented in LPTIM1/2/3/4. LPTIM5 supports a smaller set of features. This can now be read from HWCFGR registers. Add new registers to the stm32-lptimer.h: CCMR1, CCR2, HWCFGR1/2 and VERR. Update the stm32_lptimer data struct so signal the number of capture/compare channels to the child devices. Also Remove some unused bit masks (CMPOK_ARROK / CMPOKCF_ARROKCF). Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20250429125133.1574167-3-fabrice.gasnier@foss.st.com Signed-off-by: Lee Jones commit 3f9ce9d0760ad68a9c20167664d026d91da66879 Author: Fabrice Gasnier Date: Tue Apr 29 14:51:27 2025 +0200 dt-bindings: mfd: stm32-lptimer: Add support for stm32mp25 Add a new stm32mp25 compatible to stm32-lptimer dt-bindings, to support STM32MP25 SoC. Some features has been updated or added to the low-power timer: - new capture compare channels - up to two PWM channels - PWM input capture - peripheral interconnect in stm32mp25 has been updated (new triggers). - registers/bits has been added or revisited (IER access). So introduce a new compatible to handle this diversity. Signed-off-by: Fabrice Gasnier Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250429125133.1574167-2-fabrice.gasnier@foss.st.com Signed-off-by: Lee Jones commit 85f8c2d56caf56aa3379bbc5f1a19fef9aabd23e Author: Nishanth Menon Date: Mon May 12 13:57:39 2025 -0500 ASoC: tlv320aic3x: Use dev_err_probe During probe the regulator supply drivers may not yet be available. Use dev_err_probe to provide just the pertinent log. Signed-off-by: Nishanth Menon Link: https://patch.msgid.link/20250512185739.2907466-1-nm@ti.com Signed-off-by: Mark Brown commit d26382bb852cd9020a276765d3f2695f2aa7f607 Author: Andre Przywara Date: Mon May 5 17:47:28 2025 +0100 dt-bindings: arm: sunxi: Add Liontron H-A133L board name The Liontron H-A133L is an industrial development board using the Allwinner A133 SoC. Add its compatible name to the list of valid board names. Signed-off-by: Andre Przywara Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250505164729.18175-3-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 9baa27a2e9fc746143ab686b6dbe2d515284a4c5 Author: Andre Przywara Date: Mon May 5 17:47:27 2025 +0100 dt-bindings: vendor-prefixes: Add Liontron name Liontron is a company based in Shenzen, China, making industrial development boards and embedded computers, mostly using Rockchip and Allwinner SoCs. Add their name to the list of vendors. Signed-off-by: Andre Przywara Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250505164729.18175-2-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit d010f85f1acf7b109646de9f1812128289bd2414 Author: Michael Klein Date: Thu May 8 19:36:56 2025 +0200 ARM: dts: bananapi: add support for PHY LEDs The RTL8211E ethernet PHY driver has recently gained support for controlling PHY LEDs via /sys/class/leds. The Bananapi M1 has three LEDs connected to the RTL8211E PHY. Add the corresponding nodes to the device tree. Signed-off-by: Michael Klein Link: https://patch.msgid.link/20250508173657.8695-1-michael@fossekall.de Signed-off-by: Chen-Yu Tsai commit 1a176b25f5d6f00c6c44729c006379b9a6dbc703 Author: Hans Zhang <18255117159@163.com> Date: Sun May 11 00:07:10 2025 +0800 PCI: cadence: Simplify J721e link status check Replace explicit if-else condition with direct return statement in j721e_pcie_link_up(). This reduces code verbosity while maintaining the same logic for detecting PCIe link completion. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250510160710.392122-4-18255117159@163.com commit 0a9d6a3d0fd1650b9ee00bc8150828e19cadaf23 Author: Hans Zhang <18255117159@163.com> Date: Sun May 11 00:07:09 2025 +0800 PCI: mobiveil: Return bool from link up check PCIe link status check is supposed to return a boolean to indicate whether the link is up or not. So update ls_g4_pcie_link_up() to return bool and also simplify the LTSSM state check. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: commit message rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250510160710.392122-3-18255117159@163.com commit ac4d1baf97fdaa6ef789273f0fd485c0d0d6f100 Merge: e39d14a760c039 2f1a805f32ba37 Author: Paolo Abeni Date: Tue May 13 11:13:05 2025 +0200 Merge branch 'device-memory-tcp-tx' Mina Almasry says: ==================== Device memory TCP TX The TX path had been dropped from the Device Memory TCP patch series post RFCv1 [1], to make that series slightly easier to review. This series rebases the implementation of the TX path on top of the net_iov/netmem framework agreed upon and merged. The motivation for the feature is thoroughly described in the docs & cover letter of the original proposal, so I don't repeat the lengthy descriptions here, but they are available in [1]. Full outline on usage of the TX path is detailed in the documentation included with this series. Test example is available via the kselftest included in the series as well. The series is relatively small, as the TX path for this feature largely piggybacks on the existing MSG_ZEROCOPY implementation. Patch Overview: --------------- 1. Documentation & tests to give high level overview of the feature being added. 1. Add netmem refcounting needed for the TX path. 2. Devmem TX netlink API. 3. Devmem TX net stack implementation. 4. Make dma-buf unbinding scheduled work to handle TX cases where it gets freed from contexts where we can't sleep. 5. Add devmem TX documentation. 6. Add scaffolding enabling driver support for netmem_tx. Add helpers, driver feature flag, and docs to enable drivers to declare netmem_tx support. 7. Guard netmem_tx against being enabled against drivers that don't support it. 8. Add devmem_tx selftests. Add TX path to ncdevmem and add a test to devmem.py. Testing: -------- Testing is very similar to devmem TCP RX path. The ncdevmem test used for the RX path is now augemented with client functionality to test TX path. * Test Setup: Kernel: net-next with this RFC and memory provider API cherry-picked locally. Hardware: Google Cloud A3 VMs. NIC: GVE with header split & RSS & flow steering support. Performance results are not included with this version, unfortunately. I'm having issues running the dma-buf exporter driver against the upstream kernel on my test setup. The issues are specific to that dma-buf exporter and do not affect this patch series. I plan to follow up this series with perf fixes if the tests point to issues once they're up and running. Special thanks to Stan who took a stab at rebasing the TX implementation on top of the netmem/net_iov framework merged. Parts of his proposal [2] that are reused as-is are forked off into their own patches to give full credit. [1] https://lore.kernel.org/netdev/20240909054318.1809580-1-almasrymina@google.com/ [2] https://lore.kernel.org/netdev/20240913150913.1280238-2-sdf@fomichev.me/T/#m066dd407fbed108828e2c40ae50e3f4376ef57fd Cc: sdf@fomichev.me Cc: asml.silence@gmail.com Cc: dw@davidwei.uk Cc: Jamal Hadi Salim Cc: Victor Nogueira Cc: Pedro Tammela Cc: Samiullah Khawaja Cc: Kuniyuki Iwashima v14: https://lore.kernel.org/netdev/20250429032645.363766-1-almasrymina@google.com/ v13: https://lore.kernel.org/netdev/20250425204743.617260-1-almasrymina@google.com/ v12: https://lore.kernel.org/netdev/20250423031117.907681-1-almasrymina@google.com/ v11: https://lore.kernel.org/netdev/20250423031117.907681-1-almasrymina@google.com/ v10: https://lore.kernel.org/netdev/20250417231540.2780723-1-almasrymina@google.com/ v9: https://lore.kernel.org/netdev/20250415224756.152002-1-almasrymina@google.com/ v8: https://lore.kernel.org/netdev/20250308214045.1160445-1-almasrymina@google.com/ v7: https://lore.kernel.org/netdev/20250227041209.2031104-1-almasrymina@google.com/ v6: https://lore.kernel.org/netdev/20250222191517.743530-1-almasrymina@google.com/ v5: https://lore.kernel.org/netdev/20250220020914.895431-1-almasrymina@google.com/ v4: https://lore.kernel.org/netdev/20250203223916.1064540-1-almasrymina@google.com/ v3: https://patchwork.kernel.org/project/netdevbpf/list/?series=929401&state=* RFC v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=920056&state=* ==================== Link: https://patch.msgid.link/20250508004830.4100853-1-almasrymina@google.com Signed-off-by: Paolo Abeni commit f46bfb1d3c6a601caad90eb3c11a1e1e17cccb1a Author: Hans Zhang <18255117159@163.com> Date: Sun May 11 00:07:08 2025 +0800 PCI: dwc: Return bool from link up check PCIe link status check is supposed to return a boolean to indicate whether the link is up or not. So, modify the link_up callbacks and dw_pcie_link_up() function to return bool instead of int. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: commit message reword] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250510160710.392122-2-18255117159@163.com commit 2f1a805f32ba37545209a7ddbf0845ac8802dfe9 Author: Mina Almasry Date: Thu May 8 00:48:29 2025 +0000 selftests: ncdevmem: Implement devmem TCP TX Add support for devmem TX in ncdevmem. This is a combination of the ncdevmem from the devmem TCP series RFCv1 which included the TX path, and work by Stan to include the netlink API and refactored on top of his generic memory_provider support. Signed-off-by: Mina Almasry Signed-off-by: Stanislav Fomichev Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-10-almasrymina@google.com Signed-off-by: Paolo Abeni commit ae28cb114727dd599689725c27fb1c45627094ba Author: Mina Almasry Date: Thu May 8 00:48:28 2025 +0000 net: check for driver support in netmem TX We should not enable netmem TX for drivers that don't declare support. Check for driver netmem TX support during devmem TX binding and fail if the driver does not have the functionality. Check for driver support in validate_xmit_skb as well. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-9-almasrymina@google.com Signed-off-by: Paolo Abeni commit c32532670cec6d359e84c202d9d16bf948bebb78 Author: Mina Almasry Date: Thu May 8 00:48:27 2025 +0000 gve: add netmem TX support to GVE DQO-RDA mode Use netmem_dma_*() helpers in gve_tx_dqo.c DQO-RDA paths to enable netmem TX support in that mode. Declare support for netmem TX in GVE DQO-RDA mode. Signed-off-by: Mina Almasry Acked-by: Harshitha Ramamurthy Link: https://patch.msgid.link/20250508004830.4100853-8-almasrymina@google.com Signed-off-by: Paolo Abeni commit 383faec0fd64b9bff15eb5f700f023ec35520a96 Author: Mina Almasry Date: Thu May 8 00:48:26 2025 +0000 net: enable driver support for netmem TX Drivers need to make sure not to pass netmem dma-addrs to the dma-mapping API in order to support netmem TX. Add helpers and netmem_dma_*() helpers that enables special handling of netmem dma-addrs that drivers can use. Document in netmem.rst what drivers need to do to support netmem TX. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-7-almasrymina@google.com Signed-off-by: Paolo Abeni commit 17af8cc06a5a302f22994e765ddb7268373ad1db Author: Mina Almasry Date: Thu May 8 00:48:25 2025 +0000 net: add devmem TCP TX documentation Add documentation outlining the usage and details of the devmem TCP TX API. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-6-almasrymina@google.com Signed-off-by: Paolo Abeni commit bd61848900bff597764238f3a8ec67c815cd316e Author: Mina Almasry Date: Thu May 8 00:48:24 2025 +0000 net: devmem: Implement TX path Augment dmabuf binding to be able to handle TX. Additional to all the RX binding, we also create tx_vec needed for the TX path. Provide API for sendmsg to be able to send dmabufs bound to this device: - Provide a new dmabuf_tx_cmsg which includes the dmabuf to send from. - MSG_ZEROCOPY with SCM_DEVMEM_DMABUF cmsg indicates send from dma-buf. Devmem is uncopyable, so piggyback off the existing MSG_ZEROCOPY implementation, while disabling instances where MSG_ZEROCOPY falls back to copying. We additionally pipe the binding down to the new zerocopy_fill_skb_from_devmem which fills a TX skb with net_iov netmems instead of the traditional page netmems. We also special case skb_frag_dma_map to return the dma-address of these dmabuf net_iovs instead of attempting to map pages. The TX path may release the dmabuf in a context where we cannot wait. This happens when the user unbinds a TX dmabuf while there are still references to its netmems in the TX path. In that case, the netmems will be put_netmem'd from a context where we can't unmap the dmabuf, Resolve this by making __net_devmem_dmabuf_binding_free schedule_work'd. Based on work by Stanislav Fomichev . A lot of the meat of the implementation came from devmem TCP RFC v1[1], which included the TX path, but Stan did all the rebasing on top of netmem/net_iov. Cc: Stanislav Fomichev Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-5-almasrymina@google.com Signed-off-by: Paolo Abeni commit 8802087d20c0e1c26c4b4fe30e22264bf8285e51 Author: Stanislav Fomichev Date: Thu May 8 00:48:23 2025 +0000 net: devmem: TCP tx netlink api Add bind-tx netlink call to attach dmabuf for TX; queue is not required, only ifindex and dmabuf fd for attachment. Signed-off-by: Stanislav Fomichev Signed-off-by: Mina Almasry Link: https://patch.msgid.link/20250508004830.4100853-4-almasrymina@google.com Signed-off-by: Paolo Abeni commit e9f3d61db5cb29b3f17f0dc40c3ec2cda2ee93e5 Author: Mina Almasry Date: Thu May 8 00:48:22 2025 +0000 net: add get_netmem/put_netmem support Currently net_iovs support only pp ref counts, and do not support a page ref equivalent. This is fine for the RX path as net_iovs are used exclusively with the pp and only pp refcounting is needed there. The TX path however does not use pp ref counts, thus, support for get_page/put_page equivalent is needed for netmem. Support get_netmem/put_netmem. Check the type of the netmem before passing it to page or net_iov specific code to obtain a page ref equivalent. For dmabuf net_iovs, we obtain a ref on the underlying binding. This ensures the entire binding doesn't disappear until all the net_iovs have been put_netmem'ed. We do not need to track the refcount of individual dmabuf net_iovs as we don't allocate/free them from a pool similar to what the buddy allocator does for pages. This code is written to be extensible by other net_iov implementers. get_netmem/put_netmem will check the type of the netmem and route it to the correct helper: pages -> [get|put]_page() dmabuf net_iovs -> net_devmem_[get|put]_net_iov() new net_iovs -> new helpers Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250508004830.4100853-3-almasrymina@google.com Signed-off-by: Paolo Abeni commit 03e96b8c11d140fb4ead0b30c2d6e1a294b501ef Author: Mina Almasry Date: Thu May 8 00:48:21 2025 +0000 netmem: add niov->type attribute to distinguish different net_iov types Later patches in the series adds TX net_iovs where there is no pp associated, so we can't rely on niov->pp->mp_ops to tell what is the type of the net_iov. Add a type enum to the net_iov which tells us the net_iov type. Signed-off-by: Mina Almasry Link: https://patch.msgid.link/20250508004830.4100853-2-almasrymina@google.com Signed-off-by: Paolo Abeni commit eef5bccfb1b7751ce5368739ec0b1b1d14849552 Author: Shenghao Ding Date: Tue May 13 16:59:47 2025 +0800 ALSA: hda/tas2781: Fix the ld issue reported by kernel test robot After commit 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB")created a separated lib for i2c, However, tasdevice_remove() used for not only for I2C but for SPI being still in that lib caused ld issue. All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: tasdevice_remove >>> referenced by tas2781_hda.c:33 (sound/pci/hda/tas2781_hda.c:33) >>> vmlinux.o:(tas2781_hda_remove) To fix this issue, the implementation of tasdevice_remove was moved from tas2781-comlib-i2c.c to tas2781-comlib.c. Fixes: 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB") Reported-by: kernel test robot Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202505111855.FP2fScKA-lkp@intel.com/__;!!G3vK!U-wdsvrOG1iezggZ55RYi8ikBxMaJD Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250513085947.1121-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit 6f174daebe59a0cadbecd793182b0d3ce4e912c1 Author: Shenghao Ding Date: Tue May 13 15:17:21 2025 +0800 ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot After commit 28a09d9e42c5 ("ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver") created a separated lib for both hda-i2c and hda-spi driver, which caused this issue. sparse warnings: (new ones prefixed by >>) >> sound/pci/hda/tas2781_hda_spi.c:496:25: sparse: sparse: symbol 'tas2781_snd_ctls' was not declared. Should it be static? >> sound/pci/hda/tas2781_hda_spi.c:505:25: sparse: sparse: symbol 'tas2781_prof_ctl' was not declared. Should it be static? >> sound/pci/hda/tas2781_hda_spi.c:512:25: sparse: sparse: symbol 'tas2781_dsp_ctls' was not declared. Should it be static? Fixes: 28a09d9e42c5 ("ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver") Reported-by: kernel test robot Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202505130420.vr9yDI3k-lkp@intel.com/__;!!G3vK!URphGMMfZ2erCLfJdETofl0O1mTSydDLLJ6inMIYWYUDUKYef_IuLvI7pnYj3Mx-4LRIi4BJEw$ Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250513071721.1090-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit e088806cf5f536012d1a1786b1feedd4a1507c64 Author: Thorsten Blum Date: Mon May 12 12:57:41 2025 +0200 ALSA: sb: Replace deprecated strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250512105754.35595-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit c4070e1996e05dd2eb5e08ee68d0d00553ae08f7 Merge: 7d40efd67dd313 6f5bf947bab06f Author: Ingo Molnar Date: Tue May 13 10:47:10 2025 +0200 Merge commit 'its-for-linus-20250509-merge' into x86/core, to resolve conflicts Conflicts: Documentation/admin-guide/hw-vuln/index.rst arch/x86/include/asm/cpufeatures.h arch/x86/kernel/alternative.c arch/x86/kernel/cpu/bugs.c arch/x86/kernel/cpu/common.c drivers/base/cpu.c include/linux/cpu.h Signed-off-by: Ingo Molnar commit 7d40efd67dd313826a12dc4b03635ece97bb6d04 Merge: d6680b0077af6a ab8131028710d0 Author: Ingo Molnar Date: Tue May 13 10:46:22 2025 +0200 Merge branch 'x86/platform' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit d6680b0077af6a86cc28d2ac8bd7fa224d7f3b0b Merge: 1f82e8e1ca18aa f2e01dcf6df2d1 Author: Ingo Molnar Date: Tue May 13 10:46:04 2025 +0200 Merge branch 'x86/nmi' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit 1f82e8e1ca18aa0b020538a3f227f5d56382638e Merge: 34be751998c140 9cf78722003178 Author: Ingo Molnar Date: Tue May 13 10:42:06 2025 +0200 Merge branch 'x86/msr' into x86/core, to resolve conflicts Conflicts: arch/x86/boot/startup/sme.c arch/x86/coco/sev/core.c arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/xstate.c Semantic conflict: arch/x86/include/asm/sev-internal.h Signed-off-by: Ingo Molnar commit 34be751998c1407a460efe3a20f9c4ddb8c82b9f Merge: 69cb33e2f81a32 1b3f2bd04d90f6 Author: Ingo Molnar Date: Tue May 13 10:39:22 2025 +0200 Merge branch 'x86/mm' into x86/core, to resolve conflicts Conflicts: arch/x86/mm/numa.c arch/x86/mm/pgtable.c Signed-off-by: Ingo Molnar commit 69cb33e2f81a3265383f0c8bbd27c32b4a5a6bf3 Merge: ec8f353f5262ac 4804f5ad5d63cf Author: Ingo Molnar Date: Tue May 13 10:37:52 2025 +0200 Merge branch 'x86/microcode' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit ec8f353f5262acff120a0dc83b714d899ee94b7f Merge: 2fb8414e644b13 32d5fa804dc9bd Author: Ingo Molnar Date: Tue May 13 10:37:29 2025 +0200 Merge branch 'x86/fpu' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit 2fb8414e644b133a9c3250f408232af99da256a4 Merge: 821f82125c4721 c1ab4ce3cb759f Author: Ingo Molnar Date: Tue May 13 10:37:01 2025 +0200 Merge branch 'x86/cpu' into x86/core, to resolve conflicts Conflicts: arch/x86/kernel/cpu/bugs.c Signed-off-by: Ingo Molnar commit 821f82125c47217390099532b09bd09cee9adaac Merge: 206c07d6ab88e0 ed4d95d033e359 Author: Ingo Molnar Date: Tue May 13 10:35:27 2025 +0200 Merge branch 'x86/boot' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit 206c07d6ab88e0bb02e7c0dc134b38f7973e968b Merge: fa6b90ee4fb131 1f4bb068b498a5 Author: Ingo Molnar Date: Tue May 13 10:35:14 2025 +0200 Merge branch 'x86/bugs' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit fa6b90ee4fb13178f0b4e2109ab9e12daa9220c4 Merge: 11d8f542d91370 4b626015e1bf11 Author: Ingo Molnar Date: Tue May 13 10:35:00 2025 +0200 Merge branch 'x86/asm' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit 11d8f542d9137027440001b075da60a59c7871cb Merge: 82f2b0b97b36ee 7f9958230d8a79 Author: Ingo Molnar Date: Tue May 13 10:32:24 2025 +0200 Merge branch 'x86/alternatives' into x86/core, to merge dependent commits Prepare to resolve conflicts with an upstream series of fixes that conflict with pending x86 changes: 6f5bf947bab0 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar commit 598995027b9181ada81789bf01fb8ef30d93c9dc Author: Peter Griffin Date: Tue May 6 21:57:31 2025 +0100 soc: samsung: exynos-pmu: enable CPU hotplug support for gs101 Some additional register writes are required when hotplugging CPUs on gs101, without these the system hangs when hotplugging. Specifically a CPU_INFORM register needs to be programmed with a hint value which is used by the EL3 firmware (el3mon) and the pmu-intr-gen registers need to be programmed. With this patch applied, and corresponding DT update CPU hotplug now works as expected. e.g. echo 0 > /sys/devices/system/cpu/cpu6/online echo 1 > /sys/devices/system/cpu/cpu6/online Note: to maintain compatibility with older DTs that didn't specify pmu-intr-gen phandle only a warning is issued if the syscon can't be obtained. Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250506-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v4-5-9f64a2657316@linaro.org [krzk: few blank line and white-space alignment fixes from checkpatch] Signed-off-by: Krzysztof Kozlowski commit aaf02428fdd50b818c77644bc0b8a0b282ce8ea4 Author: Peter Griffin Date: Tue May 6 21:57:30 2025 +0100 arm64: dts: exynos: gs101: add pmu-intr-gen syscon node Add syscon node for the PMU Interrupt Generation registers. Additionally update the exynos-pmu node to provide a phandle to pmu-intr-gen syscon. These registers are required for CPU hotplug to be functional. Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250506-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v4-4-9f64a2657316@linaro.org Signed-off-by: Krzysztof Kozlowski commit 20adeaca8bc6a084f2610e7c89a8601c9904a0e2 Author: Peter Griffin Date: Tue May 6 21:57:29 2025 +0100 MAINTAINERS: Add google,gs101-pmu-intr-gen.yaml binding file Add the newly added google,gs101-pmu-intr-gen.yaml file to the Tensor section. Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250506-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v4-3-9f64a2657316@linaro.org Signed-off-by: Krzysztof Kozlowski commit 83b66cdb5d5b6aa4ed1f085b3b2f917af0c2890b Author: Peter Griffin Date: Tue May 6 21:57:28 2025 +0100 dt-bindings: soc: samsung: exynos-pmu: gs101: add google,pmu-intr-gen phandle gs101 requires access to the pmu interrupt generation register region which is exposed as a syscon. Update the exynos-pmu bindings documentation to reflect this. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250506-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v4-2-9f64a2657316@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0475b0d8a1e0f80a47536dfb19c28dc4bb6adc05 Author: Peter Griffin Date: Tue May 6 21:57:27 2025 +0100 dt-bindings: soc: google: Add gs101-pmu-intr-gen binding documentation Add bindings documentation for the Power Management Unit (PMU) interrupt generator. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250506-contrib-pg-cpu-hotplug-suspend2ram-fixes-v1-v4-1-9f64a2657316@linaro.org Signed-off-by: Krzysztof Kozlowski commit 47af06c9d31fe558493de4e04f9a07847dc4992f Author: Andy Shevchenko Date: Fri May 9 18:46:42 2025 +0300 genirq: Consistently use '%u' format specifier for unsigned int variables There are three cases in the genirq code when the irq, as an unsigned integer variable, is converted to text representation by sprintf(). In two cases it uses '%d' specifier which is for signed values. While it's not a problem right now, potentially it might be in the future in case too big (> INT_MAX) number will appear there. Consistently use '%u' format specifier for @irq which is declared as unsigned int in all these cases. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250509154643.1499171-1-andriy.shevchenko@linux.intel.com commit b5fcb6898202858ae8425bf0cd9cb5704735bd02 Author: Nathan Chancellor Date: Tue May 13 00:16:55 2025 +0200 genirq: Ensure flags in lock guard is consistently initialized After the conversion to locking guards within the interrupt core code, several builds with clang show the "Interrupts were enabled early" WARN() in start_kernel() on boot. In class_irqdesc_lock_constructor(), _t.flags is initialized via __irq_get_desc_lock() within the _t initializer list. However, the C11 standard 6.7.9.23 states that the evaluation of the initialization list expressions are indeterminately sequenced relative to one another, meaning _t.flags could be initialized by __irq_get_desc_lock() then be initialized to zero due to flags being absent from the initializer list. To ensure _t.flags is consistently initialized, move the call to __irq_get_desc_lock() and the assignment of its result to _t.lock out of the designated initializer. Fixes: 0f70a49f3fa3 ("genirq: Provide conditional lock guards") Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Gleixner Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/all/20250513-irq-guards-fix-flags-init-v1-1-1dca3f5992d6@kernel.org commit 0aa7b390fc40a871267a2328bbbefca8b37ad307 Author: Alexander Usyskin Date: Thu Apr 24 16:25:25 2025 +0300 mtd: core: always create master device Create master device without partition when CONFIG_MTD_PARTITIONED_MASTER flag is unset. This streamlines device tree and allows to anchor runtime power management on master device in all cases. Signed-off-by: Alexander Usyskin Signed-off-by: Miquel Raynal commit 678927c0c96bc94043d73526def00a73371c46d0 Author: Petr Vaněk Date: Mon May 12 13:08:27 2025 +0200 Documentation: fix typo in root= kernel parameter description Fixes a typo in the root= parameter description, changing "this a a" to "this is a". Fixes: c0c1a7dcb6f5 ("init: move the nfs/cifs/ram special cases out of name_to_dev_t") Signed-off-by: Petr Vaněk Link: https://lore.kernel.org/20250512110827.32530-1-arkamar@atlas.cz Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit fe488d34edc4042f70d62dfd5d640c9fb11fc84e Author: Vishal Moola (Oracle) Date: Tue Apr 29 18:00:59 2025 -0700 mm/gup: remove page_folio() in memfd_pin_folios() We can get the folio directly from the folio batch, so remove the unnecessary page_folio() call. Link: https://lkml.kernel.org/r/20250430010059.892632-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: David Hildenbrand Acked-by: Vivek Kasireddy Signed-off-by: Andrew Morton commit 30f62b92e632d13420381f54210ad9d84d79b209 Author: Vishal Moola (Oracle) Date: Tue Apr 29 18:00:58 2025 -0700 mm/gup: remove unnecessary check in memfd_pin_folios() Patch series "mm/gup: Cleanup memfd_pin_folios()". A couple straightforward cleanups to memfd_pin_folios() found through code inspection. Saves 124 bytes of kernel text overall and makes the code more readable. This patch (of 2): Commit 89c1905d9c14 ("mm/gup: introduce memfd_pin_folios() for pinning memfd folios") checks if filemap_get_folios_contig() returned duplicate folios to prevent multiple attempts at pinning the same folio. Commit 8ab1b1602396 ("mm: fix filemap_get_folios_contig returning batches of identical folios") ensures that filemap_get_folios_contig() returns a batch of distinct folios. We can remove the duplicate folio check to simplify the code and save 58 bytes of text. Link: https://lkml.kernel.org/r/20250430010059.892632-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20250430010059.892632-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: David Hildenbrand Cc: Vivek Kasireddy Signed-off-by: Andrew Morton commit dd309bfc68efc4522b4d33a95e92afff249e103b Author: Kairui Song Date: Thu May 1 02:10:52 2025 +0800 mm, swap: remove no longer used swap mapping helper This helper existed to fix the circular header dependency issue but it is no longer used since commit 0d40cfe63a2f ("fs: remove folio_file_mapping()"), remove it. Link: https://lkml.kernel.org/r/20250430181052.55698-7-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Cc: Chao Yu Cc: Chris Li Cc: Chris Mason Cc: Christian Brauner Cc: David Sterba Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Jaegeuk Kim Cc: Joanne Koong Cc: Johannes Weiner Cc: Josef Bacik Cc: Miklos Szeredi Cc: Nhat Pham Cc: Qu Wenruo Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 7d0f0f06153116bb737eef76d47406639e161613 Author: Kairui Song Date: Thu May 1 02:10:51 2025 +0800 mm: move folio_index to mm/swap.h and remove no longer needed helper There are no remaining users of folio_index() outside the mm subsystem. Move it to mm/swap.h to co-locate it with swap_cache_index(), eliminating a forward declaration, and a function call overhead. Also remove the helper that was used to fix circular header dependency issue. Link: https://lkml.kernel.org/r/20250430181052.55698-6-ryncsn@gmail.com Signed-off-by: Kairui Song Acked-by: David Hildenbrand Cc: Chao Yu Cc: Chris Li Cc: Chris Mason Cc: Christian Brauner Cc: David Sterba Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Jaegeuk Kim Cc: Joanne Koong Cc: Johannes Weiner Cc: Josef Bacik Cc: Matthew Wilcox (Oracle) Cc: Miklos Szeredi Cc: Nhat Pham Cc: Qu Wenruo Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 2b80f633c360ce3c56a7071782eae70852c8f344 Author: Kairui Song Date: Thu May 1 02:10:50 2025 +0800 filemap: do not use folio_contains for swap cache folios Currently, none of the folio_contains callers should encounter swap cache folios. For fs/ callers, swap cache folios are never part of their workflow. For filemap and truncate, folio_contains is only used for sanity checks to verify the folio index matches the expected lookup / invalidation target. The swap cache does not utilize filemap or truncate helpers in ways that would trigger these checks, as it mostly implements its own cache management. Shmem won't trigger these sanity checks either unless thing went wrong, as it would directly trigger a BUG because swap cache index are unrelated and almost never matches shmem index. Shmem have to handle mixed values of folios, shadows, and swap entries, so it has its own way of handling the mapping. While some filemap helpers works for swap cache space, the swap cache is different from the page cache in many ways. So this particular helper will unlikely to work in a helpful way for swap cache folios. So make it explicit here that folio_contains should not be used for swap cache folios. This helps to avoid misuse, make swap cache less exposed and remove the folio_index usage here. [akpm@linux-foundation.org: s/VM_WARN_ON_FOLIO/VM_WARN_ON_ONCE_FOLIO/, per Kairui] Link: https://lkml.kernel.org/r/20250430181052.55698-5-ryncsn@gmail.com Signed-off-by: Kairui Song Acked-by: David Hildenbrand Cc: Chao Yu Cc: Chris Li Cc: Chris Mason Cc: Christian Brauner Cc: David Sterba Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Jaegeuk Kim Cc: Joanne Koong Cc: Johannes Weiner Cc: Josef Bacik Cc: Matthew Wilcox (Oracle) Cc: Miklos Szeredi Cc: Nhat Pham Cc: Qu Wenruo Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit fe15ec0464319966c289b50118c3a3995435be52 Author: Kairui Song Date: Thu May 1 02:10:49 2025 +0800 f2fs: drop usage of folio_index folio_index is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio->index instead. It can't be a swap cache folio here. Swap mapping may only call into fs through `swap_rw` but f2fs does not use that method for swap. Link: https://lkml.kernel.org/r/20250430181052.55698-4-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Chao Yu Cc: Jaegeuk Kim Cc: Chris Li Cc: Chris Mason Cc: Christian Brauner Cc: David Sterba Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Joanne Koong Cc: Johannes Weiner Cc: Josef Bacik Cc: Miklos Szeredi Cc: Nhat Pham Cc: Qu Wenruo Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 74e6ee62a894be418ca80f3298069c2eae704cc5 Author: Kairui Song Date: Thu May 1 02:10:47 2025 +0800 fuse: drop usage of folio_index Patch series "mm, swap: clean up swap cache mapping helper", v3. This series removes usage of folio_index usage in fs/, and remove swap cache checking in folio_contains. Currently, the swap cache is already no longer directly exposed to fs, and swap cache will be more different from page cache. Clean up the helpers first to simplify the code and eliminate the helpers used for resolving circular header dependency issue between filemap and swap headers, and prepare for further changes. This patch (of 6): folio_index is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio->index instead. It can't be a swap cache folio here. Swap mapping may only call into fs through `swap_rw` but fuse does not use that method for SWAP. Link: https://lkml.kernel.org/r/20250430181052.55698-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20250430181052.55698-2-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Miklos Szeredi Cc: Joanne Koong Cc: Josef Bacik Cc: Chris Li Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Johannes Weiner Cc: Nhat Pham Cc: Yosry Ahmed Cc: Christian Brauner Cc: Chao Yu Cc: Chris Mason Cc: David Sterba Cc: Jaegeuk Kim Cc: Qu Wenruo Signed-off-by: Andrew Morton commit f1c2bca2677b78c66edd1db010fd79d4a08e7146 Author: Christoph Hellwig Date: Wed May 7 07:16:20 2025 +0200 xarray: fix kerneldoc for __xa_cmpxchg Fix the documentation for __xa_cmpxchg to actually describe the cmpxch-like semantics correctly, based on the version for xa_cmpxchg. Link: https://lkml.kernel.org/r/20250507051656.3900864-1-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 5ec56c1cb651eb70ab2cfc92264c82c3a6d584dc Author: Thushara.M.S Date: Mon May 5 14:29:12 2025 -0700 docs/mm/damon/design: fix spelling mistake The word accuracy was misspelled as "accruracy". Signed-off-by: Thushara.M.S Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 3592a86a2b6be115000b82af78fe7f96fbc658a4 Author: Gregory Price Date: Thu Apr 10 10:28:31 2025 -0400 DAX: warn when kmem regions are truncated for memory block alignment Device capacity intended for use as system ram should be aligned to the architecture-defined memory block size or that capacity will be silently truncated and capacity stranded. As hotplug dax memory becomes more prevelant, the memory block size alignment becomes more important for platform and device vendors to pay attention to - so this truncation should not be silent. This issue is particularly relevant for CXL Dynamic Capacity devices, whose capacity may arrive in spec-aligned but block-misaligned chunks. Link: https://lkml.kernel.org/r/20250410142831.217887-1-gourry@gourry.net Suggested-by: David Hildenbrand Suggested-by: Dan Williams Reviewed-by: Dan Williams Tested-by: Alison Schofield Reviewed-by: Jonathan Cameron Acked-by: David Hildenbrand Signed-off-by: Gregory Price Cc: Dave Jiang Cc: Vishal Verma Signed-off-by: Andrew Morton commit 69eadd6a05409ca3725cabf8d60ccf6c8f87e193 Author: Guilherme Giacomo Simoes Date: Mon Apr 28 17:14:09 2025 -0300 mm: page-flags-layout.h: change the KASAN_TAG_WIDTH for HW_TAGS KASAN_TAG_WIDTH is 8 bits for both (HW_TAGS and SW_TAGS), but for HW_TAGS the KASAN_TAG_WIDTH can be 4 bits bits because due to the design of the MTE the memory words for storing metadata only need 4 bits. Change the preprocessor define KASAN_TAG_WIDTH for check if SW_TAGS is define, so KASAN_TAG_WIDTH should be 8 bits, but if HW_TAGS is define, so KASAN_TAG_WIDTH should be 4 bits to save a few flags bits. Link: https://lkml.kernel.org/r/20250428201409.5482-1-trintaeoitogc@gmail.com Signed-off-by: Guilherme Giacomo Simoes Suggested-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Cc: Pasha Tatashin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 3e43e260f1e44d21861815faa905a1829027600f Author: Lorenzo Stoakes Date: Mon Apr 28 16:28:17 2025 +0100 mm: perform VMA allocation, freeing, duplication in mm Right now these are performed in kernel/fork.c which is odd and a violation of separation of concerns, as well as preventing us from integrating this and related logic into userland VMA testing going forward. There is a fly in the ointment - nommu - mmap.c is not compiled if CONFIG_MMU not set, and neither is vma.c. To square the circle, let's add a new file - vma_init.c. This will be compiled for both CONFIG_MMU and nommu builds, and will also form part of the VMA userland testing. This allows us to de-duplicate code, while maintaining separation of concerns and the ability for us to userland test this logic. Update the VMA userland tests accordingly, additionally adding a detach_free_vma() helper function to correctly detach VMAs before freeing them in test code, as this change was triggering the assert for this. [akpm@linux-foundation.org: remove stray newline, per Liam] Link: https://lkml.kernel.org/r/f97b3a85a6da0196b28070df331b99e22b263be8.1745853549.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Reviewed-by: Pedro Falcato Reviewed-by: David Hildenbrand Reviewed-by: Kees Cook Reviewed-by: Suren Baghdasaryan Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Signed-off-by: Andrew Morton commit 26a8f57760c12ccd860b36ac5b73daede4396aa3 Author: Lorenzo Stoakes Date: Mon Apr 28 16:28:16 2025 +0100 mm: move dup_mmap() to mm This is a key step in our being able to abstract and isolate VMA allocation and destruction logic. This function is the last one where vm_area_free() and vm_area_dup() are directly referenced outside of mmap, so having this in mm allows us to isolate these. We do the same for the nommu version which is substantially simpler. We place the declaration for dup_mmap() in mm/internal.h and have kernel/fork.c import this in order to prevent improper use of this functionality elsewhere in the kernel. While we're here, we remove the useless #ifdef CONFIG_MMU check around mmap_read_lock_maybe_expand() in mmap.c, mmap.c is compiled only if CONFIG_MMU is set. Link: https://lkml.kernel.org/r/e49aad3d00212f5539d9fa5769bfda4ce451db3e.1745853549.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Suggested-by: Pedro Falcato Reviewed-by: Pedro Falcato Reviewed-by: Liam R. Howlett Reviewed-by: Suren Baghdasaryan Reviewed-by: David Hildenbrand Reviewed-by: Kees Cook Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Signed-off-by: Andrew Morton commit dd7a6246f4fd6e8a6dcb08f1f51c899f3e0d3b83 Author: Lorenzo Stoakes Date: Mon Apr 28 16:28:15 2025 +0100 mm: abstract initial stack setup to mm subsystem There are peculiarities within the kernel where what is very clearly mm code is performed elsewhere arbitrarily. This violates separation of concerns and makes it harder to refactor code to make changes to how fundamental initialisation and operation of mm logic is performed. One such case is the creation of the VMA containing the initial stack upon execve()'ing a new process. This is currently performed in __bprm_mm_init() in fs/exec.c. Abstract this operation to create_init_stack_vma(). This allows us to limit use of vma allocation and free code to fork and mm only. We previously did the same for the step at which we relocate the initial stack VMA downwards via relocate_vma_down(), now we move the initial VMA establishment too. Take the opportunity to also move insert_vm_struct() to mm/vma.c as it's no longer needed anywhere outside of mm. Link: https://lkml.kernel.org/r/118c950ef7a8dd19ab20a23a68c3603751acd30e.1745853549.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand Reviewed-by: Suren Baghdasaryan Reviewed-by: Liam R. Howlett Reviewed-by: Pedro Falcato Reviewed-by: Kees Cook Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Signed-off-by: Andrew Morton commit 6c36ac1e124f1be97cf0485a220865fce5a2020d Author: Lorenzo Stoakes Date: Mon Apr 28 16:28:14 2025 +0100 mm: establish mm/vma_exec.c for shared exec/mm VMA functionality Patch series "move all VMA allocation, freeing and duplication logic to mm", v3. Currently VMA allocation, freeing and duplication exist in kernel/fork.c, which is a violation of separation of concerns, and leaves these functions exposed to the rest of the kernel when they are in fact internal implementation details. Resolve this by moving this logic to mm, and making it internal to vma.c, vma.h. This also allows us, in future, to provide userland testing around this functionality. We additionally abstract dup_mmap() to mm, being careful to ensure kernel/fork.c acceses this via the mm internal header so it is not exposed elsewhere in the kernel. As part of this change, also abstract initial stack allocation performed in __bprm_mm_init() out of fs code into mm via the create_init_stack_vma(), as this code uses vm_area_alloc() and vm_area_free(). In order to do so sensibly, we introduce a new mm/vma_exec.c file, which contains the code that is shared by mm and exec. This file is added to both memory mapping and exec sections in MAINTAINERS so both sets of maintainers can maintain oversight. As part of this change, we also move relocate_vma_down() to mm/vma_exec.c so all shared mm/exec functionality is kept in one place. We add code shared between nommu and mmu-enabled configurations in order to share VMA allocation, freeing and duplication code correctly while also keeping these functions available in userland VMA testing. This is achieved by adding a mm/vma_init.c file which is also compiled by the userland tests. This patch (of 4): There is functionality that overlaps the exec and memory mapping subsystems. While it properly belongs in mm, it is important that exec maintainers maintain oversight of this functionality correctly. We can establish both goals by adding a new mm/vma_exec.c file which contains these 'glue' functions, and have fs/exec.c import them. As a part of this change, to ensure that proper oversight is achieved, add the file to both the MEMORY MAPPING and EXEC & BINFMT API, ELF sections. scripts/get_maintainer.pl can correctly handle files in multiple entries and this neatly handles the cross-over. [akpm@linux-foundation.org: fix comment typo] Link: https://lkml.kernel.org/r/80f0d0c6-0b68-47f9-ab78-0ab7f74677fc@lucifer.local Link: https://lkml.kernel.org/r/cover.1745853549.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/91f2cee8f17d65214a9d83abb7011aa15f1ea690.1745853549.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Reviewed-by: Suren Baghdasaryan Reviewed-by: Pedro Falcato Reviewed-by: David Hildenbrand Reviewed-by: Kees Cook Reviewed-by: Vlastimil Babka Cc: Al Viro Cc: Christian Brauner Cc: Jan Kara Cc: Jann Horn Signed-off-by: Andrew Morton commit 0f4286765e4364bfad479324f78cd015e402398e Author: Luiz Capitulino Date: Wed Apr 30 16:59:47 2025 -0400 mm: kmemleak: mark variables as __read_mostly The variables kmemleak_enabled and kmemleak_free_enabled are read in the kmemleak alloc and free path respectively, but are only written to if/when kmemleak is disabled. Link: https://lkml.kernel.org/r/4016090e857e8c4c2ade4b20df312f7f38325c15.1746046744.git.luizcap@redhat.com Signed-off-by: Luiz Capitulino Reviewed-by: Catalin Marinas Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit befbb2540aaea90993e150a84e342f04e24f3476 Author: Luiz Capitulino Date: Wed Apr 30 16:59:46 2025 -0400 mm: kmemleak: drop wrong comment Newly created objects have object->count == 0, so the comment is incorrect. Just drop it. Link: https://lkml.kernel.org/r/3dfd09bc0e77bb626619184a808774ff07de275c.1746046744.git.luizcap@redhat.com Signed-off-by: Luiz Capitulino Reviewed-by: Catalin Marinas Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit e313ee4ebb357af5e316863ed15d01eb2c2e2a2f Author: Luiz Capitulino Date: Wed Apr 30 16:59:45 2025 -0400 mm: kmemleak: drop kmemleak_warning variable These are a trivial mm/kmemleak.c cleanups. I found these while reading through the code. This patch (of 3): The kmemleak_warning variable is not used since commit c5665868183f ("mm: kmemleak: use the memory pool for early allocations"), drop it. Link: https://lkml.kernel.org/r/cover.1746046744.git.luizcap@redhat.com Link: https://lkml.kernel.org/r/97e23faa7b67099027a1094c9438da5f72e037af.1746046744.git.luizcap@redhat.com Signed-off-by: Luiz Capitulino Reviewed-by: Catalin Marinas Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit 906d7ce3b59d62cf017ca602a0dfcb29413b8872 Author: Shivank Garg Date: Wed Apr 30 10:01:52 2025 +0000 jfs: implement migrate_folio for jfs_metapage_aops Add the missing migrate_folio operation to jfs_metapage_aops to fix warnings during memory compaction. These warnings were introduced by commit 7ee3647243e5 ("migrate: Remove call to ->writepage") which added explicit warnings when filesystems don't implement migrate_folio. System reports following warnings: jfs_metapage_aops does not implement migrate_folio WARNING: CPU: 0 PID: 6870 at mm/migrate.c:955 fallback_migrate_folio mm/migrate.c:953 [inline] WARNING: CPU: 0 PID: 6870 at mm/migrate.c:955 move_to_new_folio+0x70e/0x840 mm/migrate.c:1007 Implement metapage_migrate_folio() which handles both single and multiple metapages per page configurations. [shivankg@amd.com: change comment style] Link: https://lkml.kernel.org/r/1967593d-8084-4a4a-b384-35d5adc54eb4@amd.com [akpm@linux-foundation.org: fix build] [shivankg@amd.com: remove redundant NULL check in __metapage_migrate_folio()] Link: https://lkml.kernel.org/r/a67db238-0ca6-4725-abb2-dc092de87e1b@amd.com Link: https://lkml.kernel.org/r/20250430100150.279751-3-shivankg@amd.com Fixes: 35474d52c605 ("jfs: Convert metapage_writepage to metapage_write_folio") Signed-off-by: Shivank Garg Reported-by: syzbot+8bb6fd945af4e0ad9299@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67faff52.050a0220.379d84.001b.GAE@google.com Tested-by: syzbot+8bb6fd945af4e0ad9299@syzkaller.appspotmail.com Cc: Alistair Popple Cc: Dave Kleikamp Cc: David Hildenbrand Cc: Donet Tom Cc: Jane Chu Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Zi Yan Cc: Dan Carpenter Cc: kernel test robot Signed-off-by: Andrew Morton commit 86ebd50224c0734d965843260d0dc057a9431c61 Author: Shivank Garg Date: Wed Apr 30 10:01:51 2025 +0000 mm: add folio_expected_ref_count() for reference count calculation Patch series " JFS: Implement migrate_folio for jfs_metapage_aops" v5. This patchset addresses a warning that occurs during memory compaction due to JFS's missing migrate_folio operation. The warning was introduced by commit 7ee3647243e5 ("migrate: Remove call to ->writepage") which added explicit warnings when filesystem don't implement migrate_folio. The syzbot reported following [1]: jfs_metapage_aops does not implement migrate_folio WARNING: CPU: 1 PID: 5861 at mm/migrate.c:955 fallback_migrate_folio mm/migrate.c:953 [inline] WARNING: CPU: 1 PID: 5861 at mm/migrate.c:955 move_to_new_folio+0x70e/0x840 mm/migrate.c:1007 Modules linked in: CPU: 1 UID: 0 PID: 5861 Comm: syz-executor280 Not tainted 6.15.0-rc1-next-20250411-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 RIP: 0010:fallback_migrate_folio mm/migrate.c:953 [inline] RIP: 0010:move_to_new_folio+0x70e/0x840 mm/migrate.c:1007 To fix this issue, this series implement metapage_migrate_folio() for JFS which handles both single and multiple metapages per page configurations. While most filesystems leverage existing migration implementations like filemap_migrate_folio(), buffer_migrate_folio_norefs() or buffer_migrate_folio() (which internally used folio_expected_refs()), JFS's metapage architecture requires special handling of its private data during migration. To support this, this series introduce the folio_expected_ref_count(), which calculates external references to a folio from page/swap cache, private data, and page table mappings. This standardized implementation replaces the previous ad-hoc folio_expected_refs() function and enables JFS to accurately determine whether a folio has unexpected references before attempting migration. Implement folio_expected_ref_count() to calculate expected folio reference counts from: - Page/swap cache (1 per page) - Private data (1) - Page table mappings (1 per map) While originally needed for page migration operations, this improved implementation standardizes reference counting by consolidating all refcount contributors into a single, reusable function that can benefit any subsystem needing to detect unexpected references to folios. The folio_expected_ref_count() returns the sum of these external references without including any reference the caller itself might hold. Callers comparing against the actual folio_ref_count() must account for their own references separately. Link: https://syzkaller.appspot.com/bug?extid=8bb6fd945af4e0ad9299 [1] Link: https://lkml.kernel.org/r/20250430100150.279751-1-shivankg@amd.com Link: https://lkml.kernel.org/r/20250430100150.279751-2-shivankg@amd.com Signed-off-by: David Hildenbrand Signed-off-by: Shivank Garg Suggested-by: Matthew Wilcox Co-developed-by: David Hildenbrand Cc: Alistair Popple Cc: Dave Kleikamp Cc: Donet Tom Cc: Jane Chu Cc: Kefeng Wang Cc: Zi Yan Signed-off-by: Andrew Morton commit 60309008e1e2b2d4bff3c2475b0c74faf395f787 Author: Andy Shevchenko Date: Mon Apr 28 10:27:54 2025 +0300 util_macros.h: make the header more resilient Add missing header inclusions. Link: https://lkml.kernel.org/r/20250428072754.3265274-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton commit 3fc567e4c0b71d6c59ba26c5d6e54cf3c490dd3a Author: Libo Chen Date: Wed Apr 23 19:45:23 2025 -0700 sched/numa: add tracepoint that tracks the skipping of numa balancing due to cpuset memory pinning Unlike sched_skip_vma_numa tracepoint which tracks skipped VMAs, this tracks the task subjected to cpuset.mems pinning and prints out its allowed memory node mask. Link: https://lkml.kernel.org/r/20250424024523.2298272-3-libo.chen@oracle.com Signed-off-by: Libo Chen Cc: "Chen, Tim C" Cc: Chen Yu Cc: Chris Hyser Cc: Daniel Jordan Cc: Ingo Molnar Cc: Juri Lelli Cc: K Prateek Nayak Cc: Lorenzo Stoakes Cc: Madadi Vineeth Reddy Cc: Mel Gorman Cc: Michal Koutný Cc: Peter Zijlstra Cc: Raghavendra K T Cc: Srikanth Aithal Cc: Steven Rostedt Cc: Tejun Heo Cc: Venkat Rao Bagalkote Cc: Vincent Guittot Signed-off-by: Andrew Morton commit 1f6c6ac03db4a8fface0ad34ba12e5ffb4d51327 Author: Libo Chen Date: Wed Apr 23 19:45:22 2025 -0700 sched/numa: skip VMA scanning on memory pinned to one NUMA node via cpuset.mems Patch series "sched/numa: Skip VMA scanning on memory pinned to one NUMA node via cpuset.mems", v5. This patch (of 2): When the memory of the current task is pinned to one NUMA node by cgroup, there is no point in continuing the rest of VMA scanning and hinting page faults as they will just be overhead. With this change, there will be no more unnecessary PTE updates or page faults in this scenario. We have seen up to a 6x improvement on a typical java workload running on VMs with memory and CPU pinned to one NUMA node via cpuset in a two-socket AARCH64 system. With the same pinning, on a 18-cores-per-socket Intel platform, we have seen 20% improvment in a microbench that creates a 30-vCPU selftest KVM guest with 4GB memory, where each vCPU reads 4KB pages in a fixed number of loops. Link: https://lkml.kernel.org/r/20250424024523.2298272-1-libo.chen@oracle.com Link: https://lkml.kernel.org/r/20250424024523.2298272-2-libo.chen@oracle.com Signed-off-by: Libo Chen Tested-by: Chen Yu Tested-by: Srikanth Aithal Tested-by: Venkat Rao Bagalkote Cc: "Chen, Tim C" Cc: Chris Hyser Cc: Daniel Jordan Cc: Ingo Molnar Cc: Juri Lelli Cc: K Prateek Nayak Cc: Lorenzo Stoakes Cc: Madadi Vineeth Reddy Cc: Mel Gorman Cc: Michal Koutný Cc: Peter Zijlstra Cc: Raghavendra K T Cc: Steven Rostedt Cc: Tejun Heo Cc: Vincent Guittot Signed-off-by: Andrew Morton commit f60b6634cd88a749fdcd9edfeb2079c23aa05b66 Author: Peter Xu Date: Thu Apr 24 17:57:29 2025 -0400 mm/selftests: add a test to verify mmap_changing race with -EAGAIN Add an unit test to verify the recent mmap_changing ABI breakage. Note that I used some tricks here and there to make the test simple, e.g. I abused UFFDIO_MOVE on top of shmem with the fact that I know what I want to test will be even earlier than the vma type check. Rich comments were added to explain trivial details. Before that fix, -EAGAIN would have been written to the copy field most of the time but not always; the test should be able to reliably trigger the outlier case. After the fix, it's written always, the test verifies that making sure corresponding field (e.g. copy.copy for UFFDIO_COPY) is updated. [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20250424215729.194656-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 4428a35f91f0f0e31d874038b3091e1c5a461f34 Author: Lance Yang Date: Thu Apr 24 23:56:06 2025 +0800 mm/rmap: inline folio_test_large_maybe_mapped_shared() into callers To prevent the function from being used when CONFIG_MM_ID is disabled, we intend to inline it into its few callers, which also would help maintain the expected code placement. Link: https://lkml.kernel.org/r/20250424155606.57488-1-lance.yang@linux.dev Signed-off-by: Lance Yang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Cc: Mingzhe Yang Signed-off-by: Andrew Morton commit ee43f26b49e9ddad0f06c149085343613a9d73a4 Author: Su Hui Date: Mon Apr 21 14:24:24 2025 +0800 mm/damon/sysfs-schemes: use kmalloc_array() and size_add() It's safer to use kmalloc_array() and size_add() because it can prevent possible overflow problem. Link: https://lkml.kernel.org/r/20250421062423.740605-1-suhui@nfschina.com Signed-off-by: Su Hui Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 551c643fb29a221e8fcd00ff680a364a73deb2f3 Author: Pedro Falcato Date: Mon Apr 21 18:16:28 2025 +0100 mm: workingset: simplify lockdep check in update_node container_of(node->array, ..., i_pages) just to access i_pages again is an incredibly roundabout way of accessing node->array itself. Simplify it. Link: https://lkml.kernel.org/r/20250421-workingset-simplify-v1-1-de5c40051e0e@suse.de Signed-off-by: Pedro Falcato Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Johannes Weiner Signed-off-by: Andrew Morton commit 31cf0dd94509eb61e7242e217aea9604621f6b6d Author: David Woodhouse Date: Wed Apr 23 14:33:43 2025 +0100 mm/mm_init: use for_each_valid_pfn() in init_unavailable_range() Currently, memmap_init initializes pfn_hole with 0 instead of ARCH_PFN_OFFSET. Then init_unavailable_range will start iterating each page from the page at address zero to the first available page, but it won't do anything for pages below ARCH_PFN_OFFSET because pfn_valid won't pass. If ARCH_PFN_OFFSET is very large (e.g., something like 2^64-2GiB if the kernel is used as a library and loaded at a very high address), the pointless iteration for pages below ARCH_PFN_OFFSET will take a very long time, and the kernel will look stuck at boot time. Use for_each_valid_pfn() to skip the pointless iterations. Link: https://lkml.kernel.org/r/20250423133821.789413-8-dwmw2@infradead.org Signed-off-by: David Woodhouse Reported-by: Ruihan Li Suggested-by: Mike Rapoport Reviewed-by: Mike Rapoport (Microsoft) Tested-by: Ruihan Li Tested-by: Lorenzo Stoakes Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: David Hildenbrand Cc: Marc Rutland Cc: Marc Zyngier Cc: Will Deacon Signed-off-by: Andrew Morton commit 6f544e41d9d552c6c5fbd751badd33dc3eae4a6c Author: David Woodhouse Date: Wed Apr 23 14:33:42 2025 +0100 mm: use for_each_valid_pfn() in memory_hotplug Link: https://lkml.kernel.org/r/20250423133821.789413-7-dwmw2@infradead.org Signed-off-by: David Woodhouse Acked-by: Mike Rapoport (Microsoft) Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 49d8d78f8c6f5ef58e8dccde0d447132b7b4594a Author: David Woodhouse Date: Wed Apr 23 14:33:41 2025 +0100 mm, x86: use for_each_valid_pfn() from __ioremap_check_ram() Instead of calling pfn_valid() separately for every single PFN in the range, use for_each_valid_pfn() and only look at the ones which are. Link: https://lkml.kernel.org/r/20250423133821.789413-6-dwmw2@infradead.org Signed-off-by: David Woodhouse Acked-by: Mike Rapoport (Microsoft) Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: David Hildenbrand Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 312eca8a14c5f58de62692517afd4738099e6fac Author: David Woodhouse Date: Wed Apr 23 14:33:40 2025 +0100 mm, PM: use for_each_valid_pfn() in kernel/power/snapshot.c Link: https://lkml.kernel.org/r/20250423133821.789413-5-dwmw2@infradead.org Signed-off-by: David Woodhouse Acked-by: Mike Rapoport (Microsoft) Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: David Hildenbrand Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 037926316c9ded1194927ee56b862e3a1450aaf3 Author: David Woodhouse Date: Wed Apr 23 14:33:39 2025 +0100 mm: implement for_each_valid_pfn() for CONFIG_SPARSEMEM Implement for_each_valid_pfn() based on two helper functions. The first_valid_pfn() function largely mirrors pfn_valid(), calling into a pfn_section_first_valid() helper which is trivial for the !VMEMMAP case, and in the VMEMMAP case will skip to the next subsection as needed. Since next_valid_pfn() knows that its argument *is* a valid PFN, it doesn't need to do any checking at all while iterating over the low bits within a (sub)section mask; the whole (sub)section is either present or not. Note that the VMEMMAP version of pfn_section_first_valid() may return a value *higher* than end_pfn when skipping to the next subsection, and first_valid_pfn() happily returns that higher value. This is fine. [dwmw2@infradead.org: fix next_valid_pfn() for sparsemem] Link: https://lkml.kernel.org/r/c15100fcf6781a60b852c4dbb43bdc98a678fcf0.camel@infradead.org Link: https://lkml.kernel.org/r/20250423133821.789413-4-dwmw2@infradead.org Signed-off-by: David Woodhouse Reviewed-by: Mike Rapoport (Microsoft) Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: David Hildenbrand Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 928930c2e0a8e1d9252aedb1fa9be83c3669dfd7 Author: David Woodhouse Date: Wed Apr 23 14:33:38 2025 +0100 mm: implement for_each_valid_pfn() for CONFIG_FLATMEM In the FLATMEM case, the default pfn_valid() just checks that the PFN is within the range [ ARCH_PFN_OFFSET .. ARCH_PFN_OFFSET + max_mapnr ). The for_each_valid_pfn() function can therefore be a simple for() loop using those as min/max respectively. Link: https://lkml.kernel.org/r/20250423133821.789413-3-dwmw2@infradead.org Signed-off-by: David Woodhouse Reviewed-by: Mike Rapoport (Microsoft) Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit f88ce2c84a341f44a7d00bc10868714bc4751f7e Author: David Woodhouse Date: Wed Apr 23 14:33:37 2025 +0100 mm: introduce for_each_valid_pfn() and use it from reserve_bootmem_region() Patch series "mm: Introduce for_each_valid_pfn()", v4. There are cases where a naïve loop over a PFN range, calling pfn_valid() on each one, is horribly inefficient. Ruihan Li reported the case where memmap_init() iterates all the way from zero to a potentially large value of ARCH_PFN_OFFSET, and we at Amazon found the reserve_bootmem_region() one as it affects hypervisor live update. Others are more cosmetic. By introducing a for_each_valid_pfn() helper it can optimise away a lot of pointless calls to pfn_valid(), skipping immediately to the next valid PFN and also skipping *all* checks within a valid (sub)region according to the granularity of the memory model in use. This patch (of 7) Especially since commit 9092d4f7a1f8 ("memblock: update initialization of reserved pages"), the reserve_bootmem_region() function can spend a significant amount of time iterating over every 4KiB PFN in a range, calling pfn_valid() on each one, and ultimately doing absolutely nothing. On a platform used for virtualization, with large NOMAP regions that eventually get used for guest RAM, this leads to a significant increase in steal time experienced during kexec for a live update. Introduce for_each_valid_pfn() and use it from reserve_bootmem_region(). This implementation is precisely the same naïve loop that the functio used to have, but subsequent commits will provide optimised versions for FLATMEM and SPARSEMEM, and this version will remain for those architectures which provide their own pfn_valid() implementation, until/unless they also provide a matching for_each_valid_pfn(). Link: https://lkml.kernel.org/r/20250423133821.789413-1-dwmw2@infradead.org Link: https://lkml.kernel.org/r/20250423133821.789413-2-dwmw2@infradead.org Signed-off-by: David Woodhouse Reviewed-by: Mike Rapoport (Microsoft) Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Marc Rutland Cc: Marc Zyngier Cc: Ruihan Li Cc: Will Deacon Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton commit a3d2e34dce2041cf6994919430e75e5eafb99bcd Author: Mike Rapoport (Microsoft) Date: Fri May 9 00:46:35 2025 -0700 Documentation: KHO: add memblock bindings We introduced KHO into Linux: A framework that allows Linux to pass metadata and memory across kexec from Linux to Linux. KHO reuses fdt as file format and shares a lot of the same properties of firmware-to- Linux boot formats: It needs a stable, documented ABI that allows for forward and backward compatibility as well as versioning. As first user of KHO, we introduced memblock which can now preserve memory ranges reserved with reserve_mem command line options contents across kexec, so you can use the post-kexec kernel to read traces from the pre-kexec kernel. This patch adds memblock schemas similar to "device" device tree ones to a new kho bindings directory. This allows us to force contributors to document the data that moves across KHO kexecs and catch breaking change during review. Link: https://lkml.kernel.org/r/20250509074635.3187114-18-changyuanl@google.com Co-developed-by: Alexander Graf Signed-off-by: Alexander Graf Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 3498209ff64ea72e7c15f96274427250f9ad9c97 Author: Alexander Graf Date: Fri May 9 00:46:34 2025 -0700 Documentation: add documentation for KHO With KHO in place, let's add documentation that describes what it is and how to use it. Link: https://lkml.kernel.org/r/20250509074635.3187114-17-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit f99230780211a4534b50204c6613852b54ae0e15 Author: Alexander Graf Date: Fri May 9 00:46:33 2025 -0700 memblock: add KHO support for reserve_mem Linux has recently gained support for "reserve_mem": A mechanism to allocate a region of memory early enough in boot that we can cross our fingers and hope it stays at the same location during most boots, so we can store for example ftrace buffers into it. Thanks to KASLR, we can never be really sure that "reserve_mem" allocations are static across kexec. Let's teach it KHO awareness so that it serializes its reservations on kexec exit and deserializes them again on boot, preserving the exact same mapping across kexec. This is an example user for KHO in the KHO patch set to ensure we have at least one (not very controversial) user in the tree before extending KHO's use to more subsystems. Link: https://lkml.kernel.org/r/20250509074635.3187114-16-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 2b082d6f6200a386ef6229f4319c0d95c120a840 Author: Alexander Graf Date: Fri May 9 00:46:32 2025 -0700 x86/Kconfig: enable kexec handover for 64 bits Add ARCH_SUPPORTS_KEXEC_HANDOVER for 64 bits to allow enabling of KEXEC_HANDOVER configuration option. Link: https://lkml.kernel.org/r/20250509074635.3187114-15-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit a8ebb70447f840ecf3157ec7d6e1393616df0c1e Author: Alexander Graf Date: Fri May 9 00:46:31 2025 -0700 x86/boot: make sure KASLR does not step over KHO preserved memory During kexec handover (KHO) memory contains data that should be preserved and this data would be consumed by kexec'ed kernel. To make sure that the preserved memory is not overwritten, KHO uses "scratch regions" to bootstrap kexec'ed kernel. These regions are guaranteed to not have any memory that KHO would preserve and are used as the only memory the kernel sees during the early boot. The scratch regions are passed in the setup_data by the first kernel with other KHO parameters. If the setup_data contains the KHO parameters, limit randomization to scratch areas only to make sure preserved memory won't get overwritten. Since all the pointers in setup_data are represented by u64, they require double casting (first to unsigned long and then to the actual pointer type) to compile on 32-bits. This looks goofy out of context, but it is unfortunately the way that this is handled across the tree. There are at least a dozen instances of casting like this. Link: https://lkml.kernel.org/r/20250509074635.3187114-14-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit a2daf83e10378ff4ef61f75da710cac9b84e3eaa Author: Alexander Graf Date: Fri May 9 00:46:30 2025 -0700 x86/e820: temporarily enable KHO scratch for memory below 1M KHO kernels are special and use only scratch memory for memblock allocations, but memory below 1M is ignored by kernel after early boot and cannot be naturally marked as scratch. To allow allocation of the real-mode trampoline and a few (if any) other very early allocations from below 1M forcibly mark the memory below 1M as scratch. After real mode trampoline is allocated, clear that scratch marking. Link: https://lkml.kernel.org/r/20250509074635.3187114-13-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 65a5d7278545b5cac3ca0a5b6a1e9a4ea1554181 Author: Alexander Graf Date: Fri May 9 00:46:29 2025 -0700 x86/kexec: add support for passing kexec handover (KHO) data kexec handover (KHO) creates a metadata that the kernels pass between each other during kexec. This metadata is stored in memory and kexec image contains a (physical) pointer to that memory. In addition, KHO keeps "scratch regions" available for kexec: physically contiguous memory regions that are guaranteed to not have any memory that KHO would preserve. The new kernel bootstraps itself using the scratch regions and sets all handed over memory as in use. When subsystems that support KHO initialize, they introspect the KHO metadata, restore preserved memory regions, and retrieve their state stored in the preserved memory. Enlighten x86 kexec-file and boot path about the KHO metadata and make sure it gets passed along to the next kernel. Link: https://lkml.kernel.org/r/20250509074635.3187114-12-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 96383f1fb876c87763c163f3e7656b105cd8b643 Author: Mike Rapoport (Microsoft) Date: Fri May 9 00:46:28 2025 -0700 x86/setup: use memblock_reserve_kern for memory used by kernel memblock_reserve() does not distinguish memory used by firmware from memory used by kernel. The distinction is nice to have for accounting of early memory allocations and reservations, but it is essential for kexec handover (kho) to know how much memory kernel consumes during boot. Use memblock_reserve_kern() to reserve kernel memory, such as kernel image, initrd and setup data. Link: https://lkml.kernel.org/r/20250509074635.3187114-11-changyuanl@google.com Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Changyuan Lyu Acked-by: Dave Hansen Cc: Alexander Graf Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 274cdcb1c004c455451b1ca6fb5576f474f9eba0 Author: Alexander Graf Date: Fri May 9 00:46:27 2025 -0700 arm64: add KHO support We now have all bits in place to support KHO kexecs. Add awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option to the architecture so that it can use KHO successfully. Changes to the "chosen" node have been sent to https://github.com/devicetree-org/dt-schema/pull/158. Link: https://lkml.kernel.org/r/20250509074635.3187114-10-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 4e1d010e3bda2e0e4147e26490dbb1989ef65fc1 Author: Alexander Graf Date: Fri May 9 00:46:26 2025 -0700 kexec: add config option for KHO We have all generic code in place now to support Kexec with KHO. This patch adds a config option that depends on architecture support to enable KHO support. Link: https://lkml.kernel.org/r/20250509074635.3187114-9-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 3bdecc3c93f9f68d11ed54971dde169b6ead9d78 Author: Alexander Graf Date: Fri May 9 00:46:25 2025 -0700 kexec: add KHO support to kexec file loads Kexec has 2 modes: A user space driven mode and a kernel driven mode. For the kernel driven mode, kernel code determines the physical addresses of all target buffers that the payload gets copied into. With KHO, we can only safely copy payloads into the "scratch area". Teach the kexec file loader about it, so it only allocates for that area. In addition, enlighten it with support to ask the KHO subsystem for its respective payloads to copy into target memory. Also teach the KHO subsystem how to fill the images for file loads. Link: https://lkml.kernel.org/r/20250509074635.3187114-8-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit fc33e4b44b2717feba2f6f07ce7943a96499c9ec Author: Mike Rapoport (Microsoft) Date: Fri May 9 00:46:24 2025 -0700 kexec: enable KHO support for memory preservation Introduce APIs allowing KHO users to preserve memory across kexec and get access to that memory after boot of the kexeced kernel kho_preserve_folio() - record a folio to be preserved over kexec kho_restore_folio() - recreates the folio from the preserved memory kho_preserve_phys() - record physically contiguous range to be preserved over kexec. The memory preservations are tracked by two levels of xarrays to manage chunks of per-order 512 byte bitmaps. For instance if PAGE_SIZE = 4096, the entire 1G order of a 1TB x86 system would fit inside a single 512 byte bitmap. For order 0 allocations each bitmap will cover 16M of address space. Thus, for 16G of memory at most 512K of bitmap memory will be needed for order 0. At serialization time all bitmaps are recorded in a linked list of pages for the next kernel to process and the physical address of the list is recorded in KHO FDT. The next kernel then processes that list, reserves the memory ranges and later, when a user requests a folio or a physical range, KHO restores corresponding memory map entries. Link: https://lkml.kernel.org/r/20250509074635.3187114-7-changyuanl@google.com Suggested-by: Jason Gunthorpe Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Alexander Graf Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit c609c144b0e8dbc19712ff8c8a0929be38afe58d Author: Alexander Graf Date: Fri May 9 00:46:23 2025 -0700 kexec: add KHO parsing support When we have a KHO kexec, we get an FDT blob and scratch region to populate the state of the system. Provide helper functions that allow architecture code to easily handle memory reservations based on them and give device drivers visibility into the KHO FDT and memory reservations so they can recover their own state. Include a fix from Arnd Bergmann https://lore.kernel.org/lkml/20250424093302.3894961-1-arnd@kernel.org/. Link: https://lkml.kernel.org/r/20250509074635.3187114-6-changyuanl@google.com Signed-off-by: Alexander Graf Signed-off-by: Arnd Bergmann Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 3dc92c311498c4d307cfdd0c6c3ac9355b50f683 Author: Alexander Graf Date: Fri May 9 00:46:22 2025 -0700 kexec: add Kexec HandOver (KHO) generation helpers Add the infrastructure to generate Kexec HandOver metadata. Kexec HandOver is a mechanism that allows Linux to preserve state - arbitrary properties as well as memory locations - across kexec. It does so using 2 concepts: 1) KHO FDT - Every KHO kexec carries a KHO specific flattened device tree blob that describes preserved memory regions. Device drivers can register to KHO to serialize and preserve their states before kexec. 2) Scratch Regions - CMA regions that we allocate in the first kernel. CMA gives us the guarantee that no handover pages land in those regions, because handover pages must be at a static physical memory location. We use these regions as the place to load future kexec images so that they won't collide with any handover data. Link: https://lkml.kernel.org/r/20250509074635.3187114-5-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Pratyush Yadav Signed-off-by: Pratyush Yadav Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit b8a8f96a6dce527ad316184ff1e20f238ed413d8 Author: Mike Rapoport (Microsoft) Date: Fri May 9 00:46:21 2025 -0700 memblock: introduce memmap_init_kho_scratch() With deferred initialization of struct page it will be necessary to initialize memory map for KHO scratch regions early. Add memmap_init_kho_scratch() method that will allow such initialization in upcoming patches. Link: https://lkml.kernel.org/r/20250509074635.3187114-4-changyuanl@google.com Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Changyuan Lyu Cc: Alexander Graf Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit d59f43b5748092557d34244e29a618221a250501 Author: Alexander Graf Date: Fri May 9 00:46:20 2025 -0700 memblock: add support for scratch memory With KHO (Kexec HandOver), we need a way to ensure that the new kernel does not allocate memory on top of any memory regions that the previous kernel was handing over. But to know where those are, we need to include them in the memblock.reserved array which may not be big enough to hold all ranges that need to be persisted across kexec. To resize the array, we need to allocate memory. That brings us into a catch 22 situation. The solution to that is limit memblock allocations to the scratch regions: safe regions to operate in the case when there is memory that should remain intact across kexec. KHO provides several "scratch regions" as part of its metadata. These scratch regions are contiguous memory blocks that known not to contain any memory that should be persisted across kexec. These regions should be large enough to accommodate all memblock allocations done by the kexeced kernel. We introduce a new memblock_set_scratch_only() function that allows KHO to indicate that any memblock allocation must happen from the scratch regions. Later, we may want to perform another KHO kexec. For that, we reuse the same scratch regions. To ensure that no eventually handed over data gets allocated inside a scratch region, we flip the semantics of the scratch region with memblock_clear_scratch_only(): After that call, no allocations may happen from scratch memblock regions. We will lift that restriction in the next patch. Link: https://lkml.kernel.org/r/20250509074635.3187114-3-changyuanl@google.com Signed-off-by: Alexander Graf Co-developed-by: Mike Rapoport (Microsoft) Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Changyuan Lyu Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Signed-off-by: Andrew Morton commit 4c78cc596bb8d39532f059e0198eeabf370c50f5 Author: Mike Rapoport (Microsoft) Date: Fri May 9 00:46:19 2025 -0700 memblock: add MEMBLOCK_RSRV_KERN flag Patch series "kexec: introduce Kexec HandOver (KHO)", v8. Kexec today considers itself purely a boot loader: When we enter the new kernel, any state the previous kernel left behind is irrelevant and the new kernel reinitializes the system. However, there are use cases where this mode of operation is not what we actually want. In virtualization hosts for example, we want to use kexec to update the host kernel while virtual machine memory stays untouched. When we add device assignment to the mix, we also need to ensure that IOMMU and VFIO states are untouched. If we add PCIe peer to peer DMA, we need to do the same for the PCI subsystem. If we want to kexec while an SEV-SNP enabled virtual machine is running, we need to preserve the VM context pages and physical memory. See "pkernfs: Persisting guest memory and kernel/device state safely across kexec" Linux Plumbers Conference 2023 presentation for details: https://lpc.events/event/17/contributions/1485/ To start us on the journey to support all the use cases above, this patch implements basic infrastructure to allow hand over of kernel state across kexec (Kexec HandOver, aka KHO). As a really simple example target, we use memblock's reserve_mem. With this patchset applied, memory that was reserved using "reserve_mem" command line options remains intact after kexec and it is guaranteed to reside at the same physical address. == Alternatives == There are alternative approaches to (parts of) the problems above: * Memory Pools [1] - preallocated persistent memory region + allocator * PRMEM [2] - resizable persistent memory regions with fixed metadata pointer on the kernel command line + allocator * Pkernfs [3] - preallocated file system for in-kernel data with fixed address location on the kernel command line * PKRAM [4] - handover of user space pages using a fixed metadata page specified via command line All of the approaches above fundamentally have the same problem: They require the administrator to explicitly carve out a physical memory location because they have no mechanism outside of the kernel command line to pass data (including memory reservations) between kexec'ing kernels. KHO provides that base foundation. We will determine later whether we still need any of the approaches above for fast bulk memory handover of for example IOMMU page tables. But IMHO they would all be users of KHO, with KHO providing the foundational primitive to pass metadata and bulk memory reservations as well as provide easy versioning for data. == Overview == We introduce a metadata file that the kernels pass between each other. How they pass it is architecture specific. The file's format is a Flattened Device Tree (fdt) which has a generator and parser already included in Linux. KHO is enabled in the kernel command line by `kho=on`. When the root user enables KHO through /sys/kernel/debug/kho/out/finalize, the kernel invokes callbacks to every KHO users to register preserved memory regions, which contain drivers' states. When the actual kexec happens, the fdt is part of the image set that we boot into. In addition, we keep "scratch regions" available for kexec: physically contiguous memory regions that are guaranteed to not have any memory that KHO would preserve. The new kernel bootstraps itself using the scratch regions and sets all handed over memory as in use. When drivers initialize that support KHO, they introspect the fdt, restore preserved memory regions, and retrieve their states stored in the preserved memory. == Limitations == Currently KHO is only implemented for file based kexec. The kernel interfaces in the patch set are already in place to support user space kexec as well, but it is still not implemented it yet inside kexec tools. == How to Use == To use the code, please boot the kernel with the "kho=on" command line parameter. KHO will automatically create scratch regions. If you want to set the scratch size explicitly you can use "kho_scratch=" command line parameter. For instance, "kho_scratch=16M,512M,256M" will reserve a 16 MiB low memory scratch area, a 512 MiB global scratch region, and 256 MiB per NUMA node scratch regions on boot. Make sure to have a reserved memory range requested with reserv_mem command line option, for example, "reserve_mem=64m:4k:n1". Then before you invoke file based "kexec -l", finalize KHO FDT: # echo 1 > /sys/kernel/debug/kho/out/finalize You can preview the generated FDT using `dtc`, # dtc /sys/kernel/debug/kho/out/fdt # dtc /sys/kernel/debug/kho/out/sub_fdts/memblock `dtc` is available on ubuntu by `sudo apt-get install device-tree-compiler`. Now kexec into the new kernel, # kexec -l Image --initrd=initrd -s # kexec -e (The order of KHO finalization and "kexec -l" does not matter.) The new kernel will boot up and contain the previous kernel's reserve_mem contents at the same physical address as the first kernel. You can also review the FDT passed from the old kernel, # dtc /sys/kernel/debug/kho/in/fdt # dtc /sys/kernel/debug/kho/in/sub_fdts/memblock This patch (of 17): To denote areas that were reserved for kernel use either directly with memblock_reserve_kern() or via memblock allocations. Link: https://lore.kernel.org/lkml/20250424083258.2228122-1-changyuanl@google.com/ Link: https://lore.kernel.org/lkml/aAeaJ2iqkrv_ffhT@kernel.org/ Link: https://lore.kernel.org/lkml/35c58191-f774-40cf-8d66-d1e2aaf11a62@intel.com/ Link: https://lore.kernel.org/lkml/20250424093302.3894961-1-arnd@kernel.org/ Link: https://lkml.kernel.org/r/20250509074635.3187114-1-changyuanl@google.com Link: https://lkml.kernel.org/r/20250509074635.3187114-2-changyuanl@google.com Signed-off-by: Mike Rapoport (Microsoft) Co-developed-by: Changyuan Lyu Signed-off-by: Changyuan Lyu Cc: Alexander Graf Cc: Andy Lutomirski Cc: Anthony Yznaga Cc: Arnd Bergmann Cc: Ashish Kalra Cc: Ben Herrenschmidt Cc: Borislav Betkov Cc: Catalin Marinas Cc: David Woodhouse Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Gowans Cc: Jonathan Corbet Cc: Krzysztof Kozlowski Cc: Marc Rutland Cc: Paolo Bonzini Cc: Pasha Tatashin Cc: Peter Zijlstra Cc: Pratyush Yadav Cc: Rob Herring Cc: Saravana Kannan Cc: Stanislav Kinsburskii Cc: Steven Rostedt Cc: Thomas Gleinxer Cc: Thomas Lendacky Cc: Will Deacon Cc: Dave Hansen Cc: Jason Gunthorpe Signed-off-by: Andrew Morton commit 50dbe531291abfa4513c1283d66fad420c1fd299 Author: Fan Ni Date: Thu Apr 24 17:16:51 2025 -0700 khugepaged: pass folio instead of head page to trace events The trace functions trace_mm_collapse_huge_page_isolate() and trace_mm_khugepaged_scan_pmd() each have a single user, which always passes in the head page of a folio. Refactor both functions to take a folio directly. Link: https://lkml.kernel.org/r/20250425002425.533698-1-nifan.cxl@gmail.com Signed-off-by: Fan Ni Reviewed-by: Nico Pache Reviewed-by: Davidlohr Bueso Reviewed-by: Baolin Wang Reviewed-by: Yang Shi Acked-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Cc: Adam Manzanares Cc: Luis Chamberalin Cc: Mariano Pache Cc: "Masami Hiramatsu (Google)" Cc: Steven Rostedt Signed-off-by: Andrew Morton commit a4b79af6c74c581f3f559bde8ae580a0545cfc96 Author: Ye Liu Date: Sun Apr 27 18:04:42 2025 +0800 mm/numa: remove unnecessary local variable in alloc_node_data() The temporary local variable 'nd' is redundant. Directly assign the virtual address to node_data[nid] to simplify the code. No functional change. Link: https://lkml.kernel.org/r/20250427100442.958352-4-ye.liu@linux.dev Signed-off-by: Ye Liu Acked-by: David Hildenbrand Reviewed-by: Mike Rapoport (Microsoft) Reviewed-by: Anshuman Khandual Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4048774ea5af1721e5925b7cc0a74f1efad05c4d Author: Ye Liu Date: Sun Apr 27 18:04:41 2025 +0800 mm/debug_page_alloc: improve error message for invalid guardpage minorder When an invalid debug_guardpage_minorder value is provided, include the user input in the error message. This helps users and developers diagnose configuration issues more easily. No functional change. Link: https://lkml.kernel.org/r/20250427100442.958352-3-ye.liu@linux.dev Signed-off-by: Ye Liu Acked-by: David Hildenbrand Reviewed-by: Anshuman Khandual Acked-by: Mike Rapoport (Microsoft) Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit b94bff767f77bd726e61797bbc1cf4b8cff264ae Author: Ye Liu Date: Sun Apr 27 18:04:40 2025 +0800 mm/io-mapping: precompute remap protection flags for clarity Patch series "mm: small cleanups for io-mapping, debug_page_alloc and numa". This series includes three small cleanups to mm/: - io-mapping: simplify remap protection flag calculation - debug_page_alloc: improve error message by printing invalid input - numa: remove unnecessary variable for clarity No functional changes. This patch (of 3): In io_mapping_map_user(), precompute the page protection flags in a local variable before calling remap_pfn_range_notrack(). No functional change. Link: https://lkml.kernel.org/r/20250427100442.958352-1-ye.liu@linux.dev Link: https://lkml.kernel.org/r/20250427100442.958352-2-ye.liu@linux.dev Signed-off-by: Ye Liu Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Reviewed-by: Mike Rapoport (Microsoft) Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d48e8d27cd61d8485ef2c1187f3048de77af2d11 Author: Siddarth G Date: Sun Apr 27 15:56:39 2025 +0530 selftests/mm: use long for dwRegionSize Change the type of 'dwRegionSize' in wp_init() and wp_free() from int to long to match callers that pass long or unsigned long long values. wp_addr_range function is left unchanged because it passes 'dwRegionSize' parameter directly to pagemap_ioctl, which expects an int. This patch does not fix any actual known issues. It aligns parameter types with their actual usage and avoids any potential future issues. Link: https://lkml.kernel.org/r/20250427102639.39978-1-siddarthsgml@gmail.com Signed-off-by: Siddarth G Cc: Shuah Khan Signed-off-by: Andrew Morton commit a3365bdca2200e24d815b19382d3f05deb8567ab Author: Cheng-Han Wu Date: Sun Apr 27 22:50:04 2025 +0800 mm: remove unused macro INIT_PASID The macro INIT_PASID was originally used by mm_init_pasid. However, since commit a6cbd44093ef ("kernel/fork: Initialize mm's PASID"), mm_init_pasid has been removed. Therefore, INIT_PASID is no longer needed and is removed. Link: https://lkml.kernel.org/r/20250427145004.13049-1-hank20010209@gmail.com Signed-off-by: Cheng-Han Wu Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton commit 0ca954046c9397c652d568a87a3d4646bd3b73db Author: Ye Liu Date: Mon Apr 21 16:57:29 2025 +0800 mm/rmap: fix typo in comment in page_address_in_vma Fix a minor typo in the comment above page_address_in_vma(): "responsibililty" → "responsibility" Link: https://lkml.kernel.org/r/20250421085729.127845-3-ye.liu@linux.dev Signed-off-by: Ye Liu Reviewed-by: Lorenzo Stoakes Reviewed-by: Harry Yoo Cc: David Hildenbrand Cc: Liam Howlett Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f04cc63dc7d0b7b5ce71477584377c99ba2ba4bf Author: Ye Liu Date: Mon Apr 21 16:57:28 2025 +0800 mm/rmap: rename page__anon_vma to anon_vma for consistency Patch series "mm: minor cleanups in rmap", v3. Minor cleanups in mm/rmap.c: - Rename a local variable for consistency - Fix a typo in a comment No functional changes. This patch (of 2): Rename local variable page__anon_vma in page_address_in_vma() to anon_vma. The previous naming convention of using double underscores (__) is unnecessary and inconsistent with typical kernel style, which uses single underscores to denote local variables. Also updated comments to reflect the new variable name. Functionality unchanged. Link: https://lkml.kernel.org/r/20250421085729.127845-1-ye.liu@linux.dev Link: https://lkml.kernel.org/r/20250421085729.127845-2-ye.liu@linux.dev Signed-off-by: Ye Liu Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Reviewed-by: Harry Yoo Cc: Liam Howlett Cc: Liu Ye Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a73dbc851cbc5aed70477cfbfbdae7ea2d3fcea4 Author: Zhongkun He Date: Mon Apr 21 17:13:31 2025 +0800 mm: use SWAPPINESS_ANON_ONLY in MGLRU Using SWAPPINESS_ANON_ONLY instead of MAX_SWAPPINESS + 1 to indicate reclaiming only from anonymous pages makes the code more readable and explicit. Add some comment in the SWAPPINESS_ANON_ONLY context. Link: https://lkml.kernel.org/r/529db7ae6098ee712b81e4df290622e4e64ac50c.1745225696.git.hezhongkun.hzk@bytedance.com Signed-off-by: Zhongkun He Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit b40599930f001b651cc3e1863e268dd35cbbf806 Author: Zhongkun He Date: Mon Apr 21 17:13:30 2025 +0800 mm: add max swappiness arg to lru_gen for anonymous memory only The MGLRU already supports reclaiming only from anonymous memory via the /sys/kernel/debug/lru_gen interface. Now, memory.reclaim also supports the swappiness=max parameter to enable reclaiming solely from anonymous memory. To unify the semantics of proactive reclaiming from anonymous folios, the max parameter is introduced. [hezhongkun.hzk@bytedance.com: use strcmp instead of strncmp, if swappiness is not set, use the default value] Link: https://lkml.kernel.org/r/20250507071057.3184240-1-hezhongkun.hzk@bytedance.com [akpm@linux-foundation.org: tweak coding style] Link: https://lkml.kernel.org/r/65181f7745d657d664d833c26d8a94cae40538b9.1745225696.git.hezhongkun.hzk@bytedance.com Signed-off-by: Zhongkun He Acked-by: Muchun Song Cc: Johannes Weiner Cc: Michal Hocko Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit aded729f64d3eb1543abc7e6a3a20069716efb7d Author: Zhongkun He Date: Mon Apr 21 17:13:29 2025 +0800 mm: vmscan: add more comments about cache_trim_mode Add more comments for cache_trim_mode, and the annotations provided by Johannes Weiner in [1]. Link: https://lore.kernel.org/all/20250314141833.GA1316033@cmpxchg.org/ Link: https://lkml.kernel.org/r/4baad87ba637f1e6f666e9b99b3fdcb7ab39171b.1745225696.git.hezhongkun.hzk@bytedance.com Signed-off-by: Zhongkun He Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit 68a1436bde00b40327efe27926076b53088775a3 Author: Zhongkun He Date: Mon Apr 21 17:13:28 2025 +0800 mm: add swappiness=max arg to memory.reclaim for only anon reclaim Patch series "add max arg to swappiness in memory.reclaim and lru_gen", v4. This patchset adds max arg to swappiness in memory.reclaim and lru_gen for anon only proactive memory reclaim. With commit <68cd9050d871> ("mm: add swappiness= arg to memory.reclaim") we can submit an additional swappiness= argument to memory.reclaim. It is very useful because we can dynamically adjust the reclamation ratio based on the anonymous folios and file folios of each cgroup. For example,when swappiness is set to 0, we only reclaim from file folios. But we can not relciam memory just from anon folios. This patchset introduces a new macro, SWAPPINESS_ANON_ONLY, defined as MAX_SWAPPINESS + 1, represent the max arg semantics. It specifically indicates that reclamation should occur only from anonymous pages. Patch 1 adds swappiness=max arg to memory.reclaim suggested-by: Yosry Ahmed Patch 2 add more comments for cache_trim_mode from Johannes Weiner in [1]. Patch 3 add max arg to lru_gen for proactive memory reclaim in MGLRU. The MGLRU already supports reclaiming exclusively from anonymous pages. This patch formalizes that behavior by introducing a max parameter to represent the corresponding semantics. Patch 4 using SWAPPINESS_ANON_ONLY in MGLRU Using SWAPPINESS_ANON_ONLY instead of MAX_SWAPPINESS + 1 to indicate reclaiming only from anonymous pages makes the code more readable and explicit Here is the previous discussion: https://lore.kernel.org/all/20250314033350.1156370-1-hezhongkun.hzk@bytedance.com/ https://lore.kernel.org/all/20250312094337.2296278-1-hezhongkun.hzk@bytedance.com/ https://lore.kernel.org/all/20250318135330.3358345-1-hezhongkun.hzk@bytedance.com/ This patch (of 4): With commit <68cd9050d871> ("mm: add swappiness= arg to memory.reclaim") we can submit an additional swappiness= argument to memory.reclaim. It is very useful because we can dynamically adjust the reclamation ratio based on the anonymous folios and file folios of each cgroup. For example,when swappiness is set to 0, we only reclaim from file folios. However,we have also encountered a new issue: when swappiness is set to the MAX_SWAPPINESS, it may still only reclaim file folios. So, we hope to add a new arg 'swappiness=max' in memory.reclaim where proactive memory reclaim only reclaims from anonymous folios when swappiness is set to max. The swappiness semantics from a user perspective remain unchanged. For example, something like this: echo "2M swappiness=max" > /sys/fs/cgroup/memory.reclaim will perform reclaim on the rootcg with a swappiness setting of 'max' (a new mode) regardless of the file folios. Users have a more comprehensive view of the application's memory distribution because there are many metrics available. For example, if we find that a certain cgroup has a large number of inactive anon folios, we can reclaim only those and skip file folios, because with the zram/zswap, the IO tradeoff that cache_trim_mode or other file first logic is making doesn't hold - file refaults will cause IO, whereas anon decompression will not. With this patch, the swappiness argument of memory.reclaim has a new mode 'max', means reclaiming just from anonymous folios both in traditional LRU and MGLRU. Link: https://lkml.kernel.org/r/cover.1745225696.git.hezhongkun.hzk@bytedance.com Link: https://lore.kernel.org/all/20250314141833.GA1316033@cmpxchg.org/ [1] Link: https://lkml.kernel.org/r/519e12b9b1f8c31a01e228c8b4b91a2419684f77.1745225696.git.hezhongkun.hzk@bytedance.com Signed-off-by: Zhongkun He Suggested-by: Yosry Ahmed Acked-by: Muchun Song Cc: Johannes Weiner Cc: Michal Hocko Cc: Yu Zhao Signed-off-by: Andrew Morton commit c6c895cf2d323373a66d61c6acc331431de2ae5a Author: Shakeel Butt Date: Tue May 6 16:28:33 2025 -0700 memcg-introduce-non-blocking-limit-setting-option-v3 add more explanation in doc and commit message on O_NONBLOCK side-effects (Johannes) Link: https://lkml.kernel.org/r/20250506232833.3109790-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Greg Thelen Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Tejun Heo Cc: Yosry Ahmed Cc: Christian Brauner Signed-off-by: Andrew Morton commit c8e6002bd611c68dab892565039b60c7ad5b8d6a Author: Shakeel Butt Date: Sat Apr 19 11:35:45 2025 -0700 memcg: introduce non-blocking limit setting option Setting the max and high limits can trigger synchronous reclaim and/or oom-kill if the usage is higher than the given limit. This behavior is fine for newly created cgroups but it can cause issues for the node controller while setting limits for existing cgroups. In our production multi-tenant and overcommitted environment, we are seeing priority inversion when the node controller dynamically adjusts the limits of running jobs of different priorities. Based on the system situation, the node controller may reduce the limits of lower priority jobs and increase the limits of higher priority jobs. However we are seeing node controller getting stuck for long period of time while reclaiming from lower priority jobs while setting their limits and also spends a lot of its own CPU. One of the workaround we are trying is to fork a new process which sets the limit of the lower priority job along with setting an alarm to get itself killed if it get stuck in the reclaim for lower priority job. However we are finding it very unreliable and costly. Either we need a good enough time buffer for the alarm to be delivered after setting limit and potentialy spend a lot of CPU in the reclaim or be unreliable in setting the limit for much shorter but cheaper (less reclaim) alarms. Let's introduce new limit setting option which does not trigger reclaim and/or oom-kill and let the processes in the target cgroup to trigger reclaim and/or throttling and/or oom-kill in their next charge request. This will make the node controller on multi-tenant overcommitted environment much more reliable. Explanation from Johannes on side-effects of O_NONBLOCK limit change: It's usually the allocating tasks inside the group bearing the cost of limit enforcement and reclaim. This allows a (privileged) updater from outside the group to keep that cost in there - instead of having to help, from a context that doesn't necessarily make sense. I suppose the tradeoff with that - and the reason why this was doing sync reclaim in the first place - is that, if the group is idle and not trying to allocate more, it can take indefinitely for the new limit to actually be met. It should be okay in most scenarios in practice. As the capacity is reallocated from group A to B, B will exert pressure on A once it tries to claim it and thereby shrink it down. If A is idle, that shouldn't be hard. If A is running, it's likely to fault/allocate soon-ish and then join the effort. It does leave a (malicious) corner case where A is just busy-hitting its memory to interfere with the clawback. This is comparable to reclaiming memory.low overage from the outside, though, which is an acceptable risk. Users of O_NONBLOCK just need to be aware. Link: https://lkml.kernel.org/r/20250419183545.1982187-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Greg Thelen Cc: Michal Koutný Cc: Muchun Song Cc: Tejun Heo Cc: Christian Brauner Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 8d88b0769e256c238f80615f08fc5b7aebc29439 Author: Frank van der Linden Date: Wed Apr 2 20:56:13 2025 +0000 mm/hugetlb: use separate nodemask for bootmem allocations Hugetlb boot allocation has used online nodes for allocation since commit de55996d7188 ("mm/hugetlb: use online nodes for bootmem allocation"). This was needed to be able to do the allocations earlier in boot, before N_MEMORY was set. This might lead to a different distribution of gigantic hugepages across NUMA nodes if there are memoryless nodes in the system. What happens is that the memoryless nodes are tried, but then the memblock allocation fails and falls back, which usually means that the node that has the highest physical address available will be used (top-down allocation). While this will end up getting the same number of hugetlb pages, they might not be be distributed the same way. The fallback for each memoryless node might not end up coming from the same node as the successful round-robin allocation from N_MEMORY nodes. While administrators that rely on having a specific number of hugepages per node should use the hugepages=N:X syntax, it's better not to change the old behavior for the plain hugepages=N case. To do this, construct a nodemask for hugetlb bootmem purposes only, containing nodes that have memory. Then use that for round-robin bootmem allocations. This saves some cycles, and the added advantage here is that hugetlb_cma can use it too, avoiding the older issue of pointless attempts to create a CMA area for memoryless nodes (which will also cause the per-node CMA area size to be too small). Link: https://lkml.kernel.org/r/20250402205613.3086864-1-fvdl@google.com Fixes: de55996d7188 ("mm/hugetlb: use online nodes for bootmem allocation") Signed-off-by: Frank van der Linden Reviewed-by: Oscar Salvador Reviewed-by: Luiz Capitulino Cc: David Hildenbrand Cc: Muchun Song Signed-off-by: Andrew Morton commit 1b6a58e205ed0bbeeeca46388f0649f322b04f06 Author: Huan Yang Date: Fri Apr 25 11:19:25 2025 +0800 mm/memcg: use kmem_cache when alloc memcg pernode info When tracing mem_cgroup_per_node allocations with kmalloc ftrace: kmalloc: call_site=mem_cgroup_css_alloc+0x1d8/0x5b4 ptr=00000000d798700c bytes_req=2896 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false This reveals the slab allocator provides 4096B chunks for 2896B mem_cgroup_per_node due to: 1. The slab allocator predefines bucket sizes from 64B to 8096B 2. The mem_cgroup allocation size (2312B) falls between the 2KB and 4KB slabs 3. The allocator rounds up to the nearest larger slab (4KB), resulting in ~1KB wasted memory per memcg alloc - per node. This patch introduces a dedicated kmem_cache for mem_cgroup structs, achieving precise memory allocation. Post-patch ftrace verification shows: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0x1b8/0x5d4 ptr=000000002989e63a bytes_req=2896 bytes_alloc=2944 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false Each mem_cgroup_per_node alloc 2944bytes(include hw cacheline align), compare to 4096, it avoid waste. Link: https://lkml.kernel.org/r/20250425031935.76411-4-link@vivo.com Signed-off-by: Huan Yang Acked-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Francesco Valla Cc: guoweikang Cc: Huang Shijie Cc: KP Singh Cc: Michal Hocko Cc: Muchun Song Cc: "Paul E . McKenney" Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Raul E Rangel Cc: Roman Gushchin Cc: "Uladzislau Rezki (Sony)" Cc: Vlastimil Babka Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 97e4fc4b35dc1b98f28671fda35bd37d4f401bca Author: Huan Yang Date: Fri Apr 25 11:19:24 2025 +0800 mm/memcg: use kmem_cache when alloc memcg When tracing mem_cgroup_alloc() with kmalloc ftrace, we observe: kmalloc: call_site=mem_cgroup_css_alloc+0xd8/0x5b4 ptr=000000003e4c3799 bytes_req=2312 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false The output indicates that while allocating mem_cgroup struct (2312 bytes), the slab allocator actually provides 4096-byte chunks. This occurs because: 1. The slab allocator predefines bucket sizes from 64B to 8096B 2. The mem_cgroup allocation size (2312B) falls between the 2KB and 4KB slabs 3. The allocator rounds up to the nearest larger slab (4KB), resulting in ~1KB wasted memory per allocation This patch introduces a dedicated kmem_cache for mem_cgroup structs, achieving precise memory allocation. Post-patch ftrace verification shows: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0xbc/0x5d4 ptr=00000000695c1806 bytes_req=2312 bytes_alloc=2368 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false Each memcg alloc offer 2368bytes(include hw cacheline align), compare to 4096, avoid waste. Link: https://lkml.kernel.org/r/20250425031935.76411-3-link@vivo.com Signed-off-by: Huan Yang Acked-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Francesco Valla Cc: guoweikang Cc: Huang Shijie Cc: KP Singh Cc: Michal Hocko Cc: Muchun Song Cc: "Paul E . McKenney" Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Raul E Rangel Cc: Roman Gushchin Cc: "Uladzislau Rezki (Sony)" Cc: Vlastimil Babka Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit bc9817bb7a21f64fbca2c4b83811d943036ec870 Author: Huan Yang Date: Fri Apr 25 11:19:23 2025 +0800 mm/memcg: move mem_cgroup_init() ahead of cgroup_init() Patch series "Use kmem_cache for memcg alloc", v3. (willy tldr: "you've gone from allocating 8 objects per 32KiB to allocating 13 objects per 32KiB, a 62% improvement in memory consumption" [1]) The mem_cgroup_alloc function creates mem_cgroup struct and it's associated structures including mem_cgroup_per_node. Through detailed analysis on our test machine (Arm64, 16GB RAM, 6.6 kernel, 1 NUMA node, memcgv2 with nokmem,nosocket,cgroup_disable=pressure), we can observe the memory allocation for these structures using the following shell commands: # Enable tracing echo 1 > /sys/kernel/tracing/events/kmem/kmalloc/enable echo 1 > /sys/kernel/tracing/tracing_on cat /sys/kernel/tracing/trace_pipe | grep kmalloc | grep mem_cgroup # Trigger allocation if cgroup subtree do not enable memcg echo +memory > /sys/fs/cgroup/cgroup.subtree_control Ftrace Output: # mem_cgroup struct allocation sh-6312 [000] ..... 58015.698365: kmalloc: call_site=mem_cgroup_css_alloc+0xd8/0x5b4 ptr=000000003e4c3799 bytes_req=2312 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false # mem_cgroup_per_node allocation sh-6312 [000] ..... 58015.698389: kmalloc: call_site=mem_cgroup_css_alloc+0x1d8/0x5b4 ptr=00000000d798700c bytes_req=2896 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false Key Observations: 1. Both structures use kmalloc with requested sizes between 2KB-4KB 2. Allocation alignment forces 4KB slab usage due to pre-defined sizes (64B, 128B,..., 2KB, 4KB, 8KB) 3. Memory waste per memcg instance: Base struct: 4096 - 2312 = 1784 bytes Per-node struct: 4096 - 2896 = 1200 bytes Total waste: 2984 bytes (1-node system) NUMA scaling: (1200 + 8) * nr_node_ids bytes So, it's a little waste. This patchset introduces dedicated kmem_cache: Patch2 - mem_cgroup kmem_cache - memcg_cachep Patch3 - mem_cgroup_per_node kmem_cache - memcg_pn_cachep The benefits of this change can be observed with the following tracing commands: # Enable tracing echo 1 > /sys/kernel/tracing/events/kmem/kmem_cache_alloc/enable echo 1 > /sys/kernel/tracing/tracing_on cat /sys/kernel/tracing/trace_pipe | grep kmem_cache_alloc | grep mem_cgroup # In another terminal: echo +memory > /sys/fs/cgroup/cgroup.subtree_control The output might now look like this: # mem_cgroup struct allocation sh-9827 [000] ..... 289.513598: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0xbc/0x5d4 ptr=00000000695c1806 bytes_req=2312 bytes_alloc=2368 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false # mem_cgroup_per_node allocation sh-9827 [000] ..... 289.513602: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0x1b8/0x5d4 ptr=000000002989e63a bytes_req=2896 bytes_alloc=2944 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false This indicates that the `mem_cgroup` struct now requests 2312 bytes and is allocated 2368 bytes, while `mem_cgroup_per_node` requests 2896 bytes and is allocated 2944 bytes. The slight increase in allocated size is due to `SLAB_HWCACHE_ALIGN` in the `kmem_cache`. Without `SLAB_HWCACHE_ALIGN`, the allocation might appear as: # mem_cgroup struct allocation sh-9269 [003] ..... 80.396366: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0xbc/0x5d4 ptr=000000005b12b475 bytes_req=2312 bytes_alloc=2312 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false # mem_cgroup_per_node allocation sh-9269 [003] ..... 80.396411: kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0x1b8/0x5d4 ptr=00000000f347adc6 bytes_req=2896 bytes_alloc=2896 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false While the `bytes_alloc` now matches the `bytes_req`, this patchset defaults to using `SLAB_HWCACHE_ALIGN` as it is generally considered more beneficial for performance. Please let me know if there are any issues or if I've misunderstood anything. This patchset also move mem_cgroup_init ahead of cgroup_init() due to cgroup_init() will allocate root_mem_cgroup, but each initcall invoke after cgroup_init, so if each kmem_cache do not prepare, we need testing NULL before use it. This patch (of 3): When cgroup_init() creates root_mem_cgroup through css_alloc callback, some critical resources might not be fully initialized, forcing later operations to perform conditional checks for resource availability. This patch move mem_cgroup_init() to address the init order, it invoke before cgroup_init, so, compare to subsys_initcall, it can use to prepare some key resources before root_mem_cgroup alloc. Link: https://lkml.kernel.org/r/aAsRCj-niMMTtmK8@casper.infradead.org [1] Link: https://lkml.kernel.org/r/20250425031935.76411-1-link@vivo.com Link: https://lkml.kernel.org/r/20250425031935.76411-2-link@vivo.com Signed-off-by: Huan Yang Suggested-by: Shakeel Butt Acked-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Francesco Valla Cc: guoweikang Cc: Huang Shijie Cc: KP Singh Cc: Michal Hocko Cc: Muchun Song Cc: "Paul E . McKenney" Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Raul E Rangel Cc: Roman Gushchin Cc: "Uladzislau Rezki (Sony)" Cc: Vlastimil Babka Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit b960818d51b3c8275d0f80c5fc4156eb2ff2fde6 Author: Gavin Guo Date: Fri Apr 25 18:38:59 2025 +0800 mm/huge_memory: remove useless folio pointers passing Since the previous commit "mm/huge_memory: Adjust try_to_migrate_one() and split_huge_pmd_locked()" has simplified the logic by leveraging the folio verification in page_vma_mapped_walk(), this patch removes the unnecessary folio pointers passing. Link: https://lkml.kernel.org/r/20250425103859.825879-3-gavinguo@igalia.com Link: https://lore.kernel.org/all/98d1d195-7821-4627-b518-83103ade56c0@redhat.com/ Link: https://lore.kernel.org/all/91599a3c-e69e-4d79-bac5-5013c96203d7@redhat.com/ Signed-off-by: Gavin Guo Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Cc: Florent Revest Cc: Gavin Shan Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 60fbb14396d5ee1f430c55883d8e603d3229163c Author: Gavin Guo Date: Fri Apr 25 18:38:58 2025 +0800 mm/huge_memory: adjust try_to_migrate_one() and split_huge_pmd_locked() Patch series "Clean up split_huge_pmd_locked() and remove unnecessary folio pointers", v2. The patch series enhances the folio verification by leveraging the existing page_vma_mapped_walk() mechanism and removing redundant folio pointer passing. This patch (of 2): split_huge_pmd_locked() currently performs redundant checks for migration entries and folio validation that are already handled by the page_vma_mapped_walk mechanism in try_to_migrate_one. Specifically, page_vma_mapped_walk already ensures that: - The folio is properly mapped in the given VMA area - pmd_trans_huge, pmd_devmap, and migration entry validation are performed To leverage page_vma_mapped_walk's work, moving TTU_SPLIT_HUGE_PMD handling to the while loop checking and removing these duplicate checks from split_huge_pmd_locked. Link: https://lkml.kernel.org/r/20250425103859.825879-1-gavinguo@igalia.com Link: https://lkml.kernel.org/r/20250425103859.825879-2-gavinguo@igalia.com Link: https://lore.kernel.org/all/98d1d195-7821-4627-b518-83103ade56c0@redhat.com/ Link: https://lore.kernel.org/all/91599a3c-e69e-4d79-bac5-5013c96203d7@redhat.com/ Signed-off-by: Gavin Guo Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Cc: Florent Revest Cc: Gavin Shan Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 7d709f49babc28907b0ac60228f522d2e6216add Author: Gregory Price Date: Thu Apr 24 16:28:06 2025 -0400 vmscan,cgroup: apply mems_effective to reclaim It is possible for a reclaimer to cause demotions of an lruvec belonging to a cgroup with cpuset.mems set to exclude some nodes. Attempt to apply this limitation based on the lruvec's memcg and prevent demotion. Notably, this may still allow demotion of shared libraries or any memory first instantiated in another cgroup. This means cpusets still cannot cannot guarantee complete isolation when demotion is enabled, and the docs have been updated to reflect this. This is useful for isolating workloads on a multi-tenant system from certain classes of memory more consistently - with the noted exceptions. Note on locking: The cgroup_get_e_css reference protects the css->effective_mems, and calls of this interface would be subject to the same race conditions associated with a non-atomic access to cs->effective_mems. So while this interface cannot make strong guarantees of correctness, it can therefore avoid taking a global or rcu_read_lock for performance. Link: https://lkml.kernel.org/r/20250424202806.52632-3-gourry@gourry.net Signed-off-by: Gregory Price Suggested-by: Shakeel Butt Suggested-by: Waiman Long Acked-by: Tejun Heo Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Waiman Long Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 8adce0857769d596c5b000d118119e3bb1d63a32 Author: Gregory Price Date: Thu Apr 24 16:28:05 2025 -0400 cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed Patch series "vmscan: enforce mems_effective during demotion", v5. Change reclaim to respect cpuset.mems_effective during demotion when possible. Presently, reclaim explicitly ignores cpuset.mems_effective when demoting, which may cause the cpuset settings to violated. Implement cpuset_node_allowed() to check the cpuset.mems_effective associated wih the mem_cgroup of the lruvec being scanned. This only applies to cgroup/cpuset v2, as cpuset exists in a different hierarchy than mem_cgroup in v1. This requires renaming the existing cpuset_node_allowed() to be cpuset_current_now_allowed() - which is more descriptive anyway - to implement the new cpuset_node_allowed() which takes a target cgroup. This patch (of 2): Rename cpuset_node_allowed to reflect that the function checks the current task's cpuset.mems. This allows us to make a new cpuset_node_allowed function that checks a target cgroup's cpuset.mems. Link: https://lkml.kernel.org/r/20250424202806.52632-1-gourry@gourry.net Link: https://lkml.kernel.org/r/20250424202806.52632-2-gourry@gourry.net Signed-off-by: Gregory Price Acked-by: Waiman Long Acked-by: Tejun Heo Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 6bbf0e728528addd5f9dd140b03b06438f032166 Author: Mike Rapoport (Microsoft) Date: Wed Apr 23 17:48:07 2025 +0300 execmem: enforce allocation size aligment to PAGE_SIZE Before introduction of ROX cache execmem allocation size was always implicitly aligned to PAGE_SIZE inside vmalloc. However, when allocation happens from the ROX cache, this is not enforced. Make sure that the allocation size is always consistently aligned to PAGE_SIZE. Mike said: : Right now it'll make the maple trees in execmem_cache more compact. : And it's a precaution for the case when execmem callers would want to : change permissions on unaligned range because that would WARN_ON() : loudly. Peter said : It should not have a runtime effect -- currently all this code is used : with PAGE_SIZE multiples and everything just works. But whilst I was : perusing this code, I noticed that nothing actually enforced this. If : someone were to break this assumption things will go sideways. Link: https://lkml.kernel.org/r/20250423144808.1619863-1-rppt@kernel.org Fixes: 2e45474ab14f ("execmem: add support for cache of large ROX pages") Signed-off-by: Mike Rapoport (Microsoft) Suggested-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton commit b25f97d0f8043903a64e3a203b79219cc69f2f77 Author: Baoquan He Date: Sat Apr 19 06:36:53 2025 +0800 mm/vmalloc.c: return explicit error value in alloc_vmap_area() In codes of alloc_vmap_area(), it returns the upper bound 'vend' to indicate if the allocation is successful or failed. That is not very clear. Here change to return explicit error values and check them to judge if allocation is successful. Link: https://lkml.kernel.org/r/20250418223653.243436-6-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Shivank Garg Reviewed-by: Uladzislau Rezki (Sony) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 8ab8442d44ee37cc21fdc11530158ee2b2be5ed5 Author: Baoquan He Date: Sat Apr 19 06:36:52 2025 +0800 mm/vmalloc: optimize function vm_unmap_aliases() Remove unneeded local variables and replace them with values. Link: https://lkml.kernel.org/r/20250418223653.243436-5-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Shivank Garg Signed-off-by: Andrew Morton commit 4f05024eba021f1885c044c8515b6a2674b652de Author: Baoquan He Date: Sat Apr 19 06:36:51 2025 +0800 mm/vmalloc.c: optimize code in decay_va_pool_node() a little bit When purge lazily freed vmap areas, VA stored in vn->pool[] will also be taken away into free vmap tree partially or completely accordingly, that is done in decay_va_pool_node(). When doing that, for each pool of node, the whole list is detached from the pool for handling. At this time, that pool is empty. It's not necessary to update the pool size each time when one VA is removed and addded into free vmap tree. Here change code to update the pool size when attaching the pool back. Link: https://lkml.kernel.org/r/20250418223653.243436-4-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Cc: Shivank Garg Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 81262d85aef4dbdd878d6ce982fe51c06ed2720c Author: Baoquan He Date: Sat Apr 19 06:36:50 2025 +0800 mm/vmalloc.c: find the vmap of vmap_nodes in reverse order When finding VA in vn->busy, if VA spans several zones and the passed addr is not the same as va->va_start, we should scan the vn in reverse odrdr because the starting address of VA must be smaller than the passed addr if it really resides in the VA. E.g on a system nr_vmap_nodes=100, <----va----> -|-----|-----|-----|-----|-----|-----|-----|-----|-----|- ... n-1 n n+1 n+2 ... 100 0 1 VA resides in node 'n' whereas it spans 'n', 'n+1' and 'n+2'. If passed addr is within 'n+2', we should try nodes backwards on 'n+1' and 'n', then succeed very soon. Meanwhile we still need loop around because VA could spans node from 'n' to node 100, node 0, node 1. Anyway, changing to find in reverse order can improve efficiency on many CPUs system. Link: https://lkml.kernel.org/r/20250418223653.243436-3-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Shivank Garg Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit f7f68274e476c49e29bfb81daf4ad717fe9880c6 Author: Baoquan He Date: Sat Apr 19 06:36:49 2025 +0800 mm/vmalloc.c: change purge_ndoes as local static variable Patch series "mm/vmalloc.c: code cleanup and improvements", v2. These changes were made from code inspection in mm/vmalloc.c. This patch (of 5): Static variable 'purge_ndoes' is defined in global scope, while it's only used in function __purge_vmap_area_lazy(). It mainly serves to avoid memory allocation repeatedly, especially when NR_CPUS is big. While a local static variable can also satisfy the demand, and can improve code readibility. Hence move its definition into __purge_vmap_area_lazy(). Link: https://lkml.kernel.org/r/20250418223653.243436-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20250418223653.243436-2-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Shivank Garg Signed-off-by: Andrew Morton commit 786d5cc2b92ac331d0654452c6c3cea611772e09 Author: Christoph Lameter (Ampere) Date: Mon Apr 21 13:58:06 2025 -0700 Update Christoph's Email address and make it consistent Use cl@gentwo.org throughout and remove the old email addresses. Link: https://lkml.kernel.org/r/8b962f57-4d98-cbb0-cd82-b6ba456733e8@gentwo.org Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton commit 09b988a3826eb758d4b36dec4a9b23c18c209b34 Author: Prabhav Kumar Vaish Date: Sun Apr 20 19:34:40 2025 +0530 mm: fix typos in comments in mm_init.c Corrected minor typos in comments: - 'contigious' -> 'contiguous' - 'hierarcy' -> 'hierarchy' This is a non-functional change in comment text only. Link: https://lkml.kernel.org/r/20250420140440.18817-1-pvkumar5749404@gmail.com Signed-off-by: Prabhav Kumar Vaish Reviewed-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton commit 82a08bde3cf7bbbe90de57baa181bebf676582c7 Author: SeongJae Park Date: Sun Apr 20 12:40:30 2025 -0700 samples/damon: implement a DAMON module for memory tiering Implement a sample DAMON module that shows how self-tuned DAMON-based memory tiering can be written. It is a sample since the purpose is to give an idea about how it can be implemented and perform, rather than be used on general production setups. Especially, it supports only two tiers memory setup having only one CPU-attached NUMA node. [sj@kernel.org: fix wrong DAMON attrs setting] Link: https://lkml.kernel.org/r/20250510220932.47722-1-sj@kernel.org [sj@kernel.org: trigger build even if only mtier is enabled] Link: https://lkml.kernel.org/r/20250426184054.11437-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250420194030.75838-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit f77cb462261bfe55fb0ae33eb911e3cad7694880 Author: SeongJae Park Date: Sun Apr 20 12:40:29 2025 -0700 Docs/ABI/damon: document nid file Add a description of 'nid' file, which is optionally used for specific DAMOS quota goal metrics such as node_mem_{used,free}_bp on the DAMON sysfs ABI document. Link: https://lkml.kernel.org/r/20250420194030.75838-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit a7bb1e754559dc1de14c1927c39c5295ab363e01 Author: SeongJae Park Date: Sun Apr 20 12:40:28 2025 -0700 Docs/admin-guide/mm/damon/usage: document 'nid' file Add description of 'nid' file, which is optionally used for specific DAMOS quota goal metrics such as node_mem_{used,free}_bp on DAMON usage document. Link: https://lkml.kernel.org/r/20250420194030.75838-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit b3b95a3594530643972220a70d738db96544be45 Author: SeongJae Park Date: Sun Apr 20 12:40:27 2025 -0700 Docs/mm/damon/design: document node_mem_{used,free}_bp Add description of DAMOS quota goal metrics for NUMA node utilization on the DAMON deesign document. Link: https://lkml.kernel.org/r/20250420194030.75838-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit 85fcf0ffc4606a52192800bc9f2a5014a096b96f Author: SeongJae Park Date: Sun Apr 20 12:40:26 2025 -0700 mm/damon/sysfs-schemes: connect damos_quota_goal nid with core layer DAMON sysfs interface file for DAMOS quota goal's node id argument is not passed to core layer. Implement the link. Link: https://lkml.kernel.org/r/20250420194030.75838-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit 0fbd59379d8fc8b04f3f7c81fd44fe7c0d33b077 Author: SeongJae Park Date: Sun Apr 20 12:40:25 2025 -0700 mm/damon/sysfs-schemes: implement file for quota goal nid parameter DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP DAMOS quota goal metrics require the node id parameter. However, there is no DAMON user ABI for setting it. Implement a DAMON sysfs file for that with name 'nid', under the quota goal directory. Link: https://lkml.kernel.org/r/20250420194030.75838-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton commit 0e1c773b501f33437d87b72c7d26080361e224b1 Author: SeongJae Park Date: Sun Apr 20 12:40:24 2025 -0700 mm/damon/core: introduce damos quota goal metrics for memory node utilization Patch series "mm/damon: auto-tune DAMOS for NUMA setups including tiered memory". Utilizing DAMON for memory tiering usually requires manual tuning and/or tedious controls. Let it self-tune hotness and coldness thresholds for promotion and demotion aiming high utilization of high memory tiers, by introducing new DAMOS quota goal metrics representing the used and the free memory ratios of specific NUMA nodes. And introduce a sample DAMON module that demonstrates how the new feature can be used for memory tiering use cases. Backgrounds =========== A type of tiered memory system exposes the memory tiers as NUMA nodes. A straightforward pages placement strategy for such systems is placing access-hot and cold pages on upper and lower tiers, reespectively, pursuing higher utilization of upper tiers. Since access temperature can be dynamic, periodically finding and migrating hot pages and cold pages to proper tiers (promoting and demoting) is also required. Linux kernel provides several features for such dynamic and transparent pages placement. Page Faults and LRU ------------------- One widely known way is using NUMA balancing in tiering mode (a.k.a NUMAB-2) and reclaim-based demotion features. In the setup, NUMAB-2 finds hot pages using access check-purpose page faults (a.k.a prot_none) and promote those inside each process' context, until there is no more pages to promote, or the upper tier is filled up and memory pressure happens. In the latter case, LRU-based reclaim logic wakes up as a response to the memory pressure and demotes cold pages to lower tiers in asynchronous (kswapd) and/or synchronous ways (direct reclaim). DAMON ----- Yet another available solution is using DAMOS with migrate_hot and migrate_cold DAMOS actions for promotions and demotions, respectively. To make it optimum, users need to specify aggressiveness and access temperature thresholds for promotions and demotions in a good balance that results in high utilization of upper tiers. The number of parameters is not small, and optimum parameter values depend on characteristics of the underlying hardware and the workload. As a result, it often requires manual, time consuming and repetitive tuning of the DAMOS schemes for given workloads and systems combinations. Self-tuned DAMON-based Memory Tiering ===================================== To solve such manual tuning problems, DAMOS provides aim-oriented feedback-driven quotas self-tuning. Using the feature, we design a self-tuned DAMON-based memory tiering for general multi-tier memory systems. For each memory tier node, if it has a lower tier, run a DAMOS scheme that demotes cold pages of the node, auto-tuning the aggressiveness aiming an amount of free space of the node. The free space is for keeping the headroom that avoids significant memory pressure during upper tier memory usage spike, and promoting hot pages from the lower tier. For each memory tier node, if it has an upper tier, run a DAMOS scheme that promotes hot pages of the current node to the upper tier, auto-tuning the aggressiveness aiming a high utilization ratio of the upper tier. The target ratio is to ensure higher tiers are utilized as much as possible. It should match with the headroom for demotion scheme, but have slight overlap, to ensure promotion and demotion are not entirely stopped. The aim-oriented aggressiveness auto-tuning of DAMOS is already available. Hence, to make such tiering solution implementation, only new quota goal metrics for utilization and free space ratio of specific NUMA node need to be developed. Discussions =========== The design imposes below discussion points. Expected Behaviors ------------------ The system will let upper tier memory node accommodates as many hot data as possible. If total amount of the data is less than the top tier memory's promotion/demotion target utilization, entire data will be just placed on the top tier. Promotion scheme will do nothing since there is no data to promote. Demotion scheme will also do nothing since the free space ratio of the top tier is higher than the goal. Only if the amount of data is larger than the top tier's utilization ratio, demotion scheme will demote cold pages and ensure the headroom free space. Since the promotion and demotion schemes for a single node has small overlap at their target utilization and free space goals, promotions and demotions will continue working with a moderate aggressiveness level. It will keep all data is placed on access hotness under dynamic access pattern, while minimizing the migration overhead. In any case, each node will keep headroom free space and as many upper tiers are utilized as possible. Ease of Use ----------- Users still need to set the target utilization and free space ratio, but it will be easier to set. We argue 99.7 % utilization and 0.5 % free space ratios can be good default values. It can be easily adjusted based on desired headroom size of given use case. Users are also still required to answer the minimum coldness and hotness thresholds. Together with monitoring intervals auto-tuning[2], DAMON will always show meaningful amount of hot and cold memory. And DAMOS quota's prioritization mechanism will make good decision as long as the source information is that colorful. Hence, users can very naively set the minimum criterias. We believe any access observation and no access observation within last one aggregation interval is enough for minimum hot and cold regions criterias. General Tiered Memory Setup Applicability ----------------------------------------- The design can be applied to any number of tiers having any performance characteristics, as long as they can be hierarchical. Hence, applying the system to different tiered memory system will be straightforward. Note that this assumes only single CPU NUMA node case. Because today's DAMON is not aware of which CPU made each access, applying this on systems having multiple CPU NUMA nodes can be complicated. We are planning to extend DAMON for the use case, but that's out of the scope of this patch series. How To Use ---------- Users can implement the auto-tuned DAMON-based memory tiering using DAMON sysfs interface. It can be easily done using DAMON user-space tool like user-space tool. Below evaluation results section shows an example DAMON user-space tool command for that. For wider and simpler deployment, having a kernel module that sets up and run the DAMOS schemes via DAMON kernel API can be useful. The module can enable the memory tiering at boot time via kernel command line parameter or at run time with single command. This patch series implements a sample DAMON kernel module that shows how such module can be implemented. Comparison To Page Faults and LRU-based Approaches -------------------------------------------------- The existing page faults based promotion (NUMAB-2) does hot pages detection and migration in the process context. When there are many pages to promote, it can block the progress of the application's real works. DAMOS works in asynchronous worker thread, so it doesn't block the real works. NUMAB-2 doesn't provide a way to control aggressiveness of promotion other than the maximum amount of pages to promote per given time widnow. If hot pages are found, promotions can happen in the upper-bound speed, regardless of upper tier's memory pressure. If the maximum speed is not well set for the given workload, it can result in slow promotion or unnecessary memory pressure. Self-tuned DAMON-based memory tiering alleviates the problem by adjusting the speed based on current utilization of the upper tier. LRU-based demotion can be triggered in both asynchronous (kswapd) and synchronous (direct reclaim) ways. Other than the way of finding cold pages, asynchronous LRU-based demotion and DAMON-based demotion has no big difference. DAMON-based demotion can make a better balancing with DAMON-based promotion, though. The LRU-based demotion can do better than DAMON-based demotion when the tier is having significant memory pressure. It would be wise to use DAMON-based demotion as a proactive and primary one, but utilizing LRU-based demotions together as a fast backup solution. Evaluation ========== In short, under a setup that requires fast and frequent promotions, self-tuned DAMON-based memory tiering's hot pages promotion improves performance about 4.42 %. We believe this shows self-tuned DAMON-based promotion's effectiveness. Meanwhile, NUMAB-2's hot pages promotion degrades the performance about 7.34 %. We suspect the degradation is mostly due to NUMAB-2's synchronous nature that can block the application's progress, which highlights the advantage of DAMON-based solution's asynchronous nature. Note that the test was done with the RFC version of this patch series. We don't run it again since this patch series got no meaningful change after the RFC, while the test takes pretty long time. Setup ----- Hardware. Use a machine that equips 250 GiB DRAM memory tier and 50 GiB CXL memory tier. The tiers are exposed as NUMA nodes 0 and 1, respectively. Kernel. Use Linux kernel v6.13 that modified as following. Add all DAMON patches that available on mm tree of 2025-03-15, and this patch series. Also modify it to ignore mempolicy() system calls, to avoid bad effects from application's traditional NUMA systems assumed optimizations. Workload. Use a modified version of Taobench benchmark[3] that available on DCPerf benchmark suite. It represents an in-memory caching workload. We set its 'memsize', 'warmup_time', and 'test_time' parameter as 340 GiB, 2,500 seconds and 1,440 seconds. The parameters are chosen to ensure the workload uses more than DRAM memory tier. Its RSS under the parameter grows to 270 GiB within the warmup time. It turned out the workload has a very static access pattrn. Only about 13 % of the RSS is frequently accessed from the beginning to end. Hence promotion shows no meaningful performance difference regardless of different design and implementations. We therefore modify the kernel to periodically demote up to 10 GiB hot pages and promote up to 10 GiB cold pages once per minute. The intention is to simulate periodic access pattern changes. The hotness and coldness threshold is very naively set so that it is more like random access pattern change rather than strict hot/cold pages exchange. This is why we call the workload as "modified". It is implemented as two DAMOS schemes each running on an asynchronous thread. It can be reproduced with DAMON user-space tool like below. # ./damo start \ --ops paddr --numa_node 0 --monitoring_intervals 10s 200s 200s \ --damos_action migrate_hot 1 \ --damos_quota_interval 60s --damos_quota_space 10G \ --ops paddr --numa_node 1 --monitoring_intervals 10s 200s 200s \ --damos_action migrate_cold 0 \ --damos_quota_interval 60s --damos_quota_space 10G \ --nr_schemes 1 1 --nr_targets 1 1 --nr_ctxs 1 1 System configurations. Use below variant system configurations. - Baseline. No memory tiering features are turned on. - Numab_tiering. On the baseline, enable NUMAB-2 and relcaim-based demotion. In detail, following command is executed: echo 2 > /proc/sys/kernel/numa_balancing; echo 1 > /sys/kernel/mm/numa/demotion_enabled; echo 7 > /proc/sys/vm/zone_reclaim_mode - DAMON_tiering. On the baseline, utilize self-tuned DAMON-based memory tiering implementation via DAMON user-space tool. It utilizes two kernel threads, namely promotion thread and demotion thread. Demotion thread monitors access pattern of DRAM node using DAMON with auto-tuned monitoring intervals aiming 4% DAMON-observed access ratio, and demote coldest pages up to 200 MiB per second aiming 0.5% free space of DRAM node. Promotion thread monitors CXL node using same intervals auto-tuning, and promote hot pages in same way but aiming for 99.7% utilization of DRAM node. Because DAMON provides only best-effort accuracy, add young page DAMOS filters to allow only and reject all young pages at promoting and demoting, respectively. It can be reproduced with DAMON user-space tool like below. # ./damo start \ --numa_node 0 --monitoring_intervals_goal 4% 3 5ms 10s \ --damos_action migrate_cold 1 --damos_access_rate 0% 0% \ --damos_apply_interval 1s \ --damos_quota_interval 1s --damos_quota_space 200MB \ --damos_quota_goal node_mem_free_bp 0.5% 0 \ --damos_filter reject young \ --numa_node 1 --monitoring_intervals_goal 4% 3 5ms 10s \ --damos_action migrate_hot 0 --damos_access_rate 5% max \ --damos_apply_interval 1s \ --damos_quota_interval 1s --damos_quota_space 200MB \ --damos_quota_goal node_mem_used_bp 99.7% 0 \ --damos_filter allow young \ --damos_nr_quota_goals 1 1 --damos_nr_filters 1 1 \ --nr_targets 1 1 --nr_schemes 1 1 --nr_ctxs 1 1 Measurment Results ------------------ On each system configuration, run the modified version of Taobench and collect 'score'. 'score' is a metric that calculated and provided by Taobench to represents the performance of the run on the system. To handle the measurement errors, repeat the measurement five times. The results are as below. Config Score Stdev (%) Normalized Baseline 1.6165 0.0319 1.9764 1.0000 Numab_tiering 1.4976 0.0452 3.0209 0.9264 DAMON_tiering 1.6881 0.0249 1.4767 1.0443 'Config' column shows the system config of the measurement. 'Score' column shows the 'score' measurement in average of the five runs on the system config. 'Stdev' column shows the standsard deviation of the five measurements of the scores. '(%)' column shows the 'Stdev' to 'Score' ratio in percentage. Finally, 'Normalized' column shows the averaged score values of the configs that normalized to that of 'Baseline'. The periodic hot pages demotion and cold pages promotion that was conducted to simulate dynamic access pattern was started from the beginning of the workload. It resulted in the DRAM tier utilization always under the watermark, and hence no real demotion was happened for all test runs. This means the above results show no difference between LRU-based and DAMON-based demotions. Only difference between NUMAB-2 and DAMON-based promotions are represented on the results. Numab_tiering config degraded the performance about 7.36 %. We suspect this happened because NUMAB-2's synchronous promotion was blocking the Taobench's real work progress. DAMON_tiering config improved the performance about 4.43 %. We believe this shows effectiveness of DAMON-based promotion that didn't block Taobench's real work progress due to its asynchronous nature. Also this means DAMON's monitoring results are accurate enough to provide visible amount of improvement. Evaluation Limitations ---------------------- As mentioned above, this evaluation shows only comparison of promotion mechanisms. DAMON-based tiering is recommended to be used together with reclaim-based demotion as a faster backup under significant memory pressure, though. From some perspective, the modified version of Taobench may seems making the picture distorted too much. It would be better to evaluate with more realistic workload, or more finely tuned micro benchmarks. Patch Sequence ============== The first patch (patch 1) implements two new quota goal metrics on core layer and expose it to DAMON core kernel API. The second and third ones (patches 2 and 3) further link it to DAMON sysfs interface. Three following patches (patches 4-6) document the new feature and sysfs file on design, usage, and ABI documents. The final one (patch 7) implements a working version of a self-tuned DAMON-based memory tiering solution in an incomplete but easy to understand form as a kernel module under samples/damon/ directory. References ========== [1] https://lore.kernel.org/20231112195602.61525-1-sj@kernel.org/ [2] https://lore.kernel.org/20250303221726.484227-1-sj@kernel.org [3] https://github.com/facebookresearch/DCPerf/blob/main/packages/tao_bench/README.md This patch (of 7): Used and free space ratios for specific NUMA nodes can be useful inputs for NUMA-specific DAMOS schemes' aggressiveness self-tuning feedback loop. Implement DAMOS quota goal metrics for such self-tuned schemes. Link: https://lkml.kernel.org/r/20250420194030.75838-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250420194030.75838-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Yunjeong Mun Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 3349e275067f94ffb4141989aed9cbae7409429b Merge: 417ce77ef46658 82f2b0b97b36ee Author: Greg Kroah-Hartman Date: Tue May 13 08:37:56 2025 +0200 Merge 6.15-rc6 into staging-next We need the staging changes in here as well Signed-off-by: Greg Kroah-Hartman commit ab6dc9a6c721c2eed867c157447764ae68ff9b7e Merge: 588d032e9e5669 82f2b0b97b36ee Author: Greg Kroah-Hartman Date: Tue May 13 08:26:58 2025 +0200 Merge 6.15-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 991919e969043a4422dfebbcadf600a5d28b94e4 Merge: 73ed6faed58e56 82f2b0b97b36ee Author: Greg Kroah-Hartman Date: Tue May 13 08:19:37 2025 +0200 Merge 6.15-rc6 into char-misc-next We need the iio/hyperv fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit cad915e4515790d2e66525a86a166e7ce81e3055 Author: Nishanth Menon Date: Mon May 12 13:57:27 2025 -0500 regulator: gpio: Use dev_err_probe During probe the gpio driver may not yet be available. Use dev_err_probe to provide just the pertinent log. Since dev_err_probe takes care of reporting the error value, drop the redundant ret variable while at it. Signed-off-by: Nishanth Menon Link: https://patch.msgid.link/20250512185727.2907411-1-nm@ti.com Signed-off-by: Mark Brown commit 1f450730ff39807360e96105adbec1c818905a70 Author: Cedric Xing Date: Thu May 8 22:03:50 2025 -0500 sample/tsm-mr: Fix missing static for sample_report 0day robot reports 'sample_report' can be static, fix it up. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505090938.avfIhLsl-lkp@intel.com/ Signed-off-by: Cedric Xing Link: https://patch.msgid.link/20250509030350.22363-1-cedric.xing@intel.com Signed-off-by: Dan Williams commit 15ff5d0e90bb044b94d9a4ac57276829861a954d Merge: a0372b3831785e 7c3f259dfe03f5 Author: Dan Williams Date: Mon May 12 22:12:44 2025 -0700 Merge branch 'for-6.16/tsm-mr' into tsm-next Merge measurement-register infrastructure for v6.16. Resolve conflicts with the establishment of drivers/virt/coco/guest/ for cross-vendor common TSM functionality. Address a mis-merge with a fixup from Lukas: Link: http://lore.kernel.org/20250509134031.70559-1-lukas.bulwahn@redhat.com commit 8f9c9384cde8c5e9af22bef553b89cd991fd38e7 Author: Peter Wang Date: Sat May 10 16:01:01 2025 +0800 scsi: ufs: core: Support updating device command timeout The default device command timeout remains 1.5 seconds, but platform drivers can override it if needed. Some UFS device commands may timeout due to being blocked by regular SCSI write commands. Therefore, the maximum timeout needs to be extended to 30 seconds, matching the SCSI write command timeout. And for error injection purposes, set the minimum value to 1 ms. Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20250510080345.595798-1-peter.wang@mediatek.com Suggested-by: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 8f6c52b7534ae9c4c0ae2b57f4f45c31ceac4b41 Author: Peter Wang Date: Fri May 9 10:16:12 2025 +0800 scsi: ufs: core: Change hwq_id type and value Change the type of hwq_id to u32 because the member id of struct ufs_hw_queue is u32 (hwq->id) and the trace entry hwq_id is also u32. Set hwq_id to 0 if MCQ is not supported, as SDB mode only supports one hardware queue. Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20250509021648.412098-1-peter.wang@mediatek.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b179f290d36316d33a306a9a11df48787e2bd5bb Author: Bart Van Assche Date: Thu May 8 09:54:03 2025 -0700 scsi: ufs: core: Increase the UIC command timeout further On my development board I observed that it can take a little longer than two seconds before UIC completions are processed if the UART is enabled. Hence this patch that increases the UIC command timeout upper limit further. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250508165411.3755300-1-bvanassche@acm.org Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen commit 769d7fbe01f65d95f4720cacb8f21e1104e61010 Author: Benjamin Block Date: Wed May 7 06:28:07 2025 +0200 scsi: zfcp: Simplify workqueue allocation alloc_ordered_workqueue() accepts a format string and format arguments as part of the call, so there is no need for the indirection of first using snprintf() to print the name into an local array, and then passing that array to the allocation call. Also make the error-/non-error-case handling more canonical in that the error case is tested in the 'if' that follows the allocation call, and the default return value of the function is '0'. Signed-off-by: Benjamin Block Reviewed-by: Fedor Loshakov Reviewed-by: Steffen Maier Reviewed-by: M Nikhil Reviewed-by: Nihar Panda Signed-off-by: Nihar Panda Link: https://lore.kernel.org/r/20250507042854.3607038-3-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen commit 4a9a7c8209884fdfe0fe29897f9416f5370d7649 Author: Wonkon Kim Date: Mon May 12 11:52:10 2025 +0900 scsi: ufs: core: Print error value as hex format in ufshcd_err_handler() It is better to print saved_err and saved_uic_err in hex format. Integer format is hard to decode. [ 1024.485428] [2: kworker/u20:13:28211] exynos-ufs 17100000.ufs: ufshcd_err_handler started; HBA state eh_fatal; powered 1; shutting down 0; saved_err = 131072; saved_uic_err = 0; force_reset = 0; link is broken Signed-off-by: Wonkon Kim Link: https://lore.kernel.org/r/20250512025210.5802-1-wkon.kim@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit cd6856d38881f8137d795b64ff5587c0232a0c34 Author: Christoph Hellwig Date: Mon May 5 08:06:37 2025 +0200 scsi: sd: Remove the stream_status member from scsi_stream_status_header Having a variable length array at the end of scsi_stream_status_header only causes problems. Remove it and switch sd_is_perm_stream(), which is the only place that currently uses it, to use the scsi_stream_status directly following it in the local buf structure. Besides being a much better data structure design, this also avoids a -Wflex-array-member-not-at-end warning. Reported-by: Gustavo A. R. Silva Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505060640.3398500-1-hch@lst.de Reviewed-by: John Garry Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 73349697fd997cce9c2f04f35fbcc3544b643a89 Author: Randy Dunlap Date: Thu May 1 18:51:36 2025 -0700 scsi: docs: Clean up some style in scsi_mid_low_api Capitalize Linux but not "kernel." Spell out Linux instead of using "lk". Hyphenate "system-wide." Hyphenate "32-bit". End a sentence with a period (full stop). Change "double linked" to "doubly linked" list. Use SCSI or scsi but not Scsi. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20250502015136.683691-1-rdunlap@infradead.org Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Martin K. Petersen commit e256821fbe43f1a4a13297026707d56db7eb5de5 Author: Dr. David Alan Gilbert Date: Sun May 4 00:07:42 2025 +0100 scsi: core: Remove unused scsi_dev_info_list_del_keyed() The last use of scsi_dev_info_list_del_keyed() was removed by 2011's commit 2b132577a05e ("[SCSI] scsi_dh: code cleanup and remove the references to scsi_dev_info") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250503230743.124978-1-linux@treblig.org Signed-off-by: Martin K. Petersen commit 7c56921936a49c817addfabf0a3c66b39ab0bd35 Author: Dr. David Alan Gilbert Date: Sun May 4 00:06:01 2025 +0100 scsi: isci: Remove unused sci_remote_device_reset() sci_remote_device_reset() last use was removed in 2012 by commit 14aaa9f0a318 ("isci: Redesign device suspension, abort, cleanup.") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250503230601.124794-1-linux@treblig.org Signed-off-by: Martin K. Petersen commit e8d72b766adcde14188e68968f3cd05f4321691d Author: Eric Biggers Date: Sat May 10 22:21:51 2025 -0700 MAINTAINERS: add crc_kunit.c back to CRC LIBRARY Restore lib/tests/crc_kunit.c to CRC LIBRARY following the rename in commit db6fe4d61ece ("lib: Move KUnit tests into tests/ subdirectory") which made it no longer match the file pattern lib/crc*. Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250511052151.420228-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit e39d14a760c039af0653e3df967e7525413924a0 Author: Jonas Gorski Date: Sat May 10 11:22:11 2025 +0200 net: dsa: b53: implement setting ageing time b53 supported switches support configuring ageing time between 1 and 1,048,575 seconds, so add an appropriate setter. This allows b53 to pass the FDB learning test for both vlan aware and vlan unaware bridges. Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250510092211.276541-1-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski commit b86bcfee30576b752302c55693fff97242b35dfd Author: Jason Xing Date: Sat May 10 17:34:42 2025 +0800 net: mlx4: add SOF_TIMESTAMPING_TX_SOFTWARE flag when getting ts info As mlx4 has implemented skb_tx_timestamp() in mlx4_en_xmit(), the SOFTWARE flag is surely needed when users are trying to get timestamp information. Signed-off-by: Jason Xing Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250510093442.79711-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit a96876057b9e44f60d936f8e4887543555b0593c Author: Jakub Kicinski Date: Fri May 9 14:27:51 2025 -0700 netlink: fix policy dump for int with validation callback Recent devlink change added validation of an integer value via NLA_POLICY_VALIDATE_FN, for sparse enums. Handle this in policy dump. We can't extract any info out of the callback, so report only the type. Fixes: 429ac6211494 ("devlink: define enum for attr types of dynamic attributes") Reported-by: syzbot+01eb26848144516e7f0a@syzkaller.appspotmail.com Link: https://patch.msgid.link/20250509212751.1905149-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cc42263172bed7f085d143c6977b392c13a4e279 Merge: 908aef9a718d84 c24a65b6a27c78 Author: Jakub Kicinski Date: Mon May 12 18:48:26 2025 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux Tony Nguyen says: ==================== Prepare for Intel IPU E2000 (GEN3) This is the first part in introducing RDMA support for idpf. ---------------------------------------------------------------- Tatyana Nikolova says: To align with review comments, the patch series introducing RDMA RoCEv2 support for the Intel Infrastructure Processing Unit (IPU) E2000 line of products is going to be submitted in three parts: 1. Modify ice to use specific and common IIDC definitions and pass a core device info to irdma. 2. Add RDMA support to idpf and modify idpf to use specific and common IIDC definitions and pass a core device info to irdma. 3. Add RDMA RoCEv2 support for the E2000 products, referred to as GEN3 to irdma. This first part is a 5 patch series based on the original "iidc/ice/irdma: Update IDC to support multiple consumers" patch to allow for multiple CORE PCI drivers, using the auxbus. Patches: 1) Move header file to new name for clarity and replace ice specific DSCP define with a kernel equivalent one in irdma 2) Unify naming convention 3) Separate header file into common and driver specific info 4) Replace ice specific DSCP define with a kernel equivalent one in ice 5) Implement core device info struct and update drivers to use it ---------------------------------------------------------------- v1: https://lore.kernel.org/20250505212037.2092288-1-anthony.l.nguyen@intel.com IWL reviews: [v5] https://lore.kernel.org/20250416021549.606-1-tatyana.e.nikolova@intel.com [v4] https://lore.kernel.org/20250225050428.2166-1-tatyana.e.nikolova@intel.com [v3] https://lore.kernel.org/20250207194931.1569-1-tatyana.e.nikolova@intel.com [v2] https://lore.kernel.org/20240824031924.421-1-tatyana.e.nikolova@intel.com [v1] https://lore.kernel.org/20240724233917.704-1-tatyana.e.nikolova@intel.com * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux: iidc/ice/irdma: Update IDC to support multiple consumers ice: Replace ice specific DSCP mapping num with a kernel define iidc/ice/irdma: Break iidc.h into two headers iidc/ice/irdma: Rename to iidc_* convention iidc/ice/irdma: Rename IDC header file ==================== Link: https://patch.msgid.link/20250509200712.2911060-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 908aef9a718d84434480560df1b67f34225558cd Merge: 6bf78849371d39 8ea6e51e54c512 Author: Jakub Kicinski Date: Mon May 12 18:46:46 2025 -0700 Merge branch 'net-vertexcom-mse102x-improve-rx-handling' Stefan Wahren says: ==================== net: vertexcom: mse102x: Improve RX handling This series is the second part of two series for the Vertexcom driver. It contains some improvements for the RX handling of the Vertexcom MSE102x. ==================== Link: https://patch.msgid.link/20250509120435.43646-1-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit 8ea6e51e54c512f4042b1b39e404bcffb1a7f059 Author: Stefan Wahren Date: Fri May 9 14:04:35 2025 +0200 net: vertexcom: mse102x: Simplify mse102x_rx_pkt_spi The function mse102x_rx_pkt_spi is used in two cases: * initial polling to re-arm RX interrupt * level based RX interrupt handler Both of them doesn't need an open-coded retry mechanism. In the first case the function can be called again, if the return code is IRQ_NONE. This keeps the error behavior during netdev open. In the second case the proper retry would be handled implicit by the SPI interrupt. So drop the retry code and simplify the receive path. Signed-off-by: Stefan Wahren Link: https://patch.msgid.link/20250509120435.43646-7-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit 4ecf56f4b66011b583644bf9a62188d05dfcd78c Author: Stefan Wahren Date: Fri May 9 14:04:34 2025 +0200 net: vertexcom: mse102x: Return code for mse102x_rx_pkt_spi The MSE102x doesn't provide any interrupt register, so the only way to handle the level interrupt is to fetch the whole packet from the MSE102x internal buffer via SPI. So in cases the interrupt handler fails to do this, it should return IRQ_NONE. This allows the core to disable the interrupt in case the issue persists and prevent an interrupt storm. Signed-off-by: Stefan Wahren Link: https://patch.msgid.link/20250509120435.43646-6-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit 6ce9348468c5a8862a036fa8534838fec2c1fabf Author: Stefan Wahren Date: Fri May 9 14:04:33 2025 +0200 net: vertexcom: mse102x: Implement flag for valid CMD After removal of the invalid command counter only a relevant debug message is left, which can be cumbersome. So add a new flag to debugfs, which indicates whether the driver has ever received a valid CMD. This helps to differentiate between general and temporary receive issues. Signed-off-by: Stefan Wahren Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250509120435.43646-5-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit aeb90c40ee9a8a67c5cac5445162c36586f2816c Author: Stefan Wahren Date: Fri May 9 14:04:32 2025 +0200 net: vertexcom: mse102x: Drop invalid cmd stats There are several reasons for an invalid command response by the MSE102x: * SPI line interferences * MSE102x is in reset or has no firmware * MSE102x is busy * no packet in MSE102x receive buffer So the counter for invalid command isn't very helpful without further context. So drop the confusing statistics counter, but keep the debug messages about "unexpected response" in order to debug possible hardware issues. Signed-off-by: Stefan Wahren Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250509120435.43646-4-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit fed56943a8ba0409570ed79b040acf75e47d676d Author: Stefan Wahren Date: Fri May 9 14:04:31 2025 +0200 net: vertexcom: mse102x: Add warning about IRQ trigger type The example of the initial DT binding of the Vertexcom MSE 102x suggested a IRQ_TYPE_EDGE_RISING, which is wrong. So warn everyone to fix their device tree to level based IRQ. Signed-off-by: Stefan Wahren Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250509120435.43646-3-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit a29a72866616ef670c4b050419c6753ca6b0245c Author: Stefan Wahren Date: Fri May 9 14:04:30 2025 +0200 dt-bindings: vertexcom-mse102x: Fix IRQ type in example According to the MSE102x documentation the trigger type is a high level. Signed-off-by: Stefan Wahren Reviewed-by: Andrew Lunn Acked-by: Conor Dooley Link: https://patch.msgid.link/20250509120435.43646-2-wahrenst@gmx.net Signed-off-by: Jakub Kicinski commit 6bf78849371d392d2b276eba00d176062c8431db Author: Matthias Schiffer Date: Wed May 7 12:13:21 2025 +0200 net: phy: dp83867: use 2ns delay if not specified in DTB Most PHY drivers default to a 2ns delay if internal delay is requested and no value is specified. Having a default value makes sense, as it allows a Device Tree to only care about board design (whether there are delays on the PCB or not), and not whether the delay is added on the MAC or the PHY side when needed. Whether the delays are actually applied is controlled by the DP83867_RGMII_*_CLK_DELAY_EN flags, so the behavior is only changed in configurations that would previously be rejected with -EINVAL. Suggested-by: Andrew Lunn Signed-off-by: Matthias Schiffer Link: https://patch.msgid.link/e2509b248a11ee29ea408a50c231da4c1fa0863b.1746612711.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Jakub Kicinski commit cc7734e03e81dfed01156be8c698899dc42d2400 Author: Matthias Schiffer Date: Wed May 7 12:13:20 2025 +0200 net: phy: dp83867: remove check of delay strap configuration The check that intended to handle "rgmii" PHY mode differently to the RGMII modes with internal delay never worked as intended: - added in commit 2a10154abcb7 ("net: phy: dp83867: Add TI dp83867 phy"): logic error caused the condition to always evaluate to true - changed in commit a46fa260f6f5 ("net: phy: dp83867: Fix warning check for setting the internal delay"): now the condition incorrectly evaluates to false for rgmii-txid - removed in commit 2b892649254f ("net: phy: dp83867: Set up RGMII TX delay") Around the time of the removal, commit c11669a2757e ("net: phy: dp83867: Rework delay rgmii delay handling") started clearing the delay enable flags in RGMIICTL. The change attempted to preserve the historical behavior of not disabling internal delays with "rgmii" PHY mode and also documented this in a comment, but due to a conflict between "Set up RGMII TX delay" and "Rework delay rgmii delay handling", the behavior dp83867_verify_rgmii_cfg() warned about (and that was also described in a comment in dp83867_config_init()) disappeared in the following merge of net into net-next in commit b4b12b0d2f02 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net"). While is doesn't appear that this breaking change was intentional, it has been like this since 2019, and the new behavior to disable the delays with "rgmii" PHY mode is generally desirable - in particular with MAC drivers that have to fix up the delay mode, resulting in the PHY driver not even seeing the same mode that was specified in the Device Tree. Remove the obsolete check and comment. Signed-off-by: Matthias Schiffer Link: https://patch.msgid.link/8a286207cd11b460bb0dbd27931de3626b9d7575.1746612711.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Jakub Kicinski commit f4efc73b1ee791cb946156eec6c64e75b6092d48 Merge: fd5fd538a1f4b3 c61bcd29eda9ea Author: Alexei Starovoitov Date: Mon May 12 18:29:04 2025 -0700 Merge branch 'introduce-kfuncs-for-memory-reads-into-dynptrs' Mykyta Yatsenko says: ==================== Introduce kfuncs for memory reads into dynptrs From: Mykyta Yatsenko This patch adds new kfuncs that enable reading variable-length user or kernel data directly into dynptrs. These kfuncs provide a way to perform dynamically-sized reads while maintaining memory safety. Unlike existing `bpf_probe_read_{user|kernel}` APIs, which are limited to constant-sized reads, these new kfuncs allow for more flexible data access. v4 -> v5 * Fix pointers annotations, use __user where necessary, cast where needed v3 -> v4 * Added pid filtering in selftests v2 -> v3 * Add KF_TRUSTED_ARGS for kfuncs that take pointer to task_struct as an argument * Remove checks for non-NULL task, where it was not necessary * Added comments on constants used in selftests, etc. v1 -> v2 * Renaming helper functions to use "user_str" instead of "user_data_str" suffix ==================== Link: https://patch.msgid.link/20250512205348.191079-1-mykyta.yatsenko5@gmail.com Signed-off-by: Alexei Starovoitov commit c61bcd29eda9ea8db753ad5217fd24d9ee42a96b Author: Mykyta Yatsenko Date: Mon May 12 21:53:48 2025 +0100 selftests/bpf: introduce tests for dynptr copy kfuncs Introduce selftests verifying newly-added dynptr copy kfuncs. Covering contiguous and non-contiguous memory backed dynptrs. Disable test_probe_read_user_str_dynptr that triggers bug in strncpy_from_user_nofault. Patch to fix the issue [1]. [1] https://patchwork.kernel.org/project/linux-mm/patch/20250422131449.57177-1-mykyta.yatsenko5@gmail.com/ Acked-by: Andrii Nakryiko Signed-off-by: Mykyta Yatsenko Link: https://lore.kernel.org/r/20250512205348.191079-4-mykyta.yatsenko5@gmail.com Signed-off-by: Alexei Starovoitov commit a498ee7576de24b4b0916ce56cf2686e261a29f7 Author: Mykyta Yatsenko Date: Mon May 12 21:53:47 2025 +0100 bpf: Implement dynptr copy kfuncs This patch introduces a new set of kfuncs for working with dynptrs in BPF programs, enabling reading variable-length user or kernel data into dynptr directly. To enable memory-safety, verifier allows only constant-sized reads via existing bpf_probe_read_{user|kernel} etc. kfuncs, dynptr-based kfuncs allow dynamically-sized reads without memory safety shortcomings. The following kfuncs are introduced: * `bpf_probe_read_kernel_dynptr()`: probes kernel-space data into a dynptr * `bpf_probe_read_user_dynptr()`: probes user-space data into a dynptr * `bpf_probe_read_kernel_str_dynptr()`: probes kernel-space string into a dynptr * `bpf_probe_read_user_str_dynptr()`: probes user-space string into a dynptr * `bpf_copy_from_user_dynptr()`: sleepable, copies user-space data into a dynptr for the current task * `bpf_copy_from_user_str_dynptr()`: sleepable, copies user-space string into a dynptr for the current task * `bpf_copy_from_user_task_dynptr()`: sleepable, copies user-space data of the task into a dynptr * `bpf_copy_from_user_task_str_dynptr()`: sleepable, copies user-space string of the task into a dynptr The implementation is built on two generic functions: * __bpf_dynptr_copy * __bpf_dynptr_copy_str These functions take function pointers as arguments, enabling the copying of data from various sources, including both kernel and user space. Use __always_inline for generic functions and callbacks to make sure the compiler doesn't generate indirect calls into callbacks, which is more expensive, especially on some kernel configurations. Inlining allows compiler to put direct calls into all the specific callback implementations (copy_user_data_sleepable, copy_user_data_nofault, and so on). Reviewed-by: Andrii Nakryiko Signed-off-by: Mykyta Yatsenko Link: https://lore.kernel.org/r/20250512205348.191079-3-mykyta.yatsenko5@gmail.com Signed-off-by: Alexei Starovoitov commit d060b6aab031b6113f78cd3d1585115f13386eec Author: Mykyta Yatsenko Date: Mon May 12 21:53:46 2025 +0100 helpers: make few bpf helpers public Make bpf_dynptr_slice_rdwr, bpf_dynptr_check_off_len and __bpf_dynptr_write available outside of the helpers.c by adding their prototypes into linux/include/bpf.h. bpf_dynptr_check_off_len() implementation is moved to header and made inline explicitly, as small function should typically be inlined. These functions are going to be used from bpf_trace.c in the next patch of this series. Acked-by: Andrii Nakryiko Signed-off-by: Mykyta Yatsenko Link: https://lore.kernel.org/r/20250512205348.191079-2-mykyta.yatsenko5@gmail.com Signed-off-by: Alexei Starovoitov commit 6b466efc6365e904b4b7eb65218a5b2969f978e2 Author: Lad Prabhakar Date: Wed May 7 18:35:50 2025 +0100 dt-bindings: net: renesas-gbeth: Add support for RZ/V2N (R9A09G056) SoC Document support for the GBETH IP found on the Renesas RZ/V2N (R9A09G056) SoC. The GBETH controller on the RZ/V2N SoC is functionally identical to the one found on the RZ/V2H(P) (R9A09G057) SoC, so `renesas,rzv2h-gbeth` will be used as a fallback compatible. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250507173551.100280-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit e9c392a1557c984a9d62a8342f237bb049d04793 Merge: c14e1ecefd9e70 b83d98c1db2906 Author: Jakub Kicinski Date: Mon May 12 18:10:57 2025 -0700 Merge branch 'selftests-net-configure-rp_filter-in-setup_ns' Hangbin Liu says: ==================== selftests: net: configure rp_filter in setup_ns Some distributions enable rp_filter globally by default, which can interfere with various test cases. To address this, many tests explicitly disable rp_filter within their scripts. To avoid duplication and ensure consistent behavior across tests, this patch moves the rp_filter configuration into setup_ns, applied immediately after a new namespace is created. This change ensures that all namespace-based tests inherit the appropriate rp_filter settings, simplifying individual test scripts and improving maintainability. ==================== Link: https://patch.msgid.link/20250508081910.84216-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit b83d98c1db29062b7d12e6b1157622ae24079b0d Author: Hangbin Liu Date: Thu May 8 08:19:10 2025 +0000 selftests: mptcp: remove rp_filter configuration Remove the rp_filter configuration from MPTCP tests, as it is now handled by setup_ns. Acked-by: Matthieu Baerts (NGI0) Signed-off-by: Hangbin Liu Link: https://patch.msgid.link/20250508081910.84216-7-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 7c8b89ec506e35aea3565461c12c57142a452d35 Author: Hangbin Liu Date: Thu May 8 08:19:09 2025 +0000 selftests: netfilter: remove rp_filter configuration Remove the rp_filter configuration in netfilter lib, as setup_ns already sets it appropriately by default Acked-by: Florian Westphal Signed-off-by: Hangbin Liu Link: https://patch.msgid.link/20250508081910.84216-6-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 3f68f59e9593a3106bb09dc813ad39ea73b4a8bd Author: Hangbin Liu Date: Thu May 8 08:19:08 2025 +0000 selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration Some SRv6 tests manually set up network namespaces and disable rp_filter. Since the setup_ns library function already handles rp_filter configuration, convert these SRv6 tests to use setup_ns and remove the redundant rp_filter settings. Signed-off-by: Hangbin Liu Acked-by: Andrea Mayer Link: https://patch.msgid.link/20250508081910.84216-5-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 69ea46e7d00ec8b72f0c0c71569a8995bcc171ca Author: Hangbin Liu Date: Thu May 8 08:19:07 2025 +0000 selftests: net: use setup_ns for bareudp testing Switch bareudp testing to use setup_ns, which sets up rp_filter by default. This allows us to remove the manual rp_filter configuration from the script. Additionally, since setup_ns handles namespace naming and cleanup, we no longer need a separate cleanup function. We also move the trap setup earlier in the script, before the test setup begins. Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250508081910.84216-4-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 50ad88d57631b368906e6521947c0e8c2a95a895 Author: Hangbin Liu Date: Thu May 8 08:19:06 2025 +0000 selftests: net: remove redundant rp_filter configuration The following tests use setup_ns to create a network namespace, which will disables rp_filter immediately after namespace creation. Therefore, it is no longer necessary to disable rp_filter again within these individual tests. Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250508081910.84216-3-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit ce17831f8e970cadaba88605b4b1b1a8b2b50808 Author: Hangbin Liu Date: Thu May 8 08:19:05 2025 +0000 selftests: net: disable rp_filter after namespace initialization Some distributions enable rp_filter globally by default. To ensure consistent behavior across environments, we explicitly disable it in several test cases. This patch moves the rp_filter disabling logic to immediately after the network namespace is initialized. With this change, individual test cases with creating namespace via setup_ns no longer need to disable rp_filter again. This helps avoid redundancy and ensures test consistency. Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250508081910.84216-2-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit c14e1ecefd9e706262ac713fd27530e3344ef85c Author: Vladimir Oltean Date: Fri May 9 00:10:42 2025 +0300 net: ixp4xx_eth: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the intel ixp4xx ethernet driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. hwtstamp_get() and hwtstamp_set() are only called if netif_running() when the code path is engaged through the legacy ioctl. As I don't want to make an unnecessary functional change which I can't test, preserve that restriction when going through the new operations. When cpu_is_ixp46x() is false, the execution of SIOCGHWTSTAMP and SIOCSHWTSTAMP falls through to phy_mii_ioctl(), which may process it in case of a timestamping PHY, or may return -EOPNOTSUPP. In the new API, the core handles timestamping PHYs directly and does not call the netdev driver, so just return -EOPNOTSUPP directly for equivalent logic. A gratuitous change I chose to do anyway is prefixing hwtstamp_get() and hwtstamp_set() with the driver name, ipx4xx. This reflects modern coding sensibilities, and we are touching the involved lines anyway. The remainder of eth_ioctl() is exactly equivalent to phy_do_ioctl_running(), so use that. Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20250508211043.3388702-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit ef5224ed25e00ccca83749b3b425443c7551ef41 Author: Jakub Kicinski Date: Thu May 8 14:40:05 2025 -0700 selftests: drv-net: ping: make sure the ping test restores checksum offload The ping test flips checksum offload on and off. Make sure the original value is restored if test fails. Reviewed-by: David Wei Link: https://patch.msgid.link/20250508214005.1518013-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2451d3fb388f29d87d1abd3d2952d5ce36109816 Author: Stanislav Fomichev Date: Thu May 8 16:51:09 2025 -0700 net/mlx5: support software TX timestamp Having a software timestamp (along with existing hardware one) is useful to trace how the packets flow through the stack. mlx5e_tx_skb_update_hwts_flags is called from tx paths to setup HW timestamp; extend it to add software one as well. Reviewed-by: Jason Xing Signed-off-by: Stanislav Fomichev Reviewed-by: Vadim Fedorenko Acked-by: Martin KaFai Lau Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250508235109.585096-1-stfomichev@gmail.com Signed-off-by: Jakub Kicinski commit 9b96f82c782c9d3f614c7d34e13382d91bb4854c Author: Gerhard Engleder Date: Fri Apr 25 21:48:23 2025 +0200 hwmon: Add KEBA fan controller support The KEBA fan controller is found in the system FPGA of KEBA PLC devices. It detects if the fan is removed or blocked. For fans with tacho signal the monitoring of the speed of the fan is supported. It also supports to regulate the speed of fans with PWM input. The auxiliary device for this driver is instantiated by the cp500 misc driver. Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20250425194823.54664-1-gerhard@engleder-embedded.com [groeck: Added various missing "break;" statements] Signed-off-by: Guenter Roeck commit 61ddf5faa7cc091b409936d571ec1af34ce487a1 Author: Thorsten Blum Date: Tue Apr 29 12:41:48 2025 +0200 bus: fsl-mc: Use strscpy() instead of strscpy_pad() Both destination buffers are already zero-initialized, making strscpy() sufficient for safely copying 'obj_type'. The additional NUL-padding performed by strscpy_pad() is unnecessary. If the destination buffer has a fixed length, strscpy() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit size arguments unnecessary. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250429104149.66334-1-thorsten.blum@linux.dev Signed-off-by: Christophe Leroy commit 5ddac92be4209f29ec26b3ec59a08fc76afe9ab1 Author: Kees Cook Date: Fri Apr 25 23:20:41 2025 -0700 soc: fsl: qbman: Remove const from portal->cgrs allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct qman_cgrs *", but the returned type, while technically matching, is const qualified. As there is no general way to remove const qualifiers, adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250426062040.work.047-kees@kernel.org Signed-off-by: Christophe Leroy commit 152f33ee30ee6a7f4c15bedd7529dc5945315547 Author: Robin Murphy Date: Fri Apr 25 14:39:28 2025 +0100 bus: fsl_mc: Fix driver_managed_dma check Since it's not currently safe to take device_lock() in the IOMMU probe path, that can race against really_probe() setting dev->driver before attempting to bind. The race itself isn't so bad, since we're only concerned with dereferencing dev->driver itself anyway, but sadly my attempt to implement the check with minimal churn leads to a kind of TOCTOU issue, where dev->driver becomes valid after to_fsl_mc_driver(NULL) is already computed, and thus the check fails to work as intended. Will and I both hit this with the platform bus, but the pattern here is the same, so fix it for correctness too. Reported-by: Will McVicker Fixes: bcb81ac6ae3c ("iommu: Get DT/ACPI parsing into the proper probe path") Signed-off-by: Robin Murphy Reviewed-by: Will McVicker Link: https://lore.kernel.org/r/20250425133929.646493-3-robin.murphy@arm.com Signed-off-by: Christophe Leroy commit 23d060136841c58c2f9ee8c08ad945d1879ead4b Author: Laurentiu Tudor Date: Tue Apr 8 13:58:14 2025 +0300 bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value In case the MC firmware runs in debug mode with extensive prints pushed to the console, the current timeout of 500ms is not enough. Increase the timeout value so that we don't have any chance of wrongly assuming that the firmware is not responding when it's just taking more time. Signed-off-by: Laurentiu Tudor Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit a941bed23c9473665c773453f8a835668af070bf Author: Laurentiu Tudor Date: Tue Apr 8 13:58:13 2025 +0300 bus: fsl-mc: drop useless cleanup This cleanup is actually a no-op because the resources are freed when the device objects are removed from the allocator at driver remove time. Remove the fsl_mc_cleanup_all_resource_pools() function and its call site. Signed-off-by: Laurentiu Tudor Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250408105814.2837951-6-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit a8c17b9cbf87cb9d98d501a16a47e5fe5839e855 Author: Ioana Ciornei Date: Tue Apr 8 13:58:12 2025 +0300 bus: fsl-mc: add the dprc_get_mem() command to the whitelist Add a new MC command to the list of accepted firmware commands. The DPRC_GET_MEM command can be used to gather information on the internal memory characteristics. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250408105814.2837951-5-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit c78230ad34f82c6c0e0e986865073aeeef1f5d30 Author: Wan Junjie Date: Tue Apr 8 13:58:11 2025 +0300 bus: fsl-mc: fix GET/SET_TAILDROP command ids Command ids for taildrop get/set can not pass the check when they are using from the restool user space utility. Correct them according to the user manual. Fixes: d67cc29e6d1f ("bus: fsl-mc: list more commands as accepted through the ioctl") Signed-off-by: Wan Junjie Signed-off-by: Ioana Ciornei Cc: stable@vger.kernel.org Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250408105814.2837951-4-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit dd7d8e012b23de158ca0188239c7a1f2a83b4484 Author: Ioana Ciornei Date: Tue Apr 8 13:58:10 2025 +0300 bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device The fsl-mc bus associated to the root DPRC in a DPAA2 system exports a device file for userspace access to the MC firmware. In case the DPRC's local MC portal (DPMCP) is currently in use, a new DPMCP device is allocated through the fsl_mc_portal_allocate() function. In this case, the call to fsl_mc_portal_allocate() will fail with -EINVAL when trying to add a device link between the root DPRC (consumer) and the newly allocated DPMCP device (supplier). This is because the DPMCP is a dependent of the DPRC device (the bus). Fix this by not adding a device link in case the DPMCP is allocated for the root DPRC's usage. Fixes: afb77422819f ("bus: fsl-mc: automatically add a device_link on fsl_mc_[portal,object]_allocate") Signed-off-by: Ioana Ciornei Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250408105814.2837951-3-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit d694bf8a9acdbd061596f3e7549bc8cb70750a60 Author: Ioana Ciornei Date: Tue Apr 8 13:58:09 2025 +0300 bus: fsl-mc: fix double-free on mc_dev The blamed commit tried to simplify how the deallocations are done but, in the process, introduced a double-free on the mc_dev variable. In case the MC device is a DPRC, a new mc_bus is allocated and the mc_dev variable is just a reference to one of its fields. In this circumstance, on the error path only the mc_bus should be freed. This commit introduces back the following checkpatch warning which is a false-positive. WARNING: kfree(NULL) is safe and this check is probably not required + if (mc_bus) + kfree(mc_bus); Fixes: a042fbed0290 ("staging: fsl-mc: simplify couple of deallocations") Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250408105814.2837951-2-ioana.ciornei@nxp.com Signed-off-by: Christophe Leroy commit 617a7ed073115016e417b518c68c96057f1bf66c Author: Krzysztof Kozlowski Date: Fri Apr 4 13:24:07 2025 +0200 soc: fsl: Do not enable DPAA2_CONSOLE by default during compile testing Enabling the compile test should not cause automatic enabling of such drivers. Signed-off-by: Krzysztof Kozlowski Acked-by: Ioana Ciornei Link: https://lore.kernel.org/r/20250404112407.255126-1-krzysztof.kozlowski@linaro.org Signed-off-by: Christophe Leroy commit 7620eeaa900abe7af3e589851488790f4d811a11 Merge: 941a099ddc438e 5488aa013e9ef1 Author: Linus Walleij Date: Tue May 13 00:39:50 2025 +0200 Merge tag 'renesas-pinctrl-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.16 - Add support for the RZ/V2N (R9A09G056) Soc. Signed-off-by: Linus Walleij commit fd5fd538a1f4b34cee6823ba0ddda2f7a55aca96 Author: Anton Protopopov Date: Sat May 10 18:20:11 2025 +0000 libbpf: Use proper errno value in nlattr Return value of the validate_nla() function can be propagated all the way up to users of libbpf API. In case of error this libbpf version of validate_nla returns -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL. Fixes: bbf48c18ee0c ("libbpf: add error reporting in XDP") Suggested-by: Andrii Nakryiko Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250510182011.2246631-1-a.s.protopopov@gmail.com commit 3a320ed325488d07081461663ac9243293006080 Author: Mykyta Yatsenko Date: Sat May 10 01:24:50 2025 +0100 selftests/bpf: Allow skipping docs compilation Currently rst2man is required to build bpf selftests, as the tool is used by Makefile.docs. rst2man may be missing in some build environments and is not essential for selftests. It makes sense to allow user to skip building docs. This patch adds SKIP_DOCS variable into bpf selftests Makefile that when set to 1 allows skipping building docs, for example: make -C tools/testing/selftests TARGETS=bpf SKIP_DOCS=1 Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250510002450.365613-1-mykyta.yatsenko5@gmail.com commit 2c04e58e30ce858cc2be531298312c67c7d55fc3 Author: Melody Olvera Date: Mon May 12 13:54:43 2025 -0700 soc: qcom: llcc-qcom: Add support for SM8750 Add system cache table and configs for SM8750 SoCs. Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250512-sm8750_llcc_master-v5-3-d78dca6282a5@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9186a0f3e4f2ebdd3e5ef1d87cef0418101a47dc Author: Melody Olvera Date: Mon May 12 13:54:42 2025 -0700 soc: qcom: llcc-qcom: Add support for LLCC V6 Add support for LLCC V6. V6 adds several additional usecase IDs, rearrages several registers and offsets, and supports slice IDs over 31, so add a new function for programming LLCC V6. Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250512-sm8750_llcc_master-v5-2-d78dca6282a5@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 33f7187efd3b5f9e03d50e8209d86a08d215d413 Author: Melody Olvera Date: Mon May 12 13:54:41 2025 -0700 dt-bindings: cache: qcom,llcc: Document SM8750 LLCC block Add documentation for the SM8750 LLCC. Signed-off-by: Melody Olvera Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250512-sm8750_llcc_master-v5-1-d78dca6282a5@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit cdeaeb9dd762d7711241a62459dfb730b2cd0281 Author: Danilo Krummrich Date: Thu Apr 24 18:02:50 2025 +0200 drm: nova-drm: add initial driver skeleton Add the initial nova-drm driver skeleton. nova-drm is connected to nova-core through the auxiliary bus and implements the DRM parts of the nova driver stack. For now, it implements the fundamental DRM abstractions, i.e. creates a DRM device and registers it, exposing a three sample IOCTLs. DRM_IOCTL_NOVA_GETPARAM - provides the PCI bar size from the bar that maps the GPUs VRAM from nova-core DRM_IOCTL_NOVA_GEM_CREATE - creates a new dummy DRM GEM object and returns a handle DRM_IOCTL_NOVA_GEM_INFO - provides metadata for the DRM GEM object behind a given handle I implemented a small userspace test suite [1] that utilizes this interface. Link: https://gitlab.freedesktop.org/dakr/drm-test [1] Reviewed-by: Maxime Ripard Acked-by: Dave Airlie Link: https://lore.kernel.org/r/20250424160452.8070-3-dakr@kernel.org [ Kconfig: depend on DRM=y rather than just DRM. - Danilo ] Signed-off-by: Danilo Krummrich commit e041d81a03777702249f8de16db70fdabdd1ab5f Author: Danilo Krummrich Date: Thu Apr 24 18:02:49 2025 +0200 gpu: nova-core: register auxiliary device for nova-drm Register an auxiliary device for nova-drm. For now always use zero for the auxiliary device's ID; we don't use it yet anyways. However, once it lands, we should switch to XArray. Acked-by: Dave Airlie Link: https://lore.kernel.org/r/20250424160452.8070-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f3061d526714ac6cc936c48e76a6eb0512c69b1a Author: Ian Rogers Date: Tue Mar 18 09:16:39 2025 -0700 perf tests: Harden branch stack sampling test On continuous testing the perf script output can be empty, or nearly empty, causing tr/grep to exit and due to "set -e" the test traps and fails. Add some empty file handling that sets the test to skip and make grep and other text rewriting failures non-fatal by adding "|| true". Committer testing: root@number:~# grep -m1 "model name" /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# perf test "Check branch stack sampling" 104: Check branch stack sampling : Ok root@number:~# root@number:~# perf test -vvvvvvv "Check branch stack sampling" 104: Check branch stack sampling: --- start --- test child forked, pid 396047 142d22-142da0 l brstack_bench perf does have symbol 'brstack_bench' Testing user branch stack sampling Testing branch stack filtering permutation (any_call,CALL|IND_CALL|COND_CALL|SYSCALL|IRQ) Testing branch stack filtering permutation (call,CALL|SYSCALL) Testing branch stack filtering permutation (cond,COND) Testing branch stack filtering permutation (any_ret,RET|COND_RET|SYSRET|ERET) Testing branch stack filtering permutation (call,cond,CALL|SYSCALL|COND) Testing branch stack filtering permutation (any_call,cond,CALL|IND_CALL|COND_CALL|IRQ|SYSCALL|COND) Testing branch stack filtering permutation (cond,any_call,any_ret,COND|CALL|IND_CALL|COND_CALL|SYSCALL|IRQ|RET|COND_RET|SYSRET|ERET) ---- end(0) ---- 104: Check branch stack sampling : Ok root@number:~# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250318161639.34446-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6332351622db251b97639817a0e9ebc6f2394f87 Author: Leo Yan Date: Mon May 12 16:11:49 2025 +0100 arm64: dts: fvp: Add ETE and TRBE nodes for Rev C model The FVP Rev C model includes CoreSight ETE and TRBE support. These features can be enabled by specifying parameters when launching the model: | -C cluster0.has_ete: 1 | -C cluster1.has_ete: 1 | -C cluster0.has_trbe: 1 | -C cluster1.has_trbe: 1 This change adds device tree nodes for the ETE and TRBE. They are disabled by default to prevent kernel warnings from failed driver probes, as the model does not enable the features unless explicitly specified as mentioned above. Signed-off-by: Leo Yan Message-Id: <20250512151149.13111-1-leo.yan@arm.com> Acked-by: Suzuki K Poulose Signed-off-by: Sudeep Holla commit 1fa3ed04ac55134063e3cd465b41aeb26715e52a Author: Sudeep Holla Date: Mon May 12 11:11:32 2025 +0100 arm64: dts: arm: Drop the clock-frequency property from timer nodes Drop the clock-frequency property from the timer nodes, since it must be configured by the boot/secure firmware. Cc: Liviu Dudau Cc: Lorenzo Pieralisi Cc: Mark Rutland Message-Id: <20250512101132.1743920-1-sudeep.holla@arm.com> Signed-off-by: Sudeep Holla commit bbb59b3614a7f0f5cbf4bfc5159c4e6ed81401cb Author: Sudeep Holla Date: Fri May 9 16:46:40 2025 +0100 arm64: dts: fvp: Reserve 64MB for the FF-A firmware in memory map Reserve 64MB of memory at the end of the first bank of DRAM on FVP model. This is mainly for FF-A firmware use, as required by various firmware configurations using the Firmware Framework for Arm (FF-A). This prevents the kernel from overwriting the firmware region. This is also useful when running other firmware configurations(non FF-A based) that rely on usage of 64MB at the end of first DRAM bank. Necessary for proper coexistence of firmware(FF-A partitions) and the OS. Message-Id: <20250509154640.836093-3-sudeep.holla@arm.com> Reviewed-by: Liviu Dudau Signed-off-by: Sudeep Holla commit 44845ea83d5e144b746ad0b5b9976e7fd3a843f9 Author: Sudeep Holla Date: Fri May 9 16:46:39 2025 +0100 arm64: dts: fvp: Add CPU idle states for Rev C model Add CPU idle state definitions to the FVP Rev C device tree to enable support for CPU lower power modes. This allows the system to properly enter low power states during idle. It is disabled by default as it is know to impact performance on the models. Note that the power_state parameter(arm,psci-suspend-param) doesn't use the Extended StateID format for compatibility reasons on FVP. Tested on the FVP Rev C model with PSCI support enabled firmware. Tested-by: Leo Yan Message-Id: <20250509154640.836093-2-sudeep.holla@arm.com> Reviewed-by: Liviu Dudau Signed-off-by: Sudeep Holla commit 7556a55b07c05263c3a28eb527c9cd3f3186fcfe Author: Sudeep Holla Date: Fri May 9 16:46:38 2025 +0100 arm64: dts: fvp: Add system timer for broadcast during CPU idle Introduce a system-level timer node in the FVP device tree to act as a broadcast timer when CPUs are in context losing idle states where the local timer stops on entering such low power states. This change complements recent CPU idle state additions. Tested-by: Leo Yan Message-Id: <20250509154640.836093-1-sudeep.holla@arm.com> Reviewed-by: Liviu Dudau Signed-off-by: Sudeep Holla commit 149e0cf4c99c3ed474b9179bdf06bfa79c22ab5f Merge: 7220eabff8cb4a af8a5125a04c12 Author: Alexei Starovoitov Date: Mon May 12 10:43:43 2025 -0700 Merge branch 'fix-verifier-test-failures-in-verbose-mode' Gregory Bell says: ==================== Fix verifier test failures in verbose mode This patch series fixes two issues that cause false failures in the BPF verifier test suite when run with verbose output (`-v`). The following tests fail only when running the test_verifier in verbose. This leads to inconsistent results across verbose and non-verbose runs. Patch 1 addresses an issue where the verbose flag (`-v`) unintentionally overrides the `opts.log_level`, leading to incorrect contents when checking bpf_vlog in tests with `expected_ret == VERBOSE_ACCEPT`. This occurs when running verbose with `-v` but not `-vv` Patch 2 increases the size of the `bpf_vlog[]` buffer to prevent truncation of large verifier logs, which was causing failures in several scale and 64-bit immediate tests. Before patches: ./test_verifier | grep FAIL Summary: 790 PASSED, 0 SKIPPED, 0 FAILED ./test_verifier -v | grep FAIL Summary: 782 PASSED, 0 SKIPPED, 8 FAILED ./test_verifier -vv | grep FAIL Summary: 787 PASSED, 0 SKIPPED, 3 FAILED After patches: ./test_verifier -v | grep FAIL Summary: 790 PASSED, 0 SKIPPED, 0 FAILED ./test_verifier -vv | grep FAIL Summary: 790 PASSED, 0 SKIPPED, 0 FAILED These fixes improve test reliability and ensure consistent behavior across verbose and non-verbose runs. ==================== Tested-by: Eduard Zingerman Link: https://patch.msgid.link/cover.1747058195.git.grbell@redhat.com Signed-off-by: Alexei Starovoitov commit af8a5125a04c128cbcc1daa21d9ba3e5d95a2fc4 Author: Gregory Bell Date: Mon May 12 10:04:13 2025 -0400 selftests/bpf: test_verifier verbose log overflows Tests: - 458/p ld_dw: xor semi-random 64-bit imms, test 5 - 501/p scale: scale test 1 - 502/p scale: scale test 2 fail in verbose mode due to bpf_vlog[] overflowing. These tests generate large verifier logs that exceed the current buffer size, causing them to fail to load. Increase the size of the bpf_vlog[] buffer to accommodate larger logs and prevent false failures during test runs with verbose output. Signed-off-by: Gregory Bell Link: https://lore.kernel.org/r/e49267100f07f099a5877a3a5fc797b702bbaf0c.1747058195.git.grbell@redhat.com Signed-off-by: Alexei Starovoitov commit c5bcc8c781277eeffe84fe75144af1da76b7ec3e Author: Gregory Bell Date: Mon May 12 10:04:12 2025 -0400 selftests/bpf: test_verifier verbose causes erroneous failures When running test_verifier with the -v flag and a test with `expected_ret==VERBOSE_ACCEPT`, the opts.log_level is unintentionally overwritten because the verbose flag takes precedence. This leads to a mismatch in the expected and actual contents of bpf_vlog, causing tests to fail incorrectly. Reorder the conditional logic that sets opts.log_level to preserve the expected log level and prevent it from being overridden by -v. Signed-off-by: Gregory Bell Link: https://lore.kernel.org/r/182bf00474f817c99f968a9edb119882f62be0f8.1747058195.git.grbell@redhat.com Signed-off-by: Alexei Starovoitov commit 255f5b6d060be5a43de6edf42149b1391f69e3fc Author: Ian Rogers Date: Thu Apr 3 12:43:37 2025 -0700 perf parse-events: Add "cpu" term to set the CPU an event is recorded on The -C option allows the CPUs for a list of events to be specified but its not possible to set the CPU for a single event. Add a term to allow this. The term isn't a general CPU list due to ',' already being a special character in event parsing instead multiple cpu= terms may be provided and they will be merged/unioned together. An example of mixing different types of events counted on different CPUs: ``` $ perf stat -A -C 0,4-5,8 -e "instructions/cpu=0/,l1d-misses/cpu=4,cpu=5/,inst_retired.any/cpu=8/,cycles" -a sleep 0.1 Performance counter stats for 'system wide': CPU0 6,979,225 instructions/cpu=0/ # 0.89 insn per cycle CPU4 75,138 cpu/l1d-misses/ CPU5 1,418,939 cpu/l1d-misses/ CPU8 797,553 cpu/inst_retired.any,cpu=8/ CPU0 7,845,302 cycles CPU4 6,546,859 cycles CPU5 185,915,438 cycles CPU8 2,065,668 cycles 0.112449242 seconds time elapsed ``` Committer testing: root@number:~# grep -m1 "model name" /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# perf stat -A -e "instructions/cpu=0/,instructions,l1d-misses/cpu=4,cpu=5/,cycles" -a sleep 0.1 Performance counter stats for 'system wide': CPU0 2,398,351 instructions/cpu=0/ # 0.44 insn per cycle CPU0 2,398,152 instructions # 0.44 insn per cycle CPU1 1,265,634 instructions # 0.49 insn per cycle CPU2 606,087 instructions # 0.50 insn per cycle CPU3 4,025,752 instructions # 0.52 insn per cycle CPU4 4,236,810 instructions # 0.53 insn per cycle CPU5 3,984,832 instructions # 0.66 insn per cycle CPU6 434,132 instructions # 0.44 insn per cycle CPU7 65,752 instructions # 0.41 insn per cycle CPU8 459,083 instructions # 0.48 insn per cycle CPU9 6,464,161 instructions # 1.31 insn per cycle root@number:~# perf stat -e "instructions/cpu=0/,instructions,l1d-misses/cpu=4,cpu=5/,cycles" -a sleep 0. Performance counter stats for 'system wide': 144,822 instructions/cpu=0/ # 0.03 insn per cycle 4,666,114 instructions # 0.93 insn per cycle 2,583 l1d-misses 4,993,633 cycles 0.000868512 seconds time elapsed root@number:~# Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Cc: Yicong Yang Link: https://lore.kernel.org/r/20250403194337.40202-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 168c7b509109fe26cfcc21650b130ec384ece2aa Author: Ian Rogers Date: Thu Apr 3 12:43:36 2025 -0700 perf parse-events: Set is_pmu_core for legacy hardware events Also set the CPU map to all online CPU maps. This is done so the behavior of legacy hardware and hardware cache events better matches that of sysfs and JSON events during __perf_evlist__propagate_maps(). Fix missing cpumap put in "Synthesize attr update" test. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Cc: Yicong Yang Link: https://lore.kernel.org/r/20250403194337.40202-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f60c3f44689ac2bc33340f37adbc837a4fb79c91 Author: Ian Rogers Date: Thu Apr 3 12:43:35 2025 -0700 perf stat: Use counter cpumask to skip zero values When a counter is 0 it may or may not be skipped. For uncore counters it is common they are only valid on 1 logical CPU and all other CPUs should be skipped. The PMU's cpumask was used for the skip calculation, but that cpumask may not reflect user overrides. Similarly a counter on a core PMU may explicitly not request a CPU be gathered. If the counter on this CPU's value is 0 then the counter should be skipped as it wasn't requested. Switch from using the PMU cpumask to that associated with the evsel to support these cases. Avoid potential crash with --per-thread mode where config->aggr_get_id is NULL. Add some examples for the tool event 0 counter skipping. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Cc: Yicong Yang Link: https://lore.kernel.org/r/20250403194337.40202-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2e7a2f7f3c6e3a991948f04b6fbc376d98ee019c Author: Ian Rogers Date: Thu Apr 3 12:43:34 2025 -0700 libperf cpumap: Add ability to create CPU from a single CPU number Add perf_cpu_map__new_int() so that a CPU map can be created from a single integer. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Cc: Yicong Yang Link: https://lore.kernel.org/r/20250403194337.40202-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 365e02ddb65d443f1ba16af5a4ddcd638f1e7823 Author: Ian Rogers Date: Fri Apr 11 17:47:04 2025 -0700 perf tests metrics: Permission related fixes When permissions are limited running sleep without system wide isn't a good benchmark to run to achieve samples, switch to running noploop. Remove indent for non-success cases. Allow skip for the not counted case. Minor debug changes. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250412004704.2297939-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f0869f31562bde2ed9131665f8f76ef7a3983383 Author: Ian Rogers Date: Fri Apr 11 17:47:03 2025 -0700 perf evsel: Add per-thread warning for EOPNOTSUPP open failues The mrvl_ddr_pmu will return EOPNOTSUPP if opened in per-thread mode. Give a warning for this similar to EINVAL. Doing this better supports metric testing with limited permissions when the mrvl_ddr_pmu is present, as the failure to open causes the test to skip and not fail. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250412004704.2297939-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 17e548405a81665fd14cee960db7d093d1396400 Author: Adrian Hunter Date: Mon May 12 12:39:32 2025 +0300 perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3 The script allows the user to enter patterns to find symbols. The pattern matching characters are converted for use in SQL. For PostgreSQL the conversion involves using the Python maketrans() method which is slightly different in Python 3 compared with Python 2. Fix to work in Python 3. Fixes: beda0e725e5f06ac ("perf script python: Add Python3 support to exported-sql-viewer.py") Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Tony Jones Link: https://lore.kernel.org/r/20250512093932.79854-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 352b088164b5cde15e4d8a66dc8ba36c06f4416b Author: Adrian Hunter Date: Mon May 12 12:39:31 2025 +0300 perf intel-pt: Do not default to recording all switch events On systems with many CPUs, recording extra context switch events can be excessive and unnecessary. Add perf config intel-pt.all-switch-events=false to control the behaviour. Example: # perf config intel-pt.all-switch-events=false # perf record -eintel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.082 MB perf.data ] # perf script -D | grep PERF_RECORD_SWITCH | awk '{print $5}' | uniq -c 5 PERF_RECORD_SWITCH # perf config intel-pt.all-switch-events=true # perf record -eintel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.102 MB perf.data ] # perf script -D | grep PERF_RECORD_SWITCH | awk '{print $5}' | uniq -c 180 PERF_RECORD_SWITCH_CPU_WIDE Committer testing: While doing a make -j28 allmodconfig: root@five:~# grep "model name" -m1 /proc/cpuinfo model name : Intel(R) Core(TM) i7-14700K root@five:~# root@five:~# perf config intel-pt.all-switch-events=false root@five:~# perf record -e intel_pt//u uname Linux [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.019 MB perf.data ] root@five:~# perf report --stats | grep SWITCH_CPU_WIDE root@five:~# root@five:~# perf config intel-pt.all-switch-events=true root@five:~# perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.047 MB perf.data ] root@five:~# perf report --stats | grep SWITCH_CPU_WIDE SWITCH_CPU_WIDE events: 542 (96.4%) root@five:~# Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250512093932.79854-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e00eac6b5b6d956f38d8880c44bf7fd9954063c3 Author: Adrian Hunter Date: Mon May 12 12:39:30 2025 +0300 perf intel-pt: Fix PEBS-via-PT data_src The Fixes commit did not add support for decoding PEBS-via-PT data_src. Fix by adding support. PEBS-via-PT is a feature of some E-core processors, starting with processors based on Tremont microarchitecture. Because the kernel only supports Intel PT features that are on all processors, there is no support for PEBS-via-PT on hybrids. Currently that leaves processors based on Tremont, Gracemont and Crestmont, however there are no events on Tremont that produce data_src information, and for Gracemont and Crestmont there are only: mem-loads event=0xd0,umask=0x5,ldlat=3 mem-stores event=0xd0,umask=0x6 Affected processors include Alder Lake N (Gracemont), Sierra Forest (Crestmont) and Grand Ridge (Crestmont). Example: # perf record -d -e intel_pt/branch=0/ -e mem-loads/aux-output/pp uname Before: # perf.before script --itrace=o -Fdata_src 0 |OP No|LVL N/A|SNP N/A|TLB N/A|LCK No|BLK N/A 0 |OP No|LVL N/A|SNP N/A|TLB N/A|LCK No|BLK N/A After: # perf script --itrace=o -Fdata_src 10268100142 |OP LOAD|LVL L1 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 10450100442 |OP LOAD|LVL L2 hit|SNP None|TLB L2 miss|LCK No|BLK N/A Fixes: 975846eddf907297 ("perf intel-pt: Add memory information to synthesized PEBS sample") Reviewed-by: Kan Liang Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250512093932.79854-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8fcefe7812f246fff86d6f7ad8e166a564916202 Author: Pawel Dembicki Date: Sun May 11 05:55:48 2025 +0200 hwmon: pmbus: mpq8785: Add support for MPM3695 family Add support for the Monolithic Power Systems MPM3695 family. It contains four devices with suffixes: -10, -20, -25 and -100. The device is PMBus compliant and shares characteristics with the MPM82504. MPM3695-25 has different VOLTAGE_SCALE_LOOP register size [11:0] and therefore needs to have a separate compatible entry. Tested with device tree based matching (MPM3695-10). Signed-off-by: Pawel Dembicki Link: https://lore.kernel.org/r/20250511035701.2607947-6-paweldembicki@gmail.com Signed-off-by: Guenter Roeck commit c27291468eb957b11dc81cd35fad36faf0861c07 Author: Pawel Dembicki Date: Sun May 11 05:55:47 2025 +0200 hwmon: pmbus: mpq8785: Add support for MPM82504 Add support for the Monolithic Power Systems MPM82504 digital voltage regulator. MPM82504 uses PMBus direct format for voltage output. Tested with device tree based matching. Signed-off-by: Pawel Dembicki Link: https://lore.kernel.org/r/20250511035701.2607947-5-paweldembicki@gmail.com Signed-off-by: Guenter Roeck commit dc1a4bab48d513e426118e42b9c371d942ddb04b Author: Pawel Dembicki Date: Sun May 11 05:55:46 2025 +0200 hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configuration Implement support for setting the VOUT_SCALE_LOOP PMBus register based on an optional device tree property "mps,vout-fb-divider-ratio-permille". This allows the driver to provide the correct VOUT value depending on the feedback voltage divider configuration for chips where the bootloader does not configure the VOUT_SCALE_LOOP register. Signed-off-by: Pawel Dembicki Link: https://lore.kernel.org/r/20250511035701.2607947-4-paweldembicki@gmail.com Signed-off-by: Guenter Roeck commit 1bc6020dc400ea8290a7b26aa4365d4568e23e27 Author: Pawel Dembicki Date: Sun May 11 05:55:45 2025 +0200 hwmon: pmbus: mpq8785: Prepare driver for multiple device support Refactor the driver to support multiple Monolithic Power Systems devices. Introduce chip ID handling based on device tree matching. No functional changes intended. Signed-off-by: Pawel Dembicki Link: https://lore.kernel.org/r/20250511035701.2607947-3-paweldembicki@gmail.com Signed-off-by: Guenter Roeck commit e00fe40065b874f5622949d5a6734a632b3fd76a Author: Pawel Dembicki Date: Sun May 11 05:55:44 2025 +0200 dt-bindings: hwmon: Add bindings for mpq8785 driver Add device tree bindings for Monolithic Power Systems MPQ8785, MPM82504 and MPM3695 PMBus-compliant voltage regulators. These bindings also documents the optional "mps,vout-fb-divider-ratio-permille" property. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250511035701.2607947-2-paweldembicki@gmail.com Signed-off-by: Pawel Dembicki Signed-off-by: Guenter Roeck commit 0d9f596b1fe3445040c05d0fa3842224fc77810b Author: Wenliang Yan Date: Tue May 6 01:37:40 2025 -0400 hwmon: (ina238) Modify the calculation formula to adapt to different chips Modify the calculation formula to adapt to different chips. Signed-off-by: Wenliang Yan Link: https://lore.kernel.org/r/20250506053741.4837-4-wenliang202407@163.com [groeck: Fixed checkpatch issue (space before and after arithmetic operators)] Signed-off-by: Guenter Roeck commit 6daaf15a11731c32f1c34920b1d22903704375f9 Author: Wenliang Yan Date: Tue May 6 01:37:39 2025 -0400 hwmon: (ina238) Add support for SQ52206 Add support for SQ52206 to the Ina238 driver. Add registers, increase compatibility, add compatibility programs for multiple chips. Signed-off-by: Wenliang Yan Link: https://lore.kernel.org/r/20250506053741.4837-3-wenliang202407@163.com [groeck: Fixed checkpatch issues (alignment, {} placing)] Signed-off-by: Guenter Roeck commit 00ca54bee4b25fb23534f9d8ba3a75ea0f1abc66 Author: Wenliang Yan Date: Tue May 6 01:37:41 2025 -0400 dt-bindings: Add SQ52206 to ina2xx devicetree bindings Add the sq52206 compatible to the ina2xx.yaml Signed-off-by: Wenliang Yan Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250506053741.4837-5-wenliang202407@163.com Signed-off-by: Guenter Roeck commit 024e5cf24327184bb363b6e330550394982b93f8 Author: Wenliang Yan Date: Tue May 6 01:37:38 2025 -0400 hwmon: (ina238) Add ina238_config to save configurations for different chips Add structure ina238_config to store proprietary properties for different chips to meet different chip adaptations Signed-off-by: Wenliang Yan Link: https://lore.kernel.org/r/20250506053741.4837-2-wenliang202407@163.com Signed-off-by: Guenter Roeck commit d92801d8e6b43887ca5acc1713e89e26bbc64643 Author: Rob Herring (Arm) Date: Wed May 7 16:59:12 2025 -0500 dt-bindings: display/msm: hdmi: Fix constraints on additional 'port' properties The MSM HDMI port nodes are missing any restrictions on additional properties. The $ref should be to "/properties/port" rather than "/$defs/port-base" as there are not additional properties in the nodes to define. Signed-off-by: Rob Herring (Arm) Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/652299/ Link: https://lore.kernel.org/r/20250507215912.2748964-1-robh@kernel.org Signed-off-by: Dmitry Baryshkov commit 5a0436e92aa76d6314bb66b0072e2ae397fe816c Author: Aleksandrs Vinarskis Date: Thu May 8 00:59:02 2025 +0200 drm/msm/dp: Introduce link training per-segment for LTTPRs DisplayPort requires per-segment link training when LTTPR are switched to non-transparent mode, starting with LTTPR closest to the source. Only when each segment is trained individually, source can link train to sink. Implement per-segment link traning when LTTPR(s) are detected, to support external docking stations. On higher level, changes are: * Pass phy being trained down to all required helpers * Run CR, EQ link training per phy * Set voltage swing, pre-emphasis levels per phy Since at least some LTTPRs (eg. Parade PS8830) do not correctly report voltage-swing, pre-emphasis level 3 support, always assume level 3 is supported. This is permitted under DP 2.1(a) section 3.6.7.2 stating that LTTPR shall set its transmitter levels as close as possible to those requested by the DPTX, if the DPTX sets the voltage swing or pre-emphasis to a level that the LTTPR does not support. It shall be noted that LTTPR’s level choosing is implementation-specific. This ensures successful link training both when connected directly to the monitor (single LTTPR onboard most X1E laptops) and via the docking station (at least two LTTPRs). Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Tested-by: Jessica Zhang # SA8775P Tested-by: Johan Hovold Tested-by: Rob Clark Tested-by: Stefan Schmidt Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Abel Vesa Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/652305/ Link: https://lore.kernel.org/r/20250507230113.14270-5-alex.vinarskis@gmail.com Signed-off-by: Dmitry Baryshkov commit 7513ccb8840b54e35579f3c2cce08c3443a6e2d4 Author: Aleksandrs Vinarskis Date: Thu May 8 00:59:01 2025 +0200 drm/msm/dp: Prepare for link training per-segment for LTTPRs Per-segment link training requires knowing the number of LTTPRs (if any) present. Store the count during LTTPRs' initialization. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abel Vesa Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Aleksandrs Vinarskis Tested-by: Jessica Zhang # SA8775P Tested-by: Johan Hovold Tested-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/652306/ Link: https://lore.kernel.org/r/20250507230113.14270-4-alex.vinarskis@gmail.com Signed-off-by: Dmitry Baryshkov commit c156fe2dd46774321c8eaaff9a6f04b64e6b9742 Author: Aleksandrs Vinarskis Date: Thu May 8 00:59:00 2025 +0200 drm/msm/dp: Account for LTTPRs capabilities Take into account LTTPR capabilities when selecting maximum allowed link rate, number of data lines. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abel Vesa Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Aleksandrs Vinarskis Tested-by: Jessica Zhang # SA8775P Tested-by: Johan Hovold Tested-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/652302/ Link: https://lore.kernel.org/r/20250507230113.14270-3-alex.vinarskis@gmail.com Signed-off-by: Dmitry Baryshkov commit 9351d3d302060d114de2f0c648579c0aadbd8f72 Author: Aleksandrs Vinarskis Date: Thu May 8 00:58:59 2025 +0200 drm/msm/dp: Fix support of LTTPR initialization Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall (re)read DPRX caps after LTTPR detection, as required by DP 2.1a, Section 3.6.7.6.1. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Aleksandrs Vinarskis Tested-by: Jessica Zhang # SA8775P Tested-by: Johan Hovold Tested-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/652301/ Link: https://lore.kernel.org/r/20250507230113.14270-2-alex.vinarskis@gmail.com Signed-off-by: Dmitry Baryshkov commit de01fc9fa1753f958cf127a0695aa777fee108c7 Author: Dmitry Baryshkov Date: Wed May 7 16:29:06 2025 +0300 drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from SAR2130P CTL blocks Follow the changes in the commit a2649952f66e ("drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0") and remove DPU_CTL_SPLIT_DISPLAY from the CTL blocks on the SAR2130P platform. Single CTL is used for all interfaces used by a single path Fixes: 178575173472 ("drm/msm/dpu: add catalog entry for SAR2130P") Reviewed-by: Marijn Suijten Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/651883/ Link: https://lore.kernel.org/r/20250506-dpu-sar2130p-no-split-display-v1-1-b619c0fddea5@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 7520803bb9aa6754d1300f7c3d319f484df3a54e Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:43 2025 +0200 drm/msm/dpu: Add handling of LM_6 and LM_7 bits in pending flush mask MDSS/MDP v12 comes with new bits in flush registers (e.g. MDP_CTL_0_FLUSH) for Layer Mixer 6 and 7. Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651260/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-13-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit a5539d0fbbe7bf3e3cbb96e813946b0d5c150711 Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:42 2025 +0200 drm/msm/dpu: Add LM_7, DSC_[67], PP_[67] and MERGE_3D_5 Add IDs for new blocks present in MDSS/MDP v12 for LM, DSC, PINGPONG and MERGE_3D blocks. Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651262/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-12-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit b82dd6d2583c1ab6bb7342ee14cfe52107bca99a Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:41 2025 +0200 drm/msm/dpu: Drop useless comments Drop comments about SoC before each 'struct dpu_lm_sub_blks' for given SoC because it's duplicating the actual name of structure. Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651251/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-11-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit 2e162df9f66f280eb614e65be506017fe3ab39b9 Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:40 2025 +0200 drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE before blend setup Before blend setup, all existing blend stages are cleared, so shall be active fetch pipes. Fixes: b3652e87c03c ("drm/msm/disp/dpu1: add support to program fetch active in ctl path") Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651263/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-10-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit 3c072d50aed6fb354d593606b5424c8d1fc30fb7 Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:39 2025 +0200 drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE on ctl_path reset Resetting entire CTL path should also include resetting active fetch pipes. Fixes: e1a950eec256 ("drm/msm/dpu: add reset_intf_cfg operation for dpu_hw_ctl") Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651252/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-9-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit 164e00a9e6fbb8045e1a199972a5215c88a935fa Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:38 2025 +0200 drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE on mixer reset Resetting mixers should also include resetting active fetch pipes. Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to reset the encoder related hw blocks") Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651246/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-8-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit 1d0a6c9e3b0d2efb6274d50e706b9bdbc8ba0aaa Author: Krzysztof Kozlowski Date: Wed Apr 30 15:00:37 2025 +0200 drm/msm/dpu: Add missing "fetch" name to set_active_pipes() The set_active_pipes() callback configures CTL_FETCH_PIPE_ACTIVE and newer DPU v12.0 comes with CTL_PIPE_ACTIVE, thus rename it to set_active_fetch_pipes() to better match the purpose. Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651261/ Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-7-8cab30c3e4df@linaro.org Signed-off-by: Dmitry Baryshkov commit 666832f7c2612345c0c15546f3e0bf3d86ee325a Author: Dmitry Baryshkov Date: Mon May 5 03:55:47 2025 +0300 drm/msm/hdmi: wire in hpd_enable/hpd_disable bridge ops The HDMI driver already has msm_hdmi_hpd_enable() and msm_hdmi_hpd_disable() functions. Wire them into the msm_hdmi_bridge_funcs, so that HPD can be enabled and disabled dynamically rather than always having HPD events generation enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-13-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit b93f19d8d03a9455aef88664c649e86140fe1430 Author: Dmitry Baryshkov Date: Mon May 5 03:14:56 2025 +0300 drm/msm/hdmi: ensure that HDMI is up if HPD is requested The HDMI block needs to be enabled to properly generate HPD events. Make sure it is not turned off in the disable paths if HPD delivery is enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651722/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-12-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 969bbbf7fba2ae09f97df773dc764de11abdb902 Author: Dmitry Baryshkov Date: Mon May 5 03:14:55 2025 +0300 drm/msm/hdmi: expand the HDMI_CFG macro Expand the HDMI_CFG() macro in HDMI config description. It has no added value other than hiding some boilerplate declarations. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651724/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-11-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit a7a1550d04e90a66bf6a9875aaaba392fc426e30 Author: Dmitry Baryshkov Date: Mon May 5 03:14:54 2025 +0300 drm/msm/hdmi: rename hpd_clks to pwr_clks As these clocks are now used in the runtime PM callbacks, they have no connection to 'HPD'. Rename corresponding fields to follow clocks purpose, to power up the HDMI controller. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651720/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-10-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 0c5ec818cc166b4633c5f12e26abfddb57f6af9f Author: Dmitry Baryshkov Date: Mon May 5 03:14:53 2025 +0300 drm/msm/hdmi: implement proper runtime PM handling It is completely not obvious, but the so-called 'hpd' clocks and regulators are required for the HDMI host to function properly. Merge pwr and hpd regulators. Use regulators, clocks and pinctrl to implement proper runtime PM callbacks. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651715/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-9-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 531b4e2c206e5f7dead04d9da84dfa693ac57481 Author: Dmitry Baryshkov Date: Mon May 5 03:14:52 2025 +0300 drm/msm/hdmi: add runtime PM calls to DDC transfer function We must be sure that the HDMI controller is powered on, while performing the DDC transfer. Add corresponding runtime PM calls to msm_hdmi_i2c_xfer(). Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651727/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-8-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 81aa83419706e74ad150a229cd3ada28a1afc35a Author: Dmitry Baryshkov Date: Mon May 5 03:14:51 2025 +0300 drm/msm/hdmi: switch to pm_runtime_resume_and_get() The pm_runtime_get_sync() function is a bad choise for runtime power management. Switch HDMI driver to pm_runtime_resume_and_get() and add proper error handling, while we are at it. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651713/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-7-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 15a5223dc6553c583a00e4f4afb106fa80b15f01 Author: Dmitry Baryshkov Date: Mon May 5 03:14:50 2025 +0300 drm/msm/hdmi: switch to clk_bulk API The last platform using legacy clock names for HDMI block (APQ8064) switched to new clock names in 5.16. It's time to stop caring about old DT, drop hand-coded helpers and switch to clk_bulk_* API. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651716/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-6-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit a6984a3f9a5aef20c0bb17922c6e9a404ca9ef3a Author: Dmitry Baryshkov Date: Mon May 5 03:14:49 2025 +0300 drm/msm/hdmi: drop clock frequency assignment The only clock which has frequency being set through hpd_freqs is the "core" aka MDSS_HDMI_CLK clock. It always has the specified frequency, so we can drop corresponding clk_set_rate() call together with the hpd_freq infrastructure. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651717/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-5-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 7e53b0a98f1d425b48a10434efccbe9018536f4f Author: Dmitry Baryshkov Date: Mon May 5 03:14:48 2025 +0300 drm/msm/hdmi: simplify extp clock handling With the extp being the only "power" clock left, remove the surrounding loops and handle the extp clock directly. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651710/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-4-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit e300f26b7e10cb4553352daebfc8a67ca12441e9 Author: Dmitry Baryshkov Date: Mon May 5 03:14:47 2025 +0300 drm/msm/hdmi: move the alt_iface clock to the hpd list According to the vendor kernel [1] , the alt_iface clock should be enabled together with the rest of HPD clocks, to make HPD to work properly. [1] https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/e07a5487e521e57f76083c0a6e2f995414ac6d03 Reviewed-by: Jessica Zhang Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651709/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-3-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 72dff0b04e40ca2fd28b07e8f237b1145e60de8d Author: Dmitry Baryshkov Date: Mon May 5 03:14:46 2025 +0300 drm/msm/hdmi: convert clock and regulator arrays to const arrays As a preparation to the next patches convert 'static const char *' arrays to 'static const char * const', as required by the checkpatch.pl Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/651705/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-2-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 90957ca46abe41f61b318a18852eaed1aa828f11 Author: Dmitry Baryshkov Date: Mon May 5 03:14:45 2025 +0300 dt-bindings: display/msm/hdmi: drop obsolete GPIOs from schema The commit 68e674b13b17 ("drm/msm/hdmi: drop unused GPIO support") dropped support for obsolete qcom,hdmi-tx-mux-* gpios. They were not used by any of the upstream platforms. Drop them from the bindings too. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/651708/ Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-1-48541f76318c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit be0e9a3727872783bad0752dc82e0857f4776049 Author: Ryan Walklin Date: Sun May 11 22:31:17 2025 +1200 clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support The DE33 is a newer version of the Allwinner Display Engine IP block, found in the H616, H618, H700 and T507 SoCs. DE2 and DE3 are already supported by the mainline driver. The DE33 in the H616 has mixer0 and writeback units. The clocks and resets required are identical to the H3 and H5 respectively, so use those existing structs for the H616 description. There are two additional 32-bit registers (at offsets 0x24 and 0x28) which require clearing and setting respectively to bring up the hardware. The function of these registers is currently unknown, and the values are taken from the out-of-tree driver. Add the required clock description struct and compatible string to the DE2 driver. Signed-off-by: Ryan Walklin Link: https://patch.msgid.link/20250511104042.24249-9-ryan@testtoast.com Signed-off-by: Chen-Yu Tsai commit ab1a94b504b6f19c294786b5920574fb374fb5cc Author: Ryan Walklin Date: Sun May 11 22:31:15 2025 +1200 dt-bindings: allwinner: add H616 DE33 clock binding The Allwinner H616 and variants have a new display engine revision (DE33). Add a clock binding for the DE33. Signed-off-by: Ryan Walklin Acked-by: Conor Dooley Reviewed-by: Chen-Yu Tsai Link: https://patch.msgid.link/20250511104042.24249-7-ryan@testtoast.com Signed-off-by: Chen-Yu Tsai commit d58a73c96d8ae87936579689af1dd60a09bda432 Author: Conor Dooley Date: Mon May 12 14:48:14 2025 +0100 dt-bindings: cache: add specific RZ/Five compatible to ax45mp When the binding was originally written, it was assumed that all ax45mp-caches had the same properties etc. This has turned out to be incorrect, as the QiLai SoC has a different number of cache-sets. Add a specific compatible for the RZ/Five for property enforcement and in case there turns out to be additional differences between these implementations of the cache controller. Acked-by: Ben Zong-You Xie Reviewed-by: Geert Uytterhoeven Signed-off-by: Conor Dooley commit b170eb0d117d991585eb857a8e48be122efb057e Author: Tanmay Shah Date: Tue May 6 09:59:44 2025 -0700 remoteproc: xlnx: Avoid RPU force power down Powering off RPU using force_pwrdwn call results in system failure if there are multiple users of that RPU node. Better mechanism is to use request_node and release_node EEMI calls. With use of these EEMI calls, platform management controller will take-care of powering off RPU when there is no user. Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20250506165944.1109534-1-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit 615f8f5077fc8d399818bda2a18bcc89debeb7a8 Author: Keguang Zhang Date: Thu May 8 11:28:42 2025 +0800 mtd: rawnand: loongson1: Fix inconsistent refcounting in ls1x_nand_chip_init() As reported by Dan, commit d2d10ede04b1 ("mtd: rawnand: Add Loongson-1 NAND Controller Driver"), leads to the following Smatch static checker warning: drivers/mtd/nand/raw/loongson1-nand-controller.c:730 ls1x_nand_chip_init() warn: inconsistent refcounting 'chip_np->kobj.kref.refcount.refs.counter': Fix this issue by calling of_node_put() immediately after using chip_np. In addition, remove all unnecessary of_node_put(chip_np) calls. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aBR535RZZT-sa6QZ@stanley.mountain/ Fixes: d2d10ede04b1 ("mtd: rawnand: Add Loongson-1 NAND Controller Driver") Signed-off-by: Keguang Zhang Signed-off-by: Miquel Raynal commit 0d470c72bea4d9f4c24b304fefdc857979cb5ca0 Author: Dan Carpenter Date: Fri May 2 11:39:29 2025 +0300 mtd: rawnand: loongson1: Fix error code in ls1x_nand_dma_transfer() The "desc" variable is NULL and PTR_ERR(NULL) is zero/success. Return a negative error code instead. Fixes: d2d10ede04b1 ("mtd: rawnand: Add Loongson-1 NAND Controller Driver") Signed-off-by: Dan Carpenter Signed-off-by: Miquel Raynal commit 2538406172989c04a49447e7adfac1bdbbba6567 Author: Johannes Berg Date: Sun May 11 19:53:09 2025 +0300 wifi: iwlwifi: cfg: clean up dr/br configs We don't need the configs that won't end up being used, such as the "br" config for discrete devices, remove them. Also remove the module firmware for test chips, that's never needed. For now keep the iwl_dr_mac_cfg even if it's unused, we'll add platforms with it once we have their PCI IDs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.15e2056ec40f.I75a6ce4ad0b14d2b4413615f05523a8f62f08954@changeid commit fabddb0267607d483408308d113ec8599038ec04 Author: Pagadala Yesu Anjaneyulu Date: Sun May 11 19:53:08 2025 +0300 wifi: iwlwifi: Add helper function to extract device ID Add iwl_trans_get_device_id() to extract the device ID from the hw_id member in the iwl_trans structure. hw_id member contains both sub-device ID and device ID, with the device ID occupying bits 16 to 31. Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.4411402701f2.I81cde20de05e3bb993977f8d4bbf90707819347f@changeid commit 691f1f69ba312410a1fe16fff071ac7fbced1fc7 Author: Johannes Berg Date: Sun May 11 19:53:07 2025 +0300 wifi: iwlwifi: cfg: mark Ty devices as discrete Looks like these were never marked discrete, since they always used the iwl_so_mac_cfg (earlier iwl_so_trans_cfg). Mark them as discrete since they are. Signed-off-by: Johannes Berg PerCI-Ready: Miriam Rachel Korenblit Tested-by: Miriam Rachel Korenblit Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250511195137.f3a75ae80f28.I79964f4426389f04798b70841a9e847be48bf9c3@changeid commit d227b73f1ed5f33d526378c4a70a8fbe13244428 Author: Johannes Berg Date: Sat May 10 21:48:27 2025 +0300 wifi: iwlwifi: cfg: remove MAC type/step matching Now that it's all split into MAC and RF configs, remove the matching on MAC type and step. If we ever need to do something based on the MAC step, we'll have to find some new mechanism (since the MAC type is known already from the PCI IDs table, but not the step), or just handle the (likely small) differences in code. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.fca99a5ab315.Iae27b781221fd29845493adf2c29d9e4f7a9c33b@changeid commit b745c307d0a849c26e29f486cb890f50ed637faa Author: Johannes Berg Date: Sat May 10 21:48:26 2025 +0300 wifi: iwlwifi: cfg: add a couple of older devices There are some devices that are misidentified, such as 7265-N and Killer 1435 variants. Add their names, and for some of them also add the PCI IDs to match at all. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.ca03a90c294e.I04d64964c664d49ab16760d754968f09c607f36a@changeid commit 910edaea547cfde9f67b47110d11f3adfe254bba Author: Johannes Berg Date: Sat May 10 21:48:25 2025 +0300 wifi: iwlwifi: cfg: fix PE RF names There are a couple of variants of this, match them correctly to their names and clean up a bit. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.d03eaad5be56.I276a09f0cad364e51ed4730ca81fbe504e61f2c7@changeid commit 9e4cb38739574b21e5a1ee0b05c3bf5aebf3d347 Author: Johannes Berg Date: Sat May 10 21:48:24 2025 +0300 wifi: iwlwifi: cfg: fix and clean up FM/WH device matching We only need a few entries, and there don't seem to be any such devices actually limited to 160 MHz. Also add PCI IDs for the new Killer device on LNL platforms. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.ba2964bee671.If7aaaf10b236115e39b17d37296341de6c821069@changeid commit 7f3791cbe3cf0aa35d4269e1ec5497a9c09761f3 Author: Johannes Berg Date: Sat May 10 21:48:23 2025 +0300 wifi: iwlwifi: cfg: clean up GF device matching Again some names don't actually exist, and we only need a few entries to cover Ty (discrete) and AX211/AX411. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.8888f6798581.If332ebfc3b3f4a335a79ccee13e90f93b1ee4df7@changeid commit 1d5253681ff11c9968453b5c1352de55947755c5 Author: Johannes Berg Date: Sat May 10 21:48:22 2025 +0300 wifi: iwlwifi: cfg: clean up JF device matching This really only needs to be distinguished based on the RF type, bandwidth limit and possibly diversity (JF1). Some of the names that are defined don't even exist. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.bca83604aa92.I35301d2d8b57c072284fff7bf6682b4a9424e56c@changeid commit 3de6694beb491b086a538e18c6e20f4434366525 Author: Johannes Berg Date: Sat May 10 21:48:21 2025 +0300 wifi: iwlwifi: tests: make subdev match test more precise It's OK to match with subdevice_mask as long as that doesn't overlap the RF ID/BW limit/cores fields in that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.87cc0ad360a8.I9be361caedd7258e8e817d4100c549681396f307@changeid commit daf14c9da14611d075eeb957b3afe3f6631956e4 Author: Johannes Berg Date: Sat May 10 21:48:20 2025 +0300 wifi: iwlwifi: cfg: clean up HR device matching We only need a few entries on top of the Killer ones. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.fa0cde465de0.I6a3f9ed9a7341e2c58c69af50a9f126992a745f2@changeid commit 0efcd6bbabdd02898e4c9a3dd60fd1af204f7276 Author: Johannes Berg Date: Sat May 10 21:48:19 2025 +0300 wifi: iwlwifi: cfg: unify and add some Killer devices Unify a number of Killer devices now that we no longer need to distinguish the MAC type, and add a few more that wouldn't have gotten the right name before. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.a16b1c2740f8.I147b97ef2c8e99451806ea0e34a9eb5bff37c326@changeid commit 30e6a08a7c4706c7006610fc458d0c4b6ba2ba9b Author: Johannes Berg Date: Sat May 10 21:48:18 2025 +0300 wifi: iwlwifi: cfg: fix and unify Killer/JF configs All of these should be 160 MHz, and they can be recognised by just the subdevice ID. Unify all the Killer/JF entries. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.a93788f159ec.I114f09a0f61849ac3b75d12d7def35be842e5b7c@changeid commit 0d3e538131e018c77d6361ba25cf72cd58dfd75f Author: Johannes Berg Date: Sat May 10 21:48:17 2025 +0300 wifi: iwlwifi: cfg: fix Ma device configs These should be according to their RF type, not just use GF unconditionally. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.4dd365eb76cd.I91f368df691a3ce6c545d9cdc44676e7883efa16@changeid commit b1c3640d3ed06d787143c9b55cd3b683e2845ead Author: Johannes Berg Date: Sat May 10 21:48:16 2025 +0300 wifi: iwlwifi: cfg: fix some device names Officially, the device names have dashes ("Wireless-N"), so add them. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.4f7bbd57680f.Ida19b5e696723db5839c13341d6ca7085e8c2568@changeid commit 11c7ebe30a1208d5dc59e59ed699dd50dd412aef Author: Johannes Berg Date: Sat May 10 21:48:15 2025 +0300 wifi: iwlwifi: cfg: remove some unused names There are a couple of old names that don't actually get used. Remove them. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.1ed5fc197ba0.I52d7bb49db24523ad93ad83a89c8e846d9a43241@changeid commit 6ed7430bdd00fda5ddc796ab447931c47b2a4e83 Author: Somashekhar Puttagangaiah Date: Sat May 10 21:48:14 2025 +0300 wifi: iwlwifi: mld: add debug log instead of warning During link selection if the links does not meet the valid grade criteria then add debug log instead of warning. Signed-off-by: Somashekhar Puttagangaiah Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.2593268ca988.I9786126cd1078caec8587b166a7f8735300c951d@changeid commit 015b5fee8fdfbb77aed3dab2aee51aa47496c66c Author: Johannes Berg Date: Sat May 10 21:48:13 2025 +0300 wifi: iwlwifi: dbg: fix dump trigger split check Evidently, I confused the fields here, apply_policy should be checked for IWL_FW_INI_APPLY_POLICY_SPLIT_DUMP_RESET. Fix that. Signed-off-by: Johannes Berg Reviewed-by: Eilon Rinat Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250510214621.c802d5cc1312.I0cf5d74f91349499ab35eef0ebdc604961e492ef@changeid commit 8fb7aee05591fd4d3dca1460448a59e95fa821c3 Author: Pavel Begunkov Date: Fri May 9 12:12:54 2025 +0100 io_uring: drain based on allocates reqs Don't rely on CQ sequence numbers for draining, as it has become messy and needs cq_extra adjustments. Instead, base it on the number of allocated requests and only allow flushing when all requests are in the drain list. As a result, cq_extra is gone, no overhead for its accounting in aux cqe posting, less bloating as it was inlined before, and it's in general simpler than trying to track where we should bump it and where it should be put back like in cases of overflow. Also, it'll likely help with cleaning and unifying some of the CQ posting helpers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/46ece1e34320b046c06fee2498d6b4cd12a700f2.1746788718.git.asml.silence@gmail.com Link: https://lore.kernel.org/r/24497b04b004bceada496033d3c9d09ff8e81ae9.1746944903.git.asml.silence@gmail.com [axboe: fold in fix from link2] Signed-off-by: Jens Axboe commit 8e66be071bd4d44e8870a37d2e1a9109c47ef22e Author: Bartosz Szczepanek Date: Wed Apr 23 08:56:36 2025 +0000 ACPI: tables: Improve logging around acpi_initialize_tables() Emit a warning that includes return code in a readable format. Example: ACPI: Failed to initialize tables, status=0x5 (AE_NOT_FOUND) No other functional changes intended. Signed-off-by: Bartosz Szczepanek Link: https://patch.msgid.link/20250423085637.38658-1-bsz@amazon.de [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 6b2ffe2bb0157e1295f920090071c985e89ce893 Author: Andy Shevchenko Date: Mon Mar 31 10:23:11 2025 +0300 ACPI: VIOT: Remove (explicitly) unused header The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko Reviewed-by: Jean-Philippe Brucker Link: https://patch.msgid.link/20250331072311.3987967-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 0a07a5af234b8cc6c2982e5c1e7bdff806902e16 Author: Tony Luck Date: Mon May 5 10:38:19 2025 -0700 ACPI: Add documentation for exposing MRRM data Initial implementation provides enumeration of the address ranges NUMA node numbers, and BIOS assigned region IDs for each range. Signed-off-by: Tony Luck Link: https://patch.msgid.link/20250505173819.419271-4-tony.luck@intel.com Signed-off-by: Rafael J. Wysocki commit 04f53540f791f160b42710ea64aeba8edc9753cd Author: Tony Luck Date: Mon May 5 10:38:18 2025 -0700 ACPI: MRRM: Add /sys files to describe memory ranges Perf and resctrl users need an enumeration of which memory addresses are bound to which "region" tag. Parse the ACPI MRRM table and add /sys entries for each memory range describing base address, length, NUMA node, and which region tags apply for same-socket and cross-socket access. Signed-off-by: Tony Luck Link: https://patch.msgid.link/20250505173819.419271-3-tony.luck@intel.com Signed-off-by: Rafael J. Wysocki commit b9020bdb9f76b58117f9902db3047693fd12b11b Author: Tony Luck Date: Mon May 5 10:38:17 2025 -0700 ACPI: MRRM: Minimal parse of ACPI MRRM table The resctrl file system code needs to know how many region tags are supported. Parse the ACPI MRRM table and save the max_mem_region value. Provide a function for resctrl to collect that value. Signed-off-by: Tony Luck Link: https://patch.msgid.link/20250505173819.419271-2-tony.luck@intel.com Signed-off-by: Rafael J. Wysocki commit fec2686d4d94f91056e510c541a76c192a45a7a0 Merge: 18eb45b67544b9 0e9fd691a70265 Author: Rafael J. Wysocki Date: Mon May 12 15:42:34 2025 +0200 Merge ACPICA material for 6.16 to satisfy dependencies * acpica: (30 commits) ACPICA: Update copyright year ACPICA: Logfile: Changes for version 20250404 ACPICA: Replace strncpy() with memcpy() ACPICA: Apply ACPI_NONSTRING in more places ACPICA: Avoid sequence overread in call to strncmp() ACPICA: Adjust the position of code lines ACPICA: actbl2.h: ACPI 6.5: RAS2: Rename structure and field names of the RAS2 table ACPICA: Apply ACPI_NONSTRING ACPICA: Introduce ACPI_NONSTRING ACPICA: actbl2.h: ERDT: Add typedef and other definitions ACPICA: infrastructure: Add new DMT_BUF types and shorten a long name ACPICA: Utilities: Fix spelling mistake "Incremement" -> "Increment" ACPICA: MRRM: Some cleanups ACPICA: actbl2: Add definitions for RIMT ACPICA: actbl2.h: MRRM: Add typedef and other definitions ACPICA: infrastructure: Add new header and ACPI_DMT_BUF26 types ACPICA: Interpret SIDP structures in DMAR ACPICA: utilities: Fix overflow check in vsnprintf() ACPICA: Apply pack(1) to union aml_resource ACPICA: Drop stale comment about the header file content ... commit 0e9fd691a7026580708a5f22f18fca0e58b61899 Author: Saket Dumbre Date: Thu Apr 3 22:21:13 2025 -0700 ACPICA: Update copyright year ACPICA commit 45253be18b3f37d46cd0072aa3f8a0a21a70e0a4 Changes needed by acpisrc to update copyright year when building for release. Link: https://github.com/acpica/acpica/commit/45253be1 Signed-off-by: Saket Dumbre Signed-off-by: Rafael J. Wysocki commit 403e7508c46981db9a01249c6e97852a2697de04 Author: Saket Dumbre Date: Fri Apr 25 21:33:58 2025 +0200 ACPICA: Logfile: Changes for version 20250404 ACPICA commit 52de9040740c562a35244de19d21c0313964c874 Link: https://github.com/acpica/acpica/commit/52de9040 Signed-off-by: Saket Dumbre Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2251077.Icojqenx9y@rjwysocki.net commit ebf27765421c9238b7835d32a95e4a7fb8db26a4 Author: Ahmed Salem Date: Fri Apr 25 21:32:12 2025 +0200 ACPICA: Replace strncpy() with memcpy() ACPICA commit 83019b471e1902151e67c588014ba2d09fa099a3 strncpy() is deprecated for NUL-terminated destination buffers[1]. Use memcpy() for length-bounded destinations. Link: https://github.com/KSPP/linux/issues/90 [1] Link: https://github.com/acpica/acpica/commit/83019b47 Signed-off-by: Ahmed Salem Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1910878.atdPhlSkOF@rjwysocki.net commit 70662db73d5455ebc8a1da29973fa70237b18cd2 Author: Ahmed Salem Date: Fri Apr 25 21:31:05 2025 +0200 ACPICA: Apply ACPI_NONSTRING in more places ACPICA commit 1035a3d453f7dd49a235a59ee84ebda9d2d2f41b Add ACPI_NONSTRING for destination char arrays without a terminating NUL character. This is a follow-up to commit 35ad99236f3a ("ACPICA: Apply ACPI_NONSTRING") where not all instances received the same treatment, in preparation for replacing strncpy() calls with memcpy() Link: https://github.com/acpica/acpica/commit/1035a3d4 Signed-off-by: Ahmed Salem Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3833065.MHq7AAxBmi@rjwysocki.net commit 64b9dfd0776e9c38d733094859a09f13282ce6f8 Author: Ahmed Salem Date: Fri Apr 25 21:30:27 2025 +0200 ACPICA: Avoid sequence overread in call to strncmp() ACPICA commit 8b83a8d88dfec59ea147fad35fc6deea8859c58c ap_get_table_length() checks if tables are valid by calling ap_is_valid_header(). The latter then calls ACPI_VALIDATE_RSDP_SIG(Table->Signature). ap_is_valid_header() accepts struct acpi_table_header as an argument, so the signature size is always fixed to 4 bytes. The problem is when the string comparison is between ACPI-defined table signature and ACPI_SIG_RSDP. Common ACPI table header specifies the Signature field to be 4 bytes long[1], with the exception of the RSDP structure whose signature is 8 bytes long "RSD PTR " (including the trailing blank character)[2]. Calling strncmp(sig, rsdp_sig, 8) would then result in a sequence overread[3] as sig would be smaller (4 bytes) than the specified bound (8 bytes). As a workaround, pass the bound conditionally based on the size of the signature being passed. Link: https://uefi.org/specs/ACPI/6.5_A/05_ACPI_Software_Programming_Model.html#system-description-table-header [1] Link: https://uefi.org/specs/ACPI/6.5_A/05_ACPI_Software_Programming_Model.html#root-system-description-pointer-rsdp-structure [2] Link: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overread [3] Link: https://github.com/acpica/acpica/commit/8b83a8d8 Signed-off-by: Ahmed Salem Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2248233.Mh6RI2rZIc@rjwysocki.net commit 5f3cf23f7248d972de12e0bdf42a16eabf5b2b31 Author: Zhe Qiao Date: Fri Apr 25 21:29:48 2025 +0200 ACPICA: Adjust the position of code lines ACPICA commit 5da6daf5691169d2bf2e5c9e55baf093757312ca In the acpica/utcache.c file, adjust the position of the "ACPI_MEM_TRACKING(cache->total_allocated++);" code line to ensure that the increment operation on total_allocated is included within the ACPI_DBG_TRACK_ALLOCATIONS configuration. Link: https://github.com/acpica/acpica/commit/5da6daf5 Signed-off-by: Zhe Qiao Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2670567.Lt9SDvczpP@rjwysocki.net commit d46825d2e505caa52d6f9e614575c364fd2190c6 Author: Shiju Jose Date: Fri Apr 25 21:29:12 2025 +0200 ACPICA: actbl2.h: ACPI 6.5: RAS2: Rename structure and field names of the RAS2 table ACPICA commit 2c8a38f747de9d977491a494faf0dfaf799b777b Rename the structure and field names of the RAS2 table to shorten them and avoid long lines in the ACPI RAS2 drivers. 1. struct acpi_ras2_shared_memory to struct acpi_ras2_shmem 2. In struct acpi_ras2_shared_memory: fields, - set_capabilities[16] to set_caps[16] - num_parameter_blocks to num_param_blks - set_capabilities_status to set_caps_status 3. struct acpi_ras2_patrol_scrub_parameter to struct acpi_ras2_patrol_scrub_param 4. In struct acpi_ras2_patrol_scrub_parameter: fields, - patrol_scrub_command to command - requested_address_range to req_addr_range - actual_address_range to actl_addr_range Link: https://github.com/acpica/acpica/commit/2c8a38f7 Signed-off-by: Shiju Jose Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1942053.CQOukoFCf9@rjwysocki.net commit 2b82118845e04c7adf4ece797150c19809bab29b Author: Kees Cook Date: Fri Apr 25 21:28:34 2025 +0200 ACPICA: Apply ACPI_NONSTRING ACPICA commit ed68cb8e082e3bfbba02814af4fd5a61247f491b Add ACPI_NONSTRING annotations for places found that are using char arrays without a terminating NUL character. These were found during Linux kernel builds and after looking for instances of arrays of size ACPI_NAMESEG_SIZE. Link: https://github.com/acpica/acpica/commit/ed68cb8e Signed-off-by: Kees Cook Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2039736.usQuhbGJ8B@rjwysocki.net commit 6da5e6f3028d46e4fee7849e85eda681939c630b Author: Kees Cook Date: Fri Apr 25 21:27:58 2025 +0200 ACPICA: Introduce ACPI_NONSTRING ACPICA commit 878823ca20f1987cba0c9d4c1056be0d117ea4fe In order to distinguish character arrays from C Strings (i.e. strings with a terminating NUL character), add support for the "nonstring" attribute provided by GCC. (A better name might be "ACPI_NONCSTRING", but that's the attribute name, so stick to the existing naming convention.) GCC 15's -Wunterminated-string-initialization will warn about truncation of the NUL byte for string initializers unless the destination is marked with "nonstring". Prepare for applying this attribute to the project. Link: https://github.com/acpica/acpica/commit/878823ca Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1841930.VLH7GnMWUR@rjwysocki.net Signed-off-by: Kees Cook [ rjw: Pick up the tag from Kees ] Signed-off-by: Rafael J. Wysocki commit e91e596431490f8f55572e4cd43dd51a82f00033 Author: Tony Luck Date: Fri Apr 25 21:27:24 2025 +0200 ACPICA: actbl2.h: ERDT: Add typedef and other definitions ACPICA commit dddd9270531d74af523afa68515d8aae6a18bbe0 The ERDT table (and its many subtables) enumerate capabilities and methods for Intel Resource Director Technology to monitor and control L3 cache allocation and memory bandwidth by CPU cores and IO devices. Structure defined in the Intel Resource Director Technology (RDT) Architecture specification downloadable from www.intel.com/sdm Link: https://github.com/acpica/acpica/commit/dddd9270 Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3296755.5fSG56mABF@rjwysocki.net commit 5833942db741bb321a8557511969c04481086c81 Author: Tony Luck Date: Fri Apr 25 21:26:44 2025 +0200 ACPICA: infrastructure: Add new DMT_BUF types and shorten a long name ACPICA commit b8713f71b4023a0396fe61503bbbf5226e5eed1b Some ERDT subtables have 11 and 24 byte reserved fields. Add the ACPI_DMT_BUF11 and ACPI_DMT_BUF24 types to describe these reserved fields in struct acpi_dmtable_info structures. Shorten the ACPI_SUBTABLE_HEADER_16 name to ACPI_SUBTBL_HDR Link: https://github.com/acpica/acpica/commit/b8713f71 Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3643286.iIbC2pHGDl@rjwysocki.net commit ddcc2171f4999204a80919151f237fdc47714633 Author: Colin Ian King Date: Fri Apr 25 21:26:03 2025 +0200 ACPICA: Utilities: Fix spelling mistake "Incremement" -> "Increment" ACPICA commit 0faa6e20cfe56fdaefc37a38f8fd04e3137fcdad There is a spelling mistake in a literal string. Fix it. Fixes: ff5340f8ac94 ("ACPICA: Reference count: add additional debugging details") Link: https://github.com/acpica/acpica/commit/0faa6e20 Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/7814589.EvYhyI6sBW@rjwysocki.net [ rjw: Fix up the Fixes: tag ] Signed-off-by: Rafael J. Wysocki commit 6d788e6848ce25e57afc7c1edaf7a925edf940d4 Author: Tony Luck Date: Fri Apr 25 21:25:23 2025 +0200 ACPICA: MRRM: Some cleanups ACPICA commit 022e2e4169841f429dbda677a4780830bf4c2177 1) Added source specification to MRRM table comment in actbl2.h 2) Shorten typedef from ACPI_TABLE_MRRM_MEM_RANGE_ENTRY to struct acpi_mrrm_mem_range_entry 3) Add new typedefs to source/tools/acpisrc/astable.c 4) Fix cut and paste errors in acpi_dm_table_info_mrrm0[] definition 5) Fix indent and source code style errors in actbl2.h 6) The base/length fields in the memory range structure are system memory addresses, not "MMIO". Update the acpi_dm_table_info_mrrm0[] strings. 7) Add main/sub table comments to acpi_dm_dump_mrrm() and dt_compile_mrrm() Link: https://github.com/acpica/acpica/commit/022e2e41 Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2018955.PYKUYFuaPT@rjwysocki.net commit ced63370237ae86d6d51fa58cc7bc2e3b7f6457c Author: Sunil V L Date: Fri Apr 25 21:24:41 2025 +0200 ACPICA: actbl2: Add definitions for RIMT ACPICA commit 73c32bc89cad64ab19c1231a202361e917e6823c RISC-V IO Mapping Table (RIMT) is a new static table defined for RISC-V to communicate IOMMU information to the OS. The specification for RIMT is available at [1]. Add structure definitions for RIMT. Link: https://github.com/riscv-non-isa/riscv-acpi-rimt [1] Link: https://github.com/acpica/acpica/commit/73c32bc8 Signed-off-by: Sunil V L Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/10665648.nUPlyArG6x@rjwysocki.net commit ec0ed62b076048528c8951ba6691b43a005f1021 Author: Tony Luck Date: Fri Apr 25 21:24:02 2025 +0200 ACPICA: actbl2.h: MRRM: Add typedef and other definitions ACPICA commit 04fd53b2647b9f6f98cfca551383689cb3b59362 The MRRM table describes association between physical address ranges and "region numbers". Structure defined in the Intel Resource Director Technology (RDT) Architecture specification downloadable from www.intel.com/sdm Link: https://github.com/acpica/acpica/commit/04fd53b2 Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3372188.44csPzL39Z@rjwysocki.net commit 67f9d690c94ad97f03e055e1444f5471b2d44e4c Author: Tony Luck Date: Fri Apr 25 21:23:17 2025 +0200 ACPICA: infrastructure: Add new header and ACPI_DMT_BUF26 types ACPICA commit 52840d3826bd7e183fcb555e044e190aea0b5021 New MRRM tables can have subtables that are larger than 255 bytes. Add a new header typedef that uses u16 for Length. Could be backported to acpi_aspt_header, struct acpi_dmar_header, struct acpi_nfit_header, struct acpi_prmt_module_header, struct acpi_prmt_module_info. Will be used for upcoming ERDT table. MRRM table has a 26-byte reserved section in header. Add ACPI_DMT_BUF26 to describe this in struct acpi_dmtable_info. Link: https://github.com/acpica/acpica/commit/52840d38 Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3005638.e9J7NaK4W3@rjwysocki.net commit f61c39494901d729d5c21ba92040e9164ea957be Author: Alexey Neyman Date: Fri Apr 25 21:22:35 2025 +0200 ACPICA: Interpret SIDP structures in DMAR ACPICA commit af51f730e0bccf789686cea68e116d5f0b27aacb Added in revision 3.4 of the VT-d spec. To support SIDP, part of the previously reserved field in the device scope structure was used to create a 1-byte "Flags" field. Link: https://github.com/acpica/acpica/commit/af51f730 Signed-off-by: Alexey Neyman Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2239745.irdbgypaU6@rjwysocki.net commit 12b660251007e00a3e4d47ec62dbe3a7ace7023e Author: gldrk Date: Fri Apr 25 21:21:52 2025 +0200 ACPICA: utilities: Fix overflow check in vsnprintf() ACPICA commit d9d59b7918514ae55063b93f3ec041b1a569bf49 The old version breaks sprintf on 64-bit systems for buffers outside [0..UINT32_MAX]. Link: https://github.com/acpica/acpica/commit/d9d59b79 Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/4994935.GXAFRqVoOG@rjwysocki.net Signed-off-by: gldrk [ rjw: Added the tag from gldrk ] Signed-off-by: Rafael J. Wysocki commit 2d8951aee844b7c6d146e25b5c3eebc1c72aa6ff Author: Nilay Shroff Date: Mon May 12 14:43:38 2025 +0530 block: unfreeze queue if realloc tag set fails during nr_hw_queues update In __blk_mq_update_nr_hw_queues(), the current sequence involves: 1. unregistering sysfs/debugfs attributes 2. freeze the queue 3. reallocating the tag set 4. updating the queue map 5. reallocating hardware contexts 6. updating the elevator (which unfreeze the queue again) 7. re-register sysfs/debugfs attributes If tag set reallocation fails at step 3, the function skips steps 4–6 and proceeds directly to step 7, re-registering the sysfs/debugfs attributes without unfreezing the queue first. This is incorrect and can lead to a system hang or lockdep splat, as the queue remains frozen and is never properly unfrozen. This patch addresses the issue by explicitly unfreezing the queue before re-registering the sysfs/debugfs attributes in the event of a tag set reallocation failure. Fixes: 9dc7a882ce96 ("block: move hctx debugfs/sysfs registering out of freezing queue") Signed-off-by: Nilay Shroff Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250512092952.135887-1-nilay@linux.ibm.com Signed-off-by: Jens Axboe commit 509710c6fdcee78021a80a17b3b107b9c8e120f6 Merge: 523923fd56671d ef4c2c789a8a42 Author: Arnd Bergmann Date: Mon May 12 14:22:55 2025 +0200 Merge tag 'imx-defconfig-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.16: - Enable Toradex Embedded Controller driver as module in arm64 defconfig * tag 'imx-defconfig-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Add Toradex Embedded Controller config Link: https://lore.kernel.org/r/20250512103858.50501-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 6c265faf1a409ccb9b99e8a90166a8836db6246f Merge: 71cefdd27371a4 1f6c8626527257 Author: Arnd Bergmann Date: Mon May 12 14:20:48 2025 +0200 Merge tag 'imx-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree change for 6.16: - New board support: TQMa8XxS, TQMa95xxSA, TQMa93xx, MBa91xxCA, i.MX943 EVK, Nitrogen8M Plus ENC Carrier, Toradex SMARC i.MX8MP, Libra-i.MX 8M Plus FPSC board - A couple of imx8mp-tqma8mpql-mba8mp-ras314 board updates that support Raspberry Pi Camera V2 and LVDS using device tree overlay - A series from Adam Ford that updates i.MX8M Beacon boards for RTC capacitive load, HDMI audio, Ethernet PHY, etc. - A set of changes from Daniel Baluta that enables i.MX8MP DSP node for rproc usage - A few changes from Francesco Dolcini that add EEPROM compatible fallback for imx8mp-verdin board, add fan PWM configuation for imx8mp-toradex-smarc board - A series from Frank Li to enable PCIe EP support all i.MX8 devices using device tree overlay - A change from Laurentiu Mihalcea to enable Sound Open Firmware (SOF) support on imx95-19x19-evk board - A few changes from Markus Niebel to disable MDIO Open Drain for imx93-tqma9352 devices - A couple of changes from Max Krummenacher to enable PCIe and SATA support for i.MX8 Apalis and Colibri boards - A series from Primoz Fiser to enable various devices/functions for i.MX93 phycore boards - A patch set from Xu Yang to add USB2.0 support for i.MX95 EVK boards * tag 'imx-dt64-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (71 commits) arm64: dts: freescale: Add PHYTEC phyBOARD-Nash-i.MX93 support arm64: dts: freescale: imx8mp-toradex-smarc: use generic gpio node name arm64: dts: freescale: imx8mp-toradex-smarc: add gpio expander arm64: dts: freescale: imx8mp-toradex-smarc: add embedded controller arm64: dts: freescale: imx8mp-toradex-smarc: add fan PWM configuration arm64: dts: imx93-tqma9352-mba91xxca: disable Open Drain for MDIO arm64: dt: imx95: Add TQMa95xxSA arm64: dts: imx: Align wifi node name with bindings arm64: dts: freescale: add initial device tree for TQMa8XxS arm64: dts: imx8mp-tqma8mpql-mba8mp-ras314: Add Raspberry Pi Camera V2 overlay arm64: dts: imx8mp-tqma8mpql-mba8mp-ras314: Add LVDS device tree overlay arm64: dts: freescale: Add minimal dts support for imx943 evk arm64: dts: freescale: Add basic dtsi for imx943 arm64: dts: imx8-colibri: Add PCIe support arm64: dts: freescale: imx93-phyboard-segin: Order node alphabetically arm64: dts: freescale: imx93-phyboard-segin: Add EQOS Ethernet arm64: dts: freescale: imx93-phyboard-segin: Add I2S audio arm64: dts: freescale: imx93-phyboard-segin: Add USB support arm64: dts: freescale: imx93-phyboard-segin: Add CAN support arm64: dts: freescale: imx93-phyboard-segin: Add RTC support ... Link: https://lore.kernel.org/r/20250512103858.50501-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 71cefdd27371a434f49773748a1a219ece50a8d4 Merge: 34df63331ec04b 10d0bc88bbc884 Author: Arnd Bergmann Date: Mon May 12 14:19:24 2025 +0200 Merge tag 'imx-dt-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX ARM device tree change for 6.16: - A series from Alexander Stein that updates ls1021a-tqmals1021a device tree mostly for display support inlcuding HDMI, LVDS and CDTech panel - A change from Dario Binacchi to use pad config defines for i.MX23/28 device trees - A i.MX7D change from Efe Can İçöz to include min and max voltage in opp-microvolt - A few patches from Fabio Estevam to fix dt-schema warnings - A couple of changes from Krzysztof Kozlowski to align NAND and WIFI node name with binings - A clean-up change from Rob Herring to drop redundant CPU "clock-latency" * tag 'imx-dt-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: mxs: use padconfig macros ARM: dts: imx7d: update opp-table voltages ARM: dts: nxp: Align wifi node name with bindings ARM: dts: imx6q-apalis: remove pcie-switch node ARM: dts: ls1021a-tqmals1021a: change sound card model name ARM: dts: ls1021a-tqmals1021a: Add overlay for CDTech DC44 RGB display ARM: dts: ls1021a-tqmals1021a: Add overlay for CDTech FC21 RGB display ARM: dts: ls1021a-tqmals1021a: Add LVDS overlay for Tianma TM070JVGH33 ARM: dts: ls1021a-tqmals1021a: Add HDMI overlay ARM: dts: ls1021a-tqmals1021a: Add vcc-supply for spi-nor ARM: dts: ls1021a-tqmals1021a: Fix license ARM: dts: imx: Drop redundant CPU "clock-latency" ARM: dts: imx51-digi-connectcore-som: Fix MMA7455 compatible ARM: dts: nxp: Align NAND controller node name with bindings ARM: dts: imx: Fix the iim compatible string ARM: dts: imx31/imx6: Use flash as the NOR node name Link: https://lore.kernel.org/r/20250512103858.50501-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 34df63331ec04b4eedc76e6980fa74af0aa36d80 Merge: 153e2d0791d20f b20c69cd708b8f Author: Arnd Bergmann Date: Mon May 12 14:18:27 2025 +0200 Merge tag 'imx-bindings-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX dt-bindings change for 6.16: - New compatibles for TQ Group boards, i.MX943 EVK, Nitrogen8M Plus ENC Carrier, phyBOARD-Nash-i.MX93 and phyCORE-i.MX8MP FPSC from PHYTEC, and Toradex SMARC iMX8MP SoM/carrier * tag 'imx-bindings-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: bindings: arm: fsl: Add PHYTEC phyBOARD-Nash-i.MX93 board dt: bindings: arm: add bindings for TQMa95xxSA dt-bindings: arm: add TQMa8XxS boards dt-bindings: arm: fsl: add i.MX943 EVK board dt-bindings: arm: add imx8mp-libra-rdk-fpsc dt-bindings: arm: add MBa91xxCA Mainboard for TQMa93xxCA/LA SOM dt-bindings: arm: fsl: add Toradex SMARC iMX8MP SoM and carrier dt-bindings: arm: fsl: Add Boundary Device Nitrogen8M Plus ENC Carrier Board Link: https://lore.kernel.org/r/20250512103858.50501-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit f27ae3a6cebc18a864e1dbee98c9e6c12e72b526 Merge: 4f894483c902a4 82f2b0b97b36ee Author: Greg Kroah-Hartman Date: Mon May 12 14:16:34 2025 +0200 Merge 6.15-rc6 into driver-core-next We need the driver core fix in here as well for testing Signed-off-by: Greg Kroah-Hartman commit b892924264c19a155374a0c1cc20c32a91bd3a0a Merge: 94b247343f5776 fd0bf2bb322159 Author: Arnd Bergmann Date: Mon May 12 14:16:15 2025 +0200 Merge tag 'imx-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.16: - A series from Peng Fan to dump full 128-bits UID for i.MX8MP * tag 'imx-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx8m: Dump higher 64bits UID soc: imx8m: Introduce soc_uid hook soc: imx8m: Cleanup with adding imx8m_soc_[un]prepare Link: https://lore.kernel.org/r/20250512103858.50501-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 6157e62b07d9331cc1d4d9d525dab33d45b0e83c Author: Paul Geurts Date: Mon May 5 13:59:36 2025 +0200 regulator: pca9450: Add restart handler When restarting a CPU powered by the PCA9450 power management IC, it is beneficial to use the PCA9450 to power cycle the CPU and all its connected peripherals to start up in a known state. The PCA9450 features a cold start procedure initiated by an I2C command. Add a restart handler so that the PCA9450 is used to restart the CPU. The restart handler sends command 0x14 to the SW_RST register, initiating a cold reset (Power recycle all regulators except LDO1, LDO2 and CLK_32K_OUT) As the PCA9450 is a PMIC specific for the i.MX8M family CPU, the restart handler priority is set just slightly higher than imx2_wdt and the PSCI restart handler. This makes sure this restart handler takes precedence. Signed-off-by: Paul Geurts Link: https://patch.msgid.link/20250505115936.1946891-1-paul.geurts@prodrive-technologies.com Signed-off-by: Mark Brown commit 144d6dfc7482455eabf8e8caa974a6e8d9572705 Author: Kuninori Morimoto Date: Mon May 12 02:33:16 2025 +0000 ASoC: soc-core: merge snd_soc_unregister_component() and snd_soc_unregister_component_by_driver() We have below 2 functions, but these are very similar (A) snd_soc_unregister_component_by_driver() (B) snd_soc_unregister_component() (A) void snd_soc_unregister_component_by_driver(...) { ... (a) mutex_lock(&client_mutex); ^ (X) component = snd_soc_lookup_component_nolocked(dev, component_driver->name); | if (!component) ^^^^^^^^^^^^^^^^^^^^^^ | goto out; (b) | snd_soc_del_component_unlocked(component); v out: (c) mutex_unlock(&client_mutex); } (B) void snd_soc_unregister_component_by_driver(...) { (a) mutex_lock(&client_mutex); ^ while (1) { | (X) struct snd_soc_component *component = snd_soc_lookup_component_nolocked(dev, NULL); | ^^^^ (b) if (!component) | break; | | snd_soc_del_component_unlocked(component); v } (c) mutex_unlock(&client_mutex); } Both are calling lock (a), find component and remove it (b), and unlock (c). The big diff is whether use driver name for lookup() or not (X). Merge these into snd_soc_unregister_component_by_driver() (B), and snd_soc_unregister_component_by_driver() (A) can be macro. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87h61qy2vn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 94b247343f5776ef2b19be6aec41d2530b4d8af4 Merge: beccb7d1582f0c b24e88b42d68d3 Author: Arnd Bergmann Date: Mon May 12 13:33:57 2025 +0200 Merge branch 'cznic/platform' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc into soc/drivers These are updates from Marek Behún for the cznic platform drivers: This series adds support for generating ECDSA signatures with hardware stored private key on Turris Omnia and Turris MOX. This ability is exposed via the keyctl() syscall. * 'cznic/platform' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: platform: cznic: use ffs() instead of __bf_shf() firmware: turris-mox-rwtm: fix building without CONFIG_KEYS platform: cznic: fix function parameter names firmware: turris-mox-rwtm: Add support for ECDSA signatures with HW private key firmware: turris-mox-rwtm: Drop ECDSA signatures via debugfs platform: cznic: turris-omnia-mcu: Add support for digital message signing with HW private key platform: cznic: Add keyctl helpers for Turris platform platform: cznic: turris-omnia-mcu: Refactor requesting MCU interrupt Signed-off-by: Arnd Bergmann commit 505cc26bcae00699bacaee66cd50ede7a9cc89cb Author: Shiraz Saleem Date: Wed May 7 08:59:05 2025 -0700 net: mana: Add support for auxiliary device servicing events Handle soc servicing events which require the rdma auxiliary device resources to be cleaned up during a suspend, and re-initialized during a resume. Signed-off-by: Shiraz Saleem Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1746633545-17653-5-git-send-email-kotaranov@linux.microsoft.com Signed-off-by: Leon Romanovsky commit 824c6384e8d9275d4ec7204f3f79a4ac6bc10379 Author: Jiaqing Zhao Date: Fri May 9 17:06:33 2025 +0000 x86/mtrr: Check if fixed-range MTRRs exist in mtrr_save_fixed_ranges() When suspending, save_processor_state() calls mtrr_save_fixed_ranges() to save fixed-range MTRRs. On platforms without fixed-range MTRRs like the ACRN hypervisor which has removed fixed-range MTRR emulation, accessing these MSRs will trigger an unchecked MSR access error. Make sure fixed-range MTRRs are supported before access to prevent such error. Since mtrr_state.have_fixed is only set when MTRRs are present and enabled, checking the CPU feature flag in mtrr_save_fixed_ranges() is unnecessary. Fixes: 3ebad5905609 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending") Signed-off-by: Jiaqing Zhao Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250509170633.3411169-2-jiaqing.zhao@linux.intel.com commit d4293f96ce0b6d27d9ca13fdcd7caa135f3d2732 Author: Konstantin Taranov Date: Wed May 7 08:59:04 2025 -0700 RDMA/mana_ib: unify mana_ib functions to support any gdma device Use the installed gdma_device instead of hard-coded device in requests to the HW. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1746633545-17653-4-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit c390828d4d7b453c21c6fc0787c714db82731093 Author: Konstantin Taranov Date: Wed May 7 08:59:03 2025 -0700 RDMA/mana_ib: Add support of mana_ib for RNIC and ETH nic Allow mana_ib to be created over ethernet gdma device and over rnic gdma device. The HW has two devices with different capabilities and different use-cases. Initialize required resources depending on the used gdma device. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1746633545-17653-3-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit ced82fce77e93315239f54caebbc88e263078e31 Author: Konstantin Taranov Date: Wed May 7 08:59:02 2025 -0700 net: mana: Probe rdma device in mana driver Initialize gdma device for rdma inside mana module. For each gdma device, initialize an auxiliary ib device. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1746633545-17653-2-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit 2bd1870a67692bb7bbeba80bb3135934d78eba66 Author: Armin Wolf Date: Tue Apr 29 02:36:06 2025 +0200 platform/x86: dell-ddv: Expose the battery health to userspace The health of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureAceess" WMI method. The resulting data contains, among other data, the health status of the battery. Expose this value to userspace using the power supply extension interface. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250429003606.303870-4-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 303ecf690ae2882f1138ea1437207fba5294da34 Author: Armin Wolf Date: Tue Apr 29 02:36:05 2025 +0200 platform/x86: dell-ddv: Expose the battery manufacture date to userspace The manufacture date of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureDate" WMI method. The resulting data contains the manufacture date of the battery encoded inside a 16-bit value as described in the Smart Battery Data Specification. Expose this value to userspace using the power supply extension interface. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250429003606.303870-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 058de163a376b28816f91ff5e2fe6d7bc227e2ae Author: Armin Wolf Date: Tue Apr 29 02:36:04 2025 +0200 platform/x86: dell-ddv: Implement the battery matching algorithm Since commit db0a507cb24d ("ACPICA: Update integer-to-hex-string conversions") the battery serial number is no longer distorted, allowing us to finally implement the battery matching algorithm. The battery matchign algorithm is necessary when translating between ACPI batteries and the associated indices used by the WMI interface based on the battery serial number. Since this serial number can only be retrieved when the battery is present we cannot perform the initial translation inside dell_wmi_ddv_add_battery() because the ACPI battery might be absent at this point in time. Introduce dell_wmi_ddv_battery_translate() which implements the battery matching algorithm and replaces dell_wmi_ddv_battery_index(). Also implement a translation cache for caching previous translations between ACPI batteries and indices. This is necessary because performing a translation can be very expensive. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250429003606.303870-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f4856c20c137a73d73e448caa3964098024248bf Author: Armin Wolf Date: Tue Apr 29 02:36:03 2025 +0200 power: supply: core: Add additional health status values Some batteries can signal when an internal fuse was blown. In such a case POWER_SUPPLY_HEALTH_DEAD is too vague for userspace applications to perform meaningful diagnostics. Additionally some batteries can also signal when some of their internal cells are imbalanced. In such a case returning POWER_SUPPLY_HEALTH_UNSPEC_FAILURE is again too vague for userspace applications to perform meaningful diagnostics. Add new health status values for both cases. Signed-off-by: Armin Wolf Reviewed-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250429003606.303870-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 511a4a5ea2b6f1d4e0c719f27db6b627b2b52e49 Author: Suma Hegde Date: Tue May 6 10:15:42 2025 +0000 platform/x86/amd/hsmp: acpi: Add sysfs files to display HSMP telemetry Make frequently fetched telemetry available via sysfs. These parameters do not fit in hwmon sensor model, hence make them available via sysfs. Create following sysfs files per acpi device node. * c0_residency_input * prochot_status * smu_fw_version * protocol_version * ddr_max_bw(GB/s) * ddr_utilised_bw_input(GB/s) * ddr_utilised_bw_perc_input(%) * mclk_input(MHz) * fclk_input(MHz) * clk_fmax(MHz) * clk_fmin(MHz) * cclk_freq_limit_input(MHz) * pwr_current_active_freq_limit(MHz) * pwr_current_active_freq_limit_source Signed-off-by: Suma Hegde Reviewed-by: Naveen Krishna Chatradhi Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250506101542.200811-3-suma.hegde@amd.com Signed-off-by: Ilpo Järvinen commit 8536666a52833da326ab17d43ee2cd6c66751716 Author: Colin Ian King Date: Wed May 7 14:18:34 2025 +0100 RDMA/siw: replace redundant ternary operator with just rv The use of the ternary operator on rv is redundant, rv is either the initialized value of 0 or a negative error return code, so it can never be greater than zero, and hence the zero assignment in ternary operator is redundant. Just return rv instead. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250507131834.253823-1-colin.i.king@gmail.com Acked-by: Bernard Metzler Signed-off-by: Leon Romanovsky commit 92c025db52bb94a032eb3d473bb81e62c19ddbd3 Author: Suma Hegde Date: Tue May 6 10:15:41 2025 +0000 platform/x86/amd/hsmp: Report power via hwmon sensors Expose power reading and power limits via hwmon power sensors. Signed-off-by: Suma Hegde Reviewed-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20250506101542.200811-2-suma.hegde@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 15a9f67e286b37e87dce0d9fa6ab702631c22d15 Author: Leon Romanovsky Date: Mon Apr 28 12:22:20 2025 +0300 RDMA/umem: Separate implicit ODP initialization from explicit ODP Create separate functions for the implicit ODP initialization which is different from the explicit ODP initialization. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 1efe8c0670d6a6883faa09c9abc746c741f5664a Author: Leon Romanovsky Date: Mon Apr 28 12:22:19 2025 +0300 RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage Reuse newly added DMA API to cache IOVA and only link/unlink pages in fast path for UMEM ODP flow. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit eedd5b1276e76d6b260a7a77a149ef5155aa76f0 Author: Leon Romanovsky Date: Mon Apr 28 12:22:18 2025 +0300 RDMA/umem: Store ODP access mask information in PFN As a preparation to remove dma_list, store access mask in PFN pointer and not in dma_addr_t. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 8cad47130566123b2c70ef2aa53be02ef1aee5e5 Author: Leon Romanovsky Date: Mon Apr 28 12:22:17 2025 +0300 mm/hmm: provide generic DMA managing logic HMM callers use PFN list to populate range while calling to hmm_range_fault(), the conversion from PFN to DMA address is done by the callers with help of another DMA list. However, it is wasteful on any modern platform and by doing the right logic, that DMA list can be avoided. Provide generic logic to manage these lists and gave an interface to map/unmap PFNs to DMA addresses, without requiring from the callers to be an experts in DMA core API. Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 285e871884ff3dc31c0c2c1a87f0018481bc8471 Author: Leon Romanovsky Date: Mon Apr 28 12:22:16 2025 +0300 mm/hmm: let users to tag specific PFN with DMA mapped bit Introduce new sticky flag (HMM_PFN_DMA_MAPPED), which isn't overwritten by HMM range fault. Such flag allows users to tag specific PFNs with information if this specific PFN was already DMA mapped. Tested-by: Jens Axboe Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 7ec091c55986423b6460604a6921e441e23d68c7 Merge: d37d4720c3e797 781091f3f59456 Author: Christian Brauner Date: Mon May 12 11:40:18 2025 +0200 Merge patch series "filesystems selftests cleanups and fanotify test" Amir Goldstein says: This adds a test for fanotify mount ns notifications inside userns [1]. While working on the test I ended up making lots of cleanups to reduce build dependency on make headers_install. These patches got rid of the dependency for my kvm setup for the affected filesystems tests. Building with TOOLS_INCLUDES dir was recommended by John Hubbard [2]. NOTE #1: these patches are based on a merge of vfs-6.16.mount (changes wrappers.h) into v6.15-rc5 (changes mount-notify_test.c), so if this cleanup is acceptable, we should probably setup a selftests branch for 6.16, so that it can be used to test the fanotify patches. NOTE #2: some of the defines in wrappers.h are left for overlayfs and mount_setattr tests, which were not converted to use TOOLS_INCLUDES. I did not want to mess with those tests. * patches from https://lore.kernel.org/20250509133240.529330-1-amir73il@gmail.com: selftests/fs/mount-notify: add a test variant running inside userns selftests/filesystems: create setup_userns() helper selftests/filesystems: create get_unique_mnt_id() helper selftests/fs/mount-notify: build with tools include dir selftests/mount_settattr: remove duplicate syscall definitions selftests/pidfd: move syscall definitions into wrappers.h selftests/fs/statmount: build with tools include dir selftests/filesystems: move wrapper.h out of overlayfs subdir Link: https://lore.kernel.org/20250509133240.529330-1-amir73il@gmail.com Signed-off-by: Christian Brauner commit 781091f3f59456e881170570b2304ec11e9ce7e0 Author: Amir Goldstein Date: Fri May 9 15:32:40 2025 +0200 selftests/fs/mount-notify: add a test variant running inside userns unshare userns in addition to mntns and verify that: 1. watching tmpfs mounted inside userns is allowed with any mark type 2. watching orig root with filesystem mark type is not allowed 3. watching mntns of orig userns is not allowed 4. watching mntns in userns where fanotify_init was called is allowed mount events are only tested with the last case of mntns mark. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-9-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit 8199e6f7402ca2232de6f57b918d2b1fb9c224cb Author: Amir Goldstein Date: Fri May 9 15:32:39 2025 +0200 selftests/filesystems: create setup_userns() helper Add helper to utils.c and use it in statmount userns tests. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-8-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit e897b9b1334bab7427f062e4ec1f4297676c60da Author: Amir Goldstein Date: Fri May 9 15:32:38 2025 +0200 selftests/filesystems: create get_unique_mnt_id() helper Add helper to utils.c and use it in mount-notify and statmount tests. Linking with utils.c drags in a dependecy with libcap, so add it to the Makefile of the tests. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-7-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit c6d9775c2066a37385e784ee2e0ce83bd6644610 Author: Amir Goldstein Date: Fri May 9 15:32:37 2025 +0200 selftests/fs/mount-notify: build with tools include dir Copy the fanotify uapi header files to the tools include dir and define __kernel_fsid_t to decouple dependency with headers_install and then remove the redundant re-definitions of fanotify macros. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-6-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit ec050f2adf378184b9cdf0c65d967bc2ca4045a6 Author: Amir Goldstein Date: Fri May 9 15:32:36 2025 +0200 selftests/mount_settattr: remove duplicate syscall definitions Which are already defined in wrappers.h. For now, the syscall defintions of mount_settattr() itself remain in the test, which is the only test to use them. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-5-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit ef058fc1e5e991f1e869f448d53b36f66be163ed Author: Amir Goldstein Date: Fri May 9 15:32:35 2025 +0200 selftests/pidfd: move syscall definitions into wrappers.h There was already duplicity in some of the defintions. Remove syscall number defintions for __ia64__ that are both stale and incorrect. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-4-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit b13fb4ee46472d7f7fc3e2172c08c06ed8b3f31c Author: Amir Goldstein Date: Fri May 9 15:32:34 2025 +0200 selftests/fs/statmount: build with tools include dir Copy the required headers files (mount.h, nsfs.h) to the tools include dir and define the statmount/listmount syscall numbers to decouple dependency with headers_install for the common cases. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-3-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit 0bd92b9fe538bc271c944c14b19cdf4434bef81e Author: Amir Goldstein Date: Fri May 9 15:32:33 2025 +0200 selftests/filesystems: move wrapper.h out of overlayfs subdir This is not an overlayfs specific header. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-2-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit d37d4720c3e797a19b2d7ad08de273feddaa596f Author: Christian Brauner Date: Wed Apr 9 13:00:21 2025 +0200 selftests/mount_settattr: ensure that ext4 filesystem can be created Filesystem too small for a journal mount: /mnt/D/: mount failed: Operation not permitted. mount_setattr_test.c:1076:idmap_mount_tree_invalid:Expected system("mount -o loop -t ext4 /mnt/C/ext4.img /mnt/D/") (256) == 0 (0) Signed-off-by: Christian Brauner commit 7a012a692e7cfbca245d195a80f23634d3d74fcc Author: Christian Brauner Date: Wed Apr 9 12:57:57 2025 +0200 selftests/mount_settattr: add missing STATX_MNT_ID_UNIQUE define CC mount_setattr_test In file included from mount_setattr_test.c:24: mount_setattr_test.c: In function ‘mount_setattr_mount_detached_mount_on_detached_mount_and_attach’: mount_setattr_test.c:1850:60: error: ‘STATX_MNT_ID_UNIQUE’ undeclared (first use in this function); did you mean ‘STATX_MNT_ID’? 1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0); | ^~~~~~~~~~~~~~~~~~~ ../kselftest_harness.h:757:20: note: in definition of macro ‘__EXPECT’ 757 | __typeof__(_expected) __exp = (_expected); \ | ^~~~~~~~~ mount_setattr_test.c:1850:9: note: in expansion of macro ‘ASSERT_EQ’ 1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0); | ^~~~~~~~~ mount_setattr_test.c:1850:60: note: each undeclared identifier is reported only once for each function it appears in 1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0); | ^~~~~~~~~~~~~~~~~~~ ../kselftest_harness.h:757:20: note: in definition of macro ‘__EXPECT’ 757 | __typeof__(_expected) __exp = (_expected); \ | ^~~~~~~~~ mount_setattr_test.c:1850:9: note: in expansion of macro ‘ASSERT_EQ’ 1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0); | ^~~~~~~~~ Signed-off-by: Christian Brauner commit 2680acd336412b5e8c34c64377e78d85e92739c9 Author: Christian Brauner Date: Wed Apr 9 12:55:00 2025 +0200 selftests/mount_settattr: don't define sys_open_tree() twice CC mount_setattr_test mount_setattr_test.c:176:19: error: redefinition of ‘sys_open_tree’ 176 | static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) | ^~~~~~~~~~~~~ In file included from mount_setattr_test.c:23: ../filesystems/overlayfs/wrappers.h:59:19: note: previous definition of ‘sys_open_tree’ with type ‘int(int, const char *, unsigned int)’ 59 | static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) Signed-off-by: Christian Brauner commit c6b1908224593db76f77b904894cd51933559ae9 Author: Andreas Hindborg Date: Thu May 8 10:52:11 2025 +0200 MAINTAINERS: add configfs Rust abstractions Add rust files to configfs MAINTAINERS entry. Link: https://lore.kernel.org/r/20250508-configfs-v8-3-8ebde6180edc@kernel.org Signed-off-by: Andreas Hindborg commit 1bfb105051566ec5cc7c4f693362420b37a68781 Author: Andreas Hindborg Date: Thu May 8 10:52:10 2025 +0200 rust: configfs: add a sample demonstrating configfs usage Add a sample to the samples folder, demonstrating the intended use of the Rust configfs API. Link: https://lore.kernel.org/r/20250508-configfs-v8-2-8ebde6180edc@kernel.org Signed-off-by: Andreas Hindborg commit 446cafc295bfc0e89da94a482fe8290bd8b429fb Author: Andreas Hindborg Date: Thu May 8 10:52:09 2025 +0200 rust: configfs: introduce rust support for configfs Add a Rust API for configfs, thus allowing Rust modules to use configfs for configuration. Make the implementation a shim on top of the C configfs implementation, allowing safe use of the C infrastructure from Rust. Link: https://lore.kernel.org/r/20250508-configfs-v8-1-8ebde6180edc@kernel.org Signed-off-by: Andreas Hindborg commit 972aa49a7c93fecdf281d2a7f4914085f3b327eb Merge: 4ffb62fa8925c1 3ee7d949634224 Author: Leon Romanovsky Date: Mon May 12 05:04:15 2025 -0400 Provide a new two step DMA mapping API Currently the only efficient way to map a complex memory description through the DMA API is by using the scatter list APIs. The SG APIs are unique in that they efficiently combine the two fundamental operations of sizing and allocating a large IOVA window from the IOMMU and processing all the per-address swiotlb/flushing/p2p/map details. This uniqueness has been a long standing pain point as the scatter list API is mandatory, but expensive to use. It prevents any kind of optimization or feature improvement (such as avoiding struct page for P2P) due to the impossibility of improving the scatter list. Several approaches have been explored to expand the DMA API with additional scatterlist-like structures (BIO, rlist), instead split up the DMA API to allow callers to bring their own data structure. The API is split up into parts: - Allocate IOVA space: To do any pre-allocation required. This is done based on the caller supplying some details about how much IOMMU address space it would need in worst case. - Map and unmap relevant structures to pre-allocated IOVA space: Perform the actual mapping into the pre-allocated IOVA. This is very similar to dma_map_page(). Thanks Signed-off-by: Leon Romanovsky commit 4ffb62fa8925c1c1591145ff0f5ccfd5918b40df Author: Junxian Huang Date: Wed May 7 11:39:03 2025 +0800 RDMA/hns: Fix build error of hns_roce_trace Add include path to find hns_roce_trace.h to fix the following build error: In file included from drivers/infiniband/hw/hns/hns_roce_trace.h:213, from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:53: ./include/trace/define_trace.h:110:42: fatal error: ./hns_roce_trace.h: No such file or directory 110 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ^ compilation terminated. Fixes: 02007e3ddc07 ("RDMA/hns: Add trace for flush CQE") Reported-by: Paul E. McKenney Closes: https://lore.kernel.org/linux-next/b7dd4dda-37d8-47e4-8d78-b6585be21cfd@paulmck-laptop/T/#t Tested-by: Paul E. McKenney Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250507033903.2879433-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 9b8f32002cddf792fc6657c6f084585c7af1a858 Author: Marcus Folkesson Date: Mon May 12 09:15:11 2025 +0200 drm/sitronix: move tiny Sitronix drivers to their own subdir We start to have support many Sitronix displays in the tiny directory, and we expect more to come. Move them to their own subdirectory. Reviewed-by: Javier Martinez Canillas Suggested-by: Javier Martinez Canillas Signed-off-by: Marcus Folkesson Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250512-sitronix-v3-1-bbf6cc413698@gmail.com Signed-off-by: Javier Martinez Canillas commit beccb7d1582f0c64090a1cff2c7fb04be14e16f6 Merge: 9477c3e68e0ada 36305857b1ead8 Author: Arnd Bergmann Date: Mon May 12 10:23:48 2025 +0200 Merge tag 'omap-for-v6.16/drivers-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/drivers OMAP driver updates for v6.16 * tag 'omap-for-v6.16/drivers-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first" Link: https://lore.kernel.org/r/7h5xi7rtix.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 153e2d0791d20f5fc7a15518f40d72312e63ec63 Merge: ef934c51cb4404 550e5608c25e0a Author: Arnd Bergmann Date: Mon May 12 10:20:13 2025 +0200 Merge tag 'omap-for-v6.16/dt-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/dt ARM: dts: omap updates for v6.16 * tag 'omap-for-v6.16/dt-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: dts: am335x: Set wakeup-source for UART0 ARM: dts: omap4: panda: cleanup bluetooth ARM: dts: omap4: panda: fix resources needed for Wifi ARM: dts: nokia n900: remove useless io-channel-cells property Link: https://lore.kernel.org/r/7hecwvrtmx.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 2b3949f526e736985276c2f84ce3fe1f96d90fa1 Merge: a6e160ead8e7fc 47fe74098f3dad Author: Arnd Bergmann Date: Mon May 12 10:13:36 2025 +0200 Merge tag 'omap-for-v6.16/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/arm OMAP SoC updates for v6.16 * tag 'omap-for-v6.16/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY bus: ti-sysc: PRUSS OCP configuration ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4 ARM: omap2plus_defconfig: enable I2C devices of GTA04 Link: https://lore.kernel.org/r/7ha57jrtkl.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 18ee43c398af0b7e2eb2a4cd8469967834b0802d Author: Chen Linxuan Date: Wed May 7 16:42:17 2025 +0800 docs: filesystems: add fuse-passthrough.rst Add a documentation about FUSE passthrough. It's mainly about why FUSE passthrough needs CAP_SYS_ADMIN. Link: https://lore.kernel.org/all/4b64a41c-6167-4c02-8bae-3021270ca519@fastmail.fm/T/#mc73e04df56b8830b1d7b06b5d9f22e594fba423e Link: https://lore.kernel.org/linux-fsdevel/CAOQ4uxhAY1m7ubJ3p-A3rSufw_53WuDRMT1Zqe_OC0bP_Fb3Zw@mail.gmail.com/ Reviewed-by: Amir Goldstein Signed-off-by: Chen Linxuan Signed-off-by: Miklos Szeredi commit 767c4b82715ad34b5b48159eba4e69608dd076e3 Author: Chen Linxuan Date: Wed May 7 16:42:16 2025 +0800 MAINTAINERS: update filter of FUSE documentation There are some fuse-*.rst files in Documentation directory, let's make get_mantainers.pl work on those file instead of only fuse.rst. Reviewed-by: Amir Goldstein Signed-off-by: Chen Linxuan Signed-off-by: Miklos Szeredi commit 174d966428dec4efcfaabbe6173a854cc2a7c076 Author: Dr. David Alan Gilbert Date: Sun May 11 18:29:57 2025 +0100 ALSA: msnd: Remove midi code Nothing calls snd_msndmidi_new() thus nothing sets chip->msndmidi_mpu The call to snd_msndmidi_input_read is gated on that being set, so snd_msndmidi_input_read() won't be called either. This is probably a missing call to snd_msndmidi_new(), but since this is ancient code, it's probably best to remove it (especially since I don't have the hardware to test it). Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250511172957.1001583-1-linux@treblig.org Signed-off-by: Takashi Iwai commit 69efbff69f89c9b2b72c4d82ad8b59706add768a Author: Guang Yuan Wu Date: Fri May 2 04:04:21 2025 +0000 fuse: fix race between concurrent setattrs from multiple nodes When mounting a user-space filesystem on multiple clients, after concurrent ->setattr() calls from different node, stale inode attributes may be cached in some node. This is caused by fuse_setattr() racing with fuse_reverse_inval_inode(). When filesystem server receives setattr request, the client node with valid iattr cached will be required to update the fuse_inode's attr_version and invalidate the cache by fuse_reverse_inval_inode(), and at the next call to ->getattr() they will be fetched from user space. The race scenario is: 1. client-1 sends setattr (iattr-1) request to server 2. client-1 receives the reply from server 3. before client-1 updates iattr-1 to the cached attributes by fuse_change_attributes_common(), server receives another setattr (iattr-2) request from client-2 4. server requests client-1 to update the inode attr_version and invalidate the cached iattr, and iattr-1 becomes staled 5. client-2 receives the reply from server, and caches iattr-2 6. continue with step 2, client-1 invokes fuse_change_attributes_common(), and caches iattr-1 The issue has been observed from concurrent of chmod, chown, or truncate, which all invoke ->setattr() call. The solution is to use fuse_inode's attr_version to check whether the attributes have been modified during the setattr request's lifetime. If so, mark the attributes as invalid in the function fuse_change_attributes_common(). Signed-off-by: Guang Yuan Wu Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 42055939a3a4cac8afbebff85a29571c2bd3238c Author: Miguel Ojeda Date: Sun May 11 20:25:33 2025 +0200 rust: devres: fix doctest build under `!CONFIG_PCI` The doctest requires `CONFIG_PCI`: error[E0432]: unresolved import `kernel::pci` --> rust/doctests_kernel_generated.rs:2689:44 | 2689 | use kernel::{device::Core, devres::Devres, pci}; | ^^^ no `pci` in the root | note: found an item that was configured out --> rust/kernel/lib.rs:96:9 note: the item is gated here --> rust/kernel/lib.rs:95:1 Thus conditionally compile it (which still checks the syntax). Fixes: f301cb978c06 ("rust: devres: implement Devres::access()") Signed-off-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250511182533.1016163-1-ojeda@kernel.org Signed-off-by: Danilo Krummrich commit e58afb3e1f365badd69aad6f0d53a2c66a63f689 Author: Alexey Charkov Date: Wed May 7 10:58:33 2025 +0400 ARM: dts: vt8500: list all four timer interrupts VIA/WonderMedia SoC timer can generate up to four interrupts corresponding to four timer match registers (firing when the 32-bit freerunning clock source counter matches either of the match registers, respectively). List all four interrupts in device trees. This also enables the system event timer to use a match register other than 0, which can then in turn be used as a system watchdog (watchdog function is not available on other channels) Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250507-vt8500-timer-updates-v2-4-65e5d1b0855e@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7314374c8639ab64217fba522c0b4f0a4e6373f0 Author: Alexey Charkov Date: Sat May 3 15:52:33 2025 +0400 ARM: dts: vt8500: add DT nodes for the system config ID register Every VIA/WonderMedia SoC has a 32-bit chip ID register at the MMIO address 0xd8120000. Add respective device tree nodes to let the system code access it at runtime for the selection of appropriate hardware quirks where needed. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250503-wmt-soc-driver-v3-3-2daa9056fa10@gmail.com Signed-off-by: Krzysztof Kozlowski commit 22488d6bd17cbad9eeee70d64c888735b366167d Author: Alexey Charkov Date: Fri Apr 25 19:02:23 2025 +0400 ARM: dts: vt8500: Add VIA APC Rock/Paper board APC Rock is a development board based on WonderMedia WM8590 released around 2013. Paper is the same board, but with the VGA port left unpopulated, and shipped with a recycled cardboard case Its hardware includes: * Single-core Cortex-A9 CPU at 800 MHz * 512MB DDR3 RAM * 4GB NAND flash * 8MB SPI NOR flash * ARM Mali-400 GPU * HDMI output (type A) capable of 1080p * VGA output (on Rock, but not on Paper) * 2x USB 2.0 type A * 1x USB 2.0 OTG (microUSB connector) * microSD slot * 10/100M Ethernet * 3.5mm minijack connector with combined headphones/mic * Half-height miniPCIe slot (with only USB 2.0 signals) Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250425-apc_paper_binding-v5-2-3aef49e97332@gmail.com Signed-off-by: Krzysztof Kozlowski commit 3e96de394ca0d426b2df6f63991057036b89e643 Author: Alexey Charkov Date: Fri Apr 25 19:02:22 2025 +0400 dt-bindings: arm: vt8500: Add VIA APC Rock/Paper boards APC Rock is a development board based on WonderMedia WM8950 SoC released around 2013. Paper is the same as Rock but lacking a VGA port and shipped with a recycled cardboard case. While at that, put myself as the maintainer, given that Tony is unavailable as of lately. Acked-by: Conor Dooley Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250425-apc_paper_binding-v5-1-3aef49e97332@gmail.com Signed-off-by: Krzysztof Kozlowski commit 0169a24036848cf18205301673259bb6879eef97 Author: Dan Carpenter Date: Fri May 9 14:04:37 2025 +0300 memory: stm32_omm: Fix NULL vs IS_ERR() check in probe() The platform_get_resource_byname() function returns NULL on error. It doesn't return error pointers. Update the check to match. Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/a1645f1eedaa9b2ae62ac07feed0552eea75bc46.1746781081.git.dan.carpenter@linaro.org Signed-off-by: Krzysztof Kozlowski commit d44eeb20d9bedce11297a09628ba5dd39db236be Author: Dan Carpenter Date: Fri May 9 14:04:31 2025 +0300 memory: stm32_omm: Fix error handling in stm32_omm_configure() There are two error handling bugs in the stm32_omm_configure() function. 1) The error code needs to be set if clk_get_rate() fails. 2) If devm_reset_control_get_exclusive() then call pm_runtime_put_sync_suspend() before returning. Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/a69ce0445324e994ea2ed7493bda1f6046c7ff69.1746781081.git.dan.carpenter@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9c03507fcd6feae37a94eff376a1aa79700dd54a Author: Colin Ian King Date: Fri May 9 11:44:58 2025 +0100 memory: stm32: Fix spelling mistake "resset" -> "reset" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20250509104459.28167-1-colin.i.king@gmail.com Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") Signed-off-by: Krzysztof Kozlowski commit 81214185e7e1fc6dfc8661a574c457accaf9a5a4 Author: Pritam Manohar Sutar Date: Tue May 6 13:31:54 2025 +0530 clk: samsung: correct clock summary for hsi1 block clk_summary shows wrong value for "mout_hsi1_usbdrd_user". It shows 400Mhz instead of 40Mhz as below. dout_shared2_div4 1 1 0 400000000 0 0 50000 Y ... mout_hsi1_usbdrd_user 0 0 0 400000000 0 0 50000 Y ... dout_clkcmu_hsi1_usbdrd 0 0 0 40000000 0 0 50000 Y ... Correct the clk_tree by adding correct clock parent for "mout_hsi1_usbdrd_user". Post this change, clk_summary shows correct value. dout_shared2_div4 1 1 0 400000000 0 0 50000 Y ... mout_clkcmu_hsi1_usbdrd 0 0 0 400000000 0 0 50000 Y ... dout_clkcmu_hsi1_usbdrd 0 0 0 40000000 0 0 50000 Y ... mout_hsi1_usbdrd_user 0 0 0 40000000 0 0 50000 Y ... Fixes: 485e13fe2fb6 ("clk: samsung: add top clock support for ExynosAuto v920 SoC") Cc: Signed-off-by: Pritam Manohar Sutar Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20250506080154.3995512-1-pritam.sutar@samsung.com Signed-off-by: Krzysztof Kozlowski commit 57999ed153ed7e651afecbabe0e998e75cf2d798 Author: Eric Biggers Date: Mon May 5 13:33:45 2025 -0700 crypto: testmgr - enable CRYPTO_MANAGER when CRYPTO_SELFTESTS crypto/testmgr.c is compiled only when CRYPTO_MANAGER is enabled. To make CRYPTO_SELFTESTS work as expected when CRYPTO_MANAGER doesn't get enabled for another reason, automatically set CRYPTO_MANAGER to the value of CRYPTO_ALGAPI when CRYPTO_SELFTESTS is enabled. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6f9d0f53f50405fcf4abf7ff45cec7baed71151c Author: Eric Biggers Date: Mon May 5 13:33:44 2025 -0700 crypto: Kconfig - make CRYPTO_MANAGER a hidden symbol There is no reason for people configuring the kernel to be asked about CRYPTO_MANAGER, so make it a hidden symbol. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 42e45119efba92461839d1473abda5e31b0e71ed Author: Eric Biggers Date: Mon May 5 13:33:43 2025 -0700 crypto: testmgr - rename noextratests to noslowtests Rename the noextratests module parameter to noslowtests, and replace other remaining mentions of "extra" in the code with "slow". This addresses confusion regarding the word "extra" like that seen at https://lore.kernel.org/r/6cecf2de-9aa0-f6ea-0c2d-8e974a1a820b@huawei.com/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 698de822780fbae79b11e5d749863c1aa64a0a55 Author: Eric Biggers Date: Mon May 5 13:33:42 2025 -0700 crypto: testmgr - make it easier to enable the full set of tests Currently the full set of crypto self-tests requires CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y. This is problematic in two ways. First, developers regularly overlook this option. Second, the description of the tests as "extra" sometimes gives the impression that it is not required that all algorithms pass these tests. Given that the main use case for the crypto self-tests is for developers, make enabling CONFIG_CRYPTO_SELFTESTS=y just enable the full set of crypto self-tests by default. The slow tests can still be disabled by adding the command-line parameter cryptomgr.noextratests=1, soon to be renamed to cryptomgr.noslowtests=1. The only known use case for doing this is for people trying to use the crypto self-tests to satisfy the FIPS 140-3 pre-operational self-testing requirements when the kernel is being validated as a FIPS 140-3 cryptographic module. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 40b9969796bfa49ed1b0f7ddc254f48cb2ac6d2c Author: Eric Biggers Date: Mon May 5 13:33:41 2025 -0700 crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS The negative-sense of CRYPTO_MANAGER_DISABLE_TESTS is a longstanding mistake that regularly causes confusion. Especially bad is that you can have CRYPTO=n && CRYPTO_MANAGER_DISABLE_TESTS=n, which is ambiguous. Replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS which has the expected behavior. The tests continue to be disabled by default. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d469eaed223fa485eabebd3bcd05ddd3c891f54e Author: Eric Biggers Date: Mon May 5 13:33:40 2025 -0700 crypto: testmgr - remove panic_on_fail The cryptomgr.panic_on_fail=1 kernel command-line parameter is not very useful now that the tests have been fixed to WARN on failure, since developers can just use panic_on_warn=1 instead. There's no need for a special option just for the crypto self-tests. Remove it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3357b6c94569095f87a350bffa5a0a6e0c19c962 Author: Eric Biggers Date: Mon May 5 13:33:39 2025 -0700 crypto: tcrypt - rename CRYPTO_TEST to CRYPTO_BENCHMARK tcrypt is actually a benchmarking module and not the actual tests. This regularly causes confusion. Update the kconfig option name and help text accordingly. Signed-off-by: Eric Biggers Acked-by: Geert Uytterhoeven # m68k Signed-off-by: Herbert Xu commit aeaad5bfb18890cc73ca32d63f1f02feb5f3f651 Author: Eric Biggers Date: Mon May 5 12:10:45 2025 -0700 crypto: null - use memcpy_sglist() Make null_skcipher_crypt() use memcpy_sglist() instead of the skcipher_walk API, as this is simpler. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit bde393057bbc452731a521bafa7441932da5f564 Author: Eric Biggers Date: Mon May 5 12:10:44 2025 -0700 crypto: null - merge CRYPTO_NULL2 into CRYPTO_NULL There is no reason to have separate CRYPTO_NULL2 and CRYPTO_NULL options. Just merge them into CRYPTO_NULL. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c10f66b0acc4ec9db4d443779871132108e57f10 Author: Eric Biggers Date: Mon May 5 12:10:43 2025 -0700 crypto: null - remove the default null skcipher crypto_get_default_null_skcipher() and crypto_put_default_null_skcipher() are no longer used, so remove them. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0c08c72980ea8218e6b3829a4bc00664e55a4912 Author: Eric Biggers Date: Mon May 5 12:10:42 2025 -0700 crypto: krb5enc - do not select CRYPTO_NULL The krb5enc code does not use any of the so-called "null algorithms", so it does not need to select CRYPTO_NULL. Presumably this unused dependency got copied from one of the other kconfig options. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d8aeec147affcb6cb65060ed5fe095a2d0fe8a20 Author: Eric Biggers Date: Mon May 5 12:10:41 2025 -0700 crypto: geniv - use memcpy_sglist() instead of null skcipher For copying data between two scatterlists, just use memcpy_sglist() instead of the so-called "null skcipher". This is much simpler. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 4e39d0712ec40079c45703b43806bb05b2cfa9b0 Author: Eric Biggers Date: Mon May 5 12:10:40 2025 -0700 crypto: gcm - use memcpy_sglist() instead of null skcipher For copying data between two scatterlists, just use memcpy_sglist() instead of the so-called "null skcipher". This is much simpler. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit dbc4b1458e931e47198c3165ff5853bc1ad6bd7a Author: Eric Biggers Date: Mon May 5 12:10:39 2025 -0700 crypto: authenc - use memcpy_sglist() instead of null skcipher For copying data between two scatterlists, just use memcpy_sglist() instead of the so-called "null skcipher". This is much simpler. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f2804d0eee8ddd57aa79d0b82872b74c21e1b69b Author: Eric Biggers Date: Mon May 5 12:10:38 2025 -0700 crypto: algif_aead - use memcpy_sglist() instead of null skcipher For copying data between two scatterlists, just use memcpy_sglist() instead of the so-called "null skcipher". This is much simpler. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit bdc2a55687f123bd32aaefb81e11c7450a431eaf Author: Eric Biggers Date: Mon May 5 11:18:24 2025 -0700 crypto: lib/chacha - add array bounds to function prototypes Add explicit array bounds to the function prototypes for the parameters that didn't already get handled by the conversion to use chacha_state: - chacha_block_*(): Change 'u8 *out' or 'u8 *stream' to u8 out[CHACHA_BLOCK_SIZE]. - hchacha_block_*(): Change 'u32 *out' or 'u32 *stream' to u32 out[HCHACHA_OUT_WORDS]. - chacha_init(): Change 'const u32 *key' to 'const u32 key[CHACHA_KEY_WORDS]'. Change 'const u8 *iv' to 'const u8 iv[CHACHA_IV_SIZE]'. No functional changes. This just makes it clear when fixed-size arrays are expected. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 607c92141cdec6e472d80de813f5251685b9ddc1 Author: Eric Biggers Date: Mon May 5 11:18:23 2025 -0700 crypto: lib/chacha - add strongly-typed state zeroization Now that the ChaCha state matrix is strongly-typed, add a helper function chacha_zeroize_state() which zeroizes it. Then convert all applicable callers to use it instead of direct memzero_explicit. No functional changes. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 32c9541189eb31ba6b25e2ff28e42660394a62af Author: Eric Biggers Date: Mon May 5 11:18:22 2025 -0700 crypto: lib/chacha - use struct assignment to copy state Use struct assignment instead of memcpy() in lib/crypto/chacha.c where appropriate. No functional change. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 98066f2f8901ccf72f3c5d6c391c8fff1cabd49d Author: Eric Biggers Date: Mon May 5 11:18:21 2025 -0700 crypto: lib/chacha - strongly type the ChaCha state The ChaCha state matrix is 16 32-bit words. Currently it is represented in the code as a raw u32 array, or even just a pointer to u32. This weak typing is error-prone. Instead, introduce struct chacha_state: struct chacha_state { u32 x[16]; }; Convert all ChaCha and HChaCha functions to use struct chacha_state. No functional changes. Signed-off-by: Eric Biggers Acked-by: Kent Overstreet Signed-off-by: Herbert Xu commit 97855e7f1ccf4917f305baab199edb9f2595ff5b Author: Herbert Xu Date: Mon May 5 15:15:13 2025 +0800 crypto: crypto4xx - Remove ahash-related code The hash implementation in crypto4xx has been disabled since 2009. As nobody has tried to fix this remove all the dead code. Signed-off-by: Herbert Xu commit 2c54e431574f829ec0895d5104575b3f209eae28 Author: Athira Rajeev Date: Tue May 6 19:22:32 2025 +0530 powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition htmdump_init calls is_kvm_guest() to check for guest environment. is_kvm_guest() is defined in kvm_guest.h header file. Without including the header file, build hits error failing to find the function. arch/powerpc/platforms/pseries/htmdump.c: In function 'htmdump_init': arch/powerpc/platforms/pseries/htmdump.c:469:6: error: implicit declaration of function 'is_kvm_guest'; did you mean '__key_get'? [-Werror=implicit-function-declaration] if (is_kvm_guest()) { ^~~~~~~~~~~~ __key_get This is observed in configs where CONFIG_KVM_GUEST is disabled. Include header file explicitly to avoid the build error Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505061324.elUl4njU-lkp@intel.com/ Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250506135232.69014-1-atrajeev@linux.ibm.com commit ccdb36cbe65fe05fd5349c7ee5a59e53be7fe195 Author: Amit Machhiwal Date: Sat Apr 26 00:26:41 2025 +0530 KVM: PPC: Book3S HV: Fix IRQ map warnings with XICS on pSeries KVM Guest The commit 9576730d0e6e ("KVM: PPC: select IRQ_BYPASS_MANAGER") enabled IRQ_BYPASS_MANAGER when CONFIG_KVM was set. Subsequently, commit c57875f5f9be ("KVM: PPC: Book3S HV: Enable IRQ bypass") enabled IRQ bypass and added the necessary callbacks to create/remove the mappings between host real IRQ and the guest GSI. The availability of IRQ bypass is determined by the arch-specific function kvm_arch_has_irq_bypass(), which invokes kvmppc_irq_bypass_add_producer_hv(). This function, in turn, calls kvmppc_set_passthru_irq_hv() to create a mapping in the passthrough IRQ map, associating a host IRQ to a guest GSI. However, when a pSeries KVM guest (L2) is booted within an LPAR (L1) with the kernel boot parameter `xive=off`, it defaults to using emulated XICS controller. As an attempt to establish host IRQ to guest GSI mappings via kvmppc_set_passthru_irq() on a PCI device hotplug (passhthrough) operation fail, returning -ENOENT. This failure occurs because only interrupts with EOI operations handled through OPAL calls (verified via is_pnv_opal_msi()) are currently supported. These mapping failures lead to below repeated warnings in the L1 host: [ 509.220349] kvmppc_set_passthru_irq_hv: Could not assign IRQ map for (58,4970) [ 509.220368] kvmppc_set_passthru_irq (irq 58, gsi 4970) fails: -2 [ 509.220376] vfio-pci 0015:01:00.0: irq bypass producer (token 0000000090bc635b) registration fails: -2 ... [ 509.291781] vfio-pci 0015:01:00.0: irq bypass producer (token 000000003822eed8) registration fails: -2 Fix this by restricting IRQ bypass enablement on pSeries systems by making the IRQ bypass callbacks unavailable when running on pSeries platform. Signed-off-by: Amit Machhiwal Tested-by: Gautam Menghani Reviewed-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250425185641.1611857-1-amachhiw@linux.ibm.com commit f9cb1476ade41ba859e6f41323e76284b297d7c2 Author: Christophe Leroy Date: Fri May 2 15:07:53 2025 +0200 powerpc/8xx: Reduce alignment constraint for kernel memory 8xx has three large page sizes: 8M, 512k and 16k. A too big alignment can lead to wasting memory. On a board which has only 32 MBytes of RAM, every single byte is worth it and a 512k alignment is sometimes too much. Allow mapping kernel memory with 16k pages and reduce the constraint on kernel memory alignment. 512k and 16k pages are handled the same way so reverse tests in order to make 8M pages the special case and other ones (512k and 16k) the alternative. Signed-off-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/fa9927b70df13627cdf10b992ea71d6562c7760e.1746191262.git.christophe.leroy@csgroup.eu commit d43eef530946783cb5537ee58bec892253b68648 Merge: a4ca02454821cb 8856eafcc05ecf Author: Mark Brown Date: Mon May 12 11:28:54 2025 +0900 Add more devm_ functions to fix PM imbalance in Merge series from Bence Csókás : The probe() function of the atmel-quadspi driver got quite convoluted, especially since the addition of SAMA7G5 support, that was forward-ported from an older vendor kernel. During the port, a bug was introduced, where the PM get() and put() calls were imbalanced. To alleivate this - and similar problems in the future - an effort was made to migrate as many functions as possible, to their devm_ managed counterparts. The few functions, which did not yet have a devm_ variant, are added in patch 1 of this series. Patch 2 then uses these APIs to fix the probe() function. commit cf80fdbc0a5512feabbc56280b2abbb51d4e5b4e Author: Andy Shevchenko Date: Fri May 2 15:17:42 2025 +0300 list: remove redundant 'extern' for function prototypes The 'extern' keyword is redundant for function prototypes. list.h never used them and new code in general is better without them. Link: https://lkml.kernel.org/r/20250502121742.3997529-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton commit 09e1d93a421fa5f6699a9dbdbfc09c1008de4b9a Author: Illia Ostapyshyn Date: Sat May 3 14:32:32 2025 +0200 scripts/gdb: update documentation for lx_per_cpu Commit db08c53fdd542bb7f83b ("scripts/gdb: fix parameter handling in $lx_per_cpu") changed the parameter handling of lx_per_cpu to use GdbValue instead of parsing the variable name. Update the documentation to reflect the new lx_per_cpu usage. Update the hrtimer_bases example to use rb_tree instead of the timerqueue_head.next pointer removed in commit 511885d7061eda3eb1fa ("lib/timerqueue: Rely on rbtree semantics for next timer"). Link: https://lkml.kernel.org/r/20250503123234.2407184-3-illia@yshyn.com Signed-off-by: Illia Ostapyshyn Cc: Alex Shi Cc: Brendan Jackman Cc: Dongliang Mu Cc: Florian Rommel Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jan Kiszka Cc: Jonathan Corbet Cc: Kieran Bingham Cc: Yanteng Si Signed-off-by: Andrew Morton commit 6be7045c7756caf2d445dc66473e45ac5779cd55 Author: Illia Ostapyshyn Date: Sat May 3 14:32:31 2025 +0200 scripts/gdb: fix kgdb probing on single-core systems Patch series "scripts/gdb: Fixes related to lx_per_cpu()". These patches (1) fix kgdb detection on systems featuring a single CPU and (2) update the documentation to reflect the current usage of lx_per_cpu() and update an outdated example of its usage. This patch (of 2): When requested the list of threads via qfThreadInfo, gdb_cmd_query in kernel/debug/gdbstub.c first returns "shadow" threads for CPUs followed by the actual tasks in the system. Extended qThreadExtraInfo queries yield "shadowCPU%d" as the name for the CPU core threads. This behavior is used by get_gdbserver_type() to probe for KGDB by matching the name for the thread 2 against "shadowCPU". This breaks down on single-core systems, where thread 2 is the first nonshadow thread. Request the name for thread 1 instead. As GDB assigns thread IDs in the order of their appearance, it is safe to assume shadowCPU0 at ID 1 as long as CPU0 is not hotplugged. Before: (gdb) info threads Id Target Id Frame 1 Thread 4294967294 (shadowCPU0) kgdb_breakpoint () * 2 Thread 1 (swapper/0) kgdb_breakpoint () 3 Thread 2 (kthreadd) 0x0000000000000000 in ?? () ... (gdb) p $lx_current().comm Sorry, obtaining the current CPU is not yet supported with this gdb server. After: (gdb) info threads Id Target Id Frame 1 Thread 4294967294 (shadowCPU0) kgdb_breakpoint () * 2 Thread 1 (swapper/0) kgdb_breakpoint () 3 Thread 2 (kthreadd) 0x0000000000000000 in ?? () ... (gdb) p $lx_current().comm $1 = "swapper/0\000\000\000\000\000\000" Link: https://lkml.kernel.org/r/20250503123234.2407184-1-illia@yshyn.com Link: https://lkml.kernel.org/r/20250503123234.2407184-2-illia@yshyn.com Signed-off-by: Illia Ostapyshyn Cc: Alex Shi Cc: Brendan Jackman Cc: Dongliang Mu Cc: Florian Rommel Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jan Kiszka Cc: Jonathan Corbet Cc: Kieran Bingham Cc: Yanteng Si Signed-off-by: Andrew Morton commit f11c1efe46ad84555a0948401c7bdb63d711088d Author: Chelsy Ratnawat Date: Sat May 3 14:19:59 2025 -0700 selftests: fix some typos in tools/testing/selftests Fix multiple spelling errors: - "rougly" -> "roughly" - "fielesystems" -> "filesystems" - "Can'" -> "Can't" Link: https://lkml.kernel.org/r/20250503211959.507815-1-chelsyratnawat2001@gmail.com Signed-off-by: Chelsy Ratnawat Cc: Christian Brauner Cc: Shuah Khan Signed-off-by: Andrew Morton commit 479d26ee013c5388ad6855e512ab20d81e43750d Author: Dr. David Alan Gilbert Date: Thu May 1 02:05:02 2025 +0100 lib/oid_registry.c: remove unused sprint_OID sprint_OID() was added as part of 2012's commit 4f73175d0375 ("X.509: Add utility functions to render OIDs as strings") but it hasn't been used. Remove it. Note that there's also 'sprint_oid' (lower case) which is used in a lot of places; that's left as is except for fixing its case in a comment. Link: https://lkml.kernel.org/r/20250501010502.326472-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Andrew Morton commit 8e39fbb1edbb4ec9d7c1124f403877fc167fcecd Author: Ryusuke Konishi Date: Tue Apr 29 02:37:08 2025 +0900 nilfs2: do not propagate ENOENT error from nilfs_btree_propagate() In preparation for writing logs, in nilfs_btree_propagate(), which makes parent and ancestor node blocks dirty starting from a modified data block or b-tree node block, if the starting block does not belong to the b-tree, i.e. is isolated, nilfs_btree_do_lookup() called within the function fails with -ENOENT. In this case, even though -ENOENT is an internal code, it is propagated to the log writer via nilfs_bmap_propagate() and may be erroneously returned to system calls such as fsync(). Fix this issue by changing the error code to -EINVAL in this case, and having the bmap layer detect metadata corruption and convert the error code appropriately. Link: https://lkml.kernel.org/r/20250428173808.6452-3-konishi.ryusuke@gmail.com Fixes: 1f5abe7e7dbc ("nilfs2: replace BUG_ON and BUG calls triggerable from ioctl") Signed-off-by: Ryusuke Konishi Cc: Wentao Liang Signed-off-by: Andrew Morton commit f43f02429295486059605997bc43803527d69791 Author: Wentao Liang Date: Tue Apr 29 02:37:07 2025 +0900 nilfs2: add pointer check for nilfs_direct_propagate() Patch series "nilfs2: improve sanity checks in dirty state propagation". This fixes one missed check for block mapping anomalies and one improper return of an error code during a preparation step for log writing, thereby improving checking for filesystem corruption on writeback. This patch (of 2): In nilfs_direct_propagate(), the printer get from nilfs_direct_get_ptr() need to be checked to ensure it is not an invalid pointer. If the pointer value obtained by nilfs_direct_get_ptr() is NILFS_BMAP_INVALID_PTR, means that the metadata (in this case, i_bmap in the nilfs_inode_info struct) that should point to the data block at the buffer head of the argument is corrupted and the data block is orphaned, meaning that the file system has lost consistency. Add a value check and return -EINVAL when it is an invalid pointer. Link: https://lkml.kernel.org/r/20250428173808.6452-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20250428173808.6452-2-konishi.ryusuke@gmail.com Fixes: 36a580eb489f ("nilfs2: direct block mapping") Signed-off-by: Wentao Liang Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit f7a667a046cf9962b0b3eb763b1fbe3eec925a2c Author: Eric Biggers Date: Mon Apr 28 11:57:20 2025 -0700 kexec_file: use SHA-256 library API instead of crypto_shash API This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Tested with '/sbin/kexec --kexec-file-syscall'. Link: https://lkml.kernel.org/r/20250428185721.844686-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Andrew Morton commit c91d78622e16f628176d7248044106b03818af6d Author: Andy Shevchenko Date: Mon Apr 28 10:27:37 2025 +0300 util_macros.h: fix the reference in kernel-doc In PTR_IF() description the text refers to the parameter as (ptr) while the kernel-doc format asks for @ptr. Fix this accordingly. Link: https://lkml.kernel.org/r/20250428072737.3265239-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexandru Ardelean Signed-off-by: Andrew Morton commit f3def8270c67217efb0e23dcd54714f74de3b6b2 Author: Fedor Pchelkin Date: Sun Apr 27 23:14:49 2025 +0300 sort.h: hoist cmp_int() into generic header file Deduplicate the same functionality implemented in several places by moving the cmp_int() helper macro into linux/sort.h. The macro performs a three-way comparison of the arguments mostly useful in different sorting strategies and algorithms. Link: https://lkml.kernel.org/r/20250427201451.900730-1-pchelkin@ispras.ru Signed-off-by: Fedor Pchelkin Suggested-by: Darrick J. Wong Acked-by: Kent Overstreet Acked-by: Coly Li Cc: Al Viro Cc: Carlos Maiolino Cc: Christian Brauner Cc: Coly Li Cc: Jan Kara Signed-off-by: Andrew Morton commit 1785c67e2adc4d1899685b36dd10f7ebbf117178 Author: Chen Ni Date: Tue Apr 22 15:30:51 2025 +0800 ocfs2: remove unnecessary NULL check before unregister_sysctl_table() unregister_sysctl_table() checks for NULL pointers internally. Remove unneeded NULL check here. Link: https://lkml.kernel.org/r/20250422073051.1334310-1-nichen@iscas.ac.cn Signed-off-by: Chen Ni Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton commit cdc3ed3035d0fe934aa1d9b78ce256752fd3bb7d Author: Murad Masimov Date: Wed Apr 2 09:56:27 2025 +0300 ocfs2: fix possible memory leak in ocfs2_finish_quota_recovery If ocfs2_finish_quota_recovery() exits due to an error before passing all rc_list elements to ocfs2_recover_local_quota_file() then it can lead to a memory leak as rc_list may still contain elements that have to be freed. Release all memory allocated by ocfs2_add_recovery_chunk() using ocfs2_free_quota_recovery() instead of kfree(). Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Link: https://lkml.kernel.org/r/20250402065628.706359-2-m.masimov@mt-integration.ru Fixes: 2205363dce74 ("ocfs2: Implement quota recovery") Signed-off-by: Murad Masimov Reviewed-by: Jan Kara Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton commit d66adabe91803ef34a8b90613c81267b5ded1472 Author: Jeongjun Park Date: Thu Apr 24 23:33:22 2025 +0900 ipc: fix to protect IPCS lookups using RCU syzbot reported that it discovered a use-after-free vulnerability, [0] [0]: https://lore.kernel.org/all/67af13f8.050a0220.21dd3.0038.GAE@google.com/ idr_for_each() is protected by rwsem, but this is not enough. If it is not protected by RCU read-critical region, when idr_for_each() calls radix_tree_node_free() through call_rcu() to free the radix_tree_node structure, the node will be freed immediately, and when reading the next node in radix_tree_for_each_slot(), the already freed memory may be read. Therefore, we need to add code to make sure that idr_for_each() is protected within the RCU read-critical region when we call it in shm_destroy_orphaned(). Link: https://lkml.kernel.org/r/20250424143322.18830-1-aha310510@gmail.com Fixes: b34a6b1da371 ("ipc: introduce shm_rmid_forced sysctl") Signed-off-by: Jeongjun Park Reported-by: syzbot+a2b84e569d06ca3a949c@syzkaller.appspotmail.com Cc: Jeongjun Park Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Vasiliy Kulikov Cc: Signed-off-by: Andrew Morton commit 9c7b53b21fb1df20f85e3822160b4687f98ff7b3 Author: Marc Herbert Date: Thu Apr 24 19:40:35 2025 +0000 compiler_types.h: fix "unused variable" in __compiletime_assert() This refines commit c03567a8e8d5 ("include/linux/compiler.h: don't perform compiletime_assert with -O0") and restores #ifdef __OPTIMIZE__ symmetry by evaluating the 'condition' variable in both compile-time variants of __compiletimeassert(). As __OPTIMIZE__ is always true by default, this commit does not change anything by default. But it fixes warnings with _non-default_ CFLAGS like for instance this: make CFLAGS_tcp.o='-Og -U__OPTIMIZE__' from net/ipv4/tcp.c:273: include/net/sch_generic.h: In function `qdisc_cb_private_validate': include/net/sch_generic.h:511:30: error: unused variable `qcb' [-Werror=unused-variable] { struct qdisc_skb_cb *qcb; BUILD_BUG_ON(sizeof(skb->cb) < sizeof(*qcb)); ... } [akpm@linux-foundation.org: regularize comment layout, reflow comment] Link: https://lkml.kernel.org/r/20250424194048.652571-1-marc.herbert@linux.intel.com Signed-off-by: Marc Herbert Cc: Alexander Potapenko Cc: Changbin Du Cc: Jan Hendrik Farr Cc: Macro Elver Cc: Miguel Ojeda Cc: Tony Ambardar Cc: Uros Bizjak Cc: Kees Cook Signed-off-by: Andrew Morton commit 3dc32adf98147b36b25dc579bb438c9ea086b1b4 Author: Mykyta Yatsenko Date: Tue Apr 22 14:14:49 2025 +0100 maccess: fix strncpy_from_user_nofault() empty string handling strncpy_from_user_nofault() should return the length of the copied string including the trailing NUL, but if the argument unsafe_addr points to an empty string ({'\0'}), the return value is 0. This happens as strncpy_from_user() copies terminal symbol into dst and returns 0 (as expected), but strncpy_from_user_nofault does not modify ret as it is not equal to count and not greater than 0, so 0 is returned, which contradicts the contract. Link: https://lkml.kernel.org/r/20250422131449.57177-1-mykyta.yatsenko5@gmail.com Signed-off-by: Mykyta Yatsenko Reviewed-by: Andrii Nakryiko Cc: "Masami Hiramatsu (Google)" Cc: Steven Rostedt Cc: Kees Cook Signed-off-by: Andrew Morton commit 7123dbbef88cfd9f09e8a7899b0911834600cfa3 Author: Luo Gengkun Date: Mon Apr 21 03:50:21 2025 +0000 watchdog: fix watchdog may detect false positive of softlockup When updating `watchdog_thresh`, there is a race condition between writing the new `watchdog_thresh` value and stopping the old watchdog timer. If the old timer triggers during this window, it may falsely detect a softlockup due to the old interval and the new `watchdog_thresh` value being used. The problem can be described as follow: # We asuume previous watchdog_thresh is 60, so the watchdog timer is # coming every 24s. echo 10 > /proc/sys/kernel/watchdog_thresh (User space) | +------>+ update watchdog_thresh (We are in kernel now) | | # using old interval and new `watchdog_thresh` +------>+ watchdog hrtimer (irq context: detect softlockup) | | +-------+ | | + softlockup_stop_all To fix this problem, introduce a shadow variable for `watchdog_thresh`. The update to the actual `watchdog_thresh` is delayed until after the old timer is stopped, preventing false positives. The following testcase may help to understand this problem. --------------------------------------------- echo RT_RUNTIME_SHARE > /sys/kernel/debug/sched/features echo -1 > /proc/sys/kernel/sched_rt_runtime_us echo 0 > /sys/kernel/debug/sched/fair_server/cpu3/runtime echo 60 > /proc/sys/kernel/watchdog_thresh taskset -c 3 chrt -r 99 /bin/bash -c "while true;do true; done" & echo 10 > /proc/sys/kernel/watchdog_thresh & --------------------------------------------- The test case above first removes the throttling restrictions for real-time tasks. It then sets watchdog_thresh to 60 and executes a real-time task ,a simple while(1) loop, on cpu3. Consequently, the final command gets blocked because the presence of this real-time thread prevents kworker:3 from being selected by the scheduler. This eventually triggers a softlockup detection on cpu3 due to watchdog_timer_fn operating with inconsistent variable - using both the old interval and the updated watchdog_thresh simultaneously. [nysal@linux.ibm.com: fix the SOFTLOCKUP_DETECTOR=n case] Link: https://lkml.kernel.org/r/20250502111120.282690-1-nysal@linux.ibm.com Link: https://lkml.kernel.org/r/20250421035021.3507649-1-luogengkun@huaweicloud.com Signed-off-by: Luo Gengkun Signed-off-by: Nysal Jan K.A. Cc: Doug Anderson Cc: Joel Granados Cc: Song Liu Cc: Thomas Gleinxer Cc: "Nysal Jan K.A." Cc: Venkat Rao Bagalkote Cc: Signed-off-by: Andrew Morton commit 2e27fa943b74c9fc5fdf93090508c3c722531c66 Author: WangYuli Date: Mon Apr 21 15:49:10 2025 +0800 treewide: fix typo "previlege" There are some spelling mistakes of 'previlege' in comments which should be 'privilege'. Fix them and add it to scripts/spelling.txt. The typo in arch/loongarch/kvm/main.c was corrected by a different patch [1] and is therefore not included in this submission. [1]. https://lore.kernel.org/all/20250420142208.2252280-1-wheatfox17@icloud.com/ Link: https://lkml.kernel.org/r/46AD404E411A4BAC+20250421074910.66988-1-wangyuli@uniontech.com Signed-off-by: WangYuli Signed-off-by: Andrew Morton commit f0eba23cb70a945ea0947bdbf0706ca00da50d26 Author: Colin Ian King Date: Fri Apr 18 13:03:31 2025 +0100 crash: fix spelling mistake "crahskernel" -> "crashkernel" There is a spelling mistake in a pr_warn message. Fix it. Link: https://lkml.kernel.org/r/20250418120331.535086-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 92f3c5a0051d2b56379651522b587ff7309b2606 Author: Herton R. Krzesinski Date: Fri Apr 18 13:50:47 2025 -0300 lib/test_kmod: do not hardcode/depend on any filesystem Right now test_kmod has hardcoded dependencies on btrfs/xfs. That is not optimal since you end up needing to select/build them, but it is not really required since other fs could be selected for the testing. Also, we can't change the default/driver module used for testing on initialization. Thus make it more generic: introduce two module parameters (start_driver and start_test_fs), which allow to select which modules/fs to use for the testing on test_kmod initialization. Then it's up to the user to select which modules/fs to use for testing based on his config. However, keep test_module as required default. This way, config/modules becomes selectable as when the testing is done from selftests (userspace). While at it, also change trigger_config_run_type, since at module initialization we already set the defaults at __kmod_config_init and should not need to do it again in test_kmod_init(), thus we can avoid to again set test_driver/test_fs. Link: https://lkml.kernel.org/r/20250418165047.702487-1-herton@redhat.com Signed-off-by: Herton R. Krzesinski Reviewed-by: Luis Chambelrain Cc: Daniel Gomez Cc: Nathan Chancellor Cc: Petr Pavlu Cc: Sami Tolvanen Signed-off-by: Andrew Morton commit 2a1c6158131f05c228001e1f73304535bc205444 Author: Dr. David Alan Gilbert Date: Sat Apr 19 00:49:32 2025 +0100 relay: remove unused relay_late_setup_files The last use of relay_late_setup_files() was removed in 2018 by commit 2b47733045aa ("drm/i915/guc: Merge log relay file and channel creation") Remove it and the helper it used. relay_late_setup_files() was used for eventually registering 'buffer only' channels. With it gone, delete the docs that explain how to do that. Which suggests it should be possible to lose the 'has_base_filename' flags. (Are there any other uses??) Link: https://lkml.kernel.org/r/20250418234932.490863-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jens Axboe Cc: Al Viro Cc: Andriy Shevchenko Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit ba8182d44b4e557e2dc34e51a88105ce5b083372 Author: Dr. David Alan Gilbert Date: Sat Apr 19 21:30:12 2025 +0100 rapidio: remove unused functions rio_request_dma() and rio_dma_prep_slave_sg() were added in 2012 by commit e42d98ebe7d7 ("rapidio: add DMA engine support for RIO data transfers") but never used. rio_find_mport() last use was removed in 2013 by commit 9edbc30b434f ("rapidio: update enumerator registration mechanism") rio_unregister_scan() was added in 2013 by commit a11650e11093 ("rapidio: make enumeration/discovery configurable") but never used. Remove them. Link: https://lkml.kernel.org/r/20250419203012.429787-3-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Cc: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton commit b7df1f254e1a326e6c55698b76bf407df4ec6b6c Author: Dr. David Alan Gilbert Date: Sat Apr 19 21:30:11 2025 +0100 rapidio: remove some dead defines Patch series "rapidio deadcoding". A couple of rapidio deadcoding patches. The first of these is a repost and was originally posted almost a year ago https://lore.kernel.org/all/20240528002515.211366-1-linux@treblig.org/ but got no answer. Other than being rebased and a typo fixed, it's not changed. This patch (of 2): 'mport_dma_buf', 'rio_mport_dma_map' and 'MPORT_MAX_DMA_BUFS' were added in the original commit e8de370188d0 ("rapidio: add mport char device driver") but never used. 'rio_cm_work' was unused since the original commit b6e8d4aa1110 ("rapidio: add RapidIO channelized messaging driver") but never used. Remove them. Link: https://lkml.kernel.org/r/20250419203012.429787-1-linux@treblig.org Link: https://lkml.kernel.org/r/20250419203012.429787-2-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Cc: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton commit 8d1d4b538bb12a858fa95a073c4aff31e79088ee Author: Caleb Sander Mateos Date: Wed Apr 16 10:06:13 2025 -0600 scatterlist: inline sg_next() sg_next() is a short function called frequently in I/O paths. Define it in the header file so it can be inlined into its callers. Link: https://lkml.kernel.org/r/20250416160615.3571958-1-csander@purestorage.com Signed-off-by: Caleb Sander Mateos Cc: Eric Biggers Signed-off-by: Andrew Morton commit 7d9b05277ae89b9306f9d71ec35a03ee59508334 Author: Thorsten Blum Date: Tue Apr 8 12:34:07 2025 +0200 ocfs2: simplify return statement in ocfs2_filecheck_attr_store() Don't negate 'ret' and simplify the return statement. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton commit 1abf729e9d9f4eb42c01fa9cb86eeb1766ecd49f Author: Zi Li Date: Mon Apr 14 22:59:45 2025 +0800 samples: extend hung_task detector test with semaphore support Extend the existing hung_task detector test module to support multiple lock types, including mutex and semaphore, with room for future additions (e.g., spinlock, etc.). This module creates dummy files under /hung_task, such as 'mutex' and 'semaphore'. The read process on any of these files will sleep for enough long time (256 seconds) while holding the respective lock. As a result, the second process will wait on the lock for a prolonged duration and be detected by the hung_task detector. This change unifies the previous mutex-only sample into a single, extensible hung_task_tests module, reducing code duplication and improving maintainability. Usage is: > cd /sys/kernel/debug/hung_task > cat mutex & cat mutex # Test mutex blocking > cat semaphore & cat semaphore # Test semaphore blocking Update the Kconfig description to reflect multiple debugfs files support. Link: https://lkml.kernel.org/r/20250414145945.84916-4-ioworker0@gmail.com Signed-off-by: Lance Yang Signed-off-by: Zi Li Suggested-by: Masami Hiramatsu (Google) Acked-by: Masami Hiramatsu (Google) Cc: Anna Schumaker Cc: Boqun Feng Cc: Ingo Molnar Cc: Joel Granados Cc: John Stultz Cc: Kent Overstreet Cc: Mingzhe Yang Cc: Peter Zijlstra Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Tomasz Figa Cc: Waiman Long Cc: Will Deacon Cc: Yongliang Gao Signed-off-by: Andrew Morton commit 194a9b9e843b4077033be70a07d191107972aa53 Author: Lance Yang Date: Mon Apr 14 22:59:44 2025 +0800 hung_task: show the blocker task if the task is hung on semaphore Inspired by mutex blocker tracking[1], this patch makes a trade-off to balance the overhead and utility of the hung task detector. Unlike mutexes, semaphores lack explicit ownership tracking, making it challenging to identify the root cause of hangs. To address this, we introduce a last_holder field to the semaphore structure, which is updated when a task successfully calls down() and cleared during up(). The assumption is that if a task is blocked on a semaphore, the holders must not have released it. While this does not guarantee that the last holder is one of the current blockers, it likely provides a practical hint for diagnosing semaphore-related stalls. With this change, the hung task detector can now show blocker task's info like below: [Tue Apr 8 12:19:07 2025] INFO: task cat:945 blocked for more than 120 seconds. [Tue Apr 8 12:19:07 2025] Tainted: G E 6.14.0-rc6+ #1 [Tue Apr 8 12:19:07 2025] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [Tue Apr 8 12:19:07 2025] task:cat state:D stack:0 pid:945 tgid:945 ppid:828 task_flags:0x400000 flags:0x00000000 [Tue Apr 8 12:19:07 2025] Call Trace: [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] __schedule+0x491/0xbd0 [Tue Apr 8 12:19:07 2025] schedule+0x27/0xf0 [Tue Apr 8 12:19:07 2025] schedule_timeout+0xe3/0xf0 [Tue Apr 8 12:19:07 2025] ? __folio_mod_stat+0x2a/0x80 [Tue Apr 8 12:19:07 2025] ? set_ptes.constprop.0+0x27/0x90 [Tue Apr 8 12:19:07 2025] __down_common+0x155/0x280 [Tue Apr 8 12:19:07 2025] down+0x53/0x70 [Tue Apr 8 12:19:07 2025] read_dummy_semaphore+0x23/0x60 [Tue Apr 8 12:19:07 2025] full_proxy_read+0x5f/0xa0 [Tue Apr 8 12:19:07 2025] vfs_read+0xbc/0x350 [Tue Apr 8 12:19:07 2025] ? __count_memcg_events+0xa5/0x140 [Tue Apr 8 12:19:07 2025] ? count_memcg_events.constprop.0+0x1a/0x30 [Tue Apr 8 12:19:07 2025] ? handle_mm_fault+0x180/0x260 [Tue Apr 8 12:19:07 2025] ksys_read+0x66/0xe0 [Tue Apr 8 12:19:07 2025] do_syscall_64+0x51/0x120 [Tue Apr 8 12:19:07 2025] entry_SYSCALL_64_after_hwframe+0x76/0x7e [Tue Apr 8 12:19:07 2025] RIP: 0033:0x7f419478f46e [Tue Apr 8 12:19:07 2025] RSP: 002b:00007fff1c4d2668 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [Tue Apr 8 12:19:07 2025] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f419478f46e [Tue Apr 8 12:19:07 2025] RDX: 0000000000020000 RSI: 00007f4194683000 RDI: 0000000000000003 [Tue Apr 8 12:19:07 2025] RBP: 00007f4194683000 R08: 00007f4194682010 R09: 0000000000000000 [Tue Apr 8 12:19:07 2025] R10: fffffffffffffbc5 R11: 0000000000000246 R12: 0000000000000000 [Tue Apr 8 12:19:07 2025] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] INFO: task cat:945 blocked on a semaphore likely last held by task cat:938 [Tue Apr 8 12:19:07 2025] task:cat state:S stack:0 pid:938 tgid:938 ppid:584 task_flags:0x400000 flags:0x00000000 [Tue Apr 8 12:19:07 2025] Call Trace: [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] __schedule+0x491/0xbd0 [Tue Apr 8 12:19:07 2025] ? _raw_spin_unlock_irqrestore+0xe/0x40 [Tue Apr 8 12:19:07 2025] schedule+0x27/0xf0 [Tue Apr 8 12:19:07 2025] schedule_timeout+0x77/0xf0 [Tue Apr 8 12:19:07 2025] ? __pfx_process_timeout+0x10/0x10 [Tue Apr 8 12:19:07 2025] msleep_interruptible+0x49/0x60 [Tue Apr 8 12:19:07 2025] read_dummy_semaphore+0x2d/0x60 [Tue Apr 8 12:19:07 2025] full_proxy_read+0x5f/0xa0 [Tue Apr 8 12:19:07 2025] vfs_read+0xbc/0x350 [Tue Apr 8 12:19:07 2025] ? __count_memcg_events+0xa5/0x140 [Tue Apr 8 12:19:07 2025] ? count_memcg_events.constprop.0+0x1a/0x30 [Tue Apr 8 12:19:07 2025] ? handle_mm_fault+0x180/0x260 [Tue Apr 8 12:19:07 2025] ksys_read+0x66/0xe0 [Tue Apr 8 12:19:07 2025] do_syscall_64+0x51/0x120 [Tue Apr 8 12:19:07 2025] entry_SYSCALL_64_after_hwframe+0x76/0x7e [Tue Apr 8 12:19:07 2025] RIP: 0033:0x7f7c584a646e [Tue Apr 8 12:19:07 2025] RSP: 002b:00007ffdba8ce158 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [Tue Apr 8 12:19:07 2025] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f7c584a646e [Tue Apr 8 12:19:07 2025] RDX: 0000000000020000 RSI: 00007f7c5839a000 RDI: 0000000000000003 [Tue Apr 8 12:19:07 2025] RBP: 00007f7c5839a000 R08: 00007f7c58399010 R09: 0000000000000000 [Tue Apr 8 12:19:07 2025] R10: fffffffffffffbc5 R11: 0000000000000246 R12: 0000000000000000 [Tue Apr 8 12:19:07 2025] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [Tue Apr 8 12:19:07 2025] [1] https://lore.kernel.org/all/174046694331.2194069.15472952050240807469.stgit@mhiramat.tok.corp.google.com Link: https://lkml.kernel.org/r/20250414145945.84916-3-ioworker0@gmail.com Signed-off-by: Mingzhe Yang Signed-off-by: Lance Yang Suggested-by: Andrew Morton Suggested-by: Masami Hiramatsu (Google) Reviewed-by: Masami Hiramatsu (Google) Cc: Anna Schumaker Cc: Boqun Feng Cc: Ingo Molnar Cc: Joel Granados Cc: John Stultz Cc: Kent Overstreet Cc: Peter Zijlstra Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Tomasz Figa Cc: Waiman Long Cc: Will Deacon Cc: Yongliang Gao Cc: Zi Li Signed-off-by: Andrew Morton commit e711faaafbe54a884f33b53472434063d342f6d4 Author: Lance Yang Date: Mon Apr 14 22:59:43 2025 +0800 hung_task: replace blocker_mutex with encoded blocker Patch series "hung_task: extend blocking task stacktrace dump to semaphore", v5. Inspired by mutex blocker tracking[1], this patch series extend the feature to not only dump the blocker task holding a mutex but also to support semaphores. Unlike mutexes, semaphores lack explicit ownership tracking, making it challenging to identify the root cause of hangs. To address this, we introduce a last_holder field to the semaphore structure, which is updated when a task successfully calls down() and cleared during up(). The assumption is that if a task is blocked on a semaphore, the holders must not have released it. While this does not guarantee that the last holder is one of the current blockers, it likely provides a practical hint for diagnosing semaphore-related stalls. With this change, the hung task detector can now show blocker task's info like below: [Tue Apr 8 12:19:07 2025] INFO: task cat:945 blocked for more than 120 seconds. [Tue Apr 8 12:19:07 2025] Tainted: G E 6.14.0-rc6+ #1 [Tue Apr 8 12:19:07 2025] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [Tue Apr 8 12:19:07 2025] task:cat state:D stack:0 pid:945 tgid:945 ppid:828 task_flags:0x400000 flags:0x00000000 [Tue Apr 8 12:19:07 2025] Call Trace: [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] __schedule+0x491/0xbd0 [Tue Apr 8 12:19:07 2025] schedule+0x27/0xf0 [Tue Apr 8 12:19:07 2025] schedule_timeout+0xe3/0xf0 [Tue Apr 8 12:19:07 2025] ? __folio_mod_stat+0x2a/0x80 [Tue Apr 8 12:19:07 2025] ? set_ptes.constprop.0+0x27/0x90 [Tue Apr 8 12:19:07 2025] __down_common+0x155/0x280 [Tue Apr 8 12:19:07 2025] down+0x53/0x70 [Tue Apr 8 12:19:07 2025] read_dummy_semaphore+0x23/0x60 [Tue Apr 8 12:19:07 2025] full_proxy_read+0x5f/0xa0 [Tue Apr 8 12:19:07 2025] vfs_read+0xbc/0x350 [Tue Apr 8 12:19:07 2025] ? __count_memcg_events+0xa5/0x140 [Tue Apr 8 12:19:07 2025] ? count_memcg_events.constprop.0+0x1a/0x30 [Tue Apr 8 12:19:07 2025] ? handle_mm_fault+0x180/0x260 [Tue Apr 8 12:19:07 2025] ksys_read+0x66/0xe0 [Tue Apr 8 12:19:07 2025] do_syscall_64+0x51/0x120 [Tue Apr 8 12:19:07 2025] entry_SYSCALL_64_after_hwframe+0x76/0x7e [Tue Apr 8 12:19:07 2025] RIP: 0033:0x7f419478f46e [Tue Apr 8 12:19:07 2025] RSP: 002b:00007fff1c4d2668 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [Tue Apr 8 12:19:07 2025] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f419478f46e [Tue Apr 8 12:19:07 2025] RDX: 0000000000020000 RSI: 00007f4194683000 RDI: 0000000000000003 [Tue Apr 8 12:19:07 2025] RBP: 00007f4194683000 R08: 00007f4194682010 R09: 0000000000000000 [Tue Apr 8 12:19:07 2025] R10: fffffffffffffbc5 R11: 0000000000000246 R12: 0000000000000000 [Tue Apr 8 12:19:07 2025] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] INFO: task cat:945 blocked on a semaphore likely last held by task cat:938 [Tue Apr 8 12:19:07 2025] task:cat state:S stack:0 pid:938 tgid:938 ppid:584 task_flags:0x400000 flags:0x00000000 [Tue Apr 8 12:19:07 2025] Call Trace: [Tue Apr 8 12:19:07 2025] [Tue Apr 8 12:19:07 2025] __schedule+0x491/0xbd0 [Tue Apr 8 12:19:07 2025] ? _raw_spin_unlock_irqrestore+0xe/0x40 [Tue Apr 8 12:19:07 2025] schedule+0x27/0xf0 [Tue Apr 8 12:19:07 2025] schedule_timeout+0x77/0xf0 [Tue Apr 8 12:19:07 2025] ? __pfx_process_timeout+0x10/0x10 [Tue Apr 8 12:19:07 2025] msleep_interruptible+0x49/0x60 [Tue Apr 8 12:19:07 2025] read_dummy_semaphore+0x2d/0x60 [Tue Apr 8 12:19:07 2025] full_proxy_read+0x5f/0xa0 [Tue Apr 8 12:19:07 2025] vfs_read+0xbc/0x350 [Tue Apr 8 12:19:07 2025] ? __count_memcg_events+0xa5/0x140 [Tue Apr 8 12:19:07 2025] ? count_memcg_events.constprop.0+0x1a/0x30 [Tue Apr 8 12:19:07 2025] ? handle_mm_fault+0x180/0x260 [Tue Apr 8 12:19:07 2025] ksys_read+0x66/0xe0 [Tue Apr 8 12:19:07 2025] do_syscall_64+0x51/0x120 [Tue Apr 8 12:19:07 2025] entry_SYSCALL_64_after_hwframe+0x76/0x7e [Tue Apr 8 12:19:07 2025] RIP: 0033:0x7f7c584a646e [Tue Apr 8 12:19:07 2025] RSP: 002b:00007ffdba8ce158 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [Tue Apr 8 12:19:07 2025] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f7c584a646e [Tue Apr 8 12:19:07 2025] RDX: 0000000000020000 RSI: 00007f7c5839a000 RDI: 0000000000000003 [Tue Apr 8 12:19:07 2025] RBP: 00007f7c5839a000 R08: 00007f7c58399010 R09: 0000000000000000 [Tue Apr 8 12:19:07 2025] R10: fffffffffffffbc5 R11: 0000000000000246 R12: 0000000000000000 [Tue Apr 8 12:19:07 2025] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [Tue Apr 8 12:19:07 2025] This patch (of 3): This patch replaces 'struct mutex *blocker_mutex' with 'unsigned long blocker', as only one blocker is active at a time. The blocker filed can store both the lock addrees and the lock type, with LSB used to encode the type as Masami suggested, making it easier to extend the feature to cover other types of locks. Also, once the lock type is determined, we can directly extract the address and cast it to a lock pointer ;) Link: https://lkml.kernel.org/r/20250414145945.84916-1-ioworker0@gmail.com Link: https://lore.kernel.org/all/174046694331.2194069.15472952050240807469.stgit@mhiramat.tok.corp.google.com [1] Link: https://lkml.kernel.org/r/20250414145945.84916-2-ioworker0@gmail.com Signed-off-by: Mingzhe Yang Signed-off-by: Lance Yang Reviewed-by: Masami Hiramatsu (Google) Suggested-by: Andrew Morton Suggested-by: Masami Hiramatsu (Google) Cc: Anna Schumaker Cc: Boqun Feng Cc: Ingo Molnar Cc: Joel Granados Cc: John Stultz Cc: Kent Overstreet Cc: Peter Zijlstra Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Tomasz Figa Cc: Waiman Long Cc: Will Deacon Cc: Yongliang Gao Cc: Zi Li Signed-off-by: Andrew Morton commit 50af973cd71ab9eea3b18429343659f4a6ebd825 Author: WangYuli Date: Fri Apr 11 18:26:10 2025 +0800 ocfs2: o2net_idle_timer: Rename del_timer_sync in comment Commit 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()") switched del_timer_sync to timer_delete_sync, but did not modify the comment for o2net_idle_timer(). Now fix it. Link: https://lkml.kernel.org/r/BDDB1E4E2876C36C+20250411102610.165946-1-wangyuli@uniontech.com Signed-off-by: WangYuli Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton commit 734aa85390ea693bb7eaf2240623d41b03705c84 Author: Phillip Lougher Date: Wed Apr 9 03:47:47 2025 +0100 Squashfs: check return result of sb_min_blocksize Syzkaller reports an "UBSAN: shift-out-of-bounds in squashfs_bio_read" bug. Syzkaller forks multiple processes which after mounting the Squashfs filesystem, issues an ioctl("/dev/loop0", LOOP_SET_BLOCK_SIZE, 0x8000). Now if this ioctl occurs at the same time another process is in the process of mounting a Squashfs filesystem on /dev/loop0, the failure occurs. When this happens the following code in squashfs_fill_super() fails. ---- msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); msblk->devblksize_log2 = ffz(~msblk->devblksize); ---- sb_min_blocksize() returns 0, which means msblk->devblksize is set to 0. As a result, ffz(~msblk->devblksize) returns 64, and msblk->devblksize_log2 is set to 64. This subsequently causes the UBSAN: shift-out-of-bounds in fs/squashfs/block.c:195:36 shift exponent 64 is too large for 64-bit type 'u64' (aka 'unsigned long long') This commit adds a check for a 0 return by sb_min_blocksize(). Link: https://lkml.kernel.org/r/20250409024747.876480-1-phillip@squashfs.org.uk Fixes: 0aa666190509 ("Squashfs: super block operations") Reported-by: syzbot+65761fc25a137b9c8c6e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67f0dd7a.050a0220.0a13.0230.GAE@google.com/ Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton commit fe6f600c43e0931f4fb5e1debb2311b7a6ebabd8 Author: Mateusz Guzik Date: Wed Mar 19 20:54:36 2025 +0100 exit: combine work under lock in synchronize_group_exit() and coredump_task_exit() This reduces single-threaded overhead as it avoids one lock+irq trip on exit. It also improves scalability of spawning and killing threads within one process (just shy of 5% when doing it on 24 cores on my test jig). Both routines are moved below kcov and kmsan exit, which should be harmless. Link: https://lkml.kernel.org/r/20250319195436.1864415-1-mjguzik@gmail.com Signed-off-by: Mateusz Guzik Reviewed-by: Oleg Nesterov Signed-off-by: Andrew Morton commit 3eff6a3e574c2f704f9be1f4867c3d0b3d804435 Author: Zijun Hu Date: Mon Apr 7 19:44:16 2025 +0800 errseq: eliminate special limitation for macro MAX_ERRNO Current errseq implementation depends on a very special precondition that macro MAX_ERRNO must be (2^n - 1). Eliminate the limitation by - redefining macro ERRSEQ_SHIFT - defining a new macro ERRNO_MASK instead of MAX_ERRNO for errno mask. There is no plan to change the value of MAX_ERRNO, but this makes the implementation more generic and eliminates the BUILD_BUG_ON(). Link: https://lkml.kernel.org/r/20250407-improve_errseq-v1-1-7b27cbeb8298@quicinc.com Signed-off-by: Zijun Hu Reviewed-by: Jeff Layton Signed-off-by: Andrew Morton commit ae5b3500856fb9a565470d83033bb91786ec16f1 Author: Mario Limonciello Date: Thu Mar 20 21:25:01 2025 -0500 kstrtox: add support for enabled and disabled in kstrtobool() In some places in the kernel there is a design pattern for sysfs attributes to use kstrtobool() in store() and str_enabled_disabled() in show(). This is counterintuitive to interact with because kstrtobool() takes on/off but str_enabled_disabled() shows enabled/disabled. Some of those sysfs uses could switch to str_on_off() but for some attributes enabled/disabled really makes more sense. Add support for kstrtobool() to accept enabled/disabled. Link: https://lkml.kernel.org/r/20250321022538.1532445-1-superm1@kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Andrew Morton commit 029c896c4105b7d74fcd88d99c5fbab2558fee89 Author: Andy Shevchenko Date: Mon Mar 24 12:50:25 2025 +0200 kernel.h: move PTR_IF() and u64_to_user_ptr() to util_macros.h While the natural choice of PTR_IF() is kconfig.h, the latter is too broad to include C code and actually the macro was moved out from there in the past. But kernel.h is neither a good choice for that. Move it to util_macros.h. Do the same for u64_to_user_ptr(). While moving, add necessary documentation. Link: https://lkml.kernel.org/r/20250324105228.775784-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexandru Ardelean Cc: Ingo Molnar Signed-off-by: Andrew Morton commit 4ef5211ee68113070bd42142f06347866675055e Author: Ingo Molnar Date: Mon Mar 24 12:50:24 2025 +0200 kernel.h: move READ/WRITE definitions to Patch series "kernel.h: Move out a couple of macros and constants". kernel.h hosts a couple of macros and constants that may be better placed. Do that. Also add missing documentation. No functional changes intended. This patch (of 2): Headers shouldn't be forced to include just to gain these simple constants. Link: https://lkml.kernel.org/r/20250324105228.775784-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20250324105228.775784-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Andy Shevchenko Cc: Alexandru Ardelean Signed-off-by: Andrew Morton commit 91e53493eeaf0fd74de7d57a162420a067cb84b9 Author: Jim Cromie Date: Tue Mar 25 17:51:56 2025 -0600 powernow: use pr_info_once This reduces log-msgs during boot from many pages to ~10 occurrences. I didn't investigate why it wasn't just 1, maybe its a low-level service to other modules, re-probed by each of them ? Link: https://lkml.kernel.org/r/20250325235156.663269-4-jim.cromie@gmail.com Signed-off-by: Jim Cromie Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Louis Chauvet Cc: Lukas Bulwahn Cc: Viresh Kumar Signed-off-by: Andrew Morton commit 15d4734c7a5837bd1a3d261ae232fa698fef39c4 Author: Jim Cromie Date: Tue Mar 25 17:51:55 2025 -0600 checkpatch: qualify do-while-0 advice Add a paragraph of advice qualifying the general do-while-0 advice, noting 3 possible misguidings. reduce one ERROR to WARN, for the case I actually encountered. And add 'static_assert' to named exceptions, along with some additional comments about named exceptions vs (detection of) declarative construction primitives (union, struct, [], etc). Link: https://lkml.kernel.org/r/20250325235156.663269-3-jim.cromie@gmail.com Signed-off-by: Jim Cromie Cc: Andy Whitcroft Cc: Joe Perches Cc: Dwaipayan Ray Cc: Lukas Bulwahn Cc: Louis Chauvet Cc: Viresh Kumar Signed-off-by: Andrew Morton commit df3d527495376e29333035e087ead194580ea3b2 Author: Jim Cromie Date: Tue Mar 25 17:51:54 2025 -0600 checkpatch: dont warn about unused macro arg on empty body Patch series "2 checkpatch fixes, one pr_info_once". 2 small tweaks to checkpatch, 1 reducing several pages of powernow "not-relevant-here" log-msgs to a few lines This patch (of 3): We currently get: WARNING: Argument 'name' is not used in function-like macro on: #define DRM_CLASSMAP_USE(name) /* nothing here */ Following this advice is wrong here, and shouldn't be fixed by ignoring args altogether; the macro should properly fail if invoked with 0 or 2+ args. Link: https://lkml.kernel.org/r/20250325235156.663269-1-jim.cromie@gmail.com Link: https://lkml.kernel.org/r/20250325235156.663269-2-jim.cromie@gmail.com Signed-off-by: Jim Cromie Acked-by: Joe Perches Reviewed-by: Louis Chauvet Cc: Andy Whitcroft Cc: Joe Perches Cc: Dwaipayan Ray Cc: Lukas Bulwahn Cc:"Rafael J. Wysocki" Cc: Viresh Kumar Signed-off-by: Andrew Morton commit 65c66047259fad1b868d4454bc5af95b46a5f954 Author: Penglei Jiang Date: Thu Apr 3 23:33:57 2025 -0700 proc: fix the issue of proc_mem_open returning NULL proc_mem_open() can return an errno, NULL, or mm_struct*. If it fails to acquire mm, it returns NULL, but the caller does not check for the case when the return value is NULL. The following conditions lead to failure in acquiring mm: - The task is a kernel thread (PF_KTHREAD) - The task is exiting (PF_EXITING) Changes: - Add documentation comments for the return value of proc_mem_open(). - Add checks in the caller to return -ESRCH when proc_mem_open() returns NULL. Link: https://lkml.kernel.org/r/20250404063357.78891-1-superman.xpt@gmail.com Reported-by: syzbot+f9238a0a31f9b5603fef@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000f52642060d4e3750@google.com Signed-off-by: Penglei Jiang Cc: Al Viro Cc: Adrian Ratiu Cc: Christian Brauner Cc: Felix Moessbauer Cc: Jeff layton Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Thomas Gleinxer Cc: xu xin Cc: Alexey Dobriyan Signed-off-by: Andrew Morton commit 3dfd79cc8772bc2f02e060aa8c0bbbba8c1a1e45 Author: Chisheng Chen Date: Thu Apr 3 19:26:14 2025 +0800 lib/rbtree.c: fix the example typo Replace `sr` with `Sr`. The condition `!tmp1 || rb_is_black(tmp1)` ensures that `tmp1` (which is `sibling->rb_right`) is either NULL or a black node. Therefore, the right child of the sibling must be black, and the example should use `Sr` instead of `sr`. Link: https://lkml.kernel.org/r/20250403112614.570140-1-johnny1001s000602@gmail.com Signed-off-by: Chisheng Chen Cc: Hsin Chang Yu Signed-off-by: Andrew Morton commit db80bd2cea1b7c2574578461c9de4c3d9ee7634a Author: Pasha Tatashin Date: Thu Apr 3 14:33:03 2025 +0200 task_stack.h: remove obsolete __HAVE_ARCH_KSTACK_END check Remove __HAVE_ARCH_KSTACK_END as it has been obsolete since removal of metag architecture in v4.17. Link: https://lkml.kernel.org/r/20250403-kstack-end-v1-1-7798e71f34d1@linaro.org Signed-off-by: Pasha Tatashin Link: https://lore.kernel.org/20240311164638.2015063-2-pasha.tatashin@soleen.com Signed-off-by: Linus Walleij Signed-off-by: Andrew Morton commit 247021624a99a35e0b04cfd784a84bd65b5a0c59 Author: Zhiquan Li Date: Thu Apr 3 11:08:01 2025 +0800 crash: export PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo On Intel TDX guest, unaccepted memory is unusable free memory which is not managed by buddy, until it's accepted by guest. Before that, it cannot be accessed by the first kernel as well as the kexec'ed kernel. The kexec'ed kernel will skip these pages and fill in zero data for the reader of vmcore. The dump tool like makedumpfile creates a page descriptor (size 24 bytes) for each non-free page, including zero data page, but it will not create descriptor for free pages. If it is not able to distinguish these unaccepted pages with zero data pages, a certain amount of space will be wasted in proportion (~1/170). In fact, as a special kind of free page the unaccepted pages should be excluded, like the real free pages. Export the page type PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo, so that dump tool can identify whether a page is unaccepted. [zhiquan1.li@intel.com: fix docs: "Title underline too short" warning] Link: https://lore.kernel.org/all/20240809114854.3745464-5-kirill.shutemov@linux.intel.com/ Link: https://lkml.kernel.org/r/20250405060610.860465-1-zhiquan1.li@intel.com Link: https://lore.kernel.org/all/20240809114854.3745464-5-kirill.shutemov@linux.intel.com/ Link: https://lkml.kernel.org/r/20250403030801.758687-1-zhiquan1.li@intel.com Signed-off-by: Zhiquan Li Reviewed-by: Kirill A. Shutemov Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Cc: Zhiquan Li Signed-off-by: Andrew Morton commit 3330dc1b2074629c74008ea0ee0b4fb279ce8992 Author: Francesco Valla Date: Sun Mar 16 21:50:15 2025 +0100 init/main.c: log initcall level when initcall_debug is used When initcall_debug is specified on the command line, the start and return point for each initcall is printed. However, no information on the initcall level is reported. Add to the initcall_debug infrastructure an additional print that informs when a new initcall level is entered. This is particularly useful when debugging dependency chains and/or working on boot time reduction. Link: https://lkml.kernel.org/r/20250316205014.2830071-2-francesco@valla.it Signed-off-by: Francesco Valla Cc: Steven Rostedt Cc: Tim Bird Signed-off-by: Andrew Morton commit 3ca55ca225d7627e76fcfe2894740c4f615ff2e0 Author: Andrii Nakryiko Date: Wed Apr 2 11:09:25 2025 -0700 exit: move and extend sched_process_exit() tracepoint It is useful to be able to access current->mm at task exit to, say, record a bunch of VMA information right before the task exits (e.g., for stack symbolization reasons when dealing with short-lived processes that exit in the middle of profiling session). Currently, trace_sched_process_exit() is triggered after exit_mm() which resets current->mm to NULL making this tracepoint unsuitable for inspecting and recording task's mm_struct-related data when tracing process lifetimes. There is a particularly suitable place, though, right after taskstats_exit() is called, but before we do exit_mm() and other exit_*() resource teardowns. taskstats performs a similar kind of accounting that some applications do with BPF, and so co-locating them seems like a good fit. So that's where trace_sched_process_exit() is moved with this patch. Also, existing trace_sched_process_exit() tracepoint is notoriously missing `group_dead` flag that is certainly useful in practice and some of our production applications have to work around this. So plumb `group_dead` through while at it, to have a richer and more complete tracepoint. Note that we can't use sched_process_template anymore, and so we use TRACE_EVENT()-based tracepoint definition. But all the field names and order, as well as assign and output logic remain intact. We just add one extra field at the end in backwards-compatible way. [andrii@kernel.org: document sched_process_exit and sched_process_template relation] Link: https://lkml.kernel.org/r/20250403174120.4087794-1-andrii@kernel.org Link: https://lkml.kernel.org/r/20250402180925.90914-1-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Steven Rostedt (Google) Acked-by: Oleg Nesterov Suggested-by: Ingo Molnar Cc: Alexander Potapenko Cc: Christian Brauner Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Michal Hocko Signed-off-by: Andrew Morton commit dec92bf95f5a710287b588cb203ff27abcd24706 Author: Rakie Kim Date: Thu Apr 17 16:28:37 2025 +0900 mm/mempolicy: support memory hotplug in weighted interleave The weighted interleave policy distributes page allocations across multiple NUMA nodes based on their performance weight, thereby improving memory bandwidth utilization. The weight values for each node are configured through sysfs. Previously, sysfs entries for configuring weighted interleave were created for all possible nodes (N_POSSIBLE) at initialization, including nodes that might not have memory. However, not all nodes in N_POSSIBLE are usable at runtime, as some may remain memoryless or offline. This led to sysfs entries being created for unusable nodes, causing potential misconfiguration issues. To address this issue, this patch modifies the sysfs creation logic to: 1) Limit sysfs entries to nodes that are online and have memory, avoiding the creation of sysfs entries for nodes that cannot be used. 2) Support memory hotplug by dynamically adding and removing sysfs entries based on whether a node transitions into or out of the N_MEMORY state. Additionally, the patch ensures that sysfs attributes are properly managed when nodes go offline, preventing stale or redundant entries from persisting in the system. By making these changes, the weighted interleave policy now manages its sysfs entries more efficiently, ensuring that only relevant nodes are considered for interleaving, and dynamically adapting to memory hotplug events. [dan.carpenter@linaro.org: fix error code in sysfs_wi_node_add()] Link: https://lkml.kernel.org/r/aBjL7Bwc0QBzgajK@stanley.mountain Link: https://lkml.kernel.org/r/20250417072839.711-4-rakie.kim@sk.com Co-developed-by: Honggyu Kim Signed-off-by: Honggyu Kim Co-developed-by: Yunjeong Mun Signed-off-by: Yunjeong Mun Signed-off-by: Rakie Kim Signed-off-by: Dan Carpenter Reviewed-by: Oscar Salvador Reviewed-by: Joshua Hahn Reviewed-by: Gregory Price Reviewed-by: Dan Williams Acked-by: David Hildenbrand Cc: "Huang, Ying" Cc: Jonathan Cameron Cc: Dan Carpenter Signed-off-by: Andrew Morton commit cf8cecf2bc221cea99fadc2dc62cef2d4c970dff Author: Rakie Kim Date: Thu Apr 17 16:28:36 2025 +0900 mm/mempolicy: prepare weighted interleave sysfs for memory hotplug Previously, the weighted interleave sysfs structure was statically managed during initialization. This prevented new nodes from being recognized when memory hotplug events occurred, limiting the ability to update or extend sysfs entries dynamically at runtime. To address this, this patch refactors the sysfs infrastructure and encapsulates it within a new structure, `sysfs_wi_group`, which holds both the kobject and an array of node attribute pointers. By allocating this group structure globally, the per-node sysfs attributes can be managed beyond initialization time, enabling external modules to insert or remove node entries in response to events such as memory hotplug or node online/offline transitions. Instead of allocating all per-node sysfs attributes at once, the initialization path now uses the existing sysfs_wi_node_add() and sysfs_wi_node_delete() helpers. This refactoring makes it possible to modularly manage per-node sysfs entries and ensures the infrastructure is ready for runtime extension. Link: https://lkml.kernel.org/r/20250417072839.711-3-rakie.kim@sk.com Signed-off-by: Rakie Kim Reviewed-by: Gregory Price Reviewed-by: Joshua Hahn Reviewed-by: Dan Williams Cc: David Hildenbrand Cc: Honggyu Kim Cc: "Huang, Ying" Cc: Jonathan Cameron Cc: Oscar Salvador Cc: Yunjeong Mun Cc: Dan Carpenter Signed-off-by: Andrew Morton commit bb52e89d8bdbfdf896f6899a830fead3c9344a60 Author: Rakie Kim Date: Thu Apr 17 16:28:35 2025 +0900 mm/mempolicy: fix memory leaks in weighted interleave sysfs Patch series "Enhance sysfs handling for memory hotplug in weighted interleave", v9. The following patch series enhances the weighted interleave policy in the memory management subsystem by improving sysfs handling, fixing memory leaks, and introducing dynamic sysfs updates for memory hotplug support. This patch (of 3): Memory leaks occurred when removing sysfs attributes for weighted interleave. Improper kobject deallocation led to unreleased memory when initialization failed or when nodes were removed. The risk of leak is low because it only appears to trigger if setup fails. Setup only fails due to -ENOMEM which is unlikely to happen from a late_initcall() when memory pressure is low. This patch resolves the issue by replacing unnecessary `kfree()` calls with proper `kobject_del()` and `kobject_put()` sequences, ensuring correct teardown and preventing memory leaks. By explicitly calling `kobject_del()` before `kobject_put()`, the release function is now invoked safely, and internal sysfs state is correctly cleaned up. This guarantees that the memory associated with the kobject is fully released and avoids resource leaks, thereby improving system stability. Additionally, sysfs_remove_file() is no longer called from the release function to avoid accessing invalid sysfs state after kobject_del(). All attribute removals are now done before kobject_del(), preventing WARN_ON() in kernfs and ensuring safe and consistent cleanup of sysfs entries. Link: https://lkml.kernel.org/r/20250417072839.711-1-rakie.kim@sk.com Link: https://lkml.kernel.org/r/20250417072839.711-2-rakie.kim@sk.com Fixes: dce41f5ae253 ("mm/mempolicy: implement the sysfs-based weighted_interleave interface") Signed-off-by: Rakie Kim Reviewed-by: Gregory Price Reviewed-by: Joshua Hahn Reviewed-by: Jonathan Cameron Reviewed-by: Dan Williams Cc: David Hildenbrand Cc: Honggyu Kim Cc: "Huang, Ying" Cc: Oscar Salvador Cc: Yunjeong Mun Cc: Dan Carpenter Signed-off-by: Andrew Morton commit 6e14fd33f148cf36db9bcee7561f2b5b6c3b65aa Author: Chen Ni Date: Thu Apr 17 16:43:30 2025 +0800 mm: memcontrol: remove unnecessary NULL check before free_percpu() free_percpu() checks for NULL pointers internally. Remove unneeded NULL check here. Link: https://lkml.kernel.org/r/20250417084330.937380-1-nichen@iscas.ac.cn Signed-off-by: Chen Ni Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit d0966120486833cd837feea9917b7ed06e74f58c Author: Uladzislau Rezki (Sony) Date: Thu Apr 17 18:12:16 2025 +0200 vmalloc: align nr_vmalloc_pages and vmap_lazy_nr Currently both atomics share one cache-line: ... ffffffff83eab400 b vmap_lazy_nr ffffffff83eab408 b nr_vmalloc_pages ... those are global variables and they are only 8 bytes apart. Since they are modified by different threads this causes a false sharing. This can lead to a performance drop due to unnecessary cache invalidations. After this patch it is aligned to a cache line boundary: ... ffffffff8260a600 d vmap_lazy_nr ffffffff8260a640 d nr_vmalloc_pages ... Link: https://lkml.kernel.org/r/20250417161216.88318-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Reviewed-by: Adrian Huang Tested-by: Adrian Huang Cc: Mateusz Guzik Cc: Christop Hellwig Signed-off-by: Andrew Morton commit 7a6fe5877745e46795865e3f6a0ae346671741a3 Author: Uladzislau Rezki (Sony) Date: Thu Apr 17 18:12:15 2025 +0200 MAINTAINERS: add test_vmalloc.c to VMALLOC section A vmalloc subsystem includes "lib/test_vmalloc.c" test suite. Add an "F:" entry under VMALLOC section to track this file as part of the subsystem. Link: https://lkml.kernel.org/r/20250417161216.88318-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christop Hellwig Cc: Mateusz Guzik Signed-off-by: Andrew Morton commit 2d76e79315e403aab595d4c8830b7a46c19f0f3b Author: Uladzislau Rezki (Sony) Date: Thu Apr 17 18:12:14 2025 +0200 lib/test_vmalloc.c: allow built-in execution Remove the dependency on module loading ("m") for the vmalloc test suite, enabling it to be built directly into the kernel, so both ("=m") and ("=y") are supported. Motivation: - Faster debugging/testing of vmalloc code; - It allows to configure the test via kernel-boot parameters. Configuration example: test_vmalloc.nr_threads=64 test_vmalloc.run_test_mask=7 test_vmalloc.sequential_test_order=1 Link: https://lkml.kernel.org/r/20250417161216.88318-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Reviewed-by: Adrian Huang Tested-by: Adrian Huang Cc: Christop Hellwig Cc: Mateusz Guzik Signed-off-by: Andrew Morton commit 7a73348e5d4715b5565a53f21c01ea7b54e46cbd Author: Uladzislau Rezki (Sony) Date: Thu Apr 17 18:12:13 2025 +0200 lib/test_vmalloc.c: replace RWSEM to SRCU for setup The test has the initialization step during which threads are created. To prevent the workers from starting prematurely a write lock was previously used by the main setup thread, while each worker would block on a read lock. Replace this RWSEM based synchronization with a simpler SRCU based approach. Which does two basic steps: - Main thread wraps the setup phase in an SRCU read-side critical section. Pair of srcu_read_lock()/srcu_read_unlock(). - Each worker calls synchronize_srcu() on entry, ensuring it waits for the initialization phase to be completed. This patch eliminates the need for down_read()/up_read() and down_write()/up_write() pairs thus simplifying the logic and improving clarity. [urezki@gmail.com: fix compile error with CONFIG_TINY_RCU] Link: https://lkml.kernel.org/r/20250420142029.103169-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20250417161216.88318-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Adrian Huang Tested-by: Adrian Huang Cc: Baoquan He Cc: Christop Hellwig Cc: Mateusz Guzik Signed-off-by: Andrew Morton commit b05f8d7e077952d14acb63e3ccdf5f64404b59a4 Author: Sergey Senozhatsky Date: Wed Apr 16 13:27:59 2025 +0900 Documentation: zram: update IDLE pages tracking documentation Move IDLE pages tracking into a separate chapter because there are multiple features that use (or depend on) it either in built-in variant ("mark all") or in extended variant (ac-time tracking). In addition, recompression doesn't require memory tracking to be enabled in order to be able to perform idle recompression. Link: https://lkml.kernel.org/r/20250416042833.3858827-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reported-by: Shin Kawamura Cc: Jonathan Corbet Cc: Minchan Kim Signed-off-by: Andrew Morton commit 4a34c584d8cd13d2b721d21cf629f77c60bfb4a4 Author: Dev Jain Date: Wed Apr 16 11:00:48 2025 +0530 mempolicy: optimize queue_folios_pte_range by PTE batching After the check for queue_folio_required(), the code only cares about the folio in the for loop, i.e the PTEs are redundant. Therefore, optimize this loop by skipping over a PTE batch mapping the same folio. With a test program migrating pages of the calling process, which includes a mapped VMA of size 4GB with pte-mapped large folios of order-9, and migrating once back and forth node-0 and node-1, the average execution time reduces from 7.5 to 4 seconds, giving an approx 47% speedup. Link: https://lkml.kernel.org/r/20250416053048.96479-1-dev.jain@arm.com Signed-off-by: Dev Jain Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Ryan Roberts Cc: Vishal Moola (Oracle) Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 75404e07663b1622948944cf31531fa87cb1785d Author: Lorenzo Stoakes Date: Wed Apr 16 11:38:36 2025 +0100 mm: move mmap/vma locking logic into specific files Currently the VMA and mmap locking logic is entangled in two of the most overwrought files in mm - include/linux/mm.h and mm/memory.c. Separate this logic out so we can more easily make changes and create an appropriate MAINTAINERS entry that spans only the logic relating to locking. This should have no functional change. Care is taken to avoid dependency loops, we must regrettably keep release_fault_lock() and assert_fault_locked() in mm.h as a result due to the dependence on the vm_fault type. Additionally we must declare rcuwait_wake_up() manually to avoid a dependency cycle on linux/rcuwait.h. Additionally move the nommu implementatino of lock_mm_and_find_vma() to mmap_lock.c so everything lock-related is in one place. Link: https://lkml.kernel.org/r/bec6c8e29fa8de9267a811a10b1bdae355d67ed4.1744799282.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Suren Baghdasaryan Reviewed-by: Liam R. Howlett Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: "Paul E . McKenney" Cc: SeongJae Park Cc: Shakeel Butt Signed-off-by: Andrew Morton commit f735eebe55f8f61758fe014bd0b02ab50b059e4d Author: Shakeel Butt Date: Wed Apr 16 11:02:29 2025 -0700 memcg: multi-memcg percpu charge cache Memory cgroup accounting is expensive and to reduce the cost, the kernel maintains per-cpu charge cache for a single memcg. So, if a charge request comes for a different memcg, the kernel will flush the old memcg's charge cache and then charge the newer memcg a fixed amount (64 pages), subtracts the charge request amount and stores the remaining in the per-cpu charge cache for the newer memcg. This mechanism is based on the assumption that the kernel, for locality, keep a process on a CPU for long period of time and most of the charge requests from that process will be served by that CPU's local charge cache. However this assumption breaks down for incoming network traffic in a multi-tenant machine. We are in the process of running multiple workloads on a single machine and if such workloads are network heavy, we are seeing very high network memory accounting cost. We have observed multiple CPUs spending almost 100% of their time in net_rx_action and almost all of that time is spent in memcg accounting of the network traffic. More precisely, net_rx_action is serving packets from multiple workloads and is observing/serving mix of packets of these workloads. The memcg switch of per-cpu cache is very expensive and we are observing a lot of memcg switches on the machine. Almost all the time is being spent on charging new memcg and flushing older memcg cache. So, definitely we need per-cpu cache that support multiple memcgs for this scenario. This patch implements a simple (and dumb) multiple memcg percpu charge cache. Actually we started with more sophisticated LRU based approach but the dumb one was always better than the sophisticated one by 1% to 3%, so going with the simple approach. Some of the design choices are: 1. Fit all caches memcgs in a single cacheline. 2. The cache array can be mix of empty slots or memcg charged slots, so the kernel has to traverse the full array. 3. The cache drain from the reclaim will drain all cached memcgs to keep things simple. To evaluate the impact of this optimization, on a 72 CPUs machine, we ran the following workload where each netperf client runs in a different cgroup. The next-20250415 kernel is used as base. $ netserver -6 $ netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K number of clients | Without patch | With patch 6 | 42584.1 Mbps | 48603.4 Mbps (14.13% improvement) 12 | 30617.1 Mbps | 47919.7 Mbps (56.51% improvement) 18 | 25305.2 Mbps | 45497.3 Mbps (79.79% improvement) 24 | 20104.1 Mbps | 37907.7 Mbps (88.55% improvement) 30 | 14702.4 Mbps | 30746.5 Mbps (109.12% improvement) 36 | 10801.5 Mbps | 26476.3 Mbps (145.11% improvement) The results show drastic improvement for network intensive workloads. [shakeel.butt@linux.dev: add BUILD_BUG_ON() for MEMCG_CHARGE_BATCH] Link: https://lkml.kernel.org/r/rlsgeosg3j7v5nihhbxxxbv3xfy4ejvigihj7lkkbt3n6imyne@2apxx2jm2e57 [shakeel.butt@linux.dev: simplify refill_stock] Link: https://lkml.kernel.org/r/as5cdsm4lraxupg3t6onep2ixql72za25hvd4x334dsoyo4apr@zyzl4vkuevuv [hughd@google.com: it's better to stock nr_pages than the uninitialized stock_pages] Link: https://lkml.kernel.org/r/d542d18f-1caa-6fea-e2c3-3555c87bcf64@google.com [shakeel.butt@linux.dev: add comment per Michal and use DEFINE_PER_CPU_ALIGNED instead of DEFINE_PER_CPU per Vlastimil] Link: https://lkml.kernel.org/r/dieeei3squ2gcnqxdjayvxbvzldr266rhnvtl3vjzsqevxkevf@ckui5vjzl2qg Link: https://lkml.kernel.org/r/20250416180229.2902751-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Signed-off-by: Hugh Dickins Acked-by: Jakub Kicinski Acked-by: Michal Hocko Cc: Eric Dumaze Cc: Johannes Weiner Cc: Muchun Song Cc: Roman Gushchin Cc: Soheil Hassas Yeganeh Cc: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton commit 06340b927051bf71b59a9cd4cff3417247318251 Author: Fan Ni Date: Wed Apr 16 13:12:15 2025 -0700 mm: convert free_page_and_swap_cache() to free_folio_and_swap_cache() free_page_and_swap_cache() takes a struct page pointer as input parameter, but it will immediately convert it to folio and all operations following within use folio instead of page. It makes more sense to pass in folio directly. Convert free_page_and_swap_cache() to free_folio_and_swap_cache() to consume folio directly. Link: https://lkml.kernel.org/r/20250416201720.41678-1-nifan.cxl@gmail.com Signed-off-by: Fan Ni Acked-by: Davidlohr Bueso Acked-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: Adam Manzanares Cc: "Aneesh Kumar K.V" Cc: Heiko Carstens Cc: Luis Chamberalin Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton commit 4f219913c1368a372b07832451cb86ea3a1df31c Author: gaoxu Date: Sat Apr 12 09:27:24 2025 +0000 mm: add nr_free_highatomic in show_free_areas commit c928807f6f6b6("mm/page_alloc: keep track of free highatomic") adds a new variable nr_free_highatomic, which is useful for analyzing low mem issues. add nr_free_highatomic in show_free_areas. Signed-off-by: gao xu Link: https://lkml.kernel.org/r/d92eeff74f7a4578a14ac777cfe3603a@honor.com Acked-by: David Hildenbrand Reviewed-by: Barry Song Acked-by: David Rientjes Reviewed-by: Anshuman Khandual Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Yu Zhao Signed-off-by: Andrew Morton commit df2bbc47e707c7836756159e3530266656a9ea87 Author: Hao Ge Date: Thu Apr 17 17:24:22 2025 +0800 mm/vmscan: modify the assignment logic of the scan and total_scan variables The scan and total_scan variables can be initialized to 0 when they are defined, replacing the separate assignment statements. Link: https://lkml.kernel.org/r/20250417092422.1333620-1-hao.ge@linux.dev Signed-off-by: Hao Ge Acked-by: Dev Jain Signed-off-by: Andrew Morton commit 1477b8cd26883a78362057954a247dab3bc5d2fb Author: Enze Li Date: Fri Apr 11 15:38:00 2025 +0800 samples/damon/prcl: fix a comment typo This patch just fixes a typo in the comment. Link: https://lkml.kernel.org/r/20250411073800.1444481-1-lienze@kylinos.cn Signed-off-by: Enze Li Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit a7797e74bd397e7a9c3095bf212e7059a128155a Author: Baoquan He Date: Thu Apr 10 11:57:17 2025 +0800 mm/gup: clean up codes in fault_in_xxx() functions The code style in fault_in_readable() and fault_in_writable() is a little inconsistent with fault_in_safe_writeable(). In fault_in_readable() and fault_in_writable(), it uses 'uaddr' passed in as loop cursor. While in fault_in_safe_writeable(), local variable 'start' is used as loop cursor. This may mislead people when reading code or making change in these codes. Here define explicit loop cursor and use for loop to simplify codes in these three functions. These cleanup can make them be consistent in code style and improve readability. [bhe@redhat.com: address minor concerns from David] Link: https://lkml.kernel.org/r/Z/sbv3EmLXWgEE7+@MiWiFi-R3L-srv Link: https://lkml.kernel.org/r/20250410035717.473207-5-bhe@redhat.com Signed-off-by: Baoquan He Cc: David Hildenbrand Cc: Oscar Salvador Cc: Yanjun.Zhu Signed-off-by: Andrew Morton commit 339122abb556db2cf497c929a2b6196e37385aee Author: Baoquan He Date: Thu Apr 10 11:57:16 2025 +0800 mm/gup: remove gup_fast_pgd_leaf() and clean up the relevant codes In the current kernel, only pud huge page is supported in some architectures. P4d and pgd huge pages haven't been supported yet. And in mm/gup.c, there's no pgd huge page handling in the follow_page_mask() code path. Hence it doesn't make sense to only have gup_fast_pgd_leaf() in gup_fast code path. Here remove gup_fast_pgd_leaf() and clean up the relevant codes. Link: https://lkml.kernel.org/r/20250410035717.473207-4-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Yanjun.Zhu Signed-off-by: Andrew Morton commit ede27b7ee2e6c0c5148d4bab04e5d287d6fbc771 Author: Baoquan He Date: Thu Apr 10 11:57:15 2025 +0800 mm/gup: remove unneeded checking in follow_page_pte() Patch series "mm/gup: Minor fix, cleanup and improvements", v4. These were made from code inspection in mm/gup.c. This patch (of 3): In __get_user_pages(), it will traverse page table and take a reference to the page the given user address corresponds to if GUP_GET or GUP_PIN is set. However, it's not supported both GUP_GET and GUP_PIN are set. Even though this check need be done, it should be done earlier, but not doing it till entering into follow_page_pte() and failed. Furthermore, this checking has been done in is_valid_gup_args() and all external users of __get_user_pages() will call is_valid_gup_args() to catch the illegal setting. We don't need to worry about internal users of __get_user_pages() because the gup_flags are set by MM code correctly. Here remove the checking in follow_page_pte(), and add VM_WARN_ON_ONCE() to catch the possible exceptional setting just in case. And also change the VM_BUG_ON to VM_WARN_ON_ONCE() for checking (!!pages != !!(gup_flags & (FOLL_GET | FOLL_PIN))) because the checking has been done in is_valid_gup_args() for external users of __get_user_pages(). Link: https://lkml.kernel.org/r/20250410035717.473207-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20250410035717.473207-3-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Yanjun.Zhu Signed-off-by: Andrew Morton commit e7a446030bdaf6b4d933c53fd809cb83a0953ffe Author: Oscar Salvador Date: Fri Apr 11 15:23:59 2025 +0200 mm,hugetlb: allocate frozen pages in alloc_buddy_hugetlb_folio alloc_buddy_hugetlb_folio() allocates a rmappable folio, then strips the rmappable part and freezes it. We can simplify all that by allocating frozen pages directly. Link: https://lkml.kernel.org/r/20250411132359.312708-1-osalvador@suse.de Signed-off-by: Oscar Salvador Suggested-by: Vlastimil Babka Reviewed-by: Vlastimil Babka Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Muchun Song Signed-off-by: Andrew Morton commit 0272d07ef6ebc574e62d6423e5efa5b975f9f910 Author: Uladzislau Rezki (Sony) Date: Tue Apr 15 13:26:46 2025 +0200 vmalloc: use atomic_long_add_return_relaxed() Switch from the atomic_long_add_return() to its relaxed version. We do not need a full memory barrier or any memory ordering during increasing the "vmap_lazy_nr" variable. What we only need is to do it atomically. This is what atomic_long_add_return_relaxed() guarantees. AARCH64: Default: 40ec: d34cfe94 lsr x20, x20, #12 40f0: 14000044 b 4200 40f4: 94000000 bl 0 <__sanitizer_cov_trace_pc> 40f8: 90000000 adrp x0, 0 <__traceiter_alloc_vmap_area> 40fc: 91000000 add x0, x0, #0x0 4100: f8f40016 ldaddal x20, x22, [x0] 4104: 8b160296 add x22, x20, x22 Relaxed: 40ec: d34cfe94 lsr x20, x20, #12 40f0: 14000044 b 4200 40f4: 94000000 bl 0 <__sanitizer_cov_trace_pc> 40f8: 90000000 adrp x0, 0 <__traceiter_alloc_vmap_area> 40fc: 91000000 add x0, x0, #0x0 4100: f8340016 ldadd x20, x22, [x0] 4104: 8b160296 add x22, x20, x22 Link: https://lkml.kernel.org/r/20250415112646.113091-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christop Hellwig Cc: Mateusz Guzik Signed-off-by: Andrew Morton commit 00ccf40ae298262feb13b3ad56b4428647f3aafa Author: Oscar Salvador Date: Tue Apr 15 14:15:03 2025 +0200 mm, hugetlb: avoid passing a null nodemask when there is mbind policy Before trying to allocate a page, gather_surplus_pages() sets up a nodemask for the nodes we can allocate from, but instead of passing the nodemask down the road to the page allocator, it iterates over the nodes within that nodemask right there, meaning that the page allocator will receive a preferred_nid and a null nodemask. This is a problem when using a memory policy, because it might be that the page allocator ends up using a node as a fallback which is not represented in the policy. Avoid that by passing the nodemask directly to the page allocator, so it can filter out fallback nodes that are not part of the nodemask. Link: https://lkml.kernel.org/r/20250415121503.376811-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Muchun Song Signed-off-by: Andrew Morton commit f736953e2b1f1d7096e70580180f98744c9c9c86 Author: Enze Li Date: Fri Apr 11 10:43:32 2025 +0800 selftests/damon: remove the remaining test scripts for DAMON debugfs interface DAMON has dropped debugfs support; therefore, remove these unused scripts. Link: https://lkml.kernel.org/r/20250411024332.1373861-1-enze.li@linux.dev Fixes: 5ec4333b1967 ("mm/damon: remove DAMON debugfs interface") Signed-off-by: Enze Li Reviewed-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 60cada258dfe3694e15c4539259173c37bd5f1fe Author: Shakeel Butt Date: Wed Apr 9 19:57:52 2025 -0700 memcg: optimize memcg_rstat_updated Currently the kernel maintains the stats updates per-memcg which is needed to implement stats flushing threshold. On the update side, the update is added to the per-cpu per-memcg update of the given memcg and all of its ancestors. However when the given memcg has passed the flushing threshold, all of its ancestors should have passed the threshold as well. There is no need to traverse up the memcg tree to maintain the stats updates. Perf profile collected from our fleet shows that memcg_rstat_updated is one of the most expensive memcg function i.e. a lot of cumulative CPU is being spent on it. So, even small micro optimizations matter a lot. This patch is microbenchmarked with multiple instances of netperf on a single machine with locally running netserver and we see couple of percentage of improvement. Link: https://lkml.kernel.org/r/20250410025752.92159-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Reviewed-by: Yosry Ahmed Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 585a9145886ad1d06b39ddcd72d457f37ebb4ff4 Author: Donet Tom Date: Thu Apr 10 05:07:48 2025 -0500 selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh During cleanup, the value of /proc/sys/vm/nr_hugepages is currently being set to 0. At the end of the test, if all tests pass, the original nr_hugepages value is restored. However, if any test fails, it remains set to 0. With this patch, we ensure that the original nr_hugepages value is restored during cleanup, regardless of whether the test passes or fails. Link: https://lkml.kernel.org/r/20250410100748.2310-1-donettom@linux.ibm.com Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests") Signed-off-by: Donet Tom Cc: Li Wang Cc: "Ritesh Harjani (IBM)" Cc: Shuah Khan Cc: Waiman Long Signed-off-by: Andrew Morton commit 2a6ed1b411c5a037033a4dccc65cf4a90e4ae40a Author: Sidhartha Kumar Date: Thu Apr 10 19:14:46 2025 +0000 maple_tree: reorder mas->store_type case statements Move the unlikely case that mas->store_type is invalid to be the last evaluated case and put liklier cases higher up. Link: https://lkml.kernel.org/r/20250410191446.2474640-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Suggested-by: Liam R. Howlett Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Wei Yang Signed-off-by: Andrew Morton commit 271152a973cb01c135d29e91d1a05f51fbd88a9c Author: Sidhartha Kumar Date: Thu Apr 10 19:14:45 2025 +0000 maple_tree: add sufficient height In order to support rebalancing and spanning stores using less than the worst case number of nodes, we need to track more than just the vacant height. Using only vacant height to reduce the worst case maple node allocation count can lead to a shortcoming of nodes in the following scenarios. For rebalancing writes, when a leaf node becomes insufficient, it may be combined with a sibling into a single node. This means that the parent node which has entries for this children will lose one entry. If this parent node was just meeting the minimum entries, losing one entry will now cause this parent node to be insufficient. This leads to a cascading operation of rebalancing at different levels and can lead to more node allocations than simply using vacant height can return. For spanning writes, a similar situation occurs. At the location at which a spanning write is detected, the number of ancestor nodes may similarly need to rebalanced into a smaller number of nodes and the same cascading situation could occur. To use less than the full height of the tree for the number of allocations, we also need to track the height at which a non-leaf node cannot become insufficient. This means even if a rebalance occurs to a child of this node, it currently has enough entries that it can lose one without any further action. This field is stored in the maple write state as sufficient height. In mas_prealloc_calc() when figuring out how many nodes to allocate, we check if the vacant node is lower in the tree than a sufficient node (has a larger value). If it is, we cannot use the vacant height and must use the difference in the height and sufficient height as the basis for the number of nodes needed. An off by one bug was also discovered in mast_overflow() where it is using >= rather than >. This caused extra iterations of the mas_spanning_rebalance() loop and lead to unneeded allocations. A test is also added to check the number of allocations is correct. Link: https://lkml.kernel.org/r/20250410191446.2474640-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Wei Yang Signed-off-by: Andrew Morton commit 300a5b4ffedf826998ed1f1b5d107e9fb0ef7579 Author: Sidhartha Kumar Date: Thu Apr 10 19:14:44 2025 +0000 maple_tree: break on convergence in mas_spanning_rebalance() This allows support for using the vacant height to calculate the worst case number of nodes needed for wr_rebalance operation. mas_spanning_rebalance() was seen to perform unnecessary node allocations. We can reduce allocations by breaking early during the rebalancing loop once we realize that we have ascended to a common ancestor. Link: https://lkml.kernel.org/r/20250410191446.2474640-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Suggested-by: Liam Howlett Reviewed-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit ad88fc17d2dafe45e40de2af80207f4b2e3b1f71 Author: Sidhartha Kumar Date: Thu Apr 10 19:14:43 2025 +0000 maple_tree: use vacant nodes to reduce worst case allocations In order to determine the store type for a maple tree operation, a walk of the tree is done through mas_wr_walk(). This function descends the tree until a spanning write is detected or we reach a leaf node. While descending, keep track of the height at which we encounter a node with available space. This is done by checking if mas->end is less than the number of slots a given node type can fit. Now that the height of the vacant node is tracked, we can use the difference between the height of the tree and the height of the vacant node to know how many levels we will have to propagate creating new nodes. Update mas_prealloc_calc() to consider the vacant height and reduce the number of worst-case allocations. Rebalancing and spanning stores are not supported and fall back to using the full height of the tree for allocations. Update preallocation testing assertions to take into account vacant height. Link: https://lkml.kernel.org/r/20250410191446.2474640-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Wei Yang Signed-off-by: Andrew Morton commit f9d3a963fef4d3377b7ee122408cf2cdf37b3181 Author: Sidhartha Kumar Date: Thu Apr 10 19:14:42 2025 +0000 maple_tree: use height and depth consistently For the maple tree, the root node is defined to have a depth of 0 with a height of 1. Each level down from the node, these values are incremented by 1. Various code paths define a root with depth 1 which is inconsisent with the definition. Modify the code to be consistent with this definition. In mas_spanning_rebalance(), l_mas.depth was being used to track the height based on the number of iterations done in the main loop. This information was then used in mas_put_in_tree() to set the height. Rather than overload the l_mas.depth field to track height, simply keep track of height in the local variable new_height and directly pass this to mas_wmb_replace() which will be passed into mas_put_in_tree(). This allows up to remove writes to l_mas.depth. Link: https://lkml.kernel.org/r/20250410191446.2474640-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Wei Yang Signed-off-by: Andrew Morton commit 28092a652f9c17773aa6ca0f62f73738d756b914 Author: Sidhartha Kumar Date: Thu Apr 10 19:14:41 2025 +0000 maple_tree: convert mas_prealloc_calc() to take in a maple write state Patch series "Track node vacancy to reduce worst case allocation counts", v5. ================ overview ======================== Currently, the maple tree preallocates the worst case number of nodes for given store type by taking into account the whole height of the tree. This comes from a worst case scenario of every node in the tree being full and having to propagate node allocation upwards until we reach the root of the tree. This can be optimized if there are vacancies in nodes that are at a lower depth than the root node. This series implements tracking the level at which there is a vacant node so we only need to allocate until this level is reached, rather than always using the full height of the tree. The ma_wr_state struct is modified to add a field which keeps track of the vacant height and is updated during walks of the tree. This value is then read in mas_prealloc_calc() when we decide how many nodes to allocate. For rebalancing and spanning stores, we also need to track the lowest height at which a node has 1 more entry than the minimum sufficient number of entries. This is because rebalancing can cause a parent node to become insufficient which results in further node allocations. In this case, we need to use the sufficient height as the worst case rather than the vacant height. patch 1-2: preparatory patches patch 3: implement vacant height tracking + update the tests patch 4: support vacant height tracking for rebalancing writes patch 5: implement sufficient height tracking patch 6: reorder switch case statements ================ results ========================= Bpftrace was used to profile the allocation path for requesting new maple nodes while running stress-ng mmap 120s. The histograms below represent requests to kmem_cache_alloc_bulk() and show the count argument. This represnts how many maple nodes the caller is requesting in kmem_cache_alloc_bulk() command: stress-ng --mmap 4 --timeout 120 mm-unstable @bulk_alloc_req: [3, 4) 4 | | [4, 5) 54170 |@ | [5, 6) 0 | | [6, 7) 893057 |@@@@@@@@@@@@@@@@@@@@ | [7, 8) 4 | | [8, 9) 2230287 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [9, 10) 55811 |@ | [10, 11) 77834 |@ | [11, 12) 0 | | [12, 13) 1368684 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [13, 14) 0 | | [14, 15) 0 | | [15, 16) 367197 |@@@@@@@@ | @maple_node_total: 46,630,160 @total_vmas: 46184591 mm-unstable + this series @bulk_alloc_req: [2, 3) 198 | | [3, 4) 4 | | [4, 5) 43 | | [5, 6) 0 | | [6, 7) 1069503 |@@@@@@@@@@@@@@@@@@@@@ | [7, 8) 4 | | [8, 9) 2597268 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [9, 10) 472191 |@@@@@@@@@ | [10, 11) 191904 |@@@ | [11, 12) 0 | | [12, 13) 247316 |@@@@ | [13, 14) 0 | | [14, 15) 0 | | [15, 16) 98769 |@ | @maple_node_total: 37,813,856 @total_vmas: 43493287 This represents a ~19% reduction in the number of bulk maple nodes allocated. For more reproducible results, a historgram of the return value of mas_prealloc_calc() is displayed while running the maple_tree_tests whcih have a deterministic store pattern mas_prealloc_calc() return value mm-unstable 1 : (12068) 3 : (11836) 5 : ***** (271192) 7 : ************************************************** (2329329) 9 : *********** (534186) 10 : (435) 11 : *************** (704306) 13 : ******** (409781) mas_prealloc_calc() return value mm-unstable + this series 1 : (12070) 3 : ************************************************** (3548777) 5 : ******** (633458) 7 : (65081) 9 : (11224) 10 : (341) 11 : (2973) 13 : (68) do_mmap latency was also measured for regressions: command: stress-ng --mmap 4 --timeout 120 mm-unstable: avg = 7162 nsecs, total: 16101821292 nsecs, count: 2248034 mm-unstable + this series: avg = 6689 nsecs, total: 15135391764 nsecs, count: 2262726 stress-ng --mmap4 --timeout 120 with vacant_height: stress-ng: info: [257] 21526312 Maple Tree Read 0.176 M/sec stress-ng: info: [257] 339979348 Maple Tree Write 2.774 M/sec without vacant_height: stress-ng: info: [8228] 20968900 Maple Tree Read 0.171 M/sec stress-ng: info: [8228] 312214648 Maple Tree Write 2.547 M/sec This represents an increase of ~3% read throughput and ~9% increase in write throughput. This patch (of 6): In a subsequent patch, mas_prealloc_calc() will need to access fields only in the ma_wr_state. Convert the function to take in a ma_wr_state and modify all callers. There is no functional change. Link: https://lkml.kernel.org/r/20250410191446.2474640-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20250410191446.2474640-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Wei Yang Signed-off-by: Andrew Morton commit 43c4cfde7e37460482e41dbb6837d4bff290d2cc Author: SeongJae Park Date: Wed Apr 9 17:00:22 2025 -0700 mm/madvise: batch tlb flushes for MADV_DONTNEED[_LOCKED] MADV_DONTNEED[_LOCKED] handling for [process_]madvise() flushes tlb for each vma of each address range. Update the logic to do tlb flushes in a batched way. Initialize an mmu_gather object from do_madvise() and vector_madvise(), which are the entry level functions for [process_]madvise(), respectively. And pass those objects to the function for per-vma work, via madvise_behavior struct. Make the per-vma logic not flushes tlb on their own but just saves the tlb entries to the received mmu_gather object. For this internal logic change, make zap_page_range_single_batched() non-static and use it directly from madvise_dontneed_single_vma(). Finally, the entry level functions flush the tlb entries that gathered for the entire user request, at once. Link: https://lkml.kernel.org/r/20250410000022.1901-5-sj@kernel.org Signed-off-by: SeongJae Park Reviewed-by: Lorenzo Stoakes Signed-off-by: Andrew Morton commit de8efdf8cd273619121cbc2f0f70dddc74bc586e Author: SeongJae Park Date: Wed Apr 9 17:00:21 2025 -0700 mm/memory: split non-tlb flushing part from zap_page_range_single() Some of zap_page_range_single() callers such as [process_]madvise() with MADV_DONTNEED[_LOCKED] cannot batch tlb flushes because zap_page_range_single() flushes tlb for each invocation. Split out the body of zap_page_range_single() except mmu_gather object initialization and gathered tlb entries flushing for such batched tlb flushing usage. To avoid hugetlb pages allocation failures from concurrent page faults, the tlb flush should be done before hugetlb faults unlocking, though. Do the flush and the unlock inside the split out function in the order for hugetlb vma case. Refer to commit 2820b0f09be9 ("hugetlbfs: close race between MADV_DONTNEED and page fault") for more details about the concurrent faults' page allocation failure problem. Link: https://lkml.kernel.org/r/20250410000022.1901-4-sj@kernel.org Signed-off-by: SeongJae Park Reviewed-by: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 01bef02bf9301ea6c255b0daa38356e07719dd69 Author: SeongJae Park Date: Wed Apr 9 17:00:20 2025 -0700 mm/madvise: batch tlb flushes for MADV_FREE MADV_FREE handling for [process_]madvise() flushes tlb for each vma of each address range. Update the logic to do tlb flushes in a batched way. Initialize an mmu_gather object from do_madvise() and vector_madvise(), which are the entry level functions for [process_]madvise(), respectively. And pass those objects to the function for per-vma work, via madvise_behavior struct. Make the per-vma logic not flushes tlb on their own but just saves the tlb entries to the received mmu_gather object. Finally, the entry level functions flush the tlb entries that gathered for the entire user request, at once. Link: https://lkml.kernel.org/r/20250410000022.1901-3-sj@kernel.org Signed-off-by: SeongJae Park Reviewed-by: Lorenzo Stoakes Signed-off-by: Andrew Morton commit 066c770437835d2bd2072bd2c88a71fcbbd5ccb3 Author: SeongJae Park Date: Wed Apr 9 17:00:19 2025 -0700 mm/madvise: define and use madvise_behavior struct for madvise_do_behavior() Patch series "mm/madvise: batch tlb flushes for MADV_DONTNEED and MADV_FREE", v3. When process_madvise() is called to do MADV_DONTNEED[_LOCKED] or MADV_FREE with multiple address ranges, tlb flushes happen for each of the given address ranges. Because such tlb flushes are for the same process, doing those in a batch is more efficient while still being safe. Modify process_madvise() entry level code path to do such batched tlb flushes, while the internal unmap logic do only gathering of the tlb entries to flush. In more detail, modify the entry functions to initialize an mmu_gather object and pass it to the internal logic. And make the internal logic do only gathering of the tlb entries to flush into the received mmu_gather object. After all internal function calls are done, the entry functions flush the gathered tlb entries at once. Because process_madvise() and madvise() share the internal unmap logic, make same change to madvise() entry code together, to make code consistent and cleaner. It is only for keeping the code clean, and shouldn't degrade madvise(). It could rather provide a potential tlb flushes reduction benefit for a case that there are multiple vmas for the given address range. It is only a side effect from an effort to keep code clean, so we don't measure it separately. Similar optimizations might be applicable to other madvise behavior such as MADV_COLD and MADV_PAGEOUT. Those are simply out of the scope of this patch series, though. Patches Sequence ================ The first patch defines a new data structure for managing information that is required for batched tlb flushes (mmu_gather and behavior), and update code paths for MADV_DONTNEED[_LOCKED] and MADV_FREE handling internal logic to receive it. The second patch batches tlb flushes for MADV_FREE handling for both madvise() and process_madvise(). Remaining two patches are for MADV_DONTNEED[_LOCKED] tlb flushes batching. The third patch splits zap_page_range_single() for batching of MADV_DONTNEED[_LOCKED] handling. The fourth patch batches tlb flushes for the hint using the sub-logic that the third patch split out, and the helpers for batched tlb flushes that introduced for the MADV_FREE case, by the second patch. Test Results ============ I measured the latency to apply MADV_DONTNEED advice to 256 MiB memory using multiple process_madvise() calls. I apply the advice in 4 KiB sized regions granularity, but with varying batch size per process_madvise() call (vlen) from 1 to 1024. The source code for the measurement is available at GitHub[1]. To reduce measurement errors, I did the measurement five times. The measurement results are as below. 'sz_batch' column shows the batch size of process_madvise() calls. 'Before' and 'After' columns show the average of latencies in nanoseconds that measured five times on kernels that built without and with the tlb flushes batching of this series (patches 3 and 4), respectively. For the baseline, mm-new tree of 2025-04-09[2] has been used, after reverting the second version of this patch series and adding a temporal fix for !CONFIG_DEBUG_VM build failure[3]. 'B-stdev' and 'A-stdev' columns show ratios of latency measurements standard deviation to average in percent for 'Before' and 'After', respectively. 'Latency_reduction' shows the reduction of the latency that the 'After' has achieved compared to 'Before', in percent. Higher 'Latency_reduction' values mean more efficiency improvements. sz_batch Before B-stdev After A-stdev Latency_reduction 1 146386348 2.78 111327360.6 3.13 23.95 2 108222130 1.54 72131173.6 2.39 33.35 4 93617846.8 2.76 51859294.4 2.50 44.61 8 80555150.4 2.38 44328790 1.58 44.97 16 77272777 1.62 37489433.2 1.16 51.48 32 76478465.2 2.75 33570506 3.48 56.10 64 75810266.6 1.15 27037652.6 1.61 64.34 128 73222748 3.86 25517629.4 3.30 65.15 256 72534970.8 2.31 25002180.4 0.94 65.53 512 71809392 5.12 24152285.4 2.41 66.37 1024 73281170.2 4.53 24183615 2.09 67.00 Unexpectedly the latency has reduced (improved) even with batch size one. I think some of compiler optimizations have affected that, like also observed with the first version of this patch series. So, please focus on the proportion between the improvement and the batch size. As expected, tlb flushes batching provides latency reduction that proportional to the batch size. The efficiency gain ranges from about 33 percent with batch size 2, and up to 67 percent with batch size 1,024. Please note that this is a very simple microbenchmark, so real efficiency gain on real workload could be very different. This patch (of 4): To implement batched tlb flushes for MADV_DONTNEED[_LOCKED] and MADV_FREE, an mmu_gather object in addition to the behavior integer need to be passed to the internal logics. Using a struct can make it easy without increasing the number of parameters of all code paths towards the internal logic. Define a struct for the purpose and use it on the code path that starts from madvise_do_behavior() and ends on madvise_dontneed_free(). Note that this changes madvise_walk_vmas() visitor type signature, too. Specifically, it changes its 'arg' type from 'unsigned long' to the new struct pointer. Link: https://lkml.kernel.org/r/20250410000022.1901-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250410000022.1901-2-sj@kernel.org Signed-off-by: SeongJae Park Reviewed-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Liam R. Howlett Cc: Rik van Riel Cc: SeongJae Park Cc: Shakeel Butt Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 10d483f198cf35504fcffc677ac116190839a34f Author: Baolin Wang Date: Wed Apr 9 17:38:58 2025 +0800 mm: huge_memory: add folio_mark_accessed() when zapping file THP When investigating performance issues during file folio unmap, I noticed some behavioral differences in handling non-PMD-sized folios and PMD-sized folios. For non-PMD-sized file folios, it will call folio_mark_accessed() to mark the folio as having seen activity, but this is not done for PMD-sized folios. This might not cause obvious issues, but a potential problem could be that, it might lead to reclaim of hot file folios under memory pressure, as quoted from Johannes: : Sometimes file contents are only accessed through relatively short-lived : mappings. But they can nevertheless be accessed a lot and be hot. It's : important to not lose that information on unmap, and end up kicking out a : frequently used cache page. Therefore, we should also add folio_mark_accessed() for PMD-sized file folios when unmapping. [baolin.wang@linux.alibaba.com: add comment] Link: https://lkml.kernel.org/r/23fdc11d-e983-4627-89a8-79e9ecf9a45a@linux.alibaba.com Link: https://lkml.kernel.org/r/fc117f60d7b686f87067f36a0ef7cdbc3a78109c.1744190345.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: Johannes Weiner Acked-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Barry Song <21cnbao@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Ryan Roberts Signed-off-by: Andrew Morton commit 10d288964d48e52354f002f7e0f64d1df9496ab1 Author: Lorenzo Stoakes Date: Tue Apr 8 10:29:33 2025 +0100 tools/testing/selftests: assert that anon merge cases behave as expected Prior to the recently applied commit that permits this merge, mprotect()'ing a faulted VMA, adjacent to an unfaulted VMA, such that the two share characteristics would fail to merge due to what appear to be unintended consequences of commit 965f55dea0e3 ("mmap: avoid merging cloned VMAs"). Now we have fixed this bug, assert that we can indeed merge anonymous VMAs this way. Also assert that forked source/target VMAs are equally rejected. Previously, all empty target anon merges with one VMA faulted and the other unfaulted would be rejected incorrectly, now we ensure that unforked merge, but forked do not. Additionally, add the new test file to the MEMORY MAPPING section in MAINTAINERS, as these tests are explicitly memory mapping related. Link: https://lkml.kernel.org/r/2b69330274a3b71721f7042c5eabe91143934415.1744104124.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Yeoreum Yun Cc: David Hildenbrand Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton commit bd23f293a0d56fd18d51e5364ecf8c277c6e9531 Author: Lorenzo Stoakes Date: Tue Apr 8 10:29:32 2025 +0100 tools/testing: add PROCMAP_QUERY helper functions in mm self tests The PROCMAP_QUERY ioctl() is very useful - it allows for binary access to /proc/$pid/[s]maps data and thus convenient lookup of data contained there. This patch exposes this for convenient use by mm self tests so the state of VMAs can easily be queried. Link: https://lkml.kernel.org/r/ce83d877093d1fc594762cf4b82f0c27963030ee.1744104124.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Yeoreum Yun Reviewed-by: Wei Yang Cc: David Hildenbrand Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c Author: Lorenzo Stoakes Date: Tue Apr 8 10:29:31 2025 +0100 mm/vma: fix incorrectly disallowed anonymous VMA merges Patch series "fix incorrectly disallowed anonymous VMA merges", v2. It appears that we have been incorrectly rejecting merge cases for 15 years, apparently by mistake. Imagine a range of anonymous mapped momemory divided into two VMAs like this, with incompatible protection bits: RW RWX unfaulted faulted |-----------|-----------| | prev | vma | |-----------|-----------| mprotect(RW) Now imagine mprotect()'ing vma so it is RW. This appears as if it should merge, it does not. Neither does this case, again mprotect()'ing vma RW: RWX RW faulted unfaulted |-----------|-----------| | vma | next | |-----------|-----------| mprotect(RW) Nor: RW RWX RW unfaulted faulted unfaulted |-----------|-----------|-----------| | prev | vma | next | |-----------|-----------|-----------| mprotect(RW) What's going on here? In commit 5beb49305251 ("mm: change anon_vma linking to fix multi-process server scalability issue"), from 2010, Rik von Riel took careful care to account for these cases - commenting that '[this is] easily overlooked: when mprotect shifts the boundary, make sure the expanding vma has anon_vma set if the shrinking vma had, to cover any anon pages imported.' However, commit 965f55dea0e3 ("mmap: avoid merging cloned VMAs") introduced a little over a year later, appears to have accidentally disallowed this. By adjusting the is_mergeable_anon_vma() function to avoid lock contention across large trees of forked anon_vma's, this commit wrongly assumed the VMA being checked (the ostensible merge 'target') should be faulted, that is, have an anon_vma, and thus an anon_vma_chain list established, but only of length 1. This appears to have been unintentional, as disallowing empty target VMAs like this across the board makes no sense. We already have logic that accounts for this case, the same logic Rik introduced in 2010, now via dup_anon_vma() (and ultimately anon_vma_clone()), so there is no problem permitting this. This series fixes this mistake and also ensures that scalability concerns remain addressed by explicitly checking that whatever VMA is being merged has not been forked. A full set of self tests which reproduce the issue are provided, as well as updating userland VMA tests to assert this behaviour. The self tests additionally assert scalability concerns are addressed. This patch (of 3): anon_vma_chain's were introduced by Rik von Riel in commit 5beb49305251 ("mm: change anon_vma linking to fix multi-process server scalability issue"). This patch was introduced in March 2010. As part of this change, careful attention was made to the instance of mprotect() causing a VMA merge, with one faulted (i.e. having anon_vma set) and another not: /* * Easily overlooked: when mprotect shifts the boundary, * make sure the expanding vma has anon_vma set if the * shrinking vma had, to cover any anon pages imported. */ In the modern VMA code, this is handled in dup_anon_vma() (and ultimately anon_vma_clone()). This case is one of the three configurations of adjacent VMA anon_vma state that we might encounter on merge (where dst is the VMA which will be merged into and src the one being merged into dst): 1. dst->anon_vma, src->anon_vma - These must be equal, no-op. 2. dst->anon_vma, !src->anon_vma - We simply use dst->anon_vma, no-op. 3. !dst->anon_vma, src->anon_vma - The case in question here. In case 3, the instance addressed here - we duplicate the AVC connections from src and place into dst. However, in practice, we very often do NOT do this. This appears to be due to an inadvertent consequence of the change introduced by commit 965f55dea0e3 ("mmap: avoid merging cloned VMAs"), introduced in May 2011. This implies that this merge case was functional only for a little over a year, and has since been broken for ~15 years. Here, lock scalability concerns lead to us restricting anonymous merges only to those VMAs with 1 entry in their vma->anon_vma_chain, that is, a VMA that is not connected to any parent process's anon_vma. The mergeability test looks like this: static inline bool is_mergeable_anon_vma(struct anon_vma *anon_vma1, struct anon_vma *anon_vma2, struct vm_area_struct *vma) { if ((!anon_vma1 || !anon_vma2) && (!vma || !vma->anon_vma || list_is_singular(&vma->anon_vma_chain))) return true; return anon_vma1 == anon_vma2; } However, we have a problem here - typically the vma passed here is the destination VMA. For instance in vma_merge_existing_range() we invoke: can_vma_merge_left() -> [ check that there is an immediately adjacent prior VMA ] -> can_vma_merge_after() -> is_mergeable_vma() for general attribute check -> is_mergeable_anon_vma([ proposed anon_vma ], prev->anon_vma, prev) So if we were considering a target unfaulted 'prev': unfaulted faulted |-----------|-----------| | prev | vma | |-----------|-----------| This would call is_mergeable_anon_vma(NULL, vma->anon_vma, prev). The list_is_singular() check for vma->anon_vma_chain, an empty list on fault, would cause this merge to _fail_ even though all else indicates a merge. Equally a simple merge into a next VMA would hit the same problem: faulted unfaulted |-----------|-----------| | vma | next | |-----------|-----------| can_vma_merge_right() -> [ check that there is an immediately adjacent succeeding VMA ] -> can_vma_merge_before() -> is_mergeable_vma() for general attribute check -> is_mergeable_anon_vma([ proposed anon_vma ], next->anon_vma, next) For a 3-way merge, we'd also hit the same problem if it was configured like this for instance: unfaulted faulted unfaulted |-----------|-----------|-----------| | prev | vma | next | |-----------|-----------|-----------| As we'd call can_vma_merge_left() for prev, and can_vma_merge_right() for next, both of which would fail. vma_merge_new_range() (and relatedly, vma_expand()) are not impacted, as the new VMA would never already be faulted (it is a proposed new range). Because we already handle each of the aforementioned merge cases, and can absolutely therefore deal with an existing VMA merge with !dst->anon_vma, src->anon_vma, there is absolutely no reason to disallow this kind of merge. It seems that the intention of this patch is to ensure that, in the instance of merging unfaulted VMAs with faulted ones, we never wish to do so with those with multiple AVCs due to the fact that anon_vma lock's are held across both parent and child anon_vma's (actually, the 'root' parent anon_vma's lock is used). In fact, the original commit alludes to this - "find_mergeable_anon_vma() already considers this case". In find_mergeable_anon_vma() however, we check the anon_vma which will be merged from, if it is set, then we check list_is_singular(vma->anon_vma_chain). So to match this logic, update is_mergeable_anon_vma() to perform this scalability check on the VMA whose anon_vma we ultimately merge into. This matches existing behaviour with forked VMAs, only we no longer wrongly disallow ALL empty target merges. So we both allow merge cases and ensure the scalability check is correctly applied. We may wish to revisit these lock scalability concerns at a later date and ensure they are still valid. Additionally, correct userland VMA tests which were mistakenly not asserting these cases correctly previously to now correctly assert this, and to ensure vmg->anon_vma state is always consistent to account for newly introduced asserts. Link: https://lkml.kernel.org/r/cover.1744104124.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/18c756fc9eaf7ad082a710c91133b8346f8cd9a8.1744104124.git.lorenzo.stoakes@oracle.com Fixes: 965f55dea0e3 ("mmap: avoid merging cloned VMAs") Signed-off-by: Lorenzo Stoakes Reviewed-by: Yeoreum Yun Cc: David Hildenbrand Cc: Jann Horn Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton commit af8251dd457dd5bff101b10f7e83c2cf74001736 Author: Alice Ryhl Date: Tue Apr 8 09:22:46 2025 +0000 mm: rust: add MEMORY MANAGEMENT [RUST] We have introduced Rust bindings for core mm abstractions as part of this series, so add an entry in MAINTAINERS to be explicit about who maintains this. Patches are anticipated to be taken through the mm tree as usual with other mm code. Link: https://rust-for-linux.com/rust-kernel-policy#how-is-rust-introduced-in-a-subsystem Link: https://lore.kernel.org/all/33e64b12-aa07-4e78-933a-b07c37ff1d84@lucifer.local/ Link: https://lkml.kernel.org/r/20250408-vma-v16-9-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Cc: Alex Gaynor Cc: Andreas Hindborg Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Gary Guo Cc: Greg Kroah-Hartman Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 6acb75ad7b9e1548ae7f7532312295f74e48c973 Author: Alice Ryhl Date: Tue Apr 8 09:22:45 2025 +0000 task: rust: rework how current is accessed Introduce a new type called `CurrentTask` that lets you perform various operations that are only safe on the `current` task. Use the new type to provide a way to access the current mm without incrementing its refcount. With this change, you can write stuff such as let vma = current!().mm().lock_vma_under_rcu(addr); without incrementing any refcounts. This replaces the existing abstractions for accessing the current pid namespace. With the old approach, every field access to current involves both a macro and a unsafe helper function. The new approach simplifies that to a single safe function on the `CurrentTask` type. This makes it less heavy-weight to add additional current accessors in the future. That said, creating a `CurrentTask` type like the one in this patch requires that we are careful to ensure that it cannot escape the current task or otherwise access things after they are freed. To do this, I declared that it cannot escape the current "task context" where I defined a "task context" as essentially the region in which `current` remains unchanged. So e.g., release_task() or begin_new_exec() would leave the task context. If a userspace thread returns to userspace and later makes another syscall, then I consider the two syscalls to be different task contexts. This allows values stored in that task to be modified between syscalls, even if they're guaranteed to be immutable during a syscall. Ensuring correctness of `CurrentTask` is slightly tricky if we also want the ability to have a safe `kthread_use_mm()` implementation in Rust. To support that safely, there are two patterns we need to ensure are safe: // Case 1: current!() called inside the scope. let mm; kthread_use_mm(some_mm, || { mm = current!().mm(); }); drop(some_mm); mm.do_something(); // UAF and: // Case 2: current!() called before the scope. let mm; let task = current!(); kthread_use_mm(some_mm, || { mm = task.mm(); }); drop(some_mm); mm.do_something(); // UAF The existing `current!()` abstraction already natively prevents the first case: The `&CurrentTask` would be tied to the inner scope, so the borrow-checker ensures that no reference derived from it can escape the scope. Fixing the second case is a bit more tricky. The solution is to essentially pretend that the contents of the scope execute on an different thread, which means that only thread-safe types can cross the boundary. Since `CurrentTask` is marked `NotThreadSafe`, attempts to move it to another thread will fail, and this includes our fake pretend thread boundary. This has the disadvantage that other types that aren't thread-safe for reasons unrelated to `current` also cannot be moved across the `kthread_use_mm()` boundary. I consider this an acceptable tradeoff. Link: https://lkml.kernel.org/r/20250408-vma-v16-8-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Boqun Feng Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Greg Kroah-Hartman Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f8c78198816f04619da6eebfc5b67741bff56325 Author: Alice Ryhl Date: Tue Apr 8 09:22:44 2025 +0000 rust: miscdevice: add mmap support Add the ability to write a file_operations->mmap hook in Rust when using the miscdevice abstraction. The `vma` argument to the `mmap` hook uses the `VmaNew` type from the previous commit; this type provides the correct set of operations for a file_operations->mmap hook. Link: https://lkml.kernel.org/r/20250408-vma-v16-7-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Greg Kroah-Hartman Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit dcb81aeab406e417bc0b4cf68de6eb07a1d2e6ce Author: Alice Ryhl Date: Tue Apr 8 09:22:43 2025 +0000 mm: rust: add VmaNew for f_ops->mmap() This type will be used when setting up a new vma in an f_ops->mmap() hook. Using a separate type from VmaRef allows us to have a separate set of operations that you are only able to use during the mmap() hook. For example, the VM_MIXEDMAP flag must not be changed after the initial setup that happens during the f_ops->mmap() hook. To avoid setting invalid flag values, the methods for clearing VM_MAYWRITE and similar involve a check of VM_WRITE, and return an error if VM_WRITE is set. Trying to use `try_clear_maywrite` without checking the return value results in a compilation error because the `Result` type is marked #[must_use]. For now, there's only a method for VM_MIXEDMAP and not VM_PFNMAP. When we add a VM_PFNMAP method, we will need some way to prevent you from setting both VM_MIXEDMAP and VM_PFNMAP on the same vma. Link: https://lkml.kernel.org/r/20250408-vma-v16-6-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Jann Horn Reviewed-by: Andreas Hindborg Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Gary Guo Cc: Greg Kroah-Hartman Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 114ba9b9e8191925438365089c0d300f4f1b6fb1 Author: Alice Ryhl Date: Tue Apr 8 09:22:42 2025 +0000 mm: rust: add mmput_async support Adds an MmWithUserAsync type that uses mmput_async when dropped but is otherwise identical to MmWithUser. This has to be done using a separate type because the thing we are changing is the destructor. Rust Binder needs this to avoid a certain deadlock. See commit 9a9ab0d96362 ("binder: fix race between mmput() and do_exit()") for details. It's also needed in the shrinker to avoid cleaning up the mm in the shrinker's context. Link: https://lkml.kernel.org/r/20250408-vma-v16-5-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Greg Kroah-Hartman Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 3105f8f391ce00153c553bfe89efbb30b120d858 Author: Alice Ryhl Date: Tue Apr 8 09:22:41 2025 +0000 mm: rust: add lock_vma_under_rcu Currently, the binder driver always uses the mmap lock to make changes to its vma. Because the mmap lock is global to the process, this can involve significant contention. However, the kernel has a feature called per-vma locks, which can significantly reduce contention. For example, you can take a vma lock in parallel with an mmap write lock. This is important because contention on the mmap lock has been a long-term recurring challenge for the Binder driver. This patch introduces support for using `lock_vma_under_rcu` from Rust. The Rust Binder driver will be able to use this to reduce contention on the mmap lock. Link: https://lkml.kernel.org/r/20250408-vma-v16-4-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Jann Horn Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Greg Kroah-Hartman Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit bf3d331bb80749542cf299f94c471f611fb113b1 Author: Alice Ryhl Date: Tue Apr 8 09:22:40 2025 +0000 mm: rust: add vm_insert_page The vm_insert_page method is only usable on vmas with the VM_MIXEDMAP flag, so we introduce a new type to keep track of such vmas. The approach used in this patch assumes that we will not need to encode many flag combinations in the type. I don't think we need to encode more than VM_MIXEDMAP and VM_PFNMAP as things are now. However, if that becomes necessary, using generic parameters in a single type would scale better as the number of flags increases. Link: https://lkml.kernel.org/r/20250408-vma-v16-3-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Greg Kroah-Hartman Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 040f404b731207935ed644b14bcc2bb8b8488d00 Author: Alice Ryhl Date: Tue Apr 8 09:22:39 2025 +0000 mm: rust: add vm_area_struct methods that require read access This adds a type called VmaRef which is used when referencing a vma that you have read access to. Here, read access means that you hold either the mmap read lock or the vma read lock (or stronger). Additionally, a vma_lookup method is added to the mmap read guard, which enables you to obtain a &VmaRef in safe Rust code. This patch only provides a way to lock the mmap read lock, but a follow-up patch also provides a way to just lock the vma read lock. Link: https://lkml.kernel.org/r/20250408-vma-v16-2-d8b446e885d9@google.com Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Reviewed-by: Jann Horn Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Balbir Singh Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Greg Kroah-Hartman Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 5bb9ed6cdfeb75883652fd0ed3e3885083a92b4b Author: Alice Ryhl Date: Tue Apr 8 09:22:38 2025 +0000 mm: rust: add abstraction for struct mm_struct Patch series "Rust support for mm_struct, vm_area_struct, and mmap", v16. This updates the vm_area_struct support to use the approach we discussed at LPC where there are several different Rust wrappers for vm_area_struct depending on the kind of access you have to the vma. Each case allows a different set of operations on the vma. This includes an MM MAINTAINERS entry as proposed by Lorenzo: https://lore.kernel.org/all/33e64b12-aa07-4e78-933a-b07c37ff1d84@lucifer.local/ This patch (of 9): These abstractions allow you to reference a `struct mm_struct` using both mmgrab and mmget refcounts. This is done using two Rust types: * Mm - represents an mm_struct where you don't know anything about the value of mm_users. * MmWithUser - represents an mm_struct where you know at compile time that mm_users is non-zero. This allows us to encode in the type system whether a method requires that mm_users is non-zero or not. For instance, you can always call `mmget_not_zero` but you can only call `mmap_read_lock` when mm_users is non-zero. The struct is called Mm to keep consistency with the C side. The ability to obtain `current->mm` is added later in this series. The mm module is defined to only exist when CONFIG_MMU is set. This avoids various errors due to missing types and functions when CONFIG_MMU is disabled. More fine-grained cfgs can be considered in the future. See the thread at [1] for more info. Link: https://lkml.kernel.org/r/20250408-vma-v16-9-d8b446e885d9@google.com Link: https://lkml.kernel.org/r/20250408-vma-v16-1-d8b446e885d9@google.com Link: https://lore.kernel.org/all/202503091916.QousmtcY-lkp@intel.com/ Signed-off-by: Alice Ryhl Acked-by: Lorenzo Stoakes Acked-by: Liam R. Howlett Acked-by: Balbir Singh Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Cc: Alex Gaynor Cc: Arnd Bergmann Cc: Benno Lossin Cc: Björn Roy Baron Cc: Boqun Feng Cc: Greg Kroah-Hartman Cc: Jann Horn Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miguel Ojeda Cc: Suren Baghdasaryan Cc: Trevor Gross Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 8472cc4503eb8efac9a9a264814bab3b89ddbd87 Author: Kevin Brodsky Date: Tue Apr 8 10:52:22 2025 +0100 riscv: mm: call PUD/P4D ctor in special kernel pgtable alloc Constructors for PUD/P4D-level pgtables were recently introduced. They should be called for all pgtables; make sure they are called for special kernel mappings created by create_pgd_mapping() too. While at it also switch to using pagetable_alloc() like in alloc_{pte,pmd}_late(). Link: https://lkml.kernel.org/r/20250408095222.860601-13-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit cb5d2be83862d67eea4d08493a3ad5e4e4cb2f89 Author: Kevin Brodsky Date: Tue Apr 8 10:52:21 2025 +0100 arm64: mm: call PUD/P4D ctor in __create_pgd_mapping() Constructors for PUD/P4D-level pgtables were recently introduced. They should be called for all pgtables; make sure they are called for special kernel mappings created by __create_pgd_mapping() too. Link: https://lkml.kernel.org/r/20250408095222.860601-12-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 0e3a16a760c6aececc7f8211f6a6807d1719c7bd Author: Kevin Brodsky Date: Tue Apr 8 10:52:20 2025 +0100 riscv: mm: clarify ctor mm argument in alloc_{pte,pmd}_late pagetable_{pte,pmd}_ctor(mm, ptdesc) skip the ptlock initialisation if mm is &init_mm. To avoid unnecessary overhead, it is therefore preferable to pass the actual mm associated to the PTE/PMD. Unfortunately, this proves challenging for alloc_{pte,pmd}_late() as the associated mm is not available at the point where they are called - in fact not even top-level functions like create_pgd_mapping() are passed the mm. As a result they both call the ctor with NULL as mm; this is safe but potentially wasteful. This is not a new situation, but let's add a couple of comments to clarify it. Link: https://lkml.kernel.org/r/20250408095222.860601-11-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 5e8eb9aeeda3a7aaf48efa1d34ae804e894e307f Author: Kevin Brodsky Date: Tue Apr 8 10:52:19 2025 +0100 arm64: mm: always call PTE/PMD ctor in __create_pgd_mapping() TL;DR: always call the PTE/PMD ctor, passing the appropriate mm to skip ptlock_init() if unneeded. __create_pgd_mapping() is used for creating different kinds of mappings, and may allocate page table pages if passed an allocator callback. There are currently three such cases: 1. create_pgd_mapping(), which is used to create the EFI mapping 2. arch_add_memory() 3. map_entry_trampoline() 1. uses pgd_pgtable_alloc() as allocator callback, which calls the PTE/PMD ctor, while 2. and 3. use __pgd_pgtable_alloc(), which does not. The rationale is most likely that pgtables associated with init_mm do not make use of split page table locks, and it is therefore unnecessary to initialise them by calling the ctor. 2. operates on swapper_pg_dir so the allocated pgtables are clearly associated with init_mm, this is arguably the case for 3. too (the trampoline mapping is never modified so ptlocks are anyway irrelevant). 1. corresponds to efi_mm so ptlocks need to be initialised in that case. We are now moving towards calling the ctor for all page tables, even those associated with init_mm. pagetable_{pte,pmd}_ctor() have become aware of the associated mm so that the ptlock initialisation can be skipped for init_mm. This patch therefore amends the allocator callbacks so that the PTE/PMD ctor are always called, with an appropriate mm pointer to avoid unnecessary ptlock overhead. Modifying the prototype of the allocator callbacks to take the mm and propagating that pointer all the way down would be pretty invasive. Instead: * __pgd_pgtable_alloc() (cases 2. and 3. above) is replaced with pgd_pgtable_alloc_init_mm(), resulting in the ctors being called with &init_mm. This is the main functional change in this patch; the ptlock still isn't initialised, but other ctor actions (e.g. accounting-related) are now carried out for those allocated pgtables. * pgd_pgtable_alloc() (case 1. above) is replaced with pgd_pgtable_alloc_special_mm(), resulting in the ctors being called with NULL as mm. No functional change here; NULL essentially means "not init_mm", and the ptlock is still initialised. __pgd_pgtable_alloc() is now the common implementation of those two helpers. While at it we switch it to using pagetable_alloc() like standard pgtable allocator functions and remove the comment regarding ctor calls (ctors are now always expected to be called). Link: https://lkml.kernel.org/r/20250408095222.860601-10-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit c64f46ee1377961602832fc4e6768bb2f76642c2 Author: Kevin Brodsky Date: Tue Apr 8 10:52:18 2025 +0100 arm64: mm: use enum to identify pgtable level instead of *_SHIFT Commit 90292aca9854 ("arm64: mm: use appropriate ctors for page tables") introduced pgtable ctor calls in pgd_pgtable_alloc(). To identify the pgtable level and call the appropriate ctor, the *_SHIFT value associated with the pgtable level is used. However, those values do not unambiguously identify a level, because if a given level is folded, the *_SHIFT value will be equal to that of the upper level (e.g. PMD_SHIFT == PUD_SHIFT if PMD is folded). As things stand, there is probably not much damaged done by calling the ctor for a different level, and ARCH_ENABLE_SPLIT_PMD_PTLOCK is only selected if PMD isn't folded (so we don't needlessly initialise pmd_ptlock). Still, this is pretty confusing, and it would get even more confusing when adding ctor calls for the remaining levels. Let's simplify all this by using an enum to identify the pgtable level instead; this way folding becomes irrelevant. This is inspired by one of the m68k pgtable allocators (arch/m68k/include/asm/motorola_pgalloc.h). Link: https://lkml.kernel.org/r/20250408095222.860601-9-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 8240d8d3c5fb65fbdace7ae4db909b51f2253da7 Author: Kevin Brodsky Date: Tue Apr 8 10:52:17 2025 +0100 mm: skip ptlock_init() for kernel PMDs Split page table locks are not used for pgtables associated to init_mm, at any level. pte_alloc_kernel() does not call ptlock_init() as a result. There is however no separate alloc/free functions for kernel PMDs, and pmd_ptlock_init() is called unconditionally. When ALLOC_SPLIT_PTLOCKS is true (e.g. 32-bit architectures or if CONFIG_PREEMPT_RT is selected), this results in unnecessary dynamic memory allocation every time a kernel PMD is allocated. Now that pagetable_pmd_ctor() is passed the associated mm, we can easily remove this overhead by skipping pmd_ptlock_init() if the pgtable is associated to init_mm. No special-casing is needed on the dtor path, as ptlock_free() is already called unconditionally for all levels. (ptlock_free() is a no-op unless a ptlock was allocated for the given PTP.) Link: https://lkml.kernel.org/r/20250408095222.860601-8-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 10a2e444e4ade64a1b12ccc698a77bd0ff5a57db Author: Kevin Brodsky Date: Tue Apr 8 10:52:16 2025 +0100 sparc64: mm: call ctor/dtor for kernel PTEs The generic implementation of pte_{alloc_one,free}_kernel now calls the [cd]tor, without initialising the ptlock needlessly as pagetable_pte_ctor() skips it for init_mm. Align sparc64 with the generic implementation by ensuring pagetable_pte_[cd]tor() are called for kernel PTEs. As a result the kernel and user alloc/free functions have the same implementation, and since pgtable_t is defined as pte_t *, we can have both call a common helper. Link: https://lkml.kernel.org/r/20250408095222.860601-7-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 8e8299bf386a0e41b1fd2106e81060d56d1b7b31 Author: Kevin Brodsky Date: Tue Apr 8 10:52:15 2025 +0100 powerpc: mm: call ctor/dtor for kernel PTEs The generic implementation of pte_{alloc_one,free}_kernel now calls the [cd]tor, without initialising the ptlock needlessly as pagetable_pte_ctor() skips it for init_mm. On powerpc, all functions related to PTE allocation are implemented by common helpers, which are passed a boolean to differentiate user from kernel pgtables. This patch aligns the powerpc implementation with the generic one by calling pagetable_pte_[cd]tor() unconditionally in those helpers. Link: https://lkml.kernel.org/r/20250408095222.860601-6-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 5a392e991dedebee51cb917b2f4fe600068fda49 Author: Kevin Brodsky Date: Tue Apr 8 10:52:14 2025 +0100 m68k: mm: call ctor/dtor for kernel PTEs The generic implementation of pte_{alloc_one,free}_kernel now calls the [cd]tor. Align the m68k/ColdFire implementation of those functions by calling the [cd]tor explicitly. Link: https://lkml.kernel.org/r/20250408095222.860601-5-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit 49f5996664201a3581ee5ea5949ee7d5fafb9d86 Author: Kevin Brodsky Date: Tue Apr 8 10:52:13 2025 +0100 mm: call ctor/dtor for kernel PTEs Since [1], constructors/destructors are expected to be called for all page table pages, at all levels and for both user and kernel pgtables. There is however one glaring exception: kernel PTEs are managed via separate helpers (pte_alloc_kernel/pte_free_kernel), which do not call the [cd]tor, at least not in the generic implementation. The most obvious reason for this anomaly is that init_mm is special-cased not to use split page table locks. As a result calling ptlock_init() for PTEs associated with init_mm would be wasteful, potentially resulting in dynamic memory allocation. However, pgtable [cd]tors perform other actions - currently related to accounting/statistics, and potentially more functionally significant in the future. Now that pagetable_pte_ctor() is passed the associated mm, we can make it skip the call to ptlock_init() for init_mm; this allows us to call the ctor from pte_alloc_one_kernel() too. This is matched by a call to the pgtable destructor in pte_free_kernel(); no special-casing is needed on that path, as ptlock_free() is already called unconditionally. (ptlock_free() is a no-op unless a ptlock was allocated for the given PTP.) This patch ensures that all architectures that rely on call the [cd]tor for kernel PTEs. pte_free_kernel() cannot be overridden so changing the generic implementation is sufficient. pte_alloc_one_kernel() can be overridden using __HAVE_ARCH_PTE_ALLOC_ONE_KERNEL, and a few architectures implement it by calling the page allocator directly. We amend those so that they call the generic __pte_alloc_one_kernel() instead, if possible, ensuring that the ctor is called. A few architectures do not use ; those will be taken care of separately. [1] https://lore.kernel.org/linux-mm/20250103184415.2744423-1-kevin.brodsky@arm.com/ Link: https://lkml.kernel.org/r/20250408095222.860601-4-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Reviewed-by: Alexander Gordeev # s390 Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Dave Hansen Signed-off-by: Andrew Morton commit 65ccffcee891930864456fa47447d96a630faf8a Author: Kevin Brodsky Date: Tue Apr 8 10:52:12 2025 +0100 x86: pgtable: always use pte_free_kernel() Page table pages are normally freed using the appropriate helper for the given page table level. On x86, pud_free_pmd_page() and pmd_free_pte_page() are an exception to the rule: they call free_page() directly. Constructor/destructor calls are about to be introduced for kernel PTEs. To avoid missing dtor calls in those helpers, free the PTE pages using pte_free_kernel() instead of free_page(). While at it also use pmd_free() instead of calling pagetable_dtor() explicitly at the PMD level. Link: https://lkml.kernel.org/r/20250408095222.860601-3-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Cc: Yang Shi Cc: Alexander Gordeev Signed-off-by: Andrew Morton commit d82d3bf4115217bb3f43f9320bad5d68a35c278f Author: Kevin Brodsky Date: Tue Apr 8 10:52:11 2025 +0100 mm: pass mm down to pagetable_{pte,pmd}_ctor Patch series "Always call constructor for kernel page tables", v2. There has been much confusion around exactly when page table constructors/destructors (pagetable_*_[cd]tor) are supposed to be called. They were initially introduced for user PTEs only (to support split page table locks), then at the PMD level for the same purpose. Accounting was added later on, starting at the PTE level and then moving to higher levels (PMD, PUD). Finally, with my earlier series "Account page tables at all levels" [1], the ctor/dtor is run for all levels, all the way to PGD. I thought this was the end of the story, and it hopefully is for user pgtables, but I was wrong for what concerns kernel pgtables. The current situation there makes very little sense: * At the PTE level, the ctor/dtor is not called (at least in the generic implementation). Specific helpers are used for kernel pgtables at this level (pte_{alloc,free}_kernel()) and those have never called the ctor/dtor, most likely because they were initially irrelevant in the kernel case. * At all other levels, the ctor/dtor is normally called. This is potentially wasteful at the PMD level (more on that later). This series aims to ensure that the ctor/dtor is always called for kernel pgtables, as it already is for user pgtables. Besides consistency, the main motivation is to guarantee that ctor/dtor hooks are systematically called; this makes it possible to insert hooks to protect page tables [2], for instance. There is however an extra challenge: split locks are not used for kernel pgtables, and it would therefore be wasteful to initialise them (ptlock_init()). It is worth clarifying exactly when split locks are used. They clearly are for user pgtables, but as illustrated in commit 61444cde9170 ("ARM: 8591/1: mm: use fully constructed struct pages for EFI pgd allocations"), they also are for special page tables like efi_mm. The one case where split locks are definitely unused is pgtables owned by init_mm; this is consistent with the behaviour of apply_to_pte_range(). The approach chosen in this series is therefore to pass the mm associated to the pgtables being constructed to pagetable_{pte,pmd}_ctor() (patch 1), and skip ptlock_init() if mm == &init_mm (patch 3 and 7). This makes it possible to call the PTE ctor/dtor from pte_{alloc,free}_kernel() without unintended consequences (patch 3). As a result the accounting functions are now called at all levels for kernel pgtables, and split locks are never initialised. In configurations where ptlocks are dynamically allocated (32-bit, PREEMPT_RT, etc.) and ARCH_ENABLE_SPLIT_PMD_PTLOCK is selected, this series results in the removal of a kmem_cache allocation for every kernel PMD. Additionally, for certain architectures that do not use such as s390, the same optimisation occurs at the PTE level. === Things get more complicated when it comes to special pgtable allocators (patch 8-12). All architectures need such allocators to create initial kernel pgtables; we are not concerned with those as the ctor cannot be called so early in the boot sequence. However, those allocators may also be used later in the boot sequence or during normal operations. There are two main use-cases: 1. Mapping EFI memory: efi_mm (arm, arm64, riscv) 2. arch_add_memory(): init_mm The ctor is already explicitly run (at the PTE/PMD level) in the first case, as required for pgtables that are not associated with init_mm. However the same allocators may also be used for the second use-case (or others), and this is where it gets messy. Patch 1 calls the ctor with NULL as mm in those situations, as the actual mm isn't available. Practically this means that ptlocks will be unconditionally initialised. This is fine on arm - create_mapping_late() is only used for the EFI mapping. On arm64, __create_pgd_mapping() is also used by arch_add_memory(); patch 8/9/11 ensure that ctors are called at all levels with the appropriate mm. The situation is similar on riscv, but propagating the mm down to the ctor would require significant refactoring. Since they are already called unconditionally, this series leaves riscv no worse off - patch 10 adds comments to clarify the situation. From a cursory look at other architectures implementing arch_add_memory(), s390 and x86 may also need a similar treatment to add constructor calls. This is to be taken care of in a future version or as a follow-up. === The complications in those special pgtable allocators beg the question: does it really make sense to treat efi_mm and init_mm differently in e.g. apply_to_pte_range()? Maybe what we really need is a way to tell if an mm corresponds to user memory or not, and never use split locks for non-user mm's. Feedback and suggestions welcome! This patch (of 12): In preparation for calling constructors for all kernel page tables while eliding unnecessary ptlock initialisation, let's pass down the associated mm to the PTE/PMD level ctors. (These are the two levels where ptlocks are used.) In most cases the mm is already around at the point of calling the ctor so we simply pass it down. This is however not the case for special page table allocators: * arch/arm/mm/mmu.c * arch/arm64/mm/mmu.c * arch/riscv/mm/init.c In those cases, the page tables being allocated are either for standard kernel memory (init_mm) or special page directories, which may not be associated to any mm. For now let's pass NULL as mm; this will be refined where possible in future patches. No functional change in this patch. Link: https://lore.kernel.org/linux-mm/20250103184415.2744423-1-kevin.brodsky@arm.com/ [1] Link: https://lore.kernel.org/linux-hardening/20250203101839.1223008-1-kevin.brodsky@arm.com/ [2] Link: https://lkml.kernel.org/r/20250408095222.860601-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20250408095222.860601-2-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Reviewed-by: Alexander Gordeev [s390] Cc: Albert Ou Cc: Andreas Larsson Cc: Catalin Marinas Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Kevin Brodsky Cc: Linus Waleij Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Qi Zheng Cc: Ryan Roberts Cc: Will Deacon Cc: Yang Shi Cc: Cc: Dave Hansen Signed-off-by: Andrew Morton commit 24c76f37ab3fb2f3a202eaa678334b216f8bd161 Author: Uladzislau Rezki (Sony) Date: Tue Apr 8 17:15:49 2025 +0200 vmalloc: use for_each_vmap_node() in purge-vmap-area Update a __purge_vmap_area_lazy() to use introduced helper. This is last place in vmalloc code. Also this patch introduces an extra function which is node_to_id() that converts a vmap_node pointer to an index in array. __purge_vmap_area_lazy() requires that extra function. Link: https://lkml.kernel.org/r/20250408151549.77937-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Christop Hellwig Signed-off-by: Andrew Morton commit ce906d7679e1f1feab54bdddac4d39df846d663a Author: Uladzislau Rezki (Sony) Date: Tue Apr 8 17:15:48 2025 +0200 vmalloc: switch to for_each_vmap_node() helper There are places which can be updated easily to use the helper to iterate over all vmap-nodes. This is what this patch does. The aim is to improve readability and simplify the code. [akpm@linux-foundation.org: fix build warning] Link: https://lkml.kernel.org/r/20250408151549.77937-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Christop Hellwig Signed-off-by: Andrew Morton commit 4318255091eab6722bea3816bdee09ac7db68035 Author: Uladzislau Rezki (Sony) Date: Tue Apr 8 17:15:47 2025 +0200 vmalloc: add for_each_vmap_node() helper To simplify iteration over vmap-nodes, add the for_each_vmap_node() macro that iterates over all nodes in a system. It tends to simplify the code. Link: https://lkml.kernel.org/r/20250408151549.77937-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Christop Hellwig Signed-off-by: Andrew Morton commit a40b3fa844b4c29276a228ce878bd427a3149d37 Author: Liu Ye Date: Tue Mar 18 14:32:26 2025 +0800 fs/proc/page: refactor to reduce code duplication kpageflags_read() and kpagecgroup_read() are quite similar to kpagecount_read(). Refactor common code into a helper function to reduce code duplication. Link: https://lkml.kernel.org/r/20250318063226.223284-1-liuyerd@163.com Signed-off-by: Liu Ye Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Cc: Ran Xiaokai Cc: Roman Gushchin Cc: Shakeel Butt Cc: Svetly Todorov Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4c97a17a252bf8396f7bd65efced00bf401a8c25 Author: Przemek Kitszel Date: Thu Mar 20 11:22:19 2025 +0100 xarray: make xa_alloc_cyclic() return 0 on all success cases Change xa_alloc_cyclic() to return 0 even on wrap-around. Do the same for xa_alloc_cyclic_irq() and xa_alloc_cyclic_bh(). This will prevent any future bug of treating return of 1 as an error: int ret = xa_alloc_cyclic(...) if (ret) // currently mishandles ret==1 goto failure; If there will be someone interested in when wrap-around occurs, there is still __xa_alloc_cyclic() that behaves as before. For now there is no such user. Link: https://lkml.kernel.org/r/20250320102219.8101-1-przemyslaw.kitszel@intel.com Signed-off-by: Przemek Kitszel Suggested-by: Matthew Wilcox Link: https://lore.kernel.org/netdev/Z9gUd-5t8b5NX2wE@casper.infradead.org Cc: Andriy Shevchenko Cc: Dave Hansen Cc: Michal Swiatkowski Cc: Przemek Kitszel Signed-off-by: Andrew Morton commit dbb9c166a08c7a237c79b969a19ee02baa847af1 Author: Anshuman Khandual Date: Mon Apr 7 11:01:13 2025 +0530 arm64/mm: define ptdesc_t Define ptdesc_t type which describes the basic page table descriptor layout on arm64 platform. Subsequently all level specific pxxval_t descriptors are derived from ptdesc_t thus establishing a common original format, which can also be appropriate for page table entries, masks and protection values etc which are used at all page table levels. Link: https://lkml.kernel.org/r/20250407053113.746295-4-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Suggested-by: Ryan Roberts Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Dave Hansen Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Ingo Molnar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 08978fc3b0d5709583f6dc2072a8607d0b527860 Author: Anshuman Khandual Date: Mon Apr 7 11:01:12 2025 +0530 mm/ptdump: split effective_prot() into level specific callbacks Last argument in effective_prot() is u64 assuming pxd_val() returned value (all page table levels) is 64 bit. pxd_val() is very platform specific and its type should not be assumed in generic MM. Split effective_prot() into individual page table level specific callbacks which accepts corresponding pxd_t argument instead and then the subscribing platform (only x86) just derive pxd_val() from the entries as required and proceed as earlier. Link: https://lkml.kernel.org/r/20250407053113.746295-3-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Dave Hansen Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Nicholas Piggin Cc: Ryan Roberts Cc: Will Deacon Signed-off-by: Andrew Morton commit e064e7384f991c7df81999cad4ce30fed7ef7d88 Author: Anshuman Khandual Date: Mon Apr 7 11:01:11 2025 +0530 mm/ptdump: split note_page() into level specific callbacks Patch series "mm/ptdump: Drop assumption that pxd_val() is u64", v2. Last argument passed down in note_page() is u64 assuming pxd_val() returned value (all page table levels) is 64 bit - which might not be the case going ahead when D128 page tables is enabled on arm64 platform. Besides pxd_val() is very platform specific and its type should not be assumed in generic MM. A similar problem exists for effective_prot(), although it is restricted to x86 platform. This series splits note_page() and effective_prot() into individual page table level specific callbacks which accepts corresponding pxd_t page table entry as an argument instead and later on all subscribing platforms could derive pxd_val() from the table entries as required and proceed as before. Define ptdesc_t type which describes the basic page table descriptor layout on arm64 platform. Subsequently all level specific pxxval_t descriptors are derived from ptdesc_t thus establishing a common original format, which can also be appropriate for page table entries, masks and protection values etc which are used at all page table levels. This patch (of 3): Last argument passed down in note_page() is u64 assuming pxd_val() returned value (all page table levels) is 64 bit - which might not be the case going ahead when D128 page tables is enabled on arm64 platform. Besides pxd_val() is very platform specific and its type should not be assumed in generic MM. Split note_page() into individual page table level specific callbacks which accepts corresponding pxd_t argument instead and then subscribing platforms just derive pxd_val() from the entries as required and proceed as earlier. Also add a note_page_flush() callback for flushing the last page table page that was being handled earlier via level = -1. Link: https://lkml.kernel.org/r/20250407053113.746295-1-anshuman.khandual@arm.com Link: https://lkml.kernel.org/r/20250407053113.746295-2-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Catalin Marinas Cc: Will Deacon Cc: Madhavan Srinivasan Cc: Nicholas Piggin Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Ard Biesheuvel Cc: Dave Hansen Cc: Mark Rutland Cc: Ryan Roberts Signed-off-by: Andrew Morton commit e487a5d513cb6a0faf7e48523416434b111318b3 Author: Li Wang Date: Mon Apr 7 16:42:01 2025 +0800 selftest/mm: make hugetlb_reparenting_test tolerant to async reparenting In cgroup v2, memory and hugetlb usage reparenting is asynchronous. This can cause test flakiness when immediately asserting usage after deleting a child cgroup. To address this, add a helper function `assert_with_retry()` that checks usage values with a timeout-based retry. This improves test stability without relying on fixed sleep delays. Also bump up the tolerance size to 7MB. To avoid False Positives: ... # Assert memory charged correctly for child only use. # actual a = 11 MB # expected a = 0 MB # fail # cleanup # [FAIL] not ok 11 hugetlb_reparenting_test.sh -cgroup-v2 # exit=1 # 0 # SUMMARY: PASS=10 SKIP=0 FAIL=1 Link: https://lkml.kernel.org/r/20250407084201.74492-1-liwang@redhat.com Signed-off-by: Li Wang Tested-by: Donet Tom Cc: Waiman Long Cc: Anshuman Khandual Cc: Dev Jain Cc: Kirill A. Shuemov Cc: Shuah Khan Signed-off-by: Andrew Morton commit ee414bd97b3fa0a4f74e40004e3b4191326bd46c Author: Johannes Weiner Date: Mon Apr 7 14:01:54 2025 -0400 mm: page_alloc: tighten up find_suitable_fallback() find_suitable_fallback() is not as efficient as it could be, and somewhat difficult to follow. 1. should_try_claim_block() is a loop invariant. There is no point in checking fallback areas if the caller is interested in claimable blocks but the order and the migratetype don't allow for that. 2. __rmqueue_steal() doesn't care about claimability, so it shouldn't have to run those tests. Different callers want different things from this helper: 1. __compact_finished() scans orders up until it finds a claimable block 2. __rmqueue_claim() scans orders down as long as blocks are claimable 3. __rmqueue_steal() doesn't care about claimability at all Move should_try_claim_block() out of the loop. Only test it for the two callers who care in the first place. Distinguish "no blocks" from "order + mt are not claimable" in the return value; __rmqueue_claim() can stop once order becomes unclaimable, __compact_finished() can keep advancing until order becomes claimable. Before: Performance counter stats for './run case-lru-file-mmap-read' (5 runs): 85,294.85 msec task-clock # 5.644 CPUs utilized ( +- 0.32% ) 15,968 context-switches # 187.209 /sec ( +- 3.81% ) 153 cpu-migrations # 1.794 /sec ( +- 3.29% ) 801,808 page-faults # 9.400 K/sec ( +- 0.10% ) 733,358,331,786 instructions # 1.87 insn per cycle ( +- 0.20% ) (64.94%) 392,622,904,199 cycles # 4.603 GHz ( +- 0.31% ) (64.84%) 148,563,488,531 branches # 1.742 G/sec ( +- 0.18% ) (63.86%) 152,143,228 branch-misses # 0.10% of all branches ( +- 1.19% ) (62.82%) 15.1128 +- 0.0637 seconds time elapsed ( +- 0.42% ) After: Performance counter stats for './run case-lru-file-mmap-read' (5 runs): 84,380.21 msec task-clock # 5.664 CPUs utilized ( +- 0.21% ) 16,656 context-switches # 197.392 /sec ( +- 3.27% ) 151 cpu-migrations # 1.790 /sec ( +- 3.28% ) 801,703 page-faults # 9.501 K/sec ( +- 0.09% ) 731,914,183,060 instructions # 1.88 insn per cycle ( +- 0.38% ) (64.90%) 388,673,535,116 cycles # 4.606 GHz ( +- 0.24% ) (65.06%) 148,251,482,143 branches # 1.757 G/sec ( +- 0.37% ) (63.92%) 149,766,550 branch-misses # 0.10% of all branches ( +- 1.22% ) (62.88%) 14.8968 +- 0.0486 seconds time elapsed ( +- 0.33% ) Link: https://lkml.kernel.org/r/20250407180154.63348-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Brendan Jackman Tested-by: Shivank Garg Reviewed-by: Vlastimil Babka Cc: Carlos Song Cc: Mel Gorman Signed-off-by: Andrew Morton commit 6e3092d788be1de0aac56b81fc17551c76645cdf Author: David Hildenbrand Date: Fri Mar 21 12:37:13 2025 +0100 kernel/events/uprobes: uprobe_write_opcode() rewrite uprobe_write_opcode() does some pretty low-level things that really, it shouldn't be doing: for example, manually breaking COW by allocating anonymous folios and replacing mapped pages. Further, it does seem to do some shaky things: for example, writing to possible COW-shared anonymous pages or zapping anonymous pages that might be pinned. We're also not taking care of uffd, uffd-wp, softdirty ... although rather corner cases here. Let's just get it right like ordinary ptrace writes would. Let's rewrite the code, leaving COW-breaking to core-MM, triggered by FOLL_FORCE|FOLL_WRITE (note that the code was already using FOLL_FORCE). We'll use GUP to lookup/faultin the page and break COW if required. Then, we'll walk the page tables using a folio_walk to perform our page modification atomically by temporarily unmap the PTE + flushing the TLB. Likely, we could avoid the temporary unmap in case we can just atomically write the instruction, but that will be a separate project. Unfortunately, we still have to implement the zapping logic manually, because we only want to zap in specific circumstances (e.g., page content identical). Note that we can now handle large folios (compound pages) and the shared zeropage just fine, so drop these checks. Link: https://lkml.kernel.org/r/20250321113713.204682-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: "Masami Hiramatsu (Google)" Cc: Matthew Wilcox (Oracle) Cc: Namhyung kim Cc: Russel King Cc: tongtiangen Signed-off-by: Andrew Morton commit 8a5577428e8e586a107ee5f39eb4c86d32c971cd Author: David Hildenbrand Date: Fri Mar 21 12:37:12 2025 +0100 kernel/events/uprobes: pass VMA to set_swbp(), set_orig_insn() and uprobe_write_opcode() We already have the VMA, no need to look it up using get_user_page_vma_remote(). We can now switch to get_user_pages_remote(). Link: https://lkml.kernel.org/r/20250321113713.204682-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: "Masami Hiramatsu (Google)" Cc: Matthew Wilcox (Oracle) Cc: Namhyung kim Cc: Russel King Cc: tongtiangen Signed-off-by: Andrew Morton commit b56e64466554dfd39a7695f5025f583d8a20288d Author: David Hildenbrand Date: Fri Mar 21 12:37:11 2025 +0100 kernel/events/uprobes: pass VMA instead of MM to remove_breakpoint() Patch series "kernel/events/uprobes: uprobe_write_opcode() rewrite", v3. Currently, uprobe_write_opcode() implements COW-breaking manually, which is really far from ideal. Further, there is interest in supporting uprobes on hugetlb pages [1], and leaving at least the COW-breaking to the core will make this much easier. Also, I think the current code doesn't really handle some things properly (see patch #3) when replacing/zapping pages. Let's rewrite it, to leave COW-breaking to the fault handler, and handle registration/unregistration by temporarily unmapping the anonymous page, modifying it, and mapping it again. We still have to implement zapping of anonymous pages ourselves, unfortunately. We could look into not performing the temporary unmapping if we can perform the write atomically, which would likely also make adding hugetlb support a lot easier. But, limited (e.g., only PMD/PUD) hugetlb support could be added on top of this with some tweaking. Note that we now won't have to allocate another anonymous folio when unregistering (which will be beneficial for hugetlb as well), we can simply modify the already-mapped one from the registration (if any). When registering a uprobe, we'll first trigger a ptrace-like write fault to break COW, to then modify the already-mapped page. Briefly sanity tested with perf probes and with the bpf uprobes selftest. This patch (of 3): Pass VMA instead of MM to remove_breakpoint() and remove the "MM" argument from install_breakpoint(), because it can easily be derived from the VMA. Link: https://lkml.kernel.org/r/20250321113713.204682-1-david@redhat.com Link: https://lkml.kernel.org/r/20250321113713.204682-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Cc: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Mark Rutland Cc: "Masami Hiramatsu (Google)" Cc: Matthew Wilcox (Oracle) Cc: Namhyung kim Cc: Russel King Cc: tongtiangen Signed-off-by: Andrew Morton commit 79049bb48a76333646d076e29d4f99fedefdaf0d Author: Gavin Shan Date: Fri Mar 21 22:02:22 2025 +1000 mm/debug: fix parameter passed to page_mapcount_is_type() As the comments of page_mapcount_is_type() indicate, the parameter passed to the function should be one more than page->_mapcount. However, page->_mapcount is passed to the function by commit 4ffca5a96678 ("mm: support only one page_type per page") where page_type_has_type() is replaced by page_mapcount_is_type(), but the parameter isn't adjusted. Fix the parameter for page_mapcount_is_type() to be (page->__mapcount + 1). Note that the issue doesn't cause any visible impacts due to the safety gap introduced by PGTY_mapcount_underflow limit. [akpm@linux-foundation.org: simplify __dump_folio(), per David] Link: https://lkml.kernel.org/r/20250321120222.1456770-3-gshan@redhat.com Fixes: 4ffca5a96678 ("mm: support only one page_type per page") Signed-off-by: Gavin Shan Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: gehao Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 979f3ef0f798d9b4fda4806d37fb1a264fc38566 Author: Gavin Shan Date: Fri Mar 21 22:02:21 2025 +1000 mm: fix parameter passed to page_mapcount_is_type() Patch series "Fix parameter passed to page_mapcount_is_type()", v2. Found by code inspection. There are two places where the parameter passed to page_mapcount_is_type() is (page->_mapcount), which is incorrect since it should be one more than the value, as explained in the comments to page_mapcount_is_type(): (a) page_has_type() in page-flags.h (b) __dump_folio() in mm/debug.c PATCH[1] fixes the parameter for (a) PATCH[2] fixes the parameter for (b) Note that the issue doesn't cause any visible impacts due to the safety gap introduced by PGTY_mapcount_underflow limit. So the tag 'Cc: stable@vger.kernel.org' isn't needed. This patch (of 2): As the comments of page_mapcount_is_type() indicate, the parameter passed to the function should be one more than page->_mapcount. However, page->_mapcount (equivalent to page->page_type) is passed to the function by commit 4ffca5a96678 ("mm: support only one page_type per page") page_type_has_type() is replaced by page_mapcount_is_type(), but the parameter isn't adjusted. Fix it by replacing page_mapcount_is_type() with page_type_has_type() in page_has_type(). Note that the issue doesn't cause any visible impacts due to the safety gap introduced by PGTY_mapcount_underflow limit. Link: https://lkml.kernel.org/r/20250321120222.1456770-1-gshan@redhat.com Link: https://lkml.kernel.org/r/20250321120222.1456770-2-gshan@redhat.com Fixes: 4ffca5a96678 ("mm: support only one page_type per page") Signed-off-by: Gavin Shan Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: gehao Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit a9562fd03a5edbc982ef26d729da3f5968533d23 Author: Andrei Vagin Date: Mon Mar 24 06:53:28 2025 +0000 selftests/mm: add PAGEMAP_SCAN guard region test Add a selftest to verify the PAGEMAP_SCAN ioctl correctly reports guard regions using the newly introduced PAGE_IS_GUARD flag. Link: https://lkml.kernel.org/r/20250324065328.107678-4-avagin@google.com Signed-off-by: Andrei Vagin Reviewed-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 267bee0cd87a98832fd9da1976f0f53788b6a2b2 Author: Andrei Vagin Date: Mon Mar 24 06:53:27 2025 +0000 tools headers UAPI: sync linux/fs.h with the kernel sources Required for a new PAGEMAP_SCAN test to verify guard region reporting. Link: https://lkml.kernel.org/r/20250324065328.107678-3-avagin@google.com Signed-off-by: Andrei Vagin Reviewed-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit a516403787e08119b70ce8bfff985272ef318a58 Author: Andrei Vagin Date: Mon Mar 24 06:53:26 2025 +0000 fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions Patch series "fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions", v2. Introduce the PAGE_IS_GUARD flag in the PAGEMAP_SCAN ioctl to expose information about guard regions. This allows userspace tools, such as CRIU, to detect and handle guard regions. Currently, CRIU utilizes PAGEMAP_SCAN as a more efficient alternative to parsing /proc/pid/pagemap. Without this change, guard regions are incorrectly reported as swap-anon regions, leading CRIU to attempt dumping them and subsequently failing. The series includes updates to the documentation and selftests to reflect the new functionality. This patch (of 3): Introduce the PAGE_IS_GUARD flag in the PAGEMAP_SCAN ioctl to expose information about guard regions. This allows userspace tools, such as CRIU, to detect and handle guard regions. Link: https://lkml.kernel.org/r/20250324065328.107678-1-avagin@google.com Link: https://lkml.kernel.org/r/20250324065328.107678-2-avagin@google.com Signed-off-by: Andrei Vagin Acked-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 7eeafde0ac05fa84a74d37af0efe5c6c5270bbef Author: Sergey Senozhatsky Date: Tue Mar 25 17:04:16 2025 +0900 zsmalloc: cleanup headers includes Remove unused headers includes from zsmalloc and move pagemap.h and migrate.h includes into zpdesc header. Link: https://lkml.kernel.org/r/20250325080427.3449359-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton commit bc6fa711951185fa0fdf5974c50a1c4d0cd65be3 Author: Dmitry V. Levin Date: Mon Mar 3 13:20:52 2025 +0200 selftests/ptrace: add a test case for PTRACE_SET_SYSCALL_INFO Check whether PTRACE_SET_SYSCALL_INFO semantics implemented in the kernel matches userspace expectations. Link: https://lkml.kernel.org/r/20250303112052.GG24170@strace.io Signed-off-by: Dmitry V. Levin Reviewed-by: Oleg Nesterov Cc: Alexander Gordeev Cc: Alexey Gladkov (Intel) Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Charlie Jenkins Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromiatnikov Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Maciej W. Rozycki Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 26bb32768fe6552de044f782a58b3272073fbfc0 Author: Dmitry V. Levin Date: Mon Mar 3 13:20:44 2025 +0200 ptrace: introduce PTRACE_SET_SYSCALL_INFO request PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements PTRACE_GET_SYSCALL_INFO by letting the ptracer modify details of system calls the tracee is blocked in. This API allows ptracers to obtain and modify system call details in a straightforward and architecture-agnostic way, providing a consistent way of manipulating the system call number and arguments across architectures. As in case of PTRACE_GET_SYSCALL_INFO, PTRACE_SET_SYSCALL_INFO also does not aim to address numerous architecture-specific system call ABI peculiarities, like differences in the number of system call arguments for such system calls as pread64 and preadv. The current implementation supports changing only those bits of system call information that are used by strace system call tampering, namely, syscall number, syscall arguments, and syscall return value. Support of changing additional details returned by PTRACE_GET_SYSCALL_INFO, such as instruction pointer and stack pointer, could be added later if needed, by using struct ptrace_syscall_info.flags to specify the additional details that should be set. Currently, "flags" and "reserved" fields of struct ptrace_syscall_info must be initialized with zeroes; "arch", "instruction_pointer", and "stack_pointer" fields are currently ignored. PTRACE_SET_SYSCALL_INFO currently supports only PTRACE_SYSCALL_INFO_ENTRY, PTRACE_SYSCALL_INFO_EXIT, and PTRACE_SYSCALL_INFO_SECCOMP operations. Other operations could be added later if needed. Ideally, PTRACE_SET_SYSCALL_INFO should have been introduced along with PTRACE_GET_SYSCALL_INFO, but it didn't happen. The last straw that convinced me to implement PTRACE_SET_SYSCALL_INFO was apparent failure to provide an API of changing the first system call argument on riscv architecture. ptrace(2) man page: long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); ... PTRACE_SET_SYSCALL_INFO Modify information about the system call that caused the stop. The "data" argument is a pointer to struct ptrace_syscall_info that specifies the system call information to be set. The "addr" argument should be set to sizeof(struct ptrace_syscall_info)). Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055eeaac@gmail.com/ Link: https://lkml.kernel.org/r/20250303112044.GF24170@strace.io Signed-off-by: Dmitry V. Levin Reviewed-by: Alexey Gladkov Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Reviewed-by: Eugene Syromiatnikov Reviewed-by: Oleg Nesterov Cc: Alexander Gordeev Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Maciej W. Rozycki Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit c354ec9cee909136e168f4f4900d56a491c4d6c5 Author: Dmitry V. Levin Date: Mon Mar 3 13:20:38 2025 +0200 ptrace_get_syscall_info: factor out ptrace_get_syscall_info_op Move the code that calculates the type of the system call stop out of ptrace_get_syscall_info() into a separate function ptrace_get_syscall_info_op() which is going to be used later to implement PTRACE_SET_SYSCALL_INFO API. Link: https://lkml.kernel.org/r/20250303112038.GE24170@strace.io Signed-off-by: Dmitry V. Levin Reviewed-by: Oleg Nesterov Cc: Alexander Gordeev Cc: Alexey Gladkov (Intel) Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Charlie Jenkins Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromiatnikov Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Maciej W. Rozycki Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit cc6622730be77fa88acc4fb0942cd39e6fa5ca27 Author: Dmitry V. Levin Date: Mon Mar 3 13:20:20 2025 +0200 syscall.h: introduce syscall_set_nr() Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. Link: https://lkml.kernel.org/r/20250303112020.GD24170@strace.io Signed-off-by: Dmitry V. Levin Tested-by: Charlie Jenkins Reviewed-by: Charlie Jenkins Acked-by: Helge Deller # parisc Reviewed-by: Maciej W. Rozycki # mips Cc: Alexander Gordeev Cc: Alexey Gladkov (Intel) Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromiatnikov Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 17fc7b8f9bce5d3d61ef347dd8cfccb6365dcaa1 Author: Dmitry V. Levin Date: Mon Mar 3 13:20:09 2025 +0200 syscall.h: add syscall_set_arguments() This function is going to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. This partially reverts commit 7962c2eddbfe ("arch: remove unused function syscall_set_arguments()") by reusing some of old syscall_set_arguments() implementations. [nathan@kernel.org: fix compile time fortify checks] Link: https://lkml.kernel.org/r/20250408213131.GA2872426@ax162 Link: https://lkml.kernel.org/r/20250303112009.GC24170@strace.io Signed-off-by: Dmitry V. Levin Signed-off-by: Nathan Chancellor Tested-by: Charlie Jenkins Reviewed-by: Charlie Jenkins Acked-by: Helge Deller # parisc Reviewed-by: Maciej W. Rozycki [mips] Cc: Alexander Gordeev Cc: Alexey Gladkov (Intel) Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromiatnikov Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 87a929ae4fb4709c577e1d41d6fb13f567a4aa03 Author: Dmitry V. Levin Date: Mon Mar 3 13:19:53 2025 +0200 hexagon: add syscall_set_return_value() Patch series "ptrace: introduce PTRACE_SET_SYSCALL_INFO API", v7. PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements PTRACE_GET_SYSCALL_INFO by letting the ptracer modify details of system calls the tracee is blocked in. This API allows ptracers to obtain and modify system call details in a straightforward and architecture-agnostic way, providing a consistent way of manipulating the system call number and arguments across architectures. As in case of PTRACE_GET_SYSCALL_INFO, PTRACE_SET_SYSCALL_INFO also does not aim to address numerous architecture-specific system call ABI peculiarities, like differences in the number of system call arguments for such system calls as pread64 and preadv. The current implementation supports changing only those bits of system call information that are used by strace system call tampering, namely, syscall number, syscall arguments, and syscall return value. Support of changing additional details returned by PTRACE_GET_SYSCALL_INFO, such as instruction pointer and stack pointer, could be added later if needed, by using struct ptrace_syscall_info.flags to specify the additional details that should be set. Currently, "flags" and "reserved" fields of struct ptrace_syscall_info must be initialized with zeroes; "arch", "instruction_pointer", and "stack_pointer" fields are currently ignored. PTRACE_SET_SYSCALL_INFO currently supports only PTRACE_SYSCALL_INFO_ENTRY, PTRACE_SYSCALL_INFO_EXIT, and PTRACE_SYSCALL_INFO_SECCOMP operations. Other operations could be added later if needed. Ideally, PTRACE_SET_SYSCALL_INFO should have been introduced along with PTRACE_GET_SYSCALL_INFO, but it didn't happen. The last straw that convinced me to implement PTRACE_SET_SYSCALL_INFO was apparent failure to provide an API of changing the first system call argument on riscv architecture [1]. ptrace(2) man page: long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); ... PTRACE_SET_SYSCALL_INFO Modify information about the system call that caused the stop. The "data" argument is a pointer to struct ptrace_syscall_info that specifies the system call information to be set. The "addr" argument should be set to sizeof(struct ptrace_syscall_info)). This patch (of 6): hexagon is the only architecture that provides HAVE_ARCH_TRACEHOOK but doesn't define syscall_set_return_value(). Since this function is going to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API, add it on hexagon, too. Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055eeaac@gmail.com/ [1] Link: https://lkml.kernel.org/r/20250303111953.GB24170@strace.io Signed-off-by: Dmitry V. Levin Cc: Alexander Gordeev Cc: Alexey Gladkov (Intel) Cc: Andreas Larsson Cc: anton ivanov Cc: Arnd Bergmann Cc: Borislav Betkov Cc: Brian Cain Cc: Charlie Jenkins Cc: Christian Borntraeger Cc: Christian Zankel Cc: Christophe Leroy Cc: Dave Hansen Cc: Davide Berardi Cc: David S. Miller Cc: Dinh Nguyen Cc: Eugene Syromyatnikov Cc: Geert Uytterhoeven Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Jonas Bonn Cc: Maciej W. Rozycki Cc: Madhavan Srinivasan Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Frysinger Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Renzo Davoi Cc: Richard Weinberger Cc: Rich Felker Cc: Russel King Cc: Shuah Khan Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Gleinxer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: WANG Xuerui Cc: Will Deacon Cc: Yoshinori Sato Cc: Eugene Syromiatnikov Signed-off-by: Andrew Morton commit f4d1c32489117c9d38206a673d880d23d7d3bb8a Author: SoumishDas Date: Tue Mar 25 23:43:25 2025 +0530 mm: add kernel-doc comment for free_pgd_range() Provide kernel-doc for free_pgd_range() so it's easier to understand what the function does and how it is used. Link: https://lkml.kernel.org/r/20250325181325.5774-1-soumish.das@gmail.com Signed-off-by: SoumishDas Signed-off-by: Andrew Morton commit ec9827cd28b13b88517812eb08b13d0ed97ae8f1 Author: Kemeng Shi Date: Wed Mar 26 00:25:28 2025 +0800 mm: swap: replace cluster_swap_free_nr() with swap_entries_put_[map/cache]() Replace cluster_swap_free_nr() with swap_entries_put_[map/cache]() to remove repeat code and leverage batch-remove for entries with last flag. After removing cluster_swap_free_nr, only functions with "_nr" suffix could free entries spanning cross clusters. Add corresponding description in comment of swap_entries_put_map_nr() as is first function with "_nr" suffix and have a non-suffix variant function swap_entries_put_map(). Link: https://lkml.kernel.org/r/20250325162528.68385-9-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit d4f8000bd6b0cc33c9dddd369e72a13c4c080cb1 Author: Kemeng Shi Date: Wed Mar 26 00:25:27 2025 +0800 mm: swap: factor out helper to drop cache of entries within a single cluster Factor out helper swap_entries_put_cache() from put_swap_folio() to serve as a general-purpose routine for dropping cache flag of entries within a single cluster. Link: https://lkml.kernel.org/r/20250325162528.68385-8-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit 4d71d9062dd7b2ace56f2351b9f3f06e6c0acf81 Author: Kemeng Shi Date: Wed Mar 26 00:25:26 2025 +0800 mm: swap: free each cluster individually in swap_entries_put_map_nr() 1. Factor out general swap_entries_put_map() helper to drop entries belonging to one cluster. If entries are last map, free entries in batch, otherwise put entries with cluster lock acquired and released only once. 2. Iterate and call swap_entries_put_map() for each cluster in swap_entries_put_nr() to leverage batch-remove for last map belonging to one cluster and reduce lock acquire/release in fallback case. 3. As swap_entries_put_nr() won't handle SWAP_HSA_CACHE drop, rename it to swap_entries_put_map_nr(). 4. As we won't drop each entry invidually with swap_entry_put() now, do reclaim in free_swap_and_cache_nr() because swap_entries_put_map_nr() is general routine to drop reference and the relcaim work should only be done in free_swap_and_cache_nr(). Remove stale comment accordingly. Link: https://lkml.kernel.org/r/20250325162528.68385-7-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit f2252acf444764e7de7380201c518ee5ab6fd9da Author: Kemeng Shi Date: Wed Mar 26 00:25:25 2025 +0800 mm: swap: drop last SWAP_MAP_SHMEM flag in batch in swap_entries_put_nr() The SWAP_MAP_SHMEM indicates last map from shmem. Therefore we can drop SWAP_MAP_SHMEM in batch in similar way to drop last ref count in batch. Link: https://lkml.kernel.org/r/20250325162528.68385-6-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit 46e0ab2c62067a8d5e62ae90088b1743af83725d Author: Kemeng Shi Date: Wed Mar 26 00:25:24 2025 +0800 mm: swap: use swap_entries_free() drop last ref count in swap_entries_put_nr() Use swap_entries_free() to directly free swap entries when the swap entries are not cached and referenced, without needing to set swap entries to set intermediate SWAP_HAS_CACHE state. Link: https://lkml.kernel.org/r/20250325162528.68385-5-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit 835b868878d0127bd29b8c0009dc424a63dadffb Author: Kemeng Shi Date: Wed Mar 26 00:25:23 2025 +0800 mm: swap: use swap_entries_free() to free swap entry in swap_entry_put_locked() In swap_entry_put_locked(), we will set slot to SWAP_HAS_CACHE before using swap_entries_free() to do actual swap entry freeing. This introduce an unnecessary intermediate state. By using swap_entries_free() in swap_entry_put_locked(), we can eliminate the need to set slot to SWAP_HAS_CACHE. This change would make the behavior of swap_entry_put_locked() more consistent with other put() operations which will do actual free work after put last reference. Link: https://lkml.kernel.org/r/20250325162528.68385-4-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Kairui Song Reviewed-by: Baoquan He Signed-off-by: Andrew Morton commit 64944ef6a13e774546eb7635bdd26ef963335a41 Author: Kemeng Shi Date: Wed Mar 26 00:25:22 2025 +0800 mm: swap: enable swap_entry_range_free() to drop any kind of last ref The original VM_BUG_ON only allows swap_entry_range_free() to drop last SWAP_HAS_CACHE ref. By allowing other kind of last ref in VM_BUG_ON, swap_entry_range_free() could be a more general-purpose function able to handle all kind of last ref. Following thi change, also rename swap_entry_range_free() to swap_entries_free() and update it's comment accordingly. This is a preparation to use swap_entries_free() to drop more kind of last ref other than SWAP_HAS_CACHE. [shikemeng@huaweicloud.com: add __maybe_unused attribute for swap_is_last_ref() and update comment] Link: https://lkml.kernel.org/r/20250410153908.612984-1-shikemeng@huaweicloud.com Link: https://lkml.kernel.org/r/20250325162528.68385-3-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Tested-by: SeongJae Park Cc: Kairui Song Signed-off-by: Andrew Morton commit 9c1c38bcdc9215f0bd231591b662bd0fbe8b7045 Author: Kemeng Shi Date: Wed Mar 26 00:25:21 2025 +0800 mm: swap: rename __swap_[entry/entries]_free[_locked] to swap_[entry/entries]_put[_locked] Patch series "Minor cleanups and improvements to swap freeing code", v4. This series contains some cleanups and improvements which are made during learning swapfile. Here is a summary of the changes: 1. Function naming improvments. - Use "put" instead of "free" to name functions which only do actual free when count drops to zero. - Use "entry" to name function only frees one swap slot. Use "entries" to name function could may free multi swap slots within one cluster. Use "_nr" suffix to name function which could free multi swap slots spanning cross multi clusters. 2. Eliminate the need to set swap slot to intermediate SWAP_HAS_CACHE value before do actual free by using swap_entry_range_free() 3. Add helpers swap_entries_put_map() and swap_entries_put_cache() as a general-purpose routine to free swap entries within a single cluster which will try batch-remove first and fallback to put eatch entry indvidually with cluster lock acquired/released only once. By using these helpers, we could remove repeated code, levarage batch-remove in more cases and aoivd to acquire/release cluster lock for each single swap entry. This patch (of 8): In __swap_entry_free[_locked] and __swap_entries_free, we decrease count first and only free swap entry if count drops to zero. This behavior is more akin to a put() operation rather than a free() operation. Therefore, rename these functions with "put" instead of "free". Additionally, add "_nr" suffix to swap_entries_put to indicate the input range may span swap clusters. Link: https://lkml.kernel.org/r/20250325162528.68385-1-shikemeng@huaweicloud.com Link: https://lkml.kernel.org/r/20250325162528.68385-2-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: Tim Chen Reviewed-by: Baoquan He Cc: Kairui Song Signed-off-by: Andrew Morton commit ac26920d58224a6d5c78ad3ff0d58fd7faa775c7 Author: Shakeel Butt Date: Thu Apr 3 18:39:13 2025 -0700 memcg: manually inline replace_stock_objcg The replace_stock_objcg() is being called by only refill_obj_stock, so manually inline it. Link: https://lkml.kernel.org/r/20250404013913.1663035-10-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit bc730030f956fe83e94625c546c30ce6bae32d6b Author: Vlastimil Babka Date: Thu Apr 3 18:39:12 2025 -0700 memcg: combine slab obj stock charging and accounting When handing slab objects, we use obj_cgroup_[un]charge() for (un)charging and mod_objcg_state() to account NR_SLAB_[UN]RECLAIMABLE_B. All these operations use the percpu stock for performance. However with the calls being separate, the stock_lock is taken twice in each case. By refactoring the code, we can turn mod_objcg_state() into __account_obj_stock() which is called on a stock that's already locked and validated. On the charging side we can call this function from consume_obj_stock() when it succeeds, and refill_obj_stock() in the fallback. We just expand parameters of these functions as necessary. The uncharge side from __memcg_slab_free_hook() is just the call to refill_obj_stock(). Other callers of obj_cgroup_[un]charge() (i.e. not slab) simply pass the extra parameters as NULL/zeroes to skip the __account_obj_stock() operation. In __memcg_slab_post_alloc_hook() we now charge each object separately, but that's not a problem as we did call mod_objcg_state() for each object separately, and most allocations are non-bulk anyway. This could be improved by batching all operations until slab_pgdat(slab) changes. Some preliminary benchmarking with a kfree(kmalloc()) loop of 10M iterations with/without __GFP_ACCOUNT: Before the patch: kmalloc/kfree !memcg: 581390144 cycles kmalloc/kfree memcg: 783689984 cycles After the patch: kmalloc/kfree memcg: 658723808 cycles More than half of the overhead of __GFP_ACCOUNT relative to non-accounted case seems eliminated. Link: https://lkml.kernel.org/r/20250404013913.1663035-9-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Signed-off-by: Vlastimil Babka Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 42a1910cfd23c46307a000a81127e02df247284c Author: Shakeel Butt Date: Thu Apr 3 18:39:11 2025 -0700 memcg: use __mod_memcg_state in drain_obj_stock For non-PREEMPT_RT kernels, drain_obj_stock() is always called with irq disabled, so we can use __mod_memcg_state() instead of mod_memcg_state(). For PREEMPT_RT, we need to add memcg_stats_[un]lock in __mod_memcg_state(). Link: https://lkml.kernel.org/r/20250404013913.1663035-8-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Sebastian Andrzej Siewior Reviewed-by: Roman Gushchin Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit ae51c775aa2b1fd4fbaf781740ec8762292bec3a Author: Shakeel Butt Date: Thu Apr 3 18:39:10 2025 -0700 memcg: do obj_cgroup_put inside drain_obj_stock Previously we could not call obj_cgroup_put() inside the local lock because on the put on the last reference, the release function obj_cgroup_release() may try to re-acquire the local lock. However that chain has been broken. Now simply do obj_cgroup_put() inside drain_obj_stock() instead of returning the old objcg. Link: https://lkml.kernel.org/r/20250404013913.1663035-7-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit b6d0471117daec360bad2b881c1e2d0f4d2c4d3b Author: Shakeel Butt Date: Thu Apr 3 18:39:09 2025 -0700 memcg: no refilling stock from obj_cgroup_release obj_cgroup_release is called when all the references to the objcg have been released i.e. no more memory objects are pointing to it. Most probably objcg->memcg will be pointing to some ancestor memcg. In obj_cgroup_release(), the kernel calls obj_cgroup_uncharge_pages() which refills the local stock. There is no need to refill the local stock with some ancestor memcg and flush the local stock. Let's decouple obj_cgroup_release() from the local stock by uncharging instead of refilling. One additional benefit of this change is that it removes the requirement to only call obj_cgroup_put() outside of local_lock. Link: https://lkml.kernel.org/r/20250404013913.1663035-6-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit cbc091441d3adce9a1fbcd0a0a84bd6abe077a5b Author: Shakeel Butt Date: Thu Apr 3 18:39:08 2025 -0700 memcg: manually inline __refill_stock There are no more multiple callers of __refill_stock(), so simply inline it to refill_stock(). Link: https://lkml.kernel.org/r/20250404013913.1663035-5-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 89f342af660332656bbade4cc8a919a40674ac41 Author: Shakeel Butt Date: Thu Apr 3 18:39:07 2025 -0700 memcg: introduce memcg_uncharge At multiple places in memcontrol.c, the memory and memsw page counters are being uncharged. This is error-prone. Let's move the functionality to a newly introduced memcg_uncharge and call it from all those places. Link: https://lkml.kernel.org/r/20250404013913.1663035-4-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 65d2d15f41c603dc8f11ff0d1bcda2dd847a65b5 Author: Shakeel Butt Date: Thu Apr 3 18:39:06 2025 -0700 memcg: decouple drain_obj_stock from local stock Currently drain_obj_stock() can potentially call __refill_stock which accesses local cpu stock and thus requires memcg stock's local_lock. However if we look at the code paths leading to drain_obj_stock(), there is never a good reason to refill the memcg stock at all from it. At the moment, drain_obj_stock can be called from reclaim, hotplug cpu teardown, mod_objcg_state() and refill_obj_stock(). For reclaim and hotplug there is no need to refill. For the other two paths, most probably the newly switched objcg would be used in near future and thus no need to refill stock with the older objcg. In addition, __refill_stock() from drain_obj_stock() happens on rare cases, so performance is not really an issue. Let's just uncharge directly instead of refill which will also decouple drain_obj_stock from local cpu stock and local_lock requirements. Link: https://lkml.kernel.org/r/20250404013913.1663035-3-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit e56fa8f5e108676393a363201819a094b0991b3c Author: Shakeel Butt Date: Thu Apr 3 18:39:05 2025 -0700 memcg: remove root memcg check from refill_stock refill_stock can not be called with root memcg, so there is no need to check it. Instead add a warning if root is ever passed to it. Link: https://lkml.kernel.org/r/20250404013913.1663035-1-shakeel.butt@linux.dev Link: https://lkml.kernel.org/r/20250404013913.1663035-2-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Sebastian Andrzej Siewior Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit aa8d89d1472b010cbcda7288a4da76e4852a260d Author: Shakeel Butt Date: Wed Apr 2 22:33:26 2025 -0700 memcg: vmalloc: simplify MEMCG_VMALLOC updates The vmalloc region can either be charged to a single memcg or none. At the moment kernel traverses all the pages backing the vmalloc region to update the MEMCG_VMALLOC stat. However there is no need to look at all the pages as all those pages will be charged to a single memcg or none. Simplify the MEMCG_VMALLOC update by just looking at the first page of the vmalloc region. [shakeel.butt@linux.dev: add comment] Link: https://lkml.kernel.org/r/bmlkdbqgwboyqrnxyom7n52fjmo76ux77jhqw5odc6c6dfon3h@zdylwtmlywbt Link: https://lkml.kernel.org/r/20250403053326.26860-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Yosry Ahmed Cc: Johannes Weiner Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 98c9389042f4d1e6aa73fbaf79e2e962c9497fc5 Author: Michal Clapinski Date: Fri Apr 4 13:11:03 2025 +0200 mm/compaction: reduce the difference between low and high watermarks Reduce the diff between low and high watermarks when compaction proactiveness is set to high. This allows users who set the proactiveness really high to have more stable fragmentation score over time. Link: https://lkml.kernel.org/r/20250404111103.1994507-3-mclapinski@google.com Signed-off-by: Michal Clapinski Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit bb317f00b9b7f59de5a2ef512a76a1ae285bd23f Author: Michal Clapinski Date: Fri Apr 4 13:11:02 2025 +0200 mm/compaction: remove low watermark cap for proactive compaction Patch series "mm/compaction: allow more aggressive proactive compaction", v4. Our goal is to keep memory usage of a VM low on the host. For that reason, we use free page reporting which by default reports free pages of order 9 and larger to the host to be freed. The feature works well only if the memory in the guest is not fragmented below pages of order 9. Proactive compaction can be reused to achieve defragmentation after some parameter tweaking. When the fragmentation score (lower is better) gets larger than the high watermark, proactive compaction kicks in. Compaction stops when the score goes below the low watermark (or no progress is made and backoff kicks in). Let's define the difference between high and low watermarks as leeway. Before these changes, the minimum possible value for low watermark was 5 and the leeway was hardcoded to 10 (so minimum possible value for high watermark was 15). To test this, I created a VM with 19GB of memory and free page reporting enabled. The VM was ~idle. I meassured the memory usage from inside the guest (/proc/meminfo) and from the host (provided by the hypervisor). Before: https://drive.google.com/file/d/1Xw23lRry_PgEH3f6QRnSGvoHh2u9UHyI/view?usp=sharing After: https://drive.google.com/file/d/1wMhpIzepx6t44F70yCPA50n1S5V2AT-a/view?usp=sharing This patch (of 2): Previously a min cap of 5 has been set in the commit introducing proactive compaction. This was to make sure users don't hurt themselves by setting the proactiveness to 100 and making their system unresponsive. But the compaction mechanism has a backoff mechanism that will sleep for 30s if no progress is made, so I don't see a significant risk here. My system (19GB of memory) has been perfectly fine with both watermarks hardcoded to 0. Link: https://lkml.kernel.org/r/20250404111103.1994507-1-mclapinski@google.com Link: https://lkml.kernel.org/r/20250404111103.1994507-2-mclapinski@google.com Signed-off-by: Michal Clapinski Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton commit 3a531a9939623e13cf798e9ef5e7edd3e74fe733 Author: Ye Liu Date: Fri Mar 28 09:20:31 2025 +0800 mm/page_alloc: simplify free_page_is_bad by removing free_page_is_bad_report Refactor free_page_is_bad() to call bad_page() directly, removing the intermediate free_page_is_bad_report(). This reduces unnecessary indirection, improving code clarity and maintainability without changing functionality. Link: https://lkml.kernel.org/r/20250328012031.1204993-1-ye.liu@linux.dev Signed-off-by: Ye Liu Reviewed-by: Anshuman Khandual Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton commit cf42d4cccf0d01e375175393776a16dc47b9996f Author: Sergey Senozhatsky Date: Thu Mar 27 10:58:09 2025 +0900 zram: modernize writeback interface The writeback interface supports a page_index=N parameter which performs writeback of the given page. Since we rarely need to writeback just one single page, the typical use case involves a number of writeback calls, each performing writeback of one page: echo page_index=100 > zram0/writeback ... echo page_index=200 > zram0/writeback echo page_index=500 > zram0/writeback ... echo page_index=700 > zram0/writeback One obvious downside of this is that it increases the number of syscalls. Less obvious, but a significantly more important downside, is that when given only one page to post-process zram cannot perform an optimal target selection. This becomes a critical limitation when writeback_limit is enabled, because under writeback_limit we want to guarantee the highest memory savings hence we first need to writeback pages that release the highest amount of zsmalloc pool memory. This patch adds page_indexes=LOW-HIGH parameter to the writeback interface: echo page_indexes=100-200 page_indexes=500-700 > zram0/writeback This gives zram a chance to apply an optimal target selection strategy on each iteration of the writeback loop. We also now permit multiple page_index parameters per call (previously zram would recognize only one page_index) and a mix or single pages and page ranges: echo page_index=42 page_index=99 page_indexes=100-200 \ page_indexes=500-700 > zram0/writeback Apart from that the patch also unifies parameters passing and resembles other "modern" zram device attributes (e.g. recompression), while the old interface used a mixed scheme: values-less parameters for mode and a key=value format for page_index. We still support the "old" value-less format for compatibility reasons. [senozhatsky@chromium.org: simplify parse_page_index() range checks, per Brian] nk: https://lkml.kernel.org/r/20250404015327.2427684-1-senozhatsky@chromium.org [sozhatsky@chromium.org: fix uninitialized variable in zram_writeback_slots(), per Dan] nk: https://lkml.kernel.org/r/20250409112611.1154282-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20250327015818.4148660-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reviewed-by: Brian Geffon Cc: Minchan Kim Cc: Richard Chang Cc: Sergey Senozhatsky Cc: Dan Carpenter Signed-off-by: Andrew Morton commit 0bf19a357e0eaf03e757ac9482c45a797e40157a Author: Siddarth G Date: Thu Apr 3 15:43:45 2025 +0530 selftests/mm: convert page_size to unsigned long Cppcheck warning: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. This patch changes the type of page_size from 'unsigned int' to 'unsigned long' instead of using ULL suffixes. Changing hpage_size to 'unsigned long' was considered, but since gethugepage() expects an int, this change was avoided. Link: https://lkml.kernel.org/r/20250403101345.29226-1-siddarthsgml@gmail.com Signed-off-by: Siddarth G Reported-by: David Binderman Closes: https://lore.kernel.org/all/AS8PR02MB10217315060BBFDB21F19643E9CA62@AS8PR02MB10217.eurprd02.prod.outlook.com/ Signed-off-by: Andrew Morton commit 26d4d18b79659054e451be9487937e31e63d0853 Author: Ye Liu Date: Tue Mar 25 15:38:03 2025 +0800 mm/show_mem: optimize si_meminfo_node by reducing redundant code Refactors the si_meminfo_node() function by reducing redundant code and improving readability. Moved the calculation of managed_pages inside the existing loop that processes pgdat->node_zones, eliminating the need for a separate loop. Simplified the logic by removing unnecessary preprocessor conditionals. Ensured that both totalram, totalhigh, and other memory statistics are consistently set without duplication. This change results in cleaner and more efficient code without altering functionality. Link: https://lkml.kernel.org/r/20250325073803.852594-1-ye.liu@linux.dev Signed-off-by: Ye Liu Acked-by: Mike Rapoport (Microsoft) Reviewed-by: Harry Yoo Signed-off-by: Andrew Morton commit 2e976567233228ff928c2405f7e03ebb7fb7aa50 Author: Ignacio Encinas Date: Mon Mar 31 21:57:05 2025 +0200 mm: annotate data race in update_hiwater_rss mm_struct.hiwater_rss can be accessed concurrently without proper synchronization as reported by KCSAN. This data race is benign as it only affects accounting information. Annotate it with data_race() to make KCSAN happy. Link: https://lkml.kernel.org/r/20250331-mm-maxrss-data-race-v2-1-cf958e6205bf@iencinas.com Signed-off-by: Ignacio Encinas Reported-by: syzbot+419c4b42acc36c420ad3@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67e3390c.050a0220.1ec46.0001.GAE@google.com/ Suggested-by: Lorenzo Stoakes Acked-by: Pedro Falcato Cc: Liam Howlett Signed-off-by: Andrew Morton commit b4c829fa4d56f3b566bbbb41c9a8ff0c83ae84c5 Author: Vishal Moola (Oracle) Date: Mon Mar 31 19:10:25 2025 -0700 mm/compaction: use folio in hugetlb pathway Use a folio in the hugetlb pathway during the compaction migrate-able pageblock scan. This removes a call to compound_head(). Link: https://lkml.kernel.org/r/20250401021025.637333-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Oscar Salvador Reviewed-by: Zi Yan Cc: Muchun Song Signed-off-by: Andrew Morton commit 6e3d1b1813c77876e3b354ba94b0f9e1cc23e19f Author: Gregory Price Date: Mon Jan 27 10:34:05 2025 -0500 acpi,srat: give memory block size advice based on CFMWS alignment Capacity is stranded when CFMWS regions are not aligned to block size. On x86, block size increases with capacity (2G blocks @ 64G capacity). Use CFMWS base/size to report memory block size alignment advice. Link: https://lkml.kernel.org/r/20250127153405.3379117-4-gourry@gourry.net Signed-off-by: Gregory Price Suggested-by: Dan Williams Acked-by: Mike Rapoport (Microsoft) Acked-by: David Hildenbrand Acked-by: Dan Williams Tested-by: Fan Ni Acked-by: Rafael J. Wysocki Reviewed-by: Ira Weiny Acked-by: Oscar Salvador Cc: Alison Schofield Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Bruno Faccini Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Haibo Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joanthan Cameron Cc: Len Brown Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Robert Richter Cc: Thomas Gleinxer Signed-off-by: Andrew Morton commit b1143537098b33affd4e50cec2c10e4b3858d93c Author: Gregory Price Date: Mon Jan 27 10:34:04 2025 -0500 x86: probe memory block size advisement value during mm init Systems with hotplug may provide an advisement value on what the memblock size should be. Probe this value when the rest of the configuration values are considered. The new heuristic is as follows 1) set_memory_block_size_order value if already set (cmdline param) 2) minimum block size if memory is less than large block limit 3) if no hotplug advice: Max block size if system is bare-metal, otherwise use end of memory alignment. 4) if hotplug advice: lesser of advice and end of memory alignment. Convert to cpu_feature_enabled() while at it.[1] [1] https://lore.kernel.org/all/20241031103401.GBZyNdGQ-ZyXKyzC_z@fat_crate.local/ Link: https://lkml.kernel.org/r/20250127153405.3379117-3-gourry@gourry.net Signed-off-by: Gregory Price Suggested-by: Borislav Petkov Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Hansen Acked-by: Mike Rapoport (Microsoft) Acked-by: Dan Williams Tested-by: Fan Ni Reviewed-by: Ira Weiny Acked-by: Oscar Salvador Cc: Alison Schofield Cc: Andy Lutomirski Cc: Bruno Faccini Cc: Dave Jiang Cc: Greg Kroah-Hartman Cc: Haibo Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joanthan Cameron Cc: Len Brown Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Robert Richter Cc: Thomas Gleinxer Signed-off-by: Andrew Morton commit 737e9d021993c99377bb61e762c0d6945a37615b Author: Gregory Price Date: Mon Jan 27 10:34:03 2025 -0500 memory: implement memory_block_advise/probe_max_size Patch series "memory,x86,acpi: hotplug memory alignment advisement", v8. When physical address regions are not aligned to memory block size, the misaligned portion is lost (stranded capacity). Block size (min/max/selected) is architecture defined. Most architectures tend to use the minimum block size or some simplistic heurist. On x86, memory block size increases up to 2GB, and is otherwise fitted to the alignment of non-hotplug (i.e. not special purpose memory). CXL exposes its memory for management through the ACPI CEDT (CXL Early Detection Table) in a field called the CXL Fixed Memory Window. Per the CXL specification, this memory must be aligned to at least 256MB. When a CFMW aligns on a size less than the block size, this causes a loss of up to 2GB per CFMW on x86. It is not uncommon for CFMW to be allocated per-device - though this behavior is BIOS defined. This patch set provides 3 things: 1) implement advise/query functions in driverse/base/memory.c to report/query architecture agnostic hotplug block alignment advice. 2) update x86 memblock size logic to consider the hotplug advice 3) add code in acpi/numa/srat.c to report CFMW alignment advice The advisement interfaces are design to be called during arch_init code prior to allocator and smp_init. start_kernel will call these through setup_arch() (via acpi and mm/init_64.c on x86), which occurs prior to mm_core_init and smp_init - so no need for atomics. There's an attempt to signal callers to advise() that query has already occurred, but this is predicated on the notion that query actually occurs (which presently only happens on the x86 arch). This is to assist debugging future users. Otherwise, the advise() call has been marked __init to help static discovery of bad call times. Once query is called the first time, it will always return the same value. Interfaces return -EBUSY and 0 respectively on systems without hotplug. This patch (of 3): Hotplug memory sources may have opinions on what the memblock size should be - usually for alignment purposes. For example, CXL memory extents can be 256MB with a matching alignment. If this size/alignment is smaller than the block size, it can result in stranded capacity. Implement memory_block_advise_max_size for use prior to allocator init, for software to advise the system on the max block size. Implement memory_block_probe_max_size for use by arch init code to calculate the best block size. Use of advice is architecture defined. The probe value can never change after first probe. Calls to advise after probe will return -EBUSY to aid debugging. On systems without hotplug, always return -ENODEV and 0 respectively. Link: https://lkml.kernel.org/r/20250127153405.3379117-1-gourry@gourry.net Link: https://lkml.kernel.org/r/20250127153405.3379117-2-gourry@gourry.net Signed-off-by: Gregory Price Suggested-by: Ira Weiny Acked-by: David Hildenbrand Acked-by: Mike Rapoport (Microsoft) Acked-by: Dan Williams Tested-by: Fan Ni Reviewed-by: Ira Weiny Acked-by: Oscar Salvador Cc: Alison Schofield Cc: Andy Lutomirski Cc: Borislav Betkov Cc: Bruno Faccini Cc: Dave Hansen Cc: Dave Jiang Cc: Greg Kroah-Hartman Cc: Haibo Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joanthan Cameron Cc: Len Brown Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Robert Richter Cc: Thomas Gleinxer Signed-off-by: Andrew Morton commit cd348c5e6af3b4220eb37a08fdaf9c924a2e1c19 Author: Songtang Liu Date: Wed Apr 2 03:41:16 2025 -0400 mm: page_alloc: remove redundant READ_ONCE In the current code, batch is a local variable, and it cannot be concurrently modified. It's unnecessary to use READ_ONCE here, so remove it. Link: https://lkml.kernel.org/r/CAA=HWd1kn01ym8YuVFuAqK2Ggq3itEGkqX8T6eCXs_C7tiv-Jw@mail.gmail.com Fixes: 51a755c56dc0 ("mm: tune PCP high automatically") Signed-off-by: Songtang Liu Reviewed-by: Qi Zheng Reviewed-by: Huang Ying Reviewed-by: Anshuman Khandual Reviewed-by: Pankaj Gupta Reviewed-by: Oscar Salvador Reviewed-by: Vishal Moola (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit a75ffa26122bba4a3fa9372aa13b32d7a5590425 Author: Michal Hocko Date: Wed Apr 2 11:01:17 2025 +0200 memcg, oom: do not bypass oom killer for dying tasks 7775face2079 ("memcg: killed threads should not invoke memcg OOM killer") has added a bypass of the oom killer path for dying threads because a very specific workload (described in the changelog) could hit "no killable tasks" path. This itself is not fatal condition but it could be annoying if this was a common case. On the other hand the bypass has some issues on its own. Without triggering oom killer we won't be able to trigger async oom reclaim (oom_reaper) which can operate on killed tasks as well as long as they still have their mm available. This could be the case during futex cleanup when the memory as pointed out by Johannes in [1]. The said case is still not fully understood but let's drop this bypass that was mostly driven by an artificial workload and allow dying tasks to go into oom path. This will make the code easier to reason about and also help corner cases where oom_reaper could help to release memory. Link: https://lore.kernel.org/all/20241212183012.GB1026@cmpxchg.org/T/#u [1] Link: https://lkml.kernel.org/r/20250402090117.130245-1-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Johannes Weiner Suggested-by: Johannes Weiner Acked-by: Shakeel Butt Acked-by: David Rientjes Cc: Muchun Song Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 56e5a103a721d0ef139bba7ff3d3ada6c8217d5b Author: Nhat Pham Date: Wed Apr 2 13:44:16 2025 -0700 zsmalloc: prefer the the original page's node for compressed data Currently, zsmalloc, zswap's and zram's backend memory allocator, does not enforce any policy for the allocation of memory for the compressed data, instead just adopting the memory policy of the task entering reclaim, or the default policy (prefer local node) if no such policy is specified. This can lead to several pathological behaviors in multi-node NUMA systems: 1. Systems with CXL-based memory tiering can encounter the following inversion with zswap/zram: the coldest pages demoted to the CXL tier can return to the high tier when they are reclaimed to compressed swap, creating memory pressure on the high tier. 2. Consider a direct reclaimer scanning nodes in order of allocation preference. If it ventures into remote nodes, the memory it compresses there should stay there. Trying to shift those contents over to the reclaiming thread's preferred node further *increases* its local pressure, and provoking more spills. The remote node is also the most likely to refault this data again. This undesirable behavior was pointed out by Johannes Weiner in [1]. 3. For zswap writeback, the zswap entries are organized in node-specific LRUs, based on the node placement of the original pages, allowing for targeted zswap writeback for specific nodes. However, the compressed data of a zswap entry can be placed on a different node from the LRU it is placed on. This means that reclaim targeted at one node might not free up memory used for zswap entries in that node, but instead reclaiming memory in a different node. All of these issues will be resolved if the compressed data go to the same node as the original page. This patch encourages this behavior by having zswap and zram pass the node of the original page to zsmalloc, and have zsmalloc prefer the specified node if we need to allocate new (zs)pages for the compressed data. Note that we are not strictly binding the allocation to the preferred node. We still allow the allocation to fall back to other nodes when the preferred node is full, or if we have zspages with slots available on a different node. This is OK, and still a strict improvement over the status quo: 1. On a system with demotion enabled, we will generally prefer demotions over compressed swapping, and only swap when pages have already gone to the lowest tier. This patch should achieve the desired effect for the most part. 2. If the preferred node is out of memory, letting the compressed data going to other nodes can be better than the alternative (OOMs, keeping cold memory unreclaimed, disk swapping, etc.). 3. If the allocation go to a separate node because we have a zspage with slots available, at least we're not creating extra immediate memory pressure (since the space is already allocated). 3. While there can be mixings, we generally reclaim pages in same-node batches, which encourage zspage grouping that is more likely to go to the right node. 4. A strict binding would require partitioning zsmalloc by node, which is more complicated, and more prone to regression, since it reduces the storage density of zsmalloc. We need to evaluate the tradeoff and benchmark carefully before adopting such an involved solution. [1]: https://lore.kernel.org/linux-mm/20250331165306.GC2110528@cmpxchg.org/ [senozhatsky@chromium.org: coding-style fixes] Link: https://lkml.kernel.org/r/mnvexa7kseswglcqbhlot4zg3b3la2ypv2rimdl5mh5glbmhvz@wi6bgqn47hge Link: https://lkml.kernel.org/r/20250402204416.3435994-1-nphamcs@gmail.com Signed-off-by: Nhat Pham Suggested-by: Gregory Price Acked-by: Dan Williams Reviewed-by: Chengming Zhou Acked-by: Sergey Senozhatsky [zram, zsmalloc] Acked-by: Johannes Weiner Acked-by: Yosry Ahmed [zswap/zsmalloc] Cc: "Huang, Ying" Cc: Joanthan Cameron Cc: Minchan Kim Cc: SeongJae Park Signed-off-by: Andrew Morton commit 2355153ea8185e7deaf9ce728716dadb707ef59f Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:10 2025 +0100 mm: delete thp_nr_pages() All callers now use folio_nr_pages(). Delete this wrapper. Link: https://lkml.kernel.org/r/20250402210612.2444135-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 41e422a898da69e903a846dfb2b0c0ff62abc3cd Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:09 2025 +0100 filemap: remove readahead_page_batch() This function has no more callers; delete it. Link: https://lkml.kernel.org/r/20250402210612.2444135-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 8dfc8cbf7b07da172b3a4c8bea064e84fbfa5d56 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:08 2025 +0100 filemap: convert __readahead_batch() to use a folio Extract folios from i_mapping, not pages. Removes a hidden call to compound_head(), a use of thp_nr_pages() and an unnecessary assertion that we didn't find a tail page in the page cache. Link: https://lkml.kernel.org/r/20250402210612.2444135-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 9c532d79082f9f2e58a45f2e92020dda65b7dedd Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:07 2025 +0100 filemap: remove find_subpage() All users of this function now call folio_file_page() instead. Delete it. Link: https://lkml.kernel.org/r/20250402210612.2444135-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 70d1be00b49a6bbf0b60c5b7f70d57d75bbcd4b7 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:06 2025 +0100 iov_iter: convert iov_iter_extract_xarray_pages() to use folios ITER_XARRAY is exclusively used with xarrays that contain folios, not pages, so extract folio pointers from it, not page pointers. Removes a use of find_subpage(). Link: https://lkml.kernel.org/r/20250402210612.2444135-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit b57f4f4f186d728a1b484be1f214f17d843b6a24 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:05 2025 +0100 iov_iter: convert iter_xarray_populate_pages() to use folios ITER_XARRAY is exclusively used with xarrays that contain folios, not pages, so extract folio pointers from it, not page pointers. Removes a hidden call to compound_head() and a use of find_subpage(). Link: https://lkml.kernel.org/r/20250402210612.2444135-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit a55139579082e4bc9ea9b04003cb9f78c781e08b Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:04 2025 +0100 mm: remove offset_in_thp() All callers have been converted to call offset_in_folio(). Link: https://lkml.kernel.org/r/20250402210612.2444135-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit c09b997342bcd1b3c2b63c6ff6fecf037a68beff Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 22:06:03 2025 +0100 filemap: remove readahead_page() Patch series "Misc folio patches for 6.16". Remove a few APIs that we've converted everybody from using. I also found a few places that extract a page pointer from i_pages, which will be an invalid thing to do when we separate pages from folios. This patch (of 8): All filesystems have now been converted to call readahead_folio() so we can delete this wrapper. Link: https://lkml.kernel.org/r/20250402210612.2444135-1-willy@infradead.org Link: https://lkml.kernel.org/r/20250402210612.2444135-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 5071ea3d7b3d1e9660524374083a929a6885d78a Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:05 2025 +0100 arch: remove mk_pmd() There are now no callers of mk_huge_pmd() and mk_pmd(). Remove them. Link: https://lkml.kernel.org/r/20250402181709.2386022-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit e3981db444a0a18d350d9f92e3f2e8d489b54211 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:04 2025 +0100 mm: add folio_mk_pmd() Removes five conversions from folio to page. Also removes both callers of mk_pmd() that aren't part of mk_huge_pmd(), getting us a step closer to removing the confusion between mk_pmd(), mk_huge_pmd() and pmd_mkhuge(). Link: https://lkml.kernel.org/r/20250402181709.2386022-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit 7b7aa8a4adb62e3c3312d1c6086891014addc567 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:03 2025 +0100 mm: remove mk_huge_pte() The only remaining user of mk_huge_pte() is the debug code, so remove the API and replace its use with pfn_pte() which lets us remove the conversion to a page first. We should always call arch_make_huge_pte() to turn this PTE into a huge PTE before operating on it with huge_pte_mkdirty() etc. Link: https://lkml.kernel.org/r/20250402181709.2386022-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit e06fa168c342c8b937cd72c89582e6af008b204b Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:02 2025 +0100 hugetlb: simplify make_huge_pte() mk_huge_pte() is a bad API. Despite its name, it creates a normal PTE which is later transformed into a huge PTE by arch_make_huge_pte(). So replace the page argument with a folio argument and call folio_mk_pte() instead. Then, because we now know this is a regular PTE rather than a huge one, use pte_mkdirty() instead of huge_pte_mkdirty() (and similar functions). Link: https://lkml.kernel.org/r/20250402181709.2386022-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Zi Yan Cc: Muchun Song Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit deb8d4d28e4d05c4ecfc6e242c0a53d49e119224 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:01 2025 +0100 mm: add folio_mk_pte() Remove a cast from folio to page in four callers of mk_pte(). Link: https://lkml.kernel.org/r/20250402181709.2386022-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Cc: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit 4ec492a628d897806bb6dc13b1c257c4e06eb1cf Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:17:00 2025 +0100 mm: make mk_pte() definition unconditional All architectures now use the common mk_pte() definition, so we can remove the condition. Link: https://lkml.kernel.org/r/20250402181709.2386022-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Cc: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit 669eec68f680be2b530e2ea96cb2f519cb0b3336 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:16:59 2025 +0100 um: remove custom definition of mk_pte() Move the pfn_pte() definitions from the 2level and 4level files to the generic pgtable.h and delete the custom definition of mk_pte() so that we use the central definition. Link: https://lkml.kernel.org/r/20250402181709.2386022-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Zi Yan Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Dave Hansen Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Muchun Song Cc: Signed-off-by: Andrew Morton commit a03079e4eeb1031dd669394b34e341cd3ff0e24b Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:16:58 2025 +0100 x86: remove custom definition of mk_pte() Move the shadow stack check to pfn_pte() which lets us use the common definition of mk_pte(). Link: https://lkml.kernel.org/r/20250402181709.2386022-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Dave Hansen Cc: Zi Yan Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Anton Ivanov Cc: David Hildenbrand Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit aec4417168594f89ea0854c7b06dc70cbeaa219c Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:16:57 2025 +0100 sparc32: remove custom definition of mk_pte() Instead of defining pfn_pte() in terms of mk_pte(), make pfn_pte() the base implementation. That lets us use the generic definition of mk_pte(). Link: https://lkml.kernel.org/r/20250402181709.2386022-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Zi Yan Cc: "David S. Miller" Cc: Andreas Larsson Cc: Alexander Gordeev Cc: Anton Ivanov Cc: Dave Hansen Cc: David Hildenbrand Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit cb5b13cd6c9237fe5ac978b22453eb3fa098a8d6 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:16:56 2025 +0100 mm: introduce a common definition of mk_pte() Most architectures simply call pfn_pte(). Centralise that as the normal definition and remove the definition of mk_pte() from the architectures which have either that exact definition or something similar. Link: https://lkml.kernel.org/r/20250402181709.2386022-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Geert Uytterhoeven # m68k Acked-by: David Hildenbrand Reviewed-by: Alexander Gordeev # s390 Cc: Zi Yan Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: "David S. Miller" Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit 4e92030c05dc351e62955ac1aba7233157f49b78 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 19:16:55 2025 +0100 mm: set the pte dirty if the folio is already dirty Patch series "Add folio_mk_pte()", v2. Today if you have a folio and want to create a PTE that points to the first page in it, you have to convert from a folio to a page. That's zero-cost today but will be more expensive in the future. I didn't want to add folio_mk_pte() to each architecture, and I didn't want to lose any optimisations that architectures have from their own implementation of mk_pte(). Fortunately, most architectures have by now turned their mk_pte() into a fairly bland variant of pfn_pte(), but s390 has a special optimisation that needs to be moved into generic code in the first patch. At the end of this patch set, we have mk_pte() and folio_mk_pte() in mm.h and each architecture only has to implement pfn_pte(). We've also eliminated mk_huge_pte(), mk_huge_pmd() and mk_pmd(). This patch (of 11): If the first access to a folio is a read that is then followed by a write, we can save a page fault. s390 implemented this in their mk_pte() in commit abf09bed3cce ("s390/mm: implement software dirty bits"), but other architectures can also benefit from this. Link: https://lkml.kernel.org/r/20250402181709.2386022-1-willy@infradead.org Link: https://lkml.kernel.org/r/20250402181709.2386022-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Reviewed-by: Alexander Gordeev # for s390 Cc: Zi Yan Cc: Andreas Larsson Cc: Anton Ivanov Cc: Dave Hansen Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Johannes Berg Cc: Muchun Song Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton commit f83f362d40ccceb647f7d80eb92206733d76a36b Author: Jinliang Zheng Date: Tue Apr 15 17:02:32 2025 +0800 mm: fix ratelimit_pages update error in dirty_ratio_handler() In dirty_ratio_handler(), vm_dirty_bytes must be set to zero before calling writeback_set_ratelimit(), as global_dirty_limits() always prioritizes the value of vm_dirty_bytes. It's domain_dirty_limits() that's relevant here, not node_dirty_ok: dirty_ratio_handler writeback_set_ratelimit global_dirty_limits(&dirty_thresh) <- ratelimit_pages based on dirty_thresh domain_dirty_limits if (bytes) <- bytes = vm_dirty_bytes <--------+ thresh = f1(bytes) <- prioritizes vm_dirty_bytes | else | thresh = f2(ratio) | ratelimit_pages = f3(dirty_thresh) | vm_dirty_bytes = 0 <- it's late! ---------------------+ This causes ratelimit_pages to still use the value calculated based on vm_dirty_bytes, which is wrong now. The impact visible to userspace is difficult to capture directly because there is no procfs/sysfs interface exported to user space. However, it will have a real impact on the balance of dirty pages. For example: 1. On default, we have vm_dirty_ratio=40, vm_dirty_bytes=0 2. echo 8192 > dirty_bytes, then vm_dirty_bytes=8192, vm_dirty_ratio=0, and ratelimit_pages is calculated based on vm_dirty_bytes now. 3. echo 20 > dirty_ratio, then since vm_dirty_bytes is not reset to zero when writeback_set_ratelimit() -> global_dirty_limits() -> domain_dirty_limits() is called, reallimit_pages is still calculated based on vm_dirty_bytes instead of vm_dirty_ratio. This does not conform to the actual intent of the user. Link: https://lkml.kernel.org/r/20250415090232.7544-1-alexjlzheng@tencent.com Fixes: 9d823e8f6b1b ("writeback: per task dirty rate limit") Signed-off-by: Jinliang Zheng Reviewed-by: MengEn Sun Cc: Andrea Righi Cc: Fenggaung Wu Cc: Jinliang Zheng Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 90fedb484379e65fde42782e3c555b9688f930c3 Merge: 82f2b0b97b36ee 75cb1cca2c8801 Author: Andrew Morton Date: Sun May 11 17:45:12 2025 -0700 Merge branch 'mm-hotfixes-stable' into mm-stable in order to successfully merge mm-unstable's "mm: add folio_mk_pte()", commit 155a1415088152d10e146d2c107f0d98d0e47ba9 Author: Jeff Layton Date: Sat May 3 15:59:36 2025 -0400 nfsd: remove legacy dprintks from GETATTR and STATFS codepaths Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 79641333fe02787f3b061297fc8244f9b96f9b83 Author: Jeff Layton Date: Sat May 3 15:59:35 2025 -0400 nfsd: remove legacy READDIR dprintks Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit fba13c06f0bd6a1ed543152100b584cec4c15cd9 Author: Jeff Layton Date: Sat May 3 15:59:34 2025 -0400 nfsd: remove dprintks for v2/3 RENAME events Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 6b6943fe2761c5a0a02bcd8a810d956b23186aa8 Author: Jeff Layton Date: Sat May 3 15:59:33 2025 -0400 nfsd: remove REMOVE/RMDIR dprintks Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 0dbe0171fa4b43334a2b030941f383ba3cde8404 Author: Jeff Layton Date: Sat May 3 15:59:32 2025 -0400 nfsd: remove old LINK dprintks Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 0e159f8ce9b31e57f5fb6b3cf3ca95e1e5a3ae47 Author: Jeff Layton Date: Sat May 3 15:59:31 2025 -0400 nfsd: remove old v2/3 SYMLINK dprintks Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit c242efc78862fc925f12f6ee6c01c8d4358515b2 Author: Jeff Layton Date: Sat May 3 15:59:30 2025 -0400 nfsd: remove old v2/3 create path dprintks Observability here is now covered by static tracepoints. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 0d885f7e7978f81f66e63ce325a2d9de4b41e654 Author: Jeff Layton Date: Sat May 3 15:59:29 2025 -0400 nfsd: add tracepoint for getattr and statfs events There isn't a common helper for getattrs, so add these into the protocol-specific helpers. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit a91bfc4571b4f15f3b01e3aa4df53db73622de15 Author: Jeff Layton Date: Sat May 3 15:59:28 2025 -0400 nfsd: add tracepoint to nfsd_readdir Observe the start of NFS READDIR operations. The NFS READDIR's count argument can be interesting when tuning a client's readdir behavior. However, the count argument is not passed to nfsd_readdir(). To properly capture the count argument, this tracepoint must appear in each proc function before the nfsd_readdir() call. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b52f2a79fb39eeb1f23d8932cf6692dadf6c9647 Author: Jeff Layton Date: Sat May 3 15:59:27 2025 -0400 nfsd: add tracepoint to nfsd_rename Observe the start of RENAME operations for all NFS versions. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 51195263cdb8ba6aa4f3e6f6ee06a41f3717c87b Author: Jeff Layton Date: Sat May 3 15:59:26 2025 -0400 nfsd: add tracepoints for unlink events Observe the start of UNLINK, REMOVE, and RMDIR operations for all NFS versions. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 272e2b89b88a384f204d542b64bde0fb8e1fc12a Author: Jeff Layton Date: Sat May 3 15:59:25 2025 -0400 nfsd: add tracepoint to nfsd_link() Observe the start of NFS LINK operations. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 2344b72302ac11efde40d64a5bc69e60c4f5ed87 Author: Jeff Layton Date: Sat May 3 15:59:24 2025 -0400 nfsd: add tracepoint to nfsd_symlink Observe the start of SYMLINK operations for all NFS versions. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 85b0b1f217856b19f7fc7a6b3bf2adafdcaf056e Author: Jeff Layton Date: Sat May 3 15:59:23 2025 -0400 nfsd: add nfsd_vfs_create tracepoints Observe the start of file and directory creation for all NFS versions. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit a5256e687f2fe40c639b4f5b3f17a637eb35e7ab Author: Jeff Layton Date: Sat May 3 15:59:22 2025 -0400 nfsd: add a tracepoint to nfsd_lookup_dentry Replace the dprintk in nfsd_lookup_dentry() with a trace point. nfsd_lookup_dentry() is called frequently enough that enabling this dprintk call site would result in log floods and performance issues. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit adbdd746e8ba10088ad3efebee1ec278106a1a38 Author: Jeff Layton Date: Sat May 3 15:59:21 2025 -0400 nfsd: add a tracepoint for nfsd_setattr Turn Sargun's internal kprobe based implementation of this into a normal static tracepoint. Also, remove the dprintk's that got added recently with the fix for zero-length ACLs. Cc: Sargun Dillon Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 218927aa47647cc3bb58520cc630279844d8adde Author: Chuck Lever Date: Sat May 3 15:59:20 2025 -0400 NFSD: Add a Call equivalent to the NFSD_TRACE_PROC_RES macros Introduce tracing helpers that can be used before the procedure status code is known. These macros are similar to the SVC_RQST_ENDPOINT helpers, but they can be modified to include NFS-specific fields if that is needed later. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 45e3eda46db467b8b934188ff2109ee29b5b0b00 Author: Chuck Lever Date: Sat May 3 15:59:19 2025 -0400 NFSD: Use sockaddr instead of a generic array Record and emit presentation addresses using tracing helpers designed for the task. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit d6ca7d2643eebe09cf46840bdc7d68b6e07aba77 Author: Chuck Lever Date: Wed May 7 10:45:15 2025 -0400 NFSD: Implement FATTR4_CLONE_BLKSIZE attribute RFC 7862 states that if an NFS server implements a CLONE operation, it MUST also implement FATTR4_CLONE_BLKSIZE. NFSD implements CLONE, but does not implement FATTR4_CLONE_BLKSIZE. Note that in Section 12.2, RFC 7862 claims that FATTR4_CLONE_BLKSIZE is RECOMMENDED, not REQUIRED. Likely this is because a minor version is not permitted to add a REQUIRED attribute. Confusing. We assume this attribute reports a block size as a count of bytes, as RFC 7862 does not specify a unit. Reported-by: Roland Mainz Suggested-by: Christoph Hellwig Reviewed-by: Roland Mainz Cc: stable@vger.kernel.org # v6.7+ Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit c2c90a8b2620626cdb3eb315c2fafcc19fe24ee6 Author: Eric Biggers Date: Mon Apr 28 12:36:58 2025 -0700 nfsd: use SHA-256 library API instead of crypto_shash API This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Signed-off-by: Eric Biggers Reviewed-by: Scott Mayhew Signed-off-by: Chuck Lever commit 8ac6fcae5dc0e801f1c82a83f5ae2c0a4db19932 Author: Chuck Lever Date: Sun Apr 27 12:39:59 2025 -0400 svcrdma: Unregister the device if svc_rdma_accept() fails To handle device removal, svc_rdma_accept() requests removal notification for the underlying device when accepting a connection. However svc_rdma_free() is not invoked if svc_rdma_accept() fails. There needs to be a matching "unregister" in that case; otherwise the device cannot be removed. Fixes: c4de97f7c454 ("svcrdma: Handle device removal outside of the CM event handler") Cc: stable@vger.kernel.org Reviewed-by: Zhu Yanjun Signed-off-by: Chuck Lever commit de08ffb79c8f404adc611ddb580bc74133b2c986 Author: Jeff Layton Date: Thu Apr 17 14:54:36 2025 -0400 sunrpc: allow SOMAXCONN backlogged TCP connections The connection backlog passed to listen() denotes the number of connections that are fully established, but that have not yet been accept()ed. If the amount goes above that level, new connection requests will be dropped on the floor until the value goes down. If all the knfsd threads are bogged down in (e.g.) disk I/O, new connection attempts can stall because of this. For the same rationale that Trond points out in the userland patch [1], ensure that svc_xprt sockets created by the kernel allow SOMAXCONN (4096) backlogged connections instead of the 64 that they do today. [1]: https://lore.kernel.org/linux-nfs/20240308180223.2965601-1-trond.myklebust@hammerspace.com/ Cc: Trond Myklebust Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b31da62889e6d610114d81dc7a6edbcaa503fcf8 Author: Li Lingfeng Date: Mon Apr 14 22:38:52 2025 +0800 nfsd: Initialize ssc before laundromat_work to prevent NULL dereference In nfs4_state_start_net(), laundromat_work may access nfsd_ssc through nfs4_laundromat -> nfsd4_ssc_expire_umount. If nfsd_ssc isn't initialized, this can cause NULL pointer dereference. Normally the delayed start of laundromat_work allows sufficient time for nfsd_ssc initialization to complete. However, when the kernel waits too long for userspace responses (e.g. in nfs4_state_start_net -> nfsd4_end_grace -> nfsd4_record_grace_done -> nfsd4_cld_grace_done -> cld_pipe_upcall -> __cld_pipe_upcall -> wait_for_completion path), the delayed work may start before nfsd_ssc initialization finishes. Fix this by moving nfsd_ssc initialization before starting laundromat_work. Fixes: f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed.") Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton Signed-off-by: Li Lingfeng Signed-off-by: Chuck Lever commit b099ee28f9b026b18c229488474df104be0758c2 Author: Chuck Lever Date: Thu Apr 10 10:10:12 2025 -0400 MAINTAINERS: Update Neil Brown's email address Neil is planning retirement, and has asked me to replace his Suse email address with his personal email address. Both addresses currently route to the same mailbox. Signed-off-by: Chuck Lever commit 18c64378ad85ef00e70f196793ee8901a8aa2fa1 Author: Jeff Layton Date: Fri Apr 11 10:22:14 2025 -0400 sunrpc: add info about xprt queue times to svc_xprt_dequeue tracepoint I've been looking at a problem where we see increased RPC timeouts in clients when the nfs_layout_flexfiles dataserver_timeo value is tuned very low (6s). This is necessary to ensure quick failover to a different mirror if a server goes down, but it causes a lot more major RPC timeouts. Ultimately, the problem is server-side however. It's sometimes doesn't respond to connection attempts. My theory is that the interrupt handler runs when a connection comes in, the xprt ends up being enqueued, but it takes a significant amount of time for the nfsd thread to pick it up. Currently, the svc_xprt_dequeue tracepoint displays "wakeup-us". This is the time between the wake_up() call, and the thread dequeueing the xprt. If no thread was woken, or the thread ended up picking up a different xprt than intended, then this value won't tell us how long the xprt was waiting. Add a new xpt_qtime field to struct svc_xprt and set it in svc_xprt_enqueue(). When the dequeue tracepoint fires, also store the time that the xprt sat on the queue in total. Display it as "qtime-us". Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 8c4aae5582cf7901655988809ad94a6f6f2bce63 Author: Jeff Layton Date: Wed Apr 9 10:32:23 2025 -0400 nfsd: add commit start/done tracepoints around nfsd_commit() Very useful for gauging how long the vfs_fsync_range() takes. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 1244f0b2c3cecd3f349a877006e67c9492b41807 Author: NeilBrown Date: Fri Mar 28 11:05:59 2025 +1100 nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request If the request being processed is not a v4 compound request, then examining the cstate can have undefined results. This patch adds a check that the rpc procedure being executed (rq_procinfo) is the NFSPROC4_COMPOUND procedure. Reported-by: Olga Kornievskaia Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton Signed-off-by: NeilBrown Signed-off-by: Chuck Lever commit 0813c5f01249dbc32ccbc68d27a24fde5bf2901c Author: Olga Kornievskaia Date: Fri Mar 21 20:13:04 2025 -0400 nfsd: fix access checking for NLM under XPRTSEC policies When an export policy with xprtsec policy is set with "tls" and/or "mtls", but an NFS client is doing a v3 xprtsec=tls mount, then NLM locking calls fail with an error because there is currently no support for NLM with TLS. Until such support is added, allow NLM calls under TLS-secured policy. Fixes: 4cc9b9f2bf4d ("nfsd: refine and rename NFSD_MAY_LOCK") Cc: stable@vger.kernel.org Signed-off-by: Olga Kornievskaia Reviewed-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit c447d2ac987bb5e155ed817a61db29978e684339 Author: Guoqing Jiang Date: Wed Apr 2 22:06:19 2025 +0800 nfsd: remove redundant WARN_ON_ONCE in nfsd4_write It can be removed since svc_fill_write_vector already has the same WARN_ON_ONCE. Signed-off-by: Guoqing Jiang Signed-off-by: Chuck Lever commit 1218149037ee80f88aee4fa4c34b1de23df77fb1 Author: Chuck Lever Date: Sat Mar 8 15:14:38 2025 -0500 NFSD: Add experimental setting to disable the use of splice read NFSD currently has two separate code paths for handling read requests. One uses page splicing; the other is a traditional read based on an iov iterator. Because most Linux file systems support splice read, the latter does not get nearly the same test experience as splice reads. To force the use of vectored reads for testing and benchmarking, introduce the ability to disable splice reads for all NFS READ operations. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 9fe5ea760e64f04412dbed51645a0dac7220d40a Author: Chuck Lever Date: Sat Mar 8 15:14:37 2025 -0500 NFSD: Add /sys/kernel/debug/nfsd Create a small sandbox under /sys/kernel/debug for experimental NFS server feature settings. There is no API/ABI compatibility guarantee for these settings. The only documentation for such settings, if any documentation exists, is in the kernel source code. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit f7fb730cac9aafda8b9813b55d04e28a9664d17c Author: Maninder Singh Date: Thu Mar 6 14:50:07 2025 +0530 NFSD: fix race between nfsd registration and exports_proc As of now nfsd calls create_proc_exports_entry() at start of init_nfsd and cleanup by remove_proc_entry() at last of exit_nfsd. Which causes kernel OOPs if there is race between below 2 operations: (i) exportfs -r (ii) mount -t nfsd none /proc/fs/nfsd for 5.4 kernel ARM64: CPU 1: el1_irq+0xbc/0x180 arch_counter_get_cntvct+0x14/0x18 running_clock+0xc/0x18 preempt_count_add+0x88/0x110 prep_new_page+0xb0/0x220 get_page_from_freelist+0x2d8/0x1778 __alloc_pages_nodemask+0x15c/0xef0 __vmalloc_node_range+0x28c/0x478 __vmalloc_node_flags_caller+0x8c/0xb0 kvmalloc_node+0x88/0xe0 nfsd_init_net+0x6c/0x108 [nfsd] ops_init+0x44/0x170 register_pernet_operations+0x114/0x270 register_pernet_subsys+0x34/0x50 init_nfsd+0xa8/0x718 [nfsd] do_one_initcall+0x54/0x2e0 CPU 2 : Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 PC is at : exports_net_open+0x50/0x68 [nfsd] Call trace: exports_net_open+0x50/0x68 [nfsd] exports_proc_open+0x2c/0x38 [nfsd] proc_reg_open+0xb8/0x198 do_dentry_open+0x1c4/0x418 vfs_open+0x38/0x48 path_openat+0x28c/0xf18 do_filp_open+0x70/0xe8 do_sys_open+0x154/0x248 Sometimes it crashes at exports_net_open() and sometimes cache_seq_next_rcu(). and same is happening on latest 6.14 kernel as well: [ 0.000000] Linux version 6.14.0-rc5-next-20250304-dirty ... [ 285.455918] Unable to handle kernel paging request at virtual address 00001f4800001f48 ... [ 285.464902] pc : cache_seq_next_rcu+0x78/0xa4 ... [ 285.469695] Call trace: [ 285.470083] cache_seq_next_rcu+0x78/0xa4 (P) [ 285.470488] seq_read+0xe0/0x11c [ 285.470675] proc_reg_read+0x9c/0xf0 [ 285.470874] vfs_read+0xc4/0x2fc [ 285.471057] ksys_read+0x6c/0xf4 [ 285.471231] __arm64_sys_read+0x1c/0x28 [ 285.471428] invoke_syscall+0x44/0x100 [ 285.471633] el0_svc_common.constprop.0+0x40/0xe0 [ 285.471870] do_el0_svc_compat+0x1c/0x34 [ 285.472073] el0_svc_compat+0x2c/0x80 [ 285.472265] el0t_32_sync_handler+0x90/0x140 [ 285.472473] el0t_32_sync+0x19c/0x1a0 [ 285.472887] Code: f9400885 93407c23 937d7c27 11000421 (f86378a3) [ 285.473422] ---[ end trace 0000000000000000 ]--- It reproduced simply with below script: while [ 1 ] do /exportfs -r done & while [ 1 ] do insmod /nfsd.ko mount -t nfsd none /proc/fs/nfsd umount /proc/fs/nfsd rmmod nfsd done & So exporting interfaces to user space shall be done at last and cleanup at first place. With change there is no Kernel OOPs. Co-developed-by: Shubham Rana Signed-off-by: Shubham Rana Signed-off-by: Maninder Singh Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever commit ff12eb379554eea7932ad6caea55e3091701cce4 Author: Maninder Singh Date: Thu Mar 6 14:50:06 2025 +0530 NFSD: unregister filesystem in case genl_register_family() fails With rpc_status netlink support, unregister of register_filesystem() was missed in case of genl_register_family() fails. Correcting it by making new label. Fixes: bd9d6a3efa97 ("NFSD: add rpc_status netlink support") Cc: stable@vger.kernel.org Signed-off-by: Maninder Singh Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 2298abcbe11e9b553d03c0f1d084da786f7eff88 Author: Long Li Date: Sat Mar 1 14:48:36 2025 +0800 sunrpc: fix race in cache cleanup causing stale nextcheck time When cache cleanup runs concurrently with cache entry removal, a race condition can occur that leads to incorrect nextcheck times. This can delay cache cleanup for the cache_detail by up to 1800 seconds: 1. cache_clean() sets nextcheck to current time plus 1800 seconds 2. While scanning a non-empty bucket, concurrent cache entry removal can empty that bucket 3. cache_clean() finds no cache entries in the now-empty bucket to update the nextcheck time 4. This maybe delays the next scan of the cache_detail by up to 1800 seconds even when it should be scanned earlier based on remaining entries Fix this by moving the hash_lock acquisition earlier in cache_clean(). This ensures bucket emptiness checks and nextcheck updates happen atomically, preventing the race between cleanup and entry removal. Signed-off-by: Long Li Signed-off-by: Chuck Lever commit 5ca00634c8bbb2979c73465588f486b9632f5ed5 Author: Long Li Date: Sat Mar 1 14:48:35 2025 +0800 sunrpc: update nextcheck time when adding new cache entries The cache_detail structure uses a "nextcheck" field to control hash table scanning intervals. When a table scan begins, nextcheck is set to current time plus 1800 seconds. During scanning, if cache_detail is not empty and a cache entry's expiry time is earlier than the current nextcheck, the nextcheck is updated to that expiry time. This mechanism ensures that: 1) Empty cache_details are scanned every 1800 seconds to avoid unnecessary scans 2) Non-empty cache_details are scanned based on the earliest expiry time found However, when adding a new cache entry to an empty cache_detail, the nextcheck time was not being updated, remaining at 1800 seconds. This could delay cache cleanup for up to 1800 seconds, potentially blocking threads(such as nfsd) that are waiting for cache cleanup. Fix this by updating the nextcheck time whenever a new cache entry is added. Signed-off-by: Long Li Signed-off-by: Chuck Lever commit b53a42970fa4847fe01a48dfa42866de49577e06 Author: Chuck Lever Date: Sat Mar 1 13:31:51 2025 -0500 NFSD: Record each NFSv4 call's session slot index Help the client resolve the race between the reply to an asynchronous COPY reply and the associated CB_OFFLOAD callback by planting the session, slot, and sequence number of the COPY in the CB_SEQUENCE contained in the CB_OFFLOAD COMPOUND. Suggested-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 281ae67c948b4e6c1f93fe0ce3d2aa77e9b59047 Author: Chuck Lever Date: Sat Mar 1 13:31:50 2025 -0500 NFSD: Implement CB_SEQUENCE referring call lists The slot index number of the current COMPOUND has, until now, not been needed outside of nfsd4_sequence(). But to record the tuple that represents a referring call, the slot number will be needed when processing subsequent operations in the COMPOUND. Refactor the code that allocates a new struct nfsd4_slot to ensure that the new sl_index field is always correctly initialized. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4f3c8d8c9e109655311bbb4c6c46a54a9ef90d99 Author: Chuck Lever Date: Sat Mar 1 13:31:49 2025 -0500 NFSD: Implement CB_SEQUENCE referring call lists We have yet to implement a mechanism in NFSD for resolving races between a server's reply and a related callback operation. For example, a CB_OFFLOAD callback can race with the matching COPY response. The client will not recognize the copy state ID in the CB_OFFLOAD callback until the COPY response arrives. Trond adds: > It is also needed for the same kind of race with delegation > recalls, layout recalls, CB_NOTIFY_DEVICEID and would also be > helpful (although not as strongly required) for CB_NOTIFY_LOCK. RFC 8881 Section 20.9.3 describes referring call lists this way: > The csa_referring_call_lists array is the list of COMPOUND > requests, identified by session ID, slot ID, and sequence ID. > These are requests that the client previously sent to the server. > These previous requests created state that some operation(s) in > the same CB_COMPOUND as the csa_referring_call_lists are > identifying. A session ID is included because leased state is tied > to a client ID, and a client ID can have multiple sessions. See > Section 2.10.6.3. Introduce the XDR infrastructure for populating the csa_referring_call_lists argument of CB_SEQUENCE. Subsequent patches will put the referring call list to use. Note that cb_sequence_enc_sz estimates that only zero or one rcl is included in each CB_SEQUENCE, but the new infrastructure can manage any number of referring calls. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 71aeab7bd9ae113e7550fd78a9e6ad99a700f8bc Author: Chuck Lever Date: Sat Mar 1 13:31:48 2025 -0500 NFSD: Shorten CB_OFFLOAD response to NFS4ERR_DELAY Try not to prolong the wait for completion of a COPY or COPY_NOTIFY operation. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 2f2b6d0b9b09e1d68636d189e5543912be5cbdcc Author: Chuck Lever Date: Sat Mar 1 13:31:47 2025 -0500 NFSD: OFFLOAD_CANCEL should mark an async COPY as completed Update the status of an async COPY operation when it has been stopped. OFFLOAD_STATUS needs to indicate that the COPY is no longer running. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 267e15588f10033a882954539ef78abd866b1744 Merge: e41ece7cd17348 f5b7564fedcfd3 Author: Bjorn Andersson Date: Sun May 11 18:05:02 2025 -0500 Merge branch 'arm32-for-6.15' into arm32-for-6.16 The v6.15 PR contained the transition to "qcom,calibration-variant" and was not accepted due to the risk of breaking bisection support. Merge the arm32-for-6.15 tag in order to bring these patches into v6.16. commit a18226be95c7ae7c9ec22fd31a6124bef5675c64 Author: Joel Selvaraj Date: Tue May 6 13:18:41 2025 -0500 arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce touchscreen support Enable the Focaltech FT8719 touchscreen controller used in the Poco F1 (EBBG) panel variant. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/20250506-pocof1-touchscreen-support-v4-4-bfb53da52945@joelselvaraj.com Signed-off-by: Bjorn Andersson commit 2be670d00b4002f56b11a57a510540001ef1cacb Author: Joel Selvaraj Date: Tue May 6 13:18:40 2025 -0500 arm64: dts: qcom: sdm845-xiaomi-beryllium-tianma: introduce touchscreen support Enable the Novatek NT36672A touchscreen controller used in the Poco F1 (Tianma) panel variant. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/20250506-pocof1-touchscreen-support-v4-3-bfb53da52945@joelselvaraj.com Signed-off-by: Bjorn Andersson commit 424246ed3e5d1d7b4a33e2b13a30c8d1b284fad5 Author: Joel Selvaraj Date: Tue May 6 13:18:39 2025 -0500 arm64: dts: qcom: sdm845-xiaomi-beryllium-common: add touchscreen related nodes Enable qupv3_id_1 and gpi_dma1 as they are required for configuring touchscreen. Also add pinctrl configurations needed for touchscreen. These are common for both the tianma and ebbg touchscreen variant. In the subsequent patches, we will enable support for the Novatek NT36672a touchscreen and FocalTech FT8719 touchscreen that are used in the Poco F1 Tianma and EBBG panel variant respectively. This is done in preparation for that. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/20250506-pocof1-touchscreen-support-v4-2-bfb53da52945@joelselvaraj.com Signed-off-by: Bjorn Andersson commit 061402552e98a55b419a5045ba366dd51cfb24f1 Author: Pratyush Brahma Date: Thu May 8 11:51:02 2025 +0530 arm64: dts: qcom: qcs8300: add the pcie smmu node Add the PCIe SMMU node to enable address translations for pcie. Reviewed-by: Dmitry Baryshkov Signed-off-by: Pratyush Brahma Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250508-qcs8300-pcie-smmu-v3-1-c6b4453b0b22@quicinc.com Signed-off-by: Bjorn Andersson commit b7fc42fb0e6fd5c786e7e0eebe44ee44646ef47c Author: Mukesh Ojha Date: Thu May 8 19:16:34 2025 +0530 soc: qcom: socinfo: add SM8750 SoC ID Update soc_id table for the Qualcomm SM8750 SoC to represent SM8750 machine. Signed-off-by: Mukesh Ojha Reviewed-by: Melody Olvera Link: https://lore.kernel.org/r/20250508134635.1627031-1-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 85c5d9b9464b17eb2f5a00edd145f45a12ae31ba Author: Mukesh Ojha Date: Thu May 8 19:16:35 2025 +0530 dt-bindings: arm: qcom,ids: add SoC ID for SM8750 Add the unique ID for Qualcomm SM8750 SoC. This value is used to differentiate the SoC across qcom targets. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mukesh Ojha Reviewed-by: Melody Olvera Link: https://lore.kernel.org/r/20250508134635.1627031-2-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit edc5e6e019c99b529b3d1f2801d5cce9924ae79b Author: Andrew Ballance Date: Tue Mar 25 08:33:52 2025 -0500 rust: replace rustdoc references to alloc::format Replace alloc::format[1] in the pr_* and dev_* macros' doc comments with std::format[2] because they are identical but less likely to get confused with the kernel's alloc crate. And add a url link for the std::format! macro. Link: https://doc.rust-lang.org/alloc/macro.format.html [1] Link: https://doc.rust-lang.org/std/macro.format.html [2] Reviewed-by: Benno Lossin Signed-off-by: Andrew Ballance Link: https://lore.kernel.org/r/20250325133352.441425-1-andrewjballance@gmail.com [ Fixed typo and reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 86d990c7b699581918de2a379c6eebac7292940e Author: Xizhe Yin Date: Mon Apr 7 11:34:41 2025 +0800 rust: convert raw URLs to Markdown autolinks in comments Some comments in Rust files use raw URLs (http://example.com) rather than Markdown autolinks . This inconsistency makes the documentation less uniform and harder to maintain. This patch converts all remaining raw URLs in Rust code comments to use the Markdown autolink format, maintaining consistency with the rest of the codebase which already uses this style. Suggested-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1153 Signed-off-by: Xizhe Yin Link: https://lore.kernel.org/r/509F0B66E3C1575D+20250407033441.5567-1-xizheyin@smail.nju.edu.cn [ Used From form for Signed-off-by. Sorted tags. - Miguel ] Signed-off-by: Miguel Ojeda commit b9b701fce49a448b1e046f7cda592fec2958e5cd Author: Miguel Ojeda Date: Thu Mar 27 22:13:02 2025 +0100 rust: clarify the language unstable features in use We track the details of which Rust features we use at our usual "live list" [1] (and its sub-lists), but in light of a discussion in the LWN article [2], it would help to clarify it in the source code. In particular, we are very close to rely only on stable Rust language-wise -- essentially only two language features remain (including the `kernel` crate). Thus add some details in both the feature list of the `kernel` crate as well as the list of allowed features. This does not over every single feature, and there are quite a few non-language features that we use too. To have the full picture, please refer to [1]. Link: https://github.com/Rust-for-Linux/linux/issues/2 [1] Link: https://lwn.net/Articles/1015409/ [2] Suggested-by: Andreas Hindborg Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250327211302.286313-1-ojeda@kernel.org [ Improved comments with suggestions from the list. - Miguel ] Signed-off-by: Miguel Ojeda commit 7d8dee4689278e174900509b8c4604651159d8ee Author: Miguel Ojeda Date: Tue Apr 29 17:14:45 2025 +0200 rust: uaccess: take advantage of the prelude and `Result`'s defaults The `kernel` prelude brings `Result` and the error codes; and the prelude itself is already available in the examples automatically. In addition, `Result` already defaults to `T = ()`. Thus simplify. Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250429151445.438977-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 0fa5f8c877cae959de7cf6c3dc054e23e7ebcd75 Author: Altan Ozlu Date: Wed Mar 26 20:25:36 2025 +0000 rust: static_assert: add optional message Add an optional panic message to the `static_assert!` macro. The panic message doesn't support argument formatting, because the `assert!` macro only supports formatting in non-const contexts. Suggested-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1149 Signed-off-by: Altan Ozlu Reviewed-by: Benno Lossin Reviewed-by: Trevor Gross Link: https://lore.kernel.org/r/20250326202520.1176162-2-altan@ozlu.eu Signed-off-by: Miguel Ojeda commit 79d04e73ba481f8537691095cdd2cfd3acdb9c80 Author: Miguel Ojeda Date: Wed Apr 16 13:24:54 2025 +0200 docs: rust: explain that `///` vs. `//` applies to private items too Sometimes kernel developers use `//` for documenting private items, since those do not get rendered at the moment. That is reasonable, but the intention behind `///` (and `//!`) vs. `//` is to convey the distinction between documentation and other kinds of comments, such as implementation details or TODOs. It also increases consistency with the public items and thus e.g. allows to change visibility of an item with less changes involved. It is not just useful for human readers, but also tooling. For instance, we may want to eventually generate documentation for private items (perhaps as a toggle in the HTML UI). On top of that, `rustdoc` lints as usual for those, too, so we may want to do it even if we do not use the result. Thus document this explicitly. Link: https://lore.kernel.org/rust-for-linux/CANiq72n_C7exSOMe5yf-7jKKnhSCv+a9QcD=OE2B_Q2UFBL3Xg@mail.gmail.com/ Link: https://github.com/Rust-for-Linux/linux/issues/1157 Reviewed-by: Alice Ryhl Reviewed-by: Christian Schrefl Reviewed-by: Viresh Kumar Link: https://lore.kernel.org/r/20250416112454.2503872-1-ojeda@kernel.org [ Fixed typo. - Miguel ] Signed-off-by: Miguel Ojeda commit 878620c5a93a24af10e64b116e66c2314e91a719 Author: Kunwu Chan Date: Fri Mar 21 16:01:24 2025 +0800 rust: page: optimize rust symbol generation for Page When build the kernel using the llvm-18.1.3-rust-1.85.0-x86_64 with ARCH=arm64, the following symbols are generated: $nm vmlinux | grep ' _R'.*Page | rustfilt ffff8000805b6f98 T ::alloc_page ffff8000805b715c T ::fill_zero_raw ffff8000805b720c T ::copy_from_user_slice_raw ffff8000805b6fb4 T ::read_raw ffff8000805b7088 T ::write_raw ffff8000805b72fc T ::drop These Rust symbols(alloc_page and drop) are trivial wrappers around the C functions alloc_pages and __free_pages. It doesn't make sense to go through a trivial wrapper for these functions, so mark them inline. Link: https://github.com/Rust-for-Linux/linux/issues/1145 Suggested-by: Alice Ryhl Co-developed-by: Grace Deng Signed-off-by: Grace Deng Signed-off-by: Kunwu Chan Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250321080124.484647-1-kunwu.chan@linux.dev [ Removed spurious colon in title. - Miguel ] Signed-off-by: Miguel Ojeda commit 28bce181daf3ba87d414f75ad9f2a680f69f2c25 Author: Abel Vesa Date: Fri May 9 10:08:52 2025 +0300 arm64: dts: qcom: x1e80100-*: Drop useless DP3 compatible override Back when display support was added initially to CRD, and we used to have two separate compatibles for eDP and DP, it was supposed to override the DP compatible with the eDP one in the board specific devicetree. Since then, the DP driver has been reworked to figure out the eDP/DP at runtime while only DP compatible remained in the end. Even though the override does nothing basically, drop it to avoid further confusion. Drop it from all X Elite based platforms. Reviewed-by: Dmitry Baryshkov Reviewed-by: Johan Hovold Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250509-x1e80100-dts-drop-useless-dp-compatible-override-v2-1-126db05cb70a@linaro.org Signed-off-by: Bjorn Andersson commit e41ece7cd173486f6767de050deb2d8f0882a82a Author: Stanislav Jakubek Date: Thu May 8 16:11:34 2025 +0200 ARM: dts: qcom: msm8226-motorola-falcon: specify vddio_disp output voltage After some digging in downstream sources, it was found that the vddio_disp regulator's output voltage is 1.8V. This is further confirmed by the troubleshooting guide. Specify its output voltage as such. While at it, add a comment specifying the IC, which according to the schematic is the TI TPS22902. Signed-off-by: Stanislav Jakubek Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/6143603464a65aebbed281fe6c6164316dd07269.1746711762.git.stano.jakubek@gmail.com Signed-off-by: Bjorn Andersson commit 7bce56fd73ee7264ed04418dab1719164e42f113 Author: Stanislav Jakubek Date: Thu May 8 16:11:27 2025 +0200 ARM: dts: qcom: msm8226-motorola-falcon: limit TPS65132 to 5.4V After some digging in downstream sources, it was found that the TPS65132 outputs are fixed to +5.4V and -5.4V respectively. This is further confirmed on runtime through debugfs, the troubleshooting guide confirms this as well. Specify these limits as such. Signed-off-by: Stanislav Jakubek Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/b67ed6c7813fa52cf00b473dded9b5042102f593.1746711762.git.stano.jakubek@gmail.com Signed-off-by: Bjorn Andersson commit db6e3f2ba0bf6ad069347050ff62f29ef0d88b14 Author: Stanislav Jakubek Date: Thu May 8 16:11:19 2025 +0200 ARM: dts: qcom: msm8226-motorola-falcon: add I2C clock frequencies While the currently supported hardware works fine with the default clock frequencies of 100000 on both I2C2 and I2C3, downstream sources list the frequencies as 100000 for I2C2 and 400000 for I2C3. Update them as such. Signed-off-by: Stanislav Jakubek Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/5a8191e3758e0df78b4213102f25ceadc28cd427.1746711762.git.stano.jakubek@gmail.com Signed-off-by: Bjorn Andersson commit cbcd04ab82c61dc777a4b56014292b9467f10c4e Author: Stanislav Jakubek Date: Thu May 8 16:11:13 2025 +0200 ARM: dts: qcom: msm8226-motorola-falcon: add clocks, power-domain to simpleFB Makes the display work without clk_ignore_unused and pd_ignore_unused. Signed-off-by: Stanislav Jakubek Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/cdb6915bf40c055c77a0beb2f49c20458adf7481.1746711762.git.stano.jakubek@gmail.com Signed-off-by: Bjorn Andersson commit cf8dea42e42b243e41878b57c0ecd898688234e6 Author: Suma Hegde Date: Tue May 6 10:15:40 2025 +0000 platform/x86/amd/hsmp: Use a single DRIVER_VERSION for all hsmp modules Use a single DRIVER_VERSION for the plat, hsmp and acpi modules, as all these modules are connected to a common functionality. Signed-off-by: Suma Hegde Reviewed-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20250506101542.200811-1-suma.hegde@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 593ee93aa710ea0159f363b2f1950ecb6c9ddca2 Merge: f94ffc3f0b90bf bfcfe6d335a967 Author: Ilpo Järvinen Date: Mon May 12 00:18:11 2025 +0300 Merge branch 'fixes' into for-next Resolve conflicts in dell/alienware-wmi-wmax and asus-wmi, and enable applying a few amd/hsmp patches that depend on changes in the fixes branch. commit 1faeeb315fdbd005bbc1bc74214e39087971dda9 Merge: f9fa01229339da afc6053d4c4b0a Author: Dave Airlie Date: Mon May 12 07:14:27 2025 +1000 Merge tag 'amd-drm-next-6.16-2025-05-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.16-2025-05-09: amdgpu: - IPS fixes - DSC cleanup - DC Scaling updates - DC FP fixes - Fused I2C-over-AUX updates - SubVP fixes - Freesync fix - DMUB AUX fixes - VCN fix - Hibernation fixes - HDP fixes - DCN 2.1 fixes - DPIA fixes - DMUB updates - Use drm_file_err in amdgpu - Enforce isolation updates - Use new dma_fence helpers - USERQ fixes - Documentation updates - Misc code cleanups - SR-IOV updates - RAS updates - PSP 12 cleanups amdkfd: - Update error messages for SDMA - Userptr updates drm: - Add drm_file_err function dma-buf: - Add a helper to sort and deduplicate dma_fence arrays From: Alex Deucher Link: https://lore.kernel.org/r/20250509230951.3871914-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit f94ffc3f0b90bf4880e0abf2c056fc465e2c3be8 Author: Vadim Pasternak Date: Thu May 8 23:31:39 2025 +0300 platform/mellanox: mlxreg-dpu: Fix smatch warnings Add missed call to release adapter. Remove wrong error pointer conversion. Fixes: 3e75f2954116 ("platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250508203139.55171-1-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 8e725ff0419ad74dc79abfbdcd4cfba936a5d167 Author: Nathan Chancellor Date: Fri May 9 11:58:01 2025 +0100 platform: mellanox: nvsw-sn2200: Fix .items in nvsw_sn2201_busbar_hotplug Clang warns (or errors with CONFIG_WERROR=y): drivers/platform/mellanox/nvsw-sn2201.c:531:32: error: variable 'nvsw_sn2201_busbar_items' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 531 | static struct mlxreg_core_item nvsw_sn2201_busbar_items[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~ nvsw_sn2201_busbar_items is only used in ARRAY_SIZE(), which uses sizeof(), so this variable is only used at compile time. It appears that this may be a copy and paste issue, so use nvsw_sn2201_busbar_items as the .items member in nvsw_sn2201_busbar_hotplug, clearing up the warning. Fixes: 56b0bb7f9069 ("platform: mellanox: nvsw-sn2200: Add support for new system flavour") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250509-nvsw-sn2200-fix-items-busbar-hotplug-v1-1-8844fff38dc8@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 34b2f7b883fed54fae357f513d545b5d5fb9f31f Author: Heiko Stuebner Date: Fri May 9 17:23:29 2025 +0200 arm64: dts: rockchip: drop wrong spdif clock from edp1 on rk3588 As described, the analogix-dp controller on rk3588 only supports 2 clocks and the edp0 node handles that correctly. The edp1 node on the other hand seems to have a dangling 3rd clock called spdif, that probably only exists in the vendor-tree. As that is not handled at all, remove it for now so that we adhere to the binding. Fixes: a481bb0b1ad9 ("arm64: dts: rockchip: Add eDP1 dt node for rk3588") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250509152329.2004073-1-heiko@sntech.de commit ceb6ef1ea9002669afc0e1ef258e530d3c05d91a Author: Finley Xiao Date: Fri May 9 18:23:08 2025 +0800 arm64: dts: rockchip: Add RK3562 evb2 devicetree DRAM: DDR4 Storage: eMMC PMIC: RK809 Audio: Headphone and speaker Interface: - USB3.0 HOST - USB2.0 HOST - PCIe x4 slot(pcie2x1 available) - SD card slot - GMAC - debug UART0 NOTE: the USB3.0 and the PCIe reuse the comboPHY, so the USB3.0 work in USB2 only mode. Signed-off-by: Finley Xiao Signed-off-by: Kever Yang Link: https://lore.kernel.org/r/20250509102308.761424-6-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit 515fd62224737a1dc5c1524a24494e73c0c963a0 Author: Finley Xiao Date: Fri May 9 18:23:07 2025 +0800 arm64: dts: rockchip: add core dtsi for RK3562 SoC RK3562 is a SoC from Rockchip, which embedded with quad ARM Cortex-A53. Signed-off-by: Finley Xiao Signed-off-by: Kever Yang Link: https://lore.kernel.org/r/20250509102308.761424-5-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit b95a1e89c7550fc0e131f4e1346d5603b9e32a4d Author: Thorsten Blum Date: Fri May 9 18:29:28 2025 +0200 ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy() strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250509162930.171047-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit f95e4b6367f7ce062078dfb4769d283c56703872 Author: Kuninori Morimoto Date: Fri May 9 00:36:31 2025 +0000 ALSA: wavefront: remove snd_wavefront_xxx() There is no snd_wavefront_xxx() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87msbmpqls.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai commit f67c90d60f68cc02942895f0c594c5613ef43f64 Author: Kuninori Morimoto Date: Fri May 9 00:36:15 2025 +0000 ALSA: isa/gus: remove snd_gf1_lfo_xxx() There is no snd_gf1_lfo_xxx() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87o6w2pqm8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai commit 2a6794a9de0784252fcdf2f603111a89d05199df Author: Peter Ujfalusi Date: Thu May 8 21:14:46 2025 +0300 ALSA: hda: intel-nhlt: Print errors in intel_nhlt_ssp_device_type() Do not fail silently when the intel_nhlt_ssp_device_type() fails as it can be for two reasons: The NHLT table is missing or the SSP instance is missing from the table. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250508181446.25323-1-peter.ujfalusi@linux.intel.com Signed-off-by: Takashi Iwai commit 499a8cee812588905cc940837e69918c1649a19e Author: Antoniu Miclaus Date: Fri May 9 13:16:57 2025 +0300 iio: adc: ad4851: fix ad4858 chan pointer handling The pointer returned from ad4851_parse_channels_common() is incremented internally as each channel is populated. In ad4858_parse_channels(), the same pointer was further incremented while setting ext_scan_type fields for each channel. This resulted in indio_dev->channels being set to a pointer past the end of the allocated array, potentially causing memory corruption or undefined behavior. Fix this by iterating over the channels using an explicit index instead of incrementing the pointer. This preserves the original base pointer and ensures all channel metadata is set correctly. Fixes: 6250803fe2ec ("iio: adc: ad4851: add ad485x driver") Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250509101657.6742-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit 094ac8cff7858bee5fa4554f6ea66c964f8e160e Author: Ingo Molnar Date: Sat May 10 10:45:28 2025 +0200 futex: Relax the rcu_assign_pointer() assignment of mm->futex_phash in futex_mm_init() The following commit added an rcu_assign_pointer() assignment to futex_mm_init() in : bd54df5ea7ca ("futex: Allow to resize the private local hash") Which breaks the build on older compilers (gcc-9, x86-64 defconfig): CC io_uring/futex.o In file included from ./arch/x86/include/generated/asm/rwonce.h:1, from ./include/linux/compiler.h:390, from ./include/linux/array_size.h:5, from ./include/linux/kernel.h:16, from io_uring/futex.c:2: ./include/linux/futex.h: In function 'futex_mm_init': ./include/linux/rcupdate.h:555:36: error: dereferencing pointer to incomplete type 'struct futex_private_hash' The problem is that this variant of rcu_assign_pointer() wants to know the full type of 'struct futex_private_hash', which type is local to futex.c: kernel/futex/core.c:struct futex_private_hash { There are a couple of mechanical solutions for this bug: - we can uninline futex_mm_init() and move it into futex/core.c - or we can share the structure definition with kernel/fork.c. But both of these solutions have disadvantages: the first one adds runtime overhead, while the second one dis-encapsulates private futex types. A third solution, implemented by this patch, is to just initialize mm->futex_phash with NULL like the patch below, it's not like this new MM's ->futex_phash can be observed externally until the task is inserted into the task list, which guarantees full store ordering. The relaxation of this initialization might also give a tiny speedup on certain platforms. Fixes: bd54df5ea7ca ("futex: Allow to resize the private local hash") Signed-off-by: Ingo Molnar Cc: André Almeida Cc: Darren Hart Cc: Davidlohr Bueso Cc: Juri Lelli Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Valentin Schneider Cc: Waiman Long Link: https://lore.kernel.org/r/aB8SI00EHBri23lB@gmail.com commit 74d3da135f69a910df0f3487bebd3de540450d4a Author: Neil Armstrong Date: Thu Mar 6 11:56:20 2025 +0100 MAINTAINERS: update dlg,da72??.txt to yaml Now the dlg,da7280.txt file has been converted to dt-schema, update the corresponding MAINTAINERS entry. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202412070625.zZpw80SM-lkp@intel.com/ Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250306-topic-misc-da7280-convert-v4-2-2972c4e81cb5@linaro.org Signed-off-by: Dmitry Torokhov commit 88bd9cc1810a76a945a1fddb9d99f1934dc9ec1a Author: Neil Armstrong Date: Thu Mar 6 11:56:19 2025 +0100 dt-bindings: input: convert dlg,da7280.txt to dt-schema Convert the Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver bindings to dt-schema. Due to the implementation and usage in DT the array must be an uint32 array. Reviewed-by: Conor Dooley Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250306-topic-misc-da7280-convert-v4-1-2972c4e81cb5@linaro.org Signed-off-by: Dmitry Torokhov commit 8856eafcc05ecf54d6dd2b6c67804fefd276472c Author: Bence Csókás Date: Thu Mar 27 20:59:27 2025 +0100 spi: atmel-quadspi: Fix unbalanced pm_runtime by using devm_ API Fix unbalanced PM in error path of `atmel_qspi_probe()` by using `devm_pm_runtime_*()` functions. Reported-by: Alexander Dahl Closes: https://lore.kernel.org/linux-spi/20250110-paycheck-irregular-bcddab1276c7@thorsis.com/ Fixes: 5af42209a4d2 ("spi: atmel-quadspi: Add support for sama7g5 QSPI") Signed-off-by: Bence Csókás Link: https://patch.msgid.link/20250327195928.680771-4-csokas.bence@prolan.hu Signed-off-by: Mark Brown commit a10bcb99e5653841cff2f57b2cf065c1da77fb25 Author: Johannes Berg Date: Fri May 9 13:44:53 2025 +0300 wifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHz It was decided this was supported after all, so remove the restriction. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-15-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 305e4e6b862c7995617ee98b7aaf07ea3b074009 Author: Pagadala Yesu Anjaneyulu Date: Fri May 9 13:44:52 2025 +0300 wifi: iwlwifi: mld: add support for ROC on BSS add support for remain on channel on BSS vif for iwlmld. Signed-off-by: Pagadala Yesu Anjaneyulu Link: https://patch.msgid.link/20250509104454.2582160-14-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 2903fe335e255965e576642dde9e674483617d1b Author: Pagadala Yesu Anjaneyulu Date: Fri May 9 13:44:51 2025 +0300 wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC If one of the stages in starting a ROC failed, the ROC will not start nor end so EMLSR will stay blocked forever. Block EMLSR once all ROC conditions are validated and clear EMLSR blocked reasons in mld_vif cleanup. Signed-off-by: Pagadala Yesu Anjaneyulu Link: https://patch.msgid.link/20250509104454.2582160-13-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 35a29b14c82bc3ff00a7093c2d0080bc456b07ee Author: Pagadala Yesu Anjaneyulu Date: Fri May 9 13:44:50 2025 +0300 wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif This change reflects the correct ownership of aux_sta, as it is not a property of the link but rather of the virtual interface. Updated the initialization, cleanup and access logic for the aux_sta member to align with its new location within iwl_mld_vif. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Somashekhar Puttagangaiah Link: https://patch.msgid.link/20250509104454.2582160-12-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit db8c12f7c35a583380cc149e0903bb153dcfc852 Author: Pagadala Yesu Anjaneyulu Date: Fri May 9 13:44:49 2025 +0300 wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif The roc_activity member in the iwl_mld_vif structure was previously set to zero during cleanup as was present in struct_group, which incorrectly indicated ROC_ACTIVITY_HOTSPOT. To fix this issue, remove roc_activity member from struct_group. Notify mac80211 of ROC expiration during vif cleanup to maintain synchronization between the driver and mac80211. While on it, update it's type to enum iwl_roc_activity. Signed-off-by: Pagadala Yesu Anjaneyulu Link: https://patch.msgid.link/20250509104454.2582160-11-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 6f47182ccda522c692e7f3618efe91fd2975d6bd Author: Pagadala Yesu Anjaneyulu Date: Fri May 9 13:44:48 2025 +0300 wifi: iwlwifi: mld: Correct comments for cleanup functions Update comments to accurately reflect the purpose of the iwl_mld_cleanup_link and iwl_cleanup_mld functions. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Somashekhar Puttagangaiah Link: https://patch.msgid.link/20250509104454.2582160-10-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 589ceda64c73c2587b53de046fa163c23bb096d6 Author: Johannes Berg Date: Fri May 9 13:44:47 2025 +0300 wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfg With all the cleanups now, we can rename the structure to better indicate the functionality. For older devices this isn't quite accurate, of course, but it's better to have a name that reflects future use for maintenance. Add some kernel-doc while at it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-9-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit fe80b0e53d362c0ac2a14fca79d5d61497017129 Author: Johannes Berg Date: Fri May 9 13:44:46 2025 +0300 wifi: iwlwifi: cfg: clean up Sc/Dr/Br configs For now, the WH and PE radios require the same config as FM, so just add a #define for those instead of copying the data. Since this is true, Sc/Dr/Br all used the same configs for all RF types, but that's confusing, so now use the defined WH/PE names for the correct combinations. We can also now enable the unit test that ensures we have no duplicate RF configs. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-8-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 7225a6a2452267396d0fc5b7b8d180fe4ff80c7f Author: Johannes Berg Date: Fri May 9 13:44:45 2025 +0300 wifi: iwlwifi: cfg: add FM RF config The Bz configs really should be FM for the RF, so move that around. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-7-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 3a515211a0a039822afa2061318fbbbb7143623f Author: Johannes Berg Date: Fri May 9 13:44:44 2025 +0300 wifi: iwlwifi: cfg: add GF RF config This is equivalent to just the previous iwl_cfg_ma, but really should also be used for Bz/Gf and Sc/Gf, instead of those using EHT sizes. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-6-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 2ffa48ab996bd22aa788709091ab94dce6c7755b Author: Johannes Berg Date: Fri May 9 13:44:43 2025 +0300 wifi: iwlwifi: cfg: unify HR configs Unify the HR configs to just one HR RF config. All the fields were the same already, so this doesn't do anything. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-5-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 5e3033970cc39057f77264d15a14948884863ae1 Author: Johannes Berg Date: Fri May 9 13:44:42 2025 +0300 wifi: iwlwifi: cfg: unify JF configs Unify the JF configs to just one JF RF config. This can be done because the differing fields (thermal and DCCM offsets) won't be used for Qu MACs (and up) due to firmware support. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-4-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit b8eee90f0ba52b22dbb26f84503cf8b39850c0d4 Author: Johannes Berg Date: Fri May 9 13:44:41 2025 +0300 wifi: iwlwifi: cfg: unify num_rbds config This should depend on both the RF (VHT/HE/EHT support) and the MAC (<=22000 can put multiple frames into one buffer), so unify the config in the struct iwl_cfg to just have it sized according to the RF, and then double it for all the MACs starting from AX210 (So/Ty). Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-3-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 03e433545ca31954ee63ee8ec04e35a145f479cb Author: Johannes Berg Date: Fri May 9 13:44:40 2025 +0300 wifi: iwlwifi: cfg: add ucode API min/max to MAC config In some older devices, the min/max firmware API supported by the driver depends on the specific device, when sharing the the same MAC (config). For most newer devices, it really is dependent on the MAC instead, since the firmware was frozen for certain MAC types. However, in the future we expect also freezes for RF types there. To handle this most generally, add an API min/max to the MAC config and then use the narrowest range prescribed by both, if set. For the newer MACs since 9000, move the configuration, there was only a freeze on MAC+RF lines so far. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250509104454.2582160-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 6aeda4f2042711f99d63c5b7bf846c2bba711696 Author: Vladimir Lypak Date: Sun Apr 20 17:12:44 2025 +0200 arm64: dts: qcom: msm8953: Add interconnects Add the nodes for the bimc, pcnoc, snoc and snoc_mm. And wire up the interconnects where applicable. Signed-off-by: Vladimir Lypak [luca: Prepare patch for upstream submission] Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250420-msm8953-interconnect-v2-2-828715dcb674@lucaweiss.eu Signed-off-by: Bjorn Andersson commit b7bc69b90736a281490d535c6786b6c23c1b22e8 Author: Felix Kaechele Date: Sun Apr 6 15:52:02 2025 +0200 arm64: dts: qcom: msm8953: Add uart_5 Add the node and pinctrl for uart_5 found on the MSM8953 SoC. Signed-off-by: Felix Kaechele [luca: Prepare patch for upstream submission] Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250406-msm8953-uart_5-v1-1-7e4841674137@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 5e170ce69d204b59116539d8b3a789c4d5d82563 Author: Luca Weiss Date: Fri Apr 25 13:53:50 2025 +0200 arm64: dts: qcom: sm8350: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-11-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 69a8b068dcf6dc42846f0764149461d2166a19a6 Author: Luca Weiss Date: Fri Apr 25 13:53:49 2025 +0200 arm64: dts: qcom: sm7325-nothing-spacewar: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-10-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit f18b14d2bec4fb604e2feb81e12e2869f5ce82b1 Author: Luca Weiss Date: Fri Apr 25 13:53:48 2025 +0200 arm64: dts: qcom: sdm850*: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-9-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 84665986b7dd7ac44b9703328fe0a5b1184e0a8c Author: Luca Weiss Date: Fri Apr 25 13:53:47 2025 +0200 arm64: dts: qcom: sdm845*: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-8-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit f1275b0a1de7339fd4ef7ea5cfaa5a79389fc6f8 Author: Luca Weiss Date: Fri Apr 25 13:53:46 2025 +0200 arm64: dts: qcom: sc7280: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-7-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 08b8a9fdced825dbd4553d14d45b3ae7a286ef16 Author: Luca Weiss Date: Fri Apr 25 13:53:45 2025 +0200 arm64: dts: qcom: sc7180-acer-aspire1: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-6-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 6ac93e5b21e025f54af5b5a3f0639632ce72b95c Author: Luca Weiss Date: Fri Apr 25 13:53:44 2025 +0200 arm64: dts: qcom: qrb5165-rb5: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-5-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 01160256f4b2be614abbe24dcb05967e9916440e Author: Luca Weiss Date: Fri Apr 25 13:53:43 2025 +0200 arm64: dts: qcom: msm8996*: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-4-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit d89ed52f3f506531c32767dc1b91cfbc322d6959 Author: Luca Weiss Date: Fri Apr 25 13:53:42 2025 +0200 arm64: dts: qcom: msm8953: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-3-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 0c5b597651e0c708b3dec4c6da56e70947c1c893 Author: Luca Weiss Date: Fri Apr 25 13:53:41 2025 +0200 arm64: dts: qcom: msm8916-modem-qdsp6: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-2-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit e99e02edac8ba46fedc6536f18a86915af52b7ae Author: Luca Weiss Date: Fri Apr 25 13:53:40 2025 +0200 arm64: dts: qcom: apq8096-db820c: Use q6asm defines for reg Use the MSM_FRONTEND_DAI_MULTIMEDIA* defines to make the code more readable. No functional change intended. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-q6asmdai-defines-v1-1-28308e2ce7d4@fairphone.com Signed-off-by: Bjorn Andersson commit 6b51f5e1811398dce5c1d67b746dde74c75f6ce7 Author: Luca Weiss Date: Fri Apr 25 09:08:15 2025 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C Extend the USB graph to connect the OCP96011 switch, the PTN36502 redriver, the USB controllers and the MDSS, so that DisplayPort over USB-C is working. Connect some parts of the graph directly in the SoC dtsi since those parts are wired up like this in the SoC directly. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250425-fp5-pmic-glink-dp-v3-4-cc9c2aeb42fb@fairphone.com Signed-off-by: Bjorn Andersson commit 1efa79c7536896b6fcd71760c3d4f0a0d40a9e1c Author: Luca Weiss Date: Fri Apr 25 09:08:14 2025 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch Add a node for the OCP96011 on the board which is used to handle USB-C analog audio switch and handles the SBU mux for DisplayPort-over-USB-C. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250425-fp5-pmic-glink-dp-v3-3-cc9c2aeb42fb@fairphone.com Signed-off-by: Bjorn Andersson commit 90485e48b8889deec74cf2ce07df174da84b1ac1 Author: Luca Weiss Date: Fri Apr 25 09:08:13 2025 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo redriver" found on this device. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250425-fp5-pmic-glink-dp-v3-2-cc9c2aeb42fb@fairphone.com Signed-off-by: Bjorn Andersson commit a4e07ddeb84d8d7101f4e3efa45d27416d0c1a25 Merge: d988b0b866c2ae b887afb9b2362b Author: Bjorn Andersson Date: Sat May 10 11:50:38 2025 -0500 Merge branch '20250324-sm6350-videocc-v2-2-cc22386433f4@fairphone.com' into clk-for-6.16 Merge SM6350 video clock controller binding through topic branch to make it available for DeviceTree branch as well. commit b887afb9b2362b15c1ee5585df1fb8cf3a3384c6 Author: Konrad Dybcio Date: Mon Mar 24 09:41:02 2025 +0100 dt-bindings: clock: add SM6350 QCOM video clock bindings Add device tree bindings for video clock controller for SM6350 SoCs. Signed-off-by: Konrad Dybcio Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250324-sm6350-videocc-v2-2-cc22386433f4@fairphone.com Signed-off-by: Bjorn Andersson commit a0a287b4776a3e8d559383e057cca384b3255813 Author: Luca Weiss Date: Mon Mar 24 09:41:01 2025 +0100 arm64: dts: qcom: sm6350: Align reg properties with latest style While in the past the 'reg' properties were often written using decimal '0' for #address-cells = <2> & #size-cells = <2>, nowadays the style is to use hexadecimal '0x0' instead. Align this dtsi file to the new style to make it consistent, and don't use mixed 0x0 and 0 anymore. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-sm6350-videocc-v2-1-cc22386433f4@fairphone.com Signed-off-by: Bjorn Andersson commit 8881698cbd8df8966bcc5fd6b500f2b048d5f0fe Author: Luca Weiss Date: Fri Apr 4 10:42:22 2025 +0200 arm64: dts: qcom: sc7280: Stop setting dmic01 pinctrl for va-macro There's devices that don't have a DMIC connected to va-macro, so stop setting the pinctrl in sc7280.dtsi, but move it to the devices that actually are using it. No change in functionality is expected, just some boards with disabled va-macro are losing the pinctrl (herobrine-r1, villager-r0, zombie*). Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250404-sc7280-va-dmic01-v1-1-2862ddd20c48@fairphone.com Signed-off-by: Bjorn Andersson commit 8f5264d302e803e7ef82a61f9632a0d2ef67413f Author: Rob Clark Date: Wed May 7 08:47:22 2025 -0700 drm/msm/adreno: Remove MODULE_FIRMWARE()'s The driver handles the case where gpu fw is not in the initrd. OTOH it doesn't always handle the case where _some_ fw is in the initrd, but others are not. In particular the zap fw tends to be signed with an OEM specific key, so the paths/names differ across devices with the same SoC/GPU, so we cannot sanely list them with MODULE_FIRMWARE(). So MODULE_FIRMWARE() just ends up causing problems without actually solving anything. Remove them! Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/652195/ commit 5a9c1bea011fb42088ba08ceaa252fb20e695626 Author: Konrad Dybcio Date: Mon May 5 13:13:40 2025 +0200 drm/msm/a6xx: Disable rgb565_predicator on Adreno 7c3 This feature is supposed to be enabled with UBWC v4 or later. Implementations of this SKU feature an effective UBWC version of 3, so disable it, in line with the BSP kernel. Reported-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen Fixes: 192f4ee3e408 ("drm/msm/a6xx: Add support for Adreno 7c Gen 3 gpu") Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/651759/ Signed-off-by: Rob Clark commit 25f0f9be831e0d2a87196f42d6015eaeb4842091 Author: Akhil P Oommen Date: Sat Apr 19 20:21:36 2025 +0530 arm64: dts: qcom: x1e80100: Add OPPs up to Turbo L3 for GPU Now that we have ACD support for GPU, add additional OPPs up to Turbo L3 which are supported across all existing SKUs. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Acked-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/649354/ Signed-off-by: Rob Clark commit e153e35bb12fe14042e2ae793410a36202bc2424 Author: Akhil P Oommen Date: Sat Apr 19 20:21:35 2025 +0530 arm64: dts: qcom: x1e80100: Add ACD levels for GPU Update GPU node to include acd level values. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Acked-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/649352/ Signed-off-by: Rob Clark commit a4ca02454821cbc411e0bf16e527d392f188c218 Author: Krzysztof Kozlowski Date: Fri May 9 13:21:32 2025 +0200 spi: dt-bindings: nuvoton,wpcm450-fiu: Drop unrelated nodes from DTS example Binding example should not contain other nodes, including other providers like syscon, because this is redundant and only adds unnecessary bloat. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250509112130.123462-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 846656f278e803cb60161f0cba4ee90a058440cc Author: Krzysztof Kozlowski Date: Fri May 9 13:21:31 2025 +0200 spi: dt-bindings: fsl,dspi: Fix example indentation DTS example in the bindings should be indented with 2- or 4-spaces, so correct a mixture of different styles to keep consistent 4-spaces. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://patch.msgid.link/20250509112130.123462-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d5cc09847fa0df4034076f884de5957ec816dc52 Author: Krzysztof Kozlowski Date: Fri May 9 16:24:49 2025 +0200 regulator: da9121: Fix Wvoid-pointer-to-enum-cast warning 'subvariant_id' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: da9121-regulator.c:1132:24: error: cast to smaller integer type 'enum da9121_subvariant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250509142448.257199-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit b7016249819f5b61c5e59cea36e8c261091b48b3 Author: Kever Yang Date: Fri May 9 18:23:06 2025 +0800 dt-bindings: arm: rockchip: Add rk3562 evb2 board Add device tree documentation for rk3562-evb2-v10. Signed-off-by: Kever Yang Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250509102308.761424-4-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit 472a4e77a2070ffbf47eb6c934ae56d362eae992 Author: Kever Yang Date: Fri May 9 18:23:05 2025 +0800 dt-bindings: soc: rockchip: Add rk3562 syscon compatibles Add all syscon compatibles for rk3562. Signed-off-by: Kever Yang Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250509102308.761424-3-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit 01ccbe64f9e5702a530cca614f203d71462c67e1 Author: Kever Yang Date: Fri May 9 18:23:04 2025 +0800 dt-bindings: rockchip: pmu: Add rk3562 compatible Add the compatible for the pmu mfd on rk3562. Signed-off-by: Kever Yang Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250509102308.761424-2-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit 10b9ef4a514b25dea6eac24f25e3027866526800 Author: Jonas Karlman Date: Fri May 9 20:23:58 2025 +0000 arm64: dts: rockchip: Enable Ethernet controller on Radxa E20C The Radxa E20C has two GbE ports, LAN and WAN. The LAN port is provided using a GMAC controller and a YT8531C PHY and the WAN port is provided by an RTL8111H PCIe Ethernet controller. Enable support for the LAN port on Radxa E20C. Signed-off-by: Jonas Karlman Tested-by: Yao Zi Link: https://lore.kernel.org/r/20250509202402.260038-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 5eb28f461a1b368a57994cc3b3f2ba3154c00bb8 Author: Jonas Karlman Date: Fri May 9 20:23:57 2025 +0000 arm64: dts: rockchip: Add GMAC nodes for RK3528 Rockchip RK3528 has two Ethernet controllers based on Synopsys DWC Ethernet QoS IP. Add device tree nodes for the two Ethernet controllers in RK3528. Signed-off-by: Jonas Karlman Tested-by: Yao Zi Link: https://lore.kernel.org/r/20250509202402.260038-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 61bf658a4d95e8f982b6e66dea763bff57996349 Author: Yao Zi Date: Sat May 10 07:52:49 2025 +0000 clk: rockchip: Pass NULL as reg pointer when registering GRF MMC clocks This corrects the type and suppresses sparse warnings about passing plain integers as NULL pointer. Fixes: 621ba4d9f6db ("clk: rockchip: Support MMC clocks in GRF region") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505100302.YVtB1zhF-lkp@intel.com/ Signed-off-by: Yao Zi Link: https://lore.kernel.org/r/20250510075248.34006-2-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 1b83a9f41bd13dae09fabf594918ea36a9bc0cfc Author: Jacopo Mondi Date: Sat May 10 10:48:52 2025 +0200 media: amlogic: c3-mipi-csi2: Handle 64-bits division The kernel test robot reports the following error when building on Hexagon with hexagon-allmodconfig. ERROR: modpost: "__hexagon_divdi3" [drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.ko] undefined! The error is caused by using DIV_ROUND_UP() with a 64 bits divisor with a 32-bit dividend, which on Hexagon and clang-17 is resolved with a call to the __hexagon_divdi3() helper function, part of the compiler support library and not available when building Linux. Use DIV_ROUND_UP_ULL() to fix the build error and avoid calling the __hexagon_divdi3() helper function. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505101334.UHxNcUUO-lkp@intel.com/ Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit 938a79d0aa8dd0f75e4302a67006db4f45e1ce4e Author: Marc Zyngier Date: Sun Feb 9 14:19:05 2025 +0000 KVM: arm64: Validate FGT register descriptions against RES0 masks In order to point out to the unsuspecting KVM hacker that they are missing something somewhere, validate that the known FGT bits do not intersect with the corresponding RES0 mask, as computed at boot time. THis check is also performed at boot time, ensuring that there is no runtime overhead. Signed-off-by: Marc Zyngier commit 63d423a7635bca6d817a30adff29be58ee99c6d5 Author: Marc Zyngier Date: Sun Feb 9 14:05:01 2025 +0000 KVM: arm64: Switch to table-driven FGU configuration Defining the FGU behaviour is extremely tedious. It relies on matching each set of bits from FGT registers with am architectural feature, and adding them to the FGU list if the corresponding feature isn't advertised to the guest. It is however relatively easy to dump most of that information from the architecture JSON description, and use that to control the FGU bits. Let's introduce a new set of tables descripbing the mapping between FGT bits and features. Most of the time, this is only a lookup in an idreg field, with a few more complex exceptions. While this is obviously many more lines in a new file, this is mostly generated, and is pretty easy to maintain. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 397411c743c77a9c1d90f407b502010227a259dc Author: Marc Zyngier Date: Mon Jan 27 11:58:38 2025 +0000 KVM: arm64: Handle PSB CSYNC traps The architecture introduces a trap for PSB CSYNC that fits in the same EC as LS64. Let's deal with it in a similar way as LS64. It's not that we expect this to be useful any time soon anyway. Signed-off-by: Marc Zyngier commit ef6d7d2682d948df217db73985e0a159305c7743 Author: Marc Zyngier Date: Fri Jan 24 19:04:26 2025 +0000 KVM: arm64: Use KVM-specific HCRX_EL2 RES0 mask We do not have a computed table for HCRX_EL2, so statically define the bits we know about. A warning will fire if the architecture grows bits that are not handled yet. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 3ce9bbba935714c344bcff096973b6daa29cf857 Author: Marc Zyngier Date: Fri Jan 24 17:21:17 2025 +0000 KVM: arm64: Remove hand-crafted masks for FGT registers These masks are now useless, and can be removed. Signed-off-by: Marc Zyngier commit aed34b6d2134efcfaf4c123e02b1926bb789f5c3 Author: Marc Zyngier Date: Fri Jan 24 17:20:31 2025 +0000 KVM: arm64: Use computed FGT masks to setup FGT registers Flip the hyervisor FGT configuration over to the computed FGT masks. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 523923fd56671d6a73259577fe0d72f4454d354e Merge: 9c32cda43eb78f 976c4626c5f57d Author: Arnd Bergmann Date: Sat May 10 11:43:57 2025 +0200 Merge tag 'renesas-arm-defconfig-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.16 (take two) - Enable modular support for the Renesas RZ/G2L GPT and MSIOF sound in the ARM64 defconfig, - Enable more support for RZN1D-DB/EB in shmobile_defconfig. * tag 'renesas-arm-defconfig-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Enable more support for RZN1D-DB/EB arm64: defconfig: Add Renesas MSIOF sound support arm64: defconfig: Enable Renesas RZ/G2L GPT config arm: multi_v7_defconfig: Drop individual Renesas SoC entries arm: shmobile_defconfig: Drop individual Renesas SoC entries arm64: defconfig: Remove individual Renesas SoC entries soc: renesas: Kconfig: Enable SoCs by default when ARCH_RENESAS is set Link: https://lore.kernel.org/r/cover.1746798750.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit a6e160ead8e7fc8d22ed16cff721c05723c38926 Merge: 9c32cda43eb78f fb52f3226cab41 Author: Arnd Bergmann Date: Sat May 10 11:30:44 2025 +0200 Merge tag 'arm-gpio-set-conversion-for-v6.16-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into soc/arm ARM: convert board-file GPIO chips to using new value setters struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. We're in the process of converting all GPIO drivers to using the new API. This series converts all ARM board-file level controllers. * tag 'arm-gpio-set-conversion-for-v6.16-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: ARM: s3c/gpio: use new line value setter callbacks ARM: scoop/gpio: use new line value setter callbacks ARM: sa1100/gpio: use new line value setter callbacks ARM: orion/gpio: use new line value setter callbacks commit ef934c51cb44043da93c563aed3a13cfe016ccdf Merge: 93998bc476d578 7cfd76f086c640 Author: Arnd Bergmann Date: Sat May 10 11:12:22 2025 +0200 Merge tag 'tegra-for-6.16-arm-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt ARM: tegra: Device tree changes for v6.16-rc1 Use standard names for the APBDMA controller device tree nodes, add support for the ASUS Transformer Pad LTE TF300TL and clean up the Apalis evaluation board by removing the unused pcie-switch node. * tag 'tegra-for-6.16-arm-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: apalis-eval: Remove pcie-switch node ARM: tegra: Add device-tree for ASUS Transformer Pad LTE TF300TL ARM: tegra: Rename the apbdma nodename to match with common dma-controller binding Link: https://lore.kernel.org/r/20250509212604.2849901-2-treding@nvidia.com Signed-off-by: Arnd Bergmann commit 93998bc476d5781a5b534fb1700bf30337ceef96 Merge: a793e78ef69498 20440c7f9015a1 Author: Arnd Bergmann Date: Sat May 10 11:11:12 2025 +0200 Merge tag 'tegra-for-6.16-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt arm64: tegra: Device tree changes for v6.16-rc1 Enable IOMMU support for the internal DMA controller of the QSPI controller, add aliases for the I2C controllers on Tegra234 to match hardware block names as well as the UART-D alias on Jetson TX1, and enable PWM fans on Jetson TX1 and TX2. Clean up serial port device tree nodes, add missing DMA properties, enable the GPU on Jetson TX1 and Jetson TX2. Use an extended number of address- and size-cells on Tegra186 to mirror what is done on other chip generations. Enable CEC on developer kit devices. * tag 'tegra-for-6.16-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Wire up CEC to devkits arm64: tegra: Add CEC controller on Tegra210 arm64: tegra: Add fallback CEC compatibles arm64: tegra: Add uartd serial alias for Jetson TX1 module arm64: tegra: Bump #address-cells and #size-cells on Tegra186 arm64: tegra: p2180: Explicitly enable GPU arm64: tegra: p3310: Explicitly enable GPU arm64: tegra: Add DMA properties for Tegra186 and Tegra194 UARTs arm64: tegra: Drop remaining serial clock-names and reset-names arm64: tegra: Enable PWM fan on the Jetson TX2 Devkit arm64: tegra: Enable PWM fan on the Jetson TX1 Devkit arm64: tegra: Add I2C aliases for Tegra234 arm64: tegra: Configure QSPI clocks and add DMA Link: https://lore.kernel.org/r/20250509212604.2849901-3-treding@nvidia.com Signed-off-by: Arnd Bergmann commit 9477c3e68e0ada4655939b4d49fa79377f0882f3 Merge: 85751585e42829 39bb67edcc582b Author: Arnd Bergmann Date: Sat May 10 11:09:43 2025 +0200 Merge tag 'tee-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers Small TEE updates for v6.16 - Remove an unnecessary NULL check before release_firmware() in the OP-TEE driver - Prevent a size wrap in the TEE subsystem. The wrap would have been caught later in the code so no security consequences. * tag 'tee-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: tee: Prevent size calculation wraparound on 32-bit kernels tee: optee: smc: remove unnecessary NULL check before release_firmware() Link: https://lore.kernel.org/r/20250509065114.GA4188600@rayden Signed-off-by: Arnd Bergmann commit 752d0464b78a5b28682256ed7a057106119e1d1a Author: Yu Kuai Date: Tue May 6 20:49:03 2025 +0800 md: clean up accounting for issued sync IO It's no longer used and can be removed, also remove the field 'gendisk->sync_io'. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-10-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni commit e5797ae7033f39ae5fea49223337762c84ea08a0 Author: Yu Kuai Date: Tue May 6 20:49:02 2025 +0800 md: fix is_mddev_idle() If sync_speed is above speed_min, then is_mddev_idle() will be called for each sync IO to check if the array is idle, and inflight sync_io will be limited if the array is not idle. However, while mkfs.ext4 for a large raid5 array while recovery is in progress, it's found that sync_speed is already above speed_min while lots of stripes are used for sync IO, causing long delay for mkfs.ext4. Root cause is the following checking from is_mddev_idle(): t1: submit sync IO: events1 = completed IO - issued sync IO t2: submit next sync IO: events2 = completed IO - issued sync IO if (events2 - events1 > 64) For consequence, the more sync IO issued, the less likely checking will pass. And when completed normal IO is more than issued sync IO, the condition will finally pass and is_mddev_idle() will return false, however, last_events will be updated hence is_mddev_idle() can only return false once in a while. Fix this problem by changing the checking as following: 1) mddev doesn't have normal IO completed; 2) mddev doesn't have normal IO inflight; 3) if any member disks is partition, and all other partitions doesn't have IO completed. Also change rdev->last_events to unsigned long to cleanup type casting. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-9-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni commit 03720d82d730d49f517b7ae04a4a4b6a90f5082a Author: Yu Kuai Date: Tue May 6 20:49:01 2025 +0800 md: add a new api sync_io_depth Currently if sync speed is above speed_min and below speed_max, md_do_sync() will wait for all sync IOs to be done before issuing new sync IO, means sync IO depth is limited to just 1. This limit is too low, in order to prevent sync speed drop conspicuously after fixing is_mddev_idle() in the next patch, add a new api for limiting sync IO depth, the default value is 32. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-8-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni commit 7168be3c8a6b76ba10a51615a5bdf985dd502226 Author: Yu Kuai Date: Tue May 6 20:49:00 2025 +0800 md: record dm-raid gendisk in mddev Following patch will use gendisk to check if there are normal IO completed or inflight, to fix a problem in mdraid that foreground IO can be starved by background sync IO in later patches. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-7-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni commit f2987c5816bda01a8ffdd4eb5dfaaa2b41b67039 Author: Yu Kuai Date: Tue May 6 20:48:59 2025 +0800 block: export API to get the number of bdev inflight IO - rename part_in_{flight, flight_rw} to bdev_count_{inflight, inflight_rw} - export bdev_count_inflight, to fix a problem in mdraid that foreground IO can be starved by background sync IO in later patches Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-6-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke commit 6b6c3a97abdebfafa25ef0f4b6b0b8b412b57bbb Author: Yu Kuai Date: Tue May 6 20:48:58 2025 +0800 block: clean up blk_mq_in_flight_rw() Also add comment for part_inflight_show() for the difference between bio-based and rq-based device. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-4-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig commit f5482ee5edb9a7aeb020e5896efab67dc0417215 Author: Yu Kuai Date: Tue May 6 20:48:56 2025 +0800 block: WARN if bdev inflight counter is negative Which means there is a bug for related bio-based disk driver, or blk-mq for rq-based disk, it's better not to hide the bug. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-3-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry commit 5b8f19aee47414b4cf76b6ea0310b2937ebb97e7 Author: Yu Kuai Date: Tue May 6 20:48:55 2025 +0800 block: reuse part_in_flight_rw for part_in_flight They are almost identical, to make code cleaner. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-2-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Hannes Reinecke commit c151919080ad4dc98bb40bc9cdcde412d72f8b23 Author: Yu Kuai Date: Tue May 6 20:48:54 2025 +0800 blk-mq: remove blk_mq_in_flight() After commit 7be835694dae ("block: fix that util can be greater than 100%"), it's not used and can be removed. Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-1-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Hannes Reinecke commit 9a5f8c7a81cde01738d4fa25624669a3d6f859e3 Author: Rob Herring (Arm) Date: Mon May 5 17:01:37 2025 -0500 dt-bindings: PCI: Convert v3,v360epc-pci to DT schema Convert the v3,v360epc-pci binding to DT schema format. Add "clocks" which was not documented and is required. Drop "syscon" which was documented, but is not used. Drop the "v3,v360epc-pci" compatible by itself as this device is only used on the Arm Integrator/AP and not likely going to be used anywhere else at this point. Signed-off-by: Rob Herring (Arm) Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20250505220139.2202164-1-robh@kernel.org commit f9fa01229339daea915c8f2a3df8d6f6a89f9b84 Merge: 806690425a5caa 78184f6e3db16c Author: Dave Airlie Date: Sat May 10 16:13:46 2025 +1000 Merge tag 'drm-misc-next-2025-05-08' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v6.16-rc1: Cross-subsystem Changes: - Change vsprintf %p4cn to %p4chR, remove %p4cn. Core Changes: - Documentation updates (fb rendering, actual_brightness) Driver Changes: - Small fixes to appletbdrm, panthor, st7571-i2c, rockchip, renesas, panic handler, gpusvm, vkms, panel timings. - Add AUO B140QAN08.H, BOE NE140WUM-N6S, CSW MNE007QS3-8, BOE TD4320 panels. - Convert rk3066_hdmi to bridge driver. - Improve HPD on anx7625. - Speed up loading tegra firmware, and other small fixes to tegra & host1x. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/5428be12-fc08-4e28-8c5f-85d73b8a7e04@linux.intel.com commit 7220eabff8cb4af3b93cd021aa853b9f5df2923f Author: Andrii Nakryiko Date: Fri May 9 11:03:50 2025 -0700 bpf, docs: document open-coded BPF iterators Extract BPF open-coded iterators documentation spread out across a few original commit messages ([0], [1]) into a dedicated doc section under Documentation/bpf/bpf_iterators.rst. Also make explicit expectation that BPF iterator program type should be accompanied by a corresponding open-coded BPF iterator implementation, going forward. [0] https://lore.kernel.org/all/20230308184121.1165081-3-andrii@kernel.org/ [1] https://lore.kernel.org/all/20230308184121.1165081-4-andrii@kernel.org/ Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20250509180350.2604946-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 7916eddc533248ec64f5b68657c11b4fca057fab Author: Herbert Xu Date: Sat May 10 13:10:22 2025 +0800 crypto: powerpc/poly1305 - Add poly1305_emit_arch wrapper Add poly1305_emit_arch with fallback instead of calling assembly directly. This is because the state format differs between p10 and that of the generic implementation. Reported-by: Venkat Rao Bagalkote Reported-by: Eric Biggers Fixes: 14d31979145d ("crypto: powerpc/poly1305 - Add block-only interface") Signed-off-by: Herbert Xu commit 2612378d442aad23448053c47f34eb17f6209e67 Author: Hans Zhang <18255117159@163.com> Date: Mon Apr 28 20:42:30 2025 +0800 PCI: dwc: ep: Use FIELD_GET() where applicable Use FIELD_GET() to simplify the code extracting the register values. No functional change intended. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: commit message fixup] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250428124230.112648-1-18255117159@163.com commit 648c7fb16f609c53d2659fefb5088af619485ab4 Author: Eric Biggers Date: Fri May 9 20:59:59 2025 -0700 lib/crc: make arch-optimized code use subsys_initcall Make the architecture-optimized CRC code do its CPU feature checks in subsys_initcalls instead of arch_initcalls. This makes it consistent with arch/*/lib/crypto/ and ensures that it runs after initcalls that possibly could be a prerequisite for kernel-mode FPU, such as x86's xfd_update_static_branch() and loongarch's init_euen_mask(). Note: as far as I can tell, x86's xfd_update_static_branch() isn't *actually* needed for kernel-mode FPU. loongarch's init_euen_mask() is needed to enable save/restore of the vector registers, but loongarch doesn't yet have any CRC or crypto code that uses vector registers anyway. Regardless, let's be consistent with arch/*/lib/crypto/ and robust against any potential future dependency on an arch_initcall. Link: https://lore.kernel.org/r/20250510035959.87995-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 390e4cfe87cb99c80614235cbc4651c3b315a9c9 Author: Chris Morgan Date: Wed May 7 15:19:21 2025 -0500 clk: sunxi-ng: h616: Add LVDS reset for LCD TCON Add the required LVDS reset for the LCD TCON. Note that while this reset is exposed for the T507, H616, and H700 only the H700 has an LCD controller. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin Reviewed-by: Andre Przywara Link: https://patch.msgid.link/20250507201943.330111-3-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit 20fb4ac9cda06527cf60c5ec7dda7c463c9c81be Author: Chris Morgan Date: Wed May 7 15:19:20 2025 -0500 dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset Add the required LVDS reset binding for the LCD TCON. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin Reviewed-by: Andre Przywara Link: https://patch.msgid.link/20250507201943.330111-2-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit c8ce7db0ca83745a6b439c8b22cba49b7fb095e2 Merge: 5a8cb231614ff8 be48b8790a0b92 Author: Martin KaFai Lau Date: Fri May 9 17:51:16 2025 -0700 Merge branch 'ktls-sockmap-fix-missing-uncharge-operation-and-add-selfttest' Jiayuan Chen says: ==================== ktls, sockmap: Fix missing uncharge operation and add selfttest Cong reported a warning when running ./test_sockmp: https://lore.kernel.org/bpf/aAmIi0vlycHtbXeb@pop-os.localdomain/T/#t ------------[ cut here ]------------ WARNING: CPU: 1 PID: 40 at net/ipv4/af_inet.c inet_sock_destruct+0x173/0x1d5 Tainted: [W]=WARN Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 Workqueue: events sk_psock_destroy RIP: 0010:inet_sock_destruct+0x173/0x1d5 RSP: 0018:ffff8880085cfc18 EFLAGS: 00010202 RAX: 1ffff11003dbfc00 RBX: ffff88801edfe3e8 RCX: ffffffff822f5af4 RDX: 0000000000000007 RSI: dffffc0000000000 RDI: ffff88801edfe16c RBP: ffff88801edfe184 R08: ffffed1003dbfc31 R09: 0000000000000000 R10: ffffffff822f5ab7 R11: ffff88801edfe187 R12: ffff88801edfdec0 R13: ffff888020376ac0 R14: ffff888020376ac0 R15: ffff888020376a60 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556365155830 CR3: 000000001d6aa000 CR4: 0000000000350ef0 Call Trace: __sk_destruct+0x46/0x222 sk_psock_destroy+0x22f/0x242 process_one_work+0x504/0x8a8 ? process_one_work+0x39d/0x8a8 ? __pfx_process_one_work+0x10/0x10 ? worker_thread+0x44/0x2ae ? __list_add_valid_or_report+0x83/0xea ? srso_return_thunk+0x5/0x5f ? __list_add+0x45/0x52 process_scheduled_works+0x73/0x82 worker_thread+0x1ce/0x2ae When we specify apply_bytes, we divide the msg into multiple segments, each with a length of 'send', and every time we send this part of the data using tcp_bpf_sendmsg_redir(), we use sk_msg_return_zero() to uncharge the memory of the specified 'send' size. However, if the first segment of data fails to send, for example, the peer's buffer is full, we need to release all of the msg. When releasing the msg, we haven't uncharged the memory of the subsequent segments. This modification does not make significant logical changes, but only fills in the missing uncharge places. This issue has existed all along, until it was exposed after we added the apply test in test_sockmap: commit 3448ad23b34e ("selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap") ==================== Link: https://patch.msgid.link/20250425060015.6968-1-jiayuan.chen@linux.dev Signed-off-by: Martin KaFai Lau commit be48b8790a0b921c0957dacf958f320cae477dec Author: Jiayuan Chen Date: Fri Apr 25 13:59:58 2025 +0800 selftests/bpf: Add test to cover sockmap with ktls The selftest can reproduce an issue where we miss the uncharge operation when freeing msg, which will cause the following warning. We fixed the issue and added this reproducer to selftest to ensure it will not happen again. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 40 at net/ipv4/af_inet.c inet_sock_destruct+0x173/0x1d5 Tainted: [W]=WARN Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 Workqueue: events sk_psock_destroy RIP: 0010:inet_sock_destruct+0x173/0x1d5 RSP: 0018:ffff8880085cfc18 EFLAGS: 00010202 RAX: 1ffff11003dbfc00 RBX: ffff88801edfe3e8 RCX: ffffffff822f5af4 RDX: 0000000000000007 RSI: dffffc0000000000 RDI: ffff88801edfe16c RBP: ffff88801edfe184 R08: ffffed1003dbfc31 R09: 0000000000000000 R10: ffffffff822f5ab7 R11: ffff88801edfe187 R12: ffff88801edfdec0 R13: ffff888020376ac0 R14: ffff888020376ac0 R15: ffff888020376a60 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556365155830 CR3: 000000001d6aa000 CR4: 0000000000350ef0 Call Trace: __sk_destruct+0x46/0x222 sk_psock_destroy+0x22f/0x242 process_one_work+0x504/0x8a8 ? process_one_work+0x39d/0x8a8 ? __pfx_process_one_work+0x10/0x10 ? worker_thread+0x44/0x2ae ? __list_add_valid_or_report+0x83/0xea ? srso_return_thunk+0x5/0x5f ? __list_add+0x45/0x52 process_scheduled_works+0x73/0x82 worker_thread+0x1ce/0x2ae Acked-by: John Fastabend Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250425060015.6968-3-jiayuan.chen@linux.dev commit 79f0c39ae7d3dc628c01b02f23ca5d01f9875040 Author: Jiayuan Chen Date: Fri Apr 25 13:59:57 2025 +0800 ktls, sockmap: Fix missing uncharge operation When we specify apply_bytes, we divide the msg into multiple segments, each with a length of 'send', and every time we send this part of the data using tcp_bpf_sendmsg_redir(), we use sk_msg_return_zero() to uncharge the memory of the specified 'send' size. However, if the first segment of data fails to send, for example, the peer's buffer is full, we need to release all of the msg. When releasing the msg, we haven't uncharged the memory of the subsequent segments. This modification does not make significant logical changes, but only fills in the missing uncharge places. This issue has existed all along, until it was exposed after we added the apply test in test_sockmap: commit 3448ad23b34e ("selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap") Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Reported-by: Cong Wang Closes: https://lore.kernel.org/bpf/aAmIi0vlycHtbXeb@pop-os.localdomain/T/#t Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Acked-by: John Fastabend Reviewed-by: Cong Wang Link: https://lore.kernel.org/r/20250425060015.6968-2-jiayuan.chen@linux.dev commit 52d2f6857c33c0331fb3c52528181b7f3d96c749 Author: Zong-Zhe Yang Date: Mon May 5 15:24:40 2025 +0800 wifi: rtw89: declare MLO support if prerequisites are met When the following prerequisites are met, driver will enable support_mlo. It means that driver will declare WIPHY_FLAG_SUPPORTS_MLO, and then deal with MLO related things. The main prerequisites are as below. 1. all prerequisites for running with chanctx 2. FW feature NOTIFY_AP_INFO Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-12-pkshih@realtek.com commit 9dd85e739ce0765f022014c3e0713e1007d7ef60 Author: Zong-Zhe Yang Date: Mon May 5 15:24:39 2025 +0800 wifi: rtw89: debug: add mlo_mode dbgfs Add an dbgfs mlo_mode to get/set MLO mode. And, support to trigger MLSR switching. Setting it will automatically disable MLO Dynamic Mechanism (DM). Then MLO things can follow commands via dbgfs mlo_mode instead of MLO DM. The disabled DM(s) can be checked/cleared via dbgfs disable_dm. The following is an use example. Read it to show current MLD status. $ cat mlo_mode MLD(s) status: (MLO DM: enable) #0: MLO mode 0, valid 0x6, active 0x2 Write it to switch to MLSR on link id 2. $ echo 0 2 > mlo_mode $ cat mlo_mode MLD(s) status: (MLO DM: disable) #0: MLO mode 0, valid 0x6, active 0x4 Besides, to be safer, add RWLOCK attribute to dbgfs disable_dm. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-11-pkshih@realtek.com commit 18dab90f56531863611fd6b090c4f6e513fe35cf Author: Po-Hao Huang Date: Mon May 5 15:24:38 2025 +0800 wifi: rtw89: debug: add FW log component for MLO This allows showing MLO related logs when FW debug mode is on. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-10-pkshih@realtek.com commit 0c400c0a687d2680e533fb0089cf42c967395c6e Author: Po-Hao Huang Date: Mon May 5 15:24:37 2025 +0800 wifi: rtw89: debug: add MLD table dump Add definition for MLD table dump, this is for debug purpose only. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-9-pkshih@realtek.com commit 23a5c37ffb1ae61fce949664947c14deaac285b8 Author: Po-Hao Huang Date: Mon May 5 15:24:36 2025 +0800 wifi: rtw89: debug: extend dbgfs for MLO Extend dbgfs vif/sta info to show current designated link. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-8-pkshih@realtek.com commit e264a4d1c75f5a325385401e2299c268215aace5 Author: Po-Hao Huang Date: Mon May 5 15:24:35 2025 +0800 wifi: rtw89: add MLO track for MLSR switch decision Add MLSR switch mechanism based on tracking RSSI. Switch to a 2 GHz link (if any) when average RSSI is lower than threshold -53. And, switch out from a 2 GHz link when average RSSI is larger than threshold -38. The sequence of MLSR switch handling is like the following. 1. initialize target link and configure to PS mode 2. configure current designated link to PS mode 3. configure target link to non-PS mode 4. deinitialize currently active links except target link The above flow also implies that target link becomes new designated link. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-7-pkshih@realtek.com commit c3dba0653b1bb460653c60ec5b3112c5821769f9 Author: Zong-Zhe Yang Date: Mon May 5 15:24:34 2025 +0800 wifi: rtw89: add handling of mlo_link_cfg H2C command and C2H event The mlo_link_cfg H2C command is used to tell FW to enter/leave PS mode on a given link. And, need to wait for status of C2H event to ensure if FW deals with it successfully. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-6-pkshih@realtek.com commit 5b6247de57d76b26cbeded6c27dec52ac62c2f20 Author: Zong-Zhe Yang Date: Mon May 5 15:24:33 2025 +0800 wifi: rtw89: chan: re-calculate MLO DBCC mode during setting channel Wi-Fi 7 chips have dual HW bands. After impending MLO support, they can work with HW-[0] / HW-[1] / HW-[0,1] according to active links. So, during setting channel, also re-calculate the MLO DBCC mode flag. Then, leaf chip functions of setting channel can configure with HWs based on current case. Besides, tweak the initial and idle MLO DBCC mode of Wi-Fi 7 chips to MLO_1_PLUS_1_1RF to work with dual HW bands. And, after disconnecting, due to no active links, MLO DBCC mode will re-calculate to idle case, i.e. MLO_1_PLUS_1_1RF. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-5-pkshih@realtek.com commit a8ba4acab7db25770272f270fa0c6c1d7e8124f9 Author: Po-Hao Huang Date: Mon May 5 15:24:32 2025 +0800 wifi: rtw89: send nullfunc based on the given link The nullfunc sender function is link specific. Use core_tx_write_link with sw_mld flag to TX the nullfunc via the given link. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-4-pkshih@realtek.com commit 829bd3599ae2af4f55d98e225f0f93a2cde1321c Author: Po-Hao Huang Date: Mon May 5 15:24:31 2025 +0800 wifi: rtw89: allow driver to do specific band TX for MLO For data packets that can be sent on any band, fill in main mac_id and let HW decide. For packets that we wish to transmit on specific band, fill in sw_mld field so HW would only send it on that band. Main mac_id is the corresponding mac_id on band 0. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-3-pkshih@realtek.com commit 0f34fbd274b85da2f3c12735090fb8a66fd8ca33 Author: Zong-Zhe Yang Date: Mon May 5 15:24:30 2025 +0800 wifi: rtw89: extract link part from core tx write function Extract core_tx_write_link from core_tx_write to accept given links as parameters. To make the follow-up changes of TX description more clear, tweak SW functions to split things ahead. (don't change logic at all) Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250505072440.45113-2-pkshih@realtek.com commit b7f0cc647e52296a3d4dd727b6479dcd6d7e364e Author: Yuuki NAGAO Date: Sat May 3 09:32:27 2025 +0900 wifi: rtw88: rtw8822bu VID/PID for BUFFALO WI-U2-866DM Add VID/PID 0411/03d1 for recently released BUFFALO WI-U2-866DM USB WiFi adapter. Signed-off-by: Yuuki NAGAO Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250503003227.6673-1-wf.yn386@gmail.com commit 2c17afde9ff6713f3e080ed1ea1a4bd7480be9aa Author: Bitterblue Smith Date: Fri May 2 14:49:34 2025 +0300 wifi: rtw88: Handle RTL8723D(S) with blank efuse Some users have RTL8723DS chips with nearly blank efuse. Currently these chips cannot connect when using rtw88, but they do work using the old out-of-tree driver. Use reasonable default values for TX power, antenna configuration, and crystal cap if the chip's efuse is missing these things. RTL8723D can use the same default values as RTL8703B, so simply move the code from rtl8703b_read_efuse() to the shared function __rtl8723x_read_efuse(). Link: https://github.com/lwfinger/rtw88/issues/157 Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/5734afe7-0870-40b2-acd4-5657a02d7c56@gmail.com commit 0ffa1ba81b35ba147c9df6206a61499a156b0128 Author: Bitterblue Smith Date: Fri May 2 14:49:01 2025 +0300 wifi: rtw88: Fix RX aggregation settings for RTL8723DS Use the same RX aggregation size and timeout used by the out-of-tree RTL8723DS driver. Also set mystery bit 31 of REG_RXDMA_AGG_PG_TH. This improves the RX speed from ~44 Mbps to ~67 Mbps. Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/4c79fdc1-54bc-4986-9931-bb3ceb418b97@gmail.com commit 0b28182c73a3d013bcabbb890dc1070a8388f55a Merge: 6a63b01567fb2b 534df0c1724b7e Author: Jakub Kicinski Date: Fri May 9 17:29:45 2025 -0700 Merge branch 'refactoring-designware-vlan-code' Boon Khai Ng says: ==================== Refactoring designware VLAN code. Refactoring designware VLAN code and introducing support for hardware-accelerated VLAN stripping for dwxgmac2 IP, the current patch set consists of two key changes: 1) Refactoring VLAN Functions: The first change involves moving common VLAN-related functions of the DesignWare Ethernet MAC into a dedicated file, stmmac_vlan.c. This refactoring aims to improve code organization and maintainability by centralizing VLAN handling logic. 2) Renaming all the functions, symbols and macro into more generic name and consolidate the same function pointer into one. 3) Enabling VLAN for 10G Ethernet MAC IP: The second change enables VLAN support specifically for the 10G Ethernet MAC IP. This enhancement leverages the hardware capabilities of the to perform VLAN stripping, Changes from previous submmited patches. v5: a) Divided the refactor patch in to two patches, first patch is to move the code into the separate file and second patch to update the symbol name b) get the dwmac4 vlan function up to date and port to stmmac_vlan.c c) remove the inline function in function pointer and use only static function defeination. d) Remove the outer parenthese that is not needed on the 1 line return statement. v4: a) Updated the commit message to explain the descriptors behaviour on different hardware. b) Updated the perfect_match variable with the correct byte order. Link: https://lore.kernel.org/20250421162930.10237-1-boon.khai.ng@altera.com v3: https://lore.kernel.org/20250408081354.25881-1-boon.khai.ng@altera.com v2: https://lore.kernel.org/BL3PR11MB5748AC693D9D61FB56DB7313C1F32@BL3PR11MB5748.namprd11.prod.outlook.com v1: https://lore.kernel.org/DM8PR11MB5751E5388AEFCFB80BCB483FC13FA@DM8PR11MB5751.namprd11.prod.outlook.com ==================== Link: https://patch.msgid.link/20250507063812.34000-1-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski commit 534df0c1724b7e6466756f8e0d8090a7f6d0021f Author: Boon Khai Ng Date: Wed May 7 14:38:12 2025 +0800 net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping This patch adds support for MAC level VLAN tag stripping for the dwxgmac2 IP. This feature can be configured through ethtool. If the rx-vlan-offload is off, then the VLAN tag will be stripped by the driver. If the rx-vlan-offload is on then the VLAN tag will be stripped by the MAC. Signed-off-by: Boon Khai Ng Reviewed-by: Matthew Gerlach Link: https://patch.msgid.link/20250507063812.34000-4-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski commit f3acaf7364a6bdc031e039a3d885f4a3ba3be918 Author: Boon Khai Ng Date: Wed May 7 14:38:11 2025 +0800 net: stmmac: stmmac_vlan: rename VLAN functions and symbol to generic symbol. With the VLAN handling code decoupled from dwmac4 and dwxgmac2 and consolidated in stmmac_vlan.c, functions and symbols are renamed to use a generic prefix. This change improves code clarity and maintainability by reflecting the shared nature of the VLAN logic, facilitating future enhancements or reuse without being tied to specific MAC implementations. No functional changes are introduced in this patch. Note: The dwxgmac2_update_vlan_hash function is not combined due to minor differences in setting the VTFE bit. A separate fix patch will be submitted to align its behavior with the dwmac4 driver. Signed-off-by: Boon Khai Ng Link: https://patch.msgid.link/20250507063812.34000-3-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski commit 1d2c7a5fee31b68d6becd3119a3a1c71399b34b1 Author: Boon Khai Ng Date: Wed May 7 14:38:10 2025 +0800 net: stmmac: Refactor VLAN implementation Refactor VLAN implementation by moving common code for DWMAC4 and DWXGMAC IPs into a separate VLAN module. VLAN implementation for DWMAC4 and DWXGMAC differs only for CSR base address, the descriptor for the VLAN ID and VLAN VALID bit field. The descriptor format for VLAN is not moved to the common code due to hardware-specific differences between DWMAC4 and DWXGMAC. For the DWMAC4 IP, the Receive Normal Descriptor 0 (RDES0) is formatted as follows: 31 0 ------------------------ ----------------------- RDES0| Inner VLAN TAG [31:16] | Outer VLAN TAG [15:0] | ------------------------ ----------------------- For the DWXGMAC IP, the RDES0 format varies based on the Tunneled Frame bit (TNP): a) For Non-Tunneled Frame (TNP=0) 31 0 ------------------------ ----------------------- RDES0| Inner VLAN TAG [31:16] | Outer VLAN TAG [15:0] | ------------------------ ----------------------- b) For Tunneled Frame (TNP=1) 31 8 7 3 2 0 --------------------- ------------------ ------- RDES0| VNID/VSID | Reserved | OL2L3 | --------------------- ------------------ ------ The logic for handling tunneled frames is not yet implemented in the dwxgmac2_wrback_get_rx_vlan_tci() function. Therefore, it is prudent to maintain separate functions within their respective descriptor driver files (dwxgmac2_descs.c and dwmac4_descs.c). Signed-off-by: Boon Khai Ng Link: https://patch.msgid.link/20250507063812.34000-2-boon.khai.ng@altera.com Signed-off-by: Jakub Kicinski commit 6a63b01567fb2bb49830daf7329c290a4b68d716 Merge: 3c9ff6eb2de5d0 4e1ccc8e52e5eb Author: Jakub Kicinski Date: Fri May 9 17:09:37 2025 -0700 Merge tag 'batadv-next-pullrequest-20250509' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - constify and move broadcast addr definition, Matthias Schiffer - remove start/stop queue function for mesh-iface, by Antonio Quartulli - switch to crc32 header for crc32c, by Sven Eckelmann - drop unused net_namespace.h include, by Sven Eckelmann * tag 'batadv-next-pullrequest-20250509' of git://git.open-mesh.org/linux-merge: batman-adv: Drop unused net_namespace.h include batman-adv: Switch to crc32 header for crc32c batman-adv: no need to start/stop queue on mesh-iface batman-adv: constify and move broadcast addr definition batman-adv: Start new development cycle ==================== Link: https://patch.msgid.link/20250509091041.108416-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 3c9ff6eb2de5d06a4cebaa46bf4bbbab491e9110 Author: Vladimir Oltean Date: Thu May 8 17:46:30 2025 +0300 net: mvpp2: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the mvpp2 driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. Note that on the !port->hwtstamp condition, the old code used to fall through in mvpp2_ioctl(), and return either -ENOTSUPP if !port->phylink, or -EOPNOTSUPP, in phylink_mii_ioctl(). Keep the test for port->hwtstamp in the newly introduced net_device_ops, but consolidate the error code to just -EOPNOTSUPP. The other one is documented as NFS-specific, it's best to avoid it anyway. Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250508144630.1979215-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 17c6c5a09df0da4f7133ac0099aa9b4c892f89fc Author: Vladimir Oltean Date: Thu May 8 17:36:59 2025 +0300 net: gianfar: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the gianfar driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. Don't propagate the unnecessary "config.flags = 0;" assignment to gfar_hwtstamp_get(), because dev_get_hwtstamp() provides a zero initialized struct kernel_hwtstamp_config. After removing timestamping logic from gfar_ioctl(), the rest is equivalent to phy_do_ioctl_running(), so provide that directly as our ndo_eth_ioctl() implementation. Signed-off-by: Vladimir Oltean Tested-by: Vladimir Oltean # LS1021A Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250508143659.1944220-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit d27c6e8975c64846e54a29e86925372d489c6d2c Author: Vladimir Oltean Date: Thu May 8 16:41:02 2025 +0300 net: dpaa2-eth: add ndo_hwtstamp_get() implementation Allow SIOCGHWTSTAMP to retrieve the current timestamping settings on DPNIs. This reflects what has been done in dpaa2_eth_hwtstamp_set(). Tested with hwstamp_ctl -i endpmac17. Before the change, it prints "Device driver does not have support for non-destructive SIOCGHWTSTAMP." After the change, it retrieves the previously set configuration. Signed-off-by: Vladimir Oltean Tested-by: Vladimir Oltean # LX2160A Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250508134102.1747075-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b6e79c5da8c2fa44b24c1bb1b6effe8f6d5cd92f Author: Vladimir Oltean Date: Thu May 8 16:41:01 2025 +0300 net: dpaa2-eth: convert to ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the DPAA2 Ethernet driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. This driver only responds to SIOCSHWTSTAMP (not SIOCGHWTSTAMP) so convert just that. Signed-off-by: Vladimir Oltean Tested-by: Vladimir Oltean # LX2160A Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250508134102.1747075-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 4b3f6fb8d0a19f8e0e9dddd8c4db6733cca0316d Merge: 6c14058edfd01c c2d0b7da611a80 Author: Jakub Kicinski Date: Fri May 9 16:40:24 2025 -0700 Merge branch 'dpaa_eth-conversion-to-ndo_hwtstamp_get-and-ndo_hwtstamp_set' Vladimir Oltean says: ==================== dpaa_eth conversion to ndo_hwtstamp_get() and ndo_hwtstamp_set() This is part of the effort to finalize the conversion of drivers to the dedicated hardware timestamping API. In the case of the DPAA1 Ethernet driver, a bit more care is needed, because dpaa_ioctl() looks a bit strange. It handles the "set" IOCTL but not the "get", and even the phylink_mii_ioctl() portion could do with some cleanup. ==================== Link: https://patch.msgid.link/20250508124753.1492742-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit c2d0b7da611a80596442f453dbf738623719521f Author: Vladimir Oltean Date: Thu May 8 15:47:53 2025 +0300 net: dpaa_eth: simplify dpaa_ioctl() phylink_mii_ioctl() handles multiple ioctls in addition to just SIOCGMIIREG: SIOCGMIIPHY, SIOCSMIIREG. Don't filter these out. Also, phylink can handle the case where net_dev->phydev is NULL (like optical SFP module, fixed-link). Be like other drivers and let phylink do so without any driver-side call filtering. Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Acked-by: Madalin Bucur Link: https://patch.msgid.link/20250508124753.1492742-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 7bf230556bfafd614b62c4242431a7a77711e99c Author: Vladimir Oltean Date: Thu May 8 15:47:52 2025 +0300 net: dpaa_eth: add ndo_hwtstamp_get() implementation Allow SIOCGHWTSTAMP to retrieve the current timestamping settings on DPAA1 interfaces. This reflects what has been done in dpaa_hwtstamp_set(). Tested with hwstamp_ctl -i fm1-mac9. Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Acked-by: Madalin Bucur Link: https://patch.msgid.link/20250508124753.1492742-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b45bf3f84ec410e6d392b8f755b5e5470f01deeb Author: Vladimir Oltean Date: Thu May 8 15:47:51 2025 +0300 net: dpaa_eth: convert to ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert the DPAA1 driver to the new API, so that the ndo_eth_ioctl() path can be removed completely. This driver only responds to SIOCSHWTSTAMP (not SIOCGHWTSTAMP) so convert just that. Signed-off-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Acked-by: Madalin Bucur Link: https://patch.msgid.link/20250508124753.1492742-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 6c14058edfd01cdc0d3018b9069643b0da7c3e80 Author: Vladimir Oltean Date: Thu May 8 12:52:36 2025 +0300 net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() New timestamping API was introduced in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping") from kernel v6.6. It is time to convert DSA to the new API, so that the ndo_eth_ioctl() path can be removed completely. Move the ds->ops->port_hwtstamp_get() and ds->ops->port_hwtstamp_set() calls from dsa_user_ioctl() to dsa_user_hwtstamp_get() and dsa_user_hwtstamp_set(). Due to the fact that the underlying ifreq type changes to kernel_hwtstamp_config, the drivers and the Ocelot switchdev front-end, all hooked up directly or indirectly, must also be converted all at once. The conversion also updates the comment from dsa_port_supports_hwtstamp(), which is no longer true because kernel_hwtstamp_config is kernel memory and does not need copy_to_user(). I've deliberated whether it is necessary to also update "err != -EOPNOTSUPP" to a more general "!err", but all drivers now either return 0 or -EOPNOTSUPP. The existing logic from the ocelot_ioctl() function, to avoid configuring timestamping if the PHY supports the operation, is obsoleted by more advanced core logic in dev_set_hwtstamp_phylib(). This is only a partial preparation for proper PHY timestamping support. None of these switch driver currently sets up PTP traps for PHY timestamping, so setting dev->see_all_hwtstamp_requests is not yet necessary and the conversion is relatively trivial. Signed-off-by: Vladimir Oltean Tested-by: Vladimir Oltean # felix, sja1105, mv88e6xxx Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250508095236.887789-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 0df6932485a07f0fc44a3379038d5853cbbb505c Author: Donald Hunter Date: Thu May 8 12:21:02 2025 +0100 tools: ynl: handle broken pipe gracefully in CLI When sending YNL CLI output into a pipe, closing the pipe causes a BrokenPipeError. E.g. running the following and quitting less: ./tools/net/ynl/pyynl/cli.py --family rt-link --dump getlink | less Traceback (most recent call last): File "/home/donaldh/net-next/./tools/net/ynl/pyynl/cli.py", line 160, in main() ~~~~^^ File "/home/donaldh/net-next/./tools/net/ynl/pyynl/cli.py", line 142, in main output(reply) ~~~~~~^^^^^^^ File "/home/donaldh/net-next/./tools/net/ynl/pyynl/cli.py", line 97, in output pprint.PrettyPrinter().pprint(msg) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ [...] BrokenPipeError: [Errno 32] Broken pipe Consolidate the try block for ops and notifications, and gracefully handle the BrokenPipeError by adding an exception handler to the consolidated try block. Signed-off-by: Donald Hunter Link: https://patch.msgid.link/20250508112102.63539-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 1b2900db0119c02e6445bb61ec3fba982d10cc8d Author: Gal Pressman Date: Thu May 8 13:30:34 2025 +0300 ethtool: Block setting of symmetric RSS when non-symmetric rx-flow-hash is requested Symmetric RSS hash requires that: * No other fields besides IP src/dst and/or L4 src/dst are set * If src is set, dst must also be set This restriction was only enforced when RXNFC was configured after symmetric hash was enabled. In the opposite order of operations (RXNFC then symmetric enablement) the check was not performed. Perform the sanity check on set_rxfh as well, by iterating over all flow types hash fields and making sure they are all symmetric. Introduce a function that returns whether a flow type is hashable (not spec only) and needs to be iterated over. To make sure that no one forgets to update the list of hashable flow types when adding new flow types, a static assert is added to draw the developer's attention. The conversion of uapi #defines to enum is not ideal, but as Jakub mentioned [1], we have precedent for that. [1] https://lore.kernel.org/netdev/20250324073509.6571ade3@kernel.org/ Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250508103034.885536-1-gal@nvidia.com Signed-off-by: Jakub Kicinski commit 179542a98730ba40aef6806c7480c85ce731e588 Author: Jason Xing Date: Thu May 8 11:44:33 2025 +0800 net: thunder: make tx software timestamp independent skb_tx_timestamp() is used for tx software timestamp enabled by SOF_TIMESTAMPING_TX_SOFTWARE while SKBTX_HW_TSTAMP is used for SOF_TIMESTAMPING_TX_HARDWARE. As it clearly shows they are different timestamps in two dimensions, it's not appropriate to group these two together in the if-statement. This patch completes three things: 1. make the software one standalone. Users are able to set both timestamps together with SOF_TIMESTAMPING_OPT_TX_SWHW flag. 2. make the software one generated after the hardware timestamp logic to avoid generating sw and hw timestamps at one time without SOF_TIMESTAMPING_OPT_TX_SWHW being set. 3. move the software timestamp call as close to the door bell. Signed-off-by: Jason Xing Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250508034433.14408-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit a92b9efaf2cff15a28723f592ee21df0561e58c3 Author: Lad Prabhakar Date: Fri May 2 17:25:40 2025 +0100 dt-bindings: gpu: mali-bifrost: Add compatible for RZ/V2N SoC Add a compatible string for the Renesas RZ/V2N SoC variants that include a Mali-G31 GPU. These variants share the same restrictions on interrupts, clocks, and power domains as the RZ/G2L SoC, so extend the existing schema validation accordingly. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250502162540.165962-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Rob Herring (Arm) commit 493e6cb63a21e9f009dc4c209fd311f2bb777656 Author: Dan Carpenter Date: Wed Apr 30 11:05:40 2025 +0300 of: unittest: Unlock on error in unittest_data_add() The of_overlay_mutex_unlock() was accidentally deleted if "of_root" is NULL. Change this to a goto unlock. Fixes: d1eabd218ede ("of: unittest: treat missing of_root as error instead of fixing up") Signed-off-by: Dan Carpenter Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/aBHZ1DvXiBcZkWmk@stanley.mountain Signed-off-by: Rob Herring (Arm) commit 3022ae40e92b1458901867a114472cff76dd3531 Author: Dmitry Baryshkov Date: Tue Mar 18 15:21:55 2025 +0200 dt-bindings: soc: qcom: qcom,rpm: add missing clock/-names properties Qualcomm MSM8660 and IPQ0864 platforms use additional clock for the RPM device. Document it in the schema. Fixes: aa0c4b815045 ("mfd: devicetree: bindings: Add Qualcomm RPM DT binding") Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-2-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit dc4ec780313c698dd75f685250f98f98e07f9f17 Author: Dmitry Baryshkov Date: Tue Mar 18 15:21:54 2025 +0200 dt-bindings: soc: qcom,rpm: add missing clock-controller node On Qualcomm platforms in addition to regulators the RPM also provides clocks via the child clock-controller node. Describe it properly in the schema. Fixes: 872f91b5ea72 ("clk: qcom: Add support for RPM Clocks") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-fix-nexus-4-v2-1-bcedd1406790@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit acda397ad573109bad217182b7bb677696dcde1a Author: Unnathi Chalicheemala Date: Thu Apr 24 16:45:41 2025 -0700 soc: qcom: smem: Update max processor count Update max processor count to reflect the number of co-processors on upcoming SoC. Signed-off-by: Unnathi Chalicheemala Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250424-smem_count-v1-1-931cf68f71a8@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit db3de3ff2611fd1da2267a5a92ee86b463e555f6 Author: Danila Tikhonov Date: Wed Apr 23 00:31:33 2025 +0300 firmware: qcom: tzmem: disable sm7150 platform The SHM bridge makes the SM7150 devices reset while probing the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on corresponding platforms using SoC-level compat string. Signed-off-by: Danila Tikhonov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250422213137.80366-13-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 7dc837b55604ee38df783ba0ead90f1b2c97d667 Author: Jens Reidel Date: Wed Apr 23 00:31:31 2025 +0300 soc: qcom: pd-mapper: Add support for SM7150 SM7150 protection domains are the same as SC7180, with the subtle difference that SM7150 has a CDSP. Signed-off-by: Jens Reidel Signed-off-by: Danila Tikhonov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250422213137.80366-11-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 5090ac9191a19c61beeade60d3d839e509fab640 Author: Johan Hovold Date: Mon Mar 24 14:24:48 2025 +0100 soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events The PMIC GLINK driver is currently generating DisplayPort hotplug notifications whenever something is connected to (or disconnected from) a port regardless of the type of notification sent by the firmware. These notifications are forwarded to user space by the DRM subsystem as connector "change" uevents: KERNEL[1556.223776] change /devices/platform/soc@0/ae00000.display-subsystem/ae01000.display-controller/drm/card0 (drm) ACTION=change DEVPATH=/devices/platform/soc@0/ae00000.display-subsystem/ae01000.display-controller/drm/card0 SUBSYSTEM=drm HOTPLUG=1 CONNECTOR=36 DEVNAME=/dev/dri/card0 DEVTYPE=drm_minor SEQNUM=4176 MAJOR=226 MINOR=0 On the Lenovo ThinkPad X13s and T14s, the PMIC GLINK firmware sends two identical notifications with orientation information when connecting a charger, each generating a bogus DRM hotplug event. On the X13s, two such notification are also sent every 90 seconds while a charger remains connected, which again are forwarded to user space: port = 1, svid = ff00, mode = 255, hpd_state = 0 payload = 01 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 Note that the firmware only sends on of these when connecting an ethernet adapter. Fix the spurious hotplug events by only forwarding hotplug notifications for the Type-C DisplayPort service id. This also reduces the number of uevents from four to two when an actual DisplayPort altmode device is connected: port = 0, svid = ff01, mode = 2, hpd_state = 0 payload = 00 01 02 00 f2 0c 01 ff 03 00 00 00 00 00 00 00 port = 0, svid = ff01, mode = 2, hpd_state = 1 payload = 00 01 02 00 f2 0c 01 ff 43 00 00 00 00 00 00 00 Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support") Cc: stable@vger.kernel.org # 6.3 Cc: Bjorn Andersson Reported-by: Clayton Craft Signed-off-by: Johan Hovold Acked-by: Konrad Dybcio Tested-by: Clayton Craft Link: https://lore.kernel.org/r/20250324132448.6134-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 421777a02bbd9cdabe0ae05a69ee06253150589d Author: Barnabás Czémán Date: Mon Apr 21 04:04:17 2025 +0200 soc: qcom: smp2p: Fix fallback to qcom,ipc parse mbox_request_channel() returning value was changed in case of error. It uses returning value of of_parse_phandle_with_args(). It is returning with -ENOENT instead of -ENODEV when no mboxes property exists. Fixes: 24fdd5074b20 ("mailbox: use error ret code of of_parse_phandle_with_args()") Signed-off-by: Barnabás Czémán Reviewed-by: Stephan Gerhold Tested-by: Stephan Gerhold # msm8939 Link: https://lore.kernel.org/r/20250421-fix-qcom-smd-v1-2-574d071d3f27@mainlining.org Signed-off-by: Bjorn Andersson commit a793e78ef69498e7fdd1b975e6788b27b32da974 Merge: 109c5aedf6ea9e 0d4d6e699a4acf Author: Arnd Bergmann Date: Fri May 9 23:47:14 2025 +0200 Merge tag 'tegra-for-6.16-dt-bindings' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt Device tree bindings updates for v6.16-rc1 Convert the legacy interrupt controller (LIC) and APBDMA controller device tree bindings from freeform text to dt-schema. Document the ASUS Transformer Pad TF300TL compatible string and add missing compatible strings for newer generations of the Tegra CEC. * tag 'tegra-for-6.16-dt-bindings' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: media: dt-bindings: Document Tegra186 and Tegra194 cec dt-bindings: arm: tegra: Add Asus Transformer Pad TF300TL dt-bindings: arm: tegra: Group Tegra30 based ASUS Transformers dt-bindings: interrupt-controller: Convert nvidia,tegra20-ictlr to DT schema dt-bindings: dma: nvidia,tegra20-apbdma: convert text based binding to json schema Link: https://lore.kernel.org/r/20250509212604.2849901-1-treding@nvidia.com Signed-off-by: Arnd Bergmann commit 85751585e42829666dfb7ab15155df060615cb46 Merge: 60dce06e49c880 3903b4701bc03d Author: Arnd Bergmann Date: Fri May 9 23:15:29 2025 +0200 Merge tag 'renesas-drivers-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.16 (take two) - Cover all R-Car drivers in the ARM/RISC-V/RENESAS ARCHITECTURE maintainer entry, - Identify the Renesas RZ/V2N (R9A09G056) SoC. * tag 'renesas-drivers-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rz-sysc: Add SoC identification for RZ/V2N SoC MAINTAINERS: Generalize ARM/RISC-V/RENESAS ARCHITECTURE Link: https://lore.kernel.org/r/cover.1746798752.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 60dce06e49c880169e3b37ddec159ed3bc26682d Merge: fd11231a7dfbae 136deca59b1613 Author: Arnd Bergmann Date: Fri May 9 23:14:57 2025 +0200 Merge tag 'amd-tee-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers AMD-TEE driver updates for v6.16 - Sort header includes - Use pr_fmt * tag 'amd-tee-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: amdtee: Sort header includes amdtee: Use pr_fmt for messages Link: https://lore.kernel.org/r/20250509065833.GB4188600@rayden Signed-off-by: Arnd Bergmann commit fd11231a7dfbaebe99c25c0ec8b8717892dd6b0a Merge: bddf9448039b19 49da9105781d99 Author: Arnd Bergmann Date: Fri May 9 23:12:37 2025 +0200 Merge tag 'hisi-drivers-for-6.16' of https://github.com/hisilicon/linux-hisi into soc/drivers HiSilicon driver updates for v6.16 - Simplify PCC shared memory region handling in HCCS driver * tag 'hisi-drivers-for-6.16' of https://github.com/hisilicon/linux-hisi: soc: hisilicon: kunpeng_hccs: Simplify PCC shared memory region handling Link: https://lore.kernel.org/r/681D9FC4.6080508@hisilicon.com Signed-off-by: Arnd Bergmann commit bddf9448039b198d4ffa486d209bfb0a07a8674e Merge: 9a977b01fb56b1 02eaee70babd86 Author: Arnd Bergmann Date: Fri May 9 23:11:48 2025 +0200 Merge tag 'memory-controller-drv-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.16 1. Mediatek: Add support for MT6893 MTK SMI. 2. STM32: Add new driver for STM32 Octo Memory Manager (OMM), which manages muxing between two OSPI busses. 3. Several cleanups and minor improvements (OMAP GPMC, Kconfig entries, BT1 L2). * tag 'memory-controller-drv-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver memory: Add STM32 Octo Memory Manager driver dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller bus: firewall: Fix missing static inline annotations for stubs memory: bt1-l2-ctl: replace scnprintf() with sysfs_emit() memory: mtk-smi: Add support for Dimensity 1200 MT6893 SMI dt-bindings: memory: mtk-smi: Add support for MT6893 memory: tegra: Do not enable by default during compile testing memory: Simplify 'default' choice in Kconfig memory: omap-gpmc: remove GPIO set() and direction_output() callbacks memory: omap-gpmc: use the dedicated define for GPIO direction Link: https://lore.kernel.org/r/20250508093451.55755-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 9a977b01fb56b1fbb8a5d6a83c129c27bef4176d Merge: 4e61c011b00b0e 798dc3f19c9e38 Author: Arnd Bergmann Date: Fri May 9 23:10:31 2025 +0200 Merge tag 'memory-controller-drv-renesas-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Renesas memory controller drivers for v6.16 Improvements and new device support for the Renesas RPC IF memory controller driver: 1. Minor cleanup and improvements. 2. Refactor the driver to accommodate for newly added Renesas RZ/G3E support: - Acquire two resets instead of only one, - Add RZ/G3E xSPI support with different register layout and its own, new interface for Renesas SPI. * tag 'memory-controller-drv-renesas-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: renesas-rpc-if: Add missing static keyword memory: renesas-rpc-if: Add RZ/G3E xSPI support memory: renesas-rpc-if: Add wrapper functions memory: renesas-rpc-if: Add regmap to struct rpcif_info memory: renesas-rpc-if: Use devm_reset_control_array_get_exclusive() memory: renesas-rpc-if: Move rpc-if reg definitions dt-bindings: memory: Document RZ/G3E support memory: renesas-rpc-if: Move rpcif_info definitions near to the user memory: renesas-rpc-if: Fix RPCIF_DRENR_CDB macro error Link: https://lore.kernel.org/r/20250508090749.51379-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 4e61c011b00b0e9914eaf9fe38f0c2230115842d Merge: 5dcee6dd09abea 397f802d06c418 Author: Arnd Bergmann Date: Fri May 9 23:08:52 2025 +0200 Merge tag 'scmi-updates-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI updates for v6.16 1. Quirk framework to handle buggy firmware With SCMI gaining broader adoption across arm64 platforms, it's increasingly important to address how we consistently manage out-of-spec SCMI firmware already deployed in the field. This change introduces a lightweight quirk framework built around static_keys, enabling developers to: - Define quirks and their match criteria, which can include: o A list of compatibles ({ comp, comp2, NULL }) o Vendor ID / Sub-Vendor ID o Firmware implementation version ranges ([Min_Vers, Max_Vers]) Matching proceeds from the most specific (longest match) to the least specific. NULL entries are treated as wildcards (i.e., match any value). This flexibility allows matching very specific combinations or just a general compatible string. The quirk code blocks/snippets implementing the workaround are placed near their intended usage and guarded by a static_key that's tied to the quirk. Once the SCMI core stack is initialized and retrieves platform info via the base protocol, any matching quirks will have their associated static_keys enabled. 2. Quirk for Qualcomm X1E platforms On some Qualcomm X1E platforms, such as the Lenovo ThinkPad T14s, the SCMI firmware fails to set the FastChannel support bit for PERF_LEVEL_GET, yet it crashes when the driver attempts to fall back to standard messaging which is clearly out-of-spec behavior. To work around this, the new SCMI quirk framework is used to unconditionally enable FC initialization for this firmware version. In the future, once the fixed firmware version is identified, an upper version bound can be added to the quirk match criteria. Alternatively, matching can be further restricted using a SoC-specific compatible string if always enabling FC proves problematic elsewhere. 3. Support for NXP i.MX LMM/CPU vendor protocol extensions The i.MX95 System Manager (SM) implements Logical Machine Management (LMM) and a CPU protocol to manage Logical Machines (LM) and CPUs (e.g., M7). These changes integrate the vendor-specific protocol extensions implementing the LMM and CPU protocols for the i.MX95, facilitating standardized communication between the operating system and the platform's firmware, which will be used by remoteproc drivers. The changes also include the necessary device tree bindings. 4. Miscellaneous cleanups/changes These mainly include polling support in SCMI raw mode. The cleanups centralize error logging for SCMI device creation into a single helper function, consolidate the device matching logic into a single function, and ensure that devices must have a name for registration—removing support for unnamed devices when matching drivers and devices for probing. Transport devices are now excluded from bus matching, and the correct assignment of the parent device for the arm-scmi platform device is ensured in the transport drivers. * tag 'scmi-updates-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: quirk: Force perf level get fastchannel firmware: arm_scmi: quirk: Fix CLOCK_DESCRIBE_RATES triplet firmware: arm_scmi: Add common framework to handle firmware quirks firmware: arm_scmi: Ensure that the message-id supports fastchannel MAINTAINERS: add entry for i.MX SCMI extensions firmware: imx: Add i.MX95 SCMI CPU driver firmware: imx: Add i.MX95 SCMI LMM driver firmware: arm_scmi: imx: Add i.MX95 CPU Protocol firmware: arm_scmi: imx: Add i.MX95 LMM protocol dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol firmware: arm_scmi: imx: Add LMM and CPU documentation firmware: arm_scmi: Add polling support to raw mode firmware: arm_scmi: Exclude transport devices from bus matching firmware: arm_scmi: Assign correct parent to arm-scmi platform device firmware: arm_scmi: Refactor error logging from SCMI device creation to single helper firmware: arm_scmi: Refactor device matching logic to eliminate duplication firmware: arm_scmi: Ensure scmi_devices are always matched by name as well Link: https://lore.kernel.org/r/20250507134713.49039-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 5dcee6dd09abea5c685f8f6be28fc02e1ec6e3e6 Merge: 29bf77f0805d4f 69d63d19eda779 Author: Arnd Bergmann Date: Fri May 9 23:08:05 2025 +0200 Merge tag 'mtk-soc-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers MediaTek driver updates for v6.16 This brings some cleanups to the MediaTek DVFSRC driver, commonizing the bandwidth constraints platform data, and also adds support for the DVFSRC hardware found in the MediaTek Dimensity 1200 MT6893 SoC. * tag 'mtk-soc-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: soc: mediatek: mtk-dvfsrc: remove an unused variable soc: mediatek: mtk-dvfsrc: Add support for Dimensity 1200 MT6893 soc: mediatek: mtk-dvfsrc: Rename and move bw constraints data dt-bindings: soc: mediatek: dvfsrc: Add support for MT6893 Link: https://lore.kernel.org/r/20250506091736.125733-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 29bf77f0805d4ffa7d13320d1bb324f723d7e181 Merge: 7ebbb8416a4d4c 29f526ed681551 Author: Arnd Bergmann Date: Fri May 9 23:07:27 2025 +0200 Merge tag 'arm-soc/for-6.16/drivers' of https://github.com/Broadcom/stblinux into soc/drivers This pull request contains Broadcom SoC driver updates for 6.16, please pull the following: - Ovidiu updates the brcmstb_gisb driver to use the dev_groups instead of manually adding those * tag 'arm-soc/for-6.16/drivers' of https://github.com/Broadcom/stblinux: bus: brcmstb_gisb: use dev_groups to register attribute groups Link: https://lore.kernel.org/r/20250505165810.1948927-3-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit 7ebbb8416a4d4c261d771a66197d80f712a5bbde Merge: 8f10d9b87bb332 2c2e5e908ea2b5 Author: Arnd Bergmann Date: Fri May 9 23:06:21 2025 +0200 Merge tag 'samsung-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC drivers for v6.16 Several improvements to Exynos ACPM (Alive Clock and Power Manager) driver: 1. Handle communication timeous better. 2. Avoid sleeping, so users (PMIC) can still transfer during system shutdown. 3. Fix reading longer messages from them firmware. 4. Deferred probe improvements. 5. Model the user of ACPM - PMIC - a as child device and export devm_acpm_get_by_node() for such use case. * tag 'samsung-drivers-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: firmware: exynos-acpm: Correct kerneldoc and use typical np argument name firmware: exynos-acpm: introduce devm_acpm_get_by_node() firmware: exynos-acpm: populate devices from device tree data firmware: exynos-acpm: silence EPROBE_DEFER error on boot firmware: exynos-acpm: fix reading longer results dt-bindings: firmware: google,gs101-acpm-ipc: add PMIC child node firmware: exynos-acpm: allow use during system shutdown firmware: exynos-acpm: use ktime APIs for timeout detection Link: https://lore.kernel.org/r/20250501103541.13795-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8f10d9b87bb3321ea6f828ae0400f186c2fe39f7 Merge: 9c32cda43eb78f 31d358e611b7cc Author: Arnd Bergmann Date: Fri May 9 23:05:41 2025 +0200 Merge tag 'renesas-drivers-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.16 - Enable all Renesas SoCs by default when ARCH_RENESAS is set, which will allow up to remove all individual Renesas SoC entries from the various defconfigs, - Initial support for the Renesas RZ/V2N (R9A09G056) SoC. * tag 'renesas-drivers-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Add config option for RZ/V2N (R9A09G056) SoC soc: renesas: Kconfig: Enable SoCs by default when ARCH_RENESAS is set Link: https://lore.kernel.org/r/cover.1745582592.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 109c5aedf6ea9ea7dc6e107761b8d136b11a6ce5 Merge: b386d064c8d9b9 c895c32bf1ce90 Author: Arnd Bergmann Date: Fri May 9 23:04:33 2025 +0200 Merge tag 'v6.16-rockchip-dts32-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt Graphics support for the old rk3066-marsboard (hdmi + Mali400 gpu), rk3036 improvements (mmc asliases, hdmi refclk), dropping of redundant clock-latency props. * tag 'v6.16-rockchip-dts32-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: enable Mali gpu on rk3066 marsboard ARM: dts: rockchip: enable hdmi on rk3066 marsboard Revert "ARM: dts: rockchip: drop grf reference from rk3036 hdmi" ARM: dts: rockchip: Add ref clk for hdmi ARM: dts: rockchip: Drop redundant CPU "clock-latency" ARM: dts: rockchip: Add aliases for rk3036-kylin MMC devices Link: https://lore.kernel.org/r/22686731.EfDdHjke4D@diego Signed-off-by: Arnd Bergmann commit a223ce195741ca4f1a0e1a44f3e75ce5662b6c06 Author: Dan Carpenter Date: Thu Feb 22 09:14:02 2024 +0300 cxl/hdm: Clean up a debug printk Smatch complains that %pa is for phys_addr_t types and "size" is a u64. drivers/cxl/core/hdm.c:521 cxl_dpa_alloc() error: '%pa' expects argument of type 'phys_addr_t*', argument 4 has type 'ullong* Looking at this, to me it seems more useful to print the sizes as decimal instead of hex. Let's do that. [dj: Adjusted based on latest code changes. ] Signed-off-by: Dan Carpenter Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://patch.msgid.link/3d3d969d-651d-4e9d-a892-900876a60ab5@moroto.mountain Signed-off-by: Dave Jiang commit b386d064c8d9b93f39d62c48a696e43ffa482ea4 Merge: 2f57af56366a34 a706a593cb1979 Author: Arnd Bergmann Date: Fri May 9 22:56:20 2025 +0200 Merge tag 'v6.16-rockchip-dts64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt - New boards: rk3588-evb2, rk3588-tiger-haikou-video-demo-overlay - New peripherals: RNG+PCIe+SATA on rk3576; eDP on rk3588; DMA+I2C+PWM on rk3528; DSI on rk3588 - SPI-flash binding got a supply-property, so a number of boards add this supply. - RK3588 wrongly declared the shared memory with SCMI in the peripheral space - moved to the correct reserved-memory structure now. - The rest is peripheral enablement accross many boards - like hdmi output for a big number of boards, regulators, eeprom, etc. * tag 'v6.16-rockchip-dts64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (52 commits) arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-rock3c arm64: dts: rockchip: Enable regulators for Radxa E20C arm64: dts: rockchip: Add pwm nodes for RK3528 arm64: dts: rockchip: Add onboard EEPROM for Radxa E20C arm64: dts: rockchip: Add I2C controllers for RK3528 arm64: dts: rockchip: add RK3576 RNG node arm64: dts: rockchip: Switch to undeprecated qcom,calibration-variant on RK3399 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-quartz64-b arm64: dts: rockchip: Add phy-supply to gmac0 on NanoPi R5S arm64: dts: rockchip: fix usb-c port functionality on rk3588-nanopc-t6 arm64: dts: rockchip: Enable bluetooth of AP6611s on OrangePI5 Max/Ultra arm64: dts: rockchip: add SATA nodes to RK3576 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3588-rock-5b arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-pinetab2 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3399-rockpro64 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3328-rock64 arm64: dts: rockchip: Add vcc supply to spi flash on rk3399-roc-pc arm64: dts: rockchip: enable pcie on Sige5 arm64: dts: rockchip: Add HDMI support for roc-rk3576-pc arm64: dts: rockchip: Enable HDMI0 audio output for Indiedroid Nova ... Link: https://lore.kernel.org/r/2307187.iZASKD2KPV@diego Signed-off-by: Arnd Bergmann commit 2f57af56366a34f045467d2a5cd8c6779f0bbd9e Merge: fecf15fab3f060 d8bf82081c9e5a Author: Arnd Bergmann Date: Fri May 9 22:55:27 2025 +0200 Merge tag 'asahi-soc-dt-6.16' of https://github.com/AsahiLinux/linux into soc/dt Apple SoC Device Tree updates for 6.16: - A-series SoCs: CPU cache information has been added to device trees - M-series SoCs: SPMI controller and SPMI NVMEM nodes have been added * tag 'asahi-soc-dt-6.16' of https://github.com/AsahiLinux/linux: arm64: dts: apple: Add PMIC NVMEM arm64: dts: apple: Add SPMI controller nodes arm64: dts: apple: t8015: Add CPU caches arm64: dts: apple: t8012: Add CPU caches arm64: dts: apple: t8011: Add CPU caches arm64: dts: apple: t8010: Add CPU caches arm64: dts: apple: s8001: Add CPU caches arm64: dts: apple: s800-0-3: Add CPU caches arm64: dts: apple: t7001: Add CPU caches arm64: dts: apple: t7000: Add CPU caches arm64: dts: apple: s5l8960x: Add CPU caches Link: https://lore.kernel.org/r/20250507160827.87725-1-sven@svenpeter.dev Signed-off-by: Arnd Bergmann commit fecf15fab3f06083aeeb0d1a99098e2b2ea2b25d Merge: 7b2c40796878df c9e81198a75087 Author: Arnd Bergmann Date: Fri May 9 22:44:05 2025 +0200 Merge tag 'arm-soc/for-6.16/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM64-based SoCs Device Tree updates for 6.16, please pull the following: - Stanimir adds and enables the PCIe root complex Device Tree nodes present on the Raspberry Pi 5 - Rob updates the BCM2712 L2 cache node names to use a more comforming name * tag 'arm-soc/for-6.16/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: bcm2712: Use "l2-cache" for L2 cache node names arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes arm64: dts: broadcom: bcm2712: Add PCIe DT nodes Link: https://lore.kernel.org/r/20250505165810.1948927-2-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit 7b2c40796878df89ee423370c982ccbc9eda8e11 Merge: 1d55886c9681ab 959886105a40a3 Author: Arnd Bergmann Date: Fri May 9 22:42:53 2025 +0200 Merge tag 'arm-soc/for-6.16/devicetree' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM-based SoC Device Tree changes for 6.16, please pull the following: - Arthur adds a pinctrl node for BCM21664 and updates BCM23550 to use it, he also drops the DTS file for the BCM59056 PMU chip and leaving that board level DTS files - Stefan documents and adds support for the Raspberry Pi 2 2nd revision. * tag 'arm-soc/for-6.16/devicetree' of https://github.com/Broadcom/stblinux: arm64: dts: bcm: Add reference to RPi 2 (2nd rev) ARM: dts: bcm: Add support for Raspberry Pi 2 (2nd rev) dt-bindings: arm: bcm2835: Add Raspberry Pi 2 (2nd rev) ARM: dts: Drop DTS for BCM59056 PMU ARM: dts: bcm2166x: Add bcm2166x-pinctrl DTSI ARM: dts: bcm2166x-common: Add pinctrl node Link: https://lore.kernel.org/r/20250505165810.1948927-1-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit 1d55886c9681ab24ffaa0dae2b34510a55b5db9f Merge: 47ce18de8bdfbc b280613d480aa1 Author: Arnd Bergmann Date: Fri May 9 22:42:03 2025 +0200 Merge tag 'renesas-dts-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.16 (take two) - Add CANFD support for the RZ/G3E SoC and the RZ/G3E SMARC Carrier-II EVK development board, - Add support for Ethernet port A, 9-pin D-sub serial, and USB on the RZN1D-DB and RZN1D-EB development and expansion boards, - Add sound support for the Retronix Sparrow Hawk board, - Add General PWM Timer (GPT) support for the RZ/G2L and RZ/V2L SoCs and SMARC EVK boards, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.16-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: renesas: r9a06g032-rzn1d400-eb: Enable USB host port ARM: dts: renesas: r9a06g032-rzn1d400-db: Add pinmux for the CPLD arm64: dts: renesas: white-hawk-single: Improve Ethernet TSN description ARM: dts: renesas: r9a06g032-rzn1d400-db: Enable USB device port ARM: dts: renesas: r9a06g032-rzn1d400-eb: Describe 9-pin D-sub serial port arm64: dts: renesas: beacon-renesom: Align wifi node name with bindings arm64: dts: renesas: rzg2l-smarc: Enable GPT on carrier board arm64: dts: renesas: r9a07g054: Add GPT support arm64: dts: renesas: r9a07g044: Add GPT support arm64: dts: renesas: sparrow-hawk: Add MSIOF Sound support ARM: dts: renesas: r9a06g032-rzn1d400-eb: Add GMAC1 port arm64: dts: renesas: r9a09g047e57-smarc: Enable CAN Transceiver arm64: dts: renesas: r9a09g047e57-smarc: Enable CANFD arm64: dts: renesas: r9a09g047: Add CANFD node Link: https://lore.kernel.org/r/cover.1746798755.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 47ce18de8bdfbc9883580cd0b16758ac01b2ace1 Merge: 5c8cec86a4732c 9f78a29caacef6 Author: Arnd Bergmann Date: Fri May 9 22:40:19 2025 +0200 Merge tag 'renesas-dts-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.16 - Add SDHI, ICU, I2C, PMIC, and GPU support on the RZ/G3E SoC and the RZ/G3E SoM and SMARC Carrier-II EVK development board, - Add internal SDHI regulator support on the RZ/V2H(P) SoC, - Add UFS tuning parameters in E-FUSE on the R-Car S4-8 ES1.2 SoC, - Add support for Ethernet ports C and D, I2C, keys, and SDHI on the RZ/N1D SoC and the RZN1D-DB and RZN1D-EB development and expansion boards, - Add initial support for the RZ/V2N (R9A09G056) and the RZ/V2N EVK board, - Add support for the Retronix Sparrow Hawk board, which is based on R-Car V4H ES3.0, - Add ISP core support on R-Car V3U, V4H, and V4M, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (29 commits) arm64: dts: renesas: r8a779h0: Add ISP core function block arm64: dts: renesas: r8a779g0: Add ISP core function block arm64: dts: renesas: r8a779a0: Add ISP core function block arm64: dts: renesas: r8a779g3: Add Retronix R-Car V4H Sparrow Hawk board support arm64: dts: renesas: rzg3e-smarc-som: Enable Mali-G52 arm64: dts: renesas: r9a09g047: Add Mali-G52 GPU node arm64: dts: renesas: rzg3e-smarc-som: Add RAA215300 pmic support arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol ARM: dts: renesas: r9a06g032-rzn1d400-eb: describe SD card port ARM: dts: renesas: r9a06g032: Describe SDHCI controllers arm64: dts: renesas: Add initial device tree for RZ/V2N EVK arm64: dts: renesas: Add initial SoC DTSI for RZ/V2N dt-bindings: pinctrl: renesas: Document RZ/V2N SoC dt-bindings: clock: renesas: Document RZ/V2N SoC CPG dt-bindings: soc: renesas: Document SYS for RZ/V2N SoC dt-bindings: soc: renesas: Document Renesas RZ/V2N SoC variants and EVK ARM: dts: renesas: r9a06g032-rzn1d400-db: Describe keys ARM: dts: renesas: r9a06g032-rzn1d400-eb: Describe I2C bus ARM: dts: renesas: r9a06g032-rzn1d400-db: Describe I2C bus ARM: dts: renesas: r9a06g032: Describe I2C controllers ... Link: https://lore.kernel.org/r/cover.1745582596.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 5c8cec86a4732cf57b1273a60e514457aa884701 Merge: 0d57ac1f92c755 9e3b7138c3745a Author: Arnd Bergmann Date: Fri May 9 22:39:30 2025 +0200 Merge tag 'renesas-dt-bindings-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DT binding updates for v6.16 - Document support for the Renesas RZ/T2H (R9A09G077) SoC and the RZT2H-EVK evaluation board, - Document support for the Retronix Sparrow Hawk board, which is based on R-Car V4H ES3.0. * tag 'renesas-dt-bindings-for-v6.16-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: soc: renesas: Document Retronix R-Car V4H Sparrow Hawk board support dt-bindings: vendor-prefixes: Add Retronix Technology Inc. dt-bindings: soc: renesas: Add Renesas RZ/T2H (R9A09G077) SoC Link: https://lore.kernel.org/r/cover.1745582594.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 0d57ac1f92c7558b5d1b8f9780b9eb2f0d06b284 Merge: 7dc891191e64c3 e417c5b196bbde Author: Arnd Bergmann Date: Fri May 9 22:34:37 2025 +0200 Merge tag 'socfpga_dts_updates_for_v6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA DTS updates for v6.15 - Updates to dt-bindings - Document Agilex5 NAND daughter board - Convert Stratix10 FPGA Manager to json-schema - Convert Stratix10 Service Layer to json-schema - Add document for Terasic's DE10-nano board - Add support for Agilex5 NAND daughter board - Add basic support for Terasic's DE10-nano board * tag 'socfpga_dts_updates_for_v6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: socfpga: agilex: Add dma channel id for spi arm64: dts: socfpga: agilex5: add led and memory nodes arm64: dts: intel: socfpga_agilex: add frequencies to internal oscillators ARM: dts: socfpga: Add basic support for Terrasic's de10-nano dt-bindings: altera: Add compatible for Terasic's DE10-nano arm64: dts: socfpga: agilex5: add qspi flash node dt-bindings: firmware: stratix10: Convert to json-schema dt-bindings: fpga: stratix10: Convert to json-schema arm64: dts: socfpga: agilex5: fix gpio0 address arm64: dts: socfpga: agilex5: add NAND daughter board dt-bindings: intel: document Agilex5 NAND daughter board Link: https://lore.kernel.org/r/20250326121152.1739873-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 7dc891191e64c3f6d6404a7c030a1943210253e9 Author: Wolfram Sang Date: Sun Mar 30 21:38:36 2025 +0200 ARM: dts: vt8500: use correct ohci/ehci node names They should be named "usb@". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250330193833.21970-12-wsa+renesas@sang-engineering.com Signed-off-by: Arnd Bergmann commit a31e23eb5ee4f3d6230368d76023c4a555e29dd4 Author: Wolfram Sang Date: Sun Mar 30 21:38:35 2025 +0200 ARM: dts: ti: omap: use correct ohci/ehci node names They should be named "usb@". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250330193833.21970-11-wsa+renesas@sang-engineering.com Signed-off-by: Arnd Bergmann commit e06534a1bd07d09a71e36e85deb0a4fb751c4376 Author: Wolfram Sang Date: Sun Mar 30 21:38:34 2025 +0200 ARM: dts: st: use correct ohci/ehci node names They should be named "usb@". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250330193833.21970-10-wsa+renesas@sang-engineering.com Signed-off-by: Arnd Bergmann commit dd8d5cd90b513c29aef1e2c40534bef2871772b9 Author: Wolfram Sang Date: Sun Mar 30 21:38:33 2025 +0200 ARM: dts: nxp: lpc: use correct ohci/ehci node names They should be named "usb@". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250330193833.21970-9-wsa+renesas@sang-engineering.com Signed-off-by: Arnd Bergmann commit 49683c02d8e1d327bddd274053fadd83ae6576ab Author: Wolfram Sang Date: Sun Mar 30 21:38:32 2025 +0200 ARM: dts: marvell: use correct ohci/ehci node names They should be named "usb@". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250330193833.21970-8-wsa+renesas@sang-engineering.com Signed-off-by: Arnd Bergmann commit 806690425a5caa6ffc9c2460192b0d02947da863 Merge: 67322d35c39adb ecd9352cd92784 Author: Dave Airlie Date: Sat May 10 06:10:04 2025 +1000 Merge tag 'drm-intel-next-2025-05-08' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Non-display related: - Fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions' Display related: - More work towards display separation (Jani) - Stop writing VRR_CTL_IGN_MAX_SHIFT for MTL onwards (Jouni) - DSC checks for 3 engines (Ankit) - Add link rate and lane count to i915_display_info (Khaled) - PSR fixes and workaround for underrun on idle (Jouni) - LOBF enablement and ALMP fixes (Animesh) - Clean up VGA plane handling (Ville) - Use an intel_connector pointer everywhere (Imre) - Fix warning for coffeelake on SunrisePoint PCH (Jiajia) - Rework/Correction on minimum hblank calculation (Arun) - Dmesg clean up (Jani) - Add a couple of simple display workarounds (Ankit, Vinod) - Refactor HDCP GSC (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://lore.kernel.org/r/aByyL3bEufPu79OM@intel.com commit cd17a9b1a779459d06bf32a20590da13a5e5ef42 Author: Ian Rogers Date: Tue Apr 29 17:41:28 2025 -0700 perf test demangle-ocaml: Switch to using dso__demangle_sym() The use of the demangle-ocaml APIs means we don't detect if a different demangler is used before the OCaml one for the case that matters to perf. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 41fcc9a3435f48c6d0948999491507b594f229a2 Author: Ian Rogers Date: Tue Apr 29 17:41:27 2025 -0700 perf test demangle-java: Switch to using dso__demangle_sym() The use of the demangle-java APIs means we don't detect if a different demangler is used before the Java one for the case that matters to perf. Remove the return types from the demangled names as dso__demangle_sym() removes those. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bdf05ccd1841427445e7a7d117b47f1737e879bc Author: Ian Rogers Date: Tue Apr 29 17:41:26 2025 -0700 perf test demangle-rust: Add Rust demangling test The test cases are listed examples in: https://doc.rust-lang.org/rustc/symbol-mangling/v0.html This test was previously part of a different Rust v0 demangler: https://lore.kernel.org/lkml/20250129193037.573431-1-irogers@google.com/ Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ac292ea7c38ae3415e5c44eafa3d13ca04080124 Author: Ian Rogers Date: Tue Apr 29 17:41:25 2025 -0700 perf demangle-rust: Remove previous legacy rust decoder Code is unused since the introduction of rustc-demangle demangler. Reviewed-by: Miguel Ojeda Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5a8cb231614ff8d21694428dfecb1f4c8b344fd3 Merge: cb4a11925268b1 97596edfec0125 Author: Andrii Nakryiko Date: Fri May 9 13:01:08 2025 -0700 Merge branch 'bpf-retrieve-ref_ctr_offset-from-uprobe-perf-link' Jiri Olsa says: ==================== bpf: Retrieve ref_ctr_offset from uprobe perf link hi, adding ref_ctr_offset retrieval for uprobe perf link info. v2 changes: - display ref_ctr_offset as hex number [Andrii] - added acks thanks, jirka --- ==================== Link: https://patch.msgid.link/20250509153539.779599-1-jolsa@kernel.org Signed-off-by: Andrii Nakryiko commit 97596edfec0125db3d6520193cd10be69e24010c Author: Jiri Olsa Date: Fri May 9 17:35:39 2025 +0200 bpftool: Display ref_ctr_offset for uprobe link info Adding support to display ref_ctr_offset in link output, like: # bpftool link ... 42: perf_event prog 174 uprobe /proc/self/exe+0x102f13 cookie 3735928559 ref_ctr_offset 0x303a3fa bpf_cookie 3735928559 pids test_progs(1820) # bpftool link -j | jq [ ... { "id": 42, ... "ref_ctr_offset": 50500538, } ] Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250509153539.779599-4-jolsa@kernel.org commit d57293db64f57ae689bd840bb7db421dd9816faf Author: Jiri Olsa Date: Fri May 9 17:35:38 2025 +0200 selftests/bpf: Add link info test for ref_ctr_offset retrieval Adding link info test for ref_ctr_offset retrieval for both uprobe and uretprobe probes. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yafang Shao Link: https://lore.kernel.org/bpf/20250509153539.779599-3-jolsa@kernel.org commit 823153334042746604fdb416ea358a90940c1d83 Author: Jiri Olsa Date: Fri May 9 17:35:37 2025 +0200 bpf: Add support to retrieve ref_ctr_offset for uprobe perf link Adding support to retrieve ref_ctr_offset for uprobe perf link, which got somehow omitted from the initial uprobe link info changes. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yafang Shao Link: https://lore.kernel.org/bpf/20250509153539.779599-2-jolsa@kernel.org commit e20848c317b51e74953c38cd14ab2926baa1608b Author: Ian Rogers Date: Tue Apr 29 17:41:24 2025 -0700 perf symbol-elf: Integrate rust-v0 demangling Use the demangle-rust-v0 APIs to see if symbol is Rust mangled and demangle if so. The API requires a pre-allocated output buffer, some estimation and retrying are added for this. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 60869b22afadc52775c98813f19d9817db95325f Author: Ian Rogers Date: Tue Apr 29 17:41:23 2025 -0700 perf demangle-rust: Add rustc-demangle C demangler Imported at commit 80e40f57d99f ("add comment about finding latest version of code") from: https://github.com/rust-lang/rustc-demangle/blob/main/crates/native-c/src/demangle.c https://github.com/rust-lang/rustc-demangle/blob/main/crates/native-c/include/demangle.h There is discussion of this issue motivating the import in: https://github.com/rust-lang/rust/issues/60705 https://lore.kernel.org/lkml/20250129193037.573431-1-irogers@google.com/ The SPDX lines reflect the dual license Apache-2 or MIT in: https://github.com/rust-lang/rustc-demangle/blob/main/README.md Following Migual Ojeda's suggestion comments were added on copyright and keeping the code in sync with upstream. The files are renamed as perf supports multiple demanglers and so demangle as a name would be overloaded. The work here was done by Ariel Ben-Yehuda and I am merely importing it as discussed in the rust-lang issue. Reviewed-by: Miguel Ojeda Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alex Gaynor Cc: Alexander Shishkin Cc: Alice Ryhl Cc: Andreas Hindborg Cc: Ariel Ben-Yehuda Cc: Benno Lossin Cc: Bill Wendling Cc: Björn Roy Baron Cc: Boqun Feng Cc: Daniel Xu Cc: Danilo Krummrich Cc: Gary Guo Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Justin Stitt Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephen Brennan Cc: Trevor Gross Link: https://lore.kernel.org/r/20250430004128.474388-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 376cb9696298df2028afb620a9dc6c4b10a18605 Author: Sebastian Reichel Date: Thu May 8 19:48:53 2025 +0200 arm64: dts: rockchip: add Rock 5B+ Add ROCK 5B+, which is an improved version of the ROCK 5B with the following changes: * Memory LPDDR4X -> LPDDR5 * HDMI input connector size * eMMC socket -> onboard * M.2 E-Key is replaced by onboard RTL8852BE WLAN/BT * M.2 M-Key 1x4 lanes is replaced by 2x2 lanes * Added M.2 B-Key for USB connected WWAN modules (untested) * Add second camera port (not yet supported in upstream Linux) * Add dedicated USB-C port for device power (no impact in DT; the existing port has not been changed and the new port is handled by CH224D standalone chip) Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250508-rock5bp-for-upstream-v2-4-677033cc1ac2@kernel.org Signed-off-by: Heiko Stuebner commit 874c1117621d441e0ef4a609665f228a4b8a1932 Author: FUKAUMI Naoki Date: Thu May 8 19:48:52 2025 +0200 dt-bindings: arm: rockchip: Add Radxa ROCK 5B+ The Radxa ROCK 5B+ is an improved version of the ROCK 5B. Signed-off-by: FUKAUMI Naoki Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250508-rock5bp-for-upstream-v2-3-677033cc1ac2@kernel.org Signed-off-by: Heiko Stuebner commit aadfbdcf7e1e7f3892e0e4bdcc3c9c7c9adfb723 Author: Sebastian Reichel Date: Thu May 8 19:48:50 2025 +0200 arm64: dts: rockchip: move rock 5b to include file Radxa released some more boards, which are based on the original Rock 5B. Move its board description into an include file to avoid unnecessary duplication. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20250508-rock5bp-for-upstream-v2-1-677033cc1ac2@kernel.org Link: https://lore.kernel.org/r/20250508-rock5bp-for-upstream-v2-2-677033cc1ac2@kernel.org [The original submission was split into two elements, renaming the file and then moving some nodes around. This was done to make review easier due to the diff being smaller. This commit is a squash of both of them to facilitate bisectability and was also intended by the original author] Signed-off-by: Heiko Stuebner commit 2435fca0580ca9b58a8c5a71e5bd61b9707bc313 Author: Chaoyi Chen Date: Tue May 6 11:43:47 2025 +0800 arm64: dts: rockchip: Add rk3399-evb-ind board General feature for rk3399 industry evaluation board: - Rockchip RK3399 - 4GB LPDDR4 - emmc5.1 - SDIO3.0 compatible TF card - 1x HDMI2.0a TX - 1x HDMI1.4b RX with TC358749XBG HDMI to MIPI CSI2 bridge chip - 1x type-c DisplayPort - 3x USB3.0 Host - 1x USB2.0 Host - 1x Ethernet / USB3.0 to Ethernet Tested with HDMI/GPU/USB2.0/USB3.0/TF card/emmc. Signed-off-by: Chaoyi Chen Link: https://lore.kernel.org/r/20250506034347.57-3-kernel@airkyi.com Signed-off-by: Heiko Stuebner commit ff7c417e54a8cca74db147ba0417ecdfcb99f89c Author: Chaoyi Chen Date: Tue May 6 11:43:46 2025 +0800 dt-bindings: arm: rockchip: Add rk3399 industry evaluation board Add devicetree binding for the rk3399 industry evaluation board. Signed-off-by: Chaoyi Chen Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250506034347.57-2-kernel@airkyi.com Signed-off-by: Heiko Stuebner commit bd088836a10e418aaf7dbda4a1db9da864f09fb8 Author: Nicolas Frattaroli Date: Tue May 6 12:42:44 2025 +0200 arm64: defconfig: Enable Rockchip SAI and ES8328 The RK3576 uses Rockchip SAI for audio output. Meanwhile, the Sige5 board, which uses the RK3576 and is supported by mainline, uses an ES8388 codec over I2C with the ES8328 driver implementing support for this codec. Enable both in the defconfig. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-5-a8b5f5733ceb@collabora.com Signed-off-by: Heiko Stuebner commit fcdeb39bb5615c4bb36f69d2ec11f25b54168304 Author: Nicolas Frattaroli Date: Tue May 6 12:42:43 2025 +0200 arm64: dts: rockchip: Enable HDMI audio on Sige5 With the hdmi_sound node added to the base RK3576 SoC tree, we can now enable it on the Sige5 SBC. Do this, and also enable the corresponding SAI6 audio controller node. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-4-a8b5f5733ceb@collabora.com Signed-off-by: Heiko Stuebner commit f4a9c9fbf02c8948029846aba63c65c0425cb275 Author: Nicolas Frattaroli Date: Tue May 6 12:42:42 2025 +0200 arm64: dts: rockchip: Add analog audio on RK3576 Sige5 The ArmSoM Sige5 board features an Everest ES8388 codec to provide analog stereo audio output, as well as analog audio input. The codec hangs off the i2c2 bus and responds to address 0x10. It is connected to the SAI1 audio controller of the RK3576, with one SDO (output) lane and one SDI (input) lane. The codec has two sets of outputs. One set, LOUT1/ROUT1, is connected through a set of 22uF non-polarised coupling capacitors to a 3-position connector that appears to be a clone of the JST BM03B-SURS-TF header, and is capable of mating with a JST 03SUR-32S (or JST 03SUR-36L if you prefer lemon-lime) or compatible clone connector. The right headphone output is the one closest to the Type-C DC input connector, the left headphone output is the one in the middle, and the third position, the one closest to the USB3 Type-A host connector, is puzzingly labelled as "HP_GND" in the schematic but is in fact connected to the codecs RIN1 input through a 1uF non-plarised coupling capacitor. LOUT2 and ROUT2 are routed to 1mm test pads T36 and T37 respectively. These are located on the bottom of the board, and do not go through any coupling capacitor. For use as line out, the ES8388 datasheet recommends adding 1uF coupling capacitor if one wishes to use it as a line-level output. There is also a pair of inputs for a stereo microphone, going from two 1mm testpads T34 and T35, which are decoupled with a 100pF capacitor and pulled to 3.3v and ground respectively. These inputs then go through 1uF capacitors each and end up in the LINPUT2 and RINPUT2 pins of the ES8388 codec. The codec's power inputs are routed to receive 3.3V for both its analog and digital inputs, though from different supplies. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-3-a8b5f5733ceb@collabora.com Signed-off-by: Heiko Stuebner commit 7f1561d82e3d3589038782f75faa50c65d9cdd42 Author: Nicolas Frattaroli Date: Tue May 6 12:42:41 2025 +0200 arm64: dts: rockchip: Add RK3576 HDMI audio The RK3576 SoC now has upstream support for HDMI. Add an HDMI audio node, which uses SAI6 as its audio controller according to downstream. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-2-a8b5f5733ceb@collabora.com Signed-off-by: Heiko Stuebner commit 3dfeccdd3cc88792e631539792a1ecc37a9581dc Author: Nicolas Frattaroli Date: Tue May 6 12:42:40 2025 +0200 arm64: dts: rockchip: Add RK3576 SAI nodes The RK3576 SoC has 10 SAI controllers in total. Five of them are in the video output power domains, and are used for digital audio output along with the video signal of those, e.g. HDMI audio. The other five, SAI0 through SAI4, are exposed externally. SAI0 and SAI1 are capable of 8-channel audio, whereas SAI2, SAI3 and SAI4 are limited to two channels. These five are in the audio power domain. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-1-a8b5f5733ceb@collabora.com Signed-off-by: Heiko Stuebner commit a2130d9123b23d74a717f52240fa3cb92bf8113c Author: Yao Zi Date: Thu May 8 23:48:30 2025 +0000 arm64: dts: rockchip: Enable SD-card interface on Radxa E20C SD-card is available on Radxa E20C board. Signed-off-by: Yao Zi Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250508234829.27111-4-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 894a2640422208b1d3e4c238f126220d406e5fb1 Author: Yao Zi Date: Thu May 8 23:48:29 2025 +0000 arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 RK3528 features two SDIO controllers and one SD/MMC controller, describe them in devicetree. Since their sample and drive clocks are located in the VO and VPU GRFs, corresponding syscons are added to make these clocks available. Signed-off-by: Yao Zi Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250508234829.27111-3-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 8012af949c461fd5ae21e5bbdc785466e10b09f7 Merge: fbea35a661ed10 8a023e86f3d999 Author: Heiko Stuebner Date: Fri May 9 21:34:45 2025 +0200 Merge branch 'v6.16-shared/clkids' into v6.16-armsoc/dts64 commit 67322d35c39adbbf76737f706d05b727cf7eb7ac Merge: 8d782ad6509d91 252c4711973de4 Author: Dave Airlie Date: Sat May 10 05:24:39 2025 +1000 Merge tag 'drm-xe-next-2025-05-08' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - Expose PCIe link downgrade attributes (Raag) Cross-subsystem Changes: Core Changes: - gpusvm has_dma_mapping fix (Dafna) Driver Changes: - Forcewake hold fix (Tejas) - Fix guc_info debugfs for VFs (Daniele) - Fix devcoredump chunk alignment calculation (Arnd) - Don't print timedout job message on killed exec queues (Matt Brost) - Don't flush the GSC worker from the reset path (Daniele) - Use copy_from_user() instead of __copy_from_user() (Harish) - Only flush SVM garbage collector if CONFIG_DRM_XE_GPUSVM (Shuicheng) - Fix forcewake vs runtime pm ref release ordering (Shuicheng) - Move xe_device_sysfs_init() to xe_device_probe() (Raag) - Append PCIe Gen5 limitations to xe_firmware document (Raag) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aBzUwbzCzz7Qo7fA@fedora commit e54b1dc1c4f083cb66a70d8ccc866de47fc36d7a Author: Zaid Alali Date: Tue May 6 14:38:08 2025 -0700 ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type() A single call to einj_get_available_error_type() in init function is sufficient to save the return value in a global variable to be used later in various places in the code. This change has no functional impact, but only removes unnecessary redundant function calls. Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Signed-off-by: Zaid Alali Link: https://patch.msgid.link/20250506213814.2365788-5-zaidal@os.amperecomputing.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9cd51eefae3c871440b93c03716c5398f41bdf78 Author: Werner Sembach Date: Thu May 8 13:16:18 2025 +0200 ACPI: EC: Add device to acpi_ec_no_wakeup[] qurik list Add the TUXEDO InfinityBook Pro AMD Gen9 to the acpi_ec_no_wakeup[] quirk list to prevent spurious wakeups. Signed-off-by: Werner Sembach Link: https://patch.msgid.link/20250508111625.12149-1-wse@tuxedocomputers.com Signed-off-by: Rafael J. Wysocki commit 7b382efd5e8af4c0c67e70ad3fb599dcd2dc0b86 Author: Steven Rostedt Date: Thu May 8 09:56:39 2025 -0400 tracing: Allow the top level trace_marker to write into another instances There are applications that have it hard coded to write into the top level trace_marker instance (/sys/kernel/tracing/trace_marker). This can be annoying if a profiler is using that instance for other work, or if it needs all writes to go into a new instance. A new option is created called "copy_trace_marker". By default, the top level has this set, as that is the default buffer that writing into the top level trace_marker file will go to. But now if an instance is created and sets this option, all writes into the top level trace_marker will also be written into that instance buffer just as if an application were to write into the instance's trace_marker file. If the top level instance disables this option, then writes to its own trace_marker and trace_marker_raw files will not go into its buffer. If no instance has this option set, then the write will return an error and errno will contain ENODEV. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250508095639.39f84eda@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 6956ea9fdcf706dc6201bf7146af188539eac9b1 Author: Steven Rostedt Date: Wed May 7 19:17:03 2025 -0400 tracing: Add a helper function to handle the dereference arg in verifier Add a helper function called handle_dereference_arg() to replace the logic that is identical in two locations of test_event_printk(). Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250507191703.5dd8a61d@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit f75340d73c5e25bd94f964a8e3dac9fd3e5f1475 Author: Steven Rostedt Date: Wed May 7 10:53:08 2025 -0400 tracing: Remove unnecessary "goto out" that simply returns ret is trigger code There's several functions that have "goto out;" where the label out is just: out: return ret; Simplify the code by just doing the return in the location and removing all the out labels and jumps. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tom Zanussi Link: https://lore.kernel.org/20250507145456.121186494@goodmis.org Signed-off-by: Steven Rostedt (Google) commit c5dd28e7fb4f63475b50df4f58311df92939d011 Author: Miaoqian Lin Date: Wed May 7 10:53:07 2025 -0400 tracing: Fix error handling in event_trigger_parse() According to trigger_data_alloc() doc, trigger_data_free() should be used to free an event_trigger_data object. This fixes a mismatch introduced when kzalloc was replaced with trigger_data_alloc without updating the corresponding deallocation calls. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Andrew Morton Cc: Mathieu Desnoyers Cc: Tom Zanussi Link: https://lore.kernel.org/20250507145455.944453325@goodmis.org Link: https://lore.kernel.org/20250318112737.4174-1-linmq006@gmail.com Fixes: e1f187d09e11 ("tracing: Have existing event_command.parse() implementations use helpers") Signed-off-by: Miaoqian Lin [ SDR: Changed event_trigger_alloc/free() to trigger_data_alloc/free() ] Signed-off-by: Steven Rostedt (Google) commit f2947c4b7d0f235621c5daf78aecfbd6e22c05e5 Author: Steven Rostedt Date: Wed May 7 10:53:06 2025 -0400 tracing: Rename event_trigger_alloc() to trigger_data_alloc() The function event_trigger_alloc() creates an event_trigger_data descriptor and states that it needs to be freed via event_trigger_free(). This is incorrect, it needs to be freed by trigger_data_free() as event_trigger_free() adds ref counting. Rename event_trigger_alloc() to trigger_data_alloc() and state that it needs to be freed via trigger_data_free(). This naming convention was introducing bugs. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tom Zanussi Link: https://lore.kernel.org/20250507145455.776436410@goodmis.org Fixes: 86599dbe2c527 ("tracing: Add helper functions to simplify event_command.parse() callback handling") Signed-off-by: Steven Rostedt (Google) commit 73207746d36bff777a2edb337d8d0518cbd44715 Author: Devaansh Kumar Date: Wed May 7 19:08:36 2025 +0530 tracing: Replace deprecated strncpy() with strscpy() for stack_trace_filter_buf strncpy() is deprecated for NUL-terminated destination buffers and must be replaced by strscpy(). See issue: https://github.com/KSPP/linux/issues/90 Link: https://lore.kernel.org/20250507133837.19640-1-devaanshk840@gmail.com Signed-off-by: Devaansh Kumar Signed-off-by: Steven Rostedt (Google) commit 6e3b3acaf452ecbd0bde5f25e05c844a22a86574 Author: Steven Rostedt Date: Mon May 5 17:21:17 2025 -0400 tracing: Remove unused buffer_page field from trace_array_cpu structure The trace_array_cpu had a "buffer_page" field that was originally going to be used as a backup page for the ring buffer. But the ring buffer has its own way of reusing pages and this field was never used. Remove it. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212236.738849456@goodmis.org Signed-off-by: Steven Rostedt (Google) commit c4a80c06154084d52851fe495d40b0e4da032f47 Author: Steven Rostedt Date: Mon May 5 17:21:16 2025 -0400 tracing: Use atomic_inc_return() for updating "disabled" counter in irqsoff tracer The irqsoff tracer uses the per CPU "disabled" field to prevent corruption of the accounting when it starts to trace interrupts disabled, but there's a slight race that could happen if for some reason it was called twice. Use atomic_inc_return() instead. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212236.567884756@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 90633c34c36d0c15c9da4e19b2ceb46cab137478 Author: Steven Rostedt Date: Mon May 5 17:21:15 2025 -0400 tracing: Convert the per CPU "disabled" counter to local from atomic The per CPU "disabled" counter is used for the latency tracers and stack tracers to make sure that their accounting isn't messed up by an NMI or interrupt coming in and affecting the same CPU data. But the counter is an atomic_t type. As it only needs to synchronize against the current CPU, switch it over to local_t type. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212236.394925376@goodmis.org Signed-off-by: Steven Rostedt (Google) commit cf64792f0adb9488b66da1d8e1805d51bdcebeab Author: Steven Rostedt Date: Mon May 5 17:21:14 2025 -0400 tracing: branch: Use trace_tracing_is_on_cpu() instead of "disabled" field The branch tracer currently checks the per CPU "disabled" field to know if tracing is enabled or not for the CPU. As the "disabled" value is not used anymore to turn of tracing generically, use tracing_tracer_is_on_cpu() instead. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212236.224658526@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 092a38565ed87cbda6fe7dd16c742df6f907483e Author: Steven Rostedt Date: Mon May 5 17:21:13 2025 -0400 ring-buffer: Add ring_buffer_record_is_on_cpu() Add the function ring_buffer_record_is_on_cpu() that returns true if the ring buffer for a give CPU is writable and false otherwise. Also add tracer_tracing_is_on_cpu() to return if the ring buffer for a given CPU is writeable for a given trace_array. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212236.059853898@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 969043af1590d22c6de550bb26ee465de72330b3 Author: Steven Rostedt Date: Mon May 5 17:21:12 2025 -0400 tracing: Do not use per CPU array_buffer.data->disabled for cpumask The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. Do not bother setting the per CPU disabled flag of the array_buffer data to use to determine what CPUs can write to the buffer and only rely on the ring buffer code itself to disabled it. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212235.885452497@goodmis.org Signed-off-by: Steven Rostedt (Google) commit f62e3de375150210335a063605ce0dd6a6746b78 Author: Steven Rostedt Date: Mon May 5 17:21:11 2025 -0400 ftrace: Do not disabled function graph based on "disabled" field The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. Do not bother disabling the function graph tracer if the per CPU disabled field is set. Just record as normal. If tracing is disabled in the ring buffer it will not be recorded. Also, when tracing is enabled again, it will not drop the return call of the function. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212235.715752008@goodmis.org Signed-off-by: Steven Rostedt (Google) commit a9839d204896c59b0e2ae08e571515b1cf752bd1 Author: Steven Rostedt Date: Mon May 5 17:21:10 2025 -0400 tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. The kdb_ftdump() function iterates over all the current tracing CPUs and increments the "disabled" counter before doing the dump, and decrements it afterward. As the disabled flag can be ignored, doing this today is not reliable. Instead, simply call tracer_tracing_off() and then tracer_tracing_on() to disable and then enabled the entire ring buffer in one go! Cc: Jason Wessel Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/20250505212235.549033722@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 6ba3e0533fa63bdeb5b3c4c9688a4ecba2705722 Author: Steven Rostedt Date: Mon May 5 17:21:09 2025 -0400 tracing: Use tracer_tracing_disable() instead of "disabled" field for ftrace_dump_one() The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. The ftrace_dump_one() function iterates over all the current tracing CPUs and increments the "disabled" counter before doing the dump, and decrements it afterward. As the disabled flag can be ignored, doing this today is not reliable. Instead use the new tracer_tracing_disable() that calls into the ring buffer code to do the disabling. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212235.381188238@goodmis.org Signed-off-by: Steven Rostedt (Google) commit dbecef68ad33ddc8fe76a276eeb914d51d29b4c4 Author: Steven Rostedt Date: Mon May 5 17:21:08 2025 -0400 tracing: Add tracer_tracing_disable/enable() functions Allow a tracer to disable writing to its buffer for a temporary amount of time and re-enable it. The tracer_tracing_disable() will disable writing to the trace array buffer, and requires a tracer_tracing_enable() to re-enable it. The difference between tracer_tracing_disable() and tracer_tracing_off() is that the disable version can nest, and requires as many enable() calls as disable() calls to re-enable the buffer. Where as the off() function can be called multiple times and only requires a singe tracer_tracing_on() to re-enable the buffer. Cc: Jason Wessel Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/20250505212235.210330010@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 73989c998814d82c71d523c104c398925470d59e Author: Terry Tritton Date: Fri May 9 12:56:22 2025 +0100 selftests/seccomp: fix negative_ENOSYS tracer tests on arm32 TRACE_syscall.ptrace.negative_ENOSYS and TRACE_syscall.seccomp.negative_ENOSYS on arm32 are being reported as failures instead of skipping. The teardown_trace_fixture function sets the test to KSFT_FAIL in case of a non 0 return value from the tracer process. Due to _metadata now being shared between the forked processes the tracer is returning the KSFT_SKIP value set by the tracee which is non 0. Remove the setting of the _metadata.exit_code in teardown_trace_fixture. Fixes: 24cf65a62266 ("selftests/harness: Share _metadata between forked processes") Signed-off-by: Terry Tritton Link: https://lore.kernel.org/r/20250509115622.64775-1-terry.tritton@linaro.org Signed-off-by: Kees Cook commit 234f71555019d308c6bc6f98c78c5551cb8cd56a Author: Peter Marheine Date: Thu May 8 12:41:45 2025 +1000 ACPI: battery: negate current when discharging The ACPI specification requires that battery rate is always positive, but the kernel ABI for POWER_SUPPLY_PROP_CURRENT_NOW (Documentation/ABI/testing/sysfs-class-power) specifies that it should be negative when a battery is discharging. When reporting CURRENT_NOW, massage the value to match the documented ABI. This only changes the sign of `current_now` and not `power_now` because documentation doesn't describe any particular meaning for `power_now` so leaving `power_now` unchanged is less likely to confuse userspace unnecessarily, whereas becoming consistent with the documented ABI is worth potentially confusing clients that read `current_now`. Signed-off-by: Peter Marheine Link: https://patch.msgid.link/20250508024146.1436129-1-pmarheine@chromium.org Signed-off-by: Rafael J. Wysocki commit 1efe2022286d30077385ba9b24d25c26c77d0768 Author: Thomas Weißschuh Date: Fri May 2 14:03:52 2025 +0200 selftests/timens: timerfd: Use correct clockid type in tclock_gettime() tclock_gettime() is a wrapper around clock_gettime(). The first parameter of clock_gettime() is of type "clockid_t", not "clock_t". Use the correct type instead. Link: https://lore.kernel.org/r/20250502-selftests-timens-fixes-v1-3-fb517c76f04d@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 261639fa515fd4c5d14ad998f85f1e30c3241dfb Author: Thomas Weißschuh Date: Fri May 2 14:03:51 2025 +0200 selftests/timens: Make run_tests() functions static These functions are never used outside their defining compilation unit and can be made static. Link: https://lore.kernel.org/r/20250502-selftests-timens-fixes-v1-2-fb517c76f04d@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 84b8d6c9082659ceb5574335abbaf6c1ea36abba Author: Thomas Weißschuh Date: Fri May 2 14:03:50 2025 +0200 selftests/timens: Print TAP headers The TAP specification requires that the output begins with a header line. These headers lines are missing in the timens tests. Print such a line. Link: https://lore.kernel.org/r/20250502-selftests-timens-fixes-v1-1-fb517c76f04d@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 11f6dcf784533fd72ceddbc69884f8d7f82109fd Author: Peter Seiderer Date: Wed Jan 15 11:52:11 2025 +0100 selftests: pid_namespace: add missing sys/mount.h include in pid_max.c Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40): - add missing sys/mount.h include Fixes: pid_max.c: In function ‘pid_max_cb’: pid_max.c:42:15: error: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration] 42 | ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); | ^~~~~ Link: https://lore.kernel.org/r/20250115105211.390370-3-ps.report@gmx.net Signed-off-by: Peter Seiderer Reviewed-by: T.J. Mercier Signed-off-by: Shuah Khan commit eba614b8280a971d5b39a75349bec2329d897b5d Author: Pei Xiao Date: Fri Apr 25 11:48:08 2025 +0800 ACPI: PCI: Constify fwnode_handle in acpi_pci_root_remap_iospace() The fwnode_handle pointer passed into pci_register_io_range() is not modified, so annotate it as const. Signed-off-by: Pei Xiao Link: https://patch.msgid.link/7ae7866ab8b897253703ecee44c688b6832d49a3.1745552799.git.xiaopei01@kylinos.cn [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 23b88515a318680337f21d0a2fceee8038ccffc8 Author: Nícolas F. R. A. Prado Date: Wed Apr 30 10:55:49 2025 -0400 kselftest: cpufreq: Get rid of double suspend in rtcwake case Commit 0b631ed3ce92 ("kselftest: cpufreq: Add RTC wakeup alarm") added support for automatic wakeup in the suspend routine of the cpufreq kselftest by using rtcwake, however it left the manual power state change in the common path. The end result is that when running the cpufreq kselftest with '-t suspend_rtc' or '-t hibernate_rtc', the system will go to sleep and be woken up by the RTC, but then immediately go to sleep again with no wakeup programmed, so it will sleep forever in an automated testing setup. Fix this by moving the manual power state change so that it only happens when not using rtcwake. Link: https://lore.kernel.org/r/20250430-ksft-cpufreq-suspend-rtc-double-fix-v1-1-dc17a729c5a7@collabora.com Fixes: 0b631ed3ce92 ("kselftest: cpufreq: Add RTC wakeup alarm") Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Shuah Khan commit 8ffe772076bbb6828e28705bda93ac37c8d7294c Author: Swapnil Sapkal Date: Wed Apr 30 17:14:33 2025 +0000 selftests/cpufreq: Fix cpufreq basic read and update testcases In cpufreq basic selftests, one of the testcases is to read all cpufreq sysfs files and print the values. This testcase assumes all the cpufreq sysfs files have read permissions. However certain cpufreq sysfs files (eg. stats/reset) are write only files and this testcase errors out when it is not able to read the file. Similarily, there is one more testcase which reads the cpufreq sysfs file data and write it back to same file. This testcase also errors out for sysfs files without read permission. Fix these testcases by adding proper read permission checks. Link: https://lore.kernel.org/r/20250430171433.10866-1-swapnil.sapkal@amd.com Reported-by: Narasimhan V Signed-off-by: Swapnil Sapkal Signed-off-by: Shuah Khan commit ab4b00407dd864853516aba3cd7caed2b7c33ffd Author: Ayush Jain Date: Wed Apr 9 04:46:32 2025 +0000 selftests/ftrace: Convert poll to a gen_file Poll program is a helper to ftracetest, thus make it a generic file and remove it from being run as a test. Currently when executing tests using $ make run_tests CC poll TAP version 13 1..2 # timeout set to 0 # selftests: ftrace: poll # Error: Polling file is not specified not ok 1 selftests: ftrace: poll # exit=255 Fix this by using TEST_GEN_FILES to build the 'poll' binary as a helper rather than as a test. Fixes: 80c3e28528ff ("selftests/tracing: Add hist poll() support test") Link: https://lore.kernel.org/r/20250409044632.363285-1-Ayush.jain3@amd.com Signed-off-by: Ayush Jain Acked-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan commit c1ab449df871d6ce9189cb0a9efcd37d2ead10f0 Author: Thomas Gleixner Date: Fri May 9 20:37:54 2025 +0200 genirq: Fix inverted condition in handle_nested_irq() Marek reported that the rework of handle_nested_irq() introduced a inverted condition, which prevents handling of interrupts. Fix it up. Fixes: 2ef2e13094c7 ("genirq/chip: Rework handle_nested_irq()") Reported-by: Marek Szyprowski Signed-off-by: Thomas Gleixner Closes: https://lore.kernel/org/all/46ed4040-ca11-4157-8bd7-13c04c113734@samsung.com commit c24a65b6a27c78d8540409800886b6622ea86ebf Author: Dave Ertman Date: Tue Apr 15 21:15:49 2025 -0500 iidc/ice/irdma: Update IDC to support multiple consumers In preparation of supporting more than a single core PCI driver for RDMA, move ice specific structs like qset_params, qos_info and qos_params from iidc_rdma.h to iidc_rdma_ice.h. Previously, the ice driver was just exporting its entire PF struct to the auxiliary driver, but since each core driver will have its own different PF struct, implement a universal struct that all core drivers can provide to the auxiliary driver through the probe call. Reviewed-by: Przemek Kitszel Signed-off-by: Dave Ertman Co-developed-by: Mustafa Ismail Signed-off-by: Mustafa Ismail Co-developed-by: Shiraz Saleem Signed-off-by: Shiraz Saleem Co-developed-by: Tatyana Nikolova Signed-off-by: Tatyana Nikolova Signed-off-by: Tony Nguyen commit cb4a11925268b13ebcac322775d78bdd4e1b26d3 Author: Ihor Solodrai Date: Thu May 8 13:37:08 2025 -0700 scripts/bpf_doc.py: implement json output format bpf_doc.py parses bpf.h header to collect information about various API elements (such as BPF helpers) and then dump them in one of the supported formats: rst docs and a C header. It's useful for external tools to be able to consume this information in an easy-to-parse format such as JSON. Implement JSON printers and add --json command line argument. v3->v4: refactor attrs to only be a helper's field v2->v3: nit cleanup v1->v2: add json printer for syscall target v3: https://lore.kernel.org/bpf/20250507203034.270428-1-isolodrai@meta.com/ v2: https://lore.kernel.org/bpf/20250507182802.3833349-1-isolodrai@meta.com/ v1: https://lore.kernel.org/bpf/20250506000605.497296-1-isolodrai@meta.com/ Signed-off-by: Ihor Solodrai Tested-by: Quentin Monnet Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20250508203708.2520847-1-isolodrai@meta.com Signed-off-by: Alexei Starovoitov commit cf15cdc0f0f39a5c6315200808ec3e3995b0c2d2 Author: Luis Gerhorst Date: Thu May 1 09:35:52 2025 +0200 selftests/bpf: Fix caps for __xlated/jited_unpriv Currently, __xlated_unpriv and __jited_unpriv do not work because the BPF syscall will overwrite info.jited_prog_len and info.xlated_prog_len with 0 if the process is not bpf_capable(). This bug was not noticed before, because there is no test that actually uses __xlated_unpriv/__jited_unpriv. To resolve this, simply restore the capabilities earlier (but still after loading the program). Adding this here unconditionally is fine because the function first checks that the capabilities were initialized before attempting to restore them. This will be important later when we add tests that check whether a speculation barrier was inserted in the correct location. Signed-off-by: Luis Gerhorst Fixes: 9c9f73391310 ("selftests/bpf: allow checking xlated programs in verifier_* tests") Fixes: 7d743e4c759c ("selftests/bpf: __jited test tag to check disassembly after jit") Acked-by: Kumar Kartikeya Dwivedi Tested-by: Eduard Zingerman Link: https://lore.kernel.org/r/20250501073603.1402960-2-luis.gerhorst@fau.de Signed-off-by: Alexei Starovoitov commit 113e04276018bd13978051d8b05a613b4d390cc9 Author: Mingcong Bai Date: Thu Apr 17 15:39:46 2025 +0800 ACPI: resource: fix a typo for MECHREVO in irq1_edge_low_force_override[] The vendor name for MECHREVO was incorrectly spelled in commit b53f09ecd602 ("ACPI: resource: Do IRQ override on MECHREV GM7XG0M"). Correct this typo in this trivial patch. Fixes: b53f09ecd602 ("ACPI: resource: Do IRQ override on MECHREV GM7XG0M") Signed-off-by: Mingcong Bai Link: https://patch.msgid.link/20250417073947.47419-1-jeffbai@aosc.io Signed-off-by: Rafael J. Wysocki commit 6dfe26cb1c290fa4b62e6fb8c05209fe5f7adb76 Author: Srinivas Pandruvada Date: Sat Mar 29 22:43:58 2025 -0700 tools/power/x86/intel-speed-select: v1.23 release This version includes the following changes: - Displays SST-PP2 revision fields. - Skips updating uncore frequency limits on newer generations of CPUs. Signed-off-by: Srinivas Pandruvada commit 51272ca7c3670d37cd4c573ed0f2f54e24095a01 Author: Srinivas Pandruvada Date: Wed Apr 16 17:26:46 2025 -0700 tools/power/x86/intel-speed-select: Skip uncore frequency update On SST PP level switch, skip adjusting the uncore frequency limit and allow the hardware to handle this on newer platforms. As newer generations of CPUs have changed the extended family identifier, use this identifier to exclude the update. Signed-off-by: Srinivas Pandruvada commit 0f2d39f340627a6a2cc5b4511e6fcb38a7be4d4e Merge: 32c563d1092f92 8c112a428b94ea Author: Andrii Nakryiko Date: Fri May 9 10:37:11 2025 -0700 Merge branch 'bpf-allow-some-trace-helpers-for-all-prog-types' Feng Yang says: ==================== bpf: Allow some trace helpers for all prog types From: Feng Yang This series allow some trace helpers for all prog types. if it works under NMI and doesn't use any context-dependent things, should be fine for any program type. The detailed discussion is in [1]. [1] https://lore.kernel.org/all/CAEf4Bza6gK3dsrTosk6k3oZgtHesNDSrDd8sdeQ-GiS6oJixQg@mail.gmail.com/ --- Changes in v3: - cgroup_current_func_proto clean. - bpf_scx_get_func_proto clean. Thanks, Andrii Nakryiko. - Link to v2: https://lore.kernel.org/all/20250427063821.207263-1-yangfeng59949@163.com/ Changes in v2: - not expose compat probe read APIs to more program types. - Remove the prog->sleepable check added for copy_from_user, - or the summarization_freplace/might_sleep_with_might_sleep test will fail with the error "program of this type cannot use helper bpf_copy_from_user" - Link to v1: https://lore.kernel.org/all/20250425080032.327477-1-yangfeng59949@163.com/ ==================== Link: https://patch.msgid.link/20250506061434.94277-1-yangfeng59949@163.com Signed-off-by: Andrii Nakryiko commit 8c112a428b94eabb6efde39715349a0b8dec880e Author: Feng Yang Date: Tue May 6 14:14:34 2025 +0800 sched_ext: Remove bpf_scx_get_func_proto task_storage_{get,delete} has been moved to bpf_base_func_proto. Suggested-by: Andrii Nakryiko Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Acked-by: Tejun Heo Link: https://lore.kernel.org/bpf/20250506061434.94277-3-yangfeng59949@163.com commit 5aa63cab70d3f9c1ff714977ecad09c62ccef731 Author: Srinivas Pandruvada Date: Sat Mar 29 22:34:29 2025 -0700 tools/power/x86/intel-speed-select: Support SST PP revision 2 fields Display fields added by SST PP revision 2. They include: uncore P0 (max frequency), P1 (base frequency) and Pm (min frequency) for uncore fabric 1. Signed-off-by: Srinivas Pandruvada commit 4f1a19b8bc1485d3e8fb57edc1650e50f61f931e Author: Colin Ian King Date: Wed May 7 09:24:21 2025 +0100 perf test amd ibs: Fix spelling mistake "Asssuming" -> "Assuming" There is a spelling mistake ina pr_debug message. Fix it. Signed-off-by: Colin Ian King Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250507082421.188848-1-colin.i.king@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit c60b7d6f50ae25a91a6998a8118bba325a382d28 Author: Namhyung Kim Date: Wed May 7 14:59:39 2025 -0700 perf pmu: Use available core PMU for raw events When it finds a matching PMU for a legacy event, it should look for core PMUs. The raw events also refers to core events so it should be handled similarly. On x86, PERF_TYPE_RAW should match with the existing cpu PMU. But on ARM, there's no PMU with the matching type so it'll pick the first core PMU for it. Suggested-by: Ian Rogers Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250507215939.54399-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ee971630f20fd421fffcdc4543731ebcb54ed6d0 Author: Feng Yang Date: Tue May 6 14:14:33 2025 +0800 bpf: Allow some trace helpers for all prog types if it works under NMI and doesn't use any context-dependent things, should be fine for any program type. The detailed discussion is in [1]. [1] https://lore.kernel.org/all/CAEf4Bza6gK3dsrTosk6k3oZgtHesNDSrDd8sdeQ-GiS6oJixQg@mail.gmail.com/ Suggested-by: Andrii Nakryiko Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Acked-by: Tejun Heo Link: https://lore.kernel.org/bpf/20250506061434.94277-2-yangfeng59949@163.com commit 225c0360a8d92636835ca73e3144d78d876bb09c Author: Yury Norov Date: Thu May 8 15:32:06 2025 -0400 cgroup/cpuset: drop useless cpumask_empty() in compute_effective_exclusive_cpumask() Empty cpumasks can't intersect with any others. Therefore, testing for non-emptyness is useless. Signed-off-by: Yury Norov Reviewed-by: Waiman Long Signed-off-by: Tejun Heo commit c42e219942cb1325fe38160a4fd2be73c74abc0e Author: Namhyung Kim Date: Fri May 9 10:19:50 2025 -0700 perf lock contention: Add -J/--inject-delay option This is to slow down lock acquistion (on contention locks) deliberately. A possible use case is to estimate impact on application performance by optimization of kernel locking behavior. By delaying the lock it can simulate the worse condition as a control group, and then compare with the current behavior as a optimized condition. The syntax is 'time@function' and the time can have unit suffix like "us" and "ms". For example, I ran a simple test like below. $ sudo perf lock con -abl -L tasklist_lock -- \ sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 92 1.18 ms 199.54 us 12.79 us ffffffff8a806080 tasklist_lock (rwlock) The contention count was 92 and the average wait time was around 10 us. But if I add 100 usec of delay to the tasklist_lock, $ sudo perf lock con -abl -L tasklist_lock -J 100us@tasklist_lock -- \ sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 190 15.67 ms 230.10 us 82.46 us ffffffff8a806080 tasklist_lock (rwlock) The contention count increased and the average wait time was up closed to 100 usec. If I increase the delay even more, $ sudo perf lock con -abl -L tasklist_lock -J 1ms@tasklist_lock -- \ sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 1002 2.80 s 3.01 ms 2.80 ms ffffffff8a806080 tasklist_lock (rwlock) Now every sleep process had contention and the wait time was more than 1 msec. This is on my 4 CPU laptop so I guess one CPU has the lock while other 3 are waiting for it mostly. For simplicity, it only supports global locks for now. Committer testing: root@number:~# grep -m1 'model name' /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processor root@number:~# perf lock con -abl -L tasklist_lock -- sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 142 453.85 us 25.39 us 3.20 us ffffffffae808080 tasklist_lock (rwlock) root@number:~# perf lock con -abl -L tasklist_lock -J 100us@tasklist_lock -- sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 1040 2.39 s 3.11 ms 2.30 ms ffffffffae808080 tasklist_lock (rwlock) root@number:~# perf lock con -abl -L tasklist_lock -J 1ms@tasklist_lock -- sh -c 'for i in $(seq 1000); do sleep 1 & done; wait' contended total wait max wait avg wait address symbol 1025 24.72 s 31.01 ms 24.12 ms ffffffffae808080 tasklist_lock (rwlock) root@number:~# Suggested-by: Stephane Eranian Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20250509171950.183591-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4bfe27140edf8dd1322326c79f5ae8d29ff7e43d Author: Michael Petlan Date: Mon Jan 13 19:26:00 2025 +0100 perf tests: Fix 'perf report' tests installation There was a copy-paste mistake in the installation commands. Also, we need to install stderr-whitelist.txt file, which contains allowed messages that are printed on stderr and should not cause test fail. Fixes: 097fe67df1aa9cc7 ("perf testsuite: Install perf-report tests in the 'make install-tests -C tools/perf' target") Signed-off-by: Michael Petlan Cc: Ian Rogers Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250113182605.130719-6-vmolnaro@redhat.com Signed-off-by: Veronika Molnarova Signed-off-by: Arnaldo Carvalho de Melo commit 32c563d1092f92f916bd149967fdcd35c8ff8b54 Merge: b69d4413aa1961 d3131466b4f8d2 Author: Alexei Starovoitov Date: Fri May 9 10:05:28 2025 -0700 Merge branch 'bpf-riscv64-support-load-acquire-and-store-release-instructions' Peilin Ye says: ==================== bpf, riscv64: Support load-acquire and store-release instructions Hi all! Patchset [1] introduced BPF load-acquire (BPF_LOAD_ACQ) and store-release (BPF_STORE_REL) instructions, and added x86-64 and arm64 JIT compiler support. As a follow-up, this v2 patchset supports load-acquire and store-release instructions for the riscv64 JIT compiler, and introduces some related selftests/ changes. Specifically: * PATCH 1 makes insn_def_regno() handle load-acquires properly for bpf_jit_needs_zext() (true for riscv64) architectures * PATCH 2, 3 from Andrea Parri add the actual support to the riscv64 JIT compiler * PATCH 4 optimizes code emission by skipping redundant zext instructions inserted by the verifier * PATCH 5, 6 and 7 are minor selftest/ improvements * PATCH 8 enables (non-arena) load-acquire/store-release selftests for riscv64 v1: https://lore.kernel.org/bpf/cover.1745970908.git.yepeilin@google.com/ Changes since v1: * add Acked-by:, Reviewed-by: and Tested-by: tags from Lehui and Björn * simplify code logic in PATCH 1 (Lehui) * in PATCH 3, avoid changing 'return 0;' to 'return ret;' at the end of bpf_jit_emit_insn() (Lehui) Please refer to individual patches for details. Thanks! [1] https://lore.kernel.org/all/cover.1741049567.git.yepeilin@google.com/ ==================== Link: https://patch.msgid.link/cover.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit d3131466b4f8d2b3a8eea53daf524aaeeba03d4c Author: Peilin Ye Date: Wed May 7 03:43:31 2025 +0000 selftests/bpf: Enable non-arena load-acquire/store-release selftests for riscv64 For riscv64, enable all BPF_{LOAD_ACQ,STORE_REL} selftests except the arena_atomics/* ones (not guarded behind CAN_USE_LOAD_ACQ_STORE_REL), since arena access is not yet supported. Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/9d878fa99a72626208a8eed3c04c4140caf77fda.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 0357f29de80983992c2d3e9a5ccb4fcd03a79d76 Author: Peilin Ye Date: Wed May 7 03:43:25 2025 +0000 selftests/bpf: Verify zero-extension behavior in load-acquire tests Verify that 8-, 16- and 32-bit load-acquires are zero-extending by using immediate values with their highest bit set. Do the same for the 64-bit variant to keep the style consistent. Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/11097fd515f10308b3941469ee4c86cb8872db3f.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 6e492ffcab6064cd7b317dc1f49fb9f92407aaa7 Author: Peilin Ye Date: Wed May 7 03:43:19 2025 +0000 selftests/bpf: Avoid passing out-of-range values to __retval() Currently, we pass 0x1234567890abcdef to __retval() for the following two tests: verifier_load_acquire/load_acquire_64 verifier_store_release/store_release_64 However, the upper 32 bits of that value are being ignored, since __retval() expects an int. Actually, the tests would still pass even if I change '__retval(0x1234567890abcdef)' to e.g. '__retval(0x90abcdef)'. Restructure the tests a bit to test the entire 64-bit values properly. Do the same to their 8-, 16- and 32-bit variants as well to keep the style consistent. Fixes: ff3afe5da998 ("selftests/bpf: Add selftests for load-acquire and store-release instructions") Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/d67f4c6f6ee0d0388cbce1f4892ec4176ee2d604.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 13fdecf3456e21f91a4403f989464edcc5d61c22 Author: Peilin Ye Date: Wed May 7 03:43:13 2025 +0000 selftests/bpf: Use CAN_USE_LOAD_ACQ_STORE_REL when appropriate Instead of open-coding the conditions, use '#ifdef CAN_USE_LOAD_ACQ_STORE_REL' to guard the following tests: verifier_precision/bpf_load_acquire verifier_precision/bpf_store_release verifier_store_release/* Note that, for the first two tests in verifier_precision.c, switching to '#ifdef CAN_USE_LOAD_ACQ_STORE_REL' means also checking if '__clang_major__ >= 18', which has already been guaranteed by the outer '#if' check. Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/45d7e025f6e390a8ff36f08fc51e31705ac896bd.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit db7a3822b5f474b09db0a776e91f17c8b7d32137 Author: Peilin Ye Date: Wed May 7 03:43:07 2025 +0000 bpf, riscv64: Skip redundant zext instruction after load-acquire Currently, the verifier inserts a zext instruction right after every 8-, 16- or 32-bit load-acquire, which is already zero-extending. Skip such redundant zext instructions. While we are here, update that already-obsolete comment about "skip the next instruction" in build_body(). Also change emit_atomic_rmw()'s parameters to keep it consistent with emit_atomic_ld_st(). Note that checking 'insn[1]' relies on 'insn' not being the last instruction, which should have been guaranteed by the verifier; we already use 'insn[1]' elsewhere in the file for similar purposes. Additionally, we don't check if 'insn[1]' is actually a zext for our load-acquire's dst_reg, or some other registers - in other words, here we are relying on the verifier to always insert a redundant zext right after a 8/16/32-bit load-acquire, for its dst_reg. Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/10e90e0eab042f924d35ad0d1c1f7ca29f673152.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 8afd3170d5116385740aef8ab77d10b83f9b8e60 Author: Andrea Parri Date: Wed May 7 03:43:01 2025 +0000 bpf, riscv64: Support load-acquire and store-release instructions Support BPF load-acquire (BPF_LOAD_ACQ) and store-release (BPF_STORE_REL) instructions in the riscv64 JIT compiler. For example, consider the following 64-bit load-acquire (assuming little-endian): db 10 00 00 00 01 00 00 r1 = load_acquire((u64 *)(r1 + 0x0)) 95 00 00 00 00 00 00 00 exit opcode (0xdb): BPF_ATOMIC | BPF_DW | BPF_STX imm (0x00000100): BPF_LOAD_ACQ The JIT compiler will emit an LD instruction followed by a FENCE R,RW instruction for the above, e.g.: ld x7,0(x6) fence r,rw Similarly, consider the following 16-bit store-release: cb 21 00 00 10 01 00 00 store_release((u16 *)(r1 + 0x0), w2) 95 00 00 00 00 00 00 00 exit opcode (0xcb): BPF_ATOMIC | BPF_H | BPF_STX imm (0x00000110): BPF_STORE_REL A FENCE RW,W instruction followed by an SH instruction will be emitted, e.g.: fence rw,w sh x2,0(x4) 8-bit and 16-bit load-acquires are zero-extending (cf., LBU, LHU). The verifier always rejects misaligned load-acquires/store-releases (even if BPF_F_ANY_ALIGNMENT is set), so the emitted load and store instructions are guaranteed to be single-copy atomic. Introduce primitives to emit the relevant (and the most common/used in the kernel) fences, i.e. fences with R -> RW, RW -> W and RW -> RW. Rename emit_atomic() to emit_atomic_rmw() to make it clear that it only handles RMW atomics, and replace its is64 parameter to allow to perform the required checks on the opsize (BPF_SIZE(code)). Acked-by: Björn Töpel Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Andrea Parri Co-developed-by: Peilin Ye Signed-off-by: Peilin Ye Reviewed-by: Pu Lehui Link: https://lore.kernel.org/r/3059c560e537ad43ed19055d2ebbd970c698095a.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 118ae46b794271ebcfcc9bab95e1c766198c8209 Author: Andrea Parri Date: Wed May 7 03:42:55 2025 +0000 bpf, riscv64: Introduce emit_load_*() and emit_store_*() We're planning to add support for the load-acquire and store-release BPF instructions. Define emit_load_() and emit_store_() to enable/facilitate the (re)use of their code. Acked-by: Björn Töpel Reviewed-by: Pu Lehui Tested-by: Björn Töpel # QEMU/RVA23 Tested-by: Peilin Ye Signed-off-by: Andrea Parri [yepeilin@google.com: cosmetic change to commit title] Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/fce89473a5748e1631d18a5917d953460d1ae0d0.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit fce7bd8e385a6c282d70bed39d82ce805eeafbee Author: Peilin Ye Date: Wed May 7 03:42:45 2025 +0000 bpf/verifier: Handle BPF_LOAD_ACQ instructions in insn_def_regno() In preparation for supporting BPF load-acquire and store-release instructions for architectures where bpf_jit_needs_zext() returns true (e.g. riscv64), make insn_def_regno() handle load-acquires properly. Acked-by: Björn Töpel Tested-by: Björn Töpel # QEMU/RVA23 Signed-off-by: Peilin Ye Reviewed-by: Pu Lehui Link: https://lore.kernel.org/r/09cb2aec979aaed9d16db41f0f5b364de39377c0.1746588351.git.yepeilin@google.com Signed-off-by: Alexei Starovoitov commit 68d8b4f399e78a7be2bc69530c7e4b3e79fde9db Merge: 8e62ba590160f9 98a863fee2406f Author: Dave Jiang Date: Fri May 9 09:59:28 2025 -0700 Merge branch 'for-6.16/cxl-cleanups' into cxl-for-next In preparation for code changes related to AMD Zen5 address translation support, a number of small code refactor and cleanups are send ahead. commit 98a863fee2406f92cf172659b2390212e72a3313 Author: Robert Richter Date: Fri May 9 17:06:59 2025 +0200 cxl: Add a dev_dbg() when a decoder was added to a port Improve debugging by adding and unifying messages whenever a decoder was added to a port. It is especially useful to get the decoder mapping of the involved CXL host bridge or PCI device. This avoids a complex lookup of the decoder/port/device mappings in sysfs. Example log messages: cxl_acpi ACPI0017:00: decoder0.0 added to root0 cxl_acpi ACPI0017:00: decoder0.1 added to root0 ... pci0000:e0: decoder1.0 added to port1 pci0000:e0: decoder1.1 added to port1 ... cxl_mem mem0: decoder5.0 added to endpoint5 cxl_mem mem0: decoder5.1 added to endpoint5 Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-15-rrichter@amd.com Signed-off-by: Dave Jiang commit d90acdf49e18029cfe4194475c45ef143657737a Author: Robert Richter Date: Fri May 9 17:06:58 2025 +0200 cxl/region: Add a dev_err() on missing target list entries Broken target lists are hard to discover as the driver fails at a later initialization stage. Add an error message for this. Example log messages: cxl_mem mem1: failed to find endpoint6:0000:e0:01.3 in target list of decoder1.1 cxl_port endpoint6: failed to register decoder6.0: -6 cxl_port endpoint6: probe: 0 Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-14-rrichter@amd.com Signed-off-by: Dave Jiang commit 9efefa1c6f2c30e8c8adc0236b27fef4c458c148 Author: Robert Richter Date: Fri May 9 17:06:57 2025 +0200 cxl/region: Add a dev_warn() on registration failure Esp. in complex system configurations with multiple endpoints and interleaving setups it is hard to detect region setup failures as its registration may silently fail. Add messages to show registration failures. Example log message: cxl region5: region sort successful cxl region5: mem0:endpoint5 decoder5.0 add: mem0:decoder5.0 @ 0 next: none nr_eps: 1 nr_targets: 1 cxl_port endpoint5: decoder5.0: range: 0x22350000000-0x2634fffffff iw: 1 ig: 256 cxl region5: pci0000:e0:port1 decoder1.2 add: mem0:decoder5.0 @ 0 next: mem0 nr_eps: 1 nr_targets: 1 cxl region5: pci0000:e0:port1 iw: 1 ig: 256 cxl region5: pci0000:e0:port1: decoder1.2 expected 0000:e0:01.2 at 0 cxl endpoint5: failed to attach decoder5.0 to region5: -6 cxl_port endpoint5: probe: 0 Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-13-rrichter@amd.com Signed-off-by: Dave Jiang commit d6879d8cfb81b759fee5532ec143b520edfd6905 Author: Robert Richter Date: Fri May 9 17:06:56 2025 +0200 cxl/region: Add function to find a port's switch decoder by range Factor out code to find the switch decoder of a port for a specific address range. Reuse the code to search a root decoder, create the function cxl_port_find_switch_decoder() and rework match_root_decoder_by_range() to be usable for switch decoders too. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-12-rrichter@amd.com Signed-off-by: Dave Jiang commit 868a8f1f045bce791c3123845075ee9a82a9fe4c Author: Robert Richter Date: Fri May 9 17:06:55 2025 +0200 cxl/region: Factor out code to find a root decoder's region In function cxl_add_to_region() there is code to determine a root decoder's region. Factor that code out. This is in preparation to further rework and simplify function cxl_add_to_region(). The reference count must be decremented after using the region. cxl_find_region_by_range() is paired with the put_cxl_region cleanup helper that can be used for this. [dj: Fixed up "obj __free(...) = NULL" pattern] Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-11-rrichter@amd.com Signed-off-by: Dave Jiang commit 9466ee981647a8655e7f8312ae89aba665d78918 Author: Robert Richter Date: Fri May 9 17:06:54 2025 +0200 cxl/region: Factor out code to find the root decoder In function cxl_add_to_region() there is code to determine the root decoder associated to an endpoint decoder. Factor out that code for later reuse. This has the benefit of reducing cxl_add_to_region()'s function complexity. The reference count must be decremented after using the root decoder. cxl_find_root_decoder() is paired with the put_cxl_root_decoder cleanup helper that can be used for this. [dj: Fixed up "obj __free(...) = NULL" pattern] Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-10-rrichter@amd.com Signed-off-by: Dave Jiang commit 74bf125abd87297b559eb72043e4677550d3a790 Author: Robert Richter Date: Fri May 9 17:06:53 2025 +0200 cxl/port: Replace put_cxl_root() by a cleanup helper Function put_cxl_root() is only used by its cleanup helper. Remove the function entirely and only use the helper. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: "Fabio M. De Francesco" Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-9-rrichter@amd.com Signed-off-by: Dave Jiang commit 5ed826fc4bc6073e0083ed30c10f6a54da06b83b Author: Robert Richter Date: Fri May 9 17:06:52 2025 +0200 cxl/region: Move find_cxl_root() to cxl_add_to_region() When adding an endpoint to a region, the root port is determined first. Move this directly into cxl_add_to_region(). This is in preparation of the initialization of endpoints that iterates the port hierarchy from the endpoint up to the root port. As a side-effect the root argument is removed from the argument lists of cxl_add_to_region() and related functions. Now, the endpoint is the only parameter to add a region. This simplifies the function interface. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-8-rrichter@amd.com Signed-off-by: Dave Jiang commit 0ee2d97810b9b1626d31a63f4a166f0a310b78e5 Author: Robert Richter Date: Fri May 9 17:06:51 2025 +0200 cxl/region: Avoid duplicate call of cxl_port_pick_region_decoder() Function cxl_port_pick_region_decoder() is called twice, in alloc_region_ref() and cxl_rr_alloc_decoder(). Both functions are subsequently called from cxl_port_attach_region(). Make the decoder a function argument to both which avoids a duplicate call of cxl_port_pick_region_decoder(). Now, cxl_rr_alloc_decoder() no longer allocates the decoder. Instead, the previously picked decoder is assigned to the region reference. Hence, rename the function to cxl_rr_assign_decoder(). Moving the call out of alloc_region_ref() also moves it out of the xa_for_each() loop in there. Now, cxld is determined no longer only for each auto-generated region, but now once for all regions regardless of auto-generated or not. This is fine as the cxld argument is needed for all regions in cxl_rr_assign_decoder() and an error would be returned otherwise anyway. So it is better to determine the decoder in front of all this and fail early if missing instead of running through all that code with multiple calls of cxl_port_pick_region_decoder(). Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-7-rrichter@amd.com Signed-off-by: Dave Jiang commit a3a96873b21ebd5ddac694faf62fcccc60b84254 Author: Robert Richter Date: Fri May 9 17:06:50 2025 +0200 cxl/region: Rename function to cxl_port_pick_region_decoder() Current function cxl_region_find_decoder() is used to find a port's decoder during region setup. In the region creation path the function is an allocator to find a free port. In the region assembly path, it is recalling the decoder that platform firmware picked for validation purposes. Rename function to cxl_port_pick_region_decoder() that better describes its use and update the function's description. The result of cxl_port_pick_region_decoder() is recorded in a 'struct cxl_region_ref' in @port for later recall when other endpoints might also be targets of the picked decoder. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-6-rrichter@amd.com Signed-off-by: Dave Jiang commit 99ff9060b2c9d1e598cb0dc74187d3400aae26d6 Author: Robert Richter Date: Fri May 9 17:06:49 2025 +0200 cxl: Introduce parent_port_of() helper Often a parent port must be determined. Introduce the parent_port_of() helper function to avoid open coding of determination of a parent port. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-5-rrichter@amd.com Signed-off-by: Dave Jiang commit 88bc0503c464a261ecac3bf2a4dabcf082f1b0d9 Author: Robert Richter Date: Fri May 9 17:06:48 2025 +0200 cxl/pci: Add comments to cxl_hdm_decode_init() There are various configuration cases of HDM decoder registers causing different code paths. Add comments to cxl_hdm_decode_init() to better explain them. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Reviewed-by: Dave Jiang Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-4-rrichter@amd.com Signed-off-by: Dave Jiang commit d858631b1caed429c519f9e8f59b4848b27bc5a5 Author: Robert Richter Date: Fri May 9 17:06:47 2025 +0200 cxl/pci: Moving code in cxl_hdm_decode_init() Commit 3f9e07531778 ("cxl/pci: simplify the check of mem_enabled in cxl_hdm_decode_init()") changed the code flow in this function. The root port is determined before a check to leave the function. Since the root port is not used by the check it can be moved to run the check first. This improves code readability and avoids unnesessary code execution. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Davidlohr Bueso Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-3-rrichter@amd.com Signed-off-by: Dave Jiang commit 21339b30f027dccab55cfe6d9bb69825e4d17fb7 Author: Robert Richter Date: Fri May 9 17:06:46 2025 +0200 cxl: Remove else after return Remove unnecessary 'else' after return. Improves readability of code. It is easier to place comments. Check and fix all occurrences under drivers/cxl/. Signed-off-by: Robert Richter Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Reviewed-by: Alison Schofield Reviewed-by: "Fabio M. De Francesco" Tested-by: Gregory Price Acked-by: Dan Williams Link: https://patch.msgid.link/20250509150700.2817697-2-rrichter@amd.com Signed-off-by: Dave Jiang commit 7330e002c050eea6a47dfa57c7f128af2e8dc592 Author: Moon Hee Lee Date: Tue May 6 15:00:57 2025 -0700 PM: EM: Documentation: fix typo in energy-model.rst Fixes a grammar issue ("than" -> "then") and changes "re-use" to "reuse" for consistency with modern spelling. Signed-off-by: Moon Hee Lee Link: https://patch.msgid.link/20250506220057.5589-1-moonhee.lee.ca@gmail.com [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 2c1879a440315e0b292bbff0fa63a73bd8a52e34 Author: J. Neuschäfer Date: Mon Apr 28 12:44:31 2025 +0200 ARM: dts: amlogic: meson8-fernsehfee3: Describe regulators The fernsehfee3 board uses a Ricoh RN5T618 PMIC to generate various voltages. Board schematics are not available, but the regulator voltages found in /sys/kernel/debug/regulator/regulator_summary match those in meson8m2-mxiii-plus.dts: DCDC1 0 0 0 unknown 1100mV 0mA 0mV 0mV DCDC2 0 0 0 unknown 1150mV 0mA 0mV 0mV DCDC3 0 0 0 unknown 1500mV 0mA 0mV 0mV LDO1 0 0 0 unknown 2900mV 0mA 0mV 0mV LDO2 0 0 0 unknown 1800mV 0mA 0mV 0mV LDO3 0 0 0 unknown 1800mV 0mA 0mV 0mV LDO4 0 0 0 unknown 2850mV 0mA 0mV 0mV LDO5 0 0 0 unknown 1800mV 0mA 0mV 0mV LDORTC1 0 0 0 unknown 2700mV 0mA 0mV 0mV LDORTC2 0 0 0 unknown 900mV 0mA 0mV 0mV This patch takes the following approach: - Copy RN5T618 regulator nodes from meson8m2-mxiii-plus.dts - Remove some of the regulator names, which do not seem to apply - Verify regulator supply relations by starting without any relations (and without regulator-always-on) and seeing what breaks when the kernel turns off "unused" regulators. This results in the following observations: - When LDO1 is turned off, the board resets - When DCDC1, DCDC2, DCDC3, LDO2, or LDO5 are turned off, the board (as observed through the serial port) stops running, so these must stay on at all times. - LDO4 (VCC2V8) appears to be unused on this board. - LDO3 (VCC1V8_USB) must stay on in order for USB to work, both the external USB ports and the internal USB wifi module. The cpu-supply and mali-supply relations are also copied from meson8m2-mxiii-plus.dts Signed-off-by: J. Neuschäfer Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20250428-fernsehfee-v2-4-293b98a43a91@posteo.net Signed-off-by: Neil Armstrong commit dac928757928a8ea06eaf5694d5deae53a21616f Author: J. Neuschäfer Date: Mon Apr 28 12:44:30 2025 +0200 ARM: dts: amlogic: Add TCU Fernsehfee 3.0 Fernsehfee[1] ("TV fairy") 3.0 is a set-top box with HDMI input and output ports. It originally ran Android 4.4 and a Linux 3.10 kernel. The following features are tested and known to work: - Ethernet - Power LED (switching between green and red) - Power button - eMMC - SD Card - USB - Wifi The following features are untested or not working: - HDMI input and output - Infrared remote control input and output [1]: https://fernsehfee.de/ (German), https://telefairy.com/ (English) Reviewed-by: Neil Armstrong Signed-off-by: J. Neuschäfer Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20250428-fernsehfee-v2-3-293b98a43a91@posteo.net Signed-off-by: Neil Armstrong commit eb7af1268e0042e83607918229cd62c3669cdcb8 Author: J. Neuschäfer Date: Mon Apr 28 12:44:29 2025 +0200 dt-bindings: arm: amlogic: Add TCU Fernsehfee 3.0 board Fernsehfee ("TV fairy") 3.0 is a set-top box with HDMI input and output ports. It originally ran Android 4.4 and a Linux 3.10 kernel. https://fernsehfee.de/ (German) https://telefairy.com/ (English) Acked-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: J. Neuschäfer Link: https://lore.kernel.org/r/20250428-fernsehfee-v2-2-293b98a43a91@posteo.net Signed-off-by: Neil Armstrong commit 40f983aa2d809b4934a260c76b82e9ff19c09a88 Author: J. Neuschäfer Date: Mon Apr 28 12:44:28 2025 +0200 dt-bindings: vendor-prefixes: Add TC Unterhaltungselektronik AG TC Unterhaltungselektronik is the company behind Fernsehfee branded set-top boxes. Acked-by: Krzysztof Kozlowski Signed-off-by: J. Neuschäfer Link: https://lore.kernel.org/r/20250428-fernsehfee-v2-1-293b98a43a91@posteo.net Signed-off-by: Neil Armstrong commit 87b480e04af45833deb5af1584694b0077805ea6 Author: Zelong Dong Date: Fri Apr 11 19:38:15 2025 +0800 dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller Add compatibles for Amlogic A4 and A5 reset controllers, which fall back to 'amlogic,meson-s4-reset'. Signed-off-by: Zelong Dong Acked-by: Conor Dooley Acked-by: Philipp Zabel Link: https://lore.kernel.org/r/20240918074211.8067-2-zelong.dong@amlogic.com Signed-off-by: Kelvin Zhang Link: https://lore.kernel.org/r/20250411-a4-a5-reset-v6-1-89963278c686@amlogic.com Signed-off-by: Neil Armstrong commit 10d0bc88bbc884519abe7d966d86b1ca7f3d686b Author: Dario Binacchi Date: Wed May 7 16:14:58 2025 +0200 ARM: dts: mxs: use padconfig macros Convert mx2{3,8} dts files to use the padconfig macros defined in mxs-pinfunc.h. Signed-off-by: Dario Binacchi Signed-off-by: Shawn Guo commit 1f6c8626527257db05c09022e94a5cd4e162c45d Author: Primoz Fiser Date: Mon May 5 09:51:07 2025 +0200 arm64: dts: freescale: Add PHYTEC phyBOARD-Nash-i.MX93 support Add initial support for PHYTEC phyBOARD-Nash-i.MX93 board [1] based on the PHYTEC phyCORE-i.MX93 SoM (System-on-Module) [2]. Supported board features: * ADC * CAN * Ethernet * EEPROM * RTC * RS-232/RS-485 * SD-card * TPM 2.0 * USB For more details see the product pages for the development kit and the SoM: [1] https://www.phytec.eu/en/produkte/development-kits/phyboard-nash/ [2] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-91-93/ Signed-off-by: Primoz Fiser Reviewed-by: Wadim Egorov Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit b20c69cd708b8f1b61e311cf05632fefe583f1c4 Author: Primoz Fiser Date: Mon May 5 09:51:06 2025 +0200 bindings: arm: fsl: Add PHYTEC phyBOARD-Nash-i.MX93 board Add devicetree bindings for PHYTEC phyBOARD-Nash-i.MX93 board based on the existing PHYTEC phyCORE-i.MX93 SoM (System-on-Module). Adjust the compatibles for the existing phyBOARD-Segin-i.MX93 board, to be able to add additional board based on the phyCORE-i.MX93 SoM. Signed-off-by: Primoz Fiser Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ef4c2c789a8a42e90a335e7411bd3cae3eb8d8d6 Author: Francesco Dolcini Date: Wed Apr 30 11:41:51 2025 +0200 arm64: defconfig: Add Toradex Embedded Controller config Enable config for Toradex SMARC Embedded Controller, this is required for proper reset and power-off functionalities on Toradex SMARC iMX8M Plus. Reviewed-by: Peng Fan Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 707bf92e4bc2b036d5f4c57cd1025872c9533c7e Author: Francesco Dolcini Date: Wed Apr 30 11:41:50 2025 +0200 arm64: dts: freescale: imx8mp-toradex-smarc: use generic gpio node name Use generic node name for the SoM GPIO expander, following the Devicetree Specification generic node names recommendation. Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 8161827fb80c7f6f6ac8abffedcfdd3a42e13d2b Author: Emanuele Ghidoli Date: Wed Apr 30 11:41:49 2025 +0200 arm64: dts: freescale: imx8mp-toradex-smarc: add gpio expander Add gpio expander node to the device tree and the related nodes. Reviewed-by: Peng Fan Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit e40201b454788f12aa3808d648ed7d4ef7e2da01 Author: Emanuele Ghidoli Date: Wed Apr 30 11:41:48 2025 +0200 arm64: dts: freescale: imx8mp-toradex-smarc: add embedded controller Add the embedded controller node to the device tree, this is required for reset and power-off functionalities. Reviewed-by: Peng Fan Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 8c7432dc2ab0e0106124b0416a6a21613b294655 Author: Francesco Dolcini Date: Wed Apr 30 11:41:47 2025 +0200 arm64: dts: freescale: imx8mp-toradex-smarc: add fan PWM configuration Configure correctly the FAN pwm output (inverted). Reviewed-by: Peng Fan Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 21faf8f8e01bfd72845343f5ed345ae6a42a44dc Author: Markus Niebel Date: Wed Apr 30 10:18:48 2025 +0200 arm64: dts: imx93-tqma9352-mba91xxca: disable Open Drain for MDIO Using the MDIO pins with Open Drain causes spec violations of the signals. Revert the changes. This is similar to commit 14e66e4b13221 ("Revert "arm64: dts: imx93-tqma9352-mba93xxca: enable Open Drain for MDIO"") Fixes: e5bc07026f94 ("arm64: add initial device tree for TQMa93xx/MBa91xxCA") Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 6495d690aa78f0c118331c48155ebb9f4086edc9 Author: Alexander Stein Date: Mon Apr 28 15:59:08 2025 +0200 dt: bindings: arm: add bindings for TQMa95xxSA TQMa95xxSA is a SOM using NXP i.MX95 CPU. MB-SMARC-2 is a carrier reference design. [1] https://www.tq-group.com/en/products/tq-embedded/arm-architecture/tqma95xxsa/ Signed-off-by: Alexander Stein Acked-by: Conor Dooley Signed-off-by: Shawn Guo commit 91d1ff322c476005957183f6611315099d3ef16c Author: Alexander Stein Date: Mon Apr 28 15:59:09 2025 +0200 arm64: dt: imx95: Add TQMa95xxSA Add initial support for TQMa95xxSA module compatible to SMARC-2. There is a common device tree for all variants with e.g. reduced CPU count. It supports LPUART7 for console, CAN, PCIe I2C, SPI, USB3.0, USB2.0, Audio, SDHC1/2 and QSPI as storage. [1] https://www.tq-group.com/en/products/tq-embedded/arm-architecture/tqma95xxsa/ Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 7bb797757bf5720543f1c5115b40a8d646d5c1cc Author: Ye Bin Date: Mon Apr 21 14:29:47 2025 +0800 arm64/cpuinfo: only show one cpu's info in c_show() Currently, when ARM64 displays CPU information, every call to c_show() assembles all CPU information. However, as the number of CPUs increases, this can lead to insufficient buffer space due to excessive assembly in a single call, causing repeated expansion and multiple calls to c_show(). To prevent this invalid c_show() call, only one CPU's information is assembled each time c_show() is called. Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20250421062947.4072855-1-yebin@huaweicloud.com Signed-off-by: Will Deacon commit fa716c6f52c7f4318e14df698aea43ff758af8a7 Author: Efe Can İçöz Date: Fri Apr 25 11:18:40 2025 +0200 ARM: dts: imx7d: update opp-table voltages Update accepted voltage levels according to IMX7DCEC Table 9 Operating ranges Signed-off-by: Efe Can İçöz Signed-off-by: Shawn Guo commit d47f1233374597c348696c3da2142cc92a36fc90 Author: Tom Rix Date: Mon Mar 20 08:52:02 2023 -0400 soc: fsl: qe: remove unused qe_ic_from_irq function clang with W=1 reports drivers/soc/fsl/qe/qe_ic.c:235:29: error: unused function 'qe_ic_from_irq' [-Werror,-Wunused-function] The use of this function was removed with commit d7c2878cfcfa ("soc: fsl: qe: remove unused qe_ic_set_* functions") Signed-off-by: Tom Rix Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230320125202.1721775-1-trix@redhat.com Link: https://lore.kernel.org/all/1619002613-18216-1-git-send-email-jiapeng.chong@linux.alibaba.com/ [krzk: Adjust commit msg] Signed-off-by: Krzysztof Kozlowski commit 8824dc7f947ac5916cf166bb8289af48c2b50bc7 Author: André Draszik Date: Fri May 9 14:22:41 2025 +0100 nvmem: max77759: Add Maxim MAX77759 NVMEM driver The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This driver exposes the non volatile memory using the platform device registered by the core MFD driver. Signed-off-by: André Draszik Acked-by: Srinivas Kandagatla Acked-by: Peter Griffin Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-3-962ac15ee3ef@linaro.org Signed-off-by: Lee Jones commit 89a796b950edfa290ebd9f7d9b6a837093c9005e Author: André Draszik Date: Fri May 9 14:22:40 2025 +0100 gpio: max77759: Add Maxim MAX77759 gpio driver The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This driver supports the GPIO functions using the platform device registered by the core MFD driver. Signed-off-by: André Draszik Acked-by: Bartosz Golaszewski Acked-by: Peter Griffin Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-2-962ac15ee3ef@linaro.org Signed-off-by: Lee Jones commit bb71e40db1b7a7822f434d211b4a94bab9996cc6 Author: André Draszik Date: Fri May 9 14:22:39 2025 +0100 mfd: max77759: Add Maxim MAX77759 core driver The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. Fuel Gauge and TCPC have separate and independent I2C addresses, register maps, and interrupt lines and are therefore excluded from the MFD core device driver here. The GPIO and NVMEM interfaces are accessed via specific commands to the built-in microprocessor. This driver implements an API that client drivers can use for accessing those. Signed-off-by: André Draszik Acked-by: Peter Griffin Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-1-962ac15ee3ef@linaro.org Signed-off-by: Lee Jones commit 81fec13be95345a57cd97b7f2b823ca1ef7c9dd5 Author: André Draszik Date: Tue Mar 25 08:27:04 2025 +0000 dt-bindings: mfd: Add max77759 binding The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes the top-level device. Signed-off-by: André Draszik Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-3-c0870ca662ba@linaro.org Signed-off-by: Lee Jones commit ee71546b8120593ff4c292d2d4c2250d11182746 Author: André Draszik Date: Tue Mar 25 08:27:03 2025 +0000 dt-bindings: nvmem: Add max77759 binding The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes its storage module (NVMEM). Signed-off-by: André Draszik Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-2-c0870ca662ba@linaro.org Signed-off-by: Lee Jones commit 190b565788ed82163dec6fc8778b618cdc1644c7 Author: André Draszik Date: Tue Mar 25 08:27:02 2025 +0000 dt-bindings: gpio: Add max77759 binding The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes its GPIO module. Signed-off-by: André Draszik Reviewed-by: "Rob Herring (Arm)" Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-1-c0870ca662ba@linaro.org Signed-off-by: Lee Jones commit c7e5d6b4a303fb9a4bd8359fb421c2d241a5bb26 Author: Krzysztof Kozlowski Date: Thu Apr 24 10:48:00 2025 +0200 ARM: dts: nxp: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: imx7d-remarkable2.dtb: bcrmf@1: $nodename:0: 'bcrmf@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 88e62ced85fe302cb0d27e372dd29d0c4982c119 Author: Krzysztof Kozlowski Date: Thu Apr 24 10:47:59 2025 +0200 arm64: dts: imx: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: imx8mm-var-som-symphony.dtb: bcrmf@1: $nodename:0: 'bcrmf@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit ed93f6f48e22413c7cd2be56a1ba3254888abc13 Author: Alexander Stein Date: Fri May 9 22:15:42 2025 +0800 arm64: dts: freescale: add initial device tree for TQMa8XxS This adds support for TQMa8XQPS and TQMa8XDPS modules on MB-SMARC-2 board. As the only difference is the mounted SoC, both module and baseboard files are shared. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 3f7de71cce2c7bac38d472dc486f57bfcb0903f5 Author: Markus Niebel Date: Thu Apr 24 09:55:29 2025 +0200 dt-bindings: arm: add TQMa8XxS boards TQMa8XxS is a SOM series featuring NXP i.MX8X SoC. They are called TQMa8XQPS and TQMa8XDPS respectively. MB-SMARC-2 is a carrier reference design. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Acked-by: Rob Herring (Arm) Signed-off-by: Shawn Guo commit 6c2df49628c15ea8bca9d04b84fdf70549152da1 Author: Alexander Stein Date: Fri May 9 22:03:24 2025 +0800 arm64: dts: imx8mp-tqma8mpql-mba8mp-ras314: Add Raspberry Pi Camera V2 overlay This overlay configures IMX219 MIPI-CSI-2 camera attached to ISP1. Also add additional overlay both using LVDS display and camera. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 63de899cb6220357dea9d0f4e5aa459ff5193bb0 Author: Pavel Begunkov Date: Fri May 9 12:12:53 2025 +0100 io_uring: count allocated requests Keep track of the number requests a ring currently has allocated (and not freed), it'll be needed in the next patch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c8f8308294dc2a1cb8925d984d937d4fc14ab5d4.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b0c8a6401fbca91da4fe0dc10d61a770f1581e45 Author: Pavel Begunkov Date: Fri May 9 12:12:52 2025 +0100 io_uring: open code io_account_cq_overflow() io_account_cq_overflow() doesn't help explaining what's going on in there, and it'll become even smaller with following patches, so open code it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e4333fa0d371f519e52a71148ebdffed4b8d3aa9.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 19a94da447f832ee614f8f5532d31c1c70061520 Author: Pavel Begunkov Date: Fri May 9 12:12:51 2025 +0100 io_uring: consolidate drain seq checking We check sequences when queuing drained requests as well when flushing them. Instead, always queue and immediately try to flush, so that all seq handling can be kept contained in the flushing code. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d4651f742e671af5b3216581e539ea5d31bc7125.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e91e4f692f7993d5d192228c5f8a9a2e12ff5250 Author: Pavel Begunkov Date: Fri May 9 12:12:50 2025 +0100 io_uring: remove drain prealloc checks Currently io_drain_req() has two steps. The first is fast path checking sequence numbers. The second is allocations, rechecking and actual queuing. Further simplify it by removing the first step. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4d06e89ed07611993d7bf89182de2300858379bd.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 05b334110fdc85f536d7dd573120d573801fb2d1 Author: Pavel Begunkov Date: Fri May 9 12:12:49 2025 +0100 io_uring: simplify drain ret passing "ret" in io_drain_req() is only used in one place, remove it and pass -ENOMEM directly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ece724b77e66e6caabcc215e0032ee7ff140f289.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fde04c7e2775feb0746301e0ef86a04d3598c3fe Author: Pavel Begunkov Date: Fri May 9 12:12:48 2025 +0100 io_uring: fix spurious drain flushing io_queue_deferred() is not tolerant to spurious calls not completing some requests. You can have an inflight drain-marked request and another request that came after and got queued into the drain list. Now, if io_queue_deferred() is called before the first request completes, it'll check the 2nd req with req_need_defer(), find that there is no drain flag set, and queue it for execution. To make io_queue_deferred() work, it should at least check sequences for the first request, and then we need also need to check if there is another drain request creating another bubble. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/972bde11b7d4ef25b3f5e3fd34f80e4d2aa345b8.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f979c20547e72568e3c793bc92c7522bc3166246 Author: Pavel Begunkov Date: Fri May 9 12:12:47 2025 +0100 io_uring: account drain memory to cgroup Account drain allocations against memcg. It's not a big problem as each such allocation is paired with a request, which is accounted, but it's nicer to follow the limits more closely. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f8dfdbd755c41fd9c75d12b858af07dfba5bbb68.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2f67c5c4dc22deb3fe8979a650a3708879e9e69c Author: Martin Schmiedel Date: Fri May 9 22:00:51 2025 +0800 arm64: dts: imx8mp-tqma8mpql-mba8mp-ras314: Add LVDS device tree overlay This adds an overlay for the supported LVDS display tianma tm070jvhg33. The LVDS interface is the same as for MBa8MPxL so the already existing overlay can be reused on this platform. Signed-off-by: Martin Schmiedel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 495e7a6389c85003fc1ef4e893f0845e12fa9b95 Author: Rafael J. Wysocki Date: Wed May 7 16:29:37 2025 +0200 PM: sysfs: Move debug runtime PM attributes to runtime_attrs[] Some of the debug sysfs attributes for runtime PM are located in the power_attrs[] table, so they are exposed even in the pm_runtime_has_no_callbacks() case, unlike the other non-debug sysfs attributes for runtime PM, which may be confusing. Moreover, dev_attr_runtime_status.attr appears in two places, which effectively causes it to be always exposed if CONFIG_PM_ADVANCED_DEBUG is set, but otherwise it is exposed only when pm_runtime_has_no_callbacks() returns 'false'. Address this by putting all sysfs attributes for runtime PM into runtime_attrs[]. Signed-off-by: Rafael J. Wysocki Reviewed-by: Sudeep Holla Reviewed-by: Ulf Hansson Link: https://patch.msgid.link/12677254.O9o76ZdvQC@rjwysocki.net commit 50c9bb30dc1f9731995a191deafbc49be717053e Author: Zihuan Zhang Date: Wed May 7 14:35:20 2025 +0800 PM: hibernate: add configurable delay for pm_test Turn the default 5 second test delay for hibernation into a configurable module parameter, so users can determine how long to wait in this pseudo-hibernate state before resuming the system. The configurable delay parameter has been added for suspend, so add an analogous one for hibernation. Example (wait 30 seconds); # echo 30 > /sys/module/hibernate/parameters/pm_test_delay # echo core > /sys/power/pm_test Signed-off-by: Zihuan Zhang Reviewed-by: Randy Dunlap Link: https://patch.msgid.link/20250507063520.419635-1-zhangzihuan@kylinos.cn [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 81a22c86ec7060be43404d4e6d68fca03dbafcf4 Author: Pavel Begunkov Date: Fri May 9 12:03:43 2025 +0100 io_uring: add lockdep asserts to io_add_aux_cqe io_add_aux_cqe() can only be called for rings with uring_lock protected completion queues, add a couple of assertions in regards to that. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c010eab7b94a187c00a9d46d8b67bf7fcad18af4.1746788592.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 28b8cd864da516ea87162015e490b1dea444888f Author: Pavel Begunkov Date: Fri May 9 12:03:28 2025 +0100 io_uring/net: move CONFIG_NET guards to Makefile Instruct Makefile to never try to compile net.c without CONFIG_NET and kill ifdefs in the file. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f466400e20c3f536191bfd559b1f3cd2a2ab5a1e.1746788579.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6ae4308116f1033ceb11b419c01e9c5f17a35633 Author: Long Li Date: Fri May 9 14:30:15 2025 +0800 io_uring: update parameter name in io_pin_pages function declaration Rename first parameter in io_pin_pages from ubuf to uaddr for consistency between declaration and implementation. Signed-off-by: Long Li Link: https://lore.kernel.org/r/20250509063015.3799255-1-leo.lilong@huaweicloud.com Signed-off-by: Jens Axboe commit 771e874ef202775b254d92c74ac460ae5a25950d Author: Jacky Bai Date: Mon Apr 21 14:51:39 2025 +0800 arm64: dts: freescale: Add minimal dts support for imx943 evk Add the minimal board dts support for i.MX943 EVK. Only the console uart, SD & eMMC are enabled for linux basic boot. Signed-off-by: Jacky Bai Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit b0d011d4841bc00de3f559b3bc8be2de11044597 Author: Jacky Bai Date: Mon Apr 21 14:51:38 2025 +0800 arm64: dts: freescale: Add basic dtsi for imx943 Add the minimal dtsi support for i.MX943. i.MX943 is the first SoC of i.MX94 Family, create a common dtsi for the whole i.MX94 family, and the specific dtsi part for i.MX943. The clock, power domain and perf index need to be used by the device nodes for resource reference, add them along with the dtsi support. Signed-off-by: Jacky Bai Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 4f28aeab5293317d5dc031d77ff2a35270b012aa Author: Jacky Bai Date: Mon Apr 21 14:51:37 2025 +0800 dt-bindings: arm: fsl: add i.MX943 EVK board Add DT compatible string for NXP i.MX943 EVK board. Signed-off-by: Jacky Bai Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f0050a3e214aa941b78ad4caf122a735a24d81a6 Author: Zijun Hu Date: Mon May 5 17:26:51 2025 +0800 PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks() pm_show_wakelocks() is called to generate a string when showing attributes /sys/power/wake_(lock|unlock), but the string ends with an unwanted space that was added back by mistake by commit c9d967b2ce40 ("PM: wakeup: simplify the output logic of pm_show_wakelocks()"). Remove the unwanted space. Fixes: c9d967b2ce40 ("PM: wakeup: simplify the output logic of pm_show_wakelocks()") Signed-off-by: Zijun Hu Link: https://patch.msgid.link/20250505-fix_power-v1-1-0f7f2c2f338c@quicinc.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 228710e8db164011d9a4dd6944307a361e3185e2 Author: Zijun Hu Date: Mon May 5 18:17:04 2025 +0800 PM: wakeup: Add missing wakeup source attribute relax_count There is wakeup source attribute 'active_count', but its counterpart attribute 'relax_count' is missing. Add 'relax_count' for consistency. Signed-off-by: Zijun Hu Link: https://patch.msgid.link/20250505-add_power_attrs-v1-1-10bc3c73c320@quicinc.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 3328eb4dfec23cb3055cda24087cd1cdee925676 Author: Ricardo Ribalda Date: Thu Mar 13 12:20:40 2025 +0000 media: uvcvideo: Use dev_err_probe for devm_gpiod_get_optional Use the dev_err_probe() helper for devm_gpiod_get_optional(), like we do with gpiod_to_irq() That eventually calls device_set_deferred_probe_reason() which can be helpful for tracking down problems. Now that all the error paths in uvc_gpio_parse have dev_err_probe, we can remove the error message in uvc_probe. Suggested-by: Doug Anderson Reviewed-by: Douglas Anderson Signed-off-by: Ricardo Ribalda Message-ID: <20250313-uvc-eprobedefer-v3-2-a1d312708eef@chromium.org> Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 387e8939307192d5a852a2afeeb83427fa477151 Author: Ricardo Ribalda Date: Thu Mar 13 12:20:39 2025 +0000 media: uvcvideo: Fix deferred probing error uvc_gpio_parse() can return -EPROBE_DEFER when the GPIOs it depends on have not yet been probed. This return code should be propagated to the caller of uvc_probe() to ensure that probing is retried when the required GPIOs become available. Currently, this error code is incorrectly converted to -ENODEV, causing some internal cameras to be ignored. This commit fixes this issue by propagating the -EPROBE_DEFER error. Cc: stable@vger.kernel.org Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") Reviewed-by: Douglas Anderson Signed-off-by: Ricardo Ribalda Message-ID: <20250313-uvc-eprobedefer-v3-1-a1d312708eef@chromium.org> Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit a70705d3c020d0d5c3ab6a5cc93e011ac35e7d48 Author: Ricardo Ribalda Date: Mon Feb 24 10:34:55 2025 +0000 media: uvcvideo: Rollback non processed entities on error If we fail to commit an entity, we need to restore the UVC_CTRL_DATA_BACKUP for the other uncommitted entities. Otherwise the control cache and the device would be out of sync. Cc: stable@kernel.org Fixes: b4012002f3a3 ("[media] uvcvideo: Add support for control events") Reported-by: Hans de Goede Closes: https://lore.kernel.org/linux-media/fe845e04-9fde-46ee-9763-a6f00867929a@redhat.com/ Signed-off-by: Ricardo Ribalda Message-ID: <20250224-uvc-data-backup-v2-3-de993ed9823b@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 5c791467aea6277430da5f089b9b6c2a9d8a4af7 Author: Ricardo Ribalda Date: Mon Feb 24 10:34:54 2025 +0000 media: uvcvideo: Send control events for partial succeeds Today, when we are applying a change to entities A, B. If A succeeds and B fails the events for A are not sent. This change changes the code so the events for A are send right after they happen. Cc: stable@kernel.org Fixes: b4012002f3a3 ("[media] uvcvideo: Add support for control events") Signed-off-by: Ricardo Ribalda Message-ID: <20250224-uvc-data-backup-v2-2-de993ed9823b@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit ba4fafb02ad6a4eb2e00f861893b5db42ba54369 Author: Ricardo Ribalda Date: Mon Feb 24 10:34:53 2025 +0000 media: uvcvideo: Return the number of processed controls If we let know our callers that we have not done anything, they will be able to optimize their decisions. Cc: stable@kernel.org Fixes: b4012002f3a3 ("[media] uvcvideo: Add support for control events") Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Message-ID: <20250224-uvc-data-backup-v2-1-de993ed9823b@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit d1b618e7954802fe5a08f71b1ef33e9b3518479b Author: Ricardo Ribalda Date: Thu Mar 27 21:05:31 2025 +0000 media: uvcvideo: Do not turn on the camera for some ioctls There are some ioctls that do not need to turn on the camera. Do not call uvc_pm_get in those cases. Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Message-ID: <20250327-uvc-granpower-ng-v6-5-35a2357ff348@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit a32d9c41bdb86e09ce731aa5fd3add89ac2103a5 Author: Ricardo Ribalda Date: Thu Mar 27 21:05:30 2025 +0000 media: uvcvideo: Make power management granular Now that every ioctl takes care of their power management we can remove the "global" power management. Despite its size, this is a relatively big change. We hope that there are no size effects of it. If there are some specific devices that miss-behave, we can add a small quirk for them. This patch introduces a behavioral change for the uvc "trigger" button. Before the "trigger" button would work as long as userspace has opened /dev/videoX. Now it only works when the camera is actually streaming. We consider that this the most common (if not the only) usecase and therefore we do not think of this as a regression. Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Message-ID: <20250327-uvc-granpower-ng-v6-4-35a2357ff348@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 10acb9101355484c3e4f2625003cd1b6c203cfe4 Author: Ricardo Ribalda Date: Thu Mar 27 21:05:29 2025 +0000 media: uvcvideo: Increase/decrease the PM counter per IOCTL Now we call uvc_pm_get/put from the device open/close. This low level of granularity might leave the camera powered on in situations where it is not needed. Increase the granularity by increasing and decreasing the Power Management counter per ioctl. There are two special cases where the power management outlives the ioctl: async controls and streamon. Handle those cases as well. In a future patch, we will remove the uvc_pm_get/put from open/close. Reviewed-by: Hans de Goede Signed-off-by: Ricardo Ribalda Message-ID: <20250327-uvc-granpower-ng-v6-3-35a2357ff348@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 2f101572c0a3ae4630f2a57c8033b78ee84ac5a6 Author: Ricardo Ribalda Date: Thu Mar 27 21:05:28 2025 +0000 media: uvcvideo: Create uvc_pm_(get|put) functions Most of the times that we have to call uvc_status_(get|put) we need to call the usb_autopm_ functions. Create a new pair of functions that automate this for us. This simplifies the current code and future PM changes in the driver. Reviewed-by: Hans de Goede Signed-off-by: Ricardo Ribalda Message-ID: <20250327-uvc-granpower-ng-v6-2-35a2357ff348@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 14f6e205e5599c2217b68c05b903ce162e7c1e27 Author: Ricardo Ribalda Date: Thu Mar 27 21:05:27 2025 +0000 media: uvcvideo: Keep streaming state in the file handle Add a variable in the file handle state to figure out if a camera is in the streaming state or not. This variable will be used in the future for power management policies. Now that we are at it, make use of guards to simplify the code. Reviewed-by: Laurent Pinchart Reviewed-by: Hans de Goede Signed-off-by: Ricardo Ribalda Message-ID: <20250327-uvc-granpower-ng-v6-1-35a2357ff348@chromium.org> Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 41abd479d14ee3276dab9ee5e2079ecd11dff8f6 Merge: f1a50492f5bdb0 d26d16438bc5fd Author: Rafael J. Wysocki Date: Fri May 9 15:17:44 2025 +0200 Merge tag 'amd-pstate-v6.16-2025-05-08' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate content for 6.16 (5/8/25) from Mario Limonciello: - Add support for a new feature on some BIOS that allows setting "lowest CPU minimum frequency". - Fix the amd-pstate-ut unit tests to restore system settings when done. * tag 'amd-pstate-v6.16-2025-05-08' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: amd-pstate-ut: Reset amd-pstate driver mode after running selftests cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver cpufreq/amd-pstate: Move max_perf limiting in amd_pstate_update commit 5fdd05efa1cd3bb98060f409eca57dc0a6d171b4 Author: Ryan Roberts Date: Tue Apr 22 09:18:19 2025 +0100 arm64/mm: Batch barriers when updating kernel mappings Because the kernel can't tolerate page faults for kernel mappings, when setting a valid, kernel space pte (or pmd/pud/p4d/pgd), it emits a dsb(ishst) to ensure that the store to the pgtable is observed by the table walker immediately. Additionally it emits an isb() to ensure that any already speculatively determined invalid mapping fault gets canceled. We can improve the performance of vmalloc operations by batching these barriers until the end of a set of entry updates. arch_enter_lazy_mmu_mode() and arch_leave_lazy_mmu_mode() provide the required hooks. vmalloc improves by up to 30% as a result. Two new TIF_ flags are created; TIF_LAZY_MMU tells us if the task is in the lazy mode and can therefore defer any barriers until exit from the lazy mode. TIF_LAZY_MMU_PENDING is used to remember if any pte operation was performed while in the lazy mode that required barriers. Then when leaving lazy mode, if that flag is set, we emit the barriers. Since arch_enter_lazy_mmu_mode() and arch_leave_lazy_mmu_mode() are used for both user and kernel mappings, we need the second flag to avoid emitting barriers unnecessarily if only user mappings were updated. Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Reviewed-by: Anshuman Khandual Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-12-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 44562c71e2cfc9eed39bfcd98af63d5da8b1b5bf Author: Ryan Roberts Date: Tue Apr 22 09:18:18 2025 +0100 mm/vmalloc: Enter lazy mmu mode while manipulating vmalloc ptes Wrap vmalloc's pte table manipulation loops with arch_enter_lazy_mmu_mode() / arch_leave_lazy_mmu_mode(). This provides the arch code with the opportunity to optimize the pte manipulations. Note that vmap_pfn() already uses lazy mmu mode since it delegates to apply_to_page_range() which enters lazy mmu mode for both user and kernel mappings. These hooks will shortly be used by arm64 to improve vmalloc performance. Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-11-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 06fc959fcff743298fdb5428e18bcbd7b54cb9ae Author: Ryan Roberts Date: Tue Apr 22 09:18:17 2025 +0100 arm64/mm: Support huge pte-mapped pages in vmap Implement the required arch functions to enable use of contpte in the vmap when VM_ALLOW_HUGE_VMAP is specified. This speeds up vmap operations due to only having to issue a DSB and ISB per contpte block instead of per pte. But it also means that the TLB pressure reduces due to only needing a single TLB entry for the whole contpte block. Since vmap uses set_huge_pte_at() to set the contpte, that API is now used for kernel mappings for the first time. Although in the vmap case we never expect it to be called to modify a valid mapping so clear_flush() should never be called, it's still wise to make it robust for the kernel case, so amend the tlb flush function if the mm is for kernel space. Tested with vmalloc performance selftests: # kself/mm/test_vmalloc.sh \ run_test_mask=1 test_repeat_count=5 nr_pages=256 test_loop_count=100000 use_huge=1 Duration reduced from 1274243 usec to 1083553 usec on Apple M2 for 15% reduction in time taken. Reviewed-by: Anshuman Khandual Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-10-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 2fba13371fe80b4d0d533a502e460ce0e936d024 Author: Ryan Roberts Date: Tue Apr 22 09:18:16 2025 +0100 mm/vmalloc: Gracefully unmap huge ptes Commit f7ee1f13d606 ("mm/vmalloc: enable mapping of huge pages at pte level in vmap") added its support by reusing the set_huge_pte_at() API, which is otherwise only used for user mappings. But when unmapping those huge ptes, it continued to call ptep_get_and_clear(), which is a layering violation. To date, the only arch to implement this support is powerpc and it all happens to work ok for it. But arm64's implementation of ptep_get_and_clear() can not be safely used to clear a previous set_huge_pte_at(). So let's introduce a new arch opt-in function, arch_vmap_pte_range_unmap_size(), which can provide the size of a (present) pte. Then we can call huge_ptep_get_and_clear() to tear it down properly. Note that if vunmap_range() is called with a range that starts in the middle of a huge pte-mapped page, we must unmap the entire huge page so the behaviour is consistent with pmd and pud block mappings. In this case emit a warning just like we do for pmd/pud mappings. Reviewed-by: Anshuman Khandual Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-9-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 61ef8ddaa35e341508d8fa891c33029ed5f75779 Author: Ryan Roberts Date: Tue Apr 22 09:18:15 2025 +0100 mm/vmalloc: Warn on improper use of vunmap_range() A call to vmalloc_huge() may cause memory blocks to be mapped at pmd or pud level. But it is possible to subsequently call vunmap_range() on a sub-range of the mapped memory, which partially overlaps a pmd or pud. In this case, vmalloc unmaps the entire pmd or pud so that the no-overlapping portion is also unmapped. Clearly that would have a bad outcome, but it's not something that any callers do today as far as I can tell. So I guess it's just expected that callers will not do this. However, it would be useful to know if this happened in future; let's add a warning to cover the eventuality. Reviewed-by: Anshuman Khandual Reviewed-by: Catalin Marinas Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-8-ryan.roberts@arm.com Signed-off-by: Will Deacon commit f89b399e8d6e9fdef92b15164c2737ac8ef5831a Author: Ryan Roberts Date: Tue Apr 22 09:18:14 2025 +0100 arm64/mm: Hoist barriers out of set_ptes_anysz() loop set_ptes_anysz() previously called __set_pte() for each PTE in the range, which would conditionally issue a DSB and ISB to make the new PTE value immediately visible to the table walker if the new PTE was valid and for kernel space. We can do better than this; let's hoist those barriers out of the loop so that they are only issued once at the end of the loop. We then reduce the cost by the number of PTEs in the range. Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-7-ryan.roberts@arm.com Signed-off-by: Will Deacon commit a899b7d0673cc7c53545a4c9c30c2c93f2f8cc7d Author: Ryan Roberts Date: Tue Apr 22 09:18:13 2025 +0100 arm64: hugetlb: Use __set_ptes_anysz() and __ptep_get_and_clear_anysz() Refactor the huge_pte helpers to use the new common __set_ptes_anysz() and __ptep_get_and_clear_anysz() APIs. This provides 2 benefits; First, when page_table_check=on, hugetlb is now properly/fully checked. Previously only the first page of a hugetlb folio was checked. Second, instead of having to call __set_ptes(nr=1) for each pte in a loop, the whole contiguous batch can now be set in one go, which enables some efficiencies and cleans up the code. One detail to note is that huge_ptep_clear_flush() was previously calling ptep_clear_flush() for a non-contiguous pte (i.e. a pud or pmd block mapping). This has a couple of disadvantages; first ptep_clear_flush() calls ptep_get_and_clear() which transparently handles contpte. Given we only call for non-contiguous ptes, it would be safe, but a waste of effort. It's preferable to go straight to the layer below. However, more problematic is that ptep_get_and_clear() is for PAGE_SIZE entries so it calls page_table_check_pte_clear() and would not clear the whole hugetlb folio. So let's stop special-casing the non-cont case and just rely on get_clear_contig_flush() to do the right thing for non-cont entries. Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Reviewed-by: Anshuman Khandual Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-6-ryan.roberts@arm.com Signed-off-by: Will Deacon commit ef493d234362e0e895968563ac51e174bcb2ddb4 Author: Ryan Roberts Date: Tue Apr 22 09:18:12 2025 +0100 arm64/mm: Refactor __set_ptes() and __ptep_get_and_clear() Refactor __set_ptes(), set_pmd_at() and set_pud_at() so that they are all a thin wrapper around a new common __set_ptes_anysz(), which takes pgsize parameter. Additionally, refactor __ptep_get_and_clear() and pmdp_huge_get_and_clear() to use a new common __ptep_get_and_clear_anysz() which also takes a pgsize parameter. These changes will permit the huge_pte API to efficiently batch-set pgtable entries and take advantage of the future barrier optimizations. Additionally since the new *_anysz() helpers call the correct page_table_check_*_set() API based on pgsize, this means that huge_ptes will be able to get proper coverage. Currently the huge_pte API always uses the pte API which assumes an entry only covers a single page. Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Reviewed-by: Anshuman Khandual Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-5-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 91e40668e70a08cf09c0e22023807b01d78d8b3a Author: Ryan Roberts Date: Tue Apr 22 09:18:11 2025 +0100 mm/page_table_check: Batch-check pmds/puds just like ptes Convert page_table_check_p[mu]d_set(...) to page_table_check_p[mu]ds_set(..., nr) to allow checking a contiguous set of pmds/puds in single batch. We retain page_table_check_p[mu]d_set(...) as macros that call new batch functions with nr=1 for compatibility. arm64 is about to reorganise its pte/pmd/pud helpers to reuse more code and to allow the implementation for huge_pte to more efficiently set ptes/pmds/puds in batches. We need these batch-helpers to make the refactoring possible. Reviewed-by: Anshuman Khandual Reviewed-by: Pasha Tatashin Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-4-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 5b3f8917644e595a710849e602b61617d55c4c41 Author: Ryan Roberts Date: Tue Apr 22 09:18:10 2025 +0100 arm64: hugetlb: Refine tlb maintenance scope When operating on contiguous blocks of ptes (or pmds) for some hugetlb sizes, we must honour break-before-make requirements and clear down the block to invalid state in the pgtable then invalidate the relevant tlb entries before making the pgtable entries valid again. However, the tlb maintenance is currently always done assuming the worst case stride (PAGE_SIZE), last_level (false) and tlb_level (TLBI_TTL_UNKNOWN). We can do much better with the hinting; In reality, we know the stride from the huge_pte pgsize, we are always operating only on the last level, and we always know the tlb_level, again based on pgsize. So let's start providing these hints. Additionally, avoid tlb maintenace in set_huge_pte_at(). Break-before-make is only required if we are transitioning the contiguous pte block from valid -> valid. So let's elide the clear-and-flush ("break") if the pte range was previously invalid. Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-3-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 29cb80519689706387bde47000dbb2ed91143063 Author: Ryan Roberts Date: Tue Apr 22 09:18:09 2025 +0100 arm64: hugetlb: Cleanup huge_pte size discovery mechanisms Not all huge_pte helper APIs explicitly provide the size of the huge_pte. So the helpers have to depend on various methods to determine the size of the huge_pte. Some of these methods are dubious. Let's clean up the code to use preferred methods and retire the dubious ones. The options in order of preference: - If size is provided as parameter, use it together with num_contig_ptes(). This is explicit and works for both present and non-present ptes. - If vma is provided as a parameter, retrieve size via huge_page_size(hstate_vma(vma)) and use it together with num_contig_ptes(). This is explicit and works for both present and non-present ptes. - If the pte is present and contiguous, use find_num_contig() to walk the pgtable to find the level and infer the number of ptes from level. Only works for *present* ptes. - If the pte is present and not contiguous and you can infer from this that only 1 pte needs to be operated on. This is ok if you don't care about the absolute size, and just want to know the number of ptes. - NEVER rely on resolving the PFN of a present pte to a folio and getting the folio's size. This is fragile at best, because there is nothing to stop the core-mm from allocating a folio twice as big as the huge_pte then mapping it across 2 consecutive huge_ptes. Or just partially mapping it. Where we require that the pte is present, add warnings if not-present. Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Ryan Roberts Tested-by: Luiz Capitulino Link: https://lore.kernel.org/r/20250422081822.1836315-2-ryan.roberts@arm.com Signed-off-by: Will Deacon commit 24bc9b976140f209467e6df814133036c223c4d2 Author: Johannes Berg Date: Thu May 8 15:13:06 2025 +0300 wifi: iwlwifi: remove unused high_temp from iwl_cfg This value is never read, so it's not needed. Remove it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-16-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 857ecb8524020dd7a8cddfb2d1149489a00c084a Author: Johannes Berg Date: Thu May 8 15:13:05 2025 +0300 wifi: iwlwifi: cfg: move MAC parameters to MAC data There are a number of MAC parameters that are in the iwl_cfg (which is the last config matched to the MAC/RF combination). This isn't necessary, there are many more of those than MACs, so move (most of) the data into the MAC family config struct. Note that DCCM information remains for use by older devices, and on 9000 series it'll be in struct iwl_cfg but be ignored when the CRF is in a Qu/So platform. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-15-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 92e1d69c20546c2d824b099a2ebf7452868f9cf0 Author: Johannes Berg Date: Thu May 8 15:13:04 2025 +0300 wifi: iwlwifi: cfg: remove DCCM offsets from new devices This is only used with old-style debug dump, which isn't supported on newer devices, so remove the data. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-14-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 9db359422264d61271599d600556a4ec2b6e0f86 Author: Johannes Berg Date: Thu May 8 15:13:03 2025 +0300 wifi: iwlwifi: cfg: remove eeprom_size from new devices Since 22000 series, the data is read by the firmware and the driver doesn't need to know, remove the useless setting. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-13-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 264e744fec0171f8dfdddd1e9a6d7832495b0473 Author: Johannes Berg Date: Thu May 8 15:13:02 2025 +0300 wifi: iwlwifi: rename struct iwl_base_params These are (going to be) base MAC parameters that are identical even for different platforms with the same MAC, so rename the structure accordingly, calling it iwl_family_base_params. Also rename the pointer to it so the dereferencing is a bit shorter. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-12-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit b9b537c15f74a09e3c5a2aece3ac88441dac147e Author: Johannes Berg Date: Thu May 8 15:13:01 2025 +0300 wifi: iwlwifi: cfg: remove rf_id field This field is always set for >= 9000 series, but then we already check that, so it's not needed. Remove it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-11-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 32e54927fe9b5beb8abcc099f81d102e605c58ff Author: Johannes Berg Date: Thu May 8 15:13:00 2025 +0300 wifi: iwlwifi: cfg: remove dbgc_supported field This field is unused, remove it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-10-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit c96a36491003d7a6fb6dd3c5bcf84cca15387109 Author: Johannes Berg Date: Thu May 8 15:12:59 2025 +0300 wifi: iwlwifi: rename cfg_trans_params to mac_cfg Since 9000 series devices, the devices are split into MAC and CRF parts. Currently, "struct iwl_cfg" reflects some MAC and some RF parameters, but we want to clean this up and move the MAC data to what's now "struct iwl_cfg_trans_params". As the first step, to reflect the intent, rename this structure. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-9-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 8b24b32ee62585e771484791eecf5dce7fc43a82 Author: Johannes Berg Date: Thu May 8 15:12:58 2025 +0300 wifi: iwlwifi: pass trans to iwl_parse_nvm_mcc_info() There's no need to pass various different pointers when the transport is already established, so just pass that instead. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-8-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit a12a287212bad72169334f6c4dd35493c1517c0e Author: Johannes Berg Date: Thu May 8 15:12:57 2025 +0300 wifi: iwlwifi: cfg: remove nvm_hw_section_num from new devices This value hasn't been used since unified firmware in 22000 series, so there's no need to set the value for that or newer devices. Remove it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-7-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 5544b801aa2e9dd60830033f428ceda2d9892733 Author: Johannes Berg Date: Thu May 8 15:12:56 2025 +0300 wifi: iwlwifi: cfg: handle cc firmware dynamically Instead of using fw_name_pre, handle the cc firmware file name specially in iwl_drv_get_fwname_pre() for the cc MAC type. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-6-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit ebc1a98be713491fc20a6c8a98b2f88647f5e191 Author: Johannes Berg Date: Thu May 8 15:12:55 2025 +0300 wifi: iwlwifi: cfg: build ax210 family FW names dynamically Add support for the TY MAC (discrete device) and GF4 RF to the list of MAC/RF types, and use that to remove fw_name_pre for the ax210 family devices. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-5-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit de5d746fd0448a476c6ea05f2e4bba8c3f86567d Author: Johannes Berg Date: Thu May 8 15:12:54 2025 +0300 wifi: iwlwifi: cfg: remove 'cdb' value This is never used, so remove it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-4-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 38dbf4d5eded832f7ada5e3b0b4737decd3c3ea2 Author: Johannes Berg Date: Thu May 8 15:12:53 2025 +0300 wifi: iwlwifi: cfg: remove QuZ/JF special cases Since JF RF always uses b0 step and QuZ MAC always uses a0 step for firmware, there's no need for these configs that just force the steps to those values. Remove them. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-3-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit beba2316b8beb2e0b66a1fde9b5ad58acdeef549 Author: Johannes Berg Date: Thu May 8 15:12:52 2025 +0300 wifi: iwlwifi: build 9000 series FW filenames dynamically This is more maintainable than the fw_name_pre prefix, and requires fewer duplicate structs as well. Since only b0 FW exists, override the MAC/RF steps for these devices. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250508121306.1277801-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 04901be1ec2dc1c13d7be37599f38f5106f8599b Author: Johannes Berg Date: Tue May 6 22:41:02 2025 +0300 wifi: iwlwifi: add JF1/JF2 RF for dynamic FW building This is needed, otherwise we don't know what to do and will not find the correct firmware. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-16-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 6db547d07f83d712494bd42e72068247f33ca6e2 Author: Johannes Berg Date: Tue May 6 22:41:01 2025 +0300 wifi: iwlwifi: pcie: remove 0x2726 devices These are test chips, not available to users, and not even listed in the PCI IDs table (so the driver won't bind them). There's no reason to list specific devices with them in the driver. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-15-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 81ca8c5faec2e828639292915bb10448eff75064 Author: Johannes Berg Date: Tue May 6 22:41:00 2025 +0300 wifi: iwlwifi: cfg: inline HT params With just a handful of values in two bytes, the params are smaller than the pointer to them. Inline them and save some space. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-14-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 51298f09ba37454b7e6e9b361f8fe14168148571 Author: Johannes Berg Date: Tue May 6 22:40:59 2025 +0300 wifi: iwlwifi: cfg: remove 6 GHz from ht40_bands Since there's no HT on 6 GHz, only HE, the HT capabilities are never initialized, and so the ht40_bands value is never checked for the 6 GHz band. Remove the misleading value. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-13-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 83128399f3b4926ab73ce8e5081ce6595e9230e9 Author: Benjamin Berg Date: Tue May 6 22:40:58 2025 +0300 wifi: iwlwifi: mld: call thermal exit without wiphy lock held The driver must not hold the wiphy mutex when unregistering the thermal devices. Do not hold the lock for the call to iwl_mld_thermal_exit and only do a lock/unlock to cancel the ct_kill_exit_wk work. The problem is that iwl_mld_tzone_get_temp needs to take the wiphy lock while the thermal code is holding its own locks already. When unregistering the device, the reverse would happen as the driver was calling thermal_cooling_device_unregister with the wiphy mutex already held. It is not likely to trigger this deadlock as it can only happen if the thermal code is polling the temperature while the driver is being unloaded. However, lockdep reported it so fix it. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-12-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 1437d6c4f2e098ce993f3b69f42b6a04e474cc11 Author: Miri Korenblit Date: Tue May 6 22:40:57 2025 +0300 wifi: iwlwifi: mld: avoid init-after-queue rx_omi::finished_work is initialized when the containing link is. If the worker was queued and then an error happened, we will get to iwl_mld_init_link from the reconfig and initialize the work after it was queued. Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-11-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 2d81aefc59fbc4b948aac976238dc616e0ead9ec Author: Benjamin Berg Date: Tue May 6 22:40:56 2025 +0300 wifi: iwlwifi: mld: use a radio/system specific power budget Different hardware has a different maximum power consumption and the BIOS can also define a power limit for the device. Add code to select an appropriate maximum power budget for the device and configure that instead of using a hardcoded table. This removes the old table. It does not work with the variable upper limit and the there should be no consumer that requires these exact step values. This considerably increases the power budget for some devices and can prevent throttling in high traffic situations. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250506194102.3407967-10-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 61d186045b48b167c3fbb11c1bfb3ad6b3d32957 Author: Benjamin Berg Date: Tue May 6 22:40:55 2025 +0300 wifi: iwlwifi: mvm: use a radio/system specific power budget Different hardware has a different maximum power consumption and the BIOS can also define a power limit for the device. Add code to select an appropriate maximum power budget for the device and configure that instead of using a hardcoded table. This removes the old table. It does not work with the variable upper limit and the there should be no consumer that requires these exact step values. This considerably increases the power budget for some devices and can prevent throttling in high traffic situations. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250506194102.3407967-9-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 09019058f66b8c1980b253e88ad10df96cbc31b1 Author: Benjamin Berg Date: Tue May 6 22:40:54 2025 +0300 wifi: iwlwifi: fix thermal code compilation with -Werror=cast-qual The compare_temps function in both mvm and mld dropped the const qualifier in a cast in a way that makes -Werror=cast-qual unhappy. Add the const to the cast to fix this. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250506194102.3407967-8-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit c63a202895d2cd76ef07843dc4a549690db684f9 Author: Miri Korenblit Date: Tue May 6 22:40:53 2025 +0300 wifi: iwlwifi: pcie: remove iwl_trans_pcie_gen2_send_hcmd This function is not implemented nor called. Remove its declaration. Link: https://patch.msgid.link/20250506194102.3407967-7-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit f5f157e8aeba616772b6a79a5356f9b80cf44344 Author: Yedidya Benshimol Date: Tue May 6 22:40:52 2025 +0300 wifi: iwlwifi: Add support for a new version for link config command Add support for a new version of link configuration command which includes NPCA and high priority TX traffic support for wifi8. Signed-off-by: Yedidya Benshimol Link: https://patch.msgid.link/20250506194102.3407967-6-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit df6146a0296e9ca98e81e39cabe4229ffaf00bbc Author: Yedidya Benshimol Date: Tue May 6 22:40:51 2025 +0300 wifi: iwlwifi: Add a new version for mac config command Add a new version of mac configuration command which includes UHR support indication. Signed-off-by: Yedidya Benshimol Link: https://patch.msgid.link/20250506194102.3407967-5-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit a1346ceab52a4d7240966bd8c0351587a6826491 Author: Yedidya Benshimol Date: Tue May 6 22:40:50 2025 +0300 wifi: iwlwifi: Add a new version for sta config command Add a new version of sta configuration command which includes these wifi8 features: 1. LDPC X2 CW size support indication 2. Indication if ICF frame is needed instead of RTS 3. support for MIC padding delays for protected control frames Signed-off-by: Yedidya Benshimol Link: https://patch.msgid.link/20250506194102.3407967-4-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit e12bc6f41961e4cfe8a478bcc17d4dbed223fd95 Author: Avraham Stern Date: Tue May 6 22:40:49 2025 +0300 wifi: iwlwifi: add range response version 10 support Range response version 10 removes the rx and tx rates fields. These fields aren't used by the driver anyway, so no change is needed to support it. Signed-off-by: Avraham Stern Link: https://patch.msgid.link/20250506194102.3407967-3-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 2d4f8279013527374626fca88c0256b9a316aed0 Author: Miri Korenblit Date: Tue May 6 22:40:48 2025 +0300 wifi: iwlwifi: mld: remove one more error in unallocated BAID Since the FW is the one to assign an ID to a BA, it can happen that the FW sends a bar_frame_release_notif before the driver had the chance to allocate the BAID. Convert the IWL_FW_CHECK into a regular debug print. Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250506194102.3407967-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit commit 877afe1ee34df54ea62ca9746aafbb1cac946bf5 Author: Alexander Stein Date: Fri May 9 11:36:52 2025 +0200 soc: ti: wkup_m3_ipc: Use dev_err_probe During probe the mailbox channel might not yet be available. Use dev_err_probe to silence this deferred probe error message: wkup_m3_ipc 44e11324.wkup_m3_ipc: IPC Request for A8->M3 Channel failed! -517 Signed-off-by: Alexander Stein Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20250509093652.1866566-1-alexander.stein@ew.tq-group.com Signed-off-by: Nishanth Menon commit 6a9d340b1f9910f0f88e0819c464938b91610765 Author: Vaishnav Achath Date: Fri May 9 14:49:11 2025 +0530 arm64: dts: ti: k3-j722s-evm: Add overlay for TEVI OV5640 TechNexion TEVI OV5640 camera is a 5MP camera that can be used with J722S EVM through the 22-pin CSI-RX connector. Add a reference overlay for quad TEVI OV5640 modules on J722S EVM. Signed-off-by: Vaishnav Achath Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250509091911.2442934-5-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 646bcbcbdfad22818d32c8771583844aab4e05dd Author: Vaishnav Achath Date: Fri May 9 14:49:10 2025 +0530 arm64: dts: ti: k3-j722s-evm: Add overlay for quad IMX219 RPi v2 Camera (IMX219) is an 8MP camera that can be used with J722S EVM through the 22-pin CSI-RX connector. Add a reference overlay for quad IMX219 RPI camera v2 modules on J722S EVM Signed-off-by: Vaishnav Achath Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250509091911.2442934-4-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 2e8861103a08e4220e99b673ab247aff108ddef5 Author: Yemike Abhilash Chandra Date: Fri May 9 14:49:09 2025 +0530 arm64: dts: ti: j722s-evm: Add MUX to control CSI2RX J722S EVM has the CSI2RX routed to a MIPI CSI connector and to 22-pin RPi camera connector through an analog mux with GPIO control, model mux so that an overlay can control the mux state according to connected cameras. Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250509091911.2442934-3-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 9bb89ec393e368cf26a65c04cfd4a14851368df0 Author: Yemike Abhilash Chandra Date: Fri May 9 14:49:08 2025 +0530 arm64: dts: ti: j722s-evm: Add DT nodes for power regulators Add device tree nodes for two regulators on the J722S-EVM. VSYS_3V3 is the output of LM5141-Q1, and it serves as an input to TPS22990 which produces VSYS_3V3_EXP [1]. VSYS_3V3_EXP serves as vin-supply to CSI RPI Connectors. Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Udit Kumar [1]: https://www.ti.com/lit/zip/sprr495 Link: https://lore.kernel.org/r/20250509091911.2442934-2-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit f71fb19f36044290669dccfc31d1de6ef3d0eed6 Author: Daniel Schultz Date: Wed May 7 00:00:08 2025 -0700 arm64: dts: ti: k3-am62a-phycore-som: Reserve main_timer2 for C7x DSP C7x DSP uses main_timer2, so mark it as reserved in linux DT. Signed-off-by: Daniel Schultz Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20250507070008.1231611-5-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit 5d0727b0537f3e5c3c457ead700a5cdb1ee7eaf7 Author: Daniel Schultz Date: Wed May 7 00:00:07 2025 -0700 arm64: dts: ti: k3-am62a-phycore-som: Reserve main_rti4 for C7x DSP The main rti4 watchdog timer is used by the C7x DSP, so reserve the timer in the linux device tree. Signed-off-by: Daniel Schultz Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20250507070008.1231611-4-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit 8dd0ac27fcd1ea64612d1f2392c69bc2648aef2e Author: Daniel Schultz Date: Wed May 7 00:00:06 2025 -0700 arm64: dts: ti: k3-am62a-phycore-som: Enable Co-processors For every remote processor, set up dedicated memory regions and associate the required mailbox channels. Allocate two memory areas per remote core: one 1MB region for vring shared buffers, and another for external memory used by the remote processor for its resource table and trace buffer. Signed-off-by: Daniel Schultz Reviewed-by: Andrew Davis Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20250507070008.1231611-3-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit c0fa0aaa69ac3a8d242fc12cdad8cfc4b8fcdba6 Author: Daniel Schultz Date: Wed May 7 00:00:05 2025 -0700 arm64: dts: ti: k3-am62-phycore-som: Enable Co-processors For every remote processor, set up dedicated memory regions and associate the required mailbox channels. Allocate two memory areas per remote core: one 1MB region for vring shared buffers, and another for external memory used by the remote processor for its resource table and trace buffer. Signed-off-by: Daniel Schultz Reviewed-by: Wadim Egorov Reviewed-by: Andrew Davis Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20250507070008.1231611-2-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit 625e540cee2cfa0e514e0c8fb929fe2893e6d3bf Author: Daniel Schultz Date: Tue May 6 04:41:34 2025 -0700 arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Rename 'main0_thermal_trip0' to a more descriptive name that includes 'fan', as the current name is too generic for a fan control trip point. Move the fan to a new cooling map to avoid overwriting the passive trip point used for CPU frequency throttling when this overlay is enabled. Also, add the fan to the existing cooling map. Signed-off-by: Daniel Schultz Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20250506114134.3514899-2-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit 8785b579d431b2a76a64f105328434d3c543debf Author: Daniel Schultz Date: Tue May 6 04:41:33 2025 -0700 arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Enable throttling down the CPU frequency when an alert temperature threshold (lower than the critical threshold) is reached. Signed-off-by: Daniel Schultz Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250506114134.3514899-1-d.schultz@phytec.de Signed-off-by: Nishanth Menon commit 6b8deb2ff0d31848c43a73f6044e69ba9276b3ec Author: Prasanth Babu Mantena Date: Wed May 7 10:37:01 2025 +0530 arm64: dts: ti: k3-j721e-common-proc-board: Enable OSPI1 on J721E J721E SoM has MT25QU512AB Serial NOR flash connected to OSPI1 controller. Enable ospi1 node in device tree. Fixes: 73676c480b72 ("arm64: dts: ti: k3-j721e: Enable OSPI nodes at the board level") Signed-off-by: Prasanth Babu Mantena Link: https://lore.kernel.org/r/20250507050701.3007209-1-p-mantena@ti.com Signed-off-by: Nishanth Menon commit 097469a2b0f12b91b4f27b9e9e4f2c46484cde30 Author: Anand Moon Date: Mon Apr 7 12:02:03 2025 +0530 perf/amlogic: Replace smp_processor_id() with raw_smp_processor_id() in meson_ddr_pmu_create() The Amlogic DDR PMU driver meson_ddr_pmu_create() function incorrectly uses smp_processor_id(), which assumes disabled preemption. This leads to kernel warnings during module loading because meson_ddr_pmu_create() can be called in a preemptible context. Following kernel warning and stack trace: [ 31.745138] [ T2289] BUG: using smp_processor_id() in preemptible [00000000] code: (udev-worker)/2289 [ 31.745154] [ T2289] caller is debug_smp_processor_id+0x28/0x38 [ 31.745172] [ T2289] CPU: 4 UID: 0 PID: 2289 Comm: (udev-worker) Tainted: GW 6.14.0-0-MANJARO-ARM #1 59519addcbca6ba8de735e151fd7b9e97aac7ff0 [ 31.745181] [ T2289] Tainted: [W]=WARN [ 31.745183] [ T2289] Hardware name: Hardkernel ODROID-N2Plus (DT) [ 31.745188] [ T2289] Call trace: [ 31.745191] [ T2289] show_stack+0x28/0x40 (C) [ 31.745199] [ T2289] dump_stack_lvl+0x4c/0x198 [ 31.745205] [ T2289] dump_stack+0x20/0x50 [ 31.745209] [ T2289] check_preemption_disabled+0xec/0xf0 [ 31.745213] [ T2289] debug_smp_processor_id+0x28/0x38 [ 31.745216] [ T2289] meson_ddr_pmu_create+0x200/0x560 [meson_ddr_pmu_g12 8095101c49676ad138d9961e3eddaee10acca7bd] [ 31.745237] [ T2289] g12_ddr_pmu_probe+0x20/0x38 [meson_ddr_pmu_g12 8095101c49676ad138d9961e3eddaee10acca7bd] [ 31.745246] [ T2289] platform_probe+0x98/0xe0 [ 31.745254] [ T2289] really_probe+0x144/0x3f8 [ 31.745258] [ T2289] __driver_probe_device+0xb8/0x180 [ 31.745261] [ T2289] driver_probe_device+0x54/0x268 [ 31.745264] [ T2289] __driver_attach+0x11c/0x288 [ 31.745267] [ T2289] bus_for_each_dev+0xfc/0x160 [ 31.745274] [ T2289] driver_attach+0x34/0x50 [ 31.745277] [ T2289] bus_add_driver+0x160/0x2b0 [ 31.745281] [ T2289] driver_register+0x78/0x120 [ 31.745285] [ T2289] __platform_driver_register+0x30/0x48 [ 31.745288] [ T2289] init_module+0x30/0xfe0 [meson_ddr_pmu_g12 8095101c49676ad138d9961e3eddaee10acca7bd] [ 31.745298] [ T2289] do_one_initcall+0x11c/0x438 [ 31.745303] [ T2289] do_init_module+0x68/0x228 [ 31.745311] [ T2289] load_module+0x118c/0x13a8 [ 31.745315] [ T2289] __arm64_sys_finit_module+0x274/0x390 [ 31.745320] [ T2289] invoke_syscall+0x74/0x108 [ 31.745326] [ T2289] el0_svc_common+0x90/0xf8 [ 31.745330] [ T2289] do_el0_svc+0x2c/0x48 [ 31.745333] [ T2289] el0_svc+0x60/0x150 [ 31.745337] [ T2289] el0t_64_sync_handler+0x80/0x118 [ 31.745341] [ T2289] el0t_64_sync+0x1b8/0x1c0 Changes replaces smp_processor_id() with raw_smp_processor_id() to ensure safe CPU ID retrieval in preemptible contexts. Cc: Jiucheng Xu Fixes: 2016e2113d35 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver") Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20250407063206.5211-1-linux.amoon@gmail.com Signed-off-by: Will Deacon commit 11b0f576e0cbde6a12258f2af6753b17b8df342b Author: Robin Murphy Date: Thu May 8 16:16:40 2025 +0100 perf/arm-cmn: Fix REQ2/SNP2 mixup Somehow the encodings for REQ2/SNP2 channels in XP events got mixed up... Unmix them. CC: stable@vger.kernel.org Fixes: 23760a014417 ("perf/arm-cmn: Add CMN-700 support") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/087023e9737ac93d7ec7a841da904758c254cb01.1746717400.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit e68ecc161fece5259aacacbe3ff597cc5b80a3e9 Merge: bb01e8cc10f0c5 79fb8d8d93e41b Author: Christian Brauner Date: Fri May 9 13:14:02 2025 +0200 Merge patch series "Minor namespace code simplication" Joel Savitz says: The two patches are independent of each other. The first patch removes unnecssary NULL guards from free_nsproxy() and create_new_namespaces() in line with other usage of the put_*_ns() call sites. The second patch slightly reduces the size of the kernel when CONFIG_CGROUPS is not selected. * patches from https://lore.kernel.org/20250508184930.183040-1-jsavitz@redhat.com: include/cgroup: separate {get,put}_cgroup_ns no-op case kernel/nsproxy: remove unnecessary guards Link: https://lore.kernel.org/20250508184930.183040-1-jsavitz@redhat.com Signed-off-by: Christian Brauner commit 79fb8d8d93e41be4ebda8c9cc507e20297277231 Author: Joel Savitz Date: Thu May 8 14:49:30 2025 -0400 include/cgroup: separate {get,put}_cgroup_ns no-op case When CONFIG_CGROUPS is not selected, {get,put}_cgroup_ns become no-ops and therefore it is not necessary to compile in the code for changing the reference count. When CONFIG_CGROUP is selected, there is no valid case where either of {get,put}_cgroup_ns() will be called with a NULL argument. Signed-off-by: Joel Savitz Link: https://lore.kernel.org/20250508184930.183040-3-jsavitz@redhat.com Signed-off-by: Christian Brauner commit 5caa2d89b7f1c1249ca7cc47e10930d2cdabd8a5 Author: Joel Savitz Date: Thu May 8 14:49:29 2025 -0400 kernel/nsproxy: remove unnecessary guards In free_nsproxy() and the error path of create_new_namesapces() the put_*_ns() calls are guarded by unnecessary NULL checks. put_pid_ns(), put_ipc_ns(), put_uts_ns(), and put_time_ns() will never receive a NULL argument unless their namespace type is disabled, and in this case all four become no-ops at compile time anyway. put_mnt_ns() will never receive a null argument at any time. This unguarded usage is in line with other call sites of put_*_ns(). Signed-off-by: Joel Savitz Link: https://lore.kernel.org/20250508184930.183040-2-jsavitz@redhat.com Signed-off-by: Christian Brauner commit 1afe9e7da8c0ab3c17d4a469ed4c0607024cf0d4 Author: Christian Brauner Date: Sun Apr 6 22:28:52 2025 +0200 f2fs: fix freezing filesystem during resize Using FREEZE_HOLDER_USERSPACE has two consequences: (1) If userspace freezes the filesystem after mnt_drop_write_file() but before freeze_super() was called filesystem resizing will fail because the freeze isn't marked as nestable. (2) If the kernel has successfully frozen the filesystem via FREEZE_HOLDER_USERSPACE userspace can simply undo it by using the FITHAW ioctl. Fix both issues by using FREEZE_HOLDER_KERNEL. It will nest with FREEZE_HOLDER_USERSPACE and cannot be undone by userspace. And it is the correct thing to do because the kernel temporarily freezes the filesystem. Signed-off-by: Christian Brauner commit 05b158d4fd111492e2fa675ad65bc4b0622c0556 Merge: 0de4c4065cad19 ef2ed04eba999b Author: Christian Brauner Date: Thu Apr 3 09:24:20 2025 +0200 Merge patch series "power: wire-up filesystem freeze/thaw with suspend/resume" Christian Brauner says: Now all the pieces are in place to actually allow the power subsystem to freeze/thaw filesystems during suspend/resume. Filesystems are only frozen and thawed if the power subsystem does actually own the freeze. Othwerwise it risks thawing filesystems it didn't own. This could be done differently be e.g., keeping the filesystems that were actually frozen on a list and then unfreezing them from that list. This is disgustingly unclean though and reeks of an ugly hack. If the filesystem is already frozen by the time we've frozen all userspace processes we don't care to freeze it again. That's userspace's job once the process resumes. We only actually freeze filesystems if we absolutely have to and we ignore other failures to freeze. We could bubble up errors and fail suspend/resume if the error isn't EBUSY (aka it's already frozen) but I don't think that this is worth it. Filesystem freezing during suspend/resume is best-effort. If the user has 500 ext4 filesystems mounted and 4 fail to freeze for whatever reason then we simply skip them. What we have now is already a big improvement and let's see how we fare with it before making our lives even harder (and uglier) than we have to. * patches from https://lore.kernel.org/r/20250402-work-freeze-v2-0-6719a97b52ac@kernel.org: kernfs: add warning about implementing freeze/thaw power: freeze filesystems during suspend/resume Link: https://lore.kernel.org/r/20250402-work-freeze-v2-0-6719a97b52ac@kernel.org Signed-off-by: Christian Brauner commit 0de4c4065cad198fe44405d0eac7bc043f5ee2f1 Merge: 6e5af8e3ca5f39 0e4f9483959b78 Author: Christian Brauner Date: Mon Mar 31 14:47:40 2025 +0200 Merge patch series "efivarfs: support freeze/thaw" Christian Brauner says: Allow efivarfs to partake to resync variable state during system hibernation and suspend. Add freeze/thaw support. This is a pretty straightforward implementation. We simply add regular freeze/thaw support for both userspace and the kernel. This works without any big issues and congrats afaict efivars is the first pseudofilesystem that adds support for filesystem freezing and thawing. The simplicity comes from the fact that we simply always resync variable state after efivarfs has been frozen. It doesn't matter whether that's because of suspend, userspace initiated freeze or hibernation. Efivars is simple enough that it doesn't matter that we walk all dentries. There are no directories and there aren't insane amounts of entries and both freeze/thaw are already heavy-handed operations. If userspace initiated a freeze/thaw cycle they would need CAP_SYS_ADMIN in the initial user namespace (as that's where efivarfs is mounted) so it can't be triggered by random userspace. IOW, we really really don't care. * patches from https://lore.kernel.org/r/20250331-work-freeze-v1-0-6dfbe8253b9f@kernel.org: efivarfs: support freeze/thaw libfs: export find_next_child() Link: https://lore.kernel.org/r/20250331-work-freeze-v1-0-6dfbe8253b9f@kernel.org Signed-off-by: Christian Brauner commit ef2ed04eba999b13096ace4fafc2e7ed04176950 Author: Christian Brauner Date: Wed Apr 2 16:07:34 2025 +0200 kernfs: add warning about implementing freeze/thaw Sysfs is built on top of kernfs and sysfs provides the power management infrastructure to support suspend/hibernate by writing to various files in /sys/power/. As filesystems may be automatically frozen during suspend/hibernate implementing freeze/thaw support for kernfs generically will cause deadlocks as the suspending/hibernation initiating task will hold a VFS lock that it will then wait upon to be released. If freeze/thaw for kernfs is needed talk to the VFS. Link: https://lore.kernel.org/r/20250402-work-freeze-v2-4-6719a97b52ac@kernel.org Signed-off-by: Christian Brauner commit 0e4f9483959b785f65a36120bb0e4cf1407e492c Author: Christian Brauner Date: Mon Mar 31 14:42:12 2025 +0200 efivarfs: support freeze/thaw Allow efivarfs to partake to resync variable state during system hibernation and suspend. Add freeze/thaw support. This is a pretty straightforward implementation. We simply add regular freeze/thaw support for both userspace and the kernel. This works without any big issues and congrats afaict efivars is the first pseudofilesystem that adds support for filesystem freezing and thawing. The simplicity comes from the fact that we simply always resync variable state after efivarfs has been frozen. It doesn't matter whether that's because of suspend, userspace initiated freeze or hibernation. Efivars is simple enough that it doesn't matter that we walk all dentries. There are no directories and there aren't insane amounts of entries and both freeze/thaw are already heavy-handed operations. We really really don't need to care. Link: https://lore.kernel.org/r/20250331-work-freeze-v1-2-6dfbe8253b9f@kernel.org Signed-off-by: Christian Brauner commit eacfbf74196f91e4c26d9f8c78e1576c1225cd8c Author: Christian Brauner Date: Wed Apr 2 16:07:33 2025 +0200 power: freeze filesystems during suspend/resume Now all the pieces are in place to actually allow the power subsystem to freeze/thaw filesystems during suspend/resume. Filesystems are only frozen and thawed if the power subsystem does actually own the freeze. We could bubble up errors and fail suspend/resume if the error isn't EBUSY (aka it's already frozen) but I don't think that this is worth it. Filesystem freezing during suspend/resume is best-effort. If the user has 500 ext4 filesystems mounted and 4 fail to freeze for whatever reason then we simply skip them. What we have now is already a big improvement and let's see how we fare with it before making our lives even harder (and uglier) than we have to. We add a new sysctl know /sys/power/freeze_filesystems that will allow userspace to freeze filesystems during suspend/hibernate. For now it defaults to off. The thaw logic doesn't require checking whether freezing is enabled because the power subsystem exclusively owns frozen filesystems for the duration of suspend/hibernate and is able to skip filesystems it doesn't need to freeze. Also it is technically possible that filesystem filesystem_freeze_enabled is true and power freezes the filesystems but before freezing all processes another process disables filesystem_freeze_enabled. If power were to place the filesystems_thaw() call under filesystems_freeze_enabled it would fail to thaw the fileystems it frozw. The exclusive holder mechanism makes it possible to iterate through the list without any concern making sure that no filesystems are left frozen. Link: https://lore.kernel.org/r/20250402-work-freeze-v2-3-6719a97b52ac@kernel.org Signed-off-by: Christian Brauner commit 33445d6fc5206ef7fad185704bf241a9e9c3b2b9 Author: Christian Brauner Date: Mon Mar 31 14:42:11 2025 +0200 libfs: export find_next_child() Export find_next_child() so it can be used by efivarfs. Keep it internal for now. There's no reason to advertise this kernel-wide. Link: https://lore.kernel.org/r/20250331-work-freeze-v1-1-6dfbe8253b9f@kernel.org Signed-off-by: Christian Brauner commit 6e5af8e3ca5f397c8c90c12613863a664e38b158 Merge: 0af2f6be1b4281 1af3331764b935 Author: Christian Brauner Date: Sat Mar 29 09:44:56 2025 +0100 Merge patch series "Extend freeze support to suspend and hibernate" Christian Brauner says: Add the necessary infrastructure changes to support freezing for suspend and hibernate. This should all that's needed to wire up power. * patches from https://lore.kernel.org/r/20250329-work-freeze-v2-0-a47af37ecc3d@kernel.org: super: add filesystem freezing helpers for suspend and hibernate gfs2: pass through holder from the VFS for freeze/thaw super: use common iterator (Part 2) super: use a common iterator (Part 1) super: skip dying superblocks early super: simplify user_get_super() super: remove pointless s_root checks Link: https://lore.kernel.org/r/20250329-work-freeze-v2-0-a47af37ecc3d@kernel.org Signed-off-by: Christian Brauner commit 1af3331764b9356fadc4652af77bbbc97f3d7f78 Author: Christian Brauner Date: Sat Mar 29 09:42:19 2025 +0100 super: add filesystem freezing helpers for suspend and hibernate Allow the power subsystem to support filesystem freeze for suspend and hibernate. For some kernel subsystems it is paramount that they are guaranteed that they are the owner of the freeze to avoid any risk of deadlocks. This is the case for the power subsystem. Enable it to recognize whether it did actually freeze the filesystem. If userspace has 10 filesystems and suspend/hibernate manges to freeze 5 and then fails on the 6th for whatever odd reason (current or future) then power needs to undo the freeze of the first 5 filesystems. It can't just walk the list again because while it's unlikely that a new filesystem got added in the meantime it still cannot tell which filesystems the power subsystem actually managed to get a freeze reference count on that needs to be dropped during thaw. There's various ways out of this ugliness. For example, record the filesystems the power subsystem managed to freeze on a temporary list in the callbacks and then walk that list backwards during thaw to undo the freezing or make sure that the power subsystem just actually exclusively freezes things it can freeze and marking such filesystems as being owned by power for the duration of the suspend or resume cycle. I opted for the latter as that seemed the clean thing to do even if it means more code changes. If hibernation races with filesystem freezing (e.g. DM reconfiguration), then hibernation need not freeze a filesystem because it's already frozen but userspace may thaw the filesystem before hibernation actually happens. If the race happens the other way around, DM reconfiguration may unexpectedly fail with EBUSY. So allow FREEZE_EXCL to nest with other holders. An exclusive freezer cannot be undone by any of the other concurrent freezers. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-6-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit bb01e8cc10f0c5b1151a5f047289fcfa5519e351 Author: Christoph Hellwig Date: Wed May 7 08:21:24 2025 +0200 fs: use writeback_iter directly in mpage_writepages Stop using write_cache_pages and use writeback_iter directly. This removes an indirect call per written folio and makes the code easier to follow. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/20250507062124.3933305-1-hch@lst.de Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Christian Brauner commit 2cb0e96cb01b4d165d0cee4d26996bb2b02a5109 Merge: 406331afe89923 66c0d855142835 Author: Christian Brauner Date: Fri May 9 12:35:35 2025 +0200 Merge patch series "iomap: misc buffered write path cleanups and prep" Brian Foster says: Here's a bit more fallout and prep. work associated with the folio batch prototype posted a while back [1]. Work on that is still pending so it isn't included here, but based on the iter advance cleanups most of these seemed worthwhile as standalone cleanups. Mainly this just cleans up some of the helpers and pushes some pos/len trimming further down in the write begin path. The fbatch thing is still in prototype stage, but for context the intent here is that it can mostly now just bolt onto the folio lookup path because we can advance the range that is skipped and return the next folio along with the folio subrange for the caller to process. [1] https://lore.kernel.org/linux-fsdevel/20241213150528.1003662-1-bfoster@redhat.com/ * patches from https://lore.kernel.org/20250506134118.911396-1-bfoster@redhat.com: iomap: rework iomap_write_begin() to return folio offset and length iomap: push non-large folio check into get folio path iomap: helper to trim pos/bytes to within folio iomap: drop pos param from __iomap_[get|put]_folio() iomap: drop unnecessary pos param from iomap_write_[begin|end] iomap: resample iter->pos after iomap_write_begin() calls Link: https://lore.kernel.org/20250506134118.911396-1-bfoster@redhat.com Signed-off-by: Christian Brauner commit 66c0d855142835a9fd12478299cc337777d6225e Author: Brian Foster Date: Tue May 6 09:41:18 2025 -0400 iomap: rework iomap_write_begin() to return folio offset and length iomap_write_begin() returns a folio based on current pos and remaining length in the iter, and each caller then trims the pos/length to the given folio. Clean this up a bit and let iomap_write_begin() return the trimmed range along with the folio. Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-7-bfoster@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit c0f8658a9dbc563876364a0fcfec823d73d6fae2 Author: Brian Foster Date: Tue May 6 09:41:17 2025 -0400 iomap: push non-large folio check into get folio path The len param to __iomap_get_folio() is primarily a folio allocation hint. iomap_write_begin() already trims its local len variable based on the provided folio, so move the large folio support check closer to folio lookup. Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-6-bfoster@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit c4f9a1ba747dbf3b090948b528e0b408d4117137 Author: Brian Foster Date: Tue May 6 09:41:16 2025 -0400 iomap: helper to trim pos/bytes to within folio Several buffered write based iteration callbacks duplicate logic to trim the current pos and length to within the current folio. Factor this into a helper to make it easier to relocate closer to folio lookup. Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-5-bfoster@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 3ceb65b17676fd10e9347b665e1c1c8cfafdcd10 Author: Brian Foster Date: Tue May 6 09:41:15 2025 -0400 iomap: drop pos param from __iomap_[get|put]_folio() Both helpers take the iter and pos as parameters. All callers effectively pass iter->pos, so drop the unnecessary pos parameter. Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-4-bfoster@redhat.com Reviewed-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 99fe6e61fd3c74aad38ca5eb38c2c6c7d8dd7e28 Author: Brian Foster Date: Tue May 6 09:41:14 2025 -0400 iomap: drop unnecessary pos param from iomap_write_[begin|end] iomap_write_begin() and iomap_write_end() both take the iter and iter->pos as parameters. Drop the unnecessary pos parameter and sample iter->pos within each function. Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-3-bfoster@redhat.com Reviewed-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit e356c5d5b10e293465c166f8b15959f468f19b24 Author: Brian Foster Date: Tue May 6 09:41:13 2025 -0400 iomap: resample iter->pos after iomap_write_begin() calls In preparation for removing the pos parameter, push the local pos assignment down after calls to iomap_write_begin(). Signed-off-by: Brian Foster Link: https://lore.kernel.org/20250506134118.911396-2-bfoster@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit fd0bf2bb32215976c269d6e68c1a12b5815e6c20 Author: Peng Fan Date: Wed Apr 23 22:37:06 2025 +0800 soc: imx8m: Dump higher 64bits UID i.MX8MP UID is actually 128bits and partitioned into two parts. The 1st 64bits are at 0x410 and 0x420, and 2nd 64bits are at 0xE00 and 0xE10. Dump the whole 128bits for i.MX8MP, by set soc_uid as an array with two u64. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 698105013949ec3f47286bd67f71c65597e02393 Author: Peng Fan Date: Wed Apr 23 22:37:05 2025 +0800 soc: imx8m: Introduce soc_uid hook Cleanup code by introducing soc_uid hook, i.MX8MQ/M/N could reuse one function imx8m_soc_uid, i.MX8MP could have its own one. With this patch, it will easy to add 128bits UID support for i.MX8MP. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 390c01073f5d0bd64db37926ddb232f33b83620d Author: Peng Fan Date: Wed Apr 23 22:37:04 2025 +0800 soc: imx8m: Cleanup with adding imx8m_soc_[un]prepare There is a common flow to i.MX8M family, map OCOTP register base and enable ocotp clk first before read Unique ID from OCOTP. So introduce imx8m_soc_prepare to do ioremap and enable the ocotp clk, and introduce imx8m_soc_unprepare to disable the clk and do iounmap. With this patch, no need to spread the ioremap and clk handling in each soc_revision hook. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit a504243058747fd02c58b17191546e346a64a604 Author: Max Krummenacher Date: Tue Apr 22 13:50:49 2025 +0200 arm64: dts: imx8-colibri: Add PCIe support The needed drivers to support PCIe for i.MX 8QXP have been added. Configure PCIe for the Colibri iMX8X SoM. The pcieb block is connected to the on module Wi-Fi/BT module. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo commit 265bf4ccd703435444c83da74d748a0268be2022 Author: Primoz Fiser Date: Tue Apr 22 12:56:44 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Order node alphabetically Move pinctrl_uart1 to keep nodes in alphabetical order. No functional changes. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 7c4424dd11e4d4ed82f3ede5bac312e0fbc506ae Author: Primoz Fiser Date: Tue Apr 22 12:56:43 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Add EQOS Ethernet Add support for the carrier-board Micrel KSZ8081 Ethernet PHY. This is a 10/100Mbit PHY connected to the EQOS interface and shares MDIO bus with the Ethernet PHY located on the SoM (FEC interface). Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit c3f6c388d30e5cb62eae2203363f50d9e2a7eabd Author: Primoz Fiser Date: Tue Apr 22 12:56:42 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Add I2S audio Add support for I2S audio found on phyBOARD-Segin-i.MX93. Audio codec TLV320AIC3007 is connected to SAI1 interface as a DAI master. MCLK is provided from the SAI's internal audio PLL (19.2 MHz). Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit b7fed5065b65306f4d747f77ea1366c60c4194d6 Author: Primoz Fiser Date: Tue Apr 22 12:56:41 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Add USB support Add support for both USB controllers. Set first controller in OTG mode (USB micro-AB connector X8) and the second one in host mode (USB type A connector X7) by default. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 0a8275f31f34cde151a03c3d6c812696303443f7 Author: Primoz Fiser Date: Tue Apr 22 12:56:40 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Add CAN support Add support for CAN networking on phyBOARD-Segin-i.MX93 via the flexcan1 interface. The CAN PHY chip SN65HVD234D used on the board is compatible with the TCAN1043 driver using the generic "can-transceiver-phy" and is capable of up to 1Mbps data rate. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 1a69251c26c851fe8be83c6a63100439a8dfc9ce Author: Primoz Fiser Date: Tue Apr 22 12:56:39 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Add RTC support Add support for RTC connected via I2C on phyBOARD-Segin-i.MX93. Set default RTC by configuring the aliases. Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo commit d84fc1fc8e5e53afd95823bbc8450bb50ebec4a4 Author: Primoz Fiser Date: Tue Apr 22 12:56:38 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Set CMD/DATA SION bit to fix ERR052021 Implement fix for i.MX 93 silicon errata ERR052021. ERR052021 uSDHC: Sometimes uSDHC does not work under VDD_SOC low drive mode and nominal mode Description: uSDHC PADs have one integration issue. When CMD/DATA lines direction change from output to input, uSDHC controller begin sampling, the integration issue will make input enable signal from uSDHC propagated to the PAD with a long delay, thus the new input value on the pad comes to uSDHC lately. The uSDHC sampled the old input value and the sampling result is wrong. Workaround: Set uSDHC CMD/DATA PADs iomux register SION bit to 1, then PADs will propagate input to uSDHC with no delay, so correct value is sampled. This issue will wrongly trigger the start bit when sample the USDHC command response, cause the USDHC trigger command CRC/index/endbit error, which will finally impact the tuning pass window, especially will impact the standard tuning logic, and can't find a correct delay cell to get the best timing. Based on commit bb89601282fc ("arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC"). Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo commit ff44686256ffb16a3bdb0c7600556d26ea7e0328 Author: Primoz Fiser Date: Tue Apr 22 12:56:37 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Fix SD-card pinctrl Until now, all usdhc2 (SD-card) pinctrl labels pointed to one pinctrl group "usdhc2grp" which was overwritten twice by the 100 and 200 MHz modes. Fix this by using unique pinctrl names. Additionally, adjust MX93_PAD_SD2_CLK__USDHC2_CLK pad drive-strength according to values obtained by measurements from the PHYTEC hardware department to improve signal integrity. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 99cf1026b7af5fa347aafd273f44494f52b0877c Author: Primoz Fiser Date: Tue Apr 22 12:56:36 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Disable SD-card write-protect Add disable-wp flag (write-protect) to usdhc2 node (SD-card) to get rid of the following kernel boot warning: host does not support reading read-only switch, assuming write-enable Micro SD cards can't be physically write-protected like full-sized cards anyways. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit bdd3071e10926847f4985056a0d80be88fc7cfd4 Author: Primoz Fiser Date: Tue Apr 22 12:56:35 2025 +0200 arm64: dts: freescale: imx93-phyboard-segin: Drop eMMC no-1-8-v flag Drop redundant 'no-1-8-v' flag from usdhc1 (eMMC) node. Flag is now set by default in the SOM include file (imx93-phycore-som.dtsi). Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 9ed135ca48391848766f61a37580737dcd86524f Author: Primoz Fiser Date: Tue Apr 22 12:56:34 2025 +0200 arm64: dts: freescale: imx93-phycore-som: Add eMMC no-1-8-v by default The phyCORE-i.MX93 SoM comes in two variants, one with VDD_IO set to 3.3V and the other variant to 1.8V. The 3.3V variant can only support DDR52 mode, while 1.8V variant is capable of HS400ES eMMC mode. The information about VDD_IO option is encoded in the SoM's EEPROM. EEPROM is read in the bootloader and bootloader clears the "no-1-8-v" flag in case of 1.8V SoM variant is detected. Thus add property 'no-1-8-v' by default to usdhc1 (eMMC) node and let bootloader handle the flag. In case EEPROM is erased or read-out fails, flag "no-1-8-v" also ensures fall-back compatibility with both SoM variants. Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo commit 54be09bdb1e7b6291eb9b99c5b60fc5026576bd1 Author: Primoz Fiser Date: Tue Apr 22 12:56:33 2025 +0200 arm64: dts: freescale: imx93-phycore-som: Enhance eMMC pinctrl Improve eMMC on phyCORE-i.MX93 SOM by adding 100MHz and 200MHz pinctrl modes. This enables to use eMMC at enhanced data rates (e.g. HS400). While at it, apply a workaround for the i.MX93 chip errata ERR052021. Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo commit d6241ba41f2c676b3f5a01497d99e5acb6ca2aef Author: Primoz Fiser Date: Tue Apr 22 12:56:32 2025 +0200 arm64: dts: freescale: imx93-phycore-som: Disable LED pull-up There is already an external pull-down resistor on the LED output line. It makes no sense to have both pull-down and pull-up resistors enabled at the same time. Thus disable the internal pull-up. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 31ff2efe6484000f103d5df0f32a4cb3a1dee06d Author: Primoz Fiser Date: Tue Apr 22 12:56:31 2025 +0200 arm64: dts: freescale: imx93-phycore-som: Add EEPROM support Add support for the EEPROM chip available on I2C3 bus (address 0x50), used for the PHYTEC SOM detection. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 98363ac3664001ed3990478ba09e87bd1820a892 Author: Primoz Fiser Date: Tue Apr 22 12:56:30 2025 +0200 arm64: dts: freescale: imx93-phycore-som: Add PMIC support PMIC driver for PCA9451A used on phyCORE-i.MX93 SOM is available since commit 5edeb7d31262 ("regulator: pca9450: add pca9451a support"). Add support for it in the SOM device-tree. Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit f8953ee959546ae8faaa20f405647e5aecc42614 Author: Keke Li Date: Sun Apr 27 14:27:18 2025 +0800 Documentation: media: Add documentation file c3-isp.rst Add the file 'c3-isp.rst' that documents the c3-isp driver. Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit f0d3a857ae4e0ea67b99bab3cf00c5c46eb7cefb Author: Keke Li Date: Sun Apr 27 14:27:17 2025 +0800 Documentation: media: Add documentation file metafmt-c3-isp.rst Add the file 'metafmt-c3-isp.rst' that documents the meta format of c3-isp. Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit fb2e135208f364f26b7579c191434d38655e813f Author: Keke Li Date: Sun Apr 27 14:27:16 2025 +0800 media: platform: Add C3 ISP driver The C3 ISP supports multi-camera and multi-exposure HDR, integrates advanced imaging technologies for optimal quality, and drives the core pipeline to transform raw sensor data into high-fidelity images through demosaicing, color correction, and tone mapping operations. Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil [hverkuil: drop unnecessary vb2_ops_wait_prepare/finish callbacks] commit 6d406187ebc092ebccf4fb5a1bc16b92c4bc109a Author: Keke Li Date: Sun Apr 27 14:27:15 2025 +0800 media: uapi: Add stats info and parameters buffer for C3 ISP Add a header that describes the 3A statistics buffer and the parameters buffer for C3 ISP Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit a3aa115af25473c1309bc99cac6b2b6cd180fdd9 Author: Keke Li Date: Sun Apr 27 14:27:14 2025 +0800 media: Add C3ISP_PARAMS and C3ISP_STATS meta formats C3ISP_PARAMS is the C3 ISP Parameters format. C3ISP_STATS is the C3 ISP Statistics format. Reviewed-by: Daniel Scally Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit d0a02f67f032873922dccca70d26340e41d62072 Author: Keke Li Date: Sun Apr 27 14:27:13 2025 +0800 media: dt-bindings: Add amlogic,c3-isp.yaml c3-isp is used to process raw image. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit f0d2d8062cc8d552bd522595d557a0dec32d3ea2 Author: Keke Li Date: Sun Apr 27 14:27:12 2025 +0800 media: platform: Add C3 MIPI adapter driver Add a driver for the MIPI adapter unit found on the Amlogic C3 SoC. This driver is used to align the MIPI data from the MIPI CSI-2 receiver unit and send the aligned data to the ISP unit. Reviewed-by: Daniel Scally Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit a789e6fc7686c81e59af5697d344df8cf93b8716 Author: Keke Li Date: Sun Apr 27 14:27:11 2025 +0800 media: dt-bindings: Add amlogic,c3-mipi-adapter.yaml c3-mipi-adapter is used to organize mipi data and send raw data to ISP module. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit b63ef604a28da4165dcf2573cd508b4fb18e1c53 Author: Keke Li Date: Sun Apr 27 14:27:10 2025 +0800 media: platform: Add C3 MIPI CSI-2 driver Add a driver for the CSI-2 receiver unit found on the Amlogic C3 SoC. Create a drivers/media/platform/amlogic/c3/ directory to host the driver and the forthcoming support for the Amlogic C3 MIPI adapter and C3 ISP. This driver is used to receive the MIPI data from image sensor. Reviewed-by: Daniel Scally Reviewed-by: Jacopo Mondi Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil [hverkuil: fix typo: uinit -> unit] commit 8005e2afb7028bf05935af722c38d1ccba88b525 Author: Keke Li Date: Sun Apr 27 14:27:09 2025 +0800 media: dt-bindings: Add amlogic,c3-mipi-csi2.yaml c3-mipi-csi2 is used to receive mipi data from image sensor. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keke Li Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit 84953fc58a33ca2be61d2aa893108ab95320d37a Author: Arun R Murthy Date: Mon Apr 7 11:13:49 2025 +0530 drm/i915/display: Indexed 8bit format does not support async flip Async flip is not supported with Indexed 8 bit format as it depends on LUT and can't be updated atomically. Note: This may change the alignment for C8 framebuffers on some platforms. Signed-off-by: Arun R Murthy Reviewed-by: Ville Syrjälä Signed-off-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250407-asyn-v13-5-b93ef83076c5@intel.com commit 01963b624e2b330d687201f864654ae0aee5460e Author: Arun R Murthy Date: Mon Apr 7 11:13:48 2025 +0530 drm/i915/display: Add i915 hook for format_mod_supported_async Hook up the newly added plane function pointer format_mod_supported_async to populate the modifiers/formats supported by asynchronous flips. v5: Correct the if condition for modifier support check (Chaitanya) v6: Replace uint32_t/uint64_t with u32/u64 (Jani) v7: Move plannar check from intel_async_flip_check_hw() to intel_plane_format_mod_supported_async() (Ville) v8: In case of error print format/modifier (Chaitanya) v9: Exclude C8 format as its not supported by hardware v10: filter only planar formats move changes in can_async_flip to new patch (Ville) Signed-off-by: Arun R Murthy Reviewed-by: Ville Syrjälä Signed-off-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250407-asyn-v13-4-b93ef83076c5@intel.com commit ed1d563c7f0fee5e63048c53c10fa1ef69c74f77 Author: Arun R Murthy Date: Mon Apr 7 11:13:47 2025 +0530 drm/i915/display: Acomodate format check in intel_plane_can_async_flip() The function intel_plane_can_async_flip() checks for async supported modifier, add format support check also in the same function. Note: on ADL the surface base addr is required to be 16k aligned and if not might generate DMAR and GGTT faults leading to glitches. This patch changes the 16k alignment to 4k for planar formats. v11: Move filtering Indexed 8bit to a separate patch (Ville) v12: correct the commit msg and remove unwanted debug print (Ville) Signed-off-by: Arun R Murthy Reviewed-by: Ville Syrjälä Signed-off-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250407-asyn-v13-3-b93ef83076c5@intel.com commit 0d6dcd741c266389bbf0a8758f537b3a171ac32a Author: Arun R Murthy Date: Mon Apr 7 11:13:46 2025 +0530 drm/plane: modify create_in_formats to acommodate async create_in_formats creates the list of supported format/modifiers for synchronous flips, modify the same function so as to take the format_mod_supported as argument and create list of format/modifier for async as well. v5: create_in_formats can return -ve value in failure case, correct the if condition to check the creation of blob Dont add the modifier for which none of the formats is not supported. v6: Remove the code for masking the unsupported modifiers as UMD can leave with it. (Naveen/Chaitanya) v7: Retain the unsupported modifiers, userspace should have no impact, return pointer to blob instead of blob_id(Ville) Signed-off-by: Arun R Murthy Acked-by: Xaver Hugl Acked-by: Harry Wentland Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Ville Syrjälä Tested-by: Naveen Kumar Signed-off-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250407-asyn-v13-2-b93ef83076c5@intel.com commit 9cd5cc9da7ff650f1e9818dbfd54232c00ec47ed Author: Arun R Murthy Date: Mon Apr 7 11:13:45 2025 +0530 drm/plane: Add new plane property IN_FORMATS_ASYNC There exists a property IN_FORMATS which exposes the plane supported modifiers/formats to the user. In some platforms when asynchronous flip are used all of modifiers/formats mentioned in IN_FORMATS are not supported. This patch adds a new plane property IN_FORMATS_ASYNC to expose the async flip supported modifiers/formats so that user can use this information ahead and do flip with unsupported formats/modifiers. This will save flip failures. Add a new function pointer similar to format_mod_supported specifically for asynchronous flip. v2: Remove async variable from drm_plane (Ville) v3: Add new function pointer for async (Ville) v5: Typo corrected in commit message & some correction in the kernel documentation. (Chaitanya) v7: Place IN_FORMATS_ASYNC next to IN_FORMATS (Ville) v8: replace uint32_t with u32 and uint64_t with u64 (Chaitanya) Signed-off-by: Arun R Murthy Acked-by: Xaver Hugl Acked-by: Harry Wentland Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Ville Syrjälä Tested-by: Naveen Kumar Signed-off-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250407-asyn-v13-1-b93ef83076c5@intel.com commit 9c210a24b1f6627e4fbf441314143f618f325d6e Author: Sakari Ailus Date: Fri May 9 09:25:11 2025 +0300 media: ov02c10: Use div_u64 to divide a 64-bit number The ov02c10 driver divides a 64-bit number but reply relies on division operator to do that. Use div_u64() so this will compile everywhere. Signed-off-by: Sakari Ailus Reviewed-by: Stanislaw Gruszka Signed-off-by: Hans Verkuil commit 5a50a258b9ee1049998def0717b1198291dbf1ca Author: Kells Ping Date: Thu May 8 16:19:04 2025 +0800 media: platform: cros-ec: select ports ab for Dirks The Google Dirks device used the wrong ports, fix this. Signed-off-by: Kells Ping Signed-off-by: Hans Verkuil [hverkuil: fixed outdated subject and commit log] commit 3de572fe2189a4a0bd80295e1f478401e739498e Author: Marek Szyprowski Date: Wed May 7 18:09:13 2025 +0200 media: omap3isp: use sgtable-based scatterlist wrappers Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgtable's nents. Fixes: d33186d0be18 ("[media] omap3isp: ccdc: Use the DMA API for LSC") Fixes: 0e24e90f2ca7 ("[media] omap3isp: stat: Use the DMA API") CC: stable@vger.kernel.org Signed-off-by: Marek Szyprowski Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit a704a3c503ae1cfd9de8a2e2d16a0c9430e98162 Author: Marek Szyprowski Date: Wed May 7 18:09:11 2025 +0200 media: videobuf2: use sgtable-based scatterlist wrappers Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgt->nents. Fixes: d4db5eb57cab ("media: videobuf2: add begin/end cpu_access callbacks to dma-sg") CC: stable@vger.kernel.org Signed-off-by: Marek Szyprowski Reviewed-by: Sergey Senozhatsky Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil commit 57c8d79adf05244b171964d1d6c7e6fabbe5f5fd Author: Nicolas Dufresne Date: Thu Apr 10 16:43:47 2025 -0400 media: synopsys: hdmirx: Count dropped frames The sequence number communicate the lost frames to userspace. For this reason, it must be incremented even when a frame is skipped. This allows userspace such as GStreamer to report the loss. Fixes: 7b59b132ad439 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by: Nicolas Dufresne Reviewed-by: Dmitry Osipenko Signed-off-by: Hans Verkuil commit 0400bee67f49753b878c2576c02c1bc454f091ed Author: Nicolas Dufresne Date: Thu Apr 10 16:43:46 2025 -0400 media: synopsys: hdmirx: Renamed frame_idx to sequence This variable is used to fill the v4l2_buffer.sequence, let's name it the exact same way to reduce confusion. No functional changes. Fixes: 7b59b132ad439 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by: Nicolas Dufresne Reviewed-by: Dmitry Osipenko Signed-off-by: Hans Verkuil commit fdc33c5f89832066d8086745e8e2fba9c81b8eb9 Author: Chris Green Date: Tue Apr 8 21:31:25 2025 +0100 media: v4l: subdev: Fix coverity issue: Logically dead code The conditional (type == V4L2_TUNER_RADIO) always evaluates true due to the earlier check for (type != V4L2_TUNER_RADIO) (line 2826) CID: 1226742 Signed-off-by: Chris Green Signed-off-by: Hans Verkuil commit 2a934fdb01db6458288fc9386d3d8ceba6dd551a Author: Ma Ke Date: Wed Mar 19 16:02:48 2025 +0800 media: v4l2-dev: fix error handling in __video_register_device() Once device_register() failed, we should call put_device() to decrement reference count for cleanup. Or it could cause memory leak. And move callback function v4l2_device_release() and v4l2_device_get() before put_device(). As comment of device_register() says, 'NOTE: _Never_ directly free @dev after calling this function, even if it returned an error! Always use put_device() to give up the reference initialized in this function instead.' Found by code review. Cc: stable@vger.kernel.org Fixes: dc93a70cc7f9 ("V4L/DVB (9973): v4l2-dev: use the release callback from device instead of cdev") Signed-off-by: Ma Ke Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c8e1927e7f7d63721e32ec41d27ccb0eb1a1b0fc Author: Hans Zhang <18255117159@163.com> Date: Wed May 7 00:31:11 2025 +0800 efi/libstub: Describe missing 'out' parameter in efi_load_initrd The function efi_load_initrd() had a documentation warning due to the missing description for the 'out' parameter. Add the parameter description to the kernel-doc comment to resolve the warning and improve API documentation. Fixes the following compiler warning: drivers/firmware/efi/libstub/efi-stub-helper.c:611: warning: Function parameter or struct member 'out' not described in 'efi_load_initrd' Fixes: f4dc7fffa987 ("efi: libstub: unify initrd loading between architectures") Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Ard Biesheuvel commit 0f73628e9da1ee39daf5f188190cdbaee5e0c98c Author: Sergey Senozhatsky Date: Fri Mar 28 00:03:50 2025 +0900 thunderbolt: Do not double dequeue a configuration request Some of our devices crash in tb_cfg_request_dequeue(): general protection fault, probably for non-canonical address 0xdead000000000122 CPU: 6 PID: 91007 Comm: kworker/6:2 Tainted: G U W 6.6.65 RIP: 0010:tb_cfg_request_dequeue+0x2d/0xa0 Call Trace: ? tb_cfg_request_dequeue+0x2d/0xa0 tb_cfg_request_work+0x33/0x80 worker_thread+0x386/0x8f0 kthread+0xed/0x110 ret_from_fork+0x38/0x50 ret_from_fork_asm+0x1b/0x30 The circumstances are unclear, however, the theory is that tb_cfg_request_work() can be scheduled twice for a request: first time via frame.callback from ring_work() and second time from tb_cfg_request(). Both times kworkers will execute tb_cfg_request_dequeue(), which results in double list_del() from the ctl->request_queue (the list poison deference hints at it: 0xdead000000000122). Do not dequeue requests that don't have TB_CFG_REQUEST_ACTIVE bit set. Signed-off-by: Sergey Senozhatsky Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit e1288f1db68b30b1efd9a40ef966490631ae6a46 Author: Bartosz Szczepanek Date: Wed Apr 23 09:05:16 2025 +0000 efi: Improve logging around memmap init Be more informative if memremap fails, and print out physical address together with size. This change intends to make investigations of such early failures slightly easier. Signed-off-by: Bartosz Szczepanek Signed-off-by: Ard Biesheuvel commit 09fd04daed0746d8e77ed2327f26c671ce49023c Merge: 9fbae052f6f680 b0b8d3aeadb5c4 Author: Mark Brown Date: Fri May 9 18:06:17 2025 +0900 Add RZ/G3E xSPI support Merge series from Biju Das : The xSPI IP found on RZ/G3E SoC similar to RPC-IF interface, but it can support writes on memory-mapped area. Even though the registers are different, the rpcif driver code can be reused for xSPI by adding wrapper functions. commit 2b743164ecfe906803f5632243549f897350f51e Author: Yannic Moog Date: Thu Apr 17 14:01:14 2025 +0200 arm64: dts: add imx8mp-libra-rdk-fpsc LVDS panel overlay The Libra board has an LVDS connector. Add an overlay for an etml1010g3dra LVDS panel supported for the phyCORE-i.MX 8M Plus that may be connected to it. Signed-off-by: Yannic Moog Signed-off-by: Shawn Guo commit 95727d056c8f5cad668c1f5711b25102b474216f Author: Yannic Moog Date: Thu Apr 17 14:01:13 2025 +0200 arm64: dts: add imx8mp-libra-rdk-fpsc board Add device tree for the Libra-i.MX 8M Plus FPSC board. The Libra is a pure development board and has hardware to support FPSC-24-A.0 set of features. It can be populated with the phyCORE-i.MX 8M Plus SoM to form a SBC. The phyCORE-i.MX 8M Plus FPSC [1] SoM uses only a subset of the hardware features the Libra board provides. The phyCORE-i.MX8MP FPSC itself is a System on Module based on the i.MX 8M Plus SoC utilizing the Future Proof Solder Core [2] standard. To be able to easily map FPSC interface names to SoC interfaces, the FPSC interface names are added as inline comments. Example: &i2c5 { /* FPSC I2C4 */ pinctrl-0 = <&pinctrl_i2c5>; [...] }; Here, I2C4 is the FPSC interface name. The i2c5 instance of the i.MX 8M Plus SoC is used to fulfill the i2c functionality and its signals are routed to the FPSC I2C4 signal pins: pinctrl_i2c5: i2c5grp { fsl,pins = < MX8MP_IOMUXC_SPDIF_RX__I2C5_SDA 0x400001c2 /* I2C4_SDA */ MX8MP_IOMUXC_SAI5_RXD0__I2C5_SCL 0x400001c2 /* I2C4_SCL */ >; }; The features are almost identical to the existing phyCORE-i.MX 8M Plus SoM (dts: imx8mp-phycore-som.dtsi), but the pin muxing is different due to the FPSC standard as well as 1.8V IO voltage instead of 3.3V. [1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-8m-plus-fpsc/ [2] https://www.phytec.eu/en/produkte/system-on-modules/fpsc/ Signed-off-by: Yannic Moog Signed-off-by: Shawn Guo commit d34db26e9ea504a758841afcd04c73928cd238de Author: Yannic Moog Date: Thu Apr 17 14:01:12 2025 +0200 dt-bindings: arm: add imx8mp-libra-rdk-fpsc imx8mp-libra-rdk-fpsc is a development board based on the phyCORE-i.MX 8M Plus FPSC SoM. Add its description and binding. The imx8mp-phycore-fpsc som differs from the existing phyCORE-i.MX 8M Plus (dts: imx8mp-phycore-som.dtsi) in its physical form regarding the ball grid array. Other differences between the SoMs are missing SPI-NOR on this SoM and 1.8V IO voltage instead of 3.3V as found on the existing imx8mp-phycore-som. As a result the imx8mp-phycore-som is not compatible with this new libra development board. Acked-by: Krzysztof Kozlowski Signed-off-by: Yannic Moog Signed-off-by: Shawn Guo commit 91bdccf579817f9a899fd3df90361276951edf33 Author: Philipp Stanner Date: Thu Apr 17 11:40:10 2025 +0200 drm/cirrus: Use non-hybrid PCI devres API cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Reviewed-by: Javier Martinez Canillas Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417094009.29297-2-phasta@kernel.org commit bbb67d4f85fd00a216fca4ca048e15f8ff6a2195 Author: Zijun Hu Date: Wed May 7 19:50:27 2025 +0800 configfs: Correct error value returned by API config_item_set_name() kvasprintf() failure is often caused by memory allocation which has error code -ENOMEM, but config_item_set_name() returns -EFAULT for the failure. Fix by returning -ENOMEM instead of -EFAULT for the failure. Reviewed-by: Joel Becker Reviewed-by: Breno Leitao Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250507-fix_configfs-v3-3-fe2d96de8dc4@quicinc.com Signed-off-by: Andreas Hindborg commit f830edbae247b89228c3e09294151b21e0dc849c Author: Zijun Hu Date: Wed May 7 19:50:26 2025 +0800 configfs: Do not override creating attribute file failure in populate_attrs() populate_attrs() may override failure for creating attribute files by success for creating subsequent bin attribute files, and have wrong return value. Fix by creating bin attribute files under successfully creating attribute files. Fixes: 03607ace807b ("configfs: implement binary attributes") Cc: stable@vger.kernel.org Reviewed-by: Joel Becker Reviewed-by: Breno Leitao Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250507-fix_configfs-v3-2-fe2d96de8dc4@quicinc.com Signed-off-by: Andreas Hindborg commit d78aa60cfa7ece7477a4089a3a4b520ec7beba1b Author: Zijun Hu Date: Wed May 7 19:50:25 2025 +0800 configfs: Delete semicolon from macro type_print() definition Macro type_print() definition ends with semicolon, so will cause the subsequent macro invocations end with two semicolons. Fix by deleting the semicolon from the macro definition. Reviewed-by: Joel Becker Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250507-fix_configfs-v3-1-fe2d96de8dc4@quicinc.com Signed-off-by: Andreas Hindborg commit 941a099ddc438ee51f175f98dbc744000469640f Author: Bartosz Golaszewski Date: Fri Apr 25 11:08:31 2025 +0200 pinctrl: bcm2835: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-bcm-v1-3-6b8883d79b66@linaro.org Signed-off-by: Linus Walleij commit 6752dbe5b6520c903414a5c4b26cf171b302c07c Author: Bartosz Golaszewski Date: Fri Apr 25 11:08:30 2025 +0200 pinctrl: bcm: iproc-gpio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-bcm-v1-2-6b8883d79b66@linaro.org Signed-off-by: Linus Walleij commit c84c4a1db659e1c16b9196513f3737d35a927201 Author: Bartosz Golaszewski Date: Fri Apr 25 11:08:29 2025 +0200 pinctrl: bcm: nsp-gpio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-bcm-v1-1-6b8883d79b66@linaro.org Signed-off-by: Linus Walleij commit 23a5fa371c7725ec8ba5d21cd1c97bfb9080ea45 Author: Bartosz Golaszewski Date: Fri Apr 25 11:01:01 2025 +0200 pinctrl: mediatek: common: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-mediatek-v1-5-93e6a01855e7@linaro.org Signed-off-by: Linus Walleij commit 8a3f17df00e6110f80e1970a93497901a40116bf Author: Bartosz Golaszewski Date: Fri Apr 25 11:01:00 2025 +0200 pinctrl: mediatek: moore: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-mediatek-v1-4-93e6a01855e7@linaro.org Signed-off-by: Linus Walleij commit 1849d1a3d388caf898b18791c40edac464c809d1 Author: Bartosz Golaszewski Date: Fri Apr 25 11:00:59 2025 +0200 pinctrl: mediatek: paris: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-mediatek-v1-3-93e6a01855e7@linaro.org Signed-off-by: Linus Walleij commit 9c791cbaf3cf2671404dc4f7679548071b38e104 Author: Bartosz Golaszewski Date: Fri Apr 25 11:00:58 2025 +0200 pinctrl: mediatek: paris: don't double-check the GPIO number GPIO core already makes sure we don't pass invalid GPIO numbers down to the driver callbacks. Remove needless checks from the driver. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-mediatek-v1-2-93e6a01855e7@linaro.org Signed-off-by: Linus Walleij commit 7464c88169325c8540266800787880e1fbf1bd85 Author: Bartosz Golaszewski Date: Fri Apr 25 11:00:57 2025 +0200 pinctrl: mediatek: airoha: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/20250425-gpiochip-set-rv-pinctrl-mediatek-v1-1-93e6a01855e7@linaro.org Signed-off-by: Linus Walleij commit 4abb9052a72bc98d521b0535b5deee243a3bbd12 Merge: 23be716b1c4f3f 4528b9052731f1 Author: Carlos Maiolino Date: Fri May 9 09:15:39 2025 +0200 Merge tag 'atomic-writes-6.16_2025-05-07' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into atomic_writes large atomic writes for xfs [v12.1] Currently atomic write support for xfs is limited to writing a single block as we have no way to guarantee alignment and that the write covers a single extent. This series introduces a method to issue atomic writes via a software-based method. The software-based method is used as a fallback for when attempting to issue an atomic write over misaligned or multiple extents. For xfs, this support is based on reflink CoW support. The basic idea of this CoW method is to alloc a range in the CoW fork, write the data, and atomically update the mapping. Initial mysql performance testing has shown this method to perform ok. However, there we are only using 16K atomic writes (and 4K block size), so typically - and thankfully - this software fallback method won't be used often. For other FSes which want large atomics writes and don't support CoW, I think that they can follow the example in [0]. Catherine is currently working on further xfstests for this feature, which we hope to share soon. About 17/17, maybe it can be omitted as there is no strong demand to have it included. Based on bfecc4091e07 (xfs/next-rc, xfs/for-next) xfs: allow ro mounts if rtdev or logdev are read-only [0] https://lore.kernel.org/linux-xfs/20250102140411.14617-1-john.g.garry@oracle.com/ Differences to v12: - add more review tags Differences to v11: - split "xfs: ignore ..." patch - inline sync_blockdev() in xfs_alloc_buftarg() (Christoph) - fix xfs_calc_rtgroup_awu_max() for 0 block count (Darrick) - Add RB tag from Christoph (thanks!) Differences to v10: - add "xfs: only call xfs_setsize_buftarg once ..." by Darrick - symbol renames in "xfs: ignore HW which cannot..." by Darrick Differences to v9: - rework "ignore HW which cannot .." patch by Darrick - Ensure power-of-2 max always for unit min/max when no HW support With a bit of luck, this should all go splendidly. Signed-off-by: "Darrick J. Wong" commit a9ce2ce1800e04267e6d99016ed0fe132d6049a9 Merge: d97e2634fbdcd2 932ce98041ff97 Author: Jakub Kicinski Date: Thu May 8 19:43:54 2025 -0700 Merge branch 'add-more-features-for-enetc-v4-round-2' Wei Fang says: ==================== Add more features for ENETC v4 - round 2 This patch set adds the following features. 1. Compared with ENETC v1, the formats of tables and command BD of ENETC v4 have changed significantly, and the two are not compatible. Therefore, in order to support the NETC Table Management Protocol (NTMP) v2.0, we introduced the netc-lib driver and added support for MAC address filter table and RSS table. 2. Add MAC filter and VLAN filter support for i.MX95 ENETC PF. 3. Add RSS support for i.MX95 ENETC PF. 4. Add loopback support for i.MX95 ENETC PF. v1: Link: https://lore.kernel.org/20250103060610.2233908-1-wei.fang@nxp.com/ v2: Link: https://lore.kernel.org/20250113082245.2332775-1-wei.fang@nxp.com/ v3: Link: https://lore.kernel.org/20250304072201.1332603-1-wei.fang@nxp.com/ v4: Link: https://lore.kernel.org/20250311053830.1516523-1-wei.fang@nxp.com/ v5: Link: https://lore.kernel.org/20250411095752.3072696-1-wei.fang@nxp.com/ v6: Link: https://lore.kernel.org/20250428105657.3283130-1-wei.fang@nxp.com/ ==================== Link: https://patch.msgid.link/20250506080735.3444381-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 932ce98041ff9731e84d9548818db69899ee08ba Author: Wei Fang Date: Tue May 6 16:07:35 2025 +0800 net: enetc: add loopback support for i.MX95 ENETC PF Add internal loopback support for i.MX95 ENETC PF, the default loopback mode is MAC level loopback, the MAC Tx data is looped back onto the Rx. The MAC interface runs at a fixed 1:8 ratio of NETC clock in MAC-level loopback mode, with no dependency on Tx clock. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-15-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit f7d30ef6c1f743584fde2774327227c547ec878e Author: Wei Fang Date: Tue May 6 16:07:34 2025 +0800 net: enetc: add VLAN filtering support for i.MX95 ENETC PF Since the offsets of the VLAN hash filter registers of ENETC v4 are different from ENETC v1. Therefore, enetc_set_si_vlan_ht_filter() is added to set the correct VLAN hash filter based on the SI ID and ENETC revision, so that ENETC v4 PF driver can reuse enetc_vlan_rx_add_vid() and enetc_vlan_rx_del_vid(). In addition, the VLAN promiscuous mode will be enabled if VLAN filtering is disabled, which means that PF qualifies for reception of all VLAN tags. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-14-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 5d7f6f6836a11b64944d26505d8f629cb0e911ea Author: Wei Fang Date: Tue May 6 16:07:33 2025 +0800 net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c The VLAN hash filters of ENETC v1 and v4 are basically the same, the only difference is that the offset of the VLAN hash filter registers has been changed in ENETC v4. So some functions like enetc_vlan_rx_add_vid() and enetc_vlan_rx_del_vid() only need to be slightly modified to be reused by ENETC v4. Currently, we just move these functions from enetc_pf.c to enetc_pf_common.c. Appropriate modifications will be made for ENETC4 in a subsequent patch. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-13-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 014e33e2d8e9e792df10c880e46b3278ad912a7f Author: Wei Fang Date: Tue May 6 16:07:32 2025 +0800 net: enetc: extract enetc_refresh_vlan_ht_filter() Extract the common function enetc_refresh_vlan_ht_filter() from enetc_sync_vlan_ht_filter() so that it can be reused by the ENETC v4 PF and VF drivers in the future. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-12-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 2219281242fce2bbe8809eff7ab4ca4301e18258 Author: Wei Fang Date: Tue May 6 16:07:31 2025 +0800 net: enetc: enable RSS feature by default Receive side scaling (RSS) is a network driver technology that enables the efficient distribution of network receive processing across multiple CPUs in multiprocessor systems. Therefore, it is better to enable RSS by default so that the CPU load can be balanced and network performance can be improved when then network is enabled. Signed-off-by: Wei Fang Acked-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-11-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 42fb12220adef887f431e128be72756bf78836f2 Author: Wei Fang Date: Tue May 6 16:07:30 2025 +0800 net: enetc: change enetc_set_rss() to void type Actually enetc_set_rss() does not need a return value, so change its type to void. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-10-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 2627e9873d69fbcf55f4c0af7311a1b15479ac9a Author: Wei Fang Date: Tue May 6 16:07:29 2025 +0800 net: enetc: add RSS support for i.MX95 ENETC PF Compared with LS1028A, there are two main differences: first, i.MX95 ENETC uses NTMP 2.0 to manage the RSS table, and second, the offset of the RSS Key registers is different. Some modifications have been made in the previous patches based on these differences to ensure that the relevant interfaces are compatible with i.MX95. So it's time to add RSS support to i.MX95 ENETC PF. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-9-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 7e1af4d6e4b443ee6bb0829579b05c7e256d5562 Author: Wei Fang Date: Tue May 6 16:07:28 2025 +0800 net: enetc: make enetc_set_rss_key() reusable Since the offset of the RSS key registers of i.MX95 ENETC is different from that of LS1028A, so add enetc_get_rss_key_base() to get the base offset for the different chips, so that enetc_set_rss_key() can be reused for this trivial thing. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-8-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 66b3fb0011563871ca67d7ed5940faa8b7b231b8 Author: Wei Fang Date: Tue May 6 16:07:27 2025 +0800 net: enetc: add set/get_rss_table() hooks to enetc_si_ops Since i.MX95 ENETC (v4) uses NTMP 2.0 to manage the RSS table, which is different from LS1028A ENETC (v1). In order to reuse some functions related to the RSS table, so add .get_rss_table() and .set_rss_table() hooks to enetc_si_ops. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-7-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit df6cb095808936eb32b671d1daf80c4c5653e4d3 Author: Wei Fang Date: Tue May 6 16:07:26 2025 +0800 net: enetc: add debugfs interface to dump MAC filter ENETC's MAC filter consists of hash MAC filter and exact MAC filter. Hash MAC filter is a 64-bit entry hash table consisting of two 32-bit registers. Exact MAC filter is implemented by configuring MAC address filter table through command BD ring. The table is stored in ENETC's internal memory and needs to be read through command BD ring. In order to facilitate debugging, added a debugfs interface to get the relevant information about MAC filter. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-6-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 6c5bafba347b0e080cae15a73fae67fa79975c97 Author: Wei Fang Date: Tue May 6 16:07:25 2025 +0800 net: enetc: add MAC filtering for i.MX95 ENETC PF The i.MX95 ENETC supports both MAC hash filter and MAC exact filter. MAC hash filter is implenented through a 64-bit hash table to match against the hashed addresses, PF and VFs each have two MAC hash tables, one is for unicast and the other one is for multicast. But MAC exact filter is shared between SIs (PF and VFs), each table entry contains a MAC address that may be unicast or multicast and the entry also contains an SI bitmap field that indicates for which SIs the entry is valid. For i.MX95 ENETC, MAC exact filter only has 4 entries. According to the observation of the system default network configuration, the MAC filter will be configured with multiple multicast addresses, so MAC exact filter does not have enough entries to implement multicast filtering. Therefore, the current MAC exact filter is only used for unicast filtering. If the number of unicast addresses exceeds 4, then MAC hash filter is used. Note that both MAC hash filter and MAC exact filter can only be accessed by PF, VFs can notify PF to set its corresponding MAC filter through the mailbox mechanism of ENETC. But currently MAC filter is only added for i.MX95 ENETC PF. The MAC filter support of ENETC VFs will be supported in subsequent patches. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-5-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 401dbdd1c23c82e5eb57121bc837cd7731dbebe8 Author: Wei Fang Date: Tue May 6 16:07:24 2025 +0800 net: enetc: move generic MAC filtering interfaces to enetc-core Although only ENETC PF can access the MAC address filter table, the table entries can specify MAC address filtering for one or more SIs based on SI_BITMAP, which means that the table also supports MAC address filtering for VFs. Currently, only the ENETC v1 PF driver supports MAC address filtering. In order to add the MAC address filtering support for the ENETC v4 PF driver and VF driver in the future, the relevant generic interfaces are moved to the enetc-core driver. This lays the basis for i.MX95 ENETC PF and VFs to support MAC address filtering. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-4-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit e3f4a0a8ddb41962efa51c6353e869b90d183e68 Author: Wei Fang Date: Tue May 6 16:07:23 2025 +0800 net: enetc: add command BD ring support for i.MX95 ENETC The command BD ring is used to configure functionality where the underlying resources may be shared between different entities or being too large to configure using direct registers (such as lookup tables). Because the command BD and table formats of i.MX95 and LS1028A are very different, the software processing logic is also different. So add enetc4_setup_cbdr() and enetc4_teardown_cbdr() for ENETC v4 drivers. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-3-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 4701073c3debd16d7f534f3eb808bd9b50601c0c Author: Wei Fang Date: Tue May 6 16:07:22 2025 +0800 net: enetc: add initial netc-lib driver to support NTMP Some NETC functionality is controlled using control messages sent to the hardware using BD ring interface with 32B descriptor similar to transmit BD ring used on ENETC. This BD ring interface is referred to as command BD ring. It is used to configure functionality where the underlying resources may be shared between different entities or being too large to configure using direct registers. Therefore, a messaging protocol called NETC Table Management Protocol (NTMP) is provided for exchanging configuration and management information between the software and the hardware using the command BD ring interface. For the management protocol of LS1028A has been retroactively named NTMP 1.0, and its implementation is in enetc_cbdr.c and enetc_qos.c. However, NTMP of i.MX95 has been upgraded to version 2.0, which is incompatible with LS1028A, because the message formats have been changed. Therefore, add the netc-lib driver to support NTMP 2.0 to operate various tables. Note that, only MAC address filter table and RSS table are supported at the moment. More tables will be supported in subsequent patches. It is worth mentioning that the purpose of the netc-lib driver is to provide some NTMP-based generic interfaces for ENETC and NETC Switch drivers. Currently, it only supports the configurations of some tables. Interfaces such as tc flower and debugfs will be added in the future. Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250506080735.3444381-2-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 7c3f259dfe03f5dcd898126602818a8fbe94d3c5 Author: Cedric Xing Date: Tue May 6 17:57:13 2025 -0500 virt: tdx-guest: Transition to scoped_cond_guard for mutex operations Replace mutex_lock_interruptible()/mutex_unlock() with scoped_cond_guard to enhance code readability and maintainability. Signed-off-by: Cedric Xing Acked-by: Dionna Amalie Glaze Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-7-ac6ff5e9d58a@intel.com Signed-off-by: Dan Williams commit 850972bc61eba68552763c937892abb66a114da1 Author: Cedric Xing Date: Tue May 6 17:57:12 2025 -0500 virt: tdx-guest: Refactor and streamline TDREPORT generation Consolidate instances (code segments) of TDREPORT generation to improve readability and maintainability, by refactoring each instance into invoking a unified subroutine throughout the TDX guest driver. Implement proper locking around TDG.MR.REPORT and TDG.MR.RTMR.EXTEND to avoid race inside the TDX module. Preallocate TDREPORT buffer to reduce overhead in subsequent TDREPORT generation. Signed-off-by: Cedric Xing Acked-by: Dionna Amalie Glaze Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-6-ac6ff5e9d58a@intel.com Signed-off-by: Dan Williams commit 4d2a7bfad5b79b3a362fc7cfed8d7ddbd263a838 Author: Cedric Xing Date: Wed May 7 18:06:06 2025 -0700 virt: tdx-guest: Expose TDX MRs as sysfs attributes Expose the most commonly used TDX MRs (Measurement Registers) as sysfs attributes. Use the ioctl() interface of /dev/tdx_guest to request a full TDREPORT for access to other TD measurements. Directory structure of TDX MRs inside a TDVM is as follows: /sys/class/misc/tdx_guest └── measurements ├── mrconfigid ├── mrowner ├── mrownerconfig ├── mrtd:sha384 ├── rtmr0:sha384 ├── rtmr1:sha384 ├── rtmr2:sha384 └── rtmr3:sha384 Read the file/attribute to retrieve the current value of an MR. Write to the file/attribute (if writable) to extend the corresponding RTMR. Refer to Documentation/ABI/testing/sysfs-devices-virtual-misc-tdx_guest for more information. Signed-off-by: Cedric Xing Acked-by: Dionna Amalie Glaze [djbw: fixup exit order] Link: https://patch.msgid.link/20250508010606.4129953-1-dan.j.williams@intel.com Signed-off-by: Dan Williams commit 2748566da8b03d924fb8ef6f2ce19e8f5d5060c7 Author: Cedric Xing Date: Tue May 6 17:57:10 2025 -0500 x86/tdx: tdx_mcall_get_report0: Return -EBUSY on TDCALL_OPERAND_BUSY error Return `-EBUSY` from tdx_mcall_get_report0() when `TDG.MR.REPORT` returns `TDCALL_OPERAND_BUSY`. This enables the caller to retry obtaining a TDREPORT later if another VCPU is extending an RTMR concurrently. Signed-off-by: Cedric Xing Acked-by: Dionna Amalie Glaze Acked-by: Dave Hansen Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-4-ac6ff5e9d58a@intel.com Signed-off-by: Dan Williams commit 3f88ca9614219cb29548669e18677d2e32099399 Author: Cedric Xing Date: Tue May 6 17:57:09 2025 -0500 x86/tdx: Add tdx_mcall_extend_rtmr() interface The TDX guest exposes one MRTD (Build-time Measurement Register) and four RTMR (Run-time Measurement Register) registers to record the build and boot measurements of a virtual machine (VM). These registers are similar to PCR (Platform Configuration Register) registers in the TPM (Trusted Platform Module) space. This measurement data is used to implement security features like attestation and trusted boot. To facilitate updating the RTMR registers, the TDX module provides support for the `TDG.MR.RTMR.EXTEND` TDCALL which can be used to securely extend the RTMR registers. Add helper function to update RTMR registers. It will be used by the TDX guest driver in enabling RTMR extension support. Co-developed-by: Kuppuswamy Sathyanarayanan Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Cedric Xing Acked-by: Dionna Amalie Glaze Acked-by: Dave Hansen Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-3-ac6ff5e9d58a@intel.com Signed-off-by: Dan Williams commit f6953f1f9ec4ad68651d7c677f0c065cb4c1edf7 Author: Cedric Xing Date: Tue May 6 17:57:08 2025 -0500 tsm-mr: Add tsm-mr sample code This sample kernel module demonstrates how to make MRs accessible to user mode through the tsm-mr library. Once loaded, this module registers a `miscdevice` that host a set of emulated measurement registers as shown in the directory tree below. /sys/class/misc/tsm_mr_sample └── measurements ├── config_mr ├── report_digest:sha512 ├── rtmr0:sha256 ├── rtmr1:sha384 ├── rtmr_crypto_agile:sha256 ├── rtmr_crypto_agile:sha384 └── static_mr:sha384 Among the MRs in this example: - `config_mr` demonstrates a hashless MR, like MRCONFIGID in Intel TDX or HOSTDATA in AMD SEV. - `static_mr` demonstrates a static MR. The suffix `:sha384` indicates its value is a sha384 digest. - `rtmr0` is an RTMR with `TSM_MR_F_WRITABLE` **cleared**, preventing direct extensions; as a result, the attribute `rtmr0:sha256` is read-only. - `rtmr1` is an RTMR with `TSM_MR_F_WRITABLE` **set**, permitting direct extensions; thus, the attribute `rtmr1:sha384` is writable. - `rtmr_crypto_agile` demonstrates a "single" MR that supports multiple hash algorithms. Each supported algorithm has a corresponding digest, usually referred to as a "bank" in TCG terminology. In this specific sample, the 2 banks are aliased to `rtmr0` and `rtmr1`, respectively. - `report_digest` contains the digest of the internal report structure living in this sample module's memory. It is to demonstrate the use of the `TSM_MR_F_LIVE` flag. Its value changes each time an RTMR is extended. Signed-off-by: Cedric Xing Reviewed-by: Dan Williams Acked-by: Dionna Amalie Glaze Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-2-ac6ff5e9d58a@intel.com Signed-off-by: Dan Williams commit b9e22b35d4598aefed642928ed2856a9900e5b37 Author: Cedric Xing Date: Thu May 8 19:07:39 2025 -0700 tsm-mr: Add TVM Measurement Register support Introduce new TSM Measurement helper library (tsm-mr) for TVM guest drivers to expose MRs (Measurement Registers) as sysfs attributes, with Crypto Agility support. Add the following new APIs (see include/linux/tsm-mr.h for details): - tsm_mr_create_attribute_group(): Take on input a `struct tsm_measurements` instance, which includes one `struct tsm_measurement_register` per MR with properties like `TSM_MR_F_READABLE` and `TSM_MR_F_WRITABLE`, to determine the supported operations and create the sysfs attributes accordingly. On success, return a `struct attribute_group` instance that will typically be included by the guest driver into `miscdevice.groups` before calling misc_register(). - tsm_mr_free_attribute_group(): Free the memory allocated to the attrubute group returned by tsm_mr_create_attribute_group(). tsm_mr_create_attribute_group() creates one attribute for each MR, with names following this pattern: MRNAME[:HASH] - MRNAME - Placeholder for the MR name, as specified by `tsm_measurement_register.mr_name`. - :HASH - Optional suffix indicating the hash algorithm associated with this MR, as specified by `tsm_measurement_register.mr_hash`. Support Crypto Agility by allowing multiple definitions of the same MR (i.e., with the same `mr_name`) with distinct HASH algorithms. NOTE: Crypto Agility, introduced in TPM 2.0, allows new hash algorithms to be introduced without breaking compatibility with applications using older algorithms. CC architectures may face the same challenge in the future, needing new hashes for security while retaining compatibility with older hashes, hence the need for Crypto Agility. Signed-off-by: Cedric Xing Reviewed-by: Dan Williams Acked-by: Dionna Amalie Glaze [djbw: fixup bin_attr const conflict] Link: https://patch.msgid.link/20250509020739.882913-1-dan.j.williams@intel.com Signed-off-by: Dan Williams commit 321f9db5563e1a6c89546b19bd031269aa3f17b8 Author: Kuninori Morimoto Date: Fri May 9 00:36:42 2025 +0000 ASoC: soc.h: remove unnecessary definitions We don't need these definitions. Remove it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87ldr6pqlh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f4358f17a62e7a42f72b02d8e8fbd6b760b69f01 Author: Kuninori Morimoto Date: Fri May 9 00:36:52 2025 +0000 ASoC: soc.h: remove snd_soc_disconnect_sync() There is no snd_soc_disconnect_sync() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87jz6qpql7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 248b75f89e99e59e5362d02d4df3f5e698137c29 Author: Dr. David Alan Gilbert Date: Fri May 9 01:37:16 2025 +0100 ASoC: Intel: atom: Remove unused functions sst_cdev_fragment_elapsed() was added in 2014 by commit 7adab122a57c ("ASoC: Intel: sst - add compressed ops handling") but has remained unused. sst_get_stream_allocated() was added in 2014 by commit cc547054d312 ("ASoC: Intel: sst - add pcm ops handling") but has remained unused. sst_wait_interruptible() was added in 2014 by commit 60dc8dbacb00 ("ASoC: Intel: sst: Add some helper functions") but has remained unused. Remove them. Signed-off-by: "Dr. David Alan Gilbert" Link: https://patch.msgid.link/20250509003716.278416-1-linux@treblig.org Signed-off-by: Mark Brown commit d97e2634fbdcd238a51bc363267df0139c17f4da Author: Jakub Kicinski Date: Wed May 7 07:01:07 2025 -0700 selftests: net-drv: remove the nic_performance and nic_link_layer tests Revert fbbf93556f0c ("selftests: nic_performance: Add selftest for performance of NIC driver") Revert c087dc54394b ("selftests: nic_link_layer: Add selftest case for speed and duplex states") Revert 6116075e18f7 ("selftests: nic_link_layer: Add link layer selftest for NIC driver") These tests don't clean up after themselves, don't use the disruptive annotations, don't get included in make install etc. etc. The tests were added before we have any "HW" runner, so the issues were missed. Our CI doesn't have any way of excluding broken tests, remove these for now to stop the random pollution of results due to broken env. We can always add them back once / if fixed. Acked-by: Stanislav Fomichev Reviewed-by: David Wei Link: https://patch.msgid.link/20250507140109.929801-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1f389a648a3be07400819c431ee30b74129a8a6e Author: Florian Westphal Date: Wed May 7 09:49:55 2025 +0200 selftests: netfilter: fix conntrack stress test failures on debug kernels Jakub reports test failures on debug kernel: FAIL: proc inconsistency after uniq filter for ... This is because entries are expiring while validation is happening. Increase the timeout of ctnetlink injected entries and the icmp (ping) timeout to 1h to avoid this. To reduce run-time, add less entries via ctnetlink when KSFT_MACHINE_SLOW is set. also log of a failed run had: PASS: dump in netns had same entry count (-C 0, -L 0, -p 0, /proc 0) ... i.e. all entries already expired: add a check and set failure if this happens. While at it, include a diff when there were duplicate entries and add netns name to error messages (it tells if icmp or ctnetlink failed). Fixes: d33f889fd80c ("selftests: netfilter: add conntrack stress test") Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/netdev/20250506061125.1a244d12@kernel.org/ Signed-off-by: Florian Westphal Link: https://patch.msgid.link/20250507075000.5819-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 6593714d67bab860a733d07895a94404f4ac3039 Author: Harshad Shirwadkar Date: Thu May 8 17:59:08 2025 +0000 ext4: hold s_fc_lock while during fast commit Leaving s_fc_lock in between during commit in ext4_fc_perform_commit() function leaves room for subtle concurrency bugs where ext4_fc_del() may delete an inode from the fast commit list, leaving list in an inconsistent state. Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250508175908.1004880-10-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 12e64e7f859ed19c5bb497866284d0318c3194a2 Author: Harshad Shirwadkar Date: Thu May 8 17:59:07 2025 +0000 ext4: convert s_fc_lock to mutex type This allows us to hold s_fc_lock during kmem_cache_* functions, which is needed in the following patch. Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250508175908.1004880-9-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 86e07d4b9b0497afef78af773c74258c8f63030f Author: Harshad Shirwadkar Date: Thu May 8 17:59:06 2025 +0000 ext4: temporarily elevate commit thread priority Unlike JBD2 based full commits, there is no dedicated journal thread for fast commits. Thus to reduce scheduling delays between IO submission and completion, temporarily elevate the committer thread's priority to match the configured priority of the JBD2 journal thread. Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250508175908.1004880-8-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 69f35ca189300ddba29a16214159beef45bbd984 Author: Harshad Shirwadkar Date: Thu May 8 17:59:05 2025 +0000 ext4: update code documentation This patch updates code documentation to reflect the commit path changes made in this series. Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara code docs Link: https://patch.msgid.link/20250508175908.1004880-7-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit ed45d331135c317c7f80e8c4e0dad644ca8ca9dc Author: Harshad Shirwadkar Date: Thu May 8 17:59:04 2025 +0000 ext4: drop i_fc_updates from inode fc info The new logic introduced in this series does not require tracking number of active handles open on an inode. So, drop it. Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250508175908.1004880-6-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 857d32f2618166765ce9306a246d0745afc76859 Author: Harshad Shirwadkar Date: Thu May 8 17:59:03 2025 +0000 ext4: rework fast commit commit path This patch reworks fast commit's commit path to remove locking the journal for the entire duration of a fast commit. Instead, we only lock the journal while marking all the eligible inodes as "committing". This allows handles to make progress in parallel with the fast commit. Signed-off-by: Harshad Shirwadkar Link: https://patch.msgid.link/20250508175908.1004880-5-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 0b64fd74dd2054834c98867422bc9813e3bba8f4 Author: Harshad Shirwadkar Date: Thu May 8 17:59:02 2025 +0000 ext4: mark inode dirty before grabbing i_data_sem in ext4_setattr Mark inode dirty first and then grab i_data_sem in ext4_setattr(). Signed-off-by: Harshad Shirwadkar Link: https://patch.msgid.link/20250508175908.1004880-4-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 4d3266463ed06af2916b306bdb0ebd647726ba49 Author: Harshad Shirwadkar Date: Thu May 8 17:59:01 2025 +0000 ext4: for committing inode, make ext4_fc_track_inode wait If the inode that's being requested to track using ext4_fc_track_inode is being committed, then wait until the inode finishes the commit. Also, add calls to ext4_fc_track_inode at the right places. With this patch, now calling ext4_reserve_inode_write() results in inode being tracked for next fast commit. This ensures that by the time ext4_reserve_inode_write() returns, it is ready to be modified and won't be committed until the corresponding handle is open. A subtle lock ordering requirement with i_data_sem (which is documented in the code) requires that ext4_fc_track_inode() be called before grabbing i_data_sem. So, this patch also adds explicit ext4_fc_track_inode() calls in places where i_data_sem grabbed. Signed-off-by: Harshad Shirwadkar Link: https://patch.msgid.link/20250508175908.1004880-3-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 834224e81cdc265456f73fed748a349e43e2d8ef Author: Harshad Shirwadkar Date: Thu May 8 17:59:00 2025 +0000 ext4: convert i_fc_lock to spinlock Convert ext4_inode_info->i_fc_lock to spinlock to avoid sleeping in invalid contexts. Reviewed-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://patch.msgid.link/20250508175908.1004880-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 8d782ad6509d91bd1832ef827232855ef198a8c4 Merge: 5e0c67998152bd b2602a84ff8592 Author: Dave Airlie Date: Fri May 9 11:39:27 2025 +1000 Merge tag 'drm-intel-gt-next-2025-05-08-1' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Driver Changes: - Fix SLPC wait boosting reference counting to avoid getting stuck on non-boost frequency on power saving profile on DG1/DG2 (Vinay) - Add 20ms delay to engine reset for robustness on HSW (Nitin) - Use proper sleeping functions for timeouts shorter than 20ms (Andi) - Fix fence not released on early probe errors for HuC (Janusz) - Remove const from struct i915_wa list allocation (Kees) - Apply SPDX license format where missing and use single-line format (Andi) - Whitespace fixes (Dan, Andi) - Selftest improvements (Mikolaj, Badal, Sk, Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://lore.kernel.org/r/aBxNYp0IviE23zy-@jlahtine-mobl commit a0372b3831785e15de605cd13d2ed78a79a9b435 Merge: fba4ceaa242d2b 7515f45c165269 Author: Dan Williams Date: Thu May 8 18:12:06 2025 -0700 Merge branch 'for-6.16/tsm' into tsm-next Pick up the drivers/virt/coco/guest/ split in preparation for TSM host drivers. commit ba575cea29fd82a0e6836fefcd51db36f1ff8a92 Author: Paul E. McKenney Date: Thu Apr 24 12:36:19 2025 -0700 ratelimit: Drop redundant accesses to burst Now that there is the "burst <= 0" fastpath, for all later code, burst must be strictly greater than zero. Therefore, drop the redundant checks of this local variable. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 4b2cce999c8f5a03916b11b1e4ce192d223ab4f5 Author: Paul E. McKenney Date: Thu Apr 24 12:28:24 2025 -0700 ratelimit: Use nolock_ret restructuring to collapse common case code Now that unlock_ret releases the lock, then falls into nolock_ret, which handles ->missed based on the value of ret, the common-case lock-held code can be collapsed into a single "if" statement with a single-statement "then" clause. Yes, we could go further and just assign the "if" condition to ret, but in the immortal words of MSDOS, "Are you sure?". Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 743a1942d52f6827d39d8f6745d006b5bb8bbe6b Author: Paul E. McKenney Date: Thu Apr 24 12:16:21 2025 -0700 ratelimit: Use nolock_ret label to collapse lock-failure code Now that we have a nolock_ret label that handles ->missed correctly based on the value of ret, we can eliminate a local variable and collapse several "if" statements on the lock-acquisition-failure code path. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit a69114c2a12c906957ddd3409af48f40e047ef53 Author: Paul E. McKenney Date: Thu Apr 24 12:06:43 2025 -0700 ratelimit: Use nolock_ret label to save a couple of lines of code Create a nolock_ret label in order to start consolidating the unlocked return paths that conditionally invoke ratelimit_state_inc_miss(). Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit f2d0ea0f086ae8811bb957ae2f781387557f80bd Author: Paul E. McKenney Date: Thu Apr 24 12:00:10 2025 -0700 ratelimit: Simplify common-case exit path By making "ret" always be initialized, and moving the final call to ratelimit_state_inc_miss() out from under the lock, we save a goto and a couple lines of code. This also saves a couple of lines of code from the unconditional enable/disable slowpath. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit a940d145cc381c8cde0d0f7f9faf282fbab89bfb Author: Petr Mladek Date: Thu Apr 24 11:19:13 2025 -0700 ratelimit: Warn if ->interval or ->burst are negative Currently, ___ratelimit() treats a negative ->interval or ->burst as if it was zero, but this is an accident of the current implementation. Therefore, splat in this case, which might have the benefit of detecting use of uninitialized ratelimit_state structures on the one hand or easing addition of new features on the other. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Petr Mladek Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 96d366048fed6a70accf4ddb55c4c65ab27aa48f Author: Paul E. McKenney Date: Wed Apr 16 09:34:14 2025 -0700 ratelimit: Avoid atomic decrement under lock if already rate-limited Currently, if the lock is acquired, the code unconditionally does an atomic decrement on ->rs_n_left, even if that atomic operation is guaranteed to return a limit-rate verdict. A limit-rate verdict will in fact be the common case when something is spewing into a rate limit. This unconditional atomic operation incurs needless overhead and also raises the spectre of counter wrap. Therefore, do the atomic decrement only if there is some chance that rates won't be limited. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 123a1d97b2baf9eba9662a5f65660edc317e0bb8 Author: Paul E. McKenney Date: Mon Apr 14 15:43:47 2025 -0700 ratelimit: Avoid atomic decrement if already rate-limited Currently, if the lock could not be acquired, the code unconditionally does an atomic decrement on ->rs_n_left, even if that atomic operation is guaranteed to return a limit-rate verdict. This incurs needless overhead and also raises the spectre of counter wrap. Therefore, do the atomic decrement only if there is some chance that rates won't be limited. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 21ac6e5edac569df3938b136471c59c1d3d01f09 Author: Paul E. McKenney Date: Thu Apr 10 14:37:31 2025 -0700 ratelimit: Don't flush misses counter if RATELIMIT_MSG_ON_RELEASE Restore the previous semantics where the misses counter is unchanged if the RATELIMIT_MSG_ON_RELEASE flag is set. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit aa2cc356f8791438761efa0cb95fd48f3e2721c2 Author: Paul E. McKenney Date: Wed Apr 23 12:03:59 2025 -0700 ratelimit: Force re-initialization when rate-limiting re-enabled Currently, if rate limiting is disabled, ___ratelimit() does an immediate early return with no state changes. This can result in false-positive drops when re-enabling rate limiting. Therefore, mark the ratelimit_state structure "uninitialized" when rate limiting is disabled. [ paulmck: Apply Petr Mladek feedback. ] Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 084a990ded6337fb603f39b43b67ec68c2da0695 Author: Paul E. McKenney Date: Wed Apr 9 16:58:53 2025 -0700 ratelimit: Allow zero ->burst to disable ratelimiting If ->interval is zero, then rate-limiting will be disabled. Alternatively, if interval is greater than zero and ->burst is zero, then rate-limiting will be applied unconditionally. The point of this distinction is to handle current users that pass zero-initialized ratelimit_state structures to ___ratelimit(), and in such cases the ->lock field will be uninitialized. Acquiring ->lock in this case is clearly not a strategy to win. Therefore, make this classification be lockless. Note that although negative ->interval and ->burst happen to be treated as if they were zero, this is an accident of the current implementation. The semantics of negative values for these fields is subject to change without notice. Especially given that Bert Karwatzki determined that no current calls to ___ratelimit() ever have negative values for these fields. This commit replaces an earlier buggy versions. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Reported-by: Bert Karwatzki Reported-by: "Aithal, Srikanth" Closes: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Reported-by: Mark Brown Closes: https://lore.kernel.org/all/257c3b91-e30f-48be-9788-d27a4445a416@sirena.org.uk/ Signed-off-by: Paul E. McKenney Tested-by: "Aithal, Srikanth" Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit cf8cfa8a9978bfe77f2648a04824a46d58258e68 Author: Petr Mladek Date: Wed Apr 9 16:54:33 2025 -0700 ratelimit: Reduce ___ratelimit() false-positive rate limiting Retain the locked design, but check rate-limiting even when the lock could not be acquired. Link: https://lore.kernel.org/all/Z_VRo63o2UsVoxLG@pathway.suse.cz/ Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Petr Mladek Signed-off-by: Paul E. McKenney Cc: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit e64a348dc148af41cec266b2143305a2d0228ee7 Author: Paul E. McKenney Date: Tue Mar 25 15:32:54 2025 -0700 ratelimit: Avoid jiffies=0 special case The ___ratelimit() function special-cases the jiffies-counter value of zero as "uninitialized". This works well on 64-bit systems, where the jiffies counter is not going to return to zero for more than half a billion years on systems with HZ=1000, but similar 32-bit systems take less than 50 days to wrap the jiffies counter. And although the consequences of wrapping the jiffies counter seem to be limited to minor confusion on the duration of the rate-limiting interval that happens to end at time zero, it is almost no work to avoid this confusion. Therefore, introduce a RATELIMIT_INITIALIZED bit to the ratelimit_state structure's ->flags field so that a ->begin value of zero is no longer special. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit d343732ddbfa15db88a628bf3284eb088efbaaf7 Author: Paul E. McKenney Date: Fri Mar 14 11:26:59 2025 -0700 ratelimit: Count misses due to lock contention The ___ratelimit() function simply returns zero ("do ratelimiting") if the trylock fails, but does not adjust the ->missed field. This means that the resulting dropped printk()s are dropped silently, which could seriously confuse people trying to do console-log-based debugging. Therefore, increment the ->missed field upon trylock failure. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 78bf44de47b3cec72ee8ddc14161d5b3212f25e0 Author: Paul E. McKenney Date: Fri Mar 14 09:07:13 2025 -0700 ratelimit: Convert the ->missed field to atomic_t The ratelimit_state structure's ->missed field is sometimes incremented locklessly, and it would be good to avoid lost counts. This is also needed to count the number of misses due to trylock failure. Therefore, convert the ratelimit_state structure's ->missed field to atomic_t. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit c6f7f1b2c0ff46b9069a8fbc7d167c9ead66dfce Author: Paul E. McKenney Date: Mon Mar 17 20:28:40 2025 -0700 drm/amd/pm: Avoid open-coded use of ratelimit_state structure's internals The amdgpu_set_thermal_throttling_logging() function directly accesses the ratelimit_state structure's ->missed field, which works, but which also makes it more difficult to change this field. Therefore, make use of the ratelimit_state_reset_interval() function instead of directly accessing the ->missed field. Nevertheless, open-coded use of ->burst and ->interval is still permitted, for example, for runtime sysfs adjustment of these fields. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503180826.EiekA1MB-lkp@intel.com/ Signed-off-by: Paul E. McKenney Acked-by: Alex Deucher Reviewed-by: Petr Mladek Cc: Kenneth Feng Cc: "Christian König" Cc: Xinhui Pan Cc: David Airlie Cc: Simona Vetter Cc: Cc: commit 25228c60999f848fdeb291031858de49c115b64e Author: Paul E. McKenney Date: Thu Mar 13 16:24:36 2025 -0700 drm/i915: Avoid open-coded use of ratelimit_state structure's ->missed field The i915_oa_stream_destroy() function directly accesses the ratelimit_state structure's ->missed field, which works, but which also makes it more difficult to change this field. Therefore, make use of the ratelimit_state_get_miss() function instead of directly accessing the ->missed field. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Acked-by: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Simona Vetter Cc: Cc: commit 48e864ae865744d1451b1776a14acfa422e8a115 Author: Paul E. McKenney Date: Thu Mar 13 16:11:38 2025 -0700 random: Avoid open-coded use of ratelimit_state structure's ->missed field The _credit_init_bits() function directly accesses the ratelimit_state structure's ->missed field, which works, but which also makes it more difficult to change this field. Therefore, make use of the ratelimit_state_get_miss() and ratelimit_state_inc_miss() functions instead of directly accessing the ->missed field. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: "Theodore Ts'o" "Jason A. Donenfeld" commit 56a7b9f8b05981e929becb45a826558779bca6f6 Author: Paul E. McKenney Date: Thu Mar 13 15:31:50 2025 -0700 ratelimit: Create functions to handle ratelimit_state internals A number of ratelimit use cases do open-coded access to the ratelimit_state structure's ->missed field. This works, but is a bit messy and makes it more annoying to make changes to this field. Therefore, provide a ratelimit_state_inc_miss() function that increments the ->missed field, a ratelimit_state_get_miss() function that reads out the ->missed field, and a ratelimit_state_reset_miss() function that reads out that field, but that also resets its value to zero. These functions will replace client-code open-coded uses of ->missed. In addition, a new ratelimit_state_reset_interval() function encapsulates what was previously open-coded lock acquisition and direct field updates. [ paulmck: Apply kernel test robot feedback. ] Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Petr Mladek Cc: Andrew Morton Cc: Kuniyuki Iwashima Cc: Mateusz Guzik Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky commit 63a9a727d373fa5b8ce509eef50dbc45e0f745b9 Author: Salah Triki Date: Sun Apr 27 10:57:45 2025 +0100 wireless: purelifi: plfxlc: fix memory leak in plfxlc_usb_wreq_asyn() Add usb_free_urb() in the error path to prevent memory leak. Signed-off-by: Salah Triki Link: https://patch.msgid.link/aA3_maPlEJzO7wrL@pc [fix subject] Signed-off-by: Johannes Berg commit 22c64f37e1d4e757b0073a72f1439c2c3509c5cb Author: Mohan Kumar G Date: Mon May 5 20:58:36 2025 +0530 wifi: mac80211: Update MCS15 support in link_conf As per IEEE 802.11be-2024 - 9.4.2.321, EHT operation element contains MCS15 Disable subfield as the sixth bit, which is set when MCS15 support is not enabled. Get MCS15 support from EHT operation params and add it in link_conf so that driver can use this value to know if EHT-MCS 15 reception is enabled. Co-developed-by: Dhanavandhana Kannan Signed-off-by: Dhanavandhana Kannan Signed-off-by: Mohan Kumar G Link: https://patch.msgid.link/20250505152836.3266829-1-quic_mkumarg@quicinc.com [remove pointless !! for bool assignment] Signed-off-by: Johannes Berg commit 39c88e5b2f076ebfe8ad631a523fe497e87c1629 Author: Ting-Ying Li Date: Fri Apr 25 10:55:19 2025 +0200 wifi: brcmfmac: Fix structure size for WPA3 external SAE Add pmkid parameter in "brcmf_auth_req_status_le" structure to align the buffer size defined in firmware "wl_auth_req_status" structure. Signed-off-by: Ting-Ying Li [arend: adapted path to apply to per-vendor variant] [arend: added kerneldoc for new struct field] Tested-by: James Prestwood Signed-off-by: Arend van Spriel Link: https://patch.msgid.link/20250425085519.492267-5-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg commit 66f909308a7c05082919ff214a0bbe2a76aa0283 Author: Arend van Spriel Date: Fri Apr 25 10:55:18 2025 +0200 wifi: brcmfmac: cyw: support external SAE authentication in station mode Firmware has SME functionality but would like the userspace to handle SAE authentication. This patch adds support for such an external SAE authentication mechanism in station mode. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin [arend: rework patch for per-vendor framework] Tested-by: James Prestwood Signed-off-by: Arend van Spriel Link: https://patch.msgid.link/20250425085519.492267-4-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg commit 0b4b2e86a56fd1beafff90317594566f8ef718a7 Author: Arend van Spriel Date: Fri Apr 25 10:55:17 2025 +0200 wifi: brcmfmac: make per-vendor event map const The event map is not intended to change so make it const. Tested-by: James Prestwood Signed-off-by: Arend van Spriel Link: https://patch.msgid.link/20250425085519.492267-3-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg commit 42f7e5bf30fc2a51bdd03f464c6c33342b173d72 Author: Arend van Spriel Date: Fri Apr 25 10:55:16 2025 +0200 wifi: brcmfmac: support per-vendor cfg80211 callbacks and firmware events Adding two vendor operations that can be used to provide per-vendor cfg80211 callbacks and per-vendor handlers for firmware events. These two are often related to handling interactions from user-space through nl80211. Exporting brcmf_fweh_register() for registering the per-vendor event handler callbacks. Some other exports for get event name string and allowing use of brcmf_dbg() in per-vendor module. Tested-by: James Prestwood Signed-off-by: Arend van Spriel Link: https://patch.msgid.link/20250425085519.492267-2-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg commit 20440c7f9015a140e090c625d98b7fb086e7b63c Author: Aaron Kling Date: Sun Apr 13 14:35:35 2025 -0500 arm64: tegra: Wire up CEC to devkits This enables HDMI CEC and routes it to the HDMI port on all supported Tegra210, Tegra186, and Tegra194 devkits. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250413-tegra-cec-v4-4-b6337b66ccad@gmail.com Signed-off-by: Thierry Reding commit e0f863036a8d0a333112866646513015f1ebb6eb Author: Aaron Kling Date: Sun Apr 13 14:35:34 2025 -0500 arm64: tegra: Add CEC controller on Tegra210 The CEC controller found on Tegra210 can be used to control consumer devices using the HDMI CEC pin. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250413-tegra-cec-v4-3-b6337b66ccad@gmail.com Signed-off-by: Thierry Reding commit 34ff0bfda6f2960d8b897ef5c39af666a5fb63a0 Author: Aaron Kling Date: Sun Apr 13 14:35:33 2025 -0500 arm64: tegra: Add fallback CEC compatibles The tegra_cec driver only declares support up to Tegra210 and will not declare support for Tegra186 or Tegra194. Thus list a fallback compatible for these chips to tegra210-cec as they work as-is with the existing driver. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250413-tegra-cec-v4-2-b6337b66ccad@gmail.com Signed-off-by: Thierry Reding commit cf1b684a06170d253b47d6a5287821de976435bd Author: Benjamin Berg Date: Wed Apr 30 21:10:42 2025 +0200 wifi: mac80211: do not offer a mesh path if forwarding is disabled When processing a PREQ the code would always check whether we have a mesh path locally and reply accordingly. However, when forwarding is disabled then we should not reply with this information as we will not forward data packets down that path. Move the check for dot11MeshForwarding up in the function and skip the mesh path lookup in that case. In the else block, set forward to false so that the rest of the function becomes a no-op and the dot11MeshForwarding check does not need to be duplicated. This explains an effect observed in the Freifunk community where mesh forwarding is disabled. In that case a mesh with three STAs and only bad links in between them, individual STAs would occionally have indirect mpath entries. This should not have happened. Signed-off-by: Benjamin Berg Reviewed-by: Rouven Czerwinski Link: https://patch.msgid.link/20250430191042.3287004-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 0d4d6e699a4acff8d15f83185d269ab59c02107a Author: Aaron Kling Date: Sun Apr 13 14:35:32 2025 -0500 media: dt-bindings: Document Tegra186 and Tegra194 cec These are already used in device trees, so describe them here. As the driver only declares up through Tegra210, these must use a fallback compatible of tegra210-cec. Acked-by: Krzysztof Kozlowski Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250413-tegra-cec-v4-1-b6337b66ccad@gmail.com Signed-off-by: Thierry Reding commit 7cfd76f086c640119f4c5201115cf73488cabdcb Author: Francesco Dolcini Date: Thu Apr 10 08:39:19 2025 +0200 ARM: tegra: apalis-eval: Remove pcie-switch node The compatible "plx,pex8605" does not exist, there is no DT binding for it and there was never a driver matching this compatible, remove it. Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250410063919.11199-1-francesco@dolcini.it Signed-off-by: Thierry Reding commit dfb25484bd73c8590954ead6fd58a1587ba3bbc5 Author: Aaron Kling Date: Sun Apr 20 09:35:37 2025 -0500 arm64: tegra: Add uartd serial alias for Jetson TX1 module If a serial-tegra interface does not have an alias, the driver fails to probe with an error: serial-tegra 70006300.serial: failed to get alias id, errno -19 This prevents the bluetooth device from being accessible. Fixes: 6eba6471bbb7 ("arm64: tegra: Wire up Bluetooth on Jetson TX1 module") Signed-off-by: Aaron Kling Reviewed-by: Tomasz Maciej Nowak Link: https://lore.kernel.org/r/20250420-tx1-bt-v1-1-153cba105a4e@gmail.com Signed-off-by: Thierry Reding commit 9362175259281231e911aaeeebda833931aa5dfe Author: Aaron Kling Date: Sat Apr 19 22:30:31 2025 -0500 arm64: tegra: Bump #address-cells and #size-cells on Tegra186 This was done for Tegra194 and Tegra234 in 2838cfd, but Tegra186 was not part of that change. The same reasoning for that commit also applies to Tegra186, plus keeping the archs as close to each other as possible makes it easier to compare between them and support features concurrently. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250419-tegra186-host1x-addr-size-v1-1-a7493882248d@gmail.com Signed-off-by: Thierry Reding commit d1b72547610497ea4d0917214986cffb752a8710 Author: Aaron Kling Date: Sun Apr 20 17:25:17 2025 -0500 arm64: tegra: p2180: Explicitly enable GPU The gpu node originally was explicitly left disabled as it was expected for the bootloader to enable it. However, this is only done in u-boot. If u-boot is not in the boot chain, this will never be enabled. Other Tegra210 devices already explicitly enable the gpu, so make p2180 match. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250420-tx1-gpu-v1-1-d500de18e43e@gmail.com Signed-off-by: Thierry Reding commit 52dedbe81ee5e99b0d44321347fc85417837eea6 Author: Aaron Kling Date: Sat Apr 26 19:45:32 2025 -0500 arm64: tegra: p3310: Explicitly enable GPU The gpu node originally was explicitly left disabled as it was expected for the bootloader to enable it. However, this is only done in U-Boot. If U-Boot is not in the boot chain, this will never be enabled. Other Tegra186 devices already explicitly enable the GPU, so make p3310 match. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250426-tx2-gpu-v1-1-fa1c78dcdbdc@gmail.com Signed-off-by: Thierry Reding commit 39e1cbf57e3034bff1272b83b9e606a0bc2c3dc3 Author: Aaron Kling Date: Mon Apr 28 20:51:48 2025 -0500 arm64: tegra: Add DMA properties for Tegra186 and Tegra194 UARTs Adding the missing dmas and dma-names properties which are required for uart when using with the Tegra HSUART driver. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250428-tegra-serial-fixes-v1-2-4f47c5d85bf6@gmail.com Signed-off-by: Thierry Reding commit 4cd763297c2203c6ba587d7d4a9105f96597b998 Author: Aaron Kling Date: Mon Apr 28 20:51:47 2025 -0500 arm64: tegra: Drop remaining serial clock-names and reset-names The referenced commit only removed some of the names, missing all that weren't in use at the time. The commit removes the rest. Fixes: 71de0a054d0e ("arm64: tegra: Drop serial clock-names and reset-names") Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250428-tegra-serial-fixes-v1-1-4f47c5d85bf6@gmail.com Signed-off-by: Thierry Reding commit b84f1c0187653b2a91919624e2da0dab0b036a6f Author: Aaron Kling Date: Sun Apr 27 15:05:32 2025 -0500 arm64: tegra: Enable PWM fan on the Jetson TX2 Devkit This is based on the existing configuration of the Jetson TX2 NX devkit. The fan and thermal characteristics of the two devkits are similar, so using the same configuration. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250427-tx2-therm-v1-1-65ddb4314723@gmail.com Signed-off-by: Thierry Reding commit 01f11ffdfd909e870c3863af60875e8de328790a Author: Aaron Kling Date: Thu May 1 17:32:23 2025 -0500 arm64: tegra: Enable PWM fan on the Jetson TX1 Devkit This is based on 6f78a94, which enabled added the fan and thermal zones for the Jetson Nano Devkit. The fan and thermal characteristics of the two devkits are similar, so using the same configuration. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250501-tx1-therm-v2-1-abdb1922c001@gmail.com Signed-off-by: Thierry Reding commit b6e892ec333eaa3fb53f37232c34d3e6fa11a481 Author: Svyatoslav Ryhel Date: Sat May 3 13:29:50 2025 +0300 ARM: tegra: Add device-tree for ASUS Transformer Pad LTE TF300TL Add device-tree for ASUS Transformer Pad LTE TF300TL, which is NVIDIA Tegra30-based tablet device. Co-developed-by: Ion Agorria Signed-off-by: Ion Agorria Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250503102950.32744-4-clamor95@gmail.com Signed-off-by: Thierry Reding commit 236d4257572f4cd7167ac417701b887d138bed31 Author: Svyatoslav Ryhel Date: Sat May 3 13:29:49 2025 +0300 dt-bindings: arm: tegra: Add Asus Transformer Pad TF300TL Add a compatible for the Asus Transformer Pad TF300TL. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250503102950.32744-3-clamor95@gmail.com Signed-off-by: Thierry Reding commit cca0fe281687dccb032f84067776a1018ad46e0b Author: Svyatoslav Ryhel Date: Sat May 3 13:29:48 2025 +0300 dt-bindings: arm: tegra: Group Tegra30 based ASUS Transformers Group Tegra30 based ASUS Transformers under a common description. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250503102950.32744-2-clamor95@gmail.com Signed-off-by: Thierry Reding commit c4cd2aa6a374e0f7eee46f8263c2ffc7577f8c47 Author: Rob Herring (Arm) Date: Mon May 5 09:47:58 2025 -0500 dt-bindings: interrupt-controller: Convert nvidia,tegra20-ictlr to DT schema Convert the NVIDIA Legacy interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. All the possible compatibles were not documented, so add the ones in use. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250505144759.1291261-1-robh@kernel.org Signed-off-by: Thierry Reding commit 34c6ba89e1487181b4278e5c1b329327439ec715 Author: Akhil R Date: Tue May 6 15:29:36 2025 +0530 arm64: tegra: Add I2C aliases for Tegra234 Add aliases for all I2C nodes so that the I2C devnode numbers align with hardware bus number. Signed-off-by: Akhil R Link: https://lore.kernel.org/r/20250506095936.10687-4-akhilrajeev@nvidia.com Signed-off-by: Thierry Reding commit f1e33679367300a92b76cdec482adc430e5f79f7 Author: Vishwaroop A Date: Tue May 6 15:23:49 2025 +0000 arm64: tegra: Configure QSPI clocks and add DMA For Tegra234 devices, set QSPI0_2X_PM to 199.99 MHz and QSPI0_PM to 99.99 MHz using PLLC as the parent clock. These frequencies enable Quad IO reads at up to 99.99 MHz, the maximum achievable given PLL and clock divider limitations. Introduce IOMMU property which is needed for internal DMA transfers. Signed-off-by: Vishwaroop A Link: https://lore.kernel.org/r/20250506152350.3370291-2-va@nvidia.com Signed-off-by: Thierry Reding commit 781411f0ee0d93d624300472ec18e11ff9ca1f3d Author: Bartosz Golaszewski Date: Fri May 2 12:08:41 2025 +0200 pinctrl: at91: drop unneeded dependency on OF_GPIO This driver does not use any symbols from gpiolib-of.c. There's no reason for it to select OF_GPIO directly. This addresses a kismet issue reported by the build bot. Fixes: 8e86af65f39d ("pinctrl: at91: allow building the module with COMPILE_TEST=y") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505010447.kUlI61vt-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250502100841.113091-1-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 30d20fb1f84ad5c92706fe2c6cbb2d4cc293e671 Author: Namhyung Kim Date: Wed Apr 2 22:42:13 2025 -0700 perf trace: Fix leaks of 'struct thread' in set_filter_loop_pids() I've found some leaks from 'perf trace -a'. It seems there are more leaks but this is what I can find for now. Fixes: 082ab9a18e532864 ("perf trace: Filter out 'sshd' in the tracer ancestry in syswide tracing") Reviewed-by: Howard Chu Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250403054213.7021-1-namhyung@kernel.org [ split from a larget patch ] Signed-off-by: Arnaldo Carvalho de Melo commit d2c9d354802abfdb9585ec00ddcf9c50c7fb5e12 Author: Charan Pedumuru Date: Wed May 7 04:57:34 2025 +0000 dt-bindings: dma: nvidia,tegra20-apbdma: convert text based binding to json schema Update text binding to YAML. Changes during conversion: - Add a fallback for "nvidia,tegra30-apbdma" as it is compatible with the IP core on "nvidia,tegra20-apbdma". - Update examples and include appropriate file directives to resolve errors identified by `dt_binding_check` and `dtbs_check`. Signed-off-by: Charan Pedumuru Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250507-nvidea-dma-v4-2-6161a8de376f@gmail.com Signed-off-by: Thierry Reding commit bb3de7fa988c1b315ab8e87dc74e0d088284f142 Author: Namhyung Kim Date: Wed Apr 2 22:42:13 2025 -0700 perf trace: Fix leaks of 'struct thread' in fprintf_sys_enter() I've found some leaks from 'perf trace -a'. It seems there are more leaks but this is what I can find for now. Fixes: 70351029b55677eb ("perf thread: Add support for reading the e_machine type for a thread") Reviewed-by: Howard Chu Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250403054213.7021-1-namhyung@kernel.org [ split from a larget patch ] Signed-off-by: Arnaldo Carvalho de Melo commit c533c0a2acb1194d3353d46377ca1206305465bc Author: Charan Pedumuru Date: Wed May 7 04:57:33 2025 +0000 ARM: tegra: Rename the apbdma nodename to match with common dma-controller binding Rename the apbdma nodename from "dma@" to "dma-controller@" to align with linux common dma-controller binding. Signed-off-by: Charan Pedumuru Reviewed-by: Krzysztof Kozlowski Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20250507-nvidea-dma-v4-1-6161a8de376f@gmail.com [treding@nvidia.com: adjust subject prefix for consistency] Signed-off-by: Thierry Reding commit 881097c0549f3818f5aa31af8ccb49213bd99bed Author: Frederic Weisbecker Date: Thu Apr 24 18:11:28 2025 +0200 perf: Fix confusing aux iteration While an event tears down all links to it as an aux, the iteration happens on the event's group leader instead of the group itself. If the event is a group leader, it has no effect because the event is also its own group leader. But otherwise there would be a risk to detach all the siblings events from the wrong group leader. It just happens to work because each sibling's aux link is tested against the right event before proceeding. Also the ctx lock is the same for the events and their group leader so the iteration is safe. Yet the iteration is confusing. Clarify the actual intent. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250424161128.29176-5-frederic@kernel.org commit f400565faa50737ac1d550d2c75128c0dad75765 Author: Frederic Weisbecker Date: Thu Apr 24 18:11:27 2025 +0200 perf: Remove too early and redundant CPU hotplug handling The CPU hotplug handlers are called twice: at prepare and online stage. Their role is to: 1) Enable/disable a CPU context. This is irrelevant and even buggy at the prepare stage because the CPU is still offline. On early secondary CPU up, creating an event attached to that CPU might silently fail because the CPU context is observed as online but the context installation's IPI failure is ignored. 2) Update the scope cpumasks and re-migrate the events accordingly in the CPU down case. This is irrelevant at the prepare stage. 3) Remove the events attached to the context of the offlining CPU. It even uses an (unnecessary) IPI for it. This is also irrelevant at the prepare stage. Also none of the *_PREPARE and *_STARTING architecture perf related CPU hotplug callbacks rely on CPUHP_PERF_PREPARE. CPUHP_AP_PERF_ONLINE is enough and the right place to perform the work. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250424161128.29176-4-frederic@kernel.org commit d20eb2d5fe8f8818abcfdadf5ac5109938f1318e Author: Frederic Weisbecker Date: Mon Apr 28 13:11:47 2025 +0200 perf: Fix irq work dereferencing garbage The following commit: da916e96e2de ("perf: Make perf_pmu_unregister() useable") has introduced two significant event's parent lifecycle changes: 1) An event that has exited now has EVENT_TOMBSTONE as a parent. This can result in a situation where the delayed wakeup irq_work can accidentally dereference EVENT_TOMBSTONE on: CPU 0 CPU 1 ----- ----- __schedule() local_irq_disable() rq_lock() perf_event_overflow() irq_work_queue(&child->pending_irq) perf_event_task_sched_out() raw_spin_lock(&ctx->lock) ctx_sched_out() ctx->is_active = 0 event_sched_out(child) raw_spin_unlock(&ctx->lock) perf_event_release_kernel(parent) perf_remove_from_context(child) raw_spin_lock_irq(&ctx->lock) // Sees !ctx->is_active // Removes from context inline __perf_remove_from_context(child) perf_child_detach(child) event->parent = EVENT_TOMBSTONE raw_spin_rq_unlock_irq(rq); perf_pending_irq() perf_event_wakeup(child) ring_buffer_wakeup(child) rcu_dereference(child->parent->rb) <--- CRASH This also concerns the call to kill_fasync() on parent->fasync. 2) The final parent reference count decrement can now happen before the the final child reference count decrement. ie: the parent can now be freed before its child. On PREEMPT_RT, this can result in a situation where the delayed wakeup irq_work can accidentally dereference a freed parent: CPU 0 CPU 1 CPU 2 ----- ----- ------ perf_pmu_unregister() pmu_detach_events() pmu_get_event() atomic_long_inc_not_zero(&child->refcount) perf_event_overflow() irq_work_queue(&child->pending_irq); irq_work_run() wake_irq_workd() preempt_schedule_irq() =========> SWITCH to workd irq_work_run_list() perf_pending_irq() perf_event_wakeup(child) ring_buffer_wakeup(child) event = child->parent perf_event_release_kernel(parent) // Not last ref, PMU holds it put_event(child) // Last ref put_event(parent) free_event() call_rcu(...) rcu_core() free_event_rcu() rcu_dereference(event->rb) <--- CRASH This also concerns the call to kill_fasync() on parent->fasync. The "easy" solution to 1) is to check that event->parent is not EVENT_TOMBSTONE on perf_event_wakeup() (including both ring buffer and fasync uses). The "easy" solution to 2) is to turn perf_event_wakeup() to wholefully run under rcu_read_lock(). However because of 2), sanity would prescribe to make event::parent an __rcu pointer and annotate each and every users to prove they are reliable. Propose an alternate solution and restore the stable pointer to the parent until all its children have called _free_event() themselves to avoid any further accident. Also revert the EVENT_TOMBSTONE design that is mostly here to determine which caller of perf_event_exit_event() must perform the refcount decrement on a child event matching the increment in inherit_event(). Arrange instead for checking the attach state of an event prior to its removal and decrement the refcount of the child accordingly. Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable") Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) commit 22d38babb3adcb1227ecfb91d9423008a46548fe Author: Frederic Weisbecker Date: Thu Apr 24 18:11:25 2025 +0200 perf: Fix failing inherit_event() doing extra refcount decrement on parent When inherit_event() fails after the child allocation but before the parent refcount has been incremented, calling put_event() wrongly decrements the reference to the parent, risking to free it too early. Also pmu_get_event() can't be holding a reference to the child concurrently at this point since it is under pmus_srcu critical section. Fix it with restoring the deleted free_event() function and call it on the failing child in order to free it directly under the verified assumption that its refcount is only 1. The refcount to the parent is then voluntarily omitted. Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable") Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250424161128.29176-2-frederic@kernel.org commit b69d4413aa1961930fbf9ffad8376d577378daf9 Author: Martin KaFai Lau Date: Wed May 7 13:32:32 2025 -0700 bpftool: Fix cgroup command to only show cgroup bpf programs The netkit program is not a cgroup bpf program and should not be shown in the output of the "bpftool cgroup show" command. However, if the netkit device happens to have ifindex 3, the "bpftool cgroup show" command will output the netkit bpf program as well: > ip -d link show dev nk1 3: nk1@if2: ... link/ether ... netkit mode ... > bpftool net show tc: nk1(3) netkit/peer tw_ns_nk2phy prog_id 469447 > bpftool cgroup show /sys/fs/cgroup/... ID AttachType AttachFlags Name ... ... ... 469447 netkit_peer tw_ns_nk2phy The reason is that the target_fd (which is the cgroup_fd here) and the target_ifindex are in a union in the uapi/linux/bpf.h. The bpftool iterates all values in "enum bpf_attach_type" which includes non cgroup attach types like netkit. The cgroup_fd is usually 3 here, so the bug is triggered when the netkit ifindex just happens to be 3 as well. The bpftool's cgroup.c already has a list of cgroup-only attach type defined in "cgroup_attach_types[]". This patch fixes it by iterating over "cgroup_attach_types[]" instead of "__MAX_BPF_ATTACH_TYPE". Cc: Quentin Monnet Reported-by: Takshak Chahande Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20250507203232.1420762-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 01475aedfdfa33a5ee3219079426f5743367c624 Author: Nam Cao Date: Mon Apr 28 21:34:45 2025 +0200 futex: Fix outdated comment in struct restart_block Since commit 2070887fdeac ("futex: fix restart in wait_requeue_pi"), futex_wait_requeue_pi() no longer uses restart_block. Update the comment accordingly. Signed-off-by: Nam Cao Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250428193445.4571-1-namcao@linutronix.de commit 596a977b34a722c00245801a5774aa79cec4e81d Author: Heiko Stuebner Date: Sat May 3 22:25:31 2025 +0200 clk: rockchip: rk3036: mark ddrphy as critical The ddrphy is supplied by the dpll, but due to the limited number of PLLs on the rk3036, the dpll also is used for other periperhals, like the GPU. So it happened, when the Lima driver turned off the gpu clock, this in turn also disabled the dpll and thus the ram. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503202532.992033-4-heiko@sntech.de commit 897adaf536ab01f130ce0b53a635a592733c0f24 Author: Heiko Stuebner Date: Sat May 3 22:25:30 2025 +0200 clk: rockchip: rk3036: fix implementation of usb480m clock mux Contrary to how it is implemented right now, this mux is controllable via a bit in CRU_MUSC_CON (same bit as on rk3128 even) and allows switching between xin24m and the 480m output of the usb2phy. So drop the hard-coded fixed-factor clock and implement the correct mux instead. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503202532.992033-3-heiko@sntech.de commit 6e06b641ca96c232e0b13f9b44b118742986bcd5 Author: Heiko Stuebner Date: Sat May 3 22:25:29 2025 +0200 dt-bindings: clock: rk3036: add SCLK_USB480M clock-id Contrary to how it is implemented right now, the usb480m clock is a controllable mux that can switch between the 24MHz oscillator and the clock output of the usb2phy. Add the needed clock-id to allow setting this mux from DT. Acked-by: Conor Dooley Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503202532.992033-2-heiko@sntech.de commit 73ed6faed58e5611abfb54c2f703eec091781d63 Author: Heikki Huttu Date: Thu May 8 19:44:30 2025 +0300 comedi: drivers: adl_pci9118.c: Edit file so that checkpatch.pl has 0 typo errors Fix errors produced by checkpath.pl about typos. Signed-off-by: Heikki Huttu Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/aBzfbvF6YdaYDDYk@Lappari.v6.elisa-laajakaista.fi Signed-off-by: Greg Kroah-Hartman commit b280613d480aa170e51029d5582bb4b666982b7c Author: Wolfram Sang Date: Thu May 8 09:43:14 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-eb: Enable USB host port Can be used via the USB connector J20. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250508074311.20343-6-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit abbf127283aceeda6c16d2243d6683e3dc3509d6 Author: Wolfram Sang Date: Thu May 8 09:43:13 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-db: Add pinmux for the CPLD The CPLD has no dedicated driver, so apply the pinmux settings with the pinmux driver instead. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250508074311.20343-5-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 8ffec7d62c6956199f442dac3b2d5d02231c3977 Author: Geert Uytterhoeven Date: Wed May 7 15:31:55 2025 +0200 arm64: dts: renesas: white-hawk-single: Improve Ethernet TSN description - Add the missing "ethernet3" alias for the Ethernet TSN port, so U-Boot will fill its local-mac-address property based on the "eth3addr" environment variable (if set), avoiding a random MAC address being assigned by the OS, - Rename the numerical Ethernet PHY label to "tsn0_phy", to avoid future conflicts, and for consistency with the "avbN_phy" labels. Fixes: 3d8e475bd7a724a9 ("arm64: dts: renesas: white-hawk-single: Wire-up Ethernet TSN") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/367f10a18aa196ff1c96734dd9bd5634b312c421.1746624368.git.geert+renesas@glider.be commit 218a67626bf497f77d285ed180199ea6791d5537 Author: Wolfram Sang Date: Fri Apr 25 12:01:31 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-db: Enable USB device port Can be used via the microUSB connector CN9. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250425100129.11942-5-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 0d2da0943f289f3264bb10f39cd44241949c0a23 Author: Wolfram Sang Date: Thu Apr 24 12:27:30 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-eb: Describe 9-pin D-sub serial port A simple CTS/RTS capable UART on a good old D-sub connector. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424102805.22803-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit a510da373ab48608bb7d88b96433898a50afed9b Author: Krzysztof Kozlowski Date: Thu Apr 24 10:47:48 2025 +0200 arm64: dts: renesas: beacon-renesom: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: r8a774a1-beacon-rzg2m-kit.dtb: bcrmf@1: $nodename:0: 'bcrmf@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424084748.105255-1-krzysztof.kozlowski@linaro.org Signed-off-by: Geert Uytterhoeven commit e00ad79244eff5181a117214f2b54b478df9b3d7 Author: Biju Das Date: Thu Apr 24 06:40:46 2025 +0100 arm64: dts: renesas: rzg2l-smarc: Enable GPT on carrier board The GPT4 IOs are available on the carrier board's PMOD0 connector (J1). Enable the GPT on the carrier board by adding the GPT pinmux and node on the carrier board dtsi file. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424054050.28310-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f2aa064b21e89a06908557b6aa72f493a2b33915 Author: Biju Das Date: Thu Apr 24 06:40:45 2025 +0100 arm64: dts: renesas: r9a07g054: Add GPT support Add GPT support by adding pwm node to RZ/V2L SoC DTSI. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424054050.28310-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 672eebe1cf665a277a8e18b00aa1ffafbef57768 Author: Biju Das Date: Thu Apr 24 06:40:44 2025 +0100 arm64: dts: renesas: r9a07g044: Add GPT support Add GPT support by adding pwm node to RZ/G2L SoC DTSI. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424054050.28310-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ca764d5321a2cee7c4901b981bb0be06d8d9a9d7 Author: Kuninori Morimoto Date: Thu Apr 17 23:23:36 2025 +0000 arm64: dts: renesas: sparrow-hawk: Add MSIOF Sound support Sparrow Hawk has Headset (CONN3) AUX_IN (CONN4) for Sound input/output which is using MSIOF. Support it. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/87plha2wzr.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/874ixxcg3w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 06534edc0d366b9904c221de77068616d7b5af32 Author: Wolfram Sang Date: Mon Apr 14 12:01:13 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-eb: Add GMAC1 port This port bypasses the switch and is directly connected to the GMAC. Co-developed-by: Niklas Söderlund Signed-off-by: Niklas Söderlund Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250414100206.7185-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 28548f3f7994dd214ad4f4ba5763cd06333404a0 Author: Biju Das Date: Thu Apr 24 09:13:56 2025 +0100 clk: renesas: r9a09g047: Add XSPI clock/reset Add XSPI clock and reset entries. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424081400.135028-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 38a7eb91195befc30e31bbc09a89e1f4e4a25fbf Author: Biju Das Date: Thu Apr 24 09:13:55 2025 +0100 clk: renesas: r9a09g047: Add support for xspi mux and divider The mux smux2_xspi_clk{0,1} used for selecting spi and spix2 clocks and pllcm33_xspi divider to select different clock rates. Add support for both. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424081400.135028-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d4da08ea37d2c84aedcf1ce9554938aabfb0714f Merge: aff664cc8cbc5c f21923f3f410f8 Author: Geert Uytterhoeven Date: Thu May 8 20:17:14 2025 +0200 Merge tag 'renesas-r9a09g047-dt-binding-defs-tag3' into renesas-clk-for-v6.16 Renesas RZ/G3E XSPI and GBETH Core DT Binding Definitions XSPI and Gigabit Ethernet PTP reference core clock DT binding definitions for the Renesas RZ/G3E (R9A09G047) SoC, shared by driver and DT source files. commit f21923f3f410f84528b5e7bdcbe4afdc6f07010c Author: Biju Das Date: Thu Apr 24 09:13:54 2025 +0100 dt-bindings: clock: renesas,r9a09g047-cpg: Add XSPI and GBETH PTP core clocks Add definitions for XSPI core clock and Gigabit Ethernet PTP reference core clocks in the R9A09G047 CPG DT bindings header file. The clk_spi is modelled as a fixed divider clock with parent clk_spix2 and factor two as both parent and child share same gating bit. Signed-off-by: Biju Das Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424081400.135028-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 306d2f5ddaa765f04ffb54fc9437a6318f904b53 Author: Yao Zi Date: Tue May 6 09:22:04 2025 +0000 clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region These clocks locate in VO and VPU GRF, serving for SD/SDIO controller tuning purpose. Add their definitions and register them in driver if corresponding GRF is available. GRFs are looked up by compatible to simplify devicetree binding. Signed-off-by: Yao Zi Link: https://lore.kernel.org/r/20250506092206.46143-4-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 621ba4d9f6db560a7406fd732af1b495ff5aa103 Author: Yao Zi Date: Tue May 6 09:22:03 2025 +0000 clk: rockchip: Support MMC clocks in GRF region Registers of MMC drive/sample clocks in Rockchip RV1106 and RK3528 locate in GRF regions. Adjust MMC clock code to support register operations through regmap. Signed-off-by: Yao Zi Link: https://lore.kernel.org/r/20250506092206.46143-3-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 58883d58aaa0a945afa9297a86b7a9150e9889ad Merge: 9199ec29f0977e 8a023e86f3d999 Author: Heiko Stuebner Date: Thu May 8 20:02:11 2025 +0200 Merge branch 'v6.16-shared/clkids' into v6.16-clk/next commit 1a3f6980889df3fc90ad3e4a525061d2c138adba Merge: 2940954c1ac527 d9669e33c8fadb Author: Palmer Dabbelt Date: Thu May 8 11:01:47 2025 -0700 Merge patch series "riscv: Add vendor extensions support for SiFive" Cyan Yang says: This patch set adds four vendor-specific ISA extensions from SiFive: "xsfvqmaccdod", "xsfvqmaccqoq", "xsfvfnrclipxfqf", and "xsfvfwmaccqqq". Additionally, a new hwprobe key, RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0, has been added to query which SiFive vendor extensions are supported on the current platform. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-1-cyan.yang@sifive.com * b4-shazam-merge: riscv: hwprobe: Add SiFive xsfvfwmaccqqq vendor extension riscv: hwprobe: Document SiFive xsfvfwmaccqqq vendor extension riscv: Add SiFive xsfvfwmaccqqq vendor extension dt-bindings: riscv: Add xsfvfwmaccqqq ISA extension description riscv: hwprobe: Add SiFive xsfvfnrclipxfqf vendor extension riscv: hwprobe: Document SiFive xsfvfnrclipxfqf vendor extension riscv: Add SiFive xsfvfnrclipxfqf vendor extension dt-bindings: riscv: Add xsfvfnrclipxfqf ISA extension description riscv: hwprobe: Add SiFive vendor extension support and probe for xsfqmaccdod and xsfqmaccqoq riscv: hwprobe: Document SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions dt-bindings: riscv: Add xsfvqmaccdod and xsfvqmaccqoq ISA extension description Signed-off-by: Palmer Dabbelt commit d9669e33c8fadb5f81287f4961f01e40c0a11c23 Author: Cyan Yang Date: Fri Apr 18 13:32:39 2025 +0800 riscv: hwprobe: Add SiFive xsfvfwmaccqqq vendor extension Add hwprobe for SiFive "xsfvfwmaccqqq" vendor extension. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-13-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit a3ca43dc527159aa6f55058a9fa506fa720d6514 Author: Cyan Yang Date: Fri Apr 18 13:32:38 2025 +0800 riscv: hwprobe: Document SiFive xsfvfwmaccqqq vendor extension Document the support for matrix multiply accumulate instruction from SiFive using RISCV_HWPROBE_VENDOR_EXT_XSFVFWMACCQQQ. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-12-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 34e9b16b4b888988730ffab9a9039cfcf305942e Author: Cyan Yang Date: Fri Apr 18 13:32:37 2025 +0800 riscv: Add SiFive xsfvfwmaccqqq vendor extension Add SiFive vendor extension "xsfvfwmaccqqq" support to the kernel. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-11-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit d5ca02b25f5dbe44a25afe35cd75d49f1f0b9763 Author: Cyan Yang Date: Fri Apr 18 13:32:36 2025 +0800 dt-bindings: riscv: Add xsfvfwmaccqqq ISA extension description Add "xsfvfwmaccqqq" ISA extension which is provided by SiFive for matrix multiply accumulate instructions support. Signed-off-by: Cyan Yang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250418053239.4351-10-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 1d91224394c92245942c402245370c4abb0fcbfb Author: Cyan Yang Date: Fri Apr 18 13:32:35 2025 +0800 riscv: hwprobe: Add SiFive xsfvfnrclipxfqf vendor extension Add hwprobe for SiFive "xsfvfnrclipxfqf" vendor extension. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-9-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 659d664f7df8e5c094e260434bebd0efaa547e49 Author: Cyan Yang Date: Fri Apr 18 13:32:34 2025 +0800 riscv: hwprobe: Document SiFive xsfvfnrclipxfqf vendor extension Document the support for SiFive vendor extensions for FP32-to-int8 Ranged Clip Instructions using RISCV_HWPROBE_VENDOR_EXT_XSFVFNRCLIPXFQF. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-8-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit e84fffe21b7498ff50aed3a96773993d04cfaed0 Author: Cyan Yang Date: Fri Apr 18 13:32:33 2025 +0800 riscv: Add SiFive xsfvfnrclipxfqf vendor extension Add SiFive vendor extension "xsfvfnrclipxfqf" support to the kernel. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-7-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit a5a15e07cbb900b59fbdb927189d24d1d01ad2e7 Author: Cyan Yang Date: Fri Apr 18 13:32:32 2025 +0800 dt-bindings: riscv: Add xsfvfnrclipxfqf ISA extension description Add "xsfvfnrclipxfqf" ISA extension which is provided by SiFive for FP32-to-int8 ranged clip instructions support. Signed-off-by: Cyan Yang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250418053239.4351-6-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 1a6274f035346e76835d46096136dd3e6cca9575 Author: Cyan Yang Date: Fri Apr 18 13:32:31 2025 +0800 riscv: hwprobe: Add SiFive vendor extension support and probe for xsfqmaccdod and xsfqmaccqoq Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0" which allows userspace to probe for the new vendor extensions from SiFive. Also, add new hwprobe for SiFive "xsfvqmaccdod" and "xsfvqmaccqoq" vendor extensions. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-5-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit e8fd215ed0eb814486d50b4835007cbc50b2c2b7 Author: Cyan Yang Date: Fri Apr 18 13:32:30 2025 +0800 riscv: hwprobe: Document SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions Document the support for sifive vendor extensions using the key RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 and two vendor extensions for SiFive Int8 Matrix Multiplication Instructions using RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCDOD and RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCQOQ. Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-4-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 2d147d77ae6e96c1c349a6ada0eac14111c3384a Author: Cyan Yang Date: Fri Apr 18 13:32:29 2025 +0800 riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions Add SiFive vendor extension support to the kernel with the target of "xsfvqmaccdod" and "xsfvqmaccqoq". Signed-off-by: Cyan Yang Link: https://lore.kernel.org/r/20250418053239.4351-3-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 0f733b5be9658b75496127e23e1f7edfc45bb423 Author: Cyan Yang Date: Fri Apr 18 13:32:28 2025 +0800 dt-bindings: riscv: Add xsfvqmaccdod and xsfvqmaccqoq ISA extension description Add "xsfvqmaccdod" and "xsfvqmaccqoq" ISA extensions which are provided by SiFive for int8 matrix multiplication instructions support. Signed-off-by: Cyan Yang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250418053239.4351-2-cyan.yang@sifive.com Signed-off-by: Palmer Dabbelt commit 8a023e86f3d999007f2687952afe78ef34a6aa91 Author: Yao Zi Date: Tue May 6 09:22:02 2025 +0000 dt-bindings: clock: Add GRF clock definition for RK3528 These clocks are for SD/SDIO tuning purpose and come with registers in GRF syscon. Signed-off-by: Yao Zi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250506092206.46143-2-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit aad823aa3a7d675a8d0de478a04307f63e3725db Author: Ingo Molnar Date: Wed May 7 19:53:37 2025 +0200 treewide, timers: Rename destroy_timer_on_stack() as timer_destroy_on_stack() Move this API to the canonical timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-10-mingo@kernel.org commit 367ed4e35734d6e7bce1dbca426a5bf150d76905 Author: Ingo Molnar Date: Wed May 7 19:53:36 2025 +0200 treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try() Move this API to the canonical timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-9-mingo@kernel.org commit 751e6a394c2ecd08825d5ba527478e171b87144e Author: Ingo Molnar Date: Wed May 7 19:53:35 2025 +0200 timers: Rename init_timers() as timers_init() Move this API to the canonical timers_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-8-mingo@kernel.org commit 220beffd36c26ac68e1c646f91b7ddf4f39039e6 Author: Ingo Molnar Date: Wed May 7 19:53:34 2025 +0200 timers: Rename NEXT_TIMER_MAX_DELTA as TIMER_NEXT_MAX_DELTA Move this macro to the canonical TIMER_* namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-7-mingo@kernel.org commit 9a716ac6eaaa73599921fa081c99b67bef589171 Author: Ingo Molnar Date: Wed May 7 19:53:33 2025 +0200 timers: Rename __init_timer_on_stack() as __timer_init_on_stack() Move this API to the canonical __timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-6-mingo@kernel.org commit 9505215b6b3233d38c5ee65cfd47b6a5a36adab9 Author: Ingo Molnar Date: Wed May 7 19:53:32 2025 +0200 timers: Rename __init_timer() as __timer_init() Move this API to the canonical __timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-5-mingo@kernel.org commit 7879d10de3318af0b7893d1efc9d7654cd4ac1a6 Author: Ingo Molnar Date: Wed May 7 19:53:31 2025 +0200 timers: Rename init_timer_on_stack_key() as timer_init_key_on_stack() Move this API to the canonical timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-4-mingo@kernel.org commit e86e43907f945e7f2e48d1c5c9105801ca2b11b7 Author: Ingo Molnar Date: Wed May 7 19:53:30 2025 +0200 timers: Rename init_timer_key() as timer_init_key() Move this API to the canonical timer_*() namespace. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507175338.672442-3-mingo@kernel.org commit fbea35a661ed100cee2f3bab8015fb0155508106 Author: Chukun Pan Date: Sat Mar 8 17:30:08 2025 +0800 arm64: dts: rockchip: Move rk3568 PCIe3 MSI to use GIC ITS Following commit b956c9de9175 ("arm64: dts: rockchip: rk356x: Move PCIe MSI to use GIC ITS instead of MBI"), change the PCIe3 controller's MSI on rk3568 to use ITS, so that all MSI-X can work properly. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250308093008.568437-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 2940954c1ac527386e5203d4be8263d704491fbe Author: Xi Ruoyao Date: Mon Feb 24 19:20:40 2025 +0800 riscv: vDSO: Remove --hash-style=both When RISC-V borned, DT_GNU_HASH had already became the de-facto standard so DT_HASH is just wasting storage space. Remove the explicit --hash-style=both setting and rely on the distro toolchain default, which is most likely "gnu" (i.e. generating only DT_GNU_HASH, no DT_HASH). Following the logic of commit 48f6430505c0 ("arm64/vdso: Remove --hash-style=sysv"). Signed-off-by: Xi Ruoyao Link: https://lore.kernel.org/r/20250224112042.60282-2-xry111@xry111.site Signed-off-by: Palmer Dabbelt commit 8eca9e979a1efbcc3d090f6eb3f4da621e7c87e0 Author: Peter Robinson Date: Tue May 6 23:25:28 2025 +0100 arm64: dts: rockchip: Update eMMC for NanoPi R5 series Add the 3.3v and 1.8v regulators that are connected to the eMMC on the R5 series devices, as well as adding the eMMC data strobe, and enable eMMC HS200 mode as the Foresee FEMDNN0xxG-A3A55 modules support it. Fixes: c8ec73b05a95d ("arm64: dts: rockchip: create common dtsi for NanoPi R5 series") Signed-off-by: Peter Robinson Reviewed-by: Diederik de Haas Link: https://lore.kernel.org/r/20250506222531.625157-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit a1d8a8309367565dc658ae31dcc256beb9f0423b Merge: 9357e329cdeb6f f1680d9081e161 Author: Thomas Gleixner Date: Thu May 8 19:17:16 2025 +0200 Merge branch 'irq/platform-msi' into irq/msi Pull in the platform MSI/GIC changes which are seperate for the PCI endpoint driver updates. commit 259aaf03d7a03fe3c2f909deaeea7ce84ed47880 Merge: 85f79dece58373 f6bff7827a48e5 Author: Palmer Dabbelt Date: Thu May 8 10:01:02 2025 -0700 Merge patch series "riscv: uaccess: optimisations" Cyril Bur says: This series tries to optimize riscv uaccess by allowing the use of user_access_begin() and user_access_end() which permits grouping user accesses and avoiding the CSR write penalty for each access. The error path can also be optimised using asm goto which patches 3 and 4 achieve. This will speed up jumping to labels by avoiding the need of an intermediary error type variable within the uaccess macros I did read the discussion this series generated. It isn't clear to me which direction to take the patches, if any. * b4-shazam-merge: riscv: uaccess: use 'asm_goto_output' for get_user() riscv: uaccess: use 'asm goto' for put_user() riscv: uaccess: use input constraints for ptr of __put_user() riscv: implement user_access_begin() and families riscv: save the SR_SUM status over switches Link: https://lore.kernel.org/r/20250410070526.3160847-1-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit f6bff7827a48e59cff1ef98aae72452d65174e0c Author: Jisheng Zhang Date: Thu Apr 10 07:05:26 2025 +0000 riscv: uaccess: use 'asm_goto_output' for get_user() With 'asm goto' we don't need to test the error etc, the exception just jumps to the error handling directly. Unlike put_user(), get_user() must work around GCC bugs [1] when using output clobbers in an asm goto statement. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 # 1 Signed-off-by: Jisheng Zhang [Cyril Bur: Rewritten commit message] Signed-off-by: Cyril Bur Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250410070526.3160847-6-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit cdf647e817143c9762c5bdf724ca2821a171f011 Author: Jisheng Zhang Date: Thu Apr 10 07:05:25 2025 +0000 riscv: uaccess: use 'asm goto' for put_user() With 'asm goto' we don't need to test the error etc, the exception just jumps to the error handling directly. Because there are no output clobbers which could trigger gcc bugs [1] the use of asm_goto_output() macro is not necessary here. Not using asm_goto_output() is desirable as the generated output asm will be cleaner. Use of the volatile keyword is redundant as per gcc 14.2.0 manual section 6.48.2.7 Goto Labels: > Also note that an asm goto statement is always implicitly considered volatile. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 # 1 Signed-off-by: Jisheng Zhang [Cyril Bur: Rewritten commit message] Signed-off-by: Cyril Bur Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250410070526.3160847-5-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit 62135bf660b2c3887e22f33d3adbefedb4dc9c7a Author: Jisheng Zhang Date: Thu Apr 10 07:05:24 2025 +0000 riscv: uaccess: use input constraints for ptr of __put_user() Putting ptr in the inputs as opposed to output may seem incorrect but this is done for a few reasons: - Not having it in the output permits the use of asm goto in a subsequent patch. There are bugs in gcc [1] which would otherwise prevent it. - Since the output memory is userspace there isn't any real benefit from telling the compiler about the memory clobber. - x86, arm and powerpc all use this technique. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 # 1 Signed-off-by: Jisheng Zhang [Cyril Bur: Rewritten commit message] Signed-off-by: Cyril Bur Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250410070526.3160847-4-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit 19500c6dbc5c348564a6513c801ab0889300565a Author: Jisheng Zhang Date: Thu Apr 10 07:05:23 2025 +0000 riscv: implement user_access_begin() and families Currently, when a function like strncpy_from_user() is called, the userspace access protection is disabled and enabled for every word read. By implementing user_access_begin() and families, the protection is disabled at the beginning of the copy and enabled at the end. The __inttype macro is borrowed from x86 implementation. Signed-off-by: Jisheng Zhang Signed-off-by: Cyril Bur Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250410070526.3160847-3-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit 788aa64c01f1262310b4c1fb827a36df170d86ea Author: Ben Dooks Date: Thu Apr 10 07:05:22 2025 +0000 riscv: save the SR_SUM status over switches When threads/tasks are switched we need to ensure the old execution's SR_SUM state is saved and the new thread has the old SR_SUM state restored. The issue was seen under heavy load especially with the syz-stress tool running, with crashes as follows in schedule_tail: Unable to handle kernel access to user memory without uaccess routines at virtual address 000000002749f0d0 Oops [#1] Modules linked in: CPU: 1 PID: 4875 Comm: syz-executor.0 Not tainted 5.12.0-rc2-syzkaller-00467-g0d7588ab9ef9 #0 Hardware name: riscv-virtio,qemu (DT) epc : schedule_tail+0x72/0xb2 kernel/sched/core.c:4264 ra : task_pid_vnr include/linux/sched.h:1421 [inline] ra : schedule_tail+0x70/0xb2 kernel/sched/core.c:4264 epc : ffffffe00008c8b0 ra : ffffffe00008c8ae sp : ffffffe025d17ec0 gp : ffffffe005d25378 tp : ffffffe00f0d0000 t0 : 0000000000000000 t1 : 0000000000000001 t2 : 00000000000f4240 s0 : ffffffe025d17ee0 s1 : 000000002749f0d0 a0 : 000000000000002a a1 : 0000000000000003 a2 : 1ffffffc0cfac500 a3 : ffffffe0000c80cc a4 : 5ae9db91c19bbe00 a5 : 0000000000000000 a6 : 0000000000f00000 a7 : ffffffe000082eba s2 : 0000000000040000 s3 : ffffffe00eef96c0 s4 : ffffffe022c77fe0 s5 : 0000000000004000 s6 : ffffffe067d74e00 s7 : ffffffe067d74850 s8 : ffffffe067d73e18 s9 : ffffffe067d74e00 s10: ffffffe00eef96e8 s11: 000000ae6cdf8368 t3 : 5ae9db91c19bbe00 t4 : ffffffc4043cafb2 t5 : ffffffc4043cafba t6 : 0000000000040000 status: 0000000000000120 badaddr: 000000002749f0d0 cause: 000000000000000f Call Trace: [] schedule_tail+0x72/0xb2 kernel/sched/core.c:4264 [] ret_from_exception+0x0/0x14 Dumping ftrace buffer: (ftrace buffer empty) ---[ end trace b5f8f9231dc87dda ]--- The issue comes from the put_user() in schedule_tail (kernel/sched/core.c) doing the following: asmlinkage __visible void schedule_tail(struct task_struct *prev) { ... if (current->set_child_tid) put_user(task_pid_vnr(current), current->set_child_tid); ... } the put_user() macro causes the code sequence to come out as follows: 1: __enable_user_access() 2: reg = task_pid_vnr(current); 3: *current->set_child_tid = reg; 4: __disable_user_access() The problem is that we may have a sleeping function as argument which could clear SR_SUM causing the panic above. This was fixed by evaluating the argument of the put_user() macro outside the user-enabled section in commit 285a76bb2cf5 ("riscv: evaluate put_user() arg before enabling user access")" In order for riscv to take advantage of unsafe_get/put_XXX() macros and to avoid the same issue we had with put_user() and sleeping functions we must ensure code flow can go through switch_to() from within a region of code with SR_SUM enabled and come back with SR_SUM still enabled. This patch addresses the problem allowing future work to enable full use of unsafe_get/put_XXX() macros without needing to take a CSR bit flip cost on every access. Make switch_to() save and restore SR_SUM. Reported-by: syzbot+e74b94fe601ab9552d69@syzkaller.appspotmail.com Signed-off-by: Ben Dooks Signed-off-by: Cyril Bur Reviewed-by: Alexandre Ghiti Reviewed-by: Deepak Gupta Link: https://lore.kernel.org/r/20250410070526.3160847-2-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit c065e46395e2a584c3d7eade1f7386175a990dba Author: Lizhi Hou Date: Wed May 7 09:15:00 2025 -0700 accel/amdxdna: Support submit commands without arguments The latest userspace runtime allows generating commands which do not have any argument. Remove the corresponding check in driver IOCTL to enable this use case. Reviewed-by: Mario Limonciello Signed-off-by: Lizhi Hou Link: https://lore.kernel.org/r/20250507161500.2339701-1-lizhi.hou@amd.com Link: https://lore.kernel.org/r/20250507161500.2339701-1-lizhi.hou@amd.com commit f0cd6012c40da99b45f8f63052b97ec89d5f307b Author: Kees Cook Date: Sat Apr 26 00:37:55 2025 -0700 Revert "hardening: Disable GCC randstruct for COMPILE_TEST" This reverts commit f5c68a4e84f9feca3be578199ec648b676db2030. It is again possible to build "allmodconfig" with the randstruct GCC plugin, so enable it for COMPILE_TEST to catch future bugs. Signed-off-by: Kees Cook commit f55aef7e0cc7583062cbda9becaa3b2ba3255fa3 Author: Kees Cook Date: Fri May 2 15:41:20 2025 -0700 lib/tests: randstruct: Add deep function pointer layout test The recent fix in commit c2ea09b193d2 ("randstruct: gcc-plugin: Remove bogus void member") has fixed another issue: it was not always detecting composite structures made only of function pointers and structures of function pointers. Add a test for this case, and break out the layout tests since this issue is actually a problem for Clang as well[1]. Link: https://github.com/llvm/llvm-project/issues/138355 [1] Link: https://lore.kernel.org/r/20250502224116.work.591-kees@kernel.org Signed-off-by: Kees Cook commit b370f7eacdcfe1dd17bee00506296aa3fdc773cb Author: Kees Cook Date: Sat Apr 26 17:21:01 2025 -0700 lib/tests: Add randstruct KUnit test Perform basic validation about layout randomization and initialization tracking when using CONFIG_RANDSTRUCT=y. Tested using: $ ./tools/testing/kunit/kunit.py run \ --kconfig_add CONFIG_RANDSTRUCT_FULL=y \ randstruct [17:22:30] ================= randstruct (2 subtests) ================== [17:22:30] [PASSED] randstruct_layout [17:22:30] [PASSED] randstruct_initializers [17:22:30] =================== [PASSED] randstruct ==================== [17:22:30] ============================================================ [17:22:30] Testing complete. Ran 2 tests: passed: 2 [17:22:30] Elapsed time: 5.091s total, 0.001s configuring, 4.974s building, 0.086s running Adding "--make_option LLVM=1" can be used to test Clang, which also passes. Acked-by: David Gow Signed-off-by: Kees Cook commit e136a4062174a9a8d1c1447ca040ea81accfa6a8 Author: Kees Cook Date: Sat Apr 26 00:37:52 2025 -0700 randstruct: gcc-plugin: Remove bogus void member When building the randomized replacement tree of struct members, the randstruct GCC plugin would insert, as the first member, a 0-sized void member. This appears as though it was done to catch non-designated ("unnamed") static initializers, which wouldn't be stable since they depend on the original struct layout order. This was accomplished by having the side-effect of the "void member" tripping an assert in GCC internals (count_type_elements) if the member list ever needed to be counted (e.g. for figuring out the order of members during a non-designated initialization), which would catch impossible type (void) in the struct: security/landlock/fs.c: In function ‘hook_file_ioctl_common’: security/landlock/fs.c:1745:61: internal compiler error: in count_type_elements, at expr.cc:7075 1745 | .u.op = &(struct lsm_ioctlop_audit) { | ^ static HOST_WIDE_INT count_type_elements (const_tree type, bool for_ctor_p) { switch (TREE_CODE (type)) ... case VOID_TYPE: default: gcc_unreachable (); } } However this is a redundant safety measure since randstruct uses the __designated_initializer attribute both internally and within the __randomized_layout attribute macro so that this would be enforced by the compiler directly even when randstruct was not enabled (via -Wdesignated-init). A recent change in Landlock ended up tripping the same member counting routine when using a full-struct copy initializer as part of an anonymous initializer. This, however, is a false positive as the initializer is copying between identical structs (and hence identical layouts). The "path" member is "struct path", a randomized struct, and is being copied to from another "struct path", the "f_path" member: landlock_log_denial(landlock_cred(file->f_cred), &(struct landlock_request) { .type = LANDLOCK_REQUEST_FS_ACCESS, .audit = { .type = LSM_AUDIT_DATA_IOCTL_OP, .u.op = &(struct lsm_ioctlop_audit) { .path = file->f_path, .cmd = cmd, }, }, ... As can be seen with the coming randstruct KUnit test, there appears to be no behavioral problems with this kind of initialization when the void member is removed from the randstruct GCC plugin, so remove it. Reported-by: "Dr. David Alan Gilbert" Closes: https://lore.kernel.org/lkml/Z_PRaKx7q70MKgCA@gallifrey/ Reported-by: Mark Brown Closes: https://lore.kernel.org/lkml/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/ Reported-by: WangYuli Closes: https://lore.kernel.org/lkml/337D5D4887277B27+3c677db3-a8b9-47f0-93a4-7809355f1381@uniontech.com/ Fixes: 313dd1b62921 ("gcc-plugins: Add the randstruct plugin") Signed-off-by: Kees Cook commit 960013ec5b5e86c2c096e79ce6e08bce970650b3 Author: Nathan Chancellor Date: Wed May 7 21:47:45 2025 +0100 net: qede: Initialize qede_ll_ops with designated initializer After a recent change [1] in clang's randstruct implementation to randomize structures that only contain function pointers, there is an error because qede_ll_ops get randomized but does not use a designated initializer for the first member: drivers/net/ethernet/qlogic/qede/qede_main.c:206:2: error: a randomized struct can only be initialized with a designated initializer 206 | { | ^ Explicitly initialize the common member using a designated initializer to fix the build. Cc: stable@vger.kernel.org Fixes: 035f7f87b729 ("randstruct: Enable Clang support") Link: https://github.com/llvm/llvm-project/commit/04364fb888eea6db9811510607bed4b200bcb082 [1] Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250507-qede-fix-clang-randstruct-v1-1-5ccc15626fba@kernel.org Signed-off-by: Kees Cook commit d8720235d5b5cad86c1f07f65117ef2a96f8bec7 Author: Kees Cook Date: Fri May 2 15:41:57 2025 -0700 scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops Recent fixes to the randstruct GCC plugin allowed it to notice that this structure is entirely function pointers and is therefore subject to randomization, but doing so requires that it always use designated initializers. Explicitly specify the "common" member as being initialized. Silences: drivers/scsi/qedf/qedf_main.c:702:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 702 | { | ^ Fixes: 035f7f87b729 ("randstruct: Enable Clang support") Link: https://lore.kernel.org/r/20250502224156.work.617-kees@kernel.org Signed-off-by: Kees Cook commit 82d76bf938389e23c3826b2859fd6c84fd71366a Author: Kees Cook Date: Tue Apr 15 16:25:19 2025 -0700 md/bcache: Mark __nonstring look-up table GCC 15's new -Wunterminated-string-initialization notices that the 16 character lookup table "zero_uuid" (which is not used as a C-String) needs to be marked as "nonstring": drivers/md/bcache/super.c: In function 'uuid_find_empty': drivers/md/bcache/super.c:549:43: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization] 549 | static const char zero_uuid[16] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add the annotation (since it is not used as a C-String), and switch the initializer to an array of bytes rather than an empty initializer, as preferred by Coly Li. Suggested-by: Coly Li Link: https://lore.kernel.org/lkml/389A9925-0990-422C-A1B3-0195FAA73288@coly.li/ Signed-off-by: Kees Cook commit 11bb1678e249e51cd748e8f91e5241b3ce71da3a Author: Kees Cook Date: Sat May 3 11:46:20 2025 -0700 integer-wrap: Force full rebuild when .scl file changes Since the integer wrapping sanitizer's behavior depends on its associated .scl file, we must force a full rebuild if the file changes. If not, instrumentation may differ between targets based on when they were built. Generate a new header file, integer-wrap.h, any time the Clang .scl file changes. Include the header file in compiler-version.h when its associated feature name, INTEGER_WRAP, is defined. This will be picked up by fixdep and force rebuilds where needed. Acked-by: Justin Stitt Link: https://lore.kernel.org/r/20250503184623.2572355-3-kees@kernel.org Reviewed-by: Nicolas Schier Signed-off-by: Kees Cook commit 056000c471ea41db56de58f71b9fe727d6e68b9b Author: Kees Cook Date: Sat May 3 11:46:19 2025 -0700 randstruct: Force full rebuild when seed changes While the randstruct GCC plugin was being rebuilt if the randstruct seed changed, Clang builds did not notice the change. This could result in differing struct layouts in a target depending on when it was built. Include the existing generated header file in compiler-version.h when its associated feature name, RANDSTRUCT, is defined. This will be picked up by fixdep and force rebuilds where needed. Link: https://lore.kernel.org/r/20250503184623.2572355-2-kees@kernel.org Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier Signed-off-by: Kees Cook commit 0cecd37daef3d57e6656c0023978d5ec2d7409c1 Author: Kees Cook Date: Sat May 3 11:46:18 2025 -0700 gcc-plugins: Force full rebuild when plugins change There was no dependency between the plugins changing and the rest of the kernel being built. This could cause strange behaviors as instrumentation could vary between targets depending on when they were built. Generate a new header file, gcc-plugins.h, any time the GCC plugins change. Include the header file in compiler-version.h when its associated feature name, GCC_PLUGINS, is defined. This will be picked up by fixdep and force rebuilds where needed. Add a generic "touch" kbuild command, which will be used again in a following patch. Add a "normalize_path" string helper to make the "TOUCH" output less ugly. Link: https://lore.kernel.org/r/20250503184623.2572355-1-kees@kernel.org Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier Signed-off-by: Kees Cook commit 5e88c48cb4bcbd0ea683373a106268933bb4edd2 Author: Kees Cook Date: Fri Apr 18 14:32:39 2025 -0700 kbuild: Switch from -Wvla to -Wvla-larger-than=1 Variable Length Arrays (VLAs) on the stack must not be used in the kernel. Function parameter VLAs[1] should be usable, but -Wvla will warn for those. For example, this will produce a warning but it is not using a stack VLA: int something(size_t n, int array[n]) { ... Clang has no way yet to distinguish between the VLA types[2], so depend on GCC for now to keep stack VLAs out of the tree by using GCC's -Wvla-larger-than=N option (though GCC may split -Wvla similarly[3] to how Clang is planning to). While GCC 8+ supports -Wvla-larger-than, only 9+ supports ...=0[4], so use -Wvla-larger-than=1. Adjust mm/kasan/Makefile to remove it from CFLAGS (GCC <9 appears unable to disable the warning correctly[5]). The VLA usage in lib/test_ubsan.c was removed in commit 9d7ca61b1366 ("lib/test_ubsan.c: VLA no longer used in kernel") so the lib/Makefile disabling of VLA checking can be entirely removed. Link: https://en.cppreference.com/w/c/language/array [1] Link: https://github.com/llvm/llvm-project/issues/57098 [2] Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98217 [3] Link: https://lore.kernel.org/lkml/7780883c-0ac8-4aaa-b850-469e33b50672@linux.ibm.com/ [4] Link: https://lore.kernel.org/r/202505071331.4iOzqmuE-lkp@intel.com/ [5] Reviewed-by: Nathan Chancellor Reviewed-by: Christoph Hellwig Tested-by: Venkat Rao Bagalkote Link: https://lore.kernel.org/r/20250418213235.work.532-kees@kernel.org Signed-off-by: Kees Cook commit 5106c6506c51aa93198908b094228a7143292b9e Author: Jan Hendrik Farr Date: Wed Apr 30 20:42:31 2025 +0200 hardening: simplify CONFIG_CC_HAS_COUNTED_BY Simplifies CONFIG_CC_HAS_COUNTED_BY by removing the build test and relying solely on gcc/clang version numbering (GCC_VERSION >= 150100 and CLANG_VERSION >= 190103). The build test was used to allow unreleased gcc 15.0 builds to use the __counted_by attribute. Now that gcc 15.1.0 has been released, this is not needed anymore. Note: This will disable __counted_by on unreleased gcc 15.0 builds. clang version support for __counted_by remains unchanged. Link: https://lore.kernel.org/all/Zw8iawAF5W2uzGuh@archlinux/T/#m204c09f63c076586a02d194b87dffc7e81b8de7b Link: https://lore.kernel.org/r/20241029140036.577804-2-kernel@jfarr.cc Suggested-by: Nathan Chancellor Signed-off-by: Jan Hendrik Farr Link: https://lore.kernel.org/r/20250430184231.671365-2-kernel@jfarr.cc Reviewed-by: Nathan Chancellor Signed-off-by: Kees Cook commit 47e36ed7840661a9f7fb53554a1b04a5f8daffea Author: Gustavo A. R. Silva Date: Thu May 1 18:44:43 2025 -0600 overflow: Fix direct struct member initialization in _DEFINE_FLEX() Currently, to statically initialize the struct members of the `type` object created by _DEFINE_FLEX(), the internal `obj` member must be explicitly referenced at the call site. See: struct flex { int a; int b; struct foo flex_array[]; }; _DEFINE_FLEX(struct flex, instance, flex_array, FIXED_SIZE, = { .obj = { .a = 0, .b = 1, }, }); This leaks _DEFINE_FLEX() internal implementation details and make the helper harder to use and read. Fix this and allow for a more natural and intuitive C99 init-style: _DEFINE_FLEX(struct flex, instance, flex_array, FIXED_SIZE, = { .a = 0, .b = 1, }); Note that before these changes, the `initializer` argument was optional, but now it's required. Also, update "counter" member initialization in DEFINE_FLEX(). Fixes: 26dd68d293fd ("overflow: add DEFINE_FLEX() for on-stack allocs") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/aBQVeyKfLOkO9Yss@kspp Signed-off-by: Kees Cook commit 6e6500e4e4a7f7431a6d7ab02a332ea5fca5c9fa Author: Gustavo A. R. Silva Date: Tue Apr 22 15:07:41 2025 -0600 kunit/overflow: Add tests for STACK_FLEX_ARRAY_SIZE() helper Add a couple of tests for new STACK_FLEX_ARRAY_SIZE() helper. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/c127631a03cdd7f59bfa091b9666a93bf69d0322.1745355442.git.gustavoars@kernel.org Signed-off-by: Kees Cook commit 190faecf64c54bb5f9d8f0ea2a6628078d0f2c83 Author: Gustavo A. R. Silva Date: Tue Apr 22 15:05:18 2025 -0600 overflow: Add STACK_FLEX_ARRAY_SIZE() helper Add new STACK_FLEX_ARRAY_SIZE() helper to get the size of a flexible-array member defined using DEFINE_FLEX()/DEFINE_RAW_FLEX() at compile time. This is essentially the same as ARRAY_SIZE() but for on-stack flexible-array members. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/83d53744e11c80eb3f03765238cbe648855f4168.1745355442.git.gustavoars@kernel.org Signed-off-by: Kees Cook commit 6b02fd7799fc8e1160c5783459d065ceeb4b7365 Merge: 46431fd5224f7f 2c89c1b655c0b0 Author: Jakub Kicinski Date: Thu May 8 08:56:12 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc6). No conflicts. Adjacent changes: net/core/dev.c: 08e9f2d584c4 ("net: Lock netdevices during dev_shutdown") a82dc19db136 ("net: avoid potential race between netdev_get_by_index_lock() and netns switch") Signed-off-by: Jakub Kicinski commit 4fca6849864d78e55f005115c143257e6566c89c Author: Krzysztof Kozlowski Date: Thu May 8 16:34:48 2025 +0200 drm/panel: Add Novatek NT37801 panel driver Add driver for the Novatek NT37801 or NT37810 AMOLED DSI 1440x3200 panel in CMD mode, used on Qualcomm MTP8750 board (SM8750). Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-2-3ca072e3d1fa@linaro.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-2-3ca072e3d1fa@linaro.org commit 0311e0fd07919b4b8ea651a632eedb0e3f9f540c Author: Krzysztof Kozlowski Date: Thu May 8 16:34:47 2025 +0200 dt-bindings: display: panel: Add Novatek NT37801 Add bindings for the Novatek NT37801 or NT37810 AMOLED DSI panel. Sources, like downstream DTS, schematics and hardware manuals, use two model names (NT37801 and NT37810), so choose one and hope it is correct. Reviewed-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-1-3ca072e3d1fa@linaro.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-1-3ca072e3d1fa@linaro.org commit 0e7c523c58dd46e417963a9878971bf74026083a Author: Neil Armstrong Date: Wed May 7 11:19:21 2025 +0200 dt-bindings: display: panel: convert truly,nt35597.txt to dt-schema Convert the Truly NT35597 2K display panel bindings to dt-schema. The vdispp-supply & vdispn-supply are not marked as required since in practice they are not defined in sdm845-mtp.dts which is the only used of these bindings. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250507-topic-misc-truly-nt35597-yaml-v1-1-bc719ad8dfff@linaro.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250507-topic-misc-truly-nt35597-yaml-v1-1-bc719ad8dfff@linaro.org commit 70e21ac8b0543def19c8bd1addeec4995fbc0ea9 Author: Ian Rogers Date: Wed Apr 2 13:15:49 2025 -0700 perf parse-events: Add debug dump of evlist if reordered Add debug verbose output to show how evsels were reordered by parse_events__sort_events_and_fix_groups(). For example: ``` $ perf record -v -e '{instructions,cycles}' true Using CPUID GenuineIntel-6-B7-1 WARNING: events were regrouped to match PMUs evlist after sorting/fixing: '{cpu_atom/instructions/,cpu_atom/cycles/},{cpu_core/instructions/,cpu_core/cycles/}' ``` Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250402201549.4090305-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 583dc500d153d90260435c68a393fd3b5d44b18e Author: Ian Rogers Date: Wed Apr 2 13:15:48 2025 -0700 perf evlist: Make groups visible in evlist__format_evsels() output Make groups visible in output: Before: {cycles,instructions} -> cpu_atom/cycles/,cpu_atom/instructions/,cpu_core/cycles/,cpu_core/instructions/ After: {cycles,instructions} -> {cpu_atom/cycles/,cpu_atom/instructions/},{cpu_core/cycles/,cpu_core/instructions/} Committer testing: Before: root@number:~# perf record -e '{cycles,instructions,cache-misses}' /tmp/bla Failed to collect 'cycles,instructions,cache-misses' for the '/tmp/bla' workload: Permission denied root@number:~# After: root@number:~# perf record -e '{cycles,instructions,cache-misses}' /tmp/bla Failed to collect '{cycles,instructions,cache-misses}' for the '/tmp/bla' workload: Permission denied root@number:~# Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250402201549.4090305-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f0f245eaa2bca3595a0e775e9abdf7de909c0450 Author: Ian Rogers Date: Wed Apr 2 13:15:47 2025 -0700 perf evlist: Refactor evlist__scnprintf_evsels() Switch output to using a strbuf so the storage can be resized. Add a maximum size argument to avoid too much output that may happen for uncore events. Rename as scnprintf is no longer used. Committer testing: With the patch applied: root@number:~# perf probe -x ~/bin/perf evlist__format_evsels Added new event: probe_perf:evlist_format_evsels (on evlist__format_evsels in /home/acme/bin/perf) You can now use it in all perf tools, such as: perf record -e probe_perf:evlist_format_evsels -aR sleep 1 root@number:~# perf probe -l probe_perf:evlist_format_evsels (on evlist__format_evsels@util/evlist.c in /home/acme/bin/perf) root@number:~# perf trace -e probe_perf:*/max-stack=10/ perf record -e cycles,instructions,cache-misses /tmp/bla Failed to collect 'cycles,instructions,cache-misses' for the '/tmp/bla' workload: Permission denied 0.000 perf/3893011 probe_perf:evlist_format_evsels(__probe_ip: 6183397) evlist__format_evsels (/home/acme/bin/perf) __cmd_record (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) handle_internal_command (/home/acme/bin/perf) run_argv (/home/acme/bin/perf) main (/home/acme/bin/perf) __libc_start_call_main (/usr/lib64/libc.so.6) __libc_start_main@@GLIBC_2.34 (/usr/lib64/libc.so.6) _start (/home/acme/bin/perf) root@number:~# Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250402201549.4090305-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a5efaf90089e6dc50dc1f03174cbba3da37af986 Author: Ian Rogers Date: Wed Apr 2 13:15:46 2025 -0700 perf stat: Remove print_mixed_hw_group_error print_mixed_hw_group_error will print a warning when a group of events uses different PMUs. This isn't possible to happen as parse_events__sort_events_and_fix_groups() will break groups when this happens, adding the warning at the start of perf of: WARNING: events were regrouped to match PMUs As the previous mixed group warning can never happen, remove the associated code. Committer testing: Before/after: acme@five:~$ perf stat -e '{cpu_core/cycles/,cpu_atom/cycles/}' sleep 1 WARNING: events were regrouped to match PMUs Performance counter stats for 'sleep 1': 424,895 cpu_atom/cycles/u cpu_core/cycles/u (0.00%) 1.011862314 seconds time elapsed 0.000000000 seconds user 0.003166000 seconds sys acme@five:~$ Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250402201549.4090305-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 80f31d2a7e5f4efa7150c951268236c670bcb068 Author: Christoph Hellwig Date: Thu May 8 07:14:32 2025 +0200 f2fs: return bool from __write_node_folio __write_node_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0638f28b30621012ee4dac014b58c5a9588e65b1 Author: Christoph Hellwig Date: Thu May 8 07:14:31 2025 +0200 f2fs: simplify return value handling in f2fs_fsync_node_pages Always assign ret where the error happens, and jump to out instead of multiple loop exit conditions to prepare for changes in the __write_node_folio calling convention. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 84c5d16711a300949cfec83e76299a75b4cdf04a Author: Christoph Hellwig Date: Thu May 8 07:14:30 2025 +0200 f2fs: always unlock the page in f2fs_write_single_data_page Consolidate the code to unlock the page in f2fs_write_single_data_page instead of leaving it to the callers for the AOP_WRITEPAGE_ACTIVATE case. Replace AOP_WRITEPAGE_ACTIVATE with a positive return of 1 as this case now doesn't match the historic ->writepage special return code that is on it's way out now that ->writepage has been removed. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 402dd9f02ce447e2253953b5f84a2b62fed00889 Author: Christoph Hellwig Date: Thu May 8 07:14:29 2025 +0200 f2fs: remove wbc->for_reclaim handling Since commits 7ff0104a8052 ("f2fs: Remove f2fs_write_node_page()") and 3b47398d9861 ("f2fs: Remove f2fs_write_meta_page()'), f2fs can't be called from reclaim context any more. Remove all code keyed of the wbc->for_reclaim flag, which is now only set for writing out swap or shmem pages inside the swap code, but never passed to file systems. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39122e454419e31c2a20ac171687ab2e44a407ba Author: Christoph Hellwig Date: Thu May 8 07:14:28 2025 +0200 f2fs: return bool from __f2fs_write_meta_folio __f2fs_write_meta_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 43ba56a043b14426ca9ecac875ab357e32cb595e Author: Chao Yu Date: Thu May 8 07:14:27 2025 +0200 f2fs: fix to return correct error number in f2fs_sync_node_pages() If __write_node_folio() failed, it will return AOP_WRITEPAGE_ACTIVATE, the incorrect return value may be passed to userspace in below path, fix it. - sync_filesystem - sync_fs - f2fs_issue_checkpoint - block_operations - f2fs_sync_node_pages - __write_node_folio : return AOP_WRITEPAGE_ACTIVATE Cc: stable@vger.kernel.org Reported-by: Christoph Hellwig Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4b531377218cde4b4c8c2037cbe8383206bce22b Author: Ian Rogers Date: Wed Apr 2 13:15:45 2025 -0700 perf stat: Better hybrid support for the NMI watchdog warning Prior to this patch evlist__has_hybrid would return false if the processor wasn't hybrid or the evlist didn't contain any core events. If the only PMU used by events was cpu_core then it would true even though there are no cpu_atom events. For example: ``` $ perf stat --cputype=cpu_core -e '{cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles,cycles}' true Performance counter stats for 'true': cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) cpu_core/cycles/ (0.00%) 0.001981900 seconds time elapsed 0.002311000 seconds user 0.000000000 seconds sys ``` This patch changes evlist__has_hybrid to return true only if the evlist contains events from >1 core PMU. This means the NMI watchdog warning is shown for the case above. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250402201549.4090305-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit afc6053d4c4b0a6be500b9e643aa17221e93a57b Author: Lijo Lazar Date: Fri Apr 11 16:45:46 2025 +0530 Reapply: drm/amdgpu: Use generic hdp flush function Except HDP v5.2 all use a common logic for HDP flush. Use a generic function. HDP v5.2 forces NO_KIQ logic, revisit it later. Reapply after fixing up an HDP regression. v2: merge the fix (Alex) Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling (v1) Signed-off-by: Alex Deucher commit dbc064adfcf9095e7d895bea87b2f75c1ab23236 Author: Alex Deucher Date: Wed Apr 30 12:50:02 2025 -0400 drm/amdgpu/hdp7: use memcfg register to post the write for HDP flush Reading back the remapped HDP flush register seems to cause problems on some platforms. All we need is a read, so read back the memcfg register. Fixes: 689275140cb8 ("drm/amdgpu/hdp7.0: do a posting read when flushing HDP") Reported-by: Alexey Klimov Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 84141ff615951359c9a99696fd79a36c465ed847 Author: Alex Deucher Date: Wed Apr 30 12:48:51 2025 -0400 drm/amdgpu/hdp6: use memcfg register to post the write for HDP flush Reading back the remapped HDP flush register seems to cause problems on some platforms. All we need is a read, so read back the memcfg register. Fixes: abe1cbaec6cf ("drm/amdgpu/hdp6.0: do a posting read when flushing HDP") Reported-by: Alexey Klimov Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 793fa8ce4ebfd282c82c673fe791008b7e927d48 Author: Huang Rui Date: Thu Apr 24 19:08:46 2025 +0800 drm/amdgpu: cleanup sriov function for psp v12 PSP v12 won't have SRIOV function. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4a89b7698e771914b4d5b571600c76e2fdcbe2a9 Author: Alex Deucher Date: Wed Apr 30 12:47:37 2025 -0400 drm/amdgpu/hdp5.2: use memcfg register to post the write for HDP flush Reading back the remapped HDP flush register seems to cause problems on some platforms. All we need is a read, so read back the memcfg register. Fixes: f756dbac1ce1 ("drm/amdgpu/hdp5.2: do a posting read when flushing HDP") Reported-by: Alexey Klimov Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a5cb344033c7598762e89255e8ff52827abb57a4 Author: Alex Deucher Date: Wed Apr 30 12:46:56 2025 -0400 drm/amdgpu/hdp5: use memcfg register to post the write for HDP flush Reading back the remapped HDP flush register seems to cause problems on some platforms. All we need is a read, so read back the memcfg register. Fixes: cf424020e040 ("drm/amdgpu/hdp5.0: do a posting read when flushing HDP") Reported-by: Alexey Klimov Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 518e22b42c39e5f352a2610f93037161821181eb Author: Huang Rui Date: Thu Apr 24 19:00:46 2025 +0800 drm/amdgpu: remove re-route ih in psp v12 APU doesn't have second IH ring, so re-routing action here is a no-op. It will take a lot of time to wait timeout from PSP during the initialization. So remove the function in psp v12. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9761037d28327e0d4ee9586a8210ef6462c2c757 Author: Krzysztof Kozlowski Date: Thu May 1 20:18:20 2025 +0200 mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning 'chip_id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: adgs1408.c:63:12: error: cast to smaller integer type 'enum adgs1408_chip_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20250501181819.164207-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 824afb9b04648ea11531fc9047923ec07e7a943d Author: Ming Lei Date: Thu May 8 16:58:05 2025 +0800 block: move removing elevator after deleting disk->queue_kobj When blk_unregister_queue() is called from add_disk() failure path, there is race in registering/unregistering elevator queue kobject from the two code paths, because commit 559dc11143eb ("block: move elv_register[unregister]_queue out of elevator_lock") moves elevator queue register/unregister out of elevator lock. Fix the race by removing elevator after deleting disk->queue_kobj, because kobject_del(&disk->queue_kobj) drains in-progress sysfs show()/store() of all attributes. Fixes: 559dc11143eb ("block: move elv_register[unregister]_queue out of elevator_lock") Reported-by: Nilay Shroff Suggested-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Link: https://lore.kernel.org/r/20250508085807.3175112-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 8336d18c6b57a603aaa4db76bbf4f8cb08acfa5e Author: Ming Lei Date: Thu May 8 16:58:04 2025 +0800 block: don't quiesce queue for calling elevator_set_none() blk_mq_freeze_queue() can't be called on quiesced queue, otherwise it may never return if there is any queued requests. Fix it by removing quiesce queue around elevator_set_none() because elevator_switch() does quiesce queue in case that we need to switch to none really. Fixes: 1e44bedbc921 ("block: unifying elevator change") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Link: https://lore.kernel.org/r/20250508085807.3175112-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7900938850645ed41770bddba524416f8c84dc2d Author: Ian Rogers Date: Tue Apr 1 13:27:15 2025 -0700 perf trace: Add missing thread__put() in thread__e_machine() Add missing thread__put() of the found parent thread in thread__e_machine(). Reviewed-by: Howard Chu Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250401202715.3493567-1-irogers@google.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 8830091383b034981d882773078e18bb2a7e0e53 Author: Ian Rogers Date: Tue Apr 1 13:27:15 2025 -0700 perf trace: Free the files.max entry in files->table The files.max is the maximum valid fd in the files array and so freeing the values needs to be inclusive of the max value. Reviewed-by: Howard Chu Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250401202715.3493567-1-irogers@google.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 864f3ddcd7153fdb3f2d3822e563985135d8eafa Author: Mark Rutland Date: Thu May 8 14:26:44 2025 +0100 kselftest/arm64: fp-ptrace: Adjust to new inactive mode behaviour In order to fix an ABI problem, we recently changed the way that reads of the NT_ARM_SVE and NT_ARM_SSVE regsets behave when their corresponding vector state is inactive. Update the fp-ptrace test for the new behaviour. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-25-mark.rutland@arm.com Signed-off-by: Will Deacon commit 031a2acaa1cdab3c89dfb810a8cb75ddfdf5a65c Author: Mark Rutland Date: Thu May 8 14:26:43 2025 +0100 kselftest/arm64: fp-ptrace: Adjust to new VL change behaviour In order to fix an ABI problem, we recently changed the way that changing the SVE/SME vector length affects PSTATE.SM. Historically, changing the SME vector length would clear PSTATE.SM. Now, changing the SME vector length preserves PSTATE.SM. Update the fp-ptrace test for the new behaviour. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-24-mark.rutland@arm.com Signed-off-by: Will Deacon commit be45e63f79ecfea8373f18f50330838d77553a6b Author: Mark Rutland Date: Thu May 8 14:26:42 2025 +0100 kselftest/arm64: tpidr2: Adjust to new clone() behaviour In order to fix an ABI problem, we recently changed the way that a clone() syscall manipulates TPIDR2 and PSTATE.ZA. Historically the child would inherit the parent's TPIDR2 value unless CLONE_SETTLS was set, and now the child will inherit the parent's TPIDR2 value unless CLONE_VM is set. Update the tpidr2 test for the new behaviour. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Daniel Kiss Cc: Marc Zyngier Cc: Mark Brown Cc: Richard Sandiford Cc: Sander De Smalen Cc: Tamas Petz Cc: Will Deacon Cc: Yury Khrustalev Link: https://lore.kernel.org/r/20250508132644.1395904-23-mark.rutland@arm.com Signed-off-by: Will Deacon commit 78b23877dbba7dbcda2b89383d17bed82ce8f663 Author: Mark Rutland Date: Thu May 8 14:26:41 2025 +0100 kselftest/arm64: fp-ptrace: Fix expected FPMR value when PSTATE.SM is changed The fp-ptrace test suite expects that FPMR is set to zero when PSTATE.SM is changed via ptrace, but ptrace has never altered FPMR in this way, and the test logic erroneously relies upon (and has concealed) a bug where task_fpsimd_load() would unexpectedly and non-deterministically clobber FPMR. Using ptrace, FPMR can only be altered by writing to the NT_ARM_FPMR regset. The value of PSTATE.SM can be altered by writing to the NT_ARM_SVE or NT_ARM_SSVE regsets, and/or by changing the SME vector length (when writing to the NT_ARM_SVE, NT_ARM_SSVE, or NT_ARM_ZA regsets), but none of these writes will change the value of FPMR. The task_fpsimd_load() bug was introduced with the initial FPMR support in commit: 203f2b95a882 ("arm64/fpsimd: Support FEAT_FPMR") The incorrect FPMR test code was introduced in commit: 7dbd26d0b22d ("kselftest/arm64: Add FPMR coverage to fp-ptrace") Subsequently, the task_fpsimd_load() bug was fixed in commit: e5fa85fce08b ("arm64/fpsimd: Don't corrupt FPMR when streaming mode changes") ... whereupon the fp-ptrace FPMR tests started failing reliably, e.g. | # # Mismatch in saved FPMR: 915058000 != 0 | # not ok 25 SVE write, SVE 64->64, SME 64/0->64/1 Fix this by changing the test to expect that FPMR is *NOT* changed when PSTATE.SM is changed via ptrace, matching the extant behaviour. I've chosen to update the test code rather than modifying ptrace to zero FPMR when PSTATE.SM changes. Not zeroing FPMR is simpler overall, and allows the NT_ARM_FPMR regset to be handled independently from other regsets, leaving less scope for error. Fixes: 7dbd26d0b22d ("kselftest/arm64: Add FPMR coverage to fp-ptrace") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-22-mark.rutland@arm.com Signed-off-by: Will Deacon commit 4815e9fc892bb85f856f119006687fdb6c71ee01 Author: Colin Ian King Date: Thu May 8 09:45:27 2025 +0100 ASoC: rt712-sdca: remove redundant else path of if statement There is an if/else check where the else part is executed if adc_vol_flag is true, this else path checks if adc_vol_flag is true (which is a redundant second check) and the if path is always taken. Remove the redundant check and remove the else path since that can never occur. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250508084527.316380-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 07cb9b51076f452c286fb69f3af4c65e54affaa3 Author: ChiYuan Huang Date: Thu May 8 11:01:23 2025 +0800 ASoC: codecs: rt9123: Fix sparse cast warning Use i2c block read/write API to fix casting warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505072140.iHyLlDN6-lkp@intel.com/ Signed-off-by: ChiYuan Huang Link: https://patch.msgid.link/185a5ffea22ebd20725fdc7739db6b6addfae3ad.1746672687.git.cy_huang@richtek.com Signed-off-by: Mark Brown commit cece89eb2bd2634e7faf65f2ecfccfc4809261c8 Merge: 8147e75bd5f097 62a5897607747e Author: Mark Brown Date: Thu May 8 23:39:49 2025 +0900 ASoC: Intel: soc-acpi-intel-lnl/ptl-match: Add Merge series from Bard Liao : The series simplify the variable name and add rt713_vb_l3_rt1320_l3 support. commit 83579675331059689e2869bf752ca9e17fadbd82 Author: Yen-Chi Huang Date: Tue May 6 18:23:14 2025 +0800 platform/x86: portwell-ec: Add GPIO and WDT driver for Portwell EC Adds a driver for the ITE Embedded Controller (EC) on Portwell boards. It integrates with the Linux GPIO and watchdog subsystems to provide: - Control/monitoring of up to 8 EC GPIO pins. - Hardware watchdog timer with 1-255 second timeouts. The driver communicates with the EC via I/O port 0xe300 and identifies the hardware by the "PWG" firmware signature. This enables enhanced system management for Portwell embedded/industrial platforms. Signed-off-by: Yen-Chi Huang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/a04be962-b207-4085-af5b-523f59bffcbc@portwell.com.tw Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d4860025a3fd9c20a801c2273227906874e76413 Author: Hans de Goede Date: Wed May 7 20:47:36 2025 +0200 platform/x86: int3472: For mt9m114 sensors map powerdown to powerenable mt9m114 atomisp designs declare both reset and powerdown pins in their GPIO type DSM, but the mt9m114 only has a reset pin. The powerdown pin seems to control the regulators suppyling power to the sensor and the privacy LED. Add a mapping of powerdown to powerenable for the mt9m114 for this. While at is also add a comment to document the ov7251 mapping. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250507184737.154747-6-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 45adb05473aa4afd6ff19fd0c46c17a6294ae788 Author: Hans de Goede Date: Wed May 7 20:47:35 2025 +0200 platform/x86: int3472: Remove unused sensor_config struct member sensor_config is not used anywhere and its struct int3472_sensor_config type also is not declared anywhere, drop it. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250507184737.154747-5-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1cfa1bb9b4033e51d3c3f5ed5bf55475e57cc686 Author: Hans de Goede Date: Wed May 7 20:47:34 2025 +0200 platform/x86: int3472: Export int3472_discrete_parse_crs() At the moment the atomisp has duplicate code for parsing Intel camera sensor GPIOS and calling the special 79234640-9e10-4fea-a5c1-b5aa8b19756f _DSM to get the GPIO type and map it to the sensor. Export int3472_discrete_parse_crs() so that the atomisp driver can reuse the INT3472 code for this. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250507184737.154747-4-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1e5d088a52c207bcef6a43a6f6ffe162c514ed64 Author: Hans de Goede Date: Wed May 7 20:47:33 2025 +0200 platform/x86: int3472: Stop using devm_gpiod_get() The intent is to re-use the INT3472 code for parsing Intel camera sensor GPIOs and mapping them to the sensor for the atomisp driver, which currently has duplicate code. On atomisp devices there is no special INT3472 ACPI device, instead the Intel _DSM to get the GPIO type is part of the ACPI device for the sensor itself. To deal with this the mapping is done from ipu_bridge_init() instead of from a platform-device probe() function, there is no device to tie the lifetime of the gpiod_get() calls done by the INT3472 code to. Switch from devm_gpiod_get() to plain gpiod_get() + explicit gpiod_put() calls, to prepare for the code being re-used in the atomisp driver. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250507184737.154747-3-hdegoede@redhat.com Signed-off-by: Ilpo Järvinen commit 53eddae9af0c0b46f9c77a02d23c21c1aa824739 Author: Hans de Goede Date: Wed May 7 20:47:32 2025 +0200 platform/x86: int3472: Move common.h to public includes, symbols to INTEL_INT3472 Move the common.h header file to include/linux/platform_data/x86/int3472.h and add a "INTEL_INT3472" kernel-symbol-namespace to the exported symbols. This is a preparation patch for exporting some more symbols for re-use in the atomisp driver. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250507184737.154747-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 33c4618d0ac04139b737dcc0870b9dc3ed4dd170 Author: Mark Rutland Date: Thu May 8 14:26:40 2025 +0100 arm64/fpsimd: Allow CONFIG_ARM64_SME to be selected Now that the known issues with SME have been addressed, allow SME to be selected. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Daniel Kiss Cc: David Spickett Cc: Fuad Tabba Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Richard Sandiford Cc: Sander De Smalen Cc: Tamas Petz Cc: Todd Kjos Cc: Will Deacon Cc: Yury Khrustalev Tested-By: Luis Machado Link: https://lore.kernel.org/r/20250508132644.1395904-21-mark.rutland@arm.com Signed-off-by: Will Deacon commit 9f8bf718f29230e38a048d08fc3063e316cd60c1 Author: Mark Rutland Date: Thu May 8 14:26:39 2025 +0100 arm64/fpsimd: ptrace: Gracefully handle errors Within sve_set_common() we do not handle error conditions correctly: * When writing to NT_ARM_SSVE, if sme_alloc() fails, the task will be left with task->thread.sme_state==NULL, but TIF_SME will be set and task->thread.fp_type==FP_STATE_SVE. This will result in a subsequent null pointer dereference when the task's state is loaded or otherwise manipulated. * When writing to NT_ARM_SSVE, if sve_alloc() fails, the task will be left with task->thread.sve_state==NULL, but TIF_SME will be set, PSTATE.SM will be set, and task->thread.fp_type==FP_STATE_FPSIMD. This is not a legitimate state, and can result in various problems, including a subsequent null pointer dereference and/or the task inheriting stale streaming mode register state the next time its state is loaded into hardware. * When writing to NT_ARM_SSVE, if the VL is changed but the resulting VL differs from that in the header, the task will be left with TIF_SME set, PSTATE.SM set, but task->thread.fp_type==FP_STATE_FPSIMD. This is not a legitimate state, and can result in various problems as described above. Avoid these problems by allocating memory earlier, and by changing the task's saved fp_type to FP_STATE_SVE before skipping register writes due to a change of VL. To make early returns simpler, I've moved the call to fpsimd_flush_task_state() earlier. As the tracee's state has already been saved, and the tracee is known to be blocked for the duration of sve_set_common(), it doesn't matter whether this is called at the start or the end. For consistency I've moved the setting of TIF_SVE earlier. This will be cleared when loading FPSIMD-only state, and so moving this has no resulting functional change. Note that we only allocate the memory for SVE state when SVE register contents are provided, avoiding unnecessary memory allocations for tasks which only use FPSIMD. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Fixes: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") Fixes: 5d0a8d2fba50 ("arm64/ptrace: Ensure that SME is set up for target when writing SSVE state") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-20-mark.rutland@arm.com Signed-off-by: Will Deacon commit f916dd32a943a7ab40497718aa7bcf3648d2bb39 Author: Mark Rutland Date: Thu May 8 14:26:38 2025 +0100 arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state When a task has PSTATE.SM==1, reads of NT_ARM_SSVE are required to always present a header with SVE_PT_REGS_SVE, and register data in SVE format. Reads of NT_ARM_SSVE must never present register data in FPSIMD format. Within the kernel, we always expect streaming SVE data to be stored in SVE format. Currently a user can write to NT_ARM_SSVE with a header presenting SVE_PT_REGS_FPSIMD rather than SVE_PT_REGS_SVE, placing the task's FPSIMD/SVE data into an invalid state. To fix this we can either: (a) Forbid such writes. (b) Accept such writes, and immediately convert data into SVE format. Take the simple option and forbid such writes. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250508132644.1395904-19-mark.rutland@arm.com Signed-off-by: Will Deacon commit b93e685ecff77e0b231c12802fb632ef36a62140 Author: Mark Rutland Date: Thu May 8 14:26:37 2025 +0100 arm64/fpsimd: ptrace: Do not present register data for inactive mode The SME ptrace ABI is written around the incorrect assumption that SVE_PT_REGS_FPSIMD and SVE_PT_REGS_SVE are independent bit flags, where it is possible for both to be clear. In reality they are different values for bit 0 of the header flags, where SVE_PT_REGS_FPSIMD is 0 and SVE_PT_REGS_SVE is 1. In cases where code was written expecting that neither bit flag would be set, the value is equivalent to SVE_PT_REGS_FPSIMD. One consequence of this is that reads of the NT_ARM_SVE or NT_ARM_SSVE will erroneously present data from the other mode: * When PSTATE.SM==1, reads of NT_ARM_SVE will present a header with SVE_PT_REGS_FPSIMD, and FPSIMD-formatted data from streaming mode. * When PSTATE.SM==0, reads of NT_ARM_SSVE will present a header with SVE_PT_REGS_FPSIMD, and FPSIMD-formatted data from non-streaming mode. The original intent was that no register data would be provided in these cases, as described in commit: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Luckily, debuggers do not consume the bogus register data. Both GDB and LLDB read the NT_ARM_SSVE regset before the NT_ARM_SVE regset, and assume that when the NT_ARM_SSVE header presents SVE_PT_REGS_FPSIMD, it is necessary to read register contents from the NT_ARM_SVE regset, regardless of whether the NT_ARM_SSVE regset provided bogus register data. Fix the code to stop presenting register data from the inactive mode. At the same time, make the manipulation of the flag clearer, and remove the bogus comment from sve_set_common(). I've given this a quick spin with GDB and LLDB, and both seem happy. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-18-mark.rutland@arm.com Signed-off-by: Will Deacon commit 054d627c5554bdd38228174b275d62113124e3ad Author: Mark Rutland Date: Thu May 8 14:26:36 2025 +0100 arm64/fpsimd: ptrace: Save task state before generating SVE header As sve_init_header_from_task() consumes the saved value of PSTATE.SM and the saved fp_type, both must be saved before the header is generated. When generating a coredump for the current task, sve_get_common() calls sve_init_header_from_task() before saving the task's state. Consequently the header may be bogus, and the contents of the regset may be misleading. Fix this by saving the task's state before generting the header. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Fixes: b017a0cea627 ("arm64/ptrace: Use saved floating point state type to determine SVE layout") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-17-mark.rutland@arm.com Signed-off-by: Will Deacon commit b87c8c4aca1163ae4791507089007863e9c3ca1b Author: Mark Rutland Date: Thu May 8 14:26:35 2025 +0100 arm64/fpsimd: ptrace/prctl: Ensure VL changes leave task in a valid state Currently, vec_set_vector_length() can manipulate a task into an invalid state as a result of a prctl/ptrace syscall which changes the SVE/SME vector length, resulting in several problems: (1) When changing the SVE vector length, if the task initially has PSTATE.ZA==1, and sve_alloc() fails to allocate memory, the task will be left with PSTATE.ZA==1 and sve_state==NULL. This is not a legitimate state, and could result in a subsequent null pointer dereference. (2) When changing the SVE vector length, if the task initially has PSTATE.SM==1, the task will be left with PSTATE.SM==1 and fp_type==FP_STATE_FPSIMD. Streaming mode state always needs to be saved in SVE format, so this is not a legitimate state. Attempting to restore this state may cause a task to erroneously inherit stale streaming mode predicate registers and FFR contents, behaving non-deterministically and potentially leaving information from another task. While in this state, reads of the NT_ARM_SSVE regset will indicate that the registers are not stored in SVE format. For the NT_ARM_SSVE regset specifically, debuggers interpret this as meaning that PSTATE.SM==0. (3) When changing the SME vector length, if the task initially has PSTATE.SM==1, the lower 128 bits of task's streaming mode vector state will be migrated to non-streaming mode, rather than these bits being zeroed as is usually the case for changes to PSTATE.SM. To fix the first issue, we can eagerly allocate the new sve_state and sme_state before modifying the task. This makes it possible to handle memory allocation failure without modifying the task state at all, and removes the need to clear TIF_SVE and TIF_SME. To fix the second issue, we either need to clear PSTATE.SM or not change the saved fp_type. Given we're going to eagerly allocate sve_state and sme_state, the simplest option is to preserve PSTATE.SM and the saves fp_type, and consistently truncate the SVE state. This ensures that the task always stays in a valid state, and by virtue of not exiting streaming mode, this also sidesteps the third issue. I believe these changes should not be problematic for realistic usage: * When the SVE/SME vector length is changed via prctl(), syscall entry will have cleared PSTATE.SM. Unless the task's state has been manipulated via ptrace after entry, the task will have PSTATE.SM==0. * When the SVE/SME vector length is changed via a write to the NT_ARM_SVE or NT_ARM_SSVE regsets, PSTATE.SM will be forced immediately after the length change, and new vector state will be copied from userspace. * When the SME vector length is changed via a write to the NT_ARM_ZA regset, the (S)SVE state is clobbered today, so anyone who cares about the specific state would need to install this after writing to the NT_ARM_ZA regset. As we need to free the old SVE state while TIF_SVE may still be set, we cannot use sve_free(), and using kfree() directly makes it clear that the free pairs with the subsequent assignment. As this leaves sve_free() unused, I've removed the existing sve_free() and renamed __sve_free() to mirror sme_free(). Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Fixes: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-16-mark.rutland@arm.com Signed-off-by: Will Deacon commit 49ce484187f72a94c202348179a9a4e63a0f864b Author: Mark Rutland Date: Thu May 8 14:26:34 2025 +0100 arm64/fpsimd: ptrace/prctl: Ensure VL changes do not resurrect stale data The SVE/SME vector lengths can be changed via prctl/ptrace syscalls. Changes to the SVE/SME vector lengths are documented as preserving the lower 128 bits of the Z registers (i.e. the bits shared with the FPSIMD V registers). To ensure this, vec_set_vector_length() explicitly copies register values from a task's saved SVE state to its saved FPSIMD state when dropping the task to FPSIMD-only. The logic for this was not updated when when FPSIMD/SVE state tracking was changed across commits: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") a0136be443d5 (arm64/fpsimd: Load FP state based on recorded data type") bbc6172eefdb ("arm64/fpsimd: SME no longer requires SVE register state") 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") Since the last commit above, a task's FPSIMD/SVE state may be stored in FPSIMD format while TIF_SVE is set, and the stored SVE state is stale. When vec_set_vector_length() encounters this case, it will erroneously clobber the live FPSIMD state with stale SVE state by using sve_to_fpsimd(). Fix this by using fpsimd_sync_from_effective_state() instead. Related issues with streaming mode state will be addressed in subsequent patches. Fixes: 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-15-mark.rutland@arm.com Signed-off-by: Will Deacon commit cde5c32db55740659fca6d56c09b88800d88fd29 Author: Mark Rutland Date: Thu May 8 14:26:33 2025 +0100 arm64/fpsimd: Make clone() compatible with ZA lazy saving Linux is intended to be compatible with userspace written to Arm's AAPCS64 procedure call standard [1,2]. For the Scalable Matrix Extension (SME), AAPCS64 was extended with a "ZA lazy saving scheme", where SME's ZA tile is lazily callee-saved and caller-restored. In this scheme, TPIDR2_EL0 indicates whether the ZA tile is live or has been saved by pointing to a "TPIDR2 block" in memory, which has a "za_save_buffer" pointer. This scheme has been implemented in GCC and LLVM, with necessary runtime support implemented in glibc and bionic. AAPCS64 does not specify how the ZA lazy saving scheme is expected to interact with thread creation mechanisms such as fork() and pthread_create(), which would be implemented in terms of the Linux clone syscall. The behaviour implemented by Linux and glibc/bionic doesn't always compose safely, as explained below. Currently the clone syscall is implemented such that PSTATE.ZA and the ZA tile are always inherited by the new task, and TPIDR2_EL0 is inherited unless the 'flags' argument includes CLONE_SETTLS, in which case TPIDR2_EL0 is set to 0/NULL. This doesn't make much sense: (a) TPIDR2_EL0 is part of the calling convention, and changes as control is passed between functions. It is *NOT* used for thread local storage, despite superficial similarity to TPIDR_EL0, which is is used as the TLS register. (b) TPIDR2_EL0 and PSTATE.ZA are tightly coupled in the procedure call standard, and some combinations of states are illegal. In general, manipulating the two independently is not guaranteed to be safe. In practice, code which is compliant with the procedure call standard may issue a clone syscall while in the "ZA dormant" state, where PSTATE.ZA==1 and TPIDR2_EL0 is non-null and indicates that ZA needs to be saved. This can cause a variety of problems, including: * If the implementation of pthread_create() passes CLONE_SETTLS, the new thread will start with PSTATE.ZA==1 and TPIDR2==NULL. Per the procedure call standard this is not a legitimate state for most functions. This can cause data corruption (e.g. as code may rely on PSTATE.ZA being 0 to guarantee that an SMSTART ZA instruction will zero the ZA tile contents), and may result in other undefined behaviour. * If the implementation of pthread_create() does not pass CLONE_SETTLS, the new thread will start with PSTATE.ZA==1 and TPIDR2 pointing to a TPIDR2 block on the parent thread's stack. This can result in a variety of problems, e.g. - The child may write back to the parent's za_save_buffer, corrupting its contents. - The child may read from the TPIDR2 block after the parent has reused this memory for something else, and consequently the child may abort or clobber arbitrary memory. Ideally we'd require that userspace ensures that a task is in the "ZA off" state (with PSTATE.ZA==0 and TPIDR2_EL0==NULL) prior to issuing a clone syscall, and have the kernel force this state for new threads. Unfortunately, contemporary C libraries do not do this, and simply forcing this state within the implementation of clone would break fork(). Instead, we can bodge around this by considering the CLONE_VM flag, and manipulate PSTATE.ZA and TPIDR2_EL0 as a pair. CLONE_VM indicates that the new task will run in the same address space as its parent, and in that case it doesn't make sense to inherit a stale pointer to the parent's TPIDR2 block: * For fork(), CLONE_VM will not be set, and it is safe to inherit both PSTATE.ZA and TPIDR2_EL0 as the new task will have its own copy of the address space, and cannot clobber its parent's stack. * For pthread_create() and vfork(), CLONE_VM will be set, and discarding PSTATE.ZA and TPIDR2_EL0 for the new task doesn't break any existing assumptions in userspace. Implement this behaviour for clone(). We currently inherit PSTATE.ZA in arch_dup_task_struct(), but this does not have access to the clone flags, so move this logic under copy_thread(). Documentation is updated to describe the new behaviour. [1] https://github.com/ARM-software/abi-aa/releases/download/2025Q1/aapcs64.pdf [2] https://github.com/ARM-software/abi-aa/blob/c51addc3dc03e73a016a1e4edf25440bcac76431/aapcs64/aapcs64.rst Suggested-by: Catalin Marinas Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Daniel Kiss Cc: Marc Zyngier Cc: Mark Brown Cc: Richard Sandiford Cc: Sander De Smalen Cc: Tamas Petz Cc: Will Deacon Cc: Yury Khrustalev Acked-by: Yury Khrustalev Link: https://lore.kernel.org/r/20250508132644.1395904-14-mark.rutland@arm.com Signed-off-by: Will Deacon commit a6d066f705747124fb2d662df0acbb45ffe6c406 Author: Mark Rutland Date: Thu May 8 14:26:32 2025 +0100 arm64/fpsimd: Clear PSTATE.SM during clone() Currently arch_dup_task_struct() doesn't handle cases where the parent task has PSTATE.SM==1. Since syscall entry exits streaming mode, the parent will usually have PSTATE.SM==0, but this can be change by ptrace after syscall entry. When this happens, arch_dup_task_struct() will initialise the new task into an invalid state. The new task inherits the parent's configuration of PSTATE.SM, but fp_type is set to FP_STATE_FPSIMD, TIF_SVE and SME may be cleared, and both sve_state and sme_state may be set to NULL. This can result in a variety of problems whenever the new task's state is manipulated, including kernel NULL pointer dereferences and leaking of streaming mode state between tasks. When ptrace is not involved, the parent will have PSTATE.SM==0 as a result of syscall entry, and the documentation in Documentation/arch/arm64/sme.rst says: | On process creation (eg, clone()) the newly created process will have | PSTATE.SM cleared. ... so make this true by using task_smstop_sm() to exit streaming mode in the child task, avoiding the problems above. Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-13-mark.rutland@arm.com Signed-off-by: Will Deacon commit e0cb0f26594c644c71ee7f48ebaae6b26bf56a12 Author: Mark Rutland Date: Thu May 8 14:26:31 2025 +0100 arm64/fpsimd: Consistently preserve FPSIMD state during clone() In arch_dup_task_struct() we try to ensure that the child task inherits the FPSIMD state of its parent, but this depends on the parent task's saved state being in FPSIMD format, which is not always the case. Consequently the child task may inherit stale FPSIMD state in some cases. This can happen when the parent's state has been modified by ptrace since syscall entry, as writes to the NT_ARM_SVE regset may save state in SVE format. This has been possible since commit: bc0ee4760364 ("arm64/sve: Core task context handling") More recently it has been possible for a task's FPSIMD/SVE state to be saved before lazy discarding was guaranteed to occur, in which case preemption could cause the effective FPSIMD state to be saved in SVE format non-deterministically. This has been possible since commit: f130ac0ae441 ("arm64: syscall: unmask DAIF earlier for SVCs") Fix this by saving the parent task's effective FPSIMD state into FPSIMD format before copying the task_struct. As this requires modifying the parent's fpsimd_state, we must save+flush the state to avoid racing with concurrent manipulation. Similar issues exist when the parent has streaming mode state, and will be addressed by subsequent patches. Fixes: bc0ee4760364 ("arm64/sve: Core task context handling") Fixes: f130ac0ae441 ("arm64: syscall: unmask DAIF earlier for SVCs") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-12-mark.rutland@arm.com Signed-off-by: Will Deacon commit 8d61eef756798cd33721e4c89bc72ce81792a3e8 Author: Mark Rutland Date: Thu May 8 14:26:30 2025 +0100 arm64/fpsimd: Remove redundant task->mm check For historical reasons, arch_dup_task_struct() only calls fpsimd_preserve_current_state() when current->mm is non-NULL, but this is no longer necessary. Historically TIF_FOREIGN_FPSTATE was only managed for user threads, and was never set for kernel threads. At the time, various functions attempted to avoid saving/restoring state for kernel threads by checking task_struct::mm to try to distinguish user threads from kernel threads. We added the current->mm check to arch_dup_task_struct() in commit: 6eb6c80187c5 ("arm64: kernel thread don't need to save fpsimd context.") ... where the intent was to avoid pointlessly saving state for kernel threads, which never had live state (and the saved state would never be consumed). Subsequently we began setting TIF_FOREIGN_FPSTATE for kernel threads, and removed most of the task_struct::mm checks in commit: df3fb9682045 ("arm64: fpsimd: Eliminate task->mm checks") ... but we missed the check in arch_dup_task_struct(), which is similarly redundant. Remove the redundant check from arch_dup_task_struct(). Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-11-mark.rutland@arm.com Signed-off-by: Will Deacon commit 99560c9452bb9819334bdb9c6e9e27c0f45f8829 Author: Mark Rutland Date: Thu May 8 14:26:29 2025 +0100 arm64/fpsimd: signal: Use SMSTOP behaviour in setup_return() Historically the behaviour of setup_return() was nondeterministic, depending on whether the task's FSIMD/SVE/SME state happened to be live. We fixed most of that in commit: 929fa99b1215 ("arm64/fpsimd: signal: Always save+flush state early") ... but we didn't decide on how clearing PSTATE.SM should behave, and left a TODO comment to that effect. Use the new task_smstop_sm() helper to make this behave as if an SMSTOP instruction was used to exit streaming mode. This would have been the most common behaviour prior to the commit above. Fixes: 40a8e87bb328 ("arm64/sme: Disable ZA and streaming mode when handling signals") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-10-mark.rutland@arm.com Signed-off-by: Will Deacon commit 6ef1d778ce56c5bde1ac0a1f85fd9710efde6724 Author: Mark Rutland Date: Thu May 8 14:26:28 2025 +0100 arm64/fpsimd: Add task_smstop_sm() In a few places we want to transition a task from streaming mode to non-streaming mode, e.g. signal delivery where we historically tried to use an SMSTOP SM instruction. Add a new helper to manipulate a task's state in the same way as an SMSTOP SM instruction. I have not added a corresponding helper to simulate the effects of SMSTART SM. Only ptrace transitions a task into streaming mode, and ptrace has distinct semantics for such transitions. Per ARM DDI 0487 L.a, section B1.4.6: | RRSWFQ | When the Effective value of PSTATE.SM is changed by any method from 0 | to 1, an entry to Streaming SVE mode is performed, and all implemented | bits of Streaming SVE register state are set to zero. | RKFRQZ | When the Effective value of PSTATE.SM is changed by any method from 1 | to 0, an exit from Streaming SVE mode is performed, and in the | newly-entered mode, all implemented bits of the SVE scalable vector | registers, SVE predicate registers, and FFR, are set to zero. Per ARM DDI 0487 L.a, section C5.2.9: | On entry to or exit from Streaming SVE mode, FPMR is set to 0 Per ARM DDI 0487 L.a, section C5.2.10: | On entry to or exit from Streaming SVE mode, FPSR.{IOC, DZC, OFC, UFC, | IXC, IDC, QC} are set to 1 and the remaining bits are set to 0. This means bits 0, 1, 2, 3, 4, 7, and 27 respectively, i.e. 0x0800009f Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-9-mark.rutland@arm.com Signed-off-by: Will Deacon commit 8738288a08b8367cd2a9f656498d7490e4473036 Author: Mark Rutland Date: Thu May 8 14:26:27 2025 +0100 arm64/fpsimd: Factor out {sve,sme}_state_size() helpers In subsequent patches we'll need to determine the SVE/SME state size for a given SVE VL and SME VL regardless of whether a task is currently configured with those VLs. Split the sizing logic out of sve_state_size() and sme_state_size() so that we don't need to open-code this logic elsewhere. At the same time, apply minor cleanups: * Move sve_state_size() into fpsimd.h, matching the placement of sme_state_size(). * Remove the feature checks from sve_state_size(). We only call sve_state_size() when at least one of SVE and SME are supported, and when either of the two is not supported, the task's corresponding SVE/SME vector length will be zero. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-8-mark.rutland@arm.com Signed-off-by: Will Deacon commit b255be426913e83dd79b920b77e94d3c47886c50 Author: Mark Rutland Date: Thu May 8 14:26:26 2025 +0100 arm64/fpsimd: Clarify sve_sync_*() functions The sve_sync_{to,from}_fpsimd*() functions are intended to extract/insert the currently effective FPSIMD state of a task regardless of whether the task's state is saved in FPSIMD format or SVE format. Historically they were only used by ptrace, but sve_sync_to_fpsimd() is now used more widely, and sve_sync_from_fpsimd_zeropad() may be used more widely in future. When FPSIMD/SVE state tracking was changed across commits: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") a0136be443d5 (arm64/fpsimd: Load FP state based on recorded data type") bbc6172eefdb ("arm64/fpsimd: SME no longer requires SVE register state") 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") ... sve_sync_to_fpsimd() was updated to consider task->thread.fp_type rather than the task's TIF_SVE and PSTATE.SM, but (apparently due to an oversight) sve_sync_from_fpsimd_zeropad() was left as-is, leaving the two inconsistent. Due to this, sve_sync_from_fpsimd_zeropad() may copy state from task->thread.uw.fpsimd_state into task->thread.sve_state when task->thread.fp_type == FP_STATE_FPSIMD. This is redundant (but benign) as task->thread.uw.fpsimd_state is the effective state that will be restored, and task->thread.sve_state will not be consumed. For consistency, and to avoid the redundant work, it better for sve_sync_from_fpsimd_zeropad() to consider task->thread.fp_type alone, matching sve_sync_to_fpsimd(). The naming of both functions is somehat unfortunate, as it is unclear when and why they copy state. It would be better to describe them in terms of the effective state. Considering all of the above, clean this up: * Adjust sve_sync_from_fpsimd_zeropad() to consider task->thread.fp_type. * Update comments to clarify the intended semantics/usage. I've removed the description that task->thread.sve_state must have been allocated, as this is only necessary when task->thread.fp_type == FP_STATE_SVE, which itself implies that task->thread.sve_state must have been allocated. * Rename the functions to more clearly indicate when/why they copy state: - sve_sync_to_fpsimd() => fpsimd_sync_from_effective_state() - sve_sync_from_fpsimd_zeropad => fpsimd_sync_to_effective_state_zeropad() Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-7-mark.rutland@arm.com Signed-off-by: Will Deacon commit 316283f276ebd5596d2015e4653198bdc2e138d4 Author: Mark Rutland Date: Thu May 8 14:26:25 2025 +0100 arm64/fpsimd: ptrace: Consistently handle partial writes to NT_ARM_(S)SVE Partial writes to the NT_ARM_SVE and NT_ARM_SSVE regsets using an payload are handled inconsistently and non-deterministically. A comment within sve_set_common() indicates that we intended that a partial write would preserve any effective FPSIMD/SVE state which was not overwritten, but this has never worked consistently, and during syscalls the FPSIMD vector state may be non-deterministically preserved and may be erroneously migrated between streaming and non-streaming SVE modes. The simplest fix is to handle a partial write by consistently zeroing the remaining state. As detailed below I do not believe this will adversely affect any real usage. Neither GDB nor LLDB attempt partial writes to these regsets, and the documentation (in Documentation/arch/arm64/sve.rst) has always indicated that state preservation was not guaranteed, as is says: | The effect of writing a partial, incomplete payload is unspecified. When the logic was originally introduced in commit: 43d4da2c45b2 ("arm64/sve: ptrace and ELF coredump support") ... there were two potential behaviours, depending on TIF_SVE: * When TIF_SVE was clear, all SVE state would be zeroed, excluding the low 128 bits of vectors shared with FPSIMD, FPSR, and FPCR. * When TIF_SVE was set, all SVE state would be zeroed, including the low 128 bits of vectors shared with FPSIMD, but excluding FPSR and FPCR. Note that as writing to NT_ARM_SVE would set TIF_SVE, partial writes to NT_ARM_SVE would not be idempotent, and if a first write preserved the low 128 bits, a subsequent (potentially identical) partial write would discard the low 128 bits. When support for the NT_ARM_SSVE regset was added in commit: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") ... the above behaviour was retained for writes to the NT_ARM_SVE regset, though writes to the NT_ARM_SSVE would always zero the SVE registers and would not inherit FPSIMD register state. This happened as fpsimd_sync_to_sve() only copied the FPSIMD regs when TIF_SVE was clear and PSTATE.SM==0. Subsequently, when FPSIMD/SVE state tracking was changed across commits: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") a0136be443d5 (arm64/fpsimd: Load FP state based on recorded data type") bbc6172eefdb ("arm64/fpsimd: SME no longer requires SVE register state") 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") ... there was no corresponding update to the ptrace code, nor to fpsimd_sync_to_sve(), which stil considers TIF_SVE and PSTATE.SM rather than the saved fp_type. The saved state can be in the FPSIMD format regardless of whether TIF_SVE is set or clear, and the saved type can change non-deterministically during syscalls. Consequently a subsequent partial write to the NT_ARM_SVE or NT_ARM_SSVE regsets may non-deterministically preserve the FPSIMD state, and may migrate this state between streaming and non-streaming modes. Clean this up by never attempting to preserve ANY state when writing an SVE payload to the NT_ARM_SVE/NT_ARM_SSVE regsets, zeroing all relevant state including FPSR and FPCR. This simplifies the code, makes the behaviour deterministic, and avoids migrating state between streaming and non-streaming modes. As above, I do not believe this should adversely affect existing userspace applications. At the same time, remove fpsimd_sync_to_sve(). It is no longer used, doesn't do what its documentation implies, and gets in the way of other cleanups and fixes. Fixes: 43d4da2c45b2 ("arm64/sve: ptrace and ELF coredump support") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: David Spickett Cc: Luis Machado Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-6-mark.rutland@arm.com Signed-off-by: Will Deacon commit be625d803c3bbfa9652697eb57589fe6f2f24b89 Author: Mark Rutland Date: Thu May 8 14:26:24 2025 +0100 arm64/fpsimd: signal: Consistently read FPSIMD context For historical reasons, restore_sve_fpsimd_context() has an open-coded copy of the logic from read_fpsimd_context(), which is used to either restore an FPSIMD-only context, or to merge FPSIMD state into an SVE state when restoring an SVE+FPSIMD context. The logic is *almost* identical. Refactor the logic to avoid duplication and make this clearer. This comes with two functional changes that I do not believe will be problematic in practice: * The user_fpsimd_state::size field will be checked in all restore paths that consume it user_fpsimd_state. The kernel always populates this field when delivering a signal, and so this should contain the expected value unless it has been corrupted. * If a read of user_fpsimd_state fails, we will return early without modifying TIF_SVE, the saved SVCR, or the save fp_type. This will leave the task in a consistent state, without potentially resurrecting stale FPSIMD state. A read of user_fpsimd_state should never fail unless the structure has been corrupted or the stack has been unmapped. Suggested-by: Will Deacon Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-5-mark.rutland@arm.com [will: Ensure read_fpsimd_context() returns negative error code or zero] Signed-off-by: Will Deacon commit b465ace42620970e840c7aeb2c44a6e3b1002fec Author: Mark Rutland Date: Thu May 8 14:26:23 2025 +0100 arm64/fpsimd: signal: Mandate SVE payload for streaming-mode state Non-streaming SVE state may be preserved without an SVE payload, in which case the SVE context only has a header with VL==0, and all state can be restored from the FPSIMD context. Streaming SVE state is always preserved with an SVE payload, where the SVE context header has VL!=0, and the SVE_SIG_FLAG_SM flag is set. The kernel never preserves an SVE context where SVE_SIG_FLAG_SM is set without an SVE payload. However, restore_sve_fpsimd_context() doesn't forbid restoring such a context, and will handle this case by clearing PSTATE.SM and restoring the FPSIMD context into non-streaming mode, which isn't consistent with the SVE_SIG_FLAG_SM flag. Forbid this case, and mandate an SVE payload when the SVE_SIG_FLAG_SM flag is set. This avoids an awkward ABI quirk and reduces the risk that later rework to this code permits configuring a task with PSTATE.SM==1 and fp_type==FP_STATE_FPSIMD. I've marked this as a fix given that we never intended to support this case, and we don't want anyone to start relying upon the old behaviour once we re-enable SME. Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250508132644.1395904-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit 1bf663a86a4505a97f08d06c373704de9441c891 Author: Mark Rutland Date: Thu May 8 14:26:22 2025 +0100 arm64/fpsimd: signal: Clear PSTATE.SM when restoring FPSIMD frame only On systems with SVE and/or SME, the kernel will always create SVE and FPSIMD signal frames when delivering a signal, but a user can manipulate signal frames such that a signal return only observes an FPSIMD signal frame. When this happens, restore_fpsimd_context() will restore state such that fp_type==FP_STATE_FPSIMD, but will leave PSTATE.SM as-is. It is possible for a user to set PSTATE.SM between syscall entry and execution of the sigreturn logic (e.g. via ptrace), and consequently the sigreturn may result in the task having PSTATE.SM==1 and fp_type==FP_STATE_FPSIMD. For various reasons it is not legitimate for a task to be in a state where PSTATE.SM==1 and fp_type==FP_STATE_FPSIMD. Portions of the user ABI are written with the requirement that streaming SVE state is always presented in SVE format rather than FPSIMD format, and as there is no mechanism to permit access to only the FPSIMD subset of streaming SVE state, streaming SVE state must always be saved and restored in SVE format. Fix restore_fpsimd_context() to clear PSTATE.SM when restoring an FPSIMD signal frame without an SVE signal frame. This matches the current behaviour when an SVE signal frame is present, but the SVE signal frame has no register payload (e.g. as is the case on SME-only systems which lack SVE). This change should have no effect for applications which do not alter signal frames (i.e. almost all applications). I do not expect non-{malicious,buggy} applications to hide the SVE signal frame, but I've chosen to clear PSTATE.SM rather than mandating the presence of an SVE signal frame in case there is some legacy (non-SME) usage that I am not currently aware of. For context, the SME handling was originally introduced in commit: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") ... and subsequently updated/fixed to handle SME-only systems in commits: 7dde62f0687c ("arm64/signal: Always accept SVE signal frames on SME only systems") f26cd7372160 ("arm64/signal: Always allocate SVE signal frames on SME only systems") Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 398edaa12f9cf2be7902f306fc023c20e3ebd3e4 Author: Mark Rutland Date: Thu May 8 14:26:21 2025 +0100 arm64/fpsimd: Do not discard modified SVE state Historically SVE state was discarded deterministically early in the syscall entry path, before ptrace is notified of syscall entry. This permitted ptrace to modify SVE state before and after the "real" syscall logic was executed, with the modified state being retained. This behaviour was changed by commit: 8c845e2731041f0f ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") That commit was intended to speed up workloads that used SVE by opportunistically leaving SVE enabled when returning from a syscall. The syscall entry logic was modified to truncate the SVE state without disabling userspace access to SVE, and fpsimd_save_user_state() was modified to discard userspace SVE state whenever in_syscall(current_pt_regs()) is true, i.e. when current_pt_regs()->syscallno != NO_SYSCALL. Leaving SVE enabled opportunistically resulted in a couple of changes to userspace visible behaviour which weren't described at the time, but are logical consequences of opportunistically leaving SVE enabled: * Signal handlers can observe the type of saved state in the signal's sve_context record. When the kernel only tracks FPSIMD state, the 'vq' field is 0 and there is no space allocated for register contents. When the kernel tracks SVE state, the 'vq' field is non-zero and the register contents are saved into the record. As a result of the above commit, 'vq' (and the presence of SVE register state) is non-deterministically zero or non-zero for a period of time after a syscall. The effective register state is still deterministic. Hopefully no-one relies on this being deterministic. In general, handlers for asynchronous events cannot expect a deterministic state. * Similarly to signal handlers, ptrace requests can observe the type of saved state in the NT_ARM_SVE and NT_ARM_SSVE regsets, as this is exposed in the header flags. As a result of the above commit, this is now in a non-deterministic state after a syscall. The effective register state is still deterministic. Hopefully no-one relies on this being deterministic. In general, debuggers would have to handle this changing at arbitrary points during program flow. Discarding the SVE state within fpsimd_save_user_state() resulted in other changes to userspace visible behaviour which are not desirable: * A ptrace tracer can modify (or create) a tracee's SVE state at syscall entry or syscall exit. As a result of the above commit, the tracee's SVE state can be discarded non-deterministically after modification, rather than being retained as it previously was. Note that for co-operative tracer/tracee pairs, the tracer may (re)initialise the tracee's state arbitrarily after the tracee sends itself an initial SIGSTOP via a syscall, so this affects realistic design patterns. * The current_pt_regs()->syscallno field can be modified via ptrace, and can be altered even when the tracee is not really in a syscall, causing non-deterministic discarding to occur in situations where this was not previously possible. Further, using current_pt_regs()->syscallno in this way is unsound: * There are data races between readers and writers of the current_pt_regs()->syscallno field. The current_pt_regs()->syscallno field is written in interruptible task context using plain C accesses, and is read in irq/softirq context using plain C accesses. These accesses are subject to data races, with the usual concerns with tearing, etc. * Writes to current_pt_regs()->syscallno are subject to compiler reordering. As current_pt_regs()->syscallno is written with plain C accesses, the compiler is free to move those writes arbitrarily relative to anything which doesn't access the same memory location. In theory this could break signal return, where prior to restoring the SVE state, restore_sigframe() calls forget_syscall(). If the write were hoisted after restore of some SVE state, that state could be discarded unexpectedly. In practice that reordering cannot happen in the absence of LTO (as cross compilation-unit function calls happen prevent this reordering), and that reordering appears to be unlikely in the presence of LTO. Additionally, since commit: f130ac0ae4412dbe ("arm64: syscall: unmask DAIF earlier for SVCs") ... DAIF is unmasked before el0_svc_common() sets regs->syscallno to the real syscall number. Consequently state may be saved in SVE format prior to this point. Considering all of the above, current_pt_regs()->syscallno should not be used to infer whether the SVE state can be discarded. Luckily we can instead use cpu_fp_state::to_save to track when it is safe to discard the SVE state: * At syscall entry, after the live SVE register state is truncated, set cpu_fp_state::to_save to FP_STATE_FPSIMD to indicate that only the FPSIMD portion is live and needs to be saved. * At syscall exit, once the task's state is guaranteed to be live, set cpu_fp_state::to_save to FP_STATE_CURRENT to indicate that TIF_SVE must be considered to determine which state needs to be saved. * Whenever state is modified, it must be saved+flushed prior to manipulation. The state will be truncated if necessary when it is saved, and reloading the state will set fp_state::to_save to FP_STATE_CURRENT, preventing subsequent discarding. This permits SVE state to be discarded *only* when it is known to have been truncated (and the non-FPSIMD portions must be zero), and ensures that SVE state is retained after it is explicitly modified. For backporting, note that this fix depends on the following commits: * b2482807fbd4 ("arm64/sme: Optimise SME exit on syscall entry") * f130ac0ae441 ("arm64: syscall: unmask DAIF earlier for SVCs") * 929fa99b1215 ("arm64/fpsimd: signal: Always save+flush state early") Fixes: 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") Fixes: f130ac0ae441 ("arm64: syscall: unmask DAIF earlier for SVCs") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250508132644.1395904-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 5e9ac644c40f8315877343034d1d6a8e056bd1dc Author: Sean Christopherson Date: Mon May 5 18:12:50 2025 -0700 KVM: selftests: Add a test for x86's fastops emulation Add a test to verify KVM's fastops emulation via forced emulation. KVM's so called "fastop" infrastructure executes the to-be-emulated instruction directly on hardware instead of manually emulating the instruction in software, using various shenanigans to glue together the emulator context and CPU state, e.g. to get RFLAGS fed into the instruction and back out for the emulator. Add testcases for all instructions that are low hanging fruit. While the primary goal of the selftest is to validate the glue code, a secondary goal is to ensure "emulation" matches hardware exactly, including for arithmetic flags that are architecturally undefined. While arithmetic flags may be *architecturally* undefined, their behavior is deterministic for a given CPU (likely a given uarch, and possibly even an entire family or class of CPUs). I.e. KVM has effectively been emulating underlying hardware behavior for years. Link: https://lore.kernel.org/r/20250506011250.1089254-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 37d8bad41d2b0a7d269affb85979a8e4114e177a Author: Li RongQing Date: Tue May 6 09:22:51 2025 +0800 KVM: Remove obsolete comment about locking for kvm_io_bus_read/write Nobody is actually calling these functions with slots_lock held, The srcu_dereference() in kvm_io_bus_read/write() precisely communicates both what is being protected, and what provides the protection. so the comments are no longer needed Suggested-by: Sean Christopherson Signed-off-by: Li RongQing Link: https://lore.kernel.org/r/20250506012251.2613-1-lirongqing@baidu.com Signed-off-by: Sean Christopherson commit b0b8d3aeadb5c49bf78305a1bc844e5a9378257c Author: Biju Das Date: Thu Apr 24 09:59:55 2025 +0100 spi: rpc-if: Add write support for memory-mapped area Add write support for memory-mapped area as xSPI interface require it. Signed-off-by: Biju Das Link: https://patch.msgid.link/20250424090000.136804-8-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown commit 1577683a925f63862e81d27246a3a0bc1f6e39ad Author: Steven Rostedt Date: Mon May 5 17:21:07 2025 -0400 tracing: Just use this_cpu_read() to access ignore_pid The ignore_pid boolean on the per CPU data descriptor is updated at sched_switch when a new task is scheduled in. If the new task is to be ignored, it is set to true, otherwise it is set to false. The current task should always have the correct value as it is updated when the task is scheduled in. Instead of breaking up the read of this value, which requires preemption to be disabled, just use this_cpu_read() which gives a snapshot of the value. Since the value will always be correct for a given task (because it's updated at sched switch) it doesn't need preemption disabled. This will also allow trace events to be called with preemption enabled. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212235.038958766@goodmis.org Signed-off-by: Steven Rostedt (Google) commit c638ebd8232e69daed2f2573365c48cd1e064a89 Author: Steven Rostedt Date: Mon May 5 17:21:06 2025 -0400 ftrace: Do not bother checking per CPU "disabled" flag The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. There's no reason for the function tracer to check it, if tracing is disabled, the ring buffer will not record the event anyway. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212234.868972758@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 6936298393d8d8bc3cec6b704f6a774162cf9bd3 Author: Steven Rostedt Date: Mon May 5 17:21:05 2025 -0400 tracing/mmiotrace: Remove reference to unused per CPU data pointer The mmiotracer referenced the per CPU array_buffer->data descriptor but never actually used it. Remove the references to it. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250505212234.696945463@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 17f89102fe23d7389085a8820550df688f79888a Author: Tomas Glozar Date: Fri Apr 25 11:18:39 2025 +0200 tracing/osnoise: Allow arbitrarily long CPU string Allocate kernel memory for processing CPU string (/sys/kernel/tracing/osnoise/cpus) also in osnoise_cpus_write to allow the writing of a CPU string of an arbitrary length. This replaces the 256-byte buffer, which is insufficient with the rising number of CPUs. For example, if I wanted to measure on every even CPU on a system with 256 CPUs, the string would be 456 characters long. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250425091839.343289-1-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) commit a54665ab7c20081cb6299d79dcab9960752bc741 Author: Steven Rostedt Date: Wed Apr 16 16:54:20 2025 -0400 ftrace: Comment that ftrace_func_mapper is freed with free_ftrace_hash() The structure ftrace_func_mapper only contains a single field and that is a ftrace_hash. It is used to abstract it out from a normal hash to control users of how it gets modified. The freeing of a ftrace_func_mapper structure is: free_ftrace_hash(&mapper->hash); Without context, this looks like a bug. It should be commented that it is not a bug and it is freed this way. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Mark Rutland Link: https://lore.kernel.org/20250416165420.5c717420@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 761ef34228222686f9f8c5fccd258e17a0c3d6de Author: Ilya Leoshkevich Date: Sun Apr 13 00:10:44 2025 +0200 ftrace: Expose call graph depth as unsigned int Depth is stored as int because the code uses negative values to break out of iterations. But what is recorded is always zero or positive. So expose it as unsigned int instead of int. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Sven Schnelle Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250412221847.17310-3-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Signed-off-by: Steven Rostedt (Google) commit 88cefd99ee265b18f851b911a75282146ecabc3d Author: Steven Rostedt Date: Thu Apr 10 15:38:30 2025 -0400 ftrace: Show subops in enabled_functions The function graph infrastructure uses subops of the function tracer. These are not shown in enabled_functions. Add a "subops:" section to the enabled_functions line to show what functions are attached via subops. If the subops is from the function_graph infrastructure, then show the entry and return callbacks that are attached. Here's an example of the output: schedule_on_each_cpu (1) tramp: 0xffffffffc03ef000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 subops: {ent:trace_graph_entry+0x0/0x20 ret:trace_graph_return+0x0/0x150} Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250410153830.5d97f108@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit aad548a95393cd08ad029fb2393a88d1b9ec1c48 Author: Andy Shevchenko Date: Mon Mar 31 10:14:53 2025 +0300 coresight: cti: Replace inclusion by struct fwnode_handle forward declaration The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Since the code wants to use the pointer to the struct fwnode_handle the forward declaration is provided. Signed-off-by: Andy Shevchenko Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250331071453.3987013-1-andriy.shevchenko@linux.intel.com commit 550e5608c25e0a886da1182386a6477f49caf2b7 Author: Sukrut Bellary Date: Tue Mar 18 16:00:41 2025 -0700 ARM: dts: am335x: Set wakeup-source for UART0 On am335x evm[1], UART0(UART1-HW) has a wakeup capability. Set wakeup-source, which will be used in the omap serial driver to enable the device wakeup capability. [1] https://www.ti.com/tool/TMDXEVM3358 [2] AM335x TRM - https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf Signed-off-by: Sukrut Bellary Tested-by: Judith Mendez Link: https://lore.kernel.org/r/20250318230042.3138542-4-sbellary@baylibre.com Signed-off-by: Kevin Hilman commit 47fe74098f3dadba2f9cc1e507d813a4aa93f5f3 Author: Sukrut Bellary Date: Tue Mar 18 16:00:39 2025 -0700 ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY Don't put the l4ls clk domain to sleep in case of standby. Since CM3 PM FW[1](ti-v4.1.y) doesn't wake-up/enable the l4ls clk domain upon wake-up, CM3 PM FW fails to wake-up the MPU. [1] https://git.ti.com/cgit/processor-firmware/ti-amx3-cm3-pm-firmware/ Signed-off-by: Sukrut Bellary Tested-by: Judith Mendez Link: https://lore.kernel.org/r/20250318230042.3138542-2-sbellary@baylibre.com Signed-off-by: Kevin Hilman commit 3c415b1df95c06ae4f9bdb166541ab366b862cc2 Author: Nitin Joshi Date: Tue May 6 00:01:52 2025 +0900 platform/x86: thinkpad-acpi: Add support for new hotkey for camera shutter switch New Lenovo Thinkpad models, e.g. the 'X9-14 Gen 1' and 'X9-15 Gen 1' has new shortcut on F9 key i.e to switch camera shutter and it send a new 0x131b hkey event when F9 key is pressed. This commit adds support for new hkey 0x131b. Reviewed-by: Mark Pearson Reviewed-by: Hans de Goede Signed-off-by: Nitin Joshi Link: https://lore.kernel.org/r/20250505150152.27968-1-nitjoshi@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9950f94e485908fc42e7bb2533aff13b7e97a36c Author: Dr. David Alan Gilbert Date: Mon May 5 16:25:58 2025 +0100 platform/x86/sony-laptop: Remove unused sony laptop camera code commit ba47652ba655 ("media: meye: remove this deprecated driver") removed the meye driver but left behind the code in sony-laptop.c which that driver used to call. Remove the sony_pic_camera_command() function, and the set of defines (SONY_PIC_COMMAND_*) in a header used for the interface and the static helpers it called. Cleanup remaining #defines. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250505152558.40526-1-linux@treblig.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c935ddfe65da020f5896fa58746fc7a57a876df3 Author: Srinivas Pandruvada Date: Mon May 5 13:27:22 2025 -0700 platform/x86: ISST: Do Not Restore SST MSRs on CPU Online Operation During CPU offline/online operations, the hardware retains MSR settings. Even if all CPUs are offlined, the package does not lose its MSR settings. Therefore, it is unnecessary to restore MSRs which are modified during the online operation, and this extra step can be removed. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250505202722.1048675-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c9a20142d3420a5113f560e7dea711d2f9693117 Author: Srinivas Pandruvada Date: Tue May 6 09:35:31 2025 -0700 platform/x86: ISST: Update minor version Update SST minor version after supporting SST-PP and SST-TF version 2. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250506163531.1061185-4-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d6644d737bec473a38dbd44a71553cacd636a920 Author: Srinivas Pandruvada Date: Tue May 6 09:35:30 2025 -0700 platform/x86: ISST: Support SST-PP revision 2 SST PP revision 2 added fabric 1 P0, P1 and Pm frequencies. Export them by using a new IOCTL ISST_IF_GET_PERF_LEVEL_FABRIC_INFO. This IOCTL requires platforms with SST PP revision 2 or higher. To accommodate potential future increases in fabric count and avoid ABI changes, support is extended for up to 8 fabrics. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250506163531.1061185-3-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 885d1c2a30b73e50d0bbc098ddd717e22ccff266 Author: Srinivas Pandruvada Date: Tue May 6 09:35:29 2025 -0700 platform/x86: ISST: Support SST-TF revision 2 SST-TF revision 2 supports a higher number of cores per bucket, as the current limit of 256 cores may be insufficient. To accommodate this, a new offset, "SST_TF_INFO-8," is introduced, allowing for a higher core count. Utilize this offset instead of the current "SST_TF_INFO-1" offset, based on SST-TF revision 2 or higher, and if there is a non-zero core count in any bucket. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20250506163531.1061185-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit df6061c276903ae718bf7f91262c74777b4be8e0 Author: Kurt Borja Date: Mon May 5 15:43:32 2025 -0300 Documentation: wmi: alienware-wmi: Add GPIO control documentation Add documentation for the GPIO control methods. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250505-awcc-gpio-v4-2-edda44c3a0dc@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit aee5cf935cf94006307600015a3df44eda55c4b9 Author: Kurt Borja Date: Mon May 5 15:43:31 2025 -0300 platform/x86: alienware-wmi-wmax: Expose GPIO debug methods Expose GPIO control methods present on the AWCC interface through DebugFS. These models come with an RGB lighting STM32 MCU, which usually has two GPIO pins with debug capabilities: - Pin 0: Device Firmware Update mode (DFU) - Pin 1: Negative Reset (NRST) Suggested-by: Gabriel Marcano Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250505-awcc-gpio-v4-1-edda44c3a0dc@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit cfd84b3f419bf0aec60ecddc92c61b539c339ec9 Author: Werner Sembach Date: Fri Apr 25 22:53:29 2025 +0200 platform/x86/tuxedo: Add virtual LampArray for TUXEDO NB04 devices The TUXEDO Sirius 16 Gen1 and TUXEDO Sirius 16 Gen2 devices have a per-key controllable RGB keyboard backlight. The firmware API for it is implemented via WMI. To make the backlight userspace configurable this driver emulates a LampArray HID device and translates the input from hidraw to the corresponding WMI calls. This is a new approach as the leds subsystem lacks a suitable UAPI for per-key keyboard backlights, and like this no new UAPI needs to be established. The handle_* functions an corresponding structs are named based on the HID spec: HID Usage Tables 1.6 -> 26 Lighting And Illumination Page (0x59) Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20250425210043.342288-2-wse@tuxedocomputers.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit feea7bd6b02d43a794e3f065650d89cf8d8e8e59 Author: Luke D. Jones Date: Sun Mar 23 15:34:21 2025 +1300 platform/x86: asus-wmi: Refactor Ally suspend/resume Adjust how the CSEE direct call hack is used. The results of months of testing combined with help from ASUS to determine the actual cause of suspend issues has resulted in this refactoring which immensely improves the reliability for devices which do not have the following minimum MCU FW version: - ROG Ally X: 313 - ROG Ally 1: 319 For MCU FW versions that match the minimum or above the CSEE hack is disabled and mcu_powersave set to on by default as there are no negatives beyond a slightly slower device reinitialization due to the MCU being powered off. As this is set only at module load time, it is still possible for mcu_powersave sysfs attributes to change it at runtime if so desired. Signed-off-by: Luke D. Jones Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250323023421.78012-3-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 00e005c952f74f50a3f86af96f56877be4685e14 Author: Luke D. Jones Date: Sun Mar 23 15:34:20 2025 +1300 hid-asus: check ROG Ally MCU version and warn ASUS have fixed suspend issues arising from a flag not being cleared in the MCU FW in both the ROG Ally 1 and the ROG Ally X. Implement a check and a warning to encourage users to update the FW to a minimum supported version. Signed-off-by: Luke D. Jones Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250323023421.78012-2-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b369395c895bfab678c653bb8929a967f233f55a Author: Antheas Kapenekakis Date: Sat Apr 26 19:29:55 2025 +0200 platform/x86: oxpec: Add support for the OneXPlayer G1 The OneXPlayer G1 is a new clamshell formfactor by OneXPlayer. It has the same registers as an OneXPlayer X1, with the only difference being the lack of a turbo led. Tested-by: Joshua Tam Suggested-by: Joshua Tam Signed-off-by: Joshua Tam Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250426172955.13957-3-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e25a982b38b3365f3c137c427db87be1ef040414 Author: Antheas Kapenekakis Date: Sat Apr 26 19:29:54 2025 +0200 platform/x86: oxpec: Make turbo val apply a bitmask On the OneXPlayer G1, the turbo register is multiplexed and contains an extra bit (0x02) which is set on boot. Therefore, we should only change the 0x40 bit to not affect other behavior. Collapse the disable and enable functions, and apply a mask for the turbo bit instead. Tested-by: Joshua Tam Suggested-by: Joshua Tam Signed-off-by: Joshua Tam Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250426172955.13957-2-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4e29dd3821dfc6531979c4a87ca450a236d78e46 Author: Vadim Pasternak Date: Sun May 4 19:55:07 2025 +0300 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add documentation for the new attributes: - Request and response for access to protetced flashes: "global_wp_request", "global_wp_response". Only for systems equipped with BMC - grant can be provided only by BMC in case its security policy allows to grant access. - Request to unlock ASICs, which has been shutdown due-to ASIC thermal event: "shutdown_unlock". - Data processor Units (DPU) boot progress: "boot_progress". - DPU reset causes: "reset_aux_pwr_or_reload", "reset_dpu_thermal", "reset_from_main_board". - Reset control for DPU components: "perst_rst", "phy_rst", "tpm_rst", "usbphy_rst". - DPU Unified Fabric Manager upgrade - "ufm_upgrade". - Hardware Id of Data Process Unit board - "dpu_id". Reviewed-by: Michael Shych Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250504165507.9003-3-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 56b0bb7f906907ae840796b942588802cf898675 Author: Vadim Pasternak Date: Sun May 4 19:55:06 2025 +0300 platform: mellanox: nvsw-sn2200: Add support for new system flavour Add support for SN2201 system flavour, which is fitting OCP rack form-factor and feeded from external power source through the rack standard busbar interface. Validate system type through DMI decode. For new system flavour: - Skip internal power supply configuration. - Attach power hotswap device. Reviewed-by: Michael Shych Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250504165507.9003-2-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c5925f438429330e649cef67cb364af03f2175f7 Author: Dan Carpenter Date: Fri May 2 11:40:15 2025 +0300 platform/x86: oxpec: Add a lower bounds check in oxp_psy_ext_set_prop() The "val->intval" variable is an integer which comes from the user. This code has an upper bounds check but the lower bounds check was accidentally omitted. The write_to_ec() take a u8 value as a parameter so negative values would be truncated to positive values in the 0-255 range. Return -EINVAL if the user passes a negative value. Fixes: 202593d1e86b ("platform/x86: oxpec: Add charge threshold and behaviour to OneXPlayer") Signed-off-by: Dan Carpenter Reviewed-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/aBSE71VKfBlQg_fZ@stanley.mountain Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a59211ee4610226251a723e9381a2c145a28fc4c Author: Xi Pardee Date: Fri Apr 25 12:52:33 2025 -0700 platform/x86:intel/pmc: Improve pmc_core_get_lpm_req() Minor improvements on pmc_core_get_lpm_req(). 1. Move the long comment to be above the function 2. Use %pe to print error pointer 3. Remove unneeded devm_kfree call These changes improves the code maintainability. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250425195237.493129-6-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1e24546894d25863772e0e7829ea7a3f693d471a Author: Xi Pardee Date: Fri Apr 25 12:52:32 2025 -0700 platform/x86:intel/pmc: Move error handling to init function Move error handling code to generic_core_init() function. The previous implementation is that init function called for "full cleanup" function when error occurs which is error prone. The init function should handle the error path itself to improve code maintainability. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250425195237.493129-5-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 6f130e048d390f1f63e05d899690bf2115175a17 Author: Xi Pardee Date: Fri Apr 25 12:52:31 2025 -0700 platform/x86:intel/pmc: Use devm for mutex_init Use devm_mutex_init() to avoid accidental resource leak in the future. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250425195237.493129-4-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b5d46539626833bf3bdd5a2295e85ec1c2a76a78 Author: Xi Pardee Date: Fri Apr 25 12:52:30 2025 -0700 platform/x86:intel/pmc: Create Intel PMC SSRAM Telemetry driver Convert ssram device related functionalities to a new driver named Intel PMC SSRAM Telemetry driver. Modify PMC Core driver to use API exported by the driver to discover and achieve devid and PWRMBASE address information for each available PMC. PMC Core driver needs to get PCI device when reading from telemetry regions. The new SSRAM driver binds to the SSRAM device and provides the following functionalities: 1. Look for and register telemetry regions available in SSRAM device. 2. Provide devid and PWRMBASE address information for the corresponding PMCs. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250425195237.493129-3-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 812bca7f7e73778a7022f862dc8c7c7d38b9a760 Author: Xi Pardee Date: Fri Apr 25 12:52:29 2025 -0700 platform/x86:intel/vsec: Change return type of intel_vsec_register Change return type of intel_vsec_register() to int. The current implementation does not indicate if the register fail or not. Change to return error code if it fails or if INTEL_VSEC config is not set. This is a preparation step to introduce a new SSRAM Telemetry driver that will be using this API. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250425195237.493129-2-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 841bceb532141d34b0e1700ea7e5ce45e40dd698 Author: Michał Kopeć Date: Fri Apr 25 13:21:47 2025 +0200 platform/x86: Introduce dasharo-acpi platform driver Introduce a driver for devices running Dasharo firmware. The driver supports thermal monitoring using a new ACPI interface in Dasharo. The initial version supports monitoring fan speeds, fan PWM duty cycles and system temperatures as well as determining which specific interfaces are implemented by firmware. It has been tested on a NovaCustom laptop running pre-release Dasharo firmware, which implements fan and thermal monitoring for the CPU and the discrete GPU, if present. Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Michał Kopeć Link: https://lore.kernel.org/all/20250507075214.36729-1-lukas.bulwahn@redhat.com Link: https://lore.kernel.org/r/20250425112147.69308-2-michal.kopec@3mdeb.com Signed-off-by: Ilpo Järvinen commit 12d3c69ba2734b5908e0ac8ac2dcbd0cc28fef3a Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:29 2025 +0000 mux: gpio: add optional regulator support Some of the external muxes needs powering up using a regulator. This is the case with Lenovo T14s laptop which has a external audio mux to handle US/EURO headsets. Add support to the driver to handle this optional regulator. Signed-off-by: Srinivas Kandagatla Tested-by: Christopher Obbard Reviewed-by: Johan Hovold Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20250327100633.11530-3-srinivas.kandagatla@linaro.org [krzk: Adjust dev_err message per Johan's review] Signed-off-by: Krzysztof Kozlowski commit e9c695067b68da6b39e0d70cd4a061d0f70050d3 Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:28 2025 +0000 dt-bindings: mux: add optional regulator binding to gpio mux On some platforms to minimise pop and click during switching between CTIA and OMTP headset an additional HiFi Mux Switch is used. Most common case is that this switch is switched on by default, but on some platforms this needs a regulator enable. One such platform is Lenovo T14s. Adds required bindings in gpio-mux to add such optional regulator. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250327100633.11530-2-srinivas.kandagatla@linaro.org Signed-off-by: Krzysztof Kozlowski commit 59529bbe642de4eb2191a541d9b4bae7eb73862e Author: Huang Yiwei Date: Wed May 7 12:57:57 2025 +0800 firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES SDEI usually initialize with the ACPI table, but on platforms where ACPI is not used, the SDEI feature can still be used to handle specific firmware calls or other customized purposes. Therefore, it is not necessary for ARM_SDE_INTERFACE to depend on ACPI_APEI_GHES. In commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in acpi_init()"), to make APEI ready earlier, sdei_init was moved into acpi_ghes_init instead of being a standalone initcall, adding ACPI_APEI_GHES dependency to ARM_SDE_INTERFACE. This restricts the flexibility and usability of SDEI. This patch corrects the dependency in Kconfig and splits sdei_init() into two separate functions: sdei_init() and acpi_sdei_init(). sdei_init() will be called by arch_initcall and will only initialize the platform driver, while acpi_sdei_init() will initialize the device from acpi_ghes_init() when ACPI is ready. This allows the initialization of SDEI without ACPI_APEI_GHES enabled. Fixes: dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in apci_init()") Cc: Shuai Xue Signed-off-by: Huang Yiwei Reviewed-by: Shuai Xue Reviewed-by: Gavin Shan Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250507045757.2658795-1-quic_hyiwei@quicinc.com Signed-off-by: Will Deacon commit 36114344675ddddb158dd6628359f83b44bfc1ac Merge: e3407cc5eeff5a 0f5757667ec0aa Author: Ulf Hansson Date: Thu May 8 13:31:15 2025 +0200 pmdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.15-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit b3f737ae959a0d6386fcb54d4bf252fe88ab309c Author: Dr. David Alan Gilbert Date: Tue May 6 00:38:38 2025 +0100 dma-buf/sw-sync: Remove unused debug code sync_file_debug_add() and sync_file_debug_remove() have been unused since 2016's commit d4cab38e153d ("staging/android: prepare sync_file for de-staging") Remove them. Since sync_file_debug_add was the only thing to add to sync_file_list_head, the code that dumps it in part of sync_info_debugfs_show can be removed, and the declaration of the list and it's associated lock can be removed. (The 'fences:\n...' marker in that debugfs file is left in so as not to change the output) That leaves the sync_print_sync_file() helper unused, and is thus removed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Christian König Signed-off-by: Christian König Link: https://lore.kernel.org/r/20250505233838.105668-1-linux@treblig.org commit 00b0300cf1e265b8f3fa57106b940eff6f388d57 Author: Gavin Shan Date: Tue Mar 11 14:37:18 2025 +1000 KVM: arm64: Drop sort_memblock_regions() Drop sort_memblock_regions() and avoid sorting the copied memory regions to be ascending order on their base addresses, because the source memory regions should have been sorted correctly when they are added by memblock_add() or its variants. This is generally reverting commit a14307f5310c ("KVM: arm64: Sort the hypervisor memblocks"). No functional changes intended. Signed-off-by: Gavin Shan Reviewed-by: Quentin Perret Acked-by: Will Deacon Link: https://lore.kernel.org/r/20250311043718.91004-1-gshan@redhat.com Signed-off-by: Marc Zyngier commit c855506257063f444044d0a85a2e9ad9ab1c7ecd Author: Thomas Gleixner Date: Thu May 8 12:05:38 2025 +0200 genirq/cpuhotplug: Fix up lock guards conversion brainf..t The lock guard conversion converted raw_spin_lock_irq() to scoped_guard(raw_spinlock), which is obviously bogus and makes lockdep mightily unhappy. Note to self: Copy and pasta without using brain is a patently bad idea. Fixes: 88a4df117ad6 ("genirq/cpuhotplug: Convert to lock guards") Reported-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov commit 7f3ef3ab810dea0d956968473a32673d1c6ba478 Author: Kuninori Morimoto Date: Wed May 7 05:00:16 2025 +0000 ALSA: usb: mixer_us16x08: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87frhhaucf.wl-kuninori.morimoto.gx@renesas.com commit f0fe4663cb72f443caac3b348e3827ff64d2b7c9 Author: Kuninori Morimoto Date: Wed May 7 05:00:12 2025 +0000 ALSA: usb: mixer_quirks: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87h61xaucj.wl-kuninori.morimoto.gx@renesas.com commit a25ed230e6af138f646512e65cb5ce46ad2fa533 Author: Kuninori Morimoto Date: Wed May 7 05:00:08 2025 +0000 ALSA: pci: ali5451: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87ikmdauco.wl-kuninori.morimoto.gx@renesas.com commit 65468d1d3b15d948b8b73b49ec0341b27c5d3412 Author: Kuninori Morimoto Date: Wed May 7 05:00:03 2025 +0000 ALSA: pci: asihpi: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87jz6taucs.wl-kuninori.morimoto.gx@renesas.com commit 9aedbdff5ff9545c60c72b2313f06fe95a57cc94 Author: Kuninori Morimoto Date: Wed May 7 04:59:59 2025 +0000 ALSA: pci: au88x0: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87ldr9aucw.wl-kuninori.morimoto.gx@renesas.com commit 3abd2e168d69c7bbd80a622112065e0577a8cca0 Author: Kuninori Morimoto Date: Wed May 7 04:59:54 2025 +0000 ALSA: usb: mixer: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87msbpaud1.wl-kuninori.morimoto.gx@renesas.com commit 27c464a88610fc1e743cc9820e2455361fb20d3b Author: Kuninori Morimoto Date: Wed May 7 04:59:50 2025 +0000 ALSA: usb: midi: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87o6w5aud5.wl-kuninori.morimoto.gx@renesas.com commit 483dd12dbe34c6d4e71d4d543bcb1292bcb62d08 Author: Kuninori Morimoto Date: Wed May 7 04:59:45 2025 +0000 ALSA: pci: hda: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87plglauda.wl-kuninori.morimoto.gx@renesas.com commit 792f318e117738da6455ff1a8a12c23eed9cf961 Author: Kuninori Morimoto Date: Wed May 7 04:59:39 2025 +0000 ALSA: virtio: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87r011audg.wl-kuninori.morimoto.gx@renesas.com commit a6e8ecb2fb6f8a75ec0c676df1bb6adf1d2fa90d Author: Kuninori Morimoto Date: Wed May 7 04:59:31 2025 +0000 ALSA: core: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87selhaudp.wl-kuninori.morimoto.gx@renesas.com commit ee4023b1ed0bdbc0c02f9d775d2ca742bb2480dd Author: Kuninori Morimoto Date: Wed May 7 04:59:26 2025 +0000 ALSA: i2c: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87tt5xaudu.wl-kuninori.morimoto.gx@renesas.com commit 2086e63b9b1499483efb7a63838061bb4cf27612 Author: Kuninori Morimoto Date: Wed May 7 04:59:15 2025 +0000 ALSA: sh: use snd_kcontrol_chip() We can use snd_kcontrol_chip(). Let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/87v7qdaue4.wl-kuninori.morimoto.gx@renesas.com commit 84e351d8a5755c60e14b7e42d70c2415541928d7 Author: Uwe Kleine-König Date: Thu May 8 10:17:06 2025 +0200 pwm: Restore alphabetic ordering in Kconfig and Makefile The drivers are nearly ordered alphabetically by the symbol name. Fix the few outliers. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250508081706.751209-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 5d51fdd122d7dcb1e1f7ef8ccd13d258bfd0b6b8 Author: Dr. David Alan Gilbert Date: Thu May 8 01:02:25 2025 +0100 ALSA: gus: Remove deadcode snd_gus_use_dec(), snd_gus_use_inc() and snd_gf1_print_voice_registers() last uses were removed in 2007 by commit e5723b41abe5 ("[ALSA] Remove sequencer instrument layer") Remove them. While there, remove big #if 0 blocks next to the code being deleted. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250508000225.195766-1-linux@treblig.org Signed-off-by: Takashi Iwai commit 28a09d9e42c500204fd79e91f40434b16b4c9372 Author: Shenghao Ding Date: Wed May 7 12:58:13 2025 +0800 ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver Some common parts, such as struct tas2781_hda{...} and some audio kcontrols are moved into an independent lib for code cleanup. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250507045813.151-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit 845b997761a40cd028d1a04a66b34f0871318f28 Author: Dr. David Alan Gilbert Date: Mon May 5 02:10:37 2025 +0100 ALSA: hda: Remove unused snd_hdac_stream_get_spbmaxfifo snd_hdac_stream_get_spbmaxfifo() was originally added in 2015 in commit ee8bc4df1b5a ("ALSA: hdac: Add support to enable SPIB for hdac ext stream") when it was originally called snd_hdac_ext_stream_set_spbmaxfifo, it was renamed snd_hdac_ext_stream_get_spbmaxfifo shortly after and was finally renamed to snd_hdac_stream_get_spbmaxfifo in 2022. But it was never used. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250505011037.340592-1-linux@treblig.org Signed-off-by: Takashi Iwai commit 42fdb67852a42b20f3bcf7580a7dd5c3f094f4a2 Author: Dr. David Alan Gilbert Date: Mon May 5 02:09:22 2025 +0100 ALSA: hda: Remove unused snd_hda_add_nid snd_hda_add_nid() last use was removed in 2014 by commit db8e8a9dc972 ("ALSA: hda - Remove the obsoleted static quirk codes from patch_cmedia.c") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250505010922.340534-1-linux@treblig.org Signed-off-by: Takashi Iwai commit 9cf78722003178b09c409df9aafe9d79e5b9a74e Author: Ingo Molnar Date: Wed May 7 20:25:59 2025 +0200 accel/habanalabs: Don't build the driver on UML The following commit: 288a4ff0ad29 ("x86/msr: Move rdtsc{,_ordered}() to ") removed the include from the accel/habanalabs driver, which broke the build on UML: drivers/accel/habanalabs/common/habanalabs_ioctl.c:326:23: error: call to undeclared function 'rdtsc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Make the driver depend on 'X86 && X86_64', instead of just 'X86_64', thus it won't be built on UML. Suggested-by: Johannes Berg Reported-by: kernel test robot Signed-off-by: Ingo Molnar Reviewed-by: Johannes Berg Cc: Ofir Bitton Cc: Oded Gabbay Link: https://lore.kernel.org/r/202505080003.0t7ewxGp-lkp@intel.com commit 798dc3f19c9e3855c18c3afb610bc5d27195ef44 Author: Biju Das Date: Wed May 7 17:21:44 2025 +0100 memory: renesas-rpc-if: Add missing static keyword Fix the below sparse warnings: symbol 'rpcif_impl' was not declared. Should it be static? symbol 'xspi_impl' was not declared. Should it be static? Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505072013.1EqwjtaR-lkp@intel.com/ Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250507162146.140494-1-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit a4c95b924d513728df8631471eb3b1c300909e21 Author: Michal Wilczynski Date: Thu Apr 3 11:44:25 2025 +0200 riscv: dts: thead: Add device tree VO clock controller VO clocks reside in a different address space from the AP clocks on the T-HEAD SoC. Add the device tree node of a clock-controller to handle VO address space as well. Reviewed-by: Drew Fustini Signed-off-by: Michal Wilczynski Signed-off-by: Drew Fustini commit 46431fd5224f7f3bab2823992ae1cf6f2700f1ce Author: Dave Marquardt Date: Tue May 6 11:00:04 2025 -0500 net: ibmveth: Refactored veth_pool_store for better maintainability Make veth_pool_store detect requested pool changes, close device if necessary, update pool, and reopen device. Signed-off-by: Dave Marquardt Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250506160004.328347-1-davemarq@linux.ibm.com Signed-off-by: Jakub Kicinski commit 4e0146a94c516e0ce119cd34743108c7652497bd Author: Eric Biggers Date: Wed May 7 10:09:01 2025 -0700 crypto: arm64/sha256 - fix build when CONFIG_PREEMPT_VOLUNTARY=y Fix the build of sha256-ce.S when CONFIG_PREEMPT_VOLUNTARY=y by passing the correct label to the cond_yield macro. Also adjust the code to execute only one branch instruction when CONFIG_PREEMPT_VOLUNTARY=n. Fixes: 6e36be511d28 ("crypto: arm64/sha256 - implement library instead of shash") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505071811.yYpLUbav-lkp@intel.com/ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3bbc902ece47198825d682c8579214306fd0748c Author: Herbert Xu Date: Wed May 7 19:36:58 2025 +0800 crypto: powerpc/poly1305 - Add missing poly1305_emit_arch Rename poly1305_emit_64 to poly1305_emit_arch to conform with the expectation of the poly1305 library. Reported-by: Thorsten Leemhuis Fixes: 14d31979145d ("crypto: powerpc/poly1305 - Add block-only interface") Signed-off-by: Herbert Xu Tested-by: Thorsten Leemhuis Signed-off-by: Herbert Xu commit 8147e75bd5f0977f6d389f6cdb4f10956cc3d88f Author: Colin Ian King Date: Wed May 7 15:09:07 2025 +0100 ASoC: rt712-sdca: remove redundant else path of if statement There is an if/else check where the else part is executed if adc_vol_flag is true, this else path checks if adc_vol_flag is true (which is a redundant second check) and the if path is always taken. Remove the redundant check and remove the else path since that can never occur. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250507140907.255562-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 62a5897607747e63c64a8b7a7fc212b9b29c2a7a Author: Mac Chiang Date: Wed May 7 20:26:49 2025 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: Add rt713_vb_l3_rt1320_l3 support This patch adds support for the rt712_vb multi-function codec and rt1320 amplifier. Both devices are connected via a single Soundwire link 3, sharing the sdw3-clock, sdw3-data[0] and sdw3-data[1] data lanes respectively. Signed-off-by: Mac Chiang Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250507122649.153579-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit e79cc43b4833d9f5651d64ca313edf598df50053 Author: Mac Chiang Date: Wed May 7 20:26:48 2025 +0800 ASoC: Intel: soc-acpi-intel-lnl/ptl-match: Simplify variable name The variable name contains duplications;thus, remove the redundant strings. Signed-off-by: Mac Chiang Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250507122649.153579-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 0a055ec03d0a0f4356cdc89f609669e327ad0f2b Merge: 015b5b8ed194ef 720447bd0b24d2 Author: Jakub Kicinski Date: Wed May 7 18:21:52 2025 -0700 Merge branch 'netlink-specs-remove-phantom-structs' Jakub Kicinski says: ==================== netlink: specs: remove phantom structs rt-netlink and nl80211 have a few structs which may be helpful for Python decoding of binary attrs, but which don't actually exist in the C uAPI. This prevents us from using struct pointers for binary types in C. We could support this situation better in the codegen, or add these structs to uAPI. That said Johannes suggested we remove the WiFi structs for now, and the rt-link ones are semi-broken. Drop the struct definitions, for now, if someone has a need to use such structs in Python (as opposed to them being defined for completeness) we can revist. v1: https://lore.kernel.org/20250505170215.253672-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250506194101.696272-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 720447bd0b24d2f0904eb4055e559fa9a8fe42ac Author: Jakub Kicinski Date: Tue May 6 12:41:00 2025 -0700 netlink: specs: rt-link: remove implicit structs from devconf devconf is even odder than SNMP. On input it reports an array of u32s which seem to be indexed by the enum values - 1. On output kernel expects a nest where each attr has the enum type as the nla type. sub-type: u32 is probably best we can do right now. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250506194101.696272-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ab91c140bea9c2c23ee34ae831e06806e044a80e Author: Jakub Kicinski Date: Tue May 6 12:40:59 2025 -0700 netlink: specs: remove implicit structs for SNMP counters uAPI doesn't define structs for the SNMP counters, just enums to index them as arrays. Switch to the same representation in the spec. C codegen will soon need all the struct types to actually exist. Note that the existing definition was broken, anyway, as the first member should be the number of counters reported. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250506194101.696272-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6c2422396d53e2f37ddf5821acb7704df15699c9 Author: Jakub Kicinski Date: Tue May 6 12:40:58 2025 -0700 netlink: specs: ovs: correct struct names C codegen will soon support using struct types for binary attrs. Correct the struct names in OvS specs. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250506194101.696272-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f22e764d7775b9f6e0ffd7d944d9c740156d5f34 Author: Jakub Kicinski Date: Tue May 6 12:40:57 2025 -0700 netlink: specs: nl80211: drop structs which are not uAPI C codegen will soon use structs for binary types. A handful of structs in WiFi carry information elements from the wire, defined by the standard. The structs are not part of uAPI, so we can't use them in C directly. We could add them to the uAPI or add some annotation to tell the codegen to output a local version to the user header. The former seems arbitrary since we don't expose structs for most of the standard. The latter seems like a lot of work for a rare occurrence. Drop the struct info for now. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/004030652d592b379e730be2f0344bebc4a03475.camel@sipsolutions.net Link: https://patch.msgid.link/20250506194101.696272-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 015b5b8ed194efe2d2faaf4c3ee4fcfb346c14d8 Merge: 3e52667a9c328b d307b9feb833f3 Author: Jakub Kicinski Date: Wed May 7 18:21:28 2025 -0700 Merge branch 'tools-ynl-gen-split-presence-metadata' Jakub Kicinski says: ==================== tools: ynl-gen: split presence metadata The presence metadata indicates whether given attribute was/should be added to the Netlink message. We have 3 types of such metadata: - bit presence for simple values like integers, - len presence for variable size attrs, like binary and strings, - count for arrays. Previously this information was spread around with first two types living in a dedicated sub-struct called _present. The counts resided directly in the main struct with an n_ prefix. Reshuffle these an uniformly store them in dedicated sub-structs. The immediate motivation is that current scheme causes name collisions for TC. ==================== Link: https://patch.msgid.link/20250505165208.248049-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d307b9feb833f3f413db36dcec01dcad749a763f Author: Jakub Kicinski Date: Mon May 5 09:52:07 2025 -0700 tools: ynl-gen: move the count into a presence struct too While we reshuffle the presence members, move the counts as well. Previously array count members would have been place directly in the struct, so: struct family_op_req { struct { u32 a:1; u32 b:1; } _present; struct { u32 bin; } _len; u32 a; u64 b; const unsigned char *bin; u32 n_multi; << count u32 *multi; << objects }; Since len has been moved to its own presence struct move the count as well: struct family_op_req { struct { u32 a:1; u32 b:1; } _present; struct { u32 bin; } _len; struct { u32 multi; << count } _count; u32 a; u64 b; const unsigned char *bin; u32 *multi; << objects }; This improves the consistency and allows us to remove some hacks in the codegen. Unlike for len there is no known name collision with the existing scheme. Link: https://patch.msgid.link/20250505165208.248049-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b8ae9f70aaf134dc57f227fd1730b64ce89e109d Author: Jakub Kicinski Date: Mon May 5 09:52:06 2025 -0700 tools: ynl-gen: split presence metadata Each YNL struct contains the data and a sub-struct indicating which fields are valid. Something like: struct family_op_req { struct { u32 a:1; u32 b:1; u32 bin_len; } _present; u32 a; u64 b; const unsigned char *bin; }; Note that the bin object 'bin' has a length stored, and that length has a _len suffix added to the field name. This breaks if there is a explicit field called bin_len, which is the case for some TC actions. Move the length fields out of the _present struct, create a new struct called _len: struct family_op_req { struct { u32 a:1; u32 b:1; } _present; struct { u32 bin; } _len; u32 a; u64 b; const unsigned char *bin; }; This should prevent name collisions and help with the packing of the struct. Unfortunately this is a breaking change, but hopefully the migration isn't too painful. Link: https://patch.msgid.link/20250505165208.248049-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a512be0ecb147e25ec0492335953ae8ad8e28fcb Author: Jakub Kicinski Date: Mon May 5 09:52:05 2025 -0700 tools: ynl-gen: rename basic presence from 'bit' to 'present' Internal change to the code gen. Rename how we indicate a type has a single bit presence from using a 'bit' string to 'present'. This is a noop in terms of generated code but will make next breaking change easier. Reviewed-by: David Wei Link: https://patch.msgid.link/20250505165208.248049-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit fba4ceaa242d2bdf4c04b77bda41d32d02d3925d Author: Dan Williams Date: Wed Apr 30 13:33:31 2025 -0700 configfs-tsm-report: Fix NULL dereference of tsm_ops Unlike sysfs, the lifetime of configfs objects is controlled by userspace. There is no mechanism for the kernel to find and delete all created config-items. Instead, the configfs-tsm-report mechanism has an expectation that tsm_unregister() can happen at any time and cause established config-item access to start failing. That expectation is not fully satisfied. While tsm_report_read(), tsm_report_{is,is_bin}_visible(), and tsm_report_make_item() safely fail if tsm_ops have been unregistered, tsm_report_privlevel_store() tsm_report_provider_show() fail to check for ops registration. Add the missing checks for tsm_ops having been removed. Now, in supporting the ability for tsm_unregister() to always succeed, it leaves the problem of what to do with lingering config-items. The expectation is that the admin that arranges for the ->remove() (unbind) of the ${tsm_arch}-guest driver is also responsible for deletion of all open config-items. Until that deletion happens, ->probe() (reload / bind) of the ${tsm_arch}-guest driver fails. This allows for emergency shutdown / revocation of attestation interfaces, and requires coordinated restart. Fixes: 70e6f7e2b985 ("configfs-tsm: Introduce a shared ABI for attestation reports") Cc: stable@vger.kernel.org Cc: Suzuki K Poulose Cc: Steven Price Cc: Sami Mujawar Cc: Borislav Petkov (AMD) Cc: Tom Lendacky Reviewed-by: Kuppuswamy Sathyanarayanan Reported-by: Cedric Xing Reviewed-by: Kai Huang Link: https://patch.msgid.link/20250430203331.1177062-1-dan.j.williams@intel.com Signed-off-by: Dan Williams commit fa332f5dc6fc662ad7d3200048772c96b861cf6b Author: Dan Carpenter Date: Mon May 5 17:34:15 2025 +0300 ipmi:msghandler: Fix potential memory corruption in ipmi_create_user() The "intf" list iterator is an invalid pointer if the correct "intf->intf_num" is not found. Calling atomic_dec(&intf->nr_users) on and invalid pointer will lead to memory corruption. We don't really need to call atomic_dec() if we haven't called atomic_add_return() so update the if (intf->in_shutdown) path as well. Fixes: 8e76741c3d8b ("ipmi: Add a limit on the number of users that may use IPMI") Signed-off-by: Dan Carpenter Message-ID: Signed-off-by: Corey Minyard commit 971a00454d9604493ecfe4ca8fb8de0fad2863e3 Author: Corey Minyard Date: Tue Apr 22 12:07:28 2025 -0500 ipmi:watchdog: Use the new interface for panic messages It's available, remove all the duplicate code. Signed-off-by: Corey Minyard commit 6f7f6605c9aeb472b5d4101b263b1fc5dc3cf623 Author: Corey Minyard Date: Tue Apr 22 12:06:02 2025 -0500 ipmi:msghandler: Export and fix panic messaging capability Don't have the other users that do things at panic time (the watchdog) do all this themselves, provide a function to do it. Also, with the new design where most stuff happens at thread context, a few things needed to be fixed to avoid doing locking in a panic context. Signed-off-by: Corey Minyard commit be816bc4f8413f227a48278f14693674d9296fe2 Author: Corey Minyard Date: Tue Apr 15 19:56:27 2025 -0500 Documentation:ipmi: Remove comments about interrupt level Callbacks no longer run at interrupt level or bh, so remove those comments. Signed-off-by: Corey Minyard commit 6bd0eb6d759b9a22c5509ea04e19c2e8407ba418 Author: Corey Minyard Date: Thu Apr 10 14:44:26 2025 -0500 ipmi:ssif: Fix a shutdown race It was possible for the SSIF thread to stop and quit before the kthread_stop() call because ssif->stopping was set before the stop. So only exit the SSIF thread is kthread_should_stop() returns true. There is no need to wake the thread, as the wait will be interrupted by kthread_stop(). Signed-off-by: Corey Minyard commit 87105e07806767b81910d165441607c1461ba2b8 Author: Corey Minyard Date: Thu Apr 10 13:54:56 2025 -0500 ipmi:msghandler: Don't deliver messages to deleted users Check to see if they have been destroyed before trying to deliver a message. Signed-off-by: Corey Minyard commit ada2abaddad9c2c6557353b866c39e3aec9c8443 Author: Corey Minyard Date: Fri Apr 4 16:08:09 2025 -0500 ipmi:si: Rework startup of IPMI devices It is possible in some situations that IPMI devices won't get started up properly. This change makes it so all non-duplicate devices will get started up. Signed-off-by: Corey Minyard commit ed59cd28aff9259ea09f57d4e3304abed219179f Author: Corey Minyard Date: Thu Mar 27 13:17:51 2025 -0500 ipmi:msghandler: Add a error return from unhandle LAN cmds If we get a command from a LAN channel, return an error instead of just throwing it away. Signed-off-by: Corey Minyard commit 8871e77ec73b0b6da6d80677ea49e3f462d03fda Author: Corey Minyard Date: Fri Mar 21 16:46:02 2025 -0500 ipmi:msghandler: Shut down lower layer first at unregister This makes sure any outstanding messages are returned to the user before the interface is cleaned up. Signed-off-by: Corey Minyard commit 60afcc429c5bc8ca364b6cdf057b69b66b8ebd76 Author: Corey Minyard Date: Fri Mar 21 15:40:07 2025 -0500 ipmi:msghandler: Remove proc_fs.h It's no longer used. Signed-off-by: Corey Minyard commit f2a31163d6a32143f9e97418fbb30b398c1ebeb7 Author: Corey Minyard Date: Fri Mar 21 15:15:05 2025 -0500 ipmi:msghandler: Don't check for shutdown when returning responses The lower level interface shouldn't attempt to unregister if it has a callback in the pending queue. Signed-off-by: Corey Minyard commit ff2d2bc9f29d26f5eff9b8fdde225fd705f5555f Author: Corey Minyard Date: Fri Mar 21 15:12:06 2025 -0500 ipmi:msghandler: Don't acquire a user refcount for queued messages Messages already have a refcount for the user, so there's no need to account for a new one. As part of this, grab a refcount to the interface when processing received messages. The messages can be freed there, cause the user then the interface to be freed. Signed-off-by: Corey Minyard commit 84fe1ebcc92cf3880130bfe51040769d7931423a Author: Corey Minyard Date: Fri Mar 21 14:46:46 2025 -0500 ipmi:msghandler: Fix locking around users and interfaces Now that SRCU is gone from IPMI, it can no longer be sloppy about locking. Use the users mutex now when sending a message, not the big ipmi_interfaces mutex, because it can result in a recursive lock. The users mutex will work because the interface destroy code claims it after setting the interface in shutdown mode. Also, due to the same changes, rework the refcounting on users and interfaces. Remove the refcount to an interface when the user is freed, not when it is destroyed. If the interface is destroyed while the user still exists, the user will still point to the interface to test that it is valid if the user tries to do anything but delete the user. Signed-off-by: Corey Minyard commit 83d19f03f3e5e1421d7cda78d0bec80e1769e8aa Author: Corey Minyard Date: Tue Mar 18 21:46:05 2025 -0500 ipmi:msghandler: Remove some user level processing in panic mode When run to completion is set, don't call things that will claim mutexes or call user callbacks. Signed-off-by: Corey Minyard commit 5017b1b02640234b08ad38a046043f143670dea2 Author: Corey Minyard Date: Tue Mar 18 20:41:42 2025 -0500 ipmi: Add a note about the pretimeout callback You can't do IPMI calls from the callback, it's called with locks held. Signed-off-by: Corey Minyard commit b2b69ee34b07579fc7c33e2c62a88f19514b052f Author: Corey Minyard Date: Tue Mar 18 20:13:34 2025 -0500 ipmi:watchdog: Change lock to mutex Now that the msghandler does all callbacks in user threads, there is no need to have a lock any more, a mutex will work fine. Signed-off-by: Corey Minyard commit 9e91f8a6c8688e27f4ccce7db457da87d6458836 Author: Corey Minyard Date: Tue Mar 18 19:57:42 2025 -0500 ipmi:msghandler: Remove srcu for the ipmi_interfaces list With reworks srcu is no longer necessary, this simplifies locking a lot. Signed-off-by: Corey Minyard commit 3be997d5a64a349b025abb0243433f2a620b31fd Author: Corey Minyard Date: Tue Mar 18 19:01:17 2025 -0500 ipmi:msghandler: Remove srcu from the ipmi user structure With the restructures done, srcu is no longer required, and it's fairly onerous. Signed-off-by: Corey Minyard commit 8b85c0f3cb21220537f8fa5e13dd393836df27c2 Author: Corey Minyard Date: Tue Mar 18 19:03:08 2025 -0500 ipmi:msghandler: Use the system_wq, not system_bh_wq Everything can be run in thread context now, don't use the bh one. Signed-off-by: Corey Minyard commit 646e40bbc7edbcb0b9e78ad425486e7fb918fcf9 Author: Corey Minyard Date: Tue Mar 18 17:27:41 2025 -0500 ipmi_msghandler: Change the events lock to a mutex It can only be called from thread context now. Signed-off-by: Corey Minyard commit 557602f23307b20d5dc9d4331314772604fd6ac0 Author: Corey Minyard Date: Tue Mar 18 17:24:29 2025 -0500 ipmi:msghandler: Deliver user messages in a work queue This simplifies the locking and lets us remove some weird event handling code. deliver_response() and friends can now be called from an atomic context. Signed-off-by: Corey Minyard commit 742219863ee940c4cb3dcfe10030c080804d3a00 Author: Corey Minyard Date: Tue Mar 18 16:08:45 2025 -0500 ipmi:msghandler: Move timer handling into a work queue Get all operations that manipulate the interface list into thread context. Signed-off-by: Corey Minyard commit 305923bd3b61e3ee4716f6aed7f68daadbe6ceaf Author: Corey Minyard Date: Tue Mar 18 15:23:23 2025 -0500 ipmi:msghandler: Rename recv_work to smi_work It handles both receive and transmit functions, make the name generic. Signed-off-by: Corey Minyard commit 8de2640e2c13dabba766f0d209f24637e714c1d4 Author: Corey Minyard Date: Tue Mar 18 15:20:18 2025 -0500 ipmi:msghandler: Use READ_ONCE on run_to_completion It needs to be read only once because it's used in lock/unlock scenarios. Signed-off-by: Corey Minyard commit 9cba938aecbbffe95286e0b07f21ec6d4b12b42c Author: Corey Minyard Date: Tue Apr 15 14:30:58 2025 -0500 ipmi:si: Move SI type information into an info structure Andy reported: Debian clang version 19.1.7 is not happy when compiled with `make W=1` (note, CONFIG_WERROR=y is the default): ipmi_si_platform.c:268:15: error: cast to smaller integer type 'enum si_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] 268 | io.si_type = (enum si_type)device_get_match_data(&pdev->dev); The IPMI SI type is an enum that was cast into a pointer that was then cast into an enum again. That's not the greatest style, so instead create an info structure to hold the data and use that. Reported-by: Andy Shevchenko Closes: https://lore.kernel.org/lkml/20250415085156.446430-1-andriy.shevchenko@linux.intel.com/ Suggested-by: Andy Shevchenko Tested-by: Andy Shevchenko Signed-off-by: Corey Minyard commit b54695dae995590fa5db899234871ce49fd077a8 Author: Mario Limonciello Date: Tue May 6 15:49:48 2025 -0500 drm/amd: Add per-ring reset for vcn v5.0.0 use If there is a problem requiring a reset of the VCN engine, it is better to reset the VCN engine rather than the entire GPU. Add a reset callback for the ring which will stop and start VCN if an issue happens. Reviewed-by: Alex Deucher Link: https://lore.kernel.org/r/20250506204948.12048-4-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit b8b6e6f1654dee77064167ec4ebed0d64935baef Author: Mario Limonciello Date: Tue May 6 15:49:47 2025 -0500 drm/amd: Add per-ring reset for vcn v4.0.0 use If there is a problem requiring a reset of the VCN engine, it is better to reset the VCN engine rather than the entire GPU. Add a reset callback for the ring which will stop and start VCN if an issue happens. Link: https://lore.kernel.org/r/20250506204948.12048-3-mario.limonciello@amd.com Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit d1a46cdd00539a573b7b7b67f7e5668344ac5231 Author: Mario Limonciello Date: Tue May 6 15:49:46 2025 -0500 drm/amd: Add per-ring reset for vcn v4.0.5 use There is a problem occurring on VCN 4.0.5 where in some situations a job is timing out. This triggers a job timeout which then causes a GPU reset for recovery. That has exposed a number of issues with GPU reset that have since been fixed. But also a GPU reset isn't actually needed for this circumstance. Just restarting the ring is enough. Add a reset callback for the ring which will stop and start VCN if the issue happens. Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12528 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3909 Link: https://lore.kernel.org/r/20250506204948.12048-2-mario.limonciello@amd.com Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 5c937b4a6050316af37ef214825b6340b5e9e391 Author: Alex Deucher Date: Wed Apr 30 12:45:04 2025 -0400 drm/amdgpu/hdp4: use memcfg register to post the write for HDP flush Reading back the remapped HDP flush register seems to cause problems on some platforms. All we need is a read, so read back the memcfg register. Fixes: c9b8dcabb52a ("drm/amdgpu/hdp4.0: do a posting read when flushing HDP") Reported-by: Alexey Klimov Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e8614fc769df0343627e39eab4f52bc9ff8c075b Author: Alex Deucher Date: Wed Apr 30 12:34:17 2025 -0400 Revert "drm/amdgpu: Use generic hdp flush function" This reverts commit 18a878fd8aef0ec21648a3782f55a79790cd4073. Revert this temporarily to make it easier to fix a regression in the HDP handling. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4c83d4538bb28de6a75cd52854ac9c912d437e7b Author: Dr. David Alan Gilbert Date: Wed May 7 01:24:25 2025 +0100 drm/amd/pm/smu13: Remove unused smu_v3 functions smu_v13_0_display_clock_voltage_request() and smu_v13_0_set_min_deep_sleep_dcefclk() were added in 2020 by commit c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") but have remained unused. Remove them. smu_v13_0_display_clock_voltage_request() was the only user of smu_v13_0_set_hard_freq_limited_range(). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 2c599d66b95f905794a92c2fee740d926999a121 Author: Dr. David Alan Gilbert Date: Wed May 7 01:24:24 2025 +0100 drm/amd/pm/smu11: Remove unused smu_v11_0_get_dpm_level_range The last use of smu_v11_0_get_dpm_level_range() was removed in 2020 by commit 46a301e14e8a ("drm/amd/powerplay: drop unnecessary Navi1x specific APIs") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 1d8d8b8d1430eeedb4ae2d00da999d824ce9b61a Author: Dr. David Alan Gilbert Date: Wed May 7 01:24:23 2025 +0100 drm/amd/pm/smu7: Remove unused smu7_copy_bytes_from_smc smu7_copy_bytes_from_smc() was added in 2016 by commit 1ff55f465103 ("drm/amd/powerplay: implement smu7_smumgr for asics with smu ip version 7.") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit c2a3bac7c8ee95f23b235db8cd5520b9d574ff8b Author: Sunil Khatri Date: Wed May 7 14:48:48 2025 +0530 drm/amdgpu: fix the indentation fix the indentation drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:6992 gfx_v11_ip_dump compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202505071619.7sHTLpNg-lkp@intel.com/ Signed-off-by: Sunil Khatri Reviewed-by: Arvind Yadav Signed-off-by: Alex Deucher commit 8465f0a372e5157d257ee2a3a715337adaf7e733 Author: Huang Rui Date: Mon Apr 21 13:51:30 2025 +0800 drm/amdgpu: remove mdelay in psp v12 Since secure firmware is more stable than bring up phase, I believe we don't need such mdelays any more before wait PSP response on PSP v12. Signed-off-by: Huang Rui Reviewed-by: Trigger Huang Signed-off-by: Alex Deucher commit 2d274bf7099bc5e95fabaa93f23d0eb2977187ad Author: Shane Xiao Date: Wed Apr 23 17:28:50 2025 +0800 amd/amdkfd: Trigger segfault for early userptr unmmapping If applications unmap the memory before destroying the userptr, it needs trigger a segfault to notify user space to correct the free sequence in VM debug mode. v2: Send gpu access fault to user space v3: Report gpu address to user space, remove unnecessary params v4: update pr_err into one line, remove userptr log info Signed-off-by: Shane Xiao Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8e320f67d49d6bb28eba9c8bded66ad04b0acf0b Author: Shane Xiao Date: Thu Apr 24 13:15:01 2025 +0800 drm/amdgpu: Add debug bit for userptr usage In VM debug mode, it is desirable to notify the application to correct the freeing sequence by unmapping the memory before destroying the userptr in the old userptr path. Add a bitmask to decide whether to send gpu vm fault to the applition. Signed-off-by: Shane Xiao Reviewed-by: Christian König Signed-off-by: Alex Deucher commit def41146b96a9e292a17cddb1ac97007f41c44bc Author: Prike Liang Date: Tue May 6 16:32:23 2025 +0800 drm/amdgpu: unreserve the gem BO before returning from attach error It requires unlocking the reserved gem BO before returning from attaching the eviction fence error. Signed-off-by: Prike Liang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 926c79ad6ecde21e7e2d7415f873d57c364611f1 Author: Prike Liang Date: Wed Apr 23 20:26:48 2025 +0800 drm/amdgpu: promote the implicit sync to the dependent read fences The driver doesn't want to implicitly sync on the DMA_RESV_USAGE_BOOKKEEP usage fences, and the BOOKEEP fences should be synced explicitly. So, as the VM implicit syncing only need to return and sync the dependent read fences. Signed-off-by: Prike Liang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6edc89645c01ae9bd9407f84608564e7521f0117 Author: Alex Deucher Date: Tue Apr 29 09:45:03 2025 -0400 drm/amdgpu/psp: mark securedisplay TA as optional This is an optional TA which is only available on certain embedded systems. Mark it as optional to avoid user confusion. This mirrors what we already do for other optional TAs. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4181 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 06f2dcc241e7e5c681f81fbc46cacdf4bfd7d6d7 Author: Alex Deucher Date: Thu May 1 13:46:46 2025 -0400 drm/amdgpu: fix pm notifier handling Set the s3/s0ix and s4 flags in the pm notifier so that we can skip the resource evictions properly in pm prepare based on whether we are suspending or hibernating. Drop the eviction as processes are not frozen at this time, we we can end up getting stuck trying to evict VRAM while applications continue to submit work which causes the buffers to get pulled back into VRAM. v2: Move suspend flags out of pm notifier (Mario) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4178 Fixes: 2965e6355dcd ("drm/amd: Add Suspend/Hibernate notification callback support") Cc: Mario Limonciello Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 086809c82c96116aed78f762e4f1d61a4e0210a7 Author: Ellen Pan Date: Tue Apr 29 17:18:44 2025 -0400 drm/amdgpu: Implement unrecoverable error message handling for VFs This notification may arrive in VF mailbox while polling for response from another event. This patches covers the following scenarios: - If VF is already in RMA state, then do not attempt to contact the host. Host will ignore the VF after sending the notification. - If the notification is detected during polling, then set the RMA status, and return error to caller. - If the notification arrives by interrupt, then set the RMA status and queue a reset. This reset will fail and VF will stop runtime services. Reviewed-by: Shravan Kumar Gande Signed-off-by: Victor Skvortsov Signed-off-by: Ellen Pan Signed-off-by: Alex Deucher commit 6be34e1d1f0efc624a7505ac98609d8c6e732b85 Author: Ellen Pan Date: Tue Apr 29 17:00:50 2025 -0400 drm/amdgpu: Add unrecoverable error message definitions for VFs Host may stop runtime services after reaching a bad page threshold. This notification will indicate to the VF that it no longer has access to the GPU. Reviewed-by: Shravan Kumar Gande Signed-off-by: Victor Skvortsov Signed-off-by: Ellen Pan Signed-off-by: Alex Deucher commit ce8f7d95899c2869b47ea6ce0b3e5bf304b2fff4 Author: Alex Deucher Date: Thu May 1 13:00:16 2025 -0400 Revert "drm/amd: Stop evicting resources on APUs in suspend" This reverts commit 3a9626c816db901def438dc2513622e281186d39. This breaks S4 because we end up setting the s3/s0ix flags even when we are entering s4 since prepare is used by both flows. The causes both the S3/s0ix and s4 flags to be set which breaks several checks in the driver which assume they are mutually exclusive. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3634 Cc: Mario Limonciello Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 5c89ceda9984498b28716944633a9a01cbb2c90d Author: Ruijing Dong Date: Fri May 2 11:19:26 2025 -0400 drm/amdgpu/vcn: using separate VCN1_AON_SOC offset VCN1_AON_SOC_ADDRESS_3_0 offset varies on different VCN generations, the issue in vcn4.0.5 is caused by a different VCN1_AON_SOC_ADDRESS_3_0 offset. This patch does the following: 1. use the same offset for other VCN generations. 2. use the vcn4.0.5 special offset 3. update vcn_4_0 and vcn_5_0 Acked-by: Saleemkhan Jamadar Reviewed-by: Leo Liu Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher commit af7160c25c68520299db40d608892810904fa064 Author: Prike Liang Date: Tue Apr 15 10:42:19 2025 +0800 drm/amdgpu: fix the eviction fence dereference The dma_resv_add_fence() already refers to the added fence. So when attaching the evciton fence to the gem bo, it needn't refer to it anymore. Signed-off-by: Prike Liang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5da3d8820dd3202d5ae871050e45facb2787235d Author: Ellen Pan Date: Tue Apr 29 16:48:09 2025 -0400 drm/amdgpu: Implement Runtime Bad Page query for VFs Host will send a notification when new bad pages are available. Uopn guest request, the first 256 bad page addresses will be placed into the PF2VF region. Guest should pause the PF2VF worker thread while the copy is in progress. Reviewed-by: Shravan Kumar Gande Signed-off-by: Victor Skvortsov Signed-off-by: Ellen Pan Signed-off-by: Alex Deucher commit 6615f1ad34d379c3ddb67f924702bbbcc602507b Author: Ellen Pan Date: Tue Apr 29 16:22:53 2025 -0400 drm/amdgpu: Add Runtime Bad Page message definitions for VFs Currently VFs rely on poison consumption interrupt from HW to kick off the bad page retirement process. Part of this process includes a VF reset. This patch adds the following: 1) Host Bad Pages notification message. 2) Guest request bad pages message. When combined, VFs are able to reserve the pages early, and potentially avoid future poison consumption that will disrupt user services from consequent FLR. Reviewed-by: Shravan Kumar Gande Signed-off-by: Victor Skvortsov Signed-off-by: Ellen Pan Signed-off-by: Alex Deucher commit dd3d035a78384f7389020810ac2882de50efe934 Author: Rodrigo Siqueira Date: Sat May 3 14:38:43 2025 -0600 Documentation/gpu: Add new entries to amdgpu glossary Add some additional entries. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c8305c6327b4c2ef812a6eca544d8e7c5e8a0b30 Author: Rodrigo Siqueira Date: Sat May 3 14:38:42 2025 -0600 drm/amdgpu: Add documentation to some parts of the AMDGPU ring and wb Add some random documentation associated with the ring buffer manipulations and writeback. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f0be138691d9294760b59e034a9594bc23c2884e Author: Eric Huang Date: Fri May 2 14:58:02 2025 -0400 drm/amdkfd: change error to warning message for SDMA queues creation SDMA doesn't support oversubsciption, it is the user matter to create queues over HW limit, but not supposed to be a KFD error. Signed-off-by: Eric Huang Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit d01ca8708d95a561f6462a15cad94a2c0bec7042 Author: Harry Wentland Date: Mon Apr 28 16:26:20 2025 -0400 drm/amd/display: Don't check for NULL divisor in fixpt code [Why] We check for a NULL divisor but don't act on it. This check does nothing other than throw a warning. It does confuse static checkers though: See https://lkml.org/lkml/2025/4/26/371 [How] Drop the ASSERTs in both DC and SPL variants. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Fixes: 6efc0ab3b05d ("drm/amd/display: add back quality EASF and ISHARP and dc dependency changes") Signed-off-by: Harry Wentland Cc: Linus Torvalds Cc: Leo Li Cc: Alex Deucher Acked-by: Alex Deucher Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit e2255687c81398a32210306024f08b1615b87885 Author: Ivan Shamliev Date: Thu Apr 24 18:14:53 2025 +0300 drm/amd/display: Use true/false for boolean variables in DML2 core files Replace 0 and 1 with false and true for boolean variables in dml2_core_dcn4_calcs.c and dml2_core_utils.c to align with the Linux kernel coding style guidelines, which recommend using C99 bool type with true/false values. Signed-off-by: Ivan Shamliev Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit 3e71fc7c4c1a350cc94b25c0be20de01a7cda8ff Author: James Flowers Date: Sat May 3 14:18:51 2025 -0700 drm/amd/display: adds kernel-doc comment for dc_stream_remove_writeback() Adds kernel-doc for externally linked dc_stream_remove_writeback function. Signed-off-by: James Flowers Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit 8020361d51eea5145402e450d91b083bccdcd874 Author: Tomas Glozar Date: Wed Apr 30 16:46:51 2025 +0200 rtla: Define _GNU_SOURCE in timerlat_bpf.c Newer versions of glibc include a definition of struct sched_attr in bits/sched.h (included through sched.h which is included by rtla). Commit 0eecee340672 ("tools/rtla: fix collision with glibc sched_attr/sched_set_attr") has modified the definition of struct sched_attr in utils.h, so that it is only applied with older versions of glibc that do not define it, in order to prevent build failure. The definition in bits/sched.h depends on _GNU_SOURCE. timerlat_bpf.c does not define _GNU_SOURCE, making it fall back to the definition in utils.h. The latter has two fields less, leading to shifted offsets of struct timerlat_params in timerlat_bpf_init. Because of the shift, timerlat_bpf_init incorrectly reads params->entries as 0 for timerlat-hist and disables the creation of histogram maps, causing breakage in BPF sample collection mode: $ rtla timerlat hist -d 1s Error pulling BPF data Fix the issue by also defining _GNU_SOURCE in timerlat_bpf.c. Cc: John Kacur Cc: Luis Goncalves Link: https://lore.kernel.org/20250430144651.621766-1-tglozar@redhat.com Fixes: e34293ddcebd ("rtla/timerlat: Add BPF skeleton to collect samples") Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) commit 4528b9052731f14c1a9be16b98e33c9401e6d1bc Author: Darrick J. Wong Date: Wed May 7 14:18:34 2025 -0700 xfs: allow sysadmins to specify a maximum atomic write limit at mount time Introduce a mount option to allow sysadmins to specify the maximum size of an atomic write. If the filesystem can work with the supplied value, that becomes the new guaranteed maximum. The value mustn't be too big for the existing filesystem geometry (max write size, max AG/rtgroup size). We dynamically recompute the tr_atomic_write transaction reservation based on the given block size, check that the current log size isn't less than the new minimum log size constraints, and set a new maximum. The actual software atomic write max is still computed based off of tr_atomic_ioend the same way it has for the past few commits. Note also that xfs_calc_atomic_write_log_geometry is non-static because mkfs will need that. Signed-off-by: Darrick J. Wong Signed-off-by: John Garry Reviewed-by: John Garry commit 9dffc58f23849783ab2f6c2c9f5af9b94a42666f Author: John Garry Date: Wed May 7 14:18:33 2025 -0700 xfs: update atomic write limits Update the limits returned from xfs_get_atomic_write_{min, max, max_opt)(). No reflink support always means no CoW-based atomic writes. For updating xfs_get_atomic_write_min(), we support blocksize only and that depends on HW or reflink support. For updating xfs_get_atomic_write_max(), for no reflink, we are limited to blocksize but only if HW support. Otherwise we are limited to combined limit in mp->m_atomic_write_unit_max. For updating xfs_get_atomic_write_max_opt(), ultimately we are limited by the bdev atomic write limit. If xfs_get_atomic_write_max() does not report > 1x blocksize, then just continue to report 0 as before. Reviewed-by: Darrick J. Wong [djwong: update comments in the helper functions] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: John Garry commit 0c438dcc31504bf4f50b20dc52f8f5ca7fab53e2 Author: John Garry Date: Wed May 7 14:18:32 2025 -0700 xfs: add xfs_calc_atomic_write_unit_max() Now that CoW-based atomic writes are supported, update the max size of an atomic write for the data device. The limit of a CoW-based atomic write will be the limit of the number of logitems which can fit into a single transaction. In addition, the max atomic write size needs to be aligned to the agsize. Limit the size of atomic writes to the greatest power-of-two factor of the agsize so that allocations for an atomic write will always be aligned compatibly with the alignment requirements of the storage. Function xfs_atomic_write_logitems() is added to find the limit the number of log items which can fit in a single transaction. Amend the max atomic write computation to create a new transaction reservation type, and compute the maximum size of an atomic write completion (in fsblocks) based on this new transaction reservation. Initially, tr_atomic_write is a clone of tr_itruncate, which provides a reasonable level of parallelism. In the next patch, we'll add a mount option so that sysadmins can configure their own limits. [djwong: use a new reservation type for atomic write ioends, refactor group limit calculations] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong [jpg: rounddown power-of-2 always] Reviewed-by: Christoph Hellwig Signed-off-by: John Garry commit 9baeac3ab1f83689f6105853e7682030b33751fd Author: John Garry Date: Wed May 7 14:18:31 2025 -0700 xfs: add xfs_file_dio_write_atomic() Add xfs_file_dio_write_atomic() for dedicated handling of atomic writes. Now HW offload will not be required to support atomic writes and is an optional feature. CoW-based atomic writes will be supported with out-of-places write and atomic extent remapping. Either mode of operation may be used for an atomic write, depending on the circumstances. The preferred method is HW offload as it will be faster. If HW offload is not available then we always use the CoW-based method. If HW offload is available but not possible to use, then again we use the CoW-based method. If available, HW offload would not be possible for the write length exceeding the HW offload limit, the write spanning multiple extents, unaligned disk blocks, etc. Apart from the write exceeding the HW offload limit, other conditions for HW offload usage can only be detected in the iomap handling for the write. As such, we use a fallback method to issue the write if we detect in the ->iomap_begin() handler that HW offload is not possible. Special code -ENOPROTOOPT is returned from ->iomap_begin() to inform that HW offload is not possible. In other words, atomic writes are supported on any filesystem that can perform out of place write remapping atomically (i.e. reflink) up to some fairly large size. If the conditions are right (a single correctly aligned overwrite mapping) then the filesystem will use any available hardware support to avoid the filesystem metadata updates. Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: John Garry commit b1e09178b73adf10dc87fba9aee7787a7ad26874 Author: John Garry Date: Wed May 7 14:18:31 2025 -0700 xfs: commit CoW-based atomic writes atomically When completing a CoW-based write, each extent range mapping update is covered by a separate transaction. For a CoW-based atomic write, all mappings must be changed at once, so change to use a single transaction. Note that there is a limit on the amount of log intent items which can be fit into a single transaction, but this is being ignored for now since the count of items for a typical atomic write would be much less than is typically supported. A typical atomic write would be expected to be 64KB or less, which means only 16 possible extents unmaps, which is quite small. Reviewed-by: Darrick J. Wong [djwong: add tr_atomic_ioend] Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: John Garry commit 11ab31909d7cc177fab981cd0d6822a570244599 Author: John Garry Date: Wed May 7 14:18:30 2025 -0700 xfs: add large atomic writes checks in xfs_direct_write_iomap_begin() For when large atomic writes (> 1x FS block) are supported, there will be various occasions when HW offload may not be possible. Such instances include: - unaligned extent mapping wrt write length - extent mappings which do not cover the full write, e.g. the write spans sparse or mixed-mapping extents - the write length is greater than HW offload can support - no hardware support at all In those cases, we need to fallback to the CoW-based atomic write mode. For this, report special code -ENOPROTOOPT to inform the caller that HW offload-based method is not possible. In addition to the occasions mentioned, if the write covers an unallocated range, we again judge that we need to rely on the CoW-based method when we would need to allocate anything more than 1x block. This is because if we allocate less blocks that is required for the write, then again HW offload-based method would not be possible. So we are taking a pessimistic approach to writes covering unallocated space. Reviewed-by: Darrick J. Wong [djwong: various cleanups] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: John Garry commit bd1d2c21d5d2496f01b2d1fce07ec2e0da05dd3e Author: John Garry Date: Wed May 7 14:18:29 2025 -0700 xfs: add xfs_atomic_write_cow_iomap_begin() For CoW-based atomic writes, reuse the infrastructure for reflink CoW fork support. Add ->iomap_begin() callback xfs_atomic_write_cow_iomap_begin() to create staging mappings in the CoW fork for atomic write updates. The general steps in the function are as follows: - find extent mapping in the CoW fork for the FS block range being written - if part or full extent is found, proceed to process found extent - if no extent found, map in new blocks to the CoW fork - convert unwritten blocks in extent if required - update iomap extent mapping and return The bulk of this function is quite similar to the processing in xfs_reflink_allocate_cow(), where we try to find an extent mapping; if none exists, then allocate a new extent in the CoW fork, convert unwritten blocks, and return a mapping. Performance testing has shown the XFS_ILOCK_EXCL locking to be quite a bottleneck, so this is an area which could be optimised in future. Christoph Hellwig contributed almost all of the code in xfs_atomic_write_cow_iomap_begin(). Reviewed-by: Darrick J. Wong [djwong: add a new xfs_can_sw_atomic_write to convey intent better] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: John Garry commit 0ea88ed47bb1912377975f310da10183e0f6c5bb Author: John Garry Date: Wed May 7 14:18:28 2025 -0700 xfs: refine atomic write size check in xfs_file_write_iter() Currently the size of atomic write allowed is fixed at the blocksize. To start to lift this restriction, partly refactor xfs_report_atomic_write() to into helpers - xfs_get_atomic_write_{min, max}() - and use those helpers to find the per-inode atomic write limits and check according to that. Also add xfs_get_atomic_write_max_opt() to return the optimal limit, and just return 0 since large atomics aren't supported yet. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: John Garry commit 514df14fae97c91521ef53faf3a386e26afb8bee Author: John Garry Date: Wed May 7 14:18:28 2025 -0700 xfs: refactor xfs_reflink_end_cow_extent() Refactor xfs_reflink_end_cow_extent() into separate parts which process the CoW range and commit the transaction. This refactoring will be used in future for when it is required to commit a range of extents as a single transaction, similar to how it was done pre-commit d6f215f359637. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: John Garry commit 6baf4cc47a741024d37e6149d5d035d3fc9ed1fe Author: John Garry Date: Wed May 7 14:18:27 2025 -0700 xfs: allow block allocator to take an alignment hint Add a BMAPI flag to provide a hint to the block allocator to align extents according to the extszhint. This will be useful for atomic writes to ensure that we are not being allocated extents which are not suitable (for atomic writes). Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: John Garry commit 85bf2dfa3f1287d349fa1f92b673ca67d13c7784 Author: Darrick J. Wong Date: Wed May 7 14:18:26 2025 -0700 xfs: ignore HW which cannot atomic write a single block Currently only HW which can write at least 1x block is supported. For supporting atomic writes > 1x block, a CoW-based method will also be used and this will not be resticted to using HW which can write >= 1x block. However for deciding if HW-based atomic writes can be used, we need to start adding checks for write length < HW min, which complicates the code. Indeed, a statx field similar to unit_max_opt should also be added for this minimum, which is undesirable. HW which can only write > 1x blocks would be uncommon and quite weird, so let's just not support it. Signed-off-by: "Darrick J. Wong" Signed-off-by: John Garry Reviewed-by: Christoph Hellwig commit 805f89881252a9aee30799b8a395deec79c13414 Author: Darrick J. Wong Date: Wed May 7 14:18:25 2025 -0700 xfs: add helpers to compute transaction reservation for finishing intent items In the transaction reservation code, hoist the logic that computes the reservation needed to finish one log intent item into separate helper functions. These will be used in subsequent patches to estimate the number of blocks that an online repair can commit to reaping in the same transaction as the change committing the new data structure. Signed-off-by: Darrick J. Wong Reviewed-by: John Garry Signed-off-by: John Garry commit 6d1bdc739140aa9b446182a00a7a4e03e2162861 Author: Darrick J. Wong Date: Wed May 7 14:18:25 2025 -0700 xfs: add helpers to compute log item overhead Add selected helpers to estimate the transaction reservation required to write various log intent and buffer items to the log. These helpers will be used by the online repair code for more precise estimations of how much work can be done in a single transaction. Signed-off-by: Darrick J. Wong Reviewed-by: John Garry Signed-off-by: John Garry commit 13c7c54bd0fa0a7937ce394e8c416c6a70e0a6ed Author: Darrick J. Wong Date: Wed May 7 14:18:24 2025 -0700 xfs: separate out setting buftarg atomic writes limits Separate out setting buftarg atomic writes limits into a dedicated function, xfs_configure_buftarg_atomic_writes(), to keep the specific functionality self-contained. For naming consistency, rename xfs_setsize_buftarg() -> xfs_configure_buftarg(). Signed-off-by: Darrick J. Wong [jpg: separate out from patch "xfs: ignore HW which ..."] Signed-off-by: John Garry Reviewed-by: Christoph Hellwig commit 5af9f5508477f088320fdce6c0fd69f960aee319 Author: John Garry Date: Wed May 7 14:18:23 2025 -0700 xfs: rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomic_write() In future we will want to be able to check if specifically HW offload-based atomic writes are possible, so rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomicwrite(). Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig [djwong: add an underscore to be consistent with everything else] Signed-off-by: Darrick J. Wong Signed-off-by: John Garry commit 84270a1a30c964e51af3e489411b4e178c4f153e Author: Darrick J. Wong Date: Wed May 7 14:18:22 2025 -0700 xfs: only call xfs_setsize_buftarg once per buffer target It's silly to call xfs_setsize_buftarg from xfs_alloc_buftarg with the block device LBA size because we don't need to ask the block layer to validate a geometry number that it provided us. Instead, set the preliminary bt_meta_sector* fields to the LBA size in preparation for reading the primary super. However, we still want to flush and invalidate the pagecache for all three block devices before we start reading metadata from those devices, so call sync_blockdev() per bdev in xfs_alloc_buftarg(). This will enable a subsequent patch to validate hw atomic write geometry against the filesystem geometry. Signed-off-by: Darrick J. Wong Reviewed-by: John Garry [jpg: call sync_blockdev() from xfs_alloc_buftarg()] Signed-off-by: John Garry Reviewed-by: Christoph Hellwig commit 5d894321c49e61379189b0ff605f316e39cbd1e9 Author: John Garry Date: Wed May 7 14:18:21 2025 -0700 fs: add atomic write unit max opt to statx XFS will be able to support large atomic writes (atomic write > 1x block) in future. This will be achieved by using different operating methods, depending on the size of the write. Specifically a new method of operation based in FS atomic extent remapping will be supported in addition to the current HW offload-based method. The FS method will generally be appreciably slower performing than the HW-offload method. However the FS method will be typically able to contribute to achieving a larger atomic write unit max limit. XFS will support a hybrid mode, where HW offload method will be used when possible, i.e. HW offload is used when the length of the write is supported, and for other times FS-based atomic writes will be used. As such, there is an atomic write length at which the user may experience appreciably slower performance. Advertise this limit in a new statx field, stx_atomic_write_unit_max_opt. When zero, it means that there is no such performance boundary. Masks STATX{_ATTR}_WRITE_ATOMIC can be used to get this new field. This is ok for older kernels which don't support this new field, as they would report 0 in this field (from zeroing in cp_statx()) already. Furthermore those older kernels don't support large atomic writes - apart from block fops, but there would be consistent performance there for atomic writes in range [unit min, unit max]. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Acked-by: Darrick J. Wong Signed-off-by: John Garry commit 6a38c51a2557d4d50748818a858d507c250f3bee Author: Tiezhu Yang Date: Tue Apr 22 15:49:17 2025 +0800 rtla: Define __NR_sched_setattr for LoongArch When executing "make -C tools/tracing/rtla" on LoongArch, there exists the following error: src/utils.c:237:24: error: '__NR_sched_setattr' undeclared Just define __NR_sched_setattr for LoongArch if not exist. Link: https://lore.kernel.org/20250422074917.25771-1-yangtiezhu@loongson.cn Reported-by: Haiyong Sun Signed-off-by: Tiezhu Yang Signed-off-by: Steven Rostedt (Google) commit f1a50492f5bdb024a5eb4d1de6798369dbf93418 Author: Ricardo Neri Date: Fri Apr 18 19:55:04 2025 -0700 cpufreq: intel_pstate: Populate the cpu_capacity sysfs entries Intel hybrid processors have CPUs of different capacity. Populate the interface /sys/devices/system/cpu/cpuN/cpu_capacity. This interface uses the per-CPU variable `cpu_scale`. On x86 this variable has no other use besides feeding the sysfs entries. Initialize it when setting CPU capacity for the scheduler and scale-invariant code. Feed it with arch_scale_cpu_capacity() as it gives capacity normalized to the interval [0, SCHED_CAPACITY_SCALE]. Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki commit 6bceea7a1e076ef9d71b20d8dda2f7dc52bd34d2 Author: Ricardo Neri Date: Fri Apr 18 19:55:03 2025 -0700 arch_topology: Relocate cpu_scale to topology.[h|c] arch_topology.c provides functionality to parse and scale CPU capacity. It also provides a corresponding sysfs interface. Some architectures parse and scale CPU capacity differently as per their own needs. On Intel processors, for instance, it is responsibility of the Intel P-state driver. Relocate the implementation of that interface to a common location in topology.c. Architectures can use the interface and populate it using their own mechanisms. An alternative approach would be to compile arch_topology.c even if not needed only to get this interface. This approach would create duplicated and conflicting functionality and data structures. Signed-off-by: Ricardo Neri Tested-by: Christian Loehle Link: https://patch.msgid.link/20250419025504.9760-2-ricardo.neri-calderon@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 18682166f61494072d589692c57b7a32b89fc9dc Author: Costa Shulyupin Date: Thu Apr 17 21:56:16 2025 +0300 rtla: Set distinctive exit value for failed tests A test is considered failed when a sample trace exceeds the threshold. Failed tests return the same exit code as passed tests, requiring test frameworks to determine the result by searching for "hit stop tracing" in the output. Assign a distinct exit code for failed tests to enable the use of shell expressions and seamless integration with testing frameworks without the need to parse output. Add enum type for return value. Update `make check`. Cc: Daniel Bristot de Oliveira Cc: John Kacur Cc: "Luis Claudio R. Goncalves" Cc: Eder Zulian Cc: Dan Carpenter Cc: Jan Stancek Link: https://lore.kernel.org/20250417185757.2194541-1-costa.shul@redhat.com Signed-off-by: Costa Shulyupin Reviewed-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) commit fdccdb6578991b2ba770390957ca04c59f9bfff6 Author: Srinivas Pandruvada Date: Mon Apr 28 17:01:10 2025 -0700 thermal: int340x: processor_thermal: Platform temperature control documentation Update documentation of attributes for platform temperature control. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20250429000110.236243-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 579daefbed647a19a2d56f06c39ae12543e1edba Author: Srinivas Pandruvada Date: Mon Apr 28 17:01:09 2025 -0700 thermal: intel: int340x: Enable platform temperature control Enable the Platform Temperature Control feature for Lunar Lake and Panther Lake. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20250429000110.236243-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 9befea30133ca45166895c5724b2aef83a87436e Author: Srinivas Pandruvada Date: Mon Apr 28 17:01:08 2025 -0700 thermal: intel: int340x: Add platform temperature control interface Platform Temperature Control is a dynamic control loop implemented in hardware to manage the skin or any board temperature of a device. The reported skin or board temperature is controlled by comparing to a configured target temperature and adjusting the SoC (System on Chip) performance accordingly. The feature supports up to three platform sensors. OEMs (Original Equipment Manufacturers) can configure this feature through the BIOS and provide temperature input directly to the hardware via the Platform Environment Control Interface (PECI). As a result, this feature can operate independently of any OS-level control. The OS interface can be used to further fine-tune the default OEM configuration. Here are some scenarios where the OS interface is beneficial: Verification of Firmware Control: Check if firmware-based control is enabled. If it is, thermal controls from the OS/user space can be backed out. Adjusting Target Limits: While OEMs can set an aggressive target limit, the OS can adjust this to a less aggressive limit based on operating modes or conditions. Given that this is platform temperature control, it is expected that a single user-level manager owns and manages the controls. If multiple user-level software applications attempt to write different targets, it can lead to unexpected behavior. For instance, on a Linux desktop, the Linux thermal daemon can manage these temperature controls, as it has access to all other temperature control settings. The hardware control interface is via MMIO offsets in the processor thermal device MMIO space. There are three instances of MMIO registers. Refer to the platform_temperature_control.c for MMIO details. Expose "enable" and "temperature_target" via sysfs. There are three instances of this controls. So up to three different sensors can be controlled independently. Sysfs interface: tree /sys/bus/pci/devices/0000\:00\:04.0/ptc_?_control/ /sys/bus/pci/devices/0000:00:04.0/ptc_0_control/ ├── enable └── temperature_target /sys/bus/pci/devices/0000:00:04.0/ptc_1_control/ ├── enable └── temperature_target /sys/bus/pci/devices/0000:00:04.0/ptc_2_control/ ├── enable └── temperature_target Description of attributes: Enable: 1 for enable, 0 for disable. This attribute can be used to read the current status. User space can write 0 or 1 to disable or enable this feature respectively. temperature_target: Target temperature limit to which hardware will try to limit in milli degree C. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20250429000110.236243-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 252c4711973de4e4f3ecddcc18912aecfd4e537c Author: Raag Jadav Date: Tue May 6 11:18:35 2025 +0530 drm/xe/doc: Wire up PCIe Gen5 limitations Append PCIe Gen5 limitations to xe_firmware document. Signed-off-by: Raag Jadav Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250506054835.3395220-4-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi commit 0e414bf7ad012e55c8a0aa4e91f68cb1cf5801ff Author: Raag Jadav Date: Tue May 6 11:18:34 2025 +0530 drm/xe: Expose PCIe link downgrade attributes Expose sysfs attributes for PCIe link downgrade capability and status. v2: Move from debugfs to sysfs (Lucas, Rodrigo, Badal) Rework macros and their naming (Rodrigo) v3: Use sysfs_create_files() (Riana) Fix checkpatch warning (Riana) v4: s/downspeed/downgrade (Lucas, Rodrigo, Riana) v5: Use PCIe Gen agnostic naming (Rodrigo) v6: s/pcie_gen/auto_link (Lucas) Signed-off-by: Raag Jadav Reviewed-by: Riana Tauro Link: https://lore.kernel.org/r/20250506054835.3395220-3-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi commit f3e875b3c05ce049634f04cc249dea2b2e728eb7 Author: Raag Jadav Date: Tue May 6 11:18:33 2025 +0530 drm/xe: Move xe_device_sysfs_init() to xe_device_probe() Since xe_device_sysfs_init() exposes device specific attributes, a better place for it is xe_device_probe(). Signed-off-by: Raag Jadav Reviewed-by: Riana Tauro Link: https://lore.kernel.org/r/20250506054835.3395220-2-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi commit 432cd94efdca06296cc5e76d673546f58aa90ee1 Author: Shuicheng Lin Date: Wed May 7 02:23:02 2025 +0000 drm/xe: Release force wake first then runtime power xe_force_wake_get() is dependent on xe_pm_runtime_get(), so for the release path, xe_force_wake_put() should be called first then xe_pm_runtime_put(). Combine the error path and normal path together with goto. Fixes: 85d547608ef5 ("drm/xe/xe_gt_debugfs: Update handling of xe_force_wake_get return") Cc: Himal Prasad Ghimiray Cc: Rodrigo Vivi Signed-off-by: Shuicheng Lin Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250507022302.2187527-1-shuicheng.lin@intel.com Signed-off-by: Rodrigo Vivi commit 4854649b1fb43968615e0374d9d59580093ac67f Author: Rafael J. Wysocki Date: Tue May 6 22:37:15 2025 +0200 cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq Doing cpufreq-specific EAS checks that require accessing policy internals directly from sched_is_eas_possible() is a bit unfortunate, so introduce cpufreq_ready_for_eas() in cpufreq, move those checks into that new function and make sched_is_eas_possible() call it. While at it, address a possible race between the EAS governor check and governor change by doing the former under the policy rwsem. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Christian Loehle Reviewed-by: Dietmar Eggemann Link: https://patch.msgid.link/2317800.iZASKD2KPV@rjwysocki.net commit f42c8556a0690802246dc588ae9c18184f71d8f5 Author: Rafael J. Wysocki Date: Tue May 6 22:34:31 2025 +0200 cpufreq/sched: schedutil: Add helper for governor checks Add a helper for checking if schedutil is the current governor for a given cpufreq policy and use it in sched_is_eas_possible() to avoid accessing cpufreq policy internals directly from there. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Christian Loehle Reviewed-by: Dietmar Eggemann Link: https://patch.msgid.link/3365956.44csPzL39Z@rjwysocki.net commit e2f820014239df9360064079ae93f838ff3b7f8c Author: Sean Nyekjaer Date: Fri May 2 11:37:26 2025 +0200 iio: imu: inv_icm42600: Fix temperature calculation >From the documentation: "offset to be added to [Y]_raw prior toscaling by [Y]_scale" Offset should be applied before multiplying scale, so divide offset by scale to make this correct. Fixes: bc3eb0207fb5 ("iio: imu: inv_icm42600: add temperature sensor support") Signed-off-by: Sean Nyekjaer Acked-by: Jean-Baptiste Maneyrol Link: https://patch.msgid.link/20250502-imu-v1-1-129b8391a4e3@geanix.com Cc: Signed-off-by: Jonathan Cameron commit 921fece3268c3bf2e8c20dd17ff9e5454fa16fda Author: Angelo Dureghello Date: Wed Apr 9 11:16:54 2025 +0200 iio: dac: adi-axi-dac: fix bus read Fix bus read function. Testing the driver, on a random basis, wrong reads was detected, mainly by a wrong DAC chip ID read at first boot. Before reading the expected value from the AXI regmap, need always to wait for busy flag to be cleared. Fixes: e61d7178429a ("iio: dac: adi-axi-dac: extend features") Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-ad3552r-fix-bus-read-v2-1-34d3b21e8ca0@baylibre.com Signed-off-by: Jonathan Cameron commit 9d80698bcd97a5ad1088bcbb055e73fd068895e2 Author: Shuicheng Lin Date: Fri May 2 17:00:52 2025 +0000 drm/xe: Add config control for svm flush work Without CONFIG_DRM_XE_GPUSVM set, GPU SVM is not initialized thus below warning pops. Refine the flush work code to be controlled by the config to avoid below warning: " [ 453.132028] ------------[ cut here ]------------ [ 453.132527] WARNING: CPU: 9 PID: 4491 at kernel/workqueue.c:4205 __flush_work+0x379/0x3a0 [ 453.133355] Modules linked in: xe drm_ttm_helper ttm gpu_sched drm_buddy drm_suballoc_helper drm_gpuvm drm_exec [ 453.134352] CPU: 9 UID: 0 PID: 4491 Comm: xe_exec_mix_mod Tainted: G U W 6.15.0-rc3+ #7 PREEMPT(full) [ 453.135405] Tainted: [U]=USER, [W]=WARN ... [ 453.136921] RIP: 0010:__flush_work+0x379/0x3a0 [ 453.137417] Code: 8b 45 00 48 8b 55 08 89 c7 48 c1 e8 04 83 e7 08 83 e0 0f 83 cf 02 89 c6 48 0f ba 6d 00 03 e9 d5 fe ff ff 0f 0b e9 db fd ff ff <0f> 0b 45 31 e4 e9 d1 fd ff ff 0f 0b e9 03 ff ff ff 0f 0b e9 d6 fe [ 453.139250] RSP: 0018:ffffc90000c67b18 EFLAGS: 00010246 [ 453.139782] RAX: 0000000000000000 RBX: ffff888108a24000 RCX: 0000000000002000 [ 453.140521] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881016d61c8 [ 453.141253] RBP: ffff8881016d61c8 R08: 0000000000000000 R09: 0000000000000000 [ 453.141985] R10: 0000000000000000 R11: 0000000008a24000 R12: 0000000000000001 [ 453.142709] R13: 0000000000000002 R14: 0000000000000000 R15: ffff888107db8c00 [ 453.143450] FS: 00007f44853d4c80(0000) GS:ffff8882f469b000(0000) knlGS:0000000000000000 [ 453.144276] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 453.144853] CR2: 00007f4487629228 CR3: 00000001016aa000 CR4: 00000000000406f0 [ 453.145594] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 453.146320] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 453.147061] Call Trace: [ 453.147336] [ 453.147579] ? tick_nohz_tick_stopped+0xd/0x30 [ 453.148067] ? xas_load+0x9/0xb0 [ 453.148435] ? xa_load+0x6f/0xb0 [ 453.148781] __xe_vm_bind_ioctl+0xbd5/0x1500 [xe] [ 453.149338] ? dev_printk_emit+0x48/0x70 [ 453.149762] ? _dev_printk+0x57/0x80 [ 453.150148] ? drm_ioctl+0x17c/0x440 [ 453.150544] ? __drm_dev_vprintk+0x36/0x90 [ 453.150983] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 453.151575] ? drm_ioctl_kernel+0x9f/0xf0 [ 453.151998] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 453.152560] drm_ioctl_kernel+0x9f/0xf0 [ 453.152968] drm_ioctl+0x20f/0x440 [ 453.153332] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 453.153893] ? ioctl_has_perm.constprop.0.isra.0+0xae/0x100 [ 453.154489] ? memory_bm_test_bit+0x5/0x60 [ 453.154935] xe_drm_ioctl+0x47/0x70 [xe] [ 453.155419] __x64_sys_ioctl+0x8d/0xc0 [ 453.155824] do_syscall_64+0x47/0x110 [ 453.156228] entry_SYSCALL_64_after_hwframe+0x76/0x7e " v2 (Matt): refine commit message to have more details add Fixes tag move the code to xe_svm.h which already have the config remove a blank line per codestyle suggestion Fixes: 63f6e480d115 ("drm/xe: Add SVM garbage collector") Cc: Matthew Brost Signed-off-by: Shuicheng Lin Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250502170052.1787973-1-shuicheng.lin@intel.com commit 50d4b157fa96bfeb4f383d7dad80f8bdef0d1d2a Author: Michal Wilczynski Date: Thu Apr 3 11:44:24 2025 +0200 clk: thead: Add clock support for VO subsystem in T-HEAD TH1520 SoC The T-Head TH1520 SoC integrates a variety of clocks for its subsystems, including the Application Processor (AP) and the Video Output (VO) [1]. Up until now, the T-Head clock driver only supported AP clocks. Extend the driver to provide clock functionality for the VO subsystem. At this stage, the focus is on implementing the VO clock gates, as these are currently the most relevant and required components for enabling and disabling the VO subsystem functionality. Future enhancements may introduce additional VO-related clocks as necessary. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf [1] Reviewed-by: Drew Fustini Signed-off-by: Michal Wilczynski Signed-off-by: Drew Fustini commit 1b4bb451f3adeb7e5fb86c09cd83609638964b68 Author: Michal Wilczynski Date: Thu Apr 3 11:44:23 2025 +0200 dt-bindings: clock: thead: Add TH1520 VO clock controller Add device tree bindings for the TH1520 Video Output (VO) subsystem clock controller. The VO sub-system manages clock gates for multimedia components including HDMI, MIPI, and GPU. Document the VIDEO_PLL requirements for the VO clock controller, which receives its input from the AP clock controller. The VIDEO_PLL is a Silicon Creations Sigma-Delta (integer) PLL typically running at 792 MHz with maximum FOUTVCO of 2376 MHz. This binding complements the existing AP sub-system clock controller which manages CPU, DPU, GMAC and TEE PLLs. Reviewed-by: Krzysztof Kozlowski Acked-by: Conor Dooley Signed-off-by: Michal Wilczynski Reviewed-by: Drew Fustini Signed-off-by: Drew Fustini commit bd4718d97d308fdc20ddcd471444b3e398ce877d Author: Danila Tikhonov Date: Wed Apr 23 00:31:35 2025 +0300 dt-bindings: arm: qcom: Add SM7150 Google Pixel 4a Google Pixel 4a (google,sunfish) is a smartphone based on the SM7150 SoC Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20250422213137.80366-15-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 771c5a7d9843643b035938624050e7769133b9cc Author: Alice Ryhl Date: Fri May 2 13:19:35 2025 +0000 rust: alloc: add Vec::insert_within_capacity This adds a variant of Vec::insert that does not allocate memory. This makes it safe to use this function while holding a spinlock. Rust Binder uses it for the range allocator fast path. Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-7-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich commit 294a7ecbdf0a5d65c6df1287c5d56241e9331cf2 Author: Alice Ryhl Date: Fri May 2 13:19:34 2025 +0000 rust: alloc: add Vec::remove This is needed by Rust Binder in the range allocator, and by upcoming GPU drivers during firmware initialization. Panics in the kernel are best avoided when possible, so an error is returned if the index is out of bounds. An error type is used rather than just returning Option to let callers handle errors with ?. Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-6-06d20ad9366f@google.com [ Remove `# Panics` section; `Vec::remove() handles the error properly.` - Danilo ] Signed-off-by: Danilo Krummrich commit 9f140894e72735f034fdc0e963d0550ef03c6f44 Author: Alice Ryhl Date: Fri May 2 13:19:33 2025 +0000 rust: alloc: add Vec::retain This adds a common Vec method called `retain` that removes all elements that don't match a certain condition. Rust Binder uses it to find all processes that match a given pid. The stdlib retain method takes &T rather than &mut T and has a separate retain_mut for the &mut T case. However, this is considered an API mistake that can't be fixed now due to backwards compatibility. There's no reason for us to repeat that mistake. Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-5-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich commit 4d7ee0e277d4558ef025a5c4d6e1c7a8c8a1e68d Author: Johan Hovold Date: Wed Mar 26 13:49:44 2025 +0100 soc: qcom: pmic_glink: enable UCSI on sc8280xp Commit ad3dd9592b2a ("soc: qcom: pmic_glink: disable UCSI on sc8280xp") disabled UCSI shortly after it had been enabled to fix a regression that was observed on the Lenovo ThinkPad X13s. Specifically, disconnecting an external display would trigger a system error and hypervisor reset but no one cared enough to track down the bug at the time. The same issue was recently observed on X Elite machines, and commit f47eba045e6c ("usb: typec: ucsi: Set orientation as none when connector is unplugged") worked around the underlying issue by setting the connector orientation to 'none' on disconnect events to avoid having the PHY driver crash the machine in one orientation. Enable UCSI support also on sc8280xp now that the DisplayPort disconnect crashes are gone. Cc: Abel Vesa Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250326124944.6338-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 088bf14a886e1e746c961a862ebccbb76d7cbd4e Author: Alice Ryhl Date: Fri May 2 13:19:32 2025 +0000 rust: alloc: add Vec::drain_all This is like the stdlib method drain, except that it's hard-coded to use the entire vector's range. Rust Binder uses it in the range allocator to take ownership of everything in a vector in a case where reusing the vector is desirable. Implementing `DrainAll` in terms of `slice::IterMut` lets us reuse some nice optimizations in core for the case where T is a ZST. Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-4-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich commit 9def0d0a2a1c62d7970f4ce5ad5557968c98f637 Author: Alice Ryhl Date: Fri May 2 13:19:31 2025 +0000 rust: alloc: add Vec::push_within_capacity This introduces a new method called `push_within_capacity` for appending to a vector without attempting to allocate if the capacity is full. Rust Binder will use this in various places to safely push to a vector while holding a spinlock. The implementation is moved to a push_within_capacity_unchecked method. This is preferred over having push() call push_within_capacity() followed by an unwrap_unchecked() for simpler unsafe. Panics in the kernel are best avoided when possible, so an error is returned if the vector does not have sufficient capacity. An error type is used rather than just returning Result<(),T> to make it more convenient for callers (i.e. they can use ? or unwrap). Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-3-06d20ad9366f@google.com [ Remove public visibility from `Vec::push_within_capacity_unchecked()`. - Danilo ] Signed-off-by: Danilo Krummrich commit f2b4dd7093438e4884cb01a783212abfbc9cc40b Author: Alice Ryhl Date: Fri May 2 13:19:30 2025 +0000 rust: alloc: add Vec::pop This introduces a basic method that our custom Vec is missing. I expect that it will be used in many places, but at the time of writing, Rust Binder has six calls to Vec::pop. Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250502-vec-methods-v5-2-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich commit a1e4d5c9d708d7a0e7071015a120a4489404128f Author: Alice Ryhl Date: Fri May 2 13:19:29 2025 +0000 rust: alloc: add Vec::clear Our custom Vec type is missing the stdlib method `clear`, thus add it. It will be used in the miscdevice sample. Reviewed-by: Benno Lossin Reviewed-by: Tamir Duberstein Signed-off-by: Alice Ryhl Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250502-vec-methods-v5-1-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich commit aef87a5fdb5117eafb498ac4fc25e9f26f630f45 Author: Harish Chegondi Date: Thu May 1 12:14:45 2025 -0700 drm/xe: Use copy_from_user() instead of __copy_from_user() copy_from_user() has more checks and is more safer than __copy_from_user() Suggested-by: Kees Cook Signed-off-by: Harish Chegondi Reviewed-by: Matthew Brost Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://lore.kernel.org/r/acabf20aa8621c7bc8de09b1bffb8d14b5376484.1746126614.git.harish.chegondi@intel.com commit 9b30400ff6527c4601fefa2e9cb0b311c6f902d0 Merge: c8fafb34854af4 428dc9fc087398 Author: Tejun Heo Date: Wed May 7 06:25:39 2025 -1000 Merge branch 'for-6.15-fixes' into for-6.16 To receive 428dc9fc0873 ("sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator") which conflicts with cdf5a6faa8cf ("sched_ext: Move dsq_hash into scx_sched"). The conflict is a simple context conflict which can be resolved by taking changes from both changes in the right order. commit 3ea267124573f24e67f0fe47c4a865f0f283f8fc Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:30 2025 -0500 ARM: dts: qcom: ipq4019: Drop redundant CPU "clock-latency" The "clock-latency" property is part of the deprecated opp-v1 binding and is redundant if the opp-v2 table has equal or larger values in any "clock-latency-ns". The OPP table has values of 256000, so it can be removed. Signed-off-by: Rob Herring (Arm) Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-9-63d7dc9ddd0a@kernel.org Signed-off-by: Bjorn Andersson commit 78184f6e3db16c05ad5933b411faa416bb68ac1e Author: Jinjie Ruan Date: Fri Aug 30 15:38:24 2024 +0800 gpu: host1x: Use for_each_available_child_of_node_scoped() Avoids the need for manual cleanup of_node_put() in early exits from the loop. Signed-off-by: Jinjie Ruan Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20240830073824.3539690-1-ruanjinjie@huawei.com commit 780351a5f61416ed2ba1199cc57e4a076fca644d Author: Qiu-ji Chen Date: Wed Nov 6 17:59:06 2024 +0800 drm/tegra: Fix a possible null pointer dereference In tegra_crtc_reset(), new memory is allocated with kzalloc(), but no check is performed. Before calling __drm_atomic_helper_crtc_reset, state should be checked to prevent possible null pointer dereference. Fixes: b7e0b04ae450 ("drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset.") Cc: stable@vger.kernel.org Signed-off-by: Qiu-ji Chen Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20241106095906.15247-1-chenqiuji666@gmail.com commit 3c3642335065c3bde0742b0edc505b6ea8fdc2b3 Author: Biju Das Date: Wed Feb 5 11:21:35 2025 +0000 drm/tegra: rgb: Fix the unbound reference count The of_get_child_by_name() increments the refcount in tegra_dc_rgb_probe, but the driver does not decrement the refcount during unbind. Fix the unbound reference count using devm_add_action_or_reset() helper. Fixes: d8f4a9eda006 ("drm: Add NVIDIA Tegra20 support") Signed-off-by: Biju Das Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250205112137.36055-1-biju.das.jz@bp.renesas.com commit 8330d092f789ca7859042c80cbf3ea496bc53d99 Merge: 8feafba59c510b 707df3375124b5 Author: Arnaldo Carvalho de Melo Date: Wed May 7 12:51:38 2025 -0300 Merge remote-tracking branch 'torvalds/master' into perf-tools-next To pick up fixes from the latest perf-tools pull request from Namhyung and get perf-tools-next in line with thinngs in other areas it uses, like tools/lib/bpf, etc. Signed-off-by: Arnaldo Carvalho de Melo commit 33ca5aafc3592a27375cf7a249cf162c90f5e653 Author: Mikko Perttunen Date: Tue Feb 4 02:45:46 2025 +0000 gpu: host1x: Remove mid-job CDMA flushes The current code can issue CDMA flushes (DMAPUT bumps) in the middle of a job, before all opcodes have been written into the pushbuffer. This can happen when pushbuffer fills up. Presumably this made sense at some point in the past, but it doesn't anymore, as it cannot lead to more space appearing in the pushbuffer as it is only cleaned full jobs at a time. Mid-job flushes can also cause problems, as in an extreme situation (seen in practice), the hardware can run through the entire pushbuffer including the prefix of a partially written job without the driver being able to process any CDMA updates. This can cause the engine MLOCK to be taken and held for extended periods as the tail of the job is not yet available to hardware. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250204024546.1168126-1-mperttunen@nvidia.com commit f1680d9081e161925c3aca81231ee867c95890b0 Author: Frank Li Date: Mon Apr 14 14:30:59 2025 -0400 irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask Some platform devices create child devices dynamically and require the parent device's msi-map to map device IDs to actual sideband information. A typical use case is using ITS as a PCIe Endpoint Controller(EPC)'s doorbell function, where PCI hosts send TLP memory writes to the EP controller. The EP controller converts these writes to AXI transactions and appends platform-specific sideband information. EPC's DTS will provide such information by msi-map and msi-mask. A simplified dts as pcie-ep@10000000 { ... msi-map = <0 &its 0xc 8>; ^^^ 0xc is implement defined sideband information, which append to AXI write transaction. ^ 0 is function index. msi-mask = <0x7> } Check msi-map if msi-parent missed to keep compatility with existing systems. Signed-off-by: Frank Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250414-ep-msi-v18-5-f69b49917464@nxp.com commit a6aed6b9c79e57064fa8c028662214b436578e80 Author: Frank Li Date: Mon Apr 14 14:30:58 2025 -0400 dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map Document the use of (msi|iommu)-map for PCI Endpoint (EP) controllers, which can use MSI as a doorbell mechanism. Each EP controller can support up to 8 physical functions and 65,536 virtual functions. Define how to construct device IDs using function bits [2:0] and virtual function index bits [31:3], enabling (msi|iommu)-map to associate each child device with a specific (msi|iommu)-specifier. The EP cannot rely on PCI Requester ID (RID) because the RID is determined by the PCI topology of the host system. Since the EP may be connected to different PCI hosts, the RID can vary between systems and is therefore not a reliable identifier. Signed-off-by: Frank Li Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/all/20250414-ep-msi-v18-4-f69b49917464@nxp.com commit fd120c38fefd26f1e23f308141f52098c1bbfb31 Author: Frank Li Date: Mon Apr 14 14:30:57 2025 -0400 irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS Set the IRQ_DOMAIN_FLAG_MSI_IMMUTABLE flag for ITS, as it does not change the address/data pair after setup. Ensure compatibility with MSI users, such as PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged. Enable PCIe endpoints to use ITS for triggering doorbells from the PCIe Root Complex (RC) side. Signed-off-by: Frank Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250414-ep-msi-v18-3-f69b49917464@nxp.com commit b8c7bfb7a0f01521297d688ca5fe1482c81e8910 Author: Frank Li Date: Mon Apr 14 14:30:56 2025 -0400 irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable() Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250414-ep-msi-v18-2-f69b49917464@nxp.com commit 9a958e1fd40d6fae8c66385687a00ebd9575a7d2 Author: Frank Li Date: Mon Apr 14 14:30:55 2025 -0400 platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() platform_device_msi_init_and_alloc_irqs() performs two tasks: allocating the MSI domain for a platform device, and allocate a number of MSIs in that domain. platform_device_msi_free_irqs_all() only frees the MSIs, and leaves the MSI domain alive. Given that platform_device_msi_init_and_alloc_irqs() is the sole tool a platform device has to allocate platform MSIs, it makes sense for platform_device_msi_free_irqs_all() to teardown the MSI domain at the same time as the MSIs. This avoids warnings and unexpected behaviours when a driver repeatedly allocates and frees MSIs. Signed-off-by: Frank Li Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/all/20250414-ep-msi-v18-1-f69b49917464@nxp.com commit 408ec8e406d980b073f7c2d6144fdddbb093d4fd Author: Mikko Perttunen Date: Wed Feb 5 06:10:27 2025 +0000 drm/tegra: falcon: Pipeline firmware copy The Falcon DMA engine allows queueing multiple operations for improved performance. Do this to optimize firmware loading. A performance improvement of 4x to 6x is observed. Co-developed-by: Ivan Raul Guadarrama Signed-off-by: Ivan Raul Guadarrama Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250205061027.1205748-1-mperttunen@nvidia.com commit 61a85887a9fc198b710a3b576db006c78855d1c0 Author: Zhang Enpei Date: Wed Apr 2 19:37:58 2025 +0800 drm/tegra: dpaux: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn commit 4054a307ee72ff7869050bfa6423ca5a74144171 Author: Jon Hunter Date: Mon Apr 28 16:34:35 2025 +0100 drm/tegra: Remove unneeded include The header file 'tegra_drm.h' is included in gem.c, but this file is already include 'drm.h'. Although there is no harm in including this file again, it is also not necessary. Furthermore, the header file is located under 'include/uapi/drm' so ideally the full path would be used to be explicit. For now, just remove from gem.c. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250428153435.1013101-1-jonathanh@nvidia.com commit 9ff4fdf4f44b69237c0afc1d3a8dac916ce66f3e Author: Thierry Reding Date: Mon Apr 21 11:13:05 2025 -0500 drm/tegra: Assign plane type before registration Changes to a plane's type after it has been registered aren't propagated to userspace automatically. This could possibly be achieved by updating the property, but since we can already determine which type this should be before the registration, passing in the right type from the start is a much better solution. Suggested-by: Aaron Kling Signed-off-by: Thierry Reding Cc: stable@vger.kernel.org Fixes: 473079549f27 ("drm/tegra: dc: Add Tegra186 support") Signed-off-by: Aaron Kling Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20250421-tegra-drm-primary-v2-1-7f740c4c2121@gmail.com commit 97f4b999e0c894d3e48e318aa1130132031815b3 Author: Thomas Gleixner Date: Wed May 7 15:47:06 2025 +0200 genirq: Use scoped_guard() to shut clang up This code pattern trips clang up: if (fail) goto undo; guard(lock)(lock); do_stuff(); return 0; undo: ... as it somehow extends the scope of the guard beyond the return statement. Replace it with a scoped guard to help it to get its act together. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Closes: https://lore.kernel.org/oe-kbuild-all/202505071809.ajpPxfoZ-lkp@intel.com/ commit d8f10550448b03d3c5c6d9392119205c65ebfc89 Author: Andre Przywara Date: Mon May 5 21:24:16 2025 +0100 arm64: dts: allwinner: a100: set maximum MMC frequency The manual for the Allwinner A133 SoC mentions that the maximum supported MMC frequency is 150 MHz, for all of the MMC devices. Describe that in the DT entry, to help drivers setting the right interface frequency. Fixes: fcfbb8d9ec58 ("arm64: allwinner: a100: Add MMC related nodes") Signed-off-by: Andre Przywara Link: https://patch.msgid.link/20250505202416.23753-1-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 5836ebeb4a2b7e25305fab9170060d5f3de1ff30 Author: Sudeep Holla Date: Fri May 2 15:01:19 2025 +0100 cpuidle: psci: Avoid initializing faux device if no DT idle states are present Commit af5376a77e87 ("cpuidle: psci: Transition to the faux device interface") transitioned the PSCI cpuidle driver from using a platform device to the faux device framework. However, unlike platform devices, the faux device infrastructure logs an error when the probe function fails, even if the failure is intentional or expected. To prevent unnecessary error logs, we can skip creating the faux device entirely if there are no PSCI idle states defined in the device tree. Introduce a check for DT idle states during initialization and avoid setting up the device if none are found. This ensures cleaner logs and avoids misleading probe failure messages when PSCI idle support is intentionally not described in DT. Fixes: af5376a77e87 ("cpuidle: psci: Transition to the faux device interface") Reported-by: Jon Hunter Closes: https://lore.kernel.org/r/cf4e70e4-9fe5-4697-8744-8c12c41b5ff9@nvidia.com Signed-off-by: Sudeep Holla Reviewed-by: Ulf Hansson Link: https://patch.msgid.link/20250502140119.2578909-1-sudeep.holla@arm.com Signed-off-by: Rafael J. Wysocki commit 037af793557ed192b2c10cf2379ac97abacedf55 Author: Ming Lei Date: Wed May 7 21:33:28 2025 +0800 fs: aio: initialize .ki_write_stream of read-write request AIO needs to initialize .ki_write_stream explicitly for read/write request, otherwise random .ki_write_stream is used, and cause -EINVAL returned for aio write randomly. Cc: Christoph Hellwig Cc: Keith Busch Cc: Kanchan Joshi Fixes: c27683da6406 ("block: expose write streams for block device nodes") Signed-off-by: Ming Lei Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250507133328.3040255-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 15568ffd59d4e7d8c39286a7159880afe327216d Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:14 2025 +0100 irqchip/irq-vt8500: Switch to irq_domain_create_*() irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Split out from combo patch to avoid merge conflicts ] Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250319092951.37667-22-jirislaby@kernel.org commit 15c9d5f6235d66ebc130da9602b1cd7692bcf85d Author: Christoph Hellwig Date: Wed May 7 14:04:43 2025 +0200 hfsplus: use bdev_rw_virt in hfsplus_submit_bio Replace the code building a bio from a kernel direct map address and submitting it synchronously with the bdev_rw_virt helper. Signed-off-by: Christoph Hellwig Acked-by: Yangtao Li Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-20-hch@lst.de Signed-off-by: Jens Axboe commit 760aa1818b040c8ec6a1ee9cea1ea8cac0735ce3 Author: Christoph Hellwig Date: Wed May 7 14:04:42 2025 +0200 btrfs: use bdev_rw_virt in scrub_one_super Replace the code building a bio from a kernel direct map address and submitting it synchronously with the bdev_rw_virt helper. Signed-off-by: Christoph Hellwig Acked-by: David Sterba Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Link: https://lore.kernel.org/r/20250507120451.4000627-19-hch@lst.de Signed-off-by: Jens Axboe commit 5ced480d4886b12e6a2058ac3ebd749b0ff14573 Author: Christoph Hellwig Date: Wed May 7 14:04:41 2025 +0200 xfs: simplify building the bio in xlog_write_iclog Use the bio_add_virt_nofail and bio_add_vmalloc helpers to abstract away the details of the memory allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20250507120451.4000627-18-hch@lst.de Signed-off-by: Jens Axboe commit d486bbecc90d86e0292071bd06322543f8f5f658 Author: Christoph Hellwig Date: Wed May 7 14:04:40 2025 +0200 xfs: simplify xfs_rw_bdev Delegate to bdev_rw_virt when operating on non-vmalloc memory and use bio_add_vmalloc_chunk to insulate xfs from the details of adding vmalloc memory to a bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20250507120451.4000627-17-hch@lst.de Signed-off-by: Jens Axboe commit 9dccf2aa6ed5fa6ee92c8d71868bf3762ae85bda Author: Christoph Hellwig Date: Wed May 7 14:04:39 2025 +0200 xfs: simplify xfs_buf_submit_bio Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the bio_add_virt_nofail helper implementing it and use bio_add_vmalloc to insulate xfs from the details of adding vmalloc memory to a bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20250507120451.4000627-16-hch@lst.de Signed-off-by: Jens Axboe commit bd4e709b32ac932aee3b337969cbb1b57faf84bd Author: Christoph Hellwig Date: Wed May 7 14:04:38 2025 +0200 dm-integrity: use bio_add_virt_nofail Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the bio_add_virt_nofail helper implementing it, and do the same for the similar pattern using bio_add_page for adding the first segment after a bio allocation as that can't fail either. Signed-off-by: Christoph Hellwig Acked-by: Mikulas Patocka Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-15-hch@lst.de Signed-off-by: Jens Axboe commit 9134124ce1bac3d5228ee1b1fc7a879422ff74f6 Author: Christoph Hellwig Date: Wed May 7 14:04:37 2025 +0200 dm-bufio: use bio_add_virt_nofail Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the bio_add_virt_nofail helper implementing it. Signed-off-by: Christoph Hellwig Acked-by: Mikulas Patocka Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-14-hch@lst.de Signed-off-by: Jens Axboe commit 0cb8c299f81591699e908d1a6ad2dba6df642e25 Author: Christoph Hellwig Date: Wed May 7 14:04:36 2025 +0200 PM: hibernate: split and simplify hib_submit_io Split hib_submit_io into a sync and async version. The sync version is a small wrapper around bdev_rw_virt which implements all the logic to add a kernel direct mapping range to a bio and synchronously submits it, while the async version is slightly simplified using the bio_add_virt_nofail for adding the single range. Signed-off-by: Christoph Hellwig Acked-by: Rafael J. Wysocki Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20250507120451.4000627-13-hch@lst.de Signed-off-by: Jens Axboe commit b2f676efe601586360e5f7461f6d36981ac1e6c9 Author: Christoph Hellwig Date: Wed May 7 14:04:35 2025 +0200 zonefs: use bdev_rw_virt in zonefs_read_super Switch zonefs_read_super to allocate the superblock buffer using kmalloc which falls back to the page allocator for PAGE_SIZE allocation but gives us a kernel virtual address and then use bdev_rw_virt to perform the synchronous read into it. Signed-off-by: Christoph Hellwig Acked-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-12-hch@lst.de Signed-off-by: Jens Axboe commit 65f8e62593e64f6991ece4f08ab9e147e62df488 Author: Christoph Hellwig Date: Wed May 7 14:04:34 2025 +0200 gfs2: use bdev_rw_virt in gfs2_read_super Switch gfs2_read_super to allocate the superblock buffer using kmalloc which falls back to the page allocator for PAGE_SIZE allocation but gives us a kernel virtual address and then use bdev_rw_virt to perform the synchronous read into it. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Gruenbacher Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20250507120451.4000627-11-hch@lst.de Signed-off-by: Jens Axboe commit a216081323a1391991c9073fed2459265bfc7f5c Author: Christoph Hellwig Date: Wed May 7 14:04:33 2025 +0200 rnbd-srv: use bio_add_virt_nofail Use the bio_add_virt_nofail to add a single kernel virtual address to a bio as that can't fail. Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-10-hch@lst.de Signed-off-by: Jens Axboe commit 23f5d69dfa993cb6d17e619fff5e623e76b9b17f Author: Christoph Hellwig Date: Wed May 7 14:04:32 2025 +0200 bcache: use bio_add_virt_nofail Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the bio_add_virt_nofail helper implementing it. Signed-off-by: Christoph Hellwig Acked-by: Coly Li Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-9-hch@lst.de Signed-off-by: Jens Axboe commit 6ff54f456671415e101e671a7dfa1fe13a31bdb5 Author: Christoph Hellwig Date: Wed May 7 14:04:31 2025 +0200 block: simplify bio_map_kern Rewrite bio_map_kern using the new bio_add_* helpers and drop the kerneldoc comment that is superfluous for an internal helper. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-8-hch@lst.de Signed-off-by: Jens Axboe commit fddbc51dc290f834f520ce89c00a0fce38260c16 Author: Christoph Hellwig Date: Wed May 7 14:04:30 2025 +0200 block: pass the operation to bio_{map,copy}_kern That way the bio can be allocated with the right operation already set and there is no need to pass the separated 'reading' argument. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-7-hch@lst.de Signed-off-by: Jens Axboe commit af78428ed3f3eebad7be9d0463251046e9582cf6 Author: Christoph Hellwig Date: Wed May 7 14:04:29 2025 +0200 block: remove the q argument from blk_rq_map_kern Remove the q argument from blk_rq_map_kern and the internal helpers called by it as the queue can trivially be derived from the request. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-6-hch@lst.de Signed-off-by: Jens Axboe commit 8dd16f5e34693aa0aa6a4ed48427045008097e64 Author: Christoph Hellwig Date: Wed May 7 14:04:28 2025 +0200 block: add a bio_add_vmalloc helpers Add a helper to add a vmalloc region to a bio, abstracting away the vmalloc addresses from the underlying pages and another one wrapping it for the simple case where all data fits into a single bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-5-hch@lst.de Signed-off-by: Jens Axboe commit 75f88659e47dc570bdebddf77d7a3cd5f0845612 Author: Christoph Hellwig Date: Wed May 7 14:04:27 2025 +0200 block: add a bio_add_max_vecs helper Add a helper to check how many bio_vecs are needed to add a kernel virtual address range to a bio, accounting for the always contiguous direct mapping and vmalloc mappings that usually need a bio_vec per page sized chunk. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-4-hch@lst.de Signed-off-by: Jens Axboe commit 10b1e59cdadabff16fc78eb2ca4c341b1502293c Author: Christoph Hellwig Date: Wed May 7 14:04:26 2025 +0200 block: add a bdev_rw_virt helper Add a helper to perform synchronous I/O on a kernel direct map range. Currently this is implemented in various places in usually not very efficient ways, so provide a generic helper instead. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-3-hch@lst.de Signed-off-by: Jens Axboe commit 850e210d5ad21b94b55b97d4d82b4cdeb0bb05df Author: Christoph Hellwig Date: Wed May 7 14:04:25 2025 +0200 block: add a bio_add_virt_nofail helper Add a helper to add a directly mapped kernel virtual address to a bio so that callers don't have to convert to pages or folios. For now only the _nofail variant is provided as that is what all the obvious callers want. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250507120451.4000627-2-hch@lst.de Signed-off-by: Jens Axboe commit 368604c739cf25802f71edac16a0fcac97e4e671 Author: Jon Hunter Date: Thu May 1 13:46:21 2025 +0100 ACPI: APEI: EINJ: Fix probe error message Commit 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface") updated the APEI error injection driver to use the faux device interface and now for devices that don't support ACPI, the following error message is seen on boot: ERR KERN faux acpi-einj: probe did not succeed, tearing down the device The APEI error injection driver returns -ENODEV in the probe function if ACPI is not supported and so after transitioning the driver to the faux device interface, the error returned from the probe now causes the above error message to be displayed. Fix this by moving the code that detects if ACPI is supported to the einj_init() function to fix the false error message displayed for devices that don't support ACPI. Fixes: 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface") Signed-off-by: Jon Hunter Reviewed-by: Sudeep Holla Link: https://patch.msgid.link/20250501124621.1251450-1-jonathanh@nvidia.com Signed-off-by: Rafael J. Wysocki commit ecd9352cd92784717670e22a5ebd890ca0ae980e Author: Jani Nikula Date: Wed May 7 11:31:36 2025 +0300 drm/i915/rps: fix stale reference to i915->irq_lock The RPS code has been switched from using i915->irq_lock to gt->irq_lock years ago in commit d762043f7ab1 ("drm/i915: Extract GT powermanagement interrupt handling"). Fix the stale comment referencing i915->irq_lock, which has also ceased to exist. Reported-by: Gustavo Sousa Closes: https://lore.kernel.org/r/174656703321.1401.8627403371256302933@intel.com Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20250507083136.1987023-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3e52667a9c328b3d1a1ddbbb6b8fbf63a217bda3 Merge: 9daaf197860055 ef6a29e86785fe Author: David S. Miller Date: Wed May 7 12:57:06 2025 +0100 Merge branch 'lan78xx-phylink-prep' Oleksij Rempel says: ==================== lan78xx: preparation for PHYLINK conversion This patch series contains the first part of the LAN78xx driver refactoring in preparation for converting the driver to use the PHYLINK framework. The goal of this initial part is to reduce the size and complexity of the final PHYLINK conversion by introducing incremental cleanups and logical separation of concerns, such as: - Improving error handling in the PHY initialization path - Refactoring PHY detection and MAC-side configuration - Moving LED DT configuration to a dedicated helper - Separating USB link power and flow control setup from the main probe logic - Extracting PHY interrupt acknowledgment logic Each patch is self-contained and moves non-PHYLINK-specific logic out of the way, setting the stage for the actual conversion in a follow-up patch series. changes v8 (as split from full v7 00/12 series): - Split the original series to make review easier - This part includes only preparation patches; actual PHYLINK integration will follow ==================== Signed-off-by: David S. Miller commit ef6a29e86785fe56e4af814509617183d7d8779c Author: Oleksij Rempel Date: Mon May 5 10:43:41 2025 +0200 net: usb: lan78xx: Extract flow control configuration to helper Move flow control register configuration from lan78xx_update_flowcontrol() into a new helper function lan78xx_configure_flowcontrol(). This separates hardware-specific programming from policy logic and simplifies the upcoming phylink integration. The values used in this initial version of lan78xx_configure_flowcontrol() are taken over as-is from the original implementation to avoid functional changes. While they may not be optimal for all USB and link speed combinations, they are known to work reliably. Optimization of pause time and thresholds based on runtime conditions can be done in a separate follow-up patch. The forward declaration of lan78xx_configure_flowcontrol() will also be removed later during the phylink conversion. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit d746e0740b2805abbd7b56f1dd34a6b9a0f5728f Author: Oleksij Rempel Date: Mon May 5 10:43:40 2025 +0200 net: usb: lan78xx: Refactor USB link power configuration into helper Move the USB link power configuration logic from lan78xx_link_reset() to a new helper function lan78xx_configure_usb(). This simplifies the main link reset path and isolates USB-specific logic. The new function handles U1/U2 enablement based on Ethernet link speed, but only for SuperSpeed-capable devices (LAN7800 and LAN7801). LAN7850, a High-Speed-only device, is explicitly excluded. A warning is logged if SuperSpeed is reported unexpectedly for LAN7850. Add a forward declaration for lan78xx_configure_usb() as preparation for the upcoming phylink conversion, where it will also be used from the mac_link_up() callback. Open questions remain: - Why is the 1000 Mbps configuration split into two steps (U2 disable, then U1 enable), unlike the single-step config used for 10/100 Mbps? - U1/U2 behavior appears to depend on proper EEPROM configuration. There are known devices in the field without EEPROM. Should the driver enforce safe defaults in such cases? Due to lack of USB subsystem expertise, no changes were made to this logic beyond structural refactoring. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit f485849a381f829234143e044663f35330d0b71a Author: Oleksij Rempel Date: Mon May 5 10:43:39 2025 +0200 net: usb: lan78xx: Extract PHY interrupt acknowledgment to helper Move the PHY interrupt acknowledgment logic from lan78xx_link_reset() to a new helper function lan78xx_phy_int_ack(). This simplifies the code and prepares for reusing the acknowledgment logic independently from the full link reset process, such as when using phylink. No functional change intended. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan Signed-off-by: David S. Miller commit 8ba1f33c55d213ee0da1b972b481407cfddeda4a Author: Oleksij Rempel Date: Mon May 5 10:43:38 2025 +0200 net: usb: lan78xx: move LED DT configuration to helper Extract the LED enable logic based on the "microchip,led-modes" property into a new helper function lan78xx_configure_leds_from_dt(). This simplifies lan78xx_phy_init() and improves modularity. No functional changes intended. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan Signed-off-by: David S. Miller commit d39f339d2603736ff90b0b32d9aea3b954307fd5 Author: Oleksij Rempel Date: Mon May 5 10:43:37 2025 +0200 net: usb: lan78xx: refactor PHY init to separate detection and MAC configuration Split out PHY detection into lan78xx_get_phy() and MAC-side setup into lan78xx_mac_prepare_for_phy(), making the main lan78xx_phy_init() cleaner and easier to follow. This improves separation of concerns and prepares the code for a future transition to phylink. Fixed PHY registration and interface selection are now handled in lan78xx_get_phy(), while MAC-side delay configuration is done in lan78xx_mac_prepare_for_phy(). The fixed PHY fallback is preserved for setups like EVB-KSZ9897-1, where LAN7801 connects directly to a KSZ switch without a standard PHY or device tree support. No functional changes intended. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan Signed-off-by: David S. Miller commit 3da0ae52705d609f7d080a8158cd46db222b29de Author: Oleksij Rempel Date: Mon May 5 10:43:36 2025 +0200 net: usb: lan78xx: remove explicit check for missing PHY driver RGMII timing correctness relies on the PHY providing internal delays. This is typically ensured via PHY driver, strap pins, or PCB layout. Explicitly checking for a PHY driver here is unnecessary and non-standard. This logic applies to all MACs, not just LAN78xx, and should be left to phylib, phylink, or platform configuration. Drop the check and rely on standard subsystem behavior. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan Signed-off-by: David S. Miller commit 232aa459aa40a6f3c7d27063b3e9c1d57786eaff Author: Oleksij Rempel Date: Mon May 5 10:43:35 2025 +0200 net: usb: lan78xx: Improve error handling in PHY initialization Ensure that return values from `lan78xx_write_reg()`, `lan78xx_read_reg()`, and `phy_find_first()` are properly checked and propagated. Use `ERR_PTR(ret)` for error reporting in `lan7801_phy_init()` and replace `-EIO` with `-ENODEV` where appropriate to provide more accurate error codes. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan Signed-off-by: David S. Miller commit f31acff017b1d80e649f674450d3b64d3265848c Author: Ming Lei Date: Wed May 7 17:25:37 2025 +0800 block: fix warning on 'make htmldocs' Fix the following warning when running 'make htmldocs': +WARNING: include/linux/blk-mq.h:532 struct member 'update_nr_hwq_lock' not described in 'blk_mq_tag_set' Fixes: 98e68f67020c ("block: prevent adding/deleting disk during updating nr_hw_queues") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20250507163220.00141d77@canb.auug.org.au/ Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250507092537.3009112-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit d75d38dc460452cc8bbca483dee65839e11c71fe Author: Shenghao Ding Date: Wed May 7 17:46:15 2025 +0800 ASoC: tas2781: Add a debugfs node for acoustic tuning "Acoustic Tuning" debugfs node is a bridge to the acoustic tuning tool which can tune the chips' acoustic effect. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250507094616.210-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit b2602a84ff85926be8d1fb7186128976c9f76c3f Author: Kees Cook Date: Fri Apr 25 23:13:58 2025 -0700 drm/i915/gt: Remove const from struct i915_wa list allocation In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct i915_wa *". The returned type, while technically matching, will be const qualified. As there is no general way to remove const qualifiers, adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Acked-by: Jani Nikula Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250426061357.work.749-kees@kernel.org commit 446692759b0732ef2d9a93b7e6730aa762ccf0ab Author: Mostafa Saleh Date: Wed Apr 30 16:27:11 2025 +0000 KVM: arm64: Handle UBSAN faults As now UBSAN can be enabled, handle brk64 exits from UBSAN. Re-use the decoding code from the kernel, and panic with UBSAN message. Signed-off-by: Mostafa Saleh Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250430162713.1997569-5-smostafa@google.com Signed-off-by: Marc Zyngier commit 61b38f7591fb434fce326c1d686a9793c7f418bc Author: Mostafa Saleh Date: Wed Apr 30 16:27:10 2025 +0000 KVM: arm64: Introduce CONFIG_UBSAN_KVM_EL2 Add a new Kconfig CONFIG_UBSAN_KVM_EL2 for KVM which enables UBSAN for EL2 code (in protected/nvhe/hvhe) modes. This will re-use the same checks enabled for the kernel for the hypervisor. The only difference is that for EL2 it always emits a "brk" instead of implementing hooks as the hypervisor can't print reports. The KVM code will re-use the same code for the kernel "report_ubsan_failure()" so #ifdefs are changed to also have this code for CONFIG_UBSAN_KVM_EL2 Signed-off-by: Mostafa Saleh Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250430162713.1997569-4-smostafa@google.com Signed-off-by: Marc Zyngier commit d683a8561889c1813fe2ad6082769c91e3cb71b3 Author: Mostafa Saleh Date: Wed Apr 30 16:27:09 2025 +0000 ubsan: Remove regs from report_ubsan_failure() report_ubsan_failure() doesn't use argument regs, and soon it will be called from the hypervisor context were regs are not available. So, remove the unused argument. Signed-off-by: Mostafa Saleh Acked-by: Kees Cook Link: https://lore.kernel.org/r/20250430162713.1997569-3-smostafa@google.com Signed-off-by: Marc Zyngier commit dc1fd37a7f501731e488c1c6f86b2f591632a4ad Author: Mostafa Saleh Date: Wed Apr 30 16:27:08 2025 +0000 arm64: Introduce esr_is_ubsan_brk() Soon, KVM is going to use this logic for hypervisor panics, so add it in a wrapper that can be used by the hypervisor exit handler to decode hyp panics. Signed-off-by: Mostafa Saleh Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250430162713.1997569-2-smostafa@google.com Signed-off-by: Marc Zyngier commit d041b76ac9fb9e60e7cdb0265ed9d8b6058a88bf Author: Uwe Kleine-König Date: Wed Apr 30 13:56:00 2025 +0200 pwm: Formally describe the procedure used to pick a hardware waveform setting This serves as specification for both, PWM consumers and the respective callback for lowlevel drivers. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/d2916bfa70274961ded26b07ab6998c36b90e69a.1746010245.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 164c4ac754abaf9643815d09001cc7d81042d624 Author: Uwe Kleine-König Date: Wed Apr 30 13:55:59 2025 +0200 pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after rounding up While telling the caller of pwm_set_waveform_might_sleep() if the request was completed by rounding down only or (some) rounding up gives additional information, it makes usage this function needlessly hard and the additional information is not used. A prove for that is that currently both users of this function just pass the returned value up to their caller even though a positive value isn't intended there. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/528cc3bbd9e35dea8646b1bcc0fbfe6c498bb4ed.1746010245.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit e866834c8baabc33b431902beeeb0c94dfbc1024 Author: Uwe Kleine-König Date: Wed Apr 30 13:55:58 2025 +0200 pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible requests Up to now pwm_set_waveform_might_sleep() returned 1 for exact requests that couldn't be served exactly. In contrast to pwm_round_waveform_might_sleep() and pwm_set_waveform_might_sleep() with exact = false this is an error condition. So simplify handling for callers of pwm_set_waveform_might_sleep() by returning -EDOM instead of 1 in this case. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20538a46719584dafd8a1395c886780a97dcdf79.1746010245.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit aefc11550ebd08eadee6d643792c9092de2e472f Author: Dr. David Alan Gilbert Date: Sun Apr 20 17:46:56 2025 +0100 genirq: Remove unused remove_percpu_irq() remove_percpu_irq() has been unused since it was added in 2011 by commit 31d9d9b6d830 ("genirq: Add support for per-cpu dev_id interrupts") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250420164656.112641-1-linux@treblig.org commit 02eaee70babd860d76dc23f9165f4496d0ffe77f Author: Patrice Chotard Date: Mon Apr 28 10:58:32 2025 +0200 MAINTAINERS: add entry for STM32 OCTO MEMORY MANAGER driver Add myself as STM32 OCTO MEMORY MANAGER maintainer. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250428-upstream_ospi_v6-v11-3-1548736fd9d2@foss.st.com Signed-off-by: Krzysztof Kozlowski commit 8181d061dcff140fd5a40e568d8adb81f1403a28 Author: Patrice Chotard Date: Mon Apr 28 10:58:31 2025 +0200 memory: Add STM32 Octo Memory Manager driver Octo Memory Manager driver (OMM) manages: - the muxing between 2 OSPI busses and 2 output ports. There are 4 possible muxing configurations: - direct mode (no multiplexing): OSPI1 output is on port 1 and OSPI2 output is on port 2 - OSPI1 and OSPI2 are multiplexed over the same output port 1 - swapped mode (no multiplexing), OSPI1 output is on port 2, OSPI2 output is on port 1 - OSPI1 and OSPI2 are multiplexed over the same output port 2 - the split of the memory area shared between the 2 OSPI instances. - chip select selection override. - the time between 2 transactions in multiplexed mode. - check firewall access. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250428-upstream_ospi_v6-v11-2-1548736fd9d2@foss.st.com Signed-off-by: Krzysztof Kozlowski commit 4a98ec836a201d34ac27636960c2c81d9b3b7e19 Author: Patrice Chotard Date: Mon Apr 28 10:58:30 2025 +0200 dt-bindings: memory-controllers: Add STM32 Octo Memory Manager controller Add bindings for STM32 Octo Memory Manager (OMM) controller. OMM manages: - the muxing between 2 OSPI busses and 2 output ports. There are 4 possible muxing configurations: - direct mode (no multiplexing): OSPI1 output is on port 1 and OSPI2 output is on port 2 - OSPI1 and OSPI2 are multiplexed over the same output port 1 - swapped mode (no multiplexing), OSPI1 output is on port 2, OSPI2 output is on port 1 - OSPI1 and OSPI2 are multiplexed over the same output port 2 - the split of the memory area shared between the 2 OSPI instances. - chip select selection override. - the time between 2 transactions in multiplexed mode. Signed-off-by: Patrice Chotard Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250428-upstream_ospi_v6-v11-1-1548736fd9d2@foss.st.com Signed-off-by: Krzysztof Kozlowski commit 66db876162155c1cec87359cd78c62aaafde9257 Author: Krzysztof Kozlowski Date: Wed May 7 11:21:22 2025 +0200 bus: firewall: Fix missing static inline annotations for stubs Stubs in the header file for !CONFIG_STM32_FIREWALL case should be both static and inline, because they do not come with earlier declaration and should be inlined in every unit including the header. Cc: Patrice Chotard Cc: stable@vger.kernel.org Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework") Link: https://lore.kernel.org/r/20250507092121.95121-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 8278fd6006a02e3352d5230927c4576f53fb3b06 Author: Charlie Jenkins Date: Wed May 7 00:11:30 2025 -0700 LoongArch: entry: Fix include order Reorder some introduced include headers to keep alphabetical order. Fixes: 7ace1602abf2 ("LoongArch: entry: Migrate ret_from_fork() to C") Signed-off-by: Charlie Jenkins Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250507-loongarch_include_order-v1-1-e8aada6a3da8@rivosinc.com commit 798f589092770f5c584f4a6829fc10e595856239 Author: Mao Jinlong Date: Tue May 6 00:57:43 2025 -0700 coresight: Disable MMIO logging for coresight stm driver With MMIO logging enabled, the MMIO access are traced and could be sent to an STM device. Thus, an STM driver MMIO access could create circular call chain with MMIO logging. Disable it for STM driver. [] stm_source_write[stm_core]+0xc4 [] stm_ftrace_write[stm_ftrace]+0x40 [] trace_event_buffer_commit+0x238 [] trace_event_raw_event_rwmmio_rw_template+0x8c [] log_post_write_mmio+0xb4 [] writel_relaxed[coresight_stm]+0x80 [] stm_generic_packet[coresight_stm]+0x1a8 [] stm_data_write[stm_core]+0x78 [] stm_source_write[stm_core]+0x7c [] stm_ftrace_write[stm_ftrace]+0x40 [] trace_event_buffer_commit+0x238 [] trace_event_raw_event_rwmmio_read+0x84 [] log_read_mmio+0xac [] readl_relaxed[coresight_tmc]+0x50 Signed-off-by: Mao Jinlong Reviewed-by: Leo Yan Reviewed-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250506075743.1398257-1-quic_jinlmao@quicinc.com commit deeeaf6a522160fb262edd76e70240330e4ff8a6 Author: Leo Yan Date: Fri May 2 12:11:08 2025 +0100 coresight: replicator: Fix panic for clearing claim tag On platforms with a static replicator, a kernel panic occurs during boot: [ 4.999406] replicator_probe+0x1f8/0x360 [ 5.003455] replicator_platform_probe+0x64/0xd8 [ 5.008115] platform_probe+0x70/0xf0 [ 5.011812] really_probe+0xc4/0x2a8 [ 5.015417] __driver_probe_device+0x80/0x140 [ 5.019813] driver_probe_device+0xe4/0x170 [ 5.024032] __driver_attach+0x9c/0x1b0 [ 5.027900] bus_for_each_dev+0x7c/0xe8 [ 5.031769] driver_attach+0x2c/0x40 [ 5.035373] bus_add_driver+0xec/0x218 [ 5.039154] driver_register+0x68/0x138 [ 5.043023] __platform_driver_register+0x2c/0x40 [ 5.047771] coresight_init_driver+0x4c/0xe0 [ 5.052079] replicator_init+0x30/0x48 [ 5.055865] do_one_initcall+0x4c/0x280 [ 5.059736] kernel_init_freeable+0x1ec/0x3c8 [ 5.064134] kernel_init+0x28/0x1f0 [ 5.067655] ret_from_fork+0x10/0x20 A static replicator doesn't have registers, so accessing the claim register results in a NULL pointer deference. Fixes the issue by accessing the claim registers only after the I/O resource has been successfully mapped. Fixes: 7cd6368657f1 ("coresight: Clear self hosted claim tag on probe") Signed-off-by: Leo Yan Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250502111108.2726217-1-leo.yan@arm.com commit 20e9579f11b6cbdf0556d9cd85a0aa7653caf341 Author: Herbert Xu Date: Wed May 7 09:41:51 2025 +0800 um: Include linux/types.h in asm/fpu/api.h Include linux/types.h before using bool. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505070045.vWc04ygs-lkp@intel.com/ Signed-off-by: Herbert Xu Acked-by: Johannes Berg Signed-off-by: Herbert Xu commit 0f2ab6a773e26f1e3d4a5de5476ee8288e6628f9 Author: Jani Nikula Date: Tue May 6 16:06:50 2025 +0300 drm/i915/irq: move i915->irq_lock to display->irq.lock Observe that i915->irq_lock is no longer used to protect anything outside of display. Make it a display thing. This allows us to remove the ugly #define irq_lock irq.lock hack from xe compat header. Note that this is slightly more subtle than it first looks. For i915, there's no functional change here. The lock is moved. However, for xe, we'll now have *two* locks, xe->irq.lock and display->irq.lock. These should protect different things, though. Indeed, nesting in the past would've lead to a deadlock because they were the same lock. With the i915 references gone, we can make a handful more files independent of i915_drv.h. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/6d8d2ce0f34a9c7361a5e2fcf96bb32a34c57e76.1746536745.git.jani.nikula@intel.com [Jani: Fixed a comment while applying.] Signed-off-by: Jani Nikula commit 9536d60202fda83e30dd4885b8c91e7dec53324f Author: Jani Nikula Date: Tue May 6 16:06:49 2025 +0300 drm/i915/rps: refactor display rps support Make the gt rps code and display irq code interact via intel_display_rps.[ch], instead of direct access. Add no-op static inline stubs for xe instead of having a separate build unit doing nothing. All of this clarifies the interfaces between i915 core and display. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/ef2a46dc8f30b72282494f54e98cb5fed7523b58.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7a3bf08ae90fd7ab8f5d791801c284d6f1cbc8ed Author: Jani Nikula Date: Tue May 6 16:06:48 2025 +0300 drm/i915/irq: make i915_enable_asle_pipestat() static With all users of i915_enable_asle_pipestat() inside intel_display_irq.c, we can make the function static. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/9511e368c5244aaa04cc45f46e2425737acd29fb.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0c61417bde718c57066449b256c5472d74700212 Author: Jani Nikula Date: Tue May 6 16:06:47 2025 +0300 drm/i915/irq: split out i965_display_irq_postinstall() Split out i965_display_irq_postinstall() similar to other platforms. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/5d404dcd0c606d1cb11f2e09c45e151a75b5b2c6.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4c05cef04eab582eac32f39730b9a21aea857744 Author: Jani Nikula Date: Tue May 6 16:06:46 2025 +0300 drm/i915/irq: split out i915_display_irq_postinstall() Split out i915_display_irq_postinstall() similar to other platforms. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/11de06206ff10c27104b0ac3efda085bf4c1f1a6.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0f9dd43ff83c42e8cd319f9b25255550a72ad613 Author: Jani Nikula Date: Tue May 6 16:06:45 2025 +0300 drm/i915/irq: move locking inside vlv_display_irq_postinstall() All users of vlv_display_irq_postinstall() outside of intel_display_irq.c have a lock/unlock pair. Move the locking inside the function. Add an unlocked variant for internal use, similar to the _vlv_display_irq_reset() and vlv_display_irq_reset() functions. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/93ea785d2d9bdb4e18328aa42a00a492d9d783c0.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5d22f72026f68e7773780b4fa1f4907f56b6abc8 Author: Jani Nikula Date: Tue May 6 16:06:44 2025 +0300 drm/i915/irq: move locking inside valleyview_{enable, disable}_display_irqs() All users of valleyview_enable_display_irqs() and valleyview_disable_display_irqs() have a lock/unlock pair. Move the locking inside the functions. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/bb6d941c47260aea11e4af5d52572b0e5f139929.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ed6da23b664ddc9e2d12114670260b6986088154 Author: Jani Nikula Date: Tue May 6 16:06:43 2025 +0300 drm/i915/irq: move locking inside vlv_display_irq_reset() All users of vlv_display_irq_reset() have a lock/unlock pair. Move the locking inside the function. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/0f8176b777fa24921458996f7d6f982f955a52f6.1746536745.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 104361217c2a2ab7d6a9de756952814af0a8a5ad Author: Thomas Gleixner Date: Tue Apr 29 08:55:54 2025 +0200 genirq: Remove irq_[get|put]_desc*() All users are converted to the guards. Remove the helpers. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.729586582@linutronix.de commit 193879e28be7bb26abc795e6b5096ef9fe3131cf Author: Thomas Gleixner Date: Tue Apr 29 08:55:53 2025 +0200 genirq/manage: Rework irq_set_irqchip_state() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.670808288@linutronix.de commit 782249a997472acec7e8d8f04177750192712a19 Author: Thomas Gleixner Date: Tue Apr 29 08:55:52 2025 +0200 genirq/manage: Rework irq_get_irqchip_state() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.612184618@linutronix.de commit 5fec6d5cd24a35f5b03612dd02975e3be1b788b8 Author: Thomas Gleixner Date: Tue Apr 29 08:55:50 2025 +0200 genirq/manage: Rework teardown_percpu_nmi() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.552884529@linutronix.de commit 65dd1f7ca94fde615684827af285a0475d177b9a Author: Thomas Gleixner Date: Tue Apr 29 08:55:49 2025 +0200 genirq/manage: Rework prepare_percpu_nmi() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.494561120@linutronix.de commit 8e3f672b1949d58462e23abdc41c039a82e685fd Author: Thomas Gleixner Date: Tue Apr 29 08:55:47 2025 +0200 genirq/manage: Rework disable_percpu_irq() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.435932527@linutronix.de commit b171f712d6ef1ae073d18e8ea9df1e96eb34f226 Author: Thomas Gleixner Date: Tue Apr 29 08:55:46 2025 +0200 genirq/manage: Rework irq_percpu_is_enabled() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.376836282@linutronix.de commit 508bd94c3ad4bd8b5dba8280198ce1eb31eb625a Author: Thomas Gleixner Date: Tue Apr 29 08:55:44 2025 +0200 genirq/manage: Rework enable_percpu_irq() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.315844964@linutronix.de commit 90140d08ac7a1e1ea3136132e1fab9baec174c25 Author: Thomas Gleixner Date: Tue Apr 29 08:55:43 2025 +0200 genirq/manage: Rework irq_set_parent() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.258216558@linutronix.de commit a1ceb831417b8e23bd041d3e7021e235fa845128 Author: Thomas Gleixner Date: Tue Apr 29 08:55:41 2025 +0200 genirq/manage: Rework can_request_irq() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Make the return value boolean to reflect it's meaning. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.187250840@linutronix.de commit 8589e325ba4f3effe0d47924d38a5c6aef7a5512 Author: Thomas Gleixner Date: Wed Apr 30 14:48:15 2025 +0200 genirq/manage: Rework irq_set_irq_wake() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/87ldrhq0hc.ffs@tglx commit bddd10c554073ba0c036b97b4f430119e2137aa4 Author: Thomas Gleixner Date: Tue Apr 29 08:55:38 2025 +0200 genirq/manage: Rework enable_irq() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.071157729@linutronix.de commit 1b74444467240d9ff11cf109efdfb2af2f0b60c7 Author: Thomas Gleixner Date: Tue Apr 29 08:55:37 2025 +0200 genirq/manage: Rework __disable_irq_nosync() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065422.013088277@linutronix.de commit 55ac0ad22fec0c5c5a76112725804957a62f5af7 Author: Thomas Gleixner Date: Thu Mar 13 17:00:39 2025 +0100 genirq/manage: Rework irq_set_vcpu_affinity() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/87ikmlq0fk.ffs@tglx commit 7e04e5c6f6158d5528f0591cc6b3fc1a2b771a90 Author: Thomas Gleixner Date: Tue Apr 29 08:55:34 2025 +0200 genirq/manage: Rework __irq_apply_affinity_hint() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.897188799@linutronix.de commit b0561582ea1eaa4d778b2baed18b0cc2b48674bb Author: Thomas Gleixner Date: Tue Apr 29 08:55:32 2025 +0200 genirq/manage: Rework irq_update_affinity_desc() Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.830357569@linutronix.de commit 17c1953567ebe08c88effb053df13744d0952cd1 Author: Thomas Gleixner Date: Tue Apr 29 08:55:31 2025 +0200 genirq/manage: Convert to lock guards Convert lock/unlock pairs to guards. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.771476066@linutronix.de commit 0c169edf3607c74caf22aba844737348bd2381cc Author: Thomas Gleixner Date: Tue Apr 29 08:55:29 2025 +0200 genirq/manage: Cleanup kernel doc comments Get rid of the extra tab to make it consistent. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.710273122@linutronix.de commit 95a3645893bceb18475c3bea4afaf47d23d11ab6 Author: Thomas Gleixner Date: Tue Apr 29 08:55:28 2025 +0200 genirq/chip: Rework irq_modify_status() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.650454052@linutronix.de commit 5cd05f3e23152b97e0be09938c78058395c3ee19 Author: Thomas Gleixner Date: Tue Apr 29 08:55:26 2025 +0200 genirq/chip: Rework irq_set_handler() variants Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.590753128@linutronix.de commit b3801ddc6883169a2e020dbf06da3723446808ee Author: Thomas Gleixner Date: Tue Apr 29 08:55:25 2025 +0200 genirq/chip: Rework irq_set_chip_data() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.532308759@linutronix.de commit c836e5a70c59a361559d57ad02ececa40d160cb9 Author: Thomas Gleixner Date: Tue Apr 29 08:55:23 2025 +0200 genirq/chip: Rework irq_set_msi_desc_off() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.473563978@linutronix.de commit 321a0fdf1337c5449a589b3d8186b23ecd36b240 Author: Thomas Gleixner Date: Tue Apr 29 08:55:22 2025 +0200 genirq/chip: Rework irq_set_handler_data() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.415072350@linutronix.de commit fa870e0f3551cfff90c7d0261e8f208a83097946 Author: Thomas Gleixner Date: Tue Apr 29 08:55:20 2025 +0200 genirq/chip: Rework irq_set_irq_type() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.355673840@linutronix.de commit 46ff4d11f081ef9bc3df3d56f54a10e955dba733 Author: Thomas Gleixner Date: Tue Apr 29 08:55:19 2025 +0200 genirq/chip: Rework irq_set_chip() Use the new guards to get and lock the interrupt descriptor and tidy up the code. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.295400891@linutronix.de commit e7c654255791e9a95b62b992ef3540dfee00e8d5 Author: Thomas Gleixner Date: Tue Apr 29 08:55:17 2025 +0200 genirq/chip: Use lock guards where applicable Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.236248749@linutronix.de commit f71d7c45edadfa98edac74bfdf820cce5482673a Author: Thomas Gleixner Date: Tue Apr 29 08:55:16 2025 +0200 genirq/chip: Rework handle_fasteoi_mask_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Note: The mask_irq() operation in the second condition was redundant as the interrupt is already masked right at the beginning of the function. Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.175652864@linutronix.de commit 2beb01cbb75e5849b6ebc15917c7dd3e46264b48 Author: Thomas Gleixner Date: Tue Apr 29 08:55:14 2025 +0200 genirq/chip: Rework handle_fasteoi_ack_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.105015800@linutronix.de commit 2d46aea52c02612d1b49aa562162eee58fa1968d Author: Thomas Gleixner Date: Tue Apr 29 08:55:13 2025 +0200 genirq/chip: Rework handle_edge_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065421.045492336@linutronix.de commit 15d772e2eebd297e3714abad8bf1d424d3d700fc Author: Thomas Gleixner Date: Tue Apr 29 08:55:11 2025 +0200 genirq/chip: Rework handle_eoi_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.986002418@linutronix.de commit 2334c45521033772fd808e54814f5844ac35c9d0 Author: Thomas Gleixner Date: Tue Apr 29 08:55:10 2025 +0200 genirq/chip: Rework handle_level_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.926362488@linutronix.de commit a155777175bb3d0e93f8605d4d93ae6abf3484ab Author: Thomas Gleixner Date: Tue Apr 29 08:55:08 2025 +0200 genirq/chip: Rework handle_untracked_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.865212916@linutronix.de commit 1a3678675f6945f97945dc453352c9c1fa26c470 Author: Thomas Gleixner Date: Tue Apr 29 08:55:07 2025 +0200 genirq/chip: Rework handle_simple_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.804683349@linutronix.de commit 2ef2e13094c7510c40833951c2ec36cf8574331a Author: Thomas Gleixner Date: Tue Apr 29 08:55:05 2025 +0200 genirq/chip: Rework handle_nested_irq() Use the new helpers to decide whether the interrupt should be handled and switch the descriptor locking to guard(). Fixup the kernel doc comment while at it. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.744042890@linutronix.de commit a6d8d0d12e1942a9403a0e79c87c161aa801d1a7 Author: Thomas Gleixner Date: Tue Apr 29 08:55:04 2025 +0200 genirq/chip: Prepare for code reduction The interrupt flow handlers have similar patterns to decide whether to handle an interrupt or not. Provide common helper functions to allow removal of duplicated code. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.682547546@linutronix.de commit ecb84a3e7e7cccd7578d8b4c57035e98cd89901f Author: Thomas Gleixner Date: Tue Apr 29 08:55:02 2025 +0200 genirq/debugfs: Convert to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.620200108@linutronix.de commit 88a4df117ad66100d0f870aa02032dfb9cb29179 Author: Thomas Gleixner Date: Tue Apr 29 08:55:01 2025 +0200 genirq/cpuhotplug: Convert to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.560083665@linutronix.de commit 113332a865530c8ab89d8292e59293b6c9301f96 Author: Thomas Gleixner Date: Tue Apr 29 08:54:59 2025 +0200 genirq/spurious: Switch to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.497714413@linutronix.de commit e815ffc759fb810672b9d90badae928534cde78a Author: Thomas Gleixner Date: Tue Apr 29 08:54:58 2025 +0200 genirq/spurious: Cleanup code Clean up the coding style No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.437285102@linutronix.de commit 659ff9c9d77b8ad9d9c18e264abc9a56bd19230e Author: Thomas Gleixner Date: Tue Apr 29 08:54:56 2025 +0200 genirq/proc: Switch to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.373998838@linutronix.de commit 4bcdf07467fab54a5dfbb0fb8546b5e59c87c497 Author: Thomas Gleixner Date: Tue Apr 29 08:54:55 2025 +0200 genirq/resend: Switch to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.312487167@linutronix.de commit 19b4b14428338775d8c0d0e725ecfb14e10121c3 Author: Thomas Gleixner Date: Tue Apr 29 08:54:53 2025 +0200 genirq/pm: Switch to lock guards Convert all lock/unlock pairs to guards and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.251299112@linutronix.de commit e80618b27a008839e3b61c1efa0b915b155f2a8d Author: Thomas Gleixner Date: Tue Apr 29 08:54:52 2025 +0200 genirq/autoprobe: Switch to lock guards Convert all lock/unlock pairs to guards. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.188866381@linutronix.de commit 5d964a9f7cd8f669db588d9d0db61b4f81af4978 Author: Thomas Gleixner Date: Wed Apr 30 08:36:39 2025 +0200 genirq/irqdesc: Switch to lock guards Replace all lock/unlock pairs with lock guards and simplify the code flow. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jiri Slaby Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/871ptaqhoo.ffs@tglx commit 0f70a49f3fa386d34203efd426a2937592cd26c6 Author: Thomas Gleixner Date: Tue Apr 29 08:54:49 2025 +0200 genirq: Provide conditional lock guards The interrupt core code has an ever repeating pattern: unsigned long flags; struct irq_desc *desc = irq_get_desc_[bus]lock(irq, &flags, mode); if (!desc) return -EINVAL; .... irq_put_desc_[bus]unlock(desc, flags); That requires gotos in failure paths and just creates visual clutter. Provide lock guards, which allow to simplify the code. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20250429065420.061659985@linutronix.de commit fea017a99ba5e28b23f8249c04b2f475e4ed1fb3 Author: Kendra Moore Date: Sun Apr 20 21:02:05 2025 -0400 docs: dmaengine: add explanation for DMA_ASYNC_TX capability This patch replaces the TODO for DMA_ASYNC_TX in the DMA engine provider documentation. The flag is automatically set by the DMA framework when a device supports key asynchronous memory-to-memory operations such as memcpy, memset, xor, pq, xor_val, and pq_val. It must not be set by drivers directly. Signed-off-by: Kendra Moore Signed-off-by: Jonathan Corbet Message-ID: <20250421010205.84719-1-kendra.j.moore3443@gmail.com> commit 422f5b78bfb16e6e207d5f280ee75517ca365458 Author: Jean-Michel Hautbois Date: Mon Apr 21 18:48:10 2025 +0200 Documentation: leds: improve readibility of multicolor doc When reading the documentation of multicolor leds, the HTML output is not easy to read. Improve it by adding a few markups, splitting the console in a dedicated block. Signed-off-by: Jean-Michel Hautbois Signed-off-by: Jonathan Corbet Message-ID: <20250421-leds-doc-v1-1-9a32df7fc6f4@yoseli.org> commit a76a2be26df37331d824f897b83658c3cc8aa514 Author: Jani Nikula Date: Tue May 6 13:57:19 2025 +0300 drm/i915/crtc: pass struct intel_display to DISPLAY_VER() Drop another reference to struct drm_i915_private. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/cb84073ff92a99e74ff6dfb8e395365b7cbb5332.1746529001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 32119a07c94a41be8ab02b259dbc8404541232f9 Author: Jani Nikula Date: Tue May 6 13:57:18 2025 +0300 drm/i915/bios: fix a comment referencing struct drm_i915_private struct intel_vbt_data is within struct intel_display nowadays, not struct drm_i915_private. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/b7a9a7c64f41cf61749a42ed4102e04b500fde83.1746529001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e4db15ea947717277f6f9b40e17fbdd728f26bbc Author: Jani Nikula Date: Tue May 6 13:57:17 2025 +0300 drm/i915/display: remove struct drm_i915_private forward declaration Remove unused struct drm_i915_private forward declaration from intel_display_core.h. Sort and group forward declarations while at it. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/fbccf45339a61711b377b35fd479a67b378c5571.1746529001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8ab1df5ed1e65bf4bb214f9353934e539243268f Author: Jani Nikula Date: Tue May 6 13:57:16 2025 +0300 drm/i915/dsi: remove dependency on i915_drv.h Remove final references to struct drm_i915_private and drop dependency on i915_drv.h. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/2cee3cd9d7d9bec8dfe9c21fe5d172b1843b3d97.1746529001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8f82b560c568981deab258f927cad02594aae8c6 Author: Alexander Shatalin Date: Wed Apr 30 14:27:26 2025 +0000 docs: fix typo in firmware-related section Fix a minor grammar issue by changing 'firmwares' to 'firmware' in the Documentation/index.rst file. Signed-off-by: Alexander Shatalin Signed-off-by: Jonathan Corbet Message-ID: <20250430142726.3276-1-sashatalin03@gmail.com> commit a5b57bd9b1f9ff69327fa2e5bd272c8694e626fb Author: Akira Yokosawa Date: Thu May 1 17:21:07 2025 +0900 docs: Makefile: Inherit PYTHONPYCACHEPREFIX setting as env variable Commit 6c2f0b28d76e ("docs: Makefile: store __pycache__ at the output directory") assigns a new path to PYTHONPYCACHEPREFIX for building kernel documentation. However, it is not necessarily optimal for everyone. If you find PYTHONPYCACHEPREFIX is already set, it strongly suggests that the developer has selected the setting as best suited for one's own workflow. Use "?=" in the assignment to PYTHONPYCACHEPREFIX so that the path of $(abspath $(BUILDDIR)/__pycache__) works only as a safeguard. Signed-off-by: Akira Yokosawa Cc: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <0253ce98-960c-4498-8ace-a4354e3ebc26@gmail.com> commit 40e71e32c8585e0b8655b14f09dd0cc24f6c2d8b Author: Bagas Sanjaya Date: Fri May 2 14:45:05 2025 +0700 Documentation: ioctl-number: Update outdated submission info Much like device numbers that used to be assigned by LANANA (see commit ebdf4040c16df5 ("Documentation: update the devices.txt documentation"), ioctl numbers list is maintained by general kernel community nowadays instead of contacting Michael directly as he's long stepped down from kernel-related activity (his last LKML message was from 2003 [1] and he's in CREDITS since the beginning of kernel's git history). Also, patch (including one to update ioctl numbers list) submission now follows process as described in Documentation/process/submitting-patches.rst rather than sending patches directly to Linus as in the distant past. Update the docs to reflect that. Link: https://lore.kernel.org/r/200305261446.h4QEkBVv023861@duracef.shout.net/ [1] Signed-off-by: Bagas Sanjaya Signed-off-by: Jonathan Corbet Message-ID: <20250502074504.26933-2-bagasdotme@gmail.com> commit a706a593cb19796f31d3a888423ef1a71885ae72 Author: Peter Robinson Date: Tue May 6 20:56:55 2025 +0100 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-rock3c As described in the radxa_rock_3c_v1400_schematic.pdf, the SPI Flash's VCC connector is connected to VCCIO_FLASH and according to the that same schematic, that belongs to the VCC_1V8 power source. This fixes the following warning: spi-nor spi4.0: supply vcc not found, using dummy regulator Fixes: ee219017ddb5 ("arm64: dts: rockchip: Add Radxa ROCK 3C") Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20250506195702.593044-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit 59e9910e8e49230c71b22a75b527183957fc8df5 Author: Salah Triki Date: Mon May 5 22:43:26 2025 +0100 memory: bt1-l2-ctl: replace scnprintf() with sysfs_emit() Documentation/filesystems/sysfs.rst mentions that show() should only use sysfs_emit() or sysfs_emit_at() when formating the value to be returned to user space. So replace scnprintf() with sysfs_emit(). Signed-off-by: Salah Triki Link: https://lore.kernel.org/r/aBkw_p9GkH2fm2UJ@pc Signed-off-by: Krzysztof Kozlowski commit f7f65536124db6a5666992f0d6fd9595fbbf067a Author: Stephan Gerhold Date: Tue Apr 22 13:03:53 2025 +0200 arm64: dts: qcom: msm8939: Drop generic UART pinctrl templates Remove the generic UART pinctrl templates from msm8939.dtsi and copy the definition for the custom UART use cases into the board DT files. This makes it clear that the set of pins/pull etc are specific to the board and UART use case. No functional change. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-6-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit 979b65d8f416353c6b44ec5c0ddc837b2d20ab47 Author: Stephan Gerhold Date: Tue Apr 22 13:03:52 2025 +0200 arm64: dts: qcom: msm8916: Drop generic UART pinctrl templates Remove the generic UART pinctrl templates from msm8916.dtsi and copy the definition for the custom UART use cases into the board DT files. This makes it clear that the set of pins/pull etc are specific to the board and UART use case. No functional change. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-5-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit fe848d64cc6516cd56f38d23cfb544a68231a6e8 Author: Stephan Gerhold Date: Tue Apr 22 13:03:51 2025 +0200 arm64: dts: qcom: msm8916-motorola: Use UART1 console pinctrl The Motorola MSM8916-based smartphones all use UART1 with 2 pins (TX, RX) as debug UART console, so make use of the new &blsp_uart1_console_default template. This applies the needed bias-pull-up to avoid garbage input, bootph-all for U-Boot and avoids having to override the UART pins. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-4-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit 2b8d22ef1687768e4b572d01cd2432eb86340dd1 Author: Stephan Gerhold Date: Tue Apr 22 13:03:50 2025 +0200 arm64: dts: qcom: msm8919/39: Use UART2 console pinctrl where appropriate Convert the majority of MSM8916/39-based boards, which use UART2 with 2 pins (TX, RX) for the debug UART console. This adds the needed bias-pull-up and bootph-all properties to avoid garbage input when UART is disconnected. apq8016-schneider-hmibsc.dts does not use UART2 as a debug console, so it's left as-is in this commit. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-3-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit 5c0c8b7a315ff63e01e9a608f78dea16daa57aed Author: Stephan Gerhold Date: Tue Apr 22 13:03:49 2025 +0200 arm64: dts: qcom: msm8916/39: Introduce new UART console pinctrl At the moment, msm8916/39.dtsi have two inconsistent UART pinctrl templates that are used by all the boards: - &blsp_uart1_default configures all 4 pins (TX, RX, CTS, RTS), some boards then limit this to just RX and TX - &blsp_uart2_default only configures 2 pins (TX, RX), even though UART2 also supports CTS/RTS It's difficult to define a generic pinctrl template for all UART use cases, since they are quite different in practice. The main use case for most of the 40+ MSM8916/39-based boards upstream is the UART debug console. The current generic template is lacking some properties to work properly: - bias-pull-up for RX: Generally, UART is push-pull and does not need pull up/down. Both sides drive TX, so RX should never be floating. This is why the current pinctrl in msm8916/39.dtsi uses bias-disable. However, this assumes that UART is always connected. For the debug console this will be rarely the case on mobile devices, only during debugging sessions. The rest of the time, the RX pin is floating. This has never caused massive problems, but it's obvious now that this needs fixing: (1) In U-Boot, we have been fighting with problems with autoboot for years. Most of the time, there is a single \0 byte ("break event") read during boot, which interrupts the autoboot process. I tried to work around that by inserting some random delay [1], but it turned out this is also not working reliably on all boards. What happens is: Since RX is floating, it switches randomly between high or low. A long low state is interpreted as "break event" (\0). (2) In postmarketOS, we used to have the "magic SysRq key" enabled by default for the serial console. We had to disable this at some point, because there was a small number of users who were reporting sysrq spam in the kernel log, possibly even crashes/panics triggered by sysrq. What likely happened is: SysRq is triggered by sending a "break event", like in (1). With enough luck, you could even trigger any of the SysRq actions if the RX pin switches between high and low (e.g. because of noise introduced by the LTE radio close by). We can fix this using bias-pull-up, but this may be unneeded, unexpected, or even unwanted for other UART use cases. - bootph-all: U-Boot needs to know which pinctrl to apply during early boot stages, so we should specify "bootph-all" for the console UART pinctrl. Without bootph-all, the bias-pull-up won't be applied early enough in U-Boot to avoid the problem with autoboot in point (1) above. It doesn't make sense to specify this for the other UART instances. bootph-all is a generic property documented in dt-schema bootph.yaml. Define these two additional properties only for the debug UART console, by defining a new pinctrl template specifically for that. In the following commits, boards will be converted to use these where appropriate. [1]: https://source.denx.de/u-boot/u-boot/-/commit/ad7e967738a9c639e07cf50b83ffccdf9a8537b0 Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-2-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit 8d88f6c9c5e774420673a37510b22015b1edd569 Author: Stephan Gerhold Date: Tue Apr 22 13:03:48 2025 +0200 arm64: dts: qcom: msm8916/39: Move UART pinctrl to board files In preparation of adding a new console UART specific pinctrl template, move the pinctrl reference to the board DT part. This forces people porting new boards to consider what exactly they need for their board. No functional change for the boards upstream. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250422-msm8916-console-pinctrl-v2-1-f345b7a53c91@linaro.org Signed-off-by: Bjorn Andersson commit 181faec4cc9d90dad0ec7f7c8124269c0ba2e107 Author: Abel Vesa Date: Tue Apr 22 14:03:16 2025 +0300 arm64: dts: qcom: x1e80100: Fix PCIe 3rd controller DBI size According to documentation, the DBI range size is 0xf20. So fix it. Cc: stable@vger.kernel.org # 6.14 Fixes: f8af195beeb0 ("arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100") Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250422-x1e80100-dts-fix-pcie3-dbi-size-v1-1-c197701fd7e4@linaro.org Signed-off-by: Bjorn Andersson commit e01acd8f3cc1364b9147d3eb8913fdb935851ecd Author: Nikita Travkin Date: Sat May 3 15:39:32 2025 +0500 arm64: dts: qcom: x1e/x1p: Add EL2 overlay for WoA devices WoA devices using x1e/x1p use android firmware to boot, which notably includes Gunyah hypervisor. This means that, so far, Linux-based OS could only boot in EL1 on those devices. However Windows can replace Gunyah upon boot with it's own hypervisor, and with the use of tools such as "slbounce", it's possible to do the same for Linux-based OS, in which case some modifications to the DT are necessary to facilitate the absence of Gunyah services. Add a EL2-specific DT overlay and apply it to x1e/x1p WoA devices to create -el2.dtb for each of them alongside "normal" dtb. Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20250503-sc-el2-overlays-v2-5-24e9b4572e15@trvn.ru Signed-off-by: Bjorn Andersson commit 428f95f41f3024a8378bb4c4803fe269fcacaa85 Author: Nikita Travkin Date: Sat May 3 15:39:31 2025 +0500 arm64: dts: qcom: x1e80100: Add PCIe IOMMU x1e80100 has an SMMUv3 connected to PCIe which is normally controlled by Gunyah and is thus transparent to the OS. However if we boot Linux in EL2, without Gunyah, we need to manage this IOMMU ourselves. To make that easier, and since the hardware actually exists, just not "usually" managed by Linux, describe it in the dts as "reserved". Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20250503-sc-el2-overlays-v2-4-24e9b4572e15@trvn.ru Signed-off-by: Bjorn Andersson commit 263780f3189730f2efa511181c3970384e54afde Author: Nikita Travkin Date: Sat May 3 15:39:30 2025 +0500 arm64: dts: qcom: sc8280xp: Add EL2 overlay for WoA devices WoA devices using sc8280xp use android firmware to boot, which notably includes QHEE hypervisor. This means that, so far, Linux-based OS could only boot in EL1 on those devices. However Windows can replace QHEE upon boot with it's own hypervisor, and with the use of tools such as "slbounce", it's possible to do the same for Linux-based OS, in which case some modifications to the DT are necessary to facilitate the absence of QHEE services. Add a EL2-specific DT overlay and apply it to sc8280xp WoA devices to create -el2.dtb for each of them alongside "normal" dtb. Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20250503-sc-el2-overlays-v2-3-24e9b4572e15@trvn.ru Signed-off-by: Bjorn Andersson commit 8a401135001c65203f3fd210d482bc7eae1bfc56 Author: Nikita Travkin Date: Sat May 3 15:39:29 2025 +0500 arm64: dts: qcom: sc8280xp: Add PCIe IOMMU sc8280xp has an SMMUv3 connected to PCIe which is normally controlled by QHEE and is thus transparent to the OS. However if we boot Linux in EL2, without QHEE, we need to manage this IOMMU ourselves. To make that easier, and since the hardware actually exists, just not "usually" managed by Linux, describe it in the dts as "reserved". Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20250503-sc-el2-overlays-v2-2-24e9b4572e15@trvn.ru Signed-off-by: Bjorn Andersson commit 0d95f64be4176fc98bcc2b4558239800ee93bf32 Author: Nikita Travkin Date: Sat May 3 15:39:28 2025 +0500 arm64: dts: qcom: sc7180: Add EL2 overlay for WoA devices WoA devices using sc7180 use android firmware to boot, which notably includes QHEE hypervisor. This means that, so far, Linux-based OS could only boot in EL1 on those devices. However Windows can replace QHEE upon boot with it's own hypervisor, and with the use of tools such as "slbounce", it's possible to do the same for Linux-based OS, in which case some modifications to the DT are necessary to facilitate the absence of QHEE services. Add a EL2-specific DT overlay and apply it to sc7180 WoA devices to create -el2.dtb for each of them alongside "normal" dtb. Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20250503-sc-el2-overlays-v2-1-24e9b4572e15@trvn.ru Signed-off-by: Bjorn Andersson commit f698ee1f40030118e3ae1af1a02fa76f79452b5c Author: Rob Herring (Arm) Date: Mon May 5 09:48:12 2025 -0500 dt-bindings: interrupt-controller: Convert openrisc,ompic to DT schema Convert the OpenRISC OMPIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Signed-off-by: Rob Herring (Arm) Signed-off-by: Stafford Horne commit 0fa382a4f507e8cc835df43b331e0515d861e54d Merge: e6a40d5c9033fb 406fbc4d0fb34c Author: Mark Brown Date: Wed May 7 14:12:38 2025 +0900 Add support for CS35L63 Smart Amplifier Merge series from Stefan Binding : CS35L63 is a Mono Class-D PC Smart Amplifier, with Speaker Protection and Audio Enhancement Algorithms. CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. CS35L63 only has SoundWire and I2C control interfaces. commit e6a40d5c9033fb98f3d83f88655bc2b963ef50eb Merge: d9a1cbfe5b73fd 7b400c9ab879a8 Author: Mark Brown Date: Wed May 7 14:12:31 2025 +0900 ASoC: SOF: add disable_function_topology flag and Merge series from Bard Liao : SOF will load the function topologies by default. However, user may want to use the monolithic topology. Add a flag amd a module parameter to allow user specify the topology or not using function topologies. commit d9a1cbfe5b73fdabd0c4e3ae5d5fa3f42327c7fd Merge: 599b86f8cf98f7 6c965d39af98a8 Author: Mark Brown Date: Wed May 7 14:12:23 2025 +0900 Minor bug fix and tidy up for sof_sdw Merge series from Charles Keepax : Fix a small bug that can cause the sof_sdw machine driver to fail probe after the first time it has probed. Also do some minor tidy up on the handling of the platform_component of the dai links. commit 599b86f8cf98f786e317039372fe4cb446f0fa2a Merge: ad6d689e776478 5bf5bdfd007e07 Author: Mark Brown Date: Wed May 7 14:12:15 2025 +0900 ASoC: codec: cs42l[56,73,52]: Convert to GPIO Merge series from "Peng Fan (OSS)" : This patchset is separate from [1], and not merging changes in one patch. So separate changes into three patches for each chip. - sort headers - Drop legacy platform support - Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value_cansleep to configure output value. I not have platforms to test, just do the patches with my best efforts, and make build pass. [1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-0-c0db9d3fd6e9@nxp.com/ commit 196d05a39caeb9c2bdf48ec3589af087f9217b0e Author: Kees Cook Date: Tue Apr 22 19:37:47 2025 -0700 EISA: Move devlist.h out of obj to always I put devlist.h into the wrong Makefile macro ("obj") to get it included in "targets". Put it into "always" so nothing tries to link against it. Solves CONFIG_EISA=y i386 build failure: ld: vmlinux.a: member drivers/eisa/devlist.h in archive is not an object Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/4a8ba1d0-d2d9-41f8-abf1-d45ec8996d10@infradead.org Fixes: dd09eb0e2cc4 ("EISA: Increase length of device names") Signed-off-by: Kees Cook Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20250423023743.work.350-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6bbc69e58aa83653f2e9ce4ee72e6d34c0e30e2e Merge: 0af2f6be1b4281 0248bfb2557932 Author: Stephen Boyd Date: Tue May 6 20:51:31 2025 -0700 Merge tag 'socfpga_clk_updates_for_6.16_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into clk-socfpga Pull SoCFPGA clk driver updates from Dinh Nguyen: - Optimize local variables for clocks * tag 'socfpga_clk_updates_for_6.16_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: clk: socfpga: stratix10: Optimize local variables clk: socfpga: clk-pll: Optimize local variables commit dabc88cb3b78c0dce43d5cb5a2f3000377b42973 Author: Johannes Berg Date: Mon May 5 21:56:54 2025 +0300 wifi: iwlwifi: handle v3 rates For UHR, a version 3 of the rate API is being added, which increases the number of bits used for MCSes by shifting the NSS bit up. Handle that. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.84cde65a603f.Ic3119ef77cbc6461abd2a6bda104c0d236adcc8d@changeid Signed-off-by: Miri Korenblit commit 871197bf7bcc5bdd8378e949f7e48c71baa8c4e2 Author: Pagadala Yesu Anjaneyulu Date: Mon May 5 21:56:53 2025 +0300 wifi: iwlwifi: mld: add RFI_CONFIG_CMD to iwl_mld_system_names array Add RFI_CONFIG_CMD into the names array to facilitate the display of this command name when sending it to the firmware. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Somashekhar Puttagangaiah Link: https://patch.msgid.link/20250505215513.da89484cb838.I755709232f5e441ca159bdc5a151bac73d9744d3@changeid Signed-off-by: Miri Korenblit commit a2ec30065c3170376de38ac496c087fad1ccbd4b Author: Johannes Berg Date: Mon May 5 21:56:52 2025 +0300 wifi: iwlwifi: fix 6005N/SFF match That mask should never have been 0xFFFF (mask also doesn't make sense in that case) but rather 0xF000 since I combined a few entries with 0xC___. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.63bdbd67b72d.Id9b93b695c91117967dfd339c76bdfcd2872bee6@changeid Signed-off-by: Miri Korenblit commit beda255463c351ac2d595eeb2ecb7dbbbade3886 Author: Johannes Berg Date: Mon May 5 21:56:51 2025 +0300 wifi: iwlwifi: make iwl_uefi_get_uats_table() return void This sets both fwrt->uats_valid and returns 0, but in the static inline it returns 0 without setting uats_valid, which is confusing and the iwlmvm code misbehaves in this case. Since it already sets uats_valid, just remove the extra return value. Reported-by: Bjoern A. Zeeb Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.e981a7911228.Ic94b5e03e2053a08b84cabeb58ce3b6598fd9fc6@changeid Signed-off-by: Miri Korenblit commit f2142215121a17fc55cf2cae1a5b3e455f562615 Author: Emmanuel Grumbach Date: Mon May 5 21:56:50 2025 +0300 wifi: iwlwifi: drop whtc RF This RF module is now a product. No need to support the test chip anymore. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.01fb866e7c38.I23611aa4abb8fd031a6d63a21f4b87b0d38a36a1@changeid Signed-off-by: Miri Korenblit commit 6776884379a3b275bc13f97bea14834ed3f821bc Author: Emmanuel Grumbach Date: Mon May 5 21:56:49 2025 +0300 wifi: iwlwifi: add support PE RF This is a new RF module and of course the firmware name for this new RF module is different. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.c3481b1a4124.Id94c680636be2f59c9172919c79d80a48c7d1322@changeid Signed-off-by: Miri Korenblit commit d73f8fb1d9367af00544aea185f45b2c3b753439 Author: Miri Korenblit Date: Mon May 5 21:56:48 2025 +0300 wifi: iwlwifi: debug: set CDB indication from CSR In order to set the CDB indication in the dump meta data, we read it from a specific prph register. There is a known issue with that register in Xnj setups - in that case it will always indicate CDB. Instead of detecting the jacket case and then hardcode whether the CDB indication should or shouldn't be set (according the CRF), we can retrieve the CDB bit from the hw_rf_id (CSR_HW_RF_ID). There is also no reason to do it conditionally only for ax210 / BnJ. Cleanup the code a bit. Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.ea542a6c189e.I3d8cf5103b3747dfdd89985b45b592e419f97b63@changeid Signed-off-by: Miri Korenblit commit 8d7f08922a8cb621aa5d00bdce6a7afe57af1665 Author: Johannes Berg Date: Mon May 5 21:56:47 2025 +0300 wifi: iwlwifi: mvm: fix beacon CCK flag The beacon CCK flag should be set for any CCK rate, not just for 1 Mbps. Fix that. Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Link: https://patch.msgid.link/20250505215513.fe18b7d92d7d.I7bb40a92cea102677b695beb1e2a62a5ea72678b@changeid Signed-off-by: Miri Korenblit commit 3e84fe5fb5e89a6a2aa2ac0fbd2886a68803cdc2 Author: Johannes Berg Date: Mon May 5 21:56:46 2025 +0300 wifi: iwlwifi: remove NVM C step override This was used for debug/bringup of 8000 devices, to be able to unify between all 8000 devices with NVM override. However, this is really no longer used, those are ancient devices by now, so we can remove the logic. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.6210ac6cda09.I83cc3e68f0ed99a922d435c203fef840a28eb0de@changeid Signed-off-by: Miri Korenblit commit f14ef2145f5f8ca09fdfb2176c6fe14ab7009403 Author: Johannes Berg Date: Mon May 5 21:56:45 2025 +0300 wifi: iwlwifi: dvm: init 'keep_alive_beacons' in power tables These should be zero, but we might as well be explicit about it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215513.1e943bf696f4.Id2d7a413dc594c4525ac7ad0650ec8a50e1970ca@changeid Signed-off-by: Miri Korenblit commit f1699ad5857ddbf5e6fa979708998e4f07fcdd55 Author: Avraham Stern Date: Mon May 5 21:56:44 2025 +0300 wifi: iwlwifi: mld: add debugfs for using ptp clock time for monitor interface Add a debugfs option to use the ptp clock time for Rx device timestamps on a monitor interface. This can be useful for e.g. synchronizing multiple NICs or reporting the timestamp in the system clock instead of the GP2. Signed-off-by: Avraham Stern Link: https://patch.msgid.link/20250505215513.fffe6718fbca.I75f034005851a2d0c8ba5b015b9fdcad8a7c550d@changeid Signed-off-by: Miri Korenblit commit c9d81578958134bb5ecd050474aff776279ba414 Author: Johannes Berg Date: Mon May 5 21:56:43 2025 +0300 wifi: iwlwifi: pcie: log async commands Currently, there are two log messages at INFO level for synchronous commands: Attempting to send sync command ... Setting HCMD_ACTIVE for command ... and unfortunately none at all for async ones. Add one for async commands as well. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250505215512.cc4457285889.I633fae8828e8a37bbebc578166f388dcf893f592@changeid Signed-off-by: Miri Korenblit commit befaea304096ffeb94a664445a2ebeda270bc78c Author: Miri Korenblit Date: Mon May 5 21:56:42 2025 +0300 wifi: iwlwifi: mld: don't check the TPT counters when scanning If there is an ongoing scan that lasts long, the MPDU counters may not increase enough due the device being busy with scanning and not because we are in a low throughput scenario. In that case we don't want to block EMLSR. Instead, stop checking the counters from the moment we started scanning, and when the scan ends - clear the counters and schedule a check in 5 seconds, as usual. Note that this is only done for regular scan since MLO scan is too short to affect the counters, and scheduled scan is mainly used when we are not connected. Also note that we only stop checking whether to block EMLSR, and not if to unblock. Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250505215512.330ea440d19c.Ib10dae0b7a0cb0e10c59a9edf5ff7af0f065ac60@changeid Signed-off-by: Miri Korenblit commit d95d66eabeefc1af2b792558a66062e8041a4c60 Author: Miri Korenblit Date: Mon May 5 21:56:41 2025 +0300 wifi: iwlwifi: print the DSM value when read from UEFI We have such a print for ACPI, add one for UEFI. This is needed for testing Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250505215512.f419c18c064e.I870a4537a4bfa3c54b03ec7ec29bb246e6aa75cb@changeid Signed-off-by: Miri Korenblit commit 6b340a694cee9e7a24b2be827c738b5b6cb13c84 Author: Johannes Berg Date: Sun May 4 13:26:30 2025 +0300 wifi: iwlwifi: dvm: pair transport op-mode enter/leave If there's a failure and the op-mode didn't actually fully initialize, it should leave the transport again. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.714c3517548b.I49557e7ba8c03be2b558cc9fb5efa2a9fbab890e@changeid commit d6bf0778f7e16148d90397f1b21389a47656d4d4 Author: Johannes Berg Date: Sun May 4 13:26:29 2025 +0300 wifi: iwlwifi: tests: simplify devinfo_no_trans_cfg_dups() There's no need to build a list of individual configs first and then compare them, we can just go through all of them and compare if the pointers aren't the same. The complexity (in terms of number of comparisons) is a bit higher that way, but it's just a test and the code complexity is much lower without that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.85911c59d96a.I540f464229da3566d1726dfb61b46002fbb73bde@changeid commit 5f585528ff6a29cc98225acfe2cd58107ddcff48 Author: Johannes Berg Date: Sun May 4 13:26:28 2025 +0300 wifi: iwlwifi: cfg: use minimum API version 97 for Sc/Dr For Sc 97 might get used (at least for now) and for Dr the older 96 won't get used. Change them both to 97. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.2ab49f2265ce.I45623943fdcac3462d96e54dbb7fdad68bdf3693@changeid commit 21085ad77907b5284cd26de751d6bc47d519230d Author: Johannes Berg Date: Sun May 4 13:26:27 2025 +0300 wifi: iwlwifi: tests: allow same config for different MACs For different MACs we maintain the configs in different files, and while it's a small waste of space, this is a worthwhile trade-off for maintenance and simplicity. So allow different MAC types to have the same config. This could allow the same config for two MACs in the same MAC family, but that's not hugely important. Also simplify the test to not build a config list, there's no good reason to do that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.27f5d570eb32.I1649309a0e54a1d446a38c5b2124a582de9f6d61@changeid commit 3193282ae05532dff8e79505506375a5c0f18527 Author: Miri Korenblit Date: Sun May 4 13:26:26 2025 +0300 wifi: iwlwifi: bump FW API to 99 for BZ/SC/DR devices Start supporting API version 99 for those devices. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.677db25ce2c7.Ie4a7a00ff3562bfed1e8ac1fb42c1382cd24a486@changeid commit ed34e90554dcab4296421abcb6cc902709fc7c1c Author: Johannes Berg Date: Sun May 4 13:26:25 2025 +0300 wifi: iwlwifi: mvm: remove HT greenfield support No hardware that uses iwlmvm actually supports HT greenfield. Remove the support and then clean up the v1 rate API by doing a conversion to v2 rate API, the only thing v1 covered that couldn't be done in v2 was HT greenfield. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.805ec090c61f.Iafd87f62ceb463b72f861a5348078999dcaace92@changeid commit 69524b2bd6019c0a8934ef0776a84220a442a37d Author: Johannes Berg Date: Sun May 4 13:26:24 2025 +0300 wifi: iwlwifi: mvm: don't report bad EHT rate to mac80211 In EHT, we shouldn't report a legacy rate to mac80211, that might just be confusing. Set it to zero, since it's only really relevant for radiotap. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.325d7ba6905f.I3bdd8854e1a784856a4973ff4d532c74f992af00@changeid commit 7217522af7eac49880eee8482c40d3280b9d2bb1 Author: Johannes Berg Date: Sun May 4 13:26:23 2025 +0300 wifi: iwlwifi: mld: don't report bad EHT rate to mac80211 In EHT, we shouldn't report a legacy rate to mac80211, that might just be confusing. Set it to zero, since it's only really relevant for radiotap. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.8baf4efec182.Idc0cabf1919c05b35dc2341c08ea88a7157614c4@changeid commit e74e6c04955ff9cb362f6e0fe9ecb8c21c650c2a Author: Johannes Berg Date: Sun May 4 13:26:22 2025 +0300 wifi: iwlwifi: mld: build HT/VHT injected rate in v2 Instead of building the injected rate in version 1 of the format and then converting, build it in version 2 directly. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.0e6e4ae4469f.Ib49eda9a3083b2e0f0bcaff08ad784e151978307@changeid commit 3c204b693d7665debcd2777cce57810a85854d25 Author: Johannes Berg Date: Sun May 4 13:26:21 2025 +0300 wifi: iwlwifi: rename modulation type values The modulation type values aren't masks, they're just values. Rename them from RATE_MCS_CCK_* to RATE_MCS_MOD_TYPE_*. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.aa79635dd4e6.Ie97a01fee1ef4aedf8a2e5447489793ce8c15ca0@changeid commit dadcaf7f5a8e16d3d55ed3b09252c2c16052bd72 Author: Johannes Berg Date: Sun May 4 13:26:20 2025 +0300 wifi: iwlwifi: fw: remove RATE_MCS_NSS_POS We can use u32_{get,encode}_bits() instead of manual shifts and remove RATE_MCS_NSS_POS. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.b6da6048f8b8.Ib6d78ed6ffb7e99c42c2dd2ca4706a6bf73d3066@changeid commit 3a68ae0fa2ec13822a83756ac11ee447df7fe526 Author: Johannes Berg Date: Sun May 4 13:26:19 2025 +0300 wifi: iwlwifi: remove sku_id from trans This is ephemeral data that's passed from the alive response to the PNVM loading, so it doesn't need to be stored. Pass it around instead. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.fe8be4454007.I24824f35620b21fe49e9243818c7188e431af48e@changeid commit cf9aabf44b2c26963be578d715749da847802736 Author: Johannes Berg Date: Sun May 4 13:26:18 2025 +0300 wifi: iwlwifi: trans: move ext_32khz_clock_valid to config This value is used for the device start, so it's really part of the configuration. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.637ed7514587.I6c8fdeb3e2078a5fe9b755391e3ef7258ef2b279@changeid commit b8311ad5d4da92aed8071090b3cdae11a944fe35 Author: Johannes Berg Date: Sun May 4 13:26:17 2025 +0300 wifi: iwlwifi: move STEP config into trans->conf This really belongs there, it's needed early, so move it. Remove the related but dead iwl_trans_pcie_ctx_info_gen3_set_step() while at it. In iwlmld move the calls since they do part of the trans configuration. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.a4681ee11dd7.I6434a13d51932e984bb07695bc1cb931ebdcd27c@changeid commit 08e77d5edf7063e206096474ead1ed210eae0338 Author: Johannes Berg Date: Sun May 4 13:26:16 2025 +0300 wifi: iwlwifi: rework transport configuration Instead of having a trans_configure method that copies all the data, just have the users set up the configuration in the transport directly. This simplifies the code on both sides. While doing so also move some value from the trans struct into the conf struct because they are configuration. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.e2a2535ecfd0.I21653103ff02afc5a4d97a41b68021f053985e37@changeid commit d586137848e32c3754e057bb7a192da2fa59ef82 Author: Johannes Berg Date: Sat May 3 22:44:34 2025 +0300 wifi: iwlwifi: trans: collect device information Add a new device information 'info' substruct to the transport that's const and can only be set by a special helper, and move some information there. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.cd80cb55403c.Ic18524b66d655fad734bf97192a54d9cfa9fdf1f@changeid commit d43c01d303d262b8461e5851b82b94e4e8438ab9 Author: Johannes Berg Date: Sat May 3 22:44:33 2025 +0300 wifi: iwlwifi: trans: remove SCD base address validation We pass this parameter around a lot of places just to validate what the firmware told us against the hardware with a warning, which seems to never trigger. Remove it. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.5405014d7f88.I3b74a1fd51a39c6df5674f2994189092d1635e7f@changeid commit 8f7561209eda7d6998708f06376e8dd2dc52f3b8 Author: Ilan Peer Date: Sat May 3 22:44:32 2025 +0300 wifi: iwlfiwi: mvm: Fix the rate reporting The rate validation in mac80211 considers a rate to be valid iff both the rate index and the count are positive. When the rate scaling is managed in the driver and not enough traffic passed to set the actual rate, the driver set the rate to be the optimal rate. However, the rate count is not set and thus the rate is considered not valid. Fix it by setting the count to 1. Fixes: 3e99b4d28219 ("wifi: mac80211: Sanity check tx bitrate if not provided by driver") Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.0d1d1e022d63.I76833c14ba1d66f9bea5c32b25a54d8b36f229ba@changeid commit 6570ea2278266c74ba55ba6c862400627583f201 Author: Johannes Berg Date: Sat May 3 22:44:31 2025 +0300 wifi: iwlwifi: remove bc_table_dword transport config There's really no point in configuring this, it's just a question of hardware capability. Remove it. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.6af4ea001226.I693f72a7c3a76e44f9ef2cefd62d606ad100a734@changeid commit 995727b11307115246e3470e1cbcfb5740318509 Author: Johannes Berg Date: Sat May 3 22:44:30 2025 +0300 wifi: iwlwifi: pcie: remove constant wdg_timeout This value is only ever initialized and read, so just replace the usage with the constant and remove it. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.48333e80a74d.I6c1aaa23fac5ff7400aa59a3093b53774261cb0e@changeid commit 0b205d0f0f506e710aee4a2bb7aa8b7317bbc956 Author: Johannes Berg Date: Sat May 3 22:44:29 2025 +0300 wifi: iwlwifi: trans: remove hw_wfpm_id We only need to have this during init in PCIe, so can just re-read the value. Do that and don't store it. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224232.4dfa2ae2a844.I46466f2523d8760e93228cd9a93c112d371e002d@changeid commit e7d3f56af4f5a47b32382c6534d0612bcf2c05fa Author: Johannes Berg Date: Sat May 3 22:44:28 2025 +0300 wifi: iwlwifi: trans: remove hw_id_str This has never been used, so remove it now. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.4623574bdbe1.I8b09dd25702e7d7e2f0b4c61390baf73878f681d@changeid commit a94d0189961c4e5b56198f7bf1395592a2c14f4c Author: Johannes Berg Date: Sat May 3 22:44:27 2025 +0300 wifi: iwlwifi: pass full FW info to transport The code currently passes only the specific image that should be loaded, but then has to pass the IML (image loader) out of band, which is confusing. Pass the full FW data together with desired image type, and use the IML from that. This also cleans up the code in the various sub-drivers a bit as they no longer have to look up and check for the image. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.eac4006e81c5.Iebadc56bb2762e5f4d71f66bb2609d74b33daf11@changeid commit 9babfb5f1fe0fa991ebcb85eac50d27ef333864a Author: Somashekhar Puttagangaiah Date: Sat May 3 22:44:26 2025 +0300 wifi: iwlwifi: handle reasons recommended by FW for leaving EMLSR FW sends new notification version 2 indicating whether activating EMLSR mode is recommended or not. If recommendation is to leave EMLSR or force leave then FW sends the reason. Add debug log for the reason sent by FW. Signed-off-by: Somashekhar Puttagangaiah Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.0582726248a4.I9d1d00eb98d10a3a742cb3e06665ce10e5ec93f0@changeid commit 7aeec8c8d63bfda5aba1498d8148b64dd1cc329d Author: Johannes Berg Date: Sat May 3 22:44:25 2025 +0300 wifi: iwlwifi: remove PM mode and send-in-D3 Simplify the logic here by tracking only suspended as a status bit, and remove CMD_SEND_IN_D3 completely. There is no value, since the op-mode sets the state and also sends the commands. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.cc3360761f1e.I72261afc42cee8983198b4660b7d38b7df7963da@changeid commit 11074fce060275c086c8743760091f4a6d174fa9 Author: Johannes Berg Date: Sat May 3 22:44:24 2025 +0300 wifi: iwlwifi: unexport iwl_trans_pcie_send_hcmd() It doesn't need to be exported since the code calling it is in the same module. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.f457a737c663.I8d49b2955a4f2ca47deb664e5fd58e39d612bb63@changeid commit f451bc6a2ccf7ea326f420542a3dcf346a8b949b Author: Johannes Berg Date: Sat May 3 22:44:23 2025 +0300 wifi: iwlwifi: pcie: move wait_command_queue into PCIe There's no reason for this to be declared in the transport struct, so move the item to the PCIe struct. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.793f625c5c2d.I64ebb402255d84c2ad045a65e5a4e4891ead5b26@changeid commit 7f1ec1033cd3baefbf695f46c686d5a289673612 Author: Johannes Berg Date: Sat May 3 22:44:22 2025 +0300 wifi: iwlwifi: pcie: move invalid TX CMD into PCIe There's no reason for this to be in the generic transport struct, move it into the PCIe code. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.d4916769a25b.Ife9b0283e50023efb6b3f44e81a6ff3885fe5a8d@changeid commit cd6d6de694e23ff0cba0af6680b69f361aa328dd Author: Johannes Berg Date: Sat May 3 22:44:21 2025 +0300 wifi: iwlwifi: pcie: move ME check data to pcie There's no reason for this data to be in the generic transport struct, so move it to pcie. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.0b74726b2651.I2c6bff6945b9288eadf242895906ab1c2cb76389@changeid commit 6a2808a566b17ed02b0fc8ff07fa788b7e85e1ff Author: Johannes Berg Date: Sat May 3 22:44:20 2025 +0300 wifi: iwlwifi: pcie: rename "continuous" memory What's really meant here is "contiguous", appreviate it as "contig". Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250503224231.8c2ccc0a7469.I6ef88a48c2a2e5c0baa881382017d34eb07f9316@changeid commit ca00c1806c6cff645e46ade356f129468cdbe6c8 Author: Johannes Berg Date: Fri May 2 15:56:31 2025 +0300 wifi: iwlwifi: remove iwl_cmd_groups_verify_sorted() We now have unit tests for the mvm and mld, and dvm isn't going to change anyway. Remove the runtime checks. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.e3f01789575d.I4380dcbf3e0ecabc2a8a42c84f448b7dd854bf50@changeid commit 0b897fbd900e12a08baa3d1a0457944046a882ea Author: Johannes Berg Date: Fri May 2 15:56:30 2025 +0300 wifi: iwlwifi: mvm: add command order checks to kunit We can test this with kunit instead of having the runtime checks, add a test here to remove the runtime check next. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.581b60b0833f.I624fb3efc3fa0b155a5da69d7efc39207f133331@changeid commit 3e552ccf405c0dea6339988202a564357249c437 Author: Gustavo A. R. Silva Date: Tue May 6 15:14:01 2025 -0600 platform/chrome: kunit: Avoid -Wflex-array-member-not-at-end -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the structure. Notice that `struct cros_ec_command` is a flexible structure --a structure that contains a flexible-array member. Fix the following warning: drivers/platform/chrome/cros_ec_proto_test_util.h:16:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/aBp7mZ8kj9w4CKkl@kspp Signed-off-by: Tzung-Bi Shih commit 9daaf197860055aa26c06d273d317c18c6e3621a Merge: a7371be8c8f525 885e5cbaa0ee37 Author: Jakub Kicinski Date: Tue May 6 19:04:42 2025 -0700 Merge tag 'wireless-next-2025-05-06' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== wireless features, notably * stack - free SKBTX_WIFI_STATUS flag - fixes for VLAN multicast in multi-link - improve codel parameters (revert some old twiddling) * ath12k - Enable AHB support for IPQ5332. - Add monitor interface support to QCN9274. - Add MLO support to WCN7850. - Add 802.11d scan offload support to WCN7850. * ath11k - Restore hibernation support * iwlwifi - EMLSR on two 5 GHz links * mwifiex - cleanups/refactoring along with many other small features/cleanups * tag 'wireless-next-2025-05-06' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (177 commits) Revert "wifi: iwlwifi: clean up config macro" wifi: iwlwifi: move phy_filters to fw_runtime wifi: iwlwifi: pcie: make sure to lock rxq->read wifi: iwlwifi: add definitions for iwl_mac_power_cmd version 2 wifi: iwlwifi: clean up config macro wifi: iwlwifi: mld: simplify iwl_mld_rx_fill_status() wifi: iwlwifi: mld: rx: simplify channel handling wifi: iwlwifi: clean up band in RX metadata wifi: iwlwifi: mld: skip unknown FW channel load values wifi: iwlwifi: define API for external FSEQ images wifi: iwlwifi: mld: allow EMLSR on separated 5 GHz subbands wifi: iwlwifi: mld: use cfg80211_chandef_get_width() wifi: iwlwifi: mld: fix iwl_mld_emlsr_disallowed_with_link() return wifi: iwlwifi: mld: clarify variable type wifi: iwlwifi: pcie: add support for the reset handshake in MSI wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabled wifi: mac80211: restructure tx profile retrieval for MLO MBSSID wifi: nl80211: add link id of transmitted profile for MLO MBSSID wifi: ieee80211: Add helpers to fetch EMLSR delay and timeout values wifi: mac80211: update ML STA with EML capabilities ... ==================== Link: https://patch.msgid.link/20250506174656.119970-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit a7371be8c8f525965553d1657164ace89c3b309e Merge: df6a69bc8f31fc 88debb521f15d7 Author: Jakub Kicinski Date: Tue May 6 18:20:12 2025 -0700 Merge branch 'devlink-sanitize-variable-typed-attributes' Jiri Pirko says: ==================== devlink: sanitize variable typed attributes This is continuation based on first two patches of https://lore.kernel.org/20250425214808.507732-1-saeed@kernel.org Better to take it as a separate patchset, as the rest of the original patchset is probably settled. This patchset is taking care of incorrect usage of internal NLA_* values in uapi, introduces new enum (in patch #2) that shadows NLA_* values and makes that part of UAPI. The last two patches removes unnecessary translations with maintaining clear devlink param driver api. ==================== Link: https://patch.msgid.link/20250505114513.53370-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 88debb521f15d73728d55294f458992f5f69a7c4 Author: Jiri Pirko Date: Mon May 5 13:45:13 2025 +0200 devlink: use DEVLINK_VAR_ATTR_TYPE_* instead of NLA_* in fmsg Use newly introduced DEVLINK_VAR_ATTR_TYPE_* enum values instead of internal NLA_* in fmsg health reporter code. Signed-off-by: Jiri Pirko Link: https://patch.msgid.link/20250505114513.53370-5-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit f9e78932eac650cf1385244482b85e65ccaa87cf Author: Jiri Pirko Date: Mon May 5 13:45:12 2025 +0200 devlink: avoid param type value translations Assign DEVLINK_PARAM_TYPE_* enum values to DEVLINK_VAR_ATTR_TYPE_* to ensure the same values are used internally and in UAPI. Benefit from that by removing the value translations. Signed-off-by: Jiri Pirko Link: https://patch.msgid.link/20250505114513.53370-4-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 429ac6211494c12b668dac59811ea8a96db6d757 Author: Jiri Pirko Date: Mon May 5 13:45:11 2025 +0200 devlink: define enum for attr types of dynamic attributes Devlink param and health reporter fmsg use attributes with dynamic type which is determined according to a different type. Currently used values are NLA_*. The problem is, they are not part of UAPI. They may change which would cause a break. To make this future safe, introduce a enum that shadows NLA_* values in it and is part of UAPI. Also, this allows to possibly carry types that are unrelated to NLA_* values. Signed-off-by: Saeed Mahameed Signed-off-by: Jiri Pirko Link: https://patch.msgid.link/20250505114513.53370-3-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 37006af675e8ced690ffb2285d0f15a98323a7de Author: Jiri Pirko Date: Mon May 5 13:45:10 2025 +0200 tools: ynl-gen: allow noncontiguous enums in case the enum has holes, instead of hard stop, generate a validation callback to check valid enum values. Signed-off-by: Jiri Pirko Link: https://patch.msgid.link/20250505114513.53370-2-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit df6a69bc8f31fc34ac1f5408a82e60a3f31d905e Author: David Wei Date: Fri May 2 21:30:07 2025 -0700 io_uring/zcrx: selftests: fix setting ntuple rule into rss Fix ethtool syntax for setting ntuple rule into rss. It should be `context' instead of `action'. Signed-off-by: David Wei Link: https://patch.msgid.link/20250503043007.857215-1-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 9fbae052f6f68056fd84e8ba096a7e9ab3464f3d Merge: 222a87f6b94f6f 9f7cd1bcb63633 Author: Mark Brown Date: Wed May 7 09:47:05 2025 +0900 This patch set did some clean up and add runtime pm Merge series from Haibo Chen : PATCH1/3/4 to clean up the code, make the code more readable PATCH2 add the runtime pm support PATCH5 use devm_add_action_or_reset() to replace remove() callback, this can avoid oops when do bind/unbind test commit c8754c7deab4cbfa947fa2d656cbaf83771828ef Author: Alexander Sverdlin Date: Sat Mar 15 23:49:13 2025 +0100 soc: sophgo: cv1800: rtcsys: New driver (handling RTC only) Add driver for Sophgo CV1800 series SoC RTC subsystem. The RTC module comprises a 32kHz oscillator, Power-on-Reset (PoR) sub-module, HW state machine to control chip power-on, power-off and reset. Furthermore, the 8051 subsystem is located within RTCSYS including associated SRAM block. This patch only populates RTC sub-device. Signed-off-by: Alexander Sverdlin Reviewed-by: Inochi Amaoto Link: https://lore.kernel.org/r/20250315224921.3627852-3-alexander.sverdlin@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 76517429dbfd8eca16fe85482cdb8024bbbd06bd Author: Jingbao Qiu Date: Sat Mar 15 23:49:12 2025 +0100 dt-bindings: soc: sophgo: add RTC support for Sophgo CV1800 series Add RTC devicetree binding for Sophgo CV1800 series SoC. The device is called RTC, but contains control registers of other HW blocks in its address space, most notably of Power-on-Reset (PoR) module, DW8051 IP (MCU core), accompanying SRAM, hence putting it in SoC subsystem. Signed-off-by: Jingbao Qiu Signed-off-by: Alexander Sverdlin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Inochi Amaoto Link: https://lore.kernel.org/r/20250315224921.3627852-2-alexander.sverdlin@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 41b08610dd262dc4a5e1eff993b2d21eab8b8ba3 Author: Inochi Amaoto Date: Fri Apr 18 10:03:24 2025 +0800 clk: sophgo: Add clock controller support for SG2044 SoC Add clock driver and clock definition for SG2044 SoC. Reviewed-by: Chen Wang Link: https://lore.kernel.org/r/20250418020325.421257-6-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit f18198c0de56ea636c74312bd09b9d67273412d8 Author: Inochi Amaoto Date: Fri Apr 18 10:03:21 2025 +0800 soc: sophgo: sg2044: Add support for SG2044 TOP syscon device The SG2044 TOP device provide PLL clock function in its area. Add a mfd definition for it. Link: https://lore.kernel.org/r/20250418020325.421257-3-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit ff5240793b0484187a836f6e1b7f0e376e0776ed Author: Inochi Amaoto Date: Fri Apr 18 10:03:23 2025 +0800 clk: sophgo: Add PLL clock controller support for SG2044 SoC Add PLL clock driver and clock definition for SG2044 SoC. Link: https://lore.kernel.org/r/20250418020325.421257-5-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 1a215904986e48ce04ac8f24ecb5b18cb6beaf43 Author: Inochi Amaoto Date: Fri Apr 18 10:03:22 2025 +0800 dt-bindings: clock: sophgo: add clock controller for SG2044 The clock controller on the SG2044 provides common clock function for all IPs on the SoC. This device requires PLL clock to function normally. Add definition for the clock controller of the SG2044 SoC. Reviewed-by: Chen Wang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250418020325.421257-4-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit e4b700d38957526fbcec6d7bb5890ad4c1192241 Author: Inochi Amaoto Date: Fri Apr 18 10:03:20 2025 +0800 dt-bindings: soc: sophgo: Add SG2044 top syscon device The SG2044 top syscon device provide PLL clock control and some other misc feature of the SoC. Add the compatible string for SG2044 top syscon device. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250418020325.421257-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit dd8bbae9fefeead76f20cd410a5a8299fcbad220 Author: Inochi Amaoto Date: Sun May 4 18:45:51 2025 +0800 clk: sophgo: Add support for newly added precise compatible Add of device id definition for newly added precise compatible. Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250504104553.1447819-3-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 6d880961f5f9b84d13fb4a0208c7405966bc3489 Author: Inochi Amaoto Date: Sun May 4 18:45:50 2025 +0800 dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC As previous binding uses a wildcard compatible for existed clock device of CV1800 series SoC, it is not suitable for existed requirement. The only exception is sophgo,sg2000-clk, it does match a real device, so keep it as is. Add new precise compatible for existed clock devices of CV1800 series SoCs and make old wildcard compatible deprecated. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250504104553.1447819-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Chen Wang commit 8e62ba590160f91abba6490d9c17aa13bada4752 Author: Dave Jiang Date: Tue Apr 29 16:59:53 2025 -0700 cxl/test: Address missing MODULE_DESCRIPTION warnings for cxl_test Add MODULE_DESCRIPTION() to address the following warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in test/cxl_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in test/cxl_mock.o WARNING: modpost: missing MODULE_DESCRIPTION() in test/cxl_mock_mem.o [dj: s/CXL test/cxl_test:/ per djbw's comment] Reviewed-by: Dan Williams Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20250429235953.4175408-1-dave.jiang@intel.com Signed-off-by: Dave Jiang commit 7a0c1872ee7db25d711ac29a55f36844a7108308 Author: Richard Fitzgerald Date: Thu Mar 27 12:52:14 2025 +0000 clk: test: Forward-declare struct of_phandle_args in kunit/clk.h Add a forward-declare of struct of_phandle_args to prevent the compiler warning: ../include/kunit/clk.h:29:63: warning: ‘struct of_phandle_args’ declared inside parameter list will not be visible outside of this definition or declaration struct clk_hw *(*get)(struct of_phandle_args *clkspec, void *data), Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20250327125214.82598-1-rf@opensource.cirrus.com Fixes: a82fcb16d977 ("clk: test: Add test managed of_clk_add_hw_provider()") Signed-off-by: Stephen Boyd commit 6064cfaa1ac495af423653cc2749340e131af64d Author: Biju Das Date: Thu Apr 10 07:20:38 2025 +0100 clk: davinci: Use of_get_available_child_by_name() Simplify of_davinci_pll_init() by using of_get_available_child_by_name(). While at it, move of_node_put(child) inside the if block to avoid additional check if of_child is NULL. Reviewed-by: David Lechner Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250410062040.6346-1-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit 73c46d9a93d071ca69858dea3f569111b03e549e Author: Henry Martin Date: Wed Apr 2 10:05:13 2025 +0800 clk: bcm: rpi: Add NULL check in raspberrypi_clk_register() devm_kasprintf() returns NULL when memory allocation fails. Currently, raspberrypi_clk_register() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: 93d2725affd6 ("clk: bcm: rpi: Discover the firmware clocks") Signed-off-by: Henry Martin Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20250402020513.42628-1-bsdhenrymartin@gmail.com Reviewed-by: Stefan Wahren Signed-off-by: Stephen Boyd commit d6fbdae4f3b5c731d07c4279c00b5cfaa75abb3c Author: Stefan Wahren Date: Tue Apr 15 20:56:14 2025 +0200 clk: bcm: rpi: Drop module alias Since commit fbac2e7787ac ("clk: bcm: rpi: Allow the driver to be probed by DT") the module alias isn't necessary anymore. So we can drop it. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20250415185614.16292-1-wahrenst@gmx.net Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd commit 1dc5da9f3c89b65c58706f122fa2f990e2702f32 Author: Dr. David Alan Gilbert Date: Mon May 5 02:35:45 2025 +0100 clk: bcm: kona: Remove unused scaled_div_build scaled_div_build() was added in 2014 by commit 1f27f15258bf ("clk: bcm281xx: add initial clock framework support") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250505013545.359745-1-linux@treblig.org Signed-off-by: Stephen Boyd commit 72b421e645a3d8e68c92fb006ceb94b0c7b49896 Author: Rob Herring (Arm) Date: Mon May 5 11:19:32 2025 -0500 dt-bindings: clock: Drop st,stm32h7-rcc.txt The binding is already covered by st,stm32-rcc.yaml. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250505161933.1432791-1-robh@kernel.org Acked-by: Conor Dooley Signed-off-by: Stephen Boyd commit 619ddc6935c151aae09d5a1fff3f447f75c08d93 Author: Stefan Wahren Date: Sat May 3 10:09:49 2025 +0200 dt-bindings: clock: convert bcm2835-aux-clock to yaml Convert the DT binding document for BCM2835 auxiliary peripheral clock from .txt to YAML. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20250503080949.3945-1-wahrenst@gmx.net Acked-by: Conor Dooley [sboyd@kernel.org: Drop aux label] Signed-off-by: Stephen Boyd commit 66bd98084f3f730d62a2531a47bd3ac20801beb6 Author: Rob Herring (Arm) Date: Mon May 5 11:19:42 2025 -0500 dt-bindings: clock: Drop maxim,max77686.txt The clock binding for Maxim MAX77686/MAX77802/MAX77620 is already covered by mfd/maxim,max77686.yaml. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250505161943.1433081-1-robh@kernel.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit eedf3e3c2f2af55dca42b0ea81dffb808211d269 Author: Tamir Duberstein Date: Fri Apr 25 21:21:05 2025 +0200 ACPICA: Apply pack(1) to union aml_resource ACPICA commit 1c28da2242783579d59767617121035dafba18c3 This was originally done in NetBSD: https://github.com/NetBSD/src/commit/b69d1ac3f7702f67edfe412e4392f77d09804910 and is the correct alternative to the smattering of `memcpy`s I previously contributed to this repository. This also sidesteps the newly strict checks added in UBSAN: https://github.com/llvm/llvm-project/commit/792674400f6f04a074a3827349ed0e2ac10067f6 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000021afcfdeca5e in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:329 +0x6aca5e #1.2 0x000021982bc4af3c in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x41f3c #1.1 0x000021982bc4af3c in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x41f3c #1 0x000021982bc4af3c in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:395 +0x41f3c #2 0x000021982bc4bb6f in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x42b6f #3 0x000021982bc4b723 in __ubsan_handle_type_mismatch_v1 compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x42723 #4 0x000021afcfdeca5e in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:329 +0x6aca5e #5 0x000021afcfdf2089 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:355 +0x6b2089 #6 0x000021afcfded169 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x6ad169 #7 0x000021afcfe2d24a in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:237 +0x6ed24a #8 0x000021afcfde66b7 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x6a66b7 #9 0x000021afcfdf6979 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x6b6979 #10 0x000021afcfdf708f in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x6b708f #11 0x000021afcfa95dcf in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0x355dcf #12 0x000021afcfaa8278 in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:84 +0x368278 #13 0x000021afcfbddb87 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x49db87 #14 0x000021afcf99091d in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:95 +0x25091d #15 0x000021afcf9c1d4e in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:60 +0x281d4e #16 0x000021afcf9e33ad in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:77 +0x2a33ad #17 0x000021afcf9e313e in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:76:19), false, false, std::__2::allocator, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:183 +0x2a313e #18 0x000021afcfbab4c7 in fit::internal::function_base<16UL, false, void(), std::__2::allocator>::invoke(const fit::internal::function_base<16UL, false, void (), std::__2::allocator >*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:522 +0x46b4c7 #19 0x000021afcfbab342 in fit::function_impl<16UL, false, void(), std::__2::allocator>::operator()(const fit::function_impl<16UL, false, void (), std::__2::allocator >*) ../../sdk/lib/fit/include/lib/fit/function.h:315 +0x46b342 #20 0x000021afcfcd98c3 in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../sdk/lib/async/task.cc:24 +0x5998c3 #21 0x00002290f9924616 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:789 +0x10a616 #22 0x00002290f9924323 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:788:7), true, false, std::__2::allocator, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x10a323 #23 0x00002290f9904b76 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int), std::__2::allocator>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int), std::__2::allocator >*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:522 +0xeab76 #24 0x00002290f9904831 in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int), std::__2::allocator>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int), std::__2::allocator >*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:471 +0xea831 #25 0x00002290f98d5adc in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:74 +0xbbadc #26 0x00002290f98e1e58 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1248 +0xc7e58 #27 0x00002290f98e4159 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1308 +0xca159 #28 0x00002290f9918414 in λ(const driver_runtime::Dispatcher::create_with_adder::(anon class)*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:353 +0xfe414 #29 0x00002290f991812d in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:351:7), true, false, std::__2::allocator, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xfe12d #30 0x00002290f9906fc7 in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr), std::__2::allocator>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr), std::__2::allocator >*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:522 +0xecfc7 #31 0x00002290f9906c66 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr), std::__2::allocator>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr), std::__2::allocator >*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:315 +0xecc66 #32 0x00002290f98e73d9 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:543 +0xcd3d9 #33 0x00002290f98e700d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1442 +0xcd00d #34 0x00002290f9918983 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0xfe983 #35 0x00002290f9918b9e in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../sdk/lib/async/include/lib/async/cpp/wait.h:201 +0xfeb9e #36 0x00002290f99bf509 in async_loop_dispatch_wait(async_loop_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../sdk/lib/async-loop/loop.c:394 +0x1a5509 #37 0x00002290f99b9958 in async_loop_run_once(async_loop_t*, zx_time_t) ../../sdk/lib/async-loop/loop.c:343 +0x19f958 #38 0x00002290f99b9247 in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../sdk/lib/async-loop/loop.c:301 +0x19f247 #39 0x00002290f99ba962 in async_loop_run_thread(void*) ../../sdk/lib/async-loop/loop.c:860 +0x1a0962 #40 0x000041afd176ef30 in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:63 +0x84f30 #41 0x000041afd18a448d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x1ba48d Link: https://github.com/acpica/acpica/commit/1c28da22 Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/4664267.LvFx2qVVIh@rjwysocki.net Signed-off-by: Tamir Duberstein [ rjw: Pick up the tag from Tamir ] Signed-off-by: Rafael J. Wysocki commit 43745d11bfd9683abdf08ad7a5cc403d6a9ffd15 Author: YiFei Zhu Date: Mon Apr 28 21:15:36 2025 +0000 bpftool: Fix regression of "bpftool cgroup tree" EINVAL on older kernels If cgroup_has_attached_progs queries an attach type not supported by the running kernel, due to the kernel being older than the bpftool build, it would encounter an -EINVAL from BPF_PROG_QUERY syscall. Prior to commit 98b303c9bf05 ("bpftool: Query only cgroup-related attach types"), this EINVAL would be ignored by the function, allowing the function to only consider supported attach types. The commit changed so that, instead of querying all attach types, only attach types from the array `cgroup_attach_types` is queried. The assumption is that because these are only cgroup attach types, they should all be supported. Unfortunately this assumption may be false when the kernel is older than the bpftool build, where the attach types queried by bpftool is not yet implemented in the kernel. This would result in errors such as: $ bpftool cgroup tree CgroupPath ID AttachType AttachFlags Name Error: can't query bpf programs attached to /sys/fs/cgroup: Invalid argument This patch restores the logic of ignoring EINVAL from prior to that patch. Fixes: 98b303c9bf05 ("bpftool: Query only cgroup-related attach types") Reported-by: Sagarika Sharma Reported-by: Minh-Anh Nguyen Signed-off-by: YiFei Zhu Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20250428211536.1651456-1-zhuyifei@google.com commit 635d0c8edf26994dc1dcbc09add9423aa61869b0 Author: Abel Vesa Date: Tue Apr 22 14:25:23 2025 +0300 arm64: dts: qcom: x1e001de-devkit: Fix pin config for USB0 retimer vregs Describe the missing power source, bias and direction for each of the USB0 retimer gpio-controlled voltage regulators related pin configuration. Fixes: 019e1ee32fec ("arm64: dts: qcom: x1e001de-devkit: Enable external DP support") Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20250422-x1e001de-devkit-dts-fix-retimer-gpios-v2-2-0129c4f2b6d7@linaro.org Signed-off-by: Bjorn Andersson commit f76fdcd2550991c854a698a9f881b1579455fc0a Author: Abel Vesa Date: Tue Apr 22 14:25:22 2025 +0300 arm64: dts: qcom: x1e001de-devkit: Describe USB retimers resets pin configs Currently, on the X Elite Devkit, the pin configuration of the reset gpios for all three PS8830 USB retimers are left configured by the bootloader. Fix that by describing their pin configuration. Fixes: 019e1ee32fec ("arm64: dts: qcom: x1e001de-devkit: Enable external DP support") Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20250422-x1e001de-devkit-dts-fix-retimer-gpios-v2-1-0129c4f2b6d7@linaro.org Signed-off-by: Bjorn Andersson commit efdbeae860bf0278b050c6c9ad5921afba4596d0 Author: Stephan Gerhold Date: Wed Apr 23 09:30:12 2025 +0200 arm64: dts: qcom: x1e80100-qcp: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-6-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 4f27ede34ca3369cdcde80c5a4ca84cdb28edbbb Author: Stephan Gerhold Date: Wed Apr 23 09:30:11 2025 +0200 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-5-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 4a09dad9d437a13e9cd4383ff7791a816a6e1652 Author: Stephan Gerhold Date: Wed Apr 23 09:30:10 2025 +0200 arm64: dts: qcom: x1e80100-hp-omnibook-x14: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-4-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 0fb9ecf8713a7a458f7378c86e0703467db2ad22 Author: Stephan Gerhold Date: Wed Apr 23 09:30:09 2025 +0200 arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: d0e2f8f62dff ("arm64: dts: qcom: Add device tree for ASUS Vivobook S 15") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-3-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 3ed2a9e03abfeece9e30ebc746f935536f661414 Author: Stephan Gerhold Date: Wed Apr 23 09:30:08 2025 +0200 arm64: dts: qcom: x1e001de-devkit: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: 7b8a31e82b87 ("arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-2-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 5ce920e6a8db40e4b094c0d863cbd19fdcfbbb7a Author: Stephan Gerhold Date: Wed Apr 23 09:30:07 2025 +0200 arm64: dts: qcom: x1-crd: Fix vreg_l2j_1p2 voltage In the ACPI DSDT table, PPP_RESOURCE_ID_LDO2_J is configured with 1256000 uV instead of the 1200000 uV we have currently in the device tree. Use the same for consistency and correctness. Cc: stable@vger.kernel.org Fixes: bd50b1f5b6f3 ("arm64: dts: qcom: x1e80100: Add Compute Reference Device") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250423-x1e-vreg-l2j-voltage-v1-1-24b6a2043025@linaro.org Signed-off-by: Bjorn Andersson commit 099f3401dc3b7f4b63f9fa8b2f44f244c5ab3e62 Author: Neil Armstrong Date: Thu Apr 24 18:31:14 2025 +0200 arm64: dts: qcom: sc7280: add UFS operating points Replace the deprecated freq-table-hz property with an operating points table with all supported frequencies and power levels. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250424-topic-sc7280-upstream-ufs-opps-v1-1-e63494d65f45@linaro.org Signed-off-by: Bjorn Andersson commit d988b0b866c2aeb23aa74022b5bbd463165a7a33 Author: Luca Weiss Date: Fri Apr 25 14:12:58 2025 +0200 clk: qcom: gpucc-sm6350: Add *_wait_val values for GDSCs Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree. Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used, with the exception of gpu_cx_gdsc which has an explicit value (qcom,clk-dis-wait-val = <8>). Fixes: 013804a727a0 ("clk: qcom: Add GPU clock controller driver for SM6350") Signed-off-by: Luca Weiss Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20250425-sm6350-gdsc-val-v1-4-1f252d9c5e4e@fairphone.com Signed-off-by: Bjorn Andersson commit afdfd829a99e467869e3ca1955fb6c6e337c340a Author: Luca Weiss Date: Fri Apr 25 14:12:57 2025 +0200 clk: qcom: gcc-sm6350: Add *_wait_val values for GDSCs Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree. Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used. Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver") Signed-off-by: Luca Weiss Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20250425-sm6350-gdsc-val-v1-3-1f252d9c5e4e@fairphone.com Signed-off-by: Bjorn Andersson commit 673989d27123618afab56df1143a75454178b4ae Author: Luca Weiss Date: Fri Apr 25 14:12:56 2025 +0200 clk: qcom: dispcc-sm6350: Add *_wait_val values for GDSCs Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree. Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used. Fixes: 837519775f1d ("clk: qcom: Add display clock controller driver for SM6350") Signed-off-by: Luca Weiss Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20250425-sm6350-gdsc-val-v1-2-1f252d9c5e4e@fairphone.com Signed-off-by: Bjorn Andersson commit e7b1c13280ad866f3b935f6c658713c41db61635 Author: Luca Weiss Date: Fri Apr 25 14:12:55 2025 +0200 clk: qcom: camcc-sm6350: Add *_wait_val values for GDSCs Compared to the msm-4.19 driver the mainline GDSC driver always sets the bits for en_rest, en_few & clk_dis, and if those values are not set per-GDSC in the respective driver then the default value from the GDSC driver is used. The downstream driver only conditionally sets clk_dis_wait_val if qcom,clk-dis-wait-val is given in devicetree. Correct this situation by explicitly setting those values. For all GDSCs the reset value of those bits are used. Fixes: 80f5451d9a7c ("clk: qcom: Add camera clock controller driver for SM6350") Signed-off-by: Luca Weiss Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20250425-sm6350-gdsc-val-v1-1-1f252d9c5e4e@fairphone.com Signed-off-by: Bjorn Andersson commit 9f2ae52acd5e6c95ddc55d1cc67f44860940a21b Author: Aleksandrs Vinarskis Date: Sat Apr 26 14:57:58 2025 +0200 dt-bindings: arm: qcom: Add Asus Zenbook A14 Document the X1E-78-100 and X1P-42-100/X1-26-100 variants. Acked-by: Krzysztof Kozlowski Signed-off-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/r/20250426130203.37659-3-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 56c8edc6eeaa16f777b1c030aad12e2e8da92104 Author: Aleksandrs Vinarskis Date: Sat Apr 26 14:57:59 2025 +0200 firmware: qcom: scm: Allow QSEECOM on Asus Zenbook A14 Allow particular machine accessing eg. efivars. Signed-off-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/r/20250426130203.37659-4-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 2ed8ee662660577a701e92917dbc65ca3553507c Author: Imran Shaik Date: Wed Apr 30 10:29:12 2025 +0530 arm64: dts: qcom: qcs8300: Add cpufreq scaling node Add cpufreq-hw node to support cpufreq scaling on QCS8300. Signed-off-by: Imran Shaik Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250430-qcs8300-cpufreq-scaling-v2-1-ee41566b8c56@quicinc.com Signed-off-by: Bjorn Andersson commit f5110806b41eaa0eb0ab1bf2787876a580c6246c Author: Alexey Minnekhanov Date: Sun May 4 14:51:20 2025 +0300 arm64: dts: qcom: sda660-ifc6560: Fix dt-validate warning If you remove clocks property, you should remove clock-names, too. Fixes warning with dtbs check: 'clocks' is a dependency of 'clock-names' Fixes: 34279d6e3f32c ("arm64: dts: qcom: sdm660: Add initial Inforce IFC6560 board support") Signed-off-by: Alexey Minnekhanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504115120.1432282-4-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit dbf62a117a1b7f605a98dd1fd1fd6c85ec324ea0 Author: Alexey Minnekhanov Date: Sun May 4 14:51:19 2025 +0300 arm64: dts: qcom: sdm660-lavender: Add missing USB phy supply Fixes the following dtbs check error: phy@c012000: 'vdda-pll-supply' is a required property Fixes: e5d3e752b050e ("arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB") Signed-off-by: Alexey Minnekhanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504115120.1432282-3-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit 02a8b9894b9cbf4ffcd8661813826494cf49d3a2 Author: Alexey Minnekhanov Date: Sun May 4 14:51:18 2025 +0300 arm64: dts: qcom: sdm630: Add modem metadata mem Similarly to MSM8998, add and use modem metadata memory region. This does not seemingly affect device functionality. But it fixes DTBs check warning: remoteproc@4080000: memory-region: [[45], [46]] is too short Signed-off-by: Alexey Minnekhanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250504115120.1432282-2-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit d8b462c44a0399e220a44c81cf562b909448bada Author: Gabor Juhos Date: Tue May 6 15:37:47 2025 +0200 arm64: dts: ipq6018: drop standalone 'smem' node Since commit b5af64fceb04 ("soc: qcom: smem: Support reserved-memory description") the SMEM device can be instantiated directly from a reserved-memory node. The 'smem' node is defined in this way for each modern IPQ SoCs except for IPQ6018. In order to make it inline with the others, move the 'compatible' and the 'hwlock' properties into the respective reserved-memory node, and drop the standalone 'smem' node. Signed-off-by: Gabor Juhos Reviewed-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20250506-ipq6018-drop-smem-v1-1-af99d177be2f@gmail.com Signed-off-by: Bjorn Andersson commit f3c308b9d13ace45955e8406e3008f640f01faae Author: Kanchan Joshi Date: Wed May 7 00:18:43 2025 +0530 nvme: fix incorrect sizeof The plid array, head->plids, is meant to store placement IDs, each of type u16. But its size has been incorrectly calculated, as the size of the pointer is being used instead of the size of the object it points to. Use the sizeof(*head->plids) in kcalloc so that we don't allocate extra. Fixes: 38e8397dde63 ("nvme: use fdp streams if write stream is provided") Reported-by: Caleb Sander Mateos Signed-off-by: Kanchan Joshi Reviewed-by: Caleb Sander Mateos Signed-off-by: Jens Axboe commit 5d511d93c0c3d9cf0ad28708d2d945d61ea27f01 Author: Joel Selvaraj Date: Tue May 6 13:18:38 2025 -0500 dt-bindings: input: touchscreen: edt-ft5x06: use unevaluatedProperties In Xiaomi Poco F1 (qcom/sdm845-xiaomi-beryllium-ebbg.dts), the FocalTech FT8719 touchscreen is integrally connected to the display panel (EBBG FT8719) and thus should be power sequenced together with display panel using the panel property. Since the edt-ft5x06 touchscreen binding uses almost all the properties present in touchscreen.yaml, let's remove additionalProperties: false and use unevaluatedProperties to include all the properties, including the needed panel property. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/20250506-pocof1-touchscreen-support-v4-1-bfb53da52945@joelselvaraj.com Signed-off-by: Dmitry Torokhov commit 332fbf871d44cc731ba29dcc69b5700702b4b1f7 Author: Johannes Berg Date: Fri May 2 15:56:29 2025 +0300 wifi: iwlwifi: pcie: don't call itself indirectly There's no reason for pcie code to call itself indirectly, directly use the pcie functions instead. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Reviewed-by: Yedidya Ben Shimol Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.52db0b9fba15.I062e766ded86f61ec86104c28b84767f1c29ea78@changeid commit 1fb053d9876f2a580a5e55833dfdee5a361efba5 Author: Johannes Berg Date: Fri May 2 15:56:28 2025 +0300 wifi: iwlwifi: cfg: remove unnecessary configs Since there are two bytes hole in struct iwl_dev_info, add a subdev_mask to match with. Also, since the PCI IDs list needs to match first, and the dev-info list is matched from the bottom up, remove unnecessary entries. With this, even though there are new entries from previous changes, the overall size is slightly reduced. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.689f9b335cbe.I66f1344b6ac7aa3665696637c97fa843c2307423@changeid commit 2870c095186896540d64e947fa009bba08dd6bc8 Author: Johannes Berg Date: Fri May 2 15:56:27 2025 +0300 wifi: iwlwifi: cfg: reduce mac_type to u8 In theory, this should be 12 bits, but in practice all the values we use now fit into 8 bits, so change the mac_type to make room in struct iwl_dev_info. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.c17d56f4ae0f.I487c8df18aa33c46aa6813bf5aebb5a23da67600@changeid commit 220c01a6fda512509ca2fe6c14778a39be2a7f71 Author: Johannes Berg Date: Fri May 2 15:56:26 2025 +0300 wifi: iwlwifi: tests: check for duplicate name strings We don't need the same name multiple times in the binary, add a check for that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.9adf2790122e.Ia85152c072c7944f0b80e819cf59a51d6adeb49a@changeid commit 1feda9a23ec8b9ead8a64f7384103c69a3ac7c8b Author: Johannes Berg Date: Fri May 2 15:56:25 2025 +0300 wifi: iwlwifi: cfg: move all names out of configs Move all the names into dev info structs and remove the pointer from the configs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.1538369bffde.Id430ff71f57cbb37c19ecc5b41c831e5ba9b0695@changeid commit 35ac275ebe0c4ad274072df8e0cf8d1fb9713116 Author: Johannes Berg Date: Fri May 2 15:56:24 2025 +0300 wifi: iwlwifi: cfg: finish config split A long time ago, when transport vs. device configs were introduced, we wanted to eventually have a list of PCI IDs and a separate list of devices, but for simplicity embedded the transport config in the whole config, and it all got confusing. Finish splitting that out. Doing so requires having more IWL_DEV_INFO() entries, but the whole trans/cfg aliasing goes away and the code becomes a lot simpler. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.e03f65c0f693.I076a997f800db455b575008f9488b151738ad7ec@changeid commit 3bf7c3980b0a2dafbe9dffa4f3e81a579de15461 Author: Johannes Berg Date: Fri May 2 15:56:23 2025 +0300 wifi: iwlwifi: cfg: minor fixes for Sc Remove the erroneously named IWL_DEVICE_BZ_COMMON macro from the Sc file and fix some indentation. Also bump the minimum FW version since it's not released yet anyway, right now this is mostly to make the config different from iwl_bz_cfg which would otherwise be the same with the upcoming transport config cleanups. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.b313d54b8809.Ia975b6d5460996f2a2761dd3d0fef4a56f1f3e24@changeid commit 70e15105050f9c32d9bda578c323d29fe45bbd21 Author: Johannes Berg Date: Fri May 2 15:56:22 2025 +0300 wifi: iwlwifi: pcie: remove 'ent' argument from alloc The alloc function iwl_trans_pcie_alloc() doesn't use the 'ent' argument, so remove it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.0351805072bc.Id309b38817edc116bf9a921608a93b7734f21b05@changeid commit d4bdea6931d345f8b740531e274352516d14c083 Author: Johannes Berg Date: Fri May 2 15:56:21 2025 +0300 wifi: iwlwifi: cfg: rename BW_NO_LIMIT to BW_NOT_LIMITED It's not clear that it makes sense to have any matches for IWL_CFG_ANY for this bit, but let's assume for now that this makes sense. Then, it's clearer to call this BW_NOT_LIMITED rather than BW_NO_LIMIT, since the last change. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.9b39693b505c.Ib47aa6a072a0e61bbba28383ce54764cd859f19c@changeid commit ac1ee8130a2297593ddee0466f8bfc0e679f8f1b Author: Johannes Berg Date: Fri May 2 15:56:20 2025 +0300 wifi: iwlwifi: cfg: clean up BW limit and subdev matching The BW limit, cores and RF ID are matched in the subdevice ID, so it doesn't really make sense to have both SUBDEV() match and a match on any of those three. In particular, for Killer devices the subdevice ID doesn't even follow the layout, so no matching should be on those three values at all, only with SUBDEV(). Change the logic around the BW limit to have it more like all the other things: only a bw_limit match in the dev_info, and put the actual bandwidth into struct iwl_cfg. This duplicates a number of those values, but that way the logic is clearer. Add a test that checks that the three matches mentioned above are not used in conjunction with SUBDEV(), and check that if the bw_limit is matched, a BW limit is provided in the config. Also check that the "Killer" devices have a SUBDEV() match. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.a185eac2736c.I87ee87300c92518a1d3296d3eda9fd4163e9085e@changeid commit 337faf17c973ce1f799ac163bbe105c322302c3b Author: Johannes Berg Date: Fri May 2 15:56:19 2025 +0300 wifi: iwlwifi: tests: check transport configs are not duplicated Add a kunit test to check that all (used) transport config structs are not duplicated, since there's no value in having the same info in two places in memory. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.a151af19aaba.Id57f099a899e09318c6218ed1859151f00232b41@changeid commit cccb5b266bbe7583ca99967e499940d5d3b32382 Author: Johannes Berg Date: Fri May 2 15:56:18 2025 +0300 wifi: iwlwifi: tests: check configs are not duplicated Add a kunit test to check that all (used) config structs are not duplicated, ignoring the name since that can be handled differently via the dev-info list. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.0cfd9fb8322e.I9567b839405be8d1e4be0bfca7a17b5d222b0158@changeid commit 7f0d5a329a732bdb2b48d6ce699d0148a5cbf7ce Author: Johannes Berg Date: Fri May 2 15:56:17 2025 +0300 wifi: iwlwifi: cfg: remove iwl_cfg_br This is the same as iwl_cfg_dr, just different by the MAC, so no need to keep a separate config; remove it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502155404.83b86e8a182b.Iec7f3027e7058005a98ff6d05cc224ab61b7c44a@changeid commit cfbe1f27e8df28e37937cd34d3d80e7b534c4ae3 Author: Johannes Berg Date: Fri May 2 15:20:30 2025 +0300 wifi: iwlwifi: cfg: remove duplicated Sc device configs The configurations for Sc, Sc2 and Sc2f are all the same, so keep just a single config struct. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.2bab15a21306.I079987bc4a1679789bacc1078952aa90c805ffe0@changeid commit 3fa1bd49ff90d956f6e4dff39b0b8545c951d51a Author: Johannes Berg Date: Fri May 2 15:20:29 2025 +0300 wifi: iwlwifi: cfg: remove duplicated iwl_cfg_gl This really is the same device as covered by iwl_cfg_bz, just the discrete version. Since discrete vs integrated is handled in the transport config, there's no need to have both. Remove iwl_cfg_gl. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.fbb78183dc85.Ic5429009677ae1023cf1f43a655e90409a30c493@changeid commit d5b8529369d51fdd4580d8743323c44c0dd7119b Author: Johannes Berg Date: Fri May 2 15:20:28 2025 +0300 wifi: iwlwifi: cfg: remove iwl_ax201_cfg_qu_hr We can handle the name differently, so do that and remove the extra config entry. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.17fc47c72232.I2cb4476b9bca6e770bd375ad6ce650553dbde0f1@changeid commit a7a9c3a638900ac1f2ba321d10a1201b98715105 Author: Johannes Berg Date: Fri May 2 15:20:27 2025 +0300 wifi: iwlwifi: cfg: remove max_tx_agg_size This was used in some really old devices, and then got carried forward to Qu devices, even though on those we don't need it at all since the TX aggregation start is offloaded to the firmware. Remove it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.9c2689e2ca8e.I8274b29ca64d9ef9d1e357bbe34ca3a4b97aeb7a@changeid commit 7ded94bd6a86418fb2c8710cd4ab0cc29b6358a6 Author: Johannes Berg Date: Fri May 2 15:20:26 2025 +0300 wifi: iwlwifi: cfg: remove unused config externs There are two killer configs that no longer exist, remove the externs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.64977630101f.I9997a72027d37249620a78091759fa44f9d32c87@changeid commit ef36fd5f0ca900a0e15a2a197eac8584edae37d3 Author: Johannes Berg Date: Fri May 2 15:20:25 2025 +0300 wifi: iwlwifi: cfg: unify Killer 1650s/i with Qu/Hr These configs are the same except for the name, but we can use a separate per-device name to override the name. So do that, and remove the separate configs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.a0a8ebbd473a.Iad8bff04138538a8bc9f7920077ea24a699b1ed4@changeid commit 0775d2c6399be00f4d33c49dbd2afdd2282b95a8 Author: Johannes Berg Date: Fri May 2 15:20:24 2025 +0300 wifi: iwlwifi: cfg: unify Qu/QuZ configs Now that the fw_name_mac is no longer around and derived from the MAC type automatically, we no longer need to have different configurations for Qu/QuZ. Combine them. For the killer AX1650s/i, also fix the names, there was a mixup. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.957fbb5437ce.If51ad0b2c8afaaa131208125af3bc292793613bb@changeid commit f0b71876a971c6fd1c9e25f3c66f04ed463c79f7 Author: Johannes Berg Date: Fri May 2 15:20:23 2025 +0300 wifi: iwlwifi: cfg: remove fw_name_mac Instead of having fw_name_mac in the config, derive it from the MAC type instead. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.8dba9a2d3546.I41fa594d6a0be163444b90c1ed4b441a949d3899@changeid commit fa22a93e2aa745e64854ec53d0f6149f6f72c5eb Author: Johannes Berg Date: Fri May 2 15:20:22 2025 +0300 wifi: iwlwifi: tests: check for device names Add a unit test that checks that each device has a name, either via the specific name entry or the config's name. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.c04287134280.Iedc7c05a41dc8bfe04dc8b95fea38543513eac2d@changeid commit a925fe703d68d775df92da828d921a08bfea3f01 Author: Johannes Berg Date: Fri May 2 15:20:21 2025 +0300 wifi: iwlwifi: pcie: add entry for Killer AX1650i on AdL-P On AdL-P, we're missing an entry for the Killer(R) Wi-Fi 6 AX1650i 160 MHz adapter. Add an entry to fix that. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219114 Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.483214386aa4.Iad4d2041bfe544875fe9f5c051e23a765f862786@changeid commit 0eea86b24533d8702c387722203429d88ca7619c Author: Johannes Berg Date: Fri May 2 15:20:20 2025 +0300 wifi: iwlwifi: unify some configurations Rather than having individual entries for different MAC and RF steps, unify the entries by using fw_name_mac and remove the now duplicated ones. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.b93f34a65822.I57b8235acb675cb6b4e97df2f4a7365f3d9bff18@changeid commit ca353a8f96c41870bc2c94f839ccab435aaa0d57 Author: Miri Korenblit Date: Fri May 2 15:20:19 2025 +0300 wifi: iwlwifi: remove duplicated line This line was duplicated by mistake, remove one occurrence. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.a2601e0a08e0.Ie72fadec40e41b8197bfdae16eaa430c64a3e62d@changeid commit e3c41f414a2aec1870459dc3ee74b99361bb62ae Author: Somashekhar Puttagangaiah Date: Fri May 2 15:20:18 2025 +0300 wifi: iwlwifi: pcie: Add support for new device ids Add device support for PeP on ScP Signed-off-by: Somashekhar Puttagangaiah Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.a66928fcc82a.Icbbc7c28855f8de232cb3916901a4da3ac286117@changeid commit a7872d8061c26e1fb0fe451c9757709e47a5ce25 Author: Johannes Berg Date: Fri May 2 15:20:17 2025 +0300 wifi: iwlwifi: remove TH/TH1 RF types There are the same values as JF2/JF1 respectively, and that really matches the code names. Remove TH/TH1. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.7677cffdfae2.Idd76734c310cf5f27de43d24e71b27467ab5905a@changeid commit c577684874f9882441032c657e2262d438557c40 Author: Johannes Berg Date: Fri May 2 15:20:16 2025 +0300 wifi: iwlwifi: clean up config macro The IWL_DEV_INFO() macro has far too many arguments, and most of the time they're just "ANY". Use C99 initializers in the macro to clean that up. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250502151751.42318bb31f0e.Ic3a40afcd182b6e1802bb8f8a1a845b20608e328@changeid commit 8c7371126f0a70634ea732840c47b0a51345657f Author: Johannes Berg Date: Wed Apr 30 15:57:29 2025 +0300 wifi: iwlwifi: mvm: remove nl80211 testmode This was used in the past for NoA and/or beacon filter testing, but these days everything is tested via debugfs or special FW commands, so remove the testmode. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.751018e0ed8e.I21557a9a3d57234187f1b0b2182a1714ecc66b9a@changeid commit 21dccdfaf65033a71bb4b4b817eacd38d306706f Author: Johannes Berg Date: Wed Apr 30 15:57:28 2025 +0300 wifi: iwlwifi: mld: set rx_mpdu_cmd_hdr_size Set rx_mpdu_cmd_hdr_size so that tracing will correctly include the frame header. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.caf1d8e2bae3.I82d89bc8d128f78159a8a11b1573574dacdeb99e@changeid commit 9585559c240c127aa569ce7bc4faf81a00d271fd Author: Johannes Berg Date: Wed Apr 30 15:57:27 2025 +0300 wifi: iwlwifi: dvm: fix various W=1 warnings Fix warnings occurring with W=1, mostly const and one about pointer arithmetic. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.3ef1e4f1cccb.Ic41d3f3721e8bd9df9cd50242232110c4a93e873@changeid commit ac5215a7d10816344a6e477436a3d3db04d59473 Author: Avraham Stern Date: Wed Apr 30 15:57:25 2025 +0300 wifi: iwlwifi: mld: force the responder to use the full bandwidth When a soft AP is started, it may not use the full configured bandwidth (e.g. if no station is connected). As a result, the responder will not support the configured bandwidth. Since the responder supports ranging with unassociated stations, there is no indication to the driver when the full bandwidth should be enabled. Fix it by configuring the AP to always use the full bandwidth when a responder is supported. Signed-off-by: Avraham Stern Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.620fe8099fff.Id50675f4d4c524b0a7ee602c48af538a327010e0@changeid commit 94f086a4db66d912c7df37bc7651a3efd276415a Author: Avraham Stern Date: Wed Apr 30 15:57:24 2025 +0300 wifi: iwlwifi: mld: start AP with the correct bandwidth When a channel context is added, it is still not assigned to the link and the link is not yet active. As a result, the channel context min_def is used when the AP is started, even when the full bandwidth should be used. Fix it by updating the PHY channel context when the link is already active so the full bandwidth is used when needed. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.30b043b10fb1.I62c2aa58687e4796b759fa68132122119a337b49@changeid commit a4911d0178479b4f6411d317adc6e34d1c9c8d89 Author: Daniel Gabay Date: Wed Apr 30 15:57:23 2025 +0300 wifi: iwlwifi: mld: add monitor internal station This is needed for TX injection over monitor interface. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.5ec460d3f1c2.Ic8456efb4cdd722dcd9c4910a1569ef9d3e4e066@changeid commit 64667ab85631d4823c094325c8429605a9bcc6ac Author: Emmanuel Grumbach Date: Wed Apr 30 15:57:22 2025 +0300 wifi: iwlwifi: mld: support for COMPRESSED_BA_RES_API_S_VER_7 The rate format changed but since we don't use the rate, just claim support for this new API. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.c4be90e242ff.Ie8a0f0d6320613bd8c5cb6c82a063069fffa3b67@changeid commit c766c8bc1146efd032aac739db89b13bd3717dab Author: Miri Korenblit Date: Wed Apr 30 15:57:21 2025 +0300 wifi: iwlwifi: mvm: support iwl_mac_power_cmd version 2 This version fixes the issue that was worked around by iwl_mvm_smps_workaround. So for FWs with the new version don't do the workaround, and set new bit added in this version when appropriate. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250430155443.5c9a0181a84b.I9a03bc07a7b3f6e37cc1c0c1af5719e765a05897@changeid commit 909e1be6546258efb45993851d51d86862e2e5ee Author: Johannes Berg Date: Wed Apr 30 15:57:20 2025 +0300 wifi: iwlwifi: implement TOP reset Implement TOP reset (new in the SC family), which resets much of the (shared) hardware without resetting the bus interfaces. Use it to recover from TOP fatal error, or if manually used; we'll need to add using it for FSEQ updates later. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.12f38024a3b4.I9c22f6c4f6de64f3b34ccd898370ec1859ab7dbf@changeid commit 86b6e0bd1a69efd0ed408997e0adfb85df96a0c7 Author: Caleb Sander Mateos Date: Tue May 6 11:54:12 2025 -0600 nvme: fix write_stream_granularity initialization write_stream_granularity is set to max(info->runs, U32_MAX), which means that any RUNS value less than 2 ** 32 becomes U32_MAX, and any larger value is silently truncated to an unsigned int. Use min() instead to provide the correct semantics, capping RUNS values at U32_MAX. Signed-off-by: Caleb Sander Mateos Fixes: 30b5f20bb2dd ("nvme: register fdp parameters with the block layer") Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20250506175413.1936110-1-csander@purestorage.com Signed-off-by: Jens Axboe commit f37f6ba2302e826faa8e000fc773845d3cb30adc Merge: 0af2f6be1b4281 49625c6e4d90a9 Author: Stephen Boyd Date: Tue May 6 10:56:52 2025 -0700 Merge tag 'spacemit-clk-for-6.16-1' of https://github.com/spacemit-com/linux into clk-spacemit Pull SpacemiT clk driver updates from Yixun Lan: - Add clock driver for SpacemiT K1 SoC - Add TWSI8 clock, workaround the read quirk * tag 'spacemit-clk-for-6.16-1' of https://github.com/spacemit-com/linux: clk: spacemit: k1: Add TWSI8 bus and function clocks clk: spacemit: Add clock support for SpacemiT K1 SoC dt-bindings: clock: spacemit: Add spacemit,k1-pll dt-bindings: soc: spacemit: Add spacemit,k1-syscon commit bef96521310e8d997bacf81e1801caff1af76937 Merge: 0af2f6be1b4281 93f2878136262e Author: Stephen Boyd Date: Tue May 6 10:52:40 2025 -0700 Merge tag 'renesas-clk-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add GPU and USB2 clocks and resets on Renesas RZ/V2H(P) - Add support for the Renesas RZ/V2N (R9A09G056) SoC - Add GPU clocks and resets on Renesas RZ/G3E * tag 'renesas-clk-for-v6.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (22 commits) clk: renesas: r9a09g057: Add clock and reset entries for USB2 dt-bindings: clock: renesas,r9a09g057-cpg: Add USB2 PHY and GBETH PTP core clocks clk: renesas: rzv2h: Use both CLK_ON and CLK_MON bits for clock state validation clk: renesas: rzv2h: Use str_on_off() helper in rzv2h_mod_clock_endisable() clk: renesas: rzv2h: Support static dividers without RMW clk: renesas: rzv2h: Add macro for defining static dividers clk: renesas: rzv2h: Add support for static mux clocks clk: renesas: r9a09g047: Add clock and reset entries for GE3D clk: renesas: rzv2h: Fix a typo clk: renesas: rzv2h: Add support for RZ/V2N SoC clk: renesas: rzv2h: Sort compatible list based on SoC part number dt-bindings: pinctrl: renesas: Document RZ/V2N SoC dt-bindings: clock: renesas: Document RZ/V2N SoC CPG dt-bindings: soc: renesas: Document SYS for RZ/V2N SoC dt-bindings: soc: renesas: Document Renesas RZ/V2N SoC variants and EVK clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert() clk: renesas: rzv2h: Improve rzv2h_ddiv_set_rate() clk: renesas: r9a09g057: Add clock and reset entries for GE3D clk: renesas: rzv2h: Rename PLL field macros for consistency clk: renesas: rzv2h: Add support for enabling PLLs ... commit 570d58b12fbf7bae0ba72d929ccf914a4df5ca7c Merge: 502ad6e5a61968 92a09c47464d04 Author: Ingo Molnar Date: Tue May 6 19:42:00 2025 +0200 Merge tag 'v6.15-rc5' into x86/msr, to pick up fixes and to resolve conflicts Conflicts: drivers/cpufreq/intel_pstate.c Signed-off-by: Ingo Molnar commit e56b4eab9cde7db525bf8dc57b489d157d5a201e Author: Dr. David Alan Gilbert Date: Mon May 5 22:02:26 2025 +0100 RDMA/siw: Remove unused siw_mem_add siw_mem_add() was added in 2019 by commit 2251334dcac9 ("rdma/siw: application buffer management") but has remained unused. Remove it. Link: https://patch.msgid.link/r/20250505210226.88994-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Acked-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 7ccc2a0646ecbf2f8676b7ee0dc4aaccaa2e5ce1 Author: Dr. David Alan Gilbert Date: Mon May 5 21:54:19 2025 +0100 IB/hfi1: Remove unused sc_drop and sdma_all_idle sc_drop() and sdma_all_idle() were both added in 2015's commit 7724105686e7 ("IB/hfi1: add driver files") but have remained unused. Remove them. Link: https://patch.msgid.link/r/20250505205419.88131-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Jason Gunthorpe commit abbcea13bc5d01fb77d93c718d79e81145f8bb39 Author: Johannes Berg Date: Wed Apr 30 15:57:19 2025 +0300 wifi: iwlwifi: mld: handle SW reset w/o NIC error For the upcoming TOP reset, the sw_reset() method may be called without nic_error() before it. In this case, also abort any still pending scans and set in_hw_restart. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.b732ff4e9f31.I3948c2d892f1ee82b3a6bf9f123be02a1eaa82e5@changeid commit 792eb35718367c9b84b61e316700a8201f8a5036 Author: Miri Korenblit Date: Wed Apr 30 15:57:18 2025 +0300 wifi: iwlwifi: mvm: support ROC command version 6 This was suppsed to be supported only in iwlmld, but turns out that it will be needed also in iwlmvm. Add support for it. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250430155443.d118ee63aca4.I12ea349ca6587d8ea606f6ece4a9f3c0c2bb1494@changeid commit bd795a65c2718d7161029bb2d4b79fa2577c4fd2 Author: Miri Korenblit Date: Wed Apr 30 15:57:17 2025 +0300 wifi: iwlwifi: mld: support iwl_mac_power_cmd version 2 This version fixes the issue that was worked around by iwl_mld_smps_wa. So for FWs with the new version don't do the workaround, and set new bit added in this version when appropriate. While at it, rename iwl_mld_smps_wa to iwl_mld_smps_workaround. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250430155443.77fdb18d1ee0.I93688612ac4f6ec99da9bc54bee16554ef40a40b@changeid commit 0bd6ede71aef200c3876ca4aefb3fc5a2e474cf6 Author: Emmanuel Grumbach Date: Wed Apr 30 15:57:16 2025 +0300 wifi: iwlwifi: add support for ALIVE v8 The firmware added a field to describe the platform Id. Just print it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.dc387ae36e0f.Iafd364c6b23749597b658015be97295ad0c1730d@changeid commit f7cc80b871eeffa17a4b280e2820d081c651a308 Author: Somashekhar Puttagangaiah Date: Wed Apr 30 15:57:15 2025 +0300 wifi: iwlwifi: mld: add kunit test for emlsr with bt on add kunit test to validate entering and exiting emlsr scenarios when the bt is on with certain penalty on wifi. Signed-off-by: Somashekhar Puttagangaiah Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430155443.6621494fa412.If89b4b2dab308d825ca02284dd8e0030675d7af5@changeid commit ad883b79b2b60006c92213d45546211267408c15 Author: Pagadala Yesu Anjaneyulu Date: Wed Apr 30 15:23:20 2025 +0300 wifi: iwlwifi: fw: support PPAG command version 7 PPAG command version 7 will send exact data read from BIOS to firmware without filtering/altering BIOS data. This enables the driver to become purely a pipe for this feature. Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.88ed7b2cadef.Iad78f6cec617d1f111b704352795dde81af71a99@changeid commit d807f9e8f4a34e878bbc476261ea466435c26cb5 Author: Pagadala Yesu Anjaneyulu Date: Wed Apr 30 15:23:19 2025 +0300 wifi: iwlwifi: fw: support reading PPAG BIOS table revision 4 PPAG revision 4 data has more supported bits than supported in version 6 of PPAG command. So, adjust by masking accordingly to firmware acceptance. Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.f1cb31f9f6ab.I56d6887866f76fd02b2cd298e3de1189c6d3890e@changeid commit b8ca16d1d4498f9c1923905f9ba8b929b9294bea Author: Pagadala Yesu Anjaneyulu Date: Wed Apr 30 15:23:18 2025 +0300 wifi: iwlwifi: rename ppag_ver to ppag_bios_rev ppag_ver variable is holding PPAG BIOS revision but name misleading as PPAG command API version, So rename to ppag_bios_rev. This will improve code readability but doesn't alter behaviour. Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.be51850947df.If81d88cd2d38299faf1e2a3db5efbc021650f907@changeid commit f5f6b9d9a4959d19fefb4c48ef66de25571f22c3 Author: Miri Korenblit Date: Wed Apr 30 15:23:17 2025 +0300 wifi: iwlwifi: mld: don't return an error if the FW is dead If iwl_mld_change_vif_links failed to add the requested link(s) because the FW is dead (error before recovery), there is no point in returning an error value, as the reconfig will re-add the link(s) after the FW is started. Return 0 in that case, and WARN in the others. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250430151952.c549c72b1f37.I445bf723e9befc9541b4abd0ec7c72db8f1ff177@changeid commit f9151f16e140b9c43f076579146679408af6f442 Author: Miri Korenblit Date: Wed Apr 30 15:23:16 2025 +0300 wifi: iwlwifi: mld: check for NULL before referencing a pointer Errors can happen, and it is better not to risk with a NULL pointer dereference. Make sure that the links-to-remove pointers are not NULL before dereferencing it. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250430151952.408652d45cda.I1bb72836dab17895a2e39910e4493d667db0fa80@changeid commit 37808a3788fdf47af11ffa2f4f4033f3b1e0c9f2 Author: Somashekhar Puttagangaiah Date: Wed Apr 30 15:23:15 2025 +0300 wifi: iwlwifi: mld: allow EMLSR with 2.4 GHz when BT is ON When BT is ON, EMLSR with one of the links operating on 2.4 GHz is allowed only if it meets following conditions. In this patch: 1. during link selection, when BT is ON, allow emlsr only if BT pentalty is < 7%. 2. exit EMLSR if BT is turned ON and one of the links is operating on 2.4 GHz with BT penalty > 7% Signed-off-by: Somashekhar Puttagangaiah Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.d30212ec3901.I48e3d5bd6b0b8583f98057c38d2ee30fff5abd8a@changeid commit 822c7bd5ef25017883f99e120f2145320ddb8750 Author: Johannes Berg Date: Wed Apr 30 15:23:14 2025 +0300 wifi: iwlwifi: implement TOP reset follower For the upcoming SC hardware, a new reset mode "(silent) TOP reset" will be available. When BT initiates that reset, it'll negotiate with the WiFi firmware which makes it appear to the driver as the reset interrupt. To distinguish it from all the other reasons for the reset interrupt, there's (now) a status field in CSR 0x110. Implement the part of TOP reset where we react to BT doing it. This requires disambiguating the interrupt, depending on the state of the device, since we can even get TOP reset from BT while waiting for the reset handshake. If TOP reset is done by BT while we're not trying to do reset anyway, then simply reprobe, since we cannot keep the state of the device as it's being reset, after waiting the needed 180ms to let the device reset/settle. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.fb86bfbdca40.Ibe40bf54003e3f8929b671324a395e76eb64a4d8@changeid commit b2d98a6cee3ae02a681f8cae01161ff803001e69 Author: Johannes Berg Date: Wed Apr 30 15:23:12 2025 +0300 wifi: iwlwifi: avoid scheduling restart during restart When a restart is in progress, it can be async due to the next worker being scheduled in mac80211 (restart work) or the driver itself (reprobe). Avoid scheduling another restart during this period. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.db428503ec3c.I3f2be3d72a9d40cfb4e697cdab1cd2866a9262bc@changeid commit 8ec50790b043b55c7cfb0b54fed3ad119cc01d90 Author: Johannes Berg Date: Wed Apr 30 15:23:11 2025 +0300 wifi: iwlwifi: mld: tests: extend link pair tests Generalize and extend the link pair tests to not just do channel load checks, but generally check link pairs. To enable more accurate checking, return the reasons bitmap from iwl_mld_valid_emlsr_pair() and therefore rename it to iwl_mld_emlsr_pair_state. It's also necessary now to add more chandefs, and while doing so fix the existing ones to be valid and add a test to check they really are valid. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.1f7c4ac75c6d.I69d68359e02d99632e95daba3d126115dce167b3@changeid commit 0a7a30fce30e566a462b30994fcf69cea01934ed Author: Johannes Berg Date: Wed Apr 30 15:23:10 2025 +0300 wifi: iwlwifi: mld: refactor tests to use chandefs Instead of building invalid chandefs on the fly, use only chandefs throughout and ensure those are valid. Also add more chandefs that will be needed for new tests. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.6643fa8773f1.I644e9053d222a772e1d109799c4bfa0677add4d7@changeid commit 1f263e63607209922afe69308009d4f9fdd6ae60 Author: Miri Korenblit Date: Wed Apr 30 15:23:09 2025 +0300 wifi: iwlwifi: mld: send the WPFC table to the FW Read the table on op mode start, and send it to the FW when it is loaded. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.e349a33cd871.Ied196cf0fbe18b82b87ce713c4e3347f9aca1c25@changeid commit 200d89b4233fa0ac6e211597cb4935d794a2ca12 Author: Miri Korenblit Date: Wed Apr 30 15:23:08 2025 +0300 wifi: iwlwifi: read WPFC also from UEFI We are currently reading it only from ACPI, but we need to read it from UEFI too (if exists, and if the UEFI variables are locked) Add the reading from the UEFI and use IWL_BIOS_TABLE_LOADER to generate the code that determines the source from which the table should be read (ACPI/UEFI). Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250430151952.839a5e7dd89b.I491acbf68047874df97b3971f1ba692ebc998a52@changeid commit ef3c1142b69121ff3eb933dc5dbaac98adfc14a7 Author: Miri Korenblit Date: Wed Apr 30 15:23:07 2025 +0300 wifi: iwlwifi: prepare for reading WPFC from UEFI IWL_BIOS_TABLE_LOADER generates the code that determines from what source to read a BIOS table (ACPI or UEFI). As we want to read WPFC from UEFI to, iwl_acpi_get_phy_filters needs to have the prototype that is required by this macro: receive fwrt and return a int on success/failure. Do that. This allowes us to make to version of iwl_acpi_get_phy_filters for non ACPI builds back to an iniline function. Signed-off-by: Miri Korenblit Reviewed-by: Pagadala Yesu Anjaneyulu Link: https://patch.msgid.link/20250430151952.8046a2db775b.Ifbcf4168183d3cd635e3e800ec7ecd903e57d361@changeid commit bcd48ad7d9d21afbadcea9fe0403800a45932130 Author: Jeff Johnson Date: Wed Mar 19 07:37:37 2025 -0700 wifi: iwlwifi: Add short description to enum iwl_power_scheme The kernel-doc script flagged the following: drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:130: warning: missing initial short description on line: * enum iwl_power_scheme 1 warnings as Errors Add a short description to address this warning. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20250319-iwl_power_scheme-kdoc-v1-1-2033ae38b178@oss.qualcomm.com Signed-off-by: Miri Korenblit commit 9fd060622cf9224fd36e6429545101b3ec56adb4 Merge: 62e23f183839c3 29318b4d5dc348 Author: Alexei Starovoitov Date: Tue May 6 10:21:06 2025 -0700 Merge branch 'bpf-support-bpf-rbtree-traversal-and-list-peeking' Martin KaFai Lau says: ==================== bpf: Support bpf rbtree traversal and list peeking From: Martin KaFai Lau The RFC v1 [1] showed a fq qdisc implementation in bpf that is much closer to the kernel sch_fq.c. The fq example and bpf qdisc changes are separated out from this set. This set is to focus on the kfunc and verifier changes that enable the bpf rbtree traversal and list peeking. v2: - Added tests to check that the return value of the bpf_rbtree_{root,left,right} and bpf_list_{front,back} is marked as a non_own_ref node pointer. (Kumar) - Added tests to ensure that the bpf_rbtree_{root,left,right} and bpf_list_{front,back} must be called after holding the spinlock. - Squashed the selftests adjustment to the corresponding verifier changes to avoid bisect failure. (Kumar) - Separated the bpf qdisc specific changes and fq selftest example from this set. [1]: https://lore.kernel.org/bpf/20250418224652.105998-1-martin.lau@linux.dev/ ==================== Link: https://patch.msgid.link/20250506015857.817950-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 29318b4d5dc348367dee8ad0ad7b89350cf1161e Author: Martin KaFai Lau Date: Mon May 5 18:58:55 2025 -0700 selftests/bpf: Add test for bpf_list_{front,back} This patch adds the "list_peek" test to use the new bpf_list_{front,back} kfunc. The test_{front,back}* tests ensure that the return value is a non_own_ref node pointer and requires the spinlock to be held. Suggested-by: Kumar Kartikeya Dwivedi # check non_own_ref marking Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-9-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit fb5b480205bad3936b054b86f7c9d2bd7835caac Author: Martin KaFai Lau Date: Mon May 5 18:58:54 2025 -0700 bpf: Add bpf_list_{front,back} kfunc In the kernel fq qdisc implementation, it only needs to look at the fields of the first node in a list but does not always need to remove it from the list. It is more convenient to have a peek kfunc for the list. It works similar to the bpf_rbtree_first(). This patch adds bpf_list_{front,back} kfunc. The verifier is changed such that the kfunc returning "struct bpf_list_node *" will be marked as non-owning. The exception is the KF_ACQUIRE kfunc. The net effect is only the new bpf_list_{front,back} kfuncs will have its return pointer marked as non-owning. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-8-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 3fab84f00d3274e1fd19054a409a9c804261e4b9 Author: Martin KaFai Lau Date: Mon May 5 18:58:53 2025 -0700 bpf: Simplify reg0 marking for the list kfuncs that return a bpf_list_node pointer The next patch will add bpf_list_{front,back} kfuncs to peek the head and tail of a list. Both of them will return a 'struct bpf_list_node *'. Follow the earlier change for rbtree, this patch checks the return btf type is a 'struct bpf_list_node' pointer instead of checking each kfuncs individually to decide if mark_reg_graph_node should be called. This will make the bpf_list_{front,back} kfunc addition easier in the later patch. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-7-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 47ada65c5cf91b9cb51abf5bd32513ebd7720941 Author: Martin KaFai Lau Date: Mon May 5 18:58:52 2025 -0700 selftests/bpf: Add tests for bpf_rbtree_{root,left,right} This patch has a much simplified rbtree usage from the kernel sch_fq qdisc. It has a "struct node_data" which can be added to two different rbtrees which are ordered by different keys. The test first populates both rbtrees. Then search for a lookup_key from the "groot0" rbtree. Once the lookup_key is found, that node refcount is taken. The node is then removed from another "groot1" rbtree. While searching the lookup_key, the test will also try to remove all rbnodes in the path leading to the lookup_key. The test_{root,left,right}_spinlock_true tests ensure that the return value of the bpf_rbtree functions is a non_own_ref node pointer. This is done by forcing an verifier error by calling a helper bpf_jiffies64() while holding the spinlock. The tests then check for the verifier message "call bpf_rbtree...R0=rcu_ptr_or_null_node..." The other test_{root,left,right}_spinlock_false tests ensure that they must be called with spinlock held. Suggested-by: Kumar Kartikeya Dwivedi # Check non_own_ref marking Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-6-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 2ddef1783c43ba81a05dec0a5781ebbc61a3c089 Author: Martin KaFai Lau Date: Mon May 5 18:58:51 2025 -0700 bpf: Allow refcounted bpf_rb_node used in bpf_rbtree_{remove,left,right} The bpf_rbtree_{remove,left,right} requires the root's lock to be held. They also check the node_internal->owner is still owned by that root before proceeding, so it is safe to allow refcounted bpf_rb_node pointer to be used in these kfuncs. In a bpf fq implementation which is much closer to the kernel fq, https://lore.kernel.org/bpf/20250418224652.105998-13-martin.lau@linux.dev/, a networking flow (allocated by bpf_obj_new) can be added to two different rbtrees. There are cases that the flow is searched from one rbtree, held the refcount of the flow, and then removed from another rbtree: struct fq_flow { struct bpf_rb_node fq_node; struct bpf_rb_node rate_node; struct bpf_refcount refcount; unsigned long sk_long; }; int bpf_fq_enqueue(...) { /* ... */ bpf_spin_lock(&root->lock); while (can_loop) { /* ... */ if (!p) break; gc_f = bpf_rb_entry(p, struct fq_flow, fq_node); if (gc_f->sk_long == sk_long) { f = bpf_refcount_acquire(gc_f); break; } /* ... */ } bpf_spin_unlock(&root->lock); if (f) { bpf_spin_lock(&q->lock); bpf_rbtree_remove(&q->delayed, &f->rate_node); bpf_spin_unlock(&q->lock); } } bpf_rbtree_{left,right} do not need this change but are relaxed together with bpf_rbtree_remove instead of adding extra verifier logic to exclude these kfuncs. To avoid bi-sect failure, this patch also changes the selftests together. The "rbtree_api_remove_unadded_node" is not expecting verifier's error. The test now expects bpf_rbtree_remove(&groot, &m->node) to return NULL. The test uses __retval(0) to ensure this NULL return value. Some of the "only take non-owning..." failure messages are changed also. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-5-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 9e3e66c553f705de51707c7ddc7f35ce159a8ef1 Author: Martin KaFai Lau Date: Mon May 5 18:58:50 2025 -0700 bpf: Add bpf_rbtree_{root,left,right} kfunc In a bpf fq implementation that is much closer to the kernel fq, it will need to traverse the rbtree: https://lore.kernel.org/bpf/20250418224652.105998-13-martin.lau@linux.dev/ The much simplified logic that uses the bpf_rbtree_{root,left,right} to traverse the rbtree is like: struct fq_flow { struct bpf_rb_node fq_node; struct bpf_rb_node rate_node; struct bpf_refcount refcount; unsigned long sk_long; }; struct fq_flow_root { struct bpf_spin_lock lock; struct bpf_rb_root root __contains(fq_flow, fq_node); }; struct fq_flow *fq_classify(...) { struct bpf_rb_node *tofree[FQ_GC_MAX]; struct fq_flow_root *root; struct fq_flow *gc_f, *f; struct bpf_rb_node *p; int i, fcnt = 0; /* ... */ f = NULL; bpf_spin_lock(&root->lock); p = bpf_rbtree_root(&root->root); while (can_loop) { if (!p) break; gc_f = bpf_rb_entry(p, struct fq_flow, fq_node); if (gc_f->sk_long == sk_long) { f = bpf_refcount_acquire(gc_f); break; } /* To be removed from the rbtree */ if (fcnt < FQ_GC_MAX && fq_gc_candidate(gc_f, jiffies_now)) tofree[fcnt++] = p; if (gc_f->sk_long > sk_long) p = bpf_rbtree_left(&root->root, p); else p = bpf_rbtree_right(&root->root, p); } /* remove from the rbtree */ for (i = 0; i < fcnt; i++) { p = tofree[i]; tofree[i] = bpf_rbtree_remove(&root->root, p); } bpf_spin_unlock(&root->lock); /* bpf_obj_drop the fq_flow(s) that have just been removed * from the rbtree. */ for (i = 0; i < fcnt; i++) { p = tofree[i]; if (p) { gc_f = bpf_rb_entry(p, struct fq_flow, fq_node); bpf_obj_drop(gc_f); } } return f; } The above simplified code needs to traverse the rbtree for two purposes, 1) find the flow with the desired sk_long value 2) while searching for the sk_long, collect flows that are the fq_gc_candidate. They will be removed from the rbtree. This patch adds the bpf_rbtree_{root,left,right} kfunc to enable the rbtree traversal. The returned bpf_rb_node pointer will be a non-owning reference which is the same as the returned pointer of the exisiting bpf_rbtree_first kfunc. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-4-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 7faccdf4b47d2c7674692aecdb5847da0f84dbd4 Author: Martin KaFai Lau Date: Mon May 5 18:58:49 2025 -0700 bpf: Simplify reg0 marking for the rbtree kfuncs that return a bpf_rb_node pointer The current rbtree kfunc, bpf_rbtree_{first, remove}, returns the bpf_rb_node pointer. The check_kfunc_call currently checks the kfunc btf_id instead of its return pointer type to decide if it needs to do mark_reg_graph_node(reg0) and ref_set_non_owning(reg0). The later patch will add bpf_rbtree_{root,left,right} that will also return a bpf_rb_node pointer. Instead of adding more kfunc btf_id checks to the "if" case, this patch changes the test to check the kfunc's return type. is_rbtree_node_type() function is added to test if a pointer type is a bpf_rb_node. The callers have already skipped the modifiers of the pointer type. A note on the ref_set_non_owning(), although bpf_rbtree_remove() also returns a bpf_rb_node pointer, the bpf_rbtree_remove() has the KF_ACQUIRE flag. Thus, its reg0 will not become non-owning. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit b183c0123d9ba16e147c990c02a9e6f37cac5df4 Author: Martin KaFai Lau Date: Mon May 5 18:58:48 2025 -0700 bpf: Check KF_bpf_rbtree_add_impl for the "case KF_ARG_PTR_TO_RB_NODE" In a later patch, two new kfuncs will take the bpf_rb_node pointer arg. struct bpf_rb_node *bpf_rbtree_left(struct bpf_rb_root *root, struct bpf_rb_node *node); struct bpf_rb_node *bpf_rbtree_right(struct bpf_rb_root *root, struct bpf_rb_node *node); In the check_kfunc_call, there is a "case KF_ARG_PTR_TO_RB_NODE" to check if the reg->type should be an allocated pointer or should be a non_owning_ref. The later patch will need to ensure that the bpf_rb_node pointer passing to the new bpf_rbtree_{left,right} must be a non_owning_ref. This should be the same requirement as the existing bpf_rbtree_remove. This patch swaps the current "if else" statement. Instead of checking the bpf_rbtree_remove, it checks the bpf_rbtree_add. Then the new bpf_rbtree_{left,right} will fall into the "else" case to make the later patch simpler. bpf_rbtree_add should be the only one that needs an allocated pointer. This should be a no-op change considering there are only two kfunc(s) taking bpf_rb_node pointer arg, rbtree_add and rbtree_remove. Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20250506015857.817950-2-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 3a70b945d3da5825b4d7ce7d1b941055a4486016 Author: Dr. David Alan Gilbert Date: Wed Apr 30 00:45:59 2025 +0100 rpmsg: Remove unused method pointers *send_offchannel After the previous patch, there are no implementers of the send_offchannel() and trysend_offchannel() methods. Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250429234600.301083-4-linux@treblig.org Signed-off-by: Mathieu Poirier commit 68decaf24d4d24f4f8708a248e65e9d77ea19b85 Author: Dr. David Alan Gilbert Date: Wed Apr 30 00:45:58 2025 +0100 rpmsg: virtio: Remove uncallable offchannel functions The virtio_rpmsg_send_offchannel() and virtio_rpmsg_trysend_offchannel() are wired up to the send_offchannel and trysend_offchannel members of rpmsg_endpoint_ops, the only dereference of those was by the unused, and now removed rpmsg_send_offchannel() and rpmsg_trysend_offchannel() functions. Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250429234600.301083-3-linux@treblig.org Signed-off-by: Mathieu Poirier commit 20b4f0b4cdfec106bb73afd47de7d121b723f723 Author: Dr. David Alan Gilbert Date: Wed Apr 30 00:45:57 2025 +0100 rpmsg: core: Remove deadcode rpmsg_send_offchannel() and rpmsg_trysend_offchannel() have been unused since they were added in 2011's commit bcabbccabffe ("rpmsg: add virtio-based remote processor messaging bus") Remove them and associated docs. Signed-off-by: Dr. David Alan Gilbert Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250429234600.301083-2-linux@treblig.org Signed-off-by: Mathieu Poirier commit e93912786e50804e7c53456da75d586cace8732f Author: Eric Biggers Date: Thu May 1 14:23:20 2025 -0700 dm: pass through operations on wrapped inline crypto keys Make the device-mapper layer pass through the derive_sw_secret, import_key, generate_key, and prepare_key blk-crypto operations when all underlying devices support hardware-wrapped inline crypto keys and are passing through inline crypto support. Commit ebc4176551cd ("blk-crypto: add basic hardware-wrapped key support") already made BLK_CRYPTO_KEY_TYPE_HW_WRAPPED be passed through in the same way that the other crypto capabilities are. But the wrapped key support also includes additional operations in blk_crypto_ll_ops, and the dm layer needs to implement those to pass them through. derive_sw_secret is needed by fscrypt, while the other operations are needed for the new blk-crypto ioctls to work on device-mapper devices and not just the raw partitions. Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 025e138eeb752ae19e8eb0144d9f7cc87d579b45 Author: Eric Biggers Date: Thu May 1 14:23:19 2025 -0700 blk-crypto: export wrapped key functions Export blk_crypto_derive_sw_secret(), blk_crypto_import_key(), blk_crypto_generate_key(), and blk_crypto_prepare_key() so that they can be used by device-mapper when passing through wrapped key support. Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit bcd241230fdbc6005230f80a4f8646ff5a84f15b Author: Xiaolei Wang Date: Wed Apr 30 17:20:43 2025 +0800 remoteproc: core: Release rproc->clean_table after rproc_attach() fails When rproc->state = RPROC_DETACHED is attached to remote processor through rproc_attach(), if rproc_handle_resources() returns failure, then the clean table should be released, otherwise the following memory leak will occur. unreferenced object 0xffff000086a99800 (size 1024): comm "kworker/u12:3", pid 59, jiffies 4294893670 (age 121.140s) hex dump (first 32 bytes): 00 00 00 00 00 80 00 00 00 00 00 00 00 00 10 00 ............ 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 ............ backtrace: [<000000008bbe4ca8>] slab_post_alloc_hook+0x98/0x3fc [<000000003b8a272b>] __kmem_cache_alloc_node+0x13c/0x230 [<000000007a507c51>] __kmalloc_node_track_caller+0x5c/0x260 [<0000000037818dae>] kmemdup+0x34/0x60 [<00000000610f7f57>] rproc_boot+0x35c/0x56c [<0000000065f8871a>] rproc_add+0x124/0x17c [<00000000497416ee>] imx_rproc_probe+0x4ec/0x5d4 [<000000003bcaa37d>] platform_probe+0x68/0xd8 [<00000000771577f9>] really_probe+0x110/0x27c [<00000000531fea59>] __driver_probe_device+0x78/0x12c [<0000000080036a04>] driver_probe_device+0x3c/0x118 [<000000007e0bddcb>] __device_attach_driver+0xb8/0xf8 [<000000000cf1fa33>] bus_for_each_drv+0x84/0xe4 [<000000001a53b53e>] __device_attach+0xfc/0x18c [<00000000d1a2a32c>] device_initial_probe+0x14/0x20 [<00000000d8f8b7ae>] bus_probe_device+0xb0/0xb4 unreferenced object 0xffff0000864c9690 (size 16): Fixes: 9dc9507f1880 ("remoteproc: Properly deal with the resource table when detaching") Signed-off-by: Xiaolei Wang Reviewed-by: Peng Fan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250430092043.1819308-3-xiaolei.wang@windriver.com Signed-off-by: Mathieu Poirier commit 7692c9fbedd9087dc9050903f58095915458d9b1 Author: Xiaolei Wang Date: Wed Apr 30 17:20:42 2025 +0800 remoteproc: core: Cleanup acquired resources when rproc_handle_resources() fails in rproc_attach() When rproc->state = RPROC_DETACHED and rproc_attach() is used to attach to the remote processor, if rproc_handle_resources() returns a failure, the resources allocated by imx_rproc_prepare() should be released, otherwise the following memory leak will occur. Since almost the same thing is done in imx_rproc_prepare() and rproc_resource_cleanup(), Function rproc_resource_cleanup() is able to deal with empty lists so it is better to fix the "goto" statements in rproc_attach(). replace the "unprepare_device" goto statement with "clean_up_resources" and get rid of the "unprepare_device" label. unreferenced object 0xffff0000861c5d00 (size 128): comm "kworker/u12:3", pid 59, jiffies 4294893509 (age 149.220s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 02 88 00 00 00 00 00 00 10 00 00 00 00 00 ............ backtrace: [<00000000f949fe18>] slab_post_alloc_hook+0x98/0x37c [<00000000adbfb3e7>] __kmem_cache_alloc_node+0x138/0x2e0 [<00000000521c0345>] kmalloc_trace+0x40/0x158 [<000000004e330a49>] rproc_mem_entry_init+0x60/0xf8 [<000000002815755e>] imx_rproc_prepare+0xe0/0x180 [<0000000003f61b4e>] rproc_boot+0x2ec/0x528 [<00000000e7e994ac>] rproc_add+0x124/0x17c [<0000000048594076>] imx_rproc_probe+0x4ec/0x5d4 [<00000000efc298a1>] platform_probe+0x68/0xd8 [<00000000110be6fe>] really_probe+0x110/0x27c [<00000000e245c0ae>] __driver_probe_device+0x78/0x12c [<00000000f61f6f5e>] driver_probe_device+0x3c/0x118 [<00000000a7874938>] __device_attach_driver+0xb8/0xf8 [<0000000065319e69>] bus_for_each_drv+0x84/0xe4 [<00000000db3eb243>] __device_attach+0xfc/0x18c [<0000000072e4e1a4>] device_initial_probe+0x14/0x20 Fixes: 10a3d4079eae ("remoteproc: imx_rproc: move memory parsing to rproc_ops") Suggested-by: Mathieu Poirier Signed-off-by: Xiaolei Wang Reviewed-by: Peng Fan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250430092043.1819308-2-xiaolei.wang@windriver.com Signed-off-by: Mathieu Poirier commit 2dbf6e0df447d1542f8fd158b17a06d2e8ede15e Author: Al Viro Date: Sun May 4 21:04:08 2025 -0400 kill vfs_submount() The last remaining user of vfs_submount() (tracefs) is easy to convert to fs_context_for_submount(); do that and bury that thing, along with SB_SUBMOUNT Reviewed-by: Jan Kara Acked-by: Steven Rostedt (Google) Tested-by: Steven Rostedt (Google) Signed-off-by: Al Viro commit 311ba55a5f8637d9a79035d4ea624236283c8c99 Author: Marc Zyngier Date: Fri Jan 24 17:17:42 2025 +0000 KVM: arm64: Propagate FGT masks to the nVHE hypervisor The nVHE hypervisor needs to have access to its own view of the FGT masks, which unfortunately results in a bit of data duplication. Signed-off-by: Marc Zyngier commit ea266c72496873468bd2fdfd53ac1db203330142 Author: Mark Rutland Date: Tue Nov 19 13:57:22 2024 +0000 KVM: arm64: Unconditionally configure fine-grain traps ... otherwise we can inherit the host configuration if this differs from the KVM configuration. Signed-off-by: Mark Rutland [maz: simplified a couple of things] Signed-off-by: Marc Zyngier commit 7ed43d84c17cc90e683b3901e92993864756a601 Author: Marc Zyngier Date: Fri Jan 24 16:01:47 2025 +0000 KVM: arm64: Use computed masks as sanitisers for FGT registers Now that we have computed RES0 bits, use them to sanitise the guest view of FGT registers. Signed-off-by: Marc Zyngier commit 3164899c21fd915f4ca60a215fe57a671a9699bc Author: Marc Zyngier Date: Fri Jan 24 17:09:27 2025 +0000 KVM: arm64: Add description of FGT bits leading to EC!=0x18 The current FTP tables are only concerned with the bits generating ESR_ELx.EC==0x18. However, we want an exhaustive view of what KVM really knows about. So let's add another small table that provides that extra information. Signed-off-by: Marc Zyngier commit 1b8570be89f8436b25bddc8afd7e54fcd906c3aa Author: Marc Zyngier Date: Fri Jan 24 15:51:12 2025 +0000 KVM: arm64: Compute FGT masks from KVM's own FGT tables In the process of decoupling KVM's view of the FGT bits from the wider architectural state, use KVM's own FGT tables to build a synthetic view of what is actually known. This allows for some checking along the way. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 5329358c222fec1132169ab3de9973aa4cd63aa9 Author: Marc Zyngier Date: Fri Jan 24 15:44:32 2025 +0000 KVM: arm64: Plug FEAT_GCS handling We don't seem to be handling the GCS-specific exception class. Handle it by delivering an UNDEF to the guest, and populate the relevant trap bits. Signed-off-by: Marc Zyngier commit 09be03c6b54dd8959eba6cb25051c20a475ecde9 Author: Marc Zyngier Date: Fri Jan 24 15:36:17 2025 +0000 KVM: arm64: Don't treat HCRX_EL2 as a FGT register Treating HCRX_EL2 as yet another FGT register seems excessive, and gets in a way of further improvements. It is actually simpler to just be explicit about the masking, so just to that. Signed-off-by: Marc Zyngier commit 9308d0b1d7abe36f0ee2052b0ffceb7869e83f8e Author: Marc Zyngier Date: Wed Jul 3 16:41:47 2024 +0100 KVM: arm64: Restrict ACCDATA_EL1 undef to FEAT_LS64_ACCDATA being disabled We currently unconditionally make ACCDATA_EL1 accesses UNDEF. As we are about to support it, restrict the UNDEF behaviour to cases where FEAT_LS64_ACCDATA is not exposed to the guest. Signed-off-by: Marc Zyngier commit 2e04378f1a766b9a8962004962d32e5df06a5707 Author: Marc Zyngier Date: Thu Jul 4 18:58:01 2024 +0100 KVM: arm64: Handle trapping of FEAT_LS64* instructions We generally don't expect FEAT_LS64* instructions to trap, unless they are trapped by a guest hypervisor. Otherwise, this is just the guest playing tricks on us by using an instruction that isn't advertised, which we handle with a well deserved UNDEF. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 4b4af68dd972aedc4193bd886e383c123511d275 Author: Marc Zyngier Date: Sat Apr 26 12:05:04 2025 +0100 KVM: arm64: Simplify handling of negative FGT bits check_fgt_bit() and triage_sysreg_trap() implement the same thing twice for no good reason. We have to lookup the FGT register twice, as we don't communicate it. Similarly, we extract the register value at the wrong spot. Reorganise the code in a more logical way so that things are done at the correct location, removing a lot of duplication. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 04af8a39684f471e3785261f5d2f0df265fd77b6 Author: Marc Zyngier Date: Sat Apr 26 11:42:15 2025 +0100 KVM: arm64: Tighten handling of unknown FGT groups triage_sysreg_trap() assumes that it knows all the possible values for FGT groups, which won't be the case as we start adding more FGT registers (unless we add everything in one go, which is obviously undesirable). At the same time, it doesn't offer much in terms of debugging info when things go wrong. Turn the "__NR_FGT_GROUP_IDS__" case into a default, covering any unhandled value, and give the kernel hacker a bit of a clue about what's wrong (system register and full trap descriptor). Signed-off-by: Marc Zyngier commit fbc8a4e137e5673600ec276b06ca31a46967167b Author: Marc Zyngier Date: Tue Apr 22 19:23:41 2025 +0100 arm64: Add FEAT_FGT2 capability As we will eventually have to context-switch the FEAT_FGT2 registers in KVM (something that has been completely ignored so far), add a new cap that we will be able to check for. Signed-off-by: Marc Zyngier commit 7c7d56fcebd0c029c73c41d8daba49f9787eb9c2 Author: Marc Zyngier Date: Thu Jul 4 18:45:22 2024 +0100 arm64: Add syndrome information for trapped LD64B/ST64B{,V,V0} Provide the architected EC and ISS values for all the FEAT_LS64* instructions. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 3654f454bcfdd17446544841bcac3803907122ff Author: Marc Zyngier Date: Sat Apr 26 11:17:13 2025 +0100 arm64: tools: Resync sysreg.h Perform a bulk resync of tools/arch/arm64/include/asm/sysreg.h. Signed-off-by: Marc Zyngier commit 7a11d98d6e4893e9d8b145f211ffa94ec4e6be4e Author: Marc Zyngier Date: Tue Mar 11 09:36:28 2025 +0000 arm64: Remove duplicated sysreg encodings A bunch of sysregs are now generated from the sysreg file, so no need to carry separate definitions. Signed-off-by: Marc Zyngier commit 7c9cb893ae3e06c9f38bd86d62992eae906bf2b7 Author: Marc Zyngier Date: Fri Apr 25 13:47:18 2025 +0100 arm64: sysreg: Add system instructions trapped by HFGIRT2_EL2 Add the new CMOs trapped by HFGITR2_EL2. Signed-off-by: Marc Zyngier commit dd161dc2dfcbdef19849f46745949b18f5ef54f9 Author: Marc Zyngier Date: Fri Apr 25 13:44:31 2025 +0100 arm64: sysreg: Add registers trapped by HDFG{R,W}TR2_EL2 Bulk addition of all the system registers trapped by HDFG{R,W}TR2_EL2. The descriptions are extracted from the BSD-licenced JSON file part of the 2025-03 drop from ARM. Signed-off-by: Marc Zyngier commit 0be91cfbfdcd2f37ecf238760ce74c0ad2518e19 Author: Marc Zyngier Date: Thu Apr 24 19:47:09 2025 +0100 arm64: sysreg: Add registers trapped by HFG{R,W}TR2_EL2 Bulk addition of all the system registers trapped by HFG{R,W}TR2_EL2. The descriptions are extracted from the BSD-licenced JSON file part of the 2025-03 drop from ARM. Signed-off-by: Marc Zyngier commit f062c19a9348d23a9bb7c6609ad17de3749157fd Author: Marc Zyngier Date: Tue May 6 17:27:25 2025 +0100 arm64: sysreg: Update CPACR_EL1 description Add the couple of fields introduced with FEAT_NV2p1. Signed-off-by: Marc Zyngier commit 4533a0238df75d8215e72a4f3e006418ad6fe45d Author: Marc Zyngier Date: Wed Apr 23 11:28:05 2025 +0100 arm64: sysreg: Update TRBIDR_EL1 description Add the missing MPAM field. Signed-off-by: Marc Zyngier commit 894f2841f51fdeb1a7f61c74e00c883582a5af94 Author: Marc Zyngier Date: Wed Apr 23 11:27:44 2025 +0100 arm64: sysreg: Update PMSIDR_EL1 description Add the missing SME, ALTCLK, FPF, EFT. CRR and FDS fields. Signed-off-by: Marc Zyngier commit 9d737fddc93946d87f0ef60e00f506260534b1f4 Author: Marc Zyngier Date: Wed Apr 23 11:26:42 2025 +0100 arm64: sysreg: Update ID_AA64PFR0_EL1 description Add the missing RASv2 description. Signed-off-by: Marc Zyngier commit 0f013a524b240e7d67dc94d083a0d3ab72516ea3 Author: Marc Zyngier Date: Tue Mar 11 14:44:30 2025 +0000 arm64: sysreg: Replace HFGxTR_EL2 with HFG{R,W}TR_EL2 Treating HFGRTR_EL2 and HFGWTR_EL2 identically was a mistake. It makes things hard to reason about, has the potential to introduce bugs by giving a meaning to bits that are really reserved, and is in general a bad description of the architecture. Given that #defines are cheap, let's describe both registers as intended by the architecture, and repaint all the existing uses. Yes, this is painful. The registers themselves are generated from the JSON file in an automated way. Signed-off-by: Marc Zyngier commit d0f39259eff447fb4518777c36c7dffcf8b4ef9e Author: Marc Zyngier Date: Mon Feb 3 17:27:23 2025 +0000 arm64: sysreg: Add layout for HCR_EL2 Add HCR_EL2 to the sysreg file, more or less directly generated from the JSON file. Since the generated names significantly differ from the existing naming, express the old names in terms of the new one. One day, we'll fix this mess, but I'm not in any hurry. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit eef33835bf6f297faa222f48bf941d57d2f8bda0 Author: Marc Zyngier Date: Mon Feb 10 11:35:31 2025 +0000 arm64: sysreg: Update ID_AA64MMFR4_EL1 description Resync the ID_AA64MMFR4_EL1 with the architectue description. This results in: - the new PoPS field - the new NV2P1 value for the NV_frac field - the new RMEGDI field - the new SRMASK field These fields have been generated from the reference JSON file. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit cdb7d2d68cde6145a06a56c9d5d5d917297501c6 Author: Waiman Long Date: Mon May 5 21:20:49 2025 -0700 locking/lockdep: Add number of dynamic keys to /proc/lockdep_stats There have been recent reports about running out of lockdep keys: MAX_LOCKDEP_KEYS too low! One possible reason is that too many dynamic keys have been registered. A possible culprit is the lockdep_register_key() call in qdisc_alloc() of net/sched/sch_generic.c. Currently, there is no way to find out how many dynamic keys have been registered. Add such a stat to the /proc/lockdep_stats to get better clarity. Signed-off-by: Waiman Long Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Cc: Bill Wendling Cc: Justin Stitt Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Will Deacon Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20250506042049.50060-4-boqun.feng@gmail.com commit 2030396dac5f564ec85422ceb4327fcdb0054f83 Author: Marc Zyngier Date: Thu Oct 31 08:42:11 2024 +0000 arm64: sysreg: Add ID_AA64ISAR1_EL1.LS64 encoding for FEAT_LS64WB The 2024 extensions are adding yet another variant of LS64 (aptly named FEAT_LS64WB) supporting LS64 accesses to write-back memory, as well as 32 byte single-copy atomic accesses using pairs of FP registers. Add the relevant encoding to ID_AA64ISAR1_EL1.LS64. Reviewed-by: Joey Gouly Signed-off-by: Marc Zyngier commit 6a1a219f535a437eb12a06d8cef2518e58654beb Author: Waiman Long Date: Mon May 5 21:20:48 2025 -0700 locking/lockdep: Prevent abuse of lockdep subclass To catch the code trying to use a subclass value >= MAX_LOCKDEP_SUBCLASSES (8), add a DEBUG_LOCKS_WARN_ON() statement to notify the users that such a large value is not allowed. [ boqun: Reword the commit log with a more objective tone ] Signed-off-by: Waiman Long Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Cc: Bill Wendling Cc: Justin Stitt Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Will Deacon Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20250506042049.50060-3-boqun.feng@gmail.com commit 96ca1830e1219eda431702eb9a74225e8fe3ccc0 Author: Andy Shevchenko Date: Mon May 5 21:20:47 2025 -0700 locking/lockdep: Move hlock_equal() to the respective #ifdeffery When hlock_equal() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y, CONFIG_LOCKDEP=y and CONFIG_LOCKDEP_SMALL=n: lockdep.c:2005:20: error: unused function 'hlock_equal' [-Werror,-Wunused-function] Fix this by moving the function to the respective existing ifdeffery for its the only user. See also: 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build") Fixes: 68e305678583 ("lockdep: Adjust check_redundant() for recursive read change") Signed-off-by: Andy Shevchenko Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Cc: Bill Wendling Cc: Justin Stitt Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20250506042049.50060-2-boqun.feng@gmail.com commit e551ebdc20a79258ef48ecfb342353000c1a6cdb Author: Rob Herring (Arm) Date: Mon May 5 09:48:02 2025 -0500 dt-bindings: interrupt-controller: Convert opencores,or1k-pic to DT schema Convert the OpenRISC PIC interrupt controller binding to schema format. It's a straight-forward conversion of the typical interrupt controller. Signed-off-by: Rob Herring (Arm) Signed-off-by: Stafford Horne commit af69647e995c6bf20733c596277938c4348a6c70 Author: Ann Yun Date: Sat Apr 26 20:07:26 2025 -0400 Documentation:openrisc: Add build instructions with initramfs Mention how to include initramfs when building the kernel and direct the reader to ramfs-rootfs-initramfs.rst documentation for more details Signed-off-by: Ann Yun Signed-off-by: Stafford Horne commit 35adea1d018ab1e450ea2304e58dc2f987a639d3 Author: Pavel Begunkov Date: Tue May 6 13:31:16 2025 +0100 io_uring: move io_req_put_rsrc_nodes() It'd be nice to hide details of how rsrc nodes are used by a request from rsrc.c, specifically which request fields store them, and what bits are signifying if there is a node in a request. It rather belong to generic request handling, so move the helper to io_uring.c. While doing so remove clearing of ->buf_node as it's controlled by REQ_F_BUF_NODE and doesn't require zeroing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bb73fb42baf825edb39344365aff48cdfdd4c692.1746533789.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9c2ff3f9b5e0202d1cc1f6193b1e96df203ae4a4 Author: Pavel Begunkov Date: Tue May 6 13:31:07 2025 +0100 io_uring: remove io_preinit_req() Apart from setting ->ctx, io_preinit_req() zeroes a bunch of fields of a request, from which only ->file_node is mandatory. Remove the function and zero the entire request on first allocation. With that, we also need to initialise ->ctx every time, which might be a good thing for performance as now we're likely overwriting the entire cache line, and so it can write combined and avoid RMW. Suggested-by: Jens Axboe Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ba5485dc913f1e275862ce88f5169d4ac4a33836.1746533807.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 78967aabf6138bd43798c966a75167579ce42955 Author: Pavel Begunkov Date: Tue May 6 13:30:47 2025 +0100 io_uring/timeout: don't export link t-out disarm helper [__]io_disarm_linked_timeout() are only used inside timeout.c. so confine them inside the file. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1eb200911255e643bf252a8e65fb2c787340cf18.1746533800.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a5c98e9424573649e59988199a3356a79c9e1fd9 Author: Pavel Begunkov Date: Thu May 1 13:17:18 2025 +0100 io_uring/zcrx: dmabuf backed zerocopy receive Add support for dmabuf backed zcrx areas. To use it, the user should pass IORING_ZCRX_AREA_DMABUF in the struct io_uring_zcrx_area_reg flags field and pass a dmabuf fd in the dmabuf_fd field. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/20bb1890e60a82ec945ab36370d1fd54be414ab6.1746097431.git.asml.silence@gmail.com Link: https://lore.kernel.org/io-uring/6e37db97303212bbd8955f9501cf99b579f8aece.1746547722.git.asml.silence@gmail.com [axboe: fold in fixup] Signed-off-by: Jens Axboe commit 0427e811c9bc85e660457487f1da61b1aaf63477 Author: Kairui Song Date: Thu May 1 02:10:49 2025 +0800 f2fs: drop usage of folio_index folio_index is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio->index instead. It can't be a swap cache folio here. Swap mapping may only call into fs through `swap_rw` but f2fs does not use that method for swap. Signed-off-by: Kairui Song Cc: Jaegeuk Kim (maintainer:F2FS FILE SYSTEM) Cc: Chao Yu (maintainer:F2FS FILE SYSTEM) Cc: linux-f2fs-devel@lists.sourceforge.net (open list:F2FS FILE SYSTEM) Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Reviewed-by: David Hildenbrand Signed-off-by: Jaegeuk Kim commit 0244c77fedc68eda261b4fec24b0476455e3b654 Author: Chao Yu Date: Fri Apr 25 17:50:55 2025 +0800 f2fs: support FAULT_TIMEOUT Support to inject a timeout fault into function, currently it only support to inject timeout to commit_atomic_write flow to reproduce inconsistent bug, like the bug fixed by commit f098aeba04c9 ("f2fs: fix to avoid atomicity corruption of atomic file"). By default, the new type fault will inject 1000ms timeout, and the timeout process can be interrupted by SIGKILL. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cf7cd17c97ad3808d9bd3840166b9216ccc777e1 Author: Daeho Jeong Date: Wed Apr 23 13:49:34 2025 -0700 f2fs: handle error cases of memory donation In cases of removing memory donation, we need to handle some error cases like ENOENT and EACCES (indicating the range already has been donated). Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2 Author: Chao Yu Date: Tue Apr 22 19:56:38 2025 +0800 f2fs: fix to bail out in get_new_segment() ------------[ cut here ]------------ WARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc pc : new_curseg+0x5e8/0x6dc Call trace: new_curseg+0x5e8/0x6dc f2fs_allocate_data_block+0xa54/0xe28 do_write_page+0x6c/0x194 f2fs_do_write_node_page+0x38/0x78 __write_node_page+0x248/0x6d4 f2fs_sync_node_pages+0x524/0x72c f2fs_write_checkpoint+0x4bc/0x9b0 __checkpoint_and_complete_reqs+0x80/0x244 issue_checkpoint_thread+0x8c/0xec kthread+0x114/0x1bc ret_from_fork+0x10/0x20 get_new_segment() detects inconsistent status in between free_segmap and free_secmap, let's record such error into super block, and bail out get_new_segment() instead of continue using the segment. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 617e0491abe4d8d45c5110ca474c0feb428e6828 Author: Chao Yu Date: Wed Apr 16 13:48:05 2025 +0800 f2fs: sysfs: export linear_lookup in features directory cat /sys/fs/f2fs/features/linear_lookup supported Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3fea0641b06ff4e53d95d07a96764d8951d4ced6 Author: Chao Yu Date: Tue May 6 15:47:25 2025 +0800 f2fs: sysfs: add encoding_flags entry This patch adds a new sysfs entry /sys/fs/f2fs//encoding_flags, it is a read-only entry to show the value of sb.s_encoding_flags, the value is hexadecimal. ============================ ========== Flag_Name Flag_Value ============================ ========== SB_ENC_STRICT_MODE_FL 0x00000001 SB_ENC_NO_COMPAT_FALLBACK_FL 0x00000002 ============================ ========== case#1 mkfs.f2fs -f -O casefold -C utf8:strict /dev/vda mount /dev/vda /mnt/f2fs cat /sys/fs/f2fs/vda/encoding_flags 1 case#2 mkfs.f2fs -f -O casefold -C utf8 /dev/vda fsck.f2fs --nolinear-lookup=1 /dev/vda mount /dev/vda /mnt/f2fs cat /sys/fs/f2fs/vda/encoding_flags 2 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 54c53dfdb681f65e0cc65ddb1e05d145fea5ae60 Author: Steven Rostedt Date: Mon Apr 7 15:49:12 2025 -0400 tracing: Add common_comm to histograms If one wants to trace the name of the task that wakes up a process and pass that to the synthetic events, there's nothing currently that lets the synthetic events do that. Add a "common_comm" to the histogram logic that allows histograms save the current->comm as a variable that can be passed through and added to a synthetic event: # cd /sys/kernel/tracing # echo 's:wake_lat char[] waker; char[] wakee; u64 delta;' >> dynamic_events # echo 'hist:keys=pid:comm=common_comm:ts=common_timestamp.usecs if !(common_flags & 0x18)' > events/sched/sched_waking/trigger # echo 'hist:keys=next_pid:wake_comm=$comm:delta=common_timestamp.usecs-$ts:onmatch(sched.sched_waking).trace(wake_lat,$wake_comm,next_comm,$delta)' > events/sched/sched_switch/trigger The above will create a synthetic trace event that will save both the name of the waker and the wakee but only if the wakeup did not happen in a hard or soft interrupt context. The "common_comm" is used to save the task->comm at the time of the initial event and is passed via the "comm" variable to the second event, and that is saved as the "waker" field in the "wake_lat" synthetic event. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250407154912.3c6c6246@gandalf.local.home Acked-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit 7ab0fc61ce73040f89b12d76a8279995ec283541 Author: Steven Rostedt Date: Mon Apr 7 12:38:51 2025 -0400 tracing: Move histogram trigger variables from stack to per CPU structure The histogram trigger has three somewhat large arrays on the kernel stack: unsigned long entries[HIST_STACKTRACE_DEPTH]; u64 var_ref_vals[TRACING_MAP_VARS_MAX]; char compound_key[HIST_KEY_SIZE_MAX]; Checking the function event_hist_trigger() stack frame size, it currently uses 816 bytes for its stack frame due to these variables! Instead, allocate a per CPU structure that holds these arrays for each context level (normal, softirq, irq and NMI). That is, each CPU will have 4 of these structures. This will be allocated when the first histogram trigger is enabled and freed when the last is disabled. When the histogram callback triggers, it will request this structure. The request will disable preemption, get the per CPU structure at the index of the per CPU variable, and increment that variable. The callback will use the arrays in this structure to perform its work and then release the structure. That in turn will simply decrement the per CPU index and enable preemption. Moving the variables from the kernel stack to the per CPU structure brings the stack frame of event_hist_trigger() down to just 112 bytes. Cc: Mathieu Desnoyers Cc: Tom Zanussi Link: https://lore.kernel.org/20250407123851.74ea8d58@gandalf.local.home Fixes: 067fe038e70f6 ("tracing: Add variable reference handling to hist triggers") Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 872a0d90c1297a560b0fbee219dc5ef6eda9bcb4 Author: Steven Rostedt Date: Thu Apr 3 21:06:37 2025 -0400 tracing: Always use memcpy() in histogram add_to_key() The add_to_key() function tests if the key is a string or some data. If it's a string it does some further calculations of the string size (still truncating it to the max size it can be), and calls strncpy(). If the key isn't as string it calls memcpy(). The interesting point is that both use the exact same parameters: strncpy(compound_key + key_field->offset, (char *)key, size); } else memcpy(compound_key + key_field->offset, key, size); As strncpy() is being used simply as a memcpy() for a string, and since strncpy() is deprecated, just call memcpy() for both memory and string keys. Cc: Mathieu Desnoyers Cc: Kees Cook Link: https://lore.kernel.org/20250403210637.1c477d4a@gandalf.local.home Acked-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit 3e4b37160b43a24ceda672033864c594d1f5cd8b Author: Steven Rostedt Date: Tue May 6 10:51:31 2025 -0400 tracing: Show preempt and irq events callsites from the offsets in field print When the "fields" option is set in a trace instance, it ignores the "print fmt" portion of the trace event and just prints the raw fields defined by the TP_STRUCT__entry() of the TRACE_EVENT() macro. The preempt_disable/enable and irq_disable/enable events record only the caller offset from _stext to save space in the ring buffer. Even though the "fields" option only prints the fields, it also tries to print what they represent too, which includes function names. Add a check in the output of the event field printing to see if the field name is "caller_offs" or "parent_offs" and then print the function at the offset from _stext of that field. Instead of just showing: irq_disable: caller_offs=0xba634d (12215117) parent_offs=0x39d10e2 (60625122) Show: irq_disable: caller_offs=trace_hardirqs_off.part.0+0xad/0x130 0xba634d (12215117) parent_offs=_raw_spin_lock_irqsave+0x62/0x70 0x39d10e2 (60625122) Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250506105131.4b6089a9@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit a6c0a91ccb257eaec2aee080df06863ce7601315 Author: Aditya Garg Date: Wed Apr 30 19:19:08 2025 +0530 checkpatch: remove %p4cn %p4cn was recently removed and replaced by %p4chR in vsprintf. So, remove the check for %p4cn from checkpatch.pl. Fixes: 37eed892cc5f ("vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering") Signed-off-by: Aditya Garg Reviewed-by: Petr Mladek Tested-by: Petr Mladek Link: https://lore.kernel.org/r/PN3PR01MB959760B89BF7E4B43852700CB8832@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Alyssa Rosenzweig commit dc6a49d4cd2629859649883a84d6ee5a741ed03a Author: Steven Rostedt Date: Tue Mar 25 18:56:19 2025 -0400 tracing: Adjust addresses for printing out fields Add adjustments to the values of the "fields" output if the buffer is a persistent ring buffer to adjust the addresses to both the kernel core and kernel modules if they match a module in the persistent memory and that module is also loaded. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Mark Rutland Cc: Andrew Morton Link: https://lore.kernel.org/20250325185619.54b85587@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 00d872dd541cdf22230510201a1baf58f0147db9 Author: Steven Rostedt Date: Tue May 6 10:23:00 2025 -0400 tracing: Only return an adjusted address if it matches the kernel address The trace_adjust_address() will take a given address and examine the persistent ring buffer to see if the address matches a module that is listed there. If it does not, it will just adjust the value to the core kernel delta. But if the address was for something that was not part of the core kernel text or data it should not be adjusted. Check the result of the adjustment and only return the adjustment if it lands in the current kernel text or data. If not, return the original address. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250506102300.0ba2f9e0@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 531ee10b430eed70df360932086a2587d39b2bdf Author: Steven Rostedt Date: Tue Mar 25 17:38:47 2025 -0400 tracing: Show function names when possible when listing fields When the "fields" option is enabled, the "print fmt" of the trace event is ignored and only the fields are printed. But some fields contain function pointers. Instead of just showing the hex value in this case, show the function name when possible: Instead of having: # echo 1 > options/fields # cat trace [..] kmem_cache_free: call_site=0xffffffffa9afcf31 (-1448095951) ptr=0xffff888124452910 (-131386736039664) name=kmemleak_object Have it output: kmem_cache_free: call_site=rcu_do_batch+0x3d1/0x14a0 (-1768960207) ptr=0xffff888132ea5ed0 (854220496) name=kmemleak_object Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250325213919.624181915@goodmis.org Signed-off-by: Steven Rostedt (Google) commit e3223e1e9a9f7912763e314c9e8a8320c842be72 Author: Steven Rostedt Date: Tue May 6 11:16:48 2025 -0400 tracing: Update function trace addresses with module addresses Now that module addresses are saved in the persistent ring buffer, their addresses can be used to adjust the address in the persistent ring buffer to the address of the module that is currently loaded. Instead of blindly using the text_delta that only works for core kernel code, call the trace_adjust_address() that will see if the address matches an address saved in the persistent ring buffer, and then uses that against the matching module if it is loaded. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250506111648.5df7f3ec@gandalf.local.home Signed-off-by: Steven Rostedt (Google) commit 85cf5c63d32f39874d0dc1cd6c12b40e1ba8370e Author: Thomas Gleixner Date: Tue May 6 15:17:46 2025 +0200 irqchip/econet-en751221: Switch to irq_domain_create_linear() irq_domain_add_linear() is about to be removed. Switch to irq_domain_create_linear(). Signed-off-by: Thomas Gleixner Tested-by: Caleb James DeLisle Link: https://lore.kernel.org/all/877c2top39.ffs@tglx commit 9f7cd1bcb6363368abc954ff4e727b579813c697 Author: Han Xu Date: Mon Apr 28 18:06:47 2025 +0800 spi: nxp-fspi: use devm instead of remove for driver detach fspi driver use devm APIs to manage clk/irq/resources and register the spi controller, but the legacy remove function will be called first during device detach and trigger kernel panic. Drop the remove function and use devm_add_action_or_reset() for driver cleanup to ensure the release sequence. Signed-off-by: Han Xu Signed-off-by: Haibo Chen Link: https://patch.msgid.link/20250428-flexspipatch-v3-5-61d5e8f591bc@nxp.com Signed-off-by: Mark Brown commit e0558eb74c6e082b60e03981eb7cbf0fc3780ef4 Author: Haibo Chen Date: Mon Apr 28 18:06:46 2025 +0800 spi: spi-nxp-fspi: remove the unchecked return value for nxp_fspi_clk_disable_unprep For nxp_fspi_clk_disable_unprep(), no caller check the return value, so remove the unchecked return value. Signed-off-by: Haibo Chen Link: https://patch.msgid.link/20250428-flexspipatch-v3-4-61d5e8f591bc@nxp.com Signed-off-by: Mark Brown commit 93be516f819dcb1fdac035566381d8899d4b389c Author: Haibo Chen Date: Mon Apr 28 18:06:45 2025 +0800 spi: spi-nxp-fspi: use guard(mutex) to simplify the code Use guard(mutex) to simplify the code logic. Signed-off-by: Haibo Chen Link: https://patch.msgid.link/20250428-flexspipatch-v3-3-61d5e8f591bc@nxp.com Signed-off-by: Mark Brown commit 97be4b919a609fc8c4bd1118502b5d26cc2f77c4 Author: Haibo Chen Date: Mon Apr 28 18:06:44 2025 +0800 spi: spi-nxp-fspi: enable runtime pm for fspi Enable the runtime PM in fspi driver. Also for system PM, On some board like i.MX8ULP-EVK board, after system suspend, IOMUX module will lost power, so all the pinctrl setting will lost when system resume back, need driver to save/restore the pinctrl setting. Signed-off-by: Han Xu Signed-off-by: Haibo Chen Link: https://patch.msgid.link/20250428-flexspipatch-v3-2-61d5e8f591bc@nxp.com Signed-off-by: Mark Brown commit 48900813abd2730a35c6e3afd1609bafac5271cc Author: Haibo Chen Date: Mon Apr 28 18:06:43 2025 +0800 spi: spi-nxp-fspi: remove the goto in probe Remove all the goto in probe to simplify the driver. Signed-off-by: Haibo Chen Link: https://patch.msgid.link/20250428-flexspipatch-v3-1-61d5e8f591bc@nxp.com Signed-off-by: Mark Brown commit 99ad153fbd22fcf7c2bdd774d08fc4bf70029fa6 Author: Alexey Charkov Date: Tue May 6 16:46:18 2025 +0400 irqchip/irq-vt8500: Use fewer global variables and add error handling Controller private data doesn't really need to be in a global statically allocated array - kzalloc it per controller instead, keeping only one pointer to the primary controller global. While at that, also add proper error return statuses in the init path and respective cleanup of resources on errors. Signed-off-by: Alexey Charkov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-5-a3a0606cf92d@gmail.com commit 49f92d3859cdd8534a1cd15037f950c483a5de40 Author: Alexey Charkov Date: Tue May 6 16:46:17 2025 +0400 irqchip/irq-vt8500: Use a dedicated chained handler function Current code for the chained interrupt controller maps its interrupts on the parent but doesn't register a separate chained handler, instead needlessly calling enable_irq() on an unactivated parent interrupt, causing a boot time WARN_ON from the common code. The common handler meanwhile loops through all registered interrupt controllers in an arbitrary order and tries to handle active interrupts in each of them, which is fragile. Use common infrastructure for handling chained interrupts instead. Signed-off-by: Alexey Charkov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-4-a3a0606cf92d@gmail.com commit 54a1f3eb89ded8114b0bffc3696757cd95665ef9 Author: Alexey Charkov Date: Tue May 6 16:46:16 2025 +0400 irqchip/irq-vt8500: Don't require 8 interrupts from a chained controller VT8500 chained controller can route its interrupts to either or all of its 8 interrupt outputs. Current code actually routes all of them to the first output, so there is no need to create mappings for all eight. Drop redundant checks, and only map as many chained controller interrupts as are defined in the device tree. Signed-off-by: Alexey Charkov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-3-a3a0606cf92d@gmail.com commit 45453df7f69b0157a14478f635c99216821faeee Author: Alexey Charkov Date: Tue May 6 16:46:15 2025 +0400 irqchip/irq-vt8500: Drop redundant copy of the device node pointer Inside vt8500_irq_init(), np is the same as node. Drop it. Signed-off-by: Alexey Charkov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-2-a3a0606cf92d@gmail.com commit 22111fdf11666e4ff2bb80481a874a6b958323f2 Author: Alexey Charkov Date: Tue May 6 16:46:14 2025 +0400 irqchip/irq-vt8500: Split up ack/mask functions vt8500_irq_mask() really does the ACK for edge triggered interrupts and the MASK for level triggered interrupts. Edge triggered interrupts never really are masked as a result, and there is unnecessary reading of the status register before the ACK even though it's write-one-to-clear. Split it up into a proper standalone vt8500_irq_ack() and an unconditional vt8500_irq_mask(). No Fixes tag added, as it has survived this way for 15 years and nobody complained, so apparently nothing really used edge triggered interrupts anyway. [ tglx: Tabularize the irqchip struct initializer ] Signed-off-by: Alexey Charkov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-1-a3a0606cf92d@gmail.com commit b841c1d84ad7d4da55d8861ad0e63cec26ddd97d Author: Mario Limonciello Date: Mon Apr 14 15:35:51 2025 -0500 pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and `CONFIG_PM_SLEEP` so the functions that use it need the same scope. Adjust checks to look for both, and while updating make it CONFIG_SUSPEND instead as that's what the ACPI header uses. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/ Signed-off-by: Mario Limonciello Acked-by: Linus Walleij Link: https://patch.msgid.link/20250414203551.779320-1-superm1@kernel.org [ rjw: Add missing #ifdef/#endif block ] Signed-off-by: Rafael J. Wysocki commit ad6d689e776478113aeef7bfb0e4222b1ff2a986 Author: Vijendar Mukunda Date: Tue May 6 17:37:24 2025 +0530 ASoC: amd: sof_amd_sdw: add logic to get cpu_pin_id for ACP7.0/ACP7.1 platforms Add logic to get cpu_pin_id for creating SoundWire dai link for ACP7.0/ACP7.1 platforms. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20250506120823.3621604-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 6b83ba4bc3ecb915476d688c9f00f3be57b49a0c Author: Vijendar Mukunda Date: Tue May 6 17:37:23 2025 +0530 ASoC: amd: sof_amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks() Initialize current_be_id to 0 in SOF based AMD generic SoundWire machine driver to handle the unlikely case when there are no devices connected to a DAI. In this case create_sdw_dailink() would return without touching the passed pointer to current_be_id. Found by gcc -fanalyzer Cc: stable@vger.kernel.org Fixes: 6d8348ddc56ed ("ASoC: amd: acp: refactor SoundWire machine driver code") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20250506120823.3621604-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 4d87ae7508cb7ff58fd0bcecc6e9491f42f987f8 Author: Vijendar Mukunda Date: Tue May 6 17:37:22 2025 +0530 ASoC: amd: amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks() Initialize current_be_id to 0 in AMD legacy stack(NO DSP enabled) SoundWire generic machine driver code to handle the unlikely case when there are no devices connected to a DAI. In this case create_sdw_dailink() would return without touching the passed pointer to current_be_id. Found by gcc -fanalyzer Cc: stable@vger.kernel.org Fixes: 2981d9b0789c4 ("ASoC: amd: acp: add soundwire machine driver for legacy stack") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20250506120823.3621604-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 08095e20995ad6e3648af7416c90163627fe7e44 Author: Naveen Manohar Date: Tue May 6 09:49:30 2025 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: Sort ACPI link/machine tables Check subset of link mask when matching the machine driver, rule is superset match should be ordered before subset matches. Priority: mockup > most links > most bit link-mask > alphabetical Reorder acpi_link_adr & sdw_machine tables per defined criteria: 1.Mock Test 1st 2.Most links 1st 3.link_mask with more bit first 4.link_number number order 5.Alphabetical order Signed-off-by: Naveen Manohar Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250506014930.5408-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 5bf5bdfd007e07f2ec5b3e07aa02616f4eebef67 Author: Peng Fan Date: Tue May 6 15:29:39 2025 +0800 ASoC: codec: cs42l52: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value_cansleep to configure output value. Checking the current driver using legacy GPIO API, the reset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, the device remains in Power-down state until RESET pin is brought high. Since the driver has been here for quite long time and no complain on the reset flow, still follow original flow when using GPIOD descriptors. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. And the binding use reset-gpio as example, not same as driver using "cirrus,reset-gpio", and there is no in-tree DTS has the device, so all should be fine with this patch. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-9-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 772c036befb875c904731fb309fb9d2e065ba3f8 Author: Peng Fan Date: Tue May 6 15:29:38 2025 +0800 ASoC: codec: cs42l52: Drop cs42l52.h There is no in-tree user of "include/sound/cs42l52.h", so move 'struct cs42l52_platform_data ' to cs42l52.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l52.h to prepare using GPIOD API. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-8-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 2d703321b856acdb6589d74906e19aa5cb328d4e Author: Peng Fan Date: Tue May 6 15:29:37 2025 +0800 ASoC: codec: cs42l52: Sort headers alphabetically Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-7-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit b6118100382c9e4c8ca623b3a8e8bf1a09c42aa5 Author: Peng Fan Date: Tue May 6 15:29:36 2025 +0800 ASoC: codec: cs42l73: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value_cansleep to configure output value. Checking the current driver using legacy GPIO API, the reset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, Hold RESET LOW (active) until all the power supply rails have risen to greater than or equal to the minimum recommended operating voltages. Since the driver has been here for quite long time and no complain on the reset flow, still follow original flow when using GPIOD descriptors. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. There is no in-tree DTS has the device, so all should be fine. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-6-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 43ef0dccbc2528924c4b03a902fa39502faabb16 Author: Peng Fan Date: Tue May 6 15:29:35 2025 +0800 ASoC: codec: cs42l73: Drop cs42l73.h There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l73_platform_data ' to cs42l73.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l73.h to prepare using GPIOD API. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-5-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit f3e7298848f0e6c09e4da5fd80bca7cd0c58ccc1 Author: Peng Fan Date: Tue May 6 15:29:34 2025 +0800 ASoC: codec: cs42l73: Sort headers alphabetically Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-4-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 0bb92e4736a9dd43e3215b378db5ac63075a3cc1 Author: Peng Fan Date: Tue May 6 15:29:33 2025 +0800 ASoC: codec: cs42l56: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value_cansleep to configure output value. Checking the current driver using legacy GPIO API, the nreset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, nreset is should be held low after power on, when nreset is high, it starts to work. Since the driver has been here for quite long time and no complain on the nreset flow, still follow original flow when using GPIOD descriptors. Commit 944004eb56dc ("gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codec") added quirks, so the gpio request API will work as before. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. There is no in-tree DTS has the device, so all should be fine. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-3-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 86f6e4791c40c33891299d95c055e5d06d396284 Author: Peng Fan Date: Tue May 6 15:29:32 2025 +0800 ASoC: codec: cs42l56: Drop cs42l56.h There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l56_platform_data' to cs42l56.c and remove the header file. And platform data is mostly for platforms that create devices non using device tree. CS42L56 is a discontinued product, there is less possibility that new users will use legacy method to create devices. So drop cs42l56.h to prepare using GPIOD API. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-2-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 4060ebdd5063eed98a8f81f78f1e67ffc4ff0942 Author: Peng Fan Date: Tue May 6 15:29:31 2025 +0800 ASoC: codec: cs42l56: Sort headers alphabetically Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250506-csl42x-v3-1-e9496db544c4@nxp.com Signed-off-by: Mark Brown commit 7b400c9ab879a86aa4b9bf5d9fdd3df558eed9b5 Author: Bard Liao Date: Tue May 6 19:33:10 2025 +0800 ASoC: SOF: add disable_function_topology module parameter User can disable the loading function topology feature. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250506113311.45487-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 92b5f92d1128e108c583d63fab114601ce04eced Author: Bard Liao Date: Tue May 6 19:33:09 2025 +0800 ASoC: SOF: set disable_function_topology if override_tplg_filename is set User will expect the specified topology is used when override_tplg_filename is set. However, the using function topologies feature may use the function topologies instead of the specified topology. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250506113311.45487-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit e48a906af6b3cfd09c50af14a8ea7a5cf45b39ab Author: Bard Liao Date: Tue May 6 19:33:08 2025 +0800 ASoC: SOF: add disable_function_topology flag SOF driver will load required function topologies dynamically. However, we prefer using the monolithic topology. Add a flag to allow user not using the function topologies. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250506113311.45487-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 38e8397dde6338c76593ddb17ccf3118fc3f5203 Author: Keith Busch Date: Tue May 6 17:47:32 2025 +0530 nvme: use fdp streams if write stream is provided Maps a user requested write stream to an FDP placement ID if possible. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-12-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 30b5f20bb2ddab013035399e5c7e6577da49320a Author: Keith Busch Date: Tue May 6 17:47:31 2025 +0530 nvme: register fdp parameters with the block layer Register the device data placement limits if supported. This is just registering the limits with the block layer. Nothing beyond reporting these attributes is happening in this patch. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-11-joshi.k@samsung.com Signed-off-by: Jens Axboe commit ee203d3d86113559b77b1723e0d10909ebbd66ad Author: Christoph Hellwig Date: Tue May 6 17:47:30 2025 +0530 nvme: add FDP definitions Add the config feature result, config log page, and management receive commands needed for FDP. Partially based on a patch from Kanchan Joshi . Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-10-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 7a044d34b1e21fc4e04d4e48dae1dc3795621570 Author: Christoph Hellwig Date: Tue May 6 17:47:29 2025 +0530 nvme: pass a void pointer to nvme_get/set_features for the result That allows passing in structures instead of the u32 result, and thus reduce the amount of bit shifting and masking required to parse the result. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-9-joshi.k@samsung.com Signed-off-by: Jens Axboe commit d4f8359eaecf0f8b0a9f631e6652b60ae61f3016 Author: Christoph Hellwig Date: Tue May 6 17:47:28 2025 +0530 nvme: add a nvme_get_log_lsi helper For log pages that need to pass in a LSI value, while at the same time not touching all the existing nvme_get_log callers. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-8-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 02040353f4fedb823f011f27962325f328d0689f Author: Keith Busch Date: Tue May 6 17:47:27 2025 +0530 io_uring: enable per-io write streams Allow userspace to pass a per-I/O write stream in the SQE: __u8 write_stream; The __u8 type matches the size the filesystems and block layer support. Application can query the supported values from the block devices max_write_streams sysfs attribute. Unsupported values are ignored by file operations that do not support write streams or rejected with an error by those that support them. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-7-joshi.k@samsung.com Signed-off-by: Jens Axboe commit c27683da6406031d47a65b344d04a40736490d95 Author: Christoph Hellwig Date: Tue May 6 17:47:26 2025 +0530 block: expose write streams for block device nodes Use the per-kiocb write stream if provided, or map temperature hints to write streams (which is a bit questionable, but this shows how it is done). Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig [kbusch: removed statx reporting] Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-6-joshi.k@samsung.com Signed-off-by: Jens Axboe commit c23acfac10786ac5062a0615e23e68b913ac8da0 Author: Christoph Hellwig Date: Tue May 6 17:47:25 2025 +0530 block: introduce a write_stream_granularity queue limit Export the granularity that write streams should be discarded with, as it is essential for making good use of them. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-5-joshi.k@samsung.com Signed-off-by: Jens Axboe commit d2f526ba27d29c442542f7c5df0a86ef0b576716 Author: Keith Busch Date: Tue May 6 17:47:24 2025 +0530 block: introduce max_write_streams queue limit Drivers with hardware that support write streams need a way to export how many are available so applications can generically query this. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Keith Busch [hch: renamed hints to streams, removed stacking] Signed-off-by: Christoph Hellwig Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-4-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 5006f85ea23ea0bda9a8e31fdda126f4fca48f20 Author: Christoph Hellwig Date: Tue May 6 17:47:23 2025 +0530 block: add a bi_write_stream field Add the ability to pass a write stream for placement control in the bio. The new field fits in an existing hole, so does not change the size of the struct. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-3-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 732f25a2895a8c1c54fb56544f0b1e23770ef4d7 Author: Christoph Hellwig Date: Tue May 6 17:47:22 2025 +0530 fs: add a write stream field to the kiocb Prepare for io_uring passthrough of write streams. The write stream field in the kiocb structure fits into an existing 2-byte hole, so its size is not changed. Reviewed-by: Hannes Reinecke Reviewed-by: Nitesh Shetty Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20250506121732.8211-2-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 3bb6e35632fed829a36c68385811217a9e8072a8 Author: Johannes Thumshirn Date: Tue May 6 13:27:30 2025 +0200 block: only update request sector if needed In case of a ZONE APPEND write, regardless of native ZONE APPEND or the emulation layer in the zone write plugging code, the sector the data got written to by the device needs to be updated in the bio. At the moment, this is done for every native ZONE APPEND write and every request that is flagged with 'BIO_ZONE_WRITE_PLUGGING'. But thus superfluously updates the sector for regular writes to a zoned block device. Check if a bio is a native ZONE APPEND write or if the bio is flagged as 'BIO_EMULATES_ZONE_APPEND', meaning the block layer's zone write plugging code handles the ZONE APPEND and translates it into a regular write and back. Only if one of these two criterion is met, update the sector in the bio upon completion. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/dea089581cb6b777c1cd1500b38ac0b61df4b2d1.1746530748.git.jth@kernel.org Signed-off-by: Jens Axboe commit 78c271344b6f64ce24c845e54903e09928cf2061 Author: Ming Lei Date: Mon May 5 22:18:03 2025 +0800 block: move wbt_enable_default() out of queue freezing from sched ->exit() scheduler's ->exit() is called with queue frozen and elevator lock is held, and wbt_enable_default() can't be called with queue frozen, otherwise the following lockdep warning is triggered: #6 (&q->rq_qos_mutex){+.+.}-{4:4}: #5 (&eq->sysfs_lock){+.+.}-{4:4}: #4 (&q->elevator_lock){+.+.}-{4:4}: #3 (&q->q_usage_counter(io)#3){++++}-{0:0}: #2 (fs_reclaim){+.+.}-{0:0}: #1 (&sb->s_type->i_mutex_key#3){+.+.}-{4:4}: #0 (&q->debugfs_mutex){+.+.}-{4:4}: Fix the issue by moving wbt_enable_default() out of bfq's exit(), and call it from elevator_change_done(). Meantime add disk->rqos_state_mutex for covering wbt state change, which matches the purpose more than ->elevator_lock. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-26-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7ed7fa561c357d1ff0d5938446662b2ea4b26bb3 Author: Ming Lei Date: Mon May 5 22:18:02 2025 +0800 block: move hctx cpuhp add/del out of queue freezing Move hctx cpuhp add/del out of queue freezing for not connecting freeze lock with cpuhp locks, then lockdep warning can be avoided. This way is safe because both needn't queue to be frozen and scheduler switch isn't allowed, with same reason for moving hctx debugfs/sysfs register out of queue freeze. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-25-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 0a47d2b433ad275236d625b9f09c6d3672329712 Author: Ming Lei Date: Mon May 5 22:18:01 2025 +0800 block: don't acquire ->elevator_lock in blk_mq_map_swqueue and blk_mq_realloc_hw_ctxs Both blk_mq_map_swqueue() and blk_mq_realloc_hw_ctxs() are called before the request queue is added to tagset list, so the two won't run concurrently with blk_mq_update_nr_hw_queues(). When the two functions are only called from queue initialization or blk_mq_update_nr_hw_queues(), elevator switch can't happen. So remove ->elevator_lock uses from the two functions. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-24-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 9dc7a882ce96482bfff3dba51dadcbe68daeac6c Author: Ming Lei Date: Mon May 5 22:18:00 2025 +0800 block: move hctx debugfs/sysfs registering out of freezing queue Move hctx debugfs/sysfs register out of freezing queue in __blk_mq_update_nr_hw_queues(), so that the following lockdep dependency can be killed: #2 (&q->q_usage_counter(io)#16){++++}-{0:0}: #1 (fs_reclaim){+.+.}-{0:0}: #0 (&sb->s_type->i_mutex_key#3){+.+.}-{4:4}: //debugfs And registering/un-registering hctx debugfs/sysfs does not require queue to be frozen: - hctx sysfs attributes show() are drained when removing kobject, and there isn't store() implementation for hctx sysfs attributes - debugfs entry read() is drained too when removing debugfs directory, and there isn't write() implementation for hctx debugfs too - so it is safe to register/unregister hctx sysfs/debugfs without freezing queue because the cod paths changes nothing, and we just need to keep hctx live Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-23-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 559dc11143eb468b2099b403d3a8d5c7fce32b96 Author: Ming Lei Date: Mon May 5 22:17:59 2025 +0800 block: move elv_register[unregister]_queue out of elevator_lock Move elv_register[unregister]_queue out of ->elevator_lock & queue freezing, so we can kill many lockdep warnings. elv_register[unregister]_queue() is serialized, and just dealing with sysfs/ debugfs things, no need to be done with queue frozen: - when it is called from adding disk, elevator switch isn't possible because ->queue_kobj isn't added yet - when it is called from deleting disk, disable_elv_switch() is responsible for preventing new elevator switch and draining old elevator switch. - when it is called from blk_mq_update_nr_hw_queues(), adding/removing disk and elevator switch can't be allowed or in-progress With this change, elevator's ->exit() is called before calling elv_unregister_queue, then user may call into ->show()/store() of elevator's sysfs attributes, and we have covered this issue by adding `ELEVATOR_FLAG_DYNG`. For blk-mq debugfs, hctx->sched_tags is always checked with ->elevator_lock by debugfs code, meantime hctx->sched_tags is updated with ->elevator_lock, so there isn't such issue. Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-22-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 21eed794ab4bd1a6c82a55df4416d18fb4d21da9 Author: Ming Lei Date: Mon May 5 22:17:58 2025 +0800 block: add new helper for disabling elevator switch when deleting disk Add new helper disable_elv_switch() and new flag QUEUE_FLAG_NO_ELV_SWITCH for disabling elevator switch before deleting disk: - originally flag QUEUE_FLAG_REGISTERED is added for preventing elevator switch during removing disk, but this flag has been used widely for other purposes, so add one new flag for disabling elevator switch only - for avoiding deadlock risk, we have to move elevator queue register/unregister out of elevator lock and queue freeze, which will be done in next patch. However, this way adds small race window between elevator switch and deleting ->queue_kobj, in which elevator queue register/unregister could be run concurrently. The added helper will be used for avoiding the race in the following patch. - drain in-progress elevator switch before deleting disk Suggested-by: Nilay Shroff Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Nilay Shroff Link: https://lore.kernel.org/r/20250505141805.2751237-21-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 5c3d858cdc57196e6d438e5ad47a732216e81a9c Author: Ming Lei Date: Mon May 5 22:17:57 2025 +0800 block: fail to show/store elevator sysfs attribute if elevator is dying Prepare for moving elv_register[unregister]_queue out of elevator_lock & queue freezing, so we may have to call elv_unregister_queue() after elevator ->exit() is called, then there is small window for user to call into ->show()/store(), and user-after-free can be caused. Fail to show/store elevator sysfs attribute if elevator is dying by adding one new flag of ELEVATOR_FLAG_DYNG, which is protected by elevator ->sysfs_lock. Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20250505141805.2751237-20-ming.lei@redhat.com Signed-off-by: Jens Axboe commit e25ee50dfab9fce77d2e0d89d2413b6c68015f97 Author: Ming Lei Date: Mon May 5 22:17:56 2025 +0800 block: remove elevator queue's type check in elv_attr_show/store() elevatore queue's type is assigned since its allocation, and never get cleared until it is released. So its ->type is always not NULL, remove the unnecessary check. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-19-ming.lei@redhat.com Signed-off-by: Jens Axboe commit a3dc6279c2d5e2653b198684eb8857f414b6768f Author: Ming Lei Date: Mon May 5 22:17:55 2025 +0800 block: pass elevator_queue to elv_register_queue & unregister_queue Pass elevator_queue reference to elv_register_queue() & elv_unregister_queue(). No functional change, and prepare for moving the two out of elevator lock & freezing queue, when we need to store the old & new elevator queue in `struct elv_change_ctx` instance, then both two can co-exist for short while, so we have to pass the exact elevator_queue instance to elv_register_queue & unregister_queue. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-18-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1e44bedbc921a35cb847991953814a50f738bcf3 Author: Ming Lei Date: Mon May 5 22:17:54 2025 +0800 block: unifying elevator change Elevator change is one well-define behavior: - tear down current elevator if it exists - setup new elevator It is supposed to cover any case for changing elevator by single internal API, typically the following cases: - setup default elevator in add_disk() - switch to none in del_disk() - reset elevator in blk_mq_update_nr_hw_queues() - switch elevator in sysfs `store` elevator attribute This patch uses elevator_change() to cover all above cases: - every elevator switch is serialized with each other: add_disk/del_disk/ store elevator is serialized already, blk_mq_update_nr_hw_queues() uses srcu for syncing with the other three cases - for both add_disk()/del_disk(), queue freeze works at atomic mode or has been froze, so the freeze in elevator_change() won't add extra delay - `struct elev_change_ctx` instance holds any info for changing elevator Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-17-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1e9db5c42730e9ffd32cb922775de4873ec1d8ee Author: Ming Lei Date: Mon May 5 22:17:53 2025 +0800 block: add `struct elv_change_ctx` for unifying elevator change Add `struct elv_change_ctx` and prepare for unifying elevator change by elevator_change(). With this way, any input & output parameter can be provided & observed in top helper. This way helps to move kobject add/delete & debugfs register/unregister out of ->elevator_lock & freezing queue. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-16-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 20117b5a4b9c6dbb9414f0451111c3f13a37874a Author: Ming Lei Date: Mon May 5 22:17:52 2025 +0800 block: move queue freezing & elevator_lock into elevator_change() Move queue freezing & elevator_lock into elevator_change(), and prepare for using elevator_change() for setting up & tearing down default elevator too. Also add lockdep_assert_held() in __elevator_change() because either read or write lock is required for changing elevator. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-15-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 596dce110b7d543db727e6957ae7adf35beb0633 Author: Ming Lei Date: Mon May 5 22:17:51 2025 +0800 block: simplify elevator reattachment for updating nr_hw_queues In blk_mq_update_nr_hw_queues(), nr_hw_queues changes and elevator data depends on it, and elevator has to be reattached, so call elevator_switch() to force attachment. Add elv_update_nr_hw_queues() simply for blk_mq_update_nr_hw_queues() to reattach elevator, since elevator switch isn't likely when running blk_mq_update_nr_hw_queues(). This way removes the current switch none and switch back code. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-14-ming.lei@redhat.com Signed-off-by: Jens Axboe commit ac55b71a31a7287342e622c6f4de201e54b1c195 Author: Ming Lei Date: Mon May 5 22:17:50 2025 +0800 block: move blk_queue_registered() check into elv_iosched_store() Move blk_queue_registered() check into elv_iosched_store() and prepare for using elevator_change() for covering any kind of elevator change in adding/deleting disk and updating nr_hw_queue. Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-13-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1bb7fba0e262e71f9355dc46c10b9da3c92f3d2b Author: Christoph Hellwig Date: Mon May 5 22:17:49 2025 +0800 block: fold elevator_disable into elevator_switch This removes duplicate code, and keeps the callers tidy. Reviewed-by: Nilay Shroff Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-12-ming.lei@redhat.com Signed-off-by: Jens Axboe commit a11abb98388e23188f3915780f3a193fdc1e4ff0 Author: Christoph Hellwig Date: Mon May 5 22:17:48 2025 +0800 block: look up the elevator type in elevator_switch That makes the function nicely self-contained and can be used to avoid code duplication. Reviewed-by: Nilay Shroff Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-11-ming.lei@redhat.com Signed-off-by: Jens Axboe commit b126d9d7475e3a35155f31418e54d9221b971ca1 Author: Ming Lei Date: Mon May 5 22:17:47 2025 +0800 block: don't allow to switch elevator if updating nr_hw_queues is in-progress Elevator switch code is another `nr_hw_queue` reader in non-fast-IO code path, so it can't be done if updating `nr_hw_queues` is in-progress. Take same approach with not allowing add/del disk when updating nr_hw_queues is in-progress, by grabbing read lock of set->update_nr_hwq_sema. Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/linux-block/aAWv3NPtNIKKvJZc@fedora/ [1] Reported-by: Shinichiro Kawasaki Closes: https://lore.kernel.org/linux-block/mz4t4tlwiqjijw3zvqnjb7ovvvaegkqganegmmlc567tt5xj67@xal5ro544cnc/ Signed-off-by: Ming Lei Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-10-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 98e68f67020ce30e1a4d8e2d05d85a453738dfb8 Author: Ming Lei Date: Mon May 5 22:17:46 2025 +0800 block: prevent adding/deleting disk during updating nr_hw_queues Both adding/deleting disk code are reader of `nr_hw_queues`, so we can't allow them in-progress when updating nr_hw_queues, kernel panic and kasan has been reported in [1]. Prevent adding/deleting disk during updating nr_hw_queues by adding rw_semaphore to tagset, write lock is grabbed in blk_mq_update_nr_hw_queues(), and read lock is acquired when adding/deleting disk. Also mark GFP_NOIO allocation scope for adding/deleting disk because blk_mq_update_nr_hw_queues() is part of some driver's error handler. This way avoids lot of trouble. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Suggested-by: Nilay Shroff Reported-by: Nilay Shroff Closes: https://lore.kernel.org/linux-block/a5896cdb-a59a-4a37-9f99-20522f5d2987@linux.ibm.com/ Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-9-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 5fad1490ef510e3b70ad8b0a5a1e28a26638a95f Author: Ming Lei Date: Mon May 5 22:17:45 2025 +0800 block: add helper add_disk_final() Add helper add_disk_final() for scanning partitions, announcing disk and handling the last thing for adding disk. No functional change, and prepare for prevent adding disk from happening when updating nr_hw_queues. Signed-off-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250505141805.2751237-8-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 92c22d7efcdf92412ff70eb175d424d9c24ac07f Author: Ming Lei Date: Mon May 5 22:17:44 2025 +0800 block: move sched debugfs register into elvevator_register_queue sched debugfs shares same lifetime with scheduler's kobject, and same lock(elevator lock), so move sched debugfs register/unregister into elevator_register_queue() and elevator_unregister_queue(). Then we needn't blk_mq_debugfs_register() for us to register sched debugfs any more. Reviewed-by: Yu Kuai Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-7-ming.lei@redhat.com Signed-off-by: Jens Axboe commit ed3896acdcf038888a80a02dd264099e35f76b47 Author: Ming Lei Date: Mon May 5 22:17:43 2025 +0800 block: add two helpers for registering/un-registering sched debugfs Add blk_mq_sched_reg_debugfs()/blk_mq_sched_unreg_debugfs() to clean up sched init/exit code a bit. Register & unregister debugfs for sched & sched_hctx order is changed a bit, but it is safe because sched & sched_hctx is guaranteed to be ready when exporting via debugfs. Reviewed-by: Yu Kuai Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-6-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 94209d27d14104ed828ca88cd5403a99162fe51a Author: Ming Lei Date: Mon May 5 22:17:42 2025 +0800 block: use q->elevator with ->elevator_lock held in elv_iosched_show() Use q->elevator with ->elevator_lock held in elv_iosched_show(), since the local cached elevator reference may become stale after getting ->elevator_lock. Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-5-ming.lei@redhat.com Signed-off-by: Jens Axboe commit f8e111c859b92ee909f1676f90c791e7165d3860 Author: Ming Lei Date: Mon May 5 22:17:41 2025 +0800 block: don't call freeze queue in elevator_switch() and elevator_disable() Both elevator_switch() and elevator_disable() are only called from the two code paths, in which queue is guaranteed to be frozen. So don't call freeze queue in the two functions, also add asserts for queue freeze. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Nilay Shroff Signed-off-by: Ming Lei Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20250505141805.2751237-4-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 56dee46ff47f0ef9944dddd1fd137c94b7c2d9de Author: Ming Lei Date: Mon May 5 22:17:40 2025 +0800 block: move ELEVATOR_FLAG_DISABLE_WBT a request queue flag ELEVATOR_FLAG_DISABLE_WBT is only used by BFQ to disallow wbt when BFQ is in use. The flag is set in BFQ's init(), and cleared in BFQ's exit(). Making it as request queue flag, so that we can avoid to deal with elevator switch race. Also it isn't graceful to checking one scheduler flag in wbt_enable_default(). Reviewed-by: Christoph Hellwig Reviewed-by: Nilay Shroff Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit f24d47edd1119b162a986bf1e88f30ec88c28029 Author: Ming Lei Date: Mon May 5 22:17:39 2025 +0800 block: move blk_mq_add_queue_tag_set() after blk_mq_map_swqueue() Move blk_mq_add_queue_tag_set() after blk_mq_map_swqueue(), and publish this request queue to tagset after everything is setup. This way is safe because BLK_MQ_F_TAG_QUEUE_SHARED isn't used by blk_mq_map_swqueue(), and this flag is mainly checked in fast IO code path. Prepare for removing ->elevator_lock from blk_mq_map_swqueue() which is supposed to be called when elevator switch can't be done. Reviewed-by: Nilay Shroff Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reported-by: Nilay Shroff Closes: https://lore.kernel.org/linux-block/567cb7ab-23d6-4cee-a915-c8cdac903ddd@linux.ibm.com/ Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250505141805.2751237-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit a26a339a654b9403f0ee1004f1db4c2b2a355460 Author: Yu Kuai Date: Tue May 6 14:17:56 2025 +0800 brd: fix discard end sector brd_do_discard() just aligned start sector to page, this can only work if the discard size if at least one page. For example: blkdiscard /dev/ram0 -o 5120 -l 1024 In this case, size = (1024 - (8192 - 5120)), which is a huge value. Fix the problem by round_down() the end sector. Fixes: 9ead7efc6f3f ("brd: implement discard support") Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250506061756.2970934-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit d4099f8893b057ad7e8d61df76bdeaf807ebd679 Author: Yu Kuai Date: Tue May 6 14:17:55 2025 +0800 brd: fix aligned_sector from brd_do_discard() The calculation is just wrong, fix it by round_up(). Fixes: 9ead7efc6f3f ("brd: implement discard support") Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250506061756.2970934-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 0e8acffc1be10d53e909b3aa43831d6c2d25a579 Author: Yu Kuai Date: Tue May 6 14:17:54 2025 +0800 brd: protect page with rcu Currently, after fetching the page by xa_load() in IO path, there is no protection and page can be freed concurrently by discard: cpu0 brd_submit_bio brd_do_bvec page = brd_lookup_page cpu1 brd_submit_bio brd_do_discard page = __xa_erase() __free_page() // page UAF Fix the problem by protecting page with rcu. Meanwhile, if page is already freed, also prevent BUG_ON() by skipping the write, and user will get zero data later if there is no page. Fixes: 9ead7efc6f3f ("brd: implement discard support") Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250506061756.2970934-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit e96ee7e1deaa74c5cc80ab03b51943ece5809984 Author: Caleb Sander Mateos Date: Mon May 5 11:26:23 2025 -0600 ublk: consolidate UBLK_IO_FLAG_OWNED_BY_SRV checks Every ublk I/O command except UBLK_IO_FETCH_REQ checks that the ublk_io has UBLK_IO_FLAG_OWNED_BY_SRV set. Consolidate the separate checks into a single one in __ublk_ch_uring_cmd(), analogous to those for UBLK_IO_FLAG_ACTIVE and UBLK_IO_FLAG_NEED_GET_DATA. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250505172624.1121839-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 48dbb76cef65fabaa3ac97461eda90495e954ecd Author: Frank Li Date: Wed Apr 16 11:47:27 2025 -0400 dt-bindings: media: convert imx.txt to yaml format Convert binding doc imx.txt to yaml format. Create two yaml files: fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml. Additional changes: - add example for fsl,imx6-mipi-csi2 - add irq err1 and err2 description - update MAINTAINERS Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: drop empty line at the end of the yaml files] commit b3f3c493e963502c965cb4978dfccd7c90960c0d Author: Dmitry Baryshkov Date: Fri Apr 18 10:50:04 2025 +0300 iommu/arm-smmu-qcom: Add SAR2130P MDSS compatible Add the SAR2130P compatible to clients compatible list, the device require identity domain. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-9-442c905cb3a4@oss.qualcomm.com Signed-off-by: Will Deacon commit 8288eac57dcef7cabc7411e77863819302ac3a38 Merge: fdc348121f2465 0a02e1f4a54ace Author: Thomas Gleixner Date: Tue May 6 14:55:47 2025 +0200 Merge tag 'irqdomain-04-08-25' into irq/cleanups Merge to get the latest updates for the irqdomain cleanup series. commit 976c4626c5f57d9a0eea0f4618ce58e68102bee3 Author: Geert Uytterhoeven Date: Mon Apr 28 14:16:13 2025 +0200 ARM: shmobile: defconfig: Enable more support for RZN1D-DB/EB Enable more support for the Renesas RZN1D-DB and RZN1D-EB development and expansion boards: - Polled GPIO buttons (also used on the Marzen development board), - Synopsys DesignWare I2C adapters, - National Semiconductor LM75 sensors and compatibles (which requires not disabling Hardware Monitoring support), - Arasan SDHCI controllers. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/a40aa69832ef292497b9170e2ad607bd9dfd7e21.1745842538.git.geert+renesas@glider.be commit be5a2d3f8f9738ea1426e7d2243707164ed5bac2 Author: Qinxin Xia Date: Tue Apr 22 19:29:51 2025 +0800 iommu/arm-smmu-v3: Fix incorrect return in arm_smmu_attach_dev After commit 48e7b8e284e5 ("iommu/arm-smmu-v3: Remove arm_smmu_domain_finalise() during attach"), an error code is not returned on the attach path when the smmu does not match with the domain. This causes problems with VFIO because vfio_iommu_type1_attach_group() relies on this check to determine domain compatability. Re-instate the -EINVAL return value when the SMMU doesn't match on the device attach path. Fixes: 48e7b8e284e5 ("iommu/arm-smmu-v3: Remove arm_smmu_domain_finalise() during attach") Signed-off-by: Qinxin Xia Link: https://lore.kernel.org/r/20250422112951.2027969-1-xiaqinxin@huawei.com Signed-off-by: Will Deacon commit ed6f779e213070572e53e9801e4a6e510d7bc208 Author: Matt Coster Date: Mon Apr 28 12:07:15 2025 +0100 arm64: dts: ti: k3-j721s2: Add GPU node The J721S2 binding is based on the TI downstream binding in commit 54b0f2a00d92 ("arm64: dts: ti: k3-j721s2-main: add gpu node") from [1] but with updated compatible strings. The clock[2] and power[3] indices were verified from HTML docs, while the interrupt index comes from the TRM[4] (appendix "J721S2_Appendix_20241106_Public.xlsx", "Interrupts (inputs)", "GPU_BXS464_WRAP0_GPU_SS_0_OS_IRQ_OUT_0"). [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel [2]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j721s2/clocks.html [3]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j721s2/devices.html [4]: https://www.ti.com/lit/zip/spruj28 (revision E) Reviewed-by: Randolph Sapp Signed-off-by: Matt Coster Link: https://lore.kernel.org/r/20250428-bxs-4-64-dts-v4-2-eddafb4ae19f@imgtec.com Signed-off-by: Nishanth Menon commit 8a6650dafaede08c565f88ee1d5920a498941f76 Author: Matt Coster Date: Mon Apr 28 12:07:14 2025 +0100 arm64: dts: ti: k3-am62: New GPU binding details Use the new compatible string and power domain name as introduced in commit 2c01d9099859 ("dt-bindings: gpu: img: Future-proofing enhancements"). Reviewed-by: Randolph Sapp Signed-off-by: Matt Coster Link: https://lore.kernel.org/r/20250428-bxs-4-64-dts-v4-1-eddafb4ae19f@imgtec.com Signed-off-by: Nishanth Menon commit 3df22a8622fafa1c5a0dba93c207f66f48366858 Author: Kishon Vijay Abraham I Date: Wed Apr 30 09:43:43 2025 -0500 arm64: dts: ti: k3-am62-main: Add PRUSS-M node Add the DT node for the PRUSS-M processor subsystem that is present on the K3 AM62x SoCs. The K3 AM62x family of SoC has one PRUSS-M instance and it has two Programmable Real-Time Units (PRU0 and PRU1). Signed-off-by: Kishon Vijay Abraham I [ Judith: Fix pruss_iclk id for pruss_coreclk_mux ] Signed-off-by: Judith Mendez Tested-by: Daniel Schultz Reviewed-by: Beleswar Padhi Acked-by: Hari Nagalla Link: https://lore.kernel.org/r/20250430144343.972234-1-jm@ti.com Signed-off-by: Nishanth Menon commit e4b55d85024f806c9b364d498e0ebbc74d76d77d Author: Hari Nagalla Date: Fri May 2 17:03:25 2025 -0500 arm64: dts: ti: k3-am64: Reserve timers used by MCU FW AM64x device has 4 R5F cores in the main domain. TI MCU firmware uses main domain timers as tick timers in these firmwares. Hence keep them as reserved in the Linux device tree. Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-12-jm@ti.com Signed-off-by: Nishanth Menon commit b4ec77305c2645ce96c4a13aca0c375815e06672 Author: Hari Nagalla Date: Fri May 2 17:03:24 2025 -0500 arm64: dts: ti: k3-am62a7-sk: Reserve main_rti4 for C7x DSP The main rti4 watchdog timer is used by the C7x DSP, so reserve the timer in the linux device tree. Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-11-jm@ti.com Signed-off-by: Nishanth Menon commit 2a473854bea16de7d3502ae2cd1ba4481eb632e9 Author: Hari Nagalla Date: Fri May 2 17:03:23 2025 -0500 arm64: dts: ti: k3-am62a7-sk: Reserve main_timer2 for C7x DSP C7x DSP uses main_timer2, so mark it as reserved in linux DT. Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-10-jm@ti.com Signed-off-by: Nishanth Menon commit 8fb034b8402ead1028ed63394a177947b1450fcd Author: Hari Nagalla Date: Fri May 2 17:03:22 2025 -0500 arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations. Signed-off-by: Devarsh Thakkar Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-9-jm@ti.com Signed-off-by: Nishanth Menon commit b05a6c145001e99348a2fe33958be912f4eb8d4d Author: Devarsh Thakkar Date: Fri May 2 17:03:21 2025 -0500 arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations. Signed-off-by: Devarsh Thakkar Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-8-jm@ti.com Signed-off-by: Nishanth Menon commit 77c29ebe76d80174d5735b61edd3c95e32a75d2e Author: Devarsh Thakkar Date: Fri May 2 17:03:20 2025 -0500 arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors For each remote proc, reserve memory for IPC and bind the mailbox assignments. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor for the resource table and for tracebuffer allocations. Signed-off-by: Devarsh Thakkar Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Reviewed-by: Beleswar Padhi Reviewed-by: Jai Luthra Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-7-jm@ti.com Signed-off-by: Nishanth Menon commit 56f13d79430f8faa27943e376ac25aca0836ee93 Author: Jai Luthra Date: Fri May 2 17:03:19 2025 -0500 arm64: dts: ti: k3-am62a-main: Add C7xv device node AM62A SoCs have a C7xv DSP subsystem with Analytics engine capability. This subsystem is intended for deep learning purposes. Define the device node for C7xv DSP. Signed-off-by: Jai Luthra Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Tested-by: Daniel Schultz Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-6-jm@ti.com Signed-off-by: Nishanth Menon commit f0623719c2a612cbb9d5927fc5ffef9b54a12fb7 Author: Devarsh Thakkar Date: Fri May 2 17:03:18 2025 -0500 arm64: dts: ti: k3-am62a-wakeup: Add R5F device node AM62A SoCs have a single R5F core in wakeup domain. This core is also used as a device manager for the SoC. Signed-off-by: Devarsh Thakkar Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Tested-by: Daniel Schultz Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-5-jm@ti.com Signed-off-by: Nishanth Menon commit 7f321892dc53015e29cd1055231727b8cdc24923 Author: Hari Nagalla Date: Fri May 2 17:03:17 2025 -0500 arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node AM62A SoCs have a single R5F core in the MCU voltage domain. Add the R5FSS node with the child node for core0 in MCU voltage domain .dtsi file. Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Tested-by: Daniel Schultz Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-4-jm@ti.com Signed-off-by: Nishanth Menon commit 5722117235aca01893dbda9dbc7e4790b0b9d43c Author: Hari Nagalla Date: Fri May 2 17:03:16 2025 -0500 arm64: dts: ti: k3-am62-wakeup: Add wakeup R5F node AM62 SoC devices have a single core R5F processor in wakeup domain. The R5F processor in wakeup domain is used as a device manager for the SoC. Signed-off-by: Devarsh Thakkar Signed-off-by: Hari Nagalla Signed-off-by: Judith Mendez Tested-by: Daniel Schultz Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-3-jm@ti.com Signed-off-by: Nishanth Menon commit 5bb1949ffa021056b389393c5edb22abba5372c3 Author: Judith Mendez Date: Fri May 2 17:03:15 2025 -0500 arm64: dts: ti: k3-am62: Add ATCM and BTCM cbass ranges Add cbass ranges for ATCM and BTCM on am62x device, without these, remoteproc driver fails to probe and attach to the DM r5 core and IPC communication is broken. Signed-off-by: Judith Mendez Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20250502220325.3230653-2-jm@ti.com Signed-off-by: Nishanth Menon commit cabe662bd54b37deb7ebf0a4dbaabc7812fa411c Author: Rishikesh Donadkar Date: Tue May 6 10:22:25 2025 +0530 arm64: dts: ti: k3-am625-beagleplay: Add required voltage supplies for TEVI-OV5640 The device tree overlay for TEVI-OV5640 requires following voltage supplies: AVDD-supply: Analog voltage supply, 2.8 volts DOVDD-supply: Digital I/O voltage supply, 1.8 volts DVDD-supply: Digital core voltage supply, 3.3 volts Add them in the overlay. Signed-off-by: Rishikesh Donadkar Reviewed-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20250506045225.1246873-3-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit a5da12f37b8532b7ea9196ae7c7927a535883194 Author: Rishikesh Donadkar Date: Tue May 6 10:22:24 2025 +0530 arm64: dts: ti: k3-am625-beagleplay: Add required voltage supplies for OV5640 The device tree overlay for OV5640 requires following voltage supplies: AVDD-supply: Analog voltage supply, 2.8 volts DOVDD-supply: Digital I/O voltage supply, 1.8 volts DVDD-supply: Digital core voltage supply, 1.5 volts Add them in the overlay. Signed-off-by: Rishikesh Donadkar Reviewed-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20250506045225.1246873-2-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit 30ce5f163e4fb81d1467b15ecc508889be7eabca Author: Rishikesh Donadkar Date: Fri May 2 21:55:39 2025 +0530 arm64: dts: ti: k3-am62x: Add required voltage supplies for TEVI-OV5640 The device tree overlay for TEVI-OV5640 requires following voltage supplies as mentioned in the power section [1] AVDD-supply: Analog voltage supply, 2.8 volts DOVDD-supply: Digital I/O voltage supply, 1.8 volts DVDD-supply: Digital core voltage supply, 3.3 volts Add them in the DT overlay. Link: https://www.technexion.com/wp-content/uploads/2023/09/product-brief_tevi-ov5640.pdf Signed-off-by: Rishikesh Donadkar Reviewed-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20250502162539.322091-5-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit 23a5409369b11e9174ba95ba8ddedcffacdf9529 Author: Rishikesh Donadkar Date: Fri May 2 21:55:38 2025 +0530 arm64: dts: ti: k3-am62x: Add required voltage supplies for OV5640 The device tree overlay for OV5640 requires following voltage supplies as mentioned in the table 8-3 of the data-sheet [1]. AVDD-supply: Analog voltage supply, 2.8 volts DOVDD-supply: Digital I/O voltage supply, 1.8 volts DVDD-supply: Digital core voltage supply, 1.5 volts Add them in the overlay. Link: https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf Reviewed-by: Devarsh Thakkar Signed-off-by: Rishikesh Donadkar Link: https://lore.kernel.org/r/20250502162539.322091-4-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit d44915df7592b27e3e8c8b3e87c03603e3b0103a Author: Rishikesh Donadkar Date: Fri May 2 21:55:37 2025 +0530 arm64: dts: ti: k3-am62x: Add required voltage supplies for IMX219 The device tree overlay for the IMX219 sensor requires three voltage supplies to be defined: VANA (analog), VDIG (digital core), and VDDL (digital I/O) [1]. Add the corresponding voltage supply definitions in the overlay so that the same topography as dt-bindings is present in the DT overlay. Link: https://datasheets.raspberrypi.com/camera/camera-module-2-schematics.pdf [1] Reviewed-by: Devarsh Thakkar Signed-off-by: Rishikesh Donadkar Link: https://lore.kernel.org/r/20250502162539.322091-3-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit 90770c243c384ddde070099e37a3ef2f3b71ff8a Author: Rishikesh Donadkar Date: Fri May 2 21:55:36 2025 +0530 arm64: dts: ti: k3-am62p5-sk: Add regulator nodes for AM62P Add regulator node for AM62P-SK VCC_3V3_MAIN is the output of LM5141-Q1, and it serves as an input to TPS22965DSGT which produces VCC_3V3_SYS [1] VCC_3V3_SYS servers as vin-supply for peripherals like CSI [1]. Link: https://www.ti.com/lit/zip/sprr487 [1] Reviewed-by: Devarsh Thakkar Signed-off-by: Rishikesh Donadkar Link: https://lore.kernel.org/r/20250502162539.322091-2-r-donadkar@ti.com Signed-off-by: Nishanth Menon commit 9b808f7f395ae375a26e32046b680cf898dacc21 Author: Kendall Willis Date: Mon Apr 28 15:53:36 2025 -0500 firmware: ti_sci: Convert CPU latency constraint from us to ms Fix CPU resume latency constraint units sent to device manager through the TI SCI API. The device manager expects CPU resume latency to be in msecs which is passed in with the TI SCI API [1]. CPU latency constraints are set in userspace using the PM QoS framework which uses usecs as the unit. Since PM QoS uses usecs for units and the device manager expects msecs as the unit, TI SCI needs to convert from usecs to msecs before passing to device manager. [1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-lpm-set-latency-constraint Cc: stable@vger.kernel.org Fixes: a7a15754c7f7 ("firmware: ti_sci: add CPU latency constraint management") Signed-off-by: Kendall Willis Link: https://lore.kernel.org/r/20250428205336.2947118-1-k-willis@ti.com Signed-off-by: Nishanth Menon commit db56723ceaec87aa5cf871e623f464934b266228 Author: Christian Brauner Date: Tue May 6 13:55:54 2025 +0200 pidfs: detect refcount bugs Now that we have pidfs_{get,register}_pid() that needs to be paired with pidfs_put_pid() it's possible that someone pairs them with put_pid(). Thus freeing struct pid while it's still used by pidfs. Notice when that happens. I'll also add a scheme to detect invalid uses of pidfs_get_pid() and pidfs_put_pid() later. Link: https://lore.kernel.org/20250506-uferbereich-guttun-7c8b1a0a431f@brauner Signed-off-by: Christian Brauner commit d5d283d45c85e774b64100137f34e7d55bfbe45e Author: Kevin Baker Date: Mon May 5 12:02:56 2025 -0500 drm/panel: simple: Update timings for AUO G101EVN010 Switch to panel timings based on datasheet for the AUO G101EVN01.0 LVDS panel. Default timings were tested on the panel. Previous mode-based timings resulted in horizontal display shift. Signed-off-by: Kevin Baker Fixes: 4fb86404a977 ("drm/panel: simple: Add AUO G101EVN010 panel support") Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250505170256.1385113-1-kevinb@ventureresearch.com Signed-off-by: Dmitry Baryshkov commit c1ab4ce3cb759f69fb9085a060e568b73e8f5cd8 Author: Ingo Molnar Date: Tue May 6 13:41:43 2025 +0200 tools/arch/x86: Move the header to Synchronize with what we did with the kernel side header in: 3846389c03a8 ("x86/platform/amd: Move the header to ") Reported-by: Stephen Rothwell Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org commit 075001c9eb41be4f7841958d575786574dcc9b28 Merge: 5b5f1efb729dc0 708686132ba026 Author: Paolo Abeni Date: Tue May 6 13:31:28 2025 +0200 Merge branch 'net-phy-realtek-add-support-for-phy-leds' Michael Klein says: ==================== net: phy: realtek: Add support for PHY LEDs Changes in V7: - Remove some unused macros (patch 1) - Add more register defines for RTL8211F (patch 3) - Revise macro definition order once more (patch 4) Changes in V6: - fix macro definition order (patch 1) - introduce two more register defines (patch 2) Changes in V5: - Split cleanup patch and improve code formatting Changes in V4: - Change (!ret) to (ret == 0) - Replace set_bit() by __set_bit() Changes in V3: - move definition of rtl8211e_read_ext_page() to patch 2 - Wrap overlong lines Changes in V2: - Designate to net-next - Add ExtPage access cleanup patch as suggested by Andrew Lunn ==================== Link: https://patch.msgid.link/20250504172916.243185-1-michael@fossekall.de Signed-off-by: Paolo Abeni commit 708686132ba02659267c0cebcc414348ece389a5 Author: Michael Klein Date: Sun May 4 19:29:16 2025 +0200 net: phy: realtek: Add support for PHY LEDs on RTL8211E Like the RTL8211F, the RTL8211E PHY supports up to three LEDs. Add netdev trigger support for them, too. Signed-off-by: Michael Klein Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250504172916.243185-7-michael@fossekall.de Signed-off-by: Paolo Abeni commit be1cc96ddf82bb0c0a159751f73239d6d3e9594a Author: Michael Klein Date: Sun May 4 19:29:15 2025 +0200 net: phy: realtek: use __set_bit() in rtl8211f_led_hw_control_get() rtl8211f_led_hw_control_get() does not need atomic bit operations, replace set_bit() by __set_bit(). Signed-off-by: Michael Klein Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250504172916.243185-6-michael@fossekall.de Signed-off-by: Paolo Abeni commit 8c4d0172657c1f2d86b9c19172150abcd0e35c39 Author: Michael Klein Date: Sun May 4 19:29:14 2025 +0200 net: phy: realtek: Group RTL82* macro definitions Group macro definitions by PHY in lexicographic order. Within each PHY block, definitions are order by page number and then register number. Signed-off-by: Michael Klein Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250504172916.243185-5-michael@fossekall.de Signed-off-by: Paolo Abeni commit 12d40df259e38851a0d973535e6023b33e2ea4f9 Author: Michael Klein Date: Sun May 4 19:29:13 2025 +0200 net: phy: realtek: add RTL8211F register defines Add some more defines for RTL8211F page and register numbers. Signed-off-by: Michael Klein Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250504172916.243185-4-michael@fossekall.de Signed-off-by: Paolo Abeni commit 7c6fa3ffd2650347b1d37f028e232e53d617c1af Author: Michael Klein Date: Sun May 4 19:29:12 2025 +0200 net: phy: realtek: Clean up RTL821x ExtPage access Factor out RTL8211E extension page access code to rtl821x_modify_ext_page() and clean up rtl8211e_config_init() Signed-off-by: Michael Klein Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250504172916.243185-3-michael@fossekall.de Signed-off-by: Paolo Abeni commit f3b265358b911fe9e495619bdfa7797749474f95 Author: Michael Klein Date: Sun May 4 19:29:11 2025 +0200 net: phy: realtek: remove unsed RTL821x_PHYSR* macros These macros have there since the first revision but were never used, so let's just remove them. Signed-off-by: Michael Klein Link: https://patch.msgid.link/20250504172916.243185-2-michael@fossekall.de Signed-off-by: Paolo Abeni commit 5b5f1efb729dc09594c7bf9e3bf4acd705f36f59 Merge: fbaeb7b0f0ffb6 fc91d5e6d94873 Author: Paolo Abeni Date: Tue May 6 13:19:01 2025 +0200 Merge tag 'nf-next-25-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Apparently, nf_conntrack_bridge changes the way in which fragments are handled, dealing to packet drop. From Huajian Yang. 2) Add a selftest to stress the conntrack subsystem, from Florian Westphal. 3) nft_quota depletion is off-by-one byte, Zhongqiu Duan. 4) Rewrites the procfs to read the conntrack table to speed it up, from Florian Westphal. 5) Two patches to prevent overflow in nft_pipapo lookup table and to clamp the maximum bucket size. 6) Update nft_fib selftest to check for loopback packet bypass. From Florian Westphal. netfilter pull request 25-05-06 * tag 'nf-next-25-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: selftests: netfilter: nft_fib.sh: check lo packets bypass fib lookup netfilter: nft_set_pipapo: clamp maximum map bucket size to INT_MAX netfilter: nft_set_pipapo: prevent overflow in lookup table allocation netfilter: nf_conntrack: speed up reads from nf_conntrack proc file netfilter: nft_quota: match correctly when the quota just depleted selftests: netfilter: add conntrack stress test netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it ==================== Link: https://patch.msgid.link/20250505234151.228057-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 108955cd245e80b80b3daaef7fa3621663bc26b8 Author: Niklas Söderlund Date: Wed Apr 30 14:53:22 2025 +0200 media: dt-bindings: sony,imx290: Update usage example Since commit 98e0500eadb7 ("media: i2c: imx290: Add configurable link frequency and pixel rate") the driver expects two specific link-frequency settings 2-lane (445500000, 297000000) and 4-lane (222750000, 148500000) operation. The driver fails to probe without these exact settings. Update the example in the bindings to match this to make it easier for users to incorporate this sensor in their device tree descriptions without having to read the driver sources when the driver fails to probe. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 034237ef15511bca8bc3c85da61bc0b204a3c975 Author: Stanislaw Gruszka Date: Fri May 2 17:44:44 2025 +0200 media: intel/ipu6: Change deprecated lock comment pre_streamon_queued is no longer used. The lock now is protecting active and incoming lists. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c12bbc2820f6190d79c7e4cd695ce68df610f966 Author: Stanislaw Gruszka Date: Fri May 2 17:44:43 2025 +0200 media: intel/ipu6: Remove line_align isys->line_align value is only used in one place and we can just use the proper value directly there. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c139c1ac06bea6e325bb8f28207d170076fa12ab Author: Stanislaw Gruszka Date: Fri May 2 17:44:42 2025 +0200 media: intel/ipu6: Remove pin_ready function pointer We can call ipu6_isys_queue_buf_ready() directly. The only current usage is pin_ready pointer is to check if pin was prepared before IPU6_FW_ISYS_RESP_TYPE_PIN_DATA_READY interrupt, we can use queue pointer for that purpose. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b240df2913d396638033b86af0f0ff76aa1aafc8 Author: Kieran Bingham Date: Wed Apr 30 08:36:49 2025 +0100 media: i2c: imx335: Fix frame size enumeration In commit cfa49ff0558a ("media: i2c: imx335: Support 2592x1940 10-bit mode") the IMX335 driver was extended to support multiple output bitdepth modes. This incorrectly extended the frame size enumeration to check against the supported mbus_codes array instead of the supported mode/frame array. This has the unwanted side effect of reporting the currently supported frame size 2592x1944 three times. Fix the check accordingly to report a frame size for each supported size, which is presently only a single entry. Fixes: cfa49ff0558a ("media: i2c: imx335: Support 2592x1940 10-bit mode") Cc: stable@vger.kernel.org Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 00cd2d3a1b368685b1302bd45c4783d4c5b907b9 Author: Dan Carpenter Date: Wed Apr 30 11:27:42 2025 +0300 media: i2c: ds90ub960: Fix uninitialized variable in ub960_rxport_bc_ser_config() The "ret" variable is not initialized on success. Set it to zero. Fixes: e2a3b695bc5f ("media: i2c: ds90ub960: Configure serializer using back-channel") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d97dfb6c3fb1bc9749baf9a68d90728d33b305f2 Author: Dan Carpenter Date: Wed Apr 30 11:27:36 2025 +0300 media: i2c: ds90ub960: Fix uninitialized variable in ub960_serializer_temp_ramp() The "ret" variable is not initialized on the success path. Fixes: a05744749600 ("media: i2c: ds90ub9xx: Set serializer temperature ramp") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3a9619be0dba738397b888a7674049321184a2f9 Author: Dan Carpenter Date: Wed Apr 30 11:27:30 2025 +0300 media: i2c: imx334: uninitialized variable in imx334_update_exp_gain() The "ret" variable is not initialized on the success path. Set it to zero. Fixes: 7b19b0fc8ac8 ("media: i2c: imx334: Convert to CCI register access helpers") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a21e0a8941eaeb253fd64c516c4ea39bdf4db1c6 Author: Jason Chen Date: Thu Apr 24 01:56:36 2025 +0800 media: ov08x40: Select mode based on mipi lane count Use the v4l2_find_nearest_size_conditional() helper to figure out which drive-supported lane can be used on a given system. Also avoid exposing duplicate frame sizes to userspace when multiple modes share the same resolution but differ in lane count. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 55eac5a4becc374c3b47376a852a20d77f4eb2d2 Author: Jason Chen Date: Thu Apr 24 01:56:35 2025 +0800 media: ov08x40: Use v4l2_link_freq_to_bitmap helper Use the v4l2_link_freq_to_bitmap() helper to figure out which driver-supported link frequencies can be used on a given system. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: drop unused variable 'max'] commit 508a5dd28596843e15db4f7f716cf072dc560af4 Author: Jason Chen Date: Thu Apr 24 01:56:34 2025 +0800 media: ov08x40: Add shared global register list This follows the previous cleanup commit where duplicate entries were removed from each mode's register list. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ff1f5010a96a4496ce3c0098b330381f87ac9d87 Author: Jason Chen Date: Thu Apr 24 01:56:33 2025 +0800 media: ov08x40: Remove common register settings from resolution-specific table Prepare for refactoring register table by removing register entries that are common across all modes from resolution-specific table These will be moved into a shared common register array in the next commit. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ad12f6f914a4923befe64fce10c4f890173e6152 Author: Jason Chen Date: Thu Apr 24 01:56:32 2025 +0800 media: ov08x40: Add support for 2/4 lanes at 1500 Mbps Add register settings for 1500Mbps to support both 2-lane and 4-lane configurations Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7dc513cf7db712108885fa50ef7a800fd26667ff Author: Jason Chen Date: Thu Apr 24 01:56:31 2025 +0800 media: ov08x40: Separate the lane configuration and PLL settings To prepare upcoming support of multiple sensor modes, this change separates the lane configuration and PLL settings from the original mode-specific settings. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 454ad0169cf7bb09e622c5bc40275ea725ab3a8a Author: Sakari Ailus Date: Wed Mar 5 11:22:01 2025 +0200 media: common: Add v4l2_find_nearest_size_conditional() v4l2_find_nearest_size() returns a mode from sensor driver's mode list that is a best match width and height wise for the sensor. Some drivers have different set of available modes depending on the number of lanes. While this could be handled within a driver by providing different lists of modes, provide a helper v4l2_find_nearest_size_conditional() to ignore modes that aren't available. Also use size_t for the array index and remove extra commas while at it. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 65e52d07f1aada509c85c1bb86ce80dd8a5ce0c8 Author: Hao Yao Date: Wed Mar 12 10:06:28 2025 +0800 media: i2c: ov13b10: Support 2 lane mode 1. Fix pixel rate calculation to consider different lane number 2. Add 2104x1560 60fps 2 data lanes register setting 3. Support 2 lane in check_hwcfg 4. Select correct mode considering lane number used Signed-off-by: Bingbu Cao Signed-off-by: Hao Yao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 24c01de7728673d1a30986aa247d33ca1a0ef322 Author: Hao Yao Date: Wed Mar 12 10:06:27 2025 +0800 media: i2c: ov13b10: Improve code readability Use mode instead of ov13b->cur_mode in set_pad_format. Signed-off-by: Bingbu Cao Signed-off-by: Hao Yao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: fix typo: redability -> readability] commit 56fa9206d32da1bfc5ea3eb3d5f543973d6ea29f Author: Hao Yao Date: Wed Mar 12 10:06:26 2025 +0800 media: i2c: ov13b10: Fix h_blank calculation Pixel per line (PPL) is calculated as pixel_rate / (VTS * FPS), which is not decided by MIPI CSI-2 link frequency. PPL can vary while link frequency keeps the same. If PPL is wrong, the h_blank = PPL - width is also wrong then FPS control is inaccurate. This patch fix h_blank by: 1. Move PPL from link_freq_config to ov13b10_mode 2. Add PPL value for different modes 3. Use PPL from mode to calculate h_blank Signed-off-by: Bingbu Cao Signed-off-by: Hao Yao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d380dcad084b60d2f929c8ab8f74e3e7bf6bad1d Author: Lukas Bulwahn Date: Sun May 4 05:35:02 2025 +0200 MAINTAINERS: adjust file entry in OMNIVISION OV7670 SENSOR DRIVER Commit 59b24c0047a2 ("media: dt-bindings: media: i2c: align filenames format with standard") renames the files in Documentation/devicetree/bindings/media/i2c/, but misses to adjust the file entry in OMNIVISION OV7670 SENSOR DRIVER. Adjust the file entry after this renaming. Signed-off-by: Lukas Bulwahn Reviewed-by: Niklas Söderlund Reviewed-by: David Heidelberg Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 046c793c0e944d7bbf3752f18b241f99fb01ffaa Author: Andy Shevchenko Date: Mon Mar 31 11:35:04 2025 +0300 media: i2c: rdacm2x: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Reviewed-by: Kieran Bingham Signed-off-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8908792cbb7ec0e66720b5184c3a57a0d818e29f Author: Andy Shevchenko Date: Mon Mar 31 10:21:36 2025 +0300 media: raspberrypi: rp1-cfe: Remove (explicitly) unused header The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0979b76babb7e7404c4e3999925c46231ccf93a7 Author: Andy Shevchenko Date: Mon Mar 31 10:25:07 2025 +0300 media: i2c: ds90ub9x3: Remove (explicitly) unused header The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f0b7912b73c68415cbb435f3724d02e1aa7aa12b Author: Andy Shevchenko Date: Mon Mar 31 10:27:07 2025 +0300 media: i2c: max9671x: Remove (explicitly) unused header The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko Reviewed-by: Julien Massot Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ac6fb0d8f98810f628e0539f4671d6e71fbf7053 Author: Laurent Pinchart Date: Mon Apr 28 01:13:32 2025 +0300 media: ccs-pll: Print a debug message when VT tree calculation fails When the VT tree calculation fails to find a valid pre-divider, the ccs_pll_calculate_vt_tree() function returns an error silently, and the caller doesn't print any message either. This makes debugging PLL calculation issues more difficult. Add a debug message to report the issue, and amend the corresponding message for the OP tree to mention "OP". Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e3d86847fba58cf71f66e81b6a2515e07039ae17 Author: Johan Hovold Date: Fri Apr 25 14:52:38 2025 +0200 media: ov8856: suppress probe deferral errors Probe deferral should not be logged as an error: ov8856 24-0010: failed to get HW configuration: -517 Use dev_err_probe() for the clock lookup and drop the (mostly) redundant dev_err() from sensor probe() to suppress it. Note that errors during regulator lookup is already correctly logged using dev_err_probe(). Fixes: 0c2c7a1e0d69 ("media: ov8856: Add devicetree support") Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8268da3c474a43a79a6540fb06c5d3b730a0d5a5 Author: Johan Hovold Date: Fri Apr 25 14:52:37 2025 +0200 media: ov5675: suppress probe deferral errors Probe deferral should not be logged as an error: ov5675 24-0010: failed to get HW configuration: -517 Drop the (mostly) redundant dev_err() from sensor probe() to suppress it. Note that errors during clock and regulator lookup are already correctly logged using dev_err_probe(). Fixes: 49d9ad719e89 ("media: ov5675: add device-tree support and support runtime PM") Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 20244cbafbd6c8486347bb82d972f6e2d2d5a201 Author: Dongcheng Yan Date: Fri Apr 25 18:43:31 2025 +0800 media: i2c: change lt6911uxe irq_gpio name to "hpd" Lt6911uxe is used in IPU6 / x86 platform, worked with an out-of-tree int3472 patch and upstream intel/ipu6 before. It is only used on ACPI platforms till now and there are no devicetree bindings for this driver. The upstream int3472 driver uses "hpd" instead of "readystat" now. this patch updates the irq_gpio name to "hpd" accordingly, so that mere users can now use the upstream version directly without relying on out-of-tree int3472 pin support. The new name "hpd" (Hotplug Detect) aligns with common naming conventions used in other drivers(like adv7604) and documentation. Fixes: e49563c3be09d4 ("media: i2c: add lt6911uxe hdmi bridge driver") Cc: stable@vger.kernel.org Signed-off-by: Dongcheng Yan Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6be2439fd7d0dc40a2597641d25e3cc9e1e6a30e Author: Michael Riesch Date: Thu Apr 10 21:41:32 2025 +0200 media: dt-bindings: sony,imx415: update maintainer e-mail address I recently left WolfVision but would like to continue to maintain the Sony IMX415 image sensor driver. Update my e-mail address. Signed-off-by: Michael Riesch Acked-by: Rob Herring (Arm) Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a562c39b672506a572263ec876c92b41946307b1 Author: Michael Riesch Date: Thu Apr 10 21:41:31 2025 +0200 media: mailmap: add entry for Michael Riesch After five interesting years, I left WolfVision and started to work for Collabora. Add a corresponding mailmap entry. Signed-off-by: Michael Riesch Reviewed-by: Nicolas Dufresne Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3e51d14286451388d8b5acd5ac4777e98682422b Author: Stanislaw Gruszka Date: Mon Mar 17 08:38:56 2025 +0100 media: intel/ipu6: Remove unused ipu6_isys_csi2_pdata The pointer to ipu6_isys_csi2_pdata is not used. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9b9d4ef0cf750c514735bfd77745387b95cbddda Author: Herbert Xu Date: Tue May 6 10:05:08 2025 +0800 crypto: lib/poly1305 - Build main library on LIB_POLY1305 and split generic code out Split the lib poly1305 code just as was done with sha256. Make the main library code conditional on LIB_POLY1305 instead of LIB_POLY1305_GENERIC. Reported-by: Giovanni Cabiddu Fixes: 10a6d72ea355 ("crypto: lib/poly1305 - Use block-only interface") Signed-off-by: Herbert Xu commit b122c9cfcb39c8ef520d50eddfbe15f3e6551a50 Author: Umang Jain Date: Tue Apr 22 13:20:52 2025 +0100 media: imx335: Use correct register width for HNUM CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8() as HNUM spans from 0x302e[0:7] to 0x302f[0:3]. Signed-off-by: Umang Jain Signed-off-by: Kieran Bingham Fixes: 8f0926dba799 ("media: imx335: Use V4L2 CCI for accessing sensor registers") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1d0358c35818c84a810e9bca40015d259dcaf5ab Author: Kieran Bingham Date: Tue Apr 22 13:27:01 2025 +0100 media: imx335: Add MAINTAINER entry In commit 5b0e91fd477d ("media: imx335: Orphan the driver"), the IMX335 driver was marked as an orphan. I have several of these sensors, tested on Raspberry Pi and NXP systems, and the full datasheet. Add myself as a maintainer for the IMX335. Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 397f802d06c418efa636e46083edbeb00c91369e Author: Johan Hovold Date: Wed Apr 30 15:51:46 2025 +0200 firmware: arm_scmi: quirk: Force perf level get fastchannel The Qualcomm SCP firmware in X1E machines like the Lenovo ThinkPad T14s does not set the FastChannel supported attribute bit for PERF_LEVEL_GET but crashes when falling back to regular messaging. Use the new SCMI quirk framework to force FastChannel initialisation for this implementation. Note that we can add an upper bound on the version matching when we learn which version has a fix (or limit matching using a SoC compatible string in the unlikely event that always enabling FC causes trouble somewhere). Link: https://lore.kernel.org/lkml/Z4Dt8E7C6upVtEGV@hovoldconsulting.com/ Signed-off-by: Johan Hovold Message-Id: <20250430135146.5154-1-johan+linaro@kernel.org> Signed-off-by: Sudeep Holla commit 7b487beab7cd853ab7de58746284898fb9316334 Author: Cristian Marussi Date: Tue Apr 29 15:11:08 2025 +0100 firmware: arm_scmi: quirk: Fix CLOCK_DESCRIBE_RATES triplet Convert an existing quirk in CLOCK_DESCRIBE_RATES parsing to the new quirk framework. This is a sort of a peculiar quirk since it matches any platform and any firmware. Signed-off-by: Cristian Marussi Message-Id: <20250429141108.406045-4-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla commit 487c407d57d6d32ff4370f4e738227811732d4bd Author: Cristian Marussi Date: Tue Apr 29 15:11:07 2025 +0100 firmware: arm_scmi: Add common framework to handle firmware quirks Add a common framework to describe SCMI quirks and associate them with a specific platform or a specific set of SCMI firmware versions. All the matching SCMI quirks will be enabled when the SCMI core stack probes and after all the needed SCMI firmware versioning information was retrieved using the base protocol. Tested-by: Johan Hovold Signed-off-by: Cristian Marussi Message-Id: <20250429141108.406045-3-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla commit 94a263f981a3fa3d93f65c31e0fed0756736be43 Author: Sibi Sankar Date: Tue Apr 29 15:11:06 2025 +0100 firmware: arm_scmi: Ensure that the message-id supports fastchannel Currently the perf and powercap protocol relies on the protocol domain attributes, which just ensures that one fastchannel per domain, before instantiating fastchannels for all possible message-ids. Fix this by ensuring that each message-id supports fastchannel before initialization. Logs: | scmi: Failed to get FC for protocol 13 [MSG_ID:6 / RES_ID:0] - ret:-95. Using regular messaging | scmi: Failed to get FC for protocol 13 [MSG_ID:6 / RES_ID:1] - ret:-95. Using regular messaging | scmi: Failed to get FC for protocol 13 [MSG_ID:6 / RES_ID:2] - ret:-95. Using regular messaging CC: stable@vger.kernel.org Reported-by: Johan Hovold Closes: https://lore.kernel.org/lkml/ZoQjAWse2YxwyRJv@hovoldconsulting.com/ Fixes: 6f9ea4dabd2d ("firmware: arm_scmi: Generalize the fast channel support") Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Sibi Sankar [Cristian: Modified the condition checked to establish support or not] Signed-off-by: Cristian Marussi Message-Id: <20250429141108.406045-2-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla commit 4b626015e1bf119cd31d7e62f9bd9eb1412fce7b Author: Masami Hiramatsu (Google) Date: Mon Apr 28 10:48:20 2025 +0900 x86/insn: Stop decoding i64 instructions in x86-64 mode at opcode In commit 2e044911be75 ("x86/traps: Decode 0xEA instructions as #UD") FineIBT starts using 0xEA as an invalid instruction like UD2. But insn decoder always returns the length of "0xea" instruction as 7 because it does not check the (i64) superscript. The x86 instruction decoder should also decode 0xEA on x86-64 as a one-byte invalid instruction by decoding the "(i64)" superscript tag. This stops decoding instruction which has (i64) but does not have (o64) superscript in 64-bit mode at opcode and skips other fields. With this change, insn_decoder_test says 0xea is 1 byte length if x86-64 (-y option means 64-bit): $ printf "0:\tea\t\n" | insn_decoder_test -y -v insn_decoder_test: success: Decoded and checked 1 instructions Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Ingo Molnar Cc: Adrian Hunter Cc: H. Peter Anvin Cc: Peter Zijlstra Link: https://lore.kernel.org/r/174580490000.388420.5225447607417115496.stgit@devnote2 commit ca698ec2f07873a448d53c580795c4e023c75393 Author: Masami Hiramatsu (Google) Date: Mon Apr 28 10:48:10 2025 +0900 x86/insn: Fix opcode map (!REX2) superscript tags Commit: 159039af8c07 ("x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map") added (!REX2) superscript with a space, but the correct format requires ',' for concatination with other superscript tags. Add ',' to generate correct insn attribute tables. I confirmed with following command: arch/x86/lib/x86-opcode-map.txt | grep e8 | head -n 1 [0xe8] = INAT_MAKE_IMM(INAT_IMM_VWORD32) | INAT_FORCE64 | INAT_NO_REX2, Fixes: 159039af8c07 ("x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map") Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Adrian Hunter Cc: Peter Zijlstra Link: https://lore.kernel.org/r/174580489027.388420.15539375184727726142.stgit@devnote2 commit 83725bdf94c3b5fc7ff235750093805c6bc599fe Merge: 3ce4b1f1f24bbd b4432656b36e5c Author: Ingo Molnar Date: Tue May 6 12:03:03 2025 +0200 Merge tag 'v6.15-rc4' into x86/asm, to pick up fixes Signed-off-by: Ingo Molnar commit 32d5fa804dc9bd7cf6651a1378ba616d332e7444 Author: Chao Gao Date: Tue May 6 17:36:07 2025 +0800 x86/fpu: Drop @perm from guest pseudo FPU container Remove @perm from the guest pseudo FPU container. The field is initialized during allocation and never used later. Rename fpu_init_guest_permissions() to show that its sole purpose is to lock down guest permissions. Suggested-by: Maxim Levitsky Signed-off-by: Chao Gao Signed-off-by: Ingo Molnar Reviewed-by: Chang S. Bae Cc: Andy Lutomirski Cc: David Woodhouse Cc: Eric Biggers Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Mitchell Levy Cc: Oleg Nesterov Cc: Paolo Bonzini Cc: Samuel Holland Cc: Sean Christopherson Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/kvm/af972fe5981b9e7101b64de43c7be0a8cc165323.camel@redhat.com/ Link: https://lore.kernel.org/r/20250506093740.2864458-3-chao.gao@intel.com commit d8414603b29f25191fcceafb72e74b67ac2e92b1 Author: Sean Christopherson Date: Tue May 6 17:36:06 2025 +0800 x86/fpu/xstate: Always preserve non-user xfeatures/flags in __state_perm When granting userspace or a KVM guest access to an xfeature, preserve the entity's existing supervisor and software-defined permissions as tracked by __state_perm, i.e. use __state_perm to track *all* permissions even though all supported supervisor xfeatures are granted to all FPUs and FPU_GUEST_PERM_LOCKED disallows changing permissions. Effectively clobbering supervisor permissions results in inconsistent behavior, as xstate_get_group_perm() will report supervisor features for process that do NOT request access to dynamic user xfeatures, whereas any and all supervisor features will be absent from the set of permissions for any process that is granted access to one or more dynamic xfeatures (which right now means AMX). The inconsistency isn't problematic because fpu_xstate_prctl() already strips out everything except user xfeatures: case ARCH_GET_XCOMP_PERM: /* * Lockless snapshot as it can also change right after the * dropping the lock. */ permitted = xstate_get_host_group_perm(); permitted &= XFEATURE_MASK_USER_SUPPORTED; return put_user(permitted, uptr); case ARCH_GET_XCOMP_GUEST_PERM: permitted = xstate_get_guest_group_perm(); permitted &= XFEATURE_MASK_USER_SUPPORTED; return put_user(permitted, uptr); and similarly KVM doesn't apply the __state_perm to supervisor states (kvm_get_filtered_xcr0() incorporates xstate_get_guest_group_perm()): case 0xd: { u64 permitted_xcr0 = kvm_get_filtered_xcr0(); u64 permitted_xss = kvm_caps.supported_xss; But if KVM in particular were to ever change, dropping supervisor permissions would result in subtle bugs in KVM's reporting of supported CPUID settings. And the above behavior also means that having supervisor xfeatures in __state_perm is correctly handled by all users. Dropping supervisor permissions also creates another landmine for KVM. If more dynamic user xfeatures are ever added, requesting access to multiple xfeatures in separate ARCH_REQ_XCOMP_GUEST_PERM calls will result in the second invocation of __xstate_request_perm() computing the wrong ksize, as as the mask passed to xstate_calculate_size() would not contain *any* supervisor features. Commit 781c64bfcb73 ("x86/fpu/xstate: Handle supervisor states in XSTATE permissions") fudged around the size issue for userspace FPUs, but for reasons unknown skipped guest FPUs. Lack of a fix for KVM "works" only because KVM doesn't yet support virtualizing features that have supervisor xfeatures, i.e. as of today, KVM guest FPUs will never need the relevant xfeatures. Simply extending the hack-a-fix for guests would temporarily solve the ksize issue, but wouldn't address the inconsistency issue and would leave another lurking pitfall for KVM. KVM support for virtualizing CET will likely add CET_KERNEL as a guest-only xfeature, i.e. CET_KERNEL will not be set in xfeatures_mask_supervisor() and would again be dropped when granting access to dynamic xfeatures. Note, the existing clobbering behavior is rather subtle. The @permitted parameter to __xstate_request_perm() comes from: permitted = xstate_get_group_perm(guest); which is either fpu->guest_perm.__state_perm or fpu->perm.__state_perm, where __state_perm is initialized to: fpu->perm.__state_perm = fpu_kernel_cfg.default_features; and copied to the guest side of things: /* Same defaults for guests */ fpu->guest_perm = fpu->perm; fpu_kernel_cfg.default_features contains everything except the dynamic xfeatures, i.e. everything except XFEATURE_MASK_XTILE_DATA: fpu_kernel_cfg.default_features = fpu_kernel_cfg.max_features; fpu_kernel_cfg.default_features &= ~XFEATURE_MASK_USER_DYNAMIC; When __xstate_request_perm() restricts the local "mask" variable to compute the user state size: mask &= XFEATURE_MASK_USER_SUPPORTED; usize = xstate_calculate_size(mask, false); it subtly overwrites the target __state_perm with "mask" containing only user xfeatures: perm = guest ? &fpu->guest_perm : &fpu->perm; /* Pairs with the READ_ONCE() in xstate_get_group_perm() */ WRITE_ONCE(perm->__state_perm, mask); Signed-off-by: Sean Christopherson Signed-off-by: Yang Weijiang Signed-off-by: Chao Gao Signed-off-by: Ingo Molnar Reviewed-by: Maxim Levitsky Reviewed-by: Rick Edgecombe Reviewed-by: Chang S. Bae Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: David Woodhouse Cc: H. Peter Anvin Cc: John Allen Cc: Linus Torvalds Cc: Mitchell Levy Cc: Oleg Nesterov Cc: Paolo Bonzini Cc: Samuel Holland Cc: Sohil Mehta Cc: Vignesh Balasubramanian Cc: Vitaly Kuznetsov Cc: Xin Li Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/all/ZTqgzZl-reO1m01I@google.com Link: https://lore.kernel.org/r/20250506093740.2864458-2-chao.gao@intel.com commit 7f9958230d8a79d474829bee25ec9426397335ce Author: Peter Zijlstra Date: Wed Apr 30 10:11:54 2025 +0200 x86/mm: Fix false positive warning in switch_mm_irqs_off() Multiple testers reported the following new warning: WARNING: CPU: 0 PID: 0 at arch/x86/mm/tlb.c:795 Which corresponds to: if (IS_ENABLED(CONFIG_DEBUG_VM) && WARN_ON_ONCE(prev != &init_mm && !cpumask_test_cpu(cpu, mm_cpumask(next)))) cpumask_set_cpu(cpu, mm_cpumask(next)); So the problem is that unuse_temporary_mm() explicitly clears that bit; and it has to, because otherwise the flush_tlb_mm_range() in __text_poke() will try sending IPIs, which are not at all needed. See also: https://lore.kernel.org/all/20241113095550.GBZzR3pg-RhJKPDazS@fat_crate.local/ Notably, the whole {,un}use_temporary_mm() thing requires preemption to be disabled across it with the express purpose of keeping all TLB nonsense CPU local, such that invalidations can also stay local etc. However, as a side-effect, we violate this above WARN(), which sorta makes sense for the normal case, but very much doesn't make sense here. Change unuse_temporary_mm() to mark the mm_struct such that a further exception (beyond init_mm) can be grafted, to keep the warning for all the other cases. Reported-by: Chaitanya Kumar Borah Reported-by: Jani Nikula Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Rik van Riel Link: https://lore.kernel.org/r/20250430081154.GH4439@noisy.programming.kicks-ass.net commit fbaeb7b0f0ffb660bcc91dd5f96eaf8d99721656 Author: Mohsin Bashir Date: Fri May 2 19:01:45 2025 -0700 eth: fbnic: fix `tx_dropped` counting Fix the tracking of rtnl_link_stats.tx_dropped. The counter `tmi.drop.frames` is being double counted whereas, the counter `tti.cm_drop.frames` is being skipped. Fixes: f2957147ae7a ("eth: fbnic: add support for TTI HW stats") Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250503020145.1868252-1-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 8f0ae19346ce1cadf17f5ea6b01e7b6eb815e2fd Author: Jakub Kicinski Date: Fri May 2 18:18:56 2025 -0700 selftests: net: exit cleanly on SIGTERM / timeout ksft runner sends 2 SIGTERMs in a row if a test runs out of time. Handle this in a similar way we handle SIGINT - cleanup and stop running further tests. Because we get 2 signals we need a bit of logic to ignore the subsequent one, they come immediately one after the other (due to commit 9616cb34b08e ("kselftest/runner.sh: Propagate SIGTERM to runner child")). This change makes sure we run cleanup (scheduled defer()s) and also print a stack trace on SIGTERM, which doesn't happen by default. Tests occasionally hang in NIPA and it's impossible to tell what they are waiting from or doing. Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250503011856.46308-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 48d564507293082c370a5fc1eb3d73ad3de30561 Author: Quentin Perret Date: Wed Apr 16 16:09:00 2025 +0000 KVM: arm64: Extend pKVM selftest for np-guests The pKVM selftest intends to test as many memory 'transitions' as possible, so extend it to cover sharing pages with non-protected guests, including in the case of multi-sharing. Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416160900.3078417-5-qperret@google.com Signed-off-by: Marc Zyngier commit 6c2d4c319c7db7be883428ae1161502f3f690e60 Author: Quentin Perret Date: Wed Apr 16 16:08:59 2025 +0000 KVM: arm64: Selftest for pKVM transitions We have recently found a bug [1] in the pKVM memory ownership transitions by code inspection, but it could have been caught with a test. Introduce a boot-time selftest exercising all the known pKVM memory transitions and importantly checks the rejection of illegal transitions. The new test is hidden behind a new Kconfig option separate from CONFIG_EL2_NVHE_DEBUG on purpose as that has side effects on the transition checks ([1] doesn't reproduce with EL2 debug enabled). [1] https://lore.kernel.org/kvmarm/20241128154406.602875-1-qperret@google.com/ Suggested-by: Will Deacon Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416160900.3078417-4-qperret@google.com Signed-off-by: Marc Zyngier commit 845f126732a8126dee3f15855487121f4836131a Author: Quentin Perret Date: Wed Apr 16 16:08:58 2025 +0000 KVM: arm64: Don't WARN from __pkvm_host_share_guest() We currently WARN() if the host attempts to share a page that is not in an acceptable state with a guest. This isn't strictly necessary and makes testing much harder, so drop the WARN and make sure to propage the error code instead. Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416160900.3078417-3-qperret@google.com Signed-off-by: Marc Zyngier commit 74b13d5816c9389381e937b218f49f03921f87fe Author: David Brazdil Date: Wed Apr 16 16:08:57 2025 +0000 KVM: arm64: Add .hyp.data section The hypervisor has not needed its own .data section because all globals were either .rodata or .bss. To avoid having to initialize future data-structures at run-time, let's introduce add a .data section to the hypervisor. Signed-off-by: David Brazdil Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416160900.3078417-2-qperret@google.com Signed-off-by: Marc Zyngier commit e0ccc45b056d626d4b271820faeedf3837337ceb Author: Mark Brown Date: Thu Apr 17 00:32:49 2025 +0100 KVM: arm64: selftests: Add test for SVE host corruption Until recently, the kernel could unexpectedly discard SVE state for a period after a KVM_RUN ioctl, when the guest did not execute any FPSIMD/SVE/SME instructions. We fixed that issue in commit: fbc7e61195e2 ("KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state") Add a test which tries to provoke that issue by manipulating SVE state before/after running a guest which does not execute any FPSIMD/SVE/SME instructions. The test executes a handful of iterations to miminize the risk that the issue is masked by preemption. Signed-off--by: Mark Rutland Signed-off-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20250417-kvm-selftest-sve-signal-v1-1-6330c2f3da0c@kernel.org [maz: Restored MR's SoB, fixed commit message according to MR's write-up] Signed-off-by: Marc Zyngier commit bae247ccade0a5016031e73c9f6d61b758b612d8 Author: Marc Zyngier Date: Tue Apr 29 12:43:26 2025 +0100 KVM: arm64: Force HCR_EL2.xMO to 1 at all times in VHE mode We keep setting and clearing these bits depending on the role of the host kernel, mimicking what we do for nVHE. But that's actually pretty pointless, as we always want physical interrupts to make it to the host, at EL2. This has also two problems: - it prevents IRQs from being taken when these bits are cleared if the implementation has chosen to implement these bits as masks when HCR_EL2.{TGE,xMO}=={0,0} - it triggers a bad erratum on the AmpereOne HW, which catches fire on clearing these bits while an interrupt is being taken (AC03_CPU_36). Let's kill these two birds with a single stone, and permanently set the xMO bits when running VHE. This involves a bit of surgery on code paths that rely on flipping these bits on and off for other purposes. Note that the earliest setting of hcr_el2 (in the init_hcr_el2 macro) is left untouched as is runs extremely early, with interrupts disabled, and soon enough overwritten with the final value containing the xMO bits. Reported-by: D Scott Phillips Link: https://lore.kernel.org/r/20250429114326.3618875-1-maz@kernel.org Signed-off-by: Marc Zyngier commit d2f14174f9e839e1128664ab339bbe17c333208b Author: Seongsu Park Date: Tue Apr 15 10:24:05 2025 +0900 KVM: arm64: Replace ternary flags with str_on_off() helper Replace repetitive ternary expressions with the str_on_off() helper function. This change improves code readability and ensures consistency in tracepoint string formatting Signed-off-by: Seongsu Park Reviewed-by: Zenghui Yu Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/1891546521.01744691102904.JavaMail.epsvc@epcpadp1new Signed-off-by: Marc Zyngier commit 1fe38d2a19950fa6dbc384ee8967c057aef9faf4 Author: Julien Massot Date: Mon May 5 15:23:39 2025 +0200 arm64: dts: mt6359: Add missing 'compatible' property to regulators node The 'compatible' property is required by the 'mfd/mediatek,mt6397.yaml' binding. Add it to fix the following dtb-check error: mediatek/mt8395-radxa-nio-12l.dtb: pmic: regulators: 'compatible' is a required property Fixes: 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes") Signed-off-by: Julien Massot Link: https://lore.kernel.org/r/20250505-mt8395-dtb-errors-v1-3-9c4714dcdcdb@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b8202a12cdd771b55a9565814022ea8c69572cd7 Author: Rob Herring (Arm) Date: Wed Apr 9 15:50:00 2025 -0500 arm/arm64: dts: mediatek: Add missing "#sound-dai-cells" to linux,bt-sco Add missing "#sound-dai-cells" which is required by the linux,bt-sco binding. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250409205001.1522009-1-robh@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit f9167f15dd4e70b124023a2f7ba2b09401b3b6ff Author: Louis-Alexis Eyraud Date: Fri May 2 15:17:19 2025 +0200 arm64: dts: mediatek: mt8390-genio-common: Set ssusb2 default dual role mode to host On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is one but has two ports: one is routed to the M.2 slot, the other is on the RPi header who does support full OTG. Since Mediatek Genio 700-EVK USB support was added, dual role mode property is set to otg for ssusb2. This config prevents the M.2 Wifi/Bluetooth module, present on those boards and exposing Bluetooth as an USB device to be properly detected at startup as the default role is device. To keep the OTG functionality and make the M.2 module be detected at the same time, add role-switch-default-mode property set to host and also fix the polarity of GPIO associated to the USB connector, so the ssusb2 controller role is properly set to host when the other port is unused. Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX") Signed-off-by: Louis-Alexis Eyraud Link: https://lore.kernel.org/r/20250502-mtk-genio-510-700-fix-bt-detection-v2-1-870aa2145480@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 0eae9cee0d74c09f5ee7ccc0dcc6b7fbb669f68b Author: Nícolas F. R. A. Prado Date: Fri May 2 08:42:56 2025 -0400 arm64: dts: mediatek: mt8395-genio-1200-evk: Disable unused backlight The builtin panel on the Genio 1200 EVK board uses the backlight_lcm0 node for its backlight. Though the backlight_lcd1 is currently left enabled, it is unused, and its pwm input, disp_pwm1, is disabled, so it fails probe. Disable this unused node. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20250502-genio-1200-disable-backlight-lcd1-v1-1-c021d2c9e48e@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit d77e89b7b03fb945b4353f2dcc4a70b34baa7bcb Author: Nícolas F. R. A. Prado Date: Fri May 2 11:32:10 2025 -0400 arm64: dts: mediatek: mt6357: Drop regulator-fixed compatibles Some of the regulators in the MT6357 PMIC dtsi have compatible set to regulator-fixed, even though they don't serve any purpose: all those regulators are handled as a whole by the mt6357-regulator driver. In fact this is the only dtsi in this family of chips where this is the case: mt6359 and mt6358 don't have any such compatibles. A side-effect caused by this is that the DT kselftest, which is supposed to identify nodes with compatibles that can be probed, but haven't, shows these nodes as failures. Remove the useless compatibles to move the dtsi in line with the others in its family and fix the DT kselftest failures. Fixes: 55749bb478f8 ("arm64: dts: mediatek: add mt6357 device-tree") Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20250502-mt6357-regulator-fixed-compatibles-removal-v1-1-a582c16743fe@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 90131a9b064b9e8a41d919a5ff43470b5a3faf0d Merge: 8c2e6b26ffe243 8a97de243df51c Author: Paolo Abeni Date: Tue May 6 10:24:40 2025 +0200 Merge branch 'net-ibmveth-make-ibmveth-use-new-reset-function-and-new-kunit-testsg' Dave Marquardt says: ==================== net: ibmveth: Make ibmveth use new reset function and new KUnit testsg - Fixed struct ibmveth_adapter indentation - Made ibmveth driver use WARN_ON with recovery rather than BUG_ON. Some recovery code schedules a reset through new function ibmveth_reset. Also removed a conflicting and unneeded forward declaration. - Added KUnit tests for some areas changed by the WARN_ON changes. ==================== Link: https://patch.msgid.link/20250501194944.283729-1-davemarq@linux.ibm.com Signed-off-by: Paolo Abeni commit 8a97de243df51c740e62388f9858c7f2e3603495 Author: Dave Marquardt Date: Thu May 1 14:49:44 2025 -0500 net: ibmveth: added KUnit tests for some buffer pool functions Added KUnit tests for ibmveth_remove_buffer_from_pool and ibmveth_rxq_get_buffer under new IBMVETH_KUNIT_TEST config option. Signed-off-by: Dave Marquardt Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250501194944.283729-4-davemarq@linux.ibm.com Signed-off-by: Paolo Abeni commit 2c91e2319ed95f9b7608c9ac2ebd1a070918f1fc Author: Dave Marquardt Date: Thu May 1 14:49:43 2025 -0500 net: ibmveth: Reset the adapter when unexpected states are detected Reset the adapter through new function ibmveth_reset, called in WARN_ON situations. Removed conflicting and unneeded forward declaration. Signed-off-by: Dave Marquardt Link: https://patch.msgid.link/20250501194944.283729-3-davemarq@linux.ibm.com Signed-off-by: Paolo Abeni commit b30978515430508afda2c6c838c6fcd4de9971e9 Author: Dave Marquardt Date: Thu May 1 14:49:42 2025 -0500 net: ibmveth: Indented struct ibmveth_adapter correctly Made struct ibmveth_adapter follow indentation rules Signed-off-by: Dave Marquardt Reviewed-by: Michal Swiatkowski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250501194944.283729-2-davemarq@linux.ibm.com Signed-off-by: Paolo Abeni commit 258aebf100540d36aba910f545d4d5ddf4ecaf0b Author: Kees Cook Date: Fri Apr 25 23:14:32 2025 -0700 drm/vkms: Adjust vkms_state->active_planes allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct vkms_plane_state **", but the returned type will be "struct drm_plane **". These are the same size (pointer size), but the types don't match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Reviewed-by: Louis Chauvet Fixes: 8b1865873651 ("drm/vkms: totally reworked crc data tracking") Link: https://lore.kernel.org/r/20250426061431.work.304-kees@kernel.org Signed-off-by: Louis Chauvet commit c6599944af5a09029259ff8c533d22754f2b1ba4 Author: Chukun Pan Date: Tue Apr 1 20:00:20 2025 +0800 arm64: dts: rockchip: Enable regulators for Radxa E20C Enable pwm and fixed regulators for Radxa E20C. The pwm regulator is used to power the CPU and GPU. Note that the LPDDR4 voltage is 1.1V. Signed-off-by: Chukun Pan Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250401120020.976343-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 9e701ad7c3551b3ab87ed5fa439569696ddf42e4 Author: Chukun Pan Date: Tue Apr 1 20:00:19 2025 +0800 arm64: dts: rockchip: Add pwm nodes for RK3528 Add pwm nodes for RK3528. The PWM core on RK3528 is the same as RK3328, but the driver does not support interrupts yet. Signed-off-by: Chukun Pan Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250401120020.976343-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit cc663ba3fe383a628a812f893cc98aafff39ab04 Author: Ahmed S. Darwish Date: Tue May 6 07:04:13 2025 +0200 x86/cpu: Sanitize CPUID(0x80000000) output CPUID(0x80000000).EAX returns the max extended CPUID leaf available. On x86-32 machines without an extended CPUID range, a CPUID(0x80000000) query will just repeat the output of the last valid standard CPUID leaf on the CPU; i.e., a garbage values. Current tip:x86/cpu code protects against this by doing: eax = cpuid_eax(0x80000000); c->extended_cpuid_level = eax; if ((eax & 0xffff0000) == 0x80000000) { // CPU has an extended CPUID range. Check for 0x80000001 if (eax >= 0x80000001) { cpuid(0x80000001, ...); } } This is correct so far. Afterwards though, the same possibly broken EAX value is used to check the availability of other extended CPUID leaves: if (c->extended_cpuid_level >= 0x80000007) ... if (c->extended_cpuid_level >= 0x80000008) ... if (c->extended_cpuid_level >= 0x8000000a) ... if (c->extended_cpuid_level >= 0x8000001f) ... which is invalid. Fix this by immediately setting the CPU's max extended CPUID leaf to zero if CPUID(0x80000000).EAX doesn't indicate a valid CPUID extended range. While at it, add a comment, similar to kernel/head_32.S, clarifying the CPUID(0x80000000) sanity check. References: 8a50e5135af0 ("x86-32: Use symbolic constants, safer CPUID when enabling EFER.NX") Fixes: 3da99c977637 ("x86: make (early)_identify_cpu more the same between 32bit and 64 bit") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: H. Peter Anvin Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250506050437.10264-3-darwi@linutronix.de commit 49394b5af45cc368c587371592a7c5f71834557e Author: Ahmed S. Darwish Date: Tue May 6 07:04:12 2025 +0200 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.4 Update kcpuid's CSV file to version 2.4, as generated by x86-cpuid-db. Summary of the v2.4 changes: * Mark CPUID(0x80000001) EDX:23 bit, 'e_mmx', as not exclusive to Transmeta since it is supported by AMD as well. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: H. Peter Anvin Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.4/CHANGELOG.rst Link: https://lore.kernel.org/r/20250506050437.10264-2-darwi@linutronix.de commit 24035886d735e4ce1c4605638adafe1fa2988e7a Merge: 3aba0b40cacdfb 92a09c47464d04 Author: Ingo Molnar Date: Tue May 6 09:59:02 2025 +0200 Merge tag 'v6.15-rc5' into x86/cpu, to resolve conflicts Conflicts: tools/arch/x86/include/asm/cpufeatures.h Signed-off-by: Ingo Molnar commit e56616d7b23c120626a4ea670d893bf6e9bf44cd Author: Benjamin Mugnier Date: Wed Apr 30 10:24:39 2025 +0200 media: i2c: Add driver for ST VD55G1 camera sensor The VD55G1 is a monochrome global shutter camera with a 804x704 maximum resolution with RAW8 and RAW10 bytes per pixel. The driver supports : - Auto exposure from the sensor, or manual exposure mode - HDR subtraction mode, allowing edge detection and background removal - Auto exposure cold start, using configuration values from last stream to start the next one - LED GPIOs for illumination - Most standard camera sensor features (hblank, vblank, test patterns, again, dgain, hflip, vflip, auto exposure bias, etc.) Add driver source code to MAINTAINERS file. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit fba4aa083104808a1098c2863130fab230f959dc Author: Benjamin Mugnier Date: Wed Apr 30 10:24:38 2025 +0200 media: dt-bindings: Add ST VD55G1 camera sensor Also update MAINTAINERS file accordingly. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 87aa97fc315759323475c3742664547830256d83 Author: Sylvain Petinot Date: Fri May 2 22:18:49 2025 +0200 media: i2c: Add driver for ST VD56G3 camera sensor Add V4L2 sub-device driver for STMicroelectronics VD56G3 camera sensor. This is a 1.5 M pixel global shutter image sensor with an active array size of 1124 x 1364 (portrait orientation). The driver supports Mono (VD56G3) and Color (VD66GY) variants. Signed-off-by: Sylvain Petinot Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5ef6bedb29f244e4ea5e9829f174eaf05f82eb6a Author: Sylvain Petinot Date: Fri May 2 22:18:48 2025 +0200 media: dt-bindings: Add ST VD56G3 camera sensor Add devicetree bindings Documentation for ST VD56G3 & ST VD66GY camera sensors. Update MAINTAINERS file. Signed-off-by: Sylvain Petinot Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 44f89010dae0eff6aabb9c14fb4b1001542498b4 Author: Heimir Thor Sverrisson Date: Thu Mar 27 17:49:27 2025 +0100 media: i2c: Add Omnivision OV02C10 sensor driver Add a new driver for the Omnivision OV02C10 camera sensor. This is based on the out of tree driver by Hao Yao from: https://github.com/intel/ipu6-drivers/blob/master/drivers/media/i2c/ov02c10.c This has been tested on a Dell XPS 9440 together with the IPU6 isys CSI driver and the libcamera software ISP code. Tested-by: Ingvar Hagelund # Dell XPS 9340 Tested-by: Heimir Thor Sverrisson # Dell XPS 9440 Signed-off-by: Heimir Thor Sverrisson Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Co-developed-by: Hans de Goede Signed-off-by: Hans de Goede Tested-by: Stanislaw Gruszka # Dell XPS 9340 Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f287a048bccbf7e5a5d1cc55c974ee8ebda83ddc Author: Bryan O'Donoghue Date: Tue Apr 29 10:34:34 2025 +0100 media: dt-bindings: Add OmniVision OV02C10 Extend the ov02e10 bindings yaml to describe the ov02c10 sensor which has the same bindings with a different compat string and different i2c address only. Other differences in sensor capabilities exist but are not expressed in devicetree. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: fix typos: 0V02C10 -> OV02C10] [hverkuil: fix type: Ominivision -> OmniVision] commit 6a5ca33b88b5cd6ff216593dc8d13c8b4bef6704 Merge: 8ecd32b668238a 5e0c67998152bd Author: Thomas Zimmermann Date: Tue May 6 09:09:49 2025 +0200 Merge drm/drm-next into drm-misc-next Backmerging drm-next to get fixes from v6.15-rc5. Signed-off-by: Thomas Zimmermann commit 5e0c67998152bdb91b056160449ee542b86271a5 Merge: 135130db6ee650 92a09c47464d04 Author: Dave Airlie Date: Tue May 6 16:39:25 2025 +1000 BackMerge tag 'v6.15-rc5' into drm-next Linux 6.15-rc5, requested by tzimmerman for fixes required in drm-next. Signed-off-by: Dave Airlie commit 3ee7d9496342246f4353716f6bbf64c945ff6e2d Author: Christoph Hellwig Date: Mon May 5 10:01:46 2025 +0300 docs: core-api: document the IOVA-based API Add an explanation of the newly added IOVA-based mapping API. Signed-off-by: Christoph Hellwig Tested-by: Jens Axboe Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit 5f3b133a23c545272b6bc1e818a5a35e1ca84b1e Author: Christoph Hellwig Date: Mon May 5 10:01:45 2025 +0300 dma-mapping: add a dma_need_unmap helper Add helper that allows a driver to skip calling dma_unmap_* if the DMA layer can guarantee that they are no-nops. Signed-off-by: Christoph Hellwig Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit 433a76207dcf5facc0183acb790f6e8398585258 Author: Leon Romanovsky Date: Mon May 5 10:01:44 2025 +0300 dma-mapping: Implement link/unlink ranges API Introduce new DMA APIs to perform DMA linkage of buffers in layers higher than DMA. In proposed API, the callers will perform the following steps. In map path: if (dma_can_use_iova(...)) dma_iova_alloc() for (page in range) dma_iova_link_next(...) dma_iova_sync(...) else /* Fallback to legacy map pages */ for (all pages) dma_map_page(...) In unmap path: if (dma_can_use_iova(...)) dma_iova_destroy() else for (all pages) dma_unmap_page(...) Reviewed-by: Christoph Hellwig Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit ed18a46262be4397cdc24382fb331c68846fef6e Author: Christoph Hellwig Date: Mon May 5 10:01:43 2025 +0300 iommu/dma: Factor out a iommu_dma_map_swiotlb helper Split the iommu logic from iommu_dma_map_page into a separate helper. This not only keeps the code neatly separated, but will also allow for reuse in another caller. Signed-off-by: Christoph Hellwig Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Reviewed-by: Lu Baolu Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit 393cf700e6242032fbad51b248111ab6740ce8ad Author: Leon Romanovsky Date: Mon May 5 10:01:42 2025 +0300 dma-mapping: Provide an interface to allow allocate IOVA The existing .map_pages() callback provides both allocating of IOVA and linking DMA pages. That combination works great for most of the callers who use it in control paths, but is less effective in fast paths where there may be multiple calls to map_page(). These advanced callers already manage their data in some sort of database and can perform IOVA allocation in advance, leaving range linkage operation to be in fast path. Provide an interface to allocate/deallocate IOVA and next patch link/unlink DMA ranges to that specific IOVA. In the new API a DMA mapping transaction is identified by a struct dma_iova_state, which holds some recomputed information for the transaction which does not change for each page being mapped, so add a check if IOVA can be used for the specific transaction. The API is exported from dma-iommu as it is the only implementation supported, the namespace is clearly different from iommu_* functions which are not allowed to be used. This code layout allows us to save function call per API call used in datapath as well as a lot of boilerplate code. Reviewed-by: Christoph Hellwig Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit dc2e69294358693cf5fba1a15717863d201d8838 Author: Leon Romanovsky Date: Mon May 5 10:01:41 2025 +0300 iommu: add kernel-doc for iommu_unmap_fast Add kernel-doc section for iommu_unmap_fast to document existing limitation of underlying functions which can't split individual ranges. Suggested-by: Jason Gunthorpe Acked-by: Will Deacon Reviewed-by: Christoph Hellwig Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Reviewed-by: Luis Chamberlain Reviewed-by: Lu Baolu Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit 5c87cffe2d3853cfae61e9373ee98a0409839178 Author: Christoph Hellwig Date: Mon May 5 10:01:40 2025 +0300 iommu: generalize the batched sync after map interface For the upcoming IOVA-based DMA API we want to batch the ops->iotlb_sync_map() call after mapping multiple IOVAs from dma-iommu without having a scatterlist. Improve the API. Add a wrapper for the map_sync as iommu_sync_map() so that callers don't need to poke into the methods directly. Formalize __iommu_map() into iommu_map_nosync() which requires the caller to call iommu_sync_map() after all maps are completed. Refactor the existing sanity checks from all the different layers into iommu_map_nosync(). Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Tested-by: Jens Axboe Reviewed-by: Jason Gunthorpe Reviewed-by: Luis Chamberlain Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit ca2c2e4a78c619bcf1c1df29fee5981035f3fcbc Author: Christoph Hellwig Date: Mon May 5 10:01:39 2025 +0300 dma-mapping: move the PCI P2PDMA mapping helpers to pci-p2pdma.h To support the upcoming non-scatterlist mapping helpers, we need to go back to have them called outside of the DMA API. Thus move them out of dma-map-ops.h, which is only for DMA API implementations to pci-p2pdma.h, which is for driver use. Note that the core helper is still not exported as the mapping is expected to be done only by very highlevel subsystem code at least for now. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Reviewed-by: Lu Baolu Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit a25e7962db0d79882c9d32fd2a67a02e79129c0e Author: Christoph Hellwig Date: Mon May 5 10:01:38 2025 +0300 PCI/P2PDMA: Refactor the p2pdma mapping helpers The current scheme with a single helper to determine the P2P status and map a scatterlist segment force users to always use the map_sg helper to DMA map, which we're trying to get away from because they are very cache inefficient. Refactor the code so that there is a single helper that checks the P2P state for a page, including the result that it is not a P2P page to simplify the callers, and a second one to perform the address translation for a bus mapped P2P transfer that does not depend on the scatterlist structure. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Tested-by: Jens Axboe Reviewed-by: Luis Chamberlain Reviewed-by: Lu Baolu Signed-off-by: Leon Romanovsky Signed-off-by: Marek Szyprowski commit 5a821e2d69e26b51b7f3740b6b0c3462b8cacaff Author: Michal Suchanek Date: Mon Mar 31 12:57:19 2025 +0200 powerpc/boot: Fix build with gcc 15 Similar to x86 the ppc boot code does not build with GCC 15. Copy the fix from commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") Signed-off-by: Michal Suchanek Tested-by: Amit Machhiwal Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250331105722.19709-1-msuchanek@suse.de commit 8c628207d6d114d16ee4f07ba8ee806b4982b13f Author: John Garry Date: Thu May 1 10:02:41 2025 +0000 scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH The default atomic write max length in DEF_ATOMIC_WR_MAX_LENGTH is excessively large. For 512B LBS, we would get a 4MB max, but due to block layer atomic write restrictions this is limited to 512KB. Reduce DEF_ATOMIC_WR_MAX_LENGTH to a value which would be more realistic (for a real device supporting atomic writes), 64KB. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20250501100241.930071-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 0e937fd51e8abe73ade41d8844ff20f5c80395bb Author: Dan Carpenter Date: Wed Apr 30 11:09:16 2025 +0300 scsi: smartpqi: Delete a stray tab in pqi_is_parity_write_stream() We accidentally indented this line an extra tab. Delete the tab. Signed-off-by: Dan Carpenter Acked-by: Don Brace Link: https://lore.kernel.org/r/aBHarJ601XTGsyOX@stanley.mountain Signed-off-by: Martin K. Petersen commit bf6971a2b3eeb13535c907c03589f82a1adc429e Author: Nathan Chancellor Date: Tue Apr 29 17:46:49 2025 -0700 scsi: dc395x: Remove leftover if statement in reselect() Clang warns (or errors with CONFIG_WERROR=y): drivers/scsi/dc395x.c:2553:6: error: variable 'id' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 2553 | if (!(rsel_tar_lun_id & (IDENTIFY_BASE << 8))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/dc395x.c:2556:22: note: uninitialized use occurs here 2556 | dcb = find_dcb(acb, id, lun); | ^~ drivers/scsi/dc395x.c:2553:2: note: remove the 'if' if its condition is always true 2553 | if (!(rsel_tar_lun_id & (IDENTIFY_BASE << 8))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2554 | id = rsel_tar_lun_id & 0xff; This if statement only existed for a debugging print but it was not removed with the debugging print in a recent cleanup, leading to id only being initialized when the if condition is true. Remove the if statement to ensure id is always initialized, clearing up the warning. Fixes: 62b434b0db2c ("scsi: dc395x: Remove DEBUG conditional compilation") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250429-scsi-dc395x-fix-uninit-var-v1-1-25215d481020@kernel.org Signed-off-by: Martin K. Petersen commit 8c2e6b26ffe243be1e78f5a4bfb1a857d6e6f6d6 Author: Jon Kohler Date: Wed Apr 30 19:04:28 2025 -0700 vhost/net: Defer TX queue re-enable until after sendmsg In handle_tx_copy, TX batching processes packets below ~PAGE_SIZE and batches up to 64 messages before calling sock->sendmsg. Currently, when there are no more messages on the ring to dequeue, handle_tx_copy re-enables kicks on the ring *before* firing off the batch sendmsg. However, sock->sendmsg incurs a non-zero delay, especially if it needs to wake up a thread (e.g., another vhost worker). If the guest submits additional messages immediately after the last ring check and disablement, it triggers an EPT_MISCONFIG vmexit to attempt to kick the vhost worker. This may happen while the worker is still processing the sendmsg, leading to wasteful exit(s). This is particularly problematic for single-threaded guest submission threads, as they must exit, wait for the exit to be processed (potentially involving a TTWU), and then resume. In scenarios like a constant stream of UDP messages, this results in a sawtooth pattern where the submitter frequently vmexits, and the vhost-net worker alternates between sleeping and waking. A common solution is to configure vhost-net busy polling via userspace (e.g., qemu poll-us). However, treating the sendmsg as the "busy" period by keeping kicks disabled during the final sendmsg and performing one additional ring check afterward provides a significant performance improvement without any excess busy poll cycles. If messages are found in the ring after the final sendmsg, requeue the TX handler. This ensures fairness for the RX handler and allows vhost_run_work_list to cond_resched() as needed. Test Case TX VM: taskset -c 2 iperf3 -c rx-ip-here -t 60 -p 5200 -b 0 -u -i 5 RX VM: taskset -c 2 iperf3 -s -p 5200 -D 6.12.0, each worker backed by tun interface with IFF_NAPI setup. Note: TCP side is largely unchanged as that was copy bound 6.12.0 unpatched EPT_MISCONFIG/second: 5411 Datagrams/second: ~382k Interval Transfer Bitrate Lost/Total Datagrams 0.00-30.00 sec 15.5 GBytes 4.43 Gbits/sec 0/11481630 (0%) sender 6.12.0 patched EPT_MISCONFIG/second: 58 (~93x reduction) Datagrams/second: ~650k (~1.7x increase) Interval Transfer Bitrate Lost/Total Datagrams 0.00-30.00 sec 26.4 GBytes 7.55 Gbits/sec 0/19554720 (0%) sender Acked-by: Jason Wang Signed-off-by: Jon Kohler Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250501020428.1889162-1-jon@nutanix.com Signed-off-by: Jakub Kicinski commit c2dbda07662eb84dfe07887775d08eb1536c2d22 Author: Ruben Wauters Date: Thu May 1 21:23:55 2025 +0100 ipv4: ip_tunnel: Replace strcpy use with strscpy Use of strcpy is decpreated, replaces the use of strcpy with strscpy as recommended. strscpy was chosen as it requires a NUL terminated non-padded string, which is the case here. I am aware there is an explicit bounds check above the second instance, however using strscpy protects against buffer overflows in any future code, and there is no good reason I can see to not use it. I have also replaced the scrscpy above that had 3 params with the version using 2 params. These are functionally equivalent, but it is cleaner to have both using 2 params. Signed-off-by: Ruben Wauters Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250501202935.46318-1-rubenru09@aol.com Signed-off-by: Jakub Kicinski commit 18b8144a1bd8be5a88cc438c0c9213bae1be1a9d Author: Zizhi Wo Date: Thu Apr 17 21:20:54 2025 +0800 blk-throttle: Add an additional overflow check to the call calculate_bytes/io_allowed Now the tg->[bytes/io]_disp type is signed, and calculate_bytes/io_allowed return type is unsigned. Even if the bps/iops limit is not set to max, the return value of the function may still exceed INT_MAX or LLONG_MAX, which can cause overflow in outer variables. In such cases, we can add additional checks accordingly. And in throtl_trim_slice(), if the BPS/IOPS limit is set to max, there's no need to call calculate_bytes/io_allowed(). Introduces the helper functions throtl_trim_bps/iops to simplifies the process. For cases when the calculated trim value exceeds INT_MAX (causing an overflow), we reset tg->[bytes/io]_disp to zero, so return original tg->[bytes/io]_disp because it is the size that is actually trimmed. Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20250417132054.2866409-4-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit 7b89d46051ab310096994303b969768c4a9eb18f Author: Zizhi Wo Date: Thu Apr 17 21:20:53 2025 +0800 blk-throttle: Delete unnecessary carryover-related fields from throtl_grp We no longer need carryover_[bytes/ios] in tg, so it is removed. The related comments about carryover in tg are also merged into [bytes/io]_disp, and modify other related comments. Signed-off-by: Zizhi Wo Reviewed-by: Ming Lei Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20250417132054.2866409-3-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit f66cf69eb8765341bbeff0e92a7d0d2027f62452 Author: Zizhi Wo Date: Thu Apr 17 21:20:52 2025 +0800 blk-throttle: Fix wrong tg->[bytes/io]_disp update in __tg_update_carryover() In commit 6cc477c36875 ("blk-throttle: carry over directly"), the carryover bytes/ios was be carried to [bytes/io]_disp. However, its update mechanism has some issues. In __tg_update_carryover(), we calculate "bytes" and "ios" to represent the carryover, but the computation when updating [bytes/io]_disp is incorrect. And if the sq->nr_queued is empty, we may not update tg->[bytes/io]_disp to 0 in tg_update_carryover(). We should set it to 0 in non carryover case. This patch fixes the issue. Fixes: 6cc477c36875 ("blk-throttle: carry over directly") Signed-off-by: Zizhi Wo Reviewed-by: Yu Kuai Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250417132054.2866409-2-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe commit 8feafba59c510be3189a1564f5e37c411a87ebc5 Author: Howard Chu Date: Wed Apr 30 19:28:08 2025 -0700 perf test: Add direct off-cpu tests Since we added --off-cpu-thresh, add tests for when a sample's off-cpu time is above the threshold, and when it's below the threshold. Note that the basic test performed in test_offcpu_basic() collects a direct sample now, since sleep 1 has duration of 1000ms, higher than the default value of --off-cpu-thresh of 500ms, resulting in a direct sample. An example: $ sudo perf test offcpu 124: perf record offcpu profiling tests : Ok $ Committer testing: root@number:~# perf test offcpu 126: perf record offcpu profiling tests : Ok root@number:~# perf test -v offcpu 126: perf record offcpu profiling tests : Ok root@number:~# perf test -vv offcpu 126: perf record offcpu profiling tests: --- start --- test child forked, pid 1410791 Checking off-cpu privilege Basic off-cpu test Basic off-cpu test [Success] Child task off-cpu test Child task off-cpu test [Success] Threshold test (above threshold) Threshold test (above threshold) [Success] Threshold test (below threshold) Threshold test (below threshold) [Success] ---- end(0) ---- 126: perf record offcpu profiling tests : Ok root@number:~# Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250501022809.449767-11-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 9557c000768741bb42a04a3c20c2bf2a5e60445a Author: Howard Chu Date: Wed Apr 30 19:28:07 2025 -0700 perf record --off-cpu: Add --off-cpu-thresh option Specify the threshold for dumping offcpu samples with --off-cpu-thresh, the unit is milliseconds. Default value is 500ms. Example: perf record --off-cpu --off-cpu-thresh 824 The example above collects direct off-cpu samples where the off-cpu time is longer than 824ms. Committer testing: After commenting out the end off-cpu dump to have just the ones that are added right after the task is scheduled back, and using a threshould of 1000ms, we see some periods (the 5th column, just before "offcpu-time" in the 'perf script' output) that are over 1000.000.000 nanoseconds: root@number:~# perf record --off-cpu --off-cpu-thresh 10000 ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 3.902 MB perf.data (34335 samples) ] root@number:~# perf script Isolated Web Co 59932 [028] 63839.594437: 1000049427 offcpu-time: 7fe63c7976c2 __syscall_cancel_arch_end+0x0 (/usr/lib64/libc.so.6) 7fe63c78c04c __futex_abstimed_wait_common+0x7c (/usr/lib64/libc.so.6) 7fe63c78e928 pthread_cond_timedwait@@GLIBC_2.3.2+0x178 (/usr/lib64/libc.so.6) 5599974a9fe7 mozilla::detail::ConditionVariableImpl::wait_for(mozilla::detail::MutexImpl&, mozilla::BaseTimeDuration const&)+0xe7 (/usr/lib64/fir> 100000000 [unknown] ([unknown]) swapper 0 [025] 63839.594459: 195724 cycles:P: ffffffffac328270 read_tsc+0x0 ([kernel.kallsyms]) Isolated Web Co 59932 [010] 63839.594466: 1000055278 offcpu-time: 7fe63c7976c2 __syscall_cancel_arch_end+0x0 (/usr/lib64/libc.so.6) 7fe63c78ba24 __syscall_cancel+0x14 (/usr/lib64/libc.so.6) 7fe63c804c4e __poll+0x1e (/usr/lib64/libc.so.6) 7fe633b0d1b8 PollWrapper(_GPollFD*, unsigned int, int) [clone .lto_priv.0]+0xf8 (/usr/lib64/firefox/libxul.so) 10000002c [unknown] ([unknown]) swapper 0 [027] 63839.594475: 134433 cycles:P: ffffffffad4c45d9 irqentry_enter+0x19 ([kernel.kallsyms]) swapper 0 [028] 63839.594499: 215838 cycles:P: ffffffffac39199a switch_mm_irqs_off+0x10a ([kernel.kallsyms]) MediaPD~oder #1 1407676 [027] 63839.594514: 134433 cycles:P: 7f982ef5e69f dct_IV(int*, int, int*)+0x24f (/usr/lib64/libfdk-aac.so.2.0.0) swapper 0 [024] 63839.594524: 267411 cycles:P: ffffffffad4c6ee6 poll_idle+0x56 ([kernel.kallsyms]) MediaSu~sor #75 1093827 [026] 63839.594555: 332652 cycles:P: 55be753ad030 moz_xmalloc+0x200 (/usr/lib64/firefox/firefox) swapper 0 [027] 63839.594616: 160548 cycles:P: ffffffffad144840 menu_select+0x570 ([kernel.kallsyms]) Isolated Web Co 14019 [027] 63839.595120: 1000050178 offcpu-time: 7fc9537cc6c2 __syscall_cancel_arch_end+0x0 (/usr/lib64/libc.so.6) 7fc9537c104c __futex_abstimed_wait_common+0x7c (/usr/lib64/libc.so.6) 7fc9537c3928 pthread_cond_timedwait@@GLIBC_2.3.2+0x178 (/usr/lib64/libc.so.6) 7fc95372a3c8 pt_TimedWait+0xb8 (/usr/lib64/libnspr4.so) 7fc95372a8d8 PR_WaitCondVar+0x68 (/usr/lib64/libnspr4.so) 7fc94afb1f7c WatchdogMain(void*)+0xac (/usr/lib64/firefox/libxul.so) 7fc947498660 [unknown] ([unknown]) 7fc9535fce88 [unknown] ([unknown]) 7fc94b620e60 WatchdogManager::~WatchdogManager()+0x0 (/usr/lib64/firefox/libxul.so) fff8548387f8b48 [unknown] ([unknown]) swapper 0 [003] 63839.595712: 212948 cycles:P: ffffffffacd5b865 acpi_os_read_port+0x55 ([kernel.kallsyms]) Suggested-by: Arnaldo Carvalho de Melo Suggested-by: Ian Rogers Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-2-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-10-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 74069a01609ef0f499fa6bf89bb1b017eba16b0d Author: Howard Chu Date: Wed Apr 30 19:28:06 2025 -0700 perf record --off-cpu: Dump the remaining PERF_SAMPLE_ in sample_type from BPF's stack trace map Dump the remaining PERF_SAMPLE_ data, as if it is dumping a direct sample. Put the stack trace, tid, off-cpu time and cgroup id into the raw_data section, just like a direct off-cpu sample coming from BPF's bpf_perf_event_output(). This ensures that evsel__parse_sample() correctly parses both direct samples and accumulated samples. Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-10-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-9-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 8ae7a5769b0a3ac2b00a6e688705860ac48ab3b8 Author: Howard Chu Date: Wed Apr 30 19:28:05 2025 -0700 perf script: Display off-cpu samples correctly No PERF_SAMPLE_CALLCHAIN in sample_type, but 'perf script' needs to display a callchain, have to specify manually. Also, prefer displaying a callchain: gvfs-afc-volume 2267 [001] 3829232.955656: 1001115340 offcpu-time: 77f05292603f __pselect+0xbf (/usr/lib/x86_64-linux-gnu/libc.so.6) 77f052a1801c [unknown] (/usr/lib/x86_64-linux-gnu/libusbmuxd-2.0.so.6.0.0) 77f052a18d45 [unknown] (/usr/lib/x86_64-linux-gnu/libusbmuxd-2.0.so.6.0.0) 77f05289ca94 start_thread+0x384 (/usr/lib/x86_64-linux-gnu/libc.so.6) 77f052929c3c clone3+0x2c (/usr/lib/x86_64-linux-gnu/libc.so.6) to a raw binary BPF output: BPF output: 0000: dd 08 00 00 db 08 00 00
...... 0008: cc ce ab 3b 00 00 00 00 Ϋ;.... 0010: 06 00 00 00 00 00 00 00 ........ 0018: 00 fe ff ff ff ff ff ff . 0020: 3f 60 92 52 f0 77 00 00 ?`.Rw.. 0028: 1c 80 a1 52 f0 77 00 00 ..Rw.. 0030: 45 8d a1 52 f0 77 00 00 E.Rw.. 0038: 94 ca 89 52 f0 77 00 00 ..Rw.. 0040: 3c 9c 92 52 f0 77 00 00 <..Rw.. 0048: 00 00 00 00 00 00 00 00 ........ 0050: 00 00 00 00 .... Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-9-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-8-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 7de1a87f1ee757433743e8655e5eb521c432e589 Author: Howard Chu Date: Wed Apr 30 19:28:04 2025 -0700 perf record --off-cpu: Disable perf_event's callchain collection There is a check in evsel.c that does this: if (evsel__is_offcpu_event(evsel)) evsel->core.attr.sample_type &= OFFCPU_SAMPLE_TYPES; This along with: #define OFFCPU_SAMPLE_TYPES (PERF_SAMPLE_IDENTIFIER | PERF_SAMPLE_IP | \ PERF_SAMPLE_TID | PERF_SAMPLE_TIME | \ PERF_SAMPLE_ID | PERF_SAMPLE_CPU | \ PERF_SAMPLE_PERIOD | PERF_SAMPLE_CALLCHAIN | \ PERF_SAMPLE_CGROUP) will tell perf_event to collect callchain. We don't need the callchain from perf_event when collecting off-cpu samples, because it's prev's callchain, not next's callchain. (perf_event) (task_storage) (needed) prev next | | ---sched_switch----> Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-8-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-7-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 7f8f56475d58511729429b2e52787606c4062ad0 Author: Howard Chu Date: Wed Apr 30 19:28:03 2025 -0700 perf evsel: Assemble off-cpu samples Use the data in bpf-output samples, to assemble off-cpu samples. In evsel__is_offcpu_event(), check if sample_type is PERF_SAMPLE_RAW to support off-cpu sample data created by an older version of perf. Testing compatibility on off-cpu samples collected by perf before this patch series: See below, the sample_type still uses PERF_SAMPLE_CALLCHAIN $ perf script --header -i ./perf.data.ptn | grep "event : name = offcpu-time" # event : name = offcpu-time, , id = { 237917, 237918, 237919, 237920 }, type = 1 (software), size = 136, config = 0xa (PERF_COUNT_SW_BPF_OUTPUT), { sample_period, sample_freq } = 1, sample_type = IP|TID|TIME|CALLCHAIN|CPU|PERIOD|IDENTIFIER, read_format = ID|LOST, disabled = 1, freq = 1, sample_id_all = 1 The output is correct. $ perf script -i ./perf.data.ptn | grep offcpu-time gmain 2173 [000] 18446744069.414584: 100102015 offcpu-time: NetworkManager 901 [000] 18446744069.414584: 5603579 offcpu-time: Web Content 1183550 [000] 18446744069.414584: 46278 offcpu-time: gnome-control-c 2200559 [000] 18446744069.414584: 11998247014 offcpu-time: $ And after this patch series: $ perf script --header -i ./perf.data.off-cpu-v9 | grep "event : name = offcpu-time" # event : name = offcpu-time, , id = { 237959, 237960, 237961, 237962 }, type = 1 (software), size = 136, config = 0xa (PERF_COUNT_SW_BPF_OUTPUT), { sample_period, sample_freq } = 1, sample_type = IP|TID|TIME|CPU|PERIOD|RAW|IDENTIFIER, read_format = ID|LOST, disabled = 1, freq = 1, sample_id_all = 1 $ ./perf script -i ./perf.data.off-cpu-v9 | grep offcpu-time gnome-shell 1875 [001] 4789616.361225: 100097057 offcpu-time: gnome-shell 1875 [001] 4789616.461419: 100107463 offcpu-time: firefox 2206821 [002] 4789616.475690: 255257245 offcpu-time: $ Committer testing: The command to record those samples: root@number:~# perf record --off-cpu -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.092 MB perf.data (1552 samples) ] root@number:~# Then, before this patch series, the sample_type for the "offcpu-time" event is: root@number:~# perf evlist -v | grep offcpu-time offcpu-time: type: 1 (PERF_TYPE_SOFTWARE), size: 136, config: 0xa (PERF_COUNT_SW_BPF_OUTPUT), { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD|IDENTIFIER, read_format: ID|LOST, disabled: 1, freq: 1, sample_id_all: 1 root@number:~# And after it, after recording it again: root@number:~# perf record --off-cpu -a sleep 1 ; perf evlist -v | grep offcpu-time [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.151 MB perf.data (2843 samples) ] offcpu-time: type: 1 (PERF_TYPE_SOFTWARE), size: 136, config: 0xa (PERF_COUNT_SW_BPF_OUTPUT), { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|IDENTIFIER, read_format: ID|LOST, disabled: 1, sample_id_all: 1 root@number:~# Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-7-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-6-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit d6948f2af24e04ea291a35743e2645a957950a96 Author: Howard Chu Date: Wed Apr 30 19:28:02 2025 -0700 perf record --off-cpu: Dump off-cpu samples in BPF Collect tid, period, callchain, and cgroup id and dump them when off-cpu time threshold is reached. We don't collect the off-cpu time twice (the delta), it's either in direct samples, or accumulated samples that are dumped at the end of perf.data. Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-6-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-5-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 282c195906c76ddf1e0951eb7b6ae85d9eb92293 Author: Howard Chu Date: Wed Apr 30 19:28:01 2025 -0700 perf record --off-cpu: Preparation of off-cpu BPF program Set the perf_event map in BPF for dumping off-cpu samples, and set the offcpu_thresh to specify the threshold. Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-5-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-4-howardchu95@gmail.com [ Added some missing iteration variables to off_cpu_config() and fixed up a manually edited patch hunk line boundary line ] Signed-off-by: Arnaldo Carvalho de Melo commit 0f72027bb9fb77a2b2ea7d73e6d58bb9c0efb1e8 Author: Howard Chu Date: Wed Apr 30 19:28:00 2025 -0700 perf record --off-cpu: Parse off-cpu event Parse the off-cpu event using parse_event(), as bpf-output. Call evlist__enable_evsel() on off-cpu event. This fixes the inability to collect direct off-cpu samples on a workload, as reported by Arnaldo Carvalho de Melo . The reason being, workload sets enable_on_exec instead of calling evlist__enable(), but off-cpu event does not attach to an executable and execve won't be called, so the fds from perf_event_open() are not enabled. no-inherit should be set to 1, here's the reason: We update the BPF perf_event map for direct off-cpu sample dumping (in following patches), it executes as follows: bpf_map_update_value() bpf_fd_array_map_update_elem() perf_event_fd_array_get_ptr() perf_event_read_local() In perf_event_read_local(), there is: int perf_event_read_local(struct perf_event *event, u64 *value, u64 *enabled, u64 *running) { ... /* * It must not be an event with inherit set, we cannot read * all child counters from atomic context. */ if (event->attr.inherit) { ret = -EOPNOTSUPP; goto out; } Which means no-inherit has to be true for updating the BPF perf_event map. Moreover, for bpf-output events, we primarily want a system-wide event instead of a per-task event. The reason is that in BPF's bpf_perf_event_output(), BPF uses the CPU index to retrieve the perf_event file descriptor it outputs to. Making a bpf-output event system-wide naturally satisfies this requirement by mapping CPU appropriately. Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-4-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-3-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 671e943452b18001fe6286d0538825089400eed8 Author: Howard Chu Date: Wed Apr 30 19:27:59 2025 -0700 perf evsel: Expose evsel__is_offcpu_event() for future use Expose evsel__is_offcpu_event() so it can be used in off_cpu_config(), evsel__parse_sample() and 'perf script'. Reviewed-by: Ian Rogers Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Tested-by: Gautam Menghani Tested-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241108204137.2444151-3-howardchu95@gmail.com Link: https://lore.kernel.org/r/20250501022809.449767-2-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit f267eeeec8781f44faf71739a044cbc85e3fb377 Merge: 953d9480f7d1be 63fb100bf5241f Author: Jakub Kicinski Date: Mon May 5 17:17:43 2025 -0700 Merge branch 'net-ethtool-introduce-ethnl-dump-helpers' Maxime Chevallier says: ==================== net: ethtool: Introduce ethnl dump helpers This is V8 for per-phy DUMP helpers, improving support for ->dumpit() operations for PHY targetting commands. This V8 fixes some issues spotted by Jakub (thanks !) on the multi-part DUMP sequence. The netdev reftracking was reworked to make sure that during a filtered DUMP, we only keep a ref on the netdev during individual .dumpit() calls. v1: https://lore.kernel.org/20250305141938.319282-1-maxime.chevallier@bootlin.com v2: https://lore.kernel.org/20250308155440.267782-1-maxime.chevallier@bootlin.com v3: https://lore.kernel.org/20250313182647.250007-1-maxime.chevallier@bootlin.com v4: https://lore.kernel.org/20250324104012.367366-1-maxime.chevallier@bootlin.com v5: https://lore.kernel.org/20250410123350.174105-1-maxime.chevallier@bootlin.com v6: https://lore.kernel.org/20250415085155.132963-1-maxime.chevallier@bootlin.com v7: https://lore.kernel.org/20250422161717.164440-1-maxime.chevallier@bootlin.com ==================== Link: https://patch.msgid.link/20250502085242.248645-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 63fb100bf5241ffdfa404b49c6a443cadd08447c Author: Maxime Chevallier Date: Fri May 2 10:52:41 2025 +0200 net: ethtool: netlink: Use netdev_hold for dumpit() operations Move away from dev_hold and use netdev_hold with a local reftracker when performing a DUMP on each netdev. Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250502085242.248645-4-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 9dd2ad5e92b962d1349a7541d167e8e214e49f95 Author: Maxime Chevallier Date: Fri May 2 10:52:40 2025 +0200 net: ethtool: phy: Convert the PHY_GET command to generic phy dump Now that we have an infrastructure in ethnl for perphy DUMPs, we can get rid of the custom ->doit and ->dumpit to deal with PHY listing commands. As most of the code was custom, this basically means re-writing how we deal with PHY listing. Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250502085242.248645-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 172265b44cd3c90b76f2153a15abf64520d70e4a Author: Maxime Chevallier Date: Fri May 2 10:52:39 2025 +0200 net: ethtool: Introduce per-PHY DUMP operations ethnl commands that target a phy_device need a DUMP implementation that will fill the reply for every PHY behind a netdev. We therefore need to iterate over the dev->topo to list them. When multiple PHYs are behind the same netdev, it's also useful to perform DUMP with a filter on a given netdev, to get the capability of every PHY. Implement dedicated genl ->start(), ->dumpit() and ->done() operations for PHY-targetting command, allowing filtered dumps and using a dump context that keep track of the PHY iteration for multi-message dump. PSE-PD and PLCA are converted to this new set of ops along the way. Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250502085242.248645-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 953d9480f7d1bee0ec00c7c23ec4d3b33f585ed1 Author: Haiyue Wang Date: Sat May 3 01:50:25 2025 +0800 selftests: iou-zcrx: Clean up build warnings for error format Clean up two build warnings: [1] iou-zcrx.c: In function ‘process_recvzc’: iou-zcrx.c:263:37: warning: too many arguments for format [-Wformat-extra-args] 263 | error(1, 0, "payload mismatch at ", i); | ^~~~~~~~~~~~~~~~~~~~~~ [2] Use "%zd" for ssize_t type as better iou-zcrx.c: In function ‘run_client’: iou-zcrx.c:357:47: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=] 357 | error(1, 0, "send(): %d", sent); | ~^ ~~~~ | | | | int ssize_t {aka long int} | %ld Signed-off-by: Haiyue Wang Reviewed-by: David Wei Link: https://patch.msgid.link/20250502175136.1122-1-haiyuewa@163.com Signed-off-by: Jakub Kicinski commit d8b1a33ae8e66ff0cdde68ea70e2866348b3bc87 Merge: ac8f09b9210c48 110f8f77fd8d48 Author: Jakub Kicinski Date: Mon May 5 16:53:04 2025 -0700 Merge branch 'selftests-mptcp-increase-code-coverage' Matthieu Baerts says: ==================== selftests: mptcp: increase code coverage Here are various patches slightly improving MPTCP code coverage: - Patch 1: avoid a harmless 'grep: write error' warning. - Patch 2: use getaddrinfo() with IPPROTO_MPTCP in more places. - Patch 3-6: prepare and add support to get info for a specific subflow when giving the 5-tuple. - Patch 7: validate the previous patch and cover "subflow_get_info_size" in the kernel code (mptcp_diag.c). ==================== Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-0-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit 110f8f77fd8d48bb1c5590bd53065c0288f29ea7 Author: Gang Yan Date: Fri May 2 14:29:27 2025 +0200 selftests: mptcp: add chk_sublfow in diag.sh This patch aims to add chk_dump_subflow in diag.sh. The subflow's info can be obtained through "ss -tin", then use the 'mptcp_diag' to verify the token in subflow_info. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/524 Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-7-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit c7ac7452df70569a196527743d465c2522abbee6 Author: Gang Yan Date: Fri May 2 14:29:26 2025 +0200 selftests: mptcp: add helpers to get subflow_info This patch adds 'get_subflow_info' in 'mptcp_diag', which can check whether a TCP connection is an MPTCP subflow based on the "INET_ULP_INFO_MPTCP" with tcp_diag method. The helper 'print_subflow_info' in 'mptcp_diag' can print the subflow_filed of an MPTCP subflow for further checking the 'subflow_info' through inet_diag method. The example of the whole output should be: $ ./mptcp_diag -s "127.0.0.1:10000 127.0.0.1:38984" 127.0.0.1:10000 -> 127.0.0.1:38984 It's a mptcp subflow, the subflow info: flags:Mec token:0000(id:0)/4278e77e(id:0) seq:9288466187236176036 \ sfseq:1 ssnoff:2317083055 maplen:215 Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-6-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit caa6811ccaed911f3b46e98b8e9f9d9c864d348e Author: Gang Yan Date: Fri May 2 14:29:25 2025 +0200 selftests: mptcp: refactor NLMSG handling with 'proto' This patch introduces the '__u32 proto' variable to the 'send_query' and 'recv_nlmsg' functions for further extending function. In the 'send_query' function, the inclusion of this variable makes the structure clearer and more readable. In the 'recv_nlmsg' function, the '__u32 proto' variable ensures that the 'diag_info' field remains unmodified when processing IPPROTO_TCP data, thereby preventing unintended transformation into 'mptcp_info' format. While at it, increment iovlen directly when an item is added to simplify this portion of the code and improve its readaility. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-5-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit 3fea468dca4f53fa0942661a0fc61dab8d6b0dc9 Author: Gang Yan Date: Fri May 2 14:29:24 2025 +0200 selftests: mptcp: refactor send_query parameters for code clarity This patch use 'inet_diag_req_v2' instead of 'token' as parameters of send_query, and construct the req in 'get_mptcpinfo'. This modification enhances the clarity of the code, and prepare for the dump_subflow_info. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-4-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit cd732d5110a22ea6d555c69a60a440b59ba281e3 Author: Gang Yan Date: Fri May 2 14:29:23 2025 +0200 selftests: mptcp: add struct params in mptcp_diag This patch adds a struct named 'params' to save 'target_token' and other future parameters. This structure facilitates future function expansions. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-3-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit dd367e81b79a68a080c5f03f690fe829b093bd21 Author: Geliang Tang Date: Fri May 2 14:29:22 2025 +0200 selftests: mptcp: sockopt: use IPPROTO_MPTCP for getaddrinfo getaddrinfo MPTCP is recently supported in glibc and IPPROTO_MPTCP for getaddrinfo is used in mptcp_connect.c. But in mptcp_sockopt.c and mptcp_inq.c, IPPROTO_TCP are still used for getaddrinfo, So this patch updates them. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-2-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit 6d0eb15c65019b2b17bd6db9b32a60a219e40078 Author: Matthieu Baerts (NGI0) Date: Fri May 2 14:29:21 2025 +0200 selftests: mptcp: info: hide 'grep: write error' warnings mptcp_lib_get_info_value() will only print the first entry that match the filter because of the ';q' at the end. As a consequence, the 'sed' command could finish before the previous 'grep' one and print a 'write error' warning because it is trying to write data to the closed pipe. Such warnings are not interesting, they can be hidden by muting stderr here for grep. While at it, clearly indicate that mptcp_lib_get_info_value() will only print the first matched entry to avoid confusions later on. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250502-net-next-mptcp-sft-inc-cover-v1-1-68eec95898fb@kernel.org Signed-off-by: Jakub Kicinski commit ac8f09b9210c48934c78fdc6bc167e660eaac928 Author: Dr. David Alan Gilbert Date: Fri May 2 00:38:15 2025 +0100 sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif sctp_assoc_del_peer() last use was removed in 2015 by commit 73e6742027f5 ("sctp: Do not try to search for the transport twice") which now uses rm_peer instead of del_peer. sctp_chunk_iif() last use was removed in 2016 by commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too") Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Xin Long Link: https://patch.msgid.link/20250501233815.99832-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 1f586017f517f677586ec3853258419f731569a0 Author: Andy Shevchenko Date: Wed Apr 30 17:38:02 2025 +0300 net: phy: Refactor fwnode_get_phy_node() Refactor to check if the fwnode we got is correct and return if so, otherwise do additional checks. Using same pattern in all conditionals makes it slightly easier to read and understand. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250430143802.3714405-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit 406fbc4d0fb34c16718551bb8f4c776710f63b55 Author: Stefan Binding Date: Mon Apr 7 16:16:44 2025 +0100 ASoC: cs35l56: Read Silicon ID from DIE_STS registers for CS35L63 On CS35L63 the DIE_STS registers are populated by the Firmware from OTP, so the driver can read these registers directly, rather than obtaining them from OTP. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407151842.143393-6-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 978858791cedaf1dbbbaeb1e37126611b7c28a9e Author: Stefan Binding Date: Mon Apr 7 16:16:43 2025 +0100 ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. New regmap configs have been added to support CS35L63. CS35L63 only has SoundWire and I2C control interfaces. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407151842.143393-5-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit a3ec669efcee2cffd8ca020df777adbf79ac0b75 Author: Stefan Binding Date: Mon Apr 7 16:16:42 2025 +0100 ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register list Registers to set Mute, Volume and Posture are inside firmware, which means they should be added to the list of registers set inside firmware, in case they vary across Device or Revision. These three registers are also used for controls, so additional handling is required to be able to obtain and set the register inside ALSA controls. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407151842.143393-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 8c0821ccaa1e53c30f6a51d034171e20d522a9c0 Author: Stefan Binding Date: Mon Apr 7 16:16:41 2025 +0100 ASoC: cs35l56: Add struct to index firmware registers Firmware based registers may be different addresses across different device ids and revision ids. Create a structure to store and access these addresses. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407151842.143393-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 9ea280f3df60df014527ba5723fd8d1fd7c3b3ca Author: Stefan Binding Date: Mon Apr 7 16:16:40 2025 +0100 ASoC: cs35l56: Add Index based on ACPI HID or SDW ID to select regmap config This is to prepare for further products using slightly different regmap configs. Signed-off-by: Stefan Binding Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407151842.143393-2-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit a71b261c19a455f7f8e560b4ddfac44d3150ae39 Author: Daniel Baluta Date: Mon May 5 14:42:51 2025 +0300 ASoC: SOF: imx8m: Use reset controller API to control the DSP DSP on i.MX8MP doesn't have a direct reset line so according to hardware design team in order to handle assert/deassert/reset functionality we need to use a combination of control bits from two modules. Audio block control module for Run/Stall control of the DSP and DAP module in order to do software reset. In a first step, for i.MX8MP we are switching on using the reset controller API to handle the DSP Run/Stall bits i.MX8MP. This comes with the advantage of offering a better probe ordering and a more natural way of abstracting the Audio block control bits. Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Laurentiu Mihalcea Tested-by: Laurentiu Mihalcea Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250505114251.57018-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown commit 320a66f84022028f1277bf568a5e8987eac6e797 Author: Dr. David Alan Gilbert Date: Thu May 1 01:24:02 2025 +0100 strparser: Remove unused __strp_unpause The last use of __strp_unpause() was removed in 2022 by commit 84c61fe1a75b ("tls: rx: do not use the standard strparser") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250501002402.308843-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 23227e71b69af95e421e263302d13f426c548155 Author: Guan-Chun Wu <409411716@gms.tku.edu.tw> Date: Sat May 3 16:12:03 2025 +0800 workqueue: fix typo in comment Fix a duplicated word "that that" in the comment describing the @max_active behavior for unbound workqueues. Signed-off-by: Guan-Chun Wu <409411716@gms.tku.edu.tw> Signed-off-by: Tejun Heo commit 02ca7898185fcbfc5890f0a8e42664bcd95d94a1 Merge: fe65ce845c0a58 14a3fd030c0334 Author: Mark Brown Date: Tue May 6 08:42:25 2025 +0900 AsoC: Phase out hybrid PCI devres Merge series from Philipp Stanner : A year ago we spent quite some work trying to get PCI into better shape. Some pci_ functions can be sometimes managed with devres, which is obviously bad. We want to provide an obvious API, where pci_ functions are never, and pcim_ functions are always managed. Thus, everyone enabling his device with pcim_enable_device() must be ported to pcim_ functions. Porting all users will later enable us to significantly simplify parts of the PCI subsystem. See here [1] for details. This patch series does that for sound. Feel free to squash the commits as you see fit. P. [1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18 commit 4d4c10f763d7808fbade28d83d237411603bca05 Author: Mario Limonciello Date: Wed Apr 23 23:31:32 2025 -0500 PCI: Explicitly put devices into D0 when initializing AMD BIOS team has root caused an issue that NVMe storage failed to come back from suspend to a lack of a call to _REG when NVMe device was probed. 112a7f9c8edbf ("PCI/ACPI: Call _REG when transitioning D-states") added support for calling _REG when transitioning D-states, but this only works if the device actually "transitions" D-states. 967577b062417 ("PCI/PM: Keep runtime PM enabled for unbound PCI devices") added support for runtime PM on PCI devices, but never actually 'explicitly' sets the device to D0. To make sure that devices are in D0 and that platform methods such as _REG are called, explicitly set all devices into D0 during initialization. Fixes: 967577b062417 ("PCI/PM: Keep runtime PM enabled for unbound PCI devices") Signed-off-by: Mario Limonciello Signed-off-by: Bjorn Helgaas Tested-by: Denis Benato Tested-By: Yijun Shen Tested-By: David Perry Reviewed-by: Rafael J. Wysocki Link: https://patch.msgid.link/20250424043232.1848107-1-superm1@kernel.org commit e371b9d3368ccb6b55fe9747be12c3107b2817b3 Author: Uday Shankar Date: Tue Apr 29 16:41:05 2025 -0600 selftests: ublk: kublk: fix include path Building kublk currently fails (with a "could not find linux/ublk_cmd.h" error message) if kernel headers are not installed in a system-global location (i.e. somewhere in the compiler's default include search path). This failure is unnecessary, as make kselftest installs kernel headers in the build tree - kublk's build just isn't looking for them properly. There is an include path in kublk's CFLAGS which is probably intended to find the kernel headers installed in the build tree; fix it so that it can actually find them. This introduces some macro redefinition issues between glibc-provided headers and kernel headers; fix those by eliminating one include in kublk. Signed-off-by: Uday Shankar Reviewed-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250429-ublk_selftests-v2-3-e970b6d9e4f4@purestorage.com Signed-off-by: Jens Axboe commit 254827a32118ddb171680dc2143c777cc68f2cbc Author: Uday Shankar Date: Tue Apr 29 16:41:04 2025 -0600 selftests: ublk: make test_generic_06 silent on success Convention dictates that tests should not log anything on success. Make test_generic_06 follow this convention. Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250429-ublk_selftests-v2-2-e970b6d9e4f4@purestorage.com Signed-off-by: Jens Axboe commit 3d6ee575d0d49be35dbb787db4d05bdf94e2cdbb Author: Uday Shankar Date: Tue Apr 29 16:41:03 2025 -0600 selftests: ublk: kublk: build with -Werror iff WERROR!=0 Compiler warnings can catch bugs at compile time; thus, heeding them is usually a good idea. Turn warnings into errors by default for the kublk build so that anyone making changes is forced to heed them. Compiler warnings can also sometimes produce annoying false positives, so provide a flag WERROR that the developer can use as follows to have the build and selftests run go through even if there are warnings: make WERROR=0 TARGETS=ublk kselftest Signed-off-by: Uday Shankar Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250429-ublk_selftests-v2-1-e970b6d9e4f4@purestorage.com Signed-off-by: Jens Axboe commit 6c965d39af98a8b79668898b3a2af40d11179ff4 Author: Charles Keepax Date: Mon May 5 15:14:09 2025 +0100 ASoC: Intel: sof_sdw: Avoid NULL check fail when re-probing The static platform_component name string is overwritten on card tear down by sof_link_unload(). After this has happened the NULL check on it in asoc_sdw_init_simple_dai_link() will fail when the driver is reprobed, causing the machine driver to fail probe. However, it also turns out that the ASoC core sets this string for all topology systems in soc_check_tplg_fes() anyway, after the aforementioned NULL check. So there is no need for the machine driver to set the platform name to anything meaningful at all. Replace all the platform_component stuff with some simple place holders and importantly since the core tampers with the snd_soc_dai_link_component in multiple places allocate a new one for each usage. Fixes: 59f8b622d52e ("ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250505141409.2614010-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 8ce5ace8e279d39f249fd5ead33895d04263ea36 Author: Charles Keepax Date: Mon May 5 15:14:08 2025 +0100 ASoC: sdw_utils: Remove num_platforms from simple DAI helper There is no point in passing num_platforms into asoc_sdw_init_simple_dai_link(). Firstly, as a single pointer for the component name is passed in only a single string can be passed and secondly if it is a complex DAI with multiple platforms it would make more sense to use asoc_sdw_init_dai_link(). Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250505141409.2614010-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 62e23f183839c3d718ab36ce1c0cf7cb4b9c05a4 Author: Andrii Nakryiko Date: Thu May 1 16:52:31 2025 -0700 libbpf: Improve BTF dedup handling of "identical" BTF types BTF dedup has a strong assumption that compiler with deduplicate identical types within any given compilation unit (i.e., .c file). This property is used when establishing equilvalence of two subgraphs of types. Unfortunately, this property doesn't always holds in practice. We've seen cases of having truly identical structs, unions, array definitions, and, most recently, even pointers to the same type being duplicated within CU. Previously, we mitigated this on a case-by-case basis, adding a few simple heuristics for validating that two BTF types (having two different type IDs) are structurally the same. But this approach scales poorly, and we can have more weird cases come up in the future. So let's take a half-step back, and implement a bit more generic structural equivalence check, recursively. We still limit it to reasonable depth to avoid long reference loops. Depth-wise limiting of potentially cyclical graph isn't great, but as I mentioned below doesn't seem to be detrimental performance-wise. We can always improve this in the future with per-type visited markers, if necessary. Performance-wise this doesn't seem too affect vmlinux BTF dedup, which makes sense because this logic kicks in not so frequently and only if we already established a canonical candidate type match, but suddenly find a different (but probably identical) type. Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/r/20250501235231.1339822-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 101fe8b5627c68b3f2f941266e26ac355131e2fe Author: Yao Zi Date: Thu Apr 17 12:01:19 2025 +0000 arm64: dts: rockchip: Add onboard EEPROM for Radxa E20C Radxa E20C ships an onboard I2C EEPROM for storing production information. Enable it in devicetree. Signed-off-by: Yao Zi Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250417120118.17610-6-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit d3a05f490d048808968df1e0d3240ab01fe82211 Author: Yao Zi Date: Thu Apr 17 12:01:18 2025 +0000 arm64: dts: rockchip: Add I2C controllers for RK3528 Describe I2C controllers shipped by RK3528 in devicetree. For I2C-2, I2C-4 and I2C-7 which come with only a set of possible pins, a default pin configuration is included. Signed-off-by: Yao Zi Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250417120118.17610-5-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 41948afcf503b5667637a0b3ab279a061f559bec Author: Thorsten Blum Date: Sat May 3 17:15:13 2025 +0200 bpf: Replace offsetof() with struct_size() Compared to offsetof(), struct_size() provides additional compile-time checks for structs with flexible arrays (e.g., __must_be_array()). No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250503151513.343931-2-thorsten.blum@linux.dev commit 41d4ce6df3f4945341ec509a840cc002a413b6cc Author: Anton Protopopov Date: Fri May 2 19:30:31 2025 +0000 bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ With the latest LLVM bpf selftests build will fail with the following error message: progs/profiler.inc.h:710:31: error: default initialization of an object of type 'typeof ((parent_task)->real_cred->uid.val)' (aka 'const unsigned int') leaves the object uninitialized and is incompatible with C++ [-Werror,-Wdefault-const-init-unsafe] 710 | proc_exec_data->parent_uid = BPF_CORE_READ(parent_task, real_cred, uid.val); | ^ tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:520:35: note: expanded from macro 'BPF_CORE_READ' 520 | ___type((src), a, ##__VA_ARGS__) __r; \ | ^ This happens because BPF_CORE_READ (and other macro) declare the variable __r using the ___type macro which can inherit const modifier from intermediate types. Fix this by using __typeof_unqual__, when supported. (And when it is not supported, the problem shouldn't appear, as older compilers haven't complained.) Fixes: 792001f4f7aa ("libbpf: Add user-space variants of BPF_CORE_READ() family of macros") Fixes: a4b09a9ef945 ("libbpf: Add non-CO-RE variants of BPF_CORE_READ() macro family") Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250502193031.3522715-1-a.s.protopopov@gmail.com commit a28fe3160362f92b0a1ae4a711244c75b41f4955 Author: Ihor Solodrai Date: Fri May 2 11:52:21 2025 -0700 selftests/bpf: Remove sockmap_ktls disconnect_after_delete test "sockmap_ktls disconnect_after_delete" is effectively moot after disconnect has been disabled for TLS [1][2]. Remove the test completely. [1] https://lore.kernel.org/bpf/20250416170246.2438524-1-ihor.solodrai@linux.dev/ [2] https://lore.kernel.org/netdev/20250404180334.3224206-1-kuba@kernel.org/ Signed-off-by: Ihor Solodrai Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250502185221.1556192-1-isolodrai@meta.com commit 1b765f8bdac2a69602fccc9d069574428338fb43 Author: Rob Herring (Arm) Date: Wed Apr 23 14:42:15 2025 -0500 devres: Export devm_ioremap_resource_wc() devm_ioremap_resource_wc() is not exported, so add one. Link: https://lore.kernel.org/r/20250423-dt-memory-region-v2-v2-3-2fbd6ebd3c88@kernel.org Acked-by: Arnaud Pouliquen Signed-off-by: Rob Herring (Arm) commit df56b2443e14e8288baf76aa5ee39a26289874e8 Author: Rob Herring (Arm) Date: Wed Apr 23 14:42:14 2025 -0500 of: Simplify of_dma_set_restricted_buffer() to use of_for_each_phandle() Simplify of_dma_set_restricted_buffer() by using of_property_present() and of_for_each_phandle() iterator. Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250423-dt-memory-region-v2-v2-2-2fbd6ebd3c88@kernel.org Signed-off-by: Rob Herring (Arm) commit f4fcfdda2fd8834c62dcb9bfddcf1f89d190b70e Author: Rob Herring (Arm) Date: Wed Apr 23 14:42:13 2025 -0500 of: reserved_mem: Add functions to parse "memory-region" Drivers with "memory-region" properties currently have to do their own parsing of "memory-region" properties. The result is all the drivers have similar patterns of a call to parse "memory-region" and then get the region's address and size. As this is a standard property, it should have common functions for drivers to use. Add new functions to count the number of regions and retrieve the region's address as a resource. Reviewed-by: Daniel Baluta Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250423-dt-memory-region-v2-v2-1-2fbd6ebd3c88@kernel.org Signed-off-by: Rob Herring (Arm) commit 9199ec29f0977efee223791c9ee3eb402d23f8ba Author: Nicolas Frattaroli Date: Fri May 2 13:03:10 2025 +0200 clk: rockchip: add GATE_GRFs for SAI MCLKOUT to rk3576 The Rockchip RK3576 gates the SAI MCLKOUT clocks behind some IOC GRF writes. Add these clock branches, and add the IOC GRF to the auxiliary GRF hashtable. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-4-376cef19dd7c@collabora.com Signed-off-by: Heiko Stuebner commit e277168cabe9fd99e647f5dad0bc846d5d6b0093 Author: Nicolas Frattaroli Date: Fri May 2 13:03:09 2025 +0200 clk: rockchip: introduce GRF gates Some rockchip SoCs, namely the RK3576, have bits in a General Register File (GRF) that act just like clock gates. The downstream vendor kernel simply maps over the already mapped GRF range with a generic clock gate driver. This solution isn't suitable for upstream, as a memory range will be in use by multiple drivers at the same time, and it leaks implementation details into the device tree. Instead, implement this with a new clock branch type in the Rockchip clock driver: GRF gates. Somewhat akin to MUXGRF, this clock branch depends on the type of GRF, but functions like a gate instead. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-3-376cef19dd7c@collabora.com Signed-off-by: Heiko Stuebner commit 70a114daf2077472e58b3cac23ba8998e35352f4 Author: Nicolas Frattaroli Date: Fri May 2 13:03:08 2025 +0200 clk: rockchip: introduce auxiliary GRFs The MUXGRF clock branch type depends on having access to some sort of GRF as a regmap to be registered. So far, we could easily get away with only ever having one GRF stowed away in the context. However, newer Rockchip SoCs, such as the RK3576, have several GRFs which are relevant for clock purposes. It already depends on the pmu0 GRF for MUXGRF reasons, but could get away with not refactoring this because it didn't need the sysgrf at all, so could overwrite the pointer in the clock provider to the pmu0 grf regmap handle. In preparation for needing to finally access more than one GRF per SoC, let's untangle this. Introduce an auxiliary GRF hashmap, and a GRF type enum. The hashmap is keyed by the enum, and clock branches now have a struct member to store the value of that enum, which defaults to the system GRF. The SoC-specific _clk_init function can then insert pointers to GRF regmaps into the hashmap based on the grf type. During clock branch registration, we then pick the right GRF for each branch from the hashmap if something other than the sys GRF is requested. The reason for doing it with this grf type indirection in the clock branches is so that we don't need to define the MUXGRF branches in a separate step, just to have a direct pointer to a regmap available already. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-2-376cef19dd7c@collabora.com Signed-off-by: Heiko Stuebner commit 6657acc83c81d8edaa2a5ad4e38dfd716f892d53 Merge: 3cb09de48f652a 4210f21c004a18 Author: Heiko Stuebner Date: Mon May 5 22:39:17 2025 +0200 Merge branch 'v6.16-shared/clkids' into v6.16-clk/next commit 4210f21c004a18aad11c55bdaf552e649a4fd286 Author: Nicolas Frattaroli Date: Fri May 2 13:03:07 2025 +0200 dt-bindings: clock: rk3576: add IOC gated clocks Certain clocks on the RK3576 are additionally essentially "gated" behind some bit toggles in the IOC GRF range. Downstream ungates these by adding a separate clock driver that maps over the GRF range and leaks their implementation of this into the DT. Instead, define some new clock IDs for these, so that consumers of these types of clocks can properly articulate which clock they're using, so that we can then add them to the clock driver for SoCs that need them. Acked-by: Krzysztof Kozlowski Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-1-376cef19dd7c@collabora.com Signed-off-by: Heiko Stuebner commit 12370bfcc4f0bdf70279ec5b570eb298963422b5 Author: Daniele Ceraolo Spurio Date: Fri May 2 08:51:04 2025 -0700 drm/xe/gsc: do not flush the GSC worker from the reset path The workqueue used for the reset worker is marked as WQ_MEM_RECLAIM, while the GSC one isn't (and can't be as we need to do memory allocations in the gsc worker). Therefore, we can't flush the latter from the former. The reason why we had such a flush was to avoid interrupting either the GSC FW load or in progress GSC proxy operations. GSC proxy operations fall into 2 categories: 1) GSC proxy init: this only happens once immediately after GSC FW load and does not support being interrupted. The only way to recover from an interruption of the proxy init is to do an FLR and re-load the GSC. 2) GSC proxy request: this can happen in response to a request that the driver sends to the GSC. If this is interrupted, the GSC FW will timeout and the driver request will be failed, but overall the GSC will keep working fine. Flushing the work allowed us to avoid interruption in both cases (unless the hang came from the GSC engine itself, in which case we're toast anyway). However, a failure on a proxy request is tolerable if we're in a scenario where we're triggering a GT reset (i.e., something is already gone pretty wrong), so what we really need to avoid is interrupting the init flow, which we can do by polling on the register that reports when the proxy init is complete (as that ensure us that all the load and init operations have been completed). Note that during suspend we still want to do a flush of the worker to make sure it completes any operations involving the HW before the power is cut. v2: fix spelling in commit msg, rename waiter function (Julia) Fixes: dd0e89e5edc2 ("drm/xe/gsc: GSC FW load") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4830 Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Cc: # v6.8+ Reviewed-by: Julia Filipchuk Link: https://lore.kernel.org/r/20250502155104.2201469-1-daniele.ceraolospurio@intel.com commit b4cd2ee54ca47c4575e30419f39a31249c1ee9b0 Merge: 836b313a14a316 30190f82a1a9eb Author: Jakub Kicinski Date: Mon May 5 13:22:58 2025 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Martin KaFai Lau says: ==================== pull-request: bpf-next 2025-05-02 We've added 14 non-merge commits during the last 10 day(s) which contain a total of 13 files changed, 740 insertions(+), 121 deletions(-). The main changes are: 1) Avoid skipping or repeating a sk when using a UDP bpf_iter, from Jordan Rife. 2) Fixed a crash when a bpf qdisc is set in the net.core.default_qdisc, from Amery Hung. 3) A few other fixes in the bpf qdisc, from Amery Hung. - Always call qdisc_watchdog_init() in the .init prologue such that the .reset/.destroy epilogue can always call qdisc_watchdog_cancel() without issue. - bpf_qdisc_init_prologue() was incorrectly returning an error when the bpf qdisc is set as the default_qdisc and the mq is creating the default_qdisc. It is now fixed. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: selftests/bpf: Cleanup bpf qdisc selftests selftests/bpf: Test attaching a bpf qdisc with incomplete operators bpf: net_sched: Make some Qdisc_ops ops mandatory selftests/bpf: Test setting and creating bpf qdisc as default qdisc bpf: net_sched: Fix bpf qdisc init prologue when set as default qdisc selftests/bpf: Add tests for bucket resume logic in UDP socket iterators selftests/bpf: Return socket cookies from sock_iter_batch progs bpf: udp: Avoid socket skips and repeats during iteration bpf: udp: Use bpf_udp_iter_batch_item for bpf_udp_iter_state batch items bpf: udp: Get rid of st_bucket_done bpf: udp: Make sure iter->batch always contains a full bucket snapshot bpf: udp: Make mem flags configurable through bpf_iter_udp_realloc_batch bpf: net_sched: Fix using bpf qdisc as default qdisc selftests/bpf: Fix compilation errors ==================== Link: https://patch.msgid.link/20250503010755.4030524-1-martin.lau@linux.dev Signed-off-by: Jakub Kicinski commit 840bb13005f2d0d2a9fd912c1660551a46654368 Author: Krzysztof Kozlowski Date: Mon May 5 21:12:56 2025 +0200 ARM: broadcom: MAINTAINERS: Cover bcm2712 files Add bcm2712 files to existing BCM2711/BCM2835 entry, so the files will not feel abandoned. Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_JsqJi+8-WdYEyrGjb=cQXPEb07Lkcj90a32d38ChvYJAA-Q@mail.gmail.com/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250505191255.304500-2-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli commit 194df9f66db8d6f74f03c78c2ad47b74a5a8b886 Author: Christoph Hellwig Date: Mon May 5 10:11:26 2025 +0200 mm: remove NR_BOUNCE zone stat The stat is always 0 now, so remove it and hardwire the user visible output to 0. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-8-hch@lst.de Signed-off-by: Jens Axboe commit eeadd68e2a5f6bfe0bf1038ec49e3a8d99eb5fe8 Author: Christoph Hellwig Date: Mon May 5 10:11:25 2025 +0200 block: remove bounce buffering support The block layer bounce buffering support is unused now, remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-7-hch@lst.de Signed-off-by: Jens Axboe commit a9437f6a1d8d0b3787fe6ff03d9aab4d3fe9b940 Author: Christoph Hellwig Date: Mon May 5 10:11:24 2025 +0200 scsi: remove the no_highmem flag in the host All users are gone now. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-6-hch@lst.de Signed-off-by: Jens Axboe commit 48610ec22f0cf7ee5b5658b2b3bab27a8f2ef78b Author: Christoph Hellwig Date: Mon May 5 10:11:23 2025 +0200 usb-storage: reject probe of device one non-DMA HCDs when using highmem usb-storage is the last user of the block layer bounce buffering now, and only uses it for HCDs that do not support DMA on highmem configs. Remove this support and fail the probe so that the block layer bounce buffering can go away. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman Reviewed-by: Hannes Reinecke Reviewed-by: Alan Stern Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-5-hch@lst.de Signed-off-by: Jens Axboe commit 27a0918d4b701d4825e191448e44b9f14dc0a3b3 Author: Christoph Hellwig Date: Mon May 5 10:11:22 2025 +0200 scsi: make ppa depend on !HIGHMEM This is one of the last drivers depending on the block layer bounce buffering code. Restrict it to run on non-highmem configs so that the bounce buffering code can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-4-hch@lst.de Signed-off-by: Jens Axboe commit bf69bd3fc26a107611e76b342027bb60b2411d4e Author: Christoph Hellwig Date: Mon May 5 10:11:21 2025 +0200 scsi: make imm depend on !HIGHMEM This is one of the last drivers depending on the block layer bounce buffering code. Restrict it to run on non-highmem configs so that the bounce buffering code can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-3-hch@lst.de Signed-off-by: Jens Axboe commit 7b32cb540bff6d6c8a1659babf930e9f66283c2c Author: Christoph Hellwig Date: Mon May 5 10:11:20 2025 +0200 scsi: make aha152x depend on !HIGHMEM This is one of the last drivers depending on the block layer bounce buffering code. Restrict it to run on non-highmem configs so that the bounce buffering code can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250505081138.3435992-2-hch@lst.de Signed-off-by: Jens Axboe commit 04e7638dd64af20e4e81b7569abea9673e337098 Author: Krzysztof Kozlowski Date: Wed Jan 15 21:46:03 2025 +0100 arm64: tegra: tegra210-p2894: Align GPIO hog node name with preferred style GPIO hogs device node names can use 'hog' prefix or suffix, but the suffix is preferred. The pattern in DT schema might narrow in the future, so adjust the DTS now. Link: https://lore.kernel.org/r/20250115204603.136997-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 47cbd5d8693d4245997a1d6f96b158c6f6d68cf7 Author: Krzysztof Kozlowski Date: Sun May 4 19:31:26 2025 +0200 ARM: vt8500: MAINTAINERS: Include vt8500 soc driver in maintainers entry Include the SoC hwinfo/soc information driver in VT8500 maintainers entry. Link: https://lore.kernel.org/r/20250504173125.104419-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 8ecd32b668238a7a79b2f44b66dae8ffb87ac763 Author: Mario Limonciello Date: Tue Apr 15 14:20:59 2025 -0500 docs: backlight: Clarify `actual_brightness` Currently userspace software systemd treats `brightness` and `actual_brightness` identically due to a bug found in an out of tree driver. This however causes problems for in-tree drivers that use brightness to report user requested `brightness` and `actual_brightness` to report what the hardware actually has programmed. Clarify the documentation to match the behavior described in commit 6ca017658b1f9 ("[PATCH] backlight: Backlight Class Improvements"). Cc: Lee Jones Cc: Lennart Poettering Cc: richard.purdie@linuxfoundation.org Link: https://github.com/systemd/systemd/pull/36881 Reviewed-by: Harry Wentland Link: https://lore.kernel.org/r/20250415192101.2033518-1-superm1@kernel.org Signed-off-by: Mario Limonciello commit f3efb9569b4a21354ef2caf7ab0608a3e14cc6e4 Author: Ilpo Järvinen Date: Mon May 5 14:54:12 2025 +0300 PCI: Fix lock symmetry in pci_slot_unlock() The commit a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") made the lock function to call depend on dev->subordinate but left pci_slot_unlock() unmodified creating locking asymmetry compared with pci_slot_lock(). Because of the asymmetric lock handling, the same bridge device is unlocked twice. First pci_bus_unlock() unlocks bus->self and then pci_slot_unlock() will unconditionally unlock the same bridge device. Move pci_dev_unlock() inside an else branch to match the logic in pci_slot_lock(). Fixes: a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner Reviewed-by: Dave Jiang Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250505115412.37628-1-ilpo.jarvinen@linux.intel.com commit 006ff7498fe89bd9dfb891101f02557d5cfcf427 Author: Al Viro Date: Thu Apr 24 01:45:05 2025 -0400 saner calling conventions for ->d_automount() Currently the calling conventions for ->d_automount() instances have an odd wart - returned new mount to be attached is expected to have refcount 2. That kludge is intended to make sure that mark_mounts_for_expiry() called before we get around to attaching that new mount to the tree won't decide to take it out. finish_automount() drops the extra reference after it's done with attaching mount to the tree - or drops the reference twice in case of error. ->d_automount() instances have rather counterintuitive boilerplate in them. There's a much simpler approach: have mark_mounts_for_expiry() skip the mounts that are yet to be mounted. And to hell with grabbing/dropping those extra references. Makes for simpler correctness analysis, at that... Reviewed-by: Christian Brauner Reviewed-by: Jeff Layton Reviewed-by: Paulo Alcantara (Red Hat) Acked-by: David Howells Tested-by: David Howells Acked-by: Steven Rostedt (Google) Signed-off-by: Al Viro commit 3e50b1d625f25cfa6336823c7ffd5b30893b8ac7 Author: Arvind Yadav Date: Fri Apr 25 19:49:05 2025 +0530 drm/amdgpu: only keep most recent fence for each context Keep only the latest fences to reduce the number of values given back to userspace v2: - Export this code from dma-fence-unwrap.c(by Christian). v3: - To split this in a dma_buf patch and amd userq patch(by Sunil). - No need to add a new function just re-use existing(by Christian). v4: Export dma_fence_dedub_array function and used it(by Christian). Cc: Alex Deucher Cc: Arunpravin Paneer Selvam Reviewed-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 68071eb0ae64c076ed93897be644ebbd1c89a278 Author: Srinivasan Shanmugam Date: Mon Apr 28 16:16:34 2025 +0530 drm/amdgpu: Add Support for enforcing isolation without Cleaner Shader Adjusted the enforce isolation setting handling to include the ability to disable the cleaner shader without affecting isolation between tasks. v2: Updated enforce isolation documentation and parameters. (Alex) Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 575ec9b0c2f11f40535ea737ed5a64792780d1ef Author: Arvind Yadav Date: Fri Apr 25 19:36:50 2025 +0530 dma-fence: Add helper to sort and deduplicate dma_fence arrays Export a new helper function `dma_fence_dedup_array()` that sorts an array of dma_fence pointers by context, then deduplicates the array by retaining only the most recent fence per context. This utility is useful when merging or optimizing sets of fences where redundant entries from the same context can be pruned. The operation is performed in-place and releases references to dropped fences using dma_fence_put(). v2: - Export this code from dma-fence-unwrap.c(by Christian). v3: - To split this in a dma_buf patch and amd userq patch(by Sunil). - No need to add a new function just re-use existing(by Christian). v4: - Export dma_fence_dedub_array and use it(by Christian). Cc: Alex Deucher Cc: Arunpravin Paneer Selvam Reviewed-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 71353c1a4f91a11c20eca51a48f550341e2e1556 Author: Sunil Khatri Date: Tue Apr 22 18:49:02 2025 +0530 drm/amdgpu: change DRM_DBG_DRIVER to drm_dbg_driver update the functions in amdgpu_userqueues.c from DRM_DBG_DRIVER to drm_dbg_driver so multi gpu instance can be logged in. Signed-off-by: Sunil Khatri Reviewed-by: Tvrtko Ursulin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c46a37628a274ff557e6c1f45e6c00c3c6db60df Author: Sunil Khatri Date: Tue Apr 22 18:40:03 2025 +0530 drm/amdgpu: change DRM_ERROR to drm_file_err in amdgpu_userq.c change the DRM_ERROR and drm_err to drm_file_err to add process name and pid to the logging. Signed-off-by: Sunil Khatri Reviewed-by: Tvrtko Ursulin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8c97cdb1a692eafcf5b6e8fc7e7ecc7eff28984e Author: Sunil Khatri Date: Tue Apr 22 18:10:22 2025 +0530 drm/amdgpu: use drm_file_err in fence timeouts use drm_file_err instead of DRM_ERROR which adds process and pid information in the userqueue error logging. Sample log: [ 19.802315] amdgpu 0000:0a:00.0: [drm] *ERROR* comm: ibus-x11 pid: 2055 client: Unset ... Couldn't unmap all the queues [ 19.802319] amdgpu 0000:0a:00.0: [drm] *ERROR* comm: ibus-x11 pid: 2055 client: Unset ... Failed to evict userqueue [ 19.838432] amdgpu 0000:0a:00.0: [drm] *ERROR* comm: systemd-logind pid: 1042 client: Unset ... Couldn't unmap all the queues [ 19.838436] amdgpu 0000:0a:00.0: [drm] *ERROR* comm: systemd-logind pid: 1042 client: Unset ... Failed to evict userqueue Signed-off-by: Sunil Khatri Reviewed-by: Tvrtko Ursulin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 30ff75809d0359566fda48883dcc15bf427558e9 Author: Sunil Khatri Date: Tue Apr 22 17:55:50 2025 +0530 drm/amdgpu: add drm_file reference in userq_mgr drm_file will be used in usermode queues code to enable better process information in logging and hence add drm_file part of the userq_mgr struct. update the drm_file pointer in userq_mgr for each amdgpu_driver_open_kms. Signed-off-by: Sunil Khatri Reviewed-by: Tvrtko Ursulin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fc3817fb499605a8e9cfebdc2615da0ec114b281 Author: Sunil Khatri Date: Wed Apr 9 17:09:23 2025 +0530 drm: add drm_file_err function to add process info Add a drm helper function which appends the process information for the drm_file over drm_err formatted output. v5: change to macro from function (Christian Koenig) add helper functions for lock/unlock (Christian Koenig) v6: remove __maybe_unused and make function inline (Jani Nikula) remove drm_print.h v7: Use va_format and %pV to concatenate fmt and vargs (Jani Nikula) v8: Code formatting and typos (Ursulin tvrtko) Signed-off-by: Sunil Khatri Reviewed-by: Tvrtko Ursulin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c38de9db7493b866731b0ce3f76fcd4c2c63a9c2 Author: Taimur Hassan Date: Mon Apr 21 13:30:58 2025 -0500 drm/amd/display: Promote DC to 3.2.331 Summary * Remove redundant NULL check * Fix invalid context error in dml helper * Prepare for Fused I2C-over-AUX * Allow DSCClock disable * Vmax / Vmin update for Vsync * Fix race condition in DPIA AUX transfer * Fix wrong handling for AUX_DEFER case * Only wait for required space in DMUB mailbox Acked-by: Tom Chung Signed-off-by: Taimur Hassan Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dbc5b24fffa7d11c77e62e7334309906ac9e45b5 Author: Dillon Varone Date: Thu Apr 24 11:48:46 2025 -0400 drm/amd/display: Only wait for required free space in DMUB mailbox [WHY&HOW] When command submission is blocked by a full mailbox, only wait for enough space to free to submit the command, instead of waiting for idle. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Dillon Varone Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 59510792baa9402c8ec2913423a2db5d17af8a58 Author: Meenakshikumar Somasundaram Date: Wed Apr 23 14:42:53 2025 -0400 drm/amd/display: Assign preferred stream encoder instance to dpia [Why] For dpia, preferred engine instance availability is not checked when assigning stream encoder instance. [How] Check for dpia preferred engine id and assign the same stream encoder instance for the stream if available. Reviewed-by: PeiChen Huang Signed-off-by: Meenakshikumar Somasundaram Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3637e457eb0000bc37d8bbbec95964aad2fb29fd Author: Wayne Lin Date: Sun Apr 20 19:22:14 2025 +0800 drm/amd/display: Fix wrong handling for AUX_DEFER case [Why] We incorrectly ack all bytes get written when the reply actually is defer. When it's defer, means sink is not ready for the request. We should retry the request. [How] Only reply all data get written when receive I2C_ACK|AUX_ACK. Otherwise, reply the number of actual written bytes received from the sink. Add some messages to facilitate debugging as well. Fixes: ad6756b4d773 ("drm/amd/display: Shift dc link aux to aux_payload") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9b540e3fe6796fec4fb1344f3be8952fc2f084d4 Author: Wayne Lin Date: Sun Apr 20 17:50:03 2025 +0800 drm/amd/display: Copy AUX read reply data whenever length > 0 [Why] amdgpu_dm_process_dmub_aux_transfer_sync() should return all exact data reply from the sink side. Don't do the analysis job in it. [How] Remove unnecessary check condition AUX_TRANSACTION_REPLY_AUX_ACK. Fixes: ead08b95fa50 ("drm/amd/display: Fix race condition in DPIA AUX transfer") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d26d16438bc5fd5524121244cc133f9872a63210 Author: Swapnil Sapkal Date: Wed Apr 30 06:42:06 2025 +0000 amd-pstate-ut: Reset amd-pstate driver mode after running selftests In amd-pstate-ut, one of the basic test is to switch between all possible mode combinations. After running this test the mode of the amd-pstate driver is active mode. Store and reset the mode to its original state. Reviewed-by: Gautham R. Shenoy Signed-off-by: Swapnil Sapkal Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250430064206.7402-1-swapnil.sapkal@amd.com Signed-off-by: Mario Limonciello commit 81b5c6fa62af62fe89ae9576f41aae37830b94cb Author: Wayne Lin Date: Sun Apr 20 16:56:54 2025 +0800 drm/amd/display: Remove incorrect checking in dmub aux handler [Why & How] "Request length != reply length" is expected behavior defined in spec. It's not an invalid reply. Besides, replied data handling logic is not designed to be written in amdgpu_dm_process_dmub_aux_transfer_sync(). Remove the incorrectly handling section. Fixes: ead08b95fa50 ("drm/amd/display: Fix race condition in DPIA AUX transfer") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1db6c9e9b62e1a8912f0a281c941099fca678da3 Author: Wayne Lin Date: Sun Apr 20 16:29:07 2025 +0800 drm/amd/display: Fix the checking condition in dmub aux handling [Why & How] Fix the checking condition for detecting AUX_RET_ERROR_PROTOCOL_ERROR. It was wrongly checking by "not equals to" Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d5c9ade755a9afa210840708a12a8f44c0d532f4 Author: Wayne Lin Date: Fri Apr 18 16:31:59 2025 +0800 drm/amd/display: Shift DMUB AUX reply command if necessary [Why] Defined value of dmub AUX reply command field get updated but didn't adjust dm receiving side accordingly. [How] Check the received reply command value to see if it's updated version or not. Adjust it if necessary. Fixes: ead08b95fa50 ("drm/amd/display: Fix race condition in DPIA AUX transfer") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Ray Wu Signed-off-by: Wayne Lin Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4465dd0e41e8223a46a41ce4fcdfc55fabd319d8 Author: Dillon Varone Date: Tue Apr 1 12:06:35 2025 -0400 drm/amd/display: Refactor SubVP cursor limiting logic [WHY] There are several gaps that can result in SubVP being enabled with incompatible HW cursor sizes, and unjust restrictions to cursor size due to wrong predictions on future usage of SubVP. [HOW] - remove "prediction" logic in favor of tagging based on previous SubVP usage - block SubVP if current HW cursor settings are incompatible - provide interface for DM to determine if HW cursor should be disabled due to an attempt to enable SubVP Reviewed-by: Alvin Lee Signed-off-by: Dillon Varone Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fe3250f10819b411808ab9ae1d824c5fc9b59170 Author: Austin Zheng Date: Thu Apr 17 10:24:29 2025 -0400 drm/amd/display: Call FP Protect Before Mode Programming/Mode Support [Why] Memory allocation occurs within dml21_validate() for adding phantom planes. May cause kernel to be tainted due to usage of FP Start. [How] Move FP start from dml21_validate to before mode programming/mode support. Calculations requiring floating point are all done within mode programming or mode support. Reviewed-by: Alvin Lee Signed-off-by: Austin Zheng Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 94da0735b67b3ada90a3e2e017d306f070306f1d Author: Alex Hung Date: Wed Apr 23 10:02:11 2025 -0600 drm/amd/display: Remove unnecessary DC_FP_START/DC_FP_END [WHY & HOW] Remove the unnecessary DC_FP_START/DC_FP_END pair to reduce time in preempt_disable. It also fixes "BUG: sleeping function called from invalid context" error messages because of calling kzalloc with GFP_KERNEL which can sleep. Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a9cbeb6059e93ff893f79e42bf952c3fbb5eafdf Author: JinZe Xu Date: Wed Apr 23 18:17:30 2025 +0800 drm/amd/display: Send IPSExit unconditionally. [Why&How] PMFW needs to flush page cache in IPSExit. Reviewed-by: Nicholas Kazlauskas Signed-off-by: JinZe Xu Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 18a77bda7a9b999dc6c04bf6d68b1fc89d8ed4d6 Author: Kevin Gao Date: Thu Apr 17 15:37:06 2025 -0400 drm/amd/display: Add skip rIOMMU dc config option [Why] Need option to skip rIOMMU calls for dcn21. [How] Added rIOMMU dc config option and check for whether to skip rIOMMU calls. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Kevin Gao Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c00a39f62bd57bf4942d769261dd2e5c4077835d Author: Nicholas Kazlauskas Date: Tue Apr 22 10:13:40 2025 -0400 Revert "drm/amd/display: turn off eDP lcdvdd and backlight if not required" This reverts commit 0d93e821867c ("drm/amd/display: turn off eDP lcdvdd and backlight if not required") Reason for revert: Causes S4 lightup regressions. Reviewed-by: Gabe Teeger Signed-off-by: Nicholas Kazlauskas Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a063ce924ecf06c2e0112a1ff2c427510779f523 Author: Taimur Hassan Date: Sun Apr 20 11:29:09 2025 -0400 drm/amd/display: [FW Promotion] Release 0.1.8.0 Undefined unnecessary definition to avoid wrong referring Acked-by: Tom Chung Signed-off-by: Taimur Hassan Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1bcd679209420305a86833bc357d50021909edaf Author: Charlene Liu Date: Tue Apr 15 21:29:17 2025 -0400 drm/amd/display: disable DPP RCG before DPP CLK enable [why] DPP CLK enable needs to disable DPPCLK RCG first. The DPPCLK_en in dccg should always be enabled when the corresponding pipe is enabled. Reviewed-by: Hansen Dsouza Signed-off-by: Charlene Liu Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cfb2d41831ee5647a4ae0ea7c24971a92d5dfa0d Author: Aurabindo Pillai Date: Wed Apr 16 11:26:54 2025 -0400 drm/amd/display: more liberal vmin/vmax update for freesync [Why] FAMS2 expects vmin/vmax to be updated in the case when freesync is off, but supported. But we only update it when freesync is enabled. [How] Change the vsync handler such that dc_stream_adjust_vmin_vmax() its called irrespective of whether freesync is enabled. If freesync is supported, then there is no harm in updating vmin/vmax registers. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3546 Reviewed-by: ChiaHsuan Chung Signed-off-by: Aurabindo Pillai Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4daa5e6c2b8a98afdae46a955f1becbf7bd59507 Author: Charlene Liu Date: Tue Apr 15 12:44:42 2025 -0400 drm/amd/display: allow dscclk disable [why] when dscclk rcg disabled from usr reg option, dsc clock will remain enabled because driver was doing two things both dscclk and dsc rcg in the same routine. Reviewed-by: Hansen Dsouza Signed-off-by: Charlene Liu Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6f23163365dc7e006715f4014f7354141e1e3e90 Author: Ryan Seto Date: Tue Apr 15 11:30:52 2025 -0400 Revert "drm/amd/display: Refactor SubVP cursor limiting logic" This reverts commit 19e743f0fb73 ("drm/amd/display: Refactor SubVP cursor limiting logic") Reason for revert: Corruption Reviewed-by: Alvin Lee Signed-off-by: Ryan Seto Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2f2c97089d69009d7085570a51f548c1f10b03c1 Author: Dominik Kaszewski Date: Tue Apr 15 15:55:13 2025 +0200 drm/amd/display: Prepare for Fused I2C-over-AUX [Why] Passive DP-HDMI dongles use I2C-over-AUX protocol which is currently not supported using HDCP Locality Check FW path. [How] Prepare code for switching to I2C-over-AUX protocol. Passive dongle detection to be added in another commit. Reviewed-by: Alvin Lee Signed-off-by: Dominik Kaszewski Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bd3e84bc98f81b44f2c43936bdadc3241d654259 Author: Roman Li Date: Mon Apr 14 12:56:48 2025 -0400 drm/amd/display: Fix invalid context error in dml helper [Why] "BUG: sleeping function called from invalid context" error. after: "drm/amd/display: Protect FPU in dml2_validate()/dml21_validate()" The populate_dml_plane_cfg_from_plane_state() uses the GFP_KERNEL flag for memory allocation, which shouldn't be used in atomic contexts. The allocation is needed only for using another helper function get_scaler_data_for_plane(). [How] Modify helpers to pass a pointer to scaler_data within existing context, eliminating the need for dynamic memory allocation/deallocation and copying. Fixes: 366e77cd4923 ("drm/amd/display: Protect FPU in dml2_validate()/dml21_validate()") Reviewed-by: Aurabindo Pillai Signed-off-by: Roman Li Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 19860f49393dde1997f0487378e4cfee8b14d5c0 Author: Alex Hung Date: Mon Apr 14 10:00:59 2025 -0600 drm/amd/display: Remove redundant null check [WHY & HOW] The null check for connector was dereferenced previously in the same function and the caller. Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 48337bd15c36c47b916e40a81f3bb87f39211769 Author: Jesse Agate Date: Mon Apr 7 15:44:41 2025 -0400 drm/amd/display: Always Scale Flag [Why & How] When always scale flag is set at the API level, the number of taps should not be overridden to zero in the identity scaling ratio case, and luma scale should not be set to bypass regardless of luma scale ratio Reviewed-by: Samson Tam Signed-off-by: Jesse Agate Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c7e923b8a249e3a810c0d4944520eaa86f1326d8 Author: Taimur Hassan Date: Mon Apr 14 01:12:56 2025 -0400 drm/amd/display: Promote DC to 3.2.330 Summary * Update IPS checks to properly include all ASICs. * Refactoring DSC enum dsc_bits_per_comp * Fix ACPI edid parsing issue * Update AUX read interval for LTTPR with old sinks * Correct prefetch calculation Acked-by: Tom Chung Signed-off-by: Taimur Hassan Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f6510641d2767df011aa76b222c748e2498c06f7 Author: Bhuvanachandra Pinninti Date: Tue Apr 8 14:35:54 2025 +0530 drm/amd/display: Refactoring DSC enum dsc_bits_per_comp. [Why] Previously the 'dsc_bits_per_comp' enumeration was defined in individual .c files, making it unavailable for other files that may need it. [How] The 'dsc_bits_per_comp' enumeration has been relocated to a common header file. Reviewed-by: Mounika Adhuri Reviewed-by: Martin Leung Signed-off-by: Bhuvanachandra Pinninti Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b4db797117ceba88ba405a080811369418104304 Author: Ovidiu Bunea Date: Thu Apr 10 11:00:08 2025 -0400 drm/amd/display: Update IPS sequential_ono requirement checks [why & how] ASICs that require special RCG/PG programming are determined based on hw_internal_rev. Update these checks to properly include all such ASICs. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Ovidiu Bunea Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 959886105a40a3ba94fa396aca83e1083a2056ab Author: Stefan Wahren Date: Fri Apr 18 16:33:07 2025 +0200 arm64: dts: bcm: Add reference to RPi 2 (2nd rev) This adds a reference to the dts of the Raspberry Pi 2 (2nd rev), so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20250418143307.59235-4-wahrenst@gmx.net Signed-off-by: Florian Fainelli commit 6ebf1982038af12f3588417e4fd0417d2551da28 Author: Qasim Ijaz Date: Tue Apr 22 16:37:37 2025 +0100 fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt() fpga_mgr_test_img_load_sgt() allocates memory for sgt using kunit_kzalloc() however it does not check if the allocation failed. It then passes sgt to sg_alloc_table(), which passes it to __sg_alloc_table(). This function calls memset() on sgt in an attempt to zero it out. If the allocation fails then sgt will be NULL and the memset will trigger a NULL pointer dereference. Fix this by checking the allocation with KUNIT_ASSERT_NOT_ERR_OR_NULL(). Reviewed-by: Marco Pagani Fixes: ccbc1c302115 ("fpga: add an initial KUnit suite for the FPGA Manager") Signed-off-by: Qasim Ijaz Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20250422153737.5264-1-qasdev00@gmail.com Signed-off-by: Xu Yilun commit 43c2df7e2b08db6d65ce9707e4090f1f0c61f2f6 Author: Juergen Gross Date: Mon May 5 15:16:46 2025 +0200 x86/alternative: Remove unused header #defines Remove some unfortunately-named unused macros which could potentially result in weird build failures. Fortunately, they are under an #ifdef __ASSEMBLER__ which has kept them from causing problems so far. [ dhansen: subject and changelog tweaks ] Fixes: 1a6ade825079 ("x86/alternative: Convert the asm ALTERNATIVE_3() macro") Signed-off-by: Juergen Gross Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250505131646.29288-1-jgross%40suse.com commit 5d2ea5aebbb2f3ebde4403f9c55b2b057e5dd2d6 Author: Patrisious Haddad Date: Mon Apr 28 14:34:07 2025 +0300 RDMA/mlx5: Fix error flow upon firmware failure for RQ destruction Upon RQ destruction if the firmware command fails which is the last resource to be destroyed some SW resources were already cleaned regardless of the failure. Now properly rollback the object to its original state upon such failure. In order to avoid a use-after free in case someone tries to destroy the object again, which results in the following kernel trace: refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 37589 at lib/refcount.c:28 refcount_warn_saturate+0xf4/0x148 Modules linked in: rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) mlx5_ib(OE) rfkill mlx5_core(OE) mlxdevm(OE) ib_uverbs(OE) ib_core(OE) psample mlxfw(OE) mlx_compat(OE) macsec tls pci_hyperv_intf sunrpc vfat fat virtio_net net_failover failover fuse loop nfnetlink vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vmw_vmci vsock xfs crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_console virtio_gpu virtio_blk virtio_dma_buf virtio_mmio dm_mirror dm_region_hash dm_log dm_mod xpmem(OE) CPU: 0 UID: 0 PID: 37589 Comm: python3 Kdump: loaded Tainted: G OE ------- --- 6.12.0-54.el10.aarch64 #1 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0xf4/0x148 lr : refcount_warn_saturate+0xf4/0x148 sp : ffff80008b81b7e0 x29: ffff80008b81b7e0 x28: ffff000133d51600 x27: 0000000000000001 x26: 0000000000000000 x25: 00000000ffffffea x24: ffff00010ae80f00 x23: ffff00010ae80f80 x22: ffff0000c66e5d08 x21: 0000000000000000 x20: ffff0000c66e0000 x19: ffff00010ae80340 x18: 0000000000000006 x17: 0000000000000000 x16: 0000000000000020 x15: ffff80008b81b37f x14: 0000000000000000 x13: 2e656572662d7265 x12: ffff80008283ef78 x11: ffff80008257efd0 x10: ffff80008283efd0 x9 : ffff80008021ed90 x8 : 0000000000000001 x7 : 00000000000bffe8 x6 : c0000000ffff7fff x5 : ffff0001fb8e3408 x4 : 0000000000000000 x3 : ffff800179993000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000133d51600 Call trace: refcount_warn_saturate+0xf4/0x148 mlx5_core_put_rsc+0x88/0xa0 [mlx5_ib] mlx5_core_destroy_rq_tracked+0x64/0x98 [mlx5_ib] mlx5_ib_destroy_wq+0x34/0x80 [mlx5_ib] ib_destroy_wq_user+0x30/0xc0 [ib_core] uverbs_free_wq+0x28/0x58 [ib_uverbs] destroy_hw_idr_uobject+0x34/0x78 [ib_uverbs] uverbs_destroy_uobject+0x48/0x240 [ib_uverbs] __uverbs_cleanup_ufile+0xd4/0x1a8 [ib_uverbs] uverbs_destroy_ufile_hw+0x48/0x120 [ib_uverbs] ib_uverbs_close+0x2c/0x100 [ib_uverbs] __fput+0xd8/0x2f0 __fput_sync+0x50/0x70 __arm64_sys_close+0x40/0x90 invoke_syscall.constprop.0+0x74/0xd0 do_el0_svc+0x48/0xe8 el0_svc+0x44/0x1d0 el0t_64_sync_handler+0x120/0x130 el0t_64_sync+0x1a4/0x1a8 Fixes: e2013b212f9f ("net/mlx5_core: Add RQ and SQ event handling") Signed-off-by: Patrisious Haddad Link: https://patch.msgid.link/3181433ccdd695c63560eeeb3f0c990961732101.1745839855.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 7590649ee7af381a9d1153143026dec124c5798e Author: Vlad Dumitrescu Date: Mon Apr 28 14:30:18 2025 +0300 IB/cm: Drop lockdep assert and WARN when freeing old msg The send completion handler can run after cm_id has advanced to another message. The cm_id lock is not needed in this case, but a recent change re-used cm_free_priv_msg(), which asserts that the lock is held and WARNs if the cm_id's currently outstanding msg is different than the one being freed. Fixes: 1e5159219076 ("IB/cm: Do not hold reference on cm_id unless needed") Signed-off-by: Vlad Dumitrescu Reviewed-by: Sean Hefty Link: https://patch.msgid.link/0c364c29142f72b7875fdeba51f3c9bd6ca863ee.1745839788.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 50935044e58e563cdcfd556d62f27bc8744dd64e Author: Ayushi Makhija Date: Mon May 5 15:12:45 2025 +0530 drm/bridge: anx7625: change the gpiod_set_value API Use gpiod_set_value_cansleep() instead of gpiod_set_value() to fix the below call trace in the boot log: [ 5.690534] Call trace: [ 5.690536] gpiod_set_value+0x40/0xa4 [ 5.690540] anx7625_runtime_pm_resume+0xa0/0x324 [anx7625] [ 5.690545] __rpm_callback+0x48/0x1d8 [ 5.690549] rpm_callback+0x6c/0x78 Certain GPIO controllers require access via message-based buses such as I2C or SPI, which may cause the GPIOs to enter a sleep state. Therefore, use the gpiod_set_value_cansleep(). Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250505094245.2660750-7-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit 366ca0bcc953a4a8a9c9ce2133e6843730210049 Author: Ayushi Makhija Date: Mon May 5 15:12:44 2025 +0530 drm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd status In the anx7625_sink_detect(), the device is checked to see if it is a panel bridge, and it always sends a "connected" status to the connector. When adding the DP port on port 1 of the anx7625, it incorrectly treats it as a panel bridge and sends an always "connected" status. Instead of checking the status on the panel bridge, it's better to check the hpd_status for connectors that supports hot-plugging. This way, it verifies the hpd_status variable before sending the status to the connector. In case of eDP, anx7625_bridge_detect() will not get called because the bridge->ops condition in anx7625_link_bridge() will not be satisfied. Since anx7625_sink_detect() is called from anx7625_bridge_detect(), this results in the sink_detect logic not being executed for eDP. Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250505094245.2660750-6-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit 71867e8d88fc7f94c2e47b3cfd676710c120cbe3 Author: Ayushi Makhija Date: Mon May 5 15:12:43 2025 +0530 drm/bridge: anx7625: fix drm_bridge ops flags to support hot-plugging The anx7625_link_bridge() checks if a device is not a panel bridge and add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the drm_bridge->ops. However, on port 1 of the anx7625 bridge, any device added is always treated as a panel bridge, preventing connector_detect() from being called. To resolve this, instead of just checking if it is a panel bridge, verify the type of device based on aux whether it is a DisplayPort or eDP panel. If the device is not of the eDP type, add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the to the drm_bridge->ops. Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250505094245.2660750-5-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit ca8a78cdceb48ad3b753f836068611265840ef22 Author: Ayushi Makhija Date: Mon May 5 15:12:42 2025 +0530 drm/bridge: anx7625: enable HPD interrupts When the device enters the suspend state, it prevents HPD interrupts from occurring. To address this, implement .hpd_enable() and .hpd_disable() callbacks functions of the drm_bridge. Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250505094245.2660750-4-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit e9ddb37834eb93b9840ac9aa93a36d70f27c3e32 Author: Tetsuo Handa Date: Mon May 5 22:55:53 2025 +0900 tomoyo: update mailing lists OSDN stopped working. Signed-off-by: Tetsuo Handa commit ab8131028710d009ab93d6bffd2a2749ade909b0 Author: Yazen Ghannam Date: Tue Apr 22 18:48:30 2025 -0500 x86/CPU/AMD: Print the reason for the last reset The following register contains bits that indicate the cause for the previous reset. PMx000000C0 (FCH::PM::S5_RESET_STATUS) This is useful for debug. The reasons for reset are broken into 6 high level categories. Decode it by category and print during boot. Specifics within a category are split off into debugging documentation. The register is accessed indirectly through a "PM" port in the FCH. Use MMIO access in order to avoid restrictions with legacy port access. Use a late_initcall() to ensure that MMIO has been set up before trying to access the register. This register was introduced with AMD Family 17h, so avoid access on older families. There is no CPUID feature bit for this register. [ bp: Simplify the reason dumping loop. - merge a fix to not access an array element after the last one: https://lore.kernel.org/r/20250505133609.83933-1-superm1@kernel.org Reported-by: James Dutton ] [ mingo: - Use consistent .rst formatting - Fix 'Sleep' class field to 'ACPI-State' - Standardize pin messages around the 'tripped' verbiage - Remove reference to ring-buffer printing & simplify the wording - Use curly braces for multi-line conditional statements ] Signed-off-by: Yazen Ghannam Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250422234830.2840784-6-superm1@kernel.org commit 3919600d32b92e67f1d28376bd63152306e99452 Author: Heiko Carstens Date: Wed Apr 30 09:58:05 2025 +0200 s390/mm: Fix potential use-after-free in __crst_table_upgrade() The pointer to the mm_struct which is passed to __crst_table_upgrade() may only be dereferenced if it is identical to current->active_mm. Otherwise the current task has no reference to the mm_struct and it may already be freed. In such a case this would result in a use-after-free bug. Make sure this use-after-free scenario does not happen by moving the code, which dereferences the mm_struct pointer, after the check which verifies that the pointer is identical to current->active_mm, like it was before lazy ASCE handling was reimplemented. Fixes: 8b72f5a97b82 ("s390/mm: Reimplement lazy ASCE handling") Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit f049a4f7ffa50000485a61d5518ffae24b662aaa Author: Heiko Carstens Date: Wed Apr 30 10:59:30 2025 +0200 s390/mm: Add mmap_assert_write_locked() check to crst_table_upgrade() Add mmap_assert_write_locked() check to crst_table_upgrade() in order to verify that no concurrent page table upgrades of an mm can happen. This allows to remove the VM_BUG_ON() check which checks for the potential inconsistent result of concurrent updates. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit b0903497e357080da97318d2b27c34b34aa10fa5 Author: Stefan Wahren Date: Fri Apr 18 16:33:06 2025 +0200 ARM: dts: bcm: Add support for Raspberry Pi 2 (2nd rev) The Raspberry Pi 2 (2nd rev) has the BCM2837 SoC instead of the BCM2836. Except of this the configuration of the board is same as the predecessor (no WLAN, no BT). Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20250418143307.59235-3-wahrenst@gmx.net Signed-off-by: Florian Fainelli commit 8dbcbf93c7c9395405f357b130789e76b27a063e Author: Stefan Wahren Date: Fri Apr 18 16:33:05 2025 +0200 dt-bindings: arm: bcm2835: Add Raspberry Pi 2 (2nd rev) Add the Raspberry Pi 2 (2nd rev) based on BCM2837 to DT schema. Signed-off-by: Stefan Wahren Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250418143307.59235-2-wahrenst@gmx.net Signed-off-by: Florian Fainelli commit e5032ead8599affac5d8b816ea3c9d63ebeec6b4 Author: Andy Shevchenko Date: Wed Apr 16 14:40:33 2025 +0300 genirq/irqdesc: Decrease indentation level in __irq_get_desc_lock() There is a conditional that covers all the code for the entire function. Invert it and decrease indentation level. This also helps for further changes to be clearer and tidier. [ tglx: Removed line breaks ] Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250416114122.2191820-2-andriy.shevchenko@linux.intel.com commit 1c64de886b8893c0158097edd6ba08d527a2c97a Author: Inochi Amaoto Date: Mon Apr 14 06:34:59 2025 +0800 dt-bindings: reset: sophgo: Add SG2044 bindings. The SG2044 shares the same reset controller as SG2042, so it is just enough to use the compatible string of SG2042 as a basis. Add compatible string for the reset controller of SG2044. Signed-off-by: Inochi Amaoto Acked-by: "Rob Herring (Arm)" Reviewed-by: Chen Wang Link: https://lore.kernel.org/r/20250413223507.46480-6-inochiama@gmail.com Signed-off-by: Philipp Zabel commit 57dfdfbe1a03408a0351afab83bd0f3e4741f727 Author: Lad Prabhakar Date: Tue Apr 15 20:51:31 2025 +0100 MAINTAINERS: Add entry for Renesas RZ/V2H(P) USB2PHY Port Reset driver Add a new MAINTAINERS entry for the Renesas RZ/V2H(P) USB2PHY Port Reset driver. Signed-off-by: Lad Prabhakar Acked-by: Fabrizio Castro Link: https://lore.kernel.org/r/20250415195131.281060-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Philipp Zabel commit e3911d7f865bbc704205f45333e491e4034942c7 Author: Lad Prabhakar Date: Tue Apr 15 20:51:30 2025 +0100 reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P) Implement a USB2PHY port reset driver for the Renesas RZ/V2H(P) SoC. Enable control of USB2.0 PHY reset and power-down operations, including assert and deassert functionalities for the PHY. Leverage device tree (OF) data to support future SoCs with similar USB2PHY hardware but varying register configurations. Define initialization values and control register settings to ensure flexibility for upcoming platforms. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/20250415195131.281060-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Philipp Zabel commit 261f3ff29a2b15ad70bf2530550421ad9a9a5966 Author: Lad Prabhakar Date: Tue Apr 15 20:51:29 2025 +0100 dt-bindings: reset: Document RZ/V2H(P) USB2PHY reset Add a device tree binding document for the Renesas RZ/V2H(P) USB2PHY reset controller. This block manages the reset and power-down of the USB 2.0 PHY, which is used in both host and function modes. Signed-off-by: Lad Prabhakar Reviewed-by: Krzysztof Kozlowski Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/20250415195131.281060-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Philipp Zabel commit 6b3754009f871083b114daacbad5b87a494da4b8 Author: Patrice Chotard Date: Fri Apr 11 14:41:10 2025 +0200 reset: Add devm_reset_control_array_get_exclusive_released() Add the released variant of devm_reset_control_array_get_exclusive(). Needed by spi-smt32-ospi driver as same reset line is ulso used by stm32-omm driver. Signed-off-by: Patrice Chotard Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20250411-b4-upstream_ospi_reset_update-v2-1-4de7f5dd2a91@foss.st.com Signed-off-by: Philipp Zabel commit c595b5402f403690681ff866ca29abf1ec970f53 Merge: 00ef5c728ec05a 6d732e8d1e6ddc Author: Jens Axboe Date: Mon May 5 07:13:44 2025 -0600 Merge branch 'block-6.15' into for-6.16/block Merge 6.15 block fixes in, once again, to resolve conflicts with the fixes for ublk that went into mainline and the 6.16 ublk updates. * block-6.15: nvmet-auth: always free derived key data nvmet-tcp: don't restore null sk_state_change nvmet-tcp: select CONFIG_TLS from CONFIG_NVME_TARGET_TCP_TLS nvme-tcp: select CONFIG_TLS from CONFIG_NVME_TCP_TLS nvme-tcp: fix premature queue removal and I/O failover nvme-pci: add quirks for WDC Blue SN550 15b7:5009 nvme-pci: add quirks for device 126f:1001 nvme-pci: fix queue unquiesce check on slot_reset ublk: remove the check of ublk_need_req_ref() from __ublk_check_and_get_req ublk: enhance check for register/unregister io buffer command ublk: decouple zero copy from user copy selftests: ublk: fix UBLK_F_NEED_GET_DATA Signed-off-by: Jens Axboe commit 3a1e07184d78f52c07f69b40bedbbebbc417e71b Author: Arnd Bergmann Date: Fri May 2 22:37:07 2025 +0200 gpio: blzp1600: remove incorrect pf_match_ptr() The blzp1600_gpio_of_match is defined unconditionally and can always be referenced by the driver, so don't use of_match_ptr() and avoid this warning: drivers/gpio/gpio-blzp1600.c:263:34: error: 'blzp1600_gpio_of_match' defined but not used [-Werror=unused-const-variable=] 263 | static const struct of_device_id blzp1600_gpio_of_match[] = { Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250502203721.2117186-1-arnd@kernel.org Signed-off-by: Bartosz Golaszewski commit 5268f3b5d29887480011b44567bcbf0d422cda94 Author: Nicolas Frattaroli Date: Wed Apr 30 18:16:36 2025 +0200 arm64: dts: rockchip: add RK3576 RNG node The RK3576 has a hardware random number generator IP built into the SoC. Add it to the SoC's .dtsi, now that there's a binding and driver for it. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250430-rk3576-hwrng-v1-3-480c15b5843e@collabora.com Signed-off-by: Heiko Stuebner commit 64745a9ca890ed60d78162ec511e1983e1946d73 Author: Herbert Xu Date: Mon May 5 20:54:41 2025 +0800 crypto: s390/sha512 - Initialise upper counter to zero for sha384 Initialise the high bit counter to zero in sha384_init. Also change the state initialisation to use ctx->sha512.state instead of ctx->state for consistency. Fixes: 572b5c4682c7 ("crypto: s390/sha512 - Use API partial block handling") Reported-by: Ingo Franzki Reported-by: Harald Freudenberger Signed-off-by: Herbert Xu commit f0911f29478992f37e91c208fe44c2ea5b378b61 Author: Zelong Dong Date: Fri Apr 11 19:38:17 2025 +0800 arm64: dts: amlogic: Add A5 Reset Controller Add the device node and related header file for Amlogic A5 reset controller. Signed-off-by: Zelong Dong Link: https://lore.kernel.org/r/20240918074211.8067-4-zelong.dong@amlogic.com Reviewed-by: Neil Armstrong Signed-off-by: Kelvin Zhang Link: https://lore.kernel.org/r/20250411-a4-a5-reset-v6-3-89963278c686@amlogic.com Signed-off-by: Neil Armstrong commit 946b51882b84f0cbec2acd203467866a7378abac Author: Zelong Dong Date: Fri Apr 11 19:38:16 2025 +0800 arm64: dts: amlogic: Add A4 Reset Controller Add the device node and related header file for Amlogic A4 reset controller. Signed-off-by: Zelong Dong Link: https://lore.kernel.org/r/20240918074211.8067-3-zelong.dong@amlogic.com Reviewed-by: Neil Armstrong Signed-off-by: Kelvin Zhang Link: https://lore.kernel.org/r/20250411-a4-a5-reset-v6-2-89963278c686@amlogic.com Signed-off-by: Neil Armstrong commit f5d4227c6dcab047579cca7b8e31a476ecdebf7b Author: Ferass El Hafidi Date: Fri May 2 18:56:06 2025 +0000 arm64: dts: amlogic: add support for xiaomi-aquaman/Mi TV Stick Xiaomi Mi TV Stick is a small Amlogic-based Android TV stick released in 2020. It is known as `xiaomi-aquaman` internally. Specifications: * Amlogic S805Y SoC * Android TV 9, upgradable to Android TV 10 * 8 GB eMMC * 1 GB of RAM * Wi-Fi + Bluetooth The devicetree is based on p241's DT, with some changes to better match the Mi TV Stick: * there is no Ethernet port, no IR, no CVBS connector on the stick * a white LED is present * adjust memory to have 1 GB of RAM available Signed-off-by: Ferass El Hafidi Link: https://lore.kernel.org/r/20250502-aquaman-v6-2-f1af347d9709@postmarketos.org Signed-off-by: Neil Armstrong commit 4954ec9300cfe7ab6f1de1c93c56c236ac0a07e5 Author: Ferass El Hafidi Date: Fri May 2 18:56:05 2025 +0000 dt-bindings: arm: amlogic: add S805Y and Mi TV Stick Add support for the Amlogic S805Y SoC and the Xiaomi Mi TV Stick (aka. xiaomi-aquaman). The S805Y is very similar to the S805X, with just a few minor differences. Acked-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Ferass El Hafidi Link: https://lore.kernel.org/r/20250502-aquaman-v6-1-f1af347d9709@postmarketos.org Signed-off-by: Neil Armstrong commit 16d4daa00ee69a43a4c79000d40f9271c85f7879 Author: Da Xue Date: Fri Apr 25 16:31:18 2025 -0400 arm64: dts: amlogic: gxl: set i2c bias to pull-up GXL I2C pins need internal pull-up enabled to operate if there is no external resistor. The pull-up is 60kohms per the datasheet. We should set the bias when i2c pinmux is enabled. Signed-off-by: Da Xue Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250425203118.1444481-1-da@libre.computer Signed-off-by: Neil Armstrong commit 692a497eb748fa597918f1faa11e77465b23cc00 Author: Johan Hovold Date: Thu Apr 24 09:44:48 2025 +0200 USB: serial: ti_usb_3410_5052: drop bogus read urb check The read urb pointer is dereferenced before checking that it is non-NULL during open(), but no check is needed as the existence of a bulk in endpoint is verified during attach() since commit ef079936d3cd ("USB: serial: ti_usb_3410_5052: fix NULL-deref at open"). Drop the bogus read urb sanity check. Signed-off-by: Johan Hovold commit 960bc2bcba5987a82530b9756e1f602a894cffa4 Author: Kees Cook Date: Sun May 4 15:30:38 2025 -0700 x86/fpu: Restore fpu_thread_struct_whitelist() to fix CONFIG_HARDENED_USERCOPY=y crash Borislav Petkov reported the following boot crash on x86-32, with CONFIG_HARDENED_USERCOPY=y: | usercopy: Kernel memory overwrite attempt detected to SLUB object 'task_struct' (offset 2112, size 160)! | ... | kernel BUG at mm/usercopy.c:102! So the useroffset and usersize arguments are what control the allowed window of copying in/out of the "task_struct" kmem cache: /* create a slab on which task_structs can be allocated */ task_struct_whitelist(&useroffset, &usersize); task_struct_cachep = kmem_cache_create_usercopy("task_struct", arch_task_struct_size, align, SLAB_PANIC|SLAB_ACCOUNT, useroffset, usersize, NULL); task_struct_whitelist() positions this window based on the location of the thread_struct within task_struct, and gets the arch-specific details via arch_thread_struct_whitelist(offset, size): static void __init task_struct_whitelist(unsigned long *offset, unsigned long *size) { /* Fetch thread_struct whitelist for the architecture. */ arch_thread_struct_whitelist(offset, size); /* * Handle zero-sized whitelist or empty thread_struct, otherwise * adjust offset to position of thread_struct in task_struct. */ if (unlikely(*size == 0)) *offset = 0; else *offset += offsetof(struct task_struct, thread); } Commit cb7ca40a3882 ("x86/fpu: Make task_struct::thread constant size") removed the logic for the window, leaving: static inline void arch_thread_struct_whitelist(unsigned long *offset, unsigned long *size) { *offset = 0; *size = 0; } So now there is no window that usercopy hardening will allow to be copied in/out of task_struct. But as reported above, there *is* a copy in copy_uabi_to_xstate(). (It seems there are several, actually.) int copy_sigframe_from_user_to_xstate(struct task_struct *tsk, const void __user *ubuf) { return copy_uabi_to_xstate(x86_task_fpu(tsk)->fpstate, NULL, ubuf, &tsk->thread.pkru); } This appears to be writing into x86_task_fpu(tsk)->fpstate. With or without CONFIG_X86_DEBUG_FPU, this resolves to: ((struct fpu *)((void *)(task) + sizeof(*(task)))) i.e. the memory "after task_struct" is cast to "struct fpu", and the uses the "fpstate" pointer. How that pointer gets set looks to be variable, but I think the one we care about here is: fpu->fpstate = &fpu->__fpstate; And struct fpu::__fpstate says: struct fpstate __fpstate; /* * WARNING: '__fpstate' is dynamically-sized. Do not put * anything after it here. */ So we're still dealing with a dynamically sized thing, even if it's not within the literal struct task_struct -- it's still in the kmem cache, though. Looking at the kmem cache size, it has allocated "arch_task_struct_size" bytes, which is calculated in fpu__init_task_struct_size(): int task_size = sizeof(struct task_struct); task_size += sizeof(struct fpu); /* * Subtract off the static size of the register state. * It potentially has a bunch of padding. */ task_size -= sizeof(union fpregs_state); /* * Add back the dynamically-calculated register state * size. */ task_size += fpu_kernel_cfg.default_size; /* * We dynamically size 'struct fpu', so we require that * 'state' be at the end of 'it: */ CHECK_MEMBER_AT_END_OF(struct fpu, __fpstate); arch_task_struct_size = task_size; So, this is still copying out of the kmem cache for task_struct, and the window seems unchanged (still fpu regs). This is what the window was before: void fpu_thread_struct_whitelist(unsigned long *offset, unsigned long *size) { *offset = offsetof(struct thread_struct, fpu.__fpstate.regs); *size = fpu_kernel_cfg.default_size; } And the same commit I mentioned above removed it. I think the misunderstanding is here: | The fpu_thread_struct_whitelist() quirk to hardened usercopy can be removed, | now that the FPU structure is not embedded in the task struct anymore, which | reduces text footprint a bit. Yes, FPU is no longer in task_struct, but it IS in the kmem cache named "task_struct", since the fpstate is still being allocated there. Partially revert the earlier mentioned commit, along with a recalculation of the fpstate regs location. Fixes: cb7ca40a3882 ("x86/fpu: Make task_struct::thread constant size") Reported-by: Borislav Petkov (AMD) Tested-by: Borislav Petkov (AMD) Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Chang S. Bae Cc: Gustavo A. R. Silva Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: linux-hardening@vger.kernel.org Link: https://lore.kernel.org/all/20250409211127.3544993-1-mingo@kernel.org/ # Discussion #1 Link: https://lore.kernel.org/r/202505041418.F47130C4C8@keescook # Discussion #2 commit fc91d5e6d948733773af35ef3b95504d8e588e4f Author: Florian Westphal Date: Wed Apr 23 11:57:29 2025 +0200 selftests: netfilter: nft_fib.sh: check lo packets bypass fib lookup With reverted fix: PASS: fib expression did not cause unwanted packet drops [ 37.285169] ns1-KK76Kt nft_rpfilter: IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32287 DF PROTO=ICMP TYPE=8 CODE=0 ID=1818 SEQ=1 FAIL: rpfilter did drop packets FAIL: ns1-KK76Kt cannot reach 127.0.0.1, ret 0 Check for this. Link: https://lore.kernel.org/netfilter/20250422114352.GA2092@breakpoint.cc/ Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b85e3367a5716ed3662a4fe266525190d2af76df Author: Pablo Neira Ayuso Date: Tue Apr 22 21:52:44 2025 +0200 netfilter: nft_set_pipapo: clamp maximum map bucket size to INT_MAX Otherwise, it is possible to hit WARN_ON_ONCE in __kvmalloc_node_noprof() when resizing hashtable because __GFP_NOWARN is unset. Similar to: b541ba7d1f5a ("netfilter: conntrack: clamp maximum hashtable size to INT_MAX") Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 4c5c6aa9967dbe55bd017bb509885928d0f31206 Author: Pablo Neira Ayuso Date: Tue Apr 22 21:52:43 2025 +0200 netfilter: nft_set_pipapo: prevent overflow in lookup table allocation When calculating the lookup table size, ensure the following multiplication does not overflow: - desc->field_len[] maximum value is U8_MAX multiplied by NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case. - NFT_PIPAPO_BUCKETS(f->bb) is 2^8, worst case. - sizeof(unsigned long), from sizeof(*f->lt), lt in struct nft_pipapo_field. Then, use check_mul_overflow() to multiply by bucket size and then use check_add_overflow() to the alignment for avx2 (if needed). Finally, add lt_size_check_overflow() helper and use it to consolidate this. While at it, replace leftover allocation using the GFP_KERNEL to GFP_KERNEL_ACCOUNT for consistency, in pipapo_resize(). Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Pablo Neira Ayuso Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 5e4d107abd796fa433084ae656076952fb7f7d6d Author: Florian Westphal Date: Tue Apr 22 15:17:29 2025 +0200 netfilter: nf_conntrack: speed up reads from nf_conntrack proc file Dumping all conntrack entries via proc interface can take hours due to linear search to skip entries dumped so far in each cycle. Apply same strategy used to speed up ipvs proc reading done in commit 178883fd039d ("ipvs: speed up reads from ip_vs_conn proc file") to nf_conntrack. Note that the ctnetlink interface doesn't suffer from this problem, but many scripts depend on the nf_conntrack proc interface. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bfe7cfb65c753952735c3eed703eba9a8b96a18d Author: Zhongqiu Duan Date: Thu Apr 17 15:49:30 2025 +0000 netfilter: nft_quota: match correctly when the quota just depleted The xt_quota compares skb length with remaining quota, but the nft_quota compares it with consumed bytes. The xt_quota can match consumed bytes up to quota at maximum. But the nft_quota break match when consumed bytes equal to quota. i.e., nft_quota match consumed bytes in [0, quota - 1], not [0, quota]. Fixes: 795595f68d6c ("netfilter: nft_quota: dump consumed quota") Signed-off-by: Zhongqiu Duan Signed-off-by: Pablo Neira Ayuso commit d33f889fd80c91e0250874e910fc58918eb660db Author: Florian Westphal Date: Thu Apr 17 17:14:28 2025 +0200 selftests: netfilter: add conntrack stress test Add a new test case to check: - conntrack_max limit is effective - conntrack_max limit cannot be exceeded from within a netns - resizing the hash table while packets are inflight works - removal of all conntrack rules disables conntrack in netns - conntrack tool dump (conntrack -L) returns expected number of (unique) entries - procfs interface - if available - has same number of entries as conntrack -L dump Expected output with selftest framework: selftests: net/netfilter: conntrack_resize.sh PASS: got 1 connections: netns conntrack_max is pernet bound PASS: got 100 connections: netns conntrack_max is init_net bound PASS: dump in netns had same entry count (-C 1778, -L 1778, -p 1778, /proc 0) PASS: dump in netns had same entry count (-C 2000, -L 2000, -p 2000, /proc 0) PASS: test parallel conntrack dumps PASS: resize+flood PASS: got 0 connections: conntrack disabled PASS: got 1 connections: conntrack enabled ok 1 selftests: net/netfilter: conntrack_resize.sh Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit aa04c6f45b9224b949aa35d4fa5f8d0ba07b23d4 Author: Huajian Yang Date: Thu Apr 17 17:29:53 2025 +0800 netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it The config NF_CONNTRACK_BRIDGE will change the bridge forwarding for fragmented packets. The original bridge does not know that it is a fragmented packet and forwards it directly, after NF_CONNTRACK_BRIDGE is enabled, function nf_br_ip_fragment and br_ip6_fragment will check the headroom. In original br_forward, insufficient headroom of skb may indeed exist, but there's still a way to save the skb in the device driver after dev_queue_xmit.So droping the skb will change the original bridge forwarding in some cases. Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system") Signed-off-by: Huajian Yang Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6f9ccdad0feaef58b05f07e0fc9d31004147177c Author: Thorsten Blum Date: Sat May 3 15:25:36 2025 +0200 ovl: Annotate struct ovl_entry with __counted_by() Add the __counted_by() compiler attribute to the flexible array member '__lowerstack' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum Signed-off-by: Miklos Szeredi commit 7314166ee7592513c77cfbb8ff579f376039f9c4 Author: Thorsten Blum Date: Sat May 3 13:52:44 2025 +0200 ovl: Replace offsetof() with struct_size() in ovl_stack_free() Compared to offsetof(), struct_size() provides additional compile-time checks for structs with flexible arrays (e.g., __must_be_array()). No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Miklos Szeredi commit 5aaf6a8cc3305e1000417f6fac9d131c47db9117 Author: Thorsten Blum Date: Sat May 3 13:52:03 2025 +0200 ovl: Replace offsetof() with struct_size() in ovl_cache_entry_new() Compared to offsetof(), struct_size() provides additional compile-time checks for structs with flexible arrays (e.g., __must_be_array()). No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Miklos Szeredi commit f0ccc717c6c64b0762f34cd1a2072bff44859423 Author: Arnd Bergmann Date: Mon May 5 07:21:21 2025 +0200 ALSA: hda/tas2781: select CONFIG_CRC8 for SND_HDA_SCODEC_TAS2781_I2C The crc8 function is used by the common fmwlib module, so this has to be selected directly to avoid a link failure: ERROR: modpost: "crc8" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! Fixes: 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250505052303.1812002-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 307addcc5672b0d340c0e08df5298d08c15bab75 Author: Dr. David Alan Gilbert Date: Sat May 3 00:52:19 2025 +0100 ALSA: core: Remove unused snd_jack_set_parent snd_jack_set_parent() was added as part of 2008's commit e76d8ceaaff9 ("ALSA: Add jack reporting API") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250502235219.1000429-6-linux@treblig.org commit 625a4681666adf626afc87a752974325f65a8c32 Author: Dr. David Alan Gilbert Date: Sat May 3 00:52:18 2025 +0100 ALSA: core: Remove unused snd_device_get_state snd_device_get_state() last use was removed in 2022 by commit 7e1afce5866e ("ALSA: usb-audio: Inform the delayed registration more properly") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250502235219.1000429-5-linux@treblig.org commit 81ea9e92941091bb3178d49e63b13bf4df2ee46b Author: Dr. David Alan Gilbert Date: Sat May 3 00:52:17 2025 +0100 ALSA: seq: Remove unused snd_seq_queue_client_leave_cells The last use of snd_seq_queue_client_leave_cells() was removed in 2018 by commit 85d59b57be59 ("ALSA: seq: Remove superfluous snd_seq_queue_client_leave_cells() call") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250502235219.1000429-4-linux@treblig.org commit a5f2dd266c0b5b706ebc39d64c1caaec636f8fbf Author: Dr. David Alan Gilbert Date: Sat May 3 00:52:16 2025 +0100 ALSA: pcm: Remove unused snd_dmaengine_pcm_open_request_chan snd_dmaengine_pcm_open_request_chan() last use was removed in 2022's commit b401d1fd8053 ("ASoC: pxa: remove unused board support") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250502235219.1000429-3-linux@treblig.org commit 15b39ced6247666f616e3b0b8eeb42cd4a8a11f2 Author: Dr. David Alan Gilbert Date: Sat May 3 00:52:15 2025 +0100 ALSA: pcm: Remove unused snd_pcm_rate_range_to_bits The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min and rate_max") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250502235219.1000429-2-linux@treblig.org commit 14a3fd030c033453d436233f4c422b4903786ed3 Author: Philipp Stanner Date: Fri Apr 25 10:17:43 2025 +0200 ASoC: intel: atom: Return -ENOMEM if pcim_iomap() fails The error checks for pcim_iomap() have the function return -EINVAL. -ENOMEM is a more appropriate error code. Replace -EINVAL with -ENOMEM. Signed-off-by: Philipp Stanner Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20250425081742.61623-6-phasta@kernel.org Signed-off-by: Mark Brown commit 938cabc603dc9b040fbfbf7c37b2b48dff8946d4 Author: Philipp Stanner Date: Fri Apr 25 10:17:42 2025 +0200 ASoC: intel: atom: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove the call to pci_release_regions(), since pcim_ functions do cleanup automatically. Pass 0 as length parameter to pcim_iomap(), which is the standard way for ioremapping an entire BAR. Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250425081742.61623-5-phasta@kernel.org Signed-off-by: Mark Brown commit 58fa9c629e29ae921d055c2b7a1e372ae991fb79 Author: Philipp Stanner Date: Fri Apr 25 10:17:41 2025 +0200 ASoC: intel: avs: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove the goto jump to pci_release_regions(), since pcim_ functions clean up automatically. Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250425081742.61623-4-phasta@kernel.org Signed-off-by: Mark Brown commit 45054bb10fd8a545a1feeaab16af1a87ab7fcce3 Author: Philipp Stanner Date: Fri Apr 25 10:17:40 2025 +0200 ASoC: sof: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove surplus calls to PCI release functions, since pcim_ functions do cleanup automatically. Signed-off-by: Philipp Stanner Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20250425081742.61623-3-phasta@kernel.org Signed-off-by: Mark Brown commit 222a87f6b94f6f177e896d6fcdc7881480344e34 Author: Krzysztof Kozlowski Date: Thu May 1 17:02:01 2025 +0200 spi: cadence-quadspi: Assume device could match via platform Driver has only of_device_id table, however it also has MODULE_ALIAS() for platform name, thus assume there is a configuration where this can be loaded outside of OF system. In such case of_device_get_match_data() will return NULL, which is already checked in one place of probe() function but not in the other, leading to Smatch warning: drivers/spi/spi-cadence-quadspi.c:1942 cqspi_probe() error: we previously assumed 'ddata' could be null (see line 1885) Driver should be consistent, so assume device can be matched via platform bus and of_device_get_match_data() can indeed return NULL. This is also possible with malformed DTS on OF-platform: no unit address and device node name matching driver name. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250501-n-smatch-fixes-v2-3-d2ad9c1f2e67@linaro.org Signed-off-by: Mark Brown commit f4ea37a485e97234af9550b63c52394d029037ee Author: Krzysztof Kozlowski Date: Thu May 1 17:02:00 2025 +0200 spi: cs42l43: Make handling missing spk-id GPIOs explicit gpiod_get_array_optional() for spk-id GPIOs can return NULL, if they are missing, so do not pass the value to PTR_ERR but instead explicitly treat NULL as acceptable condition. The old code was correct, but misleading because PTR_ERR usually is used on errors. Reported by Smatch: drivers/spi/spi-cs42l43.c:241 cs42l43_get_speaker_id_gpios() warn: passing zero to 'PTR_ERR' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20250501-n-smatch-fixes-v2-2-d2ad9c1f2e67@linaro.org Signed-off-by: Mark Brown commit 075812e45e9ef1b882aa66b9d122d8b8739aae59 Author: Krzysztof Kozlowski Date: Thu May 1 17:01:59 2025 +0200 spi: atmel-quadspi: Fix printed error code during DMA setup On dma_request_chan() failure driver NULL-ifies the 'rx_chan' and immediately uses it as PTR_ERR() so dev_err_probe() prints incorrect error code. Rework the code so proper error code will be printed and NULL-ifying of 'rx_chan' will happen in common error handling block (failure of DMA setup is not fatal for the driver and further code depends on 'rx_chan' being non-NULL for DMA operations). Reported by Smatch: drivers/spi/atmel-quadspi.c:1287 atmel_qspi_dma_init() warn: passing zero to 'PTR_ERR' Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250501-n-smatch-fixes-v2-1-d2ad9c1f2e67@linaro.org Signed-off-by: Mark Brown commit 870c1f0dc2a5e67eb0697ae14365b930684ddfa5 Author: Herbert Xu Date: Sun May 4 21:33:25 2025 +0800 crypto: padlock-sha - Use core import and export for fallback As padlock-sha is block-only, it needs to use core import and export on the fallback. Also call sha256_block_init instead of sha256_init although this is harmless as sha256_init doesn't write into the partial block area. Fixes: 63dc06cd12f9 ("crypto: padlock-sha - Use API partial block handling") Signed-off-by: Herbert Xu commit 88bca957e87e9a8a274213db257a744170b7248a Author: Herbert Xu Date: Sun May 4 21:33:23 2025 +0800 crypto: ahash - Add HASH_REQUEST_ZERO Add a helper to zero hash stack requests that were never cloned off the stack. Signed-off-by: Herbert Xu commit 1052671ca118b79fa3f5de281bba850aaf20bbf5 Author: Herbert Xu Date: Sun May 4 21:33:21 2025 +0800 crypto: ahash - Add core export and import Add crypto_ahash_export_core and crypto_ahash_import_core. For now they only differ from the normal export/import functions when going through shash. Signed-off-by: Herbert Xu commit fd66f2ab09b8305006764887cc47eeeb1ca5704b Author: Herbert Xu Date: Sun May 4 21:33:18 2025 +0800 crypto: ahash - Enforce MAX_SYNC_HASH_REQSIZE for sync ahash As sync ahash algorithms (currently there are none) are used without a fallback, ensure that they obey the MAX_SYNC_HASH_REQSIZE rule just like shash algorithms. Signed-off-by: Herbert Xu commit f4e365d5ca38941708fbe8356719e3436cef7627 Author: Herbert Xu Date: Sun May 4 21:33:16 2025 +0800 crypto: shash - Mark shash algorithms as REQ_VIRT Mark shash algorithms with the REQ_VIRT bit as they can handle virtual addresses as is. Signed-off-by: Herbert Xu commit 2b1a29ce3360570aeff053d1315cd504d94eab31 Author: Herbert Xu Date: Sun May 4 21:33:14 2025 +0800 crypto: shash - Cap state size to HASH_MAX_STATESIZE Now that all shash algorithms have converted over to the generic export format, limit the shash state size to HASH_MAX_STATESIZE. Signed-off-by: Herbert Xu commit ecd71c95a60e7298acfabe81189439f350bd0e18 Author: Herbert Xu Date: Sun May 4 14:13:50 2025 +0800 crypto: zynqmp-sha - Fix partial block implementation The zynqmp-sha partial block was based on an old design of the partial block API where the leftover calculation was done in the Crypto API. As the leftover calculation is now done by the algorithm, fix this by passing the partial blocks to the fallback. Also zero the stack descriptors. Fixes: 201e9ec3b621 ("crypto: zynqmp-sha - Use API partial block handling") Signed-off-by: Herbert Xu commit 7c234e138c67c1157b17f1fab8cc95d62f8f4444 Author: Ethan Carter Edwards Date: Sat May 3 16:21:28 2025 -0400 crypto: hisilicon/qm - replace devm_kzalloc with devm_kcalloc Replace devm_kzalloc that has an internal multiplication with devm_kcalloc to improve code readability and safety from overflows. Signed-off-by: Ethan Carter Edwards Signed-off-by: Herbert Xu commit f1fb16efe50bb7953ef3c224e1b3802559d26cc3 Author: Ethan Carter Edwards Date: Sat May 3 16:21:27 2025 -0400 crypto: hisilicon/qm - remove sizeof(char) `sizeof(char)` evaluates to 1. Remove the churn. Signed-off-by: Ethan Carter Edwards Signed-off-by: Herbert Xu commit 08811169ac016a234765e23deb45a5c8dd8aee6b Author: Herbert Xu Date: Fri May 2 17:00:43 2025 +0800 crypto: s390/hmac - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Signed-off-by: Herbert Xu commit 3bf5337879101166dfacfbc2a780d1a379c288ba Author: Herbert Xu Date: Fri May 2 13:31:12 2025 +0800 crypto: sha256 - Use the partial block API Use the shash partial block API by default. Add a separate set of lib shash algorithms to preserve testing coverage until lib/sha256 has its own tests. Signed-off-by: Herbert Xu commit 3007e90572d0c5fd409c3d2fa8cedcbd5cb06d4b Author: Herbert Xu Date: Fri May 2 13:31:09 2025 +0800 crypto: lib/sha256 - Use generic block helper Use the BLOCK_HASH_UPDATE_BLOCKS helper instead of duplicating partial block handling. Also remove the unused lib/sha256 force-generic interface. Signed-off-by: Herbert Xu commit ee8a720e39ceb7495ab639c1eb6d4987fb6a52bf Author: Herbert Xu Date: Fri May 2 13:31:07 2025 +0800 crypto: x86/sha256 - Add simd block function Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function so that the caller can decide whether to use SIMD. Signed-off-by: Herbert Xu commit 491d6024f2820c78216b07cec1cb47c87dcae077 Author: Herbert Xu Date: Fri May 2 13:31:05 2025 +0800 crypto: riscv/sha256 - Add simd block function Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function so that the caller can decide whether to use SIMD. Signed-off-by: Herbert Xu commit adcb9e32e5e28935ec1148e1a314282a7367428d Author: Herbert Xu Date: Fri May 2 13:31:03 2025 +0800 crypto: arm64/sha256 - Add simd block function Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function so that the caller can decide whether to use SIMD. Signed-off-by: Herbert Xu commit 2e43fc6d79cb24e0fe34aa4c2229ab6c414d852a Author: Herbert Xu Date: Fri May 2 13:31:00 2025 +0800 crypto: arm/sha256 - Add simd block function Add CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD and a SIMD block function so that the caller can decide whether to use SIMD. Signed-off-by: Herbert Xu commit 67488527afa9a51d8967dff91af0d1ead19218a0 Author: Herbert Xu Date: Fri May 2 13:30:58 2025 +0800 crypto: arch/sha256 - Export block functions as GPL only Export the block functions as GPL only, there is no reason to let arbitrary modules use these internal functions. Signed-off-by: Herbert Xu commit ff8f037d394f0900597ba527388a6eb95cd02695 Author: Herbert Xu Date: Fri May 2 13:30:56 2025 +0800 crypto: sha256 - Use the partial block API for generic The shash interface already handles partial blocks, use it for sha224-generic and sha256-generic instead of going through the lib/sha256 interface. Signed-off-by: Herbert Xu commit 5b90a779bc547939421bfeb333e470658ba94fb6 Author: Herbert Xu Date: Fri May 2 13:30:53 2025 +0800 crypto: lib/sha256 - Add helpers for block-based shash Add an internal sha256_finup helper and move the finalisation code from __sha256_final into it. Also add sha256_choose_blocks and CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD so that the Crypto API can use the SIMD block function unconditionally. The Crypto API must not be used in hard IRQs and there is no reason to have a fallback path for hardirqs. Signed-off-by: Herbert Xu commit 7d2461c7616743d62be0df8f9a5f4a6de29f119a Author: Ovidiu Panait Date: Thu May 1 22:06:51 2025 +0300 crypto: sun8i-ce-hash - use pm_runtime_resume_and_get() Replace pm_runtime_get_sync() usage with pm_runtime_resume_and_get() to simplify error handling. This is recommended in the documentation of pm_runtime_get_sync(). Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 9334f427576e6d361a409959b52246b0aa10476f Author: Ovidiu Panait Date: Thu May 1 22:06:50 2025 +0300 crypto: sun8i-ce - undo runtime PM changes during driver removal The pm_runtime_use_autosuspend() call must be undone with pm_runtime_dont_use_autosuspend() at driver exit, but this is not currently handled in the driver. To fix this issue and at the same time simplify error handling, switch to devm_pm_runtime_enable(). It will call both pm_runtime_disable() and pm_runtime_dont_use_autosuspend() during driver removal. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 8fd17374be8f220c26bec2b482cabf51ebbaed80 Author: Herbert Xu Date: Thu May 1 20:37:32 2025 +0800 crypto: api - Rename CRYPTO_ALG_REQ_CHAIN to CRYPTO_ALG_REQ_VIRT As chaining has been removed, all that remains of REQ_CHAIN is just virtual address support. Rename it before the reintroduction of batching creates confusion. Signed-off-by: Herbert Xu commit 0efae411280988b43d5e5042aa047eeb276d1dac Author: Herbert Xu Date: Thu May 1 20:37:30 2025 +0800 crypto: acomp - Clone folios properly The folios contain references to the request itself so they must be setup again in the cloned request. Fixes: 5f3437e9c89e ("crypto: acomp - Simplify folio handling") Signed-off-by: Herbert Xu commit 8f66ccbd8f67ab41b29f54f383f8a8516be7696c Author: Nicolas Frattaroli Date: Wed Apr 30 18:16:35 2025 +0200 hwrng: rockchip - add support for RK3576's RNG The Rockchip RK3576 SoC uses a new hardware random number generator IP. It's also used on the Rockchip RK3562 and the Rockchip RK3528. It has several modes of operation and self-checking features that are not implemented here. For starters, it has a DRNG output, which is an AES-CTR pseudo-random number generator that can be reseeded from the true entropy regularly. However, it also allows for access of the true entropy generator directly. This entropy is generated from an oscillator. There are several configuration registers which we don't touch here. The oscillator can be switched between a "CRO" and "STR" oscillator, and the length of the oscillator can be configured. The hardware also supports some automatic continuous entropy quality checking, which is also not implemented in this driver for the time being. The output as-is has been deemed sufficient to be useful: rngtest: starting FIPS tests... rngtest: bits received from input: 20000032 rngtest: FIPS 140-2 successes: 997 rngtest: FIPS 140-2 failures: 3 rngtest: FIPS 140-2(2001-10-10) Monobit: 0 rngtest: FIPS 140-2(2001-10-10) Poker: 1 rngtest: FIPS 140-2(2001-10-10) Runs: 1 rngtest: FIPS 140-2(2001-10-10) Long run: 1 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=17.050; avg=1897.272; max=19531250.000)Kibits/s rngtest: FIPS tests speed: (min=44.773; avg=71.179; max=96.820)Mibits/s rngtest: Program run time: 11760715 microseconds rngtest: bits received from input: 40000032 rngtest: FIPS 140-2 successes: 1997 rngtest: FIPS 140-2 failures: 3 rngtest: FIPS 140-2(2001-10-10) Monobit: 0 rngtest: FIPS 140-2(2001-10-10) Poker: 1 rngtest: FIPS 140-2(2001-10-10) Runs: 1 rngtest: FIPS 140-2(2001-10-10) Long run: 1 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=17.050; avg=1798.618; max=19531250.000)Kibits/s rngtest: FIPS tests speed: (min=44.773; avg=64.561; max=96.820)Mibits/s rngtest: Program run time: 23507723 microseconds Stretching the entropy can then be left up to Linux's actual entropy pool. Signed-off-by: Nicolas Frattaroli Signed-off-by: Herbert Xu commit 165ef524bbeb71ccd470e70a4e63f813fa71e7cd Author: Nicolas Frattaroli Date: Wed Apr 30 18:16:34 2025 +0200 dt-bindings: rng: rockchip,rk3588-rng: add rk3576-rng compatible The RK3576 SoC contains another standalone TRNG implementation. While the register map and hardware is different, it has the same clocks/interrupts/resets as the RK3588's TRNG, so can go in the same binding. Add the compatible and generalise the title/description of the binding some more. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 63ff962c058a0b32a6c512a9fcd5aae11ebcb7e1 Author: Ovidiu Panait Date: Wed Apr 30 14:59:53 2025 +0300 crypto: rng - fix documentation for crypto_rng_alg() Current documentation states that crypto_rng_alg() returns the cra_name of the rng algorithm, but it actually returns a 'struct rng_alg' pointer from a RNG handle. Update documentation to reflect this. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 17fd7514ae68c541bf952876ce2005cb4a53f283 Author: Laurent M Coquerel Date: Wed Apr 30 12:34:53 2025 +0100 crypto: qat - add qat_6xxx driver Add a new driver, qat_6xxx, to support QAT GEN6 devices. QAT GEN6 devices are a follow-on generation of GEN4 devices and differently from the previous generation, they can support all three services (symmetric, asymmetric, and data compression) concurrently. In order to have the qat_6xxx driver to reuse some of the GEN4 logic, a new abstraction layer has been introduced to bridge the two implementations. This allows to avoid code duplication and to keep the qat_6xxx driver isolated from the GEN4 logic. This approach has been used for the PF to VF logic and the HW CSR access logic. Signed-off-by: Laurent M Coquerel Co-developed-by: George Abraham P Signed-off-by: George Abraham P Co-developed-by: Karthikeyan Gopal Signed-off-by: Karthikeyan Gopal Co-developed-by: Suman Kumar Chakraborty Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 942028bc2fd9f35b1d54be21c06d7de5c40cf6b5 Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:52 2025 +0100 crypto: qat - add firmware headers for GEN6 devices Add firmware headers related to compression that define macros for building the hardware configuration word, along with bitfields related to algorithm settings. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit f14a2de55ad9cea49391bb42fc2d113d6cac16a4 Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:51 2025 +0100 crypto: qat - update firmware api Update the firmware API to have partial decomp as an argument. Modify the firmware descriptor to support auto-select best and partial decompress. Define the maximal auto-select best value. Define the mask and bit position for the partial decompress field in the firmware descriptor. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 0fdc836a371deedc9b604016486e692d49373362 Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:50 2025 +0100 crypto: qat - export adf_init_admin_pm() Export the function adf_init_admin_pm() as it will be used by the qat_6xxx driver to send the power management initialization messages to the firmware. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 7db55726450af0373b128e944f263b848eaa7dc2 Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:49 2025 +0100 crypto: qat - expose configuration functions The functions related to compression and crypto configurations were previously declared static, restricting the visibility to the defining source file. Remove the static qualifier, allowing it to be used in other files as needed. This is necessary for sharing this configuration functions with other QAT generations. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 61e152873adb00c32f6d87c04ab3b8ac6e14495f Author: Giovanni Cabiddu Date: Wed Apr 30 12:34:48 2025 +0100 crypto: qat - export adf_get_service_mask() Export the function adf_get_service_mask() as it will be used by the qat_6xxx driver to configure the device. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit e7b73261096749d5fa3320528f86daecd08a0556 Author: Jack Xu Date: Wed Apr 30 12:34:47 2025 +0100 crypto: qat - add GEN6 firmware loader Add support for the QAT GEN6 devices in the firmware loader. This includes handling firmware images signed with the RSA 3K and the XMSS algorithms. Co-developed-by: Suman Kumar Chakraborty Signed-off-by: Suman Kumar Chakraborty Signed-off-by: Jack Xu Signed-off-by: Herbert Xu commit 98943958a4895299c4f54719f4ef34b950a2ca4c Author: Jack Xu Date: Wed Apr 30 12:34:46 2025 +0100 crypto: qat - refactor FW signing algorithm The current implementation is designed to support single FW signing authentication only. Refactor the implementation to support other FW signing methods. This does not include any functional change. Co-developed-by: Suman Kumar Chakraborty Signed-off-by: Suman Kumar Chakraborty Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 7e673b80f420eb00660e01bf82befa8eaf652b28 Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:45 2025 +0100 crypto: qat - use pr_fmt() in qat uclo.c Add pr_fmt() to qat uclo.c logging and update the debug and error messages to utilize it accordingly. This does not introduce any functional changes. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit cd0e7160f80f5fd3ebb6481ddf4f562838cad4bf Author: Suman Kumar Chakraborty Date: Wed Apr 30 12:34:44 2025 +0100 crypto: qat - refactor compression template logic The logic that generates the compression templates, which are used by to submit compression requests to the QAT device, is very similar between QAT devices and diverges mainly on the HW generation-specific configuration word. This makes the logic that generates the compression and decompression templates common between GEN2 and GEN4 devices and abstracts the generation-specific logic to the generation-specific implementations. The adf_gen2_dc.c and adf_gen4_dc.c have been replaced by adf_dc.c, and the generation-specific logic has been reduced and moved to adf_gen2_hw_data.c and adf_gen4_hw_data.c. This does not introduce any functional change. Co-developed-by: Vijay Sundar Selvamani Signed-off-by: Vijay Sundar Selvamani Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit b8ca43806292d7094103c2af44fbb9824874b19e Author: George Abraham P Date: Wed Apr 30 12:34:43 2025 +0100 crypto: qat - rename and relocate timer logic Rename adf_gen4_timer.c to adf_timer.c and adf_gen4_timer.h to adf_timer.h to make the files generation-agnostic. This includes renaming the start() and stop() timer APIs and macro definitions to be generic, allowing for reuse across different device generations. This does not introduce any functional changes. Signed-off-by: George Abraham P Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit ce026b35b7b62094b640d3781d09bbd5b132b326 Author: Herbert Xu Date: Wed Apr 30 16:25:55 2025 +0800 crypto: x86/blake2s - Include linux/init.h Explicitly include linux/init.h rather than pulling it through potluck. Signed-off-by: Herbert Xu commit ef93f1562803cd7bb8159e3abedaf7f47dce4e35 Author: Herbert Xu Date: Wed Apr 30 16:17:02 2025 +0800 Revert "crypto: run initcalls for generic implementations earlier" This reverts commit c4741b23059794bd99beef0f700103b0d983b3fd. Crypto API self-tests no longer run at registration time and now occur either at late_initcall or upon the first use. Therefore the premise of the above commit no longer exists. Revert it and subsequent additions of subsys_initcall and arch_initcall. Note that lib/crypto calls will stay at subsys_initcall (or rather downgraded from arch_initcall) because they may need to occur before Crypto API registration. Signed-off-by: Herbert Xu commit 89490e6b80c53bf7783fe183a2fda8d0944f52d2 Author: Herbert Xu Date: Tue Apr 29 16:49:32 2025 +0800 crypto: s390/hmac - Extend hash length counters to 128 bits As sha512 requires 128-bit counters, extend the hash length counters to that length. Previously they were just 32 bits which means that a >4G sha256 hash would be incorrect. Signed-off-by: Herbert Xu commit 0e2392b6513cb138e2915ad08e33ac029358e957 Author: Herbert Xu Date: Tue Apr 29 16:43:22 2025 +0800 crypto: streebog - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 4a7e1e815c5de24339254eafb6f17cfe0d885a60 Author: Herbert Xu Date: Tue Apr 29 16:42:20 2025 +0800 crypto: rmd160 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 04c535ab156bf6c08aeb04d39bbcff0f53b7a0a7 Author: Suman Kumar Chakraborty Date: Mon Apr 28 18:24:26 2025 +0100 crypto: qat - include qat_common in top Makefile To ensure proper functionality, each specific driver needs to access functions located in the qat_common folder. Move the include path for qat_common to the top-level Makefile. This eliminates the need for redundant include directives in the Makefiles of individual drivers. Suggested-by: Andy Shevchenko Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 7350fef56b7629a539897c332d7324629580671d Author: Eric Biggers Date: Mon Apr 28 10:00:38 2025 -0700 crypto: lib/sha256 - improve function prototypes Follow best practices by changing the length parameters to size_t and explicitly specifying the length of the output digest arrays. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5aab01777fd38ff820bd7ae6cbc15d03b85de92f Author: Eric Biggers Date: Mon Apr 28 10:00:37 2025 -0700 crypto: sha256 - remove sha256_base.h sha256_base.h is no longer used, so remove it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 11d7956d526f72da82b575389a2d8f9eb15dea6c Author: Eric Biggers Date: Mon Apr 28 10:00:36 2025 -0700 crypto: x86/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. To match sha256_blocks_arch(), change the type of the nblocks parameter of the assembly functions from int to size_t. The assembly functions actually already treated it as size_t. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 699618d422759fe096a28ad2778d79807a5384ce Author: Eric Biggers Date: Mon Apr 28 10:00:35 2025 -0700 crypto: sparc/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 77735920ca9d6456a8135b30396b460791ace262 Author: Eric Biggers Date: Mon Apr 28 10:00:34 2025 -0700 crypto: sparc - move opcodes.h into asm directory Since arch/sparc/crypto/opcodes.h is now needed outside the arch/sparc/crypto/ directory, move it into arch/sparc/include/asm/ so that it can be included as . Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b9eac03edcf83e25cd2c21be18e7733249fd75c1 Author: Eric Biggers Date: Mon Apr 28 10:00:33 2025 -0700 crypto: s390/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit bf52d93865bde68896d20f2ce6c2f76d96cd678e Author: Eric Biggers Date: Mon Apr 28 10:00:32 2025 -0700 crypto: riscv/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. To match sha256_blocks_arch(), change the type of the nblocks parameter of the assembly function from int to size_t. The assembly function actually already treated it as size_t. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1a49c573bf886349c7bc958b331c700cf18601d8 Author: Eric Biggers Date: Mon Apr 28 10:00:31 2025 -0700 crypto: powerpc/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b67b6f9adb326f4a816b11bc3dabf9190070f536 Author: Eric Biggers Date: Mon Apr 28 10:00:30 2025 -0700 crypto: mips/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6e36be511d2846f40c0095c408797ceef17db4f5 Author: Eric Biggers Date: Mon Apr 28 10:00:29 2025 -0700 crypto: arm64/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. Remove support for SHA-256 finalization from the ARMv8 CE assembly code, since the library does not yet support architecture-specific overrides of the finalization. (Support for that has been omitted for now, for simplicity and because usually it isn't performance-critical.) To match sha256_blocks_arch(), change the type of the nblocks parameter of the assembly functions from int or 'unsigned int' to size_t. Update the ARMv8 CE assembly function accordingly. The scalar and NEON assembly functions actually already treated it as size_t. While renaming the assembly files, also fix the naming quirks where "sha2" meant sha256, and "sha512" meant both sha256 and sha512. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 642cfc0680ff9aae73cd87d6fffcc84d9434938b Author: Eric Biggers Date: Mon Apr 28 10:00:28 2025 -0700 crypto: arm64/sha256 - remove obsolete chunking logic Since kernel-mode NEON sections are now preemptible on arm64, there is no longer any need to limit the length of them. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ca4477e41c68b58043e67bc78074cd6fcc59ee5e Author: Eric Biggers Date: Mon Apr 28 10:00:27 2025 -0700 crypto: arm/sha256 - implement library instead of shash Instead of providing crypto_shash algorithms for the arch-optimized SHA-256 code, instead implement the SHA-256 library. This is much simpler, it makes the SHA-256 library functions be arch-optimized, and it fixes the longstanding issue where the arch-optimized SHA-256 was disabled by default. SHA-256 still remains available through crypto_shash, but individual architectures no longer need to handle it. To merge the scalar, NEON, and CE code all into one module cleanly, add !CPU_V7M as a direct dependency of the CE code. Previously, !CPU_V7M was only a direct dependency of the scalar and NEON code. The result is still the same because CPU_V7M implies !KERNEL_MODE_NEON, so !CPU_V7M was already an indirect dependency of the CE code. To match sha256_blocks_arch(), change the type of the nblocks parameter of the assembly functions from int to size_t. The assembly functions actually already treated it as size_t. While renaming the assembly files, also fix the naming quirk where "sha2" meant sha256. (SHA-512 is also part of SHA-2.) Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d66f470f4da9d8a2197305812b6e1bc860575340 Author: Vinod Govindapillai Date: Mon Apr 28 14:55:54 2025 +0300 drm/i915/display: implement wa_14022269668 As per the WA, fbc stride need to be programmed always for bmg. Display driver handles the need to program the fbc stride using the override stride. So ensure that we always get the override stride in case of bmg v2: re-phrase the commit message. Bspec: 74212 Signed-off-by: Vinod Govindapillai Reviewed-by: Juha-Pekka Heikkila Link: https://lore.kernel.org/r/20250428115554.116780-1-vinod.govindapillai@intel.com commit 3903b4701bc03d7d805c3df378a7fc2ff72cbef5 Author: Lad Prabhakar Date: Tue Apr 15 09:54:38 2025 +0100 soc: renesas: rz-sysc: Add SoC identification for RZ/V2N SoC Add SoC identification for the RZ/V2N SoC using the System Controller (SYS) block. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250415085438.83856-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5d6c7d34a82f8f9f3368739c62cfcc61d819c834 Author: Uwe Kleine-König Date: Fri Apr 4 10:00:43 2025 +0200 MAINTAINERS: Generalize ARM/RISC-V/RENESAS ARCHITECTURE Triggered by noticing that the pwm-rcar driver isn't covered by the Renesas maintainer entry, add this driver to it. Instead of adding it explicitly, just add a file regex for "rcar" (and drop the one entry that gets redundant by that). Looking at the output of $ git ls-files | grep rcar only shows files related to that architecture, so no X: line is currently needed. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250404080045.367845-2-u.kleine-koenig@baylibre.com Signed-off-by: Geert Uytterhoeven commit 5488aa013e9ef17c4c7aa8c4e6166dd89c69c3c6 Author: Lad Prabhakar Date: Tue Apr 15 14:08:54 2025 +0100 pinctrl: renesas: rzg2l: Add support for RZ/V2N SoC Add pinctrl support for the Renesas RZ/V2N SoC by reusing the existing RZ/V2H(P) pin configuration data. The PFC block is nearly identical, with the only difference being the absence of `PCIE1_RSTOUTB` on RZ/V2N. To handle this, the rzv2h_dedicated_pins array is refactored into a common and pcie1 subset. This enables reuse of the common portion across both SoCs, while excluding PCIE1_RSTOUTB for RZ/V2N. This change allows the pinctrl-rzg2l driver to support RZ/V2N without duplicating large parts of the RZ/V2H configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250415130854.242227-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit aff664cc8cbc5c28e5aa57dc4201c34497f3c871 Author: Geert Uytterhoeven Date: Mon Apr 28 13:45:55 2025 +0200 clk: renesas: Use str_on_off() helper Use the str_on_off() helper instead of open-coding the same operation. Note that this does change the case of the flags, which doesn't matter much for debug messages. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/622f8554dcb815c8fc73511a1a118c1724570fa9.1745840497.git.geert+renesas@glider.be commit 754a11c7bbe4edae9f04c940d5cb160e74266689 Author: Kuninori Morimoto Date: Thu Apr 17 23:23:41 2025 +0000 arm64: defconfig: Add Renesas MSIOF sound support Renesas V4H Sparrow Hawk board needs MSIOF Sound driver. Support it. Signed-off-by: Kuninori Morimoto Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/87o6wu2wzm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 5ad7de623853570bd981be069ed5ce55540bedb8 Author: Biju Das Date: Thu Apr 24 06:40:47 2025 +0100 arm64: defconfig: Enable Renesas RZ/G2L GPT config Enable PWM config for Renesas RZ/G2L GPT as it is populated on the RZ/G2L and RZ/V2L SMARC EVKs. Signed-off-by: Biju Das Acked-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250424054050.28310-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 99256644c8c9523e27312f6318058481943281ab Author: Biju Das Date: Thu Mar 20 16:41:18 2025 +0000 arm64: dts: renesas: r9a09g047e57-smarc: Enable CAN Transceiver Enable TCAN1046V-Q1 CAN Transceiver populated on RZ/G3E SMARC EVK by modelling it as two instances of tcan1042. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250320164121.193857-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f2858ea240d35ed35dc87108cf8b06685e89a421 Author: Biju Das Date: Thu Mar 20 16:41:17 2025 +0000 arm64: dts: renesas: r9a09g047e57-smarc: Enable CANFD Enable CANFD on the RZ/G3E SMARC EVK platform. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250320164121.193857-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9c1d49dd0975cd91529417a70a34817e489d954b Author: Biju Das Date: Thu Mar 20 16:41:16 2025 +0000 arm64: dts: renesas: r9a09g047: Add CANFD node Add CANFD node to RZ/G3E ("R9A09G047") SoC DTSI. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250320164121.193857-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e619e18ed462bded8e8f12672a37053d39451404 Author: Tiwei Bie Date: Sat May 3 13:17:10 2025 +0800 um: Remove legacy network transport infrastructure All legacy network transports have been removed. Vector transports provide the same capabilities with significantly higher network throughput. There is no reason to keep the legacy network transport infrastructure anymore. Remove it to reduce the maintenance burden. Signed-off-by: Tiwei Bie Acked-By: Anton Ivanov Link: https://patch.msgid.link/20250503051710.3286595-4-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit b555cb66583e99158cfef8e91c025252cefae55b Author: Tiwei Bie Date: Sat May 3 13:17:09 2025 +0800 um: vector: Eliminate the dependency on uml_net The only dependency on uml_net (i.e., the legacy network transport infrastructure) is the call to uml_net_setup_etheraddr(). Implement it inside vector to eliminate the uml_net dependency completely. It will allow us to remove uml_net in the next step. Signed-off-by: Tiwei Bie Acked-By: Anton Ivanov Link: https://patch.msgid.link/20250503051710.3286595-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 65eaac591b752042006d3a79c0cfba47e2a9aaac Author: Tiwei Bie Date: Sat May 3 13:17:08 2025 +0800 um: Remove obsolete legacy network transports These legacy network transports were marked as obsolete in commit 40814b98a570 ("um: Mark non-vector net transports as obsolete"). More than five years have passed since then. Remove these network transports to reduce the maintenance burden. Suggested-by: Anton Ivanov Signed-off-by: Tiwei Bie Acked-By: Anton Ivanov Link: https://patch.msgid.link/20250503051710.3286595-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 304c9f7f8f439083c56846c4433fbab7467eb01e Author: Uros Bizjak Date: Fri Apr 18 10:33:59 2025 +0200 um/asm: Replace "REP; NOP" with PAUSE mnemonic Current minimum required version of binutils is 2.25, which supports PAUSE instruction mnemonic. Replace "REP; NOP" with this proper mnemonic. No functional change intended. Signed-off-by: Uros Bizjak Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: David Laight Link: https://patch.msgid.link/20250418083436.133148-2-ubizjak@gmail.com Signed-off-by: Johannes Berg commit 9c88156b2c81dc317297494e879f814e6574330a Author: Uros Bizjak Date: Fri Apr 18 10:33:58 2025 +0200 um/asm: Rename rep_nop() to native_pause() Rename rep_nop() function to what it really does. No functional change intended. Signed-off-by: Uros Bizjak Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: David Laight Link: https://patch.msgid.link/20250418083436.133148-1-ubizjak@gmail.com Signed-off-by: Johannes Berg commit 7633b8b1e793e3441448c12c271fbecc53397fa9 Author: Jiri Slaby (SUSE) Date: Tue Apr 15 12:47:13 2025 +0200 irqdomain: um: use irq_domain_create_linear() helper um_pci_init() open-codes what the irq_domain_create_linear() helper does already. Use the helper instead of open-coding it. This needs retval checking modification. Signed-off-by: Jiri Slaby (SUSE) Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Link: https://patch.msgid.link/20250415104713.106819-1-jirislaby@kernel.org Signed-off-by: Johannes Berg commit a0e2cb6a90634f3dc80f16e882a683ee5761b0b0 Author: Tiwei Bie Date: Sun Apr 13 23:44:21 2025 +0800 um: Add VFIO-based virtual PCI driver Implement a new virtual PCI driver based on the VFIO framework. This driver allows users to pass through PCI devices to UML via VFIO. Currently, only MSI-X capable devices are supported, and it is assumed that drivers will use MSI-X. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250413154421.517878-1-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 6767e8784cd2e8b386a62330ea6864949d983a3e Author: Benjamin Berg Date: Tue Apr 8 09:45:24 2025 +0200 um: use proper care when taking mmap lock during segfault Segfaults can occur at times where the mmap lock cannot be taken. If that happens the segfault handler may not be able to take the mmap lock. Fix the code to use the same approach as most other architectures. Unfortunately, this requires copying code from mm/memory.c and modifying it slightly as UML does not have exception tables. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250408074524.300153-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 49caacf1004d1e1fc40cfab165f104d051867c6e Author: Benjamin Berg Date: Tue Apr 8 09:45:23 2025 +0200 um: do not send SIGALRM to userspace in time-travel mode We send a SIGALRM to userspace processes to interrupt them. Really, doing so is only needed if they are actually executing at the time (to ensure we return to kernelspace). Unfortunately, we do not have that information readily available. We can however be sure that this is never the case when we are in time-travel mode with infinite CPU. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250408074524.300153-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 82c8e1280c74f80fbacb9efbba6dd7b23446e536 Author: Jiapeng Chong Date: Mon Mar 31 16:31:50 2025 +0800 um: Remove duplicate arch.h header ./arch/um/kernel/trap.c: arch.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19877 Signed-off-by: Jiapeng Chong Link: https://patch.msgid.link/20250331083150.72598-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Johannes Berg commit ec169727bf7365f7475f335116e1bb5896dd3603 Author: Krzysztof Kozlowski Date: Thu May 1 18:02:09 2025 +0200 arm64: dts: rockchip: Switch to undeprecated qcom,calibration-variant on RK3399 The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501160208.96451-2-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit e3407cc5eeff5a5375016a6da93c525f5ef2e1f9 Author: Christophe JAILLET Date: Fri May 2 17:32:19 2025 +0200 pmdomain: amlogic: Constify some structures Most structures in this driver are not modified. Constifying these structures moves some data to a read-only section, so increase overall security, especially when the structure holds some function pointers. (This is the case for see meson_ee_pwrc_domain_desc) On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 8924 3832 0 12756 31d4 drivers/pmdomain/amlogic/meson-ee-pwrc.o After: ===== text data bss dec hex filename 12396 336 0 12732 31bc drivers/pmdomain/amlogic/meson-ee-pwrc.o Signed-off-by: Christophe JAILLET Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/edc560afe2a8763c93341d161daeb8b33ba606c6.1746199917.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson commit 674d03f6bd6b0f8327f1a4920ff5893557facfbd Author: Sami Tolvanen Date: Wed Mar 26 19:05:00 2025 +0000 um: Add cmpxchg8b_emu and checksum functions to asm-prototypes.h With CONFIG_GENDWARFKSYMS, um builds fail due to missing prototypes in asm/asm-prototypes.h. Add declarations for cmpxchg8b_emu and the exported checksum functions, including csum_partial_copy_generic as it's also exported. Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503251216.lE4t9Ikj-lkp@intel.com/ Signed-off-by: Sami Tolvanen Link: https://patch.msgid.link/20250326190500.847236-2-samitolvanen@google.com Signed-off-by: Johannes Berg commit ec79aee752c6b5c7695cd82a57a8a9249d09316d Author: Diederik de Haas Date: Sat May 3 17:22:19 2025 +0200 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-quartz64-b The Quartz64 Model B has a Winbound 25Q64DWZPIG SPI flash chip, identified as 'U13' on the component placement schematic. In the Quartz 64 Model-B Schematic from 20220124 on page 17, we can see that the VCC connector is connected to VCCIO_FLASH and page 4 shows that that in turn is connected to the VCCIO2 domain. That domain uses vcc_1v8 as its power source. This fixes the following warning: spi-nor spi4.0: supply vcc not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250503152917.138648-3-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit fdc68be8a8acbea9630c3bca560b7a1cf3a952e2 Author: Diederik de Haas Date: Sat May 3 17:22:18 2025 +0200 arm64: dts: rockchip: Add phy-supply to gmac0 on NanoPi R5S According to paragraph "7.16. Power" of the RTL8211F-CG datasheet, gmac0 needs to have a 3.3V power supply. On page 22 of the NanoPi R5S version 2204, that is identified as VCC_GEPHY_3V3 which is connected to the VCC_3V3 power source. This fixes the following warning: rk_gmac-dwmac fe2a0000.ethernet: supply phy not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250503152917.138648-2-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 22361369c2e0dc01ec7c3b42b582a37ca05a0973 Author: Tiwei Bie Date: Wed Mar 26 15:01:13 2025 +0800 um: xterm: Update options for gnome-terminal The -x option is deprecated and might be removed in a future release of gnome-terminal. Let's recommend using -- instead. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250326070113.401857-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 9456e2c60171ecffc0ea26347418e6bedb64ee78 Author: Tiwei Bie Date: Wed Mar 26 15:01:12 2025 +0800 um: xterm: Add Wayland support Under Wayland, we should check WAYLAND_DISPLAY instead. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250326070113.401857-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit c895c32bf1ce90839fc525c5d23cbf867ebe519a Author: Heiko Stuebner Date: Sat May 3 22:10:43 2025 +0200 ARM: dts: rockchip: enable Mali gpu on rk3066 marsboard The rk3066 contains a Mali400 GPU, so enable it. There is no individual (or even controllable) supply for the GPU on the board. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503201043.990933-3-heiko@sntech.de commit cb2a6738f33c3a9da7d1c0afa9ea5e9d78282eaa Author: Heiko Stuebner Date: Sat May 3 22:10:42 2025 +0200 ARM: dts: rockchip: enable hdmi on rk3066 marsboard The marsboard does have a regular hdmi-a connector and can simply use the already existing infrastructure (rk3066-hdmi) for display output. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250503201043.990933-2-heiko@sntech.de commit dd6c77864aa69ba1079998c590b552e35649d51b Author: Andy Yan Date: Tue Apr 22 15:04:45 2025 +0800 Revert "ARM: dts: rockchip: drop grf reference from rk3036 hdmi" This reverts commit 1580ccb6ed9dc76b8ff3e2d8912e8215c8b0fa6d. The HSYNC/VSYNC polarity of rk3036 HDMI are controlled by GRF. Without the polarity configuration in GRF, it can be observed from the HDMI protocol analyzer that the H/V front/back timing output by RK3036 HDMI are currently not in line with the specifications. Signed-off-by: Andy Yan Tested-by: Heiko Stuebner #rk3036-kylin Link: https://lore.kernel.org/r/20250422070455.432666-7-andyshrk@163.com Signed-off-by: Heiko Stuebner commit cdc602ad064009470b1c40af51d4a8cd804eaaf9 Author: Andy Yan Date: Tue Apr 22 15:04:44 2025 +0800 ARM: dts: rockchip: Add ref clk for hdmi The RK3036 HDMI DDC bus requires it's PHY's reference clock to be enabled first before normal DDC communication can be carried out. Signed-off-by: Andy Yan Tested-by: Heiko Stuebner #rk3036-kylin Link: https://lore.kernel.org/r/20250422070455.432666-6-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 7220a310b9fbe431951e31487f7ae92498420e52 Author: Barnabás Czémán Date: Wed Apr 30 21:42:13 2025 +0200 drivers: gpu: drm: panel: Add BOE TD4320 Add driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7 mobile phone. Signed-off-by: Barnabás Czémán Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-2-7625e62d62b2@mainlining.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-2-7625e62d62b2@mainlining.org commit af28dfc32bb4bffd9666ac20891db9d3bce8a742 Author: Barnabás Czémán Date: Wed Apr 30 21:42:12 2025 +0200 dt-bindings: display: panel: Add BOE TD4320 Document BOE TD4320 6.3" 2340x1080 panel found in Xiaomi Redmi Note 7 smartphone. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-1-7625e62d62b2@mainlining.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-1-7625e62d62b2@mainlining.org commit 6e769fd53d25df5353150628ac0b149ae65d9cbd Author: Hans de Goede Date: Thu May 1 11:00:16 2025 +0200 media: atomisp: Remove atomisp-mt9m114 driver The "media: atomisp: Add support for sensors with a separate ISP v4l2_subdev" combined with some pending drivers/media/i2c/mt9m114.c changes makes the atomisp work nicely with the standard V4L2 mt9m114.c driver, avoiding the need for the atomisp specific atomisp-mt9m114 driver. The normal driver actually works better since the atomisp-mt9m114 driver does not have working exposure control, leading to a much too dark image. Remove the no longer necessary atomisp-mt9m114 driver. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit 1e8c2aa905e50a331f2d52bf1e72594f27113c6e Author: Hans de Goede Date: Sun Jan 5 22:17:27 2025 +0100 media: atomisp: Add support for sensors with a separate ISP v4l2_subdev Some sensors have an ISP inside the sensor which the sensor driver models as a separate v4l2-subdev, like the mt9m114 sensor-driver does. Since the atomisp driver emulates a standard /dev/video# v4l2-device without requiring the application to be aware of media-controller centric /dev/video# devices this requires some special handling in the driver. Add support for this setup to the atomisp driver. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit bceff719ef46078ddbc3f20298b7b79ad0f67889 Author: Hans de Goede Date: Thu May 1 11:44:44 2025 +0200 media: atomisp: Avoid deadlock with sensor subdevs with state_lock set When a (sensor) v4l2_subdev has its state_lock member set to non NULL, then all v4l2_subdev_state-s for the sensor share the same lock. atomisp_init_sensor() calls v4l2_subdev_lock_and_get_active_state() and then later on also tries to lock a separate v4l2_subdev_state used for try calls (rather then changing the active state), while still holding the active state lock. Since this try v4l2_subdev_state shares a lock with the active state this results in a deadlock. Skip locking try_sd_state when sensor->state_lock is set to avoid this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit 72ebfff219459b062394fd2ad886b8e59e0195ca Author: Hans de Goede Date: Sun Jan 5 19:25:06 2025 +0100 media: atomisp: Rename camera to sensor The camera v4l2_subdev pointer in struct atomisp_input_subdev points to an image sensor, rename camera to sensor to make this more clear. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit eb5e3cdcfe87a5f23043a1e1ba41a9159545904e Author: Hardevsinh Palaniya Date: Mon Apr 21 10:57:58 2025 +0530 media: atomisp: Remove compat ioctl32 header file The atomisp_compat_ioctl32() function was deleted in commit b4c650f1af68 ("media: atomisp: remove compat_ioctl32 code"), so this header file is no longer needed. Additionally, the definition of atomisp_compat_ioctl32() in atomisp_ioctl.h is unused as well. Delete the declaration from the header. Signed-off-by: Hardevsinh Palaniya Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250421052804.11721-1-hardevsinh.palaniya@siliconsignals.io Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit fecae1a423962aff68ad171ff12baba5d67eccbb Author: Thomas Andreatta Date: Sat Apr 26 21:30:33 2025 +0200 media: atomisp: gmin: Fix indentation to use TAB instead of spaces Fix indentation to use TAB instead of spaces. Signed-off-by: Thomas Andreatta Link: https://lore.kernel.org/r/20250426193033.483124-1-thomas.andreatta2000@gmail.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 330995bb78375bb6309cf007585f429e9d6bc731 Author: Abraham Samuel Adekunle Date: Thu Apr 3 14:26:41 2025 +0100 media: atomisp: gmin: Remove duplicate NULL test When a value has been tested for NULL in an expression, a second NULL test on the same value in another expression is unnecessary when the value has not been assigned NULL. Remove unnecessary duplicate NULL tests on the same value that has previously been NULL tested. Found by Coccinelle. Signed-off-by: Abraham Samuel Adekunle Link: https://lore.kernel.org/r/26990d4a9d4419f9d4155a40595bc213acb671a0.1743685415.git.abrahamadekunle50@gmail.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e079805764f98de10adaa44b01a4ef309752c547 Author: Gabriel Shahrouzi Date: Mon Apr 7 08:36:08 2025 -0400 media: atomisp: Fix indentation to use TAB instead of spaces Replace spaces with TAB to comply with kernel coding style. Signed-off-by: Gabriel Shahrouzi Link: https://lore.kernel.org/r/20250407123608.366190-1-gshahrouzi@gmail.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2f9fc1b53c7bfc563a9362adf52955fe869b0387 Author: Liu Jing Date: Mon Dec 9 14:40:22 2024 +0800 media: atomisp: Fix spelling error in ia_css_sdis2_types.h Fix the coefficients spelling error in ia_css_sdis2_types.h. Signed-off-by: Liu Jing Link: https://lore.kernel.org/r/20241209064022.4342-1-liujing@cmss.chinamobile.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 5e663d592b33bf24d2d7dea4b08cabf317b41f46 Author: Ricardo Ribalda Date: Mon Dec 2 15:47:16 2024 +0000 media: atomisp: Use the actual value of the enum instead of the enum hrt_isp_css_irq_sw_pin_0 has a different enum type than irq_sw_channel_id_t. Replace it with the actual value of hrt_isp_css_irq_sw_pin_0 to avoid arithmetic operations between different enum types (and make the compiler happy). It is required to build with llvm 19 without these warnings: .../sh_css_hrt.c:68:19: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] .../sh_css.c:1233:40: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] .../sh_css.c:1237:40: warning: arithmetic between different enumeration types ('irq_sw_channel_id_t' and 'enum hrt_isp_css_irq') [-Wenum-enum-conversion] Signed-off-by: Ricardo Ribalda Link: https://lore.kernel.org/r/20241202-fix-llvm9-v1-2-2a50f5acfd0b@chromium.org Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 1d2e5bef1315fe5d92cb087beaba5d7b2c8d2cff Author: Hans de Goede Date: Wed Dec 11 18:35:16 2024 +0100 media: atomisp: Avoid picking too big sensor resolution atomisp_try_fmt() is limiting the width of the requested resolution to 1920 before calling the sensor's try_fmt() method. But it is not limiting the height. In case of the old mode-list based t4ka3 driver which has a mode list of: 736x496 896x736 1936x1096 3280x2464 This results in 3280x2464 being selected when try_fmt is called with a requested resolution of 3280x2464, which is not supported because its width > 1920 . Fix this by also limiting the height when in preview mode. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20241211173516.350779-1-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab commit 48ba117fadaf09b076c81e500a74f79646381fa8 Author: Hans de Goede Date: Thu Nov 7 23:11:34 2024 +0100 media: atomisp: gmin: Remove GPIO driven regulator support The GMIN code has support for sensors using external regulators enabled by GPIOS, rather then using regulators build into the PMIC. With the exception of the Trekstor ST70408-4 (1) tablet there are no known devices which actually use external regulators for the sensors and the code for this is using deprecated old style GPIO numbers support for which is going away. Remove the GPIO driven regulator support so that the gmin code no longer depends on deprecated GPIO APIs. 1) The GMIN support itself is also deprecated and all sensor drivers still using it are being moved over to use ACPI + runtime-pm and the ST70408-4 shipped with Android as factory OS and thus will have broken ACPI tables for the sensors, so like other Android factory OS tablets it will need a bespoke solution anyways. Reported-by: Bartosz Golaszewski Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20241107221134.596149-1-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab commit fa88d420cb477993d6ddd23d34d6bc61f6805e41 Author: Hans de Goede Date: Mon Nov 4 13:38:32 2024 +0100 media: atomisp: Remove gmin_platform Asus T100TA quirks The Asus T100TA quirks set the same values as the defaults, so they are not necessary. Remove them. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20241104123832.5539-1-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab commit 23be716b1c4f3f3a6c00ee38d51a57ef7db9ef7d Author: Dave Chinner Date: Thu May 1 09:27:24 2025 +1000 xfs: don't assume perags are initialised when trimming AGs When running fstrim immediately after mounting a V4 filesystem, the fstrim fails to trim all the free space in the filesystem. It only trims the first extent in the by-size free space tree in each AG and then returns. If a second fstrim is then run, it runs correctly and the entire free space in the filesystem is iterated and discarded correctly. The problem lies in the setup of the trim cursor - it assumes that pag->pagf_longest is valid without either reading the AGF first or checking if xfs_perag_initialised_agf(pag) is true or not. As a result, when a filesystem is mounted without reading the AGF (e.g. a clean mount on a v4 filesystem) and the first operation is a fstrim call, pag->pagf_longest is zero and so the free extent search starts at the wrong end of the by-size btree and exits after discarding the first record in the tree. Fix this by deferring the initialisation of tcur->count to after we have locked the AGF and guaranteed that the perag is properly initialised. We trigger this on tcur->count == 0 after locking the AGF, as this will only occur on the first call to xfs_trim_gather_extents() for each AG. If we need to iterate, tcur->count will be set to the length of the record we need to restart at, so we can use this to ensure we only sample a valid pag->pagf_longest value for the iteration. Signed-off-by: Dave Chinner Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Fixes: 89cfa899608f ("xfs: reduce AGF hold times during fstrim operations") Cc: # v6.6 Signed-off-by: Carlos Maiolino commit 950e5c84118c9e5b06bb9a9b64edf989ee4034df Author: Eric Biggers Date: Mon Apr 28 10:00:26 2025 -0700 crypto: sha256 - support arch-optimized lib and expose through shash As has been done for various other algorithms, rework the design of the SHA-256 library to support arch-optimized implementations, and make crypto/sha256.c expose both generic and arch-optimized shash algorithms that wrap the library functions. This allows users of the SHA-256 library functions to take advantage of the arch-optimized code, and this makes it much simpler to integrate SHA-256 for each architecture. Note that sha256_base.h is not used in the new design. It will be removed once all the architecture-specific code has been updated. Move the generic block function into its own module to avoid a circular dependency from libsha256.ko => sha256-$ARCH.ko => libsha256.ko. Signed-off-by: Eric Biggers Add export and import functions to maintain existing export format. Signed-off-by: Herbert Xu commit 10a6d72ea355b730aa9702da0fd36aef0898a80e Author: Herbert Xu Date: Mon Apr 28 12:56:28 2025 +0800 crypto: lib/poly1305 - Use block-only interface Now that every architecture provides a block function, use that to implement the lib/poly1305 and remove the old per-arch code. Signed-off-by: Herbert Xu commit ceef731b0e22df80a13d67773ae9afd55a971f9e Author: Herbert Xu Date: Mon Apr 28 12:56:25 2025 +0800 crypto: poly1305 - Remove algorithm As there are no in-kernel users of the Crypto API poly1305 left, remove it. Signed-off-by: Herbert Xu commit 34c418b742a64f4add67ad7975b3fa0e20d6cd92 Author: Herbert Xu Date: Mon Apr 28 12:56:23 2025 +0800 crypto: testmgr - Remove poly1305 As poly1305 no longer has any in-kernel users, remove its tests. Signed-off-by: Herbert Xu commit a298765e28adaea199f722142c10dae7e24dedf8 Author: Herbert Xu Date: Mon Apr 28 12:56:21 2025 +0800 crypto: chacha20poly1305 - Use lib/crypto poly1305 Since the poly1305 algorithm is fixed, there is no point in going through the Crypto API for it. Use the lib/crypto poly1305 interface instead. For compatiblity keep the poly1305 parameter in the algorithm name. Signed-off-by: Herbert Xu commit 318c53ae02f2abf1542062543741068278780d09 Author: Herbert Xu Date: Mon Apr 28 12:56:18 2025 +0800 crypto: x86/poly1305 - Add block-only interface Add block-only interface. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 14d31979145dbafaeb28a5bc4c90c4db918bb772 Author: Herbert Xu Date: Mon Apr 28 12:56:16 2025 +0800 crypto: powerpc/poly1305 - Add block-only interface Add block-only interface. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit ffe5ca295d757d912b226239df17396c3cd8dbca Author: Herbert Xu Date: Mon Apr 28 12:56:14 2025 +0800 crypto: mips/poly1305 - Add block-only interface Add block-only interface. Signed-off-by: Herbert Xu commit a59e5468a921937cb7317892779c67046ad9f5cc Author: Herbert Xu Date: Mon Apr 28 12:56:11 2025 +0800 crypto: arm64/poly1305 - Add block-only interface Add block-only interface. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 773426f4771bdd82ac5c834bf4c1775315c73a46 Author: Herbert Xu Date: Mon Apr 28 12:56:09 2025 +0800 crypto: arm/poly1305 - Add block-only interface Add block-only interface. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 9b84cb897803c484e15eb1885cd45a895ce1e436 Author: Herbert Xu Date: Mon Apr 28 12:56:07 2025 +0800 crypto: lib/poly1305 - Add block-only interface Add a block-only interface for poly1305. Implement the generic code first. Also use the generic partial block helper. Signed-off-by: Herbert Xu commit 74a43a2cf5e8a3eeab3b55a2e64b33281f5ac554 Author: Herbert Xu Date: Mon Apr 28 12:56:05 2025 +0800 crypto: lib/sha256 - Move partial block handling out Extract the common partial block handling into a helper macro that can be reused by other library code. Also delete the unused sha256_base_do_finalize function. Signed-off-by: Herbert Xu commit fba4aafaba8a6ca2bb42e854c37ff9a685ddfd71 Merge: 5b39aa368bcfe1 92a09c47464d04 Author: Herbert Xu Date: Mon May 5 13:25:15 2025 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux v6.15-rc5 Merge mainline to pick up bcachefs poly1305 patch 4bf4b5046de0 ("bcachefs: use library APIs for ChaCha20 and Poly1305"). This is a prerequisite for removing the poly1305 shash algorithm. commit ed4d95d033e359f9445e85bf5a768a5859a5830b Author: Ard Biesheuvel Date: Sun May 4 11:52:36 2025 +0200 x86/sev: Disentangle #VC handling code from startup code Most of the SEV support code used to reside in a single C source file that was included in two places: the core kernel, and the decompressor. The code that is actually shared with the decompressor was moved into a separate, shared source file under startup/, on the basis that the decompressor also executes from the early 1:1 mapping of memory. However, while the elaborate #VC handling and instruction decoding that it involves is also performed by the decompressor, it does not actually occur in the core kernel at early boot, and therefore, does not need to be part of the confined early startup code. So split off the #VC handling code and move it back into arch/x86/coco where it came from, into another C source file that is included from both the decompressor and the core kernel. Code movement only - no functional change intended. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-31-ardb+git@google.com commit 02eb1aff6fde3cb4469f37aec3c55df447ecceb1 Author: Kuan-Chung Chen Date: Wed Apr 30 13:51:57 2025 +0800 wifi: rtw89: constrain TX power according to dynamic antenna power table Dynamic Antenna Gain (DAG) adjusts TX power based on antenna gain. To prevent signal distortion from excessive power increases, a dynamic antenna power table limits the maximum adjustable TX power. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250430055157.13623-3-pkshih@realtek.com commit d31c42466b1a3fa5766252815f2a930636131514 Author: Kuan-Chung Chen Date: Wed Apr 30 13:51:56 2025 +0800 wifi: rtw89: phy: add C2H event handler for report of FW scan Newer firmware will notify driver of the Packet Detection (PD) value on the channel after switch channels during FW scan. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250430055157.13623-2-pkshih@realtek.com commit 0ae36391c804a0c7049812ce1d68e20cf8f1b84f Author: Ondrej Jirman Date: Tue Apr 29 14:29:11 2025 +0200 wifi: rtw89: Fix inadverent sharing of struct ieee80211_supported_band data Internally wiphy writes to individual channels in this structure, so we must not share one static definition of channel list between multiple device instances, because that causes hard to debug breakage. For example, with two rtw89 driven devices in the system, channel information may get incoherent, preventing channel use. Signed-off-by: Ondrej Jirman Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250429122916.1734879-3-megi@xff.cz commit 145df52a8671dc1cce4923904b3555971ee52612 Author: Ondrej Jirman Date: Tue Apr 29 14:29:10 2025 +0200 wifi: rtw89: Convert rtw89_core_set_supported_band to use devm_* The code can be simplified by using device managed memory allocations. Simplify it. Signed-off-by: Ondrej Jirman Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250429122916.1734879-2-megi@xff.cz commit c3dded7791370b8fa2354409542f8df19139c011 Author: Zong-Zhe Yang Date: Mon Apr 28 19:24:56 2025 +0800 wifi: rtw89: introduce helper to get designated link for MLO A link bound to HW band 0 was previously always assumed to exist, because it's true on non-MLD connection, and MLO connection is not supported yet. Now, start to consider MLO cases and prepare to enable MLO support in the following. Add skeleton of designated link. For single-link cases, helper returns the one. For multi-link cases, priorities can be scheduled. Then, drop assumption of link bound to HW band 0. One exception is that MCC doesn't work with MLD yet, so it still expects link on HW band 0 somewhere. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-11-pkshih@realtek.com commit d0e6c18fff72d87ba73960377e5094780b6ba229 Author: Zong-Zhe Yang Date: Mon Apr 28 19:24:55 2025 +0800 wifi: rtw89: roc: dynamically handle link id and link instance index Originally, a macro, RTW89_ROC_BY_LINK_INDEX, is used to decide the link which deals with the ROC process. Before enabling MLO support, it's fine to hard-code RTW89_ROC_BY_LINK_INDEX as 0 since the link instance-0 (on HW-0) is always active. But, for the impending enablement of MLO support, tweak the leaf functions to dynamically handle ROC link instance index. Besides, in the follow-up, ROC caller will get a designated link and will then drop RTW89_ROC_BY_LINK_INDEX. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-10-pkshih@realtek.com commit 6173b636c72286631de6849c88ebfc54fcbc94a2 Author: Po-Hao Huang Date: Mon Apr 28 19:24:54 2025 +0800 wifi: rtw89: Fill in correct Rx link ID for MLO For MLO connections, RX link ID is required to do address conversion. Fill it in by the hardware info. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-9-pkshih@realtek.com commit 9f1aa1054d803bc25db4a2dd8da91d5f3c77c02f Author: Po-Hao Huang Date: Mon Apr 28 19:24:53 2025 +0800 wifi: rtw89: add MLD capabilities declaration Add MLD capabilities so association requests can carry multi-link element with correct content. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-8-pkshih@realtek.com commit 8bb7dfa6b5b9345b7cce6b8eab05bdfdf6094ca8 Author: Po-Hao Huang Date: Mon Apr 28 19:24:52 2025 +0800 wifi: rtw89: extend join_info H2C command for MLO fields The join_info H2C command is used to indicate a station is connected and tell FW to create/maintain an instance for it. Extend to fill MLO fields. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-7-pkshih@realtek.com commit 667231dfea0828384ae383cc25c87bfe769d8446 Author: Po-Hao Huang Date: Mon Apr 28 19:24:51 2025 +0800 wifi: rtw89: Configure scan band when mlo_dbcc_mode changes Previously only the first band is used for scanning. With MLO, update scan parameters accordingly by so we can choose to scan from either band. C2H event return value reflects current scanning band, mask it out so we don't treat correct return value as fail. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-6-pkshih@realtek.com commit 6d9e16a961a3d3ad9ab666de0df25cba6e72166a Author: Zong-Zhe Yang Date: Mon Apr 28 19:24:50 2025 +0800 wifi: rtw89: extend mapping from Qsel to DMA ch for MLO After impending MLO support, TX Qsel would come from other HW band rather than HW-0. For example, when working on HW-1, TX release report may fill QSEL_XX_1 and cause warning "Cannot map qsel to dma: ...". So, extend the mapping to recognize multiple HW bands. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-5-pkshih@realtek.com commit e6512916eeb12cf496f58fd95e8cf0256bc1b63d Author: Po-Hao Huang Date: Mon Apr 28 19:24:49 2025 +0800 wifi: rtw89: Adjust management queue mapping for [MLO, HW-1] Adjust mapping of management packets accordingly to send it on the second hardware band. Previously only single band is used and we plan to enable MLO, so the second band will be needed. Data packets will be steered by hardware so no related changes are required. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-4-pkshih@realtek.com commit 372559788161e7ac883a72ea8f717922363fbaa3 Author: Po-Hao Huang Date: Mon Apr 28 19:24:48 2025 +0800 wifi: rtw89: 8922a: use SW CRYPTO when broadcast in MLO mode 8922A doesn't support broadcast/multicast traffic under MLO mode. So let mac80211 do the encryption/decryption for us when the connection is in MLO mode. Future BE ICs fixes this issue. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-3-pkshih@realtek.com commit b47e250e593e351840b8715da1dfb96e2c4ead23 Author: Ping-Ke Shih Date: Mon Apr 28 19:24:47 2025 +0800 wifi: rtw89: 8922a: rfk: adjust timeout time of RX DCK The RX DCK in firmware could retry 3 times if calibration value is not stable. Roughly each calibration can be done within 16 ms, so expect 16 * 4 (with additional 16 ms) will be enough. More, in coming MLO, it will do calibration on two path, so multiply 2. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250428112456.13165-2-pkshih@realtek.com commit 5b8dfb75b2c76fa4018357bc56aa8f2f210c8509 Author: Kees Cook Date: Fri Apr 25 23:09:36 2025 -0700 wifi: rtw89: fw: Remove "const" on allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct rtw89_reg2_def *" but the returned type, while technically matching, will be const qualified. As there isn't a general way to discard "const" qualifiers, adjust the returned type to match the assigned type. No change in allocation size results. Signed-off-by: Kees Cook Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250426060935.work.049-kees@kernel.org commit 406dac790c253f8935ae10dd8e14ad873d23e877 Author: Dr. David Alan Gilbert Date: Sat Apr 26 00:53:40 2025 +0100 wifi: rtlwifi: Remove unused rtl_bb_delay() The last use of rtl_bb_delay() was removed in 2014's commit 5c99f04fec93 ("rtlwifi: rtl8723be: Update driver to match Realtek release of 06/28/14") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250425235340.288340-4-linux@treblig.org commit 2d867b18eb934f691bec0e2ea0139c30ee0696ce Author: Dr. David Alan Gilbert Date: Sat Apr 26 00:53:39 2025 +0100 wifi: rtlwifi: Remove uncalled stub rtl*_phy_ap_calibrate rtl92d_phy_ap_calibrate(), rtl92du_phy_ap_calibrate(), rtl92ee_phy_ap_calibrate(), and rtl8821ae_phy_ap_calibrate() are all empty function stubs that are never called anywhere. Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250425235340.288340-3-linux@treblig.org commit d559636e382a86f228e9b8ad0de30ffd223b2d15 Author: Dr. David Alan Gilbert Date: Sat Apr 26 00:53:38 2025 +0100 wifi: rtlwifi: Remove unused rtl_usb_{resume|suspend} rtl_usb_resume() and rtl_usb_suspend() are trivial stubs that were added in 2011's commit 2ca20f79e0d8 ("rtlwifi: Add usb driver") but aren't wired up anywhere (though commit 442888c706e9 ("rtlwifi: rtl8192cu: Add routines dm, fw, led and sw") added commented out assignments). Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250425235340.288340-2-linux@treblig.org commit cccaea1d66e94bd42170c9372964a2ce62418fb1 Author: Thomas Huth Date: Fri Mar 14 08:09:56 2025 +0100 parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is mostly a completely mechanical patch (done with a simple "sed -i" statement), except for some manual tweaks in the files arch/parisc/include/asm/smp.h, arch/parisc/include/asm/signal.h, arch/parisc/include/asm/thread_info.h and arch/parisc/include/asm/vdso.h that had the macro spelled in a wrong way. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Thomas Huth Signed-off-by: Helge Deller commit e2b6a188625a2bbc83d4e6c76b59cb2e34353843 Author: Thomas Huth Date: Fri Mar 14 08:09:55 2025 +0100 parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers __ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code. This is almost a completely mechanical patch (done with a simple "sed -i" statement), except for a manual change in the file arch/parisc/include/uapi/asm/signal.h (where a comment was missing some underscores). Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Thomas Huth Signed-off-by: Helge Deller commit 96f94587d7413401630569f288477e6d97028efd Author: Alexey Charkov Date: Sat May 3 15:52:32 2025 +0400 soc: Add VIA/WonderMedia SoC identification driver Add a small SOC bus driver to parse the chip ID and revision made available on VIA/WonderMedia SoCs via their system configuration controller's SCC_ID register. This is intended to select appropriate sets of on-chip device quirks at runtime, as it has been found that even within the same SoC version there can be register-incompatible differences, such as with the SDMMC controller on WM8505 rev. A0-A1 vs. rev. A2. The list of SoC versions is compiled from various vendor source dumps and not all of them have corresponding mainline driver support. Some of them also have been seen with varying on-chip markings while sharing the same hardware chip ID's (as is the case with e.g. WM8850 vs. WM8950). In such cases the selection of names to use here among those seen in various source dumps and chip markings was arbitrary. Suggested by Krzysztof at [1] - thanks a lot! [1] https://lore.kernel.org/all/14de236b-e2a7-4bde-986d-1e5ffddd01b4@kernel.org/ Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250503-wmt-soc-driver-v3-2-2daa9056fa10@gmail.com Signed-off-by: Krzysztof Kozlowski commit 04e394d6e2a349d0522a6afe6db22f1f1a843e3a Author: Alexey Charkov Date: Sat May 3 15:52:31 2025 +0400 dt-bindings: hwinfo: Add VIA/WonderMedia SoC identification VIA/WonderMedia SoC's have a chip ID register inside their system configuration controller space, which can be used to identify appropriate hardware quirks at runtime. Add binding for it. Signed-off-by: Alexey Charkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250503-wmt-soc-driver-v3-1-2daa9056fa10@gmail.com Signed-off-by: Krzysztof Kozlowski commit 89944d88f8795c6c89b9514cb365998145511cd4 Author: David Lechner Date: Mon Apr 28 20:55:34 2025 -0500 iio: adc: ad7606_spi: fix reg write value mask Fix incorrect value mask for register write. Register values are 8-bit, not 9. If this function was called with a value > 0xFF and an even addr, it would cause writing to the next register. Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616") Signed-off-by: David Lechner Reviewed-by: Angelo Dureghello Link: https://patch.msgid.link/20250428-iio-adc-ad7606_spi-fix-write-value-mask-v1-1-a2d5e85a809f@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit db76003ade5953d4a83c2bdc6e15c2d1c33e7350 Author: Akhil P Oommen Date: Sat Apr 19 20:21:34 2025 +0530 dt-bindings: opp: Add v2-qcom-adreno vendor bindings Add a new schema which extends opp-v2 to support a new vendor specific property required for Adreno GPUs found in Qualcomm's SoCs. The new property called "qcom,opp-acd-level" carries a u32 value recommended for each opp needs to be shared to GMU during runtime. Also, update MAINTAINERS file include the new opp-v2-qcom-adreno.yaml. Cc: Rob Clark Signed-off-by: Akhil P Oommen Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649351/ Signed-off-by: Rob Clark commit 19c17841e3b62f45b01ae33db43de1a24e186adb Author: Akhil P Oommen Date: Sat Apr 19 20:21:33 2025 +0530 drm/msm/adreno: Add module param to disable ACD Add a module param to disable ACD which will help to quickly rule it out for any GPU issues. Signed-off-by: Akhil P Oommen Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/649349/ Signed-off-by: Rob Clark commit 8e98a81da283b9d2ca140b2bdd3767677e875ff3 Author: Akhil P Oommen Date: Sat Apr 19 20:21:32 2025 +0530 drm/msm: a6x: Rework qmp_get() error handling Fix the following for qmp_get() errors: 1. Correctly handle probe defer for A6x GPUs 2. Ignore other errors because those are okay when GPU ACD is not required. They are checked again during gpu acd probe. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Patchwork: https://patchwork.freedesktop.org/patch/649346/ Signed-off-by: Rob Clark commit 5f02f5e78ec9688e29b6857813185b1181796abe Author: Akhil P Oommen Date: Sat Apr 19 20:21:31 2025 +0530 drm/msm/a6xx: Increase HFI response timeout When ACD feature is enabled, it triggers some internal calibrations which result in a pretty long delay during the first HFI perf vote. So, increase the HFI response timeout to match the downstream driver. Signed-off-by: Akhil P Oommen Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Patchwork: https://patchwork.freedesktop.org/patch/649344/ Signed-off-by: Rob Clark commit b733fe7bff8bd14b9e0e2fd8f4de61696cb9f52e Author: Akhil P Oommen Date: Sat Apr 19 20:21:30 2025 +0530 drm/msm/adreno: Add support for ACD ACD a.k.a Adaptive Clock Distribution is a feature which helps to reduce the power consumption. In some chipsets, it is also a requirement to support higher GPU frequencies. This patch adds support for GPU ACD by sending necessary data to GMU and AOSS. The feature support for the chipset is detected based on devicetree data. Signed-off-by: Akhil P Oommen Tested-by: Maya Matuszczyk Tested-by: Anthony Ruhier Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/649342/ Signed-off-by: Rob Clark commit dda72ac390bfd2f3f69c5c3d8e1113abca99d4af Author: Rob Clark Date: Mon Apr 21 10:21:43 2025 -0700 drm/msm/adreno: Drop fictional address_space_size Really the only purpose of this was to limit the address space size to 4GB to avoid 32b rollover problems in 64b pointer math in older sqe fw. So replace the address_space_size with a quirk limiting the address space to 4GB. In all other cases, use the SMMU input address size (IAS) to determine the address space size. v2: Properly account for vm_start Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/649467/ commit c0134808a9d6c364b7568546be9489ce3337c7f8 Author: Connor Abbott Date: Thu Apr 24 09:30:17 2025 -0400 drm/msm: Be more robust when HFI response times out If the GMU takes too long to respond to an HFI message, we may return early. If the GMU does eventually respond, and then we send a second message, we will see the response for the first, throw another error, and keep going. But we don't currently wait for the interrupt from the GMU again, so if the second response isn't there immediately we may prematurely return. This can cause a continuous cycle of missed HFI messages, and for reasons I don't quite understand the GMU does not shut down properly when this happens. Fix this by waiting for the GMU interrupt when we see an empty queue. If the GMU never responds then the queue really is empty and we quit. We can't wait for the interrupt when we see a wrong response seqnum because the GMU might have already queued both responses by the time we clear the interrupt the first time so we do need to check the queue before waiting on the interrupt again. Signed-off-by: Connor Abbott Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/650013/ Signed-off-by: Rob Clark commit b71717735be48d7743a34897e9e44a0b53e30c0e Author: Stephan Gerhold Date: Tue Apr 29 10:33:56 2025 +0200 drm/msm/gpu: Fix crash when throttling GPU immediately during boot There is a small chance that the GPU is already hot during boot. In that case, the call to of_devfreq_cooling_register() will immediately try to apply devfreq cooling, as seen in the following crash: Unable to handle kernel paging request at virtual address 0000000000014110 pc : a6xx_gpu_busy+0x1c/0x58 [msm] lr : msm_devfreq_get_dev_status+0xbc/0x140 [msm] Call trace: a6xx_gpu_busy+0x1c/0x58 [msm] (P) devfreq_simple_ondemand_func+0x3c/0x150 devfreq_update_target+0x44/0xd8 qos_max_notifier_call+0x30/0x84 blocking_notifier_call_chain+0x6c/0xa0 pm_qos_update_target+0xd0/0x110 freq_qos_apply+0x3c/0x74 apply_constraint+0x88/0x148 __dev_pm_qos_update_request+0x7c/0xcc dev_pm_qos_update_request+0x38/0x5c devfreq_cooling_set_cur_state+0x98/0xf0 __thermal_cdev_update+0x64/0xb4 thermal_cdev_update+0x4c/0x58 step_wise_manage+0x1f0/0x318 __thermal_zone_device_update+0x278/0x424 __thermal_cooling_device_register+0x2bc/0x308 thermal_of_cooling_device_register+0x10/0x1c of_devfreq_cooling_register_power+0x240/0x2bc of_devfreq_cooling_register+0x14/0x20 msm_devfreq_init+0xc4/0x1a0 [msm] msm_gpu_init+0x304/0x574 [msm] adreno_gpu_init+0x1c4/0x2e0 [msm] a6xx_gpu_init+0x5c8/0x9c8 [msm] adreno_bind+0x2a8/0x33c [msm] ... At this point we haven't initialized the GMU at all yet, so we cannot read the GMU registers inside a6xx_gpu_busy(). A similar issue was fixed before in commit 6694482a70e9 ("drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy"): msm_devfreq_init() does call devfreq_suspend_device(), but unlike msm_devfreq_suspend(), it doesn't set the df->suspended flag accordingly. This means the df->suspended flag does not match the actual devfreq state after initialization and msm_devfreq_get_dev_status() will end up accessing GMU registers, causing the crash. Fix this by setting df->suspended correctly during initialization. Cc: stable@vger.kernel.org Fixes: 6694482a70e9 ("drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy") Signed-off-by: Stephan Gerhold Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/650772/ Signed-off-by: Rob Clark commit 07a5ebfe04b179b535e3a4cd38722671d87565d4 Author: Vignesh Raman Date: Fri Mar 28 16:32:33 2025 +0530 drm/ci: uprev mesa The current s3cp implementation does not work anymore after the migration, and instead of fixing it and propagating the fix down to us, it's simpler to directly use curl. Uprev mesa [1][2] to adapt these changes. Also replace broken s3cp command with a curl wrapper call in drm-ci. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120 [2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244 Signed-off-by: Vignesh Raman Patchwork: https://patchwork.freedesktop.org/patch/645597/ Signed-off-by: Rob Clark commit b75a99e1077b12c5631fef7ac36970a89f6021f7 Author: Danilo Krummrich Date: Mon Apr 28 16:00:29 2025 +0200 samples: rust: pci: take advantage of Devres::access() For the I/O operations executed from the probe() method, take advantage of Devres::access(), avoiding the atomic check and RCU read lock required otherwise entirely. Reviewed-by: Alexandre Courbot Acked-by: Boqun Feng Reviewed-by: Joel Fernandes Link: https://lore.kernel.org/r/20250428140137.468709-4-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f301cb978c068faa8fcd630be2cb317a2d0ec063 Author: Danilo Krummrich Date: Mon Apr 28 16:00:28 2025 +0200 rust: devres: implement Devres::access() Implement a direct accessor for the data stored within the Devres for cases where we can prove that we own a reference to a Device (i.e. a bound device) of the same device that was used to create the corresponding Devres container. Usually, when accessing the data stored within a Devres container, it is not clear whether the data has been revoked already due to the device being unbound and, hence, we have to try whether the access is possible and subsequently keep holding the RCU read lock for the duration of the access. However, when we can prove that we hold a reference to Device matching the device the Devres container has been created with, we can guarantee that the device is not unbound for the duration of the lifetime of the Device reference and, hence, it is not possible for the data within the Devres container to be revoked. Therefore, in this case, we can bypass the atomic check and the RCU read lock, which is a great optimization and simplification for drivers. Reviewed-by: Christian Schrefl Reviewed-by: Alexandre Courbot Acked-by: Boqun Feng Reviewed-by: Joel Fernandes Link: https://lore.kernel.org/r/20250428140137.468709-3-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 46f91addfabbd4109fb64876a032ae4a4a924919 Author: Danilo Krummrich Date: Mon Apr 28 16:00:27 2025 +0200 rust: revocable: implement Revocable::access() Implement an unsafe direct accessor for the data stored within the Revocable. This is useful for cases where we can prove that the data stored within the Revocable is not and cannot be revoked for the duration of the lifetime of the returned reference. Reviewed-by: Christian Schrefl Reviewed-by: Benno Lossin Acked-by: Miguel Ojeda Reviewed-by: Alexandre Courbot Acked-by: Boqun Feng Reviewed-by: Joel Fernandes Link: https://lore.kernel.org/r/20250428140137.468709-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 3f5fd1717ae9497215f22aa748fc2c09df88b0e3 Author: David Lechner Date: Fri May 2 10:04:30 2025 -0500 iio: adc: ad7606: fix raw read for 18-bit chips Fix 18-bit raw read for 18-bit chips by applying a mask to the value we receive from the SPI controller. SPI controllers either return 1, 2 or 4 bytes per word depending on the bits_per_word. For 16-bit chips, there was no problem since they raw data fit exactly in the 2 bytes received from the SPI controller. But now that we have 18-bit chips and we are using bits_per_word = 18, we cannot assume that the extra bits in the 32-bit word are always zero. In fact, with the AXI SPI Engine controller, these bits are not always zero which caused the raw values to read 10s of 1000s of volts instead of the correct value. Therefore, we need to mask the value we receive from the SPI controller to ensure that only the 18 bits of real data are used. Fixes: f3838e934dff ("iio: adc: ad7606: add support for AD7606C-{16,18} parts") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250502-iio-adc-ad7606-fix-raw-read-for-18-bit-chips-v1-1-06caa92d8f11@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit c553aa1b03719400a30d9387477190d4743fc1de Author: David Lechner Date: Tue Apr 22 15:12:27 2025 -0500 iio: adc: ad7173: fix compiling without gpiolib Fix compiling the ad7173 driver when CONFIG_GPIOLIB is not set by selecting GPIOLIB to be always enabled and remove the #if. Commit 031bdc8aee01 ("iio: adc: ad7173: add calibration support") placed unrelated code in the middle of the #if IS_ENABLED(CONFIG_GPIOLIB) block which caused the reported compile error. However, later commit 7530ed2aaa3f ("iio: adc: ad7173: add openwire detection support for single conversions") makes use of the gpio regmap even when we aren't providing gpio controller support. So it makes more sense to always enable GPIOLIB rather than trying to make it optional. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504220824.HVrTVov1-lkp@intel.com/ Fixes: 031bdc8aee01 ("iio: adc: ad7173: add calibration support") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250422-iio-adc-ad7173-fix-compile-without-gpiolib-v1-1-295f2c990754@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit 5297886f0cc45db5f4a804caf359e6e7874ee864 Author: Ard Biesheuvel Date: Sun May 4 11:52:45 2025 +0200 x86/boot: Provide __pti_set_user_pgtbl() to startup code The SME encryption startup code populates page tables using the ordinary set_pXX() helpers, and in a PTI build, these will call out to __pti_set_user_pgtbl() to manipulate the shadow copy of the page tables for user space. This is unneeded for the startup code, which only manipulates the swapper page tables, and so this call could be avoided in this particular case. So instead of exposing the ordinary __pti_set_user_pgtblt() to the startup code after its gets confined into its own symbol space, provide an alternative which just returns pgd, which is always correct in the startup context. Annotate it as __weak for now, this will be dropped in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-40-ardb+git@google.com commit 419cbaf6a56a6e4b7e6d2278302c197f55dec830 Author: Ard Biesheuvel Date: Sun May 4 11:52:44 2025 +0200 x86/boot: Add a bunch of PIC aliases Add aliases for all the data objects that the startup code references - this is needed so that this code can be moved into its own confined area where it can only access symbols that have a __pi_ prefix. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-39-ardb+git@google.com commit f932adcc8650eb169efd0fd19f2a450c260d306c Author: Ard Biesheuvel Date: Sun May 4 11:52:43 2025 +0200 x86/linkage: Add SYM_PIC_ALIAS() macro helper to emit symbol aliases Startup code that may execute from the early 1:1 mapping of memory will be confined into its own address space, and only be permitted to access ordinary kernel symbols if this is known to be safe. Introduce a macro helper SYM_PIC_ALIAS() that emits a __pi_ prefixed alias for a symbol, which allows startup code to access it. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-38-ardb+git@google.com commit ae862964cbc562582576da91b0b92742a574c437 Author: Ard Biesheuvel Date: Sun May 4 11:52:35 2025 +0200 x86/sev: Move instruction decoder into separate source file As a first step towards disentangling the SEV #VC handling code -which is shared between the decompressor and the core kernel- from the SEV startup code, move the decompressor's copy of the instruction decoder into a separate source file. Code movement only - no functional change intended. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-30-ardb+git@google.com commit fae89bbfdd9d692e3cb6eace89f4994177731b8c Author: Ard Biesheuvel Date: Sun May 4 11:52:34 2025 +0200 x86/sev: Make sev_snp_enabled() a static function sev_snp_enabled() is no longer used outside of the source file that defines it, so make it static and drop the extern declarations. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-29-ardb+git@google.com commit b3464a36f7f2499d517e8334e07ddd6eefcd67c1 Author: Ard Biesheuvel Date: Sun May 4 11:52:32 2025 +0200 x86/boot: Disregard __supported_pte_mask in __startup_64() __supported_pte_mask is statically initialized to U64_MAX and never assigned until long after the startup code executes that creates the initial page tables. So applying the mask is unnecessary, and can be avoided. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-27-ardb+git@google.com commit bd4a58beaaf1f4aff025282c6e8b130bdb4a29e4 Author: Ard Biesheuvel Date: Sun May 4 11:52:31 2025 +0200 x86/boot: Move early_setup_gdt() back into head64.c Move early_setup_gdt() out of the startup code that is callable from the 1:1 mapping - this is not needed, and instead, it is better to expose the helper that does reside in __head directly. This reduces the amount of code that needs special checks for 1:1 execution suitability. In particular, it avoids dealing with the GHCB page (and its physical address) in startup code, which runs from the 1:1 mapping, making physical to virtual translations ambiguous. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Arnd Bergmann Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250504095230.2932860-26-ardb+git@google.com commit ad10b82c2bcac7f87ac6eaecfca33378b43425ee Author: Andy Yan Date: Tue Apr 22 15:04:43 2025 +0800 drm/rockchip: inno-hdmi: Fix video timing HSYNC/VSYNC polarity setting for rk3036 The HSYNC/VSYNC polarity of rk3036 HDMI are controlled by GRF. Without the polarity configuration in GRF, it can be observed from the HDMI protocol analyzer that the H/V front/back timing output by RK3036 HDMI are currently not in line with the specifications. Signed-off-by: Andy Yan Tested-by: Heiko Stuebner #rk3036-kylin Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250422070455.432666-5-andyshrk@163.com commit 31b4403c6c523a710205eadb9ca75c6cfe1478ab Author: Andy Yan Date: Tue Apr 22 15:04:42 2025 +0800 drm/rockchip: inno-hdmi: Simplify error handler with dev_err_probe Use dev_err_probe simplify the error handle. Signed-off-by: Andy Yan Tested-by: Heiko Stuebner #rk3036-kylin Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250422070455.432666-4-andyshrk@163.com commit e0c93980d293b6e6eb7483fd5d665f84e725b518 Author: Andy Yan Date: Tue Apr 22 15:04:41 2025 +0800 dt-bindings: display: rockchip,inno-hdmi: Document GRF for RK3036 HDMI HDMI on RK3036 use GRF control the HSYNC/VSYNC polarity, but this part is missing when it first landing upstream. Document that it is mandatory for RK3036 HDMI. Signed-off-by: Andy Yan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250422070455.432666-3-andyshrk@163.com commit c0673bb356557136954b6725bf5fe327b94c6233 Author: Andy Yan Date: Tue Apr 22 15:04:40 2025 +0800 dt-bindings: display: rockchip,inno-hdmi: Fix Document of RK3036 compatible The RK3036 HDMI DDC bus requires it's PHY's reference clock to be enabled first before normal DDC communication can be carried out. Therefore, both RK3036 and RK3128 HDMI require two identical clocks. Signed-off-by: Andy Yan Reviewed-by: "Rob Herring (Arm)" Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250422070455.432666-2-andyshrk@163.com commit 57d6811e8a6d179aeadb7f102369d1ddefe5aae0 Author: Andy Yan Date: Mon Apr 28 18:23:07 2025 +0800 drm/rockchip: rk3066_hdmi: switch to drm bridge Convert it to drm bridge driver, it will be convenient for us to migrate the connector part to the display driver later. Note: I don't have the hardware to test this driver, so for now I can only do the compilation test. Signed-off-by: Andy Yan Tested-by: Heiko Stuebner #rk3066-marsboard Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250428102309.1501986-1-andyshrk@163.com commit 400da808fda7f32ea1849ae0aa7934726b6d423e Merge: ac4e04d9e378f5 121baab7b88ed8 Author: Rafael J. Wysocki Date: Sun May 4 12:35:42 2025 +0200 Merge back cpufreq material for 6.16 commit 39ffd86dd7f9b418847c17fa5dee6273e5ec5759 Merge: 18ea89eae404d1 8ed12ab1319b2d Author: Ingo Molnar Date: Sun May 4 12:09:02 2025 +0200 Merge branch 'x86/urgent' into x86/boot, to pick up fixes Signed-off-by: Ingo Molnar commit b7c18b17a173087ce97e809cefd55e581121f19e Author: John Garry Date: Sun May 4 11:26:45 2025 +0200 dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits Feature flag BLK_FEAT_ATOMIC_WRITES is not being properly set for the target queue limits, and this means that atomic writes are not being enabled for any dm personalities. When calling dm_set_device_limits() -> blk_stack_limits() -> ... -> blk_stack_atomic_writes_limits(), the bottom device limits (which corresponds to intermediate target queue limits) does not have BLK_FEAT_ATOMIC_WRITES set, and so atomic writes can never be enabled. Typically such a flag would be inherited from the stacked device in dm_set_device_limits() -> blk_stack_limits() via BLK_FEAT_INHERIT_MASK, but BLK_FEAT_ATOMIC_WRITES is not inherited as it's preferred to manually enable on a per-personality basis. Set BLK_FEAT_ATOMIC_WRITES manually for the intermediate target queue limits from the stacked device to get atomic writes working. Fixes: 3194e36488e2 ("dm-table: atomic writes support") Cc: stable@vger.kernel.org # v6.14 Signed-off-by: John Garry Signed-off-by: Mikulas Patocka commit 7734fb4ad98c3fdaf0fde82978ef8638195a5285 Author: Kevin Wolf Date: Tue Apr 29 18:50:18 2025 +0200 dm mpath: Interface for explicit probing of active paths Multipath cannot directly provide failover for ioctls in the kernel because it doesn't know what each ioctl means and which result could indicate a path error. Userspace generally knows what the ioctl it issued means and if it might be a path error, but neither does it know which path the ioctl took nor does it necessarily have the privileges to fail a path using the control device. In order to allow userspace to address this situation, implement a DM_MPATH_PROBE_PATHS ioctl that prompts the dm-mpath driver to probe all active paths in the current path group to see whether they still work, and fail them if not. If this returns success, userspace can retry the ioctl and expect that the previously hit bad path is now failed (or working again). The immediate motivation for this is the use of SG_IO in QEMU for SCSI passthrough. Following a failed SG_IO ioctl, QEMU will trigger probing to ensure that all active paths are actually alive, so that retrying SG_IO at least has a lower chance of failing due to a path error. However, the problem is broader than just SG_IO (it affects any ioctl), and if applications need failover support for other ioctls, the same probing can be used. This is not implemented on the DM control device, but on the DM mpath block devices, to allow all users who have access to such a block device to make use of this interface, specifically to implement failover for ioctls. For the same reason, it is also unprivileged. Its implementation is effectively just a bunch of reads, which could already be issued by userspace, just without any guarantee that all the rights paths are selected. The probing implemented here is done fully synchronously path by path; probing all paths concurrently is left as an improvement for the future. Co-developed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek Signed-off-by: Kevin Wolf Reviewed-by: Benjamin Marzinski Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 4862c8861d902d43645a493e441c4478be1c6c44 Author: Kevin Wolf Date: Tue Apr 29 18:50:17 2025 +0200 dm: Allow .prepare_ioctl to handle ioctls directly This adds a 'bool *forward' parameter to .prepare_ioctl, which allows device mapper targets to accept ioctls to themselves instead of the underlying device. If the target already fully handled the ioctl, it sets *forward to false and device mapper won't forward it to the underlying device any more. In order for targets to actually know what the ioctl is about and how to handle it, pass also cmd and arg. As long as targets restrict themselves to interpreting ioctls of type DM_IOCTL, this is a backwards compatible change because previously, any such ioctl would have been passed down through all device mapper layers until it reached a device that can't understand the ioctl and would return an error. Signed-off-by: Kevin Wolf Reviewed-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 13e79076c89f6e96a6cca8f6df38b40d025907b4 Author: Benjamin Marzinski Date: Tue Apr 22 19:47:38 2025 -0400 dm-flakey: make corrupting read bios work dm-flakey corrupts the read bios in the endio function. However, the corrupt_bio_* functions checked bio_has_data() to see if there was data to corrupt. Since this was the endio function, there was no data left to complete, so bio_has_data() was always false. Fix this by saving a copy of the bio's bi_iter in flakey_map(), and using this to initialize the iter for corrupting the read bios. This patch also skips cloning the bio for write bios with no data. Reported-by: Kent Overstreet Fixes: a3998799fb4df ("dm flakey: add corrupt_bio_byte feature") Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 4319f0aaa2354f14037f04456ed635983b379695 Author: Benjamin Marzinski Date: Tue Apr 22 19:47:37 2025 -0400 dm-flakey: remove useless ERROR_READS check in flakey_end_io If ERROR_READS is set, flakey_map returns DM_MAPIO_KILL for read bios and flakey_end_io is never called, so there's no point in checking it there. Also clean up an incorrect comment about when read IOs are errored out. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 40ed054f39bc99eac09871c33198e501f4acdf24 Author: Benjamin Marzinski Date: Tue Apr 22 19:47:36 2025 -0400 dm-flakey: error all IOs when num_features is absent dm-flakey would error all IOs if num_features was 0, but if it was absent, dm-flakey would never error any IO. Fix this so that no num_features works the same as num_features set to 0. Fixes: aa7d7bc99fed7 ("dm flakey: add an "error_reads" option") Reported-by: Kent Overstreet Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 19da6b2c9e8e22fa7a8e19f7ad9b5f91ccec0bfd Author: Benjamin Marzinski Date: Tue Apr 22 19:47:35 2025 -0400 dm-flakey: Clean up parsing messages There were a number of cases where the error message for an invalid table line did not match the actual problem. Fix these. Additionally, error out when duplicate corrupt_bio_byte, random_read_corrupt, or random_write_corrupt features are present. Also, error_reads is incompatible with random_read_corrupt and corrupt_bio_byte with the READ flag set, so disallow that. Reported-by: Kent Overstreet Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit d90e7a500cb62fe0de2591b6f08b6a3483434a3e Author: Benjamin Marzinski Date: Tue Apr 15 00:17:15 2025 -0400 dm: remove unneeded kvfree from alloc_targets alloc_targets() is always called with a newly initialized table where t->highs == NULL. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 9769378133bbc4b77458ed0a520b008439a45488 Author: Eric Biggers Date: Tue Apr 22 13:07:35 2025 -0700 dm-bufio: remove maximum age based eviction Every 30 seconds, dm-bufio evicts all buffers that were not accessed within the last max_age_seconds, except those pinned in memory via retain_bytes. By default max_age_seconds is 300 (i.e. 5 minutes), and retain_bytes is 262144 (i.e. 256 KiB) per dm-bufio client. This eviction algorithm is much too eager and is also redundant with the shinker based eviction. Testing on an Android phone shows that about 30 MB of dm-bufio buffers (from dm-verity Merkle tree blocks) are loaded at boot time, and then about 90% of them are suddenly thrown away 5 minutes after boot. This results in unnecessary Merkle tree I/O later. Meanwhile, if the system actually encounters memory pressure, testing also shows that the shrinker is effective at evicting the buffers. Other major Linux kernel caches, such as the page cache, do not enforce a maximum age, instead relying on the shrinker. For these reasons, Android is now setting max_age_seconds to 86400 (i.e. 1 day), which mostly disables it; see https://android.googlesource.com/platform/system/core/+/cadad290a79d5b0a30add935aaadab7c1b1ef5e9%5E%21/ That is a much better default, but really the maximum age based eviction should not exist at all. Let's remove it. Note that this also eliminates the need to run work every 30 seconds, which is beneficial too. Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit f9ed31214e2ac43cd38d1e517e774050b613b8da Author: Eric Biggers Date: Tue Apr 22 13:22:05 2025 -0700 dm-verity: use softirq context only when !need_resched() Further limit verification in softirq (a.k.a. BH) context to cases where rescheduling of the interrupted task is not pending. This helps prevent the CPU from spending too long in softirq context. Note that handle_softirqs() in kernel/softirq.c already stops running softirqs in this same case. However, that check is too coarse-grained, since many I/O requests can be processed in a single BLOCK_SOFTIRQ. Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit abb4cf2f4c1c1b637cad04d726f2e13fd3051e03 Author: Mikulas Patocka Date: Tue Apr 22 21:17:36 2025 +0200 dm: lock limits when reading them Lock queue limits when reading them, so that we don't read halfway modified values. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org commit f1e24048edb4c51678948cc6a08d20b57cde1471 Author: Mikulas Patocka Date: Tue Apr 22 21:19:30 2025 +0200 dm: use generic functions instead of disable_discard and disable_write_zeroes A small code cleanup: use blk_queue_disable_discard and blk_queue_disable_write_zeroes instead of disable_discard and disable_write_zeroes. Signed-off-by: Mikulas Patocka commit 33304b75df651bda2d34394e59cd9ee4e3c07602 Author: Benjamin Marzinski Date: Mon Apr 14 15:28:36 2025 +0200 dm-delay: don't busy-wait in kthread When using a kthread to delay the IOs, dm-delay would continuously loop, checking if IOs were ready to submit. It had a cond_resched() call in the loop, but might still loop hundreds of millions of times waiting for an IO that was scheduled to be submitted 10s of ms in the future. With the change to make dm-delay over zoned devices always use kthreads regardless of the length of the delay, this wasted work only gets worse. To solve this and still keep roughly the same precision for very short delays, dm-delay now calls fsleep() for 1/8th of the smallest non-zero delay it will place on IOs, or 1 ms, whichever is smaller. The reason that dm-delay doesn't just use the actual expiration time of the next delayed IO to calculated the sleep time is that delay_dtr() must wait for the kthread to finish before deleting the table. If a zoned device with a long delay queued an IO shortly before being suspended and removed, the IO would be flushed in delay_presuspend(), but the removing the device would still have to wait for the remainder of the long delay. This time is now capped at 1 ms. Signed-off-by: Benjamin Marzinski Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Mikulas Patocka commit ad320ae27661f91585e00c114d1b264130f1bebe Author: Benjamin Marzinski Date: Thu Apr 10 15:49:43 2025 -0400 dm: fix native zone append devices on top of emulated ones If a DM device that can pass down zone append commands is stacked on top of a device that emulates zone append commands, it will allocate zone append emulation resources, even though it doesn't use them. This is because the underlying device will have max_hw_zone_append_sectors set to 0 to request zone append emulation. When the DM device is stacked on top of it, it will inherit that max_hw_zone_append_sectors limit, despite being able to pass down zone append bios. Solve this by making sure max_hw_zone_append_sectors is non-zero for DM devices that do not need zone append emulation. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 121218bef4c1df165181f5cd8fc3a2246bac817e Author: Benjamin Marzinski Date: Thu Apr 10 15:49:42 2025 -0400 dm: limit swapping tables for devices with zone write plugs dm_revalidate_zones() only allowed new or previously unzoned devices to call blk_revalidate_disk_zones(). If the device was already zoned, disk->nr_zones would always equal md->nr_zones, so dm_revalidate_zones() returned without doing any work. This would make the zoned settings for the device not match the new table. If the device had zone write plug resources, it could run into errors like bdev_zone_is_seq() reading invalid memory because disk->conv_zones_bitmap was the wrong size. If the device doesn't have any zone write plug resources, calling blk_revalidate_disk_zones() will always correctly update device. If blk_revalidate_disk_zones() fails, it can still overwrite or clear the current disk->nr_zones value. In this case, DM must restore the previous value of disk->nr_zones, so that the zoned settings will continue to match the previous value that it fell back to. If the device already has zone write plug resources, blk_revalidate_disk_zones() will not correctly update them, if it is called for arbitrary zoned device changes. Since there is not much need for this ability, the easiest solution is to disallow any table reloads that change the zoned settings, for devices that already have zone plug resources. Specifically, if a device already has zone plug resources allocated, it can only switch to another zoned table that also emulates zone append. Also, it cannot change the device size or the zone size. A device can switch to an error target. Fixes: bb37d77239af2 ("dm: introduce zone append emulation") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 37f53a2c60d03743e0eacf7a0c01c279776fef4e Author: Benjamin Marzinski Date: Thu Apr 10 15:49:41 2025 -0400 dm: fix dm_blk_report_zones If dm_get_live_table() returned NULL, dm_put_live_table() was never called. Also, it is possible that md->zone_revalidate_map will change while calling this function. Only read it once, so that we are always using the same value. Otherwise we might miss a call to dm_put_live_table(). Finally, while md->zone_revalidate_map is set and a process is calling blk_revalidate_disk_zones() to set up the zone append emulation resources, it is possible that another process, perhaps triggered by blkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If blk_revalidate_disk_zones() fails, these resources can be freed while the other process is still using them, causing a use-after-free error. blk_revalidate_disk_zones() will only ever be called when initially setting up the zone append emulation resources, such as when setting up a zoned dm-crypt table for the first time. Further table swaps will not set md->zone_revalidate_map or call blk_revalidate_disk_zones(). However it must be called using the new table (referenced by md->zone_revalidate_map) and the new queue limits while the DM device is suspended. dm_blk_report_zones() needs some way to distinguish between a call from blk_revalidate_disk_zones(), which must be allowed to use md->zone_revalidate_map to access this not yet activated table, and all other calls to dm_blk_report_zones(), which should not be allowed while the device is suspended and cannot use md->zone_revalidate_map, since the zone resources might be freed by the process currently calling blk_revalidate_disk_zones(). Solve this by tracking the process that sets md->zone_revalidate_map in dm_revalidate_zones() and only allowing that process to make use of it in dm_blk_report_zones(). Fixes: f211268ed1f9b ("dm: Use the block layer zone append emulation") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 0c0c84e4869895091c3029bc2625caa0feec99b9 Author: pkarc Date: Sun May 4 01:00:06 2025 +0200 hwmon: (ausus-ec-sensors) add MAXIMUS VI HERO. Add support for MAXIMUS VI HERO. Signed-off-by: pkarc Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20250503230020.1005801-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit 46c158e3ad0fc633007802c338c409c188ec0a12 Author: Oleg Nesterov Date: Sat May 3 16:39:02 2025 +0200 x86/fpu: Shift fpregs_assert_state_consistent() from arch_exit_work() to its caller If CONFIG_X86_DEBUG_FPU=Y, arch_exit_to_user_mode_prepare() calls arch_exit_work() even if ti_work == 0. There only reason is that we want to call fpregs_assert_state_consistent() if TIF_NEED_FPU_LOAD is not set. This looks confusing. arch_exit_to_user_mode_prepare() can just call fpregs_assert_state_consistent() unconditionally, it depends on CONFIG_X86_DEBUG_FPU and checks TIF_NEED_FPU_LOAD itself. Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143902.GA9012@redhat.com commit 016a2e6f8ae5ed544ba8fb2b6d78f64ddfd9d01b Author: Oleg Nesterov Date: Sat May 3 16:38:56 2025 +0200 x86/fpu: Check TIF_NEED_FPU_LOAD instead of PF_KTHREAD|PF_USER_WORKER in fpu__drop() PF_KTHREAD|PF_USER_WORKER tasks should never clear TIF_NEED_FPU_LOAD, so the TIF_NEED_FPU_LOAD check should equally filter them out. And this way an exiting userspace task can avoid the unnecessary "fwait" if it does context_switch() at least once on its way to exit_thread(). Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143856.GA9009@redhat.com commit 2d299e3d773d519ee93e5aaa3ffddd4a6276b005 Author: Oleg Nesterov Date: Sat May 3 16:38:50 2025 +0200 x86/fpu: Always use memcpy_and_pad() in arch_dup_task_struct() It makes no sense to copy the bytes after sizeof(struct task_struct), FPU state will be initialized in fpu_clone(). A plain memcpy(dst, src, sizeof(struct task_struct)) should work too, but "_and_pad" looks safer. [ mingo: Simplify it a bit more. ] Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143850.GA8997@redhat.com commit 8e269c030ecafbfebf4f55e24fb336fd7b489708 Author: Oleg Nesterov Date: Sat May 3 16:38:43 2025 +0200 x86/fpu: Remove DEFINE_EVENT(x86_fpu, x86_fpu_copy_src) trace_x86_fpu_copy_src() has no users after: 22aafe3bcb67 ("x86/fpu: Remove init_task FPU state dependencies, add debugging warning for PF_KTHREAD tasks") Remove the event. Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143843.GA8989@redhat.com commit 392bbe11c7cf90e65cba32e90af3b969a981c4fe Author: Oleg Nesterov Date: Sat May 3 16:38:37 2025 +0200 x86/fpu: Remove x86_init_fpu It is not actually used after: 55bc30f2e34d ("x86/fpu: Remove the thread::fpu pointer") Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143837.GA8985@redhat.com commit 730faa15a069f4025a0f8c2a5244c3067da7ecbe Author: Oleg Nesterov Date: Sat May 3 16:38:30 2025 +0200 x86/fpu: Simplify the switch_fpu_prepare() + switch_fpu_finish() logic Now that switch_fpu_finish() doesn't load the FPU state, it makes more sense to fold it into switch_fpu_prepare() renamed to switch_fpu(), and more importantly, use the "prev_p" task as a target for TIF_NEED_FPU_LOAD. It doesn't make any sense to delay set_tsk_thread_flag(TIF_NEED_FPU_LOAD) until "prev_p" is scheduled again. There is no worry about the very first context switch, fpu_clone() must always set TIF_NEED_FPU_LOAD. Also, shift the test_tsk_thread_flag(TIF_NEED_FPU_LOAD) from the callers to switch_fpu(). Note that the "PF_KTHREAD | PF_USER_WORKER" check can be removed but this deserves a separate patch which can change more functions, say, kernel_fpu_begin_mask(). Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Chang S . Bae Cc: H. Peter Anvin Cc: Andy Lutomirski Cc: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250503143830.GA8982@redhat.com commit a78701fe4befbe3c1720f84c893d5565edbbd11b Merge: de8304c319bc02 b4432656b36e5c Author: Ingo Molnar Date: Sun May 4 10:25:52 2025 +0200 Merge tag 'v6.15-rc4' into x86/fpu, to pick up fixes Signed-off-by: Ingo Molnar commit ab1456c5aa7a63d5145547fc644bd4580dd253f2 Author: Athira Rajeev Date: Sun Apr 20 23:38:44 2025 +0530 powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface Documentation for HTM (Hardware Trace Macro) debugfs interface and how it can be used to configure/control the HTM operations. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-10-atrajeev@linux.ibm.com commit 143a2584627cc02af81261c0201f9a69c08241a5 Author: Athira Rajeev Date: Sun Apr 20 23:38:43 2025 +0530 powerpc/pseries/htmdump: Add htm capabilities support to htmdump module Support dumping HTM capabilities information from Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htmcaps". The interface allows only read of this file which will present the content of HTM buffer from the hcall. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-9-atrajeev@linux.ibm.com commit d3f24bf27b2de2bbf35faae72ca3a81e23ac9e22 Author: Athira Rajeev Date: Sun Apr 20 23:38:42 2025 +0530 powerpc/pseries/htmdump: Add htm flags support to htmdump module Under debugfs folder, "/sys/kernel/debug/powerpc/htmdump", add file "htmflags". Currently supported flag value is to enable/disable HTM buffer wrap. wrap is used along with "configure" to prevent HTM buffer from wrapping. Writing 1 will set noWrap while configuring HTM Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-8-atrajeev@linux.ibm.com commit 78fb17ac68bf59e5e36212e34a2b05eec29a389f Author: Athira Rajeev Date: Sun Apr 20 23:38:41 2025 +0530 powerpc/pseries/htmdump: Add htm setup support to htmdump module Add htm setup support to htmdump module. To use the HTM (Hardware Trace Macro), HTM buffer has to be allocated. Support setup of HTM buffers via debugfs interface. Under debugfs folder, "/sys/kernel/debug/powerpc/htmdump", add file "htmsetup". The interface allows setup of HTM buffer by writing size of HTM buffer in power of 2 to the "htmsetup" file Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-7-atrajeev@linux.ibm.com commit dea7384e14e7f9429021544d0d710fbef8445def Author: Athira Rajeev Date: Sun Apr 20 23:38:40 2025 +0530 powerpc/pseries/htmdump: Add htm info support to htmdump module Support dumping system processor configuration from Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htminfo". The interface allows only read of this file which will present the content of HTM buffer from the hcall. The 16th offset of HTM buffer has value for the number of entries for array of processors. Use this information to copy data to the debugfs file Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-6-atrajeev@linux.ibm.com commit 627cf584f4c36acb52230ffc47403cf9469ec9d0 Author: Athira Rajeev Date: Sun Apr 20 23:38:39 2025 +0530 powerpc/pseries/htmdump: Add htm status support to htmdump module Support dumping status of Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htmstatus". The interface allows only read of this file which will present the content of HTM status buffer from the hcall. The 16th offset of HTM status buffer has value for the number of HTM entries in the status buffer. Each nest htm status entry is 0x6 bytes, where as core HTM status entry is 0x8 bytes. Calculate the number of bytes to read based on this detail. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-5-atrajeev@linux.ibm.com commit e03e4b12dee95bb87507a50772f927d0eb152ca1 Author: Athira Rajeev Date: Sun Apr 20 23:38:38 2025 +0530 powerpc/pseries/htmdump: Add htm start support to htmdump module Support starting of Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htmstart". The interface allows starting of htm via this file by writing value "1". Also allows stopping of htm tracing by writing value "0" to this file. Any other value returns -EINVAL. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-4-atrajeev@linux.ibm.com commit c6edd034e39f745feb9ad5298b92e0fec5bb9e9f Author: Athira Rajeev Date: Sun Apr 20 23:38:37 2025 +0530 powerpc/pseries/htmdump: Add htm configure support to htmdump module Support configuring of Hardware Trace Macro (HTM) function via debugfs interface. Under debugfs folder "/sys/kernel/debug/powerpc/htmdump", add file "htmconfigure". The interface allows configuring of htm via this file by writing value "1". Allow deconfiguring of htm via this file by writing value "0". Any other value returns -EINVAL. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-3-atrajeev@linux.ibm.com commit 6e204ef3b73e41e46784fdd298c3d81caed84873 Author: Athira Rajeev Date: Sun Apr 20 23:38:36 2025 +0530 powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations H_HTM (Hardware Trace Macro) hypervisor call is an HCALL to export data from Hardware Trace Macro (HTM) function. The debugfs interface to export the HTM function data in an lpar currently supports only dumping of HTM data in an lpar. To add support for setup, configuration and control of HTM function via debugfs interface, update the hcall wrapper function. Rename and update htm_get_dump_hardware to htm_hcall_wrapper() so that it can be used for other HTM operations as well. Additionally include parameter "htm_op". Update htmdump module to check the return code of hcall in a separate function so that it can be reused for other option too. Add check to disable the interface in guest environment. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250420180844.53128-2-atrajeev@linux.ibm.com commit 5ea6a980b5da58a8dff550dbc2c2523ea492dd14 Author: Bartosz Golaszewski Date: Fri May 2 10:59:51 2025 +0200 powerpc: 8xx/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Linus Walleij Reviewed-by: Christophe Leroy Acked-by: Christophe Leroy # powerpc 8xx Signed-off-by: Bartosz Golaszewski Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250502-gpiochip-set-rv-powerpc-v2-5-488e43e325bf@linaro.org commit c8fb184faaa0aefa3c1b1f8b3eba873c7ec4d840 Author: Bartosz Golaszewski Date: Fri May 2 10:59:50 2025 +0200 powerpc: 52xx/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Linus Walleij Reviewed-by: Christophe Leroy Signed-off-by: Bartosz Golaszewski Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250502-gpiochip-set-rv-powerpc-v2-4-488e43e325bf@linaro.org commit 5effda1c36f2338178c0582c0719cba58f24b0b3 Author: Bartosz Golaszewski Date: Fri May 2 10:59:49 2025 +0200 powerpc: 44x/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Linus Walleij Reviewed-by: Christophe Leroy Signed-off-by: Bartosz Golaszewski Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250502-gpiochip-set-rv-powerpc-v2-3-488e43e325bf@linaro.org commit 077f8733252dcfa738bcf0cfbf6820b26a7ba084 Author: Bartosz Golaszewski Date: Fri May 2 10:59:48 2025 +0200 powerpc: 83xx/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski Reviewed-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250502-gpiochip-set-rv-powerpc-v2-2-488e43e325bf@linaro.org commit 54ac723320fcb0fe42aaa42ea800697450b75668 Author: Bartosz Golaszewski Date: Fri May 2 10:59:47 2025 +0200 powerpc: sysdev/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Linus Walleij Reviewed-by: Christophe Leroy Signed-off-by: Bartosz Golaszewski Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250502-gpiochip-set-rv-powerpc-v2-1-488e43e325bf@linaro.org commit fe65ce845c0a5876e0f6b9d848a951a218f8e3b2 Merge: d85d055e20915d e68074c63fded9 Author: Mark Brown Date: Sun May 4 09:03:55 2025 +0900 ASoC: SOF: amd: add soundwire IO support for ACP7.0 & Merge series from Vijendar Mukunda : This patch series contains - ACP sof stack improvements - Add support for ACP7.1 platform. - Soundwire IO support for ACP7.0 & ACP7.1 platforms Link: https://github.com/thesofproject/linux/pull/5392 commit 836b313a14a316290886dcc2ce7e78bf5ecc8658 Author: Ido Schimmel Date: Wed Apr 30 13:02:40 2025 +0300 ipv4: Honor "ignore_routes_with_linkdown" sysctl in nexthop selection Commit 32607a332cfe ("ipv4: prefer multipath nexthop that matches source address") changed IPv4 nexthop selection to prefer a nexthop whose nexthop device is assigned the specified source address for locally generated traffic. While the selection honors the "fib_multipath_use_neigh" sysctl and will not choose a nexthop with an invalid neighbour, it does not honor the "ignore_routes_with_linkdown" sysctl and can choose a nexthop without a carrier: $ sysctl net.ipv4.conf.all.ignore_routes_with_linkdown net.ipv4.conf.all.ignore_routes_with_linkdown = 1 $ ip route show 198.51.100.0/24 198.51.100.0/24 nexthop via 192.0.2.2 dev dummy1 weight 1 nexthop via 192.0.2.18 dev dummy2 weight 1 dead linkdown $ ip route get 198.51.100.1 from 192.0.2.17 198.51.100.1 from 192.0.2.17 via 192.0.2.18 dev dummy2 uid 0 Solve this by skipping over nexthops whose assigned hash upper bound is minus one, which is the value assigned to nexthops that do not have a carrier when the "ignore_routes_with_linkdown" sysctl is set. In practice, this probably does not matter a lot as the initial route lookup for the source address would not choose a nexthop that does not have a carrier in the first place, but the change does make the code clearer. Signed-off-by: Ido Schimmel Reviewed-by: Willem de Bruijn Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b1d8766052eb0534b27edda8af1865d53621bd6a Author: Christophe JAILLET Date: Fri May 2 16:48:09 2025 +0200 power: supply: rt9471: Simplify definition of some struct linear_range Use LINEAR_RANGE() instead of hand-writing it. It is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0da94193c5f8b35fa98f25a852d74b841670bd6e.1746197233.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit 1ea48c51f03fc3186ee0bcc05d06b652c209e0ae Author: Arnd Bergmann Date: Sat May 3 16:04:26 2025 +0200 power: supply: max77976: add EXTCON dependency max8971 is written to work with or without extcon, but it fails to link when built-in when the extcon subsystem is in a loadable module: x86_64-linux-ld: drivers/power/supply/max8971_charger.o: in function `max8971_probe': max8971_charger.c:(.text+0x2ab): undefined reference to `extcon_find_edev_by_node' Add the appropriate dependency that allows the working cases but prevents the link failure. Fixes: 60cd40eee4f4 ("power: supply: Add support for Maxim MAX8971 charger") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250503140431.438727-1-arnd@kernel.org Signed-off-by: Sebastian Reichel commit 9140f57c1c1391a0343a08daea9cd53f56e51154 Author: Peter Zijlstra Date: Thu Sep 21 17:17:14 2023 +0200 futex,selftests: Add another FUTEX2_NUMA selftest Implement a simple NUMA aware spinlock for testing and howto purposes. Signed-off-by: Peter Zijlstra (Intel) commit 3163369407baf8331a234fe4817e9ea27ba7ea9c Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:21 2025 +0200 selftests/futex: Add futex_numa_mpol Test the basic functionality for the NUMA and MPOL flags: - FUTEX2_NUMA should take the NUMA node which is after the uaddr and use it. - Only update the node if FUTEX_NO_NODE was set by the user - FUTEX2_MPOL should use the memory based on the policy. I attempted to set the node with mbind() and then use this with MPOL but this fails and futex falls back to the default node for the current CPU. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-22-bigeasy@linutronix.de commit cda95faef7bcf26ba3f54c3cddce66d50116d146 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:20 2025 +0200 selftests/futex: Add futex_priv_hash Test the basic functionality of the private hash: - Upon start, with no threads there is no private hash. - The first thread initializes the private hash. - More than four threads will increase the size of the private hash if the system has more than 16 CPUs online. - Once the user sets the size of private hash, auto scaling is disabled. - The user is only allowed to use numbers to the power of two. - The user may request the global or make the hash immutable. - Once the global hash has been set or the hash has been made immutable, further changes are not allowed. - Futex operations should work the whole time. It must be possible to hold a lock, such a PI initialised mutex, during the resize operation. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-21-bigeasy@linutronix.de commit 8b4a5c2497fad653bc54ddb037d38eb5bf835857 Author: Peter Zijlstra Date: Fri May 2 20:57:23 2025 +0200 selftests/futex: Build without headers nonsense Make it build without relying on recent headers. Signed-off-by: Peter Zijlstra (Intel) commit 60035a3981a7f9d965df81a48a07b94e52ccd54f Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:19 2025 +0200 tools/perf: Allow to select the number of hash buckets Add the -b/ --buckets argument to specify the number of hash buckets for the private futex hash. This is directly passed to prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, buckets, immutable) and must return without an error if specified. The `immutable' is 0 by default and can be set to 1 via the -I/ --immutable argument. The size of the private hash is verified with PR_FUTEX_HASH_GET_SLOTS. If PR_FUTEX_HASH_GET_SLOTS failed then it is assumed that an older kernel was used without the support and that the global hash is used. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-20-bigeasy@linutronix.de commit f25051dce97cfd7a945add0c9e273e624e060624 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:18 2025 +0200 tools headers: Synchronize prctl.h ABI header Synchronize prctl.h with current uapi version after adding PR_FUTEX_HASH. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-19-bigeasy@linutronix.de commit c042c505210dc3453f378df432c10fff3d471bc5 Author: Peter Zijlstra Date: Wed Apr 16 18:29:17 2025 +0200 futex: Implement FUTEX2_MPOL Extend the futex2 interface to be aware of mempolicy. When FUTEX2_MPOL is specified and there is a MPOL_PREFERRED or home_node specified covering the futex address, use that hash-map. Notably, in this case the futex will go to the global node hashtable, even if it is a PRIVATE futex. When FUTEX2_NUMA|FUTEX2_MPOL is specified and the user specified node value is FUTEX_NO_NODE, the MPOL lookup (as described above) will be tried first before reverting to setting node to the local node. [bigeasy: add CONFIG_FUTEX_MPOL, add MPOL to FUTEX2_VALID_MASK, write the node only to user if FUTEX_NO_NODE was supplied] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-18-bigeasy@linutronix.de commit cec199c5e39bde7191a08087cc3d002ccfab31ff Author: Peter Zijlstra Date: Wed Apr 16 18:29:16 2025 +0200 futex: Implement FUTEX2_NUMA Extend the futex2 interface to be numa aware. When FUTEX2_NUMA is specified for a futex, the user value is extended to two words (of the same size). The first is the user value we all know, the second one will be the node to place this futex on. struct futex_numa_32 { u32 val; u32 node; }; When node is set to ~0, WAIT will set it to the current node_id such that WAKE knows where to find it. If userspace corrupts the node value between WAIT and WAKE, the futex will not be found and no wakeup will happen. When FUTEX2_NUMA is not set, the node is simply an extension of the hash, such that traditional futexes are still interleaved over the nodes. This is done to avoid having to have a separate !numa hash-table. [bigeasy: ensure to have at least hashsize of 4 in futex_init(), add pr_info() for size and allocation information. Cast the naddr math to void*] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-17-bigeasy@linutronix.de commit 63e8595c060a1fef421e3eecfc05ad882dafb8ac Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:15 2025 +0200 futex: Allow to make the private hash immutable My initial testing showed that: perf bench futex hash reported less operations/sec with private hash. After using the same amount of buckets in the private hash as used by the global hash then the operations/sec were about the same. This changed once the private hash became resizable. This feature added an RCU section and reference counting via atomic inc+dec operation into the hot path. The reference counting can be avoided if the private hash is made immutable. Extend PR_FUTEX_HASH_SET_SLOTS by a fourth argument which denotes if the private should be made immutable. Once set (to true) the a further resize is not allowed (same if set to global hash). Add PR_FUTEX_HASH_GET_IMMUTABLE which returns true if the hash can not be changed. Update "perf bench" suite. For comparison, results of "perf bench futex hash -s": - Xeon CPU E5-2650, 2 NUMA nodes, total 32 CPUs: - Before the introducing task local hash shared Averaged 1.487.148 operations/sec (+- 0,53%), total secs = 10 private Averaged 2.192.405 operations/sec (+- 0,07%), total secs = 10 - With the series shared Averaged 1.326.342 operations/sec (+- 0,41%), total secs = 10 -b128 Averaged 141.394 operations/sec (+- 1,15%), total secs = 10 -Ib128 Averaged 851.490 operations/sec (+- 0,67%), total secs = 10 -b8192 Averaged 131.321 operations/sec (+- 2,13%), total secs = 10 -Ib8192 Averaged 1.923.077 operations/sec (+- 0,61%), total secs = 10 128 is the default allocation of hash buckets. 8192 was the previous amount of allocated hash buckets. - Xeon(R) CPU E7-8890 v3, 4 NUMA nodes, total 144 CPUs: - Before the introducing task local hash shared Averaged 1.810.936 operations/sec (+- 0,26%), total secs = 20 private Averaged 2.505.801 operations/sec (+- 0,05%), total secs = 20 - With the series shared Averaged 1.589.002 operations/sec (+- 0,25%), total secs = 20 -b1024 Averaged 42.410 operations/sec (+- 0,20%), total secs = 20 -Ib1024 Averaged 740.638 operations/sec (+- 1,51%), total secs = 20 -b65536 Averaged 48.811 operations/sec (+- 1,35%), total secs = 20 -Ib65536 Averaged 1.963.165 operations/sec (+- 0,18%), total secs = 20 1024 is the default allocation of hash buckets. 65536 was the previous amount of allocated hash buckets. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Acked-by: Shrikanth Hegde Link: https://lore.kernel.org/r/20250416162921.513656-16-bigeasy@linutronix.de commit bd54df5ea7cadac520e346d5f0fe5d58e635b6ba Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:14 2025 +0200 futex: Allow to resize the private local hash The mm_struct::futex_hash_lock guards the futex_hash_bucket assignment/ replacement. The futex_hash_allocate()/ PR_FUTEX_HASH_SET_SLOTS operation can now be invoked at runtime and resize an already existing internal private futex_hash_bucket to another size. The reallocation is based on an idea by Thomas Gleixner: The initial allocation of struct futex_private_hash sets the reference count to one. Every user acquires a reference on the local hash before using it and drops it after it enqueued itself on the hash bucket. There is no reference held while the task is scheduled out while waiting for the wake up. The resize process allocates a new struct futex_private_hash and drops the initial reference. Synchronized with mm_struct::futex_hash_lock it is checked if the reference counter for the currently used mm_struct::futex_phash is marked as DEAD. If so, then all users enqueued on the current private hash are requeued on the new private hash and the new private hash is set to mm_struct::futex_phash. Otherwise the newly allocated private hash is saved as mm_struct::futex_phash_new and the rehashing and reassigning is delayed to the futex_hash() caller once the reference counter is marked DEAD. The replacement is not performed at rcuref_put() time because certain callers, such as futex_wait_queue(), drop their reference after changing the task state. This change will be destroyed once the futex_hash_lock is acquired. The user can change the number slots with PR_FUTEX_HASH_SET_SLOTS multiple times. An increase and decrease is allowed and request blocks until the assignment is done. The private hash allocated at thread creation is changed from 16 to 16 <= 4 * number_of_threads <= global_hash_size where number_of_threads can not exceed the number of online CPUs. Should the user PR_FUTEX_HASH_SET_SLOTS then the auto scaling is disabled. [peterz: reorganize the code to avoid state tracking and simplify new object handling, block the user until changes are in effect, allow increase and decrease of the hash]. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-15-bigeasy@linutronix.de commit 7c4f75a21f636486d2969d9b6680403ea8483539 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:13 2025 +0200 futex: Allow automatic allocation of process wide futex hash Allocate a private futex hash with 16 slots if a task forks its first thread. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-14-bigeasy@linutronix.de commit 80367ad01d93ac781b0e1df246edaf006928002f Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:12 2025 +0200 futex: Add basic infrastructure for local task local hash The futex hash is system wide and shared by all tasks. Each slot is hashed based on futex address and the VMA of the thread. Due to randomized VMAs (and memory allocations) the same logical lock (pointer) can end up in a different hash bucket on each invocation of the application. This in turn means that different applications may share a hash bucket on the first invocation but not on the second and it is not always clear which applications will be involved. This can result in high latency's to acquire the futex_hash_bucket::lock especially if the lock owner is limited to a CPU and can not be effectively PI boosted. Introduce basic infrastructure for process local hash which is shared by all threads of process. This hash will only be used for a PROCESS_PRIVATE FUTEX operation. The hashmap can be allocated via: prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, num); A `num' of 0 means that the global hash is used instead of a private hash. Other values for `num' specify the number of slots for the hash and the number must be power of two, starting with two. The prctl() returns zero on success. This function can only be used before a thread is created. The current status for the private hash can be queried via: num = prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_GET_SLOTS); which return the current number of slots. The value 0 means that the global hash is used. Values greater than 0 indicate the number of slots that are used. A negative number indicates an error. For optimisation, for the private hash jhash2() uses only two arguments the address and the offset. This omits the VMA which is always the same. [peterz: Use 0 for global hash. A bit shuffling and renaming. ] Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-13-bigeasy@linutronix.de commit 9a9bdfdd687395a3dc949d3ae3323494395a93d4 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:11 2025 +0200 futex: Create helper function to initialize a hash slot Factor out the futex_hash_bucket initialisation into a helpr function. The helper function will be used in a follow up patch implementing process private hash buckets. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-12-bigeasy@linutronix.de commit b04b8f3032aae6121303bfa324c768faba032242 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:10 2025 +0200 futex: Introduce futex_q_lockptr_lock() futex_lock_pi() and __fixup_pi_state_owner() acquire the futex_q::lock_ptr without holding a reference assuming the previously obtained hash bucket and the assigned lock_ptr are still valid. This isn't the case once the private hash can be resized and becomes invalid after the reference drop. Introduce futex_q_lockptr_lock() to lock the hash bucket recorded in futex_q::lock_ptr. The lock pointer is read in a RCU section to ensure that it does not go away if the hash bucket has been replaced and the old pointer has been observed. After locking the pointer needs to be compared to check if it changed. If so then the hash bucket has been replaced and the user has been moved to the new one and lock_ptr has been updated. The lock operation needs to be redone in this case. The locked hash bucket is not returned. A special case is an early return in futex_lock_pi() (due to signal or timeout) and a successful futex_wait_requeue_pi(). In both cases a valid futex_q::lock_ptr is expected (and its matching hash bucket) but since the waiter has been removed from the hash this can no longer be guaranteed. Therefore before the waiter is removed and a reference is acquired which is later dropped by the waiter to avoid a resize. Add futex_q_lockptr_lock() and use it. Acquire an additional reference in requeue_pi_wake_futex() and futex_unlock_pi() while the futex_q is removed, denote this extra reference in futex_q::drop_hb_ref and let the waiter drop the reference in this case. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-11-bigeasy@linutronix.de commit fe00e88d217a7bf7a4d0268d08f51e624d40ee53 Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:09 2025 +0200 futex: Decrease the waiter count before the unlock operation To support runtime resizing of the process private hash, it's required to not use the obtained hash bucket once the reference count has been dropped. The reference will be dropped after the unlock of the hash bucket. The amount of waiters is decremented after the unlock operation. There is no requirement that this needs to happen after the unlock. The increment happens before acquiring the lock to signal early that there will be a waiter. The waiter can avoid blocking on the lock if it is known that there will be no waiter. There is no difference in terms of ordering if the decrement happens before or after the unlock. Decrease the waiter count before the unlock operation. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-10-bigeasy@linutronix.de commit 3f6b233018af2a6fb449faa324d94a437e2e47ce Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:08 2025 +0200 futex: Acquire a hash reference in futex_wait_multiple_setup() futex_wait_multiple_setup() changes task_struct::__state to !TASK_RUNNING and then enqueues on multiple futexes. Every futex_q_lock() acquires a reference on the global hash which is dropped later. If a rehash is in progress then the loop will block on mm_struct::futex_hash_bucket for the rehash to complete and this will lose the previously set task_struct::__state. Acquire a reference on the local hash to avoiding blocking on mm_struct::futex_hash_bucket. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-9-bigeasy@linutronix.de commit d854e4e7850e6d3ed24f863a877abc2279d60506 Author: Peter Zijlstra Date: Wed Apr 16 18:29:07 2025 +0200 futex: Create private_hash() get/put class This gets us: fph = futex_private_hash(key) /* gets fph and inc users */ futex_private_hash_get(fph) /* inc users */ futex_private_hash_put(fph) /* dec users */ Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-8-bigeasy@linutronix.de commit 6c67f8d880c0950215b8e6f8539562ad1971a05a Author: Peter Zijlstra Date: Wed Apr 16 18:29:06 2025 +0200 futex: Create futex_hash() get/put class This gets us: hb = futex_hash(key) /* gets hb and inc users */ futex_hash_get(hb) /* inc users */ futex_hash_put(hb) /* dec users */ Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-7-bigeasy@linutronix.de commit 8486d12f558ff9e4e90331e8ef841d84bf3a8c24 Author: Peter Zijlstra Date: Wed Apr 16 18:29:05 2025 +0200 futex: Create hb scopes Create explicit scopes for hb variables; almost pure re-indent. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-6-bigeasy@linutronix.de commit 2fb292096d950a67a1941949a08a60ddd3193da3 Author: Peter Zijlstra Date: Wed Apr 16 18:29:04 2025 +0200 futex: Pull futex_hash() out of futex_q_lock() Getting the hash bucket and queuing it are two distinct actions. In light of wanting to add a put hash bucket function later, untangle them. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-5-bigeasy@linutronix.de commit 93f1b6d79a73b520b6875cf3babf4a09acc4eef0 Author: Peter Zijlstra Date: Wed Apr 16 18:29:03 2025 +0200 futex: Move futex_queue() into futex_wait_setup() futex_wait_setup() has a weird calling convention in order to return hb to use as an argument to futex_queue(). Mostly such that requeue can have an extra test in between. Reorder code a little to get rid of this and keep the hb usage inside futex_wait_setup(). [bigeasy: fixes] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-4-bigeasy@linutronix.de commit 55284f70134f01fdc9cc4c4905551cc1f37abd34 Author: Peter Zijlstra Date: Wed Apr 16 18:29:02 2025 +0200 mm: Add vmalloc_huge_node() To enable node specific hash-tables using huge pages if possible. [bigeasy: use __vmalloc_node_range_noprof(), add nommu bits, inline vmalloc_huge] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250416162921.513656-3-bigeasy@linutronix.de commit 3efa66ce6ee1b55ab687b316e48e1e9ddc1f780a Author: Sebastian Andrzej Siewior Date: Wed Apr 16 18:29:01 2025 +0200 rcuref: Provide rcuref_is_dead() rcuref_read() returns the number of references that are currently held. If 0 is returned then it is not safe to assume that the object ca be scheduled for deconstruction because it is marked DEAD. This happens if the return value of rcuref_put() is ignored and assumptions are made. If 0 is returned then the counter transitioned from 0 to RCUREF_NOREF. If rcuref_put() did not return to the caller then the counter did not yet transition from RCUREF_NOREF to RCUREF_DEAD. This means that there is still a chance that the counter will transition from RCUREF_NOREF to 0 meaning it is still valid and must not be deconstructed. In this brief window rcuref_read() will return 0. Provide rcuref_is_dead() to determine if the counter is marked as RCUREF_DEAD. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250416162921.513656-2-bigeasy@linutronix.de commit e782ac936941cff4c5580bb5cc2ec0e91468068c Author: Heiko Stuebner Date: Wed Apr 30 10:28:50 2025 +0200 dt-bindings: display: ltk500hd1829: add port property The panel can be connected to via graph nodes, so allow the port property. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250430082850.244199-3-heiko@sntech.de Signed-off-by: Dmitry Baryshkov commit bf0636f4348e098e2338eebbe42d7780c58a1195 Author: Heiko Stuebner Date: Wed Apr 30 10:28:49 2025 +0200 dt-bindings: display: ltk050h3146w: add port property The panel can be connected to via graph nodes, so allow the port property. This fixes dtc checker warnings like: >> arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-haikou-video-demo.dtb: panel@0 (leadtek,ltk050h3148w): 'port' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/display/panel/leadtek,ltk050h3146w.yaml# arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-haikou-video-demo.dtb: /edp@fdec0000: failed to match any schema with compatible: ['rockchip,rk3588-edp'] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504300218.VDqQqGTT-lkp@intel.com/ Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250430082850.244199-2-heiko@sntech.de Signed-off-by: Dmitry Baryshkov commit 586ceac9acb71c4caf84552bd29b36c799c102a0 Author: Kuniyuki Iwashima Date: Wed Apr 30 17:53:29 2025 -0700 ipv6: Restore fib6_config validation for SIOCADDRT. syzkaller reported out-of-bounds read in ipv6_addr_prefix(), where the prefix length was over 128. The cited commit accidentally removed some fib6_config validation from the ioctl path. Let's restore the validation. [0]: BUG: KASAN: slab-out-of-bounds in ip6_route_info_create (./include/net/ipv6.h:616 net/ipv6/route.c:3814) Read of size 1 at addr ff11000138020ad4 by task repro/261 CPU: 3 UID: 0 PID: 261 Comm: repro Not tainted 6.15.0-rc3-00614-g0d15a26b247d #87 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:123) print_report (mm/kasan/report.c:409 mm/kasan/report.c:521) kasan_report (mm/kasan/report.c:636) ip6_route_info_create (./include/net/ipv6.h:616 net/ipv6/route.c:3814) ip6_route_add (net/ipv6/route.c:3902) ipv6_route_ioctl (net/ipv6/route.c:4523) inet6_ioctl (net/ipv6/af_inet6.c:577) sock_do_ioctl (net/socket.c:1190) sock_ioctl (net/socket.c:1314) __x64_sys_ioctl (fs/ioctl.c:51 fs/ioctl.c:906 fs/ioctl.c:892 fs/ioctl.c:892) do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) RIP: 0033:0x7f518fb2de5d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 9f 1b 00 f7 d8 64 89 01 48 RSP: 002b:00007fff14f38d18 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f518fb2de5d RDX: 00000000200015c0 RSI: 000000000000890b RDI: 0000000000000003 RBP: 00007fff14f38d30 R08: 0000000000000800 R09: 0000000000000800 R10: 0000000000000000 R11: 0000000000000202 R12: 00007fff14f38e48 R13: 0000000000401136 R14: 0000000000403df0 R15: 00007f518fd3c000 Fixes: fa76c1674f2e ("ipv6: Move some validation from ip6_route_info_create() to rtm_to_fib6_config().") Reported-by: syzkaller Reported-by: Yi Lai Closes: https://lore.kernel.org/netdev/aBAcKDEFoN%2FLntBF@ly-workstation/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: David Ahern Link: https://patch.msgid.link/20250501005335.53683-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit a2f6476ed18a3e96e65d47a757d5755421ae8f91 Author: Pedro Falcato Date: Wed Apr 30 16:45:41 2025 +0100 mptcp: Align mptcp_inet6_sk with other protocols Ever since commit f5f80e32de12 ("ipv6: remove hard coded limitation on ipv6_pinfo") that protocols stopped using the old "obj_size - sizeof(struct ipv6_pinfo)" way of grabbing ipv6_pinfo, that severely restricted struct layout and caused fun, hard to see issues. However, mptcp_inet6_sk wasn't fixed (unlike tcp_inet6_sk). Do so. The non-cloned sockets already do the right thing using ipv6_pinfo_offset + the generic IPv6 code. Signed-off-by: Pedro Falcato Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250430154541.1038561-1-pfalcato@suse.de Signed-off-by: Jakub Kicinski commit b88c382bed1ca90a82334b60564270d1eddc6066 Merge: cb9d6b2c2a605f 9d165dc58055d9 Author: Jakub Kicinski Date: Fri May 2 18:25:11 2025 -0700 Merge branch 'net-stmmac-replace-speed_mode_2500-method' Russell King says: ==================== net: stmmac: replace speed_mode_2500() method This series replaces the speed_mode_2500() method with a new method that is more flexible, allowing the platform glue driver to populate phylink's supported_interfaces and set the PHY-side interface mode. The only user of this method is currently dwmac-intel, which we update to use this new method. ==================== Link: https://patch.msgid.link/aBNe0Vt81vmqVCma@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 9d165dc58055d98658941a33fef9e5da866af3e9 Author: Russell King (Oracle) Date: Thu May 1 12:45:27 2025 +0100 net: stmmac: remove speed_mode_2500() method Remove the speed_mode_2500() platform method which is no longer used or necessary, being superseded by the more flexible get_interfaces() method. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1uASM3-0021R3-2B@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit d3836052fe098798b7a61a59c0032da473d801c4 Author: Russell King (Oracle) Date: Thu May 1 12:45:21 2025 +0100 net: stmmac: intel: convert speed_mode_2500() to get_interfaces() TGL platforms support either SGMII or 2500BASE-X, which is determined by reading a SERDES register. Thus, plat->phy_interface (and phylink's supported_interfaces) depend on this. Use the new .get_interfaces() method to set both plat->phy_interface and the supported_interfaces bitmap. This removes the only user of the .speed_mode_2500() method. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1uASLx-0021Qs-Uz@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 0f455d2d1bbe52e04261412991a9bdbf213e04a6 Author: Russell King (Oracle) Date: Thu May 1 12:45:16 2025 +0100 net: stmmac: intel: move phy_interface init to tgl_common_data() Move the initialisation of plat->phy_interface to tgl_common_data() as all callers set this same interface mode. This moves it to a single location to make the change to get_interfaces() more obvious. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1uASLs-0021Qk-Qt@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit ca732e990fc8222a2d6782ae750304719e212fe8 Author: Russell King (Oracle) Date: Thu May 1 12:45:11 2025 +0100 net: stmmac: add get_interfaces() platform method Add a get_interfaces() platform method to allow platforms to indicate to phylink which interface modes they support - which then allows phylink to validate on initialisation that the configured PHY interface mode is actually supported. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1uASLn-0021Qd-Mi@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 1966be55da5b829fcced4c639a1a9b8729b2c3a0 Author: Russell King (Oracle) Date: Thu May 1 12:45:06 2025 +0100 net: stmmac: use priv->plat->phy_interface directly Avoid using a local variable for priv->plat->phy_interface as this may be modified in the .get_interfaces() method added in a future commit. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1uASLi-0021QX-HG@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5ad39ceaea00e3606491fdec9f68722811330577 Author: Russell King (Oracle) Date: Thu May 1 12:45:01 2025 +0100 net: stmmac: use a local variable for priv->phylink_config Use a local variable for priv->phylink_config in stmmac_phy_setup() which makes the code a bit easier to read, allowing some lines to be merged. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1uASLd-0021QR-Cu@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 7351312632e831e51383f48957d47712fae791ef Author: Alexander Sverdlin Date: Mon Mar 31 18:36:40 2025 +0200 counter: interrupt-cnt: Protect enable/disable OPs with mutex Enable/disable seems to be racy on SMP, consider the following scenario: CPU0 CPU1 interrupt_cnt_enable_write(true) { if (priv->enabled == enable) return 0; if (enable) { priv->enabled = true; interrupt_cnt_enable_write(false) { if (priv->enabled == enable) return 0; if (enable) { priv->enabled = true; enable_irq(priv->irq); } else { disable_irq(priv->irq) priv->enabled = false; } enable_irq(priv->irq); } else { disable_irq(priv->irq); priv->enabled = false; } The above would result in priv->enabled == false, but IRQ left enabled. Protect both write (above race) and read (to propagate the value on SMP) callbacks with a mutex. Signed-off-by: Alexander Sverdlin Fixes: a55ebd47f21f ("counter: add IRQ or GPIO based counter") Acked-by: Oleksij Rempel Link: https://lore.kernel.org/r/20250331163642.2382651-1-alexander.sverdlin@siemens.com Signed-off-by: William Breathitt Gray commit 233d740e3a819829ccd6d21319015a94349d64eb Author: Geert Uytterhoeven Date: Fri May 2 13:12:39 2025 +0200 spi: loopback-test: Simplify strange loopback value check Apply De Morgan's Theorem and drop superfluous parentheses to simplify the check for strange loopback values. While at it, add the missing zero in the related comment. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/da612090f543c8c7cc99fb9dc6ef4abc9560abe4.1746184293.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit e68074c63fded9468c513f65734ffb4c80dc2a6d Author: Vijendar Mukunda Date: Fri May 2 21:12:48 2025 +0530 ASoC: SOF: amd: add build support for soundwire Add build support for SoundWire for ACP7.0/ACP7.1 platforms. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-10-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 1f41bf67bfe3721a4d4d36695302801cf70b5a70 Author: Vijendar Mukunda Date: Fri May 2 21:12:47 2025 +0530 ASoC: SOF: amd: add soundwire wake irq handling Add SoundWire wake interrupt handling for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-9-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit a536f3c51edb63900b3340978d38da3aabc1fb2f Author: Vijendar Mukunda Date: Fri May 2 21:12:46 2025 +0530 ASoC: SOF: amd: enable soundwire host wake irq mask Enable SoundWire host wake interrupt mask during acp init sequence based on wake enable checks for each SoundWire manager instance for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-8-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 169c5e444bb9cd4ae770f54157a04fdd8569508a Author: Vijendar Mukunda Date: Fri May 2 21:12:45 2025 +0530 ASoC: SOF: amd: refactor acp reset sequence Below mentioned register sequence should be part of acp init sequence. 1) Set ACP clock mux selection register to ACP_ACLK clock source. 2) Enable ACP global interrupt enable register 3) Enable ACP error interrupt mask. ACP reset sequence should contain code related to asserting acp soft reset and release the soft reset. Move the rest of the registers programming to acp init sequence. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit cc489cced17b2e32170ee87a3b64aaa3c7c6fddb Author: Vijendar Mukunda Date: Fri May 2 21:12:44 2025 +0530 ASoC: SOF: amd: enable ACP_PME_EN register for ACP7.0 & ACP7.1 platforms As per design flow for ACP7.0 & ACP7.1 platforms, enable ACP_PME_EN register for below scenarios. 1. During acp init sequence 2. During resume sequence for SoundWire ClockStop power mode. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 8cc69ecbf195aaf90e8bd5f364ed10ec0bdecb5f Author: Vijendar Mukunda Date: Fri May 2 21:12:43 2025 +0530 ASoC: SOF: amd: update soundwire specific acp descriptor fields Update SoundWire specific acp descriptor structure fields for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 451bd0e7b91c83f817b741557c9be0f133d3836d Author: Vijendar Mukunda Date: Fri May 2 21:12:42 2025 +0530 ASoC: SOF: amd: add ACP7.1 platform support Add SOF support for ACP7.1 platform. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 7c2bad7b95db5b4b978853cd4dd042ae3ec83e63 Author: Vijendar Mukunda Date: Fri May 2 21:12:41 2025 +0530 ASoC: SOF: amd: add missing acp descriptor field Add missing acp descriptor field acp_error_stat for ACP7.0 platform. Fixes: 490be7ba2a01 ("ASoC: SOF: amd: add support for acp7.0 based platform") Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit e46da64f333ede33adc3a1903821a73ed6c018a6 Author: Vijendar Mukunda Date: Fri May 2 21:12:40 2025 +0530 ASoC: SOF: amd: remove else condition in resume sequence Else condition is not required after break/return statement. Remove else condition in resume callback. Signed-off-by: Vijendar Mukunda Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250502154445.3008598-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 30190f82a1a9eb555703879cfe835627cff7a0e2 Merge: 1b1f563a252662 2f9838e257901d Author: Martin KaFai Lau Date: Fri May 2 14:50:09 2025 -0700 Merge branch 'fix-bpf-qdisc-bugs-and-clean-up' Amery Hung says: ==================== Fix bpf qdisc bugs and clean up This patchset fixes the following bugs in bpf qdisc and clean up the selftest. - A null-pointer dereference can happen in qdisc_watchdog_cancel() if the timer is not initialized when 1) .init is not defined by user so init prologue is not generated. 2) .init fails and qdisc_create() calls .destroy - bpf qdisc fails to attach to mq/mqprio when being set as the default qdisc due to failed qdisc_lookup() in init prologue v2 - Rebase to bpf-next/net - Fix erroneous commit messages - Fix and simplify selftests cleanup v1: https://lore.kernel.org/bpf/20250501223025.569020-1-ameryhung@gmail.com/ ==================== Link: https://patch.msgid.link/20250502201624.3663079-1-ameryhung@gmail.com Signed-off-by: Martin KaFai Lau commit 2f9838e257901dae120927362060b40eac435a23 Author: Amery Hung Date: Fri May 2 13:16:24 2025 -0700 selftests/bpf: Cleanup bpf qdisc selftests Some cleanups: - Remove unnecessary kfuncs declaration - Use _ns in the test name to run tests in a separate net namespace - Call skeleton __attach() instead of bpf_map__attach_struct_ops() to simplify tests. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau commit 6cda0e2c4760695123dad2af3328e1cfb4f3f540 Author: Amery Hung Date: Fri May 2 13:16:23 2025 -0700 selftests/bpf: Test attaching a bpf qdisc with incomplete operators Implement .destroy in bpf_fq and bpf_fifo as it is now mandatory. Test attaching a bpf qdisc with a missing operator .init. This is not allowed as bpf qdisc qdisc_watchdog_cancel() could have been called with an uninitialized timer. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau commit 64d6e3b9df1b12e35181e886d771d8920118e742 Author: Amery Hung Date: Fri May 2 13:16:22 2025 -0700 bpf: net_sched: Make some Qdisc_ops ops mandatory The patch makes all currently supported Qdisc_ops (i.e., .enqueue, .dequeue, .init, .reset, and .destroy) mandatory. Make .init, .reset and .destroy mandatory as bpf qdisc relies on prologue and epilogue to check attach points and correctly initialize/cleanup resources. The prologue/epilogue will only be generated for an struct_ops operator only if users implement the operator. Make .enqueue and .dequeue mandatory as bpf qdisc infra does not provide a default data path. Fixes: c8240344956e ("bpf: net_sched: Support implementation of Qdisc_ops in bpf") Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau commit 308fcf7d63046a0abe99f3c1f514876f3048f99e Author: Jani Nikula Date: Fri May 2 11:49:56 2025 +0300 drm/i915/de: drop drm_i915_private compat wrappers from intel_de_*() All the users of intel_de_*() functions now pass in struct intel_display, and we can remove the __to_intel_display() _Generic() compat wrappers. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/3aac42eab7b03c791afee940d0a647770afc99c5.1746175756.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 072608557800d09dacbd91bc5c281b1f40bbe80b Author: Jani Nikula Date: Fri May 2 11:49:55 2025 +0300 drm/i915/hdmi: convert rest of intel_hdmi.c to struct intel_display Remove the last uses of struct drm_i915_private from intel_hdmi.c, and drop the dependency on i915_drv.h. v2: Rebase Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/24183605ac919ca115b1b25fa386643409814c82.1746175756.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit aa337e2a35f9a87ebfd58f46a9d13bd3cc7fed96 Author: Jani Nikula Date: Fri May 2 11:49:54 2025 +0300 drm/i915/dpt: convert intel_dpt_common.c to struct intel_display Remove the last uses of struct drm_i915_private from intel_dpt_common.c, and drop the dependency on i915_drv.h. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/7bc340e05c535479b0f0698372835ba04fd5c8f8.1746175756.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6d080362c3218b92b98a17eb4132e0e5a7ed30d4 Author: Amery Hung Date: Fri May 2 13:16:21 2025 -0700 selftests/bpf: Test setting and creating bpf qdisc as default qdisc First, test that bpf qdisc can be set as default qdisc. Then, attach an mq qdisc to see if bpf qdisc can be successfully created and grafted. The test is a sequential test as net.core.default_qdisc is global. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau commit d85d055e20915d10323d7f416f7fe092a58b28ed Merge: 2056d7a7df5d9a fed0805ffd7616 Author: Mark Brown Date: Sat May 3 07:21:43 2025 +0900 ASoC: soc-utils: add snd_soc_dlc_is_dummy() Merge series from Kuninori Morimoto : We are using dummy component/dlc, but didn't have its check funciton. This patch adds it. commit 659b3b2c488532140676affef036a1702fde6e32 Author: Amery Hung Date: Fri May 2 13:16:20 2025 -0700 bpf: net_sched: Fix bpf qdisc init prologue when set as default qdisc Allow .init to proceed if qdisc_lookup() returns NULL as it only happens when called by qdisc_create_dflt() in mq/mqprio_init and the parent qdisc has not been added to qdisc_hash yet. In qdisc_create(), the caller, __tc_modify_qdisc(), would have made sure the parent qdisc already exist. In addition, call qdisc_watchdog_init() whether .init succeeds or not to prevent null-pointer dereference. In qdisc_create() and qdisc_create_dflt(), if .init fails, .destroy will be called. As a result, the destroy epilogue could call qdisc_watchdog_cancel() with an uninitialized timer, causing null-pointer deference in hrtimer_cancel(). Fixes: c8240344956e ("bpf: net_sched: Support implementation of Qdisc_ops in bpf") Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau commit a912b0c8b5eabd9b70dc24cc97a167eb7287a20a Author: Dafna Hirschfeld Date: Tue Apr 22 12:59:43 2025 +0300 drm/gpusvm: remove unused pages pointer The pages pointer is not used, remove it. Signed-off-by: Dafna Hirschfeld Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250422095943.1198393-1-dafna.hirschfeld@intel.com Signed-off-by: Lucas De Marchi commit 907092bf7cbddee4381729f23a33780d84b1bb7c Author: Vishal Verma Date: Tue Mar 18 00:35:09 2025 -0600 KVM: VMX: Clean up and macrofy x86_ops Eliminate a lot of stub definitions by using macros to define the TDX vs non-TDX versions of various x86_ops. Moving the x86_ops wrappers under CONFIG_KVM_INTEL_TDX also allows nearly all of vmx/main.c to go under a single #ifdef, eliminating trampolines in the generated code, and almost all of the stubs. For example, with CONFIG_KVM_INTEL_TDX=n, before this cleanup, vt_refresh_apicv_exec_ctrl() would produce: 0000000000036490 : 36490: f3 0f 1e fa endbr64 36494: e8 00 00 00 00 call 36499 36495: R_X86_64_PLT32 __fentry__-0x4 36499: e9 00 00 00 00 jmp 3649e 3649a: R_X86_64_PLT32 vmx_refresh_apicv_exec_ctrl-0x4 3649e: 66 90 xchg %ax,%ax After this patch, this is completely eliminated. Based on a patch by Sean Christopherson Link: https://lore.kernel.org/kvm/Z6v9yjWLNTU6X90d@google.com/ Cc: Sean Christopherson Cc: Rick Edgecombe Signed-off-by: Vishal Verma Link: https://lore.kernel.org/r/20250318-vverma7-cleanup_x86_ops-v2-4-701e82d6b779@intel.com Signed-off-by: Sean Christopherson commit 1a81d9d5a1da862ccc49cedec1df603aafa7c600 Author: Vishal Verma Date: Tue Mar 18 00:35:08 2025 -0600 KVM: VMX: Define a VMX glue macro for kvm_complete_insn_gp() Define kvm_complete_insn_gp() as vmx_complete_emulated_msr() and use the glue wrapper in vt_complete_emulated_msr() so that VT's .complete_emulated_msr() implementation follows the soon-to-be-standard pattern of: vt_abc: if (is_td()) return tdx_abc(); return vmx_abc(); This will allow generating such wrappers via a macro, which in turn will make it trivially easy to skip the wrappers entirely when KVM_INTEL_TDX=n. Suggested-by: Sean Christopherson Link: https://lore.kernel.org/kvm/Z6v9yjWLNTU6X90d@google.com/ Cc: Sean Christopherson Cc: Rick Edgecombe Signed-off-by: Vishal Verma Link: https://lore.kernel.org/r/20250318-vverma7-cleanup_x86_ops-v2-3-701e82d6b779@intel.com [sean: massage shortlog+changelog] Signed-off-by: Sean Christopherson commit 84ad4d834ce98542ad2910cecb409ba8fcfffa4b Author: Vishal Verma Date: Tue Mar 18 00:35:07 2025 -0600 KVM: VMX: Move vt_apicv_pre_state_restore() to posted_intr.c and tweak name In preparation for a cleanup of the kvm_x86_ops struct for TDX, all vt_* functions are expected to act as glue functions that route to either tdx_* or vmx_* based on the VM type. Specifically, the pattern is: vt_abc: if (is_td()) return tdx_abc(); return vmx_abc(); But vt_apicv_pre_state_restore() does not follow this pattern. To facilitate that cleanup, rename and move vt_apicv_pre_state_restore() into posted_intr.c. Opportunistically turn vcpu_to_pi_desc() back into a static function, as the only reason it was exposed outside of posted_intr.c was for vt_apicv_pre_state_restore(). No functional change intended. Suggested-by: Sean Christopherson Link: https://lore.kernel.org/kvm/Z6v9yjWLNTU6X90d@google.com/ Cc: Sean Christopherson Cc: Rick Edgecombe Reviewed-by: Binbin Wu Signed-off-by: Vishal Verma Link: https://lore.kernel.org/r/20250318-vverma7-cleanup_x86_ops-v2-2-701e82d6b779@intel.com [sean: apply Chao's suggestions, massage shortlog] Signed-off-by: Sean Christopherson commit f2d7993314a31bc3acd3cb224f9866e90c5c96d8 Author: Sean Christopherson Date: Fri May 2 13:34:21 2025 -0700 KVM: x86: Revert kvm_x86_ops.mem_enc_ioctl() back to an OPTIONAL hook Restore KVM's handling of a NULL kvm_x86_ops.mem_enc_ioctl, as the hook is NULL on SVM when CONFIG_KVM_AMD_SEV=n, and TDX will soon follow suit. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at arch/x86/include/asm/kvm-x86-ops.h:130 kvm_x86_vendor_init+0x178b/0x18e0 Modules linked in: CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.15.0-rc2-dc1aead1a985-sink-vm #2 NONE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_x86_vendor_init+0x178b/0x18e0 Call Trace: svm_init+0x2e/0x60 do_one_initcall+0x56/0x290 kernel_init_freeable+0x192/0x1e0 kernel_init+0x16/0x130 ret_from_fork+0x30/0x50 ret_from_fork_asm+0x1a/0x30 ---[ end trace 0000000000000000 ]--- Opportunistically drop the superfluous curly braces. Link: https://lore.kernel.org/all/20250318-vverma7-cleanup_x86_ops-v2-4-701e82d6b779@intel.com Fixes: b2aaf38ced69 ("KVM: TDX: Add place holder for TDX VM specific mem_enc_op ioctl") Link: https://lore.kernel.org/r/20250502203421.865686-1-seanjc@google.com Signed-off-by: Sean Christopherson commit ada014f5fc676bf16327c252587e0c856234bc13 Author: Pratik R. Sampat Date: Wed Mar 5 17:00:00 2025 -0600 KVM: selftests: Add a basic SEV-SNP smoke test Extend sev_smoke_test to also run a minimal SEV-SNP smoke test that initializes and sets up private memory regions required to run a simple SEV-SNP guest. Similar to its SEV-ES smoke test counterpart, this also does not support GHCB and ucall yet and uses the GHCB MSR protocol to trigger an exit of the type KVM_EXIT_SYSTEM_EVENT. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-11-prsampat@amd.com Signed-off-by: Sean Christopherson commit a5d55f783fb73ad06d2e4358b24d6c2a75991350 Author: Pratik R. Sampat Date: Wed Mar 5 16:59:59 2025 -0600 KVM: selftests: Decouple SEV policy from VM type In preparation for SNP, cleanup the smoke test to decouple deriving type from policy. This will allow reusing the existing interfaces for SNP. No functional change intended. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-10-prsampat@amd.com [sean: massage shortlog+changelog] Signed-off-by: Sean Christopherson commit b73a30cd9caa196459ef66099662b3e5feb8571f Author: Pratik R. Sampat Date: Wed Mar 5 16:59:58 2025 -0600 KVM: selftests: Force GUEST_MEMFD flag for SNP VM type Force the SEV-SNP VM type to set the KVM_MEM_GUEST_MEMFD flag for the creation of private memslots. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-9-prsampat@amd.com [sean: add a comment, don't break non-x86] Signed-off-by: Sean Christopherson commit 99d2fce9b44dec6d270b85a7d28cdc99aaa93da6 Author: John B. Wyatt IV Date: Tue Apr 29 16:47:10 2025 -0400 cpupower: change binding's makefile to use -lcpupower Originally I believed I needed the .o files to make the bindings. The linking failed due to a missing .so link in Fedora or by using make install-lib from the cpupower directory. Amend the makefile and the README. Big thanks to Wander Lairson Costa for the help. Link: https://lore.kernel.org/r/20250429204711.127274-1-jwyatt@redhat.com Signed-off-by: "John B. Wyatt IV" Signed-off-by: "John B. Wyatt IV" Signed-off-by: Shuah Khan commit 9c70b779ad91604dbfcfcde90c292797cb1ff352 Author: Francesco Poli (wintermute) Date: Fri Apr 25 17:07:31 2025 +0200 cpupower: add a systemd service to run cpupower One of the most typical use cases of the 'cpupower' utility works as follows: run 'cpupower' at boot with the desired command-line options and then forget about it. Add a systemd service (disabled by default) that automates this use case (for environments where the initialization system is 'systemd'), by running 'cpupower' at boot with the settings read from a default configuration file. The systemd service, the associated support script and the corresponding default configuration file are derived from what is provided by the Arch Linux package (under "GPL-2.0-or-later" terms), modernized and enhanced in various ways (the script has also been checked with 'shellcheck'). Link: https://gitlab.archlinux.org/archlinux/packaging/packages/linux-tools/-/tree/dd2e2a311e05413d0d87a0346ffce8c7e98d6d2b Signed-off-by: Francesco Poli (wintermute) Reviewed-by: John B. Wyatt IV Reviewed-by: John B. Wyatt IV Tested-by: John B. Wyatt IV Tested-by: John B. Wyatt IV Signed-off-by: Shuah Khan commit 7515f45c165269b72ee739e6fc26cc2ef928fc1b Author: Dan Williams Date: Mon Mar 3 23:14:26 2025 -0800 coco/guest: Move shared guest CC infrastructure to drivers/virt/coco/guest/ In preparation for creating a new drivers/virt/coco/host/ directory to house shared host driver infrastructure for confidential computing, move configfs-tsm to a guest/ sub-directory. The tsm.ko module is renamed to tsm_reports.ko. The old tsm.ko module was only ever demand loaded by kernel internal dependencies, so it should not affect existing userspace module install scripts. The new drivers/virt/coco/guest/ is also a preparatory landing spot for new / optional TSM Report mechanics like a TCB stability enumeration / watchdog mechanism. To be added later. Cc: Wu Hao Cc: Yilun Xu Cc: Samuel Ortiz Cc: Tom Lendacky Reviewed-by: Alexey Kardashevskiy Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/174107246641.1288555.208426916259466774.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 71ded61bee2af97a218f9dfa0f4019cc4cd3b029 Author: Dan Williams Date: Mon Mar 3 23:14:20 2025 -0800 configfs-tsm: Namespace TSM report symbols In preparation for new + common TSM (TEE Security Manager) infrastructure, namespace the TSM report symbols in tsm.h with an _REPORT suffix to differentiate them from other incoming tsm work. Cc: Yilun Xu Cc: Samuel Ortiz Cc: Tom Lendacky Cc: Sami Mujawar Cc: Steven Price Reviewed-by: Alexey Kardashevskiy Reviewed-by: Suzuki K Poulose Reviewed-by: Kai Huang Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Steven Price Link: https://patch.msgid.link/174107246021.1288555.7203769833791489618.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 3bf3e0a521237681d5353cca741474aa8c4e16de Author: Pratik R. Sampat Date: Wed Mar 5 16:59:57 2025 -0600 KVM: selftests: Add library support for interacting with SNP Extend the SEV library to include support for SNP ioctl() wrappers, which aid in launching and interacting with a SEV-SNP guest. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-8-prsampat@amd.com [sean: use BIT()] Signed-off-by: Sean Christopherson commit 4a4e1e8e92eb99611c8988d563e1781b067408b5 Author: Pratik R. Sampat Date: Wed Mar 5 16:59:56 2025 -0600 KVM: selftests: Introduce SEV VM type check In preparation for SNP, declutter the vm type check by introducing a SEV-SNP VM type check as well as a transitive set of helper functions. The SNP VM type is the subset of SEV-ES. Similarly, the SEV-ES and SNP types are subset of the SEV VM type check. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-7-prsampat@amd.com [sean: make the helpers static inlines] Signed-off-by: Sean Christopherson commit f694f30e81c4ade358eb8c75273bac1a48f0cb8f Author: Pratik R. Sampat Date: Wed Mar 5 16:59:55 2025 -0600 KVM: selftests: Replace assert() with TEST_ASSERT_EQ() For SEV tests, assert() failures on VM type or fd do not provide sufficient error reporting. Replace assert() with TEST_ASSERT_EQ() to obtain more detailed information on the assertion condition failure, including the call stack. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-6-prsampat@amd.com Signed-off-by: Sean Christopherson commit acf064345018853ab2fc86a5637891d605ea60c8 Author: Pratik R. Sampat Date: Wed Mar 5 16:59:54 2025 -0600 KVM: selftests: Add SMT control state helper Move the SMT control check out of the hyperv_cpuid selftest so that it is generally accessible all KVM selftests. Split the functionality into a helper that populates a buffer with SMT control value which other helpers can use to ascertain if SMT state is available and active. Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-5-prsampat@amd.com [sean: prepend is_ to the helpers] Signed-off-by: Sean Christopherson commit c4e1a848d72179136f6ea9626933cb26c9d35eb5 Author: Pratik R. Sampat Date: Wed Mar 5 16:59:53 2025 -0600 KVM: selftests: Add vmgexit helper Abstract rep vmmcall coded into the vmgexit helper for the sev library. No functional change intended. Signed-off-by: Pratik R. Sampat Reviewed-by: Pankaj Gupta Link: https://lore.kernel.org/r/20250305230000.231025-4-prsampat@amd.com Signed-off-by: Sean Christopherson commit 68ed692e395470a178bfdb6d417c43ebd12861b6 Author: Pratik R. Sampat Date: Wed Mar 5 16:59:52 2025 -0600 KVM: selftests: SEV-SNP test for KVM_SEV_INIT2 Add the X86_FEATURE_SEV_SNP CPU feature to the architectural definition for the SEV-SNP VM type to exercise the KVM_SEV_INIT2 call. Ensure that the SNP test is skipped in scenarios where CPUID supports it but KVM does not, preventing reporting of failure in such cases. Reviewed-by: Nikunj A Dadhania Signed-off-by: Pratik R. Sampat Link: https://lore.kernel.org/r/20250305230000.231025-3-prsampat@amd.com [sean: use the same pattern as SEV and SEV-ES] Signed-off-by: Sean Christopherson commit 1b1f563a2526625a9125c1a63f47239f40f5e259 Merge: 7625645e69454f c58dcc1dbe30d8 Author: Martin KaFai Lau Date: Fri May 2 10:32:02 2025 -0700 Merge branch 'bpf-udp-exactly-once-socket-iteration' Jordan Rife says: ==================== bpf: udp: Exactly-once socket iteration Both UDP and TCP socket iterators use iter->offset to track progress through a bucket, which is a measure of the number of matching sockets from the current bucket that have been seen or processed by the iterator. On subsequent iterations, if the current bucket has unprocessed items, we skip at least iter->offset matching items in the bucket before adding any remaining items to the next batch. However, iter->offset isn't always an accurate measure of "things already seen" when the underlying bucket changes between reads which can lead to repeated or skipped sockets. Instead, this series remembers the cookies of the sockets we haven't seen yet in the current bucket and resumes from the first cookie in that list that we can find on the next iteration. This series focuses on UDP socket iterators, but a later series will apply a similar approach to TCP socket iterators. To be more specific, this series replaces struct sock **batch inside struct bpf_udp_iter_state with union bpf_udp_iter_batch_item *batch, where union bpf_udp_iter_batch_item can contain either a pointer to a socket or a socket cookie. During reads, batch contains pointers to all sockets in the current batch while between reads batch contains all the cookies of the sockets in the current bucket that have yet to be processed. On subsequent reads, when iteration resumes, bpf_iter_udp_batch finds the first saved cookie that matches a socket in the bucket's socket list and picks up from there to construct the next batch. On average, assuming it's rare that the next socket disappears before the next read occurs, we should only need to scan as much as we did with the offset-based approach to find the starting point. In the case that the next socket is no longer there, we keep scanning through the saved cookies list until we find a match. The worst case is when none of the sockets from last time exist anymore, but again, this should be rare. CHANGES ======= v6 -> v7: * Move initialization of iter->state.bucket to -1 from patch five ("bpf: udp: Avoid socket skips and repeats during iteration") to patch three ("bpf: udp: Get rid of st_bucket_done") to avoid skipping the first bucket in the patch three and four (Martin). * Rename sock to sk in bpf_iter_batch_item (Martin). * Use ASSERT_OK_PTR in do_resume_test to check if counts is NULL (Martin). * goto done in do_resume_test when calloc or sock_iter_batch__open fails to make sure things are cleaned up properly, and initialize pointers to NULL explicitly to silence warnings from llvm 20 in CI. v5 -> v6: * Rework the logic in patch two ("bpf: udp: Make sure iter->batch always contains a full bucket snapshot") again to simplify it: * Only try realloc with GFP_USER one time instead of two (Alexei). * v5 introduced a second call to bpf_iter_udp_realloc_batch inside the loop to handle the GFP_ATOMIC case. In v6, move the GFP_USER case inside the loop as well, so it's all in once place. This, I feel, makes it a bit easier to understand the control flow. Consequently, it also simplifies the logic outside the loop. * Use GFP_NOWAIT instead of GFP_ATOMIC to avoid depleting memory reserves, since iterators are not critical operation (Alexei). Alexei suggested using __GFP_NOWARN as well with GFP_NOWAIT, but this is already set inside bpf_iter_udp_realloc_batch, so no change was needed there. * Introduce patch three ("bpf: udp: Get rid of st_bucket_done") to simplify things further, since with patch two, st_bucket_done == true is equivalent to iter->cur_sk == iter->end_sk. * In patch five ("bpf: udp: Avoid socket skips and repeats during iteration"), initialize iter->state.bucket to -1 so that on the first call to bpf_iter_udp_batch, the resume_bucket condition is not hit. This avoids adding a special case to the condition around bpf_iter_udp_resume for bucket zero. v4 -> v5: * Rework the logic from patch two ("bpf: udp: Make sure iter->batch always contains a full bucket snapshot") to move the handling of the GFP_ATOMIC case inside the main loop and get rid of the extra lock variable. This makes the logic clearer and makes it clearer that the bucket lock is always released (Martin). * Introduce udp_portaddr_for_each_entry_from in patch two instead of patch four ("bpf: udp: Avoid socket skips and repeats during iteration"), since patch two now needs to be able to resume list iteration from an arbitrary point in the GFP_ATOMIC case. * Similarly, introduce the memcpy inside bpf_iter_udp_realloc_batch in patch two instead of patch four, since in the GFP_ATOMIC case the new batch needs to remember the sockets from the old batch. * Use sock_gen_cookie instead of __sock_gen_cookie inside bpf_iter_udp_put_batch, since it can be called from a preemptible context (Martin). v3 -> v4: * Explicitly assign sk = NULL on !iter->end_sk exit condition (Kuniyuki). * Reword the commit message of patch two ("bpf: udp: Make sure iter->batch always contains a full bucket snapshot") to make the reasoning for GFP_ATOMIC more clear. v2 -> v3: * Guarantee that iter->batch is always a full snapshot of a bucket to prevent socket repeat scenarios [3]. This supercedes the patch from v2 that simply propagated ENOMEM up from bpf_iter_udp_batch and covers the scenario where the batch size is still too small after a realloc. * Fix up self tests (Martin) * ASSERT_EQ(nread, sizeof(out), "nread") instead of ASSERT_GE(nread, 1, "nread) in read_n. * Use ASSERT_OK and ASSERT_OK_FD in several places. * Add missing free(counts) to do_resume_test. * Move int local_port declaration to the top of do_resume_test. * Remove unnecessary guards before close and free. v1 -> v2: * Drop WARN_ON_ONCE from bpf_iter_udp_realloc_batch (Kuniyuki). * Fixed memcpy size parameter in bpf_iter_udp_realloc_batch; before it was missing sizeof(elem) * (Kuniyuki). * Move "bpf: udp: Propagate ENOMEM up from bpf_iter_udp_batch" to patch two in the series (Kuniyuki). rfc [1] -> v1: * Use hlist_entry_safe directly to retrieve the first socket in the current bucket's linked list instead of immediately breaking from udp_portaddr_for_each_entry (Martin). * Cancel iteration if bpf_iter_udp_realloc_batch() can't grab enough memory to contain a full snapshot of the current bucket to prevent unwanted skips or repeats [2]. [1]: https://lore.kernel.org/bpf/20250404220221.1665428-1-jordan@jrife.io/ [2]: https://lore.kernel.org/bpf/CABi4-ogUtMrH8-NVB6W8Xg_F_KDLq=yy-yu-tKr2udXE2Mu1Lg@mail.gmail.com/ [3]: https://lore.kernel.org/bpf/d323d417-3e8b-48af-ae94-bc28469ac0c1@linux.dev/ ==================== Link: https://patch.msgid.link/20250502161528.264630-1-jordan@jrife.io Signed-off-by: Martin KaFai Lau commit c58dcc1dbe30d8edf1853be65eb13c3104faaae0 Author: Jordan Rife Date: Fri May 2 09:15:26 2025 -0700 selftests/bpf: Add tests for bucket resume logic in UDP socket iterators Introduce a set of tests that exercise various bucket resume scenarios: * remove_seen resumes iteration after removing a socket from the bucket that we've already processed. Before, with the offset-based approach, this test would have skipped an unseen socket after resuming iteration. With the cookie-based approach, we now see all sockets exactly once. * remove_unseen exercises the condition where the next socket that we would have seen is removed from the bucket before we resume iteration. This tests the scenario where we need to scan past the first cookie in our remembered cookies list to find the socket from which to resume iteration. * remove_all exercises the condition where all sockets we remembered were removed from the bucket to make sure iteration terminates and returns no more results. * add_some exercises the condition where a few, but not enough to trigger a realloc, sockets are added to the head of the current bucket between reads. Before, with the offset-based approach, this test would have repeated sockets we've already seen. With the cookie-based approach, we now see all sockets exactly once. * force_realloc exercises the condition that we need to realloc the batch on a subsequent read, since more sockets than can be held in the current batch array were added to the current bucket. This exercies the logic inside bpf_iter_udp_realloc_batch that copies cookies into the new batch to make sure nothing is skipped or repeated. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau commit 4a0614e18c2d1f277a8dbd02c06f6a847e359eee Author: Jordan Rife Date: Fri May 2 09:15:25 2025 -0700 selftests/bpf: Return socket cookies from sock_iter_batch progs Extend the iter_udp_soreuse and iter_tcp_soreuse programs to write the cookie of the current socket, so that we can track the identity of the sockets that the iterator has seen so far. Update the existing do_test function to account for this change to the iterator program output. At the same time, teach both programs to work with AF_INET as well. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau commit 5668f73f09aef16755da4453dc0b5b725469878a Author: Jordan Rife Date: Fri May 2 09:15:24 2025 -0700 bpf: udp: Avoid socket skips and repeats during iteration Replace the offset-based approach for tracking progress through a bucket in the UDP table with one based on socket cookies. Remember the cookies of unprocessed sockets from the last batch and use this list to pick up where we left off or, in the case that the next socket disappears between reads, find the first socket after that point that still exists in the bucket and resume from there. This approach guarantees that all sockets that existed when iteration began and continue to exist throughout will be visited exactly once. Sockets that are added to the table during iteration may or may not be seen, but if they are they will be seen exactly once. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau commit 251c6636e0159fca79c3b78d982d1cec6f8785bc Author: Jordan Rife Date: Fri May 2 09:15:23 2025 -0700 bpf: udp: Use bpf_udp_iter_batch_item for bpf_udp_iter_state batch items Prepare for the next patch that tracks cookies between iterations by converting struct sock **batch to union bpf_udp_iter_batch_item *batch inside struct bpf_udp_iter_state. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau Reviewed-by: Kuniyuki Iwashima commit fa9c4977fbfbca182f9e410d57b3f98356a9d917 Author: Ian Rogers Date: Thu May 1 00:00:03 2025 -0700 perf symbol-minimal: Fix double free in filename__read_build_id Running the "perf script task-analyzer tests" with address sanitizer showed a double free: ``` FAIL: "test_csv_extended_times" Error message: "Failed to find required string:'Out-Out;'." ================================================================= ==19190==ERROR: AddressSanitizer: attempting double-free on 0x50b000017b10 in thread T0: #0 0x55da9601c78a in free (perf+0x26078a) (BuildId: e7ef50e08970f017a96fde6101c5e2491acc674a) #1 0x55da96640c63 in filename__read_build_id tools/perf/util/symbol-minimal.c:221:2 0x50b000017b10 is located 0 bytes inside of 112-byte region [0x50b000017b10,0x50b000017b80) freed by thread T0 here: #0 0x55da9601ce40 in realloc (perf+0x260e40) (BuildId: e7ef50e08970f017a96fde6101c5e2491acc674a) #1 0x55da96640ad6 in filename__read_build_id tools/perf/util/symbol-minimal.c:204:10 previously allocated by thread T0 here: #0 0x55da9601ca23 in malloc (perf+0x260a23) (BuildId: e7ef50e08970f017a96fde6101c5e2491acc674a) #1 0x55da966407e7 in filename__read_build_id tools/perf/util/symbol-minimal.c:181:9 SUMMARY: AddressSanitizer: double-free (perf+0x26078a) (BuildId: e7ef50e08970f017a96fde6101c5e2491acc674a) in free ==19190==ABORTING FAIL: "invocation of perf script report task-analyzer --csv-summary csvsummary --summary-extended command failed" Error message: "" FAIL: "test_csvsummary_extended" Error message: "Failed to find required string:'Out-Out;'." ---- end(-1) ---- 132: perf script task-analyzer tests : FAILED! ``` The buf_size if always set to phdr->p_filesz, but that may be 0 causing a free and realloc to return NULL. This is treated in filename__read_build_id like a failure and the buffer is freed again. To avoid this problem only grow buf, meaning the buf_size will never be 0. This also reduces the number of memory (re)allocations. Fixes: b691f64360ecec49 ("perf symbols: Implement poor man's ELF parser") Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250501070003.22251-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f7458176a74f270843092ec54f5ffd663faa910a Author: Namhyung Kim Date: Wed Apr 30 13:55:48 2025 -0700 perf mem: Add 'dtlb' output field This is a breakdown of perf_mem_data_src.mem_dtlb values. It assumes PMU drivers would set PERF_MEM_TLB_HIT bit with an appropriate level. And having PERF_MEM_TLB_MISS means that it failed to find one in any levels of TLB. For now, it doesn't use PERF_MEM_TLB_{WK,OS} bits. Also it seems Intel machines don't distinguish L1 or L2 precisely. So I added ANY_HIT (printed as "L?-Hit") to handle the case. $ perf mem report -F overhead,dtlb,dso --stdio ... # --- D-TLB ---- # Overhead L?-Hit Miss Shared Object # ........ .............. ................. # 67.03% 99.5% 0.5% [unknown] 31.23% 99.2% 0.8% [kernel.kallsyms] 1.08% 97.8% 2.2% [i915] 0.36% 100.0% 0.0% [JIT] tid 6853 0.12% 100.0% 0.0% [drm] 0.05% 100.0% 0.0% [drm_kms_helper] 0.05% 100.0% 0.0% [ext4] 0.02% 100.0% 0.0% [aesni_intel] 0.02% 100.0% 0.0% [crc32c_intel] 0.02% 100.0% 0.0% [dm_crypt] ... Committer testing: # perf report --header | grep cpudesc # cpudesc : AMD Ryzen 9 9950X3D 16-Core Processor # perf mem report -F overhead,dtlb,dso --stdio | head -20 # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 2K of event 'cycles:P' # Total weight : 2637 # Sort order : local_weight,mem,sym,dso,symbol_daddr,dso_daddr,snoop,tlb,locked,blocked,local_ins_lat,local_p_stage_cyc # # ---------- D-TLB ----------- # Overhead L1-Hit L2-Hit Miss Other Shared Object # ........ ............................ ................................. # 77.47% 18.4% 0.1% 0.6% 80.9% [kernel.kallsyms] 5.61% 36.5% 0.7% 1.4% 61.5% libxul.so 2.77% 39.7% 0.0% 12.3% 47.9% libc.so.6 2.01% 34.0% 1.9% 1.9% 62.3% libglib-2.0.so.0.8400.1 1.93% 31.4% 2.0% 2.0% 64.7% [amdgpu] 1.63% 48.8% 0.0% 0.0% 51.2% [JIT] tid 60168 1.14% 3.3% 0.0% 0.0% 96.7% [vdso] # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5e424a017882e01a7ee7f0129df879245e8906ba Author: Namhyung Kim Date: Wed Apr 30 13:55:47 2025 -0700 perf mem: Add 'snoop' output field This is a breakdown of perf_mem_data_src.mem_snoop values. For now, it doesn't use mem_snoopx values like FWD and PEER. $ perf mem report -F overhead,snoop,comm --stdio ... # ---------- Snoop ----------- # Overhead Hit HitM Miss Other Command # ........ ............................ ............... # 34.24% 0.6% 0.0% 0.0% 99.4% gnome-shell 12.02% 1.0% 0.0% 0.0% 99.0% chrome 9.32% 1.0% 0.0% 0.3% 98.7% Isolated Web Co 6.85% 1.0% 0.3% 0.0% 98.6% swapper 6.30% 0.8% 0.8% 0.0% 98.5% Xorg 3.02% 2.4% 0.0% 0.0% 97.6% VizCompositorTh 2.35% 0.0% 0.0% 0.0% 100.0% firefox-esr 2.04% 0.0% 0.0% 0.0% 100.0% JS Helper 1.51% 3.2% 0.0% 0.0% 96.8% threaded-ml 1.44% 0.0% 0.0% 0.0% 100.0% AudioIP~allback ... Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit abe4dc24a880238c52381633081d2bd82fb266b3 Author: Namhyung Kim Date: Wed Apr 30 13:55:46 2025 -0700 perf mem: Add 'cache' and 'memory' output fields This is a breakdown of perf_mem_data_src.mem_lvl_num. But it's also divided into two parts because the combination is bigger than 8. Since there are many entries for different cache levels, 'cache' field focuses on them. I generalized buffers like LFB, MAB and MHB to L1-buf and L2-buf. The rest goes to 'memory' field which can be RAM, CXL, PMEM, IO, etc. $ perf mem report -F cache,mem,dso --stdio ... # # -------------- Cache -------------- --- Memory --- # L1 L2 L3 L1-buf Other RAM Other Shared Object # ................................... .............. .................................... # 53.9% 3.6% 16.2% 21.6% 4.8% 4.8% 95.2% [kernel.kallsyms] 64.7% 1.7% 3.5% 17.4% 12.8% 12.8% 87.2% chrome (deleted) 78.3% 2.8% 0.0% 1.0% 17.9% 17.9% 82.1% libc.so.6 39.6% 1.5% 0.0% 5.7% 53.2% 53.2% 46.8% libxul.so 26.2% 0.0% 0.0% 0.0% 73.8% 73.8% 26.2% [unknown] 85.5% 0.0% 0.0% 14.5% 0.0% 0.0% 100.0% libspa-audioconvert.so 66.3% 4.4% 0.0% 29.4% 0.0% 0.0% 100.0% libglib-2.0.so.0.8200.1 (deleted) 1.9% 0.0% 0.0% 0.0% 98.1% 98.1% 1.9% libmutter-cogl-15.so.0.0.0 (deleted) 10.6% 0.0% 0.0% 89.4% 0.0% 0.0% 100.0% libpulsecommon-16.1.so 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 100.0% libfreeblpriv3.so (deleted) ... Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 225772c17c9fb7679a4db45837fa9b429d97d6f4 Author: Namhyung Kim Date: Wed Apr 30 13:55:45 2025 -0700 perf hist: Hide unused mem stat columns Some mem_stat types don't use all 8 columns. And there are cases only samples in certain kinds of mem_stat types are available only. For that case hide columns which has no samples. The new output for the previous data would be: $ perf mem report -F overhead,op,comm --stdio ... # ------ Mem Op ------- # Overhead Load Store Other Command # ........ ..................... ............... # 44.85% 21.1% 30.7% 48.3% swapper 26.82% 98.8% 0.3% 0.9% netsli-prober 7.19% 51.7% 13.7% 34.6% perf 5.81% 89.7% 2.2% 8.1% qemu-system-ppc 4.77% 100.0% 0.0% 0.0% notifications_c 1.77% 95.9% 1.2% 3.0% MemoryReleaser 0.77% 71.6% 4.1% 24.3% DefaultEventMan 0.19% 66.7% 22.2% 11.1% gnome-shell ... On Intel machines, the event is only for loads or stores so it'll have only one column: # Mem Op # Overhead Load Command # ........ ....... ............... # 20.55% 100.0% swapper 17.13% 100.0% chrome 9.02% 100.0% data-loop.0 6.26% 100.0% pipewire-pulse 5.63% 100.0% threaded-ml 5.47% 100.0% GraphRunner 5.37% 100.0% AudioIP~allback 5.30% 100.0% Chrome_ChildIOT 3.17% 100.0% Isolated Web Co ... Committer testing: # grep "model name" -m1 /proc/cpuinfo model name : AMD Ryzen 9 9950X3D 16-Core Processo # perf mem report -F overhead,op,comm --stdio # Total Lost Samples: 0 # # Samples: 2K of event 'cycles:P' # Total weight : 2637 # Sort order : local_weight,mem,sym,dso,symbol_daddr,dso_daddr,snoop,tlb,locked,blocked,local_ins_lat,local_p_stage_cyc # # ------ Mem Op ------- # Overhead Load Store Other Command # ........ ..................... ............... # 61.02% 14.4% 25.5% 60.1% swapper 5.61% 26.4% 13.5% 60.1% Isolated Web Co 5.50% 21.4% 29.7% 49.0% perf 4.74% 27.2% 15.2% 57.6% gnome-shell 4.63% 33.6% 11.5% 54.9% mdns_service 4.29% 28.3% 12.4% 59.3% ptyxis 2.16% 24.6% 19.3% 56.1% DOM Worker 0.99% 23.1% 34.6% 42.3% firefox 0.72% 26.3% 15.8% 57.9% IPC I/O Parent 0.61% 12.5% 12.5% 75.0% kworker/u130:20 0.61% 37.5% 18.8% 43.8% podman 0.57% 33.3% 6.7% 60.0% Timer 0.53% 14.3% 7.1% 78.6% KMS thread 0.49% 30.8% 7.7% 61.5% kworker/u130:3- 0.46% 41.7% 33.3% 25.0% IPDL Background Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1e6569dca567315f962191afcdc1d2700e448015 Author: Namhyung Kim Date: Wed Apr 30 13:55:44 2025 -0700 perf mem: Add 'op' output field This is an actual example of the he_mem_stat based sample breakdown. It uses 'mem_op' field of union perf_mem_data_src which means memory operations. It'd have basically 'load' or 'store' which can be useful if PMU doesn't have separate events for them like IBS or SPE. In addition, there's an entry in case load and store happen at the same time. Also adds entries for prefetching and execution. $ perf mem report -F +op -s comm --stdio # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4K of event 'ibs_op//' # Total weight : 9559 # Sort order : comm # # --------------------- Mem Op ---------------------- # Overhead Samples Load Store Ld+St Pfetch Exec Other N/A N/A Command # ........ ....... ................................................... ............... # 44.85% 4077 21.1% 30.7% 0.0% 0.0% 0.0% 48.3% 0.0% 0.0% swapper 26.82% 45 98.8% 0.3% 0.0% 0.0% 0.0% 0.9% 0.0% 0.0% netsli-prober 7.19% 442 51.7% 13.7% 0.0% 0.0% 0.0% 34.6% 0.0% 0.0% perf 5.81% 75 89.7% 2.2% 0.0% 0.0% 0.0% 8.1% 0.0% 0.0% qemu-system-ppc 4.77% 1 100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% notifications_c 1.77% 10 95.9% 1.2% 0.0% 0.0% 0.0% 3.0% 0.0% 0.0% MemoryReleaser 0.77% 32 71.6% 4.1% 0.0% 0.0% 0.0% 24.3% 0.0% 0.0% DefaultEventMan 0.19% 10 66.7% 22.2% 0.0% 0.0% 0.0% 11.1% 0.0% 0.0% gnome-shell Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b1fc83ca433e001e5cc0999c85c4ced5f72cf122 Author: Namhyung Kim Date: Wed Apr 30 13:55:43 2025 -0700 perf hist: Implement output fields for mem stats This is a preparation for later changes to support mem_stat output. The new fields will need two lines for the header - the first line will show type of mem stat and the second line will show the name of each item which is returned by mem_stat_name(). Each element in the mem_stat array will be printed in percentage for the hist_entry and their sum would be 100%. Add new output field dimension only for SORT_MODE__MEM using mem_stat. To handle possible name conflict with existing sort keys, move the order of checking output field dimensions after the sort dimensions when it looks for sort keys. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9fcb43e27c0e2696f6315022972e75ec0da8eb86 Author: Namhyung Kim Date: Wed Apr 30 13:55:42 2025 -0700 perf hist: Basic support for mem_stat accounting Add a logic to account he->mem_stat based on mem_stat_type in hists. Each mem_stat entry will have different meaning based on the type so the index in the array is calculated at runtime using the corresponding value in the sample.data_src. Still hists has no mem_stat_types yet so this code won't work for now. Later hists->mem_stat_types will be allocated based on what users want in the output actually. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 930d4c45c687246d02950d4aa2608641f26498ec Author: Namhyung Kim Date: Wed Apr 30 13:55:41 2025 -0700 perf hist: Add struct he_mem_stat The 'struct he_mem_stat' is to save detailed information about memory instruction. It'll be used to show breakdown of various data from PERF_SAMPLE_DATA_SRC. Note that this structure is generic and the contents will be different depending on actual data it'll use later. The information about the actual data will be saved in 'struct hists' and its length is in nr_mem_stats. This commit just adds ground works and does nothing since hists->nr_mem_stats is 0 for now. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 29e6392ec38bbb61d677f71203caa87be1271ede Author: Namhyung Kim Date: Wed Apr 30 13:55:40 2025 -0700 perf hist: Support multi-line header This is a preparation to support multi-line headers in 'perf mem report'. Normal sort keys and output fields that don't have contents for multi- line will print the header string at the last line only. As we don't use multi-line headers normally, it should not have any changes in the output. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 43a6446998382541516120b3dd35c9150809b622 Author: Namhyung Kim Date: Wed Apr 30 13:55:39 2025 -0700 perf record: Add --sample-mem-info option There's no way to enable PERF_SAMPLE_DATA_SRC without PERF_SAMPLE_ADDR which brings a lot of overhead due to the number of MMAP[2] records. Let's add a new option to enable this information separately. Committer testing: # perf record -a --sample-mem-info ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.815 MB perf.data (2637 samples) ] # # perf evlist -v cycles:P: type: 0 (PERF_TYPE_HARDWARE), size: 136, config: 0 (PERF_COUNT_HW_CPU_CYCLES), { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|IDENTIFIER|DATA_SRC, read_format: ID|LOST, disabled: 1, freq: 1, precise_ip: 2, sample_id_all: 1 dummy:u: type: 1 (PERF_TYPE_SOFTWARE), size: 136, config: 0x9 (PERF_COUNT_SW_DUMMY), { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER|DATA_SRC, read_format: ID|LOST, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # # perf report -D |& grep -w PERF_RECORD_SAMPLE -A3 -m1 0 44675164447282 0x1a7590 [0x40]: PERF_RECORD_SAMPLE(IP, 0x4001): 107299/107299: 0xffffffffac4a5e11 period: 144 addr: 0 . data_src: 0x229080142 ... thread: perf:107299 ...... dso: /lib/modules/6.15.0-rc4+/build/vmlinux # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20250430205548.789750-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3761e7fe98d29107245f66650c984daa0722622a Author: Namhyung Kim Date: Wed Apr 30 11:03:21 2025 -0700 perf hist: Remove output field from sort-list properly When it removes an output format for cancelled children or latency, it should delete itself from the sort list as well. Otherwise assertion in fmt_free() will fire. $ perf report -H --stdio perf: ui/hist.c:603: fmt_free: Assertion `!(!list_empty(&fmt->sort_list))' failed. Aborted (core dumped) Also convert to perf_hpp__column_unregister() for the same open codes. Committer notes: Before this patch: # perf test hierarchy 83: perf report --hierarchy : FAILED! # perf test -v hierarchy --- start --- test child forked, pid 102242 perf report --hierarchy Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.025 MB /tmp/perf-test-report.HX0N85TlPq/perf-report-hierarchy-perf.data (6 samples) ] perf: ui/hist.c:603: fmt_free: Assertion `!(!list_empty(&fmt->sort_list))' failed. /home/acme/libexec/perf-core/tests/shell/perf-report-hierarchy.sh: line 34: 102250 Aborted (core dumped) perf report --hierarchy > /dev/null --- Cleaning up --- ---- end(-1) ---- 83: perf report --hierarchy : FAILED! # After: # perf test hierarchy 83: perf report --hierarchy : Ok # Fixes: dbd11b6bdab12f60 ("perf hist: Remove formats in hierarchy when cancel children") Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250430180321.736939-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bb5ae52e53aabf3b6c60ae240ba778f65c43bb62 Author: Arnaldo Carvalho de Melo Date: Fri May 2 12:48:28 2025 -0300 perf test perf-report-hierarchy: Add new test Super simple test to check that at least we're not segfaulting when trying to use 'perf report --hierarchy', more subtests should be added to make sure the output is the expected one. This is being merged right before a fix for that that this test detects: # perf test hierarchy 83: perf report --hierarchy : FAILED! # perf test -v hierarchy --- start --- test child forked, pid 102242 perf report --hierarchy Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.025 MB /tmp/perf-test-report.HX0N85TlPq/perf-report-hierarchy-perf.data (6 samples) ] perf: ui/hist.c:603: fmt_free: Assertion `!(!list_empty(&fmt->sort_list))' failed. /home/acme/libexec/perf-core/tests/shell/perf-report-hierarchy.sh: line 34: 102250 Aborted (core dumped) perf report --hierarchy > /dev/null --- Cleaning up --- ---- end(-1) ---- 83: perf report --hierarchy : FAILED! # Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Link: https://lore.kernel.org/lkml/20250430180321.736939-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4804f5ad5d63cf7ddad148132a3ecea11410dfa9 Author: Bagas Sanjaya Date: Fri May 2 09:33:57 2025 +0700 x86/cpu: Add "Old Microcode" docs to hw-vuln toctree Sphinx reports missing toctree entry warning: Documentation/admin-guide/hw-vuln/old_microcode.rst: WARNING: document isn't included in any toctree Add entry for "Old Microcode" docs to fix the warning. Fixes: 4e2c719782a847 ("x86/cpu: Help users notice when running old Intel microcode") Signed-off-by: Bagas Sanjaya Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250502023358.14846-1-bagasdotme%40gmail.com commit 3fae8959cda5d9d90ea1554385514d71e9103b02 Author: Jordan Rife Date: Fri May 2 09:15:22 2025 -0700 bpf: udp: Get rid of st_bucket_done Get rid of the st_bucket_done field to simplify UDP iterator state and logic. Before, st_bucket_done could be false if bpf_iter_udp_batch returned a partial batch; however, with the last patch ("bpf: udp: Make sure iter->batch always contains a full bucket snapshot"), st_bucket_done == true is equivalent to iter->cur_sk == iter->end_sk. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau commit 66d454e99d71857faf249486912e381ec83760b4 Author: Jordan Rife Date: Fri May 2 09:15:21 2025 -0700 bpf: udp: Make sure iter->batch always contains a full bucket snapshot Require that iter->batch always contains a full bucket snapshot. This invariant is important to avoid skipping or repeating sockets during iteration when combined with the next few patches. Before, there were two cases where a call to bpf_iter_udp_batch may only capture part of a bucket: 1. When bpf_iter_udp_realloc_batch() returns -ENOMEM [1]. 2. When more sockets are added to the bucket while calling bpf_iter_udp_realloc_batch(), making the updated batch size insufficient [2]. In cases where the batch size only covers part of a bucket, it is possible to forget which sockets were already visited, especially if we have to process a bucket in more than two batches. This forces us to choose between repeating or skipping sockets, so don't allow this: 1. Stop iteration and propagate -ENOMEM up to userspace if reallocation fails instead of continuing with a partial batch. 2. Try bpf_iter_udp_realloc_batch() with GFP_USER just as before, but if we still aren't able to capture the full bucket, call bpf_iter_udp_realloc_batch() again while holding the bucket lock to guarantee the bucket does not change. On the second attempt use GFP_NOWAIT since we hold onto the spin lock. Introduce the udp_portaddr_for_each_entry_from macro and use it instead of udp_portaddr_for_each_entry to make it possible to continue iteration from an arbitrary socket. This is required for this patch in the GFP_NOWAIT case to allow us to fill the rest of a batch starting from the middle of a bucket and the later patch which skips sockets that were already seen. Testing all scenarios directly is a bit difficult, but I did some manual testing to exercise the code paths where GFP_NOWAIT is used and where ERR_PTR(err) is returned. I used the realloc test case included later in this series to trigger a scenario where a realloc happens inside bpf_iter_udp_batch and made a small code tweak to force the first realloc attempt to allocate a too-small batch, thus requiring another attempt with GFP_NOWAIT. Some printks showed both reallocs with the tests passing: Apr 25 23:16:24 crow kernel: go again GFP_USER Apr 25 23:16:24 crow kernel: go again GFP_NOWAIT With this setup, I also forced each of the bpf_iter_udp_realloc_batch calls to return -ENOMEM to ensure that iteration ends and that the read() in userspace fails. [1]: https://lore.kernel.org/bpf/CABi4-ogUtMrH8-NVB6W8Xg_F_KDLq=yy-yu-tKr2udXE2Mu1Lg@mail.gmail.com/ [2]: https://lore.kernel.org/bpf/7ed28273-a716-4638-912d-f86f965e54bb@linux.dev/ Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau commit 3e485e15a169fb69c07c75d9f82843dd481215fc Author: Jordan Rife Date: Fri May 2 09:15:20 2025 -0700 bpf: udp: Make mem flags configurable through bpf_iter_udp_realloc_batch Prepare for the next patch which needs to be able to choose either GFP_USER or GFP_NOWAIT for calls to bpf_iter_udp_realloc_batch. Signed-off-by: Jordan Rife Signed-off-by: Martin KaFai Lau Reviewed-by: Kuniyuki Iwashima commit ed798ff1c52f6fe232ce2e24e68fb63f5470ab97 Author: Hans Zhang <18255117159@163.com> Date: Mon Apr 7 20:43:31 2025 +0800 PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled Previously, the debugfs directory was unconditionally created in tegra_pcie_config_rp() regardless of the CONFIG_PCIEASPM setting. This led to unnecessary directory creation when ASPM support was disabled since only ASPM state count was exposed through debugfs. Hence, move the debugfs directory creation into init_debugfs() which is conditionally compiled based on CONFIG_PCIEASPM. This ensures that both the directory and 'aspm_state_cnt' entry are only created when ASPM is enabled and avoids cluttering debugfs with empty directories when ASPM is disabled. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: subject and description change] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Christophe JAILLET Link: https://patch.msgid.link/20250407124331.69459-1-18255117159@163.com commit c6800f15998b05a2f412169456682e0dffba7232 Author: Yixun Lan Date: Wed Apr 30 13:32:07 2025 +0800 arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board On Avaota A1 board, the EMAC0 connect to an external RTL8211F-CG PHY, which features a 25MHz crystal, and using PH8 pin as PHY reset. Signed-off-by: Yixun Lan Link: https://patch.msgid.link/20250430-01-sun55i-emac0-v3-5-6fc000bbccbd@gentoo.org Signed-off-by: Chen-Yu Tsai commit acca163f3f5171b05438114e089e01bedcfeb6c6 Author: Yixun Lan Date: Wed Apr 30 13:32:06 2025 +0800 arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board On Radxa A5E board, the EMAC0 connect to external Maxio MAE0621A PHY, which features a 25MHz crystal, and using PH8 pin as PHY reset. Tested on A5E board with schematic V1.20. Tested-by: Corentin LABBE Signed-off-by: Yixun Lan Link: https://patch.msgid.link/20250430-01-sun55i-emac0-v3-4-6fc000bbccbd@gentoo.org Signed-off-by: Chen-Yu Tsai commit 56766ca6c4f6099de41bb51aba653217dae5df57 Author: Yixun Lan Date: Wed Apr 30 13:32:05 2025 +0800 arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Add EMAC0 ethernet MAC support which found on A523 variant SoCs, including the A527/T527 chips. MAC0 is compatible to the A64 chip which requires an external PHY. This patch only add RGMII pins for now. Reviewed-by: Andre Przywara Tested-by: Corentin LABBE Signed-off-by: Yixun Lan Link: https://patch.msgid.link/20250430-01-sun55i-emac0-v3-3-6fc000bbccbd@gentoo.org Signed-off-by: Chen-Yu Tsai commit 02f27ea7fa02c015cc831fa0f14bf3d58a516a6f Author: Yixun Lan Date: Wed Apr 30 13:32:03 2025 +0800 dt-bindings: sram: sunxi-sram: Add A523 compatible The Allwinner A523 family of SoCs have their "system control" registers compatible to the A64 SoC, so add the new SoC specific compatible string. Reviewed-by: Andre Przywara Signed-off-by: Yixun Lan Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250430-01-sun55i-emac0-v3-1-6fc000bbccbd@gentoo.org Signed-off-by: Chen-Yu Tsai commit 2006016ec6b3a18f2659704cb2f70ad3387f4a62 Author: Dimitri Fedrau Date: Mon Apr 7 13:21:52 2025 +0200 pwm: add support for NXPs high-side switch MC33XS2410 The MC33XS2410 is a four channel high-side switch. Featuring advanced monitoring and control function, the device is operational from 3.0 V to 60 V. The device is controlled by SPI port for configuration. Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20250407-mc33xs2410-v9-2-57adcb56a6e4@liebherr.com Signed-off-by: Uwe Kleine-König commit 8b872a912aa10327a88fdea46cc7b30cae0c9ed4 Author: Dimitri Fedrau Date: Mon Apr 7 13:21:51 2025 +0200 dt-bindings: pwm: add support for MC33XS2410 Adding documentation for NXPs MC33XS2410 high side switch. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20250407-mc33xs2410-v9-1-57adcb56a6e4@liebherr.com Signed-off-by: Uwe Kleine-König commit f55c9f087cc2e2252d44ffd9d58def2066fc176e Author: Judith Mendez Date: Tue Apr 29 12:30:08 2025 -0500 arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0 For am65x, add missing ITAPDLYSEL values for Default Speed and High Speed SDR modes to sdhci0 node according to the device datasheet [0]. [0] https://www.ti.com/lit/gpn/am6548 Fixes: eac99d38f861 ("arm64: dts: ti: k3-am654-main: Update otap-del-sel values") Cc: stable@vger.kernel.org Signed-off-by: Judith Mendez Reviewed-by: Moteen Shah Link: https://lore.kernel.org/r/20250429173009.33994-1-jm@ti.com Signed-off-by: Nishanth Menon commit 9c6b73fc72e19c449147233587833ce20f84b660 Author: Judith Mendez Date: Tue Apr 29 11:33:37 2025 -0500 arm64: dts: ti: k3-am62p-j722s-common-main: Set eMMC clock parent to default Set eMMC clock parents to the defaults which is MAIN_PLL0_HSDIV5_CLKOUT for eMMC. This change is necessary since DM is not implementing the correct procedure to switch PLL clock source for eMMC and MMC CLK mux is not glich-free. As a preventative action, lets switch back to the defaults. Fixes: b5080c7c1f7e ("arm64: dts: ti: k3-am62p: Add nodes for more IPs") Cc: stable@vger.kernel.org Signed-off-by: Judith Mendez Acked-by: Udit Kumar Acked-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250429163337.15634-4-jm@ti.com Signed-off-by: Nishanth Menon commit 6af731c5de59cc4e7cce193d446f1fe872ac711b Author: Judith Mendez Date: Tue Apr 29 11:33:36 2025 -0500 arm64: dts: ti: k3-am62a-main: Set eMMC clock parent to default Set eMMC clock parents to the defaults which is MAIN_PLL0_HSDIV5_CLKOUT for eMMC. This change is necessary since DM is not implementing the correct procedure to switch PLL clock source for eMMC and MMC CLK mux is not glich-free. As a preventative action, lets switch back to the defaults. Fixes: d3ae4e8d8b6a ("arm64: dts: ti: k3-am62a-main: Add sdhci0 instance") Cc: stable@vger.kernel.org Signed-off-by: Judith Mendez Acked-by: Udit Kumar Acked-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250429163337.15634-3-jm@ti.com Signed-off-by: Nishanth Menon commit 3a71cdfec94436079513d9adf4b1d4f7a7edd917 Author: Judith Mendez Date: Tue Apr 29 11:33:35 2025 -0500 arm64: dts: ti: k3-am62-main: Set eMMC clock parent to default Set eMMC clock parents to the defaults which is MAIN_PLL0_HSDIV5_CLKOUT for eMMC. This change is necessary since DM is not implementing the correct procedure to switch PLL clock source for eMMC and MMC CLK mux is not glich-free. As a preventative action, lets switch back to the defaults. Fixes: c37c58fdeb8a ("arm64: dts: ti: k3-am62: Add more peripheral nodes") Cc: stable@vger.kernel.org Signed-off-by: Judith Mendez Acked-by: Udit Kumar Acked-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250429163337.15634-2-jm@ti.com Signed-off-by: Nishanth Menon commit 8a62804248fff77749048a0f5511649b2569bba9 Author: Pavel Begunkov Date: Thu May 1 13:17:17 2025 +0100 io_uring/zcrx: split common area map/unmap parts Extract area type depedent parts of io_zcrx_[un]map_area from the generic path. It'll be helpful once there are more area memory types and not only user pages. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/50f6e893e2d20f937e628196cbf528d15f81c289.1746097431.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 782dfa329ac9d1b5ca7b6df56a7696bac58cb829 Author: Pavel Begunkov Date: Thu May 1 13:17:16 2025 +0100 io_uring/zcrx: split out memory holders from area In the data path users of struct io_zcrx_area don't need to know what kind of memory it's backed by. Only keep there generic bits in there and and split out memory type dependent fields into a new structure. It also logically separates the step that actually imports the memory, e.g. pinning user pages, from the generic area initialisation. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b60fc09c76921bf69e77eb17e07eb4decedb3bf4.1746097431.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6c9589aa08471f8984cdb5e743d2a2c048dc2403 Author: Pavel Begunkov Date: Thu May 1 13:17:15 2025 +0100 io_uring/zcrx: resolve netdev before area creation Some area types will require a valid struct device to be created, so resolve netdev and struct device before creating an area. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ac8c1482be22acfe9ca788d2c3ce31b7451ce488.1746097431.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d760d3f59f0d8d0df2895db30d36cf23106d6b05 Author: Pavel Begunkov Date: Thu May 1 13:17:14 2025 +0100 io_uring/zcrx: improve area validation dmabuf backed area will be taking an offset instead of addresses, and io_buffer_validate() is not flexible enough to facilitate it. It also takes an iovec, which may truncate the u64 length zcrx takes. Add a new helper function for validation. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0b3b735391a0a8f8971bf0121c19765131fddd3b.1746097431.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 00ef5c728ec05af5f8591016a9d138eab6b6f8e9 Author: Christoph Hellwig Date: Thu Apr 24 10:27:52 2025 +0200 block: use writeback_iter Use writeback_iter instead of the deprecated write_cache_pages wrapper in blkdev_writepages. This removes an indirect call per folio. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Link: https://lore.kernel.org/r/20250424082752.1967679-1-hch@lst.de Signed-off-by: Jens Axboe commit 64d1dc522b349a257256f636feb335441cca2571 Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:34 2025 -0600 ublk: store request pointer in ublk_io A ublk_io is converted to a request in several places in the I/O path by using blk_mq_tag_to_rq() to look up the (qid, tag) on the ublk device's tagset. This involves a bunch of dereferences and a tag bounds check. To make this conversion cheaper, store the request pointer in ublk_io. Overlap this storage with the io_uring_cmd pointer. This is safe because the io_uring_cmd pointer is only valid if UBLK_IO_FLAG_ACTIVE is set on the ublk_io, the request pointer is valid if UBLK_IO_FLAG_OWNED_BY_SRV, and these flags are mutually exclusive. Suggested-by: Ming Lei Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-10-csander@purestorage.com Signed-off-by: Jens Axboe commit 8ed95b54701a8e946b86ffdeeac8603316e0a59d Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:33 2025 -0600 ublk: check UBLK_IO_FLAG_OWNED_BY_SRV in ublk_abort_queue() ublk_abort_queue() currently checks whether the UBLK_IO_FLAG_ACTIVE flag is cleared to tell whether to abort each ublk_io in the queue. But it's possible for a ublk_io to not be ACTIVE but also not have a request in flight, such as when no fetch request has yet been submitted for a tag or when a fetch request is cancelled. So ublk_abort_queue() must additionally check for an inflight request. Simplify this code by checking for UBLK_IO_FLAG_OWNED_BY_SRV instead, which indicates precisely whether a request is currently inflight. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-9-csander@purestorage.com Signed-off-by: Jens Axboe commit 9810362a57cb633d808cdfd51e8cae21243f0660 Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:32 2025 -0600 ublk: don't call ublk_dispatch_req() for NEED_GET_DATA ublk_dispatch_req() currently handles 3 different cases: incoming ublk requests that don't need to wait for a data buffer, incoming requests that do need to wait for a buffer, and resuming those requests once the buffer is provided. But the call site that provides a data buffer (UBLK_IO_NEED_GET_DATA) is separate from those for incoming requests. So simplify the function by splitting the UBLK_IO_NEED_GET_DATA case into its own function ublk_get_data(). This avoids several redundant checks in the UBLK_IO_NEED_GET_DATA case, and streamlines the incoming request cases. Don't call ublk_fill_io_cmd() for UBLK_IO_NEED_GET_DATA, as it's no longer necessary to set io->cmd or the UBLK_IO_FLAG_ACTIVE flag for ublk_dispatch_req(). Since UBLK_IO_NEED_GET_DATA no longer relies on ublk_dispatch_req() calling io_uring_cmd_done(), return the UBLK_IO_RES_OK status directly from the ->uring_cmd() handler. If ublk_start_io() fails, don't complete the UBLK_IO_NEED_GET_DATA command, matching the existing behavior. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-8-csander@purestorage.com Signed-off-by: Jens Axboe commit 2fcb88bdf2e62a6aae211c8603341fd2e7b16a69 Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:31 2025 -0600 ublk: factor out ublk_start_io() helper In preparation for calling it from outside ublk_dispatch_req(), factor out the code responsible for setting up an incoming ublk I/O request. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-7-csander@purestorage.com Signed-off-by: Jens Axboe commit 551270690dd6c751a6d62f272cf068bfef9a1729 Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:30 2025 -0600 ublk: don't log uring_cmd cmd_op in ublk_dispatch_req() cmd_op is either UBLK_U_IO_FETCH_REQ, UBLK_U_IO_COMMIT_AND_FETCH_REQ, or UBLK_U_IO_NEED_GET_DATA. Which one isn't particularly interesting and is already recorded by the log line in __ublk_ch_uring_cmd(). Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-6-csander@purestorage.com Signed-off-by: Jens Axboe commit 2a86eec6396ff6d40e46d5cc11f99f1e7bbec78e Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:29 2025 -0600 ublk: take const ubq pointer in ublk_get_iod() ublk_get_iod() doesn't modify the struct ublk_queue it is passed. Clarify that by making the argument a const pointer. Move the function definition earlier in the file so it doesn't need a forward declaration. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-5-csander@purestorage.com Signed-off-by: Jens Axboe commit 5a43d93588dca88af0333ce18dedcfb0276ec4fe Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:28 2025 -0600 ublk: remove misleading "ubq" in "ubq_complete_io_cmd()" ubq_complete_io_cmd() doesn't interact with a ublk queue, so "ubq" in the name is confusing. Most likely "ubq" was meant to be "ublk". Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-4-csander@purestorage.com Signed-off-by: Jens Axboe commit 80c0789a7ddc89adb726e407ca22d9689608b710 Author: Caleb Sander Mateos Date: Wed Apr 30 16:52:27 2025 -0600 ublk: fix "immepdately" typo in comment Looks like "immediately" was intended. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250430225234.2676781-3-csander@purestorage.com Signed-off-by: Jens Axboe commit 0cb39afd2a4d438b16d743952eb68c683c663a1e Author: Uday Shankar Date: Wed Apr 30 16:52:26 2025 -0600 ublk: factor out ublk_commit_and_fetch Move the logic for the UBLK_IO_COMMIT_AND_FETCH_REQ opcode into its own function. This also allows us to mark ublk_queue pointers as const for that operation, which can help prevent data races since we may allow concurrent operation on one ublk_queue in the future. Also open code ublk_commit_completion in ublk_commit_and_fetch to reduce the number of parameters/avoid a redundant lookup. [Restore __ublk_ch_uring_cmd() req variable used in commit d6aa0c178bf8 ("ublk: call ublk_dispatch_req() for handling UBLK_U_IO_NEED_GET_DATA")] Suggested-by: Ming Lei Signed-off-by: Uday Shankar Reviewed-by: Caleb Sander Mateos Reviewed-by: Ming Lei Signed-off-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250430225234.2676781-2-csander@purestorage.com Signed-off-by: Jens Axboe commit 9712c57ec1117d6b5fe1cc8ad420049171140b26 Author: Caleb Sander Mateos Date: Fri Apr 25 19:17:28 2025 -0600 block: avoid hctx spinlock for plug with multiple queues blk_mq_flush_plug_list() has a fast path if all requests in the plug are destined for the same request_queue. It calls ->queue_rqs() with the whole batch of requests, falling back on ->queue_rq() for any requests not handled by ->queue_rqs(). However, if the requests are destined for multiple queues, blk_mq_flush_plug_list() has a slow path that calls blk_mq_dispatch_list() repeatedly to filter the requests by ctx/hctx. Each queue's requests are inserted into the hctx's dispatch list under a spinlock, then __blk_mq_sched_dispatch_requests() takes them out of the dispatch list (taking the spinlock again), and finally blk_mq_dispatch_rq_list() calls ->queue_rq() on each request. Acquiring the hctx spinlock twice and calling ->queue_rq() instead of ->queue_rqs() makes the slow path significantly more expensive. Thus, batching more requests into a single plug (e.g. io_uring_enter syscall) can counterintuitively hurt performance by causing the plug to span multiple queues. We have observed 2-3% of CPU time spent acquiring the hctx spinlock alone on workloads issuing requests to multiple NVMe devices in the same io_uring SQE batches. Add a medium path in blk_mq_flush_plug_list() for plugs that don't have elevators or come from a schedule, but do span multiple queues. Filter the requests by queue and call ->queue_rqs()/->queue_rq() on the list of requests destined to each request_queue. With this change, we no longer see any CPU time spent in _raw_spin_lock from blk_mq_flush_plug_list and throughput increases accordingly. Signed-off-by: Caleb Sander Mateos Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250426011728.4189119-4-csander@purestorage.com [axboe: fix whitespace damage] Signed-off-by: Jens Axboe commit a5728a1d1ef2d927c67e73fda94946c2c15106df Author: Caleb Sander Mateos Date: Fri Apr 25 19:17:27 2025 -0600 block: factor out blk_mq_dispatch_queue_requests() helper Factor out the logic from blk_mq_flush_plug_list() that calls ->queue_rqs() with a fallback to ->queue_rq() into a helper function blk_mq_dispatch_queue_requests(). This is in preparation for using this code with other lists of requests. Signed-off-by: Caleb Sander Mateos Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250426011728.4189119-3-csander@purestorage.com Signed-off-by: Jens Axboe commit 0aeb7ebfc7e3d4bef3542aadd33505452d2f9b82 Author: Caleb Sander Mateos Date: Fri Apr 25 19:17:26 2025 -0600 block: take rq_list instead of plug in dispatch functions blk_mq_plug_issue_direct(), __blk_mq_flush_plug_list(), and blk_mq_dispatch_plug_list() take a struct blk_plug * but only use its mq_list. Pass the struct rq_list * instead in preparation for calling them with other lists of requests. Drop "plug" from the function names as they are no longer plug-specific. Signed-off-by: Caleb Sander Mateos Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250426011728.4189119-2-csander@purestorage.com Signed-off-by: Jens Axboe commit 20d5620e9b290aba2fa891b2ef2d4a695fdb2f57 Author: Dan Carpenter Date: Wed Apr 23 11:21:18 2025 +0300 i2c: atr: Fix end of loop test in i2c_atr_find_mapping_by_addr() When the list_for_each_entry_reverse() exits without hitting a break then the list cursor points to invalid memory. So this check for if (c2a->fixed) is checking bogus memory. Fix it by using a "found" variable to track if we found what we were looking for or not. The list head (i2c_atr_chan.alias_pairs) is not a full entry, it's just a struct list_head. When the for loop runs to completion, c2a doesn't point to a struct i2c_atr_alias_pair, so you can't access c2a->fixed. Fixes: c3f55241882b ("i2c: Support dynamic address translation") Signed-off-by: Dan Carpenter Reviewed-by: Tomi Valkeinen Reviewed-by: Romain Gantois Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 08e2a660b1601963ced37ac8e8d8c134a97f167e Author: Alexander Sverdlin Date: Mon Mar 31 17:22:20 2025 +0200 counter: interrupt-cnt: Convert atomic_t -> atomic_long_t Convert the internal counter type to atomic_long_t, which: - doesn't change much for existing in-tree users as they are 32-bit anyway (stm32/i.MX6) - doesn't introduce performace penalty on 32-bit platforms - provides 64-bit resolution on 64-bit platforms with virtually no preformance penalty Signed-off-by: Alexander Sverdlin Acked-by: Oleksij Rempel Link: https://lore.kernel.org/r/20250331152222.2263776-1-alexander.sverdlin@siemens.com Signed-off-by: William Breathitt Gray commit 441870bb81b22d4a3937caeb4b890a94b40c689d Author: Francesco Dolcini Date: Wed Apr 30 12:28:15 2025 +0200 arm64: dts: ti: am62p-verdin: Add ivy Add support for Verdin AM62P mated with Verdin Ivy carrier board. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Link: https://www.toradex.com/products/carrier-board/ivy-carrier-board Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250430102815.149162-7-francesco@dolcini.it Signed-off-by: Nishanth Menon commit b0a01514cd906bb90eb2c7589a69429bced7ba1d Author: Francesco Dolcini Date: Wed Apr 30 12:28:14 2025 +0200 arm64: dts: ti: am62p-verdin: Add yavia Add support for Verdin AM62P mated with Verdin Yavia carrier board. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Link: https://www.toradex.com/products/carrier-board/yavia Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250430102815.149162-6-francesco@dolcini.it Signed-off-by: Nishanth Menon commit cfdd38cfeb87d2a69303f3cf1bbc57d404826b28 Author: Francesco Dolcini Date: Wed Apr 30 12:28:13 2025 +0200 arm64: dts: ti: am62p-verdin: Add mallow Add support for Verdin AM62P mated with Verdin Mallow carrier board. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Link: https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250430102815.149162-5-francesco@dolcini.it Signed-off-by: Nishanth Menon commit c98ac03937e24913f90efe16832bac6c22ada76f Author: Francesco Dolcini Date: Wed Apr 30 12:28:12 2025 +0200 arm64: dts: ti: am62p-verdin: Add dahlia Add support for Verdin AM62P mated with Verdin Dahlia carrier board. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Link: https://www.toradex.com/products/carrier-board/dahlia-carrier-board-kit Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250430102815.149162-4-francesco@dolcini.it Signed-off-by: Nishanth Menon commit 87f95ea316ac68598544d512a3750cd4a73b5683 Author: Francesco Dolcini Date: Wed Apr 30 12:28:11 2025 +0200 arm64: dts: ti: Add Toradex Verdin AM62P Add support for Toradex Verdin AM62P computer on module which can be used on different carrier boards and for the Toradex Verdin Development Board carrier board. The module consists of an TI AM62P family SoC, a TPS65219 PMIC, a Gigabit Ethernet PHY, up to 8GB of LPDDR4 RAM, an eMMC, a TLA2024 ADC, an I2C EEPROM, an RX8130 RTC, plus an optional Bluetooth/Wi-Fi module. Anything that is not self-contained on the module is disabled by default. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Link: https://www.toradex.com/products/carrier-board/verdin-development-board-kit Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250430102815.149162-3-francesco@dolcini.it Signed-off-by: Nishanth Menon commit cd156f8741e362f3e0b0282c4abc3d0d0fecda57 Author: Francesco Dolcini Date: Wed Apr 30 12:28:10 2025 +0200 dt-bindings: arm: ti: Add Toradex Verdin AM62P Add toradex,verdin-am62p for Toradex Verdin AM62 SoM, its nonwifi and wifi variants, and the Toradex carrier board they may be mated in. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62p Signed-off-by: Francesco Dolcini Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250430102815.149162-2-francesco@dolcini.it Signed-off-by: Nishanth Menon commit e3dfcf482d0787a5882f10a33daa4c1ec62b87d2 Author: Siddharth Vadapalli Date: Tue Apr 22 18:02:18 2025 +0530 arm64: dts: ti: k3-j784s4-j742s2-evm-common: Enable ACSPCIE0 output for PCIe1 The PCIe reference clock required by the PCIe Endpoints connected to the PCIe connector corresponding to the PCIe1 instance of PCIe on J784S4-EVM and J742S2-EVM is driven by the ACSPCIE0 module. Add the device-tree support for enabling the same. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422123218.3788223-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 9bfebd8750a06f5f8bf16ac58eb7deb638686d07 Author: Siddharth Vadapalli Date: Tue Apr 22 18:02:17 2025 +0530 arm64: dts: ti: k3-j784s4-j742s2-main-common: Add ACSPCIE0 node The ACSPCIE0 module on TI's J784S4 SoC is capable of driving the reference clock required by the PCIe Endpoint device. It is an alternative to on-board and external reference clock generators. Add the device-tree node for the same. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422123218.3788223-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit b1f9ec6545c6423e106f0aeddc3b8651b5ad116c Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:42 2025 +0530 arm64: dts: ti: k3-j784s4-j742s2-main-common: Switch to 64-bit address space for PCIe0 and PCIe1 The PCIe0 and PCIe1 instances of PCIe in J742S2 and J784S4 SoCs support: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-8-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 0fde00328cf8245bf498349a696ba22d6a4a1916 Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:41 2025 +0530 arm64: dts: ti: k3-j722s-main: Switch to 64-bit address space for PCIe0 The PCIe0 instance of PCIe in J722S SoC supports: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-7-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 5a765365c689b90ea81f651a43bc30cd9c9c4ed8 Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:40 2025 +0530 arm64: dts: ti: k3-j721s2-main: Switch to 64-bit address space for PCIe1 The PCIe1 instance of PCIe in J721S2 SoC supports: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-6-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit f0f78192d3b3b3c3c935de0d681e7bf2117bbb13 Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:39 2025 +0530 arm64: dts: ti: k3-j721e-main: Switch to 64-bit address space for PCIe0 and PCIe1 The PCIe0 and PCIe1 instances of PCIe in J721E SoC support: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-5-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 1025003a1e068a25b35e1dbb39cad18e23278c0f Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:38 2025 +0530 arm64: dts: ti: k3-j721e: Add ranges for PCIe0 DAT1 and PCIe1 DAT1 The PCIe0 DAT1 and PCIe1 DAT1 are 4 GB address regions in the 64-bit address space of the respective PCIe Controllers. Hence, update the ranges to include them. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-4-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 46e3d7d7048872ffb90aa25e360b975dc1c3e28b Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:37 2025 +0530 arm64: dts: ti: k3-j7200-main: Switch to 64-bit address space for PCIe1 The PCIe0 instance of PCIe in J7200 SoC supports: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 1159f911435b9371575d9956bb5aef579265d29a Author: Siddharth Vadapalli Date: Tue Apr 22 17:30:36 2025 +0530 arm64: dts: ti: k3-am64-main: Switch to 64-bit address space for PCIe0 The PCIe0 instance of PCIe in AM64 SoC supports: 1. 128 MB address region in the 32-bit address space 2. 4 GB address region in the 64-bit address space The default configuration is that of a 128 MB address region in the 32-bit address space. While this might be sufficient for most use-cases, it is insufficient for supporting use-cases which require larger address spaces. Therefore, switch to using the 64-bit address space with a 4 GB address region. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250422120042.3746004-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 42cfb00c919e5951ba5c4067a058c7e2cf2ccbc0 Author: Nishanth Menon Date: Mon Apr 21 09:39:26 2025 -0500 arm64: defconfig: Enable TPIC2810 GPIO expander AM642-SK uses TPIC2810 I2C GPIO expander for LEDs. Link: https://lore.kernel.org/r/20250421143926.2009535-1-nm@ti.com Signed-off-by: Nishanth Menon commit ef839ba8142f14513ba396a033110526b7008096 Author: Judith Mendez Date: Tue Apr 29 10:14:54 2025 -0500 arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC Remove disable-wp flag for eMMC nodes since this flag is only applicable to SD according to the binding doc (mmc/mmc-controller-common.yaml). For eMMC, this flag should be ignored but lets remove anyways to cleanup sdhci nodes. Signed-off-by: Judith Mendez Reviewed-by: Moteen Shah Link: https://lore.kernel.org/r/20250429151454.4160506-4-jm@ti.com Signed-off-by: Nishanth Menon commit d16e7d34352c4107a81888e9aab4ea4748076e70 Author: Judith Mendez Date: Tue Apr 29 10:14:53 2025 -0500 arm64: dts: ti: k3-am62*: Add non-removable flag for eMMC EMMC device is non-removable so add 'non-removable' DT property to avoid having to redetect the eMMC after suspend/resume. Signed-off-by: Judith Mendez Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250429151454.4160506-3-jm@ti.com Signed-off-by: Nishanth Menon commit db3cd905b8c8cd40f15a34e30a225704bb8a2fcb Author: Judith Mendez Date: Tue Apr 29 10:14:52 2025 -0500 arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot The bootph-all flag was introduced in dt-schema (dtschema/schemas/bootph.yaml) to define node usage across different boot phases. For eMMC and SD boot modes, voltage regulator nodes, io-expander nodes, gpio nodes, and MMC nodes need to be present in all boot stages, so add missing bootph-all phase flag to these nodes to support SD boot and eMMC boot. Signed-off-by: Judith Mendez Reviewed-by: Moteen Shah Link: https://lore.kernel.org/r/20250429151454.4160506-2-jm@ti.com Signed-off-by: Nishanth Menon commit 4dd6566b5a8ca1e8c9ff2652c2249715d6c64217 Merge: e1b477c21300a9 b5325b2a270fca Author: Christian Brauner Date: Mon Apr 14 16:41:42 2025 +0200 Merge patch series "coredump: hand a pidfd to the usermode coredump helper" Christian Brauner says: Give userspace a way to instruct the kernel to install a pidfd for the crashing process into the process started as a usermode helper. There's still tricky race-windows that cannot be easily or sometimes not closed at all by userspace. There's various ways like looking at the start time of a process to make sure that the usermode helper process is started after the crashing process but it's all very very brittle and fraught with peril. The crashed-but-not-reaped process can be killed by userspace before coredump processing programs like systemd-coredump have had time to manually open a PIDFD from the PID the kernel provides them, which means they can be tricked into reading from an arbitrary process, and they run with full privileges as they are usermode helper processes. Even if that specific race-window wouldn't exist it's still the safest and cleanest way to let the kernel provide the pidfd directly instead of requiring userspace to do it manually. In parallel with this commit we already have systemd adding support for this in [1]. When the usermode helper process is forked we install a pidfd file descriptor three into the usermode helper's file descriptor table so it's available to the exec'd program. Since usermode helpers are either children of the system_unbound_wq workqueue or kthreadd we know that the file descriptor table is empty and can thus always use three as the file descriptor number. Note, that we'll install a pidfd for the thread-group leader even if a subthread is calling do_coredump(). We know that task linkage hasn't been removed yet and even if this @current isn't the actual thread-group leader we know that the thread-group leader cannot be reaped until @current has exited. [1]: https://github.com/systemd/systemd/pull/37125 * patches from https://lore.kernel.org/20250414-work-coredump-v2-0-685bf231f828@kernel.org: coredump: hand a pidfd to the usermode coredump helper coredump: fix error handling for replace_fd() pidfs: move O_RDWR into pidfs_alloc_file() Link: https://lore.kernel.org/20250414-work-coredump-v2-0-685bf231f828@kernel.org Signed-off-by: Christian Brauner commit b5325b2a270fcaf7b2a9a0f23d422ca8a5a8bdea Author: Christian Brauner Date: Mon Apr 14 15:55:07 2025 +0200 coredump: hand a pidfd to the usermode coredump helper Give userspace a way to instruct the kernel to install a pidfd into the usermode helper process. This makes coredump handling a lot more reliable for userspace. In parallel with this commit we already have systemd adding support for this in [1]. We create a pidfs file for the coredumping process when we process the corename pattern. When the usermode helper process is forked we then install the pidfs file as file descriptor three into the usermode helpers file descriptor table so it's available to the exec'd program. Since usermode helpers are either children of the system_unbound_wq workqueue or kthreadd we know that the file descriptor table is empty and can thus always use three as the file descriptor number. Note, that we'll install a pidfd for the thread-group leader even if a subthread is calling do_coredump(). We know that task linkage hasn't been removed due to delay_group_leader() and even if this @current isn't the actual thread-group leader we know that the thread-group leader cannot be reaped until @current has exited. Link: https://github.com/systemd/systemd/pull/37125 [1] Link: https://lore.kernel.org/20250414-work-coredump-v2-3-685bf231f828@kernel.org Tested-by: Luca Boccassi Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 95c5f43181fe9c1b5e5a4bd3281c857a5259991f Author: Christian Brauner Date: Mon Apr 14 15:55:06 2025 +0200 coredump: fix error handling for replace_fd() The replace_fd() helper returns the file descriptor number on success and a negative error code on failure. The current error handling in umh_pipe_setup() only works because the file descriptor that is replaced is zero but that's pretty volatile. Explicitly check for a negative error code. Link: https://lore.kernel.org/20250414-work-coredump-v2-2-685bf231f828@kernel.org Tested-by: Luca Boccassi Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit c57f07b235871c9e5bffaccd458dca2d9a62b164 Author: Christian Brauner Date: Mon Apr 14 15:55:05 2025 +0200 pidfs: move O_RDWR into pidfs_alloc_file() Since all pidfds must be O_RDWR currently enfore that directly in the file allocation function itself instead of letting callers specify it. Link: https://lore.kernel.org/20250414-work-coredump-v2-1-685bf231f828@kernel.org Tested-by: Luca Boccassi Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit e1b477c21300a928a7765a03cb96ca36c4dcf5ed Merge: 923ea4d4482be9 c6e888d02d51d1 Author: Christian Brauner Date: Mon Apr 14 13:08:02 2025 +0200 Merge patch series "selftests: coredump: Some bug fixes" Nam Cao says: While trying the coredump test on qemu-system-riscv64, I observed test failures for various reasons. This series makes the test works on qemu-system-riscv64. * patches from https://lore.kernel.org/cover.1744383419.git.namcao@linutronix.de: selftests: coredump: Raise timeout to 2 minutes selftests: coredump: Fix test failure for slow machines selftests: coredump: Properly initialize pointer Link: https://lore.kernel.org/cover.1744383419.git.namcao@linutronix.de Signed-off-by: Christian Brauner commit c6e888d02d51d1e9f9abf1587e6a5618375cac9f Author: Nam Cao Date: Fri Apr 11 17:09:43 2025 +0200 selftests: coredump: Raise timeout to 2 minutes The test's runtime (nearly 20s) is dangerously close to the limit (30s) on qemu-system-riscv64: $ time ./stackdump_test > /dev/null real 0m19.210s user 0m0.077s sys 0m0.359s There could be machines slower than qemu-system-riscv64. Therefore raise the test timeout to 2 minutes to be safe. Fixes: 15858da53542 ("selftests: coredump: Add stackdump test") Signed-off-by: Nam Cao Link: https://lore.kernel.org/dd636084d55e7828782728d087fa2298dcab1c8b.1744383419.git.namcao@linutronix.de Signed-off-by: Christian Brauner commit 6f5bf9f37f06668ead446e2997f2b431db8963ce Author: Nam Cao Date: Fri Apr 11 17:09:42 2025 +0200 selftests: coredump: Fix test failure for slow machines The test waits for coredump to finish by busy-waiting for the stack_values file to be created. The maximum wait time is 10 seconds. This doesn't work for slow machine (qemu-system-riscv64), because coredump takes longer. Fix it by waiting for the crashing child process to finish first. Fixes: 15858da53542 ("selftests: coredump: Add stackdump test") Signed-off-by: Nam Cao Link: https://lore.kernel.org/ee657f3fc8e19657cf7aaa366552d6347728f371.1744383419.git.namcao@linutronix.de Signed-off-by: Christian Brauner commit e194d2067c958827810a7a7282dff8773633ad8c Author: Nam Cao Date: Fri Apr 11 17:09:41 2025 +0200 selftests: coredump: Properly initialize pointer The buffer pointer "line" is not initialized. This pointer is passed to getline(). It can still work if the stack is zero-initialized, because getline() can work with a NULL pointer as buffer. But this is obviously broken. This bug shows up while running the test on a riscv64 machine. Fix it by properly initializing the pointer. Fixes: 15858da53542 ("selftests: coredump: Add stackdump test") Signed-off-by: Nam Cao Link: https://lore.kernel.org/4fb9b6fb3e0040481bacc258c44b4aab5c4df35d.1744383419.git.namcao@linutronix.de Signed-off-by: Christian Brauner commit 675008f196ca5c8d8413204e861cc2a2238581aa Author: Jocelyn Falempe Date: Fri Apr 18 18:48:16 2025 +0200 drm/panic: Use a decimal fifo to avoid u64 by u64 divide On 32bits ARM, u64/u64 is not supported [1], so change the algorithm to use a simple fifo with decimal digits as u8 instead. This is slower but should compile on all architecture. Link: https://lore.kernel.org/dri-devel/CANiq72ke45eOwckMhWHvmwxc03dxr4rnxxKvx+HvWdBLopZfrQ@mail.gmail.com/ [1] Reported-by: Miguel Ojeda Closes: https://lore.kernel.org/dri-devel/CANiq72ke45eOwckMhWHvmwxc03dxr4rnxxKvx+HvWdBLopZfrQ@mail.gmail.com/ Fixes: ccb8ce526807 ("ARM: 9441/1: rust: Enable Rust support for ARMv7") Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250418165059.560503-1-jfalempe@redhat.com Acked-by: Javier Martinez Canillas commit cb9d6b2c2a605f7ee54d18f126d772b4280ee83a Merge: 630cb33ccfcd04 777c8029b551ca Author: Paolo Abeni Date: Fri May 2 12:41:05 2025 +0200 Merge branch 'tools-ynl-gen-additional-c-types-and-classic-netlink-handling' Jakub Kicinski says: ==================== tools: ynl-gen: additional C types and classic netlink handling This series is a bit of a random grab bag adding things we need to generate code for rt-link. First two patches are pretty random code cleanups. Patch 3 adds default values if the spec is missing them. Patch 4 adds support for setting Netlink request flags (NLM_F_CREATE, NLM_F_REPLACE etc.). Classic netlink uses those quite a bit. Patches 5 and 6 extend the notification handling for variations used in classic netlink. Patch 6 adds support for when notification ID is the same as the ID of the response message to GET. Next 4 patches add support for handling a couple of complex types. These are supported by the schema and Python but C code gen wasn't there. Patch 11 is a bit of a hack, it skips code related to kernel policy generation, since we don't need it for classic netlink. Patch 12 adds support for having different fixed headers per op. Something we could avoid in previous rtnetlink specs but some specs do mix. v2: https://lore.kernel.org/20250425024311.1589323-1-kuba@kernel.org v1: https://lore.kernel.org/20250424021207.1167791-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250429154704.2613851-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 777c8029b551caafde89e0440c40127b8b5ba70e Author: Jakub Kicinski Date: Tue Apr 29 08:47:04 2025 -0700 tools: ynl: allow fixed-header to be specified per op rtnetlink has variety of ops with different fixed headers. Detect that op fixed header is not the same as family one, and use sizeof() directly. For reverse parsing we need to pass the fixed header len along the policy (in the socket state). Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-13-kuba@kernel.org Signed-off-by: Paolo Abeni commit 18d574c8dd3e075afb546408fae7edd6a14c9873 Author: Jakub Kicinski Date: Tue Apr 29 08:47:03 2025 -0700 tools: ynl-gen: don't init enum checks for classic netlink rt-link has a vlan-protocols enum with: name: 8021q value: 33024 name: 8021ad value: 34984 It's nice to have, since it converts the values to strings in Python. For C, however, the codegen is trying to use enums to generate strict policy checks. Parsing such sparse enums is not possible via policies. Since for classic netlink we don't support kernel codegen and policy generation - skip the auto-generation of checks from enums. Reviewed-by: Donald Hunter Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-12-kuba@kernel.org Signed-off-by: Paolo Abeni commit 5f7804dd8326d9ffb25553481c33ceaaedb4eb6b Author: Jakub Kicinski Date: Tue Apr 29 08:47:02 2025 -0700 tools: ynl-gen: array-nest: support binary array with exact-len IPv6 addresses are expressed as binary arrays since we don't have u128. Since they are not variable length, however, they are relatively easy to represent as an array of known size. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-11-kuba@kernel.org Signed-off-by: Paolo Abeni commit 18b1886447d619fcd7515dcbda55b1903560e266 Author: Jakub Kicinski Date: Tue Apr 29 08:47:01 2025 -0700 tools: ynl-gen: array-nest: support put for scalar C codegen supports ArrayNest AKA indexed-array carrying scalars, but only for the netlink -> struct parsing. Support rendering from struct to netlink. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-10-kuba@kernel.org Signed-off-by: Paolo Abeni commit 3456084d6361f4c835b73a0bce04fa5894bf9c65 Author: Jakub Kicinski Date: Tue Apr 29 08:47:00 2025 -0700 tools: ynl-gen: mutli-attr: support binary types with struct Binary types with struct are fixed size, relatively easy to handle for multi attr. Declare the member as a pointer. Count the members, allocate an array, copy in the data. Allow the netlink attr to be smaller or larger than our view of the struct in case the build headers are newer or older than the running kernel. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-9-kuba@kernel.org Signed-off-by: Paolo Abeni commit 0ea8cf56cc20ed51cfbef7c6410874ac7fd07642 Author: Jakub Kicinski Date: Tue Apr 29 08:46:59 2025 -0700 tools: ynl-gen: multi-attr: type gen for string Add support for multi attr strings (needed for link alt_names). We record the length individual strings in a len member, to do the same for multi-attr create a struct ynl_string in ynl.h and use it as a layer holding both the string and its length. Since strings may be arbitrary length dynamically allocate each individual one. Adjust arg_member and struct member to avoid spacing the double pointers to get "type **name;" rather than "type * *name;" Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-8-kuba@kernel.org Signed-off-by: Paolo Abeni commit 49398830a4aa650c00b402477042c90db7d6214c Author: Jakub Kicinski Date: Tue Apr 29 08:46:58 2025 -0700 tools: ynl-gen: support CRUD-like notifications for classic Netlink Allow CRUD-style notification where the notification is more like the response to the request, which can optionally be looped back onto the requesting socket. Since the notification and request are different ops in the spec, for example: - name: delrule doc: Remove an existing FIB rule attribute-set: fib-rule-attrs do: request: value: 33 attributes: *fib-rule-all - name: delrule-ntf doc: Notify a rule deletion value: 33 notify: getrule We need to find the request by ID. Ideally we'd detect this model from the spec properties, rather than assume that its what all classic netlink families do. But maybe that'd cause this model to spread and its easy to get wrong. For now assume CRUD == classic. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-7-kuba@kernel.org Signed-off-by: Paolo Abeni commit bbfb3c557c66899480c679b7958908722b821ac3 Author: Jakub Kicinski Date: Tue Apr 29 08:46:57 2025 -0700 tools: ynl-gen: support using dump types for ntf Classic Netlink has GET callbacks with no doit support, just dumps. Support using their responses in notifications. If notification points at a type which only has a dump - use the dump's type. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-6-kuba@kernel.org Signed-off-by: Paolo Abeni commit fe7d57e040f7d189e3bd030f311bb2011a0cc35a Author: Jakub Kicinski Date: Tue Apr 29 08:46:56 2025 -0700 tools: ynl: let classic netlink requests specify extra nlflags Classic netlink makes extensive use of flags. Support specifying them the same way as attributes are specified (using a helper), for example: rt_link_newlink_req_set_nlflags(req, NLM_F_CREATE | NLM_F_ECHO); Wrap the code up in a RenderInfo predicate. I think that some genetlink families may want this, too. It should be easy to add a spec property later. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-5-kuba@kernel.org Signed-off-by: Paolo Abeni commit d12a7be02524a6f4d8d5d57920001ea63a93f28d Author: Jakub Kicinski Date: Tue Apr 29 08:46:55 2025 -0700 tools: ynl-gen: fill in missing empty attr lists The C codegen refers to op attribute lists all over the place, without checking if they are present, even tho attribute list is technically an optional property. Add them automatically at init if missing so that we don't have to make specs longer. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-4-kuba@kernel.org Signed-off-by: Paolo Abeni commit 2286905f1b33cafa25e508f20bfceb47e20e85d8 Author: Jakub Kicinski Date: Tue Apr 29 08:46:54 2025 -0700 tools: ynl-gen: factor out free_needs_iter for a struct Instead of walking the entries in the code gen add a method for the struct class to return if any of the members need an iterator. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-3-kuba@kernel.org Signed-off-by: Paolo Abeni commit a6471da7745aa16b1534848877ce73739668992b Author: Jakub Kicinski Date: Tue Apr 29 08:46:53 2025 -0700 tools: ynl-gen: fix comment about nested struct dict The dict stores struct objects (of class Struct), not just a trivial set with directions. Reviewed-by: Donald Hunter Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250429154704.2613851-2-kuba@kernel.org Signed-off-by: Paolo Abeni commit f80fa80a4e364f5d05ad02d095f7e6910c77817e Author: Ulf Hansson Date: Thu Apr 17 16:25:01 2025 +0200 pmdomain: core: Use genpd->opp_table to simplify error/remove path While we add an OF-provider we may, based upon a specific condition, also assign genpd->opp_table. Rather using the same specific condition in the error/remove path, let's check genpd->opp_table instead as it makes the code easier. Reviewed-by: Abel Vesa Tested-by: Tomi Valkeinen Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250417142513.312939-4-ulf.hansson@linaro.org commit f34a06762799e35047cad47a5db86a28174a4c4d Author: Ulf Hansson Date: Thu Apr 17 16:25:00 2025 +0200 pmdomain: core: Simplify return statement in genpd_power_off() Rather than using two if-clauses immediately after each to check for similar reasons to prevent the power-off, let's combine them into one if-clause to simplify the code. Reviewed-by: Abel Vesa Tested-by: Tomi Valkeinen Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250417142513.312939-3-ulf.hansson@linaro.org commit 0e3b66725eaa51e8e5a20a582bf6338f131913d6 Author: Ulf Hansson Date: Thu Apr 17 16:24:59 2025 +0200 pmdomain: core: Convert genpd_power_off() to void At some point it made sense to have genpd_power_off() to return an error code. That hasn't been the case for quite some time, so let's convert it into a static void function and simplify some of the corresponding code. Reviewed-by: Abel Vesa Tested-by: Tomi Valkeinen Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250417142513.312939-2-ulf.hansson@linaro.org commit 0e6692a2cc703b1358782e41cf48ee814b11ea8c Author: Jani Nikula Date: Thu Apr 24 23:01:42 2025 +0300 drm/i915/hdcp: drop unnecessary include from intel_hdcp_gsc.h Nothing in intel_hdcp_gsc.c needs linux/err.h. Remove it. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/26ae2c04554fc8dd76d2fdb0f2b0a63cb1fed98f.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c526ac45e7b90521ebb49a22d40f7268cd01b0c3 Author: Jani Nikula Date: Thu Apr 24 23:01:41 2025 +0300 drm/i915/hdcp: pass struct drm_device to driver specific HDCP GSC code The driver specific HDCP GSC code will eventually be part of the driver cores rather than display. Remove the struct intel_display references from them, and pass struct drm_device instead. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/bf9aa8e44e18eef41e3077a2966935b4e2649b62.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f4507f987c4cbac5803574668c3246d90b8a19c1 Author: Jani Nikula Date: Thu Apr 24 23:01:40 2025 +0300 drm/i915/hdcp: simplify HDCP GSC firmware usage selection Just localize the GSC decision inside intel_hdcp.c, and deduplicate the conditions. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/a1d031bfbff7073e576dfe8d3d3d5a28d7bb2c15.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a50f0c49f96061a5140b3076eb74745603bd1edc Author: Jani Nikula Date: Thu Apr 24 23:01:39 2025 +0300 drm/i915/hdcp: switch the HDCP GSC message interface from u8* to void* The in/out buffers are just opaque data, and don't need to be considered u8*. Switching to void* lets us drop a ton of unnecessary casts. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/ea005adb713e85b797d83204c80de0a2a8e5ab47.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3ac2a0b9bbbb8138971c6df6086719ebb4bdb7ae Author: Jani Nikula Date: Thu Apr 24 23:01:38 2025 +0300 drm/i915/hdcp: pass the context to the HDCP GSC message interface The opaque HDCP GSC context nicely abstracts the differences between drivers. Pass that instead of struct drm_i915_private or struct xe_device to intel_hdcp_gsc_msg_send(). We can store the driver specific data in the context. This lets us drop the dependency on i915_drv.h from intel_hdcp_gsc_message.c. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/df1653212f9014e717701b017e78e0017884b870.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8cae787fab1f60d129377e147e42c4678002ff65 Author: Jani Nikula Date: Thu Apr 24 23:01:37 2025 +0300 drm/i915/hdcp: rename HDCP GSC context alloc/free functions Name the functions intel_hdcp_gsc_context_alloc() and intel_hdcp_gsc_context_free() for consistency. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/c6e25686ed20b5fdea9a59faf6a64a7312a075b0.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6239ab4d58676e4fff8f1c77345e3c5eefce7f4f Author: Jani Nikula Date: Thu Apr 24 23:01:36 2025 +0300 drm/i915/hdcp: rename struct intel_hdcp_gsc_message to intel_hdcp_gsc_context It's really about the context more than about the message. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/ca0a802a81ba4e96e7c40646a32386d4351d6ff4.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a07d04146b68cd6027ec9b58c97138f50e0b110f Author: Jani Nikula Date: Thu Apr 24 23:01:35 2025 +0300 drm/i915/hdcp: split HDCP GSC message alloc/save responsibilities Allocate and initialize the HDCP GSC message in intel_hdcp_gsc_hdcp2_init() as before, but store the pointer to display->hdcp.hdcp_message in the caller. Similarly, pass in the pointer to intel_hdcp_gsc_free_message(). Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/a74fcc941126bf92d12115b5faf4f75099e26242.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1e5206fc34030780017afe738783ecab9d7e2795 Author: Jani Nikula Date: Thu Apr 24 23:01:34 2025 +0300 drm/i915/hdcp: deduplicate and refactor HDCP GSC ops initialization The gsc_hdcp_ops is duplicated and initialized exactly the same way in two different places (for i915 and xe), and requires forward declarations for all the hooks. Deduplicate, and make the functions static. There are slight differences in the i915 and xe implementations of intel_hdcp_gsc_init() and intel_hdcp_gsc_fini(). Take the best of both, and improve. We need to expose intel_hdcp_gsc_hdcp2_init() and intel_hdcp_gsc_free_message() for this, and create the latter for xe. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/21e7871b35d4c7d13f016b5ecb4f10e5be72c531.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b45528d5baf825c3828a9ae10784e2be60a7806b Author: Jani Nikula Date: Thu Apr 24 23:01:33 2025 +0300 drm/i915/hdcp: remove duplicate declarations intel_hdcp_gsc_msg_send() and intel_hdcp_gsc_check_status() are declared in intel_hdcp_gsc.h. Cc: Suraj Kandpal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/f300d7cdb2af681291df938194f575f05c2c41bc.1745524803.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d7e83da1258fcdd0d69edfe2ec2202f4619d8252 Author: Nemesa Garg Date: Wed Apr 16 20:50:44 2025 +0530 drm/i915/display: Implement wa_14024400148 Workaround recommend use polling method for pm_demand to finish as to avoid timeout. v2: Add polling method within pmdemand_wait. Update error message[Jani] Signed-off-by: Nemesa Garg Reviewed-by: Mika Kahola Signed-off-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250416152044.2668249-1-nemesa.garg@intel.com commit 5530c1e48ab10251055e79023b3e1a84b6f375de Author: Jani Nikula Date: Tue Apr 29 14:50:55 2025 +0300 drm/i915/error: drop dmesg suggestion to file bugs on GPU hangs We haven't updated the DRIVER_TIMESTAMP since commit 3570bd989acc ("drm/i915: Update DRIVER_DATE to 20230929") 1½ years ago. Before then, the previous update was commit 139caf7ca286 ("drm/i915: Update DRIVER_DATE to 20201103") 4+ years ago. The DRIVER_DATE has also been removed altogether. We've used the DRIVER_TIMESTAMP to log suggestions to file bugs on GPU hangs when they happen on a driver less than six months old. Combined with the sporadic DRIVER_TIMESTAMP updates, we really haven't logged the suggestions for years. Just stop logging the suggestion to file bugs altogether, and remove DRIVER_TIMESTAMP. This doesn't really change anything wrt to logging GPU errors or how we handle bugs. And effectively we already stopped logging the message a year ago when we stopped updating DRIVER_TIMESTAMP. Instead, add an unconditional message about the GPU error state location. Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Acked-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250429115055.2133143-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 90dc457ad2956ce97dfb30168d52d084881aa6c3 Author: Jani Nikula Date: Tue Apr 29 14:25:34 2025 +0300 drm/i915/backlight: drop dmesg suggestion to file bugs Drop the FDO_BUG_URL from the source, and stop suggesting to file bugs on DPCD backlight issues. We don't do this anywhere else in display, this isn't a special snowflake. As a consequence, also drop the dependency on i915_utils.h from intel_dp_aux_backlight.c. Acked-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250429112534.2121656-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 760e296124ef3b6e14cd1d940f2a01c5ed7c0dac Author: Jiapeng Chong Date: Wed Jun 19 15:54:36 2024 +0800 drm: Remove unused function rcar_cmm_write The function are defined in the rcar_cmm.c file, but not called elsewhere, so delete the unused function. drivers/gpu/drm/renesas/rcar-du/rcar_cmm.c:35:19: warning: unused function 'rcar_cmm_read'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9364 Signed-off-by: Jiapeng Chong Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240619075436.86407-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Tomi Valkeinen commit 91e3bf09a90bb4340c0c3c51396e7531555efda4 Author: Biju Das Date: Thu Nov 16 12:24:24 2023 +0000 drm: rcar-du: Fix memory leak in rcar_du_vsps_init() The rcar_du_vsps_init() doesn't free the np allocated by of_parse_phandle_with_fixed_args() for the non-error case. Fix memory leak for the non-error case. While at it, replace the label 'error'->'done' as it applies to non-error case as well and update the error check condition for rcar_du_vsp_init() to avoid breakage in future, if it returns positive value. Fixes: 3e81374e2014 ("drm: rcar-du: Support multiple sources from the same VSP") Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20231116122424.80136-1-biju.das.jz@bp.renesas.com Signed-off-by: Tomi Valkeinen commit 502ad6e5a6196840976c4c84b2ea2f9769942fbe Author: Xin Li (Intel) Date: Sun Apr 27 02:20:27 2025 -0700 x86/msr: Change the function type of native_read_msr_safe() Modify the function type of native_read_msr_safe() to: int native_read_msr_safe(u32 msr, u64 *val) This change makes the function return an error code instead of the MSR value, aligning it with the type of native_write_msr_safe(). Consequently, their callers can check the results in the same way. While at it, convert leftover MSR data type "unsigned int" to u32. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-16-xin@zytor.com commit 444b46a128ccd0883f83ffa2e6b4a1f64ea4ca1c Author: Xin Li (Intel) Date: Sun Apr 27 02:20:26 2025 -0700 x86/msr: Replace wrmsr(msr, low, 0) with wrmsrq(msr, low) The third argument in wrmsr(msr, low, 0) is unnecessary. Instead, use wrmsrq(msr, low), which automatically sets the higher 32 bits of the MSR value to 0. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-15-xin@zytor.com commit 0c2678efed6c6a2908dfe14af1e93a6bebc78e79 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:25 2025 -0700 x86/pvops/msr: Refactor pv_cpu_ops.write_msr{,_safe}() An MSR value is represented as a 64-bit unsigned integer, with existing MSR instructions storing it in EDX:EAX as two 32-bit segments. The new immediate form MSR instructions, however, utilize a 64-bit general-purpose register to store the MSR value. To unify the usage of all MSR instructions, let the default MSR access APIs accept an MSR value as a single 64-bit argument instead of two 32-bit segments. The dual 32-bit APIs are still available as convenient wrappers over the APIs that handle an MSR value as a single 64-bit argument. The following illustrates the updated derivation of the MSR write APIs: __wrmsrq(u32 msr, u64 val) / \ / \ native_wrmsrq(msr, val) native_wrmsr(msr, low, high) | | native_write_msr(msr, val) / \ / \ wrmsrq(msr, val) wrmsr(msr, low, high) When CONFIG_PARAVIRT is enabled, wrmsrq() and wrmsr() are defined on top of paravirt_write_msr(): paravirt_write_msr(u32 msr, u64 val) / \ / \ wrmsrq(msr, val) wrmsr(msr, low, high) paravirt_write_msr() invokes cpu.write_msr(msr, val), an indirect layer of pv_ops MSR write call: If on native: cpu.write_msr = native_write_msr If on Xen: cpu.write_msr = xen_write_msr Therefore, refactor pv_cpu_ops.write_msr{_safe}() to accept an MSR value in a single u64 argument, replacing the current dual u32 arguments. No functional change intended. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-14-xin@zytor.com commit 2b7e25301c5418059b013c14af9022d892466398 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:24 2025 -0700 x86/xen/msr: Remove the error pointer argument from set_seg() set_seg() is used to write the following MSRs on Xen: MSR_FS_BASE MSR_KERNEL_GS_BASE MSR_GS_BASE But none of these MSRs are written using any MSR write safe API. Therefore there is no need to pass an error pointer argument to set_seg() for returning an error code to be used in MSR safe APIs. Remove the error pointer argument. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-13-xin@zytor.com commit f7998621db691b6fad4d84ad7d8ecc1a0a9b703f Author: Xin Li (Intel) Date: Sun Apr 27 02:20:23 2025 -0700 x86/xen/msr: Remove pmu_msr_{read,write}() As pmu_msr_{read,write}() are now wrappers of pmu_msr_chk_emulated(), remove them and use pmu_msr_chk_emulated() directly. As pmu_msr_chk_emulated() could easily return false in the cases where it would set *emul to false, remove the "emul" argument and use the return value instead. While at it, convert the data type of MSR index to u32 in functions called in pmu_msr_chk_emulated(). Suggested-by: H. Peter Anvin (Intel) Suggested-by: Juergen Gross Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-12-xin@zytor.com commit 0cb6f4128a7d8dca9c9bb45f9ecbddcd5cf377aa Author: Xin Li (Intel) Date: Sun Apr 27 02:20:22 2025 -0700 x86/xen/msr: Remove calling native_{read,write}_msr{,_safe}() in pmu_msr_{read,write}() hpa found that pmu_msr_write() is actually a completely pointless function: https://lore.kernel.org/lkml/0ec48b84-d158-47c6-b14c-3563fd14bcc4@zytor.com/ all it does is shuffle some arguments, then calls pmu_msr_chk_emulated() and if it returns true AND the emulated flag is clear then does *exactly the same thing* that the calling code would have done if pmu_msr_write() itself had returned true. And pmu_msr_read() does the equivalent stupidity. Remove the calls to native_{read,write}_msr{,_safe}() within pmu_msr_{read,write}(). Instead reuse the existing calling code that decides whether to call native_{read,write}_msr{,_safe}() based on the return value from pmu_msr_{read,write}(). Consequently, eliminate the need to pass an error pointer to pmu_msr_{read,write}(). While at it, refactor pmu_msr_write() to take the MSR value as a u64 argument, replacing the current dual u32 arguments, because the dual u32 arguments were only used to call native_write_msr{,_safe}(), which has now been removed. Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-11-xin@zytor.com commit 3204877d05ca17162270890e3f28552741a1b1a2 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:21 2025 -0700 x86/msr: Convert __rdmsr() uses to native_rdmsrq() uses __rdmsr() is the lowest level MSR write API, with native_rdmsr() and native_rdmsrq() serving as higher-level wrappers around it. #define native_rdmsr(msr, val1, val2) \ do { \ u64 __val = __rdmsr((msr)); \ (void)((val1) = (u32)__val); \ (void)((val2) = (u32)(__val >> 32)); \ } while (0) static __always_inline u64 native_rdmsrq(u32 msr) { return __rdmsr(msr); } However, __rdmsr() continues to be utilized in various locations. MSR APIs are designed for different scenarios, such as native or pvops, with or without trace, and safe or non-safe. Unfortunately, the current MSR API names do not adequately reflect these factors, making it challenging to select the most appropriate API for various situations. To pave the way for improving MSR API names, convert __rdmsr() uses to native_rdmsrq() to ensure consistent usage. Later, these APIs can be renamed to better reflect their implications, such as native or pvops, with or without trace, and safe or non-safe. No functional change intended. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-10-xin@zytor.com commit ed56a309f7e1b05c15702ea1275172d507a606f4 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:20 2025 -0700 x86/msr: Add the native_rdmsrq() helper __rdmsr() is the lowest-level primitive MSR read API, implemented in assembly code and returning an MSR value in a u64 integer, on top of which a convenience wrapper native_rdmsr() is defined to return an MSR value in two u32 integers. For some reason, native_rdmsrq() is not defined and __rdmsr() is directly used when it needs to return an MSR value in a u64 integer. Add the native_rdmsrq() helper, which is simply an alias of __rdmsr(), to make native_rdmsr() and native_rdmsrq() a pair of MSR read APIs. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-9-xin@zytor.com commit 519be7da37b955164c59aacaee6d6ac89f4bbe15 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:19 2025 -0700 x86/msr: Convert __wrmsr() uses to native_wrmsr{,q}() uses __wrmsr() is the lowest level MSR write API, with native_wrmsr() and native_wrmsrq() serving as higher-level wrappers around it: #define native_wrmsr(msr, low, high) \ __wrmsr(msr, low, high) #define native_wrmsrl(msr, val) \ __wrmsr((msr), (u32)((u64)(val)), \ (u32)((u64)(val) >> 32)) However, __wrmsr() continues to be utilized in various locations. MSR APIs are designed for different scenarios, such as native or pvops, with or without trace, and safe or non-safe. Unfortunately, the current MSR API names do not adequately reflect these factors, making it challenging to select the most appropriate API for various situations. To pave the way for improving MSR API names, convert __wrmsr() uses to native_wrmsr{,q}() to ensure consistent usage. Later, these APIs can be renamed to better reflect their implications, such as native or pvops, with or without trace, and safe or non-safe. No functional change intended. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: David Woodhouse Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Stefano Stabellini Cc: Uros Bizjak Cc: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250427092027.1598740-8-xin@zytor.com commit 5afa4cf54518b26e18d7b7ce2e9d9724f9cb9324 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:18 2025 -0700 x86/xen/msr: Return u64 consistently in Xen PMC xen_*_read functions The pv_ops PMC read API is defined as: u64 (*read_pmc)(int counter); But Xen PMC read functions return 'unsigned long long', make them return u64 consistently. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Cc: Stefano Stabellini Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250427092027.1598740-7-xin@zytor.com commit 795ada52875fe61469f635f226d19a4cd733d1e8 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:17 2025 -0700 x86/msr: Convert the rdpmc() macro to an __always_inline function Functions offer type safety and better readability compared to macros. Additionally, always inline functions can match the performance of macros. Converting the rdpmc() macro into an always inline function is simple and straightforward, so just make the change. Moreover, the read result is now the returned value, further enhancing readability. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250427092027.1598740-6-xin@zytor.com commit 7d9ccde56bc023f9a968db537963a029aa41d902 Author: Xin Li (Intel) Date: Sun Apr 27 02:20:16 2025 -0700 x86/msr: Rename rdpmcl() to rdpmc() Now that rdpmc() is gone, rdpmcl() is the sole PMC read helper, simply rename rdpmcl() to rdpmc(). Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250427092027.1598740-5-xin@zytor.com commit 91882511ef905fdfb7d33be88f6ddb91012ee30f Author: Xin Li (Intel) Date: Sun Apr 27 02:20:15 2025 -0700 x86/msr: Remove the unused rdpmc() method rdpmc() is not used anywhere anymore, remove it. Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250427092027.1598740-4-xin@zytor.com commit 288a4ff0ad29d1a9391b8a111a4b6da51da3aa85 Author: Xin Li (Intel) Date: Fri May 2 10:20:14 2025 +0200 x86/msr: Move rdtsc{,_ordered}() to Relocate rdtsc{,_ordered}() from to . [ mingo: Do not remove the inclusion from just yet, to reduce -next breakages. We can do this later on, separately, shortly before the next -rc1. ] Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250427092027.1598740-3-xin@zytor.com commit efef7f184f2eaf29a1ca676712d0e6e851cd0191 Author: Xin Li (Intel) Date: Wed Apr 30 22:42:41 2025 -0700 x86/msr: Add explicit includes of For historic reasons there are some TSC-related functions in the header, even though there's an header. To facilitate the relocation of rdtsc{,_ordered}() from to and to eventually eliminate the inclusion of in , add an explicit dependency to the source files that reference definitions from . [ mingo: Clarified the changelog. ] Signed-off-by: Xin Li (Intel) Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Acked-by: Ilpo Järvinen Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250501054241.1245648-1-xin@zytor.com commit bdfda83a6b5988f1ac62cd0eaceb6c3b44dc2a31 Author: Ingo Molnar Date: Fri May 2 10:13:53 2025 +0200 x86/msr: Move the EAX_EDX_*() methods from to We are going to use them from multiple headers, and in any case, such register access wrapper macros are better in anyway. Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Cc: linux-kernel@vger.kernel.org commit b64b134942c8cf4801ea288b3fd38b509aedec21 Author: Laurent Pinchart Date: Wed Apr 30 02:29:03 2025 +0300 media: renesas: vsp1: Expose color space through the DRM API Now that the VSP1 driver supports color spaces, expose them through the API used by the DU driver. This allows configuring the YCbCr encoding and quantization used by each plane, ensuring correct color rendering. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-9-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 67cbb2be3ae7f21f85642d81b451bee20f687d06 Author: Laurent Pinchart Date: Wed Apr 30 02:29:02 2025 +0300 media: renesas: vsp1: Name nested structure in vsp1_drm The vsp1_drm structure defines an anonymous nested structure to store per-input data. In preparation for extending that structure, give it a name and is it through the driver. This improves code readability. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-8-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit e6c9597e5f320c6bc9751183450e19386be476c8 Author: Laurent Pinchart Date: Wed Apr 30 02:29:01 2025 +0300 media: renesas: vsp1: Allow setting encoding and quantization The RPF and WPF support different encodings and quantizations when converting between RGB and YUV formats. Allow setting the corresponding format parameters from userspace, and configure the hardware accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-7-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit d5e3bc24d5ce4c256d5bbe7f2d6b9c4a3c71a401 Author: Laurent Pinchart Date: Wed Apr 30 02:29:00 2025 +0300 media: renesas: vsp1: Report colour space information to userspace The vsp1 driver implements very partial colour space support: it hardcodes the colorspace field on all video devices and subdevices to V4L2_COLORSPACE_SRGB, regardless of the configured format. The xfer_func, ycbcr_enc and quantization fields are not set (except for hsv_enc for HSV formats on video devices). This doesn't match the hardware configuration, which handles YUV data as encoding in BT.601 with limited range. As a first step towards colour space configuration, keep the colour space fields hardcoded, but set them based on the selected format type (RGB, YUV or HSV). While at it, remove an extra blank line. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-6-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit b6e57605eff6224df4debf188eb7a02dedb7686f Author: Laurent Pinchart Date: Wed Apr 30 02:28:59 2025 +0300 media: renesas: vsp1: Fix media bus code setup on RWPF source pad The RWPF source pad media bus code can only be different from the sink pad code when enabling color space conversion, which can only convert between RGB and YUV. If the sink pad code is HSV, no conversion is possible. Fix the pad set format handler to reflect this hardware limitation. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-5-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 687dae9eedb0fb0153ef69b35b40f738f64793d0 Author: Laurent Pinchart Date: Wed Apr 30 02:28:58 2025 +0300 media: renesas: vsp1: Fix HSV format enumeration The HSV formats are not restricted to Gen2 platforms, but to VSP instances that implement the HSI and HST modules. Make it conditional to the VSP1_HAS_HSIT feature flag. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-4-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit a4b25ae7b24b2cdf59fa6896f6a82e030606ca51 Author: Laurent Pinchart Date: Wed Apr 30 02:28:57 2025 +0300 media: renesas: vsp1: Make HSI and HST modules optional Not all VSP instance incorporate the HSI and HST modules. Add a VSP1_HAS_HSIT feature flag, and create the modules only on VSP instances that implement them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-3-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 57024cd2790a25049c13528a5c3e81eb0fe7382e Author: Laurent Pinchart Date: Wed Apr 30 02:28:56 2025 +0300 media: renesas: vsp1: Implement pixel format enumeration The VSP1 driver is missing the ability to enumerate pixel formats on its video nodes, which is supposed to be supported according to the V4L2 API. Implement the enumeration to fix this issue. As the device is media controller-centric, also implement the ability to filter pixel formats by media bus code, and report the missing V4L2_CAP_IO_MC capability. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20250429232904.26413-2-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 5dc8bd50c7d8630ae520cb35f21bd1088509142c Author: Biju Das Date: Sun Mar 30 10:17:35 2025 +0100 media: renesas: vsp1: Use %p4cc printk modifier to print FourCC codes Replace '%08x->%p4cc' printk modifier to print FourCC codes for pixel formats. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20250330091738.27052-1-biju.das.jz@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 8ebd5f70c2600a499b656fc5eb4d8f0888b66a4f Author: Jacopo Mondi Date: Tue Apr 1 16:22:04 2025 +0200 media: renesas: vsp1: rwpf: Support operations with IIF When the RPF/WPF units are used for ISP interfacing through the IIF, the set of accessible registers is limited compared to the regular VSPD operations. Support ISP interfacing in the rpf and wpf entities by checking if the pipe features an IIF instance and writing only the relevant registers. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20250401-v4h-iif-v7-4-cc547c0bddd5@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit f4fea51415e0e82af58e930585ba8c8a4772c945 Author: Jacopo Mondi Date: Tue Apr 1 16:22:03 2025 +0200 media: renesas: vsp1: wpf: Propagate vsp1_rwpf_init_ctrls() vsp1_wpf.c calls vsp1_rwpf_init_ctrls() to initialize controls that are common between RPF and WPF. However, the vsp1_wpf.c implementation does not check for the function call return value. Fix this by propagating to the caller the return value. While at it, drop a duplicated error message in wpf_init_controls() as the caller already report it. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20250401-v4h-iif-v7-3-cc547c0bddd5@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 15b3c76da9e19b24a69c603ec51a965c5be91e26 Author: Jacopo Mondi Date: Tue Apr 1 16:22:02 2025 +0200 media: renesas: vsp1: dl: Use singleshot DL for VSPX The vsp1_dl library allows to program a display list and feed it continuously to the VSP2. As an alternative operation mode, the library allows to program the VSP2 in 'single shot' mode, where a display list is submitted to the VSP on request only. Currently the 'single shot' mode is only available when the VSP2 is controlled by userspace, while it works in continuous mode when driven by DRM, as frames have to be submitted to the display continuously. For the VSPX use case, where there is no uapi support, we should however work in single-shot mode as the ISP driver programs the VSPX on request. Initialize the display lists in single shot mode in case the VSP1 is controlled by userspace or in case the pipeline features an IIF entity, as in the VSPX case. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20250401-v4h-iif-v7-2-cc547c0bddd5@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 7305ee12b2c9a8fb615319dc96d9aed847c80117 Author: Jacopo Mondi Date: Tue Apr 1 16:22:01 2025 +0200 media: renesas: vsp1: Add support IIF ISP Interface The IIF (ISP InterFace) is a VSP2 function that transfers data to the ISP by reading from external memory through two RPF instances. Add support for it in the vsp1 driver by introducing a new entity type. The sole required operation is to enable the IIF function during configure_stream(). Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20250401-v4h-iif-v7-1-cc547c0bddd5@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 09d76b4e83e4911238f74a2ba48d92db6e04f10a Author: Niklas Söderlund Date: Wed Apr 23 18:31:13 2025 +0200 media: rcar-isp: Parse named cs memory region Extend the device tree parsing to optionally parse the cs memory region by name. The change is backward compatible with the device tree model where a single unnamed region describes only the ISP channel select function. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250423163113.2961049-8-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 7281a7bd5b7b57fb6841f27e95115934ab25f4a4 Author: Niklas Söderlund Date: Wed Apr 23 18:31:12 2025 +0200 media: rcar-isp: Rename base register variable Prepare for extending the driver to in addition to supporting the channel selector (CS) also support the core ISP. The two different functions have different base addresses so the driver needs to distinguish between them. Prepare for this by marking existing base address variable and read/write functions to make it clear they operate on the CS portion of the driver. There is no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250423163113.2961049-7-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 9103d33f22b12f9633157d2e853594aabc377eb7 Author: Niklas Söderlund Date: Wed Apr 23 18:31:11 2025 +0200 media: rcar-isp: Move driver to own directory Before extending the driver with functions from the R-Car ISP core that will span multiple files move the existing driver to a separate directory. While at it rename the single source file to allow future files to be grouped by functions. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250423163113.2961049-6-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 63fd40f67283ce7b3ef7414d73ab1cf78fd9c89c Author: Niklas Söderlund Date: Wed Apr 23 18:31:07 2025 +0200 dt-bindings: media: renesas,isp: Add ISP core function block Some R-Car ISP instances have in addition to the channel selector (CS) an ISP core (CORE) to perform operations on an image stream. The core function is mapped to a different memory region and has a separate interrupt than CS, extend the bindings to allow describing this. On the same SoC different instances of the ISP IP may have, or not have, the CORE functionality. The CS function on all instances on the SoC are the same and the documentation describes the full ISP (CS + CORE) as a single IP block. Where instances not having the CORE function simply lack the functionality to modify the image data. There are dependencies on the CS functionality while operating the CORE functionality. In order for the ISP core to function in memory-to-memory mode it needs to be feed input data from a Streaming Bridge interface. This interface is provided thru the VSP-X device. Add an optional new property "renesas,vspx" to provide a phandle to describe this relationship. While adding mandatory reg-names and interrupt-names breaks existing bindings the driver itself remains backward compatible and provides CS functionality if a single unnamed reg and interrupt property is present. Furthermore all existing users of the bindings are updated in following work to add these new mandatory properties. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250423163113.2961049-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 94bf847ae5a61e0ab0b971ed186a443688eb793f Author: Tomi Valkeinen Date: Thu Apr 24 10:05:36 2025 +0300 media: rcar-vin: Fix RAW10 Fix the following to get RAW10 formats working: In rvin_formats, the bpp is set to 4 for RAW10. As VIN unpacks RAW10 to 16-bit containers, the bpp should be 2. Don't set VNDMR_YC_THR to the VNDMR register. The YC_THR is "YC Data Through Mode", used for YUV formats and should not be set for RAW10. Fixes: 1b7e7240eaf3 ("media: rcar-vin: Add support for RAW10") Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20250424-rcar-fix-raw-v2-4-f6afca378124@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 17b5496c30709d83a0ca2d11731720a4dc0ef540 Author: Tomi Valkeinen Date: Thu Apr 24 10:05:35 2025 +0300 media: rcar-vin: Fix RAW8 On Gen4 we need to set VNMC's EXINF to a different value (1) than in Gen3 (0). Add a define for this, and set the bit for Gen4. Signed-off-by: Tomi Valkeinen Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20250424-rcar-fix-raw-v2-3-f6afca378124@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 21cb8227e35ec93c637a2330fc3cb2e63170e7d4 Author: Tomi Valkeinen Date: Thu Apr 24 10:05:34 2025 +0300 media: rcar-vin: Remove unnecessary checks Remove unnecessary checks wrt. formats and interfaces in rvin_setup(). The validity of the formats has already been checked earlier. Signed-off-by: Tomi Valkeinen Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20250424-rcar-fix-raw-v2-2-f6afca378124@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit d6a0866750bb14e3c0c16677fc45162513f1be1f Author: Tomi Valkeinen Date: Thu Apr 24 10:05:33 2025 +0300 media: rcar-vin: Add RCAR_GEN4 model value Currently Gen4 VINs are marked as RCAN_GEN3 models. Add a new enum value, RCAR_GEN4, and use it for Gen4 VINs. No functional changes in this patch. Signed-off-by: Tomi Valkeinen Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20250424-rcar-fix-raw-v2-1-f6afca378124@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit c9d8ea9d53d4ddb80f2ad2bca5b9e9e40fcb9b16 Author: Ingo Molnar Date: Fri May 2 10:08:42 2025 +0200 x86/msr: Rename DECLARE_ARGS() to EAX_EDX_DECLARE_ARGS DECLARE_ARGS() is way too generic of a name that says very little about why these args are declared in that fashion - use the EAX_EDX_ prefix to create a common prefix between the three helper methods: EAX_EDX_DECLARE_ARGS() EAX_EDX_VAL() EAX_EDX_RET() Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Cc: linux-kernel@vger.kernel.org commit 76deb5452e79ab86eac699ae3b6a44ab9c437ffe Author: Ingo Molnar Date: Fri May 2 10:07:59 2025 +0200 x86/msr: Improve the comments of the DECLARE_ARGS()/EAX_EDX_VAL()/EAX_EDX_RET() facility Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Uros Bizjak Cc: linux-kernel@vger.kernel.org commit 0c7b20b852c75836c15487752e29d8706bb571b2 Merge: a5447e92e169da b4432656b36e5c Author: Ingo Molnar Date: Fri May 2 09:43:44 2025 +0200 Merge tag 'v6.15-rc4' into x86/msr, to pick up fixes and resolve conflicts Signed-off-by: Ingo Molnar commit 146eadf3d1ef3b13d31e814ab213909c98c0427e Author: Vikash Garodia Date: Thu Apr 24 14:20:47 2025 +0530 media: iris: add qcs8300 platform data Add platform data for QCS8300, which has different capabilities compared to SM8550. Introduce a QCS8300 header that defines these capabilities. Reviewed-by: Bryan O'Donoghue Signed-off-by: Vikash Garodia Reviewed-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 6490cf1653768a1d4cd9a717a8009785e50495e0 Author: Vikash Garodia Date: Thu Apr 24 14:20:46 2025 +0530 media: iris: fix the order of compat strings Fix the order of compatible strings to make it in alpha numeric order. Reviewed-by: Bryan O'Donoghue Signed-off-by: Vikash Garodia Reviewed-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 6aa5f5887df3b2eaca45ad263acb301540e52802 Author: Vikash Garodia Date: Thu Apr 24 14:20:45 2025 +0530 dt-bindings: media: qcom,sm8550-iris: document QCS8300 IRIS accelerator Document the IRIS video decoder/encoder accelerator found in the QCS8300 platform. It belongs to same iris v3 family as that of SM8550 but is a downscaled version of SM8550. It has 2 frame processing hardware blocks while SM8550 has 4. Thereby QCS8300 have fewer capabilities than those of SM8550. Reviewed-by: Bryan O'Donoghue Signed-off-by: Vikash Garodia Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit cae67e94e46a057e3b3d092db04557acce48b82d Author: Neil Armstrong Date: Thu Apr 17 16:59:07 2025 +0200 media: platform: qcom/iris: add sm8650 support Add support for the SM8650 platform by re-using the SM8550 definitions and using the vpu33 ops. Move the Sm8650 reset tables that differs in a per-SoC platform header, that will contain mode SoC specific data when more codecs are introduced. The SM8650/vpu33 requires more reset lines, but the H.264 decoder capabilities are identical. Tested-by: Bryan O'Donoghue # x1e Dell Reviewed-by: Bryan O'Donoghue Signed-off-by: Neil Armstrong Reviewed-by: Vikash Garodia Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit dc40021c13d412f48e11a5c4aeb9e0a997ff2b95 Author: Neil Armstrong Date: Thu Apr 17 16:59:06 2025 +0200 media: platform: qcom/iris: rename platform_sm8550 to platform_gen2 In order to prepare for supporting the SM8650 SoC, move the iris_platform_sm8550.c file into iris_platform_gen2.c that will contain all the common HFI GEN2x structures. Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # x1e Dell Signed-off-by: Neil Armstrong Reviewed-by: Vikash Garodia Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 02083a1e00ae294001faf81ef43f9edfd3952361 Author: Neil Armstrong Date: Thu Apr 17 16:59:05 2025 +0200 media: platform: qcom/iris: add support for vpu33 The IRIS acceleration found in the SM8650 platforms uses the vpu33 hardware version, and requires a slighly different reset and power off sequences in order to properly get out of runtime suspend. Tested-by: Bryan O'Donoghue # x1e Dell Signed-off-by: Neil Armstrong Reviewed-by: Vikash Garodia Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 9cd2b62c8c29a3316abff91bae23c54d06a63992 Author: Neil Armstrong Date: Thu Apr 17 16:59:04 2025 +0200 media: platform: qcom/iris: rename iris_vpu3 to iris_vpu3x The vpu33 HW is very close to vpu3, and shares most of the operations, so rename file to vpu3x since we'll handle all vpu3 variants in it. Reviewed-by: Dikshita Agarwal Tested-by: Bryan O'Donoghue # x1e Dell Reviewed-by: Vikash Garodia Signed-off-by: Neil Armstrong Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 322e9061edcbe5be110029a3453d8acc9888a684 Author: Neil Armstrong Date: Thu Apr 17 16:59:03 2025 +0200 media: platform: qcom/iris: introduce optional controller_rst_tbl Introduce an optional controller_rst_tbl use to store reset lines used to reset part of the controller. This is necessary for the vpu3 support, when the xo reset line must be asserted separately from the other reset line on power off operation. Factor the iris_init_resets() logic to allow requesting multiple reset tables. Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # x1e Dell Reviewed-by: Dikshita Agarwal Signed-off-by: Neil Armstrong Reviewed-by: Vikash Garodia Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit c69df5de4ac3c8dff7f6663c960dd8c5f0dfbaa4 Author: Neil Armstrong Date: Thu Apr 17 16:59:02 2025 +0200 media: platform: qcom/iris: add power_off_controller to vpu_ops In order to support the SM8650 iris33 hardware, we need to provide a specific constoller power off sequences via the vpu_ops callbacks. Add the callback, and use the current helper for currently supported platforms. Reviewed-by: Bryan O'Donoghue Reviewed-by: Dikshita Agarwal Tested-by: Bryan O'Donoghue # x1e Dell Reviewed-by: Vikash Garodia Signed-off-by: Neil Armstrong Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit f0a0a2388f443e949894f68ca49ccc9618512316 Author: Neil Armstrong Date: Thu Apr 17 16:59:01 2025 +0200 dt-bindings: media: qcom,sm8550-iris: document SM8650 IRIS accelerator Document the IRIS video decoder and encoder accelerator found in the SM8650 platform, it requires 2 more reset lines in addition to the properties required for the SM8550 platform. Reviewed-by: Rob Herring (Arm) Reviewed-by: Vikash Garodia Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # x1e Dell Signed-off-by: Neil Armstrong Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 2e9b2ee2ba403cbe270a8256b8794ef5ad19b38d Author: Lu Baolu Date: Wed Apr 30 10:52:49 2025 +0800 iommu: Cleanup comments for dev_enable/disable_feat The dev_enable/disable_feat ops have been removed by commit ("iommu: Remove iommu_dev_enable/disable_feature()"). Cleanup the comments to make the code clean. Signed-off-by: Lu Baolu Reviewed-by: Vasant Hegde Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20250430025249.2371751-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 94a9921e2c25eedcf95b00cedbd065579406655a Author: Sairaj Kodilkar Date: Mon Mar 17 11:20:20 2025 +0530 iommu/amd: Add support for HTRangeIgnore feature AMD IOMMU reserves the address range 0xfd00000000-0xffffffffff for the hypertransport protocol (HT) and has special meaning. Hence devices cannot use this address range for the DMA. However on some AMD platforms this HT range is shifted to the very top of the address space and new feature bit `HTRangeIgnore` is introduced. When this feature bit is on, IOMMU treats the GPA access to the legacy HT range as regular GPA access. Signed-off-by: Sairaj Kodilkar Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20250317055020.25214-1-sarunkod@amd.com Signed-off-by: Joerg Roedel commit ee3de3cf7035aaf289085111fd0cfaddc93f0409 Author: Praveen Talari Date: Fri May 2 10:58:22 2025 +0530 OPP: Add dev_pm_opp_set_level() To configure a device to a specific performance level, consumer drivers currently need to determine the OPP based on the exact level and then set it, resulting in code duplication across drivers. The new helper API, dev_pm_opp_set_level(), addresses this issue by providing a streamlined method for consumer drivers to find and set the OPP based on the desired performance level, thereby eliminating redundancy. Signed-off-by: Praveen Talari [ Viresh: Lot of fixes in the code, and rebased over latest changes. Fixed commit log too. ] Signed-off-by: Viresh Kumar commit ff9c512041f2b405536640374ae3a3fe10efaf8b Author: Viresh Kumar Date: Thu Apr 24 14:15:53 2025 +0530 OPP: Use mutex locking guards Use mutex locking guard in the OPP core. No intentional functional impact. Signed-off-by: Viresh Kumar commit 8c5d8c0b9e8184a86baede72ca392f90d867d22e Author: Viresh Kumar Date: Wed Apr 23 14:21:28 2025 +0530 OPP: Define and use scope-based cleanup helpers Define and use scope-based cleanup helpers for `struct opp` and `struct opp_table`. No intentional functional impact. Signed-off-by: Viresh Kumar commit 03c9d1a5a30d93bff31b4eb0a52f030b4c7f73ea Author: Haren Myneni Date: Tue Apr 29 19:28:47 2025 -0700 Documentation: Fix description format for powerpc RTAS ioctls Fix the description format for the following build warnings: "Documentation/userspace-api/ioctl/ioctl-number.rst:369: ERROR: Malformed table. Text in column margin in table line 301. 0xB2 03-05 arch/powerpc/include/uapi/asm/papr-indices.h powerpc/pseries indices API 0xB2 06-07 arch/powerpc/include/uapi/asm/papr-platform-dump.h powerpc/pseries Platform Dump API 0xB2 08 arch/powerpc/include/uapi/asm/papr-physical-attestation.h powerpc/pseries Physical Attestation API " Reported-by: Stephen Rothwell Signed-off-by: Haren Myneni Fixes: 43d869ac25f1 ("powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls") Fixes: 8aa9efc0be66 ("powerpc/pseries: Add papr-platform-dump character driver for dump retrieval") Fixes: 86900ab620a4 ("powerpc/pseries: Add a char driver for physical-attestation RTAS") Tested-by: Venkat Rao Bagalkote Reviewed-by: Bagas Sanjaya Closes: https://lore.kernel.org/linux-next/20250429181707.7848912b@canb.auug.org.au/ Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250430022847.1118093-1-haren@linux.ibm.com commit 925e8620db51ca6bd5c87256dc71c38770b8f6e1 Author: Haren Myneni Date: Tue Apr 29 14:14:18 2025 -0700 powerpc/pseries: Include linux/types.h in papr-platform-dump.h Fix the following build warning: usr/include/asm/papr-platform-dump.h:12: found __[us]{8,16,32,64} type without #include Fixes: 8aa9efc0be66 ("powerpc/pseries: Add papr-platform-dump character driver for dump retrieval") Closes: https://lore.kernel.org/linux-next/20250429185735.034ba678@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Haren Myneni Tested-by: Venkat Rao Bagalkote [Maddy: fixed the commit to combine tags together] Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250429211419.1081354-1-haren@linux.ibm.com commit 135130db6ee6500e6c82cf44dd831c3fe15f7b5f Merge: 9924db4a75ca29 f2c8f90b4f676c Author: Dave Airlie Date: Fri May 2 14:23:29 2025 +1000 Merge tag 'drm-misc-next-2025-04-29' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v6.16-rc1: UAPI Changes: - panthor now fails in mmap_offset call for a BO created with DRM_PANTHOR_BO_NO_MMAP. - Add DRM_PANTHOR_BO_SET_LABEL ioctl and label panthor kernel BOs. Cross-subsystem Changes: - Add kmap_local_page_try_from_panic for drm/panic. - Add DT bindings for panels. - Update DT bindings for imagination. - Extend %p4cc in lib/vsprintf.c to support fourcc printing. Core Changes: - Remove the disgusting turds. - Register definition updates for DP. - DisplayID timing blocks refactor. - Remove now unused mipi_dsi_dsc_write_seq. - Convert panel drivers to not return error in prepare/enable and unprepare/disable calls. Driver Changes: - Assorted small fixes and featuers for rockchip, panthor, accel/ivpu, accel/amdxdna, hisilicon/hibmc, i915/backlight, sysfb, accel/qaic, udl, etnaviv, virtio, xlnx, panel/boe-bf060y8m-aj0, bridge/synopsis, panthor, panel/samsung/sofef00m, lontium/lt9611uxc, nouveau, panel/himax-hx8279, panfrost, st7571-i2c. - Improve hibmc interrupt handling and add HPD support. - Add NLT NL13676BC25-03F, Tianma TM070JDHG34-00, Himax HX8279/HX8279-D DDIC, Visionox G2647FB105, Sitronix ST7571 LCD Controller, panels. - Add zpos, alpha and blend to renesas. - Convert drivers to use drm_gem_is_imported, replacing gem->import_attach. - Support TI AM68 GPU in imagination. - Support panic handler in virtio. - Add support to get the panel from DP AUX bus in rockchip and add RK3588 support. - Make sofef00 only support the sofef00 panel, not another unrelated one. - Add debugfs BO dumping support to panthor, and print associated labels. - Implement heartbeat based hangcheck in ivpu. - Mass convert drivers to devm_drm_bridge_alloc api. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://lore.kernel.org/r/e2a958d9-e506-4962-8bae-0dbf2ecc000f@linux.intel.com commit a92d87d2f90e28516d1934f22c559ee85330bb6d Author: Bo Liu Date: Wed Apr 23 21:08:29 2025 -0400 hwmon: (isl28022, nct7363) Convert to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20250424010829.2610-1-liubo03@inspur.com Signed-off-by: Guenter Roeck commit 25be318324563c63cbd9cb53186203a08d2f83a1 Author: Alexei Safin Date: Thu Apr 24 23:26:54 2025 +0300 hwmon: (asus-ec-sensors) check sensor index in read_string() Prevent a potential invalid memory access when the requested sensor is not found. find_ec_sensor_index() may return a negative value (e.g. -ENOENT), but its result was used without checking, which could lead to undefined behavior when passed to get_sensor_info(). Add a proper check to return -EINVAL if sensor_index is negative. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC") Signed-off-by: Alexei Safin Link: https://lore.kernel.org/r/20250424202654.5902-1-a.safin@rosa.ru [groeck: Return error code returned from find_ec_sensor_index] Signed-off-by: Guenter Roeck commit a60d965931a8957f175cab2a5f594053fbdd9a58 Author: Daniel Grainger Date: Thu May 1 15:19:53 2025 +0200 hwmon: (asus-ec-sensors) add ROG MAXIMUS Z90 Formula. Board and chipset information is from LibreHardwareMonitor [1]. [1] https://github.com/LibreHardwareMonitor/LibreHardwareMonitor Signed-off-by: Daniel Grainger Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20250501132009.726742-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit 67dd139c917aa4773139807e9258c3aa88ac1436 Author: Krzysztof Kozlowski Date: Thu May 1 17:09:36 2025 +0200 psci: MAINTAINERS: Include DT binding in the entry Updates to PSCI Devicetree binding seems to be not picked up from the mailing list, probably because actual maintainers are not CC-ed. Add the binding to the PCSI maintainers entry. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501150934.77317-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 3346f751dfc9af942255f708160e69f81a9445ec Author: Krzysztof Kozlowski Date: Thu May 1 17:09:35 2025 +0200 dt-bindings: arm: psci: change labels to lower-case in example DTS coding style expects labels to be lowercase, so adjust the example code. No functional impact. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250501150934.77317-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 630cb33ccfcd04563598d0f0edd96c94ddf3352d Author: Alexey Charkov Date: Wed Apr 30 14:42:45 2025 +0400 dt-bindings: net: via-rhine: Convert to YAML Rewrite the textual description for the VIA Rhine platform Ethernet controller as YAML schema, and switch the filename to follow the compatible string. These are used in several VIA/WonderMedia SoCs Signed-off-by: Alexey Charkov Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250430-rhine-binding-v2-1-4290156c0f57@gmail.com Signed-off-by: Jakub Kicinski commit 14a0087e7236228d56bfa3fab7084c19fcb513fb Author: Andrea Mayer Date: Tue Apr 29 15:24:53 2025 +0200 ipv6: sr: switch to GFP_ATOMIC flag to allocate memory during seg6local LWT setup Recent updates to the locking mechanism that protects IPv6 routing tables [1] have affected the SRv6 networking subsystem. Such changes cause problems with some SRv6 Endpoints behaviors, like End.B6.Encaps and also impact SRv6 counters. Starting from commit 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE."), the inet6_rtm_newroute() function no longer needs to acquire the RTNL lock for creating and configuring IPv6 routes and set up lwtunnels. The RTNL lock can be avoided because the ip6_route_add() function finishes setting up a new route in a section protected by RCU. This makes sure that no dev/nexthops can disappear during the operation. Because of this, the steps for setting up lwtunnels - i.e., calling lwtunnel_build_state() - are now done in a RCU lock section and not under the RTNL lock anymore. However, creating and configuring a lwtunnel instance in an RCU-protected section can be problematic when that tunnel needs to allocate memory using the GFP_KERNEL flag. For example, the following trace shows what happens when an SRv6 End.B6.Encaps behavior is instantiated after commit 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE."): [ 3061.219696] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:321 [ 3061.226136] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 445, name: ip [ 3061.232101] preempt_count: 0, expected: 0 [ 3061.235414] RCU nest depth: 1, expected: 0 [ 3061.238622] 1 lock held by ip/445: [ 3061.241458] #0: ffffffff83ec64a0 (rcu_read_lock){....}-{1:3}, at: ip6_route_add+0x41/0x1e0 [ 3061.248520] CPU: 1 UID: 0 PID: 445 Comm: ip Not tainted 6.15.0-rc3-micro-vm-dev-00590-ge527e891492d #2058 PREEMPT(full) [ 3061.248532] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 3061.248549] Call Trace: [ 3061.248620] [ 3061.248633] dump_stack_lvl+0xa9/0xc0 [ 3061.248846] __might_resched+0x218/0x360 [ 3061.248871] __kmalloc_node_track_caller_noprof+0x332/0x4e0 [ 3061.248889] ? rcu_is_watching+0x3a/0x70 [ 3061.248902] ? parse_nla_srh+0x56/0xa0 [ 3061.248938] kmemdup_noprof+0x1c/0x40 [ 3061.248952] parse_nla_srh+0x56/0xa0 [ 3061.248969] seg6_local_build_state+0x2e0/0x580 [ 3061.248992] ? __lock_acquire+0xaff/0x1cd0 [ 3061.249013] ? do_raw_spin_lock+0x111/0x1d0 [ 3061.249027] ? __pfx_seg6_local_build_state+0x10/0x10 [ 3061.249068] ? lwtunnel_build_state+0xe1/0x3a0 [ 3061.249274] lwtunnel_build_state+0x10d/0x3a0 [ 3061.249303] fib_nh_common_init+0xce/0x1e0 [ 3061.249337] ? __pfx_fib_nh_common_init+0x10/0x10 [ 3061.249352] ? in6_dev_get+0xaf/0x1f0 [ 3061.249369] ? __rcu_read_unlock+0x64/0x2e0 [ 3061.249392] fib6_nh_init+0x290/0xc30 [ 3061.249422] ? __pfx_fib6_nh_init+0x10/0x10 [ 3061.249447] ? __lock_acquire+0xaff/0x1cd0 [ 3061.249459] ? _raw_spin_unlock_irqrestore+0x22/0x70 [ 3061.249624] ? ip6_route_info_create+0x423/0x520 [ 3061.249641] ? rcu_is_watching+0x3a/0x70 [ 3061.249683] ip6_route_info_create_nh+0x190/0x390 [ 3061.249715] ip6_route_add+0x71/0x1e0 [ 3061.249730] ? __pfx_inet6_rtm_newroute+0x10/0x10 [ 3061.249743] inet6_rtm_newroute+0x426/0xc50 [ 3061.249764] ? avc_has_perm_noaudit+0x13d/0x360 [ 3061.249853] ? __pfx_inet6_rtm_newroute+0x10/0x10 [ 3061.249905] ? __lock_acquire+0xaff/0x1cd0 [ 3061.249962] ? rtnetlink_rcv_msg+0x52f/0x890 [ 3061.249996] ? __pfx_inet6_rtm_newroute+0x10/0x10 [ 3061.250012] rtnetlink_rcv_msg+0x551/0x890 [ 3061.250040] ? __pfx_rtnetlink_rcv_msg+0x10/0x10 [ 3061.250065] ? __lock_acquire+0xaff/0x1cd0 [ 3061.250092] netlink_rcv_skb+0xbd/0x1f0 [ 3061.250108] ? __pfx_rtnetlink_rcv_msg+0x10/0x10 [ 3061.250124] ? __pfx_netlink_rcv_skb+0x10/0x10 [ 3061.250179] ? netlink_deliver_tap+0x10b/0x700 [ 3061.250210] netlink_unicast+0x2e7/0x410 [ 3061.250232] ? __pfx_netlink_unicast+0x10/0x10 [ 3061.250241] ? __lock_acquire+0xaff/0x1cd0 [ 3061.250280] netlink_sendmsg+0x366/0x670 [ 3061.250306] ? __pfx_netlink_sendmsg+0x10/0x10 [ 3061.250313] ? find_held_lock+0x2d/0xa0 [ 3061.250344] ? import_ubuf+0xbc/0xf0 [ 3061.250370] ? __pfx_netlink_sendmsg+0x10/0x10 [ 3061.250381] __sock_sendmsg+0x13e/0x150 [ 3061.250420] ____sys_sendmsg+0x33d/0x450 [ 3061.250442] ? __pfx_____sys_sendmsg+0x10/0x10 [ 3061.250453] ? __pfx_copy_msghdr_from_user+0x10/0x10 [ 3061.250489] ? __pfx_slab_free_after_rcu_debug+0x10/0x10 [ 3061.250514] ___sys_sendmsg+0xe5/0x160 [ 3061.250530] ? __pfx____sys_sendmsg+0x10/0x10 [ 3061.250568] ? __lock_acquire+0xaff/0x1cd0 [ 3061.250617] ? find_held_lock+0x2d/0xa0 [ 3061.250678] ? __virt_addr_valid+0x199/0x340 [ 3061.250704] ? preempt_count_sub+0xf/0xc0 [ 3061.250736] __sys_sendmsg+0xca/0x140 [ 3061.250750] ? __pfx___sys_sendmsg+0x10/0x10 [ 3061.250786] ? syscall_exit_to_user_mode+0xa2/0x1e0 [ 3061.250825] do_syscall_64+0x62/0x140 [ 3061.250844] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 3061.250855] RIP: 0033:0x7f0b042ef914 [ 3061.250868] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41 89 d4 55 48 89 f5 53 [ 3061.250876] RSP: 002b:00007ffc2d113ef8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 3061.250885] RAX: ffffffffffffffda RBX: 00000000680f93fa RCX: 00007f0b042ef914 [ 3061.250891] RDX: 0000000000000000 RSI: 00007ffc2d113f60 RDI: 0000000000000003 [ 3061.250897] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000008 [ 3061.250902] R10: fffffffffffff26d R11: 0000000000000246 R12: 0000000000000001 [ 3061.250907] R13: 000055a961f8a520 R14: 000055a961f63eae R15: 00007ffc2d115270 [ 3061.250952] To solve this issue, we replace the GFP_KERNEL flag with the GFP_ATOMIC one in those SRv6 Endpoints that need to allocate memory during the setup phase. This change makes sure that memory allocations are handled in a way that works with RCU critical sections. [1] - https://lore.kernel.org/all/20250418000443.43734-1-kuniyu@amazon.com/ Fixes: 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE.") Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Link: https://patch.msgid.link/20250429132453.31605-1-andrea.mayer@uniroma2.it Signed-off-by: Jakub Kicinski commit a3e1c0ad835702555d90565584ab6f723adf7f94 Author: Heiner Kallweit Date: Tue Apr 29 08:04:46 2025 +0200 net: phy: factor out provider part from mdio_bus.c After 52358dd63e34 ("net: phy: remove function stubs") there's a problem if CONFIG_MDIO_BUS is set, but CONFIG_PHYLIB is not. mdiobus_scan() uses phylib functions like get_phy_device(). Bringing back the stub wouldn't make much sense, because it would allow to compile mdiobus_scan(), but the function would be unusable. The stub returned NULL, and we have the following in mdiobus_scan(): phydev = get_phy_device(bus, addr, c45); if (IS_ERR(phydev)) return phydev; So calling mdiobus_scan() w/o CONFIG_PHYLIB would cause a crash later in mdiobus_scan(). In general the PHYLIB functionality isn't optional here. Consequently, MDIO bus providers depend on PHYLIB. Therefore factor it out and build it together with the libphy core modules. In addition make all MDIO bus providers under /drivers/net/mdio depend on PHYLIB. Same applies to enetc MDIO bus provider. Note that PHYLIB selects MDIO_DEVRES, therefore we can omit this here. Fixes: 52358dd63e34 ("net: phy: remove function stubs") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504270639.mT0lh2o1-lkp@intel.com/ Reviewed-by: Jacob Keller Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/c74772a9-dab6-44bf-a657-389df89d85c2@gmail.com Signed-off-by: Jakub Kicinski commit 51cf06ddafc91e017beecfaf81b3b082033b0b93 Author: Daniel Golle Date: Sun Apr 27 02:01:29 2025 +0100 net: ethernet: mtk_eth_soc: add support for MT7988 internal 2.5G PHY The MediaTek MT7988 SoC comes with an single built-in Ethernet PHY for 2500Base-T/1000Base-T/100Base-TX/10Base-T link partners in addition to the built-in 1GE switch. The built-in PHY only supports full duplex. Add muxes allowing to select GMAC2->2.5G PHY path and add basic support for XGMAC as the built-in 2.5G PHY is internally connected via XGMII. The XGMAC features will also be used by 5GBase-R, 10GBase-R and USXGMII SerDes modes which are going to be added once support for standalone PCS drivers is in place. In order to make use of the built-in 2.5G PHY the appropriate PHY driver as well as (proprietary) PHY firmware has to be present as well. Signed-off-by: Daniel Golle Link: https://patch.msgid.link/9072cefbff6db969720672ec98ed5cef65e8218c.1745715380.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 7a4f15cadc5670dbc5fc01d7d75ee8b9443b64fe Author: Eric Biggers Date: Mon Apr 28 12:16:06 2025 -0700 r8152: use SHA-256 library API instead of crypto_shash API This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Signed-off-by: Eric Biggers Link: https://patch.msgid.link/20250428191606.856198-1-ebiggers@kernel.org Signed-off-by: Jakub Kicinski commit 7840e4d6f48a75413470935ebdc4bab4fc0c035e Author: Daniel Braunwarth Date: Tue Apr 29 13:33:37 2025 +0200 net: phy: realtek: Add support for WOL magic packet on RTL8211F The RTL8211F supports multiple WOL modes. This patch adds support for magic packets. The PHY notifies the system via the INTB/PMEB pin when a WOL event occurs. Signed-off-by: Daniel Braunwarth Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250429-realtek_wol-v2-1-8f84def1ef2c@kuka.com Signed-off-by: Jakub Kicinski commit c76bab22e920ba45665ed1e9f9600a9b561a4f5d Author: Gal Pressman Date: Wed Apr 30 08:48:01 2025 +0300 selftests: drv-net: rss_input_xfrm: Check test prerequisites before running Ensure the following prerequisites before executing the test: 1. 'socat' is installed on the remote host. 2. Python version supports socket.SO_INCOMING_CPU (available since v3.11). Skip the test if either prerequisite is not met. Reviewed-by: Nimrod Oren Signed-off-by: Gal Pressman Link: https://patch.msgid.link/20250430054801.750646-1-gal@nvidia.com Signed-off-by: Jakub Kicinski commit 249a965c3759f6a7bffa6e84e33b7020dc0d4d1c Author: Ayushi Makhija Date: Fri May 2 01:44:35 2025 +0300 drm/msm/dsi: add DSI support for SA8775P Add DSI Controller v2.5.1 support for SA8775P SoC. Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/651433/ Link: https://lore.kernel.org/r/20250424062431.2040692-6-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit d3979192fac52ef5d158ca494db25bc4fe3166bf Author: Ayushi Makhija Date: Thu Apr 24 11:54:24 2025 +0530 drm/msm/dsi: add DSI PHY configuration on SA8775P The SA8775P SoC uses the 5nm (v4.2) DSI PHY driver with different enable regulator load. Signed-off-by: Ayushi Makhija Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/649842/ Link: https://lore.kernel.org/r/20250424062431.2040692-5-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit a6f2524f4d5e3cfcc17a6de646cb978007d7832f Author: Ayushi Makhija Date: Thu Apr 24 11:54:23 2025 +0530 dt-bindings: display: msm: document DSI controller and phy on SA8775P Document DSI controller and phy on SA8775P platform. Signed-off-by: Ayushi Makhija Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649839/ Link: https://lore.kernel.org/r/20250424062431.2040692-4-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit 2a0195b94cbc0583c05cb4c9b1b57ba637a25180 Author: Ayushi Makhija Date: Thu Apr 24 11:54:22 2025 +0530 dt-bindings: msm: dsi-controller-main: document the SA8775P DSI CTRL Document the DSI CTRL on the SA8775P Platform. Signed-off-by: Ayushi Makhija Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649855/ Link: https://lore.kernel.org/r/20250424062431.2040692-3-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit 850e13b65e3ce47c88aedae812352e55848a21c2 Author: Ayushi Makhija Date: Thu Apr 24 11:54:21 2025 +0530 dt-bindings: display: msm-dsi-phy-7nm: document the SA8775P DSI PHY Document the DSI PHY on the SA8775P Platform. Signed-off-by: Ayushi Makhija Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649838/ Link: https://lore.kernel.org/r/20250424062431.2040692-2-quic_amakhija@quicinc.com Signed-off-by: Dmitry Baryshkov commit 60b8d3a2365a30aadd514aaf571c6baecd9885ba Author: Konrad Dybcio Date: Thu Mar 6 19:11:14 2025 +0100 dt-bindings: display: msm: sm8350-mdss: Describe the CPU-CFG icc path There's a separate path that allows register access from CPUSS. Describe it. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641464/ Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-2-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 98a8920e7b07641eb1996b3c39b9ce27fc05dbb9 Author: Dmitry Baryshkov Date: Fri May 2 01:41:42 2025 +0300 drm/msm/dp: reuse generic HDMI codec implementation The MSM DisplayPort driver implements several HDMI codec functions in the driver, e.g. it manually manages HDMI codec device registration, returning ELD and plugged_cb support. In order to reduce code duplication reuse drm_hdmi_audio_* helpers and drm_bridge_connector integration. Signed-off-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/649728/ Link: https://lore.kernel.org/r/20250423-dp-hdmi-audio-v7-1-8407a23e55b2@oss.qualcomm.com commit 075667e986f33ca6e897094b1f0fc92c2745d99b Author: Dmitry Baryshkov Date: Sat Mar 1 11:24:58 2025 +0200 drm/msm/dpu: remove DSC feature bit for PINGPONG on SDM630 The SDM630 platform doesn't have DSC blocks nor does have it DSC registers in the PINGPONG block. Drop the DPU_PINGPONG_DSC feature bit from the PINGPONG's feature mask, replacing PINGPONG_SDM845_MASK with BIT(DPU_PINGPONG_DITHER). Fixes: 7204df5e7e68 ("drm/msm/dpu: add support for SDM660 and SDM630 platforms") Reported-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/640308/ Link: https://lore.kernel.org/r/20250301-dpu-fix-catalog-v2-5-498271be8b50@linaro.org Signed-off-by: Dmitry Baryshkov commit e1fbb0d78e86eb8d6b11ae7a48905943e8c7b0bd Author: Dmitry Baryshkov Date: Sat Mar 1 11:24:57 2025 +0200 drm/msm/dpu: drop TE2 definitions Neither DPU driver nor vendor SDE driver do not use TE2 definitions (and, in case of SDE driver, never did). Semantics of the TE2 feature bit and .te2 sblk are not completely clear. Drop these bits from the catalog with the possibility of reintroducing them later if we need to support ppsplit. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/640305/ Link: https://lore.kernel.org/r/20250301-dpu-fix-catalog-v2-4-498271be8b50@linaro.org Signed-off-by: Dmitry Baryshkov commit 5232a29ebc74df4abf790147a06db451d824cd92 Author: Dmitry Baryshkov Date: Sat Mar 1 11:24:56 2025 +0200 drm/msm/dpu: remove DSC feature bit for PINGPONG on MSM8953 The MSM8953 platform doesn't have DSC blocks nor does have it DSC registers in the PINGPONG block. Drop the DPU_PINGPONG_DSC feature bit from the PINGPONG's feature mask and, as it is the only remaining bit, drop the .features assignment completely. Fixes: 7a6109ce1c2c ("drm/msm/dpu: Add support for MSM8953") Reported-by: Abhinav Kumar Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/640303/ Link: https://lore.kernel.org/r/20250301-dpu-fix-catalog-v2-3-498271be8b50@linaro.org Signed-off-by: Dmitry Baryshkov commit 5be98120115c46907921e29344291628cf79912a Author: Dmitry Baryshkov Date: Sat Mar 1 11:24:55 2025 +0200 drm/msm/dpu: remove DSC feature bit for PINGPONG on MSM8917 The MSM8917 platform doesn't have DSC blocks nor does have it DSC registers in the PINGPONG block. Drop the DPU_PINGPONG_DSC feature bit from the PINGPONG's feature mask and, as it is the only remaining bit, drop the .features assignment completely. Fixes: 62af6e1cb596 ("drm/msm/dpu: Add support for MSM8917") Reported-by: Abhinav Kumar Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/640301/ Link: https://lore.kernel.org/r/20250301-dpu-fix-catalog-v2-2-498271be8b50@linaro.org Signed-off-by: Dmitry Baryshkov commit b43c524134e0b0ae38acecc4e1dc585940ff6f88 Author: Dmitry Baryshkov Date: Sat Mar 1 11:24:54 2025 +0200 drm/msm/dpu: remove DSC feature bit for PINGPONG on MSM8937 The MSM8937 platform doesn't have DSC blocks nor does have it DSC registers in the PINGPONG block. Drop the DPU_PINGPONG_DSC feature bit from the PINGPONG's feature mask and, as it is the only remaining bit, drop the .features assignment completely. Fixes: c079680bb0fa ("drm/msm/dpu: Add support for MSM8937") Reported-by: Abhinav Kumar Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/640299/ Link: https://lore.kernel.org/r/20250301-dpu-fix-catalog-v2-1-498271be8b50@linaro.org Signed-off-by: Dmitry Baryshkov commit 88321e3529f1e4541fef25a5625b18ce234765de Author: Dmitry Baryshkov Date: Tue Apr 8 16:54:27 2025 +0300 drm/msm/hdmi: use new helper for ACR tables Use new drm_hdmi_acr_get_n_cts() helper instead of hand-coding the tables. Instead of storing the rate 'index', store the audio sample rate in hdmi->audio.rate, removing the need for even more defines. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/647507/ Link: https://lore.kernel.org/r/20250408-drm-hdmi-acr-v2-3-dee7298ab1af@oss.qualcomm.com commit 1735917ac44a0e28d7f247936736a2292c50bba3 Author: Dmitry Baryshkov Date: Tue Apr 8 16:54:26 2025 +0300 drm/msm/hdmi: move msm_hdmi_audio_update() out of msm_hdmi_set_timings() There is a duplication between msm_hdmi_audio_update() calls in msm_hdmi_set_timings() and msm_hdmi_bridge_atomic_pre_enable(). Merge those two calls to be performed unconditionally at msm_hdmi_bridge_atomic_pre_enable(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/647505/ Link: https://lore.kernel.org/r/20250408-drm-hdmi-acr-v2-2-dee7298ab1af@oss.qualcomm.com commit 1785751734724d9c399809f7d1e3733e590da4bc Author: Dmitry Baryshkov Date: Fri Apr 18 10:50:03 2025 +0300 drm/msm/dpu: add catalog entry for SAR2130P Add DPU driver support for the Qualcomm SAR2130P platform. It is mostly the same as SM8550, minor differences in the CDP configuration. Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/649258/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-8-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 8e63b2075e0128e7849046ac1f43040739035096 Author: Dmitry Baryshkov Date: Fri Apr 18 10:50:02 2025 +0300 drm/msm/dsi/phy: add configuration for SAR2130P Qualcomm SAR2130P requires slightly different setup for the DSI PHY. It is a 5nm PHY (like SM8450), so supplies are the same, but the rest of the configuration is the same as SM8550 DSI PHY. Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/649257/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-7-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 1e7cbfea6624fda144d0ab072abb3578816bc3a8 Author: Dmitry Baryshkov Date: Fri Apr 18 10:50:01 2025 +0300 drm/msm/mdss: add SAR2130P device configuration Add compatible and device configuration for the Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/649256/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-6-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 3096209b7a62f9d45475f7734d6b15a2a79e72a3 Author: Dmitry Baryshkov Date: Fri Apr 18 10:50:00 2025 +0300 dt-bindings: display/msm: Add Qualcomm SAR2130P Describe the Mobile Display SubSystem (MDSS) device present on the Qualcomm SAR2130P platform. It looks pretty close to SM8550 on the system level. SAR2130P features two DSI hosts and single DisplayPort controller. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649265/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-5-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 0454b9057e983455cd1011d2c8e1b3697ece14c9 Author: Yixun Lan Date: Wed Apr 30 13:32:04 2025 +0800 dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet MAC compatible to the A64 version. Reviewed-by: Andre Przywara Acked-by: Krzysztof Kozlowski Signed-off-by: Yixun Lan Link: https://patch.msgid.link/20250430-01-sun55i-emac0-v3-2-6fc000bbccbd@gentoo.org Signed-off-by: Jakub Kicinski commit 08906eacce1366484923158d6b15f8253e5c628a Merge: 337079d31fb160 c058c5f8b6e424 Author: Jakub Kicinski Date: Thu May 1 17:51:31 2025 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-04-29 (igb, igc, ixgbe, idpf) For igb: Kurt Kanzenbach adds linking of IRQs and queues to NAPI instances and adds persistent NAPI config. Lastly, he removes undesired IRQs that occur while busy polling. For igc: Kurt Kanzenbach switches the Tx mode for MQPRIO offload to harmonize the current implementation with TAPRIO. For ixgbe: Jedrzej adds separate ethtool ops for E610 devices to account for device differences. Slawomir adds devlink region support for E610 devices. For idpf: Mateusz assigns and utilizes the ptype field out of libeth_rqe_info. Michal removes unreachable code. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: idpf: remove unreachable code from setting mailbox idpf: assign extracted ptype to struct libeth_rqe_info field ixgbe: devlink: add devlink region support for E610 ixgbe: add E610 .set_phys_id() callback implementation ixgbe: apply different rules for setting FC on E610 ixgbe: add support for ACPI WOL for E610 ixgbe: create E610 specific ethtool_ops structure igc: Change Tx mode for MQPRIO offloading igc: Limit netdev_tc calls to MQPRIO igb: Get rid of spurious interrupts igb: Add support for persistent NAPI config igb: Link queues to NAPI instances igb: Link IRQs to NAPI instances ==================== Link: https://patch.msgid.link/20250429234651.3982025-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 9e4f11c1228cc8ebf236cfa51d44abafec80f326 Author: Damien Le Moal Date: Mon Apr 7 16:52:22 2025 +0900 Documentation: Document the new zoned loop block device driver Introduce the zoned_loop.rst documentation file under admin-guide/blockdev to document the zoned loop block device driver. An overview of the driver is provided and its usage to create and delete zoned devices described. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250407075222.170336-3-dlemoal@kernel.org Signed-off-by: Jens Axboe commit eb0570c7df23c2f32fe899fcdaf8fca9a5ecd51e Author: Damien Le Moal Date: Mon Apr 7 16:52:21 2025 +0900 block: new zoned loop block device driver The zoned loop block device driver allows a user to create emulated zoned block devices using one regular file per zone as backing storage. Compared to null_blk or scsi_debug, it has the advantage of allowing emulating large zoned devices without requiring the same amount of memory as the capacity of the emulated device. Furthermore, zoned devices emulated with this driver can be re-started after a host reboot without any loss of the state of the device zones, which is something that null_blk and scsi_debug do not support. This initial implementation is simple and does not support zone resource limits. That is, a zoned loop block device limits for the maximum number of open zones and maximum number of active zones is always 0. This driver can be either compiled in-kernel or as a module, named "zloop". Compilation of this driver depends on the block layer support for zoned block device (CONFIG_BLK_DEV_ZONED must be set). Using the zloop driver to create and delete zoned block devices is done by writing commands to the zoned loop control character device file (/dev/zloop-control). Creating a device is done with: $ echo "add [options]" > /dev/zloop-control The options available for the "add" operation cat be listed by reading the zloop-control device file: $ cat /dev/zloop-control add id=%d,capacity_mb=%u,zone_size_mb=%u,zone_capacity_mb=%u,conv_zones=%u,base_dir=%s,nr_queues=%u,queue_depth=%u remove id=%d The options available allow controlling the zoned device total capacity, zone size, zone capactity of sequential zones, total number of conventional zones, base directory for the zones backing file, number of I/O queues and the maximum queue depth of I/O queues. Deleting a device is done using the "remove" command: $ echo "remove id=0" > /dev/zloop-control This implementation passes various tests using zonefs and fio (t/zbd tests) and provides a state machine for zone conditions that is compliant with the T10 ZBC and NVMe ZNS specifications. Co-developed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250407075222.170336-2-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 759fe7181723c39367a78327ac17ac917931f2b3 Author: Dmitry Baryshkov Date: Fri Apr 18 10:49:59 2025 +0300 dt-bindings: display/msm: qcom,sc7280-dpu: describe SAR2130P Describe DPU controller present on Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649254/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-4-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 262650e71854ff701ca6c3a6860fbffc94243999 Author: Dmitry Baryshkov Date: Fri Apr 18 10:49:58 2025 +0300 dt-bindings: display/msm: dsi-phy-7nm: describe SAR2130P Describe MIPI DSI PHY present on Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649252/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-3-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 3c70c9d0a99d2083cda03f04c9f1843cfcf9f7c3 Author: Dmitry Baryshkov Date: Fri Apr 18 10:49:57 2025 +0300 dt-bindings: display/msm: dsi-controller-main: describe SAR2130P Describe MIPI DSI controller present on Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649250/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-2-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit b341da1172fe8bb21f6bffcaa3f4b714f544ed75 Author: Dmitry Baryshkov Date: Fri Apr 18 10:49:56 2025 +0300 dt-bindings: display/msm: dp-controller: describe SAR2130P Describe DisplayPort controller present on Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/649263/ Link: https://lore.kernel.org/r/20250418-sar2130p-display-v5-1-442c905cb3a4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 79af56964ee5aec9f8da21a0d240003ba931ae2f Author: Dmitry Baryshkov Date: Fri Apr 25 22:49:12 2025 +0300 drm/msm/dpu: rename non-SmartDMA feature masks to be more explicit It is easy to skip or ignore the fact that the default SSPP feature masks for SDM845+ don't include the SmartDMA bit (both during development and during the review stage). Rename SSPP feature masks to make it more explicit that using non-SmartDMA masks should not be an exception rather than the rule. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/650425/ Link: https://lore.kernel.org/r/20250425-dpu-rework-vig-masks-v2-5-c71900687d08@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 3f5e910b33a3c1d9875f938f200e83e2b3f5c431 Author: Dmitry Baryshkov Date: Fri Apr 25 22:49:11 2025 +0300 drm/msm/dpu: enable SmartDMA on SM8550 In order to support more versatile configuration of the display pipes on SM8550, enable SmartDMA for this platform. Patchwork: https://patchwork.freedesktop.org/patch/650424/ Link: https://lore.kernel.org/r/20250425-dpu-rework-vig-masks-v2-4-c71900687d08@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 63958b80c2c50e630e2a429fa600c8c721213c22 Author: Dmitry Baryshkov Date: Fri Apr 25 22:49:10 2025 +0300 drm/msm/dpu: enable SmartDMA on SC8280XP In order to support more versatile configuration of the display pipes on SC8280XP, enable SmartDMA for this platform. Patchwork: https://patchwork.freedesktop.org/patch/650420/ Link: https://lore.kernel.org/r/20250425-dpu-rework-vig-masks-v2-3-c71900687d08@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 8dcccd7a156ffb3157de7f527cc7c6100e9a455a Author: Dmitry Baryshkov Date: Fri Apr 25 22:49:09 2025 +0300 drm/msm/dpu: enable SmartDMA on SC8180X Reworking of the catalog dropped the SmartDMA feature bit on the SC8180X platform. Renable SmartDMA support on this SoC. Fixes: 460c410f02e4 ("drm/msm/dpu: duplicate sdm845 catalog entries") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/650421/ Link: https://lore.kernel.org/r/20250425-dpu-rework-vig-masks-v2-2-c71900687d08@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 6a2343de0b6f70a21bf503ac4688dc905cb068e1 Author: Dmitry Baryshkov Date: Fri Apr 25 22:49:08 2025 +0300 drm/msm/dpu: enable SmartDMA on SM8150 Reworking of the catalog dropped the SmartDMA feature bit on the SM8150 platform. Renable SmartDMA support on this SoC. Fixes: 460c410f02e4 ("drm/msm/dpu: duplicate sdm845 catalog entries") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/650418/ Link: https://lore.kernel.org/r/20250425-dpu-rework-vig-masks-v2-1-c71900687d08@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 3ed12a3664b362e3462cca61d41f9a9460c9e260 Author: Dmitry Baryshkov Date: Sat Apr 26 07:51:17 2025 +0300 drm/msm/dpu: allow sharing SSPP between planes Since SmartDMA planes provide two rectangles, it is possible to use them to drive two different DRM planes, first plane getting the rect_0, another one using rect_1 of the same SSPP. The sharing algorithm is pretty simple, it requires that each of the planes can be driven by the single rectangle and only consecutive planes are considered. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/650441/ Link: https://lore.kernel.org/r/20250426-dpu-share-sspp-v7-1-6f4c719e373c@oss.qualcomm.com Reviewed-by: Konrad Dybcio commit 9b565edc44b65adc51df6dcaf1b2bc00fac53110 Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:56 2025 +0300 drm/msm/mdp4: switch LVDS to use drm_bridge/_connector LVDS support in MDP4 driver makes use of drm_connector directly. However LCDC encoder and LVDS connector are wrappers around drm_panel. Switch them to use drm_panel_bridge/drm_bridge_connector. This allows using standard interface for the drm_panel and also inserting additional bridges between encoder and panel. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/650290/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-6-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit f26b80359bc71127c7f572ce0e83e222122c31a3 Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:55 2025 +0300 drm/msm/mdp4: move move_valid callback to lcdc_encoder We can check the LCDC clock directly from the LCDC encoder driver, so remove it from the LVDS connector. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/650285/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-5-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit b641bf534cf445d869edf1a3f334a9b4214bc214 Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:54 2025 +0300 drm/msm/mdp4: use parent_data for LVDS PLL Instead of using .parent_names, use .parent_data, which binds parent clocks by using relative names specified in DT in addition to using global system clock names. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/650284/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-4-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 9c2f63da6a70d38c32fd1ea3126be0c2989a6d1d Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:53 2025 +0300 drm/msm/mdp4: register the LVDS PLL as a clock provider The LVDS/LCDC controller uses pixel clock coming from the multimedia controller (mmcc) rather than using the PLL directly. Stop using LVDS PLL directly and register it as a clock provider. Use lcdc_clk as a pixel clock for the LCDC. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/650280/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-3-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit f6720d64d8eb859bb7c3c2bab85896c53fcccf21 Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:52 2025 +0300 drm/msm/mdp4: drop mpd4_lvds_pll_init stub Drop the !COMMON_CLK stub for mpd4_lvds_pll_init(), the DRM_MSM driver depends on COMMON_CLK. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/650281/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-2-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 2f1d131147aadf41d376dbd01d0d83eca8054deb Author: Dmitry Baryshkov Date: Fri Apr 25 12:51:51 2025 +0300 dt-bindings: display: msm: mdp4: add LCDC clock and PLL source Add the LCDC / LVDS clock input and the XO used to drive internal LVDS PLL to MDP4 controller bindings. The controller also provides LVDS PHY PLL, so add optional #clock-cells to the device. Acked-by: Rob Herring (Arm) Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/650278/ Link: https://lore.kernel.org/r/20250425-fd-mdp4-lvds-v4-1-6b212160b44c@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 6694d17843e82c30287418ea8c244038e336754d Author: Luca Weiss Date: Sun Apr 20 17:12:43 2025 +0200 dt-bindings: msm: qcom,mdss: Document interconnect paths Document two interconnect paths found on the MDSS on MSM8953. Acked-by: Rob Herring (Arm) Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/649391/ Link: https://lore.kernel.org/r/20250420-msm8953-interconnect-v2-1-828715dcb674@lucaweiss.eu Signed-off-by: Dmitry Baryshkov commit 337079d31fb160959f87d7aa22a85b123c500c48 Merge: deeed351e982ac ebd297a2affadb Author: Jakub Kicinski Date: Thu May 1 15:11:17 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc5). No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski commit f263336a41da287c5aebd35be8f1e0422e49bc5c Author: Alan Maguire Date: Wed Apr 30 14:42:49 2025 +0100 selftests/bpf: Add btf dedup test covering module BTF dedup Recently issues were observed with module BTF deduplication failures [1]. Add a dedup selftest that ensures that core kernel types are referenced from split BTF as base BTF types. To do this use bpf_testmod functions which utilize core kernel types, specifically ssize_t bpf_testmod_test_write(struct file *file, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t len); __bpf_kfunc struct sock *bpf_kfunc_call_test3(struct sock *sk); __bpf_kfunc void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb); For each of these ensure that the types they reference - struct file, struct kobject, struct bin_attr etc - are in base BTF. Note that because bpf_testmod.ko is built with distilled base BTF the associated reference types - i.e. the PTR that points at a "struct file" - will be in split BTF. As a result the test resolves typedef and pointer references and verifies the pointed-at or typedef'ed type is in base BTF. Because we use BTF from /sys/kernel/btf/bpf_testmod relocation has occurred for the referenced types and they will be base - not distilled base - types. For large-scale dedup issues, we see such types appear in split BTF and as a result this test fails. Hence it is proposed as a test which will fail when large-scale dedup issues have occurred. [1] https://lore.kernel.org/dwarves/CAADnVQL+-LiJGXwxD3jEUrOonO-fX0SZC8496dVzUXvfkB7gYQ@mail.gmail.com/ Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20250430134249.2451066-1-alan.maguire@oracle.com commit 60cd40eee4f4f57e88bd5dd03f299eb9e17c73e5 Author: Svyatoslav Ryhel Date: Wed Apr 30 08:51:14 2025 +0300 power: supply: Add support for Maxim MAX8971 charger The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger for a one-cell lithium-ion (Li+) battery. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250430055114.11469-3-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit c5a0a64c1222cd2bfab3ae4227caba2f1c0499f5 Author: Svyatoslav Ryhel Date: Wed Apr 30 08:51:13 2025 +0300 dt-bindings: power: supply: Document Maxim MAX8971 charger Add bindings for Maxim MAX8971 charger. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250430055114.11469-2-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit 2dbe74c63cb73829be0aab0d0e7e68b87071b5fa Author: George Moussalem Date: Thu May 1 13:20:51 2025 +0400 spi: dt-bindings: spi-qpic-snand: Add IPQ5018 compatible IPQ5018 contains the QPIC-SPI-NAND flash controller which is the same as the one found in IPQ9574. So let's document the IPQ5018 compatible and use IPQ9574 as the fallback. Signed-off-by: George Moussalem Link: https://patch.msgid.link/20250501-ipq5018-spi-qpic-snand-v1-1-31e01fbb606f@outlook.com Signed-off-by: Mark Brown commit 5db5401c24553d17a087ff5a90789226e4192144 Author: Chen Ni Date: Thu Apr 10 10:52:21 2025 +0800 drm/msm: Convert comma to semicolon Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/647875/ Link: https://lore.kernel.org/r/20250410025221.3358387-1-nichen@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 1fb28a8a984e9189f64f617f364b058605616009 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:56 2025 +0200 drm/msm/dpu: drop now-unused condition for has_legacy_ctls Now as we have dropped the DPU_CTL_SPLIT_DISPLAY from DPU >= 5.0 configuration, drop the rm->has_legacy_ctl condition which short-cutted the check for those platforms. Suggested-by: Marijn Suijten Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641586/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-8-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit a2649952f66ebf41dc188de9a2c2e6d47a8b9cc4 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:55 2025 +0200 drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0 Since DPU 5.0 CTL blocks do not require DPU_CTL_SPLIT_DISPLAY, as single CTL is used for both interfaces. As both RM and encoder now handle active CTLs, drop that feature bit. Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641592/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-7-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit c1824a7992da788b43b9f91d816059f626882a10 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:54 2025 +0200 drm/msm/dpu: allocate single CTL for DPU >= 5.0 Unlike previous generation, since DPU 5.0 it is possible to use just one CTL to handle all INTF and WB blocks for a single output. And one has to use single CTL to support bonded DSI config. Allocate single CTL for these DPU versions. Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641587/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-6-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit e93eee524bb78f3ee4b78654d0083382f98b3d23 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:53 2025 +0200 drm/msm/dpu: don't select single flush for active CTL blocks In case of ACTIVE CTLs, a single CTL is being used for flushing all INTF blocks. Don't skip programming the CTL on those targets. Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641585/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-5-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit df99bdfcb2d58045b0ed808a1c174f53676b08a0 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:52 2025 +0200 drm/msm/dpu: use single CTL if it is the only CTL returned by RM On DPU >= 5.0 CTL blocks were reworked in order to support using a single CTL for all outputs. In preparation of reworking the RM code to return single CTL make sure that dpu_encoder can cope with that. Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/641582/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-4-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit f1471bc435afa31c8c0c58551922830dc8f4b06b Author: Shree Ramamoorthy Date: Fri Apr 25 15:57:36 2025 -0500 regulator: tps65219: Add TI TPS65214 Regulator Support Add support for TPS65214 regulators (bucks and LDOs) to the TPS65219 Regulator Driver as the TPS65214/TPS65214/TPS65219 PMIC devices have significant register map overlap. TPS65214 is a Power Management IC with 3 Buck regulators (like TPS65215/TPS65219) and has 2 LDOs (like TPS65215). Signed-off-by: Shree Ramamoorthy Link: https://patch.msgid.link/20250425205736.76433-5-s-ramamoorthy@ti.com Signed-off-by: Mark Brown commit 38c9f98db20a649a1f8454f507608b6aef0c9297 Author: Shree Ramamoorthy Date: Fri Apr 25 15:57:35 2025 -0500 regulator: tps65219: Add support for TPS65215 Regulator IRQs Isolate all changes involving regulator IRQ types: - Adding in TPS65215 resources - Organize what resources are common vs device-specific - How the chip_data uses these resource structs - Restructure the probe() for multi-PMIC support. Signed-off-by: Shree Ramamoorthy Link: https://patch.msgid.link/20250425205736.76433-4-s-ramamoorthy@ti.com Signed-off-by: Mark Brown commit 3f2e457efdad5af4164f155bd7ac902258a9b1ce Author: Shree Ramamoorthy Date: Fri Apr 25 15:57:34 2025 -0500 regulator: tps65219: Add support for TPS65215 regulator resources Isolate all changes involving TPS65215 regulator desc and range resources. - 'chipid' will identify which PMIC to support, and the corresponding chip_data struct element to use in probe(). The chip_data struct is helpful for any new PMICs added to this driver. The goal is to add future PMIC info to necessary structs and minimize probe() function edits. - The probe() will now loop through common (overlapping) regulators first, then device-specific structs identified in the chip_data struct. - Add TI TPS65215 PMIC to the existing platform_device_id struct, so the regulator probe() can handle which PMIC chip_data information to use. Signed-off-by: Shree Ramamoorthy Link: https://patch.msgid.link/20250425205736.76433-3-s-ramamoorthy@ti.com Signed-off-by: Mark Brown commit 8c04144e156b49980a786e80c855e41f6c71685c Author: Shree Ramamoorthy Date: Fri Apr 25 15:57:33 2025 -0500 regulator: tps65219: Update struct names Isolate changes that involve renaming to indicate this resource is only for TPS65219 or if it will be common for both devices. The renames are in preparation for adding TPS65215 support. Signed-off-by: Shree Ramamoorthy Link: https://patch.msgid.link/20250425205736.76433-2-s-ramamoorthy@ti.com Signed-off-by: Mark Brown commit 2056d7a7df5d9a08144671afccb6970ccd595b89 Author: Chancel Liu Date: Mon Apr 21 19:57:01 2025 +0900 ASoC: fsl_rpmsg: Allocate a smaller buffer size for capture stream If both playback and capture streams have large buffer size in low power audio case, the total size will exceed the maximum buffer size for this sound card. Capture stream doesn't need so large buffer size in fact. So calculate a reasonable smaller buffer size and allocate it for capture stream. Signed-off-by: Chancel Liu Link: https://patch.msgid.link/20250421105701.2273588-2-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 17fa55fe77d8234131ce0728a735da6dea19acd5 Author: Chancel Liu Date: Mon Apr 21 19:57:00 2025 +0900 ASoC: fsl_rpmsg: Configure CPU DAI for card that sits on rpmsg-micfil-channel Sound card that sits on rpmsg-micfil-channel has different settings on CPU DAI. Signed-off-by: Chancel Liu Link: https://patch.msgid.link/20250421105701.2273588-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit c23c7c60711e34963c78f18fc3b9aaa313b6c8ce Author: Krzysztof Kozlowski Date: Sun Apr 27 12:51:07 2025 +0200 ASoC: codecs: tas2764: Fix Wvoid-pointer-to-enum-cast warning 'devid' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: tas2764.c:879:19: error: cast to smaller integer type 'enum tas2764_devid' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] One of the discussions in 2023 on LKML suggested warning is not suitable for kernel. Nothing changed in this regard for more than a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250427105105.18164-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 9cd54a6bf119891711b281fb45789f66255c892d Author: Krzysztof Kozlowski Date: Sun Apr 27 12:51:06 2025 +0200 ASoC: codecs: wsa88xx/wcd938x: Drop kerneldoc marker from inner comment Drop the kerneldoc marker from a comment within a function: wsa883x.c:1402: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504261851.TJGZIvtl-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250427105105.18164-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 696707d3d22c5daf485952d0753b903fe6eb7b77 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:51 2025 +0200 drm/msm/dpu: pass master interface to CTL configuration Active controls require setup of the master interface. Pass the selected interface to CTL configuration. Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/641583/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-3-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit fed0805ffd76161ed8c056ea30b36550eda8e106 Author: Kuninori Morimoto Date: Wed Apr 16 06:27:22 2025 +0000 ASoC: mediatek: mt8195: use snd_soc_dlc_is_dummy() We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87a58g8vue.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bf2a7ff888e080e4fd71cb4d28798fef836d7d73 Author: Kuninori Morimoto Date: Wed Apr 16 06:27:15 2025 +0000 ASoC: mediatek: mt8188: use snd_soc_dlc_is_dummy() We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87bjsw8vuk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e021f3b8115614127dd04c5615ccbcc2706bdd5 Author: Kuninori Morimoto Date: Wed Apr 16 06:27:10 2025 +0000 ASoC: soc-utils: add snd_soc_dlc_is_dummy() We have snd_soc_xxx_is_dummy() functions, but not for dlc. Let's add it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87cydc8vup.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6a013b60cf44604f9400be15166d3aba07bd7662 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:50 2025 +0200 drm/msm/dpu: program master INTF value If several interfaces are being handled through a single CTL, a main ('master') INTF needs to be programmed into a separate register. Write corresponding value into that register. Co-developed-by: Marijn Suijten Signed-off-by: Marijn Suijten Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/641581/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-2-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit ef595c04e843592481443b63e7790f44d52a5a19 Author: Dmitry Baryshkov Date: Fri Mar 7 08:24:49 2025 +0200 drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register In case of complex pipelines (e.g. the forthcoming quad-pipe) the DPU might use more that one MERGE_3D block for a single output. Follow the pattern and extend the CTL_MERGE_3D_ACTIVE active register instead of simply writing new value there. Currently at most one MERGE_3D block is being used, so this has no impact on existing targets. Reviewed-by: Marijn Suijten Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/641580/ Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-1-5d20655f10ca@linaro.org Signed-off-by: Dmitry Baryshkov commit d26e55085f4b7a63677670db827541209257b313 Author: Vinay Belgaumkar Date: Mon Apr 28 11:35:55 2025 -0700 drm/i915/slpc: Balance the inc/dec for num_waiters As seen in some recent failures, SLPC num_waiters value is < 0. This happens because the inc/dec are not balanced. We should skip decrement for the same conditions as the increment. Currently, we do that for power saving profile mode. This patch also ensures that num_waiters is incremented in the case min_softlimit is at boost freq. It ensures that we don't reduce the frequency while this request is in flight. v2: Add Fixes tags Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13598 Fixes: f864a29afc32 ("drm/i915/slpc: Optmize waitboost for SLPC") Fixes: 4a82ceb04ad4 ("drm/i915/slpc: Add sysfs for SLPC power profiles") Cc: Sk Anirban Reviewed-by: Sk Anirban Signed-off-by: Vinay Belgaumkar Signed-off-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20250428183555.3250021-1-vinay.belgaumkar@intel.com commit 86870d0b8f50c3d3b976e7d50ebffd35093bb585 Merge: 7b05f43155cb12 3678331ca781aa Author: Martin KaFai Lau Date: Thu May 1 12:54:07 2025 -0700 Merge branch 'bpf-allow-xdp_redirect-for-xdp-dev-bound-programs' Lorenzo Bianconi says: ==================== bpf: Allow XDP_REDIRECT for XDP dev-bound programs In the current implementation if the program is dev-bound to a specific device, it will not be possible to perform XDP_REDIRECT into a DEVMAP or CPUMAP even if the program is running in the driver NAPI context. Fix the issue introducing __bpf_prog_map_compatible utility routine in order to avoid bpf_prog_is_dev_bound() during the XDP program load. Continue forbidding to attach a dev-bound program to XDP maps. ==================== Link: https://patch.msgid.link/20250428-xdp-prog-bound-fix-v3-0-c9e9ba3300c7@kernel.org Signed-off-by: Martin KaFai Lau commit 3678331ca781aa1c15b2a2f3ad7bed5a61f716d1 Author: Lorenzo Bianconi Date: Mon Apr 28 17:44:03 2025 +0200 selftests/bpf: xdp_metadata: Check XDP_REDIRCT support for dev-bound progs Improve xdp_metadata bpf selftest in order to check it is possible for a XDP dev-bound program to perform XDP_REDIRECT into a DEVMAP but it is still not allowed to attach a XDP dev-bound program to a DEVMAP entry. Signed-off-by: Lorenzo Bianconi Signed-off-by: Martin KaFai Lau Acked-by: Stanislav Fomichev commit 714070c4cb7a10ff57450a618a936775f3036245 Author: Lorenzo Bianconi Date: Mon Apr 28 17:44:02 2025 +0200 bpf: Allow XDP dev-bound programs to perform XDP_REDIRECT into maps In the current implementation if the program is dev-bound to a specific device, it will not be possible to perform XDP_REDIRECT into a DEVMAP or CPUMAP even if the program is running in the driver NAPI context and it is not attached to any map entry. This seems in contrast with the explanation available in bpf_prog_map_compatible routine. Fix the issue introducing __bpf_prog_map_compatible utility routine in order to avoid bpf_prog_is_dev_bound() check running bpf_check_tail_call() at program load time (bpf_prog_select_runtime()). Continue forbidding to attach a dev-bound program to XDP maps (BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_CPUMAP). Fixes: 3d76a4d3d4e59 ("bpf: XDP metadata RX kfuncs") Signed-off-by: Lorenzo Bianconi Signed-off-by: Martin KaFai Lau Acked-by: Stanislav Fomichev commit a2db9bbcf64a43c8347625dca9ca0927bb444d43 Author: Andreas Kemnade Date: Sun Apr 27 07:27:35 2025 +0200 ARM: dts: omap4: panda: cleanup bluetooth Bluetooth is available on the other Panda board versions, too, so move stuff to common and specify the needed clock properly. Signed-off-by: Andreas Kemnade Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20250427052735.88133-3-andreas@kemnade.info Signed-off-by: Kevin Hilman commit 1132bb4df2375ae4a2303068c6f5fc62bc63b870 Author: Andreas Kemnade Date: Sun Apr 27 07:27:34 2025 +0200 ARM: dts: omap4: panda: fix resources needed for Wifi The Pandaboard needs a 32k clock in the TWL6030 to be enabled for Wifi to work. With some luck, it is enabled by some U-Boot fork. Do not rely on it and properly specify the requirement. Signed-off-by: Andreas Kemnade Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20250427052735.88133-2-andreas@kemnade.info Signed-off-by: Kevin Hilman commit 7d25c4e23763298f46f1ac955bf9b0a872662316 Author: Parvathi Pudi Date: Mon Apr 7 12:51:34 2025 +0530 bus: ti-sysc: PRUSS OCP configuration Updates OCP master port configuration to enable memory access outside of the PRU-ICSS subsystem. This set of changes configures PRUSS_SYSCFG.STANDBY_INIT bit to enable the OCP master ports during resume sequence and disables the OCP master ports during suspend sequence (applicable only on SoCs using OCP interconnect like the OMAP family). Signed-off-by: Parvathi Pudi Reviewed-by: Andreas Kemnade Link: https://lore.kernel.org/r/20250407072134.1044797-2-parvathi@couthit.com [khilman: multi-line comment style cleanup] Signed-off-by: Kevin Hilman commit 61de83fd8256e185588670d3cf0bccc3e913819c Author: Andrew Davis Date: Thu Jan 23 12:20:59 2025 -0600 mux: mmio: Do not use syscon helper to build regmap The syscon helper device_node_to_regmap() is used to fetch a regmap registered to a device node. It also currently creates this regmap if the node did not already have a regmap associated with it. This should only be used on "syscon" nodes. This driver is not such a device and instead uses device_node_to_regmap() on its own node as a hacky way to create a regmap for itself. This will not work going forward and so we should create our regmap the normal way by defining our regmap_config, fetching our memory resource, then using the normal regmap_init_mmio() function. Signed-off-by: Andrew Davis Tested-by: Nishanth Menon Link: https://lore.kernel.org/r/20250123182059.597491-1-afd@ti.com Signed-off-by: Krzysztof Kozlowski commit 7ea3876af994e4fd8065af0314bce6619e73667a Author: Arnd Bergmann Date: Wed Apr 9 14:22:56 2025 +0200 mux: adg792a: remove incorrect of_match_ptr annotation Building with W=1 shows a warning about adg792a_of_match being unused when CONFIG_OF is disabled: drivers/mux/adg792a.c:134:34: error: unused variable 'adg792a_of_match' [-Werror,-Wunused-const-variable] Acked-by: Peter Rosin Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250409122314.2848028-4-arnd@kernel.org Signed-off-by: Krzysztof Kozlowski commit 702a09507d808a8cc844ac35a8cf00b4d652dab0 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:43 2024 +0200 mux: adgs1408: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Link: https://lore.kernel.org/r/20240606142443.130517-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a87564088226dd78fbc11612c06c6380d81e7008 Author: Thorsten Blum Date: Sun Mar 16 14:58:58 2025 +0100 mux: mmio: Add missing word in error message s/failed allocate/failed to allocate/ Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250316135857.1584-2-thorsten.blum@linux.dev Signed-off-by: Krzysztof Kozlowski commit 7b05f43155cb128aa06a226afdbc3daa8d75b358 Author: Thorsten Blum Date: Mon Apr 28 23:06:39 2025 +0200 bpf: Replace offsetof() with struct_size() Compared to offsetof(), struct_size() provides additional compile-time checks for structs with flexible arrays (e.g., __must_be_array()). No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250428210638.30219-2-thorsten.blum@linux.dev commit 1b3f2bd04d90f61e1f291b5e365b9bc4ce0ea7c7 Author: Dan Williams Date: Tue Apr 29 19:46:21 2025 -0700 x86/devmem: Remove duplicate range_is_allowed() definition 17 years ago, Venki suggested [1] "A future improvement would be to avoid the range_is_allowed duplication". The only thing preventing a common implementation is that phys_mem_access_prot_allowed() expects the range check to exit immediately when PAT is disabled [2]. I.e. there is no cache conflict to manage in that case. This cleanup was noticed on the path to considering changing range_is_allowed() policy to blanket deny /dev/mem for private (confidential computing) memory. Note, however that phys_mem_access_prot_allowed() has long since stopped being relevant for managing cache-type validation due to [3], and [4]. Commit 0124cecfc85a ("x86, PAT: disable /dev/mem mmap RAM with PAT") [1] Commit 9e41bff2708e ("x86: fix /dev/mem mmap breakage when PAT is disabled") [2] Commit 1886297ce0c8 ("x86/mm/pat: Fix BUG_ON() in mmap_mem() on QEMU/i386") [3] Commit 0c3c8a18361a ("x86, PAT: Remove duplicate memtype reserve in devmem mmap") [4] Signed-off-by: Dan Williams Signed-off-by: Dave Hansen Reviewed-by: Nikolay Borisov Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/all/20250430024622.1134277-2-dan.j.williams%40intel.com commit 3182f3634f291cd5209ac958f441778436294b3f Author: Matthew Brost Date: Mon Apr 28 10:55:05 2025 -0700 drm/xe: Do not print timedout job message on killed exec queues If a user ctrl-c an app while something is running on the GPU, jobs are expected to timeout. Do not spam dmesg with timedout job messages in this case. Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250428175505.935694-1-matthew.brost@intel.com commit 9de1a293c8ece00d226b21a35751ec178be2a9fa Author: Benno Lossin Date: Sat Apr 26 08:39:28 2025 +0000 rust: pin-init: improve documentation for `Zeroable` derive macros Specify that both `MaybeZeroable` and `Zeroable` work on `union`s. Add a doc example for a union. Also include an example with visibility on the field. Link: https://github.com/Rust-for-Linux/pin-init/pull/48/commits/ab0985a0e08df06c60a32ca5888f74adcc2c1cf3 Reviewed-by: Christian Schrefl Signed-off-by: Benno Lossin commit a919ba21594bfa1e67639785d409e1bdce332097 Author: Benno Lossin Date: Sat Apr 26 08:39:22 2025 +0000 rust: pin-init: fix typos Correct two typos in the `Wrapper::pin_init` documentation. Link: https://github.com/Rust-for-Linux/pin-init/pull/48/commits/fd0bf5e244b685188dc642fc4a0bd3f042468fdb Reviewed-by: Christian Schrefl Signed-off-by: Benno Lossin commit 00fccd3ecc2129ee32fd181079eb643f497044c4 Author: Benno Lossin Date: Mon Apr 21 22:18:52 2025 +0000 rust: pin-init: add `MaybeZeroable` derive macro This derive macro implements `Zeroable` for structs & unions precisely if all fields also implement `Zeroable` and does nothing otherwise. The plain `Zeroable` derive macro instead errors when it cannot derive `Zeroable` safely. The `MaybeZeroable` derive macro is useful in cases where manual checking is infeasible such as with the bindings crate. Move the zeroable generics parsing into a standalone function in order to avoid code duplication between the two derive macros. Link: https://github.com/Rust-for-Linux/pin-init/pull/42/commits/1165cdad1a391b923efaf30cf76bc61e38da022e Signed-off-by: Benno Lossin commit a313d41a2b515bbb76d56df490b731ff6d64e571 Author: Benno Lossin Date: Mon Apr 21 22:18:41 2025 +0000 rust: pin-init: allow `Zeroable` derive macro to also be applied to unions Enabling the same behavior for unions as for structs is correct, but could be relaxed: the valid bit patterns for unions are the union of all valid bit patterns of their fields. So for a union to implement `Zeroable`, only a single field needs to implement `Zeroable`. This can be a future improvement, as it is currently only needed for unions where all fields implement `Zeroable`. There is no danger for mis-parsing with the two optional tokens (ie neither one or both tokens are parsed), as the compiler will already have rejected that before giving it as the input to the derive macro. Link: https://github.com/Rust-for-Linux/pin-init/pull/42/commits/5927b497ce522d82f6c082d5ba9235df57bfdb32 Signed-off-by: Benno Lossin commit 983d13fc2cf12f0a753700d48be7d04155a1272c Author: Benno Lossin Date: Mon Apr 21 22:18:33 2025 +0000 rust: pin-init: allow `pub` fields in `derive(Zeroable)` Add support for parsing `pub`, `pub(crate)` and `pub(super)` to the derive macro `Zeroable`. Link: https://github.com/Rust-for-Linux/pin-init/pull/42/commits/e8311e52ca57273e7ed6d099144384971677a0ba Signed-off-by: Benno Lossin commit c3815aa4bb5c6248e78785269357e87bfa4d0909 Author: Christian Schrefl Date: Mon Apr 21 22:18:23 2025 +0000 rust: pin-init: Update the structural pinning link in readme. The previous link anchor was broken in rust 1.77, because the documentation was refactored in upstream rust. Change the link to refer to the new section in the rust documentation. Signed-off-by: Christian Schrefl Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/a146142fe18cafa52f8c6da306ca2729d789cfbf [ Fixed commit authorship. - Benno ] Signed-off-by: Benno Lossin commit bc5f3e0e01a5f2d067ff4292d5a10093ae680f53 Author: Christian Schrefl Date: Mon Apr 21 22:18:13 2025 +0000 rust: pin-init: Update Changelog and Readme Add Changelog entry for the `Wrapper` trait and document the `unsafe-pinned` feature in the Readme. Signed-off-by: Christian Schrefl Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/986555f564645efb238e8092c6314388c859efe5 [ Fixed commit authorship. - Benno ] Signed-off-by: Benno Lossin commit b862aac8fd46601fa20226c9f5d6c6d308678b4d Author: Christian Schrefl Date: Mon Apr 21 22:18:06 2025 +0000 rust: pin-init: Implement `Wrapper` for `UnsafePinned` behind feature flag. Add the `unsafe-pinned` feature which gates the `Wrapper` implementation of the `core::pin::UnsafePinned` struct. For now this is just a cargo feature, but once `core::pin::UnsafePinned` is stable a config flag can be added to allow the usage of this implementation in the linux kernel. Signed-off-by: Christian Schrefl Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/99cb1934425357e780ea5b0628f66633123847b8 [ Fixed commit authorship. - Benno ] Signed-off-by: Benno Lossin commit 2f7c73825f8f435ebdfb2cfa3b01cfa2b1c79041 Author: Christian Schrefl Date: Mon Apr 21 22:17:59 2025 +0000 rust: pin-init: Add the `Wrapper` trait. This trait allows creating `PinInitializers` for wrapper or new-type structs with the inner value structurally pinned, when given the initializer for the inner value. Implement this trait for `UnsafeCell` and `MaybeUninit`. Signed-off-by: Christian Schrefl Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/3ab4db083bd7b41a1bc23d937224f975d7400e50 [ Reworded commit message into imperative mode, fixed typo and fixed commit authorship. - Benno ] Signed-off-by: Benno Lossin commit 90348980a305cc24a067cc6e606e1c318e277930 Author: Benno Lossin Date: Mon Apr 21 22:17:50 2025 +0000 rust: pin-init: add `cast_[pin_]init` functions to change the initialized type These functions cast the given pointer from one type to another. They are particularly useful when initializing transparent wrapper types. Link: https://github.com/Rust-for-Linux/pin-init/pull/39/commits/80c03ddee41b154f1099fd8cc7c2bbd8c80af0ad Reviewed-by: Christian Schrefl Signed-off-by: Benno Lossin commit 97e72c1e0c5424cd8d7b95c31144e713c44c4244 Author: Dr. David Alan Gilbert Date: Wed Apr 30 01:36:23 2025 +0100 virt: acrn: Remove unused list 'acrn_irqfd_clients' It doesn't look like this was ever used. Build tested only. Signed-off-by: "Dr. David Alan Gilbert" Acked-by: Fei Li Link: https://lore.kernel.org/r/20250430003623.313541-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 09f9adbcea38477b37ba63743c7538d2bdcd95a2 Author: Kees Cook Date: Fri Apr 25 23:18:16 2025 -0700 mei: Cast the cb->ext_hdr allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct mei_ext_hdr *", but the returned type will be "struct mei_ext_hdr_gsc_f2h *", which is a larger allocation size. This is by design as struct mei_ext_hdr_gsc_f2h contains struct mei_ext_hdr as its first member. Cast the allocation to the match the assignment. Signed-off-by: Kees Cook Acked-by: Alexander Usyskin Link: https://lore.kernel.org/r/20250426061815.work.435-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1281f0ae2d0dd278d4812b58fbe26e4c2b8b07c3 Author: Dr. David Alan Gilbert Date: Mon Apr 28 00:30:16 2025 +0100 MAINTAINERS: Fix XILINX SD-FEC entry The SD-FEC entry claims ownership of the generic drivers/misc/Kconfig and drivers/misc/Makefile in reality that driver is just one of many using those files. Remove those file entries. Fixes: e00feed03f8d ("MAINTAINERS: add maintainer for SD-FEC") Signed-off-by: "Dr. David Alan Gilbert" Link: https://lore.kernel.org/r/20250427233016.124044-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 7f4de1867ef9a787c618e6eb1540b34fef2643ae Author: Dr. David Alan Gilbert Date: Sun Apr 27 23:40:22 2025 +0100 misc: echo: Remove 'echo' is a software echo canceller for telco use, however it's not used in the kernel at all. Remove it. It was moved from staging in 2014 by commit Fixes: 6e2055a9e56e ("staging: echo: move to drivers/misc/") Some discussion on lkml: https://lore.kernel.org/all/Z7tZhYET41DAoHVf@gallifrey/ with Arnd and Harald, led to the 'dahdi' package which is part of Asterisk: https://gitea.osmocom.org/retronetworking/dahdi-linux which can build with the 'echo' module, but is normally configured with out it. Dahdi is large, old, only lightly maintained and with a big API, so there's no hope now of ever merging it into the main kernel tree. Debian do package Dahdi, and in their package they actually include a copy of the 'echo' module rather than using the kernel from the upstream kernel. So even in the few cases where it is packaged and built, the kernel copy isn't used. Signed-off-by: "Dr. David Alan Gilbert" Link: https://lore.kernel.org/r/20250427224022.113678-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 417ce77ef466580c2850fdd4a7bf5f0a97147cb8 Author: Dave Penkler Date: Sun Apr 27 11:31:23 2025 +0200 staging: gpib: Avoid unused variable warnings This addresses warnings produced by make W=1 with the configuration parameter CONFIG_GPIB_PCMCIA=y cb7210/cb7210.c:1251:28: warning: variable 'dev' set but not used [-Wunused-but-set-variable] cb7210/cb7210.c:1250:31: warning: variable 'handle' set but not used [-Wunused-but-set-variable] Remove the declarations and assignments of the unused variables. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250427093123.18565-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 75d9d7c29b7f00045d859226592f2917b31b997e Author: Dave Penkler Date: Sat Apr 26 17:03:19 2025 +0200 staging: gpib: Fix lpvo request_system_control The IEEE-488 GPIB standard was designed to ensure that there is only ever one controller-in-charge on the bus at any one time. If a board becomes controller-in-charge on request_system_control there is no way to ensure that there is not another board also acting as controller-in-charge. This can lead to bus conflicts and hangs. Remove the setting of controller-in-charge from request_system_control. Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250426150319.5580-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9c088a5c0d6f019bbc482d433ddddb18db6214f1 Author: Arnd Bergmann Date: Wed Apr 30 18:25:45 2025 -0700 drm/xe: fix devcoredump chunk alignmnent calculation The device core dumps are copied in 1.5GB chunks, which leads to a link-time error on 32-bit builds because of the 64-bit division not getting trivially turned into mask and shift operations: ERROR: modpost: "__moddi3" [drivers/gpu/drm/xe/xe.ko] undefined! On top of this, I noticed that the ALIGN_DOWN() usage here cannot work because that is only defined for power-of-two alignments. Change ALIGN_DOWN into an explicit div_u64_rem() that avoids the link error and hopefully produces the right results. Doing a 1.5GB kvmalloc() does seem a bit suspicious as well, e.g. this will clearly fail on any 32-bit platform and is also likely to run out of memory on 64-bit systems under memory pressure, so using a much smaller power-of-two chunk size might be a good idea instead. v2: - Always call div_u64_rem (Matt) Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504251238.JsNgFeFc-lkp@intel.com/ Fixes: c4a2e5f865b7 ("drm/xe: Add devcoredump chunking") Signed-off-by: Arnd Bergmann Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250501012545.1045247-1-matthew.brost@intel.com Signed-off-by: Rodrigo Vivi commit a50ae5bc83d64387425a19aad05850585e9a6c11 Author: Eric Florin Date: Tue Apr 29 22:55:39 2025 -0700 staging: sm750fb: rename sm750_hw_cursor_setData2 Rename sm750_hw_cursor_setData2 to sm750_hw_cursor_set_data2 to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/af5080150498adf635be36e332a7ce7121692f93.1745982772.git.ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit dcb66f73854f338bf457ec0573f7a3b1104b3d6a Author: Eric Florin Date: Tue Apr 29 22:55:38 2025 -0700 staging: sm750fb: rename sm750_hw_cursor_setData Rename sm750_hw_cursor_setData to sm750_hw_cursor_set_data to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/1ce4ddfd5ddf0443fd5a01ea5a4cb76a90e8cf30.1745982772.git.ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a32b7d9602120d4b4faff31a4f710bd3f35d40b Author: Eric Florin Date: Tue Apr 29 22:55:37 2025 -0700 staging: sm750fb: rename sm750_hw_cursor_setColor Rename sm750_hw_cursor_setColor to sm750_hw_cursor_set_color to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/93717027d952d14d9b17f78e8440a734e4dc5d89.1745982772.git.ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f168c835ec1a6599e9f0f4a7dbf71fda69d5f2a Author: Eric Florin Date: Tue Apr 29 22:55:36 2025 -0700 staging: sm750fb: rename sm750_hw_cursor_setPos Rename sm750_hw_cursor_setPos to sm750_hw_cursor_set_pos to conform with kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/bf20fba915d2f0139a55ada29fcdefb9fdcbc1d6.1745982772.git.ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit c1e36b07df08682656ecc38cadba03076378bd7c Author: Eric Florin Date: Tue Apr 29 22:55:35 2025 -0700 staging: sm750fb: rename sm750_hw_cursor_setSize Rename sm750_hw_cursor_setSize to sm750_hw_cursor_set_size to conform to kernel style guidelines as reported by checkpatch.pl CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/c465a42743c4fef0853ffa7f7c304dc569592d3e.1745982772.git.ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ee558c5d9e9c464bcecb68b3c1d1f9690747a64 Author: Bartosz Golaszewski Date: Wed Apr 30 14:29:17 2025 +0200 vt: add new dynamically generated files to .gitignore Add new dynamically generated headers to the local .gitignore. Fixes: c2d2c5c0d631 ("vt: move UCS tables to the "shipped" form") Signed-off-by: Bartosz Golaszewski Reviewed-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250430122917.72105-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 588d032e9e566997db3213dee145dbe3bda297b6 Author: Pin-yen Lin Date: Tue Apr 22 16:28:30 2025 +0800 usb: misc: onboard_usb_dev: Add Parade PS5511 hub support Parade PS5511 is 4+1 port USB 3.2 gen 1 hub with a reset pin and two power supplies (3V3 and 1V1). Add the support for this hub for the reset pin control and power supply. Signed-off-by: Pin-yen Lin Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20250422082957.2058229-5-treapking@chromium.org Signed-off-by: Greg Kroah-Hartman commit 76cbb3eabf0b5f3048c4f988504e58beaf040eb7 Author: Pin-yen Lin Date: Tue Apr 22 16:28:29 2025 +0800 dt-bindings: usb: realtek,rts5411: Adapt usb-hub.yaml Inherit usb-hub.yaml and remove duplicated schemas. Signed-off-by: Pin-yen Lin Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250422082957.2058229-4-treapking@chromium.org Signed-off-by: Greg Kroah-Hartman commit fc259b024cb3e901d8f62ea4f305bccff587fd33 Author: Pin-yen Lin Date: Tue Apr 22 16:28:28 2025 +0800 dt-bindings: usb: Add binding for PS5511 hub controller Parade PS5511 is USB hub with 4 USB 3.2 compliant 5Gbps downstream(DS) ports, and 1 extra USB 2.0 downstream port. The hub has one reset pin control and two power supplies (3V3 and 1V1). Signed-off-by: Pin-yen Lin Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250422082957.2058229-3-treapking@chromium.org Signed-off-by: Greg Kroah-Hartman commit 7fcdfaf37272669dec131963745bf51c360724ac Author: Pin-yen Lin Date: Tue Apr 22 16:28:27 2025 +0800 dt-bindings: usb: Introduce usb-hub.yaml Introduce a general USB hub binding that describes downstream ports and hard wired USB devices for on-board USB hubs. Signed-off-by: Pin-yen Lin Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250422082957.2058229-2-treapking@chromium.org Signed-off-by: Greg Kroah-Hartman commit ea34925f5b2ee48d7b8b47bc041e381a3cb637cc Author: Ben Hoff Date: Tue Apr 29 14:28:09 2025 -0400 usb: gadget: hid: allow dynamic interval configuration via configfs This patch enhances the HID gadget driver to support dynamic configuration of the interrupt polling interval (bInterval) via configfs. A new ‘interval’ attribute is exposed under each HID function’s configfs directory, and any write to it will adjust the poll rate for all endpoints without requiring a rebuild. When the attribute has never been written, legacy defaults are preserved: • Full-Speed (FS) endpoints (IN & OUT) poll every 10 ms • High-Speed (HS) endpoints (IN & OUT) poll every 4 micro-frames (~1 ms) To implement this cleanly: • Add two new fields to f_hid_opts and f_hidg: – unsigned char interval – bool interval_user_set • Introduce dedicated f_hid_opts_interval_show/store functions. The store routine parses into an unsigned int, bounds‐checks, assigns to opts->interval, and sets opts->interval_user_set = true. • Initialize opts->interval = 4 and opts->interval_user_set = false in hidg_alloc_inst(), then copy both into the live f_hidg instance in hidg_alloc(). • In hidg_bind(), set each endpoint’s bInterval based on whether the user has written the attribute: – If interval_user_set == false, use FS=10 / HS=4 – If interval_user_set == true, use the user’s value for both FS & HS Signed-off-by: Ben Hoff Link: https://lore.kernel.org/r/20250429182809.811786-1-hoff.benjamin.k@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3fc0810497a697b84dfe36f6011bd04c5e21d39b Author: Kees Cook Date: Fri Apr 25 23:21:26 2025 -0700 usb: gadget: g_ffs: Adjust f_ffs[0] allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct usb_function **" but the returned type will be "struct usb_function ***". These are the same size allocation (pointer size), but different types. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250426062125.work.209-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit a883620602758832f81fe042be778e57174add3a Author: Zijun Hu Date: Fri Apr 25 20:48:10 2025 +0800 serdev: Refine several error or debug messages Refine several dev_err() and dev_dbg() messages to solve: // hardcoded device name dev_dbg(dev, "...dev_name_str...") // repeated device name since dev_dbg() also prints it as prefix dev_err(dev, "...%s...", dev_name(dev)) // not concise as dev_err(dev, "...%d...", err) dev_err(dev, "...%pe...", ERR_PTR(err)) Signed-off-by: Zijun Hu Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250425-fix_serdev-v3-1-2e4ea8261640@quicinc.com Signed-off-by: Greg Kroah-Hartman commit c40b91e38eb8d4489def095d62ab476d45871323 Author: Rengarajan S Date: Fri Apr 25 20:25:00 2025 +0530 8250: microchip: pci1xxxx: Add PCIe Hot reset disable support for Rev C0 and later devices Systems that issue PCIe hot reset requests during a suspend/resume cycle cause PCI1XXXX device revisions prior to C0 to get its UART configuration registers reset to hardware default values. This results in device inaccessibility and data transfer failures. Starting with Revision C0, support was added in the device hardware (via the Hot Reset Disable Bit) to allow resetting only the PCIe interface and its associated logic, but preserving the UART configuration during a hot reset. This patch enables the hot reset disable feature during suspend/ resume for C0 and later revisions of the device. Signed-off-by: Rengarajan S Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250425145500.29036-1-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit f51159c05137dda05b425be70cd6c05f54a997c0 Author: Faraz Ata Date: Tue Apr 29 15:59:41 2025 +0530 tty: serial: samsung_tty: support 18 uart ports ExynosAutov920 SoC supports 18 UART ports, update the value of UART_NR to accommodate the same. Signed-off-by: Faraz Ata Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250429102941.4138463-1-faraz.ata@samsung.com Signed-off-by: Greg Kroah-Hartman commit 96366bf155ab57580e450d659a9edb3163b717d8 Author: Greg Kroah-Hartman Date: Thu May 1 16:22:54 2025 +0200 Revert "char: misc: add test cases" This reverts commit 45f0de4f8dc385cd8959d884cd89b3b84c76b7f9. It breaks the build on many systems, so revert it for now. Link: https://lore.kernel.org/r/20250501164501.0fc0ab68@canb.auug.org.au Reported-by: Stephen Rothwell Cc: Thadeu Lima de Souza Cascardo Signed-off-by: Greg Kroah-Hartman commit d4453c58369fff24b8ba187d2375666f69ec1b18 Author: Greg Kroah-Hartman Date: Thu May 1 16:21:09 2025 +0200 Revert "char: misc: make miscdevice unit test built-in only" This reverts commit 20acf4dd46e4c0905676ad2a1d9a32041469893f. It still does not fix the build issue on all arches, so revert the whole series for now until it can come back in a "clean" form. Link: https://lore.kernel.org/r/20250501164501.0fc0ab68@canb.auug.org.au Reported-by: Stephen Rothwell Cc: Thadeu Lima de Souza Cascardo Signed-off-by: Greg Kroah-Hartman commit 60087bcbd1206a546c570c453dee5f5d961ef5b3 Author: John Clark Date: Tue Apr 22 17:03:45 2025 -0400 arm64: dts: rockchip: fix usb-c port functionality on rk3588-nanopc-t6 The USB-C port on the NanoPC-T6 was not providing VBUS (vbus5v0_typec regulator disabled, gpio-58 out lo) due to misconfiguration. The original setup with regulator-always-on and regulator-boot-on forced the port on, masking the issue, but removing these properties revealed that the fusb302 driver was not enabling the regulator dynamically. Changes: - Removed regulator-always-on and regulator-boot-on from vbus5v0_typec and vbus5v0_usb to allow driver control. - Changed power-role from "source" to "dual" in the usb-c-connector to support OTG functionality. - Added pd-revision = /bits/ 8 <0x2 0x0 0x1 0x2> to the FUSB302MPX node to specify USB Power Delivery (PD) Revision 2.0, Version 1.2, ensuring the driver correctly advertises PD capabilities and negotiates power roles (source/sink). - Added op-sink-microwatt and sink-pdos for proper sink mode configuration (1W min, 15W max). - Added typec-power-opmode = "1.5A" to enable 1.5A fallback for non-PD USB-C devices, aligning with the 5V/2A hardware limit. - Set try-power-role to "source" to prioritize VBUS enablement. - Adjusted usb_host0_xhci dr_mode from "host" to "otg" and added usb-role-switch for dual-role support. Testing: - Verified VBUS (5V) delivery to a sink device (USB thumb drive). - Confirmed USB host mode with lsusb detecting connected devices. - Validated USB device mode with adb devices when connected to a PC. - Tested dual-role (OTG) functionality with try-power-role set to "source" and "sink"; "source" prioritizes faster VBUS activation. - Validated functionality with a mobile device, including USB Power Delivery, file transfer, USB tethering, MIDI, and image transfer. - Tested USB-C Ethernet adapter compatibility in host mode. - Tested USB-C hub compatibility in host mode. Signed-off-by: John Clark Link: https://lore.kernel.org/r/20250422210345.196050-1-inindev@gmail.com Signed-off-by: Heiko Stuebner commit 2e79181dfc85e1347a8655ea8d8a314158155c52 Author: Stefan Klug Date: Thu Feb 27 12:45:01 2025 +0100 media: rkisp1: Remove unnecessary defines The effect modes are not shifts but numbers which are already defined a few lines above. Remove the misleading defines. Signed-off-by: Stefan Klug Link: https://lore.kernel.org/r/20250227114558.3097101-4-stefan.klug@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 910efa649076be9c2e1326059830327cf4228cf6 Author: Laurentiu Palcu Date: Wed Oct 23 11:56:43 2024 +0300 media: nxp: imx8-isi: better handle the m2m usage_count Currently, if streamon/streamoff calls are imbalanced we can either end up with a negative ISI m2m usage_count (if streamoff() is called more times than streamon()) in which case we'll not be able to restart the ISI pipe next time, or the usage_count never gets to 0 and the pipe is never switched off. To avoid that, add a 'streaming' flag to mxc_isi_m2m_ctx_queue_data and use it in the streamon/streamoff to avoid incrementing/decrementing the usage_count uselessly, if called multiple times from the same context. Fixes: cf21f328fcafac ("media: nxp: Add i.MX8 ISI driver") Cc: stable@vger.kernel.org Suggested-by: Laurent Pinchart Signed-off-by: Laurentiu Palcu Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20241023085643.978729-1-laurentiu.palcu@oss.nxp.com Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fc581fae50a2d9777a4056c07a62e5f0470b640f Author: Kaustabh Chakraborty Date: Thu May 1 17:03:01 2025 +0530 arm64: dts: exynos: add initial support for Samsung Galaxy J6 Add initial devicetree support for Samsung Galaxy J6 (codename: j6lte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250501-exynos7870-v7-5-bb579a27e5eb@disroot.org Signed-off-by: Krzysztof Kozlowski commit d5cbf26a5c8f57536fcb782c8985a83ca16dfc7d Author: Kaustabh Chakraborty Date: Thu May 1 17:03:00 2025 +0530 arm64: dts: exynos: add initial support for Samsung Galaxy A2 Core Add initial devicetree support for Samsung Galaxy A2 Core (codename: a2corelte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250501-exynos7870-v7-4-bb579a27e5eb@disroot.org Signed-off-by: Krzysztof Kozlowski commit 61296c6b604df4409834eec0bd1115ddbaecb921 Author: Kaustabh Chakraborty Date: Thu May 1 17:02:59 2025 +0530 arm64: dts: exynos: add initial support for Samsung Galaxy J7 Prime Add initial devicetree support for Samsung Galaxy J7 Prime (codename: on7xelte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250501-exynos7870-v7-3-bb579a27e5eb@disroot.org Signed-off-by: Krzysztof Kozlowski commit d6f3a7f91fdb84f286d943d89cf082f43fab239e Author: Kaustabh Chakraborty Date: Thu May 1 17:02:58 2025 +0530 arm64: dts: exynos: add initial devicetree support for exynos7870 Exynos7870 is an arm64 SoC manufactured by Samsung and announced in 2016. It is present in multiple mid-range Samsung phones and tablets. Add basic devicetree support for the SoC, which includes CMUs, pin controllers, I2C, UART, DW-MMC, and USB-DRD. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250501-exynos7870-v7-2-bb579a27e5eb@disroot.org Signed-off-by: Krzysztof Kozlowski commit 004bd8536cb9d56cfe2a13a6e05a4a1998455b71 Author: Kaustabh Chakraborty Date: Thu May 1 17:02:57 2025 +0530 dt-bindings: arm: samsung: add compatibles for exynos7870 devices Document the compatible string for Exynos7870 - "samsung,exynos7870". The following devices are also added: - Galaxy A2 Core ("samsung,a2corelte") - Galaxy J6 ("samsung,j6lte") - Galaxy J7 Prime ("samsung,on7xelte") Acked-by: Rob Herring (Arm) Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250501-exynos7870-v7-1-bb579a27e5eb@disroot.org Signed-off-by: Krzysztof Kozlowski commit e36d96a2a1aae8d8a6a01c80d8442c3cbdd98a45 Merge: 0af2f6be1b4281 2c2e5e908ea2b5 Author: Lee Jones Date: Thu May 1 12:42:38 2025 +0100 Merge tag 'samsung-drivers-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into ib-firmware-mfd-6.16 Samsung SoC drivers for v6.16 Several improvements to Exynos ACPM (Alive Clock and Power Manager) driver: 1. Handle communication timeous better. 2. Avoid sleeping, so users (PMIC) can still transfer during system shutdown. 3. Fix reading longer messages from them firmware. 4. Deferred probe improvements. 5. Model the user of ACPM - PMIC - a as child device and export devm_acpm_get_by_node() for such use case. commit 4f1a965d592a0ca7d4ee2125f54d19ba8292295a Author: Arnd Bergmann Date: Wed Apr 23 18:44:16 2025 +0200 drm/rockchip: add CONFIG_OF dependency DRM_DISPLAY_DP_AUX_BUS cannot be selected when CONFIG_OF is disabled: WARNING: unmet direct dependencies detected for DRM_DISPLAY_DP_AUX_BUS Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && OF [=n] Selected by [y]: - DRM_ROCKCHIP [=y] && HAS_IOMEM [=y] && DRM [=y] && ROCKCHIP_IOMMU [=y] && ROCKCHIP_ANALOGIX_DP [=y] Rockchip platforms all depend on OF anyway, so add the dependency here for compile testing. Fixes: d7b4936b2bc0 ("drm/rockchip: analogix_dp: Add support to get panel from the DP AUX bus") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Baryshkov Acked-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250423164422.2793634-1-arnd@kernel.org commit db1fefec31e79e59459c2c14fe4d42e303ef8ba3 Author: Jimmy Hon Date: Sun Apr 27 13:20:19 2025 -0500 arm64: dts: rockchip: Enable bluetooth of AP6611s on OrangePI5 Max/Ultra Orange Pi 5 Max and Ultra has onboard AP6611s with Bluetooth 5.3 connected via UART7. The chip reports as: [ 3.747864] Bluetooth: hci0: BCM: chip id 3 [ 3.750021] Bluetooth: hci0: BCM: features 0x0f [ 3.775923] Bluetooth: hci0: SYN43711A0 [ 3.775930] Bluetooth: hci0: BCM (001.001.030) build 0000 Signed-off-by: Jimmy Hon Link: https://lore.kernel.org/r/20250427182019.1862-1-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner commit 687cac9559d8e9277830bdfb68b57d7403695b1d Author: Biju Das Date: Thu Apr 24 09:59:54 2025 +0100 memory: renesas-rpc-if: Add RZ/G3E xSPI support Add support for RZ/G3E xSPI. Compared to RPC-IF, it can support writes on memory-mapped area. Introduce struct rpcif_impl for holding the function pointers and data to handle the differences between xspi and rpc-if interface. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-7-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit e1c200a4c7f0e8b842a9a5b7f38fa7036c0df417 Author: Biju Das Date: Thu Apr 24 09:59:53 2025 +0100 memory: renesas-rpc-if: Add wrapper functions Even though XSPI and RPCIF has different register layout, reuse the code by adding wrapper functions to support both XSPI and RPC-IF. While at it, replace error check for pm_runtime_resume_and_get(). Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-6-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit 198158a8f64cf150325f68044274e21ab0aa69c8 Author: Biju Das Date: Thu Apr 24 09:59:52 2025 +0100 memory: renesas-rpc-if: Add regmap to struct rpcif_info The RZ/G3E XSPI has different regmap compared to RPC-IF. Add regmap to struct rpcif_info in order to support RZ/G3E XSPI. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-5-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit c66fce831d0669dc809f90bcefd80ae979e35431 Author: Biju Das Date: Thu Apr 24 09:59:51 2025 +0100 memory: renesas-rpc-if: Use devm_reset_control_array_get_exclusive() Replace devm_*_get_exclusive()->devm_*_array_get_exclusive() to support existing SoCs along with RZ/G3E as RZ/G3E has 2 resets. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-4-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit 228e72bf943687d04bf06a98722ab6cf9d4b8ba6 Author: Biju Das Date: Thu Apr 24 09:59:50 2025 +0100 memory: renesas-rpc-if: Move rpc-if reg definitions Move rpc-if reg definitions to a header file for the preparation of adding support for RZ/G3E XSPI that has different register definitions. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-3-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit b2d25905366b4e6791f60e6bc76a636d1b88e6f8 Author: Biju Das Date: Thu Apr 24 09:59:49 2025 +0100 dt-bindings: memory: Document RZ/G3E support Document support for the Expanded Serial Peripheral Interface (xSPI) Controller in the Renesas RZ/G3E (R9A09G047) SoC. Reviewed-by: Rob Herring (Arm) Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250424090000.136804-2-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit d8bf82081c9e5a4f0f239cdd01296377ba490471 Author: Hector Martin Date: Wed Apr 23 19:55:15 2025 +0200 arm64: dts: apple: Add PMIC NVMEM Add device tree entries for NVMEM cells present on the PMIC Signed-off-by: Hector Martin Reviewed-by: Nick Chan Reviewed-by: Alyssa Rosenzweig Co-developed-by: Sasha Finkelstein Signed-off-by: Sasha Finkelstein Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20250423-spmi-nvmem-v3-3-2985aa722ddc@gmail.com Signed-off-by: Sven Peter commit fa616196fbea12462107774fb6a1908c95f71cf0 Author: Tamir Duberstein Date: Wed Apr 23 09:54:39 2025 -0400 MAINTAINERS: add entry for Rust XArray API Add an entry for the Rust xarray abstractions. Acked-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250423-rust-xarray-bindings-v19-3-83cdcf11c114@gmail.com [ Changed T: entry branch to `xarray-rust` - Andreas ] Signed-off-by: Andreas Hindborg commit 210b81578efbe5c5e7748e50d313e1a90b03df55 Author: Tamir Duberstein Date: Wed Apr 23 09:54:38 2025 -0400 rust: xarray: Add an abstraction for XArray `XArray` is an efficient sparse array of pointers. Add a Rust abstraction for this type. This implementation bounds the element type on `ForeignOwnable` and requires explicit locking for all operations. Future work may leverage RCU to enable lockless operation. Inspired-by: Maíra Canal Inspired-by: Asahi Lina Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250423-rust-xarray-bindings-v19-2-83cdcf11c114@gmail.com Signed-off-by: Andreas Hindborg commit 1a4736c3d8394f5e64557a41b4b2b8d6dcd04622 Author: Tamir Duberstein Date: Wed Apr 23 09:54:37 2025 -0400 rust: types: add `ForeignOwnable::PointedTo` Allow implementors to specify the foreign pointer type; this exposes information about the pointed-to type such as its alignment. This requires the trait to be `unsafe` since it is now possible for implementors to break soundness by returning a misaligned pointer. Encoding the pointer type in the trait (and avoiding pointer casts) allows the compiler to check that implementors return the correct pointer type. This is preferable to directly encoding the alignment in the trait using a constant as the compiler would be unable to check it. Acked-by: Danilo Krummrich Signed-off-by: Tamir Duberstein Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250423-rust-xarray-bindings-v19-1-83cdcf11c114@gmail.com Signed-off-by: Andreas Hindborg commit c788129c851d990387527b26efd4fd453dde14d2 Merge: d20df86b056b95 178c169a30b011 Author: Mark Brown Date: Thu May 1 15:46:16 2025 +0900 ASoC: codec: twl4030: Convert to GPIO descriptors Merge series from "Peng Fan (OSS)" : This is separated from [1]. With an update that sorting the headers in a separate patch. No other changes, so I still keep Linus' R-b for Patch 2. [1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-3-c0db9d3fd6e9@nxp.com/ commit 95ea0cf3f6137f6596002fd524580e481b5507c1 Author: Ian Ray Date: Wed Apr 30 20:51:50 2025 -0700 Input: snvs_pwrkey - support power-off-time-sec The power-off time is configured in LPCR[17:16] BTN_PRESS_TIME: * b00: 5 seconds (SoC default) * b01: 10 seconds * b10: 15 seconds * b11: PMIC is not disabled Signed-off-by: Ian Ray Link: https://lore.kernel.org/r/20250315093455.1100-3-ian.ray@gehealthcare.com Signed-off-by: Dmitry Torokhov commit fe315d6a378689119f0270037f7378d2bfcbe634 Author: Ian Ray Date: Wed Apr 30 20:51:07 2025 -0700 dt-bindings: crypto: fsl,sec-v4.0-mon: Add "power-off-time-sec" Update to reference the input.yaml schema, thus enabling the use of the common 'power-off-time' property. The hardware supports one of four fixed values, and the new property is optional. Signed-off-by: Ian Ray Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250315093455.1100-2-ian.ray@gehealthcare.com Signed-off-by: Dmitry Torokhov commit d20df86b056b95845f6ed52da1010059202a0c23 Author: Thorsten Blum Date: Sat Apr 26 16:13:41 2025 +0200 ASoC: Intel: avs: Fix kcalloc() sizes rlist, clist, and slist are allocated using sizeof(pointer) instead of sizeof(*pointer). Fix the allocations by using sizeof(*pointer) and avoid overallocating memory on 64-bit systems. Fixes: f2f847461fb7 ("ASoC: Intel: avs: Constrain path based on BE capabilities") Signed-off-by: Thorsten Blum Reviewed-by: Amadeusz Sławiński Link: https://patch.msgid.link/20250426141342.94134-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit a9ec9212f6d3b5fac6c2bcaaa9fcbcb469f045cb Author: Peng Fan Date: Sun Apr 27 13:50:20 2025 +0800 ASoC: codec: sma1307: Remove including of_gpio.h of_gpio.h is deprecated. And there is no user in this driver using API in of_gpio.h, so remove it. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20250427055020.176099-1-peng.fan@oss.nxp.com Signed-off-by: Mark Brown commit 178c169a30b011971cbbf9c79032b5898b1b07de Author: Peng Fan Date: Mon Apr 28 20:12:47 2025 +0800 ASoC: codec: twl4030: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use of_property_present to check "ti,hs_extmute_gpio" to set hs_extmute - if returned value is true. - Use devm_gpiod_get_optional to get GPIO descriptor, set consumer name. - Use gpiod_set_value to configure output value. While at here - drop remove hook after switching to use devm_gpiod_get_optional - Add return value for twl4030_init_chip to propagate value to parent in case defer probe happens Checking the only user logicpd-som-lv.dtsi that uses polarity GPIO_ACTIVE_HIGH, so all should work as expected. Cc: Tony Lindgren Reviewed-by: Linus Walleij Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250428-twl4030-v2-2-868d0d572f12@nxp.com Signed-off-by: Mark Brown commit 5ae1bd2f6312948231e72cee1022dd6a0c29c7d0 Author: Peng Fan Date: Mon Apr 28 20:12:46 2025 +0800 ASoC: codec: twl4030: Sort headers alphabetically Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250428-twl4030-v2-1-868d0d572f12@nxp.com Signed-off-by: Mark Brown commit d055f51731744243b244aafb1720f793a5b61f7b Author: Svyatoslav Ryhel Date: Wed Apr 30 09:02:39 2025 +0300 power: supply: max17040: adjust thermal channel scaling IIO thermal channel is in millidegree while power supply framework expects decidegree values. Adjust scaling to get correct readings. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250430060239.12085-2-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit c8fafb34854af4f5036ee0cf582e4b00556c5cd0 Author: Andrea Righi Date: Wed Apr 30 10:40:21 2025 +0200 sched_ext: Avoid NULL scx_root deref in __scx_exit() A sched_ext scheduler may trigger __scx_exit() from a BPF timer callback, where scx_root may not be safely dereferenced. This can lead to a NULL pointer dereference as shown below (triggered by scx_tickless): BUG: kernel NULL pointer dereference, address: 0000000000000330 ... CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.14.0-virtme #1 PREEMPT(full) RIP: 0010:__scx_exit+0x2b/0x190 ... Call Trace: scx_bpf_get_idle_smtmask+0x59/0x80 bpf_prog_8320d4217989178c_dispatch_all_cpus+0x35/0x1b6 ... bpf_prog_97f847d871513f95_sched_timerfn+0x4c/0x264 bpf_timer_cb+0x7a/0x140 __hrtimer_run_queues+0x1f9/0x3a0 hrtimer_run_softirq+0x8c/0xd0 handle_softirqs+0xd3/0x3d0 __irq_exit_rcu+0x9a/0xc0 irq_exit_rcu+0xe/0x20 Fix this by checking for a valid scx_root and adding proper RCU protection. Fixes: 48e1267773866 ("sched_ext: Introduce scx_sched") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 8c7cf0fc8cf5f5dee66d767655e06e190e6f2881 Author: André Draszik Date: Tue Apr 1 11:11:03 2025 +0100 power: reset: syscon-reboot: add gs101-specific reset Linux supports a couple different reset modes, but this driver here doesn't distinguish between them and issues the same syscon register write irrespective of the reset mode requested by the kernel. Since DTs should not encode register writes (see e.g. [1]), update this driver to support different reset modes based on DT compatible match. At the same time, add support for Google GS101, which does support cold, hard, warm, and soft. As an example why this is useful, other than properly supporting the Linux reboot= kernel command line option or sysfs entry, this change allows gs101-platforms to default to a more secure cold-reset, but also to warm-reset in case RAM contents needs to be retained across the reset. Link: https://lore.kernel.org/all/20250227132644.GA1924628-robh@kernel.org/ [1] Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250401-syscon-reboot-reset-mode-v5-2-5b9357442363@linaro.org Signed-off-by: Sebastian Reichel commit 1495c1aa4447f64c1e2209a95b201cb6452bb775 Author: André Draszik Date: Tue Apr 1 11:11:02 2025 +0100 dt-bindings: reset: syscon-reboot: add google,gs101-reboot GS101 supports a couple different reset types via certain registers in the SYSCON register map. Add a compatible for it. When in effect, all register values and offsets are implied, hence they shall not be specified in that case. Signed-off-by: André Draszik Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250401-syscon-reboot-reset-mode-v5-1-5b9357442363@linaro.org Signed-off-by: Sebastian Reichel commit c01adf4097113f0732a0c975de686232829dcb72 Author: Andrea Righi Date: Wed Apr 30 22:21:56 2025 +0200 sched_ext: Add RCU protection to scx_root in DSQ iterator Using a DSQ iterators from a timer callback can trigger the following lockdep splat when accessing scx_root: ============================= WARNING: suspicious RCU usage 6.14.0-virtme #1 Not tainted ----------------------------- kernel/sched/ext.c:6907 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 no locks held by swapper/0/0. stack backtrace: CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.14.0-virtme #1 PREEMPT(full) Sched_ext: tickless (enabled+all) Call Trace: dump_stack_lvl+0x6f/0xb0 lockdep_rcu_suspicious.cold+0x4e/0xa3 bpf_iter_scx_dsq_new+0xb1/0xd0 bpf_prog_63f4fd1bccc101e7_dispatch_cpu+0x3e/0x156 bpf_prog_8320d4217989178c_dispatch_all_cpus+0x153/0x1b6 bpf_prog_97f847d871513f95_sched_timerfn+0x4c/0x264 ? hrtimer_run_softirq+0x4f/0xd0 bpf_timer_cb+0x7a/0x140 __hrtimer_run_queues+0x1f9/0x3a0 hrtimer_run_softirq+0x8c/0xd0 handle_softirqs+0xd3/0x3d0 __irq_exit_rcu+0x9a/0xc0 irq_exit_rcu+0xe/0x20 sysvec_apic_timer_interrupt+0x73/0x80 Add a proper dereference check to explicitly validate RCU-safe access to scx_root from rcu_read_lock() contexts and also from contexts that hold rcu_read_lock_bh(), such as timer callbacks. Fixes: cdf5a6faa8cf0 ("sched_ext: Move dsq_hash into scx_sched") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit cfe769670e82c2bdd1cd8b6e4dbe8614b6429211 Author: Pengyu Luo Date: Thu Mar 13 18:34:35 2025 +0800 power: supply: add Huawei Matebook E Go psy driver On the Huawei Matebook E Go tablet the EC provides access to the adapter and battery status. Add the driver to read power supply status on the tablet. This driver is inspired by the following drivers: drivers/power/supply/lenovo_yoga_c630_battery.c drivers/platform/arm64/acer-aspire1-ec.c drivers/acpi/battery.c drivers/acpi/ac.c base-commit: 613af589b566093ce7388bf3202fca70d742c166 Signed-off-by: Pengyu Luo Link: https://lore.kernel.org/r/20250313103437.108772-1-mitltlatltl@gmail.com Signed-off-by: Sebastian Reichel commit da072da2c8ca3e886133c5826a3f802f3d816708 Author: Antonio Fernando Silva e Cruz Filho Date: Tue Apr 29 21:08:20 2025 -0300 drm/amd/display: Rename program_timing function for better debugging [WHY] Improve the output when using the ftrace debug feature, making it easier to identify which function is currently being executed. [HOW] Rename the program_timing function to a name that includes the path to the function's file. Signed-off-by: Antonio Fernando Silva e Cruz Filho Co-developed-by: André Nogueira Ribeiro Signed-off-by: André Nogueira Ribeiro Signed-off-by: Alex Deucher commit 97c39b4da606f6e6ec62689d1963ee6a5ad7f8ac Author: Dan Carpenter Date: Wed Apr 30 11:05:13 2025 +0300 drm/amdgpu/userq: remove unnecessary NULL check The "ticket" pointer points to in the middle of the &exec struct so it can't be NULL. Remove the check. Reviewed-by: Christian König Acked-by: Shashank Sharma Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit d6c6d5ec6652f0c2492767d886e2c39d089d58b9 Author: Dan Carpenter Date: Wed Apr 30 11:01:24 2025 +0300 drm/amdgpu/userq: Call unreserve on error in amdgpu_userq_fence_read_wptr() This error path should call amdgpu_bo_unreserve() before returning. Fixes: d8675102ba32 ("drm/amdgpu: add vm root BO lock before accessing the vm") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit aded8b3c36f17575604544fb10bfb01f1b197db1 Author: Alex Deucher Date: Tue Apr 29 13:46:12 2025 -0400 drm/amdgpu: properly handle GC vs MM in amdgpu_vmid_mgr_init() When kernel queues are disabled, all GC vmids are available for the scheduler. MM vmids are still managed by the driver so make all 16 available. Also fix gmc 10 vs 11 mix up in commit 1f61fc28b939 ("drm/amdgpu/mes: make more vmids available when disable_kq=1") v2: Properly handle pre-GC 10 hardware Fixes: 1f61fc28b939 ("drm/amdgpu/mes: make more vmids available when disable_kq=1") Cc: Arvind Yadav Reviewed-by: Arvind Yadav Signed-off-by: Alex Deucher commit 2e828a25f850f1b7bd9be61fdac07bf6901b0d08 Author: Alex Deucher Date: Tue Apr 29 15:27:20 2025 -0400 drm/amdgpu/mes: use correct MES pipe for resets Use the KIQ pipe for kernel queues and the SCHED pipe for user queues. Fixes: 2408b0272b04 ("drm/amdgpu/mes: consolidate on a single mes reset callback") Cc: Michael Chen Cc: Shaoyun Liu Reviewed-by: Michael Chen Signed-off-by: Alex Deucher commit 2408b0272b042e751b6a3cbbc14bb638bccfcefc Author: Alex Deucher Date: Thu Apr 24 16:46:55 2025 -0400 drm/amdgpu/mes: consolidate on a single mes reset callback Use the legacy one as it covers both kernel queues and user queues. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 6535348a3eaa6a4521ff35367d661c432dedaf7b Author: Alex Deucher Date: Thu Apr 24 16:35:30 2025 -0400 drm/amdgpu/mes: remove more unused functions These were leftover from mes bring up and are unused. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 4e24c6bb5fab4d74205dde07c5c4e6c004f11938 Author: Bagas Sanjaya Date: Sun Apr 27 09:36:26 2025 +0700 drm/amdgpu/userq: fix user_queue parameters list Sphinx reports htmldocs warning: Documentation/gpu/amdgpu/module-parameters:7: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:1119: ERROR: Unexpected indentation. [docutils] Fix the warning by using reST bullet list syntax for user_queue parameter options, separated from preceding paragraph by a blank line. Fixes: fb20954c9717 ("drm/amdgpu/userq: rework driver parameter") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250422202956.176fb590@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Signed-off-by: Alex Deucher commit 0105725e2d985899cef5ee187bb27f040f24f2ab Author: Lijo Lazar Date: Mon Apr 28 10:36:35 2025 +0530 drm/amdgpu: Fix comment style Fix code comment style Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504271826.xy2fFO28-lkp@intel.com/ Signed-off-by: Alex Deucher commit 3580440308a1817ce286351530b5b6a09493ba46 Author: Lijo Lazar Date: Mon Apr 28 10:29:04 2025 +0530 drm/amd/pm: Fix comment style Fix code comment style Signed-off-by: Lijo Lazar Reviewed-by: Yang Wang Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504271422.D6cqMlZ0-lkp@intel.com/ Signed-off-by: Alex Deucher commit cf1fcdeec4cacf12cad6a4b2cfb79fdc8e13fe9b Author: Lijo Lazar Date: Mon Apr 28 15:07:07 2025 +0530 drm/amdgpu: Print bootloader status for long waits If it needs a long wait for completion of bootloader execution, report the status in between. That helps to know if there is some issue during bootloader execution. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 161949dd716e1dc738da0a0ff0efb20dd914e408 Author: Yifan Zha Date: Mon Apr 21 17:06:52 2025 +0800 drm/amdgpu: refine MES register print for devices of hive [Why] Register access print missed device info. [How] Using dev_xxx instead of DRM_xxx to indicate which device of a hive is the message for. Signed-off-by: Yifan Zha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3805e6959ced4c0735a4ae53f0c56324c87c72b2 Author: Lijo Lazar Date: Fri Apr 25 12:31:19 2025 +0530 drm/amdgpu: Fix query order of XGMI v6.4.1 status Keep the register offsets as per link order for querying XGMI v6.4.1 link status. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Tested-by: Mangesh Gadre Fixes: 6dee64e765c4 ("drm/amdgpu: Fix xgmi v6.4.1 link status reporting") Signed-off-by: Alex Deucher commit 96ac487c120041715e3b87969a15e1c27d9d2d65 Author: Asad Kamal Date: Thu Mar 20 18:21:57 2025 +0800 drm/amd/pm: Add board voltage node to hwmon Add and expose board voltage node as vddboard to hwmon for smu_v13_0_6 v2: Replace ip check with supported sensor attribute(Lijo) Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ad7c088e31f026d71fe87fd09473fafb7d6ed006 Author: Jesse.Zhang Date: Mon Apr 28 10:35:19 2025 +0800 drm/amdgpu: Fix API status offset for MES queue reset The mes_v11_0_reset_hw_queue and mes_v12_0_reset_hw_queue functions were using the wrong union type (MESAPI__REMOVE_QUEUE) when getting the offset for api_status. Since these functions handle queue reset operations, they should use MESAPI__RESET union instead. This fixes the polling of API status during hardware queue reset operations in the MES for both v11 and v12 versions. Signed-off-by: Jesse Zhang Reviewed-By: Shaoyun.liu Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 3a2191efe45d00f9890071a9a81be15db9dab68d Author: Asad Kamal Date: Sat Apr 12 17:34:41 2025 +0800 drm/amd/pm: Add voltage caps for smu_v13_0_6 Add & enable board voltage caps for smu_v13_0_6 v3: Update version check for board voltage support Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ad3d93230d6b6e65b7c320e211e5008ee86627b5 Author: Asad Kamal Date: Sat Apr 12 17:30:09 2025 +0800 drm/amd/pm: Fill static metrics data Fill static metrics data for smu_v13_0_6 v2: Proceed with driver load just with warning even if board voltage reads invalid value Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0ee5847849c358d2caae53b2fbd6cfa38d6120d3 Author: Asad Kamal Date: Mon Apr 14 21:43:09 2025 +0800 drm/amd/pm: Use common function to fetch static metrics table Use common function to fetch static metrics table for smu_v13_0_12 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9eddfcbef4d583a3b14eb304da71965a09e43a33 Author: Asad Kamal Date: Sat Apr 12 17:14:13 2025 +0800 drm/amd/pn: Fetch static metrics table Fetch static metrics table for smu_v13_0_6 v2: Add static metrics caps check to fetch static metrics table v3: Update version having all fixes for static metrics support Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a2344a98277fd65732b80f5139655b7417e9e23c Author: Asad Kamal Date: Sat Apr 12 16:34:52 2025 +0800 drm/amd/pm: Update pmfw headers for smu_v_13_0_6 Update pmfw headers for smu_v_13_0_6 to include static metrics table Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 482d48533257fdaa05b0f847ee919305f1668790 Author: Alex Deucher Date: Fri Apr 25 12:11:45 2025 -0400 drm/amdgpu/userq: take the userq_mgr lock in enforce isolation Add the missing locking. Fixes: 94976e7e5ede ("drm/amdgpu/userq: add helpers to start/stop scheduling") Reviewed-by: Arvind Yadav Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit c5e02d6588f2498cf726e13504593f7325f1ee61 Author: Alex Deucher Date: Fri Apr 25 12:07:06 2025 -0400 drm/amdgpu/userq: take the userq_mgr lock in suspend/resume Add the missing locking. Fixes: 73e12e98ec0c ("drm/amdgpu/userq: add suspend and resume helpers") Reviewed-by: Arvind Yadav Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 3e5f86c14c3440171f2a3e7a68ceb739297726e9 Author: Sonny Jiang Date: Wed Apr 23 12:32:01 2025 -0400 drm/amdgpu: Add DPG pause for VCN v5.0.1 For vcn5.0.1 only, enable DPG PAUSE to avoid DPG resets. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit b02a284cc8778e358fb9f7ac6469710729a2b49a Author: Asad Kamal Date: Thu Mar 20 15:31:59 2025 +0800 drm/amd/pm: Add ip version check for smu_v13_0_12 functions Add ip version check to use smu_v13_0_12 specific functions Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d85212e1cec1b586160ef4a8e35690dac8c719ad Author: Aurabindo Pillai Date: Thu Apr 24 15:15:10 2025 -0400 drm/amd/display: downgrade HDMI infoframe error to one time warning In certain config, a modeprobe test triggers too many instances of the error related to infoframe. Make it print only once, and also make it a warning. Fixes: 6027cbee1900 ("drm/amd/display: Add error check for avi and vendor infoframe setup function") Signed-off-by: Aurabindo Pillai Reviewed-by: Chengjun Yao Signed-off-by: Alex Deucher commit 7295e00df06368b48f386875daaad275d9ca5181 Author: Eric Huang Date: Wed Apr 23 11:29:06 2025 -0400 drm/amdkfd: add pasid debugfs entries the entries will be appearing at /sys/kernel/debug/kfd/proc//pasid_. Signed-off-by: Eric Huang Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 56801cb83c8c95ae23ea576570c75a01c1f07774 Author: Arvind Yadav Date: Tue Apr 22 19:29:03 2025 +0530 drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue. v2: rebase. Cc: Arunpravin Paneer Selvam Reviewed-by: Sunil Khatri Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 716ad3c28f9d228558de18d5c4aae00bcc6a2a9c Author: Srinivasan Shanmugam Date: Wed Apr 23 19:00:09 2025 +0530 drm/amd/display: Fix NULL pointer dereference for program_lut_mode in dcn401_populate_mcm_luts This commit introduces a NULL pointer check for mpc->funcs->program_lut_mode in the dcn401_populate_mcm_luts function. The previous implementation directly called program_lut_mode without validating its existence, which could lead to a NULL pointer dereference. With this change, the function is now only invoked if mpc->funcs->program_lut_mode is not NULL Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn401/dcn401_hwseq.c:720 dcn401_populate_mcm_luts() error: we previously assumed 'mpc->funcs->program_lut_mode' could be null (see line 701) drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn401/dcn401_hwseq.c 642 void dcn401_populate_mcm_luts(struct dc *dc, 643 struct pipe_ctx *pipe_ctx, 644 struct dc_cm2_func_luts mcm_luts, 645 bool lut_bank_a) 646 { ... 716 } 717 if (m_lut_params.pwl) { 718 if (mpc->funcs->mcm.populate_lut) 719 mpc->funcs->mcm.populate_lut(mpc, m_lut_params, lut_bank_a, mpcc_id); --> 720 mpc->funcs->program_lut_mode(mpc, MCM_LUT_SHAPER, MCM_LUT_ENABLE, lut_bank_a, mpcc_id); Cc: Yihan Zhu Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Tom Chung Cc: Roman Li Cc: Alex Hung Cc: Aurabindo Pillai Reported-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Yihan Zhu Signed-off-by: Alex Deucher commit ab9fcc6362e0699fc1150aa1d8503c40fce2c1e1 Author: Amber Lin Date: Tue Apr 22 15:54:19 2025 -0400 drm/amdkfd: Set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB When submitting MQD to CP, set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB bit so it'll allow SDMA preemption if there is a massive command buffer of long-running SDMA commands. Signed-off-by: Amber Lin Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ffc7e11c1014db7b2fef4b563a53d444a0932f40 Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:26 2025 -0600 drm/amdgpu: Add documentation associated with CSB Add a description for the get_csb_buffer callback, update the glossary, and add some extra information about RB, which is associated with CSB configuration. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e7164c7ade76063adf226bc9212da3f0595d734f Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:25 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v6_0_get_csb_buffer Remove duplications from gfx_v6_0_get_csb_buffer by using CSB helpers. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit aff78a61720edb9123407dd8369a0b1cb97842f1 Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:24 2025 -0600 drm/amdgpu/gfx: Fix gfx_v7_0_get_csb_buffer to use rb_config Instead of having the hardcoded values for the CSB buffer in gfx_v7_0_get_csb_buffer, use the values calculated in previous steps by accessing raster_config and raster_config_1. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e125a6e8ce0d747f4ae62234587308cfbbdcf4fa Author: Prike Liang Date: Tue Apr 15 10:31:15 2025 +0800 drm/amdgpu: set the evf name to identify the userq case The evf fence name can clearly identify the userq usage. Signed-off-by: Prike Liang Reviewed-by: Christian König Reviewed-by: Arvind Yadav Signed-off-by: Alex Deucher commit d8116a32cdbe456c7f511183eb9ab187e3d590fb Author: Lijo Lazar Date: Mon Apr 21 13:25:51 2025 +0530 drm/amdgpu: Fix offset for HDP remap in nbio v7.11 APUs in passthrough mode use HDP flush. 0x7F000 offset used for remapping HDP flush is mapped to VPE space which could get power gated. Use another unused offset in BIF space. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 923406e74ec66364b829b7f8b6b67d46200567a6 Author: Lijo Lazar Date: Thu Apr 17 10:15:46 2025 +0530 drm/amd/pm: Reset SMU v13.0.x custom settings On SMU v13.0.2 and SMU v13.0.6 variants user may choose custom min/max clocks in manual perf mode. Those custom min/max values need to be reset once user switches to auto or restores default settings. Otherwise, they may get used inadvertently during the next operation. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9d40b05d6daa484b5be4495ec6b1117da1a3f31f Author: Prike Liang Date: Tue Apr 15 10:27:44 2025 +0800 drm/amdgpu: add the evf attached gem obj resv dump This debug dump will help on debugging the evf attached gem obj fence related issue. Signed-off-by: Prike Liang Reviewed-by: Christian König Reviewed-by: Arvind Yadav Signed-off-by: Alex Deucher commit dbe4c63689bc6b5fd3ab72650ea4b6a667e96a68 Author: Felix Kuehling Date: Thu Apr 17 12:02:09 2025 -0400 drm/amdgpu: Fail DMABUF map of XGMI-accessible memory If peer memory is XGMI-accessible, we should never access it through PCIe P2P DMA mappings. PCIe P2P is slower, has different coherence behaviour, limited or no support for atomics, or may not work at all. Fail with a warning if DMABUF mappings of such memory are attempted. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 727b77df826b44853476d6e8690fec4cf5515eca Author: Mario Limonciello Date: Tue Apr 22 11:07:40 2025 -0500 Documentation/amdgpu: Add Ryzen AI Max 300 series processor This has been announced so add to the table. Link: https://www.amd.com/en/products/processors/laptop/ryzen/ai-300-series/amd-ryzen-ai-max-plus-395.html Reviewed-by: Alex Deucher Link: https://lore.kernel.org/r/20250422160740.3610-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 9bd5a47ee26295d60fada8beaadc11eb9990b997 Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:23 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v7_0_get_csb_buffer Use CSB helpers to remove code duplication from gfx_v7_0_get_csb_buffer. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b990cb52340aedc2071fcf79e331a5b4bb7514ea Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:22 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v8_0_get_csb_buffer Remove code duplication from gfx_v8_0_get_csb_buffer by using CSB helpers. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9fec2e92fa991c882df424ab29f12779b217ab94 Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:21 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v9_0_get_csb_buffer Eliminate code duplication in gfx_v9_0_get_csb_buffer by using CSB helpers. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0eef0e36bab1396f696983c8698c3c2f2a9d6a9d Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:20 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v10_0_get_csb_buffer Remove duplicate code by using CSB helpers. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 106172df6ece4fc0a53471c71e0d05e9140fa2cc Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:19 2025 -0600 drm/amdgpu/gfx: Use CSB helpers in gfx_v11_0_get_csb_buffer Part of the code in gfx_v11_0_get_csb_buffer can be removed in favor of some GFX CSB helpers. This commit removes the duplicated part for the GFX 11 CSB function. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9718f7457dba2e98dab256217814296b5ad47ee4 Author: Rodrigo Siqueira Date: Mon Apr 21 16:12:18 2025 -0600 drm/amdgpu/gfx: Introduce helpers handling CSB manipulation From GFX6 to GFX11, there is a function for getting the CSB buffer to be put into the hardware. Three common parts are duplicated in all of these GFX functions: 1. Prepare the CSB preamble. 2. Parser the CS data. 3. End the CSB preamble. This commit creates helpers to be used from GFX6 to GFX11. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5a2658fda44f67003e7587547da6ac5decc97072 Author: Colin Ian King Date: Tue Apr 22 11:26:26 2025 +0100 drm/amdgpu: Fix spelling mistake "rounter" -> "router" There is a spelling mistake with the array utcl2_rounter_str, it appears it should be utcl2_router_str. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit e5f7e4e0a445f1b9b81ddc9b968e52b44f9d4242 Author: Kees Cook Date: Mon Apr 21 14:58:34 2025 -0700 drm/amdgpu/atom: Work around vbios NULL offset false positive GCC really does not want to consider NULL (or near-NULL) addresses as valid, so calculations based off of NULL end up getting range-tracked into being an offset wthin a 0 byte array. It gets especially mad about this: if (vbios_str == NULL) vbios_str += sizeof(BIOS_ATOM_PREFIX) - 1; ... if (vbios_str != NULL && *vbios_str == 0) vbios_str++; It sees this as being "sizeof(BIOS_ATOM_PREFIX) - 1" byte offset from NULL, when building with -Warray-bounds (and the coming -fdiagnostic-details flag): In function 'atom_get_vbios_pn', inlined from 'amdgpu_atom_parse' at drivers/gpu/drm/amd/amdgpu/atom.c:1553:2: drivers/gpu/drm/amd/amdgpu/atom.c:1447:34: error: array subscript 0 is outside array bounds of 'unsigned char[0]' [-Werror=array-bounds=] 1447 | if (vbios_str != NULL && *vbios_str == 0) | ^~~~~~~~~~ 'amdgpu_atom_parse': events 1-2 1444 | if (vbios_str == NULL) | ^ | | | (1) when the condition is evaluated to true ...... 1447 | if (vbios_str != NULL && *vbios_str == 0) | ~~~~~~~~~~ | | | (2) out of array bounds here In function 'amdgpu_atom_parse': cc1: note: source object is likely at address zero As there isn't a sane way to convince it otherwise, hide vbios_str from GCC's optimizer to avoid the warning so we can get closer to enabling -Warray-bounds globally. Acked-by: Alex Deucher Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit d4673f3c3b3dcb74e36e53cdfc880baa7a87b330 Author: Chris Bainbridge Date: Thu Apr 17 16:50:05 2025 -0500 drm/amd/display: Fix slab-use-after-free in hdcp The HDCP code in amdgpu_dm_hdcp.c copies pointers to amdgpu_dm_connector objects without incrementing the kref reference counts. When using a USB-C dock, and the dock is unplugged, the corresponding amdgpu_dm_connector objects are freed, creating dangling pointers in the HDCP code. When the dock is plugged back, the dangling pointers are dereferenced, resulting in a slab-use-after-free: [ 66.775837] BUG: KASAN: slab-use-after-free in event_property_validate+0x42f/0x6c0 [amdgpu] [ 66.776171] Read of size 4 at addr ffff888127804120 by task kworker/0:1/10 [ 66.776179] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.14.0-rc7-00180-g54505f727a38-dirty #233 [ 66.776183] Hardware name: HP HP Pavilion Aero Laptop 13-be0xxx/8916, BIOS F.17 12/18/2024 [ 66.776186] Workqueue: events event_property_validate [amdgpu] [ 66.776494] Call Trace: [ 66.776496] [ 66.776497] dump_stack_lvl+0x70/0xa0 [ 66.776504] print_report+0x175/0x555 [ 66.776507] ? __virt_addr_valid+0x243/0x450 [ 66.776510] ? kasan_complete_mode_report_info+0x66/0x1c0 [ 66.776515] kasan_report+0xeb/0x1c0 [ 66.776518] ? event_property_validate+0x42f/0x6c0 [amdgpu] [ 66.776819] ? event_property_validate+0x42f/0x6c0 [amdgpu] [ 66.777121] __asan_report_load4_noabort+0x14/0x20 [ 66.777124] event_property_validate+0x42f/0x6c0 [amdgpu] [ 66.777342] ? __lock_acquire+0x6b40/0x6b40 [ 66.777347] ? enable_assr+0x250/0x250 [amdgpu] [ 66.777571] process_one_work+0x86b/0x1510 [ 66.777575] ? pwq_dec_nr_in_flight+0xcf0/0xcf0 [ 66.777578] ? assign_work+0x16b/0x280 [ 66.777580] ? lock_is_held_type+0xa3/0x130 [ 66.777583] worker_thread+0x5c0/0xfa0 [ 66.777587] ? process_one_work+0x1510/0x1510 [ 66.777588] kthread+0x3a2/0x840 [ 66.777591] ? kthread_is_per_cpu+0xd0/0xd0 [ 66.777594] ? trace_hardirqs_on+0x4f/0x60 [ 66.777597] ? _raw_spin_unlock_irq+0x27/0x60 [ 66.777599] ? calculate_sigpending+0x77/0xa0 [ 66.777602] ? kthread_is_per_cpu+0xd0/0xd0 [ 66.777605] ret_from_fork+0x40/0x90 [ 66.777607] ? kthread_is_per_cpu+0xd0/0xd0 [ 66.777609] ret_from_fork_asm+0x11/0x20 [ 66.777614] [ 66.777643] Allocated by task 10: [ 66.777646] kasan_save_stack+0x39/0x60 [ 66.777649] kasan_save_track+0x14/0x40 [ 66.777652] kasan_save_alloc_info+0x37/0x50 [ 66.777655] __kasan_kmalloc+0xbb/0xc0 [ 66.777658] __kmalloc_cache_noprof+0x1c8/0x4b0 [ 66.777661] dm_dp_add_mst_connector+0xdd/0x5c0 [amdgpu] [ 66.777880] drm_dp_mst_port_add_connector+0x47e/0x770 [drm_display_helper] [ 66.777892] drm_dp_send_link_address+0x1554/0x2bf0 [drm_display_helper] [ 66.777901] drm_dp_check_and_send_link_address+0x187/0x1f0 [drm_display_helper] [ 66.777909] drm_dp_mst_link_probe_work+0x2b8/0x410 [drm_display_helper] [ 66.777917] process_one_work+0x86b/0x1510 [ 66.777919] worker_thread+0x5c0/0xfa0 [ 66.777922] kthread+0x3a2/0x840 [ 66.777925] ret_from_fork+0x40/0x90 [ 66.777927] ret_from_fork_asm+0x11/0x20 [ 66.777932] Freed by task 1713: [ 66.777935] kasan_save_stack+0x39/0x60 [ 66.777938] kasan_save_track+0x14/0x40 [ 66.777940] kasan_save_free_info+0x3b/0x60 [ 66.777944] __kasan_slab_free+0x52/0x70 [ 66.777946] kfree+0x13f/0x4b0 [ 66.777949] dm_dp_mst_connector_destroy+0xfa/0x150 [amdgpu] [ 66.778179] drm_connector_free+0x7d/0xb0 [ 66.778184] drm_mode_object_put.part.0+0xee/0x160 [ 66.778188] drm_mode_object_put+0x37/0x50 [ 66.778191] drm_atomic_state_default_clear+0x220/0xd60 [ 66.778194] __drm_atomic_state_free+0x16e/0x2a0 [ 66.778197] drm_mode_atomic_ioctl+0x15ed/0x2ba0 [ 66.778200] drm_ioctl_kernel+0x17a/0x310 [ 66.778203] drm_ioctl+0x584/0xd10 [ 66.778206] amdgpu_drm_ioctl+0xd2/0x1c0 [amdgpu] [ 66.778375] __x64_sys_ioctl+0x139/0x1a0 [ 66.778378] x64_sys_call+0xee7/0xfb0 [ 66.778381] do_syscall_64+0x87/0x140 [ 66.778385] entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fix this by properly incrementing and decrementing the reference counts when making and deleting copies of the amdgpu_dm_connector pointers. (Mario: rebase on current code and update fixes tag) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006 Signed-off-by: Chris Bainbridge Fixes: da3fd7ac0bcf3 ("drm/amd/display: Update CP property based on HW query") Reviewed-by: Alex Hung Link: https://lore.kernel.org/r/20250417215005.37964-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 75f138db48c5c493f0ac198c2579d52fc6a4c4a0 Author: Lijo Lazar Date: Wed Apr 16 12:23:44 2025 +0530 drm/amdgpu: Disallow partition query during reset Reject queries to get current partition modes during reset. Also, don't accept sysfs interface requests to switch compute partition mode while in reset. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit af0819755c8cf746930627b7f88b34566240815a Author: Srinivasan Shanmugam Date: Mon Apr 21 08:38:33 2025 +0530 drm/amd/display: Fix NULL pointer dereferences in dm_update_crtc_state() v2 Added checks for NULL values after retrieving drm_new_conn_state to prevent dereferencing NULL pointers. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10751 dm_update_crtc_state() warn: 'drm_new_conn_state' can also be NULL drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c 10672 static int dm_update_crtc_state(struct amdgpu_display_manager *dm, 10673 struct drm_atomic_state *state, 10674 struct drm_crtc *crtc, 10675 struct drm_crtc_state *old_crtc_state, 10676 struct drm_crtc_state *new_crtc_state, 10677 bool enable, 10678 bool *lock_and_validation_needed) 10679 { 10680 struct dm_atomic_state *dm_state = NULL; 10681 struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state; 10682 struct dc_stream_state *new_stream; 10683 int ret = 0; 10684 ... 10703 10704 /* TODO This hack should go away */ 10705 if (connector && enable) { 10706 /* Make sure fake sink is created in plug-in scenario */ 10707 drm_new_conn_state = drm_atomic_get_new_connector_state(state, 10708 connector); drm_atomic_get_new_connector_state() can't return error pointers, only NULL. 10709 drm_old_conn_state = drm_atomic_get_old_connector_state(state, 10710 connector); 10711 10712 if (IS_ERR(drm_new_conn_state)) { ^^^^^^^^^^^^^^^^^^ 10713 ret = PTR_ERR_OR_ZERO(drm_new_conn_state); Calling PTR_ERR_OR_ZERO() doesn't make sense. It can't be success. 10714 goto fail; 10715 } 10716 ... 10748 10749 dm_new_crtc_state->abm_level = dm_new_conn_state->abm_level; 10750 --> 10751 ret = fill_hdr_info_packet(drm_new_conn_state, ^^^^^^^^^^^^^^^^^^ Unchecked dereference 10752 &new_stream->hdr_static_metadata); 10753 if (ret) 10754 goto fail; 10755 v2: Modified the NULL pointer check for drm_new_conn_state in the dm_update_crtc_state function to include a warning via WARN_ON and return -EINVAL to indicate an invalid state when the pointer is NULL. Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Alex Hung Cc: Aurabindo Pillai Reported-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9b33df36b45136d301241920d13a0a3ecc77b8f9 Author: Pekka Paalanen Date: Mon Apr 14 08:56:56 2025 +0000 drm/doc: document front-buffer rendering Explain how to perform front-buffer rendering. v2: apply Pekka's rewrite Signed-off-by: Pekka Paalanen Signed-off-by: Simon Ser Reviewed-by: Simon Ser Link: https://lore.kernel.org/r/20250414085652.43904-1-contact@emersion.fr commit 797002deed03491215a352ace891749b39741b69 Author: Neill Kapron Date: Sun Apr 27 09:40:58 2025 +0000 selftests/seccomp: fix syscall_restart test for arm compat The inconsistencies in the systcall ABI between arm and arm-compat can can cause a failure in the syscall_restart test due to the logic attempting to work around the differences. The 'machine' field for an ARM64 device running in compat mode can report 'armv8l' or 'armv8b' which matches with the string 'arm' when only examining the first three characters of the string. This change adds additional validation to the workaround logic to make sure we only take the arm path when running natively, not in arm-compat. Fixes: 256d0afb11d6 ("selftests/seccomp: build and pass on arm64") Signed-off-by: Neill Kapron Link: https://lore.kernel.org/r/20250427094103.3488304-2-nkapron@google.com Signed-off-by: Kees Cook commit 8239b771b94b639556c1987185fd82b2a896c923 Author: Tatyana Nikolova Date: Tue Apr 15 21:15:48 2025 -0500 ice: Replace ice specific DSCP mapping num with a kernel define Replace ice driver specific DSCP mapping number defines ICE_DSCP_NUM_VAL and IIDC_MAX_DSCP_MAPPING with an equivalent kernel define DSCP_MAX. Reviewed-by: Przemek Kitszel Signed-off-by: Tatyana Nikolova Signed-off-by: Dave Ertman Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit d9251a560ba67bbedd53b81aee32e1ad95f42000 Author: Dave Ertman Date: Tue Apr 15 21:15:47 2025 -0500 iidc/ice/irdma: Break iidc.h into two headers In preparation of supporting more than a single core PCI driver for RDMA, break the iidc_rdma.h header file into two more focused headers. Only the elements universal to all Intel drivers will remain in the generic iidc_rdma.h header. Move the ice specific information to an ice specific header file named iidc_rdma_ice.h. Reviewed-by: Przemek Kitszel Signed-off-by: Dave Ertman Signed-off-by: Tatyana Nikolova Signed-off-by: Tony Nguyen commit 97b5631aae6896369712d6b7131afbc95c753587 Author: Dave Ertman Date: Tue Apr 15 21:15:46 2025 -0500 iidc/ice/irdma: Rename to iidc_* convention In preparation of supporting more than a single core PCI driver for RDMA, homogenize naming to iidc_rdma_* and IIDC_RDMA_* form. Reviewed-by: Przemek Kitszel Signed-off-by: Dave Ertman Signed-off-by: Tatyana Nikolova Signed-off-by: Tony Nguyen commit f35e5b3ccfd3516bc36b08e101678b036309397c Author: Lifeng Zheng Date: Fri Apr 11 17:38:55 2025 +0800 ACPI: CPPC: Add three functions related to autonomous selection cppc_set_epp() - write energy performance preference register value, based on ACPI 6.5, s8.4.6.1.7 cppc_get_auto_act_window() - read autonomous activity window register value, based on ACPI 6.5, s8.4.6.1.6 cppc_set_auto_act_window() - write autonomous activity window register value, based on ACPI 6.5, s8.4.6.1.6 Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-9-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit 2605e4ab6615ef43361b18fc6d08dd884896aad8 Author: Lifeng Zheng Date: Fri Apr 11 17:38:54 2025 +0800 ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel() Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel(). Using a cppc_perf_caps to carry the value is unnecessary. Add a check to ensure the pointer 'enable' is not null. Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-8-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit ab482f1bac6b128b8fe910b6663a4f74a3a9796c Author: Lifeng Zheng Date: Fri Apr 11 17:38:53 2025 +0800 ACPI: CPPC: Refactor register value get and set ABIs Refactor register value get and set ABIs by using cppc_get_reg_val(), cppc_set_reg_val() and CPPC_REG_VAL_READ(). Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-7-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit e05c75072c2eaa6e0b152a558b3be5cbcf79a587 Author: Lifeng Zheng Date: Fri Apr 11 17:38:52 2025 +0800 ACPI: CPPC: Add cppc_set_reg_val() Add cppc_set_reg_val() as a generic function for setting CPPC register values, with this features: 1. Check register. If a register is writeable, it must be a buffer and can not be null. 2. Extract the operations if register is in PCC out as cppc_set_reg_val_in_pcc(). This function can be used to reduce some existing code duplication. Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-6-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit b5ef45e6a1777fe4e857a1cd48631dc14064eae4 Author: Lifeng Zheng Date: Fri Apr 11 17:38:51 2025 +0800 ACPI: CPPC: Extract cppc_get_reg_val_in_pcc() Extract the operations if register is in pcc out from cppc_get_reg_val() as cppc_get_reg_val_in_pcc(). Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-5-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit 714d103ce868cd0718d0e5262cbc76384a2eb03a Author: Lifeng Zheng Date: Fri Apr 11 17:38:50 2025 +0800 ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val() Rename cppc_get_perf() to cppc_get_reg_val() as a generic function to read CPPC registers. Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-4-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit 45f3763a2122553e548fa0430b77605dc23f00cc Author: Lifeng Zheng Date: Fri Apr 11 17:38:49 2025 +0800 ACPI: CPPC: Optimize cppc_get_perf() Optimize cppc_get_perf() with three changes: 1. Change the error kind to "no such device" when pcc_ss_id < 0, as other register value getting functions. 2. Add a check to ensure the pointer 'perf' is no null. 3. Add a check to verify if the register is supported to be read before using it. The logic is: (1) If the register is of the integer type, check whether the register is optional and its value is 0. If yes, the register is not supported. (2) If the register is of other types, a null one is not supported. 4. Return the result of cpc_read() instead of 0. Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-3-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit e3d7935a6c6138da51626d2b956a079dd0e6671b Author: Lifeng Zheng Date: Fri Apr 11 17:38:48 2025 +0800 ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional In ACPI 6.5, s8.4.6.1 _CPC (Continuous Performance Control), whether each of the per-cpu cpc_regs[] is mandatory or optional is defined. Since the CPC_SUPPORTED() check is only for optional _CPC fields, another macro to check if the field is optional is needed. Reviewed-by: Pierre Gondois Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250411093855.982491-2-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki commit 852faf805539484968aa8cc93866008b7a6d0d52 Author: Arnd Bergmann Date: Mon Apr 7 17:10:52 2025 +0200 gcc-plugins: remove SANCOV gcc plugin With the minimum gcc version raised to 8.1, all supported compilers now understand the -fsanitize-coverage=trace-pc option, and there is no longer a need for the separate compiler plugin. Since only gcc-5 was able to use the plugin for several year now, it was already likely unused. Signed-off-by: Arnd Bergmann commit 8530ea3c9b9747faba46ed3a59ad103b894f1189 Author: Arnd Bergmann Date: Mon Apr 7 21:21:14 2025 +0200 Kbuild: remove structleak gcc plugin gcc-12 and higher support the -ftrivial-auto-var-init= flag, after gcc-8 is the minimum version, this is half of the supported ones, and the vast majority of the versions that users are actually likely to have, so it seems like a good time to stop having the fallback plugin implementation Older toolchains are still able to build kernels normally without this plugin, but won't be able to use variable initialization.. Signed-off-by: Arnd Bergmann commit 4f894483c902a49d428348f6ec8874fce59c63cb Author: Eric Biggers Date: Mon Apr 28 12:09:09 2025 -0700 firmware_loader: use SHA-256 library API instead of crypto_shash API This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Also take advantage of printk's built-in hex conversion using %*phN. Signed-off-by: Eric Biggers Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250428190909.852705-1-ebiggers@kernel.org Signed-off-by: Danilo Krummrich commit 2555d4c6872085584bda55d1c2bc048cae5fb0b3 Author: Arnd Bergmann Date: Fri Mar 28 22:17:40 2025 +0100 arm64: drop binutils version checks Now that gcc-8 and binutils-2.30 are the minimum versions, a lot of the individual feature checks can go away for simplification. Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann commit 5f5305dea066deb8a299cf9a00ac47b031332723 Author: Arnd Bergmann Date: Fri Mar 28 21:49:00 2025 +0100 raid6: skip avx512 checks It is no longer necessary to check for CONFIG_AS_AVX512, since the minimum assembler version is now from binutils-2.30 and this always supports it. Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann commit 118c40b7b50340bf7ff7e0adee8e3bab6e552c82 Author: Arnd Bergmann Date: Fri Mar 28 18:21:44 2025 +0100 kbuild: require gcc-8 and binutils-2.30 Commit a3e8fe814ad1 ("x86/build: Raise the minimum GCC version to 8.1") raised the minimum compiler version as enforced by Kbuild to gcc-8.1 and clang-15 for x86. This is actually the same gcc version that has been discussed as the minimum for all architectures several times in the past, with little objection. A previous concern was the kernel for SLE15-SP7 needing to be built with gcc-7. As this ended up still using linux-6.4 and there is no plan for an SP8, this is no longer a problem. Change it for all architectures and adjust the documentation accordingly. A few version checks can be removed in the process. The binutils version 2.30 is the lowest version used in combination with gcc-8 on common distros, so use that as the corresponding minimum. Link: https://lore.kernel.org/lkml/20240925150059.3955569-32-ardb+git@google.com/ Link: https://lore.kernel.org/lkml/871q7yxrgv.wl-tiwai@suse.de/ Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann commit 3a3ce10e7adcc02b333ffebbc414162e5d22fd16 Author: Sudeep Holla Date: Fri Apr 11 12:31:44 2025 +0100 ACPI: CPPC: Simplify PCC shared memory region handling The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this ACPI CPPC driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20250411113144.1151094-2-sudeep.holla@arm.com Signed-off-by: Rafael J. Wysocki commit 8960c45a0f41399770d408921180231395604e2f Author: Sudeep Holla Date: Fri Apr 11 12:31:43 2025 +0100 ACPI: PCC: Simplify PCC shared memory region handling The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this ACPI PCC opregion driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Tested-by: Adam Young Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20250411113144.1151094-1-sudeep.holla@arm.com Signed-off-by: Rafael J. Wysocki commit c53372dfb630e8b047a3c6677e62ffb6fda2752c Author: Arun R Murthy Date: Thu Apr 24 20:45:15 2025 +0530 drm/i915/display: move min_hblank from dp_mst.c to dp.c Minimum HBlank is programmed to address jitter for high resolutions with high refresh rates that have small Hblank, specifically where Hblank is smaller than one MTP. TODO: Add the min_hblank calculation for hdmi as well. v2: move from intel_audio.c to intel_dp.c some correction in link_bpp_x16 (Imre) v3: min_hblank for 8b/10b MST and 128b/132b SST/MST handle error for intel_dp_mst_dsc_get_slice_count reset min_hblank before disabling transcoder (Imre) v4: compute link_bpp_x16 within compute_min_hblank, return error in case of compute failure call compute_min_hblank() before vrr_compute_config (Imre) v5: readout MIN_HBLAN reg for Xe3+ Signed-off-by: Arun R Murthy Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250424-hblank-v7-2-8b002f1506cc@intel.com commit 7d585426a6538a717f55a1bb0b614d465bd03805 Author: Arun R Murthy Date: Thu Apr 24 20:45:14 2025 +0530 drm/display/dp: Export fn to calculate link symbol cycles Unify the function to calculate the link symbol cycles for both dsc and non-dsc case and export the function so that it can be used in the respective platform display drivers for other calculations. v2: unify the fn for both dsc and non-dsc case (Imre) v3: rename drm_dp_link_symbol_cycles to drm_dp_link_data_symbol_cycles retain slice_eoc_cycles as is (Imre) v4: Expose only drm_dp_link_symbol_cycles() (Imre) v6: Add slice pixels which was removed unknowingly (Vinod) Signed-off-by: Arun R Murthy Reviewed-by: Imre Deak Reviewed-by: Vinod Govindapillai Acked-by: Maarten Lankhorst Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250424-hblank-v7-1-8b002f1506cc@intel.com commit 20acf4dd46e4c0905676ad2a1d9a32041469893f Author: Thadeu Lima de Souza Cascardo Date: Wed Apr 30 13:36:28 2025 -0300 char: misc: make miscdevice unit test built-in only Since it uses __init symbols, it cannot be a module. Builds with CONFIG_TEST_MISC_MINOR=m will fail with: ERROR: modpost: "init_mknod" [drivers/misc/misc_minor_kunit.ko] undefined! ERROR: modpost: "init_unlink" [drivers/misc/misc_minor_kunit.ko] undefined! Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250429155404.2b6fe5b1@canb.auug.org.au/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504160338.BjUL3Owb-lkp@intel.com/ Fixes: 45f0de4f8dc3 ("char: misc: add test cases") Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/r/20250430-misc-test-fixup-v1-1-6f39ed6c733d@igalia.com Signed-off-by: Greg Kroah-Hartman commit bfecc4091e07a47696ac922783216d9e9ea46c97 Author: Hans Holmberg Date: Wed Apr 30 08:35:34 2025 +0000 xfs: allow ro mounts if rtdev or logdev are read-only Allow read-only mounts on rtdevs and logdevs that are marked as read-only and make sure those mounts can't be remounted read-write. Use the sb_open_mode helper to make sure that we don't try to open devices with write access enabled for read-only mounts. Signed-off-by: Hans Holmberg Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino commit cafb22242bfb7fad10fde6f9b99853fc924e691a Author: Mario Limonciello Date: Tue Apr 22 18:48:26 2025 -0500 Documentation: Add AMD Zen debugging document Debugging issues on AMD hardware can be challenging for users without proper documentation and tools. Introduce a document that includes techniques for debugging s2idle issues. It will be expanded for debugging other issues later. Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/20250422234830.2840784-2-superm1@kernel.org commit f699c66691fb7e08a5a631c5baf5f2a19b7a6468 Author: Mark Rutland Date: Wed Apr 30 18:32:40 2025 +0100 arm64/fpsimd: Avoid warning when sve_to_fpsimd() is unused Historically fpsimd_to_sve() and sve_to_fpsimd() were (conditionally) called by functions which were defined regardless of CONFIG_ARM64_SVE. Hence it was necessary that both fpsimd_to_sve() and sve_to_fpsimd() were always defined and not guarded by ifdeffery. As a result of the removal of fpsimd_signal_preserve_current_state() in commit: 929fa99b1215966f ("arm64/fpsimd: signal: Always save+flush state early") ... sve_to_fpsimd() has no callers when CONFIG_ARM64_SVE=n, resulting in a build-time warnign that it is unused: | arch/arm64/kernel/fpsimd.c:676:13: warning: unused function 'sve_to_fpsimd' [-Wunused-function] | 676 | static void sve_to_fpsimd(struct task_struct *task) | | ^~~~~~~~~~~~~ | 1 warning generated. In contrast, fpsimd_to_sve() still has callers which are defined when CONFIG_ARM64_SVE=n, and it would be awkward to hide this behind ifdeffery and/or to use stub functions. For now, suppress the warning by marking both fpsimd_to_sve() and sve_to_fpsimd() as 'static inline', as we usually do for stub functions. The compiler will no longer warn if either function is unused. Aside from suppressing the warning, there should be no functional change as a result of this patch. Link: https://lore.kernel.org/linux-arm-kernel/20250429194600.GA26883@willie-the-truck/ Reported-by: Will Deacon Fixes: 929fa99b1215 ("arm64/fpsimd: signal: Always save+flush state early") Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250430173240.4023627-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 003f144ca04621e598fc1c5c4ce0a851cddfe104 Author: Ruben Wauters Date: Wed Apr 30 00:03:59 2025 +0100 x86/CPU/AMD: Replace strcpy() with strscpy() strcpy() is deprecated due to issues with bounds checking and overflows. Replace it with strscpy(). Signed-off-by: Ruben Wauters Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250429230710.54014-1-rubenru09@aol.com commit e99efa8ac8fd9cebca99652cb55b277b7200455e Author: Timur Tabi Date: Tue Apr 29 12:39:58 2025 -0500 docs: debugfs: do not recommend debugfs_remove_recursive Update the debugfs documentation to indicate that debugfs_remove() should be used to clean up debugfs entries. In commit a3d1e7eb5abe ("simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems"), function debugfs_remove_recursive() was made into an alias for debugfs_remove(): #define debugfs_remove_recursive debugfs_remove Therefore, drivers should just use debugfs_remove() going forward. Signed-off-by: Timur Tabi Link: https://lore.kernel.org/r/20250429173958.3973958-1-ttabi@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 358b1c0f56ebb6996fcec7dcdcf6bae5dcbc8b6c Author: Anton Protopopov Date: Wed Apr 30 12:08:20 2025 +0000 libbpf: Use proper errno value in linker Return values of the linker_append_sec_data() and the linker_append_elf_relos() functions are propagated all the way up to users of libbpf API. In some error cases these functions return -1 which will be seen as -EPERM from user's point of view. Instead, return a more reasonable -EINVAL. Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs") Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250430120820.2262053-1-a.s.protopopov@gmail.com commit b104a941a94e16c806f2f3b8877e257c3285be65 Author: James Clark Date: Wed Mar 12 10:31:57 2025 +0000 coresight: Add a KUnit test for coresight_find_default_sink() Add a test to confirm that default sink selection skips over an ETF and returns an ETR even if it's further away. This also makes it easier to add new unit tests in the future. Reviewed-by: Leo Yan Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250312-james-cs-kunit-test-v4-1-ae3dd718a26a@linaro.org commit 468d8b462ac64659caec53eff34f02963d5f52c8 Author: Dave Ertman Date: Tue Apr 15 21:15:45 2025 -0500 iidc/ice/irdma: Rename IDC header file To prepare for the IDC upgrade to support different CORE PCI drivers, rename header file from iidc.h to iidc_rdma.h since this files functionality is specifically for RDMA support. Use net/dscp.h include in irdma osdep.h and DSCP_MAX type.h, instead of iidc header and define. Reviewed-by: Przemek Kitszel Signed-off-by: Dave Ertman Signed-off-by: Tatyana Nikolova Signed-off-by: Tony Nguyen commit b43dc4ab097859c24e2a6993119c927cffc856aa Author: Annie Li Date: Wed Apr 30 05:34:24 2025 +0000 x86/microcode/AMD: Do not return error when microcode update is not necessary After 6f059e634dcd("x86/microcode: Clarify the late load logic"), if the load is up-to-date, the AMD side returns UCODE_OK which leads to load_late_locked() returning -EBADFD. Handle UCODE_OK in the switch case to avoid this error. [ bp: Massage commit message. ] Fixes: 6f059e634dcd ("x86/microcode: Clarify the late load logic") Signed-off-by: Annie Li Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250430053424.77438-1-jiayanli@google.com commit a7f035c2c72496cf7ac34bfaa8c289e0d4c45836 Merge: df8c5ad0f56635 e6702c44c2adb2 Author: Mark Brown Date: Wed Apr 30 23:33:59 2025 +0900 spi: axi-spi-engine: offload instruction optimization Merge series from David Lechner : In order to achieve a 4 MSPS rate on a 16-bit ADC with a 80 MHz SCLK using the SPI offload feature of the AXI SPI Engine, we need to shave off some time that is spent executing unnecessary instructions. There are a few one-time setup instructions that can be moved so that they execute only once when the SPI offload trigger is enabled rather than repeating each time the offload is triggered. Additionally, a recent change to the IP block allows dropping the SYNC instruction completely. With these changes, we are left with only the 3 instructions that are needed to to assert CS, transfer the data, and deassert CS. This makes 3 + 16 * 12.5 ns = 237.5 ns < 250 ns which is comfortably within the available time period. commit 6f8b4788266c7df3b7cfc6c665f663b4c3d09aad Author: Alexander Aring Date: Tue Apr 29 16:29:13 2025 -0400 dlm: drop SCTP Kconfig dependency DLM does not use any exported SCTP function. SCTP is registered dynamically as protocol to the kernel and can be used over the right protocol identifiers on the socket api. We drop the SCTP dependency as DLM can also be used with TCP only. Signed-off-by: Alexander Aring Reviewed-by: Heming zhao Signed-off-by: David Teigland commit 574511615a2e17e5dfe4754f6e9cea005b6c718a Author: Alexander Aring Date: Tue Apr 29 16:29:12 2025 -0400 dlm: reject SCTP configuration if not enabled Reject SCTP dlm configuration if the kernel was never build with SCTP. Currently the only one known user space tool "dlm_controld" will drop an error in the logs and getting stuck. This behaviour should be fixed to deliver an error to the user or fallback to TCP. Signed-off-by: Alexander Aring Reviewed-by: Heming zhao Signed-off-by: David Teigland commit 55612ddb62fc12437a7ff2f27b51a8981bc187a4 Author: Alexander Aring Date: Tue Apr 29 16:29:11 2025 -0400 dlm: use SHUT_RDWR for SCTP shutdown Currently SCTP shutdown() call gets stuck because there is no incoming EOF indicator on its socket. On the peer side the EOF indicator as recvmsg() returns 0 will be triggered as mechanism to flush the socket queue on the receive side. In SCTP recvmsg() function sctp_recvmsg() we can see that only if sk_shutdown has the bit RCV_SHUTDOWN set SCTP will recvmsg() will return EOF. The RCV_SHUTDOWN bit will only be set when shutdown with SHUT_RD is called. We use now SHUT_RDWR to also get a EOF indicator from recvmsg() call on the shutdown() initiator. SCTP does not support half closed sockets and the semantic of SHUT_WR is different here, it seems that calling SHUT_WR on sctp sockets keeps the socket open to have the possibility to do some specific SCTP operations on it that we don't do here. There exists still a difference in the limitations of TCP vs SCTP in case if we are required to have a half closed socket functionality. This was tried to archieve with DLM protocol changes in the past and hopefully we really don't require half closed socket functionality. Signed-off-by: Alexander Aring Tested-by: Heming zhao Reviewed-by: Heming zhao Signed-off-by: David Teigland commit 8a856fdede1669cbaeadeea87fc5b2ac071cee1b Author: Alexander Aring Date: Tue Apr 29 16:29:10 2025 -0400 dlm: mask sk_shutdown value The sk->sk_shutdown value is flag value so use masking to check if RCV_SHUTDOWN is set as other possible values like SEND_SHUTDOWN can set as well. Signed-off-by: Alexander Aring Tested-by: Heming zhao Reviewed-by: Heming zhao Signed-off-by: David Teigland commit e6e6b692865d333d79d25c761c53b19e73e9653f Author: James Clark Date: Tue Mar 25 11:58:52 2025 +0000 coresight: Remove extern from function declarations Function declarations are extern by default so remove the extra noise and inconsistency. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-7-dfbd3822b2e5@linaro.org commit 48a5126be08514e1d8c9d67a7bf66af36ea6e02d Author: James Clark Date: Tue Mar 25 11:58:51 2025 +0000 coresight: Remove inlines from static function definitions These are all static and in one compilation unit so the inline has no effect on the binary. Except if FTRACE is enabled, then some functions which were already not inlined now get the nops added which allows them to be traced. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-6-dfbd3822b2e5@linaro.org commit 7cd6368657f1ee372aac902da911def75afe8477 Author: James Clark Date: Tue Mar 25 11:58:50 2025 +0000 coresight: Clear self hosted claim tag on probe This can be left behind from a crashed kernel after a kexec so clear it when probing each device. Clearing the self hosted bit even when claimed externally is harmless, so do it unconditionally. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-5-dfbd3822b2e5@linaro.org commit a1b0e77ce517ec03a50e14abf3cb1da9f6ccd59e Author: James Clark Date: Tue Mar 25 11:58:49 2025 +0000 coresight: etm3x: Convert raw base pointer to struct coresight access This is so that etm3x can use the new claim tag functions which take a csa pointer in a later commit. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-4-dfbd3822b2e5@linaro.org commit a244a18c15fef479bce3eee68ffcab4a393b7b51 Author: James Clark Date: Tue Mar 25 11:58:48 2025 +0000 coresight: Add claim tag warnings and debug messages Add a dev_dbg() message so that external debugger conflicts are more visible. There are multiple reasons for -EBUSY so a message for this particular one could be helpful. Add errors for and enumerate all the other cases that are impossible. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-3-dfbd3822b2e5@linaro.org commit a4e65842e1142aa18ef36113fbd81d614eaefe5a Author: James Clark Date: Tue Mar 25 11:58:47 2025 +0000 coresight: Only check bottom two claim bits The use of the whole register and == could break the claim mechanism if any of the other bits are used in the future. The referenced doc "PSCI - ARM DEN 0022D" also says to only read and clear the bottom two bits. Use FIELD_GET() to extract only the relevant part. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-2-dfbd3822b2e5@linaro.org commit fc7fed6f77f94f2fd9a7557020503e146eb0ce38 Author: James Clark Date: Tue Mar 25 11:58:46 2025 +0000 coresight: Convert tag clear function to take a struct csdev_access The self hosted claim tag will be reset on device probe in a later commit. We'll want to do this before coresight_register() is called so won't have a coresight_device and have to use csdev_access instead. Also make them public and create locked and unlocked versions for later use. These look functions look like they set the whole tags register as one value, but they only set and clear the self hosted bit using a SET/CLR bits mechanism so also rename the functions to reflect this better. Reviewed-by: Leo Yan Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-1-dfbd3822b2e5@linaro.org commit 8a39f1c870e9d6fbac5638f3a42a6a6363829c49 Author: Kees Cook Date: Mon Apr 21 16:15:19 2025 -0700 ovl: Check for NULL d_inode() in ovl_dentry_upper() In ovl_path_type() and ovl_is_metacopy_dentry() GCC notices that it is possible for OVL_E() to return NULL (which implies that d_inode(dentry) may be NULL). This would result in out of bounds reads via container_of(), seen with GCC 15's -Warray-bounds -fdiagnostics-details. For example: In file included from arch/x86/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:339, from include/linux/export.h:5, from include/linux/linkage.h:7, from include/linux/fs.h:5, from fs/overlayfs/util.c:7: In function 'ovl_upperdentry_dereference', inlined from 'ovl_dentry_upper' at ../fs/overlayfs/util.c:305:9, inlined from 'ovl_path_type' at ../fs/overlayfs/util.c:216:6: include/asm-generic/rwonce.h:44:26: error: array subscript 0 is outside array bounds of 'struct inode[7486503276667837]' [-Werror=array-bounds=] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ fs/overlayfs/ovl_entry.h:195:16: note: in expansion of macro 'READ_ONCE' 195 | return READ_ONCE(oi->__upperdentry); | ^~~~~~~~~ 'ovl_path_type': event 1 185 | return inode ? OVL_I(inode)->oe : NULL; 'ovl_path_type': event 2 Avoid this by allowing ovl_dentry_upper() to return NULL if d_inode() is NULL, as that means the problematic dereferencing can never be reached. Note that this fixes the over-eager compiler warning in an effort to being able to enable -Warray-bounds globally. There is no known behavioral bug here. Suggested-by: Amir Goldstein Signed-off-by: Kees Cook Signed-off-by: Miklos Szeredi commit f6028eeeb5e4cf86f93f805098c84974a79bba8a Author: Yabin Cui Date: Tue Apr 29 16:13:00 2025 -0700 coresight: core: Disable helpers for devices that fail to enable When enabling a SINK or LINK type coresight device fails, the associated helpers should be disabled. Fixes: 6148652807ba ("coresight: Enable and disable helper devices adjacent to the path") Signed-off-by: Yabin Cui Suggested-by: Suzuki K Poulose Reviewed-by: James Clark Reviewed-by: Mike Leach Reviewed-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250429231301.1952246-3-yabinc@google.com commit a03a0a08c6fe5e50c1b12ea41b9e228e7f649c22 Author: Yabin Cui Date: Tue Apr 29 16:12:59 2025 -0700 coresight: catu: Introduce refcount and spinlock for enabling/disabling When tracing ETM data on multiple CPUs concurrently via the perf interface, the CATU device is shared across different CPU paths. This can lead to race conditions when multiple CPUs attempt to enable or disable the CATU device simultaneously. To address these race conditions, this patch introduces the following changes: 1. The enable and disable operations for the CATU device are not reentrant. Therefore, a spinlock is added to ensure that only one CPU can enable or disable a given CATU device at any point in time. 2. A reference counter is used to manage the enable/disable state of the CATU device. The device is enabled when the first CPU requires it and is only disabled when the last CPU finishes using it. This ensures the device remains active as long as at least one CPU needs it. Fixes: fcacb5c154ba ("coresight: Introduce support for Coresight Address Translation Unit") Signed-off-by: Yabin Cui Reviewed-by: James Clark Reviewed-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250429231301.1952246-2-yabinc@google.com commit 39bb67edcc582b3b386a9ec983da67fa8a10ec03 Author: Jann Horn Date: Mon Apr 28 15:06:43 2025 +0200 tee: Prevent size calculation wraparound on 32-bit kernels The current code around TEE_IOCTL_PARAM_SIZE() is a bit wrong on 32-bit kernels: Multiplying a user-provided 32-bit value with the size of a structure can wrap around on such platforms. Fix it by using saturating arithmetic for the size calculation. This has no security consequences because, in all users of TEE_IOCTL_PARAM_SIZE(), the subsequent kcalloc() implicitly checks for wrapping. Signed-off-by: Jann Horn Signed-off-by: Jens Wiklander Tested-by: Rouven Czerwinski commit b389df0f6b5a2e0655e9f101af97d75e35fb874c Author: Dan Carpenter Date: Wed Apr 30 11:03:46 2025 +0300 drm/st7571-i2c: Fix IS_ERR() vs NULL checks in probe() The devm_kzalloc() function returns NULL on failure, not error pointers. Also printing an error message for kmalloc() failures is against kernel style so just return -ENOMEM without printing a message. (Kmalloc already prints a message). Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller") Signed-off-by: Dan Carpenter Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/aBHZYgPPPYY-J8Vd@stanley.mountain Signed-off-by: Javier Martinez Canillas commit b7ca5743a2604156d6083b88cefacef983f3a3a6 Author: John Stultz Date: Tue Apr 29 08:07:26 2025 -0700 sched/core: Tweak wait_task_inactive() to force dequeue sched_delayed tasks It was reported that in 6.12, smpboot_create_threads() was taking much longer then in 6.6. I narrowed down the call path to: smpboot_create_threads() -> kthread_create_on_cpu() -> kthread_bind() -> __kthread_bind_mask() ->wait_task_inactive() Where in wait_task_inactive() we were regularly hitting the queued case, which sets a 1 tick timeout, which when called multiple times in a row, accumulates quickly into a long delay. I noticed disabling the DELAY_DEQUEUE sched feature recovered the performance, and it seems the newly create tasks are usually sched_delayed and left on the runqueue. So in wait_task_inactive() when we see the task p->se.sched_delayed, manually dequeue the sched_delayed task with DEQUEUE_DELAYED, so we don't have to constantly wait a tick. Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue") Reported-by: peter-yc.chang@mediatek.com Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lkml.kernel.org/r/20250429150736.3778580-1-jstultz@google.com commit 2cb291596e2c1837238bc322ae3545dacb99d584 Author: Rong Xu Date: Fri Apr 25 13:05:41 2025 -0700 objtool: Fix up st_info in COMDAT group section When __elf_create_symbol creates a local symbol, it relocates the first global symbol upwards to make space. Subsequently, elf_update_symbol() is called to refresh the symbol table section. However, this isn't sufficient, as other sections might have the reference to the old symbol index, for instance, the sh_info field of an SHT_GROUP section. This patch updates the `sh_info` field when necessary. This field serves as the key for the COMDAT group. An incorrect key would prevent the linker's from deduplicating COMDAT symbols, leading to duplicate definitions in the final link. Signed-off-by: Rong Xu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250425200541.113015-1-xur@google.com commit deeed351e982ac4d521598375b34b071304533b0 Merge: 1f773970a72e48 6828208a45c183 Author: David S. Miller Date: Wed Apr 30 12:56:00 2025 +0100 Merge branch 'pds_core-cleanups' Shannon Nelson says: ==================== pds_core: small code updates These are a few little code touch ups for a kdoc complaint, quicker error detection, and a cleaner initialization. ==================== Signed-off-by: David S. Miller commit 6828208a45c1839e94a87500e0721618d03783e7 Author: Shannon Nelson Date: Fri Apr 25 13:46:18 2025 -0700 pds_core: init viftype default in declaration Initialize the .enabled field of the FWCTL viftype default in the declaration rather than as a bit of code as it is always to be enabled and needs no logic around it. Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 7c4f4c4fa9b6fbb7e483bebd02f7b9cbc20ca5cc Author: Shannon Nelson Date: Fri Apr 25 13:46:17 2025 -0700 pds_core: smaller adminq poll starting interval Shorten the adminq poll starting interval in order to notice any transaction errors more quickly. Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 144530c15ec7fa95b29812d86f4be527338ea204 Author: Shannon Nelson Date: Fri Apr 25 13:46:16 2025 -0700 pds_core: remove extra name description Fix the kernel-doc complaint include/linux/pds/pds_adminq.h:481: warning: Excess struct member 'name' description in 'pds_core_lif_getattr_comp' Reviewed-by: Simon Horman Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 3acb492a02a10a72b3410304efc9d8356f706e27 Author: Shravan Kumar Ramani Date: Wed Apr 23 04:31:03 2025 -0400 platform/mellanox: mlxbf-pmc: Support additional PMC blocks Add list of events and counters from the following blocks: APT (ARM Processor Tile), GGA (Global Generic Accelerator), MSN (Memory Stasher and Navigator), EMI (External Memory Interface) and PRNF (PCIe Request Node). If any of the fields populated from the ACPI table (like apt_num) cannot be read, assign the corresponding block count to be 0 instead of failing probe to maintain compatibility with older firmware. Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/20250423083103.5240-1-shravankr@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4b4da10b1f7eda3c698b924ce2051d3e56e652fe Author: Kurt Borja Date: Fri Apr 25 12:45:07 2025 -0300 platform/x86: alienware-wmi-wmax: Fix awcc_hwmon_fans_init() label logic To avoid passing an uninitialized `temp_id` to awcc_get_fan_label(), pass the `fan_temps` bitmap instead, to work only on set bits. Additionally, awcc_get_fan_label() leaves `dev` unused, so remove it from it's signature and it does not fail, so remove error handling. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202504250521.HEkFK1Jy-lkp@intel.com/ Fixes: d69990783495 ("platform/x86: alienware-wmi-wmax: Add HWMON support") Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250425-temp-id-fix-v1-2-372d71f732bf@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1fe9596a70d40b017f698db42621ec96da3a0cac Author: Kurt Borja Date: Fri Apr 25 12:45:06 2025 -0300 platform/x86: alienware-wmi-wmax: Fix uninitialized bitmap in awcc_hwmon_fans_init() Initialize fan_temps bitmap to zero before using it for the first time in each iteration. Fixes: d69990783495 ("platform/x86: alienware-wmi-wmax: Add HWMON support") Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250425-temp-id-fix-v1-1-372d71f732bf@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 317bbe169c468b5dbe3ddc27b0a02f8981ede5b4 Author: Vadim Pasternak Date: Mon Apr 21 12:20:49 2025 +0300 platform: mellanox: mlx-platform: Add support for new Nvidia system Add support for SN5640 and SN5610 Nvidia switches: - SN5610 is a 51.2Tbps switch based on Nvidia SPC-4 ASIC equipped with 64 OSFP ports supporting 2.5Gbps - 400Gbps speeds. - SN5640 is a 51.2Tbps switch based on Nvidia SPC-5 ASIC equipped with 64 OSFP ports supporting 10Gbps - 800Gbps speeds. Both equipped with: - Air-cooled with 4 + 1 redundant fan units. - 2 + 2 redundant 2000W PSUs. - System management board based on AMD CPU with secure-boot support. Reviewed-by: Oleksandr Shamray Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250421092051.7687-5-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f48cf5ee4fbcf9050b4d5c031af820170e740bf7 Author: Vadim Pasternak Date: Mon Apr 21 12:20:48 2025 +0300 platform: mellanox: Cosmetic changes to improve code style Replace in 'for' loop - /i >= 0 ; i--/i >= 0 ;i--/. Replace in 'while' loop - /(--i >= 0)/(--i)/. Signed-off-by: Vadim Pasternak Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250421092051.7687-4-vadimp@nvidia.com Signed-off-by: Ilpo Järvinen commit 783259e9b19dba7c369741d0b0d509aadf7b8edb Author: Vadim Pasternak Date: Mon Apr 21 12:20:47 2025 +0300 platform: mellanox: Introduce support of Nvidia smart switch Provide platform support for Nvidia Smart Switch SN4280. The Smart Switch equipped with: - Nvidia COME module based on AMD EPYC™ Embedded 3451 CPU. - Nvidia Spectrum-3 ASIC. - Four DPUs, each equipped with Nvidia BF3 ARM based processor and with Lattice LFD2NX-40 FPGA device. - 28xQSFP-DD external ports. - Two power supplies. - Four cooling drawers. Reviewed-by: Ciju Rajan K Signed-off-by: Vadim Pasternak Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250421092051.7687-3-vadimp@nvidia.com Signed-off-by: Ilpo Järvinen commit d00f779eb09a9bf7b3fe6733438744a3f8faad0a Author: Vadim Pasternak Date: Mon Apr 21 12:20:46 2025 +0300 platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU Provide platform support for Nvidia (DPU) Data Processor Unit for the Smart Switch SN4280. The Smart Switch equipped with: - Nvidia COME module based on AMD EPYC™ Embedded 3451 CPU. - Nvidia Spectrum-3 ASIC. - Four DPUs, each equipped with Nvidia BF3 ARM based processor and with Lattice LFD2NX-40 FPGA device. - 28xQSFP-DD external ports. - Two power supplies. - Four cooling drawers. Driver provides support for the platform management and monitoring of DPU components. It includes support for: health events, resets and boot progress indications logic, implemented by FPGA device. Reviewed-by: Ciju Rajan K Signed-off-by: Vadim Pasternak [ij: added depends on I2C] Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250421092051.7687-2-vadimp@nvidia.com Signed-off-by: Ilpo Järvinen commit 25b5095a4b891987f41dcfbc8bff8d3604bf8285 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:21 2025 +0200 platform/x86: oxpec: Convert defines to using tabs The defines used spaces previously. Convert all of them to use tabs. Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-17-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 97e3d8ac258588f49b595e2a37b980ed84e478f1 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:20 2025 +0200 platform/x86: oxpec: Rename rval to ret in tt_toggle Rename the variable `rval` to `ret` in the function for consistency. Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-16-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9230b3b81b12acb2c1f0bbedc669d4f0546b21c3 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:19 2025 +0200 platform/x86: oxpec: Add charge threshold and behaviour to OneXPlayer With the X1 (AMD), OneXPlayer added a charge limit and charge inhibit feature to their devices. Charge limit allows for choosing an arbitrary battery charge setpoint in percentages. Charge ihibit allows to instruct the device to stop charging either when it is awake or always. This feature was then extended for the F1Pro as well. OneXPlayer also released BIOS updates for the X1 Mini, X1 (Intel), and F1 devices that add support for this feature. Therefore, enable it for all F1 and X1 devices. Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-15-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 6c9ffa2ae48e8fd44ba5c6ffdc16e62a62bac38a Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:18 2025 +0200 power: supply: add inhibit-charge-awake to charge_behaviour OneXPlayer devices have a charge inhibit feature that allows the user to select between it being active always or only when the device is on. Therefore, add attribute inhibit-charge-awake to charge_behaviour to allow the user to select that charge should be paused only when the device is awake. Reviewed-by: Hans de Goede Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-14-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 38b30882c6215c061159fb0544644d39e9bd3d03 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:17 2025 +0200 platform/x86: oxpec: Follow reverse xmas convention for tt_toggle Since the rest of the driver follows this convention, apply it to the tt_toggle attribute as well. Suggested-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-13-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 36a65fa84ac30b8df25799dfcedda76dfd7d087b Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:16 2025 +0200 platform/x86: oxpec: Adhere to sysfs-class-hwmon and enable pwm on 2 Currently, the driver does not adhere to the sysfs-class-hwmon specification: 0 is used for auto fan control and 1 is used for manual control. However, it is expected that 0 sets the fan to full speed, 1 sets the fan to manual, and then 2 is used for automatic control. Therefore, change the sysfs API to reflect this and enable pwm on 2. As we are breaking the ABI for this driver, rename oxpec to oxp_ec, reflecting the naming convention used by other drivers, to allow for a smooth migration in current userspace programs. Closes: https://lore.kernel.org/linux-hwmon/20241027174836.8588-1-derekjohn.clark@gmail.com/ Reviewed-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-12-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 665fab3381220cf8925b9f7c4c8d6512e47efe99 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:15 2025 +0200 platform/x86: oxpec: Move fan speed read to separate function While not necessary for fixing the ABI hwmon issue, fan speed will be the only remaining value without a function. Therefore, finish the refactor by moving it to a separate function. Reviewed-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-11-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit b804a9b818905a6eb9783abc18483a2ca53ee281 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:14 2025 +0200 platform/x86: oxpec: Move pwm value read/write to separate functions Currently, this driver breaks hwmon ABI by using auto as 0 and manual as 1. However, for pwm_enable, 0 is full speed, 1 is manual, and 2 is auto. For the correction to be possible, this means that the pwm_enable endpoint will need access to both pwm enable and value (as for the 0th value, the fan needs to be set to full power). Therefore, move the pwm value read/write to separate functions. Reviewed-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-10-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 6b89cf6d3744d150ee2611c9bfda9e781819c8a1 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:13 2025 +0200 platform/x86: oxpec: Move pwm_enable read to its own function Currently, this driver breaks ABI by using auto as 0 and manual as 1. However, for pwm_enable, 0 is full speed, 1 is manual, and 2 is auto. For the correction to be possible, this means that the pwm_enable endpoint will need access to both pwm enable and value (as for the 0th value, the fan needs to be set to full power). Therefore, begin by moving the current pwm_enable read to its own function, oxp_pwm_enable. Reviewed-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-9-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 50623acafb6b1d7b66138dbed7aa0c0c170d9e4b Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:12 2025 +0200 platform/x86: oxpec: Add turbo led support to X1 devices The X1 and X1 mini lineups feature an LED nested within their turbo button. When turbo takeover is not enabled, the turbo button allows the device to switch from 18W to 25W TDP. When the device is in the 25W TDP mode, the LED is turned on. However, when we engage turbo takeover, the turbo led remains on its last state, which might be illuminated and cannot be currently controlled. Therefore, add the register that controls it under sysfs, to allow userspace to turn it off once engaging turbo takeover and then control it as they wish. 2024 OneXPlayer devices, other than the X1s, do not have a turbo LED. However, earlier models do, so this can be extended to them as well when the register for it is found. Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-8-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b72e0b671ddff48d2fb59e082a9e7f8ada6d7d69 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:11 2025 +0200 platform/x86: oxpec: Rename ec group to tt_toggle Currently, the EC group is used for the turbo button. However, the next patch in the series adds support for the LED button in X1 devices, which is only applicable for X1 devices. Therefore, rename it to prepare for adding the second group. And make it const while at it. Reviewed-by: Derek J. Clark Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-7-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 3abff549e0ec05649b7a97a141399123de4c104b Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:10 2025 +0200 ABI: testing: sysfs-class-oxp: add tt_led attribute documentation Adds documentation about the tt_led attribute of OneXPlayer devices to the sysfs-class-oxp ABI documentation. Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-6-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d9c4037fed897ddcb512fdf03bafed9451cb5006 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:09 2025 +0200 ABI: testing: sysfs-class-oxp: add missing documentation Add missing documentation about the tt_toggle attribute that was added in kernel 6.5. Fixes: be144ee491272 ("hwmon: (oxp-sensors) Add tt_toggle attribute on supported boards") Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-5-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 3012bb39001c4cab0b8587b0421ae64b8ca54655 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:08 2025 +0200 platform/x86: oxpec: Move hwmon/oxp-sensors to platform/x86 The EC of OneXPlayer devices used to only control the fan. This is no longer the case, with the EC of OneXPlayer gaining additional functionality (turbo button, turbo led, battery controls). As it will be beneficial from a complexity perspective to retain this driver as a single unit, move it out of hwmon, and into platform/x86. Also, remove the hwmon documentation to prepare moving it to Documentation/ABI/. While at it, add myself to the maintainer's file. Acked-by: Guenter Roeck Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-4-lkml@antheas.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit de6b4f99010ad22f0242f1fc0f75c0752a56e9bb Author: Heiko Carstens Date: Thu Apr 24 11:27:11 2025 +0200 s390/string: Remove strcpy() implementation Remove the optimized strcpy() library implementation. This doesn't make any difference since gcc recognizes all strcpy() usages anyway and uses the builtin variant. There is not a single branch to strcpy() within the generated kernel image, which also seems to be the reason why most other architectures don't have a strcpy() implementation anymore. Reviewed-by: Mikhail Zaslonko Signed-off-by: Heiko Carstens commit ed5eef1141a35551a56c9cc0c475f0e0b6291e77 Author: Heiko Carstens Date: Thu Apr 24 11:27:10 2025 +0200 s390/con3270: Use strscpy() instead of strcpy() Use strscpy() instead of strcpy() so that bounds checking is performed on the destination buffer. This requires to keep track of the size of the dynamically allocated prompt memory area, which is done with a new prompt_sz within struct tty3270. Reviewed-by: Mikhail Zaslonko Signed-off-by: Heiko Carstens commit 7e7f94d1069ca914f91483fb03880b5eb5736235 Author: Heiko Carstens Date: Thu Apr 24 11:27:09 2025 +0200 s390/boot: Use strspcy() instead of strcpy() Convert all strcpy() usages to strscpy(). strcpy() is deprecated since it performs no bounds checking on the destination buffer. Reviewed-by: Mikhail Zaslonko Signed-off-by: Heiko Carstens commit e76b8c1d7af45931746c8f9e795164e8ef759258 Author: Heiko Carstens Date: Thu Apr 24 11:27:08 2025 +0200 s390: Simple strcpy() to strscpy() conversions Convert all strcpy() usages to strscpy() where the conversion means just replacing strcpy() with strscpy(). strcpy() is deprecated since it performs no bounds checking on the destination buffer. Reviewed-by: Mikhail Zaslonko Signed-off-by: Heiko Carstens commit e75003a77f45b0b32643669126e76a48278e425c Merge: 7cf58880ea95a7 f6884295491c80 Author: Heiko Carstens Date: Wed Apr 30 11:34:46 2025 +0200 Merge branch 'zcrypt-no-alloc' Harald Freudenberger says: ==================== This series of patches has the goal to open up a do-not-allocate memory path from the callers of the pkey in-kernel api down to the crypto cards and back. The asynch in-kernel cipher implementations (and the s390 PAES cipher implementations are one of them) may be called in a context where memory allocations which trigger IO is not acceptable. So this patch series reworks the AP bus code, the zcrypt layer, the pkey layer and the pkey handlers to respect this situation by processing a new parameter xflags (execution hints flags). There is a flag PKEY_XFLAG_NOMEMALLOC which tells the code to not allocate memory which may lead to IO operations. To reach this goal, the actual code changes have been differed. The zcrypt misc functions which need memory for cprb build use a pre allocated memory pool for this purpose. The findcard() functions have one temp memory area preallocated and protected with a mutex. Some smaller data is not allocated any more but went to the stack instead. The AP bus also uses a pre-allocated memory pool for building AP message requests. Note that the PAES implementation still needs to get reworked to run the protected key derivation in a real asynchronous way. However, this rework of AP bus, zcrypt and pkey is the base work required before reconsidering the PAES implementation. The patch series starts bottom (AP bus) and goes up the call chain (PKEY). At any time in the patch stack it should compile. For easier review I tried to have one logic code change by each patch and thus keep the patches "small". ==================== Link: https://lore.kernel.org/r/20250424133619.16495-1-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit f6884295491c805b1af5df689b0bc30505d1d5ba Author: Harald Freudenberger Date: Thu Apr 24 15:36:19 2025 +0200 s390/pkey/crypto: Introduce xflags param for pkey in-kernel API Add a new parameter xflags to the in-kernel API function pkey_key2protkey(). Currently there is only one flag supported: * PKEY_XFLAG_NOMEMALLOC: If this flag is given in the xflags parameter, the pkey implementation is not allowed to allocate memory but instead should fall back to use preallocated memory or simple fail with -ENOMEM. This flag is for protected key derive within a cipher or similar which must not allocate memory which would cause io operations - see also the CRYPTO_ALG_ALLOCATES_MEMORY flag in crypto.h. The one and only user of this in-kernel API - the skcipher implementations PAES in paes_s390.c set this flag upon request to derive a protected key from the given raw key material. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-26-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit e5a7f7e0c61cc061f63e5659a0527fd48b216c77 Author: Harald Freudenberger Date: Thu Apr 24 15:36:18 2025 +0200 s390/pkey: Provide and pass xflags within pkey and zcrypt layers Provide and pass the xflag parameter from pkey ioctls through the pkey handler and further down to the implementations (CCA, EP11, PCKMO and UV). So all the code is now prepared and ready to support xflags ("execution flag"). The pkey layer supports the xflag PKEY_XFLAG_NOMEMALLOC: If this flag is given in the xflags parameter, the pkey implementation is not allowed to allocate memory but instead should fall back to use preallocated memory or simple fail with -ENOMEM. This flag is for protected key derive within a cipher or similar which must not allocate memory which would cause io operations - see also the CRYPTO_ALG_ALLOCATES_MEMORY flag in crypto.h. Within the pkey handlers this flag is then to be translated to appropriate zcrypt xflags before any zcrypt related functions are called. So the PKEY_XFLAG_NOMEMALLOC translates to ZCRYPT_XFLAG_NOMEMALLOC - If this flag is set, no memory allocations which may trigger any IO operations are done. The pkey in-kernel pkey API still does not provide this xflag param. That's intended to come with a separate patch which enables this functionality. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-25-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit a42831f0b74dccaaeedc7f420a43b93b952fdf0c Author: Harald Freudenberger Date: Thu Apr 24 15:36:17 2025 +0200 s390/uv: Remove uv_get_secret_metadata function The uv_get_secret_metadata() in-kernel function was only offered and used by the pkey uv handler. Remove it as there is no customer any more. Suggested-by: Steffen Eiden Signed-off-by: Harald Freudenberger Reviewed-by: Steffen Eiden Acked-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-24-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 1bd4793728c3d83452daf5ae2a6d22a9711070c3 Author: Harald Freudenberger Date: Thu Apr 24 15:36:16 2025 +0200 s390/pkey: Use preallocated memory for retrieve of UV secret metadata The pkey uv functions may be called in a situation where memory allocations which trigger IO operations are not allowed. An example: decryption of the swap partition with protected key (PAES). The pkey uv code takes care of this by holding one preallocated struct uv_secret_list to be used with the new UV function uv_find_secret(). The older function uv_get_secret_metadata() used before always allocates/frees an ephemeral memory buffer. The preallocated struct is concurrency protected by a mutex. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20250424133619.16495-23-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 933dd21d920c26689f754fe80458d788438b1649 Author: Harald Freudenberger Date: Thu Apr 24 15:36:15 2025 +0200 s390/uv: Rename find_secret() to uv_find_secret() and publish Rename the internal UV function find_secret() to uv_find_secret() and publish it as new UV API in-kernel function. The pkey uv handler may be called in a do-not-allocate memory situation where sleeping is allowed but allocating memory which may cause IO operations is not. For example when an encrypted swap file is used and the encryption is done via UV retrievable secrets with protected keys. The UV API function uv_get_secret_metadata() allocates memory and then calls the find_secret() function. By exposing the find_secret() function as a new UV API function uv_find_secret() it is possible to retrieve UV secret meta data without any memory allocations from the UV when the caller offers space for one struct uv_secret_list. Signed-off-by: Harald Freudenberger Reviewed-by: Steffen Eiden Acked-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-22-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 15cdc6f4a12c8410bd05a0bb9b8afe6b91ae21ff Author: Harald Freudenberger Date: Thu Apr 24 15:36:14 2025 +0200 s390/pkey: Rework EP11 pkey handler to use stack for small memory allocs There have been some places in the EP11 handler code where relatively small amounts of memory have been allocated an freed at the end of the function. This code has been reworked to use the stack instead. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-21-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit c45dabf47e76cc60721301c4ee03926c52be49ca Author: Harald Freudenberger Date: Thu Apr 24 15:36:13 2025 +0200 s390/pkey: Rework CCA pkey handler to use stack for small memory allocs There have been some places in the CCA handler code where relatively small amounts of memory have been allocated an freed at the end of the function. This code has been reworked to use the stack instead. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-20-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 6fecab9b922aeb8fc5ebaf5aeecf8f7a1c2eb58b Author: Harald Freudenberger Date: Thu Apr 24 15:36:12 2025 +0200 s390/zcrypt: Rework ep11 misc functions to use cprb mempool There are two places in the ep11 misc code where a short term memory buffer is needed. Rework this code to use the cprb mempool to satisfy this ephemeral memory requirements. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-19-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit e9f45ef6757e7183fa7b62ee1c7aa23f1515c560 Author: Harald Freudenberger Date: Thu Apr 24 15:36:11 2025 +0200 s390/zcrypt: Locate ep11_domain_query_info onto the stack instead of kmalloc Locate the relative small struct ep11_domain_query_info variable onto the stack instead of kmalloc()/kfree(). Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-18-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 9eb61e71d7a1241325ef4291147453fd815519ab Author: Harald Freudenberger Date: Thu Apr 24 15:36:10 2025 +0200 s390/zcrypt: Propagate xflags argument with cca_get_info() Propagate the xflags argument from the cca_get_info() caller down to the lower level functions for proper memory allocation hints. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-17-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 989ed61ea8eafd8a939282eeb502dc9fc6e3e6c8 Author: Harald Freudenberger Date: Thu Apr 24 15:36:09 2025 +0200 s390/zcrypt: Rework cca misc functions kmallocs to use the cprb mempool Rework two places in the zcrypt cca misc code using kmalloc() for ephemeral memory allocation. As there is anyway now a cprb mempool let's use this pool instead to satisfy these short term memory allocations. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-16-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 8a8832254100e24fd6ba99ce92a62a4964566a29 Author: Harald Freudenberger Date: Thu Apr 24 15:36:08 2025 +0200 s390/zcrypt: Rework ep11 findcard() implementation and callers Rework the memory usage of the ep11 findcard() implementation: - findcard does not allocate memory for the list of apqns any more. - the callers are now responsible to provide an array of apqns to store the matching apqns into. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-15-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 95de56ae0db0fb039f3ae3ddfa1a281508fcef4f Author: Harald Freudenberger Date: Thu Apr 24 15:36:07 2025 +0200 s390/zcrypt: Rework cca findcard() implementation and callers Rework the memory usage of the cca findcard() implementation: - findcard does not allocate memory for the list of apqns any more. - the callers are now responsible to provide an array of apqns to store the matching apqns into. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-14-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 2845ad7466af7d2ee218ddbe2896c7c5532b9f73 Author: Harald Freudenberger Date: Thu Apr 24 15:36:06 2025 +0200 s390/zcrypt: Remove CCA and EP11 card and domain info caches Remove the caching of the CCA and EP11 card and domain info. In nearly all places where the card or domain info is fetched the verify param was enabled and thus the cache was bypassed. The only real place where info from the cache was used was in the sysfs pseudo files in cases where the card/queue was switched to "offline". All other callers insisted on getting fresh info and thus a communication to the card was enforced. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-13-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 02383ef93e09734f002c788dcf54e0874ccb305c Author: Harald Freudenberger Date: Thu Apr 24 15:36:05 2025 +0200 s390/zcrypt: Remove unused functions from cca misc The static function findcard() and the zcrypt cca_findcard() function are both not used any more. Remove this outdated code and an internal function only called by these. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-12-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit d2fd25b390fd5a75cd69de1a87dc129a26509baa Author: Harald Freudenberger Date: Thu Apr 24 15:36:04 2025 +0200 s390/zcrypt: Introduce pre-allocated device status array for ep11 misc Introduce a pre-allocated device status array memory together with a mutex controlling the occupation to be used by the findcard() function. Limit the device status array to max 128 cards and max 128 domains to reduce the size of this pre-allocated memory to 64 KB. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-11-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit ef800db6152e2879af1ae40b3a0974771752ad34 Author: Harald Freudenberger Date: Thu Apr 24 15:36:03 2025 +0200 s390/zcrypt: Introduce pre-allocated device status array for cca misc Introduce a pre-allocated device status array memory together with a mutex controlling the occupation to be used by the findcard2() function. Limit the device status array to max 128 cards and max 128 domains to reduce the size of this pre-allocated memory to 64 KB. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-10-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit a01e748101d36633f76cde5310b7fff3cfd1920d Author: Harald Freudenberger Date: Thu Apr 24 15:36:02 2025 +0200 s390/zcrypt: Rework zcrypt function zcrypt_device_status_mask_ext Rework the existing function zcrypt_device_status_mask_ext(): Add two new parameters to provide upper limits for cards and queues. The existing implementation needed an array of 256 * 256 * 4 = 256 KB which is really huge. The reworked function is more flexible in the sense that the caller can decide the upper limit for cards and domains to be stored into the status array. So for example a caller may decide to only query for cards 0...127 and queues 0...127 and thus only an array of size 128 * 128 * 4 = 64 KB is needed. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-9-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 366367a7253a2124ed14d9d667c46305a5c3dbbb Author: Harald Freudenberger Date: Thu Apr 24 15:36:01 2025 +0200 s390/zcrypt: Introduce cprb mempool for ep11 misc functions Introduce a cprb mempool for the zcrypt ep11 misc functions (zcrypt_ep11misc.*) do some preparation rework to support a do-not-allocate path through some zcrypt ep11 misc functions. The mempool is controlled by the zcrypt module parameter "mempool_threshold" which shall control the minimal amount of memory items for CCA and EP11. The mempool shall support "mempool_threshold" requests/replies in parallel which means for EP11 to hold a send and receive buffer memory per request. Each of this cprb space items is limited to 8 KB. So by default the mempool consumes 5 * 2 * 8KB = 80KB If the mempool is depleted upon one ep11 misc functions is called with the ZCRYPT_XFLAG_NOMEMALLOC xflag set, the function will fail with -ENOMEM and the caller is responsible for taking further actions. This is only part of an rework to support a new xflag ZCRYPT_XFLAG_NOMEMALLOC but not yet complete. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-8-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 9bdb5f7e8369b1456c60c998b524062d1f412d06 Author: Harald Freudenberger Date: Thu Apr 24 15:36:00 2025 +0200 s390/zcrypt: Introduce cprb mempool for cca misc functions Introduce a new module parameter "zcrypt_mempool_threshold" for the zcrypt module. This parameter controls the minimal amount of mempool items which are pre-allocated for urgent requests/replies and will be used with the support for the new xflag ZCRYPT_XFLAG_NOMEMALLOC. The default value of 5 shall provide enough memory items to support up to 5 requests (and their associated reply) in parallel. The minimum value is 1 and is checked in zcrypt module init(). If the mempool is depleted upon one cca misc functions is called with the named xflag set, the function will fail with -ENOMEM and the caller is responsible for taking further actions. For CCA each mempool item is 16KB, as a CCA CPRB needs to hold the request and the reply. The pool items only support requests/replies with a limit of about 8KB. So by default the CCA mempool consumes 5 * 16KB = 80KB This is only part of an rework to support a new xflag ZCRYPT_XFLAG_NOMEMALLOC but not yet complete. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-7-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 80c20b2c6dc09296f2cfb438a7b919a55f31237e Author: Harald Freudenberger Date: Thu Apr 24 15:35:59 2025 +0200 s390/ap/zcrypt: New xflag parameter Introduce a new flag parameter for the both cprb send functions zcrypt_send_cprb() and zcrypt_send_ep11_cprb(). This new xflags parameter ("execution flags") shall be used to provide execution hints and flags for this crypto request. There are two flags implemented to be used with these functions: * ZCRYPT_XFLAG_USERSPACE - indicates to the lower layers that all the ptrs address userspace. So when construction the ap msg copy_from_user() is to be used. If this flag is NOT set, the ptrs address kernel memory and thus memcpy() is to be used. * ZCRYPT_XFLAG_NOMEMALLOC - indicates that this task must not allocate memory which may be allocated with io operations. For the AP bus and zcrypt message layer this means: * The ZCRYPT_XFLAG_USERSPACE is mapped to the already existing bool variable "userspace" which is propagated to the zcrypt proto implementations. * The ZCRYPT_XFLAG_NOMEMALLOC results in setting the AP flag AP_MSG_FLAG_MEMPOOL when the AP msg buffer is initialized. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-6-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit f91bb85d399ecfa69ec08ebf58ee49d17bb748e2 Author: Harald Freudenberger Date: Thu Apr 24 15:35:58 2025 +0200 s390/zcrypt: Avoid alloc and copy of ep11 targets if kernelspace cprb If there is a target list of APQNs given when an CPRB is to be send via zcrypt_send_ep11_cprb() there is always a kmalloc() done and the targets are copied via z_copy_from_user. As there are callers from kernel space (zcrypt_ep11misc.c) which signal this via the userspace parameter improve this code to directly use the given target list in case of kernelspace thus removing the unnecessary memory alloc and mem copy. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-5-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit dcc160b3a090b1ffa0710ed72ae325be37298c0e Author: Harald Freudenberger Date: Thu Apr 24 15:35:57 2025 +0200 s390/ap: Introduce ap message buffer pool There is a need for a do-not-allocate-memory path through the AP bus layer. The pkey layer may be triggered via the in-kernel interface from a protected key crypto algorithm (namely PAES) to convert a secure key into a protected key. This happens in a workqueue context, so sleeping is allowed but memory allocations causing IO operations are not permitted. To accomplish this, an AP message memory pool with pre-allocated space is established. When ap_init_apmsg() with use_mempool set to true is called, instead of kmalloc() the ap message buffer is allocated from the ap_msg_pool. This pool only holds a limited amount of buffers: ap_msg_pool_min_items with the item size AP_DEFAULT_MAX_MSG_SIZE and exactly one of these items (if available) is returned if ap_init_apmsg() with the use_mempool arg set to true is called. When this pool is exhausted and use_mempool is set true, ap_init_apmsg() returns -ENOMEM without any attempt to allocate memory and the caller has to deal with that. Default values for this mempool of ap messages is: * Each buffer is 12KB (that is the default AP bus size and all the urgent messages should fit into this space). * Minimum items held in the pool is 8. This value is adjustable via module parameter ap.msgpool_min_items. The zcrypt layer may use this flag to indicate to the ap bus that the processing path for this message should not allocate memory but should use pre-allocated memory buffer instead. This is to prevent deadlocks with crypto and io for example with encrypted swap volumes. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-4-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 57db62a130ce69e6f3a870cf1119d8f860391f97 Author: Harald Freudenberger Date: Thu Apr 24 15:35:56 2025 +0200 s390/ap/zcrypt: Rework AP message buffer allocation Slight rework on the way how AP message buffers are allocated. Instead of having multiple places with kmalloc() calls all the AP message buffers are now allocated and freed on exactly one place: ap_init_apmsg() allocates the current AP bus max limit of ap_max_msg_size (defaults to 12KB). The AP message buffer is then freed in ap_release_apmsg(). Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-3-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 43435495a0f4e3a08792835285901b01e6d5b6da Author: Harald Freudenberger Date: Thu Apr 24 15:35:55 2025 +0200 s390/ap: Move response_type struct into ap_msg struct Move the very small response_type struct into struct ap_msg. So there is no need to kmalloc this tiny struct with each ap message preparation. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Link: https://lore.kernel.org/r/20250424133619.16495-2-freude@linux.ibm.com Signed-off-by: Heiko Carstens commit 7cf58880ea95a7db41e96c6e457c3f7c0773c646 Author: Thomas Richter Date: Tue Apr 22 12:52:49 2025 +0200 s390/cpumf: Adjust number of leading zeroes for z15 attributes In CPUMF attribute definitions for z15 all CPUMF attributes have configuration values of the form 0x0[0-9a-f]{3} . However 2 defines do not match this scheme, they have two leading zeroes instead of one. Adjust this. No functional change. Signed-off-by: Thomas Richter Signed-off-by: Heiko Carstens commit 50e638beb67e020a9124d77bd8a88bde3cd380e3 Author: Thorsten Blum Date: Mon Apr 14 22:54:08 2025 +0200 ovl: Use str_on_off() helper in ovl_show_options() Remove hard-coded strings by using the str_on_off() helper function. Acked-by: Amir Goldstein Signed-off-by: Thorsten Blum Signed-off-by: Miklos Szeredi commit b71db54ef3b86c94eb87f68a6d4d3d866e704a4a Author: Miklos Szeredi Date: Mon Feb 10 20:14:37 2025 +0100 ovl: don't require "metacopy=on" for "verity" This allows the "verity" mount option to be used with "userxattr" data-only layer(s). Also it allows dropping the "metacopy=on" option when the "datadir+" option is to be used. This cleanly separates the two features that have been lumped together under "metacopy=on": - data-redirect: data access is redirected to the data-only layer - meta-copy: copy up metadata only if possible Previous patches made sure that with "userxattr" metacopy only works in the lower -> data scenario. In this scenario the lower (metadata) layer must be secured against tampering, in which case the verity checksums contained in this layer can ensure integrity of data even in the case of an untrusted data layer. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 5ef7bcdeecc982ae17d13b682a85123c7d74b200 Author: Miklos Szeredi Date: Fri Feb 7 17:12:06 2025 +0100 ovl: relax redirect/metacopy requirements for lower -> data redirect Allow the special case of a redirect from a lower layer to a data layer without having to turn on metacopy. This makes the feature work with userxattr, which in turn allows data layers to be usable in user namespaces. Minimize the risk by only enabling redirect from a single lower layer to a data layer iff a data layer is specified. The only way to access a data layer is to enable this, so there's really no reason not to enable this. This can be used safely if the lower layer is read-only and the user.overlay.redirect xattr cannot be modified. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit a6fcfe9bb26df18ba7b5c4d064edd13c80ea2466 Author: Miklos Szeredi Date: Fri Feb 7 16:39:55 2025 +0100 ovl: make redirect/metacopy rejection consistent When overlayfs finds a file with metacopy and/or redirect attributes and the metacopy and/or redirect features are not enabled, then it refuses to act on those attributes while also issuing a warning. There was an inconsistency in not checking metacopy found from the index. And also only warning on an upper metacopy if it found the next file on the lower layer, while always warning for metacopy found on a lower layer. Fix these inconsistencies and make the logic more straightforward, paving the way for following patches to change when data redirects are allowed. Signed-off-by: Miklos Szeredi commit 924577e4f6ca473de1528953a0e13505fae61d7b Author: André Almeida Date: Tue Apr 29 15:38:50 2025 -0300 ovl: Fix nested backing file paths When the lowerdir of an overlayfs is a merged directory of another overlayfs, ovl_open_realfile() will fail to open the real file and point to a lower dentry copy, without the proper parent path. After this, d_path() will then display the path incorrectly as if the file is placed in the root directory. This bug can be triggered with the following setup: mkdir -p ovl-A/lower ovl-A/upper ovl-A/merge ovl-A/work mkdir -p ovl-B/upper ovl-B/merge ovl-B/work cp /bin/cat ovl-A/lower/ mount -t overlay overlay -o \ lowerdir=ovl-A/lower,upperdir=ovl-A/upper,workdir=ovl-A/work \ ovl-A/merge mount -t overlay overlay -o \ lowerdir=ovl-A/merge,upperdir=ovl-B/upper,workdir=ovl-B/work \ ovl-B/merge ovl-A/merge/cat /proc/self/maps | grep --color cat ovl-B/merge/cat /proc/self/maps | grep --color cat The first cat will correctly show `/ovl-A/merge/cat`, while the second one shows just `/cat`. To fix that, uses file_user_path() inside of backing_file_open() to get the correct file path for the dentry. Co-developed-by: John Schoenick Signed-off-by: John Schoenick Signed-off-by: André Almeida Fixes: def3ae83da02 ("fs: store real path instead of fake path in backing file f_path") Cc: # v6.7 Signed-off-by: Miklos Szeredi commit 127da457c4e01bd6e4b8a126aaf1be1a6c03fc0b Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:14 2025 +0200 gpio: lp3943: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-12-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 7d34d9fbab771779a2b365934fdafff32bddd029 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:13 2025 +0200 gpio: loongson: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-11-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 145c4d7052fd15d20e5165305b3296a026a40747 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:12 2025 +0200 gpio: loongson-64bit: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-10-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit ba2ce44332142a86bb0e9246d40b97d6cc191c5d Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:11 2025 +0200 gpio: logicvc: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-9-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 722332f58aa82b92c857b053426dd46e09988e38 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:10 2025 +0200 gpio: ljca: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Sakari Ailus Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-8-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 0c5fa4ee5a2256cd2d37bd0d0dda5d4fbbb30281 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:09 2025 +0200 gpio: kempld: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-7-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 3444049044ce24c2a2bc98c6e30d189451147b63 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:08 2025 +0200 gpio: janz-ttl: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-6-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit ef877a159072ca31ed183b086c41fb9951521886 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:07 2025 +0200 gpio: it87: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-5-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 40150dda92cd8718a367a32ac345dce05f788a16 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:06 2025 +0200 gpio: imx-scu: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-4-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 68ef71400d0e7a9049c36cd0954ecc67521b0bc8 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:05 2025 +0200 gpio: imx-scu: destroy the mutex in detach path Use devm_mutex_init() in order to clean up after the mutex debug data in detach and error path. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-3-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit dd6d13abb4c363f49ddca2697a781945cf80ad89 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:04 2025 +0200 gpio: imx-scu: use lock guards Simplify the code by using lock guards from cleanup.h with the driver's mutex. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-2-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 57bbc60be45b750073acc7d94aaccc4e652319a1 Author: Bartosz Golaszewski Date: Wed Apr 23 09:15:03 2025 +0200 gpio: imx-scu: don't check the GPIO range Core GPIO code already does this for drivers, no need to duplicate the check. Reviewed-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-1-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski commit 1f4bb068b498a544ae913764a797449463ef620c Author: David Kaplan Date: Fri Apr 18 11:17:21 2025 -0500 x86/bugs: Restructure SRSO mitigation Restructure SRSO to use select/update/apply functions to create consistent vulnerability handling. Like with retbleed, the command line options directly select mitigations which can later be modified. While at it, remove a comment which doesn't apply anymore due to the changed mitigation detection flow. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-17-david.kaplan@amd.com commit 543f81b86cf4046c7454a05c741c491a4fac44dd Author: Petja Patjas Date: Thu Mar 27 20:56:04 2025 +0200 media: rc: add keymap for Hauppauge Credit Card RC Add keymap for the black Hauppauge Credit Card Remote Control. Signed-off-by: Petja Patjas Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f00aef8e2ee0b642abdb91682bec5af38532faf7 Author: Shin Son Date: Mon Apr 28 20:35:16 2025 +0900 clk: samsung: exynosautov920: Fix incorrect CLKS_NR_CPUCL0 definition The CLKS_NR_CPUCL0 macro was incorrectly defined based on a wrong clock ID. It mistakenly referenced CLK_DOUT_CLUSTER0_PERIPHCLK, which corresponds to a cluster peripheral clock, not the last clock ID for CPUCL0 as intended. This patch corrects the definition to use CLK_DOUT_CPUCL0_NOCP + 1, properly matching the last clock ID for CPUCL0 as intended. This error was due to confusion with the hardware diagram, and this patch ensures that the number of clocks for CPUCL0 is correctly defined. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250428113517.426987-4-shin.son@samsung.com Fixes: 59636ec89c2c ("clk: samsung: exynosautov920: add cpucl0 clock support") Signed-off-by: Krzysztof Kozlowski commit 84d36f26d0314a089405af3df9e213dcfb8ecbc0 Author: Shin Son Date: Mon Apr 28 20:35:15 2025 +0900 clk: samsung: exynosautov920: add cpucl1/2 clock support Register compatible and cmu_info data to support clock CPUCL1/2 (CPU Cluster 1 and CPU Cluster 2), these provide clock for CPUCL1/2_SWTICH/CLUSTER. These clocks are required early during boot for the CPUs, so they are declared using CLK_OF_DECLARE instead of being registered through a platform driver. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250428113517.426987-3-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit 22493f2231693be08b9c98bf465de4ca9dccb5af Merge: 59636ec89c2caf 3c50137aa4c80c Author: Krzysztof Kozlowski Date: Wed Apr 30 09:25:13 2025 +0200 Merge branch 'for-v6.16/dt-bindings-clk-samsung' into next/clk commit aa833db4b82205275f4a4c08554b3dde99dae0c7 Author: Shin Son Date: Mon Apr 28 20:35:17 2025 +0900 arm64: dts: exynosautov920: add cpucl1/2 clock DT nodes Add cmu_cpucl1/2(CPU Cluster 1 and CPU Cluster 2) clocks for switch, cluster domains respectively. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250428113517.426987-5-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit 3c50137aa4c80c532cfcd7444a36b21710189ebf Author: Shin Son Date: Mon Apr 28 20:35:14 2025 +0900 dt-bindings: clock: exynosautov920: add cpucl1/2 clock definitions Add cpucl1 and cpucl2 clock definitions. CPUCL1/2 refer to CPU Cluster 1 and CPU Cluster 2, which provide clock support for the CPUs on Exynosauto V920 SoC. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250428113517.426987-2-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit 2117c1d503b4e0fd0c6776ae9fe4df2260643eae Author: Su Hui Date: Wed Apr 30 11:27:34 2025 +0800 alarmtimer: Switch spin_{lock,unlock}_irqsave() to guards Using guard/scoped_guard() to simplify code. Using guard() to remove 'goto unlock' label is neater especially. [ tglx: Brought back the scoped_guard()'s which were dropped in v2 and simplified alarmtimer_rtc_add_device() ] Signed-off-by: Su Hui Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://lore.kernel.org/all/20250430032734.2079290-4-suhui@nfschina.com commit d8ca84d48a2a2d4f6780980743c34b70c49f5844 Author: Su Hui Date: Wed Apr 30 11:27:33 2025 +0800 alarmtimer: Remove dead return value in clock2alarm() 'clockid' can only be ALARM_REALTIME and ALARM_BOOTTIME. It's impossible to return -1 and callers never check the return value. Only alarm_clock_get_timespec(), alarm_clock_get_ktime(), alarm_timer_create() and alarm_timer_nsleep() call clock2alarm(). These callers use clockid_to_kclock() to get 'struct k_clock', which ensures that clock2alarm() never returns -1. Remove the impossible -1 return value, and add a warning to notify about any future misuse of this function. Signed-off-by: Su Hui Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250430032734.2079290-3-suhui@nfschina.com commit 007c07168ac0c64387be500f6604b09ace3f3bdc Author: Su Hui Date: Wed Apr 30 11:27:32 2025 +0800 time/jiffies: Change register_refined_jiffies() to void __init register_refined_jiffies() is only used in setup code and always returns 0. Mark it as __init to save some bytes and change it to void. Signed-off-by: Su Hui Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250430032734.2079290-2-suhui@nfschina.com commit e373991eb9ff0a9617634017c7f19fd36ec4f208 Author: Uwe Kleine-König Date: Wed Apr 23 11:57:15 2025 +0200 pwm: rzg2l-gpt: Accept requests for too high period length The period setting is shared for each pair of PWM channels. So if the twin channel is in use, the period must not be changed. According to the usual practise to pick the next smaller possible period, accept a request for a period that is bigger than the unchangable value. Signed-off-by: Uwe Kleine-König Tested-by: Biju Das Link: https://lore.kernel.org/r/20250423095715.2952692-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit d12ddda5239826ca6978eaadea1b9280762c830a Author: Hans Verkuil Date: Thu Apr 10 12:00:49 2025 +0200 media: uapi: cec-funcs.h: use CEC_LOG_ADDR_BROADCAST The cec-funcs.h header sets the destination to 0xf for those messages that can only be broadcast. Instead of writing: msg->msg[0] |= 0xf; /* broadcast */ just write: msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; which is more descriptive and allows us to drop the comment. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6829c5b5d26b1be31880d74ec24cb32d2d75f1ae Author: Hans Verkuil Date: Tue Apr 1 11:54:17 2025 +0200 media: tc358743: ignore video while HPD is low If the HPD is low (happens if there is no EDID or the EDID is being updated), then return -ENOLINK in tc358743_get_detected_timings() instead of detecting video. This avoids userspace thinking that it can start streaming when the HPD is low. Signed-off-by: Hans Verkuil Tested-by: Maxime Ripard Link: https://lore.kernel.org/linux-media/20240628-stoic-bettong-of-fortitude-e25611@houat/ Signed-off-by: Mauro Carvalho Chehab commit 80a9da00b999561882d8ec3bda0a131476628a9a Author: Hans Verkuil Date: Tue Mar 4 12:08:14 2025 +0100 media: platform: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 84d4e40b257fde40eafa16727534c5d22f50193d Author: Hans Verkuil Date: Tue Mar 4 12:08:13 2025 +0100 media: pci: zoran: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ddbb23e9eab2964e708a53e8fb433c6e1af3424d Author: Hans Verkuil Date: Tue Mar 4 12:08:12 2025 +0100 media: i2c: imx283: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ddd91a1ec3655775665ed748a8c89f4e8a28a4c1 Author: Hans Verkuil Date: Tue Mar 4 12:08:11 2025 +0100 media: vivid: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1bbab01cc6dec2096d6438463620e6f1b51e8b6 Author: Hans Verkuil Date: Tue Mar 4 12:08:10 2025 +0100 media: usb: em28xx: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 992f05c53567e6c20416adf63f6b74678f4763fa Author: Hans Verkuil Date: Tue Mar 4 12:08:09 2025 +0100 media: staging: atomisp/starfive: use (t,l)/wxh format for rectangle Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6e40cc9b4b462bf13ca69621f417a8658b8e1783 Author: Hans Verkuil Date: Tue Jan 28 16:08:18 2025 +0100 media: omap3isp: drop wait_prepare/finish callbacks Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Set the queue lock to &video->queue_lock, which makes it possible to drop the wait_prepare/finish callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Note that the lock field of struct video_device is never set in this driver, so the core v4l2_ioctl.c function v4l2_ioctl_get_lock() will never take a lock. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9fa6a693ad8dc0cd34833632883767083b8fc1f5 Author: Shenghao Ding Date: Tue Apr 29 19:10:54 2025 +0800 ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB Most codes in tas2781_spi_fwlib.c are same as tas2781-fmwlib.c, mainly for firmware parsing, only differece is the register reading, bit update and book switching in i2c and spi. The main purpose of this patch is for code cleaup and arrange the shared part for i2c and spi. Signed-off-by: Shenghao Ding Acked-by: Mark Brown Link: https://patch.msgid.link/20250429111055.567-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit 849c83fe49912f7b2c9ee2fe64dc06e0fb81d91d Author: Richard Fitzgerald Date: Mon Apr 28 10:41:26 2025 +0100 ALSA: hda/cs35l56: Remove dependency on COMPILE_TEST Change the Kconfig dependency on ACPI || COMPILE_TEST to only depend on ACPI. The alternate dependency on COMPILE_TEST was a fudge to enable building KUnit tests for modules that are selected by the CS35L56 driver but don't depend on ACPI. This was based on a misunderstanding that KUNIT_ALL_TESTS meant "all tests". Actually KUNIT_ALL_TESTS only means "tests for modules that have satisfied dependencies" so it shouldn't be overriding dependencies. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250428094126.125781-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 928e1c67c13ec2a88982bc60ea9fbcb9c3d307bc Author: Inochi Amaoto Date: Mon Apr 14 06:35:00 2025 +0800 dt-bindings: hwmon: Add Sophgo SG2044 external hardware monitor support The MCU device on SG2044 exposes the same interface as SG2042, which is already supported by the kernel. Add compatible string for monitor device of SG2044. Signed-off-by: Inochi Amaoto Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250413223507.46480-7-inochiama@gmail.com Signed-off-by: Guenter Roeck commit 5b39aa368bcfe193666ad4a68ef55f41dfd74028 Author: Herbert Xu Date: Tue Apr 29 17:12:30 2025 +0800 crypto: s390/sha512 - Fix sha512 state size The sha512 state size in s390_sha_ctx is out by a factor of 8, fix it so that it stays below HASH_MAX_DESCSIZE. Also fix the state init function which was writing garbage to the state. Luckily this is not actually used for anything other than export. Reported-by: Harald Freudenberger Fixes: 572b5c4682c7 ("crypto: s390/sha512 - Use API partial block handling") Signed-off-by: Herbert Xu commit 35db59fa8ea232f862620551d5c48dac6d079290 Author: Ravi Bangoria Date: Tue Apr 29 03:59:38 2025 +0000 perf test amd ibs: Add sample period unit test IBS Fetch and IBS Op PMUs has various constraints on supported sample periods. Add perf unit tests to test those. Running it in parallel with other tests causes intermittent failures. Mark it exclusive to force it to run sequentially. Sample output on a Zen5 machine: Without kernel fixes: $ sudo ./perf test -vv 112 112: AMD IBS sample period: --- start --- test child forked, pid 8774 Using CPUID AuthenticAMD-26-2-1 IBS config tests: ----------------- Fetch PMU tests: 0xffff : Ok (nr samples: 1078) 0x1000 : Ok (nr samples: 17030) 0xff : Ok (nr samples: 41068) 0x1 : Ok (nr samples: 40543) 0x0 : Ok 0x10000 : Ok Op PMU tests: 0x0 : Ok 0x1 : Fail 0x8 : Fail 0x9 : Ok (nr samples: 40543) 0xf : Ok (nr samples: 40543) 0x1000 : Ok (nr samples: 18736) 0xffff : Ok (nr samples: 1168) 0x10000 : Ok 0x100000 : Fail (nr samples: 14) 0xf00000 : Fail (nr samples: 1) 0xf0ffff : Fail (nr samples: 1) 0x1f0ffff : Fail (nr samples: 1) 0x7f0ffff : Fail (nr samples: 0) 0x8f0ffff : Ok 0x17f0ffff : Ok IBS sample period constraint tests: ----------------------------------- Fetch PMU test: freq 0, sample_freq 0: Ok freq 0, sample_freq 1: Fail freq 0, sample_freq 15: Fail freq 0, sample_freq 16: Ok (nr samples: 1604) freq 0, sample_freq 17: Ok (nr samples: 1604) freq 0, sample_freq 143: Ok (nr samples: 1604) freq 0, sample_freq 144: Ok (nr samples: 1604) freq 0, sample_freq 145: Ok (nr samples: 1604) freq 0, sample_freq 1234: Ok (nr samples: 1566) freq 0, sample_freq 4103: Ok (nr samples: 1119) freq 0, sample_freq 65520: Ok (nr samples: 2264) freq 0, sample_freq 65535: Ok (nr samples: 2263) freq 0, sample_freq 65552: Ok (nr samples: 1166) freq 0, sample_freq 8388607: Ok (nr samples: 268) freq 0, sample_freq 268435455: Ok (nr samples: 8) freq 1, sample_freq 0: Ok freq 1, sample_freq 1: Ok (nr samples: 4) freq 1, sample_freq 15: Ok (nr samples: 4) freq 1, sample_freq 16: Ok (nr samples: 4) freq 1, sample_freq 17: Ok (nr samples: 4) freq 1, sample_freq 143: Ok (nr samples: 5) freq 1, sample_freq 144: Ok (nr samples: 5) freq 1, sample_freq 145: Ok (nr samples: 5) freq 1, sample_freq 1234: Ok (nr samples: 7) freq 1, sample_freq 4103: Ok (nr samples: 35) freq 1, sample_freq 65520: Ok (nr samples: 642) freq 1, sample_freq 65535: Ok (nr samples: 636) freq 1, sample_freq 65552: Ok (nr samples: 651) freq 1, sample_freq 8388607: Ok Op PMU test: freq 0, sample_freq 0: Ok freq 0, sample_freq 1: Fail freq 0, sample_freq 15: Fail freq 0, sample_freq 16: Fail freq 0, sample_freq 17: Fail freq 0, sample_freq 143: Fail freq 0, sample_freq 144: Ok (nr samples: 1604) freq 0, sample_freq 145: Ok (nr samples: 1604) freq 0, sample_freq 1234: Ok (nr samples: 1604) freq 0, sample_freq 4103: Ok (nr samples: 1604) freq 0, sample_freq 65520: Ok (nr samples: 2227) freq 0, sample_freq 65535: Ok (nr samples: 2296) freq 0, sample_freq 65552: Ok (nr samples: 2213) freq 0, sample_freq 8388607: Ok (nr samples: 250) freq 0, sample_freq 268435455: Ok (nr samples: 8) freq 1, sample_freq 0: Ok freq 1, sample_freq 1: Fail (nr samples: 4) freq 1, sample_freq 15: Fail (nr samples: 4) freq 1, sample_freq 16: Fail (nr samples: 4) freq 1, sample_freq 17: Fail (nr samples: 4) freq 1, sample_freq 143: Fail (nr samples: 5) freq 1, sample_freq 144: Fail (nr samples: 5) freq 1, sample_freq 145: Fail (nr samples: 5) freq 1, sample_freq 1234: Fail (nr samples: 8) freq 1, sample_freq 4103: Fail (nr samples: 33) freq 1, sample_freq 65520: Fail (nr samples: 546) freq 1, sample_freq 65535: Fail (nr samples: 544) freq 1, sample_freq 65552: Fail (nr samples: 555) freq 1, sample_freq 8388607: Ok IBS ioctl() tests: ------------------ Fetch PMU tests ioctl(period = 0x0 ): Ok ioctl(period = 0x1 ): Fail ioctl(period = 0xf ): Fail ioctl(period = 0x10 ): Ok ioctl(period = 0x11 ): Fail ioctl(period = 0x1f ): Fail ioctl(period = 0x20 ): Ok ioctl(period = 0x80 ): Ok ioctl(period = 0x8f ): Fail ioctl(period = 0x90 ): Ok ioctl(period = 0x91 ): Fail ioctl(period = 0x100 ): Ok ioctl(period = 0xfff0 ): Ok ioctl(period = 0xffff ): Fail ioctl(period = 0x10000 ): Ok ioctl(period = 0x1fff0 ): Ok ioctl(period = 0x1fff5 ): Fail ioctl(freq = 0x0 ): Ok ioctl(freq = 0x1 ): Ok ioctl(freq = 0xf ): Ok ioctl(freq = 0x10 ): Ok ioctl(freq = 0x11 ): Ok ioctl(freq = 0x1f ): Ok ioctl(freq = 0x20 ): Ok ioctl(freq = 0x80 ): Ok ioctl(freq = 0x8f ): Ok ioctl(freq = 0x90 ): Ok ioctl(freq = 0x91 ): Ok ioctl(freq = 0x100 ): Ok Op PMU tests ioctl(period = 0x0 ): Ok ioctl(period = 0x1 ): Fail ioctl(period = 0xf ): Fail ioctl(period = 0x10 ): Fail ioctl(period = 0x11 ): Fail ioctl(period = 0x1f ): Fail ioctl(period = 0x20 ): Fail ioctl(period = 0x80 ): Fail ioctl(period = 0x8f ): Fail ioctl(period = 0x90 ): Ok ioctl(period = 0x91 ): Fail ioctl(period = 0x100 ): Ok ioctl(period = 0xfff0 ): Ok ioctl(period = 0xffff ): Fail ioctl(period = 0x10000 ): Ok ioctl(period = 0x1fff0 ): Ok ioctl(period = 0x1fff5 ): Fail ioctl(freq = 0x0 ): Ok ioctl(freq = 0x1 ): Ok ioctl(freq = 0xf ): Ok ioctl(freq = 0x10 ): Ok ioctl(freq = 0x11 ): Ok ioctl(freq = 0x1f ): Ok ioctl(freq = 0x20 ): Ok ioctl(freq = 0x80 ): Ok ioctl(freq = 0x8f ): Ok ioctl(freq = 0x90 ): Ok ioctl(freq = 0x91 ): Ok ioctl(freq = 0x100 ): Ok IBS freq (negative) tests: -------------------------- freq 1, sample_freq 200000: Fail IBS L3MissOnly test: (takes a while) -------------------- Fetch L3MissOnly: Fail (nr_samples: 1213) Op L3MissOnly: Ok (nr_samples: 1193) ---- end(-1) ---- 112: AMD IBS sample period : FAILED! With kernel fixes: $ sudo ./perf test -vv 112 112: AMD IBS sample period: --- start --- test child forked, pid 6939 Using CPUID AuthenticAMD-26-2-1 IBS config tests: ----------------- Fetch PMU tests: 0xffff : Ok (nr samples: 969) 0x1000 : Ok (nr samples: 15540) 0xff : Ok (nr samples: 40555) 0x1 : Ok (nr samples: 40543) 0x0 : Ok 0x10000 : Ok Op PMU tests: 0x0 : Ok 0x1 : Ok 0x8 : Ok 0x9 : Ok (nr samples: 40543) 0xf : Ok (nr samples: 40543) 0x1000 : Ok (nr samples: 19156) 0xffff : Ok (nr samples: 1169) 0x10000 : Ok 0x100000 : Ok (nr samples: 1151) 0xf00000 : Ok (nr samples: 76) 0xf0ffff : Ok (nr samples: 73) 0x1f0ffff : Ok (nr samples: 33) 0x7f0ffff : Ok (nr samples: 10) 0x8f0ffff : Ok 0x17f0ffff : Ok IBS sample period constraint tests: ----------------------------------- Fetch PMU test: freq 0, sample_freq 0: Ok freq 0, sample_freq 1: Ok freq 0, sample_freq 15: Ok freq 0, sample_freq 16: Ok (nr samples: 1203) freq 0, sample_freq 17: Ok (nr samples: 1604) freq 0, sample_freq 143: Ok (nr samples: 1604) freq 0, sample_freq 144: Ok (nr samples: 1604) freq 0, sample_freq 145: Ok (nr samples: 1604) freq 0, sample_freq 1234: Ok (nr samples: 1604) freq 0, sample_freq 4103: Ok (nr samples: 1343) freq 0, sample_freq 65520: Ok (nr samples: 2254) freq 0, sample_freq 65535: Ok (nr samples: 2136) freq 0, sample_freq 65552: Ok (nr samples: 1158) freq 0, sample_freq 8388607: Ok (nr samples: 257) freq 0, sample_freq 268435455: Ok (nr samples: 8) freq 1, sample_freq 0: Ok freq 1, sample_freq 1: Ok (nr samples: 4) freq 1, sample_freq 15: Ok (nr samples: 4) freq 1, sample_freq 16: Ok (nr samples: 4) freq 1, sample_freq 17: Ok (nr samples: 4) freq 1, sample_freq 143: Ok (nr samples: 5) freq 1, sample_freq 144: Ok (nr samples: 5) freq 1, sample_freq 145: Ok (nr samples: 5) freq 1, sample_freq 1234: Ok (nr samples: 8) freq 1, sample_freq 4103: Ok (nr samples: 34) freq 1, sample_freq 65520: Ok (nr samples: 458) freq 1, sample_freq 65535: Ok (nr samples: 628) freq 1, sample_freq 65552: Ok (nr samples: 396) freq 1, sample_freq 8388607: Ok Op PMU test: freq 0, sample_freq 0: Ok freq 0, sample_freq 1: Ok freq 0, sample_freq 15: Ok freq 0, sample_freq 16: Ok freq 0, sample_freq 17: Ok freq 0, sample_freq 143: Ok freq 0, sample_freq 144: Ok (nr samples: 1604) freq 0, sample_freq 145: Ok (nr samples: 1604) freq 0, sample_freq 1234: Ok (nr samples: 1604) freq 0, sample_freq 4103: Ok (nr samples: 1604) freq 0, sample_freq 65520: Ok (nr samples: 2250) freq 0, sample_freq 65535: Ok (nr samples: 2158) freq 0, sample_freq 65552: Ok (nr samples: 2296) freq 0, sample_freq 8388607: Ok (nr samples: 243) freq 0, sample_freq 268435455: Ok (nr samples: 6) freq 1, sample_freq 0: Ok freq 1, sample_freq 1: Ok (nr samples: 4) freq 1, sample_freq 15: Ok (nr samples: 4) freq 1, sample_freq 16: Ok (nr samples: 4) freq 1, sample_freq 17: Ok (nr samples: 4) freq 1, sample_freq 143: Ok (nr samples: 4) freq 1, sample_freq 144: Ok (nr samples: 5) freq 1, sample_freq 145: Ok (nr samples: 4) freq 1, sample_freq 1234: Ok (nr samples: 6) freq 1, sample_freq 4103: Ok (nr samples: 27) freq 1, sample_freq 65520: Ok (nr samples: 542) freq 1, sample_freq 65535: Ok (nr samples: 550) freq 1, sample_freq 65552: Ok (nr samples: 552) freq 1, sample_freq 8388607: Ok IBS ioctl() tests: ------------------ Fetch PMU tests ioctl(period = 0x0 ): Ok ioctl(period = 0x1 ): Ok ioctl(period = 0xf ): Ok ioctl(period = 0x10 ): Ok ioctl(period = 0x11 ): Ok ioctl(period = 0x1f ): Ok ioctl(period = 0x20 ): Ok ioctl(period = 0x80 ): Ok ioctl(period = 0x8f ): Ok ioctl(period = 0x90 ): Ok ioctl(period = 0x91 ): Ok ioctl(period = 0x100 ): Ok ioctl(period = 0xfff0 ): Ok ioctl(period = 0xffff ): Ok ioctl(period = 0x10000 ): Ok ioctl(period = 0x1fff0 ): Ok ioctl(period = 0x1fff5 ): Ok ioctl(freq = 0x0 ): Ok ioctl(freq = 0x1 ): Ok ioctl(freq = 0xf ): Ok ioctl(freq = 0x10 ): Ok ioctl(freq = 0x11 ): Ok ioctl(freq = 0x1f ): Ok ioctl(freq = 0x20 ): Ok ioctl(freq = 0x80 ): Ok ioctl(freq = 0x8f ): Ok ioctl(freq = 0x90 ): Ok ioctl(freq = 0x91 ): Ok ioctl(freq = 0x100 ): Ok Op PMU tests ioctl(period = 0x0 ): Ok ioctl(period = 0x1 ): Ok ioctl(period = 0xf ): Ok ioctl(period = 0x10 ): Ok ioctl(period = 0x11 ): Ok ioctl(period = 0x1f ): Ok ioctl(period = 0x20 ): Ok ioctl(period = 0x80 ): Ok ioctl(period = 0x8f ): Ok ioctl(period = 0x90 ): Ok ioctl(period = 0x91 ): Ok ioctl(period = 0x100 ): Ok ioctl(period = 0xfff0 ): Ok ioctl(period = 0xffff ): Ok ioctl(period = 0x10000 ): Ok ioctl(period = 0x1fff0 ): Ok ioctl(period = 0x1fff5 ): Ok ioctl(freq = 0x0 ): Ok ioctl(freq = 0x1 ): Ok ioctl(freq = 0xf ): Ok ioctl(freq = 0x10 ): Ok ioctl(freq = 0x11 ): Ok ioctl(freq = 0x1f ): Ok ioctl(freq = 0x20 ): Ok ioctl(freq = 0x80 ): Ok ioctl(freq = 0x8f ): Ok ioctl(freq = 0x90 ): Ok ioctl(freq = 0x91 ): Ok ioctl(freq = 0x100 ): Ok IBS freq (negative) tests: -------------------------- freq 1, sample_freq 200000: Ok IBS L3MissOnly test: (takes a while) -------------------- Fetch L3MissOnly: Ok (nr_samples: 1301) Op L3MissOnly: Ok (nr_samples: 1590) ---- end(0) ---- 112: AMD IBS sample period : Ok Committer notes: Avoid using PAGE_SIZE as that define is also in sys/user.h Make it a variable not to call sysconf() multiple times. Also cast func to void * when passing it as the first arg to memcpy to avoid this with some versions of clang: arch/x86/tests/amd-ibs-period.c:81:3: error: no matching function for call to 'memcpy' memcpy(func, insn1, sizeof(insn1)); ^~~~~~ /usr/include/string.h:27:7: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *' for 1st argument void *memcpy (void *__restrict, const void *__restrict, size_t); ^ /usr/include/fortify/string.h:40:27: note: candidate function not viable: no known conversion from 'int (*)(void)' to 'void *const' for 1st argument _FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od, ^ arch/x86/tests/amd-ibs-period.c:87:3: error: no matching function for call to 'memcpy' This one, for instance: Alpine clang version 19.1.4 Target: x86_64-alpine-linux-musl Thread model: posix InstalledDir: /usr/lib/llvm19/bin Configuration file: /etc/clang19/x86_64-alpine-linux-musl.cfg System configuration file directory: /etc/clang19 Signed-off-by: Ravi Bangoria Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Joe Mario Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250429035938.1301-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit fa1332a8011eebe1feefded19c94dcfdb22aacef Author: Ravi Bangoria Date: Tue Apr 29 03:59:37 2025 +0000 perf mem/c2c amd: Add ldlat support 'perf mem/c2c' uses IBS Op PMU on AMD platforms. IBS Op PMU on Zen5 uarch has added support for Load Latency filtering. Implement 'perf mem/c2c' --ldlat using IBS Op Load Latency filtering capability. Some subtle differences between AMD and other arch: o --ldlat is disabled by default on AMD o Supported values are 128 to 2048. Signed-off-by: Ravi Bangoria Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Joe Mario Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250429035938.1301-4-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit fc481adc97f45328e242b6dba9fabd24f2082a6e Author: Ravi Bangoria Date: Tue Apr 29 03:59:36 2025 +0000 perf amd ibs: Incorporate Zen5 DTLB and PageSize information IBS Op PMU on Zen5 reports DTLB and page size information differently compared to prior generation. IBS_OP_DATA3 Zen3/4 Zen5 ---------------------------------------------------------------- 19 IbsDcL2TlbHit1G Reserved ---------------------------------------------------------------- 6 IbsDcL2tlbHit2M Reserved ---------------------------------------------------------------- 5 IbsDcL1TlbHit1G PageSize: 4 IbsDcL1TlbHit2M 0 - 4K 1 - 2M 2 - 1G 3 - Reserved Valid only if IbsDcPhyAddrValid = 1 ---------------------------------------------------------------- 3 IbsDcL2TlbMiss IbsDcL2TlbMiss Valid only if IbsDcPhyAddrValid = 1 ---------------------------------------------------------------- 2 IbsDcL1tlbMiss IbsDcL1tlbMiss Valid only if IbsDcPhyAddrValid = 1 ---------------------------------------------------------------- Kernel expose this change as "dtlb_pgsize" capability in PMU sysfs. Change IBS register raw-dump logic according to new bit definitions. Signed-off-by: Ravi Bangoria Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Joe Mario Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250429035938.1301-3-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit eeefc13c71e243108f7d0c0b26eb9e8592921ee6 Author: Ravi Bangoria Date: Tue Apr 29 03:59:35 2025 +0000 perf amd ibs: Add Load Latency bits in raw dump IBS OP PMU on Zen5 supports Load Latency filtering. Decode and dump Load Latency filtering related bits into perf script raw dump. Also add oneliner example in the perf-amd-ibs man page. Signed-off-by: Ravi Bangoria Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Joe Mario Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20250429035938.1301-2-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 4d728bb93bab6c2a3c0dc98df8799b668f948b18 Author: Arnaldo Carvalho de Melo Date: Tue Apr 29 12:38:26 2025 -0300 perf symbols: Handle 'u' and 'l' symbols in /proc/kallsyms I started seeing this in recent Fedora 42 kernels: # uname -a Linux number 6.14.3-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Apr 20 16:08:39 UTC 2025 x86_64 GNU/Linux # # perf test vmlinux 1: vmlinux symtab matches kallsyms : FAILED! # Where we have Rust enabled: # grep CONFIG_RUST /boot/config-6.14.3-300.fc42.x86_64 CONFIG_RUSTC_VERSION=108600 CONFIG_RUST_IS_AVAILABLE=y CONFIG_RUSTC_LLVM_VERSION=200101 CONFIG_RUSTC_HAS_COERCE_POINTEE=y CONFIG_RUST=y CONFIG_RUSTC_VERSION_TEXT="rustc 1.86.0 (05f9846f8 2025-03-31) (Fedora 1.86.0-1.fc42)" CONFIG_RUST_FW_LOADER_ABSTRACTIONS=y CONFIG_RUST_PHYLIB_ABSTRACTIONS=y # CONFIG_RUST_DEBUG_ASSERTIONS is not set CONFIG_RUST_OVERFLOW_CHECKS=y # CONFIG_RUST_BUILD_ASSERT_ALLOW is not set # Looking at the reason for the failure: # perf test -v vmlinux |& grep ^ERR ERR : 0xffffffff99efc7d0: __pfx__RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ not on kallsyms ERR : 0xffffffff99efc7e0: _RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ not on kallsyms # But: # grep -w u /proc/kallsyms ffffffff99efc7d0 u __pfx__RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ ffffffff99efc7e0 u _RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ # The test checks that "vmlinux symtab matches kallsyms", so it finds those two symbols in vmlinux: # pahole --running_kernel_vmlinux /usr/lib/debug/lib/modules/6.14.3-300.fc42.x86_64/vmlinux # # readelf -sW /usr/lib/debug/lib/modules/6.14.3-300.fc42.x86_64/vmlinux | grep -Ew '(__pfx__RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_|_RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_)' 81844: ffffffff81efc7e0 524 FUNC LOCAL DEFAULT 1 _RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ 144259: ffffffff81efc7d0 16 FUNC LOCAL DEFAULT 1 __pfx__RNCINvNtNtNtCsf5tcb0XGUW4_4core4iter8adapters3map12map_try_foldjNtCsagR6JbSOIa9_12drm_panic_qr7VersionuINtNtNtBa_3ops12control_flow11ControlFlowB10_ENcB10_0NCINvNvNtNtNtB8_6traits8iterator8Iterator4find5checkB10_NCNvMB12_B10_13from_segments0E0E0B12_ # It is there. From the nm documentation we can see that: "U" The symbol is undefined. "u" The symbol is a unique global symbol. This is a GNU extension to the standard set of ELF symbol bindings. For such a symbol the dynamic linker will make sure that in the entire process there is just one symbol with this name and type in use. So lets consider 'u' symbols in /proc/kallsyms when loading it to cover this case. Fedora:40 shows this as a 'l' symbol, so consider that as well. With this patch 'perf test 1' is happy again: # perf test vmlinux 1: vmlinux symtab matches kallsyms : Ok # Cc: Adrian Hunter Cc: Ian Rogers Cc: Masahiro Yamada Cc: Miguel Ojeda Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/aBE_n0PGl3g6h-cS@x1 Signed-off-by: Arnaldo Carvalho de Melo commit e6702c44c2adb28b62f81de498e9b1e4562ce660 Author: David Lechner Date: Mon Apr 28 15:58:59 2025 -0500 spi: axi-spi-engine: omit SYNC from offload instructions Add optimization to omit SYNC instructions from offload messages. Starting with IP core v1.5.0, the SYNC instruction is no longer required for proper operation when using the offload feature. Omitting the SYNC instruction saves a few clock cycles needed to executed which can e.g. allow achieving higher sample rates on ADCs. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250428-adi-main-v1-4-4b8a1b88a212@baylibre.com Signed-off-by: Mark Brown commit 087591c9e4fde86fe2971c34a2745c208103248e Author: David Lechner Date: Mon Apr 28 15:58:58 2025 -0500 spi: axi-spi-engine: optimize bits_per_word for offload Add an optimization to avoid repeating bits_per_word instructions in each message when using SPI offload. This only applies when all data xfers in a message have the same bits_per_word. In this case, we can execute the instruction that sets bits_per_word when the offload trigger is enabled. This is useful e.g. for obtaining higher sample rates on ADCs since each message takes less time to execute. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250428-adi-main-v1-3-4b8a1b88a212@baylibre.com Signed-off-by: Mark Brown commit 8fc13b822c74a46587c0d8aae4ea0820b6bdb933 Author: David Lechner Date: Mon Apr 28 15:58:57 2025 -0500 spi: axi-spi-engine: don't repeat mode config for offload Add an optimization to avoid repeating the config instruction in each SPI message when using SPI offloading. Instead, the instruction is run once when the SPI offload trigger is enabled. This is done to allow higher sample rates for ADCs using this SPI controller. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250428-adi-main-v1-2-4b8a1b88a212@baylibre.com Signed-off-by: Mark Brown commit 1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75 Author: David Lechner Date: Mon Apr 28 15:58:56 2025 -0500 spi: axi-spi-engine: wait for completion in setup Add a polling wait for SPI instruction execution to complete in the spi_engine_setup() function. In practice, these instructions complete in a few 10s of nanoseconds, so we never ran into any race conditions, but it is good practice to wait for the completion of the SPI engine instructions before returning from the setup function. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250428-adi-main-v1-1-4b8a1b88a212@baylibre.com Signed-off-by: Mark Brown commit d30e845b0ae63400738709ca624a4a7bb69c4ba2 Author: Thorsten Blum Date: Mon Apr 28 08:13:18 2025 +0200 regcache: Use sort()'s default swap() implementation Use sort()'s default swap() implementation and remove the custom regcache_defaults_swap() function. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250428061318.88859-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit 94602d84163c127ec2374fba0fcb6587a07785ce Author: Richard Fitzgerald Date: Mon Apr 28 10:08:03 2025 +0100 ASoC: wm_adsp: Don't use no_free_ptr() when passing to PTR_ERR() It's no longer necessary to no_free_ptr() an auto-freed pointer before passing it to PTR_ERR(). This was fixed by commit cd7eb8f83fcf ("mm/slab: make __free(kfree) accept error pointers"). Removing the no_free_ptr() avoids the spurious warning "inconsistent IS_ERR and PTR_ERR". Fixes: b5d057a86e20 ("ASoC: wm_adsp: Use vmemdup_user() instead of open-coding") Signed-off-by: Richard Fitzgerald Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504270751.nR3Ngfrq-lkp@intel.com/ Link: https://patch.msgid.link/20250428090803.97909-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 84dea31d33e0f4651eff6ee2e1e02804ff2529d2 Author: Thorsten Blum Date: Tue Apr 29 09:10:13 2025 +0200 ASoC: codecs: Use min() to simplify aw_dev_dsp_update_container() Use min() to simplify aw_dev_dsp_update_container() and improve its readability. No functional changes intended. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250429071032.65391-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit 00a371adbbfb46db561db85a9d7b53b2363880a1 Author: Kees Cook Date: Fri Apr 25 23:25:12 2025 -0700 ASoC: SOF: ipc4-pcm: Adjust pipeline_list->pipelines allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct snd_sof_pipeline **", but the returned type will be "struct snd_sof_widget **". These are the same size allocation (pointer size) but the types don't match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Fixes: 9c04363d222b ("ASoC: SOF: Introduce struct snd_sof_pipeline") Acked-by: Peter Ujfalusi Link: https://patch.msgid.link/20250426062511.work.859-kees@kernel.org Signed-off-by: Mark Brown commit 114a6e63d9cc11311587773d5db4cf4105cf658f Author: Julien Massot Date: Tue Apr 29 11:19:22 2025 +0200 ASoC: SOF: topology: Fix null pointer dereference The "get_function_tplg_files" function is only applicable to ACPI-based devices (sof_pdata->machine and not sof_pdata->of_machine). Skip this check for OF-based devices to avoid a NULL pointer dereference in snd_sof_load_topology(). Fixes: 6d5997c412cc ("ASoC: SOF: topology: load multiple topologies") Reviewed-by: Laurentiu Mihalcea Reviewed-by: Cristian Ciocaltea Signed-off-by: Julien Massot Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250429-fixup-of-sof-topology-v4-1-ff692244d64c@collabora.com Signed-off-by: Mark Brown commit 85f380f2b9ab6e9a8753626fa3d8a3f4a323043a Author: Cristian Ciocaltea Date: Tue Apr 29 13:29:43 2025 +0300 ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe() The 'card' pointer is not required to be NULL initialized as it is never accessed before the related memory allocation takes place. Drop the redundant assignment. Signed-off-by: Cristian Ciocaltea Link: https://patch.msgid.link/20250429-acp-sof-probe-assign-v1-1-9784f6eb7660@collabora.com Signed-off-by: Mark Brown commit 1f773970a72e485bb7da494e6d2ec1631ea04133 Merge: 8e36fcaa494d7e 0014af802193aa Author: Jakub Kicinski Date: Tue Apr 29 16:31:09 2025 -0700 Merge tag 'nf-next-25-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following batch contains Netfilter updates for net-next: 1) Replace msecs_to_jiffies() by secs_to_jiffies(), from Easwar Hariharan. 2) Allow to compile xt_cgroup with cgroupsv2 support only, from Michal Koutny. 3) Prepare for sock_cgroup_classid() removal by wrapping it around ifdef, also from Michal Koutny. 4) Remove redundant pointer fetch on conntrack template, from Xuanqiang Luo. 5) Re-format one block in the tproxy documentation for consistency, from Chen Linxuan. 6) Expose set element count and type via netlink attributes, from Florian Westphal. * tag 'nf-next-25-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nf_tables: export set count and backend name to userspace docs: tproxy: fix formatting for nft code block netfilter: conntrack: Remove redundant NFCT_ALIGN call net: cgroup: Guard users of sock_cgroup_classid() netfilter: xt_cgroup: Make it independent from net_cls netfilter: xt_IDLETIMER: convert timeouts to secs_to_jiffies() ==================== Link: https://patch.msgid.link/20250428221254.3853-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit c058c5f8b6e424261c4974b39f2596e9d521f13f Author: Michal Swiatkowski Date: Wed Apr 9 08:29:45 2025 +0200 idpf: remove unreachable code from setting mailbox Remove code that isn't reached. There is no need to check for adapter->req_vec_chunks, because if it isn't set idpf_set_mb_vec_id() won't be called. Only one path when idpf_set_mb_vec_id() is called: idpf_intr_req() -> idpf_send_alloc_vectors_msg() -> adapter->req_vec_chunk is allocated here, otherwise an error is returned and idpf_intr_req() exits with an error. The idpf_set_mb_vec_id() becomes one-liner and it is called only once. Remove it and set mailbox vector index directly. Reviewed-by: Aleksandr Loktionov Reviewed-by: Michal Kubiak Reviewed-by: Pavan Kumar Linga Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit 8e36fcaa494d7e3fefabb187c4931f107e010cf0 Author: Ruben Wauters Date: Mon Apr 28 22:51:09 2025 +0100 tools: ynl: fix typo in info string replaces formmated with formatted also corrects grammar by replacing a with an, and capitalises RST Signed-off-by: Ruben Wauters Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250428215541.6029-1-rubenru09@aol.com Signed-off-by: Jakub Kicinski commit 508d374b8dc018a72f2d77dbd5658e0d2e576679 Author: Mateusz Polchlopek Date: Sat Mar 1 20:02:44 2025 +0100 idpf: assign extracted ptype to struct libeth_rqe_info field Assign the ptype extracted from qword to the ptype field of struct libeth_rqe_info. Remove the now excess ptype param of idpf_rx_singleq_extract_fields(), idpf_rx_singleq_extract_base_fields() and idpf_rx_singleq_extract_flex_fields(). Suggested-by: Alexander Lobakin Reviewed-by: Przemek Kitszel Reviewed-by: Alexander Lobakin Signed-off-by: Mateusz Polchlopek Tested-by: Samuel Salin Signed-off-by: Tony Nguyen commit fe259a1bb26ec78842c975d992331705b0c2c2e8 Author: Slawomir Mrozowicz Date: Fri Apr 11 15:06:26 2025 +0200 ixgbe: devlink: add devlink region support for E610 Provide support for the following devlink cmds: -DEVLINK_CMD_REGION_GET -DEVLINK_CMD_REGION_NEW -DEVLINK_CMD_REGION_DEL -DEVLINK_CMD_REGION_READ ixgbe devlink region implementation, similarly to the ice one, lets user to create snapshots of content of Non Volatile Memory, content of Shadow RAM, and capabilities of the device. For both NVM and SRAM regions provide .read() handler to let user read their contents without the need to create full snapshots. Reviewed-by: Przemek Kitszel Signed-off-by: Slawomir Mrozowicz Co-developed-by: Jedrzej Jagielski Signed-off-by: Jedrzej Jagielski Tested-by: Bharath R Signed-off-by: Tony Nguyen commit 4bf2d11902efe9a3699cb0339f6a34cdef4e9aa6 Author: Jedrzej Jagielski Date: Mon Mar 3 13:06:30 2025 +0100 ixgbe: add E610 .set_phys_id() callback implementation Legacy implementation of .set_phys_id() ethtool callback is not applicable for E610 device. Add new implementation which uses 0x06E9 command by calling ixgbe_aci_set_port_id_led(). Reviewed-by: Aleksandr Loktionov Reviewed-by: Michal Swiatkowski Signed-off-by: Jedrzej Jagielski Reviewed-by: Simon Horman Tested-by: Bharath R Signed-off-by: Tony Nguyen commit 7f58648dbc53826d9480e45468717466d5b37343 Author: Jedrzej Jagielski Date: Mon Mar 3 13:06:29 2025 +0100 ixgbe: apply different rules for setting FC on E610 E610 device doesn't support disabling FC autonegotiation. Create dedicated E610 .set_pauseparam() implementation and assign it to ixgbe_ethtool_ops_e610. Reviewed-by: Aleksandr Loktionov Signed-off-by: Jedrzej Jagielski Reviewed-by: Simon Horman Tested-by: Bharath R Signed-off-by: Tony Nguyen commit 451c6bc923e2217d1085e8c9ce88fe1b7a30a1db Author: Jedrzej Jagielski Date: Mon Mar 3 13:06:28 2025 +0100 ixgbe: add support for ACPI WOL for E610 Currently only APM (Advanced Power Management) is supported by the ixgbe driver. It works for magic packets only, as for different sources of wake-up E610 adapter utilizes different feature. Add E610 specific implementation of ixgbe_set_wol() callback. When any of broadcast/multicast/unicast wake-up is set, disable APM and configure ACPI (Advanced Configuration and Power Interface). Reviewed-by: Michal Swiatkowski Reviewed-by: Aleksandr Loktionov Signed-off-by: Jedrzej Jagielski Reviewed-by: Simon Horman Tested-by: Bharath R Signed-off-by: Tony Nguyen commit 462cc09ac37ddde5a01477613220f0271fe49291 Author: Jedrzej Jagielski Date: Mon Mar 3 13:06:27 2025 +0100 ixgbe: create E610 specific ethtool_ops structure E610's implementation of various ethtool ops is different than the ones corresponding to ixgbe legacy products. Therefore create separate E610 ethtool_ops struct which will be filled out in the forthcoming patches. Add adequate ops struct basing on MAC type. This step requires changing a bit the flow of probing by placing ixgbe_set_ethtool_ops after hw.mac.type is assigned. So move the whole netdev assignment block after hw.mac.type is known. This step doesn't have any additional impact on probing sequence. Suggested-by: Aleksandr Loktionov Reviewed-by: Aleksandr Loktionov Signed-off-by: Jedrzej Jagielski Reviewed-by: Simon Horman Tested-by: Bharath R Signed-off-by: Tony Nguyen commit 876863c3fc755730c942b4c5e1297255d81787e6 Author: Kurt Kanzenbach Date: Fri Mar 21 14:52:39 2025 +0100 igc: Change Tx mode for MQPRIO offloading The current MQPRIO offload implementation uses the legacy TSN Tx mode. In this mode the hardware uses four packet buffers and considers queue priorities. In order to harmonize the TAPRIO implementation with MQPRIO, switch to the regular TSN Tx mode. This mode also uses four packet buffers and considers queue priorities. In addition to the legacy mode, transmission is always coupled to Qbv. The driver already has mechanisms to use a dummy schedule of 1 second with all gates open for ETF. Simply use this for MQPRIO too. This reduces code and makes it easier to add support for frame preemption later. Tested on i225 with real time application using high priority queue, iperf3 using low priority queue and network TAP device. Acked-by: Faizal Rahim Signed-off-by: Kurt Kanzenbach Reviewed-by: Simon Horman Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 68f37f26b0ff28c93d94084178b946136da6d140 Author: Kurt Kanzenbach Date: Fri Mar 21 14:52:38 2025 +0100 igc: Limit netdev_tc calls to MQPRIO Limit netdev_tc calls to MQPRIO. Currently these calls are made in igc_tsn_enable_offload() and igc_tsn_disable_offload() which are used by TAPRIO and ETF as well. However, these are only required for MQPRIO. Signed-off-by: Kurt Kanzenbach Reviewed-by: Simon Horman Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit a22ed15c99a052c6ea015b516acfd7e02bcdb995 Author: Kurt Kanzenbach Date: Wed Mar 19 11:26:42 2025 +0100 igb: Get rid of spurious interrupts When running the igc with XDP/ZC in busy polling mode with deferral of hard interrupts, interrupts still happen from time to time. That is caused by the igb task watchdog which triggers Rx interrupts periodically. That mechanism has been introduced to overcome skb/memory allocation failures [1]. So the Rx clean functions stop processing the Rx ring in case of such failure. The task watchdog triggers Rx interrupts periodically in the hope that memory became available in the mean time. The current behavior is undesirable for real time applications, because the driver induced Rx interrupts trigger also the softirq processing. However, all real time packets should be processed by the application which uses the busy polling method. Therefore, only trigger the Rx interrupts in case of real allocation failures. Introduce a new flag for signaling that condition. Follow the same logic as in commit 8dcf2c212078 ("igc: Get rid of spurious interrupts"). [1] - https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=3be507547e6177e5c808544bd6a2efa2c7f1d436 Reviewed-by: Joe Damato Reviewed-by: Aleksandr Loktionov Tested-by: Sweta Kumari Signed-off-by: Kurt Kanzenbach Signed-off-by: Tony Nguyen commit fc0fb1f116e97012d90bb77a6032972564ed8fd6 Author: Kurt Kanzenbach Date: Wed Mar 19 11:26:41 2025 +0100 igb: Add support for persistent NAPI config Use netif_napi_add_config() to assign persistent per-NAPI config. This is useful for preserving NAPI settings when changing queue counts or for user space programs using SO_INCOMING_NAPI_ID. Reviewed-by: Joe Damato Reviewed-by: Aleksandr Loktionov Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Kurt Kanzenbach Signed-off-by: Tony Nguyen commit b75a1dea500f4397a46e971cd41e613b7f18e317 Author: Kurt Kanzenbach Date: Wed Mar 19 11:26:40 2025 +0100 igb: Link queues to NAPI instances Link queues to NAPI instances via netdev-genl API. This is required to use XDP/ZC busy polling. See commit 5ef44b3cb43b ("xsk: Bring back busy polling support") for details. This also allows users to query the info with netlink: |$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ | --dump queue-get --json='{"ifindex": 2}' |[{'id': 0, 'ifindex': 2, 'napi-id': 8201, 'type': 'rx'}, | {'id': 1, 'ifindex': 2, 'napi-id': 8202, 'type': 'rx'}, | {'id': 2, 'ifindex': 2, 'napi-id': 8203, 'type': 'rx'}, | {'id': 3, 'ifindex': 2, 'napi-id': 8204, 'type': 'rx'}, | {'id': 0, 'ifindex': 2, 'napi-id': 8201, 'type': 'tx'}, | {'id': 1, 'ifindex': 2, 'napi-id': 8202, 'type': 'tx'}, | {'id': 2, 'ifindex': 2, 'napi-id': 8203, 'type': 'tx'}, | {'id': 3, 'ifindex': 2, 'napi-id': 8204, 'type': 'tx'}] Add rtnl locking to PCI error handlers, because netif_queue_set_napi() requires the lock held. While at __igb_open() use RCT coding style. Signed-off-by: Kurt Kanzenbach Reviewed-by: Joe Damato Tested-by: Sweta Kumari Signed-off-by: Tony Nguyen commit 6fc54c408dc9103bf98470b3877b741c44642baa Author: Kurt Kanzenbach Date: Wed Mar 19 11:26:39 2025 +0100 igb: Link IRQs to NAPI instances Link IRQs to NAPI instances via netdev-genl API. This allows users to query that information via netlink: |$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ | --dump napi-get --json='{"ifindex": 2}' |[{'defer-hard-irqs': 0, | 'gro-flush-timeout': 0, | 'id': 8204, | 'ifindex': 2, | 'irq': 127, | 'irq-suspend-timeout': 0}, | {'defer-hard-irqs': 0, | 'gro-flush-timeout': 0, | 'id': 8203, | 'ifindex': 2, | 'irq': 126, | 'irq-suspend-timeout': 0}, | {'defer-hard-irqs': 0, | 'gro-flush-timeout': 0, | 'id': 8202, | 'ifindex': 2, | 'irq': 125, | 'irq-suspend-timeout': 0}, | {'defer-hard-irqs': 0, | 'gro-flush-timeout': 0, | 'id': 8201, | 'ifindex': 2, | 'irq': 124, | 'irq-suspend-timeout': 0}] |$ cat /proc/interrupts | grep enp2s0 |123: 0 1 IR-PCI-MSIX-0000:02:00.0 0-edge enp2s0 |124: 0 7 IR-PCI-MSIX-0000:02:00.0 1-edge enp2s0-TxRx-0 |125: 0 0 IR-PCI-MSIX-0000:02:00.0 2-edge enp2s0-TxRx-1 |126: 0 5 IR-PCI-MSIX-0000:02:00.0 3-edge enp2s0-TxRx-2 |127: 0 0 IR-PCI-MSIX-0000:02:00.0 4-edge enp2s0-TxRx-3 Reviewed-by: Joe Damato Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Kurt Kanzenbach Signed-off-by: Tony Nguyen commit aa6dcab1ea92a8a1f5a2ff7dec825f25eeebf17d Author: Aryan Srivastava Date: Tue Apr 29 09:49:20 2025 +1200 net: phy: aquantia: fix commenting format Comment was erroneously added with /**, amend this to use /* as it is not a kernel-doc. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504262247.1UBrDBVN-lkp@intel.com/ Signed-off-by: Aryan Srivastava Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250428214920.813038-1-aryan.srivastava@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit fbc1d056d3f3d417bc9df521cb45a0f51758b64a Author: Svyatoslav Ryhel Date: Tue Apr 29 09:18:01 2025 +0300 power: supply: Add driver for Pegatron Chagall battery The Pegatron Chagall is an Android tablet utilizing a customized Cypress CG7153AM microcontroller (MCU) as its battery fuel gauge. It supports a single-cell battery and features a dual-color charging LED. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20250429061803.9581-4-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit 615a8d9d897de77268ee81a78a5bf65fad53bcc8 Author: Svyatoslav Ryhel Date: Tue Apr 29 09:18:00 2025 +0300 dt-bindings: power: supply: Document Pegatron Chagall fuel gauge Add binding for Pegatron Chagall tablets battery monitor. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250429061803.9581-3-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit b5cd5c42a9182cf6602b2a68201d39bd60a2a65e Author: Svyatoslav Ryhel Date: Tue Apr 29 09:17:59 2025 +0300 dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation PEGATRON Corporation is a Taiwanese electronics manufacturing company that mainly develops computing, communications and consumer electronics for branded vendors. Link https://www.pegatroncorp.com/ Signed-off-by: Svyatoslav Ryhel Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250429061803.9581-2-clamor95@gmail.com Signed-off-by: Sebastian Reichel commit d4d2dc1b590c7416e1cf5fb6750fff2fa841690b Author: Gustavo A. R. Silva Date: Tue Apr 29 14:03:40 2025 -0600 power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Replace an on-stack definition of a flexible structure with a call to utility function cros_ec_cmd(). So, with these changes, fix the following warning: drivers/power/supply/cros_charge-control.c:57:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/aBEwnKtUOTYzS7C3@kspp Signed-off-by: Sebastian Reichel commit fc55584e00fc8409cbaef4bcd984016dca6f1b6b Author: Miguel Ojeda Date: Tue Apr 29 23:06:29 2025 +0200 rust: device: conditionally expect `dead_code` for `parent()` When `CONFIG_AUXILIARY_BUS` is disabled, `parent()` is still dead code: error: method `parent` is never used --> rust/kernel/device.rs:71:19 | 64 | impl Device { | ------------------------------------ method in this implementation ... 71 | pub(crate) fn parent(&self) -> Option<&Self> { | ^^^^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` Thus reintroduce the `expect`, but now as a conditional one. Do so as `dead_code` since that is narrower. An `allow` would also be possible, but Danilo wants to catch new users in the future [1]. Link: https://lore.kernel.org/rust-for-linux/aBE8qQrpXOfru_K3@pollux/ [1] Fixes: ce735e73dd59 ("rust: auxiliary: add auxiliary device / driver abstractions") Signed-off-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250429210629.513521-1-ojeda@kernel.org [ Adjust commit subject to "rust: device: conditionally expect `dead_code` for `parent()`". - Danilo ] Signed-off-by: Danilo Krummrich commit d899e4d55f78901597c0a1ae453166fce2718cb8 Merge: eed848871c96d4 7ead4405e06f67 Author: Jakub Kicinski Date: Tue Apr 29 14:26:29 2025 -0700 Merge branch 'xsk-respect-the-offsets-when-copying-frags' Bui Quang Minh says: ==================== xsk: respect the offsets when copying frags In commit 560d958c6c68 ("xsk: add generic XSk &xdp_buff -> skb conversion"), we introduce a helper to convert zerocopy xdp_buff to skb. However, in the frag copy, we mistakenly ignore the frag's offset. This series adds the missing offset when copying frags in xdp_copy_frags_from_zc(). This function is not used anywhere so no backport is needed. This series also makes xdp_copy_frags_from_zc() use page allocation API page_pool_dev_alloc() instead of page_pool_dev_alloc_netmem() to avoid possible confusion of the returned value. ==================== Link: https://patch.msgid.link/20250426081220.40689-1-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit 7ead4405e06f67bf2163fd4708a6ce0a495b1dca Author: Bui Quang Minh Date: Sat Apr 26 15:12:20 2025 +0700 xsk: convert xdp_copy_frags_from_zc() to use page_pool_dev_alloc() This commit makes xdp_copy_frags_from_zc() use page allocation API page_pool_dev_alloc() instead of page_pool_dev_alloc_netmem() to avoid possible confusion of the returned value. Suggested-by: Jakub Kicinski Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250426081220.40689-3-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit ebaebc5eaf431f7daeeb0a6788a8480d42136df1 Author: Bui Quang Minh Date: Sat Apr 26 15:12:19 2025 +0700 xsk: respect the offsets when copying frags In commit 560d958c6c68 ("xsk: add generic XSk &xdp_buff -> skb conversion"), we introduce a helper to convert zerocopy xdp_buff to skb. However, in the frag copy, we mistakenly ignore the frag's offset. This commit adds the missing offset when copying frags in xdp_copy_frags_from_zc(). This function is not used anywhere so no backport is needed. Signed-off-by: Bui Quang Minh Link: https://patch.msgid.link/20250426081220.40689-2-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit 7625645e69454f984f09ea450b9eb1293467aa39 Author: Amery Hung Date: Tue Apr 29 12:21:28 2025 -0700 bpf: net_sched: Fix using bpf qdisc as default qdisc Use bpf_try_module_get()/bpf_module_put() instead of try_module_get()/ module_put() when handling default qdisc since users can assign a bpf qdisc to it. To trigger the bug: $ bpftool struct_ops register bpf_qdisc_fq.bpf.o /sys/fs/bpf $ echo bpf_fq > /proc/sys/net/core/default_qdisc Fixes: c8240344956e ("bpf: net_sched: Support implementation of Qdisc_ops in bpf") Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250429192128.3860571-1-ameryhung@gmail.com commit 24d8127d801560c8fa811d554e8ab5db7e51511c Author: Nicolas Frattaroli Date: Thu Apr 24 20:52:23 2025 +0200 arm64: dts: rockchip: add SATA nodes to RK3576 The Rockchip RK3576 features two SATA nodes. The first, sata0, is behind combphy0, which muxes between pcie0 and sata0. The second, sata1, is behind combphy1, which muxes between pcie1, sata1 and usb_drd1_dwc3. I've only been able to test sata0 on my board, but it appears to work just fine. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250424-rk3576-sata-v1-2-23ee89c939fe@collabora.com Signed-off-by: Heiko Stuebner commit 090a47b4cd2800164c4e6f3b333e8534736960c0 Author: Jiajia Liu Date: Wed Apr 23 15:37:30 2025 +0800 drm/i915/pch: fix warning for coffeelake on SunrisePoint PCH i915/pch reports a warning on a mini PC which has a CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e92] and an ISA bridge - H110 LPC Controller [8086:a143]. [5.608723] i915 0000:00:02.0: [drm] Found coffeelake (device ID 3e92) integrated display version 9.00 stepping N/A [5.608969] ------------[ cut here ]------------ [5.608972] i915 0000:00:02.0: [drm] drm_WARN_ON(!display->platform.skylake && !display->platform.kabylake) [5.608995] WARNING: CPU: 3 PID: 440 at drivers/gpu/drm/i915/display/intel_pch.c:126 intel_pch_type+0x1af/0xae0 [i915] [5.609317] CPU: 3 UID: 0 PID: 440 Comm: (udev-worker) Not tainted 6.15.0-rc3-drm-tip-2fa6469c618d #3 PREEMPT(voluntary) Signed-off-by: Jiajia Liu Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250423073730.585181-1-liujiajia@kylinos.cn Signed-off-by: Rodrigo Vivi commit 7021a8669444569a4a5bb351d6cad7ab9d69cf5f Author: Frank Li Date: Fri Apr 11 17:23:38 2025 -0400 dt-bindings: clock: convert vf610-clock.txt to yaml format Convert vf610-clock.txt to yaml format. Additional changes: - swap audio_ext and enet_ext to match existed dts order - remove clock consumer in example Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250411212339.3273202-1-Frank.Li@nxp.com Reviewed-by: Rob Herring (Arm) Signed-off-by: Stephen Boyd commit ce7743bc1b93cd81b5234b8bb9587607af3f6c2a Author: Nitin Gote Date: Wed Apr 16 16:06:40 2025 +0530 drm/i915/gt: Add delay to let engine resumes properly Sometimes engine reset fails because the engine resumes from an incorrect RING_HEAD. Engine head failed to set to zero even after writing into it. This is a timing issue and we experimented different values and found out that 20ms delay works best based on testing. So, add a 20ms delay to let engine resumes from correct RING_HEAD. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13968 Signed-off-by: Nitin Gote Reviewed-by: Sebastian Brzezinka Reviewed-by: Krzysztof Karas Link: https://lore.kernel.org/r/20250416103640.212269-1-nitin.r.gote@intel.com Signed-off-by: Rodrigo Vivi commit 1ce65102d2d3c54862f7b59479135168ed512cd2 Author: Feng Yang Date: Mon Apr 28 11:34:45 2025 +0800 selftests/bpf: Fix compilation errors If the CONFIG_NET_SCH_BPF configuration is not enabled, the BPF test compilation will report the following error: In file included from progs/bpf_qdisc_fq.c:39: progs/bpf_qdisc_common.h:17:51: error: declaration of 'struct bpf_sk_buff_ptr' will not be visible outside of this function [-Werror,-Wvisibility] 17 | void bpf_qdisc_skb_drop(struct sk_buff *p, struct bpf_sk_buff_ptr *to_free) __ksym; | ^ progs/bpf_qdisc_fq.c:309:14: error: declaration of 'struct bpf_sk_buff_ptr' will not be visible outside of this function [-Werror,-Wvisibility] 309 | struct bpf_sk_buff_ptr *to_free) | ^ progs/bpf_qdisc_fq.c:309:14: error: declaration of 'struct bpf_sk_buff_ptr' will not be visible outside of this function [-Werror,-Wvisibility] progs/bpf_qdisc_fq.c:308:5: error: conflicting types for '____bpf_fq_enqueue' Fixes: 11c701639ba9 ("selftests/bpf: Add a basic fifo qdisc test") Signed-off-by: Feng Yang Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250428033445.58113-1-yangfeng59949@163.com commit 844e31bbaef7c8a6ff2c0fbac45c0c85b5484482 Merge: 9d78f02503227d 0d607a59a0f659 Author: Rob Clark Date: Tue Apr 29 13:42:29 2025 -0700 Merge remote-tracking branch 'drm-misc/drm-misc-next' into msm-next Merge drm-misc-next to get commit Fixes: fec450ca15af ("drm/display: hdmi: provide central data authority for ACR params"). Signed-off-by: Rob Clark commit 38d976c32d85ef12dcd2b8a231196f7049548477 Author: T.J. Mercier Date: Mon Apr 28 18:02:54 2025 +0000 selftests/bpf: Fix kmem_cache iterator draining The closing parentheses around the read syscall is misplaced, causing single byte reads from the iterator instead of buf sized reads. While the end result is the same, many more read calls than necessary are performed. $ tools/testing/selftests/bpf/vmtest.sh "./test_progs -t kmem_cache_iter" 145/1 kmem_cache_iter/check_task_struct:OK 145/2 kmem_cache_iter/check_slabinfo:OK 145/3 kmem_cache_iter/open_coded_iter:OK 145 kmem_cache_iter:OK Summary: 1/3 PASSED, 0 SKIPPED, 0 FAILED Fixes: a496d0cdc84d ("selftests/bpf: Add a test for kmem_cache_iter") Signed-off-by: T.J. Mercier Signed-off-by: Martin KaFai Lau Acked-by: Song Liu Acked-by: Namhyung Kim Link: https://patch.msgid.link/20250428180256.1482899-1-tjmercier@google.com commit dba7d17d50b4488c697e991d18a0e55669d9fa59 Author: Daniele Ceraolo Spurio Date: Wed Apr 23 10:39:08 2025 -0700 drm/xe/vf: Fix guc_info debugfs for VFs The guc_info debugfs attempts to read a bunch of registers that the VFs doesn't have access to, so fix it by skipping the reads. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4775 Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Lukasz Laguna Reviewed-by: Lukasz Laguna Link: https://lore.kernel.org/r/20250423173908.1571412-1-daniele.ceraolospurio@intel.com commit a256ae22570ee4c3427fdc703a58a89afee6a332 Author: Luo Jie Date: Thu Apr 17 18:47:08 2025 +0800 bitfield: Add FIELD_MODIFY() helper Add a helper for replacing the contents of bitfield in memory with the specified value. Even though a helper xxx_replace_bits() is available, it is not well documented, and only reports errors at the run time, which will not be helpful to catch possible overflow errors due to incorrect parameter types used. FIELD_MODIFY(REG_FIELD_C, ®, c) is the wrapper to the code below. reg &= ~REG_FIELD_C; reg |= FIELD_PREP(REG_FIELD_C, c); Yury: trim commit message, align backslashes. Signed-off-by: Luo Jie Signed-off-by: Yury Norov commit 89a44a808814d4717a8bf945ddebd5c39bfffcf4 Author: Andy Shevchenko Date: Thu Apr 17 19:17:16 2025 +0300 bitmap-str: Add missing header(s) bitmap-str.h is not self-contained, it uses bool type that is provided in types.h and it uses __user annotation that is guaranteed to be included with types.h. Add missing header(s) to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko Signed-off-by: Yury Norov commit 99c712d788c46452289beada638476b68b5a773b Author: Andy Shevchenko Date: Thu Apr 17 19:17:15 2025 +0300 bitmap-str: Get rid of 'extern' for function prototypes The bitmap-str.h uses mixed style for function prototypes. Drop the 'extern' as it easier to read and makes style aligned with a new code in the kernel. Signed-off-by: Andy Shevchenko Signed-off-by: Yury Norov commit 243c90e917f5cfc99821e5104d1c8a81c11cda4c Author: Vincent Mailhol Date: Sat Mar 29 01:48:50 2025 +0900 build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO() __BUILD_BUG_ON_ZERO_MSG(), as introduced in [1], makes it possible to do a static assertions in expressions. The direct benefit is to provide a meaningful error message instead of the cryptic negative bitfield size error message currently returned by BUILD_BUG_ON_ZERO(): ./include/linux/build_bug.h:16:51: error: negative width in bit-field '' 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ Get rid of BUILD_BUG_ON_ZERO()'s bitfield size hack. Instead rely on __BUILD_BUG_ON_ZERO_MSG() which in turn relies on C11's _Static_assert(). Use some macro magic, similarly to static_assert(), to either use an optional error message provided by the user or, when omitted, to produce a default error message by stringifying the tested expression. With this, for example: BUILD_BUG_ON_ZERO(1 > 0) would now throw: ./include/linux/compiler.h:197:62: error: static assertion failed: "1 > 0 is true" 197 | define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^~~~~~~~~~~~~~ Finally, __BUILD_BUG_ON_ZERO_MSG() is already guarded by an: #ifdef __CHECKER__ So no need any more for that guard clause for BUILD_BUG_ON_ZERO(). Remove it. [1] commit d7a516c6eeae ("compiler.h: Fix undefined BUILD_BUG_ON_ZERO()") Link: https://git.kernel.org/torvalds/c/d7a516c6eeae Signed-off-by: Vincent Mailhol Link: https://git.kernel.org/next/linux-next/c/b88937277df Reviewed-by: Kees Cook Signed-off-by: Yury Norov commit e289b488256107425591d8e6a402de8fcf6d088c Author: Vincent Mailhol Date: Wed Mar 26 01:00:01 2025 +0900 test_bits: add tests for BIT_U*() Add some additional tests in lib/tests/test_bits.c to cover the expected results of the fixed type BIT_U*() macros. Signed-off-by: Vincent Mailhol Reviewed-by: Lucas De Marchi Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov commit 0405eef6c3bc7d3322f8ceb11a25ad2bea5559f9 Author: Lucas De Marchi Date: Wed Mar 26 01:00:00 2025 +0900 test_bits: add tests for GENMASK_U*() Add some additional tests in lib/tests/test_bits.c to cover the expected/non-expected values of the fixed-type GENMASK_U*() macros. Also check that the result value matches the expected type. Since those are known at build time, use static_assert() instead of normal kunit tests. Signed-off-by: Lucas De Marchi Signed-off-by: Vincent Mailhol Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov commit 4fd225f7adbce0cc9204e918758158fa8eb07b33 Author: Lucas De Marchi Date: Wed Mar 26 00:59:59 2025 +0900 drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*() Now that include/linux/bits.h implements fixed-width GENMASK_U*(), use them to implement the i915/xe specific macros. Converting each driver to use the generic macros are left for later, when/if other driver-specific macros are also generalized. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Signed-off-by: Vincent Mailhol Signed-off-by: Yury Norov commit 5b572e8a9f3dcd6e3ba80ec5b5ec85472c88cb4c Author: Lucas De Marchi Date: Wed Mar 26 00:59:58 2025 +0900 bits: introduce fixed-type BIT_U*() Implement fixed-type BIT_U*() to help drivers add stricter checks, like it was done for GENMASK_U*(). Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Co-developed-by: Vincent Mailhol Signed-off-by: Vincent Mailhol Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov commit 19408200c094858d952a90bf4977733dc89a4df5 Author: Vincent Mailhol Date: Wed Mar 26 00:59:57 2025 +0900 bits: introduce fixed-type GENMASK_U*() Add GENMASK_TYPE() which generalizes __GENMASK() to support different types, and implement fixed-types versions of GENMASK() based on it. The fixed-type version allows more strict checks to the min/max values accepted, which is useful for defining registers like implemented by i915 and xe drivers with their REG_GENMASK*() macros. The strict checks rely on shift-count-overflow compiler check to fail the build if a number outside of the range allowed is passed. Example: #define FOO_MASK GENMASK_U32(33, 4) will generate a warning like: include/linux/bits.h:51:27: error: right shift count >= width of type [-Werror=shift-count-overflow] 51 | type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h))))) | ^~ The result is casted to the corresponding fixed width type. For example, GENMASK_U8() returns an u8. Note that because of the C promotion rules, GENMASK_U8() and GENMASK_U16() will immediately be promoted to int if used in an expression. Regardless, the main goal is not to get the correct type, but rather to enforce more checks at compile time. While GENMASK_TYPE() is crafted to cover all variants, including the already existing GENMASK(), GENMASK_ULL() and GENMASK_U128(), for the moment, only use it for the newly introduced GENMASK_U*(). The consolidation will be done in a separate change. Co-developed-by: Yury Norov Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Signed-off-by: Vincent Mailhol Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov commit 31299a5e0211241171b2222c5633aad4763bf700 Author: Vincent Mailhol Date: Wed Mar 26 00:59:56 2025 +0900 bits: add comments and newlines to #if, #else and #endif directives This is a preparation for the upcoming GENMASK_U*() and BIT_U*() changes. After introducing those new macros, there will be a lot of scrolling between the #if, #else and #endif. Add a comment to the #else and #endif preprocessor macros to help keep track of which context we are in. Also, add new lines to better visually separate the non-asm and asm sections. Signed-off-by: Vincent Mailhol Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov commit 791a9b25ce2e6ecbe404ee32eed8a96a17e52896 Author: Yury Norov Date: Wed Mar 12 22:19:52 2025 -0400 cpumask: drop cpumask_assign_cpu() Commit decde1fa209323c7 ("cpumask: Add assign cpu") was merged bypassing cpumasks reviewers. It adds atomic and non-atomic cpumask_assign_cpu() helpers. In the same merge window, commit 5c563ee90a22d3 ("cpumask: introduce assign_cpu() macro") added the same functionality. So now we have it duplicated. __cpumask_assign_cpu() has never been used since introducing, and because this series reworks the only user of cpumask_assign_cpu(), both functions become a dead code. Signed-off-by: Yury Norov [NVIDIA] commit e5bf9a4b68fae70e41d1410656490d8ac00c02fe Author: Yury Norov Date: Wed Mar 12 22:19:51 2025 -0400 riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu() The atomic cpumask_assign_cpu() follows non-atomic cpumask_setall(), which makes the whole operation non-atomic. Fix this by relaxing to non-atomic __assign_cpu(). Fixes: 7c1e5b9690b0e14 ("riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF") Signed-off-by: Yury Norov [NVIDIA] commit 4923c2c5b66fe8dea1df5e16d61f15c1dbea5ba1 Author: Yury Norov Date: Wed Mar 12 22:19:50 2025 -0400 cpumask: add non-atomic __assign_cpu() Similarly to atomic, add a non-atomic version. Signed-off-by: Yury Norov [NVIDIA] commit 74a2bd0bfb0675cb8f276f2fe3ede0c7f9e78fa3 Author: Yury Norov Date: Wed Mar 12 22:19:49 2025 -0400 nodemask: drop nodes_shift nodes_shift_{left,right} are not used. Drop them. Signed-off-by: Yury Norov [NVIDIA] commit 591683d3944c07236c80cca2a0702ba9250ee1fa Author: Steven Chen Date: Mon Apr 21 15:25:15 2025 -0700 ima: measure kexec load and exec events as critical data The amount of memory allocated at kexec load, even with the extra memory allocated, might not be large enough for the entire measurement list. The indeterminate interval between kexec 'load' and 'execute' could exacerbate this problem. Define two new IMA events, 'kexec_load' and 'kexec_execute', to be measured as critical data at kexec 'load' and 'execute' respectively. Report the allocated kexec segment size, IMA binary log size and the runtime measurements count as part of those events. These events, and the values reported through them, serve as markers in the IMA log to verify the IMA events are captured during kexec soft reboot. The presence of a 'kexec_load' event in between the last two 'boot_aggregate' events in the IMA log implies this is a kexec soft reboot, and not a cold-boot. And the absence of 'kexec_execute' event after kexec soft reboot implies missing events in that window which results in inconsistency with TPM PCR quotes, necessitating a cold boot for a successful remote attestation. These critical data events are displayed as hex encoded ascii in the ascii_runtime_measurement_list. Verifying the critical data hash requires calculating the hash of the decoded ascii string. For example, to verify the 'kexec_load' data hash: sudo cat /sys/kernel/security/integrity/ima/ascii_runtime_measurements | grep kexec_load | cut -d' ' -f 6 | xxd -r -p | sha256sum To verify the 'kexec_execute' data hash: sudo cat /sys/kernel/security/integrity/ima/ascii_runtime_measurements | grep kexec_execute | cut -d' ' -f 6 | xxd -r -p | sha256sum Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit 0ad93987c9c10a3125a58da0f225241169f3271a Author: Steven Chen Date: Mon Apr 21 15:25:14 2025 -0700 ima: make the kexec extra memory configurable The extra memory allocated for carrying the IMA measurement list across kexec is hard-coded as half a PAGE. Make it configurable. Define a Kconfig option, IMA_KEXEC_EXTRA_MEMORY_KB, to configure the extra memory (in kb) to be allocated for IMA measurements added during kexec soft reboot. Ensure the default value of the option is set such that extra half a page of memory for additional measurements is allocated for the additional measurements. Update ima_add_kexec_buffer() function to allocate memory based on the Kconfig option value, rather than the currently hard-coded one. Suggested-by: Stefan Berger Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit d0a00ce470e3ea19ba3b9f1c390aee739570a44a Author: Steven Chen Date: Mon Apr 21 15:25:13 2025 -0700 ima: verify if the segment size has changed kexec 'load' may be called multiple times. Free and realloc the buffer only if the segment_size is changed from the previous kexec 'load' call. Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit 9f0ec4b16f2b41d663f688a8012e9e52b2657eba Author: Steven Chen Date: Mon Apr 21 15:25:12 2025 -0700 ima: kexec: move IMA log copy from kexec load to execute The IMA log is currently copied to the new kernel during kexec 'load' using ima_dump_measurement_list(). However, the IMA measurement list copied at kexec 'load' may result in loss of IMA measurements records that only occurred after the kexec 'load'. Move the IMA measurement list log copy from kexec 'load' to 'execute' Make the kexec_segment_size variable a local static variable within the file, so it can be accessed during both kexec 'load' and 'execute'. Define kexec_post_load() as a wrapper for calling ima_kexec_post_load() and machine_kexec_post_load(). Replace the existing direct call to machine_kexec_post_load() with kexec_post_load(). When there is insufficient memory to copy all the measurement logs, copy as much of the measurement list as possible. Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Cc: Eric Biederman Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Steven Chen Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit f18e502db673c75f762d47101dafcf58f30e2733 Author: Steven Chen Date: Mon Apr 21 15:25:11 2025 -0700 ima: kexec: define functions to copy IMA log at soft boot The IMA log is currently copied to the new kernel during kexec 'load' using ima_dump_measurement_list(). However, the log copied at kexec 'load' may result in loss of IMA measurements that only occurred after kexec "load'. Setup the needed infrastructure to move the IMA log copy from kexec 'load' to 'execute'. Define a new IMA hook ima_update_kexec_buffer() as a stub function. It will be used to call ima_dump_measurement_list() during kexec 'execute'. Implement ima_kexec_post_load() function to be invoked after the new Kernel image has been loaded for kexec. ima_kexec_post_load() maps the IMA buffer to a segment in the newly loaded Kernel. It also registers the reboot notifier_block to trigger ima_update_kexec_buffer() at kexec 'execute'. Set the priority of register_reboot_notifier to INT_MIN to ensure that the IMA log copy operation will happen at the end of the operation chain, so that all the IMA measurement records extended into the TPM are copied Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Cc: Eric Biederman Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit 9ee8888a80fe2bd20ce929ffbc1dedd57607a778 Author: Steven Chen Date: Mon Apr 21 15:25:10 2025 -0700 ima: kexec: skip IMA segment validation after kexec soft reboot Currently, the function kexec_calculate_store_digests() calculates and stores the digest of the segment during the kexec_file_load syscall, where the IMA segment is also allocated. Later, the IMA segment will be updated with the measurement log at the kexec execute stage when a kexec reboot is initiated. Therefore, the digests should be updated for the IMA segment in the normal case. The problem is that the content of memory segments carried over to the new kernel during the kexec systemcall can be changed at kexec 'execute' stage, but the size and the location of the memory segments cannot be changed at kexec 'execute' stage. To address this, skip the calculation and storage of the digest for the IMA segment in kexec_calculate_store_digests() so that it is not added to the purgatory_sha_regions. With this change, the IMA segment is not included in the digest calculation, storage, and verification. Cc: Eric Biederman Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Young Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm [zohar@linux.ibm.com: Fixed Signed-off-by tag to match author's email ] Signed-off-by: Mimi Zohar commit 0091d9241ea24c5275be4a3e5a032862fd9de9ec Author: Steven Chen Date: Mon Apr 21 15:25:09 2025 -0700 kexec: define functions to map and unmap segments Implement kimage_map_segment() to enable IMA to map the measurement log list to the kimage structure during the kexec 'load' stage. This function gathers the source pages within the specified address range, and maps them to a contiguous virtual address range. This is a preparation for later usage. Implement kimage_unmap_segment() for unmapping segments using vunmap(). Cc: Eric Biederman Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Young Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Signed-off-by: Steven Chen Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit c95e1acb6d7f00efab73e41b31e0560751e3f469 Author: Steven Chen Date: Mon Apr 21 15:25:08 2025 -0700 ima: define and call ima_alloc_kexec_file_buf() In the current implementation, the ima_dump_measurement_list() API is called during the kexec "load" phase, where a buffer is allocated and the measurement records are copied. Due to this, new events added after kexec load but before kexec execute are not carried over to the new kernel during kexec operation Carrying the IMA measurement list across kexec requires allocating a buffer and copying the measurement records. Separate allocating the buffer and copying the measurement records into separate functions in order to allocate the buffer at kexec 'load' and copy the measurements at kexec 'execute'. After moving the vfree() here at this stage in the patch set, the IMA measurement list fails to verify when doing two consecutive "kexec -s -l" with/without a "kexec -s -u" in between. Only after "ima: kexec: move IMA log copy from kexec load to execute" the IMA measurement list verifies properly with the vfree() here. Co-developed-by: Tushar Sugandhi Signed-off-by: Tushar Sugandhi Signed-off-by: Steven Chen Reviewed-by: Stefan Berger Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit cb5052282c65dc998d12e4eea8d5133249826c13 Author: Steven Chen Date: Mon Apr 21 15:25:07 2025 -0700 ima: rename variable the seq_file "file" to "ima_kexec_file" Before making the function local seq_file "file" variable file static global, rename it to "ima_kexec_file". Signed-off-by: Steven Chen Acked-by: Baoquan He Tested-by: Stefan Berger # ppc64/kvm Signed-off-by: Mimi Zohar commit 9d4b78df5dc58ba4506e12f1cc92d3bebf0caffa Author: Colin Ian King Date: Wed Mar 27 11:06:49 2024 +0000 selftests/perf_events: Fix spelling mistake "sycnhronize" -> "synchronize" There is a spelling mistake in an error message. Fix it. Link: https://lore.kernel.org/r/20240327110649.283925-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Acked-by: Kyle Huey Signed-off-by: Shuah Khan commit c2493384e8110d5a4792fff4b9d46e47b78ea10a Author: Kees Cook Date: Fri Apr 25 23:24:34 2025 -0700 kunit: executor: Remove const from kunit_filter_suites() allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct kunit_suite **" but the returned type will be "struct kunit_suite * const *". Since it isn't generally possible to remove the const qualifier, adjust the allocation type to match the assignment. Link: https://lore.kernel.org/r/20250426062433.work.124-kees@kernel.org Signed-off-by: Kees Cook Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 9ba7f37e5b39654e657df83c266c24ee7bbc2296 Author: Tejun Heo Date: Tue Apr 29 08:40:11 2025 -1000 sched_ext: Clean up SCX_EXIT_NONE handling in scx_disable_workfn() With the global states and disable machinery moved into scx_sched, scx_disable_workfn() can only be scheduled and run for the specific scheduler instance. This makes it impossible for scx_disable_workfn() to see SCX_EXIT_NONE. Turn that condition into WARN_ON_ONCE(). Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit bff3b5aec1b727b620adc7c47085592802390125 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Move disable machinery into scx_sched Because disable can be triggered from any place and the scheduler cannot be trusted, disable path uses an irq_work to bounce and a kthread_work which is executed on an RT helper kthread to perform disable. These must be per scheduler instance to guarantee forward progress. Move them into scx_sched. - If an scx_sched is accessible, its helper kthread is always valid making the `helper` check in schedule_scx_disable_work() unnecessary. As the function becomes trivial after the removal of the test, inline it. - scx_create_rt_helper() has only one user - creation of the disable helper kthread. Inline it into scx_alloc_and_add_sched(). Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit c201ea1578d3b9eed29494ba3dc2abbccf62c4c8 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Move event_stats_cpu into scx_sched The event counters are going to become per scheduler instance. Move event_stats_cpu into scx_sched. - [__]scx_add_event() are updated to take @sch. While at it, add missing parentheses around @cnt expansions. - scx_read_events() is updated to take @sch. - scx_bpf_events() accesses scx_root under RCU read lock. v2: - Replace stale scx_bpf_get_event_stat() reference in a comment with scx_bpf_events(). - Trivial goto label rename. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit 3a8facc42415a35a514037656815dbe63e2de33e Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Factor out scx_read_events() In prepration of moving event_stats_cpu into scx_sched, factor out scx_read_events() out of scx_bpf_events() and update the in-kernel users - scx_attr_events_show() and scx_dump_state() - to use scx_read_events() instead of scx_bpf_events(). No observable behavior changes. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit f97a79156a7aaad9275e9a227293a4f43bdd8f88 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Relocate scx_event_stats definition In prepration of moving event_stats_cpu into scx_sched, move scx_event_stats definitions above scx_sched definition. No functional changes. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit 8409b800a0b1f143be4eba38ad67d4c1d403519e Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Move global_dsqs into scx_sched Global DSQs are going to become per scheduler instance. Move global_dsqs into scx_sched. find_global_dsq() already takes a task_struct pointer as an argument and should later be able to determine the scx_sched to use from that. For now, assume scx_root. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit cdf5a6faa8cf0ef62ec238a18b898ca9827bc472 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Move dsq_hash into scx_sched User DSQs are going to become per scheduler instance. Move dsq_hash into scx_sched. This shifts the code that assumes scx_root to be the only scx_sched instance up the call stack but doesn't remove them yet. v2: Add missing rcu_read_lock() in scx_bpf_destroy_dsq() as per Andrea. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit d9f754631021802b3bd3f58781b4c8ff3677b3a8 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Factor out scx_alloc_and_add_sched() More will be moved into scx_sched. Factor out the allocation and kobject addition path into scx_alloc_and_add_sched(). Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit 392b7e08deb6c1eec2732f6f106c6fb7252d3293 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Inline create_dsq() into scx_bpf_create_dsq() create_dsq() is only used by scx_bpf_create_dsq() and the separation gets in the way of making dsq_hash per scx_sched. Inline it into scx_bpf_create_dsq(). While at it, add unlikely() around SCX_DSQ_FLAG_BUILTIN test. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit 17108735b47d125b7649c9b6d4be94cdffc863b9 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Use dynamic allocation for scx_sched To prepare for supporting multiple schedulers, make scx_sched allocated dynamically. scx_sched->kobj is now an embedded field and the kobj's lifetime determines the lifetime of the containing scx_sched. - Enable path is updated so that kobj init and addition are performed later. - scx_sched freeing is initiated in scx_kobj_release() and also goes through an rcu_work so that scx_root can be accessed from an unsynchronized path - scx_disable(). - sched_ext_ops->priv is added and used to point to scx_sched instance created for the ops instance. This is used by bpf_scx_unreg() to determine the scx_sched instance to disable and put. No behavior changes intended. v2: Andrea reported kernel oops due to scx_bpf_unreg() trying to deref NULL scx_root after scheduler init failure. sched_ext_ops->priv added so that scx_bpf_unreg() can always find the scx_sched instance to unregister even if it failed early during init. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit a77d10d032f511b027d80ef0640309a73e2561fa Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Avoid NULL scx_root deref through SCX_HAS_OP() SCX_HAS_OP() tests scx_root->has_op bitmap. The bitmap is currently in a statically allocated struct scx_sched and initialized while loading the BPF scheduler and cleared while unloading, and thus can be tested anytime. However, scx_root will be switched to dynamic allocation and thus won't always be deferenceable. Most usages of SCX_HAS_OP() are already protected by scx_enabled() either directly or indirectly (e.g. through a task which is on SCX). However, there are a couple places that could try to dereference NULL scx_root. Update them so that scx_root is guaranteed to be valid before SCX_HAS_OP() is called. - In handle_hotplug(), test whether scx_root is NULL before doing anything else. This is safe because scx_root updates will be protected by cpus_read_lock(). - In scx_tg_offline(), test scx_cgroup_enabled before invoking SCX_HAS_OP(), which should guarnatee that scx_root won't turn NULL. This is also in line with other cgroup operations. As the code path is synchronized against scx_cgroup_init/exit() through scx_cgroup_rwsem, this shouldn't cause any behavior differences. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit 48e12677738663c6ac7be6abe7b216ec74a5b6e6 Author: Tejun Heo Date: Tue Apr 29 08:40:10 2025 -1000 sched_ext: Introduce scx_sched To support multiple scheduler instances, collect some of the global variables that should be specific to a scheduler instance into the new struct scx_sched. scx_root is the root scheduler instance and points to a static instance of struct scx_sched. Except for an extra dereference through the scx_root pointer, this patch makes no functional changes. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Acked-by: Changwoo Min commit eed848871c96d4b5a7b06307755b75abd0cc7a06 Author: David Howells Date: Mon Apr 28 11:22:06 2025 +0100 crypto/krb5: Fix change to use SG miter to use offset The recent patch to make the rfc3961 simplified code use sg_miter rather than manually walking the scatterlist to hash the contents of a buffer described by that scatterlist failed to take the starting offset into account. This is indicated by the selftests reporting: krb5: Running aes128-cts-hmac-sha256-128 mic krb5: !!! TESTFAIL crypto/krb5/selftest.c:446 krb5: MIC mismatch Fix this by calling sg_miter_skip() before doing the loop to advance by the offset. This only affects packet signing modes and not full encryption in RxGK because, for full encryption, the message digest is handled inside the authenc and krb5enc drivers. Note: Nothing in linus/master uses the krb5lib, though the bug is there. It is used by AF_RXRPC's RxGK implementation in -next, no need to backport. Fixes: da6f9bf40ac2 ("crypto: krb5 - Use SG miter instead of doing it by hand") Reported-by: Marc Dionne Signed-off-by: David Howells cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Acked-by: Herbert Xu Link: https://patch.msgid.link/3824017.1745835726@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 2b06aa2bcfb4eee0c5dc882ff8936913b1e6d44f Author: Alexander Duyck Date: Sun Apr 27 12:59:49 2025 -0700 net: phylink: Drop unused defines for SUPPORTED/ADVERTISED_INTERFACES The defines for SUPPORTED_INTERFACES and ADVERTISED_INTERFACES both appear to be unused. I couldn't find anything that actually references them in the original diff that added them and it seems like they have persisted despite using deprecated defines that aren't supposed to be used as per the ethtool.h header that defines the bits they are composed of. Since they are unused, and not supposed to be used anymore I am just dropping the lines of code since they seem to just be occupying space. Signed-off-by: Alexander Duyck Reviewed-by: Russell King (Oracle) Link: https://patch.msgid.link/174578398922.1580647.9720643128205980455.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit ce565f839c9e1c0952588f2b17ed4b02650f94b0 Merge: 069ac9e161eb9d e38be1c7647c8c Author: Tejun Heo Date: Tue Apr 29 08:24:58 2025 -1000 Merge branch 'for-6.15-fixes' into for-6.16 To receive e38be1c7647c ("sched_ext: Fix rq lock state in hotplug ops") to avoid conflicts with scx_sched related patches pending for for-6.16. commit f64cf7b681af72d3f715c0d0fd72091a54471c1a Author: Dafna Hirschfeld Date: Sun Apr 27 19:47:52 2025 -0700 drm/gpusvm: set has_dma_mapping inside mapping loop The 'has_dma_mapping' flag should be set once there is a mapping so it could be unmapped in case of error. v2: - Resend for CI Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory") Signed-off-by: Dafna Hirschfeld Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250428024752.881292-1-matthew.brost@intel.com commit 090ef84e082dca099b4d54196e2099bce41e0c87 Merge: 5fe6530cd54b86 6fbb4d3f726277 Author: Jakub Kicinski Date: Tue Apr 29 11:09:54 2025 -0700 Merge branch 'io_uring-zcrx-selftests-more-cleanups' David Wei says: ==================== io_uring/zcrx: selftests: more cleanups Patch 1 use rand_port() instead of hard coding port 9999. Patch 2 parses JSON from ethtool -g instead of string. ==================== Link: https://patch.msgid.link/20250426195525.1906774-1-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 6fbb4d3f7262771c376d1176e04811645d3c0c7b Author: David Wei Date: Sat Apr 26 12:55:25 2025 -0700 io_uring/zcrx: selftests: parse json from ethtool -g Parse JSON from ethtool -g instead of parsing text output. Signed-off-by: David Wei Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250426195525.1906774-3-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 187e0216366f3573c894514cf41267df843efd49 Author: David Wei Date: Sat Apr 26 12:55:24 2025 -0700 io_uring/zcrx: selftests: use rand_port() Use rand_port() and stop hard coding port 9999. Signed-off-by: David Wei Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250426195525.1906774-2-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 5fe6530cd54b8647e71ff450f54f16b7f4c68066 Author: Kees Cook Date: Fri Apr 25 23:18:59 2025 -0700 ptp: ocp: Add const to bp->attr_group allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "const struct attribute_group **", but the returned type, while technically matching, will be not const qualified. As there is no general way to safely add const qualifiers, adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250426061858.work.470-kees@kernel.org Signed-off-by: Jakub Kicinski commit c636eed60958875e6499043bcb32f69abf24314c Author: Kees Cook Date: Fri Apr 25 23:08:42 2025 -0700 nfp: xsk: Adjust allocation type for nn->dp.xsk_pools In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type "struct xsk_buff_pool **", but the returned type will be "struct xsk_buff_pool ***". These are the same allocation size (pointer size), but the types don't match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250426060841.work.016-kees@kernel.org Signed-off-by: Jakub Kicinski commit 01cbf838c775a2096b8b0704b499012d867332bb Author: Kees Cook Date: Fri Apr 25 23:07:58 2025 -0700 net/mlx4_core: Adjust allocation type for buddy->bits In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "unsigned long **", but the returned type will be "long **". These are the same size allocation (pointer size) but the types do not match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Reviewed-by: Simon Horman Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250426060757.work.865-kees@kernel.org Signed-off-by: Jakub Kicinski commit 2eea791a75542651c97c3ca8d34d5a594867094a Author: Kees Cook Date: Fri Apr 25 23:07:13 2025 -0700 pds_core: Allocate pdsc_viftype_defaults copy with ARRAY_SIZE() In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) This is allocating a copy of pdsc_viftype_defaults, which is an array of struct pdsc_viftype. To correctly return "struct pdsc_viftype *" in the future, adjust the allocation to allocating ARRAY_SIZE-many entries. The resulting allocation size is the same. Signed-off-by: Kees Cook Reviewed-by: Shannon Nelson Link: https://patch.msgid.link/20250426060712.work.575-kees@kernel.org Signed-off-by: Jakub Kicinski commit 13e3a882bc85d22861b87bfd140d11989fbe3f83 Author: Dmitry Baryshkov Date: Fri Apr 25 20:47:06 2025 +0300 dt-bindings: arm: arm,coresight-static-replicator: add optional clocks As most other CoreSight devices the replicator can use either of the optional clocks. Document those optional clocks in the schema. Additionally document the one-off case of Zynq-7000 platforms which uses apb_pclk and two additional debug clocks. Fixes: 3c15fddf3121 ("dt-bindings: arm: Convert CoreSight bindings to DT schema") Reviewed-by: Rob Herring (Arm) Signed-off-by: Dmitry Baryshkov Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250425-fix-nexus-4-v3-6-da4e39e86d41@oss.qualcomm.com commit 9f52aecc952ddf307571517d5c91136c8c4e87c9 Author: Junhao He Date: Wed Sep 18 11:53:27 2024 +0800 coresight: Fixes device's owner field for registered using coresight_init_driver() The coresight_init_driver() of the coresight-core module is called from the sub coresgiht device (such as tmc/stm/funnle/...) module. It calls amba_driver_register() and Platform_driver_register(), which are macro functions that use the coresight-core's module to initialize the caller's owner field. Therefore, when the sub coresight device calls coresight_init_driver(), an incorrect THIS_MODULE value is captured. The sub coesgiht modules can be removed while their callbacks are running, resulting in a general protection failure. Add module parameter to coresight_init_driver() so can be called with the module of the callback. Fixes: 075b7cd7ad7d ("coresight: Add helpers registering/removing both AMBA and platform drivers") Signed-off-by: Junhao He Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240918035327.9710-1-hejunhao3@huawei.com commit fca6170f5a039543fa5f390f1895fde503b80f46 Author: Kees Cook Date: Fri Apr 25 23:05:30 2025 -0700 ipv4: fib: Fix fib_info_hash_alloc() allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) This was allocating many sizeof(struct hlist_head *) when it actually wanted sizeof(struct hlist_head). Luckily these are the same size. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Reviewed-by: Simon Horman Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250426060529.work.873-kees@kernel.org Signed-off-by: Jakub Kicinski commit 8e64c387c942229c551d0f23de4d9993d3a2acb6 Author: Alan Maguire Date: Tue Apr 29 17:10:42 2025 +0100 libbpf: Add identical pointer detection to btf_dedup_is_equiv() Recently as a side-effect of commit ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro") issues were observed in deduplication between modules and kernel BTF such that a large number of kernel types were not deduplicated so were found in module BTF (task_struct, bpf_prog etc). The root cause appeared to be a failure to dedup struct types, specifically those with members that were pointers with __percpu annotations. The issue in dedup is at the point that we are deduplicating structures, we have not yet deduplicated reference types like pointers. If multiple copies of a pointer point at the same (deduplicated) integer as in this case, we do not see them as identical. Special handling already exists to deal with structures and arrays, so add pointer handling here too. Reported-by: Alexei Starovoitov Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250429161042.2069678-1-alan.maguire@oracle.com commit d43ba2dc8eeeca21811fd9b30e3bd15bb35caaec Author: David Kaplan Date: Fri Apr 18 11:17:20 2025 -0500 x86/bugs: Restructure L1TF mitigation Restructure L1TF to use select/apply functions to create consistent vulnerability handling. Define new AUTO mitigation for L1TF. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-16-david.kaplan@amd.com commit 5ece59a2fca6e1467558467a05cf742b7e52d1b7 Author: David Kaplan Date: Fri Apr 18 11:17:19 2025 -0500 x86/bugs: Restructure SSB mitigation Restructure SSB to use select/apply functions to create consistent vulnerability handling. Remove __ssb_select_mitigation() and split the functionality between the select/apply functions. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-15-david.kaplan@amd.com commit 480e803dacf8be92b1104ca65f2be4cb0e191375 Author: David Kaplan Date: Fri Apr 18 11:17:18 2025 -0500 x86/bugs: Restructure spectre_v2 mitigation Restructure spectre_v2 to use select/update/apply functions to create consistent vulnerability handling. The spectre_v2 mitigation may be updated based on the selected retbleed mitigation. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-14-david.kaplan@amd.com commit efe313827c98c81156dea9b004877db4ca728b1a Author: David Kaplan Date: Fri Apr 18 11:17:17 2025 -0500 x86/bugs: Restructure BHI mitigation Restructure BHI mitigation to use select/update/apply functions to create consistent vulnerability handling. BHI mitigation was previously selected from within spectre_v2_select_mitigation() and now is selected from cpu_select_mitigation() like with all others. Define new AUTO mitigation for BHI. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-13-david.kaplan@amd.com commit ddfca9430a617780c8ad9691bf44660ae49e2a35 Author: David Kaplan Date: Fri Apr 18 11:17:16 2025 -0500 x86/bugs: Restructure spectre_v2_user mitigation Restructure spectre_v2_user to use select/update/apply functions to create consistent vulnerability handling. The IBPB/STIBP choices are first decided based on the spectre_v2_user command line but can be modified by the spectre_v2 command line option as well. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-12-david.kaplan@amd.com commit 0d607a59a0f6593e72630854a8bcb8b01b8dce40 Author: Zhengqiao Xia Date: Tue Apr 29 17:20:30 2025 +0800 drm/panel-edp: Add support for CSW MNE007QS3-8 panel CSW MNE007QS3-8 EDID: edid-decode (hex): 00 ff ff ff ff ff ff 00 0e 77 57 14 00 00 00 00 34 22 01 04 a5 1e 13 78 07 ee 95 a3 54 4c 99 26 0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 cd 7c 80 a0 70 b0 50 40 30 20 26 04 2e bc 10 00 00 1a cd 7c 80 a0 70 b0 50 45 30 20 26 04 2e bc 10 00 00 1a 00 00 00 fd 00 1e 78 9a 9a 20 01 0a 20 20 20 20 20 20 00 00 00 fc 00 4d 4e 45 30 30 37 51 53 33 2d 38 0a 20 01 3f 70 20 79 02 00 21 00 1d c8 0b 5d 07 80 07 b0 04 80 3d 8a 54 cd a4 99 66 62 0f 02 45 54 7c 5d 7c 5d 00 43 12 78 2b 00 0c 27 00 1e 77 00 00 27 00 1e 3b 00 00 2e 00 06 00 43 7c 5d 7c 5d 81 00 20 74 1a 00 00 03 01 1e 78 00 00 5a ff 5a ff 78 00 00 00 00 8d 00 e3 05 04 00 e6 06 01 01 5a 5a ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 76 90 Signed-off-by: Zhengqiao Xia Reviewed-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250429092030.8025-4-xiazhengqiao@huaqin.corp-partner.google.com commit 800c2180705a87829f7833df3d9e73b548bf65ff Author: Zhengqiao Xia Date: Tue Apr 29 17:20:29 2025 +0800 drm/panel-edp: Add support for BOE NE140WUM-N6S panel BOE NE140WUM-N6S EDID: edid-decode (hex): 00 ff ff ff ff ff ff 00 09 e5 73 0d 00 00 00 00 32 22 01 04 a5 1e 13 78 07 13 45 a6 54 4d a0 27 0c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 03 3e 80 a0 70 b0 48 40 30 20 36 00 2e bc 10 00 00 1a 00 00 00 fd 00 1e 78 99 99 20 01 0a 20 20 20 20 20 20 00 00 00 fc 00 4e 45 31 34 30 57 55 4d 2d 4e 36 53 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 45 70 20 79 02 00 22 00 14 33 d8 04 85 7f 07 9f 00 2f 00 1f 00 af 04 47 00 02 00 05 00 81 00 13 72 1a 00 00 03 01 1e 78 00 00 5a 4a 5a 4a 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ad 90 Signed-off-by: Zhengqiao Xia Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250429092030.8025-3-xiazhengqiao@huaqin.corp-partner.google.com commit 5f8f898b14b2401e980b1f206b827d985e040ebe Author: Zhengqiao Xia Date: Tue Apr 29 17:20:28 2025 +0800 drm/panel-edp: Add support for AUO B140QAN08.H panel AUO B140QAN08.H EDID: edid-decode (hex): 00 ff ff ff ff ff ff 00 06 af b9 fe 00 00 00 00 00 23 01 04 a5 1e 13 78 03 c1 45 a8 55 48 9d 24 0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 18 86 40 a0 b0 08 52 70 30 20 65 00 2d bc 10 00 00 18 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 fd 00 28 3c 71 71 22 01 0a 20 20 20 20 20 20 00 00 00 fc 00 42 31 34 30 51 41 4e 30 38 2e 48 20 0a 01 79 70 20 79 02 00 21 01 1d c2 0b 58 07 40 0b 08 07 88 8b fa 54 7e 24 9d 45 12 0f 02 35 54 40 5e 40 5e 00 44 12 78 22 00 14 ef 3c 05 85 3f 0b 9f 00 2f 80 1f 00 07 07 51 00 05 00 04 00 25 01 09 ef 3c 05 ef 3c 05 28 3c 80 2e 00 06 00 44 40 5e 40 5e 81 00 15 74 1a 00 00 03 00 28 3c 00 00 60 ff 60 ff 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f 90 Signed-off-by: Zhengqiao Xia Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250429092030.8025-2-xiazhengqiao@huaqin.corp-partner.google.com commit c1a32a041aecffe41bf7a1d1696d90617528f082 Author: Adrián Larumbe Date: Thu Apr 24 19:40:34 2025 +0100 drm/panthor: Fix build warning when DEBUG_FS is disabled Commit a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS") causes a build warning and linking error when built without support for DebugFS, because of a non-inline non-static function declaration in a header file. On top of that, the function is only being used inside a single compilation unit, so there is no point in exposing it as a global symbol. This is a follow-up from Arnd Bergmann's first fix. Also move panthor_gem_debugfs_set_usage_flags() into panthor_gem.c and declare it static. Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS") Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/dri-devel/20250424142419.47b9d457@collabora.com/T/#t Signed-off-by: Adrián Larumbe Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Link: https://lore.kernel.org/r/20250424184041.356191-1-adrian.larumbe@collabora.com Signed-off-by: Boris Brezillon commit 54a1a24fea1997861622320eada7de65e0ceb614 Author: Sean Christopherson Date: Tue Apr 29 08:37:19 2025 -0700 KVM: x86: Unify cross-vCPU IBPB Both SVM and VMX have similar implementation for executing an IBPB between running different vCPUs on the same CPU to create separate prediction domains for different vCPUs. For VMX, when the currently loaded VMCS is changed in vmx_vcpu_load_vmcs(), an IBPB is executed if there is no 'buddy', which is the case on vCPU load. The intention is to execute an IBPB when switching vCPUs, but not when switching the VMCS within the same vCPU. Executing an IBPB on nested transitions within the same vCPU is handled separately and conditionally in nested_vmx_vmexit(). For SVM, the current VMCB is tracked on vCPU load and an IBPB is executed when it is changed. The intention is also to execute an IBPB when switching vCPUs, although it is possible that in some cases an IBBP is executed when switching VMCBs for the same vCPU. Executing an IBPB on nested transitions should be handled separately, and is proposed at [1]. Unify the logic by tracking the last loaded vCPU and execuintg the IBPB on vCPU change in kvm_arch_vcpu_load() instead. When a vCPU is destroyed, make sure all references to it are removed from any CPU. This is similar to how SVM clears the current_vmcb tracking on vCPU destruction. Remove the current VMCB tracking in SVM as it is no longer required, as well as the 'buddy' parameter to vmx_vcpu_load_vmcs(). [1] https://lore.kernel.org/lkml/20250221163352.3818347-4-yosry.ahmed@linux.dev Link: https://lore.kernel.org/all/20250320013759.3965869-1-yosry.ahmed@linux.dev Signed-off-by: Yosry Ahmed [sean: tweak comment to stay at/under 80 columns] Signed-off-by: Sean Christopherson commit 1bee4838eb3a2c689f23c7170ea66ae87ea7d93a Author: Yosry Ahmed Date: Tue Apr 29 08:32:15 2025 -0700 KVM: SVM: Clear current_vmcb during vCPU free for all *possible* CPUs When freeing a vCPU and thus its VMCB, clear current_vmcb for all possible CPUs, not just online CPUs, as it's theoretically possible a CPU could go offline and come back online in conjunction with KVM reusing the page for a new VMCB. Link: https://lore.kernel.org/all/20250320013759.3965869-1-yosry.ahmed@linux.dev Fixes: fd65d3142f73 ("kvm: svm: Ensure an IBPB on all affected CPUs when freeing a vmcb") Cc: stable@vger.kernel.org Cc: Jim Mattson Signed-off-by: Yosry Ahmed [sean: split to separate patch, write changelog] Signed-off-by: Sean Christopherson commit 92b664dcefab71f448f98a59530a6b731fc2df47 Author: Jakub Brnak Date: Mon Mar 24 15:45:23 2025 +0100 perf test probe_vfs_getname: Skip if no suitable line detected In some cases when calling function add_probe_vfs_getname, line number can't be detected by 'perf probe -L getname_flags': 78 atomic_set(&result->refcnt, 1); // one of the following lines should have line number // but sometimes it does not because of optimization result->uptr = filename; result->aname = NULL; 81 audit_getname(result); To prevent false failures, skip the affected tests if no suitable line numbers can be detected. Signed-off-by: Jakub Brnak Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Michael Petlan Cc: Peter Zijlstra Cc: Tomas Glozar Link: https://lore.kernel.org/r/20250324144523.597557-1-jbrnak@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit fcf8dda8cc4860076395d807d9b3f781ca1d8f4f Author: Dev Jain Date: Thu Apr 3 10:58:44 2025 +0530 arm64: pageattr: Explicitly bail out when changing permissions for vmalloc_huge mappings arm64 uses apply_to_page_range to change permissions for kernel vmalloc mappings, which does not support changing permissions for block mappings. This function will change permissions until it encounters a block mapping, and will bail out with a warning. Since there are no reports of this triggering, it implies that there are currently no cases of code doing a vmalloc_huge() followed by partial permission change. But this is a footgun waiting to go off, so let's detect it early and avoid the possibility of permissions in an intermediate state. So, explicitly disallow changing permissions for VM_ALLOW_HUGE_VMAP mappings. Reviewed-by: Ryan Roberts Reviewed-by: Mike Rapoport (Microsoft) Signed-off-by: Dev Jain Acked-by: David Hildenbrand Reviewed-by: Gavin Shan Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20250403052844.61818-1-dev.jain@arm.com Signed-off-by: Will Deacon commit 83a39eccdf2f26024ce7699aefb7e439221d88af Author: Bartosz Szczepanek Date: Wed Apr 23 08:48:51 2025 +0000 arm64: Extend pr_crit message on invalid FDT Log size in addition to physical and virtual addresses. It has potential to be helpful when DTB exceeds the 2 MB limit. Initialize size to 0 to print out sane value if fixmap_remap_fdt fails without setting the size. Signed-off-by: Bartosz Szczepanek Link: https://lore.kernel.org/r/20250423084851.26449-1-bsz@amazon.de Signed-off-by: Will Deacon commit 13f35928a4e6fe158f358c3d2f16c2319f1ace53 Author: Namhyung Kim Date: Mon Mar 31 23:30:55 2025 -0700 perf lock contention: Symbolize zone->lock using BTF The struct zone is embedded in struct pglist_data which can be allocated for each NUMA node early in the boot process. As it's not a slab object nor a global lock, this was not symbolized. Since the zone->lock is often contended, it'd be nice if we can symbolize it. On NUMA systems, node_data array will have pointers for struct pglist_data. By following the pointer, it can calculate the address of each zone and its lock using BTF. On UMA, it can just use contig_page_data and its zones. The following example shows the zone lock contention at the end. $ sudo ./perf lock con -abl -E 5 -- ./perf bench sched messaging # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.038 [sec] contended total wait max wait avg wait address symbol 5167 18.17 ms 10.27 us 3.52 us ffff953340052d00 &kmem_cache_node (spinlock) 38 11.75 ms 465.49 us 309.13 us ffff95334060c480 &sock_inode_cache (spinlock) 3916 10.13 ms 10.43 us 2.59 us ffff953342aecb40 &kmem_cache_node (spinlock) 2963 10.02 ms 13.75 us 3.38 us ffff9533d2344098 &kmalloc-rnd-08-2k (spinlock) 216 5.05 ms 99.49 us 23.39 us ffff9542bf7d65d0 zone_lock (spinlock) Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20250401063055.7431-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e2eaeba0522d332bef8e61b2b9f54a78cd2b6257 Author: Eric Biggers Date: Mon Apr 14 10:40:18 2025 -0700 arm64: Kconfig: remove unnecessary selection of CRC32 The selection of CRC32 by ARM64 was added by commit 7481cddf29ed ("arm64/lib: add accelerated crc32 routines") as a workaround for the fact that, at the time, the CRC32 library functions used weak symbols to allow architecture-specific overrides. That only worked when CRC32 was built-in, and thus ARM64 was made to just force CRC32 to built-in. Now that the CRC32 library no longer uses weak symbols, that no longer applies. And the selection does not fulfill a user dependency either; those all have their own selections from other options. Therefore, the selection of CRC32 by ARM64 is no longer necessary. Remove it. Note that this does not necessarily result in CRC32 no longer being set to y, as it still tends to get selected by something else anyway. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250414174018.6359-1-ebiggers@kernel.org Signed-off-by: Will Deacon commit 20125324c01d30f7ff36183a8f48ffebca9db584 Author: Jason Gunthorpe Date: Thu Apr 17 13:26:16 2025 -0300 arm64: Add missing includes for mem_encrypt Doing: #include Causes a bunch of compiler failures due to missing implicit includes that don't happen on x86: ../arch/arm64/include/asm/rsi_cmds.h:117:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | memcpy(®s.a1, challenge, size); ../arch/arm64/include/asm/mem_encrypt.h:19:49: warning: declaration of 'struct device' will not be visible outside of this function [-Wvisibility] 19 | static inline bool force_dma_unencrypted(struct device *dev) ../arch/arm64/include/asm/rsi_cmds.h:44:38: error: call to undeclared function 'virt_to_phys'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 44 | arm_smccc_smc(SMC_RSI_REALM_CONFIG, virt_to_phys(cfg), Add the missing includes to the arch/arm headers to avoid this. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-47aadfbd64cd+25795-arm_memenc_h_jgg@nvidia.com Signed-off-by: Will Deacon commit f101c56447717c595d803894ba0e215f56c6fba4 Author: Kornel Dulęba Date: Thu Apr 17 11:47:54 2025 +0000 arm64: Support ARM64_VA_BITS=52 when setting ARCH_MMAP_RND_BITS_MAX When the 52-bit virtual addressing was introduced the select like ARCH_MMAP_RND_BITS_MAX logic was never updated to account for it. Because of that the rnd max bits knob is set to the default value of 18 when ARM64_VA_BITS=52. Fix this by setting ARCH_MMAP_RND_BITS_MAX to the same value that would be used if 48-bit addressing was used. Higher values can't used here because 52-bit addressing is used only if the caller provides a hint to mmap, with a fallback to 48-bit. The knob in question is an upper bound for what the user can set in /proc/sys/vm/mmap_rnd_bits, which in turn is used to determine how many random bits can be inserted into the base address used for mmap allocations. Since 48-bit allocations are legal with ARM64_VA_BITS=52, we need to make sure that the base address is small enough to facilitate this. Fixes: b6d00d47e81a ("arm64: mm: Introduce 52-bit Kernel VAs") Signed-off-by: Kornel Dulęba Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20250417114754.3238273-1-korneld@google.com Signed-off-by: Will Deacon commit ff61a4a5dfc27535227c0b2ead05a1a1afce76ec Merge: 0d15a26b247d25 4d0dac499bf384 Author: Paolo Abeni Date: Tue Apr 29 16:22:26 2025 +0200 Merge branch 'ip-improve-tcp-sock-multipath-routing' Willem de Bruijn says: ==================== ip: improve tcp sock multipath routing From: Willem de Bruijn Improve layer 4 multipath hash policy for local tcp connections: patch 1: Select a source address that matches the nexthop device. Due to tcp_v4_connect making separate route lookups for saddr and route, the two can currently be inconsistent. patch 2: Use all paths when opening multiple local tcp connections to the same ip address and port. patch 3: Test the behavior. Extend the fib_tests.sh testsuite with one opening many connections, and count SYNs on both egress devices, for packets matching the source address of the dev. Changelog in the individual patches ==================== Link: https://patch.msgid.link/20250424143549.669426-1-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni commit 4d0dac499bf384fe3f42acc30906d304c3499dd8 Author: Willem de Bruijn Date: Thu Apr 24 10:35:20 2025 -0400 selftests/net: test tcp connection load balancing Verify that TCP connections use both routes when connecting multiple times to a remote service over a two nexthop multipath route. Use socat to create the connections. Use tc prio + tc filter to count routes taken, counting SYN packets across the two egress devices. Also verify that the saddr matches that of the device. To avoid flaky tests when testing inherently randomized behavior, set a low bar and pass if even a single SYN is observed on each device. Signed-off-by: Willem de Bruijn Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://patch.msgid.link/20250424143549.669426-4-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni commit 65e9024643c7512ade3aedbb341e11d77ed7abc2 Author: Willem de Bruijn Date: Thu Apr 24 10:35:19 2025 -0400 ip: load balance tcp connections to single dst addr and port Load balance new TCP connections across nexthops also when they connect to the same service at a single remote address and port. This affects only port-based multipath hashing: fib_multipath_hash_policy 1 or 3. Local connections must choose both a source address and port when connecting to a remote service, in ip_route_connect. This "chicken-and-egg problem" (commit 2d7192d6cbab ("ipv4: Sanitize and simplify ip_route_{connect,newports}()")) is resolved by first selecting a source address, by looking up a route using the zero wildcard source port and address. As a result multiple connections to the same destination address and port have no entropy in fib_multipath_hash. This is not a problem when forwarding, as skb-based hashing has a 4-tuple. Nor when establishing UDP connections, as autobind there selects a port before reaching ip_route_connect. Load balance also TCP, by using a random port in fib_multipath_hash. Port assignment in inet_hash_connect is not atomic with ip_route_connect. Thus ports are unpredictable, effectively random. Implementation details: Do not actually pass a random fl4_sport, as that affects not only hashing, but routing more broadly, and can match a source port based policy route, which existing wildcard port 0 will not. Instead, define a new wildcard flowi flag that is used only for hashing. Selecting a random source is equivalent to just selecting a random hash entirely. But for code clarity, follow the normal 4-tuple hash process and only update this field. fib_multipath_hash can be reached with zero sport from other code paths, so explicitly pass this flowi flag, rather than trying to infer this case in the function itself. Signed-off-by: Willem de Bruijn Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250424143549.669426-3-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni commit 32607a332cfea5a4b2a185f3e3d605a9bf4f8df0 Author: Willem de Bruijn Date: Thu Apr 24 10:35:18 2025 -0400 ipv4: prefer multipath nexthop that matches source address With multipath routes, try to ensure that packets leave on the device that is associated with the source address. Avoid the following tcpdump example: veth0 Out IP 10.1.0.2.38640 > 10.2.0.3.8000: Flags [S] veth1 Out IP 10.1.0.2.38648 > 10.2.0.3.8000: Flags [S] Which can happen easily with the most straightforward setup: ip addr add 10.0.0.1/24 dev veth0 ip addr add 10.1.0.1/24 dev veth1 ip route add 10.2.0.3 nexthop via 10.0.0.2 dev veth0 \ nexthop via 10.1.0.2 dev veth1 This is apparently considered WAI, based on the comment in ip_route_output_key_hash_rcu: * 2. Moreover, we are allowed to send packets with saddr * of another iface. --ANK It may be ok for some uses of multipath, but not all. For instance, when using two ISPs, a router may drop packets with unknown source. The behavior occurs because tcp_v4_connect makes three route lookups when establishing a connection: 1. ip_route_connect calls to select a source address, with saddr zero. 2. ip_route_connect calls again now that saddr and daddr are known. 3. ip_route_newports calls again after a source port is also chosen. With a route with multiple nexthops, each lookup may make a different choice depending on available entropy to fib_select_multipath. So it is possible for 1 to select the saddr from the first entry, but 3 to select the second entry. Leading to the above situation. Address this by preferring a match that matches the flowi4 saddr. This will make 2 and 3 make the same choice as 1. Continue to update the backup choice until a choice that matches saddr is found. Do this in fib_select_multipath itself, rather than passing an fl4_oif constraint, to avoid changing non-multipath route selection. Commit e6b45241c57a ("ipv4: reset flowi parameters on route connect") shows how that may cause regressions. Also read ipv4.sysctl_fib_multipath_use_neigh only once. No need to refresh in the loop. This does not happen in IPv6, which performs only one lookup. Signed-off-by: Willem de Bruijn Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250424143549.669426-2-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni commit 506f254e362b7a7045ed3ccba2a8f4bedb3fd3d6 Author: Imre Deak Date: Mon Apr 28 16:47:16 2025 +0300 drm/i915/hdmi: Use an intel_connector pointer everywhere Following the convention, convert intel_hdmi.c to use an intel_connector pointer everywhere, calling this pointer connector. If the intel connector must be casted from a drm_connector, call this pointer _connector and use this pointer only for the casting. v2: Use for_each_new_intel_connector_in_state(). (Jani) Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250428134716.3396802-3-imre.deak@intel.com commit bb633ff493bfc27505003dc8ac1e06e8c5d6e076 Author: Imre Deak Date: Mon Apr 28 16:47:15 2025 +0300 drm/i915/dp: Use an intel_connector pointer everywhere Following the convention, convert intel_dp.c to use an intel_connector pointer everywhere, calling this pointer connector. If the intel connector must be casted from a drm_connector, call this pointer _connector and use this pointer only for the casting. v2: Use for_each_intel_connector_iter(). (Jani) Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250428134716.3396802-2-imre.deak@intel.com commit 679185904972421c570a1c337a8266835045012d Author: FUJITA Tomonori Date: Thu Apr 24 04:28:56 2025 +0900 MAINTAINERS: rust: Add a new section for all of the time stuff Add a new section for all of the time stuff to MAINTAINERS file, with the existing hrtimer entry fold. Acked-by: John Stultz Reviewed-by: Boqun Feng Reviewed-by: Andreas Hindborg Signed-off-by: FUJITA Tomonori Link: https://lore.kernel.org/r/20250423192857.199712-7-fujita.tomonori@gmail.com [ Changed T: entry branch to `timekeeping-next` - Andreas ] Signed-off-by: Andreas Hindborg commit ddc671506458849c1a1c882208bbffed033e770c Author: FUJITA Tomonori Date: Thu Apr 24 04:28:54 2025 +0900 rust: time: Introduce Instant type Introduce a type representing a specific point in time. We could use the Ktime type but C's ktime_t is used for both timestamp and timedelta. To avoid confusion, introduce a new Instant type for timestamp. Rename Ktime to Instant and modify their methods for timestamp. Implement the subtraction operator for Instant: Delta = Instant A - Instant B Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Reviewed-by: Fiona Behrens Tested-by: Daniel Almeida Reviewed-by: Andreas Hindborg Signed-off-by: FUJITA Tomonori Link: https://lore.kernel.org/r/20250423192857.199712-5-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg commit fae0cdc12340ce402a4681dba0f357b05d167d00 Author: FUJITA Tomonori Date: Thu Apr 24 04:28:53 2025 +0900 rust: time: Introduce Delta type Introduce a type representing a span of time. Define our own type because `core::time::Duration` is large and could panic during creation. time::Ktime could be also used for time duration but timestamp and timedelta are different so better to use a new type. i64 is used instead of u64 to represent a span of time; some C drivers uses negative Deltas and i64 is more compatible with Ktime using i64 too (e.g., ktime_[us|ms]_delta() APIs return i64 so we create Delta object without type conversion. i64 is used instead of bindings::ktime_t because when the ktime_t type is used as timestamp, it represents values from 0 to KTIME_MAX, which is different from Delta. as_millis() method isn't used in this patchset. It's planned to be used in Binder driver. Reviewed-by: Andrew Lunn Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Fiona Behrens Tested-by: Daniel Almeida Reviewed-by: Andreas Hindborg Signed-off-by: FUJITA Tomonori Link: https://lore.kernel.org/r/20250423192857.199712-4-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg commit 3caad57d29b5f64fa41cff0b12cc5d9144dacb04 Author: FUJITA Tomonori Date: Thu Apr 24 04:28:52 2025 +0900 rust: time: Add PartialEq/Eq/PartialOrd/Ord trait to Ktime Add PartialEq/Eq/PartialOrd/Ord trait to Ktime so two Ktime instances can be compared to determine whether a timeout is met or not. Use the derive implements; we directly touch C's ktime_t rather than using the C's accessors because it is more efficient and we already do in the existing code (Ktime::sub). Reviewed-by: Trevor Gross Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Fiona Behrens Tested-by: Daniel Almeida Reviewed-by: Andreas Hindborg Signed-off-by: FUJITA Tomonori Link: https://lore.kernel.org/r/20250423192857.199712-3-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg commit 1116f0c5ff3385658ceb8ae2c5c4cb05bd7836d7 Author: FUJITA Tomonori Date: Thu Apr 24 04:28:51 2025 +0900 rust: hrtimer: Add Ktime temporarily Add Ktime temporarily until hrtimer is refactored to use Instant and Delta types. Reviewed-by: Andreas Hindborg Reviewed-by: Boqun Feng Signed-off-by: FUJITA Tomonori Link: https://lore.kernel.org/r/20250423192857.199712-2-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg commit de5fbbe1531f645c8b56098be8d1faf31e46f7f0 Author: Aditya Garg Date: Thu Apr 10 23:50:01 2025 +0530 drm/appletbdrm: Make appletbdrm depend on X86 The appletbdrm driver is exclusively for Touch Bars on x86 Intel Macs. The M1 Macs have a separate driver. So, lets avoid compiling it for other architectures. Signed-off-by: Aditya Garg Reviewed-by: Alyssa Rosenzweig Link: https://lore.kernel.org/r/PN3PR01MB95970778982F28E4A3751392B8B72@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Alyssa Rosenzweig commit 37eed892cc5ff36aeee59bb78f6aa417a44030a9 Author: Petr Mladek Date: Mon Apr 28 14:31:32 2025 +0200 vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering The generic FourCC format always prints the data using the big endian order. It is generic because it allows to read the data using a custom ordering. The current code uses "n" for reading data in the reverse host ordering. It makes the 4 variants [hnbl] consistent with the generic printing of IPv4 addresses. Unfortunately, it creates confusion on big endian systems. For example, it shows the data &(u32)0x67503030 as %p4cn 00Pg (0x30305067) But people expect that the ordering stays the same. The network ordering is a big-endian ordering. The problem is that the semantic is not the same. The modifiers affect the output ordering of IPv4 addresses while they affect the reading order in case of FourCC code. Avoid the confusion by replacing the "n" modifier with "hR", aka reverse host ordering. It is inspired by the existing %p[mM]R printf format. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/r/CAMuHMdV9tX=TG7E_CrSF=2PY206tXf+_yYRuacG48EWEtJLo-Q@mail.gmail.com Signed-off-by: Petr Mladek Acked-by: Alyssa Rosenzweig Reviewed-by: Geert Uytterhoeven Reviewed-by: Aditya Garg Link: https://lore.kernel.org/r/20250428123132.578771-1-pmladek@suse.com Signed-off-by: Alyssa Rosenzweig commit 17efc1acee6229e8964d248e2a21def519e04c14 Author: Oliver Upton Date: Thu Apr 3 16:16:26 2025 -0700 arm64: Expose AIDR_EL1 via sysfs The KVM PV ABI recently added a feature that allows the VM to discover the set of physical CPU implementations, identified by a tuple of {MIDR_EL1, REVIDR_EL1, AIDR_EL1}. Unlike other KVM PV features, the expectation is that the VMM implements the hypercall instead of KVM as it has the authoritative view of where the VM gets scheduled. To do this the VMM needs to know the values of these registers on any CPU in the system. While MIDR_EL1 and REVIDR_EL1 are already exposed, AIDR_EL1 is not. Provide it in sysfs along with the other identification registers. Signed-off-by: Oliver Upton Reviewed-by: Cornelia Huck Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20250403231626.3181116-1-oliver.upton@linux.dev Signed-off-by: Will Deacon commit 00b39d150986c769fe52f9092b6e775a787d5d69 Author: Breno Leitao Date: Mon Apr 7 04:33:25 2025 -0700 arm64: vdso: Use __arch_counter_get_cntvct() While reading how `cntvct_el0` was read in the kernel, I found that __arch_get_hw_counter() is doing something very similar to what __arch_counter_get_cntvct() is already doing. Use the existing __arch_counter_get_cntvct() function instead of duplicating similar inline assembly code in __arch_get_hw_counter(). Both functions were performing nearly identical operations to read the cntvct_el0 register. The only difference was that __arch_get_hw_counter() included a memory clobber in its inline assembly, which appears unnecessary in this context. This change simplifies the code by eliminating duplicate functionality and improves maintainability by centralizing the counter access logic in a single implementation. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20250407-arm-vdso-v1-1-7012de25b195@debian.org Signed-off-by: Will Deacon commit 26d87c55d19a4f4a76e5cc4b4188640badc3bbb1 Author: Takashi Iwai Date: Tue Apr 15 17:55:21 2025 +0200 ALSA: korg1212: Replace the pending stop check code with sync_stop PCM ops The korg1212 driver has an overly complex code with the timer API to check the pending stop operation and to sync at the prepare stage. This very same thing can be achieved more simply by the PCM sync_stop ops without timer, and this patch implements it. Along with the rewrite to sync_stop ops, the flag dsp_stop_is_processed is replaced with dsp_stop_processing to indicate the stop operation is pending, not to indicate it's finished. In that way, wait_for_event() can be used more straightforwardly. Link: https://lore.kernel.org/590769506CF46967+20250414042629.63019-5-wangyuli@uniontech.com Link: https://patch.msgid.link/20250415155522.7998-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c8597e2dd8b660c638e3aab3cd5a009d6a2d458b Author: Mark Rutland Date: Wed Mar 5 11:49:25 2025 +0100 arm64: enable PREEMPT_LAZY For an architecture to enable CONFIG_ARCH_HAS_RESCHED_LAZY, two things are required: 1) Adding a TIF_NEED_RESCHED_LAZY flag definition 2) Checking for TIF_NEED_RESCHED_LAZY in the appropriate locations 2) is handled in a generic manner by CONFIG_GENERIC_ENTRY, which isn't (yet) implemented for arm64. However, outside of core scheduler code, TIF_NEED_RESCHED_LAZY only needs to be checked on a kernel exit, meaning: o return/entry to userspace. o return/entry to guest. The return/entry to a guest is all handled by xfer_to_guest_mode_handle_work() which already does the right thing, so it can be left as-is. arm64 doesn't use common entry's exit_to_user_mode_prepare(), so update its return to user path to check for TIF_NEED_RESCHED_LAZY and call into schedule() accordingly. Link: https://lore.kernel.org/linux-rt-users/20241216190451.1c61977c@mordecai.tesarici.cz/ Link: https://lore.kernel.org/all/xhsmh4j0fl0p3.mognet@vschneid-thinkpadt14sgen2i.remote.csb/ Signed-off-by: Mark Rutland [testdrive, _TIF_WORK_MASK fixlet and changelog.] Signed-off-by: Mike Galbraith [Another round of testing; changelog faff] Signed-off-by: Valentin Schneider Reviewed-by: Thomas Gleixner Acked-by: Mark Rutland Reviewed-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20250305104925.189198-2-vschneid@redhat.com Signed-off-by: Will Deacon commit 67bd641517b04dc5f360ece4dc5f1cf3c2449022 Merge: b4432656b36e5c 600f6fa5c90c05 Author: Marc Zyngier Date: Tue Apr 29 13:38:21 2025 +0100 Merge branch kvm-arm64/nv-pmu-fixes into kvmarm-master/next * kvm-arm64/nv-pmu-fixes: : . : Fixes for NV PMU emulation. From the cover letter: : : "Joey reports that some of his PMU tests do not behave quite as : expected: : : - MDCR_EL2.HPMN is set to 0 out of reset : : - PMCR_EL0.P should reset all the counters when written from EL2 : : Oliver points out that setting PMCR_EL0.N from userspace by writing to : the register is silly with NV, and that we need a new PMU attribute : instead. : : On top of that, I figured out that we had a number of little gotchas: : : - It is possible for a guest to write an HPMN value that is out of : bound, and it seems valuable to limit it : : - PMCR_EL0.N should be the maximum number of counters when read from : EL2, and MDCR_EL2.HPMN when read from EL0/EL1 : : - Prevent userspace from updating PMCR_EL0.N when EL2 is available" : . KVM: arm64: Let kvm_vcpu_read_pmcr() return an EL-dependent value for PMCR_EL0.N KVM: arm64: Handle out-of-bound write to MDCR_EL2.HPMN KVM: arm64: Don't let userspace write to PMCR_EL0.N when the vcpu has EL2 KVM: arm64: Allow userspace to limit the number of PMU counters for EL2 VMs KVM: arm64: Contextualise the handling of PMCR_EL0.P writes KVM: arm64: Fix MDCR_EL2.HPMN reset value KVM: arm64: Repaint pmcr_n into nr_pmu_counters Signed-off-by: Marc Zyngier commit 35382a3646404891aba092013b855c3db4b8b487 Author: Yicong Yang Date: Sat Mar 29 11:44:07 2025 +0800 arm64/cpufeature: Add missing id_aa64mmfr4 feature reg update Add missing id_aa64mmfr4 feature register check and update in update_cpu_features(). Update the taint status as well. Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20250329034409.21354-2-yangyicong@huawei.com Signed-off-by: Will Deacon commit 7ff37d29fd5c27617b9767e1b8946d115cf93a1e Author: Miaoqian Lin Date: Tue Mar 18 23:17:12 2025 +0800 firmware: psci: Fix refcount leak in psci_dt_init Fix a reference counter leak in psci_dt_init() where of_node_put(np) was missing after of_find_matching_node_and_match() when np is unavailable. Fixes: d09a0011ec0d ("drivers: psci: Allow PSCI node to be disabled") Signed-off-by: Miaoqian Lin Reviewed-by: Gavin Shan Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20250318151712.28763-1-linmq006@gmail.com Signed-off-by: Will Deacon commit 70a2585e582058e94fe4381a337be42dec800337 Author: Tejas Upadhyay Date: Mon Apr 28 13:53:57 2025 +0530 drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs LNCF registers report wrong values when XE_FORCEWAKE_GT only is held. Holding XE_FORCEWAKE_ALL ensures correct operations on LNCF regs. V2(Himal): - Use xe_force_wake_ref_has_domain Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1999 Fixes: a6a4ea6d7d37 ("drm/xe: Add mocs kunit") Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20250428082357.1730068-1-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay commit 1db780bafa4cedd20f040c3fce616e47aa7c0c47 Author: Ard Biesheuvel Date: Tue Mar 18 14:49:50 2025 +0100 arm64/mm: Remove randomization of the linear map Since commit 97d6786e0669 ("arm64: mm: account for hotplug memory when randomizing the linear region") the decision whether or not to randomize the placement of the system's DRAM inside the linear map is based on the capabilities of the CPU rather than how much memory is present at boot time. This change was necessary because memory hotplug may result in DRAM appearing in places that are not covered by the linear region at all (and therefore unusable) if the decision is solely based on the memory map at boot. In the Android GKI kernel, which requires support for memory hotplug, and is built with a reduced virtual address space of only 39 bits wide, randomization of the linear map never happens in practice as a result. And even on arm64 kernels built with support for 48 bit virtual addressing, the wider PArange of recent CPUs means that linear map randomization is slowly becoming a feature that only works on systems that will soon be obsolete. So let's just remove this feature. We can always bring it back in an improved form if there is a real need for it. Cc: Catalin Marinas Cc: Will Deacon Cc: Ryan Roberts Cc: Mark Rutland Cc: Anshuman Khandual Cc: Kees Cook Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250318134949.3194334-2-ardb+git@google.com Signed-off-by: Will Deacon commit e04796c8b5980700c78f2fd1b29724afd80dcc62 Author: Ard Biesheuvel Date: Tue Mar 18 14:24:22 2025 +0100 arm64/fpsimd: Avoid unnecessary per-CPU buffers for EFI runtime calls The EFI specification has some elaborate rules about which runtime services may be called while another runtime service call is already in progress. In Linux, however, for simplicity, all EFI runtime service invocations are serialized via the efi_runtime_lock semaphore. This implies that calls to the helper pair arch_efi_call_virt_setup() and arch_efi_call_virt_teardown() are serialized too, and are guaranteed not to nest. Furthermore, the arm64 arch code has its own spinlock to serialize use of the EFI runtime stack, of which only a single instance exists. This all means that the FP/SIMD and SVE state preserve/restore logic in __efi_fpsimd_begin() and __efi_fpsimd_end() are also serialized, and only a single instance of the associated per-CPU variables can ever be in use at the same time. There is therefore no need at all for per-CPU variables here, and they can all be replaced with singleton instances. This saves a non-trivial amount of memory on systems with many CPUs. To be more robust against potential future changes in the core EFI code that may invalidate the reasoning above, move the invocations of __efi_fpsimd_begin() and __efi_fpsimd_end() into the critical section covered by the efi_rt_lock spinlock. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250318132421.3155799-2-ardb+git@google.com Signed-off-by: Will Deacon commit 9f81d707022c244c1930cc6da9f026d0f8acab6c Author: Jinliang Zheng Date: Mon Apr 28 21:50:50 2025 +0800 fs: remove useless plus one in super_cache_scan() After commit 475d0db742e3 ("fs: Fix theoretical division by 0 in super_cache_scan()."), there's no need to plus one to prevent division by zero. Remove it to simplify the code. Signed-off-by: Jinliang Zheng Link: https://lore.kernel.org/20250428135050.267297-1-alexjlzheng@tencent.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit d5a2693f93e497589637bb746ef19ac8aecb6fb5 Author: Jan Kara Date: Wed Apr 23 18:00:27 2025 +0200 ext2: Deprecate DAX Since PMEM didn't quite lift off, DAX isn't as widely used as we originally hoped. Thus it doesn't seem warranted to support implementation of DAX in ext2 driver when the same filesystem can be accessed through ext4 driver as a "simple implementation". Just deprecate DAX support in ext2 targetting completely dropping the code at the end of 2025. Link: https://lore.kernel.org/all/uiu7rcmtooxgbscaiiim7czqsca52bgrt6aiszsafq7jj4n3e7@ge6mfzcmnorl Signed-off-by: Jan Kara commit 73db799bf5efc5a04654bb3ff6c9bf63a0dfa473 Author: Bence Csókás Date: Thu Mar 27 20:59:26 2025 +0100 PM: runtime: Add new devm functions Add `devm_pm_runtime_set_active_enabled()` and `devm_pm_runtime_get_noresume()` for simplifying common cases in drivers. Signed-off-by: Bence Csókás Link: https://patch.msgid.link/20250327195928.680771-3-csokas.bence@prolan.hu Signed-off-by: Rafael J. Wysocki commit f2c8f90b4f676c1f860e6c2cdfe91e68fae64918 Author: Arnd Bergmann Date: Mon Apr 28 17:07:45 2025 +0200 drm/st7571-i2c: select CONFIG_DRM_CLIENT_SELECTION The newly added driver calls drm_client_setup(), but that is not always built in: x86_64-linux-ld: vmlinux.o: in function `st7571_probe': st7571-i2c.c:(.text+0x7b7119): undefined reference to `drm_client_setup' Select the appropriate Kconfig symbol. Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller") Signed-off-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas Reviewed-by: Marcus Folkesson Link: https://lore.kernel.org/r/20250428150752.3970145-1-arnd@kernel.org Signed-off-by: Javier Martinez Canillas commit 4133b1c46915fa8567055eed17d521e125e009c5 Merge: 54ce9aa5829fe9 13a6d426566520 Author: Ulf Hansson Date: Tue Apr 29 11:24:43 2025 +0200 pmdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.15-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit e74b84cd83962e357329a695ba348b3dfe37395c Author: Luca Ceresoli Date: Thu Apr 24 20:59:38 2025 +0200 drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. These two drivers are tangled together by the ldb_add_bridge_helper(), so they are converted at once. They also have a similar design, each embedding an array of channels in their main struct, and each channel embeds a drm_bridge. This prevents dynamic, refcount-based deallocation of the bridges. To make the new, dynamic bridge allocation possible: * change the array of channels into an array of channel pointers * allocate each channel using devm_drm_bridge_alloc() * adapt ldb_add_bridge_helper() to not set the funcs pointer (now done by devm_drm_bridge_alloc()) * adapt the code wherever using the channels Signed-off-by: Luca Ceresoli Acked-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-31-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 9545c91ed75ff65e114761a7729de0e1b440aec6 Author: Luca Ceresoli Date: Thu Apr 24 20:59:34 2025 +0200 drm/vc4: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. This driver already implements refcounting of the struct vc4_dsi, which embeds struct drm_bridge. Now this is a duplicate of the refcounting implemented by the DRM bridge core, so convert the vc4_dsi_get/put() calls into drm_bridge_get/put() calls and get rid of the driver-specific refcounting implementation. Signed-off-by: Luca Ceresoli Acked-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-27-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit e11532be87e437648521a8ed5358c56df11933b4 Author: Luca Ceresoli Date: Thu Apr 24 20:59:25 2025 +0200 drm/msm/hdmi: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-18-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit fffc8847743e45604c4478f554d628481b985556 Author: Luca Ceresoli Date: Thu Apr 24 20:59:24 2025 +0200 drm/msm/dsi: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-17-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit b2aabe5c6b65516d88214aba4b12ce2ca78bac6c Author: Luca Ceresoli Date: Thu Apr 24 20:59:23 2025 +0200 drm/msm/dp: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-16-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 40c25b9ec641f43ba17c7b788ac16ec23f8daaa8 Author: Luca Ceresoli Date: Thu Apr 24 20:59:22 2025 +0200 drm/mcde: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-15-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 91c5c7b5bb2dd09b43b025bce6d790d3c79f4518 Author: Luca Ceresoli Date: Thu Apr 24 20:59:21 2025 +0200 drm/exynos: mic: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-14-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit a4754ae9cfa76fbce79f023c268a5bac56f36321 Author: Luca Ceresoli Date: Thu Apr 24 20:59:20 2025 +0200 drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Herve Codina Signed-off-by: Luca Ceresoli Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-13-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 7fe58bf1a9a24b533875c262a3222581a3f759e4 Author: Luca Ceresoli Date: Thu Apr 24 20:59:19 2025 +0200 drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-12-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit ed6987b674185873ebed7a619a646da6dd1a78fa Author: Luca Ceresoli Date: Thu Apr 24 20:59:18 2025 +0200 drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli Reviewed-by: Cristian Ciocaltea Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-11-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 6287ffd9eff6eea65865e64b9d4c45e115fa5ecf Author: Luca Ceresoli Date: Thu Apr 24 20:59:14 2025 +0200 drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-7-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 4e90a3d96a6185e143041273f9867a1092dd4a71 Author: Luca Ceresoli Date: Thu Apr 24 20:59:13 2025 +0200 drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-6-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 53ddeb25159781b029fda404226af600e76f975f Author: Luca Ceresoli Date: Thu Apr 24 20:59:10 2025 +0200 drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli Reviewed-by: Andy Yan Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-3-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 411465d35bc56877c33e2498ac697acfcf484e6b Author: Luca Ceresoli Date: Thu Apr 24 20:59:09 2025 +0200 platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API This is the new API for allocating DRM bridges. Acked-by: Ilpo Järvinen Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-2-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet commit 54ce9aa5829fe9b7a316cb4b56ecd2e86aedd2d9 Author: Ulf Hansson Date: Fri Apr 25 13:39:42 2025 +0200 pmdomain: core: Convert to device_awake_path() As device_wakeup_path() is intended to be removed, let's switch to use the device_awake_path() instead. No functional change. Acked-by: Peng Fan Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250425113942.134458-1-ulf.hansson@linaro.org commit e6031b11544b44966ba020c867fe438bccd3bdfa Author: Md Sadre Alam Date: Thu Apr 10 15:30:19 2025 +0530 mtd: rawnand: qcom: Fix read len for onfi param page The minimum size to fetch the data from device to QPIC buffer is 512-bytes. If size is less than 512-bytes the data will not be protected by ECC as per QPIC standard. So while reading onfi parameter page from NAND device set nandc->buf_count = 512. Cc: stable@vger.kernel.org Fixes: 89550beb098e ("mtd: rawnand: qcom: Implement exec_op()") Reviewed-by: Manivannan Sadhasivam Tested-by: Lakshmi Sowjanya D Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal commit 47bddabbf69da50999ec68be92b58356c687e1d6 Author: Md Sadre Alam Date: Thu Apr 10 15:30:18 2025 +0530 mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec() For QPIC V2 onwards there is a separate register to read last code word "QPIC_NAND_READ_LOCATION_LAST_CW_n". qcom_param_page_type_exec() is used to read only one code word If it configures the number of code words to 1 in QPIC_NAND_DEV0_CFG0 register then QPIC controller thinks its reading the last code word, since we are having separate register to read the last code word, we have to configure "QPIC_NAND_READ_LOCATION_LAST_CW_n" register to fetch data from QPIC buffer to system memory. Without this change page read was failing with timeout error / # hexdump -C /dev/mtd1 [ 129.206113] qcom-nandc 1cc8000.nand-controller: failure to read page/oob hexdump: /dev/mtd1: Connection timed out This issue only seen on SDX targets since SDX target used QPICv2. But same working on IPQ targets since IPQ used QPICv1. Cc: stable@vger.kernel.org Fixes: 89550beb098e ("mtd: rawnand: qcom: Implement exec_op()") Reviewed-by: Manivannan Sadhasivam Tested-by: Lakshmi Sowjanya D Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal commit ee000969f28bf579d3772bf7c0ae8aff86586e20 Author: Md Sadre Alam Date: Thu Apr 10 15:30:17 2025 +0530 mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base The BAM command descriptor provides only 18 bits to specify the BAM register offset. Additionally, in the BAM command descriptor, the BAM register offset is supposed to be specified as "(NANDc base - BAM base) + reg_off". Since, the BAM controller expecting the value in the form of "NANDc base - BAM base", so that added a new field 'bam_offset' in the NAND properties structure and use it while preparing the command descriptor. Previously, the driver was specifying the NANDc base address in the BAM command descriptor. Cc: stable@vger.kernel.org Fixes: 8d6b6d7e135e ("mtd: nand: qcom: support for command descriptor formation") Tested-by: Lakshmi Sowjanya D Signed-off-by: Md Sadre Alam Acked-by: Mark Brown Tested-by: Gabor Juhos # on IPQ9574 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal commit 2cf4bc06f7008fe3eab4b27d7c0ba9ba08f5dc5d Author: Kaushal Kumar Date: Wed Apr 23 12:00:50 2025 +0530 dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller Add new compatible for the QPIC NAND controller v2.1.1 used for SDX75 SoC. SDX75 NAND controller has iommu support so define it in the properties section. Reviewed-by: Rob Herring (Arm) Signed-off-by: Kaushal Kumar Signed-off-by: Miquel Raynal commit 00b102d9e3827fabad366e464512a34f97406389 Author: Wentao Liang Date: Tue Apr 22 12:14:16 2025 +0800 mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd() The function bcm47xxnflash_ops_bcm4706_cmd_ctrl() calls the function bcm47xxnflash_ops_bcm4706_ctl_cmd(), but does not check its return value. A proper implementation can be found in bcm47xxnflash_ops_bcm4706_write(). Add error log to the bcm47xxnflash_ops_bcm4706_ctl_cmd() via pr_err() to prevent silent failure. The error Log funciton 'dev_err' is unsuitable in this situation for it is hard to get device pointer. Signed-off-by: Wentao Liang Signed-off-by: Miquel Raynal commit 529cbc9c648904e9bf07f3485a34d6e1cd3091a7 Author: Philipp Stanner Date: Thu Apr 17 11:34:29 2025 +0200 mtd: rawnand: Use non-hybrid PCI devres API denali_pci.c enables a PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Moreover, since both functions are already managed in this driver, the calls to pci_release_regions() are unnecessary. Remove the calls to pci_release_regions(). Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_regions(). Signed-off-by: Philipp Stanner Signed-off-by: Miquel Raynal commit d95846350aac72303036a70c4cdc69ae314aa26d Author: Mikhail Arkhipov Date: Wed Apr 9 00:39:06 2025 +0300 mtd: nand: ecc-mxic: Fix use of uninitialized variable ret If ctx->steps is zero, the loop processing ECC steps is skipped, and the variable ret remains uninitialized. It is later checked and returned, which leads to undefined behavior and may cause unpredictable results in user space or kernel crashes. This scenario can be triggered in edge cases such as misconfigured geometry, ECC engine misuse, or if ctx->steps is not validated after initialization. Initialize ret to zero before the loop to ensure correct and safe behavior regardless of the ctx->steps value. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 48e6633a9fa2 ("mtd: nand: mxic-ecc: Add Macronix external ECC engine support") Signed-off-by: Mikhail Arkhipov Signed-off-by: Miquel Raynal commit 25e08bf666607f572d5b9b87b0728d126b9bdef9 Author: Miquel Raynal Date: Thu Apr 3 11:19:29 2025 +0200 mtd: spinand: winbond: Add support for W35N02JW and W35N04JW chips These chips support single SPI, octal SPI and octal DDR SPI. For now, only the SDR protocols are supported. Tested with the W35N02JW variant, but the 04 one just has twice more dies and is described in the same datasheet, so we can reasonably expect that it will behave identically. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 1ac5ff2f2ad671612f9a96ffda948632ed48502f Author: Miquel Raynal Date: Thu Apr 3 11:19:28 2025 +0200 mtd: spinand: winbond: Add octal support Describe the octal "read from cache" (1S_1S_8S, 1S_8S_8S and 1S_1D_8D_OP) and "program load" (1S_1S_8S and 1S_8S_8S) operations supported by the W35N01JW chip. There is no observable improvement between the two octal SDR modes, which anyway offered a great read speed improvement compared to single mode. flash_speed test results ran on the TI AM62A7 LP SK using a 25MHz SPI bus: * Single mode: eraseblock read speed is 2346 KiB/s page read speed is 2342 KiB/s eraseblock write speed is 2028 KiB/s page write speed is 2028 KiB/s * Octal modes: eraseblock read speed is 10801 KiB/s page read speed is 10711 KiB/s eraseblock write speed is 7335 KiB/s page write speed is 7293 KiB/s However, testing on the cadence qspi controller driver did not allow mixed modes (where SDR and DTR cycles are mixed in the same operation), thus 1S-1D-8D mode could not be tested and is provided for reference (it is anyway skipped on platforms not supporting this). It did not allow easy "update cache" tests either, so these macros are untested and given as-is. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 0737c6946c61ed5ff540320a3e1649d95530e0e3 Author: Miquel Raynal Date: Thu Apr 3 11:19:27 2025 +0200 mtd: spinand: winbond: Add support for W35N01JW in single mode Add support for the W35N series by describing the smaller (single die) chip. It has 1b/512B ECC support and its own OOB layout. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 140bb9e93de69a902d288556e0017172a53f960a Author: Miquel Raynal Date: Thu Apr 3 11:19:26 2025 +0200 mtd: spinand: winbond: Rename DTR variants So far all the chips supported in the driver apparently have support for the same kind of operation (typically, single, dual and quad). The future introduction of W35N chips will change that as these chips only support single and octal modes. Let's rename the variants accordingly to make these future additions more understandable. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 51b252cce172cbfb21dfd5e544dcbefc649f3daa Author: Miquel Raynal Date: Thu Apr 3 11:19:25 2025 +0200 mtd: spinand: Define octal operations SPI NAND chips may support octal "read from cache" and "program load" transfers. List the opcodes by defining the relevant macros describing these operations. However, due to the hardware available I had, 0x82 and 0xc2 are untested and given as reference, only 0xc4 could be (successfully) tested. Controllers supporting operations mixing SDR and DTR operations might even leverage octal DTR data I/O transfers. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit ac3a4b17e03b079c00eb61456364bcdbf65f3436 Author: Miquel Raynal Date: Thu Apr 3 11:19:24 2025 +0200 mtd: spinand: Use more specific naming for the (quad) program load op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the (quad) program load macro name. While at modifying it, better add the missing_ OP suffix to align with all the other macros of the same kind. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 07cdbae7f84190983f9b07133ce5b6f2634c95cd Author: Miquel Raynal Date: Thu Apr 3 11:19:23 2025 +0200 mtd: spinand: Use more specific naming for the (single) program load op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the (single) program load macro name. While at modifying it, better add the missing_ OP suffix to align with all the other macros of the same kind. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 36e461894cf31e33ebd869f3fd85c5d7c68a22bc Author: Miquel Raynal Date: Thu Apr 3 11:19:22 2025 +0200 mtd: spinand: Use more specific naming for the program execution op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the program execution macro name. Acked-by: Tudor Ambarus [Miquel: Fixed conflicts with -next by updating esmt and micron drivers] Signed-off-by: Miquel Raynal commit 9c6911072c6e8b128ccdb7dd00efa13c47513074 Author: Miquel Raynal Date: Thu Apr 3 11:19:21 2025 +0200 mtd: spinand: Use more specific naming for the (quad IO) read from cache ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the (quad IO) read from cache macro names. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 1deae734cc1c7e976d588e7d8f46af2bb9ef5656 Author: Miquel Raynal Date: Thu Apr 3 11:19:20 2025 +0200 mtd: spinand: Use more specific naming for the (quad output) read from cache ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the (quad output) read from cache macro names. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit d9de177996d74c0cc44220003953ba2d2bece0ac Author: Miquel Raynal Date: Thu Apr 3 11:19:19 2025 +0200 mtd: spinand: Use more specific naming for the (dual IO) read from cache ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the (dual IO) read from cache macro names. While at modifying them, better reordering the macros to group them all by bus topology which now feels more intuitive. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 684f7105e8534f6500de389c089ba204cb1c8058 Author: Miquel Raynal Date: Thu Apr 3 11:19:18 2025 +0200 mtd: spinand: Use more specific naming for the (dual output) read from cache ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the (dual output) read from cache macro names. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit ea2087d4e66d0b927918cc9048576aca6a0446ad Author: Miquel Raynal Date: Thu Apr 3 11:19:17 2025 +0200 mtd: spinand: Use more specific naming for the (single) read from cache ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the (single) read from cache macro names. Acked-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 7528c97c0c2ac4c6c09b5aae52382958a57122fe Author: Miquel Raynal Date: Thu Apr 3 11:19:16 2025 +0200 mtd: spinand: Use more specific naming for the page read op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the page read macro name. Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 7e8533b273ee9e7243cc57afec835c20135ebbb2 Author: Miquel Raynal Date: Thu Apr 3 11:19:15 2025 +0200 mtd: spinand: Use more specific naming for the erase op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the erase macro name. Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 429330cd1cfe860133d1fbdd49e9e081524333cf Author: Miquel Raynal Date: Thu Apr 3 11:19:14 2025 +0200 mtd: spinand: Use more specific naming for the get/set feature ops SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really mean by describing the expected bus topology in the get/set feature macro names. Reviewed-by: Tudor Ambarus [Miquel: Fixed conflicts with -next by updating macronix driver] Signed-off-by: Miquel Raynal commit 2a294fa215289aff4b7b0c0a70f24dcd621df497 Author: Miquel Raynal Date: Thu Apr 3 11:19:13 2025 +0200 mtd: spinand: Use more specific naming for the read ID op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the read ID macro name. Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit d54e34c58aa224bdd0b9ea0f429c5a90d91db2c7 Author: Miquel Raynal Date: Thu Apr 3 11:19:12 2025 +0200 mtd: spinand: Use more specific naming for the write enable/disable op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the write enable/disable macro names. Reviewed-by: Tudor Ambarus [Miquel: Fixed conflicts with -next by updating esmt and micron drivers] Signed-off-by: Miquel Raynal commit 136deca59b1613c22aebfb0c8508dd02363c7142 Author: Mario Limonciello Date: Mon Apr 21 10:22:23 2025 -0500 amdtee: Sort header includes Various headers have been added over time that are not added alphabetically and a private header is used before one of the linux/ headers. Resort the list. Signed-off-by: Mario Limonciello Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 7b0323666b260faef6db1a9fbe9bcce0c9bd750f Author: Mario Limonciello Date: Mon Apr 21 10:22:22 2025 -0500 amdtee: Use pr_fmt for messages amd-tee inconsistently uses the word amd-tee in error messages. Add a `pr_fmt()` define and remove the hardcoded use of amd-tee. Also, remove the unnecessary driver init successful message because there will be a message if failed and a user can assume it was successful otherwise. Signed-off-by: Mario Limonciello Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 9e4c444755b1525e9cb0798ca2dccbb18b0c0393 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:35 2025 +0200 pinctrl: samsung: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-12-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit e52254e5ced72a64f2b3585c8640d6e75469dc5e Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:34 2025 +0200 pinctrl: pistachio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-11-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit 8152769f9fb65ef945ff5076c486cd6b2831468d Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:33 2025 +0200 pinctrl: armada-37xx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-10-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit b0dfc1bd6f97a130037fe59973202a7cf84280b0 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:32 2025 +0200 pinctrl: at91: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-9-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit 8e86af65f39df6a8f1c1f033b90a5f7d5457ee7a Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:31 2025 +0200 pinctrl: at91: allow building the module with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. We can do this as the driver doesn't depend on any architecture-specific bits. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-8-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit f0401cce035caf77f675657b56bf9eca8d94e050 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:30 2025 +0200 pinctrl: microchip-sgpio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-7-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit eac1183a175e425eab8d23ccc160d8cc935eba72 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:29 2025 +0200 pinctrl: ingenic: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Paul Cercueil Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-6-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit 43c8981b02cd4921dd3b02710a126b11aa94c497 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:28 2025 +0200 pinctrl: stm32: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Antonio Borneo Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-5-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit 059f5470797edcdc4407cc1d5960f12690a1e476 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:27 2025 +0200 pinctrl: owl: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-4-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit 8657c6ee9b2ab40778dfdad7e38b25e34c32a709 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:26 2025 +0200 pinctrl: stmfx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-3-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit fa10247914c8e19d22f41bef4bb8708927498fd1 Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:25 2025 +0200 pinctrl: axp209: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-2-504f91120b99@linaro.org [Drop unnecessary curly braces] Signed-off-by: Linus Walleij commit ec08e2c67077aed212ba1539c15085689013844a Author: Bartosz Golaszewski Date: Thu Apr 24 10:35:24 2025 +0200 pinctrl: amd: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250424-gpiochip-set-rv-pinctrl-part2-v1-1-504f91120b99@linaro.org Signed-off-by: Linus Walleij commit e3b78a7ad5ea718ea1dbaeb02ba9a6aa2aee9324 Author: David Kaplan Date: Fri Apr 18 11:17:15 2025 -0500 x86/bugs: Restructure retbleed mitigation Restructure retbleed mitigation to use select/update/apply functions to create consistent vulnerability handling. The retbleed_update_mitigation() simplifies the dependency between spectre_v2 and retbleed. The command line options now directly select a preferred mitigation which simplifies the logic. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-11-david.kaplan@amd.com commit e43b8bb56e537bfc8d9076793091e7679020fc9c Author: Charlie Jenkins Date: Thu Mar 20 10:29:24 2025 -0700 entry: Inline syscall_exit_to_user_mode() Similar to commit 221a164035fd ("entry: Move syscall_enter_from_user_mode() to header file"), move syscall_exit_to_user_mode() to the header file as well. Testing was done with the byte-unixbench syscall benchmark (which calls getpid) and QEMU. On riscv I measured a 7.09246% improvement, on x86 a 2.98843% improvement, on loongarch a 6.07954% improvement, and on s390 a 11.1328% improvement. The Intel bot also reported "kernel test robot noticed a 1.9% improvement of stress-ng.seek.ops_per_sec". Signed-off-by: Charlie Jenkins Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/all/20250320-riscv_optimize_entry-v6-4-63e187e26041@rivosinc.com Link: https://lore.kernel.org/linux-riscv/202502051555.85ae6844-lkp@intel.com/ commit 7ace1602abf21da505993d77ccbae1df2496b324 Author: Charlie Jenkins Date: Thu Mar 20 10:29:23 2025 -0700 LoongArch: entry: Migrate ret_from_fork() to C LoongArch is the only architecture that calls syscall_exit_to_user_mode() from assembly. Move the call into C so that this function can be inlined across all architectures. Signed-off-by: Charlie Jenkins Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250320-riscv_optimize_entry-v6-3-63e187e26041@rivosinc.com commit 5b3d6103b343d59e19bd641e4c31df519f4d250d Author: Charlie Jenkins Date: Thu Mar 20 10:29:22 2025 -0700 riscv: entry: Split ret_from_fork() into user and kernel This function was unified into a single function in commit ab9164dae273 ("riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork"). However that imposed a performance degradation. Partially reverting this commit to have ret_from_fork() split again, results in a 1% increase on the number of times fork is able to be called per second. Signed-off-by: Charlie Jenkins Signed-off-by: Thomas Gleixner Acked-by: Alexandre Ghiti Link: https://lore.kernel.org/all/20250320-riscv_optimize_entry-v6-2-63e187e26041@rivosinc.com commit f955aa8723a65759e920d4de8e5d076cef412afc Author: Charlie Jenkins Date: Thu Mar 20 10:29:21 2025 -0700 riscv: entry: Convert ret_from_fork() to C Move the main section of ret_from_fork() to C to allow inlining of syscall_exit_to_user_mode(). Signed-off-by: Charlie Jenkins Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/all/20250320-riscv_optimize_entry-v6-1-63e187e26041@rivosinc.com commit b2f64cf1585a3afd06261dd4ae067136b6a66eb4 Author: Christophe Leroy Date: Wed Feb 12 08:40:48 2025 +0100 powerpc: Don't use --- in kernel logs When a kernel log containing --- at the start of a line is copied into a patch message, 'git am' drops everything located after that ---. Replace --- by ---- to avoid that. Signed-off-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/54a1f8d2c3fb5b95434039724c8c141052ae5cc0.1739346038.git.christophe.leroy@csgroup.eu commit 882b25af265de8e05c66f72b9a29f6047102958f Author: Eddie James Date: Tue Feb 11 10:20:54 2025 -0600 powerpc/crash: Fix non-smp kexec preparation In non-smp configurations, crash_kexec_prepare is never called in the crash shutdown path. One result of this is that the crashing_cpu variable is never set, preventing crash_save_cpu from storing the NT_PRSTATUS elf note in the core dump. Fixes: c7255058b543 ("powerpc/crash: save cpu register data in crash_smp_send_stop()") Signed-off-by: Eddie James Reviewed-by: Hari Bathini Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250211162054.857762-1-eajames@linux.ibm.com commit 9924db4a75ca294c7a608bb71d3269c1730b9f6f Merge: d2b9e2f8a15d53 1bb53d05ba71b6 Author: Dave Airlie Date: Tue Apr 29 15:54:57 2025 +1000 Merge tag 'drm-xe-next-2025-04-28-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Core Changes: - Add drm_coredump_printer_is_full() (Matt Brost) Driver Changes: - Do not queue unneeded terminations from debugfs (Daniele) - Fix out-of-bound while enabling engine activity stats (Michal) - Use GT oriented message to report engine activity error (Michal) - Some fault-injection additions (Satyanarayana) - Fix an error pointer dereference (Harshit) - Fix capture of steering registers (John) - Use the steering flag when printing registers (John) - Cache DSS info when creating capture register list (John) - Backup VRAM in PM notifier instead of in the suspend / freeze callbacks (Matt Auld) - Fix CFI violation when accessing sysfs files (Jeevaka) - Fix kernel version docs for temperature and fan speed (Lucas) - Add devcoredump chunking (Matt Brost) - Update xe_ttm_access_memory to use GPU for non-visible access (Matt Brost) - Abort printing coredump in VM printer output if full (Matt Brost) - Resolve a possible circular locking dependency (Harish) - Don't support EU stall on SRIOV VF (Harish) - Drop force_alloc from xe_bo_evict in selftests (Matt Brost) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aA-mvTb6s909V8hu@fedora commit 497b7794aef03d525a5be05ae78dd7137c6861a5 Author: Jiri Slaby (SUSE) Date: Thu Apr 17 12:53:05 2025 +0200 powerpc: do not build ppc_save_regs.o always The Fixes commit below tried to add CONFIG_PPC_BOOK3S to one of the conditions to enable the build of ppc_save_regs.o. But it failed to do so, in fact. The commit omitted to add a dollar sign. Therefore, ppc_save_regs.o is built always these days (as "(CONFIG_PPC_BOOK3S)" is never an empty string). Fix this by adding the missing dollar sign. Signed-off-by: Jiri Slaby (SUSE) Fixes: fc2a5a6161a2 ("powerpc/64s: ppc_save_regs is now needed for all 64s builds") Acked-by: Stephen Rothwell Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250417105305.397128-1-jirislaby@kernel.org commit 9cc0eafd28c7faef300822992bb08d79cab2a36c Author: Gautam Menghani Date: Wed Mar 5 14:32:36 2025 +0530 powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states When a system is being suspended to RAM, the PCI devices are also suspended and the PPC code ends up calling pseries_msi_compose_msg() and this triggers the BUG_ON() in __pci_read_msi_msg() because the device at this point is in reduced power state. In reduced power state, the memory mapped registers of the PCI device are not accessible. To replicate the bug: 1. Make sure deep sleep is selected # cat /sys/power/mem_sleep s2idle [deep] 2. Make sure console is not suspended (so that dmesg logs are visible) echo N > /sys/module/printk/parameters/console_suspend 3. Suspend the system echo mem > /sys/power/state To fix this behaviour, read the cached msi message of the device when the device is not in PCI_D0 power state instead of touching the hardware. Fixes: a5f3d2c17b07 ("powerpc/pseries/pci: Add MSI domains") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Gautam Menghani Tested-by: Venkat Rao Bagalkote Reviewed-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250305090237.294633-1-gautam@linux.ibm.com commit 59ba025948be2a92e8bc9ae1cbdaf197660bd508 Author: Hari Bathini Date: Tue Apr 22 13:56:09 2025 +0530 powerpc/bpf: fix JIT code size calculation of bpf trampoline arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() can vary from the actual size needed in arch_prepare_bpf_trampoline(). When the instructions accounted in arch_bpf_trampoline_size() is less than the number of instructions emitted during the actual JIT compile of the trampoline, the below warning is produced: WARNING: CPU: 8 PID: 204190 at arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc which is: /* Make sure the trampoline generation logic doesn't overflow */ if (image && WARN_ON_ONCE(&image[ctx->idx] > (u32 *)rw_image_end - BPF_INSN_SAFETY)) { So, during the dummy pass, instead of providing some arbitrary image location, account for maximum possible instructions if and when there is a dependency with image location for JIT'ing. Fixes: d243b62b7bd3 ("powerpc64/bpf: Add support for bpf trampolines") Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/6168bfc8-659f-4b5a-a6fb-90a916dde3b3@linux.ibm.com/ Cc: stable@vger.kernel.org # v6.13+ Acked-by: Naveen N Rao (AMD) Tested-by: Venkat Rao Bagalkote Signed-off-by: Hari Bathini Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250422082609.949301-1-hbathini@linux.ibm.com commit cb5b691f8273432297611863ac142e17119279e0 Author: Hari Bathini Date: Thu Apr 17 00:42:27 2025 +0530 powerpc64/ftrace: fix clobbered r15 during livepatching While r15 is clobbered always with PPC_FTRACE_OUT_OF_LINE, it is not restored in livepatch sequence leading to not so obvious fails like below: BUG: Unable to handle kernel data access on write at 0xc0000000000f9078 Faulting instruction address: 0xc0000000018ff958 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP: c0000000018ff958 LR: c0000000018ff930 CTR: c0000000009c0790 REGS: c00000005f2e7790 TRAP: 0300 Tainted: G K (6.14.0+) MSR: 8000000000009033 CR: 2822880b XER: 20040000 CFAR: c0000000008addc0 DAR: c0000000000f9078 DSISR: 0a000000 IRQMASK: 1 GPR00: c0000000018f2584 c00000005f2e7a30 c00000000280a900 c000000017ffa488 GPR04: 0000000000000008 0000000000000000 c0000000018f24fc 000000000000000d GPR08: fffffffffffe0000 000000000000000d 0000000000000000 0000000000008000 GPR12: c0000000009c0790 c000000017ffa480 c00000005f2e7c78 c0000000000f9070 GPR16: c00000005f2e7c90 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 c00000005f3efa80 c00000005f2e7c60 c00000005f2e7c88 GPR24: c00000005f2e7c60 0000000000000001 c0000000000f9078 0000000000000000 GPR28: 00007fff97960000 c000000017ffa480 0000000000000000 c0000000000f9078 ... Call Trace: check_heap_object+0x34/0x390 (unreliable) __mutex_unlock_slowpath.isra.0+0xe4/0x230 seq_read_iter+0x430/0xa90 proc_reg_read_iter+0xa4/0x200 vfs_read+0x41c/0x510 ksys_read+0xa4/0x190 system_call_exception+0x1d0/0x440 system_call_vectored_common+0x15c/0x2ec Fix it by restoring r15 always. Fixes: eec37961a56a ("powerpc64/ftrace: Move ftrace sequence out of line") Reported-by: Viktor Malik Closes: https://lore.kernel.org/lkml/1aec4a9a-a30b-43fd-b303-7a351caeccb7@redhat.com Cc: stable@vger.kernel.org # v6.13+ Signed-off-by: Hari Bathini Tested-by: Viktor Malik Acked-by: Naveen N Rao (AMD) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416191227.201146-1-hbathini@linux.ibm.com commit a9635ef0ca12e7914f42bfa7ca6a019f606c2817 Author: Benson Leung Date: Mon Apr 28 17:48:28 2025 +0000 platform/chrome: cros_ec_typec: Set Pin Assignment E in DP PORT VDO Pin C and D are used on C-to-C cable applications including docks, and for USB-C adapters that convert from DP over USB-C to other video standards. Pin Assignment E is intended to be used with adapter from USB-C to DP plugs or receptacles. All Chromebook USB-C DFPs support DisplayPort Alternate Mode as the DP Source with support for all 3 pin assignments. Pin Assignment E is required in order to support if the user attaches a Pin E C-to-DP cable. Without this, the displayport.c alt mode driver will error out of dp_altmode_probe with an -ENODEV, as it cannot find a compatible matching pin assignment between the DFP_D and UFP_D. Fixes: dbb3fc0ffa95 ("platform/chrome: cros_ec_typec: Displayport support") Signed-off-by: Benson Leung Reviewed-by: Jameson Thies Reviewed-by: Abhishek Pandit-Subedi Link: https://lore.kernel.org/r/20250428174828.13939-1-bleung@chromium.org Signed-off-by: Tzung-Bi Shih commit e142de4aac2aae697d7e977b01e7a889e9f454df Merge: 04f79c113ae777 25b5ee122b7955 Author: Martin K. Petersen Date: Mon Apr 28 22:01:20 2025 -0400 Merge patch series "scsi: ufs-qcom: Enable Hibern8, MCQ, and Testbus registers Dump" Manish Pandey says: Adding support to enhance the debugging capabilities of the Qualcomm UFS Host Controller, including HW and SW Hibern8 counts, MCQ registers, and testbus registers dump. Link: https://lore.kernel.org/r/20250411121345.16859-1-quic_mapa@quicinc.com Signed-off-by: Martin K. Petersen commit 25b5ee122b79553798f0d1abfefcc2d4e4b4e6cc Author: Manish Pandey Date: Fri Apr 11 17:43:45 2025 +0530 scsi: ufs: ufs-qcom: Add support to dump testbus registers Add support to dump testbus registers to enhance debugging capabilities for the Qualcomm UFS Host Controller. Signed-off-by: Manish Pandey Link: https://lore.kernel.org/r/20250411121345.16859-4-quic_mapa@quicinc.com Signed-off-by: Martin K. Petersen commit 82edd868888a780c9c1e335d9f9c2258aaf20b8b Author: Manish Pandey Date: Fri Apr 11 17:43:44 2025 +0530 scsi: ufs: ufs-qcom: Add support to dump MCQ registers Add support to dump UFS MCQ registers to enhance debugging capabilities for the Qualcomm UFS Host Controller. Signed-off-by: Manish Pandey Link: https://lore.kernel.org/r/20250411121345.16859-3-quic_mapa@quicinc.com Signed-off-by: Martin K. Petersen commit fe016bb54dd1ec8218dd1c831178158052c9a0c6 Author: Manish Pandey Date: Fri Apr 11 17:43:43 2025 +0530 scsi: ufs: ufs-qcom: Add support to dump HW and SW hibern8 count Add support to dump HW and SW hibern8 enter and exit counts to enhance the debugging of hibern8 state transitions. Signed-off-by: Manish Pandey Link: https://lore.kernel.org/r/20250411121345.16859-2-quic_mapa@quicinc.com Signed-off-by: Martin K. Petersen commit 04f79c113ae77732e7e6674bd814e76c7a3453cf Author: Ranjan Kumar Date: Wed Apr 23 14:51:39 2025 +0530 scsi: mpi3mr: Event processing debug improvement Improve event process debugging. Implement more verbose event logging throughout the driver. Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20250423092139.110206-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 6b08fe7763de9e388e6b224af2e39fa5083c44d8 Merge: a0d1cf505d3f3a 268975a87c7b6f Author: Martin K. Petersen Date: Mon Apr 28 21:48:37 2025 -0400 Merge patch series "target: Remove atomics from main IO path" Mike Christie says: The following patches made over Linus's tree remove the atomic use from the main IO path. There was a handful of atomic_longs used just used for stats and a couple atomics used for handling ordered commands. These patches move the stats to per cpu, and moves the ordered tracking to a per cpu counter. With the patches 8K IOPS increases by up to 33% when running fio with numjobs >= 4 and using the vhost-scsi target with virtio-scsi and virtio num_queues >= 4 (jobs and queues match, and virtqueue_size and cmd_per_lun are increased to match the total iodepth of all jobs). Link: https://lore.kernel.org/r/20250424032741.16216-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit 268975a87c7b6f6b0ceb62df236c1e1b08b89379 Author: Mike Christie Date: Wed Apr 23 22:26:33 2025 -0500 scsi: target: Move delayed/ordered tracking to per CPU The atomic use from the delayed/ordered tracking is causing perf issues when using higher perf backend devices and multiple queues. This moves the values to a per CPU counter. Combined with the per CPU stats patch, this improves IOPS by up to 33% for 8K IOS when using 4 or more queues from the initiator. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20250424032741.16216-3-michael.christie@oracle.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 9cf2317b795d6cde0fccb8744b5a080a9586020e Author: Mike Christie Date: Wed Apr 23 22:26:32 2025 -0500 scsi: target: Move I/O path stats to per CPU The atomic use in the main I/O path is causing perf issues when using higher performance backend devices and multiple queues. This moves the stats to per CPU. Combined with the next patch that moves the non_ordered/delayed_cmd_count to per CPU, IOPS by up to 33% for 8K IOS when using 4 or more queues. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20250424032741.16216-2-michael.christie@oracle.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit a0d1cf505d3f3a98388c2d05fe03b126dfda3513 Merge: 00159e436cc36a 6e6d9e85bad216 Author: Martin K. Petersen Date: Mon Apr 28 21:44:03 2025 -0400 Merge patch series "smartpqi updates" Don Brace says: These patches are based on Martin Petersen's 6.16/scsi-queue tree https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 6.16/scsi-queue There are two main functional changes in this patch series: smartpqi-take-drives-offline-when-controller-is-offline smartpqi-fix-smp_processor_id-call-trace-for-preemptible-kernels The other two patches add PCI-IDs for new controllers and change the driver version. This set of changes consists of: * smartpqi-take-drives-offline-when-controller-is-offline On rare occasions, the controller can lock up and the driver was removing the controller instance from OS but leaving the drives exposed and their state was still 'running'. This patch sets the drive state as 'offline' to avoid confusion. * smartpqi-add-new-pci_ids Add support for more PCI devices. * smartpqi-enhance_wwid-logging-logic Cosmetic change for logging WWIDs for NVMe devices and for drives that support the extended format. * smartpqi-fix-smp_processor_id-call-trace-for-preemptible-kernels When preemption is enabled, there are call traces in the console logs which are annoying. The call trace mentions using smp_processor_id(). Since the driver is only using this function call when accessing a per_cpu variable, we changed the call to raw_smp_processor_id(). This patch was written by Yi Zhang and I am posting it on his behalf. * smartpqi-update-driver-version-to-2.1.34-035 No functional changes. Link: https://lore.kernel.org/r/20250423183229.538572-1-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 6e6d9e85bad21635c95700f2d3094f1976442bf2 Author: Don Brace Date: Wed Apr 23 13:32:29 2025 -0500 scsi: smartpqi: Update driver version to 2.1.34-035 Update driver version to 2.1.34-035. Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20250423183229.538572-6-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 42d033cf4b517e91c187ad2fbd7b30fdc6d2d62c Author: Yi Zhang Date: Wed Apr 23 13:32:28 2025 -0500 scsi: smartpqi: Fix smp_processor_id() call trace for preemptible kernels Correct kernel call trace when calling smp_processor_id() when called in preemptible kernels by using raw_smp_processor_id(). smp_processor_id() checks to see if preemption is disabled and if not, issue an error message followed by a call to dump_stack(). Brief example of call trace: kernel: check_preemption_disabled: 436 callbacks suppressed kernel: BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u1025:0/2354 kernel: caller is pqi_scsi_queue_command+0x183/0x310 [smartpqi] kernel: CPU: 129 PID: 2354 Comm: kworker/u1025:0 kernel: ... kernel: Workqueue: writeback wb_workfn (flush-253:0) kernel: Call Trace: kernel: kernel: dump_stack_lvl+0x34/0x48 kernel: check_preemption_disabled+0xdd/0xe0 kernel: pqi_scsi_queue_command+0x183/0x310 [smartpqi] kernel: ... Fixes: 283dcc1b142e ("scsi: smartpqi: add counter for parity write stream requests") Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Tested-by: Don Brace Signed-off-by: Yi Zhang Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20250423183229.538572-5-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 001164fc3082cd8c53f65eb87a0f490e9780fd67 Author: Venkatesh Emparala Date: Wed Apr 23 13:32:27 2025 -0500 scsi: smartpqi: Enhance WWID logging logic Log the extended WWID for NVMe devices and for devices that have the firmware feature bit "PQI_FIRMWARE_FEATURE_RPL_EXTENDED_FORMAT_4_5" enabled. Log 8-bytes otherwise. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: Venkatesh Emparala Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20250423183229.538572-4-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 01b8bdddcfab035cf70fd9981cb20593564cd15d Author: David Strahan Date: Wed Apr 23 13:32:26 2025 -0500 scsi: smartpqi: Add new PCI IDs Add in support for more PCI devices. All PCI ID entries in Hex. Add PCI IDs for Ramaxel controllers: VID / DID / SVID / SDID ---- ---- ---- ---- Ramaxel SmartHBA RX8238-16i 9005 028f 1018 8238 Ramaxel SSSRAID card 9005 028f 1f3f 0610 Add PCI ID for Alibaba controller: VID / DID / SVID / SDID ---- ---- ---- ---- HBA AS1340 9005 028f 1ded 3301 Add PCI IDs for Inspur controller: VID / DID / SVID / SDID ---- ---- ---- ---- RT0800M6E2i 9005 028f 1bd4 00a3 Add PCI IDs for Delta controllers: VID / DID / SVID / SDID ---- ---- ---- ---- ThinkSystem 4450-8i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0222 24Gb HBA ThinkSystem 4450-16i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0223 24Gb HBA ThinkSystem 4450-8e SAS/SATA PCIe Gen4 9005 028f 1d49 0224 24Gb HBA ThinkSystem RAID 4450-16e PCIe Gen4 24Gb 9005 028f 1d49 0225 Adapter HBA ThinkSystem RAID 5450-16i PCIe Gen4 24Gb Adapter 9005 028f 1d49 0521 ThinkSystem RAID 9450-8i 4GB Flash PCIe Gen4 9005 028f 1d49 0624 24Gb Adapter ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0625 24Gb Adapter ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0626 24Gb Adapter ThinkSystem RAID 9450-32i 8GB Flash PCIe Gen4 9005 028f 1d49 0627 24Gb Adapter ThinkSystem RAID 9450-16e 4GB Flash PCIe Gen4 9005 028f 1d49 0628 24Gb Adapter Add PCI ID for Cloudnine Controller: VID / DID / SVID / SDID ---- ---- ---- ---- SmartHBA P6600-24i 9005 028f 1f51 100b Add PCI IDs for Hurraydata Controllers: VID / DID / SVID / SDID ---- ---- ---- ---- HRDT TrustHBA H4100-8i 9005 028f 207d 4044 HRDT TrustHBA H4100-8e 9005 028f 207d 4054 HRDT TrustHBA H4100-16i 9005 028f 207d 4084 HRDT TrustHBA H4100-16e 9005 028f 207d 4094 HRDT TrustRAID D3152s-8i 9005 028f 207d 4140 HRDT TrustRAID D3154s-8i 9005 028f 207d 4240 Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: David Strahan Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20250423183229.538572-3-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 32c79c268078daf5713d3b07b23077591b245d55 Author: David Strahan Date: Wed Apr 23 13:32:25 2025 -0500 scsi: smartpqi: Take drives offline when controller is offline During a controller lockup, the physical and logical drives under the locked up controller are still listed at the OS level. I.e. the controller is offline but the status of each drive is 'running'. When the controller is unexpectedly taken offline, show its drives as offline. Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: David Strahan Co-developed-by: Don Brace Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20250423183229.538572-2-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit 00159e436cc36aa992538f60a0d7eb3c4345652f Merge: 3d030e2feb8a35 f65c7b81796e02 Author: Martin K. Petersen Date: Mon Apr 28 21:38:51 2025 -0400 Merge patch series "Update lpfc to revision 14.4.0.9" Justin Tee says: Update lpfc to revision 14.4.0.9 This patch set contains fixes related to handling of WQE commands, PCI function resets, firmware eratta events, ELS retries, a smatch use-after-free warning, and the creation of a new VMID information entry. The patches were cut against Martin's 6.16/scsi-queue tree. Link: https://lore.kernel.org/r/20250425194806.3585-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit f65c7b81796e026bd21cf462505b3d8932a0de3c Author: Justin Tee Date: Fri Apr 25 12:48:06 2025 -0700 scsi: lpfc: Copyright updates for 14.4.0.9 patches Update copyrights to 2025 for files modified in the 14.4.0.9 patch set. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 773a136fc8286811401f1548ace3b60cfdc9c042 Author: Justin Tee Date: Fri Apr 25 12:48:05 2025 -0700 scsi: lpfc: Update lpfc version to 14.4.0.9 Update lpfc version to 14.4.0.9 Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 327b110fdea1ee6ea805d7ba620ceb8f76918f4f Author: Justin Tee Date: Fri Apr 25 12:48:04 2025 -0700 scsi: lpfc: Create lpfc_vmid_info sysfs entry A vmid_info sysfs entry is created as a convenience designed for users to obtain VMID information without having to log into fabrics for similar info. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit b5162bb6aa1ec04dff4509b025883524b6d7e7ca Author: Justin Tee Date: Fri Apr 25 12:48:03 2025 -0700 scsi: lpfc: Avoid potential ndlp use-after-free in dev_loss_tmo_callbk Smatch detected a potential use-after-free of an ndlp oject in dev_loss_tmo_callbk during driver unload or fatal error handling. Fix by reordering code to avoid potential use-after-free if initial nodelist reference has been previously removed. Fixes: 4281f44ea8bf ("scsi: lpfc: Prevent NDLP reference count underflow in dev_loss_tmo callback") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-scsi/41c1d855-9eb5-416f-ac12-8b61929201a3@stanley.mountain/ Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit df117c93f58ab93c71413496491fdf543dbd7eca Author: Justin Tee Date: Fri Apr 25 12:48:02 2025 -0700 scsi: lpfc: Prevent failure to reregister with NVMe transport after PRLI retry A failure to unregister with the NVMe transport may occur when a PRLI is retried. Remove duplicate testing of NLP_NVME_TARGET flag. Add a secondary check of the registered state based on the nrport information. Further qualify the ndlp reference count modification when nvme_fc_register_remoteport() returns an error. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 19d768dca549d492fcf222f50067752e80062bc0 Author: Justin Tee Date: Fri Apr 25 12:48:01 2025 -0700 scsi: lpfc: Restart eratt_poll timer if HBA_SETUP flag still unset Reschedule the eratt_poll timer if the HBA_SETUP flag isn’t set yet. The eratt_poll timer should only be cancelled if FC_UNLOADING flag is set or if lpfc_stop_hba_timers() is called as part of error, reset, or offline handling. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 8808c36b48a66ff24032e56538ab2d8df3b09e20 Author: Justin Tee Date: Fri Apr 25 12:48:00 2025 -0700 scsi: lpfc: Notify FC transport of rport disappearance during PCI fcn reset A PCI function reset implies a temporary disappearance of a fc_rport. So, call lpfc_scsi_dev_block(), which sets all mapped fc_rports into the temporary FC_PORTSTATE_BLOCKED state. Once PCI function reset completes and link reinitialized, the fc_rport is rediscovered and FC_PORTSTATE_BLOCKED state is removed. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 05ae6c9c7315d844fbc15afe393f5ba5e5771126 Author: Justin Tee Date: Fri Apr 25 12:47:59 2025 -0700 scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands In lpfc_check_sli_ndlp(), the get_job_els_rsp64_did remote_id assignment does not apply for GEN_REQUEST64 commands as it only has meaning for a ELS_REQUEST64 command. So, if (iocb->ndlp == ndlp) is false, we could erroneously return the wrong value. Fix by replacing the fallthrough statement with a break statement before the remote_id check. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 3d030e2feb8a3545959d80362dd91fb769868c54 Author: Kees Cook Date: Fri Apr 25 23:20:11 2025 -0700 scsi: qla4xxx: Remove duplicate struct crb_addr_pair In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct crb_addr_pair *" and the returned type will be a _different_ "struct crb_addr_pair *", causing a warning. This really stumped me for a bit. :) Drop the redundant declaration. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250426062010.work.878-kees@kernel.org Signed-off-by: Martin K. Petersen commit 386e014202f8380bc034678f157140db2d4dc25a Author: Kees Cook Date: Fri Apr 25 23:19:52 2025 -0700 scsi: qla2xxx: Remove duplicate struct crb_addr_pair In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct crb_addr_pair *" and the returned type will be a _different_ "struct crb_addr_pair *", causing a warning. This really stumped me for a bit. :) Drop the redundant declaration. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250426061951.work.272-kees@kernel.org Signed-off-by: Martin K. Petersen commit edf147e215c6952a9300388372febe24213c83d0 Author: Thorsten Blum Date: Mon Apr 28 19:16:26 2025 +0200 scsi: lpfc: Use secs_to_jiffies() instead of msecs_to_jiffies() Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling the timeouts to milliseconds. No functional changes intended. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250428171625.2499-2-thorsten.blum@linux.dev Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit 62b434b0db2cdc21d6fe978d24d8f84e473cb5e7 Author: Oliver Neukum Date: Mon Apr 28 14:43:45 2025 +0200 scsi: dc395x: Remove DEBUG conditional compilation Building dc395x with debugging enabled has been broken for ages. This driver needs to be converted to dynamic debugging. Remove the crud. Fixes: a862ea31655a ("[SCSI] dc395x: convert to use the data buffer accessors") Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20250428124345.520137-1-oneukum@suse.com Reviewed-by: Colin Ian King Signed-off-by: Martin K. Petersen commit a84a12d34f824fdff06d8191990a94cdb1c17dae Author: Huan Tang Date: Wed Apr 23 17:29:17 2025 +0800 scsi: ufs: core: Fix WB resize using wrong offset Commit 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support") incorrectly reads the value of offset DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP to determine whether WB resize is supported. Fix the issue by reading the value of DEVICE_DESC_PARAM_EXT_WB_SUP to determine whether the device supports WB resize. Fixes: 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support") Reported-by: Peter Wang Closes: https://lore.kernel.org/all/7ce05b28f5d4b4b4973244310010c1487 Signed-off-by: Huan Tang Link: https://lore.kernel.org/r/20250423092917.1031-1-tanghuan@vivo.com Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen commit 3c400df513b7c2ba9f2240eb9c325fa21aa8d950 Merge: 37c15b72815b84 b0b7ee3b574a72 Author: Martin K. Petersen Date: Mon Apr 28 20:56:57 2025 -0400 Merge branch '6.15/scsi-fixes' into 6.16/scsi-staging Pull in fixes from 6.15 and resolve a few conflicts so we can have a clean base for UFS patches. Signed-off-by: Martin K. Petersen commit 0d15a26b247d25cd012134bf8825128fedb15cc9 Author: MD Danish Anwar Date: Thu Apr 24 15:23:16 2025 +0530 net: ti: icssg-prueth: Add ICSSG FW Stats The ICSSG firmware maintains set of stats called PA_STATS. Currently the driver only dumps 4 stats. Add support for dumping more stats. The offset for different stats are defined as MACROs in icssg_switch_map.h file. All the offsets are for Slice0. Slice1 offsets are slice0 + 4. The offset calculation is taken care while reading the stats in emac_update_hardware_stats(). The statistics are documented in Documentation/networking/device_drivers/icssg_prueth.rst Reviewed-by: Simon Horman Signed-off-by: MD Danish Anwar Link: https://patch.msgid.link/20250424095316.2643573-1-danishanwar@ti.com Signed-off-by: Jakub Kicinski commit a427e7f99b710f3547f0bfb91c4371acb56e1c84 Author: Joe Damato Date: Wed Apr 23 20:46:44 2025 +0000 tools/Makefile: Add ynl target Add targets to build, clean, and install ynl headers, libynl.a, and python tooling. Signed-off-by: Joe Damato Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250423204647.190784-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit ef7d33e174564d6294edd00ca797e2b0aac76259 Author: Justin Lai Date: Fri Apr 25 14:40:57 2025 +0800 rtase: Modify the format specifier in snprintf to %u Modify the format specifier in snprintf to %u. Signed-off-by: Justin Lai Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250425064057.30035-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski commit c0fe189b590c754f69e0cb87c5b5674cad535cf6 Author: Joel Savitz Date: Mon Apr 21 12:17:23 2025 -0400 docs: namespace: Tweak and reword resource control doc Fix the document title and reword the phrasing to active voice. Signed-off-by: Joel Savitz Message-ID: <20250421161723.1138903-1-jsavitz@redhat.com> Signed-off-by: Jonathan Corbet commit 6c2f0b28d76e76c9879c030967e6587ebaeabce0 Author: Mauro Carvalho Chehab Date: Fri Apr 25 08:08:53 2025 +0800 docs: Makefile: store __pycache__ at the output directory Instead of blocking creation of *.pyc cache, store python cache under Documentation/output/__pycache__ Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <1b9e7f34c1d99a27a8abb308da3221b4663b5693.1745539360.git.mchehab+huawei@kernel.org> commit e3b42e94cf108e1cb4bdd628271c1565aceaf943 Author: Mauro Carvalho Chehab Date: Fri Apr 25 15:13:40 2025 +0800 scripts/lib/kdoc/kdoc_parser.py: move kernel entry to a class The KernelDoc class is too complex. Start optimizing it by placing the kernel-doc parser entry to a separate class. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: <28b456f726a022011f0ce5810dbcc26827c1403a.1745564565.git.mchehab+huawei@kernel.org> commit a4bd43d6f7b72b90e064eb8c22c720126cfc1525 Author: Mauro Carvalho Chehab Date: Fri Apr 25 15:13:39 2025 +0800 scripts/lib/kdoc: change mode to 0644 The script library here contain just classes. Remove execution permission. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: commit b437bf2dc577b100824b4d28c26792b206278ef3 Author: Mauro Carvalho Chehab Date: Fri Apr 25 15:13:38 2025 +0800 docs: Sphinx: kerneldoc: only initialize kernel-doc classes once Instead of re-creating the objects every time, initialize it just once. This allows caching previously parsed objects. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: commit 6f450c82c35e40012b71116b84d3b3a14094c787 Merge: 034ebd3c82f539 1549bd06e340ea Author: Jakub Kicinski Date: Mon Apr 28 16:19:19 2025 -0700 Merge branch 'phase-out-hybrid-pci-devres-api' Philipp Stanner says: ==================== Phase out hybrid PCI devres API Fixes a number of minor issues with the usage of the PCI API in net. Notbaly, it replaces calls to the sometimes-managed pci_request_regions() to the always-managed pcim_request_all_regions(), enabling us to remove that hybrid functionality from PCI. ==================== Link: https://patch.msgid.link/20250425085740.65304-2-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 1549bd06e340eaac2c317a045c493c3e9cc454cf Author: Philipp Stanner Date: Fri Apr 25 10:57:41 2025 +0200 net: thunder_bgx: Don't disable PCI device manually thunder_bgx's PCI device is enabled with pcim_enable_device(), a managed devres function which ensures that the device gets enabled on driver detach automatically. Remove the calls to pci_disable_device(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-10-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 06133ddc3590845c91d8bd44425b170fce11837f Author: Philipp Stanner Date: Fri Apr 25 10:57:40 2025 +0200 net: thunder_bgx: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Furthermore, the PCI function being managed implies that it's not necessary to call pci_release_regions() manually. Remove the calls to pci_release_regions(). Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-9-phasta@kernel.org Signed-off-by: Jakub Kicinski commit fad4d94d9ae5a67b76b934e544be91220b682ef1 Author: Philipp Stanner Date: Fri Apr 25 10:57:39 2025 +0200 net: mdio: thunder: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Furthermore, the PCI function being managed implies that it's not necessary to call pci_release_regions() manually. Remove the calls to pci_release_regions(). Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-8-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 6e5f7a5b5e0c6623742298fe0d5a0d3df6be1afc Author: Philipp Stanner Date: Fri Apr 25 10:57:38 2025 +0200 net: ethernet: sis900: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Acked-by: Daniele Venzano Link: https://patch.msgid.link/20250425085740.65304-7-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 2a5a74947a2bdd8ba437f79e746c23724182c662 Author: Philipp Stanner Date: Fri Apr 25 10:57:37 2025 +0200 net: ethernet: natsemi: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-6-phasta@kernel.org Signed-off-by: Jakub Kicinski commit adc36d0914f629e12700ef223f146e1c65d01c57 Author: Philipp Stanner Date: Fri Apr 25 10:57:36 2025 +0200 net: tulip: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-5-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 48217b8345294e8e49402f8ec7bd1fcb5f8705a6 Author: Philipp Stanner Date: Fri Apr 25 10:57:35 2025 +0200 net: octeontx2: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Furthermore, the PCI function being managed implies that it's not necessary to call pci_release_regions() manually. Remove the calls to pci_release_regions(). Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250425085740.65304-4-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 66ada7471155cb70f7c651fab69327322ab9d92b Author: Philipp Stanner Date: Fri Apr 25 10:57:34 2025 +0200 net: prestera: Use pure PCI devres API The currently used function pci_request_regions() is one of the problematic "hybrid devres" PCI functions, which are sometimes managed through devres, and sometimes not (depending on whether pci_enable_device() or pcim_enable_device() has been called before). The PCI subsystem wants to remove this behavior and, therefore, needs to port all users to functions that don't have this problem. Furthermore, the PCI function being managed implies that it's not necessary to call pci_release_regions() manually. Remove the calls to pci_release_regions(). Replace pci_request_regions() with pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Elad Nachman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250425085740.65304-3-phasta@kernel.org Signed-off-by: Jakub Kicinski commit 292c39b4d78c296e29220a928d05a53f5e64747d Author: Adrian Bütler Date: Sat Apr 26 14:23:03 2025 +0200 Documentation: x86: Fix a typo in fsgs.rst Fix a spelling typo in fsgs.rst. Signed-off-by: Adrian Bütler Signed-off-by: Jonathan Corbet Message-ID: <20250426122303.15905-1-buetlera123@gmail.com> commit 18672fe12367ed44df24ff38aa6ac350fac479f7 Author: Emanuele Ghidoli Date: Mon Apr 14 19:14:55 2025 +0200 power: reset: add Toradex Embedded Controller Toradex SMARC iMX8MP and SMARC iMX95 SoM modules use a small Embedded Controller (EC) to manage power and reset functions and related SMARC signals. This driver implements power-off and reboot handlers, communicating with the EC via I2C to issue the appropriate power management commands. During probe, the driver logs the Embedded Controller ID (unique ID for each SMARC board supported) in hex format along with the firmware version. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250414171455.155155-3-francesco@dolcini.it Signed-off-by: Sebastian Reichel commit 1cf87b00a74d3ee3006d825855e0075ddd2eab2f Author: Emanuele Ghidoli Date: Mon Apr 14 19:14:54 2025 +0200 dt-bindings: power: reset: add toradex,smarc-ec The Toradex Embedded Controller provides system power-off and restart functionalities. The two variants, SMARC iMX95 and SMARC iMX8P, have a compatible I2C interface. Besides this, different compatible values are defined to allow for future implementation differences. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250414171455.155155-2-francesco@dolcini.it Signed-off-by: Sebastian Reichel commit 6382f4e4e7bd65b829d1d598b1315e905accc15c Author: Cui Wei Date: Sat Apr 26 21:56:09 2025 +0800 Documentation: fix speculation.rst chapter 'Mitigating speculation side-channels' should be a chapter rather than title. Signed-off-by: Cui Wei Signed-off-by: Jonathan Corbet Message-ID: <20250426135609.735-1-chris.wei.cui@gmail.com> commit c1f7375a246e5f810191a6c3031d2fa2b80e9f5e Author: Jelle van der Waa Date: Mon Apr 14 15:18:40 2025 +0200 power: supply: support charge_types in extensions Similar to charge_behaviour, charge_types is an enum option where reading the property shows the supported values, with the active value surrounded by brackets. To be able to use it with a power_supply extension a bitmask with the supported charge_Types values has to be added to power_supply_ext. Signed-off-by: Jelle van der Waa Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250414131840.382756-2-jvanderwaa@redhat.com Signed-off-by: Sebastian Reichel commit 034ebd3c82f5396c678d9a322afc83f616b6edde Merge: c0b0a360ed4ca0 c347fb0ff844f2 Author: Jakub Kicinski Date: Mon Apr 28 15:49:14 2025 -0700 Merge branch 'virtio-net-disable-delayed-refill-when-pausing-rx' Bui Quang Minh says: ==================== virtio-net: disable delayed refill when pausing rx Hi everyone, This only includes the selftest for virtio-net deadlock bug. The fix commit has been applied already. Link: https://lore.kernel.org/virtualization/174537302875.2111809.8543884098526067319.git-patchwork-notify@kernel.org/T/ ==================== Link: https://patch.msgid.link/20250425071018.36078-1-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit c347fb0ff844f2c72fa779c76ec8b2d7385127e6 Author: Bui Quang Minh Date: Fri Apr 25 14:10:18 2025 +0700 selftests: net: add a virtio_net deadlock selftest The selftest reproduces the deadlock scenario when binding/unbinding XDP program, XDP socket, rx ring resize on virtio_net interface. Signed-off-by: Bui Quang Minh Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250425071018.36078-5-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit b2b4555cf2a6cc4d08ddfaa181687bb7a8559a51 Author: Bui Quang Minh Date: Fri Apr 25 14:10:17 2025 +0700 selftests: net: retry when bind returns EBUSY in xdp_helper When binding the XDP socket, we may get EBUSY because the deferred destructor of XDP socket in previous test has not been executed yet. If that is the case, just sleep and retry some times. Signed-off-by: Bui Quang Minh Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250425071018.36078-4-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit 5d346179e709ea688f29b450a918cbf2ead80960 Author: Bui Quang Minh Date: Fri Apr 25 14:10:16 2025 +0700 selftests: net: add flag to force zerocopy mode in xdp_helper This commit adds an optional -z flag to xdp_helper. When this flag is provided, the XDP socket binding is forced to be in zerocopy mode. Signed-off-by: Bui Quang Minh Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250425071018.36078-3-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit 59dd07db92c166ca3947d2a1bf548d57b7f03316 Author: Bui Quang Minh Date: Fri Apr 25 14:10:15 2025 +0700 selftests: net: move xdp_helper to net/lib Move xdp_helper to net/lib to make it easier for other selftests to use the helper. Signed-off-by: Bui Quang Minh Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20250425071018.36078-2-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski commit 11741b8e382d34b13277497ab91123d8b0b5c2db Author: Dan Carpenter Date: Fri Mar 21 17:34:06 2025 +0300 power: supply: max77705: Fix workqueue error handling in probe The create_singlethread_workqueue() doesn't return error pointers, it returns NULL. Also cleanup the workqueue on the error paths. Fixes: a6a494c8e3ce ("power: supply: max77705: Add charger driver for Maxim 77705") Signed-off-by: Dan Carpenter Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/547656e3-4a5f-4f2e-802b-4edcb7c576b0@stanley.mountain Signed-off-by: Sebastian Reichel commit 0014af802193aa3547484b5db0f1a258bad28c81 Author: Florian Westphal Date: Tue Apr 8 15:55:53 2025 +0200 netfilter: nf_tables: export set count and backend name to userspace nf_tables picks a suitable set backend implementation (bitmap, hash, rbtree..) based on the userspace requirements. Figuring out the chosen backend requires information about the set flags and the kernel version. Export this to userspace so nft can include this information in '--debug=netlink' output. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 149a133a548158586058d14963b4e3a699d0de70 Author: Chen Linxuan Date: Tue Apr 8 15:35:50 2025 +0800 docs: tproxy: fix formatting for nft code block The nft command snippet for redirecting traffic isn't formatted in a literal code block like the rest of snippets. Fix the formatting inconsistency. Signed-off-by: Chen Linxuan Reviewed-by: Bagas Sanjaya Signed-off-by: Pablo Neira Ayuso commit eaa2b34db021c304697b964505cd2477c7c77eb6 Author: Xuanqiang Luo Date: Fri Apr 4 17:47:51 2025 +0800 netfilter: conntrack: Remove redundant NFCT_ALIGN call The "nf_ct_tmpl_alloc" function had a redundant call to "NFCT_ALIGN" when aligning the pointer "p". Since "NFCT_ALIGN" always gives the same result for the same input. Signed-off-by: Xuanqiang Luo Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 608a76b65288698677843d2f22418e03391ef95f Author: Dhananjay Ugwekar Date: Mon Apr 28 07:16:24 2025 +0000 cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option Initialize lower frequency limit to the "Requested CPU Min frequency" BIOS option (if it is set) value as part of the driver->init() callback. The BIOS specified value is passed by the PMFW as min_perf in CPPC_REQ MSR. To ensure that we don't mistake a stale min_perf value in CPPC_REQ value as the "Requested CPU Min frequency" during a kexec wakeup, reset the CPPC_REQ.min_perf value back to the BIOS specified one in the offline, exit and suspend callbacks. amd_pstate_target() and amd_pstate_epp_update_limit() which are invoked as part of the resume() and online() callbacks will take care of restoring the CPPC_REQ back to the correct values. Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250428071623.4309-1-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello commit 98b52c6b0b528764b454350a11c53f757304afbc Author: Dhananjay Ugwekar Date: Mon Apr 28 06:25:21 2025 +0000 cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver Rename and use the existing amd_pstate_epp callbacks for amd_pstate driver as well. Remove the debug print in online callback while at it. These callbacks will be needed to support the "Requested CPU Min Frequency" BIOS option. Reviewed-by: Mario Limonciello Signed-off-by: Dhananjay Ugwekar Link: https://lore.kernel.org/r/20250428062520.4997-2-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello commit c0b0a360ed4ca077cf72a9c3cd15ac89f6093f3a Merge: ccc25158c22bf9 dc82a33297fc2c Author: Jakub Kicinski Date: Mon Apr 28 14:07:00 2025 -0700 Merge branch 'veth-qdisc-backpressure-and-qdisc-check-refactor' Jesper Dangaard Brouer says: ==================== veth: qdisc backpressure and qdisc check refactor This patch series addresses TX drops seen on veth devices under load, particularly when using threaded NAPI, which is our setup in production. The root cause is that the NAPI consumer often runs on a different CPU than the producer. Combined with scheduling delays or simply slower consumption, this increases the chance that the ptr_ring fills up before packets are drained, resulting in drops from veth_xmit() (ndo_start_xmit()). To make this easier to reproduce, we’ve created a script that sets up a test scenario using network namespaces. The script inserts 1000 iptables rules in the consumer namespace to slow down packet processing and amplify the issue. Reproducer script: https://github.com/xdp-project/xdp-project/blob/main/areas/core/veth_setup01_NAPI_TX_drops.sh This series first introduces a helper to detect no-queue qdiscs and then uses it in the veth driver to conditionally apply qdisc-level backpressure when a real qdisc is attached. The behavior is off by default and opt-in, ensuring minimal impact and easy activation. v6: https://lore.kernel.org/174549933665.608169.392044991754158047.stgit@firesoul v5: https://lore.kernel.org/174489803410.355490.13216831426556849084.stgit@firesoul v4 https://lore.kernel.org/174472463778.274639.12670590457453196991.stgit@firesoul v3: https://lore.kernel.org/174464549885.20396.6987653753122223942.stgit@firesoul v2: https://lore.kernel.org/174412623473.3702169.4235683143719614624.stgit@firesoul RFC-v1: https://lore.kernel.org/174377814192.3376479.16481605648460889310.stgit@firesoul ==================== Link: https://patch.msgid.link/174559288731.827981.8748257839971869213.stgit@firesoul Signed-off-by: Jakub Kicinski commit dc82a33297fc2c58cb0b2b008d728668d45c0f6a Author: Jesper Dangaard Brouer Date: Fri Apr 25 16:55:40 2025 +0200 veth: apply qdisc backpressure on full ptr_ring to reduce TX drops In production, we're seeing TX drops on veth devices when the ptr_ring fills up. This can occur when NAPI mode is enabled, though it's relatively rare. However, with threaded NAPI - which we use in production - the drops become significantly more frequent. The underlying issue is that with threaded NAPI, the consumer often runs on a different CPU than the producer. This increases the likelihood of the ring filling up before the consumer gets scheduled, especially under load, leading to drops in veth_xmit() (ndo_start_xmit()). This patch introduces backpressure by returning NETDEV_TX_BUSY when the ring is full, signaling the qdisc layer to requeue the packet. The txq (netdev queue) is stopped in this condition and restarted once veth_poll() drains entries from the ring, ensuring coordination between NAPI and qdisc. Backpressure is only enabled when a qdisc is attached. Without a qdisc, the driver retains its original behavior - dropping packets immediately when the ring is full. This avoids unexpected behavior changes in setups without a configured qdisc. With a qdisc in place (e.g. fq, sfq) this allows Active Queue Management (AQM) to fairly schedule packets across flows and reduce collateral damage from elephant flows. A known limitation of this approach is that the full ring sits in front of the qdisc layer, effectively forming a FIFO buffer that introduces base latency. While AQM still improves fairness and mitigates flow dominance, the latency impact is measurable. In hardware drivers, this issue is typically addressed using BQL (Byte Queue Limits), which tracks in-flight bytes needed based on physical link rate. However, for virtual drivers like veth, there is no fixed bandwidth constraint - the bottleneck is CPU availability and the scheduler's ability to run the NAPI thread. It is unclear how effective BQL would be in this context. This patch serves as a first step toward addressing TX drops. Future work may explore adapting a BQL-like mechanism to better suit virtual devices like veth. Reported-by: Yan Zhai Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Toshiaki Makita Link: https://patch.msgid.link/174559294022.827981.1282809941662942189.stgit@firesoul Signed-off-by: Jakub Kicinski commit 34dd0fecaa02d654c447d43a7e4c72f9b18b7033 Author: Jesper Dangaard Brouer Date: Fri Apr 25 16:55:31 2025 +0200 net: sched: generalize check for no-queue qdisc on TX queue The "noqueue" qdisc can either be directly attached, or get default attached if net_device priv_flags has IFF_NO_QUEUE. In both cases, the allocated Qdisc structure gets it's enqueue function pointer reset to NULL by noqueue_init() via noqueue_qdisc_ops. This is a common case for software virtual net_devices. For these devices with no-queue, the transmission path in __dev_queue_xmit() will bypass the qdisc layer. Directly invoking device drivers ndo_start_xmit (via dev_hard_start_xmit). In this mode the device driver is not allowed to ask for packets to be queued (either via returning NETDEV_TX_BUSY or stopping the TXQ). The simplest and most reliable way to identify this no-queue case is by checking if enqueue == NULL. The vrf driver currently open-codes this check (!qdisc->enqueue). While functionally correct, this low-level detail is better encapsulated in a dedicated helper for clarity and long-term maintainability. To make this behavior more explicit and reusable, this patch introduce a new helper: qdisc_txq_has_no_queue(). Helper will also be used by the veth driver in the next patch, which introduces optional qdisc-based backpressure. This is a non-functional change. Reviewed-by: David Ahern Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jesper Dangaard Brouer Link: https://patch.msgid.link/174559293172.827981.7583862632045264175.stgit@firesoul Signed-off-by: Jakub Kicinski commit ccc25158c22bf9aaf1242182b852bb6c73e88ac3 Author: Arnd Bergmann Date: Fri Apr 25 13:27:56 2025 +0200 mdio: fix CONFIG_MDIO_DEVRES selects The newly added rtl9300 driver needs MDIO_DEVRES: x86_64-linux-ld: drivers/net/mdio/mdio-realtek-rtl9300.o: in function `rtl9300_mdiobus_probe': mdio-realtek-rtl9300.c:(.text+0x941): undefined reference to `devm_mdiobus_alloc_size' x86_64-linux-ld: mdio-realtek-rtl9300.c:(.text+0x9e2): undefined reference to `__devm_mdiobus_register' Since this is a hidden symbol, it needs to be selected by each user, rather than the usual 'depends on'. I see that there are a few other drivers that accidentally use 'depends on', so fix these as well for consistency and to avoid dependency loops. Fixes: 37f9b2a6c086 ("net: ethernet: Add missing depends on MDIO_DEVRES") Fixes: 24e31e474769 ("net: mdio: Add RTL9300 MDIO driver") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Packham Link: https://patch.msgid.link/20250425112819.1645342-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit af3c6eacce0c464f28fe0e3d365b3860aba07931 Author: Wenbin Yao Date: Tue Apr 22 18:36:23 2025 +0800 PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane As per DWC PCIe registers description 4.30a, section 1.13.43, NUM_OF_LANES named as PORT_LOGIC_LINK_WIDTH in PCIe DWC driver, is referred to as the "Predetermined Number of Lanes" in PCIe r6.0, sec 4.2.7.2.1, which explains the conditions required to enter Polling.Configuration: Next state is Polling.Configuration after at least 1024 TS1 Ordered Sets were transmitted, and all Lanes that detected a Receiver during Detect receive eight consecutive training sequences ... Otherwise, after a 24 ms timeout the next state is: Polling.Configuration if, (i) Any Lane, which detected a Receiver during Detect, received eight consecutive training sequences ... and a minimum of 1024 TS1 Ordered Sets are transmitted after receiving one TS1 or TS2 Ordered Set. And (ii) At least a predetermined set of Lanes that detected a Receiver during Detect have detected an exit from Electrical Idle at least once since entering Polling.Active. Note: This may prevent one or more bad Receivers or Transmitters from holding up a valid Link from being configured, and allow for additional training in Polling.Configuration. The exact set of predetermined Lanes is implementation specific. Note: Any Lane that receives eight consecutive TS1 or TS2 Ordered Sets should have detected an exit from Electrical Idle at least once since entering Polling.Active. In a PCIe link supporting multiple lanes, if PORT_LOGIC_LINK_WIDTH is set to lane width the hardware supports, all lanes that detect a receiver during the Detect phase must receive eight consecutive training sequences. Otherwise, LTSSM will not enter Polling.Configuration and link training will fail. Therefore, always set PORT_LOGIC_LINK_WIDTH to 1, regardless of the number of lanes the port actually supports, to make link up more robust. This setting will not affect the intended link width if all lanes are functional. Additionally, the link can still be established with at least one lane if other lanes are faulty. Co-developed-by: Qiang Yu Signed-off-by: Qiang Yu Signed-off-by: Wenbin Yao [mani: subject change] Signed-off-by: Manivannan Sadhasivam [bhelgaas: update PCIe spec citation, format quote] Signed-off-by: Bjorn Helgaas Tested-by: Niklas Cassel Link: https://patch.msgid.link/20250422103623.462277-1-quic_wenbyao@quicinc.com commit 7bc4fa663e173559d7ba6e681ff4abb10c8c0f79 Merge: e527e891492d9e ef1179f78119c2 Author: Jakub Kicinski Date: Mon Apr 28 13:37:28 2025 -0700 Merge branch 'net-stmmac-dwmac-loongson-add-loongson-2k3000-support' Huacai Chen says: ==================== net: stmmac: dwmac-loongson: Add Loongson-2K3000 support This series add stmmac driver support for Loongson-2K3000/Loongson-3B6000M, which introduces a new CORE ID (0x12) and a new PCI device ID (0x7a23). The new core reduces channel numbers from 8 to 4, but checksum is supported for all channels. ==================== Note that the first patch of the series has been merged separately as commit f438eee2c8c9 ("net: stmmac: dwmac-loongson: Move queue number init to common function") Link: https://patch.msgid.link/20250424072209.3134762-1-chenhuacai@loongson.cn Signed-off-by: Jakub Kicinski commit ef1179f78119c243bdc276cfb819242bc35308cd Author: Huacai Chen Date: Thu Apr 24 15:22:09 2025 +0800 net: stmmac: dwmac-loongson: Add new GMAC's PCI device ID support Add a new GMAC's PCI device ID (0x7a23) support which is used in Loongson-2K3000/Loongson-3B6000M. The new GMAC device use external PHY, so it reuses loongson_gmac_data() as the old GMAC device (0x7a03), and the new GMAC device still doesn't support flow control now. Reviewed-by: Andrew Lunn Reviewed-by: Yanteng Si Tested-by: Henry Chen Tested-by: Biao Dong Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen Link: https://patch.msgid.link/20250424072209.3134762-4-chenhuacai@loongson.cn Signed-off-by: Jakub Kicinski commit 2725fc2e0b6113ea9e655b77409d6129876e45e9 Author: Huacai Chen Date: Thu Apr 24 15:22:08 2025 +0800 net: stmmac: dwmac-loongson: Add new multi-chan IP core support Add a new multi-chan IP core (0x12) support which is used in Loongson- 2K3000/Loongson-3B6000M. Compared with the 0x10 core, the new 0x12 core reduces channel numbers from 8 to 4, but checksum is supported for all channels. Add a "multichan" flag to loongson_data, so that we can simply use a "if (ld->multichan)" condition rather than the complicated condition "if (ld->loongson_id == DWMAC_CORE_MULTICHAN_V1 || ld->loongson_id == DWMAC_CORE_MULTICHAN_V2)". Reviewed-by: Andrew Lunn Tested-by: Henry Chen Tested-by: Biao Dong Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen Reviewed-by: Yanteng Si Link: https://patch.msgid.link/20250424072209.3134762-3-chenhuacai@loongson.cn Signed-off-by: Jakub Kicinski commit 52ae3f5da7e5adbe3d1319573b55dac470abb83c Author: Finn Thain Date: Thu Apr 24 10:07:26 2025 +1000 m68k: mac: Fix macintosh_config for Mac II When booted on my Mac II, the kernel prints this: Detected Macintosh model: 6 Apple Macintosh Unknown The catch-all entry ("Unknown") is mac_data_table[0] which is only needed in the unlikely event that the bootinfo model ID can't be matched. When model ID is 6, the search should begin and end at mac_data_table[1]. Fix the off-by-one error that causes this problem. Cc: Joshua Thompson Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/d0f30a551064ca4810b1c48d5a90954be80634a9.1745453246.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven commit a8a19a1963e8dc579f93169cd45f4a3bc16673bf Author: Thorsten Blum Date: Mon Apr 21 14:28:37 2025 +0200 m68k: Replace strcpy() with strscpy() in hardware_proc_show() strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Reviewed-by: Jean-Michel Hautbois Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250421122839.363619-1-thorsten.blum@linux.dev Signed-off-by: Geert Uytterhoeven commit 2d099ccaadf623d3aaa7f8b60dbd9eb3f5b375ac Author: Namhyung Kim Date: Tue Mar 25 21:40:01 2025 -0700 perf test: Add perf trace summary test $ sudo ./perf test -vv 'trace summary' 109: perf trace summary: --- start --- test child forked, pid 3501572 testing: perf trace -s -- true testing: perf trace -S -- true testing: perf trace -s --summary-mode=thread -- true testing: perf trace -S --summary-mode=total -- true testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true testing: perf trace -as --summary-mode=total --no-bpf-summary -- true testing: perf trace -as --summary-mode=thread --bpf-summary -- true testing: perf trace -as --summary-mode=total --bpf-summary -- true testing: perf trace -aS --summary-mode=total --bpf-summary -- true ---- end(0) ---- 109: perf trace summary : Ok Reviewed-by: Howard Chu Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20250326044001.3503432-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1bec43f5239dddd60565553cf2b6a98f416500ae Author: Namhyung Kim Date: Tue Mar 25 21:40:00 2025 -0700 perf trace: Implement syscall summary in BPF When -s/--summary option is used, it doesn't need (augmented) arguments of syscalls. Let's skip the augmentation and load another small BPF program to collect the statistics in the kernel instead of copying the data to the ring-buffer to calculate the stats in userspace. This will be much more light-weight than the existing approach and remove any lost events. Let's add a new option --bpf-summary to control this behavior. I cannot make it default because there's no way to get e_machine in the BPF which is needed for detecting different ABIs like 32-bit compat mode. No functional changes intended except for no more LOST events. :) $ sudo ./perf trace -as --summary-mode=total --bpf-summary sleep 1 Summary of events: total, 6194 events syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ epoll_wait 561 0 4530.843 0.000 8.076 520.941 18.75% futex 693 45 4317.231 0.000 6.230 500.077 21.98% poll 300 0 1040.109 0.000 3.467 120.928 17.02% clock_nanosleep 1 0 1000.172 1000.172 1000.172 1000.172 0.00% ppoll 360 0 872.386 0.001 2.423 253.275 41.91% epoll_pwait 14 0 384.349 0.001 27.453 380.002 98.79% pselect6 14 0 108.130 7.198 7.724 8.206 0.85% nanosleep 39 0 43.378 0.069 1.112 10.084 44.23% ... Reviewed-by: Howard Chu Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20250326044001.3503432-1-namhyung@kernel.org [ Added fixup sent from Namhyung in response to my report to make it also dependent on CONFIG_TRACE ] Signed-off-by: Arnaldo Carvalho de Melo commit e59236b5a09e168fdf961a10d2519cef44f5d6b4 Author: Eric Biggers Date: Mon Apr 28 11:38:38 2025 -0700 x86/sgx: Use SHA-256 library API instead of crypto_shash API This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use. Signed-off-by: Eric Biggers Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250428183838.799333-1-ebiggers%40kernel.org commit b376108e1f88df9fbbb3867634150a3dd71e3acb Author: Mark Rutland Date: Thu Apr 17 20:01:13 2025 +0100 arm64/fpsimd: signal: Clear TPIDR2 when delivering signals Linux is intended to be compatible with userspace written to Arm's AAPCS64 procedure call standard [1,2]. For the Scalable Matrix Extension (SME), AAPCS64 was extended with a "ZA lazy saving scheme", where SME's ZA tile is lazily callee-saved and caller-restored. In this scheme, TPIDR2_EL0 indicates whether the ZA tile is live or has been saved by pointing to a "TPIDR2 block" in memory, which has a "za_save_buffer" pointer. This scheme has been implemented in GCC and LLVM, with necessary runtime support implemented in glibc. AAPCS64 does not specify how the ZA lazy saving scheme is expected to interact with signal handling, and the behaviour that AAPCS64 currently recommends for (sig)setjmp() and (sig)longjmp() does not always compose safely with signal handling, as explained below. When Linux delivers a signal, it creates signal frames which contain the original values of PSTATE.ZA, the ZA tile, and TPIDR_EL2. Between saving the original state and entering the signal handler, Linux clears PSTATE.ZA, but leaves TPIDR2_EL0 unchanged. Consequently a signal handler can be entered with PSTATE.ZA=0 (meaning accesses to ZA will trap), while TPIDR_EL0 is non-null (which may indicate that ZA needs to be lazily saved, depending on the contents of the TPIDR2 block). While in this state, libc and/or compiler runtime code, such as longjmp(), may attempt to save ZA. As PSTATE.ZA=0, these accesses will trap, causing the kernel to inject a SIGILL. Note that by virtue of lazy saving occurring in libc and/or C runtime code, this can be triggered by application/library code which is unaware of SME. To avoid the problem above, the kernel must ensure that signal handlers are entered with PSTATE.ZA and TPIDR2_EL0 configured in a manner which complies with the ZA lazy saving scheme. Practically speaking, the only choice is to enter signal handlers with PSTATE.ZA=0 and TPIDR2_EL0=NULL. This change should not impact SME code which does not follow the ZA lazy saving scheme (and hence does not use TPIDR2_EL0). An alternative approach that was considered is to have the signal handler inherit the original values of both PSTATE.ZA and TPIDR2_EL0, relying on lazy save/restore sequences being idempotent and capable of racing safely. This is not safe as signal handlers must be assumed to have a "private ZA" interface, and therefore cannot be entered with PSTATE.ZA=1 and TPIDR2_EL0=NULL, but it is legitimate for signals to be taken from this state. With the kernel fixed to clear TPIDR2_EL0, there are a couple of remaining issues (largely masked by the first issue) that must be fixed in userspace: (1) When a (sig)setjmp() + (sig)longjmp() pair cross a signal boundary, ZA state may be discarded when it needs to be preserved. Currently, the ZA lazy saving scheme recommends that setjmp() does not save ZA, and recommends that longjmp() is responsible for saving ZA. A call to longjmp() in a signal handler will not have visibility of ZA state that existed prior to entry to the signal, and when a longjmp() is used to bypass a usual signal return, unsaved ZA state will be discarded erroneously. To fix this, it is necessary for setjmp() to eagerly save ZA state, and for longjmp() to configure PSTATE.ZA=0 and TPIDR2_EL0=NULL. This works regardless of whether a signal boundary is crossed. (2) When a C++ exception is thrown and crosses a signal boundary before it is caught, ZA state may be discarded when it needs to be preserved. AAPCS64 requires that exception handlers are entered with PSTATE.{SM,ZA}={0,0} and TPIDR2_EL0=NULL, with exception unwind code expected to perform any necessary save of ZA state. Where it is necessary to perform an exception unwind across an exception boundary, the unwind code must recover any necessary ZA state (along with TPIDR2) from signal frames. Fix the kernel as described above, with setup_return() clearing TPIDR2_EL0 when delivering a signal. Folk on CC are working on fixes for the remaining userspace issues, including updates/fixes to the AAPCS64 specification and glibc. [1] https://github.com/ARM-software/abi-aa/releases/download/2025Q1/aapcs64.pdf [2] https://github.com/ARM-software/abi-aa/blob/c51addc3dc03e73a016a1e4edf25440bcac76431/aapcs64/aapcs64.rst Fixes: 39782210eb7e ("arm64/sme: Implement ZA signal handling") Fixes: 39e54499280f ("arm64/signal: Include TPIDR2 in the signal context") Signed-off-by: Mark Rutland Cc: Daniel Kiss Cc: Marc Zyngier Cc: Mark Brown Cc: Richard Sandiford Cc: Sander De Smalen Cc: Tamas Petz Cc: Will Deacon Cc: Yury Khrustalev Link: https://lore.kernel.org/r/20250417190113.3778111-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c0a62eadb6fd158e4d6d4d47d806109e7ae32e8b Author: Eric Biggers Date: Mon Apr 28 11:30:06 2025 -0700 x86/microcode/AMD: Use sha256() instead of init/update/final Just call sha256() instead of doing the init/update/final sequence. No functional changes. Signed-off-by: Eric Biggers Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250428183006.782501-1-ebiggers@kernel.org commit e0136112e99d63d87a18bfec3ffb16c414f903a1 Author: Peng Hao Date: Mon Apr 28 14:30:13 2025 +0800 x86/sev: Remove unnecessary GFP_KERNEL_ACCOUNT for temporary variables Some variables allocated in sev_send_update_data are released when the function exits, so there is no need to set GFP_KERNEL_ACCOUNT. Signed-off-by: Peng Hao Link: https://lore.kernel.org/r/20250428063013.62311-1-flyingpeng@tencent.com Signed-off-by: Sean Christopherson commit 11d45175111d933c5175acc28e56af2213dd5cd6 Author: Yan Zhao Date: Tue Mar 18 09:33:10 2025 +0800 KVM: x86/mmu: Warn if PFN changes on shadow-present SPTE in shadow MMU Warn if PFN changes on shadow-present SPTE in mmu_set_spte(). KVM should _never_ change the PFN of a shadow-present SPTE. In mmu_set_spte(), there is a WARN_ON_ONCE() on pfn changes on shadow-present SPTE in mmu_spte_update() to detect this condition. However, that WARN_ON_ONCE() is not hittable since mmu_set_spte() invokes drop_spte() earlier before mmu_spte_update(), which clears SPTE to a !shadow-present state. So, before invoking drop_spte(), add a WARN_ON_ONCE() in mmu_set_spte() to warn PFN change of a shadow-present SPTE. For the spurious prefetch fault, only return RET_PF_SPURIOUS directly when PFN is not changed. When PFN changes, fall through to follow the sequence of drop_spte(), warn of PFN change, make_spte(), flush tlb, rmap_add(). Signed-off-by: Yan Zhao Link: https://lore.kernel.org/r/20250318013310.5781-1-yan.y.zhao@intel.com Signed-off-by: Sean Christopherson commit 988da7820206405ef2d8afde83c2c2cd7af503a2 Author: Yan Zhao Date: Tue Mar 18 09:32:38 2025 +0800 KVM: x86/tdp_mmu: WARN if PFN changes for spurious faults Add a WARN() to assert that KVM does _not_ change the PFN of a shadow-present SPTE during spurious fault handling. KVM should _never_ change the PFN of a shadow-present SPTE and TDP MMU already BUG()s on this. However, spurious faults just return early before the existing BUG() could be hit. Suggested-by: Sean Christopherson Signed-off-by: Yan Zhao Link: https://lore.kernel.org/r/20250318013238.5732-1-yan.y.zhao@intel.com Signed-off-by: Sean Christopherson commit d17cc13cc484821b03e5c1cc5808ecb83d10027e Author: Yan Zhao Date: Tue Mar 18 09:32:10 2025 +0800 KVM: x86/tdp_mmu: Merge prefetch and access checks for spurious faults Combine prefetch and is_access_allowed() checks into a unified path to detect spurious faults, since both cases now share identical logic. No functional changes. Signed-off-by: Yan Zhao Link: https://lore.kernel.org/r/20250318013210.5701-1-yan.y.zhao@intel.com Signed-off-by: Sean Christopherson commit ea9fcdf76d3d1d659fb3daaa0cca7b1f4a0697bc Author: Yan Zhao Date: Tue Mar 18 09:31:11 2025 +0800 KVM: x86/mmu: Further check old SPTE is leaf for spurious prefetch fault Instead of simply treating a prefetch fault as spurious when there's a shadow-present old SPTE, further check if the old SPTE is leaf to determine if a prefetch fault is spurious. It's not reasonable to treat a prefetch fault as spurious when there's a shadow-present non-leaf SPTE without a corresponding shadow-present leaf SPTE. e.g., in the following sequence, a prefetch fault should not be considered spurious: 1. add a memslot with size 4K 2. prefault GPA A in the memslot 3. delete the memslot (zap all disabled) 4. re-add the memslot with size 2M 5. prefault GPA A again. In step 5, the prefetch fault attempts to install a 2M huge entry. Since step 3 zaps the leaf SPTE for GPA A while keeping the non-leaf SPTE, the leaf entry will remain empty after step 5 if the fetch fault is regarded as spurious due to a shadow-present non-leaf SPTE. Signed-off-by: Yan Zhao Link: https://lore.kernel.org/r/20250318013111.5648-1-yan.y.zhao@intel.com Signed-off-by: Sean Christopherson commit a0ee1d5faff135e28810f29e0f06328c66f89852 Author: Chao Gao Date: Mon Mar 24 22:08:48 2025 +0800 KVM: VMX: Flush shadow VMCS on emergency reboot Ensure the shadow VMCS cache is evicted during an emergency reboot to prevent potential memory corruption if the cache is evicted after reboot. This issue was identified through code inspection, as __loaded_vmcs_clear() flushes both the normal VMCS and the shadow VMCS. Avoid checking the "launched" state during an emergency reboot, unlike the behavior in __loaded_vmcs_clear(). This is important because reboot NMIs can interfere with operations like copy_shadow_to_vmcs12(), where shadow VMCSes are loaded directly using VMPTRLD. In such cases, if NMIs occur right after the VMCS load, the shadow VMCSes will be active but the "launched" state may not be set. Fixes: 16f5b9034b69 ("KVM: nVMX: Copy processor-specific shadow-vmcs to VMCS12") Cc: stable@vger.kernel.org Signed-off-by: Chao Gao Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20250324140849.2099723-1-chao.gao@intel.com Signed-off-by: Sean Christopherson commit 5ecdb48dd9188c355ddde5c3686c0835a223ca21 Author: Sean Christopherson Date: Thu Feb 27 14:24:11 2025 -0800 KVM: SVM: Treat DEBUGCTL[5:2] as reserved Stop ignoring DEBUGCTL[5:2] on AMD CPUs and instead treat them as reserved. KVM has never properly virtualized AMD's legacy PBi bits, but did allow the guest (and host userspace) to set the bits. To avoid breaking guests when running on CPUs with BusLockTrap, which redefined bit 2 to BLCKDB and made bits 5:3 reserved, a previous KVM change ignored bits 5:3, e.g. so that legacy guest software wouldn't inadvertently enable BusLockTrap or hit a VMRUN failure due to setting reserved. To allow for virtualizing BusLockTrap and whatever future features may use bits 5:3, treat bits 5:2 as reserved (and hope that doing so doesn't break any existing guests). Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 83d4b19331f3a5d5829d338a0a64b69c9c28b36e Author: David Kaplan Date: Fri Apr 18 11:17:14 2025 -0500 x86/bugs: Allow retbleed=stuff only on Intel The retbleed=stuff mitigation is only applicable for Intel CPUs affected by retbleed. If this option is selected for another vendor, print a warning and fall back to the AUTO option. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-10-david.kaplan@amd.com commit 91db6edc573bf238c277602b2ea4b4f4688fdedc Author: Pavel Begunkov Date: Mon Apr 28 13:52:33 2025 +0100 io_uring/cmd: move net cmd into a separate file We keep socket io_uring command implementation in io_uring/uring_cmd.c. Separate it from generic command code into a separate file. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/747d0519a2255bd055ae76b691d38d2b4c311001.1745843119.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 27d2fed790ce6407e321e89aac3c8c0e28986fff Author: Pavel Begunkov Date: Mon Apr 28 13:52:32 2025 +0100 io_uring: delete misleading comment in io_fill_cqe_aux() io_fill_cqe_aux() doesn't overflow completions, however it might fail them and lets the caller handle it. Remove the comment, which doesn't make any sense. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/021aa8c1d8f20ef2b66da6aeabb6b511938fd2c5.1745843119.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 53ec1abce79c986dc59e59d0c60d00088bcdf32a Author: Christoph Hellwig Date: Mon Apr 28 07:09:51 2025 -0700 brd: use memcpy_{to,from]_page in brd_rw_bvec Use the proper helpers to copy to/from potential highmem pages, which do a local instead of atomic kmap underneath, and perform flush_dcache_page where needed. This also simplifies the code so much that the separate read write helpers are not required any more. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Yu Kuai Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250428141014.2360063-6-hch@lst.de Signed-off-by: Jens Axboe commit 3185444f0504ca8ff54e2a7275f1ff60a6a6cf0c Author: Christoph Hellwig Date: Mon Apr 28 07:09:50 2025 -0700 brd: split I/O at page boundaries A lot of complexity in brd stems from the fact that it tries to handle I/O spanning two backing pages. Instead limit the size of a single bvec iteration so that it never crosses a page boundary and remove all the now unneeded code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Yu Kuai Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250428141014.2360063-5-hch@lst.de Signed-off-by: Jens Axboe commit 95a375a3bed3b8734059351ba046a6fabdbde485 Author: Christoph Hellwig Date: Mon Apr 28 07:09:49 2025 -0700 brd: use bvec_kmap_local in brd_do_bvec Use the proper helper to kmap a bvec in brd_do_bvec instead of directly accessing the bvec fields and use the deprecated kmap_atomic API. Signed-off-by: Christoph Hellwig Reviewed-by: Yu Kuai Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250428141014.2360063-4-hch@lst.de Signed-off-by: Jens Axboe commit 857aba38b56a0d8fa868706c57053dcd4282e436 Author: Christoph Hellwig Date: Mon Apr 28 07:09:48 2025 -0700 brd: remove the sector variable in brd_submit_bio The bvec iter iterates over the sector already, no need to duplicate the work. Signed-off-by: Christoph Hellwig Reviewed-by: Yu Kuai Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250428141014.2360063-3-hch@lst.de Signed-off-by: Jens Axboe commit 75d99aa279561fc6d91afec8bdd1b56548f860a2 Author: Christoph Hellwig Date: Mon Apr 28 07:09:47 2025 -0700 brd: pass a bvec pointer to brd_do_bvec Pass the bvec to brd_do_bvec instead of marshalling the information into individual arguments. Signed-off-by: Christoph Hellwig Reviewed-by: Yu Kuai Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20250428141014.2360063-2-hch@lst.de Signed-off-by: Jens Axboe commit 46d5925b8eb8c7a8d634147c23db24669cfc2f76 Author: David Kaplan Date: Fri Apr 18 11:17:13 2025 -0500 x86/bugs: Restructure spectre_v1 mitigation Restructure spectre_v1 to use select/apply functions to create consistent vulnerability handling. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-9-david.kaplan@amd.com commit ccf1d2b4a1d9ef4287ff51e634c626fd4683b10c Author: Kees Cook Date: Tue Apr 15 16:24:05 2025 -0700 input/joystick: magellan: Mark __nonstring look-up table const GCC 15's new -Wunterminated-string-initialization notices that the 16 character lookup table "nibbles" (which is not used as a C-String) needs to be marked as "nonstring": drivers/input/joystick/magellan.c: In function 'magellan_crunch_nibbles': drivers/input/joystick/magellan.c:51:44: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization] 51 | static unsigned char nibbles[16] = "0AB3D56GH9:K commit 8e28276a569addb8a2324439ae473848ee52b056 Author: Kees Cook Date: Tue Apr 15 15:52:49 2025 -0700 watchdog: exar: Shorten identity name to fit correctly The static initializer for struct watchdog_info::identity is too long and gets initialized without a trailing NUL byte. Since the length of "identity" is part of UAPI and tied to ioctls, just shorten the name of the device. Avoids the warning seen with GCC 15's -Wunterminated-string-initialization option: drivers/watchdog/exar_wdt.c:224:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 224 | .identity = "Exar/MaxLinear XR28V38x Watchdog", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 81126222bd3a ("watchdog: Exar/MaxLinear XR28V38x driver") Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250415225246.work.458-kees@kernel.org Signed-off-by: Kees Cook commit 655862865c97ff55e4f3f2aaa7708f42f0ea3bd8 Author: Kees Cook Date: Tue Apr 15 16:14:24 2025 -0700 mod_devicetable: Enlarge the maximum platform_device_id name length The 20 byte length of struct platform_device_id::name is not long enough for many devices (especially regulators), where the string initialization is getting truncated and missing the trailing NUL byte. This is seen with GCC 15's -Wunterminated-string-initialization option: drivers/regulator/hi6421v530-regulator.c:189:19: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 189 | { .name = "hi6421v530-regulator" }, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/hi6421v600-regulator.c:278:19: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 278 | { .name = "hi6421v600-regulator" }, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/lp87565-regulator.c:233:11: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 233 | { "lp87565-q1-regulator", }, | ^~~~~~~~~~~~~~~~~~~~~~ sound/soc/fsl/imx-pcm-rpmsg.c:818:19: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 818 | { .name = "rpmsg-micfil-channel" }, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/hid-sensor-als.c:457:25: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 457 | .name = "HID-SENSOR-LISS-0041", | ^~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/hid-sensor-prox.c:366:25: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (21 chars into 20 available) [-Wunterminated-string-initialization] 366 | .name = "HID-SENSOR-LISS-0226", | ^~~~~~~~~~~~~~~~~~~~~~ Increase the length to 24, slightly more than is currently being used by the affected drivers. The string is used in '%s' format strings and via the module code, which appears to do its own length encoding. This size was chosen because there was already a 4 byte hole in the structure: struct platform_device_id { char name[20]; /* 0 20 */ /* XXX 4 bytes hole, try to pack */ kernel_ulong_t driver_data; /* 24 8 */ /* size: 32, cachelines: 1, members: 2 */ /* sum members: 28, holes: 1, sum holes: 4 */ /* last cacheline: 32 bytes */ }; Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250415231420.work.066-kees@kernel.org Signed-off-by: Kees Cook commit 9a93048476e7cbdde00cdeebe66b6504995eac92 Author: Kees Cook Date: Wed Apr 16 10:29:15 2025 -0700 overflow: Clarify expectations for getting DEFINE_FLEX variable sizes Mention the use of __member_size() for DEFINE_FLEX variables as a hint for getting at the compile-time size of the resulting flexible array member. Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20250416172911.work.854-kees@kernel.org Signed-off-by: Kees Cook commit a510c186abfc870e5c74cf953b646c8a2c07bee1 Author: Kees Cook Date: Wed Apr 16 10:20:20 2025 -0700 compiler_types: Identify compiler versions for __builtin_dynamic_object_size Clarify when __builtin_dynamic_object_size() is available. All our supported Clang versions support it. GCC 12 and later support it. Link to documentation for both. Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250416172016.work.154-kees@kernel.org Signed-off-by: Kees Cook commit 0d6efa20e384a41a7f4afdcd8a0aec442c19d33e Author: Thomas Weißschuh Date: Wed Apr 16 14:44:19 2025 +0200 kunit/usercopy: Disable u64 test on 32-bit SPARC usercopy of 64 bit values does not work on 32-bit SPARC: # usercopy_test_valid: EXPECTATION FAILED at lib/tests/usercopy_kunit.c:209 Expected val_u64 == 0x5a5b5c5d6a6b6c6d, but val_u64 == 1515936861 (0x5a5b5c5d) 0x5a5b5c5d6a6b6c6d == 6510899242581322861 (0x5a5b5c5d6a6b6c6d) Disable the test. Fixes: 4c5d7bc63775 ("usercopy: Add tests for all get_user() sizes") Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250416-kunit-sparc-usercopy-v1-1-a772054db3af@linutronix.de Signed-off-by: Kees Cook commit b8e147973eca7e07fa0845350d77c9970263fcd7 Author: Kees Cook Date: Wed Apr 9 09:04:10 2025 -0700 gcc-plugins: Remove ARM_SSP_PER_TASK plugin As part of trying to remove GCC plugins from Linux, drop the ARM_SSP_PER_TASK plugin. The feature is available upstream since GCC 12, so anyone needing newer kernels with per-task ssp can update their compiler[1]. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/all/08393aa3-05a3-4e3f-8004-f374a3ec4b7e@app.fastmail.com/ [1] Acked-by: Arnd Bergmann Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250409160409.work.168-kees@kernel.org Signed-off-by: Kees Cook commit 28cd28a752058bf98b38013039bbde81df48b932 Author: Harry Yoo Date: Tue Mar 18 10:45:33 2025 +0900 lkdtm: use SLAB_NO_MERGE instead of an empty constructor Use SLAB_NO_MERGE flag to prevent merging instead of providing an empty constructor. Using an empty constructor in this manner is an abuse of slab interface. The SLAB_NO_MERGE flag should be used with caution, but in this case, it is acceptable as the cache is intended soley for debugging purposes. No functional changes intended. Signed-off-by: Harry Yoo Link: https://lore.kernel.org/r/20250318014533.1624852-1-harry.yoo@oracle.com Signed-off-by: Kees Cook commit 46e3311607d6c18a760fba4afbd5d24d42abb0f3 Author: Eric Biggers Date: Mon Apr 28 09:24:58 2025 -0700 crypto: crc32 - remove "generic" from file and module names Since crc32_generic.c and crc32c_generic.c now expose both the generic and architecture-optimized implementations via the crypto_shash API, rather than just the generic implementations as they originally did, remove the "generic" part of the filenames and module names: crypto/crc32-generic.c => crypto/crc32.c crypto/crc32c-generic.c => crypto/crc32c.c crc32-generic.ko => crc32-cryptoapi.ko crc32c-generic.ko => crc32c-cryptoapi.ko The reason for adding the -cryptoapi suffixes to the module names is to avoid a module name collision with crc32.ko which is the library API. We could instead rename the library module to libcrc32.ko. However, while lib/crypto/ uses that convention, the rest of lib/ doesn't. Since the library API is the primary API for CRC-32, I'd like to keep the unsuffixed name for it and make the Crypto API modules use a suffix. Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250428162458.29732-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 35984c730dea1a9fdd5d931f298849605850856a Author: Eric Biggers Date: Wed Apr 23 17:20:38 2025 -0700 x86/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that rarely shows up elsewhere in lib/ or arch/*/lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-8-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ee858d83c59d95e08551a9dc270bedca4b72137d Author: Eric Biggers Date: Wed Apr 23 17:20:37 2025 -0700 sparc/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that rarely shows up elsewhere in lib/ or arch/*/lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-7-ebiggers@kernel.org Signed-off-by: Eric Biggers commit fa7ed85c9bdcd408fa5e85577a64a4d2a10dd807 Author: Eric Biggers Date: Wed Apr 23 17:20:36 2025 -0700 s390/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that does not show up elsewhere in lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20250424002038.179114-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit b4fa54d654b3531261d1fde3cb73ceae7a98806f Author: Eric Biggers Date: Wed Apr 23 17:20:35 2025 -0700 powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S Rename crc32-vpmsum_core.S to crc-vpmsum-template.S to properly convey that (a) it actually generates code for both 32-bit and 16-bit CRCs, not just 32-bit CRCs; and (b) it has "template" semantics, like x86's crc-pclmul-template.S, in the sense that it's included by other files. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 436490e86814ae409c1586fc2a8045455f735418 Author: Eric Biggers Date: Wed Apr 23 17:20:34 2025 -0700 powerpc/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that rarely shows up elsewhere in lib/ or arch/*/lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit db6108d3ac91b7f09df366e0627d81803c703513 Author: Eric Biggers Date: Wed Apr 23 17:20:33 2025 -0700 arm64/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that rarely shows up elsewhere in lib/ or arch/*/lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 6cc25e4b7c819c183a21d6b9a4bcec84229131d1 Author: Eric Biggers Date: Wed Apr 23 17:20:32 2025 -0700 arm/crc: drop "glue" from filenames The use of the term "glue" in filenames is a Crypto API-ism that rarely shows up elsewhere in lib/ or arch/*/lib/. I think adopting it there was a mistake. The library just uses standard functions, so the amount of code that could be considered "glue" is quite small. And while often the C functions just wrap the assembly functions, there are also cases like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by in-lining the actual implementation into the C function. That's not "glue code", but rather the actual code. Therefore, let's drop "glue" from the filenames and instead use e.g. crc32.c instead of crc32-glue.c. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250424002038.179114-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit fea9ad4dde9bf6c65e72da0d4c1ae7969d0bb8bd Author: Eric Biggers Date: Thu Apr 17 09:38:29 2025 -0700 s390/crc32: Remove no-op module init and exit functions Now that the crc32-s390 module init function is a no-op, there is no need to define it. Remove it. The removal of the init function also makes the exit function unnecessary, so remove that too. Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20250417163829.4599-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 93b988cf8e4c68b823e70a02e4c7c39eaa0053be Author: Heiko Carstens Date: Thu Apr 17 14:30:56 2025 +0200 s390/crc32: Remove have_vxrs static key Replace the have_vxrs static key with a cpu_has_vx() call. cpu_has_vx() resolves into a compile time constant (true) if the kernel is compiled for z13 or newer. Otherwise it generates an unconditional one instruction branch, which is patched based on CPU alternatives. In any case the generated code is at least as good as before and avoids static key handling. Signed-off-by: Heiko Carstens Link: https://lore.kernel.org/r/20250417125318.12521F12-hca@linux.ibm.com/ Signed-off-by: Eric Biggers commit 7ef377c4d4abb7a2a74fc319dc1bce46f2449af7 Author: Eric Biggers Date: Sun Apr 13 08:43:50 2025 -0700 lib/crc: make the CPU feature static keys __ro_after_init All of the CRC library's CPU feature static_keys are initialized by initcalls and never change afterwards, so there's no need for them to be in the regular .data section. Put them in .data..ro_after_init instead. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Acked-by: Heiko Carstens # s390 Link: https://lore.kernel.org/r/20250413154350.10819-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ce32b0c9c522e5a69ef9c62a56d6ca08fb036d67 Author: Gregory Price Date: Wed Apr 2 19:25:52 2025 -0400 cxl: core/region - ignore interleave granularity when ways=1 When validating decoder IW/IG when setting up regions, the granularity is irrelevant when iw=1 - all accesses will always route to the only target anyway - so all ig values are "correct". Loosen the requirement that `ig = (parent_iw * parent_ig)` when iw=1. On some Zen5 platforms, the platform BIOS specifies a 256-byte interleave granularity window for host bridges when there is only one target downstream. This leads to Linux rejecting the configuration of a region with a x2 root with two x1 hostbridges. Decoder Programming: root - iw:2 ig:256 hb1 - iw:1 ig:256 (Linux expects 512) hb2 - iw:1 ig:256 (Linux expects 512) ep1 - iw:2 ig:256 ep2 - iw:2 ig:256 This change allows all decoders downstream of a passthrough decoder to also be configured as passthrough (iw:1 ig:X), but still disallows downstream decoders from applying subsequent interleaves. e.g. in the above example if there was another decoder south of hb1 attempting to interleave 2 endpoints - Linux would enforce hb1.ig=512 because the southern decoder would have iw:2 and require ig=pig*piw. [DJ: Fixed up against 6.15-rc1] Signed-off-by: Gregory Price Reviewed-by: Dave Jiang Tested-by: Li Zhijian Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Reviewed-by: Dan Williams Link: https://patch.msgid.link/20250402232552.999634-1-gourry@gourry.net Signed-off-by: Dave Jiang commit 89963d5e6906241f5f68fa0899e2895437c7fd4b Author: Li Zhijian Date: Thu Apr 10 09:05:45 2025 +0800 cxl/acpi: Verify CHBS length for CXL2.0 Per CXL Spec r3.1 Table 9-21, both CXL1.1 and CXL2.0 have defined their own length, verify it to avoid an invalid CHBS. Additionally, this patch also removes the redundant macro CXL_RCRB_SIZE, favoring the use of `ACPI_CEDT_CHBS_LENGTH_CXL11`, which offers clearer semantic meaning. [DJ: Code edited for readability suggested by djbw] Reviewed-by: Gregory Price Signed-off-by: Li Zhijian Reviewed-by: Dan Williams Link: https://patch.msgid.link/20250410010545.99590-1-lizhijian@fujitsu.com Signed-off-by: Dave Jiang commit cdafa67c0270116b0f4cdbd00b6170eb9aa92edf Author: Dave Jiang Date: Fri Apr 4 09:54:18 2025 -0700 cxl: Remove always true condition for cxlctl_validate_hw_command() smatch warnings: drivers/cxl/core/features.c:441 cxlctl_validate_hw_command() warn: always true condition '(scope >= 0) => (0-u32max >= 0)' Remove the check entirely as it has no effect. Expectation is both of these operations should be allowed for all check levels. They are read only and have no change effects. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504041033.2HBboAZR-lkp@intel.com/ Reviewed-by: Li Ming Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250404165418.3032414-1-dave.jiang@intel.com Signed-off-by: Dave Jiang commit 1bb53d05ba71b684f61bd11df8b99fe75ce52754 Merge: 84a11c519234bf d2b9e2f8a15d53 Author: Thomas Hellström Date: Mon Apr 28 17:42:49 2025 +0200 Merge drm/drm-next into drm-xe-next Additional backmerge to avoid excessive diffstats when sending PR. Signed-off-by: Thomas Hellström commit 224ee86639f57818cf4e05bd86eb7d9f31baac8d Merge: 91dbac4076537b b4432656b36e5c Author: Alexei Starovoitov Date: Mon Apr 28 08:40:45 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc4 Cross-merge bpf and other fixes after downstream PRs. No conflicts. Signed-off-by: Alexei Starovoitov commit dc6d9ef57fcf42fac1b3be4bff5ac5b3f1e8f9f3 Author: Chao Yu Date: Thu Apr 10 11:10:19 2025 +0800 f2fs: zone: fix to calculate first_zoned_segno correctly A zoned device can has both conventional zones and sequential zones, so we should not treat first segment of zoned device as first_zoned_segno, instead, we need to check zone type for each zone during traversing zoned device to find first_zoned_segno. Otherwise, for below case, first_zoned_segno will be 0, which could be wrong. create_null_blk 512 2 1024 1024 mkfs.f2fs -m /dev/nullb0 Testcase: export SCRIPTS_PATH=/share/git/scripts test multiple devices w/ zoned device for ((i=0;i<8;i++)) do { zonesize=$((2<<$i)) conzone=$((4096/$zonesize)) seqzone=$((4096/$zonesize)) $SCRIPTS_PATH/nullblk_create.sh 512 $zonesize $conzone $seqzone mkfs.f2fs -f -m /dev/vdb -c /dev/nullb0 mount /dev/vdb /mnt/f2fs touch /mnt/f2fs/file f2fs_io pinfile set /mnt/f2fs/file $((8589934592*2)) stat /mnt/f2fs/file df cat /proc/fs/f2fs/vdb/segment_info umount /mnt/f2fs $SCRIPTS_PATH/nullblk_remove.sh 0 } done test single zoned device for ((i=0;i<8;i++)) do { zonesize=$((2<<$i)) conzone=$((4096/$zonesize)) seqzone=$((4096/$zonesize)) $SCRIPTS_PATH/nullblk_create.sh 512 $zonesize $conzone $seqzone mkfs.f2fs -f -m /dev/nullb0 mount /dev/nullb0 /mnt/f2fs touch /mnt/f2fs/file f2fs_io pinfile set /mnt/f2fs/file $((8589934592*2)) stat /mnt/f2fs/file df cat /proc/fs/f2fs/nullb0/segment_info umount /mnt/f2fs $SCRIPTS_PATH/nullblk_remove.sh 0 } done Fixes: 9703d69d9d15 ("f2fs: support file pinning for zoned devices") Cc: Daeho Jeong Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5db0d252c64e91ba1929c70112352e85dc5751e7 Author: Chao Yu Date: Mon Apr 14 18:55:20 2025 +0800 f2fs: fix to do sanity check on sit_bitmap_size w/ below testcase, resize will generate a corrupted image which contains inconsistent metadata, so when mounting such image, it will trigger kernel panic: touch img truncate -s $((512*1024*1024*1024)) img mkfs.f2fs -f img $((256*1024*1024)) resize.f2fs -s -i img -t $((1024*1024*1024)) mount img /mnt/f2fs ------------[ cut here ]------------ kernel BUG at fs/f2fs/segment.h:863! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 11 UID: 0 PID: 3922 Comm: mount Not tainted 6.15.0-rc1+ #191 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:f2fs_ra_meta_pages+0x47c/0x490 Call Trace: f2fs_build_segment_manager+0x11c3/0x2600 f2fs_fill_super+0xe97/0x2840 mount_bdev+0xf4/0x140 legacy_get_tree+0x2b/0x50 vfs_get_tree+0x29/0xd0 path_mount+0x487/0xaf0 __x64_sys_mount+0x116/0x150 do_syscall_64+0x82/0x190 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fdbfde1bcfe The reaseon is: sit_i->bitmap_size is 192, so size of sit bitmap is 192*8=1536, at maximum there are 1536 sit blocks, however MAIN_SEGS is 261893, so that sit_blk_cnt is 4762, build_sit_entries() -> current_sit_addr() tries to access out-of-boundary in sit_bitmap at offset from [1536, 4762), once sit_bitmap and sit_bitmap_mirror is not the same, it will trigger f2fs_bug_on(). Let's add sanity check in f2fs_sanity_check_ckpt() to avoid panic. Cc: stable@vger.kernel.org Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit aa1be8dd64163eca4dde7fd2557eb19927a06a47 Author: Chao Yu Date: Mon Apr 14 18:52:37 2025 +0800 f2fs: fix to detect gcing page in f2fs_is_cp_guaranteed() Jan Prusakowski reported a f2fs bug as below: f2fs/007 will hang kernel during testing w/ below configs: kernel 6.12.18 (from pixel-kernel/android16-6.12) export MKFS_OPTIONS="-O encrypt -O extra_attr -O project_quota -O quota" export F2FS_MOUNT_OPTIONS="test_dummy_encryption,discard,fsync_mode=nobarrier,reserve_root=32768,checkpoint_merge,atgc" cat /proc//stack f2fs_wait_on_all_pages+0xa3/0x130 do_checkpoint+0x40c/0x5d0 f2fs_write_checkpoint+0x258/0x550 kill_f2fs_super+0x14f/0x190 deactivate_locked_super+0x30/0xb0 cleanup_mnt+0xba/0x150 task_work_run+0x59/0xa0 syscall_exit_to_user_mode+0x12d/0x130 do_syscall_64+0x57/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e cat /sys/kernel/debug/f2fs/status - IO_W (CP: -256, Data: 256, Flush: ( 0 0 1), Discard: ( 0 0)) cmd: 0 undiscard: 0 CP IOs reference count becomes negative. The root cause is: After 4961acdd65c9 ("f2fs: fix to tag gcing flag on page during block migration"), we will tag page w/ gcing flag for raw page of cluster during its migration. However, if the inode is both encrypted and compressed, during ioc_decompress(), it will tag page w/ gcing flag, and it increase F2FS_WB_DATA reference count: - f2fs_write_multi_page - f2fs_write_raw_page - f2fs_write_single_page - do_write_page - f2fs_submit_page_write - WB_DATA_TYPE(bio_page, fio->compressed_page) : bio_page is encrypted, so mapping is NULL, and fio->compressed_page is NULL, it returns F2FS_WB_DATA - inc_page_count(.., F2FS_WB_DATA) Then, during end_io(), it decrease F2FS_WB_CP_DATA reference count: - f2fs_write_end_io - f2fs_compress_write_end_io - fscrypt_pagecache_folio : get raw page from encrypted page - WB_DATA_TYPE(&folio->page, false) : raw page has gcing flag, it returns F2FS_WB_CP_DATA - dec_page_count(.., F2FS_WB_CP_DATA) In order to fix this issue, we need to detect gcing flag in raw page in f2fs_is_cp_guaranteed(). Fixes: 4961acdd65c9 ("f2fs: fix to tag gcing flag on page during block migration") Reported-by: Jan Prusakowski Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0c708e35cf26449ca317fcbfc274704660b6d269 Author: Chao Yu Date: Mon Apr 14 18:52:36 2025 +0800 f2fs: clean up w/ fscrypt_is_bounce_page() Just cleanup, no logic changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f16ebe0de73274fd1cf885b30cc4fe42d2a1821a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:53 2025 +0100 f2fs: Convert clear_node_page_dirty() to clear_node_folio_dirty() Both callers have a folio so pass it in, removing five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a4d07702712105b877f5f349c2148353ac9d3a26 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:52 2025 +0100 f2fs: Use a folio in flush_inline_data() Get a folio from the page cache and use it throughout. Removes six calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6b1ad395455bc3ed42cd9dea59d94de93f167d28 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:51 2025 +0100 f2fs: Remove f2fs_new_node_page() All callers now use f2fs_new_node_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 963da02bc12d2607f44ad0d4564d6c8e3aa47510 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:50 2025 +0100 f2fs: Convert fsync_node_entry->page to folio Convert all callers to set/get a folio instead of a page. Removes five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7d28f13c583c69321b8a63abcd9333bee62ee651 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:49 2025 +0100 f2fs: Pass a folio to get_dnode_addr() All callers except __get_inode_rdev() and __set_inode_rdev() now have a folio, but the only callers of those two functions do have a folio, so pass the folio to them and then into get_dnode_addr(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6f7ec66180213a3b1643149aeaf531e1b20e69d4 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:48 2025 +0100 f2fs: Convert dnode_of_data->node_page to node_folio All assignments to this struct member are conversions from a folio so convert it to be a folio and convert all users. At the same time, convert data_blkaddr() to take a folio as all callers now have a folio. Remove eight calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 66bca01bc52abe0aaef0739890a8c0904696867b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:47 2025 +0100 f2fs: Pass a folio to set_nid() All callers have a folio, so pass it in. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f92379289f0cfe8cebc716c5ce37015f05b4cb26 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:46 2025 +0100 f2fs: Pass a folio to f2fs_update_inode() All callers now have a folio, so pass it in. Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a6d26d5c7581df7b4ae9e708c34c149ca8491865 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:45 2025 +0100 f2fs: Return a folio from f2fs_init_inode_metadata() Convert all three callers to handle a folio return. Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 398c7df7bc6bf8fd7682e804866aaa6dfbf792f5 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:44 2025 +0100 f2fs: Pass a folio to f2fs_init_read_extent_tree() The only caller alredy has a folio so pass it in. Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 97e1b86169b3d9573a26b80f5f6ccada903394d2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:43 2025 +0100 f2fs: Use a folio in f2fs_wait_on_block_writeback() Fetch a folio from the pagecache and use it. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5951fee46befbf6176c86482432f4f76e522f16c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:42 2025 +0100 f2fs: Use a folio in redirty_blocks() Support large folios & simplify the loops in redirty_blocks(). Use the folio APIs and remove four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b02a903218bdbde6e81286536c6beb4028d9f8ad Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:41 2025 +0100 f2fs: Use a folio in f2fs_encrypt_one_page() Fetch a folio from the page cache instead of a page. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 842974808ac2aa4fd22b6207146329d08fbf7141 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:40 2025 +0100 f2fs: Convert f2fs_load_compressed_page() to f2fs_load_compressed_folio() The only caller already has a folio, so pass it in. Copy the entire size of the folio to support large block sizes. Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 75de20f41fa83c3340c63980cba479fd64a4c291 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:39 2025 +0100 f2fs: Use a folio in prepare_compress_overwrite() Add f2fs_filemap_get_folio() as a wrapper around __filemap_get_folio() which can inject an error. Removes seven calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3d56058c55d45bfcc1ea1a2859da94695077e6d8 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:38 2025 +0100 f2fs: Use a folio in f2fs_cache_compressed_page() Look up a folio instead of a page, and if that fails, allocate a folio. Removes five calls to compound_head(), one of the last few references to add_to_page_cache_lru() and honours the cpuset_do_page_mem_spread() setting. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 47d73eae3acccb294b2aa3f123942d74875734b9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:37 2025 +0100 f2fs: Use a folio in f2fs_truncate_meta_inode_pages() Fetch a folio from the pagecache instead of a page. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ba13af45e5172633620f81f48d13ac9c17629447 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:36 2025 +0100 f2fs: Use a folio in need_inode_page_update() Fetch a folio from the pagecache instead of a page. Removes two calls to compound_head() Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5b61618aa0ad8f16fb8d2ba1817bd15c40efd032 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:35 2025 +0100 f2fs: Pass a folio to f2fs_set_link() All callers now have a folio, pass it in. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1d6bf61778a5c79fac0ee3b2c1364c4e2a4e5996 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:34 2025 +0100 f2fs: Convert f2fs_put_page_dic() to f2fs_put_folio_dic() The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d79bc8ab44172c1fd1dbac75a201893a0588ca5a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:33 2025 +0100 f2fs: Pass a folio to inline_data_addr() All callers now have a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1834406c98495051946c028819c349ddcc2fa45b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:32 2025 +0100 f2fs: Pass a folio to __recover_inline_status() The only caller has a folio so pass it in. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 413977c956dbac26b5a54d2f4f2a218e87747124 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:31 2025 +0100 f2fs: Pass a folio to f2fs_recover_inline_data() The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b5b66bc4dfd1b3de47b0edd5c84f7a3616b2f534 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:30 2025 +0100 f2fs: Pass a folio to f2fs_delete_inline_entry() The caller now has a folio so pass it in. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 03a757121314c13ece95064c10bac81ffc6beae6 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:29 2025 +0100 f2fs: Pass a folio to f2fs_delete_entry() All callers now have a folio so pass it in. Removes eight calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 932a95537aca32d63f136e9f79cca1e7e42ace92 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:28 2025 +0100 f2fs: Pass a folio to f2fs_parent_dir() Convert all the callers to pass a folio. Removes three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0bd84d2d8912e83c4c6771ca12c647f4e37419cd Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:27 2025 +0100 f2fs: Pass a folio to f2fs_find_entry() Convert all callers to pass in a pointer to a folio instead of a page. Also convert f2fs_inode_by_name() to take a folio pointer. Removes six calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c190a13d71e7d9c3ccad1d17e00285888857b974 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:26 2025 +0100 f2fs: Pass a folio to __f2fs_find_entry() Also pass a folio to f2fs_find_in_inline_dir() and find_in_level(). Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b3720382eee7014b6ff822035a7b78245d65cf30 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:25 2025 +0100 f2fs: Pass a folio to f2fs_truncate_inline_inode() All callers now have a folio, so pass it in. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 848839ce05055c7eb6edb7fc29177b2911a3f96e Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:24 2025 +0100 f2fs: Pass a folio to f2fs_do_read_inline_data() All callers now have a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f1d54e07a97f484862f418827fc5b88b026185e5 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:23 2025 +0100 f2fs: Convert dnode_of_data->inode_page to inode_folio Also rename inode_page_locked to inode_folio_locked. Removes five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c01547da6b1554db0ca5cec4a3995810cdcae395 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:22 2025 +0100 f2fs: Pass a folio to f2fs_has_enough_room() The only caller already has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c5622a4630b44ae7ed44938614045a59937b049d Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:21 2025 +0100 f2fs: Pass a folio to f2fs_make_empty_inline_dir() The only caller already has a folio, so pass it in. Removes a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0439ae45b5e56775f76e4d87ea2197c3e2f2d8d5 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:20 2025 +0100 f2fs: Pass a folio to init_dent_inode() The only caller has a folio, so pass it in. Removes two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e0691a051f1138c5ac2adf0971c255035f797e8d Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:19 2025 +0100 f2fs: Pass a folio to inline_xattr_addr() All callers now have a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39b53c0b99464af67272b1cfd449abf02de60cf2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:18 2025 +0100 f2fs: Pass a folio to f2fs_recover_inline_xattr() The caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 847bfef73a70416f67de701c0fb59b39e731c5ff Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:17 2025 +0100 f2fs: Pass a folio to do_recover_data() Push the page conversion into do_recover_data(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c8b198748611a1ae73fa49e240c6da31d2ce1e48 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:16 2025 +0100 f2fs: Pass a folio to read_inline_xattr() Both callers have a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39d20727d8b930269c0c84c404f6564cd676f294 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:15 2025 +0100 f2fs: Pass a folio to f2fs_getxattr() The one caller of __f2fs_get_acl() which passes a non-NULL page already has a folio, so pass it in, then into f2fs_getxattr(), which lets us pass it to lookup_all_xattrs(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cdbe260d559a8cec03bc289588bf50a334028ae3 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:14 2025 +0100 f2fs: Remove f2fs_get_inode_page() All callers have now been converted to call f2fs_get_inode_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2557c3ea4c4ee0d2bf4dd42ef366a0c4d844046b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:13 2025 +0100 f2fs: Use a folio in f2fs_recover_inline_xattr() Remove a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1aa467014b25dcb792e534b008557a2d2c0f3f73 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:12 2025 +0100 f2fs: Use a folio in read_inline_xattr() Remove a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 170c445a5e1f35cdbccde251a629131b0fd330fa Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:11 2025 +0100 f2fs: Pass a folio to write_all_xattrs() Also convert in_page to in_folio. Save five hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b3955efbc002071291b3c3f3a297730b03deba4c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:10 2025 +0100 f2fs: Pass a folio to __f2fs_setxattr() Also pass the folio into read_all_xattrs(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 953ab314c75ec0ffead1d65ddb9f8f17422c3fae Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:09 2025 +0100 f2fs: Pass a folio to f2fs_setxattr() Also convert f2fs_initxattrs() to take a folio. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9de27930c56b763b859b387190b67e01a04776bd Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:08 2025 +0100 f2fs: Pass folios to f2fs_init_acl() The one caller already has folios, so pass them in, and further pass them to __f2fs_set_acl() and f2fs_acl_create(). There should be no change to the generated code for this commit. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 802aa48dba0789af6143fe40410cc9cd57917239 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:07 2025 +0100 f2fs: Use a folio in do_read_inode() Remove five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 870ef8d3c480e3ae70f8cb9913437131c0af2abb Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:06 2025 +0100 f2fs: Use a folio in f2fs_update_inode_page() Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a0fd315e31f3dc2a47cb82047cf901b4d1e46069 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:05 2025 +0100 f2fs: Use a folio in f2fs_inline_data_fiemap() Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f5ef723c170f9889ff35ced2585fc9683182db71 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:04 2025 +0100 f2fs: Use a folio in f2fs_read_inline_dir() Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 08e83ca0954caf163c0b99d627fb5a1b7a2c4508 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:03 2025 +0100 f2fs: Use a folio in f2fs_empty_inline_dir() Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 317c31680e9460667af22ede1d8874ff43d7c153 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:02 2025 +0100 f2fs: Use a folio in f2fs_find_in_inline_dir() Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f7725a793e1e4a85289cf4ec1923b2da9355ac1e Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:01 2025 +0100 f2fs: Use a folio in f2fs_recover_inline_data() Remove four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5f5efd70304abe35f47b1bbaab1d8dd423633587 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:12:00 2025 +0100 f2fs: Use a folio in f2fs_read_inline_data() Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 466f0e661d7afb36fb9f9c433d8ad70b010940d0 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:59 2025 +0100 f2fs: Use a folio in f2fs_write_inline_data() Remove four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0999f98e6c2132fb771f5d3efa3168b6f28394d7 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:58 2025 +0100 f2fs: Remove f2fs_get_xnode_page() All callers have now been converted to call f2fs_get_xnode_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c972c546fa2b1aa34fcf89abffbb89e9b681d6dd Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:57 2025 +0100 f2fs: Use a folio in read_xattr_block() Remove a call to compound_head() Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6023048cf62d3df8e01c708273475939f2eecf04 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:56 2025 +0100 f2fs: Convert f2fs_convert_inline_page() to f2fs_convert_inline_folio() Both callers have a folio, so pass it in. Removes seven calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 214235c224dfa518d9628d62d9d7e404b1c8e174 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:55 2025 +0100 f2fs: Pass folios to set_new_dnode() Removes a lot of conversions of folios into pages. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a8a4ad25b579a05a0cf3921935fdff35f6e51db9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:54 2025 +0100 f2fs: Use a folio in f2fs_truncate_xattr_node() Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d9554488b06da046a04937fb6978eec7931a7eb0 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:53 2025 +0100 f2fs: Use a folio in f2fs_do_truncate_blocks() Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8f8c0c45449ec28c6fc885057d722f87f55a5588 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:52 2025 +0100 f2fs: Pass a folio to f2fs_move_rehashed_dirents() Remove seven hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 717735db2604d36c64f3f78f1083753c7eff73f3 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:51 2025 +0100 f2fs: Pass a folio to f2fs_move_inline_dirents() Pass the folio through do_convert_inline_dir() to f2fs_move_inline_dirents(). Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9283b58a148fbd04ff2b97e501a954c4ee9941b3 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:50 2025 +0100 f2fs: Use a folio in f2fs_add_inline_entry() Also convert f2fs_init_inode_metadata() to take a folio. Remove Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 869521352de8b66af9e50bf5b25c0cc2e5a5832f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:49 2025 +0100 f2fs: Use a folio in f2fs_try_convert_inline_dir() Remove two hidden calls to compound_head() Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bdbf142204c5391b4cd6748e6787c496f0dc8db2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:48 2025 +0100 f2fs: Pass a folio to make_empty_dir() Pass the folio into make_empty_dir() and then into f2fs_get_new_data_folio(). Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7c99299c9ac8c1877d1f782f845828bec74f3c21 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:47 2025 +0100 f2fs: Use a folio in f2fs_init_inode_metadata() Since this is the only caller of f2fs_new_inode_page(), convert that to return a folio at the same time. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0e1717dd92a93ec56d2e4143b62d04f1a93ad08a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:46 2025 +0100 f2fs: Use a folio in __find_data_block() Remove a call to f2fs_get_inode_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c68b0bcb29d6f5b3e2bc5ac2c873051c6ef4b4a4 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:45 2025 +0100 f2fs: Use a folio in prepare_write_begin Remove a call to f2fs_get_inode_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 424fd5d831e1540b9adc2ce4838a46cdef8fac4b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:44 2025 +0100 f2fs: Remove f2fs_get_node_page() All callers have now been converted to call f2fs_get_node_folio(). Remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit da8768c8752746d56b813c8add163d9ecdd435b6 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:43 2025 +0100 f2fs: Use a folio in check_index_in_prev_nodes() Remove a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1a116e876ab66dd4409b05fd17109cde451bc2ba Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:42 2025 +0100 f2fs: Use a folio in is_alive() Remove four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 722066201f427b49dfa650e7ba68159a94577154 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:41 2025 +0100 f2fs: Convert __write_node_page() to __write_node_folio() All three callers now have a folio so pass it in. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c795d9dbe035c6e9c0ecb3ff0e0fc6427a55a9a5 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:40 2025 +0100 f2fs: Convert f2fs_move_node_page() to f2fs_move_node_folio() Pass the folio in from the one caller and use it throughout. Removes eight hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c528defa64ae4244ae8749f8608d7a7f731c5727 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:39 2025 +0100 f2fs: Use a folio in gc_node_segment() Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4e9e8f81f4a29888ccd6f41123beb2e096cd3c9a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:38 2025 +0100 f2fs: Pass a folio to f2fs_ra_node_pages() Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d68833a0b74e46edc678340cdff5ad22782c6609 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:37 2025 +0100 f2fs: Use folios in truncate_partial_nodes() Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 878a05b09c0c578b679956431cd2be5cc3689403 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:36 2025 +0100 f2fs: Use a folio in truncate_nodes() Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit df410140062192001c323ce75aa64bc0f59af3b0 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:35 2025 +0100 f2fs: Use a folio in truncate_node() Remove two calls to compound_head() Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fb733f987005aae431b58ce6eae7254808ff98b3 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:34 2025 +0100 f2fs: Use folios in f2fs_get_dnode_of_data() Pass the folio into __get_node_folio() and f2fs_get_node_page_ra() which becomes f2fs_get_node_folio_ra(). That function has no callers outside node.c, so make it static. Removes seven calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit aa220cede54ed671f7be413d8dacb91263a9d218 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:33 2025 +0100 f2fs: Add f2fs_get_node_folio() The folio equivalent of f2fs_get_node_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 401da8dd7887551278c67575539a11931c532cea Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:32 2025 +0100 f2fs: Use a folio in f2fs_recover_xattr_data() Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b3094519c1f1bd247cfe028f7c0f697083891e75 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:31 2025 +0100 f2fs: Use a folio in write_all_xattrs() Removes three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 153e4a7f890697556e4c9935094b8e005ec56783 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:30 2025 +0100 f2fs: Add f2fs_get_xnode_folio() The folio equivalent of f2fs_get_xnode_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5c93848a92ace3aa61c5b52eece314cee36562be Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:29 2025 +0100 f2fs: Remove f2fs_grab_cache_page() All callers have now been converted to f2fs_grab_cache_folio() so we can remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8b78cea812385f3e5de5801f8c8b115c5ca2b85f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:28 2025 +0100 f2fs: Use a folio in f2fs_recover_inode_page() Save four hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7c213e98c723c1283855f0e08f6774c23d9f2a3c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:27 2025 +0100 f2fs: Pass a folio to f2fs_inode_chksum_verify() Both callers now have a folio, so pass it in. Removes three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f0fac66fe913201847da7fc6fa052449abacdccd Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:26 2025 +0100 f2fs: Convert read_node_page() to read_node_folio() Both callers now have a folio, so pass it in and remove the conversion back to a folio. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9d79652e4473808b68f8f33004458f269778f74e Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:25 2025 +0100 f2fs: Use a folio in f2fs_ra_node_page() Save a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cfa809146f8223c2953e7553f830c0877921f9de Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:24 2025 +0100 f2fs: Add f2fs_new_node_folio() Convert f2fs_new_node_page() to f2fs_new_node_folio() and add a compatibility wrapper. Removes five hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e57e6ee5cd80a1f317ab6fa9731b44067c20a864 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:23 2025 +0100 f2fs: Use a folio in f2fs_move_inline_dirents() Remove eight hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f8fa37fbec96f6e1d7ddcdd5ea82f90fa9bc4df1 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:22 2025 +0100 f2fs: Use a folio in f2fs_convert_inline_inode() Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2a96ddcb4a5908fcbb7b2c45567ceb6d5765c4f8 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:21 2025 +0100 f2fs: Use a folio in move_data_block() Remove 11 hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0d53be232343c16910efb83ff53c50ae144b9634 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:20 2025 +0100 f2fs: Use a folio in ra_data_block() Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 514163f699afab5db57a0e808dc231b38bf84714 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:19 2025 +0100 f2fs: Use a folio in f2fs_xattr_fiemap() Remove four hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d2eb6d86e0fe2439a2594a35971ad2d1db2b8769 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:18 2025 +0100 f2fs: Remove f2fs_get_new_data_page() All callers have been converted to call f2fs_get_new_data_folio() so delete this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a85127c58a3b68fec5f9072c4c9358d27c08333b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:17 2025 +0100 f2fs: Use a folio in make_empty_dir() Remove two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c45ce8f76ab3c1d5b3e5516b79133ad7f31c0305 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:16 2025 +0100 f2fs: Use a folio in f2fs_add_regular_entry() Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c35cc972c3cd3806295bd1d50d0d828103339198 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:15 2025 +0100 f2fs: Use a folio in fill_zero() Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6965a65caf83d0a2716e9144f898f52c3ae9c75f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:14 2025 +0100 f2fs: Remove f2fs_get_lock_data_page() All callers have now been converted to f2fs_get_lock_data_folio(), so remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c0a4bb8ae6da4047f8e72bc329130125d2f63d75 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:13 2025 +0100 f2fs: Use a folio in f2fs_defragment_range() Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3dfcb2b43e3acba371a261d8b3b4f102d2734515 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:12 2025 +0100 f2fs: Use a folio in __clone_blkaddrs() Removes five hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1313057c369bb4da11bb1f8dffb570ac7b44a4d4 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:11 2025 +0100 highmem: Add memcpy_folio() The folio equivalent of memcpy_page(). It should correctly and efficiently manage large folios: - If one, neither or both is highmem - If (either or both) offset+len crosses a page boundary - If the two offsets are congruent or not Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 48b68943053af00d0c3247eaab8f83bc17d26632 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:10 2025 +0100 f2fs: Add f2fs_get_new_data_folio() Convert f2fs_get_new_data_page() into f2fs_get_new_data_folio() and add a f2fs_get_new_data_page() wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 38f273c5049d5dd3b515200f7f57f1f632489076 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:09 2025 +0100 f2fs: Use a folio in f2fs_migrate_blocks() Get a folio from the pagecache and use it throughout. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 65f99d35fe87ff282be4b6aeb096e5cf90cb198f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:08 2025 +0100 f2fs: Use a folio in f2fs_get_new_data_page() Get folios from the pagecache instead of pages. Remove five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c713bbb17c4d82e50851b32d939e988b73111051 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:07 2025 +0100 f2fs: Remove f2fs_find_data_page() All callers have now been converted to call f2fs_find_data_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d040455c7911a6b9dc4b0489486ef83d73783378 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:06 2025 +0100 f2fs: Use a folio in f2fs_readdir() Get a folio instead of a page and use it throughout. Also put the folio before checking the error so we only have to do it once. Saves two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7d5a82490f94d12178acae381df8e3c2c1b7e968 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:05 2025 +0100 f2fs: Use a folio in f2fs_delete_entry() Get a folio instead of a page and operate on it. Saves a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e4ca8ff450c39dd58a6a0d7167e32e80af457507 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:04 2025 +0100 f2fs: Use a folio in find_in_level() Get a folio instead of a page and use it throughout. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 366848cb7126b911ab6011472daf040750bd8e37 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:03 2025 +0100 f2fs: Remove f2fs_get_sum_page() All callers have now been converted to call f2fs_get_sum_folio() instead. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0e1073f850fce4d26817e4288c230dcd50b42118 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:02 2025 +0100 f2fs: Use a folio in change_curseg() Get a folio and use it. Saves a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b536cd889ea83f393c1ebc2f6a87de8c9daf7a73 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:01 2025 +0100 f2fs: Use a folio in check_index_in_prev_nodes() Get a folio instead of a page and operate on it. Saves a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5d895f7beae94f875573e1408d129795077ae20f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:11:00 2025 +0100 f2fs: Use folios in do_garbage_collect() Get a folio instead of a page and operate on folios throughout. Remove six calls to compound_head() and use folio_put_refs() to put both references we hold at the same time, reducing the number of atomic operations we do. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4a2c49d2cbb92706ba0f03f034c7c712c37d72ce Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:59 2025 +0100 f2fs: Add f2fs_get_sum_folio() Convert f2fs_get_sum_page() to f2fs_get_sum_folio() and add a f2fs_get_sum_page() wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6b5c4a035913480fe328704f98ee1c5b3748842b Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:58 2025 +0100 f2fs: Pass an address to scan_nat_page() Remove a conversion from folio to page by passing in the address of the first byte rather than the struct page containing it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 350b8441c0e9472a389586cbf9d36afd627feed1 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:57 2025 +0100 f2fs: Convert f2fs_get_meta_page_retry() to f2fs_get_meta_folio_retry() Also convert get_current_nat_page() to get_current_nat_folio(). Removes three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 657b31b2d71cad687bbfddde99d90b879267d096 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:56 2025 +0100 f2fs: Remove f2fs_get_meta_page() All callers have now been converted to f2fs_get_meta_folio() so we can remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9fdb4325e0a472607e1c67fa59850a78b2cd9870 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:55 2025 +0100 f2fs: Use a folio in read_normal_summaries() Get a folio instead of a page. Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3a34e0cdd9c6ae68c6d32aacfa7ea6e44fd48cc9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:54 2025 +0100 f2fs: Use a folio in read_compacted_summaries() Get a folio instead of a page. Saves two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8a6fb4cc554e542b24f982654f07f00eb78aae0d Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:53 2025 +0100 f2fs: Use a folio in __get_nat_bitmaps() Get a folio instead of a page. Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit aa0c14ef54e0d14ae8c00242fd2194b72787dcde Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:52 2025 +0100 f2fs: Use a folio in f2fs_get_node_info() Get a folio instead of a page. Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit eb639c85624e6cd0717f0dd27d27925c7aa37648 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:51 2025 +0100 f2fs: Use a folio in f2fs_get_valid_checkpoint() Convert validate_checkpoint() to return a folio and use it throughout f2fs_get_valid_checkpoint(). Saves five hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a2c746eac30e3aac6b720c7e3fa27e1e417d8292 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:50 2025 +0100 f2fs: Use a folio in validate_checkpoint() Convert get_checkpoint_version() to take a folio and use it throughout validate_checkpoint(). Saves five hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 375452b50751a152f317cdb1270a0e215a902dcc Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:49 2025 +0100 f2fs: Use a folio in f2fs_recover_orphan_inodes() Get a folio instead of a page and use it throughout. Saves two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6225716f38a85eea4137e3454c7fa7336a64be02 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:48 2025 +0100 f2fs: Use a folio in build_sit_entries() Convert get_current_sit_page() to get_current_sit_folio() and then use the folio in build_sit_entries(). Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d6f3066301bc2c771cabd7414554989d1737d072 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:47 2025 +0100 f2fs: Add f2fs_get_meta_folio() Convert f2fs_get_meta_page() to f2fs_get_meta_folio() and add f2fs_get_meta_page() as a wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2424ee9b752a9525c26a4a5514a355fda7e3a8b7 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:46 2025 +0100 f2fs: Remove f2fs_grab_meta_page() All callers have now been converted to f2fs_grab_meta_folio() so we can remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1ec366290109fbeb022c962fc35e5396dbc215b7 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:45 2025 +0100 f2fs: Use a folio in write_compacted_summaries() Grab a folio instead of a page. Saves four hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 43b3ed1c6ce0d72e4126672951c9dd496597a0e6 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:44 2025 +0100 f2fs: Use a folio in write_current_sum_page() Grab a folio instead of a page. Saves two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5c1b57bb83936d02a0661f85fcfb7a63319e511a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:43 2025 +0100 f2fs: Use a folio in f2fs_update_meta_page() Grab a folio instead of a page. Saves two hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9c6b0f120e114a2294ba36b460d493152dc7655c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:42 2025 +0100 f2fs: Convert get_next_sit_page() to get_next_sit_folio() Grab a folio instead of a page. Also convert seg_info_to_sit_page() to seg_info_to_sit_folio() and use a folio in f2fs_flush_sit_entries(). Saves a couple of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5df510c8df691a523ea1a4c81a06eaaf1ec4968f Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:41 2025 +0100 f2fs: Use a folio in get_next_nat_page() Call f2fs_grab_meta_folio() instead of f2fs_grab_meta_page(). Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 643d16687d7a0fc072ba73c27f5ebc511c5a684d Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:40 2025 +0100 f2fs: Use a folio in write_orphan_inodes() Call f2fs_grab_meta_folio() instead of f2fs_grab_meta_page(). Removes four hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2525a784737b2fb7c23fe3d2efa21658100419e4 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:39 2025 +0100 f2fs: Use a folio in f2fs_ra_meta_pages_cond() Remove a call to find_get_page(). Saves two hidden calls to compound_head(). Change f2fs_folio_put() to check for IS_ERR_OR_NULL to handle the case where we got an error pointer back from filemap_get_folio(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 95e3117621e9373cdf39b88a7a4a8f353428d111 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:38 2025 +0100 f2fs: Use a folio in f2fs_ra_meta_pages() Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f24f7f8cd6e8ff21ad40677f26f8c73a7d855843 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:37 2025 +0100 f2fs: Pass a folio to next_blkaddr_of_node() Pass the folio into sanity_check_node_footer() so that we can pass it further into next_blkaddr_of_node(). Removes a lot of conversions from folio->page. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 937d6a4d2c21bf02d10967d1f6e2d2afe61c99c2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:36 2025 +0100 f2fs: Convert f2fs_get_tmp_page() to f2fs_get_tmp_folio() Convert all the callers to receive a folio. Removes a lot of hidden calls to compound_head() in f2fs_put_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9030d55aedf80f7a04077b5916c9bc6ecb3b9b49 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:35 2025 +0100 f2fs: Convert __get_meta_page() to __get_meta_folio() Push the conversion to a page into the callers. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b629c6480ece59d96ae0bc2647bccff58f542be4 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:34 2025 +0100 f2fs: Pass a folio to f2fs_submit_merged_ipu_write() The only caller which passes a page already has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 46fd261c677e65df36564997f7a5227f3e352de9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:33 2025 +0100 f2fs: Use f2fs_folio_wait_writeback() There were some missing conversions from f2fs_wait_on_page_writeback() to f2fs_folio_wait_writeback(). Saves a call to compound_head() at each callsite. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a8d397386371cb1c366268402bd48d1a20aa5bf9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:32 2025 +0100 f2fs: Convert __f2fs_write_meta_page() to __f2fs_write_meta_folio() All callers now have a folio so pass it in. Saves three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 668c7a564823a825a87924c87147d202580c293c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:31 2025 +0100 f2fs: Use a folio in commit_checkpoint() Save four calls to compound_head(). Also remove the call to f2fs_wait_on_page_writeback() as this was already done by f2fs_grab_meta_folio() and writeback can't have restarted in the meantime since we hold the folio locked. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b15ca18571578f776782b7347831cf14a57e8018 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:30 2025 +0100 f2fs: Add f2fs_grab_meta_folio() Turn f2fs_grab_meta_page() into a wrapper around f2fs_grab_meta_folio(). Saves three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0d1e687e432bae1ac32c2b8a3799172f94b3f96a Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:29 2025 +0100 f2fs: Use a folio in f2fs_quota_read() Support arbitrary size folios and remove a few hidden calls to compound_head(). Also remove an unnecessary test of the uptodaate flag; if mapping_read_folio_gfp() cannot bring the folio uptodate, it will return an error. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c14b4562bc9bd7cb57dbb95eae73fc3f24cdfadc Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:28 2025 +0100 f2fs: Use a folio in move_data_block() Fetch a folio from the pagecache instead of a page and operate on it throughout. Removes eight calls to compound_head() and an access to page->mapping. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6f8b9318c6eb958f64a985a0af7efc2702f15605 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:27 2025 +0100 f2fs: Remove access to page->mapping in f2fs_is_cp_guaranteed() page->mapping will be removed soon, so call page_folio() on the page that was passed in. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1db30d82365b3feacc21a1bd9158f7b14e2d0500 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:26 2025 +0100 f2fs: Use a folio in add_ipu_page() Convert the incoming page to a folio at the start, then use the folio later in the function. Moves a call to page_folio() earlier, and removes an access to page->mapping. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit acede6a57360ec361943c9eb8c4b8d2387af67e9 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:25 2025 +0100 f2fs: Use bio_for_each_folio_all() in __has_merged_page() Iterate over each folio rather than each page. Convert f2fs_compress_control_page() to f2fs_compress_control_folio() since this is the only caller. Removes a reference to page->mapping which is going away soon as well as calls to fscrypt_is_bounce_page() and fscrypt_pagecache_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 98251710cae1c1b63a05e2975eff4c86d65952ce Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:24 2025 +0100 f2fs: Use F2FS_P_SB() in f2fs_is_compressed_page() Remove a reference to page->mapping which is going away soon. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4e5109c7c5f218d40e41f8b53bb96114b65a05d2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:23 2025 +0100 f2fs: Introduce fio_inode() This helper returns the inode associated with the f2fs_io_info. That's a relatively common thing to want, mildly awkward to get and provides one place to change if we decide to record it directly, or change fio->page to fio->folio. Signed-off-by: Matthew Wilcox (Oracle) [Jaegeuk Kim: fix wrong fio_inode conversion] Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8cc29b38cb26dc0adc3b71ece4cadd3f3a4821ce Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:22 2025 +0100 f2fs: Use a folio in f2fs_write_raw_pages() Convert each page in rpages to a folio before operating on it. Replaces eight calls to compound_head() with one and removes a reference to page->mapping which is going away soon. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a8cb9b3d9b841c65dae4122de2096df02525e92c Author: Matthew Wilcox (Oracle) Date: Mon Mar 31 21:10:21 2025 +0100 f2fs: Use a folio in f2fs_compress_free_page() Convert the incoming page to a folio and operate on it. Removes a reference to page->mapping which is going away soon. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 463f2eaa203aa04373cce87d9475fb9cdb09c8d9 Author: Neil Armstrong Date: Tue Apr 15 16:03:48 2025 +0200 interconnect: qcom: sm8650: add the MASTER_APSS_NOC Add the MASTER_APSS_NOC interconnect node of the system NoC and the associated QoS configuration. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250415-topic-sm8650-upstream-icc-apss-noc-v1-2-9e6bea3943d8@linaro.org Signed-off-by: Georgi Djakov commit c5c967733c5e187bc8f9993f3e8acee65d3215f2 Author: Neil Armstrong Date: Tue Apr 15 16:03:47 2025 +0200 dt-bindings: interconnect: sm8650: document the MASTER_APSS_NOC Document the MASTER_APSS_NOC interconnect node for the SM8650 SoC system NoC. Signed-off-by: Neil Armstrong Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250415-topic-sm8650-upstream-icc-apss-noc-v1-1-9e6bea3943d8@linaro.org Signed-off-by: Georgi Djakov commit 40ef9b6b778fee32b33ff52b5e9c07113b6c6435 Author: Neil Armstrong Date: Mon Apr 7 17:16:47 2025 +0200 interconnect: qcom: sm8650: enable QoS configuration Enable QoS configuration for master ports with predefined values for priority and urgency forwarding. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250407-topic-sm8650-upstream-icc-qos-v1-1-93b33f99a455@linaro.org Signed-off-by: Georgi Djakov commit af73692e7b486497b8983d7cabbcd5e4dcf5cb98 Author: Krzysztof Kozlowski Date: Mon Mar 24 13:53:02 2025 +0100 dt-bindings: interconnect: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. While re-indenting, drop unused labels. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250324125302.82167-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov commit 179c0c7044a378198adb36f2a12410ab68cc730a Author: Yaxiong Tian Date: Fri Apr 18 09:06:13 2025 +0800 PM: EM: Fix potential division-by-zero error in em_compute_costs() When the device is of a non-CPU type, table[i].performance won't be initialized in the previous em_init_performance(), resulting in division by zero when calculating costs in em_compute_costs(). Since the 'cost' algorithm is only used for EAS energy efficiency calculations and is currently not utilized by other device drivers, we should add the _is_cpu_device(dev) check to prevent this division-by-zero issue. Fixes: 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division") Signed-off-by: Yaxiong Tian Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/tencent_7F99ED4767C1AF7889D0D8AD50F34859CE06@qq.com Signed-off-by: Rafael J. Wysocki commit 9dcad2fb31bd9b9b860c515859625a065dd6e656 Author: David Kaplan Date: Fri Apr 18 11:17:12 2025 -0500 x86/bugs: Restructure GDS mitigation Restructure GDS mitigation to use select/apply functions to create consistent vulnerability handling. Define new AUTO mitigation for GDS. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-8-david.kaplan@amd.com commit e527e891492d9e81325967e51a1d21b259318d0e Merge: f438eee2c8c933 8fb33581bb8a9d Author: Jakub Kicinski Date: Fri Apr 25 19:22:03 2025 -0700 Merge branch 'net-stmmac-socfpga-1000basex-support-and-cleanups' Maxime Chevallier says: ==================== net: stmmac: socfpga: 1000BaseX support and cleanups This small series sorts-out 1000BaseX support and does a bit of cleanup for the Lynx conversion. Patch 1 makes sure that we set the right phy_mode when working in 1000BaseX mode, so that the internal GMII is configured correctly. Patch 2 removes a check for phy_device upon calling fix_mac_speed(). As the SGMII adapter may be chained to a Lynx PCS, checking for a phy_device to be attached to the netdev before enabling the SGMII adapter doesn't make sense, as we won't have a downstream PHY when using 1000BaseX. Patch 3 cleans an unused field from the PCS conversion. v1: https://lore.kernel.org/20250422094701.49798-1-maxime.chevallier@bootlin.com v2: https://lore.kernel.org/20250423104646.189648-1-maxime.chevallier@bootlin.com ==================== Link: https://patch.msgid.link/20250424071223.221239-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 8fb33581bb8a9d27e021723cbccef2936c5ad671 Author: Maxime Chevallier Date: Thu Apr 24 09:12:22 2025 +0200 net: stmmac: socfpga: Remove unused pcs-mdiodev field When dwmac-socfpga was converted to using the Lynx PCS (previously referred to in the driver as the Altera TSE PCS), the lynx_pcs_create_mdiodev() was used to create the pcs instance. As this function didn't exist in the early versions of the series, a local mdiodev object was stored for PCS creation. It was never used, but still made it into the driver, so remove it. Reviewed-by: Russell King (Oracle) Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250424071223.221239-4-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 3bf19459da62113122cfb2b1305677b034529742 Author: Maxime Chevallier Date: Thu Apr 24 09:12:21 2025 +0200 net: stmmac: socfpga: Don't check for phy to enable the SGMII adapter The SGMII adapter needs to be enabled for both Cisco SGMII and 1000BaseX operations. It doesn't make sense to check for an attached phydev here, as we simply might not have any, in particular if we're using the 1000BaseX interface mode. Make so that we only re-enable the SGMII adapter when it's present, and when we use a phy_mode that is handled by said adapter. Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250424071223.221239-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 6fba40e7f61033a2350bd812c5faa1d30333eefd Author: Maxime Chevallier Date: Thu Apr 24 09:12:20 2025 +0200 net: stmmac: socfpga: Enable internal GMII when using 1000BaseX Dwmac Socfpga may be used with an instance of a Lynx / Altera TSE PCS, in which case it gains support for 1000BaseX. It appears that the PCS is wired to the MAC through an internal GMII bus. Make sure that we enable the GMII_MII mode for the internal MAC when using 1000BaseX. Reviewed-by: Russell King (Oracle) Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20250424071223.221239-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 2178ac58e176d8e1e4529b02647f5e549bb88405 Author: David Kaplan Date: Fri Apr 18 11:17:11 2025 -0500 x86/bugs: Restructure SRBDS mitigation Restructure SRBDS to use select/apply functions to create consistent vulnerability handling. Define new AUTO mitigation for SRBDS. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-7-david.kaplan@amd.com commit 357be13962eac9dca146c15963ca6a28cab60cd1 Author: Sudeep Holla Date: Fri Apr 25 21:20:21 2025 +0200 ACPICA: Drop stale comment about the header file content ACPICA commit 48e7c4cd893270dab8d05e6d75fbf23d0fcbb267 Commit a025731aec31 ("Restructure ACPI table files") restructed the header files and moved lots of tables that are in the ACPI specification to actbl2.h(e.g.: APIC/MADT, PCCT, PPTT, ..etc). This restructure made the comment stating this header file contains tables that are not in the ACPI specification incorrect. From that commit onwards it has remained as stale. Let us get rid of it as it might be misleading. Link: https://github.com/acpica/acpica/commit/48e7c4cd Reported-by: Sahil Kaushal Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/6168200.lOV4Wx5bFT@rjwysocki.net commit 6f0960a760eb926d8a2b9fe6fc7a1086cba14dd1 Author: David Kaplan Date: Sun Apr 27 17:12:41 2025 +0200 x86/bugs: Remove md_clear_*_mitigation() The functionality in md_clear_update_mitigation() and md_clear_select_mitigation() is now integrated into the select/update functions for the MDS, TAA, MMIO, and RFDS vulnerabilities. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-6-david.kaplan@amd.com commit 425af91c58023a8924cc2330384e040d388adc4e Author: Diederik de Haas Date: Fri Apr 25 10:44:44 2025 +0200 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3588-rock-5b The Radxa Rock 5B component placement document identifies the SPI Nor Flash chip as 'U4300' which is described on page 25 of the Schematic v1.45. There we can see that the VCC connector is connected to the VCC_3V3_S3 power source. This fixes the following warning: spi-nor spi5.0: supply vcc not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250425092601.56549-5-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 2c99a9ce2ccdb095de88028269913833dd2e984d Author: Diederik de Haas Date: Fri Apr 25 10:44:43 2025 +0200 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3566-pinetab2 As described on page 37 of PineTab2 Schematic-20230417, the SPI Flash's VCC connector is connected to VCCIO_FLASH and according to page 6 of that same schematic, that belongs to the VCC_1V8 power source. This fixes the following warning: spi-nor spi4.0: supply vcc not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250425092601.56549-4-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit b7b045de0bb80c2922344a18894a6a2e6c425f91 Author: Diederik de Haas Date: Fri Apr 25 10:44:42 2025 +0200 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3399-rockpro64 As described on page 16 of the RockPro64 schematics for both v2.0 and v2.1, the SPI Flash's VCC connector is connected to the VCC_3V0 power source. This fixes the following warning: spi-nor spi1.0: supply vcc not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250425092601.56549-3-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 2339bc6b42a6bb89a90b050b0ee3e1020249c750 Author: Diederik de Haas Date: Fri Apr 25 10:44:41 2025 +0200 arm64: dts: rockchip: Add vcc-supply to SPI flash on rk3328-rock64 As described on page 6 of the Rock64 schematics for both v2.0 and v3.0 the SPI Flash's VCC connector is connected to the VCC_IO power source. This fixes the following warning: spi-nor spi0.0: supply vcc not found, using dummy regulator Signed-off-by: Diederik de Haas Link: https://lore.kernel.org/r/20250425092601.56549-2-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit b0657f9a8cdd1a8075de60e1b7c1977515b2a8f4 Author: Markus Reichl Date: Fri Apr 11 16:02:21 2025 +0200 arm64: dts: rockchip: Add vcc supply to spi flash on rk3399-roc-pc Add vcc supply to the spi-nor flash chip on rk3399-roc-pc boards according to the board schematics ROC-3399-PC-V10-A-20180804 to avoid warnings in dmesg output. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20250411140223.1069-1-m.reichl@fivetechno.de Signed-off-by: Heiko Stuebner commit 34b69113ab975e8718b24b9b2cd4b1ea8dc107d8 Author: Nicolas Frattaroli Date: Mon Apr 14 20:37:38 2025 +0200 arm64: dts: rockchip: enable pcie on Sige5 The ArmSoM Sige5 board exposes PCIe controller 0 on its M.2 slot on the bottom of the board. Enable the necessary nodes for it, and also add the correct pins for both the power enable GPIO and the PCIe reset GPIO. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250414-rk3576-sige5-pcie-v1-1-0e950a96f392@collabora.com Signed-off-by: Heiko Stuebner commit b022a48d8d6c0e701196c98c23f261512e6ab4c2 Author: Heiko Stuebner Date: Mon Apr 14 20:37:45 2025 +0200 arm64: dts: rockchip: Add HDMI support for roc-rk3576-pc Enable HDMI and VOP nodes for the roc-rk3576-pc board. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250414183745.1352470-1-heiko@sntech.de commit f50181bb033b941c623bd727988bdab890139158 Author: Chris Morgan Date: Tue Apr 15 12:47:11 2025 -0500 arm64: dts: rockchip: Enable HDMI0 audio output for Indiedroid Nova Make available HDMI audio for the HDMI0 port. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20250415174711.72891-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 2acfe31a8ce57f9ecc06c0a0b860dc25e29cf92b Author: Chaoyi Chen Date: Fri Apr 18 09:47:57 2025 +0800 arm64: dts: rockchip: Add rk3588 evb2 board General features for rk3588 evb2 board: - Rockchip RK3588 - LPDDR4/4X - eMMC5.1 - RK806-2x2pcs + DiscretePower - 1x HDMI2.1 TX / HDMI2.0 RX - 1x full size DisplayPort - 3x USB3.0 Host - 1x USB2.0 Host - WIFI/BT Tested with HDMI/GPU/USB2.0/USB3.0/WIFI module. Signed-off-by: Chaoyi Chen Link: https://lore.kernel.org/r/20250418014757.336-3-kernel@airkyi.com Signed-off-by: Heiko Stuebner commit b3610f20905fbc95afb61370df02bf1bfbb538c0 Author: Chaoyi Chen Date: Fri Apr 18 09:47:56 2025 +0800 dt-bindings: arm: rockchip: Add rk3588 evb2 board Add devicetree binding for the rk3588 evb2 board. Signed-off-by: Chaoyi Chen Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250418014757.336-2-kernel@airkyi.com Signed-off-by: Heiko Stuebner commit faebc6375bbf4e30b3ef3870b7879228ad7b2ada Author: Shawn Lin Date: Wed Apr 23 09:22:39 2025 +0800 arm64: dts: rockchip: Add pcie1 slot for rk3576 evb1 board PCIe1 and usb_drd1_dwc3 is sharing the same PHY on RK3576 platform. For pcie1 slot and USB interface, there is a swich IC labelled as Dial_Switch_1 on evb1 board. If we need to make pcie1 slot work for this board, we should first disable usb_drd1_dwc3 and then set Dial_Switch_1 to low state. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1745371359-30443-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Heiko Stuebner commit 281bc0c595d3d4ea9997205830cf99c65eff931a Author: Andy Yan Date: Sat Apr 26 15:15:41 2025 +0800 arm64: dts: rockchip: Enable eDP display for Cool Pi GenBook Cool Pi CM5 GenBook equipped with a 1080P eDP panel, the panel connected on board with 30/40 pin connector. There is no hpd hooked up on the board, so we need to set hpd-absent-delay-ms in dts. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250426071554.1305042-2-andyshrk@163.com Signed-off-by: Heiko Stuebner commit a481bb0b1ad936c976679f9de25a709b98f9dcc3 Author: Andy Yan Date: Sat Apr 26 15:15:40 2025 +0800 arm64: dts: rockchip: Add eDP1 dt node for rk3588 Add eDP1 dt node for RK3588 SoC Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250426071554.1305042-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 932bcd2131df776411dc26314f9455620909d4af Author: Jacobe Zang Date: Thu Apr 24 18:14:42 2025 +0800 arm64: dts: rockchip: enable HDMI out audio on Khadas Edge2 Enable HDMI out audio on the Khadas Edge2. Signed-off-by: Jacobe Zang Link: https://lore.kernel.org/r/20250424-edge-v1-3-314aad01d9ab@wesion.com Signed-off-by: Heiko Stuebner commit 169f17bbbeaf8c71f2d001f2d0109dd26270ed24 Author: Jacobe Zang Date: Thu Apr 24 18:14:41 2025 +0800 arm64: dts: rockchip: Add HDMI & VOP2 to Khadas Edge2 Enable HDMI display output on Khadas Edge2. Signed-off-by: Muhammed Efe Cetin Signed-off-by: Jacobe Zang Link: https://lore.kernel.org/r/20250424-edge-v1-2-314aad01d9ab@wesion.com Signed-off-by: Heiko Stuebner commit 8454ad4e4a9bfc9cae560da54bc8ecc1cf87f002 Author: Jacobe Zang Date: Thu Apr 24 18:14:40 2025 +0800 arm64: dts: rockchip: Add bluetooth support to Khadas Edge2 This commit adds the RTS signal, specifies the compatible Broadcom chip, its clock source, interrupts, GPIOs for wakeup and shutdown, maximum speed, pinctrl settings, and power supplies. Signed-off-by: Muhammed Efe Cetin Signed-off-by: Jacobe Zang Link: https://lore.kernel.org/r/20250424-edge-v1-1-314aad01d9ab@wesion.com Signed-off-by: Heiko Stuebner commit 777055e02f739b5df943366323f58eeb68d90e67 Author: Heiko Stuebner Date: Wed Feb 26 15:09:42 2025 +0100 arm64: dts: rockchip: add overlay for tiger-haikou video-demo adapter This adds support for the video-demo-adapter DEVKIT ADDON CAM-TS-A01 (https://embedded.cherry.de/product/development-kit/) for the Haikou devkit with Tiger RK3588 SoM. The Video Demo adapter is an adapter connected to the fake PCIe slot labeled "Video Connector" on the Haikou devkit. It's main feature is a Leadtek DSI-display with touchscreen and a camera (that is not supported yet). To drive these components a number of additional regulators are grouped on the adapter as well as a PCA9670 gpio-expander to provide the needed additional gpio-lines. Signed-off-by: Heiko Stuebner Reviewed-by: Dragan Simic # Makefile Tested-by: Quentin Schulz Link: https://lore.kernel.org/r/20250226140942.3825223-4-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 203d81f8e167a9e82747a14dace40e0abbd5c791 Author: David Kaplan Date: Fri Apr 18 11:17:09 2025 -0500 x86/bugs: Restructure RFDS mitigation Restructure RFDS mitigation to use select/update/apply functions to create consistent vulnerability handling. [ bp: Rename the oneline helper to what it checks. ] Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-5-david.kaplan@amd.com commit 2dfc7cd74a5e062a5405560447517e7aab1c7341 Author: Corentin Labbe Date: Sun Apr 27 13:12:36 2025 +0200 crypto: sun8i-ss - do not use sg_dma_len before calling DMA functions When testing sun8i-ss with multi_v7_defconfig, all CBC algorithm fail crypto selftests. This is strange since on sunxi_defconfig, everything was ok. The problem was in the IV setup loop which never run because sg_dma_len was 0. Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 0f8d42bf128d349ad490e87d5574d211245e40f1 Author: Herbert Xu Date: Sun Apr 27 08:42:54 2025 +0800 crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist Move the generic part of skcipher walk into scatterwalk, and use it to implement memcpy_sglist. This makes memcpy_sglist do the right thing when two distinct SG lists contain identical subsets (e.g., the AD part of AEAD). Signed-off-by: Herbert Xu commit 1dea68318aad0899011a49748634aff54ddc327a Author: Herbert Xu Date: Sun Apr 27 08:42:51 2025 +0800 crypto: ccp - Include crypto/utils.h for crypto_memneq Include crypto/utils.h to get crypto_memneq rather than relying on random inclusions. Signed-off-by: Herbert Xu commit 9a7b87412390b008c923828913e7d296d3ae5afd Author: Thorsten Blum Date: Sun Apr 27 00:26:19 2025 +0200 crypto: octeontx2 - Simplify multiple return statements Simplify multiple return statements by directly returning the boolean expressions. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu commit db4978d2f0559288a1595f82bda419fad216beed Author: Kees Cook Date: Fri Apr 25 23:11:31 2025 -0700 crypto: iaa - Adjust workqueue allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct idxd_wq **", but the returned type will be "struct wq **". These are the same size allocation (pointer sized), but the types don't match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit b9580cf5f9ace0d64903164f553cbef674cefb46 Author: Ovidiu Panait Date: Fri Apr 25 15:45:17 2025 +0300 crypto: sun8i-ce-cipher - use pm_runtime_resume_and_get() Replace pm_runtime_get_sync() usage with pm_runtime_resume_and_get() to simplify error handling. This is recommended in the documentation of pm_runtime_get_sync(): /** * pm_runtime_get_sync - Bump up usage counter of a device and resume it. ... * Consider using pm_runtime_resume_and_get() instead of it, especially * if its return value is checked by the caller, as this is likely to result * in cleaner code. ... */ Signed-off-by: Ovidiu Panait Tested-by: Corentin LABBE Acked-by: Corentin LABBE Signed-off-by: Herbert Xu commit 031bc3e8b9e230df0c5380eb4a8767558c4c1a25 Author: Ovidiu Panait Date: Fri Apr 25 15:45:16 2025 +0300 crypto: sun8i-ce-cipher - use IS_ENABLED() checks for debugfs stats Add IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG) checks before the fallback counter updates to make sure the code is not included when debugfs statistics support is not enabled. Also, drop the existing ifdef guards, since 'struct sun8i_ce_alg_template' is always defined, even with CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG disabled. Signed-off-by: Ovidiu Panait Tested-by: Corentin LABBE Acked-by: Corentin LABBE Signed-off-by: Herbert Xu commit 8e379e8fb83f426a60a3ae0827743ebf881f6fde Author: Ovidiu Panait Date: Fri Apr 25 15:45:15 2025 +0300 crypto: sun8i-ce-cipher - use crypto_skcipher_driver_name() Use crypto_skcipher_driver_name() helper from , instead of accessing struct crypto_alg directly. Signed-off-by: Ovidiu Panait Acked-by: Corentin LABBE Tested-by: Corentin LABBE Signed-off-by: Herbert Xu commit f31adc3e356f7350d4a4d68c98d3f60f2f6e26b3 Author: Ovidiu Panait Date: Fri Apr 25 15:45:14 2025 +0300 crypto: sun8i-ce-cipher - fix error handling in sun8i_ce_cipher_prepare() Fix two DMA cleanup issues on the error path in sun8i_ce_cipher_prepare(): 1] If dma_map_sg() fails for areq->dst, the device driver would try to free DMA memory it has not allocated in the first place. To fix this, on the "theend_sgs" error path, call dma unmap only if the corresponding dma map was successful. 2] If the dma_map_single() call for the IV fails, the device driver would try to free an invalid DMA memory address on the "theend_iv" path: ------------[ cut here ]------------ DMA-API: sun8i-ce 1904000.crypto: device driver tries to free an invalid DMA memory address WARNING: CPU: 2 PID: 69 at kernel/dma/debug.c:968 check_unmap+0x123c/0x1b90 Modules linked in: skcipher_example(O+) CPU: 2 UID: 0 PID: 69 Comm: 1904000.crypto- Tainted: G O 6.15.0-rc3+ #24 PREEMPT Tainted: [O]=OOT_MODULE Hardware name: OrangePi Zero2 (DT) pc : check_unmap+0x123c/0x1b90 lr : check_unmap+0x123c/0x1b90 ... Call trace: check_unmap+0x123c/0x1b90 (P) debug_dma_unmap_page+0xac/0xc0 dma_unmap_page_attrs+0x1f4/0x5fc sun8i_ce_cipher_do_one+0x1bd4/0x1f40 crypto_pump_work+0x334/0x6e0 kthread_worker_fn+0x21c/0x438 kthread+0x374/0x664 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- To fix this, check for !dma_mapping_error() before calling dma_unmap_single() on the "theend_iv" path. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit b75fa20c127eb736b0ac9b30be051f526a2316a9 Author: Herbert Xu Date: Fri Apr 25 11:05:29 2025 +0800 crypto: api - Add crypto_stack_request_init and initialise flags fully Add a helper to initialise crypto stack requests and use it for ahash and acomp. Make sure that the flags field is initialised fully in the helper to silence false-positive warnings from the compiler. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504250751.mdy28Ibr-lkp@intel.com/ Signed-off-by: Herbert Xu commit f438eee2c8c93320d70cdee7630a06baaa47a304 Author: Huacai Chen Date: Thu Apr 24 15:22:07 2025 +0800 net: stmmac: dwmac-loongson: Move queue number init to common function Currently, the tx and rx queue number initialization is duplicated in loongson_gmac_data() and loongson_gnet_data(), so move it to the common function loongson_default_data(). This is a preparation for later patches. Reviewed-by: Yanteng Si Tested-by: Henry Chen Tested-by: Biao Dong Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen Signed-off-by: David S. Miller commit e3b49657228c114099b4591821465dc6f9884c61 Author: Herbert Xu Date: Thu Apr 24 18:47:30 2025 +0800 crypto: polyval-generic - Use API partial block handling Use the Crypto API partial block handling. The accelerated export format on x86/arm64 is easier to use so switch the generic polyval algorithm to use that format instead. Signed-off-by: Herbert Xu commit 74df89ff7676479651059f82af35a3c9bb41327c Author: Herbert Xu Date: Thu Apr 24 18:47:28 2025 +0800 crypto: x86/polyval - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit d5a582a782f31c8712d4bfa07b6dc6d64f4ae330 Author: Herbert Xu Date: Thu Apr 24 18:47:26 2025 +0800 crypto: arm64/polyval - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 2cfe41630a1a4f24d46825aa9656a51a38fb7f7d Author: Herbert Xu Date: Wed Apr 23 17:22:31 2025 +0800 crypto: hash - Fix clone error handling Do not copy the exit function in crypto_clone_tfm as it should only be set after init_tfm or clone_tfm has succeeded. Move the setting into crypto_clone_ahash and crypto_clone_shash instead. Also clone the fb if necessary. Signed-off-by: Herbert Xu commit 19da081a28c95fe9b03ce952a2bf4a6f6bf5112c Author: Herbert Xu Date: Wed Apr 23 17:22:28 2025 +0800 crypto: api - Add crypto_request_clone and fb Add a helper to clone crypto requests and eliminate code duplication. Use kmemdup in the helper. Also add an fb field to crypto_tfm. This also happens to fix the existing implementations which were buggy. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504230118.1CxUaUoX-lkp@intel.com/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504230004.c7mrY0C6-lkp@intel.com/ Signed-off-by: Herbert Xu commit af9ce62783dd6acd595491badec08f1235c84739 Author: Eric Biggers Date: Tue Apr 22 08:27:16 2025 -0700 crypto: lib/poly1305 - remove INTERNAL symbol and selection of CRYPTO Now that the architecture-optimized Poly1305 kconfig symbols are defined regardless of CRYPTO, there is no need for CRYPTO_LIB_POLY1305 to select CRYPTO. So, remove that. This makes the indirection through the CRYPTO_LIB_POLY1305_INTERNAL symbol unnecessary, so get rid of that and just use CRYPTO_LIB_POLY1305 directly. Finally, make the fallback to the generic implementation use a default value instead of a select; this makes it consistent with how the arch-optimized code gets enabled and also with how CRYPTO_LIB_BLAKE2S_GENERIC gets enabled. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 879f47548b8710f6cdfde38be7d5a6302e9e015d Author: Eric Biggers Date: Tue Apr 22 08:27:15 2025 -0700 crypto: lib/chacha - remove INTERNAL symbol and selection of CRYPTO Now that the architecture-optimized ChaCha kconfig symbols are defined regardless of CRYPTO, there is no need for CRYPTO_LIB_CHACHA to select CRYPTO. So, remove that. This makes the indirection through the CRYPTO_LIB_CHACHA_INTERNAL symbol unnecessary, so get rid of that and just use CRYPTO_LIB_CHACHA directly. Finally, make the fallback to the generic implementation use a default value instead of a select; this makes it consistent with how the arch-optimized code gets enabled and also with how CRYPTO_LIB_BLAKE2S_GENERIC gets enabled. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c7c18c94a6becc42c71a17fdc6a551aa8efb2999 Author: Eric Biggers Date: Tue Apr 22 08:27:14 2025 -0700 crypto: x86 - move library functions to arch/x86/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the x86 BLAKE2s, ChaCha, and Poly1305 library functions into a new directory arch/x86/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3ea91323fe32011092fc75575d9a074ab374d673 Author: Eric Biggers Date: Tue Apr 22 08:27:13 2025 -0700 crypto: s390 - move library functions to arch/s390/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the s390 ChaCha library functions into a new directory arch/s390/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Acked-by: Heiko Carstens Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d604877c2f9473848345db8e79341d4f6338dd78 Author: Eric Biggers Date: Tue Apr 22 08:27:12 2025 -0700 crypto: riscv - move library functions to arch/riscv/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the riscv ChaCha library functions into a new directory arch/riscv/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f9f86c03efebf81274b1ec66840410d58255fb84 Author: Eric Biggers Date: Tue Apr 22 08:27:11 2025 -0700 crypto: powerpc - move library functions to arch/powerpc/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the powerpc ChaCha and Poly1305 library functions into a new directory arch/powerpc/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 939a54ac073808db15ed411d563dfadb3ef12798 Author: Eric Biggers Date: Tue Apr 22 08:27:10 2025 -0700 crypto: mips - move library functions to arch/mips/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the mips ChaCha and Poly1305 library functions into a new directory arch/mips/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cc16e228a205ffe26c6f71a9ed165fe964f3d638 Author: Eric Biggers Date: Tue Apr 22 08:27:09 2025 -0700 crypto: arm64 - move library functions to arch/arm64/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the arm64 ChaCha and Poly1305 library functions into a new directory arch/arm64/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 714656a84697f9615b9488b490c99edb3ecfcd3d Author: Eric Biggers Date: Tue Apr 22 08:27:08 2025 -0700 crypto: arm - move library functions to arch/arm/lib/crypto/ Continue disentangling the crypto library functions from the generic crypto infrastructure by moving the arm BLAKE2s, ChaCha, and Poly1305 library functions into a new directory arch/arm/lib/crypto/ that does not depend on CRYPTO. This mirrors the distinction between crypto/ and lib/crypto/. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 67128a90b3541298988bfc3a0bad88178d6a7fb7 Author: Eric Biggers Date: Tue Apr 22 08:27:07 2025 -0700 crypto: x86 - drop redundant dependencies on X86 arch/x86/crypto/Kconfig is sourced only when CONFIG_X86=y, so there is no need for the symbols defined inside it to depend on X86. In the case of CRYPTO_TWOFISH_586 and CRYPTO_TWOFISH_X86_64, the dependency was actually on '(X86 || UML_X86)', which suggests that these two symbols were intended to be available under user-mode Linux as well. Yet, again these symbols were defined only when CONFIG_X86=y, so that was not the case. Just remove this redundant dependency. Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 4cf0e759161d28ce44b97bbdb051b176f31c647d Author: Eric Biggers Date: Tue Apr 22 08:27:06 2025 -0700 crypto: s390 - drop redundant dependencies on S390 arch/s390/crypto/Kconfig is sourced only when CONFIG_S390=y, so there is no need for the symbols defined inside it to depend on S390. Acked-by: Ard Biesheuvel Acked-by: Heiko Carstens Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d58a46df96b687f166aa99deb2bc32b94a2f47e8 Author: Eric Biggers Date: Tue Apr 22 08:27:05 2025 -0700 crypto: powerpc - drop redundant dependencies on PPC arch/powerpc/crypto/Kconfig is sourced only when CONFIG_PPC=y, so there is no need for the symbols defined inside it to depend on PPC. Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e2df5fb770c0c11d02bbcb5df6b4070b3dee844c Author: Eric Biggers Date: Tue Apr 22 08:27:04 2025 -0700 crypto: arm64 - drop redundant dependencies on ARM64 arch/arm64/crypto/Kconfig is sourced only when CONFIG_ARM64=y, so there is no need for the symbols defined inside it to depend on ARM64. Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 94c721ea03c7078163f41dbaa101ac721ddac329 Author: Sean Christopherson Date: Fri Mar 14 20:10:48 2025 -0700 iommu/amd: Ensure GA log notifier callbacks finish running before module unload Synchronize RCU when unregistering KVM's GA log notifier to ensure all in-flight interrupt handlers complete before KVM-the module is unloaded. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20250315031048.2374109-1-seanjc@google.com Signed-off-by: Joerg Roedel commit 5c3bf6cba7911f470afd748606be5c03a9512fcc Author: Hangbin Liu Date: Thu Apr 24 04:22:38 2025 +0000 bonding: assign random address if device address is same as bond This change addresses a MAC address conflict issue in failover scenarios, similar to the problem described in commit a951bc1e6ba5 ("bonding: correct the MAC address for 'follow' fail_over_mac policy"). In fail_over_mac=follow mode, the bonding driver expects the formerly active slave to swap MAC addresses with the newly active slave during failover. However, under certain conditions, two slaves may end up with the same MAC address, which breaks this policy: 1) ip link set eth0 master bond0 -> bond0 adopts eth0's MAC address (MAC0). 2) ip link set eth1 master bond0 -> eth1 is added as a backup with its own MAC (MAC1). 3) ip link set eth0 nomaster -> eth0 is released and restores its MAC (MAC0). -> eth1 becomes the active slave, and bond0 assigns MAC0 to eth1. 4) ip link set eth0 master bond0 -> eth0 is re-added to bond0, now both eth0 and eth1 have MAC0. This results in a MAC address conflict and violates the expected behavior of the failover policy. To fix this, we assign a random MAC address to any newly added slave if its current MAC address matches that of the bond. The original (permanent) MAC address is saved and will be restored when the device is released from the bond. This ensures that each slave has a unique MAC address during failover transitions, preserving the integrity of the fail_over_mac=follow policy. Fixes: 3915c1e8634a ("bonding: Add "follow" option to fail_over_mac") Signed-off-by: Hangbin Liu Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit e586e22974d2b7acbef3c6c3e01b2d5ce69efe33 Author: Jason Gunthorpe Date: Fri Apr 25 10:08:37 2025 -0300 iommu: Protect against overflow in iommu_pgsize() On a 32 bit system calling: iommu_map(0, 0x40000000) When using the AMD V1 page table type with a domain->pgsize of 0xfffff000 causes iommu_pgsize() to miscalculate a result of: size=0x40000000 count=2 count should be 1. This completely corrupts the mapping process. This is because the final test to adjust the pagesize malfunctions when the addition overflows. Use check_add_overflow() to prevent this. Fixes: b1d99dc5f983 ("iommu: Hook up '->unmap_pages' driver callback") Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/0-v1-3ad28fc2e3a3+163327-iommu_overflow_pgsize_jgg@nvidia.com Signed-off-by: Joerg Roedel commit da33e87bd2bfc63531cf7448a3cd7a3d42182f08 Author: Robin Murphy Date: Thu Apr 24 18:41:28 2025 +0100 iommu: Handle yet another race around registration Next up on our list of race windows to close is another one during iommu_device_register() - it's now OK again for multiple instances to run their bus_iommu_probe() in parallel, but an iommu_probe_device() can still also race against a running bus_iommu_probe(). As Johan has managed to prove, this has now become a lot more visible on DT platforms wth driver_async_probe where a client driver is attempting to probe in parallel with its IOMMU driver - although commit b46064a18810 ("iommu: Handle race with default domain setup") resolves this from the client driver's point of view, this isn't before of_iommu_configure() has had the chance to attempt to "replay" a probe that the bus walk hasn't even tried yet, and so still cause the out-of-order group allocation behaviour that we're trying to clean up (and now warning about). The most reliable thing to do here is to explicitly keep track of the "iommu_device_register() is still running" state, so we can then special-case the ops lookup for the replay path (based on dev->iommu again) to let that think it's still waiting for the IOMMU driver to appear at all. This still leaves the longstanding theoretical case of iommu_bus_notifier() being triggered during bus_iommu_probe(), but it's not so simple to defer a notifier, and nobody's ever reported that being a visible issue, so let's quietly kick that can down the road for now... Reported-by: Johan Hovold Fixes: bcb81ac6ae3c ("iommu: Get DT/ACPI parsing into the proper probe path") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/88d54c1b48fed8279aa47d30f3d75173685bb26a.1745516488.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 6f7340120a0aa8b2eb29c826a4434e8b5c4e11d3 Author: Lu Baolu Date: Thu Apr 24 11:41:23 2025 +0800 iommu: Allow attaching static domains in iommu_attach_device_pasid() The idxd driver attaches the default domain to a PASID of the device to perform kernel DMA using that PASID. The domain is attached to the device's PASID through iommu_attach_device_pasid(), which checks if the domain->owner matches the iommu_ops retrieved from the device. If they do not match, it returns a failure. if (ops != domain->owner || pasid == IOMMU_NO_PASID) return -EINVAL; The static identity domain implemented by the intel iommu driver doesn't specify the domain owner. Therefore, kernel DMA with PASID doesn't work for the idxd driver if the device translation mode is set to passthrough. Generally the owner field of static domains are not set because they are already part of iommu ops. Add a helper domain_iommu_ops_compatible() that checks if a domain is compatible with the device's iommu ops. This helper explicitly allows the static blocked and identity domains associated with the device's iommu_ops to be considered compatible. Fixes: 2031c469f816 ("iommu/vt-d: Add support for static identity domain") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220031 Cc: stable@vger.kernel.org Suggested-by: Jason Gunthorpe Link: https://lore.kernel.org/linux-iommu/20250422191554.GC1213339@ziepe.ca/ Signed-off-by: Lu Baolu Reviewed-by: Dave Jiang Reviewed-by: Robin Murphy Reviewed-by: Jason Gunthorpe Reviewed-by: Vasant Hegde Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20250424034123.2311362-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 4a5a04e61d7f8f26472f93287f6dcb669f0cf22f Author: David Kaplan Date: Fri Apr 18 11:17:08 2025 -0500 x86/bugs: Restructure MMIO mitigation Restructure MMIO mitigation to use select/update/apply functions to create consistent vulnerability handling. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-4-david.kaplan@amd.com commit fa26198d30f3cdd7627ce47362057848219de765 Author: Arnd Bergmann Date: Wed Apr 23 18:48:16 2025 +0200 iommu/io-pgtable-arm: dynamically allocate selftest device struct In general a 'struct device' is way too large to be put on the kernel stack. Apparently something just caused it to grow a slightly larger, which pushed the arm_lpae_do_selftests() function over the warning limit in some configurations: drivers/iommu/io-pgtable-arm.c:1423:19: error: stack frame size (1032) exceeds limit (1024) in 'arm_lpae_do_selftests' [-Werror,-Wframe-larger-than] 1423 | static int __init arm_lpae_do_selftests(void) | ^ Change the function to use a dynamically allocated faux_device instead of the on-stack device structure. Fixes: ca25ec247aad ("iommu/io-pgtable-arm: Remove iommu_dev==NULL special case") Link: https://lore.kernel.org/all/ab75a444-22a1-47f5-b3c0-253660395b5a@arm.com/ Signed-off-by: Arnd Bergmann Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20250423164826.2931382-1-arnd@kernel.org Signed-off-by: Joerg Roedel commit 33647d0be323f9e2f27cd1e86de5cfd965cec654 Author: Arnd Bergmann Date: Wed Apr 23 18:40:02 2025 +0200 iommu: ipmmu-vmsa: avoid Wformat-security warning iommu_device_sysfs_add() requires a constant format string, otherwise a W=1 build produces a warning: drivers/iommu/ipmmu-vmsa.c:1093:62: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] 1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev)); | ^~~~~~~~~~~~~~~~~~~~ drivers/iommu/ipmmu-vmsa.c:1093:62: note: treat the string as an argument to avoid this 1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev)); | ^ | "%s", This was an old bug but I saw it now because the code was changed as part of commit d9d3cede4167 ("iommu/ipmmu-vmsa: Register in a sensible order"). Fixes: 7af9a5fdb9e0 ("iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()") Signed-off-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250423164006.2661372-1-arnd@kernel.org Signed-off-by: Joerg Roedel commit 21c03574df19f0d77cb2e4d28bc02c79b21e656a Author: Jason Gunthorpe Date: Tue Apr 8 13:35:51 2025 -0300 iommu: Hide ops.domain_alloc behind CONFIG_FSL_PAMU fsl_pamu is the last user of domain_alloc(), and it is using it to create something weird that doesn't really fit into the iommu subsystem architecture. It is a not a paging domain since it doesn't have any map/unmap ops. It may be some special kind of identity domain. For now just leave it as is. Wrap it's definition in CONFIG_FSL_PAMU to discourage any new drivers from attempting to use it. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/5-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com Signed-off-by: Joerg Roedel commit a4672d0fe17dd2b5b2f485ae6c98990164e874eb Author: Jason Gunthorpe Date: Tue Apr 8 13:35:50 2025 -0300 iommu: Do not call domain_alloc() in iommu_sva_domain_alloc() No driver implements SVA under domain_alloc() anymore, this is dead code. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/4-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 07107e74444bedb943ee91ec6072c3baf62f4ae7 Author: Jason Gunthorpe Date: Tue Apr 8 13:35:49 2025 -0300 iommu/virtio: Move to domain_alloc_paging() virtio has the complication that it sometimes wants to return a paging domain for IDENTITY which makes this conversion a little different than other drivers. Add a viommu_domain_alloc_paging() that combines viommu_domain_alloc() and viommu_domain_finalise() to always return a fully initialized and finalized paging domain. Use viommu_domain_alloc_identity() to implement the special non-bypass IDENTITY flow by calling viommu_domain_alloc_paging() then viommu_domain_map_identity(). Remove support for deferred finalize and the vdomain->mutex. Remove core support for domain_alloc() IDENTITY as virtio was the last driver using it. Reviewed-by: Jean-Philippe Brucker Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/3-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 0d609a1450fab636c825c66344ab0ecfc1d3a98c Author: Jason Gunthorpe Date: Tue Apr 8 13:35:48 2025 -0300 iommu: Add domain_alloc_identity() virtio-iommu has a mode where the IDENTITY domain is actually a paging domain with an identity mapping covering some of the system address space manually created. To support this add a new domain_alloc_identity() op that accepts the struct device so that virtio can allocate and fully finalize a paging domain to return. Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/2-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 0d76a6edae9eeae5364285296b69d73dacb152f3 Author: Jason Gunthorpe Date: Tue Apr 8 13:35:47 2025 -0300 iommu/virtio: Break out bypass identity support into a global static To make way for a domain_alloc_paging conversion add the typical global static IDENTITY domain. This supports VMMs that have a VIRTIO_IOMMU_F_BYPASS_CONFIG config. If the VMM does not have support then the domain_alloc path is still used, which creates an IDENTITY domain out of a paging domain. Reviewed-by: Jean-Philippe Brucker Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/1-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com Signed-off-by: Joerg Roedel commit c6f0d53ebf358f453e162a0d1f38e2c2d42a54bd Author: Chen Ni Date: Tue Apr 22 15:25:11 2025 +0800 iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops() free_io_pgtable_ops() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250422072511.1334243-1-nichen@iscas.ac.cn Signed-off-by: Joerg Roedel commit f984fb09e60e0e2db5ad5be9d4cfcefb2008fda1 Author: Lu Baolu Date: Fri Apr 18 16:01:30 2025 +0800 iommu: Remove iommu_dev_enable/disable_feature() No external drivers use these interfaces anymore. Furthermore, no existing iommu drivers implement anything in the callbacks. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Zhangfei Gao Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/20250418080130.1844424-9-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit be2a24322c2029f1d64d586dca5927f10a670604 Author: Lu Baolu Date: Fri Apr 18 16:01:29 2025 +0800 iommufd: Remove unnecessary IOMMU_DEV_FEAT_IOPF The iopf enablement has been moved to the iommu drivers. It is unnecessary for iommufd to handle iopf enablement. Remove the iopf enablement logic to avoid duplication. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit ec027bf7e889845dd6119132cc672a6f6aa0337f Author: Lu Baolu Date: Fri Apr 18 16:01:28 2025 +0800 uacce: Remove unnecessary IOMMU_DEV_FEAT_IOPF None of the drivers implement anything for IOMMU_DEV_FEAT_IOPF anymore, remove it to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Zhangfei Gao Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 853b01b5efd742271a52aa84897c67615414ae02 Author: Lu Baolu Date: Fri Apr 18 16:01:27 2025 +0800 dmaengine: idxd: Remove unnecessary IOMMU_DEV_FEAT_IOPF The IOMMU_DEV_FEAT_IOPF implementation in the iommu driver is just a no-op. It will also be removed from the iommu driver in the subsequent patch. Remove it to avoid dead code. Signed-off-by: Lu Baolu Acked-by: Vinod Koul Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit c2fa4d4cceb865e1235cf5e0825d488e6b622536 Author: Lu Baolu Date: Fri Apr 18 16:01:26 2025 +0800 iommufd/selftest: Put iopf enablement in domain attach path Update iopf enablement in the iommufd mock device driver to use the new method, similar to the arm-smmu-v3 driver. Enable iopf support when any domain with an iopf_handler is attached, and disable it when the domain is removed. Add a refcount in the mock device state structure to keep track of the number of domains set to the device and PASIDs that require iopf. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Nicolin Chen Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 17fce9d2336d952b95474248303e5e7d9777f2e0 Author: Lu Baolu Date: Fri Apr 18 16:01:25 2025 +0800 iommu/vt-d: Put iopf enablement in domain attach path Update iopf enablement in the driver to use the new method, similar to the arm-smmu-v3 driver. Enable iopf support when any domain with an iopf_handler is attached, and disable it when the domain is removed. Place all the logic for controlling the PRI and iopf queue in the domain set/remove/replace paths. Keep track of the number of domains set to the device and PASIDs that require iopf. When the first domain requiring iopf is attached, add the device to the iopf queue and enable PRI. When the last domain is removed, remove it from the iopf queue and disable PRI. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 7c8896dd4a2a27c84b04dcf0990e6f6b118cb6b2 Author: Jason Gunthorpe Date: Fri Apr 18 16:01:24 2025 +0800 iommu: Remove IOMMU_DEV_FEAT_SVA None of the drivers implement anything here anymore, remove the dead code. Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20250418080130.1844424-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit cfea71aea921311350aabd7d5fc92269a052410e Author: Jason Gunthorpe Date: Fri Apr 18 16:01:23 2025 +0800 iommu/arm-smmu-v3: Put iopf enablement in the domain attach path SMMUv3 co-mingles FEAT_IOPF and FEAT_SVA behaviors so that fault reporting doesn't work unless both are enabled. This is not correct and causes problems for iommufd which does not enable FEAT_SVA for it's fault capable domains. These APIs are both obsolete, update SMMUv3 to use the new method like AMD implements. A driver should enable iopf support when a domain with an iopf_handler is attached, and disable iopf support when the domain is removed. Move the fault support logic to sva domain allocation and to domain attach, refusing to create or attach fault capable domains if the HW doesn't support it. Move all the logic for controlling the iopf queue under arm_smmu_attach_prepare(). Keep track of the number of domains on the master (over all the SSIDs) that require iopf. When the first domain requiring iopf is attached create the iopf queue, when the last domain is detached destroy it. Turn FEAT_IOPF and FEAT_SVA into no ops. Remove the sva_lock, this is all protected by the group mutex. Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Tested-by: Zhangfei Gao Acked-by: Will Deacon Link: https://lore.kernel.org/r/20250418080130.1844424-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit bdd7fce7a8168cebd400926d6352d2fbc1ac9f79 Author: David Kaplan Date: Fri Apr 18 11:17:07 2025 -0500 x86/bugs: Restructure TAA mitigation Restructure TAA mitigation to use select/update/apply functions to create consistent vulnerability handling. Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-3-david.kaplan@amd.com commit 559c758bc722ca0630d2b7f433f490cb76fe6128 Author: David Kaplan Date: Fri Apr 18 11:17:06 2025 -0500 x86/bugs: Restructure MDS mitigation Restructure MDS mitigation selection to use select/update/apply functions to create consistent vulnerability handling. [ bp: rename and beef up comment over VERW mitigation selected var for maximum clarity. ] Signed-off-by: David Kaplan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Josh Poimboeuf Link: https://lore.kernel.org/20250418161721.1855190-2-david.kaplan@amd.com commit 5088aad3d32cc0b1c96cbe3e718569ffc0aca4ba Author: Darrick J. Wong Date: Wed Apr 23 12:54:13 2025 -0700 xfs: stop using set_blocksize XFS has its own buffer cache for metadata that uses submit_bio, which means that it no longer uses the block device pagecache for anything. Create a more lightweight helper that runs the blocksize checks and flushes dirty data and use that instead. No more truncating the pagecache because XFS does not use it or care about it. Signed-off-by: Darrick J. Wong Reviewed-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino commit d0d7f1813dc748390673480ad0271a65a7ee5a57 Merge: f0447f80aec83f f40139fde5278d Author: Carlos Maiolino Date: Mon Apr 28 11:32:06 2025 +0200 Merge remote-tracking branch 'linux-block/block-6.15' into xfs tree We need two patches inside linux-block tree as dependencies of the patch which will follow this merge. Specifically, we need: block: fix race between set_blocksize and read paths block: hoist block size validation code to a separate function Signed-off-by: Carlos Maiolino commit 69b8115fc8d1d57c37b003e7c39a927c5b03390e Author: Philippe Simons Date: Thu Apr 3 07:52:10 2025 +0200 drm/panfrost: reorder pd/clk/rst sequence According to Mali manuals, the powerup sequence should be enable pd, asserting the reset then enabling the clock and the reverse for powerdown. Reviewed-by: Steven Price Tested-by: John Williams Signed-off-by: Philippe Simons Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250403055210.54486-4-simons.philippe@gmail.com commit 95bdaa89b29aea2a1293b63bd494498a8a41af5f Author: Philippe Simons Date: Thu Apr 3 07:52:09 2025 +0200 drm/panfrost: add h616 compatible string Tie the Allwinner compatible string to the GPU_PM_RT feature bits that will toggle the clocks and the reset line whenever the power domain is changing state. Reviewed-by: Steven Price Signed-off-by: Philippe Simons Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250403055210.54486-3-simons.philippe@gmail.com commit d76ebdf4aa829cd05a6bc8610efbbe17d4ecc8e8 Author: Philippe Simons Date: Thu Apr 3 07:52:08 2025 +0200 drm/panfrost: Add PM runtime flag When the GPU is the only device attached to a single power domain, core genpd disable and enable it when gpu enter and leave runtime suspend. Some power-domain requires a sequence before disabled, and the reverse when enabled. Add GPU_PM_RT flag, and implement in panfrost_device_runtime_suspend/resume. Reviewed-by: Steven Price Signed-off-by: Philippe Simons Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250403055210.54486-2-simons.philippe@gmail.com commit 8b26c8c376b29cf29710fbfd093df194cefe26ad Author: Lizhi Xu Date: Tue Apr 15 17:26:37 2025 +0800 fs/ntfs3: Add missing direct_IO in ntfs_aops_cmpr The ntfs3 can use the page cache directly, so its address_space_operations need direct_IO. Exit ntfs_direct_IO() if it is a compressed file. Fixes: b432163ebd15 ("fs/ntfs3: Update inode->i_mapping->a_ops on compression state") Reported-by: syzbot+e36cc3297bd3afd25e19@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e36cc3297bd3afd25e19 Signed-off-by: Lizhi Xu Signed-off-by: Konstantin Komarov commit af5cab0e5b6f8edb0be51a9f47f3f620e0b4fd70 Author: Andrey Vatoropin Date: Tue Mar 18 13:42:18 2025 +0000 fs/ntfs3: handle hdr_first_de() return value The hdr_first_de() function returns a pointer to a struct NTFS_DE. This pointer may be NULL. To handle the NULL error effectively, it is important to implement an error handler. This will help manage potential errors consistently. Additionally, error handling for the return value already exists at other points where this function is called. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Andrey Vatoropin Signed-off-by: Konstantin Komarov commit 4665a0da497b1bd42569e5bc6da4cd9ce82f9c25 Author: Andrey Vatoropin Date: Mon Mar 3 09:13:56 2025 +0000 fs/ntfs3: Drop redundant NULL check Static analysis shows that pointer "mi" cannot be NULL, since it is pre-initialized above. A potential failure when mi equals NULL is processed. Remove the extra NULL check. It is meaningless and harms the readability of the code, since before that the pointer is unconditionally dereferenced. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Vatoropin Signed-off-by: Konstantin Komarov commit 2af5615a5ba1aac2a356aa4cd9fc02e78c037092 Author: Jouni Högander Date: Wed Apr 23 13:27:04 2025 +0300 drm/i915/psr: Move PSR workaround to intel_psr.c Logical place for PSR workaround needing vblank delay is in intel_psr_min_vblank_delay. Move it there. Signed-off-by: Jouni Högander Reviewed-by: Arun R Murthy Link: https://lore.kernel.org/r/20250423102704.1368310-2-jouni.hogander@intel.com commit 2930db123f510651752b50db2d30d60fc965a472 Author: Jouni Högander Date: Wed Apr 23 13:27:03 2025 +0300 drm/i915/display: Ensure enough lines between delayed VBlank and VBlank To deterministically capture the transition of the state machine going from SRDOFFACK to IDLE, the delayed V. Blank should be at least one line after the non-delayed V. Blank. Ensure this by adding new interface into intel_psr to query number of lines needed for vblank delay and call it from intel_crtc_vblank_delay. v3: use existing intel_crtc_vblank_delay mechanism v2: apply limits only when needed (VRR TG vs. Legacy TG) Bspec: 69897 Signed-off-by: Jouni Högander Reviewed-by: Arun R Murthy Link: https://lore.kernel.org/r/20250423102704.1368310-1-jouni.hogander@intel.com commit 923ea4d4482be9475c31f1bc3691d7d74368348c Merge: b590c928cca7bd 20b70e58961b85 Author: Christian Brauner Date: Fri Apr 25 10:35:27 2025 +0200 Merge patch series "net, pidfs: enable handing out pidfds for reaped sk->sk_peer_pid" Christian Brauner says: SO_PEERPIDFD currently doesn't support handing out pidfds if the sk->sk_peer_pid thread-group leader has already been reaped. In this case it currently returns EINVAL. Userspace still wants to get a pidfd for a reaped process to have a stable handle it can pass on. This is especially useful now that it is possible to retrieve exit information through a pidfd via the PIDFD_GET_INFO ioctl()'s PIDFD_INFO_EXIT flag. Another summary has been provided by David in [1]: > A pidfd can outlive the task it refers to, and thus user-space must > already be prepared that the task underlying a pidfd is gone at the time > they get their hands on the pidfd. For instance, resolving the pidfd to > a PID via the fdinfo must be prepared to read `-1`. > > Despite user-space knowing that a pidfd might be stale, several kernel > APIs currently add another layer that checks for this. In particular, > SO_PEERPIDFD returns `EINVAL` if the peer-task was already reaped, > but returns a stale pidfd if the task is reaped immediately after the > respective alive-check. > > This has the unfortunate effect that user-space now has two ways to > check for the exact same scenario: A syscall might return > EINVAL/ESRCH/... *or* the pidfd might be stale, even though there is no > particular reason to distinguish both cases. This also propagates > through user-space APIs, which pass on pidfds. They must be prepared to > pass on `-1` *or* the pidfd, because there is no guaranteed way to get a > stale pidfd from the kernel. > Userspace must already deal with a pidfd referring to a reaped task as > the task may exit and get reaped at any time will there are still many > pidfds referring to it. In order to allow handing out reaped pidfd SO_PEERPIDFD needs to ensure that PIDFD_INFO_EXIT information is available whenever a pidfd for a reaped task is created by PIDFD_INFO_EXIT. The uapi promises that reaped pidfds are only handed out if it is guaranteed that the caller sees the exit information: TEST_F(pidfd_info, success_reaped) { struct pidfd_info info = { .mask = PIDFD_INFO_CGROUPID | PIDFD_INFO_EXIT, }; /* * Process has already been reaped and PIDFD_INFO_EXIT been set. * Verify that we can retrieve the exit status of the process. */ ASSERT_EQ(ioctl(self->child_pidfd4, PIDFD_GET_INFO, &info), 0); ASSERT_FALSE(!!(info.mask & PIDFD_INFO_CREDS)); ASSERT_TRUE(!!(info.mask & PIDFD_INFO_EXIT)); ASSERT_TRUE(WIFEXITED(info.exit_code)); ASSERT_EQ(WEXITSTATUS(info.exit_code), 0); } To hand out pidfds for reaped processes we thus allocate a pidfs entry for the relevant sk->sk_peer_pid at the time the sk->sk_peer_pid is stashed and drop it when the socket is destroyed. This guarantees that exit information will always be recorded for the sk->sk_peer_pid task and we can hand out pidfds for reaped processes. * patches from https://lore.kernel.org/20250425-work-pidfs-net-v2-0-450a19461e75@kernel.org: net, pidfs: enable handing out pidfds for reaped sk->sk_peer_pid pidfs: get rid of __pidfd_prepare() net, pidfs: prepare for handing out pidfds for reaped sk->sk_peer_pid pidfs: register pid in pidfs Link: https://lore.kernel.org/20250425-work-pidfs-net-v2-0-450a19461e75@kernel.org Signed-off-by: Christian Brauner commit 20b70e58961b855e61f2c6a7a19a38a64ad1bed6 Author: Christian Brauner Date: Fri Apr 25 10:11:33 2025 +0200 net, pidfs: enable handing out pidfds for reaped sk->sk_peer_pid Now that all preconditions are met, allow handing out pidfs for reaped sk->sk_peer_pids. Thanks to Alexander Mikhalitsyn for pointing out that we need to limit this to AF_UNIX sockets for now. Link: https://lore.kernel.org/20250425-work-pidfs-net-v2-4-450a19461e75@kernel.org Reviewed-by: David Rheinsberg Reviewed-by: Kuniyuki Iwashima Signed-off-by: Christian Brauner commit 759cfedc5ee7e5a34fd53a4412a4645204bf7f8d Author: Pavel Reichl Date: Thu Apr 24 00:00:01 2025 +0200 omfs: convert to new mount API Convert the OMFS filesystem to the new mount API. Signed-off-by: Pavel Reichl Link: https://lore.kernel.org/20250423220001.1535071-1-preichl@redhat.com Reviewed-by: Eric Sandeen Signed-off-by: Christian Brauner commit 91b7163b1ff37d24ba3a9d98f3b53f3fecfc69a5 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:52 2025 +0200 mtd: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal commit 78693ff68c8c8aa8b8553351e8548386cccdd0c6 Author: Frank Li Date: Fri Apr 11 16:08:58 2025 -0400 dt-bindings: mtd: convert vf610-nfc to yaml format Convert binding doc vf610-nfc to yaml format. Additional changes: - ref to nand-controller.yaml. - include arm-gic.h and vf610-clock.h in examples. - add clocks and clock-names description. - remove #address-cells, #size-cells assigned-clocks and assigned-clock-rates. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: Miquel Raynal commit b8ed9475384fd78e7650b7c4a403c1958a765a74 Author: Nicolas Frattaroli Date: Thu Apr 24 20:52:22 2025 +0200 dt-bindings: ata: rockchip-dwc-ahci: add RK3576 compatible The Rockchip RK3576 has two SATA controllers. They work the same as the RK3568 SATA controllers, having the same number of clocks and ports. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20250424-rk3576-sata-v1-1-23ee89c939fe@collabora.com Signed-off-by: Niklas Cassel commit 615dca38c2eae55aff80050275931c87a812b48c Merge: 3baea29dc0a7b5 b4432656b36e5c Author: Greg Kroah-Hartman Date: Mon Apr 28 10:32:58 2025 +0200 Merge 6.15-rc4 into usb-next We need the USB fixes in here as well, and this resolves the following merge conflicts that were reported in linux-next: drivers/usb/chipidea/ci_hdrc_imx.c drivers/usb/host/xhci.h Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit b15d97139ff14beb7c300f261e11d22d5a996941 Author: Miquel Raynal Date: Thu Apr 3 11:19:11 2025 +0200 mtd: spinand: Use more specific naming for the reset op SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the reset macro name. Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 43c475504a39e98f10f5e6ec4d9d9ed60672a753 Author: Quentin Perret Date: Wed Apr 16 15:26:47 2025 +0000 KVM: arm64: Unconditionally cross check hyp state Now that the hypervisor's state is stored in the hyp_vmemmap, we no longer need an expensive page-table walk to read it. This means we can now afford to cross check the hyp-state during all memory ownership transitions where the hyp is involved unconditionally, hence avoiding problems such as [1]. [1] https://lore.kernel.org/kvmarm/20241128154406.602875-1-qperret@google.com/ Reviewed-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-8-qperret@google.com Signed-off-by: Marc Zyngier commit 48d848882395a6a42ff1bb685082c79791d4e753 Author: Quentin Perret Date: Wed Apr 16 15:26:46 2025 +0000 KVM: arm64: Defer EL2 stage-1 mapping on share We currently blindly map into EL2 stage-1 *any* page passed to the __pkvm_host_share_hyp() HVC. This is less than ideal from a security perspective as it makes exploitation of potential hypervisor gadgets easier than it should be. But interestingly, pKVM should never need to access SHARED_BORROWED pages that it hasn't previously pinned, so there is no need to map the page before that. Reviewed-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-7-qperret@google.com Signed-off-by: Marc Zyngier commit 3390b3cbb613bc0822854f5754437cd1d1b3d5d0 Author: Quentin Perret Date: Wed Apr 16 15:26:45 2025 +0000 KVM: arm64: Move hyp state to hyp_vmemmap Tracking the hypervisor's ownership state into struct hyp_page has several benefits, including allowing far more efficient lookups (no page-table walk needed) and de-corelating the state from the presence of a mapping. This will later allow to map pages into EL2 stage-1 less proactively which is generally a good thing for security. And in the future this will help with tracking the state of pages mapped into the hypervisor's private range without requiring an alias into the 'linear map' range. Reviewed-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-6-qperret@google.com Signed-off-by: Marc Zyngier commit ba5b2e5b9dff5ba14940e1525f6e3a595f012466 Author: Quentin Perret Date: Wed Apr 16 15:26:44 2025 +0000 KVM: arm64: Introduce {get,set}_host_state() helpers Instead of directly accessing the host_state member in struct hyp_page, introduce static inline accessors to do it. The future hyp_state member will follow the same pattern as it will need some logic in the accessors. Reviewed-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-5-qperret@google.com Signed-off-by: Marc Zyngier commit cd4b039165a5e709d0d599e207709d73141a8bed Author: Quentin Perret Date: Wed Apr 16 15:26:43 2025 +0000 KVM: arm64: Use 0b11 for encoding PKVM_NOPAGE The page ownership state encoded as 0b11 is currently considered reserved for future use, and PKVM_NOPAGE uses bit 2. In order to simplify the relocation of the hyp ownership state into the vmemmap in later patches, let's use the 'reserved' encoding for the PKVM_NOPAGE state. The struct hyp_page layout isn't guaranteed stable at all, so there is no real reason to have 'reserved' encodings. No functional changes intended. Reviewed-by: Marc Zyngier Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-4-qperret@google.com Signed-off-by: Marc Zyngier commit ba637018ca67224fa21dc2212cb4457b357a5455 Author: Quentin Perret Date: Wed Apr 16 15:26:42 2025 +0000 KVM: arm64: Fix pKVM page-tracking comments Most of the comments relating to pKVM page-tracking in nvhe/memory.h are now either slightly outdated or outright wrong. Fix the comments. Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-3-qperret@google.com Signed-off-by: Marc Zyngier commit 5db1bef933427aa467ad89c7b695a84a6b4afe16 Author: Fuad Tabba Date: Wed Apr 16 15:26:41 2025 +0000 KVM: arm64: Track SVE state in the hypervisor vcpu structure When dealing with a guest with SVE enabled, make sure the host SVE state is pinned at EL2 S1, and that the hypervisor vCPU state is correctly initialised (and then unpinned on teardown). Co-authored-by: Marc Zyngier Signed-off-by: Fuad Tabba Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416152648.2982950-2-qperret@google.com Signed-off-by: Marc Zyngier commit 0e4965c80ef0f862bff0e2bb6870c8ee118c318e Merge: 785151f50ddaca e383bb8f958444 Author: Greg Kroah-Hartman Date: Mon Apr 28 10:18:29 2025 +0200 Merge tag 'gpiod-devm-is-action-added-for-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/brgl/linux into driver-core-next Immutable tag for the driver core tree to pull from devres: Move devm_*_action*() APIs to devres.h devres: Add devm_is_action_added() helper * tag 'gpiod-devm-is-action-added-for-v6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/brgl/linux: devres: Add devm_is_action_added() helper devres: Move devm_*_action*() APIs to devres.h commit 8ff377ae3100791aeb9ae801c0fea7e9558dee8c Author: Animesh Manna Date: Fri Apr 25 18:51:07 2025 +0530 drm/i915/alpm: Check for alpm support before accessing alpm register Currently, only EDP supports alpm. So, check for alpm support and prevent the DP connector from accessing the alpm register if doing so is unsupported. Fixes: acff6d6bded3 ("drm/i915/lobf: Add mutex for alpm update") Signed-off-by: Animesh Manna Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250425132107.2926759-1-animesh.manna@intel.com commit 689835c00ec7b78f3c828e796895661c13584a64 Merge: c2d2c5c0d631f7 b4432656b36e5c Author: Greg Kroah-Hartman Date: Mon Apr 28 10:13:28 2025 +0200 Merge 6.15-rc4 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d2d10ede04b1671dc4762479a2d06f183aaafbba Author: Keguang Zhang Date: Thu Mar 20 18:31:38 2025 +0800 mtd: rawnand: Add Loongson-1 NAND Controller Driver Add NAND controller driver for Loongson-1 SoCs. Signed-off-by: Keguang Zhang Signed-off-by: Miquel Raynal commit eff4e04c892774b1cf7ce43afbb186ff0be870c0 Author: Keguang Zhang Date: Thu Mar 20 18:31:37 2025 +0800 dt-bindings: mtd: Add Loongson-1 NAND Controller Add devicetree binding document for Loongson-1 NAND controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keguang Zhang Signed-off-by: Miquel Raynal commit 3be746ebc1e6e32f499a65afe405df9030153a63 Author: Danilo Krummrich Date: Fri Apr 11 01:55:27 2025 +0200 MAINTAINERS: add DRM Rust source files to DRM DRIVERS Add the DRM Rust source files to the DRM DRIVERS maintainers entry. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-9-dakr@kernel.org Signed-off-by: Danilo Krummrich commit c284d3e423382be3591d5b1e402e330e6c3f726c Author: Asahi Lina Date: Fri Apr 11 01:55:26 2025 +0200 rust: drm: gem: Add GEM object abstraction DRM GEM is the DRM memory management subsystem used by most modern drivers; add a Rust abstraction for DRM GEM. This includes the BaseObject trait, which contains operations shared by all GEM object classes. Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-8-dakr@kernel.org [ Rework of GEM object abstractions * switch to the Opaque type * fix (mutable) references to struct drm_gem_object (which in this context is UB) * drop all custom reference types in favor of AlwaysRefCounted * bunch of minor changes and simplifications (e.g. IntoGEMObject trait) * write and fix safety and invariant comments * remove necessity for and convert 'as' casts * original source archive: https://archive.is/dD5SL - Danilo ] [ Fix missing CONFIG_DRM guards in rust/helpers/drm.c. - Danilo ] Signed-off-by: Danilo Krummrich commit 785151f50ddacac06c7a3c5f3d31642794507fdf Merge: 142ba31d8b4aff b4432656b36e5c Author: Greg Kroah-Hartman Date: Mon Apr 28 09:51:34 2025 +0200 Merge 6.15-rc4 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 4f822ad5ee944ffafc21937a32dd055f1df5c28d Merge: 77feb17c950e03 b4432656b36e5c Author: Greg Kroah-Hartman Date: Mon Apr 28 09:45:00 2025 +0200 Merge 6.15-rc4 into char-misc-next We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d1d52c6622a61a0ae8dd2bd2097b25c0f553d2f3 Author: Andy Shevchenko Date: Thu Feb 20 18:20:28 2025 +0200 gpiolib: devres: Finish the conversion to use devm_add_action() With a recently added helper we can complete the conversion of the GPIOLIB code to use devm_add_action() in all suitable cases. So do this. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250220162238.2738038-4-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 063a2b45d6520deabd5ef6d9f081a3aef5cc5faf Merge: 417b0f8d08f878 e383bb8f958444 Author: Bartosz Golaszewski Date: Mon Apr 28 09:40:53 2025 +0200 Merge tag 'gpiod-devm-is-action-added-for-v6.16-rc1' into gpio/for-next Immutable tag for the driver core tree to pull from devres: Move devm_*_action*() APIs to devres.h devres: Add devm_is_action_added() helper commit e383bb8f958444620d96386811aacf6a49757996 Author: Andy Shevchenko Date: Thu Feb 20 18:20:27 2025 +0200 devres: Add devm_is_action_added() helper In some code we would like to know if the action in device managed resources was added by devm_add_action() family of calls. Introduce a helper for that. Reviewed-by: Raag Jadav Signed-off-by: Andy Shevchenko Reviewed-by: Zijun Hu Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250220162238.2738038-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit f5e5631df596ade5875ba1dc5d640611745d0c0d Author: Andy Shevchenko Date: Thu Feb 20 18:20:26 2025 +0200 devres: Move devm_*_action*() APIs to devres.h We have a newly created header linux/device/devres.h that gathers device managed APIs, so users won't need to include entire device.h for only these ones. Move devm_*_action*() APIs to devres.h as well. Reviewed-by: Raag Jadav Signed-off-by: Andy Shevchenko Reviewed-by: Zijun Hu Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250220162238.2738038-2-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 77a6407c6ab240527166fb19ee96e95f5be4d3cd Author: Mingcong Bai Date: Tue Apr 22 14:17:54 2025 +0800 wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723 RTL8723BE found on some ASUSTek laptops, such as F441U and X555UQ with subsystem ID 11ad:1723 are known to output large amounts of PCIe AER errors during and after boot up, causing heavy lags and at times lock-ups: pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5 pcieport 0000:00:1c.5: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID) pcieport 0000:00:1c.5: device [8086:9d15] error status/mask=00000001/00002000 pcieport 0000:00:1c.5: [ 0] RxErr Disable ASPM on this combo as a quirk. This patch is a revision of a previous patch (linked below) which attempted to disable ASPM for RTL8723BE on all Intel Skylake and Kaby Lake PCIe bridges. I take a more conservative approach as all known reports point to ASUSTek laptops of these two generations with this particular wireless card. Please note, however, before the rtl8723be finishes probing, the AER errors remained. After the module finishes probing, all AER errors would indeed be eliminated, along with heavy lags, poor network throughput, and/or occasional lock-ups. Cc: Fixes: a619d1abe20c ("rtlwifi: rtl8723be: Add new driver") Reported-by: Liangliang Zou Link: https://bugzilla.kernel.org/show_bug.cgi?id=218127 Link: https://lore.kernel.org/lkml/05390e0b-27fd-4190-971e-e70a498c8221@lwfinger.net/T/ Tested-by: Liangliang Zou Signed-off-by: Mingcong Bai Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422061755.356535-1-jeffbai@aosc.io commit 6644a416727c0a92c72d02eacad7f653d7291e9a Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:20 2025 +0800 wifi: rtw89: mcc: avoid that loose pattern sets negative timing for auxiliary GO A MCC (multi-channel concurrency) schedule is like the following. |< mcc interval >| |< duration ref >|< duration aux >| |< tob ref >|< toa ref >|< tob aux >|< toa aux >| V V tbtt ref tbtt aux |< beacon offset >| Original logic might unexpectedly calculate toa (time offset ahead) of auxiliary role to be negative even when there is no role timing limit. If toa-aux is negative, TBTT-aux would in logic fall into duration-ref. Then, if auxiliary role is GO unfortunately, it cannot guarantee that beacons will TX well. So now, when deciding the lower bound of toa-ref, take toa-aux into account. Make toa-aux at least be zero in normal cases. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-13-pkshih@realtek.com commit 1cc8a27bf621877bf829ade6543b8b73c93b726a Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:19 2025 +0800 wifi: rtw89: mcc: refine filling function of start TSF Since tob (time offset behind) could be negative, change the type of tob in microsecond to s32. And, refine accumulation with while-loop by calculation with roundup_u64(). Besides, as long as one of the MCC roles is GO, use the short MCC start time. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-12-pkshih@realtek.com commit ab67677712c0386781671e31390f44567da59d53 Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:18 2025 +0800 wifi: rtw89: mcc: support courtesy mechanism on both roles at the same time MCC has a courtesy mechanism which allows one role to use another's duration in a given cycle. Originally, this courtesy mechanism only supports in one direction. However, in some field cases, both of MCC roles may simultaneously have timing configurations that are not good enough. So, support courtesy mechanism in both directions. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-11-pkshih@realtek.com commit 584a423e75272dc4a9055356b265d9779cf41ae1 Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:17 2025 +0800 wifi: rtw89: mcc: update entire plan when courtesy config changes MCC has a courtesy mechanism which allows one role to use another's duration in a given cycle. Courtesy mechanism will be enabled when one role has a not perfect duration. Otherwise, not. When MCC updates, duration of each role will be re-calculated. And then, the new courtesy config might be different from the old one. However, to change courtesy config, the entire MCC plan requires to be renewed when MCC updates. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-10-pkshih@realtek.com commit b8a2f9e0fab913751fbba1d452850d5cbdc633cf Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:16 2025 +0800 wifi: rtw89: mcc: handle the case where NoA start time has passed MCC will limit the time a role can use in a schedule according to the periodic NoA. Original logic didn't consider the case where NoA start time has passed. It might lead to inaccurate result. So, tweak it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-9-pkshih@realtek.com commit 50f9dc17a18180497f97d9d85541bf038bb1b0e3 Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:15 2025 +0800 wifi: rtw89: mcc: make GO+STA mode calculate dynamic beacon offset There are two roles during MCC and the offset between their TBTT is called beacon offset. Originally, when MCC runs GO+STA mode, it used fixed beacon offset to simplify some logic because GO role can master its TSF. However, if MCC is stopped and restarted before a same GO is down, its TSF might be discontinuous. Then, there might be undefined behavior happens in GC sides. So, to let a same GO have a continuous TSF, MCC no longer changes its TSF to meet a fixed beacon offset. Instead, GO+STA mode also calculates beacon offset dynamically as what GC+STA mode did. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-8-pkshih@realtek.com commit 13bd2b36f22fdb36da7d11710328d799610301ef Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:14 2025 +0800 wifi: rtw89: don't re-randomize TSF of AP/GO When APs or GOs are up, their TSF start point are randomized to avoid collisions. However, the TSF of an existing AP/GO would be randomized multiple times. It caused the TSF is discontinuous to the corresponding STA/GC sides. So, once TSF has been randomized, don't re-randomize it unless SER (system error recovery) happens unfortunately. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-7-pkshih@realtek.com commit 98019abbf97d591eb3f0f2f146e602c131efe0df Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:13 2025 +0800 wifi: rtw89: mcc: make GO announce one-time NoA for HW scan process Since FW cannot handle HW scan process and MCC (multi-channel concurrency) mode simultaneously, if a HW scan is requested during MCC, MCC mode will be paused temporarily. Then, the GO role if any might be absent. So, calculate an estimated time for the requested HW scan process and search for existing GO roles to fill one-time NoA. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-6-pkshih@realtek.com commit 57a5fbe39a18e591b33d181bed21518fb9f21d46 Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:12 2025 +0800 wifi: rtw89: refactor flow that hw scan handles channel list FW has a limited amount of channels that can be dealt with by one HW scan H2C command. Based on the limit, channels in scan request might be parsed into SW structure piece by piece along with multiple HW scan H2C commands. But, in order to estimate things of entire HW scan process, it's required to have the whole parsed channel list when HW scan is going to start. So, tweak HW scan flow to prepare the whole channel list ahead. Still, each HW scan H2C command takes allowed amount of channels from the list according to the limit. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-5-pkshih@realtek.com commit 27982c908240fe2ce4fdbbbe7a2bf59adf9174b2 Author: Zong-Zhe Yang Date: Tue Apr 22 09:46:11 2025 +0800 wifi: rtw89: add suffix "_ax" to Wi-Fi 6 HW scan struct and func These stuffs have no suffix, but not universal, and only work for Wi-Fi 6. Since the corresponding HW scan struct/func of Wi-Fi 7 have suffix "_be", to avoid misunderstanding and improve readability, also add suffix "_ax" to these Wi-Fi 6 stuffs. (No logic is changed.) Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-4-pkshih@realtek.com commit df6da0b81e2f114c831a82868f53c7ffbfcf5448 Author: Kuan-Chung Chen Date: Tue Apr 22 09:46:10 2025 +0800 wifi: rtw89: acpi: introduce country specific TAS enabling A new ACPI table entry format for TAS is defined, which includes a "specific country" field. In this field, determine which country can enable TAS. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-3-pkshih@realtek.com commit 74f754da761b1ea744f94643eb2010b6f7189895 Author: Kuan-Chung Chen Date: Tue Apr 22 09:46:09 2025 +0800 wifi: rtw89: 8922a: increase beacon loss to 6 seconds Intermittent beacon loss from specific AP triggers disconnection and reconnection. Increasing the beacon loss count will make the connection more stable. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250422014620.18421-2-pkshih@realtek.com commit b6aa4fb7ca0a858c4427a870bcdcd9eef8278c2a Author: Peter Robinson Date: Sun Apr 20 10:48:05 2025 +0100 arm64: dts: allwinner: a64: Add WiFi/BT header on SOPINE Baseboard This adds all the pin mappings on the WiFi/BT header on the SOPINE Baseboard/A64-LTS. They're disabled by default as the modules don't ship by default. This includes, where they haven't been already, UART1 for BT and mmc1 for WiFi. Signed-off-by: Peter Robinson Link: https://patch.msgid.link/20250420094823.954073-3-pbrobinson@gmail.com Signed-off-by: Chen-Yu Tsai commit dd39864aabea2f7896a65def86057e13fcc4801f Author: Peter Robinson Date: Sun Apr 20 10:48:04 2025 +0100 arm64: dts: allwinner: a64: Add WiFi/BT header on PINE A64 This adds all the pin mappings on the WiFi/BT header on the original Pine64. They're disabled by default as the modules don't ship by default. This includes, where they haven't been already, UART1 for BT and mmc1 for WiFi. Signed-off-by: Peter Robinson Link: https://patch.msgid.link/20250420094823.954073-2-pbrobinson@gmail.com Signed-off-by: Chen-Yu Tsai commit a1c3985cc7231185aa38734cc7996f94ff7febca Author: Chukun Pan Date: Wed Apr 16 18:00:06 2025 +0800 arm64: dts: allwinner: correct the model name for Radxa Cubie A5E According to https://radxa.com/products/cubie/a5e, the name of this board should be "Radxa Cubie A5E". This is also consistent with the dt-bindings. Fixes: 80e0fb4e491b ("arm64: dts: allwinner: a523: add Radxa A5E support") Signed-off-by: Chukun Pan Reviewed-by: Andre Przywara Link: https://patch.msgid.link/20250416100006.82920-1-amadeus@jmu.edu.cn Signed-off-by: Chen-Yu Tsai commit efcb1a41592ab6b1e2e957c137674bdd4ff64eb5 Author: Krzysztof Kozlowski Date: Thu Apr 24 10:47:37 2025 +0200 ARM: dts: allwinner: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: sun8i-h3-nanopi-neo-air.dtb: bcrmf@1: $nodename:0: 'bcrmf@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250424084737.105215-2-krzysztof.kozlowski@linaro.org Signed-off-by: Chen-Yu Tsai commit 5209e0e62e54b1f33c9e456350cbd54d4536aa5d Author: Krzysztof Kozlowski Date: Thu Apr 24 10:47:36 2025 +0200 arm64: dts: allwinner: Align wifi node name with bindings Since commit 3c3606793f7e ("dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema"), bindings expect 'wifi' as node name: sun50i-h6-orangepi-3.dtb: sdio-wifi@1: $nodename:0: 'sdio-wifi@1' does not match '^wifi(@.*)?$' Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250424084737.105215-1-krzysztof.kozlowski@linaro.org Signed-off-by: Chen-Yu Tsai commit 224e986158e9cbca4a3344cc12e298bd3c9f45c8 Author: Andre Przywara Date: Wed Apr 16 23:48:39 2025 +0100 arm64: dts: allwinner: h616: enable Mali GPU for all boards All Allwinner H616/H618 SoCs contain a Mali G31 MP2 GPU. Enable the DT nodes for that GPU, and specify the regulator providing power to the VDD_GPU pins of the package. The rest of the DT node is set by the SoC, so is not board specific. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250416224839.9840-5-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 87c6b4504c4083ef96f21c34ea6e21f338e7a1b7 Author: Andre Przywara Date: Wed Apr 16 23:48:38 2025 +0100 arm64: dts: allwinner: h616: Add Mali GPU node The Allwinner H616 SoC contains a Mali-G31 MP2 GPU, which is of the Mali Bifrost family. There is a power domain specifically for that GPU, which needs to be enabled to make use of the it. Add the DT nodes for those two devices, and link them together through the "power-domains" property. Any board wishing to use the GPU would need to enable the GPU node and specify the "mali-supply" regulator. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://patch.msgid.link/20250416224839.9840-4-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit b2163b513e97b44c06f8f400c394615f8879355d Author: Chris Morgan Date: Sat Feb 15 11:02:26 2025 +1300 arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Add support for headphone insertion detection via GPIO for the RG35XX series, and add the corresponding routing to the codec node. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin Tested-by: Philippe Simons -- Changelog v1..v2: - Remove vendor prefix from GPIO description. - Whitespace fix Changelog v2..v3: - Add Tested-by tag Link: https://patch.msgid.link/20250214220247.10810-5-ryan@testtoast.com Signed-off-by: Chen-Yu Tsai commit 4e743ca6eef8611c2271c5cd3d0cb1e733e30e14 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:22 2025 -0500 arm64: dts: allwinner: h5/h6: Drop spurious 'clock-latency-ns' properties 'clock-latency-ns' is not a valid property for CPU nodes. It belongs in OPP table (which has it). Drop them from the CPU nodes. Signed-off-by: Rob Herring (Arm) Reviewed-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250410-dt-cpu-schema-v2-1-63d7dc9ddd0a@kernel.org Signed-off-by: Chen-Yu Tsai commit 71776a6eb34d96ed5996434021b9c5df7b8d27ac Author: Rob Herring (Arm) Date: Wed Apr 9 15:36:12 2025 -0500 arm/arm64: dts: allwinner: Use preferred node names for cooling maps The preferred node name for cooling map nodes is a 'map' prefix. Use 'map0' like most other platforms. Signed-off-by: Rob Herring (Arm) Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250409203613.1506047-1-robh@kernel.org Signed-off-by: Chen-Yu Tsai commit f4a6b0f7200f8629f4138f1094ce654ab75df41e Author: Andre Przywara Date: Fri Mar 7 00:57:12 2025 +0000 arm64: dts: allwinner: h616: add YuzukiHD Chameleon support The Chameleon board is an OpenHardware devboard made by YuzukiTsuru. The form factor resembles the Raspberry Pi Model A boards, though it differs significantly in its features: - Allwinner H618 SoC (4 * Arm Cortex-A53 cores, 1MB L2 cache, 1.4 GHz) - between 512MiB and 2GiB DDR3 DRAM - up to 128 GiB eMMC flash - AXP313a PMIC - 100 Mbit/s Ethernet pins on a header - XR829 WIFI+Bluetooth chip - 4 * USB 2.0 USB-C ports - microSD card slot - 3.5mm A/V port Add the devicetree describing the board's peripherals and their connections. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250307005712.16828-16-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 8b9b2f0547627476517a602ebdfee040c0b6698e Author: Andre Przywara Date: Fri Mar 7 00:57:11 2025 +0000 dt-bindings: arm: sunxi: Add YuzukiHD Chameleon board name The Chameleon is an Open Source hardware board designed by YuzkuiHD, using the Allwinner H618 SoC: https://github.com/YuzukiHD/YuzukiChameleon Add its compatible name to the list of valid board name. Signed-off-by: Andre Przywara Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250307005712.16828-15-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit c2520cd032ae8ca3fdaf77b3f3aa687c8cb7843f Author: Andre Przywara Date: Fri Mar 7 00:57:10 2025 +0000 arm64: dts: allwinner: a523: add Radxa A5E support The Radxa A5E is a development board using the Allwinner A527 SoC, which is using the same die as the A523 SoC, just exposing the pins of more peripherals (like HDMI or the 2nd MAC). The board features: - Allwinner A527/T527 SoC: 8 ARM Cortex-A55 cores, Mali-G57 MC1 GPU - 1GiB/2GiB/4GiB LPDDR4 DRAM - AXP717 + AXP323 PMICs - Raspberry-Pi-2 compatible 40pin GPIO header - 1 USB 2.0 type C port (OTG), also power supply - 1 USB 3.0 type A host port (multiplexed with M.2 slot) - 1 M.2 M-key 2230 slot, with 1 PCIe2.1 lane connected (multiplexed with USB 3.0 port) - MicroSD slot - optional eMMC, 8, 16 or 32GB available - optional on-board 16MiB bootable SPI NOR flash - two 1Gbps Ethernet ports (via MAXIO MAE0621A PHYs) - PoE header for optional supply circuit on one Ethernet port - WiFi 802.11 a/b/g/n/ac/ax (LB-Link BL-M8800DS2 module using AIC8800) - HDMI port - camera and LCD connectors - power supply via USB-C connector (but no PD) or GPIO header pins This .dts describes the devices as far as we support them at the moment. The PMIC rails have been assigned as per the schematics. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250307005712.16828-14-andre.przywara@arm.com [wens@csie.org: Squash in SD card detect pull resistor fix] Link: https://patch.msgid.link/20250425003422.3465-1-andre.przywara@arm.com [wens@csie.org: Rename dts file to sun55i-a527-cubie-a5e.dts] Signed-off-by: Chen-Yu Tsai commit 84a11c519234bfa3f6971f30d1a7c84077a4d681 Author: Matthew Brost Date: Sun Apr 27 19:23:18 2025 -0700 drm/xe: Drop force_alloc from xe_bo_evict in selftests The force_alloc flag was removed from TTM / Xe but updating the selftests to new function interfaces was missed. Remove argument from xe_bo_evict in selftests. v2: - Fix dma-buf, migrate selftests (CI) Fixes: 55df7c0c62c1 ("drm/ttm/xe: drop unused force_alloc flag") Signed-off-by: Matthew Brost Reviewed-by: Clint Taylor Link: https://lore.kernel.org/r/20250428022318.877860-1-matthew.brost@intel.com commit 883730c192b5cf9d72cabefd83bfb3dcd1aadb6f Author: Christophe JAILLET Date: Fri Apr 4 19:27:38 2025 +0200 power: supply: wm831x: Constify struct chg_map and some arrays 'struct chg_map' is not modified in this driver. Constifying these structures moves some data to a read-only section, so increase overall security. While at it, also constify a few other arrays. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 14263 1744 0 16007 3e87 drivers/power/supply/wm831x_power.o After: ===== text data bss dec hex filename 14695 1288 0 15983 3e6f drivers/power/supply/wm831x_power.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0edde57b691db7f920d121fdbd5ebc3fb24f30f1.1743787625.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit afe5301bfbaa0692811da3ba5f8769f599f7ff3f Author: Aaron Kling Date: Mon Apr 21 23:27:34 2025 -0500 power: bq24190: Add BQ24193 support The BQ24193 is most similar to the BQ24192. This is used in many Nvidia Tegra devices such as the SHIELD Portable. This variant works as-is with the existing BQ24192 code, but cannot be probed with a simple fallback compatible to ti,bq24192. So add it same as how BQ24196 is handled. Signed-off-by: Aaron Kling Link: https://lore.kernel.org/r/20250421-bq24193-v1-2-f125ef396d24@gmail.com Signed-off-by: Sebastian Reichel commit 6133b98d39e8bdb7c4d9211e9f00e9580a7d2d11 Author: Aaron Kling Date: Mon Apr 21 23:27:33 2025 -0500 dt-bindings: power: supply: bq24190: Add BQ24193 compatible The BQ24193 is most similar to the BQ24192. This is used in many Nvidia Tegra devices such as the SHIELD Portable. Signed-off-by: Aaron Kling Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250421-bq24193-v1-1-f125ef396d24@gmail.com Signed-off-by: Sebastian Reichel commit 77f5bb150132bbbcd6bc37ffdc80c9e140e373a4 Author: Kees Cook Date: Wed Apr 16 15:27:41 2025 -0700 power: supply: sysfs: Remove duplicate NUL termination GCC 15's new -Wunterminated-string-initialization notices that one of the sysfs attr strings would lack the implicit trailing NUL byte during initialization: drivers/power/supply/power_supply_sysfs.c:183:57: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (32 chars into 31 available) [-Wunterminated-string-initialization] 183 | POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD), | ^ drivers/power/supply/power_supply_sysfs.c:36:23: note: in definition of macro '_POWER_SUPPLY_ATTR' 36 | .attr_name = #_name "\0", \ | ^~~~~ drivers/power/supply/power_supply_sysfs.c:183:9: note: in expansion of macro 'POWER_SUPPLY_ATTR' 183 | POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD), | ^~~~~~~~~~~~~~~~~ However, the macro used was explicitly adding a trailing NUL byte (which is not needed). Remove this to avoid the GCC warning. No binary differences are seen after this change (there was always run for a NUL byte, it's just that the _second_ NUL byte was getting truncated). Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250416222740.work.569-kees@kernel.org Signed-off-by: Sebastian Reichel commit 4e55fb7d60e128fb5a57921cbd59f9ff29cd4297 Author: Ryan Wanner Date: Mon Apr 14 14:41:20 2025 -0700 dt-bindings: reset: atmel,at91sam9260-reset: add microchip,sama7d65-rstc Add SAMA7D65 RSTC compatible to DT bindings documentation. The sama7d65-rstc is compatible with the sama7g5-rstc. Signed-off-by: Ryan Wanner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/b2bf907cebc2e251f6d8bebade864372e3dbc1eb.1744666011.git.Ryan.Wanner@microchip.com Signed-off-by: Sebastian Reichel commit f16d9fb6cf03fdbdefa41a8b32ba1e57afb7ae3d Author: Jerry Lv Date: Tue Apr 15 11:40:47 2025 +0800 power: supply: bq27xxx: Retrieve again when busy Multiple applications may access the battery gauge at the same time, so the gauge may be busy and EBUSY will be returned. The driver will set a flag to record the EBUSY state, and this flag will be kept until the next periodic update. When this flag is set, bq27xxx_battery_get_property() will just return ENODEV until the flag is updated. Even if the gauge was busy during the last accessing attempt, returning ENODEV is not ideal, and can cause confusion in the applications layer. Instead, retry accessing the I2C to update the flag is as expected, for the gauge typically recovers from busy state within a few milliseconds. If still failed to access the gauge, the real error code would be returned instead of ENODEV (as suggested by Pali Rohár). Reviewed-by: Pali Rohár Signed-off-by: Jerry Lv Link: https://lore.kernel.org/r/20250415-foo-fix-v2-1-5b45a395e4cc@axis.com Signed-off-by: Sebastian Reichel commit 1e3e2cf2df60521eee257b2c77a8f0d8594242ff Author: Krzysztof Kozlowski Date: Tue Mar 18 09:14:28 2025 +0100 dt-bindings: power: supply: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |'. Correct mixtures of the style or any other indentations to use preferred 4-spaces. No functional changes here, but saves some comments during reviews of new patches built on the existing code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250318081428.33979-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel commit ca3d2ea52314286dda597f03b07ed759c5798fba Author: André Draszik Date: Fri Mar 7 07:50:18 2025 +0000 power: reset: reboot-mode: better compatibility with DT (replace ' ,/') This driver's purpose is to parse boot modes described in DT, via key (node name) / value pairs, and to match them to a reboot mode requested by the kernel. Unfortunately, DT node names can not contain certain characters, like space ' ' or comma ',' or slash '/', while the requested reboot mode may. This is a problem because it makes it impossible to match reboot modes containing any of those characters. For example, this makes it impossible to communicate DM verity errors to the boot loader - DM verity errors trigger a reboot with mode "dm-verity device corrupted" in drivers/md/dm-verity-target.c and devices typically have to take action in that case [1]. Changing this string itself is not feasible, see e.g. discussion in [2], but would also just cover this one case. Another example is Android, which may use comma in the reboot mode string, e.g. as "shutdown,thermal" in [3]. The kernel also shouldn't prescribe what characters are allowed inside the boot mode string for a user to set. It hasn't done this so far, and introducing such a restriction would be an interface break and arbitrarily enforce a random new policy. Therefore, update this driver to do another round of string matching, after replacing the common characters mentioned above with dash '-', if a match hasn't been found without doing said replacement. This now allows us to have DT entries of e.g.: mode-dm-verity-device-corrupted = <...> and so on. Link: https://cs.android.com/android/kernel/superproject/+/android14-gs-pixel-6.1:private/google-modules/power/reset/exynos-gs101-reboot.c;l=144 [1] Link: https://lore.kernel.org/all/CAAFS_9FuSb7PZwQ2itUh_H7ZdhvAEiiX7fhxJ4kmmv9JCaHmkA@mail.gmail.com/ [2] Link: https://cs.android.com/android/platform/superproject/main/+/main:system/core/init/reboot_utils.cpp;drc=79ad1e2e9bf1628c141c8cd2fbb4f3df61a6ba75;l=122 [3] Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250307-reboot-mode-chars-v1-1-d83ff95da524@linaro.org Signed-off-by: Sebastian Reichel commit 62d48983f215bf1dd48665913318101fa3414dcf Author: Alexander Shiyan Date: Fri Mar 7 08:38:09 2025 +0300 power: reset: at91-reset: Optimize at91_reset() This patch adds a small optimization to the low-level at91_reset() function, which includes: - Removes the extra branch, since the following store operations already have proper condition checks. - Removes the definition of the clobber register r4, since it is no longer used in the code. Fixes: fcd0532fac2a ("power: reset: at91-reset: make at91sam9g45_restart() generic") Signed-off-by: Alexander Shiyan Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250307053809.20245-1-eagle.alexander923@gmail.com Signed-off-by: Sebastian Reichel commit 2a4067c89e4137c477ca6f367e65ace0f2132922 Author: Shin Son Date: Wed Apr 23 13:41:53 2025 +0900 arm64: dts: exynosautov920: add cpucl0 clock DT nodes Add cmu_cpucl0 clocks for switch, cluster, and dbg domains respectively. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250423044153.1288077-4-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit 59636ec89c2cafb54d33be4e288f953b0876adef Author: Shin Son Date: Wed Apr 23 13:41:52 2025 +0900 clk: samsung: exynosautov920: add cpucl0 clock support Register compatible and cmu_info data to support clock CPUCL0(CPU Cluster 0), this provides clock for CPUCL0_SWTICH/DBG/CLUSTER. These clocks are required early during boot for the CPUs, so they are declared using CLK_OF_DECLARE instead of being registered through a platform driver. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250423044153.1288077-3-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit ab525e7336b1c7e80915f0fe5fefe4e46141333f Merge: 62120d819f5b58 e2642509e3d60d Author: Krzysztof Kozlowski Date: Sun Apr 27 21:21:53 2025 +0200 Merge branch 'for-v6.16/dt-bindings-clk-samsung' into next/clk commit e2642509e3d60dc90b74d27b47e36cea71a96186 Author: Shin Son Date: Wed Apr 23 13:41:51 2025 +0900 dt-bindings: clock: exynosautov920: add cpucl0 clock definitions Add cpucl0 clock definitions. CPUCL0 refers to CPU Cluster 0, which provide clock support for the CPUs on Exynosauto V920 SoC. Signed-off-by: Shin Son Link: https://lore.kernel.org/r/20250423044153.1288077-2-shin.son@samsung.com Signed-off-by: Krzysztof Kozlowski commit a22e0051f9eb2281b181218d97f77cebc299310d Author: Jose Maria Casanova Crespo Date: Fri Apr 25 14:25:08 2025 +0200 drm/v3d: client ranges from axi_ids are different with V3D 7.1 The client mask has been reduced from 8 bits on V3D 4.1 to 7 bits on V3D 7.1, so the ranges for each client are not compatible. On V3D 7.1, the CSD client can also report MMU errors. Therefore, add its AXI ID to the IDs list. Fixes: 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x") Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250425122522.18425-2-jmcasanova@igalia.com Signed-off-by: Maíra Canal commit d0e4c6537005dd106b101d4434a0c3dafd936d05 Author: Jose Maria Casanova Crespo Date: Fri Apr 25 14:25:07 2025 +0200 drm/v3d: fix client obtained from axi_ids on V3D 4.1 In the case of MMU errors caused by the TFU unit, the client that causes the MMU error is expected to be reported. But in the case of MMU TFU errors, a non existing client was being reported. This happened because the client calculation was taking into account more than the bits 0-7 from the axi_id that were representing the client. [ 27.845132] v3d fec00000.v3d: MMU error from client ? (13) at 0x3bb1000, pte invalid Masking the bits and using the correct axi_id ranges fixes the calculation to report the real guilty client on V3D 4.1 and 4.2. Make the MMU error print axi_id with hexadecimal as used in the ranges. Fixes: 38c2c7917adc ("drm/v3d: Fix and extend MMU error handling.") Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250425122522.18425-1-jmcasanova@igalia.com Signed-off-by: Maíra Canal commit 286ed198b899739862456f451eda884558526a9d Author: Diederik de Haas Date: Thu Apr 17 16:21:18 2025 +0200 PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit() The documentation for the phy_power_off() function explicitly says that it must be called before phy_exit(). Hence, follow the same rule in rockchip_pcie_phy_deinit(). Fixes: 0e898eb8df4e ("PCI: rockchip-dwc: Add Rockchip RK356X host controller driver") Signed-off-by: Diederik de Haas [mani: commit message change] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Dragan Simic Acked-by: Shawn Lin Cc: stable@vger.kernel.org # v5.15+ Link: https://patch.msgid.link/20250417142138.1377451-1-didi.debian@cknow.org commit 5e2664f9e108f66046869ed4990043421919465f Author: Chen Ni Date: Mon Apr 14 15:42:41 2025 +0800 PCI: ls-gen4: Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250414074241.3954081-1-nichen@iscas.ac.cn commit 5e5a3bf48eed8d90bc5c5b710466f24663231f0a Author: Hans Zhang <18255117159@163.com> Date: Sun Apr 27 20:53:16 2025 +0800 PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding Some of the callers of rockchip_pcie_link_up() are open coding the rockchip_pcie_link_up() function, leading to code duplication. So switch them to use rockchip_pcie_link_up() function. Also, use the FIELD_GET() macro to simplify the link up check in rockchip_pcie_link_up(). Signed-off-by: Hans Zhang <18255117159@163.com> [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250427125316.99627-4-18255117159@163.com commit ae8ed2b091ee8bd92da365d3332eebf159de8e0f Author: Hans Zhang <18255117159@163.com> Date: Sun Apr 27 20:53:15 2025 +0800 PCI: dw-rockchip: Reorganize register and bitfield definitions Register definitions were scattered with ambiguous names (e.g., PCIE_RDLH_LINK_UP_CHGED in PCIE_CLIENT_INTR_STATUS_MISC) and lacked hierarchical grouping. Group registers and their associated bitfields logically. This improves maintainability and aligns the code with hardware documentation. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250427125316.99627-3-18255117159@163.com commit c2f61b8479b2abcd9e20f8bd4c46e54bb7f5286f Author: Hans Zhang <18255117159@163.com> Date: Sun Apr 27 20:53:14 2025 +0800 PCI: dw-rockchip: Remove unused PCIE_CLIENT_GENERAL_DEBUG definition The PCIE_CLIENT_GENERAL_DEBUG register offset is defined but never used in the driver. It's presence adds noise to the register map. Remove this unused definition to keep the register list minimal and aligned with actual hardware usage. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250427125316.99627-2-18255117159@163.com commit 3db60cf9b7da4ae35646c00d9241c44d2dd6caf8 Author: Kees Cook Date: Fri Apr 25 23:12:48 2025 -0700 IB/hfi1: Adjust fd->entry_to_rb allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct tid_rb_node **", but the return type will be "struct rb_node **". These are the same allocation size (pointer size), but the types do not match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250426061247.work.261-kees@kernel.org Signed-off-by: Leon Romanovsky commit 7c04bc97171780e15798433d9e83a241d9956014 Author: Kees Cook Date: Fri Apr 25 23:12:09 2025 -0700 IB/mthca: Adjust buddy->bits allocation type In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "unsigned long **", but the returned type will be "long **". These are the same allocation size (pointer size), but the types do not match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250426061208.work.000-kees@kernel.org Signed-off-by: Leon Romanovsky commit e4d66131caaf18d7c3c69914513f4be0519ddaaf Author: Richard Zhu Date: Wed Apr 16 16:13:14 2025 +0800 PCI: imx6: Save and restore the LUT setting during suspend/resume for i.MX95 SoC The look up table (LUT) setting would be lost during the PCIe suspend on i.MX95 SoC. So to ensure proper functionality after resume, save it during suspend and restore it while resuming. Fixes: 9d6b1bd6b3c8 ("PCI: imx6: Add i.MX8MQ, i.MX8Q and i.MX95 PM support") Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416081314.3929794-8-hongxing.zhu@nxp.com commit 047e8b6b3bc3e6b25bfa12896a39d9fb82b591be Author: Richard Zhu Date: Wed Apr 16 16:13:13 2025 +0800 PCI: imx6: Add PLL lock check for i.MX95 SoC PLL lock is required to ensure that the PLL clock is stable before enabling the controller in i.MX95 SoC. Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416081314.3929794-7-hongxing.zhu@nxp.com commit 744a1c20ce933dcaca0f161fe7da115902a2f343 Author: Richard Zhu Date: Wed Apr 16 16:13:12 2025 +0800 PCI: imx6: Add workaround for errata ERR051586 ERR051586: Compliance with 8GT/s Receiver Impedance ECN. The default value of GEN3_RELATED_OFF[GEN3_ZRXDC_NONCOMPL] is 1 which makes receiver non-compliant with the ZRX-DC parameter for 2.5 GT/s when operating at 8 GT/s or higher. It causes unnecessary timeout in L1. So the workaround is to set GEN3_RELATED_OFF[GEN3_ZRXDC_NONCOMPL] to 0. Add this workaround in the dw_pcie_host_ops::post_init() callback for i.MX95 platforms. Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416081314.3929794-6-hongxing.zhu@nxp.com commit ce0c43e855c7f652b6351110aaaabf9b521debd7 Author: Richard Zhu Date: Wed Apr 16 16:13:11 2025 +0800 PCI: imx6: Add workaround for errata ERR051624 ERR051624: The Controller Without Vaux Cannot Exit L23 Ready Through Beacon or PERST# De-assertion When the auxiliary power is not available, the controller cannot exit from L23 Ready with beacon or PERST# de-assertion when main power is not removed. So the workaround is to set SS_RW_REG_1[SYS_AUX_PWR_DET] to 1. This workaround is required irrespective of whether Vaux is supplied to the link partner or not. Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416081314.3929794-5-hongxing.zhu@nxp.com commit 47f54a902dcd3b756e8e761f2c4c742af57dfff0 Author: Richard Zhu Date: Wed Apr 16 16:13:10 2025 +0800 PCI: imx6: Toggle the core reset for i.MX95 PCIe Add toggling core reset for i.MX95 to align with PHY's power-up sequence. Note that the register is named as IMX95_PCIE_COLD_RST in hardware, though it is used to reset the PCIe core. Signed-off-by: Richard Zhu Signed-off-by: Manivannan Sadhasivam [mani: subject and description rewording] Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20250416081314.3929794-4-hongxing.zhu@nxp.com commit 4a4be0c088e3029a482ef8ac98bb2acb94af960e Author: Richard Zhu Date: Wed Apr 16 16:13:09 2025 +0800 PCI: imx6: Call dw_pcie_wait_for_link() from start_link() callback only when required Since the DWC driver is already calling dw_pcie_wait_for_link() after calling the start_link() callback, remove the redundant dw_pcie_wait_for_link() call from imx_pcie_start_link(). It is still required to call this function for controllers supporting Gen 2 and higher link speeds. Suggested-by: Manivannan Sadhasivam Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20250416081314.3929794-3-hongxing.zhu@nxp.com commit 9c03e30e3ade32136fed5a4ab7872dcb205687d3 Author: Richard Zhu Date: Wed Apr 16 16:13:08 2025 +0800 PCI: imx6: Skip link up workaround for newer platforms The current link setup procedure has one workaround to detect the devices behind PCIe switches on some i.MX6 platforms. But this workaround is not needed on recent i.MX7 platforms. So skip the workaround for platforms that do not set the flag and start LTSSM directly. Also, change the flag name from IMX_PCIE_FLAG_IMX_SPEED_CHANGE to IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND to match the usecase. Signed-off-by: Richard Zhu [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu@nxp.com commit d4a5d7e6d91f6e53c8bf6ec72b7ee6c51f781695 Author: Shawn Lin Date: Mon Apr 14 09:28:29 2025 +0800 PCI: dw-rockchip: Move rockchip_pcie_ep_hide_broken_ats_cap_rk3588() to dw_pcie_ep_ops::init() In the case of PERST# deassert, non-sticky registers will get reset to their hardware default state and EXT_CAP registers are one among them. But since the broken ATS cap is hidden only in dw_pcie_ep_ops::pre_init() callback which is not gettting called during PERST# deassert, it results in the capability getting advertised again. So move it to dw_pcie_ep_ops::init() to fix it. Suggested-by: Niklas Cassel Signed-off-by: Shawn Lin [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Tested-by: Niklas Cassel Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/1744594109-209312-1-git-send-email-shawn.lin@rock-chips.com commit 198e69cc4150aba1e7af740a2111ace6a267779e Author: Shawn Lin Date: Thu Apr 17 08:35:10 2025 +0800 PCI: dw-rockchip: Enable ASPM L0s capability for both RC and EP modes L0s capability isn't enabled on all Rockchip SoCs by default, so enable it in order to make ASPM L0s work on Rockchip platforms. Testing the L0s for a long time revealed that the default N_FTS value of 210 in the hardware doesn't work stable and causes LTSSM to switch between L0s and Recovery states. This leads to long exit latency and also causes link down sometimes. So override the value to the max 255, which seems to work fine under both PHYs used on Rockchip platforms. Signed-off-by: Shawn Lin [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/1744850111-236269-2-git-send-email-shawn.lin@rock-chips.com commit 7d9b5d6115532cf90a789ed6afd3f4c70ebbd827 Author: Shawn Lin Date: Thu Apr 17 08:35:09 2025 +0800 PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up() rockchip_pcie_link_up() currently has two issues: 1. Value 0x11 of PCIE_L0S_ENTRY corresponds to L0 state, not L0S. So the naming is wrong from the very beginning. 2. Checking for value 0x11 treats other states like L0S and L1 as link down, which is wrong. Hence, remove the PCIE_L0S_ENTRY check and also its definition. This allows adding ASPM support in the successive commits. Fixes: 0e898eb8df4e ("PCI: rockchip-dwc: Add Rockchip RK356X host controller driver") Signed-off-by: Shawn Lin [mani: commit message rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Cc: stable@vger.kernel.org Link: https://patch.msgid.link/1744850111-236269-1-git-send-email-shawn.lin@rock-chips.com commit bdd9ea9187c4722d3256055de683a85341157a53 Author: Richard Fitzgerald Date: Thu Apr 24 19:12:14 2025 +0100 ALSA: hda/hda_cs_dsp_ctl: Delete hda_cs_dsp_ctl module Delete the hda_cs_dsp module and move the one array and one function that is used by the cs35l41_hda driver into that driver. The cs35l41 and cs35l56 drivers stopped creating ALSA controls to wrap firmware controls. The reasons are explained in: commit 312c04cee408 ("ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients") and commit 34e1b1bb7324 ("ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients") The cs35l56_hda driver now doesn't use hda_cs_dsp_ctl at all. The cs35l41_hda driver only uses the small array of firmware names and the function to read a control value. All other functions and data in hda_cs_dsp_ctl are unused. There is no need to keep a separate module for such a small amount of data and code that is only used by one driver, so remove the whole module. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250424181214.66759-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 3b3704261e851e25983860e4c352f1f73786f4ab Author: Thorsten Blum Date: Fri Apr 25 09:46:48 2025 +0200 MIPS: Replace strcpy() with strscpy() in vpe_elfload() strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum Signed-off-by: Thomas Bogendoerfer commit 9f6d908adabc11e5b407743696dbb333894b022e Author: Thorsten Blum Date: Tue Apr 22 09:42:55 2025 +0200 MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init() strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Signed-off-by: Thomas Bogendoerfer commit cd956a5cb48aaccfa63291b4efd289d2f1e5b025 Author: Thorsten Blum Date: Sat Apr 19 12:27:44 2025 +0200 mips: ptrace: Improve code formatting and indentation Use tabs instead of spaces in regs_query_register_offset() and syscall_trace_leave(), and properly indent multiple getters. Signed-off-by: Thorsten Blum Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 76c43eb507bc1162850fdae6cc44790d1c9a83ea Author: Gregory CLEMENT Date: Sun Apr 13 21:12:32 2025 +0200 MIPS: SMP: Implement parallel CPU bring up for EyeQ Added support for starting CPUs in parallel on EyeQ to speed up boot time. On EyeQ5, booting 8 CPUs is now ~90ms faster. On EyeQ6, booting 32 CPUs is now ~650ms faster. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit 0f4ae7c6ecb89bfda026d210dcf8216fb67d2333 Author: Khem Raj Date: Sat Mar 29 08:39:03 2025 -0700 mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS GCC 15 changed the default C standard dialect from gnu17 to gnu23, which should not have impacted the kernel because it explicitly requests the gnu11 standard in the main Makefile. However, mips/vdso code uses its own CFLAGS without a '-std=' value, which break with this dialect change because of the kernel's own definitions of bool, false, and true conflicting with the C23 reserved keywords. include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant 11 | false = 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef' 35 | typedef _Bool bool; | ^~~~ include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards Add -std as specified in KBUILD_CFLAGS to the decompressor and purgatory CFLAGS to eliminate these errors and make the C standard version of these areas match the rest of the kernel. Signed-off-by: Khem Raj Cc: stable@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 6d223b8ffcd1593d032b71875def2daa71c53111 Author: WangYuli Date: Wed Apr 16 11:45:48 2025 +0800 MIPS: Loongson64: Add missing '#interrupt-cells' for loongson64c_ls7a Similar to commit 98a9e2ac3755 ("MIPS: Loongson64: DTS: Fix msi node for ls7a"). Fix follow warnings: arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dts:28.31-36.4: Warning (interrupt_provider): /bus@10000000/msi-controller@2ff00000: Missing '#interrupt-cells' in interrupt provider arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider' Fixes: 24af105962c8 ("MIPS: Loongson64: DeviceTree for LS7A PCH") Tested-by: WangYuli Signed-off-by: WangYuli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 3b61b6a369d9d81ffaa8a87045782352d08a91aa Author: Chris Packham Date: Wed Apr 16 08:54:25 2025 +1200 mips: dts: realtek: Add MDIO controller Add a device tree node for the MDIO controller on the RTL9300 chips. Signed-off-by: Chris Packham Signed-off-by: Thomas Bogendoerfer commit 37022f745b58436e7d3c3c924c78d78a139b00e7 Author: Bartosz Golaszewski Date: Mon Apr 7 09:25:10 2025 +0200 MIPS: txx9: gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the drivers to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Thomas Bogendoerfer commit 68bdc4dc1130ec5a3d9fdc1b4d90cdc9e39a8792 Author: Bartosz Golaszewski Date: Mon Apr 7 09:25:09 2025 +0200 MIPS: alchemy: gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Thomas Bogendoerfer commit 64f3322bea9404d2dd1e8bcdc5fb025044e48d96 Author: Bartosz Golaszewski Date: Mon Apr 7 09:25:08 2025 +0200 MIPS: bcm63xx: gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Thomas Bogendoerfer commit 55ba5375ba1c45404a917aed4f772da9a82fe723 Author: Bartosz Golaszewski Date: Mon Apr 7 09:25:07 2025 +0200 MIPS: rb532: gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Thomas Bogendoerfer commit f06a610cb17468a3098be1e401c4b29623b99d0a Author: Krzysztof Kozlowski Date: Fri Apr 4 13:57:01 2025 +0200 clk: sunxi: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Restrict the default to ARCH also for individual drivers, even though their choice is not visible without selecting parent Kconfig symbol, because otherwise selecting parent would select the child during compile testing. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250404-kconfig-defaults-clk-v1-5-4d2df5603332@linaro.org Signed-off-by: Chen-Yu Tsai commit 115bd1f1ec2b6b7f925752a85dd43e9909757f9a Author: Krzysztof Kozlowski Date: Fri Apr 4 13:57:00 2025 +0200 clk: sunxi-ng: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Restrict the default to ARCH also for individual drivers, even though their choice is not visible without selecting parent Kconfig symbol, because otherwise selecting parent would select the child during compile testing. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250404-kconfig-defaults-clk-v1-4-4d2df5603332@linaro.org Signed-off-by: Chen-Yu Tsai commit 4ee87d875071390b4e24ce46dbdd792216d61651 Author: Andre Przywara Date: Fri Mar 7 00:57:09 2025 +0000 arm64: dts: allwinner: a523: add X96Q-Pro+ support The X96QPro+ is a TV box using the Allwinner H728 SoC. That SoC seems to be a package variant of the A523 family, at least it uses the same SoC ID and is compatible as far as we can assess. It comes with the following specs: - Allwinner H728 SoC: 8 Arm Cortex-A55 cores, Mali-G57 MC1 GPU - 2 or 4GiB DDR3L DRAM - 32, 64, or 128 GiB eMMC flash - AXP717 + AXP323 PMICs - Gigabit Ethernet (using MAXIO PHY) - HDMI port - 2 * USB 2.0 ports - 1 * USB 3.0 port - microSD card slot - TOSLINK digital audio output - 3.5mm A/V port - infrared sensor - 7-segment display - 5V barrel plug power supply - power button The PCB provides holes for soldering a UART header or cable, this is connected to the debug UART0. There is another set of UART pins available. The board also features a FEL button (accessible through the 3.5mm socket) and a reset button (only accessible when case is open). This .dts just describes the basic peripherals as far as we support them at the moment. The PMIC rail assignments are reverse engineered as far as possible, by dumping them from a running Android system, and correlating them to other boards using the same SoC. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250307005712.16828-13-andre.przywara@arm.com [wens@csie.org: Squash in SD card detect pull resistor fix] Link: https://patch.msgid.link/20250425003422.3465-1-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit dbe54efa32afe5b82763c015cbe9e64c4d4e117a Author: Andre Przywara Date: Fri Mar 7 00:57:08 2025 +0000 arm64: dts: allwinner: a523: add Avaota-A1 router support The Avaota A1 router board is an Open Source hardware board, designed by YuzukiHD. Pine64 produces some boards and sells them. It uses the Allwinner A527 or T527 SoC, and comes with the following features: - Eight ARM Cortex-A55 cores, Mali-G57 MC1 GPU - 1GiB/2GiB/4GiB LPDDR4 DRAM - AXP717 + AXP323 PMIC - Raspberry-Pi-2 compatible GPIO header - 1 USB 2.0 type A host port, 1 USB 3.0 type A host post - 1 USB 2.0 type C port (OTG + serial debug) - MicroSD slot - eMMC between 16 and 128 GiB - on-board 16MiB bootable SPI NOR flash - two 1Gbps Ethernet ports (via RTL8211F PHYs) - HDMI port - DP port - camera and LCD connectors - 3.5mm headphone jack - (yet) unsupported WiFi/BT chip - 1.3" LC display, connected via SPI - 12 V barrel plug for power supply Add the devicetree file describing the currently supported features. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://patch.msgid.link/20250307005712.16828-12-andre.przywara@arm.com [wens@csie.org: Squash in SD card detect pull resistor fix] Link: https://patch.msgid.link/20250425003422.3465-1-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 587f6ac1f5b6d37c1891229446a7065f981a1c3b Author: AngeloGioacchino Del Regno Date: Wed Apr 9 15:13:06 2025 +0200 drm/mediatek: mtk_dpi: Rename output fmts array for MT8195 DP_INTF For the sake of increasing human readability and avoid possible confusion between DPI and DP_INTF output formats (as the two are ever so slightly different), rename the mt8195_output_fmts array to mt8195_dp_intf_output_fmts. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20250409131306.108635-6-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 20fa6a8fc5882b12753267206878c8e3c44c01b9 Author: AngeloGioacchino Del Regno Date: Wed Apr 9 15:13:05 2025 +0200 drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88 Allow additional output formats in both DPI and DP_INTF blocks of the MT8195 and MT8188 SoCs (as the latter is fully compatible with, hence reuses, the former's platform data for both blocks) by adding: 1. New formats to the `mt8195_output_fmts` array for dp_intf, lacking YUV422 12-bits support, and adding RGB888 2X12_LE/BE (8-bits), BGR888 (8-bits) RGB101010 1x30 (10-bits), and YUV formats, including YUV422 8/10 bits, and YUV444 8/10 bits; and 2. A new `mt8195_dpi_output_fmts` array for DPI only, with all of for formats added to dp_intf and with the addition of the YUYV12_1X24 (YUV422 12-bits) output format. Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250409131306.108635-5-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 5d0253cde51de996283ccce207351181cf72a75d Author: AngeloGioacchino Del Regno Date: Wed Apr 9 15:13:04 2025 +0200 drm/mediatek: mtk_dpi: Add support for additional output formats Add support for configuring the Display Parallel Interface block to output YUV444 8/10 bits, YUV422 10/12 bits (8 bits support is already present), BGR 8-bits, and RGB 10-bits. The enablement of the various additional output formats in SoCs platform data will be done in a different change. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20250409131306.108635-4-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit c64cad81e635035c127301d881ac7ab9f5abc8b4 Author: AngeloGioacchino Del Regno Date: Wed Apr 9 15:13:03 2025 +0200 drm/mediatek: mtk_dpi: Add local helpers for bus format parameters In preparation for adding support for additional color formats, add local helpers to map media bus format parameters to this driver's bit_num, channel_swap and color_format. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20250409131306.108635-3-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 618dfbe01a297dce9834e2456307f05d6be59834 Author: AngeloGioacchino Del Regno Date: Wed Apr 9 15:13:02 2025 +0200 drm/mediatek: mtk_dpi: Use switch in mtk_dpi_config_color_format() In preparation for adding support for an additional color format, convert the format conditional in mtk_dpi_config_color_format() to a switch. This also makes the concept of RGB being the default color format a little more human readable. This commit brings no functional differences. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20250409131306.108635-2-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 709a25f7a433d53dc9f0daf7cf5657f0671c5026 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:31 2025 -0500 ARM: dts: rockchip: Drop redundant CPU "clock-latency" The "clock-latency" property is part of the deprecated opp-v1 binding and is redundant if the opp-v2 table has equal or larger values in any "clock-latency-ns". Add any missing "clock-latency-ns" properties and remove "clock-latency". Signed-off-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-10-63d7dc9ddd0a@kernel.org Signed-off-by: Heiko Stuebner commit 3cb09de48f652abd662b436b23f914d3eb66f1fd Author: Vasily Khoruzhick Date: Tue Mar 18 11:18:51 2025 -0700 clk: rockchip: rk3568: Add PLL rate for 33.3MHz Add PLL rate for 33.3 MHz to allow BTT HDMI5 screen to run at its native mode of 800x480 Signed-off-by: Vasily Khoruzhick Link: https://lore.kernel.org/r/20250318181930.1178256-1-anarsoul@gmail.com Signed-off-by: Heiko Stuebner commit 0d0947766d877b63729dbef502e75827bf4ebca9 Author: Heiko Stuebner Date: Wed Feb 26 15:09:41 2025 +0100 arm64: dts: rockchip: add dsi controller nodes on rk3588 The RK3588 comes with two DSI2 controllers based on a new Synopsis IP. Add the necessary nodes for them. Signed-off-by: Heiko Stuebner Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel # RK3588 EVB1 Link: https://lore.kernel.org/r/20250226140942.3825223-3-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 2e177b85541d1a5c28a4d64dabec8bdce0461a79 Author: Heiko Stuebner Date: Wed Feb 26 15:09:40 2025 +0100 arm64: dts: rockchip: add mipi dcphy nodes to rk3588 Add the two MIPI-DC-phy nodes to the RK3588, that will be used by the DSI2 controllers and hopefully in some future also for camera input. Signed-off-by: Heiko Stuebner Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel # RK3588 EVB1 Link: https://lore.kernel.org/r/20250226140942.3825223-2-heiko@sntech.de Signed-off-by: Heiko Stuebner commit a733e711278182840b4c9a0329294daa5cc34048 Author: Varadarajan Narayanan Date: Mon Mar 17 15:30:26 2025 +0530 dt-bindings: PCI: qcom: Add MHI registers for IPQ9574 The MHI registers are present in IPQ5332, IPQ6018, IPQ8074 and IPQ9574 SoCs. Hence, add the MHI registers to the binding to allow these registers to be defined in devicetree. Signed-off-by: Varadarajan Narayanan [mani: commit message rewording] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250317100029.881286-2-quic_varada@quicinc.com commit 822ecdacee0bb62dde7abbd20da51963b4c2b47d Merge: c27c31302601b6 c61caec22820f2 Author: Mark Brown Date: Sat Apr 26 13:28:57 2025 +0100 ASoC: add Renesas MSIOF sound driver Merge series from Kuninori Morimoto : Renesas MSIOF can work as both SPI and I2S. Current Linux supports MSIOF-SPI. This patch-set adds new MSIOF-I2S. Because it is using same HW-IP, we want to share same compatible for both MSIOF-SPI/I2S case. MSIOF-I2S (Sound) will use Audio-Graph-Card/Card2 which uses Of-Graph, but MSIOF-SPI is not use Of-Graph. So, this patch-set assumes it was used as MSIOF-I2S if DT is using Of-Graph, otherwise, it is MSIOF-SPI (This assumption will works if SPI *never* use Of-Graph in the future). One note so far is that it is using "spi@xxx" node name for both MSIOF-SPI/I2S. DTC will automatically checks "spi@xxx" node as SPI device which requests #address-cells/#size-cells. But is not needed for I2S. So we will get warning about it on Sparrow Hawk which uses MSIOF-I2S. We have no solution about it, so far. Link: https://lore.kernel.org/r/87zfgi1a5a.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87h62vh5mj.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/875xjeb0wu.wl-kuninori.morimoto.gx@renesas.com commit 432f98cf56cf1e0f812f79a713847b37ae86cf31 Author: Herbert Xu Date: Fri Apr 25 18:58:13 2025 +0800 crypto: arm64/sha1 - Set finalize for short finup Always set sctx->finalize before calling finup as it may not have been set previously on a short final. Reported-by: Corentin LABBE Fixes: b97d31100e36 ("crypto: arm64/sha1 - Use API partial block handling") Signed-off-by: Herbert Xu Tested-by: Corentin LABBE Signed-off-by: Herbert Xu commit 08094a8057864fde3703ed5fc7798786f69f2559 Author: Herbert Xu Date: Fri Apr 25 11:33:39 2025 +0800 crypto: arm/blake2b - Set FINAL_NONZERO Set FINAL_NONZERO as blake2b expects to have at least one byte for finalisation. Reported-by: Corentin LABBE Fixes: cc28260ab4fb ("crypto: arm/blake2b - Use API partial block handling") Signed-off-by: Herbert Xu Tested-by: Corentin LABBE Signed-off-by: Herbert Xu commit 7094702a9e6d1256f1444ceff7be97414db51dbb Author: Mario Limonciello Date: Tue Apr 22 18:48:29 2025 -0500 platform/x86/amd/pmc: Use FCH_PM_BASE definition The s2idle MMIO quirk uses a scratch register in the FCH. Adjust the code to clarify that. Signed-off-by: Mario Limonciello Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Hans de Goede Cc: Ilpo Järvinen Cc: Shyam Sundar S K Cc: Yazen Ghannam Cc: platform-driver-x86@vger.kernel.org Link: https://lore.kernel.org/r/20250422234830.2840784-5-superm1@kernel.org commit 624b0d5696a89b138408d385899dd35372db324b Author: Mario Limonciello Date: Tue Apr 22 18:48:28 2025 -0500 i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to SB800_PIIX4_FCH_PM_ADDR is used to indicate the base address for the FCH PM registers. Multiple drivers may need this base address, so move related defines to a common header location and rename them accordingly. Signed-off-by: Mario Limonciello Signed-off-by: Ingo Molnar Acked-by: Andi Shyti Cc: Andy Shevchenko Cc: H. Peter Anvin Cc: Hans de Goede Cc: Ilpo Järvinen Cc: Jean Delvare Cc: Jonathan Corbet Cc: Sanket Goswami Cc: Shyam Sundar S K Cc: Yazen Ghannam Cc: linux-i2c@vger.kernel.org Link: https://lore.kernel.org/r/20250422234830.2840784-4-superm1@kernel.org commit 7e173eb82ae97175fd1ae8390259227f1a76a41f Author: Mario Limonciello Date: Tue Apr 22 18:48:27 2025 -0500 i2c: piix4: Make CONFIG_I2C_PIIX4 dependent on CONFIG_X86 PIIX4 and compatible controllers are only for X86. As some headers are being moved into x86 specific headers PIIX4 won't compile on non-x86. Suggested-by: Ingo Molnar Signed-off-by: Mario Limonciello Signed-off-by: Ingo Molnar Acked-by: Andi Shyti Cc: Andy Shevchenko Cc: H. Peter Anvin Cc: Sanket Goswami Cc: Shyam Sundar S K Cc: Yazen Ghannam Cc: linux-i2c@vger.kernel.org Link: https://lore.kernel.org/r/20250422234830.2840784-3-superm1@kernel.org commit c2d2c5c0d631f7de9697870e4eec89289177d445 Author: Nicolas Pitre Date: Thu Apr 17 14:45:16 2025 -0400 vt: move UCS tables to the "shipped" form Use the "shipped" mechanism to copy pre-generated tables to the build tree by default. If GENERATE_UCS_TABLES=1 then they are generated at build time instead. If GENERATE_UCS_TABLES=2 then gen_ucs_recompose_table.py is invoked with --full. Signed-off-by: Nicolas Pitre Suggested-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-15-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit d8f81c82b13fcbf93fae688cee1995260cfa59de Author: Nicolas Pitre Date: Thu Apr 17 14:45:15 2025 -0400 vt: refresh ucs_width_table.h and adjust code in ucs.c accordingly Width tables are now split into BMP (16-bit) and non-BMP (above 16-bit). This reduces the corresponding text size by 20-25%. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-14-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit ad934777f0f15c8cea042b6a81deaa7fe53b6dea Author: Nicolas Pitre Date: Thu Apr 17 14:45:14 2025 -0400 vt: update gen_ucs_width_table.py to make tables more space efficient Split table ranges into BMP (16-bit) and non-BMP (above 16-bit). This reduces the corresponding text size by 20-25%. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-13-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit ffae2340a6af9beb580f107ad28afde7b57dea5b Author: Nicolas Pitre Date: Thu Apr 17 14:45:13 2025 -0400 vt: remove zero-width-space handling from conv_uni_to_pc() This is now taken care of by ucs_is_zero_width(). Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-12-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 5617aeb14a4381e4ee61778c91ed90a615275f39 Author: Nicolas Pitre Date: Thu Apr 17 14:45:12 2025 -0400 vt: pad double-width code points with a zero-width space In the Unicode screen buffer, we follow double-width code points with a space to maintain proper column alignment. This, however, creates semantic problems when e.g. using cut and paste. Let's use a better code point for the column padding's purpose i.e. a zero-width space rather than a full space. This way the combination retains a width of 2. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-11-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit b5c574995d842d241d810f3a6a3ebb03c52d57fa Author: Nicolas Pitre Date: Thu Apr 17 14:45:11 2025 -0400 vt: support Unicode recomposition Try replacing any decomposed Unicode sequence by the corresponding recomposed code point. Code point to glyph correspondance works best after recomposition, and this apply mostly to single-width code points therefore we can't preserve them in their decomposed form anyway. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-10-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 9bd73840935746dccef20dbcb509317c8e718f08 Author: Nicolas Pitre Date: Thu Apr 17 14:45:10 2025 -0400 vt: create ucs_recompose_table.h with gen_ucs_recompose_table.py Table of base character + combining mark pairs with their precomposed equivalents. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-9-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 03c6de017b2a9eaa1062566c6e70cf0ed72e24d9 Author: Nicolas Pitre Date: Thu Apr 17 14:45:09 2025 -0400 vt: introduce gen_ucs_recompose_table.py to create ucs_recompose_table.h The generated table maps base character + combining mark pairs to their precomposed equivalents using Python's unicodedata module. The default script behavior is to create a table with most commonly used Latin, Greek, and Cyrillic recomposition pairs only. It is much smaller than the table with all possible recomposition pairs (71 entries vs 1000 entries). But if one needs/wants the full table then simply running the script with the --full argument will generate it. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-8-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 54cda9201c673fd1c5de189d961670999232e49d Author: Nicolas Pitre Date: Thu Apr 17 14:45:08 2025 -0400 vt: use new tables in ucs.c This removes the table from ucs.c and substitutes the generated tables from ucs_width_table.h providing comprehensive ranges for double-width and zero-width Unicode code points. Also implements ucs_is_zero_width() to query the new zero-width table. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-7-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 05ea6d71aa7a4f42c773c96dcd1519ac0dcdec86 Author: Nicolas Pitre Date: Thu Apr 17 14:45:07 2025 -0400 vt: create ucs_width_table.h with gen_ucs_width_table.py Provide comprehensive ranges for double-width and zero-width Unicode code points. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-6-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit b11a041179e70abac27e0e4a6a3cb1f8781b9750 Author: Nicolas Pitre Date: Thu Apr 17 14:45:06 2025 -0400 vt: introduce gen_ucs_width_table.py to create ucs_width_table.h The table in ucs.c is terribly out of date and incomplete. We also need a second table to store zero-width code points. Properly maintaining those tables manually is impossible. So here's a script to generate them. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-5-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 95b05de0a56699392e67590d000df76fedec609a Author: Nicolas Pitre Date: Thu Apr 17 14:45:05 2025 -0400 vt: properly support zero-width Unicode code points Zero-width Unicode code points are causing misalignment in vertically aligned content, disrupting the visual layout. Let's handle zero-width code points more intelligently. Double-width code points are stored in the screen grid followed by a white space code point to create the expected screen layout. When a double-width code point is followed by a zero-width code point in the console incoming bytestream (e.g., an emoji with a presentation selector) then we may replace the white space padding by that zero-width code point instead of dropping it. This maximize screen content information while preserving proper layout. If a zero-width code point is preceded by a single-width code point then the above trick is not possible and such zero-width code point must be dropped. VS16 (Variation Selector 16, U+FE0F) is special as it typically doubles the width of the preceding single-width code point. We handle that case by giving VS16 a width of 1 instead of 0 when that happens. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-4-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 07bc3f442f47b4d158468c2e0146475bdf009091 Author: Nicolas Pitre Date: Thu Apr 17 14:45:04 2025 -0400 vt: move unicode processing to a separate file This will make it easier to maintain. Also make it depend on CONFIG_CONSOLE_TRANSLATIONS. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit d066989a3d41bc75c537b86bcdb2911fc5ffdb07 Author: Nicolas Pitre Date: Thu Apr 17 14:45:03 2025 -0400 vt: minor cleanup to vc_translate_unicode() Make it clearer when a sequence is bad. Signed-off-by: Nicolas Pitre Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250417184849.475581-2-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 3702f72748b2cf91f5b7aefa4038e226f1a5fc81 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:26 2025 +0200 Revert "vt: minor cleanup to vc_translate_unicode()" This reverts commit 74045f6658f11241a09d93404d79828cc99e94dc. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit e42e607aefc4132d508a0e5724b5d0975d0a53e8 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:25 2025 +0200 Revert "vt: move unicode processing to a separate file" This reverts commit 2acaf27cd7f4f32bfe8bf7335690618e2417e744. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit d3e92076c1af713e65edac109499c25c37f38c16 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:24 2025 +0200 Revert "vt: properly support zero-width Unicode code points" This reverts commit e88391f730e46d208b7fb37b02611d24137af1ef. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit b1614dd1aef4bb5a37cf422fc6d7403d68a397c1 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:23 2025 +0200 Revert "vt: introduce gen_ucs_width.py to create ucs_width.c" This reverts commit 26c94eb4842ada96f9709b43ef225417a6b4df63. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 67a4bb27461b0e3b39b27db688b5981b6eb62175 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:21 2025 +0200 Revert "vt: update ucs_width.c using gen_ucs_width.py" This reverts commit 3a1ab63aa05b4736a7d30ae0a769385662f13def. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 06df3bcefa1ef8d0b36164880163f9e2d9349246 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:20 2025 +0200 Revert "vt: introduce gen_ucs_recompose.py to create ucs_recompose.c" This reverts commit f2347b0cdf65e614732c2307863c95304f72d9d9. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 6cccf837ac8d72e13c651f60d93545f9fb4e84ed Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:19 2025 +0200 Revert "vt: create ucs_recompose.c using gen_ucs_recompose.py" This reverts commit 54af55b990eda5a6a0140a3cded8094b42c0c3b7. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 3cf3987b572f71ee609d73601ccfe785dd4ffd50 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:18 2025 +0200 Revert "vt: support Unicode recomposition" This reverts commit cd6937d42bca46f2143544918e535d6fd22b71b7. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 7a149499f6b6b7789a45752c7bbf1669b69cdd0b Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:16 2025 +0200 Revert "vt: update gen_ucs_width.py to produce more space efficient tables" This reverts commit 119ff0b0f4541972d829da606599441dace2444d. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit a01caec7c60c4875c10c4363a05ce60506cb2daa Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:15 2025 +0200 Revert "vt: update ucs_width.c following latest gen_ucs_width.py" This reverts commit c7cb5b0779d782c1bda10414af7a9fcadcc87e93. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 7eaf91626e1c02e46382ed154e389bb08074865b Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:14 2025 +0200 Revert "vt: pad double-width code points with a zero-white-space" This reverts commit 547f57b88d5f2ad4e9ab5e0d63a668467c10c736. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit ab67c4622c3618edc35e623b53a0fd1a0a1ef062 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:21:12 2025 +0200 Revert "vt: remove zero-white-space handling from conv_uni_to_pc()" This reverts commit b35f7a773cbcbfea3bc87a33c7d0f39e34ed83ec. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit cb0ce93c8ba6882c591e7776a258cfd483af5717 Author: Greg Kroah-Hartman Date: Sat Apr 26 11:20:25 2025 +0200 Revert "vt: fix comment vs definition mismatch" This reverts commit 8bfabff0bfff8fbbe90673d1a557d15c42b4494a. A new version of the series was submitted, so it's easier to revert the old one and add the new one due to the changes invovled. Cc: Nicolas Pitre Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 3e03579821ee6046dc4e31d916079e6a0ff1d081 Author: Kuan-Chung Chen Date: Wed Apr 16 16:12:41 2025 +0800 wifi: rtw89: set pre-calculated antenna matrices for HE trigger frame Pre-calculated antenna matrices can improve 160MHz uplink OFDMA performance, but they are only needed for the HE trigger frame. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250416081241.36138-5-pkshih@realtek.com commit f64801d6f15e9b0905967580574ff9ddd5cde4dc Author: Zong-Zhe Yang Date: Wed Apr 16 16:12:40 2025 +0800 wifi: rtw89: regd: indicate if regd_UK TX power settings follow regd_ETSI Before adopting regd_UK TX power settings, some certifications are needed and might be platform-level. Without that, should adopt regd_ETSI TX power settings. But for now, there is no way to inform driver of it yet. So, add a flag first. But for now, comprehensively use regd_ETSI TX power settings to restrict regd_UK. Plan to define an ACPI DSM function to inform driver whether to use regd_UK own TX power settings or not afterwards. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250416081241.36138-4-pkshih@realtek.com commit 20aac091a15dc7229ef1a268253fe36bb6b2be39 Author: Kuan-Chung Chen Date: Wed Apr 16 16:12:39 2025 +0800 wifi: rtw89: 8922a: fix TX fail with wrong VCO setting An incorrect Voltage Controlled Oscillator (VCO) setting may cause Synthesizer (SYN) unlock, which may lead to a failure in the TX authentication request. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250416081241.36138-3-pkshih@realtek.com commit 603f4c71cc5d7fdb0d61d921286e95a6b78102fa Author: Ping-Ke Shih Date: Wed Apr 16 16:12:38 2025 +0800 wifi: rtw89: 8852c: update supported firmware format to 2 After firmware 0.27.125.0, it adds more fields to support firmware secure boot. Though current driver has supported the format, old driver can't recognize the new format, increase firmware format to 2 to avoid failed to load the firmware by old driver. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250416081241.36138-2-pkshih@realtek.com commit a71f402acd71a942e59c16270ad61dee06de6e24 Author: Christian Brauner Date: Fri Apr 25 10:11:32 2025 +0200 pidfs: get rid of __pidfd_prepare() Fold it into pidfd_prepare() and rename PIDFD_CLONE to PIDFD_STALE to indicate that the passed pid might not have task linkage and no explicit check for that should be performed. Link: https://lore.kernel.org/20250425-work-pidfs-net-v2-3-450a19461e75@kernel.org Reviewed-by: Oleg Nesterov Reviewed-by: David Rheinsberg Signed-off-by: Christian Brauner commit fd0a109a0f6b7524543d17520da92a44a9f5343c Author: Christian Brauner Date: Fri Apr 25 10:11:31 2025 +0200 net, pidfs: prepare for handing out pidfds for reaped sk->sk_peer_pid SO_PEERPIDFD currently doesn't support handing out pidfds if the sk->sk_peer_pid thread-group leader has already been reaped. In this case it currently returns EINVAL. Userspace still wants to get a pidfd for a reaped process to have a stable handle it can pass on. This is especially useful now that it is possible to retrieve exit information through a pidfd via the PIDFD_GET_INFO ioctl()'s PIDFD_INFO_EXIT flag. Another summary has been provided by David in [1]: > A pidfd can outlive the task it refers to, and thus user-space must > already be prepared that the task underlying a pidfd is gone at the time > they get their hands on the pidfd. For instance, resolving the pidfd to > a PID via the fdinfo must be prepared to read `-1`. > > Despite user-space knowing that a pidfd might be stale, several kernel > APIs currently add another layer that checks for this. In particular, > SO_PEERPIDFD returns `EINVAL` if the peer-task was already reaped, > but returns a stale pidfd if the task is reaped immediately after the > respective alive-check. > > This has the unfortunate effect that user-space now has two ways to > check for the exact same scenario: A syscall might return > EINVAL/ESRCH/... *or* the pidfd might be stale, even though there is no > particular reason to distinguish both cases. This also propagates > through user-space APIs, which pass on pidfds. They must be prepared to > pass on `-1` *or* the pidfd, because there is no guaranteed way to get a > stale pidfd from the kernel. > Userspace must already deal with a pidfd referring to a reaped task as > the task may exit and get reaped at any time will there are still many > pidfds referring to it. In order to allow handing out reaped pidfd SO_PEERPIDFD needs to ensure that PIDFD_INFO_EXIT information is available whenever a pidfd for a reaped task is created by PIDFD_INFO_EXIT. The uapi promises that reaped pidfds are only handed out if it is guaranteed that the caller sees the exit information: TEST_F(pidfd_info, success_reaped) { struct pidfd_info info = { .mask = PIDFD_INFO_CGROUPID | PIDFD_INFO_EXIT, }; /* * Process has already been reaped and PIDFD_INFO_EXIT been set. * Verify that we can retrieve the exit status of the process. */ ASSERT_EQ(ioctl(self->child_pidfd4, PIDFD_GET_INFO, &info), 0); ASSERT_FALSE(!!(info.mask & PIDFD_INFO_CREDS)); ASSERT_TRUE(!!(info.mask & PIDFD_INFO_EXIT)); ASSERT_TRUE(WIFEXITED(info.exit_code)); ASSERT_EQ(WEXITSTATUS(info.exit_code), 0); } To hand out pidfds for reaped processes we thus allocate a pidfs entry for the relevant sk->sk_peer_pid at the time the sk->sk_peer_pid is stashed and drop it when the socket is destroyed. This guarantees that exit information will always be recorded for the sk->sk_peer_pid task and we can hand out pidfds for reaped processes. Link: https://lore.kernel.org/lkml/20230807085203.819772-1-david@readahead.eu [1] Link: https://lore.kernel.org/20250425-work-pidfs-net-v2-2-450a19461e75@kernel.org Reviewed-by: David Rheinsberg Reviewed-by: Kuniyuki Iwashima Signed-off-by: Christian Brauner commit 477058411c45f225ddfbb4769e35a9a5a95cb826 Author: Christian Brauner Date: Fri Apr 25 10:11:30 2025 +0200 pidfs: register pid in pidfs Add simple helpers that allow a struct pid to be pinned via a pidfs dentry/inode. If no pidfs dentry exists a new one will be allocated for it. A reference is taken by pidfs on @pid. The reference must be released via pidfs_put_pid(). This will allow AF_UNIX sockets to allocate a dentry for the peer credentials pid at the time they are recorded where we know the task is still alive. When the task gets reaped its exit status is guaranteed to be recorded and a pidfd can be handed out for the reaped task. Link: https://lore.kernel.org/20250425-work-pidfs-net-v2-1-450a19461e75@kernel.org Reviewed-by: Oleg Nesterov Reviewed-by: David Rheinsberg Signed-off-by: Christian Brauner commit cc17b4b9c332cc654b248619c1d8ca40d80d1155 Merge: 4acf6d4f6afc34 5c3524b031be98 Author: Jakub Kicinski Date: Fri Apr 25 18:44:11 2025 -0700 Merge branch 'io_uring-zcrx-fix-selftests-and-add-new-test-for-rss-ctx' David Wei says: ==================== io_uring/zcrx: fix selftests and add new test for rss ctx Update io_uring zero copy receive selftest. Patch 1 does a requested cleanup to use defer() for undoing ethtool actions during the test and restoring the NIC under test back to its original state. Patch 2 adds a required call to set hds_thresh to 0. This is needed for the queue API. Patch 3 adds a new test case for steering into RSS contexts. A real application using io_uring zero copy receive relies on this working to shard work across multiple queues. There seems to be some differences/bugs with steering into RSS contexts and individual queues. ==================== Link: https://patch.msgid.link/20250425022049.3474590-1-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 5c3524b031be98de5263d313eafef0ec9303f8b5 Author: David Wei Date: Thu Apr 24 19:20:49 2025 -0700 io_uring/zcrx: selftests: add test case for rss ctx RSS contexts are used to shard work across multiple queues for an application using io_uring zero copy receive. Add a test case checking that steering flows into an RSS context works. Until I add multi-thread support to the selftest binary, this test case only has 1 queue in the RSS context. Signed-off-by: David Wei Reviewed-by: Simon Horman Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250425022049.3474590-4-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 4ce3ade36f251e47fc6b0345afb73a09794fb2e9 Author: David Wei Date: Thu Apr 24 19:20:48 2025 -0700 io_uring/zcrx: selftests: set hds_thresh to 0 Setting hds_thresh to 0 is required for queue reset. Signed-off-by: David Wei Reviewed-by: Simon Horman Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250425022049.3474590-3-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit 43fd0054f3569d8063b2a5b6a3987031cd0d36f6 Author: David Wei Date: Thu Apr 24 19:20:47 2025 -0700 io_uring/zcrx: selftests: switch to using defer() for cleanup Switch to using defer() for putting the NIC back to the original state prior to running the selftest. Signed-off-by: David Wei Reviewed-by: Simon Horman Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250425022049.3474590-2-dw@davidwei.uk Signed-off-by: Jakub Kicinski commit c61caec22820f24bb155929f5cee8c1ccfe92f77 Author: Kuninori Morimoto Date: Thu Apr 17 23:23:32 2025 +0000 ASoC: renesas: add MSIOF sound support Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as both SPI and I2S. Adds MSIOF-I2S driver. MSIOF-SPI/I2S are using same DT compatible properties. MSIOF-I2S uses Of-Graph for Audio-Graph-Card/Card2, MSIOF-SPI doesn't use Of-Graph. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/87r01q2wzv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0cc88846cbfb3018c036a20390acb1e35de03e1d Author: Kuninori Morimoto Date: Thu Apr 17 23:23:28 2025 +0000 ASoC: renesas: rsnd: enable to use "adg" clock ADG needs its MSTP to use it, and it was handled as "clk_i" before. R-Car Gen2/Gen3 are using it, but Gen4 doesn't have it. "clk_i" is not intuitive for ADG MSTP. Let's enable to use "adg" clock. It can keep compatible with R-Car Gen2/Gen3 and Gen4. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87sem62x00.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a714b31225bce9ce2732f6193f28f371093492f0 Author: Kuninori Morimoto Date: Thu Apr 17 23:23:23 2025 +0000 ASoC: renesas: rsnd: care BRGA/BRGB select in rsnd_adg_clk_enable() Renesas rsnd related clocks are enabled by rsnd_adg_clk_enable(), but it doesn't care about BRGA/BRGB selection (It is handled when SSI was started) (BRGA is used for 44.1kHz lineage, BRGB is used for 48kHz lineage in this driver). But it should be handled since probe time. Includes BRGCKR_31 in adg->ckr to handle it since boot time. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87tt6m2x05.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ce6949be36997f65d70bb6496bdfa4befff5bbab Author: Kuninori Morimoto Date: Thu Apr 17 23:23:17 2025 +0000 ASoC: renesas: rsnd: allow to use ADG as standalone Audio clock generator (= ADG) can be used standalone (without DAI), but current driver indicates error if it doesn't have DAI on DT. It is not error, allow to use ADG as standalone. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87v7r22x0a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 749027309025a3bb4785ab8f20e18bc641fae848 Author: Kuninori Morimoto Date: Thu Apr 17 23:22:58 2025 +0000 dt-bindings: renesas,sh-msiof: Add MSIOF I2S Sound support Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as both SPI and I2S. MSIOF-I2S will use Audio Graph Card/Card2 driver which uses Of-Graph in DT. MSIOF-SPI/I2S are using same DT compatible properties. MSIOF-I2S uses Of-Graph for Audio-Graph-Card/Card2, MSIOF-SPI doesn't use Of-Graph. Adds schema for MSIOF-I2S (= Sound). Signed-off-by: Kuninori Morimoto Reviewed-by: "Rob Herring (Arm)" Link: https://patch.msgid.link/87zfge2x0u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 60c6d3797239d087cc6eb82971988893a8ba2a88 Author: Haylen Chu Date: Wed Apr 16 13:54:06 2025 +0000 riscv: defconfig: spacemit: enable clock controller driver for SpacemiT K1 Clock controller unit, or CCU, generates various clocks frequency for peripherals integrated in SpacemiT K1 SoC and is essential for normal operation. Let's enable it as built-in driver in defconfig. Signed-off-by: Haylen Chu Reviewed-by: Alex Elder Reviewed-by: Yixun Lan Signed-off-by: Conor Dooley commit bb5081f4abf2d91ae3ed22d7d1157c91d23db5ed Author: Peng Hao Date: Thu Mar 6 15:54:25 2025 +0800 KVM: SVM: avoid frequency indirect calls When retpoline is enabled, indirect function calls introduce additional performance overhead. Avoid frequent indirect calls to VMGEXIT when SEV is enabled. Signed-off-by: Peng Hao Link: https://lore.kernel.org/r/20250306075425.66693-1-flyingpeng@tencent.com Signed-off-by: Sean Christopherson commit b6bc164f41dbee11a4f2913f8fda22066689aa95 Author: Kim Phillips Date: Mon Mar 10 15:16:03 2025 -0500 KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field AMD EPYC 5th generation processors have introduced a feature that allows the hypervisor to control the SEV_FEATURES that are set for, or by, a guest [1]. ALLOWED_SEV_FEATURES can be used by the hypervisor to enforce that SEV-ES and SEV-SNP guests cannot enable features that the hypervisor does not want to be enabled. Always enable ALLOWED_SEV_FEATURES. A VMRUN will fail if any non-reserved bits are 1 in SEV_FEATURES but are 0 in ALLOWED_SEV_FEATURES. Some SEV_FEATURES - currently PmcVirtualization and SecureAvic (see Appendix B, Table B-4) - require an opt-in via ALLOWED_SEV_FEATURES, i.e. are off-by-default, whereas all other features are effectively on-by-default, but still honor ALLOWED_SEV_FEATURES. [1] Section 15.36.20 "Allowed SEV Features", AMD64 Architecture Programmer's Manual, Pub. 24593 Rev. 3.42 - March 2024: https://bugzilla.kernel.org/attachment.cgi?id=306250 Co-developed-by: Kishon Vijay Abraham I Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Pankaj Gupta Signed-off-by: Kim Phillips Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20250310201603.1217954-3-kim.phillips@amd.com Signed-off-by: Sean Christopherson commit f9f27c4a377a8b45d6ece79279846b4fb3e27c96 Author: Kishon Vijay Abraham I Date: Mon Mar 10 15:16:02 2025 -0500 x86/cpufeatures: Add "Allowed SEV Features" Feature Add CPU feature detection for "Allowed SEV Features" to allow the Hypervisor to enforce that SEV-ES and SEV-SNP guest VMs cannot enable features (via SEV_FEATURES) that the Hypervisor does not support or wish to be enabled. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Tom Lendacky Reviewed-by: Pankaj Gupta Acked-by: Borislav Petkov (AMD) Signed-off-by: Kim Phillips Link: https://lore.kernel.org/r/20250310201603.1217954-2-kim.phillips@amd.com Signed-off-by: Sean Christopherson commit 468c27ae0215c14bc62c90fa7b2ce2bc9eb4564b Author: Tom Lendacky Date: Thu Mar 20 08:26:53 2025 -0500 KVM: SVM: Add a mutex to dump_vmcb() to prevent concurrent output If multiple VMRUN instructions fail, resulting in calls to dump_vmcb(), the output can become interleaved and it is impossible to identify which line of output belongs to which VMCB. Add a mutex to dump_vmcb() so that the output is serialized. Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov (AMD) Tested-by: Kim Phillips Link: https://lore.kernel.org/r/a880678afd9488e1dd6017445802712f7c02cc6d.1742477213.git.thomas.lendacky@amd.com Signed-off-by: Sean Christopherson commit 0e6b677de730bec4113c466861968e38c4018c50 Author: Tom Lendacky Date: Thu Mar 20 08:26:52 2025 -0500 KVM: SVM: Include the vCPU ID when dumping a VMCB Provide the vCPU ID of the VMCB in dump_vmcb(). Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov (AMD) Tested-by: Kim Phillips Link: https://lore.kernel.org/r/ee0af5a6c1a49aebb4a8291071c3f68cacf107b2.1742477213.git.thomas.lendacky@amd.com Signed-off-by: Sean Christopherson commit db264509610588dea5fa1dbe28914d39b688d190 Author: Tom Lendacky Date: Thu Mar 20 08:26:51 2025 -0500 KVM: SVM: Add the type of VM for which the VMCB/VMSA is being dumped Add the type of VM (SVM, SEV, SEV-ES, or SEV-SNP) being dumped to the dump_vmcb() function. Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov (AMD) Tested-by: Kim Phillips Link: https://lore.kernel.org/r/7a183a8beedf4ee26c42001160e073a884fe466e.1742477213.git.thomas.lendacky@amd.com Signed-off-by: Sean Christopherson commit 22f5c2003a18300f03cd1dd0b63b4df0ce7fed17 Author: Tom Lendacky Date: Thu Mar 20 08:26:50 2025 -0500 KVM: SVM: Dump guest register state in dump_vmcb() Guest register state can be useful when debugging, include it as part of dump_vmcb(). Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov (AMD) Tested-by: Kim Phillips Link: https://lore.kernel.org/r/a4131a10c082a93610cac12b35dca90292e50f50.1742477213.git.thomas.lendacky@amd.com Signed-off-by: Sean Christopherson commit 962e2b6152ef1264224a9e1793ad2d5b5f3311a8 Author: Tom Lendacky Date: Thu Mar 20 08:26:49 2025 -0500 KVM: SVM: Decrypt SEV VMSA in dump_vmcb() if debugging is enabled An SEV-ES/SEV-SNP VM save area (VMSA) can be decrypted if the guest policy allows debugging. Update the dump_vmcb() routine to output some of the SEV VMSA contents if possible. This can be useful for debug purposes. Signed-off-by: Tom Lendacky Acked-by: Borislav Petkov (AMD) Tested-by: Kim Phillips Link: https://lore.kernel.org/r/ea3b852c295b6f4b200925ed6b6e2c90d9475e71.1742477213.git.thomas.lendacky@amd.com Signed-off-by: Sean Christopherson commit 6ed20625a4b8189a1bd6598aa58e03147ce378ee Author: Harish Chegondi Date: Sun Apr 20 22:59:01 2025 -0700 drm/xe/eustall: Do not support EU stall on SRIOV VF EU stall sampling is not supported on SRIOV VF. Do not initialize or open EU stall stream on SRIOV VF. Fixes: 9a0b11d4cf3b ("drm/xe/eustall: Add support to init, enable and disable EU stall sampling") Signed-off-by: Harish Chegondi Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://lore.kernel.org/r/10db5d1c7e17aadca7078ff74575b7ffc0d5d6b8.1745215022.git.harish.chegondi@intel.com commit c2b1f1b8641372bb2e563c49eb25632623a860fc Author: Harish Chegondi Date: Thu Apr 17 17:07:17 2025 -0700 drm/xe/eustall: Resolve a possible circular locking dependency Use a separate lock in the polling function eu_stall_data_buf_poll() instead of eu_stall->stream_lock. This would prevent a possible circular locking dependency leading to a deadlock as described below. This would also require additional locking with the new lock in the read function. <4> [787.192986] ====================================================== <4> [787.192988] WARNING: possible circular locking dependency detected <4> [787.192991] 6.14.0-rc7-xe+ #1 Tainted: G U <4> [787.192993] ------------------------------------------------------ <4> [787.192994] xe_eu_stall/20093 is trying to acquire lock: <4> [787.192996] ffff88819847e2c0 ((work_completion) (&(&stream->buf_poll_work)->work)), at: __flush_work+0x1f8/0x5e0 <4> [787.193005] but task is already holding lock: <4> [787.193007] ffff88814ce83ba8 (>->eu_stall->stream_lock){3:3}, at: xe_eu_stall_stream_ioctl+0x41/0x6a0 [xe] <4> [787.193090] which lock already depends on the new lock. <4> [787.193093] the existing dependency chain (in reverse order) is: <4> [787.193095] -> #1 (>->eu_stall->stream_lock){+.+.}-{3:3}: <4> [787.193099] __mutex_lock+0xb4/0xe40 <4> [787.193104] mutex_lock_nested+0x1b/0x30 <4> [787.193106] eu_stall_data_buf_poll_work_fn+0x44/0x1d0 [xe] <4> [787.193155] process_one_work+0x21c/0x740 <4> [787.193159] worker_thread+0x1db/0x3c0 <4> [787.193161] kthread+0x10d/0x270 <4> [787.193164] ret_from_fork+0x44/0x70 <4> [787.193168] ret_from_fork_asm+0x1a/0x30 <4> [787.193172] -> #0 ((work_completion)(&(&stream->buf_poll_work)->work)){+.+.}-{0:0}: <4> [787.193176] __lock_acquire+0x1637/0x2810 <4> [787.193180] lock_acquire+0xc9/0x300 <4> [787.193183] __flush_work+0x219/0x5e0 <4> [787.193186] cancel_delayed_work_sync+0x87/0x90 <4> [787.193189] xe_eu_stall_disable_locked+0x9a/0x260 [xe] <4> [787.193237] xe_eu_stall_stream_ioctl+0x5b/0x6a0 [xe] <4> [787.193285] __x64_sys_ioctl+0xa4/0xe0 <4> [787.193289] x64_sys_call+0x131e/0x2650 <4> [787.193292] do_syscall_64+0x91/0x180 <4> [787.193295] entry_SYSCALL_64_after_hwframe+0x76/0x7e <4> [787.193299] other info that might help us debug this: <4> [787.193302] Possible unsafe locking scenario: <4> [787.193304] CPU0 CPU1 <4> [787.193305] ---- ---- <4> [787.193306] lock(>->eu_stall->stream_lock); <4> [787.193308] lock((work_completion) (&(&stream->buf_poll_work)->work)); <4> [787.193311] lock(>->eu_stall->stream_lock); <4> [787.193313] lock((work_completion) (&(&stream->buf_poll_work)->work)); <4> [787.193315] *** DEADLOCK *** Fixes: 760edec939685 ("drm/xe/eustall: Add support to read() and poll() EU stall data") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4598 Signed-off-by: Harish Chegondi Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://lore.kernel.org/r/c896932fca84f79db2df5942911997ed77b2b9b6.1744934656.git.harish.chegondi@intel.com commit d2b9e2f8a15d53121ae8f2c67b69cf06b6fa586c Merge: 55df7c0c62c172 d755887f8e5a2a Author: Dave Airlie Date: Sat Apr 26 08:06:02 2025 +1000 Merge tag 'drm-xe-next-2025-04-17' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Core Changes: Fix drm_gpusvm kernel-doc (Lucas) Driver Changes: - Release guc ids before cancelling work (Tejas) - Remove a duplicated pc_start_call (Rodrigo) - Fix an incorrect assert in previous userptr fixes (Thomas) - Remove gen11 assertions and prefixes (Lucas) - Drop sentinels from arg to xe_rtp_process_to_src (Lucas) - Temporarily disable D3Cold on BMG (Rodrigo) - Fix MOCS debugfs LNCF readout (Tvrtko) - Some ring flush cleanups (Tvrtko) - Use unsigned int for alignment in fb pinning code (Tvrtko) - Retry and wait longer for GuC PC start (Rodrigo) - Recognize 3DSTATE_COARSE_PIXEL in LRC dumps (Matt Roper) - Remove reduntant check in xe_vm_create_ioctl() (Xin) - A bunch of SRIOV updates (Michal) - Add stats for SVM page-faults (Francois) - Fix an UAF (Harish) - Expose fan speed (Raag) - Fix exporting xe buffer objects multiple times (Tomasz) - Apply a workaround (Vinay) - Simplify pinned bo iteration (Thomas) - Remove an incorrect "static" keywork (Lucas) - Add support for separate firmware files on each GT (Lucas) - Survivability handling fixes (Lucas) - Allow to inject error in early probe (Lucas) - Fix unmet direct dependencies warning (Yue Haibing) - More error injection during probe (Francois) - Coding style fix (Maarten) - Additional stats support (Riana) - Add fault injection for xe_oa_alloc_regs (Nakshrtra) - Add a BMG PCI ID (Matt Roper) - Some SVM fixes and preliminary SVM multi-device work (Thomas) - Switch the migrate code from drm managed to dev managed (Aradhya) - Fix an out-of-bounds shift when invalidating TLB (Thomas) - Ensure fixed_slice_mode gets set after ccs_mode change (Niranjana) - Use local fence in error path of xe_migrate_clear (Matthew Brost) - More Workarounds (Julia) - Define sysfs_ops on all directories (Tejas) - Set power state to D3Cold during s2idle/s3 (Badal) - Devcoredump output fix (John) - Avoid plain 64-bit division (Arnd Bergmann) - Reword a debug message (John) - Don't print a hwconfig error message when forcing execlists (Stuart) - Restore an error code to avoid a smatch warning (Rodrigo) - Invalidate L3 read-only cachelines for geometry streams too (Kenneth) - Make PPHWSP size explicit in xe_gt_lrc_size() (Gustavo) - Add GT frequency events (Vinay) - Fix xe_pt_stage_bind_walk kerneldoc (Thomas) - Add a workaround (Aradhya) - Rework pinned save/restore (Matthew Auld, Matthew Brost) - Allow non-contig VRAM kernel BO (Matthew Auld) - Support non-contig VRAM provisioning for SRIOV (Matthew Auld) - Allow scratch-pages for unmapped parts of page-faulting VMs. (Oak) - Ensure XE_BO_FLAG_CPU_ADDR_MIRROR had a unique value (Matt Roper) - Fix taking an invalid lock on wedge (Lucas) - Configs and documentation for survivability mode (Riana) - Remove an unused macro (Shuicheng) - Work around a page-fault full error (Matt Brost) - Enable a SRIOV workaround (John) - Bump the recommended GuC version (John) - Allow to drop VRAM resizing (Lucas) - Don't expose privileged debugfs files if VF (Michal) - Don't show GGTT/LMEM debugfs files under media GT (Michal) - Adjust ring-buffer emission for maximum possible size (Tvrtko) - Fix notifier vs folio lock deadlock (Matthew Auld) - Stop relying on placement for dma-buf unmap Matthew Auld) Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://lore.kernel.org/r/aADWaEFKVmxSnDLo@fedora commit df8c5ad0f56635341bfe3f59ef7c6473e389abc4 Merge: 7caae11813c34e c283fcdc4e2b89 Author: Mark Brown Date: Fri Apr 25 22:13:46 2025 +0100 Configure Clocks, Add Internal DMA support Merge series from Vishwaroop A : This series introduces QSPI clock configuration and internal DMA support for Quad SPI controller. The patches have been reorganized for better logical flow and review comments from v2 have been addressed. commit 7caae11813c34ed57123342a7f0535a30f6179fe Merge: 64c05a1d66193b cf0668184d1d2f Author: Mark Brown Date: Fri Apr 25 22:13:40 2025 +0100 ASoC: add Renesas MSIOF sound driver Merge series from Kuninori Morimoto : Renesas MSIOF can work as both SPI and I2S. Current Linux supports MSIOF-SPI. This patch-set adds new MSIOF-I2S. Because it is using same HW-IP, we want to share same compatible for both MSIOF-SPI/I2S case. MSIOF-I2S (Sound) will use Audio-Graph-Card/Card2 which uses Of-Graph, but MSIOF-SPI is not use Of-Graph. So, this patch-set assumes it was used as MSIOF-I2S if DT is using Of-Graph, otherwise, it is MSIOF-SPI (This assumption will works if SPI *never* use Of-Graph in the future). One note so far is that it is using "spi@xxx" node name for both MSIOF-SPI/I2S. DTC will automatically checks "spi@xxx" node as SPI device which requests #address-cells/#size-cells. But is not needed for I2S. So we will get warning about it on Sparrow Hawk which uses MSIOF-I2S. We have no solution about it, so far. Link: https://lore.kernel.org/r/87zfgi1a5a.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87h62vh5mj.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/875xjeb0wu.wl-kuninori.morimoto.gx@renesas.com commit d864bb528a6725e775d564fd4430762acbb9dd0d Author: Judith Mendez Date: Mon Apr 21 19:08:51 2025 -0500 arm64: dts: ti: k3-am625-sk: Enable PWM PWM signals can be routed to the user expansion header on am625 SK and am62 lp sk. Enable eCAP0, eCAP1, eHRPWM1, and route the output PWM signals to pins on J3 header. Signed-off-by: Judith Mendez Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250422000851.4118545-4-jm@ti.com Signed-off-by: Nishanth Menon commit 5aec1169b53969d07cc288814f7eebd2ef01f9a0 Author: Judith Mendez Date: Mon Apr 21 19:08:50 2025 -0500 arm64: dts: ti: k3-am62a7-sk: Enable PWM PWM signals can be routed to the user expansion header on am62a7 SK. Enable eCAP0, eCAP1, eHRPWM1, and route the output PWM signals to pins on J3 header. Signed-off-by: Judith Mendez Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250422000851.4118545-3-jm@ti.com Signed-off-by: Nishanth Menon commit b2fd55f906ff70a39e67d5ad770774622164bef1 Author: Judith Mendez Date: Mon Apr 21 19:08:49 2025 -0500 arm64: dts: ti: k3-am62p5-sk: Enable PWM PWM signals can be routed to the user expansion header on am62p5 SK. Enable eCAP0, eCAP1, eHRPWM0, eHRPWM1 and route the output PWM signals to pins on J4 header. Signed-off-by: Judith Mendez Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250422000851.4118545-2-jm@ti.com Signed-off-by: Nishanth Menon commit 8bc3b1c8645213ffc22f48238e2f325cc4fa29d0 Author: Dominik Haller Date: Wed Apr 23 15:36:34 2025 +0200 arm64: dts: ti: Add basic support for phyBOARD-Izar-AM68x The phyCORE-AM68x/TDA4x [1] is a SoM (System on Module) featuring TI's AM68x/TDA4x SoC. It can be used in combination with different carrier boards. This module can come with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM68x/TDA4x (J721S2) family. A reference carrier board design, called phyBOARD-Izar is used for the phyCORE-AM68x/TDA4x development kit [2]. Supported features: * Debug UART * 2x SPI NOR Flash * eMMC * 2x Ethernet * Micro SD card * I2C EEPROM * I2C RTC * 2x I2C GPIO Expander * LEDs * USB 5 Gbit/s * PCIe For more details see the product pages for the SoM and the development kit: [1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-am68x-tda4x/ [2] https://www.phytec.eu/en/produkte/development-kits/phyboard-izar/ Signed-off-by: Dominik Haller Reviewed-by: Wadim Egorov Reviewed-by: Udit Kumar Acked-by: Moteen Shah Link: https://lore.kernel.org/r/20250423133635.29897-2-d.haller@phytec.de Signed-off-by: Nishanth Menon commit 5d15c4395fd360ab894a28c6a7c8ca44593cdc61 Author: Dominik Haller Date: Wed Apr 23 15:36:33 2025 +0200 dt-bindings: arm: ti: Add bindings for PHYTEC AM68x based hardware Add devicetree bindings for the AM68x based phyCORE-AM68x/TDA4x SoM and the phyBOARD-Izar carrier board. Signed-off-by: Dominik Haller Reviewed-by: Wadim Egorov Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250423133635.29897-1-d.haller@phytec.de Signed-off-by: Nishanth Menon commit 8d8f28da8f9055acf3bd8fa4c6cb05140c505baf Author: Dominik Haller Date: Wed Apr 23 15:36:35 2025 +0200 arm64: defconfig: Enable TMP102 as module Enable the driver for the TI TMP102 temperature sensors used on the Phytec phyCORE-AM68x/TDA4x and the phyGATE-Tauri-L-iMX8MM. Signed-off-by: Dominik Haller Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250423133635.29897-3-d.haller@phytec.de Signed-off-by: Nishanth Menon commit 53802e60fbb57a6ddab01837a53e2040cd1f592a Author: Judith Mendez Date: Mon Apr 21 15:10:55 2025 -0500 arm64: defconfig: Enable hwspinlock and eQEP for K3 Enable CONFIG_HWSPINLOCK_OMAP to allow usage of these devices across K3 SoC's. Also enable CONFIG_TI_EQEP which is enabled by default on am64x SK board. Signed-off-by: Judith Mendez Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250421201055.3889680-1-jm@ti.com Signed-off-by: Nishanth Menon commit 882c214572e43b56f781883d4ae48689381a68f1 Author: Jayesh Choudhary Date: Wed Apr 16 23:59:30 2025 +0530 arm64: defconfig: Add CDNS_DSI and CDNS_PHY config Enable configs for cdns-dsi and cdns-dphy drivers required for DSI display on the following platforms: J721E-EVM, J721E-BeagleBone-AI64, J721S2-EVM, AM68-SK, J722S-EVM, BeagleY-AI, AM62P5-SK, J784S4-EVM and J742S2-EVM The DSI wrapper driver used by all the above mentioned platforms, cdns-dsi-j721e is enabled by default if cdns-dsi config is enabled. Signed-off-by: Jayesh Choudhary Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20250416182930.32132-1-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit 3b62bd1fde50d54cc59015e14869e6cc3d6899e0 Author: Siddharth Vadapalli Date: Wed Apr 23 20:46:12 2025 +0530 arm64: dts: ti: k3-j784s4-j742s2-main-common: Fix length of serdes_ln_ctrl Commit under Fixes corrected the "mux-reg-masks" property but did not update the "length" field of the "reg" property to account for the newly added register offsets which extend the region. Fix this. Fixes: 38e7f9092efb ("arm64: dts: ti: k3-j784s4-j742s2-main-common: Fix serdes_ln_ctrl reg-masks") Cc: stable@vger.kernel.org Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250423151612.48848-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit ae3ac9ffd59acf46b8934f4e7a5fa7a6803ac959 Author: Andrew Davis Date: Mon Apr 21 16:46:20 2025 -0500 arm64: dts: ti: am65x: Add missing power-supply for Rocktech-rk101 panel Add the 5v0 supply that is provided over the display panel cable and used by the LCD. This is required by "simple panels" or we get the following warning from DTBS_CHECK: k3-am654-gp-evm.dtb: display0: 'power-supply' is a required property Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250421214620.3770172-4-afd@ti.com Signed-off-by: Nishanth Menon commit 4765253055cc8ab3fdc5f9eb5b121d867e209fb1 Author: Jan Kiszka Date: Mon Apr 21 16:46:19 2025 -0500 arm64: dts: ti: k3-am65-main: Add system controller compatible Now that the TI K3 AM654 system controller bindings also cover the usage in the main domain, add its compatible to address dtbs_check complains: k3-am654-base-board.dtb: scm-conf@100000: compatible: ['syscon', 'simple-mfd'] is too short Signed-off-by: Jan Kiszka Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250421214620.3770172-3-afd@ti.com Signed-off-by: Nishanth Menon commit 5959618631fec502ec0963f4082d565f7fbfff04 Author: Andrew Davis Date: Mon Apr 21 16:46:18 2025 -0500 dt-bindings: mfd: ti,j721e-system-controller: Add compatible string for AM654 Add the child nodes that can be found under this node. Then as done for other similar devices (J7200 and J721s2) add support for the AM654 system controller to this binding. Signed-off-by: Andrew Davis Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250421214620.3770172-2-afd@ti.com Signed-off-by: Nishanth Menon commit 8a0bba5b6730a1491a111bf54de5d8dcc23c8e10 Author: Jayesh Choudhary Date: Thu Apr 24 13:33:28 2025 +0530 arm64: dts: ti: k3-j721e-common-proc-board-infotainment: Update to comply with device tree schema Fix hdmi-connector and tfp bridge node as per the bindings, - Remove 'digital' property which is required for DVI connector not HDMI - Add 'ti,deskew' property which is a required property - Fix ports property for tfp410 bridge - Change node names appropriately Redefine the ports for dss and for k3-j721e-common-proc-board.dts, add reg property for the port (@0) to get rid of dtbs_check warnings in infotainment overlay when ports for dss are re-defined. Signed-off-by: Jayesh Choudhary Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250424080328.57671-1-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit 8f52633cf5ebe1fb9c4814b6590f824cf906b346 Author: Waiman Long Date: Thu Apr 24 23:16:55 2025 -0400 cgroup/rstat: Improve cgroup_rstat_push_children() documentation The cgroup_rstat_push_children() function converts a set of updated_children lists from different cgroups into a single ordered list of cgroups to be flushed via the rstat_flush_next pointer. The algorithm used isn't that well illustrated and it takes time to grasp what it is doing. Improve the embedded documentation and variable names to better illustrate the transformation process and make the code easier to understand. Also cgroup_rstat_lock must be held for the whole duration from where the rstat_flush_next list is being constructed in cgroup_rstat_push_children() to when it is consumed later in css_rstat_flush(). Otherwise, list corruption can happen leading to system crash as reported in [1]. In this particular case, the branch being used has commit 093c8812de2d ("cgroup: rstat: Cleanup flushing functions and locking") which breaks this rule, but is missing the fix commit 7d6c63c31914 ("cgroup: rstat: call cgroup_rstat_updated_list with cgroup_rstat_lock") that fixes it. This patch has no functional change. [1] https://lore.kernel.org/lkml/BY5PR04MB68495E9E8A46CA9614D62669BCBB2@BY5PR04MB6849.namprd04.prod.outlook.com/ Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 9cd9d3fdd72b21b9ea47a8e1a08959d833b6e6ef Author: Zihuan Zhang Date: Thu Apr 24 14:03:39 2025 +0800 PM: sleep: Remove unnecessary !! Since initcall_debug is a bool variable, it is not necessary to convert it to bool with the help of a double logical negation (!!). Remove the redundant operation. Signed-off-by: Zihuan Zhang Link: https://patch.msgid.link/20250424060339.73119-1-zhangzihuan@kylinos.cn [ rjw: Changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 1b136de08b5feca37ebdb6d28db3c9c6285aba5a Author: Michal Wilczynski Date: Fri Apr 25 11:20:44 2025 -0700 riscv: dts: thead: Introduce reset controller node T-HEAD TH1520 SoC requires to put the GPU out of the reset state as part of the power-up sequence. Link: https://lore.kernel.org/linux-riscv/81e53e3a-5873-44c7-9070-5596021daa42@samsung.com/ Reviewed-by: Drew Fustini Signed-off-by: Michal Wilczynski [drew: remove hunk that included thead,th1520-reset.h] Signed-off-by: Drew Fustini commit 64c05a1d66193b3a40ad1f29c3d8ba5483e4e0dc Author: Gabor Juhos Date: Thu Apr 24 20:10:59 2025 +0200 spi: spi-qpic-snand: remove unused 'wlen' member of 'struct qpic_spi_nand' The 'wlen' member of the qpic_spi_nand structure is never used in the code so remove that. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250424-qpic-snand-remove-wlen-v1-1-2a7467ce2e3a@gmail.com Signed-off-by: Mark Brown commit c27c31302601b648eb0fd6fc3a69c9a0c10eb6a4 Merge: b0090115001a36 f198b6b256aabe Author: Mark Brown Date: Fri Apr 25 18:40:44 2025 +0100 ASoC: codec: tpa6130a2: Convert to GPIO descriptors Merge series from "Peng Fan (OSS)" : Per Mark's comments in [1], each driver in one patchset and not merge the changes to one driver in one patch, so worked out three patches. - Sort the included headers. - Drop sound/tpa6130a2-plat.h because no user is creating the device using platform data - Covert to GPIO descriptors Checking the DTS polarity, all users are using GPIOD_ACTIVE_HIGH. so all should work as expected with this patch. I not have hardware to test, just my best effort to do this. [1] https://lore.kernel.org/all/66db9962-d773-4c7a-bf59-4698eca9eedc@sirena.org.uk/ commit b0090115001a3602d0d18828960e8eb1ae129b41 Merge: 0787a08ae78536 e358e012a69a3d Author: Mark Brown Date: Fri Apr 25 18:40:40 2025 +0100 ASoC: codecs: wcd938x: fix mux error handling Merge series from Johan Hovold : A recent change added support for looking up an optional mux control before falling back to gpio control for us-euro plug selection. The mux framework does however not yet support optional muxes and an error message is now incorrectly logged on machines like the Lenovo ThinkPad X13s which do not have one: wcd938x_codec audio-codec: /audio-codec: failed to get mux-control (0) Suppress the bogus error and add the missing mux error handling by making sure that the 'mux-controls' DT property is present before looking up the mux control. Included is also a related cleanup. commit 121baab7b88ed865532dadb7ef1aee6e2bea86f5 Author: Viresh Kumar Date: Thu Apr 24 21:50:18 2025 +0530 cpufreq: Force sync policy boost with global boost on sysfs update If the global boost flag is enabled and policy boost flag is disabled, a call to `cpufreq_boost_trigger_state(true)` must enable the policy's boost state. The current code misses that because of an optimization. Fix it. Suggested-by: Lifeng Zheng Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/852ff11c589e6300730d207baac195b2d9d8b95f.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit 0e8d8560fe022ae871806a8c1b1b3b756c02abc1 Author: Viresh Kumar Date: Thu Apr 24 21:50:17 2025 +0530 cpufreq: Preserve policy's boost state after resume If the global boost flag was enabled and policy boost flag was disabled before a suspend resume cycle, cpufreq_online() will enable the policy boost flag on resume. While it is important for the policy boost flag to mirror the global boost flag when a policy is first created, it should be avoided when the policy is reinitialized (for example after a suspend resume cycle). Though, if the global boost flag is disabled at this point of time, we want to make sure policy boost flag is disabled too. Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/de5c72a0af101049204305c73cd30eb3a3e7b4a0.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit 27241c8b63bd4afe0cc1848eefc358aacd2fafb9 Author: Viresh Kumar Date: Thu Apr 24 21:50:16 2025 +0530 cpufreq: Introduce policy_set_boost() Introduce policy_set_boost() to update boost state of a cpufreq policy. No intentional function change. Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/1863178ac17340c810519c8593014b8e561797ea.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit c347f31ae27f6196afbe812acd09af3f076ff117 Author: Viresh Kumar Date: Thu Apr 24 21:50:15 2025 +0530 cpufreq: Don't unnecessarily call set_boost() The policy specific boost value may already be set correctly in cpufreq_boost_trigger_state(), don't update it again unnecessarily. Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/3003fbdcc1850128fe7fb653d7ddb8afc4d66170.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki commit 91dbac4076537b464639953c055c460d2bdfc7ea Author: Jonathan Wiepert Date: Thu Apr 24 18:14:57 2025 -0400 Use thread-safe function pointer in libbpf_print This patch fixes a thread safety bug where libbpf_print uses the global variable storing the print function pointer rather than the local variable that had the print function set via __atomic_load_n. Fixes: f1cb927cdb62 ("libbpf: Ensure print callback usage is thread-safe") Signed-off-by: Jonathan Wiepert Signed-off-by: Andrii Nakryiko Acked-by: Mykyta Yatsenko Link: https://lore.kernel.org/bpf/20250424221457.793068-1-jonathan.wiepert@gmail.com commit 64821d25f05ac468d435e61669ae745ce5a633ea Author: Tao Chen Date: Thu Apr 24 00:39:01 2025 +0800 libbpf: Remove sample_period init in perf_buffer It seems that sample_period is not used in perf buffer. Actually, only wakeup_events are meaningful to enable events aggregation for wakeup notification. Remove sample_period setting code to avoid confusion. Fixes: fb84b8224655 ("libbpf: add perf buffer API") Signed-off-by: Tao Chen Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Namhyung Kim Link: https://lore.kernel.org/bpf/20250423163901.2983689-1-chen.dylane@linux.dev commit 3b4628a8afb45c7167a01c4c5a85ece429d0a0b3 Merge: 3d59224947b024 464dc75dfe6a08 Author: Rafael J. Wysocki Date: Fri Apr 25 18:23:40 2025 +0200 Merge back cpufreq material for 6.16 commit fcd95af591e8cd5880c0c553641beb0e97ba92f6 Author: Ville Syrjälä Date: Thu Apr 17 14:44:54 2025 +0300 drm/i915/vga: Consolidate intel_vga_disable() calls Currently we disable the VGA plane from various places, sometimes multiple times in the same init/resume sequence. Get rid of all this mess and do it just once. The most correct place seems to be just after intel_early_display_was() as that one applies various workarounds that need to be in place before we touch any planes (including the VGA plane). Actually, we do still have a second caller in vlv_display_power_well_init(). I think we still need that as the reset value of VGACNTR is 0x0 and thus technically the VGA plane will be (at least partially) enabled after the power well has been toggled. In both cases we have the necessary power reference already held (INIT power domain for load/resume case, and the display power well itself being what we need for vlv_display_power_well_init()). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a1b3a81bf7365bb2270756e906b4011faa9afbe5 Author: Ville Syrjälä Date: Thu Apr 17 14:44:53 2025 +0300 drm/i915/vga: Nuke vga_redisable_power_on() Now that intel_vga_disable() itself will print a debug message, intel_vga_redisable_power_on() is completely redundant. Get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0c80d60ae63461c33293859fc41ba57654dc863a Author: Ville Syrjälä Date: Thu Apr 17 14:44:52 2025 +0300 drm/i915/vga: Include the current pipe in the VGA disable debug message Add some debugs to the VGA plane disable so that we can at least see from the logs when it happens (and on which pipe). I was curious about this at some point when I was seeing some random underruns near the time when we disable the VGA plane, but I think in the end that turned out to be a red herring. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 00efddc6082478566dc32d0d7fcb232723102183 Author: Ville Syrjälä Date: Thu Apr 17 14:44:51 2025 +0300 drm/i915/vga: Extract intel_vga_regs.h Extract the VGACNTR register definitions into their own header file, to declutter i915_reg.h a bit. v2: Group the register offst definitions together (Jani) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 85447f68a1e3e6a237e3052a60a70a1593604e26 Author: Junhao He Date: Fri Apr 18 15:08:12 2025 +0800 MAINTAINERS: Add hisilicon PMU JSON events under its entry The all hisilicon PMU JSON events were missing to be listed there. Reviewed-by: James Clark Signed-off-by: Junhao He Acked-by: Jonathan Cameron Acked-by: Yicong Yang Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20250418070812.3771441-4-hejunhao3@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c756441c3524acea4bbc119cd51d9e822b39a5f0 Author: Junhao He Date: Fri Apr 18 15:08:11 2025 +0800 perf vendor events arm64: Drop hip08 PublicDescription if same as BriefDescription If BriefDescription and PublicDescription are the same, only BriefDescription is needed. It will be used for both long and short format outputs. Reviewed-by: Jonathan Cameron Reviewed-by: Yicong Yang Signed-off-by: Junhao He Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20250418070812.3771441-3-hejunhao3@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 43fff3e948caae0469e33196dcfdeb6439d139ca Author: Junhao He Date: Fri Apr 18 15:08:10 2025 +0800 perf vendor events arm64: Fill up Desc field for Hisi hip08 hha pmu In the same PMU, when some JSON events have the "BriefDescription" field populated while others do not, the cmp_sevent() function will split these two types of events into separate groups. As a result, when using perf list to display events, the two types of events cannot be grouped together in the output. before patch: $ perf list pmu ... uncore hha: hisi_sccl1_hha2/sdir-hit/ hisi_sccl1_hha2/sdir-lookup/ ... uncore hha: edir-hit [Count of The number of HHA E-Dir hit operations. Unit: hisi_sccl1_hha2] ... after patch: $ perf list pmu ... uncore hha: edir-hit [Count of The number of HHA E-Dir hit operations. Unit: hisi_sccl1_hha2] sdir-hit [Count of The number of HHA S-Dir hit operations. Unit: hisi_sccl1_hha2] sdir-lookup [Count of the number of HHA S-Dir lookup operations. Unit: hisi_sccl1_hha2] ... Reviewed-by: James Clark Reviewed-by: Jonathan Cameron Reviewed-by: Yicong Yang Signed-off-by: Junhao He Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20250418070812.3771441-2-hejunhao3@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 022d270bb6c607cdad93aee7c2c9d63a0e3b3070 Author: Ian Rogers Date: Thu Apr 10 10:36:21 2025 -0700 perf bench evlist-open-close: Reduce scope of 2 variables Make 2 global variables local. Reduces ELF binary size by removing relocations. For a no flags build, the perf binary size is reduced by 4,144 bytes on x86-64. Reviewed-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dapeng Mi Cc: Dominique Martinet Cc: Dr. David Alan Gilbert Cc: Hao Ge Cc: Howard Chu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Levi Yun Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tengda Wu Cc: Thomas Richter Cc: Veronika Molnarova Cc: Weilin Wang Cc: Xu Yang Link: https://lore.kernel.org/r/20250410173631.1713627-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit be8aefad33760dd8bc0499988f4e4f3e779851d0 Author: Ian Rogers Date: Thu Apr 10 10:36:20 2025 -0700 perf tests record: Cleanup improvements Remove the script output file. Add a trap debug message. Minor style consistency changes. Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20250410173631.1713627-2-irogers@google.com Cc: Mark Rutland Cc: Levi Yun Cc: Dominique Martinet Cc: Howard Chu Cc: Tengda Wu Cc: Peter Zijlstra Cc: Adrian Hunter Cc: Weilin Wang Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Hao Ge Cc: James Clark Cc: Thomas Richter Cc: Alexander Shishkin Cc: Dapeng Mi Cc: Kan Liang Cc: Xu Yang Cc: Ingo Molnar Cc: Veronika Molnarova Cc: Dr. David Alan Gilbert Cc: bpf@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ccd4b5cdf00f358acae9f396d13029e7ae78522e Author: Thomas Richter Date: Thu Apr 24 15:33:10 2025 +0200 perf tests metric-only perf stat: Fix tests 84 and 86 s390 On s390x KVM and z/VM machines the CPU Measurement Facility is not available. Events cycles and instructions do not exist. Running above tests on s390 KVM and z/VM guests always fail with this error: # ./perf test 84 86 84: perf stat JSON output linter : FAILED! 86: perf stat STD output linter : FAILED! # Root cause is command: # perf stat -j --metric-only -e instructions,cycles -- true {"metric-value" : "none"} # Which fails due to unsupported events and returns "none". Do not execute this test case on s390 KVM and z/VM machines. Output after: # ./perf test 84 86 84: perf stat JSON output linter : Ok 86: perf stat STD output linter : Ok # Fixes: 45a86d017adf4d6c ("perf test: Add --metric-only to perf stat output tests") Suggested-by: Heiko Carstens Suggested-by: Sumanth Korikkar Reviewed-by: Sumanth Korikkar Signed-off-by: Thomas Richter Cc: Alexander Gordeev Cc: Namhyung Kim Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20250424133310.37452-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 68cb1567439fa325ba980f3b5b67f95d3953eafd Author: Ian Rogers Date: Tue Apr 22 22:03:58 2025 -0700 perf tool_pmu: Fix aggregation on duration_time evsel__count_has_error() fails counters when the enabled or running time are 0. The duration_time event reads 0 when the cpu_map_idx != 0 to avoid aggregating time over CPUs. Change the enable and running time to always have a ratio of 100% so that evsel__count_has_error won't fail. Before: ``` $ sudo /tmp/perf/perf stat --per-core -a -M UNCORE_FREQ sleep 1 Performance counter stats for 'system wide': S0-D0-C0 1 2,615,819,485 UNC_CLOCK.SOCKET # 2.61 UNCORE_FREQ S0-D0-C0 2 duration_time 1.002111784 seconds time elapsed ``` After: ``` $ perf stat --per-core -a -M UNCORE_FREQ sleep 1 Performance counter stats for 'system wide': S0-D0-C0 1 758,160,296 UNC_CLOCK.SOCKET # 0.76 UNCORE_FREQ S0-D0-C0 2 1,003,438,246 duration_time 1.002486017 seconds time elapsed ``` Note: the metric reads the value a different way and isn't impacted. Fixes: 240505b2d0adcdc8 ("perf tool_pmu: Factor tool events into their own PMU") Reported-by: Stephane Eranian Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20250423050358.94310-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b1b26ce8bb0eab1d058353ab6fa1a2b652a9a020 Author: Chun-Tse Shao Date: Mon Apr 14 10:38:56 2025 -0700 perf session: Skip unsupported new event types `perf report` currently halts with an error when encountering unsupported new event types (`event.type >= PERF_RECORD_HEADER_MAX`). This patch modifies the behavior to skip these samples and continue processing the remaining events. Additionally, stops reporting if the new event size is not 8-byte aligned. Suggested-by: Arnaldo Carvalho de Melo Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Signed-off-by: Chun-Tse Shao Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ben Gainey Cc: Dmitriy Vyukov Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250414173921.2905822-1-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0ef8091f177f314d379c487cd8ec1024b7ae0f99 Author: Namhyung Kim Date: Mon Mar 31 00:37:22 2025 -0700 perf hist: Allow custom output fields in hierarchy mode Now it can handle multiple output fields and sort keys in separate levels, so it should be ok to use it in the hierarchy mode. This allows fully customized output format. $ perf report -F latency,comm,parallelism -H --stdio ... # Latency Command / Parallelism # ........... ..................... # 31.84% cc1 29.96% 5 1.24% 4 0.37% 6 0.26% 3 0.02% 2 24.68% as 22.39% 5 1.12% 2 0.98% 4 0.12% 3 0.07% 6 ... Committer testing: Before: $ perf report -F latency,comm,parallelism -H --stdio Error: --hierarchy and --fields options cannot be used together Usage: perf report [] -F, --fields output field(s): overhead latency overhead_sys overhead_us overhead_guest_sys overhead_guest_us overhead_children latency_children sample period weight1 weight2 weight3 -H, --hierarchy Show entries in a hierarchy $ After: $ perf report -F latency,comm,parallelism -H --stdio # Total Lost Samples: 0 # # Samples: 1K of event 'cycles:Pu' # Event count (approx.): 1581450138 # # Latency Command / Parallelism # ........... ..................... # 97.66% git 96.95% 1 0.55% 2 0.04% 5 0.03% 8 0.03% 4 0.02% 3 0.01% 9 0.01% 7 0.01% 6 0.01% 10 0.00% 12 2.34% git-remote-http 2.24% 1 0.07% 5 0.02% 2 0.00% 4 # # (Tip: To analyze particular parallelism levels, try: perf report --latency --parallelism=32-64) Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250331073722.4695-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 390627dda7ee4e399d83972f04a2ec915b2bb159 Author: Namhyung Kim Date: Mon Mar 31 00:37:21 2025 -0700 perf hist: Set levels in output_field_add() It turns out that the output fields didn't consider the hierarchy mode and put all the fields in the same level. To support hierarchy, each non-output field should be in a separate level. Pass a pointer to level to output_field_add() and make it increase the level when it sees non-output fields. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250331073722.4695-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b09124e2e167e1ec4e29fe4c12f8956c43822ffd Author: Namhyung Kim Date: Mon Mar 31 00:37:20 2025 -0700 perf hist: Remove formats in hierarchy when cancel latency Likewise, it should remove latency output fields in hierarchy list. Pass evlist to perf_hpp__cancel_latency() to handle them properly. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250331073722.4695-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit dbd11b6bdab12f60fa99f0d9ab6b626ea86be9f8 Author: Namhyung Kim Date: Mon Mar 31 00:37:19 2025 -0700 perf hist: Remove formats in hierarchy when cancel children This is to support hierarchy options with custom output fields. Currently perf_hpp__cancel_cumulate() only removes accumulated overhead and latency fields from the global perf_hpp_list. This is not used in the hierarchy mode because each evsel's hist has its own separate hpp_list. So it needs to remove the fields from the lists too. Pass evlist to the function so that it can iterate the evsels. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250331073722.4695-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 92504d927df0fd00984cafd9cb56eb130d94bff7 Author: Ian Rogers Date: Mon Apr 14 10:41:34 2025 -0700 perf record: Retirement latency cleanup in evsel__config 'perf record' will fail with retirement latency events as the open doesn't do a perf_event_open system call. Use evsel__config() to set up such events for recording by removing the flag and enabling sample weights - the sample weights containing the retirement latency. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fc807b6bde6ad332c333ae5be65e8bd1b5611be7 Author: Ian Rogers Date: Mon Apr 14 10:41:33 2025 -0700 perf pmu-events: Add retirement latency to JSON events inside of perf The updated Intel vendor events add retirement latency for graniterapids: https://lore.kernel.org/lkml/20250322063403.364981-14-irogers@google.com/ This change makes those values available within an alias/event within a PMU and saves them into the evsel at event parse time. When no TPEBS data is available the default values are substituted in for TMA metrics that are using retirement latency events - currently just those on graniterapids. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f19306f0650915018d95c8534094aa5d56d0d8e4 Author: Ian Rogers Date: Mon Apr 14 10:41:32 2025 -0700 perf stat: Add mean, min, max and last --tpebs-mode options Add command line configuration option for how retirement latency events are combined. The default "mean" gives the average of retirement latency. "min" or "max" give the smallest or largest retirment latency times respectively. "last" uses the last retirment latency sample's time. Committer notes: Enclose parse_tpebs_mode() under HAVE_ARCH_X86_64_SUPPORT to match the ifdef block where it is used, fixing the build in systems like: 20 5.60 debian:experimental-x-mips : FAIL gcc version 14.2.0 (Debian 14.2.0-1) builtin-stat.c:2330:12: error: 'parse_tpebs_mode' defined but not used [-Werror=unused-function] 2330 | static int parse_tpebs_mode(const struct option *opt, const char *str, | ^~~~~~~~~~~~~~~~ Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3533b56d22a5e1a873b97507eea3d012c441a789 Author: Ian Rogers Date: Mon Apr 14 10:41:31 2025 -0700 perf intel-tpebs: Use stats for retirement latency statistics struct stats provides access to mean, min and max. It also provides uniformity with statistics code used elsewhere in perf. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1ddf95f6d81fcb27d09db3f9c1f7ad51b835a2ac Author: Ian Rogers Date: Mon Apr 14 10:41:30 2025 -0700 perf intel-tpebs: Don't close record on read Factor sending record control fd code into its own function. Rather than killing the record process send it a ping when reading. Timeouts were witnessed if done too frequently, so only ping for the first tpebs events. Don't kill the record command send it a stop command. As close isn't reliably called also close on evsel__exit. Add extra checks on the record being terminated to avoid warnings. Adjust the locking as needed and incorporate extra -Wthread-safety checks. Check to do six 500ms poll timeouts when sending commands, rather than the larger 3000ms, to allow the record process terminating to be better witnessed. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 81743920491345dfde859eec677eaa094a01d28c Author: Ian Rogers Date: Mon Apr 14 10:41:29 2025 -0700 perf intel-tpebs: Add mutex for tpebs_results Ensure sample reader isn't racing with events being added/removed. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ea61db61d99d84e44840fe7d56bfba0487db9c0c Author: Ian Rogers Date: Mon Apr 14 10:41:28 2025 -0700 perf intel-tpebs: Add support for updating counts in evsel__tpebs_read Rename to reflect evsel argument and for consistency with other tpebs functions. Update count from prev_raw_counts when available. Eventually this will allow inteval mode support. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bb1c0f1b4303a14fae211b24365a570c7770896c Author: Ian Rogers Date: Mon Apr 14 10:41:27 2025 -0700 perf intel-tpebs: Refactor tpebs_results list evsel names and metric-ids are used for matching but this can be problematic, for example, multiple occurrences of the same retirement latency event become a single event for the record. Change the name of the record events so they are unique and reflect the evsel of the retirement latency event that opens them (the retirement latency event's evsel address is embedded within them). This allows an evsel based close to close the event when the retirement latency event is closed. This is important as 'perf stat' has an evlist and the session listen to the record events has an evlist, knowing which event should remove the tpebs_retire_lat can't be tied to an evlist list as there is more than 1, so closing which evlist should cause the tpebs to stop? Using the evsel and the last one out doing the tpebs_stop is cleaner. Committer notes: Fix the build on 32-bit systems by using unsigned long when converting pointers to integers instead of uint64_t. Fixes: 20 4.97 debian:experimental-x-mips : FAIL gcc version 14.2.0 (Debian 14.2.0-13) util/intel-tpebs.c: In function 'tpebs_retire_lat__find': util/intel-tpebs.c:377:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 377 | if ((uint64_t)t->evsel == num) | ^ cc1: all warnings being treated as errors Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 07c35320337eec5744d7cf735e86ac6f52d3535f Author: Ian Rogers Date: Mon Apr 14 10:41:26 2025 -0700 perf intel-tpebs: Ensure events are opened, factor out finding Factor out finding an tpebs_retire_lat from an evsel. Don't blindly return when ignoring an open request, which happens after the first open request, ensure the event was started on a fork of perf record. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 84e629143b776793d05ef45d6ef9f59feae53fe4 Author: Ian Rogers Date: Mon Apr 14 10:41:25 2025 -0700 perf intel-tpebs: Inline get_perf_record_args Code is short enough to be inlined and there are no error cases when made inline. Make the implicit NULL pointer at the end of the argv explicit. Move the fixed number of arguments before the variable number of arguments. Correctly size the argv allocation and zero when feeing to avoid a dangling pointer. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 728756fffbc80325302b574e60600af6aeb4be2c Author: Ian Rogers Date: Mon Apr 14 10:41:24 2025 -0700 perf intel-tpebs: Reduce scope of the tpebs_events_size variable Moved to record argument computation rather than being global. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 24fead56ebd01f0490c4fb5c3bf18de998eb1add Author: Ian Rogers Date: Mon Apr 14 10:41:23 2025 -0700 perf intel-tpebs: Move the cpumap_buf variable out of evsel__tpebs_open() The buffer holds the cpumap to pass to the 'perf record' command, so move it down to the 'perf record' function. Make this function an evsel function given the need for the evsel for the cpumap. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b009b51eeac7a23e578641e96cfa08ab05cf6777 Author: Ian Rogers Date: Mon Apr 14 10:41:22 2025 -0700 perf intel-tpebs: Separate evsel__tpebs_prepare() out of evsel__tpebs_open() Separate the creation of the tpebs_retire_lat result out of the opening step. This is in preparation for adding a prepare operation for evlists. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cfd045f73f0abc78adc143e7ce17b063428e15cb Author: Ville Syrjälä Date: Thu Apr 17 14:44:50 2025 +0300 drm/i915/vga: Add more VGACNTRL bits Define a pile of extra VGACNTRL bits. We don't really have any real use for most of these but nicer to have them all in one place rather than trawling the specs when one wants to know what's in there. I will have some real use for the CHV pipe select bits later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2332f68254d9ca03ae1185e7da344bccb57c7678 Author: Ian Rogers Date: Mon Apr 14 10:41:21 2025 -0700 perf intel-tpebs: Rename tpebs_start to evsel__tpebs_open Try to add more consistency to evsel by having tpebs_start renamed to evsel__tpebs_open, passing the evsel that is being opened. The unusual behavior of evsel__tpebs_open opening all events on the evlist is kept and will be cleaned up further in later patches. The comments are cleaned up as tpebs_start isn't called from evlist. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9e0ef3ec62d391e3121c4a81b5d8ce073a55aee9 Author: Ian Rogers Date: Mon Apr 14 10:41:20 2025 -0700 perf intel-tpebs: Simplify tpebs_cmd No need to dynamically allocate when there is 1. tpebs_pid duplicates tpebs_cmd.pid, so remove. Use 0 as the uninitialized value (PID == 0 is reserved for the kernel) rather than -1. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e7bf2f608172ac8aefe0fa5f4ebca7da3538f2a6 Author: Ville Syrjälä Date: Thu Apr 17 14:44:49 2025 +0300 drm/i915/vga: Clean up VGACNTRL bits Use REG_BIT() & co. for the VGACNTRL register bits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250417114454.12836-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit eb493c28e9ea029ff4f4986c6b45967e7fd679e6 Author: Ian Rogers Date: Mon Apr 14 10:41:19 2025 -0700 perf intel-tpebs: Cleanup header Remove arch conditional compilation. Arch conditional compilation belongs in the arch/ directory. Tidy header guards to match other files. Remove unneeded includes and switch to forward declarations when necesary. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Weilin Wang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Perry Taylor Cc: Peter Zijlstra Cc: Thomas Falcon Link: https://lore.kernel.org/r/20250414174134.3095492-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 389048775abe28e7734f6e697de9238254d0931d Author: Ian Rogers Date: Fri Mar 28 10:50:06 2025 -0700 perf vendor events: Update westmereep-dp events Update event topic moving other topic events to cache and virtual memory. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-36-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 545a04dd76da278c901fb43048d3c5a9371ba3ad Author: Ian Rogers Date: Fri Mar 28 10:50:05 2025 -0700 perf vendor events: Update westmereep-dp events Update event topic moving other topic events to cache and virtual memory. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-35-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2c8e1c3526f5e920916a11aa5d34cafa78cbe9ca Author: Ian Rogers Date: Fri Mar 28 10:50:04 2025 -0700 perf vendor events: Update westmereep-dp events Update event topic moving other topic events to cache and virtual memory. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-34-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f4c0f4e3384f126526383e3d9c8ff0036c3e7a00 Author: Ian Rogers Date: Fri Mar 28 10:50:03 2025 -0700 perf vendor events: Update tigerlake metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-33-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 31661296248c464f020dcf65cb5af5edf0aeea51 Author: Ian Rogers Date: Fri Mar 28 10:50:02 2025 -0700 perf vendor events: Update snowridgex events Update event topic moving other topic events to cache and memory. Add PDIST counter into descriptions. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-32-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b8b16293ceffdc7c32104e2f32cb2c2d202321ae Author: Ian Rogers Date: Fri Mar 28 10:50:01 2025 -0700 perf vendor events: Update skylakex events/metrics Update event topics, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-31-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 60bcad55920c21b7c8a9231426271223f4ed1ed0 Author: Ian Rogers Date: Fri Mar 28 10:50:00 2025 -0700 perf vendor events: Update skylake metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-30-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b27d90f58784a6ddb4c30f9bd83b5bd0b04d0e2b Author: Ian Rogers Date: Fri Mar 28 10:49:59 2025 -0700 perf vendor events: Update sierraforest events/metrics Update events from v1.08 to v1.09. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. The use of the spreadsheet for conversion has added thresholds. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-29-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 73c66d36d0fd8ce93966ed55f371cdbd5524d3fd Author: Ian Rogers Date: Fri Mar 28 10:49:58 2025 -0700 perf vendor events: Update sapphirerapids events/metrics Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-28-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9873746f477111d79f4fcb058c9aa16cbfe67e48 Author: Ian Rogers Date: Fri Mar 28 10:49:57 2025 -0700 perf vendor events: Update sandybridge metrics Update TMA metrics from 4.8 to 5.02. Move INSTS_WRITTEN_TO_IQ.INSTS to the frontend topic. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-27-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e311e8a2d703bbd00d3c29ab0e5d0fe6f0bfeb81 Author: Ian Rogers Date: Fri Mar 28 10:49:56 2025 -0700 perf vendor events: Update rocketlake events/metrics Update event topics, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-26-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bce986466f376e82304210b1ba460b7c51cb9abd Author: Ian Rogers Date: Fri Mar 28 10:49:55 2025 -0700 perf vendor events: Update nehalemex events Update event topic moving other topic events to cache and virtual memory. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-25-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c7453cb57b6590683dc3885ad61a1a0b2e07941d Author: Ian Rogers Date: Fri Mar 28 10:49:54 2025 -0700 perf vendor events: Update nehalemep events Update event topic moving other topic events to cache and virtual memory. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-24-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8ff6e2626fd73b6fc5b82436afe5cd4549028e53 Author: Ian Rogers Date: Fri Mar 28 10:49:53 2025 -0700 perf vendor events: Update meteorlake events/metrics Update events from v1.12 to v1.13. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-23-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3af9e6879d93207af85324ca6729e9945f48937c Author: Ian Rogers Date: Fri Mar 28 10:49:52 2025 -0700 perf vendor events: Update lunarlake events/metrics Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e7972827fc2e88f5de6ad559cbcce19987ef2eaf Author: Ian Rogers Date: Fri Mar 28 10:49:51 2025 -0700 perf vendor events: Update jaketown metrics Update TMA metrics from 4.8 to 5.02. Move INSTS_WRITTEN_TO_IQ.INSTS to the frontend topic. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 61077e5e9230c7afb4e299fd0179bf0dad25d67e Author: Ian Rogers Date: Fri Mar 28 10:49:50 2025 -0700 perf vendor events: Update ivytown metrics Update TMA metrics from 4.8 to 5.02. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 49fb6e0afd09921d9ba0d595b265c5c5c8acc778 Author: Ian Rogers Date: Fri Mar 28 10:49:49 2025 -0700 perf vendor events: Update ivybridge metrics Update TMA metrics from 4.8 to 5.02. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4fdd9312444e767418d8674acfcf7f46e394439c Author: Ian Rogers Date: Fri Mar 28 10:49:48 2025 -0700 perf vendor events: Update icelakex events/metrics Update event topics, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c9208b9c3338d86536af75022dfb342e5b1d1461 Author: Ian Rogers Date: Fri Mar 28 10:49:47 2025 -0700 perf vendor events: Update icelake events/metrics Update event topics, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ed23ac434e4b3be620f1bfad58105b225810308b Author: Ian Rogers Date: Fri Mar 28 10:49:46 2025 -0700 perf vendor events: Update haswellx metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 569ab2e02029ba87fb91c69f6e781d6b44fec2ff Author: Ian Rogers Date: Fri Mar 28 10:49:45 2025 -0700 perf vendor events: Update haswell metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 82acba742dfea8f2dd3bf7696f715c9c8d292d8c Author: Ian Rogers Date: Fri Mar 28 10:49:44 2025 -0700 perf vendor events: Add graniterapids retirement latencies Add retirement latencies for use in place of retirement latency events. Update events from v1.06 to v1.08. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d1ed58570e3df52d7ba13222049e478b893808d5 Author: Ian Rogers Date: Fri Mar 28 10:49:43 2025 -0700 perf vendor events: Update grandridge events/metrics Update events from v1.05 to v1.07. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4ecf9eab4a04c75ddb7fb25a402acfda6da525bc Author: Ian Rogers Date: Fri Mar 28 10:49:42 2025 -0700 perf vendor events: Update emeraldrapids events/metrics Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fa3498cb8685e512e6f148ebcb5f44c40e42a127 Author: Ian Rogers Date: Fri Mar 28 10:49:41 2025 -0700 perf vendor events: Update elkhartlake events Update event topic moving other topic events to cache and memory. Add PDIST counter into descriptions. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c4ba122a7eb8477cc55d8dbc8652073786a20965 Author: Ian Rogers Date: Fri Mar 28 10:49:40 2025 -0700 perf vendor events: Update clearwaterforest events Update event topic of OCR.DEMAND_DATA_RD.ANY_RESPONSE and OCR.DEMAND_RFO.ANY_RESPONSE to be cache. Add PDIST counter into descriptions. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 48660e9cc9bd10eddfd64301eaf72ac85de88113 Author: Ian Rogers Date: Fri Mar 28 10:49:39 2025 -0700 perf vendor events: Update cascadelakex events/metrics Update event topics, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 29c35b735a85ea8a57fabc415b32b2b974943141 Author: Ian Rogers Date: Fri Mar 28 10:49:38 2025 -0700 perf vendor events: Update broadwellx metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 307cf0cc72ce146366ca202374984c5c05f9da0c Author: Ian Rogers Date: Fri Mar 28 10:49:37 2025 -0700 perf vendor events: Update broadwellde metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3040656ed70d07a4627aba6f85857cefa1b232a7 Author: Ian Rogers Date: Fri Mar 28 10:49:36 2025 -0700 perf vendor events: Update broadwell metrics Switch to metrics generated from the TMA spreadsheet. Minor threshold simplification. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b84b6fc35315ec2b1108d082a6772499d9bf8ba Author: Ian Rogers Date: Fri Mar 28 10:49:35 2025 -0700 perf vendor events: Update bonnell events Move DISPATCH_BLOCKED.ANY to the pipeline topic. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fd3dfa4b82df28bc78d5f7ba213ca07f5a1ab33f Author: Ian Rogers Date: Fri Mar 28 10:49:34 2025 -0700 perf vendor events: Update arrowlake events/metrics Update events from v1.07 to v1.08. Update event topics, addition of PIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4ab1fef5dc6641f8d80d93cee5faba7aa0725be3 Author: Ian Rogers Date: Fri Mar 28 10:49:33 2025 -0700 perf vendor events: Update AlderlakeN events/metrics Update events from v1.28 to v1.29. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 30f2a75e7e99ac13a62abadff28df007e65d66bc Author: Ian Rogers Date: Fri Mar 28 10:49:32 2025 -0700 perf vendor events: Update alderlake events/metrics Update events from v1.28 to v1.29. Update event topics, addition of PDIST counter into descriptions, metrics to be generated from the TMA spreadsheet and other small clean ups. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Andreas Färber Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Manivannan Sadhasivam Cc: Mark Rutland Cc: Maxime Coquelin Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Weilin Wang Link: https://lore.kernel.org/r/20250328175006.43110-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8ec8b25dde16163a7b54265623e6db66ab9ab0f2 Author: Yixun Lan Date: Thu Apr 24 17:40:49 2025 +0800 riscv: defconfig: spacemit: enable gpio support for K1 SoC Enable GPIO support, in order to activate follow-up GPIO LED, and ethernet reset pin. Signed-off-by: Yixun Lan Signed-off-by: Conor Dooley commit f92217683a44f79759d805194d6d36af1bde6e10 Author: Alexey Gladkov Date: Fri Feb 21 13:43:53 2025 +0100 tty/vt: Gather the code that outputs char with utf8 in mind When we putting character to the tty, we take into account the keyboard mode to properly handle utf8. This code is duplicated few times. Signed-off-by: Alexey Gladkov Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/c0d10193e61f977b518862d8f216bbaf234138fd.1740141518.git.legion@kernel.org Signed-off-by: Greg Kroah-Hartman commit 366cf0c3af1aac03c2bf08cf4b11f4ab9cba73e4 Author: Alexey Gladkov Date: Fri Feb 21 13:43:52 2025 +0100 tty/vt: Use KVAL instead of use bit operation The K_HANDLERS always gets KVAL as an argument. It is better to use the KVAL macro itself instead of bit operation. Signed-off-by: Alexey Gladkov Link: https://lore.kernel.org/r/4f199d90c7f0bc86bcaafd2f25da4cd006adcc80.1740141518.git.legion@kernel.org Signed-off-by: Greg Kroah-Hartman commit 31c2d3287abd2af7f7876fea4b646829afef1c36 Author: Eric Florin Date: Tue Apr 22 21:03:45 2025 -0700 staging: sm750fb: change `enum dpms` to snake_case Change the entries in `enum dpms` to snake_case in order to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/20250423040345.11323-1-ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit e0138bbbb38a2a838ff9d90eeb88ad953b608fc1 Author: JJ Strnad Date: Tue Apr 22 14:23:16 2025 -0700 staging: rtl8723bs: remove multiple blank lines Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Please don't use multiple blank lines Signed-off-by: JJ Strnad Link: https://lore.kernel.org/r/20250422212332.23170-1-strnad.jj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13f3e2c27161adc0c30c5a3ed72691e175163729 Author: Dave Penkler Date: Fri Apr 18 19:34:34 2025 +0200 staging: gpib: Set control lines in attach When the driver is attached the state of the main control lines is not defined and can lead to hangs. Set the control lines to a known state (logic false). Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-9-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 125cda86d1970572cf3d0086ad34cbae1f0c6afb Author: Dave Penkler Date: Fri Apr 18 19:34:33 2025 +0200 staging: gpib: Cleanup allocate_gpios code The function was using unnecessary variables error and retval. Simplify the code by testing for failure first and remove the redundant variables. Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-8-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 427ab512c2c8784686738ade287e5eb52bd8292a Author: Dave Penkler Date: Fri Apr 18 19:34:32 2025 +0200 staging: gpib: Change error code for no listener When doing a write a test is made to see whether there are any listeners. The code was returning ENODEV which is incorrect. The user library translates ENOTCONN to a user level no listener error code. Change the error code to ENOTCONN. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-7-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8da1ce7ec08d3079d63709ead2ab56c32f2af744 Author: Dave Penkler Date: Fri Apr 18 19:34:31 2025 +0200 staging: gpib: Remove atn_asserted global variable atn_asserted was introduced to deal with an issue where certain models of the Raspberry Pi would lose interrupts under heavy load. Using a combination of edge and level interrupts the problem was resolved so the work-around is no longer needed. This patch removes the work-around. Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-6-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit b56611d934bbd8b62ef3ee54c0edb7e0c973892d Author: Dave Penkler Date: Fri Apr 18 19:34:30 2025 +0200 staging: gpib: Remove dependency on LED subsystem The yoga pin map is compatible with the others so that its led can be used as the activity led. Using the LED subsytem required adding a dtoverlay to the boot config as well as setting up the activity led via sysfs. To simplify the setup we remove the dependency on the LED subsystem and use the on board led as for the other pin maps. Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-5-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2eab123b6e643c0a11d9bc31f8a63078bf38734d Author: Dave Penkler Date: Fri Apr 18 19:34:29 2025 +0200 staging: gpib: Enable SRQ irq on request_system_control The SRQ irq was being enabled on attach but the board is not set up to handle it until it becomes system controller. Move the enabling of the SRQ irq to bb_request_system_control. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit f56f2d6c9b6514866d489da6175a6cc9a95af02d Author: Dave Penkler Date: Fri Apr 18 19:34:28 2025 +0200 staging: gpib: Fix setting controller-in-charge The gpio board can only act as system controller. By the IEEE488.1 standard a system controller becomes controller-in-charge when it asserts the interface-clear control line. Remove the setting of controller-in-charge from bb_take_control and move it to bb_interface_clear. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ba7c33be02ca099470b3acc21f859b3be4d1d61 Author: Dave Penkler Date: Fri Apr 18 19:34:27 2025 +0200 staging: gpib: Fix request_system_control in gpio The implementation of the bb_request_system_control function confused setting controller-in-charge with becoming system-controller. Remove setting controller-in-charge and add initialization of the control lines for the system-controller role. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a7988fa4d80a49fa444f7717837ebfd35b34181 Author: Ruben Wauters Date: Fri Apr 18 16:17:50 2025 +0100 staging: sm750fb: remove irrelevant TODO line As all code referencing USE_HW_I2C and USE_DVICHIP has now been deleted, this patch removes the TODO line referencing it. Signed-off-by: Ruben Wauters Link: https://lore.kernel.org/r/20250418151755.42624-5-rubenru09@aol.com Signed-off-by: Greg Kroah-Hartman commit 8d2edd726e02ad570512159a9b97a47266ddf074 Author: Ruben Wauters Date: Fri Apr 18 16:17:49 2025 +0100 staging: sm750fb: remove ddk750_hwi2c With the removal of ddk750_sii164.c, the functions in ddk750_hwi2c are now also unused. This patch removes them and the files they are in. Signed-off-by: Ruben Wauters Link: https://lore.kernel.org/r/20250418151755.42624-4-rubenru09@aol.com Signed-off-by: Greg Kroah-Hartman commit 911ab08c0c2879c50469746dec7b3d52b3642918 Author: Ruben Wauters Date: Fri Apr 18 16:17:48 2025 +0100 staging: sm750fb: remove ddk750_dvi This file and the code present was unused in the whole driver, therefore this patch removes the file and unused reference to the header. Signed-off-by: Ruben Wauters Link: https://lore.kernel.org/r/20250418151755.42624-3-rubenru09@aol.com Signed-off-by: Greg Kroah-Hartman commit 0dbd55e96fe4afba826a8084363d1caf9f0986d5 Author: Ruben Wauters Date: Fri Apr 18 16:17:47 2025 +0100 staging: sm750fb: Remove ddk750_sii164 Removes unused functions and files ddk750_sii164. Functions were used in ddk750_dvi.c, which is itself unused. Removal will be in the second patch in the series. Signed-off-by: Ruben Wauters Link: https://lore.kernel.org/r/20250418151755.42624-2-rubenru09@aol.com Signed-off-by: Greg Kroah-Hartman commit 142ba31d8b4aff086c4f080bd97d437232922177 Author: Zijun Hu Date: Sun Apr 20 12:19:09 2025 +0800 PM: wakeup: Do not expose 4 device wakeup source APIs The following 4 APIs are only used by drivers/base/power/wakeup.c internally. - wakeup_source_create() - wakeup_source_destroy() - wakeup_source_add() - wakeup_source_remove() Do not expose them by making them as static functions. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250420-fix_power-v2-1-9b938d2283aa@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 93b27a845ec1355459e6aa539dd203a2f5136d8f Author: Jinliang Zheng Date: Tue Apr 15 23:36:59 2025 +0800 kernfs: switch global kernfs_rename_lock to per-fs lock The kernfs implementation has big lock granularity(kernfs_rename_lock) so every kernfs-based(e.g., sysfs, cgroup) fs are able to compete the lock. This patch switches the global kernfs_rename_lock to per-fs lock, which put the rwlock into kernfs_root. Signed-off-by: Jinliang Zheng Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20250415153659.14950-3-alexjlzheng@tencent.com Signed-off-by: Greg Kroah-Hartman commit cec59c440a05c241846e8fe9d2575a2dafb56fd9 Author: Jinliang Zheng Date: Tue Apr 15 23:36:58 2025 +0800 kernfs: switch global kernfs_idr_lock to per-fs lock The kernfs implementation has big lock granularity(kernfs_idr_lock) so every kernfs-based(e.g., sysfs, cgroup) fs are able to compete the lock. This patch switches the global kernfs_idr_lock to per-fs lock, which put the spinlock into kernfs_root. Signed-off-by: Jinliang Zheng Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20250415153659.14950-2-alexjlzheng@tencent.com Signed-off-by: Greg Kroah-Hartman commit 2806c6b8f3d1e406f2b7e3266ddd21100fbe7151 Author: Dan Carpenter Date: Wed Apr 23 13:04:26 2025 +0300 driver core: auxiliary bus: Fix IS_ERR() vs NULL mixup in __devm_auxiliary_device_create() This code was originally going to use error pointers but we decided it should return NULL instead. The error pointer code in __devm_auxiliary_device_create() was left over from the first version. Update it to use NULL. No callers have been merged yet, so that makes this change simple and self contained. Fixes: eaa0d30216c1 ("driver core: auxiliary bus: add device creation helpers") Signed-off-by: Dan Carpenter Reviewed-by: Jerome Brunet Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/aAi7Kg3aTguFD0fU@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit 77feb17c950e03dd0c0d4a64642f3e658679fe3c Author: Dan Carpenter Date: Wed Apr 23 20:22:05 2025 +0300 rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send() The "ret" variable isn't initialized if we don't enter the loop. For example, if "channel->state" is not SMD_CHANNEL_OPENED. Fixes: 33e3820dda88 ("rpmsg: smd: Use spinlock in tx path") Reported-by: Linux Kernel Functional Testing Reviewed-by: Abel Vesa Tested-by: Naresh Kamboju Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/aAkhvV0nSbrsef1P@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit 45f0de4f8dc385cd8959d884cd89b3b84c76b7f9 Author: Thadeu Lima de Souza Cascardo Date: Wed Apr 23 05:45:43 2025 -0300 char: misc: add test cases Add test cases for static and dynamic minor number allocation and deallocation. While at it, improve description and test suite name. Some of the cases include: - that static and dynamic allocation reserved the expected minors. - that registering duplicate minors or duplicate names will fail. - that failing to create a sysfs file (due to duplicate names) will deallocate the dynamic minor correctly. - that dynamic allocation does not allocate a minor number in the static range. - that there are no collisions when mixing dynamic and static allocations. - that opening devices with various minor device numbers work. - that registering a static number in the dynamic range won't conflict with a dynamic allocation. This last test verifies the bug fixed by commit 6d04d2b554b1 ("misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors") has not regressed. Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/r/20250423-misc-dynrange-v4-2-133b5ae4ca18@igalia.com Signed-off-by: Greg Kroah-Hartman commit 31b636d2c41613e3bd36256a4bd53e9dacfa2677 Author: Thadeu Lima de Souza Cascardo Date: Wed Apr 23 05:45:42 2025 -0300 char: misc: restrict the dynamic range to exclude reserved minors When this was first reported [1], the possibility of having sufficient number of dynamic misc devices was theoretical, in the case of dlm driver. In practice, its userspace never created more than one device. What we know from commit ab760791c0cf ("char: misc: Increase the maximum number of dynamic misc devices to 1048448"), is that the miscdevice interface has been used for allocating more than the single-shot devices it was designed for. And it is not only coresight_tmc, but many other drivers are able to create multiple devices. On systems like the ones described in the above commit, it is certain that the dynamic allocation will allocate certain reserved minor numbers, leading to failures when a later driver tries to claim its reserved number. Instead of excluding the historically statically allocated range from dynamic allocation, restrict the latter to minors above 255. That also removes the need for DYNAMIC_MINORS and the convolution in allocating minor numbers, simplifying the code. Since commit ab760791c0cf ("char: misc: Increase the maximum number of dynamic misc devices to 1048448") has been applied, such range is already possible. And given such devices already need to be dynamically created, there should be no systems where this might become a problem. [1] https://lore.kernel.org/all/1257813017-28598-3-git-send-email-cascardo@holoscopio.com/ Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/r/20250423-misc-dynrange-v4-1-133b5ae4ca18@igalia.com Signed-off-by: Greg Kroah-Hartman commit d0fd663a0b0a64436a92ef8321de5e9d049b6e04 Author: Sasha Levin Date: Mon Apr 21 09:59:15 2025 -0400 git-resolve: add SPDX and copyright line I forgot to include it when I've originally submitted the script. Fixes: 7ae52a3d7f51 ("scripts: Add git-resolve tool for full SHA-1 resolution") Signed-off-by: Sasha Levin Link: https://lore.kernel.org/r/20250421135915.1915062-1-sashal@kernel.org Signed-off-by: Greg Kroah-Hartman commit 93bb9e5c02c59198e8a0216eb895ceb9e20bb52f Author: Philipp Stanner Date: Thu Apr 17 11:15:33 2025 +0200 misc: cardreader: Return -EBUSY if regions are busy cardreader returns -ENOMEM if a PCI region is currently in use ("requested") by another driver. The proper return code for this is -EBUSY. Replace -ENOMEM with -EBUSY. Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417091532.26520-3-phasta@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6813fc8d0d235a3966de23ec2b82bfe3f3aa52bd Author: Philipp Stanner Date: Thu Apr 17 11:15:32 2025 +0200 misc: cardreader: Use non-hybrid PCI devres API cardreader enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Moreover, since both functions are already managed in this driver, the calls to pci_release_regions() are unnecessary. Remove the calls to pci_release_regions(). Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417091532.26520-2-phasta@kernel.org Signed-off-by: Greg Kroah-Hartman commit dbc8c84d5c2e200c79393c17896bdc65e6daef30 Author: Dr. David Alan Gilbert Date: Sun Apr 20 15:57:39 2025 +0100 misc: rtsx: Remove deadcode The last uses of rtsx_ms_power_off_card3v3() and rtsx_sd_power_off_card3v3() were removed by 2019's commit bede03a579b3 ("misc: rtsx: Enable OCP for rts522a rts524a rts525a rts5260") The last use of rtsx_pci_transfer_data() was removed by 2024's commit d0f459259c13 ("memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver") Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250420145739.58337-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 2a87a55f2281a1096d9e77ac6309b9128c107d97 Author: Jiri Slaby (SUSE) Date: Tue Apr 15 12:47:34 2025 +0200 irqdomain: cdx: Switch to of_fwnode_handle() of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Nipun Gupta Cc: Nikhil Agarwal Acked-by: Nipun Gupta Link: https://lore.kernel.org/r/20250415104734.106849-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit fd1575e28a325b9b43fb4e182d1ee001b360f040 Author: Ian Abbott Date: Tue Apr 15 12:35:59 2025 +0100 comedi: allocate DMA coherent buffer as individual pages Depending on the driver, the acquisition buffer is allocated either from normal memory, or from DMA coherent memory. For normal memory, the buffer is allocated as individual pages, but for DMA coherent memory, it is allocated as a single block. Prior to commit e36472145aa7 ("staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap"), the buffer was allocated as individual pages for DMA coherent memory too, but that was changed to allocate it as a single block to allow `dma_mmap_coherent()` to be used to mmap it, because that requires the pages being mmap'ed to be contiguous. This patch allocates the buffer from DMA coherent memory a page at a time again, and works around the limitation of `dma_mmap_coherent()` by calling it in a loop for each page, with temporarily modified `vm_start` and `vm_end` values in the VMA. (The `vm_pgoff` value is 0.) Cc: Christoph Hellwig Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250415114008.5977-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 5117f28a7d78d00a44d03463115a0f295dbbb1ff Author: Ian Abbott Date: Tue Apr 15 12:35:58 2025 +0100 comedi: remove the mapping of the Comedi buffer in vmalloc address space Now that all the code that accesses the Comedi buffer data does so page-by-page, using the `virt_addr` member of `struct comedi_buf_page` to point to the data of each page, do not linearly map the buffer into vmalloc address space (pointed to by the `prealloc_buf` member of `struct comedi_async`). That was only done for convenience, but was not done for those drivers that need a DMA coherent buffer, which is allocated in a single chunk. Remove the `prealloc_buf` member as it is no longer used. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250415114008.5977-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit e7199b6b591eead7dc516a639a5b618f1e3cd207 Author: Ian Abbott Date: Tue Apr 15 12:35:57 2025 +0100 comedi: access buffer data page-by-page The aim is to get rid of the `prealloc_buf` member of `struct comedi_async` and access the buffer contents on a page-by-page basis using the addresses in the `virt_addr` member of `struct comedi_buf_page`. This will allow us to eliminate a `vmap()` that maps the whole buffer. Since the buffer pages have non-consecutive `virt_addr` addresses in virtual memory (except for drivers using DMA), change the loops that access buffer data to access it page-by-page. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250415114008.5977-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit cb0dde4d058b1fe7fc80d851b16c6687f461214b Author: Ian Abbott Date: Tue Apr 15 12:35:56 2025 +0100 comedi: ni_pcidio: Do not bother filling buffer with 0xaa byte values On buffer change, the driver informs the mite module about the buffer change and then it fills the buffer with byte value `0xaa` using `memset()`. Do not bother filling the buffer. None of the other Comedi drivers do this. The aim is to get rid of the `prealloc_buf` member of `struct comedi_async` (which is from a `vmap()` covering the whole buffer in those Comedi drivers that do not use DMA), and use the per-buffer-page addresses from the `virt_addr` member of `struct comedi_buf_page` to access the buffer contents instead. (If necessary, we could add a `comedi_buf_memset()` function to fill the buffer with a byte value, but it's not worth it in this case.) Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20250415114008.5977-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 9f4c9ec158fa8fa4afcdbcbff9c9a9a900dc9c2f Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:07 2025 +0200 hwmon: (oxp-sensors) Add all OneXFly variants Currently, the driver only has the F1 OneXFly variant, which was based on the 7000 AMD platform. Add its special editions: F1 EVA-01, F1 OLED. F1 OLED might have been a dev unit, but it is supported by OneXConsole with the same features so add it. Then add the F1L variant which is based on the 8000 AMD platform and the F1Pro and its special edition EVA-02. One might ask why not just fuzzy match. Well, EVA-02 is a variant of F1Pro which is a Strix Point handheld, but does not have F1Pro in its name. This makes it risky to fuzzy match, as special variants in the future from different platforms might not have the same feature set or registers. By happenstance, all current devices use the same registers. For the charge limitting feature on this series, only F1Pro/X1 (AMD) were released with it, but OneXPlayer is providing bios updates for F1, F1L, X1 Mini units that use the same register, so treat all of them the same. Acked-by: Guenter Roeck Reviewed-by: Thomas Weißschuh Reviewed-by: Derek J. Clark Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-3-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 217d55ca13d22ba6af7e96ac2d28c2ef6927fc54 Author: Antheas Kapenekakis Date: Fri Apr 25 13:18:06 2025 +0200 hwmon: (oxp-sensors) Distinguish the X1 variants Currently, the oxp-sensors driver fuzzy matches the X1 variants. Luckily, X1 and X1 mini share most hardware features so this works. However, they are completely different product lines, and there is an expectation that OneXPlayer will release more devices in the X1 line that may have differences. Therefore, distinguish the 3 devices that currently exist in the market. These are the OneXPlayer X1 AMD and Intel variants, and the X1 mini which only has an AMD variant. As far as registers go, all three support the current driver functionality. Reviewed-by: Derek J. Clark Acked-by: Guenter Roeck Reviewed-by: Thomas Weißschuh Reviewed-by: Ilpo Järvinen Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250425111821.88746-2-lkml@antheas.dev Signed-off-by: Ilpo Järvinen commit 398a1b33f1479af35ca915c5efc9b00d6204f8fa Author: Wentao Liang Date: Tue Apr 22 11:07:39 2025 +0800 media: gspca: Add error handling for stv06xx_read_sensor() In hdcs_init(), the return value of stv06xx_read_sensor() needs to be checked. A proper implementation can be found in vv6410_dump(). Add a check in loop condition and propergate error code to fix this issue. Fixes: 4c98834addfe ("V4L/DVB (10048): gspca - stv06xx: New subdriver.") Cc: stable@vger.kernel.org # v2.6+ Signed-off-by: Wentao Liang Signed-off-by: Hans Verkuil commit bd9f6ce7d512fa21249415c16af801a4ed5d97b6 Author: Wentao Liang Date: Tue Apr 22 10:13:45 2025 +0800 media: platform: exynos4-is: Add hardware sync wait to fimc_is_hw_change_mode() In fimc_is_hw_change_mode(), the function changes camera modes without waiting for hardware completion, risking corrupted data or system hangs if subsequent operations proceed before the hardware is ready. Add fimc_is_hw_wait_intmsr0_intmsd0() after mode configuration, ensuring hardware state synchronization and stable interrupt handling. Signed-off-by: Wentao Liang Signed-off-by: Hans Verkuil commit a93f42c77100c3ef03529cdc558ec93bc8f49871 Author: Dmitry Baryshkov Date: Thu Apr 17 01:46:01 2025 +0300 media: adv7511-v4l2: use constants for BT.2020 colorimetry Replace numeric values with constants from hdmi.h. Signed-off-by: Dmitry Baryshkov Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil commit 024bf40edf1155e7a587f0ec46294049777d9b02 Author: Dmitry Nikiforov Date: Wed Apr 16 23:51:19 2025 +0300 media: davinci: vpif: Fix memory leak in probe error path If an error occurs during the initialization of `pdev_display`, the allocated platform device `pdev_capture` is not released properly, leading to a memory leak. Adjust error path handling to fix the leak. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 43acb728bbc4 ("media: davinci: vpif: fix use-after-free on driver unbind") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Nikiforov Reviewed-by: Johan Hovold Signed-off-by: Hans Verkuil commit 974a8ab3bf2f2760375fa78561f85d8726740012 Author: Andrew Kreimer Date: Tue Apr 15 15:38:55 2025 +0300 media: dvb: Fix typos bloc -> block There are some typos in comments / dprintk messages: bloc -> block. Fix them via codespell. Signed-off-by: Andrew Kreimer Signed-off-by: Hans Verkuil commit f83ac8d30c43fd902af7c84c480f216157b60ef0 Author: Denis Arefev Date: Tue Apr 15 11:27:21 2025 +0300 media: vivid: Change the siize of the composing syzkaller found a bug: BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2608 [inline] BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x1a9c/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705 Write of size 1440 at addr ffffc9000d0ffda0 by task vivid-000-vid-c/5304 CPU: 0 UID: 0 PID: 5304 Comm: vivid-000-vid-c Not tainted 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2608 [inline] tpg_fill_plane_buffer+0x1a9c/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705 vivid_fillbuff drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 [inline] vivid_thread_vid_cap_tick+0xf8e/0x60d0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:629 vivid_thread_vid_cap+0x8aa/0xf30 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:767 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The composition size cannot be larger than the size of fmt_cap_rect. So execute v4l2_rect_map_inside() even if has_compose_cap == 0. Fixes: 94a7ad928346 ("media: vivid: fix compose size exceed boundary") Cc: stable@vger.kernel.org Reported-by: syzbot+365005005522b70a36f2@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?id=8ed8e8cc30cbe0d86c9a25bd1d6a5775129b8ea3 Signed-off-by: Denis Arefev Signed-off-by: Hans Verkuil commit 5bc68bd3826e573f9a83c82c5107536cf616fea8 Author: Aaron Kling Date: Sun Apr 13 14:35:32 2025 -0500 media: dt-bindings: Document Tegra186 and Tegra194 cec These are already used in device trees, so describe them here. As the driver only declares up through Tegra210, these must use a fallback compatible of tegra210-cec. Acked-by: Krzysztof Kozlowski Signed-off-by: Aaron Kling Signed-off-by: Hans Verkuil commit 051e634ee4ceed611c7162ef22563c6acef591f5 Author: Biju Das Date: Thu Apr 10 06:52:21 2025 +0100 media: platform: exynos4-is: Use of_get_available_child_by_name() Simplify fimc_md_is_isp_available() by using of_get_available_child_by_name(). Reviewed-by: Krzysztof Kozlowski Signed-off-by: Biju Das Signed-off-by: Hans Verkuil commit 29c71dc4c83208b32dfa55778f3a99165691cdcb Author: Ken Lin Date: Thu Apr 10 11:03:59 2025 +0800 media: platform: cros-ec: Add Moxie to the match table The Google Moxie device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Ken Lin Signed-off-by: Hans Verkuil commit 8b807366d85092862c0233914d62a45ea32702f1 Author: Raag Jadav Date: Wed Apr 9 14:17:38 2025 +0530 media: stm32-dcmi: use devm_kmemdup_array() Convert to use devm_kmemdup_array() and while at it, make the size robust against type changes. Signed-off-by: Raag Jadav Signed-off-by: Hans Verkuil commit 8fc0ef066b8baa43572520725f18afffd83ce59b Author: Raag Jadav Date: Wed Apr 9 14:17:37 2025 +0530 media: atmel-isi: use devm_kmemdup_array() Convert to use devm_kmemdup_array() and while at it, make the size robust against type changes. Signed-off-by: Raag Jadav Signed-off-by: Hans Verkuil commit 2226b2dd42c59dff5f7de35afe5c0cc1a674b085 Author: Martin Tůma Date: Tue Apr 8 15:21:55 2025 +0200 media: mgb4: Enumerate only the available timings Enumerate only the available (as given by the input source) timings, not all theoretically possible. Signed-off-by: Martin Tůma Signed-off-by: Hans Verkuil commit e2ff3200065283b795f9800b9e03a93dd0d9f7e3 Author: Michael Chang Date: Tue Apr 8 13:54:54 2025 +0800 media: nuvoton: npcm-video: Prevent returning unsupported resolutions To restrict the returned resolution due to Nuvoton SoC hardware limitations. Signed-off-by: Michael Chang Signed-off-by: Hans Verkuil commit 497f1fb94759fa0c638f15c12b1ab3e586bccfcb Author: Michael Chang Date: Tue Apr 8 13:48:39 2025 +0800 media: nuvoton: npcm-video: Fix stuck due to no video signal error Fix the issue when start_frame and detect_resolution functions are executed at the same time, which may cause driver stops capturing due to status of no video signal error. Signed-off-by: Michael Chang Signed-off-by: Hans Verkuil commit a9076609e14988a0a99bb4992998e688652604b4 Author: Kells Ping Date: Tue Apr 8 10:53:09 2025 +0800 media: platform: cros-ec: Add Dirks to the match table The Google Dirks device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Kells Ping Signed-off-by: Hans Verkuil commit e6fd3d81dba13c7c8a244e15db0f1e37f4ed21ab Author: Martin Tůma Date: Mon Apr 7 17:50:35 2025 +0200 media: mgb4: Fix resolution change events triggering Always generate the resolution change event when the HW reports it and only discard the streaming termination in case the new resolution is the same as the old one. The old logic prevented events on "no signal" -> "valid resolution" transitions as VIDIOC_QUERY_DV_TIMINGS never updates the timings when there is no signal present. Signed-off-by: Martin Tůma Signed-off-by: Hans Verkuil commit 73fb3b92da84637e3817580fa205d48065924e15 Author: Edward Adam Davis Date: Sat Apr 5 19:56:41 2025 +0800 media: cxusb: no longer judge rbuf when the write fails syzbot reported a uninit-value in cxusb_i2c_xfer. [1] Only when the write operation of usb_bulk_msg() in dvb_usb_generic_rw() succeeds and rlen is greater than 0, the read operation of usb_bulk_msg() will be executed to read rlen bytes of data from the dvb device into the rbuf. In this case, although rlen is 1, the write operation failed which resulted in the dvb read operation not being executed, and ultimately variable i was not initialized. [1] BUG: KMSAN: uninit-value in cxusb_gpio_tuner drivers/media/usb/dvb-usb/cxusb.c:124 [inline] BUG: KMSAN: uninit-value in cxusb_i2c_xfer+0x153a/0x1a60 drivers/media/usb/dvb-usb/cxusb.c:196 cxusb_gpio_tuner drivers/media/usb/dvb-usb/cxusb.c:124 [inline] cxusb_i2c_xfer+0x153a/0x1a60 drivers/media/usb/dvb-usb/cxusb.c:196 __i2c_transfer+0xe25/0x3150 drivers/i2c/i2c-core-base.c:-1 i2c_transfer+0x317/0x4a0 drivers/i2c/i2c-core-base.c:2315 i2c_transfer_buffer_flags+0x125/0x1e0 drivers/i2c/i2c-core-base.c:2343 i2c_master_send include/linux/i2c.h:109 [inline] i2cdev_write+0x210/0x280 drivers/i2c/i2c-dev.c:183 do_loop_readv_writev fs/read_write.c:848 [inline] vfs_writev+0x963/0x14e0 fs/read_write.c:1057 do_writev+0x247/0x5c0 fs/read_write.c:1101 __do_sys_writev fs/read_write.c:1169 [inline] __se_sys_writev fs/read_write.c:1166 [inline] __x64_sys_writev+0x98/0xe0 fs/read_write.c:1166 x64_sys_call+0x2229/0x3c80 arch/x86/include/generated/asm/syscalls_64.h:21 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Reported-by: syzbot+526bd95c0ec629993bf3@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=526bd95c0ec629993bf3 Tested-by: syzbot+526bd95c0ec629993bf3@syzkaller.appspotmail.com Fixes: 22c6d93a7310 ("[PATCH] dvb: usb: support Medion hybrid USB2.0 DVB-T/analogue box") Cc: stable@vger.kernel.org Signed-off-by: Edward Adam Davis Signed-off-by: Hans Verkuil commit f8a1082ecb5d6e6a8c4ee2b0d465b16c1f8e735c Author: Philipp Stanner Date: Fri Apr 4 15:53:45 2025 +0200 media: tw5864: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. pcim_iomap_regions(), furthermore, has so far wrongly been passed the device's name instead of the driver's name, which makes that function's debug prints useless. Replace the deprecated function with pcim_iomap_region(). Define the driver name globally and use it where appropriate. Signed-off-by: Philipp Stanner Signed-off-by: Hans Verkuil commit bd2ad1a08a4c65cbb4dbf30c553a57be8439df5d Author: Philipp Stanner Date: Fri Apr 4 15:53:44 2025 +0200 media: solo6x10: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Hans Verkuil commit 32b38fbf6401e87d82f0173a772218f121257cb2 Author: Philipp Stanner Date: Fri Apr 4 15:53:42 2025 +0200 media: pt3: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Tested-by: Akihiro Tsukada Signed-off-by: Hans Verkuil commit 5edc9b560f60c40e658af0b8e98ae2dfadc438d8 Author: Hans Verkuil Date: Tue Apr 1 14:17:55 2025 +0000 media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation Fix gcc8 warning: drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c:1014:44: warning: 'DCEC' directive output may be truncated writing 4 bytes into a region of size between 0 and 53 [-Wformat-truncation=] Resizing the 'buf' and 'cmd' arrays fixed the warning. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit a898d2ea7e78614fdbfcc4c7b5ca60509deb0370 Author: Ricardo Ribalda Date: Tue Apr 1 14:17:54 2025 +0000 media: atomisp: Fix Wformat-truncation warning Gcc8 is convinced that we do not have enough space in dot_id_input_bin. Extend the variable 17 bytes which is just used for debugging. drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:1336:9: warning: '(pipe' directive output may be truncated writing 5 bytes into a region of size between 1 and 74 [-Wformat-truncation=] Signed-off-by: Ricardo Ribalda Reviewed-by: Andy Shevchenko Signed-off-by: Hans Verkuil commit 3d622ba277bdffd38c8179b5ebcea99206f39151 Author: Michał Mirosław Date: Fri Mar 28 23:05:27 2025 +0100 media: videobuf2: check constants during build time There is nothing a driver author can do fix in the driver to make the global constants match. Since the assertion can be verified at build time, don't return EINVAL at runtime for it. Signed-off-by: Michał Mirosław Acked-by: Marek Szyprowski Signed-off-by: Hans Verkuil commit 7ca9a4d9bdc30e148d3096db23e689ffe4f548c1 Author: Ricardo Ribalda Date: Fri Mar 14 12:39:41 2025 +0000 media: vivid: Add more webcam resolutions Add 3 more common resolution for webcams. This is required to increase the test coverage of unit tests based on vivid. Co-developed-by: Hidenori Kobayashi Signed-off-by: Hidenori Kobayashi Signed-off-by: Ricardo Ribalda Tested-by: Hidenori Kobayashi # v4l2-compliance, Signed-off-by: Hans Verkuil commit ca7af8040ed1a2a034d6fecd8a8c0ddbf819a1bf Author: Ricardo Ribalda Date: Fri Mar 14 12:39:40 2025 +0000 media: vivid: Fix requirement about webcam_intervals Since commit f0b4a2c037c0 ("media: vivid: Extend FPS rates offered by simulated webcam") we do not require twice as many intervals as sizes. In fact, now we have 13 intervals and 6 sizes. Fix the comment. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 1a27fce0fa79ef32c37f7e1b2d49357da7f2e2b2 Author: Martin Tůma Date: Tue Mar 11 18:31:41 2025 +0100 docs: media: mgb4: Improve mgb4 driver documentation Add some basic info about the HW/driver + contact info. Signed-off-by: Martin Tůma Signed-off-by: Hans Verkuil commit 1d5f88f053480326873115092bc116b7d14916ba Author: Edward Adam Davis Date: Tue Mar 11 15:20:14 2025 +0800 media: vidtv: Terminating the subsequent process of initialization failure syzbot reported a slab-use-after-free Read in vidtv_mux_init. [1] After PSI initialization fails, the si member is accessed again, resulting in this uaf. After si initialization fails, the subsequent process needs to be exited. [1] BUG: KASAN: slab-use-after-free in vidtv_mux_pid_ctx_init drivers/media/test-drivers/vidtv/vidtv_mux.c:78 [inline] BUG: KASAN: slab-use-after-free in vidtv_mux_init+0xac2/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:524 Read of size 8 at addr ffff88802fa42acc by task syz.2.37/6059 CPU: 0 UID: 0 PID: 6059 Comm: syz.2.37 Not tainted 6.14.0-rc5-syzkaller #0 Hardware name: Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xd9/0x110 mm/kasan/report.c:634 vidtv_mux_pid_ctx_init drivers/media/test-drivers/vidtv/vidtv_mux.c:78 vidtv_mux_init+0xac2/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:524 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call+0x151f/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f871d58d169 Code: Unable to access opcode bytes at 0x7f871d58d13f. RSP: 002b:00007fff4b19a788 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f871d58d169 RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fff4b19a7ec R08: 0000000b4b19a87f R09: 00000000000927c0 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000003 R13: 00000000000927c0 R14: 000000000001d553 R15: 00007fff4b19a840 Allocated by task 6059: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] vidtv_psi_pat_table_init drivers/media/test-drivers/vidtv/vidtv_psi.c:970 vidtv_channel_si_init drivers/media/test-drivers/vidtv/vidtv_channel.c:423 vidtv_mux_init drivers/media/test-drivers/vidtv/vidtv_mux.c:519 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6059: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x2c4/0x4d0 mm/slub.c:4757 vidtv_channel_si_init drivers/media/test-drivers/vidtv/vidtv_channel.c:499 vidtv_mux_init drivers/media/test-drivers/vidtv/vidtv_mux.c:519 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 3be8037960bc ("media: vidtv: add error checks") Cc: stable@vger.kernel.org Reported-by: syzbot+0d33ab192bd50b6c91e6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=0d33ab192bd50b6c91e6 Signed-off-by: Edward Adam Davis Signed-off-by: Hans Verkuil commit c1c01458af573a0c33058117fdaf62146031c0fa Author: Dr. David Alan Gilbert Date: Sun Mar 9 00:14:31 2025 +0000 media: pvrusb2: Remove unused pvr2_std_create_enum pvr2_std_create_enum() has been unused since 2012's commit c0bb609fdc0b ("[media] pvrusb2: Get rid of obsolete code for video standard enumeration") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 728c0d50994764a3783ce4993b54e4e2855aab3b Author: Aakarsh Jain Date: Wed Mar 5 11:23:08 2025 +0530 media: s5p-mfc: Support for handling RET_ENC_BUFFER_FULL interrupt When output encoded buffer size provided by userspace is insufficient with current encoding parameters, it leads to RET_ENC_BUFFER_FULL interrupt which was not handled in IRQ handler. On handling of RET_ENC_BUFFER_FULL interrupt leads to NAL_ABORT command from host to risc which in turn leads to RET_NAL_ABORT interrupt. On receiving RET_NAL_ABORT driver clears workbit and VB2 queues for cleaner closing of MFC instance. When user encounters "Call on DQBUF after unrecoverable error", userspace should close fd and restart with larger output encoder buffer size. Signed-off-by: Aakarsh Jain Acked-by: Marek Szyprowski Signed-off-by: Hans Verkuil commit c09acbbfff2037fe594396388e0c28eeeca79012 Author: Matthew Majewski Date: Tue Mar 4 14:17:01 2025 -0500 media: vim2m: Add parametized support for multiplanar API Add support for the mulitiplaner API. The device can now act as either a multi-planar or a single-planar device depending on a module parameter, similar to the way vivid behaves. Multiplanar support was added by implementing the appropate try/get/set mplane functions, and by modifying the queue_setup() and buf_prepare() functions to handle multiple planes. Implementation was inspired by vivid. Signed-off-by: Matthew Majewski Signed-off-by: Hans Verkuil commit bbd0df9bfe1c085bf9b0a315dd5fb58e491dfa5b Author: Matthew Majewski Date: Tue Mar 4 14:17:00 2025 -0500 media: vim2m: Simplify try_fmt Clean up vidioc_try_fmt with the following changes: 1. remove unsused vim2m_fmt parameter 2. use clamp() macro to restrain width/height bounds 3. use ALIGN() macro to align width/height 4. use v4l2_fill_pixfmt to set bytesperline/sizeimage Signed-off-by: Matthew Majewski Signed-off-by: Hans Verkuil commit df8375bbe2d5bb6d7f86701b15426674f2529a18 Author: Matthew Majewski Date: Tue Mar 4 14:16:59 2025 -0500 media: v4l2-common: Add RGBR format info Add missing RGBR entry in the v4l2_format_info[] table. RGBR has identical format information to RGBP, as it is a big endian variant of RGB-5-6-5 pixel encoding according to the description in videodev2.h. Signed-off-by: Matthew Majewski Signed-off-by: Hans Verkuil commit 29d69273fefd0bc2a66b5e22f3a4a4c7a53bfa02 Author: Lukas Bulwahn Date: Mon Mar 3 11:30:22 2025 +0100 media: remove STA2x11 media pci driver With commit dcbb01fbb7ae ("x86/pci: Remove old STA2x11 support"), the STA2X11 Video Input Port driver is not needed and cannot be built anymore. Remove the driver and its reference in media documentation. Signed-off-by: Lukas Bulwahn Signed-off-by: Hans Verkuil commit 3e830f657f69ab6a4822d72ec2f364c6d51beef8 Author: Kan Liang Date: Thu Apr 24 06:47:17 2025 -0700 perf/x86: Optimize the is_x86_event The current is_x86_event has to go through the hybrid_pmus list to find the matched pmu, then check if it's a X86 PMU and a X86 event. It's not necessary. The X86 PMU has a unique type ID on a non-hybrid machine, and a unique capability type. They are good enough to do the check. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250424134718.311934-5-kan.liang@linux.intel.com commit efd448540e6243dbdaf0a7e1bcf49734e73f3c93 Author: Kan Liang Date: Thu Apr 24 06:47:16 2025 -0700 perf/x86/intel: Check the X86 leader for ACR group The auto counter reload group also requires a group flag in the leader. The leader must be a X86 event. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250424134718.311934-4-kan.liang@linux.intel.com commit f51972e6f8b9a737b2b3eb588069acb538fa72de Author: Qing Wang Date: Sat Apr 5 22:16:35 2025 +0800 perf/core: Fix broken throttling when max_samples_per_tick=1 According to the throttling mechanism, the pmu interrupts number can not exceed the max_samples_per_tick in one tick. But this mechanism is ineffective when max_samples_per_tick=1, because the throttling check is skipped during the first interrupt and only performed when the second interrupt arrives. Perhaps this bug may cause little influence in one tick, but if in a larger time scale, the problem can not be underestimated. When max_samples_per_tick = 1: Allowed-interrupts-per-second max-samples-per-second default-HZ ARCH 200 100 100 X86 500 250 250 ARM64 ... Obviously, the pmu interrupt number far exceed the user's expect. Fixes: e050e3f0a71b ("perf: Fix broken interrupt rate throttling") Signed-off-by: Qing Wang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250405141635.243786-3-wangqing7171@gmail.com commit 1caafd919e2a5c483f7a27449f8497fa4b15a44f Merge: 2492e5aba2be06 7da9960b59fb7e Author: Peter Zijlstra Date: Fri Apr 25 14:55:20 2025 +0200 Merge branch 'perf/urgent' Merge urgent fixes for dependencies. Signed-off-by: Peter Zijlstra commit 26104d81567376b2038c4f52c90d849ee32639a9 Author: Chen Ni Date: Thu Apr 10 15:56:35 2025 +0800 tee: optee: smc: remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 8bca84bccb45fbbb412ca1a3f632b6cd7b60f514 Merge: 9c32cda43eb78f cde89fdfdf1821 Author: Rafael J. Wysocki Date: Fri Apr 25 14:43:31 2025 +0200 Merge back earlier ACPICA material for 6.16 commit 0787a08ae785366b9473905fc8bf23f165a08b8d Author: Thorsten Blum Date: Thu Apr 24 15:36:49 2025 +0200 ASoC: starfive: Use max() to simplify code in jh7110_tdm_syncdiv() Use max() to simplify jh7110_tdm_syncdiv() and improve its readability. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250424133648.86459-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit 4814a8e03a18d44ab4df77bd79a9fe224e0e2abc Author: Kuninori Morimoto Date: Mon Apr 14 01:00:45 2025 +0000 ASoC: fsl: don't set link->platform if not needed imx_card_parse_of() allocs 2 components for CPU/Platform (A) static int imx_card_parse_of(...) { ... for_each_child_of_node(...) { dlc = devm_kzalloc(...); ... link->cpus = &dlc[0]; (A) link->platforms = &dlc[1]; } ... } The link might be used as DPCM backend, in such case, link->plaforms will be not used. The driver overwrite it as Dummy DAI (B). } else if (!strncmp(link->name, "HiFi-ASRC-BE", 12)) { /* DPCM backend */ link->no_pcm = 1; link->platforms->of_node = NULL; (B) link->platforms->name = "snd-soc-dummy"; } If it was not used for generic DMAEngine, we can just remove it. By this patch, created dlc (A) will be just wasted, but it won't leak. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87cydfr1z6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 10fc30eaf381cc8a6351129d7a48c4bf979f6002 Author: Geert Uytterhoeven Date: Wed Feb 5 11:46:37 2025 +0100 docs: dt: Update overlay file extension Building DTB overlays from .dts files is no longer supported. Update the documentation to reflect this. Fixes: 81d362732bac05f6 ("kbuild: Disallow DTB overlays to built from .dts named source files") Signed-off-by: Geert Uytterhoeven Acked-by: Andrew Davis Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/ebce4d9591dd0259a636196dda31d40901dc04b0.1738752288.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) commit 7ba4f02e12e6f2409c5b2afae2963089b5673482 Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:15 2025 +0200 serial: 8250: unexport serial8250_rpm_*() functions Since commit 8700a7ea5519 (serial: 8250_omap: Drop pm_runtime_irq_safe()), all the serial8250_rpm_*() functions are used solely in 8250_port. Unexport them. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2b369a1e9930ef6c13858b0ed082401d731e4936 Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:14 2025 +0200 serial: use uart_port_ref_lock() helper uart_get_icount() and uart_carrier_raised() open code uart_port_ref_lock(). Use the helper instead. The difference is we use _irqsave() variants of a spinlock now. But that's "safer" than _irq(). Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 31e0b7863c9bf97bc3a6d735cb4956c929134a80 Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:13 2025 +0200 serial: rename local uart_port_lock() -> uart_port_ref_lock() uart_port_lock() and uart_port_unlock() are (at the same time) defined as: * functions in include/linux/serial_core.h * macros in drivers/tty/serial/serial_core.c The former are sane uart port lock wrappers. The latter _lock() does something completely different: it inspects a uart_state, obtains a uart_port from it, and increases its reference count. And if that all succeeded, the port is locked too. Similarly, the _unlock() counterpart first unlocks and then decrements the refcount too. This state is REALLY CONFUSING. So rename the latter (local .c macros): * uart_port_lock() -> uart_port_ref_lock(), and * uart_port_unlock() -> uart_port_unlock_deref(). Now, the forbidden while-at-it part: convert from a macro to an inline -- do it here as the passed 'flags' have to be pointer to ulong now. So we avoid doubled changes on identical LOCs. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1404d3509c768732be51d0acf8330689936a692a Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:12 2025 +0200 serial: switch uart_port::iotype to enum uart_iotype The inline-defined constants look weird. Instead, define a proper enum for them and type uart_port::iotype as that enum. This allows for proper checking in switch-case labels (somewhere, a default or UPIO_UNKNOWN label needs to be added/handled). Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f49573f2f53e0f6f74a58895437a46580d1a0033 Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:11 2025 +0200 tty: use lock guard()s in tty_io guard()s and scoped_guard()s express more clearly what is protected by locks. And also makes the code cleaner as it can return immediately in case of short returns. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3eabc1a34b95c39c698fd659babdfd9af05ef845 Author: Jiri Slaby (SUSE) Date: Fri Apr 25 13:13:10 2025 +0200 tty: simplify throttling using guard()s tty_throttle_safe() and tty_unthrottle_safe can be made less convoluted using guard()s. Switch them. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20250425111315.1036184-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e6afad4587c9b40a98cf26e73c55a2fb953ee6dd Author: Xianwei Zhao Date: Thu Apr 24 16:43:17 2025 +0800 dt-bindings: serial: amlogic,meson-uart: Add compatible string for S6/S7/S7D Amlogic S6/S7/7D SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add S6/S7/S7D compatible line for documentation. Acked-by: Rob Herring (Arm) Reviewed-by: Neil Armstrong Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20250424-uart-binding-v1-1-eb0f6d97a654@amlogic.com Signed-off-by: Greg Kroah-Hartman commit be4e3097c1f800b0f39e7e60b2b28eb6603f5d06 Author: Zijun Hu Date: Wed Apr 23 22:40:56 2025 +0800 tty: Remove unused API tty_port_register_device_serdev() Remove API tty_port_register_device_serdev() which has no caller. Signed-off-by: Zijun Hu Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20250423-remove_api-v1-1-fac673d09feb@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 05f31711af6417da19a4fb4b46b41039d569dabc Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:41 2025 +0200 dt-bindings: serial: mediatek,uart: Add compatible for MT6893 Add a compatible string for the MediaTek Dimensity 1200 (MT6893) SoC, which UART IPs are fully compatible with MT6577. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120241.147925-1-angelogioacchino.delregno@collabora.com Signed-off-by: Greg Kroah-Hartman commit 92557dea58f7e451185b4ef0a582cf46221fe4ed Author: Philipp Stanner Date: Thu Apr 17 10:13:34 2025 +0200 mxser: Use non-hybrid PCI devres API mxser enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_region() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_region() with one to the always-managed pcim_request_region(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20250417081333.20917-2-phasta@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3baea29dc0a7b561170d7082f831a613ae6aa56e Author: Prashanth K Date: Thu Apr 24 17:41:42 2025 +0530 usb: gadget: u_serial: Implement remote wakeup capability Implement the remote wakeup capability for u_serial. The newly added function gserial_wakeup_host() wakes up the host when there is some data to be sent while the device is suspended. Add gser_get_status() callbacks to advertise f_serial interface as function wakeup capable. Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20250424121142.4180241-1-prashanth.k@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 11e80d371bbb02b993caff546a9217eef864232d Author: Luca Weiss Date: Fri Apr 25 09:08:12 2025 +0200 dt-bindings: usb: usb-switch: Allow data-lanes property in port The ref /schemas/graph.yaml#/properties/port forbids extra properties which might be specified in subschemas, e.g. like in usb/fcs,fsa4480.yaml. Switch to port-base (and specify the endpoint with properties) to allow such properties. Fixes: fd2a052ccd69 ("dt-bindings: usb: add common Type-C USB Switch schema") Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250425-fp5-pmic-glink-dp-v3-1-cc9c2aeb42fb@fairphone.com Signed-off-by: Greg Kroah-Hartman commit 384455c791740717f457409415d9e9c219436575 Author: Alexey Charkov Date: Fri Apr 25 14:07:31 2025 +0400 dt-bindings: usb: generic-ehci: Add VIA/WonderMedia compatible VIA/WonderMedia SoCs use a plain vanilla EHCI controller with a compatible string "via,vt8500-ehci". This compatible is already used by the mainline Linux driver and relevant in-tree DTS files, so add it to the binding. Acked-by: Conor Dooley Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250425-vt8500-ehci-binding-v2-1-b4a350335add@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4c0fca65d10548f68c040ed49bf1860ce0dda9b9 Author: Dan Carpenter Date: Wed Apr 23 11:23:53 2025 +0300 usb: dwc3: qcom: Fix error handling in probe There are two issues: 1) Return -EINVAL if platform_get_resource() fails. Don't return success. 2) The devm_ioremap() function doesn't return error pointers, it returns NULL. Update the check. Fixes: 1881a32fe14d ("usb: dwc3: qcom: Transition to flattened model") Signed-off-by: Dan Carpenter Reviewed-by: Bjorn Andersson Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/aAijmfAph0FlTqg6@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit 45ebb7baf2356c3d9118c40216ad5b3d0d516b15 Author: Arnd Bergmann Date: Wed Apr 23 18:26:09 2025 +0200 usb: dwc3: qcom: use modern PM macros The use of the old SET_SYSTEM_SLEEP_PM_OPS/SET_RUNTIME_PM_OPS macros without __maybe_unused annotations causes warnings when build testing without CONFIG_PM: drivers/usb/dwc3/dwc3-qcom.c:421:12: error: unused function 'dwc3_qcom_suspend' [-Werror,-Wunused-function] 421 | static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup) | ^~~~~~~~~~~~~~~~~ drivers/usb/dwc3/dwc3-qcom.c:457:12: error: unused function 'dwc3_qcom_resume' [-Werror,-Wunused-function] 457 | static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup) Change these to the modern SYSTEM_SLEEP_PM_OPS/RUNTIME_PM_OPS/pm_ptr macros, which avoids the warnings and improves readability at the same time. Fixes: 1881a32fe14d ("usb: dwc3: qcom: Transition to flattened model") Signed-off-by: Arnd Bergmann Reviewed-by: Abel Vesa Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250423162613.2082417-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 495df45f38c8ba3d74c3180a0a13a0ecbfa717d1 Author: Quentin Schulz Date: Fri Apr 18 16:08:20 2025 +0200 dt-bindings: usb: usb-device: relax compatible pattern to a contains The dt-core typically allows multiple compatibles[1] but usb-device currently forces a single compatible. This is an issue when multiple devices with slightly different productID all behave the same. This would require the driver to keep updating its compatible matching table to include this new productID instead of doing what is usually done: have two compatibles, the leftmost which matches exactly the HW device definition, and the rightmost one as a fallback which is assumed to be 100% compatible with the device at hand. If this assumption turns out to be wrong, it is easy to work around this without having to modify the device tree by handling the leftmost compatible in the driver. [1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/dt-core.yaml#L21-L25 Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250418-dt-binding-usb-device-compatibles-v2-1-b3029f14e800@cherry.de Signed-off-by: Greg Kroah-Hartman commit f4239ace2dd8606f6824757f192965a95746da05 Author: Qasim Ijaz Date: Tue Apr 22 14:47:17 2025 +0100 usb: typec: ucsi: fix Clang -Wsign-conversion warning debugfs.c emits the following warnings when compiling with the -Wsign-conversion flag with clang 15: drivers/usb/typec/ucsi/debugfs.c:58:27: warning: implicit conversion changes signedness: 'int' to 'u32' (aka 'unsigned int') [-Wsign-conversion] ucsi->debugfs->status = ret; ~ ^~~ drivers/usb/typec/ucsi/debugfs.c:71:25: warning: implicit conversion changes signedness: 'u32' (aka 'unsigned int') to 'int' [-Wsign-conversion] return ucsi->debugfs->status; ~~~~~~ ~~~~~~~~~~~~~~~^~~~~~ During ucsi_cmd() we see: if (ret < 0) { ucsi->debugfs->status = ret; return ret; } But "status" is u32 meaning unsigned wrap-around occurs when assigning a value which is < 0 to it, this obscures the real status. To fix this make the "status" of type int since ret is also of type int. Fixes: df0383ffad64 ("usb: typec: ucsi: Add debugfs for ucsi commands") Cc: stable@vger.kernel.org Signed-off-by: Qasim Ijaz Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250422134717.66218-1-qasdev00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5cf4f055c5ae257cbfe142ffe9b4b3f7cc7d3d74 Author: Chen Ni Date: Tue Apr 22 15:37:14 2025 +0800 usb: gadget: udc: renesas_usb3: remove unnecessary NULL check before phy_exit() phy_exit() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250422073714.1334380-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 73fb0ec9436ae87bcae067ce35d6cdd72bade86c Author: Chenyuan Yang Date: Thu Apr 17 14:50:32 2025 -0500 usb: acpi: Prevent null pointer dereference in usb_acpi_add_usb4_devlink() As demonstrated by the fix for update_port_device_state, commit 12783c0b9e2c ("usb: core: Prevent null pointer dereference in update_port_device_state"), usb_hub_to_struct_hub() can return NULL in certain scenarios, such as during hub driver unbind or teardown race conditions, even if the underlying usb_device structure exists. Plus, all other places that call usb_hub_to_struct_hub() in the same file do check for NULL return values. If usb_hub_to_struct_hub() returns NULL, the subsequent access to hub->ports[udev->portnum - 1] will cause a null pointer dereference. Signed-off-by: Chenyuan Yang Fixes: f1bfb4a6fed6 ("usb: acpi: add device link between tunneled USB3 device and USB4 Host Interface") Acked-by: Alan Stern Link: https://lore.kernel.org/r/20250417195032.1811338-1-chenyuan0y@gmail.com Signed-off-by: Greg Kroah-Hartman commit af076a41f8a28faf9ceb9dd2d88aef2c202ef39a Author: Michael Grzeschik Date: Thu Apr 17 19:40:17 2025 +0200 usb: dwc2: also exit clock_gating when stopping udc while suspended It is possible that the gadget will be disabled, while the udc is suspended. When enabling the udc in that case, the clock gating will not be enabled again. Leaving the phy unclocked. Even when the udc is not enabled, connecting this powered but not clocked phy leads to enumeration errors on the host side. To ensure that the clock gating will be in an valid state, we ensure that the clock gating will be enabled before stopping the udc. Signed-off-by: Michael Grzeschik Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20250417-dwc2_clock_gating-v1-1-8ea7c4d53d73@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0bc3e641157c32d3bf23d3e14aefb159842d74ab Author: Yue Haibing Date: Thu Apr 17 20:28:43 2025 +0800 usb: typec: ucsi: Fix unmet dependencies for UCSI_HUAWEI_GAOKUN WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM [=n] && DRM_BRIDGE [=n] && OF [=n] Selected by [m]: - UCSI_HUAWEI_GAOKUN [=m] && USB_SUPPORT [=y] && TYPEC [=m] && TYPEC_UCSI [=m] && EC_HUAWEI_GAOKUN [=m] DRM_AUX_HPD_BRIDGE depends on DRM_BRIDGE and OF, only select it with both for UCSI_HUAWEI_GAOKUN. Fixes: 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver") Signed-off-by: Yue Haibing Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250417122843.2667008-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit e6f9fd8e63ddbb2bff56d2082242c948b8bca53f Author: Pengyu Luo Date: Wed Apr 16 01:20:05 2025 +0800 usb: typec: ucsi: huawei_gaokun: add error checking 'cci' may be uninitialized, adding error checking to fix it. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/Z_44zoTyLLdXNkKT@stanley.mountain Fixes: 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver") Signed-off-by: Pengyu Luo Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250415172006.126740-1-mitltlatltl@gmail.com Signed-off-by: Greg Kroah-Hartman commit db476ffab1df60ec18b87ff3b5ebec46f852de37 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:34 2025 +0200 USB: host: omap: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250417074634.81295-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit c0a1d1e9a48f36086ef5a2863844175476bd3b8e Author: Lad Prabhakar Date: Mon Apr 14 17:52:01 2025 +0100 dt-bindings: usb: renesas,usbhs: Add RZ/V2H(P) SoC support Document the Renesas USBHS controller found on the Renesas RZ/V2H(P) SoC. The USBHS block on RZ/V2H(P) is functionally identical to the one on the RZ/G2L family, so no driver changes are needed. The existing "renesas,rzg2l-usbhs" fallback compatible will continue to be used for handling this IP. In addition, update the schema validation logic by replacing the enum list of SoC-specific compatibles with a const "renesas,rzg2l-usbhs" as all listed SoCs share identical USBHS hardware and already include the fallback compatible. This will help to simplify the schema and avoid redundancy. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250414165201.362262-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 89ecf105143b39c22f49c18da451e88578e08c03 Author: Michael Grzeschik Date: Fri Apr 4 01:02:20 2025 +0200 usb: typec: mux: fsa4480: add regulator support The fsa4480 vcc lane could be driven by some external regulator. This patch is adding support to enable the regulator before probing. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250404-ml-topic-typec-mux-fs4480-v1-1-475377ef22a3@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0c1ddc7bb3e5ca77053b22f0fb5d9119550926b5 Author: Chen-Yu Tsai Date: Mon Apr 21 17:09:50 2025 +0800 pmdomain: mediatek: Add error messages for missing regmaps A recent change to the syscon regmap API caused the MediaTek power controller drivers to fail, as the required regmap could no longer be retrieved. The error did not have an accompanying message, making the failure less obvious. The aforementioned change has since been reverted. Add error messages to all the regmap retrievals, thereby making all error paths in scpsys_add_one_domain() have visible error messages. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250421090951.395467-1-wenst@chromium.org Signed-off-by: Ulf Hansson commit 359a8ff433e110bda63e6a877fb77b1d962f8f85 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:45 2025 +0200 pmdomain: arm: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/20250417074645.81480-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit 885e5cbaa0ee3738fcd99167439459ede2cc102c Author: Johannes Berg Date: Fri Apr 25 11:59:08 2025 +0200 Revert "wifi: iwlwifi: clean up config macro" This reverts commit b6abf63ed7719f6dc1f7e36375b970126e29e709. This is causing major merge conflicts with the changes in wireless, where we reverted some changes. Revert this for now to avoid having to solve that problem. We can redo it on top of wireless-next with wireless merged back later. Signed-off-by: Johannes Berg commit eae324ca644554d5ce363186bee820a088bb74ab Author: Richard Weinberger Date: Sun Apr 20 12:47:25 2025 +0200 configfs: Add CONFIGFS_ATTR_PERM helper This new helper allows creating rw files with custom permissions. Signed-off-by: Richard Weinberger Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Link: https://lore.kernel.org/r/20250420104726.2963750-1-richard@nod.at Signed-off-by: Andreas Hindborg commit 2c2e5e908ea2b53aa0d21fbfe4d1dab527a7703e Author: Krzysztof Kozlowski Date: Thu Apr 24 22:33:09 2025 +0200 firmware: exynos-acpm: Correct kerneldoc and use typical np argument name Correct kerneldoc warnings after commit a8dc26a0ec43 ("firmware: exynos-acpm: introduce devm_acpm_get_by_node()") changed the function prototype: exynos-acpm.c:672: warning: Function parameter or struct member 'acpm_np' not described in 'acpm_get_by_node' exynos-acpm.c:672: warning: expecting prototype for acpm_get_by_phandle(). Prototype was for acpm_get_by_node() instead While touching the lines, change the name of device_node pointer to 'np' to match convention. Fixes: a8dc26a0ec43 ("firmware: exynos-acpm: introduce devm_acpm_get_by_node()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504222051.7TqaSQ48-lkp@intel.com/ Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20250424203308.402168-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ca37fab651b74a7cdd24e0f0ec71dc5d6f5803a5 Author: Miri Korenblit Date: Thu Apr 24 15:38:31 2025 +0300 wifi: iwlwifi: move phy_filters to fw_runtime phy_filters holds the values as read from WFPC BIOS table. Since also iwlmld is going to need it, move it to fw_runtime. Signed-off-by: Miri Korenblit Reviewed-by: Pagadala Yesu Anjaneyulu Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250424153620.357baa65950a.I01d22328b4c381d4c0064ad9bd36750911157f90@changeid Signed-off-by: Johannes Berg commit 1cc2c48c4af81bed5ddbe9f2c9d6e20fa163acf9 Author: Miri Korenblit Date: Thu Apr 24 15:38:30 2025 +0300 wifi: iwlwifi: pcie: make sure to lock rxq->read rxq->read is accessed without the rxq->lock in a few places, Make sure to have the lock there. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Tested-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250424153620.73725f207aaa.I1a3e4b6c5fd370e029fdacfcdc9ee335788afa98@changeid Signed-off-by: Johannes Berg commit 38f3ea722ffbda83670102c688c1b9ee649c56b7 Author: Miri Korenblit Date: Thu Apr 24 15:38:29 2025 +0300 wifi: iwlwifi: add definitions for iwl_mac_power_cmd version 2 This version has a new flag bit that indicates whether or not SMPS is allowed for the MAC. This only adds the API, the actual support will be done in other patches. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250424153620.991ff01b8d16.Id0aa4061d7926753b03a13bf94ec1ac9e1d18745@changeid Signed-off-by: Johannes Berg commit b6abf63ed7719f6dc1f7e36375b970126e29e709 Author: Johannes Berg Date: Thu Apr 24 15:38:28 2025 +0300 wifi: iwlwifi: clean up config macro The IWL_DEV_INFO() macro has far too many arguments, and most of the time they're just "ANY". Use C99 initializers in the macro to clean that up. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.877b65b940b5.Ic3a40afcd182b6e1802bb8f8a1a845b20608e328@changeid Signed-off-by: Johannes Berg commit eda436c2c519c89607f53f4d799868387bb1a5f6 Author: Johannes Berg Date: Thu Apr 24 15:38:27 2025 +0300 wifi: iwlwifi: mld: simplify iwl_mld_rx_fill_status() Move some code that's only done when having received data out of iwl_mld_rx_fill_status() and remove the two arguments that are related to that. This simplifies the function for the no- data case. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.77010d6a6694.I2fd06b073460717d324245482110cb0381218526@changeid Signed-off-by: Johannes Berg commit 36d7859a3ffc2bc1eb15297cdb465a5b4aa65e7f Author: Johannes Berg Date: Thu Apr 24 15:38:26 2025 +0300 wifi: iwlwifi: mld: rx: simplify channel handling There's no need to have the channel in phy_data, this code only supports one descriptor format so can use it directly from there. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250424153620.409c2f4ecbcc.I1735cd773ed07ad9fae44bdfc46261fa9a8fd0e0@changeid Signed-off-by: Johannes Berg commit 1f5532991bb292dd1337760670bc3cc7b0a723e0 Author: Johannes Berg Date: Thu Apr 24 15:38:25 2025 +0300 wifi: iwlwifi: clean up band in RX metadata Use u8_get_bits() instead of open-coding, and adjust the name as well. Also don't use enum nl80211_band for the variable holding an entirely different type. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.c41058510800.Ic3f16ce2f0c991fde2cfe7bcd58ee3b875575fce@changeid Signed-off-by: Johannes Berg commit c561ac93cd80b7b13ee325dbe254e22c76f22355 Author: Johannes Berg Date: Thu Apr 24 15:38:24 2025 +0300 wifi: iwlwifi: mld: skip unknown FW channel load values The firmware statistics were previously reporting bogus/old channel load values if the device hadn't been active on a given channel; it'll report an unknown value now for those statistics affected (channel_load and channel_load_not_by_us.) Handle that by simply skipping the value, the averaging would result in the exact same value as before. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.db5410318642.I4d2981f68b915ad335bb02c926e9289c2a60ea6c@changeid Signed-off-by: Johannes Berg commit ccf36d82e8c136f539534bf243bfdda09284e689 Author: Johannes Berg Date: Thu Apr 24 15:38:23 2025 +0300 wifi: iwlwifi: define API for external FSEQ images The firmware will support external FSEQ images, define the necessary API for that. We're not yet using/shipping such, so don't add code to load them for now. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.4f5acc3dff6c.Ic559d90376945c78495352a0d24b1d44ef887f2d@changeid Signed-off-by: Johannes Berg commit 0ac68a7700afb8ca2cc2d2c19e8ed2d4f4764fb0 Author: Johannes Berg Date: Thu Apr 24 15:38:22 2025 +0300 wifi: iwlwifi: mld: allow EMLSR on separated 5 GHz subbands If there are two links on 5 GHz subbands that are separated enough (using channels 36-64 and 100+) then we can support EMLSR across those two links. Allow that in the logic. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.d568a26661d5.Ie4277945272c5bbf637957704fda34ea03ef28d2@changeid Signed-off-by: Johannes Berg commit 517500f1d7d43dfb61eafac586d23e6ccaa7358e Author: Johannes Berg Date: Thu Apr 24 15:38:21 2025 +0300 wifi: iwlwifi: mld: use cfg80211_chandef_get_width() We can use this helper now to simplify some code. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.586e12d3d07c.Idc27c446d00a7f7925ee76b356f53b72dafc5745@changeid Signed-off-by: Johannes Berg commit 9f5332bafebe211bc3e904c6af39cf836cb76695 Author: Johannes Berg Date: Thu Apr 24 15:38:20 2025 +0300 wifi: iwlwifi: mld: fix iwl_mld_emlsr_disallowed_with_link() return The return type of iwl_mld_emlsr_disallowed_with_link() is a u32 bitmap of exit reasons, but in the data structure confusion case where the warning triggers, it returns false. Add a new reason bit for this case so it doesn't return that EMLSR is possible. Signed-off-by: Johannes Berg Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.d1f8465e2b5e.I58c463c70801231a79b04c1ff600f41afcbb04f5@changeid Signed-off-by: Johannes Berg commit 8eac6b3347e80ba6a66e265ec55e91ff877be0d9 Author: Johannes Berg Date: Thu Apr 24 15:38:19 2025 +0300 wifi: iwlwifi: mld: clarify variable type In iwl_mld_emlsr_disallowed_with_link() the code uses an enum for a bitmap of values from it, which doesn't really make sense.Use u32 for the variable just like the return value. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.ddf54a728ec0.Ie2e8de150f67369c4e034452c5f1a15f85d2931c@changeid Signed-off-by: Johannes Berg commit ab606dea80c4d2a7d39203fa53acbf0f78adc148 Author: Emmanuel Grumbach Date: Thu Apr 24 15:38:18 2025 +0300 wifi: iwlwifi: pcie: add support for the reset handshake in MSI Add the proper case in the MSI interrupt handler and read the non-MSIx interrupt cause register in case of timeout. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250424153620.758cdfbb78dc.Ia359071e6148218c26f18e783a8130c681d77df7@changeid Signed-off-by: Johannes Berg commit c575f5374be7a5c4be4acb9fe6be3a4669d94674 Author: Edward Adam Davis Date: Wed Apr 23 22:15:53 2025 +0800 wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabled Setting tsf is meaningless if beacon is disabled, so check that beacon is enabled before setting tsf. Reported-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=064815c6cd721082a52a Tested-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Link: https://patch.msgid.link/tencent_3609AC2EFAAED68CA5A7E3C6D212D1C67806@qq.com Signed-off-by: Johannes Berg commit 9ceba431a31544f4f8feb0df58287a58644dc5f5 Merge: f600832794c91d 75f90ba47b2cda Author: Johannes Berg Date: Fri Apr 25 11:22:01 2025 +0200 Merge tag 'ath-next-20250418' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath into wireless-next Jeff Johnson says: ==================== ath.git patches for v6.16 ath12k: Enable AHB support for IPQ5332. Add monitor interface support to QCN9274. Add MLO support to WCN7850. Add 802.11d scan offload support to WCN7850. ath11k: Restore hibernation support In addition, perform the usual set of bug fixes and cleanups across all supported drivers. ==================== Change-Id: I6555e64d7434f3a5fed5faab25057be93106b18e Signed-off-by: Johannes Berg commit 6f1b74c1a686c93b404bd57d73577a6b5b19c5c3 Author: Tarang Raval Date: Sat Mar 29 11:13:31 2025 +0530 media: i2c: imx334: switch to {enable,disable}_streams Switch from s_stream to enable_streams and disable_streams callbacks. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9d382f6a9978916317b3fb4ef07b5fec684adde0 Author: Tarang Raval Date: Sat Mar 29 11:13:30 2025 +0530 media: i2c: imx334: Use subdev state lock for synchronization Replace the custom mutex in the imx334 driver with the V4L2 subdev state lock for control synchronization. Initialize the subdev with v4l2_subdev_init_finalize in imx334_probe, adding proper cleanup in error paths and imx334_remove. This aligns the driver with V4L2 standards. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 01dfdf6a80c57151af0589af0db7adbbdd1361c7 Author: Tarang Raval Date: Sat Mar 29 11:13:29 2025 +0530 media: i2c: imx334: Enable runtime PM before sub-device registration Runtime PM is fully initialized before calling v4l2_async_register_subdev_sensor(). Moving the runtime PM initialization earlier prevents potential access to an uninitialized or powered-down device. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b493cd3c03641f9bbaa9787e43ca92163cb50051 Author: Tarang Raval Date: Sat Mar 29 11:13:28 2025 +0530 media: i2c: imx334: Fix runtime PM handling in remove function pm_runtime_suspended() only checks the current runtime PM status and does not modify it, making it ineffective in this context. This could result in improper power management if the device remains active when removed. This patch fixes the issue by introducing a check with pm_runtime_status_suspended() to determine if the device is already suspended. If it is not, it calls imx334_power_off() to power down the device and then uses pm_runtime_set_suspended() to correctly update the runtime PM status to suspended. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a6dde677b93795a04f43f90427723bb4c2a50e5e Author: Tarang Raval Date: Sat Mar 29 11:13:27 2025 +0530 media: i2c: imx334: Fix power management and control handling Some controls may need the sensor to be powered on to update their values. Currently, only the exposure control does this. To ensure proper handling, the power-up sequence is moved outside the switch-case. Additionally, VBLANK control is now processed earlier so its changes can correctly affect other controls. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9e089a649a229fb08942ada75b0f1c7f5814e065 Author: Tarang Raval Date: Sat Mar 29 11:13:26 2025 +0530 media: i2c: imx334: Configure lane mode dynamically Configure the lane mode dynamically from the streaming function instead of using a hardcoded value. Signed-off-by: Tarang Raval [Sakari Ailus: Fix checkpatch.pl issue, lower Dynamically.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 731c8efd5b74f8aa4c57ffd8e8561d93e425b007 Author: Tarang Raval Date: Sat Mar 29 11:13:25 2025 +0530 media: i2c: imx334: Remove redundant register entries IMX334_REG_{ADBIT, MDBIT, ADBIT1}: Already written in imx334_set_framefmt function. IMX334_REG_THSPREPARE: Unnecessary repeated writes removed. CCI_REG8(0x3e04): Unnecessary repeated writes removed. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7b19b0fc8ac8466b9140df17e0c7fcf135f1f063 Author: Tarang Raval Date: Sat Mar 29 11:13:24 2025 +0530 media: i2c: imx334: Convert to CCI register access helpers Use the new common CCI register access helpers to replace the private register access helpers in the imx334 driver. This simplifies the driver by reducing the amount of code. Acked-by: Shravan Chippa Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 78bc2ff83c76db622ae52c2bbf3113a5c6df580a Author: Tarang Raval Date: Sat Mar 29 11:13:23 2025 +0530 media: i2c: imx334: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). also, Added missing newline characters (\n) in error messages. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0209916ebe2475079ce6d8dc4114afbc0ccad1c2 Author: Stanislaw Gruszka Date: Thu Apr 10 11:47:06 2025 +0200 media: intel/ipu6: Fix dma mask for non-secure mode We use dma_get_mask() of auxdev device for calculate iova pfn limit. This is always 32 bit mask as we do not initialize the mask (and we can not do so, since dev->dev_mask is NULL anyways for auxdev). Since we need 31 bit mask for non-secure mode use mmu_info->aperture_end which is properly initialized to correct mask for both modes. Fixes: daabc5c64703 ("media: ipu6: not override the dma_ops of device in driver") Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1284c9693953aed2a9974a5a384ce2a42a1b9ae8 Author: Stanislaw Gruszka Date: Thu Apr 10 11:52:13 2025 +0200 media: intel/ipu6: Minor dma_mask clenaup Remove unused dma_mask field and ipu-dma.h includes. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5050bc60cc16ffa35a962a53271210d427a11535 Author: Sakari Ailus Date: Fri Oct 11 13:56:44 2024 +0300 media: ccs: Don't complain about missing "clock-frequency" property The clock frequency is often available via the clock itself and not read by the driver from the "clock-frequency" property. Don't complain if the property doesn't exist. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 980d2c914cbe0af7c9239dacb89ae083a2094d83 Author: Sakari Ailus Date: Tue Oct 15 13:38:01 2024 +0300 media: ccs: Don't complain about lack of quirks Generally any deviance from the standard is handled via CCS static data nowadays and so not having quirks is expected. Don't warn about it. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 932518f6f8713d9a23b2ec3e0ebf5ab9e17af728 Author: Sakari Ailus Date: Tue Oct 15 10:28:42 2024 +0300 media: ccs: Remove I²C write retry hack The I²C retry hack has been there in order to address transient I²C register write access issues on a few very old sensors and possibly it has addressed also first I²C access problems (device not responding until a certain amount of time has passed) but that is now separately handled. The retry hack has a good potential for introducing hard to debug problems in updating sensor settings while streaming. Remove it and instead pass those rare errors to the user space -- which is also what virtually all other drivers do. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bb468fc5a4d902c9202f32ed4ee1f0980c17fe52 Author: Sakari Ailus Date: Tue Oct 15 10:07:02 2024 +0300 media: ccs: Use read_poll_timeout() in reset polling Use read_poll_timeout() in polling the device after a reset, either hard or soft. While at it, improve the related error message. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e848475c33fc42e8bd7052227e65ca35d6ff046f Author: Sakari Ailus Date: Tue Oct 15 09:59:52 2024 +0300 media: ccs: Try a little longer to access the sensor before giving up Some sensors take longer to respond after reset than the spec-required time. Try up to 1 s for the sensor to become accessible. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5bd6b8c1bb2d49d5ff15c7c47d6b33d2d38785f0 Author: Tarang Raval Date: Thu Mar 6 11:04:44 2025 +0530 media: i2c: imx219: media: i2c: imx219: Enable runtime PM autosuspend Use pm_runtime_put_autosuspend() instead of pm_runtime_put() to allow autosuspend. Set a 1000ms autosuspend delay in imx219_probe() to improve power efficiency. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 838a5255698b414897c3b237c00b21f3f1620fef Author: Tarang Raval Date: Thu Mar 6 11:04:43 2025 +0530 media: i2c: imx219: switch to {enable,disable}_streams Switch from s_stream to enable_streams and disable_streams callbacks. Signed-off-by: Tarang Raval Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 25259379bc796bf718eae395ffe05e76d42cbe5b Author: David Heidelberg Date: Mon Apr 21 10:20:15 2025 +0200 media: dt-bindings: Convert Analog Devices ad5820 to DT schema Convert the Analog Devices ad5820 to DT schema format. Acked-by: Pavel Machek Signed-off-by: David Heidelberg Reviewed-by: Rob Herring (Arm) Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1c734f8ab070716604d0794094e18de3475c8eeb Author: Jingjing Xiong Date: Mon Apr 7 10:13:08 2025 +0100 media: i2c: ov02e10: add OV02E10 image sensor driver Add in the ov02e10 driver from the Intel IPU6 repository. Signed-off-by: Jingjing Xiong Co-developed-by: Hao Yao Signed-off-by: Hao Yao Co-developed-by: Jim Lai Signed-off-by: Jim Lai Co-developed-by: You-Sheng Yang Signed-off-by: You-Sheng Yang Co-developed-by: Alan Stern Signed-off-by: Alan Stern Co-developed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit df78f5928c4b699d0699ec0e2554571a45e38626 Author: Bryan O'Donoghue Date: Mon Apr 7 10:13:07 2025 +0100 media: dt-bindings: Add OmniVision OV02E10 Add bindings for OVO2E10 a two lane MIPI CSI, two megapixel 1080p RGB sensor. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3bb6339e2a133abf8e48d12114e6bb11820e36c0 Author: Philipp Stanner Date: Fri Apr 4 15:53:43 2025 +0200 media: intel/ipu6: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Furthermore, the "name" parameter in pcim_iomap_regions() and its successor, pcim_iomap_region(), should always reflect the driver name, whereas currently it is the device's name. Replace the deprecated functions with pcim_iomap_region() and pass the actual driver name. Signed-off-by: Philipp Stanner Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4e228c365d85a03d08c7f555011919f4b6353dcd Author: Philipp Stanner Date: Fri Apr 4 15:53:41 2025 +0200 media: ipu3-cio2: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(), and pass the actual driver name to that function. Signed-off-by: Philipp Stanner Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9396770c3add2142e21813ce8bc152e5e6524557 Author: Niklas Söderlund Date: Mon Feb 10 18:56:15 2025 +0100 media: rcar-csi2: Remove hack to detect NTSC content In an effort to emulate support for SEQ_{TB,BT} in the R-Car VIN driver on data captured from a CVBS input a hack was added to detect NTSC vs PAL. This is ugly and as support for emulated SEQ_{TB,BT} have been removed from the VIN driver remove the ugly hack. Signed-off-by: Niklas Söderlund Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c1eefe88c3954390473ed092f0d4718a810bd61c Author: Niklas Söderlund Date: Mon Feb 10 18:56:14 2025 +0100 media: rcar-vin: Simplify the shutdown process When shutting down capture extra care was needed to try and complete a buffer that was involved in the emulated support for SEQ_{TB,BT}. This was needed as a buffer might be queued once to the driver, but two times to the hardware using different offsets. As support for SEQ_{TB,BT} is now removed this shutdown process can be greatly simplified. And in addition the state keeping of the VIN device can be reduced to a single boolean value instead of keeping track of this SEQ_{TB,BT} stopping dance. Signed-off-by: Niklas Söderlund Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 25482a986e44fddd3af77458071fbbd222795917 Author: Niklas Söderlund Date: Mon Feb 10 18:56:13 2025 +0100 media: rcar-vin: Remove superfluous starting state The STARTING state is superfluous and can be replaced with a check of the sequence counter. The design idea is that the first buffer returned from the driver have to come from the first hardware buffer slot. Failing this the first 3 buffers queued to the device can be returned out-of-order. But it's much clearer to check the sequence counter to only return the first buffer if it comes from hardware slot 0 then it is to carry around an extra state just for this. Remove the unneeded state and replace it with a simpler check. Signed-off-by: Niklas Söderlund Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1dadd89b58108d3df701d6d9e19cd34818f97f7f Author: Niklas Söderlund Date: Mon Feb 10 18:56:12 2025 +0100 media: rcar-vin: Remove superfluous suspended state The VIN state of suspended is superfluous. The logic was that when the device were suspended and in a RUNNING state the state was set to SUSPENDED. And when resuming it checked if the state is SUSPENDED and if so started the device and changed it to RUNNING. This can be avoided by simply checking if the device is in a RUNNING state at both suspend and resume callbacks. Remove the unneeded complexity. Signed-off-by: Niklas Söderlund Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f2f0cd892515eda18857f47718eb7be93f9ddaca Author: Niklas Söderlund Date: Mon Feb 10 18:56:11 2025 +0100 media: rcar-vin: Remove emulated SEQ_{TB,BT} When the driver was converted from soc_camera software support for V4L2_FIELD_SEQ_TB and V4L2_FIELD_SEQ_BT were added. This was done by capturing twice to the same VB2 buffer, but at different offsets. This turned out to be a bad idea and it never really worked properly in all situations. As the hardware can't support this mode natively remove trying to emulate it in software. It's still possible to capture TOP or BOTTOM fields separately or both ALTERNATING. If user-space wants the same fields in the same buffer the same hack to capture twice to the same buffer can be done. Removing this error prone emulated support pave ways in future work to simplify the internal buffer handling and making it less fragile, while enabling adding support for other features the hardware actually supports. Signed-off-by: Niklas Söderlund Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c57e372b7b4230d8c4fbaf08704bc4c492a67684 Author: Tomi Valkeinen Date: Wed Mar 26 13:34:03 2025 +0200 media: ti: cal: Add streams support Add multiplexed streams support. CAL has 8 DMA-engines and can capture 8 separate streams at the same time. The driver filters the streams based on CSI-2 virtual channel number and datatype. CAL may have (depending on the SoC) two CSI-2 RX blocks, which share the 8 DMA-engines, so the number of capturable streams does not change even if there are two CSI-2 RX blocks. Add 8 video device nodes, each representing a single DMA-engine, and set the number of source pads on CSI-2 RX blocks to 8. Each video node can be connected to any of the source pads on either of the CSI-2 RX instances using media links. CSI-2 RX block's subdevice internal routing is used to route the incoming CSI-2 streams to one of the 8 source pads. Only video data streams are supported at the moment. Signed-off-by: Tomi Valkeinen Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a5b18fd769b7dc2e77a9e6a390844cbf50626ae8 Author: Tomi Valkeinen Date: Wed Mar 26 13:34:02 2025 +0200 media: ti: cal: Fix wrong goto on error path If pm_runtime_resume_and_get() fails, we should unprepare the context, but currently we skip that as we goto to a later line. Reviewed-by: Kieran Bingham Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0c1ab3ce0492a579cf8c3b7c0a6c6ab05e47b4bb Author: Tomi Valkeinen Date: Wed Mar 26 13:34:01 2025 +0200 media: ti: cal: Use printk's fourcc formatting Use printk's fourcc formatting instead of a custom one. Reviewed-by: Kieran Bingham Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e0f6bc693b3f1c0cc3a2d8d67a764ecb0aac2145 Author: Dongcheng Yan Date: Wed Mar 26 13:24:47 2025 +0800 media: ipu-bridge: add ACPI HID for lt6911uxe bridge Lontium lt6911uxe is a HDMI to CSI-2 bridge, without a fixed link frequency. Signed-off-by: Dongcheng Yan Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 81cf4f46a03a07b0b86f9d677c34ba782df7d65e Author: Hans de Goede Date: Mon Mar 24 14:01:09 2025 +0100 media: ov2740: Move pm-runtime cleanup on probe-errors to proper place When v4l2_subdev_init_finalize() fails no changes have been made to the runtime-pm device state yet, so the probe_error_media_entity_cleanup rollback path should not touch the runtime-pm device state. Instead this should be done from the probe_error_v4l2_subdev_cleanup rollback path. Note the pm_runtime_xxx() calls are put above the v4l2_subdev_cleanup() call to have the reverse call order of probe(). Signed-off-by: Hans de Goede Reviewed-by: Bingbu Cao Fixes: 289c25923ecd ("media: ov2740: Use sub-device active state") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1acf9fee6f117fcb91da3c8f36545d7051c78f52 Author: Stanislaw Gruszka Date: Wed Mar 19 13:10:44 2025 +0100 media: intel/ipu6: Remove unused dev field from ipu6_isys_queue With current code base dev is only written but never read. Remove it as redundant. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 95d1033c8da0b3307a40bd3dd95ddf85ad171dbc Author: Stanislaw Gruszka Date: Wed Mar 19 13:10:43 2025 +0100 media: intel/ipu6: Abstract buf ready function Extract values needed by ipu6_queue_buf_ready() function from fw abi structure. This will allow to reuse same buf ready code when fw abi change. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 36b9d0521e4b10c9fab9bef0796d6374125b7b57 Author: Stanislaw Gruszka Date: Wed Mar 19 13:10:42 2025 +0100 media: intel/ipu6: Use timestamp value directly Remove pointer for fw abi structure when setting frame sequence and time, use timestamp value from the structure directly. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4fa1d8d81d7224a82c7ae07b9262a8751c4e85f2 Author: Stanislaw Gruszka Date: Wed Mar 19 13:10:41 2025 +0100 media: intel/ipu6: Make two functions static Make function used only in one file static and remove from header file. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit adcdf4160a6cca8a8dcda853e07590c32566d6fd Author: Stanislaw Gruszka Date: Wed Mar 19 13:10:40 2025 +0100 media: intel/ipu6: Add missing new line character in error message End error message with new line. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 94a6c188b89b8099e3abe78ebb6916a534690e21 Author: Stanislaw Gruszka Date: Mon Mar 17 15:28:42 2025 +0100 media: intel/ipu6: Remove unused ipu6_isys_subdev_link_validate() Remove unused declaration. Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6ad57f8f86de024d10c764f829a50530e7121958 Author: Stanislaw Gruszka Date: Thu Mar 13 11:17:44 2025 +0100 media: intel/ipu6: Constify ipu6_buttress_ctrl structure Make ipu6_buttress_ctrl constant since it is not modified any longer. Reviewed-by: Hans de Goede Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit be1534a2e71452afbab7c69cf59f783bb33f644a Author: Stanislaw Gruszka Date: Thu Mar 13 11:17:43 2025 +0100 media: intel/ipu6: Remove ipu6_buttress_ctrl started field We assign to ->started field but newer read back, the field can be removed. Reviewed-by: Hans de Goede Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c3d8e388ac9dd56fd99dbe71874aa67097840a57 Author: Stanislaw Gruszka Date: Thu Mar 13 11:17:42 2025 +0100 media: intel/ipu6: Remove unused IPU6_BUS_NAME Remove unused define. Reviewed-by: Hans de Goede Signed-off-by: Stanislaw Gruszka Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 220ea1432a6d317272d94184bf5f98b317f514b9 Author: Sakari Ailus Date: Wed Apr 16 14:08:56 2025 +0300 media: ccs-pll: Document the CCS PLL flags Document the CCS PLL flags with short comments. The CCS spec has more information on them while the added documentation helps finding the relevant information in the CCS spec. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit de6514694b54bdaf1a6e6cde6575871330013cb2 Author: Sakari Ailus Date: Wed Mar 5 13:30:41 2025 +0200 media: ccs-pll: Print PLL calculator flags in the beginning Print the PLL calculator flags right away when the PLL calculator is called. Previously this was done only in a successful case and that didn't really help solving a problem when one happened. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit cd9cb0313a42ae029cd5af9293b0add984ed252e Author: Sakari Ailus Date: Wed Feb 26 14:27:58 2025 +0200 media: ccs-pll: Better validate VT PLL branch Check that the VT PLL dividers are actually found, don't trust they always are even though they should be. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 2f19528845b80f8299fbe28b23c162ba9389ebad Author: Sakari Ailus Date: Fri Feb 14 12:36:18 2025 +0200 media: ccs-pll: Add a flag for even PLL multipliers Some devices (not entirely CCS compliant) only support even PLL multipliers. Add support for this through a PLL flag. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 715f84c1e54efd123da761bb3db204e76e051041 Author: Sakari Ailus Date: Wed Apr 16 14:18:45 2025 +0300 media: ccs-pll: Print missing PLL flags Printing the OP_PIX_CLOCK_PER_LANE and NO_OP_CLOCKS CCS PLL flags is missing, add them now. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 2ab7b3d07d2549686a8088f3de6e477b6ceb0483 Author: Sakari Ailus Date: Wed Apr 16 13:54:00 2025 +0300 media: ccs-pll: Drop LINK_DECOUPLED flag The LINK_DECOUPLED flag isn't used by the PLL calculator other than printing it. The number of OP/VT lanes are already printed in any case. Thus drop the flag as it has no function. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 34af05f857cb8317ce3c19f00f68af4c14329dbe Author: Sakari Ailus Date: Thu Feb 20 11:53:20 2025 +0200 media: ccs-pll: Print a debug message on too high VT PLL OP clock In general the CCS PLL calculator prints debugging information on the process to ease debugging. This case was not annotated, do that now. Remove an extra multiplication while at it. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit f639494db450770fa30d6845d9c84b9cb009758f Author: Sakari Ailus Date: Wed Feb 19 15:06:11 2025 +0200 media: ccs-pll: Correct the upper limit of maximum op_pre_pll_clk_div The PLL calculator does a search of the PLL configuration space for all valid OP pre-PLL clock dividers. The maximum did not take into account the CCS PLL flag CCS_PLL_FLAG_EXT_IP_PLL_DIVIDER in which case also odd PLL dividers (other than 1) are valid. Do that now. Fixes: 4e1e8d240dff ("media: ccs-pll: Add support for extended input PLL clock divider") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 6868b955acd6e5d7405a2b730c2ffb692ad50d2c Author: Sakari Ailus Date: Thu Feb 20 10:54:44 2025 +0200 media: ccs-pll: Check for too high VT PLL multiplier in dual PLL case The check for VT PLL upper limit in dual PLL case was missing. Add it now. Fixes: 6c7469e46b60 ("media: ccs-pll: Add trivial dual PLL support") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 06d2d478b09e6764fb6161d1621fc10d9f0f2860 Author: Sakari Ailus Date: Tue Feb 18 23:47:13 2025 +0200 media: ccs-pll: Start VT pre-PLL multiplier search from correct value The ccs_pll_calculate_vt_tree() function does a search over possible VT PLL configurations to find the "best" one. If the sensor does not support odd pre-PLL divisors and the minimum value (with constraints) isn't 1, other odd values could be errorneously searched (and selected) for the pre-PLL divisor. Fix this. Fixes: 415ddd993978 ("media: ccs-pll: Split limits and PLL configuration into front and back parts") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 660e613d05e449766784c549faf5927ffaf281f1 Author: Sakari Ailus Date: Tue Feb 18 23:43:58 2025 +0200 media: ccs-pll: Start OP pre-PLL multiplier search from correct value The ccs_pll_calculate() function does a search over possible PLL configurations to find the "best" one. If the sensor does not support odd pre-PLL divisors and the minimum value (with constraints) isn't 1, other odd values could be errorneously searched (and selected) for the pre-PLL divisor. Fix this. Fixes: 415ddd993978 ("media: ccs-pll: Split limits and PLL configuration into front and back parts") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 77aed862c34f192f9d4b80d5288263b22b50ca98 Author: Hans de Goede Date: Tue Mar 11 12:48:44 2025 +0100 media: ov08x40: Extend sleep after reset to 5 ms Some users are reporting that ov08x40_identify_module() fails to identify the chip reading 0x00 as value for OV08X40_REG_CHIP_ID. Intel's out of tree IPU6 drivers include some ov08x40 changes including adding support for the reset GPIO for older kernels and Intel's patch for this uses 5 ms. Extend the sleep to 5 ms following Intel's example, this fixes the ov08x40_identify_module() problem. Link: https://github.com/intel/ipu6-drivers/blob/c09e2198d801e1eb701984d2948373123ba92a56/patch/v6.12/0008-media-ov08x40-Add-support-for-2-4-lanes-support-at-1.patch#L4607 Fixes: df1ae2251a50 ("media: ov08x40: Add OF probe support") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 267836bcc808928afa2a92d4088c41f488ebf047 Author: Shravan Chippa Date: Wed Mar 5 10:44:40 2025 +0530 media: i2c: imx334: common reg value correction correcting the CPWAIT_TIME value as per the data sheet for the link frequency and input clock Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7dced52992887a712d41913b39c5000b2ebf8c4f Author: Shravan Chippa Date: Wed Mar 5 10:44:42 2025 +0530 media: i2c: imx334: add modes for 720p and 480p resolutions Added support for 1280x720@30 and 640x480@30 resolutions Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 35132d039c566b0e9d8e53f76f512b22607c2405 Author: Shravan Chippa Date: Wed Mar 5 10:44:41 2025 +0530 media: i2c: imx334: update mode_3840x2160_regs array The 3840x2160 mode operates with the imx334 reset values. If we switch to other modes and then return to the 3840x2160 mode, it should function correctly. so updated the mode_3840x2160_regs array with the imx334 reset values. Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bd5bae761f1813567388791eab7afaa7c287e936 Author: Shravan Chippa Date: Wed Mar 5 10:44:39 2025 +0530 media: i2c: imx334: Optimized 4k and 2k mode register arrays Optimized the resolution arrays by integrating a common register array. Adjusted the register array values for 1920x1080@30 and 3840x2160@30 resolutions to align with the common register array values. Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d471fb06b21ae54bf76464731ae1dcb26ef1ca68 Author: Hao Yao Date: Tue Mar 11 16:41:55 2025 +0800 media: ipu6: Remove workaround for Meteor Lake ES2 There was a hardware bug which need IPU6 driver to disable the ATS. This workaround is not needed anymore as the bug was fixed in hardware level. Additionally, Arrow Lake has the same IPU6 PCI ID and x86 stepping but does not have the bug. Removing the Meteor Lake workaround is also required for the driver to function on Arrow Lake. Signed-off-by: Hao Yao Reviewed-by: Stanislaw Gruszka Fixes: 25fedc021985 ("media: intel/ipu6: add Intel IPU6 PCI device driver") Cc: stable@vger.kernel.org [Sakari Ailus: Added tags and explanation of what is fixed.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a05744749600007f56efb16c6de727d9d541d475 Author: Jai Luthra Date: Mon Mar 3 21:32:22 2025 +0530 media: i2c: ds90ub9xx: Set serializer temperature ramp For continuous PLL lock, it is recommended to extend the temperature ramp down range of the DS90UB953-Q1 serializer based on the device's initial temperature [1]. The serializer's die temperature is reported only to the deserializer through the sensor status registers, and for UB9702, it is recommended to set the temperature ramp during the link setup sequence, i.e. before we even probe the ub953 driver. Add support to the deserializer driver to configure ub953's temperature ramp. [1]: Section 7.3.1.1 - https://www.ti.com/lit/gpn/ds90ub953-q1 Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e2a3b695bc5f343391c003ecda98701808a9c433 Author: Jai Luthra Date: Mon Mar 3 21:32:21 2025 +0530 media: i2c: ds90ub960: Configure serializer using back-channel For DS90UB9702-Q1, it is recommended to configure some serializer settings over the back-channel before the forward-channel is active. This can only be done if the serializer's I2C address on the FPD-Link bus is populated in the device tree node. Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b8e2193b1e367ac8169b97703dc2fc666637ae84 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:20 2025 +0530 media: i2c: ds90ub953: Move reg defines to a header file Move UB953 register defines to a header file. This is done so that the deserializer driver can access the defines, and do some early serializer configuration. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ca26126a6c3fb6eb4f30ceb6a41ff975117ec94a Author: Jai Luthra Date: Mon Mar 3 21:32:19 2025 +0530 media: dt-bindings: ti,ds90ub960: Allow setting serializer address The serializer's I2C address on the FPD-Link bus is usually communicated to the deserializer once the forward-channel is established. But in some cases it might be necessary to program the serializer (over the back-channel) before the forward-channel is established. This can be used e.g. to correct serializer configuration which otherwise would prevent the FC to be enabled. To be able to communicate to the serializer before the forward-channel is up, the deserializer driver neds to know the default i2c address of the serializer. Allow setting the serializer i2c address using the 'reg' property. This is optional, and usually not needed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 32cc18622d026b21ed328ad992180dc2393d1fdd Author: Tomi Valkeinen Date: Mon Mar 3 21:32:18 2025 +0530 media: i2c: ds90ub960: Update UB9702 init sequences Update ub9702 RX port init sequence according to TI's latest (non-public) documentation. The sequence is based on a Python script provided by TI. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ac7c808b1cb2b6745a5204c91f170634974c9e24 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:17 2025 +0530 media: i2c: ds90ub960: Move all RX port init code into ub960_init_rx_ports() We have some code in probe() which is related to RX port initialization, and should be in ub960_init_rx_ports(). Move the code there. We also move ub960_reset() so that it is accessible from ub960_init_rx_ports(). Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2ca499384e98e79f02bea6cc4bde9b3612bace04 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:16 2025 +0530 media: i2c: ds90ub960: Add RX port iteration support The driver does a lot of iteration over the RX ports with for loops. In most cases the driver will skip unused RX ports. Also, in the future patches the FPD-Link IV support will be refreshed with TI's latest init sequences which involves a lot of additional iterations over the RX ports, often only for FPD-Link IV ports. To make the iteration simpler and to make it clearer what we're iterating over (all or only-active, all or only-fpd4), add macros and support functions for iterating the RX ports. Use the macros in the driver, replacing the for loops. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 42a44838d5b50d75e534efa29aca2b49e8de3400 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:15 2025 +0530 media: i2c: ds90ub960: Refresh ub960_init_tx_ports_ub9702() Refresh the ub960_init_tx_ports_ub9702() using the latest version of the (non-public) hardware documentation. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 43635b661ef9931b57e33593d13570b0ab5ccec1 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:14 2025 +0530 media: i2c: ds90ub960: Split ub960_init_tx_ports() Split ub960_init_tx_ports() to a UB960 and a UB9702 versions to make it easier to update the UB9702 version in the following patch. No funcional changes. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 21a22b0febad2d029d5c23947751dabb9973e83f Author: Tomi Valkeinen Date: Mon Mar 3 21:32:13 2025 +0530 media: i2c: ds90ub960: Add UB9702 specific registers Add UB9702 specific registers which will be used in the following patches. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 675bc338ea476e7e3a290bf5d6e9bb2455ec5402 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:12 2025 +0530 media: i2c: ds90ub960: Move UB9702 registers to a separate section The driver supports both UB960 and UB9702. While devices work in similar ways and have a lot of identical registers, there are also plenty of differences. To clarify the situation a bit, move the UB9702 registers to a separate section and prefix them with UB9702. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit dbad194b0bffbacd896ed9dec7fd3556720b8049 Author: Jai Luthra Date: Mon Mar 3 21:32:11 2025 +0530 media: i2c: ds90ub953: Speed-up I2C watchdog timer On the I2C bus for remote clients (sensors), by default the watchdog timer expires in 1s. To allow for a quicker system bring-up time, TI recommends to speed it up to 50us [1]. [1]: Section 7.3.1.1 - https://www.ti.com/lit/gpn/ds90ub953-q1 Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d3be2fcde66d38c5f229c0f74cf3616f3453179e Author: Tomi Valkeinen Date: Mon Mar 3 21:32:10 2025 +0530 media: i2c: ds90ub913: Add error handling to ub913_log_status() Add error handling to ub913_log_status(). Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit fe591fb5ed225ce8c6a122d7b8baa670bd8542d4 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:09 2025 +0530 media: i2c: ds90ub953: Add error handling to ub953_log_status() Add error handling to ub953_log_status(). Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8f512c3113756c751811392bc48e146b6a0ba2fd Author: Tomi Valkeinen Date: Mon Mar 3 21:32:08 2025 +0530 media: i2c: ds90ub960: Add error handling to multiple places The driver is missing checks for i2c read/write errors in many places. Now that we have added the err parameter to the read/write functions in the previous patch, add error handling to all the missing places. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 24868501a74402e8b48810dd7223bdc3d7508b3e Author: Tomi Valkeinen Date: Mon Mar 3 21:32:07 2025 +0530 media: i2c: ds90ub9xx: Add err parameter to read/write funcs To make future error handling in the drivers easier, add "int *err" parameter to all the i2c register access functions. It functions the same was as with e.g. CCI reg write/read helpers. This was accomplished with the following semantic patch: @@ identifier FUNC =~ "^ub9.._(rxport_|txport_|ind_)?(read|write|update_bits)(16|_ind)?$"; @@ FUNC(... + , int *err ) { ... int ret; + + if (err && *err) + return *err; ... + if (ret && err) + *err = ret; + return ret; } @@ identifier FUNC =~ "^ub9.._(rxport_|txport_|ind_)?(read|write|update_bits)(16|_ind)?$"; @@ FUNC(... + , NULL ) Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3e80dbb464eb8bb2f45c7c83ec379818d611c358 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:06 2025 +0530 media: i2c: ds90ub913: Align ub913_read() with other similar functions Adjust the ub913_read() to have similar form than the other similar functions in ub9xx drivers. This makes it easier to deal with all the read/write functions with a semantic patch. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ef205273132bdc9bcfa1540eef8105475a453300 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:05 2025 +0530 media: i2c: ds90ub913: Fix returned fmt from .set_fmt() When setting the sink pad's stream format, set_fmt accidentally changes the returned format's code to 'outcode', while the purpose is to only use the 'outcode' for the propagated source stream format. Fixes: c158d0d4ff15 ("media: i2c: add DS90UB913 driver") Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 671b550fe6282b936d79953731126ddffd75b520 Author: Tomi Valkeinen Date: Mon Mar 3 21:32:04 2025 +0530 media: i2c: ds90ub953: Fix error prints ub953_read_ind() and ub953_write_ind() have broken error prints, and the register address is printed incorrectly. Fix the prints. Signed-off-by: Tomi Valkeinen Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 59b24c0047a2e662325fdffeea4d9c9db2d31916 Author: David Heidelberg Date: Mon Apr 14 21:12:29 2025 +0200 media: dt-bindings: media: i2c: align filenames format with standard Append missing vendor and align with other sony definitions. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: David Heidelberg Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0e7db503c5355ff9a7471d0a450bde8c069ef803 Author: Karol Wachowski Date: Wed Apr 16 12:25:55 2025 +0200 accel/ivpu: Implement heartbeat-based TDR mechanism Introduce a heartbeat-based Timeout Detection and Recovery (TDR) mechanism. The enhancement aims to improve the reliability of device hang detection by monitoring heartbeat updates. Each progressing inference will update heartbeat counter allowing driver to monitor its progression. Limit maximum number of reschedules when heartbeat indicates progression to 30. This increases the maximum running time of single inference to about 60 seconds. The heartbeat mechanism provides a more robust method for detecting device hangs, potentially reducing false positive recoveries due to long running inferences. Signed-off-by: Karol Wachowski Signed-off-by: Maciej Falkowski Reviewed-by: Jeff Hugo Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250416102555.384526-1-maciej.falkowski@linux.intel.com commit 6e94adb40a8a24a4cc54459a13b6ca0de8f2fd04 Author: Frank Li Date: Wed Apr 23 20:41:30 2025 -0400 arm64: dts: imx8mq-evk: add pcie[0,1]-ep nodes Add pcie[0,1]-ep nodes and apply imx-pcie1-ep overlay file. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 627b791541204a365ec64d4609ba3a98ff3aaccb Author: Frank Li Date: Wed Apr 23 20:41:29 2025 -0400 arm64: dts: imx8mq: add pcie0-ep node Add pcie0-ep node for i.MX8QM. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit a705eb167ca4abd62b24540bcde19c592730caee Author: Frank Li Date: Wed Apr 23 20:41:28 2025 -0400 arm64: dts: imx8mm-evk: add pcie0-ep node and apply pcie0-ep overlay file Add pcie0-ep node information and apply pcie0-ep overlay file. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 58bea81052d0bf6e8fc438dda361569b72d3e8f1 Author: Frank Li Date: Wed Apr 23 20:41:27 2025 -0400 arm64: dts: imx95: add pcie1 ep overlay file and create pcie-ep dtb files Create imx95-15x15-evk pcie0-ep and imx95-19x19-evk pcie[0,1]-ep dtb files. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 1c9b0c6044c22835e2998d270ecca8a636e30294 Author: Frank Li Date: Wed Apr 23 20:41:26 2025 -0400 arm64: dts: imx8: use common imx-pcie0-ep.dtso to enable PCI ep function Use common imx-pcie0-ep.dtso for imx8mp-evk-pcie-ep and imx8qxp-mek-pcie-ep. No functional change. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit c1c4820b60d7a2ad19c428aa8668c87adb0e6e80 Author: Frank Li Date: Wed Apr 23 20:41:25 2025 -0400 arm64: dts: imx8dxl-evk: Add pcie0-ep node and use unified pcie0 label Use unified pcie0 label and add pcie0-ep node. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 6f3287eae412a1bd3919a1085d4b72f13690fc97 Author: Frank Li Date: Wed Apr 23 20:41:24 2025 -0400 arm64: dts: imx8dxl-ss-hsio: correct irq number for imx8dxl i.MX8DXL use difference irq number for PCIe EP DMA. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 06d9879c106f683bd43bc9509ce444b11b863a83 Author: Frank Li Date: Wed Apr 23 20:41:23 2025 -0400 arm64: dts: imx8: create unified pcie0 and pcie0_ep label for all chips Add unified pcie and pcie_ep label for existed chipes to prepare applied one overay file to enable EP function. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit e2cfc140ae25cff0aae5a417adef0c0da61951c4 Author: Max Krummenacher Date: Wed Apr 16 17:13:41 2025 +0200 arm64: dts: imx8-apalis: Add PCIe and SATA support The needed drivers to support PCIe and SATA for i.MX 8QM have been added. Configure them for the Apalis iMX8 SoM. The pciea and pcieb blocks each get a single PCIe lane, pciea is available on the carrier boards while pcieb is connected to the on module Wi-Fi/BT module. The SATA lane is available on the carrier boards. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo commit bf0b4f15267ca4047bbc533c83d9f7b7f447b5a1 Author: Nathan Chancellor Date: Thu Apr 24 17:23:22 2025 -0700 crypto: riscv - Use SYM_FUNC_START for functions only called directly After some recent changes to the RISC-V crypto code that turned some indirect function calls into direct ones, builds with CONFIG_CFI_CLANG fail with: ld.lld: error: undefined symbol: __kcfi_typeid_sm3_transform_zvksh_zvkb >>> referenced by arch/riscv/crypto/sm3-riscv64-zvksh-zvkb.o:(.text+0x2) in archive vmlinux.a ld.lld: error: undefined symbol: __kcfi_typeid_sha512_transform_zvknhb_zvkb >>> referenced by arch/riscv/crypto/sha512-riscv64-zvknhb-zvkb.o:(.text+0x2) in archive vmlinux.a ld.lld: error: undefined symbol: __kcfi_typeid_sha256_transform_zvknha_or_zvknhb_zvkb >>> referenced by arch/riscv/crypto/sha256-riscv64-zvknha_or_zvknhb-zvkb.o:(.text+0x2) in archive vmlinux.a As these functions are no longer indirectly called (i.e., have their address taken), the compiler will not emit __kcfi_typeid symbols for them but SYM_TYPED_FUNC_START expects these to exist at link time. Switch the definitions of these functions to use SYM_FUNC_START, as they no longer need kCFI type information since they are only called directly. Fixes: 1523eaed0ac5 ("crypto: riscv/sm3 - Use API partial block handling") Fixes: 561aab1104d8 ("crypto: riscv/sha512 - Use API partial block handling") Fixes: e6c5597badf2 ("crypto: riscv/sha256 - Use API partial block handling") Signed-off-by: Nathan Chancellor Signed-off-by: Herbert Xu commit aa38d87ec85273e3cee5ad60342930612315e540 Author: Herbert Xu Date: Thu Apr 24 22:42:51 2025 +0800 crypto: engine - Remove CRYPTO_ALG_ENGINE bit Remove the private and obsolete CRYPTO_ALG_ENGINE bit which is conflicting with the new CRYPTO_ALG_DUP_FIRST bit. Reported-by: Corentin Labbe Fixes: f1440a90465b ("crypto: api - Add support for duplicating algorithms before registration") Signed-off-by: Herbert Xu commit bf4b8794de2019d6d8355a6bb220d806c7012e32 Merge: 4c7d3c88c77bf2 f40139fde5278d Author: Jens Axboe Date: Thu Apr 24 20:41:11 2025 -0600 Merge branch 'block-6.15' into for-6.16/block Merge 6.15 block fixes - both to get the fixes causing issues with XFS testing, but also to make it easier for 6.16 ublk patches to avoid conflicts. * block-6.15: ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd ublk: call ublk_dispatch_req() for handling UBLK_U_IO_NEED_GET_DATA block: don't autoload drivers on blk-cgroup configuration block: don't autoload drivers on stat block: remove the backing_inode variable in bdev_statx block: move blkdev_{get,put} _no_open prototypes out of blkdev.h block: never reduce ra_pages in blk_apply_bdi_limits selftests: ublk: common: fix _get_disk_dev_t for pre-9.0 coreutils selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' selftests: ublk: fix recover test block: hoist block size validation code to a separate function block: fix race between set_blocksize and read paths nvmet: fix out-of-bounds access in nvmet_enable_port commit 3715cb9863ced462fc1bcc3e1a8444db4b16927c Merge: 63dc06cd12f980 a32f1923c6d6e9 Author: Herbert Xu Date: Fri Apr 25 10:37:30 2025 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up the scompress scratch refcount fix. The merge resolution is slightly non-trivial as the context has shifted. commit 99b11851e5ed599c626d26834e57e3df2e31fffd Author: Peter Colberg Date: Mon Mar 17 17:01:36 2025 -0400 fpga: m10bmc-sec: change contact for secure update driver Change the maintainer for the Intel MAX10 BMC Secure Update driver from Peter Colberg to Matthew Gerlach and update the ABI documentation. Signed-off-by: Peter Colberg Acked-by: Matthew Gerlach Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20250317210136.72816-1-peter.colberg@altera.com Signed-off-by: Xu Yilun commit fb8bfb48a4d11efb9b3e492d7c5e9ae7478786ce Author: Chen-Yu Tsai Date: Mon Apr 21 18:12:46 2025 +0800 platform/chrome: of_hw_prober: Support touchscreen probing on Squirtle The MT8186 Squirtle Chromebook is built with one of two possible touchscreens. Let the prober probe for them. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250421101248.426929-9-wenst@chromium.org Signed-off-by: Tzung-Bi Shih commit 73d32c3e74e1bd679617b9b9c06d806dedd7c055 Author: Chen-Yu Tsai Date: Mon Apr 21 18:12:45 2025 +0800 platform/chrome: of_hw_prober: Support trackpad probing on Corsola family Various MT8186 Corsola Chromebooks (squirtle, steelix and voltorb families) have second source trackpads that need to be probed. The power supply for these are always on and their reset/enable lines are not exposed. Add them to the probing list. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250421101248.426929-8-wenst@chromium.org Signed-off-by: Tzung-Bi Shih commit e05fae71e68f84c0743eda72fdddeee1e468e9e5 Author: Markus Niebel Date: Thu Apr 17 10:15:20 2025 +0200 Revert "arm64: dts: imx93-tqma9352-mba93xxla: enable Open Drain for MDIO" Using the MDIO pins with Open Drain causes spec violations of the signals. Revert the changes. This reverts commit 315d7f301e234b99c1b9619f0b14cf288dc7c33f. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 14e66e4b13221d1b50291441600f5739abe50e09 Author: Markus Niebel Date: Thu Apr 17 10:15:19 2025 +0200 Revert "arm64: dts: imx93-tqma9352-mba93xxca: enable Open Drain for MDIO" Using the MDIO pins with Open Drain causes spec violations of the signals. Revert the changes. This reverts commit 9015397c2f2d9d327c0cf88d74e39c4858cb4912. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 8dd0e8a4966804e8aaf40c03e508191256e1437b Author: Adam Ford Date: Tue Apr 15 20:01:36 2025 -0500 arm64: dts: imx8mp-beacon: Enable RTC interrupt and wakeup-source Enable the interrupts and wakeup-source to allow the external RTC to be used as an alarm. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 12cc5a3898db7ea2ee756672f511a2cde370142a Author: Adam Ford Date: Tue Apr 15 20:01:35 2025 -0500 arm64: dts: imx8mn-beacon: Enable RTC interrupt and wakeup-source Enable the interrupts and wakeup-source to allow the external RTC to be used as an alarm. Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 2cb333ddd62f265be052842454e310c0a433b65a Author: Adam Ford Date: Tue Apr 15 20:01:34 2025 -0500 arm64: dts: imx8mm-beacon: Enable RTC interrupt and wakeup-source Enable the interrupts and wakeup-source to allow the external RTC to be used as an alarm. Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit b08fc2f0fd99abc6cb2320fc58e2ff22a02f2b92 Author: Adam Ford Date: Tue Apr 15 20:01:33 2025 -0500 arm64: dts: imx8mn-beacon: Configure Ethernet PHY reset and GPIO IRQ The Ethernet PHY setup currently assumes that the bootloader will take the PHY out of reset, but this behavior is not guaranteed across all bootloaders. Add the reset GPIO to ensure the kernel can properly control the PHY reset line. Also configure the PHY IRQ GPIO to enable interrupt-driven link status reporting, instead of relying on polling. This ensures more reliable Ethernet initialization and improves PHY event handling. Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 1c98ceb0d75e17aa59308ed0cf46e48b90006241 Author: Adam Ford Date: Tue Apr 15 20:01:32 2025 -0500 arm64: dts: imx8mm-beacon: Configure Ethernet PHY reset and GPIO IRQ The Ethernet PHY setup currently assumes that the bootloader will take the PHY out of reset, but this behavior is not guaranteed across all bootloaders. Add the reset GPIO to ensure the kernel can properly control the PHY reset line. Also configure the PHY IRQ GPIO to enable interrupt-driven link status reporting, instead of relying on polling. This ensures more reliable Ethernet initialization and improves PHY event handling. Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit a747c4dd2a60c4d0179b372032a4b98548135096 Author: Adam Ford Date: Tue Apr 15 20:01:31 2025 -0500 arm64: dts: imx8mn-beacon: Set SAI5 MCLK direction to output for HDMI audio The HDMI bridge chip fails to generate an audio source due to the SAI5 master clock (MCLK) direction not being set to output. This prevents proper clocking of the HDMI audio interface. Add the `fsl,sai-mclk-direction-output` property to the SAI5 node to ensure the MCLK is driven by the SoC, resolving the HDMI sound issue. Fixes: 1d6880ceef43 ("arm64: dts: imx8mn-beacon: Add HDMI video with sound") Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 8c716f80dfe8cd6ed9a2696847cea1affeeff6ff Author: Adam Ford Date: Tue Apr 15 20:01:30 2025 -0500 arm64: dts: imx8mm-beacon: Set SAI5 MCLK direction to output for HDMI audio The HDMI bridge chip fails to generate an audio source due to the SAI5 master clock (MCLK) direction not being set to output. This prevents proper clocking of the HDMI audio interface. Add the `fsl,sai-mclk-direction-output` property to the SAI5 node to ensure the MCLK is driven by the SoC, resolving the HDMI sound issue. Fixes: 8ad7d14d99f3 ("arm64: dts: imx8mm-beacon: Add HDMI video with sound") Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 6821ee17537938e919e8b86a541aae451f73165b Author: Adam Ford Date: Tue Apr 15 20:01:29 2025 -0500 arm64: dts: imx8mp-beacon: Fix RTC capacitive load Although not noticeable when used every day, the RTC appears to drift when left to sit over time. This is due to the capacitive load not being properly set. Fix RTC drift by correcting the capacitive load setting from 7000 to 12500, which matches the actual hardware configuration. Fixes: 25a5ccdce767 ("arm64: dts: freescale: Introduce imx8mp-beacon-kit") Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit c3f03bec30efd5082b55876846d57b5d17dae7b9 Author: Adam Ford Date: Tue Apr 15 20:01:28 2025 -0500 arm64: dts: imx8mn-beacon: Fix RTC capacitive load Although not noticeable when used every day, the RTC appears to drift when left to sit over time. This is due to the capacitive load not being properly set. Fix RTC drift by correcting the capacitive load setting from 7000 to 12500, which matches the actual hardware configuration. Fixes: 36ca3c8ccb53 ("arm64: dts: imx: Add Beacon i.MX8M Nano development kit") Signed-off-by: Adam Ford Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 2e98d456666d63f897ba153210bcef9d78ba0f3a Author: Adam Ford Date: Tue Apr 15 20:01:27 2025 -0500 arm64: dts: imx8mm-beacon: Fix RTC capacitive load Although not noticeable when used every day, the RTC appears to drift when left to sit over time. This is due to the capacitive load not being properly set. Fix RTC drift by correcting the capacitive load setting from 7000 to 12500, which matches the actual hardware configuration. Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit e5bc07026f9489908ab8aa11544a26123af0c54c Author: Markus Niebel Date: Tue Apr 15 14:59:45 2025 +0200 arm64: add initial device tree for TQMa93xx/MBa91xxCA This adds support for TQMa93xx module attached to MBa91xxCA board. TQMa93xx is a SOM using i.MX93 SOC. The SOM features PMIC, RAM, e-MMC and some optional peripherals like SPI-NOR, RTC, EEPROM, gyroscope and secure element. TQMa93xxCA can be attached directly while TQMa93xxLA needs an adapter. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 9f90a1c9ce7727ef6bf01cf1260401661e7992e4 Author: Markus Niebel Date: Tue Apr 15 14:59:44 2025 +0200 dt-bindings: arm: add MBa91xxCA Mainboard for TQMa93xxCA/LA SOM Add MBa91xxCA starterkit base board for TQMa93xxCA/LA SOM for parallel display evaluation. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Acked-by: Conor Dooley Signed-off-by: Shawn Guo commit 97dc91c0455815137960bebd8c77a64544fd1251 Author: Vitor Soares Date: Mon Apr 14 13:38:27 2025 +0100 arm64: dts: freescale: add Toradex SMARC iMX8MP Add DT support for Toradex SMARC iMX8MP SoM and Toradex SMARC Development carrier board. Link: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus Link: https://www.toradex.com/products/carrier-board/smarc-development-board-kit Co-developed-by: Hiago De Franco Signed-off-by: Hiago De Franco Signed-off-by: Vitor Soares Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 762807d39037fa601f7919d7fedd39e3e7f7d501 Author: Vitor Soares Date: Mon Apr 14 13:38:26 2025 +0100 dt-bindings: arm: fsl: add Toradex SMARC iMX8MP SoM and carrier Add DT compatible strings for Toradex SMARC iMX8MP SoM and Toradex SMARC Development carrier board. Link: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus Link: https://www.toradex.com/products/carrier-board/smarc-development-board-kit Acked-by: Conor Dooley Signed-off-by: Vitor Soares Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit eb0aadf0bd5edc8466ebff08bd17649807cc4da5 Author: Ciprian Marian Costea Date: Thu Apr 10 17:48:26 2025 +0300 arm64: dts: s32gxxxa-rdb: Add PCA85073A RTC module over I2C0 Add support for the PCA85073A RTC module connected via I2C0 on S32G274A-RDB2 and S32G399A-RDB3 boards. Note that the PCA85073A RTC module is not battery backed. Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li Reviewed-by: Matthias Brugger Signed-off-by: Shawn Guo commit 4acf6d4f6afc3478753e49c495132619667549d9 Merge: f74d14a7dfb10b 2593a0a1446ae4 Author: Jakub Kicinski Date: Thu Apr 24 18:30:36 2025 -0700 Merge branch 'fix-netdevim-to-correctly-mark-napi-ids' Joe Damato says: ==================== Fix netdevim to correctly mark NAPI IDs This series fixes netdevsim to correctly set the NAPI ID on the skb. This is helpful for writing tests around features that use SO_INCOMING_NAPI_ID. In addition to the netdevsim fix in patch 1, patches 2 & 3 do some self test refactoring and add a test for NAPI IDs. The test itself (patch 3) introduces a C helper because apparently python doesn't have socket.SO_INCOMING_NAPI_ID. v3: https://lore.kernel.org/20250418013719.12094-1-jdamato@fastly.com v2: https://lore.kernel.org/20250417013301.39228-1-jdamato@fastly.com rfcv1: https://lore.kernel.org/20250329000030.39543-1-jdamato@fastly.com ==================== Link: https://patch.msgid.link/20250424002746.16891-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit 2593a0a1446ae4bf651b0af1c42a421f511b4839 Author: Joe Damato Date: Thu Apr 24 00:27:33 2025 +0000 selftests: drv-net: Test that NAPI ID is non-zero Test that the SO_INCOMING_NAPI_ID of a network file descriptor is non-zero. This ensures that either the core networking stack or, in some cases like netdevsim, the driver correctly sets the NAPI ID. Signed-off-by: Joe Damato Link: https://patch.msgid.link/20250424002746.16891-4-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit 2b6d490b82668bbd0a9201c27154890f842e985f Author: Joe Damato Date: Thu Apr 24 00:27:32 2025 +0000 selftests: drv-net: Factor out ksft C helpers Factor ksft C helpers to a header so they can be used by other C-based tests. Signed-off-by: Joe Damato Link: https://patch.msgid.link/20250424002746.16891-3-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit f71c549b26a33fd62f1e9c7deeba738bfc73fbfc Author: Joe Damato Date: Thu Apr 24 00:27:31 2025 +0000 netdevsim: Mark NAPI ID on skb in nsim_rcv Previously, nsim_rcv was not marking the NAPI ID on the skb, leading to applications seeing a napi ID of 0 when using SO_INCOMING_NAPI_ID. To add to the userland confusion, netlink appears to correctly report the NAPI IDs for netdevsim queues but the resulting file descriptor from a call to accept() was reporting a NAPI ID of 0. Signed-off-by: Joe Damato Link: https://patch.msgid.link/20250424002746.16891-2-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit f74d14a7dfb10ba908ce799d2176817d097713c7 Author: Jakub Kicinski Date: Wed Apr 23 15:02:31 2025 -0700 tools: ynl: fix the header guard name for OVPN Thorsten reports that after upgrading system headers from linux-next the YNL build breaks. I typo'ed the header guard, _H is missing. Reported-by: Thorsten Leemhuis Link: https://lore.kernel.org/59ba7a94-17b9-485f-aa6d-14e4f01a7a39@leemhuis.info Fixes: 12b196568a3a ("tools: ynl: add missing header deps") Reviewed-by: Jacob Keller Tested-by: Thorsten Leemhuis Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250423220231.1035931-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 11533932f5c506f66281a147ff8469b97c108ab4 Author: Igor Pylypiv Date: Tue Apr 22 10:21:23 2025 -0700 ata: libata-scsi: Do not set the INFORMATION field twice for ATA PT For ATA PASS-THROUGH + fixed format sense data + NCQ autosense the INFORMATION sense data field is being written twice: - 1st write: (redundant) scsi_set_sense_information() sets the INFORMATION field to ATA LBA. This is incorrect for ATA PASS-THROUGH. - 2nd write: (correct) ata_scsi_set_passthru_sense_fields() sets the INFORMATION field to ATA ERROR/STATUS/DEVICE/COUNT(7:0) as per SAT spec. There is no user-visible issue because second write overwrites the incorrect data from the first write. This patch eliminates the reduntant write by moving the INFORMATION sense data field population logic to ata_scsi_qc_complete(). Signed-off-by: Igor Pylypiv Reviewed-by: Niklas Cassel Signed-off-by: Damien Le Moal commit d57ee99831e336576359beb26e2b140511c99106 Author: Johannes Berg Date: Wed Apr 23 17:08:08 2025 +0200 net: ethernet: mtk_wed: annotate RCU release in attach() There are some sparse warnings in wifi, and it seems that it's actually possible to annotate a function pointer with __releases(), making the sparse warnings go away. In a way that also serves as documentation that rcu_read_unlock() must be called in the attach method, so add that annotation. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20250423150811.456205-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit a764e8114d2d80e8b0f453084b2e9fcc6454b7a1 Merge: 4134bb726efdc7 2b13042d363632 Author: Jakub Kicinski Date: Thu Apr 24 18:21:07 2025 -0700 Merge branch 'tcp-fastopen-observability' Jeremy Harris says: ==================== tcp: fastopen: observability Whether TCP Fast Open was used for a connection is not reliably observable by an accepting application when the SYN passed no data. Fix this by noting during SYN receive processing that an acceptable Fast Open option was used, and provide this to userland via getsockopt TCP_INFO. ==================== Link: https://patch.msgid.link/20250423124334.4916-1-jgh@exim.org Signed-off-by: Jakub Kicinski commit 2b13042d3636327eb50c8a0ee06f629d52d1b8fb Author: Jeremy Harris Date: Wed Apr 23 13:43:34 2025 +0100 tcp: fastopen: pass TFO child indication through getsockopt tcp: fastopen: pass TFO child indication through getsockopt Note that this uses up the last bit of a field in struct tcp_info Signed-off-by: Jeremy Harris Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250423124334.4916-3-jgh@exim.org Signed-off-by: Jakub Kicinski commit bc2550b4e195754fbb24aac1f012d3dd9e3b4edc Author: Jeremy Harris Date: Wed Apr 23 13:43:33 2025 +0100 tcp: fastopen: note that a child socket was created tcp: fastopen: note that a child socket was created This uses up the last bit in a field of tcp_sock. Signed-off-by: Jeremy Harris Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250423124334.4916-2-jgh@exim.org Signed-off-by: Jakub Kicinski commit 4134bb726efdc7a4a64bd0f776359cb0564564b2 Author: Colin Ian King Date: Wed Apr 23 12:37:19 2025 +0100 net: ip_gre: Fix spelling mistake "demultiplexor" -> "demultiplexer" There is a spelling mistake in a pr_info message. Fix it. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250423113719.173539-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit a5b22b72e92a67e42f236a7c1c62245e30b1d477 Author: Xu Yang Date: Thu Apr 10 14:49:07 2025 +0800 arm64: dts: imx95-15x15-evk: enable USB2.0 node On this board, USB2.0 is a host-only port, add vbus regulator node and enable USB2.0 node. Signed-off-by: Xu Yang Signed-off-by: Shawn Guo commit c7358655579d280a2129eef047542101ac4e3579 Author: Xu Yang Date: Thu Apr 10 14:49:06 2025 +0800 arm64: dts: imx95-19x19-evk: enable USB2.0 node On this board, USB2.0 is a host-only port, add vbus regulator node and enable USB2.0 node. Reviewed-by: Frank Li Signed-off-by: Xu Yang Signed-off-by: Shawn Guo commit b6bf37e40cbec2ceb880b625d0635784dd64afec Author: Xu Yang Date: Thu Apr 10 14:49:05 2025 +0800 arm64: dts: imx95: add USB2.0 nodes Add USB2.0 controller and phy nodes. Tested-by: Alexander Stein # TQMa95xxSA Reviewed-by: Frank Li Signed-off-by: Xu Yang Signed-off-by: Shawn Guo commit 3a4236c379543878e957004d3415152d28955481 Author: Dan Carpenter Date: Wed Apr 23 11:25:45 2025 +0300 rxrpc: rxgk: Fix some reference count leaks These paths should call rxgk_put(gk) but they don't. In the rxgk_construct_response() function the "goto error;" will free the "response" skb as well calling rxgk_put() so that's a bonus. Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)") Signed-off-by: Dan Carpenter Acked-by: David Howells Link: https://patch.msgid.link/aAikCbsnnzYtVmIA@stanley.mountain Signed-off-by: Jakub Kicinski commit a1334d7a46c18823f00bf47fd9de250e90f1e532 Author: Francesco Dolcini Date: Thu Apr 10 08:40:00 2025 +0200 ARM: dts: imx6q-apalis: remove pcie-switch node The compatible "plx,pex8605" does not exist, there is no DT binding for it and there was never a driver matching this compatible, remove it. Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit ab4d874c9f44e448814f13b0fc8257d0efcfe230 Author: Martyn Welch Date: Wed Apr 9 19:37:27 2025 +0100 arm64: dts: imx8mp: Add device tree for Nitrogen8M Plus ENC Carrier Board Add support for Boundary Devices/Ezurio Nitrogen8M Plus ENC Carrier Board and it's SOM. Supported interfaces: - Serial Console - EQoS Ethernet - USB - eMMC - HDMI Signed-off-by: Martyn Welch Signed-off-by: Shawn Guo commit c8ad7ca20e6155cdb34e9058aa43ce457dba34fe Author: Martyn Welch Date: Wed Apr 9 19:37:26 2025 +0100 dt-bindings: arm: fsl: Add Boundary Device Nitrogen8M Plus ENC Carrier Board Adds support for the Nitrogen8M Plus System on Module and the Nitrogen8M Plus ENC Carrier Board. Signed-off-by: Martyn Welch Acked-by: Rob Herring (Arm) Signed-off-by: Shawn Guo commit 46eb012611f7a824231a53532c7bc86160bbc91a Merge: 4cc20482143c6d be552199150655 Author: Alexei Starovoitov Date: Thu Apr 24 17:24:28 2025 -0700 Merge branch 'selftests-bpf-fix-a-few-issues-in-arena_spin_lock' Ilya Leoshkevich says: ==================== I tried running the arena_spin_lock test on s390x and ran into the following issues: * Changing the header file does not lead to rebuilding the test. * The checked for number of CPUs and the actually required number of CPUs are different. * Endianness issue in spinlock definition. This series fixes all three. ==================== Link: https://patch.msgid.link/20250424165525.154403-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit be5521991506552c0873371694e4a2cb263e1b9c Author: Ilya Leoshkevich Date: Thu Apr 24 18:41:27 2025 +0200 selftests/bpf: Fix endianness issue in __qspinlock declaration Copy the big-endian field declarations from qspinlock_types.h, otherwise some properties won't hold on big-endian systems. For example, assigning lock->val = 1 should result in lock->locked == 1, which is not the case there. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250424165525.154403-4-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 0240e5a9431cb48f980fd44f913d7f0886b0aded Author: Ilya Leoshkevich Date: Thu Apr 24 18:41:26 2025 +0200 selftests/bpf: Fix arena_spin_lock on systems with less than 16 CPUs test_arena_spin_lock_size() explicitly requires having at least 2 CPUs, but if the machine has less than 16, then pthread_setaffinity_np() call in spin_lock_thread() fails. Cap threads to the number of CPUs. Alternative solutions are raising the number of required CPUs to 16, or pinning multiple threads to the same CPU, but they are not that useful. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250424165525.154403-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit ddfd1f30b5badcd06c199fa519bec5f0f54892e0 Author: Ilya Leoshkevich Date: Thu Apr 24 18:41:25 2025 +0200 selftests/bpf: Fix arena_spin_lock.c build dependency Changing bpf_arena_spin_lock.h does not lead to recompiling arena_spin_lock.c. By convention, all BPF progs depend on all header files in progs/, so move this header file there. There are no other users besides arena_spin_lock.c. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20250424165525.154403-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit ffb0c5c4cf666380b8786e87c954967cbad22ad8 Author: Bo-Cun Chen Date: Wed Apr 23 01:48:02 2025 +0100 net: ethernet: mtk_eth_soc: convert cap_bit in mtk_eth_muxc struct to u64 With commit 51a4df60db5c2 ("net: ethernet: mtk_eth_soc: convert caps in mtk_soc_data struct to u64") the capabilities bitfield was converted to a 64-bit value, but a cap_bit in struct mtk_eth_muxc which is used to store a full bitfield (rather than the bit number, as the name would suggest) still holds only a 32-bit value. Change the type of cap_bit to u64 in order to avoid truncating the bitfield which results in path selection to not work with capabilities above the 32-bit limit. The values currently stored in the cap_bit field are MTK_ETH_MUX_GDM1_TO_GMAC1_ESW: BIT_ULL(18) | BIT_ULL(5) MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY: BIT_ULL(19) | BIT_ULL(5) | BIT_ULL(6) MTK_ETH_MUX_U3_GMAC2_TO_QPHY: BIT_ULL(20) | BIT_ULL(5) | BIT_ULL(6) MTK_ETH_MUX_GMAC1_GMAC2_TO_SGMII_RGMII: BIT_ULL(20) | BIT_ULL(5) | BIT_ULL(7) MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII: BIT_ULL(21) | BIT_ULL(5) While all those values are currently still within 32-bit boundaries, the addition of new capabilities of MT7988 as well as future SoC's like MT7987 will exceed them. Also, the use of a 32-bit 'int' type to store the result of a BIT_ULL(...) is misleading. Signed-off-by: Bo-Cun Chen Signed-off-by: Daniel Golle Reviewed-by: Simon Horman Link: https://patch.msgid.link/ded98b0d716c3203017a7a92151516ec2bf1abee.1745369249.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 39144062ea335495d659b08c9e3133ab746a0b1b Author: Dr. David Alan Gilbert Date: Wed Apr 23 00:51:47 2025 +0100 rxrpc: Remove deadcode Remove three functions that are no longer used. rxrpc_get_txbuf() last use was removed by 2020's commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and local processor work") rxrpc_kernel_get_epoch() last use was removed by 2020's commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be ambiguous") rxrpc_kernel_set_max_life() last use was removed by 2023's commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been granted a channel") Both of the rxrpc_kernel_* functions were documented. Remove that documentation as well as the code. Signed-off-by: Dr. David Alan Gilbert Acked-by: David Howells Link: https://patch.msgid.link/20250422235147.146460-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 6fdc754b922bcb788c4aec54ce8182598d2cf66f Merge: df8cf32413fa48 538cb5573ae79d Author: Jakub Kicinski Date: Thu Apr 24 16:59:55 2025 -0700 Merge branch 'net-bcmasp-add-v3-0-and-remove-v2-0' Justin Chen says: ==================== net: bcmasp: Add v3.0 and remove v2.0 asp-v2.0 had one supported SoC that never saw the light of day. Given that it was the first iteration of the HW, it ended up with some one off HW design decisions that were changed in futher iterations of the HW. We remove support to simplify the code and make it easier to add future revisions. Add support for asp-v3.0. asp-v3.0 reduces the feature set for cost savings. We reduce the number of channel/network filters. And also remove some features and statistics. ==================== Link: https://patch.msgid.link/20250422233645.1931036-1-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 538cb5573ae79d90e48f5f195e87e5bb73519825 Author: Justin Chen Date: Tue Apr 22 16:36:45 2025 -0700 net: phy: mdio-bcm-unimac: Add asp-v3.0 Add mdio compat string for asp-v3.0 ethernet driver. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-9-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit e9f31435ee7d1dd350f5efaf9de7b0db3ad4bbfe Author: Justin Chen Date: Tue Apr 22 16:36:44 2025 -0700 net: bcmasp: Add support for asp-v3.0 The asp-v3.0 is a major HW revision that reduced the number of channels and filters. The goal was to save cost by reducing the feature set. Changes for asp-v3.0 - Number of network filters were reduced. - Number of channels were reduced. - EDPKT stats were removed. - Fix a bug with csum offload. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-8-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 9a8a73766b34a2e8ef1b2dfa85bfecece2cd3702 Author: Justin Chen Date: Tue Apr 22 16:36:43 2025 -0700 dt-bindings: net: brcm,unimac-mdio: Add asp-v3.0 The asp-v3.0 Ethernet controller uses a brcm unimac like its predecessor. Signed-off-by: Justin Chen Acked-by: Conor Dooley Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-7-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit e4bf8f8a22d83ef82fc679b835072a290889b3f8 Author: Justin Chen Date: Tue Apr 22 16:36:42 2025 -0700 dt-bindings: net: brcm,asp-v2.0: Add asp-v3.0 Add asp-v3.0 support. v3.0 is a major revision that reduces the feature set for cost savings. We have a reduced amount of channels and network filters. Signed-off-by: Justin Chen Acked-by: Conor Dooley Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-6-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 8c28aace88646ce0ac9567fee3ac7d808c6d0f86 Author: Justin Chen Date: Tue Apr 22 16:36:41 2025 -0700 net: phy: mdio-bcm-unimac: Remove asp-v2.0 Remove asp-v2.0 which will no longer be supported. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-5-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 4ad8cb76bd0d17827fd0c84707c0d72c8710b0e9 Author: Justin Chen Date: Tue Apr 22 16:36:40 2025 -0700 net: bcmasp: Remove support for asp-v2.0 The SoC that supported asp-v2.0 never saw the light of day. asp-v2.0 has quirks that makes the logic overly complicated. For example, asp-v2.0 is the only revision that has a different wake up IRQ hook up. Remove asp-v2.0 support to make supporting future HW revisions cleaner. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-4-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 62c8c4656ef1ce4ad14926e459816c77de3bbb9e Author: Justin Chen Date: Tue Apr 22 16:36:39 2025 -0700 dt-bindings: net: brcm,unimac-mdio: Remove asp-v2.0 Remove asp-v2.0 which was only supported on one SoC that never saw the light of day. Signed-off-by: Justin Chen Acked-by: Conor Dooley Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-3-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit ef7c993ae24781957c225e419cdd2ea19c818c56 Author: Justin Chen Date: Tue Apr 22 16:36:38 2025 -0700 dt-bindings: net: brcm,asp-v2.0: Remove asp-v2.0 Remove asp-v2.0 which was only supported on one SoC that never saw the light of day. Signed-off-by: Justin Chen Acked-by: Conor Dooley Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250422233645.1931036-2-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit df8cf32413fa487313eb799f28f87a543480cfa0 Author: Haiyue Wang Date: Sat Apr 19 22:10:15 2025 +0800 selftests: iou-zcrx: Get the page size at runtime Use the API `sysconf()` to query page size at runtime, instead of using hard code number 4096. And use `posix_memalign` to allocate the page size aligned momory. Signed-off-by: Haiyue Wang Reviewed-by: Simon Horman Reviewed-by: David Wei Link: https://patch.msgid.link/20250419141044.10304-1-haiyuewa@163.com Signed-off-by: Jakub Kicinski commit 238ae3be582070aedd91c75f07483fbb2a77fc45 Author: Matthew Brost Date: Wed Apr 23 10:17:25 2025 -0700 drm/xe: Abort printing coredump in VM printer output if full Abort printing coredump in VM printer output if full. Helps speedup large coredumps which need to walked multiple times in xe_devcoredump_read. v2: - s/drm_printer_is_full/drm_coredump_printer_is_full (Jani) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250423171725.597955-5-matthew.brost@intel.com commit fa4b8b3e3a11765a42066f23db7100c09a661c25 Author: Matthew Brost Date: Wed Apr 23 10:17:24 2025 -0700 drm/print: Add drm_coredump_printer_is_full Add drm_coredump_printer_is_full which indicates if a drm printer's output is full. Useful to short circuit coredump printing once printer's output is full. v2: - s/drm_printer_is_full/drm_coredump_printer_is_full (Jani) v3: - Bail if not a coredump printer (Michal) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250423171725.597955-4-matthew.brost@intel.com commit 270172f64b114451876c1b68912653e72ab99f38 Author: Matthew Brost Date: Wed Apr 23 10:17:23 2025 -0700 drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access Add migrate layer functions to access VRAM and update xe_ttm_access_memory to use for non-visible access and large (more than 16k) BO access. 8G devcoreump on BMG observed 3 minute CPU copy time vs. 3s GPU copy time. v4: - Fix non-page aligned accesses - Add support for small / unaligned access - Update commit message indicating migrate used for large accesses (Auld) - Fix warning in xe_res_cursor for non-zero offset v5: - Fix 32 bit build (CI) v6: - Rebase and use SVM migration copy functions v7: - Fix build error (CI) v8: - Remove ifdef around VRAM copy functions (CI) - Use break statement in dma unmmaping (Jonathan) - Use if/else rather than goto (Jonathan) - Use single return point (Jonathan) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250423171725.597955-3-matthew.brost@intel.com commit c4a2e5f865b7230a9565c57c54b375b1d2ce82f5 Author: Matthew Brost Date: Wed Apr 23 10:17:22 2025 -0700 drm/xe: Add devcoredump chunking Chunk devcoredump into 1.5G pieces to avoid hitting the kvmalloc limit of 2G. Simple algorithm reads 1.5G at time in xe_devcoredump_read callback as needed. Some memory allocations are changed to GFP_ATOMIC as they done in xe_devcoredump_read which holds lock in the path of reclaim. The allocations are small, so in practice should never fail. v2: - Update commit message wrt gfp atomic (John H) v6: - Drop GFP_ATOMIC change for hwconfig (John H) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://lore.kernel.org/r/20250423171725.597955-2-matthew.brost@intel.com commit 0248bfb2557932b27d3e1375a3dc6902127b42bc Author: Thorsten Blum Date: Wed Feb 19 11:44:35 2025 +0100 clk: socfpga: stratix10: Optimize local variables Since readl() returns a u32, the local variable reg can also have the data type u32. Furthermore, mdiv and refdiv are derived from reg and can also be a u32. Since do_div() casts the divisor to u32 anyway, changing the data type of refdiv to u32 removes the following Coccinelle/coccicheck warning reported by do_div.cocci: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead Compile-tested only. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thorsten Blum Signed-off-by: Dinh Nguyen commit ab4999906aed5b97985d47e52f7465358cf920e6 Author: Thorsten Blum Date: Wed Feb 19 11:42:25 2025 +0100 clk: socfpga: clk-pll: Optimize local variables Since readl() returns a u32, the local variables reg and bypass can also have the data type u32. Furthermore, divf and divq are derived from reg and can also be a u32. Since do_div() casts the divisor to u32 anyway, changing the data type of divq to u32 removes the following Coccinelle/coccicheck warning reported by do_div.cocci: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead Compile-tested only. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thorsten Blum Signed-off-by: Dinh Nguyen commit aa264d9511aa5befa28cf8d9f32fce78fcf1a773 Author: Thorsten Blum Date: Wed Apr 16 21:09:07 2025 +0200 nios2: Replace strcpy() with strscpy() and simplify setup_cpuinfo() strcpy() is deprecated; use strscpy() instead. Since the destination buffer has a fixed length, strscpy() automatically determines its size using sizeof() when the size argument is omitted. This makes the explicit size argument unnecessary - remove it. Now, combine both if-else branches using strscpy() and the same buffer into a single statement to simplify the code. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Reviewed-by: Kees Cook Signed-off-by: Dinh Nguyen commit 83ab598362fb3a30cf2789f7482878084ff8efaa Author: Simon Schuster Date: Thu Mar 27 14:56:24 2025 +0100 nios2: do not introduce conflicting mappings when flushing tlb entries The NIOS2 hardware does not support conflicting mappings for the same virtual address (see Nios II Processor Reference Guide from 2023.08.28): "The operating system software is responsible for guaranteeing that multiple TLB entries do not map the same virtual address. The hardware behavior is undefined when multiple entries map the same virtual address." When flushing tlb-entries, the kernel may violate this invariant for virtual addresses related to PID 0 as flushing is currently implemented by assigning physical address, pid and flags to 0. A small example: Before flushing TLB mappings for pid:0x42: dump tlb-entries for line=0xd (addr 000d0000): -- way:09 vpn:0x0006d000 phys:0x01145000 pid:0x00 flags:rw--c ... -- way:0d vpn:0x0006d000 phys:0x02020000 pid:0x42 flags:rw--c After flushing TLB mappings for pid:0x42: dump tlb-entries for line=0xd (addr 000d0000): -- way:09 vpn:0x0006d000 phys:0x01145000 pid:0x00 flags:rw--c ... -- way:0d vpn:0x0006d000 phys:0x00000000 pid:0x00 flags:----- As functions such as replace_tlb_one_pid operate on the assumption of unique mappings, this can cause repeated pagefaults for a single address that are not covered by the existing spurious pagefault handling. This commit fixes this issue by keeping the pid field of the entries when flushing. That way, no conflicting mappings are introduced as the pair of is now kept unique: Fixed example after flushing TLB mappings for pid:0x42: dump tlb-entries for line=0xd (addr 000d0000): -- way:09 vpn:0x0006d000 phys:0x01145000 pid:0x00 flags:rw--c ... -- way:0d vpn:0x0006d000 phys:0x00000000 pid:0x42 flags:----- When flushing the complete tlb/initialising all entries, the way is used as a substitute mmu pid value for the "invalid" entries. Signed-off-by: Simon Schuster Signed-off-by: Andreas Oetken Signed-off-by: Dinh Nguyen commit 2d8a3179ea035f9341b6a73e5ba4029fc67e983d Author: Simon Schuster Date: Thu Mar 27 14:54:22 2025 +0100 nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults NIOS2 uses a software-managed TLB for virtual address translation. To flush a cache line, the original mapping is replaced by one to physical address 0x0 with no permissions (rwx mapped to 0) set. This can lead to TLB-permission--related traps when such a nominally flushed entry is encountered as a mapping for an otherwise valid virtual address within a process (e.g. due to an MMU-PID-namespace rollover that previously flushed the complete TLB including entries of existing, running processes). The default ptep_set_access_flags implementation from mm/pgtable-generic.c only forces a TLB-update when the page-table entry has changed within the page table: /* * [...] We return whether the PTE actually changed, which in turn * instructs the caller to do things like update__mmu_cache. [...] */ int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int dirty) { int changed = !pte_same(*ptep, entry); if (changed) { set_pte_at(vma->vm_mm, address, ptep, entry); flush_tlb_fix_spurious_fault(vma, address); } return changed; } However, no cross-referencing with the TLB-state occurs, so the flushing-induced pseudo entries that are responsible for the pagefault in the first place are never pre-empted from TLB on this code path. This commit fixes this behaviour by always requesting a TLB-update in this part of the pagefault handling, fixing spurious page-faults on the way. The handling is a straightforward port of the logic from the MIPS architecture via an arch-specific ptep_set_access_flags function ported from arch/mips/include/asm/pgtable.h. Signed-off-by: Simon Schuster Signed-off-by: Andreas Oetken Signed-off-by: Dinh Nguyen commit 0a828c3ab07d997c10a86615d3f4ac8e701745b0 Author: Andrew Price Date: Wed Apr 23 16:35:28 2025 +0100 gfs2: Fix usage of bio->bi_status in gfs2_end_log_write bio->bi_status is an index into the blk_errors array, not an errno. Its __bitwise tag is cast away here, resulting in a sparse warning: fs/gfs2/lops.c:207:22: warning: cast from restricted blk_status_t We could either add __force to the cast and continue logging bi_status in the error message, or we could look up the errno in the array and log that. As sdp->sd_log_error is used as an errno in all other cases, look up the errno here for consistency. Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit 2c63986dd35fa9eb0d7d1530b5eb2244b7296e22 Author: Andreas Gruenbacher Date: Fri Apr 18 16:41:52 2025 +0200 gfs2: deallocate inodes in gfs2_create_inode When creating and destroying inodes, we are relying on the inode hash table to make sure that for a given inode number, only a single inode will exist. We then link that inode to its inode and iopen glock and let those glocks point back at the inode. However, when iget_failed() is called, the inode is removed from the inode hash table before gfs_evict_inode() is called, and uniqueness is no longer guaranteed. Commit f1046a472b70 ("gfs2: gl_object races fix") was trying to work around that problem by detaching the inode glock from the inode before calling iget_failed(), but that broke the inode deallocation code in gfs_evict_inode(). To fix that, deallocate partially created inodes in gfs2_create_inode() instead of relying on gfs_evict_inode() for doing that. This means that gfs2_evict_inode() and its helper functions will no longer see partially created inodes, and so some simplifications are possible there. Fixes: 9ffa18884cce ("gfs2: gl_object races fix") Signed-off-by: Andreas Gruenbacher commit cde89fdfdf18211c4f9011c42796c1d9eace43da Author: Mario Limonciello Date: Wed Apr 16 22:10:36 2025 -0500 ACPICA: Add support for printing AML arguments when trace point enabled When debug level is set to `ACPI_LV_TRACE_POINT` method start and exit are emitted into the debug logs. This can be useful to understand call paths, however none of the arguments for the method calls are populated even when turning up other debug levels. This can be useful for BIOSes that contain debug strings to see those strings. When `ACPI_LV_TRACE_POINT` is set also output all of the arguments for a given method call. This enables this type of debugging: ``` extrace-0138 ex_trace_point : Method Begin [0x0000000096b240c4:\M460] execution. extrace-0173 ex_trace_args : " POST CODE: %X ACPI TIMER: %X TIME: %d.%d ms\n", b0003f53, 1a26a8b2, 0, 15e, 0, 0 extrace-0138 ex_trace_point : Method End [0x0000000096b240c4:\M460] execution. ``` Link: https://github.com/acpica/acpica/commit/08219d91b5678ae2fae6e4f208df790a4e108c1c Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20250417031040.514460-1-superm1@kernel.org Link: https://github.com/acpica/acpica/pull/1012 Signed-off-by: Rafael J. Wysocki commit f304da9134f8c245d198502ad681ffae63b5e29c Author: JP Kobryn Date: Thu Apr 24 10:53:58 2025 -0700 cgroup: fix goto ordering in cgroup_init() Go to the appropriate section labels when css_rstat_init() or psi_cgroup_alloc() fails. Signed-off-by: JP Kobryn Fixes: a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based") Signed-off-by: Tejun Heo commit 798b9b1cb0e55c10fe761f42de5e28ecec8ef1f4 Author: Uros Bizjak Date: Mon Apr 14 10:10:51 2025 +0200 KVM: VMX: Use LEAVE in vmx_do_interrupt_irqoff() Micro-optimize vmx_do_interrupt_irqoff() by substituting MOV %RBP,%RSP; POP %RBP instruction sequence with equivalent LEAVE instruction. GCC compiler does this by default for a generic tuning and for all modern processors: DEF_TUNE (X86_TUNE_USE_LEAVE, "use_leave", m_386 | m_CORE_ALL | m_K6_GEODE | m_AMD_MULTIPLE | m_ZHAOXIN | m_TREMONT | m_CORE_HYBRID | m_CORE_ATOM | m_GENERIC) The new code also saves a couple of bytes, from: 27: 48 89 ec mov %rbp,%rsp 2a: 5d pop %rbp to: 27: c9 leave No functional change intended. Signed-off-by: Uros Bizjak Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Vitaly Kuznetsov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20250414081131.97374-2-ubizjak@gmail.com Signed-off-by: Sean Christopherson commit 17a2c62fbf1ea46f3ae32c601350488d2b6df730 Author: Sean Christopherson Date: Fri Mar 14 19:44:02 2025 -0700 KVM: nVMX: Check MSR load/store list counts during VM-Enter consistency checks Explicitly verify the MSR load/store list counts are below the advertised limit as part of the initial consistency checks on the lists, so that code that consumes the count doesn't need to worry about extreme edge cases. Enforcing the limit during the initial checks fixes a flaw on 32-bit KVM where a sufficiently high @count could lead to overflow: arch/x86/kvm/vmx/nested.c:834 nested_vmx_check_msr_switch() warn: potential user controlled sizeof overflow 'addr + count * 16' '0-u64max + 16-68719476720' arch/x86/kvm/vmx/nested.c 827 static int nested_vmx_check_msr_switch(struct kvm_vcpu *vcpu, 828 u32 count, u64 addr) 829 { 830 if (count == 0) 831 return 0; 832 833 if (!kvm_vcpu_is_legal_aligned_gpa(vcpu, addr, 16) || --> 834 !kvm_vcpu_is_legal_gpa(vcpu, (addr + count * sizeof(struct vmx_msr_entry) - 1))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ While the SDM doesn't explicitly state an illegal count results in VM-Fail, the SDM states that exceeding the limit may result in undefined behavior. I.e. the SDM gives hardware, and thus KVM, carte blanche to do literally anything in response to a count that exceeds the "recommended" limit. If the limit is exceeded, undefined processor behavior may result (including a machine check during the VMX transition). KVM already enforces the limit when processing the MSRs, i.e. already signals a late VM-Exit Consistency Check for VM-Enter, and generates a VMX Abort for VM-Exit. I.e. explicitly checking the limits simply means KVM will signal VM-Fail instead of VM-Exit or VMX Abort. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/44961459-2759-4164-b604-f6bd43da8ce9@stanley.mountain Link: https://lore.kernel.org/r/20250315024402.2363098-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 5565acd1e6c4a1994e0ba32281ec10b69c0be14d Merge: bef4f1156b7472 087a9eb9e5978e Author: Jakub Kicinski Date: Thu Apr 24 11:14:16 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc4). This pull includes wireless and a fix to vxlan which isn't in Linus's tree just yet. The latter creates with a silent conflict / build breakage, so merging it now to avoid causing problems. drivers/net/vxlan/vxlan_vnifilter.c 094adad91310 ("vxlan: Use a single lock to protect the FDB table") 087a9eb9e597 ("vxlan: vnifilter: Fix unlocked deletion of default FDB entry") https://lore.kernel.org/20250423145131.513029-1-idosch@nvidia.com No "normal" conflicts, or adjacent changes. Signed-off-by: Jakub Kicinski commit 309d28576f0a23931a36bf67324868448f79a77e Author: Tom Lendacky Date: Thu Mar 27 12:39:56 2025 -0500 KVM: SVM: Fix SNP AP destroy race with VMRUN An AP destroy request for a target vCPU is typically followed by an RMPADJUST to remove the VMSA attribute from the page currently being used as the VMSA for the target vCPU. This can result in a vCPU that is about to VMRUN to exit with #VMEXIT_INVALID. This usually does not happen as APs are typically sitting in HLT when being destroyed and therefore the vCPU thread is not running at the time. However, if HLT is allowed inside the VM, then the vCPU could be about to VMRUN when the VMSA attribute is removed from the VMSA page, resulting in a #VMEXIT_INVALID when the vCPU actually issues the VMRUN and causing the guest to crash. An RMPADJUST against an in-use (already running) VMSA results in a #NPF for the vCPU issuing the RMPADJUST, so the VMSA attribute cannot be changed until the VMRUN for target vCPU exits. The Qemu command line option '-overcommit cpu-pm=on' is an example of allowing HLT inside the guest. Update the KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event to include the KVM_REQUEST_WAIT flag. The kvm_vcpu_kick() function will not wait for requests to be honored, so create kvm_make_request_and_kick() that will add a new event request and honor the KVM_REQUEST_WAIT flag. This will ensure that the target vCPU sees the AP destroy request before returning to the initiating vCPU should the target vCPU be in guest mode. Fixes: e366f92ea99e ("KVM: SEV: Support SEV-SNP AP Creation NAE event") Signed-off-by: Tom Lendacky Link: https://lore.kernel.org/r/fe2c885bf35643dd224e91294edb6777d5df23a4.1743097196.git.thomas.lendacky@amd.com [sean: add a comment explaining the use of smp_send_reschedule()] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit edaf3eded386257b0e6504f6b2c29fd8d84c8d29 Author: Sean Christopherson Date: Tue Apr 1 09:34:47 2025 -0700 x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and posted MSIs Now that posted MSI and KVM harvesting of PIR is identical, extract the code (and posted MSI's wonderful comment) to a common helper. No functional change intended. Link: https://lore.kernel.org/r/20250401163447.846608-9-seanjc@google.com Signed-off-by: Sean Christopherson commit baf68a0e3bd624bc300381a757f660451483fb7f Author: Sean Christopherson Date: Tue Apr 1 09:34:46 2025 -0700 KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentation Use arch_xchg() when moving IRQs from the PIR to the vIRR, purely to avoid instrumentation so that KVM is compatible with the needs of posted MSI. This will allow extracting the core PIR logic to common code and sharing it between KVM and posted MSI handling. Link: https://lore.kernel.org/r/20250401163447.846608-8-seanjc@google.com Signed-off-by: Sean Christopherson commit b41f8638b9d30fbe045b4ef83ff4136c56a57397 Author: Sean Christopherson Date: Tue Apr 1 09:34:45 2025 -0700 KVM: VMX: Isolate pure loads from atomic XCHG when processing PIR Rework KVM's processing of the PIR to use the same algorithm as posted MSIs, i.e. to do READ(x4) => XCHG(x4) instead of (READ+XCHG)(x4). Given KVM's long-standing, sub-optimal use of 32-bit accesses to the PIR, it's safe to say far more thought and investigation was put into handling the PIR for posted MSIs, i.e. there's no reason to assume KVM's existing logic is meaningful, let alone superior. Matching the processing done by posted MSIs will also allow deduplicating the code between KVM and posted MSIs. See the comment for handle_pending_pir() added by commit 1b03d82ba15e ("x86/irq: Install posted MSI notification handler") for details on why isolating loads from XCHG is desirable. Suggested-by: Jim Mattson Link: https://lore.kernel.org/r/20250401163447.846608-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 06b4d0ea226c295e85a9daa6aed0ae9fa3ff8a94 Author: Sean Christopherson Date: Tue Apr 1 09:34:44 2025 -0700 KVM: VMX: Process PIR using 64-bit accesses on 64-bit kernels Process the PIR at the natural kernel width, i.e. in 64-bit chunks on 64-bit kernels, so that the worst case of having a posted IRQ in each chunk of the vIRR only requires 4 loads and xchgs from/to the PIR, not 8. Deliberately use a "continue" to skip empty entries so that the code is a carbon copy of handle_pending_pir(), in anticipation of deduplicating KVM and posted MSI logic. Suggested-by: Jim Mattson Link: https://lore.kernel.org/r/20250401163447.846608-6-seanjc@google.com Signed-off-by: Sean Christopherson commit f1459315f4d2ff4bf02896e541e1566a69a8fd00 Author: Sean Christopherson Date: Tue Apr 1 09:34:43 2025 -0700 x86/irq: KVM: Track PIR bitmap as an "unsigned long" array Track the PIR bitmap in posted interrupt descriptor structures as an array of unsigned longs instead of using unionized arrays for KVM (u32s) versus IRQ management (u64s). In practice, because the non-KVM usage is (sanely) restricted to 64-bit kernels, all existing usage of the u64 variant is already working with unsigned longs. Using "unsigned long" for the array will allow reworking KVM's processing of the bitmap to read/write in 64-bit chunks on 64-bit kernels, i.e. will allow optimizing KVM by reducing the number of atomic accesses to PIR. Opportunstically replace the open coded literals in the posted MSIs code with the appropriate macro. Deliberately don't use ARRAY_SIZE() in the for-loops, even though it would be cleaner from a certain perspective, in anticipation of decoupling the processing from the array declaration. No functional change intended. Link: https://lore.kernel.org/r/20250401163447.846608-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 6433fc01f9f19573894cdcf776679c10d1310801 Author: Sean Christopherson Date: Tue Apr 1 09:34:42 2025 -0700 KVM: VMX: Ensure vIRR isn't reloaded at odd times when sync'ing PIR Read each vIRR exactly once when shuffling IRQs from the PIR to the vAPIC to ensure getting the highest priority IRQ from the chunk doesn't reload from the vIRR. In practice, a reload is functionally benign as vcpu->mutex is held and so IRQs can be consumed, i.e. new IRQs can appear, but existing IRQs can't disappear. Link: https://lore.kernel.org/r/20250401163447.846608-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 3cdb8261504cc5503a74d57e619cd7915431b088 Author: Sean Christopherson Date: Tue Apr 1 09:34:41 2025 -0700 x86/irq: Track if IRQ was found in PIR during initial loop (to load PIR vals) Track whether or not at least one IRQ was found in PIR during the initial loop to load PIR chunks from memory. Doing so generates slightly better code (arguably) for processing the for-loop of XCHGs, especially for the case where there are no pending IRQs. Note, while PIR can be modified between the initial load and the XCHG, it can only _gain_ new IRQs, i.e. there is no danger of a false positive due to the final version of pir_copy[] being empty. Opportunistically convert the boolean to an "unsigned long" and compute the effective boolean result via bitwise-OR. Some compilers, e.g. clang-14, need the extra "hint" to elide conditional branches. Opportunistically rename the variable in anticipation of moving the PIR accesses to a common helper that can be shared by posted MSIs and KVM. Old: <+74>: test %rdx,%rdx <+77>: je 0xffffffff812bbeb0 <+88>: mov $0x1,%dl> <+90>: test %rsi,%rsi <+93>: je 0xffffffff812bbe8c <+106>: mov $0x1,%dl <+108>: test %rcx,%rcx <+111>: je 0xffffffff812bbe9e <+124>: mov $0x1,%dl <+126>: test %rax,%rax <+129>: je 0xffffffff812bbeb9 <+142>: jmp 0xffffffff812bbec1 <+144>: xor %edx,%edx <+146>: test %rsi,%rsi <+149>: jne 0xffffffff812bbe7f <+151>: jmp 0xffffffff812bbe8c <+153>: test %dl,%dl <+155>: je 0xffffffff812bbf8e New: <+74>: mov %rax,%r8 <+77>: or %rcx,%r8 <+80>: or %rdx,%r8 <+83>: or %rsi,%r8 <+86>: setne %bl <+89>: je 0xffffffff812bbf88 <+95>: test %rsi,%rsi <+98>: je 0xffffffff812bbe8d <+109>: test %rdx,%rdx <+112>: je 0xffffffff812bbe9d <+125>: test %rcx,%rcx <+128>: je 0xffffffff812bbead <+141>: test %rax,%rax <+144>: je 0xffffffff812bbebd Link: https://lore.kernel.org/r/20250401163447.846608-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 600e9606046ac3b9b7a3f0500d08a179df84c45e Author: Sean Christopherson Date: Tue Apr 1 09:34:40 2025 -0700 x86/irq: Ensure initial PIR loads are performed exactly once Ensure the PIR is read exactly once at the start of handle_pending_pir(), to guarantee that checking for an outstanding posted interrupt in a given chuck doesn't reload the chunk from the "real" PIR. Functionally, a reload is benign, but it would defeat the purpose of pre-loading into a copy. Fixes: 1b03d82ba15e ("x86/irq: Install posted MSI notification handler") Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250401163447.846608-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 459074cff66f77af3f327e2c1f9256cdb146d798 Author: Sean Christopherson Date: Tue Apr 1 09:18:04 2025 -0700 KVM: x86: Add module param to control and enumerate device posted IRQs Add a module param to each KVM vendor module to allow disabling device posted interrupts without having to sacrifice all of APICv/AVIC, and to also effectively enumerate to userspace whether or not KVM may be utilizing device posted IRQs. Disabling device posted interrupts is very desirable for testing, and can even be desirable for production environments, e.g. if the host kernel wants to interpose on device interrupts. Put the module param in kvm-{amd,intel}.ko instead of kvm.ko to match the overall APICv/AVIC controls, and to avoid complications with said controls. E.g. if the param is in kvm.ko, KVM needs to be snapshot the original user-defined value to play nice with a vendor module being reloaded with different enable_apicv settings. Link: https://lore.kernel.org/r/20250401161804.842968-4-seanjc@google.com Signed-off-by: Sean Christopherson commit c364baad3e4f114284581c35d4b9006d59d2629a Author: Sean Christopherson Date: Tue Apr 1 09:18:02 2025 -0700 KVM: VMX: Don't send UNBLOCK when starting device assignment without APICv When starting device assignment, i.e. potential IRQ bypass, don't blast KVM_REQ_UNBLOCK if APICv is disabled/unsupported. There is no need to wake vCPUs if they can never use VT-d posted IRQs (sending UNBLOCK guards against races being vCPUs blocking and devices starting IRQ bypass). Opportunistically use kvm_arch_has_irq_bypass() for all relevant checks in the VMX Posted Interrupt code so that all checks in KVM x86 incorporate the same information (once AMD/AVIC is given similar treatment). Cc: Yosry Ahmed Link: https://lore.kernel.org/r/20250401161804.842968-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 87e4951e250bbccac47a8822f6f023a1de8b96ec Author: weizijie Date: Mon Mar 3 17:33:35 2025 -0800 KVM: x86: Rescan I/O APIC routes after EOI interception for old routing Rescan I/O APIC routes for a vCPU after handling an intercepted I/O APIC EOI for an IRQ that is not targeting said vCPU, i.e. after handling what's effectively a stale EOI VM-Exit. If a level-triggered IRQ is in-flight when IRQ routing changes, e.g. because the guest changes routing from its IRQ handler, then KVM intercepts EOIs on both the new and old target vCPUs, so that the in-flight IRQ can be de-asserted when it's EOI'd. However, only the EOI for the in-flight IRQ needs to be intercepted, as IRQs on the same vector with the new routing are coincidental, i.e. occur only if the guest is reusing the vector for multiple interrupt sources. If the I/O APIC routes aren't rescanned, KVM will unnecessarily intercept EOIs for the vector and negative impact the vCPU's interrupt performance. Note, both commit db2bdcbbbd32 ("KVM: x86: fix edge EOI and IOAPIC reconfig race") and commit 0fc5a36dd6b3 ("KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race") mentioned this issue, but it was considered a "rare" occurrence thus was not addressed. However in real environments, this issue can happen even in a well-behaved guest. Cc: Kai Huang Co-developed-by: xuyun Signed-off-by: xuyun Signed-off-by: weizijie [sean: massage changelog and comments, use int/-1, reset at scan] Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20250304013335.4155703-4-seanjc@google.com Signed-off-by: Sean Christopherson commit c2207bbc0c0f4b6ae8dbb73ec26e17aa0c45a3ca Author: Sean Christopherson Date: Mon Mar 3 17:33:34 2025 -0800 KVM: x86: Add a helper to deduplicate I/O APIC EOI interception logic Extract the vCPU specific EOI interception logic for I/O APIC emulation into a common helper for userspace and in-kernel emulation in anticipation of optimizing the "pending EOI" case. No functional change intended. Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20250304013335.4155703-3-seanjc@google.com Signed-off-by: Sean Christopherson commit b1f7723a5a5b018f4bc3fb8e234510be7c44ad00 Author: Sean Christopherson Date: Mon Mar 3 17:33:33 2025 -0800 KVM: x86: Isolate edge vs. level check in userspace I/O APIC route scanning Extract and isolate the trigger mode check in kvm_scan_ioapic_routes() in anticipation of moving destination matching logic to a common helper (for userspace vs. in-kernel I/O APIC emulation). No functional change intended. Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20250304013335.4155703-2-seanjc@google.com Signed-off-by: Sean Christopherson commit d88bb2ded2efdc3857f0706da097261523aa78b2 Author: Babu Moger Date: Tue Apr 8 17:57:09 2025 -0500 KVM: x86: Advertise support for AMD's PREFETCHI The latest AMD platform has introduced a new instruction called PREFETCHI. This instruction loads a cache line from a specified memory address into the indicated data or instruction cache level, based on locality reference hints. Feature bit definition: CPUID_Fn80000021_EAX [bit 20] - Indicates support for IC prefetch. This feature is analogous to Intel's PREFETCHITI (CPUID.(EAX=7,ECX=1):EDX), though the CPUID bit definitions differ between AMD and Intel. Advertise support to userspace, as no additional enabling is necessary (PREFETCHI can't be intercepted as there's no instruction specific behavior that needs to be virtualize). The feature is documented in Processor Programming Reference (PPR) for AMD Family 1Ah Model 02h, Revision C1 (Link below). Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/ee1c08fc400bb574a2b8f2c6a0bd9def10a29d35.1744130533.git.babu.moger@amd.com [sean: rewrite shortlog to highlight the KVM functionality] Signed-off-by: Sean Christopherson commit 49c140d5af127ef4faf19f06a89a0714edf0316f Author: Borislav Petkov Date: Mon Mar 24 17:06:17 2025 +0100 KVM: x86: Sort CPUID_8000_0021_EAX leaf bits properly WRMSR_XX_BASE_NS is bit 1 so put it there, add some new bits as comments only. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250324160617.15379-1-bp@kernel.org [sean: skip the FSRS/FSRC placeholders to avoid confusion] Signed-off-by: Sean Christopherson commit f804dc6aa20f2ce504456ffbaafc95db646c211b Author: Dan Carpenter Date: Mon Mar 24 13:53:39 2025 +0300 KVM: x86: clean up a return Returning a literal X86EMUL_CONTINUE is slightly clearer than returning rc. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/7604cbbf-15e6-45a8-afec-cf5be46c2924@stanley.mountain Signed-off-by: Sean Christopherson commit ead4dac16de22081956f7af1c795bfbebd2d5866 Author: Sean Christopherson Date: Wed Feb 26 17:01:11 2025 -0800 KVM: x86: Advertise support for WRMSRNS Advertise support for WRMSRNS (WRMSR non-serializing) to userspace if the instruction is supported by the underlying CPU. From a virtualization perspective, the only difference between WRMSRNS and WRMSR is that VM-Exits due to WRMSRNS set EXIT_QUALIFICATION to '1'. WRMSRNS doesn't require a new enabling control, shares the same basic exit reason, and behaves the same as WRMSR with respect to MSR interception. WRMSR and WRMSRNS use the same basic exit reason (see Appendix C). For WRMSR, the exit qualification is 0, while for WRMSRNS it is 1. Don't do anything different when emulating WRMSRNS vs. WRMSR, as KVM can't do anything less, i.e. can't make emulation non-serializing. The motivation for the guest to use WRMSRNS instead of WRMSR is to avoid immediately serializing the CPU when the necessary serialization is guaranteed by some other mechanism, i.e. WRMSRNS being fully serializing isn't guest-visible, just less performant. Suggested-by: Xin Li (Intel) Link: https://lore.kernel.org/r/20250227010111.3222742-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 3fa0fc95db6df904dc812fa806a55ea6bafa65c1 Author: Sean Christopherson Date: Wed Feb 26 17:01:10 2025 -0800 x86/msr: Rename the WRMSRNS opcode macro to ASM_WRMSRNS (for KVM) Rename the WRMSRNS instruction opcode macro so that it doesn't collide with X86_FEATURE_WRMSRNS when using token pasting to generate references to X86_FEATURE_WRMSRNS. KVM heavily uses token pasting to generate KVM's set of support feature bits, and adding WRMSRNS support in KVM will run will run afoul of the opcode macro. arch/x86/kvm/cpuid.c:719:37: error: pasting "X86_FEATURE_" and "" "" does not give a valid preprocessing token 719 | u32 __leaf = __feature_leaf(X86_FEATURE_##name); \ | ^~~~~~~~~~~~ KVM has worked around one such collision in the past by #undef'ing the problematic macro in order to avoid blocking a KVM rework, but such games are generally undesirable, e.g. requires bleeding macro details into KVM, risks weird behavior if what KVM is #undef'ing changes, etc. Reviewed-by: Xin Li (Intel) Link: https://lore.kernel.org/r/20250227010111.3222742-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 656d9624bd21d35499eaa5ee97fda6def62901c8 Author: Yosry Ahmed Date: Fri Feb 21 16:33:52 2025 +0000 KVM: x86: Generalize IBRS virtualization on emulated VM-exit Commit 2e7eab81425a ("KVM: VMX: Execute IBPB on emulated VM-exit when guest has IBRS") added an IBPB in the emulated VM-exit path on Intel to properly virtualize IBRS by providing separate predictor modes for L1 and L2. AMD requires similar handling, except when IbrsSameMode is enumerated by the host CPU (which is the case on most/all AMD CPUs). With IbrsSameMode, hardware IBRS is sufficient and no extra handling is needed from KVM. Generalize the handling in nested_vmx_vmexit() by moving it into a generic function, add the AMD handling, and use it in nested_svm_vmexit() too. The main reason for using a generic function is to have a single place to park the huge comment about virtualizing IBRS. Signed-off-by: Yosry Ahmed Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20250221163352.3818347-4-yosry.ahmed@linux.dev [sean: use kvm_nested_vmexit_handle_spec_ctrl() for the helper] Signed-off-by: Sean Christopherson commit 65ca2872015c232d6743b497e3c08ff96596b917 Author: Yosry Ahmed Date: Fri Feb 21 16:33:51 2025 +0000 KVM: x86: Propagate AMD's IbrsSameMode to the guest If IBRS provides same mode (kernel/user or host/guest) protection on the host, then by definition it also provides same mode protection in the guest. In fact, all different modes from the guest's perspective are the same mode from the host's perspective anyway. Propagate IbrsSameMode to the guests. Signed-off-by: Yosry Ahmed Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20250221163352.3818347-3-yosry.ahmed@linux.dev Signed-off-by: Sean Christopherson commit 9a7cb00a8ff7380a09fa75287a3f2642c472d562 Author: Yosry Ahmed Date: Fri Feb 21 16:33:50 2025 +0000 x86/cpufeatures: Define X86_FEATURE_AMD_IBRS_SAME_MODE Per the APM [1]: Some processors, identified by CPUID Fn8000_0008_EBX[IbrsSameMode] (bit 19) = 1, provide additional speculation limits. For these processors, when IBRS is set, indirect branch predictions are not influenced by any prior indirect branches, regardless of mode (CPL and guest/host) and regardless of whether the prior indirect branches occurred before or after the setting of IBRS. This is referred to as Same Mode IBRS. Define this feature bit, which will be used by KVM to determine if an IBPB is required on nested VM-exits in SVM. [1] AMD64 Architecture Programmer's Manual Pub. 40332, Rev 4.08 - April 2024, Volume 2, 3.2.9 Speculation Control MSRs Signed-off-by: Yosry Ahmed Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20250221163352.3818347-2-yosry.ahmed@linux.dev Signed-off-by: Sean Christopherson commit 18197e98353d931fc7bb2bb9ec671d3aa407831d Author: Xianwei Zhao Date: Mon Apr 14 14:30:16 2025 +0800 spi: meson-spicc: add DMA support Add DMA support for spicc driver. DMA works if the transfer meets the following conditions: 1. 64 bits per word; 2. The transfer length must be multiples of the dma_burst_len, and the dma_burst_len should be one of 8,7...2, otherwise, it will be split into several SPI bursts. Signed-off-by: Sunny Luo Signed-off-by: Xianwei Zhao Link: https://patch.msgid.link/20250414-spi-dma-v2-1-84bbd92fa469@amlogic.com Signed-off-by: Mark Brown commit 45eb29140e68ffe8e93a5471006858a018480a45 Merge: fd02aa45bda6d2 2d7124941a273c Author: Paolo Bonzini Date: Fri Apr 18 09:00:37 2025 -0400 Merge branch 'kvm-fixes-6.15-rc4' into HEAD * Single fix for broken usage of 'multi-MIDR' infrastructure in PI code, adding an open-coded erratum check for Cavium ThunderX * Bugfixes from a planned posted interrupt rework * Do not use kvm_rip_read() unconditionally to cater for guests with inaccessible register state. commit ff14943ea01db967fcc35767466ea028b5723793 Author: Mauro Carvalho Chehab Date: Thu Apr 24 08:16:24 2025 +0800 .gitignore: ignore Python compiled bytecode While the building system doesn't create any Python JIT bytecode, if one manually runs kernel-doc.py or get_abi.py, Python will, by default, create a bytecode and store it under scripts/lib/*. This is normal, and not controlled by the Kernel itself. So, add *.pyc as an extension to be ignored. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Miguel Ojeda Signed-off-by: Jonathan Corbet Message-ID: commit 5c5c32d7abd970f18ffca89eb6ada399bce496e5 Author: Mauro Carvalho Chehab Date: Thu Apr 24 08:16:23 2025 +0800 scripts/kernel-doc.py: don't create *.pyc files As reported by Andy, kernel-doc.py is creating a __pycache__ directory at build time. Disable creation of __pycache__ for the libraries used by kernel-doc.py, when excecuted via the build system or via scripts/find-unused-docs.sh. Reported-by: Andy Shevchenko Closes: https://lore.kernel.org/linux-doc/Z_zYXAJcTD-c3xTe@black.fi.intel.com/ Signed-off-by: Mauro Carvalho Chehab Tested-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Message-ID: <158b962ed7cd104f7bbfe69f499ec1cc378864db.1745453655.git.mchehab+huawei@kernel.org> commit 110214e4ccd46afa037736516d42288e61f777fe Author: Mauro Carvalho Chehab Date: Thu Apr 24 08:16:22 2025 +0800 Makefile: move KERNELDOC macro to the main Makefile As kernel-doc script is used not only on Documentation, but also on scripts and drivers/drm Makefiles, move it to the main makefile, as otherwise sub-makefiles may not have it. Signed-off-by: Mauro Carvalho Chehab Tested-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Message-ID: commit 76a9b59228d5a9827d969fc3b1b420fa0a985842 Author: Mauro Carvalho Chehab Date: Thu Apr 24 08:16:21 2025 +0800 docs: Makefile: get rid of KERNELDOC_CONF env variable Despite its name, what's there is a set of Sphinx arguments that are passed to sphinx/kerneldoc.py: - kerneldoc_srctree: location of the source tree; - kerneldoc_bin: external script to excecute kernel-doc Drop it, and just place the values at the already-existing ALLSPHINXOPTS variable. Signed-off-by: Mauro Carvalho Chehab Tested-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Message-ID: <88be0fc288598c30fbedb9cc230b2a7ed28225a2.1745453655.git.mchehab+huawei@kernel.org> commit 85728ba0c52983ba45b03589ae0af7bd84384468 Author: Ajit Pandey Date: Thu Apr 17 22:37:40 2025 +0530 pmdomain: qcom: rpmhpd: Add SM4450 power domains Add power domains exposed by RPMh in the Qualcomm SM4450 platform. Signed-off-by: Ajit Pandey Link: https://lore.kernel.org/r/20250417-sm4450_rpmhpd-v1-2-361846750d3a@quicinc.com Signed-off-by: Ulf Hansson commit 6afa9ba81c3bf82b2e0be2d105e8974f6fc63c1e Merge: ca677196a91f68 6f8bad329e3caf Author: Ulf Hansson Date: Thu Apr 24 18:00:56 2025 +0200 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit 6f8bad329e3caf6e09987bb1c611ecd15a300498 Author: Ajit Pandey Date: Thu Apr 17 22:37:39 2025 +0530 dt-bindings: power: qcom,rpmpd: Add SM4450 compatible Document compatible for RPMh power domain controller on SM4450 Platform. Signed-off-by: Ajit Pandey Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250417-sm4450_rpmhpd-v1-1-361846750d3a@quicinc.com Signed-off-by: Ulf Hansson commit f9e4d8bb6aea69aa38e2ef312945408c935feba1 Author: Lucas De Marchi Date: Mon Apr 21 08:15:39 2025 -0700 drm/xe/hwmon: Fix kernel version documentation for fan speed The version in the sysfs attribute should correspond to the version in which this is enabled and visible for end users. It usually doesn't correspond to the version in which the patch was developed, but rather a release that will contain it. Update them to 6.16. Fixes: 28f79ac609de ("drm/xe/hwmon: expose fan speed") Reported-by: Ulisses Furquim Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4841 Reviewed-by: Rodrigo Vivi Reviewed-by: Raag Jadav Link: https://lore.kernel.org/r/20250421-hwmon-doc-fix-v1-2-9f68db702249@intel.com Signed-off-by: Lucas De Marchi commit 8500393a8e6c58e5e7c135133ad792fc6fd5b6f4 Author: Lucas De Marchi Date: Mon Apr 21 08:15:38 2025 -0700 drm/xe/hwmon: Fix kernel version documentation for temperature The version in the sysfs attribute should correspond to the version in which this is enabled and visible for end users. It usually doesn't correspond to the version in which the patch was developed, but rather a release that will contain it. Update them to 6.15. Fixes: dac328dea701 ("drm/xe/hwmon: expose package and vram temperature") Reported-by: Ulisses Furquim Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4840 Reviewed-by: Rodrigo Vivi Reviewed-by: Raag Jadav Link: https://lore.kernel.org/r/20250421-hwmon-doc-fix-v1-1-9f68db702249@intel.com Signed-off-by: Lucas De Marchi commit ca677196a91f6869169ef31252c00ceec6ac0754 Author: Andre Przywara Date: Wed Apr 16 23:48:37 2025 +0100 pmdomain: sunxi: add H6 PRCM PPU driver The Allwinner Power Reset Clock Management (RPCM) block contains a few bits that control some power domains. The most prominent one is the one for the Mali GPU. On the Allwinner H6 this domain is enabled at reset, so we didn't care about it so far, but the H616 defaults to it being disabled. Add a power domain driver for those bits. Some BSP code snippets and some spare documentation describe three bits, slightly different between the H6 and H616, so add three power domains for each SoC, connected to their compatible string. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20250416224839.9840-3-andre.przywara@arm.com Signed-off-by: Ulf Hansson commit 34f6235428a3793b59f6de93126d835c402134ea Merge: f6a305309be7b0 f262c73429ce6c Author: Ulf Hansson Date: Thu Apr 24 17:45:27 2025 +0200 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit 2b2408aca90b86c1ef51c19d834e5f6db0a1ff30 Author: Qiuxu Zhuo Date: Thu Apr 24 16:14:54 2025 +0800 EDAC/i10nm: Fix the bitwise operation between variables of different sizes The tool of Smatch static checker reported the following warning: drivers/edac/i10nm_base.c:364 show_retry_rd_err_log() warn: should bitwise negate be 'ullong'? This warning was due to the bitwise NOT/AND operations between 'status_mask' (a u32 type) and 'log' (a u64 type), which resulted in the high 32 bits of 'log' were cleared. This was a false positive warning, as only the low 32 bits of 'log' was written to the first RRL memory controller register (a u32 type). To improve code sanity, fix this warning by changing 'status_mask' to a u64 type, ensuring it matches the size of 'log' for bitwise operations. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aAih0KmEVq7ch6v2@stanley.mountain/ Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20250424081454.2952632-1-qiuxu.zhuo@intel.com commit 18ea89eae404d119ced26d80ac3e62255ce15409 Author: Tom Lendacky Date: Wed Apr 23 10:22:31 2025 -0500 x86/sev: Share the sev_secrets_pa value again This commits breaks SNP guests: 234cf67fc3bd ("x86/sev: Split off startup code from core code") The SNP guest boots, but no longer has access to the VMPCK keys needed to communicate with the ASP, which is used, for example, to obtain an attestation report. The secrets_pa value is defined as static in both startup.c and core.c. It is set by a function in startup.c and so when used in core.c its value will be 0. Share it again and add the sev_ prefix to put it into the global SEV symbols namespace. [ mingo: Renamed to sev_secrets_pa ] Signed-off-by: Tom Lendacky Signed-off-by: Ingo Molnar Acked-by: Ard Biesheuvel Cc: Dionna Amalie Glaze Cc: Kevin Loughlin Link: https://lore.kernel.org/r/cf878810-81ed-3017-52c6-ce6aa41b5f01@amd.com commit 4cc20482143c6dd009ea0c99762bb4bdeac98ec2 Author: WangYuli Date: Wed Apr 23 11:06:32 2025 +0800 bpf, docs: Fix non-standard line break Even though the kernel's coding-style document does not explicitly state this, we generally put a newline after the semicolon of every C language statement to enhance code readability. Adjust the placement of newlines to adhere to this convention. Reported-by: Chen Linxuan Signed-off-by: WangYuli Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/DB66473733449DB0+20250423030632.17626-1-wangyuli@uniontech.com Signed-off-by: Alexei Starovoitov commit b6b5683e9692b7ea2d4ca875802ec00a2b78dd66 Author: Alexey Charkov Date: Fri Apr 18 18:55:07 2025 +0400 dt-bindings: pwm: vt8500-pwm: Convert to YAML Rewrite the textual description for the WonderMedia PWM controller as YAML schema, and switch the filename to follow the compatible string. Signed-off-by: Alexey Charkov Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250418-via_pwm_binding-v2-1-17545f4d719e@gmail.com Signed-off-by: Uwe Kleine-König commit 769aa27801d2086c814c9e2b4ecba340b66f70bc Author: AngeloGioacchino Del Regno Date: Wed Apr 16 14:02:53 2025 +0200 dt-bindings: pwm: mediatek,pwm-disp: Add compatible for MT6893 Add a compatible string for the Display Controller PWM IP found in the MediaTek Dimensity 1200 (MT6893) SoC, which is compatible with the one found in MT8183. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416120253.147977-1-angelogioacchino.delregno@collabora.com Signed-off-by: Uwe Kleine-König commit 7f8ce4d88b42fcbd3350370ec4d02e00979fc5a9 Author: Uwe Kleine-König Date: Thu Apr 17 20:16:11 2025 +0200 pwm: Fix various formatting issues in kernel-doc Add Return and (where interesting) Context sections, fix some formatting and drop documenting the internal function __pwm_apply(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250417181611.2693599-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit f6da4fee69860d4a02d14b016021ffb516a25f38 Author: Pavel Begunkov Date: Thu Apr 24 12:31:18 2025 +0100 io_uring/eventfd: open code io_eventfd_grab() io_eventfd_grab() doesn't help wit understanding the path, it'll be simpler to keep the helper open coded. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5cb53ce3876c2819db9e8055cf41dca4398521db.1745493845.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit da01f60f8ad144a8a0844833a8d0f0005b0a7c51 Author: Pavel Begunkov Date: Thu Apr 24 12:31:17 2025 +0100 io_uring/eventfd: clean up rcu locking Conditional locking is never welcome if there are better options. Move rcu locking into io_eventfd_signal(), make it unconditional and use guards. It also helps with sparse warnings. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/91a925e708ca8a5aa7fee61f96d29b24ea9adeaf.1745493845.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 62f666df765ecaf9cc1892ca056d5c071a335d85 Author: Pavel Begunkov Date: Thu Apr 24 12:31:16 2025 +0100 io_uring/eventfd: dedup signalling helpers Consolidate io_eventfd_flush_signal() and io_eventfd_signal(). Not much of a difference for now, but it prepares it for following changes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5beecd4da65d8d2d83df499196f84b329387f6a2.1745493845.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 08764531474578d56ba1dc000c35668dffd55721 Author: Michal Koutný Date: Tue Apr 1 13:57:31 2025 +0200 net: cgroup: Guard users of sock_cgroup_classid() Exclude code that relies on sock_cgroup_classid() as preparation of removal of the function. Signed-off-by: Michal Koutný Signed-off-by: Pablo Neira Ayuso commit 3ba0032afea888d0edebf5ece3c6b36417189b63 Author: Michal Koutný Date: Tue Apr 1 13:57:30 2025 +0200 netfilter: xt_cgroup: Make it independent from net_cls The xt_group matching supports the default hierarchy since commit c38c4597e4bf3 ("netfilter: implement xt_cgroup cgroup2 path match"). The cgroup v1 matching (based on clsid) and cgroup v2 matching (based on path) are rather independent. Downgrade the Kconfig dependency to mere CONFIG_SOCK_GROUP_DATA so that xt_group can be built even without CONFIG_NET_CLS_CGROUP for path matching. Also add a message for users when they attempt to specify any clsid. Link: https://lists.opensuse.org/archives/list/kernel@lists.opensuse.org/thread/S23NOILB7MUIRHSKPBOQKJHVSK26GP6X/ Cc: Jan Engelhardt Cc: Florian Westphal Signed-off-by: Michal Koutný Signed-off-by: Pablo Neira Ayuso commit f4293c2baf6faa5f1a1638bcce698ed88d0d396e Author: Easwar Hariharan Date: Wed Feb 19 20:30:37 2025 +0000 netfilter: xt_IDLETIMER: convert timeouts to secs_to_jiffies() Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @depends on patch@ expression E; @@ -msecs_to_jiffies(E * 1000) +secs_to_jiffies(E) -msecs_to_jiffies(E * MSEC_PER_SEC) +secs_to_jiffies(E) Signed-off-by: Easwar Hariharan Signed-off-by: Pablo Neira Ayuso commit 5d61bb1675ff7662f519ca203b1f8cdc455b9df4 Author: Matti Vaittinen Date: Tue Apr 8 11:47:39 2025 +0300 MAINTAINERS: Add BD96802 specific header Add the include/linux/mfd/rohm-bd96802.h to the list of the ROHM PMIC specific files maintained by the undersigned. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/872fdf7c24d1ff4379d1234f03766bda64c5c5b4.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 956e9363c8230a0dc9a83cf5de61200206a9154b Author: Matti Vaittinen Date: Tue Apr 8 11:47:24 2025 +0300 regulator: bd96801: Support ROHM BD96806 PMIC The ROHM BD96806 is from the software perspective almost identical to the ROHM BD96802. The main difference is different voltage tuning ranges. Add support differentiating these PMICs and provide correct voltages for both models. Signed-off-by: Matti Vaittinen Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/5d15660e0e71c70fda8df1694bec0e4fba7f251e.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit fecc18a9f59ce9c36eb3622ae77bff5fa5c6d976 Author: Matti Vaittinen Date: Tue Apr 8 11:47:10 2025 +0300 mfd: bd96801: Support ROHM BD96806 The ROHM BD96806 is from the software perspective almost identical to the ROHM BD96802. The main difference is different voltage tuning ranges. Add support differentiating these PMICs based on the compatible, and invoking the regulator driver with correct IC type. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/ccc95ae33613648fdcba08915777d945412ac5c4.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 7baf818d0d90e00c0688d8156bc7d9d1d1ee1dbb Author: Matti Vaittinen Date: Tue Apr 8 11:46:53 2025 +0300 regulator: bd96801: Support ROHM BD96805 PMIC The ROHM BD96805 is from the software perspective almost identical to the ROHM BD96801. The main difference is different voltage tuning ranges. Add support differentiating these PMICs and provide correct voltages for both models. Signed-off-by: Matti Vaittinen Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/eab1369557b14a9762c41a5429d1ac87a4644d9e.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 6a309b489215f705c20cb4ed7f85d9c16f768e55 Author: Matti Vaittinen Date: Tue Apr 8 11:46:36 2025 +0300 mfd: bd96801: Support ROHM BD96805 The ROHM BD96805 is from the software perspective almost identical to the ROHM BD96801. The main difference is different voltage tuning ranges. Add support differentiating these PMICs based on the compatible, and invoking the regulator driver with correct IC type. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/8680097dc083f191bea56d3ac7c6fe5c005644ec.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 55606b9b20639b634560f44a070ff6153b59b557 Author: Matti Vaittinen Date: Tue Apr 8 11:46:16 2025 +0300 regulator: bd96801: Support ROHM BD96802 The ROHM BD96802 PMIC is primarily intended to be used as a companion PMIC extending the capabilities of the BD96802 but it can be used on it's own as well. When used as a companion PMIC, the start-up and shut-down sequences are usually intitiated by the master PMIC using IF pins. The BD96802 looks from the digital interface point of view pretty much like a reduced version of BD96801. It includes only 2 BUCKs and provides the same error protection/detection mechanisms as the BD96801. Also, the voltage control logic is same up to the register addresses. Add support for controlling BD96802 using the BD96801 driver. Signed-off-by: Matti Vaittinen Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/2fb2d0d4997c32d18bfa32cea4564352c00eebc8.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 4094040b1a133206ed893da2cf5e17cc22f7ca7c Author: Matti Vaittinen Date: Tue Apr 8 11:45:59 2025 +0300 mfd: rohm-bd96801: Support ROHM BD96802 The ROHM BD96802 PMIC looks from software point of view a lot like ROHM BD96801 PMIC. Just with reduced number of voltage rails. Both PMICs provide two physical IRQ lines referred as INTB and ERRB and contain blocks implementing regulator controls and a weatchdog. Hence it makes sense to use same MFD core for both PMICs. Add support for ROHM BD96802 scalable companion PMIC to the BD96801 core driver. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/05957d194425a79a4f35f287695c3d9ca2ed1ae2.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 9cc957546e3865bc3adfd39ceeedc8074521024d Author: Matti Vaittinen Date: Tue Apr 8 11:45:34 2025 +0300 regulator: bd96801: Drop IC name from the IRQ resources The resources generated in the BD96801 MFD driver are only visible to the sub-drivers whose resource fields they are added. This makes abbreviating the resource name with the IC name pointless. It just adds confusion in those sub-drivers which do not really care the exact model that generates the IRQ but just want to know the purpose IRQ was generated for. Thus, as a preparatory fix to simplify adding support for ROHM BD96802 PMIC the IC name "bd96801-" prefix was dropped from the IRQ resource names. Adapt the regulator driver to this change. Signed-off-by: Matti Vaittinen Reviewed-by: Mark Brown Acked-by: Conor Dooley Link: https://lore.kernel.org/r/73ec2425655ab19c9f0cf990419641ad36561590.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit d082571fca4d1db5642ad4436cef22d65bfe4153 Author: Matti Vaittinen Date: Tue Apr 8 11:45:16 2025 +0300 mfd: bd96801: Drop IC name from the regulator IRQ resources The resources generated in the BD96801 MFD driver are only visible to the sub-drivers whose resource fields they are added. This makes abbreviating the resource name with the IC name pointless. It just adds confusion in those sub-drivers which do not really care the exact model that generates the IRQ but just want to know the purpose IRQ was generated for. This is a preparatory fix to simplify adding support for ROHM BD96802 PMIC. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/0b39a793d925651b1ec2d78e92d47a24849d216b.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 7289d96ba557fb5e0a90813b7e24f3815127d14d Author: Matti Vaittinen Date: Tue Apr 8 11:44:48 2025 +0300 mfd: rohm-bd96801: Add chip info Prepare for adding support for BD96802 which is very similar to BD96801. Separate chip specific data into own structure which can be picked based on the type of the IC. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/826f9aa28795a2aa70ea41a3688ff9a83ec25a98.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 82c218969eb0ec989d8e049878fd3d6a97ccd8ba Author: Matti Vaittinen Date: Tue Apr 8 11:44:24 2025 +0300 dt-bindings: mfd: bd96802: Add ROHM BD96806 The ROHM BD96806 is very similar to the BD96802. The differences visible to the drivers is different tune voltage ranges. Add compatible for the ROHM BD96805 PMIC. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/3c245cc3829dc64d977c97eae7ae8e2be6233481.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit d5a30228b6fa86cf841d8c12af0025c0bacb90fb Author: Matti Vaittinen Date: Tue Apr 8 11:41:16 2025 +0300 dt-bindings: mfd: bd96801: Add ROHM BD96805 The ROHM BD96805 is very similar to the BD96801. The differences visible to the drivers is different tune voltage ranges. Add compatible for the ROHM BD96805 PMIC. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/f49addee698b683a071c12808f06a56509152f5c.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 9d851b2e016a13b0a673503f5600315b6601e025 Author: Matti Vaittinen Date: Tue Apr 8 11:40:56 2025 +0300 dt-bindings: mfd: Add ROHM BD96802 PMIC BD96802Qxx-C is an automotive grade configurable Power Management Integrated Circuit supporting Functional Safety features for application processors, SoCs and FPGAs. BD96802 is controlled via I2C, provides two interrupt lines and has two controllable buck regulators. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/ed55edffca3b0a2d7e8bcd9ebd8d8abd9a9b7dfe.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 9effbfda6bfd677042434722a9c2f2e17d261dce Author: Matti Vaittinen Date: Tue Apr 8 11:40:41 2025 +0300 dt-bindings: regulator: Add ROHM BD96802 PMIC BD96802Qxx-C is an automotive grade configurable Power Management Integrated Circuit supporting Functional Safety features for application processors, SoCs and FPGAs. BD96802 is controlled via I2C, provides two interrupt lines and has two controllable buck regulators. The BD96802 belongs to the family of ROHM Scalable PMICs and is intended to be used as a companion PMIC for the BD96801. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/df7983e7c623041f14a4fbe409a2cff846e68a05.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit c283fcdc4e2b89678c171691fd26f576139fc256 Author: Vishwaroop A Date: Wed Apr 16 11:06:05 2025 +0000 spi: tegra210-quad: Update dummy sequence configuration Adding support for the dummy sequence configuration. The dummy sequence introduces a delay between the command and the data phases of a transfer. This delay, measured in clock cycles, allows the slave device to prepare for data transmission, ensuring data integrity and proper synchronization. Signed-off-by: Vishwaroop A Link: https://patch.msgid.link/20250416110606.2737315-6-va@nvidia.com Signed-off-by: Mark Brown commit d8966b65413390d1b5b706886987caac05fbe024 Author: Vishwaroop A Date: Wed Apr 16 11:06:03 2025 +0000 spi: tegra210-quad: modify chip select (CS) deactivation Modify the chip select (CS) deactivation and inter-transfer delay execution only during the DATA_TRANSFER phase when the cs_change flag is not set. This ensures proper CS handling and timing between transfers while eliminating redundant operations. Fixes: 1b8342cc4a38 ("spi: tegra210-quad: combined sequence mode") Signed-off-by: Vishwaroop A Link: https://patch.msgid.link/20250416110606.2737315-4-va@nvidia.com Signed-off-by: Mark Brown commit 400d9f1a27cc2fceabdb1ed93eaf0b89b6d32ba5 Author: Vishwaroop A Date: Wed Apr 16 11:06:02 2025 +0000 spi: tegra210-quad: remove redundant error handling code Remove unnecessary error handling code that terminated transfers and executed delay on errors. This code was redundant as error handling is already done at a higher level in the SPI core. Fixes: 1b8342cc4a38 ("spi: tegra210-quad: combined sequence mode") Signed-off-by: Vishwaroop A Link: https://patch.msgid.link/20250416110606.2737315-3-va@nvidia.com Signed-off-by: Mark Brown commit dcb06c638a1174008a985849fa30fc0da7d08904 Author: Vishwaroop A Date: Wed Apr 16 11:06:01 2025 +0000 spi: tegra210-quad: Fix X1_X2_X4 encoding and support x4 transfers This patch corrects the QSPI_COMMAND_X1_X2_X4 and QSPI_ADDRESS_X1_X2_X4 macros to properly encode the bus width for x1, x2, and x4 transfers. Although these macros were previously incorrect, they were not being used in the driver, so no functionality was affected. The patch updates tegra_qspi_cmd_config() and tegra_qspi_addr_config() function calls to use the actual bus width from the transfer, instead of hardcoding it to 0 (which implied x1 mode). This change enables proper support for x1, x2, and x4 data transfers by correctly configuring the interface width for commands and addresses. These modifications improve the QSPI driver's flexibility and prepare it for future use cases that may require different bus widths for commands and addresses. Fixes: 1b8342cc4a38 ("spi: tegra210-quad: combined sequence mode") Signed-off-by: Vishwaroop A Link: https://patch.msgid.link/20250416110606.2737315-2-va@nvidia.com Signed-off-by: Mark Brown commit fd5b6cd730676940df63b0970bb1ba30bca1aac3 Author: Ming Qian Date: Mon Apr 21 16:12:56 2025 +0800 media: imx-jpeg: Check decoding is ongoing for motion-jpeg As the first frame in "repeat-mode" is the pattern, the pattern done interrupt is ignored by the driver. With small resolution bitstreams, the interrupts might fire too quickly and hardware combine two irqs to once because irq handle have latency. Thus the driver might miss the frame decode done interrupt from the first actual frame. In order to avoid the driver wait for the frame done interrupt that has been combined to the pattern done interrupt and been ignored, driver will check the curr_desc and slot_status registers to figure out if the decoding of actual frame is finished or not. Firstly we check the curr_desc register, - if it is still pointing to the pattern descriptor, the second actual frame is not started, we can wait for its frame-done interrupt. - if the curr_desc has pointed to the frame descriptor, then we check the ongoing bit of slot_status register. - if the ongoing bit is set to 1, the decoding of the actual frame is not finished, we can wait for its frame-done interrupt. - if the ongoing bit is set to 0, the decoding of the actual frame is finished, we can't wait for the second interrupt, but mark it as done. But there is still a small problem, that the curr_desc and slot_status registers are not synchronous. curr_desc is updated when the next_descpt_ptr is loaded, but the ongoing bit of slot_status is set after the 32 bytes descriptor is loaded, there will be a short time interval in between, which may cause fake false. Consider read register is quite slow compared with IP read 32byte from memory, read twice slot_status can avoid this situation. Signed-off-by: Ming Qian Reviewed-by: Frank Li Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit f65fbf8c3d6711325f947b49d4067e7d05fd79de Author: Ming Qian Date: Mon Apr 21 16:12:55 2025 +0800 media: imx-jpeg: Change the pattern size to 128x64 In order to decode a motion-jpeg bitstream, which doesn't provide a DHT, the driver will first decode a pattern jpeg and use the DHT found in the pattern to decode the first actual frame. This mode is called "repeat-mode" and it utilizes linked descriptors. The smallest supported resolution of 64x64 was used for that pattern to not cause unneeded performance delay. This choice, however, can cause a corrupted decoded picture of the first frame after the pattern, when the resolution of that frame is larger than the pattern and is not aligned to 64. By altering the pattern size to 128x64, this corruption can be avoided. That size has been confirmed to be safe by the hardware designers. Additionally, a DMA buffer needs to be allocated to store the decoded picture of the pattern image. Signed-off-by: Ming Qian Reviewed-by: Frank Li Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 7500bb9cf164edbb2c8117d57620227b1a4a8369 Author: Ming Qian Date: Mon Apr 21 16:12:54 2025 +0800 media: imx-jpeg: Cleanup after an allocation error When allocation failures are not cleaned up by the driver, further allocation errors will be false-positives, which will cause buffers to remain uninitialized and cause NULL pointer dereferences. Ensure proper cleanup of failed allocations to prevent these issues. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian Reviewed-by: Frank Li Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit faa8051b128f4b34277ea8a026d02d83826f8122 Author: Ming Qian Date: Mon Apr 21 16:12:53 2025 +0800 media: imx-jpeg: Reset slot data pointers when freed Ensure that the slot data pointers are reset to NULL and handles are set to 0 after freeing the coherent memory. This makes he function mxc_jpeg_alloc_slot_data() and mxc_jpeg_free_slot_data() safe to be called multiple times. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Reviewed-by: Frank Li Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 46e9c092f850bd7b4d06de92d3d21877f49a3fcb Author: Ming Qian Date: Mon Apr 21 16:12:52 2025 +0800 media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead Move function mxc_jpeg_free_slot_data() above mxc_jpeg_alloc_slot_data() allowing to call that function during allocation failures. No functional changes are made. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Reviewed-by: Frank Li Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 609ba05b9484856b08869f827a6edee51d51b5f3 Author: Haoxiang Li Date: Wed Feb 26 20:49:22 2025 +0800 media: imagination: fix a potential memory leak in e5010_probe() Add video_device_release() to release the memory allocated by video_device_alloc() if something goes wrong. Fixes: a1e294045885 ("media: imagination: Add E5010 JPEG Encoder driver") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 208699afb9f22f4d903ebdbdae45c2c6f2e308e0 Author: Christophe JAILLET Date: Fri Apr 18 00:01:58 2025 +0200 media: amphion: Slightly simplify vpu_core_register() "vpu_core->msg_buffer_size" is unused out-side of vpu_core_register(). There is no need to save this value in struct vpu_core. Remove it and use a local variable instead. Signed-off-by: Christophe JAILLET Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 7713800a6cc94b89caab13355b956bc5423250c8 Author: Nicolas Dufresne Date: Wed Apr 9 15:30:09 2025 -0400 media: verisilicon: Enable NV15 support for Rockchip VDPU981 This is a "customer" format, though on Rockchip RK3588 it has been verified to be NV15 format, which matches what the GPU and display handles has 10bit pixel formats. Reviewed-by: Benjamin Gaignard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit d52b9b7e2f10d22a49468128540533e8d76910cd Author: Ming Qian Date: Mon Apr 21 15:06:12 2025 +0800 media: imx-jpeg: Drop the first error frames When an output buffer contains error frame header, v4l2_jpeg_parse_header() will return error, then driver will mark this buffer and a capture buffer done with error flag in device_run(). But if the error occurs in the first frames, before setup the capture queue, there is no chance to schedule device_run(), and there may be no capture to mark error. So we need to drop this buffer with error flag, and make the decoding can continue. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 3f5f28084eb9dbb408cf5429018a9b7a2859616f Author: Nathan Hebert Date: Tue Feb 11 16:34:51 2025 -0800 media: mediatek: vcodec: Enable HEVC main still picture decode Mediatek devices that support HEVC also support the main still picture profile, but today, the main still picture profile is excluded. This removes the skip mask for HEVC, and enables the main still picture profile decoding. Signed-off-by: Nathan Hebert Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 4d1e8c8f11c611db5828e4bae7292bc295eea8ef Author: Hans de Goede Date: Thu Apr 17 13:13:37 2025 +0200 platform/x86: int3472: Debug log when remapping pins Debug log when remapping a pin/function because of a int3472_gpio_map[] match. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-10-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c5d0393272048748ace2dd4ff8326fc0bf70b262 Author: Hans de Goede Date: Thu Apr 17 13:13:36 2025 +0200 platform/x86: int3472: Add handshake pin support New Intel Meteor Lake based laptops with IPU6 cameras have a new type 0x12 pin defined in the INT3472 sensor companion device which describes the sensor's GPIOs. This pin is primarily used on designs with a Lattice FPGA chip which is capable of running the sensor independently of the main CPU for features like presence detection. This pin needs to be driven high to make the FPGA run the power-on sequence of the sensor. After driving the pin high, the FPGA "firmware" needs 25ms to complete the power-on sequence. Add support for this modelling the handshake pin as a GPIO driven "dvdd" regulator with a 25 ms enable time. This model was chosen because: 1. Sensor chips don't have a handshake pin, so we need to abstract this in some way which does not require modification to the sensor drivers, sensor drivers using the bulk-regulator API to get avdd + vddio + dvdd is normal. So this will work to get the right value set to the handshake pin without requiring sensor driver modifications. 2. Sensors typically wait only a small time for the sensor to power-on after de-asserting reset. Not the 25ms the Lattice chip requires. Using the regulator framework's enable_time allows hiding the need for this delay from the sensor drivers. Link: https://lore.kernel.org/platform-driver-x86/59f672c3-6d87-4ec7-9b7f-f44fe2cce934@redhat.com/ Link: https://bugzilla.redhat.com/show_bug.cgi?id=2341731 Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-9-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4455dcf578ae83a3c7f751c2c9758efe5ba08a38 Author: Hans de Goede Date: Thu Apr 17 13:13:35 2025 +0200 platform/x86: int3472: Prepare for registering more than 1 GPIO regulator Prepare the discrete code for registering more than 1 GPIO regulator. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-8-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit ccda394e1ef17c3de33e31e7a4d2e647be6a362d Author: Hans de Goede Date: Thu Apr 17 13:13:34 2025 +0200 platform/x86: int3472: Avoid GPIO regulator spikes Avoid the GPIO controlling the avdd regulator being driven low or high for a very short time leading to spikes by adding an enable delay of 2 ms and a minimum off to on delay of also 2 ms. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-7-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 033234bdc6cfb88a797a16aa3a9df815bbe01a28 Author: Hans de Goede Date: Thu Apr 17 13:13:33 2025 +0200 platform/x86: int3472: Make regulator supply name configurable This is a preparation patch for registering multiple regulators, which requires a different supply-name for each regulator. Make supply-name a parameter to skl_int3472_register_regulator() and use con-id to set it so that the existing int3472_gpio_map remapping can be used with it. Since supply-name is a parameter now, drop the fixed skl_int3472_regulator_map_supplies[] array and instead add lower- and upper-case mappings of the passed-in supply-name to the regulator. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-6-hdegoede@redhat.com [ij: GPIO_SUPPPLY_NAME_LENGTH -> GPIO_SUPPLY_NAME_LENGTH] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 38ff83a374cdaf146ee6f6d1007419f7fad70e8f Author: Hans de Goede Date: Thu Apr 17 13:13:32 2025 +0200 platform/x86: int3472: Rework AVDD second sensor quirk handling Rework the discrete quirk handling to use a quirks struct which is pointed to by a dmi_system_id table, rather then having a dmi_system_id table per type of quirk. This is a preparation patch for adding support for multiple regulators, where not all regulators might be shared between sensors. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-5-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b6d3d739b72ae1913d18d62126aee6039e2a42b1 Author: Hans de Goede Date: Thu Apr 17 13:13:31 2025 +0200 platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator The gpio field in struct int3472_gpio_regulator is only briefly used to store the GPIO in skl_int3472_register_regulator(). Instead just store the GPIO directly into cfg.ena_gpiod an drop the gpio field. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-4-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit ea890cdd41fe34836475eec801a1735c6f9ebcd0 Author: Hans de Goede Date: Thu Apr 17 13:13:30 2025 +0200 platform/x86: int3472: Stop setting a supply-name for GPIO regulators The supply_name field is not mandatory and is supposed to be set to the name of another regulator when it is known that the regulator being registered is supplied by that other regulator. Having a regulator supplying the regulator which is being registered does not apply to the INT3472 GPIO regulator, stop setting a supply_name. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1d78798b4e6f48c1d7e506f695bb613b0e9c37e6 Author: Hans de Goede Date: Thu Apr 17 13:13:29 2025 +0200 platform/x86: int3472: Add skl_int3472_register_clock() helper skl_int3472_register_dsm_clock() and skl_int3472_register_gpio_clock() are 80% the same code. Factor out the common code into a new skl_int3472_register_clock() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Reviewed-by: Ilpo Järvinen Tested-by: David Heidelberg # Dell Latitude 9440 Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20250417111337.38142-2-hdegoede@redhat.com Signed-off-by: Ilpo Järvinen commit e99e2c54ea9fcad143837e800beb3468f17f9ce1 Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:47 2025 +0200 platform: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250417074648.81528-1-krzysztof.kozlowski@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 99fb11d1edb2104f976a672a0863f1ea1ea27398 Author: Kurt Borja Date: Fri Apr 11 11:36:43 2025 -0300 platform/x86: dell-pc: Transition to faux device Use a faux device parent for registering the platform_profile instead of a "fake" platform device. The faux bus is a minimalistic, single driver bus designed for this purpose. Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250411-dell-faux-v1-3-ea1f1c929b7e@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 48e21e0226a9325fc75145840d289113fb0c27bc Author: Kurt Borja Date: Fri Apr 11 11:36:42 2025 -0300 platform/x86: dell-pc: Use non-atomic bitmap operations The choices bitmap belongs only to this thread, therefore we can use the non-atomic version of set_bit(). Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250411-dell-faux-v1-2-ea1f1c929b7e@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4630b99d2e93a91b304f498c4d543c002fb78ca5 Author: Kurt Borja Date: Fri Apr 11 11:36:41 2025 -0300 platform/x86: dell-pc: Propagate errors when detecting feature support The dell-pc module only supports the thermal management Dell SMBIOS feature, therefore it is pointless to have it loaded if this is not available. Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250411-dell-faux-v1-1-ea1f1c929b7e@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 49916e22d9530d6cf027e635a5d824c7d698d67f Author: Dr. David Alan Gilbert Date: Fri Apr 18 21:08:03 2025 +0100 timers: Remove unused __round_jiffies(_up) Remove two trivial but long unused functions. __round_jiffies() has been unused since 2008's commit 9c133c469d38 ("Add round_jiffies_up and related routines") __round_jiffies_up() has been unused since 2019's commit 7ae3f6e130e8 ("powerpc/watchdog: Use hrtimers for per-CPU heartbeat") Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250418200803.427911-1-linux@treblig.org commit 0128816c42b52c6ee339718621aeda85855cd3be Author: Cheng-Yang Chou Date: Thu Apr 10 18:51:43 2025 +0800 genirq: Fix typo in IRQ_NOTCONNECTED comment Fix a minor typo in the comment for IRQ_NOTCONNECTED: "distingiush" is corrected to "distinguish". Signed-off-by: Cheng-Yang Chou Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250410105144.214849-1-yphbchou0911@gmail.com commit 76b66e8c9d159eb3d1699e0fa80ceacf9a9ae627 Author: Inochi Amaoto Date: Tue Apr 22 08:38:03 2025 +0800 irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack() The type cast in sg2044_msi_irq_ack() lost the __iomem attribute, which makes the pointer type incorrect. Add it back. Fixes: e96b93a97c90 ("irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller") Reported-by: kernel test robot Signed-off-by: Inochi Amaoto Signed-off-by: Thomas Gleixner Reviewed-by: Chen Wang Link: https://lore.kernel.org/all/20250422003804.214264-1-inochiama@gmail.com Closes: https://lore.kernel.org/oe-kbuild-all/202504211251.B3aesulq-lkp@intel.com/ commit a98a73be9ee9c42495690b2fe56e1ce27768289a Author: Asahi Lina Date: Fri Apr 11 01:55:25 2025 +0200 rust: drm: file: Add File abstraction A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Reviewed-by: Maxime Ripard Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-7-dakr@kernel.org [ Rework of drm::File * switch to the Opaque type * fix (mutable) references to struct drm_file (which in this context is UB) * restructure and rename functions to align with common kernel schemes * write and fix safety and invariant comments * remove necessity for and convert 'as' casts * original source archive: https://archive.is/GH8oy - Danilo ] Signed-off-by: Danilo Krummrich commit 0600032c54b7adc309d334c109374433ce3ab243 Author: Asahi Lina Date: Fri Apr 11 01:55:24 2025 +0200 rust: drm: add DRM driver registration Implement the DRM driver `Registration`. The `Registration` structure is responsible to register and unregister a DRM driver. It makes use of the `Devres` container in order to allow the `Registration` to be owned by devres, such that it is automatically dropped (and the DRM driver unregistered) once the parent device is unbound. Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-6-dakr@kernel.org [ Rework of drm::Registration * move VTABLE to drm::Device to prevent use-after-free bugs; VTABLE needs to be bound to the lifetime of drm::Device, not the drm::Registration * combine new() and register() to get rid of the registered boolean * remove file_operations * move struct drm_device creation to drm::Device * introduce Devres * original source archive: https://archive.is/Pl9ys - Danilo ] Signed-off-by: Danilo Krummrich commit 1e4b8896c0f3cb305a32870e1d8624f1155072d5 Author: Asahi Lina Date: Fri Apr 11 01:55:23 2025 +0200 rust: drm: add device abstraction Implement the abstraction for a `struct drm_device`. A `drm::Device` creates a static const `struct drm_driver` filled with the data from the `drm::Driver` trait implementation of the actual driver creating the `drm::Device`. Reviewed-by: Maxime Ripard Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-5-dakr@kernel.org [ Rewrite of drm::Device * full rewrite of the drm::Device abstraction using the subclassing pattern * original source archive: http://archive.today/5NxBo - Danilo ] Signed-off-by: Danilo Krummrich commit b50a1e1f3c4630f729629a787d891d7b4348007f Author: Heiner Kallweit Date: Wed Apr 9 18:25:01 2025 +0200 spi: intel: Improve resource mapping Let's use the pci/platform-specialized functions for mapping a resource, and pass the mapped address to intel_spi_probe. Benefits are: - No separate call needed for getting the resource, and no access to struct pci_dev internals (pdev->resource[]). - More user-friendly output in /proc/iomem. In my case: before 80704000-80704fff : 0000:00:1f.5 80704000-80704fff : 0000:00:1f.5 0000:00:1f.5 after 80704000-80704fff : 0000:00:1f.5 80704000-80704fff : spi_intel_pci Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/2585fa05-60c4-48c4-a838-e87014665ae2@gmail.com Signed-off-by: Mark Brown commit cf0668184d1d2f9ad3f98dd5bbe0ed4d9d090eaa Author: Kuninori Morimoto Date: Thu Apr 17 23:23:12 2025 +0000 spi: sh-msiof: ignore driver probing if it was MSIOF Sound Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as both SPI and I2S. MSIOF-I2S will use Audio Graph Card/Card2 driver which Of-Graph in DT. MSIOF-SPI/I2S are using same DT compatible properties. MSIOF-I2S uses Of-Graph for Audio-Graph-Card/Card2, MSIOF-SPI doesn't use Of-Graph. Check "port" node when driver probing Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/87wmbi2x0g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c4887bd4b35b225f4fe26d2d459c76236e27a759 Author: Kuninori Morimoto Date: Thu Apr 17 23:23:03 2025 +0000 spi: sh-msiof: use dev in sh_msiof_spi_probe() sh_msiof_spi_probe() is using priv->dev everywhere, but it makes code long. Create struct device *dev and use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/87y0vy2x0o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5410aa3aa7f7dfcbdfcf94034595765d7e69ead3 Author: Bo Liu Date: Wed Apr 23 21:08:55 2025 -0400 regulator: pf9453: convert to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Bo Liu Link: https://patch.msgid.link/20250424010855.2662-1-liubo03@inspur.com Signed-off-by: Mark Brown commit cce73cf7cc56a04cf0dd1e1f93b4002c00751ebe Author: Richard Fitzgerald Date: Wed Apr 23 20:27:13 2025 +0100 MAINTAINERS: ASoC: Simplify references to Cirrus Logic include files Change the references to Cirrus Logic files under include/sound to be a wildcard of all cs* and use X: to exclude the three cs* files that are not related to ASoC. This means that new Cirrus Logic files added to include/sound will be picked up automatically as an ASoC file without any changes to MAINTAINERS. New files are most likely to be for ASoC drivers now. It's also easier to manage than ranges of wildcarding for different sets of files. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250423192714.22158-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 3b41574eea3922f98038fe161d30c16a13188dcc Author: Amadeusz Sławiński Date: Thu Apr 24 11:46:00 2025 +0200 ASoC: Intel: avs: Fix NULL pointer dereference Due to unfortunate interaction between two recent patchsets, avs driver ends up dereferencing NULL pointer when registering i2s boards. Commit [1] does a call to avs_mach_ssp_tdm() which requires mach->pdata, however due to another change in [2], mach->pdata is initialized after the call. Reshuffle code to initialise mach->pdata before calling avs_mach_ssp_tdm(). [1] Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=79138dbff53ab0e9891ebdfce8d7b298c3783cd1 [2] Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/sound/soc/intel/avs?id=7d859189de13f06fdc511761c745f3b302bed7b6 Signed-off-by: Amadeusz Sławiński Acked-by: Cezary Rojewski Link: https://patch.msgid.link/20250424094600.1678051-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 171eb6f71e9e3ba6a7410a1d93f3ac213f39dae2 Author: Martin Blumenstingl Date: Sat Apr 19 23:34:48 2025 +0200 ASoC: meson: meson-card-utils: use of_property_present() for DT parsing Commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties") added a warning when trying to parse a property with a value (boolean properties are defined as: absent = false, present without any value = true). This causes a warning from meson-card-utils. meson-card-utils needs to know about the existence of the "audio-routing" and/or "audio-widgets" properties in order to properly parse them. Switch to of_property_present() in order to silence the following warning messages during boot: OF: /sound: Read of boolean property 'audio-routing' with a value. OF: /sound: Read of boolean property 'audio-widgets' with a value. Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support") Tested-by: Christian Hewitt Cc: stable@vger.kernel.org Signed-off-by: Martin Blumenstingl Link: https://patch.msgid.link/20250419213448.59647-1-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit 402dda23a3197c1cd43504351c2c3077d0472646 Merge: 076f3227255ccb da6d7db8b16205 Author: Mark Brown Date: Thu Apr 24 12:55:06 2025 +0100 ASoC: Merge up fixes They have build/application dependencies for some new changes coming in. commit e358e012a69a3d553803cbe62d9f6eeea57726fc Author: Johan Hovold Date: Tue Apr 15 09:41:45 2025 +0200 ASoC: codecs: wcd938x: drop unnecessary mux flag assignment The codec driver data is allocated using kzalloc() so there's no need to clear the mux setup flag when mux selection fails during probe. Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20250415074145.7202-3-johan+linaro@kernel.org Signed-off-by: Mark Brown commit d1407c934f523c8742ab006e7782f6eae780a7d1 Author: Johan Hovold Date: Tue Apr 15 09:41:44 2025 +0200 ASoC: codecs: wcd938x: fix mux error handling A recent change added support for looking up an optional mux control before falling back to gpio control for us-euro plug selection. The mux framework does however not yet support optional muxes and an error message is now incorrectly logged on machines like the Lenovo ThinkPad X13s which do not have one: wcd938x_codec audio-codec: /audio-codec: failed to get mux-control (0) Suppress the bogus error and add the missing mux error handling by making sure that the 'mux-controls' DT property is present before looking up the mux control. Fixes: eec611d26f84 ("ASoC: codecs: wcd938x: add mux control support for hp audio mux") Link: https://lore.kernel.org/lkml/Z-z_ZAyVBK5ui50k@hovoldconsulting.com/ Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20250415074145.7202-2-johan+linaro@kernel.org Signed-off-by: Mark Brown commit f198b6b256aabe6d136401505e974ef2eb2df4af Author: Peng Fan Date: Mon Apr 14 16:34:25 2025 +0800 ASoC: codec: tpa6130a2: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value to configure output value. Checking the DTS polarity, all users are using GPIOD_ACTIVE_HIGH. so all should work as expected with this patch. Cc: Lucas Stach Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-3-5f4052e656a0@nxp.com Signed-off-by: Mark Brown commit 63a9362c7172c74f6df19195c3e7491d3ec123ca Author: Peng Fan Date: Mon Apr 14 16:34:24 2025 +0800 ASoC: codec: tpa6130a2: Remove tpa6130a2_platform_data There is no in-tree user to create the device using platform data 'struct tpa6130a2_platform_data', so drop the dead code. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-2-5f4052e656a0@nxp.com Signed-off-by: Mark Brown commit b194e82b289cf3b382a9a69f0ef07dca887293bb Author: Peng Fan Date: Mon Apr 14 16:34:23 2025 +0800 ASoC: codec: tpa6130a2: Sort headers alphabetically Sort headers alphabetically to easily insert new ones and drop duplications. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-1-5f4052e656a0@nxp.com Signed-off-by: Mark Brown commit 07c9016085f95fe9ad90079753f156859c54f476 Author: Asahi Lina Date: Fri Apr 11 01:55:22 2025 +0200 rust: drm: add driver abstractions Implement the DRM driver abstractions. The `Driver` trait provides the interface to the actual driver to fill in the driver specific data, such as the `DriverInfo`, driver features and IOCTLs. Reviewed-by: Maxime Ripard Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-4-dakr@kernel.org [ MISC changes * remove unnecessary DRM features; make remaining ones crate private * add #[expect(unused)] to avoid warnings * add sealed trait * remove shmem::Object references * original source archive: https://archive.is/Pl9ys - Danilo ] Signed-off-by: Danilo Krummrich commit 9a69570682b1f179a8bd9439a24495e7a6246aa9 Author: Asahi Lina Date: Fri Apr 11 01:55:21 2025 +0200 rust: drm: ioctl: Add DRM ioctl abstraction DRM drivers need to be able to declare which driver-specific ioctls they support. Add an abstraction implementing the required types and a helper macro to generate the ioctl definition inside the DRM driver. Note that this macro is not usable until further bits of the abstraction are in place (but it will not fail to compile on its own, if not called). Signed-off-by: Asahi Lina Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-3-dakr@kernel.org [ MISC fixes * wrap raw_data in Opaque to avoid UB when creating a reference * fix IOCTL sample declaration * fix safety comment of IOCTL argument * original source archive: https://archive.is/LqHDQ - Danilo ] Signed-off-by: Danilo Krummrich commit 57493a145552fe8a9a926f25b14c324c441ca358 Author: Danilo Krummrich Date: Fri Apr 11 01:55:20 2025 +0200 drm: drv: implement __drm_dev_alloc() In the Rust DRM device abstraction we need to allocate a struct drm_device. Currently, there are two options, the deprecated drm_dev_alloc() (which does not support subclassing) and devm_drm_dev_alloc(). The latter supports subclassing, but also manages the initial reference through devres for the parent device. In Rust we want to conform with the subclassing pattern, but do not want to get the initial reference managed for us, since Rust has its own, idiomatic ways to properly deal with it. There are two options to achieve this. 1) Allocate the memory ourselves with a KBox. 2) Implement __drm_dev_alloc(), which supports subclassing, but is unmanged. While (1) would be possible, it would be cumbersome, since it would require exporting drm_dev_init() and drmm_add_final_kfree(). Hence, go with option (2) and implement __drm_dev_alloc(). Reviewed-by: Maxime Ripard Reviewed-by: Alyssa Rosenzweig Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20250410235546.43736-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 3ab7ae8e07f888f223027f0ef84d33e43919ad55 Merge: 4ea512714c42c6 b60301774a8fe6 Author: Thomas Hellström Date: Thu Apr 24 13:34:55 2025 +0200 Merge drm/drm-next into drm-xe-next Backmerge to bring in linux 6.15-rc. Signed-off-by: Thomas Hellström commit bef4f1156b74721b7d111114538659031119b6f2 Author: Niklas Söderlund Date: Fri Apr 18 16:58:00 2025 +0200 net: phy: marvell-88q2xxx: Enable temperature sensor for mv88q211x The temperature sensor enabled for mv88q222x devices also functions for mv88q211x based devices. Unify the two devices probe functions to enable the sensors for all devices supported by this driver. The same oddity as for mv88q222x devices exists, the PHY link must be up for a correct temperature reading to be reported. # cat /sys/class/hwmon/hwmon9/temp1_input -75000 # ifconfig end5 up # cat /sys/class/hwmon/hwmon9/temp1_input 59000 Worth noting is that while the temperature register offsets and layout are the same between mv88q211x and mv88q222x devices their names in the datasheets are different. This change keeps the mv88q222x names for the mv88q211x support. Signed-off-by: Niklas Söderlund Reviewed-by: Dimitri Fedrau Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250418145800.2420751-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Paolo Abeni commit f95c855306fe47e809ca7ad6b4f330535f8b34fb Author: Viresh Kumar Date: Wed Apr 23 15:51:06 2025 +0530 OPP: Use scope-based OF cleanup helpers Use the OF scope-based cleanup helpers for the OPP core. No intentional functional impact. Signed-off-by: Viresh Kumar commit ead694941686345bfd3f95100d889191cb9e3cda Author: Viresh Kumar Date: Wed Apr 23 15:48:40 2025 +0530 OPP: Return opp_table from dev_pm_opp_get_opp_table_ref() For convenience of users, return back the pointer to the opp_table from dev_pm_opp_get_opp_table_ref(), so they can do: opp_table = dev_pm_opp_get_opp_table_ref(tmp_table); No intentional functional impact. Signed-off-by: Viresh Kumar commit 7a3be00771aa9786c7bb4cdb0ee36fee45f67d69 Author: Viresh Kumar Date: Wed Apr 23 15:48:40 2025 +0530 OPP: Return opp from dev_pm_opp_get() For convenience of users, return back the pointer to the opp from dev_pm_opp_get(), so they can do: opp = dev_pm_opp_get(tmp_opp); No intentional functional impact. Signed-off-by: Viresh Kumar commit 4cb1383f9522a3d2f5e26b70688417187c7d48e4 Author: Viresh Kumar Date: Thu Apr 24 14:21:40 2025 +0530 OPP: Remove _get_opp_table_kref() Use dev_pm_opp_get_opp_table_ref() directly instead. No intentional functional impact. Signed-off-by: Viresh Kumar commit de7ad66b16b4d397593eafbbb09e9557b558a7e3 Author: Geert Uytterhoeven Date: Thu Apr 10 10:30:57 2025 +0200 HID: HID_APPLETB_BL should depend on X86 The Apple Touch Bar is only present on x86 MacBook Pros. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel for a different architecture. Fixes: 1fd41e5e3d7cc556 ("HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars") Signed-off-by: Geert Uytterhoeven Reviewed-by: Aditya Garg Signed-off-by: Jiri Kosina commit 2a647d400afecdf12ba5905424e1337fbc2d6750 Author: Geert Uytterhoeven Date: Thu Apr 10 10:30:56 2025 +0200 HID: HID_APPLETB_KBD should depend on X86 The Apple Touch Bar is only present on x86 MacBook Pros. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel for a different architecture. Fixes: 8e9b9152cfbdc2a9 ("HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch Bars") Signed-off-by: Geert Uytterhoeven Reviewed-by: Aditya Garg Signed-off-by: Jiri Kosina commit 663704db954796c6905c5c34321eb6dba1559404 Author: Thorsten Blum Date: Mon Apr 7 10:29:30 2025 +0200 HID: appletb-kbd: Use secs_to_jiffies() instead of msecs_to_jiffies() Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling the module params 'appletb_tb_idle_timeout' and 'appletb_tb_dim_timeout' to milliseconds. secs_to_jiffies() expands to simpler code and reduces the size of 'hid-appletb-kbd.ko'. Reformat the code to silence multiple checkpatch warnings. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Aditya Garg Tested-by: Aditya Garg Signed-off-by: Jiri Kosina commit bbd7a03dc9a22179726f001f63b460da71907024 Author: Colin Ian King Date: Wed Apr 2 12:21:29 2025 +0100 HID: intel-thc-hid: intel-thc: make read-only arrays static const Don't populate the read-only arrays frequency and frequency_div on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King Reviewed-by: Even Xu Signed-off-by: Jiri Kosina commit f262c73429ce6c3205fcc0fb6655d8d76725cd60 Author: Andre Przywara Date: Wed Apr 16 23:48:36 2025 +0100 dt-bindings: power: Add Allwinner H6/H616 PRCM PPU The Allwinner H6 and some later SoCs contain some bits in the PRCM (Power Reset Clock Management) block that control some power domains. Those power domains include the one for the GPU, the PLLs and some analogue circuits. Signed-off-by: Andre Przywara Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250416224839.9840-2-andre.przywara@arm.com Signed-off-by: Ulf Hansson commit b8d56ef91cc36b0db965c0896d0989e2151f3786 Author: Aditya Garg Date: Tue Apr 15 21:47:32 2025 +0530 HID: magicmouse: Apple Magic Mouse 2 USB-C support This patch adds support for USB-C model of Apple Magic Mouse 2. Except for the hardware ID, it should resemble the existing configuration for the older Magic Mouse 2. Signed-off-by: Aditya Garg Signed-off-by: Jiri Kosina commit 3a2b7389feea9a7afd18d58cda59b7a989445f38 Author: Michal Wilczynski Date: Fri Apr 18 13:22:49 2025 +0200 drm/imagination: Add reset controller support for GPU initialization All IMG Rogue GPUs include a reset line that participates in the power-up sequence. On some SoCs (e.g., T-Head TH1520 and Banana Pi BPI-F3), this reset line is exposed and must be driven explicitly to ensure proper initialization. On others, such as the currently supported TI SoC, the reset logic is handled in hardware or firmware without exposing the line directly. In platforms where the reset line is externally accessible, if it is not driven correctly, the GPU may remain in an undefined state, leading to instability or performance issues. This commit adds a dedicated reset controller to the drm/imagination driver. By managing the reset line (where applicable) as part of normal GPU bring-up, the driver ensures reliable initialization across platforms regardless of whether the reset is controlled externally or handled internally. Signed-off-by: Michal Wilczynski Reviewed-by: Matt Coster Link: https://lore.kernel.org/r/20250418-apr_18_reset_img-v6-2-85a06757b698@samsung.com Signed-off-by: Matt Coster commit 31a78afda1ef7f2f2ced5acd99d8bc5edd0325f8 Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:44 2025 +0200 HID: mcp2221: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit 9815a423613327be32f524a5162779ce4900c5b4 Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:43 2025 +0200 HID: mcp2200: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit 6485543488a6d35e9f24c6f50cb63710446d8aab Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:42 2025 +0200 HID: cp2112: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit 4c49d905ca434d54e399de6f0083b8a5ef0bbdf1 Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:41 2025 +0200 HID: cp2112: use lock guards Simplify the code by using the lock guards from linux/cleanup.h throughout the driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit 837b05fea0752ee900abe57253d9f79ca46dd227 Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:40 2025 +0200 HID: cp2112: hold the lock for the entire direction_output() call We currently take the lock, set direction to output, release it, reacquire it and set the desired value. That doesn't look correct. Introduce a helper function that sets the value without taking the lock and use it where applicable in order to combine the critical sections. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit a99548b8343a46c1050fc041314bbbd27065169d Author: Bartosz Golaszewski Date: Wed Apr 23 10:55:39 2025 +0200 HID: cp2112: destroy mutex on driver detach Use the devres variant of mutex_init() in order to free resources allocated with mutex debugging enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Jiri Kosina commit 1300a7f8a7d4c5f88de30312cf34448b96539c23 Author: Michal Wilczynski Date: Fri Apr 18 13:22:48 2025 +0200 dt-bindings: gpu: Add 'resets' property for GPU initialization All IMG Rogue GPUs include a reset line that participates in the power-up sequence. On some SoCs (e.g., T-Head TH1520 and Banana Pi BPI-F3), this reset line is exposed and must be driven explicitly to ensure proper initialization. To support this, add a 'resets' property to the GPU device tree bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michal Wilczynski Reviewed-by: Matt Coster Link: https://lore.kernel.org/r/20250418-apr_18_reset_img-v6-1-85a06757b698@samsung.com Signed-off-by: Matt Coster commit 37d66cf07871927ea682c491b9e9a12dd73e6b5b Author: Wentao Guan Date: Thu Apr 17 21:50:23 2025 +0800 HID: intel-thc-hid: intel-quicki2c: pass correct arguments to acpi_evaluate_object Delete unused argument, pass correct argument to acpi_evaluate_object. Log: intel_quicki2c 0000:00:10.0: enabling device (0000 -> 0002) ACPI: \_SB.PC00.THC0.ICRS: 1 arguments were passed to a non-method ACPI object (Buffer) (20230628/nsarguments-211) ACPI: \_SB.PC00.THC0.ISUB: 1 arguments were passed to a non-method ACPI object (Buffer) (20230628/nsarguments-211) Fixes: 5282e45ccbfa ("HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces") Signed-off-by: Wentao Guan Signed-off-by: WangYuli Reviewed-by: Even Xu Signed-off-by: Jiri Kosina commit cc2c611f2960095bee48ee5dcf7fb82f0e5125b7 Author: Chen Ni Date: Mon Apr 14 15:39:55 2025 +0800 HID: corsair-void: Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Signed-off-by: Jiri Kosina commit 3206a96675342badb0254558ba4b4c8764aa3ae7 Author: Arnd Bergmann Date: Wed Apr 9 14:22:53 2025 +0200 drm/imagination: avoid unused-const-variable warning When CONFIG_DEBUG_FS is disabled, the stid_fmts[] array is not referenced anywhere, causing a W=1 warning with gcc: In file included from drivers/gpu/drm/imagination/pvr_fw_trace.c:7: drivers/gpu/drm/imagination/pvr_rogue_fwif_sf.h:75:39: error: 'stid_fmts' defined but not used [-Werror=unused-const-variable=] 75 | static const struct rogue_km_stid_fmt stid_fmts[] = { | ^~~~~~~~~ Rather than adding more #ifdef blocks, address this by changing the existing #ifdef into equivalent IS_ENABLED() checks so gcc can see where the symbol is used but still eliminate it from the object file. Signed-off-by: Arnd Bergmann Reviewed-by: Matt Coster Link: https://lore.kernel.org/r/20250409122314.2848028-1-arnd@kernel.org Signed-off-by: Matt Coster commit f58470ce6d26eaa4130155281481c4a7d87160ac Author: TangDongxing Date: Mon Mar 17 14:49:03 2025 +0800 HID: hid-logitech: use sysfs_emit_at() instead of scnprintf() Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: TangDongxing Signed-off-by: Jiri Kosina commit a058002358b7aaf14674b2a0daa5194bfa5720a1 Author: Aditya Garg Date: Thu Apr 10 12:59:27 2025 +0530 HID: quirks: Add HID_QUIRK_IGNORE_MOUSE quirk Some USB HID mice have drivers both in HID as well as a separate USB driver. The already existing hid_mouse_ignore_list in hid-quirks manages this, but is not yet configurable by usbhid.quirks, unlike all others like hid_ignore_list. Thus in some HID devices, where the vendor provides USB drivers only for the mouse and lets keyboard handled by the generic hid drivers, presence of such a quirk prevents the user from compiling hid core again to add the device to the table. Signed-off-by: Aditya Garg Signed-off-by: Jiri Kosina commit fe7f7ac8e0c708446ff017453add769ffc15deed Author: Terry Junge Date: Wed Mar 12 15:23:31 2025 -0700 HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() Update struct hid_descriptor to better reflect the mandatory and optional parts of the HID Descriptor as per USB HID 1.11 specification. Note: the kernel currently does not parse any optional HID class descriptors, only the mandatory report descriptor. Update all references to member element desc[0] to rpt_desc. Add test to verify bLength and bNumDescriptors values are valid. Replace the for loop with direct access to the mandatory HID class descriptor member for the report descriptor. This eliminates the possibility of getting an out-of-bounds fault. Add a warning message if the HID descriptor contains any unsupported optional HID class descriptors. Reported-by: syzbot+c52569baf0c843f35495@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c52569baf0c843f35495 Fixes: f043bfc98c19 ("HID: usbhid: fix out-of-bounds bug") Cc: stable@vger.kernel.org Signed-off-by: Terry Junge Reviewed-by: Michael Kelley Signed-off-by: Jiri Kosina commit 9f78a29caacef6df5d6a43e85d1112e39cfa3b34 Author: Niklas Söderlund Date: Wed Apr 23 18:31:10 2025 +0200 arm64: dts: renesas: r8a779h0: Add ISP core function block The first ISP instance on V4M has both a channel select and core function block, describe the core region in addition to the existing cs region. While at it update the second ISP to match the new bindings and add the reg-names and interrupt-names property. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250423163113.2961049-5-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit c1f22633c28f347f1933e75ffe1635adf7f4f30e Author: Niklas Söderlund Date: Wed Apr 23 18:31:09 2025 +0200 arm64: dts: renesas: r8a779g0: Add ISP core function block All ISP instances on V4H have both a channel select and core function block, describe the core region in addition to the existing cs region. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250423163113.2961049-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 113521a4d2b0c48639b5b8a3bc087d6bbab20caa Author: Lode Willems Date: Mon Mar 3 13:30:42 2025 +0100 HID: Kysona: Add periodic online check This patch adds a periodic online check at the same interval the battery status gets requested. With this change the driver can detect when the mouse is turned off while the dongle is still plugged in. Tested with a Kysona M600 V-HUB Special Edition. Signed-off-by: Lode Willems Signed-off-by: Jiri Kosina commit 02e95521f337f98dd344f1e79a962b43a2e9dd5a Author: Niklas Söderlund Date: Wed Apr 23 18:31:08 2025 +0200 arm64: dts: renesas: r8a779a0: Add ISP core function block All ISP instances on V3U have both a channel select and core function block, describe the core region in addition to the existing cs region. The interrupt number already described intended to reflect the cs function but did incorrectly describe the core block. This was not noticed until now as the driver do not make use of the interrupt for the cs block. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250423163113.2961049-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit a719915e76f2b1390fbed7d40848aaaf7823060c Author: Marek Vasut Date: Sun Apr 20 19:36:29 2025 +0200 arm64: dts: renesas: r8a779g3: Add Retronix R-Car V4H Sparrow Hawk board support Add Retronix R-Car V4H Sparrow Hawk board based on Renesas R-Car V4H ES3.0 (R8A779G3) SoC. This is a single-board computer with single gigabit ethernet, DSI-to-eDP bridge, DSI and two CSI2 interfaces, audio codec, two CANFD ports, micro SD card slot, USB PD supply, USB 3.0 ports, M.2 Key-M slot for NVMe SSD, debug UART and JTAG. Tested-by: Kuninori Morimoto Tested-by: Niklas Söderlund Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250420173829.200553-4-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven commit 9e3b7138c3745a91d91e7e525e4b800ea276a761 Author: Marek Vasut Date: Sun Apr 20 19:36:28 2025 +0200 dt-bindings: soc: renesas: Document Retronix R-Car V4H Sparrow Hawk board support Document Retronix R-Car V4H Sparrow Hawk board based on Renesas R-Car V4H ES3.0 (R8A779G3) SoC. This is a single-board computer with single gigabit ethernet, DSI-to-eDP bridge, DSI and two CSI2 interfaces, audio codec, two CANFD ports, micro SD card slot, USB PD supply, USB 3.0 ports, M.2 Key-M slot for NVMe SSD, debug UART and JTAG. Acked-by: Krzysztof Kozlowski Tested-by: Niklas Söderlund Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250420173829.200553-3-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven commit da076d5562d2fc99138ff8ab04ff82eee7a4a3d8 Author: Marek Vasut Date: Sun Apr 20 19:36:27 2025 +0200 dt-bindings: vendor-prefixes: Add Retronix Technology Inc. Add vendor prefix for Retronix Technology Inc. https://www.retronix.com.tw/en/about.html Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Tested-by: Niklas Söderlund Signed-off-by: Marek Vasut Link: https://lore.kernel.org/20250420173829.200553-2-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven commit 04668774f67f56df311d8ebe919b704ccd219ba3 Author: Bartosz Golaszewski Date: Mon Apr 7 09:17:14 2025 +0200 i2c: mux: ltc4306: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin Reviewed-by: Linus Walleij Signed-off-by: Wolfram Sang commit 93d33af699f271b908d3eacf7e5872a8784e5a6d Author: Animesh Manna Date: Wed Apr 23 14:53:34 2025 +0530 drm/i915/display: Disintegrate sink alpm enable from psr with lobf Make a generic alpm enable function for sink which can be used for PSR2/PR/Lobf. v1: Initial version. v2: Move code comment to intel_psr_needs_alpm(). [Jouni] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-12-animesh.manna@intel.com commit 554698b826a1d0535faa707cf737bdc988068454 Author: Animesh Manna Date: Wed Apr 23 14:53:33 2025 +0530 drm/i915/alpm: Add intel_psr_need_alpm() to simplify alpm check Simplify the alpm check which will be used multiple places like source configuration, sink enablement etc. Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-11-animesh.manna@intel.com commit 2063174c22da83e9440466cf496ad3b20f85f5c8 Author: Animesh Manna Date: Wed Apr 23 14:53:32 2025 +0530 drm/i915/lobf: Check for sink error and disable LOBF Disable LOBF/ALPM for any erroneous condition from sink side. v1: Initial version. v2: Add centralized alpm error handling. [Jouni] v3: Improve debug print. [Jouni] v4: Disable alpm permanently for sink error. [Jouni] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-10-animesh.manna@intel.com commit acff6d6bded31d98698693827860adc5befdd854 Author: Animesh Manna Date: Wed Apr 23 14:53:31 2025 +0530 drm/i915/lobf: Add mutex for alpm update The ALPM_CTL can be updated from different context, so add mutex to sychonize the update. Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-9-animesh.manna@intel.com commit 917abe4bc7e5701509933e1be5022ff3c052ed13 Author: Animesh Manna Date: Wed Apr 23 14:53:30 2025 +0530 drm/i915/lobf: Add debug interface for lobf Add an interface in debugfs which will help in debugging LOBF feature. v1: Initial version. v2: - Remove FORCE_EN flag. [Jouni] - Change prefix from I915 to INTEL. [Jani] - Use u8 instead of bool for lobf-debug flag. [Jani] v3: - Use intel_connector instead of display. [Jani] - Remove edp connector check as it was already present in caller function. [Jani] - Remove loop of searching edp encoder which is directly accessible from intel_connector. [Jani] v4: - Simplify alpm debug to bool instead of bit-mask. [Jani] v5: - Remove READ_ONCE(). [Jani] - Modify variable name to *_disable_*. [Jouni] v6: Improved debug print. [Jouni] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-8-animesh.manna@intel.com commit 64a5dd770d35cb2b14f929eb13fb7863d1bedb1c Author: Animesh Manna Date: Wed Apr 23 14:53:29 2025 +0530 drm/i915/lobf: Update lobf if any change in dependent parameters For every commit the dependent condition for LOBF is checked and accordingly update has_lobf flag which will be used to update the ALPM_CTL register during commit. v1: Initial version. v2: Avoid reading h/w register without has_lobf check. [Jani] v3: Update LOBF in post plane update instead of separate function. [Jouni] v4: - Add lobf disable print. [Jouni] - Simplify condition check for enabling/disabling lobf. [Jouni] v5: Disable LOBF in pre_plane_update(). [Jouni] v6: use lobf flag of old_crtc_state and write 0 into ALPM_CTL. [Jouni] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-7-animesh.manna@intel.com commit 2c809080d296500d6ceed516f86dfa5e4e8f25bc Author: Animesh Manna Date: Wed Apr 23 14:53:28 2025 +0530 drm/i915/lobf: Add fixed refresh rate check in compute_config() LOBF can be enabled with vrr fixed rate mode, so add check if vmin = vmax = flipline in compute_config(). Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-6-animesh.manna@intel.com commit 504766382edb2a8babe030aad507965be1d632ee Author: Animesh Manna Date: Wed Apr 23 14:53:27 2025 +0530 drm/i915/lobf: Disintegrate alpm_disable from psr_disable Currently clearing of alpm registers is done through psr_disable() which is always not correct, without psr also alpm can exist. So dis-integrate alpm_disable() from psr_disable(). v1: Initial version. v2: - Remove h/w register read from alpm_disable(). [Jani] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-5-animesh.manna@intel.com commit ad89a60d51fdc6c9ba92c33d7e7304caedb73d2f Author: Animesh Manna Date: Wed Apr 23 14:53:26 2025 +0530 drm/i915/lobf: Add debug print for LOBF Lobf is enabled part of ALPM configuration and if has_lobf is set to true respective bit for LOBF will be set. Add debug print while setting the bitfield of LOBF. Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-4-animesh.manna@intel.com commit 172757acd6f60625f09760ef0ffdcac01d8ed58a Author: Animesh Manna Date: Wed Apr 23 14:53:25 2025 +0530 drm/i915/lobf: Add lobf enablement in post plane update Enablement of LOBF is added in post plane update whenever has_lobf flag is set. As LOBF can be enabled in non-psr case as well so adding in post plane update. There is no change of configuring alpm with psr path. v1: Initial version. v2: Use encoder-mask to find the associated encoder from crtc-state. [Jani] v3: Remove alpm_configure from intel_psr.c. [Jouni] Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250423092334.2294483-3-animesh.manna@intel.com commit 278a7be9b8d587017098cbfae39ee136337f1776 Author: Jouni Högander Date: Wed Apr 23 14:53:24 2025 +0530 drm/i915/alpm: use variable from intel_crtc_state instead of intel_psr Currently code is making assumption that PSR is enabled when intel_alpm_configure is called. This doesn't work if alpm is configured before PSR is enabled. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Signed-off-by: Animesh Manna Link: https://lore.kernel.org/r/20250423092334.2294483-2-animesh.manna@intel.com commit 0228687423587d8ef448fc1d81f96539507aa5bb Author: Nathan Chancellor Date: Wed Apr 23 10:41:41 2025 -0700 drm/panel: himax-hx8279: Always initialize goa_{even,odd}_valid in hx8279_check_goa_config() Clang warns (or errors with CONFIG_WERROR=y): drivers/gpu/drm/panel/panel-himax-hx8279.c:838:6: error: variable 'goa_even_valid' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 838 | if (num_zero == ARRAY_SIZE(desc->goa_even_timing)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-himax-hx8279.c:842:23: note: uninitialized use occurs here 842 | if (goa_odd_valid != goa_even_valid) | ^~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-himax-hx8279.c:838:2: note: remove the 'if' if its condition is always true 838 | if (num_zero == ARRAY_SIZE(desc->goa_even_timing)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 839 | goa_even_valid = false; drivers/gpu/drm/panel/panel-himax-hx8279.c:818:36: note: initialize the variable 'goa_even_valid' to silence this warning 818 | bool goa_odd_valid, goa_even_valid; | ^ | = 0 Even though only the even valid variable gets flagged, both valid variables appear to have the same issue of possibly being used uninitialized if the if statement initializing them to false is not taken. Turn the if statement then variable assignment into a single variable assignment, which states that the configuration is valid when there are not all zeros, clearing up the warning since the variable will always be initialized. Fixes: 38d42c261389 ("drm: panel: Add driver for Himax HX8279 DDIC panels") Suggested-by: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nathan Chancellor Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250423-panel-himax-hx8279-fix-sometimes-uninitialized-v2-1-fc501c6558d9@kernel.org Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250423-panel-himax-hx8279-fix-sometimes-uninitialized-v2-1-fc501c6558d9@kernel.org commit ed34944cc3bc5602c1151effdb6aced9f2f992a6 Author: Jianeng Ceng Date: Thu Apr 24 09:08:50 2025 +0800 arm64: dts: mediatek: Add MT8186 Ponyta Chromebooks MT8186 ponyta, known as huaqin custom label, is a MT8186 based laptop. It is based on the "corsola" design. It includes LTE, touchpad combinations. Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jianeng Ceng Link: https://lore.kernel.org/r/20250424010850.994288-3-cengjianeng@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno commit ce8ec1f8c8b363c2511332c909d06df7ae01f1b3 Author: Jianeng Ceng Date: Thu Apr 24 09:08:49 2025 +0800 dt-bindings: arm: mediatek: Add MT8186 Ponyta Chromebook Ponyta is a custom label Chromebook based on MT8186. It is a self-developed project of Huaqin and has no fixed OEM. Signed-off-by: Jianeng Ceng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250424010850.994288-2-cengjianeng@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno commit d56c95d46712e8301bdf9b1ca6199df7225ec6a9 Author: Jani Nikula Date: Wed Apr 23 13:02:13 2025 +0300 drm/i915/reg: Add/remove some extra blank lines Add/remove some blank lines to/from i915_reg.h primarily to help the scripted refactoring coming up, separating unrelated registers and keeping the comments together. v2: Also add some extra blank lines Reviewed-by: Suraj Kandpal # v1 Link: https://lore.kernel.org/r/20250423100213.720585-2-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1503bab74976f4211c8cab8e4839bc08d16cf5ba Author: Jani Nikula Date: Wed Apr 23 13:02:12 2025 +0300 drm/i915/reg: use REG_BIT and friends to define DP registers Define the DP register contents using the REG_BIT, REG_GENMASK, etc. macros. Ditch the unhelpful comments. Rename eDP related register content macros to have EDP_ prefix. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250423100213.720585-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit b0e8cb1e1604874a1baea1d208e38a88f2b5b079 Merge: abcec3ed92fca9 169fd62799e8ac Author: Paolo Abeni Date: Thu Apr 24 09:30:02 2025 +0200 Merge branch 'ipv6-no-rtnl-for-ipv6-routing-table' Kuniyuki Iwashima says: ==================== ipv6: No RTNL for IPv6 routing table. IPv6 routing tables are protected by each table's lock and work in the interrupt context, which means we basically don't need RTNL to modify an IPv6 routing table itself. Currently, the control paths require RTNL because we may need to perform device and nexthop lookups; we must prevent dev/nexthop from going away from the netns. This, however, can be achieved by RCU as well. If we are in the RCU critical section while adding an IPv6 route, synchronize_net() in __dev_change_net_namespace() and unregister_netdevice_many_notify() guarantee that the dev will not be moved to another netns or removed. Also, nexthop is guaranteed not to be freed during the RCU grace period. If we care about a race between nexthop removal and IPv6 route addition, we can get rid of RTNL from the control paths. Patch 1 moves a validation for RTA_MULTIPATH earlier. Patch 2 removes RTNL for SIOCDELRT and RTM_DELROUTE. Patch 3 ~ 11 moves validation and memory allocation earlier. Patch 12 prevents a race between two requests for the same table. Patch 13 & 14 prevents the nexthop race mentioned above. Patch 15 removes RTNL for SIOCADDRT and RTM_NEWROUTE. Test: The script [0] lets each CPU-X create 100000 routes on table-X in a batch. On c7a.metal-48xl EC2 instance with 192 CPUs, without this series: $ sudo ./route_test.sh start adding routes added 19200000 routes (100000 routes * 192 tables). total routes: 19200006 Time elapsed: 191577 milliseconds. with this series: $ sudo ./route_test.sh start adding routes added 19200000 routes (100000 routes * 192 tables). total routes: 19200006 Time elapsed: 62854 milliseconds. I changed the number of routes (1000 ~ 100000 per CPU/table) and consistently saw it finish 3x faster with this series. [0] mkdir tmp NS="test" ip netns add $NS ip -n $NS link add veth0 type veth peer veth1 ip -n $NS link set veth0 up ip -n $NS link set veth1 up TABLES=() for i in $(seq $(nproc)); do TABLES+=("$i") done ROUTES=() for i in {1..100}; do for j in {1..1000}; do ROUTES+=("2001:$i:$j::/64") done done for TABLE in "${TABLES[@]}"; do ( FILE="./tmp/batch-table-$TABLE.txt" > $FILE for ROUTE in "${ROUTES[@]}"; do echo "route add $ROUTE dev veth0 table $TABLE" >> $FILE done ) & done wait echo "start adding routes" START_TIME=$(date +%s%3N) for TABLE in "${TABLES[@]}"; do ip -n $NS -6 -batch "./tmp/batch-table-$TABLE.txt" & done wait END_TIME=$(date +%s%3N) ELAPSED_TIME=$((END_TIME - START_TIME)) echo "added $((${#ROUTES[@]} * ${#TABLES[@]})) routes (${#ROUTES[@]} routes * ${#TABLES[@]} tables)." echo "total routes: $(ip -n $NS -6 route show table all | wc -l)" # Just for debug echo "Time elapsed: ${ELAPSED_TIME} milliseconds." ip netns del $NS rm -fr ./tmp/ v2: https://lore.kernel.org/netdev/20250409011243.26195-1-kuniyu@amazon.com/ v1: https://lore.kernel.org/netdev/20250321040131.21057-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20250418000443.43734-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 169fd62799e8acabbfb4760799be11138ced949c Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:56 2025 -0700 ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE. Now we are ready to remove RTNL from SIOCADDRT and RTM_NEWROUTE. The remaining things to do are 1. pass false to lwtunnel_valid_encap_type_attr() 2. use rcu_dereference_rtnl() in fib6_check_nexthop() 3. place rcu_read_lock() before ip6_route_info_create_nh(). Let's complete the RTNL-free conversion. When each CPU-X adds 100000 routes on table-X in a batch concurrently on c7a.metal-48xl EC2 instance with 192 CPUs, without this series: $ sudo ./route_test.sh ... added 19200000 routes (100000 routes * 192 tables). time elapsed: 191577 milliseconds. with this series: $ sudo ./route_test.sh ... added 19200000 routes (100000 routes * 192 tables). time elapsed: 62854 milliseconds. I changed the number of routes in each table (1000 ~ 100000) and consistently saw it finish 3x faster with this series. Note that now every caller of lwtunnel_valid_encap_type() passes false as the last argument, and this can be removed later. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-16-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 081efd18326e353c6fbfdeff903a83edde953f72 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:55 2025 -0700 ipv6: Protect nh->f6i_list with spinlock and flag. We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT. Then, we may be going to add a route tied to a dying nexthop. The nexthop itself is not freed during the RCU grace period, but if we link a route after __remove_nexthop_fib() is called for the nexthop, the route will be leaked. To avoid the race between IPv6 route addition under RCU vs nexthop deletion under RTNL, let's add a dead flag and protect it and nh->f6i_list with a spinlock. __remove_nexthop_fib() acquires the nexthop's spinlock and sets false to nh->dead, then calls ip6_del_rt() for the linked route one by one without the spinlock because fib6_purge_rt() acquires it later. While adding an IPv6 route, fib6_add() acquires the nexthop lock and checks the dead flag just before inserting the route. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-15-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit accb46b56bc3bc99ee69ba18b06ca60266ad6fca Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:54 2025 -0700 ipv6: Defer fib6_purge_rt() in fib6_add_rt2node() to fib6_add(). The next patch adds per-nexthop spinlock which protects nh->f6i_list. When rt->nh is not NULL, fib6_add_rt2node() will be called under the lock. fib6_add_rt2node() could call fib6_purge_rt() for another route, which could holds another nexthop lock. Then, deadlock could happen between two nexthops. Let's defer fib6_purge_rt() after fib6_add_rt2node(). Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-14-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 834d97843e3bca86f17cc517885f54f3433427b2 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:53 2025 -0700 ipv6: Protect fib6_link_table() with spinlock. We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT. If the request specifies a new table ID, fib6_new_table() is called to create a new routing table. Two concurrent requests could specify the same table ID, so we need a lock to protect net->ipv6.fib_table_hash[h]. Let's add a spinlock to protect the hash bucket linkage. Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-13-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 71c0efb6d12f4c734b2a894c17e84ebab49b4c60 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:52 2025 -0700 ipv6: Factorise ip6_route_multipath_add(). We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT and rely on RCU to guarantee dev and nexthop lifetime. Then, the RCU section will start before ip6_route_info_create_nh() in ip6_route_multipath_add(), but ip6_route_info_create() is called in the same loop and will sleep. Let's split the loop into ip6_route_mpath_info_create() and ip6_route_mpath_info_create_nh(). Note that ip6_route_info_append() is now integrated into ip6_route_mpath_info_create_nh() because we need to call different free functions for nexthops that passed ip6_route_info_create_nh(). In case of failure, the remaining nexthops that ip6_route_info_create_nh() has not been called for will be freed by ip6_route_mpath_info_cleanup(). OTOH, if a nexthop passes ip6_route_info_create_nh(), it will be linked to a local temporary list, which will be spliced back to rt6_nh_list. In case of failure, these nexthops will be released by fib6_info_release() in ip6_route_multipath_add(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-12-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 5a1ccff5c65aa553429a8caf8f491d503d760568 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:51 2025 -0700 ipv6: Rename rt6_nh.next to rt6_nh.list. ip6_route_multipath_add() allocates struct rt6_nh for each config of multipath routes to link them to a local list rt6_nh_list. struct rt6_nh.next is the list node of each config, so the name is quite misleading. Let's rename it to list. Suggested-by: Paolo Abeni Link: https://lore.kernel.org/netdev/c9bee472-c94e-4878-8cc2-1512b2c54db5@redhat.com/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-11-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 87d5d921eaf225fc820907f3c6827e5d7cc85bc3 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:50 2025 -0700 ipv6: Don't pass net to ip6_route_info_append(). net is not used in ip6_route_info_append() after commit 36f19d5b4f99 ("net/ipv6: Remove extra call to ip6_convert_metrics for multipath case"). Let's remove the argument. Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-10-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit d27b9c40dbd66aa78b3e6657e600cf057a48ac1e Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:49 2025 -0700 ipv6: Preallocate nhc_pcpu_rth_output in ip6_route_info_create(). ip6_route_info_create_nh() will be called under RCU. It calls fib_nh_common_init() and allocates nhc->nhc_pcpu_rth_output. As with the reason for rt->fib6_nh->rt6i_pcpu, we want to avoid GFP_ATOMIC allocation for nhc->nhc_pcpu_rth_output under RCU. Let's preallocate it in ip6_route_info_create(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-9-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 5720a328c3e9802af48dd216c1c7eb0e91b61b6c Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:48 2025 -0700 ipv6: Preallocate rt->fib6_nh->rt6i_pcpu in ip6_route_info_create(). ip6_route_info_create_nh() will be called under RCU. Then, fib6_nh_init() is also under RCU, but per-cpu memory allocation is very likely to fail with GFP_ATOMIC while bulk-adding IPv6 routes and we would see a bunch of this message in dmesg. percpu: allocation failed, size=8 align=8 atomic=1, atomic alloc failed, no space left percpu: allocation failed, size=8 align=8 atomic=1, atomic alloc failed, no space left Let's preallocate rt->fib6_nh->rt6i_pcpu in ip6_route_info_create(). If something fails before the original memory allocation in fib6_nh_init(), ip6_route_info_create_nh() calls fib6_info_release(), which releases the preallocated per-cpu memory. Note that rt->fib6_nh->rt6i_pcpu is not preallocated when called via ipv6_stub, so we still need alloc_percpu_gfp() in fib6_nh_init(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-8-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit c4837b9853e5a7fa70122b7760f0f26147b08a57 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:47 2025 -0700 ipv6: Split ip6_route_info_create(). We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT and rely on RCU to guarantee dev and nexthop lifetime. Then, we want to allocate as much as possible before entering the RCU section. The RCU section will start in the middle of ip6_route_info_create(), and this is problematic for ip6_route_multipath_add() that calls ip6_route_info_create() multiple times. Let's split ip6_route_info_create() into two parts; one for memory allocation and another for nexthop setup. Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-7-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit c9cabe05e450b4a23072b248db33e6d97c986933 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:46 2025 -0700 ipv6: Move nexthop_find_by_id() after fib6_info_alloc(). We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT. Then, we must perform two lookups for nexthop and dev under RCU to guarantee their lifetime. ip6_route_info_create() calls nexthop_find_by_id() first if RTA_NH_ID is specified, and then allocates struct fib6_info. nexthop_find_by_id() must be called under RCU, but we do not want to use GFP_ATOMIC for memory allocation here, which will be likely to fail in ip6_route_multipath_add(). Let's move nexthop_find_by_id() after the memory allocation so that we can later split ip6_route_info_create() into two parts: the sleepable part and the RCU part. Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-6-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit e6f497955fb6a072999db491a01dd3a203d5bcea Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:45 2025 -0700 ipv6: Check GATEWAY in rtm_to_fib6_multipath_config(). In ip6_route_multipath_add(), we call rt6_qualify_for_ecmp() for each entry. If it returns false, the request fails. rt6_qualify_for_ecmp() returns false if either of the conditions below is true: 1. f6i->fib6_flags has RTF_ADDRCONF 2. f6i->nh is not NULL 3. f6i->fib6_nh->fib_nh_gw_family is AF_UNSPEC 1 is unnecessary because rtm_to_fib6_config() never sets RTF_ADDRCONF to cfg->fc_flags. 2. is equivalent with cfg->fc_nh_id. 3. can be replaced by checking RTF_GATEWAY in the base and each multipath entry because AF_INET6 is set to f6i->fib6_nh->fib_nh_gw_family only when cfg.fc_is_fdb is true or RTF_GATEWAY is set, but the former is always false. These checks do not require RCU and can be done earlier. Let's perform the equivalent checks in rtm_to_fib6_multipath_config(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-5-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit fa76c1674f2ebafb5cc8ab6fc3a3b0c0d09e9321 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:44 2025 -0700 ipv6: Move some validation from ip6_route_info_create() to rtm_to_fib6_config(). ip6_route_info_create() is called from 3 functions: * ip6_route_add() * ip6_route_multipath_add() * addrconf_f6i_alloc() addrconf_f6i_alloc() does not need validation for struct fib6_config in ip6_route_info_create(). ip6_route_multipath_add() calls ip6_route_info_create() for multiple routes with slightly different fib6_config instances, which is copied from the base config passed from userspace. So, we need not validate the same config repeatedly. Let's move such validation into rtm_to_fib6_config(). Signed-off-by: Kuniyuki Iwashima Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250418000443.43734-4-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit bd11ff421d36abdb585b9104fa70057bf01b3110 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:43 2025 -0700 ipv6: Get rid of RTNL for SIOCDELRT and RTM_DELROUTE. Basically, removing an IPv6 route does not require RTNL because the IPv6 routing tables are protected by per table lock. inet6_rtm_delroute() calls nexthop_find_by_id() to check if the nexthop specified by RTA_NH_ID exists. nexthop uses rbtree and the top-down walk can be safely performed under RCU. ip6_route_del() already relies on RCU and the table lock, but we need to extend the RCU critical section a bit more to cover __ip6_del_rt(). For example, nexthop_for_each_fib6_nh() and inet6_rt_notify() needs RCU. Let's call nexthop_find_by_id() and __ip6_del_rt() under RCU and get rid of RTNL from inet6_rtm_delroute() and SIOCDELRT. Even if the nexthop is removed after rcu_read_unlock() in inet6_rtm_delroute(), __remove_nexthop_fib() cleans up the routes tied to the nexthop, and ip6_route_del() returns -ESRCH. So the request was at least valid as of nexthop_find_by_id(), and it's just a matter of timing. Note that we need to pass false to lwtunnel_valid_encap_type_attr(). The following patches also use the newroute bool. Note also that fib6_get_table() does not require RCU because once allocated fib6_table is not freed until netns dismantle. I will post a follow-up series to convert such callers to RCU-lockless version. [0] Link: https://lore.kernel.org/netdev/20250417174557.65721-1-kuniyu@amazon.com/ #[0] Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-3-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 4cb4861d8c3b3b4da478573dc6c03899b526bf08 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:03:42 2025 -0700 ipv6: Validate RTA_GATEWAY of RTA_MULTIPATH in rtm_to_fib6_config(). We will perform RTM_NEWROUTE and RTM_DELROUTE under RCU, and then we want to perform some validation out of the RCU scope. When creating / removing an IPv6 route with RTA_MULTIPATH, inet6_rtm_newroute() / inet6_rtm_delroute() validates RTA_GATEWAY in each multipath entry. Let's do that in rtm_to_fib6_config(). Note that now RTM_DELROUTE returns an error for RTA_MULTIPATH with 0 entries, which was accepted but should result in -EINVAL as RTM_NEWROUTE. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418000443.43734-2-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit ab394a9785f0339fd6617cd51ca4e2982a82cd87 Author: Axe Yang Date: Thu Apr 24 09:34:35 2025 +0800 arm64: dts: mediatek: mt8186-corsola: make SDIO card removable Under specific conditions, the SDIO function driver needs to remove/add SDIO card to perform a reset. Remove the non-removable property to support this scenario. Signed-off-by: Axe Yang Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20250424013603.32351-1-axe.yang@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 889dbe65c7777fce04f28a6859dfb9ba2373f414 Author: Philipp Stanner Date: Wed Apr 23 09:53:46 2025 +0200 ALSA: maestro3: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-29-phasta@kernel.org commit 112b3388b170996d48dc0b76aa2bcc2b4ae26428 Author: Philipp Stanner Date: Wed Apr 23 09:53:45 2025 +0200 ALSA: ali5451: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-28-phasta@kernel.org commit 385de1265b9625c10d610dd8f89e03a3228248ad Author: Philipp Stanner Date: Wed Apr 23 09:53:44 2025 +0200 ALSA: ca0106: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-27-phasta@kernel.org commit 9d7f24e4194a8d27a866b950ff0d06f63a6c4a30 Author: Philipp Stanner Date: Wed Apr 23 09:53:43 2025 +0200 ALSA: cs46xx: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-26-phasta@kernel.org commit ffa194e9c4aa2edcfd33041be76f285e54a4ac72 Author: Philipp Stanner Date: Wed Apr 23 09:53:42 2025 +0200 ALSA: cs5535: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-25-phasta@kernel.org commit 6012022e8733afd264a44ec663bf5d7028b07c10 Author: Philipp Stanner Date: Wed Apr 23 09:53:41 2025 +0200 ALSA: echoaudio: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-24-phasta@kernel.org commit ed99513c876ed8f686e6e26b5f227bcd83f2bc4d Author: Philipp Stanner Date: Wed Apr 23 09:53:40 2025 +0200 ALSA: emu10k1: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-23-phasta@kernel.org commit dbaa14de42ca1e6c2807cedf10dc26dec84ec24b Author: Philipp Stanner Date: Wed Apr 23 09:53:39 2025 +0200 ALSA: ice: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-22-phasta@kernel.org commit 87e46c2dcd4d5253801714460ffcb9a651f10f4a Author: Philipp Stanner Date: Wed Apr 23 09:53:38 2025 +0200 ALSA: nm256: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-21-phasta@kernel.org commit aa37a26911905509417b583557eb5501f6633ce2 Author: Philipp Stanner Date: Wed Apr 23 09:53:37 2025 +0200 ALSA: riptide: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-20-phasta@kernel.org commit b15fde2e9de6f012825e8bac5d1e993c32fa5b91 Author: Philipp Stanner Date: Wed Apr 23 09:53:36 2025 +0200 ALSA: ymfpci: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-19-phasta@kernel.org commit 9c7f2b5ec78e1860de620cf85958c008bc04bfa6 Author: Philipp Stanner Date: Wed Apr 23 09:53:35 2025 +0200 ALSA: rme9652: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-18-phasta@kernel.org commit c553c4120e505596b1cc8fb228f11e1e9f1e478f Author: Philipp Stanner Date: Wed Apr 23 09:53:34 2025 +0200 ALSA: trident: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. In addition, the request function's name parameter should describe the driver, not the device. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-17-phasta@kernel.org commit 20db879af305d33a24fa8be00034df9bb87a0db4 Author: Philipp Stanner Date: Wed Apr 23 09:53:33 2025 +0200 ALSA: vx222: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Pass the driver's name as the name parameter of pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-16-phasta@kernel.org commit abef027b1c63673c2b041d534bd01ff2b81594dd Author: Philipp Stanner Date: Wed Apr 23 09:53:32 2025 +0200 ALSA: lx6464es: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-15-phasta@kernel.org commit 312ef977c6e8be0ee9636f325cfe2116ca176ec3 Author: Philipp Stanner Date: Wed Apr 23 09:53:31 2025 +0200 ALSA: oxygen: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-14-phasta@kernel.org commit e66819c050fe877b35b6b80cd75a3085b2ee00b6 Author: Philipp Stanner Date: Wed Apr 23 09:53:30 2025 +0200 ALSA: als: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-13-phasta@kernel.org commit 9dcc434f77b011abb7d4379a847b1b96cfac52d8 Author: Philipp Stanner Date: Wed Apr 23 09:53:29 2025 +0200 ALSA: azt3328: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-12-phasta@kernel.org commit c76d669aa91d05671b3c28f8d2da2038080183e4 Author: Philipp Stanner Date: Wed Apr 23 09:53:28 2025 +0200 ALSA: es19x8: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-11-phasta@kernel.org commit bf09f91b1df388dc679a896513649ad00bbdf987 Author: Philipp Stanner Date: Wed Apr 23 09:53:27 2025 +0200 ALSA: fm801: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-10-phasta@kernel.org commit c07e644a8c6516544b981db1544ce251756a7902 Author: Philipp Stanner Date: Wed Apr 23 09:53:26 2025 +0200 ALSA: intel8x: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-9-phasta@kernel.org commit 5f8a4915d274f2e213ac2f354dc4b5cb9abf6e34 Author: Philipp Stanner Date: Wed Apr 23 09:53:25 2025 +0200 ALSA: sis7019: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-8-phasta@kernel.org commit a205115e008ad2e024b50e896ebddeb1a7e7e2d0 Author: Philipp Stanner Date: Wed Apr 23 09:53:24 2025 +0200 ALSA: via82: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-7-phasta@kernel.org commit 9512fa67411f7bdd2c747db40a30bc838d645772 Author: Philipp Stanner Date: Wed Apr 23 09:53:23 2025 +0200 ALSA: cmipci: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-6-phasta@kernel.org commit 2707ddc9c542230b983ecc8a898bdf4f4771e227 Author: Philipp Stanner Date: Wed Apr 23 09:53:22 2025 +0200 ALSA: ens1370: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-5-phasta@kernel.org commit 92281a666d2853c0d0cad57f693104dae179002e Author: Philipp Stanner Date: Wed Apr 23 09:53:21 2025 +0200 ALSA: rme32: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-4-phasta@kernel.org commit 6452c6d2c69192f701921a60130a58663076d7ca Author: Philipp Stanner Date: Wed Apr 23 09:53:20 2025 +0200 ALSA: rme96: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-3-phasta@kernel.org commit 5063eb3b7e3217b26aa6eeb518a8fa7bcf2c464d Author: Philipp Stanner Date: Wed Apr 23 09:53:19 2025 +0200 ALSA: sonicvibes: Use pure devres PCI pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250423075346.45907-2-phasta@kernel.org commit 69d63d19eda7792052f5f694f154898fc00d60ae Author: Arnd Bergmann Date: Wed Apr 23 18:29:52 2025 +0200 soc: mediatek: mtk-dvfsrc: remove an unused variable This structure was left unused by a previous patch: drivers/soc/mediatek/mtk-dvfsrc.c:542:43: error: unused variable 'dvfsrc_bw_constr_mt8195' [-Werror,-Wunused-const-variable] Fixes: b06785283ec1 ("soc: mediatek: mtk-dvfsrc: Rename and move bw constraints data") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250423162958.2223689-1-arnd@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit 23a8e0df49b851ed1ad12f87c52d113be8a6b6e2 Author: Colin Ian King Date: Tue Apr 22 10:09:40 2025 +0100 ata: sata_sx4: Fix spelling mistake "parttern" -> "pattern" There are spelling mistakes in arrays test_parttern1 and test_parttern2. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Damien Le Moal commit 36f6f7e2d4d094c828977938eaa4949ec5439380 Author: Alan Borzeszkowski Date: Thu Apr 10 16:34:19 2025 +0300 Documentation/admin-guide: Document Thunderbolt/USB4 tunneling events Add documentation about the Thunderbolt/USB4 tunneling events to the user’s and administrator’s guide. Signed-off-by: Alan Borzeszkowski Signed-off-by: Mika Westerberg commit 607063f08e5c5aca9a40015843952389126b6be1 Author: Alan Borzeszkowski Date: Mon Jan 20 19:19:22 2025 +0100 thunderbolt: Notify userspace about firmware CM tunneling events In the same way we do for software connection manager, send notifications about tunneling changes done by the firmware connection manager as well. There are some limitations with this though, for example we only get "DP Configuration Changed" message from the firmware without any indication if DisplayPort tunnel was activated or deactivated. Also we don't get information about the tunnel itself either so the event then looks like: TUNNEL_EVENT=changed TUNNEL_DETAILS=(DP) XDomain connections are similar to what the software connection manager sends. Signed-off-by: Alan Borzeszkowski Signed-off-by: Mika Westerberg commit 785da9e6a1bd9e00d7494e37cbca2f66e48375b8 Author: Alan Borzeszkowski Date: Tue Jan 21 18:46:21 2025 +0100 thunderbolt: Notify userspace about software CM tunneling events This adds notification whenever software connection manager activates, changes or deactivates a tunnel, and also if there is limitation in bandwidth. The notification looks like below: TUNNEL_EVENT=activated|changed|deactivated|low bandwidth| insufficient bandwidth TUNNEL_DETAILS=0:12 <-> 1:20 (USB3) Userspace can then listen these and inform user if needed. For example if there is not enough bandwidth, it can show warning dialog to the user. Signed-off-by: Alan Borzeszkowski Signed-off-by: Mika Westerberg commit cdf9956b6974206e1fd20e9bd30842df9714c5b8 Author: Alan Borzeszkowski Date: Tue Jan 21 18:46:20 2025 +0100 thunderbolt: Introduce domain event message handler This patch introduces a function that can be used to send uevent notifications in the domain to userspace. For instance, it can indicate that a DisplayPort tunnel could not be established due to insufficient bandwidth. Userspace can then forward to user via dialog or similar. Convert boot_acl_store() to call this instead of open-coding. Signed-off-by: Alan Borzeszkowski Signed-off-by: Mika Westerberg commit 6f18d174b73d0ceeaa341f46c0986436b3aefc9a Author: Sumit Kumar Date: Wed Apr 9 16:17:43 2025 +0530 bus: mhi: ep: Update read pointer only after buffer is written Inside mhi_ep_ring_add_element, the read pointer (rd_offset) is updated before the buffer is written, potentially causing race conditions where the host sees an updated read pointer before the buffer is actually written. Updating rd_offset prematurely can lead to the host accessing an uninitialized or incomplete element, resulting in data corruption. Invoke the buffer write before updating rd_offset to ensure the element is fully written before signaling its availability. Fixes: bbdcba57a1a2 ("bus: mhi: ep: Add support for ring management") cc: stable@vger.kernel.org Co-developed-by: Youssef Samir Signed-off-by: Youssef Samir Signed-off-by: Sumit Kumar Reviewed-by: Jeff Hugo Reviewed-by: Krishna Chaitanya Chundru Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250409-rp_fix-v1-1-8cf1fa22ed28@quicinc.com Signed-off-by: Manivannan Sadhasivam commit abcec3ed92fca92cd81d743bb8a5409da73b7560 Merge: b5cdb9b3113e66 f41f3edf0b15d7 Author: Jakub Kicinski Date: Wed Apr 23 18:48:13 2025 -0700 Merge branch 'net-mlx5-hws-improve-ip-version-handling' Mark Bloch says: ==================== net/mlx5: HWS, Improve IP version handling This small series hardens our checks against a single matcher containing rules that match on IPv4 and IPv6. This scenario is not supported by hardware steering and the implementation now signals this instead of failing silently. Patches: * Patch 1 forbids a single definer to match on mixed IP versions for source and destination address. * Patch 2 reproduces a couple of firmware checks: it forbids creating a definer that matches on IP address without matching on IP version, and also disallows matching on IPv6 addresses and the IPv4 IHL fields in the same definer. * Patch 3 forbids mixing rules that match on IPv4 and IPv6 addresses in the same matcher. The underlying definer mechanism does not support that. ==================== Link: https://patch.msgid.link/20250422092540.182091-1-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit f41f3edf0b15d7ce0b0f71c00a6125e8d7ca735f Author: Vlad Dogaru Date: Tue Apr 22 12:25:40 2025 +0300 net/mlx5: HWS, Disallow matcher IP version mixing Signal clearly to the user, via an error, that mixing IPv4 and IPv6 rules in the same matcher is not supported. Previously such cases silently failed by adding a rule that did not work correctly. Rules can specify an IP version by one of two fields: IP version or ethertype. At matcher creation, store whether the template matches on any of these two fields. If yes, inspect each rule for its corresponding match value and store the IP version inside the matcher to guard against inconsistencies with subsequent rules. Furthermore, also check rules for internal consistency, i.e. verify that the ethertype and IP version match values do not contradict each other. The logic applies to inner and outer headers independently, to account for tunneling. Rules that do not match on IP addresses are not affected. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250422092540.182091-4-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit 6991a975e416154576b0f5f06256aec13e23b0a7 Author: Vlad Dogaru Date: Tue Apr 22 12:25:39 2025 +0300 net/mlx5: HWS, Harden IP version definer checks Replicate some sanity checks that firmware does, since hardware steering does not go through firmware. When creating a definer, disallow matching on IP addresses without also matching on IP version. The latter can be satisfied by matching either on the version field in the IP header, or on the ethertype field. Also refuse to match IPv4 IHL alongside IPv6. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250422092540.182091-3-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit 5f2f8d8b6800e4fc760c2eccec9b2bd2cacf80cf Author: Vlad Dogaru Date: Tue Apr 22 12:25:38 2025 +0300 net/mlx5: HWS, Fix IP version decision Unify the check for IP version when creating a definer. A given matcher is deemed to match on IPv6 if any of the higher order (>31) bits of source or destination address mask are set. A single packet cannot mix IP versions between source and destination addresses, so it makes no sense that they would be decided on independently. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250422092540.182091-2-mbloch@nvidia.com Signed-off-by: Jakub Kicinski commit b5cdb9b3113e6633d84f5598b5010794e86a4d35 Author: Hariprasad Kelam Date: Sun Apr 20 08:53:50 2025 +0530 octeontx2-pf: AF_XDP: code clean up The current API, otx2_xdp_sq_append_pkt, verifies the number of available descriptors before sending packets to the hardware. However, for AF_XDP, this check is unnecessary because the batch value is already determined based on the free descriptors. This patch introduces a new API, "otx2_xsk_sq_append_pkt" to address this. Remove the logic for releasing the TX buffers, as it is implicitly handled by xsk_tx_peek_release_desc_batch Signed-off-by: Hariprasad Kelam Link: https://patch.msgid.link/20250420032350.4047706-1-hkelam@marvell.com Signed-off-by: Jakub Kicinski commit 3fec58f5a455411393f9f72314a6cb6327a26bd1 Merge: a484fe88062d08 f05ce73cc3b2bb Author: Jakub Kicinski Date: Wed Apr 23 18:31:55 2025 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== igc: Add support for Frame Preemption Faizal Rahim says: Introduce support for the FPE feature in the IGC driver. The patches aligns with the upstream FPE API: https://patchwork.kernel.org/project/netdevbpf/cover/20230220122343.1156614-1-vladimir.oltean@nxp.com/ https://patchwork.kernel.org/project/netdevbpf/cover/20230119122705.73054-1-vladimir.oltean@nxp.com/ It builds upon earlier work: https://patchwork.kernel.org/project/netdevbpf/cover/20220520011538.1098888-1-vinicius.gomes@intel.com/ The patch series adds the following functionalities to the IGC driver: a) Configure FPE using `ethtool --set-mm`. b) Display FPE settings via `ethtool --show-mm`. c) View FPE statistics using `ethtool --include-statistics --show-mm'. e) Block setting preemptible tc in taprio since it is not supported yet. Existing code already blocks it in mqprio. Tested: Enabled CONFIG_PROVE_LOCKING, CONFIG_DEBUG_ATOMIC_SLEEP, CONFIG_DMA_API_DEBUG, and CONFIG_KASAN 1) selftests 2) netdev down/up cycles 3) suspend/resume cycles 4) fpe verification No bugs or unusual dmesg logs were observed. Ran 1), 2) and 3) with and without the patch series, compared dmesg and selftest logs - no differences found. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: add support to get frame preemption statistics via ethtool igc: add support to get MAC Merge data via ethtool igc: block setting preemptible traffic class in taprio igc: add support to set tx-min-frag-size igc: add support for frame preemption verification igc: set the RX packet buffer size for TSN mode igc: use FIELD_PREP and GENMASK for existing RX packet buffer size igc: optimize TX packet buffer utilization for TSN mode igc: use FIELD_PREP and GENMASK for existing TX packet buffer size igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT igc: rename xdp_get_tx_ring() for non-xdp usage net: ethtool: mm: reset verification status when link is down net: ethtool: mm: extract stmmac verification logic into common library net: stmmac: move frag_size handling out of spin_lock ==================== Link: https://patch.msgid.link/20250418163822.3519810-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit a484fe88062d08ba71ce84e2718ca85730ec6a10 Merge: cd7276ecac9c64 f252493e183536 Author: Jakub Kicinski Date: Wed Apr 23 17:03:54 2025 -0700 Merge branch 'enable-multiple-irq-lines-support-in-airoha_eth-driver' Lorenzo Bianconi says: ==================== Enable multiple IRQ lines support in airoha_eth driver EN7581 ethernet SoC supports 4 programmable IRQ lines each one composed by 4 IRQ configuration registers to map Tx/Rx queues. Enable multiple IRQ lines support. ==================== Link: https://patch.msgid.link/20250418-airoha-eth-multi-irq-v1-0-1ab0083ca3c1@kernel.org Signed-off-by: Jakub Kicinski commit f252493e1835366fc25ce631c3056f900977dd11 Author: Lorenzo Bianconi Date: Fri Apr 18 12:40:50 2025 +0200 net: airoha: Enable multiple IRQ lines support in airoha_eth driver. EN7581 ethernet SoC supports 4 programmable IRQ lines for Tx and Rx interrupts. Enable multiple IRQ lines support. Map Rx/Tx queues to the available IRQ lines using the default scheme used in the vendor SDK: - IRQ0: rx queues [0-4],[7-9],15 - IRQ1: rx queues [21-30] - IRQ2: rx queues 5 - IRQ3: rx queues 6 Tx queues interrupts are managed by IRQ0. Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250418-airoha-eth-multi-irq-v1-2-1ab0083ca3c1@kernel.org Signed-off-by: Jakub Kicinski commit 9439db26d3ee4a897e5cd108864172531f31ce07 Author: Lorenzo Bianconi Date: Fri Apr 18 12:40:49 2025 +0200 net: airoha: Introduce airoha_irq_bank struct EN7581 ethernet SoC supports 4 programmable IRQ lines each one composed by 4 IRQ configuration registers. Add airoha_irq_bank struct as a container for independent IRQ lines info (e.g. IRQ number, enabled source interrupts, ecc). This is a preliminary patch to support multiple IRQ lines in airoha_eth driver. Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250418-airoha-eth-multi-irq-v1-1-1ab0083ca3c1@kernel.org Signed-off-by: Jakub Kicinski commit cd7276ecac9c64c80433fbcff2e35aceaea6f477 Merge: 52358dd63e348c 4f51e7d370a041 Author: Jakub Kicinski Date: Wed Apr 23 16:58:05 2025 -0700 Merge branch 'r8169-merge-chip-versions' Heiner Kallweit says: ==================== r8169: merge chip versions After 2b065c098c37 ("r8169: refactor chip version detection") we can merge handling of few chip versions. ==================== Link: https://patch.msgid.link/5e1e14ea-d60f-4608-88eb-3104b6bbace8@gmail.com Signed-off-by: Jakub Kicinski commit 4f51e7d370a04122fa78470b031d6487c52298b1 Author: Heiner Kallweit Date: Fri Apr 18 11:25:17 2025 +0200 r8169: merge chip versions 52 and 53 (RTL8117) Handling of both chip versions is the same, only difference is the firmware. So we can merge handling of both chip versions. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://patch.msgid.link/ae866b71-c904-434e-befb-848c831e33ff@gmail.com Signed-off-by: Jakub Kicinski commit f372ef6ed5a6b0401c884561d4bba1843e54d46a Author: Heiner Kallweit Date: Fri Apr 18 11:24:30 2025 +0200 r8169: merge chip versions 64 and 65 (RTL8125D) Handling of both chip versions is the same, only difference is the firmware. So we can merge handling of both chip versions. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://patch.msgid.link/0baad123-c679-4154-923f-fdc12783e900@gmail.com Signed-off-by: Jakub Kicinski commit 4dec0702b8627c364a0e1f2c5b249e06709a1c24 Author: Heiner Kallweit Date: Fri Apr 18 11:23:45 2025 +0200 r8169: merge chip versions 70 and 71 (RTL8126A) Handling of both chip versions is the same, only difference is the firmware. So we can merge handling of both chip versions. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://patch.msgid.link/97d7ae79-d021-4b6b-b424-89e5e305b029@gmail.com Signed-off-by: Jakub Kicinski commit 52358dd63e348c3b6c488acc105be1aeda8fb923 Author: Heiner Kallweit Date: Fri Apr 18 11:04:01 2025 +0200 net: phy: remove function stubs All callers of these functions depend on PHYLIB or select it directly or indirectly by selecting PHYLINK. Stubs make sense for optional functionality, but that's not the case here. MDIO_XGENE usually is selected by NET_XGENE which also selects PHYLIB. Add a dependency to PHYLIB nevertheless, in order not to break randconfig builds. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/f7a69a1f-60e9-4ac0-8b7c-481e0cc850e7@gmail.com Signed-off-by: Jakub Kicinski commit 60400cd2b9bed537e6a2a8b580cfc3271e1aa672 Author: Ilya Leoshkevich Date: Wed Apr 16 14:47:58 2025 +0200 selftests/bpf: Set MACs during veth creation in tc_redirect tc_redirect/tc_redirect_dtime fails intermittently on some systems with: (network_helpers.c:303: errno: Operation now in progress) Failed to connect to server The problem is that on these systems systemd-networkd and systemd-udevd are installed in the default configuration, which includes: /usr/lib/systemd/network/99-default.link /usr/lib/udev/rules.d/80-net-setup-link.rules These configs instruct systemd to change MAC addresses of newly created interfaces, which includes the ones created by BPF selftests. In this particular case it causes SYN+ACK packets to be dropped, because they get the PACKET_OTHERHOST type - the fact that this causes a connect() on a blocking socket to return -EINPROGRESS looks like a bug, which needs to be investigated separately. systemd won't change the MAC address if the kernel reports that it was already set by userspace; the NET_ADDR_SET check in link_generate_new_hw_addr() is responsible for this. In order to eliminate the race window between systemd and the test, set MAC addresses during link creation. Ignore checkpatch's "quoted string split across lines" warning, since it points to a command line, and not a user-visible message. Signed-off-by: Ilya Leoshkevich Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250416124845.584362-1-iii@linux.ibm.com commit 069ac9e161eb9d5bfd5a4a5bf016522353226a51 Author: Andrea Righi Date: Wed Apr 23 23:02:05 2025 +0200 sched_ext: Clarify CPU context for running/stopping callbacks The ops.running() and ops.stopping() callbacks can be invoked from a CPU other than the one the task is assigned to, particularly when a task property is changed, as both scx_next_task_scx() and dequeue_task_scx() may run on CPUs different from the task's target CPU. This behavior can lead to confusion or incorrect assumptions if not properly clarified, potentially resulting in bugs (see [1]). Therefore, update the documentation to clarify this aspect and advise users to use scx_bpf_task_cpu() to determine the actual CPU the task will run on or was running on. [1] https://github.com/sched-ext/scx/pull/1728 Cc: Jake Hillion Signed-off-by: Andrea Righi Acked-by: Changwoo Min Signed-off-by: Tejun Heo commit f0cc3777b2db18307d9734edf2d16e046714760f Author: Kuniyuki Iwashima Date: Fri Apr 18 14:50:20 2025 -0700 net: Fix wild-memory-access in __register_pernet_operations() when CONFIG_NET_NS=n. kernel test robot reported the splat below. [0] Before commit fed176bf3143 ("net: Add ops_undo_single for module load/unload."), if CONFIG_NET_NS=n, ops was linked to pernet_list only when init_net had not been initialised, and ops was unlinked from pernet_list only under the same condition. Let's say an ops is loaded before the init_net setup but unloaded after that. Then, the ops remains in pernet_list, which seems odd. The cited commit added ops_undo_single(), which calls list_add() for ops to link it to a temporary list, so a minor change was added to __register_pernet_operations() and __unregister_pernet_operations() under CONFIG_NET_NS=n to avoid the pernet_list corruption. However, the corruption must have been left as is. When CONFIG_NET_NS=n, pernet_list was used to keep ops registered before the init_net setup, and after that, pernet_list was not used at all. This was because some ops annotated with __net_initdata are cleared out of memory at some point during boot. Then, such ops is initialised by POISON_FREE_INITMEM (0xcc), resulting in that ops->list.{next,prev} suddenly switches from a valid pointer to a weird value, 0xcccccccccccccccc. To avoid such wild memory access, let's allow the pernet_list corruption for CONFIG_NET_NS=n. [0]: Oops: general protection fault, probably for non-canonical address 0xf999959999999999: 0000 [#1] SMP KASAN NOPTI KASAN: maybe wild-memory-access in range [0xccccccccccccccc8-0xcccccccccccccccf] CPU: 2 UID: 0 PID: 346 Comm: modprobe Not tainted 6.15.0-rc1-00294-ga4cba7e98e35 #85 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:__list_add_valid_or_report (lib/list_debug.c:32) Code: 48 c1 ea 03 80 3c 02 00 0f 85 5a 01 00 00 49 39 74 24 08 0f 85 83 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 1f 01 00 00 4c 39 26 0f 85 ab 00 00 00 4c 39 ee RSP: 0018:ff11000135b87830 EFLAGS: 00010a07 RAX: dffffc0000000000 RBX: ffffffffc02223c0 RCX: ffffffff8406fcc2 RDX: 1999999999999999 RSI: cccccccccccccccc RDI: ffffffffc02223c0 RBP: ffffffff86064e40 R08: 0000000000000001 R09: fffffbfff0a9f5b5 R10: ffffffff854fadaf R11: 676552203a54454e R12: ffffffff86064e40 R13: ffffffffc02223c0 R14: ffffffff86064e48 R15: 0000000000000021 FS: 00007f6fb0d9e1c0(0000) GS:ff11000858ea0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6fb0eda580 CR3: 0000000122fec005 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: register_pernet_operations (./include/linux/list.h:150 (discriminator 5) ./include/linux/list.h:183 (discriminator 5) net/core/net_namespace.c:1315 (discriminator 5) net/core/net_namespace.c:1359 (discriminator 5)) register_pernet_subsys (net/core/net_namespace.c:1401) inet6_init (net/ipv6/af_inet6.c:535) ipv6 do_one_initcall (init/main.c:1257) do_init_module (kernel/module/main.c:2942) load_module (kernel/module/main.c:3409) init_module_from_file (kernel/module/main.c:3599) idempotent_init_module (kernel/module/main.c:3611) __x64_sys_finit_module (./include/linux/file.h:62 ./include/linux/file.h:83 kernel/module/main.c:3634 kernel/module/main.c:3621 kernel/module/main.c:3621) do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) RIP: 0033:0x7f6fb0df7e5d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 9f 1b 00 f7 d8 64 89 01 48 RSP: 002b:00007fffdc6a8968 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 000055b535721b70 RCX: 00007f6fb0df7e5d RDX: 0000000000000000 RSI: 000055b51e44aa2a RDI: 0000000000000004 RBP: 0000000000040000 R08: 0000000000000000 R09: 000055b535721b30 R10: 0000000000000004 R11: 0000000000000246 R12: 000055b51e44aa2a R13: 000055b535721bf0 R14: 000055b5357220b0 R15: 0000000000000000 Modules linked in: ipv6(+) crc_ccitt Fixes: fed176bf3143 ("net: Add ops_undo_single for module load/unload.") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202504181511.1c3f23e4-lkp@intel.com Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418215025.87871-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit d219fab87542f1b9f1f4f47f7c02fdf395d0ca61 Merge: 87f43e6f06a2b0 620b38232f432b Author: Jakub Kicinski Date: Wed Apr 23 16:07:22 2025 -0700 Merge branch 'netlink-specs-rtnetlink-adjust-specs-for-c-codegen' Jakub Kicinski says: ==================== netlink: specs: rtnetlink: adjust specs for C codegen The first patch brings a schema extension allowing specifying "header" (as in .h file) properties in attribute sets. This is used for rare cases where we carry attributes from another family in a nest - we need to include the extra headers. If we were to generate kernel code we'd also need to skip it in the uAPI output. The remaining 11 patches are pretty boring schema adjustments. ==================== Link: https://patch.msgid.link/20250418021706.1967583-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 620b38232f432b51e62bb83abdbfaec6317c54d1 Author: Jakub Kicinski Date: Thu Apr 17 19:17:06 2025 -0700 netlink: specs: rt-rule: add C naming info Add properties needed for C codegen to match names with uAPI headers. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-13-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e3d199d30909237a31ef7065d25c1f270967986f Author: Jakub Kicinski Date: Thu Apr 17 19:17:05 2025 -0700 netlink: specs: rtnetlink: correct notify properties The notify property should point at the object the notifications carry, usually the get object, not the cmd which triggers the notification: notify: description: Name of the command sharing the reply type with this notification. Not treating this as a fix, I think that only C codegen cares. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-12-kuba@kernel.org Signed-off-by: Jakub Kicinski commit eee94a89c55afdb909b384e306d384f0dfe60c45 Author: Jakub Kicinski Date: Thu Apr 17 19:17:04 2025 -0700 netlink: specs: rt-neigh: make sure getneigh is consistent The consistency check complains replies to do and dump don't match because dump has no value. It doesn't have to by the schema... but fixing this in code gen would be more code than adjusting the spec. This is rare. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-11-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cd879795c3eed39225608bd8cdefdec3b606389f Author: Jakub Kicinski Date: Thu Apr 17 19:17:03 2025 -0700 netlink: specs: rt-neigh: add C naming info Add properties needed for C codegen to match names with uAPI headers. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 622d7050cfd40c6c9602d4e16b25cc5350f9d65a Author: Jakub Kicinski Date: Thu Apr 17 19:17:02 2025 -0700 netlink: specs: rt-link: add notification for newlink Add a notification entry for netlink so that we can test ntf handling in classic netlink and C. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1c224f19ff06e59fb4079f3b26532dbd3b537b1e Author: Jakub Kicinski Date: Thu Apr 17 19:17:01 2025 -0700 netlink: specs: rt-link: make bond's ipv6 address attribute fixed size ns-ip6-target is an indexed-array. Codegen for variable size binary array would be a bit tedious, tell C that we know the size of these attributes, since they are IPv6 addrs. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e6e1f53f0283d2213dba95dbaa82c3978718245a Author: Jakub Kicinski Date: Thu Apr 17 19:17:00 2025 -0700 netlink: specs: rt-link: adjust AF_ nest for C codegen The AF nest is indexed by AF ID, so it's a bit strange, but with minor adjustments C codegen deals with it just fine. Entirely unclear why the names have been in quotes here. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b12b0f41819aaa101fe3d0953cb6e1eb25086c62 Author: Jakub Kicinski Date: Thu Apr 17 19:16:59 2025 -0700 netlink: specs: rt-link: add C naming info Add properties needed for C codegen to match names with uAPI headers. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c703d258f626d12f1910bcf6a5f67eeec26a56a2 Author: Jakub Kicinski Date: Thu Apr 17 19:16:58 2025 -0700 netlink: specs: rt-link: remove duplicated group in attr list group is listed twice for newlink. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ed43ce6ab2229b5077b8c01897e3a6c2427082f6 Author: Jakub Kicinski Date: Thu Apr 17 19:16:57 2025 -0700 netlink: specs: rt-link: remove if-netnsid from attr list if-netnsid an alias to target-netnsid: IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */ We don't have a definition for this attr. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 43b606d98482d9612d683a3467649d3999b608ab Author: Jakub Kicinski Date: Thu Apr 17 19:16:56 2025 -0700 netlink: specs: rt-link: remove the fixed members from attrs The purpose of the attribute list is to list the attributes which will be included in a given message to shrink the objects for families with huge attr spaces. Fixed headers are always present in their entirety (between netlink header and the attrs) so there's no point in listing their members. Current C codegen doesn't expect them and tries to look them up in the attribute space. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7965facefaed629fe22f07595f16ee50e8aff1e3 Author: Jakub Kicinski Date: Thu Apr 17 19:16:55 2025 -0700 netlink: specs: allow header properties for attribute sets rt-link has a number of disjoint headers, plus it uses attributes of other families (e.g. DPLL). Allow declaring a attribute set as "foreign" by specifying which header its definition is coming from. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250418021706.1967583-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 87f43e6f06a2b027ec2a7e86b5b767c9d60f5fc8 Author: Russell King (Oracle) Date: Tue Apr 22 15:24:55 2025 +0100 net: stmmac: dwc-qos: calibrate tegra with mdio bus idle Thierry states that there are prerequists for Tegra's calibration that should be met before starting calibration - both the RGMII and MDIO interfaces should be idle. This commit adds the necessary MII bus locking to ensure that the MDIO interface is idle during calibration. Signed-off-by: Russell King (Oracle) Acked-by: Thierry Reding Link: https://patch.msgid.link/E1u7EYR-001ZAS-Cr@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 2b18eda58c86fd3edd64e51b8b9b0e0a718462b9 Author: Alexey Charkov Date: Fri Apr 18 17:57:25 2025 +0400 dt-bindings: interrupt-controller: via,vt8500-intc: Convert to YAML Rewrite the textual description for the VIA/WonderMedia interrupt controller as YAML schema. The original textual version did not contain information about the usage of 'interrupts' to describe the connection of a chained controller to its parent, add it here. A chained controller can trigger up to 8 different interrupts (IRQ0~7) on its parent. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20250418-via_intc_binding-v2-1-b649ce737f71@gmail.com Signed-off-by: Rob Herring (Arm) commit da076878764e80bd5982fd7364303c6d93dadd7c Author: Neil Armstrong Date: Fri Apr 18 14:56:16 2025 +0200 dt-bindings: arm/cpus: allow up to 3 interconnects entries Allow up to 3 entries as used on the Qualcomm SM8650 CPU nodes. This fixes the following errors: cpu@0: interconnects: [[7, 3, 3, 7, 15, 3], [8, 0, 3, 8, 1, 3], [9, 0, 9, 1]] is too long Fixes: 791a3fcd2345 ("dt-bindings: arm/cpus: Add missing properties") Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250418-topic-sm8x50-upstream-cpu-icc-max3-v1-1-87d9c2713d72@linaro.org Signed-off-by: Rob Herring (Arm) commit 8ff6175139967cd17b2a62bca4b2de2559942b7e Author: Arnd Bergmann Date: Wed Apr 23 18:28:21 2025 +0200 bnxt_en: hide CONFIG_DETECT_HUNG_TASK specific code The CONFIG_DEFAULT_HUNG_TASK_TIMEOUT setting is only available when the hung task detection is enabled, otherwise the code now produces a build failure: drivers/net/ethernet/broadcom/bnxt/bnxt.c:10188:21: error: use of undeclared identifier 'CONFIG_DEFAULT_HUNG_TASK_TIMEOUT' 10188 | max_tmo_secs > CONFIG_DEFAULT_HUNG_TASK_TIMEOUT) { Enclose this warning logic in an #ifdef to ensure this builds. Fixes: 0fcad44a86bd ("bnxt_en: Change FW message timeout warning") Signed-off-by: Arnd Bergmann Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250423162827.2189658-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 22282967585ac9e5d88d92d804cc3e5b19c47a97 Author: Rick Wertenbroek Date: Wed Apr 23 11:56:43 2025 +0200 Documentation: Fix path for NVMe PCI endpoint target driver The path for the driver points to an non-existent file. Update path with the correct file: drivers/nvme/target/pci-epf.c Signed-off-by: Rick Wertenbroek Signed-off-by: Bjorn Helgaas Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20250423095643.490495-1-rick.wertenbroek@gmail.com commit 0a0829b1fd76cb6110cc049a60e634a51969e488 Author: Alex Williamson Date: Tue Apr 22 17:05:32 2025 -0600 PCI: Increment PM usage counter when probing reset methods We can get different results probing reset methods for a device depending on its power state. For example, reading the PM control register of a device in D3cold will always indicate NoSoftRst+ because we get ~0 data when the config read fails on PCI, preventing us from correctly probing PM reset support. Increment the PM usage counter before any probes and use the cleanup __free facility to automatically drop the usage counter out of scope. Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250422230534.2295291-3-alex.williamson@redhat.com commit bfa4477751e9909bb121eca860f44d1b4259d871 Author: Alex Williamson Date: Tue Apr 22 17:05:31 2025 -0600 PM: runtime: Define pm_runtime_put cleanup helper Define a cleanup helper for use with __free to automatically drop the device usage count when the pointer goes out of scope. Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki Link: https://patch.msgid.link/20250422230534.2295291-2-alex.williamson@redhat.com commit 55df7c0c62c1727c399fc82150b7f72bee47d4c6 Author: Dave Airlie Date: Wed Apr 23 12:21:38 2025 +1000 drm/ttm/xe: drop unused force_alloc flag This flag used to be used in the old memory tracking code, that code got migrated into the vmwgfx driver[1], and then got removed from the tree[2], but this piece got left behind. [1] f07069da6b4c ("drm/ttm: move memory accounting into vmwgfx v4") [2] 8aadeb8ad874 ("drm/vmwgfx: Remove the dedicated memory accounting") Cleanup the dead code. Reviewed-by: Matthew Brost Signed-off-by: Dave Airlie commit 8fe743b5eba0abfbee39fe27b12acfb0df9b8a2d Author: Arnd Bergmann Date: Wed Apr 23 22:16:32 2025 +0200 PCI: Add CONFIG_MMU dependency It turns out that there are no platforms that have PCI but don't have an MMU, so adding a Kconfig dependency on CONFIG_PCI simplifies build testing kernels for those platforms a lot, and avoids a lot of inadvertent build regressions. Add a dependency for CONFIG_PCI and remove all the ones for PCI specific device drivers that are currently marked not having it. There are a few platforms that have an optional MMU, but they usually cannot have PCI at all. The one exception is Coldfire MCF54xx, but this is mainly for historic reasons, and anyone using those chips should really use the MMU these days. Link: https://lore.kernel.org/lkml/a41f1b20-a76c-43d8-8c36-f12744327a54@app.fastmail.com/ Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Martin K. Petersen # SCSI Reviewed-by: Thomas Zimmermann Acked-by: Alex Deucher Link: https://patch.msgid.link/20250423202215.3315550-1-arnd@kernel.org commit 18eb45b67544b995a8a6f48a72b816fd75776f52 Author: Kees Cook Date: Tue Apr 15 16:20:29 2025 -0700 ACPI: tables: Add __nonstring annotations for unterminated strings When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the 4-byte ACPI identifier arrays with __nonstring (and the new __nonstring_array) to correctly identify the char arrays as "not C strings" and thereby eliminate the many warnings like this: In file included from include/acpi/actbl.h:371, from include/acpi/acpi.h:26, from include/linux/acpi.h:26, from drivers/acpi/tables.c:19: include/acpi/actbl1.h:30:33: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (5 chars into 4 available) [-Wunterminated-string-initialization] 30 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ | ^~~~~~ drivers/acpi/tables.c:400:9: note: in expansion of macro 'ACPI_SIG_BERT' 400 | ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT, | ^~~~~~~~~~~~~ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Signed-off-by: Kees Cook Link: https://patch.msgid.link/20250415232028.work.843-kees@kernel.org Signed-off-by: Rafael J. Wysocki commit ef6517ac5cf971cfeaccea4238d9da7e2425b8b1 Author: Marcus Folkesson Date: Wed Apr 23 21:03:22 2025 +0200 MAINTAINERS: add entry for Sitronix ST7571 LCD Controller Add MAINTAINERS entry for the Sitronix ST7571 dot matrix LCD controller. Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20250423-st7571-v6-3-e9519e3c4ec4@gmail.com Signed-off-by: Javier Martinez Canillas commit 4b35f0f41ee295059c46a6f4ae97e4b5b8f10d9e Author: Marcus Folkesson Date: Wed Apr 23 21:03:21 2025 +0200 drm/st7571-i2c: add support for Sitronix ST7571 LCD controller Sitronix ST7571 is a 4bit gray scale dot matrix LCD controller. The controller has a SPI, I2C and 8bit parallel interface, this driver is for the I2C interface only. Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20250423-st7571-v6-2-e9519e3c4ec4@gmail.com Signed-off-by: Javier Martinez Canillas commit cb2c4d734b7deedc1cefe2ee503c2a21c1c83cb9 Author: Marcus Folkesson Date: Wed Apr 23 21:03:20 2025 +0200 dt-bindings: display: Add Sitronix ST7571 LCD Controller Sitronix ST7571 is a dot matrix LCD controller supporting both 4bit grayscale and monochrome LCDs. Reviewed-by: Conor Dooley Reviewed-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20250423-st7571-v6-1-e9519e3c4ec4@gmail.com Signed-off-by: Javier Martinez Canillas commit 4ea512714c42c69828b4a2647d206bf404043ad5 Author: Jeevaka Prabu Badrappan Date: Tue Apr 22 17:18:52 2025 +0000 drm/xe: Fix CFI violation when accessing sysfs files When an attribute group is created with sysfs_create_group() or sysfs_create_files() the ->sysfs_ops() callback is set to kobj_sysfs_ops, which sets the ->show() callback to kobj_attr_show(). kobj_attr_show() uses container_of() to get the ->show() callback from the attribute it was passed, meaning the ->show() callback needs to be the same type as the ->show() callback in 'struct kobj_attribute'. However, cur_freq_show() has the type of the ->show() callback in 'struct device_attribute', which causes a CFI violation when opening the 'id' sysfs node under gtidle/freq/throttle. This happens to work because the layout of 'struct kobj_attribute' and 'struct device_attribute' are the same, so the container_of() cast happens to allow the ->show() callback to still work. Changed the type of cur_freq_show() and few more functions to match the ->show() callback in 'struct kobj_attributes' to resolve the CFI violation. CFI failure seen while accessing sysfs files under /sys/class/drm/card0/device/tile0/gt*/gtidle/* /sys/class/drm/card0/device/tile0/gt*/freq0/* /sys/class/drm/card0/device/tile0/gt*/freq0/throttle/* [ 2599.618075] RIP: 0010:__cfi_cur_freq_show+0xd/0x10 [xe] [ 2599.624452] Code: 44 c1 44 89 fa e8 03 95 39 f2 48 98 5b 41 5e 41 5f 5d c3 c9 [ 2599.646638] RSP: 0018:ffffbe438ead7d10 EFLAGS: 00010286 [ 2599.652823] RAX: ffff9f7d8b3845d8 RBX: ffff9f7dee8c95d8 RCX: 0000000000000000 [ 2599.661246] RDX: ffff9f7e6f439000 RSI: ffffffffc13ada30 RDI: ffff9f7d975d4b00 [ 2599.669669] RBP: ffffbe438ead7d18 R08: 0000000000001000 R09: ffff9f7e6f439000 [ 2599.678092] R10: 00000000e07304a6 R11: ffffffffc1241ca0 R12: ffffffffb4836ea0 [ 2599.688435] R13: ffff9f7e45fb1180 R14: ffff9f7d975d4b00 R15: ffff9f7e6f439000 [ 2599.696860] FS: 000076b02b66cfc0(0000) GS:ffff9f80ef400000(0000) knlGS:00000 [ 2599.706412] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2599.713196] CR2: 00005f80d94641a9 CR3: 00000001e44ec006 CR4: 0000000100f72ef0 [ 2599.721618] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2599.730041] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400 [ 2599.738464] PKRU: 55555554 [ 2599.741655] Call Trace: [ 2599.744541] [ 2599.747017] ? __die_body+0x69/0xb0 [ 2599.751151] ? die+0xa9/0xd0 [ 2599.754548] ? do_trap+0x89/0x160 [ 2599.758476] ? __cfi_cur_freq_show+0xd/0x10 [xe b37985c94829727668bd7c5b33c1] [ 2599.768315] ? handle_invalid_op+0x69/0x90 [ 2599.773167] ? __cfi_cur_freq_show+0xd/0x10 [xe b37985c94829727668bd7c5b33c1] [ 2599.783010] ? exc_invalid_op+0x36/0x60 [ 2599.787552] ? fred_hwexc+0x123/0x1a0 [ 2599.791873] ? fred_entry_from_kernel+0x7b/0xd0 [ 2599.797219] ? asm_fred_entrypoint_kernel+0x45/0x70 [ 2599.802976] ? act_freq_show+0x70/0x70 [xe b37985c94829727668bd7c5b33c1d9998] [ 2599.812301] ? __cfi_cur_freq_show+0xd/0x10 [xe b37985c94829727668bd7c5b33c1] [ 2599.822137] ? __kmalloc_node_noprof+0x1f3/0x420 [ 2599.827594] ? __kvmalloc_node_noprof+0xcb/0x180 [ 2599.833045] ? kobj_attr_show+0x22/0x40 [ 2599.837571] sysfs_kf_seq_show+0xa8/0x110 [ 2599.842302] kernfs_seq_show+0x38/0x50 Signed-off-by: Jeevaka Prabu Badrappan Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250422171852.85558-1-jeevaka.badrappan@intel.com Signed-off-by: Rodrigo Vivi commit 5c9e0062989e5d2bd77b75c432b54e8ec7689bc7 Author: Uladzislau Rezki (Sony) Date: Tue Apr 22 19:38:30 2025 +0200 tools/memory-model/Documentation: Fix SRCU section in explanation.txt The SRCU read-side critical sections describes the difference between srcu_down_read()/srcu_up_read() and srcu_read_lock()/srcu_read_unlock() in a way that a last pair must occur on the same CPU. This is not true, the srcu_read_unlock() can happen on any CPU, but it must be performed by the same task that invoked srcu_read_lock(). Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit b9c09fb206a781b8933f93f530b9c03877dcef8b Merge: 6aca583f90b0eb 4c0a42c50021ee Author: Andrii Nakryiko Date: Wed Apr 23 11:23:33 2025 -0700 Merge branch 'bpf-allow-access-to-const-void-pointer-arguments-in-tracing-programs' KaFai Wan says: ==================== bpf: Allow access to const void pointer arguments in tracing programs If we try to access argument which is pointer to const void, it's an UNKNOWN type, verifier will fail to load. Use is_void_or_int_ptr to check if type is void or int pointer. Add a selftest to check it. --- ==================== Link: https://patch.msgid.link/20250423121329.3163461-1-mannkafai@gmail.com Signed-off-by: Andrii Nakryiko commit 4c0a42c50021ee509f159c1f8a22efb35987c941 Author: KaFai Wan Date: Wed Apr 23 20:13:29 2025 +0800 selftests/bpf: Add test to access const void pointer argument in tracing program Adding verifier test for accessing const void pointer argument in tracing programs. The test program loads 1st argument of bpf_fentry_test10 function which is const void pointer and checks that verifier allows that. Signed-off-by: KaFai Wan Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20250423121329.3163461-3-mannkafai@gmail.com commit 1271a40eeafa8e9b5b76c4d02e2b3812cbc3c280 Author: KaFai Wan Date: Wed Apr 23 20:13:28 2025 +0800 bpf: Allow access to const void pointer arguments in tracing programs Adding support to access arguments with const void pointer arguments in tracing programs. Currently we allow tracing programs to access void pointers. If we try to access argument which is pointer to const void like 2nd argument in kfree, verifier will fail to load the program with; 0: R1=ctx() R10=fp0 ; asm volatile ("r2 = *(u64 *)(r1 + 8); "); 0: (79) r2 = *(u64 *)(r1 +8) func 'kfree' arg1 type UNKNOWN is not a struct Changing the is_int_ptr to void and generic integer check and renaming it to is_void_or_int_ptr. Signed-off-by: KaFai Wan Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20250423121329.3163461-2-mannkafai@gmail.com commit 6aca583f90b0eb159cfd79c1b7f28d7c0108aed6 Author: Feng Yang Date: Wed Apr 23 15:31:51 2025 +0800 bpf: Streamline allowed helpers between tracing and base sets Many conditional checks in switch-case are redundant with bpf_base_func_proto and should be removed. Regarding the permission checks bpf_base_func_proto: The permission checks in bpf_prog_load (as outlined below) ensure that the trace has both CAP_BPF and CAP_PERFMON capabilities, thus enabling the use of corresponding prototypes in bpf_base_func_proto without adverse effects. bpf_prog_load ...... bpf_cap = bpf_token_capable(token, CAP_BPF); ...... if (type != BPF_PROG_TYPE_SOCKET_FILTER && type != BPF_PROG_TYPE_CGROUP_SKB && !bpf_cap) goto put_token; ...... if (is_perfmon_prog_type(type) && !bpf_token_capable(token, CAP_PERFMON)) goto put_token; ...... Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20250423073151.297103-1-yangfeng59949@163.com commit 53ebef53a657d7957d35dc2b953db64f1bb28065 Author: Shung-Hsi Yu Date: Fri Apr 18 15:49:43 2025 +0800 bpf: Use proper type to calculate bpf_raw_tp_null_args.mask index The calculation of the index used to access the mask field in 'struct bpf_raw_tp_null_args' is done with 'int' type, which could overflow when the tracepoint being attached has more than 8 arguments. While none of the tracepoints mentioned in raw_tp_null_args[] currently have more than 8 arguments, there do exist tracepoints that had more than 8 arguments (e.g. iocost_iocg_forgive_debt), so use the correct type for calculation and avoid Smatch static checker warning. Reported-by: Dan Carpenter Signed-off-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20250418074946.35569-1-shung-hsi.yu@suse.com Closes: https://lore.kernel.org/r/843a3b94-d53d-42db-93d4-be10a4090146@stanley.mountain/ commit 70e1683ca3a6474360af1d3a020a9a98c8492cc0 Author: Jiayuan Chen Date: Thu Apr 24 00:17:42 2025 +0800 workqueue: Fix race condition in wq->stats incrementation Fixed a race condition in incrementing wq->stats[PWQ_STAT_COMPLETED] by moving the operation under pool->lock. Reported-by: syzbot+01affb1491750534256d@syzkaller.appspotmail.com Signed-off-by: Jiayuan Chen Signed-off-by: Tejun Heo commit f600832794c91d7021d7337104734246b02a2b86 Author: Rameshkumar Sundaram Date: Tue Apr 8 11:45:00 2025 -0700 wifi: mac80211: restructure tx profile retrieval for MLO MBSSID For MBSSID, each vif (struct ieee80211_vif) stores another vif pointer for the transmitting profile of MBSSID set. This won't suffice for MLO as there may be multiple links, each of which can be part of different MBSSID sets. Hence the information needs to be stored per-link. Additionally, the transmitted profile itself may be part of an MLD hence storing vif will not suffice either. Fix MLO by storing an instance of struct ieee80211_bss_conf for each link. Modify following operations to reflect the above structure updates: - channel switch completion - BSS color change completion - Removing nontransmitted links in ieee80211_stop_mbssid() - drivers retrieving the transmitted link for beacon templates. Signed-off-by: Rameshkumar Sundaram Co-developed-by: Muna Sinada Signed-off-by: Muna Sinada Co-developed-by: Aloka Dixit Signed-off-by: Aloka Dixit Link: https://patch.msgid.link/20250408184501.3715887-3-aloka.dixit@oss.qualcomm.com Signed-off-by: Johannes Berg commit 37523c3c47b3f3cc4c7d2ff47d28ee9ec99317c1 Author: Rameshkumar Sundaram Date: Tue Apr 8 11:44:59 2025 -0700 wifi: nl80211: add link id of transmitted profile for MLO MBSSID During non-transmitted (nontx) profile configuration, interface index of the transmitted (tx) profile is used to retrieve the wireless device (wdev) associated with it. With MLO, this 'wdev' may be part of an MLD with more than one link, hence only interface index is not sufficient anymore to retrieve the correct tx profile. Add a new attribute to configure link id of tx profile. Signed-off-by: Rameshkumar Sundaram Co-developed-by: Muna Sinada Signed-off-by: Muna Sinada Co-developed-by: Aloka Dixit Signed-off-by: Aloka Dixit Link: https://patch.msgid.link/20250408184501.3715887-2-aloka.dixit@oss.qualcomm.com Signed-off-by: Johannes Berg commit e270b3665f8321c45ad3e9ba4e3d0fbaf8c9c720 Author: Gustavo A. R. Silva Date: Wed Apr 16 12:00:42 2025 -0600 drm/nouveau: chan: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for a few on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/gpu/drm/nouveau/nouveau_chan.c:274:37: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/gpu/drm/nouveau/nouveau_chan.c:371:46: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/gpu/drm/nouveau/nouveau_chan.c:524:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Link: https://lore.kernel.org/r/Z__wSgHK5_lHw8x9@kspp Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich commit 91ea0489dc97bfda72ed74f98ab66dc0ab4235c7 Author: Rameshkumar Sundaram Date: Thu Mar 27 10:43:19 2025 +0530 wifi: ieee80211: Add helpers to fetch EMLSR delay and timeout values Add helpers to get EMLSR transition delay, padding delay and transition timeout values from EML capabilities field of Multi-link Element. Signed-off-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20250327051320.3253783-4-quic_ramess@quicinc.com Signed-off-by: Johannes Berg commit 14e0f59a88cc22ceeb36e26b89b70b22292d23de Author: Ramasamy Kaliappan Date: Thu Mar 27 10:43:18 2025 +0530 wifi: mac80211: update ML STA with EML capabilities When an AP and Non-AP MLD operates in EMLSR mode, EML capabilities advertised during Association contains information such as EMLSR transition delay, padding delay and transition timeout values. Save the EML capabilities information that is received during station addition and capabilities update in ieee80211_sta so that drivers can use it for triggering EMLSR operation. Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20250327051320.3253783-3-quic_ramess@quicinc.com Signed-off-by: Johannes Berg commit 53160d0edf7336acaed4c74c6af8549d87c92ae6 Author: Ramasamy Kaliappan Date: Thu Mar 27 10:43:17 2025 +0530 wifi: cfg80211: Add support to get EMLSR capabilities of non-AP MLD The Enhanced multi-link single-radio (EMLSR) operation allows a non-AP MLD with multiple receive chains to listen on one or more EMLSR links when the corresponding non-AP STA(s) affiliated with the non-AP MLD is (are) in the awake state. [IEEE 802.11be-2024, (35.3.17 Enhanced multi-link single-radio (EMLSR) operation)] An MLD which intends to enable EMLSR operations will set the EML Capabilities Present subfield to 1 and shall set the EMLSR Support subfield in the Common Info field of the Basic Multi-Link element to 1 in all Management frames that include the Basic Multi-Link element except Authentication frames. EML capabilities contains information such as EML Transition timeout, Padding delay and Transition delay. These fields needs to updated to drivers to trigger EMLSR operation and to transmit and receive initial control frame and data frames. Add support to receive EML Capabilities subfield that non-AP MLD advertises during (re)association request and send it to underlying drivers during ADD/SET station. Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20250327051320.3253783-2-quic_ramess@quicinc.com [accept EMLSR capabilities only for unassoc AP STA] Signed-off-by: Johannes Berg commit 1a4a6a22552ca9d723f28a1fe35eab1b9b3d8b33 Author: Muna Sinada Date: Tue Mar 25 14:31:25 2025 -0700 wifi: mac80211: VLAN traffic in multicast path Currently for MLO, sending out multicast frames on each link is handled by mac80211 only when IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX flag is not set. Dynamic VLAN multicast traffic utilizes software encryption. Due to this, mac80211 should handle transmitting multicast frames on all links for multicast VLAN traffic. Signed-off-by: Muna Sinada Link: https://patch.msgid.link/20250325213125.1509362-4-muna.sinada@oss.qualcomm.com [remove unnecessary parentheses] Signed-off-by: Johannes Berg commit 90233b0ad215efc9ea56a7c0b09021bcd4eea4ac Author: Muna Sinada Date: Tue Mar 25 14:31:24 2025 -0700 wifi: mac80211: Create separate links for VLAN interfaces Currently, MLD links for an AP_VLAN interface type is not fully supported. Add allocation of separate links for each VLAN interface and copy chanctx and chandef of AP bss to VLAN where necessary. Separate links are created because for Dynamic VLAN each link will have its own default_multicast_key. Signed-off-by: Muna Sinada Link: https://patch.msgid.link/20250325213125.1509362-3-muna.sinada@oss.qualcomm.com Signed-off-by: Johannes Berg commit f61c7b3d442bef91dd432d468d08f72eadcc3209 Author: Muna Sinada Date: Tue Mar 25 14:31:23 2025 -0700 wifi: mac80211: Add link iteration macro for link data Currently before iterating through valid links we are utilizing open-coding when checking if vif valid_links is a non-zero value. Add new macro, for_each_link_data(), which iterates through link_id and checks if it is set on vif valid_links. If it is a valid link then access link data for that link id. Signed-off-by: Muna Sinada Link: https://patch.msgid.link/20250325213125.1509362-2-muna.sinada@oss.qualcomm.com Signed-off-by: Johannes Berg commit c48b28e4ef7ba78ee105e0b188472be72c4107e2 Author: Gustavo A. R. Silva Date: Tue Apr 22 09:45:39 2025 -0600 drm/nouveau: outp: Use __member_size() helper Use __member_size() to get the size of the flex-array member at compile time, instead of the convoluted expression `__struct_size(p) - sizeof(*p)` Link: https://lore.kernel.org/r/aAe5o_-f5OYSTXjZ@kspp Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich commit b7435cf2d9b6b33bf132e0d96b14d723c610f9c3 Author: Gustavo A. R. Silva Date: Tue Apr 22 09:44:56 2025 -0600 drm/nouveau: disp: Use __member_size() helper Use __member_size() to get the size of the flex-array member at compile time, instead of the convoluted expression `__struct_size(p) - sizeof(*p)` Link: https://lore.kernel.org/r/aAe5eNDnRyGnxLMX@kspp Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich commit 8debd8511dd9376fab33bff62500a5a71937420a Author: Dzmitry Sankouski Date: Wed Apr 23 07:54:36 2025 +0300 hwmon: (max77705) Add initial support Maxim MAX77705 is a Companion Power Management and Type-C interface IC. It includes charger and fuel gauge blocks, and is capable of measuring charger input current, system bus volatage and current, and bypass voltage. Add support for mentioned measurements. Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250423-initial-support-for-max77705-sensors-v6-1-ff379e1b06c5@gmail.com Signed-off-by: Guenter Roeck commit 3e749ce132676683f3cdeec9a887c3f8f5ed96eb Author: Peter Korsgaard Date: Thu Apr 17 20:04:26 2025 +0200 hwmon: (tmp102) add vcc regulator support Make it optional for backwards compatibility. Signed-off-by: Peter Korsgaard Link: https://lore.kernel.org/r/20250417180426.3872314-2-peter@korsgaard.com Signed-off-by: Guenter Roeck commit 03abdce464efc3dcdfe323f7fc315d0fa7abd457 Author: Peter Korsgaard Date: Thu Apr 17 20:04:25 2025 +0200 dt-bindings: hwmon: ti,tmp102: document optional V+ supply property TMP102 is powered by its V+ supply, document it. The property is called "vcc-supply" since the plus sign (+) is not a valid property character. Signed-off-by: Peter Korsgaard Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250417180426.3872314-1-peter@korsgaard.com Signed-off-by: Guenter Roeck commit c66c5bda7f24a7dae2b5b789025e4b8418eb0fae Author: Cedric Encarnacion Date: Mon Apr 21 20:18:19 2025 +0800 hwmon: (pmbus/lt3074) add support for lt3074 Add hardware monitoring and regulator support for LT3074. The LT3074 is an ultrafast, ultralow noise 3A, 5.5V dropout linear regulator. The PMBus serial interface allows telemetry for input/output voltage, bias voltage, output current, and die temperature. Signed-off-by: Cedric Encarnacion Link: https://lore.kernel.org/r/20250421-upstream-lt3074-v3-2-71636322f9fe@analog.com Signed-off-by: Guenter Roeck commit 48834a4e794302c162a73e1680c76cd73847bbdb Author: Cedric Encarnacion Date: Mon Apr 21 20:18:18 2025 +0800 dt-bindings: hwmon: pmbus: add lt3074 Add Analog Devices LT3074 Ultralow Noise, High PSRR Dropout Linear Regulator. Signed-off-by: Cedric Encarnacion Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250421-upstream-lt3074-v3-1-71636322f9fe@analog.com Signed-off-by: Guenter Roeck commit a852162efbff611ed49ae61a141e80c81689d54c Author: Guenter Roeck Date: Wed Jun 19 09:40:36 2024 -0700 hwmon: (spd5118) Detect and support 16-bit register addressing Add support for SPD5118 compatible chips with 16-bit addressing enabled which are connected to I2C controllers. Signed-off-by: Guenter Roeck commit be82d39c537e884e490a79bcc38a3be8d9e8b0a9 Author: Guenter Roeck Date: Fri Jun 14 15:13:46 2024 -0700 hwmon: (spd5118) Support 16-bit addressing for NVMEM accesses I3C uses 16-bit register addresses. Setting the page through the legacy mode access pointer in the legacy mode device configuration register (MR11) is not needed. This is similar to 16-bit addressing in legacy mode. Signed-off-by: Guenter Roeck commit ae28532aff1f7912c1d118b4257c095ce62f1cb0 Author: Guenter Roeck Date: Sun Nov 17 07:55:32 2024 -0800 hwmon: (spd5118) Name chips taking the specification literally The Renesas/IDT SPD5118 Hub Controller is known to take the specification literally and does not permit access to volatile registers except for the page register if the selected page is non-zero. Explicitly name the chip to ensure that the information does not get lost. Signed-off-by: Guenter Roeck commit 4cf1aab45cc56e9276924c21b79da42e2eac01df Author: Guenter Roeck Date: Wed Jun 19 08:53:56 2024 -0700 hwmon: (spd5118) Split into common and I2C specific code Split spd5118 driver into common and I2C specific code to enable adding support for I3C. Signed-off-by: Guenter Roeck commit e799657a8aac1d974c90a295dd88b1d95697d18d Author: Armin Wolf Date: Mon Apr 21 00:33:34 2025 +0200 hwmon: (dell-smm) Add the Dell OptiPlex 7050 to the DMI whitelist A user reported that the driver works on the OptiPlex 7050. Add this machine to the DMI whitelist. Closes: https://github.com/Wer-Wolf/i8kutils/issues/12 Signed-off-by: Armin Wolf Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20250420223334.12920-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 41e743881e85b4cda80c53e11075e7b19809b3ce Author: Guenter Roeck Date: Wed Apr 16 15:59:19 2025 -0700 hwmon: (aht10) Drop doctype annotations from static functions doctype annotations of static functions have little if any value. Drop them to silence 0-day complaints. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504161919.duDL1s2X-lkp@intel.com/ Cc: Johannes Cornelis Draaijer Reviewed-by: Tzung-Bi Shih Signed-off-by: Guenter Roeck commit 38b5a5acabb639a2e3d40bffb92bd42f613dcd71 Author: Chen Ni Date: Mon Apr 14 15:47:39 2025 +0800 hwmon: (lm90) Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250414074739.3954203-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck commit 80fcd1e7f5c7009fa1c64737df100cc304c19c1f Author: Sudeep Holla Date: Fri Apr 11 12:20:53 2025 +0100 hwmon: (xgene-hwmon) Simplify PCC shared memory region handling The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this xgene hwmon driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20250411112053.1148624-1-sudeep.holla@arm.com Signed-off-by: Guenter Roeck commit 56591083846b8f4203234faf52de7a89f038ceeb Author: John Keeping Date: Thu Apr 10 19:03:57 2025 +0100 hwmon: (pwm-fan) disable threaded interrupts The interrupt handler here just increments an atomic counter, jumping to a threaded handler risks missing tachometer pulses and is likely to be more expensive than the simple atomic increment. Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20250410180357.2258822-1-jkeeping@inmusicbrands.com Signed-off-by: Guenter Roeck commit 7e581c193bde7d5ac49587d9a182e5d13e05547c Author: Gerhard Engleder Date: Wed Apr 9 21:08:30 2025 +0200 hwmon: Add KEBA battery monitoring controller support The KEBA battery monitoring controller is found in the system FPGA of KEBA PLC devices. It puts a load on the coin cell battery to check the state of the battery. If the coin cell battery is nearly empty, then the user space is signaled with a hwmon alarm. The auxiliary device for this driver is instantiated by the cp500 misc driver. Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20250409190830.60489-1-gerhard@engleder-embedded.com Signed-off-by: Guenter Roeck commit 0d01110e6356e95320091f36e3d7ce92fa597d1f Author: Alexander Stein Date: Wed Apr 9 08:54:26 2025 +0200 hwmon: (gpio-fan) Add regulator support FANs might be supplied by a regulator which needs to be enabled as well. This is implemented using runtime PM. Every time speed_index changes from 0 to non-zero and vise versa RPM is resumed or suspended. Intitial RPM state is determined by initial value of speed_index. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20250409065430.1413439-1-alexander.stein@ew.tq-group.com Signed-off-by: Guenter Roeck commit 9b116ba6c9eb9d3b33de0363fafdc5941116f029 Author: Ciprian Marian Costea Date: Wed Apr 9 10:45:29 2025 +0300 hwmon: (ina2xx) make regulator 'vs' support optional According to the 'ti,ina2xx' binding, the 'vs-supply' property is optional. Use devm_regulator_get_enable_optional() to avoid a kernel warning message if the property is not provided. Co-developed-by: Florin Buica Tested-by: Enric Balletbo i Serra Signed-off-by: Florin Buica Signed-off-by: Ciprian Marian Costea Link: https://lore.kernel.org/r/20250409074529.2233733-1-ciprianmarian.costea@oss.nxp.com [groeck: Use standard multi-line comment] Signed-off-by: Guenter Roeck commit 0bf08f9e358d33a8972cdb3d698079f5d768d7ed Author: Eugene Shalygin Date: Tue Apr 8 22:44:57 2025 +0200 hwmon: (asus-ec-sensors) sort sensor definition arrays The arrays have to be sorted by the sensor register bank and index because this is what the sensor reading function expects. So sort them and leave a comment for future contributors. Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20250408204505.11412-1-eugene.shalygin@gmail.com [groeck: Fixed alignment of new multi-line comment] Signed-off-by: Guenter Roeck commit ab2f6bffe7311327d5f6432e413c704f395b93c3 Author: William A. Kennington III Date: Mon Apr 7 18:10:06 2025 -0700 hwmon: (max34451) Work around lost page When requesting new pages from the max34451 we sometimes see that the firmware responds with stale or bad data to reads that happen immediately after a page change. This is due to a lack of clock stretching after page changing on the device side when it needs more time to complete the operation. To remedy this, the manufacturer recommends we wait 50us until the firmware should be ready with the new page. Signed-off-by: William A. Kennington III Link: https://lore.kernel.org/r/20250408011006.1314622-1-william@wkennington.com Signed-off-by: Guenter Roeck commit 6de6868df18728790eb4ffe764b49f356fea7397 Author: Naresh Solanki Date: Fri Apr 4 17:26:45 2025 +0530 hwmon: (max6639) Allow setting target RPM Currently, during startup, the fan is set to its maximum RPM by default, which may not be suitable for all use cases. This patch introduces support for specifying a target RPM via the Device Tree property "target-rpm". Changes: - Added `target_rpm` field to `max6639_data` structure to store the target RPM for each fan channel. - Modified `max6639_probe_child_from_dt()` to read the `"target-rpm"` property from the Device Tree and set `target_rpm` accordingly. - Updated `max6639_init_client()` to use `target_rpm` to compute the initial PWM duty cycle instead of defaulting to full speed (120/120). Behavior: - If `"target-rpm"` is specified, the fan speed is set accordingly. - If `"target-rpm"` is not specified, the previous behavior (full speed at startup) is retained. This allows better control over fan speed during system initialization. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20250404115646.2000563-1-you@example.com Signed-off-by: Guenter Roeck commit 0b3c04c81804197bf0025f3281e4463152f04bf1 Author: Guenter Roeck Date: Sat Mar 22 07:26:02 2025 -0700 hwmon: (pmbus) Do not set regulators_node for single-channel chips Single-channel regulators do not need and should not have a "regulators" node. We can not entirely remove it due to existing bindings. To solve the problem for new drivers, provide additional macros PMBUS_REGULATOR_ONE_NODE and PMBUS_REGULATOR_STEP_ONE_NODE and convert existing drivers to use those macros. The exception is the ir38064 driver because its devicetree files and its description do not require or use the nested regulators node. Modify PMBUS_REGULATOR_STEP_ONE and PMBUS_REGULATOR_ONE to set the regulators_node pointer to NULL. Cc: Cedricjustine.Encarnacion@analog.com Signed-off-by: Guenter Roeck Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250322142602.560042-1-linux@roeck-us.net Signed-off-by: Guenter Roeck commit 629cf8f6c23a987201558ffcca5590a60ae3959d Author: Alexis Czezar Torreno Date: Mon Apr 7 11:47:25 2025 +0800 hwmon: (pmbus/max34440) Add support for ADPM12160 ADPM12160 is a quarter brick DC/DC Power Module. It is a high power non-isolated converter capable of delivering a fully regulated 12V, with continuous power level of 1600W with peak power at 2400W for a limited time. Uses PMBus Configuration. Signed-off-by: Alexis Czezar Torreno Link: https://lore.kernel.org/r/20250407-dev_adpm12160-v3-2-9cd3095445c8@analog.com [groeck: The chip is "ADPM12160"] Signed-off-by: Guenter Roeck commit 19932f844f3f51646f762f3eac4744ec3a405064 Author: Alexis Czezar Torreno Date: Mon Apr 7 11:47:24 2025 +0800 hwmon: (pmbus/max34440) Fix support for max34451 The max344** family has an issue with some PMBUS address being switched. This includes max34451 however version MAX34451-NA6 and later has this issue fixed and this commit supports that update. Signed-off-by: Alexis Czezar Torreno Link: https://lore.kernel.org/r/20250407-dev_adpm12160-v3-1-9cd3095445c8@analog.com Signed-off-by: Guenter Roeck commit 9c47e45de1f7633bd3bbf54bf36cd9a385db2232 Author: Bartosz Golaszewski Date: Mon Apr 7 09:16:17 2025 +0200 hwmon: (pmbus/ucd9000) Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-hwmon-v1-2-1fa38f34dc07@linaro.org Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck commit e894b6442a9692dd55f01c4edccee459163665a4 Author: Bartosz Golaszewski Date: Mon Apr 7 09:16:16 2025 +0200 hwmon: (ltc2992) Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-hwmon-v1-1-1fa38f34dc07@linaro.org Reviewed-by: Linus Walleij [groeck: Fixed multi-line alignment issue] Signed-off-by: Guenter Roeck commit 73e5b6b51f00f3c8a8e7531d4a8e211f5f8cfc02 Author: William A. Kennington III Date: Mon Apr 7 13:10:02 2025 -0700 hwmon: (pmbus) Introduce page_change_delay We have some buggy pmbus devices that require a delay after performing a page change operation before trying to issue more commands to the device. This allows for a configurable delay after page changes, but not affecting other read or write operations. This makes a slight behavioral tweak to the existing delay logic, where it considers the longest of delays between operations, instead of always chosing the write delay over the access delay. Signed-off-by: William A. Kennington III Link: https://lore.kernel.org/r/20250407201002.1198092-1-william@wkennington.com Signed-off-by: Guenter Roeck commit 2c183963fb5fdd849cda66ddf2d93d88d2296a75 Author: David Hows Date: Thu Apr 3 09:08:09 2025 +1100 hwmon: (k10temp) Add support for Zen5 Ryzen Desktop Add support for retrieving CCD temperatures on Zen5 (Granite Ridge) Desktop CPUs. Signed-off-by: David Hows Link: https://lore.kernel.org/r/Z-21SQkZpuWiWK06@archibald.hows.id.au Signed-off-by: Guenter Roeck commit cd17587272e28411b5ed1de37f84d106470824a9 Author: Francesco Dolcini Date: Wed Apr 2 12:21:46 2025 +0200 hwmon: (amc6821) Add PWM polarity configuration with OF Add support to configure the PWM-Out pin polarity based on the device tree. The binding would allow also to configure the PWM period, this is currently not implemented by the driver. The driver has a module option to set the PWM polarity (normal=0, inverted=1), when specified it always takes the precedence over the DT. Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250402102146.65406-3-francesco@dolcini.it Signed-off-by: Guenter Roeck commit ce6642211888805cb4389157c3fd2b513b3cfccd Author: Francesco Dolcini Date: Wed Apr 2 12:21:45 2025 +0200 dt-bindings: hwmon: amc6821: add fan and PWM output Add properties to describe the fan and the PWM controller output. Link: https://www.ti.com/lit/gpn/amc6821 Signed-off-by: Francesco Dolcini Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250402102146.65406-2-francesco@dolcini.it Signed-off-by: Guenter Roeck commit f2053eea39a4b310ee502b388a8762c77f02469e Author: Andy Shevchenko Date: Mon Mar 31 10:06:00 2025 +0300 hwmon: (qnap-mcu) Remove (explicitly) unused header The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250331070600.3985850-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck commit c2095eb633190b2c25d0e9fefd4f42d0e0def332 Author: Sascha Hauer Date: Wed Apr 23 10:21:05 2025 +0200 wifi: mwifiex: remove mwifiex_sta_init_cmd() last argument The init argument from mwifiex_sta_init_cmd() is no longer used. Drop it. Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Signed-off-by: Sascha Hauer Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-4-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg commit f996f434aa7899d02542395f89c158cbb0c3bd3b Author: Sascha Hauer Date: Wed Apr 23 10:21:04 2025 +0200 wifi: mwifiex: drop asynchronous init waiting code Historically all commands sent to the mwifiex driver have been asynchronous. The different commands sent during driver initialization have been queued at once and only the final command has been waited for being ready before finally starting the driver. This has been changed in Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously"). With this the initialization is finished once the last mwifiex_send_cmd_sync() (now mwifiex_send_cmd()) has returned. This makes all the code used to wait for the last initialization command to be finished unnecessary, so it's removed in this patch. Acked-by: Brian Norris Signed-off-by: Sascha Hauer Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-3-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg commit 2a47949b1c4db7dde20b4a1fe3ab7a2a6e5462ee Author: Sascha Hauer Date: Wed Apr 23 10:21:03 2025 +0200 wifi: mwifiex: let mwifiex_init_fw() return 0 for success mwifiex_sta_init_cmd() returns -EINPROGRESS as success indication when the init param is true. Likewise mwifiex_init_fw() returns -EINPROGRESS as success indication: It will either return -EINPROGRESS directly when in mfg_mode or the return value of mwifiex_sta_init_cmd() when in normal mode. -EINPROGRESS is a leftover from times when the initialization commands were sent asynchronously. Since Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously") the return value has become meaningless, so change mwifiex_sta_init_cmd() and mwifiex_init_fw() to return 0 for success. Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Signed-off-by: Sascha Hauer Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-2-1bb951073a06@pengutronix.de Signed-off-by: Johannes Berg commit 659d609bdda5f9e96cbfaf8c4d0243277ca49d0f Author: Sascha Hauer Date: Wed Apr 23 10:21:02 2025 +0200 wifi: mwifiex: remove unnecessary queue empty check Since Commit 7bff9c974e1a ("mwifiex: send firmware initialization commands synchronously") all initialization commands are sent synchronously which means the command queue is empty when mwifiex_sta_init_cmd() returns. No need to check for entries in the command code then, so remove the check. Add a WARN_ON() just in case there is something wrong with the reasoning. Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Signed-off-by: Sascha Hauer Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-1-1bb951073a06@pengutronix.de [remove now unused is_cmd_pend_q_empty variable and comment] Signed-off-by: Johannes Berg commit 20e4d3f89d383e978f859d43908a63040d93a272 Author: Miri Korenblit Date: Wed Apr 23 09:16:41 2025 +0300 wifi: iwlwifi: set step_urm in transport and not in the opmodes This has nothing to do with the opmode. Set it in the transport layer instead. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Tested-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250423091408.4e288f7897be.I0c8f792ea2ed6967f8c6d8181f9c5f74bbec7d18@changeid Signed-off-by: Johannes Berg commit 7fffcb5cceea5cec643da76671607c6cc5c8e8be Author: Johannes Berg Date: Wed Apr 23 09:16:40 2025 +0300 wifi: iwlwifi: mld: tests: simplify le32 bitfield handling We can use le32_encode_bits() instead of cpu_to_le32() combined with FIELD_PREP(). Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.9155a412dcc7.I8330ca413d6bdf953e79361ac50939176bcc4e6e@changeid Signed-off-by: Johannes Berg commit 910791aa639e3348698134fe6a543ac2de6775d1 Author: Emmanuel Grumbach Date: Wed Apr 23 09:16:39 2025 +0300 wifi: iwlwifi: update the PHY_CONTEXT_CMD API A new field is added, no impact on the current flows. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.0e1324ae07b7.I6d8ffda2b00c817d3f784241dd61cfe533e12d93@changeid Signed-off-by: Johannes Berg commit 092d41f13d23d9ee1730515cb15711e723e950bd Author: Miri Korenblit Date: Wed Apr 23 09:16:38 2025 +0300 wifi: iwlwifi: mld: inform trans on init failure If starting the op mode failed, the opmode memory is being freed, so trans->op_mode needs to be NULLified. Otherwise, trans will access already freed memory. Call iwl_trans_op_mode_leave in that case. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.c7e178748ef7.Ifaf15bdd8ef8c59e04effbd2e7aa0034b30eeacb@changeid Signed-off-by: Johannes Berg commit b68df31ce636f397098ff426348d4e976d343404 Author: Miri Korenblit Date: Wed Apr 23 09:16:37 2025 +0300 wifi: iwlwifi: mld: properly handle async notification in op mode start From the moment that we have ALIVE, we can receive notification that are handled asynchronously. Some notifications (for example iwl_rfi_support_notif) requires an operational FW. So we need to make sure that they were handled in iwl_op_mode_mld_start before we stop the FW. Flush the async_handlers_wk there to achieve that. Also, if loading the FW in op mode start failed, we need to cancel these notifications, as they are from a dead FW. More than that, not doing so can cause us to access freed memory if async_handlers_wk is executed after ieee80211_free_hw is called. Fix this by canceling all async notifications if a failure occurred in init (after ALIVE). Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.a8f63d983466.Ifd77d9c1a29fdd278b0a7bfc2709dd5d5e5efdb1@changeid Signed-off-by: Johannes Berg commit 833026098b2d991092bd69f76155889bad214681 Author: Miri Korenblit Date: Wed Apr 23 09:16:36 2025 +0300 wifi: iwlwifi: mld: refactor purging async notifications To cancel all async notifications, we need to: - cancel async_handlers_wk - empty async_handlers_list Instead of having the callers to do both, do it in iwl_mld_purge_async_handlers_list and rename it accordingly. Note that the caller iwl_cleanup_mld didn't cancel the work, but it is harmless. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.e98aed77e836.Id9f858d9d553d406a24165b09db830df111befce@changeid Signed-off-by: Johannes Berg commit e1d35eabdd9c64660db5690395efe86931848953 Author: Miri Korenblit Date: Wed Apr 23 09:16:35 2025 +0300 wifi: iwlwifi: mld: don't do iwl_trans_stop_device twice If iwl_mld_load_fw failed, we call iwl_mld_stop_fw which does, among the others, iwl_trans_stop_device. But this is already called from iwl_mld_load_fw's error path. Since we do need the other stuff of iwl_mld_stop_fw to be done also in the error path of iwl_mld_load_fw, just call it there. This also makes the call to iwl_fw_flush_dumps in iwl_mld_op_mope_start redundant, since it is the same as iwl_fw_dbg_stop_sync. Signed-off-by: Miri Korenblit Reviewed-by: Daniel Gabay Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.f7d86be570d3.Ied68f0c4d126b3b0f1ffd9990bbc43d97f098e24@changeid Signed-off-by: Johannes Berg commit fab65a1a6c6ec94e0c34b850b0c2a4b576fae179 Author: Miri Korenblit Date: Wed Apr 23 09:16:34 2025 +0300 wifi: iwlwifi: mld: stop hw if mcc_init fails iwl_mld_run_fw_init_sequence used to be the last thing done in iwl_mld_load_fw, and if it failed, it called iwl_trans_stop_hw. Now we also have there iwl_mld_init_mcc, and it can fail. In that case, we need to undo what we did so far, which is basically only iwl_trans_stop_device. Do that. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.ba06d972a57b.I317fb7b10ed8a688a0d92c5d99de8765d8044b10@changeid Signed-off-by: Johannes Berg commit 092e9ca61f4b77cb2fea72a534c0f5a7a3b6b393 Author: Miri Korenblit Date: Wed Apr 23 09:16:33 2025 +0300 wifi: iwlwifi: mld: avoid memory leak if mcc_init fails allocating mld->nvm_data used to be the last thing done in iwl_mld_load_fw, so there was no need to free on any error path of iwl_mld_load_fw. But now iwl_mld_load_fw also calls iwl_mld_init_mcc, that can fail, after allocating nvm->data. In that case, it is not freed. As allocating the NVM data should only be done at op mode start anyway, simply move it to there, where it is already freed in the right error paths. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250423091408.d07469f866ac.I84ad2e624ce7cd4a661c73b4942186e50cdf82b2@changeid Signed-off-by: Johannes Berg commit 834f6811afbfdcc2b73ad8a75f10c220f402f64e Author: Emmanuel Grumbach Date: Wed Apr 23 09:16:32 2025 +0300 wifi: iwlwifi: mld: remove stored_beacon support We never ask the firmware to store the beacon, so it won't ever send the notification. Remove the handling of that notification. Remove that notification from the arrays of the notifications' names and add the ones that we forgot to add. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.2bb3ea3ff79b.Ie8f1d89f59d45a960a5fe63e7b717527251350ad@changeid Signed-off-by: Johannes Berg commit a2f38266c02a20e9daee8b54e458929762e47791 Author: Johannes Berg Date: Wed Apr 23 09:16:31 2025 +0300 wifi: iwlwifi: mld: remove P2P powersave tracking Since the FW is tracking the CT window by itself, we don't need to update the MAC context or even fill in the value. We just had added that because a firmware bug had broken it for a while. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.ee164b464c21.I29de491b4d74b2b8084e54bfbd28646b15dee196@changeid Signed-off-by: Johannes Berg commit cb04ba78143c2bc706181709f6bce87ebd82836b Author: Anjaneyulu Date: Wed Apr 23 09:16:30 2025 +0300 wifi: iwlwifi: parse active and 20 MHz AP NVM channel flag Configure 20 MHz AP mode based on NVM settings, set the NL80211_RRF_ALLOW_20MHZ_ACTIVITY flag, when the NVM indicates that an access point can operate in 20 MHz only. Signed-off-by: Somashekhar Puttagangaiah Signed-off-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.897d826a8612.I1f7f84f4485ed3928070c97a031110ccb608bda8@changeid Signed-off-by: Johannes Berg commit bdd6d93d7a109ba1080336fe07d0b4eb815efaf9 Author: Miri Korenblit Date: Wed Apr 23 09:16:29 2025 +0300 wifi: iwlwifi: re-add IWL_AMSDU_8K case This case in iwl_trans_get_rb_size_order was accidently combined with the IWL_AMSDU_12K case. Fix this. Fixes: 7391b2a4f7db ("wifi: iwlwifi: rework firmware error handling") Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.ef19205aa358.Ifbf89e7b7391cd7070267b7360c53230b3b2c57c@changeid Signed-off-by: Johannes Berg commit bb6d4dc9d3f624bd526f073caa91a3d08c0aa22c Author: Johannes Berg Date: Wed Apr 23 09:16:28 2025 +0300 wifi: iwlwifi: fw: do reset handshake during assert if needed Earlier, the firmware could only request the reset handshake is done during the dump, if the dump was split. However, it's also needed when the dump isn't split, in which case it must be done before the dump. The firmware now advertises this requirement, so do the handshake in the non-split case when asked for. Rename apply policy ..._RESET_HANDSHAKE to ..._SPLIT_DUMP_RESET to more clearly indicate that this specific dump needs to be split, while the handshake requirement overall is now indicated by the new capability flag. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.10adafedb74b.Ie3911db1ebbd196ae4b0de1c53012aa1de193c0d@changeid Signed-off-by: Johannes Berg commit c4b1fe9194ab58d870873112bc1dae546ffb2e68 Author: Johannes Berg Date: Wed Apr 23 09:16:27 2025 +0300 wifi: iwlwifi: mvm: remove IWL_EMPTYING_HW_QUEUE_DELBA state This state can never be entered, since the last place using it was removed with non-DQA mode in commit c8f54701bdbf ("iwlwifi: mvm: remove non-DQA mode"). Clean up this code too. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250423091408.e8a20fb41dc5.I9cd41a15148c90e953335e7020405103ba3fc7f0@changeid Signed-off-by: Johannes Berg commit a3cdd0899b8b0e385a48b32f48e0dfc70d3c1ada Author: Wentao Liang Date: Tue Apr 22 14:59:38 2025 +0800 wifi: brcm80211: fmac: Add error log in brcmf_usb_dl_cmd() In brcmf_usb_dl_cmd(), the error logging is not enough to describe the error state. And some caller of the brcmf_usb_dl_cmd() does not handle its error. An error log in brcmf_usb_dl_cmd() is needed to prevent silent failure. Add error handling in brcmf_usb_dl_cmd() to log the command id and error code in the brcmf_usb_dl_cmd() fails. In this way, every invocation of the function logs a message upon failure. Signed-off-by: Wentao Liang Acked-by: Arend van Spriel Link: https://patch.msgid.link/20250422065938.2345-1-vulab@iscas.ac.cn Signed-off-by: Johannes Berg commit fcc2d3e11bcc8f01d52a8c419f49f86ff8343b7c Author: Karthikeyan Kathirvel Date: Mon Apr 21 16:45:05 2025 +0530 wifi: ieee80211: define beacon protection bit field An AP supporting Beacon Protection should set bit 84 in the extended capabilities IE (9.4.2.25 in the 802.11be D7 spec). So the *4th* bit of the 10th byte should be checked to figure out whether beacon protection is enabled or disabled. Signed-off-by: Karthikeyan Kathirvel Reviewed-by: Jeff Johnson Link: https://patch.msgid.link/20250421111505.3633992-1-karthikeyan.kathirvel@oss.qualcomm.com Signed-off-by: Johannes Berg commit cfec9f8f58a9a7b8005a8a66f51b1f7752292301 Author: Thomas Weißschuh Date: Thu Apr 17 15:21:54 2025 +0200 wifi: mwifiex: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh Reviewed-by: Aleksandr Loktionov Acked-by: Brian Norris Link: https://patch.msgid.link/20250417-restricted-pointers-wifi-v1-1-b79cdaae5579@linutronix.de Signed-off-by: Johannes Berg commit e7c0fe7a9e7f7f053ebf815cb13eb07c1055b4ca Author: Simon Horman Date: Tue Apr 15 17:06:34 2025 +0100 wifi: brcmsmac: Spelling corrections Various spelling corrections as flagged by codespell. Signed-off-by: Simon Horman Acked-by: Arend van Spriel Link: https://patch.msgid.link/20250415-brcmsmac-spell-v1-1-3e1375586883@kernel.org Signed-off-by: Johannes Berg commit c96d5afc34dfcf38a00233a073c601949ba8286c Author: Sascha Hauer Date: Thu Apr 10 12:24:33 2025 +0200 wifi: mwifiex: move common settings out of switch/case In mwifiex_add_virtual_intf() several settings done in a switch/case are the same in all cases. Move them out of the switch/case to deduplicate the code. bss_started is not initialized in all switch/case branches, but it is only used in AP mode in the driver, so it doesn't hurt to move its initialization out of the switch/case as well. Signed-off-by: Sascha Hauer Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-9-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit d19b9ca761e774e31d7b24bcefe09f84d9a7ecc7 Author: Sascha Hauer Date: Thu Apr 10 12:24:32 2025 +0200 wifi: mwifiex: make locally used function static mwifiex_is_tdls_off_chan() is only used locally. Make it static. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-8-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 65a204b28182a4f2dfad85d70bbde6a3ad2905ac Author: Sascha Hauer Date: Thu Apr 10 12:24:31 2025 +0200 wifi: mwifiex: fix indention Align multiline if() under the opening brace. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-7-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 3612d72b47859f41165c54a8734868c2360a1ae3 Author: Sascha Hauer Date: Thu Apr 10 12:24:30 2025 +0200 wifi: mwifiex: simplify mwifiex_setup_ht_caps() In mwifiex_setup_ht_caps() first a local struct ieee80211_mcs_info is initialized and afterwards copied over &ht_info->mcs. Simplify this by initializing &ht_info->mcs directly. While at it call memset on the u8 rx_mask[] array instead of the struct which makes the intention clearer and we no longer have to assume the rx_mask array is the first member of struct ieee80211_mcs_info. Signed-off-by: Sascha Hauer Acked-by: Brian Norris Reviewed-by: Jeff Chen Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-6-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 450f5a05bd478a8493263322884aa064e725fffa Author: Sascha Hauer Date: Thu Apr 10 12:24:29 2025 +0200 wifi: mwifiex: pass adapter to mwifiex_dnld_cmd_to_fw() priv is not needed in mwifiex_dnld_cmd_to_fw(), so pass the adapter to it as context pointer. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-5-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit f04e64eeaab37edef8e6118d28a3415d6183759e Author: Sascha Hauer Date: Thu Apr 10 12:24:28 2025 +0200 wifi: mwifiex: make region_code_mapping_t const region_code_mapping_t is not modified and shouldn't be. Mark it const. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-4-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 6fcc4294e85fe392bf337199ce2ad152b9dede9f Author: Sascha Hauer Date: Thu Apr 10 12:24:27 2025 +0200 wifi: mwifiex: drop unnecessary initialization Several functions initialize the priv * without actually using the initialized value. Drop the initialization. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-3-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 7d902365171cefc8d6fda5f2f00365333f701135 Author: Sascha Hauer Date: Thu Apr 10 12:24:26 2025 +0200 wifi: mwifiex: use adapter as context pointer for mwifiex_hs_activated_event() mwifiex_hs_activated_event() takes a struct mwifiex_private * as context pointer which this function doesn't need directly and the callers don't have. Use struct mwifiex_adapter * instead to simplify both the function and the callers. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-2-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit bf55d51f080eb4a8b722b602508930cc0d50c655 Author: Sascha Hauer Date: Thu Apr 10 12:24:25 2025 +0200 wifi: mwifiex: deduplicate code in mwifiex_cmd_tx_rate_cfg() The code block inside the if/else is the same with just using pbitmap_rates if non NULL or priv->bitmap_rates otherwise. Deduplicate the code by picking the correct pointer first and then using it unconditionally. Reviewed-by: Francesco Dolcini Signed-off-by: Sascha Hauer Acked-by: Brian Norris Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-1-a6bbd4ac4d37@pengutronix.de Signed-off-by: Johannes Berg commit 39df75eb38faf25dbbc58a2b9231de730c64745e Author: Julian Vetter Date: Tue Apr 8 11:22:20 2025 +0200 wifi: mac80211: Replace __get_unaligned_cpu32 in mesh_pathtbl.c The __get_unaligned_cpu32 function is deprecated. So, replace it with the more generic get_unaligned and just cast the input parameter. Signed-off-by: Julian Vetter Link: https://patch.msgid.link/20250408092220.2267754-1-julian@outer-limits.org [fix subject] Signed-off-by: Johannes Berg commit 1237c5632fe34244ff7d726d4bc96b3048c10562 Author: Bartosz Golaszewski Date: Mon Apr 7 09:10:49 2025 +0200 bcma: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20250407-gpiochip-set-rv-bcma-v1-1-fa403ad76966@linaro.org Signed-off-by: Johannes Berg commit 4876376988081d636a4c4e5f03a5556386b49087 Author: Toke Høiland-Jørgensen Date: Thu Apr 3 20:39:28 2025 +0200 Revert "mac80211: Dynamically set CoDel parameters per station" This reverts commit 484a54c2e597dbc4ace79c1687022282905afba0. The CoDel parameter change essentially disables CoDel on slow stations, with some questionable assumptions, as Dave pointed out in [0]. Quoting from there: But here are my pithy comments as to why this part of mac80211 is so wrong... static void sta_update_codel_params(struct sta_info *sta, u32 thr) { - if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) { 1) sta->local->num_sta is the number of associated, rather than active, stations. "Active" stations in the last 50ms or so, might have been a better thing to use, but as most people have far more than that associated, we end up with really lousy codel parameters, all the time. Mistake numero uno! 2) The STA_SLOW_THRESHOLD was completely arbitrary in 2016. - sta->cparams.target = MS2TIME(50); This, by itself, was probably not too bad. 30ms might have been better, at the time, when we were battling powersave etc, but 20ms was enough, really, to cover most scenarios, even where we had low rate 2Ghz multicast to cope with. Even then, codel has a hard time finding any sane drop rate at all, with a target this high. - sta->cparams.interval = MS2TIME(300); But this was horrible, a total mistake, that is leading to codel being completely ineffective in almost any scenario on clients or APS. 100ms, even 80ms, here, would be vastly better than this insanity. I'm seeing 5+seconds of delay accumulated in a bunch of otherwise happily fq-ing APs.... 100ms of observed jitter during a flow is enough. Certainly (in 2016) there were interactions with powersave that I did not understand, and still don't, but if you are transmitting in the first place, powersave shouldn't be a problemmmm..... - sta->cparams.ecn = false; At the time we were pretty nervous about ecn, I'm kind of sanguine about it now, and reliably indicating ecn seems better than turning it off for any reason. [...] In production, on p2p wireless, I've had 8ms and 80ms for target and interval for years now, and it works great. I think Dave's arguments above are basically sound on the face of it, and various experimentation with tighter CoDel parameters in the OpenWrt community have show promising results[1]. So I don't think there's any reason to keep this parameter fiddling; hence this revert. [0] https://lore.kernel.org/linux-wireless/CAA93jw6NJ2cmLmMauz0xAgC2MGbBq6n0ZiZzAdkK0u4b+O2yXg@mail.gmail.com/ [1] https://forum.openwrt.org/t/reducing-multiplexing-latencies-still-further-in-wifi/133605/130 Suggested-By: Dave Taht In-memory-of: Dave Taht Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250403183930.197716-1-toke@toke.dk Signed-off-by: Johannes Berg commit 996c15bd30a9caf5d3a32414a28503f3389fc96e Author: Johannes Berg Date: Sat Mar 29 22:14:20 2025 +0100 wifi: cfg80211/mac80211: remove more 5/10 MHz code We still have ieee80211_chandef_rate_flags() and all that, but all the users seem pretty much broken (deflink, etc.) Remove all the code. It's been two years since last anyone even vaguely entertained the notion of looking at this and fixing it. Link: https://patch.msgid.link/20250329221419.c31da7ae8c84.I1a3a4b6008134d66ca75a5bdfc004f4594da8145@changeid Signed-off-by: Johannes Berg commit 7438843df8cf7a484303caee7540a00f0ef972b2 Author: Gustavo A. R. Silva Date: Wed Mar 26 18:04:02 2025 -0600 wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:6430:41: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Acked-by: Miri Korenblit Link: https://patch.msgid.link/Z-SV8gb6MuZJmmhe@kspp Signed-off-by: Johannes Berg commit 17328a5b6a8ff21d318283700d8d33dc2b8ca652 Author: Gustavo A. R. Silva Date: Wed Mar 26 17:40:36 2025 -0600 wifi: mac80211: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: net/mac80211/spectmgmt.c:151:47: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] net/mac80211/spectmgmt.c:155:48: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://patch.msgid.link/Z-SQdHZljwAgIlp9@kspp Signed-off-by: Johannes Berg commit 98fd01b4173de0fb1ab2702aca28f7434d2fd234 Author: David Heidelberg Date: Mon Mar 24 18:41:42 2025 +0100 dt-bindings: wireless: qcom,wcnss: Use wireless-controller.yaml Reference wireless-controller.yaml schema, so we can use properties as local-mac-address or mac-address. Reviewed-by: Rob Herring (Arm) Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-5-f5c3fe00e8f0@ixit.cz Signed-off-by: Johannes Berg commit c301db25dd69d656b13f3ad2844e6349ac932c7e Author: Janne Grunau Date: Mon Mar 24 18:41:41 2025 +0100 dt-bindings: wireless: silabs,wfx: Use wireless-controller.yaml Instead listing local-mac-address and mac-address properties, reference wireless-controller.yaml schema. The schema brings in constraints for the property checked during `make dtbs_check`. Reviewed-by: Rob Herring (Arm) Reviewed-by: Jérôme Pouiller Signed-off-by: Janne Grunau Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-4-f5c3fe00e8f0@ixit.cz Signed-off-by: Johannes Berg commit 3c3606793f7ed926c32555485ae7f7e7c03ef58a Author: Janne Grunau Date: Mon Mar 24 18:41:40 2025 +0100 dt-bindings: wireless: bcm4329-fmac: Use wireless-controller.yaml schema The wireless-controller schema specifies local-mac-address as used in the bcm4329-fmac device nodes of Apple silicon devices (arch/arm64/boot/dts/apple). Fixes `make dtbs_check` for those devices. Reviewed-by: Rob Herring (Arm) Signed-off-by: Janne Grunau Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-3-f5c3fe00e8f0@ixit.cz Signed-off-by: Johannes Berg commit c7e35b3b007f168186504c95ee64d23ece71629d Author: David Heidelberg Date: Mon Mar 24 18:41:39 2025 +0100 dt-bindings: net: Add generic wireless controller Wireless controllers share the common properties. Reviewed-by: Rob Herring (Arm) Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-2-f5c3fe00e8f0@ixit.cz Signed-off-by: Johannes Berg commit dede36400714b34bdaf79be2c84f540f07102554 Author: Janne Grunau Date: Mon Mar 24 18:41:38 2025 +0100 dt-bindings: net: Add network-class schema for mac-address properties The ethernet-controller schema specifies "mac-address" and "local-mac-address" but other network devices such as wireless network adapters use mac addresses as well. The Devicetree Specification, Release v0.3 specifies in section 4.3.1 a generic "Network Class Binding" with "address-bits", "mac-address", "local-mac-address" and "max-frame-size". This schema specifies the "address-bits" property and moves the remaining properties over from the ethernet-controller.yaml schema. The "max-frame-size" property is used to describe the maximal payload size despite its name. Keep the description from ethernet-controller specifying this property as MTU. The contradictory description in the Devicetree Specification is ignored. Signed-off-by: Janne Grunau Signed-off-by: David Heidelberg Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-1-f5c3fe00e8f0@ixit.cz Signed-off-by: Johannes Berg commit 76f1cc98b23cefd1f0ae90c51f1fb837e5f46528 Author: Pavel Begunkov Date: Sun Apr 20 10:31:20 2025 +0100 io_uring/zcrx: add support for multiple ifqs Allow the user to register multiple ifqs / zcrx contexts. With that we can use multiple interfaces / interface queues in a single io_uring instance. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/668b03bee03b5216564482edcfefbc2ee337dd30.1745141261.git.asml.silence@gmail.com [axboe: fold in fix] Signed-off-by: Jens Axboe commit 5632a5052bb6213b1995e0d286fc049c15f54f9b Author: Bhaskar Chowdhury Date: Wed Mar 17 09:55:40 2021 +0530 wifi: iwlwifi: fw: api: Absolute rudimentary typo fixes in the file power.h s/folowing/following/ s/Celsuis/Celsius/ s/temerature/temperature/ ...twice Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://patch.msgid.link/20210317042540.4097078-1-unixbhaskar@gmail.com Signed-off-by: Johannes Berg commit d175222f5e90b7e1f23713378823c338fabb3258 Author: Joy Zou Date: Mon Apr 7 12:46:36 2025 -0400 dmaegnine: fsl-edma: add edma error interrupt handler Add the edma error interrupt handler because it's useful to debug issue. i.MX8ULP edma has per channel error interrupt. i.MX91/93/95 and i.MX8QM/QXP/DXL edma share one error interrupt. Signed-off-by: Joy Zou Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250407-edma_err-v2-2-9d7e5b77fcc4@nxp.com Signed-off-by: Vinod Koul commit a9ea01f28408169431dd3e6464ed2e48539f4280 Author: Joy Zou Date: Mon Apr 7 12:46:35 2025 -0400 dt-bindings: dma: fsl-edma: increase maxItems of interrupts and interrupt-names The edma controller support optional error interrupt, so update interrupts and interrupt-names's maxItems. Signed-off-by: Joy Zou Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250407-edma_err-v2-1-9d7e5b77fcc4@nxp.com Signed-off-by: Vinod Koul commit 86071b369dbdf0a8f7e4424c4e0b613ba7b8ab5e Author: Geert Uytterhoeven Date: Tue Apr 22 20:11:19 2025 +0200 dmaengine: ARM_DMA350 should depend on ARM/ARM64 The Arm DMA-350 controller is only present on Arm-based SoCs. Hence add dependencies on ARM and ARM64, to prevent asking the user about this driver when configuring a kernel for a non-Arm architecture. Fixes: 5d099706449d54b4 ("dmaengine: Add Arm DMA-350 driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/50dbaf4ce962fa7ed0208150ca987e3083da39ec.1745345400.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 5965fd614b18e77c56cfefbd2d747b6b1edf1497 Author: Kaushal Kumar Date: Wed Apr 23 12:00:51 2025 +0530 dt-bindings: dma: qcom,bam: Document dma-coherent property Qualcomm BAM DMA controller has DMA-coherent support so define it in the properties section. Acked-by: Rob Herring (Arm) Signed-off-by: Kaushal Kumar Link: https://lore.kernel.org/r/20250423063054.28795-3-quic_kaushalk@quicinc.com Signed-off-by: Vinod Koul commit 2b801487ac3be7bec561ae62d1a6c4d6f5283f8c Author: Víctor Gonzalo Date: Wed Mar 13 20:02:27 2024 +0200 wifi: iwlwifi: Add missing MODULE_FIRMWARE for Qu-c0-jf-b0 The module metadata for the firmware file iwlwifi-Qu-c0-jf-b0-* is missing. Signed-off-by: Víctor Gonzalo Link: https://patch.msgid.link/20240313180227.2224780-1-victor.gonzalo@anddroptable.net Signed-off-by: Johannes Berg commit 9991739ed3ee61664c42b886b2ba2781736e8b94 Author: Yang Li Date: Wed Jan 15 08:54:31 2025 +0800 wifi: iwlwifi: mvm: Remove duplicated include in iwl-utils.c The header files net/gso.h is included twice in iwl-utils.c, so one inclusion of each can be removed. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=13555 Signed-off-by: Yang Li Acked-by: Miri Korenblit Link: https://patch.msgid.link/20250115005431.89510-1-yang.lee@linux.alibaba.com Signed-off-by: Johannes Berg commit 76a853f86c97b348dc96e75a6e6f94d8750715ee Author: Johannes Berg Date: Thu Mar 13 13:49:39 2025 +0100 wifi: free SKBTX_WIFI_STATUS skb tx_flags flag Jason mentioned at netdevconf that we've run out of tx_flags in the skb_shinfo(). Gain one bit back by removing the wifi bit. We can do that because the only userspace application for it (hostapd) doesn't change the setting on the socket, it just uses different sockets, and normally doesn't even use this any more, sending the frames over nl80211 instead. Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250313134942.52ff54a140ec.If390bbdc46904cf451256ba989d7a056c457af6e@changeid Signed-off-by: Johannes Berg commit 46380bf020790643d880a750f25c5cce720e0ac5 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:30 2025 +0100 irqdomain: ssb: Switch to irq_domain_create_linear() irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Michael Buesch Cc: linux-wireless@vger.kernel.org Link: https://patch.msgid.link/20250319092951.37667-38-jirislaby@kernel.org Signed-off-by: Johannes Berg commit ad748a73675cce9f95ece7b11ec233c95ff56c31 Author: Dmitry Antipov Date: Fri Mar 21 16:42:56 2025 +0300 wifi: rt2x00: remove weird self-assignment in rt2800_loft_search() Remove weird self-assignment in 'rt2800_loft_search()' assuming that it was just a typo. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov Acked-by: Stanislaw Gruszka Link: https://patch.msgid.link/20250321134256.821596-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit 5c0a44c40517bab5192f1aaabe3457b0e15ac0af Author: Konrad Dybcio Date: Thu Mar 27 02:47:03 2025 +0100 dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement Certain platforms (such as Chrome SDM845 and SC7180 with a TF-A running as secure firmware) do not have a OSI-mode capable PSCI implementation. That in turn means the PSCI-associated power domain which represents the system's power state can't provide enough feedback to the RSC device. Don't require power-domains on platforms where this may be the case. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250327-topic-more_dt_bindings_fixes-v2-1-b763d958545f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit f6a305309be7b07b6ea80a775138e20fe345020b Author: Stefan Wahren Date: Tue Apr 15 21:05:58 2025 +0200 pmdomain: bcm: bcm2835-power: Use devm_clk_get_optional The driver tries to implement optional clock handling with devm_clk_get. It treats all errors except EPROBE_DEFER as a missing clock, which is not correct. So use devm_clk_get_optional here and get the corner-cases right. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20250415190558.16354-1-wahrenst@gmx.net Signed-off-by: Ulf Hansson commit f89c082d44914f24dfb5b0219eb140369de5b612 Author: Finley Xiao Date: Tue Apr 15 11:23:14 2025 +0800 pmdomain: rockchip: Add support for RK3562 SoC This driver is modified to support RK3562 SoC. Add support to ungate clk. Add support to shut down memory for RK3562. Signed-off-by: Finley Xiao Signed-off-by: Kever Yang Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250415032314.44997-2-kever.yang@rock-chips.com Signed-off-by: Ulf Hansson commit bbde4283a59577c3a6df903f267e11d18ac177d9 Merge: 5342f018e9e2fc 2798cf48d26704 Author: Ulf Hansson Date: Wed Apr 23 14:07:04 2025 +0200 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit 2798cf48d2670487f7ee22dfc5f31c07d0d3b135 Author: Finley Xiao Date: Tue Apr 15 11:23:13 2025 +0800 dt-bindings: power: rockchip: Add support for RK3562 SoC According to a description from TRM, add all the power domains. Signed-off-by: Finley Xiao Signed-off-by: Kever Yang Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250415032314.44997-1-kever.yang@rock-chips.com Signed-off-by: Ulf Hansson commit 88922fe7854091a50e831fefdae674433c5b261e Merge: 0e0a7e3719bc8c aea45363e29dd1 Author: David S. Miller Date: Wed Apr 23 13:02:20 2025 +0100 Merge branch 'bridge-mc-per-vlan-qquery' Yong Wang says: ==================== bridge: multicast: per vlan query improvement when port or vlan state changes The current implementation of br_multicast_enable_port() only operates on port's multicast context, which doesn't take into account in case of vlan snooping, one downside is the port's igmp query timer will NOT resume when port state gets changed from BR_STATE_BLOCKING to BR_STATE_FORWARDING etc. Such code flow will briefly look like: 1.vlan snooping --> br_multicast_port_query_expired with per vlan port_mcast_ctx --> port in BR_STATE_BLOCKING state --> then one-shot timer discontinued The port state could be changed by STP daemon or kernel STP, taking mstpd as example: 2.mstpd --> netlink_sendmsg --> br_setlink --> br_set_port_state with non blocking states, i.e. BR_STATE_LEARNING or BR_STATE_FORWARDING --> br_port_state_selection --> br_multicast_enable_port --> enable multicast with port's multicast_ctx Here for per vlan snooping, the vlan context of the port should be used instead of port's multicast_ctx. The first patch corrects such behavior. Similarly, vlan state change also impacts multicast behavior, the 2nd patch adds function to update the corresponding multicast context when vlan state changes. The 3rd patch adds the selftests to confirm that IGMP/MLD query does happen when the STP state becomes forwarding. ==================== Signed-off-by: David S. Miller commit aea45363e29dd16050e6ce333ce0d3696ac3b5a9 Author: Yong Wang Date: Thu Apr 17 15:43:14 2025 +0200 selftests: net/bridge : add tests for per vlan snooping with stp state changes Change ALL_TESTS definition to "test-per-line". Add the test case of per vlan snooping with port stp state change to forwarding and also vlan equivalent case in both bridge_igmp.sh and bridge_mld.sh. Signed-off-by: Yong Wang Reviewed-by: Andy Roulin Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 6c131043eaf1be2a6cc2d228f92ceb626fbcc0f3 Author: Yong Wang Date: Thu Apr 17 15:43:13 2025 +0200 net: bridge: mcast: update multicast contex when vlan state is changed When the vlan STP state is changed, which could be manipulated by "bridge vlan" commands, similar to port STP state, this also impacts multicast behaviors such as igmp query. In the scenario of per-VLAN snooping, there's a need to update the corresponding multicast context to re-arm the port query timer when vlan state becomes "forwarding" etc. Update br_vlan_set_state() function to enable vlan multicast context in such scenario. Before the patch, the IGMP query does not happen in the last step of the following test sequence, i.e. no growth for tx counter: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1 # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0 # ip link add name swp1 up master br1 type dummy # sleep 1 # bridge vlan set vid 1 dev swp1 state 4 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # sleep 1 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # bridge vlan set vid 1 dev swp1 state 3 # sleep 2 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 After the patch, the IGMP query happens in the last step of the test: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1 # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0 # ip link add name swp1 up master br1 type dummy # sleep 1 # bridge vlan set vid 1 dev swp1 state 4 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # sleep 1 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # bridge vlan set vid 1 dev swp1 state 3 # sleep 2 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 3 Signed-off-by: Yong Wang Reviewed-by: Andy Roulin Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4b30ae9adb047dd0a7982975ec3933c529537026 Author: Yong Wang Date: Thu Apr 17 15:43:12 2025 +0200 net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions When a bridge port STP state is changed from BLOCKING/DISABLED to FORWARDING, the port's igmp query timer will NOT re-arm itself if the bridge has been configured as per-VLAN multicast snooping. Solve this by choosing the correct multicast context(s) to enable/disable port multicast based on whether per-VLAN multicast snooping is enabled or not, i.e. using per-{port, VLAN} context in case of per-VLAN multicast snooping by re-implementing br_multicast_enable_port() and br_multicast_disable_port() functions. Before the patch, the IGMP query does not happen in the last step of the following test sequence, i.e. no growth for tx counter: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1 # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0 # ip link add name swp1 up master br1 type dummy # bridge link set dev swp1 state 0 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # sleep 1 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # bridge link set dev swp1 state 3 # sleep 2 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 After the patch, the IGMP query happens in the last step of the test: # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1 # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0 # ip link add name swp1 up master br1 type dummy # bridge link set dev swp1 state 0 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # sleep 1 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 1 # bridge link set dev swp1 state 3 # sleep 2 # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]' 3 Signed-off-by: Yong Wang Reviewed-by: Andy Roulin Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f28aa371b73af941dc3a676cb875fe285b5c0d40 Author: Tony W Wang-oc Date: Wed Apr 23 18:28:51 2025 +0800 ALSA: HDA: Add Zhaoxin HDMI Controller and Codec support Add newer Zhaoxin HD Audio PCI IDs, and HDMI codec vendor IDs. Because Zhaoxin hardware limitation, set BDL position to 128 to increase interrupt interval. To fix response write request not synced to memory when handle HDAC interrupt, set bus->polling_mode = 1. Signed-off-by: Joanne Bao Signed-off-by: Tony W Wang-oc Link: https://patch.msgid.link/20250423102851.57997-1-TonyWWang-oc@zhaoxin.com Signed-off-by: Takashi Iwai commit 382d4ee4455234b498f201c00bfc120dc38b78c3 Merge: 7762fdab231005 e8ac7336dd62f0 Author: Mark Brown Date: Wed Apr 23 12:43:27 2025 +0100 regulator: max20086: Fixes chip id and enable gpio Merge series from João Paulo Gonçalves : I'm working on integrating a system with a MAX20086 and noticed these small issues in the driver: the chip ID for MAX20086 is 0x30 and not 0x40. Also, in my use case, the enable pin is always enabled by hardware, so the enable GPIO isn't needed. Without these changes, the driver fails to probe. commit 076f3227255ccbbe7eb7c0424a9d20c4278dfb0c Merge: 6d7ee6de75010e cc78d1eaabad3c Author: Mark Brown Date: Wed Apr 23 12:43:22 2025 +0100 Add RK3576 SAI Audio Controller Support Merge series from Nicolas Frattaroli : This series adds support for Rockchip's Serial Audio Interface (SAI) controller, found on SoCs such as the RK3576. The SAI is a flexible controller IP that allows both transmitting and receiving digital audio in the I2S, TDM and PCM formats. Instances of this controller are used both for externally exposed audio interfaces, as well as for audio on video interfaces such as HDMI. commit 417b0f8d08f878615de9481c6e8827fbc8b57ed2 Author: Potin Lai Date: Wed Apr 9 23:37:30 2025 +0800 gpio: pca953x: Add support for level-triggered interrupts Adds support for level-triggered interrupts in the PCA953x GPIO expander driver. Previously, the driver only supported edge-triggered interrupts, which could lead to missed events in scenarios where an interrupt condition persists until it is explicitly cleared. By enabling level-triggered interrupts, the driver can now detect and respond to sustained interrupt conditions more reliably. Signed-off-by: Potin Lai Link: https://lore.kernel.org/r/20250409-gpio-pca953x-level-triggered-irq-v3-1-7f184d814934@gmail.com Signed-off-by: Bartosz Golaszewski commit 73dc041f8a60279faa1109957891b00d52496425 Author: Jindong Yue Date: Wed Apr 16 15:26:05 2025 +0900 gpio: vf610: Allow building as a module Support for building it as a module for use on the Android platform, because the Android kernel(GKI) doesn't contain board-specific drivers, it requires that these drivers be built as a module and loaded into the system. Signed-off-by: Jindong Yue Link: https://lore.kernel.org/r/20250416062605.1948856-1-jindong.yue@nxp.com Signed-off-by: Bartosz Golaszewski commit 2521f47606eaffb2e477ea0b2985d2d8e31aa563 Author: Julien Massot Date: Wed Apr 23 10:53:13 2025 +0200 arm64: dts: mediatek: mt8395-nio-12l: Enable Audio DSP and sound card Add memory regions for the Audio DSP (ADSP) and Audio Front-End (AFE), and enable both components in the device tree. Also, define the required pin configuration and add a sound card node configured to use the ADSP. This enables audio output through the 3.5mm headphone jack available on the board. Signed-off-by: Julien Massot Link: https://lore.kernel.org/r/20250423-mt8395-audio-sof-v2-1-5e6dc7fba0fc@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 7081ba442f0934102ace3e93d965b64ea1aeeb63 Author: AngeloGioacchino Del Regno Date: Thu Feb 20 12:09:46 2025 +0100 arm64: dts: mediatek: mt8390-genio-common: Add Display on DSI0 Configure the DSI0 display pipeline and add regulator, pinctrl and display node to enable the Startek KD070FHFID078 panel found on the MediaTek Genio 510 and Genio 700 EVKs. Link: https://lore.kernel.org/r/20250220110948.45596-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 21ce58965454c9e4c194fa0d554ab96f69fd4a95 Author: Louis-Alexis Eyraud Date: Mon Feb 24 14:34:14 2025 +0100 arm64: dts: mediatek: mt8395-genio-1200-evk: Add display on DSI0 This board has a Startek KD070FHFID078 MIPI-DSI panel on the DSI0 connector, so add and configure the pipeline connecting VDOSYS0 components to DSI0, with the needed pinctrl and display nodes in devicetree. Signed-off-by: Louis-Alexis Eyraud Link: https://lore.kernel.org/r/20250224-mt8395-genio-1200-evk-enable-dsi-panel-v1-1-74f31cf48a43@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit ac1c1d2e2124387752b4cc955dd359753783c147 Author: Francesco Dolcini Date: Tue Apr 8 22:29:39 2025 +0200 arm64: dts: freescale: imx8mm-verdin: Add EEPROM compatible fallback According to the AT24 EEPROM bindings the compatible string should contain first the actual manufacturer, and second the corresponding atmel model. Add the atmel compatible fallback accordingly. Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 4e13da7c73932572c7ee1c3bdc64cb94a3c0d875 Author: Francesco Dolcini Date: Tue Apr 8 22:29:38 2025 +0200 arm64: dts: freescale: imx8mp-verdin: Add EEPROM compatible fallback According to the AT24 EEPROM bindings the compatible string should contain first the actual manufacturer, and second the corresponding atmel model. Add the atmel compatible fallback accordingly. Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 88d5d6a38d5161228fbfe017eb94d777d5e8a0e4 Author: Tamir Duberstein Date: Wed Apr 16 13:15:43 2025 -0400 rust: alloc: replace `Vec::set_len` with `inc_len` Rename `set_len` to `inc_len` and simplify its safety contract. Note that the usage in `CString::try_from_fmt` remains correct as the receiver is known to have `len == 0`. Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-4-112b222604cd@gmail.com Signed-off-by: Danilo Krummrich commit 1b04b466c873f62413bf65a05a558f036660aedc Author: Tamir Duberstein Date: Wed Apr 16 13:15:42 2025 -0400 rust: alloc: refactor `Vec::truncate` using `dec_len` Use `checked_sub` to satisfy the safety requirements of `dec_len` and replace nearly the whole body of `truncate` with a call to `dec_len`. Reviewed-by: Andrew Ballance Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-3-112b222604cd@gmail.com [ Remove #[expect(unused)] from dec_len(). - Danilo ] Signed-off-by: Danilo Krummrich commit dbb0b840a0cd2ebabbc94a0040e366c7f1a70f7b Author: Tamir Duberstein Date: Wed Apr 16 13:15:41 2025 -0400 rust: alloc: add `Vec::dec_len` Add `Vec::dec_len` that reduces the length of the receiver. This method is intended to be used from methods that remove elements from `Vec` such as `truncate`, `pop`, `remove`, and others. This method is intentionally not `pub`. Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-2-112b222604cd@gmail.com [ Add #[expect(unused)] to dec_len(). - Danilo ] Signed-off-by: Danilo Krummrich commit 47a17a63f9e23f7e8f39d0965bcda8fee6c322f8 Author: Tamir Duberstein Date: Wed Apr 16 13:15:40 2025 -0400 rust: alloc: add Vec::len() <= Vec::capacity invariant Document the invariant that the vector's length is always less than or equal to its capacity. This is already implied by these other invariants: - `self.len` always represents the exact number of elements stored in the vector. - `self.layout` represents the absolute number of elements that can be stored within the vector without re-allocation. but it doesn't hurt to spell it out. Note that the language references `self.capacity` rather than `self.layout.len` as the latter is zero for a vector of ZSTs. Update a safety comment touched by this patch to correctly reference `realloc` rather than `alloc` and replace "leaves" with "leave" to improve grammar. Reviewed-by: Alice Ryhl Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-1-112b222604cd@gmail.com Signed-off-by: Danilo Krummrich commit d15059f7be59f887c1a370037cc2337c2ff2ad56 Author: Pin-yen Lin Date: Wed Apr 23 12:03:39 2025 +0800 arm64: dts: mt8183: Add port node to mt8183.dtsi Add the port node to fix the binding schema check. Also update mt8183-kukui to reference the new port node. Fixes: 88ec840270e6 ("arm64: dts: mt8183: Add dsi node") Fixes: 27eaf34df364 ("arm64: dts: mt8183: config dsi node") Signed-off-by: Pin-yen Lin Link: https://lore.kernel.org/r/20250423040354.2847447-1-treapking@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 690f7e40cccd934b7cdfdfe37b9458e2855fbb0d Author: Alexander Stein Date: Tue Apr 8 11:30:54 2025 +0200 ARM: dts: ls1021a-tqmals1021a: change sound card model name The card name for ALSA is generated from the model name string and is limited to 16 characters. Use a shorter name to prevent cutting the name. MBLS1021A uses the same audio codec as most i.MX based starter kits by TQ-Systems. Adjust the sound card model to i.MX based platforms, as done by commit e6303798b6ac4 ("arm64: dts: imx8mp-tqma8mpql-mba8mpxl: change sound card model name"). This allows sharing a default asound.conf in BSP over all the kits. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 98842790e40feda02c9c13a00d5215379fa05c6f Author: Alexander Stein Date: Tue Apr 8 11:30:53 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Add overlay for CDTech DC44 RGB display This adds an overlay for the supported RGB display CDTech DC44. DCU graphics chain is configured accordingly. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 43db162d0cf659034be36bb4c0062c350b77fda8 Author: Alexander Stein Date: Tue Apr 8 11:30:52 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Add overlay for CDTech FC21 RGB display This adds an overlay for the supported RGB display CDTech FC21. DCU graphics chain is configured accordingly. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit fbfd01d7532901c8d9306f352399589e152f2a0d Author: Alexander Stein Date: Tue Apr 8 11:30:51 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Add LVDS overlay for Tianma TM070JVGH33 This adds an overlay for the supported LVDS display tianma tm070jvhg33. The on-board RGB-to-LVDS encoder and DCU graphics chain are configured accordingly. Add power supply as well, which had been missing all the time. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 8511c30d71e3c271283ea806f568036717cd9d4d Author: Alexander Stein Date: Tue Apr 8 11:30:50 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Add HDMI overlay This add an overlay for using the RGB-to-HDMI bridge. Note: As DDC is directly connected to general I2C bus, there might be I2C address conflicts. Hence not all displays might work. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 43d790a0a7c8e6eb0746919b31c331ccd47ffc46 Author: Alexander Stein Date: Tue Apr 8 11:30:49 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Add vcc-supply for spi-nor (Q)SPI NOR flash is supplied by 3.3V. Add the corresponding supply. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit c806347d315d2b02eb99256ac9f132b3a166a4c8 Author: Alexander Stein Date: Tue Apr 8 11:30:48 2025 +0200 ARM: dts: ls1021a-tqmals1021a: Fix license With commit 784bdc6f2697c ("ARM: dts: ls1021a: change to use SPDX identifiers") the SoC .dtsi specifies the license using SPDX tags. Fix license according to the ls1021a.dtsi this platform DT files are based on. Signed-off-by: Alexander Stein Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 185ae70ad680b0a2adf0e923d44c5dbfba09f681 Author: Rob Herring (Arm) Date: Wed Apr 23 17:33:45 2025 +0800 ARM: dts: imx: Drop redundant CPU "clock-latency" The "clock-latency" property is part of the deprecated opp-v1 binding and is redundant if the opp-v2 table has equal or larger values in any "clock-latency-ns". The OPP tables have values of 150000, so it can be removed. Signed-off-by: Rob Herring (Arm) Signed-off-by: Shawn Guo commit 42b2ac9f1bfee9401adabde61e24082dd88b3d3e Author: Rob Herring (Arm) Date: Thu Apr 3 21:59:31 2025 -0500 arm64: dts: imx: Drop redundant CPU "clock-latency" The "clock-latency" property is part of the deprecated opp-v1 binding and is redundant if the opp-v2 table has equal or larger values in any "clock-latency-ns". The OPP tables have values of 150000, so it can be removed. Signed-off-by: Rob Herring (Arm) Signed-off-by: Shawn Guo commit 4332473e7ca8ee6db3c41474eb5a16d5deedffa8 Author: Jouni Högander Date: Mon Apr 14 13:05:08 2025 +0300 drm/i915/display: Rename vblank DC workaround functions and variables We have extended using vblank DC workaround mechanism for Wa_16025596647. Rename related functions and variables: vblank_wa_num_pipes -> vblank_enable_count vblank_dc_work -> vblank_notify_work intel_display_vblank_dc_work -> intel_display_vblank_notify_work Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-14-jouni.hogander@intel.com commit 9df7215f4be96a9b871e9fd7165565f8487c64ea Author: Jouni Högander Date: Mon Apr 14 13:05:07 2025 +0300 drm/i915/display: Rename intel_psr_needs_block_dc_vblank Scope of intel_psr_needs_block_dc_vblank has changed now. Rename it as intel_psr_needs_vblank_notification. Also rename intel_crtc::block_dc_for_vblank as intel_crtc:vblank_psr_notify Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-13-jouni.hogander@intel.com commit 39e4d3c2f89ab88450c5aea0477d5c32a7d5502f Author: Jouni Högander Date: Mon Apr 14 13:05:06 2025 +0300 drm/i915/psr: Apply underrun on PSR idle workaround This patch is applying workaround for underrun on idle PSR HW issue (Wa_16025596647) when PSR is getting enabled. It uses vblank enable/disable status, DC5/6 enabled disabled and enabled pipes count information made available. This patch is also adding calls to dc5/dc6, vblank enable/disable and pipe enable/disable notification functions as needed. intel_psr_needs_block_dc_vblank is modified to get vblank enable/disable notification on PSR capable system. v2: use intel_dmc interface instead of directly writing dmc register Bspec: 74151 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-12-jouni.hogander@intel.com commit 2978eb1841cd635f17e568ad74ffa32f68fcd54d Author: Jouni Högander Date: Mon Apr 14 13:05:05 2025 +0300 drm/i915/dmc: Add interface to control start of PKG C-state exit Add interface to control if package C exit starts at the start of the undelayed vblank. This is needed to implement workaround for underrun on idle PSR HW issue (Wa_16025596647). Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-11-jouni.hogander@intel.com commit 0c427ac78a1d9ef4cff5ec6df94aaa6337086a24 Author: Jouni Högander Date: Mon Apr 14 13:05:04 2025 +0300 drm/i915/psr: Add interface to notify PSR of vblank enable/disable To implement Wa_16025596647 we need to get notification of vblank interrupt enable/disable. Add new interface to PSR code for this notification. Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-10-jouni.hogander@intel.com commit b7effa3238c705135515687c8b055a0ac2c221e0 Author: Jouni Högander Date: Mon Apr 14 13:05:03 2025 +0300 drm/i915/psr: Add mechanism to notify PSR of DC5/6 enable disable We need to apply/remove workaround for underrun on idle PSR HW issue (Wa_16025596647) when DC5/6 is enabled/disabled. This patch implements mechanism to notify PSR about DC5/6 enable/disable and applies/removes the workaround using this notification. Bspec: 74115 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-9-jouni.hogander@intel.com commit f02658c46cf7d17dff0b676fced6156a3c083c91 Author: Jouni Högander Date: Mon Apr 14 13:05:02 2025 +0300 drm/i915/psr: Add mechanism to notify PSR of pipe enable/disable We need to apply/remove workaround for underrun on idle PSR HW issue (Wa_16025596647) when new pipe is enabled or pipe is getting disabled. This patch implements mechanism to notify PSR about pipe enable/disable and applies/removes the workaround using this notification. Bspec: 74151 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-8-jouni.hogander@intel.com commit 0de99007c7dfd247e39e7d5bb63cb8ee2974973c Author: Jouni Högander Date: Mon Apr 14 13:05:01 2025 +0300 drm/i915/psr: Block PKG C-State when enabling PSR Block PKG C-State when enabling PSR when enabling PSR as described in workaround for underrun on idle PSR HW issue (Wa_16025596647). v2: use intel_dmc_block_pkgc instead of directly writing dmc register Bspec: 74151 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-7-jouni.hogander@intel.com commit 973deeada07079fb1590dbdc378a48df8ac8befa Author: Jouni Högander Date: Mon Apr 14 13:05:00 2025 +0300 drm/i915/dmc: Add interface to block PKG C-state Add interface to block PKG C-state. This is needed to implement workaround for underrun on idle PSR HW issue (Wa_16025596647). Bspec: 74151 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-6-jouni.hogander@intel.com commit f991ef47dad714a44d2dfbb5aed312cafc6f3e72 Author: Jouni Högander Date: Mon Apr 14 13:04:59 2025 +0300 drm/i915/dmc: Add PIPEDMC_BLOCK_PKGC_SW definitions We need PIPEDMC_BLOCK_PKGC_SW definitions to implement workaround for underrun on idle PSR HW issue (Wa_16025596647). Add PIPEDMC_BLOCK_PKGC_SW register definitions. Bspec: 71265 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-5-jouni.hogander@intel.com commit b23c157d46d1f1c7c96dde83dedb6e1f298fff26 Author: Jouni Högander Date: Mon Apr 14 13:04:58 2025 +0300 drm/i915/dmc: Add PIPEDMC_EVT_CTL register definition To implement workaround for underrun on idle PSR HW issue (Wa_16025596647) we need PIPEDMC_EVT_CTL_4 register. Add PIPEDMC_EVT_CTL_4 register definitions. Bspec: 67576 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-4-jouni.hogander@intel.com commit a99b050ca7f48505d7f59de4b2be46cbd2b6c048 Author: Jouni Högander Date: Mon Apr 14 13:04:57 2025 +0300 drm/i915/psr: Store enabled non-psr pipes into intel_crtc_state To implement workaround for underrun on idle PSR HW issue (Wa_16025596647) we need to know enabled. Figure out which non-PSR pipes we will have active and store it into intel_crtc_state->active_non_psr_pipes. This is currently assuming only one eDP on a time. I.e. possible secondary eDP with PSR capable panel is not considered. Bspec: 74151 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-3-jouni.hogander@intel.com commit 208b22a86f3ad5fcc0bc8691f74b3dd7597d7bbb Author: Jouni Högander Date: Mon Apr 14 13:04:56 2025 +0300 drm/i915/display: Add new interface for getting dc_state To implement workaround for underrun on idle PSR HW issue (Wa_16025596647) we need to have current configured DC state available. Add new interface for this purpose. Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://lore.kernel.org/r/20250414100508.1208774-2-jouni.hogander@intel.com commit 278114ccfdd51a83282d9a574c8a3b01b32e185b Author: Frank Li Date: Thu Apr 17 11:21:57 2025 -0400 dt-bindings: pinctrl: convert fsl,imx7ulp-pinctrl.txt to yaml format Convert fsl,imx7ulp-pinctrl.txt to yaml format. Additional changes: - remove label in example - fsl,pin direct use hex value instead of macro because macro define in dts local directory. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250417152158.3570936-1-Frank.Li@nxp.com Signed-off-by: Linus Walleij commit 1d1e564fce1bc361af1a1980a7f915a0475a008a Author: Lad Prabhakar Date: Fri Apr 11 19:05:45 2025 +0200 media: rzg2l-cru: Add support for RZ/G3E SoC The CRU block on the Renesas RZ/G3E SoC is similar to the one found on the Renesas RZ/G2L SoC, with the following differences: - Additional registers rzg3e_cru_regs. - A different irq handler rzg3e_cru_irq. - A different rzg3e_cru_csi2_setup. - A different max input width. - Additional stride register. Introduce rzg3e_cru_info struct to handle differences between RZ/G2L and RZ/G3E and related RZ/G3E functions: - rzg3e_cru_enable_interrupts() - rzg3e_cru_enable_interrupts() - rz3e_fifo_empty() - rzg3e_cru_csi2_setup() - rzg3e_cru_get_current_slot() Add then support for the RZ/G3E SoC CRU block with the new compatible string "renesas,r9a09g047-cru". Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-18-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 3c3433c5b3a0c34dd36d770e2950ad3377d97372 Author: Lad Prabhakar Date: Fri Apr 11 19:05:44 2025 +0200 media: rzg2l-cru: Add function pointer to configure CSI Add a `csi_setup` function pointer to the `rzg2l_cru_info` structure and pass it as part of the OF data. On RZ/G3E and RZ/V2H(P) SoCs, additional register configurations are required compared to the RZ/G2L SoC. Modify `rzg2l_cru_csi2_setup()` to be referenced through this function pointer and update the code to use it accordingly. This change is in preparation for adding support for RZ/G3E and RZ/V2H(P) SoCs. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-17-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 446c645f7fe480a4420072728faa1f261530b984 Author: Lad Prabhakar Date: Fri Apr 11 19:05:43 2025 +0200 media: rzg2l-cru: Add function pointer to check if FIFO is empty Add a `fifo_empty` function pointer to the `rzg2l_cru_info` structure and pass it as part of the OF data. On RZ/G3E and RZ/V2H(P) SoCs, checking if the FIFO is empty requires a different register configuration. Implement `rzg2l_fifo_empty()` and update the code to use it from the function pointer. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-16-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 2d9e3eb740b7d256d0ee53a6a242f0ffc60b0c9b Author: Lad Prabhakar Date: Fri Apr 11 19:05:42 2025 +0200 media: rzg2l-cru: Add IRQ handler to OF data Add `irq_handler` to the `rzg2l_cru_info` structure and pass it as part of the OF data. This prepares for supporting RZ/G3E and RZ/V2H(P) SoCs, which require a different IRQ handler. Update the IRQ request code to use the handler from the OF data. Add `enable_interrupts` and `disable_interrupts` function pointers to the `rzg2l_cru_info` structure and pass them as part of the OF data. This prepares for supporting RZ/G3E and RZ/V2H(P) SoCs, which require different interrupt configurations. Implement `rzg2l_cru_enable_interrupts()` and `rzg2l_cru_disable_interrupts()` functions and update the code to use them instead of directly writing to interrupt registers. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-15-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 48ce5920da1d65f22b4808564f6f5c9c4ff9d976 Author: Lad Prabhakar Date: Fri Apr 11 19:05:41 2025 +0200 media: rzg2l-cru: Add image_conv offset to OF data Add `image_conv` field to the `rzg2l_cru_info` structure to store the register offset for image conversion control. RZ/G2L uses `ICnMC`, while RZ/G3E and RZ/V2H(P) use `ICnIPMC_C0`. Update `rzg2l_cru_initialize_image_conv()` and `rzg2l_cru_csi2_setup()` to use this `image_conv` offset from the OF data, facilitating future support for RZ/G3E and RZ/V2H(P) SoCs. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-14-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 5f5ed645b31b3e0bbd1a1597cdb41c467f3c7776 Author: Lad Prabhakar Date: Fri Apr 11 19:05:40 2025 +0200 media: rzg2l-cru: Pass resolution limits via OF data Pass `max_width` and `max_height` as part of the OF data to facilitate the addition of support for RZ/G3E and RZ/V2H(P) SoCs. These SoCs have a maximum resolution of 4096x4096 as compared to 2800x4095 on RZ/G2L SoC. This change prepares the driver for easier integration of these SoCs by defining the resolution limits in the `rzg2l_cru_info` structure. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-13-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit d9063dc50255db21b5a5e6ceada1e3a8927e44a1 Author: Lad Prabhakar Date: Fri Apr 11 19:05:39 2025 +0200 media: rzg2l-cru: Add register mapping support Prepare for adding support for RZ/G3E and RZ/V2HP SoCs, which have a CRU-IP that is mostly identical to RZ/G2L but with different register offsets and additional registers. Introduce a flexible register mapping mechanism to handle these variations. Define the `rzg2l_cru_info` structure to store register mappings and pass it as part of the OF match data. Update the read/write functions to check out-of-bound accesses and use indexed register offsets from `rzg2l_cru_info`, ensuring compatibility across different SoC variants. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-12-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 995cfd09ff8f60f57b3e3d49c809921b59993bae Author: Lad Prabhakar Date: Fri Apr 11 19:05:38 2025 +0200 media: rzg2l-cru: csi2: Add support for RZ/V2H(P) SoC The D-PHY on the RZ/V2H(P) SoC is different from the D-PHY on the RZ/G2L SoC. To handle this difference, function pointers for D-PHY enable/disable have been added, and the `struct rzg2l_csi2_info` pointer is passed as OF data. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-11-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit ed472263fcc48f72e32cb494061bf8b8c333891a Author: Tommaso Merciai Date: Fri Apr 11 19:05:37 2025 +0200 media: rzg2l-cru: csi2: Skip system clock for RZ/V2H(P) SoC The RZ/V2H(P) SoC does not require a `system` clock for the CSI-2 interface. To accommodate this, introduce a `has_system_clk` bool flag in the `rzg2l_csi2_info` structure and update the rzg2l_csi2_probe() to conditionally request the clock only when needed. This patch is in preparation for adding support for RZ/V2H(P) SoC. Reviewed-by: Laurent Pinchart Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-10-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 15cef2dc7d688d5fc4919aa3c5c272931a8cd087 Author: Lad Prabhakar Date: Fri Apr 11 19:05:36 2025 +0200 media: rzg2l-cru: csi2: Introduce SoC-specific D-PHY handling In preparation for adding support for the RZ/V2H(P) SoC, where the D-PHY differs from the existing RZ/G2L implementation, introduce a new rzg2l_csi2_info structure. This structure provides function pointers for SoC-specific D-PHY enable and disable operations. Modify rzg2l_csi2_dphy_setting() to use these function pointers instead of calling rzg2l_csi2_dphy_enable() and rzg2l_csi2_dphy_disable() directly. Update the device match table to store the appropriate function pointers for each compatible SoC. This change prepares the driver for future extensions without affecting the current functionality for RZ/G2L. Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-9-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 2fc8cfe06e7628de825d53128fd38b3f0e19c989 Author: Tommaso Merciai Date: Fri Apr 11 19:05:35 2025 +0200 media: rzg2l-cru: rzg2l-core: Use devm_pm_runtime_enable() Use newly added devm_pm_runtime_enable() into rzg2l_cru_probe() and drop unnecessary pm_runtime_disable() from rzg2l_cru_probe() and rzg2l_csi2_remove(). Reviewed-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Biju Das Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-8-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit aed5bbaec5346147b8580878a32809fdb1bf46c8 Author: Lad Prabhakar Date: Fri Apr 11 19:05:34 2025 +0200 media: rzg2l-cru: rzg2l-core: Use local variable for struct device in rzg2l_cru_probe() Use a local variable for the struct device pointers. This increases code readability with shortened lines. Reviewed-by: Laurent Pinchart Reviewed-by: Biju Das Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-7-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 198be9e98bda5b18d203134c293597e6add9f5c6 Author: Tommaso Merciai Date: Fri Apr 11 19:05:33 2025 +0200 media: rzg2l-cru: csi2: Use devm_pm_runtime_enable() Use newly added devm_pm_runtime_enable() into rzg2l_csi2_probe() and drop error path accordingly. Drop also unnecessary pm_runtime_disable() from rzg2l_csi2_remove(). Reviewed-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Biju Das Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-6-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 7c537ccfe8982b186a6becc646872cde6061c8a6 Author: Lad Prabhakar Date: Fri Apr 11 19:05:32 2025 +0200 media: rzg2l-cru: csi2: Use local variable for struct device in rzg2l_csi2_probe() Use a local variable for the struct device pointers. This increases code readability with shortened lines. Reviewed-by: Laurent Pinchart Reviewed-by: Biju Das Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-5-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit d71be5add2f3fd4e11c11a21855df17c48088fc2 Author: Tommaso Merciai Date: Fri Apr 11 19:05:31 2025 +0200 media: dt-bindings: renesas,rzg2l-cru: Document Renesas RZ/G3E SoC The CRU block found on the Renesas RZ/G3E ("R9A09G047") SoC has five interrupts: - image_conv: image_conv irq - axi_mst_err: AXI master error level irq - vd_addr_wend: Video data AXI master addr 0 write end irq - sd_addr_wend: Statistics data AXI master addr 0 write end irq - vsd_addr_wend: Video statistics data AXI master addr 0 write end irq This IP has only one input port 'port@1' similar to the RZ/G2UL CRU. Document the CRU block found on the Renesas RZ/G3E ("R9A09G047") SoC. Reviewed-by: Rob Herring (Arm) Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-4-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit f1c83d2f2841e99f884104e912aa20fcc32b9c2d Author: Tommaso Merciai Date: Fri Apr 11 19:05:30 2025 +0200 media: dt-bindings: renesas,rzg2l-csi2: Document Renesas RZ/G3E CSI-2 block Document the CSI-2 block which is part of CRU found in Renesas RZ/G3E SoC. The CSI-2 block on the RZ/G3E SoC is identical to one found on the RZ/V2H(P) SoC. Acked-by: Rob Herring (Arm) Reviewed-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-3-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 52e39050616aa7e72ea0f6330501368d5f6925e1 Author: Lad Prabhakar Date: Fri Apr 11 19:05:29 2025 +0200 media: dt-bindings: renesas,rzg2l-csi2: Document Renesas RZ/V2H(P) SoC The MIPI CSI-2 block on the Renesas RZ/V2H(P) SoC is similar to the one found on the Renesas RZ/G2L SoC, with the following differences: - A different D-PHY - Additional registers for the MIPI CSI-2 link - Only two clocks Add a new compatible string, `renesas,r9a09g057-csi2`, for the RZ/V2H(P) SoC. Reviewed-by: Rob Herring (Arm) Reviewed-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Signed-off-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250411170624.472257-2-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit e7376745ad5c8548e31d9ea58adfb5a847e017a4 Author: Niklas Söderlund Date: Wed Apr 2 20:33:02 2025 +0200 media: rcar-vin: Fix stride setting for RAW8 formats Earlier versions of the datasheet where unclear about the stride setting for RAW8 capture formats. Later datasheets clarifies that the stride only process in this mode for non-image data. For image data the full stride shall be used. Compare section "RAW: 8 Bits and Embedded 8-Bit Non-Image Data, User Defined 8-bit Data" vs "RAW: 8 Bits". Remove the special case from pixel formats that carry image data and treat it as any other image format. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250402183302.140055-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 079afc0b7241e383cf61e5ede906104d85f7a6cb Author: Lad Prabhakar Date: Tue Apr 8 20:31:58 2025 +0100 media: dt-bindings: media: renesas,fcp: Document RZ/V2H(P) SoC The FCPVD block on the RZ/V2H(P) SoC is identical to the one found on the RZ/G2L SoC. No driver changes are required, as `renesas,fcpv` will be used as a fallback compatible string on the RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250408193158.80936-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit f6e9968aeb200aa6d399ac73338174b394677049 Author: Lad Prabhakar Date: Tue Apr 8 20:31:57 2025 +0100 media: dt-bindings: media: renesas,vsp1: Document RZ/V2H(P) The VSPD block on the RZ/V2H(P) SoC is identical to the one found on the RZ/G2L SoC. No driver changes are required, as `renesas,r9a07g044-vsp2` will be used as a fallback compatible string on the RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250408193158.80936-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit c197f323ed64ccd902832ddee907b2eb157f39dd Author: Frank Li Date: Wed Mar 26 17:52:14 2025 -0400 arm64: dts: imx8qm-mek: consolidate reserved-memory Move dsp_vdev* to under existed reserved-memory node to consolidate all reserved-memory together. Signed-off-by: Frank Li Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit bd91eae5dcad739a6748debe5e194d1d3f9e2a96 Author: Hao Chang Date: Fri Apr 11 16:41:57 2025 +0800 pinctrl: mediatek: pinctrl: mediatek: add mt8196 eint pin Add eint pin support for MediaTek mt8196 SoC. Signed-off-by: Hao Chang Signed-off-by: Qingliang Li Acked-by: Cathy Xu (许华婷) Link: https://lore.kernel.org/20250411084159.3307-1-ot_chhao.chang@mediatek.com Signed-off-by: Linus Walleij commit 5a740280dec8b69f49829aab3fc28e05437f3101 Author: Yixun Lan Date: Wed Apr 16 08:15:28 2025 +0800 pinctrl: spacemit: add clock support for K1 SoC For SpacemiT K1 SoC's pinctrl, explicitly acquiring clocks in the driver instead of relying on bootloader or default hardware settings to enable it. Signed-off-by: Yixun Lan Reviewed-by: Alex Elder Link: https://lore.kernel.org/20250416-02-k1-pinctrl-clk-v2-2-2b5fcbd4183c@gentoo.org Signed-off-by: Linus Walleij commit c6650433eaa9331b8b9e44a6ae19ad2e4dae5ba8 Author: Yixun Lan Date: Wed Apr 16 08:15:27 2025 +0800 dt-bindings: pinctrl: spacemit: add clock and reset property SpacemiT K1 SoC's pinctrl controller requires two clocks in order to work properly, also has one reset line from hardware perspective. Signed-off-by: Yixun Lan Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250416-02-k1-pinctrl-clk-v2-1-2b5fcbd4183c@gentoo.org Signed-off-by: Linus Walleij commit a3707f53eb3f4f3e7a30d720be0885f813d649bb Author: Adrián Larumbe Date: Wed Apr 23 03:12:34 2025 +0100 drm/panthor: show device-wide list of DRM GEM objects over DebugFS Add a device DebugFS file that displays a complete list of all the DRM GEM objects that are exposed to UM through a DRM handle. Since leaking object identifiers that might belong to a different NS is inadmissible, this functionality is only made available in debug builds with DEBUGFS support enabled. File format is that of a table, with each entry displaying a variety of fields with information about each GEM object. Each GEM object entry in the file displays the following information fields: Client PID, BO's global name, reference count, BO virtual size, BO resize size, VM address in its DRM-managed range, BO label and a GEM state flags. There's also a usage flags field for the type of BO, which tells us whether it's a kernel BO and/or mapped onto the FW's address space. GEM state and usage flag meanings are printed in the file prelude, so that UM parsing tools can interpret the numerical values in the table. Signed-off-by: Adrián Larumbe Reviewed-by: Liviu Dudau Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250423021238.1639175-5-adrian.larumbe@collabora.com Signed-off-by: Boris Brezillon commit 0489149fd6711a8a020a8500029d4ee971c541ba Author: Adrián Larumbe Date: Wed Apr 23 03:12:33 2025 +0100 drm/panthor: Label all kernel BO's Kernel BO's aren't exposed to UM, so labelling them is the responsibility of the driver itself. This kind of tagging will prove useful in further commits when want to expose these objects through DebugFS. Expand panthor_kernel_bo_create() interface to take a NUL-terminated string. No bounds checking is done because all label strings are given as statically-allocated literals, but if a more complex kernel BO naming scheme with explicit memory allocation and formatting was desired in the future, this would have to change. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250423021238.1639175-4-adrian.larumbe@collabora.com Signed-off-by: Boris Brezillon commit a572dc467de241706ab92d61b3b3a0bca93450c8 Author: Adrián Larumbe Date: Wed Apr 23 03:12:32 2025 +0100 drm/panthor: Add driver IOCTL for setting BO labels Allow UM to label a BO for which it possesses a DRM handle. Signed-off-by: Adrián Larumbe Reviewed-by: Liviu Dudau Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250423021238.1639175-3-adrian.larumbe@collabora.com Signed-off-by: Boris Brezillon commit db49d7f1ccdb1599154af263ef55ac282bccb6a4 Author: Adrián Larumbe Date: Wed Apr 23 03:12:31 2025 +0100 drm/panthor: Introduce BO labeling Add a new character string Panthor BO field, and a function that allows setting it from within the driver. Driver takes care of freeing the string when it's replaced or no longer needed at object destruction time, but allocating it is the responsibility of callers. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250423021238.1639175-2-adrian.larumbe@collabora.com Signed-off-by: Boris Brezillon commit 7e3f4a352337f1ce09c1795b58be23dfab29e610 Author: Matthew Auld Date: Wed Apr 16 16:09:17 2025 +0100 drm/xe: handle pinned memory in PM notifier Userspace is still alive and kicking at this point so actually moving pinned stuff here is tricky. However, we can instead pre-allocate the backup storage upfront from the notifier, such that we scoop up as much as we can, and then leave the final .suspend() to do the actual copy (or allocate anything that we missed). That way the bulk of our allocations will hopefully be done outside the more restrictive .suspend(). We do need to be extra careful though, since the pinned handling can now race with PM notifier, like something becoming unpinned after we prepare it from the notifier. v2 (Thomas): - Fix kernel doc and drop the pin as soon as we are done with the restore, instead of deferring to later. Suggested-by: Thomas Hellström Signed-off-by: Matthew Auld Reviewed-by: Thomas Hellström Link: https://lore.kernel.org/r/20250416150913.434369-8-matthew.auld@intel.com commit e28647b677789b51b2de3e7934bb86dbd8e67fdf Author: Matthew Auld Date: Wed Apr 16 16:09:16 2025 +0100 drm/xe: share bo dma-resv with backup object We end up needing to grab both locks together anyway and keep them held until we complete the copy or add the fence. Plus the backup_obj is short lived and tied to the parent object, so seems reasonable to share the same dma-resv. This will simplify the locking here, and in follow up patches. v2: - Hold reference to the parent bo to be sure the shared dma-resv can't go out of scope too soon. (Thomas) Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström Link: https://lore.kernel.org/r/20250416150913.434369-7-matthew.auld@intel.com commit c6a4d46ec1d714b8055d1f4121197f15a4a02c68 Author: Matthew Auld Date: Wed Apr 16 16:09:15 2025 +0100 drm/xe: evict user memory in PM notifier In the case of VRAM we might need to allocate large amounts of GFP_KERNEL memory on suspend, however doing that directly in the driver .suspend()/.prepare() callback is not advisable (no swap for example). To improve on this we can instead hook up to the PM notifier framework which is invoked at an earlier stage. We effectively call the evict routine twice, where the notifier will have hopefully have cleared out most if not everything by the time we call it a second time when entering the .suspend() callback. For s4 we also get the added benefit of allocating the system pages before the hibernation image size is calculated, which looks more sensible. Note that the .suspend() hook is still responsible for dealing with all the pinned memory. Improving that is left to another patch. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1181 Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4288 Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4566 Suggested-by: Thomas Hellström Signed-off-by: Matthew Auld Reviewed-by: Thomas Hellström Link: https://lore.kernel.org/r/20250416150913.434369-6-matthew.auld@intel.com commit 5342f018e9e2fc164a30bf2f5ca9d59eb9b60bfb Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:39:44 2025 +0200 pmdomain: mediatek: Add support for Dimensity 1200 MT6893 Add power domains definitions to implement support for the MediaTek Dimensity 1200 (MT6893) SoC. Since this chip's MTCMOS are similar to the ones of Kompanio 820 (MT8192), the definitions from that have been reused where possible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20250410143944.475773-4-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 92d25c5742a5e922856786ca228ed52a7da60dca Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:39:43 2025 +0200 pmdomain: mediatek: Bump maximum bus protect data array elements In preparation for adding support for the MediaTek Dimensity 1200 MT6893 SoC, bump the maximum elements of the bp_cfg array to 7. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20250410143944.475773-3-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit c699414d874a35ce6fa08f060ce4ae89d88694f5 Merge: 99012014c902cd b5c48210341129 Author: Ulf Hansson Date: Wed Apr 23 10:25:25 2025 +0200 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.16. Signed-off-by: Ulf Hansson commit b5c48210341129db7158703c00e4d2155f4cf0f3 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:39:42 2025 +0200 dt-bindings: power: mediatek: Support Dimensity 1200 MT6893 MTCMOS Add support for the Power Domains (MTCMOS) integrated into the MediaTek Dimensity 1200 (MT6893) SoC. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250410143944.475773-2-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson commit 99012014c902cd9ad85fd288d8a107f33a69855e Author: Ulf Hansson Date: Wed Apr 2 14:06:13 2025 +0200 pmdomain: core: Reset genpd->states to avoid freeing invalid data If genpd_alloc_data() allocates data for the default power-states for the genpd, let's make sure to also reset the pointer in the error path. This makes sure a genpd provider driver doesn't end up trying to free the data again, but using an invalid pointer. Signed-off-by: Ulf Hansson Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20250402120613.1116711-1-ulf.hansson@linaro.org commit 0a8a888167ddaaec7a292e5045782b8a240e6f3e Author: Ulf Hansson Date: Fri Mar 14 11:00:58 2025 +0100 pmdomain: core: Add residency reflection for domain-idlestates to debugfs For regular cpuidle states we are reflecting over the selected/entered state to see if the sleep-duration meets the residency for the state. The output from the reflection is an "above" value to indicate the number of times the state was too deep and a "below" value for the number of times it was too shallow. Let's implement the similar thing for genpd's domain-idlestates along with genpd's governor and put the information in the genpd's debugfs. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250314100103.1294715-5-ulf.hansson@linaro.org commit d0252ba821a3076615b34c1107854f8ff31ecd2e Author: Ulf Hansson Date: Fri Mar 14 11:00:57 2025 +0100 cpuidle: psci: Correct the domain-idlestate statistics in debugfs When trying to enter a domain-idlestate, we may occasionally fail to enter the state, which is informed to us by psci_cpu_suspend_enter() returning an error-code. In these cases, our corresponding genpd->power_off() callback has already returned zero to indicate success, leading to getting in-correct domain-idlestate statistics in debugfs for the genpd in question. Let's fix this by making use of the new pm_genpd_inc_rejected() helper, as it allows us to correct the domain-idlestate statistics for this type of scenario. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250314100103.1294715-4-ulf.hansson@linaro.org commit 3290e9f98a2d3c43c0c9b89a73affa3aaebe62a3 Author: Ulf Hansson Date: Fri Mar 14 11:00:56 2025 +0100 cpuidle: psci: Move the per CPU variable domain_state to a struct To prepare to extend the per CPU variable domain_state to include more data, let's move it into a struct. A subsequent change will add the new data. This change have no intended functional impact. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250314100103.1294715-3-ulf.hansson@linaro.org commit 9861f21ff16b6cd919144dae7ff355d5145a3474 Author: Ulf Hansson Date: Fri Mar 14 11:00:55 2025 +0100 pmdomain: core: Add genpd helper to correct the usage/rejected counters In the cpuidle-psci-domain case the ->power_off() callback is usually returning zero to indicate success. This is because the actual call to the PSCI FW to enter the selected domain-idlestate, needs to be done after the ->power_off() callback has returned. When the call to the PSCI FW fails, this leads to receiving an incorrect tracking of the usage/rejected counts for the selected domain-idlestate. In other words, the presented debug-statistics for genpd may look better than what the actually are. To allow a better correctness of the data, let's add a new genpd helper function, which enables the caller adjust the usage/rejected counters for a domain-idlestate, in cases of errors during power-off. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250314100103.1294715-2-ulf.hansson@linaro.org commit 63dc06cd12f980e304158888485a26ae2be7f371 Author: Herbert Xu Date: Fri Apr 18 11:01:13 2025 +0800 crypto: padlock-sha - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 9420e628e7d8d0d41c45ceed8aac84c5e2e1f5c1 Author: Herbert Xu Date: Fri Apr 18 11:01:11 2025 +0800 crypto: nx - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Signed-off-by: Herbert Xu commit ef17008481a17bbf89229982fd2d32aa48e27f35 Author: Herbert Xu Date: Fri Apr 18 11:01:09 2025 +0800 crypto: arm64/sm4 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 4dc3c40c4daea76c28d1a8a1de727410bd765431 Author: Herbert Xu Date: Fri Apr 18 11:01:06 2025 +0800 crypto: arm64/aes - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 566ec9adfef56dcb23e9cd94a5046bae4c3694ab Author: Herbert Xu Date: Fri Apr 18 11:01:04 2025 +0800 crypto: xcbc - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit f4bb31367e1019f088f6c5665460e53f907a7e92 Author: Herbert Xu Date: Fri Apr 18 11:01:02 2025 +0800 crypto: cmac - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit ca5d7d5f7aeb2f8d3edb5d3ee9ed3344ca3b1c12 Author: Herbert Xu Date: Fri Apr 18 11:00:59 2025 +0800 crypto: cbcmac - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 9939049085bb80205b5e7e5b2b1d594f2731917f Author: Herbert Xu Date: Fri Apr 18 11:00:57 2025 +0800 crypto: lib/sm3 - Remove partial block helpers Now that all sm3_base users have been converted to use the API partial block handling, remove the partial block helpers as well as the lib/crypto functions. Signed-off-by: Herbert Xu commit 68932c6be344bce60fe6672c50358340ac8dcea6 Author: Herbert Xu Date: Fri Apr 18 11:00:55 2025 +0800 crypto: x86/sm3 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 1523eaed0ac5e8dda3751d6a4bf4071ed23af8bc Author: Herbert Xu Date: Fri Apr 18 11:00:52 2025 +0800 crypto: riscv/sm3 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 045f17b444b270eb627142008ab26ec6ede61a95 Author: Herbert Xu Date: Fri Apr 18 11:00:50 2025 +0800 crypto: arm64/sm3-neon - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 6ba8c5f5a4fdd78c7b8ee591be7a6c7a1fb7f446 Author: Herbert Xu Date: Fri Apr 18 11:00:48 2025 +0800 crypto: arm64/sm3-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 8266393e9ba0bee395bc256ba56427ec5493e2d1 Author: Herbert Xu Date: Fri Apr 18 11:00:45 2025 +0800 crypto: sm3-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit f9fbc8bff1e19dc88ceeb24b39fd78631e5ead13 Author: Herbert Xu Date: Fri Apr 18 11:00:43 2025 +0800 crypto: sha512_base - Remove partial block helpers Now that all sha256_base users have been converted to use the API partial block handling, remove the partial block helpers. Signed-off-by: Herbert Xu commit d8573b2cf7e2a3c22f6683add9eb239e3bd048ea Author: Herbert Xu Date: Fri Apr 18 11:00:41 2025 +0800 crypto: sparc/sha512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 572b5c4682c77be19699ab38a2c477ec2b5a7226 Author: Herbert Xu Date: Fri Apr 18 11:00:38 2025 +0800 crypto: s390/sha512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 2d0d18d801b6efbd034725338ed1b08ad5c74e40 Author: Herbert Xu Date: Fri Apr 18 11:00:36 2025 +0800 crypto: arm/sha512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit f294a6d9e904e99c7c4602fb31e79a9a75071b6a Author: Herbert Xu Date: Fri Apr 18 11:00:34 2025 +0800 crypto: arm64/sha512-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 10e6f26ec6af2521954d57d50f6deb376713b3b1 Author: Herbert Xu Date: Fri Apr 18 11:00:31 2025 +0800 crypto: arm/sha512-asm - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 022bd7c9569dbfbfab4c3a58b7d655472c189cb8 Author: Herbert Xu Date: Fri Apr 18 11:00:29 2025 +0800 crypto: arm/sha512-neon - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 216623af53062943ee4ef76a0b597ea6030ffd42 Author: Herbert Xu Date: Fri Apr 18 11:00:27 2025 +0800 crypto: sha512-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 561aab1104d80083886beaaeee39fa6482d6f157 Author: Herbert Xu Date: Fri Apr 18 11:00:25 2025 +0800 crypto: riscv/sha512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 0b4aa3d10f7dbe398e4d5050f3ccb7d0ca438913 Author: Herbert Xu Date: Fri Apr 18 11:00:22 2025 +0800 crypto: mips/octeon-sha512 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit ff3cb9de53baa3da7df0e08798a5638436d8aabc Author: Herbert Xu Date: Fri Apr 18 11:00:20 2025 +0800 crypto: x86/sha512 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 201e9ec3b621c9542441eb7bd34facbc1749b975 Author: Herbert Xu Date: Fri Apr 18 11:00:18 2025 +0800 crypto: zynqmp-sha - Use API partial block handling Use the Crypto API partial block handling. As this was the last user of the extra fields in struct sha3_state, remove them. Signed-off-by: Herbert Xu commit 0d474be2676d9262afd0cf6a416e96b9277139a7 Author: Herbert Xu Date: Fri Apr 18 11:00:15 2025 +0800 crypto: sha3-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 6f90ba7065515d69b24729cf85c45b2add99e638 Author: Herbert Xu Date: Fri Apr 18 11:00:13 2025 +0800 crypto: s390/sha3 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit b333c273ab43b96ca25469770d3319ec7ababd5a Author: Herbert Xu Date: Fri Apr 18 11:00:11 2025 +0800 crypto: arm64/sha3-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 8ba81fef400bf5dec895bc259d65c91bfece798a Author: Herbert Xu Date: Fri Apr 18 11:00:08 2025 +0800 crypto: sha256_base - Remove partial block helpers Now that all sha256_base users have been converted to use the API partial block handling, remove the partial block helpers. Signed-off-by: Herbert Xu commit 4dc9479742d06cfa974a603f6a320157284c3dd4 Author: Herbert Xu Date: Fri Apr 18 11:00:06 2025 +0800 crypto: sparc/sha256 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 1340113bdb827a00ba031d04a2510e23175a42b2 Author: Herbert Xu Date: Fri Apr 18 11:00:04 2025 +0800 crypto: s390/sha256 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 9cd9c99be1211b2b40cd8708e3aeae8afcedd371 Author: Herbert Xu Date: Fri Apr 18 11:00:01 2025 +0800 crypto: powerpc/sha256-spe - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit a417f16f885d753115bc6a3735b1d8afa5f3b7c6 Author: Herbert Xu Date: Fri Apr 18 10:59:59 2025 +0800 crypto: arm64/sha256 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit be32039547e4b367afe1a2738ded32b3ff390f3a Author: Herbert Xu Date: Fri Apr 18 10:59:57 2025 +0800 crypto: arm64/sha256-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 5cd5d39e7b0e77497ef3872518ecde32c94eec2c Author: Herbert Xu Date: Fri Apr 18 10:59:55 2025 +0800 crypto: arm/sha256-asm - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 83498139b63f8312e1be480a10111dec87d1e450 Author: Herbert Xu Date: Fri Apr 18 10:59:52 2025 +0800 crypto: arm/sha256-neon - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit e2d0c746700e3a1eec4db34054a3e65ec6c55ce0 Author: Herbert Xu Date: Fri Apr 18 10:59:50 2025 +0800 crypto: arm/sha256-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 9adeea13ed7f5218028cdc5b11df53e69c39a60f Author: Herbert Xu Date: Fri Apr 18 10:59:48 2025 +0800 crypto: sha256-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit e6c5597badf2998980639fb83e60696d0f2ce0dd Author: Herbert Xu Date: Fri Apr 18 10:59:45 2025 +0800 crypto: riscv/sha256 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 5f804244d0ba8bf07c7eb6caeb63bd38a2bc910e Author: Herbert Xu Date: Fri Apr 18 10:59:43 2025 +0800 crypto: mips/octeon-sha256 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit eba187a6e7141a1166a68c4d27b4ee5a27670b3b Author: Herbert Xu Date: Fri Apr 18 10:59:41 2025 +0800 crypto: x86/sha256 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 121c335b36e02d6aefb72501186e060474fdf33c Author: Ard Biesheuvel Date: Tue Apr 22 23:05:11 2025 +0200 x86/boot: Disable jump tables in PIC code objtool already struggles to identify jump tables correctly in non-PIC code, where the idiom is something like jmpq *table(,%idx,8) and the table is a list of absolute addresses of jump targets. When using -fPIC, both the table reference as well as the jump targets are emitted in a RIP-relative manner, resulting in something like leaq table(%rip), %tbl movslq (%tbl,%idx,4), %offset addq %offset, %tbl jmpq *%tbl and the table is a list of offsets of the jump targets relative to the start of the entire table. Considering that this sequence of instructions can be interleaved with other instructions that have nothing to do with the jump table in question, it is extremely difficult to infer the control flow by deriving the jump targets from the indirect jump, the location of the table and the relative offsets it contains. So let's not bother and disable jump tables for code built with -fPIC under arch/x86/boot/startup. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250422210510.600354-2-ardb+git@google.com commit 4e639f11d6e06d9b33d29e0ae2c57b993b44ee48 Author: Hector Martin Date: Tue Apr 1 10:17:13 2025 +0100 PCI: apple: Add T602x PCIe support This version of the hardware moved around a bunch of registers, so we avoid the old compatible for these and introduce register offset structures to handle the differences. Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-14-maz@kernel.org commit 3f1ccd6e85d7b57460efb71e73da91fbea48d98a Author: Hector Martin Date: Tue Apr 1 10:17:12 2025 +0100 PCI: apple: Abstract register offsets via a SoC-specific structure Newer versions of the Apple PCIe block have a bunch of small, but annoying differences. In order to embrace this diversity of implementations, move the currently hardcoded offsets into a hw_info structure. Future SoCs will provide their own structure describing the applicable offsets. Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig [maz: split from original patch to only address T8103] Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-13-maz@kernel.org commit 7334364f9de79a9a236dd0243ba574b8d2876e89 Author: Hector Martin Date: Tue Apr 1 10:17:11 2025 +0100 PCI: apple: Use gpiod_set_value_cansleep in probe flow We're allowed to sleep here, so tell the GPIO core by using gpiod_set_value_cansleep instead of gpiod_set_value. Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up") Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-12-maz@kernel.org commit de9637c9f7827e0a2420bf1578758614530ac964 Author: Hector Martin Date: Tue Apr 1 10:17:10 2025 +0100 PCI: apple: Drop poll for CORE_RC_PHYIF_STAT_REFCLK This is checking a core refclk in per-port setup which doesn't make a lot of sense, and the bootloader needs to have gone through this anyway. It doesn't work on T602x, so just drop it across the board. Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-11-maz@kernel.org commit 80b31fbbcac4e4799fde34992b07d4f0692cfbb8 Author: Hector Martin Date: Tue Apr 1 10:17:09 2025 +0100 PCI: apple: Move port PHY registers to their own reg items T602x PCIe cores move these registers around. Instead of hardcoding in another offset, let's move them into their own reg entries. This matches what Apple does on macOS device trees too. Maintains backwards compatibility with old DTs by using the old offsets. Note that we open code devm_platform_ioremap_resource_byname() to avoid error messages on older platforms with missing resources in the pcie node. ("pcie-apple 590000000.pcie: invalid resource (null)" on probe) Co-developed-by: Janne Grunau Signed-off-by: Janne Grunau Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-10-maz@kernel.org commit 7fa9fbf39116b061f8a41cd84f1884c545f322c4 Author: Hector Martin Date: Tue Apr 1 10:17:08 2025 +0100 PCI: apple: Fix missing OF node reference in apple_pcie_setup_port In the success path, we hang onto a reference to the node, so make sure to grab one. The caller iterator puts our borrowed reference when we return. Signed-off-by: Hector Martin Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-9-maz@kernel.org commit 0411c90eee6fc97b30d3f5767e9cb82d4594faa1 Author: Marc Zyngier Date: Tue Apr 1 10:17:07 2025 +0100 PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts T602x seems to have dropped the rather useful SET/CLR accessors to the masking register. Instead, let's use the mask register directly, and wrap it with a brand new spinlock. No, this isn't moving in the right direction. Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-8-maz@kernel.org commit ed982862ce980c578c8c80917a69c8fa1c504b85 Author: Marc Zyngier Date: Tue Apr 1 10:17:06 2025 +0100 PCI: apple: Dynamically allocate RID-to_SID bitmap As we move towards supporting SoCs with varying RID-to-SID mapping capabilities, turn the static SID tracking bitmap into a dynamically allocated one. The current allocation size is still the same, but that's about to change. Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) Tested-by: Janne Grunau Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-7-maz@kernel.org commit 4785591f96c76534d9ccb7ec515ab4bc407f3191 Author: Marc Zyngier Date: Tue Apr 1 10:17:05 2025 +0100 PCI: apple: Move over to standalone probing Now that we have the required infrastructure, split the Apple PCIe setup into two categories: - stuff that has to do with PCI setup stays in the .init() callback - stuff that is just driver gunk (such as MSI setup) goes into a probe routine, which will eventually call into the host-common code The result is a far more logical setup process. Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-6-maz@kernel.org commit 4900454b4f819e88e9c57ed93542bf9325d7e161 Author: Marc Zyngier Date: Tue Apr 1 10:17:04 2025 +0100 PCI: ecam: Allow cfg->priv to be pre-populated from the root port device In order to decouple ecam config space creation from probing via pci_host_common_probe(), allow the private pointer to be populated via the device drvdata pointer. Crucially, this is set before calling ops->init(), allowing that particular callback to have access to probe data. This should have no impact on existing code which ignores the current value of cfg->priv. Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-5-maz@kernel.org commit afc0a570bb6138713d74784a032e4eb5b7f919ca Author: Marc Zyngier Date: Tue Apr 1 10:17:03 2025 +0100 PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe() pci_host_common_probe() is an extremely useful helper, as it abstracts away most of the gunk that a "mostly-ECAM-compliant" device driver needs. However, it is structured as a probe function, meaning that a lot of the driver-specific setup has to happen in a .init() callback, after the bridge and config space have been instantiated. This is a bit awkward, and results in a number of convolutions that could be avoided if the host-common code was more like a library. Introduce a pci_host_common_init() helper that does exactly that, taking the platform device and a struct pci_ecam_op as parameters. This can then be called from the probe routine, and a lot of the code that isn't relevant to PCI setup moved away from the .init() callback. This also removes the dependency on the device match data, which is an oddity. Signed-off-by: Marc Zyngier [mani: fixed spelling mistakes] Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-4-maz@kernel.org commit 3e5127469a8d41153fb30031a271788f52dd17ec Author: Nitheesh Sekar Date: Wed Mar 26 12:10:58 2025 +0400 PCI: qcom: Add support for IPQ5018 Add IPQ5018 platform with is based on Qcom IP rev. 2.9.0 and Synopsys IP rev. 5.00a. The platform itself has two PCIe Gen2 controllers: one single-lane and one dual-lane. So add the IPQ5018 compatible and re-use 2_9_0 ops. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan R Signed-off-by: George Moussalem Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250326-ipq5018-pcie-v7-4-e1828fef06c9@outlook.com commit b649d91322e65f9ea455da58c54b353826dc2dd5 Author: Nitheesh Sekar Date: Wed Mar 26 12:10:57 2025 +0400 dt-bindings: PCI: qcom: Add IPQ5018 SoC Add support for the PCIe controller on the Qualcomm IPQ5108 SoC to the bindings. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan Ramabadhran Signed-off-by: George Moussalem Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250326-ipq5018-pcie-v7-3-e1828fef06c9@outlook.com commit 09483959e34d2577142ad7c56491c82f50da540d Author: Krishna Chaitanya Chundru Date: Fri Mar 28 15:58:33 2025 +0530 PCI: dwc: Add support for configuring lane equalization presets PCIe equalization presets are predefined settings used to optimize signal integrity by compensating for signal loss and distortion in high-speed data transmission. Based upon the number of lanes and the data rate supported, write the preset data read from the device tree in to the lane equalization control registers. These preset values will be used by the controller during the LTSSM lane equalization procedure. Signed-off-by: Krishna Chaitanya Chundru [mani: reworded the commit message and comments in the driver] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250328-preset_v6-v9-5-22cfa0490518@oss.qualcomm.com commit d63dbfc6f27de1dd5741107db07b585d344676ee Author: Rob Herring (Arm) Date: Fri Apr 4 17:15:57 2025 -0500 dt-bindings: PCI: Remove obsolete .txt docs The content in these files has been moved to the schemas in dtschema. pci.txt is covered by pci-bus-common.yaml and pci-host-bridge.yaml. pci-iommu.txt is covered by pci-iommu.yaml. pci-msi.txt is covered in msi-map property in pci-host-bridge.yaml. Signed-off-by: Rob Herring (Arm) Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Cc: Frank Li Link: https://patch.msgid.link/20250404221559.552201-1-robh@kernel.org commit 096d05bf3e3aa0273bd9eef248ce43dce0cb4c96 Author: Rob Herring (Arm) Date: Mon Apr 14 16:41:33 2025 -0500 dt-bindings: PCI: Convert marvell,armada8k-pcie to schema Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding. The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented. Signed-off-by: Rob Herring (Arm) Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250414214135.1680076-1-robh@kernel.org commit 0c983d3544a5fb6b8b5770d958050280e3b85cc4 Author: Rob Herring (Arm) Date: Mon Apr 14 16:41:48 2025 -0500 dt-bindings: PCI: Convert Marvell EBU to schema Convert the Marvell EBU (Kirkwood, Dove, Armada XP/370) to DT schema format. Add "error" to interrupt-names which is in use, but missing. Shorten the example from 10 child nodes to 6 as the additional ones don't add much value to the example. Signed-off-by: Rob Herring (Arm) Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250414214157.1680484-1-robh@kernel.org commit 39813e1865c24db95527c39c0d664d4ef2e111c0 Author: Krzysztof Kozlowski Date: Mon Mar 24 13:52:02 2025 +0100 dt-bindings: PCI: sifive,fu740-pcie: Fix include placement in DTS example Coding style and common logic dictates that headers should not be included in device nodes. No functional impact. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250324125202.81986-2-krzysztof.kozlowski@linaro.org commit 2a24e06885d728675f4723b7ee3692160a23b924 Author: Krzysztof Kozlowski Date: Mon Mar 24 13:52:01 2025 +0100 dt-bindings: PCI: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20250324125202.81986-1-krzysztof.kozlowski@linaro.org commit c928080166a1fe4f45e396305c06fc22b7018ac6 Author: Kever Yang Date: Tue Apr 15 13:18:49 2025 +0800 dt-bindings: PCI: dwc: rockchip: Add rk3562 support rk3562 is using the same dwc controller as rk3576. Signed-off-by: Kever Yang Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250415051855.59740-2-kever.yang@rock-chips.com commit 215113ab9cc899914254746160d86eeb35faaee5 Author: Kever Yang Date: Mon Apr 14 22:51:09 2025 +0800 dt-bindings: PCI: dw: rockchip: Add rk3576 support rk3576 is using DWC PCIe controller, with msi interrupt directly to GIC instead of using GIC ITS, so - no ITS support is required and the 'msi-map' is not required, - a new 'msi' interrupt is needed. Co-developed-by: Sebastian Reichel Signed-off-by: Sebastian Reichel Signed-off-by: Kever Yang [mani: changed 'its' to 'ITS' in the binding, spelling mistake fix] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) Reviewed-by: Heiko Stuebner Link: https://patch.msgid.link/20250414145110.11275-2-kever.yang@rock-chips.com commit 8805f32a96d3b97cef07999fa6f52112678f7e65 Author: Hans Zhang <18255117159@163.com> Date: Sat Apr 19 21:30:58 2025 +0800 PCI: cadence: Fix runtime atomic count underflow If the call to pci_host_probe() in cdns_pcie_host_setup() fails, PM runtime count is decremented in the error path using pm_runtime_put_sync(). But the runtime count is not incremented by this driver, but only by the callers (cdns_plat_pcie_probe/j721e_pcie_probe). And the callers also decrement the runtime PM count in their error path. So this leads to the below warning from the PM core: "runtime PM usage count underflow!" So fix it by getting rid of pm_runtime_put_sync() in the error path and directly return the errno. Fixes: 49e427e6bdd1 ("Merge branch 'pci/host-probe-refactor'") Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250419133058.162048-1-18255117159@163.com commit a86ee2d74013e071efaa18631f9aa313262e5b1f Author: Herbert Xu Date: Fri Apr 18 10:59:38 2025 +0800 crypto: sha1_base - Remove partial block helpers Now that all sha1_base users have been converted to use the API partial block handling, remove the partial block helpers. Signed-off-by: Herbert Xu commit fd00e76ac67c23317252f1e93e078c0da9102741 Author: Herbert Xu Date: Fri Apr 18 10:59:36 2025 +0800 crypto: sparc/sha1 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 7b83638f962c30cb6271b5698dc52cdf9b638b48 Author: Herbert Xu Date: Fri Apr 18 10:59:34 2025 +0800 crypto: s390/sha1 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 52c78783063215c41d55831e6e969b339bca1ef7 Author: Herbert Xu Date: Fri Apr 18 10:59:31 2025 +0800 crypto: powerpc/sha1-spe - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit c0f07da681b1e6f9e3acd90a423c6966be8e701c Author: Herbert Xu Date: Fri Apr 18 10:59:29 2025 +0800 crypto: powerpc/sha1 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit e7396043a0a0f0a9589236db1d6902ebec5a9534 Author: Herbert Xu Date: Fri Apr 18 10:59:27 2025 +0800 crypto: arm/sha1-asm - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit adfb79164c7959ae43f93f54430e3dee0ffab404 Author: Herbert Xu Date: Fri Apr 18 10:59:25 2025 +0800 crypto: arm/sha1-neon - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit d52ad050430a18bac6e2137f3de602538ec5616a Author: Herbert Xu Date: Fri Apr 18 10:59:22 2025 +0800 crypto: arm/sha1-ce - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit a2d910b8466af942d34478b4c480360f0b3d29ae Author: Herbert Xu Date: Fri Apr 18 10:59:20 2025 +0800 crypto: sha1-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 62a59a464fb1add17ba64663d4eac7fb4302665c Author: Herbert Xu Date: Fri Apr 18 10:59:18 2025 +0800 crypto: mips/octeon-sha1 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit b97d31100e36aae7f9e39543326dae31ee8cdae7 Author: Herbert Xu Date: Fri Apr 18 10:59:15 2025 +0800 crypto: arm64/sha1 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 0865a89413652ecad551c9b782fa5146259640e4 Author: Herbert Xu Date: Fri Apr 18 10:59:13 2025 +0800 crypto: x86/sha1 - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit cc1f5bbe428c915b2076a77d07ad0477c1ee6d10 Author: Herbert Xu Date: Fri Apr 18 10:59:11 2025 +0800 crypto: sparc/md5 - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Signed-off-by: Herbert Xu commit 60fded57098fab456dbdff06fd50f819236d4e65 Author: Herbert Xu Date: Fri Apr 18 10:59:08 2025 +0800 crypto: powerpc/md5 - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit f53fc0d8e9909a55c0121a0fc0c0a8c0e436a494 Author: Herbert Xu Date: Fri Apr 18 10:59:06 2025 +0800 crypto: mips/octeon-md5 - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Signed-off-by: Herbert Xu commit efd62c85525e212705368b24eb90ef10778190f5 Author: Herbert Xu Date: Fri Apr 18 10:59:04 2025 +0800 crypto: md5-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 3942654223cce18a245d0ec134c7259941205744 Author: Herbert Xu Date: Fri Apr 18 10:59:01 2025 +0800 crypto: x86/ghash - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit dab2d7b66fb65a1d6e6cc26de261e64d1c89eaf4 Author: Herbert Xu Date: Fri Apr 18 10:58:59 2025 +0800 crypto: s390/ghash - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Signed-off-by: Herbert Xu commit 867a2177c2c995d3a0c8b03f9be3b7f4fe84e0b1 Author: Herbert Xu Date: Fri Apr 18 10:58:57 2025 +0800 crypto: riscv/ghash - Use API partial block handling Use the Crypto API partial block handling. As this was the last user relying on crypto/ghash.h for gf128mul.h, remove the unnecessary inclusion of gf128mul.h from crypto/ghash.h. Signed-off-by: Herbert Xu commit 9a7c987fb92b8aea61a94e28f2782d184e95d621 Author: Herbert Xu Date: Fri Apr 18 10:58:54 2025 +0800 crypto: arm64/ghash - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit 08bcb691352b4ab230889332694a181d06df72b6 Author: Herbert Xu Date: Fri Apr 18 10:58:52 2025 +0800 crypto: arm/ghash - Use API partial block handling Use the Crypto API partial block handling. Also switch to the generic export format. Finally remove a couple of stray may_use_simd() calls in gcm. Signed-off-by: Herbert Xu commit f5bd7e84ac37d141696f81e2bb92f113cbbef9ed Author: Herbert Xu Date: Fri Apr 18 10:58:50 2025 +0800 crypto: powerpc/ghash - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit ef11957b0ad0a2e1c159c172865d6923f1731b57 Author: Herbert Xu Date: Fri Apr 18 10:58:47 2025 +0800 crypto: ghash-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit cc28260ab4fbe110981bcffff5da50befcb5119e Author: Herbert Xu Date: Fri Apr 18 10:58:45 2025 +0800 crypto: arm/blake2b - Use API partial block handling Use the Crypto API partial block handling. Also remove the unnecessary SIMD fallback path. Signed-off-by: Herbert Xu commit aa54e17020852858d6e1639f1c7ef516fd217e08 Author: Herbert Xu Date: Fri Apr 18 10:58:43 2025 +0800 crypto: blake2b-generic - Use API partial block handling Use the Crypto API partial block handling. Signed-off-by: Herbert Xu commit 7650f826f7b2d84782f9147c51687ff0364125e9 Author: Herbert Xu Date: Fri Apr 18 10:58:41 2025 +0800 crypto: shash - Handle partial blocks in API Provide an option to handle the partial blocks in the shash API. Almost every hash algorithm has a block size and are only able to hash partial blocks on finalisation. Rather than duplicating the partial block handling many times, add this functionality to the shash API. It is optional (e.g., hmac would never need this by relying on the partial block handling of the underlying hash), and to enable it set the bit CRYPTO_AHASH_ALG_BLOCK_ONLY. The export format is always that of the underlying hash export, plus the partial block buffer, followed by a single-byte for the partial block length. Set the bit CRYPTO_AHASH_ALG_FINAL_NONZERO to withhold an extra byte in the partial block. This will come in handy when this is extended to ahash where hardware often can't deal with a zero-length final. It will also be used for algorithms requiring an extra block for finalisation (e.g., cmac). As an optimisation, set the bit CRYPTO_AHASH_ALG_FINUP_MAX if the algorithm wishes to get as much data as possible instead of just the last partial block. The descriptor will be zeroed after finalisation. Signed-off-by: Herbert Xu commit 2ee97c190b2b6769d7c1688e80b84c951177a22b Author: Thorsten Blum Date: Fri Apr 18 00:36:49 2025 +0200 crypto: engine - Realign struct crypto_engine to save 8 bytes Realign struct crypto_engine to reduce its size by 8 bytes. Total size is now 192 bytes, allowing it to fit within 3 cachelines instead of 4. pahole output before: /* size: 200, cachelines: 4, members: 17 */ /* sum members: 183, holes: 3, sum holes: 17 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 8 bytes */ and after: /* size: 192, cachelines: 3, members: 17 */ /* sum members: 183, holes: 2, sum holes: 9 */ /* paddings: 1, sum paddings: 4 */ No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu commit 0e0a7e3719bc8cbe6d6e30b3e81f21472ecba5bc Author: Joshua Washington Date: Mon Apr 21 18:16:32 2025 -0700 xdp: create locked/unlocked instances of xdp redirect target setters Commit 03df156dd3a6 ("xdp: double protect netdev->xdp_flags with netdev->lock") introduces the netdev lock to xdp_set_features_flag(). The change includes a _locked version of the method, as it is possible for a driver to have already acquired the netdev lock before calling this helper. However, the same applies to xdp_features_(set|clear)_redirect_flags(), which ends up calling the unlocked version of xdp_set_features_flags() leading to deadlocks in GVE, which grabs the netdev lock as part of its suspend, reset, and shutdown processes: [ 833.265543] WARNING: possible recursive locking detected [ 833.270949] 6.15.0-rc1 #6 Tainted: G E [ 833.276271] -------------------------------------------- [ 833.281681] systemd-shutdow/1 is trying to acquire lock: [ 833.287090] ffff949d2b148c68 (&dev->lock){+.+.}-{4:4}, at: xdp_set_features_flag+0x29/0x90 [ 833.295470] [ 833.295470] but task is already holding lock: [ 833.301400] ffff949d2b148c68 (&dev->lock){+.+.}-{4:4}, at: gve_shutdown+0x44/0x90 [gve] [ 833.309508] [ 833.309508] other info that might help us debug this: [ 833.316130] Possible unsafe locking scenario: [ 833.316130] [ 833.322142] CPU0 [ 833.324681] ---- [ 833.327220] lock(&dev->lock); [ 833.330455] lock(&dev->lock); [ 833.333689] [ 833.333689] *** DEADLOCK *** [ 833.333689] [ 833.339701] May be due to missing lock nesting notation [ 833.339701] [ 833.346582] 5 locks held by systemd-shutdow/1: [ 833.351205] #0: ffffffffa9c89130 (system_transition_mutex){+.+.}-{4:4}, at: __se_sys_reboot+0xe6/0x210 [ 833.360695] #1: ffff93b399e5c1b8 (&dev->mutex){....}-{4:4}, at: device_shutdown+0xb4/0x1f0 [ 833.369144] #2: ffff949d19a471b8 (&dev->mutex){....}-{4:4}, at: device_shutdown+0xc2/0x1f0 [ 833.377603] #3: ffffffffa9eca050 (rtnl_mutex){+.+.}-{4:4}, at: gve_shutdown+0x33/0x90 [gve] [ 833.386138] #4: ffff949d2b148c68 (&dev->lock){+.+.}-{4:4}, at: gve_shutdown+0x44/0x90 [gve] Introduce xdp_features_(set|clear)_redirect_target_locked() versions which assume that the netdev lock has already been acquired before setting the XDP feature flag and update GVE to use the locked version. Fixes: 03df156dd3a6 ("xdp: double protect netdev->xdp_flags with netdev->lock") Tested-by: Mina Almasry Reviewed-by: Willem de Bruijn Reviewed-by: Harshitha Ramamurthy Signed-off-by: Joshua Washington Acked-by: Stanislav Fomichev Acked-by: Martin KaFai Lau Link: https://patch.msgid.link/20250422011643.3509287-1-joshwash@google.com Signed-off-by: Jakub Kicinski commit a1980cc962837948a97454e7dfd778e9fce5e6b1 Merge: 84ee6e5040aef7 3b05aa997c4914 Author: Jakub Kicinski Date: Tue Apr 22 19:53:40 2025 -0700 Merge branch 'implement-udp-tunnel-port-for-txgbe' Jiawen Wu says: ==================== Implement udp tunnel port for txgbe v3: https://lore.kernel.org/20250417080328.426554-1-jiawenwu@trustnetic.com v2: https://lore.kernel.org/20250414091022.383328-1-jiawenwu@trustnetic.com v1: https://lore.kernel.org/20250410074456.321847-1-jiawenwu@trustnetic.com ==================== Link: https://patch.msgid.link/20250421022956.508018-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 3b05aa997c491487c8d4b0033cca76a15760a930 Author: Jiawen Wu Date: Mon Apr 21 10:29:56 2025 +0800 net: wangxun: restrict feature flags for tunnel packets Implement ndo_features_check to restrict Tx checksum offload flags, since there are some inner layer length and protocols unsupported. Signed-off-by: Jiawen Wu Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/20250421022956.508018-3-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit f294516f1ff2fbf6fed6d0376f1ad096f8312879 Author: Jiawen Wu Date: Mon Apr 21 10:29:55 2025 +0800 net: txgbe: Support to set UDP tunnel port Tunnel types VXLAN/VXLAN_GPE/GENEVE are supported for txgbe devices. The hardware supports to set only one port for each tunnel type. Signed-off-by: Jiawen Wu Link: https://patch.msgid.link/20250421022956.508018-2-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 4c7d3c88c77bf227c12ef13e8461a0c940f775e8 Author: Caleb Sander Mateos Date: Wed Apr 16 11:01:53 2025 -0600 ublk: remove unnecessary ubq checks ublk_init_queues() ensures that all nr_hw_queues queues are initialized, with each ublk_queue's q_id set to its index. And ublk_init_queues() is called before ublk_add_chdev(), which creates the cdev. Is is therefore impossible for the !ubq || ub_cmd->q_id != ubq->q_id condition to hit in __ublk_ch_uring_cmd(). Remove it to avoids some branches in the I/O path. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei Reviewed-by: Uday Shankar Link: https://lore.kernel.org/r/20250416170154.3621609-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 84ee6e5040aef7fdf90b30dbedf7bd2cd8bd3d69 Merge: 21b01cb8e88ea2 7ee32072c73279 Author: Jakub Kicinski Date: Tue Apr 22 19:07:45 2025 -0700 Merge branch 'net-followup-series-for-exit_rtnl' Kuniyuki Iwashima says: ==================== net: Followup series for ->exit_rtnl(). Patch 1 drops the hold_rtnl arg in ops_undo_list() as suggested by Jakub. Patch 2 & 3 apply ->exit_rtnl() to pfcp and ppp. v1: https://lore.kernel.org/20250415022258.11491-1-kuniyu@amazon.com ==================== Link: https://patch.msgid.link/20250418003259.48017-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 7ee32072c732799bcb7221cb97adc0e9e52e3792 Author: Kuniyuki Iwashima Date: Thu Apr 17 17:32:34 2025 -0700 ppp: Split ppp_exit_net() to ->exit_rtnl(). ppp_exit_net() unregisters devices related to the netns under RTNL and destroys lists and IDR. Let's use ->exit_rtnl() for the device unregistration part to save RTNL dances for each netns. Note that we delegate the for_each_netdev_safe() part to default_device_exit_batch() and replace unregister_netdevice_queue() with ppp_nl_dellink() to align with bond, geneve, gtp, and pfcp. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418003259.48017-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 81eccc131bc1d53c9f7fa0d8c241589c514adb4e Author: Kuniyuki Iwashima Date: Thu Apr 17 17:32:33 2025 -0700 pfcp: Convert pfcp_net_exit() to ->exit_rtnl(). pfcp_net_exit() holds RTNL and cleans up all devices in the netns and other devices tied to sockets in the netns. We can use ->exit_rtnl() to save RTNL dance for all dying netns. Note that we delegate the for_each_netdev() part to default_device_exit_batch() to avoid a list corruption splat like the one reported in commit 4ccacf86491d ("gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl().") Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418003259.48017-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 434efd3d0cdd935d46c7448061537a2adcf8aeab Author: Kuniyuki Iwashima Date: Thu Apr 17 17:32:32 2025 -0700 net: Drop hold_rtnl arg from ops_undo_list(). ops_undo_list() first iterates over ops_list for ->pre_exit(). Let's check if any of the ops has ->exit_rtnl() there and drop the hold_rtnl argument. Note that nexthop uses ->exit_rtnl() and is built-in, so hold_rtnl is always true for setup_net() and cleanup_net() for now. Suggested-by: Jakub Kicinski Link: https://lore.kernel.org/netdev/20250414170148.21f3523c@kernel.org/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250418003259.48017-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 21b01cb8e88ea200a834a2c114b5dc6aa378ac56 Author: Russell King (Oracle) Date: Thu Apr 17 18:07:54 2025 +0100 net: stmmac: visconti: convert to set_clk_tx_rate() method Convert visconti to use the set_clk_tx_rate() method. By doing so, the GMAC control register will already have been updated (unlike with the fix_mac_speed() method) so this code can be removed while porting to the set_clk_tx_rate() method. There is also no need for the spinlock, and has never been - neither fix_mac_speed() nor set_clk_tx_rate() can be called by more than one thread at a time, so the lock does nothing useful. Reviewed-by: Andrew Lunn Reviewed-by: Jacob Keller Acked-by: Nobuhiro Iwamatsu Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u5SiQ-001I0B-OQ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit f7ca612018cfd4e2a33b0600d89c917fdec6e11c Author: Colin Ian King Date: Thu Apr 17 17:13:52 2025 +0100 net: dsa: rzn1_a5psw: Make the read-only array offsets static const Don't populate the read-only array offsets on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://patch.msgid.link/20250417161353.490219-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit eff59eb10231c0ccb3fcb0fa26e10be84bda39ad Merge: a7696fb251c61c 326976b05543f0 Author: Jakub Kicinski Date: Tue Apr 22 18:49:26 2025 -0700 Merge branch 'add-gbeth-glue-layer-driver-for-renesas-rz-v2h-p-soc' Lad Prabhakar says: ==================== Add GBETH glue layer driver for Renesas RZ/V2H(P) SoC This patch series adds support for the GBETH (Gigabit Ethernet) glue layer driver for the Renesas RZ/V2H(P) SoC. The GBETH IP is integrated with the Synopsys DesignWare MAC (version 5.20). The changes include updating the device tree bindings, documenting the GBETH bindings, and adding the DWMAC glue layer for the Renesas GBETH. v1: https://lore.kernel.org/20250302181808.728734-1-prabhakar.mahadev-lad.rj@bp.renesas.com ==================== Link: https://patch.msgid.link/20250417084015.74154-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit 326976b05543f07dd084a43bf45070aa87f290bc Author: Lad Prabhakar Date: Thu Apr 17 09:40:15 2025 +0100 MAINTAINERS: Add entry for Renesas RZ/V2H(P) DWMAC GBETH glue layer driver Add a new MAINTAINERS entry for the Renesas RZ/V2H(P) DWMAC GBETH glue layer driver. Signed-off-by: Lad Prabhakar Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250417084015.74154-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit 461f6529e5946d98ef91bf115d5ced61d8439a6a Author: Lad Prabhakar Date: Thu Apr 17 09:40:14 2025 +0100 net: stmmac: Add DWMAC glue layer for Renesas GBETH Add the DWMAC glue layer for the GBETH IP found in the Renesas RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Russell King (Oracle) Reviewed-by: Philipp Zabel Link: https://patch.msgid.link/20250417084015.74154-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit 8fff7ae84d1880b7d435f3bb71518eb24bf84846 Author: Lad Prabhakar Date: Thu Apr 17 09:40:13 2025 +0100 dt-bindings: net: Document support for Renesas RZ/V2H(P) GBETH GBETH IP on the Renesas RZ/V2H(P) SoC is integrated with Synopsys DesignWare MAC (version 5.20). Document the device tree bindings for the GBETH glue layer. Generic compatible string 'renesas,rzv2h-gbeth' is added since this module is identical on both the RZ/V2H(P) and RZ/G3E SoCs. The Rx/Tx clocks supplied for GBETH on the RZ/V2H(P) SoC is depicted below: Rx / Tx -------+------------- on / off ------- | | Rx-180 / Tx-180 +---- not ---- on / off ------- Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250417084015.74154-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit 8c989368c04c17a6ed834ae528458844f553bead Author: Lad Prabhakar Date: Thu Apr 17 09:40:12 2025 +0100 dt-bindings: net: dwmac: Increase 'maxItems' for 'interrupts' and 'interrupt-names' Increase the `maxItems` value for the `interrupts` and `interrupt-names` properties to 11 to support additional per-channel Tx/Rx completion interrupts on the Renesas RZ/V2H(P) SoC, which features the `snps,dwmac-5.20` IP. Refactor the `interrupt-names` property by replacing repeated `enum` entries with a `oneOf` list. Add support for per-channel receive and transmit completion interrupts using regex patterns. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250417084015.74154-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jakub Kicinski commit a7696fb251c61ce5419fff5cf71556b5ca9f815a Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:42 2025 +0200 ptp: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250417074643.81448-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit e3f08b262573187b9c10c61467e97a87bd7c661b Merge: bb9c648b334be5 8006aff15516a1 Author: Herbert Xu Date: Wed Apr 23 09:36:39 2025 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up scompress off-by-one patch. The merge resolution is non-trivial as the dst handling code has been moved in front of the src. commit f0f149d9747f0d597d3e04bb87be0f31e7e25c2e Author: Kees Cook Date: Wed Apr 16 15:10:29 2025 -0700 emulex/benet: Annotate flash_cookie as nonstring GCC 15's new -Wunterminated-string-initialization notices that the 32 character "flash_cookie" (which is not used as a C-String) needs to be marked as "nonstring": drivers/net/ethernet/emulex/benet/be_cmds.c:2618:51: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization] 2618 | static char flash_cookie[2][16] = {"*** SE FLAS", "H DIRECTORY *** "}; | ^~~~~~~~~~~~~~~~~~ Add this annotation, avoid using a multidimensional array, but keep the string split (with a comment about why). Additionally mark it const and annotate the "cookie" member that is being memcmp()ed against as nonstring too. Signed-off-by: Kees Cook Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250416221028.work.967-kees@kernel.org Signed-off-by: Jakub Kicinski commit 044412d9b67b07521414bfbad2092a63622fc087 Merge: b7ed5d5a78fcce 6c3c3c230a13f1 Author: Jakub Kicinski Date: Tue Apr 22 17:50:01 2025 -0700 Merge branch 'net-phy-dp83822-add-support-for-changing-the-mac-series-termination' Dimitri Fedrau says: ==================== net: phy: dp83822: Add support for changing the MAC series termination The dp83822 provides the possibility to set the resistance value of the the MAC series termination. Modifying the resistance to an appropriate value can reduce signal reflections and therefore improve signal quality. v2: https://lore.kernel.org/20250408-dp83822-mac-impedance-v2-0-fefeba4a9804@liebherr.com v1: https://lore.kernel.org/20250307-dp83822-mac-impedance-v1-0-bdd85a759b45@liebherr.com ==================== Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-0-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski commit 6c3c3c230a13f10a8a86f20c6710cf44532dfcf3 Author: Dimitri Fedrau Date: Wed Apr 16 19:14:50 2025 +0200 net: phy: dp83822: Add support for changing the MAC termination The dp83822 provides the possibility to set the resistance value of the the MAC termination. Modifying the resistance to an appropriate value can reduce signal reflections and therefore improve signal quality. Reviewed-by: Russell King (Oracle) Signed-off-by: Dimitri Fedrau Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-4-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski commit 145436ae01193c0a379fd3ea9c4fbdf32863db1f Author: Dimitri Fedrau Date: Wed Apr 16 19:14:49 2025 +0200 net: phy: Add helper for getting MAC termination resistance Add helper which returns the MAC termination resistance value. Modifying the resistance to an appropriate value can reduce signal reflections and therefore improve signal quality. Reviewed-by: Russell King (Oracle) Signed-off-by: Dimitri Fedrau Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-3-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski commit 1de1390ee014f72ddff65ac73bee55005696fe96 Author: Dimitri Fedrau Date: Wed Apr 16 19:14:48 2025 +0200 dt-bindings: net: dp83822: add constraints for mac-termination-ohms Property mac-termination-ohms is defined in ethernet-phy.yaml. Add allowed values for the property. Signed-off-by: Dimitri Fedrau Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-2-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski commit 4cb6316d33d8ccf982f8975b1ea5f7f3f71c8da1 Author: Dimitri Fedrau Date: Wed Apr 16 19:14:47 2025 +0200 dt-bindings: net: ethernet-phy: add property mac-termination-ohms Add property mac-termination-ohms in the device tree bindings for selecting the resistance value of the builtin series termination resistors of the PHY. Changing the resistance to an appropriate value can reduce signal reflections and therefore improve signal quality. Signed-off-by: Dimitri Fedrau Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-1-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski commit b7ed5d5a78fccee96cf8919ac2c7a064c2f4c45b Author: Heiner Kallweit Date: Mon Apr 21 11:25:18 2025 +0200 r8169: use pci_prepare_to_sleep in rtl_shutdown Use pci_prepare_to_sleep() like PCI core does in pci_pm_suspend_noirq. This aligns setting a low-power mode during shutdown with the handling of the transition to system suspend. Also the transition to runtime suspend uses pci_target_state() instead of setting D3hot unconditionally. Note: pci_prepare_to_sleep() uses device_may_wakeup() to check whether device may generate wakeup events. So we don't lose anything by not passing tp->saved_wolopts any longer. Signed-off-by: Heiner Kallweit Reviewed-by: Jacob Keller Link: https://patch.msgid.link/f573fdbd-ba6d-41c1-b68f-311d3c88db2c@gmail.com Signed-off-by: Jakub Kicinski commit 67b083f14fb75c4157eb8ab9a4ae543aebcb8e1b Author: Dr. David Alan Gilbert Date: Sun Apr 20 23:58:10 2025 +0100 octeontx2-af: Remove unused rvu_npc_enable_bcast_entry The last use of rvu_npc_enable_bcast_entry() was removed in 2021 by commit 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250420225810.171852-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 5cffad0a5c8f0cc53ce9fe7cff7bc67c3a97c406 Merge: be2fea9c07d40a 9b72f3e5b76007 Author: Andrii Nakryiko Date: Tue Apr 22 17:13:38 2025 -0700 Merge branch 'libbpf-fix-event-name-too-long-error-and-add-tests' Feng Yang says: ==================== libbpf: Fix event name too long error and add tests From: Feng Yang Hi everyone, This series tries to fix event name too long error and add tests. When the binary path is excessively long, the generated probe_name in libbpf exceeds the kernel's MAX_EVENT_NAME_LEN limit (64 bytes). This causes legacy uprobe event attachment to fail with error code -22. The fix reorders the fields to place the unique ID before the name. This ensures that even if truncation occurs via snprintf, the unique ID remains intact, preserving event name uniqueness. Additionally, explicit checks with MAX_EVENT_NAME_LEN are added to enforce length constraints. Acked-by: Jiri Olsa --- Changes in v5: - use strrchr instead of basename. - kprobe_test add __weak. Thanks, Andrii Nakryiko! - Link to v4: https://lore.kernel.org/all/20250415093907.280501-1-yangfeng59949@163.com/ Changes in v4: - add changelog. - gen_uprobe_legacy_event_name and gen_kprobe_legacy_event_name are combined into a function - kprobe_test use normal module function. Thanks, Jiri Olsa! - Link to v3: https://lore.kernel.org/bpf/20250414093402.384872-1-yangfeng59949@163.com/ Changes in v3: - add __sync_fetch_and_add(&index) and let snprintf() do the trimming. Thanks, Andrii Nakryiko! - add selftests. - Link to v2: https://lore.kernel.org/all/20250411080545.319865-1-yangfeng59949@163.com/ Changes in v2: - Use basename() and %.32s to fix. Thanks, Hengqi Chen! - Link to v1: https://lore.kernel.org/all/20250410052712.206785-1-yangfeng59949@163.com/ ==================== Link: https://patch.msgid.link/20250417014848.59321-1-yangfeng59949@163.com Signed-off-by: Andrii Nakryiko commit 9b72f3e5b76007d8ef9c7743561d4c9298a086ab Author: Feng Yang Date: Thu Apr 17 09:48:48 2025 +0800 selftests/bpf: Add test for attaching kprobe with long event names This test verifies that attaching kprobe/kretprobe with long event names does not trigger EINVAL errors. Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250417014848.59321-4-yangfeng59949@163.com commit e1be7c45d24434bc6e04b675ae91c049e50447be Author: Feng Yang Date: Thu Apr 17 09:48:47 2025 +0800 selftests/bpf: Add test for attaching uprobe with long event names This test verifies that attaching uprobe/uretprobe with long event names does not trigger EINVAL errors. Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250417014848.59321-3-yangfeng59949@163.com commit 4dde20b1aa85d69c4281eaac9a7cfa7d2b62ecf0 Author: Feng Yang Date: Thu Apr 17 09:48:46 2025 +0800 libbpf: Fix event name too long error When the binary path is excessively long, the generated probe_name in libbpf exceeds the kernel's MAX_EVENT_NAME_LEN limit (64 bytes). This causes legacy uprobe event attachment to fail with error code -22. The fix reorders the fields to place the unique ID before the name. This ensures that even if truncation occurs via snprintf, the unique ID remains intact, preserving event name uniqueness. Additionally, explicit checks with MAX_EVENT_NAME_LEN are added to enforce length constraints. Before Fix: ./test_progs -t attach_probe/kprobe-long_name ...... libbpf: failed to add legacy kprobe event for 'bpf_testmod_looooooooooooooooooooooooooooooong_name+0x0': -EINVAL libbpf: prog 'handle_kprobe': failed to create kprobe 'bpf_testmod_looooooooooooooooooooooooooooooong_name+0x0' perf event: -EINVAL test_attach_kprobe_long_event_name:FAIL:attach_kprobe_long_event_name unexpected error: -22 test_attach_probe:PASS:uprobe_ref_ctr_cleanup 0 nsec #13/11 attach_probe/kprobe-long_name:FAIL #13 attach_probe:FAIL ./test_progs -t attach_probe/uprobe-long_name ...... libbpf: failed to add legacy uprobe event for /root/linux-bpf/bpf-next/tools/testing/selftests/bpf/test_progs:0x13efd9: -EINVAL libbpf: prog 'handle_uprobe': failed to create uprobe '/root/linux-bpf/bpf-next/tools/testing/selftests/bpf/test_progs:0x13efd9' perf event: -EINVAL test_attach_uprobe_long_event_name:FAIL:attach_uprobe_long_event_name unexpected error: -22 #13/10 attach_probe/uprobe-long_name:FAIL #13 attach_probe:FAIL After Fix: ./test_progs -t attach_probe/uprobe-long_name #13/10 attach_probe/uprobe-long_name:OK #13 attach_probe:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED ./test_progs -t attach_probe/kprobe-long_name #13/11 attach_probe/kprobe-long_name:OK #13 attach_probe:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED Fixes: 46ed5fc33db9 ("libbpf: Refactor and simplify legacy kprobe code") Fixes: cc10623c6810 ("libbpf: Add legacy uprobe attaching support") Signed-off-by: Hengqi Chen Signed-off-by: Feng Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250417014848.59321-2-yangfeng59949@163.com commit b848cd418aebdb313364b4843f41fae82281a823 Author: Christophe JAILLET Date: Fri Apr 18 08:48:16 2025 +0200 drm/bridge: lt9611uxc: Fix an error handling path in lt9611uxc_probe() If lt9611uxc_audio_init() fails, some resources still need to be released before returning the error code. Use the existing error handling path. Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Signed-off-by: Christophe JAILLET Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/f167608e392c6b4d7d7f6e45e3c21878feb60cbd.1744958833.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Baryshkov commit be2fea9c07d40a0a897580166e3d43c53ef3b75b Author: Malaya Kumar Rout Date: Mon Apr 21 23:14:05 2025 +0530 selftests/bpf: Close the file descriptor to avoid resource leaks Static analysis found an issue in bench_htab_mem.c and sk_assign.c cppcheck output before this patch: tools/testing/selftests/bpf/benchs/bench_htab_mem.c:284:3: error: Resource leak: fd [resourceLeak] tools/testing/selftests/bpf/prog_tests/sk_assign.c:41:3: error: Resource leak: tc [resourceLeak] cppcheck output after this patch: No resource leaks found Fix the issue by closing the file descriptors fd and tc. Signed-off-by: Malaya Kumar Rout Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250421174405.26080-1-malayarout91@gmail.com commit 74e5b13a1b0f10c5a5c6168f6915620a1d369fae Author: Song Liu Date: Mon Apr 21 15:52:50 2025 -0700 lsm: Move security_netlink_send to under CONFIG_SECURITY_NETWORK security_netlink_send() is a networking hook, so it fits better under CONFIG_SECURITY_NETWORK. Signed-off-by: Song Liu Signed-off-by: Paul Moore commit ac47c272b2668cd28e22b58921f3fd2b9daae2c7 Merge: 69120f82282977 a11d6784d7316a Author: Tejun Heo Date: Tue Apr 22 09:29:23 2025 -1000 Merge branch 'for-6.15-fixes' into for-6.16 a11d6784d731 ("sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()") added a call to scx_ops_error() which was renamed to scx_error() in for-6.16. Fix it up. commit 730c0a8ee42905f59c82bc3c2f8b3616c18897bb Author: Akira Yokosawa Date: Fri Mar 14 20:15:54 2025 +0900 tools/memory-model: docs/references: Remove broken link to imgtec.com MIPS documents are not provided at imgtec.com any more. Get rid of useless link. Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri commit f0a83980011c6622dcadedd2ecd2da977cfe9f4f Author: Akira Yokosawa Date: Fri Mar 14 20:14:15 2025 +0900 tools/memory-model: docs/ordering: Fix trivial typos Fix trivial typos including: - Repeated "a call to" - Inconsistent forms of referencing functions of rcu_dereference() and rcu_assign_pointer() - Past tense used in describing normal behavior and other minor ones. [ paulmck: Wordsmith plus recent LWN RCU API URL. ] Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri commit 366b88f686934d5e63940515fec9577f224a8101 Author: Akira Yokosawa Date: Fri Mar 14 20:12:04 2025 +0900 tools/memory-model: docs/simple.txt: Fix trivial typos Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri commit 13a9a11358bce755bd602346fa7f56690b68c267 Author: Akira Yokosawa Date: Fri Mar 14 20:10:30 2025 +0900 tools/memory-model: docs/README: Update introduction of locking.txt Commit 9bc931e9e161 ("tools/memory-model: Add locking.txt and glossary.txt to README") failed to mention the relation of the "Locking" section in recipes.txt and locking.txt. The latter is a detailed version of the former intended to be read on its own. Reword the description in README and add notes in locking.txt and recipes.txt to clarify their relationship. [ paulmck: Wordsmithing. ] Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri commit 70788d26ae1c482dba843efcc0cf166c2ba36a38 Author: David Lechner Date: Fri Apr 11 15:49:34 2025 -0500 iio: normalize array sentinel style Use `\t(\{ ?\},|\{\}|\{\s*/\*.*\*/\s*\},?)$` regex to find and replace the array sentinel in all IIO drivers to the same style. For some time, we've been trying to consistently use `{ }` (no trailing comma, no comment, one space between braces) for array sentinels in the IIO subsystem. Still nearly 50% of existing code uses a different style. To save reviewers from having to request this trivial change as frequently, let's normalize the style in all existing IIO drivers. At least when code is copy/pasted to new drivers, the style will be consistent. Signed-off-by: David Lechner Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250411-iio-sentinel-normalization-v1-1-d293de3e3d93@baylibre.com Signed-off-by: Jonathan Cameron commit ef24ea86eff5dc82f877e2057330da3c463f17cf Author: Sergiu Cuciurean Date: Fri Apr 11 12:57:23 2025 -0300 iio: adc: ad7768-1: Move buffer allocation to a separate function This change moves the buffer allocation and related trigger allocation in a separate function, making space for adding another type of iio buffer if needed. Reviewed-by: Marcelo Schmitt Reviewed-by: David Lechner Signed-off-by: Sergiu Cuciurean Signed-off-by: Jonathan Santos Link: https://patch.msgid.link/11c1777b406875ce1a7216dc4b094ff99af8da7f.1744325346.git.Jonathan.Santos@analog.com Signed-off-by: Jonathan Cameron commit 1fa0f4ea5660bf4731cf8f51c4ad923070b27fc8 Author: Sergiu Cuciurean Date: Fri Apr 11 12:57:09 2025 -0300 iio: adc: ad7768-1: Add reset gpio Implement asynchronous hardware reset GPIO. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Signed-off-by: Sergiu Cuciurean Co-developed-by: Jonathan Santos Signed-off-by: Jonathan Santos Link: https://patch.msgid.link/25a413babeddf29583f1c26abf4234dfd606a595.1744325346.git.Jonathan.Santos@analog.com Signed-off-by: Jonathan Cameron commit 3f4bc0b11684ed1ebb46c081b77f1135869bf3dc Author: Jonathan Santos Date: Fri Apr 11 12:56:56 2025 -0300 iio: adc: ad7768-1: convert driver to use regmap Convert the AD7768-1 driver to use the regmap API for register access. This change simplifies and standardizes register interactions, reducing code duplication and improving maintainability. Create two regmap configurations, one for 8-bit register values and other for 24-bit register values. Since we are using regmap now, define the remaining registers from 0x32 to 0x34. Reviewed-by: David Lechner Signed-off-by: Jonathan Santos Link: https://patch.msgid.link/aec9e5452c1ac16d5379a80dfce97c00d85614a2.1744325346.git.Jonathan.Santos@analog.com Signed-off-by: Jonathan Cameron commit e5cdb098a3cb165d52282ffc3a6448642953ea13 Author: Purva Yeshi Date: Thu Apr 10 22:34:08 2025 +0530 iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos Fix Smatch-detected issue: drivers/iio/adc/ad_sigma_delta.c:604 ad_sd_trigger_handler() error: uninitialized symbol 'status_pos'. The variable `status_pos` was only initialized in specific switch cases (1, 2, 3, 4), which could leave it uninitialized if `reg_size` had an unexpected value. Fix by adding a default case to the switch block to catch unexpected values of `reg_size`. Use `dev_err_ratelimited()` for error logging and `goto irq_handled` instead of returning early. Signed-off-by: Purva Yeshi Link: https://patch.msgid.link/20250410170408.8585-1-purvayeshi550@gmail.com Signed-off-by: Jonathan Cameron commit b1c5d68ea66e511dfb16cd0e6a730488bd3c3317 Author: Angelo Dureghello Date: Wed Apr 9 20:36:32 2025 +0200 iio: dac: ad3552r-hs: add support for internal ramp The ad3552r can be feeded from the HDL controller by an internally generated 16bit ramp, useful for debug pourposes. Add debugfs a file to enable or disable it. Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250409-wip-bl-ad3552r-fixes-v5-5-fb429c3a6515@baylibre.com Signed-off-by: Jonathan Cameron commit ca74d0eb06e0e05426f2494aa2f4c392366c2d8a Author: Angelo Dureghello Date: Wed Apr 9 20:36:31 2025 +0200 iio: dac: adi-axi-dac: add data source get Add data source getter. Reviewed-by: Nuno Sá Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250409-wip-bl-ad3552r-fixes-v5-4-fb429c3a6515@baylibre.com Signed-off-by: Jonathan Cameron commit 2086321576425361e8ea0052d9ef6eec55f99a6f Author: Angelo Dureghello Date: Wed Apr 9 20:36:30 2025 +0200 iio: backend: add support for data source get Add backend support for getting the data source used. The ad3552r HDL implements an internal ramp generator, so adding the getter to allow data source get/set by debugfs. Reviewed-by: Nuno Sá Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250409-wip-bl-ad3552r-fixes-v5-3-fb429c3a6515@baylibre.com Signed-off-by: Jonathan Cameron commit ede84c4556598b8899a93890d881bd407650c344 Author: Angelo Dureghello Date: Wed Apr 9 20:36:29 2025 +0200 docs: iio: add documentation for ad3552r driver Add documentation for ad3552r driver, needed to describe the high-speed driver debugfs attributes and shows how the user may use them. Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250409-wip-bl-ad3552r-fixes-v5-2-fb429c3a6515@baylibre.com Signed-off-by: Jonathan Cameron commit 029035636de37395124a602c830152ef39a35fab Author: Angelo Dureghello Date: Wed Apr 9 20:36:28 2025 +0200 iio: dac: adi-axi-dac: add cntrl chan check Add validity check on CNTRL_X channels (valid as 0 to 15). Reviewed-by: Nuno Sá Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250409-wip-bl-ad3552r-fixes-v5-1-fb429c3a6515@baylibre.com Signed-off-by: Jonathan Cameron commit b1ba43263e616342185c4d1ced2e96dee4f96d39 Author: Jean-Baptiste Maneyrol Date: Thu Apr 10 17:39:41 2025 +0200 iio: imu: inv_icm42600: switch to use generic name irq get Use generic fwnode_irq_get_byname() for getting interrupt pin using interrupt name. Only INT1 is supported by the driver currently. If not found fallback to first defined interrupt to keep compatibility. Signed-off-by: Jean-Baptiste Maneyrol Link: https://patch.msgid.link/20250410-iio-imu-inv-icm42600-rework-interrupt-using-names-v4-2-19e4e2f8f7eb@tdk.com Signed-off-by: Jonathan Cameron commit 6b4079ccbfef213cb418e5a9cf4386393db1e6ea Author: Jean-Baptiste Maneyrol Date: Thu Apr 10 17:39:40 2025 +0200 dt-bindings: iio: imu: icm42600: add interrupt naming support Add interrupt-names field for specifying interrupt pin configured. Chips are supporting up to 2 interrupt pins with configurable interrupt sources. Change interrupt to support 1 or 2 entries. Signed-off-by: Jean-Baptiste Maneyrol Acked-by: Conor Dooley Link: https://patch.msgid.link/20250410-iio-imu-inv-icm42600-rework-interrupt-using-names-v4-1-19e4e2f8f7eb@tdk.com Signed-off-by: Jonathan Cameron commit 3716068cb84dafaa9776ea703c3998a330aae061 Author: Matti Vaittinen Date: Mon Apr 7 14:36:59 2025 +0300 MAINTAINERS: A driver for TI/ROHM ADCs Add undersigned as a maintainer for the ti-adc128s052.c which supports a few TI's ADCs and the ROHM Semiconductor BD79704 ADC. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/b303bf42b84e7ab143ff6a4a810f7d788e210b86.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit fbc18f27cf214347d121ceb943b0ac07b5f07249 Author: Matti Vaittinen Date: Mon Apr 7 14:36:47 2025 +0300 iio: adc: ti-adc128s052: Support ROHM BD79104 The ROHM BD79104 ADC has identical SPI communication logic as the ti-adc128s052. Eg, SPI transfer should be 16 clk cycles, conversion is started when the CS is pulled low, and channel selection is done by writing the channel ID after two zero bits. Data is contained in big-endian format in the last 12 bits. The BD79104 has two input voltage pins. Data sheet uses terms "vdd" and "iovdd". The "vdd" is used also as an analog reference voltage. Hence the driver expects finding these from the device-tree, instead of having the "vref" only as TI's driver. NOTE: The TI's data sheet[1] does show that the TI's IC does actually have two voltage inputs as well. Pins are called Va (analog reference) and Vd (digital supply pin) - but I keep the existing driver behaviour for the TI's IC "as is", because I have no HW to test changes, and because I have no real need to touch it. NOTE II: The BD79104 requires SPI MODE 3. NOTE III: I used evaluation board "BD79104FV-EVK-001" made by ROHM. With this board I had to drop the SPI speed below the 20M which is mentioned in the data-sheet [2]. This, however, may be a limitation of the EVK board, not the component itself. Signed-off-by: Matti Vaittinen Datasheet: https://www.ti.com/lit/ds/symlink/adc128s052.pdf # [1] Datasheet: https://fscdn.rohm.com/en/products/databook/datasheet/ic/data_converter/dac/bd79104fv-la-e.pdf # [2] Link: https://patch.msgid.link/36ffa72cbdf8dbbdf1e612040db82ebcdf73fa24.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 944de7fce763f6233a03fdc496630ae0e259015f Author: Matti Vaittinen Date: Mon Apr 7 14:36:35 2025 +0300 iio: adc: ti-adc128s052: Simplify using guard(mutex) Error path in ADC reading function can be slighly simplified using the guard(mutex). Use guard(mutex) and document the mutex purpose. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/c4262cbf55748d505a74249d2bf46d7c3594d838.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 804757a221a9258eca90129aff4b136abe335446 Author: Matti Vaittinen Date: Mon Apr 7 14:36:23 2025 +0300 iio: adc: ti-adc128s052: Use devm_mutex_init() Quoting Jonathan: "Whilst it doesn't bring huge advantage, now we have devm_mutex_init() it seems reasonable to use it and maybe catch a use after free for the lock" Switch to use devm_mutex_init() while working on this file. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/efe4a039e2bfbf4dcf30743f6b7b88fce3b9ee39.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 6c41d590722c5753d9f15b73d7724a7950c36bf2 Author: Matti Vaittinen Date: Mon Apr 7 14:36:11 2025 +0300 iio: adc: ti-adc128s052: Be consistent with arrays The ti-adc128s052 driver has NULL terminated ID arrays for the of_device_id, spi_device_id and acpi_device_id. All of these are terminated by having an empty string as the last member of an array. Only the of_device_id array uses the /* sentinel */ comment. It's better to be consistent. This /* sentinel */ comment serves no real purpose these days as people are used to seeing these ID lists terminated with an empty array element. Drop the /* sentinel */ from the of_device_id. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/bb58002accc696bd4a8fbbab37100c6fa0c29941.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 7af2ea72d680327069ad8d9cd63052369e99bbb7 Author: Matti Vaittinen Date: Mon Apr 7 14:35:56 2025 +0300 iio: adc: ti-adc128s052: Simplify using be16_to_cpu() The register data is 12-bit big-endian data. Use be16_to_cpu() to do the conversion, and simple bitwise AND for masking to make it more obvious. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/8202060d90221beb9b8cf467606641349ad47fe9.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 085831cfce61fc5e326f31eec1976414e71f4c17 Author: Matti Vaittinen Date: Mon Apr 7 13:45:06 2025 +0300 dt-bindings: ROHM BD79104 ADC The ROHM BD79104 is a 12-bit, 8-channel ADC with two power supply pins, connected to SPI. It's worth noting the IC requires SPI MODE 3, (CPHA = 1, CPOL = 1). I used an evaluation board "BD79104FV-EVK-001" from ROHM. With this board I had problems to have things working correctly with higher SPI clock frequencies. I didn't do thorough testing for maximum frequency though. First attempt was 40M, then 20M and finally 4M. With 20M it seemed as if the read values were shifted by 1 bit. With 4M it worked fine. The component data-sheet is not exact what comes to the maximum SPI frequency. It says SPI frequency is 20M - "unless othervice specified". Additionally, it says that maximum sampling rate is 1Mhz, and since reading a sample requires writing the channel (16 bits) and reading data (16 bits) - we get some upper limit from this. >From the "frequency is 20M, unless othervice specified" I picked the maximum frequency 20M - and did assumption that my problems with 20M weren't related to the BD79104 - but to the evaluation board "BD79104FV-EVK-001". Add bindings for the ROHM BD79104 ADC. Signed-off-by: Matti Vaittinen Reviewed-by: Conor Dooley Link: https://patch.msgid.link/2a4c65ee35cb79c6b29dbc59cfd9bc7d615a08ac.1744022065.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit c3c8492cecf03811782e7c81fcaf5304866c4f48 Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:45 2025 +0200 iio: addac: ad74115: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-7-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit b8b3ea642911dacd0b99bc7196e8f6e64a48393d Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:44 2025 +0200 iio: addac: ad74413r: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-6-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit 3bb36fe0587aa23b8fd739c3df9ff02049cc7789 Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:43 2025 +0200 iio: adc: ad4130: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-5-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit 6c6881af0172c7dfab633346f05347e6fd30c610 Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:42 2025 +0200 iio: adc: ti-ads7950: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-4-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit 8a2d2326f5ef42e34bd2c946ae74d6ff7c2f2767 Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:41 2025 +0200 iio: dac: ad5592r: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-3-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit 135e101f4dd6e4177a1fbe587cb484f5827b4b88 Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:40 2025 +0200 iio: dac: ad5592r: use lock guards Use lock guards from linux/cleanup.h to simplify the code and remove some labels. Note that we need to initialize some variables even though it's not technically required as scoped_guards() are implemented as for loops. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-2-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit 0f8d8b3548fbbc1ee04ffa5a9bee4e57d3cf447c Author: Bartosz Golaszewski Date: Wed Apr 9 10:40:39 2025 +0200 iio: dac: ad5592r: destroy mutexes in detach paths The locks used here are initialized but never released which causes resource leaks with mutex debugging enabled. Add missing calls to mutex_destroy() or use devres if applicable. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250409-gpiochip-set-rv-iio-v2-1-4b36428f39cb@linaro.org Signed-off-by: Jonathan Cameron commit a34b88b48a15f5d49207966fa78e14e71e16ac6c Author: Matti Vaittinen Date: Mon Apr 7 10:30:47 2025 +0300 iio: bd79124: Use set_rv and set_multiple_rv The new GPIO callbacks 'set_rv' and 'set_multiple_rv' allow returning a success code to indicate failures when setting GPIO status. Use them to allow callers to know when things go south. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/Z_N_J52IZ2IaWawl@mva-rohm Signed-off-by: Jonathan Cameron commit 2a44c3ed8063e9bb0254b3bbcd13a853ef80cbed Author: Jonathan Cameron Date: Sun Apr 6 16:31:19 2025 +0100 MAINTAINERS: IIO: Update reviewers for the subsystem Lars-Peter has not been active in IIO reviewing for some time. Without David, Nuno and Andy, along with many others who review IIO patches, I would not be able to keep up with the rate of change and would have become a bottleneck to development. Hence update the MAINTAINERS entry to more accurately reflect reality. This is not intended to give the 3 of them any more work or to oblige them to review any particular series, so if there are any series waiting a long time continue to poke me via the list. Acked-by: Andy Shevchenko Acked-by: Lars-Peter Clausen Acked-by: David Lechner Link: https://patch.msgid.link/20250406153120.2129133-1-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e96d35faf357743d4a46ae4ba2da98cba0930b83 Author: Angelo Dureghello Date: Thu Apr 3 18:19:06 2025 +0200 iio: adc: ad7606: add SPI offload support Add SPI offload support for this family. Signed-off-by: Angelo Dureghello Reviewed-by: David Lechner Link: https://patch.msgid.link/20250403-wip-bl-spi-offload-ad7606-v1-3-1b00cb638b12@baylibre.com Signed-off-by: Jonathan Cameron commit 89e1f95a61e54a5d74e819d311920e8ac002213b Author: Angelo Dureghello Date: Thu Apr 3 18:19:05 2025 +0200 doc: iio: ad7606: describe offload support Add a section to the ad7606 documentation describing how to use the driver with SPI offloading. Signed-off-by: Angelo Dureghello Reviewed-by: David Lechner Link: https://patch.msgid.link/20250403-wip-bl-spi-offload-ad7606-v1-2-1b00cb638b12@baylibre.com Signed-off-by: Jonathan Cameron commit 81fe5529e812d7176ff1e48783978504239a990e Author: Angelo Dureghello Date: Thu Apr 3 18:19:04 2025 +0200 dt-bindings: iio: adc: adi,ad7606: add SPI offload properties Add #trigger-source-cells property to allow the BUSY output to be used as a SPI offload trigger source to indicate when a sample is ready to be read. Macros are added to adi,ad7606.h for the cell values to help with readability since they are arbitrary values. Signed-off-by: Angelo Dureghello Reviewed-by: Rob Herring (Arm) Reviewed-by: David Lechner Link: https://patch.msgid.link/20250403-wip-bl-spi-offload-ad7606-v1-1-1b00cb638b12@baylibre.com Signed-off-by: Jonathan Cameron commit 81a481f6256414b4e1ee2b014fc5f8e5e9d1678b Author: David Lechner Date: Tue Apr 1 17:50:12 2025 -0500 Documentation: iio: ad7380: add AD7389-4 Document support for AD7389-4 and it's quirks. Signed-off-by: David Lechner Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-5-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron commit 98a002674856f9452ffe225b6d61d848d1c0e79d Author: David Lechner Date: Tue Apr 1 17:50:11 2025 -0500 iio: adc: ad7380: add ad7389-4 Add chip info for AD7389-4 to the ad7380 driver. This is essentially the same as ad7380-4 except that it is internal- reference-only instead of external-reference-only. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-4-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron commit d63a749bf75a8e44add76cbeb470ddac22b45352 Author: David Lechner Date: Tue Apr 1 17:50:10 2025 -0500 iio: adc: ad7380: move internal reference voltage to chip_info Move the internal reference voltage value to the chip_info structure. Before this change, only ADAQ chips could be internal_ref_only and only non-ADAQ chips could be external_ref_only. Now, this restriction is removed. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-3-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron commit abb97cc0ff56b103fb74239ea08a601dd1633746 Author: David Lechner Date: Tue Apr 1 17:50:09 2025 -0500 iio: adc: ad7380: rename internal_ref_only Rename adaq_internal_ref_only to internal_ref_only_adaq. There are non- ADAQ chips in the family that are also internal reference only, so the adaq_ prefix is misleading. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-2-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron commit ebe0b2a86a9ea995eaa934d146edd1545bdc8505 Author: David Lechner Date: Tue Apr 1 17:50:08 2025 -0500 dt-bindings: iio: adc: ad7380: add AD7389-4 Add compatible and quirks for AD7389-4. This is essentially the same as AD7380-4 but instead of having no internal reference, it has no external reference voltage supply. Signed-off-by: David Lechner Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-1-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron commit 5d1dff5b45b7e81206ada46ae996f58129a68a7c Author: Jonathan Cameron Date: Mon Mar 31 13:13:17 2025 +0100 iio: Adjust internals of handling of direct mode claiming to suit new API. Now there are no remaining callers of iio_device_claim_direct_mode() and iio_device_release_direct_mode() rename those functions to ensure they are not used in new drivers. Also make them now return booleans in line with the sparse friendly static inline wrappers. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-38-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 692760702f80abb227cb6cd1f961cf13a4088b4c Author: Jonathan Cameron Date: Mon Mar 31 13:13:16 2025 +0100 staging: iio: ad5933: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-37-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e2729d5e04b9d1e76fb94373ffb27a85e6d9020b Author: Jonathan Cameron Date: Mon Mar 31 13:13:15 2025 +0100 iio: temp: maxim_thermocouple: Drop unused mutex.h include. There are no mutex related calls in this driver. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-36-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 3332487099013f48108080f9c8ffeaddbef3724e Author: Jonathan Cameron Date: Mon Mar 31 13:13:14 2025 +0100 iio: temp: maxim_thermocouple: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Tidy up a few direct returns whilst here. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-35-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 0ed4424478d36c8301dd4fbc18a49eafb5e67569 Author: Jonathan Cameron Date: Mon Mar 31 13:13:13 2025 +0100 iio: proximity: sx9500: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-34-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 3e3f57659b3d1affc21c8315164fc60e3d2ed7c5 Author: Jonathan Cameron Date: Mon Mar 31 13:13:12 2025 +0100 iio: proximity: pulsed-light: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-33-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 9dc7ed3bfe437b3a9fc5399fbe594a4b054eeeec Author: Jonathan Cameron Date: Mon Mar 31 13:13:11 2025 +0100 iio: proximity: hx9023s: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Yasin Lee Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-32-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 66024cb953d2a89078374cff459c0cefaa4c576b Author: Jonathan Cameron Date: Mon Mar 31 13:13:10 2025 +0100 iio: pressure: zpa2326: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-31-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 71a998e791d828eae5dee08fa838d29a1297d80b Author: Jonathan Cameron Date: Mon Mar 31 13:13:09 2025 +0100 iio: pressure: rohm-bm1390: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: Matti Vaittinen Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-30-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 1bfa7698bc9f5ec510d6082dc8f4fd4a58059764 Author: Jonathan Cameron Date: Mon Mar 31 13:13:08 2025 +0100 iio: pressure: ms5611: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-29-jic23@kernel.org Signed-off-by: Jonathan Cameron commit d2de91b3eded57bc02a59ce154080cade7e7917b Author: Jonathan Cameron Date: Mon Mar 31 13:13:07 2025 +0100 iio: pressure: mpl3115: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-28-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 770ee1a2c5d99a72914f521f894d6d1c0624837a Author: Jonathan Cameron Date: Mon Mar 31 13:13:06 2025 +0100 iio: pressure: mpl3115: factor out core of IIO_INFO_RAW read to simplify code flow Apply guard(mutex) to remove the need for manual release of the lock. Factor out the code that occurs under the direct claim. These two changes allow for direct returns simplifying code flow. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-27-jic23@kernel.org Signed-off-by: Jonathan Cameron commit b2a3a51000a71cd33337b05b5a3df78ba89a6727 Author: Jonathan Cameron Date: Mon Mar 31 13:13:05 2025 +0100 iio: pressure: icp10100: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Jean-Baptiste Maneyrol Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-26-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 74fc7aacda0f97758df9b2a0ddfe385a6d0e1f35 Author: Jonathan Cameron Date: Mon Mar 31 13:13:04 2025 +0100 iio: pressure: dlhl60d: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-25-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e0a4d6a93eb10ab255cd50fcc5375cc788e32ec5 Author: Jonathan Cameron Date: Mon Mar 31 13:13:03 2025 +0100 iio: magnetometer: rm3100: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-24-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 587895606e1193cecc16adc650d7d20b719fa86c Author: Jonathan Cameron Date: Mon Mar 31 13:13:02 2025 +0100 iio: magnetometer: mag3110: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-23-jic23@kernel.org Signed-off-by: Jonathan Cameron commit b5228482ebb9239c494e51aa8814ba1b4033d20a Author: Jonathan Cameron Date: Mon Mar 31 13:13:01 2025 +0100 iio: magnetometer: mag3110: Factor out core of read/write_raw() and use guard() to simplify code flow. The combination of guard(mutex) and factoring out sections of code that occur with the device held in direct mode simplifies code flow. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-22-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 0daeba3edabf61a273779280153903e6a0bca4be Author: Jonathan Cameron Date: Mon Mar 31 13:13:00 2025 +0100 iio: imu: st_lsm6dsx: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Lorenzo Bianconi Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-21-jic23@kernel.org Signed-off-by: Jonathan Cameron commit a332a90eacd1fe6e5031f9b4dd0007c1f0375f02 Author: Jonathan Cameron Date: Mon Mar 31 13:12:59 2025 +0100 iio: imu: st_lsm6dsx: Switch to sparse friendly claim/release_direct() This driver caused a false positive with __cond_lock() style solution but is fine with the simple boolean return approach now used. Acked-by: Lorenzo Bianconi Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-20-jic23@kernel.org Signed-off-by: Jonathan Cameron commit ee56bbcaad718a73058a80c500def21755715a24 Author: Jonathan Cameron Date: Mon Mar 31 13:12:58 2025 +0100 iio: imu: st_lsm6dsx: Factor out parts of st_lsm6dsx_shub_write_raw() to allow direct returns By factoring out all the code that occurs with direct mode claimed to a helper function, that helper function can directly return simplifying code flow. Acked-by: Lorenzo Bianconi Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-19-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 59d3109aabf10af0451fff862e9bc0a3bd48f0b7 Author: Jonathan Cameron Date: Mon Mar 31 13:12:57 2025 +0100 iio: imu: smi240: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Shen Jianping Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-18-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 4455bc5c303ba93720f5944b7230698661514651 Author: Jonathan Cameron Date: Mon Mar 31 13:12:56 2025 +0100 iio: imu: inv_mpu6050: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Jean-Baptiste Maneyrol Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-17-jic23@kernel.org Signed-off-by: Jonathan Cameron commit cbff19a382bbedd2a247ca9fc52fc1a884f13ac3 Author: Jonathan Cameron Date: Mon Mar 31 13:12:55 2025 +0100 iio: imu: inv_icm42600: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Jean-Baptiste Maneyrol Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-16-jic23@kernel.org Signed-off-by: Jonathan Cameron commit ca75b9fb28d6c61f45be36269e0f2ef4f0cd17e0 Author: Jonathan Cameron Date: Mon Mar 31 13:12:54 2025 +0100 iio: humidity: hts211: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Lorenzo Bianconi Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-15-jic23@kernel.org Signed-off-by: Jonathan Cameron commit db532a4114c7d35c3cf53a960e92ac4b00aea49c Author: Jonathan Cameron Date: Mon Mar 31 13:12:53 2025 +0100 iio: humidity: hts211: Factor out everything under direct mode claim into helper functions. Pulling out the functionality of read_raw() and write_raw() callbacks so that only the mode claim is done in the initial call allows for direct returns and simpler error handling in the new __hts211_write_raw() / __hts211_read_raw() functions. Acked-by: Lorenzo Bianconi Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-14-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 35a34861ce8f719a32dc375a8c200dcf4774f21e Author: Jonathan Cameron Date: Mon Mar 31 13:12:52 2025 +0100 iio: humidity: hdc2010: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Eugene Zaikonnikov Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-13-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 0d51e888e03074591a83ea6458d58a25e303d90a Author: Jonathan Cameron Date: Mon Mar 31 13:12:51 2025 +0100 iio: humidity: hdc100x: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-12-jic23@kernel.org Signed-off-by: Jonathan Cameron commit d9e6b59e5ba942e7d804588e778bf0bdbbd6cca7 Author: Jonathan Cameron Date: Mon Mar 31 13:12:50 2025 +0100 iio: humidity: hdc100x: Use guard(mutex) to simplify code flow By using autoreleasing on the lock a number of paths can use direct returns allow earlier exit from functions. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-11-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 6c9dc1e8f296effd17f36a4653f6928c17a16dce Author: Jonathan Cameron Date: Mon Mar 31 13:12:49 2025 +0100 iio: health: max30102: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. This particular case is about ensuring the mode does not change rather than ensuring we are in direct mode. A follow up may cleanup the buffer mode claim. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-10-jic23@kernel.org Signed-off-by: Jonathan Cameron commit fcc065fdf52fc8da44b17125449838118a4aeeff Author: Jonathan Cameron Date: Mon Mar 31 13:12:48 2025 +0100 iio: gyro: adxrs290: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Nishant Malpani Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-9-jic23@kernel.org Signed-off-by: Jonathan Cameron commit f664ab98b2385c53b60cada81da576fb5cf2c6f6 Author: Jonathan Cameron Date: Mon Mar 31 13:12:47 2025 +0100 iio: common: st_sensors: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-8-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 0ceb75d0afae08ea917bbd0c195403549151c05b Author: Jonathan Cameron Date: Mon Mar 31 13:12:46 2025 +0100 iio: common: scmi: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Jyoti Bhayana Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-7-jic23@kernel.org Signed-off-by: Jonathan Cameron commit ba22e78635f9610276ef60d8361c3b1337cbff57 Author: Jonathan Cameron Date: Mon Mar 31 13:12:45 2025 +0100 iio: chemical: scd4x: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Roan van Dijk Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-6-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 3976dc8323408f2b10d03f271d1f1b8f6eacd41b Author: Jonathan Cameron Date: Mon Mar 31 13:12:44 2025 +0100 iio: chemical: atlas-sensor: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-5-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e9786c540804c354cd503864208f6ca54fea73b8 Author: Jonathan Cameron Date: Mon Mar 31 13:12:43 2025 +0100 iio: chemical: ccs811: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-4-jic23@kernel.org Signed-off-by: Jonathan Cameron commit fef6da136ef2835f18995a45f7b48847cff17b35 Author: Jonathan Cameron Date: Mon Mar 31 13:12:42 2025 +0100 iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to simplify error paths. Factor out the implementation of this part of read_raw() and use guard() to allow direct returns, simplifying both error and non error paths. Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-3-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 36ee4794dd791e69f9402d5dc4a52968af36a936 Author: Jonathan Cameron Date: Mon Mar 31 13:12:41 2025 +0100 iio: addac: ad74115: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Cosmin Tanislav Reviewed-by: David Lechner Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250331121317.1694135-2-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 7df3a6eb5c396366c8de5687a2c9dde42dcd66d7 Author: Uwe Kleine-König Date: Mon Mar 17 12:52:49 2025 +0100 iio: adc: ad7124: Make register naming consistent Cleanup definition of register related constants: - Use the register and field names exactly as documented in the data sheet. - Consistently use _ to name a register's bitfield. - Drop _MSK definitions and implicit FIELD_PREP calls. - Consistent indentation. Signed-off-by: Uwe Kleine-König Link: https://patch.msgid.link/20250317115247.3735016-8-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron commit 7dd17a4e98735b112e25860b3767901799ea0d61 Author: Uwe Kleine-König Date: Mon Mar 17 12:52:48 2025 +0100 iio: adc: ad7124: Remove ability to write filter_low_pass_3db_frequency There are several issues with the function that implements writing to the filter_low_pass_3db_frequency property: - The sinc3 factor should be 0.272 not 0.262 (this is fixed for the reading side in the previous patch). - For freq > 1 the if condition is always true so the sinc4 filter is hardly ever chosen. - In the nearly always taken if branch the filter is set to sinc3, but the frequency is set for sinc4. (And vice versa in the else branch.) This is broken enough to justify the claim that there isn't any serious user. Also it it counter-intuitive that setting the 3db frequency modifies the sample frequency and the filter type. So drop the ability to write that property. Signed-off-by: Uwe Kleine-König Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250317115247.3735016-7-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron commit 8712e4986e7ce42a14c762c4c350f290989986a5 Author: Uwe Kleine-König Date: Mon Mar 17 12:52:47 2025 +0100 iio: adc: ad7124: Fix 3dB filter frequency reading The sinc4 filter has a factor 0.23 between Output Data Rate and f_{3dB} and for sinc3 the factor is 0.272 according to the data sheets for ad7124-4 (Rev. E.) and ad7124-8 (Rev. F). Fixes: cef2760954cf ("iio: adc: ad7124: add 3db filter") Signed-off-by: Uwe Kleine-König Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/20250317115247.3735016-6-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron commit 8c411d4b96554972edc3b571cbef2d59fa0d907f Author: Marcelo Schmitt Date: Thu Mar 27 18:25:29 2025 -0300 Documentation: iio: ad4000: Describe offload support When SPI offloading is supported, the IIO device provides different sysfs interfaces to allow using the adjusting the sample rate. Document SPI offload support for AD4000 and similar devices. Reviewed-by: David Lechner Signed-off-by: Marcelo Schmitt Link: https://patch.msgid.link/eb94013b1a4d66a8492cf094aef3e4410f81d22b.1743110188.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron commit d66b2c84fb675b6ac2ffe285bf447b18badf6e4b Author: Marcelo Schmitt Date: Thu Mar 27 18:25:12 2025 -0300 Documentation: iio: ad4000: Add IIO Device characteristics section Complement ad4000 IIO driver documentation with considerations about ``_scale_available`` attribute and table of typical channel attributes. Reviewed-by: David Lechner Signed-off-by: Marcelo Schmitt Link: https://patch.msgid.link/6c8fe68d7d413ffdd33b154ba45600c7ce7013da.1743110188.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron commit 66ac231508335ac1098eb6b7b58f2bc92b67ef98 Author: Marcelo Schmitt Date: Thu Mar 27 18:24:53 2025 -0300 Documentation: iio: ad4000: Add new supported parts Commit ("iio: adc: ad4000: Add support for PulSAR devices"), extended the ad4000 driver supports many single-channel PulSAR devices. Update IIO ad4000 documentation with the extra list of supported devices. Reviewed-by: David Lechner Signed-off-by: Marcelo Schmitt Link: https://patch.msgid.link/2b602abd0773af91e7ccd9dd7a2afe67f4792f95.1743110188.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron commit 59b51edf717b0661a2aad8eb6cc9ff09611830fe Author: Marcelo Schmitt Date: Thu Mar 27 18:24:35 2025 -0300 iio: adc: ad4000: Add support for SPI offload FPGA HDL projects can include a PWM generator in addition to SPI-Engine. The PWM IP is used to trigger SPI-Engine offload modules that in turn set SPI-Engine to execute transfers to poll data from the ADC. That allows data to be read at the maximum sample rates. Also, it is possible to set a specific sample rate by setting the proper PWM duty cycle and related state parameters, thus allowing an adjustable ADC sample rate when a PWM (offload trigger) is used in combination with SPI-Engine. Add support for SPI offload. Signed-off-by: Marcelo Schmitt Link: https://patch.msgid.link/386ce043a0e3fc9e8ff71f17aef8de128ce5869e.1743110188.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron commit ff2e2a5c524f414c2b9a5926835d871fb4291c06 Author: David Lechner Date: Mon Mar 31 14:29:54 2025 -0500 iio: adc: ad7944: drop bits_per_word hack Remove setting bits_per_word in SPI xfers without data. The shortcoming that this was working around was fixed in the SPI controller driver, so it is no longer necessary. And we don't need this to be cargo-culted to new drivers. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250331-iio-adc-ad7944-drop-bits_per_word-hack-v1-1-2b952e033340@baylibre.com Signed-off-by: Jonathan Cameron commit 7a84e33afebd97b46b994c1d78d57ab88a180e9a Author: Matti Vaittinen Date: Wed Apr 2 09:46:44 2025 +0300 iio: dac: bd79703: Support ROHM BD79702 The ROHM BD79702 is similar to the BD79703, except that it has only 4 channels whereas BD79703 has 6 channels. The channel 'addresses' of the first two channels (used to identify the channel when data is read over SPI) are same for both ICs. The next two channels of the BD79702 have same addresses as the last two channels of the BD79703. This means the BD79702 channel addresses do not follow the channel numbers with a constant offset. Thus, we need to specify the addresses separately, instead of directly deriving them from the channel number with a constant offset. It's worth noting that the data-sheet describes the BD79702 as a device having channels 1,2,5 and 6. The driver however represents channels 0,1,2,3 to the users - with no gaps in the numbering - which may be more familiar view for the application software. Support ROHM BD79702 DAC. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/0ba243a63115dd4af03ebf9656c65b8c259a3e34.1743576022.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 25468dbb81fcc75cdaa9b2a0c2b652bc5c55a8a1 Author: Matti Vaittinen Date: Wed Apr 2 09:46:30 2025 +0300 iio: dac: bd79703: Support BD79700 and BD79701 The BD79700 and BD79701 look like almost exact subsets of the BD79703. The BD79703 contains 6 channels (channels 0 to 5). The BD79700 provides only 2 channels, matching the BD79703 channels 0 and 1. The BD79701 provides 3 channels (matching BD79703 channels 0, 1, and 2). Furthermore, the BD79700 and BD79701 do not have separate VFS pin but use VCC for the full-scale voltage. Suopport these ICs using the BD79703 driver. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/845aa45974f6fb81c83046368a24a0674e9a8b0e.1743576022.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 67c318c46cec4da84e24010029718f90812bdfff Author: Matti Vaittinen Date: Wed Apr 2 09:46:13 2025 +0300 iio: dac: bd79703: Add chip data Add a chip data structure which allows handling the different variants (ROHM BD79700, BD79701) with different number of channels. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/2cacb4bec5455fe1aa58a0b28d2d91b96a396d1a.1743576022.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit f026928c20ba47ce6ca7d52aaa28a834914ed580 Author: Matti Vaittinen Date: Wed Apr 2 09:45:56 2025 +0300 iio: dac: bd79703 Store device address to 'address' The ROHM BD79703 needs to identify a channel which we are reading from in the SPI transfers. This can be seen as an address for the device. For the bd79703 the address is nicely aligned with the channel number, so the driver uses the channel ID for the SPI transfers. This, however, does not need to be the case. The iio_chan_spec has a separate 'address' field, which we can populate directly with this information. This helps adding new ICs like the ROHM BD79702 where the channel ID is different from this address to be handled by this driver, so we don't need to have separate, IC specific mapping for channel numbers <=> addresses. Make the 'address' field in the iio_chan_spec to contain the SPI protocol address for the channel, and use this value in the transfers. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/e53cb4120d16a3c678e1f391b600af630d6767ce.1743576022.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 04f0bc81d6017b9ec80fbe0e00fe9ee02cfd42c4 Author: Matti Vaittinen Date: Wed Apr 2 09:44:36 2025 +0300 dt-bindings: Add ROHM BD7970x variants The ROHM BD79700, BD79701 and BD79702 are subsets of the BD79703 DAC. The main difference is the number of the channels. BD79703 has 6 channels. The BD79702 has 4, BD79701 3 and BD79700 2 channels. Additionally, the BD79700 and BD79701 do not have separate Vfs pin but use the Vcc also for the full-scale voltage. Add properties for the BD79700, BD79701 and BD79702. Signed-off-by: Matti Vaittinen Acked-by: Conor Dooley Link: https://patch.msgid.link/0a114565e4de52bf8f98c4f9d17943e5148b0112.1743576022.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 1850e6ae7f91135d9224f58d5944ba2fd29261fc Author: David Heidelberg Date: Wed Apr 2 21:33:28 2025 +0200 iio: light: al3320a: Implement regmap support Modernize and clean up the driver using the regmap framework. With the regmap implementation, the compiler produces a significantly smaller module. Size before: 72 kB Size after: 58 kB Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250402-al3010-iio-regmap-v4-5-d189bea87261@ixit.cz Signed-off-by: Jonathan Cameron commit 0e5e21e23dd6ca4aaf96c99726230110b1a0b448 Author: David Heidelberg Date: Wed Apr 2 21:33:27 2025 +0200 iio: light: al3010: Implement regmap support Modernize and clean up the driver using the regmap framework. With the regmap implementation, the compiler produces a significantly smaller module. Size before: 72 kB Size after: 58 kB Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250402-al3010-iio-regmap-v4-4-d189bea87261@ixit.cz Signed-off-by: Jonathan Cameron commit b8154f3477c46453c8be3257d194cf5fdf5b5a23 Author: David Heidelberg Date: Wed Apr 2 21:33:26 2025 +0200 iio: light: al3320a: Fix an error handling path in al3320a_probe() If regmap_write() fails in al3320a_init(), al3320a_set_pwr_off is not called. In order to avoid such a situation, move the devm_add_action_or_reset() which calls al3320a_set_pwr_off right after a successful al3320a_set_pwr_on. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250402-al3010-iio-regmap-v4-3-d189bea87261@ixit.cz Signed-off-by: Jonathan Cameron commit c0461f8e842495041c18b2c67647501d55c17441 Author: David Heidelberg Date: Wed Apr 2 21:33:25 2025 +0200 iio: light: al3000a: Fix an error handling path in al3000a_probe() If regmap_write() fails in al3000a_init(), al3000a_set_pwr_off is not called. In order to avoid such a situation, move the devm_add_action_or_reset() which calls al3000a_set_pwr_off right after a successful al3000a_set_pwr_on. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250402-al3010-iio-regmap-v4-2-d189bea87261@ixit.cz Signed-off-by: Jonathan Cameron commit 42b1a2663f4b7630f3a2793969f9c8f2ff451db4 Author: David Heidelberg Date: Wed Apr 2 21:33:24 2025 +0200 iio: light: al3010: Improve al3010_init error handling with dev_err_probe() Minor code simplifications and improved error reporting. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250402-al3010-iio-regmap-v4-1-d189bea87261@ixit.cz Signed-off-by: Jonathan Cameron commit cac2bc675bcfa1441283fd0f438a709dba419840 Author: Jonathan Cameron Date: Sun Mar 9 17:06:33 2025 +0000 iio: light: vcnl4035: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. This case triggered a false positive from sparse, resolved by factoring out the code that includes the claim and release of direct mode. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-19-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 8d7c205ff9ff8fedd86d704c21f80471f0de7547 Author: Jonathan Cameron Date: Sun Mar 9 17:06:32 2025 +0000 iio: light: vcnl4000: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. To simplify the code whilst making the change (and avoid potential false positives from sparse), split the enabling and disabling of thresholds into separate functions. This could have been done in two steps by splitting the functions first, but would have meant rewriting the enable function twice. Cc: Astrid Rost Tested-by: Per-Daniel Olsson Reviewed-by: Per-Daniel Olsson Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-18-jic23@kernel.org Signed-off-by: Jonathan Cameron commit abce31c33db6c2c8632214e126fde2e6423279cf Author: Jonathan Cameron Date: Sun Mar 9 17:06:31 2025 +0000 iio: light: tcs3472: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-17-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 65a6ce5aeb82f1446fef4bd915319f5414ddecfa Author: Jonathan Cameron Date: Sun Mar 9 17:06:30 2025 +0000 iio: light: tcs3414: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-16-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 565e9c17e4dc4ce870c9d2b8c988a50744fff9e6 Author: Jonathan Cameron Date: Sun Mar 9 17:06:29 2025 +0000 iio: light: st_uvis25: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-15-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 43622f88b06d04fee68e131ed81f69873c8a3e98 Author: Jonathan Cameron Date: Sun Mar 9 17:06:28 2025 +0000 iio: light: si1145: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-14-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e0dc0feb991b07df6b4b80d5fd417a3967b8ebb7 Author: Jonathan Cameron Date: Sun Mar 9 17:06:27 2025 +0000 iio: light: rpr0521: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-13-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 9c97c7d2a9019da73c87839ccb4baa3d75095fc0 Author: Jonathan Cameron Date: Sun Mar 9 17:06:26 2025 +0000 iio: light: rpr0521: Factor out handling of IIO_INFO_RAW and use guard() Factor out the code which is only called with the direct mode claimed. This and the use of guard(mutex) allows direct returns simplifying code flow. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-12-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e08acc4c82a3305c1c9c57d2f148d4d21ae949ce Author: Jonathan Cameron Date: Sun Mar 9 17:06:25 2025 +0000 iio: light: rohm-bu27034: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Matti Vaittinen Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-11-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 7e8c0ec196e789ea5a47e86bba0be4ce8345f447 Author: Jonathan Cameron Date: Sun Mar 9 17:06:24 2025 +0000 iio: light: opt4060: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. This is a case where the code is pinning down the mode so also has a claim on buffered mode. A follow up set may move those calls over to a sparse friendly form as well. Tested-by: Per-Daniel Olsson Reviewed-by: Per-Daniel Olsson Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-10-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 2983ad971d02489a753df6ea44027c231baad555 Author: Jonathan Cameron Date: Sun Mar 9 17:06:23 2025 +0000 iio: light: ltr501: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-9-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 5a7387f208e55ab33f389e3eb1584dd873c40acb Author: Jonathan Cameron Date: Sun Mar 9 17:06:22 2025 +0000 iio: light: ltr501: Factor out core of write_raw() where direct mode claim is held. Factoring this code out allows for direct returns on error simplifying code flow. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-8-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 05e50a1da59261873e9033d7f96ed9fdbe9e28e0 Author: Jonathan Cameron Date: Sun Mar 9 17:06:21 2025 +0000 iio: light: ltr501: Factor out IIO_INFO_RAW leg of read_raw() callback. Factoring this code out allows for direct returns, simplifying code flow. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-7-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 6025d20bc3ed7f4748742b30ca131bac0da6b254 Author: Jonathan Cameron Date: Sun Mar 9 17:06:20 2025 +0000 iio: light: as73211: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated Cc: Javier Carrasco Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-6-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 8dd92667f0a55ca5b848bae36bbf7ad4a8837ccc Author: Jonathan Cameron Date: Sun Mar 9 17:06:19 2025 +0000 iio: light: as73211: Use guard() and move mode switch into inner write_raw fucntion By using guard(mutex) and moving code that switches the device to config mode into _as73211_write_raw() the error flow is simplified. Cc: Javier Carrasco Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-5-jic23@kernel.org Signed-off-by: Jonathan Cameron commit d793d614dc3f771901d3d10c5079830743dec897 Author: Jonathan Cameron Date: Sun Mar 9 17:06:18 2025 +0000 iio: light: isl29125: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-4-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 403443117b0234b8dfe834a077fbac693e6c9d7e Author: Jonathan Cameron Date: Sun Mar 9 17:06:17 2025 +0000 iio: light: gp2ap020a00f: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-3-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 354eedf0083f4d7b22743b84e9419a560e862377 Author: Jonathan Cameron Date: Sun Mar 9 17:06:16 2025 +0000 iio: light: apds9306: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Acked-by: Subhajit Ghosh Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309170633.1347476-2-jic23@kernel.org Signed-off-by: Jonathan Cameron commit c86f8e8f9f56dcda51f785c0b0fd318a9af13bfb Author: Jonathan Cameron Date: Sun Mar 9 16:58:19 2025 +0000 iio: adc: rcar: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Marek Vasut Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-9-jic23@kernel.org Signed-off-by: Jonathan Cameron commit e6d364b4086226964fe9e67632e1ba5c27406171 Author: Jonathan Cameron Date: Sun Mar 9 16:58:18 2025 +0000 iio: adc: mxs-lradc: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-8-jic23@kernel.org Signed-off-by: Jonathan Cameron commit ee4ef2cbf40ec3297220aff7958f1bb465475ca4 Author: Jonathan Cameron Date: Sun Mar 9 16:58:17 2025 +0000 iio: adc: ti-ads1015: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Marek Vasut Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-7-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 5655ba5ada999d08ff3e0c75e3c3ca9b0cd97ed2 Author: Jonathan Cameron Date: Sun Mar 9 16:58:16 2025 +0000 iio: adc: ti-ads1015: Use guard(mutex) and factor out code for INFO_RAW By use of automatic lock release and introducing a new utility function to handle the core activity of reading the ADC channel, many more complex code flows can be replaced by direct returns. Cc: Marek Vasut Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-6-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 3ba3800286bb8881d323659fd019cf6b746580d9 Author: Jonathan Cameron Date: Sun Mar 9 16:58:15 2025 +0000 iio: adc: ti-ads1100: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Mike Looijmans Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-5-jic23@kernel.org Signed-off-by: Jonathan Cameron commit d36adc77ee435d809fd9ba509e79c189be968050 Author: Jonathan Cameron Date: Sun Mar 9 16:58:14 2025 +0000 iio: adc: ti-ads1100: Use guard(mutex) to allow direct returns Use of automated lock release simplifies the code. Cc: Mike Looijmans Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-4-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 5fe8331928c6138292b81d4761a8370d75b393fa Author: Jonathan Cameron Date: Sun Mar 9 16:58:13 2025 +0000 iio: adc: vf610: Switch to sparse friendly iio_device_claim/release_direct() These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. Cc: Frank Li Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-3-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 16d92b70b261882a1360f7c25a6bc8b92ae52a6e Author: Jonathan Cameron Date: Sun Mar 9 16:58:12 2025 +0000 iio: adc: vf610: Move claim of direct mode to caller of vf610_read_sample and use guard(mutex) These two changes allow direct returns in all paths, improving code readablity. Cc: Frank Li Reviewed-by: David Lechner Link: https://patch.msgid.link/20250309165819.1346684-2-jic23@kernel.org Signed-off-by: Jonathan Cameron commit cfed1969fcfe69d0b0db780efe2b6fedeaf7f2b3 Author: Olivier Moysan Date: Fri Mar 14 18:14:46 2025 +0100 iio: trigger: stm32-lptimer: add support for stm32mp25 Add support for STM32MP25 SoC. Use newly introduced compatible to handle this new HW variant. Add new trigger definitions that can be used by the stm32 analog-to-digital converter. Use compatible data to identify them. Signed-off-by: Olivier Moysan Signed-off-by: Fabrice Gasnier Link: https://patch.msgid.link/20250314171451.3497789-4-fabrice.gasnier@foss.st.com Signed-off-by: Jonathan Cameron commit 0d0f3bfb4735d08171f82d9df2ccb6b61778878d Author: Gustavo A. R. Silva Date: Tue Mar 18 20:33:20 2025 +1030 iio: cros_ec: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c:39:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tzung-Bi Shih Link: https://patch.msgid.link/Z9lE6IVDeC5lnChN@kspp Signed-off-by: Jonathan Cameron commit c72ada9978d218874de768f729e673557bf9f330 Author: Gustavo A. R. Silva Date: Tue Mar 18 20:31:05 2025 +1030 iio: proximity: cros_ec_mkbp_proximity: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/iio/proximity/cros_ec_mkbp_proximity.c:63:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tzung-Bi Shih Link: https://patch.msgid.link/Z9lEYdPPIyiRGm36@kspp Signed-off-by: Jonathan Cameron commit dc0e07126ed47f0484d4c0c51c74b2515ec5e059 Author: David Lechner Date: Tue Mar 18 17:52:18 2025 -0500 iio: adc: ad7606_par: add ad7606c chips Add lookup table entries for ad7606c-16 and ad7606c-18 chips. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-10-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 3b5b55ca940733b7b533fe3137a307ceacb4fb90 Author: David Lechner Date: Tue Mar 18 17:52:17 2025 -0500 iio: adc: ad7606: dynamically allocate channel info Refactor the ad7606 drivers to dynamically allocate the channel info. The channel info was getting a bit unwieldy. In some cases, the indio_dev->channels field was getting assigned up to 3 different times, each in a different function, making it difficult to see where the info was coming from. This problem stems from the number of permutations of the channel array needed to support various modes of operation and data buses. We already have 4 per chip (hardware mode, software mode, AXI ADC backend and AXI ADC backend with software mode) and we intend to add two more per chip when adding SPI offload support. To make it easier to read and maintain, move all of the channel setup to a single function that dynamically allocates and fills in the channel info. Additionally, this lets us remove some hacks where we had to compute an offset due to the fact that sometimes there was a soft timestamp channel at the start of the array. Now the timestamp channel is always at the end of the array as is typical in other drivers. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-9-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit c1f571c3ca17cf3ab3e32f33d773b8e04378c189 Author: David Lechner Date: Tue Mar 18 17:52:16 2025 -0500 iio: adc: ad7606: drop ch param from ad7606_scale_setup_cb_t Drop the ch parameter from the ad7606_scale_setup_cb_t functions. The same info is already available from the chan param via chan->scan_type and chan->channel, so the parameter is redundant. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-8-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit f504e35293f344b541b8b1f52887049088ff8211 Author: David Lechner Date: Tue Mar 18 17:52:15 2025 -0500 iio: adc: ad7606: don't use address field Drop use of the address field in the ad7606 driver. This field was duplicating the same info that was already in the channel and scan_index fields. This is one less thing to have to hold in your mind when reading the code. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-7-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 050cf84f0b2a76dbc50dd52e0eca590eff0e27c3 Author: David Lechner Date: Tue Mar 18 17:52:14 2025 -0500 iio: adc: ad7606: use kernel identifier name style Use lower_snake_case for the identifier names as that is the usual kernel code style. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-6-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 450f44b71a2cf10785a6c1d97e249dda46e05f99 Author: David Lechner Date: Tue Mar 18 17:52:13 2025 -0500 iio: adc: ad7606: fix kernel-doc comments Fix several issues with kernel-doc comments in ad7606.h: * Add missing ":" to @param names. * Fix order of @param names. * Add some missing parameters. * Remove some non-existent parameters. * Fix alignment and wrapping. * Fix some spelling. `./scripts/kernel-doc -v -none drivers/iio/adc/ad7606*` is happy now. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-5-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 37fd5e6e0f33031e06c0406f289bcb2dcf4a1f4b Author: David Lechner Date: Tue Mar 18 17:52:12 2025 -0500 iio: adc: ad7606: use devm_mutex_init() Use devm_mutex_init() in ad7606_probe(). Mutexes should be cleaned up on driver removal. Also add missing include while we are touching this. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-4-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 40fa5f535dd7968fd8a602766f9cb9774afb425b Author: David Lechner Date: Tue Mar 18 17:52:11 2025 -0500 iio: adc: ad7606: add missing max sample rates Add max sample rates for all of the chips. Previously, only one chip had this field populated. The fallback value for the initial sampling frequency can be removed now that all chips have a max sample rate defined. Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-3-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 4d71bf6021818a039a534c5954acefdfc4d6962c Author: David Lechner Date: Tue Mar 18 17:52:10 2025 -0500 iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config() Add missing error check in ad7606B_sw_mode_config(). Reviewed-by: Nuno Sá Signed-off-by: David Lechner Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-2-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron commit 868fb0708087a9583cbf33ebc15eb6d2898b8787 Author: David Heidelberg Date: Wed Mar 19 21:59:47 2025 +0100 iio: light: al3320a: Split set_pwr function into set_pwr_on and _off Simplifies later conversion to the regmap framework. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-8-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit 2eaf77b4645ef43f8ad04bfefb9275c45eabada4 Author: David Heidelberg Date: Wed Mar 19 21:59:46 2025 +0100 iio: light: al3010: Split set_pwr function into set_pwr_on and _off Simplifies later conversion to the regmap framework. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-7-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit 26763a34812b38cdffbd8567f90c8b8c673fadda Author: David Heidelberg Date: Wed Mar 19 21:59:45 2025 +0100 iio: light: al3320a: Abstract device reference in the probe function Introduce a local variable reducing redundancy and improving readability. No functional changes. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-6-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit 861cc66854d611627649b2522c49914e09ddc026 Author: David Heidelberg Date: Wed Mar 19 21:59:44 2025 +0100 iio: light: al3010: Abstract device reference in the probe function Introduce a local variable reducing redundancy and improving readability. No functional changes. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-5-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit dd3f76931e718663a8312ce65433c81c171808fb Author: David Heidelberg Date: Wed Mar 19 21:59:43 2025 +0100 iio: light: al3320a: Remove DRV_NAME definition The driver name should be passed directly. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-4-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit 58c8c655f4ca24b06a75eed28ade1729f1b5002c Author: David Heidelberg Date: Wed Mar 19 21:59:42 2025 +0100 iio: light: al3010: Remove DRV_NAME definition The driver name should be passed directly. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-3-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit cddd6a959c1e4833402650a098c5de8c876936b3 Author: David Heidelberg Date: Wed Mar 19 21:59:41 2025 +0100 iio: light: al3320a: Use unsigned int for the indexing The integer is used as array index which cannot be negative. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-2-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit a29542e614014a081c507539ff1bb7d21cb046fc Author: David Heidelberg Date: Wed Mar 19 21:59:40 2025 +0100 iio: light: al3010: Use unsigned int for the indexing The integer is used as array index which cannot be negative. Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20250319-al3010-iio-regmap-v2-1-1310729d0543@ixit.cz Signed-off-by: Jonathan Cameron commit ba25cbf5fe757f42bb59c674633b78586b1a089d Author: Jorge Marques Date: Fri Mar 21 15:50:01 2025 +0100 Documentation: ABI: add events sampling frequency in sysfs-bus-iio Some devices have an internal clock used by the events to space the conversions. The max1363 introduced the option in commit 168c9d95a940 ("iio:adc:max1363 move from staging.") and ad799x in commit ba1d79613df3 ("staging:iio:ad799x: Use event spec for threshold hysteresis") Signed-off-by: Jorge Marques Link: https://patch.msgid.link/20250321-abi-oversampling-events-frequency-v1-1-794c1ab2f079@analog.com Signed-off-by: Jonathan Cameron commit 3c8fd200a731ec84d2f158fb6316fa6c18f165f3 Author: Angelo Dureghello Date: Wed Mar 19 16:45:31 2025 +0100 iio: dac: ad3552r-hs: add debugfs reg access Add debugfs register access. Reviewed-by: Nuno Sá Signed-off-by: Angelo Dureghello Reviewed-by: David Lechner Link: https://patch.msgid.link/20250319-wip-bl-ad3552r-fixes-v3-1-9975b38c0082@baylibre.com Signed-off-by: Jonathan Cameron commit d9848cb632cea0c85eb60cf1b98b342256e97f15 Author: Matti Vaittinen Date: Mon Mar 24 09:14:09 2025 +0200 MAINTAINERS: Add ROHM BD79124 ADC/GPO Add undersigned as a maintainer for the ROHM BD79124 ADC/GPO driver. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/fa3b65599592c1685230a5fa95aea6ed12b0b504.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 96f0f0e3aca4925917be32a69367fad2e18a24bc Author: Matti Vaittinen Date: Mon Mar 24 09:13:56 2025 +0200 MAINTAINERS: Add IIO ADC helpers Add undersigned as a maintainer for the IIO ADC helpers. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/1263c954cfb74223f322a9c31bd57f13d5516680.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 3f57a3b9ab74e8b6e00198af86ba41dcffa5509b Author: Matti Vaittinen Date: Mon Mar 24 09:13:42 2025 +0200 iio: adc: Support ROHM BD79124 ADC The ROHM BD79124 is a 12-bit, 8-channel, SAR ADC. The ADC supports an automatic measurement mode, with an alarm interrupt for out-of-window measurements. The window is configurable for each channel. The I2C protocol for manual start of the measurement and data reading is somewhat peculiar. It requires the master to do clock stretching after sending the I2C slave-address until the slave has captured the data. Needless to say this is not well suopported by the I2C controllers. Thus do not support the BD79124's manual measurement mode but implement the measurements using automatic measurement mode, relying on the BD79124's ability of storing latest measurements into register. Support also configuring the threshold events for detecting the out-of-window events. The BD79124 keeps asserting IRQ for as long as the measured voltage is out of the configured window. Thus, prevent the user-space from choking on the events and mask the received event for a fixed duration (1 second) when an event is handled. The ADC input pins can be also configured as general purpose outputs. Make those pins which don't have corresponding ADC channel node in the device-tree controllable as GPO. Signed-off-by: Matti Vaittinen Link: https://patch.msgid.link/ca3886c9abcb268ca976e62cd7da28bf5d6e6382.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 19d8a8691869463558349327f9aa1ab3788e696e Author: Matti Vaittinen Date: Mon Mar 24 09:13:28 2025 +0200 iio: adc: sun20i-gpadc: Use adc-helpers The new devm_iio_adc_device_alloc_chaninfo_se() -helper is intended to help drivers avoid open-coding the for_each_node -loop for getting the channel IDs. The helper provides standard way to detect the ADC channel nodes (by the node name), and a standard way to convert the "reg" -properties to channel identification numbers, used in the struct iio_chan_spec. Furthermore, the helper can optionally check the found channel IDs are smaller than given maximum. This is useful for callers which later use the IDs for example for indexing a channel data array. The original driver treated all found child nodes as channel nodes. The new helper requires channel nodes to be named channel[@N]. This should help avoid problems with devices which may contain also other but ADC child nodes. Quick grep from arch/* with the sun20i-gpadc's compatible string didn't reveal any in-tree .dts with channel nodes named otherwise. Also, same grep shows all the in-tree .dts seem to have channel IDs between 0..num of channels. Use the new helper. Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/e367a803c0d625e60c9fca16c55a25eee06b5a89.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 2d17ed10e4905414519297a8ad6a21dc9b4b8e8a Author: Matti Vaittinen Date: Mon Mar 24 09:13:16 2025 +0200 iio: adc: rzg2l_adc: Use adc-helpers The new devm_iio_adc_device_alloc_chaninfo_se() -helper is intended to help drivers avoid open-coding the for_each_node -loop for getting the channel IDs. The helper provides standard way to detect the ADC channel nodes (by the node name), and a standard way to convert the "reg" -properties to channel identification numbers, used in the struct iio_chan_spec. Furthermore, the helper can optionally check the found channel IDs are smaller than given maximum. This is useful for callers which later use the IDs for example for indexing a channel data array. The original driver treated all found child nodes as channel nodes. The new helper requires channel nodes to be named channel[@N]. This should help avoid problems with devices which may contain also other but ADC child nodes. Quick grep from arch/* with the rzg2l_adc's compatible string didn't reveal any in-tree .dts with channel nodes named otherwise. Also, same grep shows all the .dts seem to have channel IDs between 0..num of channels. Use the new helper. Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Link: https://patch.msgid.link/e84ccff01070eaee3dd1ae2d7e109f963168f586.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit f3a8f870fa9c84b34aad4c72c8d0a1213ba13a36 Author: Matti Vaittinen Date: Mon Mar 24 09:13:03 2025 +0200 iio: adc: add helpers for parsing ADC nodes There are ADC ICs which may have some of the AIN pins usable for other functions. These ICs may have some of the AIN pins wired so that they should not be used for ADC. A common way of marking pins that can be used as ADC inputs is to add corresponding channel@N nodes in the device tree as described in the ADC binding yaml. Add couple of helper functions which can be used to retrieve the channel information from the device node. Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/f1d8b3e15237947738912c0d297b3e1e21d8b03e.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit f24303631489d250f330373a59b3412103a93b67 Author: Matti Vaittinen Date: Mon Mar 24 09:12:50 2025 +0200 property: Add functions to iterate named child There are a few use-cases where child nodes with a specific name need to be parsed. Code like: fwnode_for_each_child_node() if (fwnode_name_eq()) ... can be found from a various drivers/subsystems. Adding a macro for this can simplify things a bit. In a few cases the data from the found nodes is later added to an array, which is allocated based on the number of found nodes. One example of such use is the IIO subsystem's ADC channel nodes, where the relevant nodes are named as channel[@N]. Add helpers for iterating and counting device's sub-nodes with certain name instead of open-coding this in every user. Suggested-by: Jonathan Cameron Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Reviewed-by: Marcelo Schmitt Link: https://patch.msgid.link/2767173b7b18e974c0bac244688214bd3863ff06.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 4a135e924fae08053917b1c0ba0b89bd66bf2be4 Author: Matti Vaittinen Date: Mon Mar 24 09:12:36 2025 +0200 dt-bindings: ROHM BD79124 ADC/GPO Add binding document for the ROHM BD79124 ADC / GPO. ROHM BD79124 is a 8-channel, 12-bit ADC. The input pins can also be used as general purpose outputs. Signed-off-by: Matti Vaittinen Reviewed-by: Conor Dooley Link: https://patch.msgid.link/e16f54b6214b0d796216729a7e29b8f7be9ae19e.1742560649.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 9016776f1301627de78a633bda7c898425a56572 Author: Brian Pellegrino Date: Fri Mar 28 13:48:31 2025 -0400 iio: filter: admv8818: Support frequencies >= 2^32 This patch allows writing u64 values to the ADMV8818's high and low-pass filter frequencies. It includes the following changes: - Rejects negative frequencies in admv8818_write_raw. - Adds a write_raw_get_fmt function to admv8818's iio_info, returning IIO_VAL_INT_64 for the high and low-pass filter 3dB frequency channels. Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Brian Pellegrino Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/20250328174831.227202-7-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit c31752b16de1dcd735162046dc33000311ad5b85 Author: Sam Winchenbach Date: Fri Mar 28 13:48:30 2025 -0400 iio: core: Add support for writing 64 bit attrs Prior to this patch it was only possible to read 64 bit integers. Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/20250328174831.227202-6-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit d542db7095d322bfcdc8e306db6f8c48358c9619 Author: Sam Winchenbach Date: Fri Mar 28 13:48:29 2025 -0400 iio: filter: admv8818: fix range calculation Search for the minimum error while ensuring that the LPF corner frequency is greater than the target, and the HPF corner frequency is lower than the target This fixes issues where the range calculations were suboptimal. Add two new DTS properties to set the margin between the input frequency and the calculated corner frequency Below is a generated table of the differences between the old algorithm and the new. This is a sweep from 0 to 20 GHz in 10 MHz steps. === HPF === freq = 1750 MHz, 3db: bypass => 1750 MHz freq = 3400 MHz, 3db: 3310 => 3400 MHz freq = 3410 MHz, 3db: 3310 => 3400 MHz freq = 3420 MHz, 3db: 3310 => 3400 MHz freq = 3660 MHz, 3db: 3550 => 3656 MHz freq = 6600 MHz, 3db: 6479 => 6600 MHz freq = 6610 MHz, 3db: 6479 => 6600 MHz freq = 6620 MHz, 3db: 6479 => 6600 MHz freq = 6630 MHz, 3db: 6479 => 6600 MHz freq = 6640 MHz, 3db: 6479 => 6600 MHz freq = 6650 MHz, 3db: 6479 => 6600 MHz freq = 6660 MHz, 3db: 6479 => 6600 MHz freq = 6670 MHz, 3db: 6479 => 6600 MHz freq = 6680 MHz, 3db: 6479 => 6600 MHz freq = 6690 MHz, 3db: 6479 => 6600 MHz freq = 6700 MHz, 3db: 6479 => 6600 MHz freq = 6710 MHz, 3db: 6479 => 6600 MHz freq = 6720 MHz, 3db: 6479 => 6600 MHz freq = 6730 MHz, 3db: 6479 => 6600 MHz freq = 6960 MHz, 3db: 6736 => 6960 MHz freq = 6970 MHz, 3db: 6736 => 6960 MHz freq = 6980 MHz, 3db: 6736 => 6960 MHz freq = 6990 MHz, 3db: 6736 => 6960 MHz freq = 7320 MHz, 3db: 7249 => 7320 MHz freq = 7330 MHz, 3db: 7249 => 7320 MHz freq = 7340 MHz, 3db: 7249 => 7320 MHz freq = 7350 MHz, 3db: 7249 => 7320 MHz freq = 7360 MHz, 3db: 7249 => 7320 MHz freq = 7370 MHz, 3db: 7249 => 7320 MHz freq = 7380 MHz, 3db: 7249 => 7320 MHz freq = 7390 MHz, 3db: 7249 => 7320 MHz freq = 7400 MHz, 3db: 7249 => 7320 MHz freq = 7410 MHz, 3db: 7249 => 7320 MHz freq = 7420 MHz, 3db: 7249 => 7320 MHz freq = 7430 MHz, 3db: 7249 => 7320 MHz freq = 7440 MHz, 3db: 7249 => 7320 MHz freq = 7450 MHz, 3db: 7249 => 7320 MHz freq = 7460 MHz, 3db: 7249 => 7320 MHz freq = 7470 MHz, 3db: 7249 => 7320 MHz freq = 7480 MHz, 3db: 7249 => 7320 MHz freq = 7490 MHz, 3db: 7249 => 7320 MHz freq = 7500 MHz, 3db: 7249 => 7320 MHz freq = 12500 MHz, 3db: 12000 => 12500 MHz === LPF === freq = 2050 MHz, 3db: bypass => 2050 MHz freq = 2170 MHz, 3db: 2290 => 2170 MHz freq = 2290 MHz, 3db: 2410 => 2290 MHz freq = 2410 MHz, 3db: 2530 => 2410 MHz freq = 2530 MHz, 3db: 2650 => 2530 MHz freq = 2650 MHz, 3db: 2770 => 2650 MHz freq = 2770 MHz, 3db: 2890 => 2770 MHz freq = 2890 MHz, 3db: 3010 => 2890 MHz freq = 3010 MHz, 3db: 3130 => 3010 MHz freq = 3130 MHz, 3db: 3250 => 3130 MHz freq = 3250 MHz, 3db: 3370 => 3250 MHz freq = 3260 MHz, 3db: 3370 => 3350 MHz freq = 3270 MHz, 3db: 3370 => 3350 MHz freq = 3280 MHz, 3db: 3370 => 3350 MHz freq = 3290 MHz, 3db: 3370 => 3350 MHz freq = 3300 MHz, 3db: 3370 => 3350 MHz freq = 3310 MHz, 3db: 3370 => 3350 MHz freq = 3320 MHz, 3db: 3370 => 3350 MHz freq = 3330 MHz, 3db: 3370 => 3350 MHz freq = 3340 MHz, 3db: 3370 => 3350 MHz freq = 3350 MHz, 3db: 3370 => 3350 MHz freq = 3370 MHz, 3db: 3490 => 3370 MHz freq = 3490 MHz, 3db: 3610 => 3490 MHz freq = 3610 MHz, 3db: 3730 => 3610 MHz freq = 3730 MHz, 3db: 3850 => 3730 MHz freq = 3850 MHz, 3db: 3870 => 3850 MHz freq = 3870 MHz, 3db: 4130 => 3870 MHz freq = 4130 MHz, 3db: 4390 => 4130 MHz freq = 4390 MHz, 3db: 4650 => 4390 MHz freq = 4650 MHz, 3db: 4910 => 4650 MHz freq = 4910 MHz, 3db: 5170 => 4910 MHz freq = 5170 MHz, 3db: 5430 => 5170 MHz freq = 5430 MHz, 3db: 5690 => 5430 MHz freq = 5690 MHz, 3db: 5950 => 5690 MHz freq = 5950 MHz, 3db: 6210 => 5950 MHz freq = 6210 MHz, 3db: 6470 => 6210 MHz freq = 6470 MHz, 3db: 6730 => 6470 MHz freq = 6730 MHz, 3db: 6990 => 6730 MHz freq = 6990 MHz, 3db: 7250 => 6990 MHz freq = 7000 MHz, 3db: 7250 => 7000 MHz freq = 7250 MHz, 3db: 7400 => 7250 MHz freq = 7400 MHz, 3db: 7800 => 7400 MHz freq = 7800 MHz, 3db: 8200 => 7800 MHz freq = 8200 MHz, 3db: 8600 => 8200 MHz freq = 8600 MHz, 3db: 9000 => 8600 MHz freq = 9000 MHz, 3db: 9400 => 9000 MHz freq = 9400 MHz, 3db: 9800 => 9400 MHz freq = 9800 MHz, 3db: 10200 => 9800 MHz freq = 10200 MHz, 3db: 10600 => 10200 MHz freq = 10600 MHz, 3db: 11000 => 10600 MHz freq = 11000 MHz, 3db: 11400 => 11000 MHz freq = 11400 MHz, 3db: 11800 => 11400 MHz freq = 11800 MHz, 3db: 12200 => 11800 MHz freq = 12200 MHz, 3db: 12600 => 12200 MHz freq = 12210 MHz, 3db: 12600 => 12550 MHz freq = 12220 MHz, 3db: 12600 => 12550 MHz freq = 12230 MHz, 3db: 12600 => 12550 MHz freq = 12240 MHz, 3db: 12600 => 12550 MHz freq = 12250 MHz, 3db: 12600 => 12550 MHz freq = 12260 MHz, 3db: 12600 => 12550 MHz freq = 12270 MHz, 3db: 12600 => 12550 MHz freq = 12280 MHz, 3db: 12600 => 12550 MHz freq = 12290 MHz, 3db: 12600 => 12550 MHz freq = 12300 MHz, 3db: 12600 => 12550 MHz freq = 12310 MHz, 3db: 12600 => 12550 MHz freq = 12320 MHz, 3db: 12600 => 12550 MHz freq = 12330 MHz, 3db: 12600 => 12550 MHz freq = 12340 MHz, 3db: 12600 => 12550 MHz freq = 12350 MHz, 3db: 12600 => 12550 MHz freq = 12360 MHz, 3db: 12600 => 12550 MHz freq = 12370 MHz, 3db: 12600 => 12550 MHz freq = 12380 MHz, 3db: 12600 => 12550 MHz freq = 12390 MHz, 3db: 12600 => 12550 MHz freq = 12400 MHz, 3db: 12600 => 12550 MHz freq = 12410 MHz, 3db: 12600 => 12550 MHz freq = 12420 MHz, 3db: 12600 => 12550 MHz freq = 12430 MHz, 3db: 12600 => 12550 MHz freq = 12440 MHz, 3db: 12600 => 12550 MHz freq = 12450 MHz, 3db: 12600 => 12550 MHz freq = 12460 MHz, 3db: 12600 => 12550 MHz freq = 12470 MHz, 3db: 12600 => 12550 MHz freq = 12480 MHz, 3db: 12600 => 12550 MHz freq = 12490 MHz, 3db: 12600 => 12550 MHz freq = 12500 MHz, 3db: 12600 => 12550 MHz freq = 12510 MHz, 3db: 12600 => 12550 MHz freq = 12520 MHz, 3db: 12600 => 12550 MHz freq = 12530 MHz, 3db: 12600 => 12550 MHz freq = 12540 MHz, 3db: 12600 => 12550 MHz freq = 12550 MHz, 3db: 12600 => 12550 MHz freq = 12600 MHz, 3db: 13000 => 12600 MHz freq = 12610 MHz, 3db: 13000 => 12970 MHz freq = 12620 MHz, 3db: 13000 => 12970 MHz freq = 12630 MHz, 3db: 13000 => 12970 MHz freq = 12640 MHz, 3db: 13000 => 12970 MHz freq = 12650 MHz, 3db: 13000 => 12970 MHz freq = 12660 MHz, 3db: 13000 => 12970 MHz freq = 12670 MHz, 3db: 13000 => 12970 MHz freq = 12680 MHz, 3db: 13000 => 12970 MHz freq = 12690 MHz, 3db: 13000 => 12970 MHz freq = 12700 MHz, 3db: 13000 => 12970 MHz freq = 12710 MHz, 3db: 13000 => 12970 MHz freq = 12720 MHz, 3db: 13000 => 12970 MHz freq = 12730 MHz, 3db: 13000 => 12970 MHz freq = 12740 MHz, 3db: 13000 => 12970 MHz freq = 12750 MHz, 3db: 13000 => 12970 MHz freq = 12760 MHz, 3db: 13000 => 12970 MHz freq = 12770 MHz, 3db: 13000 => 12970 MHz freq = 12780 MHz, 3db: 13000 => 12970 MHz freq = 12790 MHz, 3db: 13000 => 12970 MHz freq = 12800 MHz, 3db: 13000 => 12970 MHz freq = 12810 MHz, 3db: 13000 => 12970 MHz freq = 12820 MHz, 3db: 13000 => 12970 MHz freq = 12830 MHz, 3db: 13000 => 12970 MHz freq = 12840 MHz, 3db: 13000 => 12970 MHz freq = 12850 MHz, 3db: 13000 => 12970 MHz freq = 12860 MHz, 3db: 13000 => 12970 MHz freq = 12870 MHz, 3db: 13000 => 12970 MHz freq = 12880 MHz, 3db: 13000 => 12970 MHz freq = 12890 MHz, 3db: 13000 => 12970 MHz freq = 12900 MHz, 3db: 13000 => 12970 MHz freq = 12910 MHz, 3db: 13000 => 12970 MHz freq = 12920 MHz, 3db: 13000 => 12970 MHz freq = 12930 MHz, 3db: 13000 => 12970 MHz freq = 12940 MHz, 3db: 13000 => 12970 MHz freq = 12950 MHz, 3db: 13000 => 12970 MHz freq = 12960 MHz, 3db: 13000 => 12970 MHz freq = 12970 MHz, 3db: 13000 => 12970 MHz freq = 13000 MHz, 3db: 13390 => 13000 MHz freq = 13390 MHz, 3db: 13810 => 13390 MHz freq = 13810 MHz, 3db: 14230 => 13810 MHz freq = 14230 MHz, 3db: 14650 => 14230 MHz freq = 14650 MHz, 3db: 15070 => 14650 MHz freq = 15070 MHz, 3db: 15490 => 15070 MHz freq = 15490 MHz, 3db: 15910 => 15490 MHz freq = 15910 MHz, 3db: 16330 => 15910 MHz freq = 16330 MHz, 3db: 16750 => 16330 MHz freq = 16750 MHz, 3db: 17170 => 16750 MHz freq = 17170 MHz, 3db: 17590 => 17170 MHz freq = 17590 MHz, 3db: 18010 => 17590 MHz freq = 18010 MHz, 3db: 18430 => 18010 MHz freq = 18430 MHz, 3db: 18850 => 18430 MHz freq = 18850 MHz, 3db: bypass => 18850 MHz Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/20250328174831.227202-5-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit fb6009a28d77edec4eb548b5875dae8c79b88467 Author: Sam Winchenbach Date: Fri Mar 28 13:48:28 2025 -0400 iio: filter: admv8818: fix integer overflow HZ_PER_MHZ is only unsigned long. This math overflows, leading to incorrect results. Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/20250328174831.227202-4-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit ef0ce24f590ac075d5eda11f2d6434b303333ed6 Author: Sam Winchenbach Date: Fri Mar 28 13:48:27 2025 -0400 iio: filter: admv8818: fix band 4, state 15 Corrects the upper range of LPF Band 4 from 18.5 GHz to 18.85 GHz per the ADMV8818 datasheet Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/20250328174831.227202-3-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit 485eefd7f973501889a8d479127612d43eb08af0 Author: Sam Winchenbach Date: Fri Mar 28 13:48:26 2025 -0400 dt-bindings: iio: filter: Add lpf/hpf freq margins Adds two properties to add a margin when automatically finding the corner frequencies. Signed-off-by: Sam Winchenbach Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250328174831.227202-2-sam.winchenbach@framepointer.org Signed-off-by: Jonathan Cameron commit c6316e19aff95bd8de39b8fdb51a040cd5f3dce4 Author: Martin Blumenstingl Date: Sun Mar 30 12:19:22 2025 +0200 iio: adc: meson: add support for the GXLX SoC The SARADC IP on the GXLX SoC itself is identical to the one found on GXL SoCs. However, GXLX SoCs require poking the first three bits in the MESON_SAR_ADC_REG12 register to get the three MPLL clocks (used as clock generators for the audio frequencies) to work. The reason why there are MPLL clock bits in the ADC register space is entirely unknown and it seems that nobody is able to comment on this. So clearly mark this as a workaround and add a warning so users are notified that this workaround can change (once we know what these bits actually do). Tested-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Link: https://patch.msgid.link/20250330101922.1942169-3-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron commit b2729cdf2bc0ea9d624d504fc61e5b6299629b6c Author: Martin Blumenstingl Date: Sun Mar 30 12:19:21 2025 +0200 dt-bindings: iio: adc: amlogic,meson-saradc: Add GXLX SoC compatible Add a compatible string for the GXLX SoC. It's very similar to GXL but has three additional bits in MESON_SAR_ADC_REG12 for the three MPLL clocks. Acked-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Link: https://patch.msgid.link/20250330101922.1942169-2-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron commit 61f013df59f1d6326dcb6e1017171d7ee2b5a410 Author: Sergio Perez Date: Mon Mar 24 14:59:20 2025 +0100 iio: light: bh1750: Add hardware reset support via GPIO Some BH1750 sensors require a hardware reset before they can be detected on the I2C bus. This implementation adds support for an optional reset GPIO that can be specified in the device tree. The reset sequence pulls the GPIO low and then high before initializing the sensor, which enables proper detection with tools like i2cdetect. This is particularly important for sensors that power on in an undefined state. Signed-off-by: Sergio Perez Link: https://patch.msgid.link/20250324135920.6802-2-sergio@pereznus.es Signed-off-by: Jonathan Cameron commit 3e09eb53df47127cdcbf26fc41d24cd564d5d57c Author: Sergio Perez Date: Mon Mar 24 14:59:19 2025 +0100 dt-bindings: iio: light: bh1750: Add reset-gpios property Some BH1750 sensors require a hardware reset via GPIO before they can be properly detected on the I2C bus. Add a new reset-gpios property to the binding to support this functionality. The reset-gpios property allows specifying a GPIO that will be toggled during driver initialization to reset the sensor. Signed-off-by: Sergio Perez Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250324135920.6802-1-sergio@pereznus.es Signed-off-by: Jonathan Cameron commit 58fe539e9170320a611d7086346317f1e3586878 Author: Krzysztof Kozlowski Date: Mon Mar 24 13:53:13 2025 +0100 dt-bindings: iio: Use unevaluatedProperties for SPI devices SPI devices should use unevaluatedProperties:false instead of additionalProperties:false, to allow any SPI device properties listed in spi-peripheral-props.yaml. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Reviewed-by: Matti Vaittinen Link: https://patch.msgid.link/20250324125313.82226-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 9ca04c5e01a627043a1115c5458487060aebfb9c Author: Krzysztof Kozlowski Date: Mon Mar 24 13:53:12 2025 +0100 dt-bindings: iio: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250324125313.82226-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit bb8d952a4f45ff6427ad0eaaf469893d481f84e2 Author: Feng Wei Date: Thu Mar 27 09:57:04 2025 +0800 staging: iio: adt7316: replace irqd_get_trigger_type with irq_get_trigger_type Convert irqd_get_trigger_type(irq_get_irq_data(irq)) cases to the more simple irq_get_trigger_type(irq). Signed-off-by: Feng Wei Signed-off-by: Shao Mingyin Link: https://patch.msgid.link/202503270957044481PK0Xb23i08BgwkodLtEC@zte.com.cn Signed-off-by: Jonathan Cameron commit 0b2a4f55cc422b6c6b22a5a1b7de63ebe96f2f76 Author: Siddharth Menon Date: Sat Mar 22 21:58:11 2025 +0530 iio: frequency: ad9832: devicetree probing support Introduce struct for device match of_device_id to avoid relying on fallback mechanisms, which could lead to false matches against other AD9832 variants in the future. Suggested-by: Marcelo Schmitt Reviewed-by: Marcelo Schmitt Signed-off-by: Siddharth Menon Link: https://patch.msgid.link/20250322163211.253009-1-simeddon@gmail.com Signed-off-by: Jonathan Cameron commit ad02ca57e44e9936fca5095840fad9d4b47c5559 Author: Zhang Lixu Date: Mon Mar 17 09:36:34 2025 +0800 iio: hid-sensor-prox: Add support for 16-bit report size On Intel platforms, the HID_USAGE_SENSOR_HUMAN_PROXIMITY report size is 16 bits. This patch adds support for handling 16-bit report sizes for the HID_USAGE_SENSOR_HUMAN_PROXIMITY usage in the HID sensor proximity driver. Previously, the driver only supported 8-bit and 32-bit report sizes. With this change, the driver can now correctly process 16-bit proximity data, ensuring accurate human presence detection on platforms where this report size is used. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/20250317013634.4117399-1-lixu.zhang@intel.com Signed-off-by: Jonathan Cameron commit 802ede1a9b5a78ffe438fb12765b8ec5efbed923 Author: Lothar Rubusch Date: Thu Mar 13 16:50:38 2025 +0000 iio: accel: adxl345: cleanup regmap return values Regmap return values sometimes are checked being less than zero to trigger error handling. Sometimes this is checked for being not zero. Unify the situation and check for not being zero. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250313165049.48305-4-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 77d48f5e4a603efc22785a03800fd2a127b51be4 Author: Lothar Rubusch Date: Thu Mar 13 16:50:37 2025 +0000 iio: accel: adxl345: move INT enable to regmap cache Replace the interrupt enable member variable to the regmap cache. This makes the function set_interrupts() obsolete. The interrupt enable register is written when the driver is probed. Thus it is perfectly cacheable. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250313165049.48305-3-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit f184a095c8559f0df8dc36d8c88df0ca2c687bce Author: Lothar Rubusch Date: Thu Mar 13 16:50:36 2025 +0000 iio: accel: adxl345: use regmap cache for INT mapping Use regmap cache to replace the maintenance of the interrupt mapping state by a member variable intio. The interrupt mapping is initialized when the driver is probed, and it is perfectly cacheable. The patch will still leave the function set_interrupts(). A follow up patch takes care of it, when cleaning up the INT enable register variable. Signed-off-by: Lothar Rubusch Link: https://patch.msgid.link/20250313165049.48305-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron commit 0de3748d80f32d71600b95403d5805a6b13df32f Author: Tobias Sperling Date: Wed Mar 12 16:29:40 2025 +0100 iio: adc: sort TI drivers alphanumerical Sort TI drivers again in an alphanumerical manner. Signed-off-by: Tobias Sperling Link: https://patch.msgid.link/20250312-sort_ti_drivers-v1-1-4e8813e662d2@softing.com Signed-off-by: Jonathan Cameron commit 6d7ee6de75010ed5d70f1c496070c4a7cd1968b5 Author: Michael Sikora Date: Fri Apr 11 09:49:29 2025 +0200 ASoC: adau7118: Allow dsp_a mode TDM mode on the adau7118 is dsp_a compatible. Set SPT_SAI_MODE on the SPT_CTRL1 register to 1 for TDM mode when the DAI is operating in dsp_a mode. Signed-off-by: Michael Sikora Link: https://patch.msgid.link/20250411-adau7118-dsp-a-v1-1-be3fb487a6ac@axis.com Signed-off-by: Mark Brown commit fa597710be6e6625b875d95c717f66b7ab83b986 Author: John Harrison Date: Thu Apr 17 14:33:03 2025 -0700 drm/xe/guc: Cache DSS info when creating capture register list Calculating the DSS id (index of a steered register) currently requires reading state from the hwconfig table and that currently requires dynamically allocating memory. The GuC based register capture (for dev core dumps) includes this index as part of the register name in the dump. However, it was calculating said index at the time of the dump for every dump. That is wasteful. It also breaks anyone trying to do the dump at a time when memory allocations are not allowed. So rather than calculating on every print, just calculate at start of day when creating the register list in the first place. Signed-off-by: John Harrison Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250417213303.3021243-1-John.C.Harrison@Intel.com commit 8393f3e155d902bd66c3033b073ec10d1409b2ee Author: John Harrison Date: Thu Apr 17 12:52:13 2025 -0700 drm/xe/guc: Use the steering flag when printing registers The printing code was doing a test on which list a register was in to decide whether it is steered or not. That might be valid at this moment but there may be other reasons for extended lists in the future. Plus, there is a flag specifically for identifying steered registers. So, just use that instead - it is simpler and safer. Signed-off-by: John Harrison Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250417195215.3002210-3-John.C.Harrison@Intel.com commit 532da44b54a10d50ebad14a8a02bd0b78ec23e8b Author: John Harrison Date: Thu Apr 17 12:52:12 2025 -0700 drm/xe/guc: Fix capture of steering registers The list of registers to capture on a GPU hang includes some that require steering. Unfortunately, the flag to say this was being wiped to due a missing OR on the assignment of the next flag field. Fix that. Fixes: b170d696c1e2 ("drm/xe/guc: Add XE_LP steered register lists") Cc: Zhanjun Dong Cc: Alan Previn Cc: Matt Roper Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vivi Cc: intel-xe@lists.freedesktop.org Signed-off-by: John Harrison Reviewed-by: Matt Roper Reviewed-by: Zhanjun Dong Link: https://lore.kernel.org/r/20250417195215.3002210-2-John.C.Harrison@Intel.com commit 7a0322122cfdd9a6f10fc7701023d75c98eb3d22 Author: Harshit Mogalapalli Date: Sun Mar 23 05:49:06 2025 -0700 drm/xe/svm: fix dereferencing error pointer in drm_gpusvm_range_alloc() xe_svm_range_alloc() returns ERR_PTR(-ENOMEM) on failure and there is a dereference of "range" after that: --> range->gpusvm = gpusvm; In xe_svm_range_alloc(), when memory allocation fails return NULL instead to handle this situation. Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/adaef4dd-5866-48ca-bc22-4a1ddef20381@stanley.mountain/ Signed-off-by: Harshit Mogalapalli Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250323124907.3946370-1-harshit.m.mogalapalli@oracle.com commit 180f091224a002f8bd1629307c34619a5626841e Author: Qiuxu Zhuo Date: Tue Apr 22 21:44:50 2025 +0800 EDAC/ie31200: Add two Intel SoCs for EDAC support Add two compute die IDs for Raptor Lake-S and Alder Lake-S for EDAC support. Note that because Alder Lake-S shares the same memory controller registers as Raptor Lake-S, it can reuse the configuration data of Raptor Lake-S for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: James Jernigan Link: https://lore.kernel.org/r/20250422134450.1880648-1-qiuxu.zhuo@intel.com commit 85f8e98dbb0135d2bc1999c6015cd374fe2c69fa Author: Alexandre Courbot Date: Sat Apr 12 15:29:13 2025 +0900 rust: alloc: allow coercion from `Box` to `Box` if T implements U This enables the creation of trait objects backed by a Box, similarly to what can be done with the standard library. Suggested-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250412-box_trait_objs-v3-1-f67ced62d520@nvidia.com Signed-off-by: Danilo Krummrich commit ab7bca5acdb7f7e806f26329ac35761d66835e42 Author: Iuliana Prodan Date: Wed Apr 16 10:56:13 2025 +0300 remoteproc: imx_dsp_rproc: Add support for DSP-specific features Some DSP firmware requires a FW_READY signal before proceeding, while others do not. Therefore, add support to handle i.MX DSP-specific features. Implement handle_rsc callback to handle resource table parsing and to process DSP-specific resource, to determine if waiting is needed. Update imx_dsp_rproc_start() to handle this condition accordingly. Signed-off-by: Iuliana Prodan Link: https://lore.kernel.org/r/20250416075613.2116792-1-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier commit 0c848b3adb45acc1722f94333e2a97bf1720e431 Author: Alexandre Courbot Date: Fri Apr 11 21:09:39 2025 +0900 samples: rust: convert PCI rust sample driver to use try_access_with() This method limits the scope of the revocable guard and is considered safer to use for most cases, so let's showcase it here. Reviewed-by: Benno Lossin Signed-off-by: Alexandre Courbot Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250411-try_with-v4-2-f470ac79e2e2@nvidia.com Signed-off-by: Danilo Krummrich commit 80e62fcea4f3ce8c7cc3205d7543e532b255d322 Author: Alexandre Courbot Date: Fri Apr 11 21:09:38 2025 +0900 rust/revocable: add try_access_with() convenience method Revocable::try_access() returns a guard through which the wrapped object can be accessed. Code that can sleep is not allowed while the guard is held; thus, it is common for the caller to explicitly drop it before running sleepable code, e.g: let b = bar.try_access()?; let reg = b.readl(...); // Don't forget this or things could go wrong! drop(b); something_that_might_sleep(); let b = bar.try_access()?; let reg2 = b.readl(...); This is arguably error-prone. try_access_with() provides an arguably safer alternative, by taking a closure that is run while the guard is held, and by dropping the guard automatically after the closure completes. This way, code can be organized more clearly around the critical sections and the risk of forgetting to release the guard when needed is considerably reduced: let reg = bar.try_access_with(|b| b.readl(...))?; something_that_might_sleep(); let reg2 = bar.try_access_with(|b| b.readl(...))?; The closure can return nothing, or any value including a Result which is then wrapped inside the Option returned by try_access_with. Error management is driver-specific, so users are encouraged to create their own macros that map and flatten the returned values to something appropriate for the code they are working on. Suggested-by: Danilo Krummrich Reviewed-by: Benno Lossin Signed-off-by: Alexandre Courbot Reviewed-by: Joel Fernandes Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250411-try_with-v4-1-f470ac79e2e2@nvidia.com [ Link `None`, `Some`, `Option` in doc-comment. - Danilo ] Signed-off-by: Danilo Krummrich commit 48f506021611a63414c63668706466dfb5264113 Author: Frank Li Date: Thu Apr 17 11:11:33 2025 -0400 dt-bindings: display: imx: convert fsl,tcon.txt to yaml format Convert fsl,tcon.txt to yaml format. Signed-off-by: Frank Li Reviewed-by: Stefan Agner Link: https://lore.kernel.org/r/20250417151134.3569837-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit 6848dc8d0b66153048d57d47d71d40095a5a3f19 Author: Frank Li Date: Thu Apr 17 11:06:04 2025 -0400 dt-bindings: fsl: convert m4if.txt and tigerp.txt to yaml format Convert m4if.txt and tigerp.txt to yaml format. These just use reg to indicate memory region. Additional changes: - Add compatible string fsl,imx51-aipstz. - Add fsl,imx53-tigerp and fail back to fsl,imx51-tigerp - Add compatible string fsl,imx7d-pcie-phy, which is not real phy and just indicate a memory region. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250417150608.3569512-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit e808ed95c178090f58e02a2496daeac39e5bb2f1 Author: Frank Li Date: Thu Apr 17 10:57:41 2025 -0400 dt-bindings: display: imx: convert ldb.txt to yaml format Convert ldb.txt to yaml format. Additional changes - fix clock-names order to match existed dts file. - remove lvds-panel and iomuxc-gpr node in examples. - fsl,imx6q-ldb fail back to fsl,imx53-ldb. - add fsl,panel property to match existed dts. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250417145742.3568572-1-Frank.Li@nxp.com [robh: Use #/properties/port schema for port] Signed-off-by: Rob Herring (Arm) commit ba127016c07b17d10cb33803fb0a0aaf24a8b53c Author: J. Neuschäfer Date: Thu Apr 17 16:21:14 2025 +0200 dt-bindings: powerpc: Convert fsl/pmc.txt to YAML This patch rewrites pmc.txt into YAML format. Descriptive texts are expanded or shortened in a few places to better fit today's conventions. The list of compatible strings (and combinations of them) is based on existing device trees in arch/powerpc as well as compatible strings already mentioned in the plain-text version of the binding. One thing I didn't handle are soc-clk@... nodes as seen in arch/powerpc/boot/dts/fsl/pq3-power.dtsi. They are also ignored by Linux drivers. Signed-off-by: J. Neuschäfer Link: https://lore.kernel.org/r/20250417-fslpmc-yaml-v3-1-b3eccd389176@posteo.net Signed-off-by: Rob Herring (Arm) commit 2ed7553b909f8401f21df92925001a10b0971eeb Author: Rob Herring (Arm) Date: Mon Apr 7 11:53:40 2025 -0500 dt-bindings: virtio: pci-iommu: Add ref to pci-device.yaml The virtio pci-iommu is a PCI device, so it should have a reference to the pci-device.yaml schema. The pci-device.yaml schema defines the 'reg' format as a schema, so the text description for 'reg' can be dropped. Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20250407165341.2934499-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 494d3c55d83698b9d44b150bc3e5e3936b439965 Author: Alexander Sverdlin Date: Wed Dec 18 22:08:26 2024 +0100 dt-bindings: backlight: add TI LP8864/LP8866 LED-backlight drivers Add bindings for Texas Instruments' LP8864/LP8866 LED-backlight drivers. Note that multiple channels in these models are used for load-balancing and brightness is controlled gobally, so from a user perspective it's only one LED. Reviewed-by: Rob Herring (Arm) Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20241218210829.73191-2-alexander.sverdlin@siemens.com Signed-off-by: Rob Herring (Arm) commit b252d1b00e283de06b35a13115d7e4bb9c5381ff Author: Frank Li Date: Tue Apr 15 17:29:42 2025 -0400 dt-bindings: display: imx: convert fsl-imx-drm.txt to yaml format Convert fsl-imx-drm.txt to yaml format and create 5 yaml files for differences purpose. Additional changes: - add missed include file in examples. - add clocks, clock-names for ipu. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250415212943.3400852-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit 50ede3b000f3a06edbf668a01f65c6e801076dd6 Author: Frank Li Date: Tue Apr 15 11:48:58 2025 -0400 dt-bindings: interrupt-controller: Add missed fsl tzic controller Add missed fsl tzic interrupt controller binding doc. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250415154859.3381515-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit ac029aa22876bc273ed86432f8c52693e831dc61 Author: Wolfram Sang Date: Fri Apr 11 21:47:57 2025 +0200 dt-bindings: remove RZ/N1S bindings Except for these four quite random bindings, no further upstream activity has been observed in the last 8 years. So, remove these fragments to reduce maintenance burden. Signed-off-by: Wolfram Sang Acked-by: Marc Kleine-Budde Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250411194849.11067-2-wsa+renesas@sang-engineering.com Signed-off-by: Rob Herring (Arm) commit 540994337d47ffcaeb4aa013833c9036d6bef28a Author: Rob Herring (Arm) Date: Thu Apr 10 15:13:23 2025 -0500 dt-bindings: Remove obsolete numa.txt The NUMA binding is now covered by the dtschema numa-distance-map-v1.yaml and CPU and memory node schemas with all the relevant descriptions moved to them. Link: https://lore.kernel.org/r/20250410201325.962203-2-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 3fb7bebcb6e5aefd45f6c7fba3ebb9adc11f706a Author: Rob Herring (Arm) Date: Thu Apr 10 15:13:22 2025 -0500 dt-bindings: Remove obsolete cpu-topology.txt The cpu topology binding is now covered by the dtschema cpu-map.yaml schema with all the relevant descriptions moved to it. Link: https://lore.kernel.org/r/20250410201325.962203-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 65e079fd1a6a293ecfdca77f69773a9f2d8f0108 Author: Frank Li Date: Thu Apr 10 18:25:05 2025 -0400 dt-bindings: counter: Convert ftm-quaddec.txt to yaml format Convert ftm-quaddec.txt to yaml format. Additional changes: - Remove "status" at example. - Remove label at example. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20250410222509.3242241-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit a172b5de41d9857dff7cca21942a6bc09a4e03af Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:38 2025 -0500 dt-bindings: cpufreq: Drop redundant Mediatek binding The Mediatek CPUFreq binding document just describes properties from the CPU node which the driver uses. This is redundant as all the properties are described in the arm/cpus.yaml schema. Signed-off-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Sudeep Holla Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-17-63d7dc9ddd0a@kernel.org commit bfec39eb078233f15141b95368c7829463756762 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:37 2025 -0500 dt-bindings: arm/cpus: Add power-domains constraints The "power-domains" and "power-domains-names" properties are missing any constraints. Add the constraints and drop the generic descriptions. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Ulf Hansson Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-16-63d7dc9ddd0a@kernel.org Signed-off-by: Rob Herring (Arm) commit 80728bfa8c79b81eeea305f555fe5582d1907286 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:36 2025 -0500 dt-bindings: arm/cpus: Add missing properties The Arm CPU schema is missing a number of properties already in use. This has gone unnoticed as extra properties have not been restricted. Add a missing reference to cpu.yaml, and add all the missing properties. As "clock-latency" and "voltage-tolerance" are related to opp-v1, add those properties to the opp-v1.yaml schema. With this, other properties can be prevented from creeping in with 'unevaluatedProperties: false'. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Sudeep Holla Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-15-63d7dc9ddd0a@kernel.org Signed-off-by: Rob Herring (Arm) commit f879ee2ce0d46327e90f61c5dc85fb13a740de10 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:35 2025 -0500 dt-bindings: Reference opp-v1 schema in CPU schemas The opp-v1 binding is only used in MIPS and arm32 CPU nodes, so add a $ref to it in the CPU schemas and drop the "select". As opp-v1 has long been deprecated, mark it as such. Acked-by: Viresh Kumar Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-14-63d7dc9ddd0a@kernel.org Signed-off-by: Rob Herring (Arm) commit e4554b052b4ce9a76f1772b84e8fa58673de340c Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:34 2025 -0500 dt-bindings: arm/cpus: Re-wrap 'description' entries Some of the 'description' entries have odd line wrapping and incorrect YAML block modifiers. The 'description' entries should typically wrap at 80 chars. Reformat the entries to follow that along with using '>' modifiers as appropriate. Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-13-63d7dc9ddd0a@kernel.org Signed-off-by: Rob Herring (Arm) commit 273fc608bdabf8e42457518a310b2475dfa4f5b9 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:33 2025 -0500 dt-bindings: arm/cpus: Add schemas for "enable-method" dependencies Replace the prose for properties dependent on specific "enable-method" values with schemas defining the same requirements. Both "qcom,acc" and "qcom,saw" properties appear to be required for any of the Qualcomm enable-method values, so the schema is a bit simpler than what the text said. The properties are also needed on some Qualcomm platforms with other enable-method values. It's limited to Cortex A53 based platforms so use that to disable the properties. The references to arm/msm/qcom,saw2.txt and arm/msm/qcom,kpss-acc.txt are out of date, so just drop them. Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-12-63d7dc9ddd0a@kernel.org Signed-off-by: Rob Herring (Arm) commit cc78d1eaabad3caf3c425c83037cd8ba1c9f2bc6 Author: Nicolas Frattaroli Date: Thu Apr 10 21:39:58 2025 +0200 ASoC: rockchip: add Serial Audio Interface (SAI) driver The Rockchip RK3576 SoC features a new audio controller, the Serial Audio Interface, or SAI for short. It is capable of both sending and receiving audio over up to 4 lanes for each direction using the I2S, PCM or TDM formats. This driver is derived from the downstream vendor driver. That is why its original author, Sugar Zhang, is listed as a Co-developer, with their signoff. Since adjustments to make the driver suitable for upstream were quite extensive, I've added myself to the authors and put myself as the commit author; all added bugs are my fault alone, and not that of the original author at Rockchip. The hardware is somewhat similar to the Rockchip I2S-TDM hardware when judged based on their register map, except it uses the same mclk for tx and rx. It appears to be much more flexible with regards to TDM. The loopback stuff and mono mode are new as well. In line with the changes that were made to the Rockchip I2S-TDM driver after upstreaming, the mclk-calibrate functionality was dropped, and setting the mclk rate properly is now left up to the Common Clock Framework, similar to how it is in the upstream I2S-TDM driver now. A spinlock has been introduced to protect register write accesses that depend on the bclk/fs to be stopped, i.e. XFER[1:0] being 0. I couldn't find whether the asoc core held a per-instance lock so only one callback can run at a time, and so it seemed prudent to add this. I couldn't successfully test whether TDM was working, though I've tried with a TAS6424 codec board. I'm not sure yet whether to blame the codec driver, this version of the SAI driver, or the vendor implementation of the SAI driver. The TDM mask registers remain untouched in both this version and the downstream vendor version, which is suspicious, though the Linux ASoC core wouldn't be able to support the 128 (!!!) slots of TDM the hardware supports anyway. Regular old 2-channel stereo I2S thrown at an I2S stereo codec works well though. I tested with the CPU-side SAI controller in provider mode and an Everest ES8388 codec as the consumer. Some vendor driver features (no-dmaengine, fifo rockchip performance monitoring, many kcontrols) were dropped for this initial upstream version. They can always be added later if they make sense for upstream. Co-developed-by: Sugar Zhang Signed-off-by: Sugar Zhang Signed-off-by: Nicolas Frattaroli Link: https://patch.msgid.link/20250410-rk3576-sai-v2-6-c64608346be3@collabora.com Signed-off-by: Mark Brown commit fd55908d3278300ec4cbbacbfb07748bb9166314 Author: Nicolas Frattaroli Date: Thu Apr 10 21:39:57 2025 +0200 ASoC: dt-bindings: add schema for rockchip SAI controllers Rockchip introduced a new audio controller called the "Serial Audio Interface", or "SAI" for short, on some of their newer SoCs. In particular, this controller is used several times on the RK3576 SoC. Add a schema for it, with only an RK3576 compatible for now. Other SoCs may follow as mainline support for them lands. Signed-off-by: Nicolas Frattaroli Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250410-rk3576-sai-v2-5-c64608346be3@collabora.com Signed-off-by: Mark Brown commit 1a30661c20dee51675a1ddee1b81b6a0e8580412 Author: Xianwei Zhao Date: Mon Mar 17 15:16:58 2025 +0800 arm64: dts: add support for S7D based Amlogic BM202 Amlogic S7D is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Add basic support for the S7D based Amlogic BM202 board, Reusing S7 basic components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console. Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-7-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit 1b753fcfcff8ad1a63512b5be01cc6f3968a859b Author: Xianwei Zhao Date: Mon Mar 17 15:16:57 2025 +0800 arm64: dts: add support for S7 based Amlogic BP201 Amlogic S7 is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Add basic support for the S7 based Amlogic BP201 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console. Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-6-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit 5fdecaafa2377731b84c9f3af5994d990224015e Author: Xianwei Zhao Date: Mon Mar 17 15:16:56 2025 +0800 arm64: dts: add support for S6 based Amlogic BL209 Amlogic S6 is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Add basic support for the S6 based Amlogic BL209 board, which describes the following components: CPU, GIC, IRQ, Timer and UART. These are capable of booting up into the serial console. Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-5-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit c0c89503f6b722d9eb450ce1cfe52f785be07cfd Author: Xianwei Zhao Date: Mon Mar 17 15:16:54 2025 +0800 dt-bindings: arm: amlogic: add S7D support Document the new S7D SoC/board device tree bindings. Amlogic S7D is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Signed-off-by: Xianwei Zhao Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-3-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit 5c9871f98b187747a873dad2773493f2117b5203 Author: Xianwei Zhao Date: Mon Mar 17 15:16:53 2025 +0800 dt-bindings: arm: amlogic: add S7 support Document the new S7 SoC/board device tree bindings. Amlogic S7 is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Signed-off-by: Xianwei Zhao Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-2-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit 93d968adbba3d30c625149d7aa12369a42b89d3e Author: Xianwei Zhao Date: Mon Mar 17 15:16:52 2025 +0800 dt-bindings: arm: amlogic: add S6 support Document the new S6 SoC/board device tree bindings. Amlogic S6 is an advanced application processor designed for hybrid OTT/IP Set Top Box and high-end media box applications. Signed-off-by: Xianwei Zhao Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250317-s6-s7-basic-v1-1-d653384e41f3@amlogic.com Signed-off-by: Neil Armstrong commit 45bd443bfd8697a7da308c16c3e75e2bb353b3d1 Author: Dr. David Alan Gilbert Date: Fri Apr 18 02:15:19 2025 +0100 net: 802: Remove unused p8022 code p8022.c defines two external functions, register_8022_client() and unregister_8022_client(), the last use of which was removed in 2018 by commit 7a2e838d28cf ("staging: ipx: delete it from the tree") Remove the p8022.c file, it's corresponding header, and glue surrounding it. There was one place the header was included in vlan.c but it didn't use the functions it declared. There was a comment in net/802/Makefile about checking against net/core/Makefile, but that's at least 20 years old and there's no sign of net/core/Makefile mentioning it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250418011519.145320-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 0c9f82446123635cfbb8ceeca074f2dce6a0ccae Author: Shengjiu Wang Date: Fri Apr 18 13:30:50 2025 +0800 ASoC: dt-bindings: fsl,mqs: Document audio graph port This device can be used in conjunction with audio-graph-card to provide an endpoint for binding with the other side of the audio link. Signed-off-by: Shengjiu Wang Acked-by: "Rob Herring (Arm)" Link: https://patch.msgid.link/20250418053050.2755249-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e8ac7336dd62f0443a675ed80b17f0f0e6846e20 Author: João Paulo Gonçalves Date: Sun Apr 20 15:28:02 2025 -0300 regulator: max20086: Change enable gpio to optional The enable pin can be configured as always enabled by the hardware. Make the enable gpio request optional so the driver doesn't fail to probe when `enable-gpios` property is not present in the device tree. Cc: stable@vger.kernel.org Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver") Signed-off-by: João Paulo Gonçalves Link: https://patch.msgid.link/20250420-fix-max20086-v1-2-8cc9ee0d5a08@gmail.com Signed-off-by: Mark Brown commit 71406b6d1155d883c80c1b4405939a52f723aa05 Author: João Paulo Gonçalves Date: Sun Apr 20 15:28:01 2025 -0300 regulator: max20086: Fix MAX200086 chip id >From MAX20086-MAX20089 datasheet, the id for a MAX20086 is 0x30 and not 0x40. With the current code, the driver will fail on probe when the driver tries to identify the chip id from a MAX20086 device over I2C. Cc: stable@vger.kernel.org Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver") Signed-off-by: João Paulo Gonçalves Link: https://patch.msgid.link/20250420-fix-max20086-v1-1-8cc9ee0d5a08@gmail.com Signed-off-by: Mark Brown commit dcbd5dcc956e2331414fd7020b4655df08deeb87 Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:39 2025 +0300 drm/panel: make prepare/enable and disable/unprepare calls return void Now there are no users of the return value of the drm_panel_prepare(), drm_panel_unprepare(), drm_panel_enable() and drm_panel_disable() calls. Usually these calls are performed from the atomic callbacks, where it is impossible to return an error. Stop returning error codes and return void instead. Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-7-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 58a71d2bf103550f809987e16d8c1949be719040 Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:38 2025 +0300 drm/bridge: analogix_dp: ignore return values of drm_panel_* calls Follow the example of other drivers and ignore return values of the drm_panel_prepare() / unprepare() / enable() / disable() calls. There is no possible error recovery, so the driver just logs a message. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-6-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit d5f34ca5df7c0ae075fdfeba20edd6f81c792554 Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:37 2025 +0300 drm/bridge: analogix_dp: inline analogix_dp_prepare_panel() The analogix_dp_prepare_panel() is now only calling a corresponding drm_panel function. Inline it to simplify the code. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-5-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 62ca1c3a146c73f8b8a381bf4461a82951defb8b Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:36 2025 +0300 drm/bridge: analogic_dp: drop panel_lock The analogix_dp_prepare_panel() function is called from bridge's atomic_pre_enable() and atomic_post_disable() callbacks, which can not happen simultaneously. Drop the useless mutex. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-4-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 4fc72e1fc46b0dca74c1f8c94091e524ad5b9fdb Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:35 2025 +0300 drm/bridge: analogic_dp: drop panel_is_modeset The dp->panel_is_modeset is now a write-only field. Drop it completely. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-3-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 0ce432e18c932a7fd219b9c2bf1db623fb0f7840 Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:34 2025 +0300 drm/bridge: analogix_dp: drop unused argument to analogix_dp_prepare_panel() After previous cleanup all calling sites pass true as is_modeset_prepare argument to analogix_dp_prepare_panel(). Drop dead code depending on that argument being false. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-2-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit b65cbfe0e1d8bcb74dbeb221d423dd926f326d05 Author: Dmitry Baryshkov Date: Tue Apr 1 08:11:33 2025 +0300 drm/bridge: analogix_dp: drop extra calls to analogix_dp_prepare_panel() The analogix_dp_prepare_panel() returns immediately if there is no attached panel. Drop several calls to this function which are performed when dp->plat_data->panel is NULL. Tested-by: Damon Ding Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-1-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 2f0066dae66f30386ecd6408410e27a4d6818c15 Author: Nícolas F. R. A. Prado Date: Mon Apr 21 16:49:08 2025 -0400 arm64: dts: mediatek: mt8390-genio-common: Add firmware-name for scp0 Add the firmware-name property for SCP core0 so the firmware can be loaded from its canonical location in the linux-firmware repository. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20250421-scp-dual-core-mt8390-v2-5-c84117a959a9@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b1e157c61db5e6f8d9c35e8ebc714ab6ce02ee41 Author: Nícolas F. R. A. Prado Date: Mon Apr 21 16:49:07 2025 -0400 arm64: dts: mediatek: mt8188: Describe SCP as a cluster with two cores The SCP is currently described in the Devicetree as a single-core processor, but really it is a cluster with two cores. Describe the full cluster but enable only core0 on the current mt8188 platforms since that's the only one usable with the upstream firmware. Co-developed-by: Tinghan Shen Signed-off-by: Tinghan Shen Co-developed-by: Jason Chen Signed-off-by: Jason Chen Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20250421-scp-dual-core-mt8390-v2-4-c84117a959a9@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 29f4c4da74acfbd54f5ad2dfafe1a8f93af00431 Author: Nathan Chancellor Date: Fri Apr 18 16:17:20 2025 -0400 gpio: Restrict GPIO_ICH to compile testing with HAS_IOPORT When building gpio-ich.c for a platform that does not have IO port access like s390, there are several errors due to the use of inl() and outl() throughout the driver: drivers/gpio/gpio-ich.c: In function 'ichx_read_bit': include/asm-generic/io.h:578:14: error: call to '_inl' declared with attribute error: inl() requires CONFIG_HAS_IOPORT Only allow compile testing when the targeted platform selects HAS_IOPORT so that there are no compile time errors. Fixes: f3592d252f77 ("gpio: ich: enable building with COMPILE_TEST=y") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504171941.g1yXja0j-lkp@intel.com/ Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250418-gpio-ich-fix-build-without-ioport-v1-1-83fc753438ec@kernel.org Signed-off-by: Bartosz Golaszewski commit 171bb5123fbc1c64a89a77b365e27e263c50491c Author: František Kučera Date: Mon Apr 21 17:59:53 2025 +0200 ALSA: usb-audio: Add Pioneer DJ DJM-V10 support Pioneer DJ DJM-V10 is a high end mixer that acts like a USB sound card. The MIDI controller part is standard but the PCM part is "vendor specific". Input and output is enabled by this patch: - 12 channels (6 stereo) in each direction - 44 100 / 48 000 / 96 000 Hz - S24_3LE Capture channels can be configured through alsamixer. Playback channels are fixed and controlled by hardware knobs on the mixer. Signed-off-by: František Kučera Link: https://patch.msgid.link/20250421155953.4440-1-konference@frantovo.cz Signed-off-by: Takashi Iwai commit 05100d16412ff61a1488a4dfdbce39267b35f0cc Author: Chen-Yu Tsai Date: Mon Apr 21 16:52:42 2025 +0800 ALSA: pcm: Make snd_pcm_lib_malloc_pages() debug message say "allocate" snd_pcm_lib_malloc_pages() is commonly used for allocating buffers during the hw_params callback, whereas preallocating buffers goes through preallocate_pcm_pages(). Having the same terminology in the failure debug messages in both misleads developers. Change the debug message in snd_pcm_lib_malloc_pages() to use the term "allocate" to match its intended use. Signed-off-by: Chen-Yu Tsai Link: https://patch.msgid.link/20250421085244.377228-1-wenst@chromium.org Signed-off-by: Takashi Iwai commit 127e612bf16726620e431b6e0f771424916492be Author: Sunil Khatri Date: Mon Apr 21 17:45:49 2025 +0530 drm/amdgpu: update fence ptr with context:seqno log context:seqno of the fence during timeout rather than logging fence pointer. Reviewed-by: Arvind Yadav Cc: Tvrtko Ursulin Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit cade59abaa0586100a95c72725d9bde0fadc3845 Author: Arvind Yadav Date: Wed Apr 9 15:45:34 2025 +0530 drm/amdgpu/gfx12: Add fw minimum version check for usermode queue This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123] v2: Addressed review comments from Alex - Just check the firmware versions directly. Cc: Alex Deucher Cc: Christian Koenig Cc: Shashank Sharma Cc: Sunil Khatri Acked-by: Alex Deucher Reviewed-by: Sunil Khatri Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 61ca97e9590ceac8c96a40b8526332c1c36409dc Author: Arvind Yadav Date: Wed Apr 9 15:41:59 2025 +0530 drm/amdgpu/gfx11: Add fw minimum version check for usermode queue This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120] v2: Addressed review comments from Alex. - Just check the firmware versions directly. v3: Firmware version checks only for Navi3x(by Alex). Cc: Alex Deucher Cc: Christian Koenig Cc: Shashank Sharma Cc: Sunil Khatri Acked-by: Alex Deucher Reviewed-by: Sunil Khatri Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 3f397cd203f247879c2f1a061e90d4c8d23655de Author: Srinivasan Shanmugam Date: Fri Apr 18 00:57:19 2025 +0530 drm/amd/display: Add NULL pointer checks in dm_force_atomic_commit() This commit updates the dm_force_atomic_commit function to replace the usage of PTR_ERR_OR_ZERO with IS_ERR for checking error states after retrieving the Connector (drm_atomic_get_connector_state), CRTC (drm_atomic_get_crtc_state), and Plane (drm_atomic_get_plane_state) states. The function utilized PTR_ERR_OR_ZERO for error checking. However, this approach is inappropriate in this context because the respective functions do not return NULL; they return pointers that encode errors. This change ensures that error pointers are properly checked using IS_ERR before attempting to dereference. Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Tom Chung Cc: Roman Li Cc: Alex Hung Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 42a66677805d03df9e2600fab82d0cbe855500e1 Author: Alex Deucher Date: Wed Apr 16 17:49:45 2025 -0400 drm/amdgpu/userq: use consistent function naming s/userqueue/userq/ 1. remove the mix of amdgpu_userqueue and amdgpu_userq 2. to be consistent with other amdgpu_userq_fence.c 3. it's shorter Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 4fdbe3a623b264d0f361a81a41baff16b4aa6bb1 Author: Alex Deucher Date: Wed Apr 16 17:27:41 2025 -0400 drm/amdgpu/userq: rename eviction helpers suspend/resume -> evict/restore Rename to avoid confusion with the system suspend and resume helpers. v2: update error messages Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit d13e95967ebfde85d244ea626c8b14a12bca14ac Author: Alex Deucher Date: Wed Apr 16 14:40:25 2025 -0400 drm/amdgpu/userq: move waiting for last fence before umap Need to wait for the last fence before unmapping. This also fixes a memory leak in amdgpu_userqueue_cleanup() when the fence isn't signalled. Fixes: b0db33c8c50f ("drm/amdgpu/userq: rework front end call sequence") Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 36b0bc1731c82fdf2b9228fe4e86d99e5063be1b Author: Alex Deucher Date: Wed Apr 16 14:35:05 2025 -0400 drm/amdgpu/userq: unmap queues amdgpu_userq_mgr_fini() This was missed when the map and unmap were split out of the mqd create and destroy functions. Fixes: b0db33c8c50f ("drm/amdgpu/userq: rework front end call sequence") Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit e67b95f0cd5e8dd57a9df5d5d15da6ba7847808a Author: Alex Deucher Date: Sat Apr 12 12:59:38 2025 -0400 drm/amdgpu: switch from queue_active to queue state Track the state of the queue rather than simple active vs not. This is needed for other states (hung, preempted, etc.). While we are at it, move the state tracking into the user queue front end code. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit ba324ffb25999e14b8488d085ae9916d6f4a6bcf Author: Alex Deucher Date: Wed Apr 16 16:59:08 2025 -0400 drm/amdgpu/userq: optimize enforce isolation and s/r If user queues are disabled for all IPs in the case of suspend and resume and for gfx/compute in the case of enforce isolation, we can return early. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit d61724056a74b6316f92433bd89f08421a36d2d9 Author: Dr. David Alan Gilbert Date: Fri Apr 18 01:21:17 2025 +0100 drm/amd/display: Remove unused *vbios_smu_set_dprefclk rn_vbios_smu_set_dprefclk() was added in 2019 by commit 4edb6fc91878 ("drm/amd/display: Add Renoir clock manager") rv1_vbios_smu_set_dprefclk() was also added in 2019 by commit dc88b4a684d2 ("drm/amd/display: make clk mgr soc specific") neither have been used. Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit fbe6fa7228c615276d0cb611afefa94c5c873c5e Author: Dr. David Alan Gilbert Date: Fri Apr 18 01:21:16 2025 +0100 drm/radeon: Remove unused radeon_fence_wait_any radeon_fence_wait_any() last use was removed in 2023's commit 254986e324ad ("drm/radeon: Use the drm suballocation manager implementation.") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 9427ff3b4ab6d623940aca146f3e7606824ee75b Author: Dr. David Alan Gilbert Date: Fri Apr 18 01:21:14 2025 +0100 drm/radeon/radeon_audio: Remove unused r600_hdmi_audio_workaround The last use of r600_hdmi_audio_workaround() was removed by 2014's commit 6e72376dcc66 ("radeon/audio: consolidate audio_mode_set() functions") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 696e8fa3547394d50e387923ba220fbdb6347b6d Author: Xiang Liu Date: Fri Apr 18 15:13:44 2025 +0800 drm/amdgpu: Print kernel message when error logged by scrub Print a kernel message when the scrub bit of status register is set to indicate that errors are being logged by the scrub. Signed-off-by: Xiang Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 20232192a5044d1f66dcbef0a24de1bb8157738d Author: Gergo Koteles Date: Wed Apr 2 19:03:31 2025 +0200 drm/amd/display: do not copy invalid CRTC timing info Since b255ce4388e0, it is possible that the CRTC timing information for the preferred mode has not yet been calculated while amdgpu_dm_connector_mode_valid() is running. In this case use the CRTC timing information of the actual mode. Fixes: b255ce4388e0 ("drm/amdgpu: don't change mode in amdgpu_dm_connector_mode_valid()") Closes: https://lore.kernel.org/all/ed09edb167e74167a694f4854102a3de6d2f1433.camel@irl.hu/ Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4085 Signed-off-by: Gergo Koteles Reviewed-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 33bc89949b4366dff2dca30bc61ba1c0cbcd2ab2 Author: TungYu Lu Date: Fri Apr 11 10:41:48 2025 +0800 drm/amd/display: Correct prefetch calculation [Why] The minimum value of the dst_y_prefetch_equ was not correct in prefetch calculation whice causes OPTC underflow. [How] Add the min operation of dst_y_prefetch_equ in prefetch calculation for legacy DML. Reviewed-by: Nicholas Kazlauskas Signed-off-by: TungYu Lu Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 19e743f0fb730e4dac43e37bb71d1ebdb622b3cf Author: Dillon Varone Date: Tue Apr 1 12:06:35 2025 -0400 drm/amd/display: Refactor SubVP cursor limiting logic [WHY] There are several gaps that can result in SubVP being enabled with incompatible HW cursor sizes, and unjust restrictions to cursor size due to wrong predictions on future usage of SubVP [HOW] - remove "prediction" logic in favor of tagging based on previous SubVP usage - block SubVP if current HW cursor settings are incompatible - provide interface for DM to determine if HW cursor should be disabled due to an attempt to enable SubVP Reviewed-by: Alvin Lee Signed-off-by: Dillon Varone Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 11772eb73bb75558b530162fc0eb669e5bbc1d19 Author: Alex Deucher Date: Wed Apr 16 16:43:52 2025 -0400 drm/amdgpu/userq: add a helper to check which IPs are enabled Add a helper to get a mask of IPs which support user queues. Use this in the INFO IOCTL to get the IP mask to replace the current code. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 4b27406380b0b9ada6b4893bc8f6766dd34fff36 Author: Arunpravin Paneer Selvam Date: Fri Apr 11 15:08:30 2025 +0530 drm/amdgpu: Add queue id support to the user queue wait IOCTL Add queue id support to the user queue wait IOCTL drm_amdgpu_userq_wait structure. This is required to retrieve the wait user queue and maintain the fence driver references in it so that the user queue in the same context releases their reference to the fence drivers at some point before queue destruction. Otherwise, we would gather those references until we don't have any more space left and crash. v2: Modify the UAPI comment as per the mesa and libdrm UAPI comment. Libdrm MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/408 Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34493 Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4ec2141d23d3bbede9347a60580a40d9e11089ff Author: Alex Deucher Date: Wed Feb 26 21:33:01 2025 -0500 drm/amdgpu/userq: enable support for secure queues Enable users to create secure GFX/compute queues. Reviewed-by: Sunil Khatri Tested-by: Jesse.Zhang Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 87ceff6136dbbfc8d530a1be7e3ba1282548d6dc Author: Alex Deucher Date: Wed Feb 26 21:25:22 2025 -0500 drm/amdgpu/userq/mes: pass the secure flag to mqd init So that we initialize the MQD as a secure queue. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 8aaeb25327ba62443d306238cd621c7fcbe22115 Author: Meenakshikumar Somasundaram Date: Tue Apr 8 11:37:58 2025 -0400 drm/amd/display: Fix pixel rate divider policy for 1 pixel per cycle config [Why] Pixel rate dividor was not programmed correctly for 1 pixel per cycle configuration for empty tu case. [How] Included check for empty tu when pixel rate dividor values were selected. Reviewed-by: Michael Strauss Signed-off-by: Meenakshikumar Somasundaram Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 8f772d79ef39b463ead00ef6f009bebada3a9d49 Author: Leo Li Date: Tue Mar 18 18:05:05 2025 -0400 drm/amd/display: Default IPS to RCG_IN_ACTIVE_IPS2_IN_OFF [Why] Recent findings show negligible power savings between IPS2 and RCG during static desktop. In fact, DCN related clocks are higher when IPS2 is enabled vs RCG. RCG_IN_ACTIVE is also the default policy for another OS supported by DC, and it has faster entry/exit. [How] Remove previous logic that checked for IPS2 support, and just default to `DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF`. Fixes: 199888aa25b3 ("drm/amd/display: Update IPS default mode for DCN35/DCN351") Reviewed-by: Aurabindo Pillai Signed-off-by: Leo Li Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 8e40dd932037d52e0c599f16057189b4756d2e5c Author: Charlene Liu Date: Tue Apr 8 16:35:38 2025 -0400 drm/amd/display: Revert "not disable dtb as dto src at dpms off" [why] not all the asic using the same code path. need to revisit and limit the impact. This reverts commit 32be4e39f459f3ac9c191569ae8e3731cb82f7ab. Reviewed-by: Gabe Teeger Signed-off-by: Charlene Liu Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 1594b60d74959c0680ddf777a74963c98afcdd7e Author: George Shen Date: Mon Apr 7 12:35:57 2025 -0400 drm/amd/display: Use 16ms AUX read interval for LTTPR with old sinks [Why/How] LTTPR are required to program DPCD 0000Eh to 0x4 (16ms) upon AUX read reply to this register. Since old Sinks witih DPCD rev 1.1 and earlier may not support this register, assume the mandatory value is programmed by the LTTPR to avoid AUX timeout issues. Reviewed-by: Wenjing Liu Signed-off-by: George Shen Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit a918bb4a90d423ced2976a794f2724c362c1f063 Author: Mario Limonciello Date: Fri Apr 4 09:34:52 2025 -0500 drm/amd/display: Fix ACPI edid parsing on some Lenovo systems [Why] The ACPI EDID in the BIOS of a Lenovo laptop includes 3 blocks, but dm_helpers_probe_acpi_edid() has a start that is 'char'. The 3rd block index starts after 255, so it can't be indexed properly. This leads to problems with the display when the EDID is parsed. [How] Change the variable type to 'short' so that larger values can be indexed. Cc: Renjith Pananchikkal Reported-by: Mark Pearson Suggested-by: David Ober Fixes: c6a837088bed ("drm/amd/display: Fetch the EDID from _DDC if available for eDP") Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit ce2e117bfb95f5b4fe4dc08100c23e3027fb3a01 Author: Taimur Hassan Date: Sun Apr 6 23:24:52 2025 -0500 drm/amd/display: Promote DC to 3.2.329 Summary: * Implement HDMI Read request * RMCM and MCM 3DLUT support * Enable urgent latency adjustment on DCN35 * Enable phy-ssc reduction by default Signed-off-by: Taimur Hassan Signed-off-by: Zaeem Mohamed Reviewed-by: Leo Li Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 246b259f1dbdc0725a7331ede1660a5b59fb708f Author: Jani Nikula Date: Thu Apr 17 12:10:38 2025 +0300 drm/i915/pch: abstract fake PCH detection better Abstract detection of platforms with south display on the same PCI device or SoC die as north display, and all around clarify what this means. Debug log about it for good measure. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/95cd619b63a81a0a7f8c73a64694da9d41e3a575.1744880985.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2958620abcb2a8f61f007cc588ababac555a062e Author: Jani Nikula Date: Thu Apr 17 12:10:37 2025 +0300 drm/i915/display: drop lots of unnecessary #include i915_drv.h With the PCH macros switched to use struct intel_display, we have a number of files that no longer need struct drm_i915_private or anything else from i915_drv.h anymore. Remove the #include, and add the missing includes that were previously implicit. v2: Drop even more of the includes Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/5dc9e6a98461c344febac4c645875d8688eba906.1744880985.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4e9b0ac17f5da2ac03090bf6b706970293c64d1c Author: Jani Nikula Date: Thu Apr 17 12:10:36 2025 +0300 drm/i915/display: pass struct intel_display to PCH macros Now that INTEL_PCH_TYPE() and HAS_PCH_*() macros are under display, and accept a struct intel_display pointer, use that instead of struct drm_i915_private pointer in display code. This is done naively by running: $ sed -i 's/\(INTEL_PCH_TYPE\|HAS_PCH_[A-Z0-9_-]*\)([^)]*)/\1(display)/g' \ $(find drivers/gpu/drm/i915/display -name "*.c") and fixing the fallout, i.e. removing unused local i915 variables and adding display variables where needed. v2: Rebase Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/999f4d7b8ed11739b1c5ec8d6408fc39d5e3776b.1744880985.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit bdb30d565f4b53e91abaccf83ecd718e5ba0f7c1 Author: Thomas Weißschuh Date: Tue Sep 10 12:11:36 2024 +0200 x86/vdso: Remove redundant #ifdeffery around in_ia32_syscall() The #ifdefs only guard code that is also guarded by in_ia32_syscall(), which already contains the same #ifdef itself. Signed-off-by: Thomas Weißschuh Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Brian Gerst Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: https://lore.kernel.org/r/20240910-x86-vdso-ifdef-v1-2-877c9df9b081@linutronix.de commit 2ce8043b1d34756509430675696aafcd6db601c7 Author: Thomas Weißschuh Date: Tue Sep 10 12:11:35 2024 +0200 x86/vdso: Remove #ifdeffery around page setup variants Replace the open-coded ifdefs in C sources files with IS_ENABLED(). This makes the code easier to read and enables the compiler to typecheck also the disabled parts, before optimizing them away. To make this work, also remove the ifdefs from declarations of used variables. Signed-off-by: Thomas Weißschuh Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Brian Gerst Cc: Eric Biederman Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: https://lore.kernel.org/r/20240910-x86-vdso-ifdef-v1-1-877c9df9b081@linutronix.de commit 0acf15d0a9e52219d11f0863b75cc04ab7045c49 Author: Chuan Liu Date: Tue Apr 15 10:45:28 2025 +0800 soc: amlogic: clk-measure: Add support for S4 Add the clk-measurer clocks IDs for the Amlogic S4 SoC family. Reviewed-by: Neil Armstrong Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-5-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit 57c1da85160fd6677923a5c29c2fc8c6dfbfb495 Author: Chuan Liu Date: Tue Apr 15 10:45:27 2025 +0800 soc: amlogic: clk-measure: Add support for C3 Add the clk-measurer clocks IDs for the Amlogic C3 SoC family. Reviewed-by: Neil Armstrong Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-4-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit fb80ff25d57781d18adbe63c2a0170290144311a Author: Chuan Liu Date: Tue Apr 15 10:45:26 2025 +0800 dt-bindings: soc: amlogic: S4 supports clk-measure S4 adds support for clk-measure. Acked-by: Rob Herring (Arm) Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-3-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit ddcbc9d3f19a43de048b03eb43496d6a6c5a4d4f Author: Chuan Liu Date: Tue Apr 15 10:45:25 2025 +0800 dt-bindings: soc: amlogic: C3 supports clk-measure C3 adds support for clk-measure. Acked-by: Rob Herring (Arm) Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-2-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit 7f1e9e813a82de83ff267d4842db89a825b38675 Author: Chuan Liu Date: Tue Apr 15 10:45:24 2025 +0800 soc: amlogic: clk-measure: Define MSR_CLK's register offset separately Since the MSR_CLK register offset differs between chip variants, we replace the macro-based definition with chip-specific assignments. Change the max_register in regmap_config to be retrieved from DTS. Reviewed-by: Neil Armstrong Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-1-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit ea4b19c45f66c973b2237a3424c5e675c1f08fcf Author: Chuan Liu Date: Tue Apr 15 10:45:30 2025 +0800 arm64: dts: amlogic: S4: Add clk-measure controller node Add the clk-measure controller node for S4 SoC family. Reviewed-by: Neil Armstrong Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-7-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit 431a5281e70176c9efddd965670df0a3eba593c7 Author: Chuan Liu Date: Tue Apr 15 10:45:29 2025 +0800 arm64: dts: amlogic: C3: Add clk-measure controller node Add the clk-measure controller node for C3 SoC family. Reviewed-by: Neil Armstrong Signed-off-by: Chuan Liu Link: https://lore.kernel.org/r/20250415-clk-measure-v3-6-9b8551dd33b4@amlogic.com Signed-off-by: Neil Armstrong commit 036c94c9fd05824f86a92db115eba2773cc79231 Author: Andrew Sayers Date: Fri Apr 11 16:25:04 2025 +0100 PM: sleep: Use two lines for "Restarting..." / "done" messages Other messages are occasionally printed between these two, for example: [203104.106534] Restarting tasks ... [203104.106559] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915]) [203104.112354] done. This seems to be a timing issue, seen in two of the eleven hibernation exits in my current `dmesg` output. When printed on its own, the "done" message has the default log level. This makes the output of `dmesg --level=warn` quite misleading. Add enough context for the "done" messages to make sense on their own, and use the same log level for all messages. Change the messages to "..." / "Done .", unlike a449dfbfc089 which uses "..." / " completed.". Front-loading the unique part of the message makes it easier to scan the log, and reduces ambiguity for users who aren't confident in their English comprehension. Reviewed-by: Lucas De Marchi Signed-off-by: Andrew Sayers Link: https://patch.msgid.link/20250411152632.2806038-1-kernel.org@pileofstuff.org Signed-off-by: Rafael J. Wysocki commit 443046d1ad66607f324c604b9fbdf11266fa8aad Author: Rafael J. Wysocki Date: Fri Mar 14 14:14:30 2025 +0100 PM: sleep: Make suspend of devices more asynchronous In analogy with previous changes, make device_suspend_late() and device_suspend_noirq() start the async suspend of the device's parent after the device itself has been processed and make dpm_suspend_late() and dpm_noirq_suspend_devices() start processing "async" leaf devices (that is, devices without children) upfront so they don't need to wait for the other devices they don't depend on. This change reduces the total duration of device suspend on some systems measurably, but not significantly. Suggested-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1924195.CQOukoFCf9@rjwysocki.net commit aa7a9275ab814705b60ba8274277d91da6ab6122 Author: Rafael J. Wysocki Date: Fri Mar 14 14:13:53 2025 +0100 PM: sleep: Suspend async parents after suspending children In analogy with the previous change affecting the resume path, make device_suspend() start the async suspend of the device's parent after the device itself has been processed and make dpm_suspend() start processing "async" leaf devices (that is, devices without children) upfront so they don't need to wait for the "sync" devices they don't depend on. On the Dell XPS13 9360 in my office, this change reduces the total duration of device suspend by approximately 100 ms (over 20%). Suggested-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3541233.QJadu78ljV@rjwysocki.net commit 0cbef962ce1ff344ecfe32d1c874978f1f7d410a Author: Rafael J. Wysocki Date: Fri Mar 14 13:50:09 2025 +0100 PM: sleep: Resume children after resuming the parent According to [1], the handling of device suspend and resume, and particularly the latter, involves unnecessary overhead related to starting new async work items for devices that cannot make progress right away because they have to wait for other devices. To reduce this problem in the resume path, use the observation that starting the async resume of the children of a device after resuming the parent is likely to produce less scheduling and memory management noise than starting it upfront while at the same time it should not increase the resume duration substantially. Accordingly, modify the code to start the async resume of the device's children when the processing of the parent has been completed in each stage of device resume and only start async resume upfront for devices without parents. Also make it check if a given device can be resumed asynchronously before starting the synchronous resume of it in case it will have to wait for another that is already resuming asynchronously. In addition to making the async resume of devices more friendly to systems with relatively less computing resources, this change is also preliminary for analogous changes in the suspend path. On the systems where it has been tested, this change by itself does not affect the overall system resume duration in a measurable way. Link: https://lore.kernel.org/linux-pm/20241114220921.2529905-1-saravanak@google.com/ [1] Suggested-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/22630663.EfDdHjke4D@rjwysocki.net commit 37f2f2fe26e8d42f4e55251b4646f06bf50d9626 Author: Justin Lai Date: Wed Apr 16 19:57:57 2025 +0800 rtase: Add ndo_setup_tc support for CBS offload in traffic control setup Add support for ndo_setup_tc to enable CBS offload functionality as part of traffic control configuration for network devices, where CBS is applied from the CPU to the switch. More specifically, CBS is applied at the GMAC in the topmost architecture diagram. Signed-off-by: Justin Lai Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250416115757.28156-1-justinlai0215@realtek.com Signed-off-by: Paolo Abeni commit b77ad30c428e6336833d9f28a9907076f8ad9432 Author: Dan Carpenter Date: Wed Apr 16 14:09:51 2025 +0300 rxrpc: rxgk: Set error code in rxgk_yfs_decode_ticket() Propagate the error code if key_alloc() fails. Don't return success. Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Link: https://patch.msgid.link/Z_-P_1iLDWksH1ik@stanley.mountain Signed-off-by: Paolo Abeni commit d4b9fc2af45d2b91b1654c4aaa1edcb4dd8f4918 Author: Kever Yang Date: Mon Apr 14 22:51:10 2025 +0800 arm64: dts: rockchip: Add rk3576 pcie nodes rk3576 has two pcie controllers, both are pcie2x1 work with naneng-combphy. Signed-off-by: Kever Yang Tested-by: Shawn Lin Reviewed-by: Nicolas Frattaroli Tested-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20250414145110.11275-3-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit abfe411af85aa6ecde580b1f75b9c8145b635fa7 Author: Andy Yan Date: Sat Apr 19 20:13:18 2025 +0800 arm64: dts: rockchip: Enable HDMI audio outputs for Cool Pi CM5 EVB Enable audio outputs for two HDMI ports on Cool Pi CM5 EVB Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250419121326.388298-3-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 85e3fd37204a79e0cd3105176081439ddefbd3b2 Author: Andy Yan Date: Sat Apr 19 20:13:17 2025 +0800 arm64: dts: rockchip: Enable HDMI1 on Cool Pi CM5 EVB Enable the second HDMI output port on Cool Pi CM5 EVB Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250419121326.388298-2-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 99685162462c2c70f9e2fbe06481a84a5d0220ca Author: Andy Yan Date: Sat Apr 19 20:13:16 2025 +0800 arm64: dts: rockchip: Rename hdmi-con to hdmi0-con for Cool Pi CM5 EVB There are two hdmi connector on Cool Pi CM5 EVB, the current supported is hdmi0, assign corresponding index to it. It will be convenient for us to add support for another one. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250419121326.388298-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 53862b991e79d8816d5ff54b5954d6a0fe1dcd4c Author: Damon Ding Date: Mon Mar 10 18:41:14 2025 +0800 arm64: dts: rockchip: Enable eDP0 display on RK3588S EVB1 board Add the necessary DT changes to enable eDP0 on RK3588S EVB1 board: - Set pinctrl of pwm12 for backlight - Enable edp0/hdptxphy0/vp2 - Assign the parent of DCLK_VOP2_SRC to PLL_V0PLL - Add aux-bus/panel nodes For RK3588, the PLL_V0PLL is specifically designed for the VOP2. This means the clock rate of PLL_V0PLL can be adjusted according to the dclk rate of relevant VP. It is typically assigned as the dclk source of a specific VP when the clock of relevant display mode is unusual, such as the eDP panel 'lg,lp079qx1-sp0v' paired with RK3588S EVB1, which has a clock rate of 202.02MHz. Additionally, the 'force-hpd' is set for edp0 because the HPD pin on the panel side is not connected to the eDP HPD pin on the SoC side according to the RK3588S EVB1 hardware design. Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-14-damon.ding@rock-chips.com Signed-off-by: Heiko Stuebner commit dc79d3d5e7c7b2c177b4a4ca84d20d271fb68da0 Author: Damon Ding Date: Mon Mar 10 18:41:13 2025 +0800 arm64: dts: rockchip: Add eDP0 node for RK3588 Add support for the eDP0 output on RK3588 SoC. Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-13-damon.ding@rock-chips.com Signed-off-by: Heiko Stuebner commit b1d6a89d7b75435da9c541c5f9d4df8268291c6e Author: Biju Das Date: Sat Apr 12 07:12:54 2025 +0100 drm: renesas: rz-du: rzg2l_mipi_dsi: Update the comment in rzg2l_mipi_dsi_start_video() Add missing space in the comment in rzg2l_mipi_dsi_start_video(). Reported-by: Pavel Machek Closes: https://lore.kernel.org/all/ZPg7STHDn4LbLy7f@duo.ucw.cz/ Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250412061258.5447-1-biju.das.jz@bp.renesas.com commit a86aa9c247b99c8e1d89c50aabdaf39b1fbe4770 Merge: 30af0cb3106ee0 0651c83ea96c4c Author: Paolo Abeni Date: Tue Apr 22 12:27:32 2025 +0200 Merge branch 'ionic-support-qsfp-cmis' Shannon Nelson says: ==================== ionic: support QSFP CMIS This patchset sets up support for additional pages and better handling of the QSFP CMIS data. v1: https://lore.kernel.org/netdev/20250411182140.63158-1-shannon.nelson@amd.com/ ==================== Link: https://patch.msgid.link/20250415231317.40616-1-shannon.nelson@amd.com Signed-off-by: Paolo Abeni commit 0651c83ea96c4cff739ba9a71a7b7271219700b4 Author: Shannon Nelson Date: Tue Apr 15 16:13:16 2025 -0700 ionic: add module eeprom channel data to ionic_if and ethtool Make the CMIS module type's page 17 channel data available for ethtool to request. As done previously, carve space for this data from the port_info reserved space. In the future, if additional pages are needed, a new firmware AdminQ command will be added for accessing random pages. Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415231317.40616-4-shannon.nelson@amd.com Signed-off-by: Paolo Abeni commit 9c2e17d30b65a940e7d72ce67f2102d0084a93bf Author: Shannon Nelson Date: Tue Apr 15 16:13:15 2025 -0700 ionic: support ethtool get_module_eeprom_by_page Add support for the newer get_module_eeprom_by_page interface. Only the upper half of the 256 byte page is available for reading, and the firmware puts the two sections into the extended sprom buffer, so a union is used over the extended sprom buffer to make clear which page is to be accessed. With get_module_eeprom_by_page implemented there is no need for the older get_module_info or git_module_eeprom interfaces, so remove them. Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415231317.40616-3-shannon.nelson@amd.com Signed-off-by: Paolo Abeni commit c51ab838f5323a375b7f7334644456b23e7532ca Author: Shannon Nelson Date: Tue Apr 15 16:13:14 2025 -0700 ionic: extend the QSFP module sprom for more pages Some QSFP modules have more eeprom to be read by ethtool than the initial high and low page 0 that is currently available in the DSC's ionic sprom[] buffer. Since the current sprom[] is baked into the middle of an existing API struct, to make the high end of page 1 and page 2 available a block is carved from a reserved space of the existing port_info struct and the ionic_get_module_eeprom() service is taught how to get there. Newer firmware writes the additional QSFP page info here, yet this remains backward compatible because older firmware sets this space to all 0 and older ionic drivers do not use the reserved space. Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415231317.40616-2-shannon.nelson@amd.com Signed-off-by: Paolo Abeni commit 93f2878136262e6efcc6320bc31ada62fb0afd20 Author: Lad Prabhakar Date: Mon Apr 7 17:52:01 2025 +0100 clk: renesas: r9a09g057: Add clock and reset entries for USB2 Add clock and reset entries for USB2. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4902413495884824f42ec405c019d49531987f1c Merge: ef224dd26ca355 ad227dab306543 Author: Geert Uytterhoeven Date: Tue Apr 22 11:37:21 2025 +0200 Merge tag 'renesas-r9a09g057-dt-binding-defs-tag3' into renesas-clk-for-v6.16 Renesas RZ/V2H USB2 and GBETH Clock DT Binding Definitions USB2 and Gigabit Ethernet clock DT binding definitions for the Renesas RZ/V2H (R9A09G057) SoC, shared by driver and DT source files. commit ad227dab306543208a0658357a82712e678a06f4 Author: Lad Prabhakar Date: Mon Apr 7 17:52:00 2025 +0100 dt-bindings: clock: renesas,r9a09g057-cpg: Add USB2 PHY and GBETH PTP core clocks Add definitions for USB2 PHY core clocks and Gigabit Ethernet PTP reference core clocks in the R9A09G057 CPG DT bindings header file. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ef224dd26ca3554ba810996710bcf671bc1c6be9 Author: Lad Prabhakar Date: Mon Apr 7 17:51:58 2025 +0100 clk: renesas: rzv2h: Use both CLK_ON and CLK_MON bits for clock state validation Update the clock enable/disable logic to follow the latest hardware manual's guidelines, ensuring that both CLK_ON and CLK_MON bits are used to confirm the clock state. According to the manual, enabling a clock requires setting the CPG_CLK_ON bit and verifying the clock has started using the CPG_CLK_MON bit. Similarly, disabling a clock requires clearing the CPG_CLK_ON bit and confirming the clock has stopped via the CPG_CLK_MON bit. Modify `rzv2h_mod_clock_is_enabled()` to check CLK_MON first and then validate CLK_ON for a more accurate clock status evaluation. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e6c2b4ed4906c9be9d522af75690dc570fdde5d4 Author: Lad Prabhakar Date: Mon Apr 7 17:51:57 2025 +0100 clk: renesas: rzv2h: Use str_on_off() helper in rzv2h_mod_clock_endisable() Replace hard-coded "ON"/"OFF" strings with the `str_on_off()` helper in `rzv2h_mod_clock_endisable()`. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 52239ebe624016d01b3bf8a3a8510dfd57f56b21 Author: Biju Das Date: Mon Apr 7 17:51:56 2025 +0100 clk: renesas: rzv2h: Support static dividers without RMW Add support for static dividers that do not require read-modify-write (RMW) operations. This enables the use of the generic clk_divider_ops instead of the custom RMW-based implementation. Signed-off-by: Biju Das Co-developed-by: Lad Prabhakar Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6e1c795071359dc36e26ed96a271e06687d84f74 Author: Lad Prabhakar Date: Mon Apr 7 17:51:55 2025 +0100 clk: renesas: rzv2h: Add macro for defining static dividers Unlike dynamic dividers, static dividers do not have a monitor bit. Introduce the `DEF_CSDIV()` macro for defining static dividers, ensuring consistency with existing dynamic divider macros. Additionally, introduce the `CSDIV_NO_MON` macro to indicate the absence of a monitor bit, allowing the monitoring step to be skipped when `mon` is set to `CSDIV_NO_MON`. Note, `rzv2h_cpg_ddiv_clk_register()` will be re-used instead of generic `clk_hw_register_divider_table()` for registering satic dividers as some of the static dividers require RMW operations. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c1d6f686e5cb2530e1d04a4c994c3085c00e644c Author: Lad Prabhakar Date: Mon Apr 7 17:51:54 2025 +0100 clk: renesas: rzv2h: Add support for static mux clocks Add support for `CLK_TYPE_SMUX` to register static muxed clocks on the Renesas RZ/V2H(P) SoC. Extend `cpg_core_clk` to include parent names, mux flags, and a new `smuxed` struct. Update clock registration to handle static mux clocks. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407165202.197570-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9375d704d219006cc97b09ea0e93076655cf77d8 Author: Tommaso Merciai Date: Wed Apr 2 15:11:38 2025 +0200 clk: renesas: r9a09g047: Add clock and reset entries for GE3D Add CLK_PLLVDO_GPU along with the necessary clock and reset entries for GE3D. Signed-off-by: Tommaso Merciai Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250402131142.1270701-2-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 506f96095ec2d7d1279fb49e78ae27b2abd915de Author: Biju Das Date: Thu Mar 20 09:31:01 2025 +0000 clk: renesas: rzv2h: Fix a typo Fix a typo montor->monitor in kernel-doc comment. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250320093107.36784-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4c5e0f0c89f0c54610ab6de29b0649f799a66542 Author: Tommaso Merciai Date: Wed Apr 2 15:11:41 2025 +0200 arm64: dts: renesas: rzg3e-smarc-som: Enable Mali-G52 Enable the Mali-G52 (GPU) node on the RZ/G3E SMARC SoM board. Signed-off-by: Tommaso Merciai Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250402131142.1270701-5-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit af06adb5106ad1e4ca8030bd9e15a9d8bc4baad8 Author: Tommaso Merciai Date: Wed Apr 2 15:11:40 2025 +0200 arm64: dts: renesas: r9a09g047: Add Mali-G52 GPU node Add the Mali-G52 GPU node to the SoC DTSI. Signed-off-by: Tommaso Merciai Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250402131142.1270701-4-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5ecd5a8261d00c1eb97bbe5392c9f2a7bc1fa2bd Author: John Madieu Date: Sat Mar 29 13:12:57 2025 +0100 arm64: dts: renesas: rzg3e-smarc-som: Add RAA215300 pmic support Enable RAA215300 PMIC and built-in RTC support on the RZ/G3E SoM module. Also add related clock and interrupt signals. Signed-off-by: John Madieu Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250329121258.172099-3-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f7a98e256ee30f50de1e7b43cc383828834e8c9e Author: John Madieu Date: Sat Mar 29 13:12:56 2025 +0100 arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol Add a device node for I2C2 pincontrol. Also enable the I2C2 device node with 1MHz clock frequency as it is connected to the RAA215300 PMIC on the RZ/G3E SoM. Signed-off-by: John Madieu Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250329121258.172099-2-john.madieu.xa@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 30af0cb3106ee011756533da55f0ea1aa37d654b Merge: 07e32237ed9d3f 1f763fa808e92a Author: Paolo Abeni Date: Tue Apr 22 11:11:27 2025 +0200 Merge branch 'vxlan-convert-fdb-table-to-rhashtable' Ido Schimmel says: ==================== vxlan: Convert FDB table to rhashtable The VXLAN driver currently stores FDB entries in a hash table with a fixed number of buckets (256), resulting in reduced performance as the number of entries grows. This patchset solves the issue by converting the driver to use rhashtable which maintains a more or less constant performance regardless of the number of entries. Measured transmitted packets per second using a single pktgen thread with varying number of entries when the transmitted packet always hits the default entry (worst case): Number of entries | Improvement ------------------|------------ 1k | +1.12% 4k | +9.22% 16k | +55% 64k | +585% 256k | +2460% The first patches are preparations for the conversion in the last patch. Specifically, the series is structured as follows: Patch #1 adds RCU read-side critical sections in the Tx path when accessing FDB entries. Targeting at net-next as I am not aware of any issues due to this omission despite the code being structured that way for a long time. Without it, traces will be generated when converting FDB lookup to rhashtable_lookup(). Patch #2-#5 simplify the creation of the default FDB entry (all-zeroes). Current code assumes that insertion into the hash table cannot fail, which will no longer be true with rhashtable. Patches #6-#10 add FDB entries to a linked list for entry traversal instead of traversing over them using the fixed size hash table which is removed in the last patch. Patches #11-#12 add wrappers for FDB lookup that make it clear when each should be used along with lockdep annotations. Needed as a preparation for rhashtable_lookup() that must be called from an RCU read-side critical section. Patch #13 treats dst cache initialization errors as non-fatal. See more info in the commit message. The current code happens to work because insertion into the fixed size hash table is slow enough for the per-CPU allocator to be able to create new chunks of per-CPU memory. Patch #14 adds an FDB key structure that includes the MAC address and source VNI. To be used as rhashtable key. Patch #15 does the conversion to rhashtable. ==================== Link: https://patch.msgid.link/20250415121143.345227-1-idosch@nvidia.com Signed-off-by: Paolo Abeni commit 1f763fa808e92a67feea8364ef80ca3065d74702 Author: Ido Schimmel Date: Tue Apr 15 15:11:43 2025 +0300 vxlan: Convert FDB table to rhashtable FDB entries are currently stored in a hash table with a fixed number of buckets (256), resulting in performance degradation as the number of entries grows. Solve this by converting the driver to use rhashtable which maintains more or less constant performance regardless of the number of entries. Measured transmitted packets per second using a single pktgen thread with varying number of entries when the transmitted packet always hits the default entry (worst case): Number of entries | Improvement ------------------|------------ 1k | +1.12% 4k | +9.22% 16k | +55% 64k | +585% 256k | +2460% In addition, the change reduces the size of the VXLAN device structure from 2584 bytes to 672 bytes. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-16-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit f13f3b4157dd9a05a5b651dfd15a4efa2df06f67 Author: Ido Schimmel Date: Tue Apr 15 15:11:42 2025 +0300 vxlan: Introduce FDB key structure In preparation for converting the FDB table to rhashtable, introduce a key structure that includes the MAC address and source VNI. No functional changes intended. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-15-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 20c76dadc783759fd3819d289c72be590660cc8b Author: Ido Schimmel Date: Tue Apr 15 15:11:41 2025 +0300 vxlan: Do not treat dst cache initialization errors as fatal FDB entries are allocated in an atomic context as they can be added from the data path when learning is enabled. After converting the FDB hash table to rhashtable, the insertion rate will be much higher (*) which will entail a much higher rate of per-CPU allocations via dst_cache_init(). When adding a large number of entries (e.g., 256k) in a batch, a small percentage (< 0.02%) of these per-CPU allocations will fail [1]. This does not happen with the current code since the insertion rate is low enough to give the per-CPU allocator a chance to asynchronously create new chunks of per-CPU memory. Given that: a. Only a small percentage of these per-CPU allocations fail. b. The scenario where this happens might not be the most realistic one. c. The driver can work correctly without dst caches. The dst_cache_*() APIs first check that the dst cache was properly initialized. d. The dst caches are not always used (e.g., 'tos inherit'). It seems reasonable to not treat these allocation failures as fatal. Therefore, do not bail when dst_cache_init() fails and suppress warnings by specifying '__GFP_NOWARN'. [1] percpu: allocation failed, size=40 align=8 atomic=1, atomic alloc failed, no space left (*) 97% reduction in average latency of vxlan_fdb_update() when adding 256k entries in a batch. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-14-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit ebe6420674551751e6a888180ebda76f1dddf911 Author: Ido Schimmel Date: Tue Apr 15 15:11:40 2025 +0300 vxlan: Create wrappers for FDB lookup __vxlan_find_mac() is called from both the data path (e.g., during learning) and the control path (e.g., when replacing an entry). The function is missing lockdep annotations to make sure that the FDB hash lock is held during FDB updates. Rename __vxlan_find_mac() to vxlan_find_mac_rcu() to reflect the fact that it should be called from an RCU read-side critical section and call it from vxlan_find_mac() which checks that the FDB hash lock is held. Change callers to invoke the appropriate function. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-13-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 5cde39ea38813ebb5bf07922a3ba60871edebf99 Author: Ido Schimmel Date: Tue Apr 15 15:11:39 2025 +0300 vxlan: Rename FDB Tx lookup function vxlan_find_mac() is only expected to be called from the Tx path as it updates the 'used' timestamp. Rename it to vxlan_find_mac_tx() to reflect that and to avoid incorrect updates of this timestamp like those addressed by commit 9722f834fe9a ("vxlan: Avoid unnecessary updates to FDB 'used' time"). No functional changes intended. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-12-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 54f45187b635f8c4c1e554a2ed347bba7d27dfbd Author: Ido Schimmel Date: Tue Apr 15 15:11:38 2025 +0300 vxlan: Convert FDB flushing to RCU Instead of holding the FDB hash lock when traversing the FDB linked list during flushing, use RCU and only acquire the lock for entries that need to be flushed. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-11-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit a6d04f8937e3a721c3a3578fc18b28cb59b15f42 Author: Ido Schimmel Date: Tue Apr 15 15:11:37 2025 +0300 vxlan: Convert FDB garbage collection to RCU Instead of holding the FDB hash lock when traversing the FDB linked list during garbage collection, use RCU and only acquire the lock for entries that need to be removed (aged out). Avoid races by using hlist_unhashed() to check that the entry has not been removed from the list by another thread. Note that vxlan_fdb_destroy() uses hlist_del_init_rcu() to remove an entry from the list which should cause list_unhashed() to return true. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-10-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 7aa0dc750d4bca9545c89803e3779bdff4c58b58 Author: Ido Schimmel Date: Tue Apr 15 15:11:36 2025 +0300 vxlan: Use linked list to traverse FDB entries In preparation for removing the fixed size hash table, convert FDB entry traversal to use the newly added FDB linked list. No functional changes intended. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-9-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 8d45673d2d2e59d03e108c569a3e8c031aa534c8 Author: Ido Schimmel Date: Tue Apr 15 15:11:35 2025 +0300 vxlan: Add a linked list of FDB entries Currently, FDB entries are stored in a hash table with a fixed number of buckets. The table is used for both lookups and entry traversal. Subsequent patches will convert the table to rhashtable which is not suitable for entry traversal. In preparation for this conversion, add FDB entries to a linked list. Subsequent patches will convert the driver to use this list when traversing entries during dump, flush, etc. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-8-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 094adad91310d9f8f8485251129482f4f3e2c5b3 Author: Ido Schimmel Date: Tue Apr 15 15:11:34 2025 +0300 vxlan: Use a single lock to protect the FDB table Currently, the VXLAN driver stores FDB entries in a hash table with a fixed number of buckets (256). Subsequent patches are going to convert this table to rhashtable with a linked list for entry traversal, as rhashtable is more scalable. In preparation for this conversion, move from a per-bucket spin lock to a single spin lock that protects the entire FDB table. The per-bucket spin locks were introduced by commit fe1e0713bbe8 ("vxlan: Use FDB_HASH_SIZE hash_locks to reduce contention") citing "huge contention when inserting/deleting vxlan_fdbs into the fdb_head". It is not clear from the commit message which code path was holding the spin lock for long periods of time, but the obvious suspect is the FDB cleanup routine (vxlan_cleanup()) that periodically traverses the entire table in order to delete aged-out entries. This will be solved by subsequent patches that will convert the FDB cleanup routine to traverse the linked list of FDB entries using RCU, only acquiring the spin lock when deleting an aged-out entry. The change reduces the size of the VXLAN device structure from 3600 bytes to 2576 bytes. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-7-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 6ba480cca25f26bd0f0e328b2d2f8eab6bde7cc0 Author: Ido Schimmel Date: Tue Apr 15 15:11:33 2025 +0300 vxlan: Relocate assignment of default remote device The default FDB entry can be associated with a net device if a physical device (i.e., 'dev PHYS_DEV') was specified during the creation of the VXLAN device. The assignment of the net device pointer to 'dst->remote_dev' logically belongs in the if block that resolves the pointer from the specified ifindex, so move it there. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-6-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit ccc203b9a846c1d5262b5c60565ff79930c13477 Author: Ido Schimmel Date: Tue Apr 15 15:11:32 2025 +0300 vxlan: Unsplit default FDB entry creation and notification Commit 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create") split the creation of the default FDB entry from its notification to avoid sending a RTM_NEWNEIGH notification before RTM_NEWLINK. Previous patches restructured the code so that the default FDB entry is created after registering the VXLAN device and the notification about the new entry immediately follows its creation. Therefore, simplify the code and revert back to vxlan_fdb_update() which takes care of both creating the FDB entry and notifying user space about it. Hold the FDB hash lock when calling vxlan_fdb_update() like it expects. A subsequent patch will add a lockdep assertion to make sure this is indeed the case. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-5-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 69281e0fe18ab60e7b67e328214ffbd8609b13b4 Author: Ido Schimmel Date: Tue Apr 15 15:11:31 2025 +0300 vxlan: Insert FDB into hash table in vxlan_fdb_create() Commit 7c31e54aeee5 ("vxlan: do not destroy fdb if register_netdevice() is failed") split the insertion of FDB entries into the FDB hash table from the function where they are created. This was done in order to work around a problem that is no longer possible after the previous patch. Simplify the code and move the body of vxlan_fdb_insert() back into vxlan_fdb_create(). Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-4-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 884dd448f1ac8b5c5c0dcef9bcaab7c16ee48276 Author: Ido Schimmel Date: Tue Apr 15 15:11:30 2025 +0300 vxlan: Simplify creation of default FDB entry There is asymmetry in how the default FDB entry (all-zeroes) is created and destroyed in the VXLAN driver. It is created as part of the driver's newlink() routine, but destroyed as part of its ndo_uninit() routine. This caused multiple problems in the past. First, commit 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create") split the notification about the entry from its creation so that it will not be notified to user space before the VXLAN device is registered. Then, commit 6db924687139 ("vxlan: Fix error path in __vxlan_dev_create()") made the error path in __vxlan_dev_create() asymmetric by destroying the FDB entry before unregistering the net device. Otherwise, the FDB entry would have been freed twice: By ndo_uninit() as part of unregister_netdevice() and by vxlan_fdb_destroy() in the error path. Finally, commit 7c31e54aeee5 ("vxlan: do not destroy fdb if register_netdevice() is failed") split the insertion of the FDB entry into the hash table from its creation, moving the insertion after the registration of the net device. Otherwise, like before, the FDB entry would have been freed twice: By ndo_uninit() as part of register_netdevice()'s error path and by vxlan_fdb_destroy() in the error path of __vxlan_dev_create(). The end result is that the code is unnecessarily complex. In addition, the fixed size hash table cannot be converted to rhashtable as vxlan_fdb_insert() cannot fail, which will no longer be true with rhashtable. Solve this by making the addition and deletion of the default FDB entry completely symmetric. Namely, as part of newlink() routine, create the entry, insert it into to the hash table and send a notification to user space after the net device was registered. Note that at this stage the net device is still administratively down and cannot transmit / receive packets. Move the deletion from ndo_uninit() to the dellink routine(): Flush the default entry together with all the other entries, before unregistering the net device. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-3-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 804b09be09f8af4eda5346a72361459ba21fcf1b Author: Ido Schimmel Date: Tue Apr 15 15:11:29 2025 +0300 vxlan: Add RCU read-side critical sections in the Tx path The Tx path does not run from an RCU read-side critical section which makes the current lockless accesses to FDB entries invalid. As far as I am aware, this has not been a problem in practice, but traces will be generated once we transition the FDB lookup to rhashtable_lookup(). Add rcu_read_{lock,unlock}() around the handling of FDB entries in the Tx path. Remove the RCU read-side critical section from vxlan_xmit_nh() as now the function is always called from an RCU read-side critical section. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://patch.msgid.link/20250415121143.345227-2-idosch@nvidia.com Reviewed-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit e90ce42e81381665dbcedc5fa12e74759ee89639 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:55 2025 +0200 tools/nolibc: implement width padding in printf() printf can pad each argument to a certain width. Implement this for compatibility with the kselftest harness. Currently only padding with spaces is supported. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit b0bd7760df94714f78ccf98b3aa612ed71e48770 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:54 2025 +0200 selftests/nolibc: add test for snprintf() truncation Now that we have a proper snprintf() implementation, make sure truncation is handled properly. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 6311e4893ad204695473caf167e22ebf23cb8f5d Author: Thomas Weißschuh Date: Fri Apr 11 11:00:53 2025 +0200 selftests/nolibc: rename vfprintf test suite With the addition of snprintf() and its usage in nolibc-test, the name of the "vfprintf" test suite is not accurate anymore. Rename the suite to be more generic. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit c685cd6db59cc4557c93538677a8bdaa05f49fbc Author: Thomas Weißschuh Date: Fri Apr 11 11:00:52 2025 +0200 selftests/nolibc: use snprintf() for printf tests With a proper snprintf() implementation in place, the ugly pipe usage is not necessary anymore. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit ed45d24cf23521b12271d95f8e87b839e79dd65e Author: Thomas Weißschuh Date: Fri Apr 11 11:00:51 2025 +0200 tools/nolibc: add snprintf() and friends Add more of the printf() functions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 9f4a2e28bc4714487d9a0c85af2a87c07155c552 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:50 2025 +0200 tools/nolibc: allow limiting of printf destination size snprintf() allows limiting the output buffer, while still returning the number of all bytes that would have been written. Implement the limitation logic in preparation for snprintf(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit f7b3eeffd402c5eec32be9c3bfdeb3ec03e87cf3 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:49 2025 +0200 tools/nolibc: allow different write callbacks in printf Decouple the formatting logic from the writing logic to later enable writing straight to a buffer in sprintf(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit bae3cd708e8adef27ee7657cd877d9ba9aa4f2ae Author: Thomas Weißschuh Date: Fri Apr 11 11:00:48 2025 +0200 tools/nolibc: add getopt() Introduce a getopt() implementation based on the one from musl. The only deviations are adaption to the kernel coding style and nolibc infrastructure and removal of multi-byte support. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 5197b7b87cbfeed61b69ff54532bb58a0d55cb0b Author: Thomas Weißschuh Date: Fri Apr 11 11:00:47 2025 +0200 tools/nolibc: add dprintf() and vdprintf() dprintf() and vdprintf() are printf() variants printing directly into a filedescriptor. As FILE in nolibc is based directly on filedescriptors, the implementation is trivial. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 4175b5584510faa8acbfa98103781c36780d5a79 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:46 2025 +0200 Revert "selftests/nolibc: use waitid() over waitpid()" nolibc's waitpid() now uses the waitid() syscall internally. This removes the original reasoning for the reverted commit as waitpid() is now available on all platforms and has an easier interface. Switch back to waitpid(). This reverts commit a0bc8947ac731ff95a56e0c1737e69e8c56d5b78. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 0c89abf5ab3fba1e8f73cdaf0385ed9786c1c307 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:45 2025 +0200 tools/nolibc: implement waitpid() in terms of waitid() The old wait4() syscall used by waitpid() before is not available everywhere. Switch to the waitid() syscall which is the new replacement. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 67fe525e3401d48a9fb1bf437555a9d82800f3d7 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:44 2025 +0200 tools/nolibc: add setpgrp() setpgrp() is defined to be identical to setpgid(0, 0). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 7b11531ed172cc8cc2465e99c295af5ac2fd55e3 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:43 2025 +0200 tools/nolibc: add _exit() _exit() is the faster variant of exit(), skipping all cleanup actions. As nolibc does not perform any cleanup anyways, the implementation is trivial. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 9b070d97d9e52195c3a2ee084fdd7c45b6b35adf Author: Thomas Weißschuh Date: Fri Apr 11 11:00:42 2025 +0200 tools/nolibc: add tolower() and toupper() The kselftest harness uses these functions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 4de88a88bcbe4cf89477d8c6a9145fdfd929bc96 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:41 2025 +0200 tools/nolibc: use ppoll_time64 if available riscv32 does not have any of the older poll systemcalls. Use ppoll_time64 instead. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 248ddc80b145515286bfb75d08034ad4c0fdb08e Author: Thomas Weißschuh Date: Fri Apr 11 11:00:40 2025 +0200 tools/nolibc: use pselect6_time64 if available riscv32 does not have any of the older select systemcalls. Use pselect6_time64 instead. poll() is also used to implement sleep(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit e5407c0820ea5fa7117b85ed32b724af73156d63 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:39 2025 +0200 tools/nolibc: use intmax definitions from compiler The printf format checking in the compiler uses the intmax types from the compiler, not libc. This can lead to compiler errors. Instead use the types already provided by the compiler. Example issue with clang 19 for arm64: nolibc-test.c:30:2: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Werror,-Wformat] Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 4c99fbc6a06f56e266f60f5f24d0cfd8311b2c09 Author: Thomas Weißschuh Date: Fri Apr 11 11:00:38 2025 +0200 tools/nolibc: handle intmax_t/uintmax_t in printf In nolibc intmax_t and uintmax_t are always the same as (unsigned) long long/uint64_t as 128bit numbers are not supported. Even libcs that do support 128bit numbers often fix intmax_t to 64bit as it is used in ABIs and any change would break those. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit b437b8f745e21de6b45a9b3bd712407f6b4c1ecb Author: Boris Brezillon Date: Thu Apr 17 14:19:42 2025 +0200 drm/panthor: Don't create a file offset for NO_MMAP BOs Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can have a file offset but can't be mapped anyway, because panthor_gem_mmap() will filter them out. If we error out at mmap_offset creation time, we can get rid of panthor_gem_mmap() and call drm_gem_shmem_object_mmap directly, and we get rid of this inconsistency of having an mmap offset for a BO that can never be mmap-ed. Changes in v2: - Get rid of panthor_gem_mmap() - Get rid of the Fixes tag and adjust the commit message accordingly - Return ENOPERM instead of EINVAL Changes in v3: - Don't leak the BO ref - Add R-bs Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Reviewed-by: Adrián Larumbe Link: https://lore.kernel.org/r/20250417121942.3574111-1-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 6147c5f081708485e32c656931f6a57b14618fcc Author: Thierry Bultel Date: Thu Apr 3 23:29:03 2025 +0200 dt-bindings: soc: renesas: Add Renesas RZ/T2H (R9A09G077) SoC Add RZ/T2H (R9A09G077), its variants, and the RZT2H-EVK evaluation board in documentation. Acked-by: "Rob Herring (Arm)" Signed-off-by: Thierry Bultel Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250403212919.1137670-2-thierry.bultel.yh@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a8dc26a0ec43fd416ca781a8030807e65f71cfc5 Author: André Draszik Date: Thu Mar 27 12:54:28 2025 +0000 firmware: exynos-acpm: introduce devm_acpm_get_by_node() To allow ACPM clients to simply be children of the ACPM node in DT, they need to be able to get the ACPM handle based on that ACPM node directly. Add an API to allow them to do so, devm_acpm_get_by_node(). At the same time, the previous approach of acquiring the ACPM handle via a DT phandle is now obsolete and we can remove devm_acpm_get_by_phandle(), which was there to facilitate that. There are no existing or anticipated upcoming users of that API, because all clients should be children of the ACPM node going forward. Note that no DTs have been merged that use the old approach, so doing this API change in this driver now will not affect any existing DTs or client drivers. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250327-acpm-children-v1-2-0afe15ee2ff7@linaro.org Signed-off-by: Krzysztof Kozlowski commit 636baba9489a634c956d6f02076af6bc1725c132 Author: Tudor Ambarus Date: Thu Mar 27 12:54:27 2025 +0000 firmware: exynos-acpm: populate devices from device tree data ACPM clients (PMIC, clocks, etc.) will be modeled as children of the ACPM interface. Populate children platform_devices from device tree. Signed-off-by: Tudor Ambarus Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250327-acpm-children-v1-1-0afe15ee2ff7@linaro.org Signed-off-by: Krzysztof Kozlowski commit 53734383a73888e6d765aa07f4523802fdf1ee10 Author: André Draszik Date: Wed Mar 19 05:38:24 2025 +0000 firmware: exynos-acpm: silence EPROBE_DEFER error on boot This driver emits error messages when client drivers are trying to get an interface handle to this driver here before this driver has completed _probe(). Given this driver returns -EPROBE_DEFER in that case, this is not an error and shouldn't be emitted to the log, similar to how dev_err_probe() behaves, so just remove them. This change also allows us to simplify the logic around releasing of the acpm_np handle. Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver") Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250319-acpm-fixes-v2-2-ac2c1bcf322b@linaro.org Signed-off-by: Krzysztof Kozlowski commit 67af3cd813695fd3e6432b0849c453250c4685aa Author: André Draszik Date: Wed Mar 19 05:38:23 2025 +0000 firmware: exynos-acpm: fix reading longer results ACPM commands that return more than 8 bytes currently don't work correctly, as this driver ignores any such returned bytes. This is evident in at least acpm_pmic_bulk_read(), where up to 8 registers can be read back and those 8 register values are placed starting at &xfer->rxd[8]. The reason is that xfter->rxlen is initialized with the size of a pointer (8 bytes), rather than the size of the byte array that pointer points to (16 bytes) Update the code such that we set the number of bytes expected to be the size of the rx buffer. Note1: While different commands have different lengths rx buffers, we have to specify the same length for all rx buffers since acpm_get_rx() assumes they're all the same length. Note2: The different commands also have different lengths tx buffers, but before switching the code to use the minimum possible length, some more testing would have to be done to ensure this works correctly in all situations. It seems wiser to just apply this fix here without additional logic changes for now. Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver") Reviewed-by: Tudor Ambarus Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250319-acpm-fixes-v2-1-ac2c1bcf322b@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1a6ee48d8757dbd1c243fa518ff31f33665d4fa0 Author: Faraz Ata Date: Thu Apr 17 17:05:11 2025 +0530 arm64: dts: exynos: Add DT node for all UART ports Universal Serial Interface (USI) supports three serial protocol like uart, i2c and spi. ExynosAutov920 has 18 instances of USI. Add all the USI DT node and subsequent uart nodes for all the instances. Reviewed-by: Alim Akhtar Signed-off-by: Faraz Ata Link: https://lore.kernel.org/r/20250417113511.759268-1-faraz.ata@samsung.com Signed-off-by: Krzysztof Kozlowski commit e1eb7293ab4107e9e19fa609835e657fe30dfec7 Author: Casey Connolly Date: Sat Apr 19 18:31:44 2025 +0200 drm/panel: samsung-sofef00: Drop s6e3fc2x01 support We never properly supported this panel and always used the wrong init sequence. Drop support so we can move it to it's own proper driver. Fixes: 5933baa36e26 ("drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices") Signed-off-by: Casey Connolly Signed-off-by: David Heidelberg Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250419-drop-s6e3fc2x01-support-v1-1-05edfe0d27aa@ixit.cz commit 46459154f9979387486fb5f50e4aa425e33a306c Author: Michal Hocko Date: Thu Apr 3 09:43:39 2025 +0200 mm: kvmalloc: make kmalloc fast path real fast path There are users like xfs which need larger allocations with NOFAIL sementic. They are not using kvmalloc currently because the current implementation tries too hard to allocate through the kmalloc path which causes a lot of direct reclaim and compaction and that hurts performance a lot (see 8dc9384b7d75 ("xfs: reduce kvmalloc overhead for CIL shadow buffers") for more details). kvmalloc does support __GFP_RETRY_MAYFAIL semantic to express that kmalloc (physically contiguous) allocation is preferred and we should go more aggressive to make it happen. There is currently no way to express that kmalloc should be very lightweight and as it has been argued [1] this mode should be default to support kvmalloc(NOFAIL) with a lightweight kmalloc path which is currently impossible to express as __GFP_NOFAIL cannot be combined by any other reclaim modifiers. This patch makes all kmalloc allocations GFP_NOWAIT unless __GFP_RETRY_MAYFAIL is provided to kvmalloc. This allows to support both fail fast and retry hard on physically contiguous memory with vmalloc fallback. There is a potential downside that relatively small allocations (smaller than PAGE_ALLOC_COSTLY_ORDER) could fallback to vmalloc too easily and cause page block fragmentation. We cannot really rule that out but it seems that xlog_cil_kvmalloc use doesn't indicate this to be happening. [1] https://lore.kernel.org/all/Z-3i1wATGh6vI8x8@dread.disaster.area/T/#u Signed-off-by: Michal Hocko Acked-by: Shakeel Butt Link: https://patch.msgid.link/Z-48K0OdNxZXcnkB@tiehlicka Signed-off-by: Vlastimil Babka commit 61a0fc33b8538169eb30365b1598eaf33895c34f Author: Tejas Vipin Date: Sat Apr 19 09:42:10 2025 +0530 drm/mipi-dsi: Remove mipi_dsi_dcs_write_seq There are no remaining users of mipi_dsi_dcs_write_seq and it can be removed in favor of mipi_dsi_dcs_write_seq_multi. Signed-off-by: Tejas Vipin Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250419041210.515517-3-tejasvipin76@gmail.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250419041210.515517-3-tejasvipin76@gmail.com commit d6a4da523deba1814a45a593c271c32efedc39f3 Author: Tejas Vipin Date: Sat Apr 19 09:42:09 2025 +0530 drm/panel: panel-samsung-sofef00: transition to mipi_dsi wrapped functions Changes the samsung-sofef00 panel to use multi style functions for improved error handling. Signed-off-by: Tejas Vipin Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250419041210.515517-2-tejasvipin76@gmail.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250419041210.515517-2-tejasvipin76@gmail.com commit ae3e19c2739c231bedb53cec9d38ace4bf5d95bd Author: Chuan Liu Date: Wed Feb 5 15:58:43 2025 +0800 soc: amlogic: clk-measure: Optimize the memory size of clk-measure Drop "CLK_MSR_MAX" and replace it with adding a member "msr_count" in the structure to specify the count of msr_id. Mark the table of msr_id as const. Signed-off-by: Chuan Liu Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250205-optimize_memory_size_of_clk_measure-v2-1-4f546053495d@amlogic.com Signed-off-by: Neil Armstrong commit 5fdafebe570fb2286bbdd0a736bac7a9b48dc0ab Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:32 2025 -0500 arm64: dts: amlogic: Drop redundant CPU "clock-latency" The "clock-latency" property is part of the deprecated opp-v1 binding and is redundant if the opp-v2 table has equal or larger values in any "clock-latency-ns". Add any missing "clock-latency-ns" properties and remove "clock-latency". Signed-off-by: Rob Herring (Arm) Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-11-63d7dc9ddd0a@kernel.org Signed-off-by: Neil Armstrong commit ba098e5e5d0edebe27d33498f43a11498a4e494d Author: Christian Hewitt Date: Sun Mar 30 14:32:54 2025 +0000 arm64: dts: amlogic: gxlx-s905l-p271: add saradc compatible Add the saradac node using the meson-gxlx-saradc compatible to ensure MPLL clocks are poked and audio output is enabled on the p271 (S905L) board. Signed-off-by: Christian Hewitt Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20250330143254.3159519-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit f254ae62fb155bc75c69fa83711b006f091ab8db Author: Martin Blumenstingl Date: Sat Mar 29 19:58:55 2025 +0100 arm64: dts: amlogic: a1: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-8-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit fdedfc2109a55ebe408634a8554b91ac8d098052 Author: Martin Blumenstingl Date: Sat Mar 29 19:58:54 2025 +0100 arm64: dts: amlogic: axg: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-7-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit b6a41f36279a7fbe3db2ef420a9909035a537e38 Author: Martin Blumenstingl Date: Sat Mar 29 19:58:53 2025 +0100 arm64: dts: amlogic: g12: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-6-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 2b557f9c18064ae09e99ef3cb7b2835b9f42abec Author: Martin Blumenstingl Date: Sat Mar 29 19:58:52 2025 +0100 arm64: dts: amlogic: gxl: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-5-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 89c50689c0ba7eedf92b184680f7bda3a33c553e Author: Martin Blumenstingl Date: Sat Mar 29 19:58:51 2025 +0100 arm64: dts: amlogic: gxbb: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-4-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit e9bb917348718748c465890645ba775e21f56167 Author: Xianwei Zhao Date: Wed Mar 26 13:17:16 2025 +0800 arm64: dts: amlogic: a4: add pinctrl node Add pinctrl device to support Amlogic A4 and add uart pinconf. Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250326-pinctrl-node-a4-v1-1-8c30639480f6@amlogic.com Signed-off-by: Neil Armstrong commit 7db1068a5eedc419347a30dc81a25e3342fbbc10 Author: Martin Blumenstingl Date: Sat Mar 29 19:58:50 2025 +0100 ARM: dts: amlogic: meson8b: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-3-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 3fa57cb0178d3cdb7fd4abc03aebef818eaadd21 Author: Martin Blumenstingl Date: Sat Mar 29 19:58:49 2025 +0100 ARM: dts: amlogic: meson8: enable UART RX and TX pull up by default Some boards have noise on the UART RX line when the UART pins are not connected to another device (such as an USB UART adapter). This can be addressed by using a pull up resistor. Not all boards may provide such a pull up resistor on the PCB so enable the SoC's pull-up on the UART RX and TX pads by default. This matches the default (from u-boot or SoC hardware) state for the pinmux configuration on these pads. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250329185855.854186-2-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit ff4c0560ab020d34baf0aa6434f66333d25ae524 Author: Ard Biesheuvel Date: Fri Apr 18 16:13:00 2025 +0200 x86/asm: Retire RIP_REL_REF() Now that all users have been moved into startup/ where PIC codegen is used, RIP_REL_REF() is no longer needed. Remove it. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-14-ardb+git@google.com commit 681e2901330c5c27ce8b58dfdd92a3c339e47caf Author: Ard Biesheuvel Date: Fri Apr 18 16:12:59 2025 +0200 x86/boot: Drop RIP_REL_REF() uses from early SEV code Now that the early SEV code is built with -fPIC, RIP_REL_REF() has no effect and can be dropped. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-13-ardb+git@google.com commit a3cbbb4717e120f9e53fa7685909b310f7e99bf5 Author: Ard Biesheuvel Date: Fri Apr 18 16:12:58 2025 +0200 x86/boot: Move SEV startup code into startup/ Move the SEV startup code into arch/x86/boot/startup/, where it will reside along with other code that executes extremely early, and therefore needs to be built in a special manner. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-12-ardb+git@google.com commit 234cf67fc3bd290bb16a377647a9c3f5a7f28a47 Author: Ard Biesheuvel Date: Fri Apr 18 16:12:57 2025 +0200 x86/sev: Split off startup code from core code Disentangle the SEV core code and the SEV code that is called during early boot. The latter piece will be moved into startup/ in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-11-ardb+git@google.com commit b66fcee1574e72663a0c6dd7112a9e22774dbe9f Author: Ard Biesheuvel Date: Fri Apr 18 16:12:56 2025 +0200 x86/sev: Move noinstr NMI handling code into separate source file GCC may ignore the __no_sanitize_address function attribute when inlining, resulting in KASAN instrumentation in code tagged as 'noinstr'. Move the SEV NMI handling code, which is noinstr, into a separate source file so KASAN can be disabled on the whole file without losing coverage of other SEV core code, once the startup code is split off from it too. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-10-ardb+git@google.com commit 092071e0f63c2d2c54810a427d4d9a0df6aad52b Author: Ard Biesheuvel Date: Fri Apr 18 16:12:55 2025 +0200 vmlinux.lds: Include .data.rel[.local] into .data section When running in -fPIC mode, the compiler may decide to emit statically initialized data objects into .data.rel or .data.rel.local if they contain absolute references to global or local objects, respectively, which require fixing up at load time. This distinction is irrelevant for the kernel, so fold .data.rel and .data.rel.local into .data. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: David Woodhouse Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Kevin Loughlin Cc: Len Brown Cc: Linus Torvalds Cc: Rafael J. Wysocki Cc: Tom Lendacky Link: https://lore.kernel.org/r/20250418141253.2601348-9-ardb+git@google.com commit a1b582a3ff61086c1718891e979760e6c125c93a Merge: 0dcc51477b94d8 83b2d345e1786f Author: Ingo Molnar Date: Tue Apr 22 09:07:47 2025 +0200 Merge branch 'x86/urgent' into x86/boot, to merge dependent commit and upstream fixes In particular we need this fix before applying subsequent changes: d54d610243a4 ("x86/boot/sev: Avoid shared GHCB page for early memory acceptance") Signed-off-by: Ingo Molnar commit 4e2c719782a84702db7fc2dc07ced796f308fec7 Author: Dave Hansen Date: Tue Apr 22 08:32:47 2025 +0200 x86/cpu: Help users notice when running old Intel microcode Old microcode is bad for users and for kernel developers. For users, it exposes them to known fixed security and/or functional issues. These obviously rarely result in instant dumpster fires in every environment. But it is as important to keep your microcode up to date as it is to keep your kernel up to date. Old microcode also makes kernels harder to debug. A developer looking at an oops need to consider kernel bugs, known CPU issues and unknown CPU issues as possible causes. If they know the microcode is up to date, they can mostly eliminate known CPU issues as the cause. Make it easier to tell if CPU microcode is out of date. Add a list of released microcode. If the loaded microcode is older than the release, tell users in a place that folks can find it: /sys/devices/system/cpu/vulnerabilities/old_microcode Tell kernel kernel developers about it with the existing taint flag: TAINT_CPU_OUT_OF_SPEC == Discussion == When a user reports a potential kernel issue, it is very common to ask them to reproduce the issue on mainline. Running mainline, they will (independently from the distro) acquire a more up-to-date microcode version list. If their microcode is old, they will get a warning about the taint and kernel developers can take that into consideration when debugging. Just like any other entry in "vulnerabilities/", users are free to make their own assessment of their exposure. == Microcode Revision Discussion == The microcode versions in the table were generated from the Intel microcode git repo: 8ac9378a8487 ("microcode-20241112 Release") which as of this writing lags behind the latest microcode-20250211. It can be argued that the versions that the kernel picks to call "old" should be a revision or two old. Which specific version is picked is less important to me than picking *a* version and enforcing it. This repository contains only microcode versions that Intel has deemed to be OS-loadable. It is quite possible that the BIOS has loaded a newer microcode than the latest in this repo. If this happens, the system is considered to have new microcode, not old. Specifically, the sysfs file and taint flag answer the question: Is the CPU running on the latest OS-loadable microcode, or something even later that the BIOS loaded? In other words, Intel never publishes an authoritative list of CPUs and latest microcode revisions. Until it does, this is the best that Linux can do. Also note that the "intel-ucode-defs.h" file is simple, ugly and has lots of magic numbers. That's on purpose and should allow a single file to be shared across lots of stable kernel regardless of if they have the new "VFM" infrastructure or not. It was generated with a dumb script. == FAQ == Q: Does this tell me if my system is secure or insecure? A: No. It only tells you if your microcode was old when the system booted. Q: Should the kernel warn if the microcode list itself is too old? A: No. New kernels will get new microcode lists, both mainline and stable. The only way to have an old list is to be running an old kernel in which case you have bigger problems. Q: Is this for security or functional issues? A: Both. Q: If a given microcode update only has functional problems but no security issues, will it be considered old? A: Yes. All microcode image versions within a microcode release are treated identically. Intel appears to make security updates without disclosing them in the release notes. Thus, all updates are considered to be security-relevant. Q: Who runs old microcode? A: Anybody with an old distro. This happens all the time inside of Intel where there are lots of weird systems in labs that might not be getting regular distro updates and might also be running rather exotic microcode images. Q: If I update my microcode after booting will it stop saying "Vulnerable"? A: No. Just like all the other vulnerabilies, you need to reboot before the kernel will reassess your vulnerability. Signed-off-by: Dave Hansen Signed-off-by: Ingo Molnar Cc: "Ahmed S. Darwish" Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Brian Gerst Cc: John Ogness Cc: Josh Poimboeuf Cc: Juergen Gross Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Link: https://lore.kernel.org/all/20250421195659.CF426C07%40davehans-spike.ostc.intel.com (cherry picked from commit 9127865b15eb0a1bd05ad7efe29489c44394bdc1) commit c96f564e6f943cf5d8536e1c43f243aa7c42b4ed Merge: 321550859f3bd6 06e09002bc1d46 Author: Ingo Molnar Date: Tue Apr 22 08:31:41 2025 +0200 Merge branch 'x86/cpu' into x86/microcode, to pick up dependent commits Avoid a conflict in by merging pending x86/cpu changes. Signed-off-by: Ingo Molnar commit 68770d888192cd0b1d9d77baef3c2075d80a4a0f Author: Daniel Baluta Date: Thu Mar 20 14:09:55 2025 +0200 arm64: dts: imx8mp-evk: Enable DSP node for remoteproc usage Enable all relevant nodes to support remoteproc with imx8mp-evk board. - add rproc specific memory regions - enable dsp_reserved node - enable mu2 node - enable dsp node Signed-off-by: Daniel Baluta Reviewed-by: Laurentiu Mihalcea Signed-off-by: Shawn Guo commit ebccbe8d43cea95f16aec8ee6668474625c7a2a8 Author: Daniel Baluta Date: Thu Mar 20 14:09:54 2025 +0200 arm64: dts: imx8mp: Add DSP clocks DSP core needs ocram, core and debug clocks. Reviewed-by: Iuliana Prodan Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta Reviewed-by: Laurentiu Mihalcea Signed-off-by: Shawn Guo commit f048f2126fcccaff2c534a3c08a109875cff7b0e Author: Daniel Baluta Date: Thu Mar 20 14:09:53 2025 +0200 arm64: dts: imx8mp: Configure dsp node for rproc usage DSP can be used with various frameworks (e.g audio firmware, rproc). Currently 'dsp' configuration is intended for audio firmware but it doesn't work well with board level DTs (e.g imx8mp-evk) because board level DT enables audio related IPs (e.g SAI) while audio firmware needs this IPs disabled (because firmware will configure them). So, configure 'dsp' node to be used with rproc. This way users will be able to use board DT to use the DSP as long as they don't clash with Audio IP configurations. More comples usage of 'dsp' node (e.g by audio firmware) will need to create a separate dts file (or an overlay). This change follows the approach taken for other i.MX8 boards in commit 391a319c81f6d7 ("arm64: dts: imx8-ss-audio: configure dsp node for rproc usage") Reviewed-by: Iuliana Prodan Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta Reviewed-by: Laurentiu Mihalcea Signed-off-by: Shawn Guo commit caa2ee72e0da7b969deb52bfd04729009c59f03c Author: Daniel Baluta Date: Thu Mar 20 14:09:52 2025 +0200 arm64: dts: imx8mp: Add mu2 root clock Enable MU2 node and add mu2 root clock. MU2 is used to communicate with DSP core. Reviewed-by: Iuliana Prodan Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta Reviewed-by: Laurentiu Mihalcea Signed-off-by: Shawn Guo commit adcf4a5216ccca3b0ffa3d64203780d09afc00af Author: Daniel Baluta Date: Thu Mar 20 14:09:51 2025 +0200 arm64: dts: imx8mp: Use resets property Add resets property to dsp node in order to be able to control the dsp run/stall bit from audio block control. Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta Reviewed-by: Laurentiu Mihalcea Signed-off-by: Shawn Guo commit 0fd766f9595350e938e1df0ecfe9b0e881d0ab80 Author: Fabio Estevam Date: Mon Mar 17 09:31:09 2025 -0300 ARM: dts: imx51-digi-connectcore-som: Fix MMA7455 compatible The "fsl,mma7455l" compatible string is not documented anywhere. MMA7455L is the exact same device as the MMA7455, with the exception that it is lead-free. Use the documented compatible string. Signed-off-by: Fabio Estevam Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 89cedb339cb3a127c2e8ba2ef3c7ce31623acae1 Author: Krzysztof Kozlowski Date: Mon Mar 17 12:18:53 2025 +0100 ARM: dts: nxp: Align NAND controller node name with bindings Bindings expect NAND controller device nodes to be named "nand-controller". Cc: Fabio Estevam Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit d5b55c35e033954f6ef483dd836109e99d9e9b71 Author: Fabio Estevam Date: Thu Mar 13 16:29:43 2025 -0300 ARM: dts: imx: Fix the iim compatible string Per imx-iim.yaml, the compatible string should only contain a single entry. Change it accordingly to fix the following dt-schema warnings: efuse@83f98000: compatible: ['fsl,imx51-iim', 'fsl,imx27-iim', 'syscon'] is too long Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 8130eb0fd3f062e832e44f2cb0035c33f6d016ef Author: Fabio Estevam Date: Thu Mar 13 14:57:52 2025 -0300 ARM: dts: imx31/imx6: Use flash as the NOR node name According to mtd-physmap.yaml, 'nor' is not a valid node name. Change it to 'flash' to fix the following dt-schema warning: nor@0,0: $nodename:0: 'nor@0,0' does not match '^(flash|.*sram|nand)(@.*)?$' Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9f0928ea7258172514ac3d6ebdb9162970ccc965 Author: Laurentiu Mihalcea Date: Tue Mar 11 12:32:55 2025 -0400 arm64: dts: imx: add imx95 dts for sof Add imx95 DTS for SOF usage. Signed-off-by: Laurentiu Mihalcea Reviewed-by: Iuliana Prodan Signed-off-by: Shawn Guo commit 37c15b72815b84815cd9700a42833ea11b11542e Merge: 79034ca229843f 0d16b70cdbfcdf Author: Martin K. Petersen Date: Mon Apr 21 21:52:45 2025 -0400 Merge patch series "scsi: qedi deadcoding" linux@treblig.org says: Hi, A couple of deadcode patches for the qdi driver. Build tested only. Dave Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250416002235.299347-1-linux@treblig.org Signed-off-by: Martin K. Petersen commit 79034ca229843ffe6390a9e46668758e4364b796 Merge: 26f8d978918baa 3a37ab0827fd36 Author: Martin K. Petersen Date: Mon Apr 21 21:52:15 2025 -0400 Merge patch series "scsi: qla2xxx deadcoding" linux@treblig.org says: Hi, This is a batch of deadcoding on the qla2xxx driver. Note the last patch removes two unused module parameters, so I guess if anyone has that in some configs somewhere that might surprise them. Other than that, it's all simple function deletion. Build tested only. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-1-linux@treblig.org Signed-off-by: Martin K. Petersen commit 26f8d978918baa41148917ec8d9b67596baef0fa Merge: 7a497d1649a9d2 1ca57644e2e935 Author: Martin K. Petersen Date: Mon Apr 21 21:51:51 2025 -0400 Merge patch series "hisi_sas: Misc patches and cleanups" Yihang Li says: This series contains some minor bugfix and general tidying: - Ignore the soft reset result by calling I_T_nexus after the SATA disk is soft reset - General minor tidying Link: https://lore.kernel.org/r/20250331123349.99591-1-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 0d16b70cdbfcdffe7d4bf6ccc6f23372d71bcfeb Author: Dr. David Alan Gilbert Date: Wed Apr 16 01:22:35 2025 +0100 scsi: qedi: Remove unused qedi_get_proto_itt() qedi_get_proto_itt() last use was removed in 2021 by commit ed1b86ba0fba ("scsi: qedi: Wake up if cmd_cleanup_req is set") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250416002235.299347-3-linux@treblig.org Signed-off-by: Martin K. Petersen commit 07e32237ed9d3f5815fb900dee9458b5f115a678 Merge: 59af38cada5af9 fd23ce3eb4a100 Author: Jakub Kicinski Date: Mon Apr 21 18:51:07 2025 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Martin KaFai Lau says: ==================== pull-request: bpf-next 2025-04-17 We've added 12 non-merge commits during the last 9 day(s) which contain a total of 18 files changed, 1748 insertions(+), 19 deletions(-). The main changes are: 1) bpf qdisc support, from Amery Hung. A qdisc can be implemented in bpf struct_ops programs and can be used the same as other existing qdiscs in the "tc qdisc" command. 2) Add xsk tail adjustment tests, from Tushar Vyavahare. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: selftests/bpf: Test attaching bpf qdisc to mq and non root selftests/bpf: Add a bpf fq qdisc to selftest selftests/bpf: Add a basic fifo qdisc test libbpf: Support creating and destroying qdisc bpf: net_sched: Disable attaching bpf qdisc to non root bpf: net_sched: Support updating bstats bpf: net_sched: Add a qdisc watchdog timer bpf: net_sched: Add basic bpf qdisc kfuncs bpf: net_sched: Support implementation of Qdisc_ops in bpf bpf: Prepare to reuse get_ctx_arg_idx selftests/xsk: Add tail adjustment tests and support check selftests/xsk: Add packet stream replacement function ==================== Link: https://patch.msgid.link/20250417184338.3152168-1-martin.lau@linux.dev Signed-off-by: Jakub Kicinski commit 918eb068215775d27d8b6e37d9f623eb296f76ee Author: Dr. David Alan Gilbert Date: Wed Apr 16 01:22:34 2025 +0100 scsi: qedi: Remove unused sysfs functions qedi_remove_sysfs_attr() and qedi_create_sysfs_attr() were added in 2016 by commit ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250416002235.299347-2-linux@treblig.org Signed-off-by: Martin K. Petersen commit 59af38cada5af9f06eea3b436f9d364907f8067c Merge: 50f257069a225d 76a69f360a712a Author: Jakub Kicinski Date: Mon Apr 21 18:50:37 2025 -0700 Merge branch 'bnxt_en-update-for-net-next' Michael Chan says: ==================== bnxt_en: Update for net-next The first patch changes the FW message timeout threshold for a warning message. The second patch adjusts the ethtool -w coredump length to suppress a warning. The last 2 patches are small cleanup patches for the bnxt_ulp RoCE auxbus code. v1: https://lore.kernel.org/netdev/20250415174818.1088646-1-michael.chan@broadcom.com/ ==================== Link: https://patch.msgid.link/20250417172448.1206107-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 76a69f360a712a30dfbc88d521454afb460012b1 Author: Kalesh AP Date: Thu Apr 17 10:24:48 2025 -0700 bnxt_en: Remove unused macros in bnxt_ulp.h BNXT_ROCE_ULP and BNXT_MAX_ULP are no longer used. Remove them to clean up the code. Reviewed-by: Shruti Parab Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250417172448.1206107-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 5bccacb4cc32cb835fe2fe100a210332c494e81d Author: Kalesh AP Date: Thu Apr 17 10:24:47 2025 -0700 bnxt_en: Remove unused field "ref_count" in struct bnxt_ulp The "ref_count" field in struct bnxt_ulp is unused after commit a43c26fa2e6c ("RDMA/bnxt_re: Remove the sriov config callback"). So we can just remove it now. Reviewed-by: Somnath Kotur Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250417172448.1206107-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit c21c8e1e4348315aa89f31dfa96c6f3ba3b9a5cf Author: Shruti Parab Date: Thu Apr 17 10:24:46 2025 -0700 bnxt_en: Report the ethtool coredump length after copying the coredump ethtool first calls .get_dump_flags() to get the dump length. For coredump, the driver calls the FW to get the coredump length (L1). The min. of L1 and the user specified length is then passed to .get_dump_data() (L2) to get the coredump. The actual coredump length retrieved by the FW (L3) during .get_dump_data() may be smaller than L1. This length discrepancy will trigger a WARN_ON() in ethtool_get_dump_data(). ethtool has already vzalloc'ed a buffer with size L1. Just report the coredump length as L2 even though the actual coredump length L3 may be smaller. The extra zero padding does not matter. This will prevent the warning that may alarm the user. For correctness, only do the final length update if there is no error. Reviewed-by: Andy Gospodarek Reviewed-by: Damodharam Ammepalli Signed-off-by: Shruti Parab Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250417172448.1206107-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 0fcad44a86bdc2b5f202d91ba1eeeee6fceb7b25 Author: Michael Chan Date: Thu Apr 17 10:24:45 2025 -0700 bnxt_en: Change FW message timeout warning The firmware advertises a "hwrm_cmd_max_timeout" value to the driver for NVRAM and coredump related functions that can take tens of seconds to complete. The driver polls for the operation to complete under mutex and may trigger hung task watchdog warning if the wait is too long. To warn the user about this, the driver currently prints a warning if this advertised value exceeds 40 seconds: Device requests max timeout of %d seconds, may trigger hung task watchdog Initially, we chose 40 seconds, well below the kernel's default CONFIG_DEFAULT_HUNG_TASK_TIMEOUT (120 seconds) to avoid triggering the hung task watchdog. But 60 seconds is the timeout on most production FW and cannot be reduced further. Change the driver's warning threshold to 60 seconds to avoid triggering this warning on all production devices. We also print the warning if the value exceeds CONFIG_DEFAULT_HUNG_TASK_TIMEOUT which may be set to architecture specific defaults as low as 10 seconds. Reviewed-by: Kalesh AP Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Link: https://patch.msgid.link/20250417172448.1206107-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 3a37ab0827fd36a670c5db8a13b3703e4b30c7e1 Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:28:03 2025 +0100 scsi: qla2xxx: Remove unused module parameters ql2xetsenable last use was removed in 2020 by commit 37efd51f75f3 ("scsi: qla2xxx: Use FC generic update firmware options routine for ISP27xx") ql2xiidmaenable last use was removed in 2017 by commit 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-9-linux@treblig.org Signed-off-by: Martin K. Petersen commit 45838d3db7500b1ff8393a195ee6efec56b8d2b8 Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:28:02 2025 +0100 scsi: qla2xxx: Remove unused qla2x00_gpsc() qla2x00_gpsc() was added in 2017 as part of commit 726b85487067 ("qla2xxx: Add framework for async fabric discovery") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-8-linux@treblig.org Signed-off-by: Martin K. Petersen commit 33f44a50ca61f03db1d251ddd301b0c11058e59b Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:28:01 2025 +0100 scsi: qla2xxx: Remove unused ql_log_qp ql_log_qp() was added in 2017 as part of commit 22d84726e3b8 ("scsi: qla2xxx: Add debug logging routine for qpair") but has remained unused. Remove it. (That patch also added ql_dbg_qp but that is still used so is left in). Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-7-linux@treblig.org Signed-off-by: Martin K. Petersen commit 2a2f3168c510c7031bbe720452365c00626bacdf Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:28:00 2025 +0100 scsi: qla2xxx: Remove unused qla82xx_wait_for_state_change() qla82xx_wait_for_state_change() was added in 2010 as part of commit 579d12b58abb ("[SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-6-linux@treblig.org Signed-off-by: Martin K. Petersen commit 89981b47f6fc942e6ffd73c8811fe73812519fbe Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:27:59 2025 +0100 scsi: qla2xxx: Remove unused qla82xx_pci_region_offset() qla82xx_pci_region_offset() has been unused since the last use was removed by 2010's commit 3711333dfbee ("[SCSI] qla2xxx: Updates for ISP82xx.") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-5-linux@treblig.org Signed-off-by: Martin K. Petersen commit 91453ebecccce91e6e7604b9c8828bdab499007b Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:27:58 2025 +0100 scsi: qla2xxx: Remove unused qlt_83xx_iospace_config() qlt_83xx_iospace_config() has been unused since the last use was removed by 2017's commit f54f2cb540b5 ("scsi: qla2xxx: Cleaned up queue configuration code.") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-4-linux@treblig.org Signed-off-by: Martin K. Petersen commit cbb2a2ef58019409e5fc775ccd024ea21d58f17b Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:27:57 2025 +0100 scsi: qla2xxx: Remove unused qlt_fc_port_deleted() qlt_fc_port_deleted() has been unused since the last use was removed by 2017's commit 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-3-linux@treblig.org Signed-off-by: Martin K. Petersen commit ae7a08bee82b808081536be373f7d922180518a2 Author: Dr. David Alan Gilbert Date: Tue Apr 15 01:27:56 2025 +0100 scsi: qla2xxx: Remove unused qlt_free_qfull_cmds() qlt_free_qfull_cmds() was added in 2014 as part of commit 33e799775593 ("qla2xxx: Add support for QFull throttling and Term Exchange retry") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250415002803.135909-2-linux@treblig.org Signed-off-by: Martin K. Petersen commit 50f257069a225dc343ede72dcb4bbec7cc1ff969 Merge: 544456b3b481db 1dbefd578d8bd3 Author: Jakub Kicinski Date: Mon Apr 21 18:47:59 2025 -0700 Merge branch 'net-stmmac-socfpga-fix-init-ordering-and-cleanups' Russell King says: ==================== net: stmmac: socfpga: fix init ordering and cleanups This series fixes the init ordering of the socfpga probe function. The standard rule is to do all setup before publishing any device, and socfpga violates that. I can see no reason for this, but these patches have not been tested on hardware. Address this by moving the initialisation of dwmac->stmmac_rst along with all the other dwmac initialisers - there's no reason for this to be late as plat_dat->stmmac_rst has already been populated. Next, replace the call to ops->set_phy_mode() with an init function socfpga_dwmac_init() which will then be linked in to plat_dat->init. Then, add this to plat_dat->init, and switch to stmmac_pltfr_pm_ops from the private ops. The runtime suspend/resume socfpga implementations are identical to the platform ones, but misses the noirq versions which this will add. Before we swap the order of socfpga_dwmac_init() and stmmac_dvr_probe(), we need to change the way the interface is obtained, as that uses driver data and the struct net_device which haven't been initialised. Save a pointer to plat_dat in the socfpga private data, and use that to get the interface mode. We can then swap the order of the init and probe functions. Finally, convert to devm_stmmac_pltfr_probe() by moving the call to ops->set_phy_mode() into an init function appropriately populating plat_dat->init. ==================== Link: https://patch.msgid.link/aAE2tKlImhwKySq_@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 1dbefd578d8bd3bb627f68cb162c8ab7884341fa Author: Russell King (Oracle) Date: Thu Apr 17 18:13:32 2025 +0100 net: stmmac: socfpga: convert to devm_stmmac_pltfr_probe() Convert socfpga to use devm_stmmac_pltfr_probe() to further simplify the probe function, wrapping the call to the set_phy_mode() method into socfpga_dwmac_init() which can be called from the plat_dat->init() method. Also call this from socfpga_dwmac_resume() thereby simplifying that function. Using the devm variant also means we can remove the call to stmmac_pltfr_remove(). Unfortunately, we can't also convert to stmmac_pltfr_pm_ops as there is extra work done in socfpga_dwmac_resume(). Signed-off-by: Russell King (Oracle) Tested-by: Maxime Chevallier Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/E1u5Sns-001IJw-OY@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 91255347bba9637dc2717897127a6259cd4fbeac Author: Russell King (Oracle) Date: Thu Apr 17 18:13:27 2025 +0100 net: stmmac: socfpga: call set_phy_mode() before registration Initialisation/setup after registration is a bug. This is the second of two patches fixing this in socfpga. The set_phy_mode() functions do various hardware setup that would interfere with a netdev that has been published, and thus available to be opened by the kernel/userspace. However, set_phy_mode() relies upon the netdev having been initialised to get at the plat_stmmacenet_data structure, which is probably why it was placed after stmmac_drv_probe(). We can remove that need by storing a pointer to struct plat_stmmacenet_data in struct socfpga_dwmac. Move the call to set_phy_mode() before calling stmmac_dvr_probe(). This also simplifies the probe function as there is no need to unregister the netdev if set_phy_mode() fails. Signed-off-by: Russell King (Oracle) Tested-by: Maxime Chevallier Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/E1u5Snn-001IJq-L0@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 6bf70d999aa90bc06656917baf042aead9cd4cda Author: Russell King (Oracle) Date: Thu Apr 17 18:13:22 2025 +0100 net: stmmac: socfpga: convert to stmmac_pltfr_pm_ops Convert socfpga to use the generic stmmac_pltfr_pm_ops, which can be achieved by adding an appropriate plat_dat->init function to do the setup. Signed-off-by: Russell King (Oracle) Tested-by: Maxime Chevallier Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/E1u5Sni-001IJk-Gi@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 0dbd4a6f57c29a6df89dfa02d2bc5c54e2ae0eaf Author: Russell King (Oracle) Date: Thu Apr 17 18:13:17 2025 +0100 net: stmmac: socfpga: provide init function Both the resume and probe path needs to configure the phy mode, so provide a common function to do this which can later be hooked into plat_dat->init. Signed-off-by: Russell King (Oracle) Tested-by: Maxime Chevallier Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/E1u5Snd-001IJe-Cx@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 9276bfc2df92c6c45a963dea34d8c83656987ea7 Author: Russell King (Oracle) Date: Thu Apr 17 18:13:12 2025 +0100 net: stmmac: socfpga: init dwmac->stmmac_rst before registration Initialisation/setup after registration is a bug. This is the first of two patches fixing this in socfpga. dwmac->stmmac_rst is initialised from the stmmac plat_dat's stmmac_rst member, which is itself initialised by devm_stmmac_probe_config_dt(). Therefore, this can be initialised before we call stmmac_dvr_probe(). Move it there. dwmac->stmmac_rst is used by the set_phy_mode() method. Signed-off-by: Russell King (Oracle) Tested-by: Maxime Chevallier Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/E1u5SnY-001IJY-90@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 0005617c5e2fc04b2dc94cf849e5556b952571ca Author: Richard Zhu Date: Wed Feb 26 10:42:55 2025 +0800 arm64: dts: imx8mq: Add linux,pci-domain into pcie-ep node Add linux,pci-domain into pcie-ep node of i.MX8MQ. Signed-off-by: Richard Zhu Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 1ca57644e2e935b39a260ead5e0ec5ac0319148e Author: Yihang Li Date: Mon Apr 14 16:08:45 2025 +0800 scsi: hisi_sas: Wait until error handling is complete SATA devices are lost when FLR is performed while the controller and disks are in suspended state. This is because the libata layer is called to initialize the SATA device during controller resume. If FLR is executed at this time, the IDENTIFY command fails. As a result, the revalidate fails, and the SATA device is disabled by the libata layer. Wait until error handling completes. Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20250414080845.1220997-5-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit e4d953ca557e02edd3aed7390043e1b8ad1c9723 Author: Yihang Li Date: Mon Apr 14 16:08:44 2025 +0800 scsi: hisi_sas: Call I_T_nexus after soft reset for SATA disk In commit 21c7e972475e ("scsi: hisi_sas: Disable SATA disk phy for severe I_T nexus reset failure"), if the softreset fails upon certain conditions, the PHY connected to the disk is disabled directly. Manual recovery is required, which is inconvenient for users in actual use. In addition, SATA disks do not support simultaneous connection of multiple hosts. Therefore, when multiple controllers are connected to a SATA disk at the same time, the controller which is connected later failed to issue an ATA softreset to the SATA disk. As a result, the PHY associated with the disk is disabled and cannot be automatically recovered. Now that, we will not focus on the execution result of softreset. No matter whether the execution is successful or not, we will directly carry out I_T_nexus_reset. Fixes: 21c7e972475e ("scsi: hisi_sas: Disable SATA disk phy for severe I_T nexus reset failure") Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20250414080845.1220997-4-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 92c8fe15241587363983d45b63210cc214535146 Author: Yihang Li Date: Mon Apr 14 16:08:43 2025 +0800 scsi: hisi_sas: Coding style cleanup Remove superfluous blank lines and symbols. Add spaces around operators. Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20250414080845.1220997-3-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 4ca7fe99fc8485fcd04b367f37dc7a48f1355419 Author: Yihang Li Date: Mon Apr 14 16:08:42 2025 +0800 scsi: hisi_sas: Use macro instead of magic number The hisi_sas driver has a large number of magic numbers which makes for unfriendly code reading. Use macro definitions instead. Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20250414080845.1220997-2-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 544456b3b481dbd1f161c30c72564f4640699935 Merge: 199561a48f026b a45193018001b6 Author: Jakub Kicinski Date: Mon Apr 21 18:38:03 2025 -0700 Merge branch 'net-adopting-nlmsg_payload-final-series' Breno Leitao says: ==================== net: Adopting nlmsg_payload() (final series) This patchset marks the final step in converting users to the new nlmsg_payload() function. It addresses the last two files that were not converted in previous series, specifically updating the following functions: neigh_valid_dump_req rtnl_valid_dump_ifinfo_req rtnl_valid_getlink_req valid_fdb_get_strict valid_bridge_getlink_req rtnl_valid_stats_req rtnl_mdb_valid_dump_req I would like to extend a big thank you to Kuniyuki Iwashima for his invaluable help and review of this effort. ==================== Link: https://patch.msgid.link/20250417-nlmsg_v3-v1-0-9b09d9d7e61d@debian.org Signed-off-by: Jakub Kicinski commit a45193018001b6fbbaaf4ae2c5c37db426d42d94 Author: Breno Leitao Date: Thu Apr 17 06:03:08 2025 -0700 net: Use nlmsg_payload in rtnetlink file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250417-nlmsg_v3-v1-2-9b09d9d7e61d@debian.org Signed-off-by: Jakub Kicinski commit 9929ba194299eadc80849db4cb992f4bc310401b Author: Breno Leitao Date: Thu Apr 17 06:03:07 2025 -0700 net: Use nlmsg_payload in neighbour file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250417-nlmsg_v3-v1-1-9b09d9d7e61d@debian.org Signed-off-by: Jakub Kicinski commit 199561a48f026bf674424fd9019c0690a3570377 Author: Simon Horman Date: Thu Apr 17 11:28:23 2025 +0100 s390: ism: Pass string literal as format argument of dev_set_name() GCC 14.2.0 reports that passing a non-string literal as the format argument of dev_set_name() is potentially insecure. drivers/s390/net/ism_drv.c: In function 'ism_probe': drivers/s390/net/ism_drv.c:615:2: warning: format not a string literal and no format arguments [-Wformat-security] 615 | dev_set_name(&ism->dev, dev_name(&pdev->dev)); | ^~~~~~~~~~~~ It seems to me that as pdev is a PCIE device then the dev_name call above should always return the device's BDF, e.g. 00:12.0. That this should not contain format escape sequences. And thus the current usage is safe. But, it seems better to be safe than sorry. And, as a bonus, compiler output becomes less verbose by addressing this issue. Compile tested only. No functional change intended. Signed-off-by: Simon Horman Link: https://patch.msgid.link/20250417-ism-str-fmt-v1-1-9818b029874d@kernel.org Signed-off-by: Jakub Kicinski commit 7a497d1649a9d2af1b9d184eeef4c7e63efb022c Author: Chelsy Ratnawat Date: Sat Apr 19 15:59:06 2025 -0700 scsi: mpi3mr: Fix typo and grammar Corrected grammar, spelling, and formatting in the kernel-doc comment for mpi3mr_os_handle_events() to follow kernel-doc style and improve clarity. Signed-off-by: Chelsy Ratnawat Link: https://lore.kernel.org/r/20250419225906.31437-1-chelsyratnawat2001@gmail.com Signed-off-by: Martin K. Petersen commit 7ed7d1ed852d8f4c4dee7a4d4f7807ad59c7915d Author: Andrej Picej Date: Mon Dec 16 09:54:10 2024 +0100 arm64: dts: imx8mm-phyboard-polis-peb-av-10: Set lvds-vod-swing Set custom differential output voltage for LVDS, to fulfill requirements of the connected display. LVDS differential voltage for data-lanes and clock output has to be between 200 mV and 600 mV. Driver sets 200 Ohm near-end termination by default. Signed-off-by: Andrej Picej Signed-off-by: Shawn Guo commit c8c70ff3a766a077e5b3a717e91722638d50e2a6 Author: WangYuli Date: Mon Apr 14 12:26:27 2025 +0800 scsi: scsi_transport_fc: Rename del_timer() in comment Commit 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()") switched del_timer() to timer_delete(), but did not modify the comment for fc_remote_port_rolechg(). Fix it. Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: SCSI SUBSYSTEM Cc: linux-kernel@vger.kernel.org Signed-off-by: WangYuli Link: https://lore.kernel.org/r/084BD6AB1C4759DA+20250414042629.63019-3-wangyuli@uniontech.com Signed-off-by: Martin K. Petersen commit 1e36473215297708dbe144c65b9f242c6e604520 Author: Colin Ian King Date: Fri Apr 18 14:57:03 2025 +0100 net/mlx5: Fix spelling mistakes in mlx5_core_dbg message and comments There is a spelling mistake in a mlx5_core_dbg and two spelling mistakes in comment blocks. Fix them. Signed-off-by: Colin Ian King Acked-by: Mark Bloch Link: https://patch.msgid.link/20250418135703.542722-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 61fde5110ee9f1f6fbf6c75c3426ee5d144628b4 Author: Colin Ian King Date: Fri Apr 18 12:24:47 2025 +0100 net: axienet: Fix spelling mistake "archecture" -> "architecture" There is a spelling mistake in a dev_error message. Fix it. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250418112447.533746-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 12b196568a3a7a32d18fc82fdef82832e9b94d0f Author: Jakub Kicinski Date: Fri Apr 18 16:49:42 2025 -0700 tools: ynl: add missing header deps Various new families and my recent work on rtnetlink missed adding dependencies on C headers. If the system headers are up to date or don't include a given header at all this doesn't make a difference. But if the system headers are in place but stale - compilation will break. Reported-by: Kory Maincent Fixes: 29d34a4d785b ("tools: ynl: generate code for rt-addr and add a sample") Link: https://lore.kernel.org/20250418190431.69c10431@kmaincent-XPS-13-7390 Acked-by: Stanislav Fomichev Tested-by: Kory Maincent Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250418234942.2344036-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 39051adb070432b283e6c11b2b24937281b9f97f Author: Benno Lossin Date: Mon Apr 14 20:00:31 2025 +0000 rust: pin-init: examples: use `allow` instead of `expect` Rust 1.78 doesn't emit a `dead_code` error on the annotated element, resulting in the `unfulfilled_lint_expectations` error. Rust 1.85 does emit the `dead_code` error, so we still need an `allow`. Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/0e28cbb895bd29f896a59b40e8ed506ea7bef13c Link: https://lore.kernel.org/all/20250414195928.129040-4-benno.lossin@proton.me Signed-off-by: Benno Lossin commit 5c4167b4056c9db951788541e23585dd4a1fa426 Author: Benno Lossin Date: Mon Apr 14 20:00:20 2025 +0000 rust: pin-init: examples: conditionally enable `feature(lint_reasons)` `lint_reasons` is unstable in Rust 1.80 and earlier, enable it conditionally in the examples to allow compiling them with older compilers. Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/ec494fe686b0a97d5b59b5be5a42d3858038ea6a Link: https://lore.kernel.org/all/20250414195928.129040-3-benno.lossin@proton.me Signed-off-by: Benno Lossin commit 31005209b88c83adc4b4ef63fbc02867cddb2689 Author: Benno Lossin Date: Mon Apr 14 20:00:03 2025 +0000 rust: pin-init: internal: skip rustfmt formatting of kernel-only module The `quote` module only is available in the kernel and thus running `cargo fmt` or `rustfmt internal/src/lib.rs` in the user-space repository [1] results in: error: couldn't read `~/pin-init/internal/src/../../../macros/quote.rs`: No such file or directory (os error 2) --> ~/pin-init/internal/src/lib.rs:25:1 | 25 | mod quote; | ^^^^^^^^^^ Error writing files: failed to resolve mod `quote`: ~/pin-init/internal/src/../../../macros/quote.rs does not exist Thus mark it with `rustfmt::skip` when compiling without kernel support. Link: https://github.com/Rust-for-Linux/pin-init [1] Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/a6caf1945e51da38761aab4dffa56e63e2baa218 Link: https://lore.kernel.org/all/20250414195928.129040-2-benno.lossin@proton.me Reviewed-by: Christian Schrefl Signed-off-by: Benno Lossin commit 2cce50f5ab83d01cc3aafa3fb55cba97584aee51 Author: Benno Lossin Date: Wed Apr 16 22:50:15 2025 +0000 rust: pin-init: synchronize README.md The upstream version of the `README.md` differs by this change, so synchronize it. The reason that this wasn't in the original sync patch is that this was a late change that I didn't port back to the kernel repo, since it was generated by `cargo rdme`. Link: https://lore.kernel.org/all/20250416225002.25253-1-benno.lossin@proton.me Signed-off-by: Benno Lossin commit afc9506c2a8169e871cfafd9b94e0e631ae8f9cb Author: Dhananjay Ugwekar Date: Tue Apr 15 08:23:09 2025 +0000 cpufreq/amd-pstate: Move max_perf limiting in amd_pstate_update Move up the max_perf limiting, so that we clamp the des_perf with the updated max_perf. Signed-off-by: Dhananjay Ugwekar Link: https://lore.kernel.org/r/20250415082308.3341-1-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello commit 7efbc8f2f9b3eed3ffc6560abf8305859f2153d3 Author: JP Kobryn Date: Mon Apr 21 09:51:17 2025 -0700 cgroup: fix pointer check in css_rstat_init() In css_rstat_init() allocations are done for the cgroup's pointers rstat_cpu and rstat_base_cpu. Make sure the allocation checks are consistent with what they are allocating. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 6bd18dabf1c94653b9a96402544bb980a7ca7ce1 Author: Junxian Huang Date: Mon Apr 21 21:27:50 2025 +0800 RDMA/hns: Add trace for CMDQ dumping Add trace for CMDQ dumping. Output example: $ cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 2/2 #P:128 _-----=> irqs-off/BH-disabled / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / _-=> migrate-disable |||| / delay TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | kworker/u512:1-14003 [089] b..1. 50737.238304: hns_cmdq_req: 0000:bd:00.0 cmdq opcode:0x8500, flag:0x1, retval:0x0, data:{0x2,0x0,0x0,0xffff0000,0x32323232,0x0} kworker/u512:1-14003 [089] b..1. 50737.238316: hns_cmdq_resp: 0000:bd:00.0 cmdq opcode:0x8500, flag:0x2, retval:0x0, data:{0x2,0x0,0x0,0xffff0000,0x32323232,0x0} Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-7-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 2b11d33de23262cb20d1dcb24b586dbb8f54d463 Author: Junxian Huang Date: Mon Apr 21 21:27:49 2025 +0800 RDMA/hns: Include hnae3.h in hns_roce_hw_v2.h hns_roce_hw_v2.h has a direct dependency on hnae3.h due to the inline function hns_roce_write64(), but it doesn't include this header currently. This leads to that files including hns_roce_hw_v2.h must also include hnae3.h to avoid compilation errors, even if they themselves don't really rely on hnae3.h. This doesn't make sense, hns_roce_hw_v2.h should include hnae3.h directly. Fixes: d3743fa94ccd ("RDMA/hns: Fix the chip hanging caused by sending doorbell during reset") Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-6-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 48ffc152576d633d05eda4251aaef5dd53970cb8 Author: Junxian Huang Date: Mon Apr 21 21:27:48 2025 +0800 RDMA/hns: Add trace for MR/MTR attribute dumping Add trace for MR/MTR attribute dumping. Output example: $ cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 2/2 #P:128 _-----=> irqs-off/BH-disabled / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / _-=> migrate-disable |||| / delay TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | ib_send_bw-14751 [111] ..... 8763.823038: hns_buf_attr: rg cnt:1, pg_sft:0xc, mtt_only:no, rg 0 (sz:131072, hop:2), rg 1 (sz:0, hop:0), rg 2 (sz:0, hop:0) ib_send_bw-14751 [111] ..... 8763.823118: hns_mr: iova:0xffffb2968000, size:131072, key:512, pd:1, pbl_hop:1, npages:4, type:0, status:0 Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-5-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 1e63e2f96613bc6471e7497e47d1767e3846608e Author: Junxian Huang Date: Mon Apr 21 21:27:47 2025 +0800 RDMA/hns: Add trace for AEQE dumping Add trace for AEQE dumping. Output example: $ cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 2/2 #P:128 _-----=> irqs-off/BH-disabled / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / _-=> migrate-disable |||| / delay TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | -0 [120] d.h1. 7995.835587: hns_ae_info: event 19 aeqe: {0x80006013,0x0,0x0,0x10d2c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0} Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-4-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 6c98c86708063af509b82f35bfac9577b61b4a94 Author: Junxian Huang Date: Mon Apr 21 21:27:46 2025 +0800 RDMA/hns: Add trace for WQE dumping Add trace for WQE dumping, including SQ, RQ and SRQ. Output example: $ cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 2/2 #P:128 _-----=> irqs-off/BH-disabled / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / _-=> migrate-disable |||| / delay TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | roce_test_main-22730 [074] d..1. 16133.898282: hns_sq_wqe: SQ 0xc wqe (0x0/0xffff0820a6076060): {0x180,0x639c,0x0,0x1000000,0x0,0x0,0x0,0x0, 0x639c,0x300,0xf7e38000,0x0,0x0,0x0,0x0,0x0} Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-3-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 02007e3ddc0790ed5a6a504892d7aa1a917076bc Author: Junxian Huang Date: Mon Apr 21 21:27:45 2025 +0800 RDMA/hns: Add trace for flush CQE Add trace to print the producer index of QP when triggering flush CQE. Output example: $ cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 2/2 #P:128 _-----=> irqs-off/BH-disabled / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / _-=> migrate-disable |||| / delay TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | ib_send_bw-11474 [075] d..1. 2393.434738: hns_sq_flush_cqe: SQ 0x2 flush head 0xb5c7. ib_send_bw-11474 [075] d..1. 2393.434739: hns_rq_flush_cqe: RQ 0x2 flush head 0. Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250421132750.1363348-2-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 9d9bec3d90e3abf7340210172d9ce5dcdef93c14 Author: Mauro Carvalho Chehab Date: Tue Apr 15 11:12:51 2025 +0800 docs: sphinx: kerneldoc: Use python class if available Better integrate with the new kernel-doc tool by calling the Python classes directly if KERNELDOC=scripts/kernel-doc.py. This way, warnings won't be duplicated anymore, as files will be parsed only once. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/1556a6c005d8e0fafa951f74725e984e1c7459bf.1744685912.git.mchehab+huawei@kernel.org commit 47c2d4168b2d197877356c58300ae98765a59b2e Author: Mauro Carvalho Chehab Date: Tue Apr 15 11:12:50 2025 +0800 scripts:kdoc_files.py: use glob for export_file seek As filenames are expanded using kernel-doc glob, just in case, use it also when checking for exported symbols. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/21657afdd4f8effe0752a5ec258d74b8a4101f55.1744685912.git.mchehab+huawei@kernel.org commit f9cdbc5781f2c2bf374d21d91b139ae5a2f62093 Author: Mauro Carvalho Chehab Date: Tue Apr 15 11:12:49 2025 +0800 scripts/lib/kdoc/kdoc_parser.py: move states to a separate class States are really enums. on Python, enums are actually classes, as can be seen at: https://docs.python.org/3/library/enum.html Yet, I can't see any advantage of derivating the class from enum class here. So, just place the states on a separate class. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/00cb4e0b8a1545bf7c4401b58213841db5cba2e2.1744685912.git.mchehab+huawei@kernel.org commit 439111ee0cefe434788802237673c9a37f6b6d04 Author: Mauro Carvalho Chehab Date: Tue Apr 15 11:12:48 2025 +0800 scripts/lib/kdoc/kdoc_files.py: don't try to join None If out_msg() returns None, it means that an unknown declaration was found. Avoid letting the script crash on such case. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/4334d16f14cfd93e611b290fb56c35d236cadcb7.1744685912.git.mchehab+huawei@kernel.org commit f0ba72e65516d1d86f40c79a49c4ba01c9555592 Author: Purva Yeshi Date: Wed Apr 16 09:40:50 2025 +0700 Documentation: trace: Refactor toctree Refactor table of contents of kernel tracing subsystem docs to improve clarity, structure, and organization: - Reformat sections and add appropriate headings - Improve section grouping and refine descriptions for each group - Add docs intro paragraph Signed-off-by: Purva Yeshi Link: https://lore.kernel.org/r/20250318113230.24950-2-purvayeshi550@gmail.com [Bagas: massage commit message and address reviews] Co-developed-by: Bagas Sanjaya Signed-off-by: Bagas Sanjaya Acked-by: Steven Rostedt (Google) Signed-off-by: Jonathan Corbet commit 33583537dd5f48d76391ecebe0648151309d2687 Author: Purva Yeshi Date: Wed Apr 16 09:40:49 2025 +0700 Documentation: trace: Reduce toctree depth Reduce toctree depth from 2 to 1 so that only docs titles are listed in the toctree. Signed-off-by: Purva Yeshi Link: https://lore.kernel.org/r/20250318113230.24950-1-purvayeshi550@gmail.com [Bagas: massage commit message] Signed-off-by: Bagas Sanjaya Acked-by: Steven Rostedt (Google) Signed-off-by: Jonathan Corbet commit 296e8d289bdd7eb0d832683ebd3e847fbb4c1b12 Author: Andres Urian Florez Date: Fri Apr 18 12:14:24 2025 -0500 spi: offload: remove unnecessary check on trigger->ops Considering that trigger->ops = NULL happens only when the trigger is being removed from the list, and at that point the operation is protected with the spi_offload_triggers_lock, it is possible to remove the !trigger->ops check because it will never be true in spi_offload_trigger_get() Signed-off-by: Andres Urian Florez Reviewed-by: David Lechner Link: https://patch.msgid.link/20250418171426.9868-1-andres.emb.sys@gmail.com Signed-off-by: Mark Brown commit fcab1637bb115b3b7bbc600a6d019b785653f2d5 Author: Andres Urian Florez Date: Fri Apr 18 17:47:49 2025 -0500 spi: offload: check for match callback when a trigger is being registered Make match a required callback when a new trigger is being registered, this allows that other functions like spi_offload_trigger_get() could safely invoke the callback when it is required In v2: - improve readability of the condition Signed-off-by: Andres Urian Florez Reviewed-by: David Lechner Link: https://patch.msgid.link/20250418224750.46219-1-andres.emb.sys@gmail.com Signed-off-by: Mark Brown commit 9ef24511d29f0300fc7e9d4a5ea38d78e9eef73e Author: André Apitzsch Date: Fri Apr 18 22:22:04 2025 +0200 ASoC: wm8998: Add Kconfig prompt Add tristate prompt to allow codec selection. Signed-off-by: André Apitzsch Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20250418-wm8998-v1-1-21c4bead9cd8@apitzsch.eu Signed-off-by: Mark Brown commit f506d45666828d3e94bb08e3d98dd9368c509345 Author: Dr. David Alan Gilbert Date: Mon Apr 21 00:27:33 2025 +0100 ASoC: codecs: Remove unused rt566[58]_sel_asrc_clk_src rt5665_sel_asrc_clk_src() was added in 2016 by commit 33ada14a26c8 ("ASoC: add rt5665 codec driver") rt5668_sel_asrc_clk_src() was added in 2018 by commit d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver") Neither have been used. Remove them. Signed-off-by: "Dr. David Alan Gilbert" Link: https://patch.msgid.link/20250420232733.182802-1-linux@treblig.org Signed-off-by: Mark Brown commit 6070ef6e4202dae61027c146d797319b9e5c07b3 Author: Nathan Chancellor Date: Fri Apr 18 16:36:01 2025 -0400 ASoC: cs48l32: Use modern PM_OPS When building for a platform that does not support CONFIG_PM, such as s390, cs48l32_runtime_{suspend,resume}() are unused because SET_RUNTIME_PM_OPS does not reference its argument when CONFIG_PM is not set: sound/soc/codecs/cs48l32.c:3822:12: error: 'cs48l32_runtime_suspend' defined but not used [-Werror=unused-function] 3822 | static int cs48l32_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/cs48l32.c:3779:12: error: 'cs48l32_runtime_resume' defined but not used [-Werror=unused-function] 3779 | static int cs48l32_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Use RUNTIME_PM_OPS and pm_ptr() to ensure these functions are seen as used by the compiler but be dropped in the final object file when CONFIG_PM is not set, matching the current behavior while clearing up the warnings. Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Nathan Chancellor Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250418-cs48l32-modern-pm_ops-v1-1-640559407619@kernel.org Signed-off-by: Mark Brown commit 0cc617a54dfe6b44624c9a03e2e11a24eb9bc720 Author: Andreas Gruenbacher Date: Fri Apr 18 01:09:32 2025 +0200 gfs2: Move GIF_ALLOC_FAILED check out of gfs2_ea_dealloc Don't check for the GIF_ALLOC_FAILED flag in gfs2_ea_dealloc() and pass that information explicitly instead. This allows for a cleaner follow-up patch. Signed-off-by: Andreas Gruenbacher commit bcd18105fb34e27c097f222733dba9a3e79f191c Author: Andreas Gruenbacher Date: Thu Apr 17 22:41:40 2025 +0200 gfs2: Move gfs2_dinode_dealloc Move gfs2_dinode_dealloc() and its helper gfs2_final_release_pages() from super.c to inode.c. Signed-off-by: Andreas Gruenbacher commit 84a79ee68f8404c6b7e93f1784ce218c98a9f11b Author: Andreas Gruenbacher Date: Tue Apr 15 08:49:55 2025 +0200 gfs2: Don't reread inodes unnecessarily In gfs2_create_inode(), we initialize the inode from scratch and then we write the result to disk. Clear the GLF_INSTANTIATE_NEEDED glock flag to indicate that the inode is up to date. Otherwise, the next time the inode glock is acquired, gfs2_instantiate() would reread the inode from disk, which isn't necessary. Signed-off-by: Andreas Gruenbacher commit af4044fd0b77e915736527dd83011e46e6415f01 Author: Andreas Gruenbacher Date: Fri Apr 18 16:40:58 2025 +0200 gfs2: gfs2_create_inode error handling fix When gfs2_create_inode() finds a directory, make sure to return -EISDIR. Fixes: 571a4b57975a ("GFS2: bugger off early if O_CREAT open finds a directory") Signed-off-by: Andreas Gruenbacher commit 4023c3cbc38f891c0d54d45a0ba0a1b4c289214a Author: Chen Ni Date: Thu Apr 17 16:38:39 2025 +0800 gfs2: Remove unnecessary NULL check before free_percpu() free_percpu() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Signed-off-by: Andreas Gruenbacher commit 27d2f101e7890b1f0d8d91f1bf041921f81d5a31 Author: Edward Adam Davis Date: Sat Apr 12 13:07:18 2025 +0800 gfs2: check sb_min_blocksize return value Check the return value of sb_min_blocksize(): it will be 0 when the requested block size is invalid. In addition, check the return value of sb_set_blocksize() as well. Reported-by: syzbot+b0018b7468b2af33b4d5@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: Andreas Gruenbacher commit ae9f3bd8259a0a8f67be2420e66bb05fbb95af48 Author: Andreas Gruenbacher Date: Sun Apr 6 00:31:37 2025 +0200 gfs2: replace sd_aspace with sd_inode Currently, sdp->sd_aspace and the per-inode metadata address spaces use sb->s_bdev->bd_mapping->host as their ->host; folios in those address spaces will thus appear to be on bdev rather than on gfs2 filesystems. This is a problem because gfs2 doesn't support cgroup writeback (SB_I_CGROUPWB), but bdev does. Fix that by using a "dummy" gfs2 inode as ->host in those address spaces. When coming from a folio, folio->mapping->host->i_sb will then be a gfs2 super block and the SB_I_CGROUPWB flag will not be set in sb->s_iflags. Based on a previous version from Bob Peterson from several years ago. Thanks to Tetsuo Handa, Jan Kara, and Rafael Aquini for helping figure this out. Fixes: aaa2cacf8184 ("writeback: add lockdep annotation to inode_to_wb()") Signed-off-by: Andreas Gruenbacher commit ff22e5da42c0adfacfa85f315b90af3706d955bd Author: Alexander Aring Date: Mon Apr 7 14:45:38 2025 -0400 gfs2: only apply DLM_LKF_VALBLK if sb_lvbptr is not NULL Currently, gfs2 always sets the DLM_LKF_VALBLK flag to enable lvb handling even when sb_lvbptr is NULL. This currently causes no problems because DLM ignores the DLM_LKF_VALBLK flag when sb_lvbptr is NULL, but it does violate the DLM API. Fix that by only setting DLM_LKF_VALBLK when sb_lvbptr is not NULL. Signed-off-by: Alexander Aring Signed-off-by: Andreas Gruenbacher commit ac5ee087d31ed93b6e45d2968a66828c6f621d8c Author: Alexander Aring Date: Mon Mar 31 19:03:24 2025 -0400 gfs2: move msleep to sleepable context This patch moves the msleep_interruptible() out of the non-sleepable context by moving the ls->ls_recover_spin spinlock around so msleep_interruptible() will be called in a sleepable context. Cc: stable@vger.kernel.org Fixes: 4a7727725dc7 ("GFS2: Fix recovery issues for spectators") Suggested-by: Andreas Gruenbacher Signed-off-by: Alexander Aring Signed-off-by: Andreas Gruenbacher commit 372c8d72c3680fdea3fbb2d6b089f76b4a6d596a Author: Felix Kuehling Date: Wed Apr 16 00:19:13 2025 -0400 drm/amdgpu: Allow P2P access through XGMI If peer memory is accessible through XGMI, allow leaving it in VRAM rather than forcing its migration to GTT on DMABuf attachment. Signed-off-by: Felix Kuehling Tested-by: Hao (Claire) Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e15d09f510d0303b53e556a73fa4236744c19695 Author: Roman Li Date: Thu Apr 3 13:49:03 2025 -0400 drm/amd/display: enable phy-ssc reduction by default [Why] Reduction of phy-ssc is needed to support DP2 high pixel clock on dcn35x/36. There's a special flag to enable it in dmub hw params. [How] Set hbr3_phy_ssc to true for dcn35, dcn351 and dcn36. Reviewed-by: Charlene Liu Signed-off-by: Roman Li Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit cd74ce1f0cddffb3f36d0995d0f61e89f0010738 Author: Nicholas Susanto Date: Wed Apr 2 15:04:08 2025 -0400 drm/amd/display: Enable urgent latency adjustment on DCN35 [Why] Urgent latency adjustment was disabled on DCN35 due to issues with P0 enablement on some platforms. Without urgent latency, underflows occur when doing certain high timing configurations. After testing, we found that reenabling urgent latency didn't reintroduce p0 support on multiple platforms. [How] renable urgent latency on DCN35 and setting it to 3000 Mhz. This reverts commit 3412860cc4c0c484f53f91b371483e6e4440c3e5. Reviewed-by: Charlene Liu Signed-off-by: Nicholas Susanto Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 652968d996d70105423f82536e137a07e1d947c1 Author: Yihan Zhu Date: Tue Apr 1 10:28:36 2025 -0400 drm/amd/display: DCN42 RMCM and MCM 3DLUT support [WHY & HOW] Providing hardware programming for the RMCM and MCM IPs for 3DLUT in DCN42. Reviewed-by: Charlene Liu Signed-off-by: Yihan Zhu Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit c9646e5a7e01c3ede286ec5edd4fcb2e1e80261d Author: Yihan Zhu Date: Mon Mar 31 15:59:51 2025 -0400 drm/amd/display: DCN32 null data check [WHY & HOW] Avoid null curve data structure used in the cm block for the potential issue. Reviewed-by: Charlene Liu Signed-off-by: Yihan Zhu Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 2ba8619b9a378ad218ad6c2e2ccaee8f531e08de Author: Roman Li Date: Wed Mar 26 10:33:51 2025 -0400 drm/amd/display: Force full update in gpu reset [Why] While system undergoing gpu reset always do full update to sync the dc state before and after reset. [How] Return true in should_reset_plane() if gpu reset detected Reviewed-by: Aurabindo Pillai Reviewed-by: Mario Limonciello Signed-off-by: Roman Li Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit d91bc901398741d317d9b55c59ca949d4bc7394b Author: Roman Li Date: Tue Apr 1 17:05:10 2025 -0400 drm/amd/display: Fix gpu reset in multidisplay config [Why] The indexing of stream_status in dm_gpureset_commit_state() is incorrect. That leads to asserts in multi-display configuration after gpu reset. [How] Adjust the indexing logic to align stream_status with surface_updates. Fixes: cdaae8371aa9 ("drm/amd/display: Handle GPU reset for DC block") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3808 Reviewed-by: Aurabindo Pillai Reviewed-by: Mario Limonciello Signed-off-by: Roman Li Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 8fc3959cd4da33d703ceb1166830407b673d8a78 Author: Austin Zheng Date: Tue Apr 1 14:38:31 2025 -0400 drm/amd/display: Move Mode Support Prefetch Checks To Its Own Function [Why] Large stack size observed in DCN4 mode support when compiling with clang. Additional instrumentation added by compiler adds to stack size. dml_core_mode_support ends up going over the stack size limit due to the size of the function. [How] Move checks and calculations for prefetch to its own function. Reviewed-by: Aurabindo Pillai Signed-off-by: Austin Zheng Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 05185812ae3695fe049c14847ce3cbeccff1bf2e Author: Felix Kuehling Date: Tue Apr 15 23:58:28 2025 -0400 drm/amdgpu: Don't pin VRAM without DMABUF_MOVE_NOTIFY Pinning of VRAM is for peer devices that don't support dynamic attachment and move notifiers. But it requires that all such peer devices are able to access VRAM via PCIe P2P. Any device without P2P access requires migration to GTT, which fails if the memory is already pinned for another peer device. Sharing between GPUs should not require pinning in VRAM. However, if DMABUF_MOVE_NOTIFY is disabled in the kernel build, even DMABufs shared between GPUs must be pinned, which can lead to failures and functional regressions on systems where some peer GPUs are not P2P accessible. Disable VRAM pinning if move notifiers are disabled in the kernel build to fix regressions when sharing BOs between GPUs. Signed-off-by: Felix Kuehling Tested-by: Hao (Claire) Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6df71752632e39ffa189092b9ca16dddc6bbea7b Author: Jack Chang Date: Thu Dec 19 16:10:18 2024 +0800 drm/amd/display: Move desync error counter operation up. [Why & How] Move desync error counter operation up to prevent it from being skipped by force disable desync error. Reviewed-by: Robin Chen Reviewed-by: Aric Cyr Signed-off-by: Jack Chang Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 7e40f64896e8e3dca471e287672db5ace12ea0be Author: Mario Limonciello Date: Tue Jan 21 16:03:52 2025 -0600 drm/amd/display: Avoid divide by zero by initializing dummy pitch to 1 [Why] If the dummy values in `populate_dummy_dml_surface_cfg()` aren't updated then they can lead to a divide by zero in downstream callers like CalculateVMAndRowBytes() [How] Initialize dummy value to a value to avoid divide by zero. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 724a4b400bfcce27b155863fc36fe7bef58f768e Author: Chris Park Date: Mon Mar 31 16:04:55 2025 -0400 drm/amd/display: Implement HDMI Read Request [Why] Read Request provides alterative method to polling to the HDMI sinks that support it. [How] Implement Read Request where interrupt can be generated by the sink. Reviewed-by: Joshua Aberback Signed-off-by: Chris Park Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit f53d0f48a89ccf13a1598985ab1782ec105cb049 Author: Yiling Chen Date: Tue Mar 4 16:52:16 2025 +0800 drm/amd/display: To apply the adjusted DP ref clock for DP devices [Why] For some pixel clock margin sensitive external monitor, we could not keep original DP ref clock for the ASICs supported SSC DP ref clock. [How] From slicon design team's comment, we have to apply the adjusted DP ref clock for DP devices. DP 128b (DP2) signals uses the DTBCLK not DP ref. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Yiling Chen Signed-off-by: Zaeem Mohamed Tested-by: Mark Broadworth Signed-off-by: Alex Deucher commit 98b995660bff011d8e00af03abd74ac7d1ac1390 Author: Omri Mann Date: Mon Apr 21 13:59:50 2025 +0300 ublk: Add UBLK_U_CMD_UPDATE_SIZE Currently ublk only allows the size of the ublkb block device to be set via UBLK_CMD_SET_PARAMS before UBLK_CMD_START_DEV is triggered. This does not provide support for extendable user-space block devices without having to stop and restart the underlying ublkb block device causing IO interruption. This patch adds a new ublk command UBLK_U_CMD_UPDATE_SIZE to allow the ublk block device to be resized on-the-fly. Feature flag UBLK_F_UPDATE_SIZE is also added to indicate support. Signed-off-by: Omri Mann Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/2a370ab1-d85b-409d-b762-f9f3f6bdf705@nvidia.com Signed-off-by: Jens Axboe commit 5709be4c35ba760b001733939e20069de033a697 Merge: 8582d9ab3efdeb 9d7a0577c9db35 Author: Alexei Starovoitov Date: Mon Apr 21 08:03:10 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc3 Cross-merge bpf and other fixes after downstream PRs. No conflicts. Signed-off-by: Alexei Starovoitov commit eec64449233b58f44154ecb9417e53fceb1e93a1 Author: Alex Deucher Date: Wed Feb 26 21:13:02 2025 -0500 drm/amdgpu/gfx12: add support for TMZ queues to mqd_init Set up TMZ for queues. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 9486875408e775fb1c808744be761af2c0acfc46 Author: Alex Deucher Date: Wed Feb 26 21:08:56 2025 -0500 drm/amdgpu/gfx11: add support for TMZ queues to mqd_init Set up TMZ for queues. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 3940796a6eefa555fec688a4adee5659ef9fa431 Author: Felix Kuehling Date: Thu Apr 17 10:23:15 2025 -0400 drm/amdgpu: Use allowed_domains for pinning dmabufs When determining the domains for pinning DMABufs, filter allowed_domains and fail with a warning if VRAM is forbidden and GTT is not an allowed domain. Fixes: f5e7fabd1f5c ("drm/amdgpu: allow pinning DMA-bufs into VRAM if all importers can do P2P") Suggested-by: Christian König Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cb808ab833d1a9bbca0c7ed27e5a31c5c2c9f8cb Author: Alex Deucher Date: Wed Feb 26 20:58:42 2025 -0500 drm/amdgpu: add tmz queue parameter to mqd props Use this to track the whether we want TMZ for queues. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 94a62b0f573f868f6f706d96c8c577c2e9b309e0 Author: Alex Deucher Date: Wed Feb 26 17:12:58 2025 -0500 drm/amdgpu/userq: add UAPI for setting up secure queues If the queues needs to access TMZ surfaces, it must be set up as secure. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit d30f61076268fd7ce01e4ec9e4d84bfaf90365f7 Author: Srinivasan Shanmugam Date: Thu Apr 17 21:05:35 2025 +0530 drm/amdgpu: Refine Cleaner Shader MEC firmware version for GFX10.1.x GPUs Update the minimum firmware version for the Cleaner Shader in the gfx_v10_0_sw_init function. This change adjusts the minimum required firmware version for the MEC firmware from 152 to 151, allowing for broader compatibility with GFX10.1 GPUs. Fixes: 25961bad9212 ("drm/amdgpu/gfx10: Add cleaner shader for GFX10.1.10") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2200b41428ee8d2298ec9d3fd2a22ba2d006096a Author: Jesse.zhang@amd.com Date: Fri Apr 11 15:30:23 2025 +0800 drm/amdgpu:remove old sdma reset callback mechanism This patch removes the deprecated SDMA reset callback mechanism, which was previously used to register pre-reset and post-reset callbacks for SDMA engine resets. The callback mechanism has been replaced with a more direct and efficient approach using `stop_queue` and `start_queue` functions in the ring's function table. The SDMA reset callback mechanism allowed KFD and AMDGPU to register pre-reset and post-reset functions for handling SDMA engine resets. However, this approach added unnecessary complexity and was no longer needed after the introduction of the `stop_queue` and `start_queue` functions in the ring's function table. 1. **Remove Callback Mechanism**: - Removed the `amdgpu_sdma_register_on_reset_callbacks` function and its associated data structures (`sdma_on_reset_funcs`). - Removed the callback registration logic from the SDMA v4.4.2 initialization code. 2. **Clean Up Related Code**: - Removed the `sdma_v4_4_2_set_engine_reset_funcs` function, which was used to register the callbacks. - Removed the `sdma_v4_4_2_engine_reset_funcs` structure, which contained the pre-reset and post-reset callback functions. Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3f8b6d828210f872d4a84bd2e26440d3767f79fd Author: Sunil Khatri Date: Thu Apr 17 15:00:44 2025 +0530 drm/radeon: fix the warning for radeon_cs_parser_fini Fix the below warning message. radeon/radeon_cs.c:418: warning: Excess function parameter 'backoff' description in 'radeon_cs_parser_fini' Reviewed-by: Tvrtko Ursulin Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 9018c7fe68b55f7ca0df65f0c048dcb6acea90ed Author: Sunil Khatri Date: Thu Apr 17 15:57:26 2025 +0530 drm/amdgpu/userq: add context and seqno of the fence Add context and seqno of the fence in error logging rather than printing fence ptr. Reviewed-by: Christian König Suggested-by: Pierre-Eric Pelloux-Prayer Suggested-by: Tvrtko Ursulin Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 6a07ac702f022dc85b186e7d2bec6216a0c260b0 Author: Jesse.zhang@amd.com Date: Wed Apr 16 14:13:30 2025 +0800 drm/amdgpu: optimize queue reset and stop logic for sdma_v5_2 This patch refactors the SDMA v5.2 queue reset and stop logic to improve code readability, maintainability, and performance. The key changes include: 1. **Generalized `sdma_v5_2_gfx_stop` Function**: - Added an `inst_mask` parameter to allow stopping specific SDMA instances instead of all instances. This is useful for resetting individual queues. 2. **Simplified `sdma_v5_2_reset_queue` Function**: - Removed redundant loops and checks by directly using the `ring->me` field to identify the SDMA instance. - Reused the `sdma_v5_2_gfx_stop` function to stop the queue, reducing code duplication. v1: The general coding style is to declare variables like "i" or "r" last. E.g. longest lines first and short lasts. (Chritian) Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 574f4b5562cc11da7beb8c14b51a846da8263f89 Author: Jesse.zhang@amd.com Date: Wed Apr 16 14:03:02 2025 +0800 drm/amdgpu: optimize queue reset and stop logic for sdma_v5_0 This patch refactors the SDMA v5.0 queue reset and stop logic to improve code readability, maintainability, and performance. The key changes include: 1. **Generalized `sdma_v5_0_gfx_stop` Function**: - Added an `inst_mask` parameter to allow stopping specific SDMA instances instead of all instances. This is useful for resetting individual queues. 2. **Simplified `sdma_v5_0_reset_queue` Function**: - Removed redundant loops and checks by directly using the `ring->me` field to identify the SDMA instance. - Reused the `sdma_v5_0_gfx_stop` function to stop the queue, reducing code duplication. v1: The general coding style is to declare variables like "i" or "r" last. E.g. longest lines first and short lasts. (Chritian) Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 47454f2dc0bf6774c8dbe7226bcf50ba24a788a8 Author: Jesse.zhang@amd.com Date: Mon Apr 14 16:06:51 2025 +0800 drm/amdgpu: Register the new sdma function pointers for sdma_v5_2 Register stop/start/soft_reset queue functions for SDMA IP versions v5.2. Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e56d4bf57fabe009494e9b81ba64e21ebe7d35c2 Author: Jesse.zhang@amd.com Date: Mon Apr 14 16:05:33 2025 +0800 drm/amdgpu/: drm/amdgpu: Register the new sdma function pointers for sdma_v5_0 Register stop/start/soft_reset queue functions for SDMA IP versions v5.0. Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5c3e7c49538e2ddad10296a318c225bbb3d37d20 Author: Jesse.zhang@amd.com Date: Fri Apr 11 15:26:18 2025 +0800 drm/amdgpu: Implement SDMA soft reset directly for v5.x This patch introduces a new function `amdgpu_sdma_soft_reset` to handle SDMA soft resets directly, rather than relying on the DPM interface. 1. **New `amdgpu_sdma_soft_reset` Function**: - Implements a soft reset for SDMA engines by directly writing to the hardware registers. - Handles SDMA versions 4.x and 5.x separately: - For SDMA 4.x, the existing `amdgpu_dpm_reset_sdma` function is used for backward compatibility. - For SDMA 5.x, the driver directly manipulates the `GRBM_SOFT_RESET` register to reset the specified SDMA instance. 2. **Integration into `amdgpu_sdma_reset_engine`**: - The `amdgpu_sdma_soft_reset` function is called during the SDMA reset process, replacing the previous call to `amdgpu_dpm_reset_sdma`. v2: r should default to an error (Alex) Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b22659d5d3520c82295981797e75de525365a411 Author: Jesse.zhang@amd.com Date: Fri Apr 11 14:48:52 2025 +0800 drm/amdgpu: switch amdgpu_sdma_reset_engine to use the new sdma function pointers Replace old callback mechanism with direct calls to stop/start functions. Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a5c34299d866f099c85567117717c18842e67da8 Author: Alex Deucher Date: Wed Feb 26 22:56:26 2025 -0500 drm/amdgpu/userq: enable support for queue priorities Enable users to create queues at different priority levels. The highest level is restricted to drm master. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 23a650bb9f248133095a2e4d7ba7bcbdba9798ab Author: Alex Deucher Date: Wed Feb 26 22:47:11 2025 -0500 drm/amdgpu/userq/mes: handle user queue priority Handle the queue priority set by the user. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 9546c05628a7782508ce4b779b4b00c2276b9e38 Author: Alex Deucher Date: Wed Feb 26 22:38:08 2025 -0500 drm/amdgpu/userq: add priorty to user queue structure So we can track this when we create user queues. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit a83be6e4798efbfd3f6ca511806fbaab73a4d7e7 Author: Alex Deucher Date: Wed Feb 26 22:29:15 2025 -0500 drm/amdgpu/mes12: add conversion for priority levels Convert driver priority levels to MES11 priority levels. At the moment they are the same, but they may not always be. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 3d0a402e7cd11496c40e03b15828c054a70f6fbd Author: Alex Deucher Date: Wed Feb 26 22:27:47 2025 -0500 drm/amdgpu/mes11: add conversion for priority levels Convert driver priority levels to MES11 priority levels. At the moment they are the same, but they may not always be. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 024cc8a71aac8194fc2883782d36cbad6a9fe36b Author: Alex Deucher Date: Wed Feb 26 16:55:36 2025 -0500 drm/amdgpu/userq: add UAPI for setting queue priority Allow the user to set a queue priority levels: 0 - normal low - most apps (maps to MES AMD_PRIORITY_LEVEL_NORMAL) 1 - low - background jobs (maps to MES AMD_PRIORITY_LEVEL_LOW) 2 - normal high - apps that need relative high (maps to MES AMD_PRIORITY_LEVEL_MEDIUM) 3 - high (admin only - for compositors) (maps to MES AMD_PRIORITY_LEVEL_HIGH) Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit fced8e7d2ddeba7f41b19e065f8c02a9abf9ac00 Author: Alex Deucher Date: Wed Feb 26 16:54:27 2025 -0500 drm/amdgpu: convert userq UAPI _pad to flags Reuse the _pad field for flags. Reviewed-by: Sunil Khatri Reviewed-by: Jesse.Zhang Signed-off-by: Alex Deucher commit 6027cbee190049629d3028789659e0763562e21e Author: Wentao Liang Date: Mon Apr 14 11:14:39 2025 +0800 drm/amd/display: Add error check for avi and vendor infoframe setup function The function fill_stream_properties_from_drm_display_mode() calls the function drm_hdmi_avi_infoframe_from_display_mode() and the function drm_hdmi_vendor_infoframe_from_display_mode(), but does not check its return value. Log the error messages to prevent silent failure if either function fails. Signed-off-by: Wentao Liang Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit 8f23a97907d92e16d34d4a2a9dc793398afa34a6 Author: Alex Deucher Date: Mon Apr 14 13:11:10 2025 -0400 drm/amdgpu/userq: integrate with enforce isolation Enforce isolation serializes access to the GFX IP. User queues are isolated in the MES scheduler, but we still need to serialize between kernel queues and user queues. For enforce isolation, group KGD user queues with KFD user queues. v2: split out variable renaming, add config guards v3: use new function names Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 28fc3172e4204c8cdd8c70226ea02b0ae9930b69 Author: Alex Deucher Date: Fri Feb 21 15:20:45 2025 -0500 drm/amdgpu: rename enforce isolation variables Since they will be used for both KFD and KGD user queues, rename them from kfd to userq. No intended functional change. Acked-by: Sunil Khatri Signed-off-by: Alex Deucher commit 94976e7e5ede65f9dfad669b1ea7170320f08399 Author: Alex Deucher Date: Thu Apr 10 13:26:43 2025 -0400 drm/amdgpu/userq: add helpers to start/stop scheduling This will be used to stop/start user queue scheduling for example when switching between kernel and user queues when enforce isolation is enabled. v2: use idx v3: only stop compute/gfx queues Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 56a0a80af043eadb4af86ab426b3c00624acb832 Author: Alex Deucher Date: Fri Apr 11 14:16:41 2025 -0400 drm/amdgpu/userq: track the xcp_id associated with the queue Track this to align with KFD for enforce isolation handling. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 5ae4591f4ea51519934a14aac537a28f348a8a56 Author: Emily Deng Date: Tue Apr 8 20:25:43 2025 +0800 drm/amdgpu: Clear overflow for SRIOV For VF, it doesn't have the permission to clear overflow, clear the bit by reset. Signed-off-by: Emily Deng Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fb20954c9717d1d07d8b8b8f34ac2a2755aec5ff Author: Alex Deucher Date: Mon Apr 14 14:18:03 2025 -0400 drm/amdgpu/userq: rework driver parameter Replace disable_kq parameter with user_queue parameter. The parameter has the following logic: -1 = auto (ASIC specific default) 0 = user queues disabled 1 = user queues enabled and kernel queues enabled (if supported) 2 = user queues enabled and kernel queues disabled The default behavior (-1) is currently the same as 0 for current ASICs. To enable user queues (in addition to kernel queues) set user_queue=1. To enable user queues and disable kernel queues (to make all resources available to user queues), set user_queue=2. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 172494c4e9f897f0f499a4a86a812dee7b617358 Author: Asad Kamal Date: Sat Apr 12 11:14:32 2025 +0800 drm/amd/pm: Enable host limit metrics support Enable host limit metrics support for smuv_13_0_12 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0ed032dc7de5f069cc409fd81abd267ced854b35 Author: Alex Deucher Date: Sun Apr 13 10:32:23 2025 -0400 drm/amdgpu/sdma7: properly reference trap interrupts for userqs We need to take a reference to the interrupts to make sure they stay enabled even if the kernel queues have disabled them. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 1197cfb73083dbe31a8964bacad7932178430257 Author: Alex Deucher Date: Sun Apr 13 10:31:08 2025 -0400 drm/amdgpu/sdma6: properly reference trap interrupts for userqs We need to take a reference to the interrupts to make sure they stay enabled even if the kernel queues have disabled them. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 2c8b0d628a9904190532b4137be9e645421eb4cf Author: Asad Kamal Date: Sat Apr 12 11:08:01 2025 +0800 drm/amd/pm: Enable host limit metrics support Enable host limit metrics support for smuv_13_0_6 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b574729ff00d0b5dfdabe3b9e8bf52920192d9b4 Author: Sathishkumar S Date: Thu Apr 10 11:58:16 2025 +0530 drm/amdgpu: Enable doorbell for JPEG5_0_1 Enable doorbell for JPEG5_0_1 and adjust index for VCN5_0_1. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 8ae634f10e67ee61b8462cdd95661048271c49bf Author: Shiwu Zhang Date: Thu Apr 10 11:56:47 2025 +0530 drm/amdgpu: Update vcn doorbell range in NBIO 7.9 Increase vcn doorbell range for gfx950 to 11. Signed-off-by: Shiwu Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit e10414cf2e55fd9db7a72862ede04e22fe0c0caf Author: Alex Deucher Date: Sun Apr 13 10:19:24 2025 -0400 drm/amdgpu/gfx12: properly reference EOP interrupts for userqs Regardless of whether we disable kernel queues, we need to take an extra reference to the pipe interrupts for user queues to make sure they stay enabled in case we disable them for kernel queues. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit ac9984cee7e17fad030708f6462f272cf82a5f74 Author: Alex Deucher Date: Sun Apr 13 10:16:58 2025 -0400 drm/amdgpu/gfx11: properly reference EOP interrupts for userqs Regardless of whether we disable kernel queues, we need to take an extra reference to the pipe interrupts for user queues to make sure they stay enabled in case we disable them for kernel queues. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 6b9d26089f56fb05c1f13027bfff53a63ba6f64d Author: Eric Huang Date: Mon Apr 14 11:19:01 2025 -0400 drm/amdkfd: fix a bug of smi event for superuser rocm-smi with superuser permission doesn't show some of smi events, i.e. page fault/migration, because the condition of "(events & all)" is false. Superuser should be able to detect all events, the condiiton of "(events & all)" seems redundant, so removing it will fix the issue. Signed-off-by: Eric Huang Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 00ec6732a9ef5af89fb7f7e71604d5227bbdc4de Author: Alexandre Demers Date: Sun Apr 13 16:51:21 2025 -0400 drm/amdgpu: add missing DCE6 to dce_version_to_string() Missing DCE 6.0 6.1 and 6.4 are identified as UNKNOWN. Fix this. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 85207abb401bbaffa5ef1737af660f28afac60a6 Author: Alexandre Demers Date: Mon Apr 7 22:11:00 2025 -0400 drm/amdgpu: fix typo in bios_parser.c Probably a cut and paste error from using get_integrated_info_v8's comment. This has to be get_integrated_info_v9 Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit f82e7cf5f5a9cec0770c63891febf33d8cd3de04 Author: Alexandre Demers Date: Mon Apr 7 22:10:59 2025 -0400 drm/amdgpu: fix duplicated value setting in dce100_resource_construct() i2c_speed_in_khz was set twice with the same values. Looking at other DCE versions, we probably wanted to set the value for i2c_speed_in_khz_hdcp. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 5e272fb5eca998f67a6678331713fe643fa7b7e2 Author: Alexandre Demers Date: Mon Apr 7 22:10:58 2025 -0400 drm/radeon: fix typo in atombios.h "aligned" not "aligend" Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 3d5d0d35a780aac31fc586edbccbe5a55a0bfdb1 Author: Alexandre Demers Date: Mon Apr 7 22:10:57 2025 -0400 drm/amdgpu: fix typo in atombios.h "aligned" not "aligend" Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 66f6ea421a8031e099920adfa2c57db54bd9af2b Author: Alexandre Demers Date: Mon Apr 7 22:10:56 2025 -0400 drm/amdgpu: add missing parameter name in dce110_clk_src_construct() declaration While not needed per speaking, all the other parameters have names but this one. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 34c86a0f4487915cf532affe6fedc7ed100378e6 Author: Alexandre Demers Date: Mon Apr 7 22:10:55 2025 -0400 drm/amdgpu: rename function to follow naming convention in dce110 The prefix dce110 is used on all functions, but init_pipes() and init_hw(). Under DCN, these sames functions are prefixed. Let's keep thing coherent. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 0e023c327b30ff306a7c08165a1ab9879c268226 Author: Dan Carpenter Date: Sat Apr 12 17:39:43 2025 +0300 drm/amdgpu: Clean up error handling in amdgpu_userq_fence_driver_alloc() 1) Checkpatch complains if we print an error message for kzalloc() failure. The kzalloc() failure already has it's own error messages built in. Also this allocation is small enough that it is guaranteed to succeed. 2) Return directly instead of doing a goto free_fence_drv. The "fence_drv" is already NULL so no cleanup is necessary. Reviewed-by: Arvind Yadav Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 8ff7c78baeeab746432934f7de82d56706c00c50 Author: Dan Carpenter Date: Sat Apr 12 17:39:32 2025 +0300 drm/amdgpu: Fix double free in amdgpu_userq_fence_driver_alloc() The goto frees "fence_drv" so this is a double free bug. There is no need to call amdgpu_seq64_free(adev, fence_drv->va) since the seq64 allocation failed so change the goto to goto free_fence_drv. Also propagate the error code from amdgpu_seq64_alloc() instead of hard coding it to -ENOMEM. Fixes: e7cf21fbb277 ("drm/amdgpu: Few optimization and fixes for userq fence driver") Reviewed-by: Arvind Yadav Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 987718c5598a3044ecca1b6f774900df12927ed5 Author: Alex Deucher Date: Fri Apr 11 15:49:51 2025 -0400 drm/amdgpu/userq: move runpm handling into core userq code Pull it out of the MES code and into the generic code. It's not MES specific and needs to be applied to all user queues regardless of the backend. Reviewed-by: Sunil Khatri Reviewed-by: Shaoyun.liu Signed-off-by: Alex Deucher commit 9315860d05aa2604045a5d8f874cf1d36a70da89 Author: Eric Huang Date: Mon Apr 14 10:45:12 2025 -0400 drm/amdkfd: fix NULL check mistake for process smi event The mistake will lead to NULL kernel oops, so fix it. Fixes: 4172b556fd5b ("drm/amdkfd: add smi events for process start and end") Signed-off-by: Eric Huang Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit ce1d40196de5b02ac643bbf36551cf96d0e55852 Author: Jesse.zhang@amd.com Date: Mon Apr 14 15:25:16 2025 +0800 drm/amdgpu/sdma_v4: Register the new sdma function pointers Register stop/start/soft_reset queue functions for sdma v4_4_2. Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 29891842154d7ebca97a94b0d5aaae94e560f61c Author: Jesse.zhang@amd.com Date: Fri Apr 11 13:01:19 2025 +0800 drm/amdgpu: Add the new sdma function pointers for amdgpu_sdma.h This patch introduces new function pointers in the amdgpu_sdma structure to handle queue stop, start and soft reset operations. These will replace the older callback mechanism. The new functions are: - stop_kernel_queue: Stops a specific SDMA queue - start_kernel_queue: Starts/Restores a specific SDMA queue - soft_reset_kernel_queue: Performs soft reset on a specific SDMA queue v2: Update stop_queue/start_queue function paramters to use ring pointer instead of device/instance(Chritian) v3: move stop_queue/start_queue to struct amdgpu_sdma_instance and rename them. (Alex) v4: rework the ordering a bit (Alex) Suggested-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 94fc88f680f94e1c41eb994e6c84873696ddcc6e Author: Alex Deucher Date: Thu Apr 10 13:17:08 2025 -0400 drm/amdgpu: don't swallow errors in amdgpu_userqueue_resume_all() since we loop through the queues |= the errors. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit c2c722217af4d2d17de8665968975a70a08046ea Author: Alex Deucher Date: Fri Feb 21 12:16:34 2025 -0500 drm/amdgpu/userq: handle system suspend and resume Unmap user queues on suspend and map them on resume. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 73e12e98ec0c5657c4a0c99c96bc4c608813365d Author: Alex Deucher Date: Thu Feb 20 16:31:40 2025 -0500 drm/amdgpu/userq: add suspend and resume helpers Add helpers to unmap and map user queues on suspend and resume. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit c0bbf64870e71eb8d6f6e2bcef3d84ba86baf32c Author: Alex Deucher Date: Thu Apr 10 13:54:15 2025 -0400 drm/amdgpu/userq: properly clean up userq fence driver on failure If userq creation fails, we need to properly unwind and free the user queue fence driver. v2: free idr as well (Sunil) Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit edc762a51c7181d6fe1e0837e2eb69afb406f98e Author: Alex Deucher Date: Thu Apr 10 13:49:47 2025 -0400 drm/amdgpu/userq: move some code around Move some userq fence handling code into amdgpu_userq_fence.c. This matches the other code in that file. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit b0db33c8c50f5e89557d4b11da94820677f0c9a2 Author: Alex Deucher Date: Fri Feb 21 14:47:00 2025 -0500 drm/amdgpu/userq: rework front end call sequence Split out the queue map from the mqd create call and split out the queue unmap from the mqd destroy call. This splits the queue setup and teardown with the actual enablement in the firmware. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 51a9ea455115fc75ef703dbc2ac04ca59b47b174 Author: Alex Deucher Date: Thu Apr 10 12:29:37 2025 -0400 drm/amdgpu/userq: rename suspend/resume callbacks Rename to map and umap to better align with what is happening at the firmware level and remove the extra level of indirection in the MES userq code. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 38feab2deac8732247cb54d05a26ca07b5c4d0e0 Author: Alex Deucher Date: Wed Feb 26 22:16:53 2025 -0500 drm/amdgpu/userq/mes: remove unused header This is unused so remove it. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit a49ce9cc85a82d5c5d65186f5a8fda0ebfcff571 Author: Aditya Garg Date: Tue Apr 8 12:19:11 2025 +0530 drm/appletbdrm: use %p4cl instead of %p4cc Due to lack of a proper format specifier, %p4cc was being used instead of %p4cl for the purpose of printing FourCCs. But the disadvange was that they were being printed in a reverse order. %p4cl should correct this issue. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Aditya Garg Link: https://lore.kernel.org/r/PN3PR01MB959783DC6377C4CAB203D7ADB8B52@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Alyssa Rosenzweig commit 403ff8fd2dbf5066128af4d1fde76c35a800369d Author: Aditya Garg Date: Tue Apr 8 12:18:32 2025 +0530 printf: add tests for generic FourCCs This patch adds support for kunit tests of generic 32-bit FourCCs added to vsprintf. Acked-by: Tamir Duberstein Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Tested-by: Petr Mladek Signed-off-by: Aditya Garg Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/PN3PR01MB95973AF4F6262B2D1996FB25B8B52@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Alyssa Rosenzweig commit 1938479b2720ebc05aab349c7dc0a53921ff7c87 Author: Hector Martin Date: Tue Apr 8 12:17:57 2025 +0530 lib/vsprintf: Add support for generic FourCCs by extending %p4cc %p4cc is designed for DRM/V4L2 FourCCs with their specific quirks, but it's useful to be able to print generic 4-character codes formatted as an integer. Extend it to add format specifiers for printing generic 32-bit FourCCs with various endian semantics: %p4ch Host byte order %p4cn Network byte order %p4cl Little-endian %p4cb Big-endian The endianness determines how bytes are interpreted as a u32, and the FourCC is then always printed MSByte-first (this is the opposite of V4L/DRM FourCCs). This covers most practical cases, e.g. %p4cn would allow printing LSByte-first FourCCs stored in host endian order (other than the hex form being in character order, not the integer value). Acked-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Tested-by: Petr Mladek Signed-off-by: Hector Martin Signed-off-by: Aditya Garg Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/PN3PR01MB9597B01823415CB7FCD3BC27B8B52@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Alyssa Rosenzweig commit 26c691a6620069894ba3fde9147cf49d340870b3 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:12 2025 +0200 drm/mediatek: mtk_hdmi: Move output init to mtk_hdmi_register_audio_driver() In preparation for moving the common bits of this driver, merge the contents of mtk_hdmi_output_init in mtk_hdmi_register_audio_driver function to aggregate all of the initial audio setup together in the same function and to make it clear that all of the setup that is performed in mtk_hdmi_output_init is specifically related only to audio and not video. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-15-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 7485be967f7f39e931967b33c71ece88a573fc90 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:11 2025 +0200 drm/mediatek: mtk_hdmi: Move CEC device parsing in new function Move the CEC device parsing logic to a new function called mtk_hdmi_get_cec_dev(), and move the parsing action to the end of mtk_hdmi_dt_parse_pdata(), allowing to remove gotos in this function, reducing code size and improving readability. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-14-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 25eee6c64376fcdc375b97c7e1f105e132654563 Author: Pratham Pratap Date: Tue Mar 25 18:00:19 2025 +0530 arm64: dts: qcom: qdu1000: Add snps,dis_u3_susphy_quirk During device mode initialization on certain QC targets, before the runstop bit is set, sometimes it's observed that the GEVNTADR{LO/HI} register write fails. As a result, GEVTADDR registers are still 0x0. Upon setting runstop bit, DWC3 controller attempts to write the new events to address 0x0, causing an SMMU fault and system crash. This was initially observed on SM8450 and later reported on few other targets as well. As suggested by Qualcomm HW team, clearing the GUSB3PIPECTL.SUSPHY bit resolves the issue by preventing register write failures. Address this by setting the snps,dis_u3_susphy_quirk to keep the GUSB3PIPECTL.SUSPHY bit cleared. This change was tested on multiple targets (SM8350, SM8450 QCS615 etc.) for over an year and hasn't exhibited any side effects. Signed-off-by: Pratham Pratap Signed-off-by: Prashanth K Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250325123019.597976-6-prashanth.k@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit ad2011e02dab5ccc9f38848a3d909855a4ae7c8f Author: Pratham Pratap Date: Tue Mar 25 18:00:18 2025 +0530 arm64: dts: qcom: qcs615: Add snps,dis_u3_susphy_quirk During device mode initialization on certain QC targets, before the runstop bit is set, sometimes it's observed that the GEVNTADR{LO/HI} register write fails. As a result, GEVTADDR registers are still 0x0. Upon setting runstop bit, DWC3 controller attempts to write the new events to address 0x0, causing an SMMU fault and system crash. This was initially observed on SM8450 and later reported on few other targets as well. As suggested by Qualcomm HW team, clearing the GUSB3PIPECTL.SUSPHY bit resolves the issue by preventing register write failures. Address this by setting the snps,dis_u3_susphy_quirk to keep the GUSB3PIPECTL.SUSPHY bit cleared. This change was tested on multiple targets (SM8350, SM8450 QCS615 etc.) for over an year and hasn't exhibited any side effects. Signed-off-by: Pratham Pratap Signed-off-by: Prashanth K Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250325123019.597976-5-prashanth.k@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9588f10adb5b67bea7eeebed2490c20dfbe82e77 Author: Prashanth K Date: Tue Mar 25 18:00:17 2025 +0530 arm64: dts: qcom: sm8450: Add snps,dis_u3_susphy_quirk During device mode initialization on certain QC targets, before the runstop bit is set, sometimes it's observed that the GEVNTADR{LO/HI} register write fails. As a result, GEVTADDR registers are still 0x0. Upon setting runstop bit, DWC3 controller attempts to write the new events to address 0x0, causing an SMMU fault and system crash. This was initially observed on SM8450 and later reported on few other targets as well. As suggested by Qualcomm HW team, clearing the GUSB3PIPECTL.SUSPHY bit resolves the issue by preventing register write failures. Address this by setting the snps,dis_u3_susphy_quirk to keep the GUSB3PIPECTL.SUSPHY bit cleared. This change was tested on multiple targets (SM8350, SM8450 QCS615 etc.) for over an year and hasn't exhibited any side effects. Signed-off-by: Prashanth K Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250325123019.597976-4-prashanth.k@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit a7dac91e56ae58e1479002e5b94fab73039f2e29 Author: Prashanth K Date: Tue Mar 25 18:00:16 2025 +0530 arm64: dts: qcom: sm8350: Add snps,dis_u3_susphy_quirk During device mode initialization on certain QC targets, before the runstop bit is set, sometimes it's observed that the GEVNTADR{LO/HI} register write fails. As a result, GEVTADDR registers are still 0x0. Upon setting runstop bit, DWC3 controller attempts to write the new events to address 0x0, causing an SMMU fault and system crash. This was initially observed on SM8450 and later reported on few other targets as well. As suggested by Qualcomm HW team, clearing the GUSB3PIPECTL.SUSPHY bit resolves the issue by preventing register write failures. Address this by setting the snps,dis_u3_susphy_quirk to keep the GUSB3PIPECTL.SUSPHY bit cleared. This change was tested on multiple targets (SM8350, SM8450 QCS615 etc.) for over an year and hasn't exhibited any side effects. Signed-off-by: Prashanth K Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250325123019.597976-3-prashanth.k@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9bdbd5286ea597db6131c197ae9ee8614cce1890 Author: Prashanth K Date: Tue Mar 25 18:00:15 2025 +0530 arm64: dts: qcom: sm8150: Add snps,dis_u3_susphy_quirk During device mode initialization on certain QC targets, before the runstop bit is set, sometimes it's observed that the GEVNTADR{LO/HI} register write fails. As a result, GEVTADDR registers are still 0x0. Upon setting runstop bit, DWC3 controller attempts to write the new events to address 0x0, causing an SMMU fault and system crash. This was initially observed on SM8450 and later reported on few other targets as well. As suggested by Qualcomm HW team, clearing the GUSB3PIPECTL.SUSPHY bit resolves the issue by preventing register write failures. Address this by setting the snps,dis_u3_susphy_quirk to keep the GUSB3PIPECTL.SUSPHY bit cleared. This change was tested on multiple targets (SM8350, SM8450 QCS615 etc.) for over an year and hasn't exhibited any side effects. Signed-off-by: Prashanth K Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250325123019.597976-2-prashanth.k@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 03c7aea33cb5860b4468c65a1715be76b54fb882 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:10 2025 +0200 drm/mediatek: mtk_hdmi: Use dev_err_probe() in mtk_hdmi_dt_parse_pdata() Change error prints to use dev_err_probe() instead of dev_err() where possible in function mtk_hdmi_dt_parse_pdata(), used only during device probe. While at it, also beautify some prints. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-13-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 7837702058a16676cf0b0e0a83babe3cb0552cb0 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:09 2025 +0200 drm/mediatek: mtk_hdmi: Move N/CTS setting to new function In preparation for splitting common bits of this driver, moving the hdmi_rec_n_table struct array, and the hdmi_recommended_n(), hdmi_mode_clock_to_hz(), hdmi_expected_cts() functions, add one function called mtk_hdmi_get_ncts() that sets both N and CTS in a single call. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-12-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit c92493e3074478c9c9dc4b5ba2f59cf5e4836bb9 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:08 2025 +0200 drm/mediatek: mtk_hdmi: Move plugged_cb/codec_dev setting to new function In preparation for splitting common bits of this driver, move the mutex-protected cable plugged callback and codec device setting to a new function called mtk_hdmi_audio_set_plugged_cb(). Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-11-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 332de7d7c23f41463ecf53b05b579763e29e6355 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:07 2025 +0200 drm/mediatek: mtk_hdmi: Move audio params selection to new function In preparation for splitting common bits of this driver, move the audio params (codec, sample rate/size, input type, i2s format, etc) selection to a new function called mtk_hdmi_audio_params(). While at it, also rename "hdmi_params" to "aud_params" both to match the mtk_hdmi struct member name and to clarify that those parameters are for HDMI Audio and not for HDMI Video configuration. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-10-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit bcbc3d40dc62dd616e409b8b18c13d5b55fca6af Author: Siddharth Vadapalli Date: Wed Apr 9 15:38:53 2025 +0530 arm64: dts: ti: k3-j784s4-j742s2-evm: Add overlay to enable USB0 Type-A The USB0 instance of the USB controller on both the J742S2 EVM and the J784S4 EVM supports a single USB interface at a time among the following: 1. USB3.1 Gen1 Type C interface 2. Two USB2.0 Type A interfaces via an on-board USB Hub. By default, the USB3.1 Gen1 Type C interface is supported on both of the EVMs. Enable the USB2.0 Type A interface by configuring the USB2.0_MUX_SEL mux. Additionally, set the Dual-Role Mode to Host since a Type-A interface is only associated with the Host Mode of operation. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250409100853.4179934-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 6a7023118fd7901d8b7967388923604d5d646cca Author: Nishanth Menon Date: Fri Apr 11 15:39:50 2025 -0500 arm64: dts: ti: k3-am67a-beagley-ai: Add bootph for main_gpio1 main_gpio1 controls the voltage for the SDcard from 3.3v to 1.8v. This is required for proper operation of SDcard through various boot stages. Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250411203950.2859356-1-nm@ti.com Signed-off-by: Nishanth Menon commit c62bc66d53de9a61154224f99c1b4ca68ed57208 Author: Vignesh Raghavendra Date: Thu Apr 17 14:19:03 2025 +0530 soc: ti: k3-socinfo: Add JTAG ID for AM62LX Add JTAG ID information for AM62Lx SoC so as to enable SoC detection in kernel. Signed-off-by: Vignesh Raghavendra Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20250417084904.2869369-1-vigneshr@ti.com Signed-off-by: Nishanth Menon commit b506ff3316ae0545961417c76131b084d2c9bc6c Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:06 2025 +0200 drm/mediatek: mtk_hdmi: Disgregate function mtk_hdmi_audio_set_param() As a cleanup, and in preparation for splitting common bits of this driver, disgregate the code in function mtk_hdmi_audio_set_param() to the beginning and end of function mtk_hdmi_audio_hw_params(). In a later commit, the hw_params callback function will also be disgregated so that the code will get two functions: one that performs the generic hdmi_audio_param copy, and one that performs IP specific setup, both of which will be called in the callback, allowing all of the non IP version specific code to get moved in a common file. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-9-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit d6e25b3590a0679bca1a1becc04e3999f1dfd461 Author: Guillaume Ranquet Date: Tue Apr 15 12:43:05 2025 +0200 drm/mediatek: hdmi: Use regmap instead of iomem for main registers In preparation for the addition of a new version of the HDMI IP which will need to share its iospace between multiple subdrivers, and in preparation for moving out the common bits between the two, migrate this driver to fully use regmap. Signed-off-by: Guillaume Ranquet Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-8-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 957cac22a82d33ae2cede1c59dc6844139fd92b3 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:04 2025 +0200 drm/mediatek: mtk_hdmi: Convert to module_platform_driver macro Now that all of the mtk_hdmi subdrivers are a platform driver on their own it is possible to remove the custom init/exit functions in this driver and just use the module_platform_driver() macro. While at it, also compress struct of_device_id entries and remove stray commas in mtk_hdmi_driver assignments. Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-7-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit c241118b62164786303e6614378feb7d1fda4f54 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:03 2025 +0200 drm/mediatek: mtk_hdmi_ddc: Switch to register as module_platform_driver In preparation for adding a driver for the new HDMIv2 IP, and before splitting out the common bits from the HDMI driver, change the mtk_hdmi_ddc driver from being registered from the HDMI driver itself to be a module_platform_driver of its own. With this change, there are no more users of the mtk_hdmi.h header so, while at it, also remove it. Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-6-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 49da9105781d99db3650c5e9a0d58ed9526d07c7 Author: Sudeep Holla Date: Fri Apr 11 12:25:39 2025 +0100 soc: hisilicon: kunpeng_hccs: Simplify PCC shared memory region handling The PCC driver now handles mapping and unmapping of shared memory areas as part of pcc_mbox_{request,free}_channel(). Without these before, this Kunpeng HCCS driver did handling of those mappings like several other PCC mailbox client drivers. There were redundant operations, leading to unnecessary code. Maintaining the consistency across these driver was harder due to scattered handling of shmem. Just use the mapped shmem and remove all redundant operations from this driver. Cc: Huisong Li Signed-off-by: Sudeep Holla Reviewed-by: Huisong Li Signed-off-by: Wei Xu commit 685f9537a72877693a1ab116d155acc89562c29b Author: Daisuke Matsuda Date: Fri Apr 18 14:13:45 2025 +0900 RDMA/core: Move ODP capability definitions to uapi The bits are used from both kernel space and userland, so they should be placed in UAPI. Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250418051345.1022339-2-matsuda-daisuke@fujitsu.com Signed-off-by: Leon Romanovsky commit 19bbfe7b5fcc04d8711e8e1352acc77c1a5c3955 Author: Christian Brauner Date: Mon Apr 21 10:27:40 2025 +0200 fs: add S_ANON_INODE This makes it easy to detect proper anonymous inodes and to ensure that we can detect them in codepaths such as readahead(). Readahead on anonymous inodes didn't work because they didn't have a proper mode. Now that they have we need to retain EINVAL being returned otherwise LTP will fail. We also need to ensure that ioctls aren't simply fired like they are for regular files so things like inotify inodes continue to correctly call their own ioctl handlers as in [1]. Reported-by: Xilin Wu Link: https://lore.kernel.org/3A9139D5CD543962+89831381-31b9-4392-87ec-a84a5b3507d8@radxa.com [1] Link: https://lore.kernel.org/7a1a7076-ff6b-4cb0-94e7-7218a0a44028@sirena.org.uk Signed-off-by: Christian Brauner commit 632b3186726984319e2337987de86a442407f30e Author: Pavel Begunkov Date: Sun Apr 20 10:31:19 2025 +0100 io_uring/zcrx: move zcrx region to struct io_zcrx_ifq Refill queue region is a part of zcrx and should stay in struct io_zcrx_ifq. We can't have multiple queues without it, so move it there. As a result there is no context global zcrx region anymore, and the region is looked up together with its ifq. To protect a concurrent mmap from seeing an inconsistent region we were protecting changes to ->zcrx_region with mmap_lock, but now it protect the publishing of the ifq. Reviewed-by: David Wei Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/24f1a728fc03d0166f16d099575457e10d9d90f2.1745141261.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 77231d4e46555d30289b1909c2a2f26bcf00f08c Author: Pavel Begunkov Date: Sun Apr 20 10:31:18 2025 +0100 io_uring/zcrx: let zcrx choose region for mmaping In preparation for adding multiple ifqs, add a helper returning a region for mmaping zcrx refill queue. For now it's trivial and returns the same ctx global ->zcrx_region. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d9006e2ef8cd5e5b337c2ba2228ede8409eb60f2.1745141261.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 59bc1ab922bbb36558292c204e56ab951e833384 Author: Pavel Begunkov Date: Sun Apr 20 10:31:17 2025 +0100 io_uring/zcrx: remove sqe->file_index check sqe->file_index and sqe->zcrx_ifq_idx are aliased, so even though io_recvzc_prep() has all necessary handling and checking for ->zcrx_ifq_idx, it's already rejected a couple of lines above. It's not a real problem, however, as we can only have one ifq at the moment, which index is always zero, and it returns correct error codes to the user. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b51acedd326d1a87bf53e33303e6fc87661a3e3f.1745141261.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a79154ae5df9e21dbacb1eb77fad984fd4c45cca Author: Pavel Begunkov Date: Sun Apr 20 10:31:16 2025 +0100 io_uring/zcrx: move io_zcrx_iov_page We'll need io_zcrx_iov_page at the top to keep offset calculations closer together, move it there. Reviewed-by: David Wei Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/575617033a8b84a5985c7eb760b7121efdbe7e56.1745141261.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 37d26edd6bb4984849a71e21c6824c961fcd19db Author: Pavel Begunkov Date: Sun Apr 20 10:31:15 2025 +0100 io_uring/zcrx: remove duplicated freelist init Several lines below we already initialise the freelist, don't do it twice. Reviewed-by: David Wei Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/71b07c4e00d1db65899d1ed8d603d961fe7d1c28.1745141261.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit be6bad57b217491733754ae8113eec94a90a2769 Author: Pavel Begunkov Date: Sat Apr 19 18:47:06 2025 +0100 io_uring/rsrc: remove null check on import WARN_ON_ONCE() checking imu for NULL in io_import_fixed() is in the hot path and too protective, it's time to get rid of it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3782c01e311dbd474bca45aefaf79a2f2822fafb.1745083025.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9cebcf7b0c38bca1b501d8716163aa254b230559 Author: Pavel Begunkov Date: Sat Apr 19 18:47:05 2025 +0100 io_uring/rsrc: clean up io_coalesce_buffer() We don't need special handling for the first page in io_coalesce_buffer(), move it inside the loop. Signed-off-by: Pavel Begunkov Reviewed-by: Anuj Gupta Link: https://lore.kernel.org/r/ad698cddc1eadb3d92a7515e95bb13f79420323d.1745083025.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ea76925614189bdcb6571e2ea8de68af409ebd56 Author: Pavel Begunkov Date: Sat Apr 19 18:47:04 2025 +0100 io_uring/rsrc: use unpin_user_folio We want to have a full folio to be left pinned but with only one reference, for that we "unpin" all but the first page with unpin_user_pages(), which can be confusing. There is a new helper to achieve that called unpin_user_folio(), so use that. Signed-off-by: Pavel Begunkov Reviewed-by: Anuj Gupta Link: https://lore.kernel.org/r/e0b2be8f9ea68f6b351ec3bb046f04f437f68491.1745083025.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 033b667a823ee403509e7156bc7fa335bd566bff Author: Jens Axboe Date: Tue Apr 15 08:49:35 2025 -0600 block: blk-rq-qos: guard rq-qos helpers by static key Even if blk-rq-qos isn't used or configured, dipping into the queue to fetch ->rq_qos is a noticeable slowdown and visible in profiles. Add an unlikely static key around blk-rq-qos, to avoid fetching this cacheline if blk-iolatency or blk-wbt isn't configured or used. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 9b79f86e06283bad016df3dca0f2d4fd2a2c690c Author: Jens Axboe Date: Tue Apr 15 08:48:06 2025 -0600 block: ensure that struct blk_mq_alloc_data is fully initialized On x86, rep stos will be emitted to clear the the blk_mq_alloc_data struct, as not all members are being explicitly initialied. Depending on the type of CPU, this is a noticeable slowdown compared to just ensuring that the struct is fully initialized when setup. For the 4 spots that setup a struct blk_mq_alloc_data on the stack, ensure all members are being initialized. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit e093b784ab98ce5aff4cd81b1072987131facfba Author: Bart Van Assche Date: Tue Apr 15 13:51:34 2025 -0700 block: Simplify blk_mq_dispatch_rq_list() and its callers The 'nr_budgets' argument of blk_mq_dispatch_rq_list() is either the number of elements in the 'list' argument or zero. Instead of passing the number of list elements to blk_mq_dispatch_rq_list(), pass a boolean argument that indicates whether or not blk_mq_dispatch_rq_list() should request the block driver for a budget for each request in 'list'. Remove the code for counting list elements from blk_mq_dispatch_rq_list() callers where possible. Remove the code that decrements nr_budgets from blk_mq_dispatch_rq_list() because it is superfluous. Each request that is processed by blk_mq_dispatch_rq_list() is in one of these two states if 'get_budget' is false: * Either the request is on 'list' and the budget for the request has to be released from the error path. * Or the request is not on 'list' and q->mq_ops->queue_rq() has already released the budget (ret != BLK_STS_OK) or q->mq_ops->queue_rq() will release the budget asynchronously (ret == BLK_STS_OK). Cc: Christoph Hellwig Cc: Ming Lei Cc: John Garry Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250415205134.3650042-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 8a2dacd49f1d19f4e3a4ebc99d11622cafd1659e Author: Jens Axboe Date: Wed Apr 16 13:25:03 2025 -0600 io_uring/rsrc: remove node assignment helpers There are two helpers here, one assigns and increments the node ref count, and the other is simply a wrapper around that for the buffer node handling. The buffer node assignment benefits from checking and setting REQ_F_BUF_NODE together, otherwise stalls have been observed on setting that flag later in the process. Hence re-do it so that it's set when checked, and cleared in case of (unlikely) failure. With that, the buffer node helper can go, and then drop the generic io_req_assign_rsrc_node() helper as well as there's only a single user of it left at that point. Signed-off-by: Jens Axboe commit 53db8a71ecb42c2ec5e9c6925269a750255f9af5 Author: Jens Axboe Date: Fri Apr 4 14:50:59 2025 -0600 io_uring: add support for IORING_OP_PIPE This works just like pipe2(2), except it also supports fixed file descriptors. Used in a similar fashion as for other fd instantiating opcodes (like accept, socket, open, etc), where sqe->file_slot is set appropriately if two direct descriptors are desired rather than a set of normal file descriptors. sqe->addr must be set to a pointer to an array of 2 integers, which is where the fixed/normal file descriptors are copied to. sqe->pipe_flags contains flags, same as what is allowed for pipe2(2). Future expansion of per-op private flags can go in sqe->ioprio, like we do for other opcodes that take both a "syscall" flag set and an io_uring opcode specific flag set. Signed-off-by: Jens Axboe commit bd32923e5f02fa7b04d487ec265dc8080d27a257 Author: Pavel Begunkov Date: Mon Mar 31 17:18:02 2025 +0100 io_uring: don't store bgid in req->buf_index Pass buffer group id into the rest of helpers via struct buf_sel_arg and remove all reassignments of req->buf_index back to bgid. Now, it only stores buffer indexes, and the group is provided by callers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3ea9fa08113ecb4d9224b943e7806e80a324bdf9.1743437358.git.asml.silence@gmail.com Link: https://lore.kernel.org/io-uring/0c01d76ff12986c2f48614db8610caff8f78c869.1743500909.git.asml.silence@gmail.com/ [axboe: fold in patch from second link] Signed-off-by: Jens Axboe commit c0e965052149c883317774711205456d08285741 Author: Pavel Begunkov Date: Mon Mar 31 17:18:01 2025 +0100 io_uring/kbuf: pass bgid to io_buffer_select() The current situation with buffer group id juggling is not ideal. req->buf_index first stores the bgid, then it's overwritten by a buffer id, and then it can get restored back no recycling / etc. It's not so easy to control, and it's not handled consistently across request types with receive requests saving and restoring the bgid it by hand. It's a prep patch that adds a buffer group id argument to io_buffer_select(). The caller will be responsible for stashing a copy somewhere and passing it into the function. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a210d6427cc3f4f42271a6853274cd5a50e56820.1743437358.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e6f74fd67d50c8a938fcfa83c97cd06995f6aaa1 Author: Pavel Begunkov Date: Mon Mar 31 17:18:00 2025 +0100 io_uring: set IMPORT_BUFFER in generic send setup Move REQ_F_IMPORT_BUFFER to the common send setup. Currently, the only user is send zc, but we'll want for normal sends to support that in the future. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/18b74edfc61d8a1b6c9fed3b78a9276fe80f8ced.1743437358.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e9ff9ae103573c7393d80533214a567654987ed5 Author: Pavel Begunkov Date: Mon Mar 31 17:17:59 2025 +0100 io_uring/net: don't use io_do_buffer_select at prep Prep code is interested whether it's a selected buffer request, not whether a buffer has already been selected like what io_do_buffer_select() returns. Check for REQ_F_BUFFER_SELECT directly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4488a029ac698554bebf732263fe19d7734affa6.1743437358.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9fe99eed91e8273d3750367af759fe11e9512759 Author: Caleb Sander Mateos Date: Sat Mar 29 10:15:24 2025 -0600 io_uring/wq: avoid indirect do_work/free_work calls struct io_wq stores do_work and free_work function pointers which are called on each work item. But these function pointers are always set to io_wq_submit_work and io_wq_free_work, respectively. So remove these function pointers and just call the functions directly. Signed-off-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250329161527.3281314-1-csander@purestorage.com Signed-off-by: Jens Axboe commit c4044870ae2cb28d11ea771db165edb9e1a60702 Merge: 79beea2db04315 4ef4ac360101f8 Author: Christian Brauner Date: Thu Apr 17 11:03:52 2025 +0200 Merge patch series "two nits for path lookup" Mateusz Guzik says: Since path looku is being looked at, two extra nits from me: 1. some trivial jump avoidance in inode_permission() 2. but more importantly avoiding a memory access which is most likely a cache miss when descending into devcgroup_inode_permission() the file seems to have no maintainer fwiw anyhow I'm confident the way forward is to add IOP_FAST_MAY_EXEC (or similar) to elide inode_permission() in the common case to begin with. There are quite a few branches which straight up don't need execute. On top of that btrfs has a permission hook only to check for MAY_WRITE, which in case of path lookup is not set. With the above flag the call will be avoided. * patches from https://lore.kernel.org/20250416221626.2710239-1-mjguzik@gmail.com: device_cgroup: avoid access to ->i_rdev in the common case in devcgroup_inode_permission() fs: touch up predicts in inode_permission() Link: https://lore.kernel.org/20250416221626.2710239-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 79beea2db0431536d79fc5d321225fb42f955466 Author: Christian Brauner Date: Tue Apr 15 10:27:50 2025 +0200 fs: remove uselib() system call This system call has been deprecated for quite a while now. Let's try and remove it from the kernel completely. Link: https://lore.kernel.org/20250415-kanufahren-besten-02ac00e6becd@brauner Acked-by: Kees Cook Signed-off-by: Christian Brauner commit 4ef4ac360101f8bb11b6486ce60cd60ca015be8c Author: Mateusz Guzik Date: Thu Apr 17 00:16:26 2025 +0200 device_cgroup: avoid access to ->i_rdev in the common case in devcgroup_inode_permission() The routine gets called for every path component during lookup. ->i_mode is going to be cached on account of permission checks, while ->i_rdev is an area which is most likely cache-cold. gcc 14.2 is kind enough to emit one branch: movzwl (%rbx),%eax mov %eax,%edx and $0xb000,%dx cmp $0x2000,%dx je 11bc This patch is lazy in that I don't know if the ->i_rdev branch makes any sense with the newly added mode check upfront. I am not changing any semantics here though. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250416221626.2710239-3-mjguzik@gmail.com Signed-off-by: Christian Brauner commit d1f482108a2cff2b9c6ebebc40b157aaeb8213b3 Author: Zijun Hu Date: Tue Apr 15 20:25:00 2025 +0800 fs/fs_parse: Remove unused and problematic validate_constant_table() Remove validate_constant_table() since: - It has no caller. - It has below 3 bugs for good constant table array array[] which must end with a empty entry, and take below invocation for explaination: validate_constant_table(array, ARRAY_SIZE(array), ...) - Always return wrong value due to the last empty entry. - Imprecise error message for missorted case. - Potential NULL pointer dereference since the last pr_err() may use @tbl[i].name NULL pointer to print the last empty entry's name. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/20250415-fix_fs-v4-1-5d575124a3ff@quicinc.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 875ccc0ddceead3998d9ffd1e68f1290efa1f9a9 Author: Mateusz Guzik Date: Thu Apr 17 00:16:25 2025 +0200 fs: touch up predicts in inode_permission() The routine only encounters errors when people try to access things they can't, which is a negligible amount of calls. The only questionable bit might be the pre-existing predict around MAY_WRITE. Currently the routine is predominantly used for MAY_EXEC, so this makes some sense. I verified this straightens out the asm. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250416221626.2710239-2-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 296b67059e3026125a1ca942f5506e6ca051749e Author: Zijun Hu Date: Fri Apr 11 23:31:40 2025 +0800 fs/fs_parse: Delete macro fsparam_u32hex() Delete macro fsparam_u32hex() since: - it has no caller. - it uses as type @fs_param_is_u32_hex which is never defined, so will cause compile error when caller uses it. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/20250411-fix_fs-v2-1-5d3395c102e4@quicinc.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 8564124c36d6bf97199125dd542710c2814b4017 Author: Mateusz Guzik Date: Sat Apr 12 13:09:35 2025 +0200 fs: improve codegen in link_path_walk() Looking at the asm produced by gcc 13.3 for x86-64: 1. may_lookup() usage was not optimized for succeeding, despite the routine being inlined and rightfully starting with likely(!err) 2. the compiler assumed the path will have an indefinite amount of slashes to skip, after which the result will be an empty name As such: 1. predict may_lookup() succeeding 2. check for one slash, no explicit predicts. do roll forward with skipping more slashes while predicting there is only one 3. predict the path to find was not a mere slash This also has a side effect of shrinking the file: add/remove: 1/1 grow/shrink: 0/3 up/down: 934/-1012 (-78) Function old new delta link_path_walk - 934 +934 path_parentat 138 112 -26 path_openat 4864 4823 -41 path_lookupat 418 374 -44 link_path_walk.part.constprop 901 - -901 Total: Before=46639, After=46561, chg -0.17% Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250412110935.2267703-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit ef181fa11d9e09d3741525937d7bab4c5ab91ef7 Author: Li RongQing Date: Thu Apr 10 19:21:17 2025 +0800 fs: Make file-nr output the total allocated file handles Make file-nr output the total allocated file handles, not per-cpu cache number, it's more precise, and not in hot path Signed-off-by: Li RongQing Link: https://lore.kernel.org/20250410112117.2851-1-lirongqing@baidu.com Signed-off-by: Christian Brauner commit 6b24a702ecf167ab61456276bb72133d84ccca45 Author: Colin Ian King Date: Mon Apr 14 10:24:26 2025 +0100 select: core_sys_select add unlikely branch hint on return path Adding an unlikely() hint on the n < 0 comparison return path improves run-time performance of the select() system call, the negative value of n is very uncommon in normal select usage. Benchmarking on an Debian based Intel(R) Core(TM) Ultra 9 285K with a 6.15-rc1 kernel built with 14.2.0 using a select of 1000 file descriptors with zero timeout shows a consistent call reduction from 258 ns down to 254 ns, which is a ~1.5% performance improvement. Results based on running 25 tests with turbo disabled (to reduce clock freq turbo changes), with 30 second run per test and comparing the number of select() calls per second. The % standard deviation of the 25 tests was 0.24%, so results are reliable. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/20250414092426.53529-1-colin.i.king@gmail.com Signed-off-by: Christian Brauner commit 23ea3c70ee426b12ce033cf3107bc0dd312ea1d9 Author: Daisuke Matsuda Date: Mon Apr 21 11:51:01 2025 +0900 RDMA/rxe: Remove 32-bit architecture support Major linux distibutions have phased out support for 32-bit machines. Since rxe is primarily used for development and testing, the benefit of maintaining 32-bit support is minimal. This change simplifies ATOMIC WRITE implementations and improves maintainability of the driver. Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250421025101.3588139-1-matsuda-daisuke@fujitsu.com Signed-off-by: Leon Romanovsky commit ecd9ecc75d150b82a832eb7aaa9b7b983fea5271 Author: Niklas Cassel Date: Wed Apr 16 11:31:31 2025 +0200 ata: libata-sata: Use BIT() macro to convert tag to bit field The BIT() macro is commonly used in the kernel. Make use of it when converting a tag, fetched from the Successful NCQ Commands log or the NCQ Command Error log, to a bit field. This makes the code easier to read. Suggested-by: Igor Pylypiv Signed-off-by: Niklas Cassel Reviewed-by: Hannes Reinecke Reviewed-by: Igor Pylypiv Signed-off-by: Damien Le Moal commit f54464458d34141911047258090f25c67204cda4 Author: Niklas Cassel Date: Wed Apr 16 11:31:30 2025 +0200 ata: libata-sata: Simplify sense_valid fetching While the SENSE DATA VALID field in the ACS-6 specification is 47 bits, we are currently only fetching 32 bits, because these are the only bits that we care about (these bits represent the tags (which can be 0-31)). Thus, replace the existing logic with a simple get_unaligned_le32(). While at it, change the type of sense_valid to u32. Signed-off-by: Niklas Cassel Reviewed-by: Hannes Reinecke Reviewed-by: Igor Pylypiv Signed-off-by: Damien Le Moal commit e8866e26f5e8ec551eec73dca1c30d458f9dca86 Author: Heiner Kallweit Date: Fri Apr 11 07:59:09 2025 +0200 ata: libata-core: Simplify ata_print_version_once Use dev_dbg_once() instead of open-coding the once functionality. Signed-off-by: Heiner Kallweit Signed-off-by: Damien Le Moal commit 729f8eefdcadaff98606931e691910f17d8d59d6 Author: Damon Ding Date: Mon Mar 10 18:41:12 2025 +0800 drm/rockchip: analogix_dp: Add support for RK3588 RK3588 integrates the Analogix eDP 1.3 TX controller IP and the HDMI/eDP TX Combo PHY based on a Samsung IP block. There are also two independent eDP display interface with different address on RK3588 Soc. The patch currently adds only the basic support, specifically RGB output up to 4K@60Hz, without the tests for audio, PSR and other eDP 1.3 specific features. In additon, the above Analogix IP has always been utilized as eDP on Rockchip platform, despite its capability to also support the DP v1.2. Therefore, the newly added logs will contain the term 'edp' rather than 'dp'. And the newly added 'apb' reset control is to ensure the APB bus of eDP controller works well on the RK3588 SoC. Acked-by: Dmitry Baryshkov Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-12-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit 0e8b86b6df143662c631dee8bb3b1fff368aa18a Author: Damon Ding Date: Mon Mar 10 18:41:11 2025 +0800 drm/bridge: analogix_dp: Add support for RK3588 Expand enum analogix_dp_devtype with RK3588_EDP, and add max_link_rate and max_lane_count configs for it. Reviewed-by: Dmitry Baryshkov Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-11-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit f855146263b14abadd8d5bd0e280e54fbab3bd18 Author: Damon Ding Date: Mon Mar 10 18:41:10 2025 +0800 dt-bindings: display: rockchip: analogix-dp: Add support for RK3588 Compared with RK3288/RK3399, the HBR2 link rate support is the main improvement of RK3588 eDP TX controller, and there are also two independent eDP display interfaces on RK3588 Soc. The newly added 'apb' reset is to ensure the APB bus of eDP controller works well on the RK3588 SoC. Reviewed-by: Rob Herring (Arm) Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-10-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit d7b4936b2bc0987ccea125d9653381a1a0038d6d Author: Damon Ding Date: Mon Mar 10 18:41:09 2025 +0800 drm/rockchip: analogix_dp: Add support to get panel from the DP AUX bus Move drm_of_find_panel_or_bridge() a little later and combine it with component_add() into a new function rockchip_dp_link_panel(). The function will serve as done_probing() callback of devm_of_dp_aux_populate_bus(), aiding to support for obtaining the eDP panel via the DP AUX bus. If failed to get the panel from the DP AUX bus, it will then try the other way to get panel information through the platform bus. Reviewed-by: Dmitry Baryshkov Signed-off-by: Damon Ding Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250310104114.2608063-9-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit c8f0b7cb01eadef03558b21245357683409da438 Author: Damon Ding Date: Mon Mar 10 18:41:08 2025 +0800 drm/bridge: analogix_dp: Add support for &drm_dp_aux.wait_hpd_asserted() Add analogix_dpaux_wait_hpd_asserted() to help confirm the HPD state before doing AUX transfers. Signed-off-by: Damon Ding Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250310104114.2608063-8-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit e5e9fa9f7aad4ad7eedb6359baea9193531bf4ac Author: Damon Ding Date: Mon Mar 10 18:41:07 2025 +0800 drm/bridge: analogix_dp: Add support to get panel from the DP AUX bus The main modification is moving the DP AUX initialization from function analogix_dp_bind() to analogix_dp_probe(). In order to get the EDID of eDP panel during probing, it is also needed to advance PM operations to ensure that eDP controller and phy are prepared for AUX transmission. Signed-off-by: Damon Ding Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250310104114.2608063-7-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit fd073dffef041d6a2d11f00cd6cbd8ff46083396 Author: Damon Ding Date: Mon Mar 10 18:41:06 2025 +0800 drm/bridge: analogix_dp: Support to get &analogix_dp_device.plat_data and &analogix_dp_device.aux Add two new functions: one to find &analogix_dp_device.plat_data via &drm_dp_aux, and the other to get &analogix_dp_device.aux. Both of them serve for the function of getting panel from DP AUX bus, which is why they are included in a single commit. Reviewed-by: Dmitry Baryshkov Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-6-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit 46b0caaad3a5aed817a02b239d4cb4392c2a5dea Author: Damon Ding Date: Mon Mar 10 18:41:05 2025 +0800 dt-bindings: display: rockchip: analogix-dp: Add support to get panel from the DP AUX bus According to Documentation/devicetree/bindings/display/dp-aux-bus.yaml, it is a good way to get panel through the DP AUX bus. Acked-by: Krzysztof Kozlowski Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-5-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit 2c0883459ed62ac65784289e9236d673102eee68 Author: Damon Ding Date: Mon Mar 10 18:41:04 2025 +0800 drm/bridge: analogix_dp: Add support for phy configuration. Add support to configurate link rate, lane count, voltage swing and pre-emphasis with phy_configure(). It is helpful in application scenarios where analogix controller is mixed with the phy of other vendors. Reviewed-by: Dmitry Baryshkov Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-4-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit c71db051142a74b255cb61b84d8fedae3b70952f Author: Damon Ding Date: Mon Mar 10 18:41:03 2025 +0800 drm/bridge: analogix_dp: Remove CONFIG_PM related check in analogix_dp_bind()/analogix_dp_unbind() Remove the check related to CONFIG_PM in order to make the code more concise, as the CONFIG_PM should be a required option for many drivers. In addition, it is preferable to use devm_pm_runtime_enable() instead of manually invoking pm_runtime_enable() followed by pm_runtime_disable(). Suggested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-3-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit efab13e7d13a641a22c7508cde6e1a5285161944 Author: Damon Ding Date: Mon Mar 10 18:41:02 2025 +0800 drm/bridge: analogix_dp: Add irq flag IRQF_NO_AUTOEN instead of calling disable_irq() The IRQF_NO_AUTOEN can be used for the drivers that don't want interrupts to be enabled automatically via devm_request_threaded_irq(). Using this flag can provide be more robust compared to the way of calling disable_irq() after devm_request_threaded_irq() without the IRQF_NO_AUTOEN flag. Suggested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-2-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov commit c9e3129720104ce9f8fa556db9d83cb05e527bbb Author: Juerg Haefliger Date: Wed Apr 16 11:13:35 2025 +0200 arm64: dts: qcom: x1e80100-hp-omnibook-x14: Remove invalid bt-en-sleep node Remove the invalid bt-en-sleep node. Not sure how it came into existence but it seems the functionality is covered by the wcn-wlan-bt-en-state node: wcn_wlan_bt_en: wcn-wlan-bt-en-state { pins = "gpio116", "gpio117"; function = "gpio"; drive-strength = <2>; bias-disable; }; This fixes the following warning: arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dtb: pinctrl@f100000: Unevaluated properties are not allowed ('bt-en-sleep' was unexpected) from schema $id: http://devicetree.org/schemas/pinctrl/qcom,x1e80100-tlmm.yaml# Signed-off-by: Juerg Haefliger Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250416-fix-omnibook-dts-v1-1-2409220a7c6f@canonical.com Signed-off-by: Bjorn Andersson commit ab942705a87b7658304e630964d109c975e23380 Merge: 441ef8588c4608 f5b7564fedcfd3 Author: Bjorn Andersson Date: Sun Apr 20 11:34:51 2025 -0500 Merge branch 'arm32-for-6.15' into arm64-for-6.16 Changes queued for v6.15 would have had the potential to break bisectability and was therefor not accepted. Merge the whole set towards v6.16, as this is no longer a concern. commit d85080df12f33ad42a452a9998b21813b29daf35 Author: Dr. David Alan Gilbert Date: Sat Apr 19 14:27:25 2025 +0100 RDMA/rxe: Remove unused rxe_run_task rxe_run_task() has been unused since 2024's commit 23bc06af547f ("RDMA/rxe: Don't call direct between tasks") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250419132725.199785-1-linux@treblig.org Signed-off-by: Leon Romanovsky commit 1c7eec4d5f3b39cdea2153abaebf1b7229a47072 Author: Zhu Yanjun Date: Sat Apr 19 10:07:41 2025 +0200 RDMA/rxe: Fix "trying to register non-static key in rxe_qp_do_cleanup" bug Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 assign_lock_key kernel/locking/lockdep.c:986 [inline] register_lock_class+0x4a3/0x4c0 kernel/locking/lockdep.c:1300 __lock_acquire+0x99/0x1ba0 kernel/locking/lockdep.c:5110 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5823 __timer_delete_sync+0x152/0x1b0 kernel/time/timer.c:1644 rxe_qp_do_cleanup+0x5c3/0x7e0 drivers/infiniband/sw/rxe/rxe_qp.c:815 execute_in_process_context+0x3a/0x160 kernel/workqueue.c:4596 __rxe_cleanup+0x267/0x3c0 drivers/infiniband/sw/rxe/rxe_pool.c:232 rxe_create_qp+0x3f7/0x5f0 drivers/infiniband/sw/rxe/rxe_verbs.c:604 create_qp+0x62d/0xa80 drivers/infiniband/core/verbs.c:1250 ib_create_qp_kernel+0x9f/0x310 drivers/infiniband/core/verbs.c:1361 ib_create_qp include/rdma/ib_verbs.h:3803 [inline] rdma_create_qp+0x10c/0x340 drivers/infiniband/core/cma.c:1144 rds_ib_setup_qp+0xc86/0x19a0 net/rds/ib_cm.c:600 rds_ib_cm_initiate_connect+0x1e8/0x3d0 net/rds/ib_cm.c:944 rds_rdma_cm_event_handler_cmn+0x61f/0x8c0 net/rds/rdma_transport.c:109 cma_cm_event_handler+0x94/0x300 drivers/infiniband/core/cma.c:2184 cma_work_handler+0x15b/0x230 drivers/infiniband/core/cma.c:3042 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The root cause is as below: In the function rxe_create_qp, the function rxe_qp_from_init is called to create qp, if this function rxe_qp_from_init fails, rxe_cleanup will be called to handle all the allocated resources, including the timers: retrans_timer and rnr_nak_timer. The function rxe_qp_from_init calls the function rxe_qp_init_req to initialize the timers: retrans_timer and rnr_nak_timer. But these timers are initialized in the end of rxe_qp_init_req. If some errors occur before the initialization of these timers, this problem will occur. The solution is to check whether these timers are initialized or not. If these timers are not initialized, ignore these timers. Fixes: 8700e3e7c485 ("Soft RoCE driver") Reported-by: syzbot+4edb496c3cad6e953a31@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=4edb496c3cad6e953a31 Signed-off-by: Zhu Yanjun Link: https://patch.msgid.link/20250419080741.1515231-1-yanjun.zhu@linux.dev Signed-off-by: Leon Romanovsky commit 04039390cc3cb3d1e6ce6bb1680cbdfe117d6473 Author: Dr. David Alan Gilbert Date: Fri Apr 18 17:58:48 2025 +0100 RDMA/cma: Remove unused rdma_res_to_id The last use of rdma_res_to_id() was removed in 2020 by commi t211cd9459fda ("RDMA: Add dedicated CM_ID resource tracker function") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250418165848.241305-1-linux@treblig.org Signed-off-by: Leon Romanovsky commit f1652d76f4c51b5aefd14706eecbd70f05ca987a Author: Konstantin Taranov Date: Mon Apr 14 02:00:34 2025 -0700 RDMA/mana_ib: Add support of 4M, 1G, and 2G pages Check PF capability flag whether the 4M, 1G, and 2G pages are supported. Add these pages sizes to mana_ib, if supported. Define possible page sizes in enum gdma_page_type and remove unused enum atb_page_size. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1744621234-26114-4-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit 8f49682d94f3a12a6a3e636a07bbe57c80329d1d Author: Konstantin Taranov Date: Mon Apr 14 02:00:33 2025 -0700 RDMA/mana_ib: support of the zero based MRs Add IB_ZERO_BASED to the valid flags and use the corresponding MR creation request for the zero based memory. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1744621234-26114-3-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit 7d40ccf018694ae894b37d7e849cde116eb37627 Author: Konstantin Taranov Date: Mon Apr 14 02:00:32 2025 -0700 RDMA/mana_ib: Access remote atomic for MRs Add IB_ACCESS_REMOTE_ATOMIC to the valid flags for MRs and use the corresponding flag bit during MR creation in the HW. Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1744621234-26114-2-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit a7d824b2df0d8b9e19c334594cdbffab97ff8d66 Author: Niklas Cassel Date: Wed Apr 16 16:27:49 2025 +0200 PCI: rockchip-ep: Mark RK3399 as intx_capable RK3399 can raise INTx interrupts, as can be seen by rockchip_pcie_ep_send_intx_irq(). This is also in line with the register description of PCIE_CLIENT_LEGACY_INT_CTRL, section "17.6.3 PCIe Client Detail Register Description" of the RK3399 TRM. Thus, mark RK3399 as intx_capable. Signed-off-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250416142749.336298-2-cassel@kernel.org commit 6b7f49be74758a60b760d6c19a48f65a23511dbe Author: Alyssa Rosenzweig Date: Tue Apr 1 10:17:02 2025 +0100 dt-bindings: pci: apple,pcie: Add t6020 compatible string t6020 adds some register ranges compared to t8103, so requires a new compatible as well as the new PHY registers. Thanks to Mark and Rob for their helpful suggestions in updating the binding. Suggested-by: Mark Kettenis Suggested-by: Rob Herring Signed-off-by: Alyssa Rosenzweig [maz: added PHY registers, constraints] Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Acked-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Link: https://patch.msgid.link/20250401091713.2765724-3-maz@kernel.org commit 751bec089c4eed486578994abd2c5395f08d0302 Author: Janne Grunau Date: Tue Apr 1 10:17:01 2025 +0100 PCI: apple: Set only available ports up Iterating over disabled ports results in of_irq_parse_raw() parsing the wrong "interrupt-map" entries, as it takes the status of the node into account. This became apparent after disabling unused PCIe ports in the Apple Silicon device trees instead of deleting them. Switching from for_each_child_of_node_scoped() to for_each_available_child_of_node_scoped() solves this issue. Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up") Fixes: a0189fdfb73d ("arm64: dts: apple: t8103: Disable unused PCIe ports") Signed-off-by: Janne Grunau Signed-off-by: Alyssa Rosenzweig Signed-off-by: Marc Zyngier Signed-off-by: Manivannan Sadhasivam Tested-by: Janne Grunau Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Acked-by: Alyssa Rosenzweig Cc: stable@vger.kernel.org Link: https://lore.kernel.org/asahi/20230214-apple_dts_pcie_disable_unused-v1-0-5ea0d3ddcde3@jannau.net/ Link: https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/ Link: https://patch.msgid.link/20250401091713.2765724-2-maz@kernel.org commit 5da3d94a23c6c1ee1f896aeeb00965eacf1d0bb3 Author: Rob Herring (Arm) Date: Thu Nov 7 09:32:55 2024 -0600 PCI: mvebu: Use for_each_of_range() iterator for parsing "ranges" The mvebu "ranges" is a bit unusual with its own encoding of addresses, but it's still just normal "ranges" as far as parsing is concerned. Convert mvebu_get_tgt_attr() to use the for_each_of_range() iterator instead of open coding the parsing. Signed-off-by: Rob Herring (Arm) Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20241107153255.2740610-1-robh@kernel.org commit 178af54a678d08735233e070a9329651e1589587 Author: Krishna Chaitanya Chundru Date: Fri Mar 28 15:58:32 2025 +0530 PCI: Add lane equalization register offsets As per PCIe spec 6.0.1, add PCIe lane equalization register offset for data rates 8.0 GT/s, 32.0 GT/s and 64.0 GT/s. Also add a macro for defining data rate 64.0 GT/s physical layer capability ID. Signed-off-by: Krishna Chaitanya Chundru Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250328-preset_v6-v9-4-22cfa0490518@oss.qualcomm.com commit f9eb654fb194e7c404d4984481a18edb9b1c1d7c Author: Krishna Chaitanya Chundru Date: Fri Mar 28 15:58:31 2025 +0530 PCI: dwc: Update pci->num_lanes to maximum supported link width If the num-lanes property is not present in the devicetree, update pci->num_lanes with the hardware supported maximum link width using the newly introduced dw_pcie_link_get_max_link_width() API. The API is used to get the Maximum Link Width (MLW) of the controller. Signed-off-by: Krishna Chaitanya Chundru [mani: reworded commit message a bit] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250328-preset_v6-v9-3-22cfa0490518@oss.qualcomm.com commit 57a4591df70900252265ecfd6eeba95ce2021504 Author: Krishna Chaitanya Chundru Date: Fri Mar 28 15:58:30 2025 +0530 PCI: of: Add of_pci_get_equalization_presets() API PCIe equalization presets are predefined settings used to optimize signal integrity by compensating for signal loss and distortion in high-speed data transmission. As per PCIe spec 6.0.1 revision section 8.3.3.3 & 4.2.4 for data rates of 8.0 GT/s, 16.0 GT/s, 32.0 GT/s, and 64.0 GT/s, there is a way to configure lane equalization presets for each lane to enhance the PCIe link reliability. Each preset value represents a different combination of pre-shoot and de-emphasis values. For each data rate, different registers are defined: for 8.0 GT/s, registers are defined in section 7.7.3.4; for 16.0 GT/s, in section 7.7.5.9, etc. The 8.0 GT/s rate has an extra receiver preset hint, requiring 16 bits per lane, while the remaining data rates use 8 bits per lane. Based on the number of lanes and the supported data rate, of_pci_get_equalization_presets() reads the device tree property and stores in the presets structure. Signed-off-by: Krishna Chaitanya Chundru Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250328-preset_v6-v9-2-22cfa0490518@oss.qualcomm.com commit b584ab12d59f646b9254b2b16ff197d612fd4935 Author: Jerome Brunet Date: Fri Mar 28 15:30:44 2025 +0100 PCI: rcar-gen4: set ep BAR4 fixed size On rcar-gen4, the ep BAR4 has a fixed size of 256B. Document this constraint in the epc features of the platform. Fixes: e311b3834dfa ("PCI: rcar-gen4: Add endpoint mode support") Signed-off-by: Jerome Brunet Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250328-rcar-gen4-bar4-v1-1-10bb6ce9ee7f@baylibre.com commit cc9f71da538dce00dfdef08166f92ee315003356 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:11:02 2025 +0530 dt-bindings: PCI: qcom,pcie-sc8180x: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-20-2b70a7819d1e@linaro.org commit 37974556170cb0027d6c21b4080fc713e1ba1e9b Author: Manivannan Sadhasivam Date: Thu Feb 27 19:11:00 2025 +0530 dt-bindings: PCI: qcom: Allow IPQ6018 to use 8 MSI and one 'global' interrupt IPQ6018 has 8 MSI SPI and one 'global' interrupt. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-18-2b70a7819d1e@linaro.org commit 90fe2c27577d0914a00787e99d9163d87a8011f6 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:58 2025 +0530 dt-bindings: PCI: qcom: Allow IPQ8074 to use 8 MSI and one 'global' interrupt IPA8074 has 8 MSI SPI and one 'global' interrupt. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-16-2b70a7819d1e@linaro.org commit c9dc3a0996608969fe00eeb78bf98e2bed5fca41 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:56 2025 +0530 dt-bindings: PCI: qcom: Allow MSM8998 to use 8 MSI and one 'global' interrupt MSM8998 has 8 MSI SPI and one 'global' interrupt. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-14-2b70a7819d1e@linaro.org commit ff9be267fee89de9d9972677739396445d2d2499 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:53 2025 +0530 dt-bindings: PCI: qcom: Add 'global' interrupt for SDM845 SoC 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-11-2b70a7819d1e@linaro.org commit 54340357c0096aa2e10036c88c9a4cd9048306f9 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:51 2025 +0530 dt-bindings: PCI: qcom,pcie-sc7280: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-9-2b70a7819d1e@linaro.org commit 236d500c67e26ab3a7b58d4a90fde182f7c57279 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:49 2025 +0530 dt-bindings: PCI: qcom,pcie-sa8775p: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-7-2b70a7819d1e@linaro.org commit 985b22d2f88cba382345b373322b669d75ec50fc Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:47 2025 +0530 dt-bindings: PCI: qcom,pcie-sm8350: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-5-2b70a7819d1e@linaro.org commit bfc1752fbbe78cbe10976e5beb52311043a38173 Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:45 2025 +0530 dt-bindings: PCI: qcom,pcie-sm8250: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-3-2b70a7819d1e@linaro.org commit 494b26086f75835722bf8ccb9312bda814a9cb4d Author: Manivannan Sadhasivam Date: Thu Feb 27 19:10:43 2025 +0530 dt-bindings: PCI: qcom,pcie-sm8150: Add 'global' interrupt 'global' interrupt is used to receive PCIe controller and link specific events. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250227-pcie-global-irq-v1-1-2b70a7819d1e@linaro.org commit c7540e5423d7f588c7210a9941ceb6a836963ccc Author: Jensen Huang Date: Fri Mar 28 18:58:22 2025 +0800 PCI: rockchip: Fix order of rockchip_pci_core_rsts The order of rockchip_pci_core_rsts introduced in the offending commit followed the previous comment that warned not to reorder them. But the commit failed to take into account that reset_control_bulk_deassert() deasserts the resets in reverse order. So this leads to the link getting downgraded to 2.5 GT/s. Hence, restore the deassert order and also add back the comments for rockchip_pci_core_rsts. Tested on NanoPC-T4 with Samsung 970 Pro. Fixes: 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function") Signed-off-by: Jensen Huang [mani: reworded the commit message and the comment above rockchip_pci_core_rsts] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Acked-by: Shawn Lin Link: https://patch.msgid.link/20250328105822.3946767-1-jensenhuang@friendlyarm.com commit 96609a1969f4ade45351ec368c65580c77592e8b Author: Danilo Krummrich Date: Mon Apr 14 15:18:08 2025 +0200 samples: rust: add Rust auxiliary driver sample Add a sample Rust auxiliary driver based on a PCI driver for QEMU's "pci-testdev" device. The PCI driver only registers an auxiliary device, in order to make the corresponding auxiliary driver probe. Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250414131934.28418-6-dakr@kernel.org [ Use `ok_or()` when accessing auxiliary::Device::parent(). - Danilo ] Signed-off-by: Danilo Krummrich commit 6d1724ec864b577b50fa9cf668e80390767f4136 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:25 2025 +0200 tools/nolibc: move wait() and friends to sys/wait.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-10-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit ffb94910c3fff8d9528e62d45171cabbb1cc083a Author: Thomas Weißschuh Date: Wed Apr 16 14:06:24 2025 +0200 tools/nolibc: add sys/types.h shim This is the location regular userspace expects the header. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-9-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit face777a442bfb07017adf935dbb738a3504fdd2 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:23 2025 +0200 tools/nolibc: move gettimeofday() to sys/time.h This is the location regular userspace expects this definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-8-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit 0fd55773f47124ee27a1d201bb07649a056c58cc Author: Thomas Weißschuh Date: Wed Apr 16 14:06:22 2025 +0200 tools/nolibc: move syscall() to sys/syscall.h This is the location regular userspace expects the definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-7-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit c6e6c2c4d71035038d0ef07a465190cd35e193e8 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:21 2025 +0200 tools/nolibc: move stat() and friends to sys/stat.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-6-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit cce273161e7895f45208066154d6726bedba35e5 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:20 2025 +0200 tools/nolibc: move mmap() and friends to sys/mman.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-5-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit 9e67941dde6e7f2b0e46ca8e2c87d3fb12e5ead5 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:19 2025 +0200 tools/nolibc: move getauxval() to sys/auxv.h This is the location regular userspace expects the definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-4-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit ecc091d93a221b8541c94aeeeb741e9e1c39073f Author: Thomas Weißschuh Date: Wed Apr 16 14:06:18 2025 +0200 tools/nolibc: move open() and friends to fcntl.h This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-3-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit 2b45ceb915b004799e79f4ff68e63b7f88a7d195 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:17 2025 +0200 tools/nolibc: add elf.h The UAPI header do already provide an elf.h implementation. Reexport it under its libc name. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-2-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit 060525302ba9ee56dfbcb4149395a1e510a4ced9 Author: Thomas Weißschuh Date: Wed Apr 16 14:06:16 2025 +0200 tools/nolibc: prepare for headers in subdirectories To support headers in subdirectories (like sys/), their subdirectory needs to be preserved during installation into the sysroot. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-1-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh commit 8509b5c9fa981f7e17874605af86d26159310d3c Author: Thomas Weißschuh Date: Sat Apr 19 12:46:24 2025 +0200 selftests/nolibc: enable UBSAN if available UBSAN detects undefined behaviour at runtime. To avoid introduction of new UB, enable UBSAN for nolibc-test. By signalling detected errors through traps no runtime dependency is necessary. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-7-060b8a016917@weissschuh.net commit 6478251f95121ae4b66e987c98482e0d0b149e5d Author: Thomas Weißschuh Date: Sat Apr 19 12:46:23 2025 +0200 selftests/nolibc: disable ubsan for smash_stack() smash_stack() intentionally crashes. Prevent UBSAN from tripping over it. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-6-060b8a016917@weissschuh.net commit 4d231a7df1a85c7572b67a4666cb73adb977fbf6 Author: Thomas Weißschuh Date: Sat Apr 19 12:46:22 2025 +0200 tools/nolibc: fix integer overflow in i{64,}toa_r() and In twos complement the most negative number can not be negated. Fixes: b1c21e7d99cd ("tools/nolibc/stdlib: add i64toa() and u64toa()") Fixes: 66c397c4d2e1 ("tools/nolibc/stdlib: replace the ltoa() function with more efficient ones") Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-5-060b8a016917@weissschuh.net commit 0e75768ba24d669dbf76530e21fd51cfe2fbd2a9 Author: Thomas Weißschuh Date: Sat Apr 19 12:46:21 2025 +0200 tools/nolibc: properly align dirent buffer As byte buffer is overlaid with a 'struct dirent64'. it has to satisfy the structs alignment requirements. Signed-off-by: Thomas Weißschuh Fixes: 665fa8dea90d ("tools/nolibc: add support for directory access") Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-4-060b8a016917@weissschuh.net commit 9fca5554af70fd86fb1ed78362d86ebd1a4be2ef Author: Thomas Weißschuh Date: Sat Apr 19 12:46:20 2025 +0200 tools/nolibc: disable function sanitizer for _start_c() Both constructors and main() may be executed with different function signatures than they are actually using. This is intentional but trips up UBSAN. Disable the function sanitizer of UBSAN in _start_c(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-3-060b8a016917@weissschuh.net commit f4152715dcd5c580dca6ea628ec03785bba44b9a Author: Thomas Weißschuh Date: Sat Apr 19 12:46:19 2025 +0200 tools/nolibc: add __nolibc_aligned() and __nolibc_aligned_as() Provide a convenience macro around __attribute__((aligned)). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-2-060b8a016917@weissschuh.net commit 8399f14666688be8d84cb3ccbec6ee790c020b36 Author: Thomas Weißschuh Date: Sat Apr 19 12:46:18 2025 +0200 tools/nolibc: add __nolibc_has_feature() Certain compiler features are signaled via the __has_feature() preprocessor builtin. Add a nolibc wrapper for it, similar to __nolibc_has_attribute(). Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-1-060b8a016917@weissschuh.net commit 464dc75dfe6a08607aa8896032f19f35486d4c53 Merge: dead17b1a26fd8 589a7c406a721f Author: Rafael J. Wysocki Date: Sat Apr 19 12:49:00 2025 +0200 Merge back earlier cpufreq material for 6.16 commit 0d1803d25f8c7586beb3843c8efbb83f24ce2539 Author: Danilo Krummrich Date: Mon Apr 14 15:18:07 2025 +0200 rust: auxiliary: add auxiliary registration Implement the `auxiliary::Registration` type, which provides an API to create and register new auxiliary devices in the system. Acked-by: Greg Kroah-Hartman Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250414131934.28418-5-dakr@kernel.org Signed-off-by: Danilo Krummrich commit ce735e73dd59b169b877cedd0753297c81c2a091 Author: Danilo Krummrich Date: Mon Apr 14 15:18:06 2025 +0200 rust: auxiliary: add auxiliary device / driver abstractions Implement the basic auxiliary abstractions required to implement a driver matching an auxiliary device. The design and implementation is analogous to PCI and platform and is based on the generic device / driver abstractions. Acked-by: Greg Kroah-Hartman Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250414131934.28418-4-dakr@kernel.org [ Fix typos, `let _ =` => `drop()`, use `kernel::ffi`. - Danilo ] Signed-off-by: Danilo Krummrich commit a4c9f71e3440dc6e944fa05bb7fcb3949fe5bcd4 Author: Danilo Krummrich Date: Mon Apr 14 15:18:05 2025 +0200 rust: device: implement Device::parent() Device::parent() returns a reference to the device' parent device, if any. Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250414131934.28418-3-dakr@kernel.org Signed-off-by: Danilo Krummrich commit 9647b6c5095aa54701df009a7335d07013cd13c4 Author: Danilo Krummrich Date: Mon Apr 14 15:18:04 2025 +0200 rust: types: add `Opaque::zeroed` Analogous to `Opaque::uninit` add `Opaque::zeroed`, which sets the corresponding memory to zero. In contrast to `Opaque::uninit`, the corresponding value, depending on its type, may be initialized. Acked-by: Greg Kroah-Hartman Reviewed-by: Alice Ryhl Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250414131934.28418-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit a38dfd60fe53a46a93517f02a061bb34c47946dc Author: Danilo Krummrich Date: Fri Mar 21 22:47:55 2025 +0100 rust: platform: impl TryFrom<&Device> for &platform::Device Implement TryFrom<&device::Device> for &Device. This allows us to get a &platform::Device from a generic &Device in a safe way; the conversion fails if the device' bus type does not match with the platform bus type. Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250321214826.140946-4-dakr@kernel.org [ Support device context types, use dev_is_platform() helper. - Danilo ] Signed-off-by: Danilo Krummrich commit a095d0d1e4849ee25c28d43d713a8f433d7f1f27 Author: Danilo Krummrich Date: Fri Mar 21 22:47:54 2025 +0100 rust: pci: impl TryFrom<&Device> for &pci::Device Implement TryFrom<&device::Device> for &Device. This allows us to get a &pci::Device from a generic &Device in a safe way; the conversion fails if the device' bus type does not match with the PCI bus type. Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250321214826.140946-3-dakr@kernel.org [ Support device context types, use dev_is_pci() helper. - Danilo ] Signed-off-by: Danilo Krummrich commit cfec9a16e6800b5489bd361f6b6ea9af65fb1050 Merge: f5b444361435bf 7bd1710aac0571 Author: Danilo Krummrich Date: Sat Apr 19 10:10:40 2025 +0200 Merge tag 'topic/device-context-2025-04-17' into nova-next Introduce "Bound" device context Introduce the "Bound" device context, such that it can be ensured to only ever pass a bound device to APIs that require this precondition. [1] This tag exists to share the patches from [1] between multiple trees. [1] https://lore.kernel.org/lkml/20250413173758.12068-1-dakr@kernel.org/ commit 8117b017f3826b18a426f22de1e001767bc50fd3 Merge: 9bec944506faf1 7bd1710aac0571 Author: Danilo Krummrich Date: Sat Apr 19 10:06:55 2025 +0200 Merge tag 'topic/device-context-2025-04-17' into driver-core-next Introduce "Bound" device context Introduce the "Bound" device context, such that it can be ensured to only ever pass a bound device to APIs that require this precondition. [1] This tag exists to share the patches from [1] between multiple trees. [1] https://lore.kernel.org/lkml/20250413173758.12068-1-dakr@kernel.org/ commit 69120f8228297715e0d1d40d2f636ebbff60b543 Author: Honglei Wang Date: Fri Apr 18 11:26:03 2025 +0800 sched_ext: add helper for refill task with default slice Add helper for refilling task with default slice and event statistics accordingly. Signed-off-by: Honglei Wang Acked-by: Changwoo Min Acked-by: Andrea Righi Signed-off-by: Tejun Heo commit f203683c3e8d457acdb8bb4eddc29a31af1c77fd Author: Honglei Wang Date: Fri Apr 18 11:26:02 2025 +0800 sched_ext: change the variable name for slice refill event SCX_EV_ENQ_SLICE_DFL gives the impression that the event only occurs when the tasks were enqueued, which seems not accurate. What it actually means is the refilling with defalt slice, and this can occur either when enqueue or pick_task. Let's change the variable to SCX_EV_REFILL_SLICE_DFL. Signed-off-by: Honglei Wang Acked-by: Changwoo Min Acked-by: Andrea Righi Signed-off-by: Tejun Heo commit bb9c648b334be581a791c7669abaa594e4b5ebb7 Author: Eric Biggers Date: Thu Apr 17 21:00:17 2025 -0700 crypto: lib/poly1305 - restore ability to remove modules Though the module_exit functions are now no-ops, they should still be defined, since otherwise the modules become unremovable. Fixes: 1f81c58279c7 ("crypto: arm/poly1305 - remove redundant shash algorithm") Fixes: f4b1a73aec5c ("crypto: arm64/poly1305 - remove redundant shash algorithm") Fixes: 378a337ab40f ("crypto: powerpc/poly1305 - implement library instead of shash") Fixes: 21969da642a2 ("crypto: x86/poly1305 - remove redundant shash algorithm") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8821d26926ea6c1115974a989ec5a467da402f4f Author: Eric Biggers Date: Thu Apr 17 20:59:09 2025 -0700 crypto: lib/chacha - restore ability to remove modules Though the module_exit functions are now no-ops, they should still be defined, since otherwise the modules become unremovable. Fixes: 08820553f33a ("crypto: arm/chacha - remove the redundant skcipher algorithms") Fixes: 8c28abede16c ("crypto: arm64/chacha - remove the skcipher algorithms") Fixes: f7915484c020 ("crypto: powerpc/chacha - remove the skcipher algorithms") Fixes: ceba0eda8313 ("crypto: riscv/chacha - implement library instead of skcipher") Fixes: 632ab0978f08 ("crypto: x86/chacha - remove the skcipher algorithms") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 31b20bc22f6897a881059c0c85635966e0fd23a5 Author: Herbert Xu Date: Fri Apr 18 10:52:34 2025 +0800 crypto: acomp - Add missing return statements in compress/decompress The return statements were missing which causes REQ_CHAIN algorithms to execute twice for every request. Reported-by: Eric Biggers Fixes: 64929fe8c0a4 ("crypto: acomp - Remove request chaining") Signed-off-by: Herbert Xu commit 1e5c9b1efa1c37ef3fc5c67b1c6e7025ec7b2330 Author: Romain Gantois Date: Thu Mar 6 17:23:30 2025 +0100 misc: add FPC202 dual port controller driver The TI FPC202 dual port controller serves as a low-speed signal aggregator for common port types such as SFP, QSFP, Mini-SAS HD, and others. It aggregates GPIO and I2C signals across two downstream ports, acting as both a GPIO controller and an I2C address translator for up to two logical devices per port. Reviewed-by: Linus Walleij Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Greg Kroah-Hartman Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit c3f55241882bd5b4bc84dbe77d2efd0d9574ed9c Author: Romain Gantois Date: Thu Mar 6 17:23:29 2025 +0100 i2c: Support dynamic address translation The i2c-atr module keeps a list of associations between I2C client aliases and I2C addresses. This represents the address translation table which is programmed into an ATR channel at any given time. This list is only updated when a new client is bound to the channel. However in some cases, an ATR channel can have more downstream clients than available aliases. One example of this is an SFP module that is bound to an FPC202 port. The FPC202 port can only access up to two logical I2C addresses. However, the SFP module may expose up to three logical I2C addresses: its EEPROM on 7-bit addresses 0x50 and 0x51, and a PHY transceiver on address 0x56. In cases like these, it is necessary to reconfigure the channel's translation table on the fly, so that all three I2C addresses can be accessed when needed. As there are currently no known ATR's which do not support dynamic address translation, this feature can be enabled by default without breaking existing use cases. Modify the i2c-atr module to provide on-the-fly address translation. This is achieved by modifying an ATR channel's translation table whenever an I2C transaction with unmapped clients is requested. Add a mutex to protect alias_list. This prevents i2c_atr_dynamic_attach/detach_addr from racing with the bus notifier handler to modify alias_list. Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 328a106ce0e8d0596d2b020b6f83efd0c859b084 Author: Romain Gantois Date: Thu Mar 6 17:23:28 2025 +0100 i2c: support per-channel ATR alias pools Some I2C address translators (ATRs) assign each of their remote peripheral aliases to a specific channel. To properly handle these devices, add support for having separate alias pools for each ATR channel. This is achieved by allowing callers of i2c_atr_add_adapter to pass an optional alias list. If present, this list will be used to populate the channel's alias pool. Otherwise, the common alias pool will be used. Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit db1962c94dab207e5db5eeb7fdaa8e5f9c60d00e Author: Romain Gantois Date: Thu Mar 6 17:23:27 2025 +0100 i2c: rename field 'alias_list' of struct i2c_atr_chan to 'alias_pairs' The "alias_list" field of struct i2c_atr_chan describes translation table entries programmed in the ATR channel. This terminology will become more confusing when per-channel alias pool support is introduced, as struct i2c_atr_chan will gain a new field called "alias_pool", which will describe aliases which are available to the ATR channel. Rename the "alias_list" field to "alias_pairs" to clearly distinguish it from the future "alias_pool" field. No functional change is intended. Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 24960bd0a19d933ae07c081e6efce0a4b77fa4b7 Author: Romain Gantois Date: Thu Mar 6 17:23:26 2025 +0100 i2c: move ATR alias pool to a separate struct Each I2C address translator (ATR) has a pool of client aliases which can be used as translation targets. Some ATRs have a single alias pool shared by all downstream channels, while others have a separate alias pool for each channel. Currently, this alias pool is represented by the "aliases", "num_aliases", and "use_mask" fields of struct i2c_atr. In preparation for adding per-channel alias pool support, move the "aliases", "num_aliases", "use_mask" and associated lock to a new struct called "struct alias_pool". Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 818bd489f137e9257d701c0d4bf11efdfd02ca5f Author: Romain Gantois Date: Thu Mar 6 17:23:25 2025 +0100 i2c: use client addresses directly in ATR interface The I2C Address Translator (ATR) module defines mappings from i2c_client structs to aliases. However, only the physical address of each i2c_client struct is actually relevant to the workings of the ATR module. Moreover, some drivers require address translation functionality but do not allocate i2c_client structs, accessing the adapter directly instead. The SFP subsystem is an example of this. Replace the "i2c_client" field of the i2c_atr_alias_pair struct with a u16 "addr" field. Rewrite helper functions and callbacks as needed. Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 3ec29d51b546f69de0b0d10642c9aaaf5e3704eb Author: Romain Gantois Date: Thu Mar 6 17:23:24 2025 +0100 media: i2c: ds90ub960: Protect alias_use_mask with a mutex The aliased_addrs list represents the occupation of an RX port's hardware alias table. This list and the underlying hardware table are only accessed in the attach/detach_client() callbacks. These functions are only called from a bus notifier handler in i2c-atr.c, which is always called with the notifier chain's semaphore held. This indirectly prevents concurrent access to the aliased_addrs list. However, more explicit and direct locking is preferable. Moreover, with the introduction of dynamic address translation in a future patch, the attach/detach_client() callbacks will be called from outside of the notifier chain's read section. Introduce a mutex to protect access to the aliased_addrs list and its underlying hardware table. Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 666be28145afbcde4a1223e6bc398664abdf8bec Author: Romain Gantois Date: Thu Mar 6 17:23:23 2025 +0100 media: i2c: ds90ub960: Replace aliased clients list with address list The ds90ub960 driver currently uses a list of i2c_client structs to keep track of used I2C address translator (ATR) alias slots for each RX port. Keeping these i2c_client structs in the alias slot list isn't actually needed, the driver only needs to know the client address for each slot. Convert the aliased_clients list to a list of aliased client addresses. This will allow removing the "client" parameter from the i2c-atr callbacks in a future patch. Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 35c6e493bd54fcc92ca4e4d15e2a8e365ba4dde4 Author: Romain Gantois Date: Thu Mar 6 17:23:22 2025 +0100 dt-bindings: misc: Describe TI FPC202 dual port controller The FPC202 dual port controller serves as a low speed signal aggregator for common port types, notably SFP. It provides access to I2C and low-speed GPIO signals of a downstream device through a single upstream control interface. Up to two logical I2C addresses can be accessed on each of the FPC202's ports. The port controller acts as an I2C translator (ATR). It converts addresses of incoming and outgoing I2C transactions. One use case of this is accessing two SFP modules at logical address 0x50 from the same upstream I2C controller, using two different client aliases. Reviewed-by: Conor Dooley Tested-by: Tomi Valkeinen Signed-off-by: Romain Gantois Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 92d8c028aa924286f10ac75b7f9e8edfc9ed432b Author: Robert Nelson Date: Tue Apr 15 17:59:40 2025 -0500 arm64: dts: ti: Add k3-am62-pocketbeagle2 BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. Its dual or quad A53 cores can provide higher performance than classic PocketBeagle. The new design comes with pre-soldered headers, a 3-pin JST-SH 1.00mm UART debug port, a USB-C port, Texas Instruments MSPM0L1105 Cortex-M0+ MCU for ADC, 512MB RAM, and a LiPo Battery charger. MSPM0L1105 firmware source: https://openbeagle.org/pocketbeagle/mspm0-adc-eeprom * EEPROM 24c32 emulation * ADC ad7291 emulation https://www.beagleboard.org/boards/pocketbeagle-2 https://openbeagle.org/pocketbeagle/pocketbeagle-2 Signed-off-by: Robert Nelson Tested-by: Dhruva Gole Reviewed-by: Bryan Brattlof Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20250415225940.3899486-2-robertcnelson@gmail.com Signed-off-by: Nishanth Menon commit 3a5ff313ac521ff034f07ea6687ffb3f2229d62a Author: Robert Nelson Date: Tue Apr 15 17:59:39 2025 -0500 dt-bindings: arm: ti: Add PocketBeagle2 This board is based on ti,am625 family using the am6232 and am6254 variations. https://www.beagleboard.org/boards/pocketbeagle-2 https://openbeagle.org/pocketbeagle/pocketbeagle-2 Signed-off-by: Robert Nelson Reviewed-by: Dhruva Gole Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250415225940.3899486-1-robertcnelson@gmail.com Signed-off-by: Nishanth Menon commit c026c5e6ed9323304b88bbb2feb6f039eca114d0 Author: Francesco Dolcini Date: Tue Apr 8 22:26:55 2025 +0200 arm64: dts: ti: k3-am625-verdin: Add EEPROM compatible fallback According to the AT24 EEPROM bindings the compatible string should contain first the actual manufacturer, and second the corresponding atmel model. Add the atmel compatible fallback accordingly. Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20250408202655.6329-1-francesco@dolcini.it Signed-off-by: Nishanth Menon commit bdd158389dac25ff36e041ff28591aca769f403c Author: Michael Walle Date: Tue Apr 1 10:32:46 2025 +0200 arm64: dts: ti: k3-am62p-j722s: Add rng node Add the node for the random number generator inside the crypto module. Marked reserved since the default usage is with the RNG node being controlled by OP-TEE. Signed-off-by: Michael Walle Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250401083246.3228964-1-mwalle@kernel.org Signed-off-by: Nishanth Menon commit 4e7ad3b4464571d7bec6869944151b27cce44435 Author: Andrew Davis Date: Wed Apr 2 17:02:01 2025 +0530 arm64: dts: ti: k3-am64: Add PCIe ctrl node to main_conf region This region is used for controlling the function of the PCIe IP. It is compatible with "ti,j784s4-pcie-ctrl", add this here and use it with the PCIe node. Signed-off-by: Andrew Davis [j-choudhary@ti.com: Add changes to k3-am642-evm-pcie0-ep.dtso] Signed-off-by: Jayesh Choudhary Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20250402113201.151195-6-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit 755e47a71f9dbfbdb33fc18d20a74b7804a20acf Author: Andrew Davis Date: Wed Apr 2 17:02:00 2025 +0530 arm64: dts: ti: k3-j721s2: Add PCIe ctrl node to scm_conf region This region is used for controlling the function of the PCIe IP. It is compatible with "ti,j784s4-pcie-ctrl", add this here and use it with the PCIe node. Signed-off-by: Andrew Davis [j-choudhary@ti.com: Add changes to k3-am68-sk-base-board-pcie1-ep.dtso] Signed-off-by: Jayesh Choudhary Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20250402113201.151195-5-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit 1f326fb84a6074772f01dc63ed4d3eb791682479 Author: Andrew Davis Date: Wed Apr 2 17:01:59 2025 +0530 arm64: dts: ti: k3-j7200: Add PCIe ctrl node to scm_conf region This region is used for controlling the function of the PCIe IP. It is compatible with "ti,j784s4-pcie-ctrl", add this here and use it with the PCIe node. Signed-off-by: Andrew Davis [j-choudhary@ti.com: Add changes to k3-j7200-evm-pcie1-ep.dtso] Signed-off-by: Jayesh Choudhary Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20250402113201.151195-4-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit df2210b2da139e3a733bd7bd1406cd74d39d59a7 Author: Andrew Davis Date: Wed Apr 2 17:01:58 2025 +0530 arm64: dts: ti: k3-j721e: Add PCIe ctrl node to scm_conf region This region is used for controlling the function of the PCIe IP. It is compatible with "ti,j784s4-pcie-ctrl", add this here and use it with the PCIe nodes. Signed-off-by: Andrew Davis [j-choudhary@ti.com: Add changes to k3-j721e-evm-pcie1-ep.dtso] Signed-off-by: Jayesh Choudhary Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20250402113201.151195-3-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit c574db0b68a600f9548f0ef7bcba723562713587 Author: Andrew Davis Date: Wed Apr 2 17:01:57 2025 +0530 dt-bindings: soc: ti: ti,j721e-system-controller: Add PCIe ctrl property Add a pattern property for pcie-ctrl which can be part of this controller. Signed-off-by: Andrew Davis [j-choudhary@ti.com: Change description and add example] Signed-off-by: Jayesh Choudhary Reviewed-by: Siddharth Vadapalli Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250402113201.151195-2-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit b22cc402d38774ccc552d18e762c25dde02f7be0 Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:28 2025 +0530 arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in OV5640 overlay The OV5640 device tree overlay incorrectly defined an I2C switch instead of an I2C mux. According to the DT bindings, the correct terminology and node definition should use "i2c-mux" instead of "i2c-switch". Hence, update the same to avoid dtbs_check warnings. Fixes: 635ed9715194 ("arm64: dts: ti: k3-am62x: Add overlays for OV5640") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Neha Malcom Francis Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20250415111328.3847502-8-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 7b75dd2029ee01a8c11fcf4d97f3ccebbef9f8eb Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:27 2025 +0530 arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in IMX219 overlay The IMX219 device tree overlay incorrectly defined an I2C switch instead of an I2C mux. According to the DT bindings, the correct terminology and node definition should use "i2c-mux" instead of "i2c-switch". Hence, update the same to avoid dtbs_check warnings. Fixes: 4111db03dc05 ("arm64: dts: ti: k3-am62x: Add overlay for IMX219") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Neha Malcom Francis Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20250415111328.3847502-7-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit c68ab54a89a8c935732589a35ea2596e2329f167 Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:26 2025 +0530 arm64: dts: ti: k3-am62x: Remove clock-names property from IMX219 overlay The IMX219 sensor device tree bindings do not include a clock-names property. Remove the incorrectly added clock-names entry to avoid dtbs_check warnings. Fixes: 4111db03dc05 ("arm64: dts: ti: k3-am62x: Add overlay for IMX219") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Neha Malcom Francis Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20250415111328.3847502-6-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit c6a20a250200da6fcaf80fe945b7b92cba8cfe0f Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:25 2025 +0530 arm64: dts: ti: k3-j721e-sk: Add requiried voltage supplies for IMX219 The device tree overlay for the IMX219 sensor requires three voltage supplies to be defined: VANA (analog), VDIG (digital core), and VDDL (digital I/O). Add the corresponding voltage supply definitions to avoid dtbs_check warnings. Fixes: f767eb918096 ("arm64: dts: ti: k3-j721e-sk: Add overlay for IMX219") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Link: https://lore.kernel.org/r/20250415111328.3847502-5-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 24ab76e55ef15450c6681a2b5db4d78f45200939 Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:24 2025 +0530 arm64: dts: ti: k3-j721e-sk: Remove clock-names property from IMX219 overlay The IMX219 sensor device tree bindings do not include a clock-names property. Remove the incorrectly added clock-names entry to avoid dtbs_check warnings. Fixes: f767eb918096 ("arm64: dts: ti: k3-j721e-sk: Add overlay for IMX219") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Neha Malcom Francis Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20250415111328.3847502-4-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 7edf0a4d3bb7f5cd84f172b76c380c4259bb4ef8 Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:23 2025 +0530 arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy Update the vin-supply of the TLV71033 regulator from LM5141 (vsys_3v3) to LM61460 (vsys_5v0) to match the schematics. Add a fixed regulator node for the LM61460 5V supply to support this change. AM68-SK schematics: https://www.ti.com/lit/zip/sprr463 Fixes: a266c180b398 ("arm64: dts: ti: k3-am68-sk: Add support for AM68 SK base board") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250415111328.3847502-3-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 97b67cc102dc2cc8aa39a569c22a196e21af5a21 Author: Yemike Abhilash Chandra Date: Tue Apr 15 16:43:22 2025 +0530 arm64: dts: ti: k3-j721e-sk: Add DT nodes for power regulators Add device tree nodes for two power regulators on the J721E SK board. vsys_5v0: A fixed regulator representing the 5V supply output from the LM61460 and vdd_sd_dv: A GPIO-controlled TLV71033 regulator. J721E-SK schematics: https://www.ti.com/lit/zip/sprr438 Fixes: 1bfda92a3a36 ("arm64: dts: ti: Add support for J721E SK") Cc: stable@vger.kernel.org Signed-off-by: Yemike Abhilash Chandra Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250415111328.3847502-2-y-abhilashchandra@ti.com Signed-off-by: Nishanth Menon commit 2a36e8656836f5897508e61d46d22fe344af6426 Author: Siddharth Vadapalli Date: Thu Apr 17 18:02:46 2025 +0530 arm64: dts: ti: k3-j722s-evm: Drop redundant status within serdes0/serdes1 Since serdes0 and serdes1 are now enabled by default within the SoC file, it is no longer necessary to enable them in the board file. Hence, remove the redundant 'status = "okay"' within the serdes0 and serdes1 device-tree nodes. Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250417123246.2733923-5-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 3f7523bf8c35f96e0309d420d9f89e300c97fc20 Author: Siddharth Vadapalli Date: Thu Apr 17 18:02:45 2025 +0530 arm64: dts: ti: k3-j722s-main: Don't disable serdes0 and serdes1 Since serdes0 and serdes1 are the child nodes of serdes_wiz0 and serdes_wiz1 respectively, and, given that serdes_wiz0 and serdes_wiz1 are already disabled, it is not necessary to disable serdes0 and serdes1. Moreover, having serdes_wiz0/serdes_wiz1 enabled and serdes0/serdes1 disabled is not a working configuration. Hence, remove 'status = "disabled"' from the serdes0 and serdes1 nodes. Suggested-by: Udit Kumar Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250417123246.2733923-4-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 320d8a84f6f045dc876d4c2983f9024c7ac9d6df Author: Siddharth Vadapalli Date: Thu Apr 17 18:02:44 2025 +0530 arm64: dts: ti: k3-j722s-main: Disable "serdes_wiz0" and "serdes_wiz1" Since "serdes0" and "serdes1" which are the sub-nodes of "serdes_wiz0" and "serdes_wiz1" respectively, have been disabled in the SoC file already, and, given that these sub-nodes will only be enabled in a board file if the board utilizes any of the SERDES instances and the peripherals bound to them, we end up in a situation where the board file doesn't explicitly disable "serdes_wiz0" and "serdes_wiz1". As a consequence of this, the following errors show up when booting Linux: wiz bus@f0000:phy@f000000: probe with driver wiz failed with error -12 ... wiz bus@f0000:phy@f010000: probe with driver wiz failed with error -12 To not only fix the above, but also, in order to follow the convention of disabling device-tree nodes in the SoC file and enabling them in the board files for those boards which require them, disable "serdes_wiz0" and "serdes_wiz1" device-tree nodes. Fixes: 628e0a0118e6 ("arm64: dts: ti: k3-j722s-main: Add SERDES and PCIe support") Cc: stable@vger.kernel.org Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250417123246.2733923-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 9d76be5828be44ed7a104cc21b4f875be4a63322 Author: Siddharth Vadapalli Date: Thu Apr 17 18:02:43 2025 +0530 arm64: dts: ti: k3-j722s-evm: Enable "serdes_wiz0" and "serdes_wiz1" In preparation for disabling "serdes_wiz0" and "serdes_wiz1" device-tree nodes in the SoC file, enable them in the board file. The motivation for this change is that of following the existing convention of disabling nodes in the SoC file and only enabling the required ones in the board file. Fixes: 485705df5d5f ("arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM") Cc: stable@vger.kernel.org Signed-off-by: Siddharth Vadapalli Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20250417123246.2733923-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 5e5da30f2e255f14c3098723fe171e6aec8d7db0 Author: Siddharth Vadapalli Date: Fri Apr 11 11:44:25 2025 +0530 arm64: dts: ti: k3-j784s4-evm-usxgmii-exp1-exp2: drop pinctrl-names The "pinctrl-names" property is not required since it doesn't have an associated pinctrl configuration. Hence, drop it. Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20250411061425.640718-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 85f79dece58373e29ece0507fda378cdc0e617cc Merge: bafa451a96d0f1 7b30b1b04e0d04 Author: Palmer Dabbelt Date: Fri Apr 18 10:51:58 2025 -0700 Merge patch series "riscv: misaligned: Add ZCB handling and fix sleeping function" Nylon Chen says: 1. Adds support for ZCB compressed instructions (C.LHU, C.LH, C.SH). 2. Fixes a bug where copy_from/to_user() calls in non-sleepable contexts triggered attempts to sleep. Signed-off-by: Zong Li Signed-off-by: Nylon Chen nylon.chen@sifive.com Nylon Chen (2): riscv: misaligned: Add handling for ZCB instructions riscv: misaligned: fix sleeping function called during misaligned access handling * b4-shazam-merge: riscv: misaligned: fix sleeping function called during misaligned access handling riscv: misaligned: Add handling for ZCB instructions Link: https://lore.kernel.org/r/20250411073850.3699180-1-nylon.chen@sifive.com Signed-off-by: Palmer Dabbelt commit 7b30b1b04e0d04e56e848c3b9c2952c30de05af9 Author: Nylon Chen Date: Fri Apr 11 15:38:49 2025 +0800 riscv: misaligned: Add handling for ZCB instructions Add support for the Zcb extension's compressed half-word instructions (C.LHU, C.LH, and C.SH) in the RISC-V misaligned access trap handler. Signed-off-by: Zong Li Signed-off-by: Nylon Chen Link: https://lore.kernel.org/r/20250411073850.3699180-2-nylon.chen@sifive.com Signed-off-by: Palmer Dabbelt commit 61a74ad254628ccd9e88838c3c622885dfb6c588 Author: Nylon Chen Date: Fri Apr 11 15:38:50 2025 +0800 riscv: misaligned: fix sleeping function called during misaligned access handling Use copy_from_user_nofault() and copy_to_user_nofault() instead of copy_from/to_user functions in the misaligned access trap handlers. The following bug report was found when executing misaligned memory accesses: BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:162 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 115, name: two preempt_count: 0, expected: 0 CPU: 0 UID: 0 PID: 115 Comm: two Not tainted 6.14.0-rc5 #24 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x1c/0x24 [] show_stack+0x28/0x34 [] dump_stack_lvl+0x4a/0x68 [] dump_stack+0x14/0x1c [] __might_resched+0xfa/0x104 [] __might_sleep+0x3e/0x62 [] __might_fault+0x1c/0x24 [] _copy_from_user+0x28/0xaa [] handle_misaligned_store+0x204/0x254 [] do_trap_store_misaligned+0x24/0xee [] handle_exception+0x146/0x152 Fixes: b686ecdeacf6 ("riscv: misaligned: Restrict user access to kernel memory") Fixes: 441381506ba7 ("riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code") Signed-off-by: Zong Li Signed-off-by: Nylon Chen Link: https://lore.kernel.org/r/20250411073850.3699180-3-nylon.chen@sifive.com Signed-off-by: Palmer Dabbelt commit f05ce73cc3b2bbf8cd03d35337d3b380692840fb Author: Faizal Rahim Date: Mon Mar 17 23:07:42 2025 -0400 igc: add support to get frame preemption statistics via ethtool Implemented "ethtool --include-statistics --show-mm" callback for IGC. Tested preemption scenario to check preemption statistics: 1) Trigger verification handshake on both boards: $ sudo ethtool --set-mm enp1s0 pmac-enabled on $ sudo ethtool --set-mm enp1s0 tx-enabled on $ sudo ethtool --set-mm enp1s0 verify-enabled on 2) Set preemptible or express queue in taprio for tx board: $ sudo tc qdisc replace dev enp1s0 parent root handle 100 taprio \ num_tc 4 map 3 2 1 0 3 3 3 3 3 3 3 3 3 3 3 3 \ queues 1@0 1@1 1@2 1@3 base-time 0 sched-entry S F 100000 \ fp E E P P 3) Send large size packets on preemptible queue 4) Send small size packets on express queue to preempt packets in preemptible queue 5) Show preemption statistics on the receiving board: $ ethtool --include-statistics --show-mm enp1s0 MAC Merge layer state for enp1s0: pMAC enabled: on TX enabled: on TX active: on TX minimum fragment size: 64 RX minimum fragment size: 60 Verify enabled: on Verify time: 128 Max verify time: 128 Verification status: SUCCEEDED Statistics: MACMergeFrameAssErrorCount: 0 MACMergeFrameSmdErrorCount: 0 MACMergeFrameAssOkCount: 511 MACMergeFragCountRx: 764 MACMergeFragCountTx: 0 MACMergeHoldCount: 0 Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Co-developed-by: Chwee-Lin Choong Signed-off-by: Chwee-Lin Choong Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 10e2ffe10e437b81ed3ec8162638b3dac5d6247b Author: Faizal Rahim Date: Mon Mar 17 23:07:41 2025 -0400 igc: add support to get MAC Merge data via ethtool Implement "ethtool --show-mm" callback for IGC. Tested with command: $ ethtool --show-mm enp1s0. MAC Merge layer state for enp1s0: pMAC enabled: on TX enabled: on TX active: on TX minimum fragment size: 64 RX minimum fragment size: 60 Verify enabled: on Verify time: 128 Max verify time: 128 Verification status: SUCCEEDED Verified that the fields value are retrieved correctly. Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit e9074d7f376876f819090b4fca99a370ab7b830b Author: Faizal Rahim Date: Mon Mar 17 23:07:40 2025 -0400 igc: block setting preemptible traffic class in taprio Since preemptible tc implementation is not ready yet, block it from being set in taprio. The existing code already blocks it in mqprio. Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 55ececab98856be35e8a418a25e1081df931f1eb Author: Faizal Rahim Date: Mon Mar 17 23:07:39 2025 -0400 igc: add support to set tx-min-frag-size Add support for setting tx-min-frag-size via the set_mm callback in igc. If the requested value is unsupported, round it up to the smallest supported i226 size (64, 128, 192, 256) and send a netlink message to inform the user. Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 5422570c0010bb968738f9256eb2bf83e79b4d63 Author: Faizal Rahim Date: Mon Mar 17 23:07:38 2025 -0400 igc: add support for frame preemption verification This patch implements the "ethtool --set-mm" callback to trigger the frame preemption verification handshake. Uses the MAC Merge Software Verification (mmsv) mechanism in ethtool to perform the verification handshake for igc. The structure fpe.mmsv is set by mmsv in ethtool and should remain read-only for the driver. Other mmsv callbacks: a) configure_tx() -> not used yet at this point - igc lacks registers to configure FPE in the transmit direction, so this API is not utilized for now. When igc supports preemptible queue, driver will use this API to manage its configuration. b) configure_pmac() -> not used - this callback dynamically controls pmac_enabled at runtime. For example, mmsv calls configure_pmac() and disables pmac_enabled when the link partner goes down, even if the user previously enabled it. The intention is to save power but it is not feasible in igc because it causes an endless adapter reset loop: 1) Board A and Board B complete the verification handshake. Tx mode register for both boards are in TSN mode. 2) Board B link goes down. On Board A: 3) mmsv calls configure_pmac() with pmac_enabled = false. 4) configure_pmac() in igc updates a new field based on pmac_enabled. Driver uses this field in igc_tsn_new_flags() to indicate that the user enabled/disabled FPE. 5) configure_pmac() in igc calls igc_tsn_offload_apply() to check whether an adapter reset is needed. Calls existing logic in igc_tsn_will_tx_mode_change() and igc_tsn_new_flags(). 6) Since pmac_enabled is now disabled and no other TSN feature is active, igc_tsn_will_tx_mode_change() evaluates to true because Tx mode will switch from TSN to Legacy. 7) Driver resets the adapter. 8) Registers are set, and Tx mode switches to Legacy. 9) When link partner is up, steps 3-8 repeat, but this time with pmac_enabled = true, reactivating TSN. igc_tsn_will_tx_mode_change() evaluates to true again, since Tx mode will switch from Legacy to TSN. 10) Driver resets the adapter. 11) Adapter reset completes, registers are set, and Tx mode switches to TSN. On Board B: 12) Adapter reset on Board A at step 10 causes it to detect its link partner as down. 13) Repeats steps 3-8. 14) Once reset adapter on Board A is completed at step 11, it detects its link partner as up. 15) Repeats steps 9-11. - this cycle repeats indefinitely. To avoid this issue, igc only uses mmsv.pmac_enabled to track whether FPE is enabled or disabled. Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Co-developed-by: Choong Yong Liang Signed-off-by: Choong Yong Liang Co-developed-by: Chwee-Lin Choong Signed-off-by: Chwee-Lin Choong Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 74757ad1c105c8fc00b4cac0b7918fe3262cdb18 Author: Miguel Ojeda Date: Wed Apr 16 14:21:06 2025 +0200 drm/panic: use `///` for private items too `///` should still be used for private items [1]. Some of the items in this file do so already, so do it for a few other clear candidates in the file. Link: https://lore.kernel.org/rust-for-linux/20250416112454.2503872-1-ojeda@kernel.org/ [1] Signed-off-by: Miguel Ojeda Reviewed-by: Jocelyn Falempe Reviewed-by: Christian Schrefl Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250416122106.2554208-1-ojeda@kernel.org commit 7663370e32b39cf65cc1d56155a9c152598473ea Author: Faizal Rahim Date: Mon Mar 17 23:07:37 2025 -0400 igc: set the RX packet buffer size for TSN mode In preparation for supporting frame preemption, when entering TSN mode, set the receive packet buffer to 15KB for the Express MAC, 15KB for the Preemptible MAC and 2KB for the BMC. References: I225/I226 SW User Manual, Section 4.7.9, Section 7.1.3.2, Section 8.3.1 The newly introduced macros follow the naming from the i226 SW User Manual for easy reference. Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 9cd87aafc7a88f4107d9f86fc6262d717fd489e8 Author: Faizal Rahim Date: Mon Mar 17 23:07:36 2025 -0400 igc: use FIELD_PREP and GENMASK for existing RX packet buffer size Prepare for an upcoming patch that modifies the RX buffer size in TSN mode. Refactor IGC_RXPBSIZE_EXP_BMC_DEFAULT and IGC_RXPBS_CFG_TS_EN using FIELD_PREP and GENMASK to improve clarity and maintainability. Refactor both macros for consistency, even though the upcoming patch only use IGC_RXPBSIZE_EXP_BMC_DEFAULT. The newly introduced macros follow the naming from the i226 SW User Manual for easy reference. I've tested IGC_RXPBSIZE_EXP_BMC_DEFAULT and IGC_RXPBS_CFG_TS_EN before and after the refactoring, and their values remain unchanged. Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 0d58cdc902dace2298406b3972def04f55e3d775 Author: Faizal Rahim Date: Mon Mar 17 23:07:35 2025 -0400 igc: optimize TX packet buffer utilization for TSN mode In preparation for upcoming frame preemption patches, optimize the TX packet buffer size. The total packet buffer size (RX + TX) is 64KB, with a maximum of 34KB for either RX or TX. Split the buffer evenly, allocating 32KB to each. For TX, assign 7KB to each of the four TX packet buffers (total 28KB) and reserve 4KB for BMC. References: I225/I226 SW User Manual Section 4.7.9, Section 8.3.2 Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 425d8d9cb092fdd38e139dc6c104cade85896ba4 Author: Faizal Rahim Date: Mon Mar 17 23:07:34 2025 -0400 igc: use FIELD_PREP and GENMASK for existing TX packet buffer size In preparation for an upcoming patch that will modify the TX buffer size in TSN mode, replace IGC_TXPBSIZE_TSN and IGC_TXPBSIZE_DEFAULT implementation with new macros that utilizes FIELD_PREP and GENMASK for clarity. The newly introduced macros follow the naming from the i226 SW User Manual for easy reference. I've tested IGC_TXPBSIZE_TSN and IGC_TXPBSIZE_DEFAULT before and after the refactoring, and their values remain unchanged. Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 67287d67bebdd6de3ba7e60f20b08fb62a360a01 Author: Faizal Rahim Date: Mon Mar 17 23:07:33 2025 -0400 igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT Rename RX and TX packet buffer size macros in preparation for an upcoming patch that will refactor buffer size handling using FIELD_PREP and GENMASK. Changes: - Rename I225_RXPBSIZE_DEFAULT to IGC_RXPBSIZE_EXP_BMC_DEFAULT. The EXP_BMC suffix explicitly indicates Express and BMC buffer default values, improving readability and reusability for the upcoming changes, while also better reflecting the current buffer allocations. - Rename I225_TXPBSIZE_DEFAULT to IGC_TXPBSIZE_DEFAULT. These registers apply to both i225 and i226, so using the IGC prefix aligns with existing macro naming conventions. Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 19d629079c0ef5cd121a770e40d80b8dc585dc56 Author: Faizal Rahim Date: Mon Mar 17 23:07:32 2025 -0400 igc: rename xdp_get_tx_ring() for non-xdp usage Renamed xdp_get_tx_ring() function to a more generic name for use in upcoming frame preemption patches. Signed-off-by: Faizal Rahim Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit dda666343cc8e90441fd55142a679bea32d239e2 Author: Faizal Rahim Date: Mon Mar 17 23:07:31 2025 -0400 net: ethtool: mm: reset verification status when link is down When the link partner goes down, "ethtool --show-mm" still displays "Verification status: SUCCEEDED," reflecting a previous state that is no longer valid. Reset the verification status to ensure it reflects the current state. Reviewed-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Signed-off-by: Tony Nguyen commit 9ff2aa4206eff40a202e425f232036bc84ad4c0e Author: Vladimir Oltean Date: Mon Mar 17 23:07:30 2025 -0400 net: ethtool: mm: extract stmmac verification logic into common library It appears that stmmac is not the only hardware which requires a software-driven verification state machine for the MAC Merge layer. While on the one hand it's good to encourage hardware implementations, on the other hand it's quite difficult to tolerate multiple drivers implementing independently fairly non-trivial logic. Extract the hardware-independent logic from stmmac into library code and put it in ethtool. Name the state structure "mmsv" for MAC Merge Software Verification. Let this expose an operations structure for executing the hardware stuff: sync hardware with the tx_active boolean (result of verification process), enable/disable the pMAC, send mPackets, notify library of external events (reception of mPackets), as well as link state changes. Note that it is assumed that the external events are received in hardirq context. If they are not, it is probably a good idea to disable hardirqs when calling ethtool_mmsv_event_handle(), because the library does not do so. Also, the MM software verification process has no business with the tx_min_frag_size, that is all the driver's to handle. Signed-off-by: Vladimir Oltean Co-developed-by: Choong Yong Liang Signed-off-by: Choong Yong Liang Tested-by: Choong Yong Liang Tested-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Signed-off-by: Tony Nguyen commit b375984f0df0ed5a45e8e9dc5600d6666cdb92e7 Author: Faizal Rahim Date: Mon Mar 17 23:07:29 2025 -0400 net: stmmac: move frag_size handling out of spin_lock The upcoming patch will extract verification logic into a new module, MMSV (MAC Merge Software Verification). MMSV will handle most FPE fields, except frag_size. It introduces its own lock (mmsv->lock), replacing fpe_cfg->lock. Since frag_size handling remains in the driver, the existing rtnl_lock() is sufficient. Move frag_size handling out of spin_lock_irq_save() to keep the upcoming patch a pure refactoring without behavior changes. Signed-off-by: Faizal Rahim Reviewed-by: Vladimir Oltean Reviewed-by: Furong Xu <0x1207@gmail.com> Signed-off-by: Tony Nguyen commit 17bff220c6d69e4be38c9899a7515c3b02de60f0 Author: Chen Ni Date: Thu Apr 17 16:48:36 2025 +0800 soc: ti: knav_qmss_queue: Remove unnecessary NULL check before free_percpu() free_percpu() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250417084836.937452-1-nichen@iscas.ac.cn Signed-off-by: Nishanth Menon commit ae9c0b68089d5412bb252c4adbeff122017557c3 Author: Tang Dongxing Date: Mon Mar 31 20:14:25 2025 +0800 soc: ti: k3-ringacc: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: Tang Dongxing Signed-off-by: Shao Mingyin Link: https://lore.kernel.org/r/20250331201425296l4h98bZjxHzs08fdvHrGO@zte.com.cn Signed-off-by: Nishanth Menon commit 4960bce324fedb1966eaf737bcb5eb1cef8865c9 Author: Dave Penkler Date: Fri Apr 18 15:35:37 2025 +0200 staging: gpib: Add return value to request_control A number of drivers are unable to release control due to hardware or software limitations. As request_system_control was defined as void, no error could be signalled. This patch changes the prototype of request_system_control to int and adds the appropriate checking and returns. In the case that a board cannot release control EINVAL is returned. If a driver does not implement request_system_control EPERM is returned. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418133537.22491-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit aef1d0209ddf127a8069aca5fa3a062be4136b76 Author: Peter Zijlstra Date: Fri Apr 18 11:50:34 2025 +0200 x86/mm: Fix {,un}use_temporary_mm() IRQ state As the function switch_mm_irqs_off() implies, it ought to be called with IRQs *off*. Commit 58f8ffa91766 ("x86/mm: Allow temporary MMs when IRQs are on") caused this to not be the case for EFI. Ensure IRQs are off where it matters. Fixes: 58f8ffa91766 ("x86/mm: Allow temporary MMs when IRQs are on") Reported-by: Borislav Petkov (AMD) Tested-by: Borislav Petkov (AMD) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Morton Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Rik van Riel Link: https://lore.kernel.org/r/20250418095034.GR38216@noisy.programming.kicks-ass.net commit a5df13cd7b05f87f864c2d575020d287879659aa Author: Abraham Samuel Adekunle Date: Fri Apr 18 09:47:55 2025 +0000 staging: rtl8723bs: Use % 4096 instead of & 0xfff The sequence number is constrained to a range of [0, 4095], which is a total of 4096 values. The bitmask operation using `& 0xfff` is used to perform this wrap-around. While this is functionally correct, it obscures the intended semantic of a 4096-based wrap. Using a modulo operation `% 4096u` makes the wrap-around logic explicit and easier to understand. It clearly signals that the sequence number cycles through a range of 4096 values. It also makes the code robust against potential changes of the 4096 upper limit, especially when it becomes a non power-of-2 value while the AND(&) works solely for power-of-2 values. The use of `% 4096u` also guarantees that the modulo operation is performed with unsigned arithmetic, preventing potential issues with the signed types. Found by Coccinelle. Suggested-by: Andy Shevchenko Suggested-by: David Laight Signed-off-by: Abraham Samuel Adekunle Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/e8d515539ba560961003eae15d301d03e6cdd17d.1744966511.git.abrahamadekunle50@gmail.com Signed-off-by: Greg Kroah-Hartman commit 28925280ed6c12705a9273cc9853c97b22ef2176 Author: Abraham Samuel Adekunle Date: Fri Apr 18 09:47:54 2025 +0000 staging: rtl8723bs: Add spaces and line breaks to improve readability The code contains no spaces around binary operators with long lines which reduces readability thereby not adhering to Linux kernel coding style. Add white spaces around the binary operators and use line breaks to increase readability and ensure adherence to Linux kernel coding styles. Suggested-by: Andy Shevchenko Signed-off-by: Abraham Samuel Adekunle Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/3b9a0572ad56699b095642fc169c9603e08616e9.1744966511.git.abrahamadekunle50@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7184cbf5530da955407be46dd120eb7111d8973 Author: Dave Penkler Date: Fri Apr 18 11:31:11 2025 +0200 staging: gpib: Rename common include file User code includes gpib_user.h. Since this include has diverged from the original by - removing unused functions and defines - changing camel-case identifiers - removing typedefs we need to change the name of the kernel include. This include will be included in the userland gpib_user.h ensuring backward compatibility for application programmes. Rename the file and change the references to it. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418093111.8820-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit db14478045af2605fa5d08f1061c2ff311648c1d Author: Dave Penkler Date: Fri Apr 18 11:31:10 2025 +0200 staging: gpib: Remove unused enums from common include file The error code and timeout code enums are not used by any of the gpib kernel code. This patch removes them. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418093111.8820-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman commit d065b12eb31cb883f53897107abdcf92bf342efc Author: Eric Florin Date: Thu Apr 17 20:50:23 2025 -0700 staging: sm750fb: clean-up `else`-blocks Clean-up `else`-blocks in `hw_sm750_map` that occur after `if`-blocks that terminate function execution. Signed-off-by: Eric Florin Link: https://lore.kernel.org/r/20250418035023.27067-1-ericflorin.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit 86e530c84c9701e653a324df970c25ca3ffee390 Merge: 197c2974cb4949 e8961c50ee9cc3 Author: Steffen Klassert Date: Fri Apr 18 10:58:23 2025 +0200 Merge branch 'Update offload configuration with SA' Chiachang Wang says: ==================== The current Security Association (SA) offload setting cannot be modified without removing and re-adding the SA with the new configuration. Although existing netlink messages allow SA migration, the offload setting will be removed after migration. This patchset enhances SA migration to include updating the offload setting. This is beneficial for devices that support IPsec session management. ==================== Signed-off-by: Steffen Klassert commit 2492e5aba2be064d0604ae23ae0770ecc0168192 Author: Sandipan Das Date: Fri Apr 18 09:13:03 2025 +0530 perf/x86/amd/uncore: Prevent UMC counters from saturating Unlike L3 and DF counters, UMC counters (PERF_CTRs) set the Overflow bit (bit 48) and saturate on overflow. A subsequent pmu->read() of the event reports an incorrect accumulated count as there is no difference between the previous and the current values of the counter. To avoid this, inspect the current counter value and proactively reset the corresponding PERF_CTR register on every pmu->read(). Combined with the periodic reads initiated by the hrtimer, the counters never get a chance saturate but the resolution reduces to 47 bits. Fixes: 25e56847821f ("perf/x86/amd/uncore: Add memory controller support") Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Reviewed-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/dee9c8af2c6d66814cf4c6224529c144c620cf2c.1744906694.git.sandipan.das@amd.com commit e1ed37b70fb355abf2e8032a2e972cdba53ae93c Author: Sandipan Das Date: Fri Apr 18 09:13:02 2025 +0530 perf/x86/amd/uncore: Add parameter to configure hrtimer Introduce a module parameter for configuring the hrtimer duration in milliseconds. The default duration is 60000 milliseconds and the intent is to allow users to customize it to suit jitter tolerances. It should be noted that a longer duration will reduce jitter but affect accuracy if the programmed events cause the counters to overflow multiple times in a single interval. Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/6cb0101da74955fa9c8361f168ffdf481ae8a200.1744906694.git.sandipan.das@amd.com commit 6d937e044bc9bfd52dc50f7fc06d22018841472e Author: Sandipan Das Date: Fri Apr 18 09:13:01 2025 +0530 perf/x86/amd/uncore: Use hrtimer for handling overflows Uncore counters do not provide mechanisms like interrupts to report overflows and the accumulated user-visible count is incorrect if there is more than one overflow between two successive read requests for the same event because the value of prev_count goes out-of-date for calculating the correct delta. To avoid this, start a hrtimer to periodically initiate a pmu->read() of the active counters for keeping prev_count up-to-date. It should be noted that the hrtimer duration should be lesser than the shortest time it takes for a counter to overflow for this approach to be effective. Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/8ecf5fe20452da1cd19cf3ff4954d3e7c5137468.1744906694.git.sandipan.das@amd.com commit 05c9b0cbe4b822c42382d27e3f73918600594882 Author: Sandipan Das Date: Fri Apr 18 09:13:00 2025 +0530 perf/x86/intel/uncore: Use HRTIMER_MODE_HARD for detecting overflows hrtimer handlers can be deferred to softirq context and affect timely detection of counter overflows. Hence switch to HRTIMER_MODE_HARD. Disabling and re-enabling IRQs in the hrtimer handler is not required as pmu->start() and pmu->stop() can no longer intervene while updating event->hw.prev_count. Suggested-by: Peter Zijlstra Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/0ad4698465077225769e8edd5b2c7e8f48f636d5.1744906694.git.sandipan.das@amd.com commit 4f81cc2d1bf91a49d33eb6578b58db2518deef01 Author: Sandipan Das Date: Fri Apr 18 09:12:59 2025 +0530 perf/x86/amd/uncore: Remove unused 'struct amd_uncore_ctx::node' member Fixes: d6389d3ccc13 ("perf/x86/amd/uncore: Refactor uncore management") Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/30f9254c2de6c4318dd0809ef85a1677f68eef10.1744906694.git.sandipan.das@amd.com commit 3ce4b1f1f24bbd9f1c349ecb6641dfa038bd0b5a Author: Uros Bizjak Date: Fri Apr 18 10:07:43 2025 +0200 x86/asm: Rename rep_nop() to native_pause() Rename rep_nop() function to what it really does. No functional change intended. Suggested-by: David Laight Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250418080805.83679-1-ubizjak@gmail.com commit d109ff4f0bc32de354247a6e8ede3ffc8ef14cd0 Author: Uros Bizjak Date: Fri Apr 18 10:07:44 2025 +0200 x86/asm: Replace "REP; NOP" with PAUSE mnemonic Current minimum required version of binutils is 2.25, which supports PAUSE instruction mnemonic. Replace "REP; NOP" with this proper mnemonic. No functional change intended. Reviewed-by: Nikolay Borisov Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250418080805.83679-2-ubizjak@gmail.com commit 42c782fae38f0559e6355707ee0afde9ac16dcc3 Author: Uros Bizjak Date: Fri Apr 18 09:13:51 2025 +0200 x86/asm: Remove semicolon from "rep" prefixes Minimum version of binutils required to compile the kernel is 2.25. This version correctly handles the "rep" prefixes, so it is possible to remove the semicolon, which was used to support ancient versions of GNU as. Due to the semicolon, the compiler considers "rep; insn" (or its alternate "rep\n\tinsn" form) as two separate instructions. Removing the semicolon makes asm length calculations more accurate, consequently making scheduling and inlining decisions of the compiler more accurate. Removing the semicolon also enables assembler checks involving "rep" prefixes. Trying to assemble e.g. "rep addl %eax, %ebx" results in: Error: invalid instruction `add' after `rep' Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Brian Gerst Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Pavel Machek Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250418071437.4144391-2-ubizjak@gmail.com commit 0dcc51477b94d87f23aeb400b78fbdfb09363000 Author: Uros Bizjak Date: Fri Apr 18 09:13:50 2025 +0200 x86/boot: Remove semicolon from "rep" prefixes Minimum version of binutils required to compile the kernel is 2.25. This version correctly handles the "rep" prefixes, so it is possible to remove the semicolon, which was used to support ancient versions of GNU as. Due to the semicolon, the compiler considers "rep; insn" (or its alternate "rep\n\tinsn" form) as two separate instructions. Removing the semicolon makes asm length calculations more accurate, consequently making scheduling and inlining decisions of the compiler more accurate. Removing the semicolon also enables assembler checks involving "rep" prefixes. Trying to assemble e.g. "rep addl %eax, %ebx" results in: Error: invalid instruction `add' after `rep' Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Martin Mares Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250418071437.4144391-1-ubizjak@gmail.com commit fe8e5a3215ccd8e54ce0a9df1b89d4ab42ad8fec Author: Jiri Olsa Date: Mon Apr 14 10:36:47 2025 +0200 selftests/bpf: Add 5-byte NOP uprobe trigger benchmark Add a 5-byte NOP uprobe trigger benchmark (x86_64 specific) to measure uprobes/uretprobes on top of NOP5 instructions. Signed-off-by: Jiri Olsa Signed-off-by: Ingo Molnar Acked-by: Andrii Nakryiko Cc: Oleg Nesterov Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: Hao Luo Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Alan Maguire Link: https://lore.kernel.org/r/20250414083647.1234007-2-jolsa@kernel.org commit 610f6e14c29dc7f9637e8d9481e9f241f355e2e4 Author: Jiri Olsa Date: Mon Apr 14 10:36:46 2025 +0200 uprobes/x86: Add support to emulate NOP instructions Add support to emulate all NOP instructions as the original uprobe instruction. This change speeds up uprobe on top of all NOP instructions and is a preparation for usdt probe optimization, that will be done on top of NOP5 instructions. With this change the usdt probe on top of NOP5s won't take the performance hit compared to usdt probe on top of standard NOP instructions. Suggested-by: Oleg Nesterov Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Ingo Molnar Reviewed-by: Oleg Nesterov Acked-by: Andrii Nakryiko Cc: Alan Maguire Cc: Hao Luo Cc: John Fastabend Cc: Masami Hiramatsu Cc: Song Liu Cc: Steven Rostedt Cc: Yonghong Song Link: https://lore.kernel.org/r/20250414083647.1234007-1-jolsa@kernel.org commit cbc9d9e108f4f2a3c061ac6233a424accde8b564 Merge: 4cc9cf2f437ccf e30b7a75666b3f Author: Mark Brown Date: Fri Apr 18 05:11:47 2025 +0100 spi: Introduce and use spi_bpw_to_bytes() Merge series from Andy Shevchenko : Recently in the discussion with David the idea of having a common helper popped up. The helper converts the given bits per word to bytes. The result will always be power-of-two (e.g. for 37 bits it returns 8 bytes) or 0 for 0 input. More details are in the respective code comment. This mini-series introduces it and replaces current users under drivers/spi and we expect more (and possibly some lurking in other subsystems). commit 8066e388be48f1ad62b0449dc1d31a25489fa12a Author: Jakub Kicinski Date: Wed Apr 16 13:08:40 2025 -0700 net: add UAPI to the header guard in various network headers fib_rule, ip6_tunnel, and a whole lot of if_* headers lack the customary _UAPI in the header guard. Without it YNL build can't protect from in tree and system headers both getting included. YNL doesn't need most of these but it's annoying to have to fix them one by one. Note that header installation strips this _UAPI prefix so this should result in no change to the end user. Acked-by: Jamal Hadi Salim Reviewed-by: Jason Xing Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250416200840.1338195-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1df4a945444f071a9c5e09580a485919c42d4de5 Author: Breno Leitao Date: Wed Apr 16 10:06:12 2025 -0700 trace: tcp: Add const qualifier to skb parameter in tcp_probe event Change the tcp_probe tracepoint to accept a const struct sk_buff parameter instead of a non-const one. This improves type safety and better reflects that the skb is not modified within the tracepoint implementation. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250416-tcp_probe-v1-1-1edc3c5a1cb8@debian.org Signed-off-by: Jakub Kicinski commit 2b905deb43ea0b67fa8448fc9c15dacb068f45b6 Author: Zijun Hu Date: Wed Apr 16 19:56:23 2025 +0800 net: Delete the outer () duplicated of macro SOCK_SKB_CB_OFFSET definition For macro SOCK_SKB_CB_OFFSET definition, Delete the outer () duplicated. Signed-off-by: Zijun Hu Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250416-fix_net-v1-1-d544c9f3f169@quicinc.com Signed-off-by: Jakub Kicinski commit 01be295b485a7adcd662bec3b4613b4cef7956dc Author: Russell King (Oracle) Date: Wed Apr 16 11:26:47 2025 +0100 net: stmmac: mediatek: stop initialising plat->mac_interface Mediatek doesn't make use of mac_interface, and none of the in-tree DT files use the mac-mode property. Therefore, mac_interface already follows phy_interface. Remove this unnecessary assignment. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4zyh-000xVE-PG@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 7c6cd70ffd0ffe4ec95b6eca375a4e5dd5003819 Author: Russell King (Oracle) Date: Wed Apr 16 11:09:33 2025 +0100 net: stmmac: dwc-qos: use PHY clock-stop capability Use the PHY clock-stop capability when programming the MAC LPI mode, which allows the transmit clock to the PHY to be gated. Tested on the Jetson Xavier NX platform. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4zi1-000xHh-57@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 22cbc1ee268b7ec0000848708944daa61c6e4909 Author: Jakub Kicinski Date: Tue Apr 15 20:04:47 2025 -0700 netdev: fix the locking for netdev notifications Kuniyuki reports that the assert for netdev lock fires when there are netdev event listeners (otherwise we skip the netlink event generation). Correct the locking when coming from the notifier. The NETDEV_XDP_FEAT_CHANGE notifier is already fully locked, it's the documentation that's incorrect. Fixes: 99e44f39a8f7 ("netdev: depend on netdev->lock for xdp features") Reported-by: syzkaller Reported-by: Kuniyuki Iwashima Link: https://lore.kernel.org/20250410171019.62128-1-kuniyu@amazon.com Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250416030447.1077551-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cfba1d1b61ae3f32e4bc06e9860711a4488d98b7 Author: Kees Cook Date: Tue Apr 15 19:01:14 2025 -0700 net/mlx5e: ethtool: Fix formatting of ptp_rq0_csum_complete_tail_slow The new GCC 15 warning -Wunterminated-string-initialization reports: In file included from drivers/net/ethernet/mellanox/mlx5/core/en.h:55, from drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:34: drivers/net/ethernet/mellanox/mlx5/core/en_stats.h:57:46: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 57 | #define MLX5E_DECLARE_PTP_RQ_STAT(type, fld) "ptp_rq%d_"#fld, offsetof(type, fld) | ^~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:2279:11: note: in expansion of macro 'MLX5E_DECLARE_PTP_RQ_STAT' 2279 | { MLX5E_DECLARE_PTP_RQ_STAT(struct mlx5e_rq_stats, csum_complete_tail_slow) }, | ^~~~~~~~~~~~~~~~~~~~~~~~~ This stat string is being used in ethtool_sprintf(), so it must be a valid NUL-terminated string. Currently the string lacks the final NUL byte (as GCC warns), but by absolute luck, the next byte in memory is a space (decimal 32) followed by a NUL. "format" is immediately followed by little-endian size_t: struct counter_desc { char format[32]; /* 0 32 */ size_t offset; /* 32 8 */ }; The "offset" member is populated by the stats member offset: #define MLX5E_DECLARE_PTP_RQ_STAT(type, fld) "ptp_rq%d_"#fld, offsetof(type, fld) which for this struct mlx5e_rq_stats member, csum_complete_tail_slow, is 32, or space, and then the rest of the "offset" bytes are NULs. struct mlx5e_rq_stats { ... u64 csum_complete_tail_slow; /* 32 8 */ The use of vsnprintf(), within ethtool_sprintf(), reads past the end of "format" and sees the format string as "ptp_rq%d_csum_complete_tail_slow ", with %d getting resolved by MLX5E_PTP_CHANNEL_IX (value 0): ethtool_sprintf(data, ptp_rq_stats_desc[i].format, MLX5E_PTP_CHANNEL_IX); With an output result of "ptp_rq0_csum_complete_tail_slow", which gets precisely truncated to 31 characters with a trailing NUL. So, instead of accidentally getting this correct due to the NUL bytes at the end of the size_t that happens to follow the format string, just make the string initializer 1 byte shorter by replacing "%d" with "0", since MLX5E_PTP_CHANNEL_IX is already hard-coded. This results in no initializer truncation and no need to call sprintf(). Signed-off-by: Kees Cook Reviewed-by: Dragos Tatulea Link: https://patch.msgid.link/20250416020109.work.297-kees@kernel.org Signed-off-by: Jakub Kicinski commit 151e13ece86d234213b7f224f0e26a957c0eeb3e Author: Kees Cook Date: Tue Apr 15 18:02:15 2025 -0700 net: ethtool: Adjust exactly ETH_GSTRING_LEN-long stats to use memcpy Many drivers populate the stats buffer using C-String based APIs (e.g. ethtool_sprintf() and ethtool_puts()), usually when building up the list of stats individually (i.e. with a for() loop). This, however, requires that the source strings be populated in such a way as to have a terminating NUL byte in the source. Other drivers populate the stats buffer directly using one big memcpy() of an entire array of strings. No NUL termination is needed here, as the bytes are being directly passed through. Yet others will build up the stats buffer individually, but also use memcpy(). This, too, does not need NUL termination of the source strings. However, there are cases where the strings that populate the source stats strings are exactly ETH_GSTRING_LEN long, and GCC 15's -Wunterminated-string-initialization option complains that the trailing NUL byte has been truncated. This situation is fine only if the driver is using the memcpy() approach. If the C-String APIs are used, the destination string name will have its final byte truncated by the required trailing NUL byte applied by the C-string API. For drivers that are already using memcpy() but have initializers that truncate the NUL terminator, mark their source strings as __nonstring to silence the GCC warnings. For drivers that have initializers that truncate the NUL terminator and are using the C-String APIs, switch to memcpy() to avoid destination string truncation and mark their source strings as __nonstring to silence the GCC warnings. (Also introduce ethtool_cpy() as a helper to make this an easy replacement). Specifically the following warnings were investigated and addressed: ../drivers/net/ethernet/chelsio/cxgb/cxgb2.c:364:9: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 364 | "TxFramesAbortedDueToXSCollisions", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/freescale/enetc/enetc_ethtool.c:165:33: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 165 | { ENETC_PM_R1523X(0), "MAC rx 1523 to max-octet packets" }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/freescale/enetc/enetc_ethtool.c:190:33: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 190 | { ENETC_PM_T1523X(0), "MAC tx 1523 to max-octet packets" }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/google/gve/gve_ethtool.c:76:9: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 76 | "adminq_dcfg_device_resources_cnt", "adminq_set_driver_parameter_cnt", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:117:53: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 117 | STMMAC_STAT(ptp_rx_msg_type_pdelay_follow_up), | ^ ../drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:46:12: note: in definition of macro 'STMMAC_STAT' 46 | { #m, sizeof_field(struct stmmac_extra_stats, m), \ | ^ ../drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:328:24: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 328 | .str = "a_mac_control_frames_transmitted", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:340:24: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization] 340 | .str = "a_pause_mac_ctrl_frames_received", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kees Cook Reviewed-by: Petr Machata # for mlxsw Reviewed-by: Harshitha Ramamurthy Link: https://patch.msgid.link/20250416010210.work.904-kees@kernel.org Signed-off-by: Jakub Kicinski commit fe733618b27a8c033f0d246c2efff56fca322656 Author: Heiner Kallweit Date: Tue Apr 15 21:39:23 2025 +0200 r8169: add RTL_GIGA_MAC_VER_LAST to facilitate adding support for new chip versions Add a new mac_version enum value RTL_GIGA_MAC_VER_LAST. Benefit is that when adding support for a new chip version we have to touch less code, except something changes fundamentally. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://patch.msgid.link/06991f47-2aec-4aa2-8918-2c6e79332303@gmail.com Signed-off-by: Jakub Kicinski commit 2b065c098c37a3ed28df7c3be59dca61b9da8402 Author: Heiner Kallweit Date: Tue Apr 15 21:29:34 2025 +0200 r8169: refactor chip version detection Refactor chip version detection and merge both configuration tables. Apart from reducing the code by a third, this paves the way for merging chip version handling if only difference is the firmware. Signed-off-by: Heiner Kallweit Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1fea533a-dd5a-4198-a9e2-895e11083947@gmail.com Signed-off-by: Jakub Kicinski commit cd384b8508c157fbace0b8cf8a67f76a3ab1516e Merge: 240ce924d2718b 69b3e38e2fb58a Author: Jakub Kicinski Date: Thu Apr 17 18:41:42 2025 -0700 Merge branch 'net-stmmac-sunxi-cleanups' Russell King says: ==================== net: stmmac: sunxi cleanups This series cleans up the sunxi (sun7i) code in two ways: 1. it converts to use the new set_clk_tx_rate() method, even though we don't use clk_tx_i. In doing so, I reformat the function to read better, but with no changes to the code. 2. convert from stmmac_dvr_probe() to stmmac_pltfr_probe(), and then to its devm variant, which allows code simplification. ==================== Link: https://patch.msgid.link/Z_5WT_jOBgubjWQg@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 69b3e38e2fb58a3d557d9e02c107d60143c8b49c Author: Russell King (Oracle) Date: Tue Apr 15 13:58:10 2025 +0100 net: stmmac: sunxi: use devm_stmmac_pltfr_probe() Using devm_stmmac_pltfr_probe() simplifies the probe function. This will not only call plat_dat->init (sun7i_dwmac_init), but also plat_dat->exit (sun7i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This results in an overall simplification of the glue driver. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4fre-000nMr-FT@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit dd2cdba4709f6a4e32e7e323d23922e99916a781 Author: Russell King (Oracle) Date: Tue Apr 15 13:58:05 2025 +0100 net: stmmac: sunxi: use stmmac_pltfr_probe() Rather than open-coding the calls to sun7i_gmac_init() and sun7i_gmac_exit() in the probe function, use stmmac_pltfr_probe() which will automatically call the plat_dat->init() and plat_dat->exit() methods appropriately. This simplifies the code. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4frZ-000nMl-BB@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a27d798fd83c8c7c4d8c549e04c83beb3c1dc214 Author: Russell King (Oracle) Date: Tue Apr 15 13:58:00 2025 +0100 net: stmmac: sunxi: convert to set_clk_tx_rate() Convert sunxi to use the set_clk_tx_rate() callback rather than the fix_mac_speed() callback. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4frU-000nMf-6o@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 1e914a89ab7eef0b3890819847465f4c8c9d091d Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:02 2025 +0200 drm/mediatek: mtk_cec: Switch to register as module_platform_driver In preparation for adding a driver for the new HDMIv2 IP, and before splitting out the common bits from the HDMI driver, change the mtk_cec driver from being registered from the mtk_hdmi driver itself to be a module_platform_driver of its own. Besides being a cleanup, this also allows build flexibility by allowing to compile the CECv1 driver only when needed (for example, this is not needed nor used in HDMIv2 configurations). Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-5-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 75f90ba47b2cda7de7a7bc1d099172516f6f96fa Author: Thomas Weißschuh Date: Thu Apr 17 15:19:10 2025 +0200 wifi: wcn36xx: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh Acked-by: Loic Poulain Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20250417-restricted-pointers-ath-v1-4-4e9a04dbe362@linutronix.de Signed-off-by: Jeff Johnson commit 7e7f948c7d14ab5a6cfb26146a0d4734781903e3 Author: Thomas Weißschuh Date: Thu Apr 17 15:19:09 2025 +0200 wifi: ath12k: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20250417-restricted-pointers-ath-v1-3-4e9a04dbe362@linutronix.de Signed-off-by: Jeff Johnson commit 27c57c84922ef1dc72a2ea3a5427cdbaadc9be44 Author: Thomas Weißschuh Date: Thu Apr 17 15:19:08 2025 +0200 wifi: ath11k: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20250417-restricted-pointers-ath-v1-2-4e9a04dbe362@linutronix.de Signed-off-by: Jeff Johnson commit 8add2b8d72722b60c749b559db2a2aef6c9def68 Author: Thomas Weißschuh Date: Thu Apr 17 15:19:07 2025 +0200 wifi: ath10k: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. There are still a few users of %pK left, but these use it through seq_file, for which its usage is safe. Signed-off-by: Thomas Weißschuh Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20250417-restricted-pointers-ath-v1-1-4e9a04dbe362@linutronix.de Signed-off-by: Jeff Johnson commit 823435bd23108d6f8be89ea2d025c0e2e3769c51 Author: Maharaja Kennadyrajan Date: Wed Apr 16 07:47:24 2025 +0530 wifi: ath12k: fix node corruption in ar->arvifs list In current WLAN recovery code flow, ath12k_core_halt() only reinitializes the "arvifs" list head. This will cause the list node immediately following the list head to become an invalid list node. Because the prev of that node still points to the list head "arvifs", but the next of the list head "arvifs" no longer points to that list node. When a WLAN recovery occurs during the execution of a vif removal, and it happens before the spin_lock_bh(&ar->data_lock) in ath12k_mac_vdev_delete(), list_del() will detect the previously mentioned situation, thereby triggering a kernel panic. The fix is to remove and reinitialize all vif list nodes from the list head "arvifs" during WLAN halt. The reinitialization is to make the list nodes valid, ensuring that the list_del() in ath12k_mac_vdev_delete() can execute normally. Call trace: __list_del_entry_valid_or_report+0xd4/0x100 (P) ath12k_mac_remove_link_interface.isra.0+0xf8/0x2e4 [ath12k] ath12k_scan_vdev_clean_work+0x40/0x164 [ath12k] cfg80211_wiphy_work+0xfc/0x100 process_one_work+0x164/0x2d0 worker_thread+0x254/0x380 kthread+0xfc/0x100 ret_from_fork+0x10/0x20 The change is mostly copied from the ath11k patch: https://lore.kernel.org/all/20250320053145.3445187-1-quic_stonez@quicinc.com/ Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Maharaja Kennadyrajan Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250416021724.2162519-1-maharaja.kennadyrajan@oss.qualcomm.com Signed-off-by: Jeff Johnson commit e9e094a9734ea3bd4d4d117c915ccf129ac61ba1 Author: Maharaja Kennadyrajan Date: Wed Apr 16 07:34:14 2025 +0530 wifi: ath12k: Prevent sending WMI commands to firmware during firmware crash Currently, we encounter the following kernel call trace when a firmware crash occurs. This happens because the host sends WMI commands to the firmware while it is in recovery, causing the commands to fail and resulting in the kernel call trace. Set the ATH12K_FLAG_CRASH_FLUSH and ATH12K_FLAG_RECOVERY flags when the host driver receives the firmware crash notification from MHI. This prevents sending WMI commands to the firmware during recovery. Call Trace: dump_stack_lvl+0x75/0xc0 register_lock_class+0x6be/0x7a0 ? __lock_acquire+0x644/0x19a0 __lock_acquire+0x95/0x19a0 lock_acquire+0x265/0x310 ? ath12k_ce_send+0xa2/0x210 [ath12k] ? find_held_lock+0x34/0xa0 ? ath12k_ce_send+0x56/0x210 [ath12k] _raw_spin_lock_bh+0x33/0x70 ? ath12k_ce_send+0xa2/0x210 [ath12k] ath12k_ce_send+0xa2/0x210 [ath12k] ath12k_htc_send+0x178/0x390 [ath12k] ath12k_wmi_cmd_send_nowait+0x76/0xa0 [ath12k] ath12k_wmi_cmd_send+0x62/0x190 [ath12k] ath12k_wmi_pdev_bss_chan_info_request+0x62/0xc0 [ath1 ath12k_mac_op_get_survey+0x2be/0x310 [ath12k] ieee80211_dump_survey+0x99/0x240 [mac80211] nl80211_dump_survey+0xe7/0x470 [cfg80211] ? kmalloc_reserve+0x59/0xf0 genl_dumpit+0x24/0x70 netlink_dump+0x177/0x360 __netlink_dump_start+0x206/0x280 genl_family_rcv_msg_dumpit.isra.22+0x8a/0xe0 ? genl_family_rcv_msg_attrs_parse.isra.23+0xe0/0xe0 ? genl_op_lock.part.12+0x10/0x10 ? genl_dumpit+0x70/0x70 genl_rcv_msg+0x1d0/0x290 ? nl80211_del_station+0x330/0x330 [cfg80211] ? genl_get_cmd_both+0x50/0x50 netlink_rcv_skb+0x4f/0x100 genl_rcv+0x1f/0x30 netlink_unicast+0x1b6/0x260 netlink_sendmsg+0x31a/0x450 __sock_sendmsg+0xa8/0xb0 ____sys_sendmsg+0x1e4/0x260 ___sys_sendmsg+0x89/0xe0 ? local_clock_noinstr+0xb/0xc0 ? rcu_is_watching+0xd/0x40 ? kfree+0x1de/0x370 ? __sys_sendmsg+0x7a/0xc0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: a9b46dd2e483 ("wifi: ath12k: Add firmware coredump collection support") Signed-off-by: Maharaja Kennadyrajan Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250416020414.2161545-1-maharaja.kennadyrajan@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 0ca04ad0cdfb7ac2ebd79dcffebe4806e8707a74 Author: Rameshkumar Sundaram Date: Wed Apr 16 01:28:12 2025 +0530 wifi: ath12k: avoid multiple skb_cb fetch in ath12k_mac_mgmt_tx_wmi() ath12k_mac_mgmt_tx_wmi() fetches ath12k's skb_cb space multiple times from TX skb which is redundant operation. Save the skb_cb in a local pointer and use the same instead. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Rameshkumar Sundaram Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250415195812.2633923-3-rameshkumar.sundaram@oss.qualcomm.com Signed-off-by: Jeff Johnson commit f5d6b15d9503263d9425dcde9cc2fd401a32b0f2 Author: Rameshkumar Sundaram Date: Wed Apr 16 01:28:11 2025 +0530 wifi: ath12k: fix wrong handling of CCMP256 and GCMP ciphers Currently for CCMP256, GCMP128 and GCMP256 ciphers, in ath12k_install_key() IEEE80211_KEY_FLAG_GENERATE_IV_MGMT is not set and in ath12k_mac_mgmt_tx_wmi() a length of IEEE80211_CCMP_MIC_LEN is reserved for all ciphers. This results in unexpected drop of protected management frames in case either of above 3 ciphers is used. The reason is, without IEEE80211_KEY_FLAG_GENERATE_IV_MGMT set, mac80211 will not generate CCMP/GCMP headers in TX frame for ath12k. Also MIC length reserved is wrong and such frames are dropped by hardware. Fix this by setting IEEE80211_KEY_FLAG_GENERATE_IV_MGMT flag for above ciphers and by reserving proper MIC length for those ciphers. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Rameshkumar Sundaram Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250415195812.2633923-2-rameshkumar.sundaram@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 8599d4cc4191c8c1af34207a8b9414acca4afb59 Author: Ramasamy Kaliappan Date: Wed Apr 16 00:11:02 2025 +0530 wifi: ath12k: Fix the QoS control field offset to build QoS header Currently, in the mac80211 layer, received EAPOL packets are dropped when the HT control field is present in the QoS header. This issue arises due to an incorrect QoS control field offset used to build the QoS header in the MSDU data, leading to a corrupted header in the mac80211 layer. This issue also applies to other frames that contain the QoS control field, such as QoS data or Null frames. To resolve this, use ieee80211_get_qos_ctl() to obtain the correct QoS control offset from the MSDU data. Additionally, ensure the QoS control header is copied in little-endian format within the MSDU data. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Ramasamy Kaliappan Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250415184102.2707300-1-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 25be5d1d1e050f45f4d52b2cf9c8e4b6382075cf Author: P Praneesh Date: Wed Apr 9 10:56:47 2025 +0530 wifi: ath12k: Avoid allocating rx_stats when ext_rx_stats is disabled Currently, driver allocates the struct ath12k_rx_peer_stats for each station regardless of whether ext_rx_stats is enabled. This structure is populated by the monitor destination ring for both single-user and multi-user scenarios when ext_rx_stats is enabled. However, when ext_rx_stats is disabled, this allocation is unnecessary and results in additional memory consumption. To address this issue, allocate the struct ath12k_rx_peer_stats only when ext_rx_stats is enabled through debugfs. This change prevents unnecessary memory allocation. Additionally, ensure that the station dump RSSI is updated irrespective of the ext_rx_stats enablement. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250409052647.81955-1-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit f335295aa29c2198d3aa02366e7c42cb2e4f7c99 Author: Wen Gong Date: Tue Apr 8 13:39:48 2025 +0800 wifi: ath12k: avoid deadlock during regulatory update in ath12k_regd_update() Running this test in a loop it is easy to reproduce an rtnl deadlock: iw reg set FI ifconfig wlan0 down What happens is that thread A (workqueue) tries to update the regulatory: try to acquire the rtnl_lock of ar->regd_update_work rtnl_lock ath12k_regd_update [ath12k] ath12k_regd_update_work [ath12k] process_one_work worker_thread kthread ret_from_fork And thread B (ifconfig) tries to stop the interface: try to cancel_work_sync(&ar->regd_update_work) in ath12k_mac_op_stop(). ifconfig 3109 [003] 2414.232506: probe: ath12k_mac_op_stop [ath12k] drv_stop [mac80211] ieee80211_do_stop [mac80211] ieee80211_stop [mac80211] The sequence of deadlock is: 1. Thread B calls rtnl_lock(). 2. Thread A starts to run and calls rtnl_lock() from within ath12k_regd_update_work(), then enters wait state because the lock is owned by thread B. 3. Thread B tries to call cancel_work_sync(&ar->regd_update_work), but thread A is in ath12k_regd_update_work() waiting for rtnl_lock(). So cancel_work_sync() forever waits for ath12k_regd_update_work() to finish and we have a deadlock. Change to use regulatory_set_wiphy_regd(), which is the asynchronous version of regulatory_set_wiphy_regd_sync(). This way rtnl & wiphy locks are not required so can be removed, and in the end the deadlock issue can be avoided. But a side effect introduced by the asynchronous regd update is that, some essential information used in ath12k_reg_update_chan_list(), which would be called later in ath12k_regd_update(), might has not been updated by cfg80211, as a result wrong channel parameters sent to firmware. To handle this side effect, move ath12k_reg_update_chan_list() to ath12k_reg_notifier(), and advertise WIPHY_FLAG_NOTIFY_REGDOM_BY_DRIVER to cfg80211. This works because, in the process of the asynchronous regd update, after the new regd is processed, cfg80211 will notify ath12k by calling ath12k_reg_notifier(). Since all essential information is updated at that time, we are good to do channel list update. Please note ath12k_reg_notifier() could also be called due to other reasons, like core/beacon/user hints etc. For them we are not allowed to call ath12k_reg_update_chan_list() because regd has not been updated. This is done by verifying the initiator. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Wen Gong Co-developed-by: Baochen Qiang Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250408-rtnl-deadlock-v3-1-fdc12bc511ea@quicinc.com Signed-off-by: Jeff Johnson commit 763216fe6c5df95d122c71ef34c342427c987820 Author: P Praneesh Date: Wed Apr 16 07:49:03 2025 +0530 wifi: ath12k: Add MSDU length validation for TKIP MIC error In the WBM error path, while processing TKIP MIC errors, MSDU length is fetched from the hal_rx_desc's msdu_end. This MSDU length is directly passed to skb_put() without validation. In stress test scenarios, the WBM error ring may receive invalid descriptors, which could lead to an invalid MSDU length. To fix this, add a check to drop the skb when the calculated MSDU length is greater than the skb size. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250416021903.3178962-1-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 9f17747fbda6fca934854463873c4abf8061491d Author: Sarika Sharma Date: Tue Apr 8 10:23:27 2025 +0530 wifi: ath12k: fix invalid access to memory In ath12k_dp_rx_msdu_coalesce(), rxcb is fetched from skb and boolean is_continuation is part of rxcb. Currently, after freeing the skb, the rxcb->is_continuation accessed again which is wrong since the memory is already freed. This might lead use-after-free error. Hence, fix by locally defining bool is_continuation from rxcb, so that after freeing skb, is_continuation can be used. Compile tested only. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Sarika Sharma Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408045327.1632222-1-quic_sarishar@quicinc.com Signed-off-by: Jeff Johnson commit 4541b0c8c3c1b85564971d497224e57cf8076a02 Author: Sarika Sharma Date: Fri Apr 11 11:45:23 2025 +0530 wifi: ath12k: correctly handle mcast packets for clients Currently, RX is_mcbc bit is set for packets sent from client as destination address (DA) is multicast/broadcast address, but packets are actually unicast as receiver address (RA) is not multicast address. Hence, packets are not handled properly due to this is_mcbc bit. Therefore, reset the is_mcbc bit if interface type is AP. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411061523.859387-3-quic_sarishar@quicinc.com Signed-off-by: Jeff Johnson commit cb7433cc5cd4d07175dbc41f5a19966e9fae48be Author: Sarika Sharma Date: Fri Apr 11 11:45:22 2025 +0530 wifi: ath12k: using msdu end descriptor to check for rx multicast packets Currently, the RX multicast broadcast packet check is performed using bit 15 from the info6 field of the MPDU start descriptor. This check can also be done using bit 9 from the info5 field of the MSDU end descriptor. However, in some scenarios multicast bit is not set when fetched from MPDU start descriptor. Therefore, checking the RX multicast broadcast packet from the MSDU end descriptor is more reliable as it is per MSDU. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411061523.859387-2-quic_sarishar@quicinc.com Signed-off-by: Jeff Johnson commit 13324cecbb2c390a11f1fbfe87f3a5e62d6e4591 Author: Aditya Kumar Singh Date: Tue Apr 8 09:51:28 2025 +0530 wifi: ath12k: Update frequency range if reg rules changes During the hardware register, driver updates the frequency range during boot-up. However, if new regulatory rules are applied after boot-up, the frequency range remains based on the older rules. Since different countries have varying regulatory rules, the frequency range can differ. Retaining the frequency range based on outdated rules can be misleading. Update the frequency range according to the new regulatory rules in the function ath12k_regd_update(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Co-developed-by: Rajat Soni Signed-off-by: Rajat Soni Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408042128.720263-4-quic_rajson@quicinc.com Signed-off-by: Jeff Johnson commit 657b0c72c4ad688d424560af98e3258b3f875a4d Author: Aditya Kumar Singh Date: Tue Apr 8 09:51:27 2025 +0530 wifi: ath12k: Fix frequency range in driver During the initial WMI exchange, the firmware updates the hardware-supported start and end frequencies in the ath12k_wmi_hal_reg_capabilities_ext_arg structure. These frequencies, being hardware-supported, may not always align with the current regulatory operating frequencies. When operating as multiple grouped hardwares under a single wiphy, the driver advertises these values directly to the upper layer in the per-radio frequency range, which can be misleading. Sample output snippet from iw phyX info command - [..] Supported wiphy radios: * Idx 0: Frequency Range: 2312 MHz - 2732 MHz [..] * Idx 1: Frequency Range: 5150 MHz - 5330 MHz [..] [..] The frequency range displayed above is incorrect because the driver directly advertises the hardware-supported values to the upper layer. The driver is aware of the current operating regulatory rules, and hence it can use this information to determine the final operating start and end frequencies. To resolve this issue, add support to store the start and end frequencies received during the regulatory update event. Then, intersect these with the hardware-supported start and end frequencies, and finally, advertise the intersected values to the upper layer. Sample output snippet from iw phyX info command after the fix - [..] Supported wiphy radios: * Idx 0: Frequency Range: 2402 MHz - 2472 MHz [..] * Idx 1: Frequency Range: 5170 MHz - 5330 MHz [..] [..] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Co-developed-by: Rajat Soni Signed-off-by: Rajat Soni Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408042128.720263-3-quic_rajson@quicinc.com Signed-off-by: Jeff Johnson commit b7544de8a2984e61b95c58c1c6c1e8ce659b1021 Author: Rajat Soni Date: Tue Apr 8 09:51:26 2025 +0530 wifi: ath12k: Add helper function ath12k_mac_update_freq_range() In a subsequent change, the frequency range needs to be updated with each regulatory update. Since the current function also modifies the DISABLED flag in the actual channel list, which should always align with hardware-supported start and end frequencies rather than the current operating ones, the existing function cannot be called again. Therefore, the logic for setting the frequency range needs to be refactored. To address this, refactor the frequency setting part into a new helper function, ath12k_mac_update_freq_range(). Since this needs to be done independently of updating the DISABLED flag, call the new helper function ath12k_mac_update_freq_range() after updating the channel list for each band. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Rajat Soni Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408042128.720263-2-quic_rajson@quicinc.com Signed-off-by: Jeff Johnson commit 65bf4ed2db9ac3590c7f0545b6bbebbacbfd974f Author: P Praneesh Date: Fri Apr 11 11:31:54 2025 +0530 wifi: ath12k: Use skb->len for dma_unmap_single() length parameter During dma_unmap_single() for extended skb, the driver currently uses sizeof() of the corresponding structure. When the allocation size changes, one of the parameters of dma_unmap_single() needs to be updated everywhere. Improve code readability by using skb->len instead of sizeof() the structure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411060154.1388159-5-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 1e326ada3586277faa1f67e9263fbc09311986a6 Author: P Praneesh Date: Fri Apr 11 11:31:53 2025 +0530 wifi: ath12k: Fix memory leak during extended skb allocation In ath12k_dp_tx(), memory allocated for extended skb is not freed properly, causing a memory leak even when the host receives tx completion for those skbs. Fix this issue by storing skb_ext_desc in the host tx descriptor and using this skb_ext_desc field during completion or during ath12k_dp_cc_cleanup(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411060154.1388159-4-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 10ec3d54df783bc9585b98559a1f556019312462 Author: P Praneesh Date: Fri Apr 11 11:31:52 2025 +0530 wifi: ath12k: Refactor tx descriptor handling in tx completion handler Current code uses mac_id and msdu parameters in ath12k_dp_tx_free_txbuf() and ath12k_dp_tx_process_htt_tx_complete(). Since these parameters are already encapsulated by struct ath12k_dp_tx_desc, passing them individually results in redundant arguments. Introduce struct ath12k_tx_desc_params to capture the skb, mac_id, and pass it to the corresponding functions. Refactor these functions to use struct ath12k_tx_desc_params instead, reducing the number of arguments and improving function argument handling efficiency. Additionally, use struct ath12k_tx_desc_params in ath12k_dp_tx_htt_tx_complete_buf() and ath12k_dp_tx_complete_msdu(), which will be utilized for fetching extended skb in a future patch. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411060154.1388159-3-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 37a068fc9dc4feb8d76e8896bb33883d06c11a6b Author: P Praneesh Date: Fri Apr 11 11:31:51 2025 +0530 wifi: ath12k: Handle error cases during extended skb allocation Currently, in the case of extended skb allocation, the buffer is freed before the DMA unmap operation. This premature deletion can result in skb->data corruption, as the memory region could be re-allocated for other purposes. Fix this issue by reordering the failure cases by calling dma_unmap_single() first, then followed by the corresponding kfree_skb(). This helps avoid data corruption in case of failures in dp_tx(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250411060154.1388159-2-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 4cc9cf2f437ccf6915100c2f38f63cfb1abad6f9 Author: Wolfram Sang Date: Thu Apr 17 13:16:31 2025 +0200 spi: dt-bindings: Fix description mentioning a removed property 'spi-cpha' was removed from this file. So, replace it in the description with an existing example. Reformat the paragraph to adhere to max line length. Fixes: 233363aba72a ("spi/panel: dt-bindings: drop CPHA and CPOL from common properties") Signed-off-by: Wolfram Sang Link: https://patch.msgid.link/20250417111630.53084-2-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown commit 1f3303aa92e15fa273779acac2d0023609de30f1 Author: Huacai Chen Date: Thu Apr 3 12:07:56 2025 +0800 PCI: Add ACS quirk for Loongson PCIe Loongson PCIe Root Ports don't advertise an ACS capability, but they do not allow peer-to-peer transactions between Root Ports. Add an ACS quirk so each Root Port can be in a separate IOMMU group. Signed-off-by: Xianglai Li Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250403040756.720409-1-chenhuacai@loongson.cn commit d24eba726aadf8778f2907dd42281c6380b0ccaa Author: Wilfred Mallawa Date: Mon Apr 14 10:15:06 2025 +1000 PCI: Print the actual delay time in pci_bridge_wait_for_secondary_bus() Print the delay amount that pcie_wait_for_link_delay() is invoked with instead of the hardcoded 1000ms value in the debug info print. Fixes: 7b3ba09febf4 ("PCI/PM: Shorten pci_bridge_wait_for_secondary_bus() wait time for slow links") Signed-off-by: Wilfred Mallawa Signed-off-by: Bjorn Helgaas Reviewed-by: Damien Le Moal Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Mika Westerberg Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/20250414001505.21243-2-wilfred.opensource@gmail.com commit a2c6c1c23bed3506fd87e00c88540ac47832c867 Author: Andy Shevchenko Date: Mon Apr 7 10:03:21 2025 +0300 x86/PCI: Drop 'pci' suffix from intel_mid_pci.c CE4100 PCI specific code has no 'pci' suffix in the filename, intel_mid_pci.c is the only one that duplicates the folder name in its filename, drop that redundancy. While at it, group the respective modules in the Makefile. Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Acked-by: Ingo Molnar Link: https://patch.msgid.link/20250407070321.3761063-1-andriy.shevchenko@linux.intel.com commit 104080e33937aad54b4fbbe847bba750847abfdb Author: Satyanarayana K V P Date: Thu Apr 3 17:36:41 2025 +0530 drm/xe: Introduce fault injection for guc CTB send/recv Fault can be injected with below steps. FAILTYPE=fail_function FAILFUNC=xe_guc_ct_send_recv echo > /sys/kernel/debug/$FAILTYPE/inject echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject printf %#x -19 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose Signed-off-by: Satyanarayana K V P Cc: Matthew Brost Cc: Michał Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Michal Wajdeczko Link: https://lore.kernel.org/r/20250403120641.7258-3-satyanarayana.k.v.p@intel.com commit e9dea328e8392d01b21544587cbcf313e4fdbe26 Author: Satyanarayana K V P Date: Thu Apr 3 17:36:40 2025 +0530 drm/xe: Introduce fault injection for guc mmio send/recv. Fault can be injected with below steps. FAILTYPE=fail_function FAILFUNC=xe_guc_mmio_send_recv echo > /sys/kernel/debug/$FAILTYPE/inject echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject printf %#x -5 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose Signed-off-by: Satyanarayana K V P Cc: Matthew Brost Cc: Michał Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Michal Wajdeczko Link: https://lore.kernel.org/r/20250403120641.7258-2-satyanarayana.k.v.p@intel.com commit 73bf722bbb618df6d7936f97e1d68298fc893718 Author: Michal Wajdeczko Date: Mon Apr 14 22:23:47 2025 +0200 drm/xe: Use GT oriented message to report engine activity error We are enabling/disabling engine activity on per-GT basis, so any errors should be also reported per GT, like: [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to enable engine activity function stats (-ENOSPC) [ ] xe 0000:00:02.0: [drm] GT1: PF: Failed to enable engine activity function stats (-ENOSPC) Signed-off-by: Michal Wajdeczko Cc: Umesh Nerlige Ramappa Cc: Riana Tauro Reviewed-by: Riana Tauro Link: https://lore.kernel.org/r/20250414202347.1909-2-michal.wajdeczko@intel.com commit 8f9d815a89f5d08566c52ae1d18f05fe976b2c59 Author: Michal Wajdeczko Date: Mon Apr 14 22:23:46 2025 +0200 drm/xe/guc: Fix out-of-bound while enabling engine activity stats In the PF mode we allocate array of struct engine_activity_group that holds activity data split for the PF and all potential VFs. But while preparing data for use by VFs we ended with bad index. [ ] BUG: KASAN: slab-out-of-bounds in xe_guc_engine_activity_function_stats+0x41e/0x4f0 [xe] [ ] Call Trace: [ ] [ ] dump_stack_lvl+0x91/0xf0 [ ] print_report+0xd1/0x680 [ ] ? __virt_addr_valid+0x23a/0x440 [ ] ? kasan_addr_to_slab+0xd/0xb0 [ ] kasan_report+0xe7/0x130 [ ] ? xe_guc_engine_activity_function_stats+0x41e/0x4f0 [xe] [ ] ? xe_guc_engine_activity_function_stats+0x41e/0x4f0 [xe] [ ] __asan_report_store8_noabort+0x17/0x30 [ ] xe_guc_engine_activity_function_stats+0x41e/0x4f0 [xe] [ ] pf_engine_activity_stats+0x1b6/0x7f0 [xe] [ ] ? kobject_put+0x5f/0x470 [ ] xe_pci_sriov_configure+0x28c9/0x3270 [xe] [ ] ? __pfx_dev_attr_store+0x10/0x10 [ ] ? kstrtoull+0x3b/0x70 [ ] ? __pfx___lock_acquire+0x10/0x10 [ ] ? kstrtou16+0x65/0xf0 [ ] sriov_numvfs_store+0x20c/0x400 [ ] ? __pfx_sriov_numvfs_store+0x10/0x10 [ ] ? __pfx__copy_from_iter+0x10/0x10 [ ] ? __pfx_dev_attr_store+0x10/0x10 [ ] dev_attr_store+0x3b/0x80 [ ] ? sysfs_file_ops+0x135/0x190 Fixes: 2de3f38fbf89 ("drm/xe: Add support for per-function engine activity") Signed-off-by: Michal Wajdeczko Cc: Umesh Nerlige Ramappa Cc: Riana Tauro Reviewed-by: Riana Tauro Link: https://lore.kernel.org/r/20250414202347.1909-1-michal.wajdeczko@intel.com commit d46b3918fac499f60b7df1cb1437af7344480576 Author: Lukas Wunner Date: Mon Apr 14 16:25:21 2025 +0200 PCI: hotplug: Drop superfluous #include directives In February 2003, historic commit https://git.kernel.org/tglx/history/c/280c1c9a0ea4 ("[PATCH] PCI Hotplug: Replace pcihpfs with sysfs.") removed all invocations of __get_free_page() and free_page() from the PCI hotplug core without also removing the #include directive. It removed all invocations of kern_mount(), mntget() and mntput() without also removing the #include directive. It removed all invocations of lookup_hash() without also removing the #include directive. It removed all invocations of copy_to_user() and copy_from_user() without also removing the #include directive. These #include directives are still unnecessary today, so drop them. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/c19e25bf2cefecc14e0822c6a9bb3a7f546258bc.1744640331.git.lukas@wunner.de commit 240ce924d2718b8f6f622f2a9a9c219b9da736e8 Merge: 22ab6b9467c182 b5c6891b2c5b54 Author: Jakub Kicinski Date: Thu Apr 17 12:23:49 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc3). No conflicts. Adjacent changes: tools/net/ynl/pyynl/ynl_gen_c.py 4d07bbf2d456 ("tools: ynl-gen: don't declare loop iterator in place") 7e8ba0c7de2b ("tools: ynl: don't use genlmsghdr in classic netlink") Signed-off-by: Jakub Kicinski commit fd23ce3eb4a1005bd109977856d12ec0fde7ef75 Merge: ab734b43c81f86 2b7b5b7f100e82 Author: Martin KaFai Lau Date: Thu Apr 17 10:50:56 2025 -0700 Merge branch 'bpf-qdisc' Amery Hung says: ==================== bpf qdisc Hi all, This patchset aims to support implementing qdisc using bpf struct_ops. This version takes a step back and only implements the minimum support for bpf qdisc. 1) support of adding skb to bpf_list and bpf_rbtree directly and 2) classful qdisc are deferred to future patchsets. In addition, we only allow attaching bpf qdisc to root or mq for now. This is to prevent accidentally breaking exisiting classful qdiscs that rely on data in a child qdisc. This limit may be lifted in the future after careful inspection. * Overview * This series supports implementing qdisc using bpf struct_ops. bpf qdisc aims to be a flexible and easy-to-use infrastructure that allows users to quickly experiment with different scheduling algorithms/policies. It only requires users to implement core qdisc logic using bpf and implements the mundane part for them. In addition, the ability to easily communicate between qdisc and other components will also bring new opportunities for new applications and optimizations. * Performance of bpf qdisc * This patchset includes two qdisc examples, bpf_fifo and bpf_fq, for __testing__ purposes. For performance test, we compare selftests and their kernel counterparts to give you a sense of the performance of qdisc implemented in bpf. The implementation of bpf_fq is fairly complex and slightly different from fq so later we only compare the two fifo qdiscs. bpf_fq implements a scheduling algorithm similar to fq before commit 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") was introduced. bpf_fifo uses a single bpf_list as a queue instead of three queues for different priorities in pfifo_fast. The time complexity of fifo however should be similar since the queue selection time is negligible. Test setup: client -> qdisc -------------> server ~~~~~~~~~~~~~~~ ~~~~~~ nested VM1 @ DC1 VM2 @ DC2 Throghput: iperf3 -t 600, 5 times Qdisc Average (GBits/sec) ---------- ------------------- pfifo_fast 12.52 ± 0.26 bpf_fifo 11.72 ± 0.32 fq 10.24 ± 0.13 bpf_fq 11.92 ± 0.64 Latency: sockperf pp --tcp -t 600, 5 times Qdisc Average (usec) ---------- -------------- pfifo_fast 244.58 ± 7.93 bpf_fifo 244.92 ± 15.22 fq 234.30 ± 19.25 bpf_fq 221.34 ± 10.76 Looking at the two fifo qdiscs, the 6.4% drop in throughput in the bpf implementatioin is consistent with previous observation (v8 throughput test on a loopback device). This should be able to be mitigated by supporting adding skb to bpf_list or bpf_rbtree directly in the future. * Clean up skb in bpf qdisc during reset * The current implementation relies on bpf qdisc implementors to correctly release skbs in queues (bpf graphs or maps) in .reset, which might not be a safe thing to do. The solution as Martin has suggested would be supporting private data in struct_ops. This can also help simplifying implementation of qdisc that works with mq. For examples, qdiscs in the selftest mostly use global data. Therefore, even if user add multiple qdisc instances under mq, they would still share the same queue. ==================== Link: https://patch.msgid.link/20250409214606.2000194-1-ameryhung@gmail.com Signed-off-by: Martin KaFai Lau commit 2b7b5b7f100e82ca314e76214626c82b608a1d8d Author: Amery Hung Date: Wed Apr 9 14:46:06 2025 -0700 selftests/bpf: Test attaching bpf qdisc to mq and non root Until we are certain that existing classful qdiscs work with bpf qdisc, make sure we don't allow attaching a bpf qdisc to non root. Meanwhile, attaching to mq is allowed. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-11-ameryhung@gmail.com commit 2b59bd9e4efcfdbb2458bb68da67f7bb40951de9 Author: Amery Hung Date: Wed Apr 9 14:46:05 2025 -0700 selftests/bpf: Add a bpf fq qdisc to selftest This test implements a more sophisticated qdisc using bpf. The bpf fair- queueing (fq) qdisc gives each flow an equal chance to transmit data. It also respects the timestamp of skb for rate limiting. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-10-ameryhung@gmail.com commit 11c701639ba95aac909720678bf073eeaf6ef89c Author: Amery Hung Date: Wed Apr 9 14:46:04 2025 -0700 selftests/bpf: Add a basic fifo qdisc test This selftest includes a bare minimum fifo qdisc, which simply enqueues sk_buffs into the back of a bpf list and dequeues from the front of the list. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-9-ameryhung@gmail.com commit 4b15121da7e5217636ae2edccb12cf7fc49709b3 Author: Amery Hung Date: Wed Apr 9 14:46:03 2025 -0700 libbpf: Support creating and destroying qdisc Extend struct bpf_tc_hook with handle, qdisc name and a new attach type, BPF_TC_QDISC, to allow users to add or remove any qdisc specified in addition to clsact. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-8-ameryhung@gmail.com commit e582778f023b4c9e608b5cca135f17f62b0cd115 Author: Amery Hung Date: Wed Apr 9 14:46:02 2025 -0700 bpf: net_sched: Disable attaching bpf qdisc to non root Do not allow users to attach bpf qdiscs to classful qdiscs. This is to prevent accidentally breaking existings classful qdiscs if they rely on some data in the child qdisc. This restriction can potentially be lifted in the future. Note that, we still allow bpf qdisc to be attached to mq. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-7-ameryhung@gmail.com commit 544e0a1f1e56de5a28251c188aa8f78fe50b31c9 Author: Amery Hung Date: Wed Apr 9 14:46:01 2025 -0700 bpf: net_sched: Support updating bstats Add a kfunc to update Qdisc bstats when an skb is dequeued. The kfunc is only available in .dequeue programs. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-6-ameryhung@gmail.com commit 7a2dafda950b78611dc441c83d105dfdc7082681 Author: Amery Hung Date: Wed Apr 9 14:46:00 2025 -0700 bpf: net_sched: Add a qdisc watchdog timer Add a watchdog timer to bpf qdisc. The watchdog can be used to schedule the execution of qdisc through kfunc, bpf_qdisc_schedule(). It can be useful for building traffic shaping scheduling algorithm, where the time the next packet will be dequeued is known. The implementation relies on struct_ops gen_prologue/epilogue to patch bpf programs provided by users. Operator specific prologue/epilogue kfuncs are introduced instead of watchdog kfuncs so that it is easier to extend prologue/epilogue in the future (writing C vs BPF bytecode). Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-5-ameryhung@gmail.com commit 870c28588afa20d786e2c26e8fcc14e2b9a55616 Author: Amery Hung Date: Wed Apr 9 14:45:59 2025 -0700 bpf: net_sched: Add basic bpf qdisc kfuncs Add basic kfuncs for working on skb in qdisc. Both bpf_qdisc_skb_drop() and bpf_kfree_skb() can be used to release a reference to an skb. However, bpf_qdisc_skb_drop() can only be called in .enqueue where a to_free skb list is available from kernel to defer the release. bpf_kfree_skb() should be used elsewhere. It is also used in bpf_obj_free_fields() when cleaning up skb in maps and collections. bpf_skb_get_hash() returns the flow hash of an skb, which can be used to build flow-based queueing algorithms. Finally, allow users to create read-only dynptr via bpf_dynptr_from_skb(). Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-4-ameryhung@gmail.com commit c8240344956e3f0b4e8f1d40ec3435e47040cacb Author: Amery Hung Date: Wed Apr 9 14:45:58 2025 -0700 bpf: net_sched: Support implementation of Qdisc_ops in bpf The recent advancement in bpf such as allocated objects, bpf list and bpf rbtree has provided powerful and flexible building blocks to realize sophisticated packet scheduling algorithms. As struct_ops now supports core operators in Qdisc_ops, start allowing qdisc to be implemented using bpf struct_ops with this patch. Users can implement Qdisc_ops.{enqueue, dequeue, init, reset, destroy} in bpf and register the qdisc dynamically into the kernel. Co-developed-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Cong Wang Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-3-ameryhung@gmail.com commit a1b669ea16c4d7c1a1a8fc7e25aaf651ea0078c3 Author: Amery Hung Date: Wed Apr 9 14:45:57 2025 -0700 bpf: Prepare to reuse get_ctx_arg_idx Rename get_ctx_arg_idx to bpf_ctx_arg_idx, and allow others to call it. No functional change. Signed-off-by: Amery Hung Signed-off-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409214606.2000194-2-ameryhung@gmail.com commit 5904dc561ef21e69f0b9dca39d1a66e34b7ea764 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:24 2025 +0800 EDAC/{skx_common,i10nm}: Add RRL support for Intel Granite Rapids server Compared to previous generations, Granite Rapids defines the RRL control bits {en_patspr, noover, en} in different positions, adds an extra RRL set for the new mode of the first patrol-scrub read error, and extends the number of CORRERRCNT registers from 4 to 8, encoding one counter per CORRERRCNT register. Add a Granite Rapids reg_rrl configuration table and adjust the code to accommodate the differences mentioned above for RRL support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-8-qiuxu.zhuo@intel.com commit eaa607deb29e0b6fd24b9adf230fbc765f342521 Author: Dave Hansen Date: Mon Apr 14 10:32:44 2025 -0700 x86/mm: Remove now unused SHARED_KERNEL_PMD All the users of SHARED_KERNEL_PMD are gone. Zap it. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173244.1125BEC3%40davehans-spike.ostc.intel.com commit 99b8f0c54f571616d7bf4a776a2863a321c38cb1 Author: Dave Hansen Date: Mon Apr 14 10:32:42 2025 -0700 x86/mm: Remove duplicated PMD preallocation macro MAX_PREALLOCATED_PMDS and PREALLOCATED_PMDS are now identical. Just use PREALLOCATED_PMDS and remove "MAX". Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173242.5ED13A5B%40davehans-spike.ostc.intel.com commit 454e65b4fb38ddeea62472649ef16b5e8d285015 Author: Dave Hansen Date: Mon Apr 14 10:32:41 2025 -0700 x86/mm: Preallocate all PAE page tables Finally, move away from having PAE kernels share any PMDs across processes. This was already the default on PTI kernels which are the common case. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173241.1288CAB4%40davehans-spike.ostc.intel.com commit 82f120010f3b86c2f9c1279452c1ecab7bc117d2 Author: Dave Hansen Date: Mon Apr 14 10:32:40 2025 -0700 x86/mm: Fix up comments around PMD preallocation The "paravirt environment" is no longer in the tree. Axe that part of the comment. Also add a blurb to remind readers that "USER_PMDS" refer to the PTI user *copy* of the page tables, not the user *portion*. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173240.5B1AB322%40davehans-spike.ostc.intel.com commit 45fb940563f80b8138f465f18d71c2d3e4a0724e Author: Dave Hansen Date: Mon Apr 14 10:32:38 2025 -0700 x86/mm: Simplify PAE PGD sharing macros There are a few too many levels of abstraction here. First, just expand the PREALLOCATED_PMDS macro in place to make it clear that it is only conditional on PTI. Second, MAX_PREALLOCATED_PMDS is only used in one spot for an on-stack allocation. It has a *maximum* value of 4. Do not bother with the macro MAX() magic. Just set it to 4. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173238.6E3CDA56%40davehans-spike.ostc.intel.com commit eb9c7f00f22d6ea2a94e00eb4f33a79064681564 Author: Dave Hansen Date: Mon Apr 14 10:32:37 2025 -0700 x86/mm: Always tell core mm to sync kernel mappings Each mm_struct has its own copy of the page tables. When core mm code makes changes to a copy of the page tables those changes sometimes need to be synchronized with other mms' copies of the page tables. But when this synchronization actually needs to happen is highly architecture and configuration specific. In cases where kernel PMDs are shared across processes (SHARED_KERNEL_PMD) the core mm does not itself need to do that synchronization for kernel PMD changes. The x86 code communicates this by clearing the PGTBL_PMD_MODIFIED bit cleared in those configs to avoid expensive synchronization. The kernel is moving toward never sharing kernel PMDs on 32-bit. Prepare for that and make 32-bit PAE always set PGTBL_PMD_MODIFIED, even if there is no modification to synchronize. This obviously adds some synchronization overhead in cases where the kernel page tables are being changed. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173237.EC790E95%40davehans-spike.ostc.intel.com commit b0cc4d19f198cdfd1b58c8f5536670d1dc68cbbd Author: Dave Hansen Date: Mon Apr 14 10:32:35 2025 -0700 x86/mm: Always "broadcast" PMD setting operations Kernel PMDs can either be shared across processes or private to a process. On 64-bit, they are always shared. 32-bit non-PAE hardware does not have PMDs, but the kernel logically squishes them into the PGD and treats them as private. Here are the four cases: 64-bit: Shared 32-bit: non-PAE: Private 32-bit: PAE+ PTI: Private 32-bit: PAE+noPTI: Shared Note that 32-bit is all "Private" except for PAE+noPTI being an oddball. The 32-bit+PAE+noPTI case will be made like the rest of 32-bit shortly. But until that can be done, temporarily treat the 32-bit+PAE+noPTI case as Private. This will do unnecessary walks across pgd_list and unnecessary PTE setting but should be otherwise harmless. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173235.F63F50D1%40davehans-spike.ostc.intel.com commit 780f97e309302fdee05b31c91a4dc81ded4c3702 Author: Dave Hansen Date: Mon Apr 14 10:32:34 2025 -0700 x86/mm: Always allocate a whole page for PAE PGDs A hardware PAE PGD is only 32 bytes. A PGD is PAGE_SIZE in the other paging modes. But for reasons*, the kernel _sometimes_ allocates a whole page even though it only ever uses 32 bytes. Make PAE less weird. Just allocate a page like the other paging modes. This was already being done for PTI (and Xen in the past) and nobody screamed that loudly about it so it can't be that bad. * The original reason for PAGE_SIZE allocations for the PAE PGDs was Xen's need to detect page table writes. But 32-bit PTI forced it too for reasons I'm unclear about. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20250414173234.D34F0C3E%40davehans-spike.ostc.intel.com commit 126168fa2c3e16113ea75a656fff5156a54a5726 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:23 2025 +0800 EDAC/{skx_common,i10nm}: Refactor show_retry_rd_err_log() Make the {valid bit, overwritten status, number} of RRL registers and the {number, offsets, widths} of per-channel CORRERRCNT registers configurable. Refactor show_retry_rd_err_log() to use the configurable fields of struct reg_rrl, making the code more scalable and simpler. No functional changes intended. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-7-qiuxu.zhuo@intel.com commit ba3985c1faf5eb72084ddc31204b076c2a450263 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:22 2025 +0800 EDAC/{skx_common,i10nm}: Refactor enable_retry_rd_err_log() Refactor enable_retry_rd_err_log() using helper functions for both DDR and HBM, making the RRL control bits configurable instead of hard-coded. Additionally, explicitly define the four RRL modes for better readability. No functional changes intended. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-6-qiuxu.zhuo@intel.com commit 1a8a6af663a7f16c9b2779cf728187775735047b Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:21 2025 +0800 EDAC/{skx_common,i10nm}: Structure the per-channel RRL registers As the number of RRL (retry_rd_err_log) registers per memory channel increases, the positions of the RRL control bits and the widths of the RRL registers vary across different CPU generations. Adding RRL support for a new CPU requires handling these differences throughout the RRL-related code. Structure the offsets, widths, control bit positions, set numbers, modes, etc., of the per-channel RRL registers and make them configurable to facilitate easier RRL support for new CPUs. No functional changes are intended. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-5-qiuxu.zhuo@intel.com commit 4878e1e90056230cefd580136d0e6d5689a7b770 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:20 2025 +0800 EDAC/i10nm: Explicitly set the modes of the RRL register sets The i10nm_edac driver uses the default modes (either patrol scrub read or on-demand read) of the RRL register sets configured by the BIOS. Explicitly set the modes during the loading of the i10nm_edac driver with the module parameter retry_rd_err_log=2. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-4-qiuxu.zhuo@intel.com commit eeed3e03f4261e5e381a72ae099ff00ccafbb437 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:19 2025 +0800 EDAC/{skx_common,i10nm}: Fix the loss of saved RRL for HBM pseudo channel 0 When enabling the retry_rd_err_log (RRL) feature during the loading of the i10nm_edac driver with the module parameter retry_rd_err_log=2 (Linux RRL control mode), the default values of the control bits of RRL are saved so that they can be restored during the unloading of the driver. In the current code, the RRL of pseudo channel 1 of HBM overwrites pseudo channel 0 during the loading of the driver, resulting in the loss of saved RRL for pseudo channel 0. This causes the RRL of pseudo channel 0 of HBM to be wrongly restored with the values from pseudo channel 1 when unloading the driver. Fix this issue by creating two separate groups of RRL control registers per channel to save default RRL settings of two {sub-,pseudo-}channels. Fixes: acd4cf68fefe ("EDAC/i10nm: Retrieve and print retry_rd_err_log registers for HBM") Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-3-qiuxu.zhuo@intel.com commit e9996a9ac562b025506f062d23ea60286dbad0a1 Author: Michael Rubin Date: Thu Apr 17 15:38:37 2025 +0000 staging: gpib: Removing unused function CFGn Removing CFGn since it is not called by kernel code nor any of the gpib drivers. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417153837.92690-1-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 20d2d476b3ae18041be423671a8637ed5ffd6958 Author: Qiuxu Zhuo Date: Thu Apr 17 23:07:18 2025 +0800 EDAC/skx_common: Fix general protection fault After loading i10nm_edac (which automatically loads skx_edac_common), if unload only i10nm_edac, then reload it and perform error injection testing, a general protection fault may occur: mce: [Hardware Error]: Machine check events logged Oops: general protection fault ... ... Workqueue: events mce_gen_pool_process RIP: 0010:string+0x53/0xe0 ... Call Trace: ? die_addr+0x37/0x90 ? exc_general_protection+0x1e7/0x3f0 ? asm_exc_general_protection+0x26/0x30 ? string+0x53/0xe0 vsnprintf+0x23e/0x4c0 snprintf+0x4d/0x70 skx_adxl_decode+0x16a/0x330 [skx_edac_common] skx_mce_check_error.part.0+0xf8/0x220 [skx_edac_common] skx_mce_check_error+0x17/0x20 [skx_edac_common] ... The issue arose was because the variable 'adxl_component_count' (inside skx_edac_common), which counts the ADXL components, was not reset. During the reloading of i10nm_edac, the count was incremented by the actual number of ADXL components again, resulting in a count that was double the real number of ADXL components. This led to an out-of-bounds reference to the ADXL component array, causing the general protection fault above. Fix this issue by resetting the 'adxl_component_count' in adxl_put(), which is called during the unloading of {skx,i10nm}_edac. Fixes: 123b15863550 ("EDAC, i10nm: make skx_common.o a separate module") Reported-by: Feng Xu Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Tested-by: Feng Xu Link: https://lore.kernel.org/r/20250417150724.1170168-2-qiuxu.zhuo@intel.com commit 099d2db3625b3baab07d2d5cfcd6cbfa14067ae9 Author: Qiuxu Zhuo Date: Tue Apr 8 21:24:55 2025 +0800 EDAC/igen6: Add Intel Amston Lake SoCs support Intel Amston Lake is a series of SoCs tailored for edge computing needs. The Amston Lake SoCs, equipped with IBECC(In-Band ECC) capability, share the same IBECC registers with Alder Lake-N SoCs. Add the Intel Amston Lake SoC compute die ID for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20250408132455.489046-4-qiuxu.zhuo@intel.com commit ba1f62a0cac84757ca35f4217e3cd3a2654233ae Author: Daniele Ceraolo Spurio Date: Wed Apr 16 13:16:22 2025 -0700 drm/xe/pxp: do not queue unneeded terminations from debugfs The PXP terminate debugfs currently unconditionally simulates a termination, no matter what the HW status is. This is unneeded if PXP is not in use and can cause errors if the HW init hasn't completed yet. To solve these issues, we can simply limit the terminations to the cases where PXP is fully initialized and in use. v2: s/pxp_status/ready/ to avoid confusion with pxp->status (John) Fixes: 385a8015b214 ("drm/xe/pxp: Add PXP debugfs support") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4749 Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Link: https://lore.kernel.org/r/20250416201622.1295369-1-daniele.ceraolospurio@intel.com commit b804d7c59aea05412d5e02a068d9486e9177a9e9 Author: Qiuxu Zhuo Date: Tue Apr 8 21:24:54 2025 +0800 EDAC/igen6: Add Intel Arizona Beach SoCs support The Intel Arizona Beach SoC series is oriented toward network computing. Some types of these SoCs are equipped with IBECC(In-Band ECC) and share the same IBECC registers with Alder Lake-N SoCs. Add a die ID for Arizona Beach SoC for EDAC support. [Tony: s/Arizona Lake/Arizona Beach/ in commit message] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20250408132455.489046-3-qiuxu.zhuo@intel.com commit 20e190b1c1fd88b21cc5106c12cfe6def5ab849d Author: Qiuxu Zhuo Date: Tue Apr 8 21:24:53 2025 +0800 EDAC/igen6: Skip absent memory controllers Some BIOS versions may fuse off certain memory controllers and set the registers of these absent memory controllers to ~0. The current igen6_edac mistakenly enumerates these absent memory controllers and registers them with the EDAC core. Skip the absent memory controllers to avoid mistakenly enumerating them. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20250408132455.489046-2-qiuxu.zhuo@intel.com commit e30b7a75666b3f444abfabed6a144642fa9994d8 Author: Andy Shevchenko Date: Thu Apr 17 18:24:47 2025 +0300 spi: dw: Use spi_bpw_to_bytes() helper Use existing helper to get amount of bytes (as power-of-two value) from bits per word. Signed-off-by: Andy Shevchenko Reviewed-by: David Lechner Link: https://patch.msgid.link/20250417152529.490582-3-andriy.shevchenko@linux.intel.com Acked-by: Mukesh Kumar Savaliya Signed-off-by: Mark Brown commit 163ddf1fea590229c30a8dc4c29ff4febfb895c3 Author: Andy Shevchenko Date: Thu Apr 17 18:24:46 2025 +0300 spi: Add spi_bpw_to_bytes() helper and use it This helper converts the given bits per word to bytes. The result will always be power-of-two, e.g., =============== ================= Input (in bits) Output (in bytes) =============== ================= 5 1 9 2 21 4 37 8 =============== ================= It will return 0 for the 0 input. There are a couple of cases in SPI that are using the same approach and at least one more (in IIO) would benefit of it. Add a helper for everyone. Signed-off-by: Andy Shevchenko Reviewed-by: David Lechner Link: https://patch.msgid.link/20250417152529.490582-2-andriy.shevchenko@linux.intel.com Acked-by: Mukesh Kumar Savaliya Signed-off-by: Mark Brown commit 3d55aebe257ec49f577deb7c8e4acb40dabc05e4 Author: Alexander Baransky Date: Mon Apr 14 20:26:32 2025 +0300 drm/panel: Add Visionox G2647FB105 panel driver Add the driver for Visionox G2647FB105 6.47" FHD Plus CMD mode AMOLED panel support found in: - Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana) - Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco) Signed-off-by: Alexander Baransky Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414172637.197792-3-sanyapilot496@gmail.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414172637.197792-3-sanyapilot496@gmail.com commit 7a5d0cbd8b19403ededbe84f21780f70632d1e09 Author: Alexander Baransky Date: Mon Apr 14 20:26:31 2025 +0300 dt-bindings: display: panel: Add Visionox G2647FB105 Add a DT binding for the Visionox G2647FB105, a 6.47 inch 1080x2340 MIPI-DSI CMD mode AMOLED panel used in: - Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana) - Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco) Xiaomi likes to use different panels in various revisions of the same device. A factory panel even can be replaced with another model in a service center. So, the power configuration of this panel is similar to some Samsung AMOLED panels, e.g. samsung,ams639rq08, which can be found on other sm7150 Xiaomi devices. Even though Samsung panels weren't used in sm7150-xiaomi-tucana and toco, the described voltage rails exist (confirmed by schematics of the device). Signed-off-by: Alexander Baransky Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250414172637.197792-2-sanyapilot496@gmail.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414172637.197792-2-sanyapilot496@gmail.com commit 38d42c261389985e8dd4739dbd97e2dc855e8dd0 Author: AngeloGioacchino Del Regno Date: Mon Apr 14 10:29:18 2025 +0200 drm: panel: Add driver for Himax HX8279 DDIC panels Add a driver for the Himax HX8279-D MIPI-DSI DriverIC with support for the Startek KX070FHFID078 7.0" 1200x1920 IPS panel, found on various MediaTek Genio Evaluation Kit boards and for the Aoly SL101PM1794FOG-v15 10.1" 1200x1920 LCD panel found on some I.MX8MM boards. Link: https://lore.kernel.org/r/20250410072456.387562-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414082918.30298-4-angelogioacchino.delregno@collabora.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414082918.30298-4-angelogioacchino.delregno@collabora.com commit a424c93db7ea8ffd18c6c170501bb898abf05932 Author: AngeloGioacchino Del Regno Date: Mon Apr 14 10:29:17 2025 +0200 dt-bindings: display: panel: Add Himax HX8279/HX8279-D DDIC panels Himax HX8279 is a Display DriverIC suitable for driving LCD MIPI-DSI panels. Describe this DriverIC, the Startek KD070FHFID078 panel found on newer revisions of the MediaTek Genio 510/700/1200 Evaluation Kits (EVK), and the Aoly SL101PM1794FOG-V15 found on some i.MX8MM boards. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250410072456.387562-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250414082918.30298-3-angelogioacchino.delregno@collabora.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414082918.30298-3-angelogioacchino.delregno@collabora.com commit a1958a56e52c87aea94c5cb0c08fe61ede929e7c Author: AngeloGioacchino Del Regno Date: Mon Apr 14 10:29:16 2025 +0200 dt-bindings: vendor-prefixes: Add Shenzhen Aoly Technology Co., Ltd. Aoly is a manufacturer of LCD/IPS displays based in Shenzhen, Mainland China. Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250410072456.387562-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250414082918.30298-2-angelogioacchino.delregno@collabora.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250414082918.30298-2-angelogioacchino.delregno@collabora.com commit 178ac975357e9563ff09d95a9142a0c451480f67 Author: Luca Ceresoli Date: Fri Apr 11 21:19:46 2025 +0200 drm/panel: simple: add Tianma P0700WXF1MBAA panel Add the Tianma P0700WXF1MBAA 7" 1280x800 LVDS RGB TFT LCD panel. Reuse the timings of the TM070JDHG34-00 as they are identical, even though they are described differently by the datasheet as noted in the comment. Power up/down timing are slightly different, so add a new struct panel_desc for that. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-3-acbefe9ea669@bootlin.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-3-acbefe9ea669@bootlin.com commit 716c75afd83c837f14042309126e838de040658b Author: Luca Ceresoli Date: Fri Apr 11 21:19:45 2025 +0200 drm/panel: simple: Tianma TM070JDHG34-00: add delays Add power on/off delays for the Tianma TM070JDHG34-00. Fixes: bf6daaa281f7 ("drm/panel: simple: Add Tianma TM070JDHG34-00 panel support") Cc: stable@vger.kernel.org Signed-off-by: Luca Ceresoli Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-2-acbefe9ea669@bootlin.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-2-acbefe9ea669@bootlin.com commit 12ad686ffdf51920000e7353351b163f3851c474 Author: Luca Ceresoli Date: Fri Apr 11 21:19:44 2025 +0200 dt-bindings: display: simple: Add Tianma P0700WXF1MBAA panel Add the Tianma Micro-electronics P0700WXF1MBAA 7.0" LVDS LCD TFT panel. Acked-by: Conor Dooley Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-1-acbefe9ea669@bootlin.com Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411-tianma-p0700wxf1mbaa-v3-1-acbefe9ea669@bootlin.com commit 5d099706449d54b4693a1c6bb7c2251072234508 Author: Robin Murphy Date: Wed Mar 12 12:05:10 2025 +0000 dmaengine: Add Arm DMA-350 driver Add an initial driver for the Arm Corelink DMA-350 controller, to support basic mem-to-mem async_tx. The design here leaves room for more fun things like peripheral support and scatter-gather chaining to come in future. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/6d7d8efefa935d34977b59a74797ab377528db94.1741780808.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit c4771efa841666f5a202d1d651e2f0fcb315ee7e Author: Robin Murphy Date: Wed Mar 12 12:05:09 2025 +0000 dt-bindings: dma: Add Arm DMA-350 Arm CoreLink DMA-350 is a pleasantly straightforward DMA controller which, although highly configurable, lends itself to a simple binding thanks to plenty of self-describing ID registers. Reviewed-by: Rob Herring (Arm) Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/15830b2a8ff9721e364f30f93ea3993139b0103b.1741780808.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit ebf744fdc080763a243ea6b1a719b1857474a977 Author: Thomas Gessler Date: Fri Mar 14 14:47:15 2025 +0100 dmaengine: xilinx_dma: Set max segment size Set the maximumg DMA segment size from the actual core configuration value. Without this setting, the default value of 64 KiB is reported, and larger sizes cannot be used for IIO DMAEngine buffers. Signed-off-by: Thomas Gessler Tested-by: Folker Schwesinger Link: https://lore.kernel.org/r/20250314134717.703287-1-thomas.gessler@brueckmann-gmbh.de Signed-off-by: Vinod Koul commit 1c398492b2e8d5daf83773684699f03b06af44ce Author: Jie Hai Date: Wed Apr 2 16:54:23 2025 +0800 MAINTAINERS: Maintainer change for hisi_dma I am moving on to other things and longfang is going to take over the role of hisi_dma maintainer. Update the MAINTAINERS accordingly. Signed-off-by: Jie Hai Acked-by: Zhou Wang Link: https://lore.kernel.org/r/20250402085423.347526-1-haijie1@huawei.com Signed-off-by: Vinod Koul commit 99b201481f3fe44eac5cc05238a715b05bca4df5 Author: Sakari Ailus Date: Thu Apr 10 09:58:04 2025 +0300 dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts We're holding more than one Runtime PM usage_counts in at_xdmac_device_terminate_all(). This makes pm_runtime_mark_last_busy() redundant and pm_runtime_put_autosuspend() misleading. Drop pm_runtime_mark_last_busy() and use pm_runtime_put_noidle() to decrement the usage_count, except in the case it may be the last. Signed-off-by: Sakari Ailus Link: https://lore.kernel.org/r/20250410065804.3676582-1-sakari.ailus@linux.intel.com Signed-off-by: Vinod Koul commit 862f3c49a86b85f314c09437d0afd1afc2c02fdd Author: Eder Zulian Date: Fri Apr 11 18:54:51 2025 +0200 dmaengine: ptdma: Remove dead code from pt_dmaengine_register() devm_kasprintf() is used to allocate and format a string and the returned pointer is assigned to 'cmd_cache_name'. However, the variable 'cmd_cache_name' is not effectively used. Remove the dead code. Signed-off-by: Eder Zulian Reviewed-by: Nathan Lynch Acked-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20250411165451.240830-1-ezulian@redhat.com Signed-off-by: Vinod Koul commit 7603b1443cbeba5a237067ababaf11095b5ba380 Merge: 4308487b29f987 5b974f53424d16 Author: Mark Brown Date: Thu Apr 17 16:01:05 2025 +0100 ASoC: mt8195: Add support for MT8395 Radxa NIO 12L Merge series from Julien Massot : This patch series adds support for audio playback on the MT8395-based Radxa NIO 12L platform, which uses the integrated MT6359 codec via internal DAI links. Key additions: - Support for a new `mediatek,mt8195_mt6359` card configuration that does not rely on external codecs like rt5682. - Proper memory region declarations and pinctrl setup for the audio front-end (AFE) and audio DSP (ADSP). - A device tree sound node for headphone audio routing using `DL_SRC_BE` and `AIF1`. - Enhancements to the DT bindings to document the new compatible string, missing link-name, and additional audio routes (Headphone L/R). commit 81244074b518aeb90de5f68e7e825564c29c5c50 Author: Matthew Rosato Date: Fri Apr 11 16:24:33 2025 -0400 iommu/s390: allow larger region tables Extend the aperture calculation to consider sizes beyond the maximum size of a region third table. Attempt to always use the smallest table size possible to avoid unnecessary extra steps during translation. Update reserved region calculations to use the appropriate table size. Signed-off-by: Matthew Rosato Reviewed-by: Niklas Schnelle Tested-by: Niklas Schnelle Link: https://lore.kernel.org/r/20250411202433.181683-6-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel commit d5fbc5efbd98a6c49f9acfca8595efd0f1e59ad8 Author: Matthew Rosato Date: Fri Apr 11 16:24:32 2025 -0400 iommu/s390: support map/unmap for additional table regions Map and unmap ops use the shared dma_walk_cpu_trans routine, update this using the origin_type of the dma_table to determine how many table levels must be walked. Signed-off-by: Matthew Rosato Reviewed-by: Niklas Schnelle Tested-by: Niklas Schnelle Link: https://lore.kernel.org/r/20250411202433.181683-5-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel commit 1fe3f3cad530981e8ff36cefc19c8534bfd401b3 Author: Matthew Rosato Date: Fri Apr 11 16:24:31 2025 -0400 iommu/s390: support iova_to_phys for additional table regions The origin_type of the dma_table is used to determine how many table levels must be traversed for the translation. Reviewed-by: Niklas Schnelle Signed-off-by: Matthew Rosato Tested-by: Niklas Schnelle Link: https://lore.kernel.org/r/20250411202433.181683-4-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel commit a2392b8f1ffc26ac4d9fc5cbf081e91a2e39ca71 Author: Matthew Rosato Date: Fri Apr 11 16:24:30 2025 -0400 iommu/s390: support cleanup of additional table regions Extend the existing dma_cleanup_tables to also handle region second and region first tables. Reviewed-by: Niklas Schnelle Signed-off-by: Matthew Rosato Tested-by: Niklas Schnelle Link: https://lore.kernel.org/r/20250411202433.181683-3-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel commit 83c1aec21064c762a2ee475f0fd19f5241de25bc Author: Matthew Rosato Date: Fri Apr 11 16:24:29 2025 -0400 iommu/s390: set appropriate IOTA region type When registering the I/O Translation Anchor, use the current table type stored in the s390_domain to set the appropriate region type indication. For the moment, the table type will always be stored as region third. Reviewed-by: Niklas Schnelle Signed-off-by: Matthew Rosato Tested-by: Niklas Schnelle Link: https://lore.kernel.org/r/20250411202433.181683-2-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel commit f6a1e89ab6e3001156849944bc6a2dc71ccdad7e Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:08 2025 +0200 iommu/mediatek: Add support for Dimensity 1200 MT6893 MM IOMMU Add support for the two MM IOMMUs found in the MediaTek Dimensity 1200 (MT6893) SoC, used for display, camera, imgsys and vpu. Since the MT6893 SoC is almost fully compatible with MT8192, also move the mt8192_larb_region_msk before the newly introduced mt6893 platform data, as the larb regions from mt8192 are fully reused. Note that the only difference with MT8192 is that MT6893 needs the SHARE_PGTABLE flag. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/20250410144008.475888-3-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel commit 52edd094750a0a08cb54321df07d9cddbdd2b17c Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:07 2025 +0200 dt-bindings: iommu: mediatek: Add binding for MT6893 MM IOMMU Add binding for the MediaTek Dimensity 1200 (MT6893) SoC's MultiMedia (MM) IOMMU. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250410144008.475888-2-angelogioacchino.delregno@collabora.com Signed-off-by: Joerg Roedel commit 0da188c8468d8fe544d0aa2a5f610c78b8d34819 Author: Robin Murphy Date: Thu Mar 20 14:21:28 2025 +0000 iommu: Split out and tidy up Arm Kconfig There are quite a lot of options for the Arm drivers, still all buried in the top-level Kconfig. For ease of use and consistency with all the other subdirectories, break these out into drivers/arm. For similar clarity and self-consistency, also tweak the ARM_SMMU sub-options to use "if" instead of "depends", to match ARM_SMMU_V3. Lastly also clean up the slightly messy description of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT as highlighted by Geert - by now we really shouldn't need commentary on v4.x kernel behaviour anyway - and downgrade it to EXPERT as the first step in the 6-year-old threat to remove it entirely. Cc: Geert Uytterhoeven Signed-off-by: Robin Murphy Reviewed-by: Pranjal Shrivastava Link: https://lore.kernel.org/r/a614ec86ba78c09cd16e348f633f6bb38793391f.1742480488.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 0c8e9c148e29a983e67060fb4944a8ca79d4362a Author: Robin Murphy Date: Tue Mar 11 15:19:25 2025 +0000 iommu: Avoid introducing more races Although the lock-juggling is only a temporary workaround, we don't want it to make things avoidably worse. Jason was right to be nervous, since bus_iommu_probe() doesn't care *which* IOMMU instance it's probing for, so it probably is possible for one walk to finish a probe which a different walk started, thus we do want to check for that. Also there's no need to drop the lock just to have of_iommu_configure() do nothing when a fwspec already exists; check that directly and avoid opening a window at all in that (still somewhat likely) case. Suggested-by: Jason Gunthorpe Signed-off-by: Robin Murphy Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/09d901ad11b3a410fbb6e27f7d04ad4609c3fe4a.1741706365.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 249d3327f0236302a92d9eccb2b32f64c8daaf86 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:11 2025 -0300 iommu/vtd: Remove iommu_alloc_pages_node() Intel is the only thing that uses this now, convert to the size versions, trying to avoid PAGE_SHIFT. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/23-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit c3b42b6ffaed8e0b042224920085c3ae8db89d2a Author: Jason Gunthorpe Date: Tue Apr 8 13:54:10 2025 -0300 iommu/amd: Use iommu_alloc_pages_node_sz() for the IRT Use the actual size of the irq_table allocation, limiting to 128 due to the HW alignment needs. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/22-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 5087f663c21e8ac2af7bd178a9b8da50ff7752ac Author: Jason Gunthorpe Date: Tue Apr 8 13:54:09 2025 -0300 iommu/pages: Remove iommu_alloc_page_node() Use iommu_alloc_pages_node_sz() instead. AMD and Intel are both using 4K pages for these structures since those drivers only work on 4K PAGE_SIZE. riscv is also spec'd to use SZ_4K. Reviewed-by: Lu Baolu Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/21-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 28024569e8bd496f9227fbe37e23f898e4674e54 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:08 2025 -0300 iommu/pages: Remove iommu_alloc_page/pages() A few small changes to the remaining drivers using these will allow them to be removed: - Exynos wants to allocate fixed 16K/8K allocations - Rockchip already has a define SPAGE_SIZE which is used by the dma_map immediately following, using SPAGE_ORDER which is a lg2size - tegra has size constants already for its two allocations Acked-by: Marek Szyprowski Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit d50aaa4a9ffb0149d2187dfe3477300561f06fec Author: Jason Gunthorpe Date: Tue Apr 8 13:54:07 2025 -0300 iommu: Update various drivers to pass in lg2sz instead of order to iommu pages Convert most of the places calling get_order() as an argument to the iommu-pages allocator into order_base_2() or the _sz flavour instead. These places already have an exact size, there is no particular reason to use order here. Reviewed-by: Lu Baolu Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/19-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 9dda3f01ddf056ec023c89e43354fa3caabd8fb9 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:06 2025 -0300 iommu/riscv: Update to use iommu_alloc_pages_node_lg2() One part of RISCV already has a computed size, however the queue allocation must be aligned to 4k. The other objects are 4k by spec. Reviewed-by: Tomasz Jeznach Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/18-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 5faa04c4edd462cc4ded939cea6f5a995f2ad0ec Author: Jason Gunthorpe Date: Tue Apr 8 13:54:05 2025 -0300 iommu/amd: Use roundup_pow_two() instead of get_order() If x >= PAGE_SIZE then: 1 << (get_order(x) + PAGE_SHIFT) == roundup_pow_two() Inline this into the only caller, compute the size of the HW device table in terms of 4K pages which matches the HW definition. Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/17-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit e874c666b15bcb6280c4e747d8de3879bb728829 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:04 2025 -0300 iommu/amd: Change rlookup, irq_lookup, and alias to use kvalloc() This is just CPU memory used by the driver to track things, it doesn't need to use iommu-pages. All of them are indexed by devid and devid is bounded by pci_seg->last_bdf or we are already out of bounds on the page allocation. Switch them to use some version of kvmalloc_array() and drop the now unused constants and remove the tbl_size() round up to PAGE_SIZE multiples logic. Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/16-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit b3efacc451e19a85fb5acb56d95f40532c4e31d2 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:03 2025 -0300 iommu/pages: Allow sub page sizes to be passed into the allocator Generally drivers have a specific idea what their HW structure size should be. In a lot of cases this is related to PAGE_SIZE, but not always. ARM64, for example, allows a 4K IO page table size on a 64K CPU page table system. Currently we don't have any good support for sub page allocations, but make the API accommodate this by accepting a sub page size from the caller and rounding up internally. This is done by moving away from order as the size input and using size: size == 1 << (order + PAGE_SHIFT) Following patches convert drivers away from using order and try to specify allocation sizes independent of PAGE_SIZE. Reviewed-by: Lu Baolu Tested-by: Alejandro Jimenez Tested-by: Nicolin Chen Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/15-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 580ccca4ee53d7f2a2c90044220887daec0dcd9a Author: Jason Gunthorpe Date: Tue Apr 8 13:54:02 2025 -0300 iommu/pages: Move the __GFP_HIGHMEM checks into the common code The entire allocator API is built around using the kernel virtual address, it is illegal to pass GFP_HIGHMEM in as a GFP flag. Block it in the common code. Remove the duplicated checks from drivers. Reviewed-by: Lu Baolu Reviewed-by: Mostafa Saleh Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/14-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 212fcf36c6a6ee948790f9b860e89f87c68deb35 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:01 2025 -0300 iommu/pages: Move from struct page to struct ioptdesc and folio This brings the iommu page table allocator into the modern world of having its own private page descriptor and not re-using fields from struct page for its own purpose. It follows the basic pattern of struct ptdesc which did this transformation for the CPU page table allocator. Currently iommu-pages is pretty basic so this isn't a huge benefit, however I see a coming need for features that CPU allocator has, like sub PAGE_SIZE allocations, and RCU freeing. This provides the base infrastructure to implement those cleanly. Remove numa_node_id() calls from the inlines and instead use NUMA_NO_NODE which will get switched to numa_mem_id(), which seems to be the right ID to use for memory allocations. Reviewed-by: Lu Baolu Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/13-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 27bc9f717f8dd0b987e9e5a59dbbc74f501f67a6 Author: Jason Gunthorpe Date: Tue Apr 8 13:54:00 2025 -0300 iommu/pages: Remove iommu_put_pages_list_old and the _Generic Nothing uses the old list_head path now, remove it. Reviewed-by: Lu Baolu Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/12-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 868240c34eb113e4121d4ad8ad7458d8caad87d3 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:59 2025 -0300 iommu: Change iommu_iotlb_gather to use iommu_page_list This converts the remaining places using list of pages to the new API. The Intel free path was shared with its gather path, so it is converted at the same time. Reviewed-by: Lu Baolu Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/11-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit c70637cdd8cf6942ca20d92a27eddb23d78066ca Author: Jason Gunthorpe Date: Tue Apr 8 13:53:58 2025 -0300 iommu/amd: Convert to use struct iommu_pages_list Change the internal freelist to use struct iommu_pages_list. AMD uses the freelist to batch free the entire table during domain destruction, and to replace table levels with leafs during map. Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/10-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit d4d5153ad6e2ed822a67c1d7e6017e3a1386c78b Author: Jason Gunthorpe Date: Tue Apr 8 13:53:57 2025 -0300 iommu/riscv: Convert to use struct iommu_pages_list Change the internal freelist to use struct iommu_pages_list. riscv uses this page list to free page table levels that are replaced with leaf ptes. Reviewed-by: Tomasz Jeznach Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/9-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 13f43d7cf3e0570004a0d960bc1be23db827c2ff Author: Jason Gunthorpe Date: Tue Apr 8 13:53:56 2025 -0300 iommu/pages: Formalize the freelist API We want to get rid of struct page references outside the internal allocator implementation. The free list has the driver open code something like: list_add_tail(&virt_to_page(ptr)->lru, freelist); Move the above into a small inline and make the freelist into a wrapper type 'struct iommu_pages_list' so that the compiler can help check all the conversion. This struct has also proven helpful in some future ideas to convert to a singly linked list to get an extra pointer in the struct page, and to signal that the pages should be freed with RCU. Use a temporary _Generic so we don't need to rename the free function as the patches progress. Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/8-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit f5af4a4f7ccb58c0022175b3457c840a77463e7a Author: Jason Gunthorpe Date: Tue Apr 8 13:53:55 2025 -0300 iommu/pages: De-inline the substantial functions These are called in a lot of places and are not trivial. Move them to the core module. Tidy some of the comments and function arguments, fold __iommu_alloc_account() into its only caller, change __iommu_free_account() into __iommu_free_page() to remove some duplication. Reviewed-by: Lu Baolu Reviewed-by: Mostafa Saleh Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/7-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 3e8e986ce8a0d5fcf5479212d0c1ece4626c4a27 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:54 2025 -0300 iommu/pages: Remove iommu_free_page() Use iommu_free_pages() instead. Reviewed-by: Lu Baolu Reviewed-by: Mostafa Saleh Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/6-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 4316ba4a50331a963a8c76c7716cd7a4646aa385 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:53 2025 -0300 iommu/pages: Remove the order argument to iommu_free_pages() Now that we have a folio under the allocation iommu_free_pages() can know the order of the original allocation and do the correct thing to free it. The next patch will rename iommu_free_page() to iommu_free_pages() so we have naming consistency with iommu_alloc_pages_node(). Reviewed-by: Lu Baolu Reviewed-by: Mostafa Saleh Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit c11a1a47921515c2707d078eb7bd8f35db20f146 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:52 2025 -0300 iommu/pages: Make iommu_put_pages_list() work with high order allocations alloc_pages_node(, order) needs to be paired with __free_pages(, order) to free all the allocated pages. For order != 0 the return from alloc_pages_node() is just a page list, it hasn't been formed into a folio. However iommu_put_pages_list() just calls put_page() on the head page of an allocation, which will end up leaking the tail pages if order != 0. Fix this by using __GFP_COMP to create a high order folio and then always use put_page() to free the full high order folio. __iommu_free_account() can get the order of the allocation via folio_order(), which corrects the accounting of high order allocations in iommu_put_pages_list(). This is the same technique slub uses. As far as I can tell, none of the places using high order allocations are also using the free list, so this not a current bug. Fixes: 06c375053cef ("iommu/vt-d: add wrapper functions for page allocations") Reviewed-by: Lu Baolu Tested-by: Nicolin Chen Tested-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 8360c03dd9331e60fc6f5dbe512a01a14e8bc3b3 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:51 2025 -0300 iommu/pages: Remove __iommu_alloc_pages()/__iommu_free_pages() These were only used by tegra-smmu and leaked the struct page out of the API. Delete them since tega-smmu has been converted to the other APIs. In the process flatten the call tree so we have fewer one line functions calling other one line functions.. iommu_alloc_pages_node() is the real allocator and everything else can just call it directly. Reviewed-by: Lu Baolu Reviewed-by: Mostafa Saleh Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit a96969a9157650c4cb345bd7323a8f9a3df232f4 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:50 2025 -0300 iommu/tegra: Do not use struct page as the handle for pts Instead use the virtual address and dma_map_single() like as->pd uses. Introduce a small struct tegra_pt instead of void * to have some clarity what is using this API and add compile safety during the conversion. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 50568f87d1e233e8c4893f96e91337510c58bb57 Author: Jason Gunthorpe Date: Tue Apr 8 13:53:49 2025 -0300 iommu/terga: Do not use struct page as the handle for as->pd memory Instead use the virtual address. Change from dma_map_page() to dma_map_single() which works directly on a KVA. Add a type for the pd table level for clarity. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 70cbcb2850ec693e36962295568e876cde88eadc Author: Krzysztof Kozlowski Date: Thu Apr 17 09:46:50 2025 +0200 perf: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers, but only allow to choose to compile them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250417074650.81561-1-krzysztof.kozlowski@linaro.org Signed-off-by: Will Deacon commit fc5106088d6db75df61308ef6de314d1f7959646 Author: Hongbo Yao Date: Tue Apr 1 13:42:48 2025 +0800 perf: arm-ni: Fix missing platform_set_drvdata() Add missing platform_set_drvdata in arm_ni_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU") Signed-off-by: Hongbo Yao Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20250401054248.3985814-1-andy.xu@hj-micro.com Signed-off-by: Will Deacon commit 550300b9a295a591e0721a31f8c964a4bc08d51c Author: Andy Shevchenko Date: Wed Apr 16 12:55:16 2025 +0300 gpiolib: Remove redundant assignment of return variable In some functions the returned variable is assigned to 0 and then reassigned to the actual value. Remove redundant assignments. In one case make it more clear that the assignment is not needed. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-9-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 7cc868831b98eb10e8ae50a8e5a9f04674d1a2ab Author: Andy Shevchenko Date: Wed Apr 16 12:55:15 2025 +0300 gpiolib: Reuse return variable in gpiod_to_irq() There are two variables for the same used in the gpiod_to_irq(). Replace the second by reusing the function top-level one. While at it, refactor the branch to have less lines of code. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-8-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 8c13e6a3d588320327b67727c1b9a0dea843ca74 Author: Andy Shevchenko Date: Wed Apr 16 12:55:14 2025 +0300 gpiolib: Call validate_desc() when VALIDATE_DESC() can't be used Call validate_desc() directly when VALIDATE_DESC() can't be used. It will print additional information useful for debugging. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-7-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 35d9bb5f799a4d8cf6cada0e7dc93a87ca8f6755 Author: Andy Shevchenko Date: Wed Apr 16 12:55:13 2025 +0300 gpiolib: Move validate_desc() and Co upper in the code Move validate_desc() and Co upper in the code to be able to use in the further changes. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-6-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit df6dccb4aeab5f19c8451d960259fd1d911f3129 Author: Andy Shevchenko Date: Wed Apr 16 12:55:12 2025 +0300 gpiolib: Revert "Don't WARN on gpiod_put() for optional GPIO" No need to double check the pointer for NULL since gpiod_free() is using VALIDATE_DESC_VOID() which simply returns in that case. This reverts commit 1d7765ba15aca68f3bc52f59434c1c34855bbb54. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-5-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit b709d676c1029458261121da6ccf65ecbb56f73c Author: Andy Shevchenko Date: Wed Apr 16 12:55:11 2025 +0300 gpiolib: Print actual error when descriptor contains an error pointer Print the actual error when descriptor contains an error pointer. This might help debugging those rare cases. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-4-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit d4fe58c8ea17db3e76cf80ad0fcdc655bba0153c Author: Andy Shevchenko Date: Wed Apr 16 12:55:10 2025 +0300 gpiolib: Convert to use guard()() for gpio_machine_hogs_mutex The driver uses guard()()/scoped_guard() for the rest of the synchronisation calls. Convert to use the same for gpio_machine_hogs_mutex. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit f1d6cd0774bc211429ebf24187dc3d271feb5ed6 Author: Andy Shevchenko Date: Wed Apr 16 12:55:09 2025 +0300 gpiolib: Make taking gpio_lookup_lock consistent There are two ways to take a lock: plain call to the mutex_lock() or using guard()() / scoped_guard(). The driver inconsistently uses both. Make taking gpio_lookup_lock consistent. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250416095645.2027695-2-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit d00553240ef89542661b9088dc50c8ebf480a23e Author: Yixun Lan Date: Sat Apr 12 07:31:29 2025 +0800 gpio: spacemit: add support for K1 SoC Implement GPIO functionality which capable of setting pin as input, output. Also, each pin can be used as interrupt which support rising, falling, or both edge type trigger. Reviewed-by: Alex Elder Reviewed-by: Linus Walleij Signed-off-by: Yixun Lan Link: https://lore.kernel.org/r/20250412-03-k1-gpio-v8-2-1c6862d272ec@gentoo.org Signed-off-by: Bartosz Golaszewski commit 26bb7614fa04278abbf0902d516b884677c12e86 Author: Yixun Lan Date: Sat Apr 12 07:31:28 2025 +0800 dt-bindings: gpio: spacemit: add support for K1 SoC The GPIO controller of K1 support basic functions as input/output, all pins can be used as interrupt which route to one IRQ line, trigger type can be select between rising edge, falling edge, or both. There are four GPIO banks, each consisting of 32 pins. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Signed-off-by: Yixun Lan Link: https://lore.kernel.org/r/20250412-03-k1-gpio-v8-1-1c6862d272ec@gentoo.org Signed-off-by: Bartosz Golaszewski commit 4e8a72f9b7120c5775e051b3c41fd7cc46e1ae8b Author: Bartosz Golaszewski Date: Tue Apr 8 14:59:06 2025 +0200 gpio: tn48m: enable building the module with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-6-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski commit 7bd1710aac0571d4722f1429a9332c57b3a8feaf Author: Danilo Krummrich Date: Sun Apr 13 19:37:04 2025 +0200 rust: dma: require a bound device Require the Bound device context to be able to create new dma::CoherentAllocation instances. DMA memory allocations are only valid to be created for bound devices. Link: https://lore.kernel.org/r/20250413173758.12068-10-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f720efda2db5e609b32100c25d9cf383f082d945 Author: Danilo Krummrich Date: Sun Apr 13 19:37:03 2025 +0200 rust: devres: require a bound device Require the Bound device context to be able to a new Devres container. This ensures that we can't register devres callbacks for unbound devices. Link: https://lore.kernel.org/r/20250413173758.12068-9-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f2a399d7b67c4a6fc0f8e59d1a9eb484efc71b5c Author: Danilo Krummrich Date: Sun Apr 13 19:37:02 2025 +0200 rust: pci: move iomap_region() to impl Device Require the Bound device context to be able to call iomap_region() and iomap_region_sized(). Creating I/O mapping requires the device to be bound. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-8-dakr@kernel.org Signed-off-by: Danilo Krummrich commit f933b7489ffca25c9a33b65441679ee3d2943024 Author: Danilo Krummrich Date: Sun Apr 13 19:37:01 2025 +0200 rust: device: implement Bound device context The Bound device context indicates that a device is bound to a driver. It must be used for APIs that require the device to be bound, such as Devres or dma::CoherentAllocation. Implement Bound and add the corresponding Deref hierarchy, as well as the corresponding ARef conversion for this device context. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-7-dakr@kernel.org [ Add missing `::` prefix in macros. - Danilo ] Signed-off-by: Danilo Krummrich commit 3edaefbf2b1beb9ae1cb2a842f455157b951e9f1 Author: Danilo Krummrich Date: Sun Apr 13 19:37:00 2025 +0200 rust: pci: preserve device context in AsRef Since device::Device has a generic over its context, preserve this device context in AsRef. For instance, when calling pci::Device the new AsRef implementation returns device::Device. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-6-dakr@kernel.org Signed-off-by: Danilo Krummrich commit da6c47c6cb45ffb392e016631c08098ad2a6d418 Author: Danilo Krummrich Date: Sun Apr 13 19:36:59 2025 +0200 rust: platform: preserve device context in AsRef Since device::Device has a generic over its context, preserve this device context in AsRef. For instance, when calling platform::Device the new AsRef implementation returns device::Device. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-5-dakr@kernel.org Signed-off-by: Danilo Krummrich commit d32e4c24a7fe01195ba427c67fc15864279a3c0d Author: Danilo Krummrich Date: Sun Apr 13 19:36:58 2025 +0200 rust: device: implement device context for Device Analogous to bus specific device, implement the DeviceContext generic for generic devices. This is used for APIs that work with generic devices (such as Devres) to evaluate the device's context. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-4-dakr@kernel.org Signed-off-by: Danilo Krummrich commit fbb92b6a534081cabd75861ac9c7a8d29d8effda Author: Danilo Krummrich Date: Sun Apr 13 19:36:57 2025 +0200 rust: device: implement impl_device_context_into_aref! Implement a macro to implement all From conversions of a certain device to ARef. This avoids unnecessary boiler plate code for every device implementation. Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250413173758.12068-3-dakr@kernel.org [ Add missing `::` prefix in macros. - Danilo ] Signed-off-by: Danilo Krummrich commit 7f57afde6a44d9e044885e1125034edd4fda02e8 Author: Hongbo Yao Date: Thu Apr 3 15:09:18 2025 +0800 perf: arm-ni: Unregister PMUs on probe failure When a resource allocation fails in one clock domain of an NI device, we need to properly roll back all previously registered perf PMUs in other clock domains of the same device. Otherwise, it can lead to kernel panics. Calling arm_ni_init+0x0/0xff8 [arm_ni] @ 2374 arm-ni ARMHCB70:00: Failed to request PMU region 0x1f3c13000 arm-ni ARMHCB70:00: probe with driver arm-ni failed with error -16 list_add corruption: next->prev should be prev (fffffd01e9698a18), but was 0000000000000000. (next=ffff10001a0decc8). pstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : list_add_valid_or_report+0x7c/0xb8 lr : list_add_valid_or_report+0x7c/0xb8 Call trace: __list_add_valid_or_report+0x7c/0xb8 perf_pmu_register+0x22c/0x3a0 arm_ni_probe+0x554/0x70c [arm_ni] platform_probe+0x70/0xe8 really_probe+0xc6/0x4d8 driver_probe_device+0x48/0x170 __driver_attach+0x8e/0x1c0 bus_for_each_dev+0x64/0xf0 driver_add+0x138/0x260 bus_add_driver+0x68/0x138 __platform_driver_register+0x2c/0x40 arm_ni_init+0x14/0x2a [arm_ni] do_init_module+0x36/0x298 ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops - BUG: Fatal exception SMP: stopping secondary CPUs Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU") Signed-off-by: Hongbo Yao Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20250403070918.4153839-1-andy.xu@hj-micro.com Signed-off-by: Will Deacon commit cb271c2edfd0ab7204d5ef3c9d5ae9a0710f5bf2 Author: Danilo Krummrich Date: Sun Apr 13 19:36:56 2025 +0200 rust: device: implement impl_device_context_deref! The Deref hierarchy for device context generics is the same for every (bus specific) device. Implement those with a generic macro to avoid duplicated boiler plate code and ensure the correct Deref hierarchy for every device implementation. Co-developed-by: Benno Lossin Signed-off-by: Benno Lossin Reviewed-by: Christian Schrefl Link: https://lore.kernel.org/r/20250413173758.12068-2-dakr@kernel.org [ Add missing `::` prefix in macros. - Danilo ] Signed-off-by: Danilo Krummrich commit e7ae507c024cb78b39b6e277584b1f7e59a99b81 Author: Heiko Carstens Date: Fri Apr 11 15:29:12 2025 +0200 s390: Remove optional third argument of strscpy() if possible The third argument of strscpy() is optional and can be left away iff the destination is an array and the maximum size of the copy is the size of destination. Remove the third argument for those cases where this is possible. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 2eba6f9e6b87bfe32d944409d14cbb134b17a69a Author: Heiko Carstens Date: Fri Apr 11 15:29:11 2025 +0200 s390/ipl: Rename and change strncpy_skip_quote() Rename strncpy_skip_quote() to strscpy_skip_quote() and change its implementation so that the destination string is always NUL terminated. Signed-off-by: Heiko Carstens commit e7b3f9a05889d662f05808ae990f531821c5f760 Author: Heiko Carstens Date: Fri Apr 11 15:29:10 2025 +0200 s390/string: Remove optimized strncpy() There are hardly any strncpy() users left, therefore drop the optimized s390 variant. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 674cd7740257a27e3f81a0b66c9f6e65912eaca6 Author: Robin Murphy Date: Tue Mar 18 14:32:10 2025 +0000 perf/arm-cmn: Remove CMN-600 DTC domain special case The special case for trying to infer the DTC domain for DTC-adjacent nodes on CMN-600 is fragile and buggy - currently resulting in subtly messed up DTC counter allocation - and the theoretical benefit it offers to a tiny minority of use-cases arguably doesn't outweigh the inconsistency it offers to others anyway. Just get rid of it. Fixes: ab33c66fd8f1 ("perf/arm-cmn: Enable per-DTC counter allocation") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/67985e39f53b56385d79a4f1264cf7f9cacedb58.1742308248.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 52ebfe7412ce4b3af54fe962af58efe9b25cd9a9 Author: Peter Zijlstra Date: Thu Apr 17 14:34:13 2025 +0200 x86/mm: Remove the mm_cpumask(prev) warning from switch_mm_irqs_off() The CONFIG_DEBUG_VM=y warning in switch_mm_irqs_off() started triggering in testing: VM_WARN_ON_ONCE(prev != &init_mm && !cpumask_test_cpu(cpu, mm_cpumask(prev))); AFAIU what happens is that unuse_temporary_mm() clears the mm_cpumask() for the current CPU, while switch_mm_irqs_off() then checks that the mm_cpumask() bit is set for the current CPU. While this behaviour hasn't really changed since the following commit: 209954cbc7d0 ("x86/mm/tlb: Update mm_cpumask lazily") introduced both, but the warning is wrong, so remove it. [ mingo: Patchified Peter's email. ] Reported-by: syzbot+c2537ce72a879a38113e@syzkaller.appspotmail.com Reported-by: Borislav Petkov Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Andrew Cooper Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20250414135629.GA17910@noisy.programming.kicks-ass.net commit 4a3fd13054a98c43dfcfcbdb93deb43c7b1b9c34 Author: Dapeng Mi Date: Tue Apr 15 11:44:12 2025 +0000 perf/x86/intel: Introduce pairs of PEBS static calls Arch-PEBS retires IA32_PEBS_ENABLE and MSR_PEBS_DATA_CFG MSRs, so intel_pmu_pebs_enable/disable() and intel_pmu_pebs_enable/disable_all() are not needed to call for ach-PEBS. To make the code cleaner, introduce static calls x86_pmu_pebs_enable/disable() and x86_pmu_pebs_enable/disable_all() instead of adding "x86_pmu.arch_pebs" check directly in these helpers. Suggested-by: Peter Zijlstra Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250415114428.341182-7-dapeng1.mi@linux.intel.com commit acb727e0956a2424f22e5ab8c1ff9a39d1acb150 Author: Dapeng Mi Date: Tue Apr 15 11:44:11 2025 +0000 perf/x86/intel: Rename x86_pmu.pebs to x86_pmu.ds_pebs Since architectural PEBS would be introduced in subsequent patches, rename x86_pmu.pebs to x86_pmu.ds_pebs for distinguishing with the upcoming architectural PEBS. Besides restrict reserve_ds_buffers() helper to work only for the legacy DS based PEBS and avoid it to corrupt the pebs_active flag and release PEBS buffer incorrectly for arch-PEBS since the later patch would reuse these flags and alloc/release_pebs_buffer() helpers for arch-PEBS. Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250415114428.341182-6-dapeng1.mi@linux.intel.com commit d971342d38bf228ea4c137249501eb5be38ee958 Author: Dapeng Mi Date: Tue Apr 15 11:44:10 2025 +0000 perf/x86/intel: Decouple BTS initialization from PEBS initialization Move x86_pmu.bts flag initialization into bts_init() from intel_ds_init() and rename intel_ds_init() to intel_pebs_init() since it fully initializes PEBS now after removing the x86_pmu.bts initialization. It's safe to move x86_pmu.bts into bts_init() since all x86_pmu.bts flag are called after bts_init() execution. Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250415114428.341182-5-dapeng1.mi@linux.intel.com commit 25c623f41438fafc6f63c45e2e141d7bcff78299 Author: Dapeng Mi Date: Tue Apr 15 11:44:09 2025 +0000 perf/x86/intel: Parse CPUID archPerfmonExt leaves for non-hybrid CPUs CPUID archPerfmonExt (0x23) leaves are supported to enumerate CPU level's PMU capabilities on non-hybrid processors as well. This patch supports to parse archPerfmonExt leaves on non-hybrid processors. Architectural PEBS leverages archPerfmonExt sub-leaves 0x4 and 0x5 to enumerate the PEBS capabilities as well. This patch is a precursor of the subsequent arch-PEBS enabling patches. Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250415114428.341182-4-dapeng1.mi@linux.intel.com commit 48d66c89dce1e3687174608a5f5c31d5961a9916 Author: Dapeng Mi Date: Tue Apr 15 11:44:08 2025 +0000 perf/x86/intel: Add PMU support for Clearwater Forest From the PMU's perspective, Clearwater Forest is similar to the previous generation Sierra Forest. The key differences are the ARCH PEBS feature and the new added 3 fixed counters for topdown L1 metrics events. The ARCH PEBS is supported in the following patches. This patch provides support for basic perfmon features and 3 new added fixed counters. Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250415114428.341182-3-dapeng1.mi@linux.intel.com commit b02b41c827de9f4b785f57e82d76d0826cc8398b Author: Peter Zijlstra Date: Wed Apr 16 11:36:24 2025 +0200 perf/core: Fix event timekeeping merge Due to an oversight in merging: da916e96e2de ("perf: Make perf_pmu_unregister() useable") on top of: a3c3c66670ce ("perf/core: Fix child_total_time_enabled accounting bug at task exit") the timekeeping fix from this latter patch got undone. Redo it. Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20250417080815.GI38216@noisy.programming.kicks-ass.net commit 162c9e3faf58eef653c74d0c774e6583d9225467 Author: Peter Zijlstra Date: Tue Apr 15 12:12:52 2025 +0200 perf/core: Fix event->parent life-time issue Due to an oversight in merging: da916e96e2de ("perf: Make perf_pmu_unregister() useable") on top of: 56799bc03565 ("perf: Fix hang while freeing sigtrap event") .. it is now possible to hit put_event(EVENT_TOMBSTONE), which makes the computer sad. This also means that for the event->parent == EVENT_TOMBSTONE, the put_event() matching inherit_event() has gone missing. Previously this was done in perf_event_release_kernel() after calling perf_remove_from_context(), but with it delegated to put_event(), this case is now entirely missed, leading to leaks. Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable") Reported-by: kernel test robot Tested-by: kernel test robot Tested-by: James Clark Tested-by: Venkat Rao Bagalkote Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Closes: https://lore.kernel.org/oe-lkp/202504131701.941039cd-lkp@intel.com Link: https://lkml.kernel.org/r/20250415131446.GN5600@noisy.programming.kicks-ass.net commit 2839f393c69456bc356738e521b2e70b82977f46 Author: Frederic Weisbecker Date: Wed Apr 9 15:01:12 2025 +0200 perf/core: Fix put_ctx() ordering So there are three situations: * If perf_event_free_task() has removed all the children from the parent list before perf_event_release_kernel() got a chance to even iterate them, then it's all good as there is no get_ctx() pending. * If perf_event_release_kernel() iterates a child event, but it gets freed meanwhile by perf_event_free_task() while the mutexes are temporarily unlocked, it's all good because while locking again the ctx mutex, perf_event_release_kernel() observes TASK_TOMBSTONE. * But if perf_event_release_kernel() frees the child event before perf_event_free_task() got a chance, we may face this scenario: perf_event_release_kernel() perf_event_free_task() -------------------------- ------------------------ mutex_lock(&event->child_mutex) get_ctx(child->ctx) mutex_unlock(&event->child_mutex) mutex_lock(ctx->mutex) mutex_lock(&event->child_mutex) perf_remove_from_context(child) mutex_unlock(&event->child_mutex) mutex_unlock(ctx->mutex) // This lock acquires ctx->refcount == 2 // visibility mutex_lock(ctx->mutex) ctx->task = TASK_TOMBSTONE mutex_unlock(ctx->mutex) wait_var_event() // enters prepare_to_wait() since // ctx->refcount == 2 // is guaranteed to be seen set_current_state(TASK_INTERRUPTIBLE) smp_mb() if (ctx->refcount != 1) schedule() put_ctx() // NOT fully ordered! Only RELEASE semantics refcount_dec_and_test() atomic_fetch_sub_release() // So TASK_TOMBSTONE is not guaranteed to be seen if (ctx->task == TASK_TOMBSTONE) wake_up_var() Basically it's a broken store buffer: perf_event_release_kernel() perf_event_free_task() -------------------------- ------------------------ ctx->task = TASK_TOMBSTONE smp_store_release(&ctx->refcount, ctx->refcount - 1) smp_mb() READ_ONCE(ctx->refcount) READ_ONCE(ctx->task) So we need a smp_mb__after_atomic() before looking at ctx->task. Fixes: 59f3aa4a3ee2 ("perf: Simplify perf_event_free_task() wait") Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/Z_ZvmEhjkAhplCBE@localhost.localdomain commit f6938a562a6249000de211a710807ebf0b8fdf26 Author: Peter Zijlstra Date: Wed Apr 16 20:50:27 2025 +0200 perf/core: Fix perf-stat / read() In the zeal to adjust all event->state checks to include the new REVOKED state, one adjustment was made in error. Notably it resulted in read() on the perf filedesc to stop working for any state lower than ERROR, specifically EXIT. This leads to problems with (among others) perf-stat, which wants to read the counts after a program has finished execution. Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable") Reported-by: "Mi, Dapeng" Reported-by: James Clark Tested-by: James Clark Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/77036114-8723-4af9-a068-1d535f4e2e81@linaro.org Link: https://lore.kernel.org/r/20250417080725.GH38216@noisy.programming.kicks-ass.net commit 1d34a0543378aac1b09f7707970c1c75a62bb5a4 Merge: 5c3627b6f0595f 7950de14ff5fd8 Author: Ingo Molnar Date: Thu Apr 17 14:20:57 2025 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 3d1c5b622141418c739291d945686137fd92cd3a Author: Bartosz Golaszewski Date: Tue Apr 8 14:59:04 2025 +0200 gpio: rtd: enable building the module with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-4-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski commit bcb4be090783f0ce1acdff86242e6f55a2137b64 Author: Bartosz Golaszewski Date: Tue Apr 8 14:59:03 2025 +0200 gpio: pl061: enable building the module with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-3-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski commit 4675b78c88a4397adf20eb17e8dcf216d29cb09b Author: Bartosz Golaszewski Date: Tue Apr 8 14:59:02 2025 +0200 gpio: msc313: enable building the module with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-2-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski commit 6273ef3560728f111c480e580970ba25cdee85b1 Author: Bartosz Golaszewski Date: Tue Apr 8 14:59:01 2025 +0200 gpio: zynq: enable building the modules with COMPILE_TEST=y Extend the build coverage by allowing to build the modules with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-1-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski commit d024e482630acfb513027b5e4549a7b792ea8abb Author: Bartosz Golaszewski Date: Tue Apr 8 16:36:29 2025 +0200 gpio: blzp1600: drop dependency on OF headers Use the generic boolean device property getter instead of the OF-specific variant. This allows us to stop pulling in linux/of.h. While at it: drop the of_irq.h inclusion as none of its symbols are used in this driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Nikolaos Pasaloukos Link: https://lore.kernel.org/r/20250408143629.125576-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit df1540f8f311a8b2ef0e450e7e40710784acc8c7 Author: Bartosz Golaszewski Date: Tue Apr 8 10:40:57 2025 +0200 gpio: ds4520: don't check the 'ngpios' property in the driver This is already done by the gpio-regmap abstraction by calling gpiochip_get_ngpios(). We don't need to do this at the driver level. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250408-gpio-regmap-ngpios-v2-1-26f254014f57@linaro.org Signed-off-by: Bartosz Golaszewski commit f74195d4b245a188c424237a0375993c8e2865c7 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:21 2025 +0200 gpio: ich: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-12-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit f3592d252f77e50c737f91389c3a6b6926f82fc3 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:20 2025 +0200 gpio: ich: enable building with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-11-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 8416e1c9717691812e5b7c8ac5936491ae8a0d7a Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:19 2025 +0200 gpio: htc-egpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-10-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 1791226b712841b028a69bc0365e66f46717373a Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:18 2025 +0200 gpio: htc-egpio: enable building with COMPILE_TEST=y Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-9-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit d170eef8d4b07f653fd5158f5b35b7bc0cbfbd07 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:17 2025 +0200 gpio: gw-pld: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-8-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 96af71338208bdb2c53de0876cf50001e20afc84 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:16 2025 +0200 gpio: graniterapids: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-7-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 8bf15cf9f9fca825fc03fb13d166f0ebdc2a0232 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:15 2025 +0200 gpio: f7188: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-6-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit d981e7b3f25fbabca9cdd02aa2a8f16d6f235fc2 Author: Philipp Stanner Date: Thu Apr 17 10:39:04 2025 +0200 spi: pci1xxxx: Use non-hybrid PCI devres API pci1xxxx enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Moreover, since both functions are already managed in this driver, the call to pci_release_regions() is unnecessary. Remove the call to pci_release_regions(). Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250417083902.23483-4-phasta@kernel.org Signed-off-by: Mark Brown commit 23812bbd7d5fe27b6b2e0fe5a8ba4c6f37f26671 Author: Philipp Stanner Date: Thu Apr 17 10:39:02 2025 +0200 spi: spi-cavium-thunderx: Use non-hybrid PCI devres API cavium-thunderx enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Moreover, since both functions are already managed in this driver, the calls to pci_release_regions() are unnecessary. Remove the calls to pci_release_regions(). Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250417083902.23483-2-phasta@kernel.org Signed-off-by: Mark Brown commit 5b974f53424d16165b606e2e2f9208d450a5723c Author: Julien Massot Date: Thu Apr 17 10:44:36 2025 +0200 ASoC: dt-bindings: mt8195: add missing audio routing and link-name Add missing DL_SRC_BE link,as well as Headphone L/R that are provided by mt6359. Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-5-30587426e5dd@collabora.com Signed-off-by: Mark Brown commit 95f6208b20e4d0b427d32e5881be4257a3aab3c8 Author: Julien Massot Date: Thu Apr 17 10:44:35 2025 +0200 ASoC: dt-bindings: mt8195: add compatible mt8195_mt6359 Make it also compatible for platform without external codecs. Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-4-30587426e5dd@collabora.com Signed-off-by: Mark Brown commit 3046e16d0605765ff0c5b99f1fa13fa35312eae9 Author: Julien Massot Date: Thu Apr 17 10:44:34 2025 +0200 ASoC: mediatek: mt8195: Add mt8195-mt6359 card Other mt8195-mt6359 cards rely on external codecs, add a card for board that only use the mt6359 codec. Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-3-30587426e5dd@collabora.com Signed-off-by: Mark Brown commit 7af317f7faaab09d5a78f24605057d11f5955115 Author: Julien Massot Date: Thu Apr 17 10:44:33 2025 +0200 ASoC: mediatek: mt8195: Set ETDM1/2 IN/OUT to COMP_DUMMY() ETDM2_IN_BE and ETDM1_OUT_BE are defined as COMP_EMPTY(), in the case the codec dai_name will be null. Avoid a crash if the device tree is not assigning a codec to these links. [ 1.179936] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 1.181065] Mem abort info: [ 1.181420] ESR = 0x0000000096000004 [ 1.181892] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.182576] SET = 0, FnV = 0 [ 1.182964] EA = 0, S1PTW = 0 [ 1.183367] FSC = 0x04: level 0 translation fault [ 1.183983] Data abort info: [ 1.184406] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 1.185097] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 1.185766] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 1.186439] [0000000000000000] user address but active_mm is swapper [ 1.187239] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 1.188029] Modules linked in: [ 1.188420] CPU: 7 UID: 0 PID: 70 Comm: kworker/u32:1 Not tainted 6.14.0-rc4-next-20250226+ #85 [ 1.189515] Hardware name: Radxa NIO 12L (DT) [ 1.190065] Workqueue: events_unbound deferred_probe_work_func [ 1.190808] pstate: 40400009 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1.191683] pc : __pi_strcmp+0x24/0x140 [ 1.192170] lr : mt8195_mt6359_soc_card_probe+0x224/0x7b0 [ 1.192854] sp : ffff800083473970 [ 1.193271] x29: ffff800083473a10 x28: 0000000000001008 x27: 0000000000000002 [ 1.194168] x26: ffff800082408960 x25: ffff800082417db0 x24: ffff800082417d88 [ 1.195065] x23: 000000000000001e x22: ffff800082dbf480 x21: ffff800082dc07b8 [ 1.195961] x20: 0000000000000000 x19: 0000000000000013 x18: 00000000ffffffff [ 1.196858] x17: 000000040044ffff x16: 005000f2b5503510 x15: 0000000000000006 [ 1.197755] x14: ffff800082407af0 x13: 6e6f69737265766e x12: 692d6b636f6c6374 [ 1.198651] x11: 0000000000000002 x10: ffff80008240b920 x9 : 0000000000000018 [ 1.199547] x8 : 0101010101010101 x7 : 0000000000000000 x6 : 0000000000000000 [ 1.200443] x5 : 0000000000000000 x4 : 8080808080000000 x3 : 303933383978616d [ 1.201339] x2 : 0000000000000000 x1 : ffff80008240b920 x0 : 0000000000000000 [ 1.202236] Call trace: [ 1.202545] __pi_strcmp+0x24/0x140 (P) [ 1.203029] mtk_soundcard_common_probe+0x3bc/0x5b8 [ 1.203644] platform_probe+0x70/0xe8 [ 1.204106] really_probe+0xc8/0x3a0 [ 1.204556] __driver_probe_device+0x84/0x160 [ 1.205104] driver_probe_device+0x44/0x130 [ 1.205630] __device_attach_driver+0xc4/0x170 [ 1.206189] bus_for_each_drv+0x8c/0xf8 [ 1.206672] __device_attach+0xa8/0x1c8 [ 1.207155] device_initial_probe+0x1c/0x30 [ 1.207681] bus_probe_device+0xb0/0xc0 [ 1.208165] deferred_probe_work_func+0xa4/0x100 [ 1.208747] process_one_work+0x158/0x3e0 [ 1.209254] worker_thread+0x2c4/0x3e8 [ 1.209727] kthread+0x134/0x1f0 [ 1.210136] ret_from_fork+0x10/0x20 [ 1.210589] Code: 54000401 b50002c6 d503201f f86a6803 (f8408402) [ 1.211355] ---[ end trace 0000000000000000 ]--- Signed-off-by: Julien Massot Fixes: e70b8dd26711 ("ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link") Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-2-30587426e5dd@collabora.com Signed-off-by: Mark Brown commit 0cb1975c717528b662f096b2874e4dae8a9a2d2e Author: Julien Massot Date: Thu Apr 17 10:44:32 2025 +0200 ASoC: mediatek: mt8195: Move rt5682 specific dapm routes 'HPOL', 'HPOR', and 'Headset Mic' are rt5682 specific, move these routes to mt8195_rt5682_init so we keep 'mt8195_rt5682_routes' for connection between mt8195 and mt6359. Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20250417-mt8395-audio-sof-v1-1-30587426e5dd@collabora.com Signed-off-by: Mark Brown commit 22ab6b9467c1822291a1175a0eb825b7ec057ef9 Merge: 4a1f69b94124c3 422cf22aa332f8 Author: Paolo Abeni Date: Thu Apr 17 13:02:43 2025 +0200 Merge branch 'net-pktgen-fix-checkpatch-code-style-errors-warnings' Peter Seiderer says: ==================== net: pktgen: fix checkpatch code style errors/warnings Fix checkpatch detected code style errors/warnings detected in the file net/core/pktgen.c (remaining checkpatch checks will be addressed in a follow up patch set). ==================== Link: https://patch.msgid.link/20250415112916.113455-1-ps.report@gmx.net Signed-off-by: Paolo Abeni commit 422cf22aa332f80657eac39f6853f1340eabab10 Author: Peter Seiderer Date: Tue Apr 15 13:29:16 2025 +0200 net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy) Fix checkpatch code style warnings: WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #1423: FILE: net/core/pktgen.c:1423: + strcpy(pkt_dev->dst_min, buf); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #1444: FILE: net/core/pktgen.c:1444: + strcpy(pkt_dev->dst_max, buf); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #1554: FILE: net/core/pktgen.c:1554: + strcpy(pkt_dev->src_min, buf); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #1575: FILE: net/core/pktgen.c:1575: + strcpy(pkt_dev->src_max, buf); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #3231: FILE: net/core/pktgen.c:3231: + strcpy(pkt_dev->result, "Starting"); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #3235: FILE: net/core/pktgen.c:3235: + strcpy(pkt_dev->result, "Error starting"); WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #3849: FILE: net/core/pktgen.c:3849: + strcpy(pkt_dev->odevname, ifname); While at it squash memset/strcpy pattern into single strscpy_pad call. Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415112916.113455-4-ps.report@gmx.net Signed-off-by: Paolo Abeni commit 65f5b9cb543189906559d5486dfe2fdf97d433a5 Author: Peter Seiderer Date: Tue Apr 15 13:29:15 2025 +0200 net: pktgen: fix code style (WARNING: please, no space before tabs) Fix checkpatch code style warnings: WARNING: please, no space before tabs #230: FILE: net/core/pktgen.c:230: +#define M_NETIF_RECEIVE ^I1^I/* Inject packets into stack */$ Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415112916.113455-3-ps.report@gmx.net Signed-off-by: Paolo Abeni commit 3bc1ca7e173c10dab03b17d5e8ce9df390721288 Author: Peter Seiderer Date: Tue Apr 15 13:29:14 2025 +0200 net: pktgen: fix code style (ERROR: else should follow close brace '}') Fix checkpatch code style errors: ERROR: else should follow close brace '}' #1317: FILE: net/core/pktgen.c:1317: + } + else And checkpatch follow up code style check: CHECK: Unbalanced braces around else statement #1316: FILE: net/core/pktgen.c:1316: + } else Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415112916.113455-2-ps.report@gmx.net Signed-off-by: Paolo Abeni commit 4a1f69b94124c3bb45de62391e9e07bdd199b00e Merge: 9a0b084a0ff7f8 47ce7c854563fe Author: Paolo Abeni Date: Thu Apr 17 12:52:36 2025 +0200 Merge branch 'mitigate-double-allocations-in-ioam6_iptunnel' Justin Iurman says: ==================== Mitigate double allocations in ioam6_iptunnel Commit dce525185bc9 ("net: ipv6: ioam6_iptunnel: mitigate 2-realloc issue") fixed the double allocation issue in ioam6_iptunnel. However, since commit 92191dd10730 ("net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels"), the fix was left incomplete. Because the cache is now empty when the dst_entry is the same post transformation in order to avoid a reference loop, the double reallocation is back for such cases (e.g., inline mode) which are valid for IOAM. This patch provides a way to detect such cases without having a reference loop in the cache, and so to avoid the double reallocation issue for all cases again. v1: https://lore.kernel.org/netdev/20250410152432.30246-1-justin.iurman@uliege.be/T/#t ==================== Link: https://patch.msgid.link/20250415112554.23823-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni commit 47ce7c854563fe8450e9cb8dcd62c6470e28076b Author: Justin Iurman Date: Tue Apr 15 13:25:54 2025 +0200 net: ipv6: ioam6: fix double reallocation If the dst_entry is the same post transformation (which is a valid use case for IOAM), we don't add it to the cache to avoid a reference loop. Instead, we use a "fake" dst_entry and add it to the cache as a signal. When we read the cache, we compare it with our "fake" dst_entry and therefore detect if we're in the special case. Signed-off-by: Justin Iurman Link: https://patch.msgid.link/20250415112554.23823-3-justin.iurman@uliege.be Signed-off-by: Paolo Abeni commit d55acb9732d981c7a8e07dd63089a77d2938e382 Author: Justin Iurman Date: Tue Apr 15 13:25:53 2025 +0200 net: ipv6: ioam6: use consistent dst names Be consistent and use the same terminology as other lwt users: orig_dst is the dst_entry before the transformation, while dst is either the dst_entry in the cache or the dst_entry after the transformation Signed-off-by: Justin Iurman Link: https://patch.msgid.link/20250415112554.23823-2-justin.iurman@uliege.be Signed-off-by: Paolo Abeni commit 9a0b084a0ff7f8805c57c338603cf60005ee7c7e Merge: df8398fb7bb7a0 959bc330a4396c Author: Paolo Abeni Date: Thu Apr 17 12:30:08 2025 +0200 Merge branch 'introducing-openvpn-data-channel-offload' Antonio Quartulli says: ==================== Introducing OpenVPN Data Channel Offload Notable changes since v25: * removed netdev notifier (was only used for our own devices) * added .dellink implementation to address what was previously done in notifier * removed .ndo_open and moved netif_carrier_off() call to .ndo_init * fixed author in MODULE_AUTHOR() * properly indented checks in ovpn.yaml * switched from TSTATS to DSTATS * removed obsolete comment in ovpn_socket_new() * removed unrelated hunk in ovpn_socket_new() The latest code can also be found at: https://github.com/OpenVPN/ovpn-net-next Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko ==================== Link: https://patch.msgid.link/20250415-b4-ovpn-v26-0-577f6097b964@openvpn.net Signed-off-by: Paolo Abeni commit 959bc330a4396c4c52e790e62e23141967b39ef9 Author: Antonio Quartulli Date: Tue Apr 15 13:17:40 2025 +0200 testing/selftests: add test tool and scripts for ovpn module The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, a bunch of scripts are provided that perform basic functionality tests by means of network namespaces. These scripts take part to the kselftest automation. The output of the scripts, which will appear in the kselftest reports, is a list of steps performed by the scripts plus some output coming from the execution of `ping`, `iperf` and `ovpn-cli` itself. In general it is useful only in case of failure, in order to understand which step has failed and why. Please note: since peer sockets are tied to the userspace process that created them (i.e. exiting the process will result in closing the socket), every run of ovpn-cli that created one will go to background and enter pause(), waiting for the signal which will allow it to terminate. Termination is accomplished at the end of each script by issuing a killall command. Cc: linux-kselftest@vger.kernel.org Cc: Shuah Khan Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-23-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit b756861e6e63b0ddadb06bb9f6c87d06ab29bc6f Author: Antonio Quartulli Date: Tue Apr 15 13:17:39 2025 +0200 ovpn: add basic ethtool support Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250415-b4-ovpn-v26-22-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit a215d253c17ac8e78cea950dc5376eed29ba2d67 Author: Antonio Quartulli Date: Tue Apr 15 13:17:38 2025 +0200 ovpn: notify userspace when a peer is deleted Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-21-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 89d3c0e4612afa1c6429ed68d298e35592fbe208 Author: Antonio Quartulli Date: Tue Apr 15 13:17:37 2025 +0200 ovpn: kill key and notify userspace in case of IV exhaustion IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X seconds/minutes userspace generates a new key and sends it to the kernel. This is based on guestimate and normally default timer value works well. 2) packet count based approach: after X packets/bytes userspace generates a new key and sends it to the kernel. Userspace keeps track of the amount of traffic by periodically polling GET_PEER and fetching the VPN/LINK stats. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-20-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 203e2bf55990c96a7efa928b4407368a548dde97 Author: Antonio Quartulli Date: Tue Apr 15 13:17:36 2025 +0200 ovpn: implement key add/get/del/swap via netlink This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-19-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 1d36a36f6d5347360ef9681a05f6166683bafd1d Author: Antonio Quartulli Date: Tue Apr 15 13:17:35 2025 +0200 ovpn: implement peer add/get/dump/delete via netlink This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-18-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit f0281c1d3732d1ec084fa1e06d1767d33e1a570e Author: Antonio Quartulli Date: Tue Apr 15 13:17:34 2025 +0200 ovpn: add support for updating local or remote UDP endpoint In case of UDP links, the local or remote endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-17-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 3ecfd9349f4093880d5884dbcd0b4be1b5471f47 Author: Antonio Quartulli Date: Tue Apr 15 13:17:33 2025 +0200 ovpn: implement keepalive mechanism OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-16-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit a3aaef8cd1730381392dcc4868b437da7d9ad5ac Author: Antonio Quartulli Date: Tue Apr 15 13:17:32 2025 +0200 ovpn: implement peer lookup logic In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look up. Case 2. is a bit special in the sense that an outgoing packet may not be sent to the peer VPN IP directly, but rather to a network behind it. For this reason we first perform a nexthop lookup in the system routing table and then we use the retrieved nexthop as peer search key. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-15-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 05003b408c201a33637a30b93dcca209be3b7878 Author: Antonio Quartulli Date: Tue Apr 15 13:17:31 2025 +0200 ovpn: implement multi-peer support With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-14-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 36bb1d713a15e361e74249b75a9fd26d64967a7b Author: Antonio Quartulli Date: Tue Apr 15 13:17:30 2025 +0200 ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-13-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 17240749f26e07cafa676688d8a3326086498447 Author: Antonio Quartulli Date: Tue Apr 15 13:17:29 2025 +0200 skb: implement skb_send_sock_locked_with_flags() When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new interface named skb_send_sock_locked_with_flags(). Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Simon Horman Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-12-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 11851cbd60ea1e5abbd97619d69845ead99303d6 Author: Antonio Quartulli Date: Tue Apr 15 13:17:28 2025 +0200 ovpn: implement TCP transport With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_ops, which is declared as extern in the IPv6 module, but it is not fully exported. Therefore this patch is also adding EXPORT_SYMBOL_GPL(inet6_stream_ops) to net/ipv6/af_inet6.c. Cc: David Ahern Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Simon Horman Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-11-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 04ca14955f9ae84a3185e23c4421966938e9d134 Author: Antonio Quartulli Date: Tue Apr 15 13:17:27 2025 +0200 ovpn: store tunnel and transport statistics Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-10-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 8534731dbf2d52a539b94defd06d2a8d3514aacb Author: Antonio Quartulli Date: Tue Apr 15 13:17:26 2025 +0200 ovpn: implement packet processing This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-9-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit ab66abbc769b894324864a68e9dcaf3eb2d4bfdb Author: Antonio Quartulli Date: Tue Apr 15 13:17:25 2025 +0200 ovpn: implement basic RX path (UDP) Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-8-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 08857b5ec5d91d83e69e40a36554a8c7557b7301 Author: Antonio Quartulli Date: Tue Apr 15 13:17:24 2025 +0200 ovpn: implement basic TX path (UDP) Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-7-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit f6226ae7a0cd47aaa9175aca6a1e19600f884cbf Author: Antonio Quartulli Date: Tue Apr 15 13:17:23 2025 +0200 ovpn: introduce the ovpn_socket object This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a later patch. Cc: willemdebruijn.kernel@gmail.com Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-6-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 80747caef33d77f5c1b3d24644e6d7dae69066b5 Author: Antonio Quartulli Date: Tue Apr 15 13:17:22 2025 +0200 ovpn: introduce the ovpn_peer object An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_peer, also the ovpn_bind object is introcued as the two are strictly related. An ovpn_bind object wraps a sockaddr representing the local coordinates being used to talk to a specific peer. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-5-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 8327a3baa9b0561a410d00b209aae621b5a61b1c Author: Antonio Quartulli Date: Tue Apr 15 13:17:21 2025 +0200 ovpn: keep carrier always on for MP interfaces An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-4-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit c2d950c4672a012ea9765c15a389cdcdf919f652 Author: Antonio Quartulli Date: Tue Apr 15 13:17:20 2025 +0200 ovpn: add basic interface creation/destruction/management routines Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-3-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit b7a63391aa982295bbb3125e7d4470f51f31ff0f Author: Antonio Quartulli Date: Tue Apr 15 13:17:19 2025 +0200 ovpn: add basic netlink support This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn/netlink-gen.h Reviewed-by: Donald Hunter Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-2-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 9f23d943eb6b55990acc45ea1e130b20a44c76ce Author: Antonio Quartulli Date: Tue Apr 15 13:17:18 2025 +0200 net: introduce OpenVPN Data Channel Offload (ovpn) OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt, rerouting..). With `ovpn` we intend to move the fast path (data channel) entirely in kernel space and thus improve user measured throughput over the tunnel. `ovpn` is implemented as a simple virtual network device driver, that can be manipulated by means of the standard RTNL APIs. A device of kind `ovpn` allows only IPv4/6 traffic and can be of type: * P2P (peer-to-peer): any packet sent over the interface will be encapsulated and transmitted to the other side (typical OpenVPN client or peer-to-peer behaviour); * P2MP (point-to-multipoint): packets sent over the interface are transmitted to peers based on existing routes (typical OpenVPN server behaviour). After the interface has been created, OpenVPN in userspace can configure it using a new Netlink API. Specifically it is possible to manage peers and their keys. The OpenVPN control channel is multiplexed over the same transport socket by means of OP codes. Anything that is not DATA_V2 (OpenVPN OP code for data traffic) is sent to userspace and handled there. This way the `ovpn` codebase is kept as compact as possible while focusing on handling data traffic only (fast path). Any OpenVPN control feature (like cipher negotiation, TLS handshake, rekeying, etc.) is still fully handled by the userspace process. When userspace establishes a new connection with a peer, it first performs the handshake and then passes the socket to the `ovpn` kernel module, which takes ownership. From this moment on `ovpn` will handle data traffic for the new peer. When control packets are received on the link, they are forwarded to userspace through the same transport socket they were received on, as userspace is still listening to them. Some events (like peer deletion) are sent to a Netlink multicast group. Although it wasn't easy to convince the community, `ovpn` implements only a limited number of the data-channel features supported by the userspace program. Each feature that made it to `ovpn` was attentively vetted to avoid carrying too much legacy along with us (and to give a clear cut to old and probalby-not-so-useful features). Notably, only encryption using AEAD ciphers (specifically ChaCha20Poly1305 and AES-GCM) was implemented. Supporting any other cipher out there was not deemed useful. Both UDP and TCP sockets are supported. As explained above, in case of P2MP mode, OpenVPN will use the main system routing table to decide which packet goes to which peer. This implies that no routing table was re-implemented in the `ovpn` kernel module. This kernel module can be enabled by selecting the CONFIG_OVPN entry in the networking drivers section. NOTE: this first patch introduces the very basic framework only. Features are then added patch by patch, however, although each patch will compile and possibly not break at runtime, only after having applied the full set it is expected to see the ovpn module fully working. Cc: steffen.klassert@secunet.com Cc: antony.antony@secunet.com Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250415-b4-ovpn-v26-1-577f6097b964@openvpn.net Reviewed-by: Sabrina Dubroca Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Abeni commit 498cb872a111e25021ca5e2d91af7b7a2e62630f Author: Nathan Chancellor Date: Mon Apr 14 12:26:07 2025 -0700 x86/boot/startup: Disable LTO for the startup code When building with CONFIG_LTO_CLANG, there is an error in the x86 boot startup code because it builds with a different code model than the rest of the kernel: ld.lld: error: Function Import: link error: linking module flags 'Code Model': IDs have conflicting values: 'i32 2' from vmlinux.a(head64.o at 1302448), and 'i32 1' from vmlinux.a(map_kernel.o at 1314208) ld.lld: error: Function Import: link error: linking module flags 'Code Model': IDs have conflicting values: 'i32 2' from vmlinux.a(common.o at 1306108), and 'i32 1' from vmlinux.a(gdt_idt.o at 1314148) As this directory is for code that only runs during early system initialization, LTO is not very important, so filter out the LTO flags from KBUILD_CFLAGS for arch/x86/boot/startup to resolve the build error. Fixes: 4cecebf200ef ("x86/boot: Move the early GDT/IDT setup code into startup/") Reported-by: Linux Kernel Functional Testing Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Acked-by: Ard Biesheuvel Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: David Woodhouse Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20250414-x86-boot-startup-lto-error-v1-1-7c8bed7c131c@kernel.org Closes: https://lore.kernel.org/CA+G9fYvnun+bhYgtt425LWxzOmj+8Jf3ruKeYxQSx-F6U7aisg@mail.gmail.com/ commit 061f087f5d0bcae9f43ae0101121fcaa999d2809 Author: Biju Das Date: Wed Feb 26 14:45:22 2025 +0000 pwm: Add support for RZ/G2L GPT RZ/G2L General PWM Timer (GPT) composed of 8 channels with 32-bit timer (GPT32E). It supports the following functions * 32 bits x 8 channels * Up-counting or down-counting (saw waves) or up/down-counting (triangle waves) for each counter. * Clock sources independently selectable for each channel * Two I/O pins per channel * Two output compare/input capture registers per channel * For the two output compare/input capture registers of each channel, four registers are provided as buffer registers and are capable of operating as comparison registers when buffering is not in use. * In output compare operation, buffer switching can be at crests or troughs, enabling the generation of laterally asymmetric PWM waveforms. * Registers for setting up frame cycles in each channel (with capability for generating interrupts at overflow or underflow) * Generation of dead times in PWM operation * Synchronous starting, stopping and clearing counters for arbitrary channels * Starting, stopping, clearing and up/down counters in response to input level comparison * Starting, clearing, stopping and up/down counters in response to a maximum of four external triggers * Output pin disable function by dead time error and detected short-circuits between output pins * A/D converter start triggers can be generated (GPT32E0 to GPT32E3) * Enables the noise filter for input capture and external trigger operation Add basic pwm support for RZ/G2L GPT driver by creating separate logical channels for each IOs. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250226144531.176819-4-biju.das.jz@bp.renesas.com Signed-off-by: Uwe Kleine-König commit 9549d22684f19919f23576977830eca3d7b0cd90 Author: Biju Das Date: Wed Feb 26 14:45:20 2025 +0000 dt-bindings: pwm: Add RZ/G2L GPT binding Add device tree bindings for the General PWM Timer (GPT). Reviewed-by: Rob Herring Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250226144531.176819-2-biju.das.jz@bp.renesas.com Signed-off-by: Uwe Kleine-König commit e463b05d10da12b13d03f41a407e2ad043af158f Author: Uwe Kleine-König Date: Tue Apr 8 16:23:54 2025 +0200 pwm: Better document return value of pwm_round_waveform_might_sleep() Better explain how pwm_round_waveform_might_sleep() (and so the respective lowlevel driver callback) is supposed to round and the meaning of the return value. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/db84abf1e82e4498fc0e7c318d2673771d0039fe.1744120697.git.ukleinek@kernel.org [ukleinek: Fix a rst formatting issue reported by Stephen Rothwell] Signed-off-by: Uwe Kleine-König commit bd897149e40cb5c95f3d8546108035d1ea167db5 Author: Dan Carpenter Date: Wed Apr 9 14:00:20 2025 +0300 pwm: loongson: Fix an error code in probe() There is a copy and paste bug so we accidentally returned PTR_ERR(ddata->clk) instead of "ret". Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support") Signed-off-by: Dan Carpenter Reviewed-by: Binbin Zhou Link: https://lore.kernel.org/r/6965a480-745c-426f-b17b-e96af532578f@stanley.mountain Signed-off-by: Uwe Kleine-König commit 938aaed555f3add76531cd204e2d4128ecb84ace Author: Boris Brezillon Date: Mon Apr 14 15:01:20 2025 +0200 drm/panthor: Fix the panthor_gpu_coherency_init() error path The panthor_gpu_coherency_init() call has been moved around, but the error path hasn't been adjusted accordingly. Make sure we undo what has been done before this call in case of failure. Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Link: https://lore.kernel.org/r/20250414130120.581274-1-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 06886c96a1dacf54af9938931e3fc75b4f9fa624 Author: Paul Retourné Date: Wed Apr 16 14:04:09 2025 -0700 staging: gpib: include: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/20250416210411.9300-2-paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 4fd7a1f0f7f281dcbdf2e42a2e30b6d2159deaf4 Author: Alan Borzeszkowski Date: Mon Apr 14 19:55:54 2025 +0200 usb: typec: Connect Type-C port with associated USB4 port If USB3.x device references USB4 host interface, USB4 port can be connected with appropriate Type-C port. By using component framework, and in turn by creating symlinks, userspace can benefit from having Thunderbolt/USB4 connection to Type-C ports. Note: This change introduces dependency on Thunderbolt driver as it's required to properly map USB4 port to Type-C port. Signed-off-by: Alan Borzeszkowski Reviewed-by: Heikki Krogerus Signed-off-by: Mika Westerberg commit e80c235994fd1d7004a4e5d64123f8f07ec80ade Author: Alan Borzeszkowski Date: Mon Apr 14 19:55:53 2025 +0200 thunderbolt: Add Thunderbolt/USB4 <-> USB3 match function This function checks whether given USB4 port device matches with USB3.x port device, using ACPI _DSD property. It is designed to be used by component framework to match USB4 ports with Type-C ports they are connected to. Also, added USB4 config stub in case mapping function is not reachable. Signed-off-by: Alan Borzeszkowski Reviewed-by: Heikki Krogerus Signed-off-by: Mika Westerberg commit f93b5e24640cdb375d9dc282a244b488ce0d5a07 Author: Alan Borzeszkowski Date: Mon Apr 14 19:55:52 2025 +0200 thunderbolt: Expose usb4_port_index() to other modules Make usb4_port_index() available to other files in the driver, rename and add function documentation. Signed-off-by: Alan Borzeszkowski Reviewed-by: Heikki Krogerus Signed-off-by: Mika Westerberg commit c9bc151fb0ef8447f073dc321cdbf9aedb39b2d3 Author: Ruben Wauters Date: Tue Apr 15 16:11:38 2025 +0100 staging: gpib: agilent_02350b: cleanup comments Cleans up the comments in both the c and the h file. Standardises the comment type (/* */) and the indentation. Signed-off-by: Ruben Wauters Link: https://lore.kernel.org/r/20250415151246.30337-1-rubenru09@aol.com Signed-off-by: Greg Kroah-Hartman commit b0b23267b6fc74c5a6ed355643b5c8da58d2866f Author: Michael Rubin Date: Wed Apr 16 20:32:59 2025 +0000 staging: gpib: uapi: Fix CamelCase and IBA Dup Resolved duplicate entry for IbaSPollBit vs IbaSpollBit. Correct CamelCase for IBA enums Adhere to Linux kernel coding style. Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250416203259.7862-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 7567dfdd242aa77b9f7724b0be0f675f163eca91 Author: Michael Rubin Date: Thu Apr 17 00:32:46 2025 +0000 staging: gpib: Removing typedef gpib_interface_t Removing gpib_interface_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-19-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 124248c48d413491cfb86632ec2f8639fa4c4d49 Author: Michael Rubin Date: Thu Apr 17 00:32:45 2025 +0000 staging: gpib: tnt4882: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-18-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 575fb9c3fa03ee4c1de2e7a48d8ac90d633dc29f Author: Michael Rubin Date: Thu Apr 17 00:32:44 2025 +0000 staging: gpib: pc2: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-17-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 4f7c2391168f657209b7321a889a9e6428892708 Author: Michael Rubin Date: Thu Apr 17 00:32:43 2025 +0000 staging: gpib: ni_usb: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-16-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 355582c2388f04e9fcaef484956abe67d19909c7 Author: Michael Rubin Date: Thu Apr 17 00:32:42 2025 +0000 staging: gpib: lpvo_usb: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-15-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 3b306801b146bc3626fd85f29d39e52aad022457 Author: Michael Rubin Date: Thu Apr 17 00:32:41 2025 +0000 staging: gpib: ines: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-14-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 03ccd6cc2356b135b6806782e28aa3297ee89f6d Author: Michael Rubin Date: Thu Apr 17 00:32:40 2025 +0000 staging: gpib: gpibP: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-13-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit c424bd8e483480d586ce2d5b11e5339429f10496 Author: Michael Rubin Date: Thu Apr 17 00:32:39 2025 +0000 staging: gpib: hp2341: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-12-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit e86b18d2b1127d33d33cecb7f0e06e6846d033fd Author: Michael Rubin Date: Thu Apr 17 00:32:38 2025 +0000 staging: gpib: hp_82335: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 57b580be50aeda8fb0836468aa4c486b30415f42 Author: Michael Rubin Date: Thu Apr 17 00:32:37 2025 +0000 staging: gpib: gpio: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 326ecce53e489a7b610b047da0b0f82266f82195 Author: Michael Rubin Date: Thu Apr 17 00:32:36 2025 +0000 staging: gpib: fmh: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 1de93ff920dc839a10c9249d58956c0589896d18 Author: Michael Rubin Date: Thu Apr 17 00:32:35 2025 +0000 staging: gpib: fluke: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 67bfc7529575cc81a765af932d539baa5c01a405 Author: Michael Rubin Date: Thu Apr 17 00:32:34 2025 +0000 staging: gpib: common: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 276da96d9f48183bbc27041f882ed341d79b0eee Author: Michael Rubin Date: Thu Apr 17 00:32:33 2025 +0000 staging: gpib: cec: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit a988518b0272343ea8645727599203b2460c8c8c Author: Michael Rubin Date: Thu Apr 17 00:32:32 2025 +0000 staging: gpib: cb7210: struct gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 476d9feeccf3f0952fa26bcae4cf0264d4f50a9e Author: Michael Rubin Date: Thu Apr 17 00:32:31 2025 +0000 staging: gpib: agilent_82357a: gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 411d0ba3dd3cdd9b968a48061f75ccf4fb6638b9 Author: Michael Rubin Date: Thu Apr 17 00:32:30 2025 +0000 staging: gpib: agilent_82350b: gpib_interface Using Linux code style for struct gpib_interface. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 2492a17bdc6a484bbaa5320377b9eef47e38e22b Author: Michael Rubin Date: Thu Apr 17 00:32:29 2025 +0000 staging: gpib: struct typing for gpib_interface "Having the word "_struct" in the name of the struct doesn't add any information so rename "struct gpib_interface_struct" to "struct gpib_interface". Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417003246.84445-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit d6e1f701c61f227cb8fc1dbabf005f9ee34c5cf4 Author: Michael Rubin Date: Thu Apr 17 00:45:33 2025 +0000 staging: gpib: tnt4882: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-15-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 17598a86ad8deef667251eac81ff99ab09a67523 Author: Michael Rubin Date: Thu Apr 17 00:45:32 2025 +0000 staging: gpib: lpvo_usb_gpib: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-14-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 78001dd08e56cb5390c5e639f15fb60e0576bfe0 Author: Michael Rubin Date: Thu Apr 17 00:45:31 2025 +0000 staging: gpib: gpib_ioctl: u64 over uint64_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u64' over 'uint64_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-13-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6b0bf6f2edd2c0f0f2517664ba22b2c5d6406a8c Author: Michael Rubin Date: Thu Apr 17 00:45:30 2025 +0000 staging: gpib: pc2: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-12-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit fcd93950959aec33f5e4b175341613683e2953a0 Author: Michael Rubin Date: Thu Apr 17 00:45:29 2025 +0000 staging: gpib: ni_usb: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 2ec7c08f391f88700ad855a26b5eb199d1316ebe Author: Michael Rubin Date: Thu Apr 17 00:45:28 2025 +0000 staging: gpib: hp_82341: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 8bf26540438ad8b45c29f3abe50b4b81324cf70c Author: Michael Rubin Date: Thu Apr 17 00:45:27 2025 +0000 staging: gpib: hp_82335: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit aa7f3b35ac16fd4dda0266c4b2681ba0ac3d91b4 Author: Michael Rubin Date: Thu Apr 17 00:45:26 2025 +0000 staging: gpib: gpib_bitbang: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 1128aab1b5d9d60c2fc6b95f0046204475699aeb Author: Michael Rubin Date: Thu Apr 17 00:45:25 2025 +0000 staging: gpib: gpib_os: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 60ec9ca488f33809b50432f96f7935ef404efb42 Author: Michael Rubin Date: Thu Apr 17 00:45:24 2025 +0000 staging: gpib: cec: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 2f960f8aa2ab1e4f12ec285242fc3fc903bcef52 Author: Michael Rubin Date: Thu Apr 17 00:45:23 2025 +0000 staging: gpib: agilent_82357a: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f2390e8a9cc638f1bc696f37b27012431db8e0f0 Author: Michael Rubin Date: Thu Apr 17 00:45:22 2025 +0000 staging: gpib: agilent_82350b: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f207bc3a480060ecc99b386542d7c572234510c7 Author: Michael Rubin Date: Thu Apr 17 00:45:21 2025 +0000 staging: gpib: gpib_user: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit e72334b74423f08f91e02481b99eeec3fb17e08b Author: Michael Rubin Date: Thu Apr 17 00:45:20 2025 +0000 staging: gpib: gpib_ioctl: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250417004533.86765-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit e8961c50ee9cc329b9ba4959aa1b8794fae17ab2 Author: Chiachang Wang Date: Thu Mar 13 02:36:41 2025 +0000 xfrm: Refactor migration setup during the cloning process Previously, migration related setup, such as updating family, destination address, and source address, was performed after the clone was created in `xfrm_state_migrate`. This change moves this setup into the cloning function itself, improving code locality and reducing redundancy. The `xfrm_state_clone_and_setup` function now conditionally applies the migration parameters from struct xfrm_migrate if it is provided. This allows the function to be used both for simple cloning and for cloning with migration setup. Test: Tested with kernel test in the Android tree located in https://android.googlesource.com/kernel/tests/ The xfrm_tunnel_test.py under the tests folder in particular. Signed-off-by: Chiachang Wang Reviewed-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit ab244a394c7f13f6573744b9ca72bb22151a3ec4 Author: Chiachang Wang Date: Thu Mar 13 02:36:40 2025 +0000 xfrm: Migrate offload configuration Add hardware offload configuration to XFRM_MSG_MIGRATE using an option netlink attribute XFRMA_OFFLOAD_DEV. In the existing xfrm_state_migrate(), the xfrm_init_state() is called assuming no hardware offload by default. Even the original xfrm_state is configured with offload, the setting will be reset. If the device is configured with hardware offload, it's reasonable to allow the device to maintain its hardware offload mode. But the device will end up with offload disabled after receiving a migration event when the device migrates the connection from one netdev to another one. The devices that support migration may work with different underlying networks, such as mobile devices. The hardware setting should be forwarded to the different netdev based on the migration configuration. This change provides the capability for user space to migrate from one netdev to another. Test: Tested with kernel test in the Android tree located in https://android.googlesource.com/kernel/tests/ The xfrm_tunnel_test.py under the tests folder in particular. Signed-off-by: Chiachang Wang Reviewed-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit a7924f4c489bb6a3f28850f13eaa3e1d2747d0fb Author: Arnd Bergmann Date: Wed Apr 9 14:23:00 2025 +0200 comedi: ni_atmio: avoid warning for unused device_ids[] table When the driver is built-in, it produces a W=1 warning: drivers/comedi/drivers/ni_atmio.c:209:35: error: 'device_ids' defined but not used [-Werror=unused-const-variable=] 209 | static const struct pnp_device_id device_ids[] = { The actual probe() function has a different way of identifying the hardware, so just mark this one as __maybe_unused so it can be dropped when built-in. Reviewed-by: Ian Abbott Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250409122314.2848028-8-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit c2c707bd45426df6edc5cf9f5f9fd857bd9926a9 Author: Arnd Bergmann Date: Wed Apr 9 14:23:01 2025 +0200 apm-emulation: hide an unused variable The driver_version variable is only used inside of an #ifdef block, which leads to a W=1 warning: drivers/char/apm-emulation.c:144:19: error: 'driver_version' defined but not used [-Werror=unused-const-variable=] Move this into the function using it. Fixes: 7726942fb15e ("[APM] Add shared version of APM emulation") Acked-by: Jiri Kosina Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250409122314.2848028-9-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7ae52a3d7f511c95dad414441db7cfdd6356d88a Author: Sasha Levin Date: Tue Mar 11 12:53:36 2025 -0400 scripts: Add git-resolve tool for full SHA-1 resolution Introduce git-resolve.sh, a tool that resolves short git commit IDs to their full SHA-1 hash. This is particularly useful for navigating references in commit messages and verifying Fixes tags. When faced with ambiguous commit IDs or imprecise references in messages, this tool can help by resolving commit hashes based on not just the ID itself but also the commit subject, making it more robust than standard git rev-parse. This is especially valuable for maintainers who need to verify Fixes tags or cross-reference commits. Unlike proposals to add dates to Fixes tags (which would break existing tooling), this script provides a way to disambiguate commits without changing the established tag format. The script includes several features: - Resolves short commit IDs to full SHA-1 hashes - Uses commit subjects to disambiguate between multiple potential matches - Supports wildcard patterns in subjects with ellipsis (...) - Provides a force mode to attempt resolution by subject when ID lookup fails - Includes comprehensive self-tests Signed-off-by: Sasha Levin Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250311165336.248120-1-sashal@kernel.org Signed-off-by: Greg Kroah-Hartman commit d062463edf1770427dc2d637df4088df4835aa47 Author: Long Li Date: Mon Mar 10 15:12:01 2025 -0700 uio_hv_generic: Set event for all channels on the device Hyper-V may offer a non latency sensitive device with subchannels without monitor bit enabled. The decision is entirely on the Hyper-V host not configurable within guest. When a device has subchannels, also signal events for the subchannel if its monitor bit is disabled. This patch also removes the memory barrier when monitor bit is enabled as it is not necessary. The memory barrier is only needed between setting up interrupt mask and calling vmbus_set_event() when monitor bit is disabled. Signed-off-by: Long Li Reviewed-by: Michael Kelley Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/1741644721-20389-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Greg Kroah-Hartman commit dd09eb0e2cc4ba91cd64dba2b733d3f8e1248fd8 Author: Kees Cook Date: Mon Apr 7 10:29:35 2025 -0700 EISA: Increase length of device names GCC 15's -Wunterminated-string-initialization warned about truncated name strings. Instead of marking them with the "nonstring" attribute[1], increase their length to correctly include enough space for the terminating NUL character, as they are used with %s format specifiers when showing resource allocations in /proc/ioports: seq_printf(m, "%*s%0*llx-%0*llx : %s\n", ..., r->name); The strings in eisa.ids have a max length of 73, and the 50 limit was an arbitrary limit that was removed back in 2008 with commit ca52a49846f1 ("driver core: remove DEVICE_NAME_SIZE define"). Change the limit to 74 so nothing is truncated any more. Additionally fix the Makefile to use "if_changed" instead of "cmd" to detect changes to the command line used to generate the target, otherwise devlist.h won't be rebuilt. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Signed-off-by: Kees Cook Acked-by: Alejandro Colomar Link: https://lore.kernel.org/r/20250407172926.it.281-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 577f88cf24e4532c0f802596c7452da583d79ea6 Author: Chen Ni Date: Mon Apr 14 15:45:59 2025 +0800 char: xillybus: Use to_delayed_work() Use to_delayed_work() instead of open-coding it. Signed-off-by: Chen Ni Acked-by: Eli Billauer Link: https://lore.kernel.org/r/20250414074559.3954142-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 197c2974cb49495925783220b07f5cd0c5ceec08 Merge: 20eb35da409fa6 d2fddbd3479928 Author: Steffen Klassert Date: Thu Apr 17 10:52:07 2025 +0200 Merge branch 'xfrm & bonding: Correct use of xso.real_dev' Cosmin Ratiu says: ==================== This patch series was motivated by fixing a few bugs in the bonding driver related to xfrm state migration on device failover. struct xfrm_dev_offload has two net_device pointers: dev and real_dev. The first one is the device the xfrm_state is offloaded on and the second one is used by the bonding driver to manage the underlying device xfrm_states are actually offloaded on. When bonding isn't used, the two pointers are the same. This causes confusion in drivers: Which device pointer should they use? If they want to support bonding, they need to only use real_dev and never look at dev. Furthermore, real_dev is used without proper locking from multiple code paths and changing it is dangerous. See commit [1] for example. This patch series clears things out by removing all uses of real_dev from outside the bonding driver. Then, the bonding driver is refactored to fix a couple of long standing races and the original bug which motivated this patch series. [1] commit f8cde9805981 ("bonding: fix xfrm real_dev null pointer dereference") v2 -> v3: Added a comment with locking expectations for real_dev. Removed unnecessary bond variable from bond_ipsec_del_sa(). v1 -> v2: Added missing kdoc for various functions. Made bond_ipsec_del_sa() use xso.real_dev instead of curr_active_slave. ==================== Signed-off-by: Steffen Klassert commit df8398fb7bb7a0e509200af56b79343aa133b7d6 Author: Lorenzo Bianconi Date: Tue Apr 15 09:14:34 2025 +0200 net: airoha: Add matchall filter offload support Introduce tc matchall filter offload support in airoha_eth driver. Matchall hw filter is used to implement hw rate policing via tc action police: $tc qdisc add dev eth0 handle ffff: ingress $tc filter add dev eth0 parent ffff: matchall action police \ rate 100mbit burst 1000k drop The current implementation supports just drop/accept as exceed/notexceed actions. Moreover, rate and burst are the only supported configuration parameters. Reviewed-by: Davide Caratti Reviewed-by: Simon Horman Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250415-airoha-hw-rx-ratelimit-v4-1-03458784fbc3@kernel.org Signed-off-by: Paolo Abeni commit 1832fd2bdbf39388e642a138c1448ed147d36641 Author: Jani Nikula Date: Wed Apr 9 21:17:55 2025 +0300 drm/xe/compat: clean up unused platform check macros Clean up unused platform check macros from compat i915_drv.h. Display no longer uses any of the IS_*() platform checks. The remaining users are part of the soc/ code. Note that in a comment. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/2f09b3c60223d9426049a28d3d06a3ec2c6ec348.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a8c2c8d329539e9a5f03f3163ce86a56e4651487 Author: Jani Nikula Date: Wed Apr 9 21:17:54 2025 +0300 drm/i915/audio: don't set LPE audio irq chip data, it's unused Nobody uses the irq chip data. Stop setting it, and as a bonus get rid of another struct drm_i915_private * reference. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/d75ec986093c912de67a42782aa5a49357a9f8e5.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 69cb72d3938f9bf7299190408ae81c655d8ee247 Author: Jani Nikula Date: Wed Apr 9 21:17:53 2025 +0300 drm/i915/display: switch to display->platform.dgfx from IS_DGFX() Prefer display->platform.dgfx based platform detection over the old IS_DGFX() macro. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/99de7f8f26156afbddcdac850088e6a96d322c55.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4a3506d174cf2bf506985e0194873e4e5623ad72 Author: Jani Nikula Date: Wed Apr 9 21:17:52 2025 +0300 drm/i915/hdmi: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/02659f1144180f328167734f7e31499833749c8d.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1058ee1b20da9a818099b5e35122de8c50f05ce0 Author: Jani Nikula Date: Wed Apr 9 21:17:51 2025 +0300 drm/i915/gmbus: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/7a69d2ffa15306da899b98e0d6af09b4df1b7ec3.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5739a143db0631f33fc44dc3d2617591da514898 Author: Jani Nikula Date: Wed Apr 9 21:17:50 2025 +0300 drm/i915/dpio: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/36166cd0cfdb88df4c0322c4edea69fad5ad7177.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit af6fe09131afe6e3f56ef547c2537206f01a1147 Author: Jani Nikula Date: Wed Apr 9 21:17:49 2025 +0300 drm/i915/dp-aux: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/a5cde717001eb2843344beb21ca8907ab2e43d4f.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d42652314cb232a39627089c790d141c11b1c3a2 Author: Jani Nikula Date: Wed Apr 9 21:17:48 2025 +0300 drm/i915/dmc: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/eda2b6cd285ec76d57d91ea3fe33158852aaec22.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 56bcacebadb6f7a52ee1f890142c3a096f6d6073 Author: Jani Nikula Date: Wed Apr 9 21:17:47 2025 +0300 drm/i915/crt: switch to display->platform based platform detection Prefer display->platform based platform detection over the old IS_*() macros. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/83980c1ae53157ef5d65d7ce99b294889622faa8.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d358cee74715ec0cbd616cf425d450623950b159 Author: Jani Nikula Date: Wed Apr 9 21:17:46 2025 +0300 drm/i915/frontbuffer: convert intel_frontbuffer.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_frontbuffer.[ch] to struct intel_display. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/ef0860583b7d6ad141959f84c25657e0c102d6d2.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c370285b81d8a96451b3443bd973d2c27903c242 Author: Jani Nikula Date: Wed Apr 9 21:17:45 2025 +0300 drm/i915/sprite: convert intel_sprite_uapi.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_sprite_uapi.c to struct intel_display. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/d4f71c2976a1a28b4e74c2fc1097090fe7f78743.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 46b5871865ce02cc10977a2f1c575269f9a13770 Author: Jani Nikula Date: Wed Apr 9 21:17:44 2025 +0300 drm/i915/display: convert intel_modeset_verify.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_modeset_verify.[ch] to struct intel_display. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/b01a3ef3dbb2ffdaa6b5e9ebec14f91efcca3049.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c4f9a886eec066155e2c4e37eb91477d8ea9fedf Author: Jani Nikula Date: Wed Apr 9 21:17:43 2025 +0300 drm/i915/display: convert intel_modeset_setup.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_modeset_setup.[ch] to struct intel_display. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/21d51387a36f027313a0687d09a14586eb8f71a6.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8dcb54d440d014fdb560e9bc38684fabcd67d872 Author: Jani Nikula Date: Wed Apr 9 21:17:42 2025 +0300 drm/i915/fb: convert intel_fbdev.[ch] and intel_fbdev_fb.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_fbdev.[ch] and as much as possible of intel_fbdev_fb.[ch] to struct intel_display. Reviewed-by: Chaitanya Kumar Borah Link: https://lore.kernel.org/r/49651754f3716041f97984e47c15d331851870a5.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d6fe216caf15d196e1bf76591440f8f17d58e7ee Author: Dan Carpenter Date: Wed Apr 16 14:09:20 2025 +0300 drm/udl: Set error code in udl_init() Return -ENOMEM if udl_alloc_urb_list() fails. Don't return success. Fixes: fb10144ba426 ("drm/udl: Support adapters without firmware descriptor") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://lore.kernel.org/r/Z_-P4N4_U-xTC9-O@stanley.mountain commit 829d06ba6c502b8c2c7390463fb21d12b4e9b2a5 Author: Frank Li Date: Wed Apr 16 11:08:46 2025 -0400 dt-bindings: pinctrl: convert fsl,vf610-pinctrl.txt to yaml format Convert fsl,vf610-pinctrl.txt to yaml format. Additional changes: - subnode name force pattern to 'grp$' to align other imx chips. Reviewed-by: Rob Herring (Arm) Signed-off-by: Frank Li Link: https://lore.kernel.org/20250416150847.3422218-1-Frank.Li@nxp.com Signed-off-by: Linus Walleij commit b590c928cca7bdc7fd580d52e42bfdc3ac5eeacb Author: Christian Brauner Date: Wed Apr 16 22:05:40 2025 +0200 net, pidfd: report EINVAL for ESRCH dbus-broker relies -EINVAL being returned to indicate ESRCH in [1]. This causes issues for some workloads as reported in [2]. Paper over it until this is fixed in userspace. Link: https://lore.kernel.org/20250416-gegriffen-tiefbau-70cfecb80ac8@brauner Link: https://github.com/bus1/dbus-broker/blob/5d34d91b138fc802a016aa68c093eb81ea31139c/src/util/sockopt.c#L241 [1] Link: https://lore.kernel.org/20250415223454.GA1852104@ax162 [2] Tested-by: Nathan Chancellor Signed-off-by: Christian Brauner commit 92b17a63903b99ddb6326efe10a79f374726d6df Author: Linus Walleij Date: Thu Apr 17 07:22:09 2025 +0200 pinctr: nomadik: abx500: Restrict compile test The ABX500 module depends hard on AB8500_CORE it cannot be compile-tested in isolation. Fixes: 720abc5c58d8 ("pinctrl: abx500: enable building modules with COMPILE_TEST=y") Reported-by: Randy Dunlap Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij Link: https://lore.kernel.org/20250417-abx500-pinctrl-v1-1-0691ad29e2a6@linaro.org commit f7a29377c2531603d6093dda10d06d3d115a795e Author: Guodong Liu Date: Mon Apr 14 16:59:28 2025 +0800 pinctrl: mediatek: Add pinctrl driver on mt8196 Add pinctrl driver support for MediaTek Soc mt8196. Signed-off-by: Guodong Liu Signed-off-by: Cathy Xu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/20250414090215.16091-4-ot_cathy.xu@mediatek.com Signed-off-by: Linus Walleij commit 4c9891e588692f2b78132f4de3e3d639b7e84210 Author: Cathy Xu Date: Mon Apr 14 16:59:26 2025 +0800 dt-bindings: pinctrl: mediatek: Add support for mt8196 Add the new binding document for pinctrl on MediaTek mt8196. Signed-off-by: Guodong Liu Signed-off-by: Cathy Xu Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/20250414090215.16091-2-ot_cathy.xu@mediatek.com Signed-off-by: Linus Walleij commit 8004507179c8208b1b5ac638fc3600b5569e1c17 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:43 2025 +0200 pinctrl: mediatek: Add pinctrl driver for MT6893 Dimensity 1200 Add support for the MediaTek Dimensity 1200 (MT6893) SoC's GPIO/pinmux controller. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/20250410144044.476060-3-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij commit 7acdd10e2219fe17a4af0b8a3846ebe6b42055b5 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:42 2025 +0200 dt-bindings: pinctrl: mediatek: Add support for MT6893 Add bindings for the pin controller found in the MediaTek Dimensity 1200 (MT6983) SoC. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250410144044.476060-2-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij commit 454071ac3cd6ac2a39ce3b7468deb02eedf674a7 Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:48 2025 +0200 pinctrl: qcom: ssbi-mpp: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-6-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit cd5a048c1a175b52ff890514652f8aeb648bdedd Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:47 2025 +0200 pinctrl: qcom: ssbi-gpio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-5-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit b9b4e5bd53f83cee689b4927cf32c65b1e749c74 Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:46 2025 +0200 pinctrl: qcom: spmi-mpp: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-4-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit 1c3f1c1d8375eeceae7aa00e225cecfed5383170 Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:45 2025 +0200 pinctrl: qcom: spmi-gpio: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-3-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit 4dc41ae5c0a9db6a859c5879429171e6fa6de061 Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:44 2025 +0200 pinctrl: qcom: msm: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-2-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit 17bb810d74613be4ca907bcfd432d08637fe641f Author: Bartosz Golaszewski Date: Thu Apr 10 11:34:43 2025 +0200 pinctrl: qcom: lpass-lpi: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-1-6a6891338aae@linaro.org Signed-off-by: Linus Walleij commit 31d820fe4244fbb708efc979554f2adf568513c4 Author: Krzysztof Kozlowski Date: Mon Mar 24 13:51:05 2025 +0100 dt-bindings: pinctrl: mediatek: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250324125105.81774-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 5d7c4697b07b21f790869b18b5d27c0c59f2fd6c Author: Krzysztof Kozlowski Date: Mon Mar 24 13:51:04 2025 +0100 dt-bindings: pinctrl: mediatek: Drop unrelated nodes from DTS example Binding example should not contain other nodes, e.g. consumers of pinctrl of, because this is completely redundant and adds unnecessary bloat. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250324125105.81774-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit c0e1e86173a23d85b6640a6990d41ecfe3e2e8cd Author: Wojciech Slenska Date: Wed Apr 9 10:00:29 2025 +0200 pinctrl: qcom: pinctrl-qcm2290: Add egpio support qcm2290 supports the egpio feature on GPIOs ranging from 98 to 126. This change is necessary to allow these GPIOs to be driven by TLMM. Signed-off-by: Wojciech Slenska Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20250409080030.62254-1-wojciech.slenska@gmail.com Signed-off-by: Linus Walleij commit 1437b5af85938a8989fbb7483ba5f7fc1e6fd703 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:47 2025 +0200 pinctrl: cy8c95x0: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-10-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 089f1cad358dc616fb678f5db56d78e759afbc94 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:46 2025 +0200 pinctrl: ocelot: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-9-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 88c7e0bb9ee84b7bef781e09ae6a3308e405bd94 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:45 2025 +0200 pinctrl: sx150x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-8-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit f087965ab4aaca653d19ea3909b42e7ef2b64ba0 Author: Eder Zulian Date: Tue Apr 15 14:13:12 2025 +0200 dmaengine: ptdma: Remove unused pointer dma_cmd_cache The pointer 'struct kmem_cache *dma_cmd_cache' was introduced in commit 'b0b4a6b10577 ("dmaengine: ptdma: register PTDMA controller as a DMA resource")' but it was never used. Signed-off-by: Eder Zulian Reviewed-by: Nathan Lynch Link: https://lore.kernel.org/r/20250415121312.870124-1-ezulian@redhat.com Signed-off-by: Vinod Koul commit 86900ab620a42396a749b506d4a187820fc3fabe Author: Haren Myneni Date: Wed Apr 16 15:57:42 2025 -0700 powerpc/pseries: Add a char driver for physical-attestation RTAS The RTAS call ibm,physical-attestation is used to retrieve information about the trusted boot state of the firmware and hypervisor on the system, and also Trusted Platform Modules (TPM) data if the system is TCG 2.0 compliant. This RTAS interface expects the caller to define different command structs such as RetrieveTPMLog, RetrievePlatformCertificat and etc, in a work area with a maximum size of 4K bytes and the response buffer will be returned in the same work area. The current implementation of this RTAS function is in the user space but allocation of the work area is restricted with the system lockdown. So this patch implements this RTAS function in the kernel and expose to the user space with open/ioctl/read interfaces. PAPR (2.13+ 21.3 ibm,physical-attestation) defines RTAS function: - Pass the command struct to obtain the response buffer for the specific command. - This RTAS function is sequence RTAS call and has to issue RTAS call multiple times to get the complete response buffer (max 64K). The hypervisor expects the first RTAS call with the sequence 1 and the subsequent calls with the sequence number returned from the previous calls. Expose these interfaces to user space with a /dev/papr-physical-attestation character device using the following programming model: int devfd = open("/dev/papr-physical-attestation"); int fd = ioctl(devfd, PAPR_PHY_ATTEST_IOC_HANDLE, struct papr_phy_attest_io_block); - The user space defines the command struct and requests the response for any command. - Obtain the complete response buffer and returned the buffer as blob to the command specific FD. size = read(fd, buf, len); - Can retrieve the response buffer once or multiple times until the end of BLOB buffer. Implemented this new kernel ABI support in librtas library for system lockdown Signed-off-by: Haren Myneni Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-8-haren@linux.ibm.com commit 8aa9efc0be667f5b982acffaf256100e97bcff03 Author: Haren Myneni Date: Wed Apr 16 15:57:41 2025 -0700 powerpc/pseries: Add papr-platform-dump character driver for dump retrieval ibm,platform-dump RTAS call in combination with writable mapping /dev/mem is issued to collect platform dump from the hypervisor and may need multiple calls to get the complete dump. The current implementation uses rtas_platform_dump() API provided by librtas library to issue these RTAS calls. But /dev/mem access by the user space is prohibited under system lockdown. The solution should be to restrict access to RTAS function in user space and provide kernel interfaces to collect dump. This patch adds papr-platform-dump character driver and expose standard interfaces such as open / ioctl/ read to user space in ways that are compatible with lockdown. PAPR (7.3.3.4.1 ibm,platform-dump) provides a method to obtain the complete dump: - Each dump will be identified by ID called dump tag. - A sequence of RTAS calls have to be issued until retrieve the complete dump. The hypervisor expects the first RTAS call with the sequence 0 and the subsequent calls with the sequence number returned from the previous calls. - The hypervisor returns "dump complete" status once the complete dump is retrieved. But expects one more RTAS call from the partition with the NULL buffer to invalidate dump which means the dump will be removed in the hypervisor. - Sequence of calls are allowed with different dump IDs at the same time but not with the same dump ID. Expose these interfaces to user space with a /dev/papr-platform-dump character device using the following programming model: int devfd = open("/dev/papr-platform-dump", O_RDONLY); int fd = ioctl(devfd,PAPR_PLATFORM_DUMP_IOC_CREATE_HANDLE, &dump_id) - Restrict user space to access with the same dump ID. Typically we do not expect user space requests the dump again for the same dump ID. char *buf = malloc(size); length = read(fd, buf, size); - size should be minimum 1K based on PAPR and <= 4K based on RTAS work area size. It will be restrict to RTAS work area size. Using 4K work area based on the current implementation in librtas library - Each read call issue RTAS call to get the data based on the size requirement and returns bytes returned from the hypervisor - If the previous call returns dump complete status, the next read returns 0 like EOF. ret = ioctl(PAPR_PLATFORM_DUMP_IOC_INVALIDATE, &dump_id) - RTAS call with NULL buffer to invalidates the dump. The read API should use the file descriptor obtained from ioctl based on dump ID so that gets dump contents for the corresponding dump ID. Implemented support in librtas (rtas_platform_dump()) for this new ABI to support system lockdown. Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-7-haren@linux.ibm.com commit 496c7524dcec16d3993382db35b960f8c3955083 Author: Haren Myneni Date: Wed Apr 16 15:57:40 2025 -0700 powerpc/pseries: Add ibm,get-dynamic-sensor-state RTAS call support The RTAS call ibm,get-dynamic-sensor-state is used to get the sensor state identified by the location code and the sensor token. The librtas library provides an API rtas_get_dynamic_sensor() which uses /dev/mem access for work area allocation but is restricted under system lockdown. This patch provides an interface with new ioctl PAPR_DYNAMIC_SENSOR_IOC_GET to the papr-indices character driver which executes this HCALL and copies the sensor state in the user specified ioctl buffer. Refer PAPR 7.3.19 ibm,get-dynamic-sensor-state for more information on this RTAS call. - User input parameters to the RTAS call: location code string and the sensor token Expose these interfaces to user space with a /dev/papr-indices character device using the following programming model: int fd = open("/dev/papr-indices", O_RDWR); int ret = ioctl(fd, PAPR_DYNAMIC_SENSOR_IOC_GET, struct papr_indices_io_block) - The user space specifies input parameters in papr_indices_io_block struct - Returned state for the specified sensor is copied to papr_indices_io_block.dynamic_param.state Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-6-haren@linux.ibm.com commit f60a3796f84f96d21de1a4fa2b9fd0637378f026 Author: Haren Myneni Date: Wed Apr 16 15:57:39 2025 -0700 powerpc/pseries: Add ibm,set-dynamic-indicator RTAS call support The RTAS call ibm,set-dynamic-indicator is used to set the new indicator state identified by a location code. The current implementation uses rtas_set_dynamic_indicator() API provided by librtas library which allocates RMO buffer and issue this RTAS call in the user space. But /dev/mem access by the user space is prohibited under system lockdown. This patch provides an interface with new ioctl PAPR_DYNAMIC_INDICATOR_IOC_SET to the papr-indices character driver and expose this interface to the user space that is compatible with lockdown. Refer PAPR 7.3.18 ibm,set-dynamic-indicator for more information on this RTAS call. - User input parameters to the RTAS call: location code string, indicator token and new state Expose these interfaces to user space with a /dev/papr-indices character device using the following programming model: int fd = open("/dev/papr-indices", O_RDWR); int ret = ioctl(fd, PAPR_DYNAMIC_INDICATOR_IOC_SET, struct papr_indices_io_block) - The user space passes input parameters in papr_indices_io_block struct Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-5-haren@linux.ibm.com commit 6e9aec544682670e884f02fab910021c5d87985e Author: Haren Myneni Date: Wed Apr 16 15:57:38 2025 -0700 powerpc/pseries: Add papr-indices char driver for ibm,get-indices The RTAS call ibm,get-indices is used to obtain indices and location codes for a specified indicator or sensor token. The current implementation uses rtas_get_indices() API provided by librtas library which allocates RMO buffer and issue this RTAS call in the user space. But writable mapping /dev/mem access by the user space is prohibited under system lockdown. To overcome the restricted access in the user space, the kernel provide interfaces to collect indices data from the hypervisor. This patch adds papr-indices character driver and expose standard interfaces such as open / ioctl/ read to user space in ways that are compatible with lockdown. PAPR (2.13 7.3.17 ibm,get-indices RTAS Call) describes the following steps to retrieve all indices data: - User input parameters to the RTAS call: sensor or indicator, and indice type - ibm,get-indices is sequence RTAS call which means has to issue multiple times to get the entire list of indicators or sensors of a particular type. The hypervisor expects the first RTAS call with the sequence 1 and the subsequent calls with the sequence number returned from the previous calls. - The OS may not interleave calls to ibm,get-indices for different indicator or sensor types. Means other RTAS calls with different type should not be issued while the previous type sequence is in progress. So collect the entire list of indices and copied to buffer BLOB during ioctl() and expose this buffer to the user space with the file descriptor. - The hypervisor fills the work area with a specific format but does not return the number of bytes written to the buffer. Instead of parsing the data for each call to determine the data length, copy the work area size (RTAS_GET_INDICES_BUF_SIZE) to the buffer. Return work-area size of data to the user space for each read() call. Expose these interfaces to user space with a /dev/papr-indices character device using the following programming model: int devfd = open("/dev/papr-indices", O_RDONLY); int fd = ioctl(devfd, PAPR_INDICES_IOC_GET, struct papr_indices_io_block) - Collect all indices data for the specified token to the buffer char *buf = malloc(RTAS_GET_INDICES_BUF_SIZE); length = read(fd, buf, RTAS_GET_INDICES_BUF_SIZE) - RTAS_GET_INDICES_BUF_SIZE of data is returned to the user space. - The user space retrieves the indices and their location codes from the buffer - Should issue multiple read() calls until reaches the end of BLOB buffer. The read() should use the file descriptor obtained from ioctl to get the data that is exposed to file descriptor. Implemented support in librtas (rtas_get_indices()) for this new ABI for system lockdown. Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-4-haren@linux.ibm.com commit 43d869ac25f17923473a03dcf001af073b7c0a56 Author: Haren Myneni Date: Wed Apr 16 15:57:37 2025 -0700 powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls To issue ibm,get-indices, ibm,set-dynamic-indicator and ibm,get-dynamic-sensor-state in the user space, the RMO buffer is allocated for the work area which is restricted under system lockdown. So instead of user space execution, the kernel will provide /dev/papr-indices interface to execute these RTAS calls. The user space assigns data in papr_indices_io_block struct depends on the specific HCALL and passes to the following ioctls: PAPR_INDICES_IOC_GET: Use for ibm,get-indices. Returns a get-indices handle fd to read data. PAPR_DYNAMIC_SENSOR_IOC_GET: Use for ibm,get-dynamic-sensor-state. Updates the sensor state in papr_indices_io_block.dynamic_param.state PAPR_DYNAMIC_INDICATOR_IOC_SET: Use for ibm,set-dynamic-indicator. Sets the new state for the input indicator. Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-3-haren@linux.ibm.com commit ecc45d4f8ce8e1953f703b4d13d882f2e8ce689d Author: Haren Myneni Date: Wed Apr 16 15:57:36 2025 -0700 powerpc/pseries: Define common functions for RTAS sequence calls The RTAS call can be normal where retrieves the data form the hypervisor once or sequence based RTAS call which has to issue multiple times until the complete data is obtained. For some of these sequence RTAS calls, the OS should not interleave calls with different input until the sequence is completed. The data is collected for each call and copy to the buffer for the entire sequence during ioctl() handle and then expose this buffer to the user space with read() handle. One such sequence RTAS call is ibm,get-vpd and its support is already included in the current code. To add the similar support for other sequence based calls, move the common functions in to separate file and update papr_rtas_sequence struct with the following callbacks so that RTAS call specific code will be defined and executed to complete the sequence. struct papr_rtas_sequence { int error; void params; void (*begin) (struct papr_rtas_sequence *); void (*end) (struct papr_rtas_sequence *); const char * (*work) (struct papr_rtas_sequence *, size_t *); }; params: Input parameters used to pass for RTAS call. Begin: RTAS call specific function to initialize data including work area allocation. End: RTAS call specific function to free up resources (free work area) after the sequence is completed. Work: The actual RTAS call specific function which collects the data from the hypervisor. Signed-off-by: Haren Myneni Tested-by: Sathvika Vasireddy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416225743.596462-2-haren@linux.ibm.com commit 20d3c19bd8f9b498173c198eadf54580c8caa336 Author: Dmitry Antipov Date: Tue Apr 15 12:07:20 2025 +0300 wifi: rtw88: do not ignore hardware read error during DPK In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned by 'check_hw_ready()' but issue a warning to denote possible DPK issue. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support") Suggested-by: Ping-Ke Shih Signed-off-by: Dmitry Antipov Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250415090720.194048-1-dmantipov@yandex.ru commit fc5f5a0ec463ae6a07850428bd3082947e01d276 Author: Zhen XIN Date: Thu Apr 10 15:42:16 2025 +0000 wifi: rtw88: sdio: call rtw_sdio_indicate_tx_status unconditionally The rtw88-sdio do not work in AP mode due to the lack of TX status report for management frames. Make the invocation of rtw_sdio_indicate_tx_status unconditional and cover all packet queues Tested-on: rtl8723ds Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") Signed-off-by: Zhen XIN Reviewed-by: Martin Blumenstingl Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250410154217.1849977-2-zhen.xin@nokia-sbell.com commit b2effcdc237979dcc533d446a792fc54fd0e1213 Author: Zhen XIN Date: Thu Apr 10 15:42:17 2025 +0000 wifi: rtw88: sdio: map mgmt frames to queue TX_DESC_QSEL_MGMT The rtw88-sdio do not work in AP mode due to the lack of TX status report for management frames. Map the management frames to queue TX_DESC_QSEL_MGMT, which enables the chip to generate TX reports for these frames Tested-on: rtl8723ds Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") Signed-off-by: Zhen XIN Reviewed-by: Martin Blumenstingl Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250410154217.1849977-3-zhen.xin@nokia-sbell.com commit da4cb617bc7d827946cbb368034940b379a1de90 Author: Herbert Xu Date: Thu Apr 17 10:26:28 2025 +0800 powerpc/crc: Include uaccess.h and others The powerpc crc code was relying on pagefault_disable from being pulled in by random header files. Fix this by explicitly including uaccess.h. Also add other missing header files to prevent similar problems in future. Reported-by: Eric Biggers Reported-by: Stephen Rothwell Fixes: 7ba8df47810f ("asm-generic: Make simd.h more resilient") Signed-off-by: Herbert Xu commit 02db42856e430a915b8f9d7074a51910d2184134 Author: Herbert Xu Date: Wed Apr 16 15:48:26 2025 +0800 crypto: public_key - Make sig/tfm local to if clause in software_key_query The recent code changes in this function triggered a false-positive maybe-uninitialized warning in software_key_query. Rearrange the code by moving the sig/tfm variables into the if clause where they are actually used. Signed-off-by: Herbert Xu commit ddd0855fa3c3f1de020ab3aeddce15fe38e116f7 Author: Herbert Xu Date: Tue Apr 15 17:23:19 2025 +0800 crypto: deflate - Make the acomp walk atomic Add an atomic flag to the acomp walk and use that in deflate. Due to the use of a per-cpu context, it is impossible to sleep during the walk in deflate. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202504151654.4c3b6393-lkp@intel.com Fixes: 08cabc7d3c86 ("crypto: deflate - Convert to acomp") Signed-off-by: Herbert Xu commit 2f5f3cd003fa303574da1a8fcdec9f602b7fc221 Author: Ovidiu Panait Date: Mon Apr 7 15:36:03 2025 +0300 crypto: sun8i-ss - use API helpers to setup fallback request Rather than setting up the fallback request by hand, use ahash_request_set_callback() and ahash_request_set_crypt() API helpers to properly setup the new request. This also ensures that the completion callback is properly passed down to the fallback algorithm, which avoids a crash with async fallbacks. Signed-off-by: Ovidiu Panait Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 4e34a840613bee487a69b32483a11da94356fc2b Merge: 522b93f61f581d 4811b0c220f212 Author: Jakub Kicinski Date: Wed Apr 16 19:05:20 2025 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ixgbe: Add basic devlink support Jedrzej Jagielski says: Create devlink specific directory for more convenient future feature development. Flashing and reloading are supported only by E610 devices. Introduce basic FW/NVM validation since devlink reload introduces possibility of runtime NVM update. Check FW API version, FW recovery mode and FW rollback mode. Introduce minimal recovery probe to let user to reload the faulty FW when recovery mode is detected. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ixgbe: add support for FW rollback mode ixgbe: add E610 implementation of FW recovery mode ixgbe: add FW API version check ixgbe: add support for devlink reload ixgbe: add device flash update via devlink ixgbe: extend .info_get() with stored versions ixgbe: add E610 functions getting PBA and FW ver info ixgbe: add .info_get extension specific for E610 devices ixgbe: read the netlist version information ixgbe: read the OROM version information ixgbe: add E610 functions for acquiring flash data ixgbe: add handler for devlink .info_get() ixgbe: add initial devlink support ixgbe: wrap netdev_priv() usage devlink: add value check to devlink_info_version_put() ==================== Link: https://patch.msgid.link/20250415221301.1633933-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 522b93f61f581d4f01e61d594d69154c5b550543 Merge: da59ceed5ab999 9b1097a4108f5a Author: Jakub Kicinski Date: Wed Apr 16 18:33:04 2025 -0700 Merge branch 'adopting-nlmsg_payload-in-ipv4-ipv6' Breno Leitao says: ==================== Adopting nlmsg_payload() in IPv4/IPv6 The commit 95d06e92a4019 ("netlink: Introduce nlmsg_payload helper") introduced the nlmsg_payload() helper function. This patchset aims to replace manual implementations with the nlmsg_payload() helper in IPv4 and IPv6 files, one file per patch. ==================== Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-0-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit 9b1097a4108f5afb0911dbbbc79a8de130042665 Author: Breno Leitao Date: Tue Apr 15 12:28:59 2025 -0700 vxlan: Use nlmsg_payload in vxlan_vnifilter_dump Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-8-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit 04e00a849e7c25b331f103bf71a56fd078f73f8d Author: Breno Leitao Date: Tue Apr 15 12:28:58 2025 -0700 ipv4: Use nlmsg_payload in ipmr file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-7-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit d5ce0ed528c44d4b06d7e543db72c3adb71f4d5f Author: Breno Leitao Date: Tue Apr 15 12:28:57 2025 -0700 ipv4: Use nlmsg_payload in route file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-6-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit b411638fb92509a518506cbf0bbce8a8a3bd07fb Author: Breno Leitao Date: Tue Apr 15 12:28:56 2025 -0700 ipv4: Use nlmsg_payload in fib_frontend file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-5-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit 7d82cc229c0901b0fa677f2568b436bcf8dcada7 Author: Breno Leitao Date: Tue Apr 15 12:28:55 2025 -0700 ipv4: Use nlmsg_payload in devinet file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-4-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit bc05add844fc47ab61499d64a1128abf2ff77ea2 Author: Breno Leitao Date: Tue Apr 15 12:28:54 2025 -0700 ipv6: Use nlmsg_payload in route file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-3-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit 6c454270a8511280ba5981e57e3bcb3c1408ebfa Author: Breno Leitao Date: Tue Apr 15 12:28:53 2025 -0700 ipv6: Use nlmsg_payload in addrconf file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-2-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit 5ef4097ed155b3eb3aa7ec2c6035c6800b0e849d Author: Breno Leitao Date: Tue Apr 15 12:28:52 2025 -0700 ipv6: Use nlmsg_payload in addrlabel file Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. This changes function ip6addrlbl_valid_get_req() and ip6addrlbl_valid_dump_req(). Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250415-nlmsg_v2-v1-1-a1c75d493fd7@debian.org Signed-off-by: Jakub Kicinski commit da59ceed5ab999034d0955a461b7c9573d809daa Merge: 49593c298cf7f5 b3334f9f708cb2 Author: Jakub Kicinski Date: Wed Apr 16 18:31:10 2025 -0700 Merge branch 'net-stmmac-sti-cleanups' Russell King says: ==================== net: stmmac: sti cleanups Clean up the STI platform glue code. - IS_PHY_IF_MODE_RGMII() is just a duplicate for phy_interface_mode_is_rgmii(), so use the generic version that we already have. - add init/exit functions that call clk_prepare_enable(), sti_dwmac_set_mode() and clk_disable_unprepare() as appropriate, converting to devm_stmmac_pltfr_probe(). - the custom suspend/resume ops do basically what the generic ones do with init/exit functions populated, but also add runtime and noirq ops. Update STI to use the generic ops. ==================== Link: https://patch.msgid.link/Z_6Mfx_SrionoU-e@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit b3334f9f708cb27b9ae68f818e1424458f50497c Author: Russell King (Oracle) Date: Tue Apr 15 17:42:34 2025 +0100 net: stmmac: sti: convert to stmmac_pltfr_pm_ops As we now have the plat_dat->init()/plat_dat->exit() populated which have the required functionality on suspend/resume, we can now use stmmac_pltfr_pm_ops which has methods that call these two functions. Switch over to use this. Doing so also fills in the runtime PM ops and _noirq variants as well. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4jMo-000rCS-6f@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 403068c6c9c25ef772d99bc91ce85ae39ed41c76 Author: Russell King (Oracle) Date: Tue Apr 15 17:42:29 2025 +0100 net: stmmac: sti: convert to devm_stmmac_pltfr_probe() Convert sti to use the generic devm_stmmac_pltfr_probe() which will call plat_dat->init()/plat_dat->exit() as appropriate, thus simplifying the code. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4jMj-000rCM-31@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 72d02a9f9410a292c3be8a4b17060115610f638d Author: Russell King (Oracle) Date: Tue Apr 15 17:42:23 2025 +0100 net: stmmac: sti: use phy_interface_mode_is_rgmii() Replace the custom IS_PHY_IF_MODE_RGMII() macro with our generic phy_interface_mode_is_rgmii() inline function. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4jMd-000rCG-VU@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 49593c298cf7f5dd360f029356bcbbcbff406d6f Author: Jakub Kicinski Date: Tue Apr 15 10:26:53 2025 -0700 docs: networking: clarify intended audience of netdevices.rst The netdevices doc is dangerously broad. At least make it clear that it's intended for developers, not for users. Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250415172653.811147-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 00868d0348187fe1123324f77e069a916f932037 Author: Christian Marangi Date: Tue Apr 15 12:53:05 2025 +0200 net: phy: mediatek: init val in .phy_led_polarity_set for AN7581 Fix smatch warning for uninitialised val in .phy_led_polarity_set for AN7581 driver. Correctly init to 0 to set polarity high by default. Reported-by: Simon Horman Fixes: 6a325aed130b ("net: phy: mediatek: add Airoha PHY ID to SoC driver") Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250415105313.3409-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 4cc8b57753ef30650a5a326df0074d25f342aa84 Author: Russell King (Oracle) Date: Tue Apr 15 11:15:53 2025 +0100 net: stmmac: sun8i: use stmmac_pltfr_probe() Using stmmac_pltfr_probe() simplifies the probe function. This will not only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit (sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This results in an overall simplification of the glue driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Reviewed-by: Andrew Lunn Tested-by: Corentin Labbe Link: https://patch.msgid.link/E1u4dKb-000dV7-3B@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 978d13b26ab31297e320dba1feb87f95c107961b Author: Russell King (Oracle) Date: Tue Apr 15 11:13:55 2025 +0100 net: stmmac: intel: remove unnecessary setting max_speed Phylink will already limit the MAC speed according to the interface, so if 2500BASE-X is selected, the maximum speed will be 2.5G. Similarly, if SGMII is selected, the maximum speed will be 1G. It is, therefore, not necessary to set a speed limit. Remove setting plat_dat->max_speed from this glue driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4dIh-000dT5-Kt@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit cd1fafe7da1f6f2aa25723e317f6e8e9d0c050a1 Author: Taehee Yoo Date: Tue Apr 15 05:24:58 2025 +0000 eth: bnxt: add support rx side device memory TCP Currently, bnxt_en driver satisfies the requirements of the Device memory TCP, which is HDS. So, it implements rx-side Device memory TCP for bnxt_en driver. It requires only converting the page API to netmem API. `struct page` of agg rings are changed to `netmem_ref netmem` and corresponding functions are changed to a variant of netmem API. It also passes PP_FLAG_ALLOW_UNREADABLE_NETMEM flag to a parameter of page_pool. The netmem will be activated only when a user requests devmem TCP. When netmem is activated, received data is unreadable and netmem is disabled, received data is readable. But drivers don't need to handle both cases because netmem core API will handle it properly. So, using proper netmem API is enough for drivers. Device memory TCP can be tested with tools/testing/selftests/drivers/net/hw/ncdevmem. This is tested with BCM57504-N425G and firmware version 232.0.155.8/pkg 232.1.132.8. Reviewed-by: Mina Almasry Tested-by: David Wei Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250415052458.1260575-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 8a8f3f4991761a70834fe6719d09e9fd338a766e Author: Thangaraj Samynathan Date: Tue Apr 15 10:15:09 2025 +0530 net: lan743x: Allocate rings outside ZONE_DMA The driver allocates ring elements using GFP_DMA flags. There is no dependency from LAN743x hardware on memory allocation should be in DMA_ZONE. Hence modifying the flags to use only GFP_ATOMIC. This is consistent with other callers of lan743x_rx_init_ring_element(). Reported-by: Zhang, Liyin(CN) Signed-off-by: Thangaraj Samynathan Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250415044509.6695-1-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski commit 20accfd3aa0b0aebbc27d1f3bddb819db7b854a3 Merge: ac1df712442c64 09737cb80b8686 Author: Jakub Kicinski Date: Wed Apr 16 17:51:35 2025 -0700 Merge branch 'net-ethernet-ti-am65-cpsw-fix-mac-address-fetching' Michael Walle says: ==================== net: ethernet: ti: am65-cpsw: Fix MAC address fetching MAC addresses can be fetched from a NVMEM device. of_get_mac_address() will return EPROBE_DEFER if that device is not available yet. That isn't handled correctly by the driver and it will always fall back to either a random MAC address or it's own "fetch by fuse" method. Also, if the ethernet (sub)node has a link to the nvmem device, it will fail to create a device link as the fwnode parameter isn't populated. That's fixed in the first patch. ==================== Link: https://patch.msgid.link/20250414084336.4017237-1-mwalle@kernel.org Signed-off-by: Jakub Kicinski commit 09737cb80b8686ffca4ed1805fee745d5c85604d Author: Michael Walle Date: Mon Apr 14 10:43:36 2025 +0200 net: ethernet: ti: am65-cpsw: handle -EPROBE_DEFER of_get_mac_address() might fetch the MAC address from NVMEM and that driver might not have been loaded. In that case, -EPROBE_DEFER is returned. Right now, this will trigger an immediate fallback to am65_cpsw_am654_get_efuse_macid() possibly resulting in a random MAC address although the MAC address is stored in the referenced NVMEM. Fix it by handling the -EPROBE_DEFER return code correctly. This also means that the creation of the MDIO device has to be moved to a later stage as -EPROBE_DEFER must not be returned after child devices are created. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250414084336.4017237-3-mwalle@kernel.org Signed-off-by: Jakub Kicinski commit 1a377f142e6e2faff51f965ed40633f70579ffe6 Author: Michael Walle Date: Mon Apr 14 10:43:35 2025 +0200 net: ethernet: ti: am65-cpsw: set fwnode for ports fwnode needs to be set for a device for fw_devlink to be able to track/enforce its dependencies correctly. Without this, you'll see error messages like this when the supplier has probed and tries to make sure all its fwnode consumers are linked to it using device links: am65-cpsw-nuss 8000000.ethernet: Failed to create device link (0x180) with supplier .. Reviewed-by: Saravana Kannan Signed-off-by: Michael Walle Link: https://patch.msgid.link/20250414084336.4017237-2-mwalle@kernel.org Signed-off-by: Jakub Kicinski commit 1b0965f495cdd678ee95caeccd85c6afb3c4fea1 Author: Krzysztof Kozlowski Date: Tue Apr 15 12:43:01 2025 +0200 drm/mediatek/hdmi: Use syscon_regmap_lookup_by_phandle_args Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() combined with getting the syscon argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. There is also no real benefit in printing errors on missing syscon argument, because this is done just too late: runtime check on static/build-time data. Dtschema and Devicetree bindings offer the static/build-time check for this already. Signed-off-by: Krzysztof Kozlowski Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-4-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 8745e78c8a06b817a9a315817eb83090c92bfd9b Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:43:00 2025 +0200 dt-bindings: display: mediatek: Add binding for MT8195 HDMI-TX v2 Add a binding for the HDMI TX v2 Encoder found in MediaTek MT8195 and MT8188 SoCs. This fully supports the HDMI Specification 2.0b, hence it provides support for 3D-HDMI, Polarity inversion, up to 16 bits Deep Color, color spaces including RGB444, YCBCR420/422/444 (ITU601/ITU709) and xvYCC, with output resolutions up to 3840x2160p@60Hz. Moreover, it also supports HDCP 1.4 and 2.3, Variable Refresh Rate (VRR) and Consumer Electronics Control (CEC). This IP also includes support for HDMI Audio, including IEC60958 and IEC61937 SPDIF, 8-channel PCM, DSD, and other lossless audio according to HDMI 2.0. Reviewed-by: Rob Herring (Arm) Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-3-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 182f7443e53d4c633e1b47bdca57600a91c9bbb8 Author: AngeloGioacchino Del Regno Date: Tue Apr 15 12:42:59 2025 +0200 dt-bindings: display: mediatek: Add binding for HDMIv2 DDC Add a binding for the Display Data Channel (DDC) IP in MediaTek SoCs with version 2 HDMI TX IP. Reviewed-by: Rob Herring (Arm) Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20250415104321.51149-2-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 4890d68db651562ea80250f2c93205a5c0327a6a Author: Andy Yan Date: Fri Apr 11 19:59:37 2025 +0800 drm/bridge: dw-hdmi: Avoid including uapi headers It is not recommended for drivers to include UAPI header directly. Signed-off-by: Andy Yan Reviewed-by: Heiko Stuebner Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411115941.318558-1-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit b12fa5e76e1463fc5a196f2717040e4564e184b6 Author: Dmitry Baryshkov Date: Fri Apr 11 18:09:40 2025 +0300 drm/bridge: select DRM_KMS_HELPER for AUX_BRIDGE The aux bridge uses devm_drm_of_get_bridge() from the panel bridge (and correctly selects DRM_PANEL_BRIDGE). However panel bridge is not a separate module, it is compiled into the drm_kms_helper.o. Select DRM_KMS_HELPER too to express this dependency. Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250411-aux-select-kms-v1-1-c4276f905a56@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 49625c6e4d90a9221127c49a11eb8c95732bb690 Author: Haylen Chu Date: Wed Apr 16 13:54:04 2025 +0000 clk: spacemit: k1: Add TWSI8 bus and function clocks The control register for TWSI8 clocks, APBC_TWSI8_CLK_RST, contains mux selection bits, reset assertion bit and enable bits for function and bus clocks. It has a quirk that reading always results in zero. As a workaround, let's hardcode the mux value as zero to select pll1_d78_31p5 as parent and treat twsi8_clk as a gate, whose enable mask is combined from the real bus and function clocks to avoid the write-only register being shared between two clk_hws, in which case updates of one clk_hw zero the other's bits. With a 1:1 factor serving as placeholder for the bus clock, the I2C-8 controller could be brought up, which is essential for boards attaching power-management chips to it. Signed-off-by: Haylen Chu Reviewed-by: Alex Elder Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250416135406.16284-5-heylenay@4d2.org Signed-off-by: Yixun Lan commit 1b72c59db0add8e47fa116b21f78ed0b09a264f3 Author: Haylen Chu Date: Wed Apr 16 13:54:03 2025 +0000 clk: spacemit: Add clock support for SpacemiT K1 SoC The clock tree of K1 SoC contains three main types of clock hardware (PLL/DDN/MIX) and has control registers split into several multifunction devices: APBS (PLLs), MPMU, APBC and APMU. All register operations are done through regmap to ensure atomicity between concurrent operations of clock driver and reset, power-domain driver that will be introduced in the future. Signed-off-by: Haylen Chu Reviewed-by: Alex Elder Reviewed-by: Inochi Amaoto Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250416135406.16284-4-heylenay@4d2.org Signed-off-by: Yixun Lan commit 8090804045066ab8cd92737c8e2adfb46f166c0f Author: Haylen Chu Date: Wed Apr 16 13:54:02 2025 +0000 dt-bindings: clock: spacemit: Add spacemit,k1-pll Add definition for the PLL found on SpacemiT K1 SoC, which takes the external 24MHz oscillator as input and generates clocks in various frequencies for the system. Signed-off-by: Haylen Chu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alex Elder Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250416135406.16284-3-heylenay@4d2.org Signed-off-by: Yixun Lan commit 61e312a001a394a93998c353af859841ddf50d5d Author: Haylen Chu Date: Wed Apr 16 13:54:01 2025 +0000 dt-bindings: soc: spacemit: Add spacemit,k1-syscon Document APMU, MPMU and APBC syscons found on SpacemiT K1 SoC, which are capable of generating clock and reset signals. Additionally, APMU and MPMU manage power domains. Signed-off-by: Haylen Chu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alex Elder Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250416135406.16284-2-heylenay@4d2.org Signed-off-by: Yixun Lan commit c70fc32f44431bb30f9025ce753ba8be25acbba3 Author: Peter Zijlstra Date: Tue Jan 28 15:39:49 2025 +0100 sched/fair: Adhere to place_entity() constraints Mike reports that commit 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") relies on commit 4423af84b297 ("sched/fair: optimize the PLACE_LAG when se->vlag is zero") to not trip a WARN in place_entity(). What happens is that the lag of the very last entity is 0 per definition -- the average of one element matches the value of that element. Therefore place_entity() will match the condition skipping the lag adjustment: if (sched_feat(PLACE_LAG) && cfs_rq->nr_queued && se->vlag) { Without the 'se->vlag' condition -- it will attempt to adjust the zero lag even though we're inserting into an empty tree. Notably, we should have failed the 'cfs_rq->nr_queued' condition, but don't because they didn't get updated. Additionally, move update_load_add() after placement() as is consistent with other place_entity() users -- this change is non-functional, place_entity() does not use cfs_rq->load. Fixes: 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") Signed-off-by: Peter Zijlstra (Intel) Reported-by: Mike Galbraith Signed-off-by: "Peter Zijlstra (Intel)" Signed-off-by: Mike Galbraith Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/c216eb4ef0e0e0029c600aefc69d56681cee5581.camel@gmx.de commit 44671e21e3463f36f6c6e4b691216f60e85840e4 Author: K Prateek Nayak Date: Wed Apr 9 05:34:46 2025 +0000 sched/debug: Print the local group's asym_prefer_cpu Add a file to read local group's "asym_prefer_cpu" from debugfs. This information was useful when debugging issues where "asym_prefer_cpu" was incorrectly set to a CPU with a lower asym priority. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250409053446.23367-5-kprateek.nayak@amd.com commit 8157fbc907452aa5674df2de23c1c7305c907006 Author: K Prateek Nayak Date: Wed Apr 9 05:34:45 2025 +0000 cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change A subset of AMD systems supporting Preferred Core rankings can have their rankings changed dynamically at runtime. Update the "sg->asym_prefer_cpu" across the local hierarchy of CPU when the preferred core ranking changes. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/20250409053446.23367-4-kprateek.nayak@amd.com commit 0e3f6c3696424fa90d6f512779d617a05a1cf031 Author: K Prateek Nayak Date: Wed Apr 9 05:34:44 2025 +0000 sched/topology: Introduce sched_update_asym_prefer_cpu() A subset of AMD Processors supporting Preferred Core Rankings also feature the ability to dynamically switch these rankings at runtime to bias load balancing towards or away from the LLC domain with larger cache. To support dynamically updating "sg->asym_prefer_cpu" without needing to rebuild the sched domain, introduce sched_update_asym_prefer_cpu() which recomutes the "asym_prefer_cpu" when the core-ranking of a CPU changes. sched_update_asym_prefer_cpu() swaps the "sg->asym_prefer_cpu" with the CPU whose ranking has changed if the new ranking is greater than that of the "asym_prefer_cpu". If CPU whose ranking has changed is the current "asym_prefer_cpu", it scans the CPUs of the sched groups to find the new "asym_prefer_cpu" and sets it accordingly. get_group() for non-overlapping sched domains returns the sched group for the first CPU in the sched_group_span() which ensures all CPUs in the group see the updated value of "asym_prefer_cpu". Overlapping groups are allocated differently and will require moving the "asym_prefer_cpu" to "sg->sgc" but since the current implementations do not set "SD_ASYM_PACKING" at NUMA domains, skip additional indirection and place a SCHED_WARN_ON() to alert any future users. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250409053446.23367-3-kprateek.nayak@amd.com commit 872aa4de18889be63317a8c0f2de71a3a01e487c Author: K Prateek Nayak Date: Wed Apr 9 05:34:43 2025 +0000 sched/fair: Use READ_ONCE() to read sg->asym_prefer_cpu Subsequent commits add the support to dynamically update the sched_group struct's "asym_prefer_cpu" member from a remote CPU. Use READ_ONCE() when reading the "sg->asym_prefer_cpu" to ensure load balancer always reads the latest value. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250409053446.23367-2-kprateek.nayak@amd.com commit 4308487b29f98785ef50dd82fdfca382134b33e7 Author: Richard Fitzgerald Date: Wed Apr 16 13:24:22 2025 +0100 firmware: cs_dsp: Add some sanity-checking to test harness Add sanity checking to some test harness functions to help catch bugs in the test code. This consists of checking the range of some arguments and checking that reads from the dummy regmap succeed. Most of the harness code already had sanity-checking but there were a few places where it was missing or was assumed that the test could be trusted to pass valid values. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250416122422.783215-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 9b62b7a6574ea25e1da15b883de74284fb45197c Author: Shuming Fan Date: Wed Apr 16 17:25:47 2025 +0800 ASoC: rt722: fix pop noise at the beginning of DMIC recording This patch added the PDE status check which makes sure the PDE transition is done. It will decrease the pop noise at the beginning of DMIC recording. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20250416092547.737879-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 1d31d536871fe8b16c8c0de58d201c78e21eb3a2 Author: David Gow Date: Wed Apr 16 17:38:25 2025 +0800 kunit: qemu_configs: Disable faulting tests on 32-bit SPARC The 32-bit sparc configuration (--arch sparc) crashes on the kunit_fault_test. It's known that some architectures don't handle deliberate segfaults in kernel mode well, so there's a config switch to disable tests which rely upon it by default. Use this for the sparc config, making sure the default config for it passes. Link: https://lore.kernel.org/r/20250416093826.1550040-1-davidgow@google.com Fixes: 87c9c1631788 ("kunit: tool: add support for QEMU") Signed-off-by: David Gow Reviewed-by: Thomas Weißschuh Tested-by: Thomas Weißschuh Signed-off-by: Shuah Khan commit 8fe34da63109a9193cd1cb912d48e82c69cb3c6b Author: Thomas Weißschuh Date: Tue Apr 15 15:38:06 2025 +0200 kunit: qemu_configs: Add 64-bit SPARC configuration Add a basic config to run kunit tests on 64-bit SPARC. Link: https://lore.kernel.org/r/20250415-kunit-qemu-sparc64-v1-2-253906f61102@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan commit d16b3d0fb43cb0f9eb21b35c2d2c870b3f38ab1d Author: Thomas Weißschuh Date: Tue Apr 15 15:38:05 2025 +0200 kunit: qemu_configs: sparc: Explicitly enable CONFIG_SPARC32=y The configuration generated by kunit ends up with a 32bit configuration. A new kunit configuration for 64bit is to be added. To make the difference clearer spell out the variant in the kunit reference config. Link: https://lore.kernel.org/r/20250415-kunit-qemu-sparc64-v1-1-253906f61102@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 5fe8d08139280a552bb3e8471284362c65c5b032 Author: Ilpo Järvinen Date: Wed Apr 16 13:02:39 2025 +0300 PCI: Use PCI_STD_NUM_BARS instead of 6 pci_read_bases() is given literal 6 that means PCI_STD_NUM_BARS. Replace the literal with the define to annotate the code better. Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Link: https://patch.msgid.link/20250416100239.6958-1-ilpo.jarvinen@linux.intel.com commit 441ef8588c4608d9742dc73f8ba2102c0db68a34 Author: Richard Acayan Date: Tue Feb 4 22:50:17 2025 -0500 arm64: dts: qcom: sdm670: add camss and cci Add the camera subsystem and CCI used to interface with cameras on the Snapdragon 670. Signed-off-by: Richard Acayan Reviewed-by: Bryan O'Donoghue Reviewed-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250205035013.206890-8-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit d2310f047d70fcf7f7602dbb49d2eca345d31932 Author: Egor Vorontsov Date: Tue Apr 15 12:13:31 2025 +0300 drm/edid: Refactor DisplayID timing block structs Using le16 instead of u8[2]. Suggested-by: Jani Nikula Signed-off-by: Egor Vorontsov Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/a7967d7884d48b15ca08ae78d687e73124f0ba04.1744708239.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e79ce1639a865d93fa8c27b515e8165c60131c9b Author: Egor Vorontsov Date: Tue Apr 15 12:13:30 2025 +0300 drm/edid: Implement DisplayID Type IX & X timing blocks parsing Some newer high refresh rate consumer monitors (including those by Samsung) make use of DisplayID 2.1 timing blocks in their EDID data, notably for their highest refresh rate modes. Such modes won't be available as of now. Implement partial support for such blocks in order to enable native support of HRR modes of most such monitors for users without having to rely on EDID patching/override (or need thereof). Closes: https://gitlab.freedesktop.org/drm/misc/kernel/-/issues/55 Suggested-by: Maximilian Boße Signed-off-by: Egor Vorontsov Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/d795d27c6f60596df402ff151ce29938e2ad4f53.1744708239.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d9b79111fd9945931b7a2b2a3e7db7625dd953fe Author: Pawan Gupta Date: Wed Apr 16 06:47:51 2025 -0700 x86/bugs: Rename mmio_stale_data_clear to cpu_buf_vm_clear The static key mmio_stale_data_clear controls the KVM-only mitigation for MMIO Stale Data vulnerability. Rename it to reflect its purpose. No functional change. Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250416-mmio-rename-v2-1-ad1f5488767c@linux.intel.com commit 6ad7751537e884c45b5340a4a24c25535f0d9c13 Author: Shrikanth Hegde Date: Tue Feb 11 00:13:34 2025 +0530 powerpc: enable dynamic preemption Once the lazy preemption is supported, it would be desirable to change the preemption models at runtime. So add support for dynamic preemption using DYNAMIC_KEY. ::Tested lightly on Power10 LPAR Performance numbers indicate that, preempt=none(no dynamic) and preempt=none(dynamic) are close. cat /sys/kernel/debug/sched/preempt (none) voluntary full lazy perf stat -e probe:__cond_resched -a sleep 1 Performance counter stats for 'system wide': 1,253 probe:__cond_resched echo full > /sys/kernel/debug/sched/preempt cat /sys/kernel/debug/sched/preempt none voluntary (full) lazy perf stat -e probe:__cond_resched -a sleep 1 Performance counter stats for 'system wide': 0 probe:__cond_resched Signed-off-by: Shrikanth Hegde Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250210184334.567383-2-sshegde@linux.ibm.com commit 28affd477bf53ddd89b16e4dd7bacf64a1eaf116 Author: Thorsten Blum Date: Sun Feb 9 09:17:03 2025 +0100 fadump: Use str_yes_no() helper in fadump_show_config() Remove hard-coded strings by using the str_yes_no() helper function. Reviewed-by: Sourabh Jain Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250209081704.2758-2-thorsten.blum@linux.dev commit 1518474b70d663baf7757ccd1b1c229c077d9b3e Author: Thorsten Blum Date: Fri Apr 11 10:42:21 2025 +0200 KVM: powerpc: Enable commented out BUILD_BUG_ON() assertion The BUILD_BUG_ON() assertion was commented out in commit 38634e676992 ("powerpc/kvm: Remove problematic BUILD_BUG_ON statement") and fixed in commit c0a187e12d48 ("KVM: powerpc: Fix BUILD_BUG_ON condition"), but not enabled. Enable it now that this no longer breaks and remove the comment. Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250411084222.6916-1-thorsten.blum@linux.dev commit 0f725e9851379650d0db398a4e12dfab4c229fe1 Author: Thorsten Blum Date: Wed Feb 19 12:20:52 2025 +0100 powerpc: mpic: Use str_enabled_disabled() helper function Remove hard-coded strings by using the str_enabled_disabled() helper function. Use pr_debug() instead of printk(KERN_DEBUG) to silence a checkpatch warning. Reviewed-by: Ricardo B. Marlière Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250219112053.3352-2-thorsten.blum@linux.dev commit f69898bce204a67edd48e074069ca3c5d8537334 Author: Thorsten Blum Date: Wed Feb 19 12:14:45 2025 +0100 powerpc/ps3: Use str_write_read() in ps3_notification_read_write() Remove hard-coded strings by using the str_write_read() helper function. Suggested-by: Christophe Leroy Signed-off-by: Thorsten Blum Reviewed-by: Geert Uytterhoeven Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250219111445.2875-2-thorsten.blum@linux.dev commit 02a1324b08af3239dce5bcf52e09153e1f8a4bbd Author: Vaibhav Jain Date: Wed Apr 16 21:57:36 2025 +0530 powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters Update 'kvm-hv-pmu.c' to add five new perf-events mapped to the five Hostwide counters. Since these newly introduced perf events are at system wide scope and can be read from any L1-Lpar CPU, 'kvmppc_pmu' scope and capabilities are updated appropriately. Also introduce two new helpers. First is kvmppc_update_l0_stats() that uses the infrastructure introduced in previous patches to issues the H_GUEST_GET_STATE hcall L0-PowerVM to fetch guest-state-buffer holding the latest values of these counters which is then parsed and 'l0_stats' variable updated. Second helper is kvmppc_pmu_event_update() which is called from 'kvmppv_pmu' callbacks and uses kvmppc_update_l0_stats() to update 'l0_stats' and the update the 'struct perf_event's event-counter. Some minor updates to kvmppc_pmu_{add, del, read}() to remove some debug scaffolding code. Signed-off-by: Vaibhav Jain Reviewed-by: Athira Rajeev Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-7-vaibhav@linux.ibm.com commit f0c9c49c50678385c406e805e377965e853828fa Author: Vaibhav Jain Date: Wed Apr 16 21:57:35 2025 +0530 powerpc/kvm-hv-pmu: Implement GSB message-ops for hostwide counters Implement and setup necessary structures to send a prepolulated Guest-State-Buffer(GSB) requesting hostwide counters to L0-PowerVM and have the returned GSB holding the values of these counters parsed. This is done via existing GSB implementation and with the newly added support of Hostwide elements in GSB. The request to L0-PowerVM to return Hostwide counters is done using a pre-allocated GSB named 'gsb_l0_stats'. To be able to populate this GSB with the needed Guest-State-Elements (GSIDs) a instance of 'struct kvmppc_gs_msg' named 'gsm_l0_stats' is introduced. The 'gsm_l0_stats' is tied to an instance of 'struct kvmppc_gs_msg_ops' named 'gsb_ops_l0_stats' which holds various callbacks to be compute the size ( hostwide_get_size() ), populate the GSB ( hostwide_fill_info() ) and refresh ( hostwide_refresh_info() ) the contents of 'l0_stats' that holds the Hostwide counters returned from L0-PowerVM. To protect these structures from simultaneous access a spinlock 'lock_l0_stats' has been introduced. The allocation and initialization of the above structures is done in newly introduced kvmppc_init_hostwide() and similarly the cleanup is performed in newly introduced kvmppc_cleanup_hostwide(). Signed-off-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-6-vaibhav@linux.ibm.com commit ff45bf50ccbbd6d799a8e77e4cde890b6f9ef9f5 Author: Vaibhav Jain Date: Wed Apr 16 21:57:34 2025 +0530 kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU Introduce a new PMU named 'kvm-hv' inside a new module named 'kvm-hv-pmu' to report Book3s kvm-hv specific performance counters. This will expose KVM-HV specific performance attributes to user-space via kernel's PMU infrastructure and would enableusers to monitor active kvm-hv based guests. The patch creates necessary scaffolding to for the new PMU callbacks and introduces the new kernel module name 'kvm-hv-pmu' which is built with CONFIG_KVM_BOOK3S_HV_PMU. The patch doesn't introduce any perf-events yet, which will be introduced in later patches Signed-off-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-5-vaibhav@linux.ibm.com commit 1f35ad2b938ca8e4090250a849021fa000263427 Author: Vaibhav Jain Date: Wed Apr 16 21:57:33 2025 +0530 kvm powerpc/book3s-apiv2: Add kunit tests for Hostwide GSB elements Update 'test-guest-state-buffer.c' to add two new KUNIT test cases for validating correctness of changes to Guest-state-buffer management infrastructure for adding support for Hostwide GSB elements. The newly introduced test test_gs_hostwide_msg() checks if the Hostwide elements can be set and parsed from a Guest-state-buffer. The second kunit test test_gs_hostwide_counters() checks if the Hostwide GSB elements can be send to the L0-PowerVM hypervisor via the H_GUEST_SET_STATE hcall and ensures that the returned guest-state-buffer has all the 5 Hostwide stat counters present. Below is the KATP test report with the newly added KUNIT tests: KTAP version 1 # Subtest: guest_state_buffer_test # module: test_guest_state_buffer 1..7 ok 1 test_creating_buffer ok 2 test_adding_element ok 3 test_gs_bitmap ok 4 test_gs_parsing ok 5 test_gs_msg ok 6 test_gs_hostwide_msg # test_gs_hostwide_counters: Guest Heap Size=0 bytes # test_gs_hostwide_counters: Guest Heap Size Max=10995367936 bytes # test_gs_hostwide_counters: Guest Page-table Size=2178304 bytes # test_gs_hostwide_counters: Guest Page-table Size Max=2147483648 bytes # test_gs_hostwide_counters: Guest Page-table Reclaim Size=0 bytes ok 7 test_gs_hostwide_counters # guest_state_buffer_test: pass:7 fail:0 skip:0 total:7 # Totals: pass:7 fail:0 skip:0 total:7 ok 1 guest_state_buffer_test Signed-off-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-4-vaibhav@linux.ibm.com commit 5317f75fdcecb322a85626ddc0c1dbb55736c473 Author: Vaibhav Jain Date: Wed Apr 16 21:57:32 2025 +0530 kvm powerpc/book3s-apiv2: Add support for Hostwide GSB elements Add support for adding and parsing Hostwide elements to the Guest-state-buffer data structure used in apiv2. These elements are used to share meta-information pertaining to entire L1-Lpar and this meta-information is maintained by L0-PowerVM hypervisor. Example of this include the amount of the page-table memory currently used by L0-PowerVM for hosting the Shadow-Pagetable of all active L2-Guests. More of the are documented in kernel-documentation at [1]. The Hostwide GSB elements are currently only support with H_GUEST_SET_STATE hcall with a special flag namely 'KVMPPC_GS_FLAGS_HOST_WIDE'. The patch introduces new defs for the 5 new Hostwide GSB elements including their GSIDs as well as introduces a new class of GSB elements namely 'KVMPPC_GS_CLASS_HOSTWIDE' to indicate to GSB construction/parsing infrastructure in 'kvm/guest-state-buffer.c'. Also gs_msg_ops_vcpu_get_size(), kvmppc_gsid_type() and kvmppc_gse_{flatten,unflatten}_iden() are updated to appropriately indicate the needed size for these Hostwide GSB elements as well as how to flatten/unflatten their GSIDs so that they can be marked as available in GSB bitmap. [1] Documention/arch/powerpc/kvm-nested.rst Signed-off-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-3-vaibhav@linux.ibm.com commit cb58d39f3998aac05612b16e86d70833343da6c6 Author: Vaibhav Jain Date: Wed Apr 16 21:57:31 2025 +0530 powerpc: Document APIv2 KVM hcall spec for Hostwide counters Update kvm-nested APIv2 documentation to include five new Guest-State-Elements to fetch the hostwide counters. These counters are per L1-Lpar and indicate the amount of Heap/Page-table memory allocated, available and Page-table memory reclaimed for all L2-Guests active instances Reviewed-by: Bagas Sanjaya Tested-by: Gautam Menghani Signed-off-by: Vaibhav Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250416162740.93143-2-vaibhav@linux.ibm.com commit 734b6f10506c726dc6be23e0ba63ab0310580aa6 Author: Tejas Vipin Date: Sun Apr 13 09:29:59 2025 +0530 drm/panel: boe-bf060y8m-aj0: transition to mipi_dsi wrapped functions Changes the boe-bf060y8m-aj0 panel to use multi style functions for improved error handling. Additionally the MIPI_DSI_MODE_LPM flag is set after the off commands are run in boe_bf060y8m_aj0_off regardless of any failures, and regulators are disabled if the boe_bf060y8m_aj0_on call in boe_bf060y8m_aj0_prepare fails. Reviewed-by: Dmitry Baryshkov Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250413035959.255842-1-tejasvipin76@gmail.com commit 81e68e2df0410ea2fbfb8f6b81a5d7bdf326d613 Author: Andy Shevchenko Date: Wed Apr 16 10:01:37 2025 +0300 media: i2c: ds90ub960: Remove of_node assignment Remove of_node assignment which duplicates fwnode in struct i2c_board_info. In general drivers must not set both, it's quite confusing. The I²C core will consider fwnode with a priority and of_node is subject to remove from above mentioned data structure. Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Tested-by: Tomi Valkeinen Signed-off-by: Wolfram Sang commit adc8d1200dbbe6726abf89070edb58bca95f1485 Author: Andy Shevchenko Date: Wed Apr 16 10:01:36 2025 +0300 i2c: core: Deprecate of_node in struct i2c_board_info Two members of the same or quite similar semantics is quite confusing to begin with. Moreover, fwnode covers all possible firmware descriptions that Linux kernel supports. Deprecate of_node in struct i2c_board_info, so users will be warned and in the future there is a plan to convert the users and remove it completely. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit df6d7277e5525d6cce63127dd93ebec4c6354fa0 Author: Andy Shevchenko Date: Wed Apr 16 10:01:35 2025 +0300 i2c: core: Do not dereference fwnode in struct device In order to make the underneath API easier to change in the future, prevent users from dereferencing fwnode from struct device. Instead, use the specific device_set_node() API for that. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 3435b7f0fd28b9c52963e3be7fbe6b16be373a4b Author: Andy Shevchenko Date: Wed Apr 16 10:01:34 2025 +0300 i2c: core: Reuse fwnode variable where it makes sense Reuse fwnode variable where it makes sense. This avoids unneeded duplication hidden in some macros and unifies the code for different types of fwnode. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 5d9424b00b577b634cd982792c6abf5e7351a79a Author: Andy Shevchenko Date: Wed Apr 16 10:01:33 2025 +0300 i2c: core: Switch to fwnode APIs to get IRQ Switch to fwnode APIs to get IRQ. In particular this enables a support of the separate wakeup IRQ on non-OF platforms. The rest is converted just for the sake of consistency and fwnode reuse. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 5763a474c887d4a9039ed684b1cc329f924c390b Author: Andy Shevchenko Date: Wed Apr 16 10:01:32 2025 +0300 i2c: core: Unify the firmware node type check OF and ACPI currently are using asymmetrical APIs to check for the firmware node type. Unify them by using is_*_node() against struct fwnode_handle pointer. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit a7de3fb3c2252d885c470939bae72ff9b4c820e8 Author: Andy Shevchenko Date: Wed Apr 16 10:01:31 2025 +0300 i2c: core: Drop duplicate check before calling OF APIs OF APIs are usually NULL-aware and return an error in case when device node is not present or supported. We already have a check for the returned value, no need to check for the parameter. Tested-by: Tomi Valkeinen Reviewed-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 78e6b545e5587ed89b5768a2815861dcfa415101 Author: Bartosz Golaszewski Date: Mon Apr 7 09:50:12 2025 +0200 ARM: davinci: remove support for da830 We no longer support any boards with the da830 SoC in mainline linux. Let's remove all bits and pieces related to it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Kevin Hilman Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20250407-davinci-remove-da830-v1-1-39f803dd5a14@linaro.org Signed-off-by: Bartosz Golaszewski commit bcdd5b37640cc577cd93d20f00519e70d7add8a6 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:13 2025 +0200 gpio: exar: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-4-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 097cf61ba5bd69328a69c4920f3454089fae0a43 Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:12 2025 +0200 gpio: em: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-3-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 21d3c6531b113b1aaecd99ae90dddd55c20f372b Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:11 2025 +0200 gpio: eic-sprd: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-2-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit afb4aed832f9000a5d15ecd28a7b2faa5789d28d Author: Bartosz Golaszewski Date: Mon Apr 7 09:13:10 2025 +0200 gpio: dln2: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-1-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski commit 96e0b355883006554a0bee3697da475971d6bba8 Author: Ross Stutterheim Date: Wed Apr 16 14:50:06 2025 +0100 ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap() arm/memremap: fix arch_memremap_can_ram_remap() commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map") added the definition of arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages can be used from the linear mapping. memblock_is_map_memory() was called with the pfn of the address given to arch_memremap_can_ram_remap(); however, memblock_is_map_memory() expects to be given an address for arm, not a pfn. This results in calls to memremap() returning a newly mapped area when it should return an address in the existing linear mapping. Fix this by removing the address to pfn translation and pass the address directly. Fixes: 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map") Signed-off-by: Ross Stutterheim Cc: Mike Rapoport Cc: stable@vger.kernel.org Reviewed-by: Catalin Marinas Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) commit bafa451a96d0f1404aa1a5a267f78767a55fac71 Author: Joel Stanley Date: Tue Apr 15 21:58:31 2025 +0930 riscv: defconfig: Remove EXPERT The setting of EXPERT is a leftover from when the riscv defconfig was first added. As mentioned in the EXPERT Kconfig help text it is not intended to be set in the usual case. Upon removal a bunch of intrusive debug-related kernel options are no longer set, which is good. A few may want to come back in the future but let those be advocated for on a case by case basis. NAMESPACES, SYSFS_SYSCALL and MEDIA_SUPPORT_FILTER default on and thus fall out of the defconfig. Set VIDEO_CADENCE_CSI2RX=y to ensure VIDEO_CADENCE_CSI2RX stays enabled. Set DEBUG_KERNEL=y in line with other arch defconfigs. This turns on tracing. Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20250415122832.982610-1-joel@jms.id.au Signed-off-by: Palmer Dabbelt commit 89079520cef65d6da1e864eab4464effe5396e23 Author: Xi Ruoyao Date: Fri Apr 11 10:46:00 2025 +0800 RISC-V: vDSO: Wire up getrandom() vDSO implementation Hook up the generic vDSO implementation to the generic vDSO getrandom implementation by providing the required __arch_chacha20_blocks_nostack and getrandom_syscall implementations. Also wire up the selftests. The benchmark result: vdso: 25000000 times in 2.466341333 seconds libc: 25000000 times in 41.447720005 seconds syscall: 25000000 times in 41.043926672 seconds vdso: 25000000 x 256 times in 162.286219353 seconds libc: 25000000 x 256 times in 2953.855018685 seconds syscall: 25000000 x 256 times in 2796.268546000 seconds Signed-off-by: Xi Ruoyao Link: https://lore.kernel.org/r/20250411024600.16045-1-xry111@xry111.site Signed-off-by: Palmer Dabbelt commit 3a320eada570c44cffb15d971479a29b2e9ee270 Merge: 1741189d843a1d 1a1d569a75f3ab Author: Arnaldo Carvalho de Melo Date: Wed Apr 16 10:17:04 2025 -0300 Merge remote-tracking branch 'torvalds/master' into perf-tools-next Sync with upstream to pick up the perf-tools patches that updates the header files copies to address the check_header.sh warnings. There are also some libbpf updates, better pick those to be on the same page with libbpf since perf uses it in various places. Signed-off-by: Arnaldo Carvalho de Melo commit 1a760d10ded372d113a0410c42be246315bbc2ff Author: Mario Limonciello Date: Fri Apr 11 10:14:44 2025 -0500 thunderbolt: Fix a logic error in wake on connect commit a5cfc9d65879c ("thunderbolt: Add wake on connect/disconnect on USB4 ports") introduced a sysfs file to control wake up policy for a given USB4 port that defaulted to disabled. However when testing commit 4bfeea6ec1c02 ("thunderbolt: Use wake on connect and disconnect over suspend") I found that it was working even without making changes to the power/wakeup file (which defaults to disabled). This is because of a logic error doing a bitwise or of the wake-on-connect flag with device_may_wakeup() which should have been a logical AND. Adjust the logic so that policy is only applied when wakeup is actually enabled. Fixes: a5cfc9d65879c ("thunderbolt: Add wake on connect/disconnect on USB4 ports") Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 7ed50dc550b0a3bad82f675aaefd8cd00362672d Author: Colin Ian King Date: Wed Apr 16 09:12:04 2025 +0100 ASoC: cs48l32: Fix spelling mistake "exceeeds" -> "exceeds" There is a spelling mistake in a cs48l32_fll_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250416081204.36851-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit ba05bc25490a2256f60be2c02bd797e6f8217119 Author: Chen Ni Date: Wed Apr 16 12:14:31 2025 +0800 ASoC: fsl_rpmsg: Remove useless return variable Remove unnecessary return variable and compress the return logic. Signed-off-by: Chen Ni Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250416041431.546370-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 65bd426bace60540c5b6710890800abb1accc5ce Author: Chen Ni Date: Wed Apr 16 12:10:23 2025 +0800 ASoC: ak4458: Remove useless return variable Remove unnecessary return variable and compress the return logic. Signed-off-by: Chen Ni Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250416041023.546311-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 91f4ca732495ea5dad39e1b041ef0c2a6e1fe02f Author: Shuming Fan Date: Wed Apr 16 17:25:28 2025 +0800 ASoC: rt722: fix pop noise at the beginning of headphone playback This patch added the function_status check to avoid the calibration again. The codec driver reinitializes when the 'FUNCTION_NEEDS_INITIALIZATION' flag raises. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20250416092528.737845-1-shumingf@realtek.com Signed-off-by: Mark Brown commit d1965f008f224a775eac2aa021a1fbbf4bca96cb Author: Richard Fitzgerald Date: Wed Apr 16 13:16:04 2025 +0100 ASoC: cs-amp-lib-test: Use faux bus instead of creating a dummy platform device Change the code to use faux bus for the dummy codec driver device instead of creating a platform device. Also use KUnit automatic resource cleanup to destroy the device instead of doing it "manually" in a test case exit() function. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250416121604.780220-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 41c95ac4839401cb15e6c9a7756226f6af52ea49 Author: Andy Shevchenko Date: Wed Apr 16 13:16:51 2025 +0300 genirq/irqdesc: Use sysfs_emit() to instead of s*printf() Follow the advice of the Documentation/filesystems/sysfs.rst that show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250416101651.2128688-1-andriy.shevchenko@linux.intel.com commit 8400644d8af04a4688eaaa1c4a2e73241a005012 Author: Zhang Enpei Date: Wed Apr 2 19:38:52 2025 +0800 gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250402193852834atJ7eho66TlnKOIMSvpfr@zte.com.cn Signed-off-by: Tomi Valkeinen commit 9aa94cabc44f3317a0a6f9525a54f09bc46409c3 Author: Kuninori Morimoto Date: Mon Apr 14 00:56:52 2025 +0000 drm: xlnx: zynqmp_dpsub: use snd_soc_dummy_dlc struct zynqmp_dp_audio :: components has codec component, but it is used as dummy DAI. OTOH, We can use common snd_soc_dummy_dlc. Let's use common dummy_dlc instead of own component. Signed-off-by: Kuninori Morimoto Tested-by: Tomi Valkeinen Link: https://lore.kernel.org/r/87ecxvr25o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Tomi Valkeinen commit b484c1e225a6a582fc78c4d7af7b286408bb7d41 Author: Chen Linxuan Date: Tue Apr 15 12:06:16 2025 +0300 drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions' On x86_64 with gcc version 13.3.0, I compile kernel with: make defconfig ./scripts/kconfig/merge_config.sh .config <( echo CONFIG_COMPILE_TEST=y ) make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once" Then I get a linker error: ld: vmlinux.o: in function `pxp_fw_dependencies_completed': kintel_pxp.c:(.text+0x95728f): undefined reference to `intel_pxp_gsccs_is_ready_for_sessions' This is caused by not having a intel_pxp_gsccs_is_ready_for_sessions() header stub for CONFIG_DRM_I915_PXP=n. Add it. Signed-off-by: Chen Linxuan Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup") Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/20250415090616.2649889-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit d2fddbd3479928e52061e1c8dd302006b6283ce8 Author: Cosmin Ratiu Date: Fri Apr 11 10:49:58 2025 +0300 bonding: Fix multiple long standing offload races Refactor the bonding ipsec offload operations to fix a number of long-standing control plane races between state migration and user deletion and a few other issues. xfrm state deletion can happen concurrently with bond_change_active_slave() operation. This manifests itself as a bond_ipsec_del_sa() call with x->lock held, followed by a bond_ipsec_free_sa() a bit later from a wq. The alternate path of these calls coming from xfrm_dev_state_flush() can't happen, as that needs the RTNL lock and bond_change_active_slave() already holds it. 1. bond_ipsec_del_sa_all() might call xdo_dev_state_delete() a second time on an xfrm state that was concurrently killed. This is bad. 2. bond_ipsec_add_sa_all() can add a state on the new device, but pending bond_ipsec_free_sa() calls from the old device will then hit the WARN_ON() and then, worse, call xdo_dev_state_free() on the new device without a corresponding xdo_dev_state_delete(). 3. Resolve a sleeping in atomic context introduced by the mentioned "Fixes" commit. bond_ipsec_del_sa_all() and bond_ipsec_add_sa_all() now acquire x->lock and check for x->km.state to help with problems 1 and 2. And since xso.real_dev is now a private pointer managed by the bonding driver in xfrm state, make better use of it to fully fix problems 1 and 2. In bond_ipsec_del_sa_all(), set xso.real_dev to NULL while holding both the mutex and x->lock, which makes sure that neither bond_ipsec_del_sa() nor bond_ipsec_free_sa() could run concurrently. Fix problem 3 by moving the list cleanup (which requires the mutex) from bond_ipsec_del_sa() (called from atomic context) to bond_ipsec_free_sa() Finally, simplify bond_ipsec_del_sa() and bond_ipsec_free_sa() by using xso->real_dev directly, since it's now protected by locks and can be trusted to always reflect the offload device. Fixes: 2aeeef906d5a ("bonding: change ipsec_lock from spin lock to mutex") Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Tested-by: Hangbin Liu Signed-off-by: Steffen Klassert commit fd4e41ebf66cb8b43de2f640b97314c4ee3b4499 Author: Cosmin Ratiu Date: Fri Apr 11 10:49:57 2025 +0300 bonding: Mark active offloaded xfrm_states When the active link is changed for a bond device, the existing xfrm states need to be migrated over to the new link. This is done with: - bond_ipsec_del_sa_all() goes through the offloaded states list and removes all of them from hw. - bond_ipsec_add_sa_all() re-offloads all states to the new device. But because the offload status of xfrm states isn't marked in any way, there can be bugs. When all bond links are down, bond_ipsec_del_sa_all() unoffloads everything from the previous active link. If the same link then comes back up, nothing gets reoffloaded by bond_ipsec_add_sa_all(). This results in a stack trace like this a bit later when user space removes the offloaded rules, because mlx5e_xfrm_del_state() is asked to remove a rule that's no longer offloaded: [] Call Trace: [] [] ? __warn+0x7d/0x110 [] ? mlx5e_xfrm_del_state+0x90/0xa0 [mlx5_core] [] ? report_bug+0x16d/0x180 [] ? handle_bug+0x4f/0x90 [] ? exc_invalid_op+0x14/0x70 [] ? asm_exc_invalid_op+0x16/0x20 [] ? mlx5e_xfrm_del_state+0x73/0xa0 [mlx5_core] [] ? mlx5e_xfrm_del_state+0x90/0xa0 [mlx5_core] [] bond_ipsec_del_sa+0x1ab/0x200 [bonding] [] xfrm_dev_state_delete+0x1f/0x60 [] __xfrm_state_delete+0x196/0x200 [] xfrm_state_delete+0x21/0x40 [] xfrm_del_sa+0x69/0x110 [] xfrm_user_rcv_msg+0x11d/0x300 [] ? release_pages+0xca/0x140 [] ? copy_to_user_tmpl.part.0+0x110/0x110 [] netlink_rcv_skb+0x54/0x100 [] xfrm_netlink_rcv+0x31/0x40 [] netlink_unicast+0x1fc/0x2d0 [] netlink_sendmsg+0x1e4/0x410 [] __sock_sendmsg+0x38/0x60 [] sock_write_iter+0x94/0xf0 [] vfs_write+0x338/0x3f0 [] ksys_write+0xba/0xd0 [] do_syscall_64+0x4c/0x100 [] entry_SYSCALL_64_after_hwframe+0x4b/0x53 There's also another theoretical bug: Calling bond_ipsec_del_sa_all() multiple times can result in corruption in the driver implementation if the double-free isn't tolerated. This isn't nice. Before the "Fixes" commit, xs->xso.real_dev was set to NULL when an xfrm state was unoffloaded from a device, but a race with netdevsim's .xdo_dev_offload_ok() accessing real_dev was considered a sufficient reason to not set real_dev to NULL anymore. This unfortunately introduced the new bugs. Since .xdo_dev_offload_ok() was significantly refactored by [1] and there are no more users in the stack of xso.real_dev, that race is now gone and xs->xso.real_dev can now once again be used to represent which device (if any) currently holds the offloaded rule. Go one step further and set real_dev after add/before delete calls, to catch any future driver misuses of real_dev. [1] https://lore.kernel.org/netdev/cover.1739972570.git.leon@kernel.org/ Fixes: f8cde9805981 ("bonding: fix xfrm real_dev null pointer dereference") Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Tested-by: Hangbin Liu Signed-off-by: Steffen Klassert commit 43eca05b6a3b917c600e10cc6b06bfa57fa57401 Author: Cosmin Ratiu Date: Fri Apr 11 10:49:56 2025 +0300 xfrm: Add explicit dev to .xdo_dev_state_{add,delete,free} Previously, device driver IPSec offload implementations would fall into two categories: 1. Those that used xso.dev to determine the offload device. 2. Those that used xso.real_dev to determine the offload device. The first category didn't work with bonding while the second did. In a non-bonding setup the two pointers are the same. This commit adds explicit pointers for the offload netdevice to .xdo_dev_state_add() / .xdo_dev_state_delete() / .xdo_dev_state_free() which eliminates the confusion and allows drivers from the first category to work with bonding. xso.real_dev now becomes a private pointer managed by the bonding driver. Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Signed-off-by: Steffen Klassert commit d53dda291bbd993a29b84d358d282076e3d01506 Author: Cosmin Ratiu Date: Fri Apr 11 10:49:55 2025 +0300 xfrm: Remove unneeded device check from validate_xmit_xfrm validate_xmit_xfrm checks whether a packet already passed through it on the master device (xso.dev) and skips processing the skb again on the slave device (xso.real_dev). This check was added in commit [1] to avoid tx packets on a bond device pass through xfrm twice and get two sets of headers, but the check was soon obsoleted by commit [2], which was added around the same time to fix a similar but unrelated problem. Commit [3] set XFRM_XMIT only when packets are hw offloaded. xso.dev is usually equal to xso.real_dev, unless bonding is used, in which case the bonding driver uses xso.real_dev to manage offloaded xfrm states. Since commit [3], the check added in commit [1] is unused on all cases, since packets going through validate_xmit_xfrm twice bail out on the check added in commit [2]. Here's a breakdown of relevant scenarios: 1. ESP offload off: validate_xmit_xfrm returns early on !xo. 2. ESP offload on, no bond: skb->dev == xso.real_dev == xso.dev. 3. ESP offload on, bond, xs on bond dev: 1st pass adds XFRM_XMIT, 2nd pass returns early on XFRM_XMIT. 3. ESP offload on, bond, xs on slave dev: 1st pass returns early on !xo, 2nd pass adds XFRM_XMIT. 4. ESP offload on, bond, xs on both bond AND slave dev: only 1 offload possible in secpath. Either 1st pass adds XFRM_XMIT and 2nd pass returns early on XFRM_XMIT, or 1st pass is sw and returns early on !xo. 6. ESP offload on, crypto fallback triggered in esp_xmit/esp6_xmit: 1st pass does sw crypto & secpath_reset, 2nd pass returns on !xo. This commit removes the unnecessary check, so xso.real_dev becomes what it is in practice: a private field managed by bonding driver. The check immediately below that can be simplified as well. [1] commit 272c2330adc9 ("xfrm: bail early on slave pass over skb") [2] commit 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec crypto offload.") [3] commit c7dbf4c08868 ("xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets") Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Signed-off-by: Steffen Klassert commit 25ac138f58e7d5c8bffa31e8891418d2819180c4 Author: Cosmin Ratiu Date: Fri Apr 11 10:49:54 2025 +0300 xfrm: Use xdo.dev instead of xdo.real_dev The policy offload struct was reused from the state offload and real_dev was copied from dev, but it was never set to anything else. Simplify the code by always using xdo.dev for policies. Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Signed-off-by: Steffen Klassert commit d79444e8c3d40b11f5e155e5591d53bd1e512e1f Author: Cosmin Ratiu Date: Fri Apr 11 10:49:53 2025 +0300 net/mlx5: Avoid using xso.real_dev unnecessarily xso.real_dev is the active device of an offloaded xfrm state and is managed by bonding. As such, it's subject to change when states are migrated to a new device. Using it in places other than offloading/unoffloading the states is risky. This commit saves the device into the driver-specific struct mlx5e_ipsec_sa_entry and switches mlx5e_ipsec_init_macs() and mlx5e_ipsec_netevent_event() to make use of it. Additionally, mlx5e_xfrm_update_stats() used xso.real_dev to validate that correct net locks are held. But in a bonding config, the net of the master device is the same as the underlying devices, and the net is already a local var, so use that instead. The only remaining references to xso.real_dev are now in the .xdo_dev_state_add() / .xdo_dev_state_delete() path. Signed-off-by: Cosmin Ratiu Reviewed-by: Leon Romanovsky Reviewed-by: Nikolay Aleksandrov Signed-off-by: Steffen Klassert commit d755887f8e5a2a18e15e6632a5193e5feea18499 Author: Matthew Auld Date: Thu Apr 10 17:27:17 2025 +0100 drm/xe/dma_buf: stop relying on placement in unmap The is_vram() is checking the current placement, however if we consider exported VRAM with dynamic dma-buf, it looks possible for the xe driver to async evict the memory, notifying the importer, however importer does not have to call unmap_attachment() immediately, but rather just as "soon as possible", like when the dma-resv idles. Following from this we would then pipeline the move, attaching the fence to the manager, and then update the current placement. But when the unmap_attachment() runs at some later point we might see that is_vram() is now false, and take the complete wrong path when dma-unmapping the sg, leading to explosions. To fix this check if the sgl was mapping a struct page. v2: - The attachment can be mapped multiple times it seems, so we can't really rely on encoding something in the attachment->priv. Instead see if the page_link has an encoded struct page. For vram we expect this to be NULL. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4563 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Cc: # v6.8+ Acked-by: Christian König Link: https://lore.kernel.org/r/20250410162716.159403-2-matthew.auld@intel.com commit bd7c0cb695e87c0e43247be8196b4919edbe0e85 Author: Matthew Auld Date: Mon Apr 14 14:25:40 2025 +0100 drm/xe/userptr: fix notifier vs folio deadlock User is reporting what smells like notifier vs folio deadlock, where migrate_pages_batch() on core kernel side is holding folio lock(s) and then interacting with the mappings of it, however those mappings are tied to some userptr, which means calling into the notifier callback and grabbing the notifier lock. With perfect timing it looks possible that the pages we pulled from the hmm fault can get sniped by migrate_pages_batch() at the same time that we are holding the notifier lock to mark the pages as accessed/dirty, but at this point we also want to grab the folio locks(s) to mark them as dirty, but if they are contended from notifier/migrate_pages_batch side then we deadlock since folio lock won't be dropped until we drop the notifier lock. Fortunately the mark_page_accessed/dirty is not really needed in the first place it seems and should have already been done by hmm fault, so just remove it. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4765 Fixes: 0a98219bcc96 ("drm/xe/hmm: Don't dereference struct page pointers without notifier lock") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Cc: # v6.10+ Reviewed-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250414132539.26654-2-matthew.auld@intel.com commit f5d2cbe5d8374fd094235102688f511283573abc Author: Cathy Xu Date: Mon Apr 14 16:59:27 2025 +0800 arm64: dts: mediatek: mt8196: Add pinmux macro header file Add the pinctrl header file on MediaTek mt8196. Signed-off-by: Guodong Liu Signed-off-by: Cathy Xu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250414090215.16091-3-ot_cathy.xu@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit c0f1fd9eeb317ee57b62127c8da48b309da0525d Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:44 2025 +0200 arm64: dts: mediatek: Add MT6893 pinmux macro header file Add the required macros for the pinmux nodes of the MT6893 Dimensity 1200 SoC. Link: https://lore.kernel.org/r/20250410144044.476060-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit de8304c319bc020ef79d109909ad40e944d82c82 Author: Chang S. Bae Date: Tue Apr 15 19:17:00 2025 -0700 x86/fpu: Rename fpu_reset_fpregs() to fpu_reset_fpstate_regs() The original function name came from an overly compressed form of 'fpstate_regs' by commit: e61d6310a0f8 ("x86/fpu: Reset permission and fpstate on exec()") However, the term 'fpregs' typically refers to physical FPU registers. In contrast, this function copies the init values to fpu->fpstate->regs, not hardware registers. Rename the function to better reflect what it actually does. No functional change. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-11-chang.seok.bae@intel.com commit 70fe4a0266ef156f3a49071da0d9ea6af0f49c44 Author: Chang S. Bae Date: Tue Apr 15 19:16:59 2025 -0700 x86/fpu: Remove export of mxcsr_feature_mask The variable was previously referenced in KVM code but the last usage was removed by: ea4d6938d4c0 ("x86/fpu: Replace KVMs home brewed FPU copy from user") Remove its export symbol. Reviewed-by: Nikolay Borisov Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-10-chang.seok.bae@intel.com commit d1e420772cd1eb0afe5858619c73ce36f3e781a1 Author: Chang S. Bae Date: Tue Apr 15 19:16:58 2025 -0700 x86/pkeys: Simplify PKRU update in signal frame The signal delivery logic was modified to always set the PKRU bit in xregs_state->header->xfeatures by this commit: ae6012d72fa6 ("x86/pkeys: Ensure updated PKRU value is XRSTOR'd") However, the change derives the bitmask value using XGETBV(1), rather than simply updating the buffer that already holds the value. Thus, this approach induces an unnecessary dependency on XGETBV1 for PKRU handling. Eliminate the dependency by using the established helper function. Subsequently, remove the now-unused 'mask' argument. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Aruna Ramakrishna Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Tony W Wang-oc Cc: Dave Hansen Link: https://lore.kernel.org/r/20250416021720.12305-9-chang.seok.bae@intel.com commit 64e54461ab6e8524a8de4e63b7d1a3e4481b5cf3 Author: Chang S. Bae Date: Tue Apr 15 19:16:57 2025 -0700 x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVE Currently, saving register states in the signal frame, the legacy feature bits are always set in xregs_state->header->xfeatures. This code sequence can be generalized for reuse in similar cases. Refactor the logic to ensure a consistent approach across similar usages. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-8-chang.seok.bae@intel.com commit 39cd7fad39ce2ffbeb21939c805ee55f3ec808d4 Author: Chang S. Bae Date: Tue Apr 15 19:16:56 2025 -0700 x86/fpu: Log XSAVE disablement consistently Not all paths that lead to fpu__init_disable_system_xstate() currently emit a message indicating that XSAVE has been disabled. Move the print statement into the function to ensure the message in all cases. Suggested-by: Dave Hansen Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250416021720.12305-7-chang.seok.bae@intel.com commit ab6f87ddd0c6d3fb114cdf897eb9839cbd429439 Author: Chang S. Bae Date: Tue Apr 15 19:16:55 2025 -0700 selftests/x86/apx: Add APX test The extended general-purpose registers for APX may contain random data, which is currently assumed by the xstate testing framework. This allows the testing of the new userspace feature using the common test code. Invoke the test entry function from apx.c after enumerating the state component and adding it to the support list Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-6-chang.seok.bae@intel.com commit 50c5b071e2833d2b61e3774cd792620311df157c Author: Chang S. Bae Date: Tue Apr 15 19:16:54 2025 -0700 x86/fpu/apx: Enable APX state support With securing APX against conflicting MPX, it is now ready to be enabled. Include APX in the enabled xfeature set. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-5-chang.seok.bae@intel.com commit ea68e39190cff86f457bd286c70b535e2a99a94d Author: Chang S. Bae Date: Tue Apr 15 19:16:53 2025 -0700 x86/fpu/apx: Disallow conflicting MPX presence XSTATE components are architecturally independent. There is no rule requiring their offsets in the non-compacted format to be strictly ascending or mutually non-overlapping. However, in practice, such overlaps have not occurred -- until now. APX is introduced as xstate component 19, following AMX. In the non-compacted XSAVE format, its offset overlaps with the space previously occupied by the now-deprecated MPX feature: 45fc24e89b7c ("x86/mpx: remove MPX from arch/x86") To prevent conflicts, the kernel must ensure the CPU never expose both features at the same time. If so, it indicates unreliable hardware. In such cases, XSAVE should be disabled entirely as a precautionary measure. Add a sanity check to detect this condition and disable XSAVE if an invalid hardware configuration is identified. Note: MPX state components remain enabled on legacy systems solely for KVM guest support. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-4-chang.seok.bae@intel.com commit bd0b10b795c5c4c587e83c0498251356874c655c Author: Chang S. Bae Date: Tue Apr 15 19:16:52 2025 -0700 x86/fpu/apx: Define APX state component Advanced Performance Extensions (APX) is associated with a new state component number 19. To support saving and restoring of the corresponding registers via the XSAVE mechanism, introduce the component definition along with the necessary sanity checks. Define the new component number, state name, and those register data type. Then, extend the size checker to validate the register data type and explicitly list the APX feature flag as a dependency for the new component in xsave_cpuid_features[]. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-3-chang.seok.bae@intel.com commit b02dc185ee86836cf1d8a37b81349374e4018ee0 Author: Chang S. Bae Date: Tue Apr 15 19:16:51 2025 -0700 x86/cpufeatures: Add X86_FEATURE_APX Intel Advanced Performance Extensions (APX) introduce a new set of general-purpose registers, managed as an extended state component via the xstate management facility. Before enabling this new xstate, define a feature flag to clarify the dependency in xsave_cpuid_features[]. APX is enumerated under CPUID level 7 with EDX=1. Since this CPUID leaf is not yet allocated, place the flag in a scattered feature word. While this feature is intended only for userspace, exposing it via /proc/cpuinfo is unnecessary. Instead, the existing arch_prctl(2) mechanism with the ARCH_GET_XCOMP_SUPP option can be used to query the feature availability. Finally, clarify that APX depends on XSAVE. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250416021720.12305-2-chang.seok.bae@intel.com commit 6e3b067d3c5e00dea2e38c609fcd247baa74dec4 Author: Krzysztof Kozlowski Date: Wed Jan 15 22:18:01 2025 +0100 arm64: dts: mediatek: mt7622: Align GPIO hog name with bindings Bindings expect GPIO hog names to end with 'hog' suffix, so correct it to fix dtbs_check warning: mt7622-bananapi-bpi-r64.dtb: asm_sel: $nodename:0: 'asm_sel' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$' Link: https://lore.kernel.org/r/20250115211801.194247-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5f7325fbb3d416ba66f163a9272e17d70f1d9bf4 Author: Eric Biggers Date: Sat Apr 12 21:54:21 2025 -0700 crypto: poly1305 - remove rset and sset fields of poly1305_desc_ctx These fields are no longer needed, so remove them. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 34374f76af9b65f7cf89c2fe62489593d6ecc443 Author: Eric Biggers Date: Sat Apr 12 21:54:20 2025 -0700 crypto: x86/poly1305 - don't select CRYPTO_LIB_POLY1305_GENERIC The x86 Poly1305 code never falls back to the generic code, so selecting CRYPTO_LIB_POLY1305_GENERIC is unnecessary. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 21969da642a263dde2f7b483ad676b901ae129a3 Author: Eric Biggers Date: Sat Apr 12 21:54:19 2025 -0700 crypto: x86/poly1305 - remove redundant shash algorithm Since crypto/poly1305.c now registers a poly1305-$(ARCH) shash algorithm that uses the architecture's Poly1305 library functions, individual architectures no longer need to do the same. Therefore, remove the redundant shash algorithm from the arch-specific code and leave just the library functions there. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 632dcef5bb44c1548de16e2c72bb5037a895d00f Author: Eric Biggers Date: Sat Apr 12 21:54:18 2025 -0700 crypto: mips/poly1305 - remove redundant shash algorithm Since crypto/poly1305.c now registers a poly1305-$(ARCH) shash algorithm that uses the architecture's Poly1305 library functions, individual architectures no longer need to do the same. Therefore, remove the redundant shash algorithm from the arch-specific code and leave just the library functions there. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 25221872660c9971c3684b66c8cefe0b95849aa6 Author: Eric Biggers Date: Sat Apr 12 21:54:17 2025 -0700 crypto: mips/poly1305 - drop redundant dependency on CONFIG_MIPS arch/mips/crypto/Kconfig is sourced only when CONFIG_MIPS is enabled, so there is no need for options defined in that file to depend on it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f4b1a73aec5c32ea533cc897b4b150b3a002a023 Author: Eric Biggers Date: Sat Apr 12 21:54:16 2025 -0700 crypto: arm64/poly1305 - remove redundant shash algorithm Since crypto/poly1305.c now registers a poly1305-$(ARCH) shash algorithm that uses the architecture's Poly1305 library functions, individual architectures no longer need to do the same. Therefore, remove the redundant shash algorithm from the arch-specific code and leave just the library functions there. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1f81c58279c73c813a6967460b26df3a959457e3 Author: Eric Biggers Date: Sat Apr 12 21:54:15 2025 -0700 crypto: arm/poly1305 - remove redundant shash algorithm Since crypto/poly1305.c now registers a poly1305-$(ARCH) shash algorithm that uses the architecture's Poly1305 library functions, individual architectures no longer need to do the same. Therefore, remove the redundant shash algorithm from the arch-specific code and leave just the library functions there. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ecaa4be1280a4faf72dc4b6b4f6d867332d5762e Author: Eric Biggers Date: Sat Apr 12 21:54:14 2025 -0700 crypto: poly1305 - centralize the shash wrappers for arch code Following the example of the crc32, crc32c, and chacha code, make the crypto subsystem register both generic and architecture-optimized poly1305 shash algorithms, both implemented on top of the appropriate library functions. This eliminates the need for every architecture to implement the same shash glue code. Note that the poly1305 shash requires that the key be prepended to the data, which differs from the library functions where the key is simply a parameter to poly1305_init(). Previously this was handled at a fairly low level, polluting the library code with shash-specific code. Reorganize things so that the shash code handles this quirk itself. Also, to register the architecture-optimized shashes only when architecture-optimized code is actually being used, add a function poly1305_is_arch_optimized() and make each arch implement it. Change each architecture's Poly1305 module_init function to arch_initcall so that the CPU feature detection is guaranteed to run before poly1305_is_arch_optimized() gets called by crypto/poly1305.c. (In cases where poly1305_is_arch_optimized() just returns true unconditionally, using arch_initcall is not strictly needed, but it's still good to be consistent across architectures.) Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 378a337ab40f88d63ba71d68ff578ead7f5ac8f1 Author: Eric Biggers Date: Sat Apr 12 21:54:13 2025 -0700 crypto: powerpc/poly1305 - implement library instead of shash Currently the Power10 optimized Poly1305 is only wired up to the crypto_shash API, which makes it unavailable to users of the library API. The crypto_shash API for Poly1305 is going to change to be implemented on top of the library API, so the library API needs to be supported. And of course it's needed anyway to serve the library users. Therefore, change the Power10 optimized Poly1305 code to implement the library API instead of the crypto_shash API. Cc: Danny Tsen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b03892c2f836f3daa3a7a3c2e36f82fb76210d40 Author: Dr. David Alan Gilbert Date: Sun Apr 13 00:32:41 2025 +0100 crypto: deadcode structs from 'comp' removal Ard's recent series of patches removing 'comp' implementations left behind a bunch of trivial structs, remove them. These are: crypto842_ctx - commit 2d985ff0072f ("crypto: 842 - drop obsolete 'comp' implementation") lz4_ctx - commit 33335afe33c9 ("crypto: lz4 - drop obsolete 'comp' implementation") lz4hc_ctx - commit dbae96559eef ("crypto: lz4hc - drop obsolete 'comp' implementation") lzo_ctx - commit a3e43a25bad0 ("crypto: lzo - drop obsolete 'comp' implementation") lzorle_ctx - commit d32da55c5b0c ("crypto: lzo-rle - drop obsolete 'comp' implementation") Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Herbert Xu commit 0a1376744caa553eaf073b9f71d3afd1733c0b12 Author: Herbert Xu Date: Sat Apr 12 18:57:36 2025 +0800 crypto: cbcmac - Set block size properly The block size of a hash algorithm is meant to be the number of bytes its block function can handle. For cbcmac that should be the block size of the underlying block cipher instead of one. Set the block size of all cbcmac implementations accordingly. Signed-off-by: Herbert Xu commit e13b67e9d02829620c1c57d1b008e9c7ef954d19 Author: Herbert Xu Date: Sat Apr 12 18:57:33 2025 +0800 crypto: sm3-base - Use sm3_init Remove the duplicate init code and simply call sm3_init. Signed-off-by: Herbert Xu commit cb16ba46958e41f8d805cbdb027a601b3a0c65b4 Author: Herbert Xu Date: Sat Apr 12 18:57:31 2025 +0800 crypto: lib/sm3 - Export generic block function Export the generic block function so that it can be used by the Crypto API. Signed-off-by: Herbert Xu commit f4065b2f63cfc220a852c2c2e760753e5cae0d54 Author: Herbert Xu Date: Sat Apr 12 18:57:29 2025 +0800 crypto: lib/sm3 - Move sm3 library into lib/crypto Move the sm3 library code into lib/crypto. Signed-off-by: Herbert Xu commit a58d1c0be43b9f21da16471f9786d5d1fc3a2aa7 Author: Herbert Xu Date: Sat Apr 12 18:57:26 2025 +0800 crypto: hash - Update HASH_MAX_DESCSIZE comment The biggest context is not sha3_generic (356), but sha-s390 (360). Signed-off-by: Herbert Xu commit 16aeed07c0debede447ceb9cae6ad047ab654ccf Author: Herbert Xu Date: Sat Apr 12 18:57:24 2025 +0800 crypto: arm64/sha512 - Fix header inclusions Instead of relying on linux/module.h being included through the header file sha512_base.h, include it directly. Signed-off-by: Herbert Xu commit c7e68043620e0d5f89a37e573c667beab72d2937 Author: Herbert Xu Date: Sat Apr 12 18:57:22 2025 +0800 crypto: zynqmp-sha - Add locking The hardwrae is only capable of one hash at a time, so add a lock to make sure that it isn't used concurrently. Fixes: 7ecc3e34474b ("crypto: xilinx - Add Xilinx SHA3 driver") Signed-off-by: Herbert Xu commit 04bfa4c7d5119ca38f8133bfdae7957a60c8b221 Author: Herbert Xu Date: Sat Apr 12 18:57:19 2025 +0800 crypto: hash - Add HASH_REQUEST_ON_STACK Allow any ahash to be used with a stack request, with optional dynamic allocation when async is needed. The intended usage is: HASH_REQUEST_ON_STACK(req, tfm); ... err = crypto_ahash_digest(req); /* The request cannot complete synchronously. */ if (err == -EAGAIN) { /* This will not fail. */ req = HASH_REQUEST_CLONE(req, gfp); /* Redo operation. */ err = crypto_ahash_digest(req); } Signed-off-by: Herbert Xu commit 90916934fd093edf62bc0c5c9a940a8efa7db2f8 Author: Herbert Xu Date: Sat Apr 12 18:47:47 2025 +0800 crypto: shash - Remove dynamic descsize As all users of the dynamic descsize have been converted to use a static one instead, remove support for dynamic descsize. Signed-off-by: Herbert Xu commit aeffd9093820c16e10f61d1c894c16d435b82975 Author: Herbert Xu Date: Sat Apr 12 18:47:45 2025 +0800 crypto: hmac - Make descsize an algorithm attribute Rather than setting descsize in init_tfm, make it an algorithm attribute and set it during instance construction. Signed-off-by: Herbert Xu commit c1dd353d18e53b39dffe5d8fce948f959ac73bbc Author: Herbert Xu Date: Sat Apr 12 18:47:42 2025 +0800 crypto: zynqmp-sha - Make descsize an algorithm attribute Rather than setting descsize in init_tfm, set it statically and double-check it in init_tfm. Signed-off-by: Herbert Xu commit 34f442a3a08aec3bd993dda89c0fdc8447ce4fee Author: Herbert Xu Date: Sat Apr 12 18:47:40 2025 +0800 crypto: padlock-sha - Make descsize an algorithm attribute Rather than setting descsize in init_tfm, set it statically and double-check it in init_tfm. Signed-off-by: Herbert Xu commit f1440a90465bea1993f937ac7add592ce1e4ff44 Author: Herbert Xu Date: Sat Apr 12 13:16:43 2025 +0800 crypto: api - Add support for duplicating algorithms before registration If the bit CRYPTO_ALG_DUP_FIRST is set, an algorithm will be duplicated by kmemdup before registration. This is inteded for hardware-based algorithms that may be unplugged at will. Do not use this if the algorithm data structure is embedded in a bigger data structure. Perform the duplication in the driver instead. Signed-off-by: Herbert Xu commit 66fecd9d94034b6193636fe3bc01f089439f5413 Author: Thorsten Blum Date: Fri Apr 11 21:20:51 2025 +0200 crypto: skcipher - Realign struct skcipher_walk to save 8 bytes Reduce skcipher_walk's struct size by 8 bytes by realigning its members. pahole output before: /* size: 120, cachelines: 2, members: 13 */ /* sum members: 108, holes: 2, sum holes: 8 */ /* padding: 4 */ /* last cacheline: 56 bytes */ and after: /* size: 112, cachelines: 2, members: 13 */ /* padding: 4 */ /* last cacheline: 48 bytes */ No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu commit 34f170a590710737f9611231cd77b37ea41f707a Author: Herbert Xu Date: Fri Apr 11 15:38:50 2025 +0800 crypto: simd - Include asm/simd.h in internal/simd.h Now that the asm/simd.h files have been made safe against double inclusion, include it directly in internal/simd.h. Signed-off-by: Herbert Xu commit f1c09a0b6add651e6a0be22302680ac444dee29b Author: Herbert Xu Date: Fri Apr 11 15:38:47 2025 +0800 x86: Make simd.h more resilient Add missing header inclusions and protect against double inclusion. Signed-off-by: Herbert Xu commit d01dd2700b2d3690e4371466eb6f8a9b24c03e71 Author: Herbert Xu Date: Fri Apr 11 15:38:45 2025 +0800 arm: Make simd.h more resilient Add missing header inclusions and protect against double inclusion. Signed-off-by: Herbert Xu commit 7ba8df47810f0731da1c9edd9aa8c1836279a93d Author: Herbert Xu Date: Fri Apr 11 15:38:43 2025 +0800 asm-generic: Make simd.h more resilient Add missing header inclusions and protect against double inclusion. Signed-off-by: Herbert Xu commit 9b27a1b2001a70e1a47d824475a19839194f74dd Author: Herbert Xu Date: Wed Apr 16 15:34:59 2025 +0800 crypto: powerpc - Include uaccess.h and others The powerpc aes/ghash code was relying on pagefault_disable from being pulled in by random header files. Fix this by explicitly including uaccess.h. Also add other missing header files to prevent similar problems in future. Signed-off-by: Herbert Xu commit 4855244996578ac25495a708b426c3f27632a068 Author: Ivaylo Ivanov Date: Sun Feb 9 15:20:43 2025 +0200 arm64: dts: exynos: update all samsung,mode constants Update all samsung,mode property values to account for renaming USI_V2 constants to USI_MODE in the bindings. Signed-off-by: Ivaylo Ivanov Link: https://lore.kernel.org/r/20250209132043.3906127-1-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4e2547509f472d77d5c6d27feae318ac9d5eba5d Merge: e3a52b67f54aa3 06e09002bc1d46 Author: Ingo Molnar Date: Wed Apr 16 09:35:49 2025 +0200 Merge branch 'x86/cpu' into x86/fpu, to pick up dependent commits Signed-off-by: Ingo Molnar commit 62120d819f5b5818fa07d3121f7693f6bf18d18b Author: Varada Pavani Date: Fri Mar 7 14:54:03 2025 +0530 clk: samsung: Use samsung CCF common function Use samsung CCF function which registers multiple clock providers using single function call samsung_cmu_register_clocks(). Signed-off-by: Varada Pavani Link: https://lore.kernel.org/r/20250307092403.19742-1-v.pavani@samsung.com Signed-off-by: Krzysztof Kozlowski commit 1c745df519d7b9ba7d3c5f9f40bf2f04ce955b39 Author: Heiko Carstens Date: Thu Apr 10 11:50:36 2025 +0200 watchdog: diag288_wdt: Implement module autoload The s390 specific diag288_wdt watchdog driver makes use of the virtual watchdog timer, which is available in most machine configurations. If executing the diagnose instruction with subcode 0x288 results in an exception the watchdog timer is not available, otherwise it is available. In order to allow module autoload of the diag288_wdt module, move the detection of the virtual watchdog timer to early boot code, and provide its availability as a cpu feature. This allows to make use of module_cpu_feature_match() to automatically load the module iff the virtual watchdog timer is available. Suggested-by: Marc Hartmayer Tested-by: Mete Durlu Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20250410095036.1525057-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens commit 813e311e613442a748384a0ee0a8f45e4bac6ff7 Author: Shenghao Ding Date: Wed Apr 16 13:18:38 2025 +0800 ALSA: hda/tas2781: Create a common header for both spi and i2c tas2781 hda driver Move the common macro definition of kcontrols into a common header for code cleanup, and create a common header to store the common declaration for both spi and i2c hda driver. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250416051838.2001-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit 2b5bd56bc14305c02fc516b573868fb9f9455573 Author: Ryosuke Yasuoka Date: Sat Apr 12 22:20:11 2025 +0900 drm/virtio: Support drm_panic with non-vmapped shmem BO Pass array of pages of the scanout buffer to shmem BO, allowing drm_panic to work even if the BO is not vmapped. Link: https://lore.kernel.org/all/20250407140138.162383-3-jfalempe@redhat.com/ Signed-off-by: Jocelyn Falempe Signed-off-by: Ryosuke Yasuoka Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko [dmitry.osipenko@collabora.com: rebased on misc-next, fixed minor checkpatch warn] [dmitry.osipenko@collabora.com: changed commit message to use link tag] Link: https://lore.kernel.org/all/20250412132012.291837-1-ryasuoka@redhat.com/ commit a6b3e1f9a5b694f8b06952e3ede89a715efccf0c Author: Sakari Ailus Date: Thu Apr 10 18:22:39 2025 +0300 hwrng: npcm - Add struct device pointer to device context struct Add a struct device pointer field to the device's context struct. This makes using the unsigned long priv pointer in struct hwrng unnecessary, so remove that one as well. Signed-off-by: Sakari Ailus Signed-off-by: Herbert Xu commit c2c460c30af5240d1894692306aa3a2377964f9e Author: Sakari Ailus Date: Thu Apr 10 18:22:38 2025 +0300 hwrng: mtk - Add struct device pointer to device context struct Add a struct device pointer field to the device's context struct. This makes using the unsigned long priv pointer in struct hwrng unnecessary, so remove that one as well. Signed-off-by: Sakari Ailus Signed-off-by: Herbert Xu commit 695912e619ee3945075af2de248e1e0fcef94a57 Author: Sakari Ailus Date: Thu Apr 10 18:22:37 2025 +0300 hwrng: atmel - Add struct device pointer to device context struct Add a struct device pointer field to the device's context struct. This makes using the unsigned long priv pointer in struct hwrng unnecessary, so remove that one as well. Signed-off-by: Sakari Ailus Signed-off-by: Herbert Xu commit 9af6339a65426b0b4850b07ff3b6959497bfcac5 Author: Ashish Kalra Date: Wed Apr 9 19:34:29 2025 +0000 crypto: ccp - Fix __sev_snp_shutdown_locked Fix smatch warning: drivers/crypto/ccp/sev-dev.c:1755 __sev_snp_shutdown_locked() error: uninitialized symbol 'dfflush_error'. Fixes: 9770b428b1a2 ("crypto: ccp - Move dev_info/err messages for SEV/SNP init and shutdown") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-crypto/d9c2e79c-e26e-47b7-8243-ff6e7b101ec3@stanley.mountain/ Signed-off-by: Ashish Kalra Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit d701722aa343e59dd7c18fc62894edf4497251e2 Author: Herbert Xu Date: Wed Apr 9 11:29:03 2025 +0800 crypto: api - Allow delayed algorithm destruction The current algorithm unregistration mechanism originated from software crypto. The code relies on module reference counts to stop in-use algorithms from being unregistered. Therefore if the unregistration function is reached, it is assumed that the module reference count has hit zero and thus the algorithm reference count should be exactly 1. This is completely broken for hardware devices, which can be unplugged at random. Fix this by allowing algorithms to be destroyed later if a destroy callback is provided. Reported-by: Sean Anderson Signed-off-by: Herbert Xu commit c80d6598ffef3154698fb991c15211762cbf550e Author: Thorsten Blum Date: Tue Apr 8 13:22:59 2025 +0200 crypto: essiv - Remove unnecessary strscpy() size argument If the destination buffer has a fixed length, strscpy() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit size argument unnecessary - remove it. No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu commit 6b7f9397c98c72902f9364056413c73fe6dee1d8 Author: Lukas Wunner Date: Mon Apr 7 21:32:42 2025 +0200 crypto: ecdsa - Fix NIST P521 key size reported by KEYCTL_PKEY_QUERY When user space issues a KEYCTL_PKEY_QUERY system call for a NIST P521 key, the key_size is incorrectly reported as 528 bits instead of 521. That's because the key size obtained through crypto_sig_keysize() is in bytes and software_key_query() multiplies by 8 to yield the size in bits. The underlying assumption is that the key size is always a multiple of 8. With the recent addition of NIST P521, that's no longer the case. Fix by returning the key_size in bits from crypto_sig_keysize() and adjusting the calculations in software_key_query(). The ->key_size() callbacks of sig_alg algorithms now return the size in bits, whereas the ->digest_size() and ->max_size() callbacks return the size in bytes. This matches with the units in struct keyctl_pkey_query. Fixes: a7d45ba77d3d ("crypto: ecdsa - Register NIST P521 and extend test suite") Signed-off-by: Lukas Wunner Reviewed-by: Stefan Berger Reviewed-by: Ignat Korchagin Signed-off-by: Herbert Xu commit 3828485e1c7b111290122ab6e083c2a37132b5c2 Author: Lukas Wunner Date: Mon Apr 7 21:32:41 2025 +0200 crypto: ecdsa - Fix enc/dec size reported by KEYCTL_PKEY_QUERY KEYCTL_PKEY_QUERY system calls for ecdsa keys return the key size as max_enc_size and max_dec_size, even though such keys cannot be used for encryption/decryption. They're exclusively for signature generation or verification. Only rsa keys with pkcs1 encoding can also be used for encryption or decryption. Return 0 instead for ecdsa keys (as well as ecrdsa keys). Signed-off-by: Lukas Wunner Reviewed-by: Stefan Berger Reviewed-by: Ignat Korchagin Signed-off-by: Herbert Xu commit 61bb8db6f682bf3fed9feac8948daefb37146265 Author: Thomas Richard Date: Mon Apr 7 19:33:14 2025 +0200 crypto: caam - Add support for i.MX8QM On i.MX8QM, caam clocks are turned on automatically and Linux does not have access to the caam controller's register page, so skip clocks initialization. Signed-off-by: Thomas Richard Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit c1024581ff2c34db4fdfe857b29f606e5117eb12 Author: Ovidiu Panait Date: Mon Apr 7 15:36:04 2025 +0300 crypto: tegra - use API helpers to setup fallback request Rather than setting up the fallback request by hand, use ahash_request_set_callback() and ahash_request_set_crypt() API helpers to properly setup the new request. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit cbc9f5bcfa72d7e58cbace18c97e4df7e3a73058 Author: Ovidiu Panait Date: Mon Apr 7 15:36:02 2025 +0300 crypto: rk3288 - use API helpers to setup fallback request Rather than setting up the fallback request by hand, use ahash_request_set_callback() and ahash_request_set_crypt() API helpers to properly setup the new request. This also ensures that the completion callback is properly passed down to the fallback algorithm, which avoids a crash with async fallbacks. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 2f0c856af6258b7d0110872b72a53267bfe72715 Author: Ovidiu Panait Date: Mon Apr 7 15:36:01 2025 +0300 crypto: img-hash - use API helpers to setup fallback request Rather than setting up the fallback request by hand, use ahash_request_set_callback() and ahash_request_set_crypt() API helpers to properly setup the new request. This also ensures that the completion callback is properly passed down to the fallback algorithm, which avoids a crash with async fallbacks. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit c360df01c6c19959d2218cbad56d5b7c2ac7a476 Author: Herbert Xu Date: Mon Apr 7 18:21:11 2025 +0800 crypto: ahash - Use cra_reqsize Use the common reqsize field and remove reqsize from ahash_alg. Signed-off-by: Herbert Xu commit 300e6d6e9ebf2dcc0ca3eab68ed65207e947926c Author: Herbert Xu Date: Mon Apr 7 18:21:09 2025 +0800 crypto: acomp - Remove reqsize field Remove the type-specific reqsize field in favour of the common one. Signed-off-by: Herbert Xu commit 47b5b6f9eb736b1868b0f9c1a1575b5922451cc6 Author: Herbert Xu Date: Mon Apr 7 18:21:06 2025 +0800 crypto: iaa - Use cra_reqsize for acomp Use the common reqsize field for acomp algorithms. Signed-off-by: Herbert Xu commit 1d10f790125d8a696c51fd7585caf3dc7672058e Author: Herbert Xu Date: Mon Apr 7 18:21:04 2025 +0800 crypto: qat - Use cra_reqsize for acomp Use the common reqsize field for acomp algorithms. Signed-off-by: Herbert Xu commit dbad301d9f8565f0e14004c0dbbe169e09756cb9 Author: Herbert Xu Date: Mon Apr 7 18:21:02 2025 +0800 crypto: acomp - Use cra_reqsize Use the common reqsize if present. Signed-off-by: Herbert Xu commit afddce13ce81d52a13898fa0700917835c71acd6 Author: Herbert Xu Date: Mon Apr 7 18:20:59 2025 +0800 crypto: api - Add reqsize to crypto_alg Add a reqsize field to crypto_alg with the intention of replacing the type-specific reqsize field currently used by ahash and acomp. Signed-off-by: Herbert Xu commit 6eed1e3552fc076d2617f6793cb148d485696ab6 Author: Herbert Xu Date: Mon Apr 7 18:20:57 2025 +0800 crypto: api - Mark cra_init/cra_exit as deprecated These functions have been obsoleted by the type-specific init/exit functions. Signed-off-by: Herbert Xu commit bebe54b8be12a7b7e8ecb4946fb95aea8374efa2 Author: Zixun LI Date: Mon Apr 7 12:20:49 2025 +0200 crypto: atmel - add CRYPTO_ALG_KERN_DRIVER_ONLY flag This patch introduces the CRYPTO_ALG_KERN_DRIVER_ONLY flag to the atmel-aes, atmel-sha, and atmel-tdes drivers. This flag is set for hardware accelerated ciphers accessible through a kernel driver only, which is the case of these drivers. Signed-off-by: Zixun LI Signed-off-by: Herbert Xu commit fcfbdddc6f0260174f76e185c9768a950f0872be Author: Herbert Xu Date: Mon Apr 7 18:11:33 2025 +0800 crypto: ctr - Remove unnecessary header inclusions Now that the broken drivers have been fixed, remove the unnecessary inclusions from crypto/ctr.h. Signed-off-by: Herbert Xu commit 60323cb47c842b0d2f0b5ff192e4a4fb4adfa363 Author: Herbert Xu Date: Mon Apr 7 18:11:31 2025 +0800 crypto: s5p-sss - Add missing header inclusions The gutting of crypto/ctr.h uncovered missing header inclusions. Add them. Signed-off-by: Herbert Xu commit 6611dcd503e464c84e2eb19a4878a5bc0bb10e21 Author: Herbert Xu Date: Mon Apr 7 18:11:28 2025 +0800 crypto: ccp - Add missing header inclusions The gutting of crypto/ctr.h uncovered missing header inclusions. Add them. Signed-off-by: Herbert Xu commit ab0f46cefde5d5382e6ae039ac59df34bdd502d2 Author: Herbert Xu Date: Mon Apr 7 18:11:26 2025 +0800 crypto: nx - Add missing header inclusions The gutting of crypto/ctr.h uncovered missing header inclusions. Add them. Signed-off-by: Herbert Xu commit 5f3437e9c89eec7bbf0ee5f582894d41f57528bc Author: Herbert Xu Date: Mon Apr 7 18:05:27 2025 +0800 crypto: acomp - Simplify folio handling Rather than storing the folio as is and handling it later, convert it to a scatterlist right away. Signed-off-by: Herbert Xu commit 018cba2ecc3bb97d3cb24470d2e1245cd90d98c3 Author: Herbert Xu Date: Mon Apr 7 18:03:05 2025 +0800 crypto: acomp - Remove ACOMP_REQUEST_ALLOC Remove ACOMP_REQUEST_ALLOC in favour of ACOMP_REQUEST_ON_STACK with ACOMP_REQUEST_CLONE. Signed-off-by: Herbert Xu commit e87e95d8dde623f199afbb364f89e6b20ffa61ec Author: Herbert Xu Date: Mon Apr 7 18:03:02 2025 +0800 ubifs: Use ACOMP_REQUEST_CLONE Switch to the new acomp API where stacks requests are used by default and a dynamic request is only allocted when necessary. Signed-off-by: Herbert Xu commit 097c432caaa6d91f87732fe991cb08139e31101a Author: Herbert Xu Date: Mon Apr 7 18:03:00 2025 +0800 crypto: acomp - Add ACOMP_REQUEST_CLONE Add a new helper ACOMP_REQUEST_CLONE that will transform a stack request into a dynamically allocated one if possible, and otherwise switch it over to the sycnrhonous fallback transform. The intended usage is: ACOMP_STACK_ON_REQUEST(req, tfm); ... err = crypto_acomp_compress(req); /* The request cannot complete synchronously. */ if (err == -EAGAIN) { /* This will not fail. */ req = ACOMP_REQUEST_CLONE(req, gfp); /* Redo operation. */ err = crypto_acomp_compress(req); } Signed-off-by: Herbert Xu commit d0a5c9d079decad95a77638c19bc5b3a6a0ffe21 Author: Herbert Xu Date: Mon Apr 7 18:02:58 2025 +0800 crypto: iaa - Switch to ACOMP_FBREQ_ON_STACK Rather than copying the request by hand, use the ACOMP_FBREQ_ON_STACK helper to do it. Signed-off-by: Herbert Xu commit 05fa2c6e87da31eab150cdaca6697cd1de122ec7 Author: Herbert Xu Date: Mon Apr 7 18:02:55 2025 +0800 crypto: acomp - Add ACOMP_FBREQ_ON_STACK Add a helper to create an on-stack fallback request from a given request. Use this helper in acomp_do_nondma. Signed-off-by: Herbert Xu commit b04b395f7a29ed28d3cb27a7b39ac67dfb959fa0 Author: Herbert Xu Date: Mon Apr 7 18:02:53 2025 +0800 crypto: acomp - Use request flag helpers and add acomp_request_flags Use the newly added request flag helpers to manage the request flags. Also add acomp_request_flags which lets bottom-level users to access the request flags without the bits private to the acomp API. Signed-off-by: Herbert Xu commit 1451e3e561be9ff4e86b911b9367a2223275d16f Author: Herbert Xu Date: Mon Apr 7 18:02:51 2025 +0800 crypto: api - Add helpers to manage request flags Add helpers so that the ON_STACK request flag management is not duplicated all over the place. Signed-off-by: Herbert Xu commit b93336cd767fc266dcccfa034a1fb32ae1a23564 Author: Thorsten Blum Date: Mon Apr 7 10:22:47 2025 +0200 crypto: x509 - Replace kmalloc() + NUL-termination with kzalloc() Use kzalloc() to zero out the one-element array instead of using kmalloc() followed by a manual NUL-termination. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Lukas Wunner Signed-off-by: Herbert Xu commit 5bb61dc76d11a661c323dee1505b408d18c31565 Author: Herbert Xu Date: Sat Apr 12 13:37:00 2025 +0800 crypto: ahash - Remove request chaining Request chaining requires the user to do too much book keeping. Remove it from ahash. Signed-off-by: Herbert Xu commit 69e5a1228d43f76f7a6a2e73ddd55c543fac8826 Author: Herbert Xu Date: Sat Apr 12 13:36:57 2025 +0800 Revert "crypto: tcrypt - Restore multibuffer ahash tests" This reverts commit c664f034172705a75f3f8a0c409b9bf95b633093. Remove the multibuffer ahash speed tests again. Signed-off-by: Herbert Xu commit 64929fe8c0a43508eee952cf57903a61c52601e7 Author: Herbert Xu Date: Sat Apr 12 13:36:55 2025 +0800 crypto: acomp - Remove request chaining Request chaining requires the user to do too much book keeping. Remove it from acomp. Signed-off-by: Herbert Xu commit 78e2846aa4b29b44368377842d2369e0198022b7 Author: Herbert Xu Date: Sat Apr 12 13:36:53 2025 +0800 crypto: deflate - Remove request chaining Remove request chaining support from deflate. Signed-off-by: Herbert Xu commit 5976fe19e240a681b5dd13362c8507e4c66b466b Author: Herbert Xu Date: Sat Apr 12 13:36:51 2025 +0800 Revert "crypto: testmgr - Add multibuffer acomp testing" This reverts commit 99585c2192cb1ce212876e82ef01d1c98c7f4699. Remove the acomp multibuffer tests so that the interface can be redesigned. Signed-off-by: Herbert Xu commit 415cb45895f43015515473fbc40563ca5eec9a7c Author: Thomas Zimmermann Date: Mon Apr 14 15:12:01 2025 +0200 drm/virtio: Use dma_buf from GEM object instance Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20250414131507.566072-3-tzimmermann@suse.de commit 964f2a5c0e4f8fdf533bf8a287344a1aaadd0c92 Author: Thomas Zimmermann Date: Mon Apr 14 15:12:00 2025 +0200 drm/virtio: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20250414131507.566072-2-tzimmermann@suse.de commit dcb882bd436e2124e37640671cfa773dfaed485c Author: Uwe Kleine-König Date: Sat Apr 12 14:21:24 2025 +0200 pwm: loongson: Fix u32 overflow in waveform calculation mul_u64_u64_div_u64() returns an u64 that might be bigger than U32_MAX. To properly handle this case it must not be directly assigned to an u32 value. Use a wider type for duty and period to make the idiom: duty = mul_u64_u64_div_u64(...) if (duty > U32_MAX) duty = U32_MAX; actually work as intended. Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/44f3c764-8b65-49a9-b3ad-797e9fbb96f5@stanley.mountain Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support") Signed-off-by: Uwe Kleine-König Reviewed-by: Binbin Zhou Link: https://lore.kernel.org/r/20250412122124.1636152-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 06e09002bc1d46505d6b3bd947ebaf3cec7acab8 Merge: 3aba0b40cacdfb 1a1d569a75f3ab Author: Ingo Molnar Date: Wed Apr 16 07:03:04 2025 +0200 Merge branch 'linus' into x86/cpu, to resolve conflicts Conflicts: tools/arch/x86/include/asm/cpufeatures.h Signed-off-by: Ingo Molnar commit ac1df712442c64b50cfdbe01da0e5aca8319b559 Merge: a496d2f0fd612a d9f3e9ecc4562a Author: Jakub Kicinski Date: Tue Apr 15 20:20:59 2025 -0700 Merge branch 'net-ptp-driver-opt-in-for-supported-ptp-ioctl-flags' Jacob Keller says: ==================== net: ptp: driver opt-in for supported PTP ioctl flags Both the PTP_EXTTS_REQUEST(2) and PTP_PEROUT_REQUEST(2) ioctls take flags from userspace to modify their behavior. Drivers are supposed to check these flags, rejecting requests for flags they do not support. Many drivers today do not check these flags, despite many attempts to squash individual drivers as these mistakes are discovered. Additionally, any new flags added can require updating every driver if their validation checks are poorly implemented. It is clear that driver authors will not reliably check for unsupported flags. The root of the issue is that drivers must essentially opt out of every flag, rather than opt in to the ones they support. Instead, lets introduce .supported_perout_flags and .supported_extts_flags to the ptp_clock_info structure. This is a pattern taken from several ethtool ioctls which enabled validation to move out of the drivers and into the shared ioctl handlers. This pattern has worked quite well and makes it much more difficult for drivers to accidentally accept flags they do not support. With this approach, drivers which do not set the supported fields will have the core automatically reject any request which has flags. Drivers must opt in to each flag they support by adding it to the list, with the sole exception being the PTP_ENABLE_FEATURE flag of the PTP_EXTTS_REQUEST ioctl since it is entirely handled by the ptp_chardev.c file. This change will ensure that all current and future drivers are safe for extension when we need to extend these ioctls. I opted to keep all the driver changes into one patch per ioctl type. The changes are relatively small and straight forward. Splitting it per-driver would make the series large, and also break flags between the introduction of the supported field and setting it in each driver. The non-Intel drivers are compile-tested only, and I would appreciate confirmation and testing from their respective maintainers. (It is also likely that I missed some of the driver authors especially for drivers which didn't make any checks at all and do not set either of the supported flags yet) v1: https://lore.kernel.org/20250408-jk-supported-perout-flags-v1-0-d2f8e3df64f3@intel.com ==================== Link: https://patch.msgid.link/20250414-jk-supported-perout-flags-v2-0-f6b17d15475c@intel.com Signed-off-by: Jakub Kicinski commit d9f3e9ecc4562ae07aaf614cf0a6690ef7ca0e10 Author: Jacob Keller Date: Mon Apr 14 14:26:31 2025 -0700 net: ptp: introduce .supported_perout_flags to ptp_clock_info The PTP_PEROUT_REQUEST2 ioctl has gained support for flags specifying specific output behavior including PTP_PEROUT_ONE_SHOT, PTP_PEROUT_DUTY_CYCLE, PTP_PEROUT_PHASE. Driver authors are notorious for not checking the flags of the request. This results in misinterpreting the request, generating an output signal that does not match the requested value. It is anticipated that even more flags will be added in the future, resulting in even more broken requests. Expecting these issues to be caught during review or playing whack-a-mole after the fact is not a great solution. Instead, introduce the supported_perout_flags field in the ptp_clock_info structure. Update the core character device logic to explicitly reject any request which has a flag not on this list. This ensures that drivers must 'opt in' to the flags they support. Drivers which don't set the .supported_perout_flags field will not need to check that unsupported flags aren't passed, as the core takes care of this. Update the drivers which do support flags to set this new field. Note the following driver files set n_per_out to a non-zero value but did not check the flags at all: • drivers/ptp/ptp_clockmatrix.c • drivers/ptp/ptp_idt82p33.c • drivers/ptp/ptp_fc3.c • drivers/net/ethernet/ti/am65-cpts.c • drivers/net/ethernet/aquantia/atlantic/aq_ptp.c • drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c • drivers/net/dsa/sja1105/sja1105_ptp.c • drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c • drivers/net/ethernet/mscc/ocelot_vsc7514.c • drivers/net/ethernet/intel/i40e/i40e_ptp.c Reviewed-by: Vadim Fedorenko Signed-off-by: Jacob Keller Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20250414-jk-supported-perout-flags-v2-2-f6b17d15475c@intel.com Signed-off-by: Jakub Kicinski commit 7c571ac57d9d97190dcba18212fabf99888b0c48 Author: Jacob Keller Date: Mon Apr 14 14:26:30 2025 -0700 net: ptp: introduce .supported_extts_flags to ptp_clock_info The PTP_EXTTS_REQUEST(2) ioctl has a flags field which specifies how the external timestamp request should behave. This includes which edge of the signal to timestamp, as well as a specialized "offset" mode. It is expected that more flags will be added in the future. Driver authors routinely do not check the flags, often accepting requests with flags which they do not support. Even drivers which do check flags may not be future-proofed to reject flags not yet defined. Thus, any future flag additions often require manually updating drivers to reject these flags. This approach of hoping we catch flag checks during review, or playing whack-a-mole after the fact is the wrong approach. Introduce the "supported_extts_flags" field to the ptp_clock_info structure. This field defines the set of flags the device actually supports. Update the core character device logic to check this field and reject unsupported requests. Getting this right is somewhat tricky. First, to avoid unnecessary repetition and make basic functionality work when .supported_extts_flags is 0, the core always accepts the PTP_ENABLE_FEATURE flag. This flag is used to set the 'on' parameter to the .enable function and is thus always 'supported' by all drivers. For backwards compatibility, the PTP_RISING_EDGE and PTP_FALLING_EDGE flags are merely "hints" when using the old PTP_EXTTS_REQUEST ioctl, and are not expected to be enforced. If the user issues PTP_EXTTS_REQUEST2, the PTP_STRICT_FLAGS flag is added which is supposed to inform the driver to strictly validate the flags and reject unsupported requests. To handle this, first check if the driver reports PTP_STRICT_FLAGS support. If it does not, then always allow the PTP_RISING_EDGE and PTP_FALLING_EDGE flags. This keeps backwards compatibility with the original PTP_EXTTS_REQUEST ioctl where these flags are not guaranteed to be honored. This way, drivers which do not set the supported_extts_flags will continue to accept requests for the original PTP_EXTTS_REQUEST ioctl. The core will automatically reject requests with new flags, and correctly reject requests with PTP_STRICT_FLAGS, where the driver is supposed to strictly validate the flags. Update the various drivers, refactoring their validation logic into the .supported_extts_flags field. For consistency and readability, PTP_ENABLE_FEATURE is not set in the supported flags list, and PTP_EXTTS_EDGES is expanded to PTP_RISING_EDGE | PTP_FALLING_EDGE in all cases. Note the following driver files set n_ext_ts to a non-zero value but did not check flags at all: • drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c • drivers/net/ethernet/freescale/enetc/enetc_ptp.c • drivers/net/ethernet/intel/i40e/i40e_ptp.c • drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c • drivers/net/ethernet/renesas/ravb_ptp.c • drivers/net/ethernet/renesas/rtsn.c • drivers/net/ethernet/renesas/rtsn.h • drivers/net/ethernet/ti/am65-cpts.c • drivers/net/ethernet/ti/cpts.h • drivers/net/ethernet/ti/icssg/icss_iep.c • drivers/net/ethernet/xscale/ptp_ixp46x.c • drivers/net/phy/bcm-phy-ptp.c • drivers/ptp/ptp_ocp.c • drivers/ptp/ptp_pch.c • drivers/ptp/ptp_qoriq.c These drivers behavior does change slightly: they will now reject the PTP_EXTTS_REQUEST2 ioctl, because they do not strictly validate their flags. This also makes them no longer incorrectly accept PTP_EXT_OFFSET. Also note that the renesas ravb driver does not support PTP_STRICT_FLAGS. We could leave the .supported_extts_flags as 0, but I added the PTP_RISING_EDGE | PTP_FALLING_EDGE since the driver previously manually validated these flags. This is equivalent to 0 because the core will allow these flags regardless unless PTP_STRICT_FLAGS is also set. Signed-off-by: Jacob Keller Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20250414-jk-supported-perout-flags-v2-1-f6b17d15475c@intel.com Signed-off-by: Jakub Kicinski commit ddf4c3840a3cfea3a037f778ad9223b9337e0bc5 Author: Krzysztof Kozlowski Date: Fri Feb 21 17:33:07 2025 +0100 arm64: dts: qcom: sm8750-qrd: Enable modem Enable the modem (MPSS) on QRD8750 board. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250221-b4-sm8750-modem-v3-3-462dae7303c7@linaro.org Signed-off-by: Bjorn Andersson commit 9facd1c15b9362f280dd2c27e08cc1942eacd1cf Author: Krzysztof Kozlowski Date: Fri Feb 21 17:33:06 2025 +0100 arm64: dts: qcom: sm8750-mtp: Enable modem Enable the modem (MPSS) on MPT8750 board. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250221-b4-sm8750-modem-v3-2-462dae7303c7@linaro.org Signed-off-by: Bjorn Andersson commit 104790b0699462dcf208a7d0290fc7a7fe44cc54 Author: Krzysztof Kozlowski Date: Fri Feb 21 17:33:05 2025 +0100 arm64: dts: qcom: sm8750: Add Modem / MPSS Add nodes for the MPSS and its SMP2P. These are compatible with earlier SM8650 with difference in lack of fifth memory region for Qlink Logging. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250221-b4-sm8750-modem-v3-1-462dae7303c7@linaro.org Signed-off-by: Bjorn Andersson commit f716f5dcf5cc40a0e883513b93dfaf35c50e7ead Author: Taniya Das Date: Fri Feb 21 15:04:57 2025 +0530 arm64: dts: qcom: qcs6490-rb3gen2: Update the LPASS audio node Update the lpassaudio node to support the new compatible as the lpassaudio needs to support the reset functionality on the QCS6490 RB3Gen2 board and the rest of the Audio functionality would be provided from the LPASS firmware. Reviewed-by: Dmitry Baryshkov Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20250221-lpass_qcm6490_resets-v5-4-6be0c0949a83@quicinc.com Signed-off-by: Bjorn Andersson commit 9361ee93ac9d1b6730a65fc690e64cffaa41335e Author: Taniya Das Date: Fri Feb 21 15:04:56 2025 +0530 arm64: dts: qcom: qcm6490-idp: Update the LPASS audio node Update the lpassaudio node to support the new compatible as the lpassaudio needs to support the reset functionality on the QCM6490 IDP board and the rest of the Audio functionality would be provided from the LPASS firmware. Reviewed-by: Dmitry Baryshkov Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20250221-lpass_qcm6490_resets-v5-3-6be0c0949a83@quicinc.com Signed-off-by: Bjorn Andersson commit 36eb51ac8bd545b6344c05a9860e4e65ba8d7a62 Author: Wentao Liang Date: Tue Feb 11 17:20:17 2025 +0800 clk: qcom: Fix missing error check for dev_pm_domain_attach() In the current implementation, the return value of dev_pm_domain_attach() is not checked. This can lead to silent failures if the function fails, as the code would continue execution and return 0, ignoring the error. This patch adds a check for the return value of dev_pm_domain_attach(). If the function fails, an error message is logged using dev_err_probe(), and the error is propagated to the existing error handling path `err`, which ensures proper cleanup by calling clk_notifier_unregister(). Signed-off-by: Wentao Liang Link: https://lore.kernel.org/r/20250211092017.562-1-vulab@iscas.ac.cn Signed-off-by: Bjorn Andersson commit d180c2bd3b43d55f30c9b99de68bc6bb8420d1c1 Author: Karthik Sanagavarapu Date: Tue Feb 11 13:44:15 2025 +0530 arm64: dts: qcom: sa8775p: Remove cdsp compute-cb@10 Remove the context bank compute-cb@10 because these SMMU ids are S2-only which is not used for S1 transaction. Fixes: f7b01bfb4b47 ("arm64: qcom: sa8775p: Add ADSP and CDSP0 fastrpc nodes") Cc: stable@kernel.org Signed-off-by: Karthik Sanagavarapu Signed-off-by: Ling Xu Link: https://lore.kernel.org/r/4c9de858fda7848b77ea8c528c9b9d53600ad21a.1739260973.git.quic_lxu5@quicinc.com Signed-off-by: Bjorn Andersson commit eb73f500548a3205741330cbd7d0e209a7a6a9af Author: Ling Xu Date: Tue Feb 11 13:44:14 2025 +0530 arm64: dts: qcom: sa8775p: Remove extra entries from the iommus property There are some items come out to be same value if we do SID & ~MASK. Remove extra entries from the iommus property for sa8775p to simplify. Fixes: f7b01bfb4b47 ("arm64: qcom: sa8775p: Add ADSP and CDSP0 fastrpc nodes") Cc: stable@kernel.org Reviewed-by: Dmitry Baryshkov Signed-off-by: Ling Xu Link: https://lore.kernel.org/r/49f463415c8fa2b08fbc2317e31493362056f403.1739260973.git.quic_lxu5@quicinc.com Signed-off-by: Bjorn Andersson commit 4b77122818239bcc05995d0234491b91c8cd477f Author: Sricharan Ramabadhran Date: Mon Oct 28 11:35:06 2024 +0530 arm64: defconfig: Enable IPQ5424 RDP466 base configs Enable GCC, Pinctrl for Qualcomm's IPQ5424 SoC which is required to boot IPQ5424-RDP466 boards to a console shell. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sricharan Ramabadhran Link: https://lore.kernel.org/r/20241028060506.246606-7-quic_srichara@quicinc.com Signed-off-by: Bjorn Andersson commit d8203fff4e6849cc5799fcf51105f7622e13c46d Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:18 2025 +0300 arm64: dts: qcom: sm8650: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-20-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9e9d8349e76252d5b7e060cc0ca4823a3f062052 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:17 2025 +0300 arm64: dts: qcom: sm8550: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-19-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 62acfd77a5783948ba3593fb169720ab7495c380 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:16 2025 +0300 arm64: dts: qcom: sm8450: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-18-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit d55fe5da78836835f9a88c29dd2fb3086b4a3720 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:15 2025 +0300 arm64: dts: qcom: sm8350: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-17-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 4e851ff6a3a12ce616e3cc902af0ae2efb2e8137 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:14 2025 +0300 arm64: dts: qcom: sm8250: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-16-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 130e9aacc40176b5fa2954e7861d9b5f28f373ae Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:13 2025 +0300 arm64: dts: qcom: sm8150: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-15-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 7cfcd1a3c519d0aff10af2db06aa6d2291393bd8 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:12 2025 +0300 arm64: dts: qcom: sm6350: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-14-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit e24c7cb72b9b1286deee43fecf87d0248fa430cc Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:11 2025 +0300 arm64: dts: qcom: sm6125: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-13-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit c7f4216765891939e6d2dfa8809883bae978582f Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:10 2025 +0300 arm64: dts: qcom: sm6115: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-12-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit e50450aae01ea23e17e10f59cdbdc7aa59108250 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:09 2025 +0300 arm64: dts: qcom: sdm845: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-11-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit acc206fed3698554a16cf70e5a2fc0e4f1e1a5fc Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:08 2025 +0300 arm64: dts: qcom: sdm670: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-10-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 7b5160ce90a3c6c8e6202f727c3e6cd2c0911cbd Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:07 2025 +0300 arm64: dts: qcom: sc8280xp: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-9-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit a24e1cb954a6915983280e757c36d04fd5e6ce34 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:06 2025 +0300 arm64: dts: qcom: sc8180x: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-8-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 545b26b926ae20640a7d464e1b830ce4ce021fd5 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:05 2025 +0300 arm64: dts: qcom: sc7280: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-7-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 74e18dc4aef0e8e2989815856e48c737820ebca8 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:04 2025 +0300 arm64: dts: qcom: sc7180: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-6-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 180f990ed061cefdac620d02f34b03387210a2b7 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:03 2025 +0300 arm64: dts: qcom: sa8775p: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-5-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit bacf203baa1ef896ac2bb4f9bf43b19f15a6ae26 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:02 2025 +0300 arm64: dts: qcom: qcm2290: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-4-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 31e18ebef09a596ea87277c24411e1a86eb56470 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:01 2025 +0300 arm64: dts: qcom: msm8998: use correct size for VBIF regions Use allocated region size for VBIF regions as defined by the docs (0x3000) instead of just using the last register address. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-3-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 8725fb400542a6c88c1cc918d96064eedc8c94c4 Author: Dmitry Baryshkov Date: Tue Apr 15 13:26:00 2025 +0300 arm64: dts: qcom: sa8775p: mark MDP interconnects as ALWAYS on Change the tag for MDP interconnects to QCOM_ICC_TAG_ALWAYS, so that if CPUSS collapses, the display may stay on. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-2-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 33e020b942cb4bcf2f3870b573470973e6464bd5 Author: Dmitry Baryshkov Date: Tue Apr 15 13:25:59 2025 +0300 arm64: dts: qcom: sc7280: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250415-drm-msm-dts-fixes-v1-1-90cd91bdd138@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 2eca6af66709de0d1ba14cdf8b6d200a1337a3a2 Author: Alexey Minnekhanov Date: Tue Apr 15 16:01:01 2025 +0300 arm64: dts: qcom: sdm660-xiaomi-lavender: Add missing SD card detect GPIO During initial porting these cd-gpios were missed. Having card detect is beneficial because driver does not need to do polling every second and it can just use IRQ. SD card detection in U-Boot is also fixed by this. Fixes: cf85e9aee210 ("arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD") Signed-off-by: Alexey Minnekhanov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250415130101.1429281-1-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit a496d2f0fd612ab9e10700afe00dc9267bad788b Author: Shengyu Qu Date: Mon Apr 14 18:56:01 2025 +0800 net: bridge: locally receive all multicast packets if IFF_ALLMULTI is set If multicast snooping is enabled, multicast packets may not always end up on the local bridge interface, if the host is not a member of the multicast group. Similar to how IFF_PROMISC allows all packets to be received locally, let IFF_ALLMULTI allow all multicast packets to be received. OpenWrt uses a user space daemon for DHCPv6/RA/NDP handling, and in relay mode it sets the ALLMULTI flag in order to receive all relevant queries on the network. This works for normal network interfaces and non-snooping bridges, but not snooping bridges (unless multicast routing is enabled). Reported-by: Felix Fietkau Closes: https://github.com/openwrt/openwrt/issues/15857#issuecomment-2662851243 Signed-off-by: Shengyu Qu Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/OSZPR01MB8434308370ACAFA90A22980798B32@OSZPR01MB8434.jpnprd01.prod.outlook.com Signed-off-by: Jakub Kicinski commit 1310f44dd4d635f278fb01330fddf416106332ff Author: Heiner Kallweit Date: Sun Apr 13 23:23:25 2025 +0200 net: phy: remove redundant dependency on NETDEVICES for PHYLINK and PHYLIB drivers/net/phy/Kconfig is included from drivers/net/Kconfig in an "if NETDEVICES" section. Therefore we don't have to duplicate the dependency here. And if e.g. PHYLINK is selected somewhere, then the dependency is ignored anyway (see note in Kconfig help). Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Russell King (Oracle) Link: https://patch.msgid.link/085892cd-aa11-4c22-bf8a-574a5c6dcd7c@gmail.com Signed-off-by: Jakub Kicinski commit 5f5f92912b439ef4db4fcfaa9826b01cc6e4fc85 Author: Toke Høiland-Jørgensen Date: Wed Apr 9 16:55:23 2025 +0200 tc: Return an error if filters try to attach too many actions While developing the fix for the buffer sizing issue in [0], I noticed that the kernel will happily accept a long list of actions for a filter, and then just silently truncate that list down to a maximum of 32 actions. That seems less than ideal, so this patch changes the action parsing to return an error message and refuse to create the filter in this case. This results in an error like: # ip link add type veth # tc qdisc replace dev veth0 root handle 1: fq_codel # tc -echo filter add dev veth0 parent 1: u32 match u32 0 0 $(for i in $(seq 33); do echo action pedit munge ip dport set 22; done) Error: Only 32 actions supported per filter. We have an error talking to the kernel Instead of just creating a filter with 32 actions and dropping the last one. This is obviously a change in UAPI. But seeing as creating more than 32 filters has never actually *worked*, it seems that returning an explicit error is better, and any use cases that get broken by this were already broken just in more subtle ways. [0] https://lore.kernel.org/r/20250407105542.16601-1-toke@redhat.com Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409145523.164506-1-toke@redhat.com Signed-off-by: Jakub Kicinski commit 8582d9ab3efdebb88e0cd8beed8e0b9de76443e7 Author: Ihor Solodrai Date: Thu Apr 10 11:28:23 2025 -0700 libbpf: Verify section type in btf_find_elf_sections A valid ELF file may contain a SHT_NOBITS .BTF section. This case is not handled correctly in btf_parse_elf, which leads to a segfault. Before attempting to load BTF section data, check that the section type is SHT_PROGBITS, which is the expected type for BTF data. Fail with an error if the type is different. Bug report: https://github.com/libbpf/libbpf/issues/894 v1: https://lore.kernel.org/bpf/20250408184104.3962949-1-ihor.solodrai@linux.dev/ Signed-off-by: Ihor Solodrai Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250410182823.1591681-1-ihor.solodrai@linux.dev commit ee684de5c1b0ac01821320826baec7da93f3615b Author: Viktor Malik Date: Tue Apr 15 17:50:14 2025 +0200 libbpf: Fix buffer overflow in bpf_object__init_prog As shown in [1], it is possible to corrupt a BPF ELF file such that arbitrary BPF instructions are loaded by libbpf. This can be done by setting a symbol (BPF program) section offset to a large (unsigned) number such that
overflows and points before the section data in the memory. Consider the situation below where: - prog_start = sec_start + symbol_offset <-- size_t overflow here - prog_end = prog_start + prog_size prog_start sec_start prog_end sec_end | | | | v v v v .....................|################################|............ The report in [1] also provides a corrupted BPF ELF which can be used as a reproducer: $ readelf -S crash Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align ... [ 2] uretprobe.mu[...] PROGBITS 0000000000000000 00000040 0000000000000068 0000000000000000 AX 0 0 8 $ readelf -s crash Symbol table '.symtab' contains 8 entries: Num: Value Size Type Bind Vis Ndx Name ... 6: ffffffffffffffb8 104 FUNC GLOBAL DEFAULT 2 handle_tp Here, the handle_tp prog has section offset ffffffffffffffb8, i.e. will point before the actual memory where section 2 is allocated. This is also reported by AddressSanitizer: ================================================================= ==1232==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7c7302fe0000 at pc 0x7fc3046e4b77 bp 0x7ffe64677cd0 sp 0x7ffe64677490 READ of size 104 at 0x7c7302fe0000 thread T0 #0 0x7fc3046e4b76 in memcpy (/lib64/libasan.so.8+0xe4b76) #1 0x00000040df3e in bpf_object__init_prog /src/libbpf/src/libbpf.c:856 #2 0x00000040df3e in bpf_object__add_programs /src/libbpf/src/libbpf.c:928 #3 0x00000040df3e in bpf_object__elf_collect /src/libbpf/src/libbpf.c:3930 #4 0x00000040df3e in bpf_object_open /src/libbpf/src/libbpf.c:8067 #5 0x00000040f176 in bpf_object__open_file /src/libbpf/src/libbpf.c:8090 #6 0x000000400c16 in main /poc/poc.c:8 #7 0x7fc3043d25b4 in __libc_start_call_main (/lib64/libc.so.6+0x35b4) #8 0x7fc3043d2667 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x3667) #9 0x000000400b34 in _start (/poc/poc+0x400b34) 0x7c7302fe0000 is located 64 bytes before 104-byte region [0x7c7302fe0040,0x7c7302fe00a8) allocated by thread T0 here: #0 0x7fc3046e716b in malloc (/lib64/libasan.so.8+0xe716b) #1 0x7fc3045ee600 in __libelf_set_rawdata_wrlock (/lib64/libelf.so.1+0xb600) #2 0x7fc3045ef018 in __elf_getdata_rdlock (/lib64/libelf.so.1+0xc018) #3 0x00000040642f in elf_sec_data /src/libbpf/src/libbpf.c:3740 The problem here is that currently, libbpf only checks that the program end is within the section bounds. There used to be a check `while (sec_off < sec_sz)` in bpf_object__add_programs, however, it was removed by commit 6245947c1b3c ("libbpf: Allow gaps in BPF program sections to support overriden weak functions"). Add a check for detecting the overflow of `sec_off + prog_sz` to bpf_object__init_prog to fix this issue. [1] https://github.com/lmarch2/poc/blob/main/libbpf/libbpf.md Fixes: 6245947c1b3c ("libbpf: Allow gaps in BPF program sections to support overriden weak functions") Reported-by: lmarch2 <2524158037@qq.com> Signed-off-by: Viktor Malik Signed-off-by: Andrii Nakryiko Reviewed-by: Shung-Hsi Yu Link: https://github.com/lmarch2/poc/blob/main/libbpf/libbpf.md Link: https://lore.kernel.org/bpf/20250415155014.397603-1-vmalik@redhat.com commit e1d2a8ec9a582deb7efb99399e5c01225b661545 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:43 2025 +0200 pinctrl: amlogic-a4: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Xianwei Zhao Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-6-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 18ef5d5b4d243b8cbee951b677107f6174e1b2cd Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:42 2025 +0200 pinctrl: meson: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-5-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 4f15389ba3a019221229ddd33aadb029ff82d053 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:41 2025 +0200 pinctrl: abx500: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-4-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 720abc5c58d8a4be614dece755342f428e386244 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:40 2025 +0200 pinctrl: abx500: enable building modules with COMPILE_TEST=y Increase the build coverage by enabling the abx500 modules with COMPILE_TEST=y. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-3-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 9e8c4a2e4c91f2ffcbd0a9a3f80a041ccf97127d Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:39 2025 +0200 pinctrl: rk805: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-2-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit d843a4263502e780295556fffa2351672904e782 Author: Bartosz Golaszewski Date: Tue Apr 8 09:17:38 2025 +0200 pinctrl: at91-pio4: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-1-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij commit 2af781a9edc4ef5f6684c0710cc3542d9be48b31 Author: Lukas Wunner Date: Thu Apr 10 17:27:12 2025 +0200 PCI: pciehp: Ignore Link Down/Up caused by Secondary Bus Reset When a Secondary Bus Reset is issued at a hotplug port, it causes a Data Link Layer State Changed event as a side effect. On hotplug ports using in-band presence detect, it additionally causes a Presence Detect Changed event. These spurious events should not result in teardown and re-enumeration of the device in the slot. Hence commit 2e35afaefe64 ("PCI: pciehp: Add reset_slot() method") masked the Presence Detect Changed Enable bit in the Slot Control register during a Secondary Bus Reset. Commit 06a8d89af551 ("PCI: pciehp: Disable link notification across slot reset") additionally masked the Data Link Layer State Changed Enable bit. However masking those bits only disables interrupt generation (PCIe r6.2 sec 6.7.3.1). The events are still visible in the Slot Status register and picked up by the IRQ handler if it runs during a Secondary Bus Reset. This can happen if the interrupt is shared or if an unmasked hotplug event occurs, e.g. Attention Button Pressed or Power Fault Detected. The likelihood of this happening used to be small, so it wasn't much of a problem in practice. That has changed with the recent introduction of bandwidth control in v6.13-rc1 with commit 665745f27487 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller"): Bandwidth control shares the interrupt with PCIe hotplug. A Secondary Bus Reset causes a Link Bandwidth Notification, so the hotplug IRQ handler runs, picks up the masked events and tears down the device in the slot. As a result, Joel reports VFIO passthrough failure of a GPU, which Ilpo root-caused to the incorrect handling of masked hotplug events. Clearly, a more reliable way is needed to ignore spurious hotplug events. For Downstream Port Containment, a new ignore mechanism was introduced by commit a97396c6eb13 ("PCI: pciehp: Ignore Link Down/Up caused by DPC"). It has been working reliably for the past four years. Adapt it for Secondary Bus Resets. Introduce two helpers to annotate code sections which cause spurious link changes: pci_hp_ignore_link_change() and pci_hp_unignore_link_change() Use those helpers in lieu of masking interrupts in the Slot Control register. Introduce a helper to check whether such a code section is executing concurrently and if so, await it: pci_hp_spurious_link_change() Invoke the helper in the hotplug IRQ thread pciehp_ist(). Re-use the IRQ thread's existing code which ignores DPC-induced link changes unless the link is unexpectedly down after reset recovery or the device was replaced during the bus reset. That code block in pciehp_ist() was previously only executed if a Data Link Layer State Changed event has occurred. Additionally execute it for Presence Detect Changed events. That's necessary for compatibility with PCIe r1.0 hotplug ports because Data Link Layer State Changed didn't exist before PCIe r1.1. DPC was added with PCIe r3.1 and thus DPC-capable hotplug ports always support Data Link Layer State Changed events. But the same cannot be assumed for Secondary Bus Reset, which already existed in PCIe r1.0. Secondary Bus Reset is only one of many causes of spurious link changes. Others include runtime suspend to D3cold, firmware updates or FPGA reconfiguration. The new pci_hp_{,un}ignore_link_change() helpers may be used by all kinds of drivers to annotate such code sections, hence their declarations are publicly visible in . A case in point is the Mellanox Ethernet driver which disables a firmware reset feature if the Ethernet card is attached to a hotplug port, see commit 3d7a3f2612d7 ("net/mlx5: Nack sync reset request when HotPlug is enabled"). Going forward, PCIe hotplug will be able to cope gracefully with all such use cases once the code sections are properly annotated. The new helpers internally use two bits in struct pci_dev's priv_flags as well as a wait_queue. This mirrors what was done for DPC by commit a97396c6eb13 ("PCI: pciehp: Ignore Link Down/Up caused by DPC"). That may be insufficient if spurious link changes are caused by multiple sources simultaneously. An example might be a Secondary Bus Reset issued by AER during FPGA reconfiguration. If this turns out to happen in real life, support for it can easily be added by replacing the PCI_LINK_CHANGING flag with an atomic_t counter incremented by pci_hp_ignore_link_change() and decremented by pci_hp_unignore_link_change(). Instead of awaiting a zero PCI_LINK_CHANGING flag, the pci_hp_spurious_link_change() helper would then simply await a zero counter. Fixes: 665745f27487 ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller") Reported-by: Joel Mathew Thomas Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219765 Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Tested-by: Joel Mathew Thomas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/d04deaf49d634a2edf42bf3c06ed81b4ca54d17b.1744298239.git.lukas@wunner.de commit c3be50f7547ccb533284b22f74baf37d3379843e Author: Lukas Wunner Date: Thu Apr 10 17:27:11 2025 +0200 PCI: pciehp: Ignore Presence Detect Changed caused by DPC Commit a97396c6eb13 ("PCI: pciehp: Ignore Link Down/Up caused by DPC") amended PCIe hotplug to not bring down the slot upon Data Link Layer State Changed events caused by Downstream Port Containment. However Keith reports off-list that if the slot uses in-band presence detect (i.e. Presence Detect State is derived from Data Link Layer Link Active), DPC also causes a spurious Presence Detect Changed event. This needs to be ignored as well. Unfortunately there's no register indicating that in-band presence detect is used. PCIe r5.0 sec 7.5.3.10 introduced the In-Band PD Disable bit in the Slot Control Register. The PCIe hotplug driver sets this bit on ports supporting it. But older ports may still use in-band presence detect. If in-band presence detect can be disabled, Presence Detect Changed events occurring during DPC must not be ignored because they signal device replacement. On all other ports, device replacement cannot be detected reliably because the Presence Detect Changed event could be a side effect of DPC. On those (older) ports, perform a best-effort device replacement check by comparing the Vendor ID, Device ID and other data in Config Space with the values cached in struct pci_dev. Use the existing helper pciehp_device_replaced() to accomplish this. It is currently #ifdef'ed to CONFIG_PM_SLEEP in pciehp_core.c, so move it to pciehp_hpc.c where most other functions accessing config space reside. Reported-by: Keith Busch Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/fa264ff71952915c4e35a53c89eb0cde8455a5c5.1744298239.git.lukas@wunner.de commit 2af73c81d190d6a88fd81cb8a3c9373e8553cd7a Merge: c84c801db3c83c e2bcbf99d045f6 Author: Mark Brown Date: Tue Apr 15 21:24:00 2025 +0100 ASoC: Add codec driver for Cirrus Logic CS48L32 DSP Merge series from Richard Fitzgerald : formance low-power audio DSP with analog and PDM digital inputs and support for low-power always-on voice-trigger functionality. This series adds the devicetree bindings and the ASoC codec driver. commit c84c801db3c83cf8debec8b100f9a1ae9ccd5e8e Merge: 51f04358d8c887 4f8ef33dd44a3d Author: Mark Brown Date: Tue Apr 15 21:23:56 2025 +0100 ASoC: skip the endpoint that doesn't present and Merge series from Bard Liao : A codec endpoint may not be used. We could check the present SDCA functions to know if the endpoint is used or not. Skip the endpoint which is not used. And load the topology dynamically for each endpoint. With this feature, we don't need to use the quirk to determine the existence of the optional codec DAIs. commit 3aba0b40cacdfba4a604dd09315fa6cdbeb0ed90 Author: Xin Li (Intel) Date: Tue Apr 15 10:54:10 2025 -0700 x86/cpufeatures: Shorten X86_FEATURE_AMD_HETEROGENEOUS_CORES Shorten X86_FEATURE_AMD_HETEROGENEOUS_CORES to X86_FEATURE_AMD_HTR_CORES to make the last column aligned consistently in the whole file. No functional changes. Suggested-by: Borislav Petkov (AMD) Signed-off-by: Xin Li (Intel) Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250415175410.2944032-4-xin@zytor.com commit 13327fada7ff0ae858e28b9515cd7d6ccb5fccc7 Author: Xin Li (Intel) Date: Tue Apr 15 10:54:09 2025 -0700 x86/cpufeatures: Shorten X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT Shorten X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT to X86_FEATURE_CLEAR_BHB_VMEXIT to make the last column aligned consistently in the whole file. There's no need to explain in the name what the mitigation does. No functional changes. Suggested-by: Borislav Petkov (AMD) Signed-off-by: Xin Li (Intel) Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250415175410.2944032-3-xin@zytor.com commit 282cc5b6762310a73255c6dd1d79de1609042eeb Author: Borislav Petkov (AMD) Date: Tue Apr 15 10:54:08 2025 -0700 x86/cpufeatures: Clean up formatting It is a special file with special formatting so remove one whitespace damage and format newer defines like the rest. No functional changes. [ Xin: Do the same to tools/arch/x86/include/asm/cpufeatures.h. ] Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Xin Li (Intel) Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/20250415175410.2944032-2-xin@zytor.com commit e80e1342eabaac86da02f2c74fffc010e4f68c55 Author: Artem Bityutskiy Date: Mon Mar 17 15:55:41 2025 +0200 Documentation: ABI: testing: document the new cpuidle sysfs file Mention the new 'intel_c1_demotion' sysfs file in the "cpuidle" section and refer to "Documentation/admin-guide/pm/intel_idle.rst" for more information. Signed-off-by: Artem Bityutskiy Link: https://patch.msgid.link/20250317135541.1471754-4-dedekind1@gmail.com Signed-off-by: Rafael J. Wysocki commit af3a1b6a18258168f09e4ebc014b368bb0e845b0 Author: Artem Bityutskiy Date: Mon Mar 17 15:55:40 2025 +0200 Documentation: admin-guide: pm: Document intel_idle C1 demotion Document the intel_idle driver sysfs file for enabling/disabling C1 demotion. Signed-off-by: Artem Bityutskiy Link: https://patch.msgid.link/20250317135541.1471754-3-dedekind1@gmail.com Signed-off-by: Rafael J. Wysocki commit 6138f34515162340520b0415184367e12775f68a Author: Artem Bityutskiy Date: Mon Mar 17 15:55:39 2025 +0200 intel_idle: Add C1 demotion on/off sysfs knob Add a sysfs knob to enable/disable C1 demotion for the following Intel platforms: Sapphire Rapids Xeon, Emerald Rapids Xeon, Granite Rapids Xeon, Sierra Forest Xeon, and Grand Ridge SoC. This sysfs file shows up as "/sys/devices/system/cpu/cpuidle/intel_c1_demotion". The C1 demotion feature involves the platform firmware demoting deep C-state requests from the OS (e.g., C6 requests) to C1. The idea is that firmware monitors CPU wake-up rate, and if it is higher than a platform-specific threshold, the firmware demotes deep C-state requests to C1. For example, Linux requests C6, but firmware noticed too many wake-ups per second, and it keeps the CPU in C1. When the CPU stays in C1 long enough, the platform promotes it back to C6. The default value for C1 demotion is whatever is configured by BIOS. Signed-off-by: Artem Bityutskiy Link: https://patch.msgid.link/20250317135541.1471754-2-dedekind1@gmail.com Signed-off-by: Rafael J. Wysocki commit 21cb33c7e06533229df01c05248edbd23cefc89c Author: Ihor Solodrai Date: Mon Apr 14 11:59:18 2025 -0700 kbuild, bpf: Enable --btf_features=attributes pahole v1.30 has a BTF encoding feature for arbitrary attributes, used in particular for tagging bpf_arena_alloc_pages and bpf_arena_free_pages BPF kfuncs [1][2]. Enable it for the kernel build. [1] https://lore.kernel.org/bpf/20250130201239.1429648-1-ihor.solodrai@linux.dev/ [2] https://lore.kernel.org/bpf/20250228194654.1022535-1-ihor.solodrai@linux.dev/ Signed-off-by: Ihor Solodrai Signed-off-by: Martin KaFai Lau Tested-by: Eduard Zingerman Link: https://patch.msgid.link/20250414185918.538195-1-ihor.solodrai@linux.dev commit 7d0b43b68d1cd4256de60b73249397db3c4e16d6 Author: Jiapeng Chong Date: Tue Apr 15 14:14:59 2025 +0800 selftest/bpf/benchs: Remove duplicate sys/types.h header ./tools/testing/selftests/bpf/benchs/bench_sockmap.c: sys/types.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=20436 Signed-off-by: Jiapeng Chong Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250415061459.11644-1-jiapeng.chong@linux.alibaba.com commit e12d3e1624a02706cdd3628bbf5668827214fa33 Author: Henry Martin Date: Tue Apr 1 17:16:47 2025 +0800 backlight: pm8941: Add NULL check in wled_configure() devm_kasprintf() returns NULL when memory allocation fails. Currently, wled_configure() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: f86b77583d88 ("backlight: pm8941: Convert to using %pOFn instead of device_node.name") Signed-off-by: Henry Martin Reviewed-by: Dmitry Baryshkov Reviewed-by: "Daniel Thompson (RISCstar)" Link: https://lore.kernel.org/r/20250401091647.22784-1-bsdhenrymartin@gmail.com Signed-off-by: Lee Jones commit b2661df9febda90b2bc7e5b867431c8433f49e79 Author: Gustavo A. R. Silva Date: Mon Mar 31 11:01:38 2025 -0600 leds: leds-cros_ec: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Replace an on-stack definition of a flexible structure with a call to utility function cros_ec_cmd(). So, with these changes, fix the following warning: drivers/leds/leds-cros_ec.c:70:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: "Gustavo A. R. Silva" Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/Z-rKcgFjsyKvd58q@kspp Signed-off-by: Lee Jones commit ca72d5ef59513c448f03d20a58e1942af6441b44 Author: Manuel Fombuena Date: Tue Feb 25 22:02:28 2025 +0000 Documentation: leds: Remove .rst extension for leds-st1202 on index No other LED driver is listed on index.rst with the extension .rst. Remove it. Fixes: b1816b22381b ("Documentation:leds: Add leds-st1202.rst") Signed-off-by: Manuel Fombuena Link: https://lore.kernel.org/r/CWLP123MB5473137572529F99746F4AC4C5C32@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM Signed-off-by: Lee Jones commit ee44a1def7ee4c6f9f04a02bfa1a106ee41434d3 Author: Andy Shevchenko Date: Tue Mar 18 18:04:29 2025 +0200 leds: core: Bail out when composed name can't fit the buffer GCC compiler complains about snprintf() calls that may potentially cut the output: drivers/leds/led-core.c:551:78: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] drivers/leds/led-core.c:554:78: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] ... Fix these by checking for the potential overflow. This requires to align all the branches to use the same callee, i.e. snprintf(), otherwise the code will be blown up and return different error codes for the different branches. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250318160524.2979982-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 06d99fcf1f87d5b6bf1c7dd0f7ec422304a47f31 Author: Craig McQueen Date: Mon Mar 17 13:26:30 2025 +1100 leds: led-triggers: Improvements for default trigger Accept "default" written to sysfs trigger attr. If the text "default" is written to the LED's sysfs 'trigger' attr, then call led_trigger_set_default() to set the LED to its default trigger. If the default trigger is set to "none", then led_trigger_set_default() will remove a trigger. This is in contrast to the default trigger being unset, in which case led_trigger_set_default() does nothing. Signed-off-by: Craig McQueen Reviewed-by: Jacek Anaszewski Link: https://lore.kernel.org/r/20250317022630.424015-1-craig@mcqueen.au Signed-off-by: Lee Jones commit bbfc077d457272bcea4f14b3a28247ade99b196d Author: Simon Horman Date: Mon Apr 14 17:44:48 2025 +0100 octeon_ep_vf: Remove octep_vf_wq commit cb7dd712189f ("octeon_ep_vf: Add driver framework and device initialization") added octep_vf_wq but it has never been used. Remove it. Reported-by: Dr. David Alan Gilbert Closes: https://lore.kernel.org/netdev/Z70bEoTKyeBau52q@gallifrey/ Signed-off-by: Simon Horman Reviewed-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414-octeon-wq-v1-1-23700e4bd208@kernel.org Signed-off-by: Jakub Kicinski commit 9a99129fd60d9fcf15938a8229ca1db2a17c77f3 Author: Thomas Weißschuh Date: Tue Apr 15 11:23:06 2025 +0200 kunit: qemu_configs: Add PowerPC 32-bit BE and 64-bit LE Add basic configs to run kunit tests on some more PowerPC variants. Link: https://lore.kernel.org/r/20250415-kunit-ppc-v1-2-f5a170264147@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 09ea90e5988df98ef58d61ae5af4834e64596d9e Author: Thomas Weißschuh Date: Tue Apr 15 11:23:05 2025 +0200 kunit: qemu_configs: powerpc: Explicitly enable CONFIG_CPU_BIG_ENDIAN=y The configuration generated by kunit ends up with big endian. A new kunit configuration for little endian is to be added. To make the difference clearer spell out the endianness in the kunit reference config. Link: https://lore.kernel.org/r/20250415-kunit-ppc-v1-1-f5a170264147@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 6cf6b0a6f204e8b10e2b69e74953f029ea83a8a9 Author: Thomas Weißschuh Date: Tue Apr 15 09:03:06 2025 +0200 kunit: tool: Implement listing of available architectures To implement custom scripting around kunit.py it is useful to get a list of available architectures. While it is possible to manually inspect tools/testing/kunit/qemu_configs/, this is annoying to implement and introduces a dependency on a kunit.py implementation detail. Introduce 'kunit.py run --arch help' which lists all known architectures in an easy to parse list. This is equivalent on how QEMU implements listing of possible argument values. Link: https://lore.kernel.org/r/20250415-kunit-list-v2-1-aa452cd317ae@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 9bec944506faf10d6274c75e3a55bc107b75cea3 Author: Thomas Weißschuh Date: Thu Mar 13 16:57:46 2025 +0100 sysfs: constify attribute_group::bin_attrs All users of this field have been migrated to bin_attrs_new. It can now be constified. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250313-sysfs-const-bin_attr-final-v2-2-96284e1e88ce@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 97d06802d10a2827ef46fd31789a26117ce7f3d9 Author: Thomas Weißschuh Date: Thu Mar 13 16:57:45 2025 +0100 sysfs: constify bin_attribute argument of bin_attribute::read/write() All callback implementers have been moved to the const variant of the callbacks. The signature of the original callbacks can now be changed. Also remove the now unnecessary transition machinery inside __BIN_ATTR(). Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250313-sysfs-const-bin_attr-final-v2-1-96284e1e88ce@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 31e4e12e0e9609850cefd4b2e1adf782f56337d6 Author: Zijun Hu Date: Mon Apr 14 19:36:52 2025 +0800 software node: Correct a OOB check in software_node_get_reference_args() software_node_get_reference_args() wants to get @index-th element, so the property value requires at least '(index + 1) * sizeof(*ref)' bytes but that can not be guaranteed by current OOB check, and may cause OOB for malformed property. Fix by using as OOB check '((index + 1) * sizeof(*ref) > prop->length)'. Reviewed-by: Sakari Ailus Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250414-fix_swnode-v2-1-9c9e6ae11eab@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f41f7b3d9daff26e34ee820af5a44d6c66e23412 Author: Zhang Lixu Date: Fri Feb 21 16:37:12 2025 +0800 MAINTAINERS: Update Intel LJCA maintainer Wentong is no longer with Intel, I will take over as the maintainer of the Intel LJCA driver. Signed-off-by: Zhang Lixu Reviewed-by: Stanislaw Gruszka Acked-by: Sakari Ailus Acked-by: Wentong Wu Link: https://lore.kernel.org/r/20250221083713.25947-1-lixu.zhang@intel.com Signed-off-by: Greg Kroah-Hartman commit f407a8a28a294dd3201e55b6a63b9225c489fd95 Author: Raag Jadav Date: Wed Apr 9 16:24:32 2025 +0530 devres: simplify devm_kstrdup() using devm_kmemdup() devm_kstrdup() logic pretty much reflects devm_kmemdup() for strings, so just reuse it. Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20250409105432.1852355-1-raag.jadav@intel.com Signed-off-by: Greg Kroah-Hartman commit 8c016bc3063fa344f5cb74f06ec07d37136229ca Author: Woody Zhang Date: Sun Mar 30 18:36:27 2025 +0800 platform: replace magic number with macro PLATFORM_DEVID_NONE Replace magic number with PLATFORM_DEVID_NONE to make it more informative. Signed-off-by: Woody Zhang Link: https://lore.kernel.org/r/20250330103627.2370771-2-woodyzhang666@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bcca36898aab843eb259984c29de7ff9e0d8723 Author: Johan Hovold Date: Fri Feb 28 09:18:24 2025 +0100 component: do not try to unbind unbound components Error handling is apparently hard and driver authors often get it wrong. Continue to warn but do not try to unbind components that have never been bound in order to avoid crashing systems where such a buggy teardown path is hit. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250228081824.4640-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit fd7c362fbbcba71550d0f1d534ba8429e6edf351 Merge: b2ee4451c1d42a 96f8bf85d11acd Author: Jakub Kicinski Date: Tue Apr 15 08:36:59 2025 -0700 Merge branch 'net-stmmac-ingenic-cleanups' Russell King says: ==================== net: stmmac: ingenic: cleanups Another series for another stmmac glue platform. Convert Ingenic to use the stmmac platform PM ops and the devm_stmmac_pltfr_probe() helper. ==================== Link: https://patch.msgid.link/Z_0u9pA0Ziop-BuU@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 96f8bf85d11acdd3ebc9a91f41cb18eac6f8e26d Author: Russell King (Oracle) Date: Mon Apr 14 16:51:06 2025 +0100 net: stmmac: ingenic: convert to devm_stmmac_pltfr_probe() As Ingenic now uses the stmmac platform PM ops, convert it to use devm_stmmac_pltfr_probe() which will call the plat_dat->init() method before stmmac_drv_probe() and appropriately cleaning up via the ->exit() method, thus simplifying the code. Using the devm_*() variant also allows removal of the explicit call to stmmac_pltfr_remove(). Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4M5S-000YGJ-9K@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit debfcb3f58488e1ee8177a03bf9338ede936158f Author: Russell King (Oracle) Date: Mon Apr 14 16:51:01 2025 +0100 net: stmmac: ingenic: convert to stmmac_pltfr_pm_ops Convert the Ingenic glue driver to use the generic stmmac platform power management operations. In order to do this, we need to make ingenic_mac_init() arguments compatible with plat_dat->init() by adding a plat_dat member to struct ingenic_mac. This allows the custom suspend/resume operations to be removed, and the PM ops pointer replaced with stmmac_pltfr_pm_ops. This will adds runtime PM and noirq suspend/resume ops to this driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u4M5N-000YGD-5i@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit b2ee4451c1d42a736a94ee582c67c0ccdc05f715 Author: Russell King (Oracle) Date: Mon Apr 14 10:06:25 2025 +0100 net: stmmac: imx: use stmmac_pltfr_probe() Using stmmac_pltfr_probe() simplifies the probe function. This will not only call plat_dat->init (imx_dwmac_init), but also plat_dat->exit (imx_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This results in an overall simplification of the glue driver. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4Flp-000XlM-Tb@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 9d9bc1a464028e279e72141ff1edef240bb01563 Merge: 2f8cc49d869cbf a1afabef915cce Author: Jakub Kicinski Date: Tue Apr 15 08:36:04 2025 -0700 Merge branch 'net-stmmac-anarion-cleanups' Russell King says: ==================== net: stmmac: anarion: cleanups A series of cleanups to the anarion glue driver. Clean up anarion_config_dt() error handling, printing a human readable error rather than the numeric errno, and use ERR_CAST(). Using a switch statement with incorrect "fallthrough;" for RGMII vs non-RGMII is unnecessary when we have phy_interface_mode_is_rgmii(). Convert to use the helper. Use stmmac_pltfr_probe() rahter than open-coding the call to the init function (which stmmac_pltfr_probe() will do for us.) Finally, convert to use devm_stmmac_pltfr_probe() which allows the removal of the .remove initialiser in the driver structure. Not tested on hardware. ==================== Link: https://patch.msgid.link/Z_zP9BvZlqeq3Ssl@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a1afabef915cced083ece76cc364d22e0a66192c Author: Russell King (Oracle) Date: Mon Apr 14 10:06:15 2025 +0100 net: stmmac: anarion: use devm_stmmac_pltfr_probe() Convert anarion to use devm_stmmac_pltfr_probe() which allows the removal of an explicit call to stmmac_pltfr_remove(). Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4Flf-000XjS-Fi@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5956527e26ffcdfe2f9698c9872b91dd8814d997 Author: Russell King (Oracle) Date: Mon Apr 14 10:06:10 2025 +0100 net: stmmac: anarion: use stmmac_pltfr_probe() Rather than open-coding the call to anarion_gmac_init() and then stmmac_dvr_probe(), omitting the cleanup of calling anarion_gmac_exit(), use stmmac_pltfr_probe() which will handle this for us. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4Fla-000XjM-Bw@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a55ec9c811aa25504951113b45e1df60ab6d751c Author: Russell King (Oracle) Date: Mon Apr 14 10:06:05 2025 +0100 net: stmmac: anarion: clean up interface parsing anarion_config_dt() used a switch statement to check for the RGMII modes, complete with an unnecessary "fallthrough", and also printed the numerical value of the PHY interface mode on error. Clean this up using the phy_interface_mode_is_rgmii() helper, and print the English version of the PHY interface mode on error. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4FlV-000XjG-83@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit c30a45a7e072cd1cb9887daba7446ae653b12801 Author: Russell King (Oracle) Date: Mon Apr 14 10:06:00 2025 +0100 net: stmmac: anarion: clean up anarion_config_dt() error handling When enabled, print a user friendly description of the error when failing to ioremap() the control resource, and use ERR_CAST() when propagating the error. This allows us to get rid of the "err" local variable in anarion_config_dt(). Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u4FlQ-000XjA-2V@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 2f8cc49d869cbfa6f72068774b3de420536c21ac Merge: 0418711f60bbc6 8ff953036110bf Author: Jakub Kicinski Date: Tue Apr 15 08:28:57 2025 -0700 Merge branch 'net-introduce-nlmsg_payload-helper' Breno Leitao says: ==================== net: Introduce nlmsg_payload helper In the current codebase, there are multiple instances where the structure size is checked before assigning it to a Netlink message. This check is crucial for ensuring that the structure is correctly mapped onto the Netlink message, providing a layer of security. To streamline this process, Jakub Kicinski suggested creating a helper function, `nlmsg_payload`, which verifies if the structure fits within the message. If it does, the function returns the data; otherwise, it returns NULL. This approach simplifies the code and reduces redundancy. This patchset introduces the `nlmsg_payload` helper and updates several parts of the code to use it. Further updates will follow in subsequent patchsets. v1: https://lore.kernel.org/20250411-nlmsg-v1-0-ddd4e065cb15@debian.org ==================== Link: https://patch.msgid.link/20250414-nlmsg-v2-0-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 8ff953036110bf1804b054b730300c8377bdde5e Author: Breno Leitao Date: Mon Apr 14 06:24:16 2025 -0700 net: fib_rules: Use nlmsg_payload in fib_{new,del}rule() Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Suggested-by: Kuniyuki Iwashima Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-10-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 4c113c803fdc5cc311383f914ca3fb301dba9810 Author: Breno Leitao Date: Mon Apr 14 06:24:15 2025 -0700 net: fib_rules: Use nlmsg_payload in fib_valid_dumprule_req Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-9-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 69a1ecfe47f0c61f00ed281500c2b6da8b364561 Author: Breno Leitao Date: Mon Apr 14 06:24:14 2025 -0700 mpls: Use nlmsg_payload in mpls_valid_getroute_req Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-8-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 8cf1e30907de2ebd850042e4da9fbc72e094d7de Author: Breno Leitao Date: Mon Apr 14 06:24:13 2025 -0700 ipv6: Use nlmsg_payload in inet6_rtm_valid_getaddr_req Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-7-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit e87187dfbb9f7f599da33603984a18adb07f0174 Author: Breno Leitao Date: Mon Apr 14 06:24:12 2025 -0700 ipv6: Use nlmsg_payload in inet6_valid_dump_ifaddr_req Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-6-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 72be72bea9dc8641c9f39c0335b71b9fbea0fae5 Author: Breno Leitao Date: Mon Apr 14 06:24:11 2025 -0700 mpls: Use nlmsg_payload in mpls_valid_fib_dump_req Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-5-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 77d02290366f058dce2555468a48ed8d62d95939 Author: Breno Leitao Date: Mon Apr 14 06:24:10 2025 -0700 rtnetlink: Use nlmsg_payload in valid_fdb_dump_strict Leverage the new nlmsg_payload() helper to avoid checking for message size and then reading the nlmsg data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-4-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 2d1f827f0642261d5c955d3d30b5f997e06ce7a9 Author: Breno Leitao Date: Mon Apr 14 06:24:09 2025 -0700 neighbour: Use nlmsg_payload in neigh_valid_get_req Update neigh_valid_get_req function to utilize the new nlmsg_payload() helper function. This change improves code clarity and safety by ensuring that the Netlink message payload is properly validated before accessing its data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-3-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 7527efe8a41628f84a43efd47f065ae641dde769 Author: Breno Leitao Date: Mon Apr 14 06:24:08 2025 -0700 neighbour: Use nlmsg_payload in neightbl_valid_dump_info Update neightbl_valid_dump_info function to utilize the new nlmsg_payload() helper function. This change improves code clarity and safety by ensuring that the Netlink message payload is properly validated before accessing its data. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-2-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 95d06e92a401928fe46fda7616e460f39cb7211b Author: Breno Leitao Date: Mon Apr 14 06:24:07 2025 -0700 netlink: Introduce nlmsg_payload helper Create a new helper function, nlmsg_payload(), to simplify checking and retrieving Netlink message payloads. This reduces boilerplate code for users who need to verify the message length before accessing its data. Suggested-by: Jakub Kicinski Signed-off-by: Breno Leitao Reviewed-by: Jakub Kicinski Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250414-nlmsg-v2-1-3d90cb42c6af@debian.org Signed-off-by: Jakub Kicinski commit 0418711f60bbc6c35ba21fc78c6e3bc913036d2f Merge: f99564688f3845 915359abc68c74 Author: Jakub Kicinski Date: Tue Apr 15 08:26:31 2025 -0700 Merge branch 'qed-deadcoding' Dr. David Alan Gilbert says: ==================== qed deadcoding This is a set of deadcode removals for the qed ethernet device. I've tried to avoid removing anything that are trivial firmware wrappers. One odd one I've not removed is qed_bw_update(), it doesn't seem to be called but looks like the only caller of the bw_update(..) method which qedf does define. Perhaps qed_bw_update is supposed to be called somewhere? ==================== Link: https://patch.msgid.link/20250414005247.341243-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit 915359abc68c74efea4a735207dd1367b28da960 Author: Dr. David Alan Gilbert Date: Mon Apr 14 01:52:47 2025 +0100 qed: Remove unused qed_db_recovery_dp qed_db_recovery_dp() was added in 2018 as part of commit 36907cd5cd72 ("qed: Add doorbell overflow recovery mechanism") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414005247.341243-6-linux@treblig.org Signed-off-by: Jakub Kicinski commit 058fa8736570155830a50f836fbd31c74ff99091 Author: Dr. David Alan Gilbert Date: Mon Apr 14 01:52:46 2025 +0100 qed: Remove unused qed_print_mcp_trace_* While most of the trace code is reachable by other routes (I think mostly via the qed_features_lookup[] array), there are a couple of unused wrappers. qed_print_mcp_trace_line() and qed_print_mcp_trace_results_cont() were added in 2018 as part of commit a3f723079df8 ("qed*: Utilize FW 8.37.7.0") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414005247.341243-5-linux@treblig.org Signed-off-by: Jakub Kicinski commit 3c18acefaf9f59c32bd9c53bded4c523464901e6 Author: Dr. David Alan Gilbert Date: Mon Apr 14 01:52:45 2025 +0100 qed: Remove unused qed_ptt_invalidate qed_ptt_invalidate() was added in 2015 as part of commit fe56b9e6a8d9 ("qed: Add module with basic common support") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414005247.341243-4-linux@treblig.org Signed-off-by: Jakub Kicinski commit fa381e21a907cf3cd009bd08c50231345b475772 Author: Dr. David Alan Gilbert Date: Mon Apr 14 01:52:44 2025 +0100 qed: Remove unused qed_calc_*_ctx_validation functions qed_calc_session_ctx_validation() and qed_calc_task_ctx_validation() were added as part of 2017's commit da09091732ae ("qed*: Utilize FW 8.33.1.0") but have remained unused. Remove them. This leaves; con_region_offsets[], task_region_offsets[], cdu_crc8_table and qed_calc_cdu_validation_byte() unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414005247.341243-3-linux@treblig.org Signed-off-by: Jakub Kicinski commit e056d3d703886d69599fb757e65495ac606605ac Author: Dr. David Alan Gilbert Date: Mon Apr 14 01:52:43 2025 +0100 qed: Remove unused qed_memset_*ctx functions qed_memset_session_ctx() and qed_memset_task_ctx() were added in 2017 as part of commit da09091732ae ("qed*: Utilize FW 8.33.1.0") but have not been used. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20250414005247.341243-2-linux@treblig.org Signed-off-by: Jakub Kicinski commit f99564688f38458d86b64f099ebf03f19517cf77 Author: Heiner Kallweit Date: Sun Apr 13 16:09:40 2025 +0200 net: phy: remove device_phy_find_device AFAICS this function has never had a user. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/ab7b8094-2eea-4e82-a047-fd60117f220b@gmail.com Signed-off-by: Jakub Kicinski commit cd6d627f733ddc61fec9456af7a40101b0bdbbfb Merge: f15e410687954b a862771d1aa4c5 Author: Jakub Kicinski Date: Tue Apr 15 08:21:49 2025 -0700 Merge branch 'mptcp-various-small-and-unrelated-improvements' Matthieu Baerts says: ==================== mptcp: various small and unrelated improvements Here are various unrelated patches: - Patch 1: sched: remove unused structure. - Patch 2: sched: split the validation part, a preparation for later. - Patch 3: pm: clarify code, not to think there is a possible UaF. Note: a previous version has already been sent individually to Netdev. - Patch 4: subflow: simplify subflow_hmac_valid by passing subflow_req. - Patch 5: mib: add counter for MPJoin rejected by the PM. - Patch 6: selftests: validate this new MPJoinRejected counter. - Patch 7: selftests: define nlh variable only where needed. - Patch 8: selftests: show how to use IPPROTO_MPTCP with getaddrinfo. Note: a previous version has already been sent individually to Netdev. v1: https://lore.kernel.org/20250411-net-next-mptcp-sched-mib-sft-misc-v1-0-85ac8c6654c3@kernel.org ==================== Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-0-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit a862771d1aa4c5cf4d92adfbc4b0879918e0e725 Author: zhenwei pi Date: Sun Apr 13 11:34:39 2025 +0200 selftests: mptcp: use IPPROTO_MPTCP for getaddrinfo mptcp_connect.c is a startup tutorial of MPTCP programming, however there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for getaddrinfo MPTCP support. This patch first uses IPPROTO_MPTCP to get addrinfo, and if glibc version is too old, it falls back to using IPPROTO_TCP. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: zhenwei pi Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-8-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit f9c7504d305546d5cefd24062f377a4d2e615025 Author: Geliang Tang Date: Sun Apr 13 11:34:38 2025 +0200 selftests: mptcp: diag: drop nlh parameter of recv_nlmsg It's strange that 'nlh' variable is set to NULL in get_mptcpinfo() and then this NULL pointer is passed to recv_nlmsg(). In fact, this variable should be defined in recv_nlmsg(), not get_mptcpinfo(). So this patch drops this useless 'nlh' parameter of recv_nlmsg() and define 'nlh' variable in recv_nlmsg(). Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-7-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit 98dea4fd6315c17f4e072deada6047d641995777 Author: Matthieu Baerts (NGI0) Date: Sun Apr 13 11:34:37 2025 +0200 selftests: mptcp: validate MPJoinRejected counter The parent commit adds this new counter, incremented when receiving a connection request, if the PM didn't allow the creation of new subflows. Most of the time, it is then kept at 0, except when the PM limits cause the receiver side to reject new MPJoin connections. This is the case in the following tests: - single subflow, limited by server - multiple subflows, limited by server - subflows limited by server w cookies - userspace pm type rejects join - userspace pm type prevents mp_prio Simply set join_syn_rej=1 when checking the MPJoin counters for these tests. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-6-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit 4ce7fb8de556c0a16c17b5d11d54fa21479f2552 Author: Matthieu Baerts (NGI0) Date: Sun Apr 13 11:34:36 2025 +0200 mptcp: add MPJoinRejected MIB counter This counter is useful to understand why some paths are rejected, and not created as expected. It is incremented when receiving a connection request, if the PM didn't allow the creation of new subflows. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-5-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit 60cbf3158513ae35ab38a2593b07ce679825d425 Author: Matthieu Baerts (NGI0) Date: Sun Apr 13 11:34:35 2025 +0200 mptcp: pass right struct to subflow_hmac_valid subflow_hmac_valid() needs to access the MPTCP socket and the subflow request, but not the request sock that is passed in argument. Instead, the subflow request can be directly passed to avoid getting it via an additional cast. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-4-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit def9d0958befc7dfbda5fc1f22e17fbab912bc62 Author: Thorsten Blum Date: Sun Apr 13 11:34:34 2025 +0200 mptcp: pm: Return local variable instead of freed pointer Commit e4c28e3d5c090 ("mptcp: pm: move generic PM helpers to pm.c") removed an unnecessary if-check, which resulted in returning a freed pointer. This still works due to the implicit boolean conversion when returning the freed pointer from mptcp_remove_anno_list_by_saddr(), but it can be confusing and potentially error-prone. To improve clarity, add a local variable to explicitly return a boolean value instead. Signed-off-by: Thorsten Blum Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-3-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit 760ff076695cfaff3ab8fcb0bae33c8b4158818d Author: Geliang Tang Date: Sun Apr 13 11:34:33 2025 +0200 mptcp: sched: split validation part A new interface .validate has been added in struct bpf_struct_ops recently. This patch prepares a future struct_ops support by implementing it as a new helper mptcp_validate_scheduler() for struct mptcp_sched_ops. In this helper, check whether the required ops "get_subflow" of struct mptcp_sched_ops has been implemented. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-2-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit 6e83166dd8003e8611f253426b85e0c3d933e1c2 Author: Matthieu Baerts (NGI0) Date: Sun Apr 13 11:34:32 2025 +0200 mptcp: sched: remove mptcp_sched_data This is a follow-up of commit b68b106b0f15 ("mptcp: sched: reduce size for unused data"), now removing the mptcp_sched_data structure. Now is a good time to do that, because the previously mentioned WIP work has been updated, no longer depending on this structure. Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250413-net-next-mptcp-sched-mib-sft-misc-v2-1-0f83a4350150@kernel.org Signed-off-by: Jakub Kicinski commit f15e410687954b8d1577d9cca30eeebc148cb1b3 Author: Jiawen Wu Date: Mon Apr 14 10:24:21 2025 +0800 net: txgbe: Update module description Because of the addition of support for 25G/40G devices, update the module description. Signed-off-by: Jiawen Wu Link: https://patch.msgid.link/20250414022421.375101-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit ba6474f19fd1b91c172f6877b1af094e3720321e Author: Dan Carpenter Date: Tue Apr 15 13:45:44 2025 +0300 ASoC: qcom: qdsp6: Set error code in q6usb_hw_params() Propagate the error code if q6afe_port_get_from_id() fails. Don't return success. Fixes: 72b0b8b29980 ("ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Acked-by: Mark Brown Link: https://lore.kernel.org/r/Z_442PWaMVoZcbbU@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit 8176dd6e1cf4adff6422a0e3a335abef3f0256f3 Author: Dan Carpenter Date: Tue Apr 15 13:45:59 2025 +0300 ALSA: usb-audio: qcom: delete a stray tab This code is indented one extra tab. Delete the tab. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Z_4458uUI3LURa8M@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit bbf9d313492ab2c4c71e80e4cf3f1e7bc0f629d9 Author: Richard Fitzgerald Date: Tue Apr 15 11:54:14 2025 +0100 ALSA: hda/cirrus_scodec_test: Modernize creation of dummy devices Replace the old direct use of platform_device APIs with newer KUnit APIs and the faux bus. The dummy codec driver device doesn't need to be a platform device. It can be a faux bus device. The dummy GPIO driver still must be a platform_device so that a software_node can be added to it before it probes. But use the new KUnit-managed APIs to create the platform_device and platform_driver. These will cleanup automatically when a test completes or fails. Also use KUnit resource cleanup to destroy the faux bus driver and the GPIO software node instead of doing this "manually" in test exit() functions. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250415105414.471039-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit fd7f34322053a69904430a63e987a162909d6f33 Merge: ee9c3082f100dc 7338856257fc6e Author: Takashi Iwai Date: Tue Apr 15 17:12:43 2025 +0200 Merge branch 'for-linus' into for-next commit 2e0e70c95077172b29a5b13716c4b159d578e82c Author: Sasha Finkelstein Date: Wed Apr 9 23:52:14 2025 +0200 arm64: dts: apple: Add SPMI controller nodes Add device tree entries for the SPMI controller Reviewed-by: Nick Chan Signed-off-by: Sasha Finkelstein Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20250409-spmi-v4-3-eb81ecfd1f64@gmail.com Signed-off-by: Sven Peter commit 1adf3edaa0ce52eed664fff9102d0f7afe57406e Author: Paul Retourné Date: Sat Apr 12 11:10:05 2025 -0700 staging: gpib: tnt4882: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/2b72df3bfc4a3f57679d2af52112e58acb5c259f.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit d7814813ed9d61d38a76cfa70ffa09f47c5c1efa Author: Paul Retourné Date: Sat Apr 12 11:09:46 2025 -0700 staging: gpib: tms9914: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/a05655260b082c94af71348f05dd2f4e586e2a03.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 9c95c9d1fac80ede2d3d45eeafd16a658c514b61 Author: Paul Retourné Date: Sat Apr 12 00:48:34 2025 -0700 staging: gpib: pc2: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/77eb5fc5050298503009fa212600f00514eeb713.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit c22fc80984c8da0da165fbbe2c8d6de1a2e52756 Author: Paul Retourné Date: Sat Apr 12 00:07:54 2025 -0700 staging: gpib: ni_usb: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/4b2762d349e06db8f541a86ca0ec429bc1351097.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit b5c0bd6b6c4feda1715e756e2bbb58a4f3cee55f Author: Paul Retourné Date: Fri Apr 11 23:49:26 2025 -0700 staging: gpib: nec7210: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/2bdfadb59d11441d10c8e3994de49b876f8e7efe.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 9c77850d9d7bee41a30824ea916ac892c45f5944 Author: Paul Retourné Date: Fri Apr 11 23:48:35 2025 -0700 staging: gpib: lpvo_usb_gpib: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/7699226216a99b8bf053c4d6017941ebc87cb8e2.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 2de3fa2c3f4e25b1d7feb567e108a255d8d6b5c1 Author: Paul Retourné Date: Fri Apr 11 23:47:18 2025 -0700 staging: gpib: ines: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/69a082f18148881a673e1d57b4a9d83767d87a2a.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit c899f4586b1f8c8c3b3b9ae403d7b9bc4d888da8 Author: Paul Retourné Date: Fri Apr 11 23:42:14 2025 -0700 staging: gpib: hp_82341: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/5bc4da465b2df932b7cb7783012786a7220a2e2a.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 3381060f5ad96cc3aacdea7cd599d80c7a6755eb Author: Paul Retourné Date: Fri Apr 11 23:37:25 2025 -0700 staging: gpib: hp_82335: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/cf973e61d37b0509605e49b963f2dae4887efd4a.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit c35371bc08e81a1900e3e085675bc5e75f0d28b0 Author: Paul Retourné Date: Fri Apr 11 23:34:25 2025 -0700 staging: gpib: gpio: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/44c064ed914fef384800e94ac99d00af5ff5f13b.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 6008c89dbdfc867519ee5530522a5802959cd3be Author: Paul Retourné Date: Fri Apr 11 23:31:37 2025 -0700 staging: gpib: fmh_gpib: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/ecf59455b825f97e7866044bee1b1c149cd8e086.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 073b54f342be3ea8fadcc6e416edf1e42ffe5de2 Author: Paul Retourné Date: Fri Apr 11 23:21:56 2025 -0700 staging: gpib: eastwood: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/ce51b42401d7bdbcc08c8c000b69c23905856cbe.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 79d1aa8cb7695947f95a8980fdf9df2f30731c60 Author: Paul Retourné Date: Fri Apr 11 23:21:55 2025 -0700 staging: gpib: common: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/2ffeae1761ba77526e6aa7188f07d25a2f9a1950.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 55fae2fb503fb1345c264a451bf61dd39ebfd2d4 Author: Paul Retourné Date: Fri Apr 11 23:21:54 2025 -0700 staging: gpib: cb7210: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/f4b504b59c500ed5a666422128c90340e8ff4f63.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit a1c7fc159583f7d30844fb774357c7cb90b09d84 Author: Paul Retourné Date: Fri Apr 11 23:21:53 2025 -0700 staging: gpib: agilent_82357a: fixes multiline comments style Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné Link: https://lore.kernel.org/r/3ecb8bc6701ce7b3e5d098c10c2a2b75c9f155f0.1744438358.git.paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman commit 86796b69c8c2048fe1e5745ed20e8cc7976bf0c3 Author: Chen Ni Date: Mon Apr 7 17:26:32 2025 +0800 staging: gpib: fmh_gpib: Remove unnecessary .owner assignment Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250407092632.2952200-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 1269b01cdf3fd3727af2e6b24e6eb61fc750cdb9 Author: Chen Ni Date: Mon Apr 7 11:11:10 2025 +0800 staging: gpib: fmh_gpib: Remove unnecessary print function dev_err() Function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: Chen Ni Reviewed-by: Dominik Karol Piątkowski Link: https://lore.kernel.org/r/20250407031110.2382308-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 51ab134daf5b9b6be9b9c0d19f7963e971497c63 Author: Chen Ni Date: Mon Apr 7 11:07:43 2025 +0800 staging: gpib: eastwood: Remove unnecessary print function dev_err() Function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250407030743.2382246-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 132ea5875df7c6cc35930e12d21a5c1a46d0c872 Author: Michael Rubin Date: Wed Apr 9 05:59:03 2025 +0000 staging: gpib: local_ppoll_mode_ioctl_t now short Using Linux code style to replace typedef local_ppoll_mode_ioctl_t with type short. Adhering to Linux code style. Reported by checkpatch.pl WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-22-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 9979a80cf5d0d54b202d44bbb8ebf2d2f4137043 Author: Michael Rubin Date: Wed Apr 9 05:59:02 2025 +0000 staging: gpib: autospoll_ioctl_t now short Using Linux code style to replace typedef autospoll_ioctl_t with type short. Adhering to Linux code style. Reported by checkpatch.pl WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-21-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 7c3a08ffb07e89373d6f461952d14b4c10a6fcf2 Author: Michael Rubin Date: Wed Apr 9 05:59:01 2025 +0000 staging: gpib: t1_delay_ioctl_t now unsigned int Using Linux code style to replace typedef t1_delay_ioctl_t with type unsigned int. Adhering to Linux code style. Reported by checkpatch.pl WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-20-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6856bb17cf6fe0007f66c61280def9c00db71869 Author: Michael Rubin Date: Wed Apr 9 05:59:00 2025 +0000 staging: gpib: rsc_ioctl_t now int Using Linux code style to replace typedef rsc_ioctl_t with type int. Adhering to Linux code style. Reported by checkpatch.pl WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-19-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 8cc35955b5ab71e3cf8a39204be3a724f72c5487 Author: Michael Rubin Date: Wed Apr 9 05:58:59 2025 +0000 staging: gpib: event_ioctl_t now short Using Linux code style to replace typedef event_ioctl_t with type short. Adhering to Linux code style. Reported by checkpatch.pl WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-18-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit ad368b53ac0999a4861899148a60606aad548d0d Author: Michael Rubin Date: Wed Apr 9 05:58:58 2025 +0000 staging: gpib: Using struct gpib_request_service2 Using Linux code style for 'struct gpib_request_service2' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-17-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 1b462bf26c1e92e6abbe60ec26bc50368306642a Author: Michael Rubin Date: Wed Apr 9 05:58:57 2025 +0000 staging: gpib: Using gpib_select_device_path_ioctl Using Linux code style for 'struct gpib_select_device_path_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-16-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit d178bc14c9281f616ef98f76b4859928e81dcece Author: Michael Rubin Date: Wed Apr 9 05:58:56 2025 +0000 staging: gpib: Using struct gpib_sad_ioctl Using Linux code style for 'struct gpib_sad_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-15-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit faebdfab317c73581fbd0853ccd6467e2385c311 Author: Michael Rubin Date: Wed Apr 9 05:58:55 2025 +0000 staging: gpib: Using struct gpib_pad_ioctl Using Linux code style for 'struct gpib_pad_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-14-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 419a3433f03cb1bedbdb2e14ad7a3eee4deed4bf Author: Michael Rubin Date: Wed Apr 9 05:58:54 2025 +0000 staging: gpib: Using struct gpib_ppoll_config_ioctl` Using Linux code style for 'struct gpib_ppoll_config_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-13-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 4c2170378cb426e02d398e1beabeb18b806df6a9 Author: Michael Rubin Date: Wed Apr 9 05:58:53 2025 +0000 staging: gpib: Using struct gpib_select_pci_ioctl Using Linux code style for 'struct gpib_select_pci_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-12-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit c39eabbffeca621f54bb5a4477a43fdf9e253e47 Author: Michael Rubin Date: Wed Apr 9 05:58:52 2025 +0000 staging: gpib: Using struct gpib_board_info_ioctl Using Linux code style for 'struct gpib_board_info_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 770b63fd93739d5ba48241faa8ecb8cf716ad95e Author: Michael Rubin Date: Wed Apr 9 05:58:51 2025 +0000 staging: gpib: Using struct gpib_spoll_bytes_ioctl Using Linux code style for 'struct gpib_spoll_bytes_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 7e17963fa99086e809d70191417aa9ef77f1db58 Author: Michael Rubin Date: Wed Apr 9 05:58:50 2025 +0000 staging: gpib: Using struct gpib_online_ioctl Using Linux code style for 'struct gpib_online_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 15738cb610430ea52f3eb8ccc994fd3bc02c91f6 Author: Michael Rubin Date: Wed Apr 9 05:58:49 2025 +0000 staging: gpib: Using struct gpib_wait_ioctl Using Linux code style for 'struct gpib_wait_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 7e9f21bb1be8a96df31a61fc4fd1a438f0993483 Author: Michael Rubin Date: Wed Apr 9 05:58:48 2025 +0000 staging: gpib: Using struct gpib_eos_ioctl Using Linux code style for 'struct gpib_eos_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 262040faa5e9522848f6c7aa9d772a6f1995f85d Author: Michael Rubin Date: Wed Apr 9 05:58:47 2025 +0000 staging: gpib: Using struct gpib_serial_poll_ioctl Using Linux code style for 'struct gpib_serial_poll_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 2e9a95ddffc60c567670ca5b54db1557d26d68a2 Author: Michael Rubin Date: Wed Apr 9 05:58:46 2025 +0000 staging: gpib: Using struct gpib_close_dev_ioctl Using Linux code style for 'struct gpib_close_dev_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6e5f0402c87e7033120868c44b31925a89945e79 Author: Michael Rubin Date: Wed Apr 9 05:58:45 2025 +0000 staging: gpib: Using struct gpib_open_dev_ioctl Using Linux code style for 'struct gpib_open_dev_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 28396c51c5d18180b46e168062b8b59efe69bb05 Author: Michael Rubin Date: Wed Apr 9 05:58:44 2025 +0000 staging: gpib: Using struct gpib_read_write_ioctl Using Linux code style for 'struct gpib_read_write_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6215fb3d44998bde8c260931e2da6e77f5253772 Author: Michael Rubin Date: Wed Apr 9 05:58:43 2025 +0000 staging: gpib: Using struct gpib_board_type_ioctl Using Linux code style for 'struct gpib_board_type_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409055903.321438-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 930ce1959c2a05029128ce7d82c37174cb821261 Author: Michael Rubin Date: Wed Apr 9 18:09:39 2025 +0000 staging: gpib: ines: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 9c5cc7962ccb699a01716388c6c13913e2865d2a Author: Michael Rubin Date: Wed Apr 9 18:09:38 2025 +0000 staging: gpib: tms9914: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 72a560b423a243fbba68ce03a9f25d649f4b8352 Author: Michael Rubin Date: Wed Apr 9 18:09:37 2025 +0000 staging: gpib: nec7210: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 173f8e4d314084d6a068c616f38badff76144b6f Author: Michael Rubin Date: Wed Apr 9 18:09:36 2025 +0000 staging: gpib: gpib_types: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 22cc45acb25bd166e0af76d9838a8430f129c38c Author: Michael Rubin Date: Wed Apr 9 18:09:35 2025 +0000 staging: gpib: gpib_proto: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 366fcc8b657919e06e9ec213b38b3a767aa6abe2 Author: Michael Rubin Date: Wed Apr 9 18:09:34 2025 +0000 staging: gpib: fmh_gpib: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 5be401b68961f42cd38427fef9496b3e9e51164a Author: Michael Rubin Date: Wed Apr 9 18:09:33 2025 +0000 staging: gpib: fluke_gpib: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6dcc9e9f0ed71876434c8b190f0e9dd268b20a39 Author: Michael Rubin Date: Wed Apr 9 18:09:32 2025 +0000 staging: gpib: ibsys: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit e8d9c91abf5ad912f8d74b52c8908079d099ce07 Author: Michael Rubin Date: Wed Apr 9 18:09:31 2025 +0000 staging: gpib: cb7210: u8 over uint8_t Reported by checkpatch.pl. CHECK: Prefer kernel type 'u8' over 'uint8_t' Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409180953.398686-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit c93577b9d4533af463ca9dc58385bb3d14164955 Author: Michael Rubin Date: Tue Apr 8 23:25:35 2025 +0000 staging: gpib: Remove typedef gpib_file_private_t Removing gpib_file_private_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 2a523a9e1bd5a5387c1bd7e5aa5ac6ff1734a987 Author: Michael Rubin Date: Tue Apr 8 23:25:34 2025 +0000 staging: gpib: Removing typedef gpib_descriptor_t Removing gpib_descriptor_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 551a1041a2424f0a9f76325c0df8a8c3aaaaf0c2 Author: Michael Rubin Date: Tue Apr 8 23:25:33 2025 +0000 staging: gpib: Removing typedef of status_byte Replacing typedef of status_byte_t with struct gpib_status_byte to adhere to Linux coding style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f95d88118829b283c2ddbb5f02e014ddfd281d7a Author: Michael Rubin Date: Tue Apr 8 23:25:32 2025 +0000 staging: gpib: Removing typedef gpib_status_queue Removing gpib_status_queue_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 8901501d389830f7e79da8de2fa159f44802c235 Author: Michael Rubin Date: Tue Apr 8 23:25:31 2025 +0000 staging: gpib: Removing gpib_event_t typedef Removing gpib_event_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 0d01cafdb167f0c723419a05bb38b17c9804b2f1 Author: Michael Rubin Date: Tue Apr 8 23:25:30 2025 +0000 staging: gpib: Removing gpib_interface_list_t Removing gpib_interface_list_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 4655562990aaaf5ead545ecea4a30970c679e188 Author: Michael Rubin Date: Tue Apr 8 23:25:29 2025 +0000 staging: gpib: Removing typedef gpib_event_queue Removing gpib_event_queue_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408232535.187528-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 0520805ac264420e741575c347738c9c416e8d2a Author: Michael Rubin Date: Wed Apr 9 06:39:04 2025 +0000 staging: gpib: Removing function ibAPE Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f6d49a765f523fee18921b979d6995f0be0fd3be Author: Michael Rubin Date: Wed Apr 9 06:39:03 2025 +0000 staging: gpib: Removing function ibaPrsp Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 7c98e9bf5b2b0c9ecabf5beda998b7bf053938f9 Author: Michael Rubin Date: Wed Apr 9 06:39:02 2025 +0000 staging: gpib: Removing function ibAPWait Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f5eac8478635baf610ff7faa89cda530ccf367b8 Author: Michael Rubin Date: Wed Apr 9 06:39:01 2025 +0000 staging: gpib: Removing function osSendEOI Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function which appears twice. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit cf6dfd2d7f1b19ac033316984084619f5904972c Author: Michael Rubin Date: Wed Apr 9 06:39:00 2025 +0000 staging: gpib: Removing function osReset Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit fe68869b30a554860b081e4437a31478b3f284f6 Author: Michael Rubin Date: Wed Apr 9 06:38:59 2025 +0000 staging: gpib: Removing function osInit Reported by checkpatch.pl as CamelCase where function is undefined. CHECK: Avoid CamelCase: Removing undefined function. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250409063904.342292-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 94e71cd4f08a606131970aff82c023690c608c64 Author: Michael Rubin Date: Tue Apr 8 22:56:28 2025 +0000 staging: gpib: agilent_82357a uses completion agilent_82357a_send_bulk_msg is a oneshot event where a semphore is meant for synchronizing over counting events. Recommendation is to use a completion instead. Reported by checkpatch. WARNING: consider using a completion Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408225628.187316-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 51f04358d8c887c5d117440335c7f94285a403f2 Author: Richard Fitzgerald Date: Tue Apr 15 14:18:37 2025 +0100 ASoC: cs-amp-lib-test: Use flex_array_size() Use flex_array_size() when calculating the number of bytes argument to get_random_bytes(). This replaces a calculation based on passing sizeof() the expected type of the destination. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250415131837.568750-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 72ba314072a66774d5a90141ec99128c6bab033a Author: Michael Rubin Date: Tue Apr 8 22:36:58 2025 +0000 staging: gpib: Removing typedef gpib_board_config Removing gpib_interface_t to adhere to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-19-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit b8a16f6cc987bc86fecbd70d9c6002b9ec109712 Author: Michael Rubin Date: Tue Apr 8 22:36:57 2025 +0000 staging: gpib: tnt4882: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-18-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit ef93e89b7be611c7dd28e3a9c37017b4da2f9fac Author: Michael Rubin Date: Tue Apr 8 22:36:56 2025 +0000 staging: gpib: pc2: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-17-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 449878dcbaf37fbd3aaa84a63a692c34e8318172 Author: Michael Rubin Date: Tue Apr 8 22:36:55 2025 +0000 staging: gpib: ni_usb: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-16-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 68a28080ab1ccc04f8ea9278e289ffc5b2c86b65 Author: Michael Rubin Date: Tue Apr 8 22:36:54 2025 +0000 staging: gpib: lpvo_usb: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-15-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 1fc037b902d4d115dae08656f92a934f08fb3515 Author: Michael Rubin Date: Tue Apr 8 22:36:53 2025 +0000 staging: gpib: ines: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-14-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit b7cdc43c4ab6144931b3a8cd1995728335ba8e9c Author: Michael Rubin Date: Tue Apr 8 22:36:52 2025 +0000 staging: gpib: gpibP: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-13-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 4811b0c220f212ff0b35da0d9fc993bce87868c0 Author: Andrii Staikov Date: Thu Apr 10 15:00:08 2025 +0200 ixgbe: add support for FW rollback mode The driver should detect whether the device entered FW rollback mode and then notify user with the dedicated message including FW and NVM versions. Even if the driver detected rollback mode, this should not result in an probe error and the normal flow proceeds. FW tries to rollback to "old" operational FW located in the inactive NVM bank in cases when newly loaded FW exhibits faulty behavior. If something goes wrong during boot the FW may switch into rollback mode in an attempt to avoid recovery mode and stay operational. After rollback is successful, the banks are swapped, and the "rollback" bank becomes the active bank for the next reset. Reviewed-by: Mateusz Polchlopek Signed-off-by: Andrii Staikov Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 29cb3b8d95c76a1d509029701435ed6b9e96a732 Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:07 2025 +0200 ixgbe: add E610 implementation of FW recovery mode Add E610 implementation of fw_recovery_mode MAC operation. In case of E610 information about recovery mode is obtained from FW_MODES field in IXGBE_GL_MNG_FWSM register (0x000B6134). Introduce recovery specific probing flow and init only vital features. User should be able to perform NVM update using devlink once FW error is detected in order to load a healthy img. Reviewed-by: Mateusz Polchlopek Co-developed-by: Stefan Wegrzyn Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Tested-by: Bharath R Signed-off-by: Tony Nguyen commit b5aae90b6b369df01f424ee09205e287a11e085b Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:06 2025 +0200 ixgbe: add FW API version check Add E610 specific function checking whether the FW API version is compatible with the driver expectations. The major API version should be less than or equal to the expected API version. If not the driver won't be fully operational. Check the minor version, and if it is more than two versions lesser or greater than the expected version, print a message indicating that the NVM or driver should be updated respectively. Reviewed-by: Mateusz Polchlopek Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Signed-off-by: Jedrzej Jagielski Tested-by: Bharath R Signed-off-by: Tony Nguyen commit c9e563cae19e529abcc2cb90b4b793952f209260 Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:05 2025 +0200 ixgbe: add support for devlink reload The E610 adapters contain an embedded chip with firmware which can be updated using devlink flash. The firmware which runs on this chip is referred to as the Embedded Management Processor firmware (EMP firmware). Activating the new firmware image currently requires that the system be rebooted. This is not ideal as rebooting the system can cause unwanted downtime. The EMP firmware itself can be reloaded by issuing a special update to the device called an Embedded Management Processor reset (EMP reset). This reset causes the device to reset and reload the EMP firmware. Implement support for devlink reload with the "fw_activate" flag. This allows user space to request the firmware be activated immediately. Reviewed-by: Mateusz Polchlopek Tested-by: Bharath R Co-developed-by: Slawomir Mrozowicz Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Co-developed-by: Stefan Wegrzyn Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit a0f45672d5e14af053d2dc5f552381351f6eeac0 Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:04 2025 +0200 ixgbe: add device flash update via devlink Use the pldmfw library to implement device flash update for the Intel ixgbe networking device driver specifically for E610 devices. This support uses the devlink flash update interface. Using the pldmfw library, the provided firmware file will be scanned for the three major components, "fw.undi" for the Option ROM, "fw.mgmt" for the main NVM module containing the primary device firmware, and "fw.netlist" containing the netlist module. The flash is separated into two banks, the active bank containing the running firmware, and the inactive bank which we use for update. Each module is updated in a staged process. First, the inactive bank is erased, preparing the device for update. Second, the contents of the component are copied to the inactive portion of the flash. After all components are updated, the driver signals the device to switch the active bank during the next EMP reset. With this implementation, basic flash update for the E610 hardware is supported. Reviewed-by: Jacob Keller Tested-by: Bharath R Co-developed-by: Slawomir Mrozowicz Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Co-developed-by: Stefan Wegrzyn Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 6eae2aeb60b6f1cfa97e6e8f296027f15173a67a Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:03 2025 +0200 ixgbe: extend .info_get() with stored versions Add functions reading inactive versions from the inactive flash bank. Print stored versions for the content present in the inactive bank. If there's pending update the versions reflect the ones which are going to be loaded after reload. If there's no pending update both running and stored are the same, which means there won't be any NVM change on reload. Co-developed-by: Slawomir Mrozowicz Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 4654ec6194b22af73c797508c72710e2e2bba4ad Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:02 2025 +0200 ixgbe: add E610 functions getting PBA and FW ver info Introduce 2 E610 specific callbacks implementations: -ixgbe_start_hw_e610() which expands the regular .start_hw callback with getting FW version information -ixgbe_read_pba_string_e610() which gets Product Board Assembly string Extend EEPROM ops with new .read_pba_string in order to distinguish generic one and the E610 one. Reviewed-by: Mateusz Polchlopek Tested-by: Bharath R Co-developed-by: Stefan Wegrzyn Signed-off-by: Stefan Wegrzyn Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 8210ff738077ed3581e022e5cc8721aa041d42cb Author: Jedrzej Jagielski Date: Thu Apr 10 15:00:01 2025 +0200 ixgbe: add .info_get extension specific for E610 devices E610 devices give possibility to show more detailed info than the previous boards. Extend reporting NVM info with following pieces: fw.mgmt.api -> version number of the API fw.mgmt.build -> identifier of the source for the FW fw.mgmt.srev -> number defining FW's security revision fw.psid.api -> version defining the format of the flash contents fw.undi.srev -> number defining OROM's security revision fw.netlist -> version of the netlist module fw.netlist.build -> first 4 bytes of the netlist hash Co-developed-by: Slawomir Mrozowicz Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 904c2b4c0b48d738bc598f837afeb6a027e650d1 Author: Slawomir Mrozowicz Date: Thu Apr 10 15:00:00 2025 +0200 ixgbe: read the netlist version information Add functions reading the netlist version info and use them as a part of the setting NVM info procedure. Reviewed-by: Mateusz Polchlopek Tested-by: Bharath R Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 70db0788a2628698c0d2746b4864f032c2d59ff9 Author: Slawomir Mrozowicz Date: Thu Apr 10 14:59:59 2025 +0200 ixgbe: read the OROM version information Add functions reading the OROM version info and use them as a part of the setting NVM info procedure. Reviewed-by: Mateusz Polchlopek Reviewed-by: Przemek Kitszel Tested-by: Bharath R Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 5f214150c76dd4cffe51249d4c6a795efca90159 Author: Slawomir Mrozowicz Date: Thu Apr 10 14:59:58 2025 +0200 ixgbe: add E610 functions for acquiring flash data Read NVM related info from the flash. Add several helper functions used to access the flash data, find memory banks, calculate offsets, calculate the flash size. Reviewed-by: Przemek Kitszel Reviewed-by: Mateusz Polchlopek Tested-by: Bharath R Signed-off-by: Slawomir Mrozowicz Co-developed-by: Piotr Kwapulinski Signed-off-by: Piotr Kwapulinski Co-developed-by: Jedrzej Jagielski Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit f6b588af3d575acba469f15ef519ae4befb0ad63 Author: Jedrzej Jagielski Date: Thu Apr 10 14:59:57 2025 +0200 ixgbe: add handler for devlink .info_get() Provide devlink .info_get() callback implementation to allow the driver to report detailed version information. The following info is reported: "serial_number" -> The PCI DSN of the adapter "fw.bundle_id" -> Unique identifier for the combined flash image "fw.undi" -> Version of the Option ROM containing the UEFI driver "board.id" -> The PBA ID string Reviewed-by: Mateusz Polchlopek Tested-by: Bharath R Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit a0285236ab93fdfdd1008afaa04561d142d6c276 Author: Jedrzej Jagielski Date: Thu Apr 10 14:59:56 2025 +0200 ixgbe: add initial devlink support Add an initial support for devlink interface to ixgbe driver. Similarly to i40e driver the implementation doesn't enable devlink to manage device-wide configuration. Devlink instance is created for each physical function of PCIe device. Create separate directory for devlink related ixgbe files and use naming scheme similar to the one used in the ice driver. Add a stub for Documentation, to be extended by further patches. Change struct ixgbe_adapter allocation to be done by devlink (Przemek), as suggested by Jiri. Reviewed-by: Mateusz Polchlopek Co-developed-by: Przemek Kitszel Signed-off-by: Przemek Kitszel Tested-by: Bharath R Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit fd5ef5203ce645f72a37b02a89f2eb20827f7d52 Author: Przemek Kitszel Date: Thu Apr 10 14:59:55 2025 +0200 ixgbe: wrap netdev_priv() usage Wrap use of netdev_priv() in order to change the allocator of the device private structure from alloc_etherdev_mq() to the devlink in next commit. All but one netdev_priv() calls in the whole driver are replaced, the remaining one is called on MACVLAN (so not ixgbe) device. Signed-off-by: Przemek Kitszel Tested-by: Bharath R Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 8982fc03fd630a38c0d0ebddef768b4d4707b659 Author: Jedrzej Jagielski Date: Thu Apr 10 14:59:54 2025 +0200 devlink: add value check to devlink_info_version_put() Prevent from proceeding if there's nothing to print. Suggested-by: Przemek Kitszel Reviewed-by: Jiri Pirko Reviewed-by: Kalesh AP Tested-by: Bharath R Signed-off-by: Jedrzej Jagielski Signed-off-by: Tony Nguyen commit 176f3009ae598d0523b267db319fe16f69577231 Author: Baochen Qiang Date: Wed Apr 9 10:26:42 2025 +0800 wifi: ath12k: support 2 channels for single pdev device For single pdev device, radio number of a device is forced as 1 in ath12k_wmi_ext_soc_hal_reg_caps_parse(). This leads to ah->num_radio == 1 and then in ath12k_mac_setup_iface_combinations() we report to mac/cfg80211 that only 1 channel is supported. In MLO case, it finally results in failing to bring up the second link as it is in another channel. Change num_different_channels to 2 to allow a second link. Since DFS on multiple channels are not supported yet, remove radar_detect_widths. For now WCN7850 is the only single pdev device, so others should not be affected. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-9-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit bcdf2620f95752af542c18ee81a83231d4993953 Author: Baochen Qiang Date: Wed Apr 9 10:26:41 2025 +0800 wifi: ath12k: don't skip non-primary links for WCN7850 The primary link check bypasses REO queue setup for non-primary links in ath12k_dp_rx_peer_tid_setup(), this works for QCN9274 but breaks WCN7850 as WCN7850 needs it to be done for each link peer. Add a new hardware parameter to differentiate them. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-8-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit 3b9cbce6fdd3d511107e7eaf27a0f1e0d73038ea Author: Baochen Qiang Date: Wed Apr 9 10:26:40 2025 +0800 wifi: ath12k: alloc REO queue per station In MLO case, all link peers share the same REO queue, so the queue should be allocated only once, currently this is done by checking primary_link flag in ath12k_dp_rx_peer_tid_setup(). However, the check not only avoids duplicate allocation, but also bypasses sending queue configuration to firmware for non-primary links. In an upcoming patch, changes will be added to make this check no-ops for WCN7850, as WCN7850 firmware needs to be explicitly notified each link peer's queue configuration. That said, the duplicate allocation would arise again after that change, hence it needs to be resolved before hand. Since all link peers share the same queue, it should be allocated per MLD peer, not per link peer. So change to do allocation once and save it in MLD peer, link peers can simply get queue configuration from there. Also relocate ath12k_reoq_buf structure to core.h to avoid circular dependency. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-7-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit 3aba3a1422656850dd1f87843ca34acd379a29ce Author: Baochen Qiang Date: Wed Apr 9 10:26:39 2025 +0800 wifi: ath12k: group REO queue buffer parameters together Currently vaddr, paddr and size fields are located together with other fields in ath12k_dp_rx_tid structure. Logically they represents the REO queue buffer so better to group them in an individual structure. Introduce a new structure ath12k_reoq_buf to group them. This improves code readability, and benefits the upcoming patch where this structure is heavily accessed. While at it, change vaddr type to 'void *' since it is actually not pointing to any u32 buffer. Also rename paddr as paddr_aligned to better reflect its actual meaning. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-6-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit ead6d41116b81098061c878d9bfc0b1a6c629090 Author: Baochen Qiang Date: Wed Apr 9 10:26:38 2025 +0800 wifi: ath12k: make assoc link associate first In MLO scenario WCN7850 firmware requests the assoc link to associate before any other links. However currently in ath12k_mac_op_vif_cfg_changed() we are doing association in an ascending order of link id. If the assoc link does not get assigned the smallest id, a non-assoc link gets associated first and firmware crashes. Change to do association for the assoc link first. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-5-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit 0cd46d1f36ced0e61bd6d8cdce7c9eec9563d294 Author: Baochen Qiang Date: Wed Apr 9 10:26:37 2025 +0800 wifi: ath12k: identify assoc link vif in station mode In MLO scenario, for station mode interface, WCN7850 firmware requests the assoc link vdev to get started before any other link vdevs starts. Firmware internally checks assoc_link field of wmi_vdev_start_mlo_params.flags when the first vdev starts. And if the check fails firmware crashes. Current connection flow guarantees the assoc link vdev gets started first (at assoc stage only one link vdev is created/started, i.e. the assoc link vdev), however the assoc_link flag is never set, resulting in WCN7850 firmware crash. Note ath12k_link_sta structure already has is_assoc_link flag, and it is properly set for assoc link. However we can not use it because it won't be available before peer gets created, which is too late for vdev starts. So add a new flag 'is_sta_assoc_link' in ath12k_link_vif structure and set it when deflink vdev is created. This is valid because we always use deflink as the assoc link. This flag is passed to firmware vdev starts to avoid firmware crash. Also verify the link vif/sta pair has the same settings when creating link sta. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-4-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit 32ecd08b0d1fa2f6b32f2bf7f32013ecfeb5cf44 Author: Michael Rubin Date: Tue Apr 8 22:36:51 2025 +0000 staging: gpib: hp_82341: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-12-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 32f7b19668bd2894f1a236580c2132fc4b9f4449 Author: Baochen Qiang Date: Wed Apr 9 10:26:36 2025 +0800 wifi: ath12k: support MLO as well if single_chip_mlo_support flag is set Currently firmware MLO capability is validated via firmware IE, however WCN7850 firmware does not support this method but instead advertises MLO by single_chip_mlo_support bit in QMI phy capability message. Change to consider single_chip_mlo_support bit as well for MLO capability validation. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-3-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit bc528bc436a63136a034adbb670fa9dc626aaae6 Author: Michael Rubin Date: Tue Apr 8 22:36:50 2025 +0000 staging: gpib: hp_82335: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6b85b83e46516ce38ce82dd2f1c4e40d183aa311 Author: Baochen Qiang Date: Wed Apr 9 10:26:35 2025 +0800 wifi: ath12k: use fw_features only when it is valid Currently fw_features is used to check if a specific feature is supported or not: if the feature bit is set the feature is believed to be supported, otherwise not supported. Since fw_features is populated only when using firmware API-2, and by default it is zero, in case of API-1 such as WCN7850 firmware it is possible that a feature is not enabled by host while actually firmware supports it. To avoid this, add a new flag indicating whether fw_features has been ever populated or not, and only when that flag is true we choose to believe fw_features. This benefits firmware MLO capability validation in an upcoming patch. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-2-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit 64af5486451032fa91b2c59b1af59a37341d5e7b Author: Michael Rubin Date: Tue Apr 8 22:36:49 2025 +0000 staging: gpib: gpio: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit dad6de9070a8dfc8268ed7c1684b81d1e2eeaa97 Author: Baochen Qiang Date: Wed Apr 9 10:26:34 2025 +0800 wifi: ath12k: introduce ath12k_fw_feature_supported() There are several places checking if a specific bit set in ab->fw.fw_features, and in an upcoming patch additional check needs to be added at all places. Introduce a new helper ath12k_fw_feature_supported() to avoid code duplication. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250409-ath12k-wcn7850-mlo-support-v2-1-3801132ca2c3@quicinc.com Signed-off-by: Jeff Johnson commit c3c7a472d6f72bfabc9b35bce1f2e64e1690b0fa Author: Michael Rubin Date: Tue Apr 8 22:36:48 2025 +0000 staging: gpib: fmh: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 4800ec89999049b2fa5944a0496260c008f68dff Author: Michael Rubin Date: Tue Apr 8 22:36:47 2025 +0000 staging: gpib: eastwood: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 9edf551529de556474940a074af37dbe236349a4 Author: Michael Rubin Date: Tue Apr 8 22:36:46 2025 +0000 staging: gpib: common: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit b6d27a345f9d12fb80d61a1b1801ced9c1d6178a Author: Michael Rubin Date: Tue Apr 8 22:36:45 2025 +0000 staging: gpib: cec: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 6e95efdcd133e057f780e7a9e8c13ea43dda3dfc Author: Michael Rubin Date: Tue Apr 8 22:36:44 2025 +0000 staging: gpib: cb7210: struct gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f068d5173dbd90d16899634d1cae65862610660f Author: Michael Rubin Date: Tue Apr 8 22:36:43 2025 +0000 staging: gpib: agilent_82357a: gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit b43426121307801d93bf51f0bcb05ff5237e5fa8 Author: Michael Rubin Date: Tue Apr 8 22:36:42 2025 +0000 staging: gpib: agilent_82350b: gpib_board_config Using Linux code style for struct gpib_board_config Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 9f0ca07f075017351fde2c9fd575cdf957cef043 Author: Michael Rubin Date: Tue Apr 8 22:36:41 2025 +0000 staing: gpib: struct typing for gpib_board_config Using Linux code style for gpib_board_config struct in .h to allow drivers to migrate. Adhering to Linux code style. In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Reported by CheckPatch WARNING: do not add new typedefs Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408223659.187109-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 8a3961396b1ca7aeeb35a26087de660f839b2d8e Author: Michael Rubin Date: Tue Apr 8 22:20:40 2025 +0000 staging: gpib: tms9914: Fix Improper SPDX comment. Correct Improper SPDX comment style. Adhere to Linux kernel coding style. Reported by checkpatch WARNING: Improper SPDX comment style .../tms9914.h', please use '/*' instead Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-15-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 5ad47130b0936caa6803af0873435318f5d1b1ad Author: Michael Rubin Date: Tue Apr 8 22:20:39 2025 +0000 staging: gpib: nec: Fix Improper SPDX comment. Correct Improper SPDX comment style. Adhere to Linux kernel coding style. Reported by checkpatch WARNING: Improper SPDX comment style .../nec7210.h', please use '/*' instead Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-14-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit d40ee5b5329d97c89dde167098f93594f0262887 Author: Michael Rubin Date: Tue Apr 8 22:20:38 2025 +0000 staging: gpib: uapi: Fix CamelCase and IB_STB Correct CamelCase for IB_STB enums Adhere to Linux kernel coding style. Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-13-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 5b3cfa2df14e5185881175113d69444e4c219d48 Author: Michael Rubin Date: Tue Apr 8 22:20:37 2025 +0000 staging: gpib: uapi: Fix CamelCase and IBC Dup Resolved duplicate entry for IbcSPollBit vs IbcSpollBit. Correct CamelCase for IBC enums Adhere to Linux kernel coding style. Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-12-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit df75d32ab7eb5e447eb7c0206d3eb3f26edf50e4 Author: Michael Rubin Date: Tue Apr 8 22:20:36 2025 +0000 staging: gpib: uapi: Fix CamelCase and IBA Dup Resolved duplicate entry for IbaSPollBit vs IbaSpollBit. Correct CamelCase for IBA enums Adhere to Linux kernel coding style. Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit c948413e56757339ffce7f92436d5dd739caf4cf Author: Michael Rubin Date: Tue Apr 8 22:20:35 2025 +0000 staging: gpib: tnt4882: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-10-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit e4b6bf7bb6f611c0ff4a53b318bb8487141348a4 Author: Michael Rubin Date: Tue Apr 8 22:20:34 2025 +0000 staging: gpib: pc2: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit fa4dad5de56474043069edc524ce0898d05e92b7 Author: Michael Rubin Date: Tue Apr 8 22:20:33 2025 +0000 staging: gpib: ines: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-8-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 0b4f98dce24240d3fc73e82a2a3e6e13a1e1287b Author: Michael Rubin Date: Tue Apr 8 22:20:32 2025 +0000 staging: gpib: tms9914: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 08a8889429f80856d0582f725fd6483cc6232e9b Author: Michael Rubin Date: Tue Apr 8 22:20:31 2025 +0000 staging: gpib: nec: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-6-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 5d3df08d30b49745d7c77c2496999902f1ff1318 Author: Michael Rubin Date: Tue Apr 8 22:20:30 2025 +0000 staging: gpib: common: lines exceeded 100 columns Adhere to Linux kernel coding style. CHECK: line length exceeds 100 columns Reported by checkpatch Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-5-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 787191eb82e91c4df2c462ea6d51107ce0c1e372 Author: Michael Rubin Date: Tue Apr 8 22:20:29 2025 +0000 staging: gbip: Alignment should match open parens Adhere to Linux kernel coding style. Reported by checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit 77fd6ceabd19d56a2db21399e2f76b156c6a9a43 Author: Michael Rubin Date: Tue Apr 8 22:20:28 2025 +0000 staging: gpib: Correct CamelCase for PPConfig Adhere to Linux kernel coding style. Reported by checkpatch CHECK: Avoid CamelCase: Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-3-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit fdbb60074f40b7161a87e6fdd139b6980ecdc0b6 Author: Michael Rubin Date: Tue Apr 8 22:20:27 2025 +0000 staging: gpib: Correct CamelCase for EVENT enums Adhere to Linux kernel coding style. Reported by checkpatch CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Michael Rubin Link: https://lore.kernel.org/r/20250408222040.186881-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman commit f7093aaebe6d07e3c85f08b3c77b5b0303c7a432 Author: Andy Shevchenko Date: Tue Apr 8 17:22:26 2025 +0300 fbtft: Replace 'depends on FB_TFT' by 'if FB_TFT ... endif' Replace 'depends on FB_TFT' by 'if FB_TFT ... endif' for the sake of deduplication. Signed-off-by: Andy Shevchenko Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20250408142554.1366319-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 436627df7fe59fb35dd984114b1eb0f671977f7a Author: Andy Shevchenko Date: Tue Apr 8 17:22:25 2025 +0300 fbtft: Unorphan the driver Let's maintain occasional fixes to the fbtft driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250408142554.1366319-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e86e07d4c26dd68eef462d3389bf3d68a4d4c91c Author: Richard Akintola Date: Tue Apr 8 11:20:40 2025 +0100 staging: sm750fb: change sii164ClearInterrupt to snake_case Change camelCase function name sii164ClearInterrupt to sii164_clear_interrupt in order to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/549b645b265edcb793458a534427f75f0ea343c4.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit e22071a33a57658a6d3625f5b60529a92db0cfa8 Author: Richard Akintola Date: Tue Apr 8 11:20:39 2025 +0100 staging: sm750fb: change sii164CheckInterrupt to snake_case Change camelCase function name sii164CheckInterrupt to sii164_check_interrupt in order to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/c5c01f1840ca37c24fcca7bff4b09adba37c3a7f.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4018883b3238be1f4314679535f8a497445bc2a1 Author: Richard Akintola Date: Tue Apr 8 11:20:38 2025 +0100 staging: sm750fb: change sii164IsConnected to snake_case Change camelCase function name sii164IsConnected to sii164_is_connected to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/05de0fb87ed53015cd01ef9460996597ef1e09c8.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit bbb8a8a3ade7e56e3c817939d0adbb3183bee6b8 Author: Richard Akintola Date: Tue Apr 8 11:20:37 2025 +0100 staging: sm750fb: change sii164EnableHotPlugDetection to snake_case Change camelCase function name sii164EnableHotPlugDetection to sii164_enable_hot_plug_detection and it's parameter enableHotPlug to enable_hot_plug to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/04907f753bc0d1a2b2095ffba1d066516520fbb8.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d253fd8451228104ad5bfb3684fb1ae394ae142 Author: Richard Akintola Date: Tue Apr 8 11:20:36 2025 +0100 staging: sm750fb: change sii164GetChipString to snake_case Change camelCase function name sii164GetChipString to sii164_get_chip_string to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/08eb6104c7b82aea32796163421a7e795d3d8964.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0933207fb03b719f6a9c9a730072d3695e47268e Author: Richard Akintola Date: Tue Apr 8 11:20:35 2025 +0100 staging: sm750fb: change sii164SetPower to snake_case Change camelCase function name sii164SetPower to sii164_set_power to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/90f9842254eb83c2dc19abcf5072aab9549026a9.1744105389.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7057ad8e860ceecea9d5dba5b114b79e4beaf677 Author: Richard Akintola Date: Tue Apr 8 11:20:34 2025 +0100 staging: sm750fb: change sii164ResetChip to snake_case Change camelCase function name sii164ResetChip to sii164_reset_chip to conform to kernel code styles as reported by checkpatch.pl CHECK: Avoid camelCase: Signed-off-by: Richard Akintola Link: https://lore.kernel.org/r/0974eb17fa67b707e8d2972668da4d8a692a9702.1744105388.git.princerichard17a@gmail.com Signed-off-by: Greg Kroah-Hartman commit c96e16dfbfc54e9752b1fc780400348e0926d215 Author: Mark Brown Date: Tue Apr 15 14:31:51 2025 +0100 staging: bcm2835-audio: Validate values written to controls The bcm2835-audio driver makes no effort to validate the values it accepts from userspace, causing it to accept invalid values: # # PCM Playback Switch.0 Invalid boolean value 2 # not ok 5 write_invalid.Headphones.1 # # PCM Playback Volume.0 value -10240 less than minimum -10239 # # PCM Playback Volume.0 value 401 more than maximum 400 # not ok 12 write_invalid.Headphones.0 Add validation. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20250415-staging-bcm2835-alsa-limit-v1-1-4ed816e9c0fc@kernel.org Signed-off-by: Greg Kroah-Hartman commit c215f0b5b858f59ddf0e5dde012099739f10d05d Author: Andy Shevchenko Date: Tue Apr 15 12:10:19 2025 +0300 staging: rtl8723bs: Fix compilation errors for W=1 build When building a kernel with Clang 19 the couple of warnings become the errors (due to CONFIG_WERROR=y by default). .../rtl8723bs/core/rtw_xmit.c:1939:13: error: variable 'drop_cnt' set but not used [-Werror,-Wunused-but-set-variable] .../rtl8723bs/hal/hal_com.c:893:6: error: variable 'res' set but not used [-Werror,-Wunused-but-set-variable] Fix them accordingly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250415091019.545905-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 89d571794f795b626c67dc93bc148af161630a48 Author: Erick Karanja Date: Fri Apr 11 11:54:25 2025 +0300 staging: rtl8723bs: Use boolean false instead of integer 0 In the struct definition, adaptivity_flag is defined as type 'bool'. This change replaces the integer literal 0 with the boolean constant false to match the declared type. It ensures semantic correctness, and aligns with kernel coding conventions that prefer true/false over 1/0 for bool types. found by coccinelle Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/20250411085425.44177-1-karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit 12ad640a04aa33961954be66c604a969a2dc9391 Author: Erick Karanja Date: Thu Apr 10 10:11:51 2025 +0300 staging: rtl8723bs: Initialize variables at declaration in rtl8723b_hal_init.c Make the code more concise and readable by integrating the initialization directly into the variable declaration in cases where the initialization is simple and doesn't depend on other variables or complex expressions. Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/4d52a207eadd99ad998214aa8eb059f725c94802.1744268316.git.karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0eb3d8c1ff1bcc5e31c7787d183406c27c72e6de Author: Erick Karanja Date: Thu Apr 10 10:11:50 2025 +0300 staging: rtl8723bs: Initialize variables at declaration in rtl8723bs_xmit.c Make the code more readable by moving trivial initializations up with the declarations instead of wasting a line on that. Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/0a2165d8135d2b4de6b9c05fdc56fe5d7408e7c8.1744268316.git.karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit baf39931560f10f643a0c6e89e1b4c811bbeab76 Author: Gabriel Shahrouzi Date: Sat Apr 5 17:02:40 2025 -0400 staging: rtl8723bs: Remove trailing whitespace Remove trailing whitespace to comply with kernel coding style. Signed-off-by: Gabriel Shahrouzi Link: https://lore.kernel.org/r/20250405210240.584821-1-gshahrouzi@gmail.com Signed-off-by: Greg Kroah-Hartman commit fe1f8eefe19bba3ac995e316dac7f312ef6ec84e Author: Erick Karanja Date: Sat Apr 5 14:26:05 2025 +0300 staging: rtl8723bs: use preferred comparison order Refactor conditions check to follow the Linux kernel coding style, which prefers placing the variable on the left side of the comparison. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/3534b660142c78e800e369c31df091625e61f844.1743851473.git.karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0c64f7b6d05a31f3d4f1ad5cdddd8407956b54f Author: Erick Karanja Date: Sat Apr 5 14:26:04 2025 +0300 staging: rtl8723bs: add spaces between ternary and binary operators Fix spacing around binary arithmetic (`+`, `-`) and shift (`>>`) operators to improve readability and adhere to the Linux kernel coding style. Reported by checkpatch: CHECK: spaces needed around 'operator' Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/ff993a669699e902909063aed03bb6183122c9a7.1743851473.git.karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit f668575bb604a967f5939ab8c37cd2722c9f9f70 Author: Abraham Samuel Adekunle Date: Sat Apr 5 00:15:42 2025 +0000 staging: rtl8723bs: Place constants on right side of comparison Modify comparisons to place constants on the right hand side of expression thereby following Linux kernel coding conventions. Found and transformed by Coccinelle. Semantic patch used for matching and transformation: @@ constant K; expression E; @@ - K == E + E == K Signed-off-by: Abraham Samuel Adekunle Link: https://lore.kernel.org/r/Z/B2LjtshZU6AX2f@ubuntu Signed-off-by: Greg Kroah-Hartman commit 7b4cd0853cd038a6b8c99985ce219dfcd00d7dc9 Author: Bryant Boatright Date: Fri Apr 4 13:35:11 2025 +0000 Staging: rtl8723bs: Fix unbalanced braces in conditional Only one branch of conditional statement is a single statement thus both branches should use braces to adhere to the Linux coding style. Reported by checkpatch: CHECK: Unbalanced braces around else statement Signed-off-by: Bryant Boatright Link: https://lore.kernel.org/r/Z-_gC8XOVoiXsC8i@ubuntu-desk Signed-off-by: Greg Kroah-Hartman commit c994aa4db445d5af7c8c5c8bf82dea544eebfd1f Author: Abraham Samuel Adekunle Date: Fri Apr 4 09:20:39 2025 +0100 staging: rtl8723bs: modify struct field to use standard bool type The struct sta_info field ieee8021x_blocked uses the uint values 0 and 1 to represent false and true values respectively. Convert cases to use the bool type instead to ensure consistency with other parts of the containing code where true or false have been used. This change causes the struct field to change size from a 32bit to an 8bit. However, the change is safe to make because the sta_info struct is not read from the hardware. Reported by Coccinelle. Signed-off-by: Abraham Samuel Adekunle Link: https://lore.kernel.org/r/Z++WV1132FCULn+0@HP-650 Signed-off-by: Greg Kroah-Hartman commit 90bccdb4821c6b94214b33984113ecea00ac0e67 Author: Bartosz Golaszewski Date: Mon Apr 7 09:14:52 2025 +0200 staging: greybus: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Alex Elder Reviewed-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-greybus-v1-1-9d4f721db7ca@linaro.org Signed-off-by: Greg Kroah-Hartman commit c511db3f1de6be1690ccbc53e0bb786073eda74a Author: Thorsten Blum Date: Wed Apr 2 13:57:54 2025 +0200 staging: greybus: Check for string truncation instead of NUL-termination Commit 18f44de63f88 ("staging: greybus: change strncpy() to strscpy_pad()") didn't remove the now unnecessary NUL-termination checks. Unlike strncpy(), strscpy_pad() guarantees that the destination buffer is NUL-terminated, making these checks obsolete. Remove them and check for string truncation instead. Compile-tested only. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250402115755.1929043-1-thorsten.blum@linux.dev Signed-off-by: Greg Kroah-Hartman commit 53e11d245c34656af56625bb06d59b9934428aba Author: Tvrtko Ursulin Date: Thu Apr 3 20:03:01 2025 +0100 drm/xe: Adjust ringbuf emission for maximum possible size MAX_JOB_SIZE_DW seems to be undersized. For the worst case emission from __emit_job_gen12_render_compute I hand count 57 dwords so lets bump this to an even 58. Signed-off-by: Tvrtko Ursulin Reviewed-by: Francois Dugast Link: https://lore.kernel.org/r/20250403190317.6064-2-tvrtko.ursulin@igalia.com Signed-off-by: Lucas De Marchi commit e17f487f2f774c4dcd76725782b0e781257c343d Author: Bartosz Golaszewski Date: Tue Apr 8 09:00:48 2025 +0200 misc: microchip: pci1xxxx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-misc-v1-1-eb6345aea5cd@linaro.org Signed-off-by: Greg Kroah-Hartman commit 92d2261214a52f1c3a0db027b7818363acfb04c7 Author: Tiffany Y. Yang Date: Tue Apr 1 20:28:46 2025 +0000 binder: use buffer offsets in debug logs Identify buffer addresses using vma offsets instead of full user addresses in debug logs or drop them if they are not useful. Signed-off-by: Tiffany Y. Yang Acked-by: Carlos Llamas Reviewed-by: Lee Jones Link: https://lore.kernel.org/r/20250401202846.3510162-2-ynaffit@google.com Signed-off-by: Greg Kroah-Hartman commit 84d1ee548f4add582aa1923f30cf379c9c068ea5 Author: Ricky Wu Date: Fri Mar 14 17:40:13 2025 +0800 misc: rtsx: Enhance the signal handling processes in SVID/SSID 1028:0CE1 platform This patch introduces improvements to the signal handling processes on the SVID/SSID 1028:0CE1 platform. By optimizing signal handling processes we aim to deliver a more stable and reliable user experience. The enhancements ensure robust connectivity and enhance signal process performance. We have conducted extensive testing to ensure these modifications result in noticeable improvements without impacting existing functionalities. Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20250314094013.663223-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 981527828c301644bc4014faa9c523e8a5e32a32 Author: Vadim Pasternak Date: Sat Apr 12 12:18:37 2025 +0300 platform/mellanox: Rename field to improve code readability Rename field 'counter' in 'mlxreg_core_hotplug_platform_data' to count. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250412091843.33943-2-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b41381a0bdccf5dfd60815bdccaa7e3b41189f42 Author: Wolfram Sang Date: Tue Mar 18 09:57:28 2025 +0100 misc: eeprom/idt_89hpesx: use per-client debugfs directory The I2C core now provides a debugfs entry for each client. Let this driver use it instead of the custom directory. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250318085727.20748-2-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit e1ee28b126755d706e9efbc6f78f45165200d475 Author: Gustavo A. R. Silva Date: Fri Mar 14 09:06:16 2025 +1030 misc: bcm-vk: avoid -Wflex-array-member-not-at-end warning Fix the following warning by removing unused flex-array member `data` in `struct bcm_vk_peer_log`: drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Acked-by: Scott Branden Link: https://lore.kernel.org/r/Z9Nd4AmgrQDiK1Gn@kspp Signed-off-by: Greg Kroah-Hartman commit a99b598d836c9c6411110c70a2da134c78d96e67 Author: Chenyuan Yang Date: Mon Mar 10 20:05:11 2025 -0500 misc: tps6594-pfsm: Add NULL pointer check in tps6594_pfsm_probe() The returned value, pfsm->miscdev.name, from devm_kasprintf() could be NULL. A pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02 ("ice: Fix some null pointer dereference issues in ice_ptp.c"). This issue is found by our static analysis tool. Signed-off-by: Chenyuan Yang Link: https://lore.kernel.org/r/20250311010511.1028269-1-chenyuan0y@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc788c4068e0a1b3a43e45df18745c181bfab03c Author: Anandu Krishnan E Date: Mon Mar 10 14:24:17 2025 +0530 misc: fastrpc: Add meaningful labels for exit paths In the fastrpc_rpmsg_probe function, the exit path labels are not intuitive and do not clearly indicate the purpose of the goto statements. Rename goto labels to make it more intuitive and to align with labels of other functions. Signed-off-by: Anandu Krishnan E Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250310085417.25559-1-quic_anane@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 27dbba9f5476f9a94598773aab0ab9229832ec27 Author: Jani Nikula Date: Wed Apr 9 21:47:02 2025 +0300 drm/i915/irq: convert ibx_irq_reset() into ibx_display_irq_reset() Observe that ibx_irq_reset() is really ibx_display_irq_reset(). Make it so. Move to display, and call it directly from gen8_display_irq_reset() instead of gen8_irq_reset(). Remove a nearby ancient stale comment while at it. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250409184702.3790548-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit eaa0d30216c1d54b157ea0ad7f35ba76f6e9a825 Author: Jerome Brunet Date: Tue Feb 18 20:29:46 2025 +0100 driver core: auxiliary bus: add device creation helpers Add helper functions to create a device on the auxiliary bus. This is meant for fairly simple usage of the auxiliary bus, to avoid having the same code repeated in the different drivers. Suggested-by: Stephen Boyd Cc: Arnd Bergmann Signed-off-by: Jerome Brunet Reviewed-by: Greg Kroah-Hartman Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/20250218-aux-device-create-helper-v4-1-c3d7dfdea2e6@baylibre.com Signed-off-by: Greg Kroah-Hartman commit e8a1bd8344054ce27bebf59f48e3f6bc10bc419b Author: Hari Kalavakunta Date: Wed Apr 9 18:23:08 2025 -0700 net: ncsi: Fix GCPS 64-bit member variables Correct Get Controller Packet Statistics (GCPS) 64-bit wide member variables, as per DSP0222 v1.0.0 and forward specs. The Driver currently collects these stats, but they are yet to be exposed to the user. Therefore, no user impact. Statistics fixes: Total Bytes Received (byte range 28..35) Total Bytes Transmitted (byte range 36..43) Total Unicast Packets Received (byte range 44..51) Total Multicast Packets Received (byte range 52..59) Total Broadcast Packets Received (byte range 60..67) Total Unicast Packets Transmitted (byte range 68..75) Total Multicast Packets Transmitted (byte range 76..83) Total Broadcast Packets Transmitted (byte range 84..91) Valid Bytes Received (byte range 204..11) Signed-off-by: Hari Kalavakunta Reviewed-by: Paul Fertser Link: https://patch.msgid.link/20250410012309.1343-1-kalavakunta.hari.prasad@gmail.com Signed-off-by: Paolo Abeni commit e2bcbf99d045f6ae3826e39d1ed25978de17cbfe Author: Richard Fitzgerald Date: Tue Apr 15 12:50:16 2025 +0100 ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP Add a codec driver for the Cirrus Logic CS48L32 audio DSP. The CS48L32 is a low-power audio DSP with microphone inputs for "Always on Voice" (i.e. voice trigger) and voice command processing. It has a programmable Halo Core DSP and a variety of power-efficient fixed-function audio processors, with configurable digital mixing and routing. There are two I2S/TDM audio serial ports. Four analogue inputs are available through IN1. These feed into a 2-channel ADC through an analogue mux. There is an ALSA control for each IN1 ADC channel to select which analogue input to use. A dedicated digital mic (DMIC) PDM input is available on IN2. Two PDM outputs can feed DMIC inputs on another codec or a host DMIC/PDM input. An on-board regulator provides a power supply or bias voltage to attached microphones. Three switchable MICBIAS outputs are fed from this allowing only the microphone in use to be powered-up. There are DAPM widgets for these outputs: MICBIAS1A, MICBIAS1B and MICBIAS1C. The machine driver must create a DAPM route from the required MICBIAS1x widget to the INn input widgets to make the MICBIAS switch on when the audio input is powered-up. For example if the microphone feeding CS48L32 pin IN1LN_1 is powered from MICBIAS1A, the machine driver must create the path: (sink) IN1LN_1 <----- (source) MICBIAS1A Co-developed-by: Stuart Henderson Signed-off-by: Stuart Henderson Co-developed-by: Qi Zhou Signed-off-by: Qi Zhou Co-developed-by: Piotr Stankiewicz Signed-off-by: Piotr Stankiewicz Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250415115016.505777-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit ac03495d7359285a007ec4fdc08d3843bb5d6b7e Author: Richard Fitzgerald Date: Tue Apr 15 12:50:15 2025 +0100 ASoC: dt-bindings: Add Cirrus Logic CS48L32 audio DSP The CS48L32 is an Audio DSP with microphone inputs and SPI control interface. It has a programmable DSP and a variety of power-efficient fixed-function audio processors, with configurable digital mixing and routing. Most properties are core properties: supply regulators, gpios, clocks, interrupt parent and SPI interface. The custom properties define the configuration of the microphone inputs to match what is physically attached to them. Signed-off-by: Richard Fitzgerald Reviewed-by: "Rob Herring (Arm)" Link: https://patch.msgid.link/20250415115016.505777-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 926040da60642335969ff99fa2ba67e4e0bb2618 Author: Alex Elder Date: Fri Apr 11 15:38:27 2025 -0500 serial: 8250_of: manage bus clock in suspend/resume Save the bus clock pointer in the of_serial_info structure, and use that to disable the bus clock on suspend and re-enable it on resume. Signed-off-by: Alex Elder Reviewed-by: Andy Shevchenko Reviewed-by: Yixun Lan Link: https://lore.kernel.org/r/20250411203828.1491595-4-elder@riscstar.com Signed-off-by: Greg Kroah-Hartman commit 66f5f70ce07a5c4ad88709dc34c072673aaafa25 Author: Ryo Takakura Date: Sat Apr 12 09:25:44 2025 +0900 serial: sifive: Switch to nbcon console Add the necessary callbacks(write_atomic, write_thread, device_lock and device_unlock) and CON_NBCON flag to switch the sifive console driver to perform as nbcon console. Both ->write_atomic() and ->write_thread() will check for console ownership whenever they are accessing registers. The ->device_lock()/unlock() will provide the additional serilization necessary for ->write_thread() which is called from dedicated printing thread. Signed-off-by: Ryo Takakura Reviewed-by: John Ogness Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20250412002544.185038-1-ryotkkr98@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8bfabff0bfff8fbbe90673d1a557d15c42b4494a Author: Nicolas Pitre Date: Fri Apr 11 13:43:58 2025 -0400 vt: fix comment vs definition mismatch Fixes for: ucs_is_zero_width() ucs_is_double_width() ucs_recompose() Signed-off-by: Nicolas Pitre Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504111036.YH1iEqBR-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202504111359.urXWyzvQ-lkp@intel.com/ Link: https://lore.kernel.org/r/o4974349-pp4p-4374-80q9-2oppqqr94r60@syhkavp.arg Signed-off-by: Greg Kroah-Hartman commit 153874010354d050f62f8ae25cbb960c17633dc5 Author: Chen Yufeng Date: Tue Apr 15 14:58:57 2025 +0800 usb: potential integer overflow in usbg_make_tpg() The variable tpgt in usbg_make_tpg() is defined as unsigned long and is assigned to tpgt->tport_tpgt, which is defined as u16. This may cause an integer overflow when tpgt is greater than USHRT_MAX (65535). I haven't tried to trigger it myself, but it is possible to trigger it by calling usbg_make_tpg() with a large value for tpgt. I modified the type of tpgt to match tpgt->tport_tpgt and adjusted the relevant code accordingly. This patch is similar to commit 59c816c1f24d ("vhost/scsi: potential memory corruption"). Signed-off-by: Chen Yufeng Link: https://lore.kernel.org/r/20250415065857.1619-1-chenyufeng@iie.ac.cn Signed-off-by: Greg Kroah-Hartman commit 1881a32fe14df801838302aa15842957c76a4ebd Author: Bjorn Andersson Date: Mon Apr 14 20:21:55 2025 -0500 usb: dwc3: qcom: Transition to flattened model The USB IP-block found in most Qualcomm platforms is modelled in the Linux kernel as 3 different independent device drivers, but as shown by the already existing layering violations in the Qualcomm glue driver they can not be operated independently. With the current implementation, the glue driver registers the core and has no way to know when this is done. As a result, e.g. the suspend callbacks needs to guard against NULL pointer dereferences when trying to peek into the struct dwc3 found in the drvdata of the child. Even with these checks, there are no way to fully protect ourselves from the race conditions that occur if the DWC3 is unbound. Missing from the upstream Qualcomm USB support is handling of role switching, in which the glue needs to be notified upon DRD mode changes. Several attempts has been made through the years to register callbacks etc, but they always fall short when it comes to handling of the core's probe deferral on resources etc. Moving to a model where the DWC3 core is instantiated in a synchronous fashion avoids above described race conditions. It is however not feasible to do so without also flattening the DeviceTree binding, as assumptions are made in the DWC3 core and frameworks used that the device's associated of_node will the that of the core. Furthermore, the DeviceTree binding is a direct representation of the Linux driver model, and doesn't necessarily describe "the USB IP-block". The Qualcomm DWC3 glue driver is therefor transitioned to initialize and operate the DWC3 within the one device context, in synchronous fashion. To provide a limited time backwards compatibility, a snapshot of the driver is retained in a previous commit. As such no care is taken in the dwc3-qcom driver for the qcom,dwc3 backwards compatibility. Acked-by: Thinh Nguyen Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-6-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 2dc9f137e194267773f785cc0a352136fb9e42cc Author: Bjorn Andersson Date: Mon Apr 14 20:21:54 2025 -0500 usb: dwc3: qcom: Don't rely on drvdata during probe With the upcoming transition to a model where DWC3 core and glue operate on a single struct device the drvdata datatype will change to be owned by the core. The drvdata is however used by the Qualcomm DWC3 glue to pass the qcom glue context around before the core is allocated. Remove this problem, and clean up the code, by passing the dwc3_qcom struct around during probe, instead of acquiring it from the drvdata. Acked-by: Thinh Nguyen Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-5-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 170940f7e6859152d8579e7be57c6a2060438651 Author: Bjorn Andersson Date: Mon Apr 14 20:21:53 2025 -0500 usb: dwc3: core: Don't touch resets and clocks When the core is integrated with glue, it's reasonable to assume that the glue driver will have to touch the IP before/after the core takes the hardware out and into reset. As such the glue must own these resources and be allowed to turn them on/off outside the core's handling. Allow the platform or glue layer to indicate if the core logic for clocks and resets should be skipped to deal with this. Reviewed-by: Frank Li Acked-by: Thinh Nguyen Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-4-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 613a2e655d4dc9cd64c846b36543a5ef4e8de004 Author: Bjorn Andersson Date: Mon Apr 14 20:21:52 2025 -0500 usb: dwc3: core: Expose core driver as library The DWC3 IP block is handled by three distinct device drivers: XHCI, DWC3 core and a platform specific (optional) DWC3 glue driver. This has resulted in, at least in the case of the Qualcomm glue, the presence of a number of layering violations, where the glue code either can't handle, or has to work around, the fact that core might not probe deterministically. An example of this is that the suspend path should operate slightly different depending on the device operating in host or peripheral mode, and the only way to determine the operating state is to peek into the core's drvdata. The Qualcomm glue driver is expected to make updates in the qscratch register region (the "glue" region) during role switch events, but with the glue and core split using the driver model, there is no reasonable way to introduce listeners for mode changes. Split the dwc3 core platform_driver callbacks and their implementation and export the implementation, to make it possible to deterministically instantiate the dwc3 core as part of the dwc3 glue drivers and to allow flattening of the DeviceTree representation. Acked-by: Thinh Nguyen Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-3-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 6e762f7b8edc785405923d5dc002d2b76d4a9739 Author: Bjorn Andersson Date: Mon Apr 14 20:21:51 2025 -0500 dt-bindings: usb: Introduce qcom,snps-dwc3 The Qualcomm USB glue is not separate of the Synopsys DWC3 core and several of the snps,dwc3 properties (such as clocks and reset) conflicts in expectation with the Qualcomm integration. Using the newly split out Synopsys DWC3 core properties, describe the Qualcomm USB block in a single block. The new binding is a copy of qcom,dwc3 with the needed modifications. It would have been convenient to retain the two structures with the same compatibles, but as there exist no way to select a binding based on the absence of a subnode/patternProperty, a new generic compatible is introduced to describe this binding. To avoid redefining all the platform-specific compatibles, "select" is used to tell the DeviceTree validator which binding to use solely on the generic compatible. (Otherwise if the specific compatible matches during validation, the generic one must match as well) Mark qcom,dwc3 deprecated, to favor expressing future platforms using the new combined binding. Reviewed-by: Rob Herring (Arm) Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-2-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit b958b03c82d2a1c470225355e43248c679a949a5 Author: Bjorn Andersson Date: Mon Apr 14 20:21:50 2025 -0500 usb: dwc3: qcom: Snapshot driver for backwards compatibilty In order to more tightly integrate the Qualcomm glue driver with the dwc3 core the driver is redesigned to avoid splitting the implementation using the driver model. But due to the strong coupling to the Devicetree binding needs to be updated as well. Various ways to provide backwards compatibility with existing Devicetree blobs has been explored, but migrating the Devicetree information between the old and the new binding is non-trivial. For the vast majority of boards out there, the kernel and Devicetree are generated and handled together, which in practice means that backwards compatibility needs to be managed across about 1 kernel release. For some though, such as the various Snapdragon laptops, the Devicetree blobs live a life separate of the kernel. In each one of these, with the continued extension of new features, it's recommended that users would upgrade their Devicetree somewhat frequently. With this in mind, simply carrying a snapshot/copy of the current driver is simpler than creating and maintaining the migration code. The driver is kept under the same Kconfig option, to ensure that Linux distributions doesn't drop USB support on these platforms. The driver, which is going to be refactored to handle the newly introduced qcom,snps-dwc3 compatible, is updated to temporarily not match against any compatible. This driver should be removed after the next LTS release. Acked-by: Thinh Nguyen Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-1-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 00b157f8f64bedc1b619688e8abe659a79a63033 Author: Ivaylo Ivanov Date: Sat Apr 12 23:33:13 2025 +0300 usb: dwc3: exynos: add support for Exynos2200 variant Add Exynos2200 compatible string and associated driver data. This SoC requires a Link interface AXI clock. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250412203313.738429-3-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41c6960617b29ba16672d3ae607c7af0de24fe11 Author: Ivaylo Ivanov Date: Sat Apr 12 23:33:12 2025 +0300 dt-bindings: usb: samsung,exynos-dwc3: add exynos2200 compatible The Exynos2200 SoC has a DWC3 compatible USB controller and can reuse the existing Exynos glue. Update the dt schema to include the samsung,exynos2200-dwusb3 compatible for it. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250412203313.738429-2-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6ec8f8625c1f92d1c6bf83c662f1ee8e914843d Author: J. Neuschäfer Date: Tue Apr 8 21:13:13 2025 +0200 usb: misc: onboard_dev: Add Realtek RTL8188ETV WiFi (0bda:0179) Realtek RTL8188ETV 2.4 GHz WiFi modules (detected as RTL8188EU by the RTL8XXXXU driver) are found soldered into some embedded devices, such as the Fernsehfee 3.0 set-top box. They require a 3.3V power supply. Signed-off-by: J. Neuschäfer Link: https://lore.kernel.org/r/20250408-rtl-onboard-v2-2-0b6730b90e31@posteo.net Signed-off-by: Greg Kroah-Hartman commit 7dbd93137153dac561c74f4aa80d9280486011e7 Author: J. Neuschäfer Date: Tue Apr 8 21:13:12 2025 +0200 dt-bindings: net: wireless: Add Realtek RTL8188ETV USB WiFi This is an on-board USB device that requires a 3.3V supply. Signed-off-by: J. Neuschäfer Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250408-rtl-onboard-v2-1-0b6730b90e31@posteo.net Signed-off-by: Greg Kroah-Hartman commit 0c58a97f919c24fe4245015f4375a39ff05665b6 Author: Joanne Koong Date: Mon Apr 14 15:22:10 2025 -0700 fuse: remove tmp folio for writebacks and internal rb tree In the current FUSE writeback design (see commit 3be5a52b30aa ("fuse: support writable mmap")), a temp page is allocated for every dirty page to be written back, the contents of the dirty page are copied over to the temp page, and the temp page gets handed to the server to write back. This is done so that writeback may be immediately cleared on the dirty page, and this in turn is done in order to mitigate the following deadlock scenario that may arise if reclaim waits on writeback on the dirty page to complete: * single-threaded FUSE server is in the middle of handling a request that needs a memory allocation * memory allocation triggers direct reclaim * direct reclaim waits on a folio under writeback * the FUSE server can't write back the folio since it's stuck in direct reclaim With a recent change that added AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM and mitigates the situation described above, FUSE writeback does not need to use temp pages if it sets AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM on its inode mappings. This commit sets AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM on the inode mappings and removes the temporary pages + extra copying and the internal rb tree. fio benchmarks -- (using averages observed from 10 runs, throwing away outliers) Setup: sudo mount -t tmpfs -o size=30G tmpfs ~/tmp_mount ./libfuse/build/example/passthrough_ll -o writeback -o max_threads=4 -o source=~/tmp_mount ~/fuse_mount fio --name=writeback --ioengine=sync --rw=write --bs={1k,4k,1M} --size=2G --numjobs=2 --ramp_time=30 --group_reporting=1 --directory=/root/fuse_mount bs = 1k 4k 1M Before 351 MiB/s 1818 MiB/s 1851 MiB/s After 341 MiB/s 2246 MiB/s 2685 MiB/s % diff -3% 23% 45% Signed-off-by: Joanne Koong Reviewed-by: Jingbo Xu Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit 0c4f8ed498cea1e2beebf7aa3d198fa381264f88 Author: Joanne Koong Date: Mon Apr 14 15:22:09 2025 -0700 mm: skip folio reclaim in legacy memcg contexts for deadlockable mappings Currently in shrink_folio_list(), reclaim for folios under writeback falls into 3 different cases: 1) Reclaim is encountering an excessive number of folios under writeback and this folio has both the writeback and reclaim flags set 2) Dirty throttling is enabled (this happens if reclaim through cgroup is not enabled, if reclaim through cgroupv2 memcg is enabled, or if reclaim is on the root cgroup), or if the folio is not marked for immediate reclaim, or if the caller does not have __GFP_FS (or __GFP_IO if it's going to swap) set 3) Legacy cgroupv1 encounters a folio that already has the reclaim flag set and the caller did not have __GFP_FS (or __GFP_IO if swap) set In cases 1) and 2), we activate the folio and skip reclaiming it while in case 3), we wait for writeback to finish on the folio and then try to reclaim the folio again. In case 3, we wait on writeback because cgroupv1 does not have dirty folio throttling, as such this is a mitigation against the case where there are too many folios in writeback with nothing else to reclaim. If a filesystem (eg fuse) may deadlock due to reclaim waiting on writeback, then the filesystem needs to add inefficient messy workarounds to prevent this. To improve the performance of these filesystems, this commit adds two things: a) a AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM mapping flag that filesystems may set to indicate that reclaim should not wait on writeback b) if legacy memcg encounters a folio with this AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM flag set (eg case 3), the folio will be activated and skip reclaim (eg default to behavior in case 2) instead. Signed-off-by: Joanne Koong Reviewed-by: Shakeel Butt Reviewed-by: Jeff Layton Acked-by: David Hildenbrand Reviewed-by: Jingbo Xu Signed-off-by: Miklos Szeredi commit d487858ebffaab9acd8945f19ef400ec6eda11f1 Author: Kurt Borja Date: Thu Mar 27 20:19:37 2025 -0300 driver core: faux: Add sysfs groups after probing Manually add sysfs groups after the faux_device_ops's probe succeeds. Likewise remove these groups just before calling the faux_devices_ops's remove callback. This approach approximates the order in which the driver core adds and removes the driver's .dev_groups of a device to avoid lifetime issues. This is done specifically to avoid using the device's .groups member, which adds groups before the device is even registered to the bus. This lets consumers of this API, initialize resources on the .probe callback and then use them inside is_visible/show/store methods, through dev_get_drvdata() without races. Cc: Rafael J. Wysocki Cc: Danilo Krummrich Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250327-faux-groups-v2-1-745a3cf0bc16@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4fea593e625cd50d4d11be227007849b12f17bfb Author: Joanne Koong Date: Mon Feb 3 11:30:22 2025 -0800 fuse: optimize over-io-uring request expiration check Currently, when checking whether a request has timed out, we check fpq processing, but fuse-over-io-uring has one fpq per core and 256 entries in the processing table. For systems where there are a large number of cores, this may be too much overhead. Instead of checking the fpq processing list, check ent_w_req_queue and ent_in_userspace. Signed-off-by: Joanne Koong Reviewed-by: Bernd Schubert Signed-off-by: Miklos Szeredi commit 8c9b406ff470a8346232eec979dc84f518aabfd9 Author: Kevin Paul Reddy Janagari Date: Fri Apr 11 14:20:10 2025 +0530 tipc: Removing deprecated strncpy() This patch suggests the replacement of strncpy with strscpy as per Documentation/process/deprecated. The strncpy() fails to guarantee NULL termination, The function adds zero pads which isn't really convenient for short strings as it may cause performance issues. strscpy() is a preferred replacement because it overcomes the limitations of strncpy mentioned above. Compile Tested Signed-off-by: Kevin Paul Reddy Janagari Reviewed-by: Tung Nguyen Tested-by: Tung Nguyen Link: https://patch.msgid.link/20250411085010.6249-1-kevinpaul468@gmail.com Signed-off-by: Paolo Abeni commit fcdf212fd9b36c299d90229e9546c077db2215ce Author: Thorsten Blum Date: Tue Apr 15 11:03:55 2025 +0200 ASoC: cs-amp-lib: Annotate struct cirrus_amp_efi_data with __counted_by() Add the __counted_by() compiler attribute to the flexible array member 'data' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250415090354.92211-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit 81f6e0e0f3505809dd78eab129106f1c0cf2baf1 Author: Matt Coster Date: Thu Apr 10 10:55:15 2025 +0100 drm/imagination: Add support for TI AM68 GPU Since we already added a generic compatible string for all IMG Rogue GPUs ("img,img-rogue"), all that's needed here is to link the appropriate firmware for the BXS-4-64 GPU in the AM68. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-16-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit f0a1ab65d90420f2817569bbf67111feb8e6821e Author: Matt Coster Date: Thu Apr 10 10:55:14 2025 +0100 drm/imagination: Use cached memory with dma_coherent The TI k3-j721s2 platform does not allow us to use uncached memory (which is what the driver currently does) without disabling cache snooping on the AXI ACE-Lite interface, which would be too much of a performance hit. Given the platform is dma-coherent, we can simply force all device-accessible memory allocations through the CPU cache. In fact, this can be done whenever the dma_coherent attribute is present. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-15-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 171f378d2a23db92d3443173f5fd7f25633ec39d Author: Sarah Walker Date: Thu Apr 10 10:55:13 2025 +0100 drm/imagination: Add RISC-V firmware processor support Newer PowerVR GPUs (such as the BXS-4-64 MC1) use a RISC-V firmware processor instead of the previous MIPS or META. The current version of this patch depends on a patch[1] which exists in drm-misc-fixes, but has not yet made it back to drm-misc-next (the target of this patch). That patch adds the function pvr_vm_unmap_obj() which is used here. [1]: https://lore.kernel.org/r/20250226-hold-drm_gem_gpuva-lock-for-unmap-v2-1-3fdacded227f@imgtec.com Signed-off-by: Sarah Walker Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-14-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit f48485ab506850b4e35ff56550568f710a22a586 Author: Matt Coster Date: Thu Apr 10 10:55:12 2025 +0100 drm/imagination: Move ELF fw utils to common file Currently only MIPS firmware processors use ELF-formatted firmware. When adding support for RISC-V firmware processors, it will be useful to have ELF handling functions ready to go. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-13-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 89b3c4a5cc1b95f09f5fa5c183aa9d7a65309eac Author: Matt Coster Date: Thu Apr 10 10:55:11 2025 +0100 drm/imagination: Use callbacks for fw irq handling This allows for more versatility in checking and clearing firmware registers used for interrupt handling. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-12-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 544b9b3b6fbd28473df9be42c815b2a5d97ae37b Author: Matt Coster Date: Thu Apr 10 10:55:10 2025 +0100 drm/imagination: Use a lookup table for fw defs With more than two firmware processor types, the if/else chain in pvr_fw_init() gets a bit ridiculous. Use a static array indexed on pvr_fw_processor_type (which is now a proper enum instead of #defines) instead. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-11-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 28dbcfbc01f32ac9c7c5c5f7b3a12c8cf701a989 Author: Matt Coster Date: Thu Apr 10 10:55:09 2025 +0100 drm/imagination: Make has_fixed_data_addr a value This is currently a callback function which takes no parameters; there's no reason for this so let's make it a straightforward value in pvr_fw_defs. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-10-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 091ffb00b5eca4a872244bc8ce412e7675e9cafe Author: Matt Coster Date: Thu Apr 10 10:55:08 2025 +0100 drm/imagination: Rename event_mask -> status_mask Now that enable_reg isn't used, rename the previously shared event_mask to status_mask since it's only used with status_reg. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-9-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 2c08b72598cc15eafbf5c9c3870e5c29e21f4827 Author: Matt Coster Date: Thu Apr 10 10:55:07 2025 +0100 drm/imagination: Remove firmware enable_reg After a previous commit ("drm/imagination: Mask GPU IRQs in threaded handler"), this register is now only used to enable firmware interrupts at start-of-day. This is, however, unnecessary since they are enabled by default. In addition, the soon-to-be-added RISC-V firmware processors do not have an equivalent register. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-8-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 96822d38ff574433e06a2ec0f88ebc50d44c8eaa Author: Alessio Belle Date: Thu Apr 10 10:55:06 2025 +0100 drm/imagination: Handle Rogue safety event IRQs Extend interrupt handling logic to check for safety event IRQs, then clear and handle them in the IRQ handler thread. Safety events need to be checked and cleared with a different set of GPU registers than those the IRQ handler has been using so far. Only two safety events need to be handled on the host: FW fault (ECC error correction or detection) and device watchdog timeout. Handling right now simply consists of clearing any error and logging the event. If either of these events results in an unrecoverable GPU or FW, the driver will eventually attempt to recover from it e.g. via pvr_power_reset(). Note that Rogue GPUs may send interrupts to the host for all types of safety events, not just the two above. For events not handled by the host, clearing the associated interrupt is sufficient. Signed-off-by: Alessio Belle Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-7-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit bdced61365b4eca917b6df37d3d47c2f7d096d87 Author: Alessio Belle Date: Thu Apr 10 10:55:05 2025 +0100 drm/imagination: Mask GPU IRQs in threaded handler Pass IRQF_ONESHOT flag to request_threaded_irq(), so that interrupts will be masked by the kernel until the end of the threaded IRQ handler. Since the calls to pvr_fw_irq_enable() and pvr_fw_irq_disable() are now redundant, remove them. Interrupts to the host from the soon-to-be-added RISC-V firmware processors cannot be masked in hardware. This change allows us to continue using the threaded handler in GPUs with a RISC-V firmware. For simplicity, the same approach is taken for all firmware processors. Signed-off-by: Alessio Belle Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-6-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 330e76d3169721a55658c3b4fed872df6b0d6239 Author: Matt Coster Date: Thu Apr 10 10:55:04 2025 +0100 drm/imagination: Add power domain control The first supported GPU only used a single power domain so this was automatically handled by the device runtime. In order to support multiple power domains, they must be enumerated from devicetree and linked to both the GPU device and each other to ensure correct power sequencing at start time. For all Imagination Rogue GPUs, power domains are named "a", "b", etc. and the sequence A->B->... is always valid for startup with the reverse true for shutdown. Note this is not always the *only* valid sequence, but it's simple and does not require special-casing for different GPU power topologies. Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-5-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 2e8c6b27478c3acf411eb130ddd4817c518f2824 Author: Matt Coster Date: Thu Apr 10 10:55:03 2025 +0100 drm/imagination: Use new generic compatible string Follow-on from the companion dt-bindings change ("dt-bindings: gpu: img: More explicit compatible strings"), deprecating "img,img-axe" in favour of the more explicit combination of "img,img-rogue" and "img,img-axe-1-16m". Since all relevant details are interrogated from the device at runtime, we can match on the generic "img,img-rogue" and avoid adding more entries with NULL data members (barring hardware quirks). Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-4-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 0fb32b777aecfb0fa09dcb3f05bd05acd9527b55 Author: Alessio Belle Date: Thu Apr 10 10:55:02 2025 +0100 drm/imagination: Update register defs for newer GPUs Update the register define header to a newer version that covers more recent GPUs, including BXS-4-64. Signed-off-by: Alessio Belle Reviewed-by: Frank Binns Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-3-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 86e3f3a694903bc77f6e80ed0de2c9384c5bb9be Author: Matt Coster Date: Thu Apr 10 10:55:01 2025 +0100 dt-bindings: gpu: img: Add BXS-4-64 devicetree bindings Unlike AXE-1-16M, BXS-4-64 uses two power domains. Like the existing AXE-1-16M integration, BXS-4-64 uses the single clock integration in the TI k3-j721s2. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-2-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit 2c01d90998598b5f48b4ccdfdd3e7d407d094613 Author: Matt Coster Date: Thu Apr 10 10:55:00 2025 +0100 dt-bindings: gpu: img: Future-proofing enhancements The first compatible strings added for the AXE-1-16M are not sufficient to accurately describe all the IMG Rogue GPUs. The current "img,img-axe" string refers to the entire family of Series AXE GPUs, but this is primarily a marketing term and does not denote a level of hardware similarity any greater than just "Rogue". The more specific "img,img-axe-1-16m" string refers to individual AXE-1-16M GPU. For example, unlike the rest of the Series AXE GPUs, the AXE-1-16M only uses a single power domain. The situation is actually slightly worse than described in the first paragraph, since many "series" (such as Series BXS found in the TI AM68 among others and added later in this series) contain cores with both Rogue and Volcanic architectures. Besides attempting to move away from vague groupings defined only by marketing terms, we want to draw a line between properties inherent to the IP core and choices made by the silicon vendor at integration time. For instance, the number of power domains is a property of the IP core, whereas the decision to use one or multiple clocks is a vendor one. In the original compatible strings, we must use "ti,am62-gpu" to constrain both of these properties since the number of power domains cannot be fixed for "img,img-axe". Work is currently underway to add support for volcanic-based Imagination GPUs, for which bindings will be added in "img,powervr-volcanic.yaml". As alluded to previously, the split between rogue and volcanic cores is non-obvious at times, so add a generic top-level "img,img-rogue" compatible string here to allow for simpler differentiation in devicetrees without referring back to the bindings. The currently supported GPU (AXE-1-16M) only requires a single power domain. Subsequent patches will add support for BXS-4-64 MC1, which has two power domains. Add infrastructure now to allow for this. Also allow the dma-coherent property to be added to IMG Rogue GPUs, which are DMA devices. The decision for coherency is made at integration time and this property should be applied wherever it accurately describes the vendor integration. Note that the new required properties for power domains are conditional on the new base compatible string to avoid an ABI break. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-1-eda620c5865f@imgtec.com Signed-off-by: Matt Coster commit b1244645ad6c79d89974c015abe552d47a42dbdc Author: Raviteja Laggyshetty Date: Tue Apr 15 09:53:41 2025 +0000 interconnect: qcom: sa8775p: Add dynamic icc node id support To facilitate dynamic id allocation, discard the static IDs from node data and set alloc_dyn_id in descriptor structure to indicate dynamic ID allocation. Update the topology to use node pointers for links instead of static IDs and forward declare the node pointer to avoid undefined references. Signed-off-by: Raviteja Laggyshetty Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250415095343.32125-6-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit 7f9560a3bebe42c6ec96b66a1650403be0bbc4b1 Author: Raviteja Laggyshetty Date: Tue Apr 15 09:53:40 2025 +0000 interconnect: qcom: icc-rpmh: Add dynamic icc node id support Interconnect framework relies on static IDs for creating, linking and maintaning the topology. This dependency on static IDs prevents creating two instances of same provider. To overcome the dependency on static IDs, dynamic ID support is being added. To facilitate dynamic node ID support, the driver now uses node pointers for links instead of static node IDs and icc_node pointer is added as member in qcom_icc_node structure to track the node creation. Signed-off-by: Raviteja Laggyshetty Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250415095343.32125-5-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit ac2c390650f554aa6571ac60f8e0aae519766069 Author: Raviteja Laggyshetty Date: Tue Apr 15 09:53:39 2025 +0000 interconnect: qcom: Add multidev EPSS L3 support EPSS on SA8775P has two instances, necessitating the creation of two device nodes with different compatibles due to the unique ICC node ID and name limitations in the interconnect framework. Add multidevice support for the OSM-L3 provider to dynamically obtain unique node IDs and register with the framework. EPSS topology includes a single master-slave pair within the same provider, the node linking logic is simplified by directly connecting the master node to the slave node. Signed-off-by: Raviteja Laggyshetty Link: https://lore.kernel.org/r/20250415095343.32125-4-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit d30f83d278a921485b3e877d03fe937bccfcbcdd Author: Raviteja Laggyshetty Date: Tue Apr 15 09:53:38 2025 +0000 interconnect: core: Add dynamic id allocation support The current interconnect framework relies on static IDs for node creation and registration, which limits topologies with multiple instances of the same interconnect provider. To address this, introduce icc_node_create_dyn() and icc_link_nodes() APIs to dynamically allocate IDs for interconnect nodes during creation and link. This change removes the dependency on static IDs, allowing multiple instances of the same hardware, such as EPSS L3. Signed-off-by: Raviteja Laggyshetty Link: https://lore.kernel.org/r/20250415095343.32125-3-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit 289198fb51420def0f6fa88ed5808d0d38120ad0 Author: Raviteja Laggyshetty Date: Tue Apr 15 09:53:37 2025 +0000 dt-bindings: interconnect: Add EPSS L3 compatible for SA8775P Add Epoch Subsystem (EPSS) L3 interconnect provider binding on SA8775P SoCs. The L3 instance on the SA8775P SoC is similar to those on SoCs like SM8250 and SC7280. These SoCs use the PERF register instead of L3_REG for programming the performance level, which is managed in the data associated with the target-specific compatibles. Since the hardware remains the same across all EPSS-supporting SoCs, the generic compatible is retained for all SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Raviteja Laggyshetty Link: https://lore.kernel.org/r/20250415095343.32125-2-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov commit e12b34c57122f93ec60bddd09010c0c9cbcec9b8 Merge: fec450ca15af63 b60301774a8fe6 Author: Thomas Zimmermann Date: Tue Apr 15 13:12:02 2025 +0200 Merge drm/drm-next into drm-misc-next Backmerging to get fixes from v6.15-rc2 into drm-misc-next. Signed-off-by: Thomas Zimmermann commit fec450ca15af63649e219060f37a8ec673333726 Author: Dmitry Baryshkov Date: Tue Apr 8 16:54:25 2025 +0300 drm/display: hdmi: provide central data authority for ACR params HDMI standard defines recommended N and CTS values for Audio Clock Regeneration. Currently each driver implements those, frequently in somewhat unique way. Provide a generic helper for getting those values to be used by the HDMI drivers. The helper is added to drm_hdmi_helper.c rather than drm_hdmi_audio.c since HDMI drivers can be using this helper function even without switching to DRM HDMI Audio helpers. Note: currently this only handles the values per HDMI 1.4b Section 7.2 and HDMI 2.0 Section 9.2.1. Later the table can be expanded to accommodate for Deep Color TMDS char rates per HDMI 1.4 Appendix D and/or HDMI 2.0 / 2.1 Appendix C). Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/20250408-drm-hdmi-acr-v2-1-dee7298ab1af@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 03a3617f92c2a7220af20d5b6b44420049dbe6e3 Author: Joanne Koong Date: Thu Feb 20 12:16:59 2025 -0800 fuse: use boolean bit-fields in struct fuse_copy_state Refactor struct fuse_copy_state to use boolean bit-fields to improve clarity/readability and be consistent with other fuse structs that use bit-fields for boolean state (eg fuse_fs_context, fuse_args). No functional changes. Signed-off-by: Joanne Koong Signed-off-by: Miklos Szeredi commit a5c4983bb90759c95d81f0d7b02000578077b1e6 Author: Joanne Koong Date: Thu Feb 20 12:16:58 2025 -0800 fuse: Convert 'write' to a bit-field in struct fuse_copy_state Use a bitfield for 'write' in struct fuse_copy_state. No functional changes. Signed-off-by: Joanne Koong Signed-off-by: Miklos Szeredi commit 2396356a945bb022aff02656f59c2a45d457043f Author: Luis Henriques Date: Wed Feb 26 09:14:51 2025 +0000 fuse: add more control over cache invalidation behaviour Currently userspace is able to notify the kernel to invalidate the cache for an inode. This means that, if all the inodes in a filesystem need to be invalidated, then userspace needs to iterate through all of them and do this kernel notification separately. This patch adds the concept of 'epoch': each fuse connection will have the current epoch initialized and every new dentry will have it's d_time set to the current epoch value. A new operation will then allow userspace to increment the epoch value. Every time a dentry is d_revalidate()'ed, it's epoch is compared with the current connection epoch and invalidated if it's value is different. Signed-off-by: Luis Henriques Tested-by: Laura Promberger Signed-off-by: Miklos Szeredi commit 4c2e0b00b51f2e4647d3285910ed28ab703dab1a Merge: 0f2be57686c7e6 88c810f35ed543 Author: Paolo Abeni Date: Tue Apr 15 12:10:22 2025 +0200 Merge branch 'net-dsa-mt7530-modernize-mib-handling-fix' Christian Marangi says: ==================== net: dsa: mt7530: modernize MIB handling + fix This small series modernize MIB handling for MT7530 and also implement .get_stats64. It was reported that kernel and Switch MIB desync in scenario where a packet is forwarded from a port to another. In such case, the forwarding is offloaded and the kernel is not aware of the transmitted packet. To handle this, read the counter directly from Switch registers. ==================== Link: https://patch.msgid.link/20250410163022.3695-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit 88c810f35ed543dc3ddc3e4d888d89f9e8ecd7cb Author: Christian Marangi Date: Thu Apr 10 18:30:14 2025 +0200 net: dsa: mt7530: implement .get_stats64 It was reported that the internally calculated counter might differ from the real one from the Switch MIB. This can happen if the switch directly forward packets between the ports or offload small packets like ARP request. In such case, the kernel counter will desync compared to the real one transmitted and received by the Switch. To correctly provide the real info to the kernel, implement .get_stats64 that will directly read the current MIB counter from the switch register. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-7-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit c3b904c6dd814507c70c2c5c24b3ba359ff41d0a Author: Christian Marangi Date: Thu Apr 10 18:30:13 2025 +0200 net: dsa: mt7530: move remaining MIB counter to define For consistency with the other MIB counter, move also the remaining MIB counter to define and update the custom MIB table. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-6-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit dcf9eb6d33a2b030d96ab935a9e9f06715a951db Author: Christian Marangi Date: Thu Apr 10 18:30:12 2025 +0200 net: dsa: mt7530: move pkt stats and err MIB counter to eth_mac stats API Drop custom handling of TX/RX packet stats and error MIB counter and handle them in the standard .get_eth_mac_stats API The MIB entry are dropped from the custom MIB table and converted to a define providing only the MIB offset. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-5-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit e12989ab719cea827cd2b8442f7dada4fd259481 Author: Christian Marangi Date: Thu Apr 10 18:30:11 2025 +0200 net: dsa: mt7530: move pause MIB counter to eth_ctrl stats API Drop custom handling of TX/RX pause frame MIB counter and handle them in the standard .get_eth_ctrl_stats API The MIB entry are dropped from the custom MIB table and converted to a define providing only the MIB offset. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-4-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit 33bc7af2b28122a3fc28c0cd0624d59599df97d2 Author: Christian Marangi Date: Thu Apr 10 18:30:10 2025 +0200 net: dsa: mt7530: move pkt size and rx err MIB counter to rmon stats API Drop custom handling of packet size and RX error MIB counter and handle them in the standard .get_rmon_stats API The MIB entry are dropped from the custom MIB table and converted to a define providing only the MIB offset. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-3-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit ee6a2db281a39a29087bc3aed81945f75c84fd26 Author: Christian Marangi Date: Thu Apr 10 18:30:09 2025 +0200 net: dsa: mt7530: generalize read port stats logic In preparation for migration to use of standard MIB API, generalize the read port stats logic to a dedicated function. This will permit to manually provide the offset and size of the MIB counter to directly access specific counter. Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410163022.3695-2-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit 5ea45f54c8d6ca2a95b7bd450ee9eb253310bfd3 Author: Jonas 'Sortie' Termansen Date: Fri Apr 11 16:50:21 2025 +0200 isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry This change implements the Rock Ridge TF entry LONG_FORM bit, which uses the ISO 9660 17-byte date format (up to year 9999, with 10ms precision) instead of the 7-byte date format (up to year 2155, with 1s precision). Previously the LONG_FORM bit was ignored; and isofs would entirely misinterpret the date as the wrong format, resulting in garbage timestamps on the filesystem. The Y2038 issue in iso_date() is fixed by returning a struct timespec64 instead of an int. parse_rock_ridge_inode_internal() is fixed so it does proper bounds checks of the TF entry timestamps. Signed-off-by: Jonas 'Sortie' Termansen Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250411145022.2292255-1-sortie@maxsi.org commit 0f2be57686c7e61b65158a09f0036d1be1ed5175 Merge: 24e31e4747698d f2957147ae7a17 Author: Paolo Abeni Date: Tue Apr 15 11:23:15 2025 +0200 Merge branch 'eth-fbnic-extend-hardware-stats-coverage' Mohsin Bashir says: ==================== eth: fbnic: extend hardware stats coverage This patch series extends the coverage for hardware stats reported via `ethtool -S`, queue API, and rtnl link stats. The patchset is organized as follow: - The first patch adds locking support to protect hardware stats. - The second patch provides coverage to the hardware queue stats. - The third patch covers the RX buffer related stats. - The fourth patch covers the TMI (TX MAC Interface) stats. - The last patch cover the TTI (TX TEI Interface) stats. ==================== Link: https://patch.msgid.link/20250410070859.4160768-1-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit f2957147ae7a1780217bb2f7b29f4d9ae14ef4b8 Author: Mohsin Bashir Date: Thu Apr 10 00:08:59 2025 -0700 eth: fbnic: add support for TTI HW stats Add coverage for the TX Extension (TEI) Interface (TTI) stats. We are tracking packets and control message drops because of credit exhaustion on the TX interface. Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250410070859.4160768-6-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 5f8bd2ce8269b055accc1653609186c9c3beb102 Author: Mohsin Bashir Date: Thu Apr 10 00:08:58 2025 -0700 eth: fbnic: add support for TMI stats This patch add coverage for TMI stats including PTP stats and drop stats. PTP stats include illegal requests, bad timestamp and good timestamps. The bad timestamp and illegal request counters are reported under as `error` via `ethtool -T` Both these counters are individually being reported via `ethtool -S` The good timestamp stats are being reported as `pkts` via `ethtool -T` ethtool -S eth0 | grep "ptp" ptp_illegal_req: 0 ptp_good_ts: 0 ptp_bad_ts: 0 Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250410070859.4160768-5-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 986c63a0295e498b2afb38c6e969a3e0b41455d6 Author: Mohsin Bashir Date: Thu Apr 10 00:08:57 2025 -0700 eth: fbnic: add coverage for RXB stats This patch provides coverage to the RXB (RX Buffer) stats. RXB stats are divided into 3 sections: RXB enqueue, RXB FIFO, and RXB dequeue stats. The RXB enqueue/dequeue stats are indexed from 0-3 and cater for the input/output counters whereas, the RXB fifo stats are indexed from 0-7. The RXB also supports pause frame stats counters which we are leaving for a later patch. ethtool -S eth0 | grep rxb rxb_integrity_err0: 0 rxb_mac_err0: 0 rxb_parser_err0: 0 rxb_frm_err0: 0 rxb_drbo0_frames: 1433543 rxb_drbo0_bytes: 775949081 --- --- rxb_intf3_frames: 1195711 rxb_intf3_bytes: 739650210 rxb_pbuf3_frames: 1195711 rxb_pbuf3_bytes: 765948092 Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250410070859.4160768-4-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 8f20a2bfa4b7a2ddfd4890ca220012cbe263c97f Author: Mohsin Bashir Date: Thu Apr 10 00:08:56 2025 -0700 eth: fbnic: add coverage for hw queue stats This patch provides support for hardware queue stats and covers packet errors for RX-DMA engine, RCQ drops and BDQ drops. The packet errors are also aggregated with the `rx_errors` stats in the `rtnl_link_stats` as well as with the `hw_drops` in the queue API. The RCQ and BDQ drops are aggregated with `rx_over_errors` in the `rtnl_link_stats` as well as with the `hw_drop_overruns` in the queue API. ethtool -S eth0 | grep -E 'rde' rde_0_pkt_err: 0 rde_0_pkt_cq_drop: 0 rde_0_pkt_bdq_drop: 0 --- --- rde_127_pkt_err: 0 rde_127_pkt_cq_drop: 0 rde_127_pkt_bdq_drop: 0 Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250410070859.4160768-3-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 9f61eb2d185b06d49ef8c25af994d6fc571433cc Author: Mohsin Bashir Date: Thu Apr 10 00:08:55 2025 -0700 eth: fbnic: add locking support for hw stats This patch adds lock protection for the hardware statistics for fbnic. The hardware statistics access via ndo_get_stats64 is not protected by the rtnl_lock(). Since these stats can be accessed from different places in the code such as service task, ethtool, Q-API, and net_device_ops, a lock-less approach can lead to races. Note that this patch is not a fix rather, just a prep for the subsequent changes in this series. Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250410070859.4160768-2-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni commit 24e31e4747698dc50d408f0082d7eb9b9520d2f6 Author: Chris Packham Date: Thu Apr 10 11:15:54 2025 +1200 net: mdio: Add RTL9300 MDIO driver Add a driver for the MDIO controller on the RTL9300 family of Ethernet switches with integrated SoC. There are 4 physical SMI interfaces on the RTL9300 however access is done using the switch ports. The driver takes the MDIO bus hierarchy from the DTS and uses this to configure the switch ports so they are associated with the correct PHY. This mapping is also used when dealing with software requests from phylib. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250409231554.3943115-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Paolo Abeni commit faa794dd2e17e74cc0c8fdb6742dfb6ca3c182d0 Author: Dave Hansen Date: Wed Jan 29 10:17:56 2025 -0800 fuse: Move prefaulting out of hot write path Prefaulting the write source buffer incurs an extra userspace access in the common fast path. Make fuse_fill_write_pages() consistent with generic_perform_write(): only touch userspace an extra time when copy_folio_from_iter_atomic() has failed to make progress. Signed-off-by: Dave Hansen Signed-off-by: Miklos Szeredi commit 406331afe89923ea8074ceb8a8b83372154958cd Merge: 0af2f6be1b4281 d1253c677b8fee Author: Christian Brauner Date: Tue Apr 15 10:30:54 2025 +0200 Merge patch series "Documentation: iomap: Add missing flags description" Add missing flag descriptions to documentation. * patches from https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com: iomap: trace: Add missing flags to [IOMAP_|IOMAP_F_]FLAGS_STRINGS Documentation: iomap: Add missing flags description Link: https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com Signed-off-by: Christian Brauner commit d1253c677b8feebd5b1e8168dde595ab04656ea0 Author: Ritesh Harjani (IBM) Date: Sat Apr 12 10:06:35 2025 +0530 iomap: trace: Add missing flags to [IOMAP_|IOMAP_F_]FLAGS_STRINGS This adds missing iomap flags to IOMAP_FLAGS_STRINGS & IOMAP_F_FLAGS_STRINGS for tracing. While we are at it, let's also print values of iomap->type & iomap->flags. e.g. trace for ATOMIC_BIO flag set xfs_io-1203 [000] ..... 183.001559: iomap_iter_dstmap: dev 8:32 ino 0xc bdev 8:32 addr 0x84200000 offset 0x0 length 0x10000 type MAPPED (0x2) flags DIRTY|ATOMIC_BIO (0x102) e.g. trace with DONTCACHE flag set xfs_io-1110 [007] ..... 238.780532: iomap_iter: dev 8:16 ino 0x83 pos 0x1000 length 0x1000 status 0 flags WRITE|DONTCACHE (0x401) ops xfs_buffered_write_iomap_ops caller iomap_file_buffered_write+0xab/0x0 Reviewed-by: "Darrick J. Wong" Signed-off-by: "Ritesh Harjani (IBM)" Link: https://lore.kernel.org/dcaff476004805544b6ad6d54d0c4adee1f7184f.1744432270.git.ritesh.list@gmail.com Reviewed-by: Ojaswin Mujoo Signed-off-by: Christian Brauner commit 336bac5e0892d0a24b55e7569981e641b23aef9a Author: Ritesh Harjani (IBM) Date: Sat Apr 12 10:06:34 2025 +0530 Documentation: iomap: Add missing flags description Let's document the use of these flags in iomap design doc where other flags are defined too - - IOMAP_F_BOUNDARY was added by XFS to prevent merging of I/O and I/O completions across RTG boundaries. - IOMAP_F_ATOMIC_BIO was added for supporting atomic I/O operations for filesystems to inform the iomap that it needs HW-offload based mechanism for torn-write protection. While we are at it, let's also fix the description of IOMAP_F_PRIVATE flag after a recent: commit 923936efeb74b3 ("iomap: Fix conflicting values of iomap flags") Signed-off-by: "Ritesh Harjani (IBM)" Link: https://lore.kernel.org/8d8534a704c4f162f347a84830710db32a927b2e.1744432270.git.ritesh.list@gmail.com Reviewed-by: "Darrick J. Wong" Signed-off-by: Christian Brauner commit b883eb49ec48cc736189788aed518de30ba766b0 Author: Krzysztof Kozlowski Date: Fri Apr 4 13:57:19 2025 +0200 pinctrl: uniphier: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20250404115719.309999-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 10dca7cdd431b9fe35f28ea43a7137e2f7aa6d6e Author: Krzysztof Kozlowski Date: Fri Apr 4 13:57:18 2025 +0200 pinctrl: meson: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Restrict the default to ARCH also for individual drivers, even though their choice is not visible without selecting parent Kconfig symbol, because otherwise selecting parent would select the child during compile testing. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20250404115719.309999-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 0e96a9b9470647fd5165ec0f971cd30f6d0fd9dc Author: Khaled Almahallawy Date: Wed Apr 9 16:02:14 2025 -0700 drm/i915/display: Add link rate and lane count to i915_display_info Adding link rate and lane count information to i915_display_info makes it easier and faster to access this data compared to checking kernel logs. This is particularly beneficial for individuals who are not familiar with i915 in the following scenarios: * Debugging DP tunnel bandwidth usage in the Thunderbolt driver. * During USB4 certification, it is necessary to know the link rate used by the monitor to prove that the DP tunnel can handle required rates. * In PHY CTS, when the connector probes are not mounted correctly, some display lanes may not appear in the DP Oscilloscope, leading to CTS failures. This change provides validation teams with an easy way to identify and troubleshoot issues. v2: separate seq_printf line (Jani) v3: separate output line (Jani) Cc: Imre Deak Cc: Jani Nikula Signed-off-by: Khaled Almahallawy Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/20250409230214.963999-1-khaled.almahallawy@intel.com Signed-off-by: Jani Nikula commit c6419e4f2ae22bf1404ac39e88c9bf0de8767874 Author: Macpaul Lin Date: Wed Sep 25 16:05:15 2024 +0800 arm64: dts: mediatek: mt8195: Add power domain for dp_intf0 During inspecting dtbs_check errors, we found the power domain setting of DPI node "dp_intf0" is missing. Add power domain setting to "MT8195_POWER_DOMAIN_VDOSYS0" for "dp_intf0" Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Tommy Chen Signed-off-by: Macpaul Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240925080515.16377-1-macpaul.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 434ad6905adba70e9fa529155653bbb41886c1a3 Author: John Madieu Date: Sat Mar 29 18:15:06 2025 +0000 pinctrl: apple: Make regmap_config static const and fix indentation Mark the regmap_config as static const since it is only used in this file and never modified, allowing the compiler to optimize it and enforce const-correctness. Also fix minor indentation inconsistencies in function parameter alignment to conform with kernel coding style. Signed-off-by: John Madieu Link: https://lore.kernel.org/20250329181506.890043-1-john.madieu@labcsmart.com Signed-off-by: Linus Walleij commit 86dee87f4b2e6ac119b03810e58723d0b27787a4 Author: Hao Chang Date: Sat Mar 29 10:40:29 2025 +0800 pinctrl: mediatek: Fix the invalid conditions The variable count_reg_names is defined as an int type and cannot be directly compared to an unsigned int. To resolve this issue, first verify the correctness of count_reg_names. Link: https://lore.kernel.org/all/5ae93d42e4c4e70fb33bf35dcc37caebf324c8d3.camel@mediatek.com/T/ Signed-off-by: Hao Chang Signed-off-by: Qingliang Li Link: https://lore.kernel.org/20250329024533.5279-1-ot_chhao.chang@mediatek.com Signed-off-by: Linus Walleij commit f8cc87024d1a1261f71dd2413951b87875b3422f Author: Chen-Yu Tsai Date: Wed Apr 9 17:38:13 2025 +0800 drm/bridge: anx7625: Use devm_pm_runtime_enable() The anx7625 driver is open coding what devm_pm_runtime_enable() does. Switch to the common helper instead. Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250409093814.3977025-1-wenst@chromium.org Signed-off-by: Chen-Yu Tsai commit 136fa80169c63130d5ce3c24ab8045c59e684e4f Author: Xianwei Zhao Date: Thu Apr 3 16:33:14 2025 +0800 dt-bindings: pinctl: amlogic,pinctrl-a4: Add compatible string for A5 Amlogic A5 SoCs uses the same pintrl controller as A4 SoCs. There is no need for an extra compatible line in the driver, but add A5 compatible line for documentation. Acked-by: Conor Dooley Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/20250403-a5-pinctrl-v3-1-a8c067e22295@amlogic.com Signed-off-by: Linus Walleij commit f0935480253ede5405045a4e733f4476343cbb91 Author: AngeloGioacchino Del Regno Date: Wed Dec 18 11:53:20 2024 +0100 arm64: dts: mediatek: mt8188: Add all Multimedia Data Path 3 nodes Add all of the Multimedia Data Path 3 (MDP3) related nodes including its Mutex instances, one for each VPPSYS block, and all of its DMA controllers, Film Grain (FG), HDR, Adaptive Ambient Light (AAL), Frame Resizer (RSZ), Tone Curve Conversion (TCC), Two-Dimensional Sharpness (TDSHP), and others, enabling the entire MDP3 macro-block. Link: https://lore.kernel.org/r/20241218105320.38980-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit cfb00dfa1b778a8037faf6973cca226e5ad4f45a Author: AngeloGioacchino Del Regno Date: Wed Dec 18 11:53:19 2024 +0100 dt-bindings: media: mediatek: mdp3: Add compatibles for MT8188 MDP3 Add compatible strings for the FG, HDR, RSZ, STITCH, TCC, TDSHP and WROT hardware components found in MediaTek's MT8188 SoC. This hardware is compatible with MT8195. Acked-by: Nicolas Dufresne Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20241218105320.38980-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 2971de063fa56c18b2720ab19bdebca23cd96471 Author: AngeloGioacchino Del Regno Date: Wed Dec 18 11:53:18 2024 +0100 dt-bindings: display: mediatek: Add compatibles for MT8188 MDP3 Add compatible strings for the AAL, COLOR, MERGE and PADDING hardware components found in MediaTek's MT8188 SoC. This hardware is compatible with MT8195. Acked-by: Nicolas Dufresne Acked-by: Chun-Kuang Hu Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20241218105320.38980-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 1938be9fbad1bd87a1dcd9c3ca88e454565f0609 Author: Charles Han Date: Tue Mar 25 17:49:32 2025 +0800 pinctrl: qcom: tlmm-test: Fix potential null dereference in tlmm kunit test kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for grp. Fixes: c7984dc0a2b9 ("pinctrl: qcom: Add test case for TLMM interrupt handling") Signed-off-by: Charles Han Link: https://lore.kernel.org/20250325094932.4733-1-hanchunchao@inspur.com Signed-off-by: Linus Walleij commit 3ede3f8b4b4b399b0ca41e44959f80d5cf84fc98 Author: Mike Looijmans Date: Fri Mar 14 16:17:45 2025 +0100 pinctrl: mcp23s08: Reset all pins to input at probe At startup, the driver just assumes that all registers have their default values. But after a soft reset, the chip will just be in the state it was, and some pins may have been configured as outputs. Any modification of the output register will cause these pins to be driven low, which leads to unexpected/unwanted effects. To prevent this from happening, set the chip's IO configuration register to a known safe mode (all inputs) before toggling any other bits. Signed-off-by: Mike Looijmans Link: https://lore.kernel.org/20250314151803.28903-1-mike.looijmans@topic.nl Signed-off-by: Linus Walleij commit 74c35c84f2ba942e7a7744658a8257d0b3188ac2 Author: Biju Das Date: Tue Apr 1 15:35:23 2025 +0100 memory: renesas-rpc-if: Move rpcif_info definitions near to the user Move rpcif_info definitions near to the user. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250401143537.224047-6-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit bf657e234ac12923b579b13d8b9f1b5ca0519697 Author: Biju Das Date: Tue Apr 1 15:35:20 2025 +0100 memory: renesas-rpc-if: Fix RPCIF_DRENR_CDB macro error Fix the below macro error found while moving the reg definitions to renesas-rpc-if-regs.h in the later patch. ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20250401143537.224047-3-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit bd4f5f6c84d074d9347b55731891729f136d35c8 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:39:58 2025 +0200 memory: mtk-smi: Add support for Dimensity 1200 MT6893 SMI Add the necessary platform data to enable support for the SMI found on the MediaTek Dimensity 1200 (MT6893) SoC Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/20250410143958.475846-3-angelogioacchino.delregno@collabora.com Signed-off-by: Krzysztof Kozlowski commit 98a4109320f9b7007475a9d6706d3434cd8aafb4 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:39:57 2025 +0200 dt-bindings: memory: mtk-smi: Add support for MT6893 Add support for the Smart Multimedia Interface's Common and Local Arbiter HW as found in the MediaTek Dimensity 1200 (MT6893) SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250410143958.475846-2-angelogioacchino.delregno@collabora.com Signed-off-by: Krzysztof Kozlowski commit da9b1c61e7f7b327dd70c5f073ba04d419a55ef8 Author: Ankit Nautiyal Date: Mon Apr 14 08:12:56 2025 +0530 drm/i915/dp: Check for HAS_DSC_3ENGINES while configuring DSC slices DSC 12 slices configuration is used for some specific cases with Ultrajoiner. This can be supported only when each of the 4 joined pipes have 3 DSC engines each. Add the missing check for 3 DSC engines support before using 3 DSC slices per pipe. Fixes: be7f5fcdf4a0 ("drm/i915/dp: Enable 3 DSC engines for 12 slices") Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: # v6.14+ Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250414024256.2782702-3-ankit.k.nautiyal@intel.com commit 6998cfce0e1db58c730d08cadc6bfd71e26e2de0 Author: Ankit Nautiyal Date: Mon Apr 14 14:27:01 2025 +0530 drm/i915/display: Add macro for checking 3 DSC engines 3 DSC engines per pipe is currently supported only for BMG. Add a macro to check whether a platform supports 3 DSC engines per pipe. v2:Fix Typo in macro argument. (Suraj). Added fixes tag. Bspec: 50175 Fixes: be7f5fcdf4a0 ("drm/i915/dp: Enable 3 DSC engines for 12 slices") Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: # v6.14+ Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/20250414085701.2802374-1-ankit.k.nautiyal@intel.com commit 9a4199ae8a041bf75b544c1f46a2ea95417b69de Author: Krzysztof Kozlowski Date: Fri Apr 4 13:17:03 2025 +0200 memory: tegra: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Link: https://lore.kernel.org/r/20250404111703.235455-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0c16b8fdfe0952ce6fb317c27dbd54e214e5ed6d Author: Krzysztof Kozlowski Date: Fri Apr 4 13:17:02 2025 +0200 memory: Simplify 'default' choice in Kconfig 'default y if FOO' can be written shorter (and it already is in other places). Link: https://lore.kernel.org/r/20250404111703.235455-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1f34b5a9f09696eaf464c6ed06a055ed9cde3425 Author: Bartosz Golaszewski Date: Mon Apr 7 09:21:20 2025 +0200 memory: omap-gpmc: remove GPIO set() and direction_output() callbacks This driver implements an input-only GPIO controller. There's no need to implement the set() and direction_output() callbacks in this case, the GPIO core will handle it. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-memory-v1-2-5ab0282a9da7@linaro.org Signed-off-by: Krzysztof Kozlowski commit a63f9903a56fabe17a0c71dd0c291499d28214c5 Author: Bartosz Golaszewski Date: Mon Apr 7 09:21:19 2025 +0200 memory: omap-gpmc: use the dedicated define for GPIO direction We have a constant defined for this purpose in the gpio/driver.h header so use it instead of a magic value. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-memory-v1-1-5ab0282a9da7@linaro.org Signed-off-by: Krzysztof Kozlowski commit 31d3bd592df5bf2912b8d97b0652ac3f0cd335cf Author: Tzung-Bi Shih Date: Mon Apr 14 21:24:27 2025 +0800 platform/chrome: cros_kbd_led_backlight: Fix build dependencies ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module") allows CROS_EC_PROTO to be a module. The config is possible to be: - CONFIG_ACPI=y - CONFIG_CROS_EC=m - CONFIG_MFD_CROS_EC_DEV=m - CONFIG_CROS_EC_PROTO=m - CONFIG_CROS_KBD_LED_BACKLIGHT=y As a result: ld: vmlinux.o: in function `keyboard_led_set_brightness_ec_pwm': cros_kbd_led_backlight.c:(.text+0x3554e4c): undefined reference to `cros_ec_cmd_xfer_status' ld: vmlinux.o: in function `keyboard_led_get_brightness_ec_pwm': cros_kbd_led_backlight.c:(.text+0x3554f41): undefined reference to `cros_ec_cmd_xfer_status' The built-in code in CROS_KBD_LED_BACKLIGHT can't find symbols defined in the module CROS_EC_PROTO. Let A=ACPI (bool), M=MFD_CROS_EC_DEV (tristate), and K=CROS_KBD_LED_BACKLIGHT (tristate). The possible values are: | A | M | choice for K | ------------------------ | y | y | y/m/n | | y | m | m/n | | y | n | y/m/n | | n | y | y/m/n | | n | m | m/n | | n | n | n | Fix the dependencies in the Kconfig. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u Fixes: ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module") Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20250414132427.204078-3-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih commit 9aea0edcc3e92f5c40184b96d004b4af5a8d264f Author: Tzung-Bi Shih Date: Mon Apr 14 21:24:26 2025 +0800 platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency After applying 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight: Remove OF match"), cros_kbd_led_backlight no longer depends on CROS_EC directly. Remove the redundant dependency. Fixes: 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight: Remove OF match") Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20250414132427.204078-2-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih commit ae33b874fc81bfb60bdda5a350c0635f98e6d747 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:28 2025 -0500 ARM: dts: qcom: sdx55/sdx65: Fix CPU power-domain-names "rpmhpd" is not documented nor used anywhere. The power-domain is used for performance scaling (cpufreq), so "perf" is the correct name to use. Signed-off-by: Rob Herring (Arm) Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-7-63d7dc9ddd0a@kernel.org Signed-off-by: Bjorn Andersson commit b8e10d2f5afb89957a1b45052ae3b8b061209690 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:27 2025 -0500 arm64: dts: qcom: msm8992-lg-h815: Fix CPU node "enable-method" property dependencies The "spin-table" enable-method requires "cpu-release-addr" property, so add a dummy entry. It is assumed the bootloader will fill in the correct values. Signed-off-by: Rob Herring (Arm) Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-6-63d7dc9ddd0a@kernel.org Signed-off-by: Bjorn Andersson commit 9100b9063767c8ee6906ed4dc18d1a8b1e7e7dd2 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:26 2025 -0500 arm64: dts: qcom: msm8939: Fix CPU node "enable-method" property dependencies The "spin-table" enable-method requires "cpu-release-addr" property, so add a dummy entry. It is assumed the bootloader will fill in the correct values. Signed-off-by: Rob Herring (Arm) Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-5-63d7dc9ddd0a@kernel.org Signed-off-by: Bjorn Andersson commit 738dde31b5dca9c2be9a4639adcd34fb9fb5d019 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:25 2025 -0500 arm64: dts: qcom: qdu1000: Fix qcom,freq-domain The correct property name is 'qcom,freq-domain', not 'qcom,freq-domains'. Signed-off-by: Rob Herring (Arm) Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250410-dt-cpu-schema-v2-4-63d7dc9ddd0a@kernel.org Signed-off-by: Bjorn Andersson commit e8acfc1bbcda6978d952d0c18b0b5cebd6dcc3cf Author: Luca Weiss Date: Fri Apr 11 10:33:29 2025 +0200 arm64: dts: qcom: Remove unnecessary MM_[UD]L audio routes Since commit 6fd8d2d275f7 ("ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai") from over 4 years ago the audio routes beween MM_DL* + MultiMedia* Playback and MultiMedia* Capture + MM_UL* are not necessary anymore and can be removed from the dts files. It also helps to stop anyone copying these into new dts files. Signed-off-by: Luca Weiss Reviewed-by: Stephan Gerhold Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20250411-cleanup-mm-routes-v1-1-ba98f653aa69@fairphone.com Signed-off-by: Bjorn Andersson commit 337921764e31907ea46df02c1d8dd1ae8f2802f5 Author: Aleksandrs Vinarskis Date: Sat Apr 12 14:49:18 2025 +0200 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: enable MICs LDO Particular device comes without headset combo jack, hence does not feature wcd codec IC. In such cases, DMICs are powered from vreg_l1b. Describe all 4 microphones in the audio routing. vdd-micb is defined for lpass-macro already. Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250412124956.20562-1-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 0d5da04d23c3b398595727a274887cb8ff1c06a3 Author: Russell King (Oracle) Date: Sat Apr 12 15:22:40 2025 +0100 arm64: dts: qcom: remove max-speed = 1G for RGMII for ethernet The RGMII interface is designed for speeds up to 1G. Phylink already imposes the design limits for MII interfaces, and additional specification is unnecessary. Therefore, we can remove this property without any effect. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1u3bkm-000Epw-QU@rmk-PC.armlinux.org.uk Signed-off-by: Bjorn Andersson commit 2bae46e3de2a64fe3a619d61b16da0c01b8df2a1 Author: Michal Wilczynski Date: Wed Feb 19 15:02:37 2025 +0100 riscv: dts: thead: Introduce power domain nodes with aon firmware The DRM Imagination GPU requires a power-domain driver. In the T-HEAD TH1520 SoC implements power management capabilities through the E902 core, which can be communicated with through the mailbox, using firmware protocol. Add AON node, which servers as a power-domain controller. Signed-off-by: Michal Wilczynski Reviewed-by: Drew Fustini Signed-off-by: Drew Fustini commit 23f09f01b495cc510a19b30b6093fb4cb0284aaf Merge: 5b38e821b929c2 0d1c18a10dd16d Author: Jakub Kicinski Date: Mon Apr 14 17:44:48 2025 -0700 Merge branch 'net-stmmac-qcom-ethqos-simplifications' Russell King says: ==================== net: stmmac: qcom-ethqos: simplifications Remove unnecessary code from the qcom-ethqos glue driver. Start by consistently using -> serdes_speed to set the speed of the serdes PHY rather than sometimes using ->serdes_speed and sometimes using ->speed. This then allows the removal of ->speed in the second patch. There is no need to set the maximum speed just because we're using 2500BASE-X - phylink already knows that 2500BASE-X can't support faster speeds. This then makes qcom_ethqos_speed_mode_2500() redundant as it's setting the interface mode to the value that was determined in the switch statement that already determined that the interface mode had this value. Not tested on hardware. ==================== Link: https://patch.msgid.link/Z_p0LzY2_HFupWK0@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 0d1c18a10dd16d256100005f22e875cd741a35fb Author: Russell King (Oracle) Date: Sat Apr 12 15:10:04 2025 +0100 net: stmmac: qcom-ethqos: remove speed_mode_2500() method qcom-ethqos doesn't need to implement the speed_mode_2500() method as it is only setting priv->plat->phy_interface to 2500BASE-X, which is already a pre-condition for assigning speed_mode_2500 in qcom_ethqos_probe(). So, qcom_ethqos_speed_mode_2500() has no effect. Remove it. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u3bYa-000EcW-H1@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 4c30093f784e6b098da34165408b00c1810ef9ab Author: Russell King (Oracle) Date: Sat Apr 12 15:09:59 2025 +0100 net: stmmac: qcom-ethqos: remove unnecessary setting max_speed Phylink will already limit the MAC speed according to the interface, so if 2500BASE-X is selected, the maximum speed will be 2.5G. It is, therefore, not necessary to set a speed limit. Remove setting plat_dat->max_speed from this glue driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u3bYV-000EcQ-Cv@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a3d54648ada2088c34a429ad16a39fb6c4a983f3 Author: Russell King (Oracle) Date: Sat Apr 12 15:09:54 2025 +0100 net: stmmac: qcom-ethqos: remove ethqos->speed Rather than ethqos_fix_mac_speed() storing the speed in struct qcom_ethqos and then functions that are only called from here reading that speed, pass the speed to the called functions instead. This removes all readers of this struct member, which then allows the removal of the two places that set its value and the struct member. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u3bYQ-000EcK-9K@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit b4589810082a6e138f61f359757cb6a6790bc09c Author: Russell King (Oracle) Date: Sat Apr 12 15:09:49 2025 +0100 net: stmmac: qcom-ethqos: set serdes speed using serdes_speed ethqos->serdes_speed represents the current speed the serdes was configured for, which should be the same as ethqos->speed. Since we wish to remove ethqos->speed to simplify the code, switch to using the serdes_speed instead. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u3bYL-000EcE-5c@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5b38e821b929c23a3b7bfa2705cc7b0e76a3ee7b Merge: a4cba7e98e35e6 aa2199088a3996 Author: Jakub Kicinski Date: Mon Apr 14 17:36:44 2025 -0700 Merge branch 'rxrpc-afs-add-afs-gssapi-security-class-to-af_rxrpc-and-kafs' David Howells says: ==================== rxrpc, afs: Add AFS GSSAPI security class to AF_RXRPC and kafs Here's a set of patches to add basic support for the AFS GSSAPI security class to AF_RXRPC and kafs. It provides transport security for keys that match the security index 6 (YFS) for connections to the AFS fileserver and VL server. Note that security index 4 (OpenAFS) can also be supported using this, but it needs more work as it's slightly different. The patches also provide the ability to secure the callback channel - connections from the fileserver back to the client that are used to pass file change notifications, amongst other things. When challenged by the fileserver, kafs will generate a token specific to that server and include it in the RESPONSE packet as the appdata. The server then extracts this and uses it to send callback RPC calls back to the client. It can also be used to provide transport security on the callback channel, but a further set of patches is required to provide the token and key to set that up when the client responds to the fileserver's challenge. This makes use of the previously added crypto-krb5 library that is now upstream (last commit fc0cf10c04f4). This series of patches consist of the following parts: (0) Update kdoc comments to remove some kdoc builder warnings. (1) Push reponding to CHALLENGE packets over to recvmsg() or the kernel equivalent so that the application layer can include user-defined information in the RESPONSE packet. In a follow-up patch set, this will allow the callback channel to be secured by the AFS filesystem. (2) Add the AF_RXRPC RxGK security class that uses a key obtained from the AFS GSS security service to do Kerberos 5-based encryption instead of pcbc(fcrypt) and pcbc(des). (3) Add support for callback channel encryption in kafs. (4) Provide the test rxperf server module with some fixed krb5 keys. ==================== Link: https://patch.msgid.link/20250411095303.2316168-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit aa2199088a39962f30d967c667b59ba5075e77d6 Author: David Howells Date: Fri Apr 11 10:52:59 2025 +0100 rxrpc: rxperf: Add test RxGK server keys Add RxGK server keys of bytes containing { 0, 1, 2, 3, 4, ... } to the server keyring for the rxperf test server. This allows the rxperf test client to connect to it. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-15-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit fba6995798c6085a0c2fc67e0cacd489a6971044 Author: David Howells Date: Fri Apr 11 10:52:58 2025 +0100 rxrpc: Add more CHALLENGE/RESPONSE packet tracing Add more tracing for CHALLENGE and RESPONSE packets. Currently, rxrpc only has client-relevant tracepoints (rx_challenge and tx_response), but add the server-side ones too. Further, record the service ID in the rx_challenge tracepoint as well. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-14-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit d98c317fd9aa78dfa45e47deb6536cd35783afd1 Author: David Howells Date: Fri Apr 11 10:52:57 2025 +0100 afs: Use rxgk RESPONSE to pass token for callback channel Implement in kafs the hook for adding appdata into a RESPONSE packet generated in response to an RxGK CHALLENGE packet, and include the key for securing the callback channel so that notifications from the fileserver get encrypted. This will be necessary when more complex notifications are used that convey changed data around. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-13-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit d03539d5c2dec9b028297c15e57bd3c01d0d9c0d Author: David Howells Date: Fri Apr 11 10:52:56 2025 +0100 rxrpc: Display security params in the afs_cb_call tracepoint Make the afs_cb_call tracepoint display some security parameters to make debugging easier. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-12-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit b794dc17cdd0517edb377edf863c2dc1f2dec781 Author: David Howells Date: Fri Apr 11 10:52:55 2025 +0100 rxrpc: Allow the app to store private data on peer structs Provide a way for the application (e.g. the afs filesystem) to store private data on the rxrpc_peer structs for later retrieval via the call object. This will allow afs to store a pointer to the afs_server object on the rxrpc_peer struct, thereby obviating the need for afs to keep lookup tables by which it can associate an incoming call with server that transmitted it. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-11-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 7a7513a3081c6a2729d8570c77bbed1978277dc9 Author: David Howells Date: Fri Apr 11 10:52:54 2025 +0100 rxrpc: rxgk: Implement connection rekeying Implement rekeying of connections with the RxGK security class. This involves regenerating the keys with a different key number as part of the input data after a certain amount of time or a certain amount of bytes encrypted. Rekeying may be triggered by either end. The LSW of the key number is inserted into the security-specific field in the RX header, and we try and expand it to 32-bits to make it last longer. Signed-off-by: David Howells cc: Marc Dionne cc: Herbert Xu cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-10-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 9d1d2b59341f58126a69b51f9f5f8ccb9f12e54a Author: David Howells Date: Fri Apr 11 10:52:53 2025 +0100 rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI) Implement the basic parts of the yfs-rxgk security class (security index 6) to support GSSAPI-negotiated security. Signed-off-by: David Howells cc: Marc Dionne cc: Herbert Xu cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-9-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit c86f9b963dc606ce884edfcb6724778bd1471ace Author: David Howells Date: Fri Apr 11 10:52:52 2025 +0100 rxrpc: rxgk: Provide infrastructure and key derivation Provide some infrastructure for implementing the RxGK transport security class: (1) A definition of an encoding type, including: - Relevant crypto-layer names - Lengths of the crypto keys and checksums involved - Crypto functions specific to the encoding type - Crypto scheme used for that type (2) A definition of a crypto scheme, including: - Underlying crypto handlers - The pseudo-random function, PRF, used in base key derivation - Functions for deriving usage keys Kc, Ke and Ki - Functions for en/decrypting parts of an sk_buff (3) A key context, with the usage keys required for a derivative of a transport key for a specific key number. This includes keys for securing packets for transmission, extracting received packets and dealing with response packets. (3) A function to look up an encoding type by number. (4) A function to set up a key context and derive the keys. (5) A function to set up the keys required to extract the ticket obtained from the GSS negotiation in the server. (6) Miscellaneous functions for context handling. The keys and key derivation functions are described in: tools.ietf.org/html/draft-wilkinson-afs3-rxgk-11 Signed-off-by: David Howells cc: Marc Dionne cc: Herbert Xu cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-8-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6 Author: David Howells Date: Fri Apr 11 10:52:51 2025 +0100 rxrpc: Add YFS RxGK (GSSAPI) security class Add support for the YFS-variant RxGK security class to support GSSAPI-derived authentication. This also allows the use of better crypto over the rxkad security class. The key payload is XDR encoded of the form: typedef int64_t opr_time; const AFSTOKEN_RK_TIX_MAX = 12000; /* Matches entry in rxkad.h */ struct token_rxkad { afs_int32 viceid; afs_int32 kvno; afs_int64 key; afs_int32 begintime; afs_int32 endtime; afs_int32 primary_flag; opaque ticket; }; struct token_rxgk { opr_time begintime; opr_time endtime; afs_int64 level; afs_int64 lifetime; afs_int64 bytelife; afs_int64 enctype; opaque key<>; opaque ticket<>; }; const AFSTOKEN_UNION_NOAUTH = 0; const AFSTOKEN_UNION_KAD = 2; const AFSTOKEN_UNION_YFSGK = 6; union ktc_tokenUnion switch (afs_int32 type) { case AFSTOKEN_UNION_KAD: token_rxkad kad; case AFSTOKEN_UNION_YFSGK: token_rxgk gk; }; const AFSTOKEN_LENGTH_MAX = 16384; typedef opaque token_opaque; const AFSTOKEN_MAX = 8; const AFSTOKEN_CELL_MAX = 64; struct ktc_setTokenData { afs_int32 flags; string cell; token_opaque tokens; }; The parser for the basic token struct is already present, as is the rxkad token type. This adds a parser for the rxgk token type. Signed-off-by: David Howells cc: Marc Dionne cc: Herbert Xu cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-7-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 01af64269751f261421a9e80a527c8e987aeda8d Author: David Howells Date: Fri Apr 11 10:52:50 2025 +0100 rxrpc: Add the security index for yfs-rxgk Add the security index and abort codes for the YFS variant of rxgk. Signed-off-by: David Howells Link: https://patch.msgid.link/20250411095303.2316168-6-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 5800b1cf3fd8ccab752a101865be1e76dac33142 Author: David Howells Date: Fri Apr 11 10:52:49 2025 +0100 rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE Allow the app to request that CHALLENGEs be passed to it through an out-of-band queue that allows recvmsg() to pick it up so that the app can add data to it with sendmsg(). This will allow the application (AFS or userspace) to interact with the process if it wants to and put values into user-defined fields. This will be used by AFS when talking to a fileserver to supply that fileserver with a crypto key by which callback RPCs can be encrypted (ie. notifications from the fileserver to the client). Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-5-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 019c8433eb2931a422376d2b0079d751aa948d4c Author: David Howells Date: Fri Apr 11 10:52:48 2025 +0100 rxrpc: Remove some socket lock acquire/release annotations Remove some socket lock acquire/release annotations as lock_sock() and release_sock() don't have them and so the checker gets confused. Removing all of them, however, causes warnings about "context imbalance" and "wrong count at exit" to occur instead. Probably lock_sock() and release_sock() should have annotations on indicating their taking of sk_lock - there is a dep_map in socket_lock_t, but I don't know if that matters to the static checker. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-4-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 23738cc8048322cf324f330cd697380fb3455da5 Author: David Howells Date: Fri Apr 11 10:52:47 2025 +0100 rxrpc: Pull out certain app callback funcs into an ops table A number of functions separately furnish an AF_RXRPC socket with callback function pointers into a kernel app (such as the AFS filesystem) that is using it. Replace most of these with an ops table for the entire socket. This makes it easier to add more callback functions. Note that the call incoming data processing callback is retaind as that gets set to different things, depending on the type of op. Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 28a79fc9b03e4ed89b65e5300091e7ed55e13192 Author: David Howells Date: Fri Apr 11 10:52:46 2025 +0100 rxrpc: kdoc: Update function descriptions and add link from rxrpc.rst Update the kerneldoc function descriptions to add "Return:" sections for AF_RXRPC exported functions that have return values to stop the kdoc builder from throwing warnings. Also add links from the rxrpc.rst API doc to add a function API reference at the end. (Note that the API doc really needs updating, but that's beyond this patchset). Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit a4cba7e98e35e618b3b4e1fce9746caad67cb308 Merge: 4129a75a76a755 3db55f8cc8d329 Author: Jakub Kicinski Date: Mon Apr 14 17:29:18 2025 -0700 Merge branch 'net-mlx5-hws-refactor-action-ste-handling' Tariq Toukan says: ==================== net/mlx5: HWS, Refactor action STE handling This patch series by Vlad refactors how action STEs are handled for hardware steering. Definitions ---------- * STE (Steering Table Entry): a building block for steering rules. Simple rules consist of a single STE that specifies both the match value and what actions to do. For more complex rules we have one or more match STEs that point to one or more action STEs. It is these action STEs which this patch series is primarily concerned with. * RTC (Rule Table Context): a table that contains STEs. A matcher currently consists of a match RTC and, if necessary, an action RTC. This patch series decouples action RTCs from matchers and moves action RTCs to a central pool. * Matcher: a logical container for steering rules. While the items above describe hardware concepts, a matcher is purely a software construct. Current situation ----------------- As mentioned above, a matcher currently consists of a match RTC (or more, in case of complex matchers) and zero or one action STCs. An action STC is only allocated if the matcher contains sufficiently complicated action templates, or many actions. When adding a rule, we decide based on its action template whether it requires action STEs. If yes, we allocate the required number of action STEs from the matcher's action STE. When updating a rule, we need to prevent the rule ever being in an invalid state. So we need to allocate and write new action STEs first, then update the match STE to point to them, and finally release the old action STEs. So there is a state when a rule needs double the action STEs it normally uses. Thus, for a given matcher of log_sz=N, log_action_ste_sz=A, the action STC log_size is (N + A + 1). We need enough space to hold all the rules' action STEs, and effectively double that space to account for the not very common case of rules being updated. We could manage with much fewer extra action STEs, but RTCs are allocated in powers of two. This results in effective utilization of action RTCs of 50%, outside rule update cases. This is further complicated when resizing matchers. To avoid updating all the rules to point to new match STEs, we keep existing action RTCs around as resize_data, and only free them when the matcher is freed. Action STE pool --------------- This patch series decouples action RTCs from matchers by creating a per-queue pool. When a rule needs to allocate action STEs it does so from the pool, creating a new RTC if needed. During update two sets of action STEs are in use, possibly from different RTCs. The pool is sharded per-queue to avoid lock contention. Each per-queue pool consists of 3 elements, corresponding to rx-only, tx-only and rx-and-tx use cases. The series takes this approach because rules that are bidirectional require that their action STEs have the same index in the rx- and tx-RTCs, and using a single RTC would result in unidirectional rules wasting the STEs for the unused direction. Pool elements, in turn, consist of a list of RTCs. The driver progressively allocates larger RTCs as they are needed to amortize the cost of allocation. Allocation of elements (STEs) inside RTCs is modelled by an existing mechanism, somewhat confusingly also known as a pool. The first few patches in the series refactor this abstraction to simplify it and adapt it to the new schema. Finally, this series implements periodic cleanup of unused action RTCs as a new feature. Previously, once a matcher allocated an action RTC, it would only be freed when the matcher is freed. This resulted in a lot of wasted memory for matchers that had previously grown, but were now mostly unused. Conversely, action STE pools have a timestamp of when they were last used. A cleanup routine periodically checks all pools. If a pool's last usage was too far in the past, it is destroyed. Benchmarks ---------- The test module creates a batch of (1 << 18) rules per queue and then deletes them, in a loop. The rules are complex enough to require two action STEs per rule. Each queue is manipulated from a separate kernel workqueue, so there is a 1:1 correspondence between threads and queues. There are sleep statements between insert and delete batches so that memory usage can be evaluated using `free -m`. The numbers below are the diff between base memory usage (without the mlx5 module inserted) and peak usage while running a test. The values are rounded to the nearest hundred megabytes. The `queues` column lists how many queues the test used. queues mem_before mem_after 1 1300M 800M 4 4000M 2300M 8 7300M 3300M Across all of the tests, insertion and deletion rates are the same before and after these patches. Summary of the patches ---------------------- * Patch 1: Fix matcher action template attach to avoid overrunning the buffer and correctly report errors. * Patches 2-7: Cleanup the existing pool abstraction. Clarify semantics, and use cases, simplify API and callers. * Patch 8: Implement the new action STE pool structure. * Patch 9: Use the action STE pool when manipulating rules. * Patch 10: Remove action RTC from matcher. * Patch 11: Add logic to periodically check and free unused action RTCs. * Patch 12: Export action STE tables in debugfs for our dump tool. ==================== Link: https://patch.msgid.link/1744312662-356571-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3db55f8cc8d329a97e06fb44347b64a0ca44e780 Author: Vlad Dogaru Date: Thu Apr 10 22:17:42 2025 +0300 net/mlx5: HWS, Export action STE tables to debugfs Introduce a new type of dump object and dump all action STE tables, along with information on their RTCs and STEs. Signed-off-by: Vlad Dogaru Reviewed-by: Hamdan Agbariya Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-13-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 864531ca2072c55ff00ba9dfd8c15cf0f576051b Author: Vlad Dogaru Date: Thu Apr 10 22:17:41 2025 +0300 net/mlx5: HWS, Free unused action STE tables Periodically check for unused action STE tables and free their associated resources. In order to do this safely, add a per-queue lock to synchronize the garbage collect work with regular operations on steering rules. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-12-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 22174f16f1218fc98e374b3653decae54aa481f8 Author: Vlad Dogaru Date: Thu Apr 10 22:17:40 2025 +0300 net/mlx5: HWS, Cleanup matcher action STE table Remove the matcher action STE implementation now that the code uses per-queue action STE pools. This also allows simplifying matcher code because it is now only handling a single type of RTC/STE. The matcher resize data is also going away. Matchers were saving old action STE data because the rules still used it, but now that data lives in the action STE pool and is no longer coupled to a matcher. Furthermore, matchers no longer need to rehash a due to action template addition. If a new action template needs more action STEs, we simply update the matcher's num_of_action_stes and future rules will allocate the correct number. Existing rules are unaffected by such an operation and can continue to use their existing action STEs. The range action was using the matcher action STE implementation, but there was no reason to do this other than the container fitting the purpose. Extract that information to a separate structure. Finally, stop dumping per-matcher information about action RTCs, because they no longer exist. A later patch in this series will add support for dumping action STE pools. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-11-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 593a9470a8565a59a07b577d6bcb3c199f232d4a Author: Vlad Dogaru Date: Thu Apr 10 22:17:39 2025 +0300 net/mlx5: HWS, Use the new action STE pool Use the central action STE pool when creating / updating rules. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-10-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 983d01b2ce0ac688bb42489f33a29a02274366d5 Author: Vlad Dogaru Date: Thu Apr 10 22:17:38 2025 +0300 net/mlx5: HWS, Implement action STE pool Implement a per-queue pool of action STEs that match STEs can link to, regardless of matcher. The code relies on hints to optimize whether a given rule is added to rx-only, tx-only or both. Correspondingly, action STEs need to be added to different RTC for ingress or egress paths. For rx-and-tx rules, the current rule implementation dictates that the offsets for a given rule must be the same in both RTCs. To avoid wasting STEs, each action STE pool element holds 3 pools: rx-only, tx-only, and rx-and-tx, corresponding to the possible values of the pool optimization enum. The implementation then chooses at rule creation / update which of these elements to allocate from. Each element holds multiple action STE tables, which wrap an RTC, an STE range, the logic to buddy-allocate offsets from the range, and an STC that allows match STEs to point to this table. When allocating offsets from an element, we iterate through available action STE tables and, if needed, create a new table. Similar to the previous implementation, this iteration does not free any resources. This is implemented in a subsequent patch. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-9-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit a68334f9750f41fc36990840090ef9dbee1e2c7e Author: Vlad Dogaru Date: Thu Apr 10 22:17:37 2025 +0300 net/mlx5: HWS, Fix pool size optimization The optimization to create a size-one STE range for the unused direction was broken. The hardware prevents us from creating RTCs over unallocated STE space, so the only reason this has worked so far is because the optimization was never used. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-8-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 04562694766514f00e7086d3d4884db5f3a22d4e Author: Vlad Dogaru Date: Thu Apr 10 22:17:36 2025 +0300 net/mlx5: HWS, Add fullness tracking to pool Future users will need to query whether a pool is empty. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-7-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 43a2038c6d8a810e8e70f0e7fcb965f431c92bfb Author: Vlad Dogaru Date: Thu Apr 10 22:17:35 2025 +0300 net/mlx5: HWS, Cleanup after pool refactoring Remove members which are now no longer used. In fact, many of the `struct mlx5hws_pool_chunk` were not even written to beyond being initialized, but they were used in various internals. Also cleanup some local variables which made more sense when the API was thicker. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-6-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d171ce3d988868bed9dc3c9eeb8428f87dd9ac85 Author: Vlad Dogaru Date: Thu Apr 10 22:17:34 2025 +0300 net/mlx5: HWS, Refactor pool implementation Refactor the pool implementation to remove unused flags and clarify its usage. A pool represents a single range of STEs or STCs which are allocated at pool creation time. Pools are used under three patterns: 1. STCs are allocated one at a time from a global pool using a bitmap based implementation. 2. Action STEs are allocated in power-of-two blocks using a buddy algorithm. 3. Match STEs do not use allocation, since insertion into these tables is based on hashes or direct addressing. In such cases we use a pool only to create the STE range. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-5-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 38956bea7349ce75c1519b57c27cd97580b4c822 Author: Vlad Dogaru Date: Thu Apr 10 22:17:33 2025 +0300 net/mlx5: HWS, Make pool single resource The pool implementation claimed to support multiple resources, but this does not really make sense in context. Callers always allocate a single STC or STE chunk of exactly the size provided. The code that handled multiple resources was unused (and likely buggy) due to the combination of flags passed by callers. Simplify the pool by having it handle a single resource. As a result of this simplification, chunks no longer contain a resource offset (there is now only one resource per pool), and the get_base_id functions no longer take a chunk parameter. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit b2ae16214ffeda3e1c25223eebe19f85b0876181 Author: Vlad Dogaru Date: Thu Apr 10 22:17:32 2025 +0300 net/mlx5: HWS, Remove unused element array Remove the array of elements wrapped in a struct because in reality only the first element was ever used. Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 36ef2575e78d1a3c699dc3f1c9dee9be742c9bdd Author: Vlad Dogaru Date: Thu Apr 10 22:17:31 2025 +0300 net/mlx5: HWS, Fix matcher action template attach The procedure of attaching an action template to an existing matcher had a few issues: 1. Attaching accidentally overran the `at` array in bwc_matcher, which would result in memory corruption. This bug wasn't triggered, but it is possible to trigger it by attaching action templates beyond the initial buffer size of 8. Fix this by converting to a dynamically sized buffer and reallocating if needed. 2. Similarly, the `at` array inside the native matcher was never reallocated. Fix this the same as above. 3. The bwc layer treated any error in action template attach as a signal that the matcher should be rehashed to account for a larger number of action STEs. In reality, there are other unrelated errors that can arise and they should be propagated upstack. Fix this by adding a `need_rehash` output parameter that's orthogonal to error codes. Fixes: 2111bb970c78 ("net/mlx5: HWS, added backward-compatible API handling") Signed-off-by: Vlad Dogaru Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1744312662-356571-2-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 4129a75a76a755c151be1ebc0e7d618a4d21e41f Author: Oleksij Rempel Date: Thu Apr 10 14:42:49 2025 +0200 net: dsa: microchip: add ETS scheduler support for KSZ88x3 switches Implement Enhanced Transmission Selection scheduler (ETS) support for KSZ88x3 devices, which support two fixed egress scheduling modes: Strict Priority and Weighted Fair Queuing (WFQ). Since the switch does not allow remapping priorities to queues or adjusting weights, this implementation only supports enabling strict priority mode. If strict mode is not explicitly requested, the switch falls back to its default WFQ mode. This patch introduces KSZ88x3-specific handlers for ETS add and delete operations and uses TXQ Split Control registers to toggle the WFQ enable bit per queue. Corresponding macros are also added for register access. Signed-off-by: Oleksij Rempel Link: https://patch.msgid.link/20250410124249.2728568-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit b8ebc89383963fc8084e1914f30a4271429f9b36 Merge: 505b930929db65 25af74ed68c4e3 Author: Jakub Kicinski Date: Mon Apr 14 17:12:44 2025 -0700 Merge branch 'net-stmmac-remove-unnecessary-initialisation-of-1-s-tic-counter' Russell King says: ==================== net: stmmac: remove unnecessary initialisation of 1µs TIC counter In commit 8efbdbfa9938 ("net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register"), code to initialise the LPI 1us counter in dwmac4's initialisation was added, making the initialisation in glue drivers unnecessary. This series cleans up the now redundant initialisation. ==================== Link: https://patch.msgid.link/Z_oe0U5E0i3uZbop@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 25af74ed68c4e3de35f5314fe4f8e2853a7e79ac Author: Russell King (Oracle) Date: Sat Apr 12 09:08:50 2025 +0100 net: stmmac: remove GMAC_1US_TIC_COUNTER definition GMAC_1US_TIC_COUNTER is now no longer used, so remove the definition. This was duplicated by GMAC4_MAC_ONEUS_TIC_COUNTER further down in the same file. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3Vv0-000E87-DQ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 651f88cb046c5e002f7c11de2cebf207787d2346 Author: Russell King (Oracle) Date: Sat Apr 12 09:08:45 2025 +0100 net: stmmac: remove eee_usecs_rate plat_dat->eee_users_rate is now unused, so remove this member. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3Vuv-000E7y-9k@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 35031c6256f19773b7e46df80ef4e6d6b782b088 Author: Russell King (Oracle) Date: Sat Apr 12 09:08:40 2025 +0100 net: stmmac: intel-plat: remove eee_usecs_rate and hardware write Remove the write to GMAC_1US_TIC_COUNTER for two reasons: 1. during initialisation or reinitialisation of the DWMAC core, the core is reset, which sets this register back to its default value. Writing it prior to stmmac_dvr_probe() has no effect. 2. Since commit 8efbdbfa9938 ("net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register"), GMAC4/5 core code will set this register based on the rate of plat->stmmac_clk. This clock is fetched by devm_stmmac_probe_config_dt(), and plat->clk_ptp_rate will be set to its rate profided a "ptp_ref" clock is not provided. In any case, Marek's commit will set the effectual value of this register. Therefore, dwmac-intel-plat.c writing GMAC_1US_TIC_COUNTER serves no useful purpose and can be removed. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3Vuq-000E7s-5Y@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 17ec6dbaaed3e2447c8aac93c7161823402aa2d9 Author: Russell King (Oracle) Date: Sat Apr 12 09:08:35 2025 +0100 net: stmmac: intel: remove eee_usecs_rate and hardware write Remove the write to GMAC_1US_TIC_COUNTER for two reasons: 1. during initialisation or reinitialisation of the DWMAC core, the core is reset, which sets this register back to its default value. Writing it prior to stmmac_dvr_probe() has no effect. 2. Since commit 8efbdbfa9938 ("net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register"), GMAC4/5 core code will set this register based on the rate of plat->stmmac_clk. This clock is created by the same code which initialises plat->eee_usecs_rate, which is also created to run at this same rate. Since Marek's commit, this will set this register appropriately using the rate of this clock. Therefore, dwmac-intel.c writing GMAC_1US_TIC_COUNTER serves no useful purpose and can be removed. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3Vul-000E7m-1j@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit dadc3a6be46987d9417732e5b59476267bba76ed Author: Russell King (Oracle) Date: Sat Apr 12 09:08:29 2025 +0100 net: stmmac: dwc-qos: remove tegra_eqos_init() tegra_eqos_init() initialises the 1US TIC counter for the EEE timers. However, the DWGMAC core is reset after this write, which clears this register to its default. However, dwmac4_core_init() configures this register using the same clock, which happens after reset - thus this is the write which ensures that the register is correctly configured. Therefore, tegra_eqos_init() is not required and is removed. This also means eqos->clk_slave can also be removed. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3Vuf-000E7g-U4@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 505b930929db65bbbeb26d3b13c2919084891e9f Merge: ceaceaf79ea0fe c57a9c503543cd Author: Jakub Kicinski Date: Mon Apr 14 17:09:13 2025 -0700 Merge branch 'net-convert-exit_batch_rtnl-to-exit_rtnl' Kuniyuki Iwashima says: ==================== net: Convert ->exit_batch_rtnl() to ->exit_rtnl(). While converting nexthop to per-netns RTNL, there are two blockers to using rtnl_net_dereference(), flush_all_nexthops() and __unregister_nexthop_notifier(), both of which are called from ->exit_batch_rtnl(). Instead of spreading __rtnl_net_lock() over each ->exit_batch_rtnl(), we should convert all ->exit_batch_rtnl() to per-net ->exit_rtnl() and run it under __rtnl_net_lock() because all ->exit_batch_rtnl() functions do not have anything to factor out for batching. Patch 1 & 2 factorise the undo mechanism against ->init() into a single function, and Patch 3 adds ->exit_batch_rtnl(). Patch 4 ~ 13 convert all ->exit_batch_rtnl() users. Patch 14 removes ->exit_batch_rtnl(). Later, we can convert pfcp and ppp to use ->exit_rtnl(). v1: https://lore.kernel.org/all/20250410022004.8668-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20250411205258.63164-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit c57a9c503543cd8829eeaaf88362199e0491c0d7 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:43 2025 -0700 net: Remove ->exit_batch_rtnl(). There are no ->exit_batch_rtnl() users remaining. Let's remove the hook. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-15-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 4e53b32d74f052458309a10867e642a8aeafd2f5 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:42 2025 -0700 geneve: Convert geneve_exit_batch_rtnl() to ->exit_rtnl(). geneve_exit_batch_rtnl() iterates the dying netns list and performs the same operation for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-14-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit fc3dc33f668c12285d82ad7a57b9dc3ca2922f8e Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:41 2025 -0700 bareudp: Convert bareudp_exit_batch_rtnl() to ->exit_rtnl(). bareudp_exit_batch_rtnl() iterates the dying netns list and performs the same operation for each. Let's use ->exit_rtnl(). While at it, we replace unregister_netdevice_queue() with bareudp_dellink() for better cleanup. It unlinks the device from net_generic(net, bareudp_net_id)->bareudp_list, but there is no real issue as both the dev and the list are freed later. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-13-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit bc7eaf7a40bba2172af3033fbece13af206c97fe Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:40 2025 -0700 gtp: Convert gtp_net_exit_batch_rtnl() to ->exit_rtnl(). gtp_net_exit_batch_rtnl() iterates the dying netns list and performs the same operations for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-12-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit baf720334c02f07f434feb6b6977ecef20cd58a1 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:39 2025 -0700 bonding: Convert bond_net_exit_batch_rtnl() to ->exit_rtnl(). bond_net_exit_batch_rtnl() iterates the dying netns list and performs the same operation for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Nikolay Aleksandrov Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-11-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit b7924f50be1525543d261a209790c86240b0df97 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:38 2025 -0700 bridge: Convert br_net_exit_batch_rtnl() to ->exit_rtnl(). br_net_exit_batch_rtnl() iterates the dying netns list and performs the same operation for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-10-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 9571ab5a98fefa2698f52adfb2823eaac5ca8ce2 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:37 2025 -0700 xfrm: Convert xfrmi_exit_batch_rtnl() to ->exit_rtnl(). xfrmi_exit_batch_rtnl() iterates the dying netns list and performs the same operations for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-9-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit f76758f18fb8677464a71cdcdd1920ffe6d59d85 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:36 2025 -0700 ipv6: Convert tunnel devices' ->exit_batch_rtnl() to ->exit_rtnl(). The following functions iterates the dying netns list and performs the same operations for each netns. * ip6gre_exit_batch_rtnl() * ip6_tnl_exit_batch_rtnl() * vti6_exit_batch_rtnl() * sit_exit_batch_rtnl() Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: David Ahern Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-8-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit a967e01e2ad201f6ddc778ed65a5dae1c68ee8a5 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:35 2025 -0700 ipv4: ip_tunnel: Convert ip_tunnel_delete_nets() callers to ->exit_rtnl(). ip_tunnel_delete_nets() iterates the dying netns list and performs the same operations for each. Let's export ip_tunnel_destroy() as ip_tunnel_delete_net() and call it from ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: David Ahern Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-7-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 6f2667b98ef2ea81aad6761409604480d14c9095 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:34 2025 -0700 vxlan: Convert vxlan_exit_batch_rtnl() to ->exit_rtnl(). vxlan_exit_batch_rtnl() iterates the dying netns list and performs the same operations for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Nikolay Aleksandrov Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit cf701038d1c87e6c54d8a45c738b56ab27a9e6c3 Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:33 2025 -0700 nexthop: Convert nexthop_net_exit_batch_rtnl() to ->exit_rtnl(). nexthop_net_exit_batch_rtnl() iterates the dying netns list and performs the same operation for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: David Ahern Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 7a60d91c690bf73c2c78e763efa29f294e217c3a Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:32 2025 -0700 net: Add ->exit_rtnl() hook to struct pernet_operations. struct pernet_operations provides two batching hooks; ->exit_batch() and ->exit_batch_rtnl(). The batching variant is beneficial if ->exit() meets any of the following conditions: 1) ->exit() repeatedly acquires a global lock for each netns 2) ->exit() has a time-consuming operation that can be factored out (e.g. synchronize_rcu(), smp_mb(), etc) 3) ->exit() does not need to repeat the same iterations for each netns (e.g. inet_twsk_purge()) Currently, none of the ->exit_batch_rtnl() functions satisfy any of the above conditions because RTNL is factored out and held by the caller and all of these functions iterate over the dying netns list. Also, we want to hold per-netns RTNL there but avoid spreading __rtnl_net_lock() across multiple locations. Let's add ->exit_rtnl() hook and run it under __rtnl_net_lock(). The following patches will convert all ->exit_batch_rtnl() users to ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit fed176bf3143362ac9935e3964949ab6a5c3286b Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:31 2025 -0700 net: Add ops_undo_single for module load/unload. If ops_init() fails while loading a module or we unload the module, free_exit_list() rolls back the changes. The rollback sequence is the same as ops_undo_list(). The ops is already removed from pernet_list before calling free_exit_list(). If we link the ops to a temporary list, we can reuse ops_undo_list(). Let's add a wrapper of ops_undo_list() and use it instead of free_exit_list(). Now, we have the central place to roll back ops_init(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit e333b1c3cf25fca348422c9ad5cc8db40b4243fa Author: Kuniyuki Iwashima Date: Fri Apr 11 13:52:30 2025 -0700 net: Factorise setup_net() and cleanup_net(). When we roll back the changes made by struct pernet_operations.init(), we execute mostly identical sequences in three places. * setup_net() * cleanup_net() * free_exit_list() The only difference between the first two is which list and RCU helpers to use. In setup_net(), an ops could fail on the way, so we need to perform a reverse walk from its previous ops in pernet_list. OTOH, in cleanup_net(), we iterate the full list from tail to head. The former passes the failed ops to list_for_each_entry_continue_reverse(). It's tricky, but we can reuse it for the latter if we pass list_entry() of the head node. Also, synchronize_rcu() and synchronize_rcu_expedited() can be easily switched by an argument. Let's factorise the rollback part in setup_net() and cleanup_net(). In the next patch, ops_undo_list() will be reused for free_exit_list(), and then two arguments (ops_list and hold_rtnl) will differ. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250411205258.63164-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit ceaceaf79ea0fe337344fc5c1fb10a421a362410 Author: Russell King (Oracle) Date: Fri Apr 11 23:04:19 2025 +0100 net: ethtool: fix get_ts_stats() documentation Commit 0e9c127729be ("ethtool: add interface to read Tx hardware timestamping statistics") added documentation for timestamping statistics, but added the detailed explanation for this method to the get_ts_info() rather than get_ts_stats(). Move it to the correct entry. Cc: Rahul Rameshbabu Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u3MTz-000Crx-IW@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 63ce43f2d7da1f863f43fb1bcc9422466887dc6c Merge: 452446f8128672 ee62ce7a1d909c Author: Jakub Kicinski Date: Mon Apr 14 16:30:35 2025 -0700 Merge branch 'fix-late-dma-unmap-crash-for-page-pool' Toke Høiland-Jørgensen says: ==================== Fix late DMA unmap crash for page pool This series fixes the late dma_unmap crash for page pool first reported by Yonglong Liu in [0]. It is an alternative approach to the one submitted by Yunsheng Lin, most recently in [1]. The first commit just wraps some tests in a helper function, in preparation of the main change in patch 2. See the commit message of patch 2 for the details. [0] https://lore.kernel.org/8067f204-1380-4d37-8ffd-007fc6f26738@kernel.org [1] https://lore.kernel.org/20250307092356.638242-1-linyunsheng@huawei.com v8: https://lore.kernel.org/20250407-page-pool-track-dma-v8-0-da9500d4ba21@redhat.com v7: https://lore.kernel.org/20250404-page-pool-track-dma-v7-0-ad34f069bc18@redhat.com v6: https://lore.kernel.org/20250401-page-pool-track-dma-v6-0-8b83474870d4@redhat.com v5: https://lore.kernel.org/20250328-page-pool-track-dma-v5-0-55002af683ad@redhat.com v4: https://lore.kernel.org/20250327-page-pool-track-dma-v4-0-b380dc6706d0@redhat.com v3: https://lore.kernel.org/20250326-page-pool-track-dma-v3-0-8e464016e0ac@redhat.com v2: https://lore.kernel.org/20250325-page-pool-track-dma-v2-0-113ebc1946f3@redhat.com v1: https://lore.kernel.org/20250314-page-pool-track-dma-v1-0-c212e57a74c2@redhat.com ==================== Link: https://patch.msgid.link/20250409-page-pool-track-dma-v9-0-6a9ef2e0cba8@redhat.com Signed-off-by: Jakub Kicinski commit ee62ce7a1d909ccba0399680a03c2dee83bcae95 Author: Toke Høiland-Jørgensen Date: Wed Apr 9 12:41:37 2025 +0200 page_pool: Track DMA-mapped pages and unmap them when destroying the pool When enabling DMA mapping in page_pool, pages are kept DMA mapped until they are released from the pool, to avoid the overhead of re-mapping the pages every time they are used. This causes resource leaks and/or crashes when there are pages still outstanding while the device is torn down, because page_pool will attempt an unmap through a non-existent DMA device on the subsequent page return. To fix this, implement a simple tracking of outstanding DMA-mapped pages in page pool using an xarray. This was first suggested by Mina[0], and turns out to be fairly straight forward: We simply store pointers to pages directly in the xarray with xa_alloc() when they are first DMA mapped, and remove them from the array on unmap. Then, when a page pool is torn down, it can simply walk the xarray and unmap all pages still present there before returning, which also allows us to get rid of the get/put_device() calls in page_pool. Using xa_cmpxchg(), no additional synchronisation is needed, as a page will only ever be unmapped once. To avoid having to walk the entire xarray on unmap to find the page reference, we stash the ID assigned by xa_alloc() into the page structure itself, using the upper bits of the pp_magic field. This requires a couple of defines to avoid conflicting with the POINTER_POISON_DELTA define, but this is all evaluated at compile-time, so does not affect run-time performance. The bitmap calculations in this patch gives the following number of bits for different architectures: - 23 bits on 32-bit architectures - 21 bits on PPC64 (because of the definition of ILLEGAL_POINTER_VALUE) - 32 bits on other 64-bit architectures Stashing a value into the unused bits of pp_magic does have the effect that it can make the value stored there lie outside the unmappable range (as governed by the mmap_min_addr sysctl), for architectures that don't define ILLEGAL_POINTER_VALUE. This means that if one of the pointers that is aliased to the pp_magic field (such as page->lru.next) is dereferenced while the page is owned by page_pool, that could lead to a dereference into userspace, which is a security concern. The risk of this is mitigated by the fact that (a) we always clear pp_magic before releasing a page from page_pool, and (b) this would need a use-after-free bug for struct page, which can have many other risks since page->lru.next is used as a generic list pointer in multiple places in the kernel. As such, with this patch we take the position that this risk is negligible in practice. For more discussion, see[1]. Since all the tracking added in this patch is performed on DMA map/unmap, no additional code is needed in the fast path, meaning the performance overhead of this tracking is negligible there. A micro-benchmark shows that the total overhead of the tracking itself is about 400 ns (39 cycles(tsc) 395.218 ns; sum for both map and unmap[2]). Since this cost is only paid on DMA map and unmap, it seems like an acceptable cost to fix the late unmap issue. Further optimisation can narrow the cases where this cost is paid (for instance by eliding the tracking when DMA map/unmap is a no-op). The extra memory needed to track the pages is neatly encapsulated inside xarray, which uses the 'struct xa_node' structure to track items. This structure is 576 bytes long, with slots for 64 items, meaning that a full node occurs only 9 bytes of overhead per slot it tracks (in practice, it probably won't be this efficient, but in any case it should be an acceptable overhead). [0] https://lore.kernel.org/all/CAHS8izPg7B5DwKfSuzz-iOop_YRbk3Sd6Y4rX7KBG9DcVJcyWg@mail.gmail.com/ [1] https://lore.kernel.org/r/20250320023202.GA25514@openwall.com [2] https://lore.kernel.org/r/ae07144c-9295-4c9d-a400-153bb689fe9e@huawei.com Reported-by: Yonglong Liu Closes: https://lore.kernel.org/r/8743264a-9700-4227-a556-5f931c720211@huawei.com Fixes: ff7d6b27f894 ("page_pool: refurbish version of page_pool code") Suggested-by: Mina Almasry Reviewed-by: Mina Almasry Reviewed-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Qiuling Ren Tested-by: Yuying Ma Tested-by: Yonglong Liu Acked-by: Jesper Dangaard Brouer Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409-page-pool-track-dma-v9-2-6a9ef2e0cba8@redhat.com Signed-off-by: Jakub Kicinski commit cd3c93167da0e760b5819246eae7a4ea30fd014b Author: Toke Høiland-Jørgensen Date: Wed Apr 9 12:41:36 2025 +0200 page_pool: Move pp_magic check into helper functions Since we are about to stash some more information into the pp_magic field, let's move the magic signature checks into a pair of helper functions so it can be changed in one place. Reviewed-by: Mina Almasry Tested-by: Yonglong Liu Acked-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250409-page-pool-track-dma-v9-1-6a9ef2e0cba8@redhat.com Signed-off-by: Jakub Kicinski commit 452446f812867230cad0bfbb00afb77e3412bbf3 Merge: 63c5e952f79296 39aa687a849489 Author: Jakub Kicinski Date: Mon Apr 14 16:05:43 2025 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-04-11 (ice, i40e, ixgbe, igc, e1000e) For ice: Mateusz and Larysa add support for LLDP packets to be received on a VF and transmitted by a VF in switchdev mode. Additional information: https://lore.kernel.org/intel-wired-lan/20250214085215.2846063-1-larysa.zaremba@intel.com/ Karol adds timesync support for E825C devices using 2xNAC (Network Acceleration Complex) configuration. 2xNAC mode is the mode in which IO die is housing two complexes and each of them has its own PHY connected to it. Martyna adds messaging to clarify filter errors when recipe space is exhausted. Colin Ian King adds static modifier to a const array to avoid stack usage. For i40e: Kyungwook Boo changes variable declaration types to prevent possible underflow. For ixgbe: Rand Deeb adjusts retry values so that retries are attempted. For igc: Rui Salvaterra sets VLAN offloads to be enabled as default. For e1000e: Piotr Wejman converts driver to use newer hardware timestamping API. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: net: e1000e: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() igc: enable HW vlan tag insertion/stripping by default ixgbe: Fix unreachable retry logic in combined and byte I2C write functions i40e: fix MMIO write access to an invalid page in i40e_clear_hw ice: make const read-only array dflt_rules static ice: improve error message for insufficient filter space ice: enable timesync operation on 2xNAC E825 devices ice: refactor ice_sbq_msg_dev enum ice: remove SW side band access workaround for E825 ice: enable LLDP TX for VFs through tc ice: support egress drop rules on PF ice: remove headers argument from ice_tc_count_lkups ice: receive LLDP on trusted VFs ice: do not add LLDP-specific filter if not necessary ice: fix check for existing switch rule ==================== Link: https://patch.msgid.link/20250411204401.3271306-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 63c5e952f792960ae5d755a1fad4230856ef0b24 Merge: dbf14d157c0fc3 8b36a102c1a17d Author: Jakub Kicinski Date: Mon Apr 14 15:57:12 2025 -0700 Merge branch 'cpsw-bindings-for-5000m-fixed-link' Siddharth Vadapalli says: ==================== CPSW Bindings for 5000M Fixed-Link This series adds 5000M as a valid speed for fixed-link mode of operation and also updates the CPSW bindings to evaluate fixed-link property. This series is in the context of the following device-tree overlay which enables USXGMII 5000M Fixed-link mode of operation with CPSW on TI's J784S4 SoC: https://github.com/torvalds/linux/blob/v6.15-rc1/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso ==================== Link: https://patch.msgid.link/20250411060917.633769-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit 8b36a102c1a17d8dabc846e3ded41fe17e9ad4e2 Author: Siddharth Vadapalli Date: Fri Apr 11 11:39:17 2025 +0530 dt-bindings: net: ti: k3-am654-cpsw-nuss: evaluate fixed-link property Since the fixed-link (phyless) mode of operation is supported by the CPSW MAC, include "fixed-link" in the set of properties to be evaluated. Signed-off-by: Siddharth Vadapalli Link: https://patch.msgid.link/20250411060917.633769-3-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit f9c1120d9b5e65ded82dccb7ebf22bc9739419b0 Author: Siddharth Vadapalli Date: Fri Apr 11 11:39:16 2025 +0530 dt-bindings: net: ethernet-controller: add 5000M speed to fixed-link A link speed of 5000 Mbps is a valid speed for a fixed-link mode of operation. Hence, update the bindings to include the same. Signed-off-by: Siddharth Vadapalli Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250411060917.633769-2-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit dbf14d157c0fc3ae21c5d83d63276828d1abe542 Merge: 1450e4525f9a71 c428d43d4f56ef Author: Jakub Kicinski Date: Mon Apr 14 15:56:55 2025 -0700 Merge branch 'add-support-for-mdb-offload-failure-notification' Joseph Huang says: ==================== Add support for mdb offload failure notification Currently the bridge does not provide real-time feedback to user space on whether or not an attempt to offload an mdb entry was successful. This patch set adds support to notify user space about failed offload attempts, and is controlled by a new knob mdb_offload_fail_notification. A break-down of the patches in the series: Patch 1 adds offload failed flag to indicate that the offload attempt has failed. The flag is reflected in netlink mdb entry flags. Patch 2 adds the new bridge bool option mdb_offload_fail_notification. Patch 3 notifies user space when the result is known, controlled by mdb_offload_fail_notification setting. ==================== Link: https://patch.msgid.link/20250411150323.1117797-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit c428d43d4f56efd291d010c2a43f031e56978519 Author: Joseph Huang Date: Fri Apr 11 11:03:18 2025 -0400 net: bridge: mcast: Notify on mdb offload failure Notify user space on mdb offload failure if mdb_offload_fail_notification is enabled. Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20250411150323.1117797-4-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit 9fbe1e3e61c21508861a72324087aeeea85f796f Author: Joseph Huang Date: Fri Apr 11 11:03:17 2025 -0400 net: bridge: Add offload_fail_notification bopt Add BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION bool option. Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20250411150323.1117797-3-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit e846fb5e7c5243c65ff67247cb29a9d76bbcc4e8 Author: Joseph Huang Date: Fri Apr 11 11:03:16 2025 -0400 net: bridge: mcast: Add offload failed mdb flag Add MDB_FLAGS_OFFLOAD_FAILED and MDB_PG_FLAGS_OFFLOAD_FAILED to indicate that an attempt to offload the MDB entry to switchdev has failed. Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20250411150323.1117797-2-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit 1450e4525f9a719a674f0b0c3bbe7c290cf933d4 Author: WangYuli Date: Fri Apr 11 18:17:36 2025 +0800 bna: bnad_dim_timeout: Rename del_timer_sync in comment Commit 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()") switched del_timer_sync to timer_delete_sync, but did not modify the comment for bnad_dim_timeout(). Now fix it. Signed-off-by: WangYuli Reviewed-by: Simon Horman Link: https://patch.msgid.link/61DDCE7AB5B6CE82+20250411101736.160981-1-wangyuli@uniontech.com Signed-off-by: Jakub Kicinski commit 78dbd1952e2e1a98587a730dfa39f8e408706be7 Merge: 097f171f98289c 08fcb1f242b9e7 Author: Jakub Kicinski Date: Mon Apr 14 14:53:17 2025 -0700 Merge branch 'pktgen-code-cleanup' Peter Seiderer says: ==================== net: pktgen: fix checkpatch code style errors/warnings Fix checkpatch detected code style errors/warnings detected in the file net/core/pktgen.c (remaining checkpatch checks will be addressed in a follow up patch set). ==================== Link: https://patch.msgid.link/20250410071749.30505-1-ps.report@gmx.net Signed-off-by: Jakub Kicinski commit 08fcb1f242b9e7c73d3a3372890768fe28ef16a1 Author: Peter Seiderer Date: Thu Apr 10 09:17:47 2025 +0200 net: pktgen: fix code style (WARNING: quoted string split across lines) Fix checkpatch code style warnings: WARNING: quoted string split across lines #480: FILE: net/core/pktgen.c:480: + "Packet Generator for packet performance testing. " + "Version: " VERSION "\n"; WARNING: quoted string split across lines #632: FILE: net/core/pktgen.c:632: + " udp_src_min: %d udp_src_max: %d" + " udp_dst_min: %d udp_dst_max: %d\n", Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit dceae3e82ff8222f91f49ec26d5f41027ce0562c Author: Peter Seiderer Date: Thu Apr 10 09:17:45 2025 +0200 net: pktgen: fix code style (WARNING: macros should not use a trailing semicolon) Fix checkpatch code style warnings: WARNING: macros should not use a trailing semicolon #180: FILE: net/core/pktgen.c:180: +#define func_enter() pr_debug("entering %s\n", __func__); WARNING: macros should not use a trailing semicolon #234: FILE: net/core/pktgen.c:234: +#define if_lock(t) mutex_lock(&(t->if_lock)); CHECK: Unnecessary parentheses around t->if_lock #235: FILE: net/core/pktgen.c:235: +#define if_unlock(t) mutex_unlock(&(t->if_lock)); Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit ca8ee665211ac64d38caa553cc04527b22cb25d2 Author: Peter Seiderer Date: Thu Apr 10 09:17:44 2025 +0200 net: pktgen: fix code style (WARNING: Missing a blank line after declarations) Fix checkpatch code style warnings: WARNING: Missing a blank line after declarations #761: FILE: net/core/pktgen.c:761: + char c; + if (get_user(c, &user_buffer[i])) WARNING: Missing a blank line after declarations #780: FILE: net/core/pktgen.c:780: + char c; + if (get_user(c, &user_buffer[i])) WARNING: Missing a blank line after declarations #806: FILE: net/core/pktgen.c:806: + char c; + if (get_user(c, &user_buffer[i])) WARNING: Missing a blank line after declarations #823: FILE: net/core/pktgen.c:823: + char c; + if (get_user(c, &user_buffer[i])) WARNING: Missing a blank line after declarations #1968: FILE: net/core/pktgen.c:1968: + char f[32]; + memset(f, 0, 32); WARNING: Missing a blank line after declarations #2410: FILE: net/core/pktgen.c:2410: + struct pktgen_net *pn = net_generic(dev_net(pkt_dev->odev), pg_net_id); + if (!x) { WARNING: Missing a blank line after declarations #2442: FILE: net/core/pktgen.c:2442: + __u16 t; + if (pkt_dev->flags & F_QUEUE_MAP_RND) { WARNING: Missing a blank line after declarations #2523: FILE: net/core/pktgen.c:2523: + unsigned int i; + for (i = 0; i < pkt_dev->nr_labels; i++) WARNING: Missing a blank line after declarations #2567: FILE: net/core/pktgen.c:2567: + __u32 t; + if (pkt_dev->flags & F_IPSRC_RND) WARNING: Missing a blank line after declarations #2587: FILE: net/core/pktgen.c:2587: + __be32 s; + if (pkt_dev->flags & F_IPDST_RND) { WARNING: Missing a blank line after declarations #2634: FILE: net/core/pktgen.c:2634: + __u32 t; + if (pkt_dev->flags & F_TXSIZE_RND) { WARNING: Missing a blank line after declarations #2736: FILE: net/core/pktgen.c:2736: + int i; + for (i = 0; i < pkt_dev->cflows; i++) { WARNING: Missing a blank line after declarations #2738: FILE: net/core/pktgen.c:2738: + struct xfrm_state *x = pkt_dev->flows[i].x; + if (x) { WARNING: Missing a blank line after declarations #2752: FILE: net/core/pktgen.c:2752: + int nhead = 0; + if (x) { WARNING: Missing a blank line after declarations #2795: FILE: net/core/pktgen.c:2795: + unsigned int i; + for (i = 0; i < pkt_dev->nr_labels; i++) WARNING: Missing a blank line after declarations #3480: FILE: net/core/pktgen.c:3480: + ktime_t idle_start = ktime_get(); + schedule(); Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit 870b856cb478bc02fffe4d89897e62c692efb09a Author: Peter Seiderer Date: Thu Apr 10 09:17:43 2025 +0200 net: pktgen: fix code style (WARNING: Block comments) Fix checkpatch code style warnings: WARNING: Block comments use a trailing */ on a separate line + * removal by worker thread */ WARNING: Block comments use * on subsequent lines + __u8 tos; /* six MSB of (former) IPv4 TOS + are for dscp codepoint */ WARNING: Block comments use a trailing */ on a separate line + are for dscp codepoint */ WARNING: Block comments use * on subsequent lines + __u8 traffic_class; /* ditto for the (former) Traffic Class in IPv6 + (see RFC 3260, sec. 4) */ WARNING: Block comments use a trailing */ on a separate line + (see RFC 3260, sec. 4) */ WARNING: Block comments use * on subsequent lines + /* = { + 0x00, 0x80, 0xC8, 0x79, 0xB3, 0xCB, WARNING: Block comments use * on subsequent lines + /* Field for thread to receive "posted" events terminate, + stop ifs etc. */ WARNING: Block comments use a trailing */ on a separate line + stop ifs etc. */ WARNING: Block comments should align the * on each line + * we go look for it ... +*/ WARNING: Block comments use a trailing */ on a separate line + * we resolve the dst issue */ WARNING: Block comments use a trailing */ on a separate line + * with proc_create_data() */ Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit 1d8f07bf4aab018692b6288d6a93fe17383a2f47 Author: Peter Seiderer Date: Thu Apr 10 09:17:42 2025 +0200 net: pktgen: fix code style (WARNING: suspect code indent for conditional statements) Fix checkpatch code style warnings: WARNING: suspect code indent for conditional statements (8, 17) #2901: FILE: net/core/pktgen.c:2901: + } else { + skb = __netdev_alloc_skb(dev, size, GFP_NOWAIT); Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit eb1fd49ef660ddba36c91667594caf5d91a6d62e Author: Peter Seiderer Date: Thu Apr 10 09:17:39 2025 +0200 net: pktgen: fix code style (ERROR: space prohibited after that '&') Fix checkpatch code style errors/checks: CHECK: No space is necessary after a cast #2984: FILE: net/core/pktgen.c:2984: + *(__be16 *) & eth[12] = protocol; ERROR: space prohibited after that '&' (ctx:WxW) #2984: FILE: net/core/pktgen.c:2984: + *(__be16 *) & eth[12] = protocol; Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit 81e92f4fb825b08d63641656f1510f38ad07390b Author: Peter Seiderer Date: Thu Apr 10 09:17:38 2025 +0200 net: pktgen: fix code style (ERROR: "foo * bar" should be "foo *bar") Fix checkpatch code style errors: ERROR: "foo * bar" should be "foo *bar" #977: FILE: net/core/pktgen.c:977: + const char __user * user_buffer, size_t count, ERROR: "foo * bar" should be "foo *bar" #978: FILE: net/core/pktgen.c:978: + loff_t * offset) ERROR: "foo * bar" should be "foo *bar" #1912: FILE: net/core/pktgen.c:1912: + const char __user * user_buffer, ERROR: "foo * bar" should be "foo *bar" #1913: FILE: net/core/pktgen.c:1913: + size_t count, loff_t * offset) Signed-off-by: Peter Seiderer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Jakub Kicinski commit 097f171f98289cf737437599c40b0d1e81266e9e Author: Jakub Kicinski Date: Wed Apr 9 18:42:46 2025 -0700 net: convert dev->rtnl_link_state to a bool netdevice reg_state was split into two 16 bit enums back in 2010 in commit a2835763e130 ("rtnetlink: handle rtnl_link netlink notifications manually"). Since the split the fields have been moved apart, and last year we converted reg_state to a normal u8 in commit 4d42b37def70 ("net: convert dev->reg_state to u8"). rtnl_link_state being a 16 bitfield makes no sense. Convert it to a single bool, it seems very unlikely after 15 years that we'll need more values in it. We could drop dev->rtnl_link_ops from the conditions but feels like having it there more clearly points at the reason for this hack. Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250410014246.780885-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c26c192c3d486a2a7d83d254bae294c2f8f50abf Author: Paolo Abeni Date: Wed Apr 9 22:00:56 2025 +0200 udp: properly deal with xfrm encap and ADDRFORM UDP GRO accounting assumes that the GRO receive callback is always set when the UDP tunnel is enabled, but syzkaller proved otherwise, leading tot the following splat: WARNING: CPU: 0 PID: 5837 at net/ipv4/udp_offload.c:123 udp_tunnel_update_gro_rcv+0x28d/0x4c0 net/ipv4/udp_offload.c:123 Modules linked in: CPU: 0 UID: 0 PID: 5837 Comm: syz-executor850 Not tainted 6.14.0-syzkaller-13320-g420aabef3ab5 #0 PREEMPT(full) Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 RIP: 0010:udp_tunnel_update_gro_rcv+0x28d/0x4c0 net/ipv4/udp_offload.c:123 Code: 00 00 e8 c6 5a 2f f7 48 c1 e5 04 48 8d b5 20 53 c7 9a ba 10 00 00 00 4c 89 ff e8 ce 87 99 f7 e9 ce 00 00 00 e8 a4 5a 2f f7 90 <0f> 0b 90 e9 de fd ff ff bf 01 00 00 00 89 ee e8 cf 5e 2f f7 85 ed RSP: 0018:ffffc90003effa88 EFLAGS: 00010293 RAX: ffffffff8a93fc9c RBX: 0000000000000000 RCX: ffff8880306f9e00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff8a93fabe R09: 1ffffffff20bfb2e R10: dffffc0000000000 R11: fffffbfff20bfb2f R12: ffff88814ef21738 R13: dffffc0000000000 R14: ffff88814ef21778 R15: 1ffff11029de42ef FS: 0000000000000000(0000) GS:ffff888124f96000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f04eec760d0 CR3: 000000000eb38000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: udp_tunnel_cleanup_gro include/net/udp_tunnel.h:205 [inline] udpv6_destroy_sock+0x212/0x270 net/ipv6/udp.c:1829 sk_common_release+0x71/0x2e0 net/core/sock.c:3896 inet_release+0x17d/0x200 net/ipv4/af_inet.c:435 __sock_release net/socket.c:647 [inline] sock_close+0xbc/0x240 net/socket.c:1391 __fput+0x3e9/0x9f0 fs/file_table.c:465 task_work_run+0x251/0x310 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa11/0x27f0 kernel/exit.c:953 do_group_exit+0x207/0x2c0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1111 x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f04eebfac79 Code: Unable to access opcode bytes at 0x7f04eebfac4f. RSP: 002b:00007fffdcaa34a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f04eebfac79 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007f04eec75270 R08: ffffffffffffffb8 R09: 00007fffdcaa36c8 R10: 0000200000000000 R11: 0000000000000246 R12: 00007f04eec75270 R13: 0000000000000000 R14: 00007f04eec75cc0 R15: 00007f04eebcca70 Address the issue moving the accounting hook into setup_udp_tunnel_sock() and set_xfrm_gro_udp_encap_rcv(), where the GRO callback is actually set. set_xfrm_gro_udp_encap_rcv() is prone to races with IPV6_ADDRFORM, run the relevant setsockopt under the socket lock to ensure using consistent values of sk_family and up->encap_type. Refactor the GRO callback selection code, to make it clear that the function pointer is always initialized. Reported-by: syzbot+8c469a2260132cd095c1@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=8c469a2260132cd095c1 Fixes: 172bf009c18d ("xfrm: Support GRO for IPv4 ESP in UDP encapsulation") Fixes: 5d7f5b2f6b935 ("udp_tunnel: use static call for GRO hooks when possible") Signed-off-by: Paolo Abeni Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/92bcdb6899145a9a387c8fa9e3ca656642a43634.1744228733.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 42cb74a92adaf88061039601ddf7c874f58b554e Author: Jaegeuk Kim Date: Sat Apr 12 21:09:46 2025 +0000 f2fs: prevent kernel warning due to negative i_nlink from corrupted image WARNING: CPU: 1 PID: 9426 at fs/inode.c:417 drop_nlink+0xac/0xd0 home/cc/linux/fs/inode.c:417 Modules linked in: CPU: 1 UID: 0 PID: 9426 Comm: syz-executor568 Not tainted 6.14.0-12627-g94d471a4f428 #2 PREEMPT(full) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:drop_nlink+0xac/0xd0 home/cc/linux/fs/inode.c:417 Code: 48 8b 5d 28 be 08 00 00 00 48 8d bb 70 07 00 00 e8 f9 67 e6 ff f0 48 ff 83 70 07 00 00 5b 5d e9 9a 12 82 ff e8 95 12 82 ff 90 <0f> 0b 90 c7 45 48 ff ff ff ff 5b 5d e9 83 12 82 ff e8 fe 5f e6 ff RSP: 0018:ffffc900026b7c28 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8239710f RDX: ffff888041345a00 RSI: ffffffff8239717b RDI: 0000000000000005 RBP: ffff888054509ad0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff9ab36f08 R12: ffff88804bb40000 R13: ffff8880545091e0 R14: 0000000000008000 R15: ffff8880545091e0 FS: 000055555d0c5880(0000) GS:ffff8880eb3e3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f915c55b178 CR3: 0000000050d20000 CR4: 0000000000352ef0 Call Trace: f2fs_i_links_write home/cc/linux/fs/f2fs/f2fs.h:3194 [inline] f2fs_drop_nlink+0xd1/0x3c0 home/cc/linux/fs/f2fs/dir.c:845 f2fs_delete_entry+0x542/0x1450 home/cc/linux/fs/f2fs/dir.c:909 f2fs_unlink+0x45c/0x890 home/cc/linux/fs/f2fs/namei.c:581 vfs_unlink+0x2fb/0x9b0 home/cc/linux/fs/namei.c:4544 do_unlinkat+0x4c5/0x6a0 home/cc/linux/fs/namei.c:4608 __do_sys_unlink home/cc/linux/fs/namei.c:4654 [inline] __se_sys_unlink home/cc/linux/fs/namei.c:4652 [inline] __x64_sys_unlink+0xc5/0x110 home/cc/linux/fs/namei.c:4652 do_syscall_x64 home/cc/linux/arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc7/0x250 home/cc/linux/arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb3d092324b Code: 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdc232d938 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb3d092324b RDX: 00007ffdc232d960 RSI: 00007ffdc232d960 RDI: 00007ffdc232d9f0 RBP: 00007ffdc232d9f0 R08: 0000000000000001 R09: 00007ffdc232d7c0 R10: 00000000fffffffd R11: 0000000000000206 R12: 00007ffdc232eaf0 R13: 000055555d0cebb0 R14: 00007ffdc232d958 R15: 0000000000000001 Cc: stable@vger.kernel.org Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit df9b3454a00ed9e4c85295611b28b7041fc2a1d9 Author: Geert Uytterhoeven Date: Wed Apr 9 11:22:35 2025 +0200 gpio: GPIO_BLZP1600 should depend on ARCH_BLAIZE The Blaize BLZP1600 GPIO controller is only present on BLaize BLZP1600 SoCs. Hence add a dependency on ARCH_BLAIZE, to prevent asking the user about this driver when configuring a kernel without Blaize platform support. Fixes: 602ae04f56542d8e ("gpio: Enable Blaize BLZP1600 GPIO support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Nikolaos Pasaloukos Link: https://lore.kernel.org/r/a75af4b623579a193b4a59350c063969aabb5b71.1744190524.git.geert+renesas@glider.be Signed-off-by: Bartosz Golaszewski commit 290ffcfe3042dcd5b701a98edd48d7962d35556b Author: Koichiro Den Date: Sun Apr 13 00:01:19 2025 +0900 selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation The kernel doc for gpio-aggregator configfs interface, which was recently added, states that users should not be able to create an aggregator with a name prefixed by "_sysfs" via configfs. However, it was found that this guard does not function as expected (thanks to Dan Carpenter for identifying and fixing the issue). Add a test case to verify the guard. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250412150119.1461023-1-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit d945ff52642d98eb6fa191f88a9cfde729129395 Author: Dan Carpenter Date: Sat Apr 12 13:15:31 2025 +0300 gpio: aggregator: Fix leak in gpio_aggregator_parse() Call gpio_aggregator_free_lines() before returning on this error path. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter Acked-by: Koichiro Den Link: https://lore.kernel.org/r/e023bfe52509ce1bef6209ec7c47e99279c551dd.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski commit 05b43de95add3d787a7a88378086bf01c10b3f40 Author: Dan Carpenter Date: Sat Apr 12 13:15:25 2025 +0300 gpio: aggregator: Fix error code in gpio_aggregator_activate() Propagate the error code if gpio_aggregator_make_device_sw_node() fails. Don't return success. Fixes: 86f162e73d2d ("gpio: aggregator: introduce basic configfs interface") Signed-off-by: Dan Carpenter Acked-by: Koichiro Den Link: https://lore.kernel.org/r/79b804a0769a434698616bebedacc0e5d5605fdc.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski commit db1baf69e563fc222a75c0add5c76f437c717ac0 Author: Dan Carpenter Date: Sat Apr 12 13:15:16 2025 +0300 gpio: aggregator: Return an error if there are no GPIOs in gpio_aggregator_parse() The error handling in gpio_aggregator_parse() was re-written. It now returns success if there are no GPIOs. Restore the previous behavior and return -EINVAL instead. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter Acked-by: Koichiro Den Link: https://lore.kernel.org/r/9dcd5fda7a3819e896d9eee4156e7c46c9a64595.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski commit 2e8636ca340002f3ac31383622911a1aa75fb086 Author: Dan Carpenter Date: Sat Apr 12 13:15:08 2025 +0300 gpio: aggregator: Fix gpio_aggregator_line_alloc() checking The gpio_aggregator_line_alloc() function returns error pointers, but the callers check for NULL. Update the error checking in the callers. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter Acked-by: Koichiro Den Link: https://lore.kernel.org/r/cc71d8cf6e9bb4bb8cd9ae5050100081891d9345.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski commit eebfcb98cdc0228f5e1b7407f9db1c602bd8e545 Author: Dan Carpenter Date: Sat Apr 12 13:15:00 2025 +0300 gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group() This code is intended to reject strings that start with "_sysfs" but the strcmp() limit is wrong so checks the whole string instead of the prefix. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter Reviewed-by: Geert Uytterhoeven Acked-by: Koichiro Den Link: https://lore.kernel.org/r/30210ed77b40b4b6629de659cb56b9ec7832c447.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski commit 0a36bad01731e71568bdd365764d38b6bd576ab0 Author: Oleg Nesterov Date: Fri Apr 11 14:18:57 2025 +0200 release_task: kill the no longer needed get/put_pid(thread_pid) After the commit 7903f907a2260 ("pid: perform free_pid() calls outside of tasklist_lock") __unhash_process() -> detach_pid() no longer calls free_pid(), proc_flush_pid() can just use p->thread_pid without the now pointless get_pid() + put_pid(). Signed-off-by: Oleg Nesterov Link: https://lore.kernel.org/20250411121857.GA10550@redhat.com Reviewed-by: Mateusz Guzik Signed-off-by: Christian Brauner commit b60301774a8fe6c30b14a95104ec099290a2e904 Merge: 683058df13c7de 1954629dc649b2 Author: Dave Airlie Date: Tue Apr 15 05:06:46 2025 +1000 Merge tag 'drm-intel-next-2025-04-11' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Cross-subsystem Changes: - Update GVT MAINTAINERS (Jani) Driver Changes: - Updates for xe3lpd display (Gustavo) - Fix link training interrupted by HPD pulse (Imre) - Watermark bound checks for DSC (Ankit) - VRR Refactor and other fixes and improvements (Ankit) - More conversions towards intel_display struct (Gustavo, Jani) - Other clean-up patches towards a display separation (Jani) - Maintain asciibetical order for HAS_* macros (Ankit) - Fixes around probe/initialization (Janusz) - Fix build and doc build issue (Yue, Rodrigo) - DSI related fixes (Suraj, William, Jani) - Improve DC6 entry counter (Mohammed) - Fix xe2hpd memory type identification (Vivek) - PSR related fixes and improvements (Animesh, Jouni) - DP MST related fixes and improvements (Imre) - Fix scanline_offset for LNL+/BMG+ (Ville) - Some gvt related fixes and changes (Ville, Jani) - Some PLL code adjustment (Ville) - Display wa addition (Vinod) - DRAM type logging (Lucas) - Pimp the initial FB readout (Ville) - Some sagv/bw cleanup (Ville) - Remove i915_display_capabilities debugfs entry (Jani) - Move PCH type to display caps debugfs entry (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://lore.kernel.org/r/Z_kTqPX5Mjruq1pL@intel.com commit 012aa48a587c3b263f62256a68438ec44fb0225d Author: Jani Nikula Date: Mon Apr 14 14:29:48 2025 +0300 drm/i915: use graphics version instead of PCH split in error capture Avoid using PCH checks in core i915 code, in preparation for moving PCH handling to display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/8d73eb1d56603210003554bc6a875c53ed4c692a.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 02cfe5a3bcb8768677a68e86016a5c7e138cd7ce Author: Jani Nikula Date: Mon Apr 14 14:29:47 2025 +0300 drm/i915: don't capture DERRMR for VLV/CHV DERRMR isn't valid for VLV/CHV. Don't capture it for them. Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/4563cc7eb567ac508b84717c3708a4e48aa8b7bb.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 737c725b2c88c4defd3fc92bb934ee6804a4d851 Author: Jani Nikula Date: Mon Apr 14 14:29:46 2025 +0300 drm/i915: use display snapshot mechanism for display irq regs Move more display specific parts of GPU error logging behind the display snapshot interface. With the display register capture reduced to just one register, DERRMR, there's quite a bit of boilerplate here. However, it's still a nice abstraction and removes a DISPLAY_VER() usage from core i915. With this approach, it's also easy to add to xe as needed. v2: Remove stale comment Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/13206969df04426d290d2863dc574e22ca45193a.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 79cef51541eab6294da2b1a0f576dded66871064 Author: Jani Nikula Date: Mon Apr 14 14:29:45 2025 +0300 drm/i915: stop recording IER in error capture With pre-ilk GEN2_IER capture moved to gtier[0], the remaining IER aren't all that relevant. Stop capturing them. Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/6f1130a3d0d13e08a73ba381225ab978b22a9345.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ef32101873f477fdfb5ac6e9cfed7c9c571636c9 Author: Jani Nikula Date: Mon Apr 14 14:29:44 2025 +0300 drm/i915: record GEN2_IER in gtier[0] for pre-ilk error capture In pre-ilk platforms the engine interrupts live in GEN2_IER. Capture it as part of gtier instead of display. Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/f637219fe3accb69963266773b9ef7c1131875e4.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2eb0e67ef063835b3fa5a8b8feaf6beae024b060 Author: Jani Nikula Date: Mon Apr 14 14:29:43 2025 +0300 drm/i915: use 32-bit access for gen2 irq registers We've previously switched from 16-bit to 32-bit access for gen2 irq registers, but one was left behind. Fix it. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/5a56286c94e08a02435c60ce0fbff13aca6c0d1f.1744630147.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 24cdab5787a0ae90260df1f8ac8284877a70b7b3 Author: Philipp Stanner Date: Fri Apr 4 12:15:44 2025 +0200 workqueue: Better document teardown for delayed_work destroy_workqueue() does not ensure that non-pending work submitted with queue_delayed_work() gets cancelled. The caller has to ensure that manually. Add this information about delayed_work in destroy_workqueue()'s docstring. Add a TODO for destroy_workqueue() to wait for all delayed_work. Signed-off-by: Philipp Stanner Signed-off-by: Tejun Heo commit d3815ae24f25fea2f94c99c975da05b0a521f6c2 Author: Jani Nikula Date: Fri Apr 11 13:27:15 2025 +0300 drm/i915/dpio: have chv_data_lane_soft_reset() get/put dpio internally Have chv_data_lane_soft_reset() get/put dpio internally, and use a locked version of it within intel_dpio_phy.c. This drops the dependency on vlv sideband from g4x_dp.c and g4x_hdmi.c, and makes that a DPIO PHY implementation detail. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250411102715.613082-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit e96b93a97c90181627cef6e70a0dbc8dbdae4adc Author: Inochi Amaoto Date: Mon Apr 14 06:49:15 2025 +0800 irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller Add support for Sophgo SG2044 MSI interrupt controller. Signed-off-by: Inochi Amaoto Signed-off-by: Thomas Gleixner Tested-by: Chen Wang # SG2042 Reviewed-by: Chen Wang Link: https://lore.kernel.org/all/20250413224922.69719-5-inochiama@gmail.com commit bad2094e3b1c37c683f183a2a885ea0232ba31e9 Author: Inochi Amaoto Date: Mon Apr 14 06:49:14 2025 +0800 irqchip/sg2042-msi: Introduce configurable chipinfo for SG2042 As the controller on SG2044 uses different msi_parent_ops and a difffernt irq_chip, it is necessary to provide that information to the probe function. Add a new chipinfo structure to hold that information, implement the necessary logic and make SG2042 use it. Signed-off-by: Inochi Amaoto Signed-off-by: Thomas Gleixner Tested-by: Chen Wang # SG2042 Reviewed-by: Chen Wang Link: https://lore.kernel.org/all/20250413224922.69719-4-inochiama@gmail.com commit bced55494c23dca674c3c18b4a07ffe7c15000e2 Author: Inochi Amaoto Date: Mon Apr 14 06:49:13 2025 +0800 irqchip/sg2042-msi: Rename functions and data structures to be SG2042 agnostic As the driver logic can be used in both SG2042 and SG2044 SoCs, rename functions and data structures, which are not SG2042 specific, to SG204x*. Signed-off-by: Inochi Amaoto Signed-off-by: Thomas Gleixner Tested-by: Chen Wang # SG2042 Reviewed-by: Chen Wang Link: https://lore.kernel.org/all/20250413224922.69719-3-inochiama@gmail.com commit 9fe5a0790af6af619940a2819aabe8f6fb30700c Author: Inochi Amaoto Date: Mon Apr 14 06:49:12 2025 +0800 dt-bindings: interrupt-controller: Add Sophgo SG2044 MSI controller Like SG2042, SG2044 also uses an external MSI controller to provide MSI interrupt for PCIe controllers. The difference between these two MSI controllers are: 1. SG2044 acks the interrupt by writing 0, SG2042 by setting the bit related to the interrupt. 2. SG2044 uses interrupt number modulo 32 as MSI message data, but SG2042 uses the bit related to the interrupt. Add support for the SG2044 MSI controller. Signed-off-by: Inochi Amaoto Signed-off-by: Thomas Gleixner Tested-by: Chen Wang # SG2042 Reviewed-by: Chen Wang Acked-by: Conor Dooley Link: https://lore.kernel.org/all/20250413224922.69719-2-inochiama@gmail.com commit 6d65f682a9f20ed26c822812129f191455002f1c Author: yangsonghua Date: Mon Apr 14 16:14:36 2025 +0800 sched_ext: Improve cross-compilation support in Makefile Modify the tools/sched_ext/Makefile to better handle cross-compilation environments by: 1. Fix host tools build directory structure by separating obj/ from output (HOST_BUILD_DIR now points to $(OBJ_DIR)/host/obj) 2. Properly propagate CROSS_COMPILE to libbpf sub-make invocation 3. Add missing $(HOST_BPFOBJ) build rule with proper host toolchain flags (ARCH=, CROSS_COMPILE=, explicit HOSTCC/HOSTLD) 4. Consistently quote $(HOSTCC) in bpftool build rule 5. Change LDFLAGS assignment to += to allow external extensions The changes ensure proper cross-compilation behavior while maintaining backward compatibility with native builds. Host tools are now correctly built with the host toolchain while target binaries use the cross-toolchain. Signed-off-by: yangsonghua Signed-off-by: Tejun Heo commit 43e9076a00b17cf8115b4bd4d3b2be33a44245ca Author: Ammar Askar Date: Tue Mar 18 19:53:31 2025 -0400 docs: Fix conflicting contributor identity info In commit d4563201f33a ("Documentation: simplify and clarify DCO contribution example language"), the patch submission documentation was updated to remove the note about pseudonyms and instead simplify it to allow "known identities". The process documentation still explicitly prohibits pseudonymous contributors. This patch changes the process documentation to line up with the submitting patches document. Signed-off-by: Ammar Askar Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250318235331.3566174-1-ammar@ammaraskar.com commit 960c7d67879dd1e65e181b5347ce0b0c3758d6e2 Author: Andres Urian Florez Date: Mon Mar 24 11:45:58 2025 -0500 docs/sp_SP: fix links to mailing list services With the changes in the way mailing lists are hostet at kernel.org, there is a need to sync the Spanish documentation to: 1. fix links that are pointing at the outdated resources 2. remove an outdated patchbomb admonition Signed-off-by: Andres Urian Florez Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250324164613.12639-1-andres.emb.sys@gmail.com commit 770840a0e7e88a5bd74e64f23e3a9021d045caef Author: Tomas Glozar Date: Tue Mar 11 12:49:36 2025 +0100 Documentation/rtla: Include BPF sample collection Add dependencies needed to build rtla with BPF sample collection support to README, and document both ways of sample collection in the manpages. Signed-off-by: Tomas Glozar Acked-by: Steven Rostedt (Google) Reviewed-by: Luis Claudio R. Goncalves Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250311114936.148012-5-tglozar@redhat.com commit e7d3b24e3402db90d13725d89462af468df1a552 Author: Tomas Glozar Date: Tue Mar 11 12:49:35 2025 +0100 Documentation/rtla: Fix typo in common_timerlat_description.rst Fix "it enable" to "it enables". Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar Reviewed-by: Luis Claudio R. Goncalves Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250311114936.148012-4-tglozar@redhat.com commit caa42c6df3c4368ab43adfb8e78a6240177cd989 Author: Tomas Glozar Date: Tue Mar 11 12:49:34 2025 +0100 Documentation/rtla: Fix typo in rtla-timerlat.rst The file says "rtla hist hist mode" instead of "rtla timerlat hist mode". Fix the typo. Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar Reviewed-by: Luis Claudio R. Goncalves Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250311114936.148012-3-tglozar@redhat.com commit 0cc9e7cae3e0986800adae75e0162d5e8e17eef8 Author: Tomas Glozar Date: Tue Mar 11 12:49:33 2025 +0100 Documentation/rtla: Fix duplicate text about timerlat tracer A passage about how the timerlat tracer outputs information is included in both common_timerlat_description.rst and rtla-timerlat.rst, leading it to be displayed twice in the rtla-timerlat page. Remove the duplicate passage from rtla-timerlat.rst. Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation") Signed-off-by: Tomas Glozar Reviewed-by: Luis Claudio R. Goncalves Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250311114936.148012-2-tglozar@redhat.com commit 1af310951e61471504c445d5023cdae27e2cc1d8 Author: Chih Yun Lin Date: Sun Mar 30 16:45:18 2025 +0800 docs: hid: Fix typo in intel-thc-hid.rst Corrected the spelling of "triggerred" to "triggered" and "flexiblity" to "flexibility". Signed-off-by: Chih Yun Lin Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250330084518.20916-1-noralin249@gmail.com commit dd0808ab40ca4c00e1c3cae85614f1a42b3df882 Author: Kevin Paul Reddy Janagari Date: Sat Apr 5 22:21:16 2025 +0530 Added usb_string function to a namespace with reference to WARNING: Duplicate C declaration, also defined at driver-api/usb/gadget:804 There is a function usb_string in the file message.c, there is also a struct usb_string in the kernel api headers. The docs is unable to index the function as the index is occupied by struct This fix adds messgae.c to the usb_core namespace (in docs) hence providing usb_sting a unique index usb_core.usb_string() Signed-off-by: Kevin Paul Reddy Janagari Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250405165116.147958-1-kevinpaul468@gmail.com commit e54ac586674da862967fee790471fd33b81b29e7 Author: Randy Dunlap Date: Fri Apr 4 17:14:47 2025 -0700 cpufreq: editing corrections to cpufreq.rst Change a few words and abbreviations/punctuation. Change one echo command to include a trailing '`'. Signed-off-by: Randy Dunlap Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: linux-pm@vger.kernel.org Cc: Jonathan Corbet Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250405001447.4039463-1-rdunlap@infradead.org commit 3fa3b20ba15cddc4462e64a79d779ad3b2d0d4e1 Author: James Addison Date: Mon Apr 7 21:51:20 2025 +0200 docs: Disambiguate a pair of rST labels According to the reStructuredText documentation, internal hyperlink targets[1] are intended to resolve within the current document. Sphinx has a bug that causes internal hyperlinks declared with duplicate names to resolve nondeterministically, producing incorrect documentation. Sphinx does not yet emit a warning when these duplicate target names are declared. To improve the reproducibility and correctness of the HTML documentation, disambiguate two labels both previously titled "submit_improvements". [1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets Link: https://github.com/sphinx-doc/sphinx/issues/13383 Signed-off-by: James Addison Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250407195120.331103-2-jvanderwaa@redhat.com commit fb42d8dcbc3f01782b4df4ef2b69ec5a902d992e Author: Nícolas F. R. A. Prado Date: Tue Apr 8 13:57:47 2025 -0400 docs: automarkup: Move common logic to add and resolve xref to helper Several of the markup functions contain the same code, calling into sphinx's pending_xref and resolve_xref functions to add and resolve a cross-reference, with only a few of the parameters changed (domain, reference type, markup content). Move this logic to its own function and reuse it in the markup functions. No functional change. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250408-automarkup-resolve-xref-helper-v2-1-e0a9b8fc7fdd@collabora.com commit 9aa08e761b67e3d8b5ca2ff1e9194a73d3000cce Author: Thomas Weißschuh Date: Mon Apr 7 10:17:12 2025 +0200 kunit: qemu_configs: Add riscv32 config Add a basic config to run kunit tests on riscv32. Link: https://lore.kernel.org/r/20250407-kunit-qemu-riscv32-v1-1-7b9800034a35@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a571a9a1b120264e24b41eddf1ac5140131bfa84 Author: Richard Fitzgerald Date: Fri Apr 11 10:59:04 2025 +0100 kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests.config. This helps to detect use of uninitialized local variables. This option found an uninitialized data bug in the cs_dsp test. Link: https://lore.kernel.org/r/20250411095904.1593224-1-rf@opensource.cirrus.com Signed-off-by: Richard Fitzgerald Reviewed-by: David Gow Signed-off-by: Shuah Khan commit dd86a1d013e0c94fedd060514b9e7be2988ef320 Author: Borislav Petkov (AMD) Date: Mon Apr 14 17:09:51 2025 +0200 x86/bugs: Remove X86_BUG_MMIO_UNKNOWN Whack this thing because: - the "unknown" handling is done only for this vuln and not for the others - it doesn't do anything besides reporting things differently. It doesn't apply any mitigations - it is simply causing unnecessary complications to the code which don't bring anything besides maintenance overhead to what is already a very nasty spaghetti pile - all the currently unaffected CPUs can also be in "unknown" status so there's no need for special handling here so get rid of it. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: David Kaplan Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Pawan Gupta Link: https://lore.kernel.org/r/20250414150951.5345-1-bp@kernel.org commit 46e7ea05bf5d9fe4d05e173c824ae173c956cb5f Author: Thorsten Blum Date: Mon Apr 14 13:45:28 2025 +0200 ASoC: cs-amp-lib: Replace offsetof() with struct_size() Use struct_size() to calculate the number of bytes to allocate and used by 'cirrus_amp_efi_data'. Compared to offsetof(), struct_size() provides additional compile-time checks (e.g., __must_be_array()). Reviewed-by: Richard Fitzgerald Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250414114528.355204-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit af5376a77e8759084a9a135f50761607fea31743 Author: Sudeep Holla Date: Mon Mar 17 10:13:13 2025 +0000 cpuidle: psci: Transition to the faux device interface The PSCI cpuidle driver does not require the creation of a platform device. Originally, this approach was chosen for simplicity when the driver was first implemented. With the introduction of the lightweight faux device interface, we now have a more appropriate alternative. Migrate the driver to utilize the faux bus, given that the platform device it previously created was not a real one anyway. This will simplify the code, reducing its footprint while maintaining functionality. Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20250317-plat2faux_dev-v1-1-5fe67c085ad5@arm.com Signed-off-by: Rafael J. Wysocki commit 9179e4a26bf25722714afcdb6a1e632ad52e443b Author: Rob Herring (Arm) Date: Wed Apr 9 15:49:35 2025 -0500 arm64: dts: marvell: Drop unused "pinctrl-names" "pinctrl-names" depends on "pinctrl-[0-9]" properties, but none are present for the pca9555 nodes. Signed-off-by: Rob Herring (Arm) Signed-off-by: Gregory CLEMENT commit 0486b1832dc386c1adb6abef0afbed091d157cd9 Author: Jiale Yang <295107659@qq.com> Date: Wed Nov 20 16:30:28 2024 +0800 fuse: change 'unsigned' to 'unsigned int' Prefer 'unsigned int' to bare 'unsigned', as reported by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Jiale Yang <295107659@qq.com> Signed-off-by: Miklos Szeredi commit b0a1c9d4893accb3801afdbe5ca938e66ad75324 Author: Peng Fan Date: Tue Apr 8 16:44:31 2025 +0800 MAINTAINERS: add entry for i.MX SCMI extensions Add entry for i.MX SCMI extensions and myself as maintainer Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-7-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 1055faa5d6606cccc706e37956f6ff8fb7c22d55 Author: Peng Fan Date: Tue Apr 8 16:44:30 2025 +0800 firmware: imx: Add i.MX95 SCMI CPU driver The i.MX95 System manager exports SCMI CPU protocol for linux to manage cpu cores. The driver is to use the cpu Protocol interface to start, stop a cpu cores (eg, M7). Reviewed-by: Cristian Marussi Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-6-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 7242bbf418f0521c0e3dd7034b7b3cc4413d7d5a Author: Peng Fan Date: Tue Apr 8 16:44:29 2025 +0800 firmware: imx: Add i.MX95 SCMI LMM driver The i.MX95 System manager exports SCMI LMM protocol for linux to manage Logical Machines. The driver is to use the LMM Protocol interface to boot, shutdown a LM. Reviewed-by: Cristian Marussi Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-5-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit c31a0b6402d15b530514eee9925adfcb8cfbb1c9 Author: Lucas De Marchi Date: Wed Apr 9 21:59:34 2025 -0700 drm/xe: Set LRC addresses before guc load The metadata saved in the ADS is read by GuC when it's initialized. Saving the addresses to the LRCs when they are populated is too late as GuC will keep using the old ones. This was causing GuC to use the RCS LRC for any engine class. It's not a big problem on a Linux-only scenario since the they are used by GuC only on media engines when the watchdog is triggered. However, in a virtualization scenario with Windows as the VF, it causes the wrong LRCs to be loaded as the watchdog is used for all engines. Fix it by letting guc_golden_lrc_init() initialize the metadata, like other *_init() functions, and later guc_golden_lrc_populate() to copy the LRCs to the right places. The former is called before the second GuC load, while the latter is called after LRCs have been recorded. Cc: Chee Yin Wong Cc: John Harrison Cc: Matt Roper Cc: Matthew Brost Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: # v6.11+ Reviewed-by: Matthew Brost Tested-by: Chee Yin Wong Link: https://lore.kernel.org/r/20250409-fix-guc-ads-v1-1-494135f7a5d0@intel.com Signed-off-by: Lucas De Marchi commit 23b8bacf154759ed922d25527dda434fbf57436a Author: Joel Granados Date: Tue Mar 18 22:30:09 2025 +0100 sysctl: Close test ctl_headers with a for loop As more tests are added, the exit function gets longer than it should be. Condense the un-register calls into a for loop to make it easier to add/remove tests. Reviewed-by: Kees Cook Signed-off-by: Joel Granados commit 2bac112eaaf391f190905134cc8e7ffc02dd131c Author: Joel Granados Date: Tue Mar 18 22:04:28 2025 +0100 sysctl: call sysctl tests with a for loop As we add more test functions in lib/tests_sysctl the main test function (test_sysctl_init) grows. Condense the logic to make it easier to add/remove tests. Reviewed-by: Kees Cook Signed-off-by: Joel Granados commit 8e4acabdc8691529c163c18a45bcdd332bd75145 Author: Joel Granados Date: Fri Mar 21 09:44:39 2025 +0100 sysctl: Add 0012 to test the u8 range check Add a sysctl test that uses the new u8 test ctl files in a created by the sysctl test module. Check that the u8 proc file that is valid is created and that there are two messages in dmesg for the files that were out of range. Reviewed-by: Kees Cook Signed-off-by: Joel Granados commit 138303ec6ccbe38611931eeb955a722c6f78ec25 Author: Joel Granados Date: Thu Mar 13 22:35:25 2025 +0100 sysctl: move u8 register test to lib/test_sysctl.c If the test added in commit b5ffbd139688 ("sysctl: move the extra1/2 boundary check of u8 to sysctl_check_table_array") is run as a module, a lingering reference to the module is left behind, and a 'sysctl -a' leads to a panic. To reproduce CONFIG_KUNIT=y CONFIG_SYSCTL_KUNIT_TEST=m Then run these commands: modprobe sysctl-test rmmod sysctl-test sysctl -a The panic varies but generally looks something like this: BUG: unable to handle page fault for address: ffffa4571c0c7db4 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 100000067 P4D 100000067 PUD 100351067 PMD 114f5e067 PTE 0 Oops: Oops: 0000 [#1] SMP NOPTI ... ... ... RIP: 0010:proc_sys_readdir+0x166/0x2c0 ... ... ... Call Trace: iterate_dir+0x6e/0x140 __se_sys_getdents+0x6e/0x100 do_syscall_64+0x70/0x150 entry_SYSCALL_64_after_hwframe+0x76/0x7e Move the test to lib/test_sysctl.c where the registration reference is handled on module exit Fixes: b5ffbd139688 ("sysctl: move the extra1/2 boundary check of u8 to sysctl_check_table_array") Reviewed-by: Kees Cook Signed-off-by: Joel Granados commit b65999e7238e6f2a48dc77c8c2109c48318ff41b Author: Fernando Fernandez Mancera Date: Wed Apr 9 12:19:11 2025 +0200 net: hsr: sync hw addr of slave2 according to slave1 hw addr on PRP In order to work properly PRP requires slave1 and slave2 to share the same MAC address. To ease the configuration process on userspace tools, sync the slave2 MAC address with slave1. In addition, when deleting the port from the list, restore the original MAC address. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: David S. Miller commit 1363c134ade81e425873b410566e957fecebb261 Author: Zijun Hu Date: Thu Apr 10 19:45:27 2025 +0800 fs/filesystems: Fix potential unsigned integer underflow in fs_name() fs_name() has @index as unsigned int, so there is underflow risk for operation '@index--'. Fix by breaking the for loop when '@index == 0' which is also more proper than '@index <= 0' for unsigned integer comparison. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/20250410-fix_fs-v1-1-7c14ccc8ebaa@quicinc.com Signed-off-by: Christian Brauner commit 698d1b483cd1c7126d61de8d155aceec50c04fb2 Author: Zijun Hu Date: Thu Apr 10 19:45:31 2025 +0800 fs/fs_context: Mark an unlikely if condition with unlikely() in vfs_parse_monolithic_sep() There is no mount option with pattern "...,=key_or_value,...", so the if condition '(value == key)' in while loop of vfs_parse_monolithic_sep() is is unlikely true. Mark the condition with unlikely() to improve both performance and readability. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/20250410-fix_fs-v1-5-7c14ccc8ebaa@quicinc.com Signed-off-by: Christian Brauner commit 1d17057d2166a192b3fad358a20c93fa3e994ef8 Author: Zijun Hu Date: Thu Apr 10 19:45:30 2025 +0800 fs/fs_parse: Correct comments of fs_validate_description() For fs_validate_description(), its comments easily mislead reader that the function will search array @desc for duplicated entries with name specified by parameter @name, but @name is not used for search actually. Fix by marking name as owner's name of these parameter specifications. Signed-off-by: Zijun Hu Signed-off-by: Christian Brauner commit 2b4ce994afca0690ab79b7860045e6883e8706db Author: Kuninori Morimoto Date: Mon Apr 14 00:45:59 2025 +0000 ASoC: simple-card-utils: fixup dlc->xxx handling for error case Current graph_util_parse_dai() has 2 issue for dlc->xxx handling. 1) dlc->xxx might be filled if snd_soc_get_dai_via_args() (A) works. In such case it will fill dlc->xxx first (B), and detect error after that (C). We need to fill dlc->xxx in success case only. (A) dai = snd_soc_get_dai_via_args(&args); if (dai) { ret = -ENOMEM; ^ dlc->of_node = ... (B) dlc->dai_name = ... v dlc->dai_args = ... (C) if (!dlc->dai_args) goto end; ... } 2) graph_util_parse_dai() itself has 2 patterns (X)(Y) to fill dlc->xxx. Both case, we need to call of_node_put(node) (Z) in error case, but we are calling it only in (Y) case. int graph_util_parse_dai(...) { ... dai = snd_soc_get_dai_via_args(&args); if (dai) { ... ^ dlc->of_node = ... (X) dlc->dai_name = ... v dlc->dai_args = ... ... } ... (Y) ret = snd_soc_get_dlc(&args, dlc); if (ret < 0) { (Z) of_node_put(node); ... } ... } This patch fixup both case. Make it easy to understand, update lavel "end" to "err", too. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87fribr2ns.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2c6b6a3e8b9338e7ddbbd699f3cb085fbc78413a Author: Kuninori Morimoto Date: Mon Apr 14 01:01:38 2025 +0000 ASoC: rsnd: use snd_pcm_direction_name() We already have snd_pcm_direction_name(). Let's use it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87bjszr1xp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 84d37635986987649fec6dd7358392243a35601e Author: Michal Wajdeczko Date: Fri Apr 11 21:30:30 2025 +0200 drm/xe/pf: Don't show GGTT/LMEM debugfs files under media GT Most of the PF's debugfs files (and their implementations) are based on the GT hierarchy even if files are related to GGTT or LMEM data, that are related to the tile. While we could reach the tile data from any GT, to avoid potential misuse, some functions allow to be used on the primary GT only, and may use asserts to enforce that. In our case, the following assert could be seen when reading the /sys/kernel/debug/dri/0000:00:02.0/gt1/pf/ggtt_available [ ] xe 0000:00:02.0: [drm] Assertion `!xe_gt_is_media_type(gt)` failed! [ ] WARNING: CPU: 4 PID: 10609 at drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c:379 pf_get_spare_ggtt+0x256/0x4e0 [xe] [ ] RIP: 0010:pf_get_spare_ggtt+0x256/0x4e0 [xe] [ ] Call Trace: [ ] [ ] xe_gt_sriov_pf_config_print_available_ggtt+0xb7/0x480 [xe] [ ] ? __memcg_slab_post_alloc_hook+0x12f/0x3f0 [ ] xe_gt_debugfs_simple_show+0x7b/0xb0 [xe] [ ] ? __pfx___drm_printfn_seq_file+0x10/0x10 [ ] ? __pfx___drm_puts_seq_file+0x10/0x10 [ ] seq_read_iter+0x139/0x4e0 [ ] seq_read+0x11d/0x160 [ ] full_proxy_read+0x6b/0xb0 [ ] vfs_read+0xfa/0x390 Fix that by moving GGTT/LMEM debugfs attributes to separate lists and register them only when applicable (on primary GT, on DGFX). Signed-off-by: Michal Wajdeczko Tested-by: Marcin Bernatowicz Reviewed-by: Marcin Bernatowicz Link: https://lore.kernel.org/r/20250411193030.1865-1-michal.wajdeczko@intel.com commit 9fb6938d55348ee3e47deff9646fae59a15ed1c9 Author: Borislav Petkov (AMD) Date: Mon Apr 14 11:41:29 2025 +0200 x86/cpuid: Align macro linebreaks vertically Align the backspaces vertically again, after recent cleanups. No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Cc: Ahmed S. Darwish Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250414094130.6768-1-bp@kernel.org commit 5865e8c4ae9d90796570a9d181c64afe1f455100 Merge: fabb0a108a848a 436a3cc8afbf34 Author: Mark Brown Date: Mon Apr 14 11:24:01 2025 +0100 Add support for Loongson-1 AC97 Merge series from Keguang Zhang : Add the driver and dt-binding document for Loongson-1 AC97. Add the dt-binding document for Realtek ALC203 Codec. Add DT support for the AC97 generic codec driver. commit fabb0a108a848a3b264a46aa6137ab88daade9b3 Merge: 416e3bd3b0b6a4 8d2e914482311f Author: Mark Brown Date: Mon Apr 14 11:23:57 2025 +0100 ASoC: convert GPIO chips to using new value setters Merge series from Bartosz Golaszewski : struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. We're in the process of converting all GPIO drivers to using the new API. This series converts all ASoC GPIO controllers. commit 416e3bd3b0b6a4fa0316559f799e63fcfc79107a Merge: 4aa502d28bc2de 38c2585c7439cc Author: Mark Brown Date: Mon Apr 14 11:23:53 2025 +0100 ASoC: Add Richtek rt9123 and rt9123p support Merge series from cy_huang@richtek.com: This patch series adds Richtek rt9123 and rt9123p support. It's a 3.2W mono Class-D audio amplifier. commit 4aa502d28bc2deffcdf62f2908d9e52902b36f02 Merge: e78e7856d23301 186dfc85f9a824 Author: Mark Brown Date: Mon Apr 14 11:23:48 2025 +0100 ASoC: tas27{64,70}: improve support for Apple codec Merge series from James Calligeros : This series introduces a number of changes to the drivers for the Texas Instruments TAS2764 and TAS2770 amplifiers in order to introduce (and improve in the case of TAS2770) support for the variants of these amps found in Apple Silicon Macs. Apple's variant of TAS2764 is known as SN012776, and as always with Apple is a subtly incompatible variant with a number of quirks. It is not publicly available. The TAS2770 variant is known as TAS5770L, and does not require incompatible handling. Much as with the Cirrus codec patches, I do not expect that we will get any official acknowledgement that these parts exist from TI, however I would be delighted to be proven wrong. This series has been living in the downstream Asahi kernel tree[1] for over two years, and has been tested by many thousands of users by this point[2]. v4 drops the TDM idle TX slot behaviour patches. I experimented with the API discussed in v3, however this did not work on any of the machines I tested it with. More tweaking is probably needed. [1] https://github.com/AsahiLinux/linux/tree/asahi-wip [2] https://stats.asahilinux.org/ commit 7762fdab23100514e5cb612331c96bd65126ada5 Author: Chen Ni Date: Mon Apr 14 10:19:50 2025 +0800 regulator: adp5055: Remove unneeded semicolon Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250414021950.3755819-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 4f8ef33dd44a3d1136d3934609b8a43e62aaaa0d Author: Bard Liao Date: Mon Apr 14 14:32:39 2025 +0800 ASoC: soc_sdw_utils: skip the endpoint that doesn't present A codec endpoint may not be used. We could check the present SDCA functions to know if the endpoint is used or not. Skip the endpoint which is not used. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250414063239.85200-12-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 6d893cfb3d399a9eae95a8c23041dc42dc6dc18f Author: Bard Liao Date: Mon Apr 14 14:32:38 2025 +0800 ASoC: sdw_utils: split asoc_sdw_get_codec_name Currently asoc_sdw_get_codec_name will return codec_info->codec_name if it is set. However, in some case we need the sdw codec name no matter if codec_info->codec_name is set or not. _asoc_sdw_get_codec_name() will be used in the follow up commit. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250414063239.85200-11-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit cf8a4ca84cbf52700beaa40850647040af06b749 Author: Bard Liao Date: Mon Apr 14 14:32:37 2025 +0800 ASoC: Intel: soc-acpi-intel-mtl-match: add get_function_tplg_files ops The audio configs with multi-function SDCA codecs can use the sof_sdw_get_tplg_files ops to get function topologies dynamically. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 5a0c4a0925f4525743ee08aa3930fdc256d920f0 Author: Bard Liao Date: Mon Apr 14 14:32:36 2025 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: add get_function_tplg_files ops The audio configs with multi-function SDCA codecs can use the sof_sdw_get_tplg_files ops to get function topologies dynamically. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit d348b4181cd15ed432c2ae7eb33ef1bb7dfd7527 Author: Bard Liao Date: Mon Apr 14 14:32:35 2025 +0800 ASoC: Intel: soc-acpi-intel-arl-match: set get_function_tplg_files ops The audio configs with multi-function SDCA codecs can use the sof_sdw_get_tplg_files ops to get function topologies dynamically. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 143b7a87aa0f949f81e2e80d72f1455667a3d5de Author: Bard Liao Date: Mon Apr 14 14:32:34 2025 +0800 ASoC: Intel: soc-acpi-intel-lnl-match: set get_function_tplg_files ops The audio configs with multi-function SDCA codecs can use the sof_sdw_get_tplg_files ops to get function topologies dynamically. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 2fbeff33381cf017facbf5f13d34693baa5a2296 Author: Bard Liao Date: Mon Apr 14 14:32:33 2025 +0800 ASoC: Intel: add sof_sdw_get_tplg_files ops Add sof_sdw_get_tplg_files ops to get sub-topology file names for the sof_sdw card. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 6d5997c412cc4beb859b37cc4eaa61e54fc076a3 Author: Bard Liao Date: Mon Apr 14 14:32:32 2025 +0800 ASoC: SOF: topology: load multiple topologies Currently, we always use single topology file to describe the widgets. However, with SDCA, we want to be able to load sub-topologies based on the supported device functions. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit d1e70eed0b30bd2b15fc6c93b5701be564bbe353 Author: Bard Liao Date: Mon Apr 14 14:32:31 2025 +0800 ASoC: soc-acpi: add get_function_tplg_files ops We always use a single topology that contains all PCM devices belonging to a machine configuration. However, with SDCA, we want to be able to load function topologies based on the supported device functions. This change is in preparation for loading those function topologies. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 18877fd3799575e0595d98d799b5509be234e50f Author: Bard Liao Date: Mon Apr 14 14:32:30 2025 +0800 ASoC: SOF: topology: don't convert error code No need to convert the return value of snd_soc_tplg_component_load(). Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 2c91f33c72db65a053e1aedfd662c1c984fb4c02 Author: Bard Liao Date: Mon Apr 14 14:32:29 2025 +0800 ASoC: SOF: topology: allocate string for tuples In preparation to handle tuples from multiple topologies, duplicate the tuple string value by allocating memory for it. Signed-off-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250414063239.85200-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit e5ea18102c9d3bc2fcb186a6e9f43c5a4aba4f98 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:19 2025 +0200 soc: mediatek: mtk-dvfsrc: Add support for Dimensity 1200 MT6893 Add support for the MediaTek Dimensity 1200 (MT6893) SoC's DVFSRC v2 hardware: the only difference between this and the only other supported DVFSRCv2 SoC (MT8195) is the VCore-DRAM OPP array. Link: https://lore.kernel.org/r/20250410144019.475930-6-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b06785283ec1c24fadce95390047feb9db840051 Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:18 2025 +0200 soc: mediatek: mtk-dvfsrc: Rename and move bw constraints data Rename the MT8183 and MT8195 bandwidth constraints data structure to, respectively, dvfsrc_bw_constr_v1 and dvfsrc_bw_constr_v2, as the actual constraints are depending on the DVFSRC version rather than on the SoC. While at it, to prepare for adding a new SoC, also move the two structures at the start of the platform data code section. Link: https://lore.kernel.org/r/20250410144019.475930-5-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit ba3297872a237c8949e812ffa72c64e81da38cec Author: AngeloGioacchino Del Regno Date: Thu Apr 10 16:40:15 2025 +0200 dt-bindings: soc: mediatek: dvfsrc: Add support for MT6893 Add a compatible for the MediaTek Dimensity 1200 (MT6893) SoC's DVFSRC hardware, introducing capability to communicate with it. Even though this SoC uses the same basic version of the DVFSRC IP as MT8195, the vcore-vdram parameters are different, hence no fallback compatibility is possible. Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250410144019.475930-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 7d346bf124282d0326dd4f1b104b2d07d902ef23 Author: Łukasz Majczak Date: Fri Mar 28 12:13:00 2025 +0000 arm64: dts: mediatek: mt8186: starmie: Fix external display The dpi-default-pins overwrittes the same called node, defined in mt8186-corsola.dtsi with the wrong set of pins, so remove it from mt8186-corsola-starmie.dtsi as the first one is correct and sufficient. In addition, remove dpi-func-pins node from mt8186-corsola-starmie.dtsi, as it is not used anywhere and also defines the same set of pins as dpi-default-pins node already present in mt8186-corsola.dtsi. Verifeid above with Corsola/Starmie device, by connecting external screen with usb-c -> hdmi adapter. Signed-off-by: Łukasz Majczak Link: https://lore.kernel.org/r/20250328121300.2612942-1-lmajczak@google.com Signed-off-by: AngeloGioacchino Del Regno commit 394f29033324e2317bfd6a7ed99b9a60832b36a2 Author: AngeloGioacchino Del Regno Date: Wed Apr 2 11:06:15 2025 +0200 arm64: dts: mediatek: mt8195: Reparent vdec1/2 and venc1 power domains By hardware, the first and second core of the video decoder IP need the VDEC_SOC to be powered up in order to be able to be accessed (both internally, by firmware, and externally, by the kernel). Similarly, for the video encoder IP, the second core needs the first core to be powered up in order to be accessible. Fix that by reparenting the VDEC1/2 power domains to be children of VDEC0 (VDEC_SOC), and the VENC1 to be a child of VENC0. Fixes: 2b515194bf0c ("arm64: dts: mt8195: Add power domains controller") Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20250402090615.25871-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit ec71844817266c8d301f5745126cdbdafd33edea Author: Louis-Alexis Eyraud Date: Thu Apr 3 10:05:16 2025 +0200 arm64: dts: mediatek: mt8390-genio-common: Fix pcie pinctrl dtbs_check error Rename pcie pinctrl definition to fix the following dtbs_check error for mt8370-genio-510-evk and mt8390-genio-700-evk devicetree files: ``` pinctrl@10005000: 'pcie-default' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' ``` Signed-off-by: Louis-Alexis Eyraud Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250403-mt8390-genio-common-fix-pcie-dtbs-check-error-v1-1-70d11fc1482e@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit f19d67bbe6cbe375dce9976ad1e9690aaeaa33e1 Author: Julien Massot Date: Fri Apr 4 15:53:10 2025 +0200 arm64: dts: mediatek: mt8395-genio-1200-evk: Add scp firmware-name Set the scp firmware name to the default location. Fixes: f2b543a191b6 ("arm64: dts: mediatek: add device-tree for Genio 1200 EVK board") Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250404-mt8395-scp-fw-v1-2-bb8f20cd399d@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 898b289ac89bcd0c793bb5b894d29599ab447fd5 Author: Julien Massot Date: Fri Apr 4 15:53:09 2025 +0200 arm64: dts: mediatek: mt8395-nio-12l: Add scp firmware-name Set the scp firmware name to the default location. Fixes: 96564b1e2ea4 ("arm64: dts: mediatek: Introduce the MT8395 Radxa NIO 12L board") Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250404-mt8395-scp-fw-v1-1-bb8f20cd399d@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 1468d6b1d3803bebd36ef61b705d2c5b97015713 Author: Vasily Gorbik Date: Fri Apr 11 01:45:49 2025 +0200 s390/boot: Replace strncpy() with strscpy() Replace the last 2 usages of strncpy() in s390 code with strscpy(). Signed-off-by: Vasily Gorbik Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit f271df9d41c216f6189c40fa1cb83839a6117c3e Author: Vasily Gorbik Date: Fri Apr 11 01:45:47 2025 +0200 s390/boot: Add sized_strscpy() to enable strscpy() usage Add a simple sized_strscpy() implementation to allow the use of strscpy() in the decompressor. Signed-off-by: Vasily Gorbik Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit fe20164177be007f490b79db94ed8d65c4e48bb0 Author: Heiko Carstens Date: Wed Apr 9 15:01:51 2025 +0200 s390/mm: Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM so that activate_mm() is called with irqs disabled. This allows to call switch_mm_irqs_off() instead of switch_mm() and saves two local_irq_save() / local_irq_restore() pairs. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 8b72f5a97b82185806ff085582ece86ce5b9811e Author: Heiko Carstens Date: Wed Apr 9 15:01:50 2025 +0200 s390/mm: Reimplement lazy ASCE handling Reduce system call overhead time (round trip time for invoking a non-existent system call) by 25%. With the removal of set_fs() [1] lazy control register handling was removed in order to keep kernel entry and exit simple. However this made system calls slower. With the conversion to generic entry [2] and numerous follow up changes which simplified the entry code significantly, adding support for lazy asce handling doesn't add much complexity to the entry code anymore. In particular this means: - On kernel entry the primary asce is not modified and contains the user asce - Kernel accesses which require secondary-space mode (for example futex operations) are surrounded by enable_sacf_uaccess() and disable_sacf_uaccess() calls. enable_sacf_uaccess() sets the primary asce to kernel asce so that the sacf instruction can be used to switch to secondary-space mode. The primary asce is changed back to user asce with disable_sacf_uaccess(). The state of the control register which contains the primary asce is reflected with a new TIF_ASCE_PRIMARY bit. This is required on context switch so that the correct asce is restored for the scheduled in process. In result address spaces are now setup like this: CPU running in | %cr1 ASCE | %cr7 ASCE | %cr13 ASCE -----------------------------|-----------|-----------|----------- user space | user | user | kernel kernel (no sacf) | user | user | kernel kernel (during sacf uaccess) | kernel | user | kernel kernel (kvm guest execution) | guest | user | kernel In result cr1 control register content is not changed except for: - futex system calls - legacy s390 PCI system calls - the kvm specific cmpxchg_user_key() uaccess helper This leads to faster system call execution. [1] 87d598634521 ("s390/mm: remove set_fs / rework address space handling") [2] 56e62a737028 ("s390: convert to generic entry") Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit e68c305bc2f3cdc0b6fa21cd9579650c1457c070 Author: Peng Fan Date: Tue Apr 8 16:44:28 2025 +0800 firmware: arm_scmi: imx: Add i.MX95 CPU Protocol This protocol allows an agent to start, stop a CPU or set reset vector. It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an AP cluster). Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-4-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 267623000d11f6d483214be2484555f600393a12 Author: Chen-Yu Tsai Date: Tue Apr 8 17:23:02 2025 +0800 arm64: dts: mediatek: mt8188: Fix IOMMU device for rdma0 Based on the comments in the MT8188 IOMMU binding header, the rdma0 device specifies the wrong IOMMU device for the IOMMU port it is tied to: This SoC have two MM IOMMU HWs, this is the connected information: iommu-vdo: larb0/2/5/9/10/11A/11C/13/16B/17B/19/21 iommu-vpp: larb1/3/4/6/7/11B/12/14/15/16A/17A/23/27 rdma0's endpoint is M4U_PORT_L1_DISP_RDMA0 (on larb1), which should use iommu-vpp, but it is currently tied to iommu-vdo. Somehow this went undetected until recently in Linux v6.15-rc1 with some IOMMU subsystem framework changes that caused the IOMMU to no longer work. The IOMMU would fail to probe if any devices associated with it could not be successfully attached. Prior to these changes, only the end device would be left without an IOMMU attached. Fixes: 7075b21d1a8e ("arm64: dts: mediatek: mt8188: Add display nodes for vdosys0") Signed-off-by: Chen-Yu Tsai Reviewed-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250408092303.3563231-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 34180863e000f325e5d11a2fd4af300a0ae50f71 Author: Peng Fan Date: Tue Apr 8 16:44:27 2025 +0800 firmware: arm_scmi: imx: Add i.MX95 LMM protocol Add Logical Machine Management(LMM) protocol which is intended for boot, shutdown, and reset of other logical machines (LM). It is usually used to allow one LM to manager another used as an offload or accelerator engine. Reviewed-by: Cristian Marussi Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-3-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 73b7a51b74450be62f90b3045ff85d28a0e8877e Author: Peng Fan Date: Tue Apr 8 16:44:26 2025 +0800 dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol Add i.MX SCMI Extension protocols bindings for: - Logic Machine Management(LMM) Protocol intended for boot, shutdown, and reset of other logical machines (LM). It is usually used to allow one LM to manager another used as an offload or accelerator engine.. - CPU Protocol. allows an agent to start or stop a CPU. It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an AP cluster). Reviewed-by: Rob Herring (Arm) Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-2-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 15ec0e776935fedfff7a911635c5b1b8a3db80fa Author: Peng Fan Date: Tue Apr 8 16:44:25 2025 +0800 firmware: arm_scmi: imx: Add LMM and CPU documentation Add i.MX95 Logical Machine Management and CPU Protocol documentation. Reviewed-by: Cristian Marussi Signed-off-by: Peng Fan Message-Id: <20250408-imx-lmm-cpu-v4-1-4c5f4a456e49@nxp.com> Signed-off-by: Sudeep Holla commit 07cb8c324b63c3e09245b9a8c4ca805a8ca1c8e6 Author: Cristian Marussi Date: Mon Mar 10 18:08:11 2025 +0000 firmware: arm_scmi: Add polling support to raw mode Provide a couple of additional debugfs entries to enable polling-mode on the waiting path of injected messages: message_poll will cause the system to poll while waiting for the reply, while message_poll_async will send an asynchronous message, as usual, and will use polling mode for the immediate synchronous part of the async command. Signed-off-by: Cristian Marussi Message-Id: <20250310180811.1463539-1-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla commit 9593804c44c24545e1b0496786dcb765d7b0e193 Author: Sudeep Holla Date: Mon Mar 17 10:31:25 2025 +0000 firmware: arm_scmi: Exclude transport devices from bus matching Transport devices are currently being unintentionally matched to drivers with the same name, allowing their probe function to be invoked. However, the bus notifier prevents them from setting up handles, rendering them unable to utilize SCMI core functionality. Instead of relying on the bus notifier which can't prevent bus matching even if it returns early or error, move the check into the bus matching logic itself. This change ensures that transport devices are entirely excluded from driver matching, preventing any unintended probe attempts. Message-Id: <20250317-b4-scmi_minor_cleanup-v2-5-f4be99bd9864@arm.com> Signed-off-by: Sudeep Holla commit 953f4ce0a8d38ad87cade45355f5647071272a3a Author: Sudeep Holla Date: Mon Mar 17 10:31:24 2025 +0000 firmware: arm_scmi: Assign correct parent to arm-scmi platform device With the decoupling of transport drivers from the SCMI core, the "arm-scmi" platform device is now created dynamically from the probed transport driver. Currently, this "arm-scmi" platform device is added to the root of the platform bus since no parent is assigned. However, the transport platform device, created from the "firmware:scmi" node in the device tree, should be considered its parent. Ensure that the parent device is correctly set for the "arm-scmi" platform device, aligning it with the correct transport hierarchy. This will be more useful on systems with multiple transport and/or SCMI firmware instances as the hierarchy is maintained correctly. Message-Id: <20250317-b4-scmi_minor_cleanup-v2-4-f4be99bd9864@arm.com> Signed-off-by: Sudeep Holla commit c69a31c1ad74c117054be297bc428ef7e647063e Author: Sudeep Holla Date: Mon Mar 17 10:31:23 2025 +0000 firmware: arm_scmi: Refactor error logging from SCMI device creation to single helper Refactors the error logging related to SCMI device creation. The goal is to remove duplicated error-handling code and centralize it into a single helper function: _scmi_device_create(). By doing so, any code redundancy around error logging is avoided, as error logging during device creation will now be handled by a unified helper function. Message-Id: <20250317-b4-scmi_minor_cleanup-v2-3-f4be99bd9864@arm.com> Signed-off-by: Sudeep Holla commit 3da2859ee5c94771bf8275a27febe56bedd4425a Author: Sudeep Holla Date: Mon Mar 17 10:31:22 2025 +0000 firmware: arm_scmi: Refactor device matching logic to eliminate duplication Currently, the device matching logic is duplicated in two functions: - scmi_dev_match() used by the scmi_bus to match scmi_devices with scmi_drivers. - scmi_child_dev_find() used to check for the presence of a device with the same name and protocol_id to avoid adding duplicates to the bus. Refactor the code to eliminate the redundant matching logic and consolidates the functionality for better maintainability and efficiency. Message-Id: <20250317-b4-scmi_minor_cleanup-v2-2-f4be99bd9864@arm.com> Signed-off-by: Sudeep Holla commit db28d02c4017560761d345fa2f28d728139d4e9d Author: Sudeep Holla Date: Mon Mar 17 10:31:21 2025 +0000 firmware: arm_scmi: Ensure scmi_devices are always matched by name as well Currently, devices without a name in the id_table cannot register drivers, and no scmi_device is created without a name via scmi_device_create(). However, the function __scmi_device_create() allows devices with no name, which are then labeled as "unknown." Removes support for matching scmi_device instances without a name, ensuring consistency across the driver registration and probing process. Message-Id: <20250317-b4-scmi_minor_cleanup-v2-1-f4be99bd9864@arm.com> Signed-off-by: Sudeep Holla commit 03a45e17e636ee1962d8c175c12a0ff48a0b7ccd Author: Wolfram Sang Date: Thu Apr 10 09:14:09 2025 +0200 ARM: dts: renesas: r9a06g032-rzn1d400-eb: describe SD card port Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250410071406.9669-6-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 5147708ee812a5eac5202f231d48b5be1fea781d Author: Wolfram Sang Date: Thu Apr 10 09:14:08 2025 +0200 ARM: dts: renesas: r9a06g032: Describe SDHCI controllers Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250410071406.9669-5-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 1a42724ac93535a3aa23a60cbb89ce2635b5075c Author: Lad Prabhakar Date: Mon Apr 7 20:16:28 2025 +0100 arm64: dts: renesas: Add initial device tree for RZ/V2N EVK Add the initial device tree for the Renesas RZ/V2N EVK board, based on the R9A09G056N48 SoC. Enable basic board functionality, including: - Memory mapping (reserve the first 128MB for the secure area) - Clock inputs (QEXTAL, RTXIN, AUDIO_EXTAL) - PINCTRL configurations for peripherals - Serial console (SCIF) - SDHI1 with power control and UHS modes Update the Makefile to include the new DTB. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-13-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 74e252ac272df5a1b468ebf9fb72a25dc38b9b1b Author: Lad Prabhakar Date: Mon Apr 7 20:16:27 2025 +0100 arm64: dts: renesas: Add initial SoC DTSI for RZ/V2N Add the initial Device Tree Source Include (DTSI) file for the Renesas RZ/V2N (R9A09G056) SoC. Include support for the following components: - CPU (Cortex-A55 cores with operating points) - External clocks (audio, qextal, rtxin) - Pin controller (GPIO support) - Clock Pulse Generator (CPG) - System controller (SYS) - Serial Communication Interface (SCIF) - Secure Digital Host Interface (SDHI 0/1/2) - Generic Interrupt Controller (GIC) - ARMv8 timer Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-12-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7ed3c77a428d654c744522c98da53c8c2d77d31b Merge: dc40879d4676dc 626acded47269b Author: Geert Uytterhoeven Date: Mon Apr 14 10:59:34 2025 +0200 Merge tag 'renesas-r9a09g056-dt-binding-defs-tag1' into renesas-dts-for-v6.16 Renesas RZ/V2N DT Bindings and Definitions DT bindings and binding definitions for the Renesas RZ/V2N (R9A09G056) SoC, shared by driver and DT source files. commit f6462eb04f24447e3f9cc33071bbcb888f521985 Author: Lad Prabhakar Date: Mon Apr 7 20:16:24 2025 +0100 clk: renesas: rzv2h: Add support for RZ/V2N SoC The clock structure for RZ/V2N is almost identical to RZ/V2H(P) SoC with less IP blocks compared to RZ/V2H(P). For eg: CRU2/3 are present only on the RZ/V2H(P) SoC. Add minimal clock and reset entries required to boot the Renesas RZ/V2N EVK and binds it with the RZ/V2H CPG family driver. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 019b1a845404a97705726272d8a3ced6e78e592e Merge: c3400fd7c717e7 626acded47269b Author: Geert Uytterhoeven Date: Mon Apr 14 10:56:36 2025 +0200 Merge tag 'renesas-r9a09g056-dt-binding-defs-tag1' into renesas-clk-for-v6.16 Renesas RZ/V2N DT Bindings and Definitions DT bindings and binding definitions for the Renesas RZ/V2N (R9A09G056) SoC, shared by driver and DT source files. commit c3400fd7c717e752701e6832175f86ff935b812b Author: Lad Prabhakar Date: Mon Apr 7 20:16:23 2025 +0100 clk: renesas: rzv2h: Sort compatible list based on SoC part number Reorder the compatible entries in `rzv2h_cpg_match[]` to follow a numerical sequence based on the SoC part numbers. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 31d358e611b7cc21349da58dd2c9118c84b0859f Author: Lad Prabhakar Date: Mon Apr 7 20:16:18 2025 +0100 soc: renesas: Add config option for RZ/V2N (R9A09G056) SoC Add a new Kconfig option, ARCH_R9A09G056, to enable ARM64 platform support for the Renesas RZ/V2N SoC. Default this option to "y" when ARCH_RENESAS is enabled, ensuring that support for the RZ/V2N SoC is automatically included. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit aec8a40228acb385d60feec59b54573d307e60f3 Author: Thomas Zimmermann Date: Mon Mar 17 14:06:52 2025 +0100 drm/vmwgfx: Use dma_buf from GEM object instance Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Zack Rusin Cc: Broadcom internal kernel review list Reviewed-by: Zack Rusin Link: https://lore.kernel.org/r/20250317131923.238374-15-tzimmermann@suse.de commit 5a80b00d0d10b920397b9cbd4102b1c07ba6583a Author: Thomas Zimmermann Date: Mon Mar 17 14:06:51 2025 +0100 drm/vmwgfx: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Zack Rusin Cc: Broadcom internal kernel review list Reviewed-by: Zack Rusin Link: https://lore.kernel.org/r/20250317131923.238374-14-tzimmermann@suse.de commit 266ab86ac1f5c05a91bd1a73929c590bfeb3c491 Author: Thomas Zimmermann Date: Mon Mar 17 14:06:47 2025 +0100 drm/panthor: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Boris Brezillon Cc: Steven Price Cc: Liviu Dudau Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250317131923.238374-10-tzimmermann@suse.de commit 64e21b80ded95e919060a2043c52f58ecb281aac Author: Thomas Zimmermann Date: Mon Mar 17 14:06:46 2025 +0100 drm/panfrost: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Boris Brezillon Cc: Rob Herring Cc: Steven Price Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250317131923.238374-9-tzimmermann@suse.de commit 55eba86e11381af782830760774bc22868af20a0 Author: Thomas Zimmermann Date: Mon Mar 17 14:06:44 2025 +0100 drm/msm: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250317131923.238374-7-tzimmermann@suse.de commit e91eb3ae415472b28211d7fed07fa283845b311e Author: Thomas Zimmermann Date: Mon Mar 17 14:06:41 2025 +0100 drm/etnaviv: Use dma_buf from GEM object instance Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Reviewed-by: Lucas Stach Link: https://lore.kernel.org/r/20250317131923.238374-4-tzimmermann@suse.de commit 970003de19a9cf7caa68a136b3bfa7334c8e7132 Author: Thomas Zimmermann Date: Mon Mar 17 14:06:40 2025 +0100 drm/etnaviv: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Reviewed-by: Lucas Stach Link: https://lore.kernel.org/r/20250317131923.238374-3-tzimmermann@suse.de commit 626acded47269bd0aae73e80a0448256924e3bf8 Author: Lad Prabhakar Date: Mon Apr 7 20:16:25 2025 +0100 dt-bindings: pinctrl: renesas: Document RZ/V2N SoC Add documentation for the pin controller found on the Renesas RZ/V2N (R9A09G056) SoC. The RZ/V2N PFC differs slightly from the RZ/G2L family and is almost identical to the RZ/V2H(P) SoC, except that the RZ/V2H(P) SoC has an additional dedicated pin. To account for this, a SoC-specific compatible string, 'renesas,r9a09g056-pinctrl', is introduced for the RZ/V2N SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c04269c02273b24398590398c0b73605c72f17ac Author: Lad Prabhakar Date: Mon Apr 7 20:16:22 2025 +0100 dt-bindings: clock: renesas: Document RZ/V2N SoC CPG Document the device tree bindings for the Renesas RZ/V2N (R9A09G056) SoC Clock Pulse Generator (CPG). Update `renesas,rzv2h-cpg.yaml` to include the compatible string for RZ/V2N SoC and adjust the title and description accordingly. Additionally, introduce `renesas,r9a09g056-cpg.h` to define core clock constants for the RZ/V2N SoC. Note the existing RZ/V2H(P) family-specific clock driver will be reused for this SoC. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit dc7af24bd60bdced496d03473e67ce5eb51236a5 Author: Lad Prabhakar Date: Mon Apr 7 20:16:19 2025 +0100 dt-bindings: soc: renesas: Document SYS for RZ/V2N SoC Add the RZ/V2N (R9A09G056) variant to the existing RZ/V2H(P) System Controller (SYS) binding, as both IPs are very similar. However, they have different SoC IDs, and the RZ/V2N does not have PCIE1 configuration registers, unlike the RZ/V2H(P) SYS IP. To handle these differences, introduce a new compatible string `renesas,r9a09g056-sys`. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit abc43c0f3c3eaa7470004e4e8a190a57c612a686 Author: Lad Prabhakar Date: Mon Apr 7 20:16:17 2025 +0100 dt-bindings: soc: renesas: Document Renesas RZ/V2N SoC variants and EVK Document the Renesas RZ/V2N (R9A09G056) SoC variants, distinguishing between configurations with and without specific hardware features such as GPU, ISP, and cryptographic extensions. Also, document the "renesas,rzv2n-evk" compatible string for the RZ/V2N EVK board. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250407191628.323613-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fb10144ba426b88080c6abcede5f1332bebc3c60 Author: Thomas Zimmermann Date: Thu Apr 10 12:59:06 2025 +0200 drm/udl: Support adapters without firmware descriptor Set default limit on the number of pixels for adapters without vendor firmware descriptor. The devices work as expected, they just don't provide any description. If parsing the vendor firmware descriptor fails, the device falls back to the given default limits. Failing to allocate memory is still an error. v2: - fix typo in constant (Patrik) Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-10-tzimmermann@suse.de commit df6dc12e5e6ddbf2a59d5283fcf6ccd0b3d0334d Author: Thomas Zimmermann Date: Thu Apr 10 12:59:05 2025 +0200 drm/udl: Validate length in vendor-descriptor parser Rewrite the parser for the vendor firmware descriptor with the following improvements. - Validate the key-value length given in a vendor descriptor against the length of the descriptor. The current code fails to do this and might read more bytes than available. This can lead to out-of-bounds reads of the allocated buffer. - Read raw data with helpers for unaligned data. This allows the code to run on platforms that do now support unaligned memory access by default. - Validate the pixel limit against a default value. The default comes from real-world devices. If the reported number of pixels is significantly above the limit, it is likely invalid. - Drop the obsolete print macros. There is still a warning about invalid firmware descriptors. The rest of the output is bogus. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-9-tzimmermann@suse.de commit f4fce9ea8473ab8f91c0aa0855b9d51313b8000e Author: Thomas Zimmermann Date: Thu Apr 10 12:59:04 2025 +0200 drm/udl: Treat vendor descriptor as u8 The vendor descriptor is an array of unsigned bytes. It is raw data that is not to be modified. Declare it as 'const u8'. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-8-tzimmermann@suse.de commit 1fad33f04ed1fd14049cda6a35faa4abc0886201 Author: Thomas Zimmermann Date: Thu Apr 10 12:59:03 2025 +0200 drm/udl: Return error if vendor descriptor is too short There need to be least 5 bytes in the vendor descriptor. Return an error otherwise. Also change the branching to early-out on the error. Adjust indention of the rest of the parser function. The original length test expected more than 5 bytes in the vendor descriptor. As a descriptor with no key-value pairs has exactly 5 bytes and is still valid, change the test to accept this case as well. v2 - clarify changes to length test in commit description (Patrik) Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-7-tzimmermann@suse.de commit 895452ae48c1e179df509b6184227a5ea40b4f38 Author: Thomas Zimmermann Date: Thu Apr 10 12:59:02 2025 +0200 drm/udl: Handle errors from usb_get_descriptor() Reading the vendor descriptor from the udl device can fail with an error, which the current code fails to capture. Store the return value in an integer and test for the error. Abort parsing on errors or treat the value as length on success. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-6-tzimmermann@suse.de commit 89323678d8280f4f8e5971124d3aef8a6dfece0a Author: Thomas Zimmermann Date: Thu Apr 10 12:59:01 2025 +0200 drm/udl: The number of pixels is always positive Store sku_pixel_limit as type unsigned long instead of int. The number of pixels available is always positive. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-5-tzimmermann@suse.de commit 0b4346d6898490d03b2d93070103db73ae864f86 Author: Thomas Zimmermann Date: Thu Apr 10 12:59:00 2025 +0200 drm/udl: Improve type safety when using struct udl_device Push upcasts from struct drm_device to struct udl_device outwards in the call chain; cast earlier and call functions with the upcasted value. Improves type safety. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-4-tzimmermann@suse.de commit 21c6b386f1eec5586f82b8659f4e0cbc85b03e88 Author: Thomas Zimmermann Date: Thu Apr 10 12:58:59 2025 +0200 drm/udl: Remove unused field gem_lock from struct udl_device Reduce the size of struct udl_device by removing the unused field gem_lock. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-3-tzimmermann@suse.de commit 6d0171c77d1a917cacbafe8a38ed486710d726fe Author: Thomas Zimmermann Date: Thu Apr 10 12:58:58 2025 +0200 drm/udl: Remove unused field dev from struct udl_device Reduce the size of struct udl_device by removing the unused field dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20250410105948.25463-2-tzimmermann@suse.de commit dc40879d4676dce7c1c2c746f0365f56dd18bec7 Author: Wolfram Sang Date: Fri Mar 28 16:31:38 2025 +0100 ARM: dts: renesas: r9a06g032-rzn1d400-db: Describe keys The keys are connected to the I2C GPIO extender which has the interrupt pin not connected. So, we need to poll. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250328153134.2881-12-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit d1a702202d099145c703d4368d652898d9a47d21 Author: Wolfram Sang Date: Fri Mar 28 16:31:36 2025 +0100 ARM: dts: renesas: r9a06g032-rzn1d400-eb: Describe I2C bus The actual sensor might differ, but all known are LM75B compatible. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250328153134.2881-10-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 0c704ebc3783ed0d558162bcbff10846516f3e88 Author: Wolfram Sang Date: Fri Mar 28 16:31:35 2025 +0100 ARM: dts: renesas: r9a06g032-rzn1d400-db: Describe I2C bus Schematics mention a 24cs64 on the bus, but I definitely have only a 24c64. So, it is only mentioned as a comment. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250328153134.2881-9-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 182f0dc5f51bd817e26a1ec653b8a785315612f3 Author: Wolfram Sang Date: Fri Mar 28 16:31:34 2025 +0100 ARM: dts: renesas: r9a06g032: Describe I2C controllers To match the documentation and schematics, they are numbered from 1 and not from 0. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250328153134.2881-8-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit e8c086880b2bac0ebc931b635b3b10bdc5ec6496 Author: Thomas Zimmermann Date: Thu Apr 10 10:37:25 2025 +0200 drm/sysfb: Share helpers for screen_info validation Share efidrm's and vesadrm's validation of struct screen_info in shared helpers. Update the drivers. Most validation helpers test individual values against limits and can be shared as they are. For color formats, a common helper looks up the correct DRM format info from a driver-provided list of color formats. These screen_info helpers are only available if CONFIG_SCREEN_INFO has been selected, as done by efidrm and vesadrm. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250410083834.10810-4-tzimmermann@suse.de commit 6046b49bafff47726a377ef05dc55ef7dec01cbd Author: Thomas Zimmermann Date: Thu Apr 10 10:37:24 2025 +0200 drm/sysfb: Share helpers for integer validation Provide sysfb helpers for validating framebuffer integer values against limits. Update drivers. If a driver did not specify a limit for a certain value, use INT_MAX. v2: - declare module information near EOF (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250410083834.10810-3-tzimmermann@suse.de commit 314c45e39e9abcaf2fe5449a11b6d9ad3b2c7dbc Author: Thomas Zimmermann Date: Thu Apr 10 10:37:23 2025 +0200 drm/sysfb: Split source file Split drm_sysfb_helper.c into two source files. There's now one source file for the mode-setting pipeline and one source file for module meta data. Prepares for adding additional source code to sysfb helpers. v2: - fix typo in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250410083834.10810-2-tzimmermann@suse.de commit 969875bce3d6e0d66468ebb56142b5c1ef5da938 Author: Clément Léger Date: Mon Mar 24 15:50:44 2025 +0100 ARM: dts: renesas: Add r9a06g032-rzn1d400-eb board device-tree The EB board (Expansion board) supports both RZ/N1D and RZ-N1S. Since this configuration targets only the RZ/N1D, it is named r9a06g032-rzn1d400-eb. It adds support for the 2 additional switch ports (port C and D) that are available on that board. Signed-off-by: Clément Léger [Thomas: move the DTS to the Renesas directory, declare the PHY LEDs] Signed-off-by: Thomas Bonnefille Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/20250324-rzn1d400-eb-v4-1-d7ebbbad1918@bootlin.com [wsa: Correct LAN LED nodes] Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250411095425.1842-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit b224c42568bc4e0d99bb4735c66123202e8b0e7f Author: Tommaso Merciai Date: Mon Mar 17 09:32:11 2025 +0100 clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert() rzv2h_cpg_assert() and rzv2h_cpg_deassert() functions are similar. Share this code via __rzv2h_cpg_assert(). This avoid code duplication. Reported-by: Pavel Machek Closes: https://lore.kernel.org/cip-dev/Z9QA9rwuXCuVbOXp@duo.ucw.cz/ Signed-off-by: Tommaso Merciai Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250317083213.371614-4-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ce0a97ff7127312aaee137fcdb159d8ddd14ede4 Author: Tommaso Merciai Date: Mon Mar 17 09:32:10 2025 +0100 clk: renesas: rzv2h: Improve rzv2h_ddiv_set_rate() Remove duplicate code into rzv2h_ddiv_set_rate(). Reported-by: Pavel Machek Closes: https://lore.kernel.org/cip-dev/Z9QBZo4GgtMjid0v@duo.ucw.cz/ Signed-off-by: Tommaso Merciai Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250317083213.371614-3-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f99002b9a9cc441a8f362e6fb32cf8a5a990261a Author: Ingo Molnar Date: Mon Apr 14 09:39:33 2025 +0200 x86/alternatives, um: Rename UML's text_poke_sync() wrapper to smp_text_poke_sync_each_cpu() Missed this UML wrapper in the rename. Fixes: 6e4955a9d73e ("x86/alternatives: Rename 'text_poke_sync()' to 'smp_text_poke_sync_each_cpu()'") Reported-by: kernel test robot Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/202504141003.kc69fVoj-lkp@intel.com commit 0a35c9280a9105e601cfe23b7c15522a195fa412 Author: Ingo Molnar Date: Sun Apr 13 10:41:44 2025 +0200 x86/platform/amd: Move the header to Collect AMD specific platform header files in . Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Link: https://lore.kernel.org/r/20250413084144.3746608-7-mingo@kernel.org commit 5bb144e52c666dc0082a90662a5406133415cacc Author: Ingo Molnar Date: Sun Apr 13 10:41:43 2025 +0200 x86/platform/amd: Clean up the header guards a bit - There's no need for a newline after the SPDX line - But there's a need for one before the closing header guard. Collect AMD specific platform header files in . Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: Carlos Bilbao Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Cc: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20250413084144.3746608-6-mingo@kernel.org commit d96c78684166bc0e7997d12d845882cb5824eed3 Author: Ingo Molnar Date: Sun Apr 13 10:41:42 2025 +0200 x86/platform/amd: Move the header to Collect AMD specific platform header files in . Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: Carlos Bilbao Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Cc: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20250413084144.3746608-5-mingo@kernel.org commit bcbb65559532891148d990527e9df6b8fc98e98d Author: Ingo Molnar Date: Mon Apr 14 09:32:04 2025 +0200 x86/platform/amd: Move the header to Collect AMD specific platform header files in . Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Link: https://lore.kernel.org/r/20250413084144.3746608-4-mingo@kernel.org commit 861c6b1185fbb2e3fa158aa3aca75d2f767db2a8 Author: Ingo Molnar Date: Sun Apr 13 10:41:40 2025 +0200 x86/platform/amd: Add standard header guards to Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Link: https://lore.kernel.org/r/20250413084144.3746608-3-mingo@kernel.org commit 3846389c03a8518884f09056611619bd1461ffc7 Author: Ingo Molnar Date: Sun Apr 13 10:41:39 2025 +0200 x86/platform/amd: Move the header to Collect AMD specific platform header files in . Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mario Limonciello Link: https://lore.kernel.org/r/20250413084144.3746608-2-mingo@kernel.org commit e3a52b67f54aa36ab21265eeea016460b5fe1c46 Author: Ingo Molnar Date: Thu Apr 10 12:52:16 2025 +0200 x86/fpu: Clarify FPU context cacheline alignment Suggested-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Chang S. Bae Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/Z_ejggklB5-IWB5W@gmail.com commit 8b2a7a7294b34fa00adbecbd352ef19eb780261b Author: Ingo Molnar Date: Wed Apr 9 23:11:27 2025 +0200 x86/fpu: Use 'fpstate' variable names consistently A few uses of 'fps' snuck in, which is rather confusing (to me) as it suggests frames-per-second. ;-) Rename them to the canonical 'fpstate' name. No change in functionality. Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250409211127.3544993-9-mingo@kernel.org commit 22aafe3bcb67472effdea1ccf0df20280192bbaf Author: Ingo Molnar Date: Wed Apr 9 23:11:26 2025 +0200 x86/fpu: Remove init_task FPU state dependencies, add debugging warning for PF_KTHREAD tasks init_task's FPU state initialization was a bit of a hack: __x86_init_fpu_begin = .; . = __x86_init_fpu_begin + 128*PAGE_SIZE; __x86_init_fpu_end = .; But the init task isn't supposed to be using the FPU context in any case, so remove the hack and add in some debug warnings. As Linus noted in the discussion, the init task (and other PF_KTHREAD tasks) *can* use the FPU via kernel_fpu_begin()/_end(), but they don't need the context area because their FPU use is not preemptible or reentrant, and they don't return to user-space. Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250409211127.3544993-8-mingo@kernel.org commit c360bdc593b8a8b6e94166026728764085919cff Author: Ingo Molnar Date: Wed Apr 9 23:11:25 2025 +0200 x86/fpu: Make sure x86_task_fpu() doesn't get called for PF_KTHREAD|PF_USER_WORKER tasks during exit fpu__drop() and arch_release_task_struct() calls x86_task_fpu() unconditionally, while the FPU context area will not be present if it's the init task, and should not be in use when it's some other type of kthread. Return early for PF_KTHREAD or PF_USER_WORKER tasks. The debug warning in x86_task_fpu() will catch any kthreads attempting to use the FPU save area. Fixed-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250409211127.3544993-7-mingo@kernel.org commit ec2227e03a46a162f2721917262adc553b212e2d Author: Ingo Molnar Date: Wed Apr 9 23:11:24 2025 +0200 x86/fpu: Push 'fpu' pointer calculation into the fpu__drop() call This encapsulates the fpu__drop() functionality better, and it will also enable other changes that want to check a task for PF_KTHREAD before calling x86_task_fpu(). Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250409211127.3544993-6-mingo@kernel.org commit 55bc30f2e34dcc17a370d1f6c1c992be107c4502 Author: Ingo Molnar Date: Wed Apr 9 23:11:23 2025 +0200 x86/fpu: Remove the thread::fpu pointer As suggested by Oleg, remove the thread::fpu pointer, as we can calculate it via x86_task_fpu() at compile-time. This improves code generation a bit: kepler:~/tip> size vmlinux.before vmlinux.after text data bss dec hex filename 26475405 10435342 1740804 38651551 24dc69f vmlinux.before 26475339 10959630 1216516 38651485 24dc65d vmlinux.after Suggested-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250409211127.3544993-5-mingo@kernel.org commit cb7ca40a3882360ce87191793449d48df0b29184 Author: Ingo Molnar Date: Wed Apr 9 23:11:22 2025 +0200 x86/fpu: Make task_struct::thread constant size Turn thread.fpu into a pointer. Since most FPU code internals work by passing around the FPU pointer already, the code generation impact is small. This allows us to remove the old kludge of task_struct being variable size: struct task_struct { ... /* * New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct. */ randomized_struct_fields_end /* CPU-specific state of this task: */ struct thread_struct thread; /* * WARNING: on x86, 'thread_struct' contains a variable-sized * structure. It *MUST* be at the end of 'task_struct'. * * Do not put anything below here! */ }; ... which creates a number of problems, such as requiring thread_struct to be the last member of the struct - not allowing it to be struct-randomized, etc. But the primary motivation is to allow the decoupling of task_struct from hardware details ( in particular), and to eventually allow the per-task infrastructure: DECLARE_PER_TASK(type, name); ... per_task(current, name) = val; ... which requires task_struct to be a constant size struct. The fpu_thread_struct_whitelist() quirk to hardened usercopy can be removed, now that the FPU structure is not embedded in the task struct anymore, which reduces text footprint a bit. Fixed-by: Oleg Nesterov Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250409211127.3544993-4-mingo@kernel.org commit e3bfa3859936da3edd1e16d0b74fdaaa19bb5087 Author: Ingo Molnar Date: Wed Apr 9 23:11:21 2025 +0200 x86/fpu: Convert task_struct::thread.fpu accesses to use x86_task_fpu() This will make the removal of the task_struct::thread.fpu array easier. No change in functionality - code generated before and after this commit is identical on x86-defconfig: kepler:~/tip> diff -up vmlinux.before.asm vmlinux.after.asm kepler:~/tip> Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250409211127.3544993-3-mingo@kernel.org commit 77fbccede633a5565cae084348b5459f6849086d Author: Ingo Molnar Date: Wed Apr 9 23:11:20 2025 +0200 x86/fpu: Introduce the x86_task_fpu() helper method The per-task FPU context/save area is allocated right next to task_struct, currently in a variable-size array via task_struct::thread.fpu[], but we plan to fully hide it from the C type scope. Introduce the x86_task_fpu() accessor that gets to the FPU context pointer explicitly from the task pointer. Right now this is a simple (task)->thread.fpu wrapper. Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Chang S. Bae Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250409211127.3544993-2-mingo@kernel.org commit cbe8e4dab16c56ac84765dcd53e418160c8bc0db Author: Chang S. Bae Date: Thu Mar 20 16:42:55 2025 -0700 x86/fpu/xstate: Adjust xstate copying logic for user ABI == Background == As feature positions in the userspace XSAVE buffer do not always align with their feature numbers, the XSAVE format conversion needs to be reconsidered to align with the revised xstate size calculation logic. * For signal handling, XSAVE and XRSTOR are used directly to save and restore extended registers. * For ptrace, KVM, and signal returns (for 32-bit frame), the kernel copies data between its internal buffer and the userspace XSAVE buffer. If memcpy() were used for these cases, existing offset helpers — such as __raw_xsave_addr() or xstate_offsets[] — would be sufficient to handle the format conversion. == Problem == When copying data from the compacted in-kernel buffer to the non-compacted userspace buffer, the function follows the user_regset_get2_fn() prototype. This means it utilizes struct membuf helpers for the destination buffer. As defined in regset.h, these helpers update the memory pointer during the copy process, enforcing sequential writes within the loop. Since xstate components are processed sequentially, any component whose buffer position does not align with its feature number has an issue. == Solution == Replace for_each_extended_xfeature() with the newly introduced for_each_extended_xfeature_in_order(). This macro ensures xstate components are handled in the correct order based on their actual positions in the destination buffer, rather than their feature numbers. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250320234301.8342-5-chang.seok.bae@intel.com commit a758ae2885eacaa68e4de9a01539a242a6bbb403 Author: Chang S. Bae Date: Thu Mar 20 16:42:54 2025 -0700 x86/fpu/xstate: Adjust XSAVE buffer size calculation The current xstate size calculation assumes that the highest-numbered xstate feature has the highest offset in the buffer, determining the size based on the topmost bit in the feature mask. However, this assumption is not architecturally guaranteed -- higher-numbered features may have lower offsets. With the introduction of the xfeature order table and its helper macro, xstate components can now be traversed in their positional order. Update the non-compacted format handling to iterate through the table to determine the last-positioned feature. Then, set the offset accordingly. Since size calculation primarily occurs during initialization or in non-critical paths, looping to find the last feature is not expected to have a meaningful performance impact. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250320234301.8342-4-chang.seok.bae@intel.com commit 15d51a2f6f3f7057311d6e37d5190d58597a94a9 Author: Chang S. Bae Date: Thu Mar 20 16:42:53 2025 -0700 x86/fpu/xstate: Introduce xfeature order table and accessor macro The kernel has largely assumed that higher xstate component numbers correspond to later offsets in the buffer. However, this assumption no longer holds for the non-compacted format, where a newer state component may have a lower offset. When iterating over xstate components in offset order, using the feature number as an index may be misleading. At the same time, the CPU exposes each component’s size and offset based on its feature number, making it a key for state information. To provide flexibility in handling xstate ordering, introduce a mapping table: feature order -> feature number. The table is dynamically populated based on the CPU-exposed features and is sorted in offset order at boot time. Additionally, add an accessor macro to facilitate sequential traversal of xstate components based on their actual buffer positions, given a feature bitmask. This accessor macro will be particularly useful for computing custom non-compacted format sizes and iterating over xstate offsets in non-compacted buffers. Suggested-by: Dave Hansen Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250320234301.8342-3-chang.seok.bae@intel.com commit 031b33ef1a6a1129a1a02a16b89608ded2eff9be Author: Chang S. Bae Date: Thu Mar 20 16:42:52 2025 -0700 x86/fpu/xstate: Remove xstate offset check Traditionally, new xstate components have been assigned sequentially, aligning feature numbers with their offsets in the XSAVE buffer. However, this ordering is not architecturally mandated in the non-compacted format, where a component's offset may not correspond to its feature number. The kernel caches CPUID-reported xstate component details, including size and offset in the non-compacted format. As part of this process, a sanity check is also conducted to ensure alignment between feature numbers and offsets. This check was likely intended as a general guideline rather than a strict requirement. Upcoming changes will support out-of-order offsets. Remove the check as becoming obsolete. Signed-off-by: Chang S. Bae Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Link: https://lore.kernel.org/r/20250320234301.8342-2-chang.seok.bae@intel.com commit 29f1d5cac294dbc0e9ebb9d1fea4e2c1c1d2e5f4 Author: Bartosz Golaszewski Date: Tue Apr 8 09:31:46 2025 +0200 pwm: pca9685: Use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-pwm-v1-1-61e5c3358a74@linaro.org Signed-off-by: Uwe Kleine-König commit 96d20cfd16e779923153f7347b0bef6b3c7606ce Author: Uwe Kleine-König Date: Sat Apr 5 11:27:17 2025 +0200 pwm: Do stricter return value checking for .round_waveform_tohw() The .round_waveform_tohw() is supposed to return 0 if the request could be rounded down to match the hardware capabilities and return 1 if rounding down wasn't possible. Expand the PWM_DEBUG check to not only assert proper downrounding if 0 was returned but also check that it was actually rounded up when the callback signalled uprounding. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/dfb824ae37f99df068c752d48cbd163c044a74fb.1743844730.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit fa829c1f40b7818a6c0b06719b6f057b3b0424dc Author: Uwe Kleine-König Date: Sat Apr 5 11:27:15 2025 +0200 pwm: stm32: Emit debug output also for corner cases of the rounding callbacks When you're interested in the actual register settings the driver chooses or interprets you want to see them also for calls that hit corner cases. Make sure that all calls to stm32_pwm_round_waveform_tohw() and stm32_pwm_round_waveform_fromhw() emit the debug message about the register settings. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/fe154e79319da5ff4159cdc71201a9d3b395e491.1743844730.git.u.kleine-koenig@baylibre.com [ukleinek: widen scope of rate in stm32_pwm_round_waveform_fromhw() to fix FTBFS] Signed-off-by: Uwe Kleine-König commit 4cbeffc40798efb84eb2ed9144e0e36dda603dd9 Author: Uwe Kleine-König Date: Sat Apr 5 11:27:14 2025 +0200 pwm: stm32: Don't open-code TIM_CCER_CCxE() Instead of manually calculating the offset of the channels CCxE bit, make use of the TIM_CCER_CCxE macro. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/7803f63b1310ddbd706f51f2f42d30b6dd786b03.1743844730.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 461d68d43d69a3d96750448ea5c3e0a68fc8d4c6 Author: Uwe Kleine-König Date: Fri Apr 4 12:48:42 2025 +0200 pwm: Add actual hardware state to pwm debugfs file Traditionally /sys/kernel/debug/pwm only contained info from pwm->state. Most of the time this data represents the last requested setting which might differ considerably from the actually configured in hardware setting. Expand the information in the debugfs file with the actual values. Signed-off-by: Uwe Kleine-König Reviewed-by: Trevor Gamblin Link: https://lore.kernel.org/r/20250404104844.543479-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 7cfe1e208b86c7fd4b35a8a502a8b15604eec1e0 Author: Uwe Kleine-König Date: Thu Apr 3 17:11:32 2025 +0200 pwm: Make chip parameter to pwmchip_get_drvdata() a const pointer dev_get_drvdata()'s parameter is a const pointer, so the chip passed to pwmchip_get_drvdata() can be const, too. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250403151134.266388-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit df08fff8add2fbca9ab4513c169b39802d59907f Author: Uwe Kleine-König Date: Thu Mar 13 08:28:55 2025 +0100 pwm: pxa: Improve using dev_err_probe() Add a message to the error path of devm_clk_get() and simplify the error path of devm_pwmchip_add() while improving the error message en passant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250313072855.3360076-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 2b62c89448dd41ebf16d860c52fe9a8aba3dd8a3 Author: Binbin Zhou Date: Mon Mar 31 14:53:50 2025 +0800 pwm: Add Loongson PWM controller support This commit adds a generic PWM framework driver for the PWM controller found on Loongson family chips. Acked-by: Huacai Chen Co-developed-by: Juxin Gao Signed-off-by: Juxin Gao Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/76050a903a8015422fb9261ad88c7d9cc2edbbd8.1743403075.git.zhoubinbin@loongson.cn Signed-off-by: Uwe Kleine-König commit 90cd430f04d0f2874f9c0fc75b9084f5162299c9 Author: Binbin Zhou Date: Mon Mar 31 14:53:49 2025 +0800 dt-bindings: pwm: Add Loongson PWM controller Add Loongson PWM controller binding with DT schema format using json-schema. Reviewed-by: Krzysztof Kozlowski Acked-by: Huacai Chen Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/57e0cbd4b7ce37da94094205e28a2ec2256c7175.1743403075.git.zhoubinbin@loongson.cn Signed-off-by: Uwe Kleine-König commit 08d8c9f593c79ec3fac8bc47ce01be83ecde850f Author: George Stark Date: Wed Dec 25 13:56:38 2024 +0300 pwm: meson: Simplify meson_pwm_cnt_to_ns() meson_pwm_cnt_to_ns() uses clock rate got from clk_get_rate(). clk object is getting from driver's private data thru several steps. Since meson_pwm_cnt_to_ns() is called several times from a single scope it's easier to get clock rate once and pass it as parameter. Signed-off-by: George Stark Link: https://lore.kernel.org/r/20241225105639.1787237-2-gnstark@salutedevices.com Signed-off-by: Uwe Kleine-König commit 5dca8a93b015c3362d5168bbe0bf109ac1b9bfa5 Author: George Stark Date: Tue Nov 19 15:53:18 2024 +0300 pwm: meson: Enable constant and polarity features for g12, axg, s4 g12, axg and s4 SoC families support constant and polarity bits so enable those features in corresponding chip data structs. Signed-off-by: George Stark Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20241119125318.3492261-5-gnstark@salutedevices.com Signed-off-by: Uwe Kleine-König commit 3a44aacf156055574dbfddd615ac5194aadacaad Author: George Stark Date: Tue Nov 19 15:53:17 2024 +0300 pwm: meson: Use separate device id data for axg and g12 Add separate devce id data for compatibles: amlogic,meson-g12a-ee-pwm, amlogic,meson-axg-pwm-v2, amlogic,meson-g12-pwm-v2 due to those PWM modules have different set of features than meson8. Signed-off-by: George Stark Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20241119125318.3492261-4-gnstark@salutedevices.com Signed-off-by: Uwe Kleine-König commit dd4d280ac5589fb3e1f333e6dbac4432abff4985 Author: George Stark Date: Tue Nov 19 15:53:16 2024 +0300 pwm: meson: Support constant and polarity bits Newer meson PWM IPs support constant and polarity bits. Support them to correctly implement constant and inverted output levels. Using constant bit allows to have truly stable low or high output level. Since hi and low regs internally increment its values by 1 just writing zero to any of them gives 1 clock count impulse. If constant bit is set zero value in hi and low regs is not incremented. Using polarity bit instead of swapping hi and low reg values allows to correctly identify inversion in .get_state(). Signed-off-by: George Stark Link: https://lore.kernel.org/r/20241119125318.3492261-3-gnstark@salutedevices.com Signed-off-by: Uwe Kleine-König commit 8c22e890402a990d712538d6d46245df129cf302 Author: George Stark Date: Tue Nov 19 15:53:15 2024 +0300 pwm: meson: Simplify get_state() callback In .get_state() callback meson_pwm_channel struct are used to store lo and hi reg values but they are never reused after that so for clearness use local variable instead. Signed-off-by: George Stark Link: https://lore.kernel.org/r/20241119125318.3492261-2-gnstark@salutedevices.com Signed-off-by: Uwe Kleine-König commit 60ccc16f530a480abfde399bf80779e5b021b3fe Author: Thomas Weißschuh Date: Sun Mar 16 20:46:07 2025 +0100 tools/nolibc: drop manual stack pointer alignment The stack pointer is already aligned by the kernel to a multiple of 16. See STACK_ROUND() in fs/binfmt_elf.c. The manual realignment is unnecessary, drop it. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250316-nolibc-sp-align-v1-1-1e1fb073ca1e@weissschuh.net commit 683058df13c7de4cf29fb4a929d431ca12313966 Merge: 8ffd015db85fea e8bf4a1bdaeadb Author: Dave Airlie Date: Mon Apr 14 15:29:49 2025 +1000 Merge tag 'drm-misc-next-2025-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v6.16-rc1: UAPI Changes: - Add ASAHI uapi header! - Add apple fourcc modifiers. - Add capset virtio definitions to UAPI. - Extend EXPORT_SYNC_FILE for timeline syncobjs. Cross-subsystem Changes: - Adjust DMA-BUF sg handling to not cache map on attach. - Update drm/ci, hlcdc, virtio, maintainers. - Update fbdev todo. - Allow setting dma-device for dma-buf import. - Export efi_mem_desc_lookup to make efidrm build as a module. Core Changes: - Update drm scheduler docs. - Use the correct resv object in TTM delayed destroy. - Fix compiler warning with panic qr code, and other small fixes. - drm/ci updates. - Add debugfs file for listing all bridges. - Small fixes to drm/client, ttm tests. - Add documentation to display/hdmi. - Add kunit tests for bridges. - Dont fail managed device probing if connector polling fails. - Create Kconfig.debug for drm core. - Add tests for the drm scheduler. - Add and use new access helpers for DPCPD. - Add generic and optimized conversions for format-helper. - Begin refcounting panel for improving lifetime handling. - Unify simpledrm and ofdrm sysfb, and add extra features. - Split hdmi audio in bridge to make DP audio work. Driver Changes: - Convert drivers to use devm_platform_ioremap_resource(). - Assorted small fixes to imx/legacy-bridg, gma500, pl111, nouveau, vc4, vmwgfx, ast, mxsfb, xlnx, accel/qaic, v3d, bridge/imx8qxp-ldb, ofdrm, bridge/fsl-ldb, udl, bridge/ti-sn65dsi86, bridge/anx7625, cirrus-qemu, bridge/cdns-dsi, panel/sharp, panel/himax, bridge/sil902x, renesas, imagination, various panels. - Allow attaching more display to vkms. - Add Powertip PH128800T004-ZZA01 panel. - Add rotation quirk for ZOTAC panel. - Convert bridge/tc358775 to atomic. - Remove deprecated panel calls from synaptics, novatek, samsung panels. - Refactor shmem helper page pinning and accel drivers using it. - Add dmabuf support to accel/amdxdna. - Use 4k page table format for panfrost/mediatek. - Add common powerup/down dp link helper and use it. - Assorted compiler warning fixes. - Support dma-buf import for renesas Signed-off-by: Dave Airlie # Conflicts: # include/drm/drm_kunit_helpers.h From: Maarten Lankhorst Link: https://lore.kernel.org/r/e147ff95-697b-4067-9e2e-7cbd424e162a@linux.intel.com commit 7a429a14f852c6a8cd4710078613cf2bd2a4eb6e Author: Jouni Högander Date: Wed Apr 9 08:49:09 2025 +0300 drm/i915/vrr: Stop writing VRR_CTL_IGN_MAX_SHIFT for MTL onwards According to Bspec VRR_CTL_IGN_MAX_SHIFT doesn't exist for MTL and onwards. On LunarLake and onwards Bit 30 is "Mask Block PkgC" instead. Stop writing the bit for MeteorLake and onwards v2: "Ignore Max Shift" bit doesn't exist on MeteorLake either Bspec: 50508, 68925 Signed-off-by: Jouni Högander Reviewed-by: Ankit Nautiyal Link: https://lore.kernel.org/r/20250409054909.968531-1-jouni.hogander@intel.com commit 279b418f477fd6c1c21b1cf212837622c774f15f Author: Kevin Hao Date: Fri Apr 11 15:06:41 2025 +0800 spi: fsl-qspi: Optimize fsl_qspi struct Reorgize the members of the fsl_qspi struct to: - Reduce a hole in the struct. - Group members required by each op (e.g., iobase, ahb_addr, devtype_data and lock) into the same cacheline. Before: struct fsl_qspi { [...] /* size: 176, cachelines: 3, members: 11 */ /* sum members: 168, holes: 1, sum holes: 4 */ /* padding: 4 */ /* member types with holes: 1, total: 1 */ /* last cacheline: 48 bytes */ }; after: struct fsl_qspi { void * iobase; /* 0 8 */ void * ahb_addr; /* 8 8 */ const struct fsl_qspi_devtype_data * devtype_data; /* 16 8 */ struct mutex lock; /* 24 32 */ struct completion c; /* 56 32 */ /* XXX last struct has 1 hole */ /* --- cacheline 1 boundary (64 bytes) was 24 bytes ago --- */ struct clk * clk; /* 88 8 */ struct clk * clk_en; /* 96 8 */ struct pm_qos_request pm_qos_req; /* 104 48 */ /* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */ struct device * dev; /* 152 8 */ int selected; /* 160 4 */ u32 memmap_phy; /* 164 4 */ /* size: 168, cachelines: 3, members: 11 */ /* member types with holes: 1, total: 1 */ /* last cacheline: 40 bytes */ }; Reviewed-by: Han Xu Signed-off-by: Kevin Hao Link: https://patch.msgid.link/20250411-spi-v1-1-8d6dfb1a9262@gmail.com Signed-off-by: Mark Brown commit 88113e09ada52be28968aacf4af7b3d667832f00 Author: Mukesh Kumar Savaliya Date: Fri Apr 4 19:24:27 2025 +0530 spi: Add support for Double Transfer Rate (DTR) mode Introduce support for protocol drivers to specify whether a transfer should use single or dual transfer mode. Currently, the SPI controller cannot determine this information from the user, leading to potential limitations in transfer capabilities. Add a new field `dtr_mode` in the `spi_transfer` structure. The `dtr_mode` field allows protocol drivers to indicate if Double Transfer Rate (DTR) mode is supported for a given transfer. When `dtr_mode` is set to true, the SPI controller will use DTR mode; otherwise, it will default to single transfer mode. Introduce another field `dtr_caps` to indicate if the QSPI controller is capable of supporting DTR mode (SDR and DDR). By default, both `dtr_caps` and `dtr_mode` will be false. These flags manage the QSPI controller's DTR mode capabilities within the SPI framework. The QSPI controller driver uses these flags to configure single or double transfer rates using the controller register. The existing spi-mem driver helps configure the DTR mode but is limited to memory devices. There is no support available to set DTR mode for non-memory devices, e.g., touch or any generic SPI sensor. This change is backward compatible and doesn't break existing SPI or QSPI drivers. Changes include: - Addition of `dtr_mode` and `dtr_caps` fields in the `spi_transfer` structure. - Documentation updates to reflect the new `dtr_mode` and `dtr_caps` fields. Signed-off-by: Mukesh Kumar Savaliya Link: https://patch.msgid.link/20250404135427.313825-1-quic_msavaliy@quicinc.com Signed-off-by: Mark Brown commit 38c2585c7439cc678ae105dd826f10321db29552 Author: ChiYuan Huang Date: Thu Apr 10 08:58:13 2025 +0800 ASoC: codecs: Add support for Richtek rt9123p Add codec driver for Richtek rt9123p. Signed-off-by: ChiYuan Huang Link: https://patch.msgid.link/d10c08abb3e92598ce7ff3663db7dd70ec2d3c65.1744245663.git.cy_huang@richtek.com Signed-off-by: Mark Brown commit 4a046b67d2d267daf884798ee8509a502abe7a58 Author: ChiYuan Huang Date: Thu Apr 10 08:58:12 2025 +0800 ASoC: dt-bindings: Add bindings for Richtek rt9123p Document the ASoC Richtek rt9123p. Signed-off-by: ChiYuan Huang Link: https://patch.msgid.link/0c80e1c6165fee5e9884d541167eee0a7f676c06.1744245663.git.cy_huang@richtek.com Reviewed-by: "Rob Herring (Arm)" Signed-off-by: Mark Brown commit 8bffd24e45618b6c3d6ce11947193c6d8ba846a7 Author: ChiYuan Huang Date: Thu Apr 10 08:58:11 2025 +0800 ASoC: codecs: Add support for Richtek rt9123 Add codec driver for Richtek rt9123. Signed-off-by: ChiYuan Huang Link: https://patch.msgid.link/f467200d7c116f5f34a3c31fafeebd9a410ab8bd.1744245663.git.cy_huang@richtek.com Signed-off-by: Mark Brown commit 667ebcc13dd63f59e2a1132e0f54d2f3067597db Author: ChiYuan Huang Date: Thu Apr 10 08:58:10 2025 +0800 ASoC: dt-bindings: Add bindings for Richtek rt9123 Document the ASoC Richtek rt9123. Signed-off-by: ChiYuan Huang Link: https://patch.msgid.link/4a0b67438f82e7d8ed9968cc90acf419fc9c22cf.1744245663.git.cy_huang@richtek.com Reviewed-by: "Rob Herring (Arm)" Signed-off-by: Mark Brown commit 186dfc85f9a824e3f8383322747ca75e988486e9 Author: James Calligeros Date: Sun Apr 6 09:15:12 2025 +1000 ASoC: tas2764: expose die temp to hwmon TAS2764 contains an ADC that reports the chip's die temperature. The temperature in degrees Celsius is yielded by subtracting 93 from the raw value reported by the ADC. Expose the codec die temperature to the hwmon interface. The chip will initialise the temperature register to 2.6 *C to avoid triggering over temp protection. As the ADC is powered down during software shutdown, this value will persist until the chip is fully powered up (e.g. when the PCM it's attached to is opened). When the chip is powered back down, the last value sampled will persist in the register. Co-developed-by: Martin Povišer Signed-off-by: Martin Povišer Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-8-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit ff73e2780169a43617cc339686f5bd3d74fa8652 Author: James Calligeros Date: Sun Apr 6 09:15:11 2025 +1000 ASoC: tas2770: expose die temp to hwmon TAS2770 includes an ADC which reports the chip's die temperature. As per the datasheet, the temperature in degrees Celsius is derived by taking the raw value stored in the ADC's registers, dividing by 16, then subtracting 93. Create and register a hwmon device to expose the chip's die temperature to the hwmon interface. The ADC is shut down during software shutdown mode, and its registers are initialised to 0 on reset. This means that the die temperature will read -93 *C until the chip has been fully powered up at least once (e.g. the PCM its attached to is opened). Once the chip is put into software shutdown again, the ADC will also shut down. The last value sampled before this happens will persist in the ADC's registers. Co-developed-by: Martin Povišer Signed-off-by: Martin Povišer Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-7-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit f33b01e0947d81c514bc8ff31ad28cae7ff6d91f Author: Martin Povišer Date: Sun Apr 6 09:15:10 2025 +1000 ASoC: tas2764: Apply Apple quirks Apple's SN012776 driver has some peculiar aspects to its behavior that are suspected to work around issues in the codec part. Add a module parameter for enabling individual quirks that should be imitated after the Apple driver. Setting some of these by default seems to be required. For example, setting 0xf fixes an issue with transient overcurrent errors which can crash the chip until the next system reboot. To be safe, let's enable all of them by default. Reviewed-by: Neal Gompa Co-developed-by: Hector Martin Signed-off-by: Hector Martin Signed-off-by: Martin Povišer Co-developed-by: James Calligeros Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-6-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit f0aff451f399d09aaf2a23c4e2ef2077b9857ca5 Author: Martin Povišer Date: Sun Apr 6 09:15:09 2025 +1000 ASoC: tas2764: Raise regmap range maximum TAS2764 has a number of undocumented registers between page 0xf0 and 0xff. These are used to apply in-silicon quirks and workarounds at runtime. Raise the regmap max register to 0xffff to cover any quirks registers. Reviewed-by: Neal Gompa Signed-off-by: Martin Povišer Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-5-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit dd50f0e38563f15819059c923bf142200453e003 Author: Hector Martin Date: Sun Apr 6 09:15:08 2025 +1000 ASoC: tas2764: Enable main IRQs IRQ handling was added in commit dae191fb957f ("ASoC: tas2764: Add IRQ handling") however that same commit masks all interrupts coming from the chip. Unmask the "main" interrupts so that we can see and deal with a number of errors including clock, voltage, and current. Fixes: dae191fb957f ("ASoC: tas2764: Add IRQ handling") Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-4-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit 592ab3936b096da5deb64d4c906edbeb989174d6 Author: Martin Povišer Date: Sun Apr 6 09:15:07 2025 +1000 ASoC: tas2764: Reinit cache on part reset When the part is reset in component_probe, do not forget to reinit the regcache, otherwise the cache can get out of sync with the part's actual state. This fix is similar to commit 0a0342ede303 ("ASoC: tas2770: Reinit regcache on reset") which concerned the tas2770 driver. Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Reviewed-by: Neal Gompa Signed-off-by: Martin Povišer Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-3-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit 7699892ad3cf3a9afc8c63886344f6e2b73166e2 Author: Hector Martin Date: Sun Apr 6 09:15:06 2025 +1000 ASoC: tas2770: Support setting the PDM TX slot We don't actually support configuring the PDM input right now. Rather, this is useful as a hack. On Apple Silicon machines, amps are split between two I2S buses which are logically ANDed internally at the SoC. Odd and even slot groups are driven by amps on either bus respectively. Since the signals are ANDed, unused slot groups must be driven as zero to avoid corrupting the data from the other side. On most recent machines (TAS2764-based), this is accomplished using the "SDOUT zero mask" feature of that chip. Unfortunately, TAS2770 does not support this. It does support zeroing out *all* unused slots, which works well for machines with a single amp per I2S bus. That is all, except one. The 13" M1 MacBook Pro is the only machine using TAS2770 and two amps per I2S bus: L Bus: SPK0I SPK0V Hi-Z Hi-Z SPK2I SPK2V Hi-Z Hi-Z R Bus: Hi-Z Hi-Z SPK1I SPK2V Hi-Z Hi-Z SPK3I SPK3V To ensure uncorrupted data, we need to force all the Hi-Z periods to zero. We cannot use the "force all zero" feature, as that would cause a bus conflict between both amps. We can use the pull-down feature, but that leaves a few bits of garbage on the trailing edge of the speaker data, since the pull-down is weak. This is where the PDM transmit feature comes in. With PDM grounded and disabled (the default state), the PDM slot is transmitted as all zeroes. We can use that to force a zero 16-bit slot after the voltage data for each speaker, cleaning it up. Then the pull-down ensures the line stays low for the subsequent slot: L Bus: SPK0I SPK0V PDM0 PulDn SPK2I SPK2V PDM0 PulDn R Bus: PDM0 PulDn SPK1I SPK2V PDM0 PulDn SPK3I SPK3V Yes, this is a horrible hack, but it beats adding dummy slots that would be visible to the userspace capture side. There may be some other way to fix the logical AND behavior on the MCA side... that would make this unnecessary. ("How does Apple deal with this"? - they don't, macOS does not use IVSENSE on TAS2770 machines even though it's physically wired up, but we want to do so on Linux.) Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-2-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit f529c91be8a34ac12e7599bf87c65b6f4a2c9f5c Author: Hector Martin Date: Sun Apr 6 09:15:05 2025 +1000 ASoC: tas2770: Power cycle amp on ISENSE/VSENSE change The ISENSE/VSENSE blocks are only powered up when the amplifier transitions from shutdown to active. This means that if those controls are flipped on while the amplifier is already playing back audio, they will have no effect. Fix this by forcing a power cycle around transitions in those controls. Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-1-50a00ec850a3@gmail.com Signed-off-by: Mark Brown commit 8d2e914482311f7746fe7b0e520bd42794d6aed8 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:30 2025 +0200 ALSA: hda: cirrus_scodec_test: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-12-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit db81f6fa2771681249ca1d23366c893f3535fe10 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:29 2025 +0200 ASoC: codecs: zl38060: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-11-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 127c53d620cb134adbbdd7d43a369f3940f71172 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:28 2025 +0200 ASoC: codecs: wm8903: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-10-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit c849a7cfdcd14333604fdf60bedb2e183b4164bd Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:27 2025 +0200 ASoC: codecs: peb2466: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Herve Codina Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-9-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit b0cf20b43363fb04851c4773a107f7ecb9731883 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:26 2025 +0200 ASoC: codecs: idt821034: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Herve Codina Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-8-dd54b6ca1ef9@linaro.org Signed-off-by: Mark Brown commit 346d3632303aa67c698b0b05e0126ebd29ac99f3 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:25 2025 +0200 ASoC: codecs: tlv320adc3xxx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-7-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit a8d4913690479217832ab1e73f4c5af0b52a0f27 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:24 2025 +0200 ASoC: codecs: wm8996: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-6-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 317349ce80aaa404abfa0bbbcf99876736d8c237 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:23 2025 +0200 ASoC: codecs: rt5677: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-5-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit a336078f23343931db99bbda857965c5b7ebefd9 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:22 2025 +0200 ASoC: codecs: wm5100: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-4-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 403dddbdcb49a77ba8873b0a15a9ae683aec2cee Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:21 2025 +0200 ASoC: codecs: wm8962: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-3-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 60631801abb7112c8a086dabca89d5fbb06d7d1c Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:20 2025 +0200 ASoC: ti: davinci-mcasp:: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-2-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit cf16c640143161ed5d4b196e38b7aa3fc7787510 Author: Bartosz Golaszewski Date: Tue Apr 8 09:38:19 2025 +0200 ASoC: soc-ac97: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-1-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 436a3cc8afbf34bb68166c2c5c19ca5113c0c756 Author: Keguang Zhang Date: Wed Apr 9 18:29:34 2025 +0800 ASoC: ac97: Add DT support Add an of_match_table with 'realtek,alc203' to provide DT support for the AC97 generic codec driver. Signed-off-by: Keguang Zhang Link: https://patch.msgid.link/20250409-loongson1-ac97-v2-4-65d5db96a046@gmail.com Signed-off-by: Mark Brown commit 1fc55a2baef5289c9535ce10a4f5f37664ce854a Author: Keguang Zhang Date: Wed Apr 9 18:29:33 2025 +0800 ASoC: loongson: Add Loongson-1 AC97 Driver Add AC97 driver for Loongson-1 SoCs. Signed-off-by: Keguang Zhang Link: https://patch.msgid.link/20250409-loongson1-ac97-v2-3-65d5db96a046@gmail.com Signed-off-by: Mark Brown commit 0142b45000457b9d112d40d5685d0898e51ed52f Author: Keguang Zhang Date: Wed Apr 9 18:29:32 2025 +0800 ASoC: dt-bindings: Add Realtek ALC203 Codec Add devicetree binding document for Realtek ALC203 codec. Signed-off-by: Keguang Zhang Link: https://patch.msgid.link/20250409-loongson1-ac97-v2-2-65d5db96a046@gmail.com Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown commit d60007fc9b739d939d5b6148c25805f206c836f9 Author: Keguang Zhang Date: Wed Apr 9 18:29:31 2025 +0800 ASoC: dt-bindings: Add Loongson-1 AC97 Controller Add devicetree binding document for Loongson-1 AC97 controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keguang Zhang Link: https://patch.msgid.link/20250409-loongson1-ac97-v2-1-65d5db96a046@gmail.com Signed-off-by: Mark Brown commit 4850074ff06fce894a9946c5d3ab8ea13fa33e43 Author: Uros Bizjak Date: Mon Apr 7 09:21:04 2025 +0200 x86/uaccess: Use asm_inline() instead of asm() in __untagged_addr() Use asm_inline() to instruct the compiler that the size of asm() is the minimum size of one instruction, ignoring how many instructions the compiler thinks it is. ALTERNATIVE macro that expands to several pseudo directives causes instruction length estimate to count more than 20 instructions. bloat-o-meter reports minimal code size increase (x86_64 defconfig with CONFIG_ADDRESS_MASKING, gcc-14.2.1): add/remove: 2/2 grow/shrink: 5/1 up/down: 2365/-1995 (370) Function old new delta ----------------------------------------------------- do_get_mempolicy - 1449 +1449 copy_nodes_to_user - 226 +226 __x64_sys_get_mempolicy 35 213 +178 syscall_user_dispatch_set_config 157 332 +175 __ia32_sys_get_mempolicy 31 206 +175 set_syscall_user_dispatch 29 181 +152 __do_sys_mremap 2073 2083 +10 sp_insert 133 117 -16 task_set_syscall_user_dispatch 172 - -172 kernel_get_mempolicy 1807 - -1807 Total: Before=21423151, After=21423521, chg +0.00% The code size increase is due to the compiler inlining more functions that inline untagged_addr(), e.g: task_set_syscall_user_dispatch() is now fully inlined in set_syscall_user_dispatch(): 000000000010b7e0 : 10b7e0: f3 0f 1e fa endbr64 10b7e4: 49 89 c8 mov %rcx,%r8 10b7e7: 48 89 d1 mov %rdx,%rcx 10b7ea: 48 89 f2 mov %rsi,%rdx 10b7ed: 48 89 fe mov %rdi,%rsi 10b7f0: 65 48 8b 3d 00 00 00 mov %gs:0x0(%rip),%rdi 10b7f7: 00 10b7f8: e9 03 fe ff ff jmp 10b600 that after inlining becomes: 000000000010b730 : 10b730: f3 0f 1e fa endbr64 10b734: 65 48 8b 05 00 00 00 mov %gs:0x0(%rip),%rax 10b73b: 00 10b73c: 48 85 ff test %rdi,%rdi 10b73f: 74 54 je 10b795 10b741: 48 83 ff 01 cmp $0x1,%rdi 10b745: 74 06 je 10b74d 10b747: b8 ea ff ff ff mov $0xffffffea,%eax 10b74c: c3 ret 10b74d: 48 85 f6 test %rsi,%rsi 10b750: 75 7b jne 10b7cd 10b752: 48 85 c9 test %rcx,%rcx 10b755: 74 1a je 10b771 10b757: 48 89 cf mov %rcx,%rdi 10b75a: 49 b8 ef cd ab 89 67 movabs $0x123456789abcdef,%r8 10b761: 45 23 01 10b764: 90 nop 10b765: 90 nop 10b766: 90 nop 10b767: 90 nop 10b768: 90 nop 10b769: 90 nop 10b76a: 90 nop 10b76b: 90 nop 10b76c: 49 39 f8 cmp %rdi,%r8 10b76f: 72 6e jb 10b7df 10b771: 48 89 88 48 08 00 00 mov %rcx,0x848(%rax) 10b778: 48 89 b0 50 08 00 00 mov %rsi,0x850(%rax) 10b77f: 48 89 90 58 08 00 00 mov %rdx,0x858(%rax) 10b786: c6 80 60 08 00 00 00 movb $0x0,0x860(%rax) 10b78d: f0 80 48 08 20 lock orb $0x20,0x8(%rax) 10b792: 31 c0 xor %eax,%eax 10b794: c3 ret 10b795: 48 09 d1 or %rdx,%rcx 10b798: 48 09 f1 or %rsi,%rcx 10b79b: 75 aa jne 10b747 10b79d: 48 c7 80 48 08 00 00 movq $0x0,0x848(%rax) 10b7a4: 00 00 00 00 10b7a8: 48 c7 80 50 08 00 00 movq $0x0,0x850(%rax) 10b7af: 00 00 00 00 10b7b3: 48 c7 80 58 08 00 00 movq $0x0,0x858(%rax) 10b7ba: 00 00 00 00 10b7be: c6 80 60 08 00 00 00 movb $0x0,0x860(%rax) 10b7c5: f0 80 60 08 df lock andb $0xdf,0x8(%rax) 10b7ca: 31 c0 xor %eax,%eax 10b7cc: c3 ret 10b7cd: 48 8d 3c 16 lea (%rsi,%rdx,1),%rdi 10b7d1: 48 39 fe cmp %rdi,%rsi 10b7d4: 0f 82 78 ff ff ff jb 10b752 10b7da: e9 68 ff ff ff jmp 10b747 10b7df: b8 f2 ff ff ff mov $0xfffffff2,%eax 10b7e4: c3 ret Please note a series of NOPs that get replaced with an alternative: 11f0: 65 48 23 05 00 00 00 and %gs:0x0(%rip),%rax 11f7: 00 Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250407072129.33440-1-ubizjak@gmail.com commit 5c3627b6f0595f1ec27e6f5df903bd072e9b9136 Author: Thorsten Blum Date: Sun Apr 13 12:41:09 2025 +0200 perf/x86/intel/bts: Replace offsetof() with struct_size() Use struct_size() to calculate the number of bytes to allocate for a new bts_buffer. Compared to offsetof(), struct_size() provides additional compile-time checks (e.g., __must_be_array()). Signed-off-by: Thorsten Blum Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250413104108.49142-2-thorsten.blum@linux.dev commit a5447e92e169dafaf02fd653500105c7186d7128 Author: Ingo Molnar Date: Sun Apr 13 20:43:16 2025 +0200 x86/msr: Add compatibility wrappers for rdmsrl()/wrmsrl() To reduce the impact of the API renames in -next, add compatibility wrappers for the two most popular MSR access APIs: rdmsrl() and wrmsrl(). Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org commit c3abed53ca13f658c08727bd594f3874d216bde5 Author: Shane Xiao Date: Thu Apr 10 12:35:15 2025 +0800 drm/amdkfd: Add rec SDMA engines support with limited XGMI This patch adds recommended SDMA engines with limited XGMI SDMA engines. It will help improve overall performance for device to device copies with this optimization. v2: Update the formatting issues and data type Signed-off-by: Shane Xiao Suggested-by: Jonathan Kim Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 21da4ec75a61480b8a4b0fddac43a59c6a4d71ed Author: Nick Chan Date: Thu Feb 20 20:21:50 2025 +0800 arm64: dts: apple: t8015: Add CPU caches Add information about CPU caches in Apple A11 SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-9-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 0b311f8d69a7bca791055549e19c7edaad494ef7 Author: Nick Chan Date: Thu Feb 20 20:21:49 2025 +0800 arm64: dts: apple: t8012: Add CPU caches Add information about CPU caches in the P-cluster of Apple T2 SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-8-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 66be2180e9626c42a2b95262fb2b240c18e39798 Author: Nick Chan Date: Thu Feb 20 20:21:48 2025 +0800 arm64: dts: apple: t8011: Add CPU caches Add information about CPU caches in the P-cluster of Apple A10X SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-7-2c7011097768@gmail.com Signed-off-by: Sven Peter commit a3ffd38110b70a1c8a5b2410d54d04c5275f9bd0 Author: Nick Chan Date: Thu Feb 20 20:21:47 2025 +0800 arm64: dts: apple: t8010: Add CPU caches Add information about CPU caches in the P-cluster of Apple A10 SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-6-2c7011097768@gmail.com Signed-off-by: Sven Peter commit a5a6ce8a7abd48a266c0478b6ca457f7c99692b7 Author: Nick Chan Date: Thu Feb 20 20:21:46 2025 +0800 arm64: dts: apple: s8001: Add CPU caches Add information about CPU caches in Apple A9X SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-5-2c7011097768@gmail.com Signed-off-by: Sven Peter commit a7a38536f2ea5d3797b9d647d4a8abdaa36ebeb3 Author: Nick Chan Date: Thu Feb 20 20:21:45 2025 +0800 arm64: dts: apple: s800-0-3: Add CPU caches Add information about CPU caches in both variants of Apple A9 SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-4-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 93669da1d1e35cb8d4df7e7f9765721c998521e7 Author: Nick Chan Date: Thu Feb 20 20:21:44 2025 +0800 arm64: dts: apple: t7001: Add CPU caches Add information about CPU caches in Apple A8X SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-3-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 1ed7edcf5caa4332e33c4f43a1a36750ac61a652 Author: Nick Chan Date: Thu Feb 20 20:21:43 2025 +0800 arm64: dts: apple: t7000: Add CPU caches Add information about CPU caches in Apple A8 SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-2-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 0a52d413afc6236cd120286be8cb44714c36bc3c Author: Nick Chan Date: Thu Feb 20 20:21:42 2025 +0800 arm64: dts: apple: s5l8960x: Add CPU caches Add information about CPU caches in Apple A7 SoC. Signed-off-by: Nick Chan Link: https://lore.kernel.org/r/20250220-caches-v1-1-2c7011097768@gmail.com Signed-off-by: Sven Peter commit 4e1ccc8e52e5eb3a072d7e4faecd80c6f326bfd2 Author: Sven Eckelmann Date: Sun Apr 13 11:09:03 2025 +0200 batman-adv: Drop unused net_namespace.h include Since commit 69c7be1b903f ("rtnetlink: Pack newlink() params into struct"), .newlink() doesn't use the struct net parameter. A type definition from net_namespace.h is no longer needed. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit a608f11d3a3b9464bd6ec63b7e3e84cccd556e06 Author: Sven Eckelmann Date: Sun Apr 13 10:14:42 2025 +0200 batman-adv: Switch to crc32 header for crc32c The crc32c() function was moved in commit 8df36829045a ("lib/crc32: standardize on crc32c() name for Castagnoli CRC32") from linux/crc32c.h to linux/crc32.h. The former is just an include file which redirects to the latter. Avoid the indirection by directly including the correct header file. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 7b3169dfa4ba1b1898d4bdfad6ddabbc9e8a57ed Author: Josh Poimboeuf Date: Thu Apr 10 13:58:35 2025 -0700 objtool, x86/hweight: Remove ANNOTATE_IGNORE_ALTERNATIVE Since objtool's inception, frame pointer warnings have been manually silenced for __arch_hweight*() to allow those functions' inline asm to avoid using ASM_CALL_CONSTRAINT. The potentially dubious reasoning for that decision over nine years ago was that since !X86_FEATURE_POPCNT is exceedingly rare, it's not worth hurting the code layout for a function call that will never happen on the vast majority of systems. However, those functions actually started using ASM_CALL_CONSTRAINT with the following commit: 194a613088a8 ("x86/hweight: Use ASM_CALL_CONSTRAINT in inline asm()") And rightfully so, as it makes the code correct. ASM_CALL_CONSTRAINT will soon have no effect for non-FP configs anyway. With ASM_CALL_CONSTRAINT in place, ANNOTATE_IGNORE_ALTERNATIVE no longer has a purpose for the hweight functions. Remove it. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Link: https://lore.kernel.org/r/e7070dba3278c90f1a836b16157dcd34ccd21e21.1744318586.git.jpoimboe@kernel.org commit d51faee4bd63b3b02fa6f56210ec0d84c5ccb680 Author: Uros Bizjak Date: Fri Apr 11 11:31:17 2025 +0200 x86/percpu: Refer __percpu_prefix to __force_percpu_prefix Refer __percpu_prefix to __force_percpu_prefix to avoid duplicate definition. While there, slightly reorder definitions to a more logical sequence, remove unneeded double quotes and move misplaced comment to the right place. No functional changes intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250411093130.81389-1-ubizjak@gmail.com commit 05872a167c2cab80ef186ef23cc34a6776a1a30c Author: Chao Yu Date: Tue Apr 8 20:22:08 2025 +0800 f2fs: fix to do sanity check on sbi->total_valid_block_count syzbot reported a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/f2fs.h:2521! RIP: 0010:dec_valid_block_count+0x3b2/0x3c0 fs/f2fs/f2fs.h:2521 Call Trace: f2fs_truncate_data_blocks_range+0xc8c/0x11a0 fs/f2fs/file.c:695 truncate_dnode+0x417/0x740 fs/f2fs/node.c:973 truncate_nodes+0x3ec/0xf50 fs/f2fs/node.c:1014 f2fs_truncate_inode_blocks+0x8e3/0x1370 fs/f2fs/node.c:1197 f2fs_do_truncate_blocks+0x840/0x12b0 fs/f2fs/file.c:810 f2fs_truncate_blocks+0x10d/0x300 fs/f2fs/file.c:838 f2fs_truncate+0x417/0x720 fs/f2fs/file.c:888 f2fs_setattr+0xc4f/0x12f0 fs/f2fs/file.c:1112 notify_change+0xbca/0xe90 fs/attr.c:552 do_truncate+0x222/0x310 fs/open.c:65 handle_truncate fs/namei.c:3466 [inline] do_open fs/namei.c:3849 [inline] path_openat+0x2e4f/0x35d0 fs/namei.c:4004 do_filp_open+0x284/0x4e0 fs/namei.c:4031 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_creat fs/open.c:1522 [inline] __se_sys_creat fs/open.c:1516 [inline] __x64_sys_creat+0x124/0x170 fs/open.c:1516 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 The reason is: in fuzzed image, sbi->total_valid_block_count is inconsistent w/ mapped blocks indexed by inode, so, we should not trigger panic for such case, instead, let's print log and set fsck flag. Fixes: 39a53e0ce0df ("f2fs: add superblock and major in-memory structure") Reported-by: syzbot+8b376a77b2f364097fbe@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/67f3c0b2.050a0220.396535.0547.GAE@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit aa00c6d5d05a80ef5946984025c25ab231b722f9 Author: Chao Yu Date: Tue Apr 1 11:58:00 2025 +0800 f2fs: support to disable linear lookup fallback After commit 91b587ba79e1 ("f2fs: Introduce linear search for dentries"), f2fs forced to use linear lookup whenever a hash-based lookup fails on casefolded directory, it may affect performance for scenarios: a) create a new file w/ filename it doesn't exist in directory, b) lookup a file which may be removed. This patch supports to disable linear lookup fallback, so, once there is a solution for commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points") to fix red heart unicode issue, then we can set an encodeing flag to disable the fallback for performance recovery. The way is kept in line w/ ext4, refer to commit 9e28059d5664 ("ext4: introduce linear search for dentries"). Cc: Daniel Lee Cc: Gabriel Krisman Bertazi Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d26fecb03e1f1069480d41fa2a6cea87ebbb89b8 Author: yohan.joung Date: Fri Apr 4 08:21:06 2025 +0900 f2fs: prevent the current section from being selected as a victim during GC When selecting a victim using next_victim_seg in a large section, the selected section might already have been cleared and designated as the new current section, making it actively in use. This behavior causes inconsistency between the SIT and SSA. F2FS-fs (dm-54): Inconsistent segment (70961) type [0, 1] in SSA and SIT Call trace: dump_backtrace+0xe8/0x10c show_stack+0x18/0x28 dump_stack_lvl+0x50/0x6c dump_stack+0x18/0x28 f2fs_stop_checkpoint+0x1c/0x3c do_garbage_collect+0x41c/0x271c f2fs_gc+0x27c/0x828 gc_thread_func+0x290/0x88c kthread+0x11c/0x164 ret_from_fork+0x10/0x20 issue scenario segs_per_sec=2 - seg#0 and seg#1 are all dirty - all valid blocks are removed in seg#1 - gc select this sec and next_victim_seg=seg#0 - migrate seg#0, next_victim_seg=seg#1 - checkpoint -> sec(seg#0, seg#1) becomes free - allocator assigns sec(seg#0, seg#1) to curseg - gc tries to migrate seg#1 Fixes: e3080b0120a1 ("f2fs: support subsectional garbage collection") Signed-off-by: yohan.joung Signed-off-by: Chao Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 05f1a939225ec895a97a6b2f1cf64e329b6474f5 Author: Paul Moore Date: Sat Apr 12 11:33:41 2025 -0400 selinux: fix the kdoc header for task_avdcache_update The kdoc header incorrectly references an older parameter, update it to reference what is currently used in the function. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504122308.Ch8PzJdD-lkp@intel.com/ Signed-off-by: Paul Moore commit 1ec31f14a83bcad8039fe695a17346a94cab1fd9 Author: Paul Moore Date: Sat Apr 12 11:30:27 2025 -0400 selinux: remove a duplicated include The "linux/parser.h" header was included twice, we only need it once. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504121945.Q0GDD0sG-lkp@intel.com/ Signed-off-by: Paul Moore commit a9d7de0f68b79e5e481967fc605698915a37ac13 Merge: 1e940fff94374d 17f1b08acf50c0 Author: Christian Brauner Date: Fri Apr 11 17:09:44 2025 +0200 Merge patch series "pidfs: ensure consistent ENOENT/ESRCH reporting" Christian Brauner says: In a prior patch series we tried to cleanly differentiate between: (1) The task has already been reaped. (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader. as this was causing issues for non-threaded workloads. But there's cases where the current simple logic is wrong. Specifically, if the pid was a leader pid and the check races with __unhash_process(). Stabilize this by using the pidfd waitqueue lock. * patches from https://lore.kernel.org/20250411-work-pidfs-enoent-v2-0-60b2d3bb545f@kernel.org: pidfs: ensure consistent ENOENT/ESRCH reporting exit: move wake_up_all() pidfd waiters into __unhash_process() Link: https://lore.kernel.org/20250411-work-pidfs-enoent-v2-0-60b2d3bb545f@kernel.org Signed-off-by: Christian Brauner commit 17f1b08acf50c0bfb02e21623e53e7e575612b67 Author: Christian Brauner Date: Fri Apr 11 15:22:45 2025 +0200 pidfs: ensure consistent ENOENT/ESRCH reporting In a prior patch series we tried to cleanly differentiate between: (1) The task has already been reaped. (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader. as this was causing issues for non-threaded workloads. But there's cases where the current simple logic is wrong. Specifically, if the pid was a leader pid and the check races with __unhash_process(). Stabilize this by using the pidfd waitqueue lock. Link: https://lore.kernel.org/20250411-work-pidfs-enoent-v2-2-60b2d3bb545f@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 35c9701ea717dc548f1fab5bfa286be98c1bade8 Author: Christian Brauner Date: Fri Apr 11 15:22:44 2025 +0200 exit: move wake_up_all() pidfd waiters into __unhash_process() Move the pidfd notification out of __change_pid() and into __unhash_process(). The only valid call to __change_pid() with a NULL argument and PIDTYPE_PID is from __unhash_process(). This is a lot more obvious than calling it from __change_pid(). Link: https://lore.kernel.org/20250411-work-pidfs-enoent-v2-1-60b2d3bb545f@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 221df25fdf827b1fe5b904c6a396af06461a32f6 Author: Ard Biesheuvel Date: Thu Apr 10 15:41:25 2025 +0200 x86/sev: Prepare for splitting off early SEV code Prepare for splitting off parts of the SEV core.c source file into a file that carries code that must tolerate being called from the early 1:1 mapping. This will allow special build-time handling of thise code, to ensure that it gets generated in a way that is compatible with the early execution context. So create a de-facto internal SEV API and put the definitions into sev-internal.h. No attempt is made to allow this header file to be included in arbitrary other sources - this is explicitly not the intent. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-20-ardb+git@google.com commit bee174b27e54462ef18b38f8377d27ac0ad14350 Author: Ard Biesheuvel Date: Thu Apr 10 15:41:24 2025 +0200 x86/boot: Drop RIP_REL_REF() uses from SME startup code RIP_REL_REF() has no effect on code residing in arch/x86/boot/startup, as it is built with -fPIC. So remove any occurrences from the SME startup code. Note the SME is the only caller of cc_set_mask() that requires this, so drop it from there as well. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-19-ardb+git@google.com commit 7ae089ee75f3c77b94ff23204b41ea06da9f0193 Author: Ard Biesheuvel Date: Thu Apr 10 15:41:23 2025 +0200 x86/boot: Move early SME init code into startup/ Move the SME initialization code, which runs from the 1:1 mapping of memory as it operates on the kernel virtual mapping, into the new sub-directory arch/x86/boot/startup/ where all startup code will reside that needs to tolerate executing from the 1:1 mapping. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-18-ardb+git@google.com commit dafb26f4271b9cc9cad07d9abf3c71c492e14f4c Author: Ard Biesheuvel Date: Thu Apr 10 15:41:22 2025 +0200 x86/boot: Drop RIP_REL_REF() uses from early mapping code Now that __startup_64() is built using -fPIC, RIP_REL_REF() has become a NOP and can be removed. Only some occurrences of rip_rel_ptr() will remain, to explicitly take the address of certain global structures in the 1:1 mapping of memory. While at it, update the code comment to describe why this is needed. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-17-ardb+git@google.com commit dbe0ad775cbbd614583409d96abbc8ea7edb5eb4 Author: Ard Biesheuvel Date: Thu Apr 10 15:41:21 2025 +0200 x86/boot: Move early kernel mapping code into startup/ The startup code that constructs the kernel virtual mapping runs from the 1:1 mapping of memory itself, and therefore, cannot use absolute symbol references. Before making changes in subsequent patches, move this code into a separate source file under arch/x86/boot/startup/ where all such code will be kept from now on. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-16-ardb+git@google.com commit 4cecebf200efea0fc865b5656f6d12ead2eb5573 Author: Ard Biesheuvel Date: Thu Apr 10 15:41:20 2025 +0200 x86/boot: Move the early GDT/IDT setup code into startup/ Move the early GDT/IDT setup code that runs long before the kernel virtual mapping is up into arch/x86/boot/startup/, and build it in a way that ensures that the code tolerates being called from the 1:1 mapping of memory. The code itself is left unchanged by this patch. Also tweak the sed symbol matching pattern in the decompressor to match on lower case 't' or 'b', as these will be emitted by Clang for symbols with hidden linkage. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-15-ardb+git@google.com commit bcceba3c72c0cf06dfbae77f5aec70fb6187e8df Author: Ard Biesheuvel Date: Thu Apr 10 15:41:19 2025 +0200 x86/asm: Make rip_rel_ptr() usable from fPIC code RIP_REL_REF() is used in non-PIC C code that is called very early, before the kernel virtual mapping is up, which is the mapping that the linker expects. It is currently used in two different ways: - to refer to the value of a global variable, including as an lvalue in assignments; - to take the address of a global variable via the mapping that the code currently executes at. The former case is only needed in non-PIC code, as PIC code will never use absolute symbol references when the address of the symbol is not being used. But taking the address of a variable in PIC code may still require extra care, as a stack allocated struct assignment may be emitted as a memcpy() from a statically allocated copy in .rodata. For instance, this void startup_64_setup_gdt_idt(void) { struct desc_ptr startup_gdt_descr = { .address = (__force unsigned long)gdt_page.gdt, .size = GDT_SIZE - 1, }; may result in an absolute symbol reference in PIC code, even though the struct is allocated on the stack and populated at runtime. To address this case, make rip_rel_ptr() accessible in PIC code, and update any existing uses where the address of a global variable is taken using RIP_REL_REF. Once all code of this nature has been moved into arch/x86/boot/startup and built with -fPIC, RIP_REL_REF() can be retired, and only rip_rel_ptr() will remain. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Dionna Amalie Glaze Cc: H. Peter Anvin Cc: Kees Cook Cc: Kevin Loughlin Cc: Linus Torvalds Cc: Tom Lendacky Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20250410134117.3713574-14-ardb+git@google.com commit 6a5cfab072d6f7b1277d491a17aecf6ea9acbc68 Author: Jani Nikula Date: Fri Apr 11 12:54:14 2025 +0300 drm/i915/pch: clean up includes We no longer need i915_drv.h in intel_pch.c, and we no longer need intel_pch.h universally. With intel_pch.h being included from intel_display_core.h, it's still included pretty much everywhere, but there's no need to include it explicitly from i915_drv.h or xe_device_types.h. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/68ec70f6880b7af19bc93b9817959299634a555d.1744364975.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3090ea0344dad526186235cf540dcbaf1c353f11 Author: Jani Nikula Date: Fri Apr 11 12:54:13 2025 +0300 drm/i915/pch: move PCH detection to intel_display_driver_early_probe() Make PCH detection part of display. For now, call it also for !HAS_DISPLAY() to avoid functional changes here. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/de70b35b170c9a74edddb497a209eb10427b77de.1744364975.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ad2837640b658446325c111599b304732c41d3bb Author: Rodrigo Vivi Date: Fri Apr 11 12:54:12 2025 +0300 drm/i915/display: Convert intel_pch towards intel_display Now that intel_pch lives under display, let's begin its conversion towards struct intel_display. Move the pch_type to inside intel_display and convert the callers. While doing it, sort intel_display_core.h include list alphabetically. Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/8ffe86eb2a02153e3f866a81fb6dc8a3327a0f25.1744364975.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6ca37b86f6c9784f514231c871effb1a4a5c3db9 Author: Rodrigo Vivi Date: Fri Apr 11 12:54:11 2025 +0300 drm/{i915,xe}: Move intel_pch under display The only usage of the "PCH" infra is to detect which South Display Engine we should be using. Move it under display so we can convert all its callers towards intel_display struct later. No functional or code change. Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/041e3dee494aa15c22172360f2bdd9b15e4acb00.1744364975.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit af8967158f9ad759a93e8e7a933c10e7cbb01ba2 Author: Andy Lutomirski Date: Wed Apr 2 11:45:40 2025 +0200 x86/mm: Opt-in to IRQs-off activate_mm() We gain nothing by having the core code enable IRQs right before calling activate_mm() only for us to turn them right back off again in switch_mm(). This will save a few cycles, so execve() should be blazingly fast with this patch applied! Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-8-mingo@kernel.org commit e7021e2fe0b4335523d3f6e2221000bdfc633b62 Author: Andy Lutomirski Date: Wed Apr 2 11:45:39 2025 +0200 x86/efi: Make efi_enter/leave_mm() use the use_/unuse_temporary_mm() machinery This should be considerably more robust. It's also necessary for optimized for_each_possible_lazymm_cpu() on x86 -- without this patch, EFI calls in lazy context would remove the lazy mm from mm_cpumask(). [ mingo: Merged it on top of x86/alternatives ] Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-7-mingo@kernel.org commit 58f8ffa917669a0c8c027e24d5349f0b488f8181 Author: Andy Lutomirski Date: Wed Apr 2 11:45:38 2025 +0200 x86/mm: Allow temporary MMs when IRQs are on EFI runtime services should use temporary MMs, but EFI runtime services want IRQs on. Preemption must still be disabled in a temporary MM context. At some point, the entirely temporary MM mechanism should be moved out of arch code. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20250402094540.3586683-6-mingo@kernel.org commit 4873f494bbe4670f353a9b76ce44e6028c811cbb Author: Peter Zijlstra Date: Wed Apr 2 11:45:37 2025 +0200 x86/mm: Remove 'mm' argument from unuse_temporary_mm() again Now that unuse_temporary_mm() lives in tlb.c it can access cpu_tlbstate.loaded_mm. [ mingo: Merged it on top of x86/alternatives ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-5-mingo@kernel.org commit d376972c9825ac4e8ad74872ee0730a5b4292e44 Author: Andy Lutomirski Date: Wed Apr 2 11:45:36 2025 +0200 x86/mm: Make use_/unuse_temporary_mm() non-static This prepares them for use outside of the alternative machinery. The code is unchanged. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-4-mingo@kernel.org commit 81e3cbdef230fd9adfa8569044b07290afd66708 Author: Andy Lutomirski Date: Wed Apr 2 11:45:35 2025 +0200 x86/events, x86/insn-eval: Remove incorrect current->active_mm references When decoding an instruction or handling a perf event that references an LDT segment, if we don't have a valid user context, trying to access the LDT by any means other than SLDT is racy. Certainly, using current->active_mm is wrong, as active_mm can point to a real user mm when CR3 and LDTR no longer reference that mm. Clean up the code. If nmi_uaccess_okay() says we don't have a valid context, just fail. Otherwise use current->mm. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-3-mingo@kernel.org commit 0812e096cff0fd58d88a21a413fba56c0e6c3caa Author: Peter Zijlstra Date: Wed Apr 2 11:45:34 2025 +0200 x86/mm: Add 'mm' argument to unuse_temporary_mm() In commit 209954cbc7d0 ("x86/mm/tlb: Update mm_cpumask lazily") unuse_temporary_mm() grew the assumption that it gets used on poking_mm exclusively. While this is currently true, lets not hard code this assumption. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: Andrew Morton Link: https://lore.kernel.org/r/20250402094540.3586683-2-mingo@kernel.org commit f5755c23ed8a4603194f6425828a2760f814e117 Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:37 2025 +0530 wifi: ath12k: reset MLO global memory during recovery When operating with multiple devices grouped together, the firmware stores data related to the state machine of each partner device in the MLO global memory region. If the firmware crashes, it updates the state to 'crashed'. During recovery, this memory is shared with the firmware again, and upon detecting the 'crashed' state, it reasserts. This leads to a loop of firmware asserts and it never recovers. Hence to fix this issue, once all devices in the group have been asserted and powered down, reset the MLO global memory region. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-9-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 929069c1bdb70c6332c15f3978d4c8830bc43efd Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:36 2025 +0530 wifi: ath12k: handle ath12k_core_reset() with hardware grouping Currently, in ath12k_core_reset(), the device is powered up immediately after a power down. However, with hardware grouping, when one device asserts, all partner devices also asserts. If there is a delay in processing these asserts, by the time this device powers up, other devices might still be asserting, leading to an overall recovery failure. To prevent this issue, ensure all asserts for a group are processed before initiating the power-up sequence. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-8-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 3e1312f01b508d3f77147bec5286caef074e5d9e Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:35 2025 +0530 wifi: ath12k: handle ath12k_core_restart() with hardware grouping Currently, when ath12k_core_restart() is called and the ab->is_reset flag is set, it invokes ieee80211_restart_hw() for all hardware in the same group. However, other hardware might still be in the recovery process, making this call inappropriate with grouping into picture. To address this, add a condition to check if the group is ready. If the group is not ready, do not call ieee80211_restart_hw(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-7-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 718ead261feba32b00f8ef1d3dff7527106b9458 Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:34 2025 +0530 wifi: ath12k: fix ath12k_core_pre_reconfigure_recovery() with grouping Currently, ath12k_core_pre_reconfigure_recovery() reconfigures all radios within the same group. During grouping and driver going for a recovery, this function is called as many times as there are devices in the group. Consequently, it performs the same reconfiguration multiple times, which is unnecessary. To prevent this, add a check to continue if the action has already been taken. To simplify the management of various flags, the reason for hardware queues being stopped is used as a check instead of introducing a new flag. While at it, also add missing wiphy locks. Wiphy lock is required since ath12k_mac_drain_tx() which is called by ath12k_core_pre_reconfigure_recovery() needs this lock to be held by the caller. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-6-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 1d55625bc2a1c2a8c68153b020e1e097ea27f1b0 Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:33 2025 +0530 wifi: ath12k: fix firmware assert during reboot with hardware grouping At present, during PCI shutdown, the power down is only executed for a single device. However, when operating in a group, all devices need to be powered down simultaneously. Failure to do so will result in a firmware assertion. Hence, introduce a new ath12k_pci_hw_group_power_down() and call it during power down. This will ensure that all partner devices are properly powered down. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-5-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6af396942bf132a1a49523e8fe2f816dc1ebd913 Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:32 2025 +0530 wifi: ath12k: fix ATH12K_FLAG_REGISTERED flag handling Commit a5686ae820fa ("wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register()") relocated the setting of the ATH12K_FLAG_REGISTERED flag to the ath12k_mac_register() function. However, this function only accesses the first device (ab) via ag->ab[0], resulting in the flag being set only for the first device in the group. Similarly, ath12k_mac_unregister() only unsets the flag for the first device. The flag should actually be set for all devices in the group to avoid issues during recovery. Hence, move setting and clearing of this flag in the function ath12k_core_hw_group_start() and ath12k_core_hw_group_stop() respectively. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: a5686ae820fa ("wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register()") Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-4-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit dce7aec6b1f74b0a46b901ab8de1f7bd0515f733 Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:31 2025 +0530 wifi: ath12k: fix failed to set mhi state error during reboot with hardware grouping With hardware grouping, during reboot, whenever a device is removed, it powers down itself and all its partner devices in the same group. Now this is done by all devices and hence there is multiple power down for devices and hence the following error messages can be seen: ath12k_pci 0002:01:00.0: failed to set mhi state POWER_OFF(3) in current mhi state (0x0) ath12k_pci 0002:01:00.0: failed to set mhi state: POWER_OFF(3) ath12k_pci 0002:01:00.0: failed to set mhi state DEINIT(1) in current mhi state (0x0) ath12k_pci 0002:01:00.0: failed to set mhi state: DEINIT(1) ath12k_pci 0003:01:00.0: failed to set mhi state POWER_OFF(3) in current mhi state (0x0) ath12k_pci 0003:01:00.0: failed to set mhi state: POWER_OFF(3) ath12k_pci 0003:01:00.0: failed to set mhi state DEINIT(1) in current mhi state (0x0) ath12k_pci 0003:01:00.0: failed to set mhi state: DEINIT(1) ath12k_pci 0004:01:00.0: failed to set mhi state POWER_OFF(3) in current mhi state (0x0) ath12k_pci 0004:01:00.0: failed to set mhi state: POWER_OFF(3) To prevent this, check if the ATH12K_PCI_FLAG_INIT_DONE flag is already set before powering down. If it is set, it indicates that another partner device has already performed the power down, and this device can skip this step. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-3-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 62f3878fa290cb21535459311fe1dc008cd381da Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:30 2025 +0530 wifi: ath12k: add reference counting for core attachment to hardware group Currently, driver does not manage reference counting for attaching and detaching cores to/from hardware groups. This can lead to issues when multiple cores are involved. Or with same core, attach/detach is called multiple times back to back. Fix this issue by using reference counting. With that, it is now ensured that the core is properly attached or detached from the hardware group and even back to back calls will not alter the count. Additionally, add some debug logs during the attachment and detachment events for better debugging and tracking. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-2-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6d019abc402f58b25a7cab30b2d9af2f3173e4df Author: Aditya Kumar Singh Date: Tue Apr 8 11:36:29 2025 +0530 wifi: ath12k: fix SLUB BUG - Object already free in ath12k_reg_free() During rmmod of ath12k module with SLUB debug enabled, following print is seen - ============================================================================= BUG kmalloc-1k (Not tainted): Object already free ----------------------------------------------------------------------------- Allocated in ath12k_reg_build_regd+0x94/0xa20 [ath12k] age=10470 cpu=0 pid=0 __kmalloc_noprof+0xf4/0x368 ath12k_reg_build_regd+0x94/0xa20 [ath12k] ath12k_wmi_op_rx+0x199c/0x2c14 [ath12k] ath12k_htc_rx_completion_handler+0x398/0x554 [ath12k] ath12k_ce_per_engine_service+0x248/0x368 [ath12k] ath12k_pci_ce_workqueue+0x28/0x50 [ath12k] process_one_work+0x14c/0x28c bh_worker+0x22c/0x27c workqueue_softirq_action+0x80/0x90 tasklet_action+0x14/0x3c handle_softirqs+0x108/0x240 __do_softirq+0x14/0x20 Freed in ath12k_reg_free+0x40/0x74 [ath12k] age=136 cpu=2 pid=166 kfree+0x148/0x248 ath12k_reg_free+0x40/0x74 [ath12k] ath12k_core_hw_group_destroy+0x68/0xac [ath12k] ath12k_core_deinit+0xd8/0x124 [ath12k] ath12k_pci_remove+0x6c/0x130 [ath12k] pci_device_remove+0x44/0xe8 device_remove+0x4c/0x80 device_release_driver_internal+0x1d0/0x22c driver_detach+0x50/0x98 bus_remove_driver+0x70/0xf4 driver_unregister+0x30/0x60 pci_unregister_driver+0x24/0x9c ath12k_pci_exit+0x18/0x24 [ath12k] __arm64_sys_delete_module+0x1a0/0x2a8 invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0x40/0xe0 Slab 0xfffffdffc0033600 objects=10 used=6 fp=0xffff000000cdcc00 flags=0x3fffe0000000240(workingset|head|node=0|zone=0|lastcpupid=0x1ffff) Object 0xffff000000cdcc00 @offset=19456 fp=0xffff000000cde400 [...] This issue arises because in ath12k_core_hw_group_destroy(), each device calls ath12k_core_soc_destroy() for itself and all its partners within the same group. Since ath12k_core_hw_group_destroy() is invoked for each device, this results in a double free condition, eventually causing the SLUB bug. To resolve this, set the freed pointers to NULL. And since there could be a race condition to read these pointers, guard these with the available mutex lock. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 6f245ea0ec6c ("wifi: ath12k: introduce device group abstraction") Signed-off-by: Aditya Kumar Singh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250408-fix_reboot_issues_with_hw_grouping-v4-1-95e7bf048595@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 8c7a5031a6b0d42e640fbd2d5d05f61f74e32dce Author: Dan Carpenter Date: Wed Apr 9 14:01:25 2025 +0300 wifi: ath12k: Fix buffer overflow in debugfs If the user tries to write more than 32 bytes then it results in memory corruption. Fortunately, this is debugfs so it's limited to root users. Fixes: 3f73c24f28b3 ("wifi: ath12k: Add support to enable debugfs_htt_stats") Signed-off-by: Dan Carpenter Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/35daefbd-d493-41d9-b192-96177d521b40@stanley.mountain Signed-off-by: Jeff Johnson commit 4703416d0fb993f7505025667f868f6981a5f7ab Author: Dan Carpenter Date: Thu Apr 10 19:26:16 2025 +0300 wifi: ath12k: Fix a couple NULL vs IS_ERR() bugs The devm_memremap() function returns error pointers on error and the ioremap() function returns NULL on error. The error checking here got those flipped around. Fixes: c01d5cc9b9fe ("wifi: ath12k: Power up userPD") Fixes: 6cee30f0da75 ("wifi: ath12k: add AHB driver support for IPQ5332") Signed-off-by: Dan Carpenter Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/937abc74-9648-4c05-a2c3-8db408b3ed9e@stanley.mountain Signed-off-by: Jeff Johnson commit d118047f82408201eb433a7ff7d505e72515d7e0 Author: Rob Herring (Arm) Date: Tue Apr 8 14:02:11 2025 -0500 wifi: ath11k: Use of_property_present() to test property presence The use of of_property_read_u32() isn't really correct as "memory-region" contains phandles (though those happen to be u32s. As it is just testing for property presence, use of_property_present() instead. Signed-off-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250408190211.2505737-2-robh@kernel.org Signed-off-by: Jeff Johnson commit 1a0e65750b55d2cf5de4a9bf7d6d55718784bdb7 Author: Ramya Gnanasekar Date: Wed Apr 9 20:53:41 2025 +0530 wifi: ath12k: Fix WMI tag for EHT rate in peer assoc Incorrect WMI tag is used for EHT rate update from host to firmware while encoding peer assoc WMI. Correct the WMI tag used for EHT rate update from WMI_TAG_HE_RATE_SET to the proper tag. This ensures firmware does not mistakenly update HE rate during parsing. Found during code review. Compile tested only. Fixes: 5b70ec6036c1 ("wifi: ath12k: add WMI support for EHT peer") Signed-off-by: Ramya Gnanasekar Link: https://patch.msgid.link/20250409152341.944628-1-ramya.gnanasekar@oss.qualcomm.com Signed-off-by: Jeff Johnson commit cfe8af4b5626354f20794f1d54c9b9069638ccd3 Author: Thomas Wu Date: Wed Apr 9 11:08:30 2025 +0530 wifi: ath12k: Disable broadcast TWT feature in HE MAC capabilities Currently, the AP does not support the broadcast target wake time (TWT) feature. Therefore, disable the broadcast TWT feature in the HE MAC capabilities element field. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Thomas Wu Signed-off-by: Aaradhana Sahu Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250409053830.4039467-1-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 4f4b067dd61695e860f97cae6ed6589a3a7dfba3 Author: Aaradhana Sahu Date: Thu Apr 3 13:52:07 2025 +0530 wifi: ath12k: Introduce check against zero for ahvif->key_cipher in ath12k_mac_op_tx() Currently, ahvif->key_cipher is compared with the enum value (WMI_CIPHER_NONE) inside ath12k_mac_op_tx(). However, ahvif->key_cipher is set using the macro value WLAN_CIPHER_SUITE_XXXX which seems inconsistent. To improve code consistency and readability, introduce check against zero for ahvif->key_cipher instead of comparing it with the enum (WMI_CIPHER_NONE). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250403082207.3323938-3-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson commit d61c0b3c63462d17e63e5a2b4815e0f1ad17f57e Author: Aaradhana Sahu Date: Thu Apr 3 13:52:06 2025 +0530 wifi: ath12k: Resolve multicast packet drop by populating key_cipher in ath12k_install_key() Currently, the key_cipher in the ath12k_vif structure, which represents the group cipher of the MLD AP, is populated when the link address matches the ieee80211_vif address within ath12k_install_key(). However, in MLD AP, the link address and ieee80211_vif address can differ. Due to this key_cipher is not populated and multicast packets don't get the correct cipher information and resulting multicast packets drop. To fix this, compare the link address with the arvif->bssid instead of the ieee80211_vif address. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Fixes: 3dd2c68f206ef ("wifi: ath12k: prepare vif data structure for MLO handling") Signed-off-by: Aaradhana Sahu Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250403082207.3323938-2-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6177c97fb6f05bf0473a2806e3bece7e77693209 Author: Raj Kumar Bhagat Date: Thu Apr 3 15:34:29 2025 +0530 wifi: ath12k: fix cleanup path after mhi init Currently, the 'err_pci_msi_free' label is misplaced, causing the cleanup sequence to be incorrect. Fix this by moving the 'err_pci_msi_free' label to the correct position after 'err_irq_affinity_cleanup'. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00209-QCAHKSWPL_SILICONZ-1 Fixes: a3012f206d07 ("wifi: ath12k: set IRQ affinity to CPU0 in case of one MSI vector") Signed-off-by: Raj Kumar Bhagat Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250403-ath12k-cleanup-v1-1-ad8f67b0e9cf@quicinc.com Signed-off-by: Jeff Johnson commit 5e0097514dfb923d27a49bd8900a649d3a50dc4b Author: Balamurugan Mahalingam Date: Wed Apr 9 08:51:25 2025 -0700 wifi: ath12k: Add support for link specific datapath stats Add support to record the number of frames enqueued, hardware descriptor type, encapsulation/encryption types used, frames dropped and completed. This is useful for understanding the datapath performance and tune the peak throughput. The link specific stats can be viewed through the below debugfs file cat /sys/kernel/debug/ieee80211/phy0/netdev:wlan1/link_stats link[0] Tx Unicast Frames Enqueued = 9 link[0] Tx Broadcast Frames Enqueued = 78689 link[0] Tx Frames Completed = 78698 link[0] Tx Frames Dropped = 0 link[0] Tx Frame descriptor Encap Type = raw:0 native wifi:78698 ethernet:0 link[0] Tx Frame descriptor Encrypt Type = 0:78698 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0 10:0 11:0 link[0] Tx Frame descriptor Type = buffer:78698 extension:0 ------------------------------------------------------ link[1] Tx Unicast Frames Enqueued = 0 link[1] Tx Broadcast Frames Enqueued = 78689 link[1] Tx Frames Completed = 78689 link[1] Tx Frames Dropped = 0 link[1] Tx Frame descriptor Encap Type = raw:0 native wifi:78689 ethernet:0 link[1] Tx Frame descriptor Encrypt Type = 0:78689 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0 10:0 11:0 link[1] Tx Frame descriptor Type = buffer:78689 extension:0 ------------------------------------------------------ Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Balamurugan Mahalingam Link: https://patch.msgid.link/20250409155125.299380-1-quic_bmahalin@quicinc.com Signed-off-by: Jeff Johnson commit bd00cc7e8a4c1048d14c9a9e9790c582119785fb Author: P Praneesh Date: Wed Apr 2 23:59:17 2025 +0530 wifi: ath12k: replace the usage of rx desc with rx_info In ath12k_dp_rx_h_mpdu(), during the undecap to native wifi mode, the rx descriptor memory is overwritten. After this function call, any subsequent accesses to rx descriptor related memory yield invalid values. Fix this by replacing instances where rx_desc was used with the pre-cached information in rx_info. This ensures that the values populated from the rx descriptor are accurate and prevents invalid memory access. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Co-developed-by: Karthikeyan Periyasamy Signed-off-by: Karthikeyan Periyasamy Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250402182917.2715596-3-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit e88e6e3c9ada84ceed3fa223ce11af94fcaf3ad3 Author: P Praneesh Date: Wed Apr 2 23:59:16 2025 +0530 wifi: ath12k: add rx_info to capture required field from rx descriptor In ath12k_dp_rx_h_mpdu(), as part of undecap to native wifi mode, the rx descriptor memory is getting overwritten. After this function call, all the rx descriptor related memory accesses give invalid values. To handle this scenario, introduce a new structure ath12k_dp_rx_info which pre-caches all the required fields from the rx descriptor before calling ath12k_dp_rx_h_ppdu(). This rx_info structure will be used in the next patch. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Co-developed-by: Karthikeyan Periyasamy Signed-off-by: Karthikeyan Periyasamy Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250402182917.2715596-2-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6a325aed130bb68790e765f923e76ec5669d2da7 Author: Christian Marangi Date: Thu Apr 10 12:04:04 2025 +0200 net: phy: mediatek: add Airoha PHY ID to SoC driver Airoha AN7581 SoC ship with a Switch based on the MT753x Switch embedded in other SoC like the MT7581 and the MT7988. Similar to these they require configuring some pin to enable LED PHYs. Add support for the PHY ID for the Airoha embedded Switch and define a simple probe function to toggle these pins. Also fill the LED functions and add dedicated function to define LED polarity. Reviewed-by: Andrew Lunn Signed-off-by: Christian Marangi Link: https://patch.msgid.link/20250410100410.348-2-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit e5566162af8b9690e096d2e6089e4ed955a0d13d Author: Christian Marangi Date: Thu Apr 10 12:04:03 2025 +0200 net: phy: mediatek: permit to compile test GE SOC PHY driver When commit 462a3daad679 ("net: phy: mediatek: fix compile-test dependencies") fixed the dependency, it should have also introduced an or on COMPILE_TEST to permit this driver to be compile-tested even if NVMEM_MTK_EFUSE wasn't selected. The driver makes use of NVMEM API that are always compiled (return error) so the driver can actually be compiled even without that config. Fix and simplify the dependency condition of this kernel config. Fixes: 462a3daad679 ("net: phy: mediatek: fix compile-test dependencies") Acked-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: Christian Marangi Acked-by: Arnd Bergmann Link: https://patch.msgid.link/20250410100410.348-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit da1cd04bf1ac36139718ded3b64acbf89464874c Merge: 8bb3212be4b45f cd53f622611f9a Author: Jakub Kicinski Date: Fri Apr 11 20:15:38 2025 -0700 Merge branch 'add-l2-hw-acceleration-for-airoha_eth-driver' Lorenzo Bianconi says: ==================== Add L2 hw acceleration for airoha_eth driver Introduce the capability to offload L2 traffic defining flower rules in the PSE/PPE engine available on EN7581 SoC. Since the hw always reports L2/L3/L4 flower rules, link all L2 rules sharing the same L2 info (with different L3/L4 info) in the L2 subflows list of a given L2 PPE entry. v1: https://lore.kernel.org/20250407-airoha-flowtable-l2b-v1-0-18777778e568@kernel.org ==================== Link: https://patch.msgid.link/20250409-airoha-flowtable-l2b-v2-0-4a1e3935ea92@kernel.org Signed-off-by: Jakub Kicinski commit cd53f622611f9a6dd83b858c85448dd3568b67ec Author: Lorenzo Bianconi Date: Wed Apr 9 11:47:15 2025 +0200 net: airoha: Add L2 hw acceleration support Similar to mtk driver, introduce the capability to offload L2 traffic defining flower rules in the PSE/PPE engine available on EN7581 SoC. Since the hw always reports L2/L3/L4 flower rules, link all L2 rules sharing the same L2 info (with different L3/L4 info) in the L2 subflows list of a given L2 PPE entry. Signed-off-by: Lorenzo Bianconi Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/20250409-airoha-flowtable-l2b-v2-2-4a1e3935ea92@kernel.org Signed-off-by: Jakub Kicinski commit b4916f67902e2ae1dc8e37dfa45e8894ad2f8921 Author: Lorenzo Bianconi Date: Wed Apr 9 11:47:14 2025 +0200 net: airoha: Add l2_flows rhashtable Introduce l2_flows rhashtable in airoha_ppe struct in order to store L2 flows committed by upper layers of the kernel. This is a preliminary patch in order to offload L2 traffic rules. Signed-off-by: Lorenzo Bianconi Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/20250409-airoha-flowtable-l2b-v2-1-4a1e3935ea92@kernel.org Signed-off-by: Jakub Kicinski commit 1f8eb295790001e0f498e62c186130055d3d496f Author: Thorsten Blum Date: Tue Mar 4 19:14:00 2025 +0100 scsi: target: Remove size arguments when calling strscpy() The size parameter of strscpy() is optional because strscpy() uses sizeof() to determine the length of the destination buffer if it is not provided as an argument. Remove it to simplify the code. Remove some unnecessary curly braces. No functional changes intended. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250304181400.78325-1-thorsten.blum@linux.dev Signed-off-by: Martin K. Petersen commit 8bb3212be4b45f7a6089e45dda7dfe9abcee4d65 Merge: ba5560e53dacef 235bd9d21fcdf0 Author: Jakub Kicinski Date: Fri Apr 11 18:58:13 2025 -0700 Merge branch 'net-retire-dccp-socket' Kuniyuki Iwashima says: ==================== net: Retire DCCP socket. As announced by commit b144fcaf46d4 ("dccp: Print deprecation notice."), it's time to remove DCCP socket. The patch 2 removes net/dccp, LSM code, doc, and etc, leaving DCCP netfilter modules. The patch 3 unexports shared functions for DCCP, and the patch 4 renames tcp_or_dccp_get_hashinfo() to tcp_get_hashinfo(). We can do more cleanup; for example, remove IPPROTO_TCP checks in __inet6?_check_established(), remove __module_get() for twsk, remove timewait_sock_ops.twsk_destructor(), etc, but it will be more of TCP stuff, so I'll defer to a later series. v2: https://lore.kernel.org/20250409003014.19697-1-kuniyu@amazon.com v1: https://lore.kernel.org/20250407231823.95927-1-kuniyu@amazon.com ==================== Link: https://patch.msgid.link/20250410023921.11307-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 235bd9d21fcdf07dd125daa3e60ab64f8aefb927 Author: Kuniyuki Iwashima Date: Wed Apr 9 19:36:47 2025 -0700 tcp: Rename tcp_or_dccp_get_hashinfo(). DCCP was removed, so tcp_or_dccp_get_hashinfo() should be renamed. Let's rename it to tcp_get_hashinfo(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250410023921.11307-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 22d6c9eebf2e68e6ab831ded37daaa83daff6bb8 Author: Kuniyuki Iwashima Date: Wed Apr 9 19:36:46 2025 -0700 net: Unexport shared functions for DCCP. DCCP was removed, so many inet functions no longer need to be exported. Let's unexport or use EXPORT_IPV6_MOD() for such functions. sk_free_unlock_clone() is inlined in sk_clone_lock() as it's the only caller. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250410023921.11307-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 2a63dd0edf388802074f1d4d6b588a3b4c380688 Author: Kuniyuki Iwashima Date: Wed Apr 9 19:36:45 2025 -0700 net: Retire DCCP socket. DCCP was orphaned in 2021 by commit 054c4610bd05 ("MAINTAINERS: dccp: move Gerrit Renker to CREDITS"), which noted that the last maintainer had been inactive for five years. In recent years, it has become a playground for syzbot, and most changes to DCCP have been odd bug fixes triggered by syzbot. Apart from that, the only changes have been driven by treewide or networking API updates or adjustments related to TCP. Thus, in 2023, we announced we would remove DCCP in 2025 via commit b144fcaf46d4 ("dccp: Print deprecation notice."). Since then, only one individual has contacted the netdev mailing list. [0] There is ongoing research for Multipath DCCP. The repository is hosted on GitHub [1], and development is not taking place through the upstream community. While the repository is published under the GPLv2 license, the scheduling part remains proprietary, with a LICENSE file [2] stating: "This is not Open Source software." The researcher mentioned a plan to address the licensing issue, upstream the patches, and step up as a maintainer, but there has been no further communication since then. Maintaining DCCP for a decade without any real users has become a burden. Therefore, it's time to remove it. Removing DCCP will also provide significant benefits to TCP. It allows us to freely reorganize the layout of struct inet_connection_sock, which is currently shared with DCCP, and optimize it to reduce the number of cachelines accessed in the TCP fast path. Note that we keep DCCP netfilter modules as requested. [3] Link: https://lore.kernel.org/netdev/20230710182253.81446-1-kuniyu@amazon.com/T/#u #[0] Link: https://github.com/telekom/mp-dccp #[1] Link: https://github.com/telekom/mp-dccp/blob/mpdccp_v03_k5.10/net/dccp/non_gpl_scheduler/LICENSE #[2] Link: https://lore.kernel.org/netdev/Z_VQ0KlCRkqYWXa-@calendula/ #[3] Signed-off-by: Kuniyuki Iwashima Acked-by: Paul Moore (LSM and SELinux) Acked-by: Casey Schaufler Link: https://patch.msgid.link/20250410023921.11307-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit b2bdce7adc9027ae25d3dd864a58c435bcfcabac Author: Kuniyuki Iwashima Date: Wed Apr 9 19:36:44 2025 -0700 selftest: net: Remove DCCP bits. We will remove DCCP. Let's remove DCCP bits from selftest. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250410023921.11307-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit fc8a5ee50743516700d10a83c598b6adb3c2dbef Author: Kees Cook Date: Mon Mar 10 15:25:54 2025 -0700 scsi: pm80xx: Add __nonstring annotations for unterminated strings When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby eliminate the warning. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Cc: Jack Wang Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250310222553.work.437-kees@kernel.org Signed-off-by: Martin K. Petersen commit 51a7c741f7e1c00839167a89a3d2a382a6d482f2 Merge: 3be3f70ee95da0 b2e689baf22040 Author: Herbert Xu Date: Sat Apr 12 09:48:09 2025 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up scompress and ahash fixes. The scompress fix becomes mostly unnecessary as the bugs no longer exist with the new acompress code. However, keep the NULL assignment in crypto_acomp_free_streams so that if the user decides to call crypto_acomp_alloc_streams again it will work. commit 500d4b742e0cc712160054413e129a568467a7de Author: Huan Tang Date: Fri Apr 11 17:29:24 2025 +0800 scsi: ufs: core: Add WB buffer resize support Follow JESD220G, support a WB buffer resize function through sysfs. The host can obtain resize hint and resize status, and enable the resize operation. Add three sysfs nodes: 1. wb_resize_enable 2. wb_resize_hint 3. wb_resize_status The detailed definition of the three nodes can be found in the sysfs documentation. Signed-off-by: Huan Tang Signed-off-by: Lu Hongfei Link: https://lore.kernel.org/r/20250411092924.1116-1-tanghuan@vivo.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ba5560e53dacefddf8c47802b7a30b2e53afdcb8 Author: Lucien.Jheng Date: Wed Apr 9 23:09:02 2025 +0800 net: phy: air_en8811h: Add clk provider for CKO pin EN8811H outputs 25MHz or 50MHz clocks on CKO, selected by GPIO3. CKO clock operates continuously from power-up through md32 loading. Implement clk provider driver so we can disable the clock output in case it isn't needed, which also helps to reduce EMF noise Signed-off-by: Lucien.Jheng Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250409150902.3596-1-lucienx123@gmail.com Signed-off-by: Jakub Kicinski commit ae82eaf4aeea060bb736c3e20c0568b67c701d7d Author: Daniel Wagner Date: Wed Apr 9 13:34:22 2025 +0200 scsi: lpfc: Use memcpy() for BIOS version The strlcat() with FORTIFY support is triggering a panic because it thinks the target buffer will overflow although the correct target buffer size is passed in. Anyway, instead of memset() with 0 followed by a strlcat(), just use memcpy() and ensure that the resulting buffer is NULL terminated. BIOSVersion is only used for the lpfc_printf_log() which expects a properly terminated string. Signed-off-by: Daniel Wagner Link: https://lore.kernel.org/r/20250409-fix-lpfc-bios-str-v1-1-05dac9e51e13@kernel.org Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit cdcb08d5710bc9b543551a85ad551f44d6a4bfc0 Author: Thorsten Blum Date: Tue Apr 8 12:28:40 2025 +0200 scsi: elx: sli4: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for NUL-terminated destination buffers; use strscpy() instead. Since sli_config_cmd_init() already zeroes out the destination buffers, the potential NUL-padding by strncpy() is unnecessary. strscpy() copies only the required characters and guarantees NUL-termination. And since all three destination buffers have a fixed length, strscpy() automatically determines their size using sizeof() when the argument is omitted. This makes any explicit sizeof() calls unnecessary. The source strings are also NUL-terminated and meet the __must_be_cstr() requirement of strscpy(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250408102843.804083-2-thorsten.blum@linux.dev Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 20c74f892645c621df7c1d8e9a0b97793655d4db Merge: 2b5c8b43fa2ec0 3c7ac40d732232 Author: Martin K. Petersen Date: Fri Apr 11 21:24:34 2025 -0400 Merge patch series "ufs: core: cleanup and threaded irq handler" Neil Armstrong says: On systems with a large number request slots and unavailable MCQ, the current design of the interrupt handler can delay handling of other subsystems interrupts causing display artifacts, GPU stalls or system firmware requests timeouts. Example of errors reported on a loaded system: [drm:dpu_encoder_frame_done_timeout:2706] [dpu error]enc32 frame done timeout msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: hangcheck detected gpu lockup rb 2! msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: completed fence: 74285 msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: submitted fence: 74286 Error sending AMC RPMH requests (-110) Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-0-08bee980f71e@linaro.org Signed-off-by: Martin K. Petersen commit 3c7ac40d732232fec0ba31d0a5e3cc9c112fc2e7 Author: Neil Armstrong Date: Mon Apr 7 12:17:05 2025 +0200 scsi: ufs: core: Delegate the interrupt service routine to a threaded IRQ handler On systems with a large number request slots and unavailable MCQ ESI, the current design of the interrupt handler can delay handling of other subsystems interrupts causing display artifacts, GPU stalls or system firmware requests timeouts. Since the interrupt routine can take quite some time, it's preferable to move it to a threaded handler and leave the hard interrupt handler wake up the threaded interrupt routine, the interrupt line would be masked until the processing is finished in the thread thanks to the IRQS_ONESHOT flag. When MCQ & ESI interrupts are enabled the I/O completions are now directly handled in the "hard" interrupt routine to keep IOPs high since queues handling is done in separate per-queue interrupt routines. This fixes all encountered issued when running FIO tests on the Qualcomm SM8650 platform. Example of errors reported on a loaded system: [drm:dpu_encoder_frame_done_timeout:2706] [dpu error]enc32 frame done timeout msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: hangcheck detected gpu lockup rb 2! msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: completed fence: 74285 msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: submitted fence: 74286 Error sending AMC RPMH requests (-110) Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-3-08bee980f71e@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2d6c7bcc6cca63238fce0a95874b053500a1112e Author: Neil Armstrong Date: Mon Apr 7 12:17:04 2025 +0200 scsi: ufs: core: Track when MCQ ESI is enabled In preparation of adding a threaded interrupt handler, track when the MCQ ESI interrupt handlers were installed so we can optimize the MCQ interrupt handling to avoid walking the threaded handler in the case ESI handlers are enabled. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-2-08bee980f71e@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 56f4beffc9a056f70e56f53d01451441106bd4ff Author: Neil Armstrong Date: Mon Apr 7 12:17:03 2025 +0200 scsi: ufs: core: Drop last_intr_status/ts stats In order to prepare introduction of a threaded interrupt handler, drop last_intr_status & last_intr_ts drop the ufs_stats struct, and the associated debug code. Suggested-by: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-1-08bee980f71e@linaro.org Signed-off-by: Martin K. Petersen commit 2b5c8b43fa2ec0b6f1d9df7acc26942d8fe03502 Merge: c728f7a15a2e99 50dda498350734 Author: Martin K. Petersen Date: Fri Apr 11 21:16:58 2025 -0400 Merge patch series "Support for wrapped inline encryption keys on Qualcomm SoCs" Eric Biggers says: Add support for hardware-wrapped inline encryption keys to the Qualcomm ICE (Inline Crypto Engine) and UFS (Universal Flash Storage) drivers. I'd like these patches to be taken through the scsi tree for 6.16. But the Qualcomm / msm tree would be okay too if that is preferred. The block layer framework for this feature was merged in 6.15; refer to the "Hardware-wrapped keys" section of Documentation/block/inline-encryption.rst. This patchset wires it up for the newer Qualcomm SoCs, such as SM8650, which have a HWKM (Hardware Key Manager) and support the SCM calls needed to easily use it. Tested on the SM8650 HDK with xfstests, specifically generic/368 and generic/369, in combination with the required fscrypt patch https://lore.kernel.org/r/20250404225859.172344-1-ebiggers@kernel.org which I plan to apply separately. Link: https://lore.kernel.org/r/20250404231533.174419-1-ebiggers@kernel.org Signed-off-by: Martin K. Petersen commit 50dda49835073433840fdffe8c4d7624daf6d9ba Author: Eric Biggers Date: Fri Apr 4 16:15:32 2025 -0700 scsi: ufs: qcom: Add support for wrapped keys Wire up the wrapped key support for ufs-qcom by implementing the needed methods in struct blk_crypto_ll_ops and setting the appropriate flag in blk_crypto_profile::key_types_supported. For more information about this feature and how to use it, refer to the sections about hardware-wrapped keys in Documentation/block/inline-encryption.rst and Documentation/filesystems/fscrypt.rst. Based on patches by Gaurav Kashyap . Reworked to use the custom crypto profile support. Acked-by: Manivannan Sadhasivam Tested-by: Bartosz Golaszewski # sm8650 Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20250404231533.174419-4-ebiggers@kernel.org Acked-by: Ulf Hansson # For MMC Signed-off-by: Martin K. Petersen commit 7cc6e0c34b21b6e981afde695132f38e174c7aa5 Author: Gaurav Kashyap Date: Fri Apr 4 16:15:31 2025 -0700 scsi: soc: qcom: ice: Add HWKM support to the ICE driver Qualcomm's Inline Crypto Engine (ICE) version 3.2 and later includes a key management hardware block called the Hardware Key Manager (HWKM). Add support for HWKM to the ICE driver. HWKM provides hardware-wrapped key support where the ICE (storage) keys are not exposed to software and instead are protected in hardware. Later patches will wire up this feature to ufs-qcom and sdhci-msm using the support added in this patch. HWKM and legacy mode are currently mutually exclusive. The selection of which mode to use has to be made before the storage driver(s) registers any inline encryption capable disk(s) with the block layer (i.e., generally at boot time) so that the appropriate crypto capabilities can be advertised to upper layers. Therefore, make the ICE driver select HWKM mode when the all of the following are true: - The new module parameter qcom_ice.use_wrapped_keys=1 is specified. - HWKM is present and is at least v2, i.e. ICE is v3.2.1 or later. - The SCM calls needed to fully use HWKM are supported by TrustZone. [EB: merged related patches; fixed the module parameter to work correctly; dropped unnecessary support for HWKM v1; fixed error handling; improved log messages, comments, and commit message; fixed naming; merged enable and init functions; and other cleanups] Signed-off-by: Gaurav Kashyap Signed-off-by: Bartosz Golaszewski Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20250404231533.174419-3-ebiggers@kernel.org Acked-by: Ulf Hansson # For MMC Signed-off-by: Martin K. Petersen commit 11d4c388a38ab6e95a7be82a44a55ecc32cd6a14 Author: Eric Biggers Date: Fri Apr 4 16:15:30 2025 -0700 scsi: soc: qcom: ice: Make qcom_ice_program_key() take struct blk_crypto_key qcom_ice_program_key() currently accepts the key as an array of bytes, algorithm ID, key size enum, and data unit size. However both callers have a struct blk_crypto_key which contains all that information. Thus they both have similar code that converts the blk_crypto_key into the form that qcom_ice_program_key() wants. Once wrapped key support is added, the key type would need to be added to the arguments too. Therefore, this patch changes qcom_ice_program_key() to take in all this information as a struct blk_crypto_key directly. The calling code is updated accordingly. This ends up being much simpler, and it makes the key type be passed down automatically once wrapped key support is added. Based on a patch by Gaurav Kashyap that replaced the byte array argument only. This patch makes the blk_crypto_key replace other arguments like the algorithm ID too, ensuring that there remains only one source of truth. Acked-by: Manivannan Sadhasivam Tested-by: Bartosz Golaszewski # sm8650 Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20250404231533.174419-2-ebiggers@kernel.org Acked-by: Konrad Dybcio Acked-by: Ulf Hansson # For MMC Signed-off-by: Martin K. Petersen commit c9e81198a750870fcd806b853177108e982a1db6 Author: Rob Herring (Arm) Date: Thu Apr 10 10:47:23 2025 -0500 arm64: dts: broadcom: bcm2712: Use "l2-cache" for L2 cache node names There's no need include the CPU number in the L2 cache node names as the names are local to the CPU nodes. The documented node name is also just "l2-cache". Signed-off-by: Rob Herring (Arm) Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/all/20250410-dt-cpu-schema-v2-2-63d7dc9ddd0a@kernel.org/ Signed-off-by: Florian Fainelli commit faeefc173be40512341b102cf1568aa0b6571acd Author: Zijun Hu Date: Thu Apr 10 09:01:27 2025 +0800 sock: Correct error checking condition for (assign|release)_proto_idx() (assign|release)_proto_idx() wrongly check find_first_zero_bit() failure by condition '(prot->inuse_idx == PROTO_INUSE_NR - 1)' obviously. Fix by correcting the condition to '(prot->inuse_idx == PROTO_INUSE_NR)' Signed-off-by: Zijun Hu Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250410-fix_net-v2-1-d69e7c5739a4@quicinc.com Signed-off-by: Jakub Kicinski commit 083a0c8d172aa22ea20e75bc1d48fd205130dffa Author: Srinivasan Shanmugam Date: Fri Apr 11 21:32:08 2025 +0530 drm/amdgpu: Enhance Cleaner Shader Handling in GFX v9.0 Architecture v2 This commit modifies the gfx_v9_0_ring_emit_cleaner_shader function to use a switch statement for cleaner shader emission based on the specific GFX IP version. The function now distinguishes between different IP versions, using PACKET3_RUN_CLEANER_SHADER_9_0 for the versions 9.0.1, 9.1.0, 9.2.1, 9.2.2, 9.3.0, and 9.4.0, while retaining PACKET3_RUN_CLEANER_SHADER for version 9.4.2. v2: Simplify logic (Alex). Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8896abcfdd898a79d5795b0689bc944518860d21 Author: Srinivasan Shanmugam Date: Fri Apr 11 21:15:41 2025 +0530 drm/amdgpu: Add PACKET3_RUN_CLEANER_SHADER_9_0 for Cleaner Shader execution This commit introduces the PACKET3_RUN_CLEANER_SHADER_9_0 definition, which is a command packet utilized to instruct the GPU to execute the cleaner shader for the GFX9.0 graphics architecture. The cleaner shader is a piece of GPU code that is responsible for clearing or initializing essential GPU resources, such as Local Data Share (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs). Properly clearing these resources is vital for ensuring data isolation and security between different workloads executed on the GPU. When the GPU receives this packet, it fetches and runs the cleaner shader instructions from the specified location in the packet. Thus by preventing data leaks and ensuring that previous job states do not interfere with subsequent workloads. Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cf93f10101f958a95023ed1b63d631c8112b17ca Author: Jesse Zhang Date: Fri Apr 11 16:22:27 2025 +0800 drm/amd/amdgpu: Fix out of bounds warning in amdgpu_hw_ip_info Fix an array index out of bounds warning in the DMA IP case of amdgpu_hw_ip_info() where it was incorrectly checking adev->gfx.gfx_ring[i].no_user_submission instead of adev->sdma.instance[i].ring.no_user_submission. The mismatch caused UBSAN to report an array bounds violation since it was accessing the GFX ring array with SDMA instance indices. Fixes: 4310acd4464b ("drm/amdgpu: add ring flag for no user submissions") Reviewed-by: Alex Deucher Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher commit 4172b556fd5bdfdf9b2d1e42da39df6ce99ee989 Author: Eric Huang Date: Mon Apr 7 15:32:33 2025 -0400 drm/amdkfd: add smi events for process start and end rocm-smi will be able to show the events for KFD process start/end, it is the implementation of this feature. Signed-off-by: Eric Huang Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 1d9bff4cf8c53d33ee2ff1b11574e5da739ce61c Author: Lijo Lazar Date: Fri Apr 11 17:40:26 2025 +0530 drm/amdgpu: Use the right function for hdp flush There are a few prechecks made before HDP flush like a flush is not required on APU bare metal. Using hdp callback directly bypasses those checks. Use amdgpu_device_flush_hdp which takes care of prechecks. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5045c6c69872b9dd145e9ecbc9731d81a5954be1 Author: Ellen Pan Date: Thu Apr 10 22:12:24 2025 -0400 drm/amdgpu: Direct ret in ras_reset_err_cnt on VF With adding sriov_vf check, we directly return EOPNOTSUPP in ras_reset_error_count as we should not do anything on VF to reset RAS error count. This also fixes the issue that loading guest driver causes register violations. Reviewed-by: Ahmad Rehman Signed-off-by: Ellen Pan Signed-off-by: Alex Deucher commit 18a878fd8aef0ec21648a3782f55a79790cd4073 Author: Lijo Lazar Date: Fri Apr 11 16:45:46 2025 +0530 drm/amdgpu: Use generic hdp flush function Except HDP v5.2 all use a common logic for HDP flush. Use a generic function. HDP v5.2 forces NO_KIQ logic, revisit it later. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d6b22b1dffdae52ba5739326ea7b271ba5354db1 Author: Candice Li Date: Fri Apr 11 13:12:06 2025 +0800 drm/amdgpu: Set RAS EEPROM table version to v3 for umc v12_5 Set RAS EEPROM table version to v3 for umc v12_5. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit e21e1e8bb847b87e2e099ffdf37ed382ccba4b44 Author: Jesse.zhang@amd.com Date: Tue Apr 8 14:23:45 2025 +0800 drm/amdgpu: Enable per-queue reset for SDMA v4.4.2 on IP v9.5.0 Add support for per-queue reset on SDMA v4.4.2 when running with: 1. MEC firmware version 17 or later 2. DPM indicates SDMA reset is supported v2: Fixed supported firmware versions (Lijo) Signed-off-by: Jesse.Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit e62a8bc5d68718c0d1e0366e2e636dd41e7ee5e4 Author: Srinivasan Shanmugam Date: Thu Apr 10 19:37:06 2025 +0530 drm/amdgpu/gfx11: Add Cleaner Shader Support for GFX11.5.2/11.5.3 GPUs Enable the cleaner shader for additional GFX11.5.2/11.5.3 series GPUs to ensure data isolation among GPU tasks. The cleaner shader is tasked with clearing the Local Data Store (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps avoid data leakage and guarantees the accuracy of computational results. This update extends cleaner shader support to GFX11.5.2/11.5.3 GPUs, previously available for GFX11.0.3. It enhances security by clearing GPU memory between processes and maintains a consistent GPU state across KGD and KFD workloads. Cc: Mario Sopena-Novales Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 20c50a9a793300a1fc82f3ddd0e3c68f8213fbef Author: Alex Deucher Date: Tue Apr 8 21:27:15 2025 -0400 drm/amd/display/dml2: use vzalloc rather than kzalloc The structures are large and they do not require contiguous memory so use vzalloc. Fixes: 70839da63605 ("drm/amd/display: Add new DCN401 sources") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4126 Cc: Aurabindo Pillai Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a61c16258a4720065972cf04fcfee1caa6ea5fc0 Author: Mario Limonciello Date: Thu Apr 10 12:23:06 2025 -0500 Documentation/amdgpu: Add Ryzen AI 350 series processors These have been announced so add them to the table. Link: https://www.amd.com/en/products/processors/laptop/ryzen/ai-300-series/amd-ryzen-ai-7-350.html Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 309d11b4bbb402abdcf128920f353f4332f1943b Author: Roman Li Date: Wed Apr 9 12:03:00 2025 -0400 drm/amd/display: Add htmldocs description for fused_io interface [Why] htmldocs build warning: "Function parameter or struct member 'fused_io' not described in 'amdgpu_display_manager'". [How] Add missing description. Fixes: ce801e5d6c1b ("drm/amd/display: HDCP Locality check using DMUB Fused IO") Reported-by: Stephen Rothwell Signed-off-by: Roman Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2e0454b730648e9349ca54eb4a8142d77e8e7008 Author: Alex Deucher Date: Tue Apr 8 10:39:06 2025 -0400 drm/amdgpu: adjust enforce_isolation handling Switch from a bool to an enum and allow more options for enforce isolation. There are now 3 modes of operation: - Disabled (0) - Enabled (serialization and cleaner shader) (1) - Enabled in legacy mode (no serialization or cleaner shader) (2) This provides better flexibility for more use cases. Acked-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher commit b86fd212f37631551f9620e28062dd2b0c53ccdd Author: Alex Deucher Date: Tue Apr 8 10:47:24 2025 -0400 drm/amdgpu/mes12: use the device value for enforce isolation Use the local setting rather than the global parameter. Acked-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher commit a7bb01337fcededd05ef9b6e08e64d2ac7d65724 Author: Alex Deucher Date: Tue Apr 8 10:45:52 2025 -0400 drm/amdgpu/mes11: use the device value for enforce isolation Use the local setting rather than the global parameter. Acked-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher commit 0f4dfe86fe922c37bcec99dce80a15b4d5d4726d Author: David Rosca Date: Mon Apr 7 13:12:11 2025 +0200 drm/amdgpu: Add back JPEG to video caps for carrizo and newer JPEG is not supported on Vega only. Fixes: 0a6e7b06bdbe ("drm/amdgpu: Remove JPEG from vega and carrizo video caps") Signed-off-by: David Rosca Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 9a218d6f478edca73207f5b72efc9bbf035ea1cf Author: Prike Liang Date: Fri Feb 21 20:34:32 2025 +0800 drm/amdgpu/gfx12: Implement the GFX12 KCQ pipe reset Implement the GFX12 KCQ pipe reset, and disable the GFX12 kernel compute queue until the CPFW fully supports it. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 732c6cefc1ecfc8de5d7a2029480798655d979d8 Author: Ce Sun Date: Wed Apr 9 19:53:11 2025 +0800 drm/amdgpu: Replace tmp_adev with hive in amdgpu_pci_slot_reset Checking hive is more readable. The following smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:6820 amdgpu_pci_slot_reset() warn: iterator used outside loop: 'tmp_adev' Reported-by: Dan Carpenter Signed-off-by: Ce Sun Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 39938a8ed979e398faa3791a47e282c82bcc6f04 Author: ZhenGuo Yin Date: Tue Apr 8 16:18:28 2025 +0800 drm/amdgpu: fix warning of drm_mm_clean Kernel doorbell BOs needs to be freed before ttm_fini. Fixes: 54c30d2a8def ("drm/amdgpu: create kernel doorbell pages") Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: ZhenGuo Yin Signed-off-by: Alex Deucher commit c770ef19673fb1defcbde2ee2b91c3c89bfcf164 Author: Kenneth Feng Date: Tue Apr 1 16:04:41 2025 +0800 drm/amd/amdgpu: disable ASPM in some situations disable ASPM with some ASICs on some specific platforms. required from PCIe controller owner. Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 0ec7535f5ba1cb4550e45ad7d585ca746fdcae6a Author: Prike Liang Date: Fri Mar 28 18:33:09 2025 +0800 drm/amdgpu: remove the duplicated mes queue active state setting The MES queue deactivation and active status are already set in mes_userq_unmap|map(), so the caller needn't set the queue_active bit again. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f0ec5926da24157bada1ebe9789c8b2527b85182 Author: Ruili Ji Date: Mon Mar 31 20:55:09 2025 -0400 amd/amdgpu: Implement VCN queue reset for vcn 4.0.3 Add function for vcn queue reset to make driver to do fine-grained reset instead of the whole gpu reset. Reviewed-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Ruili Ji Signed-off-by: Alex Deucher commit 8ef4e996745b56ad6018e4120acf9ab530b72c2f Author: Masha Grinman Date: Thu Apr 3 14:08:17 2025 -0500 drm/amdgpu: Move read of snoop register from guest to host Guest is reading/writing to snoop register which is a security violation We moved the code to the host driver And also added a validation on the guest side to check if it's guest Signed-off-by: Masha Grinman Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 2aabd44aa8a3c08da3d43264c168370f6da5e81d Author: Mario Limonciello Date: Tue Apr 8 13:09:57 2025 -0500 drm/amd: Forbid suspending into non-default suspend states On systems that default to 'deep' some userspace software likes to try to suspend in 'deep' first. If there is a failure for any reason (such as -ENOMEM) the failure is ignored and then it will try to use 's2idle' as a fallback. This fails, but more importantly it leads to graphical problems. Forbid this behavior and only allow suspending in the last state supported by the system. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4093 Acked-by: Alex Deucher Link: https://lore.kernel.org/r/20250408180957.4027643-1-superm1@kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 8b2ae7d492675e8af8902f103364bef59382b935 Author: Christian König Date: Fri Mar 28 18:58:17 2025 +0100 drm/amdgpu: use a dummy owner for sysfs triggered cleaner shaders v4 Otherwise triggering sysfs multiple times without other submissions in between only runs the shader once. v2: add some comment v3: re-add missing cast v4: squash in semicolon fix Signed-off-by: Christian König Reviewed-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher commit 5d7ddc59b3d89b724a5aa8f30d0db94ff8d2d93f Author: Paul Moore Date: Thu Apr 10 15:20:32 2025 -0400 selinux: reduce path walk overhead Reduce the SELinux performance overhead during path walks through the use of a per-task directory access cache and some minor code optimizations. The directory access cache is per-task because it allows for a lockless cache while also fitting well with a common application pattern of heavily accessing a relatively small number of SELinux directory labels. The cache is inherited by child processes when the child runs with the same SELinux domain as the parent, and invalidated on changes to the task's SELinux domain or the loaded SELinux policy. A cache of four entries was chosen based on testing with the Fedora "targeted" policy, a SELinux Reference Policy variant, and 'make allmodconfig' on Linux v6.14. Code optimizations include better use of inline functions to reduce function calls in the common case, especially in the inode revalidation code paths, and elimination of redundant checks between the LSM and SELinux layers. As mentioned briefly above, aside from general use and regression testing with the selinux-testsuite, performance was measured using 'make allmodconfig' with Linux v6.14 as a base reference. As expected, there were variations from one test run to another, but the measurements below are a good representation of the test results seen on my test system. * Linux v6.14 REF 1.26% [k] __d_lookup_rcu SELINUX (1.31%) 0.58% [k] selinux_inode_permission 0.29% [k] avc_lookup 0.25% [k] avc_has_perm_noaudit 0.19% [k] __inode_security_revalidate * Linux v6.14 + patch REF 1.41% [k] __d_lookup_rcu SELINUX (0.89%) 0.65% [k] selinux_inode_permission 0.15% [k] avc_lookup 0.05% [k] avc_has_perm_noaudit 0.04% [k] avc_policy_seqno X.XX% [k] __inode_security_revalidate (now inline) In both cases the __d_lookup_rcu() function was used as a reference point to establish a context for the SELinux related functions. On a unpatched Linux v6.14 system we see the time spent in the combined SELinux functions exceeded that of __d_lookup_rcu(), 1.31% compared to 1.26%. However, with this patch applied the time spent in the combined SELinux functions dropped to roughly 65% of the time spent in __d_lookup_rcu(), 0.89% compared to 1.41%. Aside from the significant decrease in time spent in the SELinux AVC, it appears that any additional time spent searching and updating the cache is offset by other code improvements, e.g. time spent in selinux_inode_permission() + __inode_security_revalidate() + avc_policy_seqno() is less on the patched kernel than the unpatched kernel. It is worth noting that in this patch the use of the per-task cache is limited to the security_inode_permission() LSM callback, selinux_inode_permission(), but future work could expand the cache into inode_has_perm(), likely through consolidation of the two functions. While this would likely have little to no impact on path walks, it may benefit other operations. Reviewed-by: Stephen Smalley Tested-by: Stephen Smalley Signed-off-by: Paul Moore commit 8716451a4e57cc82f3656d7a71b67d3b5831ef3f Author: Takaya Saeki Date: Tue Mar 18 08:31:39 2025 +0000 selinux: support wildcard match in genfscon Currently, genfscon only supports string prefix match to label files. Thus, labeling numerous dynamic sysfs entries requires many specific path rules. For example, labeling device paths such as `/sys/devices/pci0000:00/0000:00:03.1/<...>/0000:04:00.1/wakeup` requires listing all specific PCI paths, which is challenging to maintain. While user-space restorecon can handle these paths with regular expression rules, relabeling thousands of paths under sysfs after it is mounted is inefficient compared to using genfscon. This commit adds wildcard matching to genfscon to make rules more efficient and expressive. This new behavior is enabled by genfs_seclabel_wildcard capability. With this capability, genfscon does wildcard matching instead of prefix matching. When multiple wildcard rules match against a path, then the longest rule (determined by the length of the rule string) will be applied. If multiple rules of the same length match, the first matching rule encountered in the given genfscon policy will be applied. Users are encouraged to write longer, more explicit path rules to avoid relying on this behavior. This change resulted in nice real-world performance improvements. For example, boot times on test Android devices were reduced by 15%. This improvement is due to the elimination of the "restorecon -R /sys" step during boot, which takes more than two seconds in the worst case. Signed-off-by: Takaya Saeki Signed-off-by: Paul Moore commit 4926c3fd83d50987685a0c1131bd60b252a3d541 Author: Christian Göttsche Date: Tue Mar 18 09:50:05 2025 +0100 selinux: drop copy-paste comment Port labeling is based on port number and protocol (TCP/UDP/...) but not based on network family (IPv4/IPv6). Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore commit cde3b1b66f2de9eba3ce1beadb91739d803a1018 Author: Christian Göttsche Date: Tue Mar 18 09:33:32 2025 +0100 selinux: unify OOM handling in network hashtables For network objects, like interfaces, nodes, port and InfiniBands, the object to SID lookup is cached in hashtables. OOM during such hashtable additions of new objects is considered non-fatal and the computed SID is simply returned without adding the compute result into the hash table. Actually ignore OOM in the InfiniBand code, despite the comment already suggesting to do so. This reverts commit c350f8bea271 ("selinux: Fix error return code in sel_ib_pkey_sid_slow()"). Add comments in the other places. Use kmalloc() instead of kzalloc(), since all members are initialized on success and the data is only used in internbal hash tables, so no risk of information leakage to userspace. Fixes: c350f8bea271 ("selinux: Fix error return code in sel_ib_pkey_sid_slow()") Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore commit e6fb56b2253d49d192d4fe790698462d5422c041 Author: Christian Göttsche Date: Tue Mar 18 09:33:30 2025 +0100 selinux: add likely hints for fast paths In the network hashtable lookup code add likely() compiler hints in the fast path, like already done in sel_netif_sid(). Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore commit 9cc034be10a52c30719f8b9436d81b981421bfb7 Author: Christian Göttsche Date: Tue Mar 18 09:33:29 2025 +0100 selinux: contify network namespace pointer The network namespace is not modified. Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore commit 47a1a15645d558699765f0f7e82032302ae47a46 Author: Christian Göttsche Date: Tue Mar 18 09:33:34 2025 +0100 selinux: constify network address pointer The network address, either an IPv4 or IPv6 one, is not modified. Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore commit c728f7a15a2e99065d143c6f6673d075cf4ce8d2 Merge: 0af2f6be1b4281 d19dc8d4dfca33 Author: Martin K. Petersen Date: Fri Apr 11 16:21:21 2025 -0400 Merge patch series "scsi: scsi_debug: Changes to improve support for device types" Kai Mäkisara says: The patch set includes changes to better support different device types. The first patch fixes two obvious typos in the existing definitions. The second patch adds a device type mask to the command definitions (struct opcode_info_t). This makes possible for different command definitions for different device types and makes easy to add opcodes specific to certain device types. The mask is 32 bits wide and the bit positions are derived from the Peripheral Device Type field returned from INQUIRY and used in the struct scsi_device. In addition to the mask, the second patch adds command filtering based on device type to command queuing and building of the response in Report Supported Opcodes. The third patch splits definitions of READ(6), WRITE(6) and PRE-FETCH/READ POSITION to versions for tapes and for other devices. The fourth patch changes obtaining device type from sdebug_ptype to struct scsi_device->type whenever it is set correctly. This improves support for using different device types in the same debug host. The patch set applies to 6.15/scsi-staging Link: https://lore.kernel.org/r/20250310155557.2872-1-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit d19dc8d4dfca33f5957422d4a23963ee8fac12f5 Author: Kai Mäkisara Date: Mon Mar 10 17:55:57 2025 +0200 scsi: scsi_debug: Add ERASE for tapes The command ERASE(6) for tape devices is added. Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250310155557.2872-6-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit 34252036774b19f66eb9241e4b0b5a07f3461dbe Author: Kai Mäkisara Date: Mon Mar 10 17:55:56 2025 +0200 scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where possible Devices of several types can be created for a single host. The module device type should be used only when the devices are created. Scsi_scan sets the device type initially to 0xff and sets the correct type based in Inquiry results. This means that Inquiry must report sdebug_ptype as long as scsi_device->type is not set (the limit 32 comes from the 5-bit length of the Peripheral Device Type in Inquiry). Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250310155557.2872-5-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit 5b0cb8c984bf68dc98aa02ab534e7ddb47157693 Author: Kai Mäkisara Date: Mon Mar 10 17:55:55 2025 +0200 scsi: scsi_debug: Move some tape-specific commands to separate definitions New definitions (struct opcode_info_t) are created for READ(6), WRITE(6), READ POSITION(10) for tape devices. Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250310155557.2872-4-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit eaa326f5a8e8996711c0cb6d0aa70fa9b2ea38ea Author: Kai Mäkisara Date: Mon Mar 10 17:55:54 2025 +0200 scsi: scsi_debug: Enable different command definitions for different device types Add mask field devsel to the struct opcode_info_t to enable different definitions for different device types. Add checking of device mask to command queuing and reporting of supported opcodes. Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250310155557.2872-3-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit a040adb78005cc35de61318975768c3d82138232 Author: Kai Mäkisara Date: Mon Mar 10 17:55:53 2025 +0200 scsi: scsi_debug: Fix two typos in command definitions Fix two command definitions: - Flags and service action reversed in SEND DIAGNOSTIC - ATOMIC WRITE missing opcode Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250310155557.2872-2-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen commit 39aa687a849489897a15cd8a2d8a4b513def6237 Author: Piotr Wejman Date: Sat Feb 22 13:46:29 2025 +0100 net: e1000e: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() Update the driver to use the new hardware timestamping API added in commit 66f7223039c0 ("net: add NDOs for configuring hardware timestamping"). Use Netlink extack for error reporting in e1000e_config_hwtstamp. Align the indentation of net_device_ops. Reviewed-by: Vadim Fedorenko Reviewed-by: Simon Horman Reviewed-by: Vitaly Lifshits Signed-off-by: Piotr Wejman Tested-by: Avigail Dahan Signed-off-by: Tony Nguyen commit f9c961efb0f44b4319e73a3c40e831db2de4d074 Author: Rui Salvaterra Date: Thu Mar 13 09:35:22 2025 +0000 igc: enable HW vlan tag insertion/stripping by default This is enabled by default in other Intel drivers I've checked (e1000, e1000e, iavf, igb and ice). Fixes an out-of-the-box performance issue when running OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q VLAN configurations, as ethtool isn't part of the default packages and sane defaults are expected. In my specific case, with an Intel N100-based machine with four I226-V Ethernet controllers, my upload performance increased from under 30 Mb/s to the expected ~1 Gb/s. Signed-off-by: Rui Salvaterra Reviewed-by: Simon Horman Reviewed-by: Vitaly Lifshits Reviewed-by: Kurt Kanzenbach Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit cdcb3804eeda24d588348bbab6766cf14fddbeaa Author: Rand Deeb Date: Thu Mar 6 13:12:00 2025 +0300 ixgbe: Fix unreachable retry logic in combined and byte I2C write functions The current implementation of `ixgbe_write_i2c_combined_generic_int` and `ixgbe_write_i2c_byte_generic_int` sets `max_retry` to `1`, which makes the condition `retry < max_retry` always evaluate to `false`. This renders the retry mechanism ineffective, as the debug message and retry logic are never executed. This patch increases `max_retry` to `3` in both functions, aligning them with the retry logic in `ixgbe_read_i2c_combined_generic_int`. This ensures that the retry mechanism functions as intended, improving robustness in case of I2C write failures. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rand Deeb Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 015bac5daca978448f2671478c553ce1f300c21e Author: Kyungwook Boo Date: Tue Mar 11 14:16:02 2025 +0900 i40e: fix MMIO write access to an invalid page in i40e_clear_hw When the device sends a specific input, an integer underflow can occur, leading to MMIO write access to an invalid page. Prevent the integer underflow by changing the type of related variables. Signed-off-by: Kyungwook Boo Link: https://lore.kernel.org/lkml/ffc91764-1142-4ba2-91b6-8c773f6f7095@gmail.com/T/ Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Reviewed-by: Aleksandr Loktionov Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit fee4a79a12240af90283034709518296544a9039 Author: Colin Ian King Date: Mon Mar 17 17:20:24 2025 +0000 ice: make const read-only array dflt_rules static Don't populate the const read-only array dflt_rules on the stack at run time, instead make it static. Signed-off-by: Colin Ian King Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 6cb10c063d6c2b4ae659f8221f4dc70343185319 Author: Martyna Szapar-Mudlaw Date: Fri Mar 14 09:11:11 2025 +0100 ice: improve error message for insufficient filter space When adding a rule to switch through tc, if the operation fails due to not enough free recipes (-ENOSPC), provide a clearer error message: "Unable to add filter: insufficient space available." This improves user feedback by distinguishing space limitations from other generic failures. Reviewed-by: Michal Swiatkowski Signed-off-by: Martyna Szapar-Mudlaw Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 654d61b8e0e2f8b9bdea28a9a51279ecdacafe3c Author: Richard Guy Briggs Date: Wed Mar 5 16:33:20 2025 -0500 audit: record AUDIT_ANOM_* events regardless of presence of rules When no audit rules are in place, AUDIT_ANOM_{LINK,CREAT} events reported in audit_log_path_denied() are unconditionally dropped due to an explicit check for the existence of any audit rules. Given this is a report of a security violation, allow it to be recorded regardless of the existence of any audit rules. To test, mkdir -p /root/tmp chmod 1777 /root/tmp touch /root/tmp/test.txt useradd test chown test /root/tmp/test.txt {echo C0644 12 test.txt; printf 'hello\ntest1\n'; printf \\000;} | \ scp -t /root/tmp Check with ausearch -m ANOM_CREAT -ts recent Link: https://issues.redhat.com/browse/RHEL-9065 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit ffe1cee21f8b533ae27c3a31bfa56b8c1b27fa6e Author: Chen Linxuan Date: Fri Apr 11 18:54:53 2025 +0800 RDMA/hns: initialize db in update_srq_db() On x86_64 with gcc version 13.3.0, I compile drivers/infiniband/hw/hns/hns_roce_hw_v2.c with: make defconfig ./scripts/kconfig/merge_config.sh .config <( echo CONFIG_COMPILE_TEST=y echo CONFIG_HNS3=m echo CONFIG_INFINIBAND=m echo CONFIG_INFINIBAND_HNS_HIP08=m ) make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once" \ drivers/infiniband/hw/hns/hns_roce_hw_v2.o Then I get a compile error: CALL scripts/checksyscalls.sh DESCEND objtool INSTALL libsubcmd_headers CC [M] drivers/infiniband/hw/hns/hns_roce_hw_v2.o In file included from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:47: drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'update_srq_db': drivers/infiniband/hw/hns/hns_roce_common.h:74:17: error: 'db' is used uninitialized [-Werror=uninitialized] 74 | *((__le32 *)_ptr + (field_h) / 32) &= \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/hns/hns_roce_common.h:90:17: note: in expansion of macro '_hr_reg_clear' 90 | _hr_reg_clear(ptr, field_type, field_h, field_l); \ | ^~~~~~~~~~~~~ drivers/infiniband/hw/hns/hns_roce_common.h:95:39: note: in expansion of macro '_hr_reg_write' 95 | #define hr_reg_write(ptr, field, val) _hr_reg_write(ptr, field, val) | ^~~~~~~~~~~~~ drivers/infiniband/hw/hns/hns_roce_hw_v2.c:948:9: note: in expansion of macro 'hr_reg_write' 948 | hr_reg_write(&db, DB_TAG, srq->srqn); | ^~~~~~~~~~~~ drivers/infiniband/hw/hns/hns_roce_hw_v2.c:946:31: note: 'db' declared here 946 | struct hns_roce_v2_db db; | ^~ cc1: all warnings being treated as errors Signed-off-by: Chen Linxuan Co-developed-by: Winston Wen Signed-off-by: Winston Wen Link: https://patch.msgid.link/FF922C77946229B6+20250411105459.90782-5-chenlinxuan@uniontech.com Signed-off-by: Leon Romanovsky commit 8e1930296f921d3246f331c394c0516feb36993a Author: Thomas Weißschuh Date: Wed Feb 26 15:05:17 2025 +0100 tools/nolibc: Add support for SPARC Add support for 32bit and 64bit SPARC to nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Tested-by: Sebastian Andrzej Siewior # UltraSparc T4 (Niagara4) Link: https://lore.kernel.org/lkml/20250322-nolibc-sparc-v2-1-89af018c6296@weissschuh.net/ commit fd293cb81a7fe57f1314006c438ee67907b46f88 Author: Thomas Weißschuh Date: Wed Apr 2 23:39:00 2025 +0200 selftests/nolibc: only consider XARCH for CFLAGS when requested If no explicit XARCH is specified, use the toolchains default. Suggested-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/lkml/20250326205434.bPx_kVUx@breakpoint.cc/ Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250402-nolibc-nolibc-test-native-v1-2-62f2f8585220@weissschuh.net commit cdbf0f199e1f9ecb1af3c0ea8cb956d010447049 Author: Thomas Weißschuh Date: Wed Apr 2 23:38:59 2025 +0200 selftests/nolibc: drop dependency from sysroot to defconfig The creation of the sysroot does not require a kernel configuration. Drop the dependency. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250402-nolibc-nolibc-test-native-v1-1-62f2f8585220@weissschuh.net commit 9c138ac9392228835b520fd4dbb07e636b34a867 Author: Jemmy Wong Date: Fri Apr 11 15:36:24 2025 +0800 tools/nolibc/types.h: fix mismatched parenthesis in minor() Fix an imbalance where opening parentheses exceed closing ones. Fixes: eba6d00d38e7c ("tools/nolibc/types: move makedev to types.h and make it a macro") Signed-off-by: Jemmy Wong Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250411073624.22153-1-jemmywong512@gmail.com Signed-off-by: Thomas Weißschuh commit baaba7b4483731592334611f4170160ae8a4d5f7 Author: Andy Shevchenko Date: Thu Mar 13 10:52:39 2025 +0200 audit: mark audit_log_vformat() with __printf() attribute audit_log_vformat() is using printf() type of format, and GCC compiler (Debian 14.2.0-17) is not happy about this: kernel/audit.c:1978:9: error: function ‘audit_log_vformat’ might be a candidate for ‘gnu_printf’ format attribute kernel/audit.c:1987:17: error: function ‘audit_log_vformat’ might be a candidate for ‘gnu_printf’ format attribute Fix the compilation errors (`make W=1` when CONFIG_WERROR=y, which is default) by adding __printf() attribute. Signed-off-by: Andy Shevchenko [PM: commit description line wrap fixes] Signed-off-by: Paul Moore commit e2193f9f9ec989d7d3e5ff1fd96f71abc4426fc5 Author: Karol Kolacinski Date: Thu Mar 20 14:15:38 2025 +0100 ice: enable timesync operation on 2xNAC E825 devices According to the E825C specification, SBQ address for ports on a single complex is device 2 for PHY 0 and device 13 for PHY1. For accessing ports on a dual complex E825C (so called 2xNAC mode), the driver should use destination device 2 (referred as phy_0) for the current complex PHY and device 13 (referred as phy_0_peer) for peer complex PHY. Differentiate SBQ destination device by checking if current PF port number is on the same PHY as target port number. Adjust 'ice_get_lane_number' function to provide unique port number for ports from PHY1 in 'dual' mode config (by adding fixed offset for PHY1 ports). Cache this value in ice_hw struct. Introduce ice_get_primary_hw wrapper to get access to timesync register not available from second NAC. Reviewed-by: Simon Horman Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Co-developed-by: Grzegorz Nitka Signed-off-by: Grzegorz Nitka Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 1fd9c91f7e8f2e0d91043e09f3b61c6783d75e5c Author: Karol Kolacinski Date: Thu Mar 20 14:15:37 2025 +0100 ice: refactor ice_sbq_msg_dev enum Rename ice_sbq_msg_dev to ice_sbq_dev_id to reflect the meaning of this type more precisely. This enum type describes RDA (Remote Device Access) client ids, accessible over SB (Side Band) interface. Rename enum elements to make a driver namespace more cleaner and consistent with other definitions within SB Remove unused 'rmn_x' entries, specific to unsupported E824 device. Adjust clients '2' and '13' names (phy_0 and phy_0_peer respectively) to be compliant with EAS doc. According to the specification, regardless of the complex entity (single or dual), when accessing its own ports, they're accessed always as 'phy_0' client. And referred as 'phy_0_peer' when handling ports connected to the other complex. Reviewed-by: Simon Horman Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Co-developed-by: Grzegorz Nitka Signed-off-by: Grzegorz Nitka Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 1e05c5a05d0d91085f2c0cca8a038ee5251a99cc Author: Karol Kolacinski Date: Thu Mar 20 14:15:36 2025 +0100 ice: remove SW side band access workaround for E825 Due to the bug in FW/NVM autoload mechanism (wrong default SB_REM_DEV_CTL register settings), the access to peer PHY and CGU clients was disabled by default. As the workaround solution, the register value was overwritten by the driver at the probe or reset handling. Remove workaround as it's not needed anymore. The fix in autoload procedure has been provided with NVM 3.80 version. NOTE: at the time the fix was provided in NVM, the E825C product was not officially available on the market, so it's not expected this change will cause regression when running with older driver/kernel versions. Reviewed-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Signed-off-by: Grzegorz Nitka Reviewed-by: Simon Horman Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 517f7a08ca5fa82dc1d9e4c153f2dc93dc61a20f Author: Larysa Zaremba Date: Fri Feb 14 09:50:40 2025 +0100 ice: enable LLDP TX for VFs through tc Only a single VSI can be in charge of sending LLDP frames, sometimes it is beneficial to assign this function to a VF, that is possible to do with tc capabilities in the switchdev mode. It requires first blocking the PF from sending the LLDP frames with a following command: tc filter add dev egress protocol lldp flower skip_sw action drop Then it becomes possible to configure a forward rule from a VF port representor to uplink instead. tc filter add dev ingress protocol lldp flower skip_sw action mirred egress redirect dev How LLDP exclusivity was done previously is LLDP traffic was blocked for a whole port by a single rule and PF was bypassing that. Now at least in the switchdev mode, every separate VSI has to have its own drop rule. Another complication is the fact that tc does not respect when the driver refuses to delete a rule, so returning an error results in a HW rule still present with no way to reference it through tc. This is addressed by allowing the PF rule to be deleted at any time, but making the VF forward rule "dormant" in such case, this means it is deleted from HW but stays in tc and driver's bookkeeping to be restored when drop rule is added back to the PF. Implement tc configuration handling which enables the user to transmit LLDP packets from VF instead of PF. Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 29610226c33ffee687dedfdf1f19cbb2b117e9e7 Author: Daisuke Matsuda Date: Wed Apr 9 19:27:01 2025 +0900 RDMA/rxe: Fix mismatched type declarations Some functions return int values while they are defined as enum resp_states variables. This patch resolves the mismatches in rxe. Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250409102701.1275265-1-matsuda-daisuke@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 40f42dc1cbb6b5841eb350fc81a5c26f9aa5b420 Author: Larysa Zaremba Date: Fri Feb 14 09:50:39 2025 +0100 ice: support egress drop rules on PF tc clsact qdisc allows us to add offloaded egress rules with commands such as the following one: tc filter add dev egress protocol lldp flower skip_sw action drop Support the egress rule drop action when added to PF, with a few caveats: * in switchdev mode, all PF traffic has to go uplink with an exception for LLDP that can be delegated to a single VSI at a time * in legacy mode, we cannot delegate LLDP functionality to another VSI, so such packets from PF should not be blocked. Also, simplify the rule direction logic, it was previously derived from actions, but actually can be inherited from the tc block (and flipped in case of port representors). Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 5787179c5183c99d9d2d49818186d43c49d6cc04 Author: Larysa Zaremba Date: Fri Feb 14 09:50:38 2025 +0100 ice: remove headers argument from ice_tc_count_lkups Remove the headers argument from the ice_tc_count_lkups() function, because it is not used anywhere. Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 2296345416b02aa9a7216bfec2725948f034feff Author: Mateusz Pacuszka Date: Fri Feb 14 09:50:37 2025 +0100 ice: receive LLDP on trusted VFs When a trusted VF tries to configure an LLDP multicast address, configure a rule that would mirror the traffic to this VF, untrusted VFs are not allowed to receive LLDP at all, so the request to add LLDP MAC address will always fail for them. Add a forwarding LLDP filter to a trusted VF when it tries to add an LLDP multicast MAC address. The MAC address has to be added after enabling trust (through restarting the LLDP service). Signed-off-by: Mateusz Pacuszka Co-developed-by: Larysa Zaremba Signed-off-by: Larysa Zaremba Reviewed-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 4d5a1c4e6d49e1a521c97c991d1aa81702f4c3d9 Author: Larysa Zaremba Date: Fri Feb 14 09:50:36 2025 +0100 ice: do not add LLDP-specific filter if not necessary Commit 34295a3696fb ("ice: implement new LLDP filter command") introduced the ability to use LLDP-specific filter that directs all LLDP traffic to a single VSI. However, current goal is for all trusted VFs to be able to see LLDP neighbors, which is impossible to do with the special filter. Make using the generic filter the default choice and fall back to special one only if a generic filter cannot be added. That way setups with "NVMs where an already existent LLDP filter is blocking the creation of a filter to allow LLDP packets" will still be able to configure software Rx LLDP on PF only, while all other setups would be able to forward them to VFs too. Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit a808691df39b52cd9db861b118e88e18b63e2299 Author: Mateusz Pacuszka Date: Fri Feb 14 09:50:35 2025 +0100 ice: fix check for existing switch rule In case the rule already exists and another VSI wants to subscribe to it new VSI list is being created and both VSIs are moved to it. Currently, the check for already existing VSI with the same rule is done based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change it to vsi_handle. This is software VSI ID, but it can be applied here, because vsi_map itself is also based on it. Additionally change return status in case the VSI already exists in the VSI map to "Already exists". Such case should be handled by the caller. Signed-off-by: Mateusz Pacuszka Reviewed-by: Przemek Kitszel Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit e7bb7d44c3b97aea1f0e354c6499900154ac67f2 Author: Biju Das Date: Fri Apr 4 14:30:45 2025 +0100 drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU Add support for zpos, alpha and blend properties to RZ/G2L DU driver as the IP supports all these properties. It is tested by the below modetest commands: modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \ 37@42:512x300+200+200@XR15 modetest -M rzg2l-du -w {32,37}:alpha:{0,65535} modetest -M rzg2l-du -w {32,37}:zpos:{0,1} Signed-off-by: Biju Das Tested-by: Tommaso Merciai Reviewed-by: Laurent Pinchart Tested-by: Lad Prabhakar #On RZ/V2H Link: https://lore.kernel.org/r/20250404133047.172080-1-biju.das.jz@bp.renesas.com commit ecc2b7478bdc8efaff692e3ae44e71d992bcc85f Author: Thomas Zimmermann Date: Tue Apr 8 13:52:22 2025 +0200 accel/qaic: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Reviewed-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://lore.kernel.org/r/20250408115237.428985-1-tzimmermann@suse.de commit 043806bc9dbc6597dd15e6ca9220ae2746425f2f Author: Thierry Bultel Date: Thu Apr 3 23:29:11 2025 +0200 serial: sh-sci: Introduced sci_of_data The aim here is to provide an easier support to more different SCI controllers, like the RZ/T2H one. The existing .data field of_sci_match is changed to a structure containing all what that can be statically initialized, and avoid a call to 'sci_probe_regmap', in both 'sci_init_single', and 'early_console_setup'. 'sci_probe_regmap' is now assumed to be called in the only case where the device description is from a board file instead of a dts. In this way, there is no need to patch 'sci_probe_regmap' for adding new SCI type, and also, the specific sci_port_params for a new SCI type can be provided by an external file. Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Thierry Bultel Link: https://lore.kernel.org/r/20250403212919.1137670-10-thierry.bultel.yh@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 21fc3d6b45ba42c471fb718ce922d1f9abe26238 Author: Thierry Bultel Date: Thu Apr 3 23:29:10 2025 +0200 serial: sh-sci: Introduced function pointers The aim here is to prepare support for new sci controllers like the T2H/RSCI whose registers are too much different for being handled in common code. This named serial controller also has 32 bits register, so some return types had to be changed. The needed generic functions are no longer static, with prototypes defined in sh-sci-common.h so that they can be used from specific implementation in a separate file, to keep this driver as little changed as possible. For doing so, a set of 'ops' is added to struct sci_port. Tested-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Thierry Bultel Link: https://lore.kernel.org/r/20250403212919.1137670-9-thierry.bultel.yh@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit d004e3595718b8b55009c08ff59cf13be5490f59 Author: Thierry Bultel Date: Thu Apr 3 23:29:09 2025 +0200 serial: sh-sci: Fix a comment about SCIFA The comment was correct when it was added, at that time RZ/T1 was the only SoC in the RZ/T line. Since then, further SoCs have been added with RZ/T names which do not use the same SCIFA register layout and so the comment is now misleading. So we update the comment to explicitly reference only RZ/T1 SoCs. Reviewed-by: Paul Barker Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Thierry Bultel Link: https://lore.kernel.org/r/20250403212919.1137670-8-thierry.bultel.yh@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 25422e8f46c1fd147886f0dc8851eb66c9ba2d48 Author: Thierry Bultel Date: Thu Apr 3 23:29:05 2025 +0200 dt-bindings: serial: Add compatible for Renesas RZ/T2H SoC in sci RSCI of RZ/T2H SoC (a.k.a r9a09g077), as a lot of similarities with SCI in other Renesas SoC like G2L, G3S, V2L; However, it has a different set of registers, and in addition to serial, this IP also supports SCIe (encoder), SmartCard, i2c and spi. This is why the 'renesas,sci' fallback for generic SCI does not apply for it. Reviewed-by: Rob Herring (Arm) Signed-off-by: Thierry Bultel Link: https://lore.kernel.org/r/20250403212919.1137670-4-thierry.bultel.yh@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit b35f7a773cbcbfea3bc87a33c7d0f39e34ed83ec Author: Nicolas Pitre Date: Thu Apr 10 15:38:13 2025 -0400 vt: remove zero-white-space handling from conv_uni_to_pc() This is now taken care of by ucs_is_zero_width(). And in the case where we do want a padding from some zero-width code point then we should also give the legacy displays a space character to work with. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/6o2ss437-6nps-s943-1n38-54np5587r08s@syhkavp.arg Signed-off-by: Greg Kroah-Hartman commit 547f57b88d5f2ad4e9ab5e0d63a668467c10c736 Author: Nicolas Pitre Date: Wed Apr 9 21:14:03 2025 -0400 vt: pad double-width code points with a zero-white-space In the Unicode screen buffer, we follow double-width code points with a space to maintain proper column alignment. This, however, creates semantic problems when e.g. using cut and paste or selection. Let's use a better code point for the column padding's purpose i.e. a zero-white-space rather than a full space. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-12-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit c7cb5b0779d782c1bda10414af7a9fcadcc87e93 Author: Nicolas Pitre Date: Wed Apr 9 21:14:02 2025 -0400 vt: update ucs_width.c following latest gen_ucs_width.py Split table ranges into BMP (16-bit) and non-BMP (above 16-bit). This reduces the corresponding text size by 20-25%. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-11-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 119ff0b0f4541972d829da606599441dace2444d Author: Nicolas Pitre Date: Wed Apr 9 21:14:01 2025 -0400 vt: update gen_ucs_width.py to produce more space efficient tables Split table ranges into BMP (16-bit) and non-BMP (above 16-bit). This reduces the corresponding text size by 20-25%. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-10-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit cd6937d42bca46f2143544918e535d6fd22b71b7 Author: Nicolas Pitre Date: Wed Apr 9 21:14:00 2025 -0400 vt: support Unicode recomposition Try replacing any decomposed Unicode sequence by the corresponding recomposed code point. Code point to glyph correspondance works best after recomposition, and this apply mostly to single-width code points therefore we can't preserve them in their decomposed form anyway. With all the infrastructure in place this is now trivial to do. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-9-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 54af55b990eda5a6a0140a3cded8094b42c0c3b7 Author: Nicolas Pitre Date: Wed Apr 9 21:13:59 2025 -0400 vt: create ucs_recompose.c using gen_ucs_recompose.py This provides ucs_recompose() to recompose two Unicode characters into a single character if possible. This is needed for the VT to properly display decomposed UTF8 sequences. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-8-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit f2347b0cdf65e614732c2307863c95304f72d9d9 Author: Nicolas Pitre Date: Wed Apr 9 21:13:58 2025 -0400 vt: introduce gen_ucs_recompose.py to create ucs_recompose.c The generated code includes a table that maps base character + combining mark pairs to their precomposed equivalents using Python's unicodedata module. It also provides the ucs_recompose() function to query that table. The default script behavior is to create a table with most commonly used Latin, Greek, and Cyrillic recomposition pairs only. It is much smaller than the table with all possible recomposition pairs (71 entries vs 1000 entries). But if one needs/wants the full table then simply running the script with the --full argument will generate it. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-7-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 3a1ab63aa05b4736a7d30ae0a769385662f13def Author: Nicolas Pitre Date: Wed Apr 9 21:13:57 2025 -0400 vt: update ucs_width.c using gen_ucs_width.py This replaces ucs_width.c with the code generated by gen_ucs_width.py providing comprehensive tables for double-width and zero-width Unicode code points. Also make ucs_is_zero_width() effective. Note: scripts/checkpatch.pl complains about "... exceeds 100 columns". Please ignore. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-6-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 26c94eb4842ada96f9709b43ef225417a6b4df63 Author: Nicolas Pitre Date: Wed Apr 9 21:13:56 2025 -0400 vt: introduce gen_ucs_width.py to create ucs_width.c The table in the current ucs_width.c is terribly out of date and incomplete. We also need a second table to store zero-width code points. Properly maintaining those tables manually is impossible. So here's a script to automatically generate them. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-5-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit e88391f730e46d208b7fb37b02611d24137af1ef Author: Nicolas Pitre Date: Wed Apr 9 21:13:55 2025 -0400 vt: properly support zero-width Unicode code points Zero-width Unicode code points are causing misalignment in vertically aligned content, disrupting the visual layout. Let's handle zero-width code points more intelligently. Double-width code points are stored in the screen grid followed by a white space code point to create the expected screen layout. When a double-width code point is followed by a zero-width code point in the console incoming bytestream (e.g., an emoji with a presentation selector) then we may replace the white space padding by that zero-width code point instead of dropping it. This maximize screen content information while preserving proper layout. If a zero-width code point is preceded by a single-width code point then the above trick is not possible and such zero-width code point must be dropped. VS16 (Variation Selector 16, U+FE0F) is special as it doubles the width of the preceding single-width code point. We handle that case by giving VS16 a width of 1 when that happens. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-4-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 2acaf27cd7f4f32bfe8bf7335690618e2417e744 Author: Nicolas Pitre Date: Wed Apr 9 21:13:54 2025 -0400 vt: move unicode processing to a separate file This will make it easier to maintain. Also make it depend on CONFIG_CONSOLE_TRANSLATIONS. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-3-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 74045f6658f11241a09d93404d79828cc99e94dc Author: Nicolas Pitre Date: Wed Apr 9 21:13:53 2025 -0400 vt: minor cleanup to vc_translate_unicode() Make it clearer when a sequence is bad. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20250410011839.64418-2-nico@fluxnic.net Signed-off-by: Greg Kroah-Hartman commit 86bcae88c9209e334b2f8c252f4cc66beb261886 Author: Henry Martin Date: Thu Apr 3 15:03:39 2025 +0800 serial: Fix potential null-ptr-deref in mlb_usio_probe() devm_ioremap() can return NULL on error. Currently, mlb_usio_probe() does not check for this case, which could result in a NULL pointer dereference. Add NULL check after devm_ioremap() to prevent this issue. Fixes: ba44dc043004 ("serial: Add Milbeaut serial control") Signed-off-by: Henry Martin Link: https://lore.kernel.org/r/20250403070339.64990-1-bsdhenrymartin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81e4de4ba298d73fce72c70eddeb86b151640c27 Author: Alex Elder Date: Wed Apr 9 14:22:12 2025 -0500 serial: 8250_of: add support for an optional bus clock The SpacemiT UART requires a bus clock to be enabled, in addition to it's "normal" core clock. Look up the optional bus clock by name, and if that's found, look up the core clock using the name "core". Supplying a bus clock is optional. If no bus clock is needed, the the first/only clock is used for the core clock. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20250409192213.1130181-3-elder@riscstar.com Signed-off-by: Greg Kroah-Hartman commit 2c0594f9f0629a8b4d46e7e1bd069a0bafc2e350 Author: Alex Elder Date: Wed Apr 9 14:22:11 2025 -0500 dt-bindings: serial: 8250: support an optional second clock The SpacemiT UART driver requires a bus clock to be enabled in addition to the primary function clock. Add the option to specify two clocks for an 8250-compatible UART, named "core" and "bus". If both are needed, require them to be named. Signed-off-by: Alex Elder Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250409192213.1130181-2-elder@riscstar.com Signed-off-by: Greg Kroah-Hartman commit 0ed22827548583ad1b905c71d1d1cf96309d63bc Author: Geert Uytterhoeven Date: Thu Apr 10 10:00:56 2025 +0200 dt-bindings: serial: snps-dw-apb-uart: Simplify DMA-less RZ/N1 rule There is no need to repeat all SoC-specific compatible values in the rule for DMA-less RZ/N1 variants. Use wildcard "{}" instead, to ease maintenance. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/90c7aa143beb6a28255b24e8ef8c96180d869cbb.1744271974.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit a5482409a435a2d0e30bd0e179f662860b0e6c6b Author: Bartosz Golaszewski Date: Tue Apr 8 09:42:01 2025 +0200 serial: sc16is7xx: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-tty-v1-2-fb49444827d4@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2318a488683ab904ccb5604222d457a3c32b8fdc Author: Bartosz Golaszewski Date: Tue Apr 8 09:42:00 2025 +0200 serial: max310x: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-tty-v1-1-fb49444827d4@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9d64c6ae2d6f9284a8475d02291580457be7bc28 Author: Chen Ni Date: Mon Apr 7 12:07:12 2025 +0800 serial: tegra-utc: Remove unneeded semicolon Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250407040712.2577607-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit a53be6945f5123c19d6fcc30783876705a2e0f00 Author: Viken Dadhaniya Date: Thu Mar 27 12:37:11 2025 +0530 serial: qcom-geni: Remove alias dependency from qcom serial driver The absence of an alias in the device tree results in an invalid line number, causing the driver probe to fail for GENI serial. To prevent probe failures, dynamically assign line numbers if an alias is not present in the device tree for non-console ports. Signed-off-by: Viken Dadhaniya Link: https://lore.kernel.org/r/20250327070711.2585887-1-quic_vdadhani@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6bd697b5fc39fd24e2aa418c7b7d14469f550a93 Author: Jakub Lewalski Date: Mon Mar 31 18:06:19 2025 +0200 tty: serial: uartlite: register uart driver in init When two instances of uart devices are probing, a concurrency race can occur. If one thread calls uart_register_driver function, which first allocates and assigns memory to 'uart_state' member of uart_driver structure, the other instance can bypass uart driver registration and call ulite_assign. This calls uart_add_one_port, which expects the uart driver to be fully initialized. This leads to a kernel panic due to a null pointer dereference: [ 8.143581] BUG: kernel NULL pointer dereference, address: 00000000000002b8 [ 8.156982] #PF: supervisor write access in kernel mode [ 8.156984] #PF: error_code(0x0002) - not-present page [ 8.156986] PGD 0 P4D 0 ... [ 8.180668] RIP: 0010:mutex_lock+0x19/0x30 [ 8.188624] Call Trace: [ 8.188629] ? __die_body.cold+0x1a/0x1f [ 8.195260] ? page_fault_oops+0x15c/0x290 [ 8.209183] ? __irq_resolve_mapping+0x47/0x80 [ 8.209187] ? exc_page_fault+0x64/0x140 [ 8.209190] ? asm_exc_page_fault+0x22/0x30 [ 8.209196] ? mutex_lock+0x19/0x30 [ 8.223116] uart_add_one_port+0x60/0x440 [ 8.223122] ? proc_tty_register_driver+0x43/0x50 [ 8.223126] ? tty_register_driver+0x1ca/0x1e0 [ 8.246250] ulite_probe+0x357/0x4b0 [uartlite] To prevent it, move uart driver registration in to init function. This will ensure that uart_driver is always registered when probe function is called. Signed-off-by: Jakub Lewalski Signed-off-by: Elodie Decerle Link: https://lore.kernel.org/r/20250331160732.2042-1-elodie.decerle@nokia.com Signed-off-by: Greg Kroah-Hartman commit a0003b9d7948b01279ea3cbc8b1f3aad71e9fcdd Author: Chen Ni Date: Tue Apr 1 16:03:37 2025 +0800 serial: lantiq: Remove unnecessary print function dev_err() Function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: Chen Ni Acked-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250401080337.2187400-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 753a55f559085864dd6770240dca03d90bbd48d4 Author: Andy Shevchenko Date: Fri Mar 21 20:20:18 2025 +0200 serial: 8250_ni: Tidy up ACPI ID table Tidy up ACPI ID table: - drop ACPI_PTR() and hence replace acpi.h with mod_devicetable.h et al. - drop comma in the terminator entry With that done, extend compile test coverage. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-8-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 030df0ef7cec3232122626b642b5642cf5677fc0 Author: Andy Shevchenko Date: Fri Mar 21 20:20:17 2025 +0200 serial: 8250_ni: Switch to use dev_err_probe() Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-7-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2e4899740ebbbddcbf57b54198c20f3843543aa7 Author: Andy Shevchenko Date: Fri Mar 21 20:20:16 2025 +0200 serial: 8250_ni: use serial_port_in()/serial_port_out() helpers There are serial_port_in()/serial_port_out() helpers to be used instead of direct p->serial_in()/p->serial_out(). Use them in various 8250 drivers. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 38dbd9517d5872b2cafb576656fb214b48b1e893 Author: Andy Shevchenko Date: Fri Mar 21 20:20:15 2025 +0200 serial: 8250_ni: Remove unneeded conditionals It doesn't matter if the properties are supplied or not in the struct ni16550_device_info as default in any case is 0. Hence there is no need to check for them being set. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b4694a76180b71cc4040c3c9ab75ea0058b6cc3a Author: Andy Shevchenko Date: Fri Mar 21 20:20:14 2025 +0200 serial: 8250_ni: Switch to use platform_get_mem_or_io() Switch to use new platform_get_mem_or_io() instead of home grown analogue. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9b4a192adf428198fb676a75e9bb95d26904ae44 Author: Andy Shevchenko Date: Fri Mar 21 20:20:13 2025 +0200 serial: 8250_ni: Remove duplicate mapping UPF_IOREMAP is for serial core to map the resource on behalf of the driver. No need to perform this explicitly in the driver. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 57de87b14690497057866970b524124340759d9c Author: Andy Shevchenko Date: Fri Mar 21 20:20:12 2025 +0200 serial: 8250_ni: Switch to use uart_read_port_properties() Since we have now a common helper to read port properties use it instead of sparse home grown solution. Signed-off-by: Andy Shevchenko Tested-by: Chaitanya Vadrevu Reviewed-by: Chaitanya Vadrevu Link: https://lore.kernel.org/r/20250321182119.454507-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1692632146451184c4bcb68554098470a119fb01 Author: Zijun Hu Date: Tue Apr 8 20:08:51 2025 +0800 USB: core: Correct API usb_(enable|disable)_autosuspend() prototypes API usb_(enable|disable)_autosuspend() have inconsistent prototypes regarding if CONFIG_PM is defined. Correct prototypes when the macro is undefined by referring to those when the macro is defined. Signed-off-by: Zijun Hu Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20250408-fix_usb_hdr-v1-1-e785c5b49481@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 1d73df245b19579109193372e7ffe1601ca19323 Author: Rob Herring (Arm) Date: Mon Apr 7 14:17:39 2025 -0500 usb: Remove orphaned UDC drivers These drivers have no way to probe as there are no match tables nor devices created with a matching name in the kernel tree. Marvell UDC was only ever supported by board files which were removed in 2022. For Marvell U3D, which was added in 2012, the PXA2128 aka MMP3 support was never upstreamed with board files and only revived in 2019 with DT support. No U3D DT support has been added since then. The PLX net2272 driver was formerly used on blackfin. It also has PCI support, but that appears to be only for a development board which is likely unused given this device dates back to 2006. Cc: Lubomir Rintel Acked-by: Arnd Bergmann Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250407191756.3584261-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 916148d24d7722d7f43542f8d84c04e46f9f48c4 Author: Zijun Hu Date: Thu Apr 10 19:53:03 2025 +0800 fs/fs_context: Use KERN_INFO for infof()|info_plog()|infofc() Use KERN_INFO instead of default KERN_NOTICE for infof()|info_plog()|infofc() to printk informational messages. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/20250410-rfc_fix_fs-v1-1-406e13b3608e@quicinc.com Signed-off-by: Christian Brauner commit d4e5b10c55627e2f3fc9e5b337a28b4e2f02a55e Author: Chance Yang Date: Fri Apr 11 16:33:26 2025 +0800 usb: common: usb-conn-gpio: use a unique name for usb connector device The current implementation of the usb-conn-gpio driver uses a fixed "usb-charger" name for all USB connector devices. This causes conflicts in the power supply subsystem when multiple USB connectors are present, as duplicate names are not allowed. Use IDA to manage unique IDs for naming usb connectors (e.g., usb-charger-0, usb-charger-1). Signed-off-by: Chance Yang Link: https://lore.kernel.org/r/20250411-work-next-v3-1-7cd9aa80190c@kneron.us Signed-off-by: Greg Kroah-Hartman commit ffb34a60ce86656ba12d46e91f1ccc71dd221251 Author: Lad Prabhakar Date: Mon Apr 7 11:50:02 2025 +0100 usb: renesas_usbhs: Reorder clock handling and power management in probe Reorder the initialization sequence in `usbhs_probe()` to enable runtime PM before accessing registers, preventing potential crashes due to uninitialized clocks. Currently, in the probe path, registers are accessed before enabling the clocks, leading to a synchronous external abort on the RZ/V2H SoC. The problematic call flow is as follows: usbhs_probe() usbhs_sys_clock_ctrl() usbhs_bset() usbhs_write() iowrite16() <-- Register access before enabling clocks Since `iowrite16()` is performed without ensuring the required clocks are enabled, this can lead to access errors. To fix this, enable PM runtime early in the probe function and ensure clocks are acquired before register access, preventing crashes like the following on RZ/V2H: [13.272640] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP [13.280814] Modules linked in: cec renesas_usbhs(+) drm_kms_helper fuse drm backlight ipv6 [13.289088] CPU: 1 UID: 0 PID: 195 Comm: (udev-worker) Not tainted 6.14.0-rc7+ #98 [13.296640] Hardware name: Renesas RZ/V2H EVK Board based on r9a09g057h44 (DT) [13.303834] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [13.310770] pc : usbhs_bset+0x14/0x4c [renesas_usbhs] [13.315831] lr : usbhs_probe+0x2e4/0x5ac [renesas_usbhs] [13.321138] sp : ffff8000827e3850 [13.324438] x29: ffff8000827e3860 x28: 0000000000000000 x27: ffff8000827e3ca0 [13.331554] x26: ffff8000827e3ba0 x25: ffff800081729668 x24: 0000000000000025 [13.338670] x23: ffff0000c0f08000 x22: 0000000000000000 x21: ffff0000c0f08010 [13.345783] x20: 0000000000000000 x19: ffff0000c3b52080 x18: 00000000ffffffff [13.352895] x17: 0000000000000000 x16: 0000000000000000 x15: ffff8000827e36ce [13.360009] x14: 00000000000003d7 x13: 00000000000003d7 x12: 0000000000000000 [13.367122] x11: 0000000000000000 x10: 0000000000000aa0 x9 : ffff8000827e3750 [13.374235] x8 : ffff0000c1850b00 x7 : 0000000003826060 x6 : 000000000000001c [13.381347] x5 : 000000030d5fcc00 x4 : ffff8000825c0000 x3 : 0000000000000000 [13.388459] x2 : 0000000000000400 x1 : 0000000000000000 x0 : ffff0000c3b52080 [13.395574] Call trace: [13.398013] usbhs_bset+0x14/0x4c [renesas_usbhs] (P) [13.403076] platform_probe+0x68/0xdc [13.406738] really_probe+0xbc/0x2c0 [13.410306] __driver_probe_device+0x78/0x120 [13.414653] driver_probe_device+0x3c/0x154 [13.418825] __driver_attach+0x90/0x1a0 [13.422647] bus_for_each_dev+0x7c/0xe0 [13.426470] driver_attach+0x24/0x30 [13.430032] bus_add_driver+0xe4/0x208 [13.433766] driver_register+0x68/0x130 [13.437587] __platform_driver_register+0x24/0x30 [13.442273] renesas_usbhs_driver_init+0x20/0x1000 [renesas_usbhs] [13.448450] do_one_initcall+0x60/0x1d4 [13.452276] do_init_module+0x54/0x1f8 [13.456014] load_module+0x1754/0x1c98 [13.459750] init_module_from_file+0x88/0xcc [13.464004] __arm64_sys_finit_module+0x1c4/0x328 [13.468689] invoke_syscall+0x48/0x104 [13.472426] el0_svc_common.constprop.0+0xc0/0xe0 [13.477113] do_el0_svc+0x1c/0x28 [13.480415] el0_svc+0x30/0xcc [13.483460] el0t_64_sync_handler+0x10c/0x138 [13.487800] el0t_64_sync+0x198/0x19c [13.491453] Code: 2a0103e1 12003c42 12003c63 8b010084 (79400084) [13.497522] ---[ end trace 0000000000000000 ]--- Fixes: f1407d5c66240 ("usb: renesas_usbhs: Add Renesas USBHS common code") Signed-off-by: Lad Prabhakar Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20250407105002.107181-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 8fb4c9d7c113f9987bfae79f308b2e498cc9792e Author: Lad Prabhakar Date: Mon Apr 7 11:50:01 2025 +0100 usb: renesas_usbhs: Fix typo in comment Fix a typo in the comment by correcting "deviece" to "device" for clarity and readability. Signed-off-by: Lad Prabhakar Acked-by: Kuninori Morimoto Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20250407105002.107181-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit b9cff71c509bd97880e277e798e7dbf8a853192b Author: Lad Prabhakar Date: Mon Apr 7 11:50:00 2025 +0100 usb: renesas_usbhs: Correct function references in comment Update the comment to reference `usbhs_mod_probe()` instead of `usbhs_mod_init()`, and replace `dev_set_drvdata()` with `platform_set_drvdata()`, as these are the correct functions used in this context. Signed-off-by: Lad Prabhakar Acked-by: Kuninori Morimoto Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20250407105002.107181-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit a02dcd3b616ac481993efebde1bebb8529eea10c Author: Mathias Nyman Date: Fri Mar 14 16:20:00 2025 +0200 usb: hub: Fail fast in USB3 link power management enable path Enabling LPM is done in hub workqueue, often in paths handling possible link issues. So fail immediately on USB3 LPM issues and avoid hub wq from unnecessary blocking, thus allowing it to handle other port events faster. Detect errors when enabling U1/U2 link states, and return immediately if there is an issue. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250314142000.93090-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bf11662f71dc4af6ad4eb402542ad377898b5ac7 Author: Mathias Nyman Date: Fri Mar 14 16:19:59 2025 +0200 usb: hub: reorder USB3 link power management enable requests Several usb requests are needed to allow a USB3 link to enter U1/U2 hardware link power management LPM states. Reorder these requests and send the more significant and likely to succeed first. This is similar to the change done for disabling LPM Enable LPM by first sending requests to the upstream hub of the device SetPortFeature(U1_TIMEOUT) SetPortFeature(U2_TIMEOUT) These are more likely to succeed due to the shorter path, and LPM can be considered enabled as link may go to U1/U2 LPM states after those. Send the requests to the device after this, they allow the device to initialte U1/U2 link transitions. Hub can already initiate U1/U2 SetFeature(U1_ENABLE) SetFeature(U2_ENABLE) Fail fast and bail out if a requests to the device fails. This changes device initated LPM policy a bit. Device is no longer able to initiate U2 if it failed or is not allowed to initiate U1. Enabling and disabling Link power management is done as part of hub work. Avoid trying to send additional USB requests to a device when there are known issues. It just causes hub work to block for even longer. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250314142000.93090-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bf6e36a033140da67238bce15e1199e37065810d Author: Mathias Nyman Date: Fri Mar 14 16:19:58 2025 +0200 usb: hub: Don't disable LPM completely if device initiated LPM fails Enabling device initiated USB3 link power management (LPM) may fail for various reasons such as too long system exit latency, or link issues. These are not good reason to disable hub initiated LPM U1/U2 states, especially as it requires sending more requests over a possibly broken link, causing the hub work to block for even longer. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250314142000.93090-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c8be504beb1e3110d3e037fb578f3c1cb586dc85 Author: Mathias Nyman Date: Fri Mar 14 16:19:57 2025 +0200 usb: hub: verify device is configured in usb_device_may_initiate_lpm() Move device configured check into usb_device_may_initiate_lpm() instead of calling it before the function. No functional changes, helps rework to fail faster during link power management (LPM) enabling. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250314142000.93090-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 70b85914c02afe35c50d3c775ee9be0f95cb70af Author: Mathias Nyman Date: Fri Mar 14 16:19:56 2025 +0200 usb: hub: Block less in USB3 link power management LPM disable path Several usb requests are needed to allow or forbid a USB3 link from going into U1 or U2 hardware link power management (LPM) states. Fail fast on issues in LPM disabling path. LPM disabling is done in hub workqueue paths that are often already handling possible link issues. Enabling and disabling LPM involves four usb requests. Two requests sent to the upstream hub of the connected device: SetPortFeature(U1_TIMEOUT) SetPortFeature(U2_TIMEOUT) And two to the device itself: SetFeature(U1_ENABLE) SetFeature(U2_ENABLE) The requests to the hub sets the inactivity timeout used by the hub to know when to initiate U1 and U2 LPM link state transitions. These requests are also used prevent U1/U2 LPM transitions completely by passing zero timeout value. The requsts sent to the device only controls if device is allowed to initiate U1/U2 transitions. If not enabled then only hub initiates U1/U2 transitions. Hub may block these device initiated attempts. Reorder and send the hub requests first, these are more likely to succeed due to shorter path, and we can consider LPM disabled if these succeed as U1/U2 link state can not be entered after that. Fail immediately if a request fails, and don't try to enable back LPM after a failed request, that will just send more LPM requests over a bad link. If a device request controlling device initiateed LPM fails then exit immediately, but consider LPM disabled at this stage. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250314142000.93090-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 82fe5107fa3d21d6c3fba091c9dbc50495588630 Author: Andy Shevchenko Date: Fri Mar 21 18:49:49 2025 +0200 usb: Add checks for snprintf() calls in usb_alloc_dev() When creating a device path in the driver the snprintf() takes up to 16 characters long argument along with the additional up to 12 characters for the signed integer (as it can't see the actual limits) and tries to pack this into 16 bytes array. GCC complains about that when build with `make W=1`: drivers/usb/core/usb.c:705:25: note: ‘snprintf’ output between 3 and 28 bytes into a destination of size 16 Since everything works until now, let's just check for the potential buffer overflow and bail out. It is most likely a never happen situation, but at least it makes GCC happy. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250321164949.423957-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 263d4fb2a2f1929c54aefcbb5cc32b08e5d38536 Author: Xu Yang Date: Tue Mar 18 23:09:08 2025 +0800 usb: chipidea: imx: add HSIO Block Control wakeup setting On i.MX95 platform, USB wakeup setting is controlled by HSIO Block Control: HSIO Block Control Overview: - The HSIO block control include configuration and status registers that provide miscellaneous top-level controls for clocking, beat limiter enables, wakeup signal enables and interrupt status for the PCIe and USB interfaces. The wakeup function of HSIO blkctl is basically same as non-core, except improvements about power lost cases. This will add the wakeup setting for HSIO blkctl on i.MX95. It will firstly ioremap hsio blkctl memory, then do wakeup setting as needs. Reviewed-by: Frank Li Reviewed-by: Jun Li Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250318150908.1583652-4-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit ee0dc2f7d5227956903b8b00cd57f4819375ec05 Author: Xu Yang Date: Tue Mar 18 23:09:07 2025 +0800 usb: chipidea: imx: add wakeup interrupt handling In previous imx platform, normal USB controller interrupt and wakeup interrupt are bound to one irq line. However, it changes on latest i.MX95 platform since it has a dedicated irq line for wakeup interrupt. This will add wakeup interrupt handling for i.MX95 to support various wakeup events. Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250318150908.1583652-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit bd3c096ce5e404ae26bf09d2383709fccb2062ba Author: Xu Yang Date: Tue Mar 18 23:09:06 2025 +0800 dt-bindings: usb: usbmisc-imx: add support for i.MX95 platform Add compatible string "fsl,imx95-usbmisc" for i.MX95 platform and restriction on reg property. Reviewed-by: Rob Herring (Arm) Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250318150908.1583652-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 54f30ae4a367cb9c9a07df133de9ccac744688c8 Author: Xu Yang Date: Tue Mar 18 23:09:05 2025 +0800 dt-bindings: usb: chipidea: Add i.MX95 compatible string 'fsl,imx95-usb' The i.MX95 USB2.0 controller is mostly compatible with i.MX7D, except it requires a second interrupt for wakeup handling. Add the compatible string for the i.MX95 platform, add the iommus property, and enforce the interrupt property restriction. Keep the same restriction for existing compatible strings. Reviewed-by: Rob Herring (Arm) Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20250318150908.1583652-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 54f9823ba75655220ee068feecd333dd3bf66d35 Author: Alan Stern Date: Thu Mar 27 15:31:15 2025 -0400 usb: ehci-fsl: Fix use of private data to avoid -Wflex-array-member-not-at-end warning In the course of fixing up the usages of flexible arrays, Gustavo submitted a patch updating the ehci-fsl driver. However, the patch was wrong because the driver was using the .priv member of the ehci_hcd structure incorrectly. The private data is not supposed to be a wrapper containing the ehci_hcd structure; it is supposed to be a sub-structure stored in the .priv member. Fix the problem by replacing the ehci_fsl structure with ehci_fsl_priv, containing only the private data, along with a suitable conversion macro for accessing it. This removes the problem of having data follow a flexible array member. Reported-by: Gustavo A. R. Silva Signed-off-by: Alan Stern Link: https://lore.kernel.org/linux-usb/Z-R9BcnSzrRv5FX_@kspp/ Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/8139e4cc-4e5c-40e2-9c4b-717ad3215868@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 387602d8a75574fafb451b7a8215e78dfd67ee63 Author: Robert Hodaszi Date: Thu Apr 3 16:40:04 2025 +0200 usb: cdc-wdm: avoid setting WDM_READ for ZLP-s Don't set WDM_READ flag in wdm_in_callback() for ZLP-s, otherwise when userspace tries to poll for available data, it might - incorrectly - believe there is something available, and when it tries to non-blocking read it, it might get stuck in the read loop. For example this is what glib does for non-blocking read (briefly): 1. poll() 2. if poll returns with non-zero, starts a read data loop: a. loop on poll() (EINTR disabled) b. if revents was set, reads data I. if read returns with EINTR or EAGAIN, goto 2.a. II. otherwise return with data So if ZLP sets WDM_READ (#1), we expect data, and try to read it (#2). But as that was a ZLP, and we are doing non-blocking read, wdm_read() returns with EAGAIN (#2.b.I), so loop again, and try to read again (#2.a.). With glib, we might stuck in this loop forever, as EINTR is disabled (#2.a). Signed-off-by: Robert Hodaszi Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/20250403144004.3889125-1-robert.hodaszi@digi.com Signed-off-by: Greg Kroah-Hartman commit 1b4dab853768eef92fcffd57e18490e2d9641aaa Author: Krzysztof Kozlowski Date: Mon Mar 24 13:51:42 2025 +0100 dt-bindings: usb: smsc,usb3503: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250324125142.81910-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 015c0e63eb7cf9cd1a203ef99177cc66112d94a8 Author: Li Qiong Date: Fri Mar 14 18:16:39 2025 +0800 usb: gadget: udc-xilinx: Remove the invalid comment The function don't return value, remove the invalid comment. Signed-off-by: Li Qiong Link: https://lore.kernel.org/r/20250314101639.424013-2-liqiong@nfschina.com Signed-off-by: Greg Kroah-Hartman commit b9e4b954542449f36e12263732fcea1740596166 Author: Li Qiong Date: Fri Mar 14 18:16:38 2025 +0800 usb: cdns3: Remove the invalid comment The function don't return value, remove the invalid comment. Signed-off-by: Li Qiong Acked-by: Peter Chen Link: https://lore.kernel.org/r/20250314101639.424013-1-liqiong@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 937a8a3a8d46a3377b4195cd8f2aa656666ebc8b Author: Peter Korsgaard Date: Tue Mar 18 16:22:07 2025 +0100 usb: gadget: f_hid: wake up readers on disable/unbind Similar to how it is done in the write path. Add a disabled flag to track the function state and use it to exit the read loops to ensure no readers get stuck when the function is disabled/unbound, protecting against corruption when the waitq and spinlocks are reinitialized in hidg_bind(). Signed-off-by: Peter Korsgaard Link: https://lore.kernel.org/r/20250318152207.330997-1-peter@korsgaard.com Signed-off-by: Greg Kroah-Hartman commit 24454a11dd1551cd202a46a6fd69c65a1a368903 Author: Gustavo A. R. Silva Date: Mon Mar 17 11:22:51 2025 +1030 usb: gadget: uvc: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the structure. Notice that `struct uvc_input_header_descriptor` is a flexible structure --a structure that contains a flexible-array member. With this, fix three of the following warnings: drivers/usb/gadget/function/uvc_configfs.h:77:57: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/Z9dyY7_ydJiGqh_d@kspp Signed-off-by: Greg Kroah-Hartman commit bd3cf1a9396e6efe178ddbd92c3747a4cf820a4e Author: Thorsten Blum Date: Thu Mar 20 17:56:44 2025 +0100 USB: gadget: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for NUL-terminated destination buffers; use strscpy() instead. Since kzalloc() already zeroes out the destination buffer, the potential NUL-padding by strncpy() is unnecessary. strscpy() copies only the required characters and guarantees NUL-termination. Since the destination buffer has a fixed length, strscpy() automatically determines its size using sizeof() when the argument is omitted. This makes an explicit sizeof() call unnecessary. The source string is also NUL-terminated and meets the __must_be_cstr() requirement of strscpy(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250320165647.34859-2-thorsten.blum@linux.dev Signed-off-by: Greg Kroah-Hartman commit 6e07dd1354f4173f52a5a29e47ba6d0f32e70c6e Author: Matthias Schiffer Date: Tue Mar 25 14:18:48 2025 +0100 dt-bindings: usb: dwc3: Allow connector in USB controller node Allow specifying the connector directly in the USB controller node, as allow in other USB controller bindings and commonly used for "gpio-usb-b-connector". Linux already supports this without driver changes. Signed-off-by: Matthias Schiffer Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250325131848.127438-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 2e8bbfc11201b857410955d0f983be9660d87397 Author: Wesley Cheng Date: Wed Apr 9 10:48:14 2025 -0700 dt-bindings: usb: qcom,dwc3: Add SM8750 compatible SM8750 uses the Synopsys DWC3 controller. Add this to the compatibles list to utilize the DWC3 QCOM and DWC3 core framework. Other than a revision bump to DWC3 controller rev2.00a, the controller on SM8750 does not add any additional vendor specific features compared to previous chipsets. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wesley Cheng Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20250409-sm8750_usb_master-v4-3-6ec621c98be6@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 850e634006f453d57fffe86ca07da15713dea3b8 Author: Roy Luo Date: Wed Mar 12 22:34:34 2025 +0000 usb: dwc3: core: Avoid redundant system suspend/resume callbacks dwc3 device suspend/resume callbacks were being triggered during system suspend and resume even if the device was already runtime-suspended. This is redundant for device mode because the suspend and resume routines are essentially identical for system PM and runtime PM. To prevent these unnecessary callbacks, indicate to the PM core that it can safely leave the device in runtime suspend if it's already runtime-suspended in device mode by returning a positive value in prepare() callback. This optimization only applies to devices without pinctrl, as pinctrl has distinct logic tied to system suspend/resume. Signed-off-by: Roy Luo Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250312223434.3071598-1-royluo@google.com Signed-off-by: Greg Kroah-Hartman commit b4b38ffb38c91afd4dc387608db26f6fc34ed40b Author: Jos Wang Date: Sun Feb 9 15:19:26 2025 +0800 usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode Although some Type-C DRD devices that do not support the DP Sink function (such as Huawei Mate 40Pro), the Source Port initiates Enter Mode CMD, but the device responds to Enter Mode ACK, the Source port then initiates DP Status Update CMD, and the device responds to DP Status Update NAK. As PD2.0 spec ("6.4.4.3.4 Enter Mode Command"),A DR_Swap Message Shall Not be sent during Modal Operation between the Port Partners. At this time, the source port initiates DR_Swap message through the "echo device > /sys/class/typec/port0/data_role" command to switch the data role from host to device. The device will initiate a Hard Reset for recovery, resulting in the failure of data role swap. Therefore, when DP Status Update NAK is received, Exit Mode CMD is initiated to exit the currently entered DP altmode. Signed-off-by: Jos Wang Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250209071926.69625-1-joswang1221@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaa8f2e959341fd4a3ccf111500eb1e6176678e0 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:40:51 2025 +0200 usb: typec: tipd: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250406204051.63446-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9fc5986fbcd7e1e63afb04be94cd4e8a536a4b04 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:40:50 2025 +0200 usb: typec: tcpci: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250406204051.63446-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit a592e0673a20c57468d5296b57130a45cb0ff487 Author: Michael Grzeschik Date: Fri Apr 4 01:17:20 2025 +0200 usb: typec: tcpci: add regulator support The tcpci chip vbus pin is possibly driven by an regulator. This patch is adding support to enable an optional vdd regulator before probing. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250404-ml-topic-tcpci-v1-1-4442c7d0ee1e@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8a50da849151e7e12b43c1d8fe7ad302223aef6b Author: Michael Grzeschik Date: Fri Apr 4 00:43:06 2025 +0200 usb: typec: tcpm: allow switching to mode accessory to mux properly The funciton tcpm_acc_attach is not setting the proper state when calling tcpm_set_role. The function tcpm_set_role is currently only handling TYPEC_STATE_USB. For the tcpm_acc_attach to switch into other modal states tcpm_set_role needs to be extended by an extra state parameter. This patch is handling the proper state change when calling tcpm_acc_attach. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250404-ml-topic-tcpm-v1-3-b99f44badce8@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8db73e6a42b6f047c7ad50a7b98b862d19ea0056 Author: Michael Grzeschik Date: Fri Apr 4 00:43:05 2025 +0200 usb: typec: tcpm: allow sink (ufp) to toggle into accessory mode debug This patch extends the is_debug macro to cover the sink case (ufp). It also handles the transition to access the DEBUG_ACC_ATTACHED state in the sink case. It also handles the debounce case in which the cc pins are not immediately valid after the plug event. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250404-ml-topic-tcpm-v1-2-b99f44badce8@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 64843d0ba96d3eae297025562111d57585273366 Author: Michael Grzeschik Date: Fri Apr 4 00:43:04 2025 +0200 usb: typec: tcpm: allow to use sink in accessory mode Since the function tcpm_acc_attach is not setting the data and role for for the sink case we extend it to check for it first. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250404-ml-topic-tcpm-v1-1-b99f44badce8@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0f7bbef1794dc87141897f804e5871a293aa174b Author: Michael Grzeschik Date: Fri Apr 4 00:21:01 2025 +0200 usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set Since the typec connectors can have many muxes or switches for different lanes (sbu, usb2, usb3) going into different modal states (usb2, usb3, audio, debug) all of them will be called on typec_switch_set and typec_mux_set. But not all of them will be handling the expected mode. If one of the mux or switch will come back with EOPTNOSUPP this is no reason to stop running through the next ones. Therefor we skip this particular error value and continue calling the next. Signed-off-by: Michael Grzeschik Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250404-ml-topic-typec-mux-v1-1-22c0526381ba@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ac573b94073869a652b7d2335d0aaf88b762f713 Author: Madhu M Date: Wed Apr 2 12:38:17 2025 +0530 usb: typec: ucsi: Add the UCSI commands in debugfs Added the UCSI commands UCSI_GET_CAM_SUPPORTED, UCSI_GET_PD_MESSAGE, UCSI_GET_ATTENTION_VDO and UCSI_SET_USB support in debugfs to enhance PD/TypeC debugging capability Signed-off-by: Madhu M Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250402070817.1016635-1-madhu.m@intel.com Signed-off-by: Greg Kroah-Hartman commit 00327d7f2c8c512c9b168daae02c8b989f79ec71 Author: Pengyu Luo Date: Sun Mar 16 17:43:55 2025 +0800 usb: typec: ucsi: add Huawei Matebook E Go ucsi driver The Huawei Matebook E Go tablet implements the UCSI interface in the onboard EC. Add the glue driver to interface with the platform's UCSI implementation. This driver is inspired by the following drivers: drivers/usb/typec/ucsi/ucsi_yoga_c630.c drivers/usb/typec/ucsi/ucsi_glink.c drivers/soc/qcom/pmic_glink_altmode.c Signed-off-by: Pengyu Luo Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250316094357.462022-1-mitltlatltl@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5730609ffd7e558e1e3305d0c6839044e8f6591b Author: Colin Ian King Date: Wed Apr 9 16:55:10 2025 +0100 select: do_pollfd: add unlikely branch hint return path Adding an unlikely() hint on the fd < 0 comparison return path improves run-time performance of the poll() system call. gcov based coverage analysis based on running stress-ng and a kernel build shows that this path return path is highly unlikely. Benchmarking on an Debian based Intel(R) Core(TM) Ultra 9 285K with a 6.15-rc1 kernel and a poll of 1024 file descriptors with zero timeout shows an call reduction from 32818 ns down to 32635 ns, which is a ~0.5% performance improvement. Results based on running 25 tests with turbo disabled (to reduce clock freq turbo changes), with 30 second run per test and comparing the number of poll() calls per second. The % standard deviation of the 25 tests was 0.08%, so results are reliable. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/20250409155510.577490-1-colin.i.king@gmail.com Signed-off-by: Christian Brauner commit 746375524bb6a93bc3ef7a3c2e8c916bfdfcb0b2 Author: Nathan Chancellor Date: Thu Apr 10 10:43:08 2025 -0700 drm/sysfb: efidrm: Avoid clang -Wsometimes-uninitialized in efidrm_device_create() Clang warns (or errors with CONFIG_WERROR=y): drivers/gpu/drm/sysfb/efidrm.c:353:11: error: variable 'screen_base' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 353 | else if (mem_flags & EFI_MEMORY_WB) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sysfb/efidrm.c:356:7: note: uninitialized use occurs here 356 | if (!screen_base) | ^~~~~~~~~~~ drivers/gpu/drm/sysfb/efidrm.c:353:7: note: remove the 'if' if its condition is always true 353 | else if (mem_flags & EFI_MEMORY_WB) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 354 | screen_base = devm_memremap(&pdev->dev, mem->start, resource_size(mem), drivers/gpu/drm/sysfb/efidrm.c:261:27: note: initialize the variable 'screen_base' to silence this warning 261 | void __iomem *screen_base; | ^ | = NULL efidrm_get_mem_flags() can only return a mask that has at least one of the tested values set so the else case is impossible but clang's static analysis runs before inlining so it cannot know that. Initialize screen_base to NULL and add a defensive error message in case mem_flags were ever returned without one of the four valid values. Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays") Reviewed-by: Thomas Zimmermann Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250410-efidrm-avoid-uninit-screen_info-warning-v2-1-b79646f58c24@kernel.org commit 6acbf71463f74838854ed9fcfc2af7bb9ee04ffa Author: Suraj Kandpal Date: Fri Apr 11 11:32:36 2025 +0530 drm/i915/backlight: Modify condition to use panel luminance According to our internal spec we need to now check if both panel luminance and smooth brightness are available in panel for us to be able to change brightness using luminance value. --v2 -Add Fixes tag [Ankit] Fixes: 64481497924d ("drm/i915/backlight: Check Luminance based brightness control for VESA") Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Link: https://lore.kernel.org/r/20250411060235.2732060-3-suraj.kandpal@intel.com commit cc2308ebbbb16bbefbc89e4da2f827e28b082411 Author: Suraj Kandpal Date: Fri Apr 11 11:32:35 2025 +0530 drm/dp: Add smooth brightness register bit definition Add DP_EDP_SMOOTH_BRIGHTNESS register bit definition for EDP_GENERAL_CAPABILITY 2 register. --v2 -Add eDP 2.0 comment [Ankit] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Link: https://lore.kernel.org/r/20250411060235.2732060-2-suraj.kandpal@intel.com commit f1745496d3fba34a2e16ef47d78903d7208c1214 Author: David Howells Date: Wed Apr 9 15:18:45 2025 +0100 netfs: Update main API document Bring the netfs documentation up to date. Signed-off-by: David Howells Link: https://lore.kernel.org/1690127.1744208325@warthog.procyon.org.uk Reviewed-by: "Paulo Alcantara (Red Hat)" cc: Jeff Layton cc: Viacheslav Dubeyko cc: Alex Markuze cc: Timothy Day cc: Jonathan Corbet cc: netfs@lists.linux.dev cc: linux-doc@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit a3204f778cf7e37c7344404768398b4f9d43a368 Author: Paul E. McKenney Date: Thu Feb 6 05:28:03 2025 -0800 rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RT The torture.sh --do-rt command-line parameter is intended to mimic -rt kernels. Now that CONFIG_PREEMPT_RT is upstream, this commit makes this mimicking more precise. Note that testing of RCU priority boosting is disabled in favor of forward-progress testing of RCU callbacks. If it turns out to be possible to make kernels built with CONFIG_PREEMPT_RT=y to tolerate testing of both, both will be enabled. [ paulmck: Apply Sebastian Siewior feedback. ] Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior Signed-off-by: Joel Fernandes commit 8c173c39e3474c816bc5e9bb2124e2318a7aad4b Author: Xi Pardee Date: Wed Apr 9 12:10:48 2025 -0700 platform/x86:intel/pmc: Remove unneeded io operations Remove ioremap and iounmap operations that are not needed. ioremap and iounmap operations are handled by the caller of the pmc_add_pmt function. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20250409191056.15434-7-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 41c5c2215ee86a9a27c76c8d0ef0a3d1aa49698a Author: Xi Pardee Date: Wed Apr 9 12:10:47 2025 -0700 platform/x86:intel/pmc: Remove unneeded header file inclusion telemetry.h header file from PMT is not needed in arl.c or mtl.c. Remove the cross-driver include to avoid confusion. Signed-off-by: Xi Pardee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250409191056.15434-6-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen commit 052fabddeaa70bdb256cbdae152291bd8a1bee0c Author: Xi Pardee Date: Wed Apr 9 12:10:46 2025 -0700 platform/x86:intel/pmc: Convert index variables to be unsigned Convert the index variables type to be unsigned to avoid confusion and error. Signed-off-by: Xi Pardee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250409191056.15434-5-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen commit 1b1aaa9cbe8dc848d143124cf6e1990f4761c6d7 Author: Xi Pardee Date: Wed Apr 9 12:10:45 2025 -0700 platform/x86:intel/pmc: Move PMC devid to core.h Move PMC devid definition for each PMC of Arrow Lake and Meteor Lake platforms to core.h. This patch is a preparation step to introduce a new SSRAM Telemetry driver which will be using the PMC devid. Signed-off-by: Xi Pardee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250409191056.15434-4-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen commit e9f9cf3fe3ead543d006c2ddf1d03df23b11f7f5 Author: Xi Pardee Date: Wed Apr 9 12:10:44 2025 -0700 platform/x86:intel/pmc: Rename core_ssram to ssram_telemetry Rename core_ssram.c to ssram_telemetry.c. This patch is a preparation step to introduce a new SSRAM Telemetry driver for the SSRAM device. Signed-off-by: Xi Pardee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250409191056.15434-3-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen commit 78a7491d5cba8b63c8dbaafc15cc92a2e3f049ca Author: Xi Pardee Date: Wed Apr 9 12:10:43 2025 -0700 platform/x86:intel/pmc: Move PMC Core related functions Move functions that implements PMC Core feature from core_ssram.c to core.c. This patch is a preparation step to introduce a new SSRAM Telemetry driver for the SSRAM device. Signed-off-by: Xi Pardee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250409191056.15434-2-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen commit 600f6fa5c90c05b4f2f60cde24fcea6a7239c41f Author: Marc Zyngier Date: Fri Apr 11 12:02:20 2025 +0100 KVM: arm64: Let kvm_vcpu_read_pmcr() return an EL-dependent value for PMCR_EL0.N When EL2 is present, PMCR_EL0.N is the effective value of MDCR_EL2.HPMN when accessed from EL1 or EL0. Make sure we honor this requirement. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit efff9dd2fee7a5969b5b2a04995e638c3ba15826 Author: Marc Zyngier Date: Wed Apr 9 14:30:05 2025 +0100 KVM: arm64: Handle out-of-bound write to MDCR_EL2.HPMN We don't really pay attention to what gets written to MDCR_EL2.HPMN, and funky guests could play ugly games on us. Restrict what gets written there, and limit the number of counters to what the PMU is allowed to have. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit cd84a42c6703f69a865bd8e48ee8107eb80e0dea Author: Marc Zyngier Date: Wed Apr 9 14:24:34 2025 +0100 KVM: arm64: Don't let userspace write to PMCR_EL0.N when the vcpu has EL2 Now that userspace can provide its limit for hte maximum number of counters, prevent it from writing to PMCR_EL0.N, as the value should be derived from MDCR_EL2.HPMN in that case. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit b7628c7973765c856866b3047c9002ae0825add6 Author: Marc Zyngier Date: Wed Apr 9 11:53:15 2025 +0100 KVM: arm64: Allow userspace to limit the number of PMU counters for EL2 VMs As long as we had purely EL1 VMs, we could easily update the number of guest-visible counters by letting userspace write to PMCR_EL0.N. With VMs started at EL2, PMCR_EL1.N only reflects MDCR_EL2.HPMN, and we don't have a good way to limit it. For this purpose, introduce a new PMUv3 attribute that allows limiting the maximum number of counters. This requires the explicit selection of a PMU. Suggested-by: Oliver Upton Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit e78e7856d233010e6afef62f15567a8e7777c8bc Author: Nicolas Frattaroli Date: Thu Apr 10 21:25:32 2025 +0200 ASoC: test-component: add set_tdm_slot stub implementation The test-component driver implements various stub callbacks. One of the ones it doesn't implement is set_tdm_slot. This has no functional impact on whether ASoC core believes test-component to do TDM or not, it just means that any TDM configuration can't readily be dumped for debugging purposes like it can with the other callbacks. Add a stub implementation to allow for this. The output uses dev_info rather than dev_dbg, to be in line with the set_fmt stub implementation above. Signed-off-by: Nicolas Frattaroli Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20250410-test-component-tdm-slot-v1-1-9c3a7162fa7a@collabora.com Signed-off-by: Mark Brown commit 022435334393d56f4d6bc398cf16430067807b0a Author: Marc Zyngier Date: Mon Feb 17 10:24:43 2025 +0000 KVM: arm64: Contextualise the handling of PMCR_EL0.P writes Contrary to what the comment says in kvm_pmu_handle_pmcr(), writing PMCR_EL0.P==1 has the following effects: The event counters affected by this field are: * All event counters in the first range. * If any of the following are true, all event counters in the second range: - EL2 is disabled or not implemented in the current Security state. - The PE is executing at EL2 or EL3. where the "first range" represent the counters in the [0..HPMN-1] range, and the "second range" the counters in the [HPMN..MAX] range. It so appears that writing P from EL2 should nuke all counters, and not just the "guest" view. Just do that, and nuke the misleading comment. Reported-by: Joey Gouly Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit c8823e51b534d490ec27d372596eb35d2bb7193c Author: Marc Zyngier Date: Mon Feb 17 10:17:20 2025 +0000 KVM: arm64: Fix MDCR_EL2.HPMN reset value The MDCR_EL2 documentation indicates that the HPMN field has the following behaviour: "On a Warm reset, this field resets to the expression NUM_PMU_COUNTERS." However, it appears we reset it to zero, which is not very useful. Add a reset helper for MDCR_EL2, and handle the case where userspace changes the target PMU, which may force us to change HPMN again. Reported-by: Joey Gouly Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 9d0ec51d7c227c3ae837e22832eaed219e25f126 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:48 2025 +0200 phy: rockchip: samsung-hdptx: Add high color depth management Add support for 8-bit, 10-bit, 12-bit and 16-bit color depth setup. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-14-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 45b14bdcf4acfd483d9890396197c35c23821124 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:47 2025 +0200 phy: rockchip: samsung-hdptx: Optimize internal rate handling Drop the rate parameter from a bunch of internal helpers and, instead, make better use of the newly introduced ->hdmi_cfg.tmds_char_rate driver data. Signed-off-by: Cristian Ciocaltea Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-13-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 37f335dbfd028c008d0a7940ca5a270d1e2f6b81 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:46 2025 +0200 phy: rockchip: samsung-hdptx: Rename ambiguous rk_hdptx_phy->rate The main purpose of the ->rate member of struct rk_hdptx_phy is to implement rk_hdptx_phy_clk_recalc_rate() by providing the actual rate programmed in hardware. Hence the current naming is too generic and rather ambiguous. Improve clarity by renaming ->rate to ->hw_rate. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-12-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 6efbd0f46dd8ae1d2b91b41d98c2800c60ab1f5e Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:45 2025 +0200 phy: rockchip: samsung-hdptx: Restrict altering TMDS char rate via CCF Although, in theory, the clock provider functionality could be enabled as a standalone driver feature, in practice it is unlikely that it would be ever needed separately from the common PHY related features, i.e. making use of the PHY PLL as an alternative and more accurate clock source for display modes handling. Which means the PLL will be always programmed according to the TMDS char rate set via the HDMI PHY configuration API. Currently it's possible to freely adjust the rate via the clock API as well, that is through clk_set_rate(). Making the clock read-only is not feasible since we need to ensure any rate update done via the PHY configuration API has been actually programmed into the hardware before CCF accesses it. This would be normally done during phy_ops.power_on() or clk_ops.prepare() callbacks, but it might happen that the former gets fired too late and the latter only once, hence we need to keep handle it via clk_ops.set_rate() as a fallback approach. Prevent changing the TMDS character rate via CCF by letting rk_hdptx_phy_clk_round_rate() always return the value set via phy_configure(). To avoid breaking existing users, i.e. RK DW HDMI QP bridge driver, until the switch to the HDMI PHY config based approach is completed, introduce a temporary exception to the rule, toggled via the new ->restrict_rate_change flag, which indicates whether phy_configure() has been called or not. Additionally, revert any unlikely rate change that might have occurred between the calls to ->round_rate() and ->set_rate(). Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-11-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 2392050a2cb94ff3397949e109e4b9f0285ee085 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:44 2025 +0200 phy: rockchip: samsung-hdptx: Provide config params validation support Implement the phy_ops.validate() callback to allow checking the PHY configuration parameters without actually applying them. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-10-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit c871a311edf0ebb1b934946a84a6c532cac0c035 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:43 2025 +0200 phy: rockchip: samsung-hdptx: Setup TMDS char rate via phy_configure_opts_hdmi The current workaround to setup the TMDS character rate relies on the unconventional usage of phy_set_bus_width(). Make use of the recently introduced HDMI PHY configuration API to properly handle the setup. The workaround will be dropped as soon as the switch has been completed on both ends. Rename rk_hdptx_phy_verify_config() to rk_hdptx_phy_verify_dp_config() and introduce the rk_hdptx_phy_verify_hdmi_config() helper to check the HDMI parameters during phy_configure(). Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-9-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 0edf9d2bb9b4ba7566dfdc7605883e04575129d9 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:42 2025 +0200 phy: rockchip: samsung-hdptx: Avoid Hz<->hHz unit conversion overhead The ropll_tmds_cfg table used to identify the configuration params for the supported rates expects the search key, i.e. bit_rate member of struct ropll_config, to be provided in hHz rather than Hz (1 hHz = 100 Hz). This requires multiple conversions between these units being performed at runtime. Improve implementation clarity and efficiency by consistently using the Hz unit throughout driver's internal data structures and functions. Also rename the rather misleading struct member. Signed-off-by: Cristian Ciocaltea Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-8-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit bacf2fe750dab6bc7ed50556aaadd3ab107fc643 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:41 2025 +0200 phy: rockchip: samsung-hdptx: Drop superfluous cfgs driver data The ->cfgs member has been introduced via commit f08d1c085638 ("phy: phy-rockchip-samsung-hdptx: Don't use dt aliases to determine phy-id"), but it is only used during probe() in order to setup ->phy_id. Use a probe() local variable to store device match data and remove the now unnecessary member from struct rk_hdptx_phy. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-7-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit bcd61d182618c6a77d0841fcdc3333e125725360 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:40 2025 +0200 phy: rockchip: samsung-hdptx: Drop unused phy_cfg driver data There is no usage of phy_cfg in the upstream driver data, nor in the downstream one, hence remove it. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-6-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 6218c3fd6702a5bc4ab323fed25714cde127684c Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:39 2025 +0200 phy: rockchip: samsung-hdptx: Drop unused struct lcpll_config This is just a leftover from downstream support for HDMI 2.1. Remove the unused struct for now. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-5-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 1f4d382769e3b38dfc498c806811dae856e40f31 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:38 2025 +0200 phy: rockchip: samsung-hdptx: Do no set rk_hdptx_phy->rate in case of errors Ensure rk_hdptx_ropll_tmds_cmn_config() updates hdptx->rate only after all the other operations have been successful. Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider support") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-4-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 0422253ac1919fea8292381c85f11a9decff1bb1 Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:37 2025 +0200 phy: rockchip: samsung-hdptx: Fix clock ratio setup The switch from 1/10 to 1/40 clock ratio must happen when exceeding the 340 MHz rate limit of HDMI 1.4, i.e. when entering the HDMI 2.0 domain, and not before. Therefore, use the correct comparison operator '>' instead of '>=' when checking the max rate. While at it, introduce a define for this rate limit constant. Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver") Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-3-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 3bb9286f4ece6acbc1fbaa9f192a82645d30efbf Author: Cristian Ciocaltea Date: Tue Mar 18 14:35:36 2025 +0200 phy: hdmi: Add color depth configuration Extend the HDMI configuration options to allow managing bits per color channel. This is required by some PHY drivers such as rockchip-samsung-hdptx. Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-2-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 10ed34d6eaaf86e301a8f2dd190d26dfbc9799bd Author: Sandor Yu Date: Tue Mar 18 14:35:35 2025 +0200 phy: Add HDMI configuration options Allow HDMI PHYs to be configured through the generic functions through a custom structure added to the generic union. The parameters added here are based on HDMI PHY implementation practices. The current set of parameters should cover the potential users. Signed-off-by: Sandor Yu Reviewed-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Acked-by: Vinod Koul Link: https://lore.kernel.org/r/d1cff6c03ec3732d2244022029245ab2d954d997.1734340233.git.Sandor.yu@nxp.com Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-1-8cb1678e7663@collabora.com Signed-off-by: Vinod Koul commit 4c962bc929f1734d209a0862359e25fef8f56fa0 Author: Baihan Li Date: Mon Mar 31 15:42:12 2025 +0800 drm/hisilicon/hibmc: Add vga connector detect functions Because the connected VGA connector would make driver can't get the userspace call, adding detect_ctx in vga connector to make HPD active userspace. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-10-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit b11bc1ae46587f3563c47078e605184f18e7fa57 Author: Baihan Li Date: Mon Mar 31 15:42:11 2025 +0800 drm/hisilicon/hibmc: Add MSI irq getting and requesting for HPD To realize HPD feature, request irq for HPD , add its handler function. We use pci_alloc_irq_vectors() to get our msi irq, because we have two interrupts now. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-9-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit 3c7623fb5bb6c319531b941b15b7bfc12455d3d3 Author: Baihan Li Date: Mon Mar 31 15:42:10 2025 +0800 drm/hisilicon/hibmc: Enable this hot plug detect of irq feature Add HPD interrupt enable functions in drm framework, and also add detect_ctx functions. Because of the debouncing when HPD pulled out, add 200 ms delay in detect. Add link reset process to reset link status when a new connector pulgged in. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-8-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit 2f6182616cfdb154e2ecfe9554bb814b8a6378e9 Author: Baihan Li Date: Mon Mar 31 15:42:09 2025 +0800 drm/hisilicon/hibmc: Add colorbar-cfg feature and its debugfs file DP controller can support generating a color bar signal over the DisplayPort interface. This can be useful to check for possible DDR or GPU problems, as the signal generator resides completely in the DP block. Add debugfs file that controls colorbar generator. echo: config the color bar register to display cat: print the color bar configuration Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-7-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit bd1c935811ae6bd112321c50ed83444eca4facc8 Author: Baihan Li Date: Mon Mar 31 15:42:08 2025 +0800 drm/hisilicon/hibmc: Getting connector info and EDID by using AUX channel Add registering drm_aux and use it to get connector edid with drm functions. Add ddc channel in connector initialization to put drm_aux in drm_connector. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-6-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit 1e7f35512e77dd7276e91ade4e03807f88b97eb3 Author: Baihan Li Date: Mon Mar 31 15:42:07 2025 +0800 drm/hisilicon/hibmc: Refactor the member of drm_aux in struct hibmc_dp Because the drm_aux of struct hibmc_dp_dev's member is not easy to get in hibmc_drm_dp.c, move the drm_aux to struct hibmc_dp. Then there are some adaptations and modifications to make this patch compile. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-5-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit dfc820d2f8a8ea90bbc02269b5362e3678e58cac Author: Nitheesh Sekar Date: Wed Mar 26 12:10:56 2025 +0400 phy: qualcomm: qcom-uniphy-pcie 28LP add support for IPQ5018 The Qualcomm UNIPHY PCIe PHY 28LP is found on both IPQ5332 and IPQ5018. Adding the PHY init sequence, pipe clock rate, and compatible for IPQ5018. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan Ramabadhran Reviewed-by: Dmitry Baryshkov Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/20250326-ipq5018-pcie-v7-2-e1828fef06c9@outlook.com Signed-off-by: Vinod Koul commit aae29082b6620c664e97a1e2f2062abc6a58659d Author: Nitheesh Sekar Date: Wed Mar 26 12:10:55 2025 +0400 dt-bindings: phy: qcom: uniphy-pcie: Add ipq5018 compatible The IPQ5018 SoC contains a Gen2 1 and 2-lane PCIe UNIPHY which is the same as the one found in IPQ5332. As such, add IPQ5018 compatible. Signed-off-by: Nitheesh Sekar Signed-off-by: Sricharan Ramabadhran Reviewed-by: Rob Herring (Arm) Signed-off-by: George Moussalem Link: https://lore.kernel.org/r/20250326-ipq5018-pcie-v7-1-e1828fef06c9@outlook.com Signed-off-by: Vinod Koul commit 5f80fb4d6abd1f7f4007e4bf8dd75a8c71d2f724 Author: Baihan Li Date: Mon Mar 31 15:42:06 2025 +0800 drm/hisilicon/hibmc: Add dp serdes cfg in dp process Add dp serdes cfg in link training process, and related adapting and modificating. Change some init values about training, because we want completely to negotiation process, so we start with the maximum rate and the electrical characteristic level is 0. Because serdes default cfgs is changed and used in hibmc_kms_init(), we changed the if-statement to check whether the value is 0. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-4-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit 9e736cd444f49efa2334e405f7a59773ea02155b Author: Baihan Li Date: Mon Mar 31 15:42:05 2025 +0800 drm/hisilicon/hibmc: Add dp serdes cfg to adjust serdes rate, voltage and pre-emphasis This dp controller need features of digital-to-analog conversion and high-speed transmission in chip by its extern serdes controller. Our serdes cfg is relatively simple, just need two register configurations. Don't need too much functions, like: power on/off, initialize, and some complex configurations, so I'm not going to use the phy framework. This serdes is inited and configured in dp initialization, and also integrating them into link training process. For rate changing, we can change from 1.62-8.2Gpbs by cfg reg. For voltage and pre-emphasis levels changing, we can cfg different serdes ffe value. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-3-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit f9698f802e50fbe696b3ac6f82c0e966574a3edb Author: Baihan Li Date: Mon Mar 31 15:42:04 2025 +0800 drm/hisilicon/hibmc: Restructuring the header dp_reg.h Move the macros below their corresponding registers to make them more obvious. Signed-off-by: Baihan Li Signed-off-by: Yongbang Shi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250331074212.3370287-2-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov commit 0cc22f5a861c3149171485349dafac3047212a5d Author: Qiang Yu Date: Fri Apr 11 19:31:20 2025 +0800 phy: qcom: qmp-pcie: Add PHY register retention support Some QCOM PCIe PHYs support no_csr reset. Unlike BCR reset which resets the whole PHY (hardware and register), no_csr reset only resets PHY hardware but retains register values, which means PHY setting can be skipped during PHY init if PCIe link is enabled in bootloader and only no_csr is toggled after that. Hence, determine whether the PHY has been enabled in bootloader by verifying QPHY_START_CTRL register. If it's programmed and no_csr reset is available, skip BCR reset and PHY register setting to establish the PCIe link with bootloader - programmed PHY settings. Signed-off-by: Qiang Yu Signed-off-by: Wenbin Yao Reviewed-by: Manivannan Sadhasivam Tested-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/r/20250411113120.651363-3-quic_wenbyao@quicinc.com Signed-off-by: Vinod Koul commit ea57d7fe4f5af517b5ce91fdff96cc33be932690 Author: Konrad Dybcio Date: Fri Apr 11 19:31:19 2025 +0800 phy: qcom: pcie: Determine has_nocsr_reset dynamically Decide the in-driver logic based on whether the nocsr reset is present and defer checking the appropriateness of that to dt-bindings to save on boilerplate. Reset controller APIs are fine consuming a nullptr, so no additional checks are necessary there. Signed-off-by: Konrad Dybcio Signed-off-by: Wenbin Yao Reviewed-by: Abel Vesa Reviewed-by: Manivannan Sadhasivam Reviewed-by: Philipp Zabel Tested-by: Aleksandrs Vinarskis Link: https://lore.kernel.org/r/20250411113120.651363-2-quic_wenbyao@quicinc.com Signed-off-by: Vinod Koul commit 4ea30ec6fb3bb598bd1df04cdfab13b1140074d2 Author: Benjamin Marzinski Date: Thu Apr 10 15:49:40 2025 -0400 dm: handle failures in dm_table_set_restrictions If dm_table_set_restrictions() fails while swapping tables, device-mapper will continue using the previous table. It must be sure to leave the mapped_device in it's previous state on failure. Otherwise device-mapper could end up using the old table with settings from the unused table. Do not update the mapped device in dm_set_zones_restrictions(). Wait till after dm_table_set_restrictions() is sure to succeed to update the md zoned settings. Do the same with the dax settings, and if dm_revalidate_zones() fails, restore the original queue limits. Fixes: 7f91ccd8a608d ("dm: Call dm_revalidate_zones() after setting the queue limits") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit e8819e7f03470c5b468720630d9e4e1d5b99159e Author: Benjamin Marzinski Date: Thu Apr 10 15:49:39 2025 -0400 dm: free table mempools if not used in __bind With request-based dm, the mempools don't need reloading when switching tables, but the unused table mempools are not freed until the active table is finally freed. Free them immediately if they are not needed. Fixes: 29dec90a0f1d9 ("dm: fix bio_set allocation") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 9eb7109a5bfc5b8226e9517e9f3cc6d414391884 Author: Benjamin Marzinski Date: Thu Apr 10 15:49:38 2025 -0400 dm: don't change md if dm_table_set_restrictions() fails __bind was changing the disk capacity, geometry and mempools of the mapped device before calling dm_table_set_restrictions() which could fail, forcing dm to drop the new table. Failing here would leave the device using the old table but with the wrong capacity and mempools. Move dm_table_set_restrictions() earlier in __bind(). Since it needs the capacity to be set, save the old version and restore it on failure. Fixes: bb37d77239af2 ("dm: introduce zone append emulation") Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit bdeff6d8a211c832f5ce1a65aff17f4a5e6de00f Author: Anand Moon Date: Thu Apr 10 19:03:21 2025 +0530 phy: amlogic: phy-meson-axg-pcie: Fix PHY creation order in axg-pcie probe Reorder the PHY creation in the axg-pcie probe function to ensure all the resource is mapped before creating the PHY. This change addresses the issue where the PHY creation was attempted before mapping the necessary resources, potentially causing failures. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-7-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit fef364bd4c9cf712c91e0013f5f304f4e7f09198 Author: Anand Moon Date: Thu Apr 10 19:03:20 2025 +0530 phy: amlogic: phy-meson-axg-pcie: Simplify error handling with dev_err_probe() Use dev_err_probe() for phy resources to indicate the deferral reason when waiting for the resource to come up. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-6-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit a77e2e899841937798bff0924c03d4d0e4963aa3 Author: Anand Moon Date: Thu Apr 10 19:03:19 2025 +0530 phy: amlogic: phy-meson-axg-mipi-dphy: Simplify error handling with dev_err_probe() Use dev_err_probe() for phy resources to indicate the deferral reason when waiting for the resource to come up. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-5-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit de39730f9258e9984892c0af68a3e884ad19acea Author: Anand Moon Date: Thu Apr 10 19:03:18 2025 +0530 phy: amlogic: phy-meson-axg-mipi-pcie-analog: Simplify error handling with dev_err_probe() Use dev_err_probe() for phy resources to indicate the deferral reason when waiting for the resource to come up. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-4-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit 9bff4ef29a6409850c27df705da54277a8e836f2 Author: Anand Moon Date: Thu Apr 10 19:03:17 2025 +0530 phy: amlogic: phy-meson-g12a-usb2: Simplify error handling with dev_err_probe() Use dev_err_probe() for phy resources to indicate the deferral reason when waiting for the resource to come up. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-3-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit 05457917e50c3d6bf75d2e3b99c7e6709a4a6844 Author: Anand Moon Date: Thu Apr 10 19:03:16 2025 +0530 phy: amlogic: phy-meson-gxl-usb2: Simplify error handling with dev_err_probe() Use dev_err_probe() for phy resources to indicate the deferral reason when waiting for the resource to come up. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250410133332.294556-2-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit 14423fc3a4a21fb436dda85450339ec2bf191b36 Author: Renjiang Han Date: Tue Feb 18 16:03:20 2025 +0530 media: venus: pm_helpers: add compatibility for dev_pm_genpd_set_hwmode on V4 There are two ways to switch GDSC mode. One is to write the POWER_CONTROL register and the other is to use dev_pm_genpd_set_hwmode(). However, they rely on different clock driver flags. dev_pm_genpd_set_hwmode() depends on the HW_CTRL_TRIGGER flag and POWER_CONTROL register depends on the HW_CTRL flag. By default, the dev_pm_genpd_set_hwmode() is used to switch the GDSC mode. If it fails and dev_pm_genpd_set_hwmode() returns -EOPNOTSUPP, it means that the clock driver uses the HW_CTRL flag. At this time, the GDSC mode is switched to write the POWER_CONTROL register. Clock driver is using HW_CTRL_TRIGGER flag with V6. So hwmode_dev is always true on using V6 platform. Conversely, if hwmode_dev is false, this platform must be not using V6. Therefore, replace IS_V6 in poweroff_coreid with hwmode_dev. Also, with HW_CTRL_TRIGGER flag, the vcodec gdsc gets enabled in SW mode by default. Therefore, before disabling the GDSC, GDSC should be switched to SW mode so that GDSC gets enabled in SW mode in the next enable. Signed-off-by: Renjiang Han Reviewed-by: Bryan O'Donoghue Reviewed-by: Vikash Garodia [bod: added media prefix] Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit b588898880b02a8e50bcb72242585021d67f246d Author: Renjiang Han Date: Thu Feb 27 08:13:54 2025 +0530 media: venus: vdec: queue dpb buffers to firmware for video seek For the seek case, the input port will be called stream_off and then stream_on in the driver. Firmware will flush all buffers during stream_off input port. Therefore, driver needs to queue DPB buffers to firmware during stream_on input port to ensure that decoder can decode normally when it receives enough input and output buffers. Otherwise, decoder will not be able to decode due to lack of DPB buffer even if there are enough input and output buffers. Signed-off-by: Renjiang Han Reviewed-by: Dikshita Agarwal [bod: added media prefix] Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 523cea3a19f0b3b020a4745344c136a636e6ffd7 Author: Loic Poulain Date: Thu Mar 27 13:53:04 2025 +0100 media: venus: Fix probe error handling Video device registering has been moved earlier in the probe function, but the new order has not been propagated to error handling. This means we can end with unreleased resources on error (e.g dangling video device on missing firmware probe aborting). Fixes: 08b1cf474b7f7 ("media: venus: core, venc, vdec: Fix probe dependency error") Cc: stable@vger.kernel.org Signed-off-by: Loic Poulain Reviewed-by: Dikshita Agarwal Reviewed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 4edd34175e3dd91dc30b3091efdf3f9c7143d4c4 Author: Renjiang Han Date: Thu Dec 19 11:11:53 2024 +0530 dt-bindings: media: add support for video hardware on QCS615 platform QCS615 uses the same video core as SC7180. Therefore, add qcom,qcs615-venus compatible to qcom,sc7180-venus.yaml to enable video hardware support on QCS615 platform. Make qcom,qcs615-venus fallback to qcom,sc7180-venus to ensure compatibility with existing configurations. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Renjiang Han Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit e68c3c50a736490d9c07888fe525718d16ff9e9c Author: Dan Carpenter Date: Mon Feb 17 11:08:00 2025 +0300 media: iris: fix error code in iris_load_fw_to_memory() Return -ENOMEM if memremap() fails. Don't return success. Fixes: d19b163356b8 ("media: iris: implement video firmware load/unload") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit bf462ef8c5ad61616b54751915f3dd1d3301a505 Author: Vikash Garodia Date: Fri Mar 21 08:49:00 2025 +0530 dt-bindings: media: qcom,sm8550-iris: document SA8775p IRIS accelerator Document the IRIS video decoder and encoder accelerator found in the SA8775p platform. SA8775p and SM8550 are irisv3 with same core and bindings, hence SA8775p is made fallback to SM8550. QCS8300 is a downscaled version of irisv3 and have different hardware capabilities. SM8650 is an irisv3 with different (higher) number of reset lines compared to SM8550. QCS8300 is yet to come in future posting, while SM8650 is posted as https://lore.kernel.org/all/20250305-topic-sm8x50-iris-v10-v2-1-bd65a3fc099e@linaro.org/ Reviewed-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vikash Garodia Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 1830cf0f56c3ced98bab3aea7ca2a0fa76e3a49b Author: Bryan O'Donoghue Date: Fri Mar 14 23:36:00 2025 +0000 media: qcom: camss: Add x1e80100 specific support Populate CAMSS with x1e80100 specific hooks. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit b8f781596da0e540797557c570163b5da0042070 Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:59 2025 +0000 media: qcom: camss: csiphy-3ph: Add 4nm CSIPHY 2ph 5Gbps DPHY v2.1.2 init sequence For various SoC skews at 4nm CSIPHY 2.1.2 is used. Add in the init sequence with base control reg offset of 0x1000. This initial version will support X1E80100. Take the silicon verification PHY init parameters as a first/best guess pass. SKEW_CAL is included as received from the qcom silicon init sequence. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 88655d64210e36c926d9c8a2617ad97e0bc7a4ad Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:58 2025 +0000 media: qcom: camss: Add support for 3ph CSIPHY write settle delay Currently we have an s32 value called delay which has been inherited from the CamX code for PHY init. This unused value relates to a post-write delay latching time. In the silicon test-bench which provides the basis for the CamX code the write settle times are specified in nanoseconds. In the upstream kernel we currently take no notice of the delay value and use all zero in any case. Nanosecond granularity timing from the perspective of the kernel is total overkill, however for some PHY init sequences introduction of a settle delay has a use. Add support to the 3ph init sequence for microsecond level delay. A readback of written data would probably accomplish the same thing but, since the PHY init sequences in the wild provide a delay value - we can just add support here for that delay and consume the values given. Generally these delays are probably not necessary but, they do speak to a theoretical delay that silicon test-benches utilise and therefore are worthwhile to replicate if the given PHY init sequence has the data. Reviewed-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 727970e9725c35366f501a890584e466ae34224a Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:57 2025 +0000 media: qcom: camss: Add VFE680 support Add silicon enabling support for VFE680 as found on sm8450, x1e and derivatives thereof. References work from Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue [bod: fix minor checkpatch linelenght splat @ lines 21, 22] Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 253314b20408545c31499d7c97072cc7a30612a2 Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:56 2025 +0000 media: qcom: camss: Add CSID 680 support Add CSI Decoder (CSID) 680 support to CAMSS. This version of CSID has been shipped with SM8450 and x1e chips. References work from Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 74cae7794341fa4f96fef0966f44471f7e2d322f Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:55 2025 +0000 media: qcom: camss: Use the CSIPHY id property to find clock names Use the CSIPHY id property to find clock names instead of relying on generating the clock names based on the control-loop index. x1e80100 has CSIPHY0, CSIPHY1, CSIPHY2 and CSIPHY4 so simple index naming won't work whereas and 'id' property allows any ordering and any stepping between the CSIPHY names. Reviewed-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 5af908c2c93d5bfeec72125901aff991e5268015 Author: Bryan O'Donoghue Date: Fri Mar 14 23:35:54 2025 +0000 media: qcom: camss: Add an id property to struct resources In various places in CAMSS we assume a linear set of declared devices {csiphy0, csiphy1, csiphy2} which currently works for upstream SoCs but for upcoming SoCs some of the SoC resources will result in a set such as {csiphy0, csiphy2} which will break the naive for() loops we have. Introduce an identity property which resource declarations can populate hence facilitating non-linear resource naming. Reviewed-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit b6fafb3941fa0f065def304d44d6c3c6d6ac0f64 Author: Johan Hovold Date: Mon Apr 7 12:48:28 2025 +0200 media: qcom: camss: vfe: suppress VFE version log spam A recent commit refactored the printing of the VFE hardware version, but (without it being mentioned) also changed the log level from debug to info. This results in several hundred lines of repeated log spam during boot and use, for example, on the Lenovo ThinkPad X13s: qcom-camss ac5a000.camss: VFE:1 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:0 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:2 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:2 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:3 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:5 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:6 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:4 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:5 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:6 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 ... Suppress the version logging by demoting to debug level again. Fixes: 10693fed125d ("media: qcom: camss: vfe: Move common code into vfe core") Cc: stable@vger.kernel.org Cc: Depeng Shao Reviewed-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit aef1d545989bc9e7f555af6b9f1be4963772192b Author: Johan Hovold Date: Mon Apr 7 10:51:25 2025 +0200 media: qcom: camss: csid: suppress CSID log spam A recent commit refactored the printing of the CSID hardware version, but (without it being mentioned) also changed the log level from debug to info. This results in repeated log spam during use, for example, on the Lenovo ThinkPad X13s: qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 Suppress the version logging by demoting to debug level again. Fixes: f759b8fd3086 ("media: qcom: camss: csid: Move common code into csid core") Cc: stable@vger.kernel.org Cc: Depeng Shao Signed-off-by: Johan Hovold Reviewed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit bce4c094c27268b6148906a0ed43ff02a39522da Author: Luca Weiss Date: Mon Dec 9 13:01:06 2024 +0100 media: qcom: camss: Restrict endpoint bus-type to D-PHY Currently the Qualcomm CAMSS driver only supports D-PHY while the hardware on most SoCs also supports C-PHY. Until this support is added, check for D-PHY to make it somewhat explicit that C-PHY won't work. Signed-off-by: Luca Weiss Tested-by: Vladimir Zapolskiy Reviewed-by: Vladimir Zapolskiy Reviewed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 2ab7f87a7f4bf392e3836a2600f115a1baa1415c Author: Bryan O'Donoghue Date: Fri Mar 14 13:14:00 2025 +0000 dt-bindings: media: Add qcom,x1e80100-camss Add bindings for qcom,x1e80100-camss in order to support the camera subsystem for x1e80100 as found in various Co-Pilot laptops. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit be526da77939920f7d8fa665889f41a0ad5b4d8d Author: Luca Weiss Date: Mon Dec 9 13:01:05 2024 +0100 dt-bindings: media: camss: Restrict bus-type property The CSIPHY of Qualcomm SoCs support both D-PHY and C-PHY standards for CSI-2, but not any others so restrict the bus-type property describing this to the supported values. The only exception here is MSM8916 which only supports D-PHY. C-PHY was introduced with newer SoCs. Do note, that currently the Linux driver only supports D-PHY. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 4acbaa8794b3712246eaabb34094209bb6568c3f Author: Bryan O'Donoghue Date: Wed Apr 2 13:24:15 2025 +0100 media: MAINTAINERS: Add myself to iris Reviewers There's some crossover between venus and iris, I'd like to help out with the reviews for iris to ensure we keep upstream chugging along. Acked-by: Neil Armstrong Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 10c17af9666a7789f5f920f441f4fd215902cf81 Author: Bryan O'Donoghue Date: Wed Apr 2 13:24:14 2025 +0100 media: MAINTAINERS: Amend venus Maintainers and Reviewers Stan has stepped back from active venus development as a result I'd like to volunteer my help in keeping venus maintained upstream. Discussing with the qcom team on this we agreed +M for Dikshita +R for me Many thanks to Stan for his hard work over the years from originating this driver upstream to his many years of maintenance of it too. Acked-by: Neil Armstrong Acked-by: Dikshita Agarwal Acked-by: Stanimir Varbanov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 4c3596d7e83a320ef7241de6e194d85bec5974ea Author: Yunfei Dong Date: Sat Mar 8 15:47:57 2025 +0800 media: mediatek: vcodec: add description for vsi struct The vsi (video shared information) struct needs to be synchronized between firmware and host, as a change that is only done in the host version of the struct but isn't synchronized to the firmware. This can lead to decoding issues with H264 bitstreams. Highlight this requirement within the struct descriptions. Signed-off-by: Yunfei Dong Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit c8c3bb1e54457eec538907a614fab3c9c9295ff8 Author: Yunfei Dong Date: Sat Mar 8 15:47:56 2025 +0800 media: mediatek: vcodec: support extended h264 decode Add a new extended vsi_ext struct besides the existing vsi struct, to enable calculating the end of the address range of the current working buffer for architectures, where simply adding the buffer size to the start of the address range isn't sufficient. Additionally, on extended architectures, the NAL information can be fetched directly from the firmware, which allows skipping the parsing step within the kernel. Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 80d45644d5f93d941ff127a0791362a0738c0745 Author: Yunfei Dong Date: Sat Mar 8 15:47:55 2025 +0800 media: mediatek: vcodec: remove vsi operation in common interface Extend the VSI (video shared information) struct to allow sending slice parameters to SCP, as the parameters have changed on MT8188 architecture. Remove VSI related information from the common interface to ensure that the interface is usable by architectures with and without the extended parameters. The new VSI extensions will be introduced in later patches. Signed-off-by: Yunfei Dong Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit f19035b86382f635a0d13d177b601babaf263a12 Author: Fei Shao Date: Fri Mar 14 15:56:17 2025 +0800 media: mediatek: vcodec: Correct vsi_core framebuffer size The framebuffer size for decoder instances was being incorrectly set - inst->vsi_core->fb.y.size was assigned twice consecutively. Assign the second picinfo framebuffer size to the C framebuffer instead, which appears to be the intended target based on the surrounding code. Fixes: 2674486aac7d ("media: mediatek: vcodec: support stateless hevc decoder") Cc: stable@vger.kernel.org Signed-off-by: Fei Shao Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 311e40e877bd980bc665e6c8d3b15d96f0ec2aa8 Author: Nicolas Dufresne Date: Thu Apr 3 15:07:41 2025 -0400 media: verisilicon: Enable wide 4K in AV1 decoder Tested on RK3588, this decoder is capable of handling WUHD, so bump the maximum width and height accordingly. Reviewed-by: Benjamin Gaignard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 4bfeea6ec1c0241a6c856ed1694a72a8cbaa8494 Author: Mario Limonciello Date: Wed Apr 9 23:36:57 2025 -0500 thunderbolt: Use wake on connect and disconnect over suspend Wake on connect is useful for being able to wake up a suspended laptop without opening the lid by plugging into a dock. Add the default policy to the USB4 router when wakeup is enabled for the router. Behavior for individual ports can be controlled by port wakeup settings. Cc: Opal Voravootivat Cc: Raul Rangel Cc: Utkarsh Patel Cc: Richard Gong Cc: Sanath S Link: https://lore.kernel.org/linux-usb/20250410042723.GU3152277@black.fi.intel.com/T/#m0249e8c0e1c77ec92a44a3d6c8b4a8e5a9b7114e Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 88f67f2a99f061cb938812db3deb965504cf5c5c Author: Bartosz Golaszewski Date: Tue Apr 8 09:19:55 2025 +0200 platform/x86: silicom: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-platform-x86-v1-3-6f67e76a722c@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e0071ad2ee0bf09a06e650cb5d697e6c8a7ca827 Author: Bartosz Golaszewski Date: Tue Apr 8 09:19:54 2025 +0200 platform/x86: int0002: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-platform-x86-v1-2-6f67e76a722c@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 29ba3b6037dcf73f0fc563611ea81669fb2a3f37 Author: Bartosz Golaszewski Date: Tue Apr 8 09:19:53 2025 +0200 platform/x86: barco-p50: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Acked-by: Peter Korsgaard Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250408-gpiochip-set-rv-platform-x86-v1-1-6f67e76a722c@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 8625c4c06a79ddddcc53ead898bf721cee618e4e Author: Ilpo Järvinen Date: Mon Apr 7 20:08:38 2025 +0300 platform/x86: Use strscpy()/scnprintf() with acpi_device_name/class() Replace strcpy() and sprintf() for acpi_device_name/class() targets with safer variant. In one case, scnprintf() is necessary but the rest can use strscpy(). Link: https://lore.kernel.org/r/20250407170839.2153-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen commit 9bf4294d0c1e5268332964604ece43eaf7f33cc3 Author: Wesley Cheng Date: Wed Apr 9 12:48:04 2025 -0700 ALSA: usb-audio: qcom: Notify USB audio devices on USB offload probing If the vendor USB offload class driver is not ready/initialized before USB SND discovers attached devices, utilize snd_usb_rediscover_devices() to find all currently attached devices, so that the ASoC entities are notified on available USB audio devices. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-32-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit a67656f011d18c58a1e5c6744ba7d6061b5bfd3b Author: Wesley Cheng Date: Wed Apr 9 12:48:03 2025 -0700 ALSA: usb-audio: qcom: Add USB offload route kcontrol In order to allow userspace/applications know about USB offloading status, expose a sound kcontrol that fetches information about which sound card and PCM index the USB device is mapped to for supporting offloading. In the USB audio offloading framework, the ASoC BE DAI link is the entity responsible for registering to the SOC USB layer. It is expected for the USB SND offloading driver to add the kcontrol to the sound card associated with the USB audio device. An example output would look like: tinymix -D 1 get 'USB Offload Playback Route PCM#0' -1, -1 (range -1->255) This example signifies that there is no mapped ASoC path available for the USB SND device. tinymix -D 1 get 'USB Offload Playback Route PCM#0' 0, 0 (range -1->255) This example signifies that the offload path is available over ASoC sound card index#0 and PCM device#0. The USB offload kcontrol will be added in addition to the existing kcontrols identified by the USB SND mixer. The kcontrols used to modify the USB audio device specific parameters are still valid and expected to be used. These parameters are not mirrored to the ASoC subsystem. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-31-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6a348e9236c336f363375a526b7b868667011121 Author: Wesley Cheng Date: Wed Apr 9 12:48:02 2025 -0700 ALSA: usb-audio: qcom: Don't allow USB offload path if PCM device is in use Add proper checks and updates to the USB substream once receiving a USB QMI stream enable request. If the substream is already in use from the non offload path, reject the stream enable request. In addition, update the USB substream opened parameter when enabling the offload path, so the non offload path can be blocked. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-30-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 326bbc348298ab0946c5560defe024a5f6ef28bb Author: Wesley Cheng Date: Wed Apr 9 12:48:01 2025 -0700 ALSA: usb-audio: qcom: Introduce QC USB SND offloading support Several Qualcomm SoCs have a dedicated audio DSP, which has the ability to support USB sound devices. This vendor driver will implement the required handshaking with the DSP, in order to pass along required resources that will be utilized by the DSP's USB SW. The communication channel used for this handshaking will be using the QMI protocol. Required resources include: - Allocated secondary event ring address - EP transfer ring address - Interrupter number The above information will allow for the audio DSP to execute USB transfers over the USB bus. It will also be able to support devices that have an implicit feedback and sync endpoint as well. Offloading these data transfers will allow the main/applications processor to enter lower CPU power modes, and sustain a longer duration in those modes. Audio offloading is initiated with the following sequence: 1. Userspace configures to route audio playback to USB backend and starts playback on the platform soundcard. 2. The Q6DSP AFE will communicate to the audio DSP to start the USB AFE port. 3. This results in a QMI packet with a STREAM enable command. 4. The QC audio offload driver will fetch the required resources, and pass this information as part of the QMI response to the STREAM enable command. 5. Once the QMI response is received the audio DSP will start queuing data on the USB bus. As part of step#2, the audio DSP is aware of the USB SND card and pcm device index that is being selected, and is communicated as part of the QMI request received by QC audio offload. These indices will be used to handle the stream enable QMI request. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-29-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit bd1979b9d3fcbba6632550e9d86d9acac481884f Author: Wesley Cheng Date: Wed Apr 9 12:48:00 2025 -0700 ALSA: usb-audio: qcom: Add USB QMI definitions The Qualcomm USB audio offload driver utilizes the QMI protocol to communicate with the audio DSP. Add the necessary QMI header and field definitions, so the QMI interface driver is able to route the QMI packet received to the USB audio offload driver. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-28-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit e0dd9240f13a8ea3e9fa77b547826c22e1337e7f Author: Wesley Cheng Date: Wed Apr 9 12:47:59 2025 -0700 ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device The USB SND path may need to know how the USB offload path is routed, so that applications can open the proper sound card and PCM device. The implementation for the QC ASoC design has a "USB Mixer" kcontrol for each possible FE (Q6ASM) DAI, which can be utilized to know which front end link is enabled. When an application/userspace queries for the mapped offload devices, the logic will lookup the USB mixer status though the following path: MultiMedia* <-> MM_DL* <-> USB Mixer* The "USB Mixer" is a DAPM widget, and the q6routing entity will set the DAPM connect status accordingly if the USB mixer is enabled. If enabled, the Q6USB backend link can fetch the PCM device number from the FE DAI link (Multimedia*). With respects to the card number, that is straightforward, as the ASoC components have direct references to the ASoC platform sound card. An example output can be shown below: Number of controls: 9 name value Capture Channel Map 0, 0 (range 0->36) Playback Channel Map 0, 0 (range 0->36) Headset Capture Switch On Headset Capture Volume 1 (range 0->4) Sidetone Playback Switch On Sidetone Playback Volume 4096 (range 0->8192) Headset Playback Switch On Headset Playback Volume 20, 20 (range 0->24) USB Offload Playback Route PCM#0 0, 1 (range -1->255) The "USB Offload Playback Route PCM#*" kcontrol will signify the corresponding card and pcm device it is offload to. (card#0 pcm - device#1) If the USB SND device supports multiple audio interfaces, then it will contain several PCM streams, hence in those situations, it is expected that there will be multiple playback route kcontrols created. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-27-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 1b8d0d87b934f002a06a8ec2abfe907bd12e8cd4 Author: Wesley Cheng Date: Wed Apr 9 12:47:58 2025 -0700 ASoC: qcom: qdsp6: Add headphone jack for offload connection status The headphone jack framework has a well defined infrastructure for notifying userspace entities through input devices. Expose a jack device that carries information about if an offload capable device is connected. Applications can further identify specific offloading information through other SND kcontrols. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-26-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 72b0b8b2998043c50b191d9668c7a828ca0d5c70 Author: Wesley Cheng Date: Wed Apr 9 12:47:57 2025 -0700 ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6 Create a USB BE component that will register a new USB port to the ASoC USB framework. This will handle determination on if the requested audio profile is supported by the USB device currently selected. Check for if the PCM format is supported during the hw_params callback. If the profile is not supported then the userspace ALSA entity will receive an error, and can take further action. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-25-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 3aafa53515b052ce353a0fc931f7fb188b229ceb Author: Wesley Cheng Date: Wed Apr 9 12:47:56 2025 -0700 ASoC: qcom: qdsp6: q6afe: Increase APR timeout For USB offloading situations, the AFE port start command will result in a QMI handshake between the Q6DSP and the main processor. Depending on if the USB bus is suspended, this routine would require more time to complete, as resuming the USB bus has some overhead associated with it. Increase the timeout to 3s to allow for sufficient time for the USB QMI stream enable handshake to complete. Reviewed-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-24-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 450d63471d1c953d8139ca1d67c05d51310bec2a Author: Wesley Cheng Date: Wed Apr 9 12:47:55 2025 -0700 ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp The QC ADSP is able to support USB playback endpoints, so that the main application processor can be placed into lower CPU power modes. This adds the required AFE port configurations and port start command to start an audio session. Specifically, the QC ADSP can support all potential endpoints that are exposed by the audio data interface. This includes isochronous data endpoints, in either synchronous mode or asynchronous mode. In the latter case both implicit or explicit feedback endpoints are supported. The size of audio samples sent per USB frame (microframe) will be adjusted based on information received on the feedback endpoint. Some pre-requisites are needed before issuing the AFE port start command, such as setting the USB AFE dev_token. This carries information about the available USB SND cards and PCM devices that have been discovered on the USB bus. The dev_token field is used by the audio DSP to notify the USB offload driver of which card and PCM index to enable playback on. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-23-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 305da591bd056ae1cdf9fcf32b4abb3c38ba82c2 Author: Wesley Cheng Date: Wed Apr 9 12:47:54 2025 -0700 ASoC: dt-bindings: Update example for enabling USB offload on SM8250 Add an example on enabling of USB offload for the Q6DSP. The routing can be done by the mixer, which can pass the multimedia stream to the USB backend. Acked-by: Rob Herring Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-22-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 55b5fb369c02177b2f7ea790cec839fc5ec57173 Author: Wesley Cheng Date: Wed Apr 9 12:47:53 2025 -0700 ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add USB_RX port Q6DSP supports handling of USB playback audio data if USB audio offloading is enabled. Add a new definition for the USB_RX AFE port, which is referenced when the AFE port is started. Acked-by: Krzysztof Kozlowski Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-21-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6640c9bc5c974efaa56347215696cbd03aa36ced Author: Wesley Cheng Date: Wed Apr 9 12:47:52 2025 -0700 ASoC: doc: Add documentation for SOC USB With the introduction of the soc-usb driver, add documentation highlighting details on how to utilize the new driver and how it interacts with different components in USB SND and ASoC. It provides examples on how to implement the drivers that will need to be introduced in order to enable USB audio offloading. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-20-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f98cd6ecda1d32d4c7f8a238a49e9ce71db89a2d Author: Wesley Cheng Date: Wed Apr 9 12:47:51 2025 -0700 ASoC: usb: Rediscover USB SND devices on USB port add In case the USB backend device has not been initialized/probed, USB SND device connections can still occur. When the USB backend is eventually made available, previous USB SND device connections are not communicated to the USB backend. Call snd_usb_rediscover_devices() to generate the connect callbacks for all USB SND devices connected. This will allow for the USB backend to be updated with the current set of devices available. The chip array entries are all populated and removed while under the register_mutex, so going over potential race conditions: Thread#1: q6usb_component_probe() --> snd_soc_usb_add_port() --> snd_usb_rediscover_devices() --> mutex_lock(register_mutex) Thread#2 --> usb_audio_disconnect() --> mutex_lock(register_mutex) So either thread#1 or thread#2 will complete first. If Thread#1 completes before thread#2: SOC USB will notify DPCM backend of the device connection. Shortly after, once thread#2 runs, we will get a disconnect event for the connected device. Thread#2 completes before thread#1: Then during snd_usb_rediscover_devices() it won't notify of any connection for that particular chip index. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-19-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 234ed325920c4441090e4dd5441d4e424c1804c9 Author: Wesley Cheng Date: Wed Apr 9 12:47:50 2025 -0700 ASoC: usb: Fetch ASoC card and pcm device information USB SND needs to know how the USB offload path is being routed. This would allow for applications to open the corresponding sound card and pcm device when it wants to take the audio offload path. This callback should return the mapped indexes based on the USB SND device information. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-18-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 0bb5f3614b2588f758e6db21397776d7164f3b66 Author: Wesley Cheng Date: Wed Apr 9 12:47:49 2025 -0700 ASoC: usb: Create SOC USB SND jack kcontrol Expose API for creation of a jack control for notifying of available devices that are plugged in/discovered, and that support offloading. This allows for control names to be standardized across implementations of USB audio offloading. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-17-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 00f5d6bfba3ac7b28dd9bbf00eab5db35e0347b7 Author: Wesley Cheng Date: Wed Apr 9 12:47:48 2025 -0700 ASoC: usb: Add PCM format check API for USB backend Introduce a helper to check if a particular PCM format is supported by the USB audio device connected. If the USB audio device does not have an audio profile which can support the requested format, then notify the USB backend. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-16-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit dba7759af789b75240379e94017e655221c83225 Author: Wesley Cheng Date: Wed Apr 9 12:47:47 2025 -0700 ASoC: Add SoC USB APIs for adding an USB backend Some platforms may have support for offloading USB audio devices to a dedicated audio DSP. Introduce a set of APIs that allow for management of USB sound card and PCM devices enumerated by the USB SND class driver. This allows for the ASoC components to be aware of what USB devices are available for offloading. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-15-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 722f79117ee886c4c1ef08f443a1fdfd5433747f Author: Wesley Cheng Date: Wed Apr 9 12:47:46 2025 -0700 ALSA: usb-audio: Allow for rediscovery of connected USB SND devices In case of notifying SND platform drivers of connection events, some of these use cases, such as offloading, require an ASoC USB backend device to be initialized before the events can be handled. If the USB backend device has not yet been probed, this leads to missing initial USB audio device connection events. Expose an API that traverses the usb_chip array for connected devices, and to call the respective connection callback registered to the SND platform driver. Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-14-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 74914dc1ea268a58be7112f14d8b3568866e40e8 Author: Wesley Cheng Date: Wed Apr 9 12:47:45 2025 -0700 ALSA: usb-audio: Introduce USB SND platform op callbacks Allow for different platforms to be notified on USB SND connect/disconnect sequences. This allows for platform USB SND modules to properly initialize and populate internal structures with references to the USB SND chip device. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-13-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f15d1e557b01b19f4b20aae8cf1a1f2b1f565571 Author: Wesley Cheng Date: Wed Apr 9 12:47:44 2025 -0700 ALSA: usb-audio: Prevent starting of audio stream if in use With USB audio offloading, an audio session is started from the ASoC platform sound card and PCM devices. Likewise, the USB SND path is still readily available for use, in case the non-offload path is desired. In order to prevent the two entities from attempting to use the USB bus, introduce a flag that determines when either paths are in use. If a PCM device is already in use, the check will return an error to userspace notifying that the stream is currently busy. This ensures that only one path is using the USB substream. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-12-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit d893d5eaabfa948e983cc447bacf80a8306358da Author: Wesley Cheng Date: Wed Apr 9 12:47:43 2025 -0700 ALSA: usb-audio: Save UAC sample size information Within the UAC descriptor, there is information describing the size of a sample (bSubframeSize/bSubslotSize) and the number of relevant bits (bBitResolution). Currently, fmt_bits carries only the bit resolution, however, some offloading entities may also require the overall size of the sample. Save this information in a separate parameter, as depending on the UAC format type, the sample size can not easily be decoded from other existing parameters. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-11-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 2bde439265e24ee2086ba6573458c6bdc43d6364 Author: Wesley Cheng Date: Wed Apr 9 12:47:42 2025 -0700 ALSA: usb-audio: Check for support for requested audio format Allow for checks on a specific USB audio device to see if a requested PCM format is supported. This is needed for support when playback is initiated by the ASoC USB backend path. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-10-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5a49a6ba2214a438edcb05f9a1f5259a70a61e47 Author: Wesley Cheng Date: Wed Apr 9 12:47:41 2025 -0700 ALSA: usb-audio: Export USB SND APIs for modules Some vendor modules will utilize useful parsing and endpoint management APIs to start audio playback/capture. Reviewed-by: Pierre-Louis Bossart Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-9-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 67890d579402804b1d32b3280d9860073542528e Author: Wesley Cheng Date: Wed Apr 9 12:47:40 2025 -0700 ALSA: Add USB audio device jack type Add an USB jack type, in order to support notifying of a valid USB audio device. Since USB audio devices can have a slew of different configurations that reach beyond the basic headset and headphone use cases, classify these devices differently. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-8-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 8da7644493b4cad0db294b9bd213c7b1d3523cff Author: Wesley Cheng Date: Wed Apr 9 12:47:39 2025 -0700 usb: dwc3: Specify maximum number of XHCI interrupters Allow for the DWC3 host driver to pass along XHCI property that defines how many interrupters to allocate. This is in relation for the number of event rings that can be potentially used by other processors within the system. Acked-by: Thinh Nguyen Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-7-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit b85a2ebda1034881d09e6127726dc78950669474 Author: Wesley Cheng Date: Wed Apr 9 12:47:38 2025 -0700 usb: host: xhci: Notify xHCI sideband on transfer ring free In the case of handling a USB bus reset, the xhci_discover_or_reset_device can run without first notifying the xHCI sideband client driver to stop or prevent the use of the transfer ring. It was seen that when a bus reset situation happened, the USB offload driver was attempting to fetch the xHCI transfer ring information, which was already freed. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-6-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 000ab7dab5b8ed4f788ea7714e2df82275db5f7f Author: Wesley Cheng Date: Wed Apr 9 12:47:37 2025 -0700 usb: host: xhci-plat: Set XHCI max interrupters if property is present Some platforms may want to limit the number of XHCI interrupters allocated. This is passed to xhci-plat as a device property. Ensure that this is read and the max_interrupters field is set. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-5-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit fce57295497df70711d50ed01bf6d914de0ca647 Author: Wesley Cheng Date: Wed Apr 9 12:47:36 2025 -0700 usb: host: xhci-mem: Allow for interrupter clients to choose specific index Some clients may operate only on a specific XHCI interrupter instance. Allow for the associated class driver to request for the interrupter that it requires. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-4-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5beb4a53a1dd1868aa0ba0d48b1bbc557126caaa Author: Wesley Cheng Date: Wed Apr 9 12:47:35 2025 -0700 usb: host: xhci-mem: Cleanup pending secondary event ring events As part of xHCI bus suspend, the xHCI is halted. However, if there are pending events in the secondary event ring, it is observed that the xHCI controller stops responding to further commands upon host or device initiated bus resume. Iterate through all pending events and update the dequeue pointer to the beginning of the event ring. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-3-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit de66754e9f8029f8ae955a588959b99cab56b506 Author: Mathias Nyman Date: Wed Apr 9 12:47:34 2025 -0700 xhci: sideband: add initial api to register a secondary interrupter entity Introduce XHCI sideband, which manages the USB endpoints being requested by a client driver. This is used for when client drivers are attempting to offload USB endpoints to another entity for handling USB transfers. XHCI sec intr will allow for drivers to fetch the required information about the transfer ring, so the user can submit transfers independently. Expose the required APIs for drivers to register and request for a USB endpoint and to manage XHCI secondary interrupters. Driver renaming, multiple ring segment page linking, proper endpoint clean up, and allowing module compilation added by Wesley Cheng to complete original concept code by Mathias Nyman. Tested-by: Puma Hsu Tested-by: Daehwan Jung Signed-off-by: Mathias Nyman Co-developed-by: Wesley Cheng Signed-off-by: Wesley Cheng Acked-by: Mark Brown Link: https://lore.kernel.org/r/20250409194804.3773260-2-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f12b54d7c24388886277598236b3eeea5c68eec4 Author: Marc Zyngier Date: Fri Apr 11 11:54:22 2025 +0100 KVM: arm64: Repaint pmcr_n into nr_pmu_counters The pmcr_n field obviously refers to PMCR_EL0.N, but is generally used as the number of counters seen by the guest. Rename it accordingly. Suggested-by: Oliver upton Signed-off-by: Marc Zyngier commit d11c5a928a6e1d786e25a9284ef59bf58a02cf0d Author: Michal Wajdeczko Date: Thu Apr 3 16:26:35 2025 +0200 drm/xe/vf: Don't expose privileged GT debugfs files if VF Some of the debugfs files require access to the registers that are not accessible to the VFs. Don't expose those files on VF drivers. Signed-off-by: Michal Wajdeczko Cc: Marcin Bernatowicz Cc: Lucas De Marchi Tested-by: Marcin Bernatowicz Reviewed-by: Marcin Bernatowicz Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250403142635.1821-4-michal.wajdeczko@intel.com commit 387444984d7b53dbaee263887cad4ea7c8e57b34 Author: Michal Wajdeczko Date: Thu Apr 3 16:26:34 2025 +0200 drm/xe/guc: Don't expose GuC privileged debugfs files if VF Some of the GuC debugfs files require access to the data that is not available on the VFs. Don't expose those files on the VF driver. Signed-off-by: Michal Wajdeczko Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250403142635.1821-3-michal.wajdeczko@intel.com commit e15826bb3c2c5377eedc757f2adec8dcaa5255f7 Author: Michal Wajdeczko Date: Thu Apr 3 16:26:33 2025 +0200 drm/xe/guc: Refactor GuC debugfs initialization We don't have to drmm_kmalloc() local copy of debugfs_list to write there our pointer to the struct xe_guc as we can extract pointer to the struct xe_gt from the grandparent debugfs entry, in similar way to what we did for GT debugfs files. Note that there is no change in file/directory structure, just refactored how files are created and how functions are called. Signed-off-by: Michal Wajdeczko Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250403142635.1821-2-michal.wajdeczko@intel.com commit 361813db5d9ba33434754c0de1207a2b91264ab1 Author: Kurt Borja Date: Sat Mar 29 04:32:29 2025 -0300 Documentation: ABI: Add sysfs platform and debugfs ABI documentation for alienware-wmi Add ABI description for the alienware-wmi driver. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-12-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 3e48767ab53b56d31c77a063d022ca9aca43bf22 Author: Kurt Borja Date: Sat Mar 29 04:32:28 2025 -0300 Documentation: admin-guide: laptops: Add documentation for alienware-wmi Add driver admin-guide documentation for the alienware-wmi driver. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-11-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a56d188a0a8f3df4860acf66a6af89318ce611be Author: Kurt Borja Date: Sat Mar 29 04:32:27 2025 -0300 Documentation: wmi: Improve and update alienware-wmi documentation Use tables to describe method operations instead of using pseudo-code. Drop unknown method descriptions to avoid redundancy. Drop GPIO section as it is currently irrelevant to this driver. Update Thermal_Information method documentation. Add one more helpful developer to the kudos section. Reviewed-by: Armin Wolf Reviewed-by: Bagas Sanjaya Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-10-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b028fb497c152febbdc48b544aaaadbe06406dbf Author: Kurt Borja Date: Sat Mar 29 04:32:26 2025 -0300 platform/x86: alienware-wmi-wmax: Add a DebugFS interface Add a debugfs interface which exposes thermal private data. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-9-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 07ac275981b1f11a58dd7bb7790eed66252b072c Author: Kurt Borja Date: Sat Mar 29 04:32:25 2025 -0300 platform/x86: alienware-wmi-wmax: Add support for manual fan control All models with the "AWCC" WMAX device support a way of manually controlling fans. The PWM duty cycle of a fan can't be controlled directly. Instead the AWCC interface let's us tune a fan `boost` value, which has the following empirically discovered, approximate behavior over the PWM value: pwm = pwm_base + (fan_boost / 255) * (pwm_max - pwm_base) Where the pwm_base is the locked PWM value controlled by the FW and fan_boost is a value between 0 and 255. Expose this fan_boost knob as a custom HWMON attribute. Cc: Guenter Roeck Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-8-a14ea39d8a94@gmail.com Signed-off-by: Ilpo Järvinen commit d699907834959c87a6b6c5214d5e9a3e8ba6b5a1 Author: Kurt Borja Date: Sat Mar 29 04:32:24 2025 -0300 platform/x86: alienware-wmi-wmax: Add HWMON support All models with the "AWCC" WMAX device support monitoring fan speed and temperature sensors. Expose this feature through the HWMON interface. Cc: Guenter Roeck Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-7-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 3dde0ae1eb5f00c1d61959d1fcce2b1b46ccc199 Author: Kurt Borja Date: Sat Mar 29 04:32:23 2025 -0300 platform/x86: alienware-wmi-wmax: Add support for the "custom" thermal profile All models with the "AWCC" WMAX device support a "custom" thermal profile. In some models this profile signals user-space that the user wants to manually control the fans, which are always unlocked. In other models it actually unlocks manual fan control. Reviewed-by: Armin Wolf Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-6-a14ea39d8a94@gmail.com Signed-off-by: Ilpo Järvinen commit 32b6372ddd4385a47a6a4b6ccff0c22b7be8765a Author: Kurt Borja Date: Sat Mar 29 04:32:22 2025 -0300 platform/x86: alienware-wmi-wmax: Improve platform profile probe Get and store the AWCC system description in alienware_awcc_setup() instead of awcc_platform_profile_probe() and get the correct offset by iterating through each member of the system_description. Then add a debug message for unmatched profiles and replace set_bit() with it's non-atomic version __set_bit() because the choices bitmap only belongs to this thread. In the process also check for a malformed system description by defining an arbitrary limit of resource count. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-5-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 77bb2ec55700ee3af0cd902398fa903363826679 Author: Kurt Borja Date: Sat Mar 29 04:32:21 2025 -0300 platform/x86: alienware-wmi-wmax: Modify supported_thermal_profiles[] Rename supported_thermal_profiles[] -> supported_profiles[] and change it's type to u8 because it stores AWCC thermal IDs. Reviewed-by: Armin Wolf Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-4-a14ea39d8a94@gmail.com Signed-off-by: Ilpo Järvinen commit 45983d19f305a562386f4d13accd11056b99f48a Author: Kurt Borja Date: Sat Mar 29 04:32:20 2025 -0300 platform/x86: alienware-wmi-wmax: Improve internal AWCC API Inline all AWCC WMI helper methods and directly return the newly introduced awcc_wmi_command() helper to simplify implementation. Drop awcc_thermal_control() in favor of awcc_op_activate_profile(). Add awcc_op_get_resource_id(), awcc_op_get_current_profile() and a new failure code. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-3-a14ea39d8a94@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a000da9dbc249642233587a80df03130e8983d10 Author: Kurt Borja Date: Sat Mar 29 04:32:19 2025 -0300 platform/x86: alienware-wmi-wmax: Improve ID processing Rename AWCC_SENSOR_ID_MASK to AWCC_SENSOR_ID_FLAG and reorder the ID processing defines in a more logical manner. Then replace their use in bitwise operations with FIELD_GET(). The latter also involves dropping the AWCC_SENSOR_ID_FLAG check inside is_awcc_thermal_mode() in favor of extracting the first byte out of IDs obtained with AWCC_OP_GET_RESOURCE_ID. This is also a requirement to add support for Alienware Aurora desktops. While at it, also rename is_awcc_thermal_mode() to is_awcc_thermal_profile_id(). Reviewed-by: Armin Wolf Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-2-a14ea39d8a94@gmail.com Signed-off-by: Ilpo Järvinen commit 8a1a0fb55f8a8e482314d2769a9cac0703016fd4 Author: Kurt Borja Date: Sat Mar 29 04:32:18 2025 -0300 platform/x86: alienware-wmi-wmax: Rename thermal related symbols The "thermal" features of the WMAX WMI device are only present on the host device if the ACPI _UID is "AWCC". Replace WMAX prefixes with "AWCC" to reflect this relationship. Thermal profiles with WMAX_PROFILE_BASIC prefix are also renamed to WMAX_PROFILE_LEGACY because they are only supported in older versions of this WMI device. Finally, shorten enum defines for AWCC operations from WMAX_OPERATION_* to AWCC_OP_*. Reviewed-by: Armin Wolf Reviewed-by: Ilpo Järvinen Signed-off-by: Kurt Borja Link: https://lore.kernel.org/r/20250329-hwm-v7-1-a14ea39d8a94@gmail.com Signed-off-by: Ilpo Järvinen commit 62e565273993ee47c82ca2975e65ce4bec3c3697 Author: Ahmed S. Darwish Date: Fri Apr 11 09:04:01 2025 +0200 x86/cacheinfo: Standardize header files and CPUID references Reference header files using their canonical form . Standardize on CPUID(0xN), instead of CPUID(N), for all standard leaves. This removes ambiguity and aligns them with their extended counterparts like CPUID(0x8000001d). References: 0dd09e215a39 ("x86/cacheinfo: Apply maintainer-tip coding style fixes") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: "H. Peter Anvin" Cc: John Ogness Link: https://lore.kernel.org/r/20250411070401.1358760-3-darwi@linutronix.de commit 718f9038acc53631cc887676b9c433e6fb9f15dc Author: Ahmed S. Darwish Date: Fri Apr 11 09:04:00 2025 +0200 x86/cpuid: Remove obsolete CPUID(0x2) iteration macro The CPUID(0x2) cache descriptors iterator at : for_each_leaf_0x2_desc() has no more call sites. Remove it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250411070401.1358760-2-darwi@linutronix.de commit 9f13acb2406a3aed90c6738b3a2f1c0e43118cbd Merge: d02c83d75f9f76 0af2f6be1b4281 Author: Ingo Molnar Date: Fri Apr 11 11:13:27 2025 +0200 Merge tag 'v6.15-rc1' into x86/cpu, to refresh the branch with upstream changes Signed-off-by: Ingo Molnar commit 23a76739d6afe6f98ccdb2517d7985b4335c7a3a Author: Nikolay Borisov Date: Fri Apr 11 07:41:05 2025 +0200 x86/alternatives: Make smp_text_poke_batch_process() subsume smp_text_poke_batch_finish() Simplify the alternatives interface some more by moving the poke_batch_finish check into poke_batch_process and renaming the latter. The net effect is one less function name to consider when reading the code. Signed-off-by: Nikolay Borisov Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-54-mingo@kernel.org commit 4f9534719e524affb1aa8e0ff0c8b30c1c65e574 Author: Ingo Molnar Date: Fri Apr 11 07:41:04 2025 +0200 x86/alternatives: Add comment about noinstr expectations Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-53-mingo@kernel.org commit 023f42dd59203be8ad2fc0574af32d3b4ad041ec Author: Ingo Molnar Date: Fri Apr 11 07:41:03 2025 +0200 x86/alternatives: Rename 'apply_relocation()' to 'text_poke_apply_relocation()' Join the text_poke_*() API namespace. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-52-mingo@kernel.org commit dac0d7542782bae98a4d8cedde3028a07f1915d2 Author: Ingo Molnar Date: Fri Apr 11 07:41:02 2025 +0200 x86/alternatives: Update the comments in smp_text_poke_batch_process() - Capitalize 'INT3' consistently, - make it clear that 'sync cores' means an SMP sync to all CPUs, - fix typos and spelling. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-51-mingo@kernel.org commit 2c373ca0640f25361aee1bcf382fc8081830938e Author: Ingo Molnar Date: Fri Apr 11 07:41:01 2025 +0200 x86/alternatives: Remove 'smp_text_poke_batch_flush()' It only has a single user left, merge it into smp_text_poke_batch_add() and remove the helper function. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-50-mingo@kernel.org commit b1bb39185df6f5ddafcb912304b73e70c6b70c5f Author: Ingo Molnar Date: Fri Apr 11 07:41:00 2025 +0200 x86/alternatives: Move declarations of vmlinux.lds.S defined section symbols to Move it from the middle of a .c file next to the similar declarations of __alt_instructions[] et al. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-49-mingo@kernel.org commit db5c68c88c07337b7e5801abfb926f9191fa7945 Author: Ingo Molnar Date: Fri Apr 11 07:40:59 2025 +0200 x86/alternatives: Simplify the #include section We accumulated lots of unnecessary header inclusions over the years, trim them. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-48-mingo@kernel.org commit 3c8454dfc9143c992375a166a620ea3d62c3e434 Author: Ingo Molnar Date: Fri Apr 11 07:40:58 2025 +0200 x86/alternatives: Rename 'POKE_MAX_OPCODE_SIZE' to 'TEXT_POKE_MAX_OPCODE_SIZE' Join the TEXT_POKE_ namespace. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-47-mingo@kernel.org commit 8036fbe5a5d618be3694c4719afb14fd14cc972d Author: Ingo Molnar Date: Fri Apr 11 07:40:57 2025 +0200 x86/alternatives: Rename 'TP_ARRAY_NR_ENTRIES_MAX' to 'TEXT_POKE_ARRAY_MAX' Standardize on TEXT_POKE_ namespace for CPP constants too. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-46-mingo@kernel.org commit 22b9662313034e42c780a9d6ebcc1811d47d359b Author: Ingo Molnar Date: Fri Apr 11 07:40:56 2025 +0200 x86/alternatives: Standardize on 'tpl' local variable names for 'struct smp_text_poke_loc *' There's no toilet paper in this code. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-45-mingo@kernel.org commit 3e6f47573ec3ed1d9dc50243fbcf50c87f740853 Author: Ingo Molnar Date: Fri Apr 11 07:40:55 2025 +0200 x86/alternatives: Simplify and clean up patch_cmp() - No need to cast over to 'struct smp_text_poke_loc *', void * is just fine for a binary search, - Use the canonical (a, b) input parameter nomenclature of cmp_func_t functions and rename the input parameters from (tp, elt) to (tpl_a, tpl_b). Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-44-mingo@kernel.org commit 6af9540379628a769c63b0a101ff371d7719ec04 Author: Ingo Molnar Date: Fri Apr 11 07:40:54 2025 +0200 x86/alternatives: Constify text_poke_addr() This will also allow the simplification of patch_cmp(). Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-43-mingo@kernel.org commit 0e67e587e2e07be8d6775a1444e679c6afbc87f4 Author: Ingo Molnar Date: Fri Apr 11 07:40:53 2025 +0200 x86/alternatives: Simplify text_poke_addr_ordered() - Use direct 'void *' pointer comparison, there's no need to force the type to 'unsigned long'. - Remove the 'tp' local variable indirection Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-42-mingo@kernel.org commit 6e4955a9d73ebdc8496e6bff7f6d2bf83c01959f Author: Ingo Molnar Date: Fri Apr 11 07:40:52 2025 +0200 x86/alternatives: Rename 'text_poke_sync()' to 'smp_text_poke_sync_each_cpu()' Unlike sync_core(), text_poke_sync() is a very heavy operation, as it sends an IPI to every online CPU in the system and waits for completion. Reflect this in the name. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-41-mingo@kernel.org commit 7fbadb50d95a8bbc0de720e0857c77d4f13ddcaf Author: Ingo Molnar Date: Fri Apr 11 07:40:51 2025 +0200 x86/alternatives: Move text_poke_array completion from smp_text_poke_batch_finish() and smp_text_poke_batch_flush() to smp_text_poke_batch_process() Simplifies the code and improves code generation a bit: text data bss dec hex filename 14769 1017 4112 19898 4dba alternative.o.before 14742 1017 4112 19871 4d9f alternative.o.after Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-40-mingo@kernel.org commit cca3473956be6ca5c7ad5d2ced5516eb509c1936 Author: Ingo Molnar Date: Fri Apr 11 07:40:50 2025 +0200 x86/alternatives: Add documentation for smp_text_poke_batch_add() Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-39-mingo@kernel.org commit 9647ce465265720509f80f21f0b36c00bb0c0d18 Author: Ingo Molnar Date: Fri Apr 11 07:40:49 2025 +0200 x86/alternatives: Document 'smp_text_poke_single()' Extend the documentation to better describe its purpose. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-38-mingo@kernel.org commit 8a6a1b4e0ef15dab908a365588e06f23f9c0bad5 Author: Ingo Molnar Date: Fri Apr 11 07:40:48 2025 +0200 x86/alternatives: Remove the mixed-patching restriction on smp_text_poke_single() At this point smp_text_poke_single(addr, opcode, len, emulate) is equivalent to: smp_text_poke_batch_add(addr, opcode, len, emulate); smp_text_poke_batch_finish(); So remove the restriction on mixing single-instruction patching with multi-instruction patching. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-37-mingo@kernel.org commit 0e351aec2b0052d33d6e44ded622223043d4dcd5 Author: Ingo Molnar Date: Fri Apr 11 07:40:47 2025 +0200 x86/alternatives: Move the text_poke_array manipulation into text_poke_int3_loc_init() and rename it to __smp_text_poke_batch_add() This simplifies the code and code generation a bit: text data bss dec hex filename 14802 1029 4112 19943 4de7 alternative.o.before 14784 1029 4112 19925 4dd5 alternative.o.after Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-36-mingo@kernel.org commit 74e8e2bf950e8deb0965583e2130f0fb5a705085 Author: Ingo Molnar Date: Fri Apr 11 07:40:45 2025 +0200 x86/alternatives: Simplify smp_text_poke_batch_process() This function is now using the text_poke_array state exclusively, make that explicit by removing the redundant input parameters. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-34-mingo@kernel.org commit 8e35752f0c334ee3eb2bf075ac0bdb243ad25fac Author: Ingo Molnar Date: Fri Apr 11 07:40:44 2025 +0200 x86/alternatives: Simplify smp_text_poke_int3_handler() Remove the 'desc' local variable indirection and use text_poke_array directly. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-33-mingo@kernel.org commit b6a25841c171c42b02d316a6bf784fb32e39c786 Author: Ingo Molnar Date: Fri Apr 11 07:40:43 2025 +0200 x86/alternatives: Simplify try_get_text_poke_array() There's no need to return a pointer on success - it's always the same pointer. Return a bool instead. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-32-mingo@kernel.org commit 3916eec5160dd42c8409c2032149470a474cb5f2 Author: Ingo Molnar Date: Fri Apr 11 07:40:42 2025 +0200 x86/alternatives: Rename 'put_desc()' to 'put_text_poke_array()' Just like with try_get_text_poke_array(), this name better reflects what the underlying code is doing, there's no 'descriptor' indirection anymore. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-31-mingo@kernel.org commit 46f3d9d329dec169c54a3b5b48deb1ba258689fc Author: Ingo Molnar Date: Fri Apr 11 07:40:41 2025 +0200 x86/alternatives: Rename 'try_get_desc()' to 'try_get_text_poke_array()' This better reflects what the underlying code is doing, there's no 'descriptor' indirection anymore. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-30-mingo@kernel.org commit 0494b16b9caed22ff78adb84cedb7460532eb3f0 Author: Ingo Molnar Date: Fri Apr 11 07:40:40 2025 +0200 x86/alternatives: Remove the tp_vec indirection At this point we are always working out of an uptodate text_poke_array, there's no need for smp_text_poke_int3_handler() to read via the int3_vec indirection - remove it. This simplifies the code: 1 file changed, 5 insertions(+), 15 deletions(-) Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-29-mingo@kernel.org commit 6e7dc03aeeb52fb0147c03377e4f44fea780ef53 Author: Ingo Molnar Date: Fri Apr 11 07:40:39 2025 +0200 x86/alternatives: Introduce 'struct smp_text_poke_array' and move tp_vec and tp_vec_nr to it struct text_poke_array is an equivalent structure to these global variables: static struct smp_text_poke_loc tp_vec[TP_VEC_MAX]; static int tp_vec_nr; Note that we intentionally mirror much of the naming of 'struct text_poke_int3_vec', which will further highlight the unecessary layering going on in this code, and will ease its removal. No change in functionality. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-28-mingo@kernel.org commit 37725b64a9912292841cea7e9aebfd0f084ed8c0 Author: Ingo Molnar Date: Fri Apr 11 07:40:38 2025 +0200 x86/alternatives: Assert input parameters in smp_text_poke_batch_process() At this point the 'tp' input parameter must always be the global 'tp_vec' array, and 'nr_entries' must always be equal to 'tp_vec_nr'. Assert these conditions - which will allow the removal of a layer of indirection between these values. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-27-mingo@kernel.org commit 476ad071c678d70623cdb14fadd21818f64cc45b Author: Ingo Molnar Date: Fri Apr 11 07:40:37 2025 +0200 x86/alternatives: Assert that smp_text_poke_int3_handler() can only ever handle 'tp_vec[]' based requests Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-26-mingo@kernel.org commit c8976ade0c1b4c0629b8a080d712ff402e8343b3 Author: Ingo Molnar Date: Fri Apr 11 07:40:36 2025 +0200 x86/alternatives: Simplify smp_text_poke_single() by using tp_vec and existing APIs Instead of constructing a vector on-stack, just use the already available batch-patching vector - which should always be empty at this point. This will allow subsequent simplifications. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-25-mingo@kernel.org commit eaa24c9177c8c765ec9b9ccab392ac07ae8acda0 Author: Ingo Molnar Date: Fri Apr 11 07:40:35 2025 +0200 x86/alternatives: Remove the 'addr == NULL means forced-flush' hack from smp_text_poke_batch_finish()/smp_text_poke_batch_flush()/text_poke_addr_ordered() There's this weird hack used by smp_text_poke_batch_finish() to indicate a 'forced flush': smp_text_poke_batch_flush(NULL); Just open-code the vector-flush in a straightforward fashion: smp_text_poke_batch_process(tp_vec, tp_vec_nr); tp_vec_nr = 0; And get rid of !addr hack from text_poke_addr_ordered(). Leave a WARN_ON_ONCE(), just in case some external code learned to rely on this behavior. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-24-mingo@kernel.org commit 2d0cf10a1eb60deded109c2357326a5ca44e3845 Author: Ingo Molnar Date: Fri Apr 11 07:40:34 2025 +0200 x86/alternatives: Use non-inverted logic instead of 'tp_order_fail()' tp_order_fail() uses inverted logic: it returns true in case something is false, which is only a plus at the IOCCC. Instead rename it to regular parity as 'text_poke_addr_ordered()', and adjust the code accordingly. Also add a comment explaining how the address ordering should be understood. No change in functionality intended. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-23-mingo@kernel.org commit 87836af1eafc6616bde680be556f49ba3325f798 Author: Ingo Molnar Date: Fri Apr 11 07:40:33 2025 +0200 x86/alternatives: Add text_mutex) assert to smp_text_poke_batch_flush() It's possible to escape the text_mutex-held assert in smp_text_poke_batch_process() if the caller uses a properly batched and sorted series of patch requests, so add an explicit lockdep_assert_held() to make sure it's held by all callers. All text_poke_int3_*() APIs will call either smp_text_poke_batch_process() or smp_text_poke_batch_flush() internally. The text_mutex must be held, because tp_vec and tp_vec_nr et al are all globals, and the INT3 patching machinery itself relies on external serialization. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-22-mingo@kernel.org commit 3bd7546ff24ecf9dbd74adf92b843eebd2862d1c Author: Ingo Molnar Date: Fri Apr 11 07:40:32 2025 +0200 x86/alternatives: Rename 'int3_desc' to 'int3_vec' Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-21-mingo@kernel.org commit a81d43c46e6e89fef1961147c5f3faca31f6b84e Author: Ingo Molnar Date: Fri Apr 11 07:40:30 2025 +0200 x86/alternatives: Rename 'struct text_poke_loc' to 'struct smp_text_poke_loc' Make it clear that this structure is part of the INT3 based SMP patching facility, not the regular text_poke*() MM-switch based facility. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-19-mingo@kernel.org commit fb802d639340d041e32d48057c7f15175a57c2de Author: Ingo Molnar Date: Fri Apr 11 07:40:29 2025 +0200 x86/alternatives: Rename 'text_poke_loc_init()' to 'text_poke_int3_loc_init()' This name is actively confusing as well, because the simple text_poke*() APIs use MM-switching based code patching, while text_poke_loc_init() is part of the INT3 based text_poke_int3_*() machinery that is an additional layer of functionality on top of regular text_poke*() functionality. Rename it to text_poke_int3_loc_init() to make it clear which layer it belongs to. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-18-mingo@kernel.org commit 732c7c33a0c17f68393497766445cbd2878ee95e Author: Ingo Molnar Date: Fri Apr 11 07:40:28 2025 +0200 x86/alternatives: Rename 'text_poke_queue()' to 'smp_text_poke_batch_add()' This name is actively confusing as well, because the simple text_poke*() APIs use MM-switching based code patching, while text_poke_queue() is part of the INT3 based text_poke_int3_*() machinery that is an additional layer of functionality on top of regular text_poke*() functionality. Rename it to smp_text_poke_batch_add() to make it clear which layer it belongs to. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-17-mingo@kernel.org commit e8d7b8c2bbcd5e50c93902af4ba53029fc0497fc Author: Ingo Molnar Date: Fri Apr 11 07:40:27 2025 +0200 x86/alternatives: Rename 'text_poke_finish()' to 'smp_text_poke_batch_finish()' This name is actively confusing as well, because the simple text_poke*() APIs use MM-switching based code patching, while text_poke_finish() is part of the INT3 based text_poke_int3_*() machinery that is an additional layer of functionality on top of regular text_poke*() functionality. Rename it to smp_text_poke_batch_finish() to make it clear which layer it belongs to. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-16-mingo@kernel.org commit aedb60c2c66c82be7cceb89e2b1a0d491bb7ca2f Author: Ingo Molnar Date: Fri Apr 11 07:40:26 2025 +0200 x86/alternatives: Rename 'text_poke_flush()' to 'smp_text_poke_batch_flush()' This name is actually actively confusing, because the simple text_poke*() APIs use MM-switching based code patching, while text_poke_flush() is part of the INT3 based text_poke_int3_*() machinery that is an additional layer of functionality on top of regular text_poke*() functionality. Rename it to smp_text_poke_batch_flush() to make it clear which layer it belongs to. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-15-mingo@kernel.org commit f5afa2e8efda592ecc69cea7528ff660ac1d8096 Author: Ingo Molnar Date: Fri Apr 11 07:40:25 2025 +0200 x86/alternatives: Remove the confusing, inaccurate & unnecessary 'temp_mm_state_t' abstraction So the temp_mm_state_t abstraction used by use_temporary_mm() and unuse_temporary_mm() is super confusing: - The whole machinery is about temporarily switching to the text_poke_mm utility MM that got allocated during bootup for text-patching purposes alone: temp_mm_state_t prev; /* * Loading the temporary mm behaves as a compiler barrier, which * guarantees that the PTE will be set at the time memcpy() is done. */ prev = use_temporary_mm(text_poke_mm); - Yet the value that gets saved in the temp_mm_state_t variable is not the temporary MM ... but the previous MM... - Ie. we temporarily put the non-temporary MM into a variable that has the temp_mm_state_t type. This makes no sense whatsoever. - The confusion continues in unuse_temporary_mm(): static inline void unuse_temporary_mm(temp_mm_state_t prev_state) Here we unuse an MM that is ... not the temporary MM, but the previous MM. :-/ Fix up all this confusion by removing the unnecessary layer of abstraction and using a bog-standard 'struct mm_struct *prev_mm' variable to save the MM to. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-14-mingo@kernel.org commit 5224f09a7b57fcf2024245d89dcb26b0756fb1c8 Author: Ingo Molnar Date: Fri Apr 11 07:40:24 2025 +0200 x86/alternatives: Update comments in int3_emulate_push() The idtentry macro in entry_64.S hasn't had a create_gap option for 5 years - update the comment. (Also clean up the entire comment block while at it.) Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-13-mingo@kernel.org commit 762255b743b81c5307c0e93b2eeee4e8b7424152 Author: Ingo Molnar Date: Fri Apr 11 07:40:23 2025 +0200 x86/alternatives: Remove duplicate 'text_poke_early()' prototype It's declared in already. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-12-mingo@kernel.org commit e84c31b9c9ac75ceaa2597bce021c529e76edd26 Author: Ingo Molnar Date: Fri Apr 11 07:40:22 2025 +0200 x86/alternatives: Rename 'bp_desc' to 'int3_desc' Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-11-mingo@kernel.org commit da364fc547897ed98fbf2192d86b5242439d7762 Author: Ingo Molnar Date: Fri Apr 11 07:40:21 2025 +0200 x86/alternatives: Rename 'poking_addr' to 'text_poke_mm_addr' Put it into the text_poke_* namespace of . Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-10-mingo@kernel.org commit a5c832e0476e461af46a0aa9bda43a573adbe63f Author: Ingo Molnar Date: Fri Apr 11 07:40:20 2025 +0200 x86/alternatives: Rename 'poking_mm' to 'text_poke_mm' Put it into the text_poke_* namespace of . Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-9-mingo@kernel.org commit 5236b6a0fe921f5de53b8eeea2d8fdd6d643dd7f Author: Ingo Molnar Date: Fri Apr 11 07:40:19 2025 +0200 x86/alternatives: Rename 'poke_int3_handler()' to 'smp_text_poke_int3_handler()' All related functions in this subsystem already have a text_poke_int3_ prefix - add it to the trap handler as well. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-8-mingo@kernel.org commit 9586ae48e785b48b8dd25136c34c8d0e3e1d2cc8 Author: Ingo Molnar Date: Fri Apr 11 07:40:18 2025 +0200 x86/alternatives: Rename 'text_poke_bp()' to 'smp_text_poke_single()' Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-7-mingo@kernel.org commit bee4fcfbc128c3ad604539f88307dc2c0fc6f843 Author: Ingo Molnar Date: Fri Apr 11 07:40:17 2025 +0200 x86/alternatives: Rename 'text_poke_bp_batch()' to 'smp_text_poke_batch_process()' Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-6-mingo@kernel.org commit 28fb79092d9f7db3397e886d637d3006551693b3 Author: Ingo Molnar Date: Fri Apr 11 07:40:16 2025 +0200 x86/alternatives: Rename 'bp_refs' to 'text_poke_array_refs' Make it clear that these reference counts lock access to text_poke_array. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-5-mingo@kernel.org commit 84e5ba949b0a3fcf2fd0a1b6c9ce14d8436dbbb8 Author: Ingo Molnar Date: Fri Apr 11 07:40:15 2025 +0200 x86/alternatives: Rename 'struct bp_patching_desc' to 'struct text_poke_int3_vec' Follow the INT3 text-poking nomenclature, and also adopt the 'vector' name for the entire object, instead of the rather opaque 'descriptor' naming. Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-4-mingo@kernel.org commit d60e4b2410e1b9f7c5ca347c78c6b07175c2e873 Author: Peter Zijlstra Date: Fri Apr 11 07:40:14 2025 +0200 x86/alternatives: Document the text_poke_bp_batch() synchronization rules a bit more Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Eric Dumazet Cc: Brian Gerst Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250411054105.2341982-3-mingo@kernel.org commit 4334336e769bea1351ab82b22b06118c81bd217f Author: Eric Dumazet Date: Fri Apr 11 07:40:13 2025 +0200 x86/alternatives: Improve code-patching scalability by removing false sharing in poke_int3_handler() eBPF programs can be run 50,000,000 times per second on busy servers. Whenever /proc/sys/kernel/bpf_stats_enabled is turned off, hundreds of calls sites are patched from text_poke_bp_batch() and we see a huge loss of performance due to false sharing on bp_desc.refs lasting up to three seconds. 51.30% server_bin [kernel.kallsyms] [k] poke_int3_handler | |--46.45%--poke_int3_handler | exc_int3 | asm_exc_int3 | | | |--24.26%--cls_bpf_classify | | tcf_classify | | __dev_queue_xmit | | ip6_finish_output2 | | ip6_output | | ip6_xmit | | inet6_csk_xmit | | __tcp_transmit_skb Fix this by replacing bp_desc.refs with a per-cpu bp_refs. Before the patch, on a host with 240 cores (480 threads): $ sysctl -wq kernel.bpf_stats_enabled=0 text_poke_bp_batch(nr_entries=164) : Took 2655300 usec $ bpftool prog | grep run_time_ns ... 105: sched_cls name hn_egress tag 699fc5eea64144e3 gpl run_time_ns 3009063719 run_cnt 82757845 : average cost is 36 nsec per call After this patch: $ sysctl -wq kernel.bpf_stats_enabled=0 text_poke_bp_batch(nr_entries=164) : Took 702 usec $ bpftool prog | grep run_time_ns ... 105: sched_cls name hn_egress tag 699fc5eea64144e3 gpl run_time_ns 1928223019 run_cnt 67682728 : average cost is 28 nsec per call Ie. text-patching performance improved 3700x: from 2.65 seconds to 0.0007 seconds. Since the atomic_cond_read_acquire(refs, !VAL) spin-loop was not triggered even once in my tests, add an unlikely() annotation, because this appears to be the common case. [ mingo: Improved the changelog some more. ] Signed-off-by: Eric Dumazet Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Brian Gerst Cc: Kees Cook Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250411054105.2341982-2-mingo@kernel.org commit 61499764e5cc5918c9f63026d3b7a34c8668d4b8 Author: Russell King (Oracle) Date: Mon Apr 7 20:15:35 2025 +0100 net: stmmac: stm32: simplify clock handling Some stm32 implementations need the receive clock running in suspend, as indicated by dwmac->ops->clk_rx_enable_in_suspend. The existing code achieved this in a rather complex way, by passing a flag around. However, the clk API prepare/enables are counted - which means that a clock won't be stopped as long as there are more prepare and enables than disables and unprepares, just like a reference count. Therefore, we can simplify this logic by calling clk_prepare_enable() an additional time in the probe function if this flag is set, and then balancing that at remove time. With this, we can avoid passing a "are we suspending" and "are we resuming" flag to various functions in the driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 20eb35da409fa60fa03ea828cd3d1d9c8a51e103 Author: Thorsten Blum Date: Thu Mar 20 13:44:51 2025 +0100 xfrm: Remove unnecessary strscpy_pad() size arguments If the destination buffer has a fixed length, strscpy_pad() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit sizeof() calls unnecessary - remove them. No functional changes intended. Signed-off-by: Thorsten Blum Signed-off-by: Steffen Klassert commit c72ede1c24be689733bcd2233a3a56f2478429c8 Author: Wolfram Sang Date: Wed Apr 2 23:04:46 2025 +0200 ARM: dts: at91: at91sam9263: fix NAND chip selects NAND did not work on my USB-A9263. I discovered that the offending commit converted the PIO bank for chip selects wrongly, so all A9263 boards need to be fixed. Fixes: 1004a2977bdc ("ARM: dts: at91: Switch to the new NAND bindings") Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250402210446.5972-2-wsa+renesas@sang-engineering.com Signed-off-by: Claudiu Beznea commit dc658570a2c683219545f5ac133bd2ac21ad0938 Author: Wolfram Sang Date: Wed Apr 2 22:48:54 2025 +0200 ARM: dts: at91: usb_a9g20: move wrong RTC node Only the LPW variant has the external RTC. Move it to that board specific DT. As a result, the common include for A9G20 boards can go now. Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250402204856.5197-5-wsa+renesas@sang-engineering.com Signed-off-by: Claudiu Beznea commit 3984cc0f79f5c03b65f3581f48c04cb5e1445c4b Author: Wolfram Sang Date: Wed Apr 2 22:48:53 2025 +0200 ARM: dts: at91: calao_usb: simplify chosen node All devices use equal parameters in 'chosen'. So, the memory node can be put into the most generic DTSI. Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250402204856.5197-4-wsa+renesas@sang-engineering.com [claudiu.beznea: s/can bet put/can be put/g in commit description] Signed-off-by: Claudiu Beznea commit 1477dd96e959c1a54546583fb395f0e4ed97d76a Author: Wolfram Sang Date: Wed Apr 2 22:48:52 2025 +0200 ARM: dts: at91: usb_a9260: use 'stdout-path' Do not use the kernel command line for specifying the default serial console. Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250402204856.5197-3-wsa+renesas@sang-engineering.com Signed-off-by: Claudiu Beznea commit 2b72d99c63dd39dc073422ca1f53a8f46a5c0331 Author: Wolfram Sang Date: Wed Apr 2 22:48:51 2025 +0200 ARM: dts: at91: calao_usb: simplify memory node All devices have 64MB RAM. So, the memory node can be put into the most generic DTSI. Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20250402204856.5197-2-wsa+renesas@sang-engineering.com [claudiu.beznea: s/can bet put/can be put/g in commit description] Signed-off-by: Claudiu Beznea commit 67ba341e57ab158423818ed33bfa1c40eb0e5e7e Author: Wolfram Sang Date: Fri Apr 4 13:27:43 2025 +0200 ARM: dts: at91: usb_a9263: fix GPIO for Dataflash chip select Dataflash did not work on my board. After checking schematics and using the proper GPIO, it works now. Also, make it active low to avoid: flash@0 enforce active low on GPIO handle Fixes: 2432d201468d ("ARM: at91: dt: usb-a9263: add dataflash support") Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250404112742.67416-2-wsa+renesas@sang-engineering.com Signed-off-by: Claudiu Beznea commit 6f7549bdb9868009873745439500a6fe15b8513e Author: Wolfram Sang Date: Thu Apr 3 08:43:37 2025 +0200 ARM: dts: at91: usb_a9g20: add SPI EEPROM Schematics and board layout indicate that versions with a dataflash instead of an EEPROM might exist. Let's handle that once we have hardware to test. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250403064336.4846-2-wsa+renesas@sang-engineering.com Signed-off-by: Claudiu Beznea commit 686b2730e4816e40e6a5432ff163993638397154 Author: Justin Chen Date: Wed Apr 2 11:51:59 2025 -0700 phy: usb: add support for bcm74110 bcm74110 adds a freerun utmi/ref clock that saves further power during suspend states. A tune is also necessary to pass USB compliance test. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20250402185159.2976920-3-justin.chen@broadcom.com Signed-off-by: Vinod Koul commit 0fbceff4f873500f0d0e632ee2d1e84e9a67b1b4 Author: Justin Chen Date: Wed Apr 2 11:51:58 2025 -0700 dt-bindings: phy: brcmstb-usb-phy: Add support for bcm74110 bcm74110 brcmstb usb phy adds further power savings during suspend states. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250402185159.2976920-2-justin.chen@broadcom.com Signed-off-by: Vinod Koul commit 6a9accd65608559c4e00ca5480e5d298bf329217 Author: Krzysztof Kozlowski Date: Fri Apr 4 14:13:26 2025 +0200 phy: samsung: Do not enable PHY_EXYNOS5_USBDRD by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250404121326.318936-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit be62baafc24105b3803fe7e09cfd23247588eb80 Author: Krzysztof Kozlowski Date: Fri Apr 4 14:13:25 2025 +0200 phy: marvell: Do not enable by default during compile testing Enabling the compile test should not cause automatic enabling of all drivers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250404121326.318936-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 1954629dc649b25071eec0d353288c5ee303e358 Author: Jani Nikula Date: Thu Apr 10 17:24:05 2025 +0300 drm/i915/debugfs: move PCH type to display caps Arguably PCH is more relevant to display. Move the information to display caps debugfs. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/a864b7a577ea7a3bd2435e9734e023593edbfd5a.1744295009.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1a5d935f8e5a8cb563a71786a4b1f41464457681 Author: Jani Nikula Date: Thu Apr 10 17:24:04 2025 +0300 drm/i915/debugfs: remove i915_display_capabilities Turns out we've added two similar debugfs files. Consolidate on intel_display_caps as it has more info and a driver independent name. IGT has already switched over to intel_display_caps in IGT commit cf837fc17d6c ("lib/dsc: use intel_display_caps instead of i915_display_capabilities"). Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/241c5886cf2e95c694a693bb1b1953f6ae15390e.1744295009.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0c49baf099ba2147a6ff3bbdc3197c6ddbee5469 Author: Heiner Kallweit Date: Wed Apr 9 21:14:47 2025 +0200 r8169: add helper rtl8125_phy_param The integrated PHY's of RTL8125/8126 have an own mechanism to access PHY parameters, similar to what r8168g_phy_param does on earlier PHY versions. Add helper rtl8125_phy_param to simplify the code. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/847b7356-12d6-441b-ade9-4b6e1539b84a@gmail.com Signed-off-by: Jakub Kicinski commit 8c40d99e5f43e0545a3f4fea9156313847e2eb79 Author: Heiner Kallweit Date: Wed Apr 9 21:05:37 2025 +0200 r8169: add helper rtl_csi_mod for accessing extended config space Add a helper for the Realtek-specific mechanism for accessing extended config space if native access isn't possible. This avoids code duplication. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/b368fd91-57d7-4cb5-9342-98b4d8fe9aea@gmail.com Signed-off-by: Jakub Kicinski commit 3b4f78f9ad292ad57e3db483332ce7bc799d0d49 Author: Zhengchao Shao Date: Wed Apr 9 11:33:21 2025 +0800 ipv4: remove unnecessary judgment in ip_route_output_key_hash_rcu In the ip_route_output_key_cash_rcu function, the input fl4 member saddr is first checked to be non-zero before entering multicast, broadcast and arbitrary IP address checks. However, the fact that the IP address is not 0 has already ruled out the possibility of any address, so remove unnecessary judgment. Signed-off-by: Zhengchao Shao Reviewed-by: David Ahern Link: https://patch.msgid.link/20250409033321.108244-1-shaozhengchao@163.com Signed-off-by: Jakub Kicinski commit dd4f33b471da719b5ff539616a0d4af1ca123272 Merge: 4145f00227ee80 54d790856c73d7 Author: Jakub Kicinski Date: Thu Apr 10 20:14:43 2025 -0700 Merge branch 'tools-ynl-c-basic-netlink-raw-support' Jakub Kicinski says: ==================== tools: ynl: c: basic netlink-raw support Basic support for netlink-raw AKA classic netlink in user space C codegen. This series is enough to read routes and addresses from the kernel (see the samples in patches 12 and 13). Specs need to be slightly adjusted and decorated with the c naming info. In terms of codegen this series includes just the basic plumbing required to skip genlmsghdr and handle request types which may technically also be legal in genetlink-legacy but are very uncommon there. Subsequent series will add support for: - handling CRUD-style notifications - code gen for array types classic netlink uses - sub-message support v1: https://lore.kernel.org/20250409000400.492371-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250410014658.782120-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 54d790856c73d71240835e7929235bdf710b57f4 Author: Jakub Kicinski Date: Wed Apr 9 18:46:58 2025 -0700 tools: ynl: generate code for rt-route and add a sample YNL C can now generate code for simple classic netlink families. Include rt-route in the Makefile for generation and add a sample. $ ./tools/net/ynl/samples/rt-route oif: wlp0s20f3 gateway: 192.168.1.1 oif: wlp0s20f3 dst: 192.168.1.0/24 oif: vpn0 dst: fe80::/64 oif: wlp0s20f3 dst: fe80::/64 oif: wlp0s20f3 gateway: fe80::200:5eff:fe00:201 Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-14-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 29d34a4d785bbf389d57bfdafe2a19dad6ced3a4 Author: Jakub Kicinski Date: Wed Apr 9 18:46:57 2025 -0700 tools: ynl: generate code for rt-addr and add a sample YNL C can now generate code for simple classic netlink families. Include rt-addr in the Makefile for generation and add a sample. $ ./tools/net/ynl/samples/rt-addr lo: 127.0.0.1 wlp0s20f3: 192.168.1.101 lo: :: wlp0s20f3: fe80::6385:be6:746e:8116 vpn0: fe80::3597:d353:b5a7:66dd Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-13-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 882e7b1365cedae2bb956e17a65bb697cde35e84 Author: Jakub Kicinski Date: Wed Apr 9 18:46:56 2025 -0700 tools: ynl-gen: use family c-name in notifications Family names may include dashes. Fix notification handling code gen to the c-compatible name. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-12-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e8025e72aad6d74504c4918c81b532e1fb219b91 Author: Jakub Kicinski Date: Wed Apr 9 18:46:55 2025 -0700 tools: ynl-gen: consider dump ops without a do "type-consistent" If the type for the response to do and dump are the same we don't generate it twice. This is called "type_consistent" in the generator. Consider operations which only have dump to also be consistent. This removes unnecessary "_dump" from the names. There's a number of GET ops in classic Netlink which only have dump handlers. Make sure we output the "onesided" types, normally if the type is consistent we only output it when we render the do structures. Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250410014658.782120-11-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7e8ba0c7de2b3a5b90bc591177a3926b8c0e022d Author: Jakub Kicinski Date: Wed Apr 9 18:46:54 2025 -0700 tools: ynl: don't use genlmsghdr in classic netlink Make sure the codegen calls the right YNL lib helper to start the request based on family type. Classic netlink request must not include the genl header. Conversely don't expect genl headers in the responses. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e0a7903c323f37a71dcdafafa749dfb3beedff3c Author: Jakub Kicinski Date: Wed Apr 9 18:46:53 2025 -0700 tools: ynl-gen: don't consider requests with fixed hdr empty C codegen skips generating the structs if request/reply has no attrs. In such cases the request op takes no argument and return int (rather than response struct). In case of classic netlink a lot of information gets passed using the fixed struct, however, so adjust the logic to consider a request empty only if it has no attrs _and_ no fixed struct. Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250410014658.782120-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 17b3ce292dcbf1aaface3d42859cff0e1dfd3bb6 Author: Jakub Kicinski Date: Wed Apr 9 18:46:52 2025 -0700 tools: ynl: support creating non-genl sockets Classic netlink has static family IDs specified in YAML, there is no family name -> ID lookup. Support providing the ID info to the library via the generated struct and make library use it. Since NETLINK_ROUTE is ID 0 we need an extra boolean to indicate classic_id is to be used. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1652e1f35dfb434862a595224ab2c4aa0244951f Author: Jakub Kicinski Date: Wed Apr 9 18:46:51 2025 -0700 netlink: specs: rt-route: add C naming info Add properties needed for C codegen to match names with uAPI headers. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 52d062362c05b17f86485ae206420140bbe0f649 Author: Jakub Kicinski Date: Wed Apr 9 18:46:50 2025 -0700 netlink: specs: rt-addr: add C naming info Add properties needed for C codegen to match names with uAPI headers. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 295ff1e9520185de63e747aec63949e54f883c2e Author: Jakub Kicinski Date: Wed Apr 9 18:46:49 2025 -0700 netlink: specs: rt-route: remove the fixed members from attrs The purpose of the attribute list is to list the attributes which will be included in a given message to shrink the objects for families with huge attr spaces. Fixed headers are always present in their entirety (between netlink header and the attrs) so there's no point in listing their members. Current C codegen doesn't expect them and tries to look them up in the attribute space. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d460016e7bca47b25951853c5f74c1632ccddb3b Author: Jakub Kicinski Date: Wed Apr 9 18:46:48 2025 -0700 netlink: specs: rt-addr: remove the fixed members from attrs The purpose of the attribute list is to list the attributes which will be included in a given message to shrink the objects for families with huge attr spaces. Fixed headers are always present in their entirety (between netlink header and the attrs) so there's no point in listing their members. Current C codegen doesn't expect them and tries to look them up in the attribute space. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 97a33caa90715f90b93610a1fc6e5deb4c21e8d4 Author: Jakub Kicinski Date: Wed Apr 9 18:46:47 2025 -0700 netlink: specs: rt-route: specify fixed-header at operations level The C codegen currently stores the fixed-header as part of family info, so it only supports one fixed-header type per spec. Luckily all rtm route message have the same fixed header so just move it up to the higher level. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cd5e64fb959a98e2d3122c7e944f17ffa6d0448e Author: Jakub Kicinski Date: Wed Apr 9 18:46:46 2025 -0700 netlink: specs: rename rtnetlink specs in accordance with family name The rtnetlink family names are set to rt-$name within the YAML but the files are called rt_$name. C codegen assumes that the generated file name will match the family. The use of dashes is in line with our general expectation that name properties in the spec use dashes not underscores (even tho, as Donald points out most genl families use underscores in the name). We have 3 un-ideal options to choose from: - accept the slight inconsistency with old families using _, or - accept the slight annoyance with all languages having to do s/-/_/ when looking up family ID, or - accept the inconsistency with all name properties in new YAML spec being separated with - and just the family name always using _. Pick option 1 and rename the rtnl spec files. Reviewed-by: Jacob Keller Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250410014658.782120-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4145f00227ee80f21ab274e9cd9c09758e9bcf3d Author: Krzysztof Hałasa Date: Tue Apr 8 13:59:41 2025 +0200 usbnet: asix AX88772: leave the carrier control to phylink ASIX AX88772B based USB 10/100 Ethernet adapter doesn't come up ("carrier off"), despite the built-in 100BASE-FX PHY positive link indication. The internal PHY is configured (using EEPROM) in fixed 100 Mbps full duplex mode. The primary problem appears to be using carrier_netif_{on,off}() while, at the same time, delegating carrier management to phylink. Use only the latter and remove "manual control" in the asix driver. I don't have any other AX88772 board here, but the problem doesn't seem specific to a particular board or settings - it's probably timing-dependent. Remove unused asix_adjust_link() as well. Signed-off-by: Krzysztof Hałasa Tested-by: Oleksij Rempel Link: https://patch.msgid.link/m3plhmdfte.fsf_-_@t19.piap.pl Signed-off-by: Jakub Kicinski commit 8127837aae8f63ec30fcba7f5afd4887f83111cd Merge: 82e401319b595b 0f08335ade7127 Author: Jakub Kicinski Date: Thu Apr 10 18:34:08 2025 -0700 Merge branch 'trace-add-tracepoint-for-tcp_sendmsg_locked' Breno Leitao says: ==================== trace: add tracepoint for tcp_sendmsg_locked() Meta has been using BPF programs to monitor tcp_sendmsg() for years, indicating significant interest in observing this important functionality. Adding a proper tracepoint provides a stable API for all users who need visibility into TCP message transmission. David Ahern is using a similar functionality with a custom patch[1]. So, this means we have more than a single use case for this request, and it might be a good idea to have such feature upstream. Link: https://lore.kernel.org/all/70168c8f-bf52-4279-b4c4-be64527aa1ac@kernel.org/ [1] v2: https://lore.kernel.org/20250407-tcpsendmsg-v2-0-9f0ea843ef99@debian.org v1: https://lore.kernel.org/20250224-tcpsendmsg-v1-1-bac043c59cc8@debian.org ==================== Link: https://patch.msgid.link/20250408-tcpsendmsg-v3-0-208b87064c28@debian.org Signed-off-by: Jakub Kicinski commit 0f08335ade71273f89d19412268b48b55f3e3726 Author: Breno Leitao Date: Tue Apr 8 11:32:02 2025 -0700 trace: tcp: Add tracepoint for tcp_sendmsg_locked() Add a tracepoint to monitor TCP send operations, enabling detailed visibility into TCP message transmission. Create a new tracepoint within the tcp_sendmsg_locked function, capturing traditional fields along with size_goal, which indicates the optimal data size for a single TCP segment. Additionally, a reference to the struct sock sk is passed, allowing direct access for BPF programs. The implementation is largely based on David's patch[1] and suggestions. Link: https://lore.kernel.org/all/70168c8f-bf52-4279-b4c4-be64527aa1ac@kernel.org/ [1] Signed-off-by: Breno Leitao Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250408-tcpsendmsg-v3-2-208b87064c28@debian.org Signed-off-by: Jakub Kicinski commit b1e904999542ad6764eafa54545f1c55776006d1 Author: Breno Leitao Date: Tue Apr 8 11:32:01 2025 -0700 net: pass const to msg_data_left() The msg_data_left() function doesn't modify the struct msghdr parameter, so mark it as const. This allows the function to be used with const references, improving type safety and making the API more flexible. Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250408-tcpsendmsg-v3-1-208b87064c28@debian.org Signed-off-by: Jakub Kicinski commit 82e401319b595bd9843cd7a46d035c00894cfe73 Merge: c1e0100c6aa5ee 34e816acdb0db3 Author: Jakub Kicinski Date: Thu Apr 10 18:31:56 2025 -0700 Merge branch 'net-stmmac-stmmac_pltfr_find_clk' Russell King says: ==================== net: stmmac: stmmac_pltfr_find_clk() The GBETH glue driver that is being proposed duplicates the clock finding from the bulk clock data in the stmmac platform data structure. iLet's provide a generic implementation that glue drivers can use, and convert dwc-qos-eth to use it. ==================== Link: https://patch.msgid.link/Z_Yn3dJjzcOi32uU@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 34e816acdb0db36054e26211f859129259816902 Author: Russell King (Oracle) Date: Wed Apr 9 09:02:25 2025 +0100 net: stmmac: dwc-qos: use stmmac_pltfr_find_clk() Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1u2QO9-001Rp8-Ii@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit de64872019492e4a84ee053e635cdf8f63f853d2 Author: Russell King (Oracle) Date: Wed Apr 9 09:02:20 2025 +0100 net: stmmac: provide stmmac_pltfr_find_clk() Provide a generic way to find a clock in the bulk data. Reviewed-by: Lad Prabhakar Tested-by: Lad Prabhakar Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1u2QO4-001Rp2-Dy@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit c1e0100c6aa5ee5cf773cb00355309e79b2fac1b Merge: 709894c52c1caf c449d5f3a3d70b Author: Jakub Kicinski Date: Thu Apr 10 18:29:27 2025 -0700 Merge branch 'tcp-add-a-new-tw_paws-drop-reason' Jiayuan Chen says: ==================== tcp: add a new TW_PAWS drop reason Devices in the networking path, such as firewalls, NATs, or routers, which can perform SNAT or DNAT, use addresses from their own limited address pools to masquerade the source address during forwarding, causing PAWS verification to fail more easily under TW status. Currently, packet loss statistics for PAWS can only be viewed through MIB, which is a global metric and cannot be precisely obtained through tracing to get the specific 4-tuple of the dropped packet. In the past, we had to use kprobe ret to retrieve relevant skb information from tcp_timewait_state_process(). We add a drop_reason pointer and a new counter. I didn't provide a packetdrill script. I struggled for a long time to get packetdrill to fix the client port, but ultimately failed to do so... Instead, I wrote my own program to trigger PAWS, which can be found at https://github.com/mrpre/nettrigger/tree/main ''' //assume nginx running on 172.31.75.114:9999, current host is 172.31.75.115 iptables -t filter -I OUTPUT -p tcp --sport 12345 --tcp-flags RST RST -j DROP ./nettrigger -i eth0 -s 172.31.75.115:12345 -d 172.31.75.114:9999 -action paws ''' v2: https://lore.kernel.org/5cdc1bdd9caee92a6ae932638a862fd5c67630e8@linux.dev v3: https://lore.kernel.org/20250407140001.13886-1-jiayuan.chen@linux.dev ==================== Link: https://patch.msgid.link/20250409112614.16153-1-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski commit c449d5f3a3d70b6223af8df2cadca3ca6eacb613 Author: Jiayuan Chen Date: Wed Apr 9 19:26:05 2025 +0800 tcp: add LINUX_MIB_PAWS_TW_REJECTED counter When TCP is in TIME_WAIT state, PAWS verification uses LINUX_PAWSESTABREJECTED, which is ambiguous and cannot be distinguished from other PAWS verification processes. We added a new counter, like the existing PAWS_OLD_ACK one. Also we update the doc with previously missing PAWS_OLD_ACK. usage: ''' nstat -az | grep PAWSTimewait TcpExtPAWSTimewait 1 0.0 ''' Suggested-by: Eric Dumazet Signed-off-by: Jiayuan Chen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250409112614.16153-3-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski commit 04271411121a58d37f47b065bc872f333274bf1f Author: Jiayuan Chen Date: Wed Apr 9 19:26:04 2025 +0800 tcp: add TCP_RFC7323_TW_PAWS drop reason Devices in the networking path, such as firewalls, NATs, or routers, which can perform SNAT or DNAT, use addresses from their own limited address pools to masquerade the source address during forwarding, causing PAWS verification to fail more easily. Currently, packet loss statistics for PAWS can only be viewed through MIB, which is a global metric and cannot be precisely obtained through tracing to get the specific 4-tuple of the dropped packet. In the past, we had to use kprobe ret to retrieve relevant skb information from tcp_timewait_state_process(). We add a drop_reason pointer, similar to what previous commit does: commit e34100c2ecbb ("tcp: add a drop_reason pointer to tcp_check_req()") This commit addresses the PAWSESTABREJECTED case and also sets the corresponding drop reason. We use 'pwru' to test. Before this commit: '''' ./pwru 'port 9999' 2025/04/07 13:40:19 Listening for events.. TUPLE FUNC 172.31.75.115:12345->172.31.75.114:9999(tcp) sk_skb_reason_drop(SKB_DROP_REASON_NOT_SPECIFIED) ''' After this commit: ''' ./pwru 'port 9999' 2025/04/07 13:51:34 Listening for events.. TUPLE FUNC 172.31.75.115:12345->172.31.75.114:9999(tcp) sk_skb_reason_drop(SKB_DROP_REASON_TCP_RFC7323_TW_PAWS) ''' Suggested-by: Eric Dumazet Signed-off-by: Jiayuan Chen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250409112614.16153-2-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski commit 7397daf1029d5bfd3415ec8622f5179603d5702d Author: Andreas Kemnade Date: Mon Mar 31 16:44:39 2025 +0200 ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4 The late init call just writes to omap4 registers as soon as CONFIG_MFD_CPCAP is enabled without checking whether the cpcap driver is actually there or the SoC is indeed an OMAP4. Rather do these things only with the right device combination. Fixes booting the BT200 with said configuration enabled and non-factory X-Loader and probably also some surprising behavior on other devices. Fixes: c145649bf262 ("ARM: OMAP2+: Configure voltage controller for cpcap to low-speed") CC: stable@vger.kernel.org Signed-off-by: Andreas Kemnade Reivewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20250331144439.769697-1-andreas@kemnade.info Signed-off-by: Kevin Hilman commit 614665105d12f5a669be018ed8a2d2f3db4006b2 Author: David Heidelberg Date: Thu Feb 13 21:32:03 2025 +0100 ARM: dts: nokia n900: remove useless io-channel-cells property This property is irrelevant for the ad5820 DAC, the driver nor the hardware indicate use of channel cells. Fixes: d510d12f26f4 ("ARM: dts: nokia n900: update dts with camera support") Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20250213203208.93316-1-david@ixit.cz Signed-off-by: Kevin Hilman commit ce424c3051ded73bc3e07eb90e12a9588b7dc6da Author: Andreas Kemnade Date: Fri Feb 28 12:27:50 2025 +0100 ARM: omap2plus_defconfig: enable I2C devices of GTA04 Enable I2C devices of GTA04 to get better test coverage when using the defconfig. Until the I2C host driver is fixed, BMG160 module should be blacklisted when booting on the GTA04A5. Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20250228112750.367251-1-andreas@kemnade.info Signed-off-by: Kevin Hilman commit 36305857b1ead8f6ca033a913162ebc09bee0b43 Author: Alexander Sverdlin Date: Tue Apr 1 11:06:34 2025 +0200 Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first" This reverts commit 4700a00755fb5a4bb5109128297d6fd2d1272ee6. It breaks target-module@2b300050 ("ti,sysc-omap2") probe on AM62x in a case when minimally-configured system tries to network-boot: [ 6.888776] probe of 2b300050.target-module returned 517 after 258 usecs [ 17.129637] probe of 2b300050.target-module returned 517 after 708 usecs [ 17.137397] platform 2b300050.target-module: deferred probe pending: (reason unknown) [ 26.878471] Waiting up to 100 more seconds for network. There are minimal configurations possible when the deferred device is not being probed any more (because everything else has been successfully probed) and deferral lists are not processed any more. Stable mmc enumeration can be achieved by filling /aliases node properly (4700a00755fb commit's rationale). After revert: [ 9.006816] IP-Config: Complete: [ 9.010058] device=lan0, ... Tested-by: Andreas Kemnade # GTA04, Panda, BT200 Reviewed-by: Tony Lindgren Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20250401090643.2776793-1-alexander.sverdlin@siemens.com Signed-off-by: Kevin Hilman commit 709894c52c1cafa36fe2047ba5a0b83bdf398133 Author: Michal Luczaj Date: Wed Apr 9 14:50:58 2025 +0200 af_unix: Remove unix_unhash() Dummy unix_unhash() was introduced for sockmap in commit 94531cfcbe79 ("af_unix: Add unix_stream_proto for sockmap"), but there's no need to implement it anymore. ->unhash() is only called conditionally: in unix_shutdown() since commit d359902d5c35 ("af_unix: Fix NULL pointer bug in unix_shutdown"), and in BPF proto's sock_map_unhash() since commit 5b4a79ba65a1 ("bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself"). Remove it. Signed-off-by: Michal Luczaj Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250409-cleanup-drop-unix-unhash-v1-1-1659e5b8ee84@rbox.co Signed-off-by: Jakub Kicinski commit cb7103298d1c5d8f71aa79283b64ca01c30264c7 Merge: a9843689e2de1a ab59a8605604f7 Author: Jakub Kicinski Date: Thu Apr 10 16:49:17 2025 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.15-rc2). Conflict: Documentation/networking/netdevices.rst net/core/lock_debug.c 04efcee6ef8d ("net: hold instance lock during NETDEV_CHANGE") 03df156dd3a6 ("xdp: double protect netdev->xdp_flags with netdev->lock") No adjacent changes. Signed-off-by: Jakub Kicinski commit 80742a1aa26ea31a5c48da6f4da1d2e6ce6a2ab2 Author: Lucas De Marchi Date: Wed Apr 9 07:09:56 2025 -0700 drm/xe: Allow to drop vram resizing The default behavior if the LMEMBAR doesn't match the maximum possible size is to try to resize it. However the user might want to keep, even for testing the behavior with small BAR, whatever size was set via sysfs. Change the module parameter to int and check for negative value. Cc: Michał Winiarski Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20250409-bar-resize-param-v1-1-75bf4df38aa0@intel.com Signed-off-by: Lucas De Marchi commit a63cafe241d2359ed364f3b04e09bafcbada22cc Author: Wentao Liang Date: Tue Mar 18 11:07:17 2025 +0800 pinctrl: at91: Add error handling for pinctrl_utils_add_map_mux() In atmel_pctl_dt_subnode_to_map(), the return value of pinctrl_utils_add_map_mux() needs to be checked, for the function will fail to associate group when the group map is full. Add error handling for pinctrl_utils_add_map_mux() to return immediately and propagate the error code to caller function when the function fails. Signed-off-by: Wentao Liang Link: https://lore.kernel.org/20250318030717.781-1-vulab@iscas.ac.cn Signed-off-by: Linus Walleij commit 725648bcf28feddb2c25d752d11b5f5070b0a963 Author: John Harrison Date: Thu Apr 3 11:56:15 2025 -0700 drm/xe/guc: Bump the recommended GuC version to 70.44.1 A new workaround requires a newer GuC version. So, recommend that users install it. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20250403185619.1555853-6-John.C.Harrison@Intel.com Signed-off-by: Lucas De Marchi commit d3e8349edf7ed9eaf076ab3d9973331ccc20e26c Author: John Harrison Date: Thu Apr 3 11:56:11 2025 -0700 drm/xe/guc: Enable w/a 16026508708 The workaround is only relevant to SRIOV but does affect all platforms. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20250403185619.1555853-2-John.C.Harrison@Intel.com Signed-off-by: Lucas De Marchi commit 5f40eef1c734042548f491e35acab1a2e4d867e1 Author: Thomas Weißschuh Date: Mon Mar 24 23:01:28 2025 +0100 selftests/nolibc: drop unnecessary sys/io.h include The include of sys/io.h is not necessary anymore since commit 67eb617a8e1e ("selftests/nolibc: simplify call to ioperm"). It's existence is also problematic as the header does not exist on all architectures. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250324-nolibc-ioperm-v1-1-8a7cfb2876ae@weissschuh.net commit 6c161732ea6467c6dea0c35810ca8e8d1ae135f1 Author: Lizhi Hou Date: Wed Apr 9 14:00:13 2025 -0700 accel/amdxdna: Fix incorrect size of ERT_START_NPU commands When multiple ERT_START_NPU commands are combined in one buffer, the buffer size calculation is incorrect. Also, the condition to make sure the buffer size is not beyond 4K is also fixed. Fixes: aac243092b70 ("accel/amdxdna: Add command execution") Reviewed-by: Jacek Lawrynowicz Reviewed-by: Maciej Falkowski Signed-off-by: Lizhi Hou Link: https://lore.kernel.org/r/20250409210013.10854-1-lizhi.hou@amd.com commit 64553c7913b7fec228bf5928bddba003e4a69894 Author: Ville Syrjälä Date: Wed Apr 2 20:17:20 2025 +0300 drm/i915: Simplify combo PLL frac w/a We are applying the combo PLL frac w/a to all TGL+ platforms, except RKL. I *think* all RKL machines use a 24 MHz refclk (certainly all machines in our CI do) and so technically never need the adjustment. But let's assume the hardware is exactly the same anyway and simplify the code by applying the w/a to all TGL+ platforms. v2: Keep the 38.4 MHz check Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250402171720.9350-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit efaa1177c31be89483dfd3919348b3535f602b5e Author: Ville Syrjälä Date: Tue Apr 1 19:37:49 2025 +0300 drm/i915: Apply the combo PLL frac w/a on DG1 DG1 apparently needs the combo PLL fractional divider w/a with 38.4 MHz refclk as well. This isn't listed in bspec, but looking at the hsd it looks like it was possibly just missed due to no one having a DG1 around at the time. This gives us slightly more accurate clocks on DG1. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250401163752.6412-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit ab734b43c81f8696bf89ff11b6c29a3dd884030a Merge: 0f681b0ecd190f 4b302092553c20 Author: Martin KaFai Lau Date: Thu Apr 10 09:52:21 2025 -0700 Merge branch 'selftests-xsk-add-tests-for-xdp-tail-adjustment-in-af_xdp' Tushar Vyavahare says: ==================== selftests/xsk: Add tests for XDP tail adjustment in AF_XDP This patch series adds tests to validate the XDP tail adjustment functionality, focusing on its use within the AF_XDP context. The tests verify dynamic packet size manipulation using the bpf_xdp_adjust_tail() helper function, covering both single and multi-buffer scenarios. v1 -> v2: 1. Retain and extend stream replacement: Keep `pkt_stream_replace` unchanged. Add `pkt_stream_replace_ifobject` for targeted ifobject handling. 2. Consolidate patches: Merge patches 2 to 6 for tail adjustment tests and check. v2 -> v3: 1. Introduce `adjust_value` to replace `count` for clearer communication with userspace. v3 -> v4: 1. Remove `testapp_adjust_tail_common()`. [Maciej] 2. Add comments and modify code for buffer resizing logic in test cases (shrink/grow by specific byte sizes for testing purposes). [Maciej] ==================== Link: https://patch.msgid.link/20250410033116.173617-1-tushar.vyavahare@intel.com Signed-off-by: Martin KaFai Lau commit 4b302092553c204599d02a97a10f5b9b70f2c0a0 Author: Tushar Vyavahare Date: Thu Apr 10 03:31:16 2025 +0000 selftests/xsk: Add tail adjustment tests and support check Introduce tail adjustment functionality in xskxceiver using bpf_xdp_adjust_tail(). Add `xsk_xdp_adjust_tail` to modify packet sizes and drop unmodified packets. Implement `is_adjust_tail_supported` to check helper availability. Develop packet resizing tests, including shrinking and growing scenarios, with functions for both single-buffer and multi-buffer cases. Update the test framework to handle various scenarios and adjust MTU settings. These changes enhance the testing of packet tail adjustments, improving AF_XDP framework reliability. Reviewed-by: Maciej Fijalkowski Signed-off-by: Tushar Vyavahare Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250410033116.173617-3-tushar.vyavahare@intel.com commit 3e730fe2af867d49b8c0eed65fe824079f7f377a Author: Tushar Vyavahare Date: Thu Apr 10 03:31:15 2025 +0000 selftests/xsk: Add packet stream replacement function Add pkt_stream_replace_ifobject function to replace the packet stream for a given ifobject. Enable separate TX and RX packet replacement, allowing RX side packet length adjustments using bpf_xdp_adjust_tail() in the upcoming patch. Currently, pkt_stream_replace() works on both TX and RX packet streams, and this new function provides the ability to modify one of them. Reviewed-by: Maciej Fijalkowski Signed-off-by: Tushar Vyavahare Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250410033116.173617-2-tushar.vyavahare@intel.com commit c180b00366d99911f4573dca5ac97a8633f2e8f9 Author: Antonin Godard Date: Tue Mar 18 08:58:29 2025 +0100 drm/panel: simple: Add NLT NL13676BC25-03F panel entry Add support for the NLT NL13676BC25-03F 15.6" LCD-TFT LVDS panel. Signed-off-by: Antonin Godard Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20250318-b4-add-nlt-nl13676bc25-03f-v1-2-67e0f8cf2e6f@bootlin.com Signed-off-by: Louis Chauvet commit b82f66c76b8e3d9cabc06a68c8e0401e3f96fecf Author: Antonin Godard Date: Tue Mar 18 08:58:28 2025 +0100 dt-bindings: display: simple: Add NLT NL13676BC25-03F panel Add NLT NL13676BC25-03F 15.6" LCD-TFT LVDS panel compatible string. Signed-off-by: Antonin Godard Acked-by: Krzysztof Kozlowski Link: https://patchwork.freedesktop.org/patch/msgid/20250318-b4-add-nlt-nl13676bc25-03f-v1-1-67e0f8cf2e6f@bootlin.com Signed-off-by: Louis Chauvet commit 74a70e80daa993445a8f0be817f8152a3b9d3b41 Author: Heiner Kallweit Date: Wed Apr 9 22:43:10 2025 +0200 PCI: Remove pci_fixup_cardbus() Since 1c7f4fe86f17 ("powerpc/pci: Remove pcibios_setup_bus_devices()") there's no architecture left setting pci_fixup_cardbus. Therefore remove support from PCI core. Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/8de7da4c-2b16-4ee1-8c42-0d04f3c821c6@gmail.com commit e396dd85172c6098e3b70b17e91424edc7bb2d8f Author: Stefano Garzarella Date: Thu Apr 10 15:51:16 2025 +0200 x86/sev: Register tpm-svsm platform device SNP platform can provide a vTPM device emulated by SVSM. The "tpm-svsm" device can be handled by the platform driver registered by the x86/sev core code. Register the platform device only when SVSM is available and it supports vTPM commands as checked by snp_svsm_vtpm_probe(). [ bp: Massage commit message. ] Signed-off-by: Stefano Garzarella Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20250410135118.133240-5-sgarzare@redhat.com commit 93b7c6b3ce918c3d24de82dcff7a87b8bd631b2e Author: Stefano Garzarella Date: Thu Apr 10 15:51:15 2025 +0200 tpm: Add SNP SVSM vTPM driver Add driver for the vTPM defined by the AMD SVSM spec [1]. The specification defines a protocol that a SEV-SNP guest OS can use to discover and talk to a vTPM emulated by the Secure VM Service Module (SVSM) in the guest context, but at a more privileged level (VMPL0). The new tpm-svsm platform driver uses API exposed by the x86/sev core implementation interface to a SVSM to send commands and receive responses. The device cannot be hot-plugged/unplugged as it is emulated by the platform, so module_platform_driver_probe() can be used. The device will be registered by the platform only when it's available, so the probe function just needs to setup the tpm_chip. This device does not support interrupts and sends responses to commands synchronously. In order to have .recv() called just after .send() in tpm_try_transmit(), the .status() callback is not implemented as recently supported by commit 980a573621ea ("tpm: Make chip->{status,cancel,req_canceled} opt"). [1] "Secure VM Service Module for SEV-SNP Guests" Publication # 58019 Revision: 1.00 [ bp: Massage commit message. ] Signed-off-by: Stefano Garzarella Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20250410135118.133240-4-sgarzare@redhat.com commit b2849b0723668ae3e0739b2c9c066eafe8bc0961 Author: Stefano Garzarella Date: Thu Apr 3 12:09:40 2025 +0200 svsm: Add header with SVSM_VTPM_CMD helpers Add helpers for the SVSM_VTPM_CMD calls used by the vTPM protocol defined by the AMD SVSM spec [1]. The vTPM protocol follows the Official TPM 2.0 Reference Implementation (originally by Microsoft, now part of the TCG) simulator protocol. [1] "Secure VM Service Module for SEV-SNP Guests" Publication # 58019 Revision: 1.00 Co-developed-by: James Bottomley Signed-off-by: James Bottomley Co-developed-by: Claudio Carvalho Signed-off-by: Claudio Carvalho Signed-off-by: Stefano Garzarella Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20250403100943.120738-3-sgarzare@redhat.com commit 770de678bc281f6b0be339c29c1ad74dfb0e9325 Author: Stefano Garzarella Date: Thu Apr 3 12:09:39 2025 +0200 x86/sev: Add SVSM vTPM probe/send_command functions Add two new functions to probe and send commands to the SVSM vTPM. They leverage the two calls defined by the AMD SVSM specification [1] for the vTPM protocol: SVSM_VTPM_QUERY and SVSM_VTPM_CMD. Expose snp_svsm_vtpm_send_command() to be used by a TPM driver. [1] "Secure VM Service Module for SEV-SNP Guests" Publication # 58019 Revision: 1.00 [ bp: Some doc touchups. ] Co-developed-by: James Bottomley Signed-off-by: James Bottomley Co-developed-by: Claudio Carvalho Signed-off-by: Claudio Carvalho Signed-off-by: Stefano Garzarella Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20250403100943.120738-2-sgarzare@redhat.com commit 28cce24d6596a3d8a34689031f2a8a5ac918cde5 Author: Arnd Bergmann Date: Thu Apr 10 16:09:58 2025 +0200 regulator: adp5055: remove duplicate device table When building with -Wunused-const-variable, gcc points out an device table that is not referenced anywhere: drivers/regulator/adp5055-regulator.c:346:34: error: unused variable 'adp5055_dt_ids' [-Werror,-Wunused-const-variable] 346 | static const struct of_device_id adp5055_dt_ids[] = { | ^~~~~~~~~~~~~~ The contents are the same as the second table in that file, so just remove this copy. Fixes: 147b2a96f24e ("regulator: adp5055: Add driver for adp5055") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250410141006.866813-1-arnd@kernel.org Signed-off-by: Mark Brown commit 7a978d8fcf57b283cb8c88dd4c9431502bd36ea8 Author: Arnd Bergmann Date: Thu Apr 10 16:07:49 2025 +0200 spi: amd: add CONFIG_PCI dependency Without CONFIG_PCI, the module_pci_driver() macro is not defined: drivers/spi/spi-amd-pci.c:67:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] 67 | module_pci_driver(amd_spi_pci_driver); Fixes: b644c2776652 ("spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250410140809.812863-1-arnd@kernel.org Signed-off-by: Mark Brown commit ed4db69169121ffd9d5a4bcf4d7acd5856cb20cd Merge: e686365c041127 3f7b48efb79d91 Author: Mark Brown Date: Thu Apr 10 15:08:38 2025 +0100 spi: fsl-qspi: Fix double cleanup in probe error path Merge series from Kevin Hao : This patch series fixes double cleanup issues in the fsl-qspi probe error path and also simplifies the probe error handling using managed APIs. commit 9e0dd98654a528735d2b363d0dc73f7904108652 Author: Caleb James DeLisle Date: Sun Mar 30 17:02:57 2025 +0000 dt-bindings: vendor-prefixes: Add EcoNet Add the "econet" vendor prefix for SoC maker Signed-off-by: Caleb James DeLisle Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250330170306.2584136-2-cjd@cjdns.fr Signed-off-by: Rob Herring (Arm) commit e60363bcfbcef903ef30540776f254f8b53bb4c5 Author: Martin Blumenstingl Date: Sat Mar 29 20:07:12 2025 +0100 phy: amlogic: meson8b-usb2: Use the regmap_{clear,set}_bits helpers These require less code, reduce the chance of typos and overall make the intent clearer. No functional changes. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Reviewed-by: Anand Moon Link: https://lore.kernel.org/r/20250329190712.858349-3-martin.blumenstingl@googlemail.com Signed-off-by: Vinod Koul commit ff02c5a3df4852819d9ec218e5c8ae48eb02b101 Author: Martin Blumenstingl Date: Sat Mar 29 20:07:11 2025 +0100 phy: amlogic: meson8b-usb2: Use FIELD_PREP instead of _SHIFT macros This simplifies the code by re-using the FIELD_PREP helper. No functional changes inteded. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Reviewed-by: Anand Moon Link: https://lore.kernel.org/r/20250329190712.858349-2-martin.blumenstingl@googlemail.com Signed-off-by: Vinod Koul commit 1741189d843a1d5ef38538bc52a3760e2e46cb2e Author: Arnaldo Carvalho de Melo Date: Wed Apr 9 21:58:19 2025 -0300 perf ui browser hists: Set actions->thread before calling do_zoom_thread() In 7cecb7fe8388d5c3 ("perf hists: Move sort__has_comm into struct perf_hpp_list") it assumes that act->thread is set prior to calling do_zoom_thread(). This doesn't happen when we use ESC or the Left arrow key to Zoom out of a specific thread, making this operation not to work and we get stuck into the thread zoom. In 6422184b087ff435 ("perf hists browser: Simplify zooming code using pstack_peek()") it says no need to set actions->thread, and at that point that was true, but in 7cecb7fe8388d5c3 a actions->thread == NULL check was added before the zoom out of thread could kick in. We can zoom out using the alternative 't' thread zoom toggle hotkey to finally set actions->thread before calling do_zoom_thread() and zoom out, but lets also fix the ESC/Zoom out of thread case. Fixes: 7cecb7fe8388d5c3 ("perf hists: Move sort__has_comm into struct perf_hpp_list") Reported-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit fd889776df3b9e0187cf2048c2c5407c8a9c205e Author: Arnaldo Carvalho de Melo Date: Wed Apr 9 19:28:30 2025 -0300 perf ui browser hists: Simplify the routines that add entries to the popup menu Some don't need some args, ditch them, also struct popup_actions->evsel isn't needed as it is always obtainable from hists_to_evsel(browser->hists). This way we simplify debugging by reducing this needless complexity. Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_dkNDj9EPFwPqq1@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 92c48ec231e2e73356418bdece2b8af855cf85b2 Author: Arnaldo Carvalho de Melo Date: Wed Apr 9 16:02:43 2025 -0300 perf ui browser: Accept the left arrow key as a Zoom out if done on the first column In the past (like before 2015) we had the familiar workflow of using ENTER to get the menu and then zoom on a pid or DSO, kernel, etc and then use UP and DOWN to navigate further, etc, and then when wanting to go to the previous level, i.e. to Zoom out, use the LEFT arrow key. This way the right hand stays in the arrow keys block that is near the enter and we can go around real quickly. But then, when we started supporting horizontal scrolling by columns to support things like 'perf c2c report' that has lots of columns, we switched to using the LEFT key exclusively for that, horizontal scrolling, requiring the user to press 'm' to get a "context menu" that then would allow users to select the Zoom out operation. Ingo recently reported this as not intuitive, which is true, so lets overload the LEFT key with both meanings, by doing a Zoom out operation if the LEFT key is pressed when we're on the first column, but use it also for horizontal scrolling if it is pressed when the cursor is on column > 1. Reported-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit bf5ea13bae3515ff1b6481a87e33b3a13f68096c Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 19:22:09 2025 -0300 perf ui browser annotate: Don't show the source code view status initially To avoid initial clutter, and not to change the view users that are not interested in toggling the source code view, just show it when the user does the first toggle keypress (pressing 's'). I know that there are users that really disable the source code view by using: # perf config annotate.hide_src_code=yes Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit c6043d35c0f3eb5bcbeb6309e10c4ae33d203841 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 19:03:43 2025 -0300 perf ui browser annotate: Show in the title the source code view toggle Ingo reported that having a visual cue if the source code view is enabled will help in noticing a bug when no source is presented. Change the title scnprintf routine for the annotation browser to do that. More work is needed to have the capabilities of the existing disassemblers listed somehow and start using the fastest one but switch to another that provides features only made available by some particular one, like the first one, the objdump output parsing one. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 5e74ec5ccfbee4c512b5582aef8f6eceffdd850b Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:57:25 2025 -0300 perf ui browser map: Provide feedback on unhandled hotkeys Don't just eat unknown keys without providing visual feedback and instructions on how to see which ones are assigned. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 3ceca92c28df1bf0a06f0f9b99503446967b3b92 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:57:25 2025 -0300 perf ui browser hists: Provide feedback on unhandled hotkeys Don't just eat unknown keys without providing visual feedback and instructions on how to see which ones are assigned. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 62787c90b84994f32680c7931ff05dde3944f1ae Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:57:25 2025 -0300 perf ui browser header: Provide feedback on unhandled hotkeys Don't just eat unknown keys without providing visual feedback and instructions on how to see which ones are assigned. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6b76a42cc5ea312ff14bb0361117b68bb018cb8f Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:57:25 2025 -0300 perf ui browser annotate: Provide feedback on unhandled hotkeys Don't just eat unknown keys without providing visual feedback and instructions on how to see which ones are assigned. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 340376534d2b3a07a4dd3f773bf90af267a9adcf Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:57:25 2025 -0300 perf ui browser annotate-data: Provide feedback on unhandled hotkeys Don't just eat unknown keys without providing visual feedback and instructions on how to see which ones are assigned. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit e2fbc15124a38eb4eafbdb171b1eca4acc64174b Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:19:43 2025 -0300 perf ui browser: Add a warn on unhandled hotkey helper Will be used by the various browsers, looks like: ┌─Warning!───────────────────────────────────────────┐ 29.15 │ 3c: cmpl $0x3,(%rbx) │ │ 3.77 │ ↓ je 51 │'Ctrl+V' key not associated, use 'h' to see actions!│ 16.59 │ movq 0x3b0(%rbx),%rdx │ │ 30.65 │ movl 0x8(%rdx),%eax │ │ 3.77 │ cmpl %eax,%edi │Press any key... │ 0.25 │ ↓ jb 82 └────────────────────────────────────────────────────┘ Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit f16552393191f0e0801d8640f2030fe2103912b9 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 17:17:10 2025 -0300 perf ui browser: Add key_name() helper We'll use it to show unhandled keys in the various TUI browsers. Suggested-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/r/Z_TYux5fUg2pW-pF@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit e0eb84cd518084582c0d1db5d904f31b16902fdc Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 15:03:11 2025 -0300 tools build: Don't show libbfd build status as it is opt-in Since dd317df072071903 ("perf build: Make binutil libraries opt in") doesn't try to build with binutils libraries, so showing that it is OFF when building causes just distraction, remove it from FEATURES_DISPLAY. For people that for some reason notice that there is always 'perf -vv', a short hand for 'perf version --build-options' and 'perf check feature libbfd' that now explains why it is not built: $ perf check feature libbfd libbfd: [ OFF ] # HAVE_LIBBFD_SUPPORT ( tip: Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el] ) $ Fixes: dd317df072071903 ("perf build: Make binutil libraries opt in") Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z--pWmTHGb62_83e@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a059373a9a16e5104d5d01d962ec762c35a72ccd Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 15:19:42 2025 -0300 perf check: Add tip about building with libbfd using BUILD_NONDISTRO=1 There are still some cases, for instance to disassembly BPF code that needs this, so until someone works on supporting that, we're keeping the code but it is opt-in. Make that clear on the 'perf version --build-options' and other ways to query if a feature is present: $ perf check feature libbfd libbfd: [ OFF ] # HAVE_LIBBFD_SUPPORT ( tip: Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el] ) $ perf -vv | grep bfd libbfd: [ OFF ] # HAVE_LIBBFD_SUPPORT ( tip: Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el] ) $ Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z_dkNDj9EPFwPqq1@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 4fce4b91fd1aabb326c46e237eb4b19ab72598f8 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 11:37:20 2025 -0300 perf build: Warn when libdebuginfod devel files are not available While working on 'perf version --build-options' I noticed that: $ perf version --build-options perf version 6.15.rc1.g312a07a00d31 aio: [ on ] # HAVE_AIO_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT bpf_skeletons: [ on ] # HAVE_BPF_SKEL debuginfod: [ OFF ] # HAVE_DEBUGINFOD_SUPPORT And looking at tools/perf/Makefile.config I also noticed that it is not opt-in, meaning we will attempt to build with it in all normal cases. So add the usual warning at build time to let the user know that something recommended is missing, now we see: Makefile.config:563: No elfutils/debuginfod.h found, no debuginfo server support, please install elfutils-debuginfod-client-devel or equivalent And after following the recommendation: $ perf check feature debuginfod debuginfod: [ on ] # HAVE_DEBUGINFOD_SUPPORT $ ldd ~/bin/perf | grep debuginfo libdebuginfod.so.1 => /lib64/libdebuginfod.so.1 (0x00007fee5cf5f000) $ With this feature on several perf tools will fetch what is needed and not require all the contents of the debuginfo packages, for instance: # rpm -qa | grep kernel-debuginfo # pahole --running_kernel_vmlinux pahole: couldn't find a vmlinux that matches the running kernel HINT: Maybe you're inside a container or missing a debuginfo package? # # perf trace -e open* perf probe --vars icmp_rcv 0.000 ( 0.005 ms): perf/97391 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC) = 3 0.014 ( 0.004 ms): perf/97391 openat(dfd: CWD, filename: "/lib64/libm.so.6", flags: RDONLY|CLOEXEC) = 3 32130.100 ( 0.008 ms): perf/97391 openat(dfd: CWD, filename: "/root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo") = 3 Available variables at icmp_rcv @ struct sk_buff* skb # # pahole --running_kernel_vmlinux /root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo # file /root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo /root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=aa3c82b4a13f9c0e0301bebb20fe958c4db6f362, with debug_info, not stripped # ls -la /root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo -r--------. 1 root root 475401512 Mar 27 21:00 /root/.cache/debuginfod_client/aa3c82b4a13f9c0e0301bebb20fe958c4db6f362/debuginfo # Then, cached: # perf stat --null perf probe --vars icmp_rcv Available variables at icmp_rcv @ struct sk_buff* skb Performance counter stats for 'perf probe --vars icmp_rcv': 0.671389041 seconds time elapsed 0.519176000 seconds user 0.150860000 seconds sys Fixes: c7a14fdcb3fa7736 ("perf build-ids: Fall back to debuginfod query if debuginfo not found") Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Frank Ch. Eigler Link: https://lore.kernel.org/r/Z_dkNDj9EPFwPqq1@gmail.com [ Folded patch from Ingo to have the debian/ubuntu devel package added build warning message ] Signed-off-by: Arnaldo Carvalho de Melo commit a3a40391292273cf78a7920c119cdc386d694c38 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 15:03:11 2025 -0300 tools build: Don't show libunwind build status as it is opt-in Since 13e17c9ff49119aa ("perf build: Make libunwind opt-in rather than opt-out") doesn't try to build with libunwind, so showing that it is OFF when building causes just distraction, remove it from FEATURES_DISPLAY. For people that for some reason notice that there is always 'perf -vv', a short hand for 'perf version --build-options' and 'perf check feature libunwind' that now explains why it is not built: $ perf check feature libunwind libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT ( tip: Deprecated, use LIBUNWIND=1 and install libunwind-dev[el] to build with it ) $ Fixes: 13e17c9ff49119aa ("perf build: Make libunwind opt-in rather than opt-out") Reported-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z--pWmTHGb62_83e@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 31d7e6006312660fda19b03031dc4ee6f1bfeea9 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 10:56:30 2025 -0300 perf check: Allow showing a tip for opt-in features not built into perf Ingo reported that it was difficult to understand why libunwind support didn't link even when he had the usual libunwind-dev files installed in his machine. This is because libunwind became opt-in, the user has to use LIBUNWIND=1, as it was deemed stalled in its development/unsuitable for use with perf, IIRC, and so we better use the elfutils equivalent routine that we also supported for ages. But the build message still printed: Auto-detecting system features: ... libdw: [ on ] ... glibc: [ on ] ... libcrypto: [ on ] ... libunwind: [ OFF ] Which is confusing, so allow for having a tip when 'perf version --build-options' is used, and variants with 'perf check feature': $ perf version --build-options | grep libunwind libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT ( tip: Deprecated, use LIBUNWIND=1 and install libunwind-dev[el] to build with it ) $ $ perf check feature libunwind libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT ( tip: Deprecated, use LIBUNWIND=1 and install libunwind-dev[el] to build with it ) $ The next patches will remove the opt-in libunwind FEATURES_DISPLAY. Reported-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z--pWmTHGb62_83e@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 0afeacbc8d0828140410ce144a60f6159a8e8437 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 10:51:01 2025 -0300 perf check: Move the FEATURE_STATUS() macro to its only user source file It is just 'perf check' that uses that macro, to initialize the list of features built into perf, so move it there. This also avoids depending on things that are not included from builtin.h, like is_builtin(), the CONFIG_ macros, etc, that are all included in 'builtin-check.c' and before where this macro was moved to. Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z_dkNDj9EPFwPqq1@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6994c6374a4e4a4fbb67fbe231420ca6c3bee4b6 Author: Arnaldo Carvalho de Melo Date: Tue Apr 8 10:37:01 2025 -0300 perf check: Share the feature status printing routine with 'perf version' Both had the same open coded functions, share them so that we can add tips for opt-in features such as libunwind, coresight, etc. Examples of use: $ perf check feature libcapstone libcapstone: [ on ] # HAVE_LIBCAPSTONE_SUPPORT $ perf check feature libunwind libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT $ perf version --build-options perf version 6.15.rc1.g113e3df8ccc5 aio: [ on ] # HAVE_AIO_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT bpf_skeletons: [ on ] # HAVE_BPF_SKEL debuginfod: [ OFF ] # HAVE_DEBUGINFOD_SUPPORT dwarf: [ on ] # HAVE_LIBDW_SUPPORT dwarf_getlocations: [ on ] # HAVE_LIBDW_SUPPORT dwarf-unwind: [ on ] # HAVE_DWARF_UNWIND_SUPPORT auxtrace: [ on ] # HAVE_AUXTRACE_SUPPORT libbfd: [ OFF ] # HAVE_LIBBFD_SUPPORT libcapstone: [ on ] # HAVE_LIBCAPSTONE_SUPPORT libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT libdw-dwarf-unwind: [ on ] # HAVE_LIBDW_SUPPORT libelf: [ on ] # HAVE_LIBELF_SUPPORT libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT libopencsd: [ on ] # HAVE_CSTRACE_SUPPORT libperl: [ on ] # HAVE_LIBPERL_SUPPORT libpfm4: [ on ] # HAVE_LIBPFM libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT libslang: [ on ] # HAVE_SLANG_SUPPORT libtraceevent: [ on ] # HAVE_LIBTRACEEVENT libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT lzma: [ on ] # HAVE_LZMA_SUPPORT numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT zlib: [ on ] # HAVE_ZLIB_SUPPORT zstd: [ on ] # HAVE_ZSTD_SUPPORT $ Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Howard Chu Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z_Rz10stoLzBocIO@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 6559b83e4e71ba77461c8d6e6af7b89693c8e677 Author: Arnaldo Carvalho de Melo Date: Fri Apr 4 15:37:45 2025 -0300 tools build: Don't set libunwind as available if test-all.c build succeeds The tools/build/feature/test-all.c file tries to detect the expected, most common set of libraries/features we expect to have available to build perf with. At some point libunwind was deemed not to be part of that set of libries, but the patches making it to be opt-in ended up forgetting some details, fix one more. Testing it: $ rm -rf /tmp/build/$(basename $PWD)/ ; mkdir -p /tmp/build/$(basename $PWD)/ $ rpm -q libunwind-devel libunwind-devel-1.8.0-3.fc40.x86_64 $ make -k LIBUNWIND=1 CORESIGHT=1 O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin |& grep unwind && ldd ~/bin/perf | grep unwind ... libunwind: [ on ] CC /tmp/build/perf-tools-next/arch/x86/tests/dwarf-unwind.o CC /tmp/build/perf-tools-next/arch/x86/util/unwind-libunwind.o CC /tmp/build/perf-tools-next/util/arm64-frame-pointer-unwind-support.o CC /tmp/build/perf-tools-next/tests/dwarf-unwind.o CC /tmp/build/perf-tools-next/util/unwind-libunwind-local.o CC /tmp/build/perf-tools-next/util/unwind-libunwind.o libunwind-x86_64.so.8 => /lib64/libunwind-x86_64.so.8 (0x00007f615a549000) libunwind.so.8 => /lib64/libunwind.so.8 (0x00007f615a52f000) $ sudo rpm -e libunwind-devel $ rm -rf /tmp/build/$(basename $PWD)/ ; mkdir -p /tmp/build/$(basename $PWD)/ $ make -k LIBUNWIND=1 CORESIGHT=1 O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin |& grep unwind && ldd ~/bin/perf | grep unwind Makefile.config:653: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR ... libunwind: [ OFF ] CC /tmp/build/perf-tools-next/arch/x86/tests/dwarf-unwind.o CC /tmp/build/perf-tools-next/arch/x86/util/unwind-libdw.o CC /tmp/build/perf-tools-next/util/arm64-frame-pointer-unwind-support.o CC /tmp/build/perf-tools-next/tests/dwarf-unwind.o CC /tmp/build/perf-tools-next/util/unwind-libdw.o $ Should be in a separate patch, but tired now, so also adding a message about the need to use LIBUNWIND=1 in the output when its not available, so done here as well. So, now when the devel files are not available we get: $ make -k LIBUNWIND=1 CORESIGHT=1 O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin |& grep unwind && ldd ~/bin/perf | grep unwind Makefile.config:653: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR and set LIBUNWIND=1 in the make command line as it is opt-in now ... libunwind: [ OFF ] $ Fixes: 13e17c9ff49119aa ("perf build: Make libunwind opt-in rather than opt-out") Reported-by: Ingo Molnar Tested-by: Ingo Molnar Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/Z_AnsW9oJzFbhIFC@x1 Signed-off-by: Arnaldo Carvalho de Melo commit 588d5d20ca8defa5ba5d1b536ff3695f6ab7aa87 Author: Kaustabh Chakraborty Date: Thu Apr 10 14:01:14 2025 +0530 phy: exynos5-usbdrd: add exynos7870 USBDRD support Implement support for Exynos7870 USB DRD on top of the existing exynos5-usbdrd driver. Exynos7870 has a single USB 2.0 DRD PHY controller and no 3.0 PHYs. Thus, it only supports the UTMI interface. Moreover, the PMU register offset for enabling the PHY controller is different for SoCs such as Exynos7870, where BIT(0) is for the 3.0 PHY and BIT(1) is for the 2.0 PHY. The phy_isol function for Exynos7870 uses the appropriate register offsets. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250410-exynos7870-usbphy-v2-3-2eb005987455@disroot.org Signed-off-by: Vinod Koul commit 23f793850e9ee7390584c0809f085d6c88de7d3f Author: Kaustabh Chakraborty Date: Thu Apr 10 14:01:13 2025 +0530 dt-bindings: phy: samsung,usb3-drd-phy: add exynos7870-usbdrd-phy compatible Add the compatible string "samsung,exynos7870-usbdrd-phy" to the documentation. The devicetree node requires two clocks, named "phy" and "ref" (same as clocks required by Exynos5). Signed-off-by: Kaustabh Chakraborty Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250410-exynos7870-usbphy-v2-2-2eb005987455@disroot.org Signed-off-by: Vinod Koul commit 9b6662a0f715b3f43b42c3aadf32fa6ffaa8890c Author: Kaustabh Chakraborty Date: Thu Apr 10 14:01:12 2025 +0530 phy: exynos5-usbdrd: use GENMASK and FIELD_PREP for Exynos5 PHY registers Most Exynos850 and Exynos9 (GS101) DRD PHY registers use GENMASK for masks and FIELD_PREP for writing values to registers. Rewrite the register definitions which don't follow this approach to follow it as much as possible. This patch doesn't introduce any fixes or functional changes, it's merely an attempt to introduce some uniformity and consistency in the driver code. The CRPORT SuperSpeed control registers have been exempted from this change. Since the writing of register values do not require any masking operations, implementing it would unnecessarily complicate things. Signed-off-by: Kaustabh Chakraborty Link: https://lore.kernel.org/r/20250410-exynos7870-usbphy-v2-1-2eb005987455@disroot.org Signed-off-by: Vinod Koul commit 070d546258257c75c65a2f15da558eb96bce550c Author: Rob Herring (Arm) Date: Mon Apr 7 11:56:06 2025 -0500 dt-bindings: phy: rockchip: Add missing "phy-supply" property Several Rockchip PHYs use the "phy-supply" property, but don't document it. Add it to the current known users. Signed-off-by: Rob Herring (Arm) Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250407165607.2937088-1-robh@kernel.org Signed-off-by: Vinod Koul commit dca4ee84a8bb6ec7cb2a1463f14983c2e0d614a7 Author: Thomas Zimmermann Date: Tue Apr 8 13:31:26 2025 +0200 accel/ivpu: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://lore.kernel.org/r/20250408113247.418007-1-tzimmermann@suse.de commit 646bfc52bbe184c0579060c3919e5d70885b0dcc Author: Yao Zi Date: Wed Mar 26 11:35:56 2025 +0000 clk: rockchip: Drop empty init callback for rk3588 PLL type Unlike PLLs in previous geneation of SoCs, PLLs in RK3588 type don't require any platform-specific initialization. Drop callback rockchip_rk3588_pll_init() that does nothing in fact to clean the driver up. Signed-off-by: Yao Zi Link: https://lore.kernel.org/r/20250326113556.21039-1-ziyao@disroot.org Signed-off-by: Heiko Stuebner commit 6c4a3fa26799785c1873aacabcfd9b2d27e8dc97 Author: Boris Brezillon Date: Fri Apr 4 10:09:33 2025 +0200 drm/panthor: Don't update MMU_INT_MASK in panthor_mmu_irq_handler() Interrupts are automatically unmasked in panthor_mmu_irq_threaded_handler() when the handler returns. Unmasking prematurely might generate spurious interrupts if the IRQ line is shared. Changes in v2: - New patch Changes in v3: - Add R-bs Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250404080933.2912674-6-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 50b0639b575c0725a190926d17222193bdf027c9 Author: Boris Brezillon Date: Fri Apr 4 10:09:32 2025 +0200 drm/panthor: Let IRQ handlers clear the interrupts themselves MMU handler needs to be in control of the job interrupt clears because clearing the interrupt also unblocks the writer/reader that triggered the fault, and we don't want it to be unblocked until we've had a chance to process the IRQ. Since clearing the clearing is just one line, let's make it explicit instead of doing it in the generic code path. Note that this commit changes the existing behavior in that the MMU COMPLETED irqs are no longer cleared, which is fine because they are masked, so we're not risking an interrupt flood. Changes in v3: - Mention the fact we no longer clear MMU COMPLETED irqs - Add Liviu's R-b Changes in v2: - Move the MMU_INT_CLEAR around Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250404080933.2912674-5-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 8ba64cf2f358079d09faba7529aad2b0a46c7903 Author: Boris Brezillon Date: Fri Apr 4 10:09:31 2025 +0200 drm/panthor: Update panthor_mmu::irq::mask when needed When we clear the faulty bits in the AS mask, we also need to update the panthor_mmu::irq::mask field otherwise our IRQ handler won't get called again until the GPU is reset. Changes in v2: - Add Liviu's R-b Changes in v3: - Add Steve's R-b Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250404080933.2912674-4-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 7d5a3b22f5b58ef89ab8770d7a44c24eecde8d66 Author: Boris Brezillon Date: Fri Apr 4 10:09:30 2025 +0200 drm/panthor: Call panthor_gpu_coherency_init() after PM resume() When the device is coherent, panthor_gpu_coherency_init() will read GPU_COHERENCY_FEATURES to make sure the GPU supports the ACE-Lite coherency protocol, which will fail if the clocks/power-domains are not enabled when the read is done. Move the panthor_gpu_coherency_init() call after the device has been resumed to prevent that. Changes in v2: - Add Liviu's R-b Changes in v3: - Add Steve's R-b Fixes: dd7db8d911a1 ("drm/panthor: Explicitly set the coherency mode") Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20250404080933.2912674-3-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit d1df2907fb69df56aad8e4a0734dac0778c234a7 Author: Boris Brezillon Date: Fri Apr 4 10:09:29 2025 +0200 drm/panthor: Fix GPU_COHERENCY_ACE[_LITE] definitions GPU_COHERENCY_ACE and GPU_COHERENCY_ACE_LITE definitions have been swapped. Changes in v2: - New patch Changes in v3: - Add Steve's R-b Reported-by: Liviu Dudau Fixes: 546b366600ef ("drm/panthor: Add GPU register definitions") Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Link: https://lore.kernel.org/r/20250404080933.2912674-2-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon commit 589a7c406a721f5d3a818ad0003799180f027dfa Author: Rafael J. Wysocki Date: Thu Apr 10 12:20:43 2025 +0200 cpufreq: Drop unused cpufreq_get_policy() A recent change has introduced a bug into cpufreq_get_policy(), but this function is not used, so it's better to drop it altogether. Reported-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Acked-by: Sudeep Holla Link: https://patch.msgid.link/2802770.mvXUDI8C0e@rjwysocki.net commit 8ecd096d018be8a6bd3bd930f3a41a85db66a67d Author: Chukun Pan Date: Tue Apr 1 17:00:09 2025 +0800 arm64: dts: rockchip: Move SHMEM memory to reserved memory on rk3588 0x0 to 0xf0000000 are SDRAM memory areas where 0x10f000 is located. So move the SHMEM memory of arm_scmi to the reserved memory node. Fixes: c9211fa2602b ("arm64: dts: rockchip: Add base DT for rk3588 SoC") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250401090009.733771-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit ab6fcb58aedf7df1d146b47d5fedd844a7c346e2 Author: Chukun Pan Date: Tue Apr 1 18:00:20 2025 +0800 arm64: dts: rockchip: Add UART DMA support for RK3528 The UART ports on RK3528 have DMA capability, describe it. Flow control is optional, so dma-names are not added. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250401100020.944658-4-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 762b1f6503340b4729bc8a5fa6a5780712012cd8 Author: Chukun Pan Date: Tue Apr 1 18:00:19 2025 +0800 arm64: dts: rockchip: Add DMA controller for RK3528 Add DMA controller dt node for RK3528 SoC. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250401100020.944658-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit a37d21a9b45e47ed6bc1f94e738096c07db78a07 Author: Chukun Pan Date: Tue Apr 1 18:00:18 2025 +0800 arm64: dts: rockchip: Add missing uart3 interrupt for RK3528 The interrupt of uart3 node on rk3528 is missing, fix it. Fixes: 7983e6c379a9 ("arm64: dts: rockchip: Add base DT for rk3528 SoC") Reviewed-by: Yao Zi Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250401100020.944658-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit cdba8e71599a1a1cf9ca6e9573c243c9a21f899c Author: Shawn Lin Date: Tue Apr 8 10:31:15 2025 +0800 arm64: dts: rockchip: Rename vcc3v3_pcie0 to vcc3v3_pcie1 for rk3576-evb1-v10 It's for pcie1, correct the name. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1744079475-211962-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Heiko Stuebner commit 831a8ac72264426ccd0ee5d2b0d74491ea7d2bfb Author: Alexander Shiyan Date: Tue Apr 8 09:46:12 2025 +0300 clk: rockchip: rk3588: Add PLL rate for 1500 MHz At least one RK3588 clock (CPLL) uses 1.5 GHz, so let's add that frequency to the PLL table. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20250408064612.41359-1-eagle.alexander923@gmail.com Signed-off-by: Heiko Stuebner commit 0edd1d13de5eb325dd9a6b39fccfc52d022effe2 Author: Zhang Rui Date: Wed Apr 9 08:50:26 2025 +0800 ACPI: processor: idle: Remove redundant pr->power.count assignment pr->power.count stands for the number of valid processor cstates. And it is correctly set with the return value of acpi_processor_power_verify(), in acpi_processor_get_cstate_info(). Remove the redundant logic that unnecessarily overrides pr->power.count value. No functional change intended. Signed-off-by: Zhang Rui Link: https://patch.msgid.link/20250409005026.1932637-3-rui.zhang@intel.com [ rjw: Removed unused variable, fixed up white space ] Signed-off-by: Rafael J. Wysocki commit 0ac7ad5e352dcf18a4d42a4671f7cda69847712b Author: Thomas Zimmermann Date: Thu Apr 10 11:50:03 2025 +0200 drm: Mark CONFIG_DRM_HEADER_TEST as BROKEN The flag got lost during a merge. Add it back. Signed-off-by: Thomas Zimmermann Reported-by: Simona Vetter Closes: https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-04-10&show_html=true Fixes: 1afba39f9305 ("Merge drm/drm-next into drm-misc-next") Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250410095014.20471-1-tzimmermann@suse.de commit 3f7b48efb79d91883d98dd7e33dc2a0abfa9f923 Author: Kevin Hao Date: Thu Apr 10 14:56:11 2025 +0800 spi: fsl-qspi: Simplify probe error handling using managed API - Switch to devm_spi_alloc_host() to avoid manual spi_controller_put() calls in error paths. - Factor out the hardware disable logic into a dedicated fsl_qspi_disable() helper and register it as a managed cleanup action, removing the need to explicitly disable hardware after fsl_qspi_default_setup() failures. - Move fsl_qspi_cleanup() earlier in the probe sequence to eliminate the need for manual cleanup in the irq failure path. With these changes we can completely eliminate the messy goto labels in probe function. Signed-off-by: Kevin Hao Link: https://patch.msgid.link/20250410-spi-v1-3-56e867cc19cf@gmail.com Signed-off-by: Mark Brown commit b5d057a86e2086af0b1e6d0ca8b306be1c73a627 Author: Richard Fitzgerald Date: Thu Apr 10 11:18:12 2025 +0100 ASoC: wm_adsp: Use vmemdup_user() instead of open-coding Use vmemdup_user() to get a copy of the user buffer in wm_coeff_tlv_put(). Apart from simplifying the code and avoiding open-coding, it means we also automatically benefit from any security enhancements in the code behind vmemdup_user(). Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250410101812.1180539-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 7615b94b6371dab5d7d8c1ca4f95ed3f866e1c51 Author: David Woodhouse Date: Wed Mar 26 14:16:04 2025 +0000 selftests/kexec: Add x86_64 selftest for kexec-jump and exception handling Add a self test which exercises both the kexec-jump facility, and the kexec exception handling. Invoke a trivial payload which just does an int3 and returns, flip-flopping its entry point for the next invocation between two implementations of the same thing. Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20250326142404.256980-5-dwmw2@infradead.org commit de085ddd493bccb77a3ec1b99ae7466133540f4d Author: David Woodhouse Date: Wed Mar 26 14:16:03 2025 +0000 x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier Reduce the window during which exceptions are unhandled, by leaving the GDT/IDT in place all the way into the relocate_kernel() function, until the moment that %cr3 gets replaced. Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20250326142404.256980-4-dwmw2@infradead.org commit 7516e7216bdfb9e2fab0a0ca3bd23cb2e61e46ed Author: David Woodhouse Date: Wed Mar 26 14:16:02 2025 +0000 x86/kexec: Add 8250 MMIO serial port output This supports the same 32-bit MMIO-mapped 8250 as the early_printk code. It's not clear why the early_printk code supports this form and only this form; the actual runtime 8250_pci doesn't seem to support it. But having hacked up QEMU to expose such a device, early_printk does work with it, and now so does the kexec debug code. Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Andy Shevchenko Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20250326142404.256980-3-dwmw2@infradead.org commit d358b45120cc8da9f10d8c1e8ec3559f72525147 Author: David Woodhouse Date: Wed Mar 26 14:16:01 2025 +0000 x86/kexec: Add 8250 serial port output If a serial port was configured for early_printk, use it for debug output from the relocate_kernel exception handler too. Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Andy Shevchenko Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20250326142404.256980-2-dwmw2@infradead.org commit 9e8e879426d863fc326cda53d704bbc7369c1afc Merge: d9fa398fe82728 0af2f6be1b4281 Author: Ingo Molnar Date: Thu Apr 10 12:13:44 2025 +0200 Merge tag 'v6.15-rc1' into x86/boot, to pick up fixes and refresh to a known base Signed-off-by: Ingo Molnar commit eef476f15c8350078efb48bd9b9f3ff50ae1bbbb Author: Ingo Molnar Date: Wed Apr 9 22:29:07 2025 +0200 x86/msr: Rename 'wrmsrl_cstar()' to 'wrmsrq_cstar()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 7cbc2ba7c107a1a537524ae505e192f4f88cc209 Author: Ingo Molnar Date: Wed Apr 9 22:29:06 2025 +0200 x86/msr: Rename 'native_wrmsrl()' to 'native_wrmsrq()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 604d15d15ebd6148a084ea53d0fa493a74e51b11 Author: Ingo Molnar Date: Wed Apr 9 22:29:05 2025 +0200 x86/msr: Rename 'wrmsrl_amd_safe()' to 'wrmsrq_amd_safe()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit e2b8af0c693993e80415997f4842a372359b463e Author: Ingo Molnar Date: Wed Apr 9 22:29:04 2025 +0200 x86/msr: Rename 'rdmsrl_amd_safe()' to 'rdmsrq_amd_safe()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 8e44e83f57c3289a41507eb79a315400629978ae Author: Ingo Molnar Date: Wed Apr 9 22:29:03 2025 +0200 x86/msr: Rename 'mce_wrmsrl()' to 'mce_wrmsrq()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit ebe29309c4d2821d5fdccd5393eba9c77540e260 Author: Ingo Molnar Date: Wed Apr 9 22:29:02 2025 +0200 x86/msr: Rename 'mce_rdmsrl()' to 'mce_rdmsrq()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit c895ecdab2e4ded78a362721c5a63053060030c9 Author: Ingo Molnar Date: Wed Apr 9 22:29:01 2025 +0200 x86/msr: Rename 'wrmsrl_on_cpu()' to 'wrmsrq_on_cpu()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit d7484babd2c4dcfa1ca02e7e303fab3fab529d75 Author: Ingo Molnar Date: Wed Apr 9 22:29:00 2025 +0200 x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 27a23a544a55b55259ee6b438497dd4384c387c5 Author: Ingo Molnar Date: Wed Apr 9 22:28:59 2025 +0200 x86/msr: Rename 'wrmsrl_safe_on_cpu()' to 'wrmsrq_safe_on_cpu()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 5e404cb7ac4c097e95896a4a3fba5f5aabf7f679 Author: Ingo Molnar Date: Wed Apr 9 22:28:58 2025 +0200 x86/msr: Rename 'rdmsrl_safe_on_cpu()' to 'rdmsrq_safe_on_cpu()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 6fa17efe45440f43fa4e059d7a487179bbba053e Author: Ingo Molnar Date: Wed Apr 9 22:28:57 2025 +0200 x86/msr: Rename 'wrmsrl_safe()' to 'wrmsrq_safe()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 6fe22abacd40e259fffec744a02d5ca3febccd68 Author: Ingo Molnar Date: Wed Apr 9 22:28:56 2025 +0200 x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 78255eb23973323633432d9ec40b65c15e41888a Author: Ingo Molnar Date: Wed Apr 9 22:28:55 2025 +0200 x86/msr: Rename 'wrmsrl()' to 'wrmsrq()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit c435e608cf59ffab815aa2571182dc8c50fe4112 Author: Ingo Molnar Date: Wed Apr 9 22:28:54 2025 +0200 x86/msr: Rename 'rdmsrl()' to 'rdmsrq()' Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit d58c04cf1d702fd6e133e89130f11a2ccd9269fa Author: Ingo Molnar Date: Wed Apr 9 22:28:53 2025 +0200 x86/msr: Standardize on 'u32' MSR indices in This is the customary type used for hardware ABIs. Suggested-by: Xin Li Suggested-by: "H. Peter Anvin" Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Linus Torvalds commit d8f8aad698b85f197c877ec51f8585e2b2abb195 Author: Ingo Molnar Date: Wed Apr 9 22:28:52 2025 +0200 x86/msr: Harmonize the prototype and definition of do_trace_rdpmc() In the first parameter of do_trace_rdpmc() is named 'msr': extern void do_trace_rdpmc(unsigned int msr, u64 val, int failed); But in the definition it's 'counter': void do_trace_rdpmc(unsigned counter, u64 val, int failed) Use 'msr' in both cases, and change the type to u32. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: H. Peter Anvin Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit cd905826cbc833b7494573998bd1c407dfa7924f Author: Ingo Molnar Date: Wed Apr 9 22:28:51 2025 +0200 x86/msr: Use u64 in rdmsrl_safe() and paravirt_read_pmc() The paravirt_read_pmc() result is in fact only loaded into an u64 variable. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: H. Peter Anvin Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit 73bd1e01e98e71715aa060d40b8273ff6434e8d7 Author: Ingo Molnar Date: Wed Apr 9 22:28:50 2025 +0200 x86/msr: Use u64 in rdmsrl_amd_safe() and wrmsrl_amd_safe() Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: H. Peter Anvin Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit f4138de5e41fae1a0b406f0d354a3028dc46bf1f Author: Ingo Molnar Date: Wed Apr 9 22:28:49 2025 +0200 x86/msr: Standardize on u64 in Also fix some nearby whitespace damage while at it. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: H. Peter Anvin Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit dfe2574ce87e031c0c37d49b9bee7e1f3c95bff9 Author: Ingo Molnar Date: Wed Apr 9 22:28:48 2025 +0200 x86/msr: Standardize on u64 in There's 9 uses of 'unsigned long long' in , which is really the same as 'u64', which is used 34 times. Standardize on u64. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: H. Peter Anvin Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds commit d32a0b567a8a8b6e677d35c4f8eb8bd32b7029a0 Author: Thomas Zimmermann Date: Fri Mar 21 10:54:04 2025 +0100 fbdev: Remove constants of unused events The constants FB_EVENT_MODE_CHANGE and FB_EVENT_BLANK are unused. Remove them from the header file. Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-12-tzimmermann@suse.de Signed-off-by: Lee Jones commit dc2139c0aa3283e5749109641af1878ed7bf7371 Author: Thomas Zimmermann Date: Fri Mar 21 10:54:03 2025 +0100 leds: backlight trigger: Replace fb events with a dedicated function call Remove support for fb events from the led backlight trigger. Provide the helper ledtrig_backlight_blank() instead. Call it from fbdev to inform the trigger of changes to a display's blank state. Fbdev maintains a list of all installed notifiers. Instead of the fbdev notifiers, maintain an internal list of led backlight triggers. v3: - export ledtrig_backlight_blank() v2: - maintain global list of led backlight triggers (Lee) - avoid IS_REACHABLE() in source file (Lee) - notify on changes to blank state instead of display state - use lock guards - initialize led list and list mutex Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-11-tzimmermann@suse.de Signed-off-by: Lee Jones commit 28f8bab711c0984005a6dd4cc980b4ba8409b817 Author: Thomas Zimmermann Date: Fri Mar 21 10:54:02 2025 +0100 leds: backlight trigger: Move blank-state handling into helper Move the handling of blank-state updates into a separate helper, so that is can be called without the fbdev event. No functional changes. v2: - rename helper to avoid renaming in a later patch (Lee) Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-10-tzimmermann@suse.de Signed-off-by: Lee Jones commit bc70cc84f5a2ebfd7e7112e9b8837e0c7954fc65 Author: Thomas Zimmermann Date: Fri Mar 21 10:54:01 2025 +0100 backlight: lcd: Replace fb events with a dedicated function call Remove support for fb events from the lcd subsystem. Provide the helper lcd_notify_blank_all() instead. In fbdev, call lcd_notify_blank_all() to inform the lcd subsystem of changes to a display's blank state. Fbdev maintains a list of all installed notifiers. Instead of fbdev notifiers, maintain an internal list of lcd devices. v3: - export lcd_notify_mode_change_all() (kernel test robot) v2: - maintain global list of lcd devices - avoid IS_REACHABLE() in source file - use lock guards - initialize lcd list and list mutex Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Reviewed-by: "Daniel Thompson (RISCstar)" Link: https://lore.kernel.org/r/20250321095517.313713-9-tzimmermann@suse.de Signed-off-by: Lee Jones commit e98696cea7e289447a5d2328546b947629301616 Author: Thomas Zimmermann Date: Fri Mar 21 10:54:00 2025 +0100 backlight: lcd: Move event handling into helpers Move the handling of display updates to separate helper functions. There is code for handling fbdev blank events and fbdev mode changes. The code currently runs from fbdev event notifiers, which will be replaced. Signed-off-by: Thomas Zimmermann Reviewed-by: "Daniel Thompson (RISCstar)" Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-8-tzimmermann@suse.de Signed-off-by: Lee Jones commit b01beb2f1f6bcda17634a5b529865ffc5a9b795f Author: Thomas Zimmermann Date: Fri Mar 21 10:53:59 2025 +0100 backlight: Replace fb events with a dedicated function call Remove support for fb events from backlight subsystem. Provide the helper backlight_notify_blank_all() instead. Also export the existing helper backlight_notify_blank() to update a single backlight device. In fbdev, call either helper to inform the backlight subsystem of changes to a display's blank state. If the framebuffer device has a specific backlight, only update this one; otherwise update all. v4: - protect blacklight declarations with IS_REACHABLE() (kernel test robot) v3: - declare empty fb_bl_notify_blank() as static inline (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Reviewed-by: "Daniel Thompson (RISCstar)" Link: https://lore.kernel.org/r/20250321095517.313713-7-tzimmermann@suse.de Signed-off-by: Lee Jones commit 4bfb77f3381627640e97e0e423c93a2ea93e7de7 Author: Thomas Zimmermann Date: Fri Mar 21 10:53:58 2025 +0100 backlight: Move blank-state handling into helper Move the handling of blank-state updates into a separate helper, so that is can be called without the fbdev event. No functional changes. As a minor improvement over the original code, the update replaces manual locking with a guard. Signed-off-by: Thomas Zimmermann Reviewed-by: "Daniel Thompson (RISCstar)" Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-6-tzimmermann@suse.de Signed-off-by: Lee Jones commit 726491f2038ec71122d45700f3abf36fdb277aaa Author: Thomas Zimmermann Date: Fri Mar 21 10:53:57 2025 +0100 backlight: Implement fbdev tracking with blank state from event Look at the blank state provided by FB_EVENT_BLANK to determine whether to enable or disable a backlight. Remove the tracking fields from struct backlight_device. Tracking requires three variables, fb_on, prev_fb_on and the backlight's use_count. If fb_on is true, the display has been unblanked. The backlight needs to be enabled if the display was blanked before (i.e., prev_fb_on is false) or if use_count is still at 0. If fb_on is false, the display has been blanked. In this case, the backlight has to be disabled was unblanked before and the backlight's use_count is greater than 0. This change removes fbdev state tracking from blacklight. All the backlight requires it its own use counter and information about changes to the display. Removing fbdev internals makes backlight drivers easier to integrate into other display drivers, such as DRM. Signed-off-by: Thomas Zimmermann Reviewed-by: "Daniel Thompson (RISCstar)" Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-5-tzimmermann@suse.de Signed-off-by: Lee Jones commit dfb4bf1ac40162ff5ea3715a10f6af2dcf3030c5 Author: Thomas Zimmermann Date: Fri Mar 21 10:53:56 2025 +0100 fbdev: Send old blank state in FB_EVENT_BLANK The event FB_EVENT_BLANK sends the new blank state in the event's data field. Also send the old state. It's an additional field in the data array; existing receivers won't notice the difference. The backlight subsystem currently tracks blank state per display per backlight. That is not optimal as it ties backlight code to fbdev. A subsystem should not track internal state of another subsystem. With both, new and old, blank state in FB_EVENT_BLANK, the backlight code will not require its own state tracker any longer. Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-4-tzimmermann@suse.de Signed-off-by: Lee Jones commit 7e3711eb87c584ed224a7ad7000eba36e6fa3a51 Author: Thomas Zimmermann Date: Fri Mar 21 10:53:55 2025 +0100 fbdev: Track display blanking state Store the display's blank status in struct fb_info.blank and track it in fb_blank(). As an extra, the status is now available from the sysfs blank attribute. Support for blanking is optional. Therefore framebuffer_alloc() initializes the state to FB_BLANK_UNBLANK (i.e., the display is on). If the fb_blank callback has been set, register_framebuffer() sets the state to FB_BLANK_POWERDOWN. On the first modeset, the call to fb_blank() will update it to _UNBLANK. This is important, as listeners to FB_EVENT_BLANK will now see the display being switched on. Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-3-tzimmermann@suse.de Signed-off-by: Lee Jones commit 93e41f968d7c6ea1cedc6b365917cbb787ef08f6 Author: Thomas Zimmermann Date: Fri Mar 21 10:53:54 2025 +0100 fbdev: Rework fb_blank() Reimplement fb_blank() to return early on errors. No functional changes. Prepares the helper for tracking the blanking state in struct fb_info. Signed-off-by: Thomas Zimmermann Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250321095517.313713-2-tzimmermann@suse.de Signed-off-by: Lee Jones commit 08ca89e98620c08d68b7e7aed6c9294698e214e1 Author: Andy Shevchenko Date: Mon Mar 10 16:54:54 2025 +0200 usb: typec: tcpm: Use fwnode_get_child_node_count() Since fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Acked-by: Kyle Tso Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20250310150835.3139322-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 53762bb44b0659e79a3e3177372e823ec4afcc8a Author: Andy Shevchenko Date: Mon Mar 10 16:54:53 2025 +0200 leds: ncp5623: Use fwnode_get_child_node_count() Since fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20250310150835.3139322-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 4623cc4e9a5f1b7ad7e6599dfc2a5a4d9d4f5d72 Author: Andy Shevchenko Date: Mon Mar 10 16:54:52 2025 +0200 leds: pwm-multicolor: Use fwnode_get_child_node_count() Since fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20250310150835.3139322-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 1490cbb9dbfd0eabfe45f9b674097aea7e6760fc Author: Andy Shevchenko Date: Mon Mar 10 16:54:51 2025 +0200 device property: Split fwnode_get_child_node_count() The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest. Signed-off-by: Andy Shevchenko Acked-by: "Rafael J. Wysocki" Reviewed-by: Sakari Ailus Reviewed-by: Heikki Krogerus Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20250310150835.3139322-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit c9ff2808790f0fd4ca16f30f63abe70914a5a292 Author: Jocelyn Falempe Date: Mon Apr 7 15:42:26 2025 +0200 drm/panic: Add support to scanout buffer as array of pages Some drivers like virtio-gpu, don't map the scanout buffer in the kernel. Calling vmap() in a panic handler is not safe, and writing an atomic_vmap() API is more complex than expected [1]. So instead, pass the array of pages of the scanout buffer to the panic handler, and map only one page at a time to draw the pixels. This is obviously slow, but acceptable for a panic handler. [1] https://lore.kernel.org/dri-devel/20250305152555.318159-1-ryasuoka@redhat.com/ Acked-by: Thomas Zimmermann Acked-by: Simona Vetter Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250407140138.162383-3-jfalempe@redhat.com commit 8702048bb8313a21ec9179e9ce7ad3c5cb2ef072 Author: Jocelyn Falempe Date: Mon Apr 7 15:42:25 2025 +0200 mm/kmap: Add kmap_local_page_try_from_panic() kmap_local_page() can be unsafe to call from a panic handler, if CONFIG_HIGHMEM is set, and the page is in the highmem zone. So add kmap_local_page_try_from_panic() to handle this case. Suggested-by: Simona Vetter Reviewed-by: Thomas Gleixner Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250407140138.162383-2-jfalempe@redhat.com commit d74cc229cfbbc5a96139825c297f34accd670bce Author: Konstantin Shabanov Date: Thu Apr 3 06:47:39 2025 +0000 drm/rockchip: vop: Consistently use rk3399 registers consts As rk3399 has its own registers definitions, update related structs to use them. There are no changes in behaviour as updated constants values are the for rk3288/rk3368/rk3399 chips. Signed-off-by: Konstantin Shabanov Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250403064740.4016-1-mail@etehtsea.me commit 64e6121dc1b18a8208faf5b26efb50206722fd8e Author: Rob Herring (Arm) Date: Fri Apr 4 16:40:29 2025 -0500 dt-bindings: display: rockchip,vop: Drop assigned-clocks assigned-clock properties are implicitly allowed in any node with 'clocks' and don't have to be specified. The max here also appears to be wrong as there's a case with 4 entries. Signed-off-by: "Rob Herring (Arm)" Reviewed-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250404214030.401629-1-robh@kernel.org commit c5996e4ab109c8bb5541453b20647eaaf9350f41 Author: Andy Yan Date: Tue Mar 18 14:20:17 2025 +0800 drm/rockchip: vop2: Make overlay layer select register configuration take effect by vsync Because the layer/window enable/disable is take effect by vsync, if the overlay configuration of these layers does not follow vsync and takes effect immediately instead, when multiple layers are dynamically enable/disable, inconsistent display contents may be seen on the screen. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250318062024.4555-1-andyshrk@163.com commit bcdc354a0a545e0e78c6f068e5a11c0285e06eeb Author: Lucas Stach Date: Fri Feb 7 19:22:46 2025 +0100 drm/rockchip: vop: remove redundant condition check Instead of checking the same thing twice in a row, fold the second condition into the first clause. Signed-off-by: Lucas Stach Reviewed-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250207182247.215537-1-l.stach@pengutronix.de commit 794056966da84f46679c970133f358733ea6d847 Author: Yanteng Si Date: Fri Mar 28 18:06:44 2025 +0800 MAINTAINERS: Change Yanteng's email address I'm no longer work for Loongson, so I have permanently lost my Loongson email account. Signed-off-by: Yanteng Si Link: https://lore.kernel.org/r/403fa4722ad008800086e41d412cd322243b9089.1743156287.git.si.yanteng@linux.dev Signed-off-by: Alex Shi commit 4f0145e9ea41cc5d0f80b79a60ce39757d3b47d6 Author: Yanteng Si Date: Fri Mar 28 18:06:43 2025 +0800 docs/zh_CN: Add how-to of Chinese translation Many new faces keep appearing on the mailing list from time to time, and there may be many potential developers who want to participate in the Chinese translation but don't know how to get started. As more and more documents are translated, it is becoming increasingly important to improve the maintainability of Chinese documents. We have a lot of conventions, but currently these conventions are still being passed on orally. At the same time, during the review process, especially for the first few patches submitted by newbies, we have made too many repetitive comments. In order to address the above issues, I have drafted this guide, and there is still a lot that needs to be improved. Alex Shi: Fix a embedded code white space issue. Co-developed-by: Dongliang Mu Signed-off-by: Dongliang Mu Signed-off-by: Yanteng Si Link: https://lore.kernel.org/r/0443c86e10d900a4d752d103265c948360563d43.1743156287.git.si.yanteng@linux.dev Signed-off-by: Alex Shi commit ff6dfbf73c16b1b517554626820e4058b235e9e0 Author: Wang Yaxin Date: Wed Mar 19 15:52:37 2025 +0800 Docs/zh_CN: Translate msg_zerocopy.rst to Simplified Chinese translate the "msg_zerocopy.rst" into Simplified Chinese. Update to commit bac2cac12c26("docs: net: description of MSG_ZEROCOPY for AF_VSOCK") Fix embedded code type issue by Alex Shi. Signed-off-by: Wang Yaxin Signed-off-by: Jiang Kun Signed-off-by: xu xin Signed-off-by: He Peilin Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20250319155237978a-_o_XXMLszvXPDlyRsb4@zte.com.cn Signed-off-by: Alex Shi commit 19f72d95ae31586a49225023ee903edd242ce4fc Author: Wang Yaxin Date: Wed Mar 19 15:51:10 2025 +0800 Docs/zh_CN: Translate index.rst to Simplified Chinese translate the "index.rst" into Simplified Chinese. Update to commit e793b86ae44e("Documentation: networking: add Twisted Pair Ethernet diagnostics at OSI Layer 1") Signed-off-by: Wang Yaxin Signed-off-by: Jiang Kun Signed-off-by: xu xin Signed-off-by: He Peilin Link: https://lore.kernel.org/r/20250319155110884FL0FcZmsjNzP1NnAC70Zs@zte.com.cn Signed-off-by: Alex Shi commit a23be6ccd8b966ae2483bfc873720b2868ad63c3 Author: Uros Bizjak Date: Mon Apr 7 13:23:01 2025 +0200 x86: Remove __FORCE_ORDER workaround GCC PR82602 that caused invalid scheduling of volatile asms: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 was fixed for gcc-8.1.0, the current minimum version of the compiler required to compile the kernel. Remove workaround that prevented invalid scheduling for compilers, affected by PR82602. There were no differences between old and new kernel object file when compiled for x86_64 defconfig with gcc-8.1.0. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Kees Cook Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250407112316.378347-1-ubizjak@gmail.com commit 935e5bd95df2c79404630a691caf42c3d7bc3a93 Author: André Draszik Date: Wed Apr 9 21:37:24 2025 +0100 dt-bindings: firmware: google,gs101-acpm-ipc: add PMIC child node The PMIC is supposed to be a child of ACPM, add it here to describe the connection. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-3-d66d5f39b6bf@linaro.org Signed-off-by: Krzysztof Kozlowski commit 05d3273ad03fa5ea1177b4f3dfeeb6de4899b504 Author: Jaegeuk Kim Date: Fri Apr 4 19:03:03 2025 +0000 f2fs: clean up unnecessary indentation No functional change. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 061cf3a84bde038708eb0f1d065b31b7c2456533 Author: Chao Yu Date: Mon Mar 24 13:33:39 2025 +0800 f2fs: fix to do sanity check on ino and xnid syzbot reported a f2fs bug as below: INFO: task syz-executor140:5308 blocked for more than 143 seconds. Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor140 state:D stack:24016 pid:5308 tgid:5308 ppid:5306 task_flags:0x400140 flags:0x00000006 Call Trace: context_switch kernel/sched/core.c:5378 [inline] __schedule+0x190e/0x4c90 kernel/sched/core.c:6765 __schedule_loop kernel/sched/core.c:6842 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6857 io_schedule+0x8d/0x110 kernel/sched/core.c:7690 folio_wait_bit_common+0x839/0xee0 mm/filemap.c:1317 __folio_lock mm/filemap.c:1664 [inline] folio_lock include/linux/pagemap.h:1163 [inline] __filemap_get_folio+0x147/0xb40 mm/filemap.c:1917 pagecache_get_page+0x2c/0x130 mm/folio-compat.c:87 find_get_page_flags include/linux/pagemap.h:842 [inline] f2fs_grab_cache_page+0x2b/0x320 fs/f2fs/f2fs.h:2776 __get_node_page+0x131/0x11b0 fs/f2fs/node.c:1463 read_xattr_block+0xfb/0x190 fs/f2fs/xattr.c:306 lookup_all_xattrs fs/f2fs/xattr.c:355 [inline] f2fs_getxattr+0x676/0xf70 fs/f2fs/xattr.c:533 __f2fs_get_acl+0x52/0x870 fs/f2fs/acl.c:179 f2fs_acl_create fs/f2fs/acl.c:375 [inline] f2fs_init_acl+0xd7/0x9b0 fs/f2fs/acl.c:418 f2fs_init_inode_metadata+0xa0f/0x1050 fs/f2fs/dir.c:539 f2fs_add_inline_entry+0x448/0x860 fs/f2fs/inline.c:666 f2fs_add_dentry+0xba/0x1e0 fs/f2fs/dir.c:765 f2fs_do_add_link+0x28c/0x3a0 fs/f2fs/dir.c:808 f2fs_add_link fs/f2fs/f2fs.h:3616 [inline] f2fs_mknod+0x2e8/0x5b0 fs/f2fs/namei.c:766 vfs_mknod+0x36d/0x3b0 fs/namei.c:4191 unix_bind_bsd net/unix/af_unix.c:1286 [inline] unix_bind+0x563/0xe30 net/unix/af_unix.c:1379 __sys_bind_socket net/socket.c:1817 [inline] __sys_bind+0x1e4/0x290 net/socket.c:1848 __do_sys_bind net/socket.c:1853 [inline] __se_sys_bind net/socket.c:1851 [inline] __x64_sys_bind+0x7a/0x90 net/socket.c:1851 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Let's dump and check metadata of corrupted inode, it shows its xattr_nid is the same to its i_ino. dump.f2fs -i 3 chaseyu.img.raw i_xattr_nid [0x 3 : 3] So that, during mknod in the corrupted directory, it tries to get and lock inode page twice, result in deadlock. - f2fs_mknod - f2fs_add_inline_entry - f2fs_get_inode_page --- lock dir's inode page - f2fs_init_acl - f2fs_acl_create(dir,..) - __f2fs_get_acl - f2fs_getxattr - lookup_all_xattrs - __get_node_page --- try to lock dir's inode page In order to fix this, let's add sanity check on ino and xnid. Cc: stable@vger.kernel.org Reported-by: syzbot+cc448dcdc7ae0b4e4ffa@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/67e06150.050a0220.21942d.0005.GAE@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ecf68ffee7be3f012c978e8e31d7b243af340f77 Author: Chao Yu Date: Tue Mar 25 16:13:21 2025 +0800 f2fs: add a fast path in finish_preallocate_blocks() This patch uses i_sem to protect access/update on f2fs_inode_info.flag in finish_preallocate_blocks(), it avoids grabbing inode_lock() in each open(). Signed-off-by: Chao Yu Reviewed-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit 773704c1ef96a8b70d0d186ab725f50548de82c4 Author: Chao Yu Date: Tue Mar 25 16:06:46 2025 +0800 f2fs: zone: fix to avoid inconsistence in between SIT and SSA w/ below testcase, it will cause inconsistence in between SIT and SSA. create_null_blk 512 2 1024 1024 mkfs.f2fs -m /dev/nullb0 mount /dev/nullb0 /mnt/f2fs/ touch /mnt/f2fs/file f2fs_io pinfile set /mnt/f2fs/file fallocate -l 4GiB /mnt/f2fs/file F2FS-fs (nullb0): Inconsistent segment (0) type [1, 0] in SSA and SIT CPU: 5 UID: 0 PID: 2398 Comm: fallocate Tainted: G O 6.13.0-rc1 #84 Tainted: [O]=OOT_MODULE Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 Call Trace: dump_stack_lvl+0xb3/0xd0 dump_stack+0x14/0x20 f2fs_handle_critical_error+0x18c/0x220 [f2fs] f2fs_stop_checkpoint+0x38/0x50 [f2fs] do_garbage_collect+0x674/0x6e0 [f2fs] f2fs_gc_range+0x12b/0x230 [f2fs] f2fs_allocate_pinning_section+0x5c/0x150 [f2fs] f2fs_expand_inode_data+0x1cc/0x3c0 [f2fs] f2fs_fallocate+0x3c3/0x410 [f2fs] vfs_fallocate+0x15f/0x4b0 __x64_sys_fallocate+0x4a/0x80 x64_sys_call+0x15e8/0x1b80 do_syscall_64+0x68/0x130 entry_SYSCALL_64_after_hwframe+0x67/0x6f RIP: 0033:0x7f9dba5197ca F2FS-fs (nullb0): Stopped filesystem due to reason: 4 The reason is f2fs_gc_range() may try to migrate block in curseg, however, its SSA block is not uptodate due to the last summary block data is still in cache of curseg. In this patch, we add a condition in f2fs_gc_range() to check whether section is opened or not, and skip block migration for opened section. Fixes: 9703d69d9d15 ("f2fs: support file pinning for zoned devices") Reviewed-by: Daeho Jeong Cc: Daeho Jeong Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit db03c20c0850dc8d2bcabfa54b9438f7d666c863 Author: Chao Yu Date: Thu Mar 27 13:56:06 2025 +0800 f2fs: fix to set atomic write status more clear 1. After we start atomic write in a database file, before committing all data, we'd better not set inode w/ vfs dirty status to avoid redundant updates, instead, we only set inode w/ atomic dirty status. 2. After we commit all data, before committing metadata, we need to clear atomic dirty status, and set vfs dirty status to allow vfs flush dirty inode. Cc: Daeho Jeong Reported-by: Zhiguo Niu Signed-off-by: Chao Yu Reviewed-by: Daeho Jeong Reviewed-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit 2be96c2147e25d5845c1b06dc20521ab9e0eeeb0 Author: Chao Yu Date: Thu Mar 20 10:22:30 2025 +0800 f2fs: fix to update injection attrs according to fault_option When we update inject type via sysfs, it shows wrong rate value as below, there is a same problem when we update inject rate, fix it. Before: F2FS-fs (vdd): build fault injection attr: rate: 0, type: 0xffff F2FS-fs (vdd): build fault injection attr: rate: 1, type: 0x0 After: F2FS-fs (vdd): build fault injection type: 0x1 F2FS-fs (vdd): build fault injection rate: 1 Meanwhile, let's avoid turning on all fault types when we enable fault injection via fault_injection mount option, it will lead to shutdown filesystem or fail the mount() easily. mount -o fault_injection=4 /dev/vdd /mnt/f2fs F2FS-fs (vdd): build fault injection attr: rate: 4, type: 0x7fffff F2FS-fs (vdd): inject kmalloc in f2fs_kmalloc of f2fs_fill_super+0xbdf/0x27c0 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e073e92789839d10a8828c13f9fe47ee517aa8e6 Author: Chao Yu Date: Thu Mar 20 10:22:29 2025 +0800 f2fs: add a proc entry show inject stats This patch adds a proc entry named inject_stats to show total injected count for each fault type. cat /proc/fs/f2fs//inject_stats fault_type injected_count kmalloc 0 kvmalloc 0 page alloc 0 page get 0 alloc bio(obsolete) 0 alloc nid 0 orphan 0 no more block 0 too big dir depth 0 evict_inode fail 0 truncate fail 0 read IO error 0 checkpoint error 0 discard error 0 write IO error 0 slab alloc 0 dquot initialize 0 lock_op 0 invalid blkaddr 0 inconsistent blkaddr 0 no free segment 0 inconsistent footer 0 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 539d33455f96532ac88115c35b1769db966003c6 Author: Colin Ian King Date: Wed Mar 19 11:30:10 2025 +0000 f2fs: remove redundant assignment to variable err The variable err is being assigned a value zero and then the following goto page_hit reassigns err a new value. The zero assignment is redundant and can be removed. Signed-off-by: Colin Ian King [Jaegeuk Kim: clean up braces and if condition, suggested by Dan Carpenter] Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a27a97f713947b20ba91b23a3ef77fa92d74171b Merge: 5a15a050df7149 7c6fb1cf33fb9a Author: Alexei Starovoitov Date: Wed Apr 9 20:12:54 2025 -0700 Merge branch 'bpf-support-atomic-update-for-htab-of-maps' Hou Tao says: ==================== bpf: Support atomic update for htab of maps From: Hou Tao Hi, The motivation for the patch set comes from the question raised by Cody Haas [1]. When trying to concurrently lookup and update an existing element in a htab of maps, the lookup procedure may return -ENOENT unexpectedly. The first revision of the patch set tried to resolve the problem by making the insertion of the new element and the deletion of the old element being atomic from the perspective of the lookup process. While the solution would benefit all hash maps, it does not fully resolved the problem due to the immediate reuse issue. Therefore, in v2 of the patch set, it only fixes the problem for fd htab. Please see individual patches for details. Comments are always welcome. v3: * rebase on bpf_next/for-next * add Acked-by tags v2: https://lore.kernel.org/bpf/20250308135110.953269-1-houtao@huaweicloud.com/ * only support atomic update for fd htab v1: https://lore.kernel.org/bpf/20250204082848.13471-1-hotforest@gmail.com [1]: https://lore.kernel.org/xdp-newbies/CAH7f-ULFTwKdoH_t2SFc5rWCVYLEg-14d1fBYWH2eekudsnTRg@mail.gmail.com/ ==================== Link: https://patch.msgid.link/20250401062250.543403-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 7c6fb1cf33fb9a7b89a0d9feada957d0fe56de6f Author: Hou Tao Date: Tue Apr 1 14:22:50 2025 +0800 selftests/bpf: Add test case for atomic update of fd htab Add a test case to verify the atomic update of existing elements in the htab of maps. The test proceeds in three steps: 1) fill the outer map with keys in the range [0, 8] For each inner array map, the value of its first element is set as the key used to lookup the inner map. 2) create 16 threads to lookup these keys concurrently Each lookup thread first lookups the inner map, then it checks whether the first value of the inner array map is the same as the key used to lookup the inner map. 3) create 8 threads to overwrite these keys concurrently Each update thread first creates an inner array, it sets the first value of the array to the key used to update the outer map, then it uses the key and the inner map to update the outer map. Without atomic update support, the lookup operation may return -ENOENT during the lookup of outer map, or return -EINVAL during the comparison of the first value in the inner map and the key used for inner map, and the test will fail. After the atomic update change, both the lookup and the comparison will succeed. Given that the update of outer map is slow, the test case sets the loop number for each thread as 5 to reduce the total running time. However, the loop number could also be adjusted through FD_HTAB_LOOP_NR environment variable. Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-7-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 6704b1e8cfc5eed264065735fe00a1dd8a0bffef Author: Hou Tao Date: Tue Apr 1 14:22:49 2025 +0800 bpf: Don't allocate per-cpu extra_elems for fd htab The update of element in fd htab is in-place now, therefore, there is no need to allocate per-cpu extra_elems, just remove it. Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit e8a65856c75d518d0bb15f38c90a4fd264ba1d3a Author: Hou Tao Date: Tue Apr 1 14:22:48 2025 +0800 bpf: Add is_fd_htab() helper Add is_fd_htab() helper to check whether the map is htab of maps. Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 2c304172e03193bd02363ee8969444261f7b7a57 Author: Hou Tao Date: Tue Apr 1 14:22:47 2025 +0800 bpf: Support atomic update for htab of maps As reported by Cody Haas [1], when there is concurrent map lookup and map update operation in an existing element for htab of maps, the map lookup procedure may return -ENOENT unexpectedly. The root cause is twofold: 1) the update of existing element involves two separated list operation In htab_map_update_elem(), it first inserts the new element at the head of list, then it deletes the old element. Therefore, it is possible a lookup operation has already iterated to the middle of the list when a concurrent update operation begins, and the lookup operation will fail to find the target element. 2) the immediate reuse of htab element. It is more subtle. Even through the lookup operation finds the old element, it is possible that the target element has been removed by a concurrent update operation, and the element has been reused immediately by other update operation which runs on the same CPU as the previous update operation, and the element is inserted into the same bucket list. After these steps above, when the lookup operation tries to compare the key in the old element with the expected key, the match will fail because the key in the old element have been overwritten by other update operation. The two-step update process is relatively straightforward to address. The more challenging aspect is the immediate reuse. As Alexei pointed out: So since 2022 both prealloc and no_prealloc reuse elements. We can consider a new flag for the hash map like F_REUSE_AFTER_RCU_GP that will use _rcu() flavor of freeing into bpf_ma, but it has to have a strong reason. Given that htab of maps doesn't support special field in value and directly stores the inner map pointer in htab_element, just do in-place update for htab of maps instead of attempting to address the immediate reuse issue. [1]: https://lore.kernel.org/xdp-newbies/CAH7f-ULFTwKdoH_t2SFc5rWCVYLEg-14d1fBYWH2eekudsnTRg@mail.gmail.com/ Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 5771e306b6cd8ce5b9935d006765f887f145e6d5 Author: Hou Tao Date: Tue Apr 1 14:22:46 2025 +0800 bpf: Rename __htab_percpu_map_update_elem to htab_map_update_elem_in_place Rename __htab_percpu_map_update_elem to htab_map_update_elem_in_place, and add a new percpu argument for the helper to support in-place update for both per-cpu htab and htab of maps. Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit ba2b31b0f39fca12abbd21c53a92838bbc026023 Author: Hou Tao Date: Tue Apr 1 14:22:45 2025 +0800 bpf: Factor out htab_elem_value helper() All hash maps store map key and map value together. The relative offset of the map value compared to the map key is round_up(key_size, 8). Therefore, factor out a common helper htab_elem_value() to calculate the address of the map value instead of duplicating the logic. Acked-by: Andrii Nakryiko Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250401062250.543403-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 5a15a050df714959f0d5a57ac3201bd1c6594984 Author: Paul Chaignon Date: Tue Apr 8 11:00:51 2025 +0200 bpf: Clarify the meaning of BPF_F_PSEUDO_HDR In the bpf_l4_csum_replace helper, the BPF_F_PSEUDO_HDR flag should only be set if the modified header field is part of the pseudo-header. If you modify for example the UDP ports and pass BPF_F_PSEUDO_HDR, inet_proto_csum_replace4 will update skb->csum even though it shouldn't (the port and the UDP checksum updates null each other). Signed-off-by: Paul Chaignon Link: https://lore.kernel.org/r/5126ef84ba75425b689482cbc98bffe75e5d8ab0.1744102490.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov commit b412fd6bcc4c1696b0674434f56b198950c0e2bf Author: Paul Chaignon Date: Tue Apr 8 11:00:04 2025 +0200 bpf: Clarify role of BPF_F_RECOMPUTE_CSUM BPF_F_RECOMPUTE_CSUM doesn't update the actual L3 and L4 checksums in the packet, but simply updates skb->csum (according to skb->ip_summed). This patch clarifies that to avoid confusions. Signed-off-by: Paul Chaignon Link: https://lore.kernel.org/r/ff6895d42936f03dbb82334d8bcfd50e00c79086.1744102490.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov commit 690d43d3b36b154d39eb7b0283f5f65582a49d90 Merge: 727d00a51f1010 7b2fa44de5e718 Author: Alexei Starovoitov Date: Wed Apr 9 19:59:00 2025 -0700 Merge branch 'bpf-sockmap-fix-data-loss-and-panic-issues' Jiayuan Chen says: ==================== bpf, sockmap: Fix data loss and panic issues I was writing a benchmark based on sockmap + TCP and discovered several issues: 1. When EAGAIN occurs, the direction of skb is incorrect, causing data loss when retry. 2. When sending partial data, the offset is not recorded, leading to duplicate data being sent when retry. 3. An unexpected BUG_ON() judgment in skb_linearize is triggered. 4. The memory of psock->ingress_skb is not limited by the socket buffer and memcg. Issues 1, 2, and 3 are described in each patch's commit message. Regarding issue 4, this patchset does not cover it as it is difficult to handle in practice, and I am still working on it. Here is a brief description of the issue: When using sockmap to skb/stream redirect, if the receiving end does not perform read operations, all data will be buffered in ingress_skb. For example: ''' // set memory limit to 50G cgcreate -g memory:myGroup cgset -r memory.max="5000M" myGroup // start benchmark and disable consumer from reading cgexec -g "memory:myGroup" ./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress --delay-consumer=-1 -d 100 Iter 0 ( 29.179us): Send Speed 2668.548 MB/s (20360.406 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 1 ( -7.237us): Send Speed 2694.467 MB/s (20557.149 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 2 ( -1.918us): Send Speed 2693.404 MB/s (20548.039 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 3 ( -0.684us): Send Speed 2693.138 MB/s (20548.014 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 4 ( 7.879us): Send Speed 2698.620 MB/s (20588.838 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 5 ( -3.224us): Send Speed 2696.553 MB/s (20573.066 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 6 ( -5.409us): Send Speed 2699.705 MB/s (20597.111 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) Iter 7 ( -0.439us): Send Speed 2699.691 MB/s (20597.009 calls/s), ... Rcv Speed 0.000 MB/s ( 0.000 calls/s) ... // memory usage are not limited cat /proc/slabinfo | grep skb skbuff_small_head 11824024 11824024 704 46 8 : tunables 0 0 0 : slabdata 257044 257044 0 skbuff_fclone_cache 11822080 11822080 512 32 4 : tunables 0 0 0 : slabdata 369440 369440 0 ''' Thus, a simple socket in a large file upload/download model can eat the entire OS memory. We must charge the skb memory to psock->sk, and if we do not want losing skb, we need to feedback the error info to read_sock/read_skb when the enqueue operation of psock->ingress_skb fails. --- My another patch related to stability also requires maintainers to spare some time from their busy schedules for review. https://lore.kernel.org/bpf/20250317092257.68760-1-jiayuan.chen@linux.dev/T/#t ==================== Link: https://patch.msgid.link/20250407142234.47591-1-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 7b2fa44de5e718a3053dea37e4a3d893b0f40e42 Author: Jiayuan Chen Date: Mon Apr 7 22:21:23 2025 +0800 selftest/bpf/benchs: Add benchmark for sockmap usage Add TCP+sockmap-based benchmark. Since sockmap's own update and delete operations are generally less critical, the performance of the fast forwarding framework built upon it is the key aspect. Also with cgset/cgexec, we can observe the behavior of sockmap under memory pressure. The benchmark can be run with: ''' ./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress ''' In the future, we plan to move socket_helpers.h out of the prog_tests directory to make it accessible for the benchmark. This will enable better support for various socket types. Signed-off-by: Jiayuan Chen Link: https://lore.kernel.org/r/20250407142234.47591-5-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 5ca2e29f6834c64c0e5a9ccf1278c21fb49b827e Author: Jiayuan Chen Date: Mon Apr 7 22:21:22 2025 +0800 bpf, sockmap: Fix panic when calling skb_linearize The panic can be reproduced by executing the command: ./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress --rx-strp 100000 Then a kernel panic was captured: ''' [ 657.460555] kernel BUG at net/core/skbuff.c:2178! [ 657.462680] Tainted: [W]=WARN [ 657.463287] Workqueue: events sk_psock_backlog ... [ 657.469610] [ 657.469738] ? die+0x36/0x90 [ 657.469916] ? do_trap+0x1d0/0x270 [ 657.470118] ? pskb_expand_head+0x612/0xf40 [ 657.470376] ? pskb_expand_head+0x612/0xf40 [ 657.470620] ? do_error_trap+0xa3/0x170 [ 657.470846] ? pskb_expand_head+0x612/0xf40 [ 657.471092] ? handle_invalid_op+0x2c/0x40 [ 657.471335] ? pskb_expand_head+0x612/0xf40 [ 657.471579] ? exc_invalid_op+0x2d/0x40 [ 657.471805] ? asm_exc_invalid_op+0x1a/0x20 [ 657.472052] ? pskb_expand_head+0xd1/0xf40 [ 657.472292] ? pskb_expand_head+0x612/0xf40 [ 657.472540] ? lock_acquire+0x18f/0x4e0 [ 657.472766] ? find_held_lock+0x2d/0x110 [ 657.472999] ? __pfx_pskb_expand_head+0x10/0x10 [ 657.473263] ? __kmalloc_cache_noprof+0x5b/0x470 [ 657.473537] ? __pfx___lock_release.isra.0+0x10/0x10 [ 657.473826] __pskb_pull_tail+0xfd/0x1d20 [ 657.474062] ? __kasan_slab_alloc+0x4e/0x90 [ 657.474707] sk_psock_skb_ingress_enqueue+0x3bf/0x510 [ 657.475392] ? __kasan_kmalloc+0xaa/0xb0 [ 657.476010] sk_psock_backlog+0x5cf/0xd70 [ 657.476637] process_one_work+0x858/0x1a20 ''' The panic originates from the assertion BUG_ON(skb_shared(skb)) in skb_linearize(). A previous commit(see Fixes tag) introduced skb_get() to avoid race conditions between skb operations in the backlog and skb release in the recvmsg path. However, this caused the panic to always occur when skb_linearize is executed. The "--rx-strp 100000" parameter forces the RX path to use the strparser module which aggregates data until it reaches 100KB before calling sockmap logic. The 100KB payload exceeds MAX_MSG_FRAGS, triggering skb_linearize. To fix this issue, just move skb_get into sk_psock_skb_ingress_enqueue. ''' sk_psock_backlog: sk_psock_handle_skb skb_get(skb) <== we move it into 'sk_psock_skb_ingress_enqueue' sk_psock_skb_ingress____________ ↓ | | → sk_psock_skb_ingress_self | sk_psock_skb_ingress_enqueue sk_psock_verdict_apply_________________↑ skb_linearize ''' Note that for verdict_apply path, the skb_get operation is unnecessary so we add 'take_ref' param to control it's behavior. Fixes: a454d84ee20b ("bpf, sockmap: Fix skb refcnt race after locking changes") Signed-off-by: Jiayuan Chen Link: https://lore.kernel.org/r/20250407142234.47591-4-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 3b4f14b794287be137ea2c6158765d1ea1e018a4 Author: Jiayuan Chen Date: Mon Apr 7 22:21:21 2025 +0800 bpf, sockmap: fix duplicated data transmission In the !ingress path under sk_psock_handle_skb(), when sending data to the remote under snd_buf limitations, partial skb data might be transmitted. Although we preserved the partial transmission state (offset/length), the state wasn't properly consumed during retries. This caused the retry path to resend the entire skb data instead of continuing from the previous offset, resulting in data overlap at the receiver side. Fixes: 405df89dd52c ("bpf, sockmap: Improved check for empty queue") Signed-off-by: Jiayuan Chen Link: https://lore.kernel.org/r/20250407142234.47591-3-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 7683167196bd727ad5f3c3fc6a9ca70f54520a81 Author: Jiayuan Chen Date: Mon Apr 7 22:21:20 2025 +0800 bpf, sockmap: Fix data lost during EAGAIN retries We call skb_bpf_redirect_clear() to clean _sk_redir before handling skb in backlog, but when sk_psock_handle_skb() return EAGAIN due to sk_rcvbuf limit, the redirect info in _sk_redir is not recovered. Fix skb redir loss during EAGAIN retries by restoring _sk_redir information using skb_bpf_set_redir(). Before this patch: ''' ./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress Setting up benchmark 'sockmap'... create socket fd c1:13 p1:14 c2:15 p2:16 Benchmark 'sockmap' started. Send Speed 1343.172 MB/s, BPF Speed 1343.238 MB/s, Rcv Speed 65.271 MB/s Send Speed 1352.022 MB/s, BPF Speed 1352.088 MB/s, Rcv Speed 0 MB/s Send Speed 1354.105 MB/s, BPF Speed 1354.105 MB/s, Rcv Speed 0 MB/s Send Speed 1355.018 MB/s, BPF Speed 1354.887 MB/s, Rcv Speed 0 MB/s ''' Due to the high send rate, the RX processing path may frequently hit the sk_rcvbuf limit. Once triggered, incorrect _sk_redir will cause the flow to mistakenly enter the "!ingress" path, leading to send failures. (The Rcv speed depends on tcp_rmem). After this patch: ''' ./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress Setting up benchmark 'sockmap'... create socket fd c1:13 p1:14 c2:15 p2:16 Benchmark 'sockmap' started. Send Speed 1347.236 MB/s, BPF Speed 1347.367 MB/s, Rcv Speed 65.402 MB/s Send Speed 1353.320 MB/s, BPF Speed 1353.320 MB/s, Rcv Speed 65.536 MB/s Send Speed 1353.186 MB/s, BPF Speed 1353.121 MB/s, Rcv Speed 65.536 MB/s ''' Signed-off-by: Jiayuan Chen Link: https://lore.kernel.org/r/20250407142234.47591-2-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 727d00a51f1010a87ad283ecd4780d9c38a2a691 Merge: 967e8def1100cb 05ebde1bcb50a7 Author: Alexei Starovoitov Date: Wed Apr 9 19:57:14 2025 -0700 Merge branch 'bpf-fix-ktls-panic-with-sockmap-and-add-tests' Jiayuan Chen says: ==================== bpf: fix ktls panic with sockmap and add tests We can reproduce the issue using the existing test program: './test_sockmap --ktls' Or use the selftest I provided, which will cause a panic: ------------[ cut here ]------------ kernel BUG at lib/iov_iter.c:629! PKRU: 55555554 Call Trace: ? die+0x36/0x90 ? do_trap+0xdd/0x100 ? iov_iter_revert+0x178/0x180 ? iov_iter_revert+0x178/0x180 ? do_error_trap+0x7d/0x110 ? iov_iter_revert+0x178/0x180 ? exc_invalid_op+0x50/0x70 ? iov_iter_revert+0x178/0x180 ? asm_exc_invalid_op+0x1a/0x20 ? iov_iter_revert+0x178/0x180 ? iov_iter_revert+0x5c/0x180 tls_sw_sendmsg_locked.isra.0+0x794/0x840 tls_sw_sendmsg+0x52/0x80 ? inet_sendmsg+0x1f/0x70 __sys_sendto+0x1cd/0x200 ? find_held_lock+0x2b/0x80 ? syscall_trace_enter+0x140/0x270 ? __lock_release.isra.0+0x5e/0x170 ? find_held_lock+0x2b/0x80 ? syscall_trace_enter+0x140/0x270 ? lockdep_hardirqs_on_prepare+0xda/0x190 ? ktime_get_coarse_real_ts64+0xc2/0xd0 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x90/0x170 1. It looks like the issue started occurring after bpf being introduced to ktls and later the addition of assertions to iov_iter has caused a panic. If my fix tag is incorrect, please assist me in correcting the fix tag. 2. I make minimal changes for now, it's enough to make ktls work correctly. --- v1->v2: Added more content to the commit message https://lore.kernel.org/all/20250123171552.57345-1-mrpre@163.com/#r --- ==================== Link: https://patch.msgid.link/20250219052015.274405-1-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 05ebde1bcb50a71cd56d8edd3008f53a781146e9 Author: Jiayuan Chen Date: Wed Feb 19 13:20:15 2025 +0800 selftests/bpf: add ktls selftest add ktls selftest for sockmap Test results: sockmap_ktls/sockmap_ktls disconnect_after_delete IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls update_fails_when_sock_has_ulp IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls disconnect_after_delete IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls update_fails_when_sock_has_ulp IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls disconnect_after_delete IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls update_fails_when_sock_has_ulp IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls disconnect_after_delete IPv4 SOCKMAP:OK sockmap_ktls/sockmap_ktls update_fails_when_sock_has_ulp IPv4 SOCKMAP:OK sockmap_ktls/tls simple offload:OK sockmap_ktls/tls tx cork:OK sockmap_ktls/tls tx cork with push:OK sockmap_ktls/tls simple offload:OK sockmap_ktls/tls tx cork:OK sockmap_ktls/tls tx cork with push:OK sockmap_ktls:OK Signed-off-by: Jiayuan Chen Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250219052015.274405-3-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit 54a3ecaeeeae8176da8badbd7d72af1017032c39 Author: Jiayuan Chen Date: Wed Feb 19 13:20:14 2025 +0800 bpf: fix ktls panic with sockmap [ 2172.936997] ------------[ cut here ]------------ [ 2172.936999] kernel BUG at lib/iov_iter.c:629! ...... [ 2172.944996] PKRU: 55555554 [ 2172.945155] Call Trace: [ 2172.945299] [ 2172.945428] ? die+0x36/0x90 [ 2172.945601] ? do_trap+0xdd/0x100 [ 2172.945795] ? iov_iter_revert+0x178/0x180 [ 2172.946031] ? iov_iter_revert+0x178/0x180 [ 2172.946267] ? do_error_trap+0x7d/0x110 [ 2172.946499] ? iov_iter_revert+0x178/0x180 [ 2172.946736] ? exc_invalid_op+0x50/0x70 [ 2172.946961] ? iov_iter_revert+0x178/0x180 [ 2172.947197] ? asm_exc_invalid_op+0x1a/0x20 [ 2172.947446] ? iov_iter_revert+0x178/0x180 [ 2172.947683] ? iov_iter_revert+0x5c/0x180 [ 2172.947913] tls_sw_sendmsg_locked.isra.0+0x794/0x840 [ 2172.948206] tls_sw_sendmsg+0x52/0x80 [ 2172.948420] ? inet_sendmsg+0x1f/0x70 [ 2172.948634] __sys_sendto+0x1cd/0x200 [ 2172.948848] ? find_held_lock+0x2b/0x80 [ 2172.949072] ? syscall_trace_enter+0x140/0x270 [ 2172.949330] ? __lock_release.isra.0+0x5e/0x170 [ 2172.949595] ? find_held_lock+0x2b/0x80 [ 2172.949817] ? syscall_trace_enter+0x140/0x270 [ 2172.950211] ? lockdep_hardirqs_on_prepare+0xda/0x190 [ 2172.950632] ? ktime_get_coarse_real_ts64+0xc2/0xd0 [ 2172.951036] __x64_sys_sendto+0x24/0x30 [ 2172.951382] do_syscall_64+0x90/0x170 ...... After calling bpf_exec_tx_verdict(), the size of msg_pl->sg may increase, e.g., when the BPF program executes bpf_msg_push_data(). If the BPF program sets cork_bytes and sg.size is smaller than cork_bytes, it will return -ENOSPC and attempt to roll back to the non-zero copy logic. However, during rollback, msg->msg_iter is reset, but since msg_pl->sg.size has been increased, subsequent executions will exceed the actual size of msg_iter. ''' iov_iter_revert(&msg->msg_iter, msg_pl->sg.size - orig_size); ''' The changes in this commit are based on the following considerations: 1. When cork_bytes is set, rolling back to non-zero copy logic is pointless and can directly go to zero-copy logic. 2. We can not calculate the correct number of bytes to revert msg_iter. Assume the original data is "abcdefgh" (8 bytes), and after 3 pushes by the BPF program, it becomes 11-byte data: "abc?de?fgh?". Then, we set cork_bytes to 6, which means the first 6 bytes have been processed, and the remaining 5 bytes "?fgh?" will be cached until the length meets the cork_bytes requirement. However, some data in "?fgh?" is not within 'sg->msg_iter' (but in msg_pl instead), especially the data "?" we pushed. So it doesn't seem as simple as just reverting through an offset of msg_iter. 3. For non-TLS sockets in tcp_bpf_sendmsg, when a "cork" situation occurs, the user-space send() doesn't return an error, and the returned length is the same as the input length parameter, even if some data is cached. Additionally, I saw that the current non-zero-copy logic for handling corking is written as: ''' line 1177 else if (ret != -EAGAIN) { if (ret == -ENOSPC) ret = 0; goto send_end; ''' So it's ok to just return 'copied' without error when a "cork" situation occurs. Fixes: fcb14cb1bdac ("new iov_iter flavour - ITER_UBUF") Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Signed-off-by: Jiayuan Chen Acked-by: John Fastabend Link: https://lore.kernel.org/r/20250219052015.274405-2-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov commit a9843689e2de1a3727d58b4225e4f8664937aefd Author: Mengyuan Lou Date: Tue Apr 8 17:15:56 2025 +0800 net: txgbe: add sriov function support Add sriov_configure for driver ops. Add mailbox handler wx_msg_task for txgbe. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/ECDC57CF4F2316B9+20250408091556.9640-7-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 877253d2cbf224ef5d1f239c8fd9bd2ad37d2cbe Author: Mengyuan Lou Date: Tue Apr 8 17:15:55 2025 +0800 net: ngbe: add sriov function support Add sriov_configure for driver ops. Add mailbox handler wx_msg_task for ngbe in the interrupt handler. Add the notification flow when the vfs exist. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/C9A0A43732966022+20250408091556.9640-6-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 359e41f63155408e16588c810145def7801ea3ac Author: Mengyuan Lou Date: Tue Apr 8 17:15:54 2025 +0800 net: libwx: Add msg task func Implement wx_msg_task which is used to process mailbox messages sent by vf. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/8257B39B95CDB469+20250408091556.9640-5-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit c52d4b898901f697c3b0b1bc2c61480b70dcc976 Author: Mengyuan Lou Date: Tue Apr 8 17:15:53 2025 +0800 net: libwx: Redesign flow when sriov is enabled Reallocate queue and int resources when sriov is enabled. Redefine macro VMDQ to make it work in VT mode. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/64B616774ABE3C5A+20250408091556.9640-4-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 9bfd65980f8d9786cf4159ef1cbdfd7e43ec39f4 Author: Mengyuan Lou Date: Tue Apr 8 17:15:52 2025 +0800 net: libwx: Add sriov api for wangxun nics Implement sriov_configure interface for wangxun nics in libwx. Enable VT mode and initialize vf control structure, when sriov is enabled. Do not be allowed to disable sriov when vfs are assigned. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/81EA45C21B0A98B0+20250408091556.9640-3-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 29264a372da9a3d2a087953756cf3a28e79f7317 Author: Mengyuan Lou Date: Tue Apr 8 17:15:51 2025 +0800 net: libwx: Add mailbox api for wangxun pf drivers Implements the mailbox interfaces for wangxun pf drivers ngbe and txgbe. Signed-off-by: Mengyuan Lou Link: https://patch.msgid.link/70017BD4D67614A4+20250408091556.9640-2-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 6a07e3af4973402fa199a80036c10060b922c92c Author: Linus Walleij Date: Tue Apr 8 11:26:58 2025 +0200 net: ethernet: cortina: Use TOE/TSO on all TCP It is desireable to push the hardware accelerator to also process non-segmented TCP frames: we pass the skb->len to the "TOE/TSO" offloader and it will handle them. Without this quirk the driver becomes unstable and lock up and and crash. I do not know exactly why, but it is probably due to the TOE (TCP offload engine) feature that is coupled with the segmentation feature - it is not possible to turn one part off and not the other, either both TOE and TSO are active, or neither of them. Not having the TOE part active seems detrimental, as if that hardware feature is not really supposed to be turned off. The datasheet says: "Based on packet parsing and TCP connection/NAT table lookup results, the NetEngine puts the packets belonging to the same TCP connection to the same queue for the software to process. The NetEngine puts incoming packets to the buffer or series of buffers for a jumbo packet. With this hardware acceleration, IP/TCP header parsing, checksum validation and connection lookup are offloaded from the software processing." After numerous tests with the hardware locking up after something between minutes and hours depending on load using iperf3 I have concluded this is necessary to stabilize the hardware. Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20250408-gemini-ethernet-tso-always-v1-1-e669f932359c@linaro.org Signed-off-by: Jakub Kicinski commit 29582e0ea75c95668d168b12406e3c56cf5a73c4 Author: Matthew Brost Date: Tue Apr 8 08:59:15 2025 -0700 drm/xe: Add page queue multiplier For an unknown reason the math to determine the PF queue size does is not correct - compute UMD applications are overflowing the PF queue which is fatal. A multippier of 8 fixes the problem. Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size") Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost Reviewed-by: Jagmeet Randhawa Link: https://lore.kernel.org/r/20250408155915.78770-1-matthew.brost@intel.com commit 330689f757a7b31794b9887788da679be2d03248 Merge: 229671ac60e298 0ffb594212a017 Author: Jakub Kicinski Date: Wed Apr 9 19:13:46 2025 -0700 Merge branch 'bridge-prevent-unicast-arp-ns-packets-from-being-suppressed-by-bridge' Amit Cohen says: ==================== bridge: Prevent unicast ARP/NS packets from being suppressed by bridge Currently, unicast ARP requests/NS packets are replied by bridge when suppression is enabled, then they are also forwarded, which results two replicas of ARP reply/NA - one from the bridge and second from the target. The purpose of ARP/ND suppression is to reduce flooding in the broadcast domain, which is not relevant for unicast packets. In addition, the use case of unicast ARP/NS is to poll a specific host, so it does not make sense to have the switch answer on behalf of the host. Forward ARP requests/NS packets and prevent the bridge from replying to them. Patch set overview: Patch #1 prevents unicast ARP/NS packets from being suppressed by bridge Patch #2 adds test cases for unicast ARP/NS with suppression enabled ==================== Link: https://patch.msgid.link/cover.1744123493.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 0ffb594212a0175259084b6bdaf62181d42c0491 Author: Amit Cohen Date: Tue Apr 8 17:40:24 2025 +0200 selftests: test_bridge_neigh_suppress: Test unicast ARP/NS with suppression Add test cases to check that unicast ARP/NS packets are replied once, even if ARP/ND suppression is enabled. Without the previous patch: $ ./test_bridge_neigh_suppress.sh ... Unicast ARP, per-port ARP suppression - VLAN 10 ----------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast ARP, suppression on, h1 filter [FAIL] TEST: Unicast ARP, suppression on, h2 filter [ OK ] Unicast ARP, per-port ARP suppression - VLAN 20 ----------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast ARP, suppression on, h1 filter [FAIL] TEST: Unicast ARP, suppression on, h2 filter [ OK ] ... Unicast NS, per-port NS suppression - VLAN 10 --------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast NS, suppression on, h1 filter [FAIL] TEST: Unicast NS, suppression on, h2 filter [ OK ] Unicast NS, per-port NS suppression - VLAN 20 --------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast NS, suppression on, h1 filter [FAIL] TEST: Unicast NS, suppression on, h2 filter [ OK ] ... Tests passed: 156 Tests failed: 4 With the previous patch: $ ./test_bridge_neigh_suppress.sh ... Unicast ARP, per-port ARP suppression - VLAN 10 ----------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast ARP, suppression on, h1 filter [ OK ] TEST: Unicast ARP, suppression on, h2 filter [ OK ] Unicast ARP, per-port ARP suppression - VLAN 20 ----------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast ARP, suppression on, h1 filter [ OK ] TEST: Unicast ARP, suppression on, h2 filter [ OK ] ... Unicast NS, per-port NS suppression - VLAN 10 --------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast NS, suppression on, h1 filter [ OK ] TEST: Unicast NS, suppression on, h2 filter [ OK ] Unicast NS, per-port NS suppression - VLAN 20 --------------------------------------------- TEST: "neigh_suppress" is on [ OK ] TEST: Unicast NS, suppression on, h1 filter [ OK ] TEST: Unicast NS, suppression on, h2 filter [ OK ] ... Tests passed: 160 Tests failed: 0 Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/dc240b9649b31278295189f412223f320432c5f2.1744123493.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 827b2ac8e7968e59b6e6893f6b1d43dec99ef2de Author: Amit Cohen Date: Tue Apr 8 17:40:23 2025 +0200 net: bridge: Prevent unicast ARP/NS packets from being suppressed by bridge When Proxy ARP or ARP/ND suppression are enabled, ARP/NS packets can be handled by bridge in br_do_proxy_suppress_arp()/br_do_suppress_nd(). For broadcast packets, they are replied by bridge, but later they are not flooded. Currently, unicast packets are replied by bridge when suppression is enabled, and they are also forwarded, which results two replicas of ARP reply/NA - one from the bridge and second from the target. RFC 1122 describes use case for unicat ARP packets - "unicast poll" - actively poll the remote host by periodically sending a point-to-point ARP request to it, and delete the entry if no ARP reply is received from N successive polls. The purpose of ARP/ND suppression is to reduce flooding in the broadcast domain. If a host is sending a unicast ARP/NS, then it means it already knows the address and the switches probably know it as well and there will not be any flooding. In addition, the use case of unicast ARP/NS is to poll a specific host, so it does not make sense to have the switch answer on behalf of the host. According to RFC 9161: "A PE SHOULD reply to broadcast/multicast address resolution messages, i.e., ARP Requests, ARP probes, NS messages, as well as DAD NS messages. An ARP probe is an ARP Request constructed with an all-zero sender IP address that may be used by hosts for IPv4 Address Conflict Detection as specified in [RFC5227]. A PE SHOULD NOT reply to unicast address resolution requests (for instance, NUD NS messages)." Forward such requests and prevent the bridge from replying to them. Reported-by: Denis Yulevych Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/6bf745a149ddfe5e6be8da684a63aa574a326f8d.1744123493.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 229671ac60e298b85c2644f52d7e487e9f487d06 Author: Eric Dumazet Date: Tue Apr 8 20:27:42 2025 +0000 net: remove cpu stall in txq_trans_update() txq_trans_update() currently uses txq->xmit_lock_owner to conditionally update txq->trans_start. For regular devices, txq->xmit_lock_owner is updated from HARD_TX_LOCK() and HARD_TX_UNLOCK(), and this apparently causes cpu stalls. Using dev->lltx, which sits in a read-mostly cache-line, and already used in HARD_TX_LOCK() and HARD_TX_UNLOCK() helps cpu prediction. On an AMD EPYC 7B12 dual socket server, tcp_rr with 128 threads and 30,000 flows gets a 5 % increase in throughput. As explained in commit 95ecba62e2fd ("net: fix races in netdev_tx_sent_queue()/dev_watchdog()") I am planning to no longer update txq->trans_start in the fast path in a followup patch. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250408202742.2145516-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 9c056ec6dd1654b1420dafbbe2a69718850e6ff2 Author: Wentao Liang Date: Tue Apr 8 11:26:02 2025 +0800 octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer() The cn10k_free_matchall_ipolicer() calls the cn10k_map_unmap_rq_policer() for each queue in a for loop without checking for any errors. Check the return value of the cn10k_map_unmap_rq_policer() function during each loop, and report a warning if the function fails. Signed-off-by: Wentao Liang Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250408032602.2909-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski commit 311920774c408ce3366888d3817e7e648e9ccf1c Author: Stanislav Fomichev Date: Wed Apr 2 10:23:05 2025 -0700 configs/debug: run and debug PREEMPT Recent change [0] resulted in a "BUG: using __this_cpu_read() in preemptible" splat [1]. PREEMPT kernels have additional requirements on what can and can not run with/without preemption enabled. Expose those constrains in the debug kernels. 0: https://lore.kernel.org/netdev/20250314120048.12569-2-justin.iurman@uliege.be/ 1: https://lore.kernel.org/netdev/20250402094458.006ba2a7@kernel.org/T/#mbf72641e9d7d274daee9003ef5edf6833201f1bc Signed-off-by: Stanislav Fomichev Reviewed-by: Simon Horman Acked-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250402172305.1775226-1-sdf@fomichev.me Signed-off-by: Jakub Kicinski commit 1635eecdd298e46c9abce66695e55587d3957393 Author: Julian Vetter Date: Tue Apr 8 11:19:46 2025 +0200 net: ipvlan: remove __get_unaligned_cpu32 from ipvlan driver The __get_unaligned_cpu32 function is deprecated. So, replace it with the more generic get_unaligned and just cast the input parameter. Signed-off-by: Julian Vetter Link: https://patch.msgid.link/20250408091946.2266271-1-julian@outer-limits.org Signed-off-by: Jakub Kicinski commit e4cb911780231bb5bee35cd164a24bee8a3ef6a4 Author: Julian Vetter Date: Tue Apr 8 11:15:48 2025 +0200 net: remove __get_unaligned_cpu32 from macvlan driver The __get_unaligned_cpu32 function is deprecated. So, replace it with the more generic get_unaligned and just cast the input parameter. Signed-off-by: Julian Vetter Link: https://patch.msgid.link/20250408091548.2263911-1-julian@outer-limits.org Signed-off-by: Jakub Kicinski commit f8cb38c32eb1ba14f82226bee1825e67cffe432f Merge: 420aabef3ab5fa ce7b14947484e6 Author: Jakub Kicinski Date: Wed Apr 9 17:01:54 2025 -0700 Merge branch 'net-depend-on-instance-lock-for-queue-related-netlink-ops' Jakub Kicinski says: ==================== net: depend on instance lock for queue related netlink ops netdev-genl used to be protected by rtnl_lock. In previous release we already switched the queue management ops (for Rx zero-copy) to the instance lock. This series converts other ops to depend on the instance lock when possible. Unfortunately queue related state is hard to lock (unlike NAPI) as the process of switching the number of queues usually involves a large reconfiguration of the driver. The reconfig process has historically been under rtnl_lock, but for drivers which opt into ops locking it is also under the instance lock. Leverage that and conditionally take rtnl_lock or instance lock depending on the device capabilities. v1: https://lore.kernel.org/20250407190117.16528-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250408195956.412733-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ce7b14947484e6190372f2c3dbfb69aafbc4c0fc Author: Jakub Kicinski Date: Tue Apr 8 12:59:55 2025 -0700 netdev: depend on netdev->lock for qstats in ops locked drivers We mostly needed rtnl_lock in qstat to make sure the queue count is stable while we work. For "ops locked" drivers the instance lock protects the queue count, so we don't have to take rtnl_lock. For currently ops-locked drivers: netdevsim and bnxt need the protection from netdev going down while we dump, which instance lock provides. gve doesn't care. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 87eba404f2e1785d410b51a31ff030932194e1c6 Author: Jakub Kicinski Date: Tue Apr 8 12:59:54 2025 -0700 docs: netdev: break down the instance locking info per ops struct Explicitly list all the ops structs and what locking they provide. Use "ops locked" as a term for drivers which have ops called under the instance lock. Acked-by: Stanislav Fomichev Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250408195956.412733-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 99e44f39a8f7138f8b9d2bd87b17fceb483f8998 Author: Jakub Kicinski Date: Tue Apr 8 12:59:53 2025 -0700 netdev: depend on netdev->lock for xdp features Writes to XDP features are now protected by netdev->lock. Other things we report are based on ops which don't change once device has been registered. It is safe to stop taking rtnl_lock, and depend on netdev->lock instead. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 03df156dd3a6d5992f17682cd5c3b11e5ffdae02 Author: Jakub Kicinski Date: Tue Apr 8 12:59:52 2025 -0700 xdp: double protect netdev->xdp_flags with netdev->lock Protect xdp_features with netdev->lock. This way pure readers no longer have to take rtnl_lock to access the field. This includes calling NETDEV_XDP_FEAT_CHANGE under the lock. Looks like that's fine for bonding, the only "real" listener, it's the same as ethtool feature change. In terms of normal drivers - only GVE need special consideration (other drivers don't use instance lock or don't support XDP). It calls xdp_set_features_flag() helper from gve_init_priv() which in turn is called from gve_reset_recovery() (locked), or prior to netdev registration. So switch to _locked. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Acked-by: Harshitha Ramamurthy Acked-by: Martin KaFai Lau Link: https://patch.msgid.link/20250408195956.412733-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d02e3b388221562cc7acabe700e3d3a29e51ad1d Author: Jakub Kicinski Date: Tue Apr 8 12:59:51 2025 -0700 netdev: don't hold rtnl_lock over nl queue info get when possible Netdev queue dump accesses: NAPI, memory providers, XSk pointers. All three are "ops protected" now, switch to the op compat locking. rtnl lock does not have to be taken for "ops locked" devices. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4ec9031cbeb73a66979560bbb6d355329be762de Author: Jakub Kicinski Date: Tue Apr 8 12:59:50 2025 -0700 netdev: add "ops compat locking" helpers Add helpers to "lock a netdev in a backward-compatible way", which for ops-locked netdevs will mean take the instance lock. For drivers which haven't opted into the ops locking we'll take rtnl_lock. The scoped foreach is dropping and re-taking the lock for each device, even if prev and next are both under rtnl_lock. I hope that's fine since we expect that netdev nl to be mostly supported by modern drivers, and modern drivers should also opt into the instance locking. Note that these helpers are mostly needed for queue related state, because drivers modify queue config in their ops in a non-atomic way. Or differently put, queue changes don't have a clear-cut API like NAPI configuration. Any state that can should just use the instance lock directly, not the "compat" hacks. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 606048cbd8346e616cfaee01b0143d072534136d Author: Jakub Kicinski Date: Tue Apr 8 12:59:49 2025 -0700 net: designate XSK pool pointers in queues as "ops protected" Read accesses go via xsk_get_pool_from_qid(), the call coming from the core and gve look safe (other "ops locked" drivers don't support XSK). Write accesses go via xsk_reg_pool_at_qid() and xsk_clear_pool_at_qid(). Former is already under the ops lock, latter is not (both coming from the workqueue via xp_clear_dev() and NETDEV_UNREGISTER via xsk_notifier()). Acked-by: Stanislav Fomichev Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a82dc19db13649aa4232ce37cb6f4ceff851e2fe Author: Jakub Kicinski Date: Tue Apr 8 12:59:48 2025 -0700 net: avoid potential race between netdev_get_by_index_lock() and netns switch netdev_get_by_index_lock() performs following steps: rcu_lock(); dev = lookup(netns, ifindex); dev_get(dev); rcu_unlock(); [... lock & validate the dev ...] return dev Validation right now only checks if the device is registered but since the lookup is netns-aware we must also protect against the device switching netns right after we dropped the RCU lock. Otherwise the caller in netns1 may get a pointer to a device which has just switched to netns2. We can't hold the lock for the entire netns change process (because of the NETDEV_UNREGISTER notifier), and there's no existing marking to indicate that the netns is unlisted because of netns move, so add one. AFAIU none of the existing netdev_get_by_index_lock() callers can suffer from this problem (NAPI code double checks the netns membership and other callers are either under rtnl_lock or not ns-sensitive), so this patch does not have to be treated as a fix. Reviewed-by: Joe Damato Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250408195956.412733-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 967e8def1100cb4b08c28a54d27ce69563fdf281 Author: Saket Kumar Bhaskar Date: Wed Apr 9 15:26:33 2025 +0530 selftests/bpf: Fix bpf_nf selftest failure For systems with missing iptables-legacy tool this selftest fails. Add check to find if iptables-legacy tool is available and skip the test if the tool is missing. Fixes: de9c8d848d90 ("selftests/bpf: S/iptables/iptables-legacy/ in the bpf_nf and xdp_synproxy test") Signed-off-by: Saket Kumar Bhaskar Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250409095633.33653-1-skb99@linux.ibm.com commit a76116f422c442ab691b4dcabb25613486d34360 Author: Tao Chen Date: Mon Apr 7 11:57:52 2025 +0800 bpf: Check link_create.flags parameter for multi_uprobe The link_create.flags are currently not used for multi-uprobes, so return -EINVAL if it is set, same as for other attach APIs. We allow target_fd to have an arbitrary value for multi-uprobe, though, as there are existing users (libbpf) relying on this. Fixes: 89ae89f53d20 ("bpf: Add multi uprobe link") Signed-off-by: Tao Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250407035752.1108927-2-chen.dylane@linux.dev commit 243911982aa9faf4361aa952f879331ad66933fe Author: Tao Chen Date: Mon Apr 7 11:57:51 2025 +0800 bpf: Check link_create.flags parameter for multi_kprobe The link_create.flags are currently not used for multi-kprobes, so return -EINVAL if it is set, same as for other attach APIs. We allow target_fd, on the other hand, to have an arbitrary value for multi-kprobe, as there are existing users (libbpf) relying on this. Fixes: 0dcac2725406 ("bpf: Add multi kprobe link") Signed-off-by: Tao Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250407035752.1108927-1-chen.dylane@linux.dev commit 527b33dda1b564ff09fe330928f08b653bff1514 Merge: 37b1b3ed20c39f b8390dd1e09e1a Author: Andrii Nakryiko Date: Wed Apr 9 16:16:56 2025 -0700 Merge branch 'libbpf-introduce-line_info-and-func_info-getters' Mykyta Yatsenko says: ==================== libbpf: introduce line_info and func_info getters From: Mykyta Yatsenko This patchset introduces new libbpf API getters that enable the retrieval of .BTF.ext line and func info. This change enables users to load bpf_program directly using bpf_prog_load, bypassing the higher-level bpf_object__load API. Providing line and function info is essential for BPF program verification in some cases. v3 -> v5 * Fix tests on s390x, nits. v2 -> v3 * Return ENOTSUPP if func or line info struct size differs from the one in uapi linux headers. * Add selftests. v1 -> v2 Move bpf_line_info_min and bpf_func_info_min from libbpf_internal.h to btf.h. Did not remove _min suffix, because there already are bpf_line_info and bpf_func_info structs in uapi/../bpf.h. ==================== Link: https://patch.msgid.link/20250408234417.452565-1-mykyta.yatsenko5@gmail.com Signed-off-by: Andrii Nakryiko commit b8390dd1e09e1abf73299209e9e7bcc2585b88e6 Author: Mykyta Yatsenko Date: Wed Apr 9 00:44:17 2025 +0100 selftests/bpf: Add BTF.ext line/func info getter tests Add selftests checking that line and func info retrieved by newly added libbpf APIs are the same as returned by kernel via bpf_prog_get_info_by_fd. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250408234417.452565-3-mykyta.yatsenko5@gmail.com commit 243d720e2e5320f7ed09034361aa20b74d8eeb03 Author: Mykyta Yatsenko Date: Wed Apr 9 00:44:16 2025 +0100 libbpf: Add getters for BTF.ext func and line info Introducing new libbpf API getters for BTF.ext func and line info, namely: bpf_program__func_info bpf_program__func_info_cnt bpf_program__line_info bpf_program__line_info_cnt This change enables scenarios, when user needs to load bpf_program directly using `bpf_prog_load`, instead of higher-level `bpf_object__load`. Line and func info are required for checking BTF info in verifier; verification may fail without these fields if, for example, program calls `bpf_obj_new`. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250408234417.452565-2-mykyta.yatsenko5@gmail.com commit 37b1b3ed20c39f8df78d00d1912e67efd3de4f93 Author: Mykyta Yatsenko Date: Tue Apr 8 11:45:44 2025 +0100 selftests/bpf: Support struct/union presets in veristat Extend commit e3c9abd0d14b ("selftests/bpf: Implement setting global variables in veristat") to support applying presets to members of the global structs or unions in veristat. For example: ``` ./veristat set_global_vars.bpf.o -G "union1.struct3.var_u8_h = 0xBB" ``` Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250408104544.140317-1-mykyta.yatsenko5@gmail.com commit 3ded92c439449d69017d7a41c5eda3392d6724c7 Author: Shuicheng Lin Date: Sat Apr 5 17:15:39 2025 +0000 drm/xe: remove unused LE_COS The LE_COS definition missed passing the value parameter to REG_FIELD_PREP. This didn't cause build errors because the entire macro was unused. The value for this field is universally "0" for every MOCS entry on the old Xe_LP platforms, and the whole field has been removed from Xe_HP onward. Just delete the line so that we don't have an unused definition. Suggested-by: Matt Roper Reviewed-by: Matt Roper Cc: Lucas De Marchi Signed-off-by: Shuicheng Lin Link: https://lore.kernel.org/r/20250405171539.599850-1-shuicheng.lin@intel.com Signed-off-by: Matt Roper commit 353bdd7d1456ff601794d2e196ffcb097f131214 Author: Markus Burri Date: Wed Feb 26 16:28:43 2025 +0100 Input: matrix_keypad - detect change during scan For a setup where the matrix keypad is connected over a slow interface (e.g. a gpio-expansion over i2c), the scan can take a longer time to read. Interrupts need to be disabled during scan. And therefore changes in this period are not detected. To improve this situation, scan the matrix again if the row state changed during interrupts disabled. The rescan is repeated until no change is detected anymore. Signed-off-by: Markus Burri Link: https://lore.kernel.org/r/20250226152843.43932-4-markus.burri@mt.com Signed-off-by: Dmitry Torokhov commit a37af8e8c1dc25e097ae1bce98980ad75d5921bc Author: Markus Burri Date: Wed Feb 26 16:28:41 2025 +0100 Input: matrix_keypad - add function for reading row state Move the evaluation of a row state into separate function. It will be also used by a change later in this series. Signed-off-by: Markus Burri Reviewed-by: Manuel Traut Link: https://lore.kernel.org/r/20250226152843.43932-2-markus.burri@mt.com Signed-off-by: Dmitry Torokhov commit 35c3151a98a6e6f56552cff8dc7d59e8ef7aca50 Author: Mike Rapoport (Microsoft) Date: Wed Apr 9 15:28:15 2025 +0300 x86/mm: Consolidate initmem_init() There are 4 wariants of initmem_init(), for 32 and 64 bits and for CONFIG_NUMA enabled and disabled. After commit bbeb69ce3013 ("x86/mm: Remove CONFIG_HIGHMEM64G support") NUMA is not supported on 32 bit kernels anymore, and arch/x86/mm/numa_32.c can be just deleted and setup_bootmem_allocator() with completely misleading name can be folded into initmem_init(). For 64 bits the NUMA variant calls x86_numa_init() and !NUMA variant sets all memory to node 0. The later can be split out into inline helper called x86_numa_init() and then both initmem_init() functions become the same. Split out memblock_set_node() from initmem_init() for !NUMA on 64 bit into x86_numa_init() helper and remove arch/x86/mm/numa_*.c that only contained initmem_init() variants for NUMA configs. Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Ingo Molnar Cc: Ard Biesheuvel Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: David Woodhouse Cc: Rafael J. Wysocki Cc: Len Brown Link: https://lore.kernel.org/r/20250409122815.420041-1-rppt@kernel.org commit 78a84fbfa4ffc4bb6e95560a909b2ac3efa0aad2 Merge: 60567e93c05d70 0af2f6be1b4281 Author: Ingo Molnar Date: Wed Apr 9 22:00:25 2025 +0200 Merge tag 'v6.15-rc1' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 8a7bb74a79d4324bf09e78f5a941521dea83a24f Author: Antonio Quartulli Date: Mon Mar 17 13:39:59 2025 +0100 batman-adv: no need to start/stop queue on mesh-iface The batman-adv mesh-iface is flagged with IFF_NO_QUEUE, therefore there is no reason to start/stop any queue in ndo_open/close. Signed-off-by: Antonio Quartulli Signed-off-by: Simon Wunderlich commit d699628dae07038cf21fe288ac00c0a0062b4e0d Author: Matthias Schiffer Date: Tue Apr 8 17:53:36 2025 +0200 batman-adv: constify and move broadcast addr definition The variable is used only once and is read-only. Make it a const local variable. Signed-off-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 6f9bd8ae0340326a7c711bc681321bf9a4e15fb2 Author: Mateusz Guzik Date: Tue Apr 1 22:30:29 2025 +0200 x86/uaccess: Predict valid_user_address() returning true This works around what seems to be an optimization bug in GCC (at least 13.3.0), where it predicts access_ok() to fail despite the hint to the contrary. _copy_to_user() contains: if (access_ok(to, n)) { instrument_copy_to_user(to, from, n); n = raw_copy_to_user(to, from, n); } Where access_ok() is likely(__access_ok(addr, size)), yet the compiler emits conditional jumps forward for the case where it succeeds: <+0>: endbr64 <+4>: mov %rdx,%rcx <+7>: mov %rdx,%rax <+10>: xor %edx,%edx <+12>: add %rdi,%rcx <+15>: setb %dl <+18>: movabs $0x123456789abcdef,%r8 <+28>: test %rdx,%rdx <+31>: jne 0xffffffff81b3b7c6 <_copy_to_user+38> <+33>: cmp %rcx,%r8 <+36>: jae 0xffffffff81b3b7cb <_copy_to_user+43> <+38>: jmp 0xffffffff822673e0 <__x86_return_thunk> <+43>: nop <+44>: nop <+45>: nop <+46>: mov %rax,%rcx <+49>: rep movsb %ds:(%rsi),%es:(%rdi) <+51>: nop <+52>: nop <+53>: nop <+54>: mov %rcx,%rax <+57>: nop <+58>: nop <+59>: nop <+60>: jmp 0xffffffff822673e0 <__x86_return_thunk> Patching _copy_to_user() to likely() around the access_ok() use does not change the asm. However, spelling out the prediction *within* valid_user_address() does the trick: <+0>: endbr64 <+4>: xor %eax,%eax <+6>: mov %rdx,%rcx <+9>: add %rdi,%rdx <+12>: setb %al <+15>: movabs $0x123456789abcdef,%r8 <+25>: test %rax,%rax <+28>: jne 0xffffffff81b315e6 <_copy_to_user+54> <+30>: cmp %rdx,%r8 <+33>: jb 0xffffffff81b315e6 <_copy_to_user+54> <+35>: nop <+36>: nop <+37>: nop <+38>: rep movsb %ds:(%rsi),%es:(%rdi) <+40>: nop <+41>: nop <+42>: nop <+43>: nop <+44>: nop <+45>: nop <+46>: mov %rcx,%rax <+49>: jmp 0xffffffff82255ba0 <__x86_return_thunk> <+54>: mov %rcx,%rax <+57>: jmp 0xffffffff82255ba0 <__x86_return_thunk> Since we kinda expect valid_user_address() to be likely anyway, add the likely() annotation that also happens to work around this compiler bug. [ mingo: Moved the unlikely() branch into valid_user_address() & updated the changelog ] Signed-off-by: Mateusz Guzik Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250401203029.1132135-1-mjguzik@gmail.com commit 6ce0fdaae043803bb324d915ce0fe43316bf1e81 Merge: e29c5d0e5dc35e 0af2f6be1b4281 Author: Ingo Molnar Date: Wed Apr 9 21:39:43 2025 +0200 Merge tag 'v6.15-rc1' into x86/asm, to refresh the branch Signed-off-by: Ingo Molnar commit 6cb9441bfe8dd7fb91134de3c40c33fbbf0ed4c5 Author: Sudeep Holla Date: Mon Mar 17 10:13:20 2025 +0000 ACPI: APEI: EINJ: Transition to the faux device interface The APEI error injection driver does not require the creation of a platform device. Originally, this approach was chosen for simplicity when the driver was first implemented. With the introduction of the lightweight faux device interface, we now have a more appropriate alternative. Migrate the driver to utilize the faux bus, given that the platform device it previously created was not a real one anyway. This will simplify the code, reducing its footprint while maintaining functionality. Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20250317-plat2faux_dev-v1-8-5fe67c085ad5@arm.com Signed-off-by: Rafael J. Wysocki commit 60567e93c05d7064c93830cf4bf0d2c58f11b2f2 Author: Malaya Kumar Rout Date: Wed Apr 9 19:23:37 2025 +0530 selftests/x86/lam: Fix clean up fds in do_uring() and allocate_dsa_pasid() Resolve minor fd leaks reported by cppcheck in lam.c. Specifically, the 'file_fd' and 'fd' were not closed in do_uring() and allocate_dsa_pasid() functions, respectively. cppcheck output before this patch: tools/testing/selftests/x86/lam.c:685:3: error: Resource leak: file_fd [resourceLeak] tools/testing/selftests/x86/lam.c:693:3: error: Resource leak: file_fd [resourceLeak] tools/testing/selftests/x86/lam.c:1195:2: error: Resource leak: fd [resourceLeak] cppcheck output after this patch: No resource leaks found While this is a standalone test tool that doesn't really leak anything in practice, as exit() cleans it up all, clean up resources nevertheless. [ mingo: Updated the changelog. ] Signed-off-by: Malaya Kumar Rout Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250409135341.28987-1-malayarout91@gmail.com commit 855c634930f04c21434fae9c41a7a7372b6ac879 Author: Philipp Stanner Date: Thu Mar 27 12:07:08 2025 +0100 PCI: Remove pcim_iounmap_regions() All users of the deprecated function pcim_iounmap_regions() have been ported by now. Remove it. Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Reviewed-by: Zijun Hu Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250327110707.20025-4-phasta@kernel.org commit ebf7547fd1df2db32b83de6f341c7bd9f0e98200 Author: Philipp Stanner Date: Thu Mar 27 12:07:07 2025 +0100 mtip32xx: Remove unnecessary pcim_iounmap_regions() calls pcim_iounmap_regions() is deprecated. Moreover, it is not necessary to call it in the driver's remove() function or if probe() fails, since it does cleanup automatically on driver detach. Remove all calls to pcim_iounmap_regions(). Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Jens Axboe Acked-by: Mark Brown Link: https://patch.msgid.link/20250327110707.20025-3-phasta@kernel.org commit eaff6b62d3439ca6ee00dba4f77673a8c37dac20 Author: Rafael J. Wysocki Date: Fri Mar 28 21:48:54 2025 +0100 cpufreq: Pass policy pointer to ->update_limits() Since cpufreq_update_limits() obtains a cpufreq policy pointer for the given CPU and reference counts the corresponding policy object, it may as well pass the policy pointer to the cpufreq driver's ->update_limits() callback which allows that callback to avoid invoking cpufreq_cpu_get() for the same CPU. Accordingly, redefine ->update_limits() to take a policy pointer instead of a CPU number and update both drivers implementing it, intel_pstate and amd-pstate, as needed. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Srinivas Pandruvada Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/8560367.NyiUUSuA9g@rjwysocki.net commit 684e1855211145b71f8d9aaa49d2cc67067cd42a Author: Rafael J. Wysocki Date: Fri Mar 28 21:47:31 2025 +0100 cpufreq: Introduce cpufreq_policy_refresh() Since cpufreq_update_limits() obtains a cpufreq policy pointer for the given CPU and reference counts the object pointed to by it, calling cpufreq_update_policy() from cpufreq_update_limits() is somewhat wasteful because that function calls cpufreq_cpu_get() on the same CPU again. To avoid that unnecessary overhead, move the part of the code running under the policy rwsem from cpufreq_update_policy() to a new function called cpufreq_policy_refresh() and invoke that new function from both cpufreq_update_policy() and cpufreq_update_limits(). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/6047110.MhkbZ0Pkbq@rjwysocki.net commit ece898da386214cf9bf693fe21694b556b785428 Author: Rafael J. Wysocki Date: Fri Mar 28 21:46:22 2025 +0100 cpufreq: Use __free() for policy reference counting cleanup Use __free() for policy reference counting cleanup where applicable in the cpufreq core. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/9437968.CDJkKcVGEf@rjwysocki.net commit c7282dce257480f0f22ed3db69cfb400a18709f4 Author: Rafael J. Wysocki Date: Fri Mar 28 21:45:38 2025 +0100 cpufreq: Drop cpufreq_cpu_acquire() and cpufreq_cpu_release() Since cpufreq_cpu_acquire() and cpufreq_cpu_release() have no more users in the tree, remove them. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/3880470.kQq0lBPeGt@rjwysocki.net commit 9a74bfdfd07f99b09fa4aaccacd17248b8629a07 Author: Rafael J. Wysocki Date: Fri Mar 28 21:44:50 2025 +0100 cpufreq: Use locking guard and __free() in cpufreq_update_policy() Instead of using cpufreq_cpu_acquire() and cpufreq_cpu_release() in cpufreq_update_policy(), which is the last user of these functions, make it use __free() for policy reference counting cleanup and the "write" locking guard for policy locking. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/22654186.EfDdHjke4D@rjwysocki.net commit 973207ae3d7c3c92df4a382df5d7bd695deaa904 Author: Rafael J. Wysocki Date: Fri Mar 28 21:43:46 2025 +0100 cpufreq: intel_pstate: Rearrange max frequency updates handling code Rename __intel_pstate_update_max_freq() to intel_pstate_update_max_freq() and move the cpufreq policy reference counting and locking into it (and implement the locking with the recently introduced cpufreq policy "write" locking guard). No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mario Limonciello Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/2315023.iZASKD2KPV@rjwysocki.net commit 6fec833b9d70c54ceacbf7d07665215fbd0cddef Author: Rafael J. Wysocki Date: Fri Mar 28 21:42:48 2025 +0100 cpufreq: Add and use cpufreq policy locking guards Introduce "read" and "write" locking guards for cpufreq policies and use them where applicable in the cpufreq core. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/8518682.T7Z3S40VBb@rjwysocki.net commit 68974e3a15b92639396f39d1cd09d5288ba687bc Author: Rafael J. Wysocki Date: Fri Mar 28 21:41:49 2025 +0100 cpufreq: Split cpufreq_online() In preparation for the introduction of cpufreq policy locking guards, move the part of cpufreq_online() that is carried out under the policy rwsem into a separate function called cpufreq_policy_online(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/3354747.aeNJFYEL58@rjwysocki.net commit 0df6db767a535472a46aeea93c280de067784a9f Author: Eric Dumazet Date: Wed Apr 2 13:31:14 2025 +0000 posix-timers: Initialize cache early and move pointer into __timer_data Move posix_timers_cache initialization to posixtimer_init(). At that point the memory subsystem is already up and running. Also move the cache pointer to the __timer_data variable to avoid potential false sharing, since it never was marked as __ro_after_init. Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250402133114.253901-1-edumazet@google.com commit 387b51709db546033cf9a940860b6614a5cda5b6 Author: Rafael J. Wysocki Date: Fri Mar 28 21:40:43 2025 +0100 cpufreq: Consolidate some code in cpufreq_online() Notice that the policy->cpu update in cpufreq_policy_alloc() can be moved to cpufreq_online() and then it can be carried out under the policy rwsem, along with the clearing of policy->governor (unnecessary in the "new policy" code branch, but also not harmful). If this is done, the bottom parts of the "if (policy)" branches become identical and they can be collapsed and moved below the conditional. Modify the code accordingly which makes it somewhat easier to follow. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Reviewed-by: Mario Limonciello Acked-by: Sudeep Holla Tested-by: Sudeep Holla Link: https://patch.msgid.link/13741234.uLZWGnKmhe@rjwysocki.net commit 0b304617936094b1e55c0b3e5903ce7d4f1bc32b Author: Tejun Heo Date: Wed Apr 9 09:06:00 2025 -1000 sched_ext: Make scx_has_op a bitmap scx_has_op is used to encode which ops are implemented by the BPF scheduler into an array of static_keys. While this saves a bit of branching overhead, that is unlikely to be noticeable compared to the overall cost. As the global static_keys can't work with the planned hierarchical multiple scheduler support, replace the static_key array with a bitmap. In repeated hackbench runs before and after static_keys removal on an AMD Ryzen 3900X, I couldn't tell any measurable performance difference. Signed-off-by: Tejun Heo Acked-by: Changwoo Min Acked-by: Andrea Righi commit 743354e3bb7238552cda70a5f39ba6e946a899fd Author: Tejun Heo Date: Wed Apr 9 09:06:00 2025 -1000 sched_ext: Remove scx_ops_allow_queued_wakeup static_key scx_ops_allow_queued_wakeup is used to encode SCX_OPS_ALLOW_QUEUED_WAKEUP into a static_key. The test is gated behind scx_enabled(), and, even when sched_ext is enabled, is unlikely for the static_key usage to make any meaningful difference. It is made to use a static_key mostly because there was no reason not to. However, global static_keys can't work with the planned hierarchical multiple scheduler support. Remove the static_key and instead test SCX_OPS_ALLOW_QUEUED_WAKEUP directly. In repeated hackbench runs before and after static_keys removal on an AMD Ryzen 3900X, I couldn't tell any measurable performance difference. Signed-off-by: Tejun Heo Acked-by: Changwoo Min Acked-by: Andrea Righi commit 54d2e717bc5f419b111915adfdec7ecc1ca8cf90 Author: Tejun Heo Date: Wed Apr 9 09:06:00 2025 -1000 sched_ext: Remove scx_ops_cpu_preempt static_key scx_ops_cpu_preempt is used to encode whether ops.cpu_acquire/release() are implemented into a static_key. These tests aren't hot enough for static_key usage to make any meaningful difference and are made to use a static_key mostly because there was no reason not to. However, global static_keys can't work with the planned hierarchical multiple scheduler support. Remove the static_key and instead use an internal ops flag SCX_OPS_HAS_CPU_PREEMPT to record and test whether ops.cpu_acquire/release() are implemented. In repeated hackbench runs before and after static_keys removal on an AMD Ryzen 3900X, I couldn't tell any measurable performance difference. Signed-off-by: Tejun Heo Acked-by: Changwoo Min Acked-by: Andrea Righi commit cc39454c341e02b929e565f8a37cfe9b18c7a0a9 Author: Tejun Heo Date: Wed Apr 9 09:05:59 2025 -1000 sched_ext: Remove scx_ops_enq_* static_keys scx_ops_enq_last/exiting/migration_disabled are used to encode the corresponding SCX_OPS_ flags into static_keys. These flags aren't hot enough for static_key usage to make any meaningful difference and are made static_keys mostly because there was no reason not to. However, global static_keys can't work with the planned hierarchical multiple scheduler support. Remove the static_keys and test the ops flags directly. In repeated hackbench runs before and after static_keys removal on an AMD Ryzen 3900X, I couldn't tell any measurable performance difference. Signed-off-by: Tejun Heo Acked-by: Changwoo Min Acked-by: Andrea Righi commit d75ee2d6781f4c04e56a467d88f710a758ad8b81 Author: Tejun Heo Date: Wed Apr 9 09:05:59 2025 -1000 sched_ext: Indentation updates Purely cosmetic. Signed-off-by: Tejun Heo Acked-by: Changwoo Min Acked-by: Andrea Righi commit 9357e329cdeb6f2d27b431a22d4965700bec478a Author: Thomas Gleixner Date: Wed Mar 19 11:57:01 2025 +0100 genirq/msi: Rename msi_[un]lock_descs() Now that all abuse is gone and the legit users are converted to guard(msi_descs_lock), rename the lock functions and document them as internal. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/all/20250319105506.864699741@linutronix.de commit e46a28cea29a0ca7d51c811acccf5d119b40c745 Author: Thomas Gleixner Date: Wed Mar 19 11:57:00 2025 +0100 scsi: ufs: qcom: Remove the MSI descriptor abuse The driver abuses the MSI descriptors for internal purposes. Aside of core code and MSI providers nothing has to care about their existence. They have been encapsulated with a lot of effort because this kind of abuse caused all sorts of issues including a maintainability nightmare. Rewrite the code so it uses dedicated storage to hand the required information to the interrupt handler and use a custom cleanup function to simplify the error path. No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: James Bottomley Link: https://lore.kernel.org/all/20250319105506.805529593@linutronix.de commit 71296eae5887de830a84e9b350bd360c560e74f9 Author: Thomas Gleixner Date: Wed Mar 19 11:56:58 2025 +0100 PCI/TPH: Replace the broken MSI-X control word update The driver walks the MSI descriptors to test whether a descriptor exists for a given index. That's just abuse of the MSI internals. The same test can be done with a single function call by looking up whether there is a Linux interrupt number assigned at the index. What's worse is that the function is completely unserialized against modifications of the MSI-X control by operations issued from the interrupt core. It also brings the PCI/MSI-X internal cached control word out of sync. Remove the trainwreck and invoke the function provided by the PCI/MSI core to update it. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.744271447@linutronix.de commit d5124a9957b2a8d728a86ea8462e0c404acae016 Author: Thomas Gleixner Date: Wed Mar 19 11:56:57 2025 +0100 PCI/MSI: Provide a sane mechanism for TPH The PCI/TPH driver fiddles with the MSI-X control word of an active interrupt completely unserialized against concurrent operations issued from the interrupt core. It also brings the PCI/MSI-X internal cached control word out of sync. Provide a function, which has the required serialization and keeps the control word cache in sync. Unfortunately this requires to look up and lock the interrupt descriptor, which should be only done in the interrupt core code. But confining this particular oddity in the PCI/MSI core is the lesser of all evil. A interrupt core implementation would require a larger pile of infrastructure and indirections for dubious value. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.683663807@linutronix.de commit 6552e90e2a23b8861488653c76605f7aa1c77ad8 Author: Thomas Gleixner Date: Wed Mar 19 11:56:55 2025 +0100 PCI: hv: Switch MSI descriptor locking to guard() Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Reviewed-by: Michael Kelley Acked-by: Wei Liu Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.624838146@linutronix.de commit 891146645e5d55166847b8e004a30fb9f8b03266 Author: Thomas Gleixner Date: Wed Mar 19 11:56:54 2025 +0100 PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock) Split the lock protected functionality of msix_capability_init() out into a helper function and use guard(msi_desc_lock) to replace the lock/unlock pair. Simplify the error path in the helper function by utilizing a custom cleanup to get rid of the remaining gotos. No functional change intended. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.564105011@linutronix.de commit f11cc2af8f4b3d5e81dd9b8fb1a9185a6ca6e7db Author: Thomas Gleixner Date: Wed Mar 19 11:56:53 2025 +0100 PCI/MSI: Switch msi_capability_init() to guard(msi_desc_lock) Split the lock protected functionality of msi_capability_init() out into a helper function and use guard(msi_desc_lock) to replace the lock/unlock pair. No functional change intended. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.504992208@linutronix.de commit 5c0ba4f9d25eb35a8ef882115c9f9c2084acc4e7 Author: Thomas Gleixner Date: Wed Mar 19 11:56:50 2025 +0100 PCI/MSI: Use __free() for affinity masks Let cleanup handle the freeing of the affinity mask. That prepares for switching the MSI descriptor locking to a guard(). No functional change. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.444764312@linutronix.de commit b0c44a5ec3552f89c47dac9903d99c22d796d87f Author: Thomas Gleixner Date: Wed Mar 19 11:56:49 2025 +0100 PCI/MSI: Set pci_dev:: Msi_enabled late The comment claiming that pci_dev::msi_enabled has to be set across setup is a leftover from ancient code versions. Nothing in the setup code requires the flag to be set anymore. Set it in the success path and remove the extra goto label. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.383222333@linutronix.de commit 497f68cff6219713a66a70a45e1fa4caf237a76b Author: Thomas Gleixner Date: Wed Mar 19 11:56:47 2025 +0100 PCI/MSI: Use guard(msi_desc_lock) where applicable Convert the trivial cases of msi_desc_lock/unlock() pairs. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/all/20250319105506.322536126@linutronix.de commit 8f3315cf7e97785241a32457061a1c62035c65ef Author: Thomas Gleixner Date: Wed Mar 19 11:56:45 2025 +0100 NTB/msi: Switch MSI descriptor locking to lock guard() Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Reviewed-by: Logan Gunthorpe Acked-by: Dave Jiang Link: https://lore.kernel.org/all/20250319105506.263456735@linutronix.de commit f25dd9ac48463c695185f3944770b59bfdf91058 Author: Thomas Gleixner Date: Wed Mar 19 11:56:42 2025 +0100 soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard() Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Tested-by: Nishanth Menon Reviewed-by: Jonathan Cameron Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/all/20250319105506.203802081@linutronix.de commit 0dac2b09303c89ffb21d25d40bf6aefd39f214b0 Author: Thomas Gleixner Date: Wed Mar 19 11:56:39 2025 +0100 genirq/msi: Use lock guards for MSI descriptor locking Provide a lock guard for MSI descriptor locking and update the core code accordingly. No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/all/20250319105506.144672678@linutronix.de commit 092d00ead733563f6d278295e0b5c5f97558b726 Author: Thomas Gleixner Date: Wed Mar 19 11:56:38 2025 +0100 cleanup: Provide retain_and_null_ptr() In cases where an allocation is consumed by another function, the allocation needs to be retained on success or freed on failure. The code pattern is usually: struct foo *f = kzalloc(sizeof(*f), GFP_KERNEL); struct bar *b; ,,, // Initialize f ... if (ret) goto free; ... bar = bar_create(f); if (!bar) { ret = -ENOMEM; goto free; } ... return 0; free: kfree(f); return ret; This prevents using __free(kfree) on @f because there is no canonical way to tell the cleanup code that the allocation should not be freed. Abusing no_free_ptr() by force ignoring the return value is not really a sensible option either. Provide an explicit macro retain_and_null_ptr(), which NULLs the cleanup pointer. That makes it easy to analyze and reason about. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Reviewed-by: James Bottomley Link: https://lore.kernel.org/all/20250319105506.083538907@linutronix.de commit d02c83d75f9f76dda046edbd9f39b911427677c9 Author: Ahmed S. Darwish Date: Wed Apr 9 14:22:31 2025 +0200 x86/cacheinfo: Properly parse CPUID(0x80000006) L2/L3 associativity Complete the AMD CPUID(4) emulation logic, which uses CPUID(0x80000006) for L2/L3 cache info and an assocs[] associativity mapping array, by adding entries for 3-way caches and 6-way caches. Properly handle the case where CPUID(0x80000006) returns an L2/L3 associativity of 9. This is not real associativity, but a marker to indicate that the respective L2/L3 cache information should be retrieved from CPUID(0x8000001d) instead. If such a marker is encountered, return early from legacy_amd_cpuid4(), thus effectively emulating an "invalid index" CPUID(4) response with a cache type of zero. When checking if CPUID(0x80000006) L2/L3 cache info output is valid, and given the associtivity marker 9 above, do not just check if the whole ECX/EDX register is zero. Rather, check if the associativity is zero or 9. An associativity of zero implies no L2/L3 cache, which make it the more correct check anyway vs. a zero check of the whole output register. Fixes: a326e948c538 ("x86, cacheinfo: Fixup L3 cache information for AMD multi-node processors") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: "H. Peter Anvin" Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250409122233.1058601-3-darwi@linutronix.de commit d274cde0dbe0217ee2f2ddbb1a3c545dedf81a06 Author: Ahmed S. Darwish Date: Wed Apr 9 14:22:30 2025 +0200 x86/cacheinfo: Properly parse CPUID(0x80000005) L1d/L1i associativity For the AMD CPUID(4) emulation cache info logic, the same associativity mapping array, assocs[], is used for both CPUID(0x80000005) and CPUID(0x80000006). This is incorrect since per the AMD manuals, the mappings for CPUID(0x80000005) L1d/L1i associativity is: n = 0x1 -> 0xfe n n = 0xff fully associative while assocs[] maps these values to: n = 0x1, 0x2, 0x4 n n = 0x3, 0x7, 0x9 0 n = 0x6 8 n = 0x8 16 n = 0xa 32 n = 0xb 48 n = 0xc 64 n = 0xd 96 n = 0xe 128 n = 0xf fully associative which is only valid for CPUID(0x80000006). Parse CPUID(0x80000005) L1d/L1i associativity values as shown in the AMD manuals. Since the 0xffff literal is used to denote full associativity at the AMD CPUID(4)-emulation logic, define AMD_CPUID4_FULLY_ASSOCIATIVE for it instead of spreading that literal in more places. Mark the assocs[] mapping array as only valid for CPUID(0x80000006) L2/L3 cache information. Fixes: a326e948c538 ("x86, cacheinfo: Fixup L3 cache information for AMD multi-node processors") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: "H. Peter Anvin" Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250409122233.1058601-2-darwi@linutronix.de commit 9334003d1335b1d086334f946eab158503487e58 Author: Thomas Weißschuh Date: Mon Apr 7 10:25:09 2025 +0200 RDMA: Don't use %pK through printk In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74d2469 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping looks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20250407-restricted-pointers-infiniband-v1-1-22b20504b84d@linutronix.de Signed-off-by: Leon Romanovsky commit b84001ad0ceeb34bc3fd6c383f197326d4fe8353 Author: Daisuke Matsuda Date: Mon Mar 24 16:56:49 2025 +0900 RDMA/rxe: Enable ODP in ATOMIC WRITE operation Add rxe_odp_do_atomic_write() so that ODP specific steps are applied to ATOMIC WRITE requests. Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250324075649.3313968-3-matsuda-daisuke@fujitsu.com Signed-off-by: Leon Romanovsky commit 9f488ccd0f567ca66a146bc31e6578cba3b5abee Merge: 0af2f6be1b4281 de258fa8ca8d72 Author: Jonathan Corbet Date: Wed Apr 9 12:24:51 2025 -0600 Merge branch 'mauro' into docs-mw Mauro says: This changeset contains the kernel-doc.py script to replace the verable kernel-doc originally written in Perl. It replaces the first version and the second series I sent on the top of it. I tried to stay as close as possible of the original Perl implementation on the first patch introducing kernel-doc.py, as it helps to double check if each function was properly translated to Python. This have been helpful debugging troubles that happened during the conversion. I worked hard to make it bug-compatible with the original one. Still, its output has a couple of differences from the original one: - The tab expansion works better with the Python script. With that, some outputs that contain tabs at kernel-doc markups are now different; - The new script works better stripping blank lines. So, there are a couple of empty new lines that are now stripped with this version; - There is a buggy logic at kernel-doc to strip empty description and return sections. I was not able to replicate the exact behavior. So, I ended adding an extra logic to strip empty sections with a different algorithm. Yet, on my tests, the results are compatible with the venerable script output for all .. kernel-doc tags found in Documentation/. I double-checked this by adding support to output the kernel-doc commands when V=1, and then I ran a diff between kernel-doc.pl and kernel-doc.py for the same command lines. The only patch that doesn't belong to this series is a patch dropping kernel-doc.pl. I opted to keep it for now, as it can help to better test the new tools. With such changes, if one wants to build docs with the old script, all it is needed is to use KERNELDOC parameter, e.g.: $ make KERNELDOC=scripts/kernel-doc.pl htmldocs commit cfdb7520f901a9696e1dc825b0a8ed9c664d58aa Author: Thorsten Blum Date: Tue Mar 18 09:07:55 2025 +0100 PM: hibernate: Remove size arguments when calling strscpy() The size parameter is optional and strscpy() automatically determines the length of the destination buffer using sizeof() if the argument is omitted. This makes the explicit sizeof() calls unnecessary. Remove them to shorten and simplify the code. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250318080755.61126-2-thorsten.blum@linux.dev Signed-off-by: Rafael J. Wysocki commit de258fa8ca8d72ef17f4d71162cfbbd2d9f397e6 Author: Sean Anderson Date: Tue Apr 8 18:09:36 2025 +0800 scripts: kernel-doc: fix parsing function-like typedefs (again) Typedefs like typedef struct phylink_pcs *(*pcs_xlate_t)(const u64 *args); have a typedef_type that ends with a * and therefore has no word boundary. Add an extra clause for the final group of the typedef_type so we only require a word boundary if we match a word. [mchehab: modify also kernel-doc.py, as we're deprecating the perl version] Fixes: 7d2c6b1edf79 ("scripts: kernel-doc: fix parsing function-like typedefs") Signed-off-by: Sean Anderson Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/e0abb103c73a96d76602d909f60ab8fd6e2fd0bd.1744106242.git.mchehab+huawei@kernel.org commit 04a383ced6965fedc9c1b6c83d841acce076b53c Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:35 2025 +0800 scripts/kernel-doc.py: Rename the kernel doc Re class to KernRe Using just "Re" makes it harder to distinguish from the native "re" class. So, let's rename it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/4e095ecd5235a3e811ddcf5bad4cfb92f1da0a4a.1744106242.git.mchehab+huawei@kernel.org commit 16740c29dbf3275a22691d3d7c63701992872898 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:34 2025 +0800 scripts/kernel_doc.py: better handle exported symbols Change the logic which detects internal/external symbols in a way that we can re-use it when calling via Sphinx extension. While here, remove an unused self.config var and let it clearer that self.config variables are read-only. This helps to allow handling multiple times in parallel if ever needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/6a69ba8d2b7ee6a6427abb53e60d09bd4d3565ee.1744106242.git.mchehab+huawei@kernel.org commit a566ba5af59524a3bc5cdfb46b248bd70a0972e9 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:33 2025 +0800 scripts/lib/kdoc/kdoc_files.py: allow filtering output per fname For kerneldoc Sphinx extension, it is useful to display parsed results only from a single file. Change the logic at KernelFiles.msg() to allow such usage. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/9f5c0ff2568f34532ca99465fb378241d831d39f.1744106242.git.mchehab+huawei@kernel.org commit fc862949a35aa4d5e92a10c64c620cde350bd511 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:32 2025 +0800 scripts/kernel-doc: switch to use kernel-doc.py Now that all features are in place, change the kernel-doc alias to point to kernel-doc.py. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/d84a2ad282821928a60b8dcbec305ef7e7bd58e6.1744106242.git.mchehab+huawei@kernel.org commit 11afeab6d74d1be80420b47113c4893c88dcc04b Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:31 2025 +0800 scripts/kernel-doc.py: Properly handle Werror and exit codes The original kernel-doc script has a logic to return warnings as errors, and to report the number of warnings found, if in verbose mode. Implement it to be fully compatible with the original script. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/de33b0cebd9fdf82d8b221bcfe41db7269286222.1744106242.git.mchehab+huawei@kernel.org commit e4b2bd908c3d8f071d4fac6e588fffc6110c1b1f Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:30 2025 +0800 scripts/lib/kdoc/kdoc_parser.py: remove a python 3.9 dependency str.removesuffix() was added on Python 3.9, but rstrip() actually does the same thing, as we just want to remove a single character. It is also shorter. So, use it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/f64cc4adef107ada26da4bfb7e4b7002dd783173.1744106242.git.mchehab+huawei@kernel.org commit 91d00bd54f300b614d48002d4ec8cc28b3f0b2a5 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:29 2025 +0800 scripts/kernel-doc.py: properly handle KBUILD_BUILD_TIMESTAMP The logic that handles KBUILD_BUILD_TIMESTAMP is wrong, and adds a dependency of a third party module (dateutil). Fix it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/ffc70a1b741b010365ed82f31611018f24f91ce7.1744106242.git.mchehab+huawei@kernel.org commit 2ab867a4941de2e9d7804e76ab002ad74c73b078 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:28 2025 +0800 scripts/kernel-doc.py: move modulename to man class Only man output requires a modulename. Move its definition to the man class. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/583085e3885b0075d16ef9961b4f2ad870f30a55.1744106242.git.mchehab+huawei@kernel.org commit 78ea748f7978d39a6ee29897d3bd32e6208f74ac Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:27 2025 +0800 scripts/lib/kdoc/kdoc_parser.py: fix Python compat with < v3.13 - str.replace count was introduced only in Python 3.13; - before Python 3.13, f-string dict arguments can't use the same delimiter of the main string. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/e2b8e8361294558dae09236e4b8fbea5d86be5a3.1744106242.git.mchehab+huawei@kernel.org commit 485f6f7960c468d9e27665f61517dc5fc097ea98 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:26 2025 +0800 scripts/kernel-doc.py: adjust some coding style issues Make pylint happier by adding some missing documentation and addressing a couple of pylint warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/0f9d5473105e4c09c6c41e3db72cc63f1d4d55f9.1744106242.git.mchehab+huawei@kernel.org commit 43ecfe6bc2ae11f99fb4b812c014339c2d6a221a Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:25 2025 +0800 scripts/kernel-doc.py: Set an output format for --none Now that warnings output is deferred to the output plugin, we need to have an output style for none as well. So, use the OutputFormat base class on such cases. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/caa1089e16f4609f792ff26731ad9e9c3a6f6b1d.1744106242.git.mchehab+huawei@kernel.org commit feec610725e38e96dca0f77f1fc388f59ffa616b Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:24 2025 +0800 docs: sphinx: kerneldoc: use kernel-doc.py script Switch to the new version when producing documentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/a81d8db099d9cef5161deaef40ac9056bf9802a3.1744106242.git.mchehab+huawei@kernel.org commit 01c43355255e1f0bba8677fc66facc0047a23242 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:23 2025 +0800 docs: sphinx: kerneldoc: ignore "\" characters from options Documentation/driver-api/infiniband.rst has a kernel-doc tag with "\" characters at the end: .. kernel-doc:: drivers/infiniband/ulp/iser/iscsi_iser.c :functions: iscsi_iser_pdu_alloc iser_initialize_task_headers \ iscsi_iser_task_init iscsi_iser_mtask_xmit iscsi_iser_task_xmit \ iscsi_iser_cleanup_task iscsi_iser_check_protection \ iscsi_iser_conn_create iscsi_iser_conn_bind \ iscsi_iser_conn_start iscsi_iser_conn_stop \ iscsi_iser_session_destroy iscsi_iser_session_create \ iscsi_iser_set_param iscsi_iser_ep_connect iscsi_iser_ep_poll \ iscsi_iser_ep_disconnect This is not handled well, as the "\" strings will be just stored inside Sphinx options. While the actual problem deserves being fixed, better to relax the keneldoc.py extension to silently strip "\" from the end of strings, as otherwise this may cause troubles when preparing arguments to be executed by kernel-doc. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/4c652d6c57b20500c135b95294e554d9e9a97f42.1744106242.git.mchehab+huawei@kernel.org commit 668b9d1dceb86b570ff28d913e8464ba62f57e91 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:22 2025 +0800 docs: sphinx: kerneldoc: verbose kernel-doc command if V=1 It is useful to know what kernel-doc command was used during document build time, as it allows one to check the output the same way as Sphinx extension does. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/a2f01590814b111e138f278e8a721024fdf2d445.1744106242.git.mchehab+huawei@kernel.org commit 02df8e3b333c3d8550a22ffdfc969caec8462df9 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:21 2025 +0800 docs: add a .pylintrc file with sys path for docs scripts The docs scripts that are used by Documentation/sphinx are using scripts/lib/* directories to place classes that will be used by both extensions and scripts. When pylint is used, it needs to identify the path where such scripts are, otherwise it will bail out. Add a simple RC file placing the location of such files. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/7b3c8a932c50ae52ce4c848676602b46d1d4a8f9.1744106242.git.mchehab+huawei@kernel.org commit 9cbc2d3b137bfdb7937265c46e9e5d7e72952841 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:20 2025 +0800 scripts/kernel-doc.py: postpone warnings to the output plugin We don't want to have warnings displayed for symbols that weren't output. So, postpone warnings print to the output plugin, where symbol output is validated. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/e6344711e390cf22af02a56bb5dd51ca67c0afb6.1744106242.git.mchehab+huawei@kernel.org commit 9235ec5e2bf8ccd3f3ef30bbb1811bf9ddb3ef08 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:19 2025 +0800 scripts/kernel-doc.py: properly handle out_section for ReST There is a difference at the way DOC sections are output with the include mode. Handle such difference properly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/935d00c6a7c45b25a8be72fad6183fe5a8476cd2.1744106242.git.mchehab+huawei@kernel.org commit 408269ae35d6b88d48477af56a2376ea05e619ca Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:18 2025 +0800 scripts/kernel-doc.py: fix handling of doc output check The filtering logic was seeking for the DOC name to check for symbols, but such data is stored only inside a section. Add it to the output_declaration, as it is quicker/easier to check the declaration name than to check inside each section. While here, make sure that the output for both ReST and man after filtering will be similar to what kernel-doc Perl version does. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/6d8b77af85295452c0191863ea1041f4195aeaaf.1744106242.git.mchehab+huawei@kernel.org commit c3597ab27bc0e5eae23c74a76380000a0f8481e1 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:17 2025 +0800 scripts/kernel-doc.py: fix line number output With the Pyhton version, the actual output happens after parsing, from records stored at self.entries. Ensure that line numbers will be properly stored there and that they'll produce the desired results at the ReST output. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/5182a531d14b5fe9e1fc5da5f9dae05d66852a60.1744106242.git.mchehab+huawei@kernel.org commit 0873e55433769210c0ba26227f0080dde408e15e Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:16 2025 +0800 scripts/kernel-doc.py: implement support for -no-doc-sections The venerable kernel-doc Perl script has a number of options that aren't properly documented. Among them, there is -no-doc-sections, which is used by the Sphinx extension. Implement support for it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/06b18a32142b44d5ba8b41ac64a76c02b03b4969.1744106242.git.mchehab+huawei@kernel.org commit 799b0d2a2a24f09f3800678f55ad48d8cc9c069d Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:15 2025 +0800 scripts/kernel-doc.py: move file lists to the parser function Instead of setting file lists at __init__ time, move it to the actual parsing function. This allows adding more files to be parsed in real time, by calling parse function multiple times. With the new way, the export_files logic was rewritten to avoid parsing twice EXPORT_SYMBOL for partial matches. Please notice that, with this logic, it can still read the same file twice when export_file is used. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/ab10bc94050406ce6536d4944b5d718ecd70812f.1744106242.git.mchehab+huawei@kernel.org commit 4fa5e411379af1baabdff088196da977799fd46e Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:14 2025 +0800 scripts/kernel-doc.py: convert message output to an interactor Instead of directly printing output messages, change kdoc classes to return an interactor with the output message, letting the actual display to happen at the command-line command. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/557304c8458f1fb4aa2e833f4bdaff953094ddcb.1744106242.git.mchehab+huawei@kernel.org commit 1d6fea640e6ccb2c4ee0b492270562e89ba2805f Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:13 2025 +0800 scripts/kernel-doc.py: move output classes to a separate file In preparation for letting kerneldoc Sphinx extension to import Python libraries, move kernel-doc output logic to a separate file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/81087eff25d11c265019a8631f7fc8d3904795d0.1744106242.git.mchehab+huawei@kernel.org commit ee13b3f35c7238eff323450599185a775d726462 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:12 2025 +0800 scripts/kernel-doc.py: move KernelFiles class to a separate file The KernelFiles class is the main dispatcher which parses each source file. In preparation for letting kerneldoc Sphinx extension to import Python libraries, move regex ancillary classes to a separate file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/80bc855e128a9ff0a11df5afe9ba71775dfc9a0f.1744106241.git.mchehab+huawei@kernel.org commit d966dc658ce381c56d85cd477e095944b8470379 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:11 2025 +0800 scripts/kernel-doc.py: move KernelDoc class to a separate file In preparation for letting kerneldoc Sphinx extension to import Python libraries, move regex ancillary classes to a separate file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/c76df228504e711c6b4bcd23d5a0ea1fda678cda.1744106241.git.mchehab+huawei@kernel.org commit e31fd36da9c41f9f664e51a35860e9f606e81ef4 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:10 2025 +0800 scripts/kernel-doc.py: move regex methods to a separate file In preparation for letting kerneldoc Sphinx extension to import Python libraries, move regex ancillary classes to a separate file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/64f96b6744435b51894bb4ab7612851d9d054190.1744106241.git.mchehab+huawei@kernel.org commit 01d3235dde9042c3df9008a0ff43a2aed1641ddf Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:09 2025 +0800 scripts/kernel-doc.py: properly handle struct_group macros Handing nested parenthesis with regular expressions is not an easy task. It is even harder with Python's re module, as it has a limited subset of regular expressions, missing more advanced features. We might use instead Python regex module, but still the regular expressions are very hard to understand. So, instead, add a logic to properly match delimiters. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/74dee485f70b7ce85e90496bfdd360283a677a58.1744106241.git.mchehab+huawei@kernel.org commit 3592385668c3a32638a84557df999d7146cc3bb6 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:08 2025 +0800 scripts/kernel-doc.py: better handle empty sections While doing the conversion, we opted to skip empty sections (description, return), but this makes harder to see the differences between kernel-doc (Perl) and kernel-doc.py. Also, the logic doesn't always work properly. So, change the way this is done by adding an extra step to remove such sections, doing it only for Return and Description. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/1b057092a48ba61d92a411f4f6d505b802913785.1744106241.git.mchehab+huawei@kernel.org commit 0a4e24128f4c0e1d83ebc7f79812c16f1e3fc9e0 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:07 2025 +0800 scripts/kernel-doc.py: output warnings the same way as kerneldoc Add a formatter to logging to produce outputs in a similar way to kernel-doc. This should help making it more compatible with existing scripts. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/559f0ad9e6fecfcbb3cc38b6097463bd38d58629.1744106241.git.mchehab+huawei@kernel.org commit 094a4845789baade4df0ddccd5bd19a88af30b3f Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:06 2025 +0800 scripts/kernel-doc.py: add a Python parser Maintaining kernel-doc has been a challenge, as there aren't many perl developers among maintainers. Also, the logic there is too complex. Having lots of global variables and using pure functions doesn't help. Rewrite the script in Python, placing most global variables inside classes. This should help maintaining the script in long term. It also allows a better integration with kernel-doc Sphinx extension in the future. I opted to keep this version as close as possible to what we have already in Perl. There are some differences though: 1. There is one regular expression that required a rewrite: /\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/ As this one uses two features that aren't available by the native Python regular expression module (re): - recursive patterns: ?1 - atomic grouping (?>...) Rewrite it to use a much simpler regular expression: /\bSTRUCT_GROUP\(([^\)]+)\)[^;]*;/ Extra care should be taken when validating this script, as such replacement might cause some regressions. 2. The filters are now applied only during output generation. In particular, "nosymbol" argument is only handled there. It means that, if the same file is processed twice for different symbols, the warnings will be duplicated. I opted to use this behavior as it allows the Sphinx extension to read the file(s) only once, and apply the filtering only when producing the ReST output. This hopefully will help to speed up doc generation 3. This version can handle multiple files and multiple directories. So, if one just wants to produce a big output with everything inside a file, this could be done with $ time ./scripts/kernel-doc.py -man . 2>/dev/null >new real 0m54.592s user 0m53.345s sys 0m0.997s 4. I tried to replicate as much as possible the same arguments from kernel-doc, with about the same behavior, for the command line parameters starting with a single dash (-parameter). I also added one letter aliases for each parameter, and a --parameter (sometimes with a better name). 5. There are some sutile nuances between how Perl handles certain regular expressions. In special, the qr operatior, which compiles a regular expression also works as a non-capturing group. It means that some regexes like this one: my $type1 = qr{[\w\s]+}; needs to be mapped as: type1 = r'(?:[\w\s]+)?' Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/2fa671a9fb08d03a376a42d46cc0b1d3aab4ae3f.1744106241.git.mchehab+huawei@kernel.org commit 33a92a5b2e6fae8d653faaa0271111b3237af1f3 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:05 2025 +0800 scripts/kernel-doc: add a symlink to the Perl version of kernel-doc Preserve kernel-doc name, associating with the curent version in Perl. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/a5d69e436287433ad8be066c648a77ffe493c21c.1744106241.git.mchehab+huawei@kernel.org commit cb6749b961b684701a5d4bc905c4923407017c88 Author: Mauro Carvalho Chehab Date: Tue Apr 8 18:09:04 2025 +0800 scripts/kernel-doc: rename it to scripts/kernel-doc.pl In preparation for deprecating scripts/kernel-doc in favor of a new version written in Perl, rename it to scripts/kernel-doc.pl. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/a8a86136bcf102495f09c24a65817f1600fae0e8.1744106241.git.mchehab+huawei@kernel.org commit d4a7882f93bf2520315d10ab600ea4701e22be69 Author: Zhongqiu Han Date: Sat Apr 5 21:53:08 2025 +0800 cpuidle: menu: Optimize bucket assignment when next_timer_ns equals KTIME_MAX Directly assign the last bucket value instead of calling which_bucket() when next_timer_ns equals KTIME_MAX, the largest possible value that always falls into the last bucket. This avoids unnecessary calculations and enhances performance. Reviewed-by: Christian Loehle Signed-off-by: Zhongqiu Han Link: https://patch.msgid.link/20250405135308.1854342-1-quic_zhonhan@quicinc.com Signed-off-by: Rafael J. Wysocki commit 194c396e8a0d25f06dfb02683f8e33727a58882f Author: Atul Kumar Pant Date: Sat Apr 5 11:39:09 2025 +0530 cpuidle: teo: Fix typos in two comments Fix a typo and correct a spelling mistake in comments. Signed-off-by: Atul Kumar Pant Link: https://patch.msgid.link/20250405060909.2026332-1-atulpant.linux@gmail.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 48e6872b467a444352c2333c5aa6e7bd59677cef Merge: 36ddc9ec8f3ec0 147b2a96f24e0c Author: Mark Brown Date: Wed Apr 9 18:24:29 2025 +0100 Add support for ADP5055 triple buck regulator. Merge series from Alexis Czezar Torreno : Introduce a regulator driver support for ADP5055. The device combines 3 high performance buck regulators in a 43-termminal land grid array package. The device enables direct connection to high input voltages up to 18V with no preregulator. Channel 1 and 2 deliver a programmable output current of 3.5A or 7.5A or provide a single output with up to 14A in parallel operation. Channel 3 has a programmable output current of 1.5A or 3A. commit 2fe2b96c3818a043eb013a9db1885de75987715d Author: Mark Rutland Date: Wed Apr 9 17:40:10 2025 +0100 arm64/fpsimd: signal: Simplify preserve_tpidr2_context() During a context-switch, tls_thread_switch() reads and writes a task's thread_struct::tpidr2_el0 field. Other code shouldn't access this field for an active task, as such accesses would form a data-race with a concurrent context-switch. The usage in preserve_tpidr2_context() is suspicious, but benign as any race with a context switch will write the same value back to current->thread.tpidr2_el0. Make this clearer and match restore_tpidr2_context() by using a temporary variable instead, avoiding the (benign) data-race. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-14-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 929fa99b1215966fc8a6ccc2e14b92e36c3c42f3 Author: Mark Rutland Date: Wed Apr 9 17:40:09 2025 +0100 arm64/fpsimd: signal: Always save+flush state early There are several issues with the way the native signal handling code manipulates FPSIMD/SVE/SME state, described in detail below. These issues largely result from races with preemption and inconsistent handling of live state vs saved state. Known issues with native FPSIMD/SVE/SME state management include: * On systems with FPMR, the code to save/restore the FPMR accesses the register while it is not owned by the current task. Consequently, this may corrupt the FPMR of the current task and/or may corrupt the FPMR of an unrelated task. The FPMR save/restore has been broken since it was introduced in commit: 8c46def44409fc91 ("arm64/signal: Add FPMR signal handling") * On systems with SME, setup_return() modifies both the live register state and the saved state register state regardless of whether the task's state is live, and without holding the cpu fpsimd context. Consequently: - This may corrupt the state an unrelated task which has PSTATE.SM set and/or PSTATE.ZA set. - The task may enter the signal handler in streaming mode, and or with ZA storage enabled unexpectedly. - The task may enter the signal handler in non-streaming SVE mode with stale SVE register state, which may have been inherited from streaming SVE mode unexpectedly. Where the streaming and non-streaming vector lengths differ, this may be packed into registers arbitrarily. This logic has been broken since it was introduced in commit: 40a8e87bb32855b3 ("arm64/sme: Disable ZA and streaming mode when handling signals") Further incorrect manipulation of state was added in commits: ea64baacbc36a0d5 ("arm64/signal: Flush FPSIMD register state when disabling streaming mode") baa8515281b30861 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") * Several restoration functions use fpsimd_flush_task_state() to discard the live FPSIMD/SVE/SME while the in-memory copy is stale. When a subset of the FPSIMD/SVE/SME state is restored, the remainder may be non-deterministically reset to a stale snapshot from some arbitrary point in the past. This non-deterministic discarding was introduced in commit: 8cd969d28fd2848d ("arm64/sve: Signal handling support") As of that commit, when TIF_SVE was initially clear, failure to restore the SVE signal frame could reset the FPSIMD registers to a stale snapshot. The pattern of discarding unsaved state was subsequently copied into restoration functions for some new state in commits: 39782210eb7e8763 ("arm64/sme: Implement ZA signal handling") ee072cf708048c0d ("arm64/sme: Implement signal handling for ZT") * On systems with SME/SME2, the entire FPSIMD/SVE/SME state may be loaded onto the CPU redundantly. Either restore_fpsimd_context() or restore_sve_fpsimd_context() will load the entire FPSIMD/SVE/SME state via fpsimd_update_current_state() before restore_za_context() and restore_zt_context() each discard the state via fpsimd_flush_task_state(). This is purely redundant work, and not a functional bug. To fix these issues, rework the native signal handling code to always save+flush the current task's FPSIMD/SVE/SME state before manipulating that state. This avoids races with preemption and ensures that state is manipulated consistently regardless of whether it happened to be live prior to manipulation. This largely involes: * Using fpsimd_save_and_flush_current_state() to save+flush the state for both signal delivery and signal return, before the state is manipulated in any way. * Removing fpsimd_signal_preserve_current_state() and updating preserve_fpsimd_context() to explicitly ensure that the FPSIMD state is up-to-date, as preserve_fpsimd_context() is the only consumer of the FPSIMD state during signal delivery. * Modifying fpsimd_update_current_state() to not reload the FPSIMD state onto the CPU. Ideally we'd remove fpsimd_update_current_state() entirely, but I've left that for subsequent patches as there are a number of of other problems with the FPSIMD<->SVE conversion helpers that should be addressed at the same time. For now I've removed the misleading comment. For setup_return(), we need to decide (for ABI reasons) whether signal delivery should have all the side-effects of an SMSTOP. For now I've left a TODO comment, as there are other questions in this area that I'll address with subsequent patches. Fixes: 8c46def44409 ("arm64/signal: Add FPMR signal handling") Fixes: 40a8e87bb328 ("arm64/sme: Disable ZA and streaming mode when handling signals") Fixes: ea64baacbc36 ("arm64/signal: Flush FPSIMD register state when disabling streaming mode") Fixes: baa8515281b3 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") Fixes: 8cd969d28fd2 ("arm64/sve: Signal handling support") Fixes: 39782210eb7e ("arm64/sme: Implement ZA signal handling") Fixes: ee072cf70804 ("arm64/sme: Implement signal handling for ZT") Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-13-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 3aa4d74438afa1324513a7a6bc30f57e8727ad86 Author: Mark Rutland Date: Wed Apr 9 17:40:08 2025 +0100 arm64/fpsimd: signal32: Always save+flush state early There are several issues with the way the native signal handling code manipulates FPSIMD/SVE/SME state. To fix those issues, subsequent patches will rework the native signal handling code to always save+flush the current task's FPSIMD/SVE/SME state before manipulating that state. In preparation for those changes, rework the compat signal handling code to save+flush the current task's FPSIMD state before manipulating it. Subsequent patches will remove fpsimd_signal_preserve_current_state() and fpsimd_update_current_state(). Compat tasks can only have FPSIMD state, and cannot have any SVE or SME state. Thus, the SVE state manipulation present in fpsimd_signal_preserve_current_state() and fpsimd_update_current_state() is not necessary, and it is safe to directly manipulate current->thread.uw.fpsimd_state once it has been saved+flushed. Use fpsimd_save_and_flush_current_state() to save+flush the state for both signal delivery and signal return, before the state is manipulated in any way. While it would be safe for compat_restore_vfp_context() to use fpsimd_flush_task_state(current), there are several extant issues in the native signal code resulting from incorrect use of fpsimd_flush_task_state(), and for consistency it is preferable to use fpsimd_save_and_flush_current_state(). Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-12-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit d3a181588df9401d319fe2dc24bf1a364a687cc2 Author: Mark Rutland Date: Wed Apr 9 17:40:07 2025 +0100 arm64/fpsimd: Add fpsimd_save_and_flush_current_state() When the current task's FPSIMD/SVE/SME state may be live on *any* CPU in the system, special care must be taken when manipulating that state, as this manipulation can race with preemption and/or asynchronous usage of FPSIMD/SVE/SME (e.g. kernel-mode NEON in softirq handlers). Even when manipulation is is protected with get_cpu_fpsimd_context() and get_cpu_fpsimd_context(), the logic necessary when the state is live on the current CPU can be wildly different from the logic necessary when the state is not live on the current CPU. A number of historical and extant issues result from failing to handle these cases consistetntly and/or correctly. To make it easier to get such manipulation correct, add a new fpsimd_save_and_flush_current_state() helper function, which ensures that the current task's state has been saved to memory and any stale state on any CPU has been "flushed" such that is not live on any CPU in the system. This will allow code to safely manipulate the saved state without risk of races. Subsequent patches will use the new function. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-11-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c94f2f326146a34066a0070ed90b8bc656b1842f Author: Mark Rutland Date: Wed Apr 9 17:40:06 2025 +0100 arm64/fpsimd: Fix merging of FPSIMD state during signal return For backwards compatibility reasons, when a signal return occurs which restores SVE state, the effective lower 128 bits of each of the SVE vector registers are restored from the corresponding FPSIMD vector register in the FPSIMD signal frame, overriding the values in the SVE signal frame. This is intended to be the case regardless of streaming mode. To make this happen, restore_sve_fpsimd_context() uses fpsimd_update_current_state() to merge the lower 128 bits from the FPSIMD signal frame into the SVE register state. Unfortunately, fpsimd_update_current_state() performs this merging dependent upon TIF_SVE, which is not always correct for streaming SVE register state: * When restoring non-streaming SVE register state there is no observable problem, as the signal return code configures TIF_SVE and the saved fp_type to match before calling fpsimd_update_current_state(), which observes either: - TIF_SVE set AND fp_type == FP_STATE_SVE - TIF_SVE clear AND fp_type == FP_STATE_FPSIMD * On systems which have SME but not SVE, TIF_SVE cannot be set. Thus the merging will never happen for the streaming SVE register state. * On systems which have SVE and SME, TIF_SVE can be set and cleared independently of PSTATE.SM. Thus the merging may or may not happen for streaming SVE register state. As TIF_SVE can be cleared non-deterministically during syscalls (including at the start of sigreturn()), the merging may occur non-deterministically from the perspective of userspace. This logic has been broken since its introduction in commit: 85ed24dad2904f7c ("arm64/sme: Implement streaming SVE signal handling") ... at which point both fpsimd_signal_preserve_current_state() and fpsimd_update_current_state() only checked TIF SVE. When PSTATE.SM==1 and TIF_SVE was clear, signal delivery would place stale FPSIMD state into the FPSIMD signal frame, and signal return would not merge this into the restored register state. Subsequently, signal delivery was fixed as part of commit: 61da7c8e2a602f66 ("arm64/signal: Don't assume that TIF_SVE means we saved SVE state") ... but signal restore was not given a corresponding fix, and when TIF_SVE was clear, signal restore would still fail to merge the FPSIMD state into the restored SVE register state. The 'Fixes' tag did not indicate that this had been broken since its introduction. Fix this by merging the FPSIMD state dependent upon the saved fp_type, matching what we (currently) do during signal delivery. As described above, when backporting this commit, it will also be necessary to backport commit: 61da7c8e2a602f66 ("arm64/signal: Don't assume that TIF_SVE means we saved SVE state") ... and prior to commit: baa8515281b30861 ("arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE") ... it will be necessary for fpsimd_signal_preserve_current_state() and fpsimd_update_current_state() to consider both TIF_SVE and thread_sm_enabled(¤t->thread), in place of the saved fp_type. Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-10-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit a90878f297d3dba906a6261deccb1bd4a791ba52 Author: Mark Rutland Date: Wed Apr 9 17:40:05 2025 +0100 arm64/fpsimd: Reset FPMR upon exec() An exec() is expected to reset all FPSIMD/SVE/SME state, and barring special handling of the vector lengths, the state is expected to reset to zero. This reset is handled in fpsimd_flush_thread(), which the core exec() code calls via flush_thread(). When support was added for FPMR, no logic was added to fpsimd_flush_thread() to reset the FPMR value, and thus it is erroneously inherited across an exec(). Add the missing reset of FPMR. Fixes: 203f2b95a882 ("arm64/fpsimd: Support FEAT_FPMR") Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-9-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 01098d893fa8a6edb2b56e178b798e3e6b674f02 Author: Mark Rutland Date: Wed Apr 9 17:40:04 2025 +0100 arm64/fpsimd: Avoid clobbering kernel FPSIMD state with SMSTOP On system with SME, a thread's kernel FPSIMD state may be erroneously clobbered during a context switch immediately after that state is restored. Systems without SME are unaffected. If the CPU happens to be in streaming SVE mode before a context switch to a thread with kernel FPSIMD state, fpsimd_thread_switch() will restore the kernel FPSIMD state using fpsimd_load_kernel_state() while the CPU is still in streaming SVE mode. When fpsimd_thread_switch() subsequently calls fpsimd_flush_cpu_state(), this will execute an SMSTOP, causing an exit from streaming SVE mode. The exit from streaming SVE mode will cause the hardware to reset a number of FPSIMD/SVE/SME registers, clobbering the FPSIMD state. Fix this by calling fpsimd_flush_cpu_state() before restoring the kernel FPSIMD state. Fixes: e92bee9f861b ("arm64/fpsimd: Avoid erroneous elide of user state reload") Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-8-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit e5fa85fce08b21ed41643cb7968bf66bbd0532e3 Author: Mark Brown Date: Wed Apr 9 17:40:03 2025 +0100 arm64/fpsimd: Don't corrupt FPMR when streaming mode changes When the effective value of PSTATE.SM is changed from 0 to 1 or from 1 to 0 by any method, an entry or exit to/from streaming SVE mode is performed, and hardware automatically resets a number of registers. As of ARM DDI 0487 L.a, this means: * All implemented bits of the SVE vector registers are set to zero. * All implemented bits of the SVE predicate registers are set to zero. * All implemented bits of FFR are set to zero, if FFR is implemented in the new mode. * FPSR is set to 0x0000_0000_0800_009f. * FPMR is set to 0, if FPMR is implemented. Currently task_fpsimd_load() restores FPMR before restoring SVCR (which is an accessor for PSTATE.{SM,ZA}), and so the restored value of FPMR may be clobbered if the restored value of PSTATE.SM happens to differ from the initial value of PSTATE.SM. Fix this by moving the restore of FPMR later. Note: this was originally posted as [1]. Fixes: 203f2b95a882 ("arm64/fpsimd: Support FEAT_FPMR") Signed-off-by: Mark Brown Link: https://lore.kernel.org/linux-arm-kernel/20241204-arm64-sme-reenable-v2-2-bae87728251d@kernel.org/ [ Rutland: rewrite commit message ] Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20250409164010.3480271-7-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit d3eaab3c70905c5467e5c4ea403053d67505adeb Author: Mark Brown Date: Wed Apr 9 17:40:02 2025 +0100 arm64/fpsimd: Discard stale CPU state when handling SME traps The logic for handling SME traps manipulates saved FPSIMD/SVE/SME state incorrectly, and a race with preemption can result in a task having TIF_SME set and TIF_FOREIGN_FPSTATE clear even though the live CPU state is stale (e.g. with SME traps enabled). This can result in warnings from do_sme_acc() where SME traps are not expected while TIF_SME is set: | /* With TIF_SME userspace shouldn't generate any traps */ | if (test_and_set_thread_flag(TIF_SME)) | WARN_ON(1); This is very similar to the SVE issue we fixed in commit: 751ecf6afd6568ad ("arm64/sve: Discard stale CPU state when handling SVE traps") The race can occur when the SME trap handler is preempted before and after manipulating the saved FPSIMD/SVE/SME state, starting and ending on the same CPU, e.g. | void do_sme_acc(unsigned long esr, struct pt_regs *regs) | { | // Trap on CPU 0 with TIF_SME clear, SME traps enabled | // task->fpsimd_cpu is 0. | // per_cpu_ptr(&fpsimd_last_state, 0) is task. | | ... | | // Preempted; migrated from CPU 0 to CPU 1. | // TIF_FOREIGN_FPSTATE is set. | | get_cpu_fpsimd_context(); | | /* With TIF_SME userspace shouldn't generate any traps */ | if (test_and_set_thread_flag(TIF_SME)) | WARN_ON(1); | | if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) { | unsigned long vq_minus_one = | sve_vq_from_vl(task_get_sme_vl(current)) - 1; | sme_set_vq(vq_minus_one); | | fpsimd_bind_task_to_cpu(); | } | | put_cpu_fpsimd_context(); | | // Preempted; migrated from CPU 1 to CPU 0. | // task->fpsimd_cpu is still 0 | // If per_cpu_ptr(&fpsimd_last_state, 0) is still task then: | // - Stale HW state is reused (with SME traps enabled) | // - TIF_FOREIGN_FPSTATE is cleared | // - A return to userspace skips HW state restore | } Fix the case where the state is not live and TIF_FOREIGN_FPSTATE is set by calling fpsimd_flush_task_state() to detach from the saved CPU state. This ensures that a subsequent context switch will not reuse the stale CPU state, and will instead set TIF_FOREIGN_FPSTATE, forcing the new state to be reloaded from memory prior to a return to userspace. Note: this was originallly posted as [1]. Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Reported-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/linux-arm-kernel/20241204-arm64-sme-reenable-v2-1-bae87728251d@kernel.org/ [ Rutland: rewrite commit message ] Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20250409164010.3480271-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit d7649a4a601ebf4603f0a673f554ab350b6cfede Author: Mark Rutland Date: Wed Apr 9 17:40:01 2025 +0100 arm64/fpsimd: Remove opportunistic freeing of SME state When a task's SVE vector length (NSVL) is changed, and the task happens to have SVCR.{SM,ZA}=={0,0}, vec_set_vector_length() opportunistically frees the task's sme_state and clears TIF_SME. The opportunistic freeing was added with no rationale in commit: d4d5be94a8787242 ("arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes") That commit fixed an unrelated problem where the task's sve_state was freed while it could be used to store streaming mode register state, where the fix was to re-allocate the task's sve_state. There is no need to free and/or reallocate the task's sme_state when the SVE vector length changes, and there is no need to clear TIF_SME. Given the SME vector length (SVL) doesn't change, the task's sme_state remains correctly sized. Remove the unnecessary opportunistic freeing of the task's sme_state when the task's SVE vector length is changed. The task's sme_state is still freed when the SME vector length is changed. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 45fd86986b79c3ada56d3a14e712447e992433aa Author: Mark Rutland Date: Wed Apr 9 17:40:00 2025 +0100 arm64/fpsimd: Remove redundant SVE trap manipulation When task_fpsimd_load() loads the saved FPSIMD/SVE/SME state, it configures EL0 SVE traps by calling sve_user_{enable,disable}(). This is unnecessary, and this is suspicious/confusing as task_fpsimd_load() does not configure EL0 SME traps. All calls to task_fpsimd_load() are followed by a call to fpsimd_bind_task_to_cpu(), where the latter configures traps for SVE and SME dependent upon the current values of TIF_SVE and TIF_SME, overriding any trap configuration performed by task_fpsimd_load(). The calls to sve_user_{enable,disable}() calls in task_fpsimd_load() have been redundant (though benign) since they were introduced in commit: a0136be443d51803 ("arm64/fpsimd: Load FP state based on recorded data type") Remove the unnecessary and confusing SVE trap manipulation. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 61db0e0ba398a3726ca0e6a6399898d3d4c7b0f9 Author: Mark Rutland Date: Wed Apr 9 17:39:59 2025 +0100 arm64/fpsimd: Remove unused fpsimd_force_sync_to_sve() There have been no users of fpsimd_force_sync_to_sve() since commit: bbc6172eefdb276b ("arm64/fpsimd: SME no longer requires SVE register state") Remove fpsimd_force_sync_to_sve(). Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20250409164010.3480271-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 95507570fb2f75544af69760cd5d8f48fc5c7f20 Author: Mark Rutland Date: Wed Apr 9 17:39:58 2025 +0100 arm64/fpsimd: Avoid RES0 bits in the SME trap handler The SME trap handler consumes RES0 bits from the ESR when determining the reason for the trap, and depends upon those bits reading as zero. This may break in future when those RES0 bits are allocated a meaning and stop reading as zero. For SME traps taken with ESR_ELx.EC == 0b011101, the specific reason for the trap is indicated by ESR_ELx.ISS.SMTC ("SME Trap Code"). This field occupies bits [2:0] of ESR_ELx.ISS, and as of ARM DDI 0487 L.a, bits [24:3] of ESR_ELx.ISS are RES0. ESR_ELx.ISS itself occupies bits [24:0] of ESR_ELx. Extract the SMTC field specifically, matching the way we handle ESR_ELx fields elsewhere, and ensuring that the handler is future-proof. Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME") Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250409164010.3480271-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 36ddc9ec8f3ec00eb4c88631807d02f96e05c0e7 Merge: 4a7c28e659b85c aaf6223ea2a1ff Author: Mark Brown Date: Wed Apr 9 17:51:31 2025 +0100 gpio: don't compare raw GPIO descriptor pointers Merge series from Bartosz Golaszewski : Handling of shared GPIOs in the kernel needs some improvements. Let's start with a simple change of not comparing GPIO descriptor pointers directly as there's nothing that guarantees that the same physical pin will always be represented by a single GPIO descriptor obtained by calling gpiod_get(). commit 6d7f0c1103ef3935eb3f302d09af4ef9e85212a3 Author: Koichiro Den Date: Mon Apr 7 13:30:19 2025 +0900 selftests: gpio: add test cases for gpio-aggregator Add a set of tests for gpio-aggregator module. This test covers both pre-existing new_device/delete_device interface and new configfs-based interface. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-10-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 10f94d092bba9ab08004c624c604e976e6e3cd22 Author: Koichiro Den Date: Mon Apr 7 13:30:18 2025 +0900 Documentation: gpio: document configfs interface for gpio-aggregator Add documentation for the newly added configfs-based interface for GPIO aggregator. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-9-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 0269c768de1b5e430c3f9a6869261606c82abe90 Author: Koichiro Den Date: Mon Apr 7 13:30:17 2025 +0900 gpio: aggregator: cancel deferred probe for devices created via configfs For aggregators initialized via configfs, write 1 to 'live' waits for probe completion and returns an error if the probe fails, unlike the legacy sysfs interface, which is asynchronous. Since users control the liveness of the aggregator device and might be editing configurations while 'live' is 0, deferred probing is both unnatural and unsafe. Cancel deferred probe for purely configfs-based aggregators when probe fails. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-8-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 83c8e3df642f5fde320278a5e6ce9e46f9689d1a Author: Koichiro Den Date: Mon Apr 7 13:30:16 2025 +0900 gpio: aggregator: expose aggregator created via legacy sysfs to configfs Expose settings for aggregators created using the sysfs 'new_device' interface to configfs. Once written to 'new_device', an "_sysfs." path appears in the configfs regardless of whether the probe succeeds. Consequently, users can no longer use that prefix for custom GPIO aggregator names. The 'live' attribute changes to 1 when the probe succeeds and the GPIO forwarder is instantiated. Note that the aggregator device created via sysfs is asynchronous, i.e. writing into 'new_device' returns without waiting for probe completion, and the probe may succeed, fail, or eventually succeed via deferred probe. Thus, the 'live' attribute may change from 0 to 1 asynchronously without notice. So, editing key/offset/name while it's waiting for deferred probe is prohibited. The configfs auto-generation relies on create_default_group(), which inherently prohibits rmdir(2). To align with the limitation, this commit also prohibits mkdir(2) for them. When users want to change the number of lines for an aggregator initialized via 'new_device', they need to tear down the device using 'delete_device' and reconfigure it from scratch. This does not break previous behavior; users of legacy sysfs interface simply gain additional almost read-only configfs exposure. Still, users can write to the 'live' attribute to toggle the device unless it's waiting for deferred probe. So once probe succeeds, they can deactivate it in the same manner as the devices initialized via configfs. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-7-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 4ec2315d7fabeb08e9ad7995bd16f34118e4633b Author: Koichiro Den Date: Mon Apr 7 13:30:15 2025 +0900 gpio: aggregator: rename 'name' to 'key' in gpio_aggregator_parse() Rename the local variable 'name' in gpio_aggregator_parse() to 'key' because struct gpio_aggregator_line now uses the 'name' field for the custom line name and the local variable actually represents a 'key'. This change prepares for the next but one commit. No functional change. Reviewed-by: Geert Uytterhoeven Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-6-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 86f162e73d2d81ef6d819c06a3b6c2fda77a79b8 Author: Koichiro Den Date: Mon Apr 7 13:30:14 2025 +0900 gpio: aggregator: introduce basic configfs interface The existing sysfs 'new_device' interface has several limitations: * No way to determine when GPIO aggregator creation is complete. * No way to retrieve errors when creating a GPIO aggregator. * No way to trace a GPIO line of an aggregator back to its corresponding physical device. * The 'new_device' echo does not indicate which virtual gpiochip was created. * No way to assign names to GPIO lines exported through an aggregator. Introduce the new configfs interface for gpio-aggregator to address these limitations. It provides a more streamlined, modern, and extensible configuration method. For backward compatibility, the 'new_device' interface and its behavior is retained for now. This commit implements basic functionalities: /config/gpio-aggregator// /config/gpio-aggregator//live /config/gpio-aggregator//dev_name /config/gpio-aggregator/// /config/gpio-aggregator///key /config/gpio-aggregator///offset /config/gpio-aggregator///name Basic setup flow is: 1. Create a directory for a GPIO aggregator. 2. Create subdirectories for each line you want to instantiate. 3. In each line directory, configure the key and offset. The key/offset semantics are as follows: * If offset is >= 0: - key specifies the name of the chip this GPIO belongs to - offset specifies the line offset within that chip. * If offset is <0: - key needs to specify the GPIO line name. 4. Return to the aggregator's root directory and write '1' to the live attribute. For example, the command in the existing kernel doc: echo 'e6052000.gpio 19 e6050000.gpio 20-21' > new_device is equivalent to: mkdir /sys/kernel/config/gpio-aggregator/ # Change to name of your choice (e.g. "aggr0") cd /sys/kernel/config/gpio-aggregator/ mkdir line0 line1 line2 # Only "line" naming allowed. echo e6052000.gpio > line0/key echo 19 > line0/offset echo e6050000.gpio > line1/key echo 20 > line1/offset echo e6050000.gpio > line2/key echo 21 > line2/offset echo 1 > live The corresponding gpio_device id can be identified as follows: cd /sys/kernel/config/gpio-aggregator/ ls -d /sys/devices/platform/`cat dev_name`/gpiochip* Also, via configfs, custom GPIO line name can be set like this: cd /sys/kernel/config/gpio-aggregator/ echo "abc" > line1/name Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-5-koichiro.den@canonical.com [Bartosz: remove stray newlines] Signed-off-by: Bartosz Golaszewski commit 6db0261f3776bde01ae916ad8e1cb2ded3ba1a2b Author: Sakari Ailus Date: Wed Apr 9 11:47:38 2025 +0300 Documentation: ACPI: Use all-string data node references Document that references to data nodes shall use string-only references instead of a device reference and a succession of the first package entries of hierarchical data node references. Fixes: 9880702d123f ("ACPI: property: Support using strings in reference properties") Cc: 6.8+ # 6.8+ Signed-off-by: Sakari Ailus Link: https://patch.msgid.link/20250409084738.3657079-1-sakari.ailus@linux.intel.com [ rjw: Clarifying edits ] Signed-off-by: Rafael J. Wysocki commit d35b913f0e1cb003b658827f5a900d648b092c5b Author: Jani Nikula Date: Tue Apr 8 16:38:41 2025 +0300 drm/i915/wm: convert i9xx_wm.c internally to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of i9xx_wm.c to struct intel_display. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/bbee93f837fe7fedfd1627ff6fa295da8881df8d.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d0e7412505dc87685e001de0275ab9c7384f97e7 Author: Jani Nikula Date: Tue Apr 8 16:38:40 2025 +0300 drm/i915/wm: convert i9xx_wm.c to intel_de_*() register interface The registers handled in i9xx_wm.c are mostly display registers. The MCH_SSKPD and MLTR_ILK registers are not. Convert register access to intel_de_*() interface where applicaple. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/68367382759570413669d5648895a1da8f6c68f7.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ddb062b0e29a7f1f01a7614bcce56ebbae4b1aab Author: Jani Nikula Date: Tue Apr 8 16:38:39 2025 +0300 drm/i915/wm: convert i9xx_wm.h external interfaces to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert the i9xx_wm.h interface to struct intel_display. With this, we can make intel_wm.c independent of i915_drv.h. v2: Also remove i915_drv.h, fix commit message Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/3e30634d85c0e0aac9c95f9a2f928131ba400271.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3b9c794b9c421ba471ef50e0794500a86da43d2a Author: Jani Nikula Date: Tue Apr 8 16:38:38 2025 +0300 drm/i915/wm: convert skl_watermarks.c internally to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of skl_watermarks.c to struct intel_display. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/61ae2013c5db962e90e072be7d37d630cb7dfc34.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6fe8f9c1388b533a54bf3bf63a2a1fd283c02dd5 Author: Jani Nikula Date: Tue Apr 8 16:38:37 2025 +0300 drm/i915/wm: convert skl_watermark.h external interfaces to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert the skl_watermark.h interface to struct intel_display. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/cd2b1863dee25b69b4766090dd183a7467c4edea.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b4bd4f219cfed89d6de49e2fa26c0d8633d48211 Author: Jani Nikula Date: Tue Apr 8 16:38:36 2025 +0300 drm/i915/wm: convert intel_wm.c internally to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_wm.c to struct intel_display. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/6106c0313190ee904c7f7737d0b78b61983eed91.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 788f205f3ce468f7156b4c018cfb8431aec478a9 Author: Jani Nikula Date: Tue Apr 8 16:38:35 2025 +0300 drm/i915/wm: convert intel_wm.h external interfaces to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert the intel_wm.h interface as well as the hooks in struct intel_wm_funcs to struct intel_display. Reviewed-by: Suraj Kandpal Link: https://lore.kernel.org/r/1085900b4e46bbb514e6918c321639ac380331ce.1744119460.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 25b2f46bd7de2f0007d742de9d2e72e65db0edf3 Author: Jeff Johnson Date: Tue Apr 8 09:14:12 2025 -0700 wifi: ath12k: ahb: Replace del_timer_sync() with timer_delete_sync() A linux-next build error was reported in [1]. This is the result of a treewide timer cleanup [2]. The ath12k AHB support has not yet landed in the tree where the cleanup occurred, and hence a new call to del_timer_sync() was not addressed by the treewide cleanup. So fix that one instance. Reported-by: Stephen Rothwell Closes: https://msgid.link/20250408105146.459dfcf5@canb.auug.org.au # [1] Link: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=8fa7292fee5c5240402371ea89ab285ec856c916 # [2] Link: https://patch.msgid.link/20250408-timer_delete_sync-v1-1-4dcb22f71083@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 8fa2f8bd6ad10ecf12f9872cdc5d8df7056e98e3 Author: Zhang Rui Date: Wed Apr 9 08:50:25 2025 +0800 ACPI: processor: idle: Set pr->flags.power unconditionally acpi_processor_get_power_info_default() ensures that the processor's ACPI_STATE_C1 state is always valid. Consequently, the pr->flags.power should be set unconditionally after this. Remove conditional checks and directly set pr->flags.power. No functional change. Signed-off-by: Zhang Rui Link: https://patch.msgid.link/20250409005026.1932637-2-rui.zhang@intel.com Signed-off-by: Rafael J. Wysocki commit 179db1909c5c4b5300cce626507b0f843f7d2cc2 Author: Mario Limonciello Date: Mon Apr 7 13:36:56 2025 -0500 pinctrl: amd: Add an LPS0 check() callback During suspend the pinctrl_amd driver disables the interrupts for any GPIOs that are not marked as wake sources. This however does not prevent them from changing the wake status bit during suspend, it just stops the system from waking. If the system wakes from hardware sleep for another reason (such as plugging in the AC adapter) this wake bits might be active. This could potentially cause problems with going back to hardware sleep. Add an extra debugging message when PM debugging is enabled to help identify if this is happening. Acked-by: Linus Walleij Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3929 Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20250407183656.1503446-2-superm1@kernel.org Signed-off-by: Rafael J. Wysocki commit e1bdbbc98279164d910d2de82a745f090a8b249f Author: Mario Limonciello Date: Mon Apr 7 13:36:55 2025 -0500 ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case acpi_register_lps0_dev() and acpi_unregister_lps0_dev() may be used in drivers that don't require CONFIG_SUSPEND or compile on !X86. Add prototypes for those cases. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502191627.fRgoBwcZ-lkp@intel.com/ Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20250407183656.1503446-1-superm1@kernel.org Signed-off-by: Rafael J. Wysocki commit 46d839adcc93ccc445f90866c31b2ed2785f0319 Author: shitao Date: Mon Apr 7 16:54:19 2025 +0800 ACPI: battery: Round capacity percengate to closest integer If the difference between capacity_now and full_capacity is within 0.5%, 100% is arguably a better number to expose than 99% and exposing the latter may confuse the user to think that there's something wrong with the battery. Round the capacity percentage to the closest integer value to avoid the confusion. Signed-off-by: shitao Link: https://patch.msgid.link/20250407085419.494234-1-shitao@kylinos.cn [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 88fe1d1a646b3b01dcc335c44e7b33ea510f620e Author: Koichiro Den Date: Mon Apr 7 13:30:13 2025 +0900 gpio: aggregator: add gpio_aggregator_{alloc,free}() Prepare for the upcoming configfs interface. These functions will be used by both the existing sysfs interface and the new configfs interface, reducing code duplication. No functional change. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-4-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 7616dd97ae22e5f69b24774455673d183d4191c9 Author: Koichiro Den Date: Mon Apr 7 13:30:12 2025 +0900 gpio: aggregator: unify function naming Unify function names to use gpio_aggregator_ prefix (except GPIO forwarder implementations, which remain unchanged in subsequent commits). While at it, rename the pre-existing gpio_aggregator_free() to gpio_aggregator_destory(), since that name will be used by new alloc/free functions introduced in the next commit, for which the name is more appropriate. No functional change. Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-3-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 7a56efeabffd13a162073068b8e29113c65f9e64 Author: Koichiro Den Date: Mon Apr 7 13:30:11 2025 +0900 gpio: aggregator: reorder functions to prepare for configfs introduction Reorder functions in drivers/gpio/gpio-aggregator.c to prepare for the configfs-based interface additions in subsequent commits. Arrange the code so that the configfs implementations will appear above the existing sysfs-specific code, since the latter will partly depend on the configfs interface implementations when it starts to expose the settings to configfs. The order in drivers/gpio/gpio-aggregator.c will be as follows: * Basic gpio_aggregator/gpio_aggregator_line representations * Common utility functions * GPIO Forwarder implementations * Configfs interface implementations * Sysfs interface implementations * Platform device implementations * Module init/exit implementations This separate commit ensures a clean diff for the subsequent commits. No functional change. Reviewed-by: Geert Uytterhoeven Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250407043019.4105613-2-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski commit 0f8af0356a45547683a216e4921006a3c6a6d922 Author: Daniil Tatianin Date: Tue Apr 1 21:43:11 2025 +0300 ACPICA: exserial: don't forget to handle FFixedHW opregions for reading The initial commit that introduced support for FFixedHW operation regions did add a special case in the AcpiExReadSerialBus If, but forgot to actually handle it inside the switch, so add the missing case to prevent reads from failing with AE_AML_INVALID_SPACE_ID. Link: https://github.com/acpica/acpica/pull/998 Fixes: ee64b827a9a ("ACPICA: Add support for FFH Opregion special context data") Signed-off-by: Daniil Tatianin Link: https://patch.msgid.link/20250401184312.599962-1-d-tatianin@yandex-team.ru Signed-off-by: Rafael J. Wysocki commit 3be3f70ee95da03a87d94c4a714ee679a5c7b34d Author: Herbert Xu Date: Tue Apr 8 10:12:20 2025 +0800 crypto: x86/chacha - Restore SSSE3 fallback path The chacha_use_simd static branch is required for x86 machines that lack SSSE3 support. Restore it and the generic fallback code. Reported-by: Eric Biggers Fixes: 9b4400215e0e ("crypto: x86/chacha - Remove SIMD fallback path") Signed-off-by: Herbert Xu commit 5322584385d938773cbb562db64d8423dd5fd026 Merge: af7e23c616f523 b7b39df7e710b0 Author: Herbert Xu Date: Wed Apr 9 21:33:40 2025 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up scompress and caam fixes. The scompress fix has a non-trivial resolution as the code in question has moved over to acompress. commit 33d5bf70fff43fbc612450164bd0bab6b9ada261 Author: Lad Prabhakar Date: Tue Apr 1 10:01:33 2025 +0100 arm: multi_v7_defconfig: Drop individual Renesas SoC entries ARCH_RENESAS is already enabled in multi_v7_defconfig, which ensures that all ARM32 Renesas SoCs are enabled by default. As a result, explicitly listing individual Renesas SoC entries is redundant. Remove these entries to simplify the configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250401090133.68146-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 38509467f64ebc5414099c6d9e00797801dfc3a0 Author: Lad Prabhakar Date: Tue Apr 1 10:01:32 2025 +0100 arm: shmobile_defconfig: Drop individual Renesas SoC entries ARCH_RENESAS is already enabled in shmobile_defconfig, which ensures that all ARM32 Renesas SoCs are enabled by default. As a result, explicitly listing individual Renesas SoC entries is redundant. Remove these entries to simplify the configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250401090133.68146-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit aac7d517d04ad3ea95de1f1968803bfe412bb1dd Author: Lad Prabhakar Date: Tue Apr 1 10:01:30 2025 +0100 soc: renesas: Kconfig: Enable SoCs by default when ARCH_RENESAS is set Enable various Renesas SoCs by default when ARCH_RENESAS is selected. Adding default y if ARCH_RENESAS to the relevant configurations removes the need to manually enable individual SoCs in defconfig files. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250401090133.68146-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ae7ace712d5064c13ece545902d3421a2aa40f71 Author: Lad Prabhakar Date: Tue Apr 1 10:01:31 2025 +0100 arm64: defconfig: Remove individual Renesas SoC entries Remove explicit entries for individual Renesas SoCs from the defconfig file. Since all Renesas SoCs are enabled by default when ARCH_RENESAS is selected, and ARCH_RENESAS is already enabled in the defconfig, listing them separately is redundant. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250401090133.68146-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f7625680c5284875cdb4f5293fd538248f1b609e Author: Giovanni Gherdovich Date: Fri Mar 28 15:30:40 2025 +0100 ACPI: processor: idle: Remove obsolete comment Since commit 496121c02127 ("ACPI: processor: idle: Allow probing on platforms with one ACPI C-state"), the comment doesn't reflect the code anymore; remove it. Signed-off-by: Giovanni Gherdovich Acked-by: Zhang Rui Link: https://patch.msgid.link/20250328143040.9348-2-ggherdovich@suse.cz Signed-off-by: Rafael J. Wysocki commit e686365c0411275474527c2055ac133f2eb47526 Author: Dan Carpenter Date: Wed Apr 9 14:00:35 2025 +0300 spi: spi_amd: Fix an IS_ERR() vs NULL check in probe The devm_ioremap() function returns NULL on error, it doesn't return error pointers. Update the error checking to match. Fixes: b644c2776652 ("spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/0e0f5ede-8993-4fac-967c-51e46b095416@stanley.mountain Signed-off-by: Mark Brown commit 147b2a96f24e0cfcc476378f9356b30662045c7e Author: Alexis Czezar Torreno Date: Wed Apr 9 09:34:29 2025 +0800 regulator: adp5055: Add driver for adp5055 Add ADI ADP5055 driver support. The device consists of 3 buck regulators able to connect to high input voltages of up to 18V with no preregulators. Signed-off-by: Alexis Czezar Torreno Link: https://patch.msgid.link/20250409-upstream-adp5055-v6-2-faa6e810deb1@analog.com Signed-off-by: Mark Brown commit 5bfc88c4e5783357399ce66f40a479a090af2ba0 Author: Alexis Czezar Torreno Date: Wed Apr 9 09:34:28 2025 +0800 regulator: dt-bindings: adi,adp5055-regulator: Add adp5055 support Add documentation for devicetree bindings for ADP5055. The device consists of 3 buck regulators able to connect to high input voltages of up to 18V with no preregulators. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexis Czezar Torreno Link: https://patch.msgid.link/20250409-upstream-adp5055-v6-1-faa6e810deb1@analog.com Signed-off-by: Mark Brown commit aaf6223ea2a1ff9316a81bf851fd5a0e82635b60 Author: Bartosz Golaszewski Date: Mon Apr 7 09:08:15 2025 +0200 regulator: don't compare raw GPIO descriptor pointers There's no API contract saying that two GPIO descriptor pointers obtained with a call to gpiod_get() (or one of the variants), that refer to the same physical GPIO pin, always point to the same structure. Use the dedicated comparator function. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250407-gpiod-is-equal-v1-2-7d85f568ae6e@linaro.org Signed-off-by: Mark Brown commit 1734d98fbcce343eafba16e18e3a3001b3e94ab5 Author: Mark Barnett Date: Tue Apr 8 18:15:26 2025 +0100 perf/arch: Record sample last_period before updating on the x86 and PowerPC platforms This change alters the PowerPC and x86 driver implementations to record the last sample period before the event is updated for the next period. A common pattern in PMU driver implementations is to have a "*_event_set_period" function which takes care of updating the various period-related fields in a perf_event structure. In most cases, the drivers choose to call this function after initializing a sample data structure with perf_sample_data_init. The x86 and PowerPC drivers deviate from this, choosing to update the period before initializing the sample data. When using an event with an alternate sample period, this causes an incorrect period to be written to the sample data that gets reported to userspace. Signed-off-by: Mark Barnett Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250408171530.140858-2-mark.barnett@arm.com commit bc4f328ff516f6ea53c3c0d385a84ea7ae423c20 Author: Joel Granados Date: Tue Jan 7 15:19:19 2025 +0100 sparc: mv sparc sysctls into their own file under arch/sparc/kernel Move sparc sysctls (reboot-cmd, stop-a, scons-poweroff and tsb-ratio) into a new file (arch/sparc/kernel/setup.c). This file will be included for both 32 and 64 bit sparc. Leave "tsb-ratio" under SPARC64 ifdef as it was in kernel/sysctl.c. The sysctl table register is called with arch_initcall placing it after its original place in proc_root_init. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados commit 67049b53e06fa1758df1463789f286a7cba67c50 Author: Joel Granados Date: Wed Jan 8 12:55:58 2025 +0100 stack_tracer: move sysctl registration to kernel/trace/trace_stack.c Move stack_tracer_enabled into trace_stack_sysctl_table. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Acked-by: Steven Rostedt (Google) Signed-off-by: Joel Granados commit dd293df6395a2c9e0fc4faa8defeceaa907e7717 Author: Joel Granados Date: Sun Dec 29 16:11:25 2024 +0100 tracing: Move trace sysctls into trace.c Move trace ctl tables into their own const array in kernel/trace/trace.c. The sysctl table register is called with subsys_initcall placing if after its original place in proc_root_init. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados Acked-by: Steven Rostedt (Google) commit 256db5c9b507d770f8b99b10f0671d994d5c9d64 Author: Joel Granados Date: Mon Dec 23 17:11:29 2024 +0100 signal: Move signal ctl tables into signal.c Move print-fatal-signals into its own const ctl table array in kernel/signal.c. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados commit c09b9810414d09d5a66e6e397506f5c657303eef Author: Joel Granados Date: Sun Dec 22 22:54:15 2024 +0100 panic: Move panic ctl tables into panic.c Move panic, panic_on_oops, panic_print, panic_on_warn into kerne/panic.c. This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados commit 3256a83335a40b435cc2ea3aed159608879f6ed8 Author: Thorsten Blum Date: Mon Apr 7 10:52:53 2025 +0200 perf/x86/intel/bts: Rename local bts_buffer variables for clarity Rename struct bts_buffer objects from 'buf' to 'bb' to improve the readability when accessing the structure's 'buf' member. For example, 'buf->buf[]' becomes 'bb->buf[]'. Indent line 327 using tabs to silence a checkpatch warning. No functional changes intended. Suggested-by: Ingo Molnar Signed-off-by: Thorsten Blum Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250407085253.742834-2-thorsten.blum@linux.dev commit d9fa398fe82728ee703ad2bd9cf5247df9626470 Author: Ard Biesheuvel Date: Tue Apr 8 10:52:56 2025 +0200 x86/boot/startup: Disable objtool validation for library code The library code built under arch/x86/boot/startup is not intended to be linked into vmlinux but only into the decompressor and/or the EFI stub. This means objtool validation is not needed here, and may result in false positive errors for things like missing retpolines. So disable it for all objects added to lib-y Tested-by: Chaitanya Kumar Borah Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: David Woodhouse Cc: Rafael J. Wysocki Cc: Len Brown Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250408085254.836788-10-ardb+git@google.com commit cdbf0e16fb3f0737921fd1311c75afe17b97d936 Author: Jani Nikula Date: Thu Apr 3 15:21:34 2025 +0300 drm/i915/dsi: unify naming and simplify checks for dphy params Unify the naming of the data and clock lane timing parameters, and simplify their bounds checks. Drop the debug messages on out of bounds parameters as excessive. Clarify the comment while at it. Cc: William Tseng Reviewed-by: William Tseng Tested-by: William Tseng Link: https://lore.kernel.org/r/d1a75ae7b9d93a0b50976b5de45ba2ca798991ad.1743682608.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ca677505e4776bd1abf90096f3eab3b68079dde9 Author: Jani Nikula Date: Thu Apr 3 15:21:33 2025 +0300 drm/i915/dsi: separate clock and data lane prepare timing The history of why the max of VBT clock and data lane prepare timing parameter is used for both instead of each individually is unknown. Separate them to follow what the Windows driver does. Cc; William Tseng Reviewed-by: William Tseng Tested-by: William Tseng Link: https://lore.kernel.org/r/079a26d0aae79f299aee0397dad2d6519cd55071.1743682608.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit fb52f3226cab41b94f9e6ac92b1108bce324e700 Author: Bartosz Golaszewski Date: Mon Apr 7 09:09:21 2025 +0200 ARM: s3c/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-arm-v1-4-9e4a914c7fd4@linaro.org Signed-off-by: Bartosz Golaszewski commit dd8a6af45928871e5d9a04959ab8f97c3714264a Author: Bartosz Golaszewski Date: Mon Apr 7 09:09:20 2025 +0200 ARM: scoop/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-arm-v1-3-9e4a914c7fd4@linaro.org Signed-off-by: Bartosz Golaszewski commit 9c3782118a57a6d7a17980115f46bcf2b85fdf29 Author: Bartosz Golaszewski Date: Mon Apr 7 09:09:19 2025 +0200 ARM: sa1100/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-arm-v1-2-9e4a914c7fd4@linaro.org Signed-off-by: Bartosz Golaszewski commit 6982e6b0bdd838fe71a6133cfc0f79645bc31a04 Author: Bartosz Golaszewski Date: Mon Apr 7 09:09:18 2025 +0200 ARM: orion/gpio: use new line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-arm-v1-1-9e4a914c7fd4@linaro.org Signed-off-by: Bartosz Golaszewski commit 4a1cff317d952d79dfcc951e0e4e5c4a096e765b Author: Simon Wunderlich Date: Wed Apr 9 10:03:38 2025 +0200 batman-adv: Start new development cycle This version will contain all the (major or even only minor) changes for Linux 6.16. The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0). Signed-off-by: Simon Wunderlich commit dad3386b182eb1356149d11fd969ac318e40efa3 Merge: 27986833e8e675 265daffe788aa1 Author: Bartosz Golaszewski Date: Wed Apr 9 09:58:22 2025 +0200 Merge tag 'gpiod-is-equal-for-v6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/brgl/linux into gpio/for-next Immutable tag for the regulator tree to pull from gpio: provide gpiod_is_equal() commit 265daffe788aa1cc5925d0afcde4fe6e99c66638 Author: Bartosz Golaszewski Date: Mon Apr 7 09:08:14 2025 +0200 gpio: provide gpiod_is_equal() There are users in the kernel that directly compare raw GPIO descriptor pointers in order to determine whether they refer to the same physical GPIO pin. This accidentally works like this but is not guaranteed by any API contract. Let's provide a comparator function that hides the actual logic. Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20250407-gpiod-is-equal-v1-1-7d85f568ae6e@linaro.org Signed-off-by: Bartosz Golaszewski commit e8bf4a1bdaeadb28d13b9a2bcfd5910fda06eede Author: Thomas Zimmermann Date: Tue Apr 8 11:17:05 2025 +0200 drm/sysfb: efidrm: Support module builds Make CONFIG_DRM_EFIDRM a tristate to enable module builds. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250408091837.407401-3-tzimmermann@suse.de commit 5ea51087b1430f9d1fcc9d27d024f8967fd29d0c Author: Thomas Zimmermann Date: Tue Apr 8 11:17:04 2025 +0200 efi: Export symbol efi_mem_desc_lookup Building efidrm as module requires efi_mem_desc_lookup(). Export the symbol. Signed-off-by: Thomas Zimmermann Acked-by: Ard Biesheuvel Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250408091837.407401-2-tzimmermann@suse.de commit bc417e54e24bc9c96d3c6eba2c8c60f7919e5afe Author: Riana Tauro Date: Mon Apr 7 10:44:13 2025 +0530 drm/xe: Enable configfs support for survivability mode Enable survivability mode if supported and configfs attribute is set. Enabling survivability mode manually is useful in cases where pcode does not detect failure, validation and for IFR (in-field-repair). To set configfs survivability mode attribute for a device echo 1 > /sys/kernel/config/xe/0000:03:00.0/survivability_mode The card enters survivability mode if supported v2: add a log if survivability mode is enabled for unsupported platforms (Rodrigo) Signed-off-by: Riana Tauro Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250407051414.1651616-4-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit 77052ab24590cb72598e31de4a7c29f99d51d201 Author: Riana Tauro Date: Mon Apr 7 10:44:12 2025 +0530 drm/xe: Add documentation for survivability mode Add survivability mode document to pcode document as it is enabled when pcode detects a failure. v2: fix kernel-doc (Lucas) Signed-off-by: Riana Tauro Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250407051414.1651616-3-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit 16280ded45fba1216d1d4c6acfc20c2d5b45ef50 Author: Riana Tauro Date: Mon Apr 7 10:44:11 2025 +0530 drm/xe: Add configfs to enable survivability mode Registers a configfs subsystem called 'xe' that creates a directory in the mounted configfs directory (/sys/kernel/config) Userspace can then create the device that has to be configured under the xe directory mkdir /sys/kernel/config/xe/0000:03:00.0 The device created will have the following attributes to be configured /sys/kernel/config/xe/ .. 0000:03:00.0/ ... survivability_mode v2: fix kernel-doc fix return value (Lucas) v3: fix kernel-doc (Lucas) Signed-off-by: Riana Tauro Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250407051414.1651616-2-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit c07d3aede2b26830ee63f64d8326f6a87dee3a6d Author: Eric Biggers Date: Fri Apr 4 15:58:59 2025 -0700 fscrypt: add support for hardware-wrapped keys Add support for hardware-wrapped keys to fscrypt. Such keys are protected from certain attacks, such as cold boot attacks. For more information, see the "Hardware-wrapped keys" section of Documentation/block/inline-encryption.rst. To support hardware-wrapped keys in fscrypt, we allow the fscrypt master keys to be hardware-wrapped. File contents encryption is done by passing the wrapped key to the inline encryption hardware via blk-crypto. Other fscrypt operations such as filenames encryption continue to be done by the kernel, using the "software secret" which the hardware derives. For more information, see the documentation which this patch adds to Documentation/filesystems/fscrypt.rst. Note that this feature doesn't require any filesystem-specific changes. However it does depend on inline encryption support, and thus currently it is only applicable to ext4 and f2fs. The version of this feature introduced by this patch is mostly equivalent to the version that has existed downstream in the Android Common Kernels since 2020. However, a couple fixes are included. First, the flags field in struct fscrypt_add_key_arg is now placed in the proper location. Second, key identifiers for HW-wrapped keys are now derived using a distinct HKDF context byte; this fixes a bug where a raw key could have the same identifier as a HW-wrapped key. Note that as a result of these fixes, the version of this feature introduced by this patch is not UAPI or on-disk format compatible with the version in the Android Common Kernels, though the divergence is limited to just those specific fixes. This version should be used going forwards. This patch has been heavily rewritten from the original version by Gaurav Kashyap and Barani Muthukumaran . Tested-by: Bartosz Golaszewski # sm8650 Link: https://lore.kernel.org/r/20250404225859.172344-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 581cf3a9cb61daae1009c2380b228f40177046d8 Author: Bitterblue Smith Date: Wed Apr 2 20:54:30 2025 +0300 wifi: rtw88: Fix the module names printed in dmesg The rtw88 module names all start with the "rtw88_" prefix, but the messages in dmesg mostly use the "rtw_" prefix. The messages from rtw88_8723cs don't even have the underscore. Use the KBUILD_MODNAME macro in every driver. This ensures that the messages in dmesg will always use the module name. Before: Mar 17 15:54:19 ideapad2 kernel: rtw_8814au 2-4:1.0: Firmware version 33.6.0, H2C version 6 After: Mar 17 16:33:35 ideapad2 kernel: rtw88_8814au 2-4:1.0: Firmware version 33.6.0, H2C version 6 Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/29cd29ba-bc51-4d5b-ad48-a43c6ce72d56@gmail.com commit b8d49bb8d16ae7dde8e05b275d6e3b8bbf27f011 Author: Bitterblue Smith Date: Wed Apr 2 18:31:36 2025 +0300 wifi: rtw88: Don't set SUPPORTS_AMSDU_IN_AMPDU for RTL8814AU RTL8814AU doesn't work well with SUPPORTS_AMSDU_IN_AMPDU. The RX speed is noticeably lower and the VHT RX statistics are strange. Typical values with SUPPORTS_AMSDU_IN_AMPDU: Reverse mode, remote host 192.168.0.1 is sending [ 5] local 192.168.0.50 port 60710 connected to 192.168.0.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 74.6 MBytes 626 Mbits/sec [ 5] 1.00-2.00 sec 79.2 MBytes 665 Mbits/sec [ 5] 2.00-3.00 sec 84.9 MBytes 712 Mbits/sec [ 5] 3.00-4.00 sec 83.8 MBytes 703 Mbits/sec [ 5] 4.00-5.00 sec 85.9 MBytes 720 Mbits/sec [ 5] 5.00-6.00 sec 78.9 MBytes 662 Mbits/sec [ 5] 6.00-7.00 sec 81.2 MBytes 682 Mbits/sec [ 5] 7.00-8.00 sec 80.5 MBytes 675 Mbits/sec [ 5] 8.00-9.00 sec 79.4 MBytes 666 Mbits/sec [ 5] 9.00-10.00 sec 82.2 MBytes 689 Mbits/sec [ 5] 10.00-11.00 sec 82.0 MBytes 688 Mbits/sec [ 5] 11.00-12.00 sec 84.2 MBytes 707 Mbits/sec [ 5] 12.00-13.00 sec 71.0 MBytes 596 Mbits/sec [ 5] 13.00-14.00 sec 69.4 MBytes 582 Mbits/sec [ 5] 14.00-15.00 sec 80.2 MBytes 673 Mbits/sec [ 5] 15.00-16.00 sec 74.5 MBytes 625 Mbits/sec [Rx Counter]: * CCA (CCK, OFDM, Total) = (0, 2455, 2455) * False Alarm (CCK, OFDM, Total) = (0, 69, 69) * CCK cnt (ok, err) = (0, 0) * OFDM cnt (ok, err) = (1239, 2) * HT cnt (ok, err) = (0, 0) * VHT cnt (ok, err) = (21, 12109) The "VHT ok" number is not believable. And without SUPPORTS_AMSDU_IN_AMPDU: Reverse mode, remote host 192.168.0.1 is sending [ 5] local 192.168.0.50 port 50030 connected to 192.168.0.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 70.5 MBytes 591 Mbits/sec [ 5] 1.00-2.00 sec 86.9 MBytes 729 Mbits/sec [ 5] 2.00-3.00 sec 98.6 MBytes 827 Mbits/sec [ 5] 3.00-4.00 sec 97.4 MBytes 817 Mbits/sec [ 5] 4.00-5.00 sec 98.6 MBytes 827 Mbits/sec [ 5] 5.00-6.00 sec 96.9 MBytes 813 Mbits/sec [ 5] 6.00-7.00 sec 98.2 MBytes 824 Mbits/sec [ 5] 7.00-8.00 sec 98.0 MBytes 822 Mbits/sec [ 5] 8.00-9.00 sec 99.9 MBytes 838 Mbits/sec [ 5] 9.00-10.00 sec 99.2 MBytes 833 Mbits/sec [ 5] 10.00-11.00 sec 98.0 MBytes 822 Mbits/sec [ 5] 11.00-12.00 sec 98.1 MBytes 823 Mbits/sec [ 5] 12.00-13.00 sec 97.0 MBytes 814 Mbits/sec [ 5] 13.00-14.00 sec 98.2 MBytes 824 Mbits/sec [ 5] 14.00-15.00 sec 98.5 MBytes 826 Mbits/sec [ 5] 15.00-16.00 sec 97.4 MBytes 817 Mbits/sec [Rx Counter]: * CCA (CCK, OFDM, Total) = (0, 3860, 3860) * False Alarm (CCK, OFDM, Total) = (0, 2, 2) * CCK cnt (ok, err) = (0, 0) * OFDM cnt (ok, err) = (1486, 0) * HT cnt (ok, err) = (0, 0) * VHT cnt (ok, err) = (7399, 9118) Add a new member "amsdu_in_ampdu" in struct rtw_chip_info and use it to set SUPPORTS_AMSDU_IN_AMPDU only for the other chips. Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/6202ccfb-feb0-4107-a08d-db2699e179f0@gmail.com commit 0d2a88690e583168effb03c64fd217a323b2c444 Author: Bitterblue Smith Date: Wed Apr 2 18:31:12 2025 +0300 wifi: rtw88: Set AMPDU factor to hardware for RTL8814A Tell the chip the maximum AMPDU size supported by the AP. This greatly improves the TX speed of RTL8814AU in the 2.4 GHz band. Before: ~90 Mbps. After: ~300 Mbps. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/4edc2a63-81b3-431c-9a37-5a7d899a6cc2@gmail.com commit dcbb7bb3a364f218411761e2e5ee2f6818d9bdfc Author: Bitterblue Smith Date: Wed Apr 2 18:30:28 2025 +0300 wifi: rtw88: usb: Enable RX aggregation for RTL8814AU Let the chip transfer several frames in a single USB Request Block. This is supposed to improve the RX speed. It can use the same code used for RTL8822CU, RTL8822BU, and RTL8821CU. Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/672397ac-dd4d-4420-8b3e-7011578e2243@gmail.com commit bf1103654df99d50724a022c8b9fca8908a86f50 Author: Bitterblue Smith Date: Wed Apr 2 18:30:02 2025 +0300 wifi: rtw88: usb: Enable switching the RTL8814AU to USB 3 The Realtek wifi 5 devices which support USB 3 are weird: when first plugged in, they pretend to be USB 2. The driver needs to send some commands to the device, which make it disappear and come back as a USB 3 device. The method used to switch the RTL8812AU also works for the RTL8814AU. Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/d3608f70-e04f-4f6b-987a-022c8e317165@gmail.com commit 420aabef3ab5fa743afb4d3d391f03ef0e777ca8 Author: Michal Luczaj Date: Mon Apr 7 21:01:02 2025 +0200 net: Drop unused @sk of __skb_try_recv_from_queue() __skb_try_recv_from_queue() deals with a queue, @sk is not used since commit e427cad6eee4 ("net: datagram: drop 'destructor' argument from several helpers"). Remove sk from function parameters, adapt callers. No functional change intended. Signed-off-by: Michal Luczaj Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250407-cleanup-drop-param-sk-v1-1-cd076979afac@rbox.co Signed-off-by: Jakub Kicinski commit 6a0f72c5e208c5980fe4bb7d0c2ecc31714207c4 Merge: 5ac40e6b5b0bac 5d7f5b2f6b9355 Author: Jakub Kicinski Date: Tue Apr 8 18:19:45 2025 -0700 Merge branch 'udp_tunnel-gro-optimizations' Paolo Abeni says: ==================== udp_tunnel: GRO optimizations The UDP tunnel GRO stage is source of measurable overhead for workload based on UDP-encapsulated traffic: each incoming packets requires a full UDP socket lookup and an indirect call. In the most common setups a single UDP tunnel device is used. In such case we can optimize both the lookup and the indirect call. Patch 1 tracks per netns the active UDP tunnels and replaces the socket lookup with a single destination port comparison when possible. Patch 2 tracks the different types of UDP tunnels and replaces the indirect call with a static one when there is a single UDP tunnel type active. I measure ~10% performance improvement in TCP over UDP tunnel stream tests on top of this series. v4: https://lore.kernel.org/cover.1741718157.git.pabeni@redhat.com v3: https://lore.kernel.org/cover.1741632298.git.pabeni@redhat.com v2: https://lore.kernel.org/cover.1741338765.git.pabeni@redhat.com v1: https://lore.kernel.org/cover.1741275846.git.pabeni@redhat.com ==================== Link: https://patch.msgid.link/cover.1744040675.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 5d7f5b2f6b935517ee5fd8058dc32342a5cba3e1 Author: Paolo Abeni Date: Mon Apr 7 17:45:42 2025 +0200 udp_tunnel: use static call for GRO hooks when possible It's quite common to have a single UDP tunnel type active in the whole system. In such a case we can replace the indirect call for the UDP tunnel GRO callback with a static call. Add the related accounting in the control path and switch to static call when possible. To keep the code simple use a static array for the registered tunnel types, and size such array based on the kernel config. Note that there are valid kernel configurations leading to UDP_MAX_TUNNEL_TYPES == 0 even with IS_ENABLED(CONFIG_NET_UDP_TUNNEL), Explicitly skip the accounting in such a case, to avoid compile warning when accessing "udp_tunnel_gro_types". Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/53d156cdfddcc9678449e873cc83e68fa1582653.1744040675.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit a36283e2b683f172aa1760c77325e50b16c0f792 Author: Paolo Abeni Date: Mon Apr 7 17:45:41 2025 +0200 udp_tunnel: create a fastpath GRO lookup. Most UDP tunnels bind a socket to a local port, with ANY address, no peer and no interface index specified. Additionally it's quite common to have a single tunnel device per namespace. Track in each namespace the UDP tunnel socket respecting the above. When only a single one is present, store a reference in the netns. When such reference is not NULL, UDP tunnel GRO lookup just need to match the incoming packet destination port vs the socket local port. The tunnel socket never sets the reuse[port] flag[s]. When bound to no address and interface, no other socket can exist in the same netns matching the specified local port. Matching packets with non-local destination addresses will be aggregated, and eventually segmented as needed - no behavior changes intended. Restrict the optimization to kernel sockets only: it covers all the relevant use-cases, and user-space owned sockets could be disconnected and rebound after setup_udp_tunnel_sock(), breaking the uniqueness assumption Note that the UDP tunnel socket reference is stored into struct netns_ipv4 for both IPv4 and IPv6 tunnels. That is intentional to keep all the fastpath-related netns fields in the same struct and allow cacheline-based optimization. Currently both the IPv4 and IPv6 socket pointer share the same cacheline as the `udp_table` field. Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/41d16bc8d1257d567f9344c445b4ae0b4a91ede4.1744040675.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 5ac40e6b5b0bac3f72020a48d01ada23e8450d0c Author: Victor Nogueira Date: Mon Apr 7 18:56:56 2025 -0300 selftests: tc-testing: Pre-load IFE action and its submodules Recently we had some issues in parallel TDC where some of IFE tests are failing due to some of IFE's submodules (like act_meta_skbtcindex and act_meta_skbprio) taking too long to load [1]. To avoid that issue, pre-load IFE and all its submodules before running any of the tests in tdc.sh [1] https://lore.kernel.org/netdev/e909b2a0-244e-4141-9fa9-1b7d96ab7d71@mojatatu.com/T/#u Signed-off-by: Victor Nogueira Link: https://patch.msgid.link/20250407215656.2535990-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski commit 314ffec606514cdf6d4bbedaaeeba0c826b6afc2 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:21 2025 +0200 arm64: dts: qcom: sm8650: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-24-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 0d046b7ad7d3c7f2dfc53fc5ad48e2fe2c3f2186 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:20 2025 +0200 arm64: dts: qcom: sm8550: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-23-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 0d18a031499d4ea2b86cdc8120c22bdcf22bcac0 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:19 2025 +0200 arm64: dts: qcom: sm8450: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-22-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit ee4bb3169263bad99d68e0039e944ae53e77691a Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:18 2025 +0200 arm64: dts: qcom: sm8350: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-21-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 855ff06098b7f3a2aca21b79d32d212fd096a98e Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:17 2025 +0200 arm64: dts: qcom: sm8250: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-20-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 35ed99d7f589f310688fa0d088913e5c8927da43 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:16 2025 +0200 arm64: dts: qcom: sm8150: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-19-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit ab7cd7f3968f14171d50ba0b0655186c3857d258 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:15 2025 +0200 arm64: dts: qcom: sm6350: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-18-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 4f40ebbebcd9a7a03b72aac478c7df7c7b44c635 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:14 2025 +0200 arm64: dts: qcom: sm6125: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-17-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit b44bf3bc74912649b2495894e82f5384e24e2060 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:13 2025 +0200 arm64: dts: qcom: sm6115: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-16-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 77764620c1888e8c8dc169f7c2f693fc4db96964 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:12 2025 +0200 arm64: dts: qcom: sdm845: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-15-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit dc489ba0dea37e3655d265f5889ade0d173229d5 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:11 2025 +0200 arm64: dts: qcom: sdm670: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-14-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 3c1ae3b255555406c5ff030190649437e399dde9 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:10 2025 +0200 arm64: dts: qcom: sdm630: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-13-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 4390fc773154ea25c0aeb4e75d0425cfa8de431f Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:09 2025 +0200 arm64: dts: qcom: sc8180x: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-12-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit adaa876233c102e53fb2bafe4f502474613f4ed2 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:08 2025 +0200 arm64: dts: qcom: sc7180: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-11-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 48478f726f3793a9d1cf9b10d6487a81ea7e3c73 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:07 2025 +0200 arm64: dts: qcom: qcm2290: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-10-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit f4220c41decc1944ef319c859840aa5405eee6fa Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:06 2025 +0200 arm64: dts: qcom: msm8998: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-9-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 4b32499da71716e075ea2dba115e3fe8b6f8ed2f Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:05 2025 +0200 arm64: dts: qcom: msm8996: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-8-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit b06f27d09ed455f153d2523f96bbd94ecf6a69d8 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:04 2025 +0200 arm64: dts: qcom: msm8976: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-7-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 8e35fab460cce97e387a2c975db45b762b551521 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:03 2025 +0200 arm64: dts: qcom: msm8953: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-6-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 011e7f2c26dcb42c255ab54207f548d68c3b8e38 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:02 2025 +0200 arm64: dts: qcom: msm8939: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-5-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 7c92da246e1a6933f25fa015d6c43a6bcfb2c7b3 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:01 2025 +0200 arm64: dts: qcom: msm8917: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-4-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 651af46f33ab284400e0fc307e5a81de54c75945 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:32:00 2025 +0200 arm64: dts: qcom: msm8916: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-3-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 1afdd80d1e021f758c975d857c6beb6da5c891bd Author: Krzysztof Kozlowski Date: Tue Apr 8 11:31:59 2025 +0200 ARM: dts: qcom: msm8974: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-2-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 17268faf29992d37033d6ad1a5ed5d924f2430d8 Author: Krzysztof Kozlowski Date: Tue Apr 8 11:31:58 2025 +0200 ARM: dts: qcom: msm8226: Use the header with DSI phy clock IDs Use the header with DSI phy clock IDs to make code more readable. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250408-dts-qcom-dsi-phy-clocks-v2-1-73b482a6dd02@linaro.org Signed-off-by: Bjorn Andersson commit 51212ce95354c5b51e8c3054bf80eeeed80003b6 Author: Krzysztof Kozlowski Date: Sun Apr 6 22:27:30 2025 +0200 power: supply: gpio-charger: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406202730.55096-2-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel commit c73d19f89cb03c43abbbfa3b9caa1b8fc719764c Author: Krzysztof Kozlowski Date: Sun Apr 6 22:27:29 2025 +0200 power: supply: collie: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250406202730.55096-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel commit 12a2bf6765c2a61eb7f20870452bb915eb28fdcc Author: Alyssa Rosenzweig Date: Tue Apr 8 16:54:14 2025 -0400 drm: Add UAPI for the Asahi driver This adds the UAPI for the Asahi driver targeting the GPU in the Apple M1 and M2 series systems on chip. The UAPI design is based on other modern Vulkan-capable drivers, including Xe and Panthor. Memory management is based on explicit VM management. Synchronization is exclusively explicit sync. This UAPI is validated against our open source Mesa stack, which is fully conformant to the OpenGL 4.6, OpenGL ES 3.2, OpenCL 3.0, and Vulkan 1.4 standards. The Vulkan driver supports sparse, exercising the VM_BIND mechanism. This patch adds the standalone UAPI header. It is implemented by an open source DRM driver written in Rust. We fully intend to upstream this driver when possible. However, as a production graphics driver, it depends on a significant number of Rust abstractions that will take a long time to upstream. In the mean time, our userspace is upstream in Mesa but is not allowed to probe with upstream Mesa as the UAPI is not yet reviewed and merged in the upstream kernel. Although we ship a patched Mesa in Fedora Asahi Remix, any containers shipping upstream Mesa builds are broken for our users, including upstream Flatpak and Waydroid runtimes. Additionally, it forces us to maintain forks of Mesa and virglrenderer, which complicates bisects. The intention in sending out this patch is for this UAPI to be thoroughly reviewed. Once we as the DRM community are satisfied with the UAPI, this header lands signifying that the UAPI is stable and must only be evolved in backwards-compatible ways; it will be the UAPI implemented in the DRM driver that eventually lands upstream. That promise lets us enable upstream Mesa, solving all these issues while the upstream Rust abstractions are developed. https://github.com/alyssarosenzweig/linux/commits/agx-uapi-v7 contains the DRM driver implementing this proposed UAPI. https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984 contains the Mesa patches to implement this proposed UAPI. That Linux and Mesa branch together give a complete graphics/compute stack on top of this UAPI. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Acked-by: Simona Vetter Reviewed-by: Neal Gompa Reviewed-by: Janne Grunau Reviewed-by: Faith Ekstrand Link: https://lore.kernel.org/r/20250408-agx-uapi-v7-1-ad122d4f7324@rosenzweig.io Signed-off-by: Alyssa Rosenzweig commit 771487050f83b030090079133b192de6e3cf5909 Author: Geert Uytterhoeven Date: Tue Apr 8 20:07:02 2025 +0200 genirq/generic-chip: Fix incorrect lock guard conversions When booting BeagleBone Black: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:4398 lockdep_hardirqs_on_prepare+0x23c/0x280 DEBUG_LOCKS_WARN_ON(early_boot_irqs_disabled) CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.15.0-rc1-boneblack-00004-g195298c3b116 #209 NONE Hardware name: Generic AM33XX (Flattened Device Tree) Call trace: _raw_spin_unlock_irq from irq_map_generic_chip+0x144/0x190 irq_map_generic_chip from irq_domain_associate_locked+0x68/0x164 irq_domain_associate_locked from irq_create_fwspec_mapping+0x34c/0x43c irq_create_fwspec_mapping from irq_create_of_mapping+0x64/0x8c irq_create_of_mapping from irq_of_parse_and_map+0x54/0x7c irq_of_parse_and_map from dmtimer_clkevt_init_common+0x54/0x15c dmtimer_clkevt_init_common from dmtimer_systimer_init+0x41c/0x5b8 dmtimer_systimer_init from timer_probe+0x68/0xf0 timer_probe from start_kernel+0x4a4/0x6bc start_kernel from 0x0 irq event stamp: 0 hardirqs last enabled at (0): [<00000000>] 0x0 hardirqs last disabled at (0): [<00000000>] 0x0 softirqs last enabled at (0): [<00000000>] 0x0 softirqs last disabled at (0): [<00000000>] 0x0 ---[ end trace 0000000000000000 ]--- and: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at init/main.c:1022 start_kernel+0x4e8/0x6bc Interrupts were enabled early CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.15.0-rc1-boneblack-00004-g195298c3b116 #209 NONE Tainted: [W]=WARN Hardware name: Generic AM33XX (Flattened Device Tree) Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x6c/0x90 dump_stack_lvl from __warn+0x70/0x1b0 __warn from warn_slowpath_fmt+0x1d4/0x1ec warn_slowpath_fmt from start_kernel+0x4e8/0x6bc start_kernel from 0x0 irq event stamp: 0 hardirqs last enabled at (0): [<00000000>] 0x0 hardirqs last disabled at (0): [<00000000>] 0x0 softirqs last enabled at (0): [<00000000>] 0x0 softirqs last disabled at (0): [<00000000>] 0x0 ---[ end trace 0000000000000000 ]--- Fix this by correcting two misconversions of raw_spin_{,un}lock_irq{save,restore}() to lock guards. Fixes: 195298c3b11628a6 ("genirq/generic-chip: Convert core code to lock guards") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/514f94c5891c61ac0a4a7fdad113e75db1eea367.1744135467.git.geert+renesas@glider.be commit 72801504fd09e86e389b5692d4d9d563a08914d7 Author: Alex Deucher Date: Tue Feb 18 13:23:55 2025 -0500 drm/amdgpu/sdma7: add support for disable_kq When the parameter is set, disable user submissions to kernel queues. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit fcf5eb979a5803ff5b5add820f70d98953b19ecd Author: Alex Deucher Date: Tue Feb 18 13:22:49 2025 -0500 drm/amdgpu/sdma6: add support for disable_kq When the parameter is set, disable user submissions to kernel queues. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 1d65006fc14e9ad13f53f604f5969090dedf7dbd Author: Alex Deucher Date: Tue Feb 18 13:09:55 2025 -0500 drm/amdgpu/sdma: add flag for tracking disable_kq For SDMA, we still need kernel queues for paging so they need to be initialized, but we no not want to accept submissions from userspace when disable_kq is set. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 0981e0ef1803bba2e7826ef86f0569e3b63e4df6 Author: Alex Deucher Date: Tue Feb 18 12:37:51 2025 -0500 drm/amdgpu/gfx12: add support for disable_kq Plumb in support for disabling kernel queues. v2: use ring counts per Felix' suggestion v3: fix stream fault handler, enable EOP interrupts v4: fix MEC interrupt offset (Sunil) v5: clean up after removing extra sched.ready settings Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 1e63ebc0d443c3181ec725826f0abb8b72e9a8c3 Author: Alex Deucher Date: Tue Feb 18 12:16:26 2025 -0500 drm/amdgpu/gfx11: add support for disable_kq Plumb in support for disabling kernel queues in GFX11. We have to bring up a GFX queue briefly in order to initialize the clear state. After that we can disable it. v2: use ring counts per Felix' suggestion v3: fix stream fault handler, enable EOP interrupts v4: fix MEC interrupt offset (Sunil) Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 1f61fc28b939ba604ea63dd345f3f3ee6c627998 Author: Alex Deucher Date: Wed Feb 26 12:51:30 2025 -0500 drm/amdgpu/mes: make more vmids available when disable_kq=1 If we don't have kernel queues, the vmids can be used by the MES for user queues. Acked-by: Prike Liang Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit acdc43f27024cf46172b0e811f649f64a95ad2d6 Author: Alex Deucher Date: Wed Feb 26 12:40:30 2025 -0500 drm/amdgpu/mes: update hqd masks when disable_kq is set Make all resources available to user queues. Reviewed-by: Prike Liang Suggested-by: Sunil Khatri Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit f091fa777b24c189523db1ea626434ad6ff29799 Author: Alex Deucher Date: Tue Feb 18 12:07:48 2025 -0500 drm/amdgpu/gfx: add generic handling for disable_kq Add proper checks for disable_kq functionality in gfx helper functions. Add special logic for families that require the clear state setup. v2: use ring count as per Felix suggestion v3: fix num_gfx_rings handling in amdgpu_gfx_graphics_queue_acquire() v4: fix error code (Alex) Reviewed-by: Prike Liang Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 4310acd4464bc6aed0d211d94b1d343ea3cb62f8 Author: Alex Deucher Date: Tue Feb 18 13:06:19 2025 -0500 drm/amdgpu: add ring flag for no user submissions This would be set by IPs which only accept submissions from the kernel, not userspace, such as when kernel queues are disabled. Don't expose the rings to userspace and reject any submissions in the CS IOCTL. v2: fix error code (Alex) Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit a96a787d6de7325f7a961bd74a7cad4d078748b7 Author: Alex Deucher Date: Tue Feb 18 10:33:53 2025 -0500 drm/amdgpu: add parameter to disable kernel queues On chips that support user queues, setting this option will disable kernel queues to be used to validate user queues without kernel queues. Reviewed-by: Prike Liang Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit cf97de5b540425d331394da3deafb2a869b394a6 Author: Alex Deucher Date: Thu Mar 20 12:49:30 2025 -0400 drm/amdgpu/userq: prevent runtime pm when userqs are active Similar to KFD, prevent runtime pm while user queues are active. Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher commit 4ce60dbada9639e385f2f4be2dacf10d8ba22378 Author: Alex Deucher Date: Thu Feb 20 15:56:24 2025 -0500 drm/amdgpu: store userq_managers in a list in adev So we can iterate across them when we need to manage all user queues. v2: add uq_mgr to adev list in amdgpu_userq_mgr_init Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher commit 100b6010d7540ed0479ccdb85816db42f4111979 Author: Alex Deucher Date: Mon Mar 24 16:29:03 2025 -0400 drm/amdgpu: bump version for user queue IP support query Add the user queue IP support query to the drm_amdgpu_info_device query. Cc: marek.olsak@amd.com Cc: prike.liang@amd.com Cc: sunil.khatri@amd.com Cc: yogesh.mohanmarimuthu@amd.com Reviewed-by: Marek Olšák Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 1af688126361bc881b134b9d25738e22dd457f30 Author: Alex Deucher Date: Mon Mar 24 16:26:00 2025 -0400 drm/amdgpu: add UAPI to query if user queues are supported Add an INFO query to check if user queues are supported. v2: switch to a mask of IPs (Marek) v3: move to drm_amdgpu_info_device (Marek) Cc: marek.olsak@amd.com Cc: prike.liang@amd.com Cc: sunil.khatri@amd.com Cc: yogesh.mohanmarimuthu@amd.com Reviewed-by: Marek Olšák Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit a4a3373da2255c3149fec8fc423653aac2e570a7 Author: Alex Deucher Date: Wed Mar 26 12:21:22 2025 -0400 drm/amdgpu/gfx12: split userq setup to a separate switch Add a separate switch statement for the userq callback assignment so that we can assign the callbacks for each asic as the firmware becomes available. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 9983ed969365329e22f3ea00838a6ad4afb65539 Author: Alex Deucher Date: Wed Mar 26 12:09:12 2025 -0400 drm/amdgpu/gfx11: clean up and consolidate sw_init With the ME details fixed, we can now consolidate this state. Also split out the userq setup into a separate switch statement so that we can set them per IP version when the firmwares are ready. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 32bd8b3ea7071ca96d4adcd0817046e09c5df415 Author: Arvind Yadav Date: Tue Mar 18 18:45:40 2025 +0530 drm/amdgpu: Fix display freezing issue when resizing apps The display is freezing because the amdgpu_userq_wait_ioctl() is waiting for a non-user queue fence(specifically, the PT update fence). RootCause: The resume_work is initiated by both amdgpu_userq_suspend and amdgpu_userqueue_ensure_ev_fence at same time. The amdgpu_userq_suspend signals a dma-fence and subsequently triggers the resume_work, which is intended to replace the existing fence by creating new dma-fence. However, following this, the amdgpu_userqueue_ensure_ev_fence schedules another resume_work that generates a new dma-fence, thereby replacing the one created by amdgpu_userq_suspend. Consequently, the original fence will never be signaled. Cc: Alex Deucher Cc: Christian König Cc: Shashank Sharma Cc: Sunil Khatri Reviewed-by: Christian König Reviewed-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit b6f190e6236af268e504d8ba62ab89b8ba5a1674 Author: Alex Deucher Date: Thu Mar 20 10:18:58 2025 -0400 drm/amdgpu/mes: warn on unexpected pipe numbers Warn if the number of pipes exceeds what the MES supports. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 9e2bbba1d516b52c2ebc9875144f544025f9d5ef Author: Alex Deucher Date: Wed Feb 26 12:31:46 2025 -0500 drm/amdgpu/mes: centralize gfx_hqd mask management Move it to amdgpu_mes to align with the compute and sdma hqd masks. No functional change. v2: rebase on new changes v3: misc optimizations Reviewed-by: Prike Liang Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 4220d2c7c41b8ea3fd154dc5678b05575653cba0 Author: Alex Deucher Date: Wed Mar 12 13:47:33 2025 -0400 drm/amdgpu: remove is_mes_queue flag This was leftover from MES bring up when we had MES user queues in the kernel. It's no longer used so remove it. Acked-by: Christian König Signed-off-by: Alex Deucher commit cb17fff3a254c3beb02101c68b64066797ec9028 Author: Alex Deucher Date: Wed Feb 26 15:39:02 2025 -0500 drm/amdgpu/mes: remove unused functions Leftover from the MES self tests that were removed previously. Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit 158bfbc72c5d7675039df540b120ccdd37bca5f0 Author: Alex Deucher Date: Wed Feb 26 16:31:57 2025 -0500 drm/amdgpu: validate user queue parameters Make sure these are set properly to ensure compatibility if we ever update the IOCTL interface. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit ad6c120f6888033b1eb198a7a15ed4c6355edf6d Author: Arvind Yadav Date: Tue Feb 18 18:56:25 2025 +0530 drm/amdgpu: fix the memleak caused by fence not released Encountering a taint issue during the unloading of gpu_sched due to the fence not being released/put. In this context, amdgpu_vm_clear_freed is responsible for creating a job to update the page table (PT). It allocates kmem_cache for drm_sched_fence and returns the finished fence associated with job->base.s_fence. In case of Usermode queue this finished fence is added to the timeline sync object through amdgpu_gem_update_bo_mapping, which is utilized by user space to ensure the completion of the PT update. [ 508.900587] ============================================================================= [ 508.900605] BUG drm_sched_fence (Tainted: G N): Objects remaining in drm_sched_fence on __kmem_cache_shutdown() [ 508.900617] ----------------------------------------------------------------------------- [ 508.900627] Slab 0xffffe0cc04548780 objects=32 used=2 fp=0xffff8ea81521f000 flags=0x17ffffc0000240(workingset|head|node=0|zone=2|lastcpupid=0x1fffff) [ 508.900645] CPU: 3 UID: 0 PID: 2337 Comm: rmmod Tainted: G N 6.12.0+ #1 [ 508.900651] Tainted: [N]=TEST [ 508.900653] Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS ELITE/X570 AORUS ELITE, BIOS F34 06/10/2021 [ 508.900656] Call Trace: [ 508.900659] [ 508.900665] dump_stack_lvl+0x70/0x90 [ 508.900674] dump_stack+0x14/0x20 [ 508.900678] slab_err+0xcb/0x110 [ 508.900687] ? srso_return_thunk+0x5/0x5f [ 508.900692] ? try_to_grab_pending+0xd3/0x1d0 [ 508.900697] ? srso_return_thunk+0x5/0x5f [ 508.900701] ? mutex_lock+0x17/0x50 [ 508.900708] __kmem_cache_shutdown+0x144/0x2d0 [ 508.900713] ? flush_rcu_work+0x50/0x60 [ 508.900719] kmem_cache_destroy+0x46/0x1f0 [ 508.900728] drm_sched_fence_slab_fini+0x19/0x970 [gpu_sched] [ 508.900736] __do_sys_delete_module.constprop.0+0x184/0x320 [ 508.900744] ? srso_return_thunk+0x5/0x5f [ 508.900747] ? debug_smp_processor_id+0x1b/0x30 [ 508.900754] __x64_sys_delete_module+0x16/0x20 [ 508.900758] x64_sys_call+0xdf/0x20d0 [ 508.900763] do_syscall_64+0x51/0x120 [ 508.900769] entry_SYSCALL_64_after_hwframe+0x76/0x7e v2: call dma_fence_put in amdgpu_gem_va_update_vm v3: Addressed review comments from Christian. - calling amdgpu_gem_update_timeline_node before switch. - puting a dma_fence in case of error or !timeline_syncobj. v4: Addressed review comments from Christian. Cc: Alex Deucher Cc: Christian König Cc: Shashank Sharma Cc: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Le Ma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit ecdb0b32e518a69a724d3cb7a6e5a4d2be2db8a1 Author: Alex Deucher Date: Fri Feb 28 14:55:57 2025 -0500 drm/amdgpu/userq: move the header to amdgpu directory To align with other headers. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 665de8c94792d095c9dbd0ef16b0532f546aa8f9 Author: Alex Deucher Date: Wed Feb 19 16:46:52 2025 -0500 drm/amdgpu/userq: remove BROKEN from config This can be enabled now. We have the firmware checks in place. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 5ca4095960a8a8b7f24f02af6e5ce7b284e04559 Author: Alex Deucher Date: Fri Feb 28 14:50:11 2025 -0500 drm/amdgpu: add userq firmware version checks Currently disabled until the firmwares are officially released. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit f36e4876c8e1ea61c48f6048bfcfd540c7abef2f Author: Alex Deucher Date: Fri Feb 28 14:45:37 2025 -0500 drm/amdgpu/gfx11: fix config guard s/CONFIG_DRM_AMD_USERQ_GFX/CONFIG_DRM_AMDGPU_NAVI3X_USERQ/ Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit c4f42c8d0b97c2f16a4fc90f77eb3c0315c4cf6b Author: Alex Deucher Date: Fri Feb 28 14:37:31 2025 -0500 drm/amdgpu/Kconfig: fix wording of DRM_AMDGPU_NAVI3X_USERQ The feature is not navi3x specific at this point. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit df85baa767ca39c0a28d56a5a02251844c122a09 Author: Alex Deucher Date: Fri Feb 28 14:14:35 2025 -0500 drm/amdgpu: return an error in the userq IOCTL when DRM_AMDGPU_NAVI3X_USERQ=n I'd swear this was already fixed, but I guess the patch never landed. Add it now. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 2a060b3ae92ec1951a8a94bf64580ccb4fedf38c Author: Alex Deucher Date: Thu Feb 20 09:44:39 2025 -0500 drm/amdgpu/userq: handle runtime pm Take a reference when we create a queue and drop it when we destroy the queue. We need to keep the device active while user queues are active. v2: squash in fix from Sunil v3: squash in fix from Prike Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 29adc5c2dd7a0e8dba9aac38a3116df38220dc4b Author: Alex Deucher Date: Thu Feb 20 16:08:02 2025 -0500 drm/amdgpu/userq: fix hardcoded uq functions Use the IP type to look up the userq functions rather than hardcoding it. Reviewed-by: Saleemkhan Jamadar Signed-off-by: Alex Deucher commit f15d4e92f7d35128d6416c473c2eab24188bd7e8 Author: Arvind Yadav Date: Mon Jan 27 18:22:01 2025 +0530 drm/amdgpu: Fix display freeze lockup error A deadlock situation has arised between the userq signal ioctl and the eviction fence. In this scenario, the function amdgpu_userq_signal_ioctl() has acquired a reservation lock on the read/write buffer object (BO) through drm_exec. Subsequently, it calls amdgpu_userqueue_ensure_ev_fence(), which is in a waiting for the userq resume work. Meanwhile, the userq suspend worker has initiated the userq resume work(amdgpu_userqueue_resume_worker). This userq resume work attempts to validate the vm->done BO, leading to amdgpu_userqueue_validate_bos also attempting to reservation lock the same write BO that is already locked by amdgpu_userq_signal_ioctl. As a result, the resume work becomes stalled, causing amdgpu_userqueue_ensure_ev_fence to remain in a waiting state. Call Trace: [ 242.836469] INFO: task gnome-shel:cs0:1288 blocked for more than 120 seconds. [ 242.836486] Tainted: G OE 6.12.0-rc2rebased-oct-24+ #4 [ 242.836491] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.836494] task:gnome-shel:cs0 state:D stack:0 pid:1288 tgid:1282 ppid:1180 flags:0x00000002 [ 242.836503] Call Trace: [ 242.836508] [ 242.836517] __schedule+0x3e0/0xb10 [ 242.836530] ? srso_return_thunk+0x5/0x5f [ 242.836541] schedule+0x31/0x120 [ 242.836546] schedule_timeout+0x150/0x160 [ 242.836551] ? srso_return_thunk+0x5/0x5f [ 242.836555] ? sysvec_call_function+0x69/0xd0 [ 242.836562] ? srso_return_thunk+0x5/0x5f [ 242.836567] ? preempt_count_add+0x7f/0xd0 [ 242.836577] __wait_for_common+0x91/0x180 [ 242.836582] ? __pfx_schedule_timeout+0x10/0x10 [ 242.836590] wait_for_completion+0x28/0x30 [ 242.836595] __flush_work+0x16c/0x290 [ 242.836602] ? __pfx_wq_barrier_func+0x10/0x10 [ 242.836611] flush_delayed_work+0x3a/0x60 [ 242.836621] amdgpu_userqueue_ensure_ev_fence+0x2d/0xb0 [amdgpu] [ 242.836966] amdgpu_userq_signal_ioctl+0x959/0xec0 [amdgpu] [ 242.837171] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ 242.837365] drm_ioctl_kernel+0xae/0x100 [drm] [ 242.837398] drm_ioctl+0x2a1/0x500 [drm] [ 242.837420] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ 242.837622] ? srso_return_thunk+0x5/0x5f [ 242.837627] ? srso_return_thunk+0x5/0x5f [ 242.837630] ? _raw_spin_unlock_irqrestore+0x2b/0x50 [ 242.837635] amdgpu_drm_ioctl+0x4f/0x90 [amdgpu] [ 242.837811] __x64_sys_ioctl+0x99/0xd0 [ 242.837820] x64_sys_call+0x1209/0x20d0 [ 242.837825] do_syscall_64+0x51/0x120 [ 242.837830] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 242.837835] RIP: 0033:0x7f2f33f1a94f [ 242.837838] RSP: 002b:00007f2f24ffea30 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 242.837842] RAX: ffffffffffffffda RBX: 00007f2f24ffebd0 RCX: 00007f2f33f1a94f [ 242.837845] RDX: 00007f2f24ffebd0 RSI: 00000000c0306457 RDI: 000000000000000d [ 242.837847] RBP: 00007f2f24ffeab0 R08: 0000000000000000 R09: 0000000000000000 [ 242.837849] R10: 00007f2f24ffecd0 R11: 0000000000000246 R12: 00007f2f25000640 [ 242.837851] R13: 00000000c0306457 R14: 000000000000000d R15: 00007fff3b39c1e0 [ 242.837858] [ 242.837865] INFO: task Xwayland:cs0:1517 blocked for more than 120 seconds. [ 242.837869] Tainted: G OE 6.12.0-rc2rebased-oct-24+ #4 [ 242.837872] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.837874] task:Xwayland:cs0 state:D stack:0 pid:1517 tgid:1338 ppid:1282 flags:0x00004002 [ 242.837878] Call Trace: [ 242.837880] [ 242.837883] __schedule+0x3e0/0xb10 [ 242.837890] schedule+0x31/0x120 [ 242.837894] schedule_preempt_disabled+0x1c/0x30 [ 242.837897] __mutex_lock.constprop.0+0x386/0x6e0 [ 242.837902] ? srso_return_thunk+0x5/0x5f [ 242.837905] ? __timer_delete_sync+0x81/0xe0 [ 242.837911] __mutex_lock_slowpath+0x13/0x20 [ 242.837915] mutex_lock+0x3b/0x50 [ 242.837919] amdgpu_userqueue_ensure_ev_fence+0x35/0xb0 [amdgpu] [ 242.838138] amdgpu_userq_signal_ioctl+0x959/0xec0 [amdgpu] [ 242.838340] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ 242.838531] drm_ioctl_kernel+0xae/0x100 [drm] [ 242.838559] drm_ioctl+0x2a1/0x500 [drm] [ 242.838580] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ 242.838778] ? srso_return_thunk+0x5/0x5f [ 242.838783] ? srso_return_thunk+0x5/0x5f [ 242.838786] ? _raw_spin_unlock_irqrestore+0x2b/0x50 [ 242.838791] amdgpu_drm_ioctl+0x4f/0x90 [amdgpu] [ 242.838967] __x64_sys_ioctl+0x99/0xd0 [ 242.838972] x64_sys_call+0x1209/0x20d0 [ 242.838975] do_syscall_64+0x51/0x120 [ 242.838979] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 242.838982] RIP: 0033:0x7f9118b1a94f [ 242.838985] RSP: 002b:00007f910cdff760 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 242.838989] RAX: ffffffffffffffda RBX: 00007f910cdff910 RCX: 00007f9118b1a94f [ 242.838991] RDX: 00007f910cdff910 RSI: 00000000c0306457 RDI: 000000000000000c [ 242.838993] RBP: 00007f910cdff7e0 R08: 0000000000000000 R09: 0000000000000001 [ 242.838995] R10: 00007f910cdff9d4 R11: 0000000000000246 R12: 00007f910ce00640 [ 242.838997] R13: 00000000c0306457 R14: 000000000000000c R15: 00007fff9dd11d10 [ 242.839004] v2: Addressed review comemnts from Christian. v3/v4: Addressed review comemnts from Christian. - Move drm_exec drm_exec loop after userq fence create. - cleanup the newly created userq fence in case of error. v5 - Addressed review comemnts from Christian. - Create a new amdgpu_userq_fence_alloc() function for allocation. - Calling dma_fence_put for cleanup procedure. - make amdgpu_userq_fence_create() function static. - drm_exec_init is called after mutex_unlock. Cc: Alex Deucher Cc: Christian König Cc: Shashank Sharma Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit fc4a85c6b2cc1b0f4e682180165a4e629711701f Author: Arunpravin Paneer Selvam Date: Mon Feb 10 22:17:28 2025 +0530 drm/amdgpu: Modify the seq64 VM cache policy The seq64 VM cache policy should be set to UC (Uncached) to match with userqueue fence address kernel mapped memory's cache settings. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 239a310b4942a81f5e87a442bf1bcb759494f0c1 Author: Arunpravin Paneer Selvam Date: Wed Jan 1 14:22:29 2025 +0530 drm/amdgpu: Fix out-of-bounds issue in user fence Fix out-of-bounds issue in userq fence create when accessing the userq xa structure. Added a lock to protect the race condition. v2:(Christian) - Allocate memory with GFP_ATOMIC. v3: - Moved to 2 xa approach. v4:(Christian) - Lock the xa_for_each blocks and memory allocation part as well to make sure that xa is not modified in between the 2 xa_for_each blocks. BUG: KASAN: slab-out-of-bounds in amdgpu_userq_fence_create+0x726/0x880 [amdgpu] [ +0.000006] Call Trace: [ +0.000005] [ +0.000005] dump_stack_lvl+0x6c/0x90 [ +0.000011] print_report+0xc4/0x5e0 [ +0.000009] ? srso_return_thunk+0x5/0x5f [ +0.000008] ? kasan_complete_mode_report_info+0x26/0x1d0 [ +0.000007] ? amdgpu_userq_fence_create+0x726/0x880 [amdgpu] [ +0.000405] kasan_report+0xdf/0x120 [ +0.000009] ? amdgpu_userq_fence_create+0x726/0x880 [amdgpu] [ +0.000405] __asan_report_store8_noabort+0x17/0x20 [ +0.000007] amdgpu_userq_fence_create+0x726/0x880 [amdgpu] [ +0.000406] ? __pfx_amdgpu_userq_fence_create+0x10/0x10 [amdgpu] [ +0.000408] ? srso_return_thunk+0x5/0x5f [ +0.000008] ? ttm_resource_move_to_lru_tail+0x235/0x4f0 [ttm] [ +0.000013] ? srso_return_thunk+0x5/0x5f [ +0.000008] amdgpu_userq_signal_ioctl+0xd29/0x1c70 [amdgpu] [ +0.000412] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ +0.000404] ? try_to_wake_up+0x165/0x1840 [ +0.000010] ? __pfx_futex_wake_mark+0x10/0x10 [ +0.000011] drm_ioctl_kernel+0x178/0x2f0 [drm] [ +0.000050] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ +0.000404] ? __pfx_drm_ioctl_kernel+0x10/0x10 [drm] [ +0.000043] ? __kasan_check_read+0x11/0x20 [ +0.000007] ? srso_return_thunk+0x5/0x5f [ +0.000007] ? __kasan_check_write+0x14/0x20 [ +0.000008] drm_ioctl+0x513/0xd20 [drm] [ +0.000040] ? __pfx_amdgpu_userq_signal_ioctl+0x10/0x10 [amdgpu] [ +0.000407] ? __pfx_drm_ioctl+0x10/0x10 [drm] [ +0.000044] ? srso_return_thunk+0x5/0x5f [ +0.000007] ? _raw_spin_lock_irqsave+0x99/0x100 [ +0.000007] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ +0.000006] ? __rseq_handle_notify_resume+0x188/0xc30 [ +0.000008] ? srso_return_thunk+0x5/0x5f [ +0.000008] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? _raw_spin_unlock_irqrestore+0x27/0x50 [ +0.000010] amdgpu_drm_ioctl+0xcd/0x1d0 [amdgpu] [ +0.000388] __x64_sys_ioctl+0x135/0x1b0 [ +0.000009] x64_sys_call+0x1205/0x20d0 [ +0.000007] do_syscall_64+0x4d/0x120 [ +0.000008] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000007] RIP: 0033:0x7f7c3d31a94f Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 49cd3353dbea6bb5c5a9c3201852fc363a2f34ad Author: Saleemkhan Jamadar Date: Mon Jan 6 12:50:50 2025 +0530 drm/amdgpu: add db size and offset range for VCN and VPE VCN and VPE have different offset range, update the doorbell offset range repsectively. Doorbell size for VCN and VPE is 32bit. v1 : add gfx switch case and fix checkpatch warnings (Shashank) Signed-off-by: Saleemkhan Jamadar Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 3e37fcb57bdf794804bec9538d20673a5bf4bdd8 Author: Saleemkhan Jamadar Date: Fri Jan 3 19:02:59 2025 +0530 drm/amdgpu: map doorbell for the requested userq Introduce db_info structure to the populate the doorbell information that is required to be mapped. Made changes to the doorbell mapping func more generic, by taking parameters that vary based on IPs and/or usecase into db_info structure. v2 - Fix space alignment and checkpatch warnings(Shashank) Signed-off-by: Saleemkhan Jamadar Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 8639d2f5ca27ca533e782cc8f8de62ea002f1833 Author: Christian König Date: Fri Dec 20 13:44:23 2024 +0100 drm/amdgpu: fix call to amdgpu_eviction_fence_detach That needs to be done after grabbing the lock, not before. Signed-off-by: Christian König Acked-by: Arvind Yadav Signed-off-by: Alex Deucher commit adba0929736a6a2d2780e8e6e4082e42e5ba025c Author: Arvind Yadav Date: Thu Dec 19 19:43:54 2024 +0530 drm/amdgpu: Fix Illegal opcode in command stream Error When applications closes, it triggers the drm_file_free function which subsequently releases all allocated buffer objects. Concurrently, the resume_worker thread will attempt to map the usermode queue. However, since the wptr buffer object has already been deallocated, this will result in an Illegal opcode error being raised in the command stream. Now replacing drm_release() with a new function amdgpu_drm_release(). This function will set the flag to prevent the scheduling of any new queue resume/map, stop all queues and then call drm_release(). V2: - Replace drm_release with amdgpu_drm_release(Christian). Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 02521454f0552e289e6d95a2b55c8395285b0e01 Author: Arunpravin Paneer Selvam Date: Thu Dec 12 19:36:16 2024 +0530 drm/amdgpu: Apply sign extension to seq64 Apply sign extension to seq64 va address. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 91acb5d47b7cc9fe17a7d0034e5f5ac996633bae Author: Christian König Date: Mon Dec 9 23:10:48 2024 +0530 drm/amdgpu: Modify the MES process va end limit Modify the MES process va end limit to max pfn. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ed5fdc1fc282dbe7bdf4968fb9dafb4366114160 Author: Arunpravin Paneer Selvam Date: Mon Dec 9 23:04:34 2024 +0530 drm/amdgpu: Fix the use-after-free issue in wait IOCTL The xarray pointer which has the userqueue xarray structure reference should be cleared when the userqueue gets destroyed. Otherwise, we may access the freed xa memory and see the below warnings. warning 1: BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x7a/0xe0 [ +0.000044] Call Trace: [ +0.000017] [ +0.000016] dump_stack_lvl+0x6c/0x90 [ +0.000025] print_report+0xc4/0x5e0 [ +0.000025] ? srso_return_thunk+0x5/0x5f [ +0.000024] ? kasan_complete_mode_report_info+0x60/0x1d0 [ +0.000030] ? _raw_spin_lock+0x7a/0xe0 [ +0.000023] kasan_report+0xdf/0x120 [ +0.000023] ? _raw_spin_lock+0x7a/0xe0 [ +0.000025] kasan_check_range+0xf7/0x1b0 [ +0.000025] __kasan_check_write+0x14/0x20 [ +0.000024] _raw_spin_lock+0x7a/0xe0 [ +0.000023] ? __pfx__raw_spin_lock+0x10/0x10 [ +0.000024] ? amdgpu_userq_wait_ioctl+0xac0/0x1f30 [amdgpu] [ +0.000442] amdgpu_userq_wait_ioctl+0x18fc/0x1f30 [amdgpu] [ +0.000428] ? __pfx_amdgpu_userq_wait_ioctl+0x10/0x10 [amdgpu] [ +0.000424] ? __pfx_idr_alloc_u32+0x10/0x10 [ +0.000027] ? srso_return_thunk+0x5/0x5f [ +0.000024] ? __kasan_check_write+0x14/0x20 [ +0.000025] ? srso_return_thunk+0x5/0x5f [ +0.000024] ? idr_alloc+0x72/0xc0 [ +0.000023] ? srso_return_thunk+0x5/0x5f [ +0.000023] ? fput+0x1c/0x2f0 [ +0.000025] drm_ioctl_kernel+0x178/0x2f0 [drm] [ +0.000065] ? __pfx_amdgpu_userq_wait_ioctl+0x10/0x10 [amdgpu] [ +0.000425] ? __pfx_drm_ioctl_kernel+0x10/0x10 [drm] [ +0.000064] ? srso_return_thunk+0x5/0x5f [ +0.000023] ? __kasan_check_write+0x14/0x20 [ +0.000025] drm_ioctl+0x513/0xd20 [drm] [ +0.000058] ? __pfx_amdgpu_userq_wait_ioctl+0x10/0x10 [amdgpu] [ +0.000428] ? __pfx_drm_ioctl+0x10/0x10 [drm] [ +0.000061] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ +0.000027] ? __count_memcg_events+0x11f/0x3a0 [ +0.000027] ? srso_return_thunk+0x5/0x5f [ +0.001040] ? srso_return_thunk+0x5/0x5f [ +0.000969] ? _raw_spin_unlock_irqrestore+0x27/0x50 [ +0.000966] amdgpu_drm_ioctl+0xcd/0x1d0 [amdgpu] [ +0.001352] __x64_sys_ioctl+0x135/0x1b0 [ +0.000966] x64_sys_call+0x1205/0x20d0 [ +0.000968] do_syscall_64+0x4d/0x120 [ +0.000960] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000962] RIP: 0033:0x7f42af11a94f warning 2: WARNING: at lib/xarray.c:1849 __xa_alloc+0x13a/0x150 [ 366.491409] RIP: 0010:__xa_alloc+0x13a/0x150 [ 366.491434] Call Trace: [ 366.491437] [ 366.491440] ? show_regs+0x6d/0x80 [ 366.491445] ? __warn+0x91/0x140 [ 366.491450] ? __xa_alloc+0x13a/0x150 [ 366.491453] ? report_bug+0x1c9/0x1e0 [ 366.491459] ? handle_bug+0x63/0xa0 [ 366.491463] ? exc_invalid_op+0x1d/0x80 [ 366.491467] ? asm_exc_invalid_op+0x1f/0x30 [ 366.491476] ? __xa_alloc+0x13a/0x150 [ 366.491484] amdgpu_userq_wait_ioctl+0xe0e/0xfe0 [amdgpu] [ 366.491743] ? idr_alloc_u32+0x97/0xd0 [ 366.491749] ? __pfx_amdgpu_userq_wait_ioctl+0x10/0x10 [amdgpu] [ 366.491912] drm_ioctl_kernel+0xae/0x100 [drm] [ 366.491942] drm_ioctl+0x2a1/0x500 [drm] [ 366.491961] ? __pfx_amdgpu_userq_wait_ioctl+0x10/0x10 [amdgpu] [ 366.492127] ? srso_return_thunk+0x5/0x5f [ 366.492132] ? srso_return_thunk+0x5/0x5f [ 366.492135] ? _raw_spin_unlock_irqrestore+0x2b/0x50 [ 366.492139] amdgpu_drm_ioctl+0x4f/0x90 [amdgpu] [ 366.492288] __x64_sys_ioctl+0x99/0xd0 [ 366.492295] x64_sys_call+0x1209/0x20d0 [ 366.492299] do_syscall_64+0x51/0x120 [ 366.492303] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 366.492418] RIP: 0033:0x7f86f3b1a94f Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit c9e20cb005fdb6a727dc1a85d7192a35eeb11987 Author: Arunpravin Paneer Selvam Date: Mon Dec 9 23:02:28 2024 +0530 drm/amdgpu: Fix NULL ptr dereference issue for non userq fences Add the correct fences count variable [num_fences] in the fences array iteration to handle the userq / non-userq fences. v2:(Christian) - All fences in the array either come from some reservation object or drm_syncobj. If any of those are NULL then there is a bug somewhere else. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9ed335d9398475675e26fcf92d7cf956e5b8a605 Author: Arunpravin Paneer Selvam Date: Mon Dec 9 19:20:56 2024 +0530 drm/amdgpu: Add mqd for userq compute queue Add mqd for userq compute queue for gfx11/gfx12 Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit 31f7efcdca4d1caaa3a0babc33377e27e6f9b593 Author: Shashank Sharma Date: Wed Nov 20 18:45:33 2024 +0100 drm/amdgpu: enable eviction fence This patch enables attachment and detachment of eviction fences. This is just a fork of eviction fence enabling code from the first patch of the series so that the CI testing can happen on fully fledged code. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit a242a3e4b5be22ffd85fb768d8c96df79b018136 Author: Shashank Sharma Date: Wed Dec 11 12:09:00 2024 +0100 drm/amdgpu: simplify eviction fence suspend/resume The basic idea in this redesign is to add an eviction fence only in UQ resume path. When userqueue is not present, keep ev_fence as NULL Main changes are: - do not create the eviction fence during evf_mgr_init, keeping evf_mgr->ev_fence=NULL until UQ get active. - do not replace the ev_fence in evf_resume path, but replace it only in uq_resume path, so remove all the unnecessary code from ev_fence_resume. - add a new helper function (amdgpu_userqueue_ensure_ev_fence) which will do the following: - flush any pending uq_resume work, so that it could create an eviction_fence - if there is no pending uq_resume_work, add a uq_resume work and wait for it to execute so that we always have a valid ev_fence - call this helper function from two places, to ensure we have a valid ev_fence: - when a new uq is created - when a new uq completion fence is created v2: Worked on review comments by Christian. v3: Addressed few more review comments by Christian. v4: Move mutex lock outside of the amdgpu_userqueue_suspend() function (Christian). v5: squash in build fix (Alex) Cc: Alex Deucher Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit dd5a376cd234c3fff79667598a1e06300cf75026 Author: Arunpravin Paneer Selvam Date: Tue Nov 26 15:51:08 2024 +0100 drm/amdgpu: enable userqueue secure sem for GFX 12 - Add a field in struct amdgpu_mqd_prop for userqueue secure sem fence address since now we have a generic file for mes_userqueue.c - Add secure sem fence address mqd support to gfx12 into their corresponding init functions. - Enable secure semaphore IRQ handling V2: Address review comment from Alex: Use fence_address instead of fenceaddress (Shashank) Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Arunpravin Paneer Selvam Signed-off-by: Somalapuram Amaranath Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 988c9e704670a39ef2fd23f3eeb2d3b9c813dab1 Author: Somalapuram Amaranath Date: Thu Oct 10 20:08:06 2024 +0200 drm/amdgpu: enable userqueue support for GFX12 This patch enables Usermode queue support across GFX, Compute and SDMA IPs on GFX12/SDMA7. It typically reuses Navi3X userqueue IP functions to create and destroy MQDs. v2: rebase on proposed changes (Alex) Cc: Alex Deucher Cc: Christian Koenig Cc: Arvind Yadav Reviewed-by: Alex Deucher Signed-off-by: Somalapuram Amaranath Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 79819d9a0ac38bf83ac712e00be2d53104895b84 Author: Alex Deucher Date: Tue Nov 26 15:45:19 2024 +0100 drm/amdgpu/uq: make MES UQ setup generic Now that all of the IP specific code has been moved into the IP specific functions, we can make this code generic. V2: Fixed build errors and porting logics (Shashank) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit b965c5d87108add7941528569d7acdfabcd86b55 Author: Alex Deucher Date: Mon Oct 21 15:16:12 2024 +0200 drm/amdgpu/uq: remove gfx11 specifics from UQ setup This can all be handled by in the IP specific mpd init code. V2: Removed setting of gds_va, which was removed during UAPI review (Shashank) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 21926b5db8c1d4e82b47bbd484b085a0e604bfd6 Author: Alex Deucher Date: Fri Oct 18 14:15:51 2024 -0400 drm/amdgpu/sdma7: update mqd init for UQ Set the addresses for the UQ metadata. V2: Fix lower offset mask (Shashank) V2: Use lower_32_bits for mqd objects(Alex) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit d07a7fcb8d25724351b7f9c03739b814da343b72 Author: Alex Deucher Date: Fri Oct 18 14:15:31 2024 -0400 drm/amdgpu/sdma6: update mqd init for UQ Set the addresses for the UQ metadata. V2: Fix lower address mask (Shashank) V3: Use lower_32_bits for MQD objects (Alex) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit ab328d9a7b614ba8c6f63096eae817dd6e7f72f1 Author: Alex Deucher Date: Fri Oct 18 14:15:12 2024 -0400 drm/amdgpu/gfx12: update mqd init for UQ Set the addresses for the UQ metadata. V2: Fix lower address mask (Shashank) V3: Use lower_32_bits() for MQD objects (Alex) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit f2234816a31d0ec85ab63899762ec962ab682704 Author: Amaranath Somalapuram Date: Wed Nov 27 17:06:45 2024 +0100 drm/amdgpu: fix IGT CI regression with eviction fence This patch fixes one of the regressions in eviction fence code with IGT tests. Reviewed-by: Shashank Sharma Signed-off-by: Amaranath Somalapuram Signed-off-by: Alex Deucher commit 7179439e34bbeef28e1b5083c365e7295b07f9bd Author: Alex Deucher Date: Fri Oct 18 14:14:34 2024 -0400 drm/amdgpu/gfx11: update mqd init for UQ Set the addresses for the UQ metadata. V2: Fix lower address (Shashank) V3: Restore lower_32_bits() for MQD addresses (Alex) Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 825f82cf936aea7f2d25d47efd27f90ba90e4ee2 Author: Alex Deucher Date: Fri Oct 18 13:58:23 2024 -0400 drm/amdgpu: add some additional members to amdgpu_mqd_prop These are needed to make userqueue infrastructure generic. Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit b8e6d3f68c3bd1ac54492e210ece87475e7f862b Author: Shashank Sharma Date: Wed Nov 20 18:04:33 2024 +0100 drm/amdgpu: handle eviction fence race The eviction process can get into a race condition between the eviction fence suspend work (which replaces the old fence with new) and kms_close (which destroys the fence and doesn't expect a new one). This patch: - adds a flag to indicate that fd is closing, so fence replacement is not required (evf_mgr->fd_closing) - adds a flush_work() during the ev_fence_destroy routine V2: Addressed review comments from Christian: - Do not use mutex to sync - Use flush_work and wait for suspend_work to be done V3: Fixed state machine for queue->active, which adds into race between suspend/resume and queue ops Cc: Alex Deucher Cc: Christian König Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 44cfdf368fb72c03e4137709803d58288a22cb06 Author: Shashank Sharma Date: Wed Nov 20 19:02:26 2024 +0100 drm/amdgpu: resume gfx userqueues This patch adds support for userqueue resume. What it typically does is this: - adds a new delayed work for resuming all the queues. - schedules this delayed work from the suspend work. - validates the BOs and replaces the eviction fence before resuming all the queues running under this instance of userq manager. V2: Addressed Christian's review comments: - declare local variables like ret at the bottom. - lock all the object first, then start attaching the new fence. - dont replace old eviction fence, just attach new eviction fence. - no error logs for drm_exec_lock failures - no need to reserve bos after drm_exec_locked - schedule the resume worker immediately (not after 100 ms) - check for NULL BO (Arvind) V5: Rebased wrt changes in suspend patch - moved amdgpu_userqueue_validate_vm_bo in this patch - initialized ret in resume_all V6: Rebase V7: Addressed review comments from Christian - Do not use list_for_each_safe() with vm->invalidated, its not correct way V8: Fixed the race condition between suspend/close/fence Cc: Alex Deucher Cc: Christian Koenig Acked-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit b0328087c179f47ea6558c3b91b4487c5e10deda Author: Shashank Sharma Date: Wed Nov 20 18:59:49 2024 +0100 drm/amdgpu: suspend gfx userqueues This patch adds suspend support for gfx userqueues. It typically does the following: - adds an enable_signaling function for the eviction fence, so that it can trigger the userqueue suspend, - adds a delayed work to handle suspending of the eviction_fence - adds a suspend function to handle suspending of userqueues which suspends all the queues under this userq manager and signals the eviction fence, - adds a function to replace the old eviction fence with a new one and attach it to each of the objects, - adds reference of userq manager in the eviction fence container so that it can be used in the suspend function. V2: Addressed Christian's review comments: - schedule suspend work immediately V4: Addressed Christian's review comments: - wait for pending uq fences before starting suspend, added queue->last_fence for the same - accommodate ev_fence_mgr into existing code - some bug fixes and NULL checks V5: Addressed Christian's review comments (gitlab) - Wait for eviction fence to get signaled in destroy, don't signal it - Wait for eviction fence to get signaled in replace fence, don't signal it V6: Addressed Christian's review comments - Do not destroy the old eviction fence until we have it replaced - Change the sequence of fence replacement sub-tasks - reusing the ev_fence delayed work for userqueue suspend as well (Shashank). V7: Addressed Christian's review comments - give evf_mgr as argument (instead of fpriv) to replace_fence() - save ptr to evf_mgr in ev_fence (instead of uq_mgr) - modify suspend_all_queues logic to reflect error properly - remove the garbage drm_exec_lock section in wait_for_signal - grab the userqueue mutex before starting the wait for fence - remove the unrelated gobj check from signal_ioctl V8: Added race condition fixes Cc: Alex Deucher Cc: Christian Koenig Acked-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 30e4d781385dda92fdee574b0a95094dfa143b52 Author: Shashank Sharma Date: Mon Jun 3 11:13:03 2024 +0200 drm/amdgpu: add userqueue suspend/resume functions This patch adds userqueue suspend/resume functions at core MES V11 IP level. V2: use true/false for queue_active status (Christian) added Christian's R-B V3: reset/set queue status in mqd.create and mqd.destroy Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit fb796c308767606bbd6c2e1bf4fa9446ec68ce51 Author: Shashank Sharma Date: Tue Aug 27 15:44:43 2024 +0530 drm/amdgpu: add gfx eviction fence helpers This patch adds basic eviction fence framework for the gfx buffers. The idea is to: - One eviction fence is created per gfx process, at kms_open. - This fence is attached to all the gem buffers created by this process. - This fence is detached to all the gem buffers at postclose_kms. This framework will be further used for usermode queues. V2: Addressed review comments from Christian - keep fence_ctx and fence_seq directly in fpriv - evcition_fence should be dynamically allocated - do not save eviction fence instance in BO, there could be many such fences attached to one BO - use dma_resv_replace_fence() in detach V3: Addressed review comments from Christian - eviction fence create and destroy functions should be called only once from fpriv create/destroy - use dma_fence_put() in eviction_fence_destroy V4: Addressed review comments from Christian: - create a separate ev_fence_mgr structure - cleanup fence init part - do not add a domain for fence owner KGD V5: Addressed review comments from Christian: - drop the dma_fence_is_signaled check - use a local variable to access evf_mgr->ev_fence under the spin_lock() multiple places - remove the vm->is_compute_ctx check to attach gfx eviction fence, in gem_object_open V6: Addressed review comments from Christian: - drop the return value from eviction_fence_signal - reserve_fence should be the first thing inside the attach_eviction_fence function, also keep the resv_add_fence inside the lock - remove the unwanted ev_fence check inside detach function - fix wrong variable check in eviction_fence_init function - return the error value of eviction_fence_init to the caller, dont keep it void. - fail gem_object_open if attaching of eviction_fence fails - detach the eviction fence only when amdgpu_vm_is_bo_always_valid is not true. V7: Addressed review comments from Christian: - Do not add a uq_mgr ptr in ev_fence, rather add evf_mgr V8: Move eviction fence enabling into separate patch for CI Cc: Christian Koenig Cc: Alex Deucher Reviewed-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit a640126fbda25275775ab50ab735d6144d43fe3b Author: Sunil Khatri Date: Wed Nov 13 13:40:33 2024 +0530 drm/amdgpu: add the argument description for gpu_addr Add argument description for the input argument gpu_addr for amdgpu_seq64_alloc. Fixes the warning raised by the compiler: drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c:168: warning: Function parameter or struct member 'gpu_addr' not described in 'amdgpu_seq64_alloc Cc: Arunpravin Paneer Selvam Signed-off-by: Sunil Khatri Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher commit 90c448fef3120d79bd8031665213981c966dbaf4 Author: Shashank Sharma Date: Wed Oct 30 15:39:42 2024 +0100 drm/amdgpu: add new AMDGPU_INFO subquery for userq objects This patch adds a new subquery (AMDGPU_INFO_UQ_FW_AREAS) in AMDGPU_INFO_IOCTL to get the size and alignment of shadow and csa objects from the FW setup. This information is required for the userqueue consumers. V2: Added Alex's suggestions and addressed review comments: - make this query IP specific (GFX/SDMA etc) - give a better title (AMDGPU_INFO_UQ_METADATA) - restructured the code as per sample code shared by Alex V3: Split the UAPI patch from shadow_size_fn modifications V4: Addressed review comments from UAPI review (Marek/Pierre-Eric) - Change the query name to AMDGPU_INFO_UQ_FW_AREAS - remove unused inpur parameter for AMDGPU_HW_IP* UAPI link: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/400/ Cc: Alex Deucher Cc: Christian Koenig Cc: Arvind Yadav Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit aed7caf2d4fc659cacfd4358ae4893e2a50480f1 Author: Shashank Sharma Date: Thu Oct 24 17:07:42 2024 +0200 drm/amdgpu: add get_gfx_shadow_info callback for gfx12 This callback gets the size and alignment requirements for the gfx shadow buffer for preemption. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 2761bb9a31f1b863037547d73dc6aac1461ceab6 Author: Arunpravin Paneer Selvam Date: Mon Nov 11 12:43:07 2024 +0530 drm/amdgpu: Modify userq signal/wait struct field names Modify kernel UAPI userq signal/wait struct field names and description corresponding to the libdrm UAPI review comments. libdrm MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392 Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d9e697f19bda777a7934e3bbdc67889b06d58019 Author: Shashank Sharma Date: Wed Oct 30 15:32:27 2024 +0100 drm/amdgpu: bypass SRIOV check for shadow size info Currently, the shadow FW space size and alignment information is protected under a flag (adev->gfx.cp_gfx_shadow) which gets set only in case of SRIOV setups. if (amdgpu_sriov_vf(adev)) adev->gfx.cp_gfx_shadow = true; But we need this information for GFX Userqueues, so that user can create these objects while creating userqueue. This patch series creates a method to get this information bypassing the dependency on this check. This patch: - adds a new input parameter flag to the gfx.funcs->get_gfx_shadow_info fptr definition, so that it can accommodate the information without the check (adev->gfx.cp_gfx_shadow) on request. - updates the existing definition of amdgpu_gfx_get_gfx_shadow_info to adjust with this new flag. Next patch in the series is adding a UAPI which will consume this info. V2: split this patch from the new UAPI patch Cc: Alex Deucher Cc: Christian Koenig Cc: Arvind Yadav Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 2e06b175fff5ba1415b74fed441c0d066b8c8dab Author: Shashank Sharma Date: Mon Nov 11 12:34:30 2024 +0100 drm/amdgpu: fix userqueue UAPI comments This patch fixes some of the pending UAPI review comments from the libDRM/UAPI review process. - It updates some outdated comments in the userqueue UAPI header highlighted during the libdrm UAPI review. - It removes the GDS BO support which was found unused. - It also removes the unused flags parameter from the UAPI. - It also adds a padding variables in userqueue in/out structures. (Pierre-Eric and Marek) - clarify comments on top of drm_amdgpu_userq_in - clarify comment for queue_id (in) - clarify comment for mqd - clarify comment for compute MQD size - clarify comment for queue_id (out) - remove GDB object from BO object list - remove the unused flags parameter Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 5f2f78314c5c3e4d87d638eea5a9592e89947e9e Author: Shashank Sharma Date: Tue Nov 28 19:52:30 2023 +0530 Revert "drm/amdgpu: don't allow userspace to create a doorbell BO" This reverts commit 6be2ad4f0073c541146caa66c5ae936c955a8224. This patch was to block userspace to use doorbell manager UAPI until usermode queue UAPI gets approved. UQ UAPI got approved in the following MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392 Cc: Christian Koenig Cc: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 38c67ec9aa4be7bc0ae55e7bebe95f615fa09a1e Author: Arvind Yadav Date: Wed Sep 25 18:10:41 2024 +0200 drm/amdgpu: Add input fence to sync bo map/unmap This patch adds input fences to VM_IOCTL for buffer object. The kernel will map/unmap the BO only when the fence is signaled. The UAPI for the same has been approved here: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392 V2: Bug fix (Arvind) V3: Bug fix (Arvind) V4: Rename UAPI objects as per UAPI review (Marek) V5: Addressed review comemnts from Christian - function should return error. - Add 'TODO' comment - The input fence should be independent of the operation. V6: Addressed review comemnts from Christian - Release the memory allocated by memdup_user(). V7: Addressed review comemnts from Christian - Drop the debug print and add "return r;" for the error handling. V11: Rebase v12: Fix 32-bit holes issue in sturct drm_amdgpu_gem_va. v13: Fix deadlock issue. v14: Fix merge conflict. v15: Fix review comment by renaming syncobj handles. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 189ee986b0142c8176aa09c47e66b611ca29d731 Author: Arunpravin Paneer Selvam Date: Wed Oct 30 11:26:37 2024 +0530 drm/amdgpu: add userq specific kernel config for fence ioctls Keep the user queue fence signal and wait IOCTLs in the kernel config CONFIG_DRM_AMDGPU_NAVI3X_USERQ. v2(Christian): - Remove the userq specific config added for kernel queues fence init function. v3(Alex): - It will be better to return an error(-ENOTSUPP) in these cases. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit f7cb6a28e172bd470803d64697f7a9c708609da2 Author: Arunpravin Paneer Selvam Date: Wed Oct 30 11:19:26 2024 +0530 drm/amdgpu: Add gpu_addr support to seq64 allocation Add gpu address support to seq64 alloc function. v1:(Christian) - Add the user of this new interface change to the same patch. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cb4a73f46f253b5f7a30b1e0488c8ef2832e8747 Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:59:04 2024 +0530 drm/amdgpu: Add separate array of read and write for BO handles Drop AMDGPU_USERQ_BO_WRITE as this should not be a global option of the IOCTL, It should be option per buffer. Hence adding separate array for read and write BO handles. v2(Marek): - Internal kernel details shouldn't be here. This file should only document the observed behavior, not the implementation . v3: - Fix DAL CI clang issue. v4: - Added Alex RB to merge the kernel UAPI changes since he has already approved the amdgpu_drm.h changes. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Alex Deucher Acked-by: Christian König Suggested-by: Marek Olšák Suggested-by: Christian König Signed-off-by: Alex Deucher commit d8675102ba322a4ccd0dd8bc5adf799246314ddf Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:56:57 2024 +0530 drm/amdgpu: add vm root BO lock before accessing the vm Add a vm root BO lock before accessing the userqueue VM. v1:(Christian) - Keep the VM locked until you are done with the mapping. - Grab a temporary BO reference, drop the VM lock and acquire the BO. When you are done with everything just drop the BO lock and then the temporary BO reference. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fbea3d3174f4215ca1c867a1c035c1fa5ad01015 Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:55:22 2024 +0530 drm/amdgpu: Add the missing error handling for xa_store() call Add the missing error handling for xa_store() call in the function amdgpu_userq_fence_driver_alloc(). Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e7cf21fbb2773cfcf70189be524041b21e6509dc Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:51:58 2024 +0530 drm/amdgpu: Few optimization and fixes for userq fence driver Few optimization and fixes for userq fence driver. v1:(Christian): - Remove unnecessary comments. - In drm_exec_init call give num_bo_handles as last parameter it would making allocation of the array more efficient - Handle return value of __xa_store() and improve the error handling of amdgpu_userq_fence_driver_alloc(). v2:(Christian): - Revert userq_xa xarray init to XA_FLAGS_LOCK_IRQ. - move the xa_unlock before the error check of the call xa_err(__xa_store()) and moved this change to a separate patch as this is adding a missing error handling. - Removed the unnecessary comments. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ac4a1f7f13309f8235a0c4719c34094de3303dfd Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:46:49 2024 +0530 drm/amdgpu: Remove the MES self test Remove MES self test as this conflicts the userqueue fence interrupts. v2:(Christian) - remove the amdgpu_mes_self_test() function and any now unused code. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit 70773bef4e091ff6d2a91e3dfb4f29013eb81f1f Author: Arvind Yadav Date: Wed Sep 25 18:09:49 2024 +0200 drm/amdgpu: update userqueue BOs and PDs This patch updates the VM_IOCTL to allow userspace to synchronize the mapping/unmapping of a BO in the page table. The major changes are: - it adds a drm_timeline object as an input parameter to the VM IOCTL. - this object is used by the kernel to sync the update of the BO in the page table during the mapping of the object. - the kernel also synchronizes the tlb flush of the page table entry of this object during the unmapping (Added in this series: https://patchwork.freedesktop.org/series/131276/ and https://patchwork.freedesktop.org/patch/584182/) - the userspace can wait on this timeline, and then the BO is ready to be consumed by the GPU. The UAPI for the same has been approved here: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392 V2: - remove the eviction fence coupling V3: - added the drm timeline support instead of input/output fence (Christian) V4: - made timeline 64-bit (Christian) - bug fix (Arvind) V5: GLCTS bug fix (Arvind) V6: Rename syncobj_handle -> timeline_syncobj_out Rename point -> timeline_point_in (Marek) V7: Addressed review comments from Christian: - do not send last_update fence in case of vm_clear_freed, instead return the fence from gen_va_update_vm - move the functions to update bo_mapping to amdgpu_gem.c - do not use amdgpu_userq_update_vm anymore in userq_create() V8: Addressed review comments from Christian: - Split amdgpu_gem_update_bo_mapping function. - amdgpu_gem_va_update_vm should return stub for error. V9: Addressed review comments from Christian: - Rename the function amdgpu_gem_update_timeline_node. - amdgpu_gem_update_timeline_node should be void function. - when timeline_point is zero don't allocate a chain and call drm_syncobj_replace_fence() instead of drm_syncobj_add_point(). V11: rebase V12: Fix 32-bit holes issue in sturct drm_amdgpu_gem_va. V13: Fix the review comment by renaming timeline syncobj (Marek) Cc: Alex Deucher Cc: Felix Kuehling Cc: Christian König Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 8949843762631d9d0fc526dfb61a272dca29fc6f Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:38:46 2024 +0530 drm/amdgpu: Enable userq fence interrupt support Add support to handle the userqueue protected fence signal hardware interrupt. Create a xarray which maps the doorbell index to the fence driver address. This would help to retrieve the fence driver information when an userq fence interrupt is triggered. Firmware sends the doorbell offset value and this info is compared with the queue's mqd doorbell offset value. If they are same, we process the userq fence interrupt. v1:(Christian): - use xa_load to extract the fence driver. - move the amdgpu_userq_fence_driver_process call within the xa_lock as there is a chance that fence_drv might be freed. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Signed-off-by: Alex Deucher commit 15e30a6e479282fef4365bd586159911c8cf140d Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:33:28 2024 +0530 drm/amdgpu: Add wait IOCTL timeline syncobj support Add user fence wait IOCTL timeline syncobj support. v2:(Christian) - handle dma_fence_wait() return value. - shorten the variable name syncobj_timeline_points a bit. - move num_points up to avoid padding issues. v3:(Christian) - Handle timeline drm_syncobj_find_fence() call error handling - Use dma_fence_unwrap_for_each() in timeline fence as there could be more than one fence. v4:(Christian) - Drop the first num_fences since fence is always included in the dma_fence_unwrap_for_each() iteration, when fence != f then fence is most likely just a container. v5: Added Alex RB to merge the kernel UAPI changes since he has already approved the amdgpu_drm.h changes. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a292fdecd72834b3bec380baa5db1e69e7f70679 Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:26:07 2024 +0530 drm/amdgpu: Implement userqueue signal/wait IOCTL This patch introduces new IOCTL for userqueue secure semaphore. The signal IOCTL called from userspace application creates a drm syncobj and array of bo GEM handles and passed in as parameter to the driver to install the fence into it. The wait IOCTL gets an array of drm syncobjs, finds the fences attached to the drm syncobjs and obtain the array of memory_address/fence_value combintion which are returned to userspace. v2: (Christian) - Install fence into GEM BO object. - Lock all BO's using the dma resv subsystem - Reorder the sequence in signal IOCTL function. - Get write pointer from the shadow wptr - use userq_fence to fetch the va/value in wait IOCTL. v3: (Christian) - Use drm_exec helper for the proper BO drm reserve and avoid BO lock/unlock issues. - fence/fence driver reference count logic for signal/wait IOCTLs. v4: (Christian) - Fixed the drm_exec calling sequence - use dma_resv_for_each_fence_unlock if BO's are not locked - Modified the fence_info array storing logic. v5: (Christian) - Keep fence_drv until wait queue execution. - Add dma_fence_wait for other fences. - Lock BO's using drm_exec as the number of fences in them could change. - Install signaled fences as well into BO/Syncobj. - Move Syncobj fence installation code after the drm_exec_prepare_array. - Directly add dma_resv_usage_rw(args->bo_flags.... - remove unnecessary dma_fence_put. v6: (Christian) - Add xarray stuff to store the fence_drv - Implement a function to iterate over the xarray and drop the fence_drv references. - Add drm_exec_until_all_locked() wrapper - Add a check that if we haven't exceeded the user allocated num_fences before adding dma_fence to the fences array. v7: (Christian) - Use memdup_user() for kmalloc_array + copy_from_user - Move the fence_drv references from the xarray into the newly created fence and drop the fence_drv references when we signal this fence. - Move this locking of BOs before the "if (!wait_info->num_fences)", this way you need this code block only once. - Merge the error handling code and the cleanup + return 0 code. - Initializing the xa should probably be done in the userq code. - Remove the userq back pointer stored in fence_drv. - Pass xarray as parameter in amdgpu_userq_walk_and_drop_fence_drv() v8: (Christian) - Move fence_drv references must come before adding the fence to the list. - Use xa_lock_irqsave_nested for nested spinlock operations. - userq_mgr should be per fpriv and not one per device. - Restructure the interrupt process code for the early exit of the loop. - The reference acquired in the syncobj fence replace code needs to be kept around. - Modify the dma_fence acquire placement in wait IOCTL. - Move USERQ_BO_WRITE flag to UAPI header file. - drop the fence drv reference after telling the hw to stop accessing it. - Add multi sync object support to userq signal IOCTL. V9: (Christian) - Store all the fence_drv ref to other drivers and not ourself. - Remove the userq fence xa implementation and replace with kvmalloc_array. v10: (Christian) - Add a comment for the userq_xa xarray - drop the if check of userq_fence->fence_drv_array - use the i variable to initialize userq_fence->fence_drv_array_count - drop the fence reference before you free the array in the error handling, otherwise it could be that some references leaked. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6b0c7c367317a663a58f72f79e73ad787aac873d Author: Arunpravin Paneer Selvam Date: Wed Oct 30 10:09:50 2024 +0530 drm/amdgpu: UAPI headers for userqueue Secure semaphore Add UAPI header support for userqueue Secure semaphore v2: Worked on review comments from Christian for the following modifications - Add bo handles, bo flags and padding fields. - Include value/va in a combined array. v3: Worked on review comments from Christian - Add num_fences field to obtain the number of objects required to allocate memory for userq_fence_info. - Replace obj_handle name with syncobj_handle. - Replace point name with syncobj_point. - Replace count_handles name with num_syncobj_handles. - Fix structure padding related issues. v4: Worked on review comments from Christian - Modify the bo flags description. Signed-off-by: Alex Deucher Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2e65ea1ab2f6f3731aba373917d509216701cbe6 Author: Arunpravin Paneer Selvam Date: Fri Oct 25 16:15:02 2024 +0530 drm/amdgpu: screen freeze and userq driver crash Screen freeze and userq fence driver crash while playing Xonotic v2: (Christian) - There is change that fence might signal in between testing and grabbing the lock. Hence we can move the lock above the if..else check and use the dma_fence_is_signaled_locked(). Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8493312a94f0cc29be09c200d3a934873ea33b29 Author: Arunpravin Paneer Selvam Date: Fri Oct 25 15:44:02 2024 +0530 drm/amdgpu: Add mqd support for the fence address - Add a field in struct v11_gfx_mqd for userqueue fence address. - Assign fence gpu VA address to the userqueue mqd fence address fields. v2: Remove the mask and replace with lower_32_bits (Christian) Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 97ff1946253971376665ad6d90f8fb23b1288025 Author: Arunpravin Paneer Selvam Date: Fri Oct 25 15:41:53 2024 +0530 drm/amdgpu: Implement a new userqueue fence driver Developed a userqueue fence driver for the userqueue process shared BO synchronization. Create a dma fence having write pointer as the seqno and allocate a seq64 memory for each user queue process and feed this memory address into the firmware/hardware, thus the firmware writes the read pointer into the given address when the process completes it execution. Compare wptr and rptr, if rptr >= wptr, signal the fences for the waiting process to consume the buffers. v2: Worked on review comments from Christian for the following modifications - Add wptr as sequence number into the fence - Add a reference count for the fence driver - Add dma_fence_put below the list_del as it might frees the userq fence. - Trim unnecessary code in interrupt handler. - Check dma fence signaled state in dma fence creation function for a potential problem of hardware completing the job processing beforehand. - Add necessary locks. - Create a list and process all the unsignaled fences. - clean up fences in destroy function. - implement .signaled callback function v3: Worked on review comments from Christian - Modify naming convention for reference counted objects - Fix fence driver reference drop issue - Drop amdgpu_userq_fence_driver_process() function return value v4: Worked on review comments from Christian - Moved fence driver allocation into amdgpu_userq_fence_driver_alloc() - Added detail doc mentioning the differences b/w two spinlocks declared. v5: Worked on review comments from Christian - Check before upcast and remove local variable - Add error handling in fence_drv alloc function. - Move rptr read fn outside of the loop and remove WARN_ON in destroy function. v6: - clear the seq64 memory in user fence driver(Christian) - fix for the wptr va bo mapping(Christian) - move the fence_drv xa entry erase code from the interrupt handler into user fence destroy function Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Suggested-by: Christian König Signed-off-by: Alex Deucher commit f540f69256a3a05973e87bcdd25881a9fe731b61 Author: Shashank Sharma Date: Tue Aug 27 14:55:35 2024 +0530 drm/amdgpu: add kernel config for gfx-userqueue This patch: - adds a kernel config option "CONFIG_DRM_AMDGPU_NAVI3X_USERQ" - moves the usequeue initialization code for all IPs under this flag - cover the core userqueue functions under this config - adds stub function for userqueue ioctl. so that the userqueue works only when the config is enabled. V9: Introduce this patch V10: Call it CONFIG_DRM_AMDGPU_NAVI3X_USERQ instead of CONFIG_DRM_AMDGPU_USERQ_GFX (Christian) V11: Add GFX in the config help description message. V12: Add depends on BROKEN for this config, remove this when the rest of the code is available. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 9d3afcb7b9f950b9b7c58ceeeb9e71f3476e69ed Author: Arvind Yadav Date: Tue Aug 27 15:29:49 2024 +0530 drm/amdgpu: fix MES GFX mask Current MES GFX mask prevents FW to enable oversubscription. This patch does the following: - Fixes the mask values and adds a description for the same - Removes the central mask setup and makes it IP specific, as it would be different when the number of pipes and queues are different. v2: squash in fix from Shashank Cc: Christian König Cc: Alex Deucher Acked-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 2c695d7c072067cd53fb52e52aa0b48277120314 Author: Shashank Sharma Date: Thu May 9 14:31:15 2024 +0200 drm/amdgpu: enable compute/gfx usermode queue This patch does the necessary changes required to enable compute workload support using the existing usermode queues infrastructure. V9: Patch introduced V10: Add custom IP specific mqd strcuture for compute (Alex) V11: Rename drm_amdgpu_userq_mqd_compute_gfx_v11 to drm_amdgpu_userq_mqd_compute_gfx11 (Marek) Cc: Alex Deucher Cc: Christian Koenig Acked-by: Christian König Signed-off-by: Arvind Yadav Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 543b6145377458b5ec0d1440606c31db62867bf4 Author: Arvind Yadav Date: Tue Aug 27 14:52:07 2024 +0530 drm/amdgpu: enable SDMA usermode queues This patch does necessary modifications to enable the SDMA usermode queues using the existing userqueue infrastructure. V9: introduced this patch in the series V10: use header file instead of extern (Alex) V11: rename drm_amdgpu_userq_mqd_sdma_gfx_v11 to drm_amdgpu_userq_mqd_sdma_gfx11 (Marek) Cc: Christian König Cc: Alex Deucher Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher commit a1d201e16940775f0e2f0230960d69e40879ec6d Author: Shashank Sharma Date: Thu May 2 12:37:30 2024 +0200 drm/amdgpu: enable GFX-V11 userqueue support This patch enables GFX-v11 IP support in the usermode queue base code. It typically: - adds a GFX_v11 specific MQD structure - sets IP functions to create and destroy MQDs - sets MQD objects coming from userspace V10: introduced this spearate patch for GFX V11 enabling (Alex). V11: Addressed review comments: - update the comments in GFX mqd structure informing user about using the INFO IOCTL for object sizes (Alex) - rename struct drm_amdgpu_userq_mqd_gfx_v11 to drm_amdgpu_userq_mqd_gfx11 (Marek) Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit d84607e3f7064e85a37cf38710215496ad48e7e8 Author: Shashank Sharma Date: Tue Oct 10 12:17:50 2023 +0200 drm/amdgpu: cleanup leftover queues This patch adds code to cleanup any leftover userqueues which a user might have missed to destroy due to a crash or any other programming error. V7: Added Alex's R-B V8: Rebase V9: Rebase V10: Rebase V11: Rebase Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Suggested-by: Bas Nieuwenhuizen Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit f09c1e6077abd1bc2ddd2b97e1135215801ca7f9 Author: Shashank Sharma Date: Thu May 9 14:17:13 2024 +0200 drm/amdgpu: generate doorbell index for userqueue The userspace sends us the doorbell object and the relative doobell index in the object to be used for the usermode queue, but the FW expects the absolute doorbell index on the PCI BAR in the MQD. This patch adds a function to convert this relative doorbell index to absolute doorbell index. V5: Fix the db object reference leak (Christian) V6: Pin the doorbell bo in userqueue_create() function, and unpin it in userqueue destoy (Christian) V7: Added missing kfree for queue in error cases Added Alex's R-B V8: Rebase V9: Changed the function names from gfx_v11* to mes_v11* V10: Rebase V11: Rebase Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 5fb2f7fc21a3668e5794cc0d153641b9719713e1 Author: Shashank Sharma Date: Mon Apr 22 19:21:20 2024 +0200 drm/amdgpu: map wptr BO into GART To support oversubscription, MES FW expects WPTR BOs to be mapped into GART, before they are submitted to usermode queues. This patch adds a function for the same. V4: fix the wptr value before mapping lookup (Bas, Christian). V5: Addressed review comments from Christian: - Either pin object or allocate from GART, but not both. - All the handling must be done with the VM locks held. V7: Addressed review comments from Christian: - Do not take vm->eviction_lock - Use amdgpu_bo_gpu_offset to get the wptr_bo GPU offset V8: Rebase V9: Changed the function names from gfx_v11* to mes_v11* V10: Remove unused adev (Harish) Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 6c42559f70c57590681563ebf325bd3cfd6cd13c Author: Shashank Sharma Date: Thu May 2 12:13:37 2024 +0200 drm/amdgpu: map usermode queue into MES This patch adds new functions to map/unmap a usermode queue into the FW, using the MES ring. As soon as this mapping is done, the queue would be considered ready to accept the workload. V1: Addressed review comments from Alex on the RFC patch series - Map/Unmap should be IP specific. V2: Addressed review comments from Christian: - Fix the wptr_mc_addr calculation (moved into another patch) Addressed review comments from Alex: - Do not add fptrs for map/unmap V3: Integration with doorbell manager V4: Rebase V5: Use gfx_v11_0 for function names (Alex) V6: Removed queue->proc/gang/fw_ctx_address variables and doing the address calculations locally to keep the queue structure GEN independent (Alex) V7: Added R-B from Alex V8: Rebase V9: Rebase V10: Rebase Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit defb41e8ef3a7d0421009de58d74da54ca25da76 Author: Shashank Sharma Date: Thu May 2 13:46:06 2024 +0200 drm/amdgpu: create context space for usermode queue The MES FW expects us to allocate at least one page as context space to process gang and process related context data. This patch creates a joint object for the same, and calculates GPU space offsets of these spaces. V1: Addressed review comments on RFC patch: Alex: Make this function IP specific V2: Addressed review comments from Christian - Allocate only one object for total FW space, and calculate offsets for each of these objects. V3: Integration with doorbell manager V4: Review comments: - Remove shadow from FW space list from cover letter (Alex) - Alignment of macro (Luben) V5: Merged patches 5 and 6 into this single patch Addressed review comments: - Use lower_32_bits instead of mask (Christian) - gfx_v11_0 instead of gfx_v11 in function names (Alex) - Shadow and GDS objects are now coming from userspace (Christian, Alex) V6: - Add a comment to replace amdgpu_bo_create_kernel() with amdgpu_bo_create() during fw_ctx object creation (Christian). - Move proc_ctx_gpu_addr, gang_ctx_gpu_addr and fw_ctx_gpu_addr out of generic queue structure and make it gen11 specific (Alex). V7: - Using helper function to create/destroy userqueue objects. - Removed FW object space allocation. V8: - Updating FW object address from user values. V9: - uppdated function name from gfx_v11_* to mes_v11_* V10: - making this patch independent of IP based changes, moving any GFX object related changes in GFX specific patch (Alex) Cc: Alex Deucher Cc: Christian Koenig Acked-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit fbf136b932358da1c65eb6fedd064a33a7a96aaa Author: Shashank Sharma Date: Mon Aug 26 23:12:21 2024 +0530 drm/amdgpu: create MES-V11 usermode queue for GFX A Memory queue descriptor (MQD) of a userqueue defines it in the hw's context. As MQD format can vary between different graphics IPs, we need gfx GEN specific handlers to create MQDs. This patch: - Adds a new file which will be used for MES based userqueue functions targeting GFX and SDMA IP. - Introduces MQD handler functions for the usermode queues. V1: Worked on review comments from Alex: - Make MQD functions GEN and IP specific V2: Worked on review comments from Alex: - Reuse the existing adev->mqd[ip] for MQD creation - Formatting and arrangement of code V3: - Integration with doorbell manager V4: Review comments addressed: - Do not create a new file for userq, reuse gfx_v11_0.c (Alex) - Align name of structure members (Luben) - Don't break up the Cc tag list and the Sob tag list in commit message (Luben) V5: - No need to reserve the bo for MQD (Christian). - Some more changes to support IP specific MQD creation. V6: - Add a comment reminding us to replace the amdgpu_bo_create_kernel() calls while creating MQD object to amdgpu_bo_create() once eviction fences are ready (Christian). V7: - Re-arrange userqueue functions in adev instead of uq_mgr (Alex) - Use memdup_user instead of copy_from_user (Christian) V9: - Moved userqueue code from gfx_v11_0.c to new file mes_v11_0.c so that it can be reused for SDMA userqueues as well (Shashank, Alex) V10: Addressed review comments from Alex - Making this patch independent of IP engine(GFX/SDMA/Compute) and specific to MES V11 only, using the generic MQD structure. - Splitting a spearate patch to enabling GFX support from here. - Verify mqd va address to be non-NULL. - Add a separate header file. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 0385800c2ff7bddf16a9caad5840f4e4823253f2 Author: Shashank Sharma Date: Tue Oct 10 12:17:44 2023 +0200 drm/amdgpu: add helpers to create userqueue object This patch introduces amdgpu_userqueue_object and its helper functions to creates and destroy this object. The helper functions creates/destroys a base amdgpu_bo, kmap/unmap it and save the respective GPU and CPU addresses in the encapsulating userqueue object. These helpers will be used to create/destroy userqueue MQD, WPTR and FW areas. V7: - Forked out this new patch from V11-gfx-userqueue patch to prevent that patch from growing very big. - Using amdgpu_bo_create instead of amdgpu_bo_create_kernel in prep for eviction fences (Christian) V9: - Rebase V10: - Added Alex's R-B Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 5501117d24a38dadff3dbd8d3102559b27929668 Author: Shashank Sharma Date: Tue Oct 10 12:17:43 2023 +0200 drm/amdgpu: add new IOCTL for usermode queue This patch adds: - A new IOCTL function to create and destroy - A new structure to keep all the user queue data in one place. - A function to generate unique index for the queue. V1: Worked on review comments from RFC patch series: - Alex: Keep a list of queues, instead of single queue per process. - Christian: Use the queue manager instead of global ptrs, Don't keep the queue structure in amdgpu_ctx V2: Worked on review comments: - Christian: - Formatting of text - There is no need for queuing of userqueues, with idr in place - Alex: - Remove use_doorbell, its unnecessary - Reuse amdgpu_mqd_props for saving mqd fields - Code formatting and re-arrangement V3: - Integration with doorbell manager V4: - Accommodate MQD union related changes in UAPI (Alex) - Do not set the queue size twice (Bas) V5: - Remove wrapper functions for queue indexing (Christian) - Do not save the queue id/idr in queue itself (Christian) - Move the idr allocation in the IP independent generic space (Christian) V6: - Check the validity of input IP type (Christian) V7: - Move uq_func from uq_mgr to adev (Alex) - Add missing free(queue) for error cases (Yifan) V9: - Rebase V10: Addressed review comments from Christian, and added R-B: - Do not initialize the local variable - Convert DRM_ERROR to DEBUG. V11: - check the input flags to be zero (Alex) Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian Koenig Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit bf33cb6551a8c5b9d68d2983678e1a05c89428c5 Author: Shashank Sharma Date: Mon Aug 26 23:04:13 2024 +0530 drm/amdgpu: add usermode queue base code This patch adds IP independent skeleton code for amdgpu usermode queue. It contains: - A new files with init functions of usermode queues. - A queue context manager in driver private data. V1: Worked on design review comments from RFC patch series: (https://patchwork.freedesktop.org/series/112214/) - Alex: Keep a list of queues, instead of single queue per process. - Christian: Use the queue manager instead of global ptrs, Don't keep the queue structure in amdgpu_ctx V2: - Reformatted code, split the big patch into two V3: - Integration with doorbell manager V4: - Align the structure member names to the largest member's column (Luben) - Added SPDX license (Luben) V5: - Do not add amdgpu.h in amdgpu_userqueue.h (Christian). - Move struct amdgpu_userq_mgr into amdgpu_userqueue.h (Christian). V6: Rebase V9: Rebase V10: Rebase + Alex's R-B Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 7eb61c2dffa635e4fb05f89736d8fcf39bb24d42 Author: Alex Deucher Date: Tue Oct 10 12:17:41 2023 +0200 drm/amdgpu: UAPI for user queue management This patch intorduces new UAPI/IOCTL for usermode graphics queue. The userspace app will fill this structure and request the graphics driver to add a graphics work queue for it. The output of this UAPI is a queue id. This UAPI maps the queue into GPU, so the graphics app can start submitting work to the queue as soon as the call returns. V2: Addressed review comments from Alex and Christian - Make the doorbell offset's comment clearer - Change the output parameter name to queue_id V3: Integration with doorbell manager V4: - Updated the UAPI doc (Pierre-Eric) - Created a Union for engine specific MQDs (Alex) - Added Christian's R-B V5: - Add variables for GDS and CSA in MQD structure (Alex) - Make MQD data a ptr-size pair instead of union (Alex) V9: - renamed struct drm_amdgpu_userq_mqd_gfx_v11 to struct drm_amdgpu_userq_mqd as its being used for SDMA and compute queues as well V10: - keeping the drm_amdgpu_userq_mqd IP independent, moving the _gfx_v11 objects in a separate structure in other patch. (Alex) Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian König Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 9cfb23021023f2e6c12fabe92bb666277843279f Author: Alexandre Demers Date: Mon Apr 7 01:52:30 2025 -0400 drm/amdgpu: still cleanup sid.h The defines, shifts and masks are already available in dce_6_0_d.h, dce_6_0_sh_mask.h. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit b255b6488338abee61b1264469f679e7eb96292a Author: Alexandre Demers Date: Fri Apr 4 01:42:25 2025 -0400 drm/amdgpu: fill in gmc_v6_0_set_clockgating_state() Pretty much was already there, just not ported to amdgpu. Tested-by: Alexandre Demers Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit a149f0bd0b71fba3af09ccbc027b4f6e977dfe2e Author: Alexandre Demers Date: Fri Apr 4 01:42:24 2025 -0400 drm/amd/display/dc: reclassify DCE6 resources and hw sequencer Classify DCE6 resource and sequencer as they are for other DCE versions Put dce60_resource.c and .h under amd/display/dc/resource/dce60 Put and rename dce60_hw_sequencer.c and .h under amd/display/dc/hwss/dce60 v2: fix build when CONFIG_DRM_AMD_DC_SI=n (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 6ffc6e056febb9ebb0d6a8fe0379ac9d8f4ec4a6 Author: Lijo Lazar Date: Tue Apr 8 08:55:33 2025 +0530 drm/amdgpu: Reset RAS table if header is invalid If a valid header is not found during RAS eeprom init, consider it as new and reset RAS table info. Signed-off-by: Lijo Lazar Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b695dd3bb8e806916ba64a62fae918c60004cc4d Author: Tao Zhou Date: Thu Apr 3 11:39:49 2025 +0800 drm/amdgpu: add loop bits for NPS2 page retirement Support NPS2 RAS. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bb00bf17328d80f519df93bebc41f6c9171547d6 Author: Kenneth Feng Date: Tue Apr 1 15:56:41 2025 +0800 drm/amd/amdgpu: decouple ASPM with pcie dpm ASPM doesn't need to be disabled if pcie dpm is disabled. So ASPM can be independantly enabled. Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 940e772635ac4f8431e82f09ba4023cf31ce249e Author: Ruili Ji Date: Mon Mar 24 01:15:25 2025 -0400 amd/amdgpu: Init vcn hardware per instance for vcn 4.0.3 Add interface for hardware init by vcn instance. v2: fix code format Reviewed-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Ruili Ji Signed-off-by: Alex Deucher commit 3394069e7de984ea3a4c2c68bf69b65f1c0aa658 Author: Victor Skvortsov Date: Wed Apr 2 17:35:56 2025 -0400 drm/amdgpu: Disable ACA on VFs VFs query RAS error counts directly from host with AMDGPU_RAS_VIRT_ERROR_COUNT_QUERY. When ACA is enabled, an unusable aca_sysfs is created rather than amdgpu_ras_sysfs_create() Likewise, VFs depend on host support to query CPERs, rather than ACA component. Signed-off-by: Victor Skvortsov Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 9040e657dc1c243b89e089a2fd83a84e041d9706 Author: Alex Deucher Date: Wed Mar 26 13:50:10 2025 -0400 Documenation: fix typo in debugfs.rst In reference to memory carved out for APUs, s/cave out/carve out/ Reviewed-by: shaoyun.liu Signed-off-by: Alex Deucher commit d526b4efb748d439af68be7d1a8922716a0eb52c Author: Alex Deucher Date: Wed Mar 26 13:49:00 2025 -0400 Documentation: update KIQ documentation KIQ is replaced with MES on GFX 11 and newer. Reviewed-by: shaoyun.liu Signed-off-by: Alex Deucher commit 9101b84f8c1971401b05a9172a44082bc7a158d9 Author: Alexandre Demers Date: Fri Apr 4 01:22:22 2025 -0400 drm/amdgpu: use "irq" in place of "interrupt" in DCE6/8 as in DCE10/11 "interrupt" becomes "irq" in: dce_vX_0_set_hpd_interrupt_state() dce_vX_0_set_crtc_interrupt_state() dce_vX_0_set_pageflip_interrupt_state() It is easier when going through the code to just change the DCE number in the functions' name to find and compare them across DCE versions. Also, it standardizes function mapping inside a given structure where .set and .process are both set to functions with a "_irq" suffix. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 160e6f5108f4b629c4614dfd37bb6c16ef522bb4 Author: Alexandre Demers Date: Fri Apr 4 01:22:21 2025 -0400 drm/amdgpu: fix typos in DCEs In DCE6, DCE8, DCE10, DCE11, "hdp" is replaced by "hpd" and replace "type" by "hpd" for a uniform parameter naming usage across DCEs. In link_factory.c, there is a missing "p" to "types" Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 9e7b08d239c2f21e8f417854f81e5ff40edbebff Author: Alex Deucher Date: Thu Mar 27 17:46:59 2025 -0400 drm/amdgpu/mes12: optimize MES pipe FW version fetching Don't fetch it again if we already have it. It seems the registers don't reliably have the value at resume in some cases. Fixes: 785f0f9fe742 ("drm/amdgpu: Add mes v12_0 ip block support (v4)") Reviewed-by: Shaoyun.liu Signed-off-by: Alex Deucher commit da7dc714a8f8e1c9fc33c57cd63583779a3bef71 Author: Denis Arefev Date: Thu Mar 20 12:35:02 2025 +0300 drm/amd/pm/smu11: Prevent division by zero The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1e866f1fe528 ("drm/amd/pm: Prevent divide by zero") Signed-off-by: Denis Arefev Signed-off-by: Alex Deucher commit 13b5a9e4ca16fd45d395cbfcb78a0551fe17e56e Author: Colin Ian King Date: Wed Mar 19 10:51:53 2025 +0000 power: supply: rk817: remove redundant null check on node The pointer null is being null checked immediately after it has been assigned at the start of the function and not changed afterwards. The subsequent null check on node is redudant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20250319105153.775155-1-colin.i.king@gmail.com Signed-off-by: Sebastian Reichel commit 795dbde92fe5c6996a02a5b579481de73035e7bf Author: Janusz Krzysztofik Date: Wed Apr 2 19:20:57 2025 +0200 drm/i915/huc: Fix fence not released on early probe errors HuC delayed loading fence, introduced with commit 27536e03271da ("drm/i915/huc: track delayed HuC load with a fence"), is registered with object tracker early on driver probe but unregistered only from driver remove, which is not called on early probe errors. Since its memory is allocated under devres, then released anyway, it may happen to be allocated again to the fence and reused on future driver probes, resulting in kernel warnings that taint the kernel: <4> [309.731371] ------------[ cut here ]------------ <3> [309.731373] ODEBUG: init destroyed (active state 0) object: ffff88813d7dd2e0 object type: i915_sw_fence hint: sw_fence_dummy_notify+0x0/0x20 [i915] <4> [309.731575] WARNING: CPU: 2 PID: 3161 at lib/debugobjects.c:612 debug_print_object+0x93/0xf0 ... <4> [309.731693] CPU: 2 UID: 0 PID: 3161 Comm: i915_module_loa Tainted: G U 6.14.0-CI_DRM_16362-gf0fd77956987+ #1 ... <4> [309.731700] RIP: 0010:debug_print_object+0x93/0xf0 ... <4> [309.731728] Call Trace: <4> [309.731730] ... <4> [309.731949] __debug_object_init+0x17b/0x1c0 <4> [309.731957] debug_object_init+0x34/0x50 <4> [309.732126] __i915_sw_fence_init+0x34/0x60 [i915] <4> [309.732256] intel_huc_init_early+0x4b/0x1d0 [i915] <4> [309.732468] intel_uc_init_early+0x61/0x680 [i915] <4> [309.732667] intel_gt_common_init_early+0x105/0x130 [i915] <4> [309.732804] intel_root_gt_init_early+0x63/0x80 [i915] <4> [309.732938] i915_driver_probe+0x1fa/0xeb0 [i915] <4> [309.733075] i915_pci_probe+0xe6/0x220 [i915] <4> [309.733198] local_pci_probe+0x44/0xb0 <4> [309.733203] pci_device_probe+0xf4/0x270 <4> [309.733209] really_probe+0xee/0x3c0 <4> [309.733215] __driver_probe_device+0x8c/0x180 <4> [309.733219] driver_probe_device+0x24/0xd0 <4> [309.733223] __driver_attach+0x10f/0x220 <4> [309.733230] bus_for_each_dev+0x7d/0xe0 <4> [309.733236] driver_attach+0x1e/0x30 <4> [309.733239] bus_add_driver+0x151/0x290 <4> [309.733244] driver_register+0x5e/0x130 <4> [309.733247] __pci_register_driver+0x7d/0x90 <4> [309.733251] i915_pci_register_driver+0x23/0x30 [i915] <4> [309.733413] i915_init+0x34/0x120 [i915] <4> [309.733655] do_one_initcall+0x62/0x3f0 <4> [309.733667] do_init_module+0x97/0x2a0 <4> [309.733671] load_module+0x25ff/0x2890 <4> [309.733688] init_module_from_file+0x97/0xe0 <4> [309.733701] idempotent_init_module+0x118/0x330 <4> [309.733711] __x64_sys_finit_module+0x77/0x100 <4> [309.733715] x64_sys_call+0x1f37/0x2650 <4> [309.733719] do_syscall_64+0x91/0x180 <4> [309.733763] entry_SYSCALL_64_after_hwframe+0x76/0x7e <4> [309.733792] ... <4> [309.733806] ---[ end trace 0000000000000000 ]--- That scenario is most easily reproducible with igt@i915_module_load@reload-with-fault-injection. Fix the issue by moving the cleanup step to driver release path. Fixes: 27536e03271da ("drm/i915/huc: track delayed HuC load with a fence") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13592 Cc: Daniele Ceraolo Spurio Cc: Alan Previn Signed-off-by: Janusz Krzysztofik Reviewed-by: Daniele Ceraolo Spurio Reviewed-by: Krzysztof Karas Signed-off-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20250402172057.209924-2-janusz.krzysztofik@linux.intel.com commit 906ad451675155380c1dc1881a244ebde8e8df0a Author: Alex Deucher Date: Sun Apr 6 17:27:24 2025 -0400 drm/amdgpu: cancel gfx idle work in device suspend for s0ix This is normally handled in the gfx IP suspend callbacks, but for S0ix, those are skipped because we don't want to touch gfx. So handle it in device suspend. Fixes: b9467983b774 ("drm/amdgpu: add dynamic workload profile switching for gfx10") Fixes: 963537ca2325 ("drm/amdgpu: add dynamic workload profile switching for gfx11") Fixes: 5f95a1549555 ("drm/amdgpu: add dynamic workload profile switching for gfx12") Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit b23f81c442ac33af0c808b4bb26333b881669bb7 Author: Kenneth Feng Date: Fri Mar 28 10:34:57 2025 +0800 drm/amd/display: pause the workload setting in dm Pause the workload setting in dm when doing idle optimization Reviewed-by: Alex Deucher Signed-off-by: Kenneth Feng Signed-off-by: Alex Deucher commit 92e511d1cecc6a8fa7bdfc8657f16ece9ab4d456 Author: Alex Deucher Date: Wed Mar 26 10:54:56 2025 -0400 drm/amdgpu/pm/swsmu: implement pause workload profile Add the callback for implementation for swsmu. Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 6dafb5d4c7cdfc8f994e789d050e29e0d5ca6efd Author: Alex Deucher Date: Wed Mar 26 10:26:25 2025 -0400 drm/amdgpu/pm: add workload profile pause helper To be used for display idle optimizations when we want to pause non-default profiles. Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 0e2ebfe2761d3b21b4d534721b13952cb1317902 Author: Alex Deucher Date: Thu Mar 20 11:58:42 2025 -0400 drm/amdgpu/gfx12: dump full CP packet header FIFOs In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit eb15a5d1aef59d1ec3aafe9d9f13953deb9977b6 Author: Alex Deucher Date: Thu Mar 20 11:48:26 2025 -0400 drm/amdgpu/gfx11: dump full CP packet header FIFOs In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 867cf768cbe3072ff51b4848064311e03bd79604 Author: Alex Deucher Date: Thu Mar 20 11:30:15 2025 -0400 drm/amdgpu/gfx10: dump full CP packet header FIFOs In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 0f681b0ecd190fb4516bb34cec227296b10533d1 Author: Kuniyuki Iwashima Date: Mon Apr 7 09:47:59 2025 -0700 net: ena: Support persistent per-NAPI config. Let's pass the queue index to netif_napi_add_config() to preserve per-NAPI config. Test: Set 100 to defer-hard-irqs (default is 0) and check the value after link down & up. $ cat /sys/class/net/enp39s0/napi_defer_hard_irqs 0 $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 65, 'ifindex': 2, 'irq': 29, 'irq-suspend-timeout': 0}] $ sudo ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --do napi-set --json='{"id": 65, "defer-hard-irqs": 100}' $ sudo ip link set enp39s0 down && sudo ip link set enp39s0 up Without patch: $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'defer-hard-irqs': 0, <------------------- Reset to 0 'gro-flush-timeout': 0, 'id': 66, <------------------------------- New ID 'ifindex': 2, 'irq': 29, 'irq-suspend-timeout': 0}] With patch: $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'defer-hard-irqs': 100, <--------------+-- Preserved 'gro-flush-timeout': 0, | 'id': 65, <----------------------------' 'ifindex': 2, 'irq': 29, 'irq-suspend-timeout': 0}] Signed-off-by: Kuniyuki Iwashima Reviewed-by: Joe Damato Reviewed-by: Arthur Kiyanovski Link: https://patch.msgid.link/20250407164802.25184-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 05b8f502f495bdba5daf55be956def48dddaf3a1 Merge: 34a07c5b257453 0a7de4a8f898c4 Author: Jakub Kicinski Date: Tue Apr 8 12:30:56 2025 -0700 Merge branch 'rps-misc-changes' Eric Dumazet says: ==================== rps: misc changes Minor changes in rps: skb_flow_limit() is probably unused these days, and data-races are quite theoretical. ==================== Link: https://patch.msgid.link/20250407163602.170356-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0a7de4a8f898c480ffafe024c4a0a8b8819597f1 Author: Eric Dumazet Date: Mon Apr 7 16:36:02 2025 +0000 net: rps: remove kfree_rcu_mightsleep() use Add an rcu_head to sd_flow_limit and rps_sock_flow_table structs to use the more conventional and predictable k[v]free_rcu(). Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250407163602.170356-5-edumazet@google.com Signed-off-by: Jakub Kicinski commit 22d046a778e4344437fd49bb0995e315ec3fddcf Author: Eric Dumazet Date: Mon Apr 7 16:36:01 2025 +0000 net: add data-race annotations in softnet_seq_show() softnet_seq_show() reads several fields that might be updated concurrently. Add READ_ONCE() and WRITE_ONCE() annotations. Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250407163602.170356-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit 7b6f0a852da34379a304d7020d70049ba5d1f0f3 Author: Eric Dumazet Date: Mon Apr 7 16:36:00 2025 +0000 net: rps: annotate data-races around (struct sd_flow_limit)->count softnet_seq_show() can read fl->count while another cpu updates this field from skb_flow_limit(). Make this field an 'unsigned int', as its only consumer only deals with 32 bit. Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250407163602.170356-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit c3025e94daa9ce84ef0e53df983b5bf2fbd76ea6 Author: Eric Dumazet Date: Mon Apr 7 16:35:59 2025 +0000 net: rps: change skb_flow_limit() hash function As explained in commit f3483c8e1da6 ("net: rfs: hash function change"), masking low order bits of skb_get_hash(skb) has low entropy. A NIC with 32 RX queues uses the 5 low order bits of rss key to select a queue. This means all packets landing to a given queue share the same 5 low order bits. Switch to hash_32() to reduce hash collisions. Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250407163602.170356-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit a30692b4f81ba864cf880d57e9cc6cf6278a2943 Author: Peter Griffin Date: Wed Apr 2 16:17:33 2025 +0100 pinctrl: samsung: Add filter selection support for alive bank on gs101 Newer Exynos based SoCs have a filter selection bitfield in the filter configuration registers on alive bank pins. This allows the selection of a digital or analog delay filter for each pin. Add support for selecting and enabling the filter. On suspend we set the analog filter to all pins in the bank (as the digital filter relies on a clock). On resume the digital filter is reapplied to all pins in the bank. The digital filter is working via a clock and has an adjustable filter delay flt_width bitfield, whereas the analog filter uses a fixed delay. The filter determines to what extent signal fluctuations received through the pad are considered glitches. The code path can be exercised using echo mem > /sys/power/state And then wake the device using a eint gpio Reviewed-by: André Draszik Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250402-pinctrl-fltcon-suspend-v6-4-78ce0d4eb30c@linaro.org Signed-off-by: Krzysztof Kozlowski commit bdbe0a0f71003b997d6a2dbe4bc7b5b0438207c7 Author: Peter Griffin Date: Wed Apr 2 16:17:32 2025 +0100 pinctrl: samsung: add gs101 specific eint suspend/resume callbacks gs101 differs to other SoCs in that fltcon1 register doesn't always exist. Additionally the offset of fltcon0 is not fixed and needs to use the newly added eint_fltcon_offset variable. Fixes: 4a8be01a1a7a ("pinctrl: samsung: Add gs101 SoC pinctrl configuration") Cc: stable@vger.kernel.org # depends on the previous three patches Reviewed-by: André Draszik Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250402-pinctrl-fltcon-suspend-v6-3-78ce0d4eb30c@linaro.org Signed-off-by: Krzysztof Kozlowski commit 77ac6b742eba063a5b6600cda67834a7a212281a Author: Peter Griffin Date: Wed Apr 2 16:17:31 2025 +0100 pinctrl: samsung: add dedicated SoC eint suspend/resume callbacks Refactor the existing platform specific suspend/resume callback so that each SoC variant has it's own callback containing the SoC specific logic. This allows exynosautov920 to have a dedicated function for using eint_con_offset and eint_mask_offset. Also it is easily extendable for gs101 which will need dedicated logic for handling the varying register offset of fltcon0 via eint_fltcon_offset. Reviewed-by: André Draszik Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250402-pinctrl-fltcon-suspend-v6-2-78ce0d4eb30c@linaro.org Signed-off-by: Krzysztof Kozlowski commit 3ade961e97f3b05dcdd9a4fabfe179c9e75571e0 Author: Peter Griffin Date: Wed Apr 2 16:17:30 2025 +0100 pinctrl: samsung: refactor drvdata suspend & resume callbacks This enables the clk_enable() and clk_disable() logic to be removed from each callback, but otherwise should have no functional impact. It is a prepatory patch so that the callbacks can become SoC specific. Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250402-pinctrl-fltcon-suspend-v6-1-78ce0d4eb30c@linaro.org Signed-off-by: Krzysztof Kozlowski commit 294f5ff47405f920d85b8d411ddbc52ed708a423 Merge: 01d541baedd745 bc08b15b54b8aa Author: Tejun Heo Date: Tue Apr 8 08:56:57 2025 -1000 sched_ext: Merge branch 'for-6.15-fixes' into for-6.16 Pull for-6.15-fixes to receive: e776b26e3701 ("sched_ext: Remove cpu.weight / cpu.idle unimplemented warnings") which conflicts with: 1a7ff7216c8b ("sched_ext: Drop "ops" from scx_ops_enable_state and friends") The former removes code updated by the latter. Resolved by removing the updated section. Signed-off-by: Tejun Heo commit f50ad4b73e1bdf7fb40566650fa11bcb438ad5ce Author: Joel Fernandes Date: Thu Feb 13 11:47:27 2025 -0500 srcu: Use rcu_seq_done_exact() for polling API poll_state_synchronize_srcu() uses rcu_seq_done() unlike poll_state_synchronize_rcu() which uses rcu_seq_done_exact(). The rcu_seq_done_exact() makes more sense for polling API, as with this API, there is a higher chance that there is a significant delay between the get_state..() and poll_state..() calls since a cookie can be stored and reused at a later time. During such a delay, if the gp_seq counter progresses more than ULONG_MAX/2 distance, then poll_state..() may return false for a long time unwantedly. Fix by using the more accurate rcu_seq_done_exact() API which is exactly what straight RCU's polling does. It may make sense, as future work, to add debug code here as well, where we compare a physical timestamp between get_state..() and poll_state() calls and yell if significant time has past but the grace period has still not progressed. Reviewed-by: Neeraj Upadhyay Reviewed-by: Paul E. McKenney Reviewed-by: Kent Overstreet Cc: Kent Overstreet Signed-off-by: Joel Fernandes commit 6432e163ba1b7d80b5876792ce53e511f041ab91 Author: Phil Auld Date: Tue Feb 18 18:46:18 2025 +0000 sched/isolation: Make use of more than one housekeeping cpu The exising code uses housekeeping_any_cpu() to select a cpu for a given housekeeping task. However, this often ends up calling cpumask_any_and() which is defined as cpumask_first_and() which has the effect of alyways using the first cpu among those available. The same applies when multiple NUMA nodes are involved. In that case the first cpu in the local node is chosen which does provide a bit of spreading but with multiple HK cpus per node the same issues arise. We have numerous cases where a single HK cpu just cannot keep up and the remote_tick warning fires. It also can lead to the other things (orchastration sw, HA keepalives etc) on the HK cpus getting starved which leads to other issues. In these cases we recommend increasing the number of HK cpus. But... that only helps the userspace tasks somewhat. It does not help the actual housekeeping part. Spread the HK work out by having housekeeping_any_cpu() and sched_numa_find_closest() use cpumask_any_and_distribute() instead of cpumask_any_and(). Signed-off-by: Phil Auld Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Waiman Long Reviewed-by: Vishal Chourasia Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20250218184618.1331715-1-pauld@redhat.com commit 690e47d1403e90b7f2366f03b52ed3304194c793 Author: Harshit Agarwal Date: Tue Feb 25 18:05:53 2025 +0000 sched/rt: Fix race in push_rt_task Overview ======== When a CPU chooses to call push_rt_task and picks a task to push to another CPU's runqueue then it will call find_lock_lowest_rq method which would take a double lock on both CPUs' runqueues. If one of the locks aren't readily available, it may lead to dropping the current runqueue lock and reacquiring both the locks at once. During this window it is possible that the task is already migrated and is running on some other CPU. These cases are already handled. However, if the task is migrated and has already been executed and another CPU is now trying to wake it up (ttwu) such that it is queued again on the runqeue (on_rq is 1) and also if the task was run by the same CPU, then the current checks will pass even though the task was migrated out and is no longer in the pushable tasks list. Crashes ======= This bug resulted in quite a few flavors of crashes triggering kernel panics with various crash signatures such as assert failures, page faults, null pointer dereferences, and queue corruption errors all coming from scheduler itself. Some of the crashes: -> kernel BUG at kernel/sched/rt.c:1616! BUG_ON(idx >= MAX_RT_PRIO) Call Trace: ? __die_body+0x1a/0x60 ? die+0x2a/0x50 ? do_trap+0x85/0x100 ? pick_next_task_rt+0x6e/0x1d0 ? do_error_trap+0x64/0xa0 ? pick_next_task_rt+0x6e/0x1d0 ? exc_invalid_op+0x4c/0x60 ? pick_next_task_rt+0x6e/0x1d0 ? asm_exc_invalid_op+0x12/0x20 ? pick_next_task_rt+0x6e/0x1d0 __schedule+0x5cb/0x790 ? update_ts_time_stats+0x55/0x70 schedule_idle+0x1e/0x40 do_idle+0x15e/0x200 cpu_startup_entry+0x19/0x20 start_secondary+0x117/0x160 secondary_startup_64_no_verify+0xb0/0xbb -> BUG: kernel NULL pointer dereference, address: 00000000000000c0 Call Trace: ? __die_body+0x1a/0x60 ? no_context+0x183/0x350 ? __warn+0x8a/0xe0 ? exc_page_fault+0x3d6/0x520 ? asm_exc_page_fault+0x1e/0x30 ? pick_next_task_rt+0xb5/0x1d0 ? pick_next_task_rt+0x8c/0x1d0 __schedule+0x583/0x7e0 ? update_ts_time_stats+0x55/0x70 schedule_idle+0x1e/0x40 do_idle+0x15e/0x200 cpu_startup_entry+0x19/0x20 start_secondary+0x117/0x160 secondary_startup_64_no_verify+0xb0/0xbb -> BUG: unable to handle page fault for address: ffff9464daea5900 kernel BUG at kernel/sched/rt.c:1861! BUG_ON(rq->cpu != task_cpu(p)) -> kernel BUG at kernel/sched/rt.c:1055! BUG_ON(!rq->nr_running) Call Trace: ? __die_body+0x1a/0x60 ? die+0x2a/0x50 ? do_trap+0x85/0x100 ? dequeue_top_rt_rq+0xa2/0xb0 ? do_error_trap+0x64/0xa0 ? dequeue_top_rt_rq+0xa2/0xb0 ? exc_invalid_op+0x4c/0x60 ? dequeue_top_rt_rq+0xa2/0xb0 ? asm_exc_invalid_op+0x12/0x20 ? dequeue_top_rt_rq+0xa2/0xb0 dequeue_rt_entity+0x1f/0x70 dequeue_task_rt+0x2d/0x70 __schedule+0x1a8/0x7e0 ? blk_finish_plug+0x25/0x40 schedule+0x3c/0xb0 futex_wait_queue_me+0xb6/0x120 futex_wait+0xd9/0x240 do_futex+0x344/0xa90 ? get_mm_exe_file+0x30/0x60 ? audit_exe_compare+0x58/0x70 ? audit_filter_rules.constprop.26+0x65e/0x1220 __x64_sys_futex+0x148/0x1f0 do_syscall_64+0x30/0x80 entry_SYSCALL_64_after_hwframe+0x62/0xc7 -> BUG: unable to handle page fault for address: ffff8cf3608bc2c0 Call Trace: ? __die_body+0x1a/0x60 ? no_context+0x183/0x350 ? spurious_kernel_fault+0x171/0x1c0 ? exc_page_fault+0x3b6/0x520 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? asm_exc_page_fault+0x1e/0x30 ? _cond_resched+0x15/0x30 ? futex_wait_queue_me+0xc8/0x120 ? futex_wait+0xd9/0x240 ? try_to_wake_up+0x1b8/0x490 ? futex_wake+0x78/0x160 ? do_futex+0xcd/0xa90 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? plist_del+0x6a/0xd0 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? dequeue_pushable_task+0x20/0x70 ? __schedule+0x382/0x7e0 ? asm_sysvec_reschedule_ipi+0xa/0x20 ? schedule+0x3c/0xb0 ? exit_to_user_mode_prepare+0x9e/0x150 ? irqentry_exit_to_user_mode+0x5/0x30 ? asm_sysvec_reschedule_ipi+0x12/0x20 Above are some of the common examples of the crashes that were observed due to this issue. Details ======= Let's look at the following scenario to understand this race. 1) CPU A enters push_rt_task a) CPU A has chosen next_task = task p. b) CPU A calls find_lock_lowest_rq(Task p, CPU Z’s rq). c) CPU A identifies CPU X as a destination CPU (X < Z). d) CPU A enters double_lock_balance(CPU Z’s rq, CPU X’s rq). e) Since X is lower than Z, CPU A unlocks CPU Z’s rq. Someone else has locked CPU X’s rq, and thus, CPU A must wait. 2) At CPU Z a) Previous task has completed execution and thus, CPU Z enters schedule, locks its own rq after CPU A releases it. b) CPU Z dequeues previous task and begins executing task p. c) CPU Z unlocks its rq. d) Task p yields the CPU (ex. by doing IO or waiting to acquire a lock) which triggers the schedule function on CPU Z. e) CPU Z enters schedule again, locks its own rq, and dequeues task p. f) As part of dequeue, it sets p.on_rq = 0 and unlocks its rq. 3) At CPU B a) CPU B enters try_to_wake_up with input task p. b) Since CPU Z dequeued task p, p.on_rq = 0, and CPU B updates B.state = WAKING. c) CPU B via select_task_rq determines CPU Y as the target CPU. 4) The race a) CPU A acquires CPU X’s lock and relocks CPU Z. b) CPU A reads task p.cpu = Z and incorrectly concludes task p is still on CPU Z. c) CPU A failed to notice task p had been dequeued from CPU Z while CPU A was waiting for locks in double_lock_balance. If CPU A knew that task p had been dequeued, it would return NULL forcing push_rt_task to give up the task p's migration. d) CPU B updates task p.cpu = Y and calls ttwu_queue. e) CPU B locks Ys rq. CPU B enqueues task p onto Y and sets task p.on_rq = 1. f) CPU B unlocks CPU Y, triggering memory synchronization. g) CPU A reads task p.on_rq = 1, cementing its assumption that task p has not migrated. h) CPU A decides to migrate p to CPU X. This leads to A dequeuing p from Y's queue and various crashes down the line. Solution ======== The solution here is fairly simple. After obtaining the lock (at 4a), the check is enhanced to make sure that the task is still at the head of the pushable tasks list. If not, then it is anyway not suitable for being pushed out. Testing ======= The fix is tested on a cluster of 3 nodes, where the panics due to this are hit every couple of days. A fix similar to this was deployed on such cluster and was stable for more than 30 days. Co-developed-by: Jon Kohler Signed-off-by: Jon Kohler Co-developed-by: Gauri Patwardhan Signed-off-by: Gauri Patwardhan Co-developed-by: Rahul Chunduru Signed-off-by: Rahul Chunduru Signed-off-by: Harshit Agarwal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: "Steven Rostedt (Google)" Reviewed-by: Phil Auld Tested-by: Will Ton Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250225180553.167995-1-harshit@nutanix.com commit 0ab94c3242742bfb540abeedb6bb98440146ac5b Author: Michal Koutný Date: Mon Mar 10 18:04:41 2025 +0100 sched: Add annotations to RT_GROUP_SCHED fields Update comments to ease RT throttling understanding. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-10-mkoutny@suse.com commit 4d949edbc4026eeb81a8f931586cfd4f1de5957e Author: Frederic Weisbecker Date: Tue Mar 18 14:56:18 2025 +0100 rcu: Comment on the extraneous delta test on rcu_seq_done_exact() The numbers used in rcu_seq_done_exact() lack some explanation behind their magic. Especially after the commit: 85aad7cc4178 ("rcu: Fix get_state_synchronize_rcu_full() GP-start detection") which reported a subtle issue where a new GP sequence snapshot was taken on the root node state while a grace period had already been started and reflected on the global state sequence but not yet on the root node sequence, making a polling user waiting on a wrong already started grace period that would ignore freshly online CPUs. The fix involved taking the snaphot on the global state sequence and waiting on the root node sequence. And since a grace period is first started on the global state and only afterward reflected on the root node, a snapshot taken on the global state sequence might be two full grace periods ahead of the root node as in the following example: rnp->gp_seq = rcu_state.gp_seq = 0 CPU 0 CPU 1 ----- ----- // rcu_state.gp_seq = 1 rcu_seq_start(&rcu_state.gp_seq) // snap = 8 snap = rcu_seq_snap(&rcu_state.gp_seq) // Two full GP differences rcu_seq_done_exact(&rnp->gp_seq, snap) // rnp->gp_seq = 1 WRITE_ONCE(rnp->gp_seq, rcu_state.gp_seq); Add a comment about those expectations and to clarify the magic within the relevant function. Note that the issue arises mainly with the use of rcu_seq_done_exact() which has a much tigher guardband (of 2 GPs) to ensure the false-negative window of the API during wraparound is limited to just 2 GPs. rcu_seq_done() does not have such strict requirements, however its large false-negative window of ULONG_MAX/2 is not ideal for the polling API. However, this also means care is needed to ensure the guardband is as large as needed to avoid the example scenario describe above which a warning added in an earlier patch does. [ Comment wordsmithing by Joel ] Signed-off-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 87f1fb77d87a6dac9968a321bb10799ae6d2039c Author: Michal Koutný Date: Mon Mar 10 18:04:40 2025 +0100 sched: Add RT_GROUP WARN checks for non-root task_groups With CONFIG_RT_GROUP_SCHED but runtime disabling of RT_GROUPs we expect the existence of the root task_group only and all rt_sched_entity'ies should be queued on root's rt_rq. If we get a non-root RT_GROUP something went wrong. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-9-mkoutny@suse.com commit 4aa6e94cf90c0d7414580bd6a936600aef8b1e43 Author: Joel Fernandes Date: Mon Mar 24 09:29:26 2025 -0400 rcu: Add warning to ensure rcu_seq_done_exact() is working The previous patch improved the rcu_seq_done_exact() function by adding a meaningful constant for the guardband. Ensure that this is working for the future by a quick check during rcu_gp_init(). Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit d6809c2f606c14f9e95be87d75a576901d2fa050 Author: Michal Koutný Date: Mon Mar 10 18:04:39 2025 +0100 sched: Do not construct nor expose RT_GROUP_SCHED structures if disabled Thanks to kernel cmdline being available early, before any cgroup hierarchy exists, we can achieve the RT_GROUP_SCHED boottime disabling goal by simply skipping any creation (and destruction) of RT_GROUP data and its exposure via RT attributes. We can do this thanks to previously placed runtime guards that would redirect all operations to root_task_group's data when RT_GROUP_SCHED disabled. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-8-mkoutny@suse.com commit 9c94c5ad39182ccf8ae81a2fa4fa4e63abedcbf7 Author: Joel Fernandes Date: Mon Mar 24 04:32:56 2025 -0400 rcu: Replace magic number with meaningful constant in rcu_seq_done_exact() The rcu_seq_done_exact() function checks if a grace period has completed by comparing sequence numbers. It includes a guard band to handle sequence number wraparound, which was previously expressed using the magic number calculation '3 * RCU_SEQ_STATE_MASK + 1'. This magic number is not immediately obvious in terms of what it represents. Instead, the reason we need this tiny guardband is because of the lag between the setting of rcu_state.gp_seq_polled and root rnp's gp_seq in rcu_gp_init(). This guardband needs to be at least 2 GPs worth of counts, to avoid recognizing the newly started GP as completed immediately, due to the following sequence which arises due to the delay between update of rcu_state.gp_seq_polled and root rnp's gp_seq: rnp->gp_seq = rcu_state.gp_seq = 0 CPU 0 CPU 1 ----- ----- // rcu_state.gp_seq = 1 rcu_seq_start(&rcu_state.gp_seq) // snap = 8 snap = rcu_seq_snap(&rcu_state.gp_seq) // Two full GP differences rcu_seq_done_exact(&rnp->gp_seq, snap) // rnp->gp_seq = 1 WRITE_ONCE(rnp->gp_seq, rcu_state.gp_seq); This can happen due to get_state_synchronize_rcu_full() sampling rcu_state.gp_seq_polled, however the poll_state_synchronize_rcu_full() sampling the root rnp's gp_seq. The delay between the update of the 2 counters occurs in rcu_gp_init() during which the counters briefly go out of sync. Make the guardband explictly 2 GPs. This improves code readability and maintainability by making the intent clearer as well. Suggested-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 277e0909754e9f3c82def97150d2f3ea700098f1 Author: Michal Koutný Date: Mon Mar 10 18:04:38 2025 +0100 sched: Bypass bandwitdh checks with runtime disabled RT_GROUP_SCHED When RT_GROUPs are compiled but not exposed, their bandwidth cannot be configured (and it is not initialized for non-root task_groups neither). Therefore bypass any checks of task vs task_group bandwidth. This will achieve behavior very similar to setups that have !CONFIG_RT_GROUP_SCHED and attach cpu controller to cgroup v2 hierarchy. (On a related note, this may allow having RT tasks with CONFIG_RT_GROUP_SCHED and cgroup v2 hierarchy.) Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-7-mkoutny@suse.com commit 61d3164fec2ed283645dc17fcc51959e8f361e18 Author: Michal Koutný Date: Mon Mar 10 18:04:37 2025 +0100 sched: Skip non-root task_groups with disabled RT_GROUP_SCHED First, we want to prevent placement of RT tasks on non-root rt_rqs which we achieve in the task migration code that'd fall back to root_task_group's rt_rq. Second, we want to work with only root_task_group's rt_rq when iterating all "real" rt_rqs when RT_GROUP is disabled. To achieve this we keep root_task_group as the first one on the task_groups and break out quickly. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-6-mkoutny@suse.com commit e34e0131fea1b0f63c2105a1958c94af2ee90f4d Author: Michal Koutný Date: Mon Mar 10 18:04:36 2025 +0100 sched: Add commadline option for RT_GROUP_SCHED toggling Only simple implementation with a static key wrapper, it will be wired in later. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-5-mkoutny@suse.com commit a5a25b32c08a31c03258ec4960bec26caaf76e9a Author: Michal Koutný Date: Mon Mar 10 18:04:35 2025 +0100 sched: Always initialize rt_rq's task_group rt_rq->tg may be NULL which denotes the root task_group. Store the pointer to root_task_group directly so that callers may use rt_rq->tg homogenously. root_task_group exists always with CONFIG_CGROUPS_SCHED, CONFIG_RT_GROUP_SCHED depends on that. This changes root level rt_rq's default limit from infinity to the value of (originally) global RT throttling. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-4-mkoutny@suse.com commit e285313f0848157cc3c6827d233a2510167b50cf Author: Michal Koutný Date: Mon Mar 10 18:04:34 2025 +0100 sched: Remove unneeed macro wrap rt_entity_is_task has split definitions based on CONFIG_RT_GROUP_SCHED, therefore we can use it always. No functional change intended. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-3-mkoutny@suse.com commit 433bce5dadb4ec3d5eda99c5125926c045b79005 Author: Michal Koutný Date: Mon Mar 10 18:04:33 2025 +0100 sched: Convert CONFIG_RT_GROUP_SCHED macros to code conditions Convert the blocks guarded by macros to regular code so that the RT group code gets more compile validation. Reasoning is in Documentation/process/coding-style.rst 21) Conditional Compilation. With that, no functional change is expected. Signed-off-by: Michal Koutný Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250310170442.504716-2-mkoutny@suse.com commit f2d650618bc721760199ae0133c73ec32c63817e Author: Pierre Gondois Date: Tue Mar 25 16:05:41 2025 +0100 sched/fair: Allow decaying util_est when util_avg > CPU capa commit 10a35e6812aa ("sched/pelt: Skip updating util_est when utilization is higher than CPU's capacity") prevents util_est from being updated if util_avg is higher than the underlying CPU capacity to avoid overestimating the task when the CPU is capped (due to thermal issue for instance). In this scenario, the task will miss its deadlines and start overlapping its wake-up events for instance. The task will appear as always running when the CPU is just not powerful enough to allow having a good estimation of the task. commit b8c96361402a ("sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases") sets ewma to util_avg when ewma > util_avg, allowing ewma to quickly grow instead of slowly converge to the new util_avg value when a task profile changes from small to big. However, the 2 conditions: - Check util_avg against max CPU capacity - Check whether util_est > util_avg are placed in an order such as it is possible to set util_est to a value higher than the CPU capacity if util_est > util_avg, but util_est is prevented to decay as long as: CPU capacity < util_avg < util_est. Just remove the check as either: 1. There is idle time on the CPU. In that case the util_avg value of the task is actually correct. It is possible that the task missed a deadline and appears bigger, but this is also the case when the util_avg of the task is lower than the maximum CPU capacity. 2. There is no idle time. In that case, the util_avg value might aswell be an under estimation of the size of the task. It is possible that undesired frequency spikes will appear when the task is later enqueued with an inflated util_est value, but the frequency spike might aswell be deserved. The absence of idle time prevents from drawing any conclusion. Signed-off-by: Pierre Gondois Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20250325150542.1077344-1-pierre.gondois@arm.com commit ce29a7da84cdeafc7c08c32d329037c71ab3f3dd Author: Steve Wahl Date: Tue Mar 4 10:08:44 2025 -0600 sched/topology: Refinement to topology_span_sane speedup Simplify the topology_span_sane code further, removing the need to allocate an array and gotos used to make sure the array gets freed. This version is in a separate commit because it could return a different sanity result than the previous code, but only in odd circumstances that are not expected to actually occur; for example, when a CPU is not listed in its own mask. Signed-off-by: Steve Wahl Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Madadi Vineeth Reddy Tested-by: K Prateek Nayak Tested-by: Valentin Schneider Tested-by: Madadi Vineeth Reddy Link: https://lore.kernel.org/r/20250304160844.75373-3-steve.wahl@hpe.com commit f55dac1dafb3334be1d5b54bf385e8cfaa0ab3b3 Author: Steve Wahl Date: Tue Mar 4 10:08:43 2025 -0600 sched/topology: improve topology_span_sane speed Use a different approach to topology_span_sane(), that checks for the same constraint of no partial overlaps for any two CPU sets for non-NUMA topology levels, but does so in a way that is O(N) rather than O(N^2). Instead of comparing with all other masks to detect collisions, keep one mask that includes all CPUs seen so far and detect collisions with a single cpumask_intersects test. If the current mask has no collisions with previously seen masks, it should be a new mask, which can be uniquely identified by the lowest bit set in this mask. Keep a pointer to this mask for future reference (in an array indexed by the lowest bit set), and add the CPUs in this mask to the list of those seen. If the current mask does collide with previously seen masks, it should be exactly equal to a mask seen before, looked up in the same array indexed by the lowest bit set in the mask, a single comparison. Move the topology_span_sane() check out of the existing topology level loop, let it use its own loop so that the array allocation can be done only once, shared across levels. On a system with 1920 processors (16 sockets, 60 cores, 2 threads), the average time to take one processor offline is reduced from 2.18 seconds to 1.01 seconds. (Off-lining 959 of 1920 processors took 34m49.765s without this change, 16m10.038s with this change in place.) Signed-off-by: Steve Wahl Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Madadi Vineeth Reddy Tested-by: K Prateek Nayak Tested-by: Valentin Schneider Tested-by: Madadi Vineeth Reddy Link: https://lore.kernel.org/r/20250304160844.75373-2-steve.wahl@hpe.com commit 8feb053d53194382fcfb68231296fdc220497ea6 Author: Peter Zijlstra Date: Wed Mar 19 22:23:23 2025 +0100 sched: Fix trace_sched_switch(.prev_state) Gabriele noted that in case of signal_pending_state(), the tracepoint sees a stale task-state. Fixes: fa2c3254d7cf ("sched/tracing: Don't re-read p->state when emitting sched_switch event") Reported-by: Gabriele Monaco Signed-off-by: Peter Zijlstra (Intel) Cc: Valentin Schneider commit ec980e4facef8110f6fce27e5b6344660117f01f Author: Kan Liang Date: Thu Mar 27 12:52:17 2025 -0700 perf/x86/intel: Support auto counter reload The relative rates among two or more events are useful for performance analysis, e.g., a high branch miss rate may indicate a performance issue. Usually, the samples with a relative rate that exceeds some threshold are more useful. However, the traditional sampling takes samples of events separately. To get the relative rates among two or more events, a high sample rate is required, which can bring high overhead. Many samples taken in the non-hotspot area are also dropped (useless) in the post-process. The auto counter reload (ACR) feature takes samples when the relative rate of two or more events exceeds some threshold, which provides the fine-grained information at a low cost. To support the feature, two sets of MSRs are introduced. For a given counter IA32_PMC_GPn_CTR/IA32_PMC_FXm_CTR, bit fields in the IA32_PMC_GPn_CFG_B/IA32_PMC_FXm_CFG_B MSR indicate which counter(s) can cause a reload of that counter. The reload value is stored in the IA32_PMC_GPn_CFG_C/IA32_PMC_FXm_CFG_C. The details can be found at Intel SDM (085), Volume 3, 21.9.11 Auto Counter Reload. In the hw_config(), an ACR event is specially configured, because the cause/reloadable counter mask has to be applied to the dyn_constraint. Besides the HW limit, e.g., not support perf metrics, PDist and etc, a SW limit is applied as well. ACR events in a group must be contiguous. It facilitates the later conversion from the event idx to the counter idx. Otherwise, the intel_pmu_acr_late_setup() has to traverse the whole event list again to find the "cause" event. Also, add a new flag PERF_X86_EVENT_ACR to indicate an ACR group, which is set to the group leader. The late setup() is also required for an ACR group. It's to convert the event idx to the counter idx, and saved it in hw.config1. The ACR configuration MSRs are only updated in the enable_event(). The disable_event() doesn't clear the ACR CFG register. Add acr_cfg_b/acr_cfg_c in the struct cpu_hw_events to cache the MSR values. It can avoid a MSR write if the value is not changed. Expose an acr_mask to the sysfs. The perf tool can utilize the new format to configure the relation of events in the group. The bit sequence of the acr_mask follows the events enabled order of the group. Example: Here is the snippet of the mispredict.c. Since the array has a random numbers, jumps are random and often mispredicted. The mispredicted rate depends on the compared value. For the Loop1, ~11% of all branches are mispredicted. For the Loop2, ~21% of all branches are mispredicted. main() { ... for (i = 0; i < N; i++) data[i] = rand() % 256; ... /* Loop 1 */ for (k = 0; k < 50; k++) for (i = 0; i < N; i++) if (data[i] >= 64) sum += data[i]; ... ... /* Loop 2 */ for (k = 0; k < 50; k++) for (i = 0; i < N; i++) if (data[i] >= 128) sum += data[i]; ... } Usually, a code with a high branch miss rate means a bad performance. To understand the branch miss rate of the codes, the traditional method usually samples both branches and branch-misses events. E.g., perf record -e "{cpu_atom/branch-misses/ppu, cpu_atom/branch-instructions/u}" -c 1000000 -- ./mispredict [ perf record: Woken up 4 times to write data ] [ perf record: Captured and wrote 0.925 MB perf.data (5106 samples) ] The 5106 samples are from both events and spread in both Loops. In the post-process stage, a user can know that the Loop 2 has a 21% branch miss rate. Then they can focus on the samples of branch-misses events for the Loop 2. With this patch, the user can generate the samples only when the branch miss rate > 20%. For example, perf record -e "{cpu_atom/branch-misses,period=200000,acr_mask=0x2/ppu, cpu_atom/branch-instructions,period=1000000,acr_mask=0x3/u}" -- ./mispredict (Two different periods are applied to branch-misses and branch-instructions. The ratio is set to 20%. If the branch-instructions is overflowed first, the branch-miss rate < 20%. No samples should be generated. All counters should be automatically reloaded. If the branch-misses is overflowed first, the branch-miss rate > 20%. A sample triggered by the branch-misses event should be generated. Just the counter of the branch-instructions should be automatically reloaded. The branch-misses event should only be automatically reloaded when the branch-instructions is overflowed. So the "cause" event is the branch-instructions event. The acr_mask is set to 0x2, since the event index in the group of branch-instructions is 1. The branch-instructions event is automatically reloaded no matter which events are overflowed. So the "cause" events are the branch-misses and the branch-instructions event. The acr_mask should be set to 0x3.) [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.098 MB perf.data (2498 samples) ] $perf report Percent │154: movl $0x0,-0x14(%rbp) │ ↓ jmp 1af │ for (i = j; i < N; i++) │15d: mov -0x10(%rbp),%eax │ mov %eax,-0x18(%rbp) │ ↓ jmp 1a2 │ if (data[i] >= 128) │165: mov -0x18(%rbp),%eax │ cltq │ lea 0x0(,%rax,4),%rdx │ mov -0x8(%rbp),%rax │ add %rdx,%rax │ mov (%rax),%eax │ ┌──cmp $0x7f,%eax 100.00 0.00 │ ├──jle 19e │ │sum += data[i]; The 2498 samples are all from the branch-misses events for the Loop 2. The number of samples and overhead is significantly reduced without losing any information. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Falcon Link: https://lkml.kernel.org/r/20250327195217.2683619-6-kan.liang@linux.intel.com commit 1856c6c2f8416b1340652cccfa1fc302ac8d5ecd Author: Kan Liang Date: Thu Mar 27 12:52:16 2025 -0700 perf/x86/intel: Add CPUID enumeration for the auto counter reload The counters that support the auto counter reload feature can be enumerated in the CPUID Leaf 0x23 sub-leaf 0x2. Add acr_cntr_mask to store the mask of counters which are reloadable. Add acr_cause_mask to store the mask of counters which can cause reload. Since the e-core and p-core may have different numbers of counters, track the masks in the struct x86_hybrid_pmu as well. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Falcon Link: https://lkml.kernel.org/r/20250327195217.2683619-5-kan.liang@linux.intel.com commit c9449c8506a5df5052ef4d17867699517b10b55a Author: Kan Liang Date: Thu Mar 27 12:52:15 2025 -0700 perf: Extend the bit width of the arch-specific flag The auto counter reload feature requires an event flag to indicate an auto counter reload group, which can only be scheduled on specific counters that enumerated in CPUID. However, the hw_perf_event.flags has run out on X86. Two solutions were considered to address the issue. - Currently, 20 bits are reserved for the architecture-specific flags. Only the bit 31 is used for the generic flag. There is still plenty of space left. Reserve 8 more bits for the arch-specific flags. - Add a new X86 specific hw_perf_event.flags1 to support more flags. The former is implemented. Enough room is still left in the global generic flag. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Falcon Link: https://lkml.kernel.org/r/20250327195217.2683619-4-kan.liang@linux.intel.com commit 0a6557938d8f189024a03aca77e58763930840ee Author: Kan Liang Date: Thu Mar 27 12:52:14 2025 -0700 perf/x86/intel: Track the num of events needs late setup When a machine supports PEBS v6, perf unconditionally searches the cpuc->event_list[] for every event and check if the late setup is required, which is unnecessary. The late setup is only required for special events, e.g., events support counters snapshotting feature. Add n_late_setup to track the num of events that needs the late setup. Other features, e.g., auto counter reload feature, require the late setup as well. Add a wrapper, intel_pmu_pebs_late_setup, for the events that support counters snapshotting feature. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Falcon Link: https://lkml.kernel.org/r/20250327195217.2683619-3-kan.liang@linux.intel.com commit 4dfe3232cc04325a09e96f6c7f9546ba6c0b132b Author: Kan Liang Date: Thu Mar 27 12:52:13 2025 -0700 perf/x86: Add dynamic constraint More and more features require a dynamic event constraint, e.g., branch counter logging, auto counter reload, Arch PEBS, etc. Add a generic flag, PMU_FL_DYN_CONSTRAINT, to indicate the case. It avoids keeping adding the individual flag in intel_cpuc_prepare(). Add a variable dyn_constraint in the struct hw_perf_event to track the dynamic constraint of the event. Apply it if it's updated. Apply the generic dynamic constraint for branch counter logging. Many features on and after V6 require dynamic constraint. So unconditionally set the flag for V6+. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Falcon Link: https://lkml.kernel.org/r/20250327195217.2683619-2-kan.liang@linux.intel.com commit da916e96e2dedcb2d40de77a7def833d315b81a6 Author: Peter Zijlstra Date: Fri Oct 25 10:21:41 2024 +0200 perf: Make perf_pmu_unregister() useable Previously it was only safe to call perf_pmu_unregister() if there were no active events of that pmu around -- which was impossible to guarantee since it races all sorts against perf_init_event(). Rework the whole thing by: - keeping track of all events for a given pmu - 'hiding' the pmu from perf_init_event() - waiting for the appropriate (s)rcu grace periods such that all prior references to the PMU will be completed - detaching all still existing events of that pmu (see first point) and moving them to a new REVOKED state. - actually freeing the pmu data. Where notably the new REVOKED state must inhibit all event actions from reaching code that wants to use event->pmu. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193723.525402029@infradead.org commit 4da0600edae1cf15d12bebacc66d7237e2c33fc6 Author: Peter Zijlstra Date: Fri Feb 14 13:23:45 2025 +0100 perf: Rename perf_event_exit_task(.child) The task passed to perf_event_exit_task() is not a child, it is current. Fix this confusing naming, since much of the rest of the code also relies on it being current. Specifically, both exec() and exit() callers use it with current as the argument. Notably, task_ctx_sched_out() doesn't make much sense outside of current. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193305.486326750@infradead.org commit 90661365021a6d0d7f3a2c5046ebe33e4df53b92 Author: Peter Zijlstra Date: Thu Feb 13 14:04:07 2025 +0100 perf: Unify perf_event_free_task() / perf_event_exit_task_context() Both perf_event_free_task() and perf_event_exit_task_context() are very similar, except perf_event_exit_task_context() is a little more generic / makes less assumptions. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193723.274039710@infradead.org commit 3e8671e00e57b3d006ed8ae5ef055807506e44b2 Author: Peter Zijlstra Date: Fri Jan 17 15:31:49 2025 +0100 perf: Simplify perf_event_release_kernel() There is no good reason to have the free list anymore. It is possible to call free_event() after the locks have been dropped in the main loop. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193723.151721102@infradead.org commit 59f3aa4a3ee27e96132e16d2d2bdc3acadb4bf79 Author: Peter Zijlstra Date: Fri Jan 17 15:27:07 2025 +0100 perf: Simplify perf_event_free_task() wait Simplify the code by moving the duplicated wakeup condition into put_ctx(). Notably, wait_var_event() is in perf_event_free_task() and will have set ctx->task = TASK_TOMBSTONE. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193723.044499344@infradead.org commit 0a00a43b8c200df5b9ca2b3e1726479b5916264b Author: Peter Zijlstra Date: Fri Jan 17 15:25:23 2025 +0100 perf: Simplify child event tear-down Currently perf_event_release_kernel() will iterate the child events and attempt tear-down. However, it removes them from the child_list using list_move(), notably skipping the state management done by perf_child_detach(). Crucially, it fails to clear PERF_ATTACH_CHILD, which opens the door for a concurrent perf_remove_from_context() to race. This way child_list management stays fully serialized using child_mutex. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193305.486326750@infradead.org commit 7ed9138a72829d2035ecbd8dbd35b1bc3c137c40 Author: Peter Zijlstra Date: Fri Jan 17 10:54:50 2025 +0100 perf: Ensure bpf_perf_link path is properly serialized Ravi reported that the bpf_perf_link_attach() usage of perf_event_set_bpf_prog() is not serialized by ctx->mutex, unlike the PERF_EVENT_IOC_SET_BPF case. Reported-by: Ravi Bangoria Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20250307193305.486326750@infradead.org commit 5dcba48994bcc04c3cc41bf830b7ce4912ca8e6b Merge: 0af2f6be1b4281 56799bc0356587 Author: Peter Zijlstra Date: Tue Apr 8 20:55:45 2025 +0200 Merge branch 'perf/urgent' avoid merge conflicts with urgent Signed-off-by: Peter Zijlstra commit e73e5b7c1acd51fc5000dc476ceb76184b6ca253 Author: Paul E. McKenney Date: Wed Feb 5 12:49:32 2025 -0800 rcutorture: Split out beginning and end from rcu_torture_one_read() The rcu_torture_one_read() function is designed for RCU readers that are confined to a task, such that a single thread of control extends from the beginning of a given RCU read-side critical section to its end. This does not suffice for things like srcu_down_read() and srcu_up_read(), where the critical section might start at task level and end in a timer handler. This commit therefore creates separate init_rcu_torture_one_read_state(), rcu_torture_one_read_start(), and rcu_torture_one_read_end() functions, along with a rcu_torture_one_read_state structure to coordinate their actions. These will be used to create tests for srcu_down_read() and friends. One caution: The caller to rcu_torture_one_read_start() must enter the initial read-side critical section prior to the call. This enables use of non-standard primitives such as srcu_down_read() while still using the same validation code. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 75d8bf48a8bef2628243d0d76599c710412ba25b Author: Paul E. McKenney Date: Wed Jan 22 15:59:30 2025 -0800 rcutorture: Make srcu_lockdep.sh check reader-conflict handling Mixing different flavors of RCU readers is forbidden, for example, you should not use srcu_read_lock() and srcu_read_lock_nmisafe() on the same srcu_struct structure. There are checks for this, but these checks are not tested on a regular basis. This commit therefore adds such tests to srcu_lockdep.sh. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 31b7ce3d98a57de80e255f5124f8dbdfb4be8777 Author: Paul E. McKenney Date: Wed Jan 22 13:42:23 2025 -0800 rcutorture: Make srcu_lockdep.sh check kernel Kconfig The srcu_lockdep.sh currently blindly trusts the rcutorture SRCU-P scenario to build its kernel with lockdep enabled. Of course, this dependency might not be obvious to someone rebalancing SRCU scenarios. This commit therefore adds code to srcu_lockdep.sh that verifies that the .config file has lockdep enabled. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 578f5cbe7f89714a648e4a8510e3770153abcaf9 Author: Joel Fernandes Date: Wed Feb 19 07:50:43 2025 -0500 MAINTAINERS: Update Joel's email address Update MAINTAINERS file to reflect changes to Joel's email address for upstream work. Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes commit 27986833e8e675b6c17654d13623590a46f9033e Author: Yixun Lan Date: Tue Apr 8 23:11:20 2025 +0800 gpiolib: support parsing gpio three-cell interrupts scheme gpio irq which using three-cell scheme should always call instance_match() function to find the correct irqdomain. The select() function will be called with !DOMAIN_BUS_ANY, so for specific gpio irq driver, it need to set bus token explicitly, something like: irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED); Signed-off-by: Yixun Lan Link: https://lore.kernel.org/r/20250408-04-gpio-irq-threecell-v4-1-fd170d5e2d2b@gentoo.org Signed-off-by: Bartosz Golaszewski commit 8f47efd68db3bd87941df1ea3a5b77c62db5632e Author: Lucas De Marchi Date: Tue Apr 8 07:31:42 2025 -0700 drm/panel: Fix build error on !CONFIG_OF Move helpers outside of CONFIG_OF, so basic allocation also works without it. Fixes: ed9c594d495d ("drm/panel: Add new helpers for refcounted panel allocatons") Fixes: dcba396f6907 ("drm/panel: Add refcount support") Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/nyrjnvctqnk6f3x5q7rlmy5nb7iopoti56pgh43zqknici5ms4@cibpldh7epra Signed-off-by: Lucas De Marchi commit ebeab0be707ddcffd2b7f6ff4f9bd8e0c1c49fdd Author: Swathi K S Date: Fri Mar 7 10:19:04 2025 +0530 arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC The FSD SoC contains two instances of Synopsys DWC QoS Ethernet IP, one in FSYS0 block and other in PERIC block. The ethernet interface is connected to a switch which is not managed by Linux. Adds device tree node for Ethernet in PERIC Block and enables the same for FSD platform. Signed-off-by: Pankaj Dubey Signed-off-by: Jayati Sahu Signed-off-by: Swathi K S Link: https://lore.kernel.org/r/20250307044904.59077-3-swathi.ks@samsung.com Signed-off-by: Krzysztof Kozlowski commit 1d62af229b18bff2430ea5dde0e129d43515e12c Author: Swathi K S Date: Fri Mar 7 10:19:03 2025 +0530 arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC The FSD SoC contains two instances of Synopsys DWC QoS Ethernet IP, one in FSYS0 block and other in PERIC block. The ethernet interface is managed by a switch which is not managed by Linux. Adds device tree node for Ethernet in FSYS0 Block and enables the same for FSD platform. Signed-off-by: Pankaj Dubey Signed-off-by: Jayati Sahu Signed-off-by: Swathi K S Link: https://lore.kernel.org/r/20250307044904.59077-2-swathi.ks@samsung.com Signed-off-by: Krzysztof Kozlowski commit 7d7c47281cb57c722683131a35fe6edc5d5b0325 Merge: 5e21900ef64244 69e3433fa5e24e Author: Mark Brown Date: Tue Apr 8 16:27:42 2025 +0100 spi: spi-stm32-ospi: dt-bindings fixes Merge series from Patrice Chotard : Make "resets" property mandatory. Update spi-stm32-ospi driver and dt-bindings accordingly. commit 4a7c28e659b85c96ebc87ad00d11c47a538dc15e Merge: 16b19bfd80402b 936df52c29b0d4 Author: Mark Brown Date: Tue Apr 8 16:15:52 2025 +0100 regulator: rpi-panel-attiny: use new GPIO line value Merge series from Bartosz Golaszewski : struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. We're in the process of converting all GPIO drivers to using the new API. This series converts the only GPIO controller under drivers/regulator/ and - while at it - refactors the code a bit. commit 594c8df92b946c851bb767455f32f9e762d99810 Author: Cheng Ming Lin Date: Mon Apr 7 15:54:00 2025 +0800 mtd: spi-nor: macronix: Add fixups for MX25L3255E SFDP of MX25L3255E is JESD216, which does not include the Quad Enable bit Requirement in BFPT. As a result, during BFPT parsing, the quad_enable method is not set to spi_nor_sr1_bit6_quad_enable. Therefore, it is necessary to correct this setting by late_init. In addition, MX25L3255E also supports 1-4-4 page program in 3-byte address mode. However, since the 3-byte address 1-4-4 page program is not defined in SFDP, it needs to be configured in late_init. Signed-off-by: Cheng Ming Lin Acked-by: Pratyush Yadav Signed-off-by: Pratyush Yadav [pratyush@kernel.org: move params declaration to top, and use it everywhere] Link: https://lore.kernel.org/r/20250407075400.1113177-4-linchengming884@gmail.com commit c425efacec03d9fb6c7bad1678daf717f201e934 Author: Cheng Ming Lin Date: Mon Apr 7 15:53:59 2025 +0800 mtd: spi-nor: macronix: Remove duplicate flash info entries To clean up the code and reduce duplication, this entry is removed. Signed-off-by: Cheng Ming Lin Reviewed-by: Tudor Ambarus Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20250407075400.1113177-3-linchengming884@gmail.com commit 947c86e481a027ed5948434096e506f307bd7114 Author: Cheng Ming Lin Date: Mon Apr 7 15:53:58 2025 +0800 mtd: spi-nor: macronix: Drop the redundant flash info fields Many flash devices share the same ID but have different part numbers. To avoid confusion, the part number field is removed. Additionally, since SFDP already provides size information and functionality covered by no_sfdp_flags, these fields are also removed. Furthermore, when 4-byte address instruction table is available, the SPI_NOR_4B_OPCODES flag is no longer needed and is removed. Signed-off-by: Cheng Ming Lin Acked-by: Tudor Ambarus Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20250407075400.1113177-2-linchengming884@gmail.com commit d370586746466166a57b709bfce8301f2adf97a0 Author: Wolfram Sang Date: Thu Mar 20 11:18:49 2025 +0100 rtc: da9063: simplify irq management The code for enabling and disabling the irq is so similar that it can easily be handled by one function. Like in most other RTC drivers. Save the duplicated code and one layer of indirection. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250320102218.10781-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 6c3c8b35d1ff3589aed2206a8805cf3289046118 Author: Maxime Ripard Date: Tue Apr 8 14:20:08 2025 +0200 drm/panel: boe-tv101wum-ll2: Fix compilation build Commit 5d2b55e55e61 ("panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()") switched from a kmalloc + drm_panel_init call to a devm_drm_panel_alloc one. However, the variable it was storing the allocated pointer in doesn't exist, resulting in a compilation breakage. Fixes: 5d2b55e55e61 ("panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()") Signed-off-by: Maxime Ripard Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250408122008.1676235-3-mripard@kernel.org Signed-off-by: Dmitry Baryshkov commit bce319a16072ead8c60a4546cdb426c449e893ec Author: Maxime Ripard Date: Tue Apr 8 14:20:07 2025 +0200 drm/panel: boe-th101mb31ig002-28a: Fix compilation build Commit 77dcbce63779 ("panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()") switched from a kmalloc + drm_panel_init call to a devm_drm_panel_alloc one. However, the variable it was storing the allocated pointer in doesn't exist, resulting in a compilation breakage. Fixes: 77dcbce63779 ("panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()") Signed-off-by: Maxime Ripard Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250408122008.1676235-2-mripard@kernel.org Signed-off-by: Dmitry Baryshkov commit a46b02f7a8453cc5e5efde593dd7edf11ee0bf14 Author: Maxime Ripard Date: Tue Apr 8 14:20:06 2025 +0200 drm/panel: auo-a030jtn01: Fix compilation build Commit 9d7d7c3c9a19 ("panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()") switched from a kmalloc + drm_panel_init call to a devm_drm_panel_alloc one. However, the variable it was storing the allocated pointer in doesn't exist, resulting in a compilation breakage. Fixes: 9d7d7c3c9a19 ("panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()") Signed-off-by: Maxime Ripard Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250408122008.1676235-1-mripard@kernel.org Signed-off-by: Dmitry Baryshkov commit 0bddd060a6a3a10e6ebd386cc4d9a897e8a60861 Author: Wolfram Sang Date: Wed Mar 12 11:00:00 2025 +0100 rtc: rzn1: clear interrupts on remove It is good practice to clear running interrupts before removing the driver. This is not really a bugfix because on current systems RuntimePM will disable the module clock, so interrupts won't be initiated. The dependency on that behaviour is subtle, though. Better be self-contained and clean up when removing. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250312100105.36767-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 8003a5585fc8466b22e000204d29cf2fa5e21e3a Author: Wolfram Sang Date: Thu Feb 27 14:43:03 2025 +0100 rtc: sh: minor fixes to adhere to coding style Use the BIT macro, use curly braces for else-blocks, don't split strings over multiple lines, annotate the lock, update copyright. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-18-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit ea59ad0ca975841ea490315d886a612520e9e9da Author: Wolfram Sang Date: Thu Feb 27 14:43:02 2025 +0100 rtc: sh: use local variables in probe() for mapping IO No need to store the resource for the registers in the per-device struct because we only need it during probe. Remove some unneeded unlikely() while here and correct the type of 'regsize'. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-17-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 33df0a509dad96046aa7f9b133495bdccf77c593 Author: Wolfram Sang Date: Thu Feb 27 14:43:01 2025 +0100 rtc: sh: remove useless wrapper function The wrapper to enable interrupts is so thin that we can use it directly. Also gets rid of an 'inline' which doesn't make sense here. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-16-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 689602e0609e2209e294f213c6cb5a6798517f4d Author: Wolfram Sang Date: Thu Feb 27 14:43:00 2025 +0100 rtc: sh: simplify irq setup after refactoring We only need the alarm_irq handler. That means we can remove everything related to periodic_irq and carry_irq. Also, the shared handler can go since we only we need the alarm interrupt in any case. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-15-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit a7e7d966ccab12110680354636a666af2c015f77 Author: Wolfram Sang Date: Thu Feb 27 14:42:59 2025 +0100 rtc: sh: remove periodic interrupt handling Because periodic interrupts are emulated by the RTC core, the PIE handling code can simply go away now. And with it the custom proc-file. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-14-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit fb06b6b54b33b145925e18fc2e66498cf98ed9fb Author: Wolfram Sang Date: Thu Feb 27 14:42:58 2025 +0100 rtc: sh: only disable carry interrupts in probe() With old, custom UIE handling removed, we can now disable the carry interrupt in probe() and leave it like this. No further handling is required. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-13-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit c090d390e5ed917a7f33a35da9bd8de4b505cc8e Author: Wolfram Sang Date: Thu Feb 27 14:42:57 2025 +0100 rtc: sh: remove update interrupt handling Since commit e428c6a2772b ("RTC: Clean out UIE icotl implementations"), the flag for UIE cannot be set anymore. Because UIE is now handled via regular alarms and a timerqueue by the RTC core, the UIE handling code can simply go away now. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-12-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 8f2efdbc303fe7baa83843d3290dd6ea5ba3276c Author: Wolfram Sang Date: Thu Feb 27 14:42:56 2025 +0100 rtc: sh: assign correct interrupts with DT The DT bindings for this driver define the interrupts in the order as they are numbered in the interrupt controller. The old platform_data, however, listed them in a different order. So, for DT based platforms, they are mixed up. Assign them specifically for DT, so we can keep the bindings stable. After the fix, 'rtctest' passes again on the Renesas Genmai board (RZ-A1 / R7S72100). Fixes: dab5aec64bf5 ("rtc: sh: add support for rza series") Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-11-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni commit 34a07c5b257453b5fcadc2408719c7b075844014 Author: Raju Rangoju Date: Mon Apr 7 15:59:13 2025 +0530 amd-xgbe: Convert to SPDX identifier Use SPDX-License-Identifier accross all the files of the xgbe driver to ensure compliance with Linux kernel standards, thus removing the boiler-plate template license text. Signed-off-by: Raju Rangoju Acked-by: Shyam Sundar S K Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250407102913.3063691-1-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 5e21900ef64244fadeddc9015e8b8307d116764a Author: Bartosz Golaszewski Date: Tue Apr 8 09:39:56 2025 +0200 spi: xcomm: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-spi-v1-1-597660766654@linaro.org Signed-off-by: Mark Brown commit 6703cb3dced01f32982b9f7069ef1336d0225077 Author: Daisuke Matsuda Date: Mon Mar 24 16:56:48 2025 +0900 RDMA/rxe: Enable ODP in RDMA FLUSH operation For persistent memories, add rxe_odp_flush_pmem_iova() so that ODP specific steps are executed. Otherwise, no additional consideration is required. Signed-off-by: Daisuke Matsuda Link: https://patch.msgid.link/20250324075649.3313968-2-matsuda-daisuke@fujitsu.com Reviewed-by: Li Zhijian Signed-off-by: Leon Romanovsky commit 4acdd3de31c878804c6be826cb8c508f18962d0e Author: Thorsten Blum Date: Mon Apr 7 11:14:42 2025 +0200 rocker: Simplify if condition in ofdpa_port_fdb() Remove the double negation and simplify the if condition. No functional changes intended. Signed-off-by: Thorsten Blum Reviewed-by: Jiri Pirko Link: https://patch.msgid.link/20250407091442.743478-1-thorsten.blum@linux.dev Signed-off-by: Paolo Abeni commit 936df52c29b0d422665c5e84b0cffae61611411b Author: Bartosz Golaszewski Date: Tue Apr 8 09:36:31 2025 +0200 regulator: rpi-panel-attiny: use new GPIO line value setter callbacks struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-regulator-v1-4-a18b6154b31a@linaro.org Signed-off-by: Mark Brown commit 50faedda12e46918a11194a30c2bedf2b983fae2 Author: Bartosz Golaszewski Date: Tue Apr 8 09:36:30 2025 +0200 regulator: rpi-panel-attiny: use lock guards for the state mutex Use mutex lock guards from linux/cleanup.h to simplify the driver code. Note that ret must be initialized in order to avoid a build warning as scoped_guard() is implemented as a for loop. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-regulator-v1-3-a18b6154b31a@linaro.org Signed-off-by: Mark Brown commit 1326e295d6b4ffc9647bd4f073b787b4f79d6b6e Author: Bartosz Golaszewski Date: Tue Apr 8 09:36:29 2025 +0200 regulator: rpi-panel-attiny: use devres for mutex management Simplify the probe() code and remove the remove() callback by using devres to manage the mutex resources. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-regulator-v1-2-a18b6154b31a@linaro.org Signed-off-by: Mark Brown commit 06bab1f101337ae9469a7d2c6ac4de5db64e8160 Author: Bartosz Golaszewski Date: Tue Apr 8 09:36:28 2025 +0200 regulator: rpi-panel-attiny: don't double-check GPIO range GPIO core already checks GPIO ranges, there's no need to check it again in the set() callback. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250408-gpiochip-set-rv-regulator-v1-1-a18b6154b31a@linaro.org Signed-off-by: Mark Brown commit fc2e4f4f7b5f24327113297e624f13f2847cc6ea Author: Julian Vetter Date: Mon Apr 7 10:33:06 2025 +0200 eth: nfp: remove __get_unaligned_cpu32 from netronome drivers The __get_unaligned_cpu32 function is deprecated. So, replace it with the more generic get_unaligned and just cast the input parameter. Signed-off-by: Julian Vetter Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250407083306.1553921-1-julian@outer-limits.org Signed-off-by: Paolo Abeni commit 48afd55505247df3b8e00a15a0b25b58618bc3a0 Author: Thorsten Blum Date: Mon Apr 7 10:26:07 2025 +0200 hamradio: Remove unnecessary strscpy_pad() size arguments If the destination buffer has a fixed length, strscpy_pad() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit sizeof() calls unnecessary - remove them. No functional changes intended. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250407082607.741919-2-thorsten.blum@linux.dev Signed-off-by: Paolo Abeni commit ee9c3082f100dc78f89181c71507e69a4867368e Author: Thorsten Blum Date: Tue Apr 8 10:30:12 2025 +0200 ALSA: cs46xx: Remove commented out code The code has been commented out ever since commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), remove it. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250408083015.796638-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai commit 92a2bf257ec4729d13ed17f5b04192ad8e3b7024 Author: Maxime Ripard Date: Mon Apr 7 18:29:07 2025 +0200 dma-buf: heaps: system: Remove global variable The system heap is storing its struct dma_heap pointer in a global variable but isn't using it anywhere. Let's move the global variable into system_heap_create() to make it local. Signed-off-by: Maxime Ripard Reviewed-by: Christian König Reviewed-by: Mattijs Korpershoek Link: https://patchwork.freedesktop.org/patch/msgid/20250407-dma-buf-ecc-heap-v3-1-97cdd36a5f29@kernel.org Signed-off-by: Christian König commit f4f20f7a5030f580e1706b7fd804f82ee7dac6ed Merge: 8e5e0e7110f867 eec611d26f8480 Author: Mark Brown Date: Tue Apr 8 10:25:20 2025 +0100 ASoC: wcd938x: enable t14s audio headset Merge series from srinivas.kandagatla@linaro.org: On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to support CTIA and OMTP headsets. This switch is used to minimise pop and click during headset type switching. This patchset adds required bindings and changes to codec and dts to tnable the regulator required to power this switch along with wiring up gpio that control the headset switching. Without this patchset, there will be lots of noise on headset and mic will not we functional. commit 8e5e0e7110f8671e30f6ef08dc9613565f947058 Merge: 94112d3d9422d5 1d9119794c1002 Author: Mark Brown Date: Tue Apr 8 10:25:16 2025 +0100 ASoC: fsl_sai: add several improvements Merge series from Shengjiu Wang : Add several improvements for the sai interface. 1.allow to set mclk rate with zero clk_id for master mode 2.add xlate_tdm_slot_mask() callback to avoid channel constrain 3.separate 'is_dsp_mode' for tx and rx 4.separate set_tdm_slot() for tx and rx commit 94112d3d9422d59a5d4230802ce46a27e1bc5226 Merge: 1f4db3cb1a5984 d5099bc1b56417 Author: Mark Brown Date: Tue Apr 8 10:25:12 2025 +0100 ASoC: codec: wcd93xx: Convert to GPIO descriptors Merge series from "Peng Fan (OSS)" : of_gpio.h is deprecated, so update driver to use gpiod API. The current driver use value 0 to assert reset and 1 to deassert reset. The DTSes in tree that use the codec are using GPIO_ACTIVE_LOW. So it is safe to use devm_gpiod_get to get GPIO descriptors and use gpiod_set_value to configure output with value 1 means raw value 0, value 0 means raw value 1. Note: I not have devices to test, just my best pratice to do the convertion. commit 1f4db3cb1a5984cf1b845a82f66f53947ffad6e5 Merge: aa446b5d9a8eff 8d18e67abbdf38 Author: Mark Brown Date: Tue Apr 8 10:25:08 2025 +0100 ASoC: Intel: avs: 16 channels support Merge series from Cezary Rojewski : Relatively small delta-wise patchset which raises max channels supported from 8 to 16. The existing limitation is software-based, not hardware based. The hardware, as per HDAudio specification, section 1.2.2, (relevant register at SDnFMT, section 3.3.41) supports the configurations for years. The avs-driver becomes the first consumer of that configuration on the Linux kernel side. Set starts off with update to string_helpers so that functionality added with parse_int_array_user() can be utilized in kernel-kernel interactions. Follow up is rasing the cap on HDAudio-library side. The format selection procedure found in the library is good-to-go as is. Everything that follows these two patches is avs-driver specific: - raise channels_max for every DAI-driver template - provide i2s_test module parameter for testing purposes. When combined with I2S loopback card, allows to test 16ch on most Intel hardware post Broadwell era - adjust TDM masks to reflect the 8 -> 16 channels change commit aa446b5d9a8efffb40c5fd244163dc04f98cf865 Merge: 25293be4a77812 387ddbc7d47496 Author: Mark Brown Date: Tue Apr 8 10:25:04 2025 +0100 ASoC: Intel: avs: Add support for FCL platform Merge series from Cezary Rojewski : The patchset is fairly straightforward - add support for Automotive platforms based on new DSP architecture, Frisco Lake (FCL), a PantherLake (PTL)-based platform is an example of. The cAVS architecture which all Intel AudioDSP followed for years ends with RaptorLake familty. Like all the major updates, this one received new name too - Audio Context Engine (ACE). While the range of improvements and changes on the firmware/hardware side is large, software survives this evolution without need of any major refactoring. Additional hardware changes brought with LunarLake (LNL, ACE 2.0) call for update in PCM-area. The GPDMAs previously utilized for non-HDAudio transfer types are no longer there, everything is running through HDAudio LINK on the Back-End side now. In terms of code, the mtl.c file, provided with patch 05 'ASoC: Intel: avs: PTL-based platforms support' hosts largest number of new handlers - new IRQ and INT control and DSP-cores management. Combined with lnl.c and ptl.c which layer the architecture changes done over ACE generations, provide support for PTL-based platforms e.g.: FCL. The inheritance in summary: mtl.c <- lnl.c <- ptl.c The functional update to HDAudio library is there to help avs-driver read certain capabilities directly from the hardware. Once the pointer to LINK is obtained, there is no need to call AudioDSP firmware to get the caps. commit 25293be4a778123a5dc2415cb3d79d4797ba4d1e Merge: 4c035fab9f4207 93fa44f84704df Author: Mark Brown Date: Tue Apr 8 10:25:00 2025 +0100 ASoC: Intel: avs: Update machine board card names Merge series from Amadeusz Sławiński : As discussed in user bug report [1] & [2], it was identified that HDA card provides wrong FE device numbers to be used with UCM, at the same time it was requested that we change card names to better names. This patchset does that, by adding option for going back to old behaviour in first patch. Using existing way of enumerating FEs from topology in second patch. Then setting new names in all cards while providing fallback to old name. Only exception is probe card, which is used for debug purposes only, where we just directly rename card. Do note that patch 2, will require updated topologies if topology exposes more than 1 FE on card. Old topologies didn't assign id field and it defaulted to 0, however when we use this field by setting snd_soc_component_driver::use_dai_pcm_id field, we need topologies with distinct values in FEs. Necessary changes are provided in avsdk and avs-topology-xml repositories ([4] & [5]). linux-firmware update will follow as soon as this changeset is merged. [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=219654 [2] Link: https://github.com/alsa-project/alsa-ucm-conf/pull/499 [3] Link: https://lore.kernel.org/linux-sound/20250127144445.2739017-1-amadeuszx.slawinski@linux.intel.com/ [4] https://github.com/thesofproject/avsdk/commit/a879c8ae4ba7be53b8ed528da1361a8c62475b6e [5] https://github.com/thesofproject/avs-topology-xml/commit/9b94d52cbc5c1e07c8d9503c86329cd62ea4c9e7 https://github.com/thesofproject/avs-topology-xml/commit/bdbc8d6ba9ea6db67daed9cbbaed3c23ff112ecb commit 4e5c53e03806359e68dde5e951e50cd1f4908405 Merge: 0af2f6be1b4281 390e34bc1490a1 Author: Christian Brauner Date: Wed Mar 19 09:39:47 2025 +0100 Merge patch series "VFS: improve interface for lookup_one functions" NeilBrown says: VFS has some functions with names containing "lookup_one_len" and others without the "_len". This difference has nothing to do with "len". This is an historical accident but can be confusing. The functions without "_len" take a "mnt_idmap" pointer. This is found in the "vfsmount" and that is an important question when choosing which to use: do you have a vfsmount, or are you "inside" the filesystem. A related question is "is permission checking relevant here?". nfsd and cachefiles *do* have a vfsmount but *don't* use the non-_len functions. They pass nop_mnt_idmap and refuse to work on filesystems which have any other idmap. This series changes nfsd and cachefile to use the lookup_one family of functions and to explictily pass &nop_mnt_idmap which is consistent with all other vfs interfaces used where &nop_mnt_idmap is explicitly passed. The remaining uses of the "_one" functions do not require permission checks so these are renamed to be "_noperm" and the permission checking is removed. This series also changes these lookup function to take a qstr instead of separate name and len. In many cases this simplifies the call. * patches from https://lore.kernel.org/r/20250319031545.2999807-2-neil@brown.name: VFS: change lookup_one_common and lookup_noperm_common to take a qstr Use try_lookup_noperm() instead of d_hash_and_lookup() outside of VFS VFS: rename lookup_one_len family to lookup_noperm and remove permission check cachefiles: Use lookup_one() rather than lookup_one_len() nfsd: Use lookup_one() rather than lookup_one_len() VFS: improve interface for lookup_one functions Link: https://lore.kernel.org/r/20250319031545.2999807-2-neil@brown.name Signed-off-by: Christian Brauner commit 390e34bc1490a1ce92714c199c13b6b2c1e63a84 Author: NeilBrown Date: Wed Mar 19 14:01:37 2025 +1100 VFS: change lookup_one_common and lookup_noperm_common to take a qstr These function already take a qstr of course, but they also currently take a name/len was well and fill in the qstr. Now they take a qstr that is already filled in, which is what all the callers have. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-7-neil@brown.name Signed-off-by: Christian Brauner commit 06c567403ae5a0b56005c2d4a184c903f572c844 Author: NeilBrown Date: Wed Mar 19 14:01:36 2025 +1100 Use try_lookup_noperm() instead of d_hash_and_lookup() outside of VFS try_lookup_noperm() and d_hash_and_lookup() are nearly identical. The former does some validation of the name where the latter doesn't. Outside of the VFS that validation is likely valuable, and having only one exported function for this task is certainly a good idea. So make d_hash_and_lookup() local to VFS files and change all other callers to try_lookup_noperm(). Note that the arguments are swapped. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-6-neil@brown.name Signed-off-by: Christian Brauner commit fa6fe07d1536361a227d655e69ca270faf28fdbe Author: NeilBrown Date: Wed Mar 19 14:01:35 2025 +1100 VFS: rename lookup_one_len family to lookup_noperm and remove permission check The lookup_one_len family of functions is (now) only used internally by a filesystem on itself either - in a context where permission checking is irrelevant such as by a virtual filesystem populating itself, or xfs accessing its ORPHANAGE or dquota accessing the quota file; or - in a context where a permission check (MAY_EXEC on the parent) has just been performed such as a network filesystem finding in "silly-rename" file in the same directory. This is also the context after the _parentat() functions where currently lookup_one_qstr_excl() is used. So the permission check is pointless. The name "one_len" is unhelpful in understanding the purpose of these functions and should be changed. Most of the callers pass the len as "strlen()" so using a qstr and QSTR() can simplify the code. This patch renames these functions (include lookup_positive_unlocked() which is part of the family despite the name) to have a name based on "lookup_noperm". They are changed to receive a 'struct qstr' instead of separate name and len. In a few cases the use of QSTR() results in a new call to strlen(). try_lookup_noperm() takes a pointer to a qstr instead of the whole qstr. This is consistent with d_hash_and_lookup() (which is nearly identical) and useful for lookup_noperm_unlocked(). The new lookup_noperm_common() doesn't take a qstr yet. That will be tidied up in a subsequent patch. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-5-neil@brown.name Signed-off-by: Christian Brauner commit e45960c279b098ebc0c2becbd27b3d60732c77ea Author: Mateusz Guzik Date: Tue Apr 8 09:36:41 2025 +0200 fs: unconditionally use atime_needs_update() in pick_link() Vast majority of the time the func returns false. This avoids a branch to determine whether we are in RCU mode. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250408073641.1799151-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 9ed74dfa0822ba58eacaec61fb16bd4feb34a5a6 Merge: 602ae04f56542d 0a02e1f4a54ace Author: Bartosz Golaszewski Date: Tue Apr 8 10:58:07 2025 +0200 Merge tag 'irqdomain-04-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into gpio/for-next Stable tag for the GPIO tree to pull from commit c9b380a0171aa6c05659330483bdabc1aabef173 Merge: 9d36c5145a9e6a 5f3e0b4a1f59ab Author: Christian Brauner Date: Tue Apr 8 10:28:10 2025 +0200 Merge patch series "fs: sort out cosmetic differences between stat funcs and add predicts" Predict fastpaths in stat and during fdput(). * patches from https://lore.kernel.org/20250406235806.1637000-1-mjguzik@gmail.com: fs: predict not having to do anything in fdput() fs: sort out cosmetic differences between stat funcs and add predicts Link: https://lore.kernel.org/20250406235806.1637000-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 5f3e0b4a1f59ab616a09a45fddddefa6ef756229 Author: Mateusz Guzik Date: Mon Apr 7 01:58:05 2025 +0200 fs: predict not having to do anything in fdput() This matches the annotation in fdget(). Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250406235806.1637000-2-mjguzik@gmail.com Signed-off-by: Christian Brauner commit eaec2cd1670d5dde2b2b364699533cdb0452c99a Author: Mateusz Guzik Date: Mon Apr 7 01:58:04 2025 +0200 fs: sort out cosmetic differences between stat funcs and add predicts This is a nop, but I did verify asm improves. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/20250406235806.1637000-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit b6f2c6bd4e9ea47afa2b66c0c64c296a1fbf4489 Author: Lad Prabhakar Date: Sun Mar 9 21:14:02 2025 +0000 clk: renesas: r9a09g057: Add clock and reset entries for GE3D Add PLLGPU along with the necessary clock and reset entries for GE3D. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309211402.80886-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 360387a8f17d2cf7afd894c318df959112f377c7 Author: Lad Prabhakar Date: Sun Mar 9 21:14:01 2025 +0000 clk: renesas: rzv2h: Rename PLL field macros for consistency Rename PLL field extraction macros to include the associated register name (`CPG_PLL_CLK1` or `CPG_PLL_CLK2`) to maintain consistency with other PLL register macros. Update all corresponding macro references accordingly. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309211402.80886-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fea942bc15135e065b456421f7a163df036242c5 Author: Lad Prabhakar Date: Sun Mar 9 21:14:00 2025 +0000 clk: renesas: rzv2h: Add support for enabling PLLs Some RZ/V2H(P) SoC variants do not have a GPU, resulting in PLLGPU being disabled by default in TF-A. Add support for enabling PLL clocks in the RZ/V2H(P) CPG driver to manage this. Introduce `is_enabled` and `enable` callbacks to handle PLL state transitions. With the `enable` callback, PLLGPU will be turned ON only when the GPU node is enabled; otherwise, it will remain off. Define new macros for PLL standby and monitor registers to facilitate this process. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309211402.80886-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 18510fd7bfe66218a07024fb9f2a204e0f623794 Author: Lad Prabhakar Date: Sun Mar 9 21:13:59 2025 +0000 clk: renesas: rzv2h: Remove unused `type` field from `struct pll_clk` Remove the redundant `type` field from `struct pll_clk`, as it is not used in the PLL clock handling logic. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309211402.80886-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 20fc4ea6d7e379cd492a6fd5c060013a9ebdf3db Author: Lad Prabhakar Date: Sun Mar 9 21:13:58 2025 +0000 clk: renesas: rzv2h: Refactor PLL configuration handling Refactor PLL handling by introducing a `struct pll` to encapsulate PLL configuration parameters, ensuring consistency with the existing dynamic divider structure. Introduce the `PLL_PACK()` macro to simplify PLL structure initialization and update the `DEF_PLL()` macro to use the new `pll` structure. Modify relevant clock register functions to utilize the structured PLL data instead of raw configuration values. This refactoring improves code readability, maintainability, and alignment with the existing clock configuration approach. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309211402.80886-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit af7e23c616f523b1c4d1f5f0cd7f9852fa4aa24f Author: Herbert Xu Date: Mon Apr 7 12:57:54 2025 +0800 crypto: ccp - Silence may-be-uninitialized warning in sev_ioctl_do_pdh_export The recent reordering of code in sev_ioctl_do_pdh_export triggered a false-positive may-be-uninitialized warning from gcc: In file included from ../include/linux/sched/task.h:13, from ../include/linux/sched/signal.h:9, from ../include/linux/rcuwait.h:6, from ../include/linux/percpu-rwsem.h:7, from ../include/linux/fs.h:34, from ../include/linux/compat.h:17, from ../arch/x86/include/asm/ia32.h:7, from ../arch/x86/include/asm/elf.h:10, from ../include/linux/elf.h:6, from ../include/linux/module.h:19, from ../drivers/crypto/ccp/sev-dev.c:11: In function ‘copy_to_user’, inlined from ‘sev_ioctl_do_pdh_export’ at ../drivers/crypto/ccp/sev-dev.c:2036:7, inlined from ‘sev_ioctl’ at ../drivers/crypto/ccp/sev-dev.c:2249:9: ../include/linux/uaccess.h:225:16: warning: ‘input_cert_chain_address’ may be used uninitialized [-Wmaybe-uninitialized] 225 | return _copy_to_user(to, from, n); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/crypto/ccp/sev-dev.c: In function ‘sev_ioctl’: ../drivers/crypto/ccp/sev-dev.c:1961:22: note: ‘input_cert_chain_address’ was declared here 1961 | void __user *input_cert_chain_address; | ^~~~~~~~~~~~~~~~~~~~~~~~ Silence it by moving the initialisation of the variables in question prior to the NULL check. Signed-off-by: Herbert Xu Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit bfc68ebefb49a3e99cbcfca5caf26182a814a18d Author: Ovidiu Panait Date: Tue Apr 1 22:23:21 2025 +0300 crypto: sun8i-ce-hash - use API helpers to setup fallback request Rather than setting up the fallback request by hand, use ahash_request_set_callback() and ahash_request_set_crypt() API helpers to properly setup the new request. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 593c76e1aafb550b3ffa697a4369435216f82e4c Author: Ovidiu Panait Date: Tue Apr 1 22:23:20 2025 +0300 crypto: sun8i-ce-hash - add IS_ENABLED() checks to debugfs stats Add IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG) checks before the fallback counter updates to make sure the code is not included when debugfs statistics support is not enabled. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit a8632253f39b5f6c1cf8e1c1da382a4d22e61e57 Author: Ovidiu Panait Date: Tue Apr 1 22:23:19 2025 +0300 crypto: sun8i-ce-hash - drop CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG ifdefs 'struct sun8i_ce_alg_template' is always defined, even with CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG disabled, so the ifdef guards are not needed. Make sure the statistics have IS_ENABLED() checks instead. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit b745ab78a8ca8a7c16f0cdca9d03680b07d2607a Author: Ovidiu Panait Date: Tue Apr 1 22:23:18 2025 +0300 crypto: sun8i-ce-hash - factor out debugfs fallback statistics In order to reduce code duplication, factor out to a separate function the codepath that increments debugfs fallback stats. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit d68c4a7c6cda91c2d97c5588cadc043780d010b6 Author: Ovidiu Panait Date: Tue Apr 1 22:23:17 2025 +0300 crypto: sun8i-ce-hash - remove duplicated fallback checks Remove duplicated fallback checks in sun8i_ce_hash_digest(). The same checks are already done previously in sun8i_ce_hash_need_fallback(). Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit ea4dd134ef332bd9e3e734c1ba0a1521f436b678 Author: Ovidiu Panait Date: Tue Apr 1 22:23:16 2025 +0300 crypto: sun8i-ce-hash - fix error handling in sun8i_ce_hash_run() Rework error handling in sun8i_ce_hash_run() to unmap the dma buffers in case of failure. Currently, the dma unmap functions are not called if the function errors out at various points. Fixes: 56f6d5aee88d1 ("crypto: sun8i-ce - support hash algorithms") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 3f8f0133a5fc9b32d0c308530320c3f2430ba5ab Author: Ashish Kalra Date: Mon Mar 24 21:15:47 2025 +0000 crypto: ccp - Move SEV/SNP Platform initialization to KVM SNP initialization is forced during PSP driver probe purely because SNP can't be initialized if VMs are running. But the only in-tree user of SEV/SNP functionality is KVM, and KVM depends on PSP driver for the same. Forcing SEV/SNP initialization because a hypervisor could be running legacy non-confidential VMs make no sense. This patch removes SEV/SNP initialization from the PSP driver probe time and moves the requirement to initialize SEV/SNP functionality to KVM if it wants to use SEV/SNP. Suggested-by: Sean Christopherson Reviewed-by: Alexey Kardashevskiy Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 6f1d5a3513c2370bbd6115dd430906bc2f4bdc53 Author: Ashish Kalra Date: Mon Mar 24 21:15:31 2025 +0000 KVM: SVM: Add support to initialize SEV/SNP functionality in KVM Move platform initialization of SEV/SNP from CCP driver probe time to KVM module load time so that KVM can do SEV/SNP platform initialization explicitly if it actually wants to use SEV/SNP functionality. Add support for KVM to explicitly call into the CCP driver at load time to initialize SEV/SNP. If required, this behavior can be altered with KVM module parameters to not do SEV/SNP platform initialization at module load time. Additionally, a corresponding SEV/SNP platform shutdown is invoked during KVM module unload time. Continue to support SEV deferred initialization as the user may have the file containing SEV persistent data for SEV INIT_EX available only later after module load/init. Suggested-by: Sean Christopherson Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 9ddc3d6c16ea2587898a315f20f7b8fbd791dc1b Author: Colin Ian King Date: Mon Sep 2 15:07:58 2024 +0100 media: mediatek: vcodec: Remove trailing space after \n newline There is a extraneous space after a newline in a mtk_venc_debug message. Remove it. Signed-off-by: Colin Ian King Reviewed-by: Matthias Brugger Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit ebdcec10b652942651f0ef3cd7602279e85383c9 Author: Colin Ian King Date: Fri Feb 28 08:26:29 2025 +0000 media: amphion: Fix spelling mistake "dismatch" -> "mismatch" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit f270005b99fa19fee9a6b4006e8dee37c10f1944 Author: Jonas Karlman Date: Tue Feb 25 10:40:33 2025 +0100 media: rkvdec: Fix frame size enumeration The VIDIOC_ENUM_FRAMESIZES ioctl should return all frame sizes (i.e. width and height in pixels) that the device supports for the given pixel format. It doesn't make a lot of sense to return the frame-sizes in a stepwise manner, which is used to enforce hardware alignments requirements for CAPTURE buffers, for coded formats. Instead, applications should receive an indication, about the maximum supported frame size for that hardware decoder, via a continuous frame-size enumeration. Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") Suggested-by: Alex Bee Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 774837ed8749fb58a5a4079d0750e151b1ed01a6 Author: Jonas Karlman Date: Tue Feb 25 10:40:29 2025 +0100 media: rkvdec: Add image format concept Add an enum rkvdec_image_fmt used to signal an image format, e.g. 4:2:0 8-bit, 4:2:0 10-bit or any. Tag each supported CAPUTRE format with an image format and use this tag to filter out unsupported CAPTURE formats. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit e3f9e3a6a032f37d43c31f36330d04b609cb7fbd Author: Jonas Karlman Date: Tue Feb 25 10:40:28 2025 +0100 media: rkvdec: Extract decoded format enumeration into helper Add a rkvdec_is_valid_fmt() helper that check if a fourcc is a supported CAPTURE format, and a rkvdec_enum_decoded_fmt() helper that enumerates valid formats. This moves current code into helper functions in preparation for adding CAPTURE format filtering and validation in next patch. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 98a0aa1b6910766a23b5162a1499696837e5d3ca Author: Jonas Karlman Date: Tue Feb 25 10:40:27 2025 +0100 media: rkvdec: Move rkvdec_reset_decoded_fmt helper Move rkvdec_reset_decoded_fmt() and the called rkvdec_reset_fmt() helper functions in preparation for adding a new caller in an upcoming patch. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit c74b78193ffd0a5cfdc7e0c3fa1d128e6c0c42d6 Author: Jonas Karlman Date: Tue Feb 25 10:40:26 2025 +0100 media: rkvdec: Extract rkvdec_fill_decoded_pixfmt into helper Extract call to v4l2_fill_pixfmt_mp() and ajusting of sizeimage into a helper. Replace current code with a call to the new helper. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 137149c63993c235fa37624cac6368f3cb4affc9 Author: Alex Bee Date: Tue Feb 25 10:40:25 2025 +0100 media: rkvdec: h264: Don't hardcode SPS/PPS parameters Some SPS/PPS parameters are currently hardcoded in the driver even though they exist in the stable uapi controls. Use values from SPS/PPS controls instead of hardcoding them. Signed-off-by: Alex Bee [jonas@kwiboo.se: constraint_set_flags condition, commit message] Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit d5e0aa61470c48ddc04d433a00e79cef8716377a Author: Jonas Karlman Date: Tue Feb 25 10:40:24 2025 +0100 media: rkvdec: h264: Use bytesperline and buffer height as virstride Use bytesperline and buffer height to calculate the strides configured. This does not really change anything other than ensuring the bytesperline that is signaled to userspace matches what is configured in HW. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit dcbe2aeda2e09eb69f5feba7e171db2836d9999d Author: Jonas Karlman Date: Tue Feb 25 10:40:23 2025 +0100 media: v4l2: Add NV15 and NV20 pixel formats Add NV15 and NV20 pixel formats used by the Rockchip Video Decoder for 10-bit buffers. NV15 and NV20 is 10-bit 4:2:0/4:2:2 semi-planar YUV formats similar to NV12 and NV16, using 10-bit components with no padding between each component. Instead, a group of 4 luminance/chrominance samples are stored over 5 bytes in little endian order: YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes The '15' and '20' suffix refers to the optimum effective bits per pixel which is achieved when the total number of luminance samples is a multiple of 8 for NV15 and 4 for NV20. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 22f572ce4e7c7fa18f46a445d4270e6d5b5429f2 Author: Jonas Karlman Date: Tue Feb 25 10:40:22 2025 +0100 media: v4l2-common: Add helpers to calculate bytesperline and sizeimage Add helper functions to calculate plane bytesperline and sizeimage, these new helpers consider bpp div, block width and height when calculating plane bytesperline and sizeimage. Signed-off-by: Jonas Karlman Reviewed-by: Nicolas Dufresne Tested-by: Nicolas Dufresne Tested-by: Christopher Obbard Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 9ea16ba6eaf93f25f61855751f71e2e701709ddf Author: Ming Qian Date: Tue Apr 1 17:06:57 2025 +0800 media: amphion: Add a frame flush mode for decoder By default the amphion decoder will pre-parse 3 frames before starting to decode the first frame. Alternatively, a block of flush padding data can be appended to the frame, which will ensure that the decoder can start decoding immediately after parsing the flush padding data, thus potentially reducing decoding latency. This mode was previously only enabled, when the display delay was set to 0. Allow the user to manually toggle the use of that mode via a module parameter called low_latency, which enables the mode without changing the display order. Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b312ac33a593b64f23b0ddba59c429e89c479a54 Author: Ming Qian Date: Tue Apr 1 17:06:56 2025 +0800 media: amphion: Reduce decoding latency for HEVC decoder The amphion decoder firmware supports a low latency flush mode for the HEVC format since v1.9.0. This feature, which is enabled when the display delay is set to 0, can help to reduce the decoding latency by appending some padding data to every frame. Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b9a96a0be905037245d58668c41c3c4b015578b6 Author: Thomas Zimmermann Date: Mon Apr 7 15:47:25 2025 +0200 drm/sysfb: simpledrm: Remove unused helper simpledrm_device_of_dev() After moving most of the mode-setting pipeline into drm_sysfb_helper.c, simpledrm_device_of_dev() is no longer being used. Remove it. Signed-off-by: Thomas Zimmermann Reported-by: Jocelyn Falempe Closes: https://lore.kernel.org/dri-devel/20250407131344.139878-1-jfalempe@redhat.com/ Fixes: 177dfbdb7e67 ("drm/sysfb: Merge primary-plane functions") Reviewed-by: Javier Martinez Canillas Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250407134753.985925-3-tzimmermann@suse.de commit d231cde7c84359fb18fb268cf6cff03b5bce48ff Author: Thomas Zimmermann Date: Mon Apr 7 15:47:24 2025 +0200 drm/simpledrm: Do not upcast in release helpers The res pointer passed to simpledrm_device_release_clocks() and simpledrm_device_release_regulators() points to an instance of struct simpledrm_device. No need to upcast from struct drm_device. The upcast is harmless, as DRM device is the first field in struct simpledrm_device. Signed-off-by: Thomas Zimmermann Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") Cc: # v5.14+ Reviewed-by: Javier Martinez Canillas Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250407134753.985925-2-tzimmermann@suse.de commit 7efb8b92165fea427a03df87e14d519b8acf57f8 Author: William A. Kennington III Date: Fri Apr 4 12:11:44 2025 -0700 ARM: dts: nuvoton: Add MMC Nodes We have the driver support code, now we just need to expose the device node which can export the SDHCI and SDMMC properties for the 2 MMC controllers in the npcm7xx. Tested on real hardware to verify that the MMC controller is functional with filesystem access. Signed-off-by: William A. Kennington III Link: https://patch.msgid.link/20250404191144.4111788-1-william@wkennington.com Signed-off-by: Andrew Jeffery commit 41a6d0e4c60933b7f98ebbe6e8d5debf92ad231f Author: William A. Kennington III Date: Tue Apr 1 16:34:09 2025 -0700 ARM: dts: nuvoton: Add OHCI node The EHCI peripheral already exists in the devicetree, but the hardware also supports a discrete OHCI unit on the same USB PHY. Generic OHCI works fine for this device already and has been tested on real hardware. Signed-off-by: William A. Kennington III Link: https://patch.msgid.link/20250401233409.3215091-1-william@wkennington.com Signed-off-by: Andrew Jeffery commit 366c846abf17214241100e0f9e8d6a046e6c913c Author: William A. Kennington III Date: Tue Apr 1 16:56:30 2025 -0700 ARM: dts: nuvoton: Add UDC nodes The driver support was already added but we are missing the nodes in our common devicetree. Signed-off-by: William A. Kennington III Link: https://patch.msgid.link/20250401235630.3220150-1-william@wkennington.com Signed-off-by: Andrew Jeffery commit f0538cc6770d7eb65d8531995445b183292ffc84 Author: William A. Kennington III Date: Tue Apr 1 16:10:01 2025 -0700 ARM: dts: nuvoton: Add EDAC node We have the driver support code, now we just need to expose the device node which can export the EDAC properties for the system memory controller. Tested on real hardware to verify that error counters show up. Signed-off-by: William A. Kennington III Link: https://patch.msgid.link/20250401231001.3202669-1-william@wkennington.com [arj: Add another colon to patch subject] Signed-off-by: Andrew Jeffery commit dd465b5c3cf1d3037350280a940126afc57c1c37 Author: Krzysztof Kozlowski Date: Thu Jan 16 10:00:47 2025 +0100 ARM: dts: nuvoton: Align GPIO hog name with bindings Bindings expect GPIO hog names to end with 'hog' suffix, so correct it to fix dtbs_check warnings like: nuvoton-npcm750-runbmc-olympus.dtb: G1A_P0_0: $nodename:0: 'G1A_P0_0' does not match '^.+-hog(-[0-9]+)?$' Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250116090047.87499-1-krzysztof.kozlowski@linaro.org Signed-off-by: Andrew Jeffery commit 4c035fab9f42071c4024495afb2cec1409280eed Author: Chen Ni Date: Mon Apr 7 14:27:25 2025 +0800 ASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250407062725.2771916-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 03affa51cc995ac0d961990c2ca916fc87340723 Author: Chen Ni Date: Mon Apr 7 14:34:03 2025 +0800 ASoC: wm_adsp: Remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Reviewed-by: Charles Keepax Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20250407063403.2772040-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 4423753a0275c93e381b309b941b4e55a71154c4 Author: Chen Ni Date: Mon Apr 7 14:23:52 2025 +0800 ASoC: pcm6240: Remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250407062352.2771861-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 348679ffe7f30f6eb05013bc485fd295d9f5441c Author: Chen Ni Date: Mon Apr 7 14:30:11 2025 +0800 ASoC: tas2781-fmwlib: Remove unnecessary NULL check before release_firmware() release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250407063011.2771977-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 82d8d3360c16687aad3bac617601f98ae9c35147 Author: Peng Fan Date: Sun Apr 6 09:05:23 2025 +0800 ASoC: codec: ak5386: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor. - Use gpiod_set_value to configure output value. With legacy of_gpio API, the driver set GPIO value 1 to power up AK5386, and set value 0 to power down. Per datasheet for PDN(reset_gpio in the driver): Power Down & Reset Mode Pin “H”: Power up, “L”: Power down & Reset The AK5386 must be reset once upon power-up. There is no in-tree DTS using this codec, and the bindings does not specify polarity. Per driver and datasheet, the GPIO polarity should be active-high which is to power up the codec. So using GPIOD_OUT_LOW when get the GPIO descriptor matches GPIOF_OUT_INIT_LOW when using of_gpio API. Signed-off-by: Peng Fan Reviewed-by: Bartosz Golaszewski Link: https://patch.msgid.link/20250406010532.1212894-1-peng.fan@oss.nxp.com Signed-off-by: Mark Brown commit 86888c7bd117c29eab169c37e5f6bbbf583da983 Author: Waiman Long Date: Mon Apr 7 17:21:05 2025 -0400 cgroup/cpuset: Add warnings to catch inconsistency in exclusive CPUs Add WARN_ON_ONCE() statements whenever new exclusive CPUs are being added to a partition root to catch inconsistency in the way exclusive CPUs are being handled in the cpuset code. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 6e6f9170dc6a4660f7a90d67122a08ca919b5f53 Author: Waiman Long Date: Mon Apr 7 17:21:04 2025 -0400 cgroup/cpuset: Fix obsolete comment in cpuset_css_offline() Move the partition disablement comment from cpuset_css_offline() to cpuset_css_killed() and reword it to remove the remnant of sched.partition. Suggested-by: Michal Koutný Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 7a0aabd9ce697fc581ec691b21f748050fbcf004 Author: Waiman Long Date: Mon Apr 7 17:21:03 2025 -0400 cgroup/cpuset: Always use cpu_active_mask The current cpuset code uses both cpu_active_mask and cpu_online_mask and it can be confusing which one should be used if we need to update the code. The top_cpuset is always synchronized to cpu_active_mask and we should avoid using cpu_online_mask as much as possible. An active CPU is always an online CPU, but not vice versa. cpu_active_mask and cpu_online_mask can differ during hotplug operations. A CPU is marked active at the last stage of CPU bringup (CPUHP_AP_ACTIVE). It is also the stage where cpuset hotplug code will be called to update the sched domains so that the scheduler can move a normal task to a newly active CPU or remove tasks away from a newly inactivated CPU. The online bit is set much earlier in the CPU bringup process and cleared much later in CPU teardown. If cpu_online_mask is used while a hotunplug operation is happening in parallel, we may leave an offline CPU in cpu_allowed or have a higher chance of leaving an offline CPU in some other masks. Avoid this problem by always using cpu_active_mask in the cpuset code and leave a comment as to why the use of cpu_online_mask is discouraged. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit fd4948494dc934ea017bae942ab68d875fcc2ac9 Author: Alex Deucher Date: Thu Mar 20 11:39:20 2025 -0400 drm/amdgpu/gfx9.4.3: dump full CP packet header FIFOs In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit a267d1686c09690cad24704c8d83dfe31fbc8553 Author: Alex Deucher Date: Thu Mar 13 13:29:36 2025 -0400 drm/amdgpu/gfx9: dump full CP packet header FIFOs In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 9f7ce6a9ab95ed0c3a9aacdde219bb02d127cdfc Author: Ruili Ji Date: Mon Mar 24 01:08:50 2025 -0400 drm/amd/pm: implement dpm vcn reset function Implement VCN engine reset by sending MSG_ResetVCN on smu 13.0.6. v2: fix format for code and message Reviewed-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Ruili Ji Signed-off-by: Alex Deucher commit dd035239c96ea8dfa4e19513e8f0952a93dd41bf Author: Taimur Hassan Date: Mon Mar 31 10:13:01 2025 -0500 drm/amd/display: Promote DC to 3.2.328 Summary: * Optimize custom brightness curve * Correct SSC enable detection for DCN351 * Turn off eDP lcdvdd and backlight if not required * Use DMUB Fused IO interface for HDCP * Extend eDP-on-DP1 quirk list Reviewed-by: Zaeem Mohamed Signed-off-by: Taimur Hassan Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e3895e8a872ce2da7e504be24aa6cfff351562dc Author: Sherry Wang Date: Fri Mar 28 13:33:12 2025 +0800 drm/amd/display: rename IPS2 entry/exit message [Why&How] Fix the confusing entry/exit message name for IPS2 Reviewed-by: Duncan Ma Signed-off-by: Sherry Wang Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8581214d5e5505a061d0697c405ca263a8a5cd45 Author: Taimur Hassan Date: Sun Mar 30 15:12:35 2025 -0400 drm/amd/display: [FW Promotion] Release 0.1.5.0 Aligning dmub_cmd header with dmu firmware release 0.1.5.0 Signed-off-by: Taimur Hassan Signed-off-by: Roman Li Reviewed-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0d93e821867c2a6edcd15317311dcb99f7a16887 Author: Charlene Liu Date: Wed Mar 26 17:11:35 2025 +0800 drm/amd/display: turn off eDP lcdvdd and backlight if not required [why] A+N configuration, eDP on A-APU is off, extended display active. Resume from s4, eDP's backlight is still on. [how] Turn off inactive eDP backlight and lcdvdd. Reviewed-by: Charlene Liu Reviewed-by: Aric Cyr Signed-off-by: Charlene Liu Signed-off-by: Jing Zhou Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 32be4e39f459f3ac9c191569ae8e3731cb82f7ab Author: Ausef Yousof Date: Fri Mar 28 11:06:50 2025 -0400 drm/amd/display: dont disable dtb as dto src during dpms off fix was previously in 25.20 but was reverted out as it was accompanied by other changes that caused regression. [why&how] Disabling dtb as the dto src during dpms off relies on in the same instance being able to also alter the dto src bit to dpref (or not dtb in general), but this was recently changed to only take place in dcn31_program_pix_clk, as that is where we want to perform any dto src changes because tg is off at that point, it is unsafe to do that elsewhere. What this means is now instead of disabling dtb as dto src and modifying source bit, we are left with the configuration for a given tg that specifies dtb as dto src and dtb dto en simultaneously is unset. dcn31_program_pix_clk can rectify this but its possible for us to perform some tg dependant operation that would simply hang because when we go to enable say crtc then, the clk we specify as dto src is "off" en bit is cleared, source bit was never changed, and program_pix_clk hasnt been called yet (as apart of dpms on) We cant disable it as dto src during dpms off if we want the luxury of performing tg dependant operation during dpms off and before dpms on. Reviewed-by: Yihan Zhu Signed-off-by: Ausef Yousof Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 556db637c27a463cd6bafa40714ea1245414456a Author: Ausef Yousof Date: Fri Mar 28 11:06:27 2025 -0400 drm/amd/display: wait for updates to latch before locking [why&how] It is possible for an update to acquire otg lock and begin programming while the previous update has not completed and its values have not latched. The correct way to go about this is to wait until the vupdate pulses so we can be sure that previous updates have latched and we can continue with the current update pipe programming, otherwise during consecutive full updates we will have corruption flash on the screen. The corruption flash occurs specifically on configs that require odm combine, and its local to a specific pipe (will not flash across whole screen). This ticket is across the otg slave, but it may also appear across master. Reviewed-by: Leo Chen Signed-off-by: Ausef Yousof Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 33056a97ae5e1ff37535d70cbe5dcf1bbc70f20d Author: Mario Limonciello Date: Wed Dec 4 14:27:42 2024 -0600 drm/amd/display: Remove double checks for `debug.enable_mem_low_power.bits.cm` [Why] A variety of the 3DLUT handling functions check `debug.enable_mem_low_power.bits.cm` both in the caller and function. This is unnecessary overhead. [How] For each of them reduce to just checking just in caller or function. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4321742c394ec369c93dd8860eb420165027d8f5 Author: Mario Limonciello Date: Wed Mar 26 16:01:54 2025 -0500 drm/amd/display: Move PSR support message into amdgpu_dm [Why] PSR support could vary from the panels connected to one GPU versus another. [How] Move PSR support message into amdgpu_dm which has the scope of the GPU and use that information. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ef62b92b9d6290cf9bd09699723e6d18dda9a582 Author: Mario Limonciello Date: Wed Mar 26 15:33:03 2025 -0500 drm/amd/display: Adjust all dev_*() messages to drm_*() [Why] dev_*() messages don't show that they are from a driver in drm subsystem. [How] Change all dev_*() messages to drm_*() messages. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ce801e5d6c1bac228bf10f75e8bede4285c58282 Author: Dominik Kaszewski Date: Thu Mar 27 20:39:51 2025 +0100 drm/amd/display: HDCP Locality check using DMUB Fused IO [Why] HDCP locality check has strict timing requirements, currently broken due to reliance on msleep which does not guarantee accuracy. The PR moves the write-poll-read sequence into DMUB using new generic Fused IO interface, where the timing accuracy is greatly improved. New flow is enabled using DCN resource capability bit (none for now), or using a debug flag. [How] * Extended mod_hdcp_config with new function for requesting DMUB to execute a sequence of fused I2C/AUX commands and synchronously wait until an outbox reply arrives or a timeout expires. * If the timeout expires, send an abort to DMUB. * Update HDCP to use the DMUB for locality check if supported. * Add DC_HDCP_LC_FORCE_FW_ENABLE and DC_HDCP_LC_ENABLE_SW_FALLBACK. * Make the first enable new flow regardless of resource capabilities. * Make the second enable fallback to old SW flow. * Clean up makefile source file listings for easier updates. Reviewed-by: Alvin Lee Signed-off-by: Dominik Kaszewski Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d01a7306e1bec9c02268793f58144e3e42695bf0 Author: Kevin Gao Date: Wed Mar 26 14:14:05 2025 -0400 drm/amd/display: Correct SSC enable detection for DCN351 [Why] Due to very small clock register delta between DCN35 and DCN351, clock spread is being checked on the wrong register for DCN351, causing the display driver to believe that DPREFCLK downspread to be disabled when in some stacks it is enabled. This causes the clock values for audio to be incorrect. [How] Both DCN351 and DCN35 use the same clk_mgr, so we modify the DCN35 function that checks for SSC enable to read CLK6 instead of CLK5 when using DCN351. This allows us to read for DPREFCLK downspread correctly so the clock can properly compensate when setting values. Reviewed-by: Charlene Liu Signed-off-by: Kevin Gao Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 03b979e1025fba1d47cae005022fcdbba140f043 Author: Mario Limonciello Date: Mon Mar 24 12:57:25 2025 -0500 drm/amd/display: Optimize custom brightness curve [Why] When BIOS includes a lot of custom brightness data points, walking the entire list can be time consuming. This is most noticed when dragging a power slider. The "higher" values are "slower" to drag around. [How] Move custom brightness calculation loop into a static function. Before starting the loop check the "half way" data point to see how it compares to the input. If greater than the half way data point use that as the starting point instead. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f9fbc338811c8d123f0c05cd699ffa3ae7f08d34 Author: Victor Skvortsov Date: Sun Mar 30 13:54:06 2025 -0500 drm/amdgpu: Fix CPER error handling on VFs CPER read will loop infinitely if an error is encountered and the more bit is set. Add error checks to break upon failure. v2: added function pointer checks Suggested-by: Tony Yi Signed-off-by: Victor Skvortsov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1e1981b16bb1bbe2fafa57ed439b45cb5b34e32d Author: Lucas De Marchi Date: Wed Apr 2 22:38:05 2025 -0700 drm/xe: Fix taking invalid lock on wedge If device wedges on e.g. GuC upload, the submission is not yet enabled and the state is not even initialized. Protect the wedge call so it does nothing in this case. It fixes the following splat: [] xe 0000:bf:00.0: [drm] device wedged, needs recovery [] ------------[ cut here ]------------ [] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [] WARNING: CPU: 48 PID: 312 at kernel/locking/mutex.c:564 __mutex_lock+0x8a1/0xe60 ... [] RIP: 0010:__mutex_lock+0x8a1/0xe60 [] mutex_lock_nested+0x1b/0x30 [] xe_guc_submit_wedge+0x80/0x2b0 [xe] Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20250402-warn-after-wedge-v1-1-93e971511fa5@intel.com Signed-off-by: Lucas De Marchi commit 16b19bfd80402bb98135c4b65344e859883766ec Merge: b3d9e96c96b007 ce2eadc6f99263 Author: Mark Brown Date: Mon Apr 7 22:18:08 2025 +0100 regulator: s5m8767: Convert to GPIO descriptors Merge series from From git@z Thu Jan 1 00:00:00 1970 Peng Fan : Update the driver to fetch buck_gpio and buck_ds as GPIO descriptors. Then drop the usage of 'of_gpio.h' which should be deprecated. Based on commit 84618d5e31cf ("regulator: max8997: Convert to GPIO descriptors") as a reference to make the changes. With the quirk fix for s5m8767 in of_gpio_try_fixup_polarity, the polarity will be active-high, even if exynos5250 spring DTS wrongly use active-low polarity. So using GPIO descriptors, it should work as before. commit 68218fa0862aaa8fcc5f968663efc781eb4c91df Author: Jeff Johnson Date: Mon Apr 7 11:28:26 2025 -0700 wifi: ath12k: Fix misspelling "upto" in dp.c ath12k-check is flagging: drivers/net/wireless/ath/ath12k/dp.c:1656: 'upto' may be misspelled - perhaps 'up to'? Replace "upto" with "up to" and split the comment line so that it doesn't exceed 80 columns. Link: https://patch.msgid.link/20250407-upto-v1-1-23ca65f2ccdf@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 7bb430f087e1dd50ac870e787f850e19eb1c2be6 Author: Dominik Kaszewski Date: Wed Mar 19 12:12:43 2025 +0100 drm/amdgpu: Fix typo in DC_DEBUG_MASK kernel-doc Add missing colon in kernel-doc for DC_DEBUG_MASK enum. Signed-off-by: Dominik Kaszewski Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 89dab189a20e8ab653b37059536f2d5d73666a9e Author: Sunil Khatri Date: Thu Apr 3 12:57:09 2025 +0530 drm/amdgpu: Fix the comment to avoid warning Fix the below comment warning drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:541: warning: Function parameter or struct member 'adev' not described in 'amdgpu_sdma_register_on_reset_callbacks' Signed-off-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6dee64e765c4c80d128817f519292e249f53a769 Author: Lijo Lazar Date: Thu Mar 27 09:34:15 2025 +0530 drm/amdgpu: Fix xgmi v6.4.1 link status reporting Use the right register offsets for getting link status. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit d53a64e9ee58c3567955db6147d34f00c90065ed Author: Andrey Vatoropin Date: Wed Apr 2 14:21:39 2025 +0000 drm/amd/display: Remove the redundant NULL check Static analysis shows that pointer "timing" cannot be NULL because it points to the object "struct dc_crtc_timing". Remove the extra NULL check. It is meaningless and harms the readability of the code. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reviewed-by: Alex Hung Signed-off-by: Andrey Vatoropin Signed-off-by: Alex Deucher commit 5df0d6addb7e9b6f71f7162d1253762a5be9138e Author: Lijo Lazar Date: Wed Mar 26 13:28:38 2025 +0530 drm/amdgpu: Add basic validation for RAS header If RAS header read from EEPROM is corrupted, it could result in trying to allocate huge memory for reading the records. Add some validation to header fields. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit daafa303d19f5522e4c24fbf5c1c981a16df2c2f Author: Apurv Mishra Date: Mon Mar 17 14:00:38 2025 -0400 drm/amdkfd: Drop workaround for GC v9.4.3 revID 0 Remove workaround code for the early engineering samples GC v9.4.3 SOCs with revID 0 Reviewed-by: Amber Lin Signed-off-by: Apurv Mishra Signed-off-by: Alex Deucher commit ca690c7e211d2c044056ac2b878a22f8c6601820 Author: James Flowers Date: Thu Mar 27 20:29:02 2025 -0700 drm/amd/display: removed unused function Removed unused function mpc401_get_3dlut_fast_load_status. Signed-off-by: James Flowers Signed-off-by: Alex Deucher commit 060708d1fa2887a7140c4a9a3c719228e50dab7c Author: Alexandre Demers Date: Fri Mar 28 01:10:18 2025 -0400 drm/amdgpu: huge sid.h cleanup, drop substituted defines. Now that we are using the proper defines, cleanup useless old "substituted" defines. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit d3cd9565c6269c39cf812eaed25071e537c1eb5d Author: Alexandre Demers Date: Fri Mar 28 01:10:17 2025 -0400 drm/amdgpu: move si.c away from sid.h Replace defines by the ones added earlier to GFX6, SMU6 and DCE6 Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 4445c9dfa9547be58c80dccd3d08b1d31643a5c1 Author: Alexandre Demers Date: Fri Mar 28 01:10:16 2025 -0400 drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h Replace defines for the ones under smu_6_0_d.h and smu_6_0_sh_mask.h Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit e66c07864e53253ba15c983f89ba68333b2bab22 Author: Boyuan Zhang Date: Fri Mar 28 13:43:53 2025 -0400 drm/amdgpu: enable FW workaround for VCN 4_0_5 Enabling VCN FW workaround for drm key injection through shared memory for vcn 4_0_5 Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 0c6e39ce6da20104900b11bad64464a12fb47320 Author: Victor Skvortsov Date: Thu Mar 27 11:38:42 2025 -0400 drm/amdgpu: Add indirect L1_TLB_CNTL reg programming for VFs VFs on some IP versions are unable to access this register directly. This register must be programmed before PSP ring is setup, so use PSP VF mailbox directly. PSP will broadcast the register value to all VF assigned instances. Signed-off-by: Victor Skvortsov Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 4aa8de3d03124db71f24a9bd01198407294456fa Author: Prike Liang Date: Fri Dec 13 17:10:35 2024 +0800 drm/amdgpu/gfx12: Implement the gfx12 kgq pipe reset Implement the GFX12 kgq pipe reset, and temporarily disable the GFX12 pipe reset until the CPFW fully support it. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 340f1d9fcd6218e7c9a9506a37beaddb29f01b73 Author: Alexandre Demers Date: Fri Mar 28 01:10:15 2025 -0400 drm/amdgpu: add missing SMU6 defines, shifts and masks They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 820116a39f96bdc7d426c33a804b52f53700a919 Author: Charles Han Date: Thu Mar 27 12:04:35 2025 +0800 drm/amd/pp: Fix potential NULL pointer dereference in atomctrl_initialize_mc_reg_table The function atomctrl_initialize_mc_reg_table() and atomctrl_initialize_mc_reg_table_v2_2() does not check the return value of smu_atom_get_data_table(). If smu_atom_get_data_table() fails to retrieve vram_info, it returns NULL which is later dereferenced. Fixes: b3892e2bb519 ("drm/amd/pp: Use atombios api directly in powerplay (v2)") Fixes: 5f92b48cf62c ("drm/amd/pm: add mc register table initialization") Signed-off-by: Charles Han Signed-off-by: Alex Deucher commit d69248cf4c91949a7b83b3fd77c7c229336bb23c Author: Prike Liang Date: Fri Feb 21 20:14:31 2025 +0800 drm/amdgpu/gfx11: Implement the GFX11 KCQ pipe reset Implement the GFX11 compute pipe reset. As the GFX11 CPFW still hasn't fully supported pipe reset yet, therefore disable the KCQ pipe reset temporarily. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit dcc8e148e013f0d6b0a715e0aa05f033ca7945e9 Author: Prike Liang Date: Wed Jul 17 14:58:00 2024 +0800 drm/amdgpu/gfx11: Implement the GFX11 KGQ pipe reset Implement the kernel graphics queue pipe reset,and the driver will fallback to pipe reset when the queue reset fails. However, the ME FW hasn't fully supported pipe reset yet so disable the KGQ pipe reset temporarily. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b5af7525ae0cb9b5d0a5dcb7d2e141ebe1462bdd Author: Aric Cyr Date: Mon Mar 24 00:40:16 2025 -0500 drm/amd/display: Promote DAL to 3.2.327 Summary: * Improve vrr for replay and psr * Rewrite drm debug message * Fix clock issues for dcn32 and dcn401 * Fix mst dsc mode validation issue Reviewed-by: Aurabindo Pillai Signed-off-by: Aric Cyr Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e8cc149ed906a371a5962ff8065393bae28165c9 Author: Dillon Varone Date: Wed Mar 19 13:54:44 2025 -0400 drm/amd/display: Fix Vertical Interrupt definitions for dcn32, dcn401 [WHY&HOW] - VUPDATE_NO_LOCK should be used in place of VUPDATE always - Add VERTICAL_INTERRUPT1 and VERTICAL_INTERRUPT2 definitions Reviewed-by: Aric Cyr Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0fc9635a801f6ba3a03ad2de6d46f4f3e2fdfed6 Author: Dillon Varone Date: Fri Mar 28 12:56:39 2025 -0400 Revert "drm/amd/display: Fix VUpdate offset calculations for dcn401" This reverts commit fe45e2af4a22e569b35b7f45eb9f040f6fbef94f. Reason for revert: it causes stuttering in some usecases. Reviewed-by: Aric Cyr Signed-off-by: Dillon Varone Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fe45e2af4a22e569b35b7f45eb9f040f6fbef94f Author: Dillon Varone Date: Wed Mar 19 13:53:25 2025 -0400 drm/amd/display: Fix VUpdate offset calculations for dcn401 [WHY&HOW] DCN401 uses a different structure to store the VStartup offset used to calculate the VUpdate position, so adjust the calculations to use this value. Reviewed-by: Aric Cyr Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 146a4429b5674b7520a96aea34233949731c6086 Author: Fangzhi Zuo Date: Thu Mar 20 13:58:24 2025 -0400 drm/amd/display: Do Not Consider DSC if Valid Config Not Found [why] In the mode validation, mst dsc is considered for bw calculation after common dsc config is determined. Currently it considered common dsc config is found if max and min target bpp are non zero which is not accurate. Invalid max and min target bpp values would not get max_kbps and min_kbps calculated, leading to falsefully pass a mode that does not have valid dsc parameters available. [how] Use the return value of decide_dsc_bandwidth_range() to determine whether valid dsc common config is found or not. Prune out modes that do not have valid common dsc config determined. Reviewed-by: Wayne Lin Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a3b7dc4a1ec4e184f48c2f8205d2ec88d31310fe Author: Dillon Varone Date: Wed Mar 19 12:45:13 2025 -0400 drm/amd/display: Add Support for reg inbox0 for host->DMUB CMDs [WHY] DCN4+ supports a new register based mailbox for sending messages from host to DMCUB. This mailbox supports 64 byte commands, which makes it compatible with the same structure as the frame buffer based mailbox. [HOW] The intention for reg_inbox0 is to be slot in replacement for the frame buffer based mailbox (Inbox1). It supports all of the required features: - Supports all messages handled by FB Inbox1 - Supports multi command batching Reviewed-by: Nicholas Kazlauskas Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4b884e3f03d64934e61eea87b6c1db613a8ff190 Author: ChunTao Tso Date: Tue Oct 22 14:54:50 2024 +0800 drm/amd/display: Add a Panel Replay config option [Why] Replay need special policy for the scenario Teams, add a flag to imply apply special policy or not. [How] Add a config option intended for future use for video conferencing applications. Reviewed-by: Aric Cyr Signed-off-by: ChunTao Tso Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 16e24a95fbfcae70be71b3150f2def4847ac0a51 Author: Aurabindo Pillai Date: Tue Mar 18 17:25:16 2025 -0400 drm/amd/display: use drm_warn instead of DRM_WARN drm_warn prints the drm device instance which is helpful when debugging multi gpu issues Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 50d6714b242e1c0a6918a211a45e0f7cfbd7c5bb Author: Aurabindo Pillai Date: Tue Mar 18 17:05:50 2025 -0400 drm/amd/display: use drm_info instead of DRM_INFO drm_info prints the drm device instance which is helpful when debugging multi gpu issues Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3b258b6f521b38250e2b8cf0c80a026dd0e385c6 Author: Dillon Varone Date: Thu Mar 13 15:24:59 2025 -0400 drm/amd/display: Consider downspread against max clocks in DML2.1 [WHY&HOW] Core should evaluate support based on the max clocks after considering downspread. Reviewed-by: Austin Zheng Signed-off-by: Dillon Varone Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7a2911b7f478f9b2ef921a5eb09f2a3a8975d9a2 Author: Robin Chen Date: Tue Mar 18 09:14:47 2025 +0800 drm/amd/display: Enable Replay Low Hz feature flag Enable replay low refresh rate support. Reviewed-by: ChunTao Tso Signed-off-by: Robin Chen Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7b9f8698796f44ac2b551d485a8e5e9aaa761812 Author: Joshua Aberback Date: Fri Mar 14 18:33:43 2025 -0400 drm/amd/display: Use meaningful size for block_sequence array [Why] This array was initially defined as size 50. There were array overflow issues so the size was increased to 100. To ensure such issues are avoided in the future, the size should be set based on the possible contents instead of an arbitrary value. [How] - upper bound, assume every update occurs on max number of pipes - define array sizes for function parameters, for static analysis Reviewed-by: Dillon Varone Signed-off-by: Joshua Aberback Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 40b85a9066f16b5d4abe3f9ea1750d46de0a4fd6 Author: Austin Zheng Date: Mon Mar 17 13:29:47 2025 -0400 drm/amd/display: Set ODM Factor Based On DML Architecture [Why] Mapping of ODM enum is different for DML2.0 vs DML2.1. Configs using DML2.1 will incorrectly trigger an assert meant for DML2.0. [How] Use if/else to seperate logic between DML2.0 and DML2.1. Reviewed-by: Aurabindo Pillai Signed-off-by: Austin Zheng Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 880ab14a4acace958eaaf780231ca3f60454f718 Author: Aurabindo Pillai Date: Tue Mar 11 15:34:53 2025 -0400 drm/amd/display: convert more DRM_ERROR to drm_err prefer drm_err instead of DRM_ERROR since the former prints the associated DRM device, which is helpful when debugging multi-gpu use cases. Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 769e07136a298afe96372e55ded61f5e3fdd6bab Author: Aurabindo Pillai Date: Tue Mar 11 15:55:55 2025 -0400 drm/amd/display: use drm_err in create_validate_stream_for_sink() make the drm device available in create_validate_stream_for_sink() so that drm_err() can be used Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 93717be16e99ca4e424e2d2f636b8763777f7472 Author: Aurabindo Pillai Date: Tue Mar 11 15:51:03 2025 -0400 drm/amd/display: use drm_err in hpd rx offload add amdgpu_device pointer to data associated with the work struct such that hpd handlers has access to the drm device for use with drm_err() Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0f774fce4499d30378372862b22490673ca5821d Author: Aurabindo Pillai Date: Tue Mar 11 15:43:07 2025 -0400 drm/amd/display: convert DRM_ERROR to drm_err in hpd_rx_irq_create_workqueue() pass in a pointer to amdgpu_device directly to the function. Reviewed-by: Alex Hung Signed-off-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7ac66f9355457e16ea5876cd9192b680f474b316 Author: Asad Kamal Date: Mon Mar 17 15:03:46 2025 +0800 drm/amd/pm: Use gpu_metrics_v1_8 for smu_v13_0_12 Use gpu_metrics_v1_8 for smu_v13_0_12 to fill metrics data Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 084769f493a60ac909ad8e9cbcc14122d9c28484 Author: Asad Kamal Date: Mon Mar 17 14:55:38 2025 +0800 drm/amd/pm: Use gpu_metrics_v1_8 for smu_v13_0_6 Use gpu_metrics_v1_8 for smu_v13_0_6 to fill metrics data v2: Move exposing caps to separate patch, move smu_v13.0.12 gpu metrics 1.8 usage to separate patch (Lijo) Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 1189c4fb6f4ca6b1af83573843451443496ffe3c Author: Asad Kamal Date: Mon Mar 17 14:37:37 2025 +0800 drm/amd/pm: Expose smu_v13_0_6 caps Expose smu_v13_0_6 caps by moving it to common header Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit aa52eb6d1672cd75507d235a9f6e1b93fb5d3bb4 Author: Charles Han Date: Thu Feb 13 15:08:37 2025 +0800 Documentation: Remove repeated word in docs Remove the repeated word "the" in docs. Signed-off-by: Charles Han Signed-off-by: Alex Deucher commit 74f0ff369f8a4f44082a71049a15d7da2e73ff7c Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:47 2025 -0600 Documentation/gpu: Add an intro about MES MES is an important firmware that lacks some essential documentation. This commit introduces an overview of it and how it works. Reviewed-by: Bagas Sanjaya Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e7aaa5fbf4fc1aa9c348075aab9bf054727f025f Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:46 2025 -0600 Documentation/gpu: Create a GC entry in the amdgpu documentation GC is a large block that plays a vital role for amdgpu; for this reason, this commit creates one specific page for GC and adds extra information about the CP component. Acked-by: Christian König Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4ede6d20047ae13855a49969b48c438d1a2ac054 Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:45 2025 -0600 Documentation/gpu: Add explanation about AMD Pipes and Queues Pipes and Queues are two common vocabulary that pervades discussions around amdgpu core features. The definition and explanation of those components are spread around multiple places in the code, mailing list, and Gitlab, which sometimes leads to the wrong interpretation of these concepts. This commit attempts to centralize the definition and explanation of Pipe and Queue from amdgpu perspective in a kernel doc. Most of the information in this doc was derived from: - https://lore.kernel.org/amd-gfx/CADnq5_Pcz2x4aJzKbVrN3jsZhD6sTydtDw=6PaN4O3m4t+Grtg@mail.gmail.com/T/#m9a670b55ab20e0f7c46c80f802a0a4be255a719d - https://gitlab.freedesktop.org/mesa/mesa/-/issues/11759 Reviewed-by: Christian König Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c6a1c23d1041f7a5f8f259face14212c6ce4f1a8 Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:44 2025 -0600 Documentation/gpu: Create a documentation entry just for hardware info The APU and dGPU tables are hidden in the driver misc info, which makes it hard to find specific hardware info when users need it. This commit creates a single page for this information and adds it to the top of the amdgpu list to improve searchability. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5acd17d6d14ec1112a6427e7c02569cba6c46f2d Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:43 2025 -0600 Documentation/gpu: Change index order to show driver core first Since driver-core has an overview of the AMD GPU hardware structure, it makes more sense to keep it first. This commit move driver-core up in the index list. Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8f1366fcb84677293d070e31843a87c41ab8f93f Author: Rodrigo Siqueira Date: Tue Mar 25 11:18:42 2025 -0600 Documentation/gpu: Add new acronyms This commit introduces some new acronyms extracted from the source code and found on some web pages around the internet (most of them came from ArchLinux, Gentoo, and Wikipedia links). Reviewed-by: Christian König Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a9a8bccaa3ba64d509cf7df387cf0b5e1cd06499 Author: Alex Deucher Date: Wed Mar 19 11:58:19 2025 -0400 drm/amdgpu/gfx11: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 683308af030cd9b8d3f1de5cbc1ee51788878feb Author: Alex Deucher Date: Wed Mar 19 11:58:03 2025 -0400 drm/amdgpu/gfx10: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a4a4c0ae6742ec7d6bf1548d2c6828de440814a0 Author: Alex Deucher Date: Wed Mar 19 11:57:49 2025 -0400 drm/amdgpu/gfx9: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c8b8d7a4f1c5cdfbd61d75302fb3e3cdefb1a7ab Author: Alex Deucher Date: Wed Mar 19 11:57:34 2025 -0400 drm/amdgpu/gfx8: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit be7652c23d833d1ab2c67b16e173b1a4e69d1ae6 Author: Alex Deucher Date: Wed Mar 19 11:57:19 2025 -0400 drm/amdgpu/gfx7: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8307ebc15c1ea98a8a0b7837af1faa6c01514577 Author: Alex Deucher Date: Wed Mar 19 11:56:02 2025 -0400 drm/amdgpu/gfx6: fix CSIB handling We shouldn't return after the last section. We need to update the rest of the CSIB. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9cffd67e803a081ce548488161c69f2cddb97fe7 Author: Alex Deucher Date: Thu Mar 20 14:24:47 2025 -0400 drm/amdgpu/gfx: assign the actual me0 queues per pipe Set the actual number of queues per pipe for ME0 (gfx). This way we will dump all of the queues properly in dev core dumps. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 8f970c46b56235a3965e0965fa3fd60e7567fecc Author: Alex Deucher Date: Thu Mar 20 14:10:17 2025 -0400 drm/amdgpu/gfx: decouple the number of kgqs from the hw The driver currently sets up one kgq per pipe. As such adev->gfx.me.num_queue_per_pipe is hardcoded to 1 everywhere. This is fine for kernel queues, but when we enable user queues we need to know that actual number of queues per pipe. Decouple the kgq setup from the actual hardware count. For dev core dumps and user queues, we want to know the actual number of queues per pipe. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 0d47bb77b505e539a99f4f032c9c5a58f1d21e18 Author: Alex Deucher Date: Thu Mar 20 13:34:33 2025 -0400 drm/amdgpu/gfx: make amdgpu_gfx_me_queue_to_bit() static It's not used outside of amdgpu_gfx.c. Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher commit 9eab24532691a36ce795f192ea2fb3193bc5c4b3 Author: Srinivasan Shanmugam Date: Wed Mar 26 12:53:01 2025 +0530 drm/amdgpu/gfx10: Add Cleaner Shader Support for GFX10.3.x GPUs Enable the cleaner shader for other GFX10.3.x series of GPUs to provide data isolation between GPU workloads. The cleaner shader is responsible for clearing the Local Data Store (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps prevent data leakage and ensures accurate computation results. This update extends cleaner shader support to GFX10.3.x GPUs, previously available for GFX10.3.0. It enhances security by clearing GPU memory between processes and maintains a consistent GPU state across KGD and KFD workloads. Cc: Mario Sopena-Novales Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 60d4952d8908c2396e5a005e056423c578e29db6 Author: Alex Deucher Date: Tue Mar 25 10:07:50 2025 -0400 drm/amdgpu: drop some dead code Drop the cgs smu firmware code for SI, it's not used. The smu firmware fetching for SI is done in si_dpm.c. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8ae1a4eef78c09a61b62f85e2dfc128c7365d18d Author: Alex Deucher Date: Mon Mar 3 17:35:32 2025 -0500 drm/amdgpu: add initial documentation for debugfs files Describes what debugfs files are available and what they are used for. v2: fix some typos (Mark Glines) v3: Address comments from Siqueira and Kent Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 160d3d39f61cb92a6cabceebc2d226ed3c5ab4c3 Author: Alexandre Demers Date: Fri Mar 21 21:47:00 2025 -0400 drm/amdgpu: continue cleaning up sid.h and si_enums.h Remove more duplicated defines and move some in sid.h for coherence with CIK. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 3470f80bd36e9b3da2542a63c1b62114eecce01c Author: Ananta Srikar Date: Mon Mar 24 21:49:12 2025 -0400 drm/amd/amdgpu: Fix typo Fixes a typo in the word "version" in an error message. Signed-off-by: Ananta Srikar Signed-off-by: Alex Deucher commit c6ae8d587eeb2d285ee13d064fd73ad0568198c4 Author: Andres Urian Florez Date: Mon Mar 24 19:07:21 2025 -0500 drm/amdgpu: Replace deprecated function strcpy() with strscpy() Instead of using the strcpy() deprecated function to populate the fw_name, use the strscpy() function Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Andres Urian Florez Signed-off-by: Alex Deucher commit 48b733d99b0d8db01fcf55d7ae31f69510fb1a4a Author: Alex Deucher Date: Thu Feb 27 12:31:28 2025 -0500 drm/amdgpu: add rebar parameter Add a new parameter to disable BAR resizing. Note that this only disables the driver from attempting to resize the BAR, The BIOS may have resized the BAR at boot. Some teams have found this useful in debugging P2P DMA issues on systems where the available MMIO space did not allow for all of the GPUs present to resize their BARs. Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit b71b7cd91c642f282794b82cf2b8159899b9aa59 Author: Alexandre Demers Date: Fri Mar 21 21:46:59 2025 -0400 drm/amdgpu: cleanup DCE6 a bit more Use shifts already available in DCE6's defines, masks and shifts. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit d35a412910906ffdcb46a33b20ccd4676b62fccd Author: Alexandre Demers Date: Fri Mar 21 21:46:58 2025 -0400 drm/amdgpu: keep removing sid.h dependency from si_dma.c Move and rename DMA_SEM_INCOMPLETE_TIMER_CNTL and DMA_SEM_WAIT_FAIL_TIMER_CNTL in oss_1_0_d.h Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 14f15aa054419ecd3a2578822958f87a84142bee Author: Alexandre Demers Date: Fri Mar 21 21:46:56 2025 -0400 drm/amdgpu: move si_dma.c away from sid.h and si_enums.h Replace defines for the ones in oss_1_0_d.h and oss_1_0_sh_mask.h Taking the opportunity to add some comments taken from cik_sdma.c Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 230a4b0528c0f2439df3f6cc5a6f053089a116b0 Author: Alexandre Demers Date: Fri Mar 21 21:46:54 2025 -0400 drm/amdgpu: make GFX6 easier to read Just fix the style and add a comment for reading easiness Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 535b6191904dd5a4f26c332ccc40c68f6d2b1233 Author: Alexandre Demers Date: Fri Mar 21 21:46:51 2025 -0400 drm/amdgpu: add missing GFX6 defines They will be used later when switching away from sid.h/si_enums.h. v2: fix whitespace (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 0ba7e47e8e3d1d6abad810d68b4b1a52c90a9242 Author: Alexandre Demers Date: Fri Mar 21 21:46:50 2025 -0400 drm/amdgpu: add missing DMA defines, shifts and masks They will be used later when switching away from sid.h/si_enums.h. v2: fix up whitespace (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 6168cb7a313694567872d0b16e84c0b8db34fa0c Author: Alexandre Demers Date: Fri Mar 21 21:46:49 2025 -0400 drm/amdgpu: move DCE6 away from sid.h and si_enums.h defines This cleans up DCE6. I added some minor tweaks taken from CIK to exit early v2: minor fixes (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 76eb396db301c0e770a872a21a8a8e050ba36ae3 Author: Alexandre Demers Date: Fri Mar 21 21:46:48 2025 -0400 drm/amdgpu: use GRPH_SECONDARY_SURFACE_ADDRESS_MASK with GRPH_SECONDARY_SURFACE_ADDRESS in DCE6 It seems a copy-paste error: since we are working with mmGRPH_SECONDARY_SURFACE_ADDRESS, GRPH_SECONDARY_SURFACE_ADDRESS__GRPH_SECONDARY_SURFACE_ADDRESS_MASK should be used. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit c82d915fe1397392fa64daff8fd7f5c80c29bed1 Author: Alexandre Demers Date: Fri Mar 21 21:46:47 2025 -0400 drm/amdgpu: move si_ih.c away from sid.h defines They are properly defined under oss_1_0_d.h Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit cbd8207e234b6920cb4463bbf8cd547dcb9ff7fc Author: Alexandre Demers Date: Fri Mar 21 21:46:46 2025 -0400 drm/amdgpu: remove PACKET3 duplicated defines from si_enums.h PACKET3 is already in sid.h, as it is done under cikd.h for CIK Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 193e08801525a4100373c8a432ead3193904d2d5 Author: Alexandre Demers Date: Fri Mar 21 21:46:45 2025 -0400 drm/amdgpu: use proper defines, shifts and masks in DCE6 code By replacing VGA_VSTATUS_CNTL by VGA_RENDER_CONTROL__VGA_VSTATUS_CNTL_MASK, we also need to fix its usage in GMC6. Note: VGA_VSTATUS_CNTL's binary value was inverted in dce_6_0_sh_mask.h, so we need to invert its value where it was used. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit de81b86e965e778533d9e7db6f4fe6451fb37974 Author: Alexandre Demers Date: Fri Mar 21 21:46:44 2025 -0400 drm/amdgpu: wire up defines, shifts and masks through SI code To be able to remove as much duplicated defines, the different files containing definitions, shifts and masks must be properly included. Once done, the code will be migrated where needed to shifts and masks and proper defines, before removing useless defines in the end. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 8e46cabf8ecef33b9e4e0977931e94c217ec6e87 Author: Alexandre Demers Date: Fri Mar 21 21:46:43 2025 -0400 drm/amdgpu: move GFX6 defines into gfx_v6_0.c Send a few GFX6 defines where it's used in GFX6. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 9aadb02fa2ecf9cc38534c6d203f61126c5a66d7 Author: Alexandre Demers Date: Sat Mar 22 14:39:00 2025 -0400 drm/radeon: fix MAX_POWER_SHIFT value While I don't think it is being used anywhere, if it were used, it would be wrong. We can base this assumption on MAX_POWER_MASK, where the shift is by 16 bits. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 1be0ae9e12b4e20210e7c9a6544cfde78e5d1706 Author: Alexandre Demers Date: Sat Mar 22 14:37:45 2025 -0400 drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 [BONAIRE|HAWAII]_GB_ADDR_CONFIG_GOLDEN are only used by GFX7. So keep them where they are needed. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit e319f9ec360008e5f0da5e8f15f2739d5c6ad93a Author: Alexandre Demers Date: Sat Mar 22 14:37:44 2025 -0400 drm/amdgpu: small cleanup to CIK SDMA Tidy cik_sdma_hw_init() by returning directly cik_sdma_start()'s result. Keep amdgpu_cik_gpu_check_soft_reset() early declaration with others. Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 60c53fe7bc13fb1ecf1d886c073a973371cb3c4a Author: Alexandre Demers Date: Sat Mar 22 14:37:43 2025 -0400 drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA cik_sdma_is_idle() does exactly what we need, so use it. V2: fix parameter (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit 62e0b8f76651f5a85f8524fec73027a8f6407128 Author: Alexandre Demers Date: Sat Mar 22 14:37:42 2025 -0400 drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 gmc_v7_0_is_idle() does exactly what we need, so use it. v2: fix parameter (Alex) Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher commit cc9428d5336aec746ffeb3d13ee2cf49756b157d Author: Saleemkhan Jamadar Date: Fri Mar 21 17:00:09 2025 +0530 drm/amd/display: add proper error message for vblank init v1 - DRM_ERROR to drm_err (Mario) Update message to identifiy the vblank initialization fail case Signed-off-by: Saleemkhan Jamadar Reviewed-by: Rodrigo Siqueira Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 43f668edae4a536f41c11d675ded958d9862a9a4 Author: Saleemkhan Jamadar Date: Fri Mar 21 17:00:09 2025 +0530 drm/amd/display: add proper error message for vblank init v1 - DRM_ERROR to dev_err (Mario) Update message to identifiy the vblank initialization fail case Signed-off-by: Saleemkhan Jamadar Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 969fd18c8d2491d9599176a9cca7e386f823144e Author: Ce Sun Date: Tue Dec 31 12:53:13 2024 +0800 drm/amdgpu/vcn: during dpc recovery will corrupt VCPU buffer err_event_athub and dpc recovery will corrupt VCPU buffer, so we need to restore fw data and clear buffer in amdgpu_vcn_resume() Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8ba904f54148d2a093650b13a229d2ff18142f7d Author: Ce Sun Date: Fri Mar 21 10:11:18 2025 +0800 drm/amdgpu: Multi-GPU DPC recovery support Add support for DPC recover based on refactored code Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 11bb33766f66d0cfe997601d6d974d0158a0e7b8 Author: Ce Sun Date: Thu Mar 20 18:12:40 2025 +0800 drm/amdgpu: refactor amdgpu_device_gpu_recover Split amdgpu_device_gpu_recover into the following stages: halt activities,asic reset,schedule resume and amdgpu resume. The reason is that the subsequent addition of dpc recover code will have a high similarity with gpu reset Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 921c040efeca35e21a836aa80fb2e3a1b8f64c97 Author: Ce Sun Date: Fri Nov 22 15:19:16 2024 +0800 drm/amd/pm: Add link reset for SMU 13.0.6 Add link reset implementation Signed-off-by: Ce Sun Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8e0793b6c58b7a67df21e092d90d9f93f6d35404 Author: Lijo Lazar Date: Thu Mar 20 10:31:32 2025 +0530 drm/amdkfd: Use dev_* instead of pr_* for messages To get the device context, replace pr_ with dev_ functions. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit eed269da71ee7e0c394646bd35c6d65e7b94019f Author: Aric Cyr Date: Sun Mar 16 10:46:52 2025 -0500 drm/amd/display: DC v3.2.326 Summary: * DML 2.1 resync * Vblank disable fixes * Visual confirm debug improvements * Add command for reading ABM histogram * Bug fixes & improvements Signed-off-by: Aric Cyr Signed-off-by: Aurabindo Pillai Reviewed-by: Leo Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a8f83d0c2d2bd7c065df6ffa07c5feb2b560094a Author: JinZe.Xu Date: Wed Mar 12 18:02:16 2025 +0800 drm/amd/display: Use sync version of indirect register access. [Why] Access to indirect registers by DC and other components are not synchronized. [How] Use sync version of indirect register access. Reviewed-by: Nicholas Kazlauskas Signed-off-by: JinZe.Xu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c82d84d1e46c9dd16050a3a5cc7639ddb3a01eb8 Author: Aric Cyr Date: Thu Mar 13 13:43:41 2025 -0400 drm/amd/display: Create a temporary scratch dc_link Create a temporary scratch dc_link for programming purposes and fix a copy of pipe_ctx on the stack to a pointer reference. Reviewed-by: Josip Pavic Signed-off-by: Aric Cyr Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d5a7fdc88a2d64242d959942cbd0e1499ebb9806 Author: Charlene Liu Date: Wed Mar 12 17:30:25 2025 -0400 drm/amd/display: fix zero value for APU watermark_c [why] the guard of is_apu not in sync, caused no watermark_c output. Reviewed-by: Ovidiu Bunea Signed-off-by: Charlene Liu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4a8396d5c208b4e3bc113d528af927f60cb8546f Author: Chun-Liang Chang Date: Fri Feb 21 10:36:22 2025 -0600 drm/amd/display: Add Read Histogram command header [Why] Read the histogram for VariBright validation [How] Add dc/dmub functions to read histogram and ACE Reviewed-by: Jun Lei Signed-off-by: Chun-Liang Chang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8b8a602c985e99074fa1d5233cd224b7bcfb9df2 Author: Paul Hsieh Date: Tue Mar 11 17:16:57 2025 +0800 drm/amd/display: Skip to enable dsc if it has been off [Why] It makes DSC enable when we commit the stream which need keep power off.And then it will skip to disable DSC if pipe reset at this situation as power has been off. It may cause the DSC unexpected enable on the pipe with the next new stream which doesn't support DSC. [HOW] Check the DSC used on current pipe status when update stream. Skip to enable if it has been off. The operation enable DSC should happen when set power on. Reviewed-by: Wenjing Liu Signed-off-by: Paul Hsieh Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 76468055069ce2912eb78a76f0e0648c4f674f51 Author: Austin Zheng Date: Fri Mar 7 13:36:53 2025 -0500 drm/amd/display: DML21 Reintegration [Why] To bring in latest changes in DML21 [List of Changes] - Unification of DML logging to use DML_LOG_* macro - Clean up variables that are exclusively used for logging Reviewed-by: Dillon Varone Signed-off-by: Austin Zheng Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7a505a844c7aeeb9e5180f05c9714a47bcad5395 Author: Cruise Date: Thu Mar 6 10:17:48 2025 +0800 drm/amd/display: Remove BW Allocation from DPIA notification [Why] USB4 BW Allocation response will be handled in HPD IRQ. No need to handle it in DPIA notification callback. [How] Remove DP BW allocation response code in DPIA notification. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Cruise Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c05da59e979bfe2d6555c7097e012b433a35d1b8 Author: Leo Zeng Date: Wed Feb 26 14:35:05 2025 -0500 drm/amd/display: Get visual confirm color for stream [WHY] We want to output visual confirm color based on stream. [HOW] If visual confirm is for DMUB, use DMUB to get color. Otherwise, find plane with highest layer index, output visual confirm color of pipe that contains plane with highest index. Reviewed-by: Aric Cyr Signed-off-by: Leo Zeng Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9cdd9c4d039eae77142a27ffeaee76a5d5a9294f Author: Leo Zeng Date: Tue Feb 25 15:59:59 2025 -0500 drm/amd/display: Add override for visual confirm [WHY] We want to allow the display manager to override the visual confirm color in DC when required. [HOW] Add new visual confirm mode VISUAL_CONFIRM_EXPLICIT, check mode before setting visual confirm color. Reviewed-by: Aric Cyr Signed-off-by: Leo Zeng Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a422fa8a55631978cb045511127ff39ef3366a4f Merge: 0af2f6be1b4281 1a7646d784513d Author: Bjorn Andersson Date: Mon Apr 7 14:11:36 2025 -0500 Merge branch 'arm64-for-6.15' into arm64-for-6.16 Changes queued for v6.15 would have had the potential to break bisectability and was therefor not accepted. Merge the whole set towards v6.16, as this is no longer a concern. commit 4dab26bed543584577b64b36aadb8b5b165bf44f Author: Jacob Moroni Date: Thu Feb 20 17:56:12 2025 +0000 IB/cm: use rwlock for MAD agent lock In workloads where there are many processes establishing connections using RDMA CM in parallel (large scale MPI), there can be heavy contention for mad_agent_lock in cm_alloc_msg. This contention can occur while inside of a spin_lock_irq region, leading to interrupts being disabled for extended durations on many cores. Furthermore, it leads to the serialization of rdma_create_ah calls, which has negative performance impacts for NICs which are capable of processing multiple address handle creations in parallel. The end result is the machine becoming unresponsive, hung task warnings, netdev TX timeouts, etc. Since the lock appears to be only for protection from cm_remove_one, it can be changed to a rwlock to resolve these issues. Reproducer: Server: for i in $(seq 1 512); do ucmatose -c 32 -p $((i + 5000)) & done Client: for i in $(seq 1 512); do ucmatose -c 32 -p $((i + 5000)) -s 10.2.0.52 & done Fixes: 76039ac9095f ("IB/cm: Protect cm_dev, cm_ports and mad_agent with kref and lock") Link: https://patch.msgid.link/r/20250220175612.2763122-1-jmoroni@google.com Signed-off-by: Jacob Moroni Acked-by: Eric Dumazet Reviewed-by: Zhu Yanjun Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 9415c8b5b9b7ba927d98f80022a2890e8639e9e4 Author: David Lechner Date: Mon Mar 10 15:43:08 2025 -0500 iio: adc: ad4030: explain rearranging raw sample data Add a comment explaining why the raw sample data is rearranged in the in the ad4030_conversion() function. It is not so obvious from the code why this is done. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-5-589e4ebd9711@baylibre.com Signed-off-by: Jonathan Cameron commit 15ffee89c7c6d8ac3509e301dd29bab687323133 Author: David Lechner Date: Mon Mar 10 15:43:07 2025 -0500 iio: adc: ad4030: don't store scan_type in state Move getting the scan_type to ad4030_conversion(). Previously, we were getting the scan_type in two other places, then storing it in the state struct before using it in ad4030_conversion(). This was a bit fragile against potential future changes since it isn't obvious that anything that could potentially change the scan_type would need to also update the state struct. Also, the non-obviousness of this led to a redundant call to iio_get_current_scan_type() in ad4030_single_conversion() since it also calls ad4030_set_mode() which in turn calls ad4030_conversion(). To simplify things, just call iio_get_current_scan_type() in ad4030_conversion() where the returned struct is actually used and don't bother storing it in the state struct. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-4-589e4ebd9711@baylibre.com Signed-off-by: Jonathan Cameron commit efaa981e679ac0cbc8d89b69aa4595e422826329 Author: David Lechner Date: Mon Mar 10 15:43:06 2025 -0500 iio: adc: ad4030: move setting mode to update_scan_mode Move calling ad4030_set_mode() from the buffer preenable callback to the update_scan_mode callback. This doesn't change any functionality but is more logical since setting the mode is a function of the scan mask and doesn't require an "undo" operation when the buffer is disabled. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-3-589e4ebd9711@baylibre.com Signed-off-by: Jonathan Cameron commit dc78e71d7c1534293eaf6d17c5ce83e547532cf9 Author: David Lechner Date: Mon Mar 10 15:43:05 2025 -0500 iio: adc: ad4030: remove some duplicate code Remove some duplicate code in the ad4030_get_chan_scale() function by simplifying the if statement. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-2-589e4ebd9711@baylibre.com Signed-off-by: Jonathan Cameron commit de67f28abe586fc26711389fe80c01b658020c2c Author: David Lechner Date: Mon Mar 10 15:43:04 2025 -0500 iio: adc: ad4030: check scan_type for error Check scan_type for error ad4030_get_chan_scale(). Currently, this should never fail, but it is good practice to always check for errors in case of future changes. Calling iio_get_current_scan_type() is moved out of the if statement also to avoid potential issues with future changes instead of assuming that the non-differential case does not use extended scan_type. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202503040954.n6MhjSsV-lkp@intel.com/ Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250310-iio-adc-ad4030-check-scan-type-err-v1-1-589e4ebd9711@baylibre.com Signed-off-by: Jonathan Cameron commit 9f7140bf23df90cdfd664dea0f0da7aacf8aeeb5 Author: Andy Shevchenko Date: Thu Mar 13 18:22:53 2025 +0200 iio: amplifiers: hmc425a: Remove not fully correct comment The OF match table can be used outside of OF-based platforms. Remove the (misleading) comment. Signed-off-by: Andy Shevchenko Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250313162254.416422-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 3aadd652c2c816a908abe55079e2590e3259e8ba Author: Chengchang Tang Date: Thu Mar 27 19:47:23 2025 +0800 RDMA/hns: Remove unused parameters Remove unused parameters. Link: https://patch.msgid.link/r/20250327114724.3454268-2-huangjunxian6@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Signed-off-by: Jason Gunthorpe commit aae85e007dffda49d1a611474f9653021ec763bd Author: Gustavo A. R. Silva Date: Tue Apr 1 11:29:06 2025 -0600 IB/hfi1: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Remove unused flex-array member `class_data` from `struct opa_mad_notice_attr`. Fix the following warning: drivers/infiniband/hw/hfi1/mad.c:23:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Link: https://patch.msgid.link/r/Z-wiYkll8Vo3ME3P@kspp Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe commit 8a94c42d831092ba65ce88bda020d93d2e267fe4 Author: Li Haoran Date: Tue Apr 1 21:10:15 2025 +0800 RDMA/core: Convert to use ERR_CAST() As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed. Link: https://patch.msgid.link/r/20250401211015750qxOfU9XZ8QgKizM1Lcyq2@zte.com.cn Signed-off-by: Li Haoran Signed-off-by: Shao Mingyin Signed-off-by: Jason Gunthorpe commit 7bc871af417a3011739ccddabb64db482ff7d752 Author: Li Haoran Date: Tue Apr 1 21:09:23 2025 +0800 RDMA/uverbs: Convert to use ERR_CAST() As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed. Link: https://patch.msgid.link/r/202504012109233981_YPVbd4wQzmAzP3tA5IG@zte.com.cn Signed-off-by: Li Haoran Signed-off-by: Shao Mingyin Signed-off-by: Jason Gunthorpe commit 41e2649c796e1f49c7b4d9176d2437504b78580f Author: Li Haoran Date: Tue Apr 1 21:08:40 2025 +0800 RDMA/core: Convert to use ERR_CAST() As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed. Link: https://patch.msgid.link/r/20250401210840146_IyrV3zlejzz3eAnDmMSB@zte.com.cn Signed-off-by: Li Haoran Signed-off-by: Shao Mingyin Signed-off-by: Jason Gunthorpe commit 2633ddff9b0f6f2a41f9f05cf18afacc029f8ef7 Author: Peng Jiang Date: Wed Mar 26 22:19:55 2025 +0800 RDMA: Replace msecs_to_jiffies with secs_to_jiffies for timeout In drivers/infiniband/hw/mlx4/mcg.c and drivers/infiniband/hw/mlx5/mr.c, `msecs_to_jiffies` is used to convert milliseconds to jiffies. For constant milliseconds, using `msecs_to_jiffies` introduces additional computational overhead. For example, it is unnecessary to check if m > jiffies_to_msecs(MAX_JIFFY_OFFSET) or (int)m < 0 for constants, while using `secs_to_jiffies` can avoid these extra calculations. Link: https://patch.msgid.link/r/20250326221955611qu6Ix3Pt5WgKvhL6sTySX@zte.com.cn Signed-off-by: Peng Jiang Signed-off-by: Ye Xingchen Signed-off-by: Jason Gunthorpe commit 16b82367aa28bd31795e720548421b58824108e1 Author: Easwar Hariharan Date: Wed Feb 19 21:36:40 2025 +0000 RDMA/mlx5: convert timeouts to secs_to_jiffies() Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @depends on patch@ expression E; @@ -msecs_to_jiffies(E * 1000) +secs_to_jiffies(E) -msecs_to_jiffies(E * MSEC_PER_SEC) +secs_to_jiffies(E) Link: https://patch.msgid.link/r/20250219-rdma-secs-to-jiffies-v1-2-b506746561a9@linux.microsoft.com Signed-off-by: Easwar Hariharan Signed-off-by: Jason Gunthorpe commit 29f526ed681551e20928169ecfde5a576e20b900 Author: Ovidiu Panait Date: Mon Feb 24 21:37:30 2025 +0200 bus: brcmstb_gisb: use dev_groups to register attribute groups Instead of manually adding attribute groups, set dev_groups pointer to have the driver core do it. Signed-off-by: Ovidiu Panait Link: https://lore.kernel.org/r/20250224193730.2698894-1-ovidiu.panait.oss@gmail.com Signed-off-by: Florian Fainelli commit e74cdabc32657b18c78e08fc8ce103262303bc1a Author: Artur Weber Date: Tue Mar 4 07:20:34 2025 +0100 ARM: dts: Drop DTS for BCM59056 PMU The BCM59056 PMU has its own separate DTSI, meant to be included in a DTS file after defining the pmu node on some I2C bus. This seems rather unintuitive; drop the DTS in favor of adding the BCM59056 PMU node directly into the device DTS files. If the amount of subdevices supported by the BCM590xx grows, and a common device tree turns out to be beneficial, it can be reintroduced in the future. Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20250304-bcm59054-v6-3-ae8302358443@gmail.com Signed-off-by: Florian Fainelli commit 9cd4b79eff5306d9e63959f338ade9b2d67fece2 Author: Artur Weber Date: Mon Mar 3 21:54:51 2025 +0100 ARM: dts: bcm2166x: Add bcm2166x-pinctrl DTSI Add common DTSI with common pin control configs for BCM21664/BCM23550 and include it in bcm2166x-common.dtsi. The configs are kept in a separate DTSI to keep things cleaner (pin config definitions take up quite a lot of space). Currently contains pins for BSC buses and SD/MMC; more pins can be added in the future. Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20250303-bcm21664-pinctrl-v3-6-5f8b80e4ab51@gmail.com Signed-off-by: Florian Fainelli commit d091c6b03c1b17506b23d3fa4fde5e3becc50d7b Author: Artur Weber Date: Mon Mar 3 21:54:50 2025 +0100 ARM: dts: bcm2166x-common: Add pinctrl node Now that the pinctrl driver supports the BCM21664, add a node for pinctrl in the DTS to allow for controlling pinmux pins. Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20250303-bcm21664-pinctrl-v3-5-5f8b80e4ab51@gmail.com Signed-off-by: Florian Fainelli commit 7f55c25d978e90368a308569a2f6172be2790cba Author: Stanimir Varbanov Date: Mon Jan 20 15:01:19 2025 +0200 arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes Enable pcie1 and pcie2 DT nodes. Pcie1 is used for the extension connector and pcie2 is used for RP1 south-bridge. Signed-off-by: Stanimir Varbanov Link: https://lore.kernel.org/r/20250120130119.671119-12-svarbanov@suse.de Signed-off-by: Florian Fainelli commit 5050168029e9465953da812e42ba7c7a6d5ae68e Author: Stanimir Varbanov Date: Mon Jan 20 15:01:18 2025 +0200 arm64: dts: broadcom: bcm2712: Add PCIe DT nodes Add PCIe devicetree nodes, plus needed reset and mip MSI-X controllers. Signed-off-by: Stanimir Varbanov Link: https://lore.kernel.org/r/20250120130119.671119-11-svarbanov@suse.de Signed-off-by: Florian Fainelli commit fdc348121f2465897792f946715a5da7887e5f97 Author: Jiri Slaby (SUSE) Date: Wed Mar 19 10:29:00 2025 +0100 irqdomain: pci: Switch to of_fwnode_handle() of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20250319092951.37667-8-jirislaby@kernel.org commit 01d541baedd74530831c8c98b946622cb7487f30 Author: Andrea Righi Date: Sat Apr 5 15:39:25 2025 +0200 selftests/sched_ext: Add test for scx_bpf_select_cpu_and() Add a selftest to validate the behavior of the built-in idle CPU selection policy applied to a subset of allowed CPUs, using scx_bpf_select_cpu_and(). Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 683d2d0faba12a0e7d4c3b85a62ac8298977e17b Author: Andrea Righi Date: Sat Apr 5 15:39:24 2025 +0200 sched_ext: idle: Introduce scx_bpf_select_cpu_and() Provide a new kfunc, scx_bpf_select_cpu_and(), that can be used to apply the built-in idle CPU selection policy to a subset of allowed CPU. This new helper is basically an extension of scx_bpf_select_cpu_dfl(). However, when an idle CPU can't be found, it returns a negative value instead of @prev_cpu, aligning its behavior more closely with scx_bpf_pick_idle_cpu(). It also accepts %SCX_PICK_IDLE_* flags, which can be used to enforce strict selection to @prev_cpu's node (%SCX_PICK_IDLE_IN_NODE), or to request only a full-idle SMT core (%SCX_PICK_IDLE_CORE), while applying the built-in selection logic. With this helper, BPF schedulers can apply the built-in idle CPU selection policy restricted to any arbitrary subset of CPUs. Example usage ============= Possible usage in ops.select_cpu(): s32 BPF_STRUCT_OPS(foo_select_cpu, struct task_struct *p, s32 prev_cpu, u64 wake_flags) { const struct cpumask *cpus = task_allowed_cpus(p) ?: p->cpus_ptr; s32 cpu; cpu = scx_bpf_select_cpu_and(p, prev_cpu, wake_flags, cpus, 0); if (cpu >= 0) { scx_bpf_dsq_insert(p, SCX_DSQ_LOCAL, SCX_SLICE_DFL, 0); return cpu; } return prev_cpu; } Results ======= Load distribution on a 4 sockets, 4 cores per socket system, simulated using virtme-ng, running a modified version of scx_bpfland that uses scx_bpf_select_cpu_and() with 0xff00 as the allowed subset of CPUs: $ vng --cpu 16,sockets=4,cores=4,threads=1 ... $ stress-ng -c 16 ... $ htop ... 0[ 0.0%] 8[||||||||||||||||||||||||100.0%] 1[ 0.0%] 9[||||||||||||||||||||||||100.0%] 2[ 0.0%] 10[||||||||||||||||||||||||100.0%] 3[ 0.0%] 11[||||||||||||||||||||||||100.0%] 4[ 0.0%] 12[||||||||||||||||||||||||100.0%] 5[ 0.0%] 13[||||||||||||||||||||||||100.0%] 6[ 0.0%] 14[||||||||||||||||||||||||100.0%] 7[ 0.0%] 15[||||||||||||||||||||||||100.0%] With scx_bpf_select_cpu_dfl() tasks would be distributed evenly across all the available CPUs. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit c2d8b2a57cd461f99eb8ebfaf08cded812d4396f Author: Andrea Righi Date: Sat Apr 5 15:39:23 2025 +0200 sched_ext: idle: Accept an arbitrary cpumask in scx_select_cpu_dfl() Many scx schedulers implement their own hard or soft-affinity rules to support topology characteristics, such as heterogeneous architectures (e.g., big.LITTLE, P-cores/E-cores), or to categorize tasks based on specific properties (e.g., running certain tasks only in a subset of CPUs). Currently, there is no mechanism that allows to use the built-in idle CPU selection policy to an arbitrary subset of CPUs. As a result, schedulers often implement their own idle CPU selection policies, which are typically similar to one another, leading to a lot of code duplication. To address this, modify scx_select_cpu_dfl() to accept an arbitrary cpumask, that can be used by the BPF schedulers to apply the existent built-in idle CPU selection policy to a subset of allowed CPUs. With this concept the idle CPU selection policy becomes the following: - always prioritize CPUs from fully idle SMT cores (if SMT is enabled), - select the same CPU if it's idle and in the allowed CPUs, - select an idle CPU within the same LLC, if the LLC cpumask is a subset of the allowed CPUs, - select an idle CPU within the same node, if the node cpumask is a subset of the allowed CPUs, - select an idle CPU within the allowed CPUs. This functionality will be exposed through a dedicated kfunc in a separate patch. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 23c63a965275ce5d6268075bbfe7ce8b6ffe9a35 Author: Andrea Righi Date: Sat Apr 5 15:39:22 2025 +0200 sched_ext: idle: Explicitly pass allowed cpumask to scx_select_cpu_dfl() Modify scx_select_cpu_dfl() to take the allowed cpumask as an explicit argument, instead of implicitly using @p->cpus_ptr. This prepares for future changes where arbitrary cpumasks may be passed to the built-in idle CPU selection policy. This is a pure refactoring with no functional changes. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 29f512f555ec16446525c11aa7422ae09236ab32 Author: Andrea Righi Date: Sat Apr 5 15:39:21 2025 +0200 sched_ext: idle: Extend topology optimizations to all tasks The built-in idle selection policy, scx_select_cpu_dfl(), always prioritizes picking idle CPUs within the same LLC or NUMA node, but these optimizations are currently applied only when a task has no CPU affinity constraints. This is done primarily for efficiency, as it avoids the overhead of updating a cpumask every time we need to select an idle CPU (which can be costly in large SMP systems). However, this approach limits the effectiveness of the built-in idle policy and results in inconsistent behavior, as affinity-restricted tasks don't benefit from topology-aware optimizations. To address this, modify the policy to apply LLC and NUMA-aware optimizations even when a task is constrained to a subset of CPUs. We can still avoid updating the cpumasks by checking if the subset of LLC and node CPUs are contained in the subset of allowed CPUs usable by the task (which is true in most of the cases - for tasks that don't have affinity constratints). Moreover, use temporary local per-CPU cpumasks to determine the LLC and node subsets, minimizing potential overhead even on large SMP systems. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo commit 82e8c6931074e1fa1bdbdcc01604e164c42f989e Author: Pinkesh Vaghela Date: Thu Mar 20 16:24:45 2025 +0530 cache: sifive_ccache: Add ESWIN EIC7700 support This adds support for the ESWIN EIC7700 SoC which also features this SiFive composable cache controller. Signed-off-by: Pinkesh Vaghela Reviewed-by: Samuel Holland Signed-off-by: Conor Dooley commit 2eb68366159a94cdf61b97fbc9ab230bef94313f Author: Pritesh Patel Date: Thu Mar 20 16:24:44 2025 +0530 dt-bindings: cache: sifive,ccache0: Add ESWIN EIC7700 SoC compatibility This cache controller is also used on the ESWIN EIC7700 SoC. However, it have 256KB private L2 Cache and shared L3 Cache of 4MB. So add dedicated compatible string for it. Signed-off-by: Pritesh Patel Reviewed-by: Samuel Holland Signed-off-by: Pinkesh Vaghela Signed-off-by: Conor Dooley commit 54fe9380a50b66ff0086e2fd7301e05726d7d98f Author: Michal Wilczynski Date: Tue Mar 11 18:19:00 2025 +0100 riscv: Enable PM_GENERIC_DOMAINS for T-Head SoCs T-Head SoCs feature separate power domains (power islands) for major components like the GPU, Audio, and NPU. To manage the power states of these components effectively, the kernel requires generic power domain support. This commit enables `CONFIG_PM_GENERIC_DOMAINS` for T-Head SoCs, allowing the power domain driver for these components to be compiled and integrated. This ensures proper power management and energy efficiency on T-Head platforms. By selecting `PM_GENERIC_DOMAINS`, we provide the necessary framework for the power domain drivers to function correctly on RISC-V architecture with T-Head SoCs. Signed-off-by: Michal Wilczynski Reviewed-by: Drew Fustini Acked-by: Drew Fustini Signed-off-by: Conor Dooley commit 710028a2e4d76c3bdca8167012a0395b53a7f3e3 Author: Arnaud Pouliquen Date: Thu Mar 27 09:27:21 2025 +0100 remoteproc: stm32_rproc: Allow to specify firmware default name Enhance the stm32_rproc driver to allow enabling the configuration of the firmware name based on the 'firmware-name' property in the device tree, offering flexibility compared to using the remote proc device node name. Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20250327082721.641278-3-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier commit 385a2de38e45d0bbb6efa64e95f03e3dff54fc95 Author: Arnaud Pouliquen Date: Thu Mar 27 09:27:20 2025 +0100 dt-bindings: remoteproc: stm32-rproc: Add firmware-name property Add the 'firmware-name' property to the remote processor binding to allow specifying the default firmware name in the device tree. Signed-off-by: Arnaud Pouliquen Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250327082721.641278-2-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier commit be908d2360341f8bbc982fff5a5e4f8030c17f74 Author: P Praneesh Date: Wed Apr 2 23:35:43 2025 +0530 wifi: ath12k: Fix invalid memory access while forming 802.11 header While forming the 802.11 header from the rx descriptor, skb_push() is performed for the 802.11 header length and then calls ath12k_dp_rx_desc_get_dot11_hdr(). Since skb_push() moves the skb->data pointer backwards by the 802.11 header length, the rx descriptor points to a different memory area than intended, causing invalid information to be fetched from the rx descriptor. Also, when IV and ICV are not stripped from the given MSDU, mac80211 performs PN validation for these MSDUs, which requires the crypto header. Before forming the crypto header from the given rx descriptor, skb_push() is performed for the crypto header length, which overwrites the memory pointed to by the rx descriptor, causing invalid information to form the 802.11 header. Fix these issues by moving all rx descriptor accesses before the skb_push() operation which ensures the proper 802.11 headers are generated from the given rx descriptor and removing ath12k_dp_rxdesc_get_mpdu_frame_ctrl() for filling frame control, as this information is already fetched by ath12k_dp_rx_desc_get_dot11_hdr(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Co-developed-by: Karthikeyan Periyasamy Signed-off-by: Karthikeyan Periyasamy Signed-off-by: P Praneesh Link: https://patch.msgid.link/20250402180543.2670947-1-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 6f8a27a584b23e9dedefd6cb110dd2587b84a6d4 Author: P Praneesh Date: Wed Apr 2 23:27:14 2025 +0530 wifi: ath12k: Fix memory corruption during MLO multicast tx The struct sk_buff's control buffer is shared by mac80211's struct ieee80211_tx_info and ath12k's struct ath12k_skb_cb. When the driver wants to transmit an skb, it caches all the mac80211-specific information from struct ieee80211_tx_info, then performs a memset on the control buffer before writing the ath12k-specific information using struct ath12k_skb_cb. However, during multicast tx, the key is being filled into the driver data, which overwrites some crucial members like link_id and flags in struct ath12k_skb_cb. This causes invalid information retrieval when the driver accesses these fields during ath12k_dp_tx(). Fix this issue by removing the key filling logic during MLO multicast tx, as it is not used anywhere in the tx path. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 2f50de725677 ("wifi: ath12k: Add support for MLO Multicast handling in driver") Signed-off-by: P Praneesh Link: https://patch.msgid.link/20250402175714.2667270-1-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 75ec94db880b1e4b4f9182885d60db0db6e2ee56 Author: P Praneesh Date: Wed Apr 2 23:10:32 2025 +0530 wifi: ath12k: Fix memory leak during vdev_id mismatch Currently driver enables vdev_id check as part of the bank configuration in ath12k_dp_tx_get_vdev_bank_config(). This check ensures that the vdev_id configured in the bank register aligns with the vdev_id in the packet's address search table within the firmware. If there is a mismatch, the firmware forwards the packet with the HTT status HAL_WBM_REL_HTT_TX_COMP_STATUS_VDEVID_MISMATCH. Since driver does not handle this vdev_id mismatch HTT status, the corresponding buffers are not freed properly, causing a memory leak. Fix this issue by adding handling to free the buffers when a vdev_id mismatch HTT status is encountered. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ- Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Link: https://patch.msgid.link/20250402174032.2651221-1-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson commit cb1790249361ba9396b06b1af2500147e6e42e5e Author: Pradeep Kumar Chitrapu Date: Thu Mar 20 16:54:26 2025 +0530 wifi: ath12k: Fix incorrect rates sent to firmware Before firmware assert, if there is a station interface in the device which is not associated with an AP, the basic rates are set to zero. Following this, during firmware recovery, when basic rates are zero, ath12k driver is sending invalid rate codes, which are negative values, to firmware. This results in firmware assert. Fix this by checking if rate codes are valid, before sending them to the firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Roopni Devanathan Reviewed-by: Vasanthakumar Thiagarajan Reviewed-by: Ping-Ke Shih Link: https://patch.msgid.link/20250320112426.1956961-1-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson commit f9d55227839199e928a41574e41089288a43a2d6 Author: Andre Przywara Date: Fri Mar 7 00:57:07 2025 +0000 dt-bindings: arm: sunxi: Add new board names for A523 generation The new Allwinner A523 SoC family comes in different packages, though they all share the same die, and so the devicetree bindings. Add three board names that use a version from this SoC family: - The Avaota A1: an Open Source hardware router board. - The Radxa Cubie A5E: a typical development board - The X96QPro+: a TV box Add their compatible name to the list. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250307005712.16828-11-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit acf5b947cff1b991ceb7fa53c66555242ff4c87b Author: Andre Przywara Date: Fri Mar 7 00:57:06 2025 +0000 dt-bindings: vendor-prefixes: Add YuzukiHD name YuzukiHD provides Open Source Hardware designs, and also offers ready-made builds of them: https://github.com/YuzukiHD Signed-off-by: Andre Przywara Acked-by: Conor Dooley Link: https://patch.msgid.link/20250307005712.16828-10-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit 35ac96f796649346c9b0440413dc6c5138249b3e Author: Andre Przywara Date: Fri Mar 7 00:57:05 2025 +0000 arm64: dts: allwinner: Add Allwinner A523 .dtsi file The Allwinner A523, and its siblings A527 and T527, which share the same die, are a new family of SoCs introduced in 2023. They features eight Arm Cortex-A55 cores, and, among the other usual peripherals, a PCIe and USB 3.0 controller. Add the basic SoC devicetree .dtsi for the chip, describing the fundamental peripherals: the cores, GIC, timer, RTC, CCU and pinctrl. Also some other peripherals are fully compatible with previous IP, so add the USB and MMC nodes as well. The other peripherals will be added in the future, once we understand their compatibility and DT requirements. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://patch.msgid.link/20250307005712.16828-9-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai commit ec32344d2a3b841d096c12cffe8e620ad117a6a0 Author: Rob Herring (Arm) Date: Thu Apr 3 21:59:25 2025 -0500 arm64: dts: microchip: sparx5: Fix CPU node "enable-method" property dependencies The "spin-table" enable-method requires "cpu-release-addr" property, so add a dummy entry. It is assumed the bootloader will fill in the correct values. Signed-off-by: Rob Herring (Arm) Reviewed-by: Daniel Machon Tested-by: Daniel Machon Signed-off-by: Conor Dooley commit c3152988c047a7b6abb10d4dc5e24fafbabe8b7e Author: Tamir Duberstein Date: Tue Mar 18 10:52:42 2025 -0400 rust: alloc: use `spare_capacity_mut` to reduce unsafe Use `spare_capacity_mut` in the implementation of `push` to reduce the use of `unsafe`. Both methods were added in commit 2aac4cd7dae3 ("rust: alloc: implement kernel `Vec` type"). Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20250318-vec-push-use-spare-v3-1-68741671d1af@gmail.com Signed-off-by: Tamir Duberstein Signed-off-by: Danilo Krummrich commit af134b1145e6e1b64d41c144d4b5a8d17af22f45 Author: Krzysztof Kozlowski Date: Mon Mar 31 10:13:45 2025 +0200 dt-bindings: writing-schema: Explain sub-nodes with additionalProperties:true Document recently introduced pattern of using additionalProperties: true for sub-nodes with their own schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250331081345.37103-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 9d36c5145a9e6a3b0c3fbafd579bd8b33343c40d Merge: 418556fa576ebb 25a6cc9a630b4b Author: Christian Brauner Date: Mon Apr 7 15:33:11 2025 +0200 Merge patch series "fs: harden anon inodes" Christian Brauner says: * Anonymous inodes currently don't come with a proper mode causing issues in the kernel when we want to add useful VFS debug assert. Fix that by giving them a proper mode and masking it off when we report it to userspace which relies on them not having any mode. * Anonymous inodes currently allow to change inode attributes because the VFS falls back to simple_setattr() if i_op->setattr isn't implemented. This means the ownership and mode for every single user of anon_inode_inode can be changed. Block that as it's either useless or actively harmful. If specific ownership is needed the respective subsystem should allocate anonymous inodes from their own private superblock. * Port pidfs to the new anon_inode_{g,s}etattr() helpers. * Add proper tests for anonymous inode behavior. The anonymous inode specific fixes should ideally be backported to all LTS kernels. * patches from https://lore.kernel.org/20250407-work-anon_inode-v1-0-53a44c20d44e@kernel.org: selftests/filesystems: add fourth test for anonymous inodes selftests/filesystems: add third test for anonymous inodes selftests/filesystems: add second test for anonymous inodes selftests/filesystems: add first test for anonymous inodes anon_inode: raise SB_I_NODEV and SB_I_NOEXEC pidfs: use anon_inode_setattr() anon_inode: explicitly block ->setattr() pidfs: use anon_inode_getattr() anon_inode: use a proper mode internally Link: https://lore.kernel.org/20250407-work-anon_inode-v1-0-53a44c20d44e@kernel.org Signed-off-by: Christian Brauner commit 25a6cc9a630b4b1b783903b23a3a97c5bf16bf41 Author: Christian Brauner Date: Mon Apr 7 11:54:23 2025 +0200 selftests/filesystems: add open() test for anonymous inodes Test that anonymous inodes cannot be open()ed. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-9-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit f8ca403ae77cbfb4bf0fcd92c74075886f5f4aa8 Author: Christian Brauner Date: Mon Apr 7 11:54:22 2025 +0200 selftests/filesystems: add exec() test for anonymous inodes Test that anonymous inodes cannot be exec()ed. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-8-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit fcf31ec7cade5b17699bc2ed04cacbc92b14a864 Author: Christian Brauner Date: Mon Apr 7 11:54:21 2025 +0200 selftests/filesystems: add chmod() test for anonymous inodes Test that anonymous inodes cannot be chmod()ed. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-7-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit c784159750bc83aa91d49ceeb2dbd627d22c0587 Author: Christian Brauner Date: Mon Apr 7 11:54:20 2025 +0200 selftests/filesystems: add chown() test for anonymous inodes Test that anonymous inodes cannot be chown()ed. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-6-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 1ed95281c0c77dbb1540f9855cd3c5f19900f7a5 Author: Christian Brauner Date: Mon Apr 7 11:54:19 2025 +0200 anon_inode: raise SB_I_NODEV and SB_I_NOEXEC It isn't possible to execute anonymous inodes because they cannot be opened in any way after they have been created. This includes execution: execveat(fd_anon_inode, "", NULL, NULL, AT_EMPTY_PATH) Anonymous inodes have inode->f_op set to no_open_fops which sets no_open() which returns ENXIO. That means any call to do_dentry_open() which is the endpoint of the do_open_execat() will fail. There's no chance to execute an anonymous inode. Unless a given subsystem overrides it ofc. However, we should still harden this and raise SB_I_NODEV and SB_I_NOEXEC on the superblock itself so that no one gets any creative ideas. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-5-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org # all LTS kernels Signed-off-by: Christian Brauner commit c83b9024966090fe0df92aab16975b8d00089e1f Author: Christian Brauner Date: Mon Apr 7 11:54:18 2025 +0200 pidfs: use anon_inode_setattr() So far pidfs did use it's own version. Just use the generic version. We use our own wrappers because we're going to be implementing properties soon. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-4-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 22bdf3d6581af6d06ed8a46c6835648421cca0ea Author: Christian Brauner Date: Mon Apr 7 11:54:17 2025 +0200 anon_inode: explicitly block ->setattr() It is currently possible to change the mode and owner of the single anonymous inode in the kernel: int main(int argc, char *argv[]) { int ret, sfd; sigset_t mask; struct signalfd_siginfo fdsi; sigemptyset(&mask); sigaddset(&mask, SIGINT); sigaddset(&mask, SIGQUIT); ret = sigprocmask(SIG_BLOCK, &mask, NULL); if (ret < 0) _exit(1); sfd = signalfd(-1, &mask, 0); if (sfd < 0) _exit(2); ret = fchown(sfd, 5555, 5555); if (ret < 0) _exit(3); ret = fchmod(sfd, 0777); if (ret < 0) _exit(3); _exit(4); } This is a bug. It's not really a meaningful one because anonymous inodes don't really figure into path lookup and they cannot be reopened via /proc//fd/ and can't be used for lookup itself. So they can only ever serve as direct references. But it is still completely bogus to allow the mode and ownership or any of the properties of the anonymous inode to be changed. Block this! Link: https://lore.kernel.org/20250407-work-anon_inode-v1-3-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org # all LTS kernels Signed-off-by: Christian Brauner commit 37e62dafbfaba467975b0a8c11b9ffaa678f8559 Author: Christian Brauner Date: Mon Apr 7 11:54:16 2025 +0200 pidfs: use anon_inode_getattr() So far pidfs did use it's own version. Just use the generic version. We use our own wrappers because we're going to be implementing our own retrieval properties soon. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-2-53a44c20d44e@kernel.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit cfd86ef7e8e7b9e015707e46479a6b1de141eed0 Author: Christian Brauner Date: Mon Apr 7 11:54:15 2025 +0200 anon_inode: use a proper mode internally This allows the VFS to not trip over anonymous inodes and we can add asserts based on the mode into the vfs. When we report it to userspace we can simply hide the mode to avoid regressions. I've audited all direct callers of alloc_anon_inode() and only secretmen overrides i_mode and i_op inode operations but it already uses a regular file. Link: https://lore.kernel.org/20250407-work-anon_inode-v1-1-53a44c20d44e@kernel.org Fixes: af153bb63a336 ("vfs: catch invalid modes in may_open()") Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org # all LTS kernels Reported-by: syzbot+5d8e79d323a13aa0b248@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67ed3fb3.050a0220.14623d.0009.GAE@google.com Signed-off-by: Christian Brauner commit 8d18e67abbdf380cd1cfd2c313aac625092d7777 Author: Amadeusz Sławiński Date: Fri Apr 4 11:03:37 2025 +0200 ASoC: Intel: avs: Support 16 TDMs in dynamic assignment When assigning new widget name there needs to be enough place in buffer to assign name. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 6a68cbe09e9a7dc9f53857510bee1bc34bdbbfd9 Author: Amadeusz Sławiński Date: Fri Apr 4 11:03:36 2025 +0200 ASoC: Intel: avs: Iterate over correct number of TDMs When handling TDMs, don't iterate over number of SSP ports, but over possible number of TDMs. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 79138dbff53ab0e9891ebdfce8d7b298c3783cd1 Author: Amadeusz Sławiński Date: Fri Apr 4 11:03:35 2025 +0200 ASoC: Intel: avs: Assign unique ID to platform devices When creating machine boards there are two types, per endpoint or compound board. For compound board we can just use I2S mask as its ID, however, per endpoint can also be separated per TDM, which causes problem because two boards would have same I2S mask. Shift it and add the value of TDM to generate a unique ID. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 7d859189de13f06fdc511761c745f3b302bed7b6 Author: Amadeusz Sławiński Date: Fri Apr 4 11:03:34 2025 +0200 ASoC: Intel: avs: Allow to specify custom configurations with i2s_test Change 'i2s_test' module option from enable-flag to string allowing to specify which SSP port and in what TDM configuration should be enabled. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit d360b713727db0093fe9a8cf475d1d536075c12f Author: Cezary Rojewski Date: Fri Apr 4 11:03:33 2025 +0200 ASoC: Intel: avs: Allow for 16 channels configuration Add define representing maximum number of channels that are allowed by HDAudio standard and as such supported by HW - 16 channels. With that done, reflect the max in BE DAIs capabilities. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 87bcb08710160bde5712ca0d24c505074b7dfafa Author: Amadeusz Sławiński Date: Fri Apr 4 11:03:32 2025 +0200 ASoC: Intel: avs: Rename AVS_CHANNELS_MAX define It is used for coefficient table in updown mixer module, which supports maximum of 8 channels. However it does not represent HW capability. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit e6b9c7f5a32b3bde4e24ee74c0d4f954ce086272 Author: Cezary Rojewski Date: Fri Apr 4 11:03:31 2025 +0200 ALSA: hda: Allow for 16 channels configuration As per HDAudio specification, up to 16 channels are supported. Reflect that in the code. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404090337.3564117-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 83b9ae77f06607d19f7d3dcc6008742051137b27 Author: Cezary Rojewski Date: Fri Apr 4 11:03:30 2025 +0200 lib/string_helpers: Introduce parse_int_array() Existing parse_inte_array_user() works with __user buffers only. Separate array parsing from __user bits so the functionality can be utilized with kernel buffers too. Cc: Andy Shevchenko Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250404090337.3564117-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 93fa44f84704dfedc4fe06b89bebc8cfaa5f525b Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:54 2025 +0200 ASoC: Intel: avs: boards: Change ssm4567 card name Rename FE from "avs_ssm4567" to "AVS I2S SSM4567". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-21-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 3c7115677969c6a45ccce511c15adf9ca4d61fba Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:53 2025 +0200 ASoC: Intel: avs: boards: Change rt5682 card name Rename FE from "avs_rt5682" to "AVS I2S ALC5682". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-20-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit f1e282c333ac6100a86f4ef3dd07c5db6ef5712a Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:52 2025 +0200 ASoC: Intel: avs: boards: Change rt5663 card name Rename FE from "avs_rt5663" to "AVS I2S ALC5663". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-19-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit e0e3b14080eb77759c6b11b4d14ef079ad30b911 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:51 2025 +0200 ASoC: Intel: avs: boards: Change rt5514 card name Rename FE from "avs_rt5514" to "AVS I2S ALC5514". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-18-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 61881b29d6fcc67a31c1cdeae54e6687d1b20ead Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:50 2025 +0200 ASoC: Intel: avs: boards: Change rt298 card name Rename FE from "avs_rt298" to "AVS I2S ALC298". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-17-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit ffe6a23eceb8ffe8ce23a9b23818b9a767ec9c9c Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:49 2025 +0200 ASoC: Intel: avs: boards: Change rt286 card name Rename FE from "avs_rt286" to "AVS I2S ALC286". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-16-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit e7722ac9a88f85a4845ca1304dbe47cce01e1fc0 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:48 2025 +0200 ASoC: Intel: avs: boards: Change rt274 card name Rename FE from "avs_rt274" to "AVS I2S ALC274". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-15-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit c9763d849a56a16db9da235ff525f452839d29c3 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:47 2025 +0200 ASoC: Intel: avs: boards: Change probe card name Rename FE from "avs_probe_mb" to "AVS PROBE". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-14-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 091614d1c571933413b9debada185c8f4daa536a Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:46 2025 +0200 ASoC: Intel: avs: boards: Change pcm3168a card name Rename FE from "avs_pcm3168a" to "AVS I2S PCM3168A". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-13-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit c0019bb4ee3ed861deea56feb8939cb9ad13926b Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:45 2025 +0200 ASoC: Intel: avs: boards: Change nau8825 card name Rename FE from "avs_nau8825" to "AVS I2S NAU8825". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-12-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 3051c1b91c4acd99338a82c044ba25d675a41a3c Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:44 2025 +0200 ASoC: Intel: avs: boards: Change max98927 card name Rename FE from "avs_max98927" to "AVS I2S MAX98927". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-11-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit e91f9a93c34f6092463fbc5e03b32312b3f87a37 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:43 2025 +0200 ASoC: Intel: avs: boards: Change max98373 card name Rename FE from "avs_max98373" to "AVS I2S MAX98373". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-10-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 20d5ff6d7e35e04cc24f7953036aa75cabc72706 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:42 2025 +0200 ASoC: Intel: avs: boards: Change max98357a card name Rename FE from "avs_max98357a" to "AVS I2S MAX98357A". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-9-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 71439093a066450d1392ef52c09dfb42c4a03d44 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:41 2025 +0200 ASoC: Intel: avs: boards: Change sspX-loopback card name Rename FE from "sspX-loopback" to "AVS I2S TEST-X". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-8-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 65327c926e7c52487c33af7a096ec8990876d076 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:40 2025 +0200 ASoC: Intel: avs: boards: Change hdaudio card name Rename FE from "hdaudioB0D0"/"hdaudioB0D2" to "AVS HD-Audio"/"AVS HDMI". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 102d3f95e6a80bd19b623005cb2a0181533159b7 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:39 2025 +0200 ASoC: Intel: avs: boards: Change es8336 card name Rename FE from "avs_es8336" to "AVS I2S ES8336". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-6-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 1cfb242fc12a6e8ad84b10c65ac5bd1b507c5472 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:38 2025 +0200 ASoC: Intel: avs: boards: Change DMIC card name Rename FE from "avs_dmic" to "AVS DMIC". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-5-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 958fd3ff106787c72617c106b483da96ebf040f3 Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:37 2025 +0200 ASoC: Intel: avs: boards: Change da7219 card name Rename FE from "avs_da7219" to "AVS I2S DA7219". Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-4-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit e3dc0351d7a0fdcde18ed1719c9149b1a656e7ec Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:36 2025 +0200 ASoC: Intel: avs: Use topology information for endpoint numbers Use DAI PCM ID from topology as Front End device endpoint number. This allows devices to be more naturally enumerated starting from 0, like most cards, instead of values like 1 or 2. Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-3-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit 1581d5c68208a776c2df35d6e3ef232288b56f9d Author: Amadeusz Sławiński Date: Mon Apr 7 14:41:35 2025 +0200 ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names Add backward compatibility Kconfig option to allow for enabling obsolete card names. Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-2-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown commit f350747a9935d6c1539684c37f30e45ce9a3319f Author: Matt Roper Date: Fri Apr 4 15:00:54 2025 -0700 drm/xe: Ensure XE_BO_FLAG_CPU_ADDR_MIRROR has a unique value When XE_BO_FLAG_PINNED_NORESTORE and XE_BO_FLAG_PINNED_LATE_RESTORE were added, they were assigned BO flag values in the middle of the flag range, requiring renumbering of the higher flags. In both cases, XE_BO_FLAG_CPU_ADDR_MIRROR was overlooked during renumbering because it was defined below XE_BO_FLAG_GGTT_ALL and thus was not immediately visible in code diffs changing this area of the code; this resulted in XE_BO_FLAG_CPU_ADDR_MIRROR clashing with another flag. Assign XE_BO_FLAG_CPU_ADDR_MIRROR a unique value, and also move the definition of XE_BO_FLAG_GGTT_ALL down below all of the individual flags so that this kind of mistake is less likely in the future. Also, while we're at it, fix up some space vs tab whitespace inconsistency in these flag definitions. Fixes: 7f387e6012b6 ("drm/xe: add XE_BO_FLAG_PINNED_LATE_RESTORE") Fixes: 045448da87bf ("drm/xe: Add XE_BO_FLAG_PINNED_NORESTORE") Cc: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250404220053.1758356-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper commit 387ddbc7d474967589de15043b47a441f95a50f2 Author: Cezary Rojewski Date: Mon Apr 7 13:23:52 2025 +0200 ALSA: hda: Select avs-driver by default on FCL The avs-driver is the recommended solution for FriscoLake (FCL) platform. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 2b2e091271b0e2a7677619d4d2ccfc9bc6f1cb96 Author: Amadeusz Sławiński Date: Mon Apr 7 13:23:51 2025 +0200 ASoC: Intel: avs: Add boards definitions for FCL platform Reuse TGL definitions to define boards configurations for the supported ACE platforms. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 796b6ab6344e3650f0da92d6f2b8a7090fe6351d Author: Cezary Rojewski Date: Mon Apr 7 13:23:50 2025 +0200 ASoC: Intel: avs: Conditionally add DMA config when creating Copier Starting from LunarLake (LNL) platform, non-HDAudio transfers e.g.: I2S/DMIC utilize HDAudio LINK DMA instead of GPDMA for the data transfer. Implement avs_append_dma_cfg() to account for the changes made in LNL timeframe. The handler checks the platform and transfer type before appending the DMA configuration to the module's payload so it can safely be called within the common initialization flow for Copier/WHM modules. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 86b59ac80dc5a136bc434c12d37420486eba48cb Author: Cezary Rojewski Date: Mon Apr 7 13:23:49 2025 +0200 ASoC: Intel: avs: Dynamically assign ops for non-HDAudio DAIs Provide dynamic selection mechanism of DAI operations for the non-HDAudio DAIs so that both LunarLake+ platforms and their predecessors are supported. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 716643786f140f2d68f22424c75b9198ffe14290 Author: Cezary Rojewski Date: Mon Apr 7 13:23:48 2025 +0200 ASoC: Intel: avs: PCM operations for LNL-based platforms Starting from LNL platform the so-called non-HDAudio transfer types, e.g.: I2S/DMIC, utilize HDAudio LINK DMA rather than GPDMA for the data streaming. In essence, all transfer types now utilize HDAudio Link. Most of the existing code can be reused with the major difference being HDAudio Link query method: - fetch the Link by codec.addr in standard HDAudio transfer case - fetch the Link by LEPTR.ID in non-HDAudio transfer case To make the unification happen, store pointer to the Link in dma_data and utilize it in the common code. And to avoid confusion in transfer-type naming between cAVS-ACE 1.x (SkyLake till MeteorLake) and ACE 2.0+ architecture (LunarLake onward), use: - 'hda' for typical HDAudio transfer case - 'nonhda' for non-HDAudio transfer case, cAVS-ACE 1.x - 'althda' for non-HDAudio transfer case, ACE 2.0+ Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit af1c968d25c7c44cd2738349c479f8b610a3fc40 Author: Cezary Rojewski Date: Mon Apr 7 13:23:47 2025 +0200 ASoC: Intel: avs: PTL-based platforms support Define handlers specific to ACE platforms, that Frisco Lake (FCL), a PantherLake (PTL)-based platform, is founded upon. Most operations are still inherited from their predecessors with the major difference being AudioDSP cores management - replaced by DSP-domain power management. Software has to ensure the DSP domain is both powered on and its power-gating disabled before it can be utilized for streaming. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 75f3c607b1fa1f4d42cde8377cd2276ab01e287d Author: Cezary Rojewski Date: Mon Apr 7 13:23:46 2025 +0200 ASoC: Intel: avs: Relocate DSP status registers The firmware status and error registers are not part of SRAM on ACE platforms. As these registers take part in IPC on ACE and cAVS platforms both, relocate the field denoting their offset to Host-IPC descriptor. In consequence, code remains cohesive with the ACE specs while still maintaining high readability for the cAVS platforms. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b9a3ec604993074eb6f5d08b14fb7913d1fae48b Author: Cezary Rojewski Date: Mon Apr 7 13:23:45 2025 +0200 ASoC: Intel: avs: Read HW capabilities when possible Starting with LunarLake (LNL) and onward, some hardware capabilities are visible to the sound driver directly. At the same time, these may no longer be visible to the AudioDSP firmware. Update resource allocation function to rely on the registers when possible. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit acd2563f30886730757062b9b3efe8043daabbc3 Author: Cezary Rojewski Date: Mon Apr 7 13:23:44 2025 +0200 ASoC: Intel: avs: Ignore Vendor-space manipulation for ACE A number of Vendor Specific registers utilized on cAVS architecture (SkyLake till RaptorLake) are not present on ACE hardware (MeteorLake onward). Similarly, certain recommended procedures do not apply. Adjust existing code to be ACE-friendly. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 318c9eef63dd30b59dc8d63c7205ae997aa1e524 Author: Cezary Rojewski Date: Mon Apr 7 13:23:43 2025 +0200 ALSA: hda: Allow to fetch hlink by ID Starting with LNL platform, Intel HDAudio Links carry IDs specifying non-HDAudio transfer type they help facilitate e.g.: 0xC0 for I2S as defined by AZX_REG_ML_LEPTR_ID_INTEL_SSP. The mechanism accounts for LEPTR register as it is Reserved if LCAP.ALT for given Link equals 0. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Acked-by: Liam Girdwood Link: https://patch.msgid.link/20250407112352.3720779-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 8b6b67938ed5a0a4385c38efad91cb3e6f7e5765 Author: Imre Deak Date: Fri Apr 4 18:03:10 2025 +0300 drm/i915/dp_mst: Rename intel_dp::mst.active_links to mst.active_streams intel_dp::mst.active_links actually indicates the number of MST streams, not the number of MST links (one MST link carrying one or more MST streams), rename the field accordingly. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-7-imre.deak@intel.com commit 4f41071e22ed0a73d024bfa015684f4b3e433073 Author: Imre Deak Date: Fri Apr 4 18:03:09 2025 +0300 drm/i915/dp_mst: Use intel_dp_mst_active_streams() instead of open-coding it Use intel_dp_mst_active_streams() everywhere, instead of open-coding it. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-6-imre.deak@intel.com commit fa207d2b1d280053d7bbbdb972e57f3c8d959346 Author: Imre Deak Date: Fri Apr 4 18:03:08 2025 +0300 drm/i915/dp_mst: Rename intel_dp_mst_encoder_active_links() to intel_dp_mst_active_streams() It's not clear which encoder intel_dp_mst_encoder_active_links() refers to (primary/stream), but there is also no reason to call the queried property an encoder property; remove encoder from the name. Also it's the number of MST streams being queried, vs. the number of MST links (there is one MST link carrying one or more MST streams), so rename link to stream as well. While at it pass intel_dp to the function, which is more logical and makes it easier to re-use the function later (without the need to get the digital port pointer). Also move the function earlier, next to the related ones. Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-5-imre.deak@intel.com commit 39abe4ad13958b480ced5770297889fbdbdf3695 Author: Imre Deak Date: Fri Apr 4 18:03:07 2025 +0300 drm/i915/dp_mst: Remove stream count assert from intel_dp_check_mst_status() There doesn't seem to be a reason to assert for a non-negative stream counter in intel_dp_check_mst_status() in particular, remove it. There is now an equivalent assert in intel_dp_mst_dec_active_streams(). Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-4-imre.deak@intel.com commit 59e8cd62f5a6f09cfdaf2847d051bac99ea4a8f3 Author: Imre Deak Date: Fri Apr 4 18:03:06 2025 +0300 drm/i915/dp_mst: Add intel_dp_mst_{inc, dec}_active_streams() Add helpers to increment/decrement the active MST stream count, instead of open-coding these. In mst_stream_pre_enable(), the increment will happen earlier, this is ok, since nothing depends on the counter between the two points. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-3-imre.deak@intel.com commit db0f7e20c284dba5fb087dd09f56db9faed560f4 Author: Imre Deak Date: Fri Apr 4 18:03:05 2025 +0300 drm/i915/dp: Rename intel_dp::link_trained to link.active The intel_dp::link_trained flag indicates whether the link is active, regardless of whether the link training passed or failed. For clarity rename the flag to 'active'. While at it move the flag under intel_dp::link. Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250404150310.1156696-2-imre.deak@intel.com commit 9521f9ba82b5a6e77ece46ea06cef61b97f5b45f Author: Thomas Zimmermann Date: Mon Mar 24 10:44:11 2025 +0100 drm/ast: Validate display modes against framebuffer and format limits Reimplement ast_mode_config_mode_valid() with DRM format helpers and ast's helpers for framebuffer size calculation. Replaces ast's open- coded assumptions on bpp and page-alignments. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250324094520.192974-4-tzimmermann@suse.de commit 23fd03aa6c08fbf1ba0644aae8c30b6166fe39e8 Author: Thomas Zimmermann Date: Mon Mar 24 10:44:10 2025 +0100 drm/ast: Remove vaddr field from struct ast_plane The vaddr field in struct ast_plane serves no purpose. Its value can be calculated easily from the VRAM base plus the plane offset. Do so and remove the field. In ast_primary_plane_helper_get_scanout_buffer(), remove the test for vaddr being NULL. This cannot legally happen. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250324094520.192974-3-tzimmermann@suse.de commit 7cce65f3789e04c0f7668a66563e680d81d54493 Author: Thomas Zimmermann Date: Mon Mar 24 10:44:09 2025 +0100 drm/ast: Fix comment on modeset lock The ast driver protects the commit tail against concurrent reads of the display modes by acquiring a lock. The comment is misleading as the lock is not released in atomic_flush, but at the end of the commit-tail helper. Rewrite the comment. Signed-off-by: Thomas Zimmermann Fixes: 1fe182154984 ("drm/ast: Acquire I/O-register lock in atomic_commit_tail function") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.2+ Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250324094520.192974-2-tzimmermann@suse.de commit f5b444361435bfc9eeaaae3dd2e9b4f18dae3888 Author: Andrew Ballance Date: Sun Mar 16 06:16:44 2025 -0500 gpu: nova-core: remove completed Vec extentions from task list The requested Vec methods have been implemented thus, remove the completed item from the nova task list. Link: https://lore.kernel.org/r/20250316111644.154602-4-andrewjballance@gmail.com Signed-off-by: Andrew Ballance Signed-off-by: Danilo Krummrich commit 231adeda9f674ece664b09b75b68a4c023180fb4 Author: Dmitry Baryshkov Date: Fri Mar 14 11:36:50 2025 +0200 drm/bridge-connector: hook DisplayPort audio support Reuse existing code plumbing HDMI audio support and the existing HDMI audio helpers that register HDMI codec device and plumb in the DisplayPort audio interfaces to be handled by the drm_bridge_connector. Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/20250314-dp-hdmi-audio-v6-3-dbd228fa73d7@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit d87ecc232706ace682a900a45018d843f148da56 Author: Dmitry Baryshkov Date: Fri Mar 14 11:36:49 2025 +0200 drm/bridge: add function interface for DisplayPort audio implementation It is common for the DisplayPort bridges to implement audio support. In preparation to providing a generic framework for DP audio, add corresponding interface to struct drm_bridge. As suggested by Maxime for now this is mostly c&p of the corresponding HDMI audio API. Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/20250314-dp-hdmi-audio-v6-2-dbd228fa73d7@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 5d04b41889596adab613b0e2f27f76f6414cda66 Author: Dmitry Baryshkov Date: Mon Apr 7 15:48:23 2025 +0300 drm/bridge: split HDMI Audio from DRM_BRIDGE_OP_HDMI As pointed out by Laurent, OP bits are supposed to describe operations. Split DRM_BRIDGE_OP_HDMI_AUDIO from DRM_BRIDGE_OP_HDMI instead of overloading DRM_BRIDGE_OP_HDMI. Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/20250314-dp-hdmi-audio-v6-1-dbd228fa73d7@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 321550859f3bd64f547d0b4e9fbd97bd539ef47c Author: Boris Ostrovsky Date: Thu Mar 27 19:05:03 2025 -0400 x86/microcode/AMD: Clean the cache if update did not load microcode If microcode did not get loaded there is no reason to keep it in the cache. Moreover, if loading failed it will not be possible to load an earlier version of microcode since the failed revision will always be selected from the cache on the next reload attempt. Since the failed revisions is not easily available at this point just clean the whole cache. It will be rebuilt later if needed. Signed-off-by: Boris Ostrovsky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250327230503.1850368-3-boris.ostrovsky@oracle.com commit 1679b7159379d11100e4ab7d1de23c8cd7765aa1 Author: Andrew Ballance Date: Sun Mar 16 06:16:43 2025 -0500 rust: alloc: add Vec::resize method Implement the equivalent of the rust std's Vec::resize on the kernel's Vec type. Reviewed-by: Benno Lossin Reviewed-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250316111644.154602-3-andrewjballance@gmail.com Signed-off-by: Andrew Ballance [ Use checked_sub(), as suggested by Tamir. - Danilo ] Signed-off-by: Danilo Krummrich commit 81e1c4dab5d0c508907722f18b028102454d52e6 Author: Andrew Ballance Date: Sun Mar 16 06:16:42 2025 -0500 rust: alloc: add Vec::truncate method Implement the equivalent to the std's Vec::truncate on the kernel's Vec type. Link: https://lore.kernel.org/r/20250316111644.154602-2-andrewjballance@gmail.com Signed-off-by: Andrew Ballance [ Rewrote safety comment of set_len(). - Danilo ] Signed-off-by: Danilo Krummrich commit 1afba39f9305fe4061a4e70baa6ebab9d41459da Merge: fbe43810d563a2 0af2f6be1b4281 Author: Thomas Zimmermann Date: Mon Apr 7 13:47:40 2025 +0200 Merge drm/drm-next into drm-misc-next Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST. Signed-off-by: Thomas Zimmermann commit ced5e64f011cb5cd541988442997ceaa7385827e Author: Ankit Nautiyal Date: Fri Apr 4 13:35:40 2025 +0530 drm/i915/vrr: Add vrr.vsync_{start, end} in vrr_params_changed Add the missing vrr parameters in vrr_params_changed() helper. This ensures that changes in vrr.vsync_{start,end} trigger a call to appropriate helpers to update the VRR registers. Fixes: e8cd188e91bb ("drm/i915/display: Compute vrr_vsync params") Cc: Mitul Golani Cc: Arun R Murthy Cc: Ankit Nautiyal Cc: Jani Nikula Cc: # v6.10+ Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250404080540.2059511-1-ankit.k.nautiyal@intel.com commit 602ae04f56542d8ed76eb5f9cdf688850e71a5f6 Author: Nikolaos Pasaloukos Date: Thu Mar 27 11:27:05 2025 +0000 gpio: Enable Blaize BLZP1600 GPIO support Blaize BLZP1600 GPIO controller is provided by VeriSilicon Microelectronics based on the GPIO APB v0.2 design. It has 32 input/output ports which can be configured as edge or level triggered interrupts. It also provides a de-bounce feature. This controller is used on the Blaize BLZP1600 SoC. Reviewed-by: Linus Walleij Signed-off-by: Nikolaos Pasaloukos Link: https://lore.kernel.org/r/20250327-kernel-upstreaming-add_gpio_support-v2-2-bbe51f8d66da@blaize.com Signed-off-by: Bartosz Golaszewski commit 338893af8e0d442abcd9f3f56a17fd37d60142c3 Author: Nikolaos Pasaloukos Date: Thu Mar 27 11:27:04 2025 +0000 dt-bindings: Document Blaize BLZP1600 GPIO driver This is a custom silicon GPIO driver provided by VeriSilicon Microelectronics. It has 32 input/output ports which can be configured as edge or level triggered interrupts. It also provides a de-bounce feature. This controller is used on the Blaize BLZP1600 SoC. Signed-off-by: Nikolaos Pasaloukos Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20250327-kernel-upstreaming-add_gpio_support-v2-1-bbe51f8d66da@blaize.com Signed-off-by: Bartosz Golaszewski commit fb1bf1067de979c89ae33589e0466d6ce0dde204 Author: Danilo Krummrich Date: Sat Mar 15 16:43:02 2025 +0100 rust: alloc: add missing invariant in Vec::set_len() When setting a new length, we have to justify that the set length represents the exact number of elements stored in the vector. Reviewed-by: Benno Lossin Reported-by: Alice Ryhl Closes: https://lore.kernel.org/rust-for-linux/20250311-iov-iter-v1-4-f6c9134ea824@google.com Fixes: 2aac4cd7dae3 ("rust: alloc: implement kernel `Vec` type") Link: https://lore.kernel.org/r/20250315154436.65065-2-dakr@kernel.org Signed-off-by: Danilo Krummrich commit b3d9e96c96b0076a11aa1001d55b3dc189b8cd1c Author: Yang Li Date: Mon Apr 7 14:45:32 2025 +0800 regulator: pf9453: Improve documentation for pf9453_regulator_set_ramp_delay_regmap The function pf9453_regulator_set_ramp_delay_regmap lacked detailed parameter descriptions and return value explanations in its documentation. This patch improves the documentation by adding specific details about the parameters, their usage, and the return values, enhancing clarity for developers. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=20168 Signed-off-by: Yang Li Link: https://patch.msgid.link/20250407064532.22680-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit ce2eadc6f99263dd200e52f692dc7a22698c99f3 Author: Peng Fan Date: Thu Mar 27 08:49:45 2025 +0800 regulator: s5m8767: Convert to GPIO descriptors Update the driver to fetch buck_gpio and buck_ds as GPIO descriptors. Then drop the usage of 'of_gpio.h' which should be deprecated. Based on commit 84618d5e31cf ("regulator: max8997: Convert to GPIO descriptors") as a reference to make the changes. With the quirk fix for s5m8767 in of_gpio_try_fixup_polarity, the polarity will be active-high, even if exynos5250 spring DTS wrongly use active-low polarity. So using GPIO descriptors, it should work as before. Signed-off-by: Peng Fan Acked-by: Mark Brown Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250327004945.563765-2-peng.fan@oss.nxp.com Signed-off-by: Mark Brown commit fd02aa45bda6d2f2fedcab70e828867332ef7e1c Merge: 7d7685631a0e8c 7bcf7246c42a81 Author: Paolo Bonzini Date: Wed Mar 19 09:46:59 2025 -0400 Merge branch 'kvm-tdx-initial' into HEAD This large commit contains the initial support for TDX in KVM. All x86 parts enable the host-side hypercalls that KVM uses to talk to the TDX module, a software component that runs in a special CPU mode called SEAM (Secure Arbitration Mode). The series is in turn split into multiple sub-series, each with a separate merge commit: - Initialization: basic setup for using the TDX module from KVM, plus ioctls to create TDX VMs and vCPUs. - MMU: in TDX, private and shared halves of the address space are mapped by different EPT roots, and the private half is managed by the TDX module. Using the support that was added to the generic MMU code in 6.14, add support for TDX's secure page tables to the Intel side of KVM. Generic KVM code takes care of maintaining a mirror of the secure page tables so that they can be queried efficiently, and ensuring that changes are applied to both the mirror and the secure EPT. - vCPU enter/exit: implement the callbacks that handle the entry of a TDX vCPU (via the SEAMCALL TDH.VP.ENTER) and the corresponding save/restore of host state. - Userspace exits: introduce support for guest TDVMCALLs that KVM forwards to userspace. These correspond to the usual KVM_EXIT_* "heavyweight vmexits" but are triggered through a different mechanism, similar to VMGEXIT for SEV-ES and SEV-SNP. - Interrupt handling: support for virtual interrupt injection as well as handling VM-Exits that are caused by vectored events. Exclusive to TDX are machine-check SMIs, which the kernel already knows how to handle through the kernel machine check handler (commit 7911f145de5f, "x86/mce: Implement recovery for errors in TDX/SEAM non-root mode") - Loose ends: handling of the remaining exits from the TDX module, including EPT violation/misconfig and several TDVMCALL leaves that are handled in the kernel (CPUID, HLT, RDMSR/WRMSR, GetTdVmCallInfo); plus returning an error or ignoring operations that are not supported by TDX guests Signed-off-by: Paolo Bonzini commit f81f69a0e3da141bdd73a16b8676f4e542533d87 Author: Nas Chung Date: Thu Jul 25 15:10:34 2024 +0900 media: uapi: v4l: Fix V4L2_TYPE_IS_OUTPUT condition V4L2_TYPE_IS_OUTPUT() returns true for V4L2_BUF_TYPE_VIDEO_OVERLAY which definitely belongs to CAPTURE. Signed-off-by: Nas Chung Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 8e172e38a623ce284baf2514f963b29e4d47c62e Author: Nas Chung Date: Thu Jul 25 15:10:33 2024 +0900 media: qcom: venus: Fix uninitialized variable warning Avoid uninitialized variable when both V4L2_TYPE_IS_OUTPUT() and V4L2_TYPE_IS_CAPTURE() return false. Signed-off-by: Nas Chung Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit ad2698efce37e910dcf3c3914263e6cb3e86f8cd Author: Nas Chung Date: Thu Jul 25 15:10:32 2024 +0900 media: uapi: v4l: Change V4L2_TYPE_IS_CAPTURE condition Explicitly compare a buffer type only with valid buffer types, to avoid matching a buffer type outside of the valid buffer type set. Signed-off-by: Nas Chung Reviewed-by: Michael Tretter Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 7d7685631a0e8cc129c0b2411e95788f2d45226e Merge: b6262dd6951075 c0b8dcabb2cddc Author: Paolo Bonzini Date: Fri Apr 4 07:12:32 2025 -0400 Merge branch 'kvm-pi-fix-lockdep' into HEAD commit b6262dd69510752504e74ec24ebfd0783065c9b9 Merge: 39c572247ee70a bc52ae0a708cb6 Author: Paolo Bonzini Date: Fri Apr 4 07:07:54 2025 -0400 Merge branch 'kvm-6.15-rc2-fixes' into HEAD commit 39c572247ee70a530e137ba9d3b58cb221f65127 Merge: 6bf050f9cb5985 269a2c3663c6d1 Author: Paolo Bonzini Date: Fri Apr 4 06:32:44 2025 -0400 Merge branch 'kvm-6.15-rc2-cleanups' into HEAD commit 6bf050f9cb5985678a5835073c2e63f0e3cb2b3b Merge: 0af2f6be1b4281 0c7fbae5bc7824 Author: Paolo Bonzini Date: Mon Mar 31 06:08:11 2025 -0400 Merge tag 'kvm-s390-next-6.15-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD Pointer print format fixes commit 70081121e24cacbef8b3be849cc13bea31f8a158 Author: Chen Ni Date: Thu Mar 27 10:52:44 2025 +0800 platform: arm64: huawei-gaokun-ec: Remove unneeded semicolon Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20250327025244.1790897-1-nichen@iscas.ac.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a62372b6c9284ed42c68a0d8b3148f2dde61b4e4 Author: Gustavo A. R. Silva Date: Thu Mar 27 13:22:44 2025 -0600 platform/x86: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration to the end of the structure. Notice that `struct acpi_resource_irq` is a flexible structure --a structure that contains a flexible-array member. Fix the following warning: drivers/platform/x86/sony-laptop.c:3330:41: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Z-WlhL_tAP11M02G@kspp Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit fbe43810d563a293e3de301141d33caf1f5d5c5a Author: Luca Ceresoli Date: Wed Mar 26 18:47:39 2025 +0100 drm/bridge: samsung-dsim: use dynamic lifetime management Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-5-5e0661fe1f84@bootlin.com Signed-off-by: Louis Chauvet commit cb14da141e660494217442f130a18c1dcc33355f Author: Luca Ceresoli Date: Wed Mar 26 18:47:38 2025 +0100 drm/bridge: ti-sn65dsi83: use dynamic lifetime management Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-4-5e0661fe1f84@bootlin.com Signed-off-by: Louis Chauvet commit b3f13e00a8de351832df7d628a15ca4db49ca94f Author: Luca Ceresoli Date: Wed Mar 26 18:47:37 2025 +0100 drm/bridge: make devm_drm_bridge_alloc() mandatory for bridge allocation All DRM bridges are now supposed to be allocated using devm_drm_bridge_alloc(), which is cleaner and necessary to support refcounting. In the absence of a drm_bridge_init() or such initialization function, document the new mandatory alloc function on the first DRM bridge core function that is called after allocation, i.e. drm_bridge_add(). Suggested-by: Maxime Ripard Signed-off-by: Luca Ceresoli Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-3-5e0661fe1f84@bootlin.com Signed-off-by: Louis Chauvet commit 30d1b37d4c022b5e6c164c090a60a3be1a66876e Author: Luca Ceresoli Date: Wed Mar 26 18:47:36 2025 +0100 drm/bridge: add support for refcounting DRM bridges are currently considered as a fixed element of a DRM card, and thus their lifetime is assumed to extend for as long as the card exists. New use cases, such as hot-pluggable hardware with video bridges, require DRM bridges to be added to and removed from a DRM card without tearing the card down. This is possible for connectors already (used by DP MST), it is now needed for DRM bridges as well. As a first preliminary step, make bridges reference-counted to allow a struct drm_bridge (along with the private driver structure embedding it) to stay allocated even after the driver has been removed, until the last reference is put. Signed-off-by: Luca Ceresoli Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-2-5e0661fe1f84@bootlin.com Signed-off-by: Louis Chauvet commit 0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec Author: Luca Ceresoli Date: Wed Mar 26 18:47:35 2025 +0100 drm/bridge: add devm_drm_bridge_alloc() Add a macro to allocate and initialize a DRM bridge embedded within a private driver struct. Compared to current practice, which is based on [devm_]kzalloc() allocation followed by open-coded initialization of fields, this allows to have a common and explicit API to allocate and initialize DRM bridges. Besides being useful to consolidate bridge driver code, this is a fundamental step in preparation for adding dynamic lifetime to bridges based on refcount. Reviewed-by: Maxime Ripard Signed-off-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250326-drm-bridge-refcount-v9-1-5e0661fe1f84@bootlin.com Signed-off-by: Louis Chauvet commit 81feddc12613567d8206a9697d068711140e9c47 Author: Alexandru Dadu Date: Wed Apr 2 09:40:05 2025 +0100 drm/imagination: loop counters moved to loop scope Reduce the scope of some loop counters as these aren't needed outside the loops they're used in. Signed-off-by: Alexandru Dadu Reviewed-by: Matt Coster Link: https://lore.kernel.org/r/20250402-for-loop-counter-scope-v2-1-4fd550d22832@imgtec.com Signed-off-by: Matt Coster commit 814d270b31d27b6ea4f722b8ae2db9802fe332ff Author: Thomas Zimmermann Date: Tue Apr 1 11:37:21 2025 +0200 drm/sysfb: vesadrm: Add gamma correction Add palette support and export GAMMA properties via sysfs. User-space compositors can use this interface for programming gamma ramps or night mode. Vesadrm supports palette updates via VGA DAC registers or VESA palette calls. Up to 256 palette entries are available. Userspace always supplies gamma ramps of 256 entries. If the native color format does not match this because pixel component have less then 8 bits, vesadrm interpolates among the palette entries. The code uses CamelCase style in a few places to match the VESA manuals. v3: - fix coding style v2: - use CONFIG_X86_32 instead of __i386__ (checkpatch) - protect struct vesadrm.pmi with CONFIG_X86_32 Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-19-tzimmermann@suse.de commit 9d0de9e8b7087745e63eef7bee298e103da4f590 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:20 2025 +0200 drm/sysfb: vesadrm: Add EDID support Enable the connector's EDID property if edid_info contains valid data. Exports the EDID via sysfs for user-space compositors. EDID information is not always available. Depending on the system and kernel configuration, it is either provided by the boot loader or read by the kernel during early boot stages. There's only one VESA display, so EDID data always belongs to this output. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-18-tzimmermann@suse.de commit a84eb6abe2b6a7201610645749275c8ac999fd1a Author: Thomas Zimmermann Date: Tue Apr 1 11:37:19 2025 +0200 drm/sysfb: Add vesadrm for VESA displays Add support for screen_info setups with VIDEO_TYPE_VLFB. Provide the minimum functionality of reading modes, updating and clearing the display. There is existing support for these displays provided by simpledrm with CONFIG_SYSFB_SIMPLEFB=y. Using vesadrm over simpledrm will allow for the use of additional functionality provided by VESA, such as EDID information, gamma correction and palette modes. This enhances the user experience and adds support for more display configuratons. v4: - depend on CONFIG_X86 v3: - depend on !SYSFB_SIMPLEFB (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-17-tzimmermann@suse.de commit 305396ac7782c2f1aba407bab06e9da68588ffef Author: Thomas Zimmermann Date: Tue Apr 1 11:37:18 2025 +0200 drm/sysfb: efidrm: Add EDID support Enable the connector's EDID property if edid_info contains valid data. Exports the EDID via sysfs for user-space compositors. EDID information is not always available. Depending on the system and kernel configuration, it is either provided by the boot loader or read by the kernel during early boot stages. As of now, there's only one EFI display, so that EDID data always belongs to this output. This might change if there's ever more than one EFI display in the system. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-16-tzimmermann@suse.de commit 32ae90c66fb62e4f6ae859422f733dfb249f10cf Author: Thomas Zimmermann Date: Tue Apr 1 11:37:17 2025 +0200 drm/sysfb: Add efidrm for EFI displays Add support for screen_info setups with VIDEO_TYPE_EFI. Provide the minimum functionality of reading modes, updating and clearing the display. There is existing support for these displays provided by simpledrm with CONFIG_SYSFB_SIMPLEFB=y. Using efidrm over simpledrm will allows for the mapping of video memory with correct caching. Simpledrm always assumes WC caching, while fully cached memory is possible with efidrm. Efidrm will also allow for the use of additional functionality provided by EFI, such as EDID information. In addition to efidrm, add struct pixel_format plus initializer macros. The type and macros describe pixel formats in a generic way on order to find the DRM format from the screen_info settings. Similar existing code in SIMPLEFB_FORMATS and fbdev is not really what is needed in efidrm, but SIMPLEFB_FORMATS can later be converted to struct pixel_format. v4: - depend on CONFIG_EFI - disallow module for now as efi_mem_desc_lookup() is not exported v3: - depend on !SYSFB_SIMPLEFB (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-15-tzimmermann@suse.de commit 1ce4c3aeef333be1e6290ec6d1f7891c2bfc7a1f Author: Thomas Zimmermann Date: Tue Apr 1 11:37:16 2025 +0200 firmware: sysfb: Move bpp-depth calculation into screen_info helper Move the calculation of the bits per pixels for screen_info into a helper function. This will make it available to other callers besides the firmware code. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-14-tzimmermann@suse.de commit e7f435b3dcf7f290fa97538ec26b41c1d2eff138 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:15 2025 +0200 drm/sysfb: ofdrm: Add EDID support Add EDID support to sysfb connector helpers. Read the EDID property from the OF node in ofdrm. Without EDID, this does nothing. Some systems with OF display, such as 32-bit PPC Macintoshs, provide the system display's EDID data as node property in their DT. Exporting this information allows compositors to implement correct DPI and meaningful color management. v3: - avoid parser error by clearing EDID extension field v2: - return errno codes on errors (Jani) - simplify EDID read logic (Jani) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-13-tzimmermann@suse.de commit 177dfbdb7e67db24d86dbd41cde20813d6e820cc Author: Thomas Zimmermann Date: Tue Apr 1 11:37:14 2025 +0200 drm/sysfb: Merge primary-plane functions Merge the primary plane code of ofdrm and simpledrm. Replace the plane implementation in each driver with the shared helpers. Set up driver callbacks and format modifiers with initializer macros. The plane code in ofdrm and simpledrm is very similar. Ofdrm has a more sophisticated implementation of atomic_disable, which clears individual scanlines. The code in simpledrm clears the whole buffer at once. Take the ofdrm version. Simpledrm supports get_scanout_buffer. Import it into the shared helpers, which makes it available in ofdrm. The supported formats are all native formats plus an optional enulated XRGB8888 if that's not already a native format. Provide an initializer macro that computes the size of the formats array. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-12-tzimmermann@suse.de commit ea86aba47c3a724ea18a26ad498c1835f087dc63 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:13 2025 +0200 drm/sysfb: Merge CRTC functions Merge the CRTC functions of ofdrm and simpledrm. Replace the code in each driver with the shared helpers. Set up callbacks with initializer macros. Ofdrm supports a gamma LUT, while simpledrm does not. So far ofdrm's LUT size has been hard-coded in the driver CRTC's atomic_check helper. Now pass the size of the LUT to the sysfb device. Ofdrm's custom atomic_flush is still required to apply changes to the LUT. Simpledrm passes a LUT size of 0, which disables the gamma LUT. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-11-tzimmermann@suse.de commit 68ab3253df1312bc22257cc217d77cdaef14186a Author: Thomas Zimmermann Date: Tue Apr 1 11:37:12 2025 +0200 drm/sysfb: Maintain CRTC state in struct drm_sysfb_crtc_state Move ofdrm's struct ofdrm_crtc_state plus functions to sysfb helpers and rename everything to drm_sysfb_crtc_state. The sysfb CRTC state is a regular CRTC state with information on the primary plane's color format, as required for color management. Helpers for sysfb planes will later set this up automatically. In ofdrm and simpledrm, replace existing code with the new helpers. Ofdrm continues to use the CRTC state for color management. This has no effect on simpledrm. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-10-tzimmermann@suse.de commit 01e48e52268fc7f0812654f10beefb63f79a4223 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:11 2025 +0200 drm/sysfb: Merge connector functions Merge the connector functions of ofdrm and simpledrm. Replace the code in each driver with the shared helpers. Set up callbacks with initializer macros. No effective code changes. The sysfb connector only returns the preconfigured display mode. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-9-tzimmermann@suse.de commit 559d105f3ad3f0e8bd9d2c2fbdfe93391fae2602 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:10 2025 +0200 drm/sysfb: Merge mode-config functions Provide initializer to set struct drm_mode_config_funcs. Convert ofdrm and simpledrm. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-8-tzimmermann@suse.de commit 333376e9cf1cb126b87aa8c1664c4e62a58ecc23 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:09 2025 +0200 drm/sysfb: Provide single mode-init helper Merge the mode-init functions of ofdrm and simpledrm to the new helper drm_sysfb_mode(). Also implement the DPI defaults there. Replace the code in each driver with the shared helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-7-tzimmermann@suse.de commit b5626f6f8f4db2f1dd354f70dfe8e747cb3cbcc9 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:08 2025 +0200 drm/sysfb: Add struct drm_sysfb_device Add struct drm_sysfb_device that stores the system display's hardware settings. Further helpers for the mode-setting pipeline will use these fields. Convert ofdrm and simpledrm by embedding the sysfb device in their device structs. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-6-tzimmermann@suse.de commit 319251c5e3840410d4bef27b17aa2c2573d28edd Author: Thomas Zimmermann Date: Tue Apr 1 11:37:07 2025 +0200 drm: Move sysfb drivers into separate subdirectory The ofdrm and simpledrm drivers are special as they operate on externally provided framebuffers. Move them into their own sub- directory. Will let them share common code. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-5-tzimmermann@suse.de commit b2033b64bfe6cdd13f4f7dace4b55a9530a533b7 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:06 2025 +0200 drm/simpledrm: Remove struct simpledrm_device.nformats The field nformats is unused. Remove it. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-4-tzimmermann@suse.de commit bca75ed92a6ecd13061798c37e26026b0967ffc0 Author: Thomas Zimmermann Date: Tue Apr 1 11:37:05 2025 +0200 drm/ofdrm: Open-code drm_simple_encoder_init() The helper drm_simple_encoder_init() is a trivial helper around drm_encoder_init() and therefore deprecated. Open-code the function and remove the dependency. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-3-tzimmermann@suse.de commit 544ab3be96924201834cef0b626f8f5ddb139c4f Author: Thomas Zimmermann Date: Tue Apr 1 11:37:04 2025 +0200 drm/ofdrm: Remove struct ofdrm_device.pdev The field pdev is unused. Remove it. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250401094056.32904-2-tzimmermann@suse.de commit 1a9c17399d2b66af73bf7a2b9cddb916caefe621 Author: Biju Das Date: Sun Mar 9 18:43:24 2025 +0000 arm64: dts: renesas: Remove undocumented compatible micron,mt25qu512a Remove undocumented compatible micron,mt25qu512a. This fixes the dtbs warning: failed to match any schema with compatible: ['micron,mt25qu512a', 'jedec,spi-nor'] Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250309184326.75452-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 0dde247f5027fa5adf2b0d95147a2b1150040078 Author: Geert Uytterhoeven Date: Wed Mar 5 14:35:13 2025 +0100 arm64: dts: renesas: r8a779f4: Add UFS tuning parameters in E-FUSE Describe the location in the E-FUSE block of the PLL and AFE tuning parameters for the Universal Flash Storage controller. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/3e4fca228eb049d54a1ae520104558505dbdf803.1741179629.git.geert+renesas@glider.be commit b7509775670d69999096b55c0e90a4e03a373bae Author: Biju Das Date: Fri Feb 7 11:36:44 2025 +0000 arm64: dts: renesas: r9a09g047: Add ICU node Add interrupt control node to RZ/G3E ("R9A09G047") SoC DTSI and add icu as interrupt-parent of pincontrol. Reviewed-by: Fabrizio Castro Reviewed-by: Tommaso Merciai Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250207113653.21641-13-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ae9edcbc712249832beb3f5457cb03cc809f72c4 Author: Biju Das Date: Thu Feb 6 13:40:32 2025 +0000 arm64: dts: renesas: r9a09g047e57-smarc: Enable SDHI1 Enable SDHI1 on the RZ/G3E SMARC EVK platform using gpio regulator for voltage switching. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250206134047.67866-9-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4c85281bed1732693f2f2e32cf60e0e30722d06e Author: Biju Das Date: Thu Feb 6 13:40:31 2025 +0000 arm64: dts: renesas: rzg3e-smarc-som: Add support to enable SD on SDHI0 Add support for enabling SD on SDHI0 on RZ/G3E SMARC SoM. It is enabled by setting the macro SW_SD0_DEV_SEL to 1 in board DTS and setting the switch SYS.1 to ON position on the SoM. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250206134047.67866-8-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 16bce534a391487c56aa266dff2ac5733b207f5c Author: Biju Das Date: Thu Feb 6 13:40:30 2025 +0000 arm64: dts: renesas: rzg3e-smarc-som: Enable SDHI{0,2} Enable eMMC on SDHI0 and SD on SDHI2 on RZ/G3E SMARC SoM. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250206134047.67866-7-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 674080a22768dd4c30f2272acbe03fe94c7387cf Author: Biju Das Date: Thu Feb 6 13:40:29 2025 +0000 arm64: dts: renesas: r9a09g057: Add support for enabling SDHI internal regulator Add support for enabling SDHI internal regulator, by overriding the status on the board DTS, when needed. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/20250206134047.67866-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c4e4e22870acae3a3fe3fe0638f85175976dc906 Author: Biju Das Date: Thu Feb 6 13:40:28 2025 +0000 arm64: dts: renesas: r9a09g047: Add SDHI0-SDHI2 nodes Add SDHI0-SDHI2 nodes to RZ/G3E ("R9A09G047") SoC DTSI. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/20250206134047.67866-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d5be7722d1736827a850556fd4d93e0fe2608c15 Author: Maxime Ripard Date: Thu Apr 3 15:33:33 2025 +0200 drm/vc4: tests: Retry pv-muxing tests when EDEADLK Some functions used by the HVS->PV muxing tests can return with EDEADLK, meaning the entire sequence should be restarted. It's not a fatal error and we should treat it as a recoverable error, and recover, instead of failing the test like we currently do. Fixes: 76ec18dc5afa ("drm/vc4: tests: Add unit test suite for the PV muxing") Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-4-e09195cc8840@kernel.org Signed-off-by: Maxime Ripard commit 7e0351ae91ed2b6178abbfae96c3c6aaa1652567 Author: Maxime Ripard Date: Thu Apr 3 15:33:32 2025 +0200 drm/vc4: tests: Stop allocating the state in test init The vc4-pv-muxing-combinations and vc5-pv-muxing-combinations test suites use a common test init function which, in part, allocates the drm atomic state the test will use. That allocation relies on drm_kunit_helper_atomic_state_alloc(), and thus requires a struct drm_modeset_acquire_ctx. This context will then be stored in the allocated state->acquire_ctx field. However, the context is local to the test init function, and is cleared as soon as drm_kunit_helper_atomic_state_alloc() is done. We thus end up with an dangling pointer to a cleared context in state->acquire_ctx for our test to consumes. We should really allocate the context and the state in the test functions, so we can also control when we're done with it. Fixes: 30188df0c387 ("drm/tests: Drop drm_kunit_helper_acquire_ctx_alloc()") Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-3-e09195cc8840@kernel.org Signed-off-by: Maxime Ripard commit 321e644716a3dd517cfa0a035deb3a2a0209f0db Author: Maxime Ripard Date: Thu Apr 3 15:33:31 2025 +0200 drm/vc4: tests: Document output handling functions vc4_mock_atomic_add_output() and vc4_mock_atomic_del_output() are public but aren't documented. Let's provide the documentation. In particular, special care should be taken to deal with EDEADLK. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-2-e09195cc8840@kernel.org Signed-off-by: Maxime Ripard commit 9e26a3740cc08ef8bcdc5e5d824792cd677affce Author: Maxime Ripard Date: Thu Apr 3 15:33:30 2025 +0200 drm/vc4: tests: Use return instead of assert The vc4_mock_atomic_add_output() and vc4_mock_atomic_del_output() assert that the functions they are calling didn't fail. Since some of them can return EDEADLK, we can't properly deal with it. Since both functions are expected to return an int, and all caller check the return value, let's just properly propagate the errors when they occur. Fixes: f759f5b53f1c ("drm/vc4: tests: Introduce a mocking infrastructure") Fixes: 76ec18dc5afa ("drm/vc4: tests: Add unit test suite for the PV muxing") Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-1-e09195cc8840@kernel.org Signed-off-by: Maxime Ripard commit 03c14f97544f6e035f318b1a60446a12d88db8b4 Author: Anusha Srivatsa Date: Tue Apr 1 12:03:53 2025 -0400 panel/panel-edp: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-10-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit b30a15a4e7e54b676d6c395e71daf5f286997731 Author: Anusha Srivatsa Date: Tue Apr 1 12:03:52 2025 -0400 panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-9-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit ff97cc8a55a539ec8be548a800d5ac317b2df133 Author: Anusha Srivatsa Date: Tue Apr 1 12:03:51 2025 -0400 panel/dsi-cm: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-8-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 5d2b55e55e61be1b7d78915607254c6ef0226cee Author: Anusha Srivatsa Date: Tue Apr 1 12:03:50 2025 -0400 panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-7-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 77dcbce63779a94b134a4aab883834fb2f8332ff Author: Anusha Srivatsa Date: Tue Apr 1 12:03:49 2025 -0400 panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-6-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 416053010091e00ed52cc05d2deeafb42b47e199 Author: Anusha Srivatsa Date: Tue Apr 1 12:03:48 2025 -0400 panel/bf060y8m-aj0: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-5-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 9d7d7c3c9a191864367b28e05b312ab3ac34ef0a Author: Anusha Srivatsa Date: Tue Apr 1 12:03:47 2025 -0400 panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-4-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit d816d1af0fec8b1f8bb6d6f96732c11974ddb2a1 Author: Anusha Srivatsa Date: Tue Apr 1 12:03:46 2025 -0400 panel/z00t-tm5p5-n35596: Use refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-3-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 341460a6c27ae74e9dc7f05a2541047a8c65f5ad Author: Anusha Srivatsa Date: Tue Apr 1 12:03:45 2025 -0400 panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-2-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 2311be8bb46dd4ac50f2a82abf7ae7d6608fa62f Author: Anusha Srivatsa Date: Tue Apr 1 12:03:44 2025 -0400 panel/abt-y030xx067a: Use the refcounted allocation in place of devm_kzalloc() Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-1-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard commit 4a65326311aba694faafcef9e3c0ef7ae1b722e6 Author: Michal Wilczynski Date: Mon Mar 3 16:25:11 2025 +0100 reset: thead: Add TH1520 reset controller driver Add reset controller driver for the T-HEAD TH1520 SoC that manages hardware reset lines for various subsystems. The driver currently implements support for GPU reset control, with infrastructure in place to extend support for NPU and Watchdog Timer resets in future updates. Reviewed-by: Philipp Zabel Signed-off-by: Michal Wilczynski Link: https://lore.kernel.org/r/20250303152511.494405-3-m.wilczynski@samsung.com Signed-off-by: Philipp Zabel commit 30e7573babdcd46542364a2505d34112e62d5a22 Author: Michal Wilczynski Date: Mon Mar 3 16:25:10 2025 +0100 dt-bindings: reset: Add T-HEAD TH1520 SoC Reset Controller Add a YAML schema for the T-HEAD TH1520 SoC reset controller. This controller manages resets for subsystems such as the GPU within the TH1520 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michal Wilczynski Link: https://lore.kernel.org/r/20250303152511.494405-2-m.wilczynski@samsung.com Signed-off-by: Philipp Zabel commit ac7d33f3899762b5d0c90a51a96ea11b6d7660ba Author: Emanuele Ghidoli Date: Mon Mar 31 09:26:44 2025 +0200 dt-bindings: gpio: pca95xx: add Toradex ecgpiol16 The Toradex ecgpiol16 is a 16-bit I2C I/O expander implemented using a small MCU. Its register interface and behavior are compatible with the PCAL6416. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250331072644.17921-1-francesco@dolcini.it Signed-off-by: Bartosz Golaszewski commit f4271a891dca46ecf6813273ed63e502862f45da Author: Krzysztof Kozlowski Date: Mon Mar 24 13:53:26 2025 +0100 dt-bindings: gpio: Correct indentation and style in DTS example DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. While re-indenting, drop unused labels. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sander Vanheule Reviewed-by: Manikandan Muralidharan Reviewed-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20250324125326.82270-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bartosz Golaszewski commit 7ae844a6650c5c15ccfbf76ed767e7f2cc61ec1d Author: Thomas Gleixner Date: Thu Mar 13 15:31:28 2025 +0100 genirq/generic-chip: Remove unused lock wrappers All users are converted to lock guards. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250313142524.388478168@linutronix.de commit b00bee8afaca47fd4f716488eb3663ac1f0abc31 Author: Thomas Gleixner Date: Thu Mar 13 15:31:27 2025 +0100 irqchip: Convert generic irqchip locking to guards Conversion was done with Coccinelle and a few manual fixups. In a few interrupt chip callbacks this changes replaces raw_spin_lock_irqsave() with a guard(raw_spinlock). That's intended and correct because those interrupt chip callbacks are invoked with the interrupt descriptor lock held and interrupts disabled. No point in using the irqsave variant. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250313142524.325627746@linutronix.de commit 9949aec666eb3e55522409f243fa6e873424fdc5 Author: Thomas Gleixner Date: Thu Mar 13 15:31:25 2025 +0100 gpio: mvebu: Convert generic irqchip locking to guard() Conversion was done with coccinelle. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250313142524.262678485@linutronix.de commit 73989a38268dd80f7f2c945b8e3097b7c9ee95f5 Author: Thomas Gleixner Date: Thu Mar 13 15:31:23 2025 +0100 ARM: orion/gpio:: Convert generic irqchip locking to guard() Conversion was done with Coccinelle. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250313142524.200515896@linutronix.de commit b54bd5a29b428afff4a37c7b6e1df67e43c327c3 Author: Thomas Gleixner Date: Thu Mar 13 15:31:21 2025 +0100 soc: dove: Convert generic irqchip locking to guard() Conversion was done with Coccinelle. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250313142524.137040686@linutronix.de commit 195298c3b11628a6c52c515c31470e673cf259a9 Author: Thomas Gleixner Date: Thu Mar 13 15:31:17 2025 +0100 genirq/generic-chip: Convert core code to lock guards Replace the irq_gc_lock/unlock() pairs with guards. There is no point to implement a guard wrapper for them as they just wrap around raw_spin_lock*(). Switch the other lock instances in the core code to guards as well. Conversion was done with Coccinelle plus manual fixups. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/all/20250313142524.073826193@linutronix.de commit 06f2f68a670aae28b825065439301831e74da880 Author: Thomas Gleixner Date: Thu Mar 13 15:31:15 2025 +0100 genirq/generic-chip: Make locking unconditional The SMP conditional wrappers around raw_spin_[un]lock() have no real value. On !SMP kernels the lock operations are NOOPs except for a preempt_disable/enable() pair on PREEMPT enabled kernels, which are not really worth to optimize for. Aside of that this evades lockdep on !SMP kernels. Remove the !SMP stubs and make it unconditional. No functional change. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250313142524.011345765@linutronix.de commit 8257afa5b14357bb4e0d434b34c6537f8d73757c Merge: 92ac7de3175e3c 4e310626eb4df5 Author: Bartosz Golaszewski Date: Mon Apr 7 09:42:01 2025 +0200 Merge tag 'gpio-s5m8767-polarity-quirk-for-v6.16-rc1' into gpio/for-next gpiolib: of: Add polarity quirk for s5m8767 commit 1902a59cf5f9d8b99ecf0cb8f122cb00ef7a3f13 Author: Caleb James DeLisle Date: Sun Mar 30 17:02:59 2025 +0000 irqchip: Add EcoNet EN751221 INTC Add a driver for the interrupt controller in the EcoNet EN751221 MIPS SoC. Signed-off-by: Caleb James DeLisle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250330170306.2584136-4-cjd@cjdns.fr commit 9773c540441c6ae15aefb49e67142e94369dbbc0 Author: Caleb James DeLisle Date: Sun Mar 30 17:02:58 2025 +0000 dt-bindings: interrupt-controller: Add EcoNet EN751221 INTC Document the device tree binding for the interrupt controller in the EcoNet EN751221 MIPS SoC. Signed-off-by: Caleb James DeLisle Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/all/20250330170306.2584136-3-cjd@cjdns.fr commit 1e940fff94374d04b6c34f896ed9fbad3d2fb706 Merge: 0af2f6be1b4281 4fc3f73c16dae0 Author: Christian Brauner Date: Fri Apr 4 16:06:55 2025 +0200 Merge patch series "pidfd: improve uapi when task isn't found" Christian Brauner says: We currently report EINVAL whenever a struct pid has no tasked attached anymore thereby conflating two concepts: (1) The task has already been reaped. (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader. This is causing issues for non-threaded workloads as in [1] where they expect ESRCH to be reported, not EINVAL. I think that's a very resonable assumption. This patch tries to allow userspace to distinguish between (1) and (2). This is racy of course but that shouldn't matter. * patches from https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-0-a123b6ed6716@kernel.org: selftest/pidfd: add test for thread-group leader pidfd open for thread pidfd: improve uapi when task isn't found pidfd: remove unneeded NULL check from pidfd_prepare() selftests/pidfd: adapt to recent changes Link: https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-0-a123b6ed6716@kernel.org Signed-off-by: Christian Brauner commit 4fc3f73c16dae0211f31a963eedfb921f8366f57 Author: Christian Brauner Date: Thu Apr 3 16:09:04 2025 +0200 selftest/pidfd: add test for thread-group leader pidfd open for thread Verify that we report ENOENT when userspace tries to create a thread-group leader pidfd for a thread pidfd that isn't a thread-group leader. Link: https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-4-a123b6ed6716@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 8cf4b738f6d84fdd8d7ff1e8d0e2298ded3e4153 Author: Christian Brauner Date: Thu Apr 3 16:09:03 2025 +0200 pidfd: improve uapi when task isn't found We currently report EINVAL whenever a struct pid has no tasked attached anymore thereby conflating two concepts: (1) The task has already been reaped. (2) The caller requested a pidfd for a thread-group leader but the pid actually references a struct pid that isn't used as a thread-group leader. This is causing issues for non-threaded workloads as in [1]. This patch tries to allow userspace to distinguish between (1) and (2). This is racy of course but that shouldn't matter. Link: https://github.com/systemd/systemd/pull/36982 [1] Link: https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-3-a123b6ed6716@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 1b090949c9989a35c74aa2cd7fee6670b79019cd Author: Christian Brauner Date: Thu Apr 3 16:09:02 2025 +0200 pidfd: remove unneeded NULL check from pidfd_prepare() None of the caller actually pass a NULL pid in there. Link: https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-2-a123b6ed6716@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 76d2d75ddc034e0ee7d14f9023cb6ebd6c59278d Author: Christian Brauner Date: Thu Apr 3 16:09:01 2025 +0200 selftests/pidfd: adapt to recent changes Adapt to changes in commit 9133607de37a ("exit: fix the usage of delay_group_leader->exit_code in do_notify_parent() and pidfs_exit()"). Even if the thread-group leader exited early and succesfully it's exit status will only be reported once the whole thread-group has exited and it will share the exit code of the thread-group. So if the thread-group was SIGKILLed the thread-group leader will also be reported as having been SIGKILLed. Link: https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-1-a123b6ed6716@kernel.org Reviewed-by: Oleg Nesterov Signed-off-by: Christian Brauner commit 418556fa576ebbd644c7258a97b33203956ea232 Author: David Disseldorp Date: Wed Apr 2 14:39:50 2025 +1100 docs: initramfs: update compression and mtime descriptions Update the document to reflect that initramfs didn't replace initrd following kernel 2.5.x. The initramfs buffer format now supports many compression types in addition to gzip, so include them in the grammar section. c_mtime use is dependent on CONFIG_INITRAMFS_PRESERVE_MTIME. Signed-off-by: David Disseldorp Link: https://lore.kernel.org/r/20250402033949.852-2-ddiss@suse.de Reviewed-by: Randy Dunlap Signed-off-by: Christian Brauner commit 62a2175ddf7e72941868f164b7c1f92e00f213bd Author: Christian Brauner Date: Fri Apr 4 21:02:28 2025 +0200 gfs2: pass through holder from the VFS for freeze/thaw The filesystem's freeze/thaw functions can be called from contexts where the holder isn't userspace but the kernel, e.g., during systemd suspend/hibernate. So pass through the freeze/thaw flags from the VFS instead of hard-coding them. Signed-off-by: Christian Brauner commit b47e42d10e8c20525febccbd6e0dc8528861aea4 Author: Christian Brauner Date: Sat Mar 29 09:42:18 2025 +0100 super: use common iterator (Part 2) Use a common iterator for all callbacks. We could go for something even more elaborate (advance step-by-step similar to iov_iter) but I really don't think this is warranted. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-5-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 2992476528aeecbaee17ba0a6396a817481205a3 Author: Christian Brauner Date: Sat Mar 29 09:42:17 2025 +0100 super: use a common iterator (Part 1) Use a common iterator for all callbacks. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-4-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 6920e3388ba4c66b0468d43bb7a373f5fff15d35 Author: Christian Brauner Date: Sat Mar 29 09:42:16 2025 +0100 super: skip dying superblocks early Make all iterators uniform by performing an early check whether the superblock is dying. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-3-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 484caf5e117a9334a08b1d69542e1065be4b30ab Author: Christian Brauner Date: Sat Mar 29 09:42:15 2025 +0100 super: simplify user_get_super() Make it easier to read and remove one level of identation. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-2-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit af7551cf13cf7fb1d4f939db4f1f24c00550ed57 Author: Christian Brauner Date: Sat Mar 29 09:42:14 2025 +0100 super: remove pointless s_root checks The locking guarantees that the superblock is alive and sb->s_root is still set. Remove the pointless check. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-1-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit f73bae83675b860cae9f58dba233b6be92e750ca Author: James Bottomley Date: Thu Mar 27 10:06:11 2025 -0400 fs: allow all writers to be frozen During freeze/thaw we need to be able to freeze all writers during suspend/hibernate. Otherwise tasks such as systemd-journald that mmap a file and write to it will not be frozen after we've already frozen the filesystem. This has some risk of not being able to freeze processes in case a process has acquired SB_FREEZE_PAGEFAULT under mmap_sem or SB_FREEZE_INTERNAL under some other filesytem specific lock. If the filesystem is frozen, a task can block on the frozen filesystem with e.g., mmap_sem held. If some other task then blocks on grabbing that mmap_sem, hibernation ill fail because it is unable to hibernate a task holding mmap_sem. This could be fixed by making a range of filesystem related locks use freezable sleeping. That's impractical and not warranted just for suspend/hibernate. Assume that this is an infrequent problem and we've given userspace a way to skip filesystem freezing through a sysfs file. Link: https://lore.kernel.org/r/20250402-work-freeze-v2-2-6719a97b52ac@kernel.org Link: https://lore.kernel.org/r/20250327140613.25178-3-James.Bottomley@HansenPartnership.com [brauner: make all freeze levels set TASK_FREEZABLE and rewrite commit message] Reviewed-by: Jan Kara Signed-off-by: James Bottomley Signed-off-by: Christian Brauner commit 559b3bbfa978ce3b23dc9c52d09a0eddca52c439 Author: James Bottomley Date: Thu Mar 27 10:06:10 2025 -0400 locking/percpu-rwsem: add freezable alternative to down_read Percpu-rwsems are used for superblock locking. However, we know the read percpu-rwsem we take for sb_start_write() on a frozen filesystem needs not to inhibit system from suspending or hibernating. That means it needs to wait with TASK_UNINTERRUPTIBLE | TASK_FREEZABLE. Introduce a new percpu_down_read_freezable() that allows us to control whether TASK_FREEZABLE is added to the wait flags. Signed-off-by: James Bottomley Link: https://lore.kernel.org/r/20250327140613.25178-2-James.Bottomley@HansenPartnership.com Signed-off-by: Christian Brauner commit fb5a381d624bf6ad3dc2541387feb5d835e1f377 Merge: 0af2f6be1b4281 6b0dfabb35550c Author: Christian Brauner Date: Thu Apr 3 10:02:39 2025 +0200 Merge patch series "Remove aops->writepage" Matthew Wilcox (Oracle) says: We have just one filesystm (vboxsf) left which implements ->writepage. This patchset converts it to writepages then removes all the callers of ->writepage. * patches from https://lore.kernel.org/r/20250402150005.2309458-1-willy@infradead.org: fs: Remove aops->writepage mm: Remove swap_writepage() and shmem_writepage() ttm: Call shmem_writeout() from ttm_backup_backup_page() i915: Use writeback_iter() shmem: Add shmem_writeout() writeback: Remove writeback_use_writepage() migrate: Remove call to ->writepage vboxsf: Convert to writepages 9p: Add a migrate_folio method Link: https://lore.kernel.org/r/20250402150005.2309458-1-willy@infradead.org Signed-off-by: Christian Brauner commit 6b0dfabb35550cb7b0808585dea6c24971d685d3 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 16:00:03 2025 +0100 fs: Remove aops->writepage All callers and implementations are now removed, so remove the operation and update the documentation to match. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-10-willy@infradead.org Signed-off-by: Christian Brauner commit 84798514db503d3bbf8df72be431f89cecbdffe8 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 16:00:02 2025 +0100 mm: Remove swap_writepage() and shmem_writepage() Call swap_writeout() and shmem_writeout() from pageout() instead. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-9-willy@infradead.org Tested-by: Baolin Wang Reviewed-by: Baolin Wang Signed-off-by: Christian Brauner commit fe75adffac33eeb167b378861d80c805b234495c Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 16:00:01 2025 +0100 ttm: Call shmem_writeout() from ttm_backup_backup_page() The ->writepage operation is being removed. Since this function exclusively deals with shmem folios, we can call shmem_writeout() to write it. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-8-willy@infradead.org Signed-off-by: Christian Brauner commit 776a853a43c99c1f4b201d2cd6be3e1666517b91 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 16:00:00 2025 +0100 i915: Use writeback_iter() Convert from an inefficient loop to the standard writeback iterator. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-7-willy@infradead.org Signed-off-by: Christian Brauner commit 7b73c12c6ebf006ad496f0e38a605d92dfe05157 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 15:59:59 2025 +0100 shmem: Add shmem_writeout() This will be the replacement for shmem_writepage(). Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-6-willy@infradead.org Reviewed-by: Baolin Wang Signed-off-by: Christian Brauner commit 8e5ae388f33a5270ea4193e533c0770d51f6a9be Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 15:59:58 2025 +0100 writeback: Remove writeback_use_writepage() The ->writepage operation has been removed from all filesystems but shmem and swap, neither of which call in here. Remove this alternative to calling ->writepages. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-5-willy@infradead.org Signed-off-by: Christian Brauner commit 7ee3647243e5c4a9d74d4c7ec621eac75c6d37ea Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 15:59:57 2025 +0100 migrate: Remove call to ->writepage The writepage callback is going away; filesystems must implement migrate_folio or else dirty folios will not be migratable. Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-4-willy@infradead.org Signed-off-by: Christian Brauner commit e300830fcc4009d5cdd4e7fbe235b54f2472576e Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 15:59:56 2025 +0100 vboxsf: Convert to writepages If we add a migrate_folio operation, we can convert the writepage operation to writepages. Further, this lets us optimise by using the same write handle for multiple folios. The large folio support here is illusory; we would need to kmap each page in turn for proper support. But we do remove a few hidden calls to compound_head(). Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-3-willy@infradead.org Signed-off-by: Christian Brauner commit 03ddd7725ed1b39cf9251e1a420559f25dac49b3 Author: Matthew Wilcox (Oracle) Date: Wed Apr 2 15:59:55 2025 +0100 9p: Add a migrate_folio method The migration code used to be able to migrate dirty 9p folios by writing them back using writepage. When the writepage method was removed, we neglected to add a migrate_folio method, which means that dirty 9p folios have been unmovable ever since. This reduced our success at defragmenting memory on machines which use 9p heavily. Fixes: 80105ed2fd27 (9p: Use netfslib read/write_iter) Cc: stable@vger.kernel.org Cc: David Howells Cc: v9fs@lists.linux.dev Signed-off-by: "Matthew Wilcox (Oracle)" Link: https://lore.kernel.org/r/20250402150005.2309458-2-willy@infradead.org Acked-by: Dominique Martinet Reviewed-by: David Howells Signed-off-by: Christian Brauner commit 9d5c8dc8111539260e59276a095132a585cb5aaf Author: Pavel Reichl Date: Thu Mar 20 21:42:24 2025 +0100 bfs: convert bfs to use the new mount api Convert the bfs filesystem to use the new mount API. Tested using mount and simple writes & reads on ro/rw bfs devices. Signed-off-by: Pavel Reichl Link: https://lore.kernel.org/r/20250320204224.181403-1-preichl@redhat.com Reviewed-by: Carlos Maiolino Signed-off-by: Christian Brauner commit 0a02e1f4a54ace747304687ced3b76d159e58914 Author: Yixun Lan Date: Wed Mar 26 06:06:19 2025 +0800 irqdomain: Support three-cell scheme interrupts Add new function *_twothreecell() to extend support to parse three-cell interrupts which encoded as , the translate function will retrieve irq number and flag from last two cells. This API will be used in gpio irq driver which need to work with two or three cells cases. Signed-off-by: Yixun Lan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250326-04-gpio-irq-threecell-v3-1-aab006ab0e00@gentoo.org commit 4e310626eb4df52a31a142c1360fead0fcbd3793 Author: Peng Fan Date: Thu Mar 27 08:49:44 2025 +0800 gpiolib: of: Add polarity quirk for s5m8767 This is prepare patch for switching s5m8767 regulator driver to use GPIO descriptor. DTS for exynos5250 spring incorrectly specifies "active low" polarity for the DVS and DS line. But per datasheet, they are actually active high. So add polarity quirk for it. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250327004945.563765-1-peng.fan@oss.nxp.com Signed-off-by: Bartosz Golaszewski commit 2011067c6477b55ef510e4ef830bca2869cd8136 Author: NeilBrown Date: Wed Mar 19 14:01:34 2025 +1100 cachefiles: Use lookup_one() rather than lookup_one_len() cachefiles uses some VFS interfaces (such as vfs_mkdir) which take an explicit mnt_idmap, and it passes &nop_mnt_idmap as cachefiles doesn't yet support idmapped mounts. It also uses the lookup_one_len() family of functions which implicitly use &nop_mnt_idmap. This mixture of implicit and explicit could be confusing. When we eventually update cachefiles to support idmap mounts it would be best if all places which need an idmap determined from the mount point were similar and easily found. So this patch changes cachefiles to use lookup_one(), lookup_one_unlocked(), and lookup_one_positive_unlocked(), passing &nop_mnt_idmap. This has the benefit of removing the remaining user of the lookup_one_len functions where permission checking is actually needed. Other callers don't care about permission checking and using these function only where permission checking is needed is a valuable simplification. This requires passing the name in a qstr. This is easily done with QSTR() as the name is always nul terminated, and often strlen is used anyway. ->d_name_len is removed as no longer useful. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-4-neil@brown.name Signed-off-by: Christian Brauner commit 8ad9248471138e08a91d5e54b74d95d02f9518b2 Author: NeilBrown Date: Wed Mar 19 14:01:33 2025 +1100 nfsd: Use lookup_one() rather than lookup_one_len() nfsd uses some VFS interfaces (such as vfs_mkdir) which take an explicit mnt_idmap, and it passes &nop_mnt_idmap as nfsd doesn't yet support idmapped mounts. It also uses the lookup_one_len() family of functions which implicitly use &nop_mnt_idmap. This mixture of implicit and explicit could be confusing. When we eventually update nfsd to support idmap mounts it would be best if all places which need an idmap determined from the mount point were similar and easily found. So this patch changes nfsd to use lookup_one(), lookup_one_unlocked(), and lookup_one_positive_unlocked(), passing &nop_mnt_idmap. This has the benefit of removing some uses of the lookup_one_len functions where permission checking is actually needed. Many callers don't care about permission checking and using these function only where permission checking is needed is a valuable simplification. This change requires passing the name in a qstr. Currently this is a little clumsy, but if nfsd is changed to use qstr more broadly it will result in a net improvement. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-3-neil@brown.name Signed-off-by: Christian Brauner commit 5741909697a31cfb08e45d56b4211959fb791487 Author: NeilBrown Date: Wed Mar 19 14:01:32 2025 +1100 VFS: improve interface for lookup_one functions The family of functions: lookup_one() lookup_one_unlocked() lookup_one_positive_unlocked() appear designed to be used by external clients of the filesystem rather than by filesystems acting on themselves as the lookup_one_len family are used. They are used by: btrfs/ioctl - which is a user-space interface rather than an internal activity exportfs - i.e. from nfsd or the open_by_handle_at interface overlayfs - at access the underlying filesystems smb/server - for file service They should be used by nfsd (more than just the exportfs path) and cachefs but aren't. It would help if the documentation didn't claim they should "not be called by generic code". Also the path component name is passed as "name" and "len" which are (confusingly?) separate by the "base". In some cases the len in simply "strlen" and so passing a qstr using QSTR() would make the calling clearer. Other callers do pass separate name and len which are stored in a struct. Sometimes these are already stored in a qstr, other times it easily could be. So this patch changes these three functions to receive a 'struct qstr *', and improves the documentation. QSTR_LEN() is added to make it easy to pass a QSTR containing a known len. [brauner@kernel.org: take a struct qstr pointer] Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/20250319031545.2999807-2-neil@brown.name Signed-off-by: Christian Brauner commit a81aca6f8ed81d3607a5e06a64c02b7af0a705b5 Author: Philipp Stanner Date: Fri Apr 4 14:19:12 2025 +0200 ASoC: loongson: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-13-phasta@kernel.org commit c1bdb3ecd2e4f6ee5f0051cef31475d665325f28 Author: Philipp Stanner Date: Fri Apr 4 14:19:11 2025 +0200 ALSA: hdspm: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-12-phasta@kernel.org commit 4cc49b9b39521017a9812e440e7a8b1f62b5a495 Author: Philipp Stanner Date: Fri Apr 4 14:19:10 2025 +0200 ALSA: lola: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-11-phasta@kernel.org commit af0a429dfaacc283c196da9a66c5146934e86b1b Author: Philipp Stanner Date: Fri Apr 4 14:19:09 2025 +0200 ALSA: cs5530: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-10-phasta@kernel.org commit 0afde802e30f639cceb8d75ac8ea7877a711ff0b Author: Philipp Stanner Date: Fri Apr 4 14:19:08 2025 +0200 ALSA: hda_intel: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-9-phasta@kernel.org commit 99b58f63798048d4ffef897f99e202e2f552ea25 Author: Philipp Stanner Date: Fri Apr 4 14:19:07 2025 +0200 ALSA: cs4281: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-8-phasta@kernel.org commit 84c6959c84d5afbf828d0827ff6eee35a686c087 Author: Philipp Stanner Date: Fri Apr 4 14:19:06 2025 +0200 ALSA: bt87x: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-7-phasta@kernel.org commit b52fab377c1554224ae1731bc94a6b0322b93a17 Author: Philipp Stanner Date: Fri Apr 4 14:19:05 2025 +0200 ALSA: aw2: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-6-phasta@kernel.org commit 413557a64de64ae921829f37f05c234cc5cd4c6f Author: Philipp Stanner Date: Fri Apr 4 14:19:04 2025 +0200 ALSA: au88x0: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Additionally, the "name" parameter of pcim_iomap_region() should reflect the driver's, not the hardware's, name. Pass the correct parameter. Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-5-phasta@kernel.org commit 04759145a16e61c965e320858bc8b019f76ffe65 Author: Philipp Stanner Date: Fri Apr 4 14:19:03 2025 +0200 ALSA: atiixp: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-4-phasta@kernel.org commit a99ccde94b3f55ac6464c195c7463956ab619561 Author: Philipp Stanner Date: Fri Apr 4 14:19:02 2025 +0200 ALSA: ad1889: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250404121911.85277-3-phasta@kernel.org commit d15d8d234248d6575b2d4efc14731d0a623f89d0 Author: Andy Yan Date: Mon Mar 24 20:52:11 2025 +0800 ARM: dts: rockchip: Add aliases for rk3036-kylin MMC devices Add aliases for the MMC devices so that after the system starts up, they will all have fixed device numbers. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250324125215.160616-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 200b3fa574c9377ff0b4e69a6ca4668939bf0cad Author: Quentin Schulz Date: Mon Mar 17 13:07:27 2025 +0100 arm64: dts: rockchip: Enable HDMI audio output for RK3588 Tiger Haikou HDMI audio is available on the RK3588 Tiger Haikou HDMI TX port, so let's enable it. Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20250317-tsd-rk3588-hdmi-audio-v1-2-0b8ceb9597a6@cherry.de Signed-off-by: Heiko Stuebner commit f46705afd1aafd843e28e981447c92469e846673 Author: Quentin Schulz Date: Mon Mar 17 13:07:26 2025 +0100 arm64: dts: rockchip: Enable HDMI audio output for RK3588 Jaguar HDMI audio is available on the RK3588 Jaguar HDMI TX port, so let's enable it. Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20250317-tsd-rk3588-hdmi-audio-v1-1-0b8ceb9597a6@cherry.de Signed-off-by: Heiko Stuebner commit 392275203af1b384fd12df2cef6fb6ee8b3f2b68 Author: Jianfeng Liu Date: Tue Mar 18 00:32:21 2025 +0800 arm64: dts: rockchip: Enable HDMI ports on ArmSoM W3 Enable the two HDMI ports on ArmSoM W3. And audio output of these two ports are also enabled. Signed-off-by: Jianfeng Liu Link: https://lore.kernel.org/r/20250317163240.3083908-1-liujianfeng1994@gmail.com Signed-off-by: Heiko Stuebner commit b6490faab67c4436abeddb5c9e1fb0e8791d58ad Author: Andy Yan Date: Sat Dec 21 18:49:07 2024 +0800 arm64: dts: rockchip: aliase sdhci as mmc0 for rk3566 box demo Follow most others rk356x based boards, and u-boot only use mmc0/1 as mmc boot targets, so aliase sdhci as mmc0. Signed-off-by: Andy Yan [demo-board only used internally by Rockchip, so changing the alias order does not affect public users] Link: https://lore.kernel.org/r/20241221104920.4193034-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit d01e09a9f7cd4fb5a947e3dc718242b51b581615 Author: Uwe Kleine-König Date: Tue Mar 18 22:08:46 2025 +0100 arm64: dts: rockchip: Add gmac phy reset GPIO to QNAP TS433 While looking through the vendor U-Boot code Heiko spotted that a SoC GPIO is connected to the ethernet phy's reset pin. Add the respective reset-gpios property with pinmuxing for the GPIO to the phy node. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/49f66206fccc714a8745b9ac35247615ad5cc369.1742331667.git.ukleinek@kernel.org Signed-off-by: Heiko Stuebner commit 831263a4164e189c47e3a9ea189cb4b5bc078b1e Author: Uwe Kleine-König Date: Tue Mar 18 22:08:45 2025 +0100 arm64: dts: rockchip: Correct gmac phy address on QNAP TS433 The Motorcomm Phy can be talked to on mdio broadcast address 0, but the actuall address is 3. Adapt the reg property and node name accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/6b8ef7e37e646f4cd399ceb2f46017644d76da9d.1742331667.git.ukleinek@kernel.org Signed-off-by: Heiko Stuebner commit c0898e6881f964ca831c407c7019cd7f307d4368 Author: Marcin Juszkiewicz Date: Tue Mar 25 20:51:47 2025 +0100 arm64: dts: rockchip: enable HDMI sound on FriendlyElec NanoPC-T6 We have both video outputs showing pixels, time to play some noise. Signed-off-by: Marcin Juszkiewicz Link: https://lore.kernel.org/r/20250325-nanopc-t6-hdmi-v1-2-299a2ed45878@redhat.com Signed-off-by: Heiko Stuebner commit fc1f5f5bcac7df327a20f4bfbd4872e17d38601d Author: Marcin Juszkiewicz Date: Tue Mar 25 20:51:46 2025 +0100 arm64: dts: rockchip: enable HDMI1 on FriendlyElec NanoPC-T6 Time to get second video output working. Signed-off-by: Marcin Juszkiewicz Link: https://lore.kernel.org/r/20250325-nanopc-t6-hdmi-v1-1-299a2ed45878@redhat.com Signed-off-by: Heiko Stuebner commit 530f2bebc0918efe6deac1e2c92ce4a13e0c12e1 Author: Shawn Lin Date: Wed Mar 5 21:16:26 2025 +0800 arm64: dts: rockchip: Enable ufshc on rk3576 evb1 board RK3576 evb1 board supports UFS, so enable it. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1741180586-140422-1-git-send-email-shawn.lin@rock-chips.com [the core device node went into the driver tree, hence this being later] Signed-off-by: Heiko Stuebner commit 55a43c346d24434e46ef7fcc09a9df8179c346e4 Author: Heiko Stuebner Date: Sun Feb 16 16:27:42 2025 +0100 arm64: dts: rockchip: change rng reset id back to its constant value With the binding header now providing the SCMI_SRST_H_TRNG_NS constant, switch back to it from the temporary numeric value. Signed-off-by: Heiko Stuebner commit 92ac7de3175e3c17cbb76ae752b598cfb9dadf49 Author: Bartosz Golaszewski Date: Tue Mar 11 15:19:51 2025 +0100 gpiolib: don't allow setting values on input lines Some drivers as well as the character device and sysfs code check whether the line actually is in output mode before allowing the user to set a value. However, GPIO value setters now return integer values and can indicate failures. This allows us to move these checks into the core code. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250311-gpio-set-check-output-v1-1-d971bca9e6fa@linaro.org Signed-off-by: Bartosz Golaszewski commit 5024aa7a7660a880046c8b56fefd21e21e729243 Author: Matthew Auld Date: Wed Apr 2 11:44:31 2025 +0100 drm/format-helper: fix build Build fails with: error: multiple unsequenced modifications to 'sbuf32' [-Werror,-Wunsequenced] 264 | le32_to_cpup(sbuf32++), | ^ 265 | le32_to_cpup(sbuf32++), | ~~ With that move the increment of the sbuf32 pointer to the end of the loop, instead of inside the array list initializer, where the order/sequence of the sbuf32 pointer modifications is not defined. Fixes: 58523a25cbf7 ("drm/format-helper: Optimize 32-to-24-bpp conversion") Fixes: 3f31a017ddbc ("drm/format-helper: Optimize 32-to-16-bpp conversion") Fixes: 65931bbc5177 ("drm/format-helper: Optimize 32-to-8-bpp conversion") Signed-off-by: Matthew Auld Cc: Thomas Zimmermann Cc: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250402104430.142398-2-matthew.auld@intel.com commit 71114cd1d386988bc90dca1d1f1fee5fb23817ad Merge: 0af2f6be1b4281 8b4f52ef7a412d Author: Andy Shevchenko Date: Mon Apr 7 09:39:16 2025 +0300 Merge patch series "gpiolib: acpi: Refactor to shrink the code by ~8%" Andy Shevchenko says: A simple refactoring of the GPIO ACPI library parts to get an impressive ~8% code shrink on x86_64 and ~2% on x86_32. Also reduces a C code a bit. add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-1221 (-1221) Function old new delta acpi_gpio_property_lookup 425 414 -11 acpi_find_gpio.__UNIQUE_ID_ddebug478 56 - -56 acpi_dev_gpio_irq_wake_get_by.__UNIQUE_ID_ddebug480 56 - -56 acpi_find_gpio 354 216 -138 acpi_get_gpiod_by_index 462 307 -155 __acpi_find_gpio 877 638 -239 acpi_dev_gpio_irq_wake_get_by 695 129 -566 Total: Before=15375, After=14154, chg -7.94% Link: https://lore.kernel.org/r/20250403160034.2680485-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 8b4f52ef7a412dd8e0b390ad4815bd74323f6f99 Author: Andy Shevchenko Date: Thu Apr 3 18:59:17 2025 +0300 gpiolib: acpi: Deduplicate some code in __acpi_find_gpio() __acpi_find_gpio() calls two functions depending on the supplied con_id and possibility to fallback to _CRS lookup. Those functions have the same pieces of code that can be done only in one place. Do it so. This gives an impressive shrink of the generated code for x86_64: add/remove: 0/2 grow/shrink: 0/4 up/down: 0/-1204 (-1204) Function old new delta acpi_find_gpio.__UNIQUE_ID_ddebug478 56 - -56 acpi_dev_gpio_irq_wake_get_by.__UNIQUE_ID_ddebug480 56 - -56 acpi_find_gpio 354 216 -138 acpi_get_gpiod_by_index 456 307 -149 __acpi_find_gpio 877 638 -239 acpi_dev_gpio_irq_wake_get_by 695 129 -566 Total: Before=15358, After=14154, chg -7.84% Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit bd0df44795053e53a25c521016d083311a05fae0 Author: Andy Shevchenko Date: Thu Apr 3 18:59:16 2025 +0300 gpiolib: acpi: Reuse struct acpi_gpio_params in struct acpi_gpio_lookup Some of the contents of struct acpi_gpio_lookup repeats what we have in the struct acpi_gpio_params. Reuse the latter in the former. Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 8de54265eba0e7d7d6b0f46c0cff7a7b862a0df9 Author: Andy Shevchenko Date: Thu Apr 3 18:59:15 2025 +0300 gpiolib: acpi: Rename par to params for better readability Rename par to params for better readability in acpi_get_driver_gpio_data(). No functional changes intended. Requested-by: Bartosz Golaszewski Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 1be1cd03a93339f14c8f4fe300bca321fddc6478 Author: Andy Shevchenko Date: Thu Apr 3 18:59:14 2025 +0300 gpiolib: acpi: Reduce memory footprint for struct acpi_gpio_params The line_index member in the struct acpi_gpio_params replicates what is covered in the ACPI GpioIo() or GpioInt() resource. The value there is limited to 16-bit one, so we don't really need to have a full 32-bit storage for it. Together with followed boolean the structure will be smaller. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3 (-3) Function old new delta acpi_gpio_property_lookup 417 414 -3 Total: Before=15361, After=15358, chg -0.02% `pahole` difference before and after: - /* size: 12, cachelines: 1, members: 3 */ - /* padding: 3 */ + /* size: 8, cachelines: 1, members: 3 */ + /* padding: 1 */ Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit d5ab616eb89659ef8f5c3a94eaf444992e34a2cd Author: Andy Shevchenko Date: Thu Apr 3 18:59:13 2025 +0300 gpiolib: acpi: Remove index parameter from acpi_gpio_property_lookup() In all cases the supplied index is the same as the passed one in the struct acpi_gpio_lookup. Remove index parameter and reuse one from the struct acpi_gpio_lookup instead. add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-14 (-14) Function old new delta acpi_get_gpiod_by_index 462 456 -6 acpi_gpio_property_lookup 425 417 -8 Total: Before=15375, After=15361, chg -0.09% Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 2c6c34e0cabe1351c6b1894ba8093cac11882e71 Author: Andy Shevchenko Date: Thu Apr 3 18:59:12 2025 +0300 gpiolib: acpi: Improve struct acpi_gpio_info memory footprint The struct acpi_gpio_info has two boolean members that are located not close to each other making two gaps due to alignment requirements. Group them to improve memory footprint. `pahole` difference before and after (on 32-bit): - /* size: 36, cachelines: 1, members: 9 */ - /* sum members: 30, holes: 2, sum holes: 6 */ + /* size: 32, cachelines: 1, members: 9 */ + /* sum members: 30, holes: 1, sum holes: 2 */ Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250403160034.2680485-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit bc3faba1f96983f0aa9a6b2e800457e7e3b9a051 Author: Kieran Bingham Date: Sun Mar 30 11:23:53 2025 +0100 drm: renesas: Extend RZ/G2L supported KMS formats The RZ/G2L driver utilises the VSPD to read data from input sources. The rzg2l_du_kms component lists a restricted subset of the capabilities of the VSPD which prevents additional formats from being used for display planes. The supported display plane formats are mapped in rzg2l_du_vsp_formats[]. Extend the rzg2l_du_format_infos[] table with the corresponding mappings between the supported DRM formats and the formats exposed by the VSP in rzg2l_du_vsp_formats, maintaining the same ordering in both tables. The RPF module on VSPD supports various format conversion and send the image data to BRS(Blend ROP Sub Unit) for further processing. Signed-off-by: Kieran Bingham Signed-off-by: Biju Das Tested-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Tested-by: Tommaso Merciai Link: https://lore.kernel.org/r/20250330102357.56010-3-biju.das.jz@bp.renesas.com commit 2f31808bc75072a819c7dbf28bf273d2940f360b Author: Biju Das Date: Sun Mar 30 11:23:52 2025 +0100 drm: renesas: rz-du: Drop bpp variable from struct rzg2l_du_format_info Drop the unused variable bpp from struct rzg2l_du_format_info. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20250330102357.56010-2-biju.das.jz@bp.renesas.com commit 2d14c680e92f09d18b984cd1a8fae437f9ebc2ab Author: André Draszik Date: Tue Mar 25 09:46:08 2025 +0000 firmware: exynos-acpm: allow use during system shutdown We need to access the PMIC during late system shutdown and at that time we are not allowed to sleep anymore. To make this case work, and since we can't detect this case in a non-racy way, switch to using udelay() unconditionally, instead of usleep_range(). Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250325-acpm-atomic-v3-2-c66aae7df925@linaro.org Signed-off-by: Krzysztof Kozlowski commit d2098981eb7b7d20edd294a8431908f8a0d2f9c0 Author: André Draszik Date: Tue Mar 25 09:46:07 2025 +0000 firmware: exynos-acpm: use ktime APIs for timeout detection acpm_dequeue_by_polling() uses a loop counter and assumes that each iteration of the loop takes 20us. It may take longer, though, because usleep_range() may sleep a different amount. Switch to using ktime_get() / ktime_before() to detect the timeout condition more reliably. This change also makes the code easier to follow and it allows us to adjust the sleep if necessary, without having to adjust the loop counter exit condition. Reviewed-by: Tudor Ambarus Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250325-acpm-atomic-v3-1-c66aae7df925@linaro.org Signed-off-by: Krzysztof Kozlowski commit ae28e34400aab0dc4876eac83766fa9731f9901c Author: Oak Zeng Date: Thu Apr 3 12:53:28 2025 -0400 drm/xe: Allow scratch page under fault mode for certain platform Normally scratch page is not allowed when a vm is operate under page fault mode, i.e., in the existing codes, DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE and DRM_XE_VM_CREATE_FLAG_FAULT_MODE are mutual exclusive. The reason is fault mode relies on recoverable page to work, while scratch page can mute recoverable page fault. On xe2 and xe3, out of bound prefetch can cause page fault and further system hang because xekmd can't resolve such page fault. SYCL and OCL language runtime requires out of bound prefetch to be silently dropped without causing any functional problem, thus the existing behavior doesn't meet language runtime requirement. At the same time, HW prefetching can cause page fault interrupt. Due to page fault interrupt overhead (i.e., need Guc and KMD involved to fix the page fault), HW prefetching can be slowed by many orders of magnitude. Fix those problems by allowing scratch page under fault mode for xe2 and xe3. With scratch page in place, HW prefetching could always hit scratch page instead of causing interrupt. A side effect is, scratch page could hide application program error. Application out of bound accesses are hided by scratch page mapping, instead of get reported to user. v2: Refine commit message (Thomas) v3: Move the scratch page flag check to after scratch page wa (Thomas) v4: drop NEEDS_SCRATCH macro (matt) Add a comment to DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE Signed-off-by: Oak Zeng Reviewed-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250403165328.2438690-4-oak.zeng@intel.com Signed-off-by: Himal Prasad Ghimiray commit 5b658b7e89c3126906545226c1e73817763db08a Author: Oak Zeng Date: Thu Apr 3 12:53:27 2025 -0400 drm/xe: Clear scratch page on vm_bind When a vm runs under fault mode, if scratch page is enabled, we need to clear the scratch page mapping on vm_bind for the vm_bind address range. Under fault mode, we depend on recoverable page fault to establish mapping in page table. If scratch page is not cleared, GPU access of address won't cause page fault because it always hits the existing scratch page mapping. When vm_bind with IMMEDIATE flag, there is no need of clearing as immediate bind can overwrite the scratch page mapping. So far only is xe2 and xe3 products are allowed to enable scratch page under fault mode. On other platform we don't allow scratch page under fault mode, so no need of such clearing. v2: Rework vm_bind pipeline to clear scratch page mapping. This is similar to a map operation, with the exception that PTEs are cleared instead of pointing to valid physical pages. (Matt, Thomas) TLB invalidation is needed after clear scratch page mapping as larger scratch page mapping could be backed by physical page and cached in TLB. (Matt, Thomas) v3: Fix the case of clearing huge pte (Thomas) Improve commit message (Thomas) v4: TLB invalidation on all LR cases, not only the clear on bind cases (Thomas) v5: Misc cosmetic changes (Matt) Drop pt_update_ops.invalidate_on_bind. Directly wire xe_vma_op.map.invalidata_on_bind to bind_op_prepare/commit (Matt) v6: checkpatch fix (Matt) v7: No need to check platform needs_scratch deciding invalidate_on_bind (Matt) v8: rebase v9: rebase v10: fix an error in xe_pt_stage_bind_entry, introduced in v9 rebase Signed-off-by: Oak Zeng Reviewed-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250403165328.2438690-3-oak.zeng@intel.com Signed-off-by: Himal Prasad Ghimiray commit 953d35c0b8ef98cee444253ac0d4772c24d1cc0c Author: Oak Zeng Date: Thu Apr 3 12:53:26 2025 -0400 drm/xe: Introduced needs_scratch bit in device descriptor On some platform, scratch page is needed for out of bound prefetch to work. Introduce a bit in device descriptor to specify whether this device needs scratch page to work. v2: introduce a needs_scratch bit in device info (Thomas, Jonathan) v3: drop NEEDS_SCRATCH macro (Matt) Signed-off-by: Oak Zeng Reviewed-by: Thomas Hellström Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250403165328.2438690-2-oak.zeng@intel.com Signed-off-by: Himal Prasad Ghimiray commit d486f2e07836fd8435c2ec0512b5d81cfc00781c Author: Erick Karanja Date: Wed Mar 26 16:26:49 2025 +0300 staging: rtl8723bs: Rename variables Rename the variable `mediaStatus` to `media_status` and variable `lpsVal` to `lps_val` to adhere to Linux kernel coding standards by using snake_case instead of CamelCase. Fixes checkpatch.pl warning: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Erick Karanja Link: https://lore.kernel.org/r/20250326132649.22055-1-karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9f61589a8b50715fb7c11f4d899c9689ae6674bc Author: Abraham Samuel Adekunle Date: Wed Mar 26 13:40:05 2025 +0100 staging: rtl8723bs: remove braces around single statements The code contains braces around single statements in the if blocks which are unnecessary according to the Linux kernel coding style. Remove the braces to improve readability and maintain consistency. Reported by checkpatch: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Abraham Samuel Adekunle Link: https://lore.kernel.org/r/Z+P1pfLSKpiRtpaF@HP-650 Signed-off-by: Greg Kroah-Hartman commit f6d1d0ac1735ff4fccf84d08eadf291123b8e310 Author: Abraham Samuel Adekunle Date: Tue Mar 25 15:42:33 2025 +0100 staging: rtl8723bs: remove unnecessary else block after return The else block after the return statement is unnecessary since execution does not continue past the return statement. Remove the else block while preserving logic making the code cleaner and more readable. reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Abraham Samuel Adekunle Reviewed-by: Julia Lawall Link: https://lore.kernel.org/r/Z+LA2eeFRL+K0KCy@HP-650 Signed-off-by: Greg Kroah-Hartman commit 7fc3a367b2f51004e4c0bd7b215502b7be6a042b Author: Abraham Samuel Adekunle Date: Tue Mar 25 14:11:04 2025 +0100 staging: rtl8723bs: simplify if-else block by removing unnecessary braces The if-else block contained braces around single statements, which are unnecessary according to the Linux kernel coding style. Remove the redundant braces to improve code readability and maintain consistency with the rest of the codebase. Reported by checkpatch: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Abraham Samuel Adekunle Reviewed-by: Julia Lawall Link: https://lore.kernel.org/r/Z+KraOo2DfmH5zMX@HP-650 Signed-off-by: Greg Kroah-Hartman commit 5771897aed7b24ff8c2acc5f38d1337024a7e82b Author: Erick Karanja Date: Sat Mar 22 09:58:00 2025 +0300 staging: greybus: camera: fix code alignment warning Correct the alignment of the parameters to match the open parenthesis. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Erick Karanja Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/20250322065800.21361-1-karanja99erick@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0c3d42658a89a09bcd51d0013444d608b45836a Author: Justin Cromer Date: Sun Mar 23 15:46:27 2025 -0700 staging: sm750fb: fix casing style on getDeviceID Fixes camel casing for getDeviceID function. This includes an update to the internal function variable 'deviceID' as it's relevant, needs updating, and is clearly scoped to the small function. Signed-off-by: Justin Cromer Link: https://lore.kernel.org/r/Z-CPQ7dGuTBZ3sWv@fedora Signed-off-by: Greg Kroah-Hartman commit 31fce300a1fef7b54ffb98e4cece8589529ca3bf Author: Abraham Samuel Adekunle Date: Sat Mar 22 16:36:53 2025 +0100 staging: bcm2835-camera: Modify function call formatting The line is a function call which ends with an opening parenthesis thereby not adhering to the Linux kernel coding style. Modify the function call to include parameters on the same line as the opening parenthesis to improve readability and consistency while adhering to Linux coding styles. Reported by checkpatch: CHECK: Lines should not end with '(' Signed-off-by: Abraham Samuel Adekunle Link: https://lore.kernel.org/r/Z97ZFURPvDcTkjjf@HP-650 Signed-off-by: Greg Kroah-Hartman commit 82922fca2fd26a05ce5ce72ce913ab503c2b4ada Author: Nathan Lynch Date: Thu Oct 10 12:52:07 2024 -0500 Documentation: dmaengine: Correct reference to glReadPixels() The author very likely meant "glReadPixels()" instead of "glReadpielx()", which does not appear in the OpenGL API. https://registry.khronos.org/OpenGL-Refpages/gl4/html/glReadPixels.xhtml Signed-off-by: Nathan Lynch Link: https://lore.kernel.org/r/20241010-doc-dmaengine-glreadpixels-v1-1-8202e5834b13@amd.com Signed-off-by: Vinod Koul commit d23fce15abd480811098c0bca6d4edeb17824279 Author: Eric Biggers Date: Sat Apr 5 11:26:09 2025 -0700 crypto: chacha - remove is now included only by crypto/chacha.c, so fold it into there. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 632ab0978f0895ca2e477b053d9933768cf0339a Author: Eric Biggers Date: Sat Apr 5 11:26:08 2025 -0700 crypto: x86/chacha - remove the skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit efe8ddfaa3361c5080ad10a1226652cc0839ee49 Author: Eric Biggers Date: Sat Apr 5 11:26:07 2025 -0700 crypto: s390/chacha - remove the skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f7915484c0200e7fe67d25b715408de6dc287047 Author: Eric Biggers Date: Sat Apr 5 11:26:06 2025 -0700 crypto: powerpc/chacha - remove the skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5772a781822dda72523e837f90a777890b090e50 Author: Eric Biggers Date: Sat Apr 5 11:26:05 2025 -0700 crypto: mips/chacha - remove the skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8c28abede16c9396eb90356a4e084d5f3e847886 Author: Eric Biggers Date: Sat Apr 5 11:26:04 2025 -0700 crypto: arm64/chacha - remove the skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 08820553f33ae0d9143ff33910dbb5874b742455 Author: Eric Biggers Date: Sat Apr 5 11:26:03 2025 -0700 crypto: arm/chacha - remove the redundant skcipher algorithms Since crypto/chacha.c now registers chacha20-$(ARCH), xchacha20-$(ARCH), and xchacha12-$(ARCH) skcipher algorithms that use the architecture's ChaCha and HChaCha library functions, individual architectures no longer need to do the same. Therefore, remove the redundant skcipher algorithms and leave just the library functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 4aa6dc909e400b247bd3abf29f805d49a9c140bf Author: Eric Biggers Date: Sat Apr 5 11:26:02 2025 -0700 crypto: chacha - centralize the skcipher wrappers for arch code Following the example of the crc32 and crc32c code, make the crypto subsystem register both generic and architecture-optimized chacha20, xchacha20, and xchacha12 skcipher algorithms, all implemented on top of the appropriate library functions. This eliminates the need for every architecture to implement the same skcipher glue code. To register the architecture-optimized skciphers only when architecture-optimized code is actually being used, add a function chacha_is_arch_optimized() and make each arch implement it. Change each architecture's ChaCha module_init function to arch_initcall so that the CPU feature detection is guaranteed to run before chacha_is_arch_optimized() gets called by crypto/chacha.c. In the case of s390, remove the CPU feature based module autoloading, which is no longer needed since the module just gets pulled in via function linkage. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ceba0eda831382864dc420fcab5f6079fbb26ba2 Author: Eric Biggers Date: Sat Apr 5 11:26:01 2025 -0700 crypto: riscv/chacha - implement library instead of skcipher Currently the RISC-V optimized ChaCha20 is only wired up to the crypto_skcipher API, which makes it unavailable to users of the library API. The crypto_skcipher API for ChaCha20 is going to change to be implemented on top of the library API, so the library API needs to be supported. And of course it's needed anyway to serve the library users. Therefore, change the RISC-V ChaCha20 code to implement the library API instead of the crypto_skcipher API. The library functions take the ChaCha state matrix directly (instead of key and IV) and support both ChaCha20 and ChaCha12. To make the RISC-V code work properly for that, change the assembly code to take the state matrix directly and add a nrounds parameter. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 570ef50a15d7caa4d63d66f1e28d967065733f84 Author: Eric Biggers Date: Fri Apr 4 21:09:30 2025 -0700 crypto: x86/aes-xts - optimize _compute_first_set_of_tweaks for AVX-512 Optimize the AVX-512 version of _compute_first_set_of_tweaks by using vectorized shifts to compute the first vector of tweak blocks, and by using byte-aligned shifts when multiplying by x^8. AES-XTS performance on AMD Ryzen 9 9950X (Zen 5) improves by about 2% for 4096-byte messages or 6% for 512-byte messages. AES-XTS performance on Intel Sapphire Rapids improves by about 1% for 4096-byte messages or 3% for 512-byte messages. Code size decreases by 75 bytes which outweighs the increase in rodata size of 16 bytes. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit bc23fe6dc172b09778ce3d75a9157decd153f4ef Author: Uros Bizjak Date: Fri Apr 4 09:41:02 2025 +0200 crypto: x86 - Remove CONFIG_AS_AVX512 handling Current minimum required version of binutils is 2.25, which supports AVX-512 instruction mnemonics. Remove check for assembler support of AVX-512 instructions and all relevant macros for conditional compilation. No functional change intended. Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit d032a27e8fe9e22ef8d70dd50ee36d0a5de12198 Author: Uros Bizjak Date: Fri Apr 4 09:41:01 2025 +0200 crypto: x86 - Remove CONFIG_AS_SHA256_NI Current minimum required version of binutils is 2.25, which supports SHA-256 instruction mnemonics. Remove check for assembler support of SHA-256 instructions and all relevant macros for conditional compilation. No functional change intended. Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 984f835009d61316b7a76e547fbe636770c8342d Author: Uros Bizjak Date: Fri Apr 4 09:41:00 2025 +0200 crypto: x86 - Remove CONFIG_AS_SHA1_NI Current minimum required version of binutils is 2.25, which supports SHA-1 instruction mnemonics. Remove check for assembler support of SHA-1 instructions and all relevant macros for conditional compilation. No functional change intended. Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit d0d9d00b092243b802dad6f23f8b2e8245e1c96b Author: Giovanni Cabiddu Date: Thu Apr 3 21:07:28 2025 +0100 crypto: qat - switch to standard pattern for PCI IDs Update the names of the defines for PCI IDs to follow the standard naming convention `PCI_DEVICE_ID_`. Also drop the unnecessary inner comma from the pci_device_id tables that use these definitions. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit e0f860a1ca32e7206b5cb43812acec9ffe211a52 Author: Ard Biesheuvel Date: Thu Apr 3 09:19:57 2025 +0200 crypto: ctr - remove unused crypto_ctr_encrypt_walk() crypto_ctr_encrypt_walk() is no longer used so remove it. Note that some existing drivers currently rely on the transitive includes of some other crypto headers so retain those for the time being. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7c79bdf97802290b5dbad043a0c67719797405cc Author: Ard Biesheuvel Date: Thu Apr 3 09:19:56 2025 +0200 crypto: arm/aes-neonbs - stop using the SIMD helper Now that ARM permits use of the NEON unit in softirq context as well as task context, there is no longer a need to rely on the SIMD helper module to construct async skciphers wrapping the sync ones, as the latter can always be called directly. So remove these wrappers and the dependency on the SIMD helper. This permits the use of these algorithms by callers that only support synchronous use. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e77fe9cce31b5db4a6b3f5fac7d69352612229c5 Author: Ard Biesheuvel Date: Thu Apr 3 09:19:55 2025 +0200 crypto: arm/aes-ce - stop using the SIMD helper Now that ARM permits use of the NEON unit in softirq context as well as task context, there is no longer a need to rely on the SIMD helper module to construct async skciphers wrapping the sync ones, as the latter can always be called directly. So remove these wrappers and the dependency on the SIMD helper. This permits the use of these algorithms by callers that only support synchronous use. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9b4400215e0e0b3edad010398069fcc51659a8cc Author: Herbert Xu Date: Thu Apr 3 12:14:50 2025 +0800 crypto: x86/chacha - Remove SIMD fallback path Get rid of the fallback path as SIMD is now always usable in softirq context. Signed-off-by: Herbert Xu commit f98ed0dd58d9eabe5d240743fc26d4d22e202a07 Author: Herbert Xu Date: Thu Apr 3 10:33:32 2025 +0800 crypto: hash - Do not use shash in hard IRQs Update the documentation to be consistent with the fact that shash may not be used in hard IRQs. Reported-by: Eric Biggers Signed-off-by: Herbert Xu commit 83366bcc7cb9bb6570363bef7cf05948cb00fe4e Author: Colin Ian King Date: Wed Apr 2 12:13:47 2025 +0100 crypto: eip93 - Make read-only arrays static const Don't populate the read-only arrays sha256_init, sha224_init, sha1_init and md5_init on the stack at run time, instead make them static. Signed-off-by: Colin Ian King Reviewed-by: Antoine Tenart Signed-off-by: Herbert Xu commit bda5cd6e29e82ff0071f801aed75d2480d74703f Author: Eric Biggers Date: Tue Apr 1 17:24:09 2025 -0700 crypto: x86/twofish - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 982b72cd00b502b30abe8d48d07d7512204e1d73 Author: Eric Biggers Date: Tue Apr 1 17:24:08 2025 -0700 crypto: x86/sm4 - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cc01d2840f2900c40e05fc10e082b348893172c4 Author: Eric Biggers Date: Tue Apr 1 17:24:07 2025 -0700 crypto: x86/serpent - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ca6d0e8ed88d694c20e7d95d96fa83ff78376575 Author: Eric Biggers Date: Tue Apr 1 17:24:06 2025 -0700 crypto: x86/cast - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3e862a87ffbc70f133e297abee17e687323fe5ab Author: Eric Biggers Date: Tue Apr 1 17:24:05 2025 -0700 crypto: x86/camellia - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6e3379b933bf4f1ceff38f1e5cb4cc1cb43f2c2d Author: Eric Biggers Date: Tue Apr 1 17:24:04 2025 -0700 crypto: x86/aria - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0ba6ec5b297204cde62bbbde8944219500c6229c Author: Eric Biggers Date: Tue Apr 1 17:24:03 2025 -0700 crypto: x86/aes - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3a7dfdbbe333226be65164edcaf7b493f05fbe21 Author: Eric Biggers Date: Tue Apr 1 17:24:02 2025 -0700 crypto: x86/aegis - stop using the SIMD helper Stop wrapping skcipher and aead algorithms with the crypto SIMD helper (crypto/simd.c). The only purpose of doing so was to work around x86 not always supporting kernel-mode FPU in softirqs. Specifically, if a hardirq interrupted a task context kernel-mode FPU section and then a softirqs were run at the end of that hardirq, those softirqs could not use kernel-mode FPU. This has now been fixed. In combination with the fact that the skcipher and aead APIs only support task and softirq contexts, these can now just use kernel-mode FPU unconditionally on x86. This simplifies the code and improves performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7d14fbc5691b39b8ab322c0220713c2ac3298b29 Author: Eric Biggers Date: Tue Apr 1 17:24:01 2025 -0700 crypto: x86/aes - drop the avx10_256 AES-XTS and AES-CTR code Intel made a late change to the AVX10 specification that removes support for a 256-bit maximum vector length and enumeration of the maximum vector length. AVX10 will imply a maximum vector length of 512 bits. I.e. there won't be any such thing as AVX10/256 or AVX10/512; there will just be AVX10, and it will essentially just consolidate AVX512 features. As a result of this new development, my strategy of providing both *_avx10_256 and *_avx10_512 functions didn't turn out to be that useful. The only remaining motivation for the 256-bit AVX512 / AVX10 functions is to avoid downclocking on older Intel CPUs. But in the case of AES-XTS and AES-CTR, I already wrote *_avx2 code too (primarily to support CPUs without AVX512), which performs almost as well as *_avx10_256. So we should just use that. Therefore, remove the *_avx10_256 AES-XTS and AES-CTR functions and algorithms, and rename the *_avx10_512 AES-XTS and AES-CTR functions and algorithms to *_avx512. Make Ice Lake and Tiger Lake use *_avx2 instead of *_avx10_256 which they previously used. I've left AES-GCM unchanged for now. There is no VAES+AVX2 optimized AES-GCM in the kernel yet, so the path forward for that is not as clear. However, I did write a VAES+AVX2 optimized AES-GCM for BoringSSL. So one option is to port that to the kernel and then do the same cleanup. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5ebc052d3b8233f72cfc0a57afed0cb4b2d2b287 Author: Herbert Xu Date: Sun Mar 30 09:31:28 2025 +0800 MAINTAINERS: Update maintainers for crypto/marvell Remove the entries for Arnaud Ebalard and Boris Brezillon as requested. Link: https://lore.kernel.org/linux-crypto/20f0162643f94509b0928e17afb7efbd@ssi.gouv.fr/ Signed-off-by: Herbert Xu Acked-by: Boris Brezillon Signed-off-by: Herbert Xu commit 0a5d5ff90229f51ce16a0fb5da93842b039a2dae Author: Ovidiu Panait Date: Sat Mar 29 20:01:22 2025 +0200 crypto: omap-sham - use dev_groups to register attribute groups Instead of manually adding attribute groups, set dev_groups pointer to have the driver core do it. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 7188186ea657b64bf6a3c62b772a9148bbebb114 Author: Ovidiu Panait Date: Sat Mar 29 20:01:21 2025 +0200 crypto: omap-aes - use dev_groups to register attribute groups Instead of manually adding attribute groups, set dev_groups pointer to have the driver core do it. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 1b58e2bb7762c13a5b87c683a8517ad2a1a3cda5 Author: Suman Kumar Chakraborty Date: Fri Mar 28 10:33:02 2025 +0000 crypto: qat - remove BITS_IN_DWORD() The BITS_IN_DWORD() macro, which represents the number of bits in the registers accessed by the firmware loader, is currently defined as 32. For consistency and readability, replace this macro with the existing BITS_PER_TYPE() macro, which serves the same purpose. This does not introduce any functional change. Signed-off-by: Suman Kumar Chakraborty Reviewed-by: Andy Shevchenko Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit e5661d9cf27b6964b6acc0eb8cbe9ce8827e36c8 Author: Giovanni Cabiddu Date: Wed Mar 26 16:23:01 2025 +0000 crypto: qat - remove initialization in device class The structures adf_hw_device_class_* are static. Remove initialization to zero of the field instance as it is zero by C convention. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 71e0cc1eab584d6f95526a5e8c69ec666ca33e1b Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:53 2025 +0000 crypto: qat - add shutdown handler to qat_c3xxx During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel. This might result in output like the following after the kexec reboot: QAT: AE0 is inactive!! QAT: failed to get device out of reset c3xxx 0000:3f:00.0: qat_hal_clr_reset error c3xxx 0000:3f:00.0: Failed to init the AEs c3xxx 0000:3f:00.0: Failed to initialise Acceleration Engine c3xxx 0000:3f:00.0: Resetting device qat_dev0 c3xxx 0000:3f:00.0: probe with driver c3xxx failed with error -14 Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly. Cc: Fixes: 890c55f4dc0e ("crypto: qat - add support for c3xxx accel type") Reviewed-by: Ahsan Atta Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 4fc54f67cb474a25d40c15e8cbdba4e1cdaea61a Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:52 2025 +0000 crypto: qat - remove redundant prototypes in qat_c3xxx Move the definition of the adf_driver structure and remove the redundant prototypes for the functions adf_probe() and adf_remove() in the qat_c3xxx driver. Also move the pci_device_id table close to where it is used and drop the inner comma as it is not required. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit a9a6e9279b2998e2610c70b0dfc80a234f97c76c Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:51 2025 +0000 crypto: qat - add shutdown handler to qat_c62x During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel. This might result in output like the following after the kexec reboot: QAT: AE0 is inactive!! QAT: failed to get device out of reset c6xx 0000:3f:00.0: qat_hal_clr_reset error c6xx 0000:3f:00.0: Failed to init the AEs c6xx 0000:3f:00.0: Failed to initialise Acceleration Engine c6xx 0000:3f:00.0: Resetting device qat_dev0 c6xx 0000:3f:00.0: probe with driver c6xx failed with error -14 Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly. Cc: Fixes: a6dabee6c8ba ("crypto: qat - add support for c62x accel type") Reviewed-by: Ahsan Atta Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 7eb2c73ece5bd866348b3e893e98a744b3aaacf5 Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:50 2025 +0000 crypto: qat - remove redundant prototypes in qat_c62x Move the definition of the adf_driver structure and remove the redundant prototypes for the functions adf_probe() and adf_remove() in the qat_c62x driver. Also move the pci_device_id table close to where it is used and drop the inner comma as it is not required. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 2c4e8b228733bfbcaf49408fdf94d220f6eb78fc Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:49 2025 +0000 crypto: qat - add shutdown handler to qat_dh895xcc During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel. This might result in output like the following after the kexec reboot: QAT: AE0 is inactive!! QAT: failed to get device out of reset dh895xcc 0000:3f:00.0: qat_hal_clr_reset error dh895xcc 0000:3f:00.0: Failed to init the AEs dh895xcc 0000:3f:00.0: Failed to initialise Acceleration Engine dh895xcc 0000:3f:00.0: Resetting device qat_dev0 dh895xcc 0000:3f:00.0: probe with driver dh895xcc failed with error -14 Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly. Cc: Fixes: 7afa232e76ce ("crypto: qat - Intel(R) QAT DH895xcc accelerator") Reviewed-by: Ahsan Atta Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 0c4a53fe7affb965e7ddf61f8fe8fa151d1174c3 Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:48 2025 +0000 crypto: qat - remove redundant prototypes in qat_dh895xcc Move the definition of the adf_driver structure and remove the redundant prototypes for the functions adf_probe() and adf_remove() in the qat_dh895xxcc driver. Also move the pci_device_id table close to where it is used and drop the inner comma as it is not required. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 097143f23a1164bfd1b6f70279d229be44da2e30 Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:47 2025 +0000 crypto: qat - add shutdown handler to qat_420xx During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel. This might result in output like the following after the kexec reboot: 420xx 0000:01:00.0: Failed to power up the device 420xx 0000:01:00.0: Failed to initialize device 420xx 0000:01:00.0: Resetting device qat_dev0 420xx 0000:01:00.0: probe with driver 420xx failed with error -14 Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly. Cc: Fixes: fcf60f4bcf54 ("crypto: qat - add support for 420xx devices") Reviewed-by: Ahsan Atta Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 845bc952024dbf482c7434daeac66f764642d52d Author: Giovanni Cabiddu Date: Wed Mar 26 15:59:46 2025 +0000 crypto: qat - add shutdown handler to qat_4xxx During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel. This might result in output like the following after the kexec reboot: 4xxx 0000:01:00.0: Failed to power up the device 4xxx 0000:01:00.0: Failed to initialize device 4xxx 0000:01:00.0: Resetting device qat_dev0 4xxx 0000:01:00.0: probe with driver 4xxx failed with error -14 Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly. Cc: Fixes: 8c8268166e83 ("crypto: qat - add qat_4xxx driver") Link: https://lore.kernel.org/all/Z-DGQrhRj9niR9iZ@gondor.apana.org.au/ Reported-by: Randy Wright Closes: https://issues.redhat.com/browse/RHEL-84366 Reviewed-by: Ahsan Atta Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 26013326a6bad4f6c5a8f367026867b77c5e1ff2 Author: Herbert Xu Date: Wed Mar 26 18:05:38 2025 +0800 crypto: sa2ul - Use proper helpers to setup request Rather than setting up a request by hand, use the correct API helpers to setup the new request. This is because the API helpers will setup chaining. Also change the fallback allocation to explicitly request for a sync algorithm as this driver will crash if given an async one. Signed-off-by: Herbert Xu Tested-by: Manorit Chawdhry Signed-off-by: Herbert Xu commit f7b86e0e75bc234751cb7a82d888083a57ef28b2 Author: Ashish Kalra Date: Mon Mar 24 21:15:17 2025 +0000 crypto: ccp - Add new SEV/SNP platform shutdown API Add new API interface to do SEV/SNP platform shutdown when KVM module is unloaded. Reviewed-by: Dionna Glaze Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 19860c3274fb209e36ebcba562dc5da301a53cb3 Author: Ashish Kalra Date: Mon Mar 24 21:15:02 2025 +0000 crypto: ccp - Register SNP panic notifier only if SNP is enabled Currently, the SNP panic notifier is registered on module initialization regardless of whether SNP is being enabled or initialized. Instead, register the SNP panic notifier only when SNP is actually initialized and unregister the notifier when SNP is shutdown. Reviewed-by: Dionna Glaze Reviewed-by: Alexey Kardashevskiy Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 65a895a44e641fe47f3419b064288d1d713024a5 Author: Ashish Kalra Date: Mon Mar 24 21:14:47 2025 +0000 crypto: ccp - Reset TMR size at SNP Shutdown Implicit SNP initialization as part of some SNP ioctls modify TMR size to be SNP compliant which followed by SNP shutdown will leave the TMR size modified and then subsequently cause SEV only initialization to fail, hence, reset TMR size to default at SNP Shutdown. Acked-by: Dionna Glaze Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit ceac7fb89e8da465aec3ac3c20477f912f5c3a6c Author: Ashish Kalra Date: Mon Mar 24 21:14:32 2025 +0000 crypto: ccp - Ensure implicit SEV/SNP init and shutdown in ioctls Modify the behavior of implicit SEV initialization in some of the SEV ioctls to do both SEV initialization and shutdown and add implicit SNP initialization and shutdown to some of the SNP ioctls so that the change of SEV/SNP platform initialization not being done during PSP driver probe time does not break userspace tools such as sevtool, etc. Prior to this patch, SEV has always been initialized before these ioctls as SEV initialization is done as part of PSP module probe, but now with SEV initialization being moved to KVM module load instead of PSP driver probe, the implied SEV INIT actually makes sense and gets used and additionally to maintain SEV platform state consistency before and after the ioctl SEV shutdown needs to be done after the firmware call. It is important to do SEV Shutdown here with the SEV/SNP initialization moving to KVM, an implicit SEV INIT here as part of the SEV ioctls not followed with SEV Shutdown will cause SEV to remain in INIT state and then a future SNP INIT in KVM module load will fail. Also ensure that for these SEV ioctls both implicit SNP and SEV INIT is done followed by both SEV and SNP shutdown as RMP table must be initialized before calling SEV INIT if SNP host support is enabled. Similarly, prior to this patch, SNP has always been initialized before these ioctls as SNP initialization is done as part of PSP module probe, therefore, to keep a consistent behavior, SNP init needs to be done here implicitly as part of these ioctls followed with SNP shutdown before returning from the ioctl to maintain the consistent platform state before and after the ioctl. Suggested-by: Tom Lendacky Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 9770b428b1a28360663f1f5e524ee458b4cf454b Author: Ashish Kalra Date: Mon Mar 24 21:14:13 2025 +0000 crypto: ccp - Move dev_info/err messages for SEV/SNP init and shutdown Move dev_info and dev_err messages related to SEV/SNP initialization and shutdown into __sev_platform_init_locked(), __sev_snp_init_locked() and __sev_platform_shutdown_locked(), __sev_snp_shutdown_locked() so that they don't need to be issued from callers. This allows both _sev_platform_init_locked() and various SEV/SNP ioctls to call __sev_platform_init_locked(), __sev_snp_init_locked() and __sev_platform_shutdown_locked(), __sev_snp_shutdown_locked() for implicit SEV/SNP initialization and shutdown without additionally printing any errors/success messages. Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 6131e119f5799bec55535530fa2fc44f5c7be1f1 Author: Ashish Kalra Date: Mon Mar 24 21:13:57 2025 +0000 crypto: ccp - Abort doing SEV INIT if SNP INIT fails If SNP host support (SYSCFG.SNPEn) is set, then the RMP table must be initialized before calling SEV INIT. In other words, if SNP_INIT(_EX) is not issued or fails then SEV INIT will fail if SNP host support (SYSCFG.SNPEn) is enabled. Signed-off-by: Ashish Kalra Signed-off-by: Herbert Xu commit 39ccd0e54f164ea3c40327d9163205a8449047c2 Author: Herbert Xu Date: Mon Mar 24 12:08:52 2025 +0800 crypto: iaa - Remove unused disable_async argument from iaa_decompress Remove the disable_async field left over after the NULL dst removal. Signed-off-by: Herbert Xu commit cc98d8ce934b99789d30421957fd6a20fffb1c22 Author: Herbert Xu Date: Mon Mar 24 12:04:18 2025 +0800 crypto: iaa - Do not clobber req->base.data The req->base.data field is for the user and must not be touched by the driver, unless you save it first. The iaa driver doesn't seem to be using the req->base.data value so just remove the assignment. Fixes: 09646c98d0bf ("crypto: iaa - Add irq support for the crypto async interface") Signed-off-by: Herbert Xu commit 184e56e77c06a7eef68a021e9d4b11a11a8ab096 Author: Herbert Xu Date: Mon Mar 24 11:57:32 2025 +0800 crypto: iaa - Move compression CRC into request object Rather than passing around a CRC between the functions, embed it into the acomp_request context. Signed-off-by: Herbert Xu commit a7b1d0c5f1ca05cabf7a119a86d81a1511dd273a Author: Herbert Xu Date: Wed Mar 19 20:31:49 2025 +0800 crypto: scomp - Drop the dst scratch buffer As deflate has been converted over to acomp, and cavium zip has been removed, there are no longer any scomp algorithms that can be used by IPsec. Since IPsec was the only user of the dst scratch buffer, remove it. Signed-off-by: Herbert Xu commit d462ae23bb3ca84eb82a53a671c915dc093eab43 Author: Herbert Xu Date: Wed Mar 19 20:31:47 2025 +0800 crypto: cavium/zip - Remove driver Remove cavium/zip as it is obsolete and stands in the way of acomp API work. If this is ever resurrected, please turn it into an acomp driver. Signed-off-by: Herbert Xu commit 7cc17ea196dda26ab34eea5b9aec19fd760761ad Author: Herbert Xu Date: Wed Mar 19 20:31:44 2025 +0800 crypto: cavium - Move cpt and nitrox rules into cavium Makefile Move the cpt and nitrox rules into the cavium Makefile. Signed-off-by: Herbert Xu commit 7b294e3eab5d537af5065dc50c25b0b57d59acce Author: Herbert Xu Date: Wed Mar 19 17:26:43 2025 +0800 crypto: crypto4xx - Fix gcc12 uninitialized warning in crypto4xx_crypt The compiler gcc 12 warns about the IV buffer being uninitialized in crypto4xx_crypt. Silence the warning by using the new gcc 12 access attribute to mark crypto4xx_build_pd. Also fix the IV buffer length as it has been quadrupled (64 instead of 16). Signed-off-by: Herbert Xu commit 08cabc7d3c8638b078e0ac2f755cead1defafe91 Author: Herbert Xu Date: Wed Mar 19 14:04:56 2025 +0800 crypto: deflate - Convert to acomp This based on work by Ard Biesheuvel . Convert deflate from scomp to acomp. This removes the need for the caller to linearise the source and destination. Link: https://lore.kernel.org/all/20230718125847.3869700-21-ardb@kernel.org/ Signed-off-by: Herbert Xu commit 9c8cf582626ef56632006212b385cfbb6c54f094 Author: Herbert Xu Date: Wed Mar 19 14:04:54 2025 +0800 crypto: acomp - Add acomp_walk Add acomp_walk which is similar to skcipher_walk but tailored for acomp. Signed-off-by: Herbert Xu commit 42d9f6c774790d290c175e8775ce9f1366438098 Author: Herbert Xu Date: Wed Mar 19 14:04:52 2025 +0800 crypto: acomp - Move scomp stream allocation code into acomp Move the dynamic stream allocation code into acomp and make it available as a helper for acomp algorithms. Signed-off-by: Herbert Xu commit d348ebc658cdf41b922671e472a6192c2338adb4 Author: Abhinaba Rakshit Date: Tue Mar 18 15:13:23 2025 +0530 dt-bindings: crypto: qcom-qce: document QCS615 crypto engine Document the crypto engine on the QCS615 platform. Acked-by: Rob Herring (Arm) Signed-off-by: Abhinaba Rakshit Signed-off-by: Herbert Xu commit c47e1f4142a3823b6e963e14db295a8a733804b5 Author: Herbert Xu Date: Mon Mar 17 16:33:59 2025 +0800 crypto: scomp - Allocate per-cpu buffer on first use of each CPU Per-cpu buffers can be wasteful when the number of CPUs is large, especially if the buffer itself is likely to never be used. Reduce such wastage by only allocating them on first use of a particular CPU. On start-up allocate a single buffer on the first possible CPU. For every other CPU a work struct will be scheduled on first use to allocate the buffer for that CPU. Until the allocation succeeds simply use the first CPU's buffer which is protected under a spin lock. Signed-off-by: Herbert Xu commit 138804c2c18ca8bd1443dea173b3cc2643995919 Author: Herbert Xu Date: Mon Mar 17 16:33:57 2025 +0800 crypto: api - Ensure cra_type->destroy is done in process context Move the cra_type->destroy call out of crypto_alg_put and into crypto_unregister_alg and crypto_free_instance. This ensures that it's always done in process context so calls such as flush_work can be done. Signed-off-by: Herbert Xu commit 3860642e0a87c8aef3c4285f3bb4ad473cfd514f Author: Herbert Xu Date: Mon Mar 17 16:33:54 2025 +0800 crypto: api - Move alg destroy work from instance to template Commit 9ae4577bc077 ("crypto: api - Use work queue in crypto_destroy_instance") introduced a work struct to free an instance after the last user goes away. Move the delayed work from the instance into its template so that when the template is unregistered it can ensure that all its instances have been freed before returning. Signed-off-by: Herbert Xu commit ccf395bde6aeefac139f4f250287feb139e3355d Author: Slawomir Rosek Date: Fri Mar 28 13:26:12 2025 +0000 platform/chrome: cros_ec_proto: Allow to build as module Allow to build ChromeOS EC communication protocol helpers as kernel module which is particularly useful for Android GKI (Generic Kernel Image) configuration. With this change the ChromeOS Platform (CONFIG_CHROME_PLATFORMS=y) can be enabled directly from the vendor kconfig fragment whithout additional configuration in gki_defconfig. Signed-off-by: Slawomir Rosek Link: https://lore.kernel.org/r/20250328132612.511471-1-srosek@chromium.org Signed-off-by: Tzung-Bi Shih commit da90147bf52b7ab6d8f021418496a7b6f39b2249 Author: Gustavo A. R. Silva Date: Fri Mar 28 07:20:00 2025 -0600 platform/chrome: cros_ec_debugfs: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/platform/chrome/cros_ec_debugfs.c:211:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/platform/chrome/cros_ec_debugfs.c:257:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/platform/chrome/cros_ec_debugfs.c:279:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Z-aiAAcIP7sBRtz0@kspp Signed-off-by: Tzung-Bi Shih commit 04251bc86653a839ccb1f5ec248ad5e8afd9a627 Author: Gustavo A. R. Silva Date: Fri Mar 28 07:07:38 2025 -0600 platform/chrome: cros_kbd_led_backlight: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/platform/chrome/cros_kbd_led_backlight.c:141:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/platform/chrome/cros_kbd_led_backlight.c:162:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Z-afGnRbyGs4dHb1@kspp Signed-off-by: Tzung-Bi Shih commit db4ea66acddf95b4bb13ef17537097820218fb7a Author: Gustavo A. R. Silva Date: Fri Mar 28 07:00:15 2025 -0600 platform/chrome: cros_ec_proto: Avoid -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warnings: drivers/platform/chrome/cros_ec_proto.c:143:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/platform/chrome/cros_ec_proto.c:761:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Z-adX1BB30dcSJ7x@kspp Signed-off-by: Tzung-Bi Shih commit 8dc528bed728ca0b887d9d5edecbcf23d7fed5a4 Author: Laura Nao Date: Tue Mar 18 11:22:58 2025 +0100 platform/chrome: of_hw_prober: Support Google Spherion Add a new compatible entry for "google,spherion" to the hardware prober platform list, using the same I2C component prober and trackpad data as "google,hana". Signed-off-by: Laura Nao Reviewed-by: Chen-Yu Tsai Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250318102259.189289-2-laura.nao@collabora.com Signed-off-by: Tzung-Bi Shih commit b644c2776652671256edcd7a8e71161e212b59ac Author: Raju Rangoju Date: Wed Apr 2 17:45:14 2025 +0530 spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller Register a new driver(spi_amd_pci) for the HID2 SPI controller using the PCI ID of the LPC bridge device. Add a new common probe function in spi_amd driver to encapsulate the code required for registering the controller driver. This function will be utilized by both the existing ACPI driver and the newly introduced PCI-based driver for the HID2 SPI controller. The MMIO register base address of the HID2 SPI controller can be obtained from the PCI LPC bridge registers. By implementing these changes, the DMA buffer will be correctly associated with the LPC bridge device, preventing IO_PAGE_FAULT caused by IOMMU when the LPC bridge attempts DMA operations on addresses owned by the HID2 SPI controller. Co-developed-by: Krishnamoorthi M Signed-off-by: Krishnamoorthi M Co-developed-by: Akshata MukundShetty Signed-off-by: Akshata MukundShetty Signed-off-by: Raju Rangoju Link: https://patch.msgid.link/20250402121514.2941334-1-Raju.Rangoju@amd.com Signed-off-by: Mark Brown commit f48d80503504257682e493dc17408f2f0b47bcfa Author: Gabor Juhos Date: Thu Mar 20 19:11:59 2025 +0100 spi: spi-qpic-snand: use kmalloc() for OOB buffer allocation The qcom_spi_ecc_init_ctx_pipelined() function allocates zeroed memory for the OOB buffer, then it fills the buffer with '0xff' bytes right after the allocation. In this case zeroing the memory during allocation is superfluous, so use kmalloc() instead of kzalloc() to avoid that. Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20250320-qpic-snand-kmalloc-v1-1-94e267550675@gmail.com Signed-off-by: Mark Brown commit 1f1d979fbf741c3608a344373f88444dc8749967 Author: Andy Shevchenko Date: Mon Mar 31 12:39:15 2025 +0300 spi: Simplify conditionals in spi_set_cs() First of all, the (foo && bar) || (!foo && !bar) when foo and bar are booleans is equivalent to (foo == bar). Second, reuse variable that holds already the calculation of the SPI CS mode to be active-high. No functional changes intended. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250331093915.4041600-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit dd8a9807fa03666bff52cb28472fb227eaac36c9 Author: Andy Shevchenko Date: Mon Mar 31 13:35:59 2025 +0300 spi: Group CS related fields in struct spi_device The CS related fields are sparse in the struct spi_device. Group them. While at it, fix the comment style of cs_index_mask. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250331103609.4160281-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 69e3433fa5e24edc94e94b4f34e3dbb754bdedbf Author: Patrice Chotard Date: Mon Mar 24 10:40:14 2025 +0100 spi: spi-stm32-ospi: Make "resets" a required property On some STM32MP2 SoCs, an Octo Memory Manager is embedded and need to retrieve OSPI's reset to perform its own initialization. Make "resets" property mandatory. Fixes: 79b8a705e26c ("spi: stm32: Add OSPI driver") Signed-off-by: Patrice Chotard Link: https://patch.msgid.link/20250324-upstream_ospi_required_resets-v2-2-85a48afcedec@foss.st.com Signed-off-by: Mark Brown commit d58b4eb7c03cabb10d4eebc89d7596e06376e54d Author: Patrice Chotard Date: Mon Mar 24 10:40:13 2025 +0100 spi: dt-bindings: st,stm32mp25-ospi: Make "resets" a required property On STM32MP2x SoC's family, OSPI is child of Octo Memory Manager which must have asccess to OSPI's reset to ensure its initialization. Make "resets" a required property. Fixes: bed97e35786a ("dt-bindings: spi: Add STM32 OSPI controller") Signed-off-by: Patrice Chotard Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250324-upstream_ospi_required_resets-v2-1-85a48afcedec@foss.st.com Signed-off-by: Mark Brown commit ea61f39b38bdbb7c77ba2c70e130acdb808c8d68 Author: Chen Ni Date: Tue Mar 25 11:22:26 2025 +0800 ASoC: sta32x: Remove unnecessary NULL check before clk_disable_unprepare() clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL. Remove unneeded NULL check for clk here. Signed-off-by: Chen Ni Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250325032226.603963-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 5533518834a3acc75919e8db671f6a8539e64f42 Author: Martin Blumenstingl Date: Sat Mar 29 20:14:33 2025 +0100 ASoC: hdmi-codec: wire up the .prepare callback also for SPDIF DAI ops Commit 2fef64eec23a ("ASoC: hdmi-codec: Add a prepare hook") added a prepare implementation. Back then the new callback was only integrated with hdmi_codec_i2s_dai_ops (which is used by the I2S input code-path). It was not added to hdmi_codec_spdif_dai_ops (which is used by the SPDIF input code-path). With commit baf616647fe6 ("drm/connector: implement generic HDMI audio helpers") the DRM subsystem has gained a helper framework which can be used by HDMI controller drivers. HDMI controller drivers are often tightly coupled with the hdmi-codec because of the so-called HDMI audio infoframe (which is often managed by the display controller). To allow the new DRM HDMI audio framework to work with the hdmi-codec driver for SPDIF inputs we also need to hook up the prepare callback to hdmi_codec_spdif_dai_ops. Just hooking into the hw_params callback would not be enough as hw_params (is called too early and) doesn't have access to the HDMI audio infoframe contents. Suggested-by: Dmitry Baryshkov Signed-off-by: Martin Blumenstingl Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250329191433.873237-1-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit 7afa96026f0a1d81b7e9cc8f1811cae4b80d4d94 Author: Thorsten Blum Date: Sat Apr 5 14:58:08 2025 +0200 ASoC: codecs: rt5677: Use secs_to_jiffies() instead of msecs_to_jiffies() Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling 'delay' to milliseconds. Since 'delay' isn't a compile-time constant, secs_to_jiffies() expands to much simpler code compared to msecs_to_jiffies(), reducing the size of 'snd-soc-rt5677-spi.ko' by 472 bytes. No functional changes intended. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250405125808.302259-1-thorsten.blum@linux.dev Signed-off-by: Mark Brown commit e0cd450a2d207ce44aa88137a045f2d2a31810c2 Author: Helen Koike Date: Thu Apr 3 10:02:42 2025 -0300 ASoC: Intel: Remove unused SND_SOC_INTEL_DA7219_MAX98357A_GENERIC This config was used by bxt_da7219_max98357a and kbl_da7219_max98357a, both were removed. Now it is not used anymore, so remove it. Signed-off-by: Helen Koike Link: https://patch.msgid.link/20250403130242.1227770-1-koike@igalia.com Signed-off-by: Mark Brown commit 5a4c3ce480031c4654ea8ee6c5cb4621819973f3 Author: Shengjiu Wang Date: Fri Mar 28 10:13:39 2025 +0800 ASoC: dt-bindings: fsl,mqs: Reference common DAI properties Reference the dai-common.yaml schema to allow '#sound-dai-cells' and "sound-name-prefix' to be used. Signed-off-by: Shengjiu Wang Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250328021339.1593635-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d1ecbcc3d82d65655685d3a05b3faf79e836d94a Author: Krzysztof Kozlowski Date: Mon Mar 24 13:51:31 2025 +0100 ASoC: dt-bindings: maxim,max98925: Fix include placement in DTS example Coding style and common logic dictates that headers should not be included in device nodes. No functional impact. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250324125131.81867-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 7288aa73e5cfb3f37ae93b55d7b7d63eca5140a8 Author: Philipp Stanner Date: Fri Apr 4 14:19:12 2025 +0200 ASoC: loongson: Replace deprecated PCI functions pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner Link: https://patch.msgid.link/20250404121911.85277-13-phasta@kernel.org Signed-off-by: Mark Brown commit ad20e1f877b6e0c523154d2c6533b836d4d05260 Author: Chen Ni Date: Tue Mar 25 17:26:40 2025 +0800 ASoC: sun8i-codec: Remove unnecessary NULL check before clk_prepare_enable/clk_disable_unprepare clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter.Remove unneeded NULL check for clk here. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20250325092640.996802-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit d0e1a832ce60354da2159d4d2b1fa324843622d5 Author: Cezary Rojewski Date: Fri Apr 4 12:16:22 2025 +0200 ASoC: Intel: avs: Permit deferred card registration Utilize card->deferrable flag to support delayed card enumeration - scenario where snd_soc_register_card() occurs before all the required card components are registered into the framework. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404101622.3673850-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit a3375522bb5e28285cb1845ad5601bf4a581da04 Author: Cezary Rojewski Date: Fri Apr 4 12:16:21 2025 +0200 ASoC: core: Complete support for card rebinding Since commit e894efef9ac7 ("ASoC: core: add support to card rebind") there is a support for card rebind. The support is only partial though. Let's consider the following scenarios both of which aim to enumerate a sound card: 1) snd_soc_add_component(comp1); (...) snd_soc_register_card(card1); 2) snd_soc_register_card(card1); (...) snd_soc_add_component(comp1); For the sake of simplicity, let comp1 be the last dependency needed for the card1 to enumerate. Case 1) will end up succeeding whereas 2) is a certain fail - snd_soc_bind_card() does not honor unbind_card_list so even a non-fatal return code of EPROBE_DEFER will cause the card to collapse. Given the typical usecase of platform_device serving as a card->dev and its probe() ending with: int carddev_probe(struct platform_device *pdev) { (...) return devm_snd_soc_register_card(dev, card); } failure to register card triggers device_unbind_cleanup() - really_probe() in dd.c. To allow for card registration to be deferred while being friendly towards existing users of devm_snd_soc_register_card(), add new card->devres_dev field, and devm_xxx() variants for card registration: devm_snd_soc_register_deferrable_card() (external) devm_snd_soc_bind_card() (internal) In essence, if requested, devm_snd_soc_bind_card() replaces snd_soc_bind_card(). The rebind procedure takes care of destroying old devres before attempting the new bind. This makes sure nothing is left hanging if binding fails and card becomes unbound but is still registered to the ASoC framework. To allow snd_soc_bind_card() to be reused by the deferrable friends, move 'client_mutex' locking to the function's callers and select between devm_xxx and non-devm_xxx variants of snd_soc_bind_card() based on card->devres_dev. On top of the feature, the refactoring brings two benefits: a) single lock/unlock of 'client_mutex' in snd_soc_add_component() instead of ambiguous unlock and immediate lock in snd_soc_try_rebind_card() b) all unbind_card_list manipulations done under 'client_mutex' Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250404101622.3673850-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit d01131e3ce14f9837884aef1f3e463a3a492291f Author: Zhang Enpei Date: Thu Apr 3 15:41:42 2025 +0800 ASoC: stm: stm32_sai: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin Link: https://patch.msgid.link/20250403154142936Po-soX8Bifyvw_eWSbddT@zte.com.cn Signed-off-by: Mark Brown commit eec611d26f84800852a9badbeafa76db3cdc9118 Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:32 2025 +0000 ASoC: codecs: wcd938x: add mux control support for hp audio mux On some platforms to minimise pop and click during switching between CTIA and OMTP headset an additional HiFi mux is used. Most common case is that this switch is switched on by default, but on some platforms this needs a regulator enable. move to using mux control to enable both regulator and handle gpios, deprecate the usage of gpio. Signed-off-by: Srinivas Kandagatla Tested-by: Christopher Obbard Tested-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250327100633.11530-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit fe19245d3efd5bf714623e83f2056bc46d9339b1 Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:31 2025 +0000 ASoC: dt-bindings: wcd93xx: add bindings for audio mux controlling hp On some platforms to minimise pop and click during switching between CTIA and OMTP headset an additional HiFi mux is used. Most common case is that this switch is switched on by default, but on some platforms this needs a regulator enable. Move to using mux-controls so that both the gpio and regulators can be driven correctly, rather than adding regulator handing in the codec. This patch adds required bindings to add such mux controls. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250327100633.11530-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 6417066fb41f70c5aec242a36cbb6def8c99303f Author: Srinivas Kandagatla Date: Thu Mar 27 10:06:30 2025 +0000 ASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic api Remove confusing and unused argument in swap_gnd_mic api, the second argument active is not really used, and always set to true in the mbhc drivers. The callback itself is used to toggle the gnd_mic lines when a cross connection is detected by mbhc circuits, so there is no need of this argument. Signed-off-by: Srinivas Kandagatla Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20250327100633.11530-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 1d9119794c10023ebd7c901aa9aa2c74eb833177 Author: Shengjiu Wang Date: Fri Mar 28 16:57:44 2025 +0800 ASoC: fsl_sai: separate set_tdm_slot() for tx and rx The transmitter and receiver of SAI can be used for different slot number and slot width configuration, so refine fsl_sai_set_dai_tdm_slot(), add fsl_sai_set_dai_tdm_slot_tx() for tx and fsl_sai_set_dai_tdm_slot_rx() for rx. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250328085744.1893434-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e4b543d51ef1e723bde12d160121b7358a005b4f Author: Shengjiu Wang Date: Fri Mar 28 16:57:43 2025 +0800 ASoC: fsl_sai: separate 'is_dsp_mode' for tx and rx The transmitter and receiver of SAI can be used for different dsp modes, then 'is_dsp_mode' needs to be separated. Expand 'is_dsp_mode' to array 'is_dsp_mode[]' to support different configuration of tx and rx. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250328085744.1893434-4-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 4fe9d03b48cce3edb679ce1f404f19d242537a66 Author: Shengjiu Wang Date: Fri Mar 28 16:57:42 2025 +0800 ASoC: fsl_sai: add xlate_tdm_slot_mask() callback With DPCM case, for example ASRC->SAI->AMIX, the SAI can be codec dai device in backend, but __soc_pcm_hw_params() will get the tdm_mask for channel constraint, tdm_mask is set by snd_soc_dai_set_tdm_slot() from slot number, but SAI supports flexible channel number with fixed slot number, so add an empty xlate_tdm_slot_mask() callback to avoid the channel constraint in __soc_pcm_hw_params(). Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250328085744.1893434-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 78b3bcfd5697f486946f559f56dbf78c30e22f27 Author: Shengjiu Wang Date: Fri Mar 28 16:57:41 2025 +0800 ASoC: fsl_sai: allow to set mclk rate with zero clk_id If clk_id is zero, it means FSL_SAI_CLK_BUS in fsl_sai_set_dai_sysclk(), as the clk[FSL_SAI_CLK_BUS]'s rate can't be changed, there is no rate changed for mclk. But with audio-graph-card, the clk_id is always zero, in order to allow to set mclk rate with zero clk_id, update the condition to be if clk_id is zero, then set the FSL_SAI_CLK_MAST1's rate. This would not change the original function for master mode. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250328085744.1893434-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d5099bc1b56417733f4cccf10c61ee74dadd5562 Author: Peng Fan Date: Mon Mar 24 19:51:29 2025 +0800 ASoC: codec: wcd9335: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use dev_gpiod_get to get GPIO descriptor. - Use gpiod_set_value to configure output value. With legacy of_gpio API, the driver set gpio value 0 to assert reset, and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means output low, set value 0 means output high with gpiod API. The in-tree DTS files have the right polarity set up already so we can expect this to "just work" Reviewed-by: Linus Walleij Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-3-773f67ce3b56@nxp.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit c2d359b4acfbe847d3edcc25d3dc4e594daf9010 Author: Peng Fan Date: Mon Mar 24 19:51:28 2025 +0800 ASoC: codec: wcd938x: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use dev_gpiod_get to get GPIO descriptor. - Use gpiod_set_value to configure output value. With legacy of_gpio API, the driver set gpio value 0 to assert reset, and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means output low, set value 0 means output high with gpiod API. The in-tree DTS files have the right polarity set up already so we can expect this to "just work". Reviewed-by: Linus Walleij Signed-off-by: Peng Fan Tested-by: Steev Klimaszewski Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-2-773f67ce3b56@nxp.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit 4bba5d0e51647e06c83036b6c3f0ec65465adc68 Author: Peng Fan Date: Mon Mar 24 19:51:27 2025 +0800 ASoC: codec: wcd939x: Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use dev_gpiod_get to get GPIO descriptor. - Use gpiod_set_value to configure output value. With legacy of_gpio API, the driver set gpio value 0 to assert reset, and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means output low, set value 0 means output high with gpiod API. The in-tree DTS files have the right polarity set up already so we can expect this to "just work". Reviewed-by: Linus Walleij Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250324-wcd-gpiod-v2-1-773f67ce3b56@nxp.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit 4f2d1bbc2c92a32fd612e6c3b51832d5c1c3678e Author: Ard Biesheuvel Date: Tue Apr 1 15:34:20 2025 +0200 x86/boot: Move the EFI mixed mode startup code back under arch/x86, into startup/ Linus expressed a strong preference for arch-specific asm code (i.e., virtually all of it) to reside under arch/ rather than anywhere else. So move the EFI mixed mode startup code back, and put it under arch/x86/boot/startup/ where all shared x86 startup code is going to live. Suggested-by: Linus Torvalds Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: David Woodhouse Cc: H. Peter Anvin Cc: Kees Cook Link: https://lore.kernel.org/r/20250401133416.1436741-11-ardb+git@google.com commit 5a67da1f49cf4f16ec9966446885131dad0eb245 Author: Ard Biesheuvel Date: Tue Apr 1 15:34:19 2025 +0200 x86/boot: Move the 5-level paging trampoline into /startup The 5-level paging trampoline is used by both the EFI stub and the traditional decompressor. Move it out of the decompressor sources into the newly minted arch/x86/boot/startup/ sub-directory which will hold startup code that may be shared between the decompressor, the EFI stub and the kernel proper, and needs to tolerate being called during early boot, before the kernel virtual mapping has been created. This will allow the 5-level paging trampoline to be used by EFI boot images such as zboot that omit the traditional decompressor entirely. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: David Woodhouse Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250401133416.1436741-10-ardb+git@google.com commit 5d4456fc88f7aa9bd139b7c5bd4f1c03f552b973 Author: Ard Biesheuvel Date: Tue Apr 1 15:34:18 2025 +0200 x86/boot/compressed: Merge the local pgtable.h include into Merge the local include "pgtable.h" -which declares the API of the 5-level paging trampoline- into so that its implementation in la57toggle.S as well as the calling code can be decoupled from the traditional decompressor. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: David Woodhouse Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250401133416.1436741-9-ardb+git@google.com commit 0ee07a07920285d519152974872ca6e43f8742e8 Author: Andy Shevchenko Date: Fri Apr 4 19:53:03 2025 +0300 x86/boot: Use __ALIGN_KERNEL_MASK() instead of open coded analogue LOAD_PHYSICAL_ADDR is calculated as an aligned (up) CONFIG_PHYSICAL_START with the respective alignment value CONFIG_PHYSICAL_ALIGN. However, the code is written openly while we have __ALIGN_KERNEL_MASK() macro that does the same. This macro has nothing special, that's why it may be used in assembler code or linker scripts (on the contrary __ALIGN_KERNEL() may not). Do it so. Signed-off-by: Andy Shevchenko Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250404165303.3657139-1-andriy.shevchenko@linux.intel.com commit e37aa1211fbfeb9d5e79f4a4b0da898e6d0d53bb Author: Andi Kleen Date: Tue Sep 24 10:01:28 2024 -0700 x86/cpuid: Add AMX and SPEC_CTRL dependencies Add some missing dependencies to the CPUID dependency table: - All the AMX features depend on AMX_TILE - All the SPEC_CTRL features depend on SPEC_CTRL [ mingo: Keep the AMX part of the table grouped ... ] Signed-off-by: Andi Kleen Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Sohil Mehta Cc: Tony Luck Cc: Ahmed S. Darwish Link: https://lore.kernel.org/r/20240924170128.2611854-1-ak@linux.intel.com commit 29b49be6c97ef45e709c7d7676ecaa5dfdd0f1b6 Author: Tejun Heo Date: Fri Apr 4 10:10:30 2025 -1000 sched_ext: Drop "ops" from SCX_OPS_TASK_ITER_BATCH The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from SCX_OPS_TASK_ITER_BATCH. Signed-off-by: Tejun Heo Suggested-and-acked-by: Andrea Righi commit a97915559f5c5ff1972d678b94fd460c72a3b5f2 Author: JP Kobryn Date: Thu Apr 3 18:10:48 2025 -0700 cgroup: change rstat function signatures from cgroup-based to css-based This non-functional change serves as preparation for moving to subsystem-based rstat trees. To simplify future commits, change the signatures of existing cgroup-based rstat functions to become css-based and rename them to reflect that. Though the signatures have changed, the implementations have not. Within these functions use the css->cgroup pointer to obtain the associated cgroup and allow code to function the same just as it did before this patch. At applicable call sites, pass the subsystem-specific css pointer as an argument or pass a pointer to cgroup::self if not in subsystem context. Note that cgroup_rstat_updated_list() and cgroup_rstat_push_children() are not altered yet since there would be a larger amount of css to cgroup conversions which may overcomplicate the code at this intermediate phase. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 845a7245801142bfff411bc84afa8cdbc789562f Author: JP Kobryn Date: Thu Apr 3 18:10:47 2025 -0700 cgroup: add helper for checking when css is cgroup::self The cgroup struct has a css field called "self". The main difference between this css and the others found in the cgroup::subsys array is that cgroup::self has a NULL subsystem pointer. There are several places where checks are performed to determine whether the css in question is cgroup::self or not. Instead of accessing css->ss directly, introduce a helper function that shows the intent and use where applicable. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit f6e9a26e2d488c743757d66898ae91c53ffbe528 Author: JP Kobryn Date: Thu Apr 3 18:10:46 2025 -0700 cgroup: move rstat base stat objects into their own struct This non-functional change serves as preparation for moving to subsystem-based rstat trees. The base stats are not an actual subsystem, but in future commits they will have exclusive rstat trees just as other subsystems will. Moving the base stat objects into a new struct allows the cgroup_rstat_cpu struct to become more compact since it now only contains the minimum amount of pointers needed for rstat participation. Subsystems will (in future commits) make use of the compact cgroup_rstat_cpu struct while avoiding the memory overhead of the base stat objects which they will not use. An instance of the new struct cgroup_rstat_base_cpu was placed on the cgroup struct so it can retain ownership of these base stats common to all cgroups. A helper function was added for looking up the cpu-specific base stats of a given cgroup. Finally, initialization and variable names were adjusted where applicable. Signed-off-by: JP Kobryn Signed-off-by: Tejun Heo commit 1a2469403eb26c1c8b9555fc6bb91ccc6e9fc948 Author: Tejun Heo Date: Fri Apr 4 08:52:49 2025 -1000 sched_ext: Drop "ops" from scx_ops_{init|exit|enable|disable}[_task]() and friends The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from scx_ops_{init|exit|enable|disable}[_task]() and friends. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit c5f22258f5f675cea5dd6b4a27a2e0da70dfac88 Author: Tejun Heo Date: Fri Apr 4 08:52:49 2025 -1000 sched_ext: Drop "ops" from scx_ops_exit(), scx_ops_error() and friends The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from scx_ops_exit(), scx_ops_error() and friends. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit 8c6ee862467e8632cb72dc753c75a561ff5693d2 Author: Tejun Heo Date: Fri Apr 4 08:52:49 2025 -1000 sched_ext: Drop "ops" from scx_ops_bypass(), scx_ops_breather() and friends The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from scx_ops_bypass(), scx_ops_breather() and friends. Update scx_show_state.py accordingly. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit a50c365f996d8935c52967391488828e5e76471e Author: Tejun Heo Date: Fri Apr 4 08:52:48 2025 -1000 sched_ext: Drop "ops" from scx_ops_helper, scx_ops_enable_mutex and __scx_ops_enabled The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from scx_ops_helper, scx_ops_enable_mutex and __scx_ops_enabled. Update scx_show_state.py accordingly. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit 1a7ff7216c8b4d199033c292ce5acf8e9cdb5dc2 Author: Tejun Heo Date: Fri Apr 4 08:52:48 2025 -1000 sched_ext: Drop "ops" from scx_ops_enable_state and friends The tag "ops" is used for two different purposes. First, to indicate that the entity is directly related to the operations such as flags carried in sched_ext_ops. Second, to indicate that the entity applies to something global such as enable or bypass states. The second usage is historical and causes confusion rather than clarifying anything. For example, scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with scx_ops_flags. Let's drop the second usages. Drop "ops" from scx_ops_enable_state and friends. Update scx_show_state.py accordingly. Signed-off-by: Tejun Heo Acked-by: Andrea Righi commit 669cdda66efb983524985c94482481b7c90715a9 Author: Ville Syrjälä Date: Wed Mar 26 18:25:44 2025 +0200 drm/i915: Eliminate intel_compute_sagv_mask() intel_compute_sagv_mask() has become pointless. Just inline its contents into the existing loop in skl_compute_wm(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-15-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit da885fdaf9c1a07f9b1c99e105139ef4053004e6 Author: Ville Syrjälä Date: Wed Mar 26 18:25:43 2025 +0200 drm/i915: Skip bw stuff if per-crtc sagv state doesn't change If there are no changes to intel_crtc_can_enable_sagv() there is no need to do all the sagv bw_state recomputation. The only slight caveat here is hw state takeover where we initially disable SAGV, and want it to get re-enabled once we've determined that it's safe to do so. That can now be achieved by having intel_crtc_can_enable_sagv() reject SAGV as long as the crtc_state->inherited flag is set. Once the flag gets cleared (during initial commit for inactive pipes, during the first userspace commit for active pipes), we will naturally recompute all the sagv related state. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-14-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4d5204b3045473cc007aa119e6501db367979aa6 Author: Ville Syrjälä Date: Wed Mar 26 18:25:42 2025 +0200 drm/i915: Make intel_bw_modeset_checks() internal to intel_bw_atomic_check() Now that all the sagv computation has been moved from the skl+ watermark code into intel_bw_atomic_check() there is no point in calling intel_bw_modeset_checks() before the wm computation. Hide it within intel_bw_atomic_check(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d1381206b13cbfa276dab0f399f3a46757c59f54 Author: Ville Syrjälä Date: Wed Mar 26 18:25:41 2025 +0200 drm/i915: Make intel_bw_check_sagv_mask() internal to intel_bw.c The only thing between the current intel_bw_check_sagv_mask() call site and intel_bw_atomic_check() is skl_wm_add_affected_planes() which no longer depends on the sagv mask, so we can make life a lot less confusing by calling intel_bw_check_sagv_mask() from intel_bw_atomic_check() instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-12-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 014ea4d39c09c85b4120111927ce22b31fd0ceea Author: Ville Syrjälä Date: Wed Mar 26 18:25:40 2025 +0200 drm/i915: Extract intel_bw_check_sagv_mask() Move the bw_state->pipe_sagv_reject computation into intel_bw.c where it belongs. Previously we had a complicated dance between watermarks and sagv which required this to be computed earlier, but that was changed in commit 5e8146251f7b ("extract intel_bw_check_sagv_mask()") which allows the whole thing to be cleaned up quite a bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit dacbfc5e9ee94a9c064bfbd0f03fa3880a5fa0c2 Author: Ville Syrjälä Date: Wed Mar 26 18:25:39 2025 +0200 drm/i915: Extract intel_bw_modeset_checks() Pull the new_bw_state->active_pipes computation out from intel_compute_sagv_mask() and move it into the intel_bw.c (which is arguably the correct place for it). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 67ad5b9babdc99c352e9cc244ca3d7dffa5daf97 Author: Ville Syrjälä Date: Wed Mar 26 18:25:38 2025 +0200 drm/i915: Drop force_check_qgv Remove the force_check_qgv flag and just fill the pipe_sagv_reject bitmask properly during readout. This will cause the initial commit to re-enable SAGV if possible. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit da1c27e4aef40b9c9710647ac3f8c4144711c1fa Author: Ville Syrjälä Date: Wed Mar 26 18:25:37 2025 +0200 drm/i915: Flag even inactive crtcs as "inherited" I want to use the crtc_state->inherited flag to clean up some of the early SAGV handling. To make that work nicely I need to flag even the inactive crtcs as "inherited". Since we can't expect user space to perform any real commits on inactive crtcs we'll clear the flag already during initial_commit(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0029d2f739383fcd3269d5ac34d5290c15ac8213 Author: Ville Syrjälä Date: Wed Mar 26 18:25:36 2025 +0200 drm/i915: Do more bw readout Update a bunch of bw related stuff during readout: - bw_state->dbuf_bw possible now that the wm readout has given us access to the plane ddb data - cdclk_state->bw_min_cdclk Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 074c31271a1d9ec74c5a1965589671337be11d0f Author: Ville Syrjälä Date: Wed Mar 26 18:25:35 2025 +0200 drm/i915: Avoid triggering unwanted cdclk changes due to dbuf bandwidth changes Currently intel_bw_calc_min_cdclk() always adds the bw_state to the atomic state. Not only does it result in potentially redundant work later, it's also currently causing unwanted cdclk changes during driver load. Check if the dbuf bw is actually changing before we decide to pull in the bw state. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 18e6866615698f9dd714e47353022bd597a90a57 Author: Ville Syrjälä Date: Wed Mar 26 18:25:34 2025 +0200 drm/i915: Pass intel_dbuf_bw to skl_*_calc_dbuf_bw() explicitly Make skl_*_calc_dbuf_bw() a bit lower level passing in the to be mutated dbuf_bw struct in explicitly. This will allow more reuse later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8261fbacd9bb523ddebc3bee624f36c7d8d0b8d8 Author: Ville Syrjälä Date: Wed Mar 26 18:25:33 2025 +0200 drm/i915: Extract intel_dbuf_bw_changed() Extract the struct intel_dbuf_bw comparison into a small helper. We'll get more users later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 92512d4827f140fcdd8ae86639858f05c8f21ecc Author: Ville Syrjälä Date: Wed Mar 26 18:25:32 2025 +0200 drm/i915: s/intel_crtc_bw/intel_dbuf_bw/ Rename the intel_crtc_bw struct to intel_dbuf_bw to better reflect what it does. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1aa4031257e6f8a3ff436a165863f40905dd3968 Author: Ville Syrjälä Date: Wed Mar 26 18:25:31 2025 +0200 drm/i915: Drop the cached per-pipe min_cdclk[] from bw state intel_bw_crtc_min_cdclk() only depends on the pipe data rate, which we already have stashed in bw_state->data_rate[]. So stashing the resulting min_cdclk[] as well is redundant. Get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c9661394850d1003984e580aeed7b0e51decee91 Author: Chen Ni Date: Tue Apr 1 14:15:46 2025 +0800 selftests/bpf: Convert comma to semicolon Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni Signed-off-by: Andrii Nakryiko Reviewed-by: Amery Hung Link: https://lore.kernel.org/bpf/20250401061546.1990156-1-nichen@iscas.ac.cn commit 893c3938ab5dca5c14157bd80fced95e24784931 Merge: 75011ad69bc543 dafae1ae2ad32d Author: Andrii Nakryiko Date: Fri Apr 4 08:53:24 2025 -0700 Merge branch 'likely-unlikely-for-bpf_helpers-and-a-small-comment-fix' Anton Protopopov says: ==================== likely/unlikely for bpf_helpers and a small comment fix These two commits fix a comment describing bpf_attr in and add likely/unlikely macros to to be consumed by selftests and, later, by the static_branch_likely/unlikely macros. v1 -> v2: * squash libbpf and selftests fixes into one patch (Andrii) ==================== Link: https://patch.msgid.link/20250331203618.1973691-1-a.s.protopopov@gmail.com Signed-off-by: Andrii Nakryiko commit dafae1ae2ad32d124ce4efb2105c00ccadc7bd32 Author: Anton Protopopov Date: Mon Mar 31 20:36:18 2025 +0000 libbpf: Add likely/unlikely macros and use them in selftests A few selftests and, more importantly, consequent changes to the bpf_helpers.h file, use likely/unlikely macros, so define them here and remove duplicate definitions from existing selftests. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250331203618.1973691-3-a.s.protopopov@gmail.com commit 62aa5790cec89108a23052cc2f00fdd31f9adbac Author: Anton Protopopov Date: Mon Mar 31 20:36:17 2025 +0000 bpf: Fix a comment describing bpf_attr The map_fd field of the bpf_attr union is used in the BPF_MAP_FREEZE syscall. Explicitly mention this in the comments. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250331203618.1973691-2-a.s.protopopov@gmail.com commit 75011ad69bc54396703867b5434f1622343a848e Author: Carlos Llamas Date: Sun Mar 30 21:13:23 2025 +0000 libbpf: Fix implicit memfd_create() for bionic Since memfd_create() is not consistently available across different bionic libc implementations, using memfd_create() directly can break some Android builds: tools/lib/bpf/linker.c:576:7: error: implicit declaration of function 'memfd_create' [-Werror,-Wimplicit-function-declaration] 576 | fd = memfd_create(filename, 0); | ^ To fix this, relocate and inline the sys_memfd_create() helper so that it can be used in "linker.c". Similar issues were previously fixed by commit 9fa5e1a180aa ("libbpf: Call memfd_create() syscall directly"). Fixes: 6d5e5e5d7ce1 ("libbpf: Extend linker API to support in-memory ELF files") Signed-off-by: Carlos Llamas Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250330211325.530677-1-cmllamas@google.com commit b24e88b42d68d388f97ca71e11e50cb3e78406ec Author: Arnd Bergmann Date: Mon Mar 24 17:11:11 2025 +0100 platform: cznic: use ffs() instead of __bf_shf() __bf_shf() on a 64-bit variable causes a link failure during compile-testing: drivers-platform-cznic-turris-omnia-mcu-gpio.c:(.text):undefined-reference-to-__ffsdi2 Open-code this using ffs()-1, which has the same result but avoids the library call. Signed-off-by: Arnd Bergmann commit 642989287350fa4964c37df0f3769094072421c3 Author: Arnd Bergmann Date: Mon Mar 24 17:59:59 2025 +0100 firmware: turris-mox-rwtm: fix building without CONFIG_KEYS "struct key" is defined conditionally, so the code referencing it must be made conditional as well: In file included from drivers/firmware/turris-mox-rwtm.c:29: include/linux/turris-signing-key.h: In function 'turris_signing_key_get_dev': include/linux/turris-signing-key.h:26:19: error: invalid use of undefined type 'const struct key' 26 | return key->payload.data[1]; | ^~ Signed-off-by: Arnd Bergmann commit 66c302563985756f8154c4783b7a31e7137eb0fa Author: Laurent Pinchart Date: Fri Mar 21 12:46:15 2025 +0200 drm: renesas: rz-du: Support dmabuf import The rz-du driver uses GEM DMA helpers, but does not implement the drm_driver .gem_prime_import_sg_table operation. This prevents importing dmabufs. Fix it by implementing the missing operation using the DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE() helper macro. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Tested-by: Kieran Bingham # RZ/V2H + DSI Tested-by: Tommaso Merciai Reviewed-by: Biju Das Signed-off-by: Biju Das Link: https://patchwork.freedesktop.org/patch/msgid/20250321104615.31809-1-laurent.pinchart+renesas@ideasonboard.com commit 7e6cb7290b4a92a6af096b137b84bf285801a5d6 Author: Biju Das Date: Tue Aug 27 17:37:24 2024 +0100 drm: renesas: rz-du: Add Kconfig dependency between RZG2L_DU and RZG2L_MIPI_DSI Add Kconfig dependency between RZG2L_DU and RZG2L_MIPI_DSI, so that DSI module has functional dependency on DU. It is similar way that the R-Car MIPI DSI encoder is handled. While at it drop ARCH_RENESAS dependency as DRM_RZG2L_DU depend on ARCH_RZG2L. Suggested-by: Tomi Valkeinen Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20240827163727.108405-1-biju.das.jz@bp.renesas.com commit dd717762761807452ca25634652e180a80349cd8 Author: Dmitry Osipenko Date: Thu Apr 3 17:26:33 2025 +0300 drm/shmem-helper: Fix unsetting shmem vaddr while vmap refcount > 0 We switched to use refcount_t for vmaps and missed to change the vunmap code to properly unset the vmap pointer, which is now cleared while vmap's refcount > 0. Clear the cached vmap pointer only when refcounting drops to zero to fix the bug. Fixes: e1fc39a92332 ("drm/shmem-helper: Use refcount_t for vmap_use_count") Reported-by: Lucas De Marchi Closes: https://lore.kernel.org/dri-devel/20250403105053.788b0f6e@collabora.com/T/#m3dca6d81bedc8d6146a56b82694624fbc6fa4c96 Signed-off-by: Dmitry Osipenko Reviewed-by: Boris Brezillon Tested-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250403142633.484660-1-dmitry.osipenko@collabora.com commit 1e32ffbc9dc8ddf1c7858288d1987ded1c35a8e1 Author: Matthew Auld Date: Thu Apr 3 11:24:48 2025 +0100 drm/xe/sriov: support non-contig VRAM provisioning Currently we can run into issues with provisioning VRAM region, due to requiring contig VRAM BO underneath. We sometimes see that allocation (multiple GB) can fail even when there is enough free space. We don't need CPU access to the buffer in the first place, so can forgo pin_map and therefore also the contig requirement. Keep the same behavior with save and restore during suspend/resume (which can now be done with blitter). We also need the VRAM to occupy the same pages so we don't need to re-program the LMTT, so should still remain pinned (also we don't want something to try evict it). With that covert over to plain pinned kernel object. Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-16-matthew.auld@intel.com commit 52a36e7ed6f401605cefd79cf8acd6a28cd3d5d2 Author: Matthew Auld Date: Thu Apr 3 11:24:47 2025 +0100 drm/xe: allow non-contig VRAM kernel BO If the kernel bo doesn't care about vmap(), either directly or indirectly with save/restore then we don't need to force contig for such buffers. Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-15-matthew.auld@intel.com commit 8e8e9c26631c4305cc0e3a18c625cb8e5cf110bf Author: Matthew Auld Date: Thu Apr 3 11:24:46 2025 +0100 drm/xe: unconditionally apply PINNED for pin_map() Some users apply PINNED and some don't when using pin_map(). The pin in pin_map() should imply PINNED so just unconditionally apply it and clean up all users. Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-14-matthew.auld@intel.com commit 7f387e6012b67592420c9ac92fd82911232ddd39 Author: Matthew Auld Date: Thu Apr 3 11:24:45 2025 +0100 drm/xe: add XE_BO_FLAG_PINNED_LATE_RESTORE With the idea of having more pinned objects using the blitter engine where possible, during suspend/resume, mark the pinned objects which can be done during the late phase once submission/migration has been setup. Start out simple with lrc and page-tables from userspace. v2: - s/early_restore/late_restore; early restore was way too bold with too many places being impacted at once. v3: - Split late vs early into separate lists, to align with newly added apply-to-pinned infra. v4: - Rebase. v5: - Make sure we restore the late phase kernel_bo_present in igpu. Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-13-matthew.auld@intel.com commit 58fa61ce4a0d13614a98479734b7f1ac2027615a Author: Matthew Auld Date: Thu Apr 3 11:24:44 2025 +0100 drm/xe/migrate: ignore CCS for kernel objects For kernel BOs we don't clear the CCS state on creation, therefore we should be careful to ignore it when copying pages. In a future patch we opt for using the copy path here for kernel BOs, so this now needs to be considered. v2: - Drop bogus asserts (CI) Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-12-matthew.auld@intel.com commit 045448da87bfb1542d6553d9bd6f66e2cddb99ed Author: Matthew Brost Date: Thu Apr 3 11:24:43 2025 +0100 drm/xe: Add XE_BO_FLAG_PINNED_NORESTORE Not all BOs need to be restored on resume / d3cold exit, add XE_BO_FLAG_PINNED_NO_RESTORE which skips restoring of BOs rather just allocates VRAM for the BO. This should slightly speedup resume / d3cold exit flows. Marking GuC ADS, GuC CT, GuC log, GuC PC, and SA as NORESTORE. v2: - s/WONTNEED/NORESTORE (Vivi) - Rebase on newly added g2g and backup object flow Signed-off-by: Matthew Brost Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250403102440.266113-11-matthew.auld@intel.com commit 86f69c26113c3b35967f29db052d40a10317cac0 Author: Matthew Auld Date: Thu Apr 3 11:24:42 2025 +0100 drm/xe: use backup object for pinned save/restore Currently we move pinned objects, relying on the fact that the lpfn/fpfn will force the placement to occupy the same pages when restoring. However this then limits all such pinned objects to be contig underneath. In addition it is likely a little fragile moving pinned objects in the first place. Rather than moving such objects rather copy the page contents to a secondary system memory object, that way the VRAM pages never move and remain pinned. This also opens the door for eventually having non-contig pinned objects that can also be saved/restored using blitter. v2: - Make sure to drop the fence ref. - Handle NULL bo->migrate. v3: - Ensure we add the copy fence to the BOs, otherwise backup_obj can be freed before pipelined copy finishes. v4: - Rebase on newly added apply-to-pinned infra. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1182 Signed-off-by: Matthew Auld Cc: Satyanarayana K V P Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Satyanarayana K V P Link: https://lore.kernel.org/r/20250403102440.266113-10-matthew.auld@intel.com commit 3e816361e94a0e79b1aabf44abec552e9698b196 Author: Andrii Nakryiko Date: Wed Apr 2 11:09:25 2025 -0700 sched/tracepoints: Move and extend the sched_process_exit() tracepoint It is useful to be able to access current->mm at task exit to, say, record a bunch of VMA information right before the task exits (e.g., for stack symbolization reasons when dealing with short-lived processes that exit in the middle of profiling session). Currently, trace_sched_process_exit() is triggered after exit_mm() which resets current->mm to NULL making this tracepoint unsuitable for inspecting and recording task's mm_struct-related data when tracing process lifetimes. There is a particularly suitable place, though, right after taskstats_exit() is called, but before we do exit_mm() and other exit_*() resource teardowns. taskstats performs a similar kind of accounting that some applications do with BPF, and so co-locating them seems like a good fit. So that's where trace_sched_process_exit() is moved with this patch. Also, existing trace_sched_process_exit() tracepoint is notoriously missing `group_dead` flag that is certainly useful in practice and some of our production applications have to work around this. So plumb `group_dead` through while at it, to have a richer and more complete tracepoint. Note that we can't use sched_process_template anymore, and so we use TRACE_EVENT()-based tracepoint definition. But all the field names and order, as well as assign and output logic remain intact. We just add one extra field at the end in backwards-compatible way. Document the dependency to sched_process_template anyway. Signed-off-by: Andrii Nakryiko Signed-off-by: Ingo Molnar Acked-by: Steven Rostedt (Google) Acked-by: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250402180925.90914-1-andrii@kernel.org commit 7654d51f1fd80f2d985a98beac4cd62d20afe3f9 Author: Aradhya Bhatia Date: Tue Mar 25 19:14:21 2025 +0530 drm/xe/xe2hpg: Add Wa_16025250150 Add Wa_16025250150 for the Xe2_HPG (graphics version: 20.01) platforms. It is a permanent workaround, and applicable on all the steppings. Reviewed-by: Tejas Upadhyay Signed-off-by: Aradhya Bhatia Link: https://patchwork.freedesktop.org/patch/msgid/20250325134421.1489416-1-aradhya.bhatia@intel.com Signed-off-by: Tejas Upadhyay commit 89ac53e96217bd5525ee56eaa1b8ef2b398a9ad6 Author: Nithyanantham Paramasivam Date: Wed Apr 2 20:55:29 2025 +0530 wifi: ath12k: Enable REO queue lookup table feature on QCN9274 Enable the REO queue lookup table feature for QCN9274 by setting the reoq_lut_support flag. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250402152529.1649402-4-quic_nithp@quicinc.com Signed-off-by: Jeff Johnson commit 30b03edd265a79b779c29c12ad640c91830ce7ca Author: Balamurugan S Date: Wed Apr 2 20:55:28 2025 +0530 wifi: ath12k: Add support to clear qdesc array in REO cache Currently, the existing code lacks functionality to clear the qdesc array in the REO cache. As a result, any updates in the LUT are not reflected in the REO cache. To address this issue, add functionality to clear the qdesc array in the REO cache during a peer TID update. To do this, set the CLEAR_DESC_ARRAY field of WCSS_UMAC_REO_R0_QDESC_ADDR_READ and then reset it. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250402152529.1649402-3-quic_nithp@quicinc.com Signed-off-by: Jeff Johnson commit 0bbcd42b15fa730f393a01bc818802d9f0b04197 Author: Sriram R Date: Wed Apr 2 20:55:27 2025 +0530 wifi: ath12k: Fix the enabling of REO queue lookup table feature Instead of storing the REO queue address inside peer entries, REO hardware module prefers them to be stored in SRAM which could be directly accessed by REO using peer_ID/TID based lookup table mechanism. Fix the enabling of the REO queue lookup table(LUT) feature by configuring the LUT address information in the REO hardware register and setting the host service flags. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Signed-off-by: Nithyanantham Paramasivam Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250402152529.1649402-2-quic_nithp@quicinc.com Signed-off-by: Jeff Johnson commit 446d38554dc43e8391441fb3413512ba87a88583 Author: Gustavo A. R. Silva Date: Wed Apr 2 15:58:59 2025 -0600 drm/nouveau: disp: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/gpu/drm/nouveau/dispnv50/disp.c:779:47: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/Z-2zI55Qf88jTfNK@kspp commit e876bfecbd10491dfa50653b13791582285b2482 Author: Gustavo A. R. Silva Date: Wed Apr 2 15:39:07 2025 -0600 drm/nouveau: svm: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/gpu/drm/nouveau/nouveau_svm.c:724:44: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/Z-2uezeHt1aaHH6x@kspp commit 1bced6c7f6d31bfaf9189c9903482df01c6d06e7 Author: Gustavo A. R. Silva Date: Wed Apr 2 15:28:10 2025 -0600 drm/nouveau: fence: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/gpu/drm/nouveau/nouveau_fence.c:188:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/Z-2r6v-Cji7vwOsz@kspp commit e773db73fd24fb8c2b3e0393ed0bbaa4c4a00a5d Author: Charles Han Date: Wed Mar 5 18:16:41 2025 +0800 drm/sti: fix inconsistent indenting warning Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/sti/sti_hda.c:696 sti_hda_bind() warn: inconsistent indenting Signed-off-by: Charles Han Acked-by: Raphaël Gallais-Pou Link: https://patchwork.freedesktop.org/patch/msgid/20250305101641.2399-1-hanchunchao@inspur.com Signed-off-by: Raphael Gallais-Pou commit fc1cd60042b3df1d162278461c7a87f0362502b8 Author: Uros Bizjak Date: Thu Apr 3 14:50:45 2025 +0200 x86/idle: Use MONITOR and MWAIT mnemonics in Current minimum required version of binutils is 2.25, which supports MONITOR and MWAIT instruction mnemonics. Replace the byte-wise specification of MONITOR and MWAIT with these proper mnemonics. No functional change intended. Note: LLVM assembler is not able to assemble correct forms of MONITOR and MWAIT instructions with explicit operands and reports: error: invalid operand for instruction monitor %rax,%ecx,%edx ^~~~ # https://lore.kernel.org/oe-kbuild-all/202504030802.2lEVBSpN-lkp@intel.com/ Use instruction mnemonics with implicit operands to work around this issue. Reported-by: kernel test robot Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250403125111.429805-1-ubizjak@gmail.com commit a17b37a3f416c9e385bbd2b5fc603d337eab76eb Author: Uros Bizjak Date: Thu Apr 3 09:30:49 2025 +0200 x86/idle: Change arguments of mwait_idle_with_hints() to u32 All functions in mwait_idle_with_hints() cast eax and ecx arguments to u32. Propagate argument type to the enclosing function. Suggested-by: Andrew Cooper Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250403073105.245987-1-ubizjak@gmail.com commit a73d71366e3754c1068fd82ddb3d1bb2cbd648e9 Author: Imre Deak Date: Tue Apr 1 13:38:46 2025 +0300 drm/dp_mst: Use drm_dp_dpcd_write_data() to write GUID for non-root MST branch devices drm_dp_dpcd_write_data() can be used to write the GUID for a non-root MST branch device, similarly to writing the GUID to a root MST branch device, do so. Cc: Dmitry Baryshkov Cc: Lyude Paul Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250401103846.686408-2-imre.deak@intel.com commit 5dff41a86377563f7a2b968aae00d25b4ceb37c9 Author: Aditya Dutt Date: Tue Apr 1 20:59:16 2025 +0530 jfs: fix array-index-out-of-bounds read in add_missing_indices stbl is s8 but it must contain offsets into slot which can go from 0 to 127. Added a bound check for that error and return -EIO if the check fails. Also make jfs_readdir return with error if add_missing_indices returns with an error. Reported-by: syzbot+b974bd41515f770c608b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com./bug?extid=b974bd41515f770c608b Signed-off-by: Aditya Dutt Signed-off-by: Dave Kleikamp commit a4685408ff6c3e2af366ad9a7274f45ff3f394ee Author: Dylan Wolff Date: Wed Mar 12 16:02:00 2025 +0800 jfs: Fix null-ptr-deref in jfs_ioc_trim [ Syzkaller Report ] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000087: 0000 [#1 KASAN: null-ptr-deref in range [0x0000000000000438-0x000000000000043f] CPU: 2 UID: 0 PID: 10614 Comm: syz-executor.0 Not tainted 6.13.0-rc6-gfbfd64d25c7a-dirty #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Sched_ext: serialise (enabled+all), task: runnable_at=-30ms RIP: 0010:jfs_ioc_trim+0x34b/0x8f0 Code: e7 e8 59 a4 87 fe 4d 8b 24 24 4d 8d bc 24 38 04 00 00 48 8d 93 90 82 fe ff 4c 89 ff 31 f6 RSP: 0018:ffffc900055f7cd0 EFLAGS: 00010206 RAX: 0000000000000087 RBX: 00005866a9e67ff8 RCX: 000000000000000a RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: dffffc0000000000 R08: ffff88807c180003 R09: 1ffff1100f830000 R10: dffffc0000000000 R11: ffffed100f830001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000438 FS: 00007fe520225640(0000) GS:ffff8880b7e80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005593c91b2c88 CR3: 000000014927c000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __die_body+0x61/0xb0 ? die_addr+0xb1/0xe0 ? exc_general_protection+0x333/0x510 ? asm_exc_general_protection+0x26/0x30 ? jfs_ioc_trim+0x34b/0x8f0 jfs_ioctl+0x3c8/0x4f0 ? __pfx_jfs_ioctl+0x10/0x10 ? __pfx_jfs_ioctl+0x10/0x10 __se_sys_ioctl+0x269/0x350 ? __pfx___se_sys_ioctl+0x10/0x10 ? do_syscall_64+0xfb/0x210 do_syscall_64+0xee/0x210 ? syscall_exit_to_user_mode+0x1e0/0x330 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe51f4903ad Code: c3 e8 a7 2b 00 00 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d RSP: 002b:00007fe5202250c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe51f5cbf80 RCX: 00007fe51f4903ad RDX: 0000000020000680 RSI: 00000000c0185879 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe520225640 R13: 000000000000000e R14: 00007fe51f44fca0 R15: 00007fe52021d000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:jfs_ioc_trim+0x34b/0x8f0 Code: e7 e8 59 a4 87 fe 4d 8b 24 24 4d 8d bc 24 38 04 00 00 48 8d 93 90 82 fe ff 4c 89 ff 31 f6 RSP: 0018:ffffc900055f7cd0 EFLAGS: 00010206 RAX: 0000000000000087 RBX: 00005866a9e67ff8 RCX: 000000000000000a RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: dffffc0000000000 R08: ffff88807c180003 R09: 1ffff1100f830000 R10: dffffc0000000000 R11: ffffed100f830001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000438 FS: 00007fe520225640(0000) GS:ffff8880b7e80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005593c91b2c88 CR3: 000000014927c000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Kernel panic - not syncing: Fatal exception [ Analysis ] We believe that we have found a concurrency bug in the `fs/jfs` module that results in a null pointer dereference. There is a closely related issue which has been fixed: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6c1b3599b2feb5c7291f5ac3a36e5fa7cedb234 ... but, unfortunately, the accepted patch appears to still be susceptible to a null pointer dereference under some interleavings. To trigger the bug, we think that `JFS_SBI(ipbmap->i_sb)->bmap` is set to NULL in `dbFreeBits` and then dereferenced in `jfs_ioc_trim`. This bug manifests quite rarely under normal circumstances, but is triggereable from a syz-program. Reported-and-tested-by: Dylan J. Wolff Reported-and-tested-by: Jiacheng Xu Signed-off-by: Dylan J. Wolff Signed-off-by: Jiacheng Xu Signed-off-by: Dave Kleikamp commit 37bfb464ddca87f203071b5bd562cd91ddc0b40a Author: Vasiliy Kovalev Date: Mon Mar 10 11:56:02 2025 +0300 jfs: validate AG parameters in dbMount() to prevent crashes Validate db_agheight, db_agwidth, and db_agstart in dbMount to catch corrupted metadata early and avoid undefined behavior in dbAllocAG. Limits are derived from L2LPERCTL, LPERCTL/MAXAG, and CTLTREESIZE: - agheight: 0 to L2LPERCTL/2 (0 to 5) ensures shift (L2LPERCTL - 2*agheight) >= 0. - agwidth: 1 to min(LPERCTL/MAXAG, 2^(L2LPERCTL - 2*agheight)) ensures agperlev >= 1. - Ranges: 1-8 (agheight 0-3), 1-4 (agheight 4), 1 (agheight 5). - LPERCTL/MAXAG = 1024/128 = 8 limits leaves per AG; 2^(10 - 2*agheight) prevents division to 0. - agstart: 0 to CTLTREESIZE-1 - agwidth*(MAXAG-1) keeps ti within stree (size 1365). - Ranges: 0-1237 (agwidth 1), 0-348 (agwidth 8). UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:1400:9 shift exponent -335544310 is negative CPU: 0 UID: 0 PID: 5822 Comm: syz-executor130 Not tainted 6.14.0-rc5-syzkaller #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468 dbAllocAG+0x1087/0x10b0 fs/jfs/jfs_dmap.c:1400 dbDiscardAG+0x352/0xa20 fs/jfs/jfs_dmap.c:1613 jfs_ioc_trim+0x45a/0x6b0 fs/jfs/jfs_discard.c:105 jfs_ioctl+0x2cd/0x3e0 fs/jfs/ioctl.c:131 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+fe8264911355151c487f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=fe8264911355151c487f Signed-off-by: Vasiliy Kovalev Signed-off-by: Dave Kleikamp commit aea007741b951df05f901b2d4890df2e710d134b Author: Imre Deak Date: Tue Apr 1 13:38:45 2025 +0300 drm/dp_mst: Fix GUID DPCD write to non-root MST branch devices The return value on success of drm_dp_send_dpcd_write() called for non-root MST branch devices from drm_dp_check_mstb_guid() is the number of bytes transferred. Atm this return value (in case of a complete read) will be regarded incorrectly as an error by the caller of drm_dp_check_mstb_guid(). Fix this by converting the return value for a complete read to the expected success code (0) and for a partial read to a failure code (-EPROTO). Fixes: 2554da0de3e8 ("drm/display: dp-mst-topology: use new DCPD access helpers") Cc: Dmitry Baryshkov Cc: Lyude Paul Reviewed-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250401103846.686408-1-imre.deak@intel.com commit 2fb34b1566a386913b291d04f91ba6f6e6a5bb99 Author: Borislav Petkov (AMD) Date: Thu Apr 3 10:56:23 2025 +0200 x86/tlb: Simplify choose_new_asid() and generate better code Have it return the two things it does return: - a new ASID and - the need to flush the TLB or not, in a struct which fits in a single 32-bit register and whack the IO parameters. Beyond being easier to read, this also helps the compiler generate better, more compact code: # arch/x86/mm/tlb.o: text data bss dec hex filename 9341 753 516 10610 2972 tlb.o.before 9213 753 516 10482 28f2 tlb.o.after No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Andrew Cooper Cc: Uros Bizjak Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250403085623.20824-1-bp@kernel.org commit a72d55dc3bd6555cc1f97459b42b7f62ae480f13 Author: Uros Bizjak Date: Wed Apr 2 20:08:08 2025 +0200 x86/idle: Remove CONFIG_AS_TPAUSE There is not much point in CONFIG_AS_TPAUSE at all when the emitted assembly is always the same - it only obfuscates the __tpause() code in essence. Remove the TPAUSE insn mnemonic from __tpause() and leave only the equivalent byte-wise definition. This can then be changed back to insn mnemonic once binutils 2.31.1 is the minimum version to build the kernel. (Right now it's 2.25.) Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Andrew Cooper Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250402180827.3762-4-ubizjak@gmail.com commit 19c3dcd953bc8961ab486cf05f5dd45455393c42 Author: Uros Bizjak Date: Wed Apr 2 20:08:07 2025 +0200 x86/idle: Remove .s output beautifying delimiters from simpler asm() templates Delimiters in asm() templates such as ';', '\t' or '\n' are not required syntactically, they were used historically in the Linux kernel to prettify the compiler's .s output for people who were looking at compiler generated .s output. Most x86 developers these days are primarily looking at: 1) objdump --disassemble-all .o 2) perf top's live kernel function annotation and disassembler feature that uses /dev/mem. ... because: - this kind of assembler output is standardized regardless of compiler used, - it's generally less messy looking, - it gives ground-truth instead of being some intermediate layer in the toolchain that might or might not be the real deal, - and on a live kernel it also sees through the kernel's various layers of runtime patching code obfuscation facilities, also known as: alternative-instructions, tracepoints and jump labels. There are some cases where the .s output is the most useful tool, such as alternatives() code generation, but other than that these delimiters used in simple asm() statements mostly add noise to the source code side, which isn't desirable for assembly code that is fragile enough already. Remove the delimiters for , which also happens to make the GCC inliner's asm() instruction length heuristics more accurate... [ mingo: Wrote a new changelog to give historic context and to give people a chance to object. :-) ] Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Andrew Cooper Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250402180827.3762-3-ubizjak@gmail.com commit 32cb8dc550e469facfe54e8fa3b5d8d01448d5df Author: Thomas Hellström Date: Wed Apr 2 14:29:24 2025 +0200 drm/xe: Fix xe_pt_stage_bind_walk kerneldoc The structure was missing a proper kerneldoc header and once that was added a number of typos and errors became obvious. Fix those. Reported-by: Lucas De Marchi Closes: https://lore.kernel.org/intel-xe/x53tcs5bjldw6lcorjemuheklxcmepdvr2u7lvt3hpqrzqoc4h@nsu6hs25taqj/ Fixes: b2d4b03b03a7 ("drm/xe: Make the PT code handle placement per PTE rather than per vma / range") Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250402122924.25526-1-thomas.hellstrom@linux.intel.com commit 89f306dc6dfdc57cf138d10e9f4c4fea76d6d949 Author: Vinay Belgaumkar Date: Mon Mar 31 13:48:27 2025 -0700 drm/xe/pmu: Add GT frequency events Define PMU events for GT frequency (actual and requested). The instantaneous values for these frequencies will be displayed. Following PMU events are being added: xe_0000_00_02.0/gt-actual-frequency/ [Kernel PMU event] xe_0000_00_02.0/gt-requested-frequency/ [Kernel PMU event] Standard perf commands can be used to monitor GT frequency: $ perf stat -e xe_0000_00_02.0/gt-requested-frequency,gt=0/ -I1000 1.001229762 1483 Mhz xe_0000_00_02.0/gt-requested-frequency,gt=0/ 2.006175406 1483 Mhz xe_0000_00_02.0/gt-requested-frequency,gt=0/ v2: Use locks while storing/reading samples, keep track of multiple clients (Lucas) and other general cleanup. v3: Review comments (Lucas) and use event counts instead of mask for active events. v4: Add freq events to event_param_valid method (Riana) v5: Use instantaneous values instead of aggregating (Lucas) v6: Obtain fwake at init for freq events as well and use non fwake variant method for reading requested freq to avoid lockdep issues (Lucas) v7: Review comments (Rodrigo, Lucas) Cc: Riana Tauro Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Vinay Belgaumkar Signed-off-by: John Harrison Link: https://lore.kernel.org/r/20250331204827.2535393-1-vinay.belgaumkar@intel.com commit 8abaa80b403e1fc40877eb9b339ae0ad07e8968f Author: Lyude Paul Date: Mon Mar 31 18:23:55 2025 -0400 drm/mode_config: Make drm_mode_config.(max|min)_(width|height) unsigned It doesn't make much sense to allow devices to specify their min/max resolution as signed integers, and in Rust with CONFIG_RUST_OVERFLOW_CHECKS enabled this provides us actual over/underflow checks. Similarly, it doesn't really make much sense for us to allow devices to specify their minimum/maximum resolution as signed. Signed-off-by: Lyude Paul Reviewed-by: Maxime Ripard Reviewed-by: Thomas Zimmermann Cc: Greg Kroah-Hartman Cc: Thomas Zimmermann Link: https://lore.kernel.org/r/20250331222556.454334-3-lyude@redhat.com commit 4190aa3a76a6f840ace7d5e30719f85af0ed6302 Author: Lyude Paul Date: Mon Mar 31 18:23:54 2025 -0400 drm/edid: Use unsigned int in drm_add_modes_noedid() A negative resolution doesn't really make any sense, so let's make these parameters unsigned. In C this doesn't make much of a difference, but Rust is stricter about signed/unsigned casts and additionally can check for arithmetic over/underflows if CONFIG_RUST_OVERFLOW_CHECKS is enabled. Signed-off-by: Lyude Paul Reviewed-by: Thomas Zimmermann Cc: Greg Kroah-Hartman Cc: Maxime Ripard Cc: Thomas Zimmermann Link: https://lore.kernel.org/r/20250331222556.454334-2-lyude@redhat.com commit 1ae899e413105aa81068d0282ab6e22974891d74 Author: Uros Bizjak Date: Wed Apr 2 20:08:05 2025 +0200 x86/idle: Standardize argument types for MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32' MONITOR and MONITORX expect 32-bit unsigned integer arguments in the %ecx and %edx registers. MWAIT and MWAITX expect 32-bit usigned int argument in %eax and %ecx registers. Some of the helpers around these instructions in are using too wide types (long), standardize on u32 instead that makes it clear that this is a hardware ABI. [ mingo: Cleaned up the changelog. ] Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Andrew Cooper Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250402180827.3762-1-ubizjak@gmail.com commit 1f13c60d84e880df6698441026e64f84c7110c49 Author: Andrew Cooper Date: Wed Apr 2 18:24:58 2025 +0100 x86/idle: Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR in mwait_idle_with_hints() and prefer_mwait_c1_over_halt() The following commit, 12 years ago: 7e98b7192046 ("x86, idle: Use static_cpu_has() for CLFLUSH workaround, add barriers") added barriers around the CLFLUSH in mwait_idle_with_hints(), justified with: ... and add memory barriers around it since the documentation is explicit that CLFLUSH is only ordered with respect to MFENCE. This also triggered, 11 years ago, the same adjustment in: f8e617f45829 ("sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs") during development, although it failed to get the static_cpu_has_bug() treatment. X86_BUG_CLFLUSH_MONITOR (a.k.a the AAI65 errata) is specific to Intel CPUs, and the SDM currently states: Executions of the CLFLUSH instruction are ordered with respect to each other and with respect to writes, locked read-modify-write instructions, and fence instructions[1]. With footnote 1 reading: Earlier versions of this manual specified that executions of the CLFLUSH instruction were ordered only by the MFENCE instruction. All processors implementing the CLFLUSH instruction also order it relative to the other operations enumerated above. i.e. The SDM was incorrect at the time, and barriers should not have been inserted. Double checking the original AAI65 errata (not available from intel.com any more) shows no mention of barriers either. Note: If this were a general codepath, the MFENCEs would be needed, because AMD CPUs of the same vintage do sport otherwise-unordered CLFLUSHs. Remove the unnecessary barriers. Furthermore, use a plain alternative(), rather than static_cpu_has_bug() and/or no optimisation. The workaround is a single instruction. Use an explicit %rax pointer rather than a general memory operand, because MONITOR takes the pointer implicitly in the same way. [ mingo: Cleaned up the commit a bit. ] Fixes: 7e98b7192046 ("x86, idle: Use static_cpu_has() for CLFLUSH workaround, add barriers") Signed-off-by: Andrew Cooper Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Acked-by: Borislav Petkov (AMD) Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Rik van Riel Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250402172458.1378112-1-andrew.cooper3@citrix.com commit 31e98e277ae47f56632e4d663b1d4fd12ba33ea8 Author: Stone Zhang Date: Thu Mar 20 13:31:45 2025 +0800 wifi: ath11k: fix node corruption in ar->arvifs list In current WLAN recovery code flow, ath11k_core_halt() only reinitializes the "arvifs" list head. This will cause the list node immediately following the list head to become an invalid list node. Because the prev of that node still points to the list head "arvifs", but the next of the list head "arvifs" no longer points to that list node. When a WLAN recovery occurs during the execution of a vif removal, and it happens before the spin_lock_bh(&ar->data_lock) in ath11k_mac_op_remove_interface(), list_del() will detect the previously mentioned situation, thereby triggering a kernel panic. The fix is to remove and reinitialize all vif list nodes from the list head "arvifs" during WLAN halt. The reinitialization is to make the list nodes valid, ensuring that the list_del() in ath11k_mac_op_remove_interface() can execute normally. Call trace: __list_del_entry_valid_or_report+0xb8/0xd0 ath11k_mac_op_remove_interface+0xb0/0x27c [ath11k] drv_remove_interface+0x48/0x194 [mac80211] ieee80211_do_stop+0x6e0/0x844 [mac80211] ieee80211_stop+0x44/0x17c [mac80211] __dev_close_many+0xac/0x150 __dev_change_flags+0x194/0x234 dev_change_flags+0x24/0x6c devinet_ioctl+0x3a0/0x670 inet_ioctl+0x200/0x248 sock_do_ioctl+0x60/0x118 sock_ioctl+0x274/0x35c __arm64_sys_ioctl+0xac/0xf0 invoke_syscall+0x48/0x114 ... Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04591-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Stone Zhang Link: https://patch.msgid.link/20250320053145.3445187-1-quic_stonez@quicinc.com Signed-off-by: Jeff Johnson commit 15293c1829d897065295750f1c1987f0ac82a890 Author: Maharaja Kennadyrajan Date: Tue Apr 1 23:07:55 2025 +0530 wifi: ath12k: Fix spelling errors in mac.c file Fix spelling error correpsondig -> corresponding in the comments within the file mac.c Compile tested only. Signed-off-by: Maharaja Kennadyrajan Link: https://patch.msgid.link/20250401173755.1982382-1-maharaja.kennadyrajan@oss.qualcomm.com Signed-off-by: Jeff Johnson commit dcfebfd4c8dc0bec9b6649104cecc09f5978c4cb Author: Wen Gong Date: Tue Apr 1 10:08:40 2025 +0800 wifi: ath12k: store and send country code to firmware after recovery Currently ath12k does not send the country code to firmware after device recovery. As a result the country code will be the default one which is reported from firmware. Country code is important, so ath12k also need to restore it to the value which was used before recovery. This is only needed for platforms which support the current_cc_support hardware parameter. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Wen Gong Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250401020840.357-5-quic_kangyang@quicinc.com Signed-off-by: Jeff Johnson commit 591de41d7008585f2e7c35dbcf5922fcb4d79e39 Author: Wen Gong Date: Tue Apr 1 10:08:39 2025 +0800 wifi: ath12k: add 11d scan offload support The flow of 11d scan is: 1. trigger 11d scan. 2. receive, parse, and update 11d scan result. 3. stop 11d scan. So need to add handler for WMI_11D_SCAN_START_CMDID and WMI_11D_SCAN_STOP_CMDID to trigger/stop 11d scan. Add process of WMI event WMI_11D_NEW_COUNTRY_EVENTID for 11d scan result. There are two points that need to be noted: 1. The 11d scan priority is 'MEDIUM' in firmware, the hw scan priority is 'LOW'. When 11d scan is running, hw scan will be canceled. To avoid this, change the hw scan priority to 'MEDIUM' when 11d scan is running. 2. Need to add wait_for_completion_timeout() for scan.complete in ath12k_reg_update_chan_list() because 11d scan will cost more than 5 seconds. Due to another existing wait in ath12k_scan_stop(), there will be two scan.complete in different threads. Therefore use complete_all() instead of complete() for scan.complete. complete_all() can work well when it is only one thread wait for scan.complete. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Wen Gong Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250401020840.357-4-quic_kangyang@quicinc.com Signed-off-by: Jeff Johnson commit 773ff9074a79117d830b9eb006f3058ca6a24a5f Author: Wen Gong Date: Tue Apr 1 10:08:38 2025 +0800 wifi: ath12k: use correct WMI command to set country code for WCN7850 When userspace tries to set country code by NL80211_REGDOM_SET_BY_USER hint(like iw reg set XX), it will pass new country code to ath12k. Then ath12k will set this new country code to firmware by WMI_SET_INIT_COUNTRY_CMDID. For AP based chips(QCN92xx), WMI_SET_INIT_COUNTRY_CMDID is the correct command. However, for STATION based chips(WCN7850), it need to use WMI_SET_CURRENT_COUNTRY_CMDID. Add flag current_cc_support in hardware parameters. It is used to distinguish AP/STA platform. After that, the firmware will work normally and the regulatory feature works well for WCN7850. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Wen Gong Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250401020840.357-3-quic_kangyang@quicinc.com Signed-off-by: Jeff Johnson commit 1b68481fc1d8fa89a3d974b64a15beed2326c5c7 Author: Wen Gong Date: Tue Apr 1 10:08:37 2025 +0800 wifi: ath12k: add configure country code for WCN7850 Currently, WMI_SET_INIT_COUNTRY_CMDID is used to set country code for WCN7850 and QCN9274. But WMI_SET_INIT_COUNTRY_CMDID is not the correct command for WCN7850. Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware, which is used for WCN7850 to update country code. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Wen Gong Signed-off-by: Kang Yang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250401020840.357-2-quic_kangyang@quicinc.com Signed-off-by: Jeff Johnson commit c426497fa2055c8005196922e7d29c41d7e0948a Author: Sidhanta Sahu Date: Wed Mar 26 14:35:38 2025 -0700 wifi: ath12k: Fix memory leak due to multiple rx_stats allocation rx_stats for each arsta is allocated when adding a station. arsta->rx_stats will be freed when a station is removed. Redundant allocations are occurring when the same station is added multiple times. This causes ath12k_mac_station_add() to be called multiple times, and rx_stats is allocated each time. As a result there is memory leaks. Prevent multiple allocations of rx_stats when ath12k_mac_station_add() is called repeatedly by checking if rx_stats is already allocated before allocating again. Allocate arsta->rx_stats if arsta->rx_stats is NULL respectively. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Sidhanta Sahu Signed-off-by: Muna Sinada Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250326213538.2214194-1-muna.sinada@oss.qualcomm.com Signed-off-by: Jeff Johnson commit f09d9f921f2b7b78e73e9f192a9c08b534b8e5e5 Author: Andy Yan Date: Tue Mar 18 14:34:39 2025 +0800 drm/bridge: it6505: Switch to common helpers to power up/down dp link Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318063452.4983-5-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit 39f14a01994b5102bdc4632a339a59a03a2f89f3 Author: Andy Yan Date: Tue Mar 18 14:34:38 2025 +0800 drm/bridge: anx78xx: Switch to common helpers to power up/down dp link Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318063452.4983-4-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit 4adde49ba497ebd376a164c517152670e4f8eedd Author: Andy Yan Date: Tue Mar 18 14:34:37 2025 +0800 drm/bridge: anx6345: Switch to common helpers to power up/down dp link Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318063452.4983-3-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit 23ee8c6b34fdfed970e2fae2b2ac5635303d77b8 Author: Andy Yan Date: Tue Mar 18 14:34:36 2025 +0800 drm/bridge: cdns-mhdp8546: Switch to common helpers to power up/down dp link Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318063452.4983-2-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit 09cdda7a60f45784cebddf1fa2109d6279f9890b Author: Andy Yan Date: Tue Mar 18 14:34:35 2025 +0800 drm/dp: Pull drm_dp_link_power_up/down from Tegra to common drm_dp_helper The helper functions drm_dp_link_power_up/down were moved to Tegra DRM in commit 9a42c7c647a9 ("drm/tegra: Move drm_dp_link helpers to Tegra DRM")". Now since more and more users are duplicating the same code in their own drivers, it's time to make them as DRM DP common helpers again. Signed-off-by: Andy Yan Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250318063452.4983-1-andyshrk@163.com Signed-off-by: Dmitry Baryshkov commit 38188a7f575dacba1120a59fd5d62c7f3313c0fa Author: Ville Syrjälä Date: Thu Mar 6 23:07:40 2025 +0200 drm/i915/dp: Reject HBR3 when sink doesn't support TPS4 According to the DP spec TPS4 is mandatory for HBR3. We have however seen some broken eDP sinks that violate this and declare support for HBR3 without TPS4 support. At least in the case of the icl Dell XPS 13 7390 this results in an unstable output. Reject HBR3 when TPS4 supports is unavailable on the sink. v2: Leave breadcrumbs in dmesg to avoid head scratching (Jani) Cc: stable@vger.kernel.org Cc: Jani Nikula Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5969 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250306210740.11886-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d354d52c55c6ccebcc4f4148820139f319a4065f Author: Jouni Högander Date: Mon Mar 31 12:07:47 2025 +0300 drm/i915/psr: Prevent DP Panel Replay as well when CRC is enable We are seeing timeouts in opening CRC fd when testing on setup where DP Panel Replay can be enabled. Fix these by checking if CRC is enabled for DP Panel Replay as well. Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/20250331090747.2964028-1-jouni.hogander@intel.com commit 544813fb8cbcd8b53ddb6d7dafec6673be91ee2f Author: Ville Syrjälä Date: Thu Mar 13 16:08:38 2025 +0200 drm/i915: Eliminate the initial_plane_phys_{smem,lmem}() duplication initial_plane_phys_lmem() and initial_plane_phys_smem() are now identical. Remove one of them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-11-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 9d293478474f0a7101b678967bf3b3ae88d35696 Author: Ville Syrjälä Date: Thu Mar 13 16:08:37 2025 +0200 drm/i915: Use intel_memory_region_type_is_local() in the BIOS FB takeover Replace the hardcoded PTE vs. memory region is_local checks in the BIOS FB takeover with intel_memory_region_type_is_local(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-10-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit a47720c545065aef972fba78c50bf1bdc6f89d02 Author: Ville Syrjälä Date: Thu Mar 13 16:08:36 2025 +0200 drm/i915: Lookup the memory region first in the BIOS FB takeover When doing the BIOS FB takeover let's look up the appropriate memory region first. If it doesn't exist there's not much point in doing the PTE read/etc either. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-9-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 0cd161e9472f2eb4be3436670c6db2dd0e3851e4 Author: Ville Syrjälä Date: Thu Mar 13 16:08:35 2025 +0200 drm/i915: Use a nicer way to lookup the memory region in BIOS FB takeover Use intel_memory_region_by_type() to find the appropriate memory region for the BIOS FB takeover. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-8-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 4bef6b0e1049a952fc4d728b7defc42422cab599 Author: Ville Syrjälä Date: Thu Mar 13 16:08:34 2025 +0200 drm/i915: Verify the BIOS FB first PTE on non-LMEMBAR systems Now that we have intel_ggtt_read_entry() we can easily read out the first PTE of the BIOS FB and verify that it looks correct. We'll also use the extracted dma address to figure out where in stolen the FB lives (so far we've just assumed that it sits at offset 0, and in practice that does seem to be true, but better safe than sorry). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-7-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 50596bdd4e724c9d84885e4a67edc11c622c590b Author: Ville Syrjälä Date: Thu Mar 13 16:08:33 2025 +0200 drm/i915: Use intel_ggtt_read_entry() in the BIOS FB takeover Use intel_ggtt_read_entry() instead of open coding the PTE read/decode in the BIOS FB takeover code. So far this codepath only covers platforms with LMEMBAR. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-6-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit d1b14231aa0cf78ad21e5e83d32e50608928c108 Author: Ville Syrjälä Date: Thu Mar 13 16:08:32 2025 +0200 drm/i915/ggtt: Add intel_ggtt_read_entry() The BIOS FB takeover code wants to read out the PTEs (or at least one of them) to figure out where the FB is located in memory. Currently we only do that for systems with LMEMBAR, and we've open coded the PTE decoding in the display code. Introduce a more proper abstract interface (intel_ggtt_read_entry()) for this purpose, and implement it for all platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-5-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 8f0d3618c6b31b1f8ff0c6c08cf6b101e56d6f8b Author: Ville Syrjälä Date: Thu Mar 13 16:08:31 2025 +0200 agp/intel-gtt: Add intel_gmch_gtt_read_entry() i915 wants to read out the PTE(s) populated by the BIOS/GOP to verify that the framebuffer is in the correct location. Introduce intel_gmch_gtt_read_entry() that reads out the PTE and decodes it to a somewhat abstract form. For now we just return the dma_addr, present bit, and local memory bit. I didn't bother with the snoop bit/etc. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-4-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 9e2434f32d2894e726c091f89ce0fd05e415d354 Author: Ville Syrjälä Date: Thu Mar 13 16:08:30 2025 +0200 drm/i915: Expose intel_memory_type_str() Rename region_type_str() into intel_memory_type_str() and expose it outside intel_memory_region.c. I'll have another use for this in the BIOS FB takeover code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-3-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 33b3c4791eeacdafdb96ba95dbe24142b73be4da Author: Ville Syrjälä Date: Thu Mar 13 16:08:29 2025 +0200 drm/i915: Extract intel_memory_type_is_local() Extract the "is this memory region local?" check into a helper. I'll have another use for this in the BIOS FB takeover. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-2-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 1701771d3069fbee154ca48e882e227fdcfbb583 Author: Mateusz Guzik Date: Tue Apr 1 16:35:20 2025 +0200 x86/mm: Stop prefetching current->mm->mmap_lock on page faults The prefetchw() dates back decades and the fundamental notion of doing something like this on a lock is shady. Moreover, for a few years now in the fast path faults are handled with RCU + per-vma locking, hopefully not even looking at the lock to begin with. As such just remove it. I did not see a point benchmarking this. Given that it is not expected to be looked at by default justifies not doing the prefetch. Signed-off-by: Mateusz Guzik Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Rik van Riel Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250401143520.1113572-1-mjguzik@gmail.com commit 2b00d9031e42eabc8d32847d231ef48b8be0373d Author: Baoquan He Date: Mon Mar 31 16:13:25 2025 +0800 x86/mm: Simplify the pgd_leaf() and p4d_leaf() checks a bit The functions return bool, simplify the checks. [ mingo: Split off from two other patches. ] Signed-off-by: Baoquan He Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250331081327.256412-6-bhe@redhat.com commit c083eff324edd73eb23f4bd3f40f388a3e7c2cd2 Author: Baoquan He Date: Mon Mar 31 16:13:26 2025 +0800 x86/mm: Remove the arch-specific p4d_leaf() definition P4D huge pages are not supported yet, let's use the generic definition in . [ mingo: Cleaned up the changelog. ] Signed-off-by: Baoquan He Signed-off-by: Ingo Molnar Reviewed-by: Oscar Salvador Link: https://lore.kernel.org/r/20250331081327.256412-7-bhe@redhat.com commit b0510ac74e189442dde8799c1b212bd106f2300c Author: Baoquan He Date: Mon Mar 31 16:13:25 2025 +0800 x86/mm: Remove the arch-specific pgd_leaf() definition PGD huge pages are not supported yet, let's use the generic definition in . [ mingo: Cleaned up the changelog. ] Signed-off-by: Baoquan He Signed-off-by: Ingo Molnar Reviewed-by: Oscar Salvador Link: https://lore.kernel.org/r/20250331081327.256412-6-bhe@redhat.com commit f2e01dcf6df2d12e86c363ea9c37d53994d89dd6 Author: Sohil Mehta Date: Thu Mar 27 23:46:29 2025 +0000 x86/nmi: Improve NMI duration console printouts Convert the last remaining printk() in nmi.c to pr_info(). Along with it, use timespec macros to calculate the NMI handler duration. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Reviewed-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-10-sohil.mehta@intel.com commit 05279a2863ddba6ed993aad655b9f3e57d9a94ce Author: Sohil Mehta Date: Thu Mar 27 23:46:28 2025 +0000 x86/nmi: Clean up NMI selftest The expected_testcase_failures variable in the NMI selftest has never been set since its introduction. Remove this unused variable along with the related checks to simplify the code. While at it, replace printk() with the corresponding pr_{cont,info}() calls. Also, get rid of the superfluous testname wrapper and the redundant file path comment. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-9-sohil.mehta@intel.com commit 7324d7de7740fdbb29c79f5e2a001524370fa732 Author: Sohil Mehta Date: Thu Mar 27 23:46:27 2025 +0000 x86/nmi: Add missing description x86_platform_ops::get_nmi_reason to [ mingo: Split off from another patch. ] Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-8-sohil.mehta@intel.com commit 3b1292706305e5949d2aa739eb0ae009a9e6f824 Author: Sohil Mehta Date: Thu Mar 27 23:46:27 2025 +0000 x86/nmi: Improve documentation NMI handlers can be registered by various subsystems, including drivers. However, the interface for registering and unregistering such handlers is not clearly documented. In the future, the interface may need to be extended to identify the source of the NMI. Add documentation to make the current API more understandable and easier to use. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-8-sohil.mehta@intel.com commit 59cddd397accfa92fc36c223e3d532b47fdab841 Author: Sohil Mehta Date: Thu Mar 27 23:46:26 2025 +0000 x86/nmi: Improve and relocate NMI handler comments Some of the comments in the default NMI handling code are out of place or inadequate. Move them to the appropriate locations and update them as needed. Move the comment related to CPU-specific NMIs closer to the actual code. Also, add more details about how back-to-back NMIs are detected since that isn't immediately obvious. Opportunistically, replace an #ifdef section in the vicinity with an IS_ENABLED() check to make the code easier to read. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Acked-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-7-sohil.mehta@intel.com commit b4bc3144c1eca9107f45018000a1e68bfd308d8c Author: Sohil Mehta Date: Thu Mar 27 23:46:25 2025 +0000 x86/nmi: Fix comment in unknown_nmi_error() The comment in unknown_nmi_error() is incorrect and misleading. There is no longer a restriction on having a single Unknown NMI handler. Also, nmi_handle() never used the 'b2b' parameter. The commits that made the comment outdated are: 0d443b70cc92 ("x86/platform: Remove warning message for duplicate NMI handlers") bf9f2ee28d47 ("x86/nmi: Remove the 'b2b' parameter from nmi_handle()") Remove the old comment and update it to reflect the current logic. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Reviewed-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-6-sohil.mehta@intel.com commit 6325f947014644ff39e5902afa48238af8f92e0e Author: Sohil Mehta Date: Thu Mar 27 23:46:24 2025 +0000 x86/nmi: Remove export of local_touch_nmi() Commit: feb6cd6a0f9f ("thermal/intel_powerclamp: stop sched tick in forced idle") got rid of the last exported user of local_touch_nmi() a while back. Remove the unnecessary export. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Reviewed-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-5-sohil.mehta@intel.com commit 4a8fba4be879251fa010d248c179efbd42ec667d Author: Sohil Mehta Date: Thu Mar 27 23:46:23 2025 +0000 x86/nmi: Use a macro to initialize NMI descriptors The NMI descriptors for each NMI type are stored in an array. However, they are currently initialized using raw numbers, which makes it difficult to understand the code. Introduce a macro to initialize the NMI descriptors using the NMI type enum values to make the code more readable. No functional change intended. Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Reviewed-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-4-sohil.mehta@intel.com commit 78a0323506f01e8017a5826cd7e91951c13184fa Author: Sohil Mehta Date: Thu Mar 27 23:46:22 2025 +0000 x86/nmi: Consolidate NMI panic variables Commit: c305a4e98378 ("x86: Move sysctls into arch/x86") recently moved the sysctl handling of panic_on_unrecovered_nmi and panic_on_io_nmi to x86-specific code. These variables no longer need to be declared in the generic header file. Relocate the variable definitions and declarations closer to where they are used. This makes all the NMI panic options consistent and easier to track. [ mingo: Fixed up the SHA1 of the commit reference. ] Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Reviewed-by: Kai Huang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Cc: Joel Granados Link: https://lore.kernel.org/r/20250327234629.3953536-3-sohil.mehta@intel.com commit 2e016da1cbbd013368095270c040e065678c38f7 Author: Sohil Mehta Date: Thu Mar 27 23:46:21 2025 +0000 x86/nmi: Simplify unknown NMI panic handling The unknown_nmi_panic variable is used to control whether the kernel should panic on unknown NMIs. There is a sysctl entry under: /proc/sys/kernel/unknown_nmi_panic which can be used to change the behavior at runtime. However, it seems that in some places, the option unnecessarily depends on CONFIG_X86_LOCAL_APIC. Other code in nmi.c uses unknown_nmi_panic without such a dependency. This results in a few messy #ifdefs splattered across the code. The dependency was likely introduce due to a potential build bug reported a long time ago: https://lore.kernel.org/lkml/40BC67F9.3000609@myrealbox.com/ This build bug no longer exists. Also, similar NMI panic options, such as panic_on_unrecovered_nmi and panic_on_io_nmi, do not have an explicit dependency on the local APIC either. Though, it's hard to imagine a production system without the local APIC configuration, making a specific NMI sysctl option dependent on it doesn't make sense. Remove the explicit dependency between unknown NMI handling and the local APIC to make the code cleaner and more consistent. While at it, reorder the header includes to maintain alphabetical order. [ mingo: Cleaned up the changelog a bit, truly ordered the headers ... ] Signed-off-by: Sohil Mehta Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20250327234629.3953536-2-sohil.mehta@intel.com commit 6b60c282330c46954be9ae1d33cd5c7e5acb315c Author: Dmitry Osipenko Date: Tue Apr 1 16:01:51 2025 +0300 MAINTAINERS: Add Dmitry Osipenko as drm/virtio co-maintainer I was helping to co-maintain VirtIO-GPU driver in drm-misc with permission from Gerd Hoffmann for past 2 years and would like to receive new patches directly into my inbox. Add myself as co-maintainer. Signed-off-by: Dmitry Osipenko Reviewed-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Link: https://lore.kernel.org/r/20250401130151.2238772-1-dmitry.osipenko@collabora.com commit c2d3a730069545f2cc2d644bfa8b1482e6388826 Author: Rob Clark Date: Tue Apr 1 08:57:58 2025 -0700 drm/syncobj: Extend EXPORT_SYNC_FILE for timeline syncobjs Add support for exporting a dma_fence fd for a specific point on a timeline. This is needed for vtest/vpipe[1][2] to implement timeline syncobj support, as it needs a way to turn a point on a timeline back into a dma_fence fd. It also closes an odd omission from the syncobj UAPI. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433 [2] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/805 v2: Add DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_TIMELINE v3: Add unstaged uabi header hunk v4: Also handle IMPORT_SYNC_FILE case v5: Address comments from Dmitry v6: checkpatch.pl nits Signed-off-by: Rob Clark Reviewed-by: Christian König Reviewed-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250401155758.48855-1-robdclark@gmail.com Signed-off-by: Christian König commit de04bb0089a96cc00d13b12cbf66a088befe3057 Author: Anusha Srivatsa Date: Mon Mar 31 11:15:28 2025 -0400 drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Start using the new helper that does the refcounted allocations. Reviewed-by: Luca Ceresoli Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20250331-b4-panel-refcounting-v4-4-dad50c60c6c9@redhat.com Signed-off-by: Maxime Ripard commit c5a635f58e4b9cc5d471c67955d02de306b6b27d Author: Anusha Srivatsa Date: Mon Mar 31 11:15:27 2025 -0400 drm/panel: deprecate old-style panel allocation Start moving to the new refcounted allocations using the new API devm_drm_panel_alloc(). Deprecate any other allocation. Reviewed-by: Luca Ceresoli Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20250331-b4-panel-refcounting-v4-3-dad50c60c6c9@redhat.com Signed-off-by: Maxime Ripard commit dcba396f69073d4ea8c04374fdd207e67e5b5a94 Author: Anusha Srivatsa Date: Mon Mar 31 11:15:26 2025 -0400 drm/panel: Add refcount support Allocate panel via reference counting. Add _get() and _put() helper functions to ensure panel allocations are refcounted. Avoid use after free by ensuring panel pointer is valid and can be usable till the last reference is put. Reviewed-by: Luca Ceresoli Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20250331-b4-panel-refcounting-v4-2-dad50c60c6c9@redhat.com Signed-off-by: Maxime Ripard commit ed9c594d495deb676825489032cee0a03ce29bf9 Author: Anusha Srivatsa Date: Mon Mar 31 11:15:25 2025 -0400 drm/panel: Add new helpers for refcounted panel allocatons Introduce reference counted allocations for panels to avoid use-after-free. The patch adds the macro devm_drm_bridge_alloc() to allocate a new refcounted panel. Followed the documentation for drmm_encoder_alloc() and devm_drm_dev_alloc and other similar implementations for this purpose. Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20250331-b4-panel-refcounting-v4-1-dad50c60c6c9@redhat.com Signed-off-by: Maxime Ripard commit 65931bbc5177f8192a48a0aa5bdb9b95b9f6e87f Author: Thomas Zimmermann Date: Fri Mar 28 15:15:04 2025 +0100 drm/format-helper: Optimize 32-to-8-bpp conversion For ease of implementation, existing line-conversion functions for 8-bit formats write each pixel individually. Optimize the performance by writing multiple pixels in a single 32-bit store. v2: - simplify address calculation (Jani) - fix typo in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-9-tzimmermann@suse.de commit 3f31a017ddbca3812247dd6332c21686caf864de Author: Thomas Zimmermann Date: Fri Mar 28 15:15:03 2025 +0100 drm/format-helper: Optimize 32-to-16-bpp conversion For ease of implementation, existing line-conversion functions for 16-bit formats write each pixel individually. Optimize the performance by writing multiple pixels in single 64-bit and 32-bit stores. v2: - simplify address calculation (Jani) - fix typo in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-8-tzimmermann@suse.de commit 58523a25cbf728695e374fd90416d9bd4a68d4c0 Author: Thomas Zimmermann Date: Fri Mar 28 15:15:02 2025 +0100 drm/format-helper: Optimize 32-to-24-bpp conversion For ease of implementation, existing line-conversion functions for 24-bit formats write each byte individually. Optimize the performance by writing 4 pixels in 3 32-bit stores. v2: - simplify address calculation (Jani) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-7-tzimmermann@suse.de commit a376dcf49c391d06dad31a87e3cdfdf67fecc98d Author: Thomas Zimmermann Date: Fri Mar 28 15:15:01 2025 +0100 drm/format-helper: Add generic conversion to 8-bit formats Add drm_fb_xfrm_line_32to8() to implement conversion from 32-bit pixels to 8-bit pixels. The pixel-conversion is specified by the given callback parameter. Mark the helper as always_inline to avoid overhead from function calls. Then implement all existing line-conversion functions with the new generic call and the respective pixel-conversion helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-6-tzimmermann@suse.de commit b39e5ba0ccb4014d94058eda21aec800c647863d Author: Thomas Zimmermann Date: Fri Mar 28 15:15:00 2025 +0100 drm/format-helper: Add generic conversion to 16-bit formats Add drm_fb_xfrm_line_32to16() to implement conversion from 32-bit pixels to 16-bit pixels. The pixel-conversion is specified by the given callback parameter. Mark the helper as always_inline to avoid overhead from function calls. Then implement all existing line-conversion functions with the new generic call and the respective pixel-conversion helper. There's one pixel-conversion helper that swaps output bytes. It is for gud and requires refactoring, so don't move it into the header file. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-5-tzimmermann@suse.de commit f46bf57299b0a8395263de0bcfcb72a600adaae9 Author: Thomas Zimmermann Date: Fri Mar 28 15:14:59 2025 +0100 drm/format-helper: Add generic conversion to 24-bit formats Add drm_fb_xfrm_line_32to24() to implement conversion from 32-bit pixels to 24-bit pixels. The pixel-conversion is specified by the given callback parameter. Mark the helper as always_inline to avoid overhead from function calls. Then implement all existing line-conversion functions with the new generic call and the respective pixel-conversion helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-4-tzimmermann@suse.de commit d55d0b066f4eedf030c9c1a67a2a0abffece3abc Author: Thomas Zimmermann Date: Fri Mar 28 15:14:58 2025 +0100 drm/format-helper: Add generic conversion to 32-bit formats Add drm_fb_xfrm_line_32to32() to implement conversion from 32-bit pixels to 32-bit pixels. The pixel-conversion is specified by the given callback parameter. Mark the helper as always_inline to avoid overhead from function calls. Then implement all existing line-conversion functions with the new generic call and the respective pixel-conversion helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-3-tzimmermann@suse.de commit c46d18f98261d99711003517c444417a303c7fae Author: Thomas Zimmermann Date: Fri Mar 28 15:14:57 2025 +0100 drm/format-helper: Move helpers for pixel conversion to header file The DRM draw helpers contain format-conversion helpers that operate on individual pixels. Move them into an internal header file and adopt them as individual API. Update the draw code accordingly. The pixel helpers will also be useful for other format conversion helpers. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250328141709.217283-2-tzimmermann@suse.de commit 43985820217d2efbb1a9bc2bf91fc3a0e4d19877 Author: Thomas Zimmermann Date: Fri Mar 28 10:17:08 2025 +0100 drm/cirrus-qemu: Remove custom plane state Remove struct cirrus_primary_plane_state and its helpers, which are all unused. Use struct drm_shadow_plane_state instead. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://lore.kernel.org/r/20250328091821.195061-5-tzimmermann@suse.de commit 9efd2cfc84ba7a98cc798da7186d13137fda58ba Author: Thomas Zimmermann Date: Fri Mar 28 10:17:07 2025 +0100 drm/cirrus-qemu: Use framebuffer format as-is, drop adjustments Remove internal adjustments to framebuffer format from cirrus-qemu driver. The driver did this to support higher resolutions by reducing the per-pixel memory consumption. DRM has a policy of exporting formats as they are implemented in hardware. So avoid internal adjustments if possible. Also remove the call to drm_fb_blit() from cirrus-qemu. The helper is useful if source and destination format are not known beforehand. This is not the case for cirrus-qemu. This change effectively reduces the maximum available resolution to 800x600 at 32 bpp. A maximum scanline pitch of 4095 byte prevents 1024 pixels per scanline at 32 bpp. Higher resolutions are possible at lower bit depths, but are currently not supported by userspace. When cirrus-qemu currently reduced the internal bit depth to support higher resolutions, it trades resolution for bit depth and CPU time. Converting from 32-bit colors has a significant runtime overhead, as outlined at [1]. Avoiding color-format adjustments also avoids this tradeoff. v2: - expand commit message (Gerd) Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://lore.kernel.org/dri-devel/20250325110407.81107-1-tzimmermann@suse.de/ # 1 Link: https://lore.kernel.org/r/20250328091821.195061-4-tzimmermann@suse.de commit 1eb4d744fb86199f0f6da9463d83ed3eec2f61bf Author: Thomas Zimmermann Date: Fri Mar 28 10:17:06 2025 +0100 drm/cirrus-qemu: Stricter mode validation Implement strict checking of a display mode's minimum scanline pitch in cirrus_mode_config_mode_valid(). Sort out all modes that possibly overflow the maximum pitch. The current validation only tests against a display mode's minimum requirements for video memory. Only atomic_check later tests against the pitch limit before programming the framebuffer. The problem is that user-space compositors do not handle this gracefully. If atomic_check fails to validate the scanline pitch and returns an error, the compositor, namely Weston, does nothing and the display remains stale. Ruling out display modes that possibly overflow the pitch avoids this problem. With only 4 MiB of video memory available, this effectively limits horizontal resolution to 800 pixels. But with cirrus-qemu being low-end and obsolete, this is probably not an issue in practice. Better alternatives are available in qemu. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://lore.kernel.org/r/20250328091821.195061-3-tzimmermann@suse.de commit 4bfb389a0136a13f0802eeb5e97a0e76d88f77ae Author: Thomas Zimmermann Date: Fri Mar 28 10:17:05 2025 +0100 drm/cirrus-qemu: Fix pitch programming Do not set CR1B[6] when programming the pitch. The bit effects VGA text mode and is not interpreted by qemu. [1] It has no affect on the scanline pitch. The scanline bit that is set into CR1B[6] belongs into CR13[7], which the driver sets up correctly. This bug goes back to the driver's initial commit. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://gitlab.com/qemu-project/qemu/-/blob/stable-9.2/hw/display/cirrus_vga.c?ref_type=heads#L1112 # 1 Fixes: f9aa76a85248 ("drm/kms: driver for virtual cirrus under qemu") Cc: Adam Jackson Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: # v3.5+ Link: https://lore.kernel.org/r/20250328091821.195061-2-tzimmermann@suse.de commit da1d515eb1692e87422caefb80799bd716070bbc Author: Jani Nikula Date: Fri Mar 21 14:51:14 2025 +0200 drm/i915/gvt: use hardcoded reference clocks Usually I'd argue hardcoding values is the wrong thing to do, but in this case, GVT looking deep into the guts of the DPLL manager for the reference clocks is worse. This is done for BDW and BXT only, and there shouldn't be any reason to try to be so dynamic about it. This helps reduce the direct pokes at display guts from non-display code. Cc: Ville Syrjälä Reviewed-by: Zhenyu Wang Link: https://lore.kernel.org/r/20250321125114.750062-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 513c1a2ec4c6e520798f17b6d8af7a9881fdd69a Author: Jani Nikula Date: Wed Mar 26 13:54:52 2025 +0200 drm/i915: reduce intel_wakeref.h dependencies Forward declare struct drm_printer instead of including drm/drm_print.h, as we only need the pointer. Turns out quite a few places depend on this include implicitly. Make them explicit. Some of the includes are just stale and unnecessary. Group the forward declarations together while at it. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250326115452.2090275-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6f5a3b9d6dc41f30b685aa9e9181f9ae2b8ff79b Author: Jani Nikula Date: Thu Feb 27 11:38:05 2025 +0200 drm/i915/gvt: update MAINTAINERS Update GVT-g MAINTAINERS entry to reflect the current status of maintenance and repositories. Cc: Dave Airlie Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Simona Vetter Cc: Tvrtko Ursulin Cc: Zhenyu Wang Cc: Zhi Wang Acked-by: Zhi Wang Acked-by: Zhenyu Wang Acked-by: Simona Vetter Link: https://lore.kernel.org/r/20250227093805.2217658-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4f8207469094bd04aad952258ceb9ff4c77b6bfa Author: Jani Nikula Date: Thu Mar 27 14:47:39 2025 +0200 drm/i915/gvt: fix unterminated-string-initialization warning Initializing const char opregion_signature[16] = OPREGION_SIGNATURE (which is "IntelGraphicsMem") drops the NUL termination of the string. This is intentional, but the compiler doesn't know this. Switch to initializing header->signature directly from the string litaral, with sizeof destination rather than source. We don't treat the signature as a string other than for initialization; it's really just a blob of binary data. Add a static assert for good measure to cross-check the sizes. Reported-by: Kees Cook Closes: https://lore.kernel.org/r/20250310222355.work.417-kees@kernel.org Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13934 Tested-by: Nicolas Chauvet Tested-by: Damian Tometzki Cc: stable@vger.kernel.org Reviewed-by: Zhenyu Wang Link: https://lore.kernel.org/r/20250327124739.2609656-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3b199a58cc585f423a85af2e57045c9a783361bb Author: Baochen Qiang Date: Fri Mar 28 13:32:29 2025 +0800 Reapply "wifi: ath11k: restore country code during resume" This reverts commit d3e154d7776ba57ab679fb816fb87b627fba21c9. With non-WoWLAN suspend support brought back, commit 7f0343b7b871 ("wifi: ath11k: restore country code during resume") needs to be brought back as well. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Muhammad Usama Anjum Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-6-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit 32d93b51bc7e2e557771abe4a88da69c609e3d52 Author: Baochen Qiang Date: Fri Mar 28 13:32:28 2025 +0800 wifi: ath11k: choose default PM policy for hibernation Now WoWLAN mode is chosen for those machines listed in the quirk table. This works for suspend (S3) but breaks for hibernation (S4), because WoWLAN mode requires WLAN power to be sustained, which is not the case during hibernation. For hibernation, the default mode should be used. Register a PM notifier with which kernel can notify us of the actual PM operation: if system is going to suspend, the original PM policy is honored; while if it is hibernation, overwrite it with default policy. To summarize: for suspend (S3), WoWLAN mode is chosen for machines listed in the quirk table, non-WoWLAN mode for others; for hibernation (S4), non-WoWLAN mode is chosen for all. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-5-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit 88fd03cf51a7d67dac976ecce079ccfc79376966 Author: Baochen Qiang Date: Fri Mar 28 13:32:27 2025 +0800 wifi: ath11k: support non-WoWLAN mode suspend as well Previously commit 166a490f59ac ("wifi: ath11k: support hibernation") was reverted due to [1], so currently we only support WoWLAN mode suspend. This works well in scenarios where WLAN power is sustained during suspend, however breaks in those where power is cut off. This change basically brings the reverted commit back, but differs in that we decide based on the PM policy to choose WoWLAN mode suspend or the non-WoWLAN mode. As stated in the previous patch for now the PM policy is determined based on machine models. That said we will choose WoWLAN mode suspend if we are running on machines listed in ath11k_pm_quirk_table, otherwise we choose the other one. [1] https://bugzilla.kernel.org/show_bug.cgi?id=219196 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Muhammad Usama Anjum Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-4-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit 662cc5b92c327e94587a959d7ed75862eda4b059 Author: Baochen Qiang Date: Fri Mar 28 13:32:26 2025 +0800 wifi: ath11k: refactor ath11k_core_suspend/_resume() Due to [1] we currently put WLAN target into WoWLAN mode regardless of machine models. In upcoming patches we will support another mode, and finally which mode is chosen depends on the exact machine model. To prepare for such change, refactor the actual WoWLAN stuff in ath11k_core_suspend() into a new helper ath11k_core_suspend_wow(), this increase the code readability when the new suspend mode is added in upcoming patches. Same change applies to ath11k_core_resume(); [1] https://bugzilla.kernel.org/show_bug.cgi?id=219196 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Muhammad Usama Anjum Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-3-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit 3d2ce6ad9126b96a721542c6299a2f0967b5a63f Author: Baochen Qiang Date: Fri Mar 28 13:32:25 2025 +0800 wifi: ath11k: introduce ath11k_core_continue_suspend_resume() Currently ath11k_core_suspend() and ath11k_core_resume() have the same check before going on. In upcoming patches the check is needed by some newly added functions as well. To avoid duplicate code, introduce a new helper ath11k_core_continue_suspend_resume() which does such check internally. Callers can decide whether to go on based on its return value. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Muhammad Usama Anjum Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-2-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit ce8669a27016354dfa8bf3c954255cb9f3583bae Author: Baochen Qiang Date: Fri Mar 28 13:32:24 2025 +0800 wifi: ath11k: determine PM policy based on machine model To handle the Lenovo unexpected wakeup issue [1], previously we revert commit 166a490f59ac ("wifi: ath11k: support hibernation"). So currently WLAN target is put into WoWLAN mode during suspend. This is a temporary solution as it does not work on machines where WLAN power is cut off. The thought here is that we do WoWLAN suspend on Lenovo machines while do non-WoWLAN suspend (which is done in the reverted commit) on other machines. This requires us to identify Lenovo machines from others. For that purpose, read board vendor and product name from DMI interface, match it against all known affected machines. If there is a match, choose WoWLAN suspend mode, else choose non-WoWLAN mode. Save the mode in ab for later reference. [1] https://bugzilla.kernel.org/show_bug.cgi?id=219196 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-by: Muhammad Usama Anjum Tested-by: Takashi Iwai Signed-off-by: Baochen Qiang Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-1-23405ae23431@quicinc.com Signed-off-by: Jeff Johnson commit bac016066536cc050046c20807ca8b650c55cc70 Author: Gustavo Sousa Date: Fri Mar 28 13:50:50 2025 -0300 drm/xe: Make PPHWSP size explicit in xe_gt_lrc_size() The context of each engine starts with a 4k memory space for the "Per-process HW status page" (PPHWSP). In xe_gt_lrc_size(), we have been implicitly accounting for that page in the switch statement on the engine class. Since the PPHWSP is common to all engines, let's extract that into it's own assignment. That makes the context structure more explicit in the code and aligns better with the descriptions in Bspec. Another advantage of keeping it separate is that now the sizes used in the switch statement match the sizes we calculate engine-specific context images, which have their own Bspec pages. Bspec: 67296, 60159, 45554 Signed-off-by: Gustavo Sousa Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250328-explicit-pphwsp-size-in-xe_gt_lrc_size-v1-1-ceb9ce7c8bc1@intel.com Signed-off-by: Lucas De Marchi commit 61672806b579dd5a150a042ec9383be2bbc2ae7e Author: Kenneth Graunke Date: Sun Mar 30 12:59:23 2025 -0400 drm/xe: Invalidate L3 read-only cachelines for geometry streams too Historically, the Vertex Fetcher unit has not been an L3 client. That meant that, when a buffer containing vertex data was written to, it was necessary to issue a PIPE_CONTROL::VF Cache Invalidate to invalidate any VF L2 cachelines associated with that buffer, so the new value would be properly read from memory. Since Tigerlake and later, VERTEX_BUFFER_STATE and 3DSTATE_INDEX_BUFFER have included an "L3 Bypass Enable" bit which userspace drivers can set to request that the vertex fetcher unit snoop L3. However, unlike most true L3 clients, the "VF Cache Invalidate" bit continues to only invalidate the VF L2 cache - and not any associated L3 lines. To handle that, PIPE_CONTROL has a new "L3 Read Only Cache Invalidation Bit", which according to the docs, "controls the invalidation of the Geometry streams cached in L3 cache at the top of the pipe." In other words, the vertex and index buffer data that gets cached in L3 when "L3 Bypass Disable" is set. Mesa always sets L3 Bypass Disable so that the VF unit snoops L3, and whenever it issues a VF Cache Invalidate, it also issues a L3 Read Only Cache Invalidate so that both L2 and L3 vertex data is invalidated. xe is issuing VF cache invalidates too (which handles cases like CPU writes to a buffer between GPU batches). Because userspace may enable L3 snooping, it needs to issue an L3 Read Only Cache Invalidate as well. Fixes significant flickering in Firefox on Meteorlake, which was writing to vertex buffers via the CPU between batches; the missing L3 Read Only invalidates were causing the vertex fetcher to read stale data from L3. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4460 Fixes: 6ef3bb60557d ("drm/xe: enable lite restore") Cc: stable@vger.kernel.org # v6.13+ Signed-off-by: Kenneth Graunke Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250330165923.56410-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 3f2bdccbccdcb53b0d316474eafff2e3462a51ad Author: Rodrigo Vivi Date: Fri Mar 28 14:17:52 2025 -0400 drm/xe: Restore EIO errno return when GuC PC start fails Commit b4b05e53b550 ("drm/xe/guc_pc: Retry and wait longer for GuC PC start"), leads to the following Smatch static checker warning: drivers/gpu/drm/xe/xe_guc_pc.c:1073 xe_guc_pc_start() warn: missing error code here? '_dev_err()' failed. 'ret' = '0' Fixes: b4b05e53b550 ("drm/xe/guc_pc: Retry and wait longer for GuC PC start") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/intel-xe/1454a5f1-ee18-4df1-a6b2-a4a3dddcd1cb@stanley.mountain/ Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250328181752.26677-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 930af58421acf971a2f377c07d4cc74f5f520066 Author: Lucas De Marchi Date: Mon Mar 24 19:28:42 2025 -0700 drm/i915/dram: Consolidate logging of DRAM type Instead of logging the dram type in the per version/platform function, do it in the generic one. This fixes a few discrepancies depending on the platform: - There was no DRAM type logging for graphics version 12 and above - For graphics version 11, it would log the DRAM type in skl_get_dram_info(), but could possibly override it later without any log in icl_pcode_read_mem_global_info() For bxt_get_dram_info(), there's no need to log the type for each dimm, as the drm_WARN_ON() already covers the case they are not all the same. This maintains the behavior of skl_get_dram_info() that would log the DRAM type even on failures. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250324-dram-type-v1-2-bf60ef33ac01@intel.com Signed-off-by: Lucas De Marchi commit 8d4bd9bb138a72e5794d6597ee8d1f85f272ef63 Author: Lucas De Marchi Date: Mon Mar 24 19:28:41 2025 -0700 drm/i915/dram: Add missing INTEL_DRAM str conversions Some new dram types were added without adding the corresponding string conversion, probably because it's not being used by recent platforms. Add them, together with a BUILD_BUG_ON() to ensure it keeps in sync, in preparation to make use of them in recent platforms. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20250324-dram-type-v1-1-bf60ef33ac01@intel.com Signed-off-by: Lucas De Marchi commit bee964bd14ae951c7b6eb59b4421e1ccd9edb69b Author: Rodrigo Vivi Date: Fri Mar 28 15:32:02 2025 -0400 drm/i915/display: Fix htmldocs build Fixes a wrong documentation block indentation: Documentation/gpu/i915:141: ./drivers/gpu/drm/i915/display/intel_hotplug.c:1080: ERROR: Unexpected indentation. Documentation/gpu/i915:141: ./drivers/gpu/drm/i915/display/intel_hotplug.c:1082: WARNING: Block quote ends without a blank line; unexpected unindent. v2: Use an empty line instead of changing block indentation (Imre) Fixes: 0d77a3e0ea90 ("drm/i915/hpd: Add support for blocking the IRQ handling on an HPD pin") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/intel-gfx/20250312232506.47451f83@canb.auug.org.au/ Cc: Imre Deak Reviewed-by: Imre Deak Link: https://lore.kernel.org/r/20250328180829.25892-1-rodrigo.vivi@intel.com Link: https://lore.kernel.org/r/20250328193202.40884-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit c4eac403519512aef12250cb93ebfdd0966d76f9 Author: Stuart Summers Date: Fri Mar 28 15:42:36 2025 +0000 drm/xe: Don't print error about hwconfig when using execlists This error message is only applicable for platforms using GuC submission - to warn the user if the GuC they are using or the platform they are running doesn't have this information to provide to userspace about the platform. When forcing execlist submission, which is something only used for debug, the user is running at their own risk and should understand the limitations of running without GuC. v2 (John/Lucas): Don't print an info message with execlists Signed-off-by: Stuart Summers Reviewed-by: John Harrison Reviewed-by: Jagmeet Randhawa Link: https://lore.kernel.org/r/20250328154236.9216-1-stuart.summers@intel.com Signed-off-by: Lucas De Marchi commit 4e22d5b8ba499905721329f89675795f4ca488b2 Author: Andi Shyti Date: Fri Mar 28 00:26:29 2025 +0100 drm/i915/gem: Convert SPDX headers to single-line format Replace multi-line SPDX license headers with single-line equivalents (// SPDX-License-Identifier: MIT or /* ... */ for headers), as preferred by current kernel coding style. Signed-off-by: Andi Shyti Reviewed-by: Nitin Gote Acked-by: Jani Nikula Reviewed-by: Mikołaj Wasiak Link: https://patchwork.freedesktop.org/patch/msgid/20250327232629.2939-1-andi.shyti@linux.intel.com commit 010363c4618920838ca8777fdabd46871d289bf9 Author: Vinod Govindapillai Date: Sun Mar 30 20:26:16 2025 +0300 drm/i915/display: implement wa_18038517565 Disable FBC compressor clock gating before enabling FBC and clear it after disabling FBC. v2: update the DG2 registers for this wa v3: use local variable and single line reg definition (Jani) Bspec: 74212, 72197, 69741, 65555 Signed-off-by: Vinod Govindapillai Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250330172616.718188-1-vinod.govindapillai@intel.com commit bfb20a655848a9088e3e9ae24b1dcce1bbf016c2 Author: Ariel D'Alessandro Date: Mon Mar 24 15:58:01 2025 -0300 drm/panfrost: Force AARCH64_4K page table format on MediaTek MT8192 MediaTek MT8192 SoC has an ARM Mali-G57 MC5 GPU (Valhall-JM). Now that Panfrost supports AARCH64_4K page table format, let's enable it on this SoC. Running glmark2-es2-drm [0] benchmark, reported the same performance score on both modes Mali LPAE (LEGACY) vs. AARCH64_4K, before and after this commit. Tested on a Mediatek (MT8395) Genio 1200 EVK board. [0] https://github.com/glmark2/glmark2 Signed-off-by: Ariel D'Alessandro Reviewed-by: Boris Brezillon Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-7-ariel.dalessandro@collabora.com commit 21fc936cae387e002a6ba6be30ca3fc24b6f6c50 Author: Ariel D'Alessandro Date: Mon Mar 24 15:58:00 2025 -0300 drm/panfrost: Force AARCH64_4K page table format on MediaTek MT8188 MediaTek MT8188 SoC has an ARM Mali-G57 MC3 GPU (Valhall-JM), which constantly faults with the current panfrost support. For instance, running `glmark2-es2-drm` benchmark test: ``` [ 79.617461] panfrost 13000000.gpu: js fault, js=1, status=JOB_BUS_FAULT, head=0xaadc380, tail=0xaadc380 [ 80.119811] panfrost 13000000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0xaaca180, tail=0xaaca180, sched_job=000000002fd03ccc [ 80.129083] panfrost 13000000.gpu: Unhandled Page fault in AS0 at VA 0x0000000000000000 [ 80.129083] Reason: TODO [ 80.129083] raw fault status: 0x1C2 [ 80.129083] decoded fault status: SLAVE FAULT [ 80.129083] exception type 0xC2: TRANSLATION_FAULT_2 [ 80.129083] access type 0x1: EXECUTE [ 80.129083] source id 0x0 ``` Note that current panfrost mode (Mali LPAE - LEGACY) only allows to specify write-cache or implementation-defined as the caching policy, probably not matching the right configuration. As depicted in the source code: drivers/iommu/io-pgtable-arm.c: ``` * MEMATTR: Mali has no actual notion of a non-cacheable type, so the * best we can do is mimic the out-of-tree driver and hope that the * "implementation-defined caching policy" is good enough... ``` Now that Panfrost supports AARCH64_4K page table format, let's enable it on Mediatek MT8188 and configure the cache/shareability policies properly. Signed-off-by: Ariel D'Alessandro Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Boris Brezillon Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-6-ariel.dalessandro@collabora.com commit f49dfccc76fe41d3beee31ead97c4a798b79a615 Author: Ariel D'Alessandro Date: Mon Mar 24 15:57:59 2025 -0300 drm/panfrost: Add support for AARCH64_4K page table format Currently, Panfrost only supports MMU configuration in "LEGACY" (as Bifrost calls it) mode, a (modified) version of LPAE "Large Physical Address Extension", which in Linux we've called "mali_lpae". This commit adds support for conditionally enabling AARCH64_4K page table format. To achieve that, a "GPU optional quirks" field was added to `struct panfrost_features` with the related flag. Note that, in order to enable AARCH64_4K mode, the GPU variant must have the HW_FEATURE_AARCH64_MMU feature flag present. Signed-off-by: Ariel D'Alessandro Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Boris Brezillon Reviewed-by: Adrián Larumbe Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-5-ariel.dalessandro@collabora.com commit 9900e35a3ab14e1dcd5987b7ea13150e9ba2dc02 Author: Jouni Högander Date: Fri Mar 28 10:06:23 2025 +0200 drm/i915/psr: Add PSR pause/resume reference count We have now seen this: <4> [2120.434153] i915 0000:00:02.0: [drm] drm_WARN_ON(psr->paused) <4> [2120.434196] WARNING: CPU: 3 PID: 4430 at drivers/gpu/drm/i915/display/intel_psr.c:2227 intel_psr_pause+0x16e/0x180 [i915] Comment for drm_WARN_ON(display->drm, psr->paused) in intel_psr_pause says: "If we ever hit this, we will need to add refcount to pause/resume" This patch is implementing PSR pause/resume refcount. v3: Incorporate changes missing from v2 v2: Add drm_warn for detecting possible unbalanced pause/resume Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://lore.kernel.org/r/20250328080623.1183669-1-jouni.hogander@intel.com commit db599be9f393f74fc437b21d16adc50debd5ad2c Author: Ariel D'Alessandro Date: Mon Mar 24 15:57:58 2025 -0300 drm/panfrost: Set HW_FEATURE_AARCH64_MMU feature flag on Bifrost models Set this feature flag on all Mali Bifrost platforms as the MMU supports AARCH64 4K page table format. Signed-off-by: Ariel D'Alessandro Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Adrián Larumbe Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-4-ariel.dalessandro@collabora.com commit 0b9bcf9a762e7bdb022e6428096a83d92bb90b27 Author: Ariel D'Alessandro Date: Mon Mar 24 15:57:57 2025 -0300 drm/panfrost: Use GPU_MMU_FEATURES_VA_BITS/PA_BITS macros As done in panthor, define and use these GPU_MMU_FEATURES_* macros, which makes code easier to read and reuse. Signed-off-by: Ariel D'Alessandro Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Adrián Larumbe Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-3-ariel.dalessandro@collabora.com commit f91e534f4e605caabc6abd61809dd8d6698e7c71 Author: Ariel D'Alessandro Date: Mon Mar 24 15:57:56 2025 -0300 drm/panfrost: Set IOMMU_CACHE flag Panfrost does not support uncached mappings, so flag them properly. Also flag the pages that are mapped as response to a page fault as cached. Signed-off-by: Boris Brezillon Signed-off-by: Ariel D'Alessandro Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Adrián Larumbe Signed-off-by: Steven Price Link: https://lore.kernel.org/r/20250324185801.168664-2-ariel.dalessandro@collabora.com commit 625fbc16524a45488f6eb8561d98b3328efe79cd Author: Chen Ni Date: Mon Mar 24 16:03:03 2025 +0800 wifi: rtw88: usb: Remove redundant 'flush_workqueue()' calls 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Chen Ni Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250324080303.408084-1-nichen@iscas.ac.cn commit 5c4cf36c538bb2714e43654e365cb77b19c4a93e Author: Chen Ni Date: Mon Mar 24 15:59:10 2025 +0800 wifi: rtw88: sdio: Remove redundant 'flush_workqueue()' calls 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Chen Ni Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250324075910.407999-1-nichen@iscas.ac.cn commit 28b921020babf6d092e7570b56d69fc56ed37a6a Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:43 2025 +0800 wifi: rtw89: 8852bx: support different SAR configs by antenna Calculate difference of SAR configs between RF path A and RF path B. And then, based on the calculated result, set the TX power reference CR (control register). Finally, declare to support SAR by antenna in 8852b/8852bt chip info. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-13-pkshih@realtek.com commit 7b51b39368c00e1cb06546e787ccff6b15b1686c Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:42 2025 +0800 wifi: rtw89: 8852c: support different SAR configs by antenna Set SAR configs to the corresponding CRs (control registers) according to RF path. Then, declare to support SAR by antenna in chip info. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-12-pkshih@realtek.com commit 711b6ce3e816ff2f00431d88b11ec22e34acc6fa Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:41 2025 +0800 wifi: rtw89: 8922a: support different SAR configs by antenna Set SAR configs to the corresponding CRs (control registers) according to RF path. Then, declare to support SAR by antenna in chip info. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-11-pkshih@realtek.com commit c6c830b26590933eaebb98d62f198ec655a83777 Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:40 2025 +0800 wifi: rtw89: sar: add skeleton for different configs by antenna Some SAR sources, e.g. ACPI, may allow different SAR configs by antenna. Previously, the minimum config between antennas was taken. Because there are differences between HW design, different chips might have different solutions to achieve this. So, it cannot be done through a single common handling. Now, add the relevant skeleton for this purpose ahead. First, add a flag into chip info to describe whether it has implemented this function or not. Second, support to query SAR config for a given RF path. With it, each chip can implement its own handling. Then, if a chip declares to support this function, when it queries SAR config without a given RF path, it gets a maximum config between antennas. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-10-pkshih@realtek.com commit 5bafc85d71a3212f6115faeb1dba0fa308c7e8aa Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:39 2025 +0800 wifi: rtw89: acpi: support loading GEO SAR tables Support to load GEO (geography) SAR tables with ACPI RWGS method. When SAR values could be different by regulatory, GEO SAR can be used. The format of GEO SAR is like the following, where regulatory number, band number, and delta number are determined by header of either static SAR or dynamic SAR. (It also means that no GEO SAR will be considered when neither static SAR nor dynamic SAR is configured.) delta number / \ + +-----+-----------------+ / | | max | delta... | \ / | +-----+-----------------+ band / | | max | delta... | number / | +-----+-----------------+ / | |... | / + +-----+-----------------+ | | max | delta... | \ regulatory | +-----+-----------------+ band number | | max | delta... | number | +-----+-----------------+ | |... | / + +-----+-----------------+ \ | |... | \ | |... | \ | |... | \ | | | \ | | | + +-----+-----------------+ Each entry of GEO SAR contains delta field(s), which are offset(s) used to tweak the loaded static/dynamic SAR table(s) by antenna, and one max field, which describes the maximum of the final SAR values after tweaked. Different entries should be configured based on both regulatory and band. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-9-pkshih@realtek.com commit 2eba885ab8e9c5cc547363a270d77adf53447f76 Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:38 2025 +0800 wifi: rtw89: acpi: support loading dynamic SAR tables and indicator Support to load dynamic SAR tables with ACPI RWRD method. The content format of a single dynamic SAR table is basically the same as static SAR table. However, it's able to carry multiple dynamic SAR tables at one time. And, its header contains one more field to describe how many dynamic SAR tables are filled in the content. Either static SAR table or dynamic SAR tables can be supported, but not both simultaneously. Besides, also support to load indicator of dynamic SAR with ACPI RWSI method. The indicator will describe a target dynamic SAR table, which should be followed currently, by antenna. It can be changed at runtime according to platform mode. For example, tablet mode can use different SAR from normal mode. So, track indicator configuration if dynamic SAR is configured. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-8-pkshih@realtek.com commit 91f4ea117467f5dc2066658cd5e302ae2fc7584c Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:37 2025 +0800 wifi: rtw89: acpi: support loading static SAR table Support to load static SAR table with ACPI WRDS method. The format of a static SAR table is like the following, where according to header, antenna number could be either 2 or 4 and subband number could either contain 6 GHz or not. And then, an entry of it describes a TX power limitation with a given unit, which is also based on header, for the antenna under the subband. Though things can be determined by header, still not all combinations are allowed in content. For the recognizing flow, there is a list of allowed combinations. +--------------------------------+ | header | +--------------------------------+ +---+---+---+---+---+------------+ + / | | | | | | ... | | \ +---+---+---+---+---+------------+ | antenna | | | | | | ... | | number +---+---+---+---+---+------------+ | content |...| | | | | ... | | +---+---+---+---+---+------------+ | \ |...| | | | | ... | | / +---+---+---+---+---+------------+ + \ / subband number Following the format above, try to load a static SAR table and normalize its content into SW structure. If any recognized is loaded, SW SAR flow is then set up with source from ACPI. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-7-pkshih@realtek.com commit 5ee5f848469f584adb7010acb8ac656a544f5654 Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:36 2025 +0800 wifi: rtw89: acpi: introduce method evaluation function for reuse The following implementations will evaluate different ACPI methods, but the pre-process flow of them are the same. So, introduce a function for these pre-process things. Besides, also change ACPI RTAG method to call this function. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-6-pkshih@realtek.com commit 88ca3107d2ce06448018e0571f7c0f1b40f57b55 Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:35 2025 +0800 wifi: rtw89: sar: add skeleton for SAR configuration via ACPI To support SAR configuration in BIOS via ACPI, add related subbnad/band converting/handling function and define SW format to store result after parsing. Then, register a new SAR source, i.e. ACPI, into SAR flow and implement its query function. Besides, tweak priority of common SAR to be the highest. And, ACPI SAR can just be configured once when no other sources is already working. For now, evaluating SAR via ACPI returns -ENOENT, i.e. ACPI SAR doesn't really work yet. The evaluating flow will be implemented in the following. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-5-pkshih@realtek.com commit 1e262fc8df10aa7b55694bf2008dd0c1f8ae8acf Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:34 2025 +0800 wifi: rtw89: sar: introduce structure to wrap query parameters The following implementations will support SAR source from ACPI/BIOS. And when querying, it needs to take more parameters into account. To avoid changing function prototype of querying SAR everytime when new SAR source is introduced, wrap query parameters into a structure first. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-4-pkshih@realtek.com commit 4cecf99124925bf27ed17a0f75cf44409b1ac6ae Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:33 2025 +0800 wifi: rtw89: regd: introduce string getter for reuse Introduce a function to get the string for a given regulatory. It will be used in the following. Besides, drop similar things in debug code and use this too. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-3-pkshih@realtek.com commit 8bde621f124b593e3d1570a40d02155690714e3f Author: Zong-Zhe Yang Date: Wed Mar 26 10:06:32 2025 +0800 wifi: rtw89: fix typo of "access" in rtw89_sar_info description The "acces" should be "access". So, fix it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250326020643.14487-2-pkshih@realtek.com commit e95129709a86cecdb5bea242d2ad489db2ad2ef5 Author: Ping-Ke Shih Date: Tue Mar 25 11:10:21 2025 +0800 wifi: rtw89: phy: reset value of force TX power for MAC ID The force TX power function is disabled, but the force TX power value is preserved, causing misunderstand the behavior in debug. Clear all values. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250325031021.15619-1-pkshih@realtek.com commit bc1265b5c982fc73077812a8be727ba3d734164b Author: Ping-Ke Shih Date: Tue Mar 25 10:54:24 2025 +0800 wifi: rtw89: fw: cast mfw_hdr pointer from address of zeroth byte of firmware->data The firmware->size is validated before using firmware->data, but Coverity still reports: Downcasting "firmware->data" from "u8 const *" to "struct rtw89_mfw_hdr" implies that the data that this pointer points to is tainted." Using &firmware->data[0] to avoid the warning. No change logic at all. Addresses-Coverity-ID: 1494046 ("Untrusted loop bound") Addresses-Coverity-ID: 1544385 ("Untrusted array index read") Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250325025424.14079-1-pkshih@realtek.com commit 81433a8a4f404d3e52e8e591fdc9409101dadf57 Author: Ping-Ke Shih Date: Fri Mar 21 11:47:36 2025 +0800 wifi: rtw89: set 2TX for 1SS rate by default To improve performance in range, for 1SS rate, transmit the same signal on 2 antenna, which is called 2TX. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250321034736.6269-1-pkshih@realtek.com commit 94f608992f8cabe9cc2e318d81b2beac87802cba Author: Ankit Nautiyal Date: Thu Mar 27 20:16:29 2025 +0530 drm/i915/display: Avoid use of VTOTAL.Vtotal bits For platforms that always use VRR Timing Generator, the VTOTAL.Vtotal bits are not required. Since the support for these bits is going to be deprecated in upcoming platforms, avoid writing these bits for the platforms that do not use legacy Timing Generator. Since for these platforms vrr.vmin is always filled with crtc_vtotal, use TRAN_VRR_VMIN to get the vtotal for adjusted_mode. v2: Avoid having a helper for manipulating VTOTAL register, and instead just make the change where required. (Ville) v3: Set crtc_vtotal instead of working with the bits directly (Ville). Use intel_vrr_vmin_vtotal() to set the vtotal during readout. (Ville) v4: Keep the reading part unchanged, and let it get overwritten for cases where we use vrr.vmin. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250327144629.648306-3-ankit.k.nautiyal@intel.com commit 7a6bf54c5f00b4a2d7a57e0733fd09216d9ea277 Author: Ankit Nautiyal Date: Thu Mar 27 20:16:28 2025 +0530 drm/i915/display: Introduce transcoder_has_vrr() helper Introduce a new helper to check transcoder_has_vrr() and use that to exclude transcoders which do not support VRR. v2: Include HAS_VRR into the helper. (Ville) v3: Drop the usage in places where not applicable. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250327144629.648306-2-ankit.k.nautiyal@intel.com commit 586831a417c9ffbcac63cf1b53f05d15024fdd56 Author: Alexander Stein Date: Wed Mar 26 11:11:23 2025 +0100 drm/bridge: sii902x: Set bridge type This is a RGB to HDMI bridge, so set the bridge type accordingly. Signed-off-by: Alexander Stein Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250326101124.4031874-1-alexander.stein@ew.tq-group.com Signed-off-by: Dmitry Baryshkov commit 4658f363fe67065d968bb9f6cbf611523846f27c Author: Tejas Vipin Date: Tue Mar 25 15:17:07 2025 +0530 drm/panel: himax-hx8394: transition to mipi_dsi wrapped functions Changes the himax-hx8394 panel to use multi style functions for improved error handling. Reviewed-by: Dmitry Baryshkov Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250325094707.961349-1-tejasvipin76@gmail.com Signed-off-by: Dmitry Baryshkov commit 20e8219205145e1af3b98b6a0a3cc59568116a05 Author: Anusha Srivatsa Date: Wed Mar 26 23:29:19 2025 -0400 drm/panel/sharp-ls043t1le01: Use _multi variants Move away from using deprecated API and use _multi variants if available. Use mipi_dsi_msleep() and mipi_dsi_usleep_range() instead of msleep() and usleep_range() respectively. Used Coccinelle to find the _multi variant APIs,replacing mpi_dsi_msleep() where necessary and for returning dsi_ctx.accum_err in these functions. mipi_dsi_dcs_write() does not have a corresponding _multi() variant. Replacing it with mipi_dsi_dcs_write_seq_multi() instead. This change is manual. The Coccinelle script is the same as the one in commit c8ba07caaecc ("drm/panel/synaptics-r63353: Use _multi variants") v2: Use mipi_dsi_write_buffer_multi() in place of mipi_dsi_dcs_write(). (Dmitry) v3: add commit details where the same coccinelle script is used and remove the actual script from commit log. Use mipi_dsi_dcs_write_seq_multi() for mipi_dsi_dcs_write() (Doug) Cc: Maxime Ripard Cc: Dmitry Baryshkov Cc: Tejas Vipin Cc: Doug Anderson Signed-off-by: Anusha Srivatsa Reviewed-by: Neil Armstrong Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250326-b4-panel-ls043t1le01-v3-1-96c554c0ea2b@redhat.com Signed-off-by: Dmitry Baryshkov commit a53d987756eab40678f241d7cd0eb7e1ca42bba7 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:20 2025 +0530 drm/bridge: cdns-dsi: Move DSI mode check to _atomic_check() At present, the DSI mode configuration check happens during the _atomic_enable() phase, which is not really the best place for this. Moreover, if the mode is not valid, the driver gives a warning and continues the hardware configuration. Move the DSI mode configuration check to _atomic_check() instead, which can properly report back any invalid mode, before the _enable phase even begins. Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-10-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit bc36ee983fb34962a407c06196cc7874bf408146 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:19 2025 +0530 drm/bridge: cdns-dsi: Add input format negotiation Add support for the input format negotiation hook, that uses the helper drm_mipi_dsi_get_input_bus_fmt() for dsi hosts, to figure out the required input format. Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-9-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit e83967c355d6194c906e7bb3f1c72cb002e14c9d Author: Aradhya Bhatia Date: Sat Mar 29 17:09:18 2025 +0530 drm/mipi-dsi: Add helper to find input format Add a helper API that can be used by the DSI hosts to find the required input bus format for the given output dsi pixel format. Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-8-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit 7ad8b3441b8ebfc56b439a28328f78c755bbef29 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:17 2025 +0530 drm/bridge: cdns-dsi: Move to devm_drm_of_get_bridge() Instead of manually finding the next bridge/panel, and maintaining the panel-bridge (in-case the next entity is a panel), switch to using the automatically managing devm_drm_of_get_bridge() API. Drop the drm_panel support completely from the driver while at it. Reviewed-by: Tomi Valkeinen Reviewed-by: Dmitry Baryshkov Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-7-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit 47c03e6660e96cbba0239125b1d4a9db3c724b1d Author: Aradhya Bhatia Date: Sat Mar 29 17:09:16 2025 +0530 drm/bridge: cdns-dsi: Wait for Clk and Data Lanes to be ready Once the DSI Link and DSI Phy are initialized, the code needs to wait for Clk and Data Lanes to be ready, before continuing configuration. This is in accordance with the DSI Start-up procedure, found in the Technical Reference Manual of Texas Instrument's J721E SoC[0] which houses this DSI TX controller. If the previous bridge (or crtc/encoder) are configured pre-maturely, the input signal FIFO gets corrupt. This introduces a color-shift on the display. Allow the driver to wait for the clk and data lanes to get ready during DSI enable. [0]: See section 12.6.5.7.3 "Start-up Procedure" in J721E SoC TRM TRM Link: http://www.ti.com/lit/pdf/spruil1 Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver") Cc: stable@vger.kernel.org Tested-by: Dominik Haller Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-6-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit c6a7ef0d4856b9629df390e9935d7fd67fe39f81 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:15 2025 +0530 drm/bridge: cdns-dsi: Check return value when getting default PHY config Check for the return value of the phy_mipi_dphy_get_default_config() call, and in case of an error, return back the same. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: stable@vger.kernel.org Reviewed-by: Tomi Valkeinen Reviewed-by: Dmitry Baryshkov Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-5-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit 132bdcec399be6ae947582249a134b38cf56731c Author: Aradhya Bhatia Date: Sat Mar 29 17:09:14 2025 +0530 drm/bridge: cdns-dsi: Fix the clock variable for mode_valid() The crtc_* mode parameters do not get generated (duplicated in this case) from the regular parameters before the mode validation phase begins. The rest of the code conditionally uses the crtc_* parameters only during the bridge enable phase, but sticks to the regular parameters for mode validation. In this singular instance, however, the driver tries to use the crtc_clock parameter even during the mode validation, causing the validation to fail. Allow the D-Phy config checks to use mode->clock instead of mode->crtc_clock during mode_valid checks, like everywhere else in the driver. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: stable@vger.kernel.org Reviewed-by: Tomi Valkeinen Reviewed-by: Dmitry Baryshkov Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-4-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit fd2611c13f69cbbc6b81d9fc7502abf4f7031d21 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:13 2025 +0530 drm/bridge: cdns-dsi: Fix phy de-init and flag it so The driver code doesn't have a Phy de-initialization path as yet, and so it does not clear the phy_initialized flag while suspending. This is a problem because after resume the driver looks at this flag to determine if a Phy re-initialization is required or not. It is in fact required because the hardware is resuming from a suspend, but the driver does not carry out any re-initialization causing the D-Phy to not work at all. Call the counterparts of phy_init() and phy_power_on(), that are phy_exit() and phy_power_off(), from _bridge_post_disable(), and clear the flags so that the Phy can be initialized again when required. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: stable@vger.kernel.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-3-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit 688eb4d465484bc2a3471a6a6f06f833b58c7867 Author: Aradhya Bhatia Date: Sat Mar 29 17:09:12 2025 +0530 drm/bridge: cdns-dsi: Fix connecting to next bridge Fix the OF node pointer passed to the of_drm_find_bridge() call to find the next bridge in the display chain. The code to find the next panel (and create its panel-bridge) works fine, but to find the next (non-panel) bridge does not. To find the next bridge in the pipeline, we need to pass "np" - the OF node pointer of the next entity in the devicetree chain. Passing "of_node" to of_drm_find_bridge (which is what the code does currently) will fetch the bridge for the cdns-dsi which is not what's required. Fix that. Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver") Cc: stable@vger.kernel.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-2-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov commit e29c5d0e5dc35ed8b8920b573925d8aa2f8bafb0 Author: Uros Bizjak Date: Thu Mar 27 10:56:28 2025 +0100 x86/bitops: Simplify variable_ffz() as variable__ffs(~word) Find first zero (FFZ) can be implemented by negating the input and using find first set (FFS). Before/after code generation comparison on ffz()-using kernel code shows that code generation has not changed: # kernel/signal.o: text data bss dec hex filename 42121 3472 8 45601 b221 signal.o.before 42121 3472 8 45601 b221 signal.o.after md5: ce4c31e1bce96af19b62a5f9659842f1 signal.o.before.asm ce4c31e1bce96af19b62a5f9659842f1 signal.o.after.asm [ mingo: Added code generation check. ] Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250327095641.131483-1-ubizjak@gmail.com commit 4c4d9b7b6c6e676eca22585139aba5f03de74b90 Author: Christoph Rudorff Date: Tue Mar 25 13:44:36 2025 +0100 drm/nouveau: fix hibernate on disabled GPU Hibernate bricks the machine if a discrete GPU was disabled via echo IGD > /sys/kernel/debug/vgaswitcheroo/switch The freeze and thaw handler lacks checking the GPU power state, as suspend and resume do. This patch add the checks and fix this issue. Signed-off-by: Christoph Rudorff Signed-off-by: Lyude Paul Link: https://lore.kernel.org/r/20250325-nouveau-fix-hibernate-v2-1-2bd5c13fb953@rudorff.com commit ce22fccd0773834a0b27900395e7b4a329041b6b Author: John Harrison Date: Tue Mar 25 13:32:11 2025 -0700 drm/xe/guc: Re-word message about ADS size changes The error capture list in the ADS is initially allocated using a placeholder size. When the actual size is determinied later on, there is a debug print about the new size. However, the wording is such that some people see it as an unexpected thing and therefore a potential problem. So re-word it to be a little less concerning. Signed-off-by: John Harrison Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250325203211.3907890-1-John.C.Harrison@Intel.com commit c9092257506af4985c085103714c403812a5bdcb Author: Arnd Bergmann Date: Mon Mar 24 22:06:02 2025 +0100 drm/xe: avoid plain 64-bit division Building the xe driver for i386 results in a link time warning: x86_64-linux-ld: drivers/gpu/drm/xe/xe_migrate.o: in function `xe_migrate_vram': xe_migrate.c:(.text+0x1e15): undefined reference to `__udivdi3' Avoid this by using DIV_U64_ROUND_UP() instead of DIV_ROUND_UP(). The driver is unlikely to be used on 32=bit hardware, so the extra cost here is not too important. Fixes: 9c44fd5f6e8a ("drm/xe: Add migrate layer functions for SVM support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250324210612.2927194-1-arnd@kernel.org Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit af30b9a97452104e3e229bbfb445e2a1d679f672 Author: Dan Carpenter Date: Mon Mar 10 22:46:19 2025 +0300 drm/i915/gsc: delete a stray tab in intel_gsc_fw_get_binary_info() This line is indented on tab too far. Delete the extra tab. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/6152e1ac-745d-4b38-ba49-f013e6760936@stanley.mountain Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e486147c912f653ef4b60a6c7dbd4168a4c56a9f Author: Lizhi Hou Date: Tue Mar 25 13:01:05 2025 -0700 accel/amdxdna: Add BO import and export Add amdxdna_gem_prime_export() and amdxdna_gem_prime_import() for BO import and export. Register mmu notifier for imported BO as well. When MMU_NOTIFIER_UNMAP event is received, queue work to remove the notifier. The same BO could be mapped multiple times if it is exported and imported by an application. Use a link list to track VMAs the BO been mapped. v2: Rebased and call get_dma_buf() before dma_buf_attach() v3: Removed import_attach usage Reviewed-by: Jeff Hugo Signed-off-by: Lizhi Hou Link: https://lore.kernel.org/r/20250325200105.2744079-1-lizhi.hou@amd.com commit 66fb0dd2b1f96ff543ebfdbb9848bdcdbda826fc Author: John Harrison Date: Tue Mar 25 13:31:11 2025 -0700 drm/xe/guc: Reformat dead CT reason string to be devcoredump compatible The dump on a dead CT tries to emulate the devcoredump formatting (it would use devcoredump code directly but that requires more re-work to happen - work in progress). So update the print of the dead CT reason code to match the format of the 'reason' string that was added to the actual devcoredump a little while ago. Signed-off-by: John Harrison Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250325203111.3907426-1-John.C.Harrison@Intel.com commit 0b50eb7f3aa3d7cd67689aa4ea2d04f86cdf0eff Author: Gustavo A. R. Silva Date: Fri Mar 28 09:52:18 2025 -0600 drm/nouveau/outp: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/gpu/drm/nouveau/nvif/outp.c:199:45: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/Z-bFsmWjr5yZy6c6@kspp commit f945dd89fa8da3f662508165453dafdb4035d9d3 Author: Badal Nilawar Date: Thu Mar 27 21:49:14 2025 +0530 drm/xe/d3cold: Set power state to D3Cold during s2idle/s3 According to pci core guidelines, pci_save_config is recommended when the driver explicitly needs to set the pci power state. As of now xe kmd is only doing pci_save_config while entering to s2idle/s3 state, which makes pci core think that device driver has already applied required pci power state. This leads to GPU remain in D0 state. To fix the issue setting the pci power state to D3Cold. Fixes:dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rafael J. Wysocki Cc: Rodrigo Vivi Signed-off-by: Badal Nilawar Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20250327161914.432552-1-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit 8226bc5ac857ab681a3e81a7a6f7da46a447f3df Author: Gustavo A. R. Silva Date: Fri Mar 28 08:56:25 2025 -0600 drm/nouveau/conn: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with these changes, fix the following warning: drivers/gpu/drm/nouveau/nvif/conn.c:34:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/Z-a4meHAy-t58bcE@kspp commit 40780b9760b561e093508d07b8b9b06c94ab201e Author: Tejas Upadhyay Date: Thu Mar 27 17:56:47 2025 +0530 drm/xe/hw_engine: define sysfs_ops on all directories Sysfs_ops needs to be defined on all directories which can have attr files with set/get method. Add sysfs_ops to even those directories which is currently empty but would have attr files with set/get method in future. Leave .default with default sysfs_ops as it will never have setter method. V2(Himal/Rodrigo): - use single sysfs_ops for all dir and attr with set/get - add default ops as ./default does not need runtime pm at all Fixes: 3f0e14651ab0 ("drm/xe: Runtime PM wake on every sysfs call") Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20250327122647.886637-1-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay commit 61601771ee63d88a39d56b427bbd1c838cf1e792 Author: Jani Nikula Date: Tue Mar 25 14:36:38 2025 +0200 drm/i915/display: drop some unnecessary intel_de_* compatibility wrappers intel_de_wait_for_set(), intel_de_wait_for_clear(), intel_de_read_fw(), and intel_de_write_fw() are only passed struct intel_display. Remove the unnecessary compatibility wrappers. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/35589d84ee7996f8972ddb3ebc1aae1b53077b19.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 94fe5f275ae4411a59f5666d92312dca044a111e Author: Jani Nikula Date: Tue Mar 25 14:36:37 2025 +0200 drm/i915/wa: convert intel_display_wa.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_display_wa.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/821937f9fcdcb7d5516be0c48c2cee009936ecb8.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a2e1a10c47fb642f4af239f9b4e0be609a413ac7 Author: Jani Nikula Date: Tue Mar 25 14:36:36 2025 +0200 drm/i915/psr: further conversions to struct intel_display intel_psr.c still uses the old platform identification macros. Convert them and some other stragglers to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/7d032bd621a56536b4d53c5c415cad624e5dc628.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ad8bb3313d5123f743926678e4abc585494a4956 Author: Jani Nikula Date: Tue Mar 25 14:36:35 2025 +0200 drm/i915/crc: convert intel_pipe_crc.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_pipe_crc.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/9bb18395d57d5353535e0d385119366821162a86.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit fe11acc33154528027033051f02be133b356032f Author: Jani Nikula Date: Tue Mar 25 14:36:34 2025 +0200 drm/i915/ddi: convert intel_ddi.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_ddi.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/44aebcf93b2211e917b2ee725433b1f9b5e4e6f6.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f9f4ffa84252f677b4c3fd0c1c28a2fe4f4b7b59 Author: Jani Nikula Date: Tue Mar 25 14:36:33 2025 +0200 drm/i915/dpll: convert intel_dpll.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_dpll.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/16fe331ba51c269d6f9871d7b0a3b8df3c7b5342.1742906146.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c235b03145b97b8eb94af03e99740833e20c955d Author: Sk Anirban Date: Fri Mar 28 00:49:24 2025 +0530 drm/i915/selftests: Refactor RC6 power measurement and error handling Revise the power measurement logic to save and evaluate energy values. Previously, the test only checked whether the system had entered the RC6 state, without considering any potential interruptions in that state. This update introduces a threshold check to ensure that the GPU remains in the RC6 state properly during the specified sleep duration. v3: - Reorder threshold check (Badal) v4: - Improved commit message (Anshuman) v5: - Rename variables for improved readability (Anshuman) Signed-off-by: Sk Anirban Reviewed-by: Badal Nilawar Signed-off-by: Anshuman Gupta Link: https://lore.kernel.org/r/20250327191924.4131598-1-sk.anirban@intel.com commit d499effe1d55552ac701e90fbd17ca418b2189df Author: Aaron Ruby Date: Thu Mar 27 15:25:49 2025 +0000 drm/virtio: Add capset definitions to UAPI Since the context-type additions to the virtio-gpu spec, these have been defined locally in guest user-space, and virtio-gpu backend library code. Now, these capsets have been stabilized, and should be defined in a common space, in both the virtio_gpu header, and alongside the virtgpu_drm interface that they apply to. Reviewed-by: Gurchetan Singh Signed-off-by: Aaron Ruby Signed-off-by: Dmitry Osipenko [dmitry.osipenko@collabora.com: edit commit title] Link: https://patchwork.freedesktop.org/patch/msgid/YT3PR01MB5857E808EDF6949F2DF517FDAFA12@YT3PR01MB5857.CANPRD01.PROD.OUTLOOK.COM commit 32af900f2c6b1846fd3ede8ad36dd180d7e4ae70 Author: Julia Filipchuk Date: Tue Mar 25 15:43:05 2025 -0700 drm/xe/xe3lpg: Apply Wa_14022293748, Wa_22019794406 Extend Wa_14022293748, Wa_22019794406 to Xe3_LPG Signed-off-by: Julia Filipchuk Reviewed-by: Tejas Upadhyay Signed-off-by: John Harrison Link: https://lore.kernel.org/r/20250325224310.1455499-1-julia.filipchuk@intel.com commit 79ce49513222a89338e78bc7c7cb4a0fb4d6cb23 Author: Johan Hovold Date: Fri Mar 21 17:23:31 2025 +0100 wifi: ath12k: extend dma mask to 36 bits Extend the DMA mask to 36 bits to avoid using bounce buffers on machines without an iommu (under OS control) similar to what was done for ath11k in commit dbd73acb22d8 ("wifi: ath11k: enable 36 bit mask for stream DMA"). This specifically avoids using bounce buffers on Qualcomm Snapdragon X Elite machines like the Lenovo ThinkPad T14s when running at EL1. Note that the mask could possibly be extended further but unresolved DMA issues with 64 GiB X Elite machines currently prevents that from being tested. Also note that the driver is limited to 32 bits for coherent allocations and that there is no need to check for errors when setting masks larger than 32 bits. Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Johan Hovold Tested-by: Raj Kumar Bhagat Reviewed-by: Baochen Qiang Tested-by: Baochen Qiang Link: https://patch.msgid.link/20250321162331.19507-1-johan+linaro@kernel.org Signed-off-by: Jeff Johnson commit 2c4c3aff7362b09ec356bd9f3b7cf4a718307264 Author: P Praneesh Date: Mon Mar 24 11:55:18 2025 +0530 wifi: ath12k: add monitor interface support on QCN9274 Currently, the monitor interface is not supported. To support the monitor interface, configure the monitor vdev state identifier, configure the HTT filter setup, subscribe the mac80211 NO_VIRTUAL_MONITOR feature, remove the VIRTUAL_MONITOR handler procedures since align to NO_VIRTUAL_MONITOR feature and prevent monitor interface to transmit packet. Therefore, add these procedures to add monitor interface support and enable the monitor interface support on the QCN9274 platform through the hardware parameter. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Signed-off-by: Karthikeyan Periyasamy Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250324062518.2752822-11-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 7423b64191e325681e0198f4a8ccfe66f282b95a Author: Karthikeyan Periyasamy Date: Mon Mar 24 11:55:17 2025 +0530 wifi: ath12k: Move to NO_VIRTUAL monitor Currently, VIRTUAL monitor handling is present. In multi radio model, VIRTUAL monitor is not suitable since each radio needs a separate VIF and channel context. Therefore, switch to NO_VIRTUAL_MONITOR feature. Remove the monitor_conf_enabled flag and mac_op_config() handler as they are not need for the NO_VIRTUAL_MONITOR feature. In NO_VIRTUAL_MONITOR handling, each interface creation/deletion triggers the mac_op_add_interface() / mac_op_remove_interface() callback. Consequently, remove the monitor vdev create/delete/start/stop from the other vdev type handlers. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Karthikeyan Periyasamy Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250324062518.2752822-10-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 1dfa44db967c5c4f73ba5c9177aeaf2dddaff574 Author: Karthikeyan Periyasamy Date: Mon Mar 24 11:55:16 2025 +0530 wifi: ath12k: Refactor the monitor channel context procedure Currently, the monitor start procedure use the iteration callback to pick the last available channel definition in the mac80211 hardware. This approach is incorrect for the single wiphy model, as it holds multiple radio/link channel contexts within the same mac80211 hardware. To fix this, change the iteration callback to pick the specific channel context for the given radio/link. This approach makes the monitor start procedure compatible with both multi wiphy and single wiphy models. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-9-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit ea24531d00f782f4e659e8c74578b7ac144720ca Author: Karthikeyan Periyasamy Date: Mon Mar 24 11:55:15 2025 +0530 wifi: ath12k: fix NULL access in assign channel context handler Currently, when ath12k_mac_assign_vif_to_vdev() fails, the radio handle (ar) gets accessed from the link VIF handle (arvif) for debug logging, This is incorrect. In the fail scenario, radio handle is NULL. Fix the NULL access, avoid radio handle access by moving to the hardware debug logging helper function (ath12k_hw_warn). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 90570ba4610b ("wifi: ath12k: do not return invalid link id for scan link") Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-8-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit fc1771b9c59e284e72b4fd2e9e405cd220898c1a Author: P Praneesh Date: Mon Mar 24 11:55:14 2025 +0530 wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Currently, the packet offset and FCS length are fetched from the MSDU Rx TLV data, a logic inherited from ath11k. However, for ath12k 802.11be hardware, the Rx TLV will not be present in the MSDU data. Instead, this information is constant. Therefore, remove the existing FCS trim and the packet offset fetch code. Handle the packet offset with the constant in the merge MSDU procedure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-7-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 5393dcb4520911f2b4a980e7e3c2c0de2bbf9ec7 Author: P Praneesh Date: Mon Mar 24 11:55:13 2025 +0530 wifi: ath12k: change the status update in the monitor Rx Currently, in the monitor Rx path, status is filled from the RX TLV header present in the MSDU data. This logic is inherited from ath11k. However, in the ath12k 802.11be hardware, the Rx TLV header is not present in the MSDU data. This information is reported under various TLV tags. Therefore, avoid the existing status filling by accumulating the needed information in the PPDU information structure and fill the status. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-6-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 6a88093f79ea0b131e5feab9cdc045a007fad26e Author: Karthikeyan Periyasamy Date: Mon Mar 24 11:55:12 2025 +0530 wifi: ath12k: Replace band define G with GHZ where appropriate Currently, band define and enum are with the word 'G'. Replace it with more appropriate 'GHZ' for clarity and correctness. No functional changes. Only compile tested. Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-5-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit a6621bf6397ae6981b5041ba0a127e7dbeade746 Author: P Praneesh Date: Mon Mar 24 11:55:11 2025 +0530 wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Currently, error bitmap and decap format information are fetched from the MSDU Rx TLV data. This logic is inherited from ath11k. However, for ath12k 802.11be hardware, the Rx TLV will not be present in the MSDU data. Instead, this information is reported separately under the MSDU END TLV tag. Therefore, remove the existing fetch code, handle the MSDU END TLV tag and fetch the above information to store it in the mon_mpdu data structure for use in the merge MSDU procedure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-4-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 3973cda5ef496fd412fdec2c7c3403ac90e391b8 Author: P Praneesh Date: Mon Mar 24 11:55:10 2025 +0530 wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Currently, the monitor Rx parser handler is inherited from the ath11k. However, the ath12k 802.11be hardware does not report the Rx TLV header in the MSDU data. Instead, the hardware reports those TLVs under the following TLV tags: 1. Buffer address 2. MPDU start 3. MPDU end 4. MSDU end Therefore, add support for parsing the above TLVs in the Rx monitor path and use this information for MSDU buffer and status updates. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-3-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 2826139f9295821fe2b049318a1cc057ec003131 Author: Hari Chandrakanthan Date: Mon Mar 24 11:55:09 2025 +0530 wifi: ath12k: fix link valid field initialization in the monitor Rx Currently, the link_valid field is not initialized in the monitor Rx path. This can result in random values for the link_valid and link_id leads to undefined behaviour in mac80211. Therefore, initialize the link_valid field in the monitor Rx path. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Hari Chandrakanthan Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Karthikeyan Periyasamy Link: https://patch.msgid.link/20250324062518.2752822-2-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson commit 762b7e95362170b3e13a8704f38d5e47eca4ba74 Author: Matthew Brost Date: Tue Mar 11 11:29:15 2025 -0700 drm/xe: Use local fence in error path of xe_migrate_clear The intent of the error path in xe_migrate_clear is to wait on locally generated fence and then return. The code is waiting on m->fence which could be the local fence but this is only stable under the job mutex leading to a possible UAF. Fix code to wait on local fence. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250311182915.3606291-1-matthew.brost@intel.com commit 12468e519f98e4d93370712e3607fab61df9dae9 Author: Niranjana Vishwanathapura Date: Thu Mar 27 11:56:04 2025 -0700 drm/xe: Ensure fixed_slice_mode gets set after ccs_mode change The RCU_MODE_FIXED_SLICE_CCS_MODE setting is not getting invoked in the gt reset path after the ccs_mode setting by the user. Add it to engine register update list (in hw_engine_setup_default_state()) which ensures it gets set in the gt reset and engine reset paths. v2: Add register update to engine list to ensure it gets updated after engine reset also. Fixes: 0d97ecce16bd ("drm/xe: Enable Fixed CCS mode setting") Cc: stable@vger.kernel.org Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matt Roper Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20250327185604.18230-1-niranjana.vishwanathapura@intel.com commit c1031442d384eea6d53a1d1ec6791a2782afcdbc Author: Chen Ni Date: Wed Mar 12 17:01:32 2025 +0800 drm/bridge: anx7625: Remove redundant 'flush_workqueue()' calls 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Chen Ni Reviewed-by: Robert Foss Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250312090132.1624445-1-nichen@iscas.ac.cn commit 1ca3991f6400769427bf1a5ff55def328612a947 Author: William Tseng Date: Tue Mar 11 18:06:26 2025 +0800 drm/i915/dsi: let HW maintain the HS-TRAIL timing This change is to avoid over-specification of the TEOT timing parameter, which is derived from software in current design. Supposed that THS-TRAIL and THS-EXIT have the minimum values, i.e., 60 and 100 in ns. If SW is overriding the HW default, the TEOT value becomes 150 ns, approximately calculated by the following formula. DIV_ROUND_UP(60/50)*50 + DIV_ROUND_UP(100/50))*50/2, where 50 is LP Escape Clock time in ns. The TEOT value 150 ns is larger than the maximum value, around 136 ns if UI is 1.8ns, (105 ns + 12*UI, defined by MIPI DPHY specification). However, the TEOT value will meet the specification if THS-TRAIL is set to the HW default, instead of software overriding. The timing change is made for both data lane and clock lane. v1: initial version. v2: change clock lane dphy timings. v3: remove calculation of trail cnt. v4: rebase. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13891 Cc: Ville Syrjala Cc: Jani Nikula Cc: Vandita Kulkarni Cc: Lee Shawn C Cc: Cooper Chiou Signed-off-by: William Tseng Acked-by: Vandita Kulkarni Link: https://lore.kernel.org/r/20250311100626.533888-1-william.tseng@intel.com Signed-off-by: Jani Nikula commit 1822532477cb5f007313de4c70079c09aaa270d5 Author: Christopher Obbard Date: Tue Mar 25 19:21:26 2025 +0000 dt-bindings: display: panel: samsung,atna40yk20: document ATNA40YK20 The Samsung ATNA40YK20 panel is a 14" AMOLED eDP panel. It is similar to the ATNA33XC20 except that it is larger and has a different resolution. Signed-off-by: Christopher Obbard Acked-by: Krzysztof Kozlowski Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20250325-wip-obbardc-qcom-t14s-oled-panel-v2-1-e9bc7c9d30cc@linaro.org commit f8ae35071bfdbc0e992181d267d0de14ccbdb312 Author: Miguel Ojeda Date: Mon Mar 24 22:03:49 2025 +0100 drm/panic: add missing Markdown code span Add missing Markdown code span. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen") Signed-off-by: Miguel Ojeda Reviewed-by: Jocelyn Falempe Reviewed-by: Benno Lossin Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250324210359.1199574-3-ojeda@kernel.org commit 7e5f61c1bb26e7928a922702d581eaf0cb449609 Author: Miguel Ojeda Date: Mon Mar 24 22:03:48 2025 +0100 drm/panic: add missing space Add missing space in sentence. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen") Signed-off-by: Miguel Ojeda Reviewed-by: Jocelyn Falempe Reviewed-by: Benno Lossin Signed-off-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250324210359.1199574-2-ojeda@kernel.org commit b88f48f86500bc0b44b4f73ac66d500a40d320ad Author: Thomas Hellström Date: Wed Mar 26 16:16:34 2025 +0100 drm/xe: Fix an out-of-bounds shift when invalidating TLB When the size of the range invalidated is larger than rounddown_pow_of_two(ULONG_MAX), The function macro roundup_pow_of_two(length) will hit an out-of-bounds shift [1]. Use a full TLB invalidation for such cases. v2: - Use a define for the range size limit over which we use a full TLB invalidation. (Lucas) - Use a better calculation of the limit. [1]: [ 39.202421] ------------[ cut here ]------------ [ 39.202657] UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 [ 39.202673] shift exponent 64 is too large for 64-bit type 'long unsigned int' [ 39.202688] CPU: 8 UID: 0 PID: 3129 Comm: xe_exec_system_ Tainted: G U 6.14.0+ #10 [ 39.202690] Tainted: [U]=USER [ 39.202690] Hardware name: ASUS System Product Name/PRIME B560M-A AC, BIOS 2001 02/01/2023 [ 39.202691] Call Trace: [ 39.202692] [ 39.202695] dump_stack_lvl+0x6e/0xa0 [ 39.202699] ubsan_epilogue+0x5/0x30 [ 39.202701] __ubsan_handle_shift_out_of_bounds.cold+0x61/0xe6 [ 39.202705] xe_gt_tlb_invalidation_range.cold+0x1d/0x3a [xe] [ 39.202800] ? find_held_lock+0x2b/0x80 [ 39.202803] ? mark_held_locks+0x40/0x70 [ 39.202806] xe_svm_invalidate+0x459/0x700 [xe] [ 39.202897] drm_gpusvm_notifier_invalidate+0x4d/0x70 [drm_gpusvm] [ 39.202900] __mmu_notifier_release+0x1f5/0x270 [ 39.202905] exit_mmap+0x40e/0x450 [ 39.202912] __mmput+0x45/0x110 [ 39.202914] exit_mm+0xc5/0x130 [ 39.202916] do_exit+0x21c/0x500 [ 39.202918] ? lockdep_hardirqs_on_prepare+0xdb/0x190 [ 39.202920] do_group_exit+0x36/0xa0 [ 39.202922] get_signal+0x8f8/0x900 [ 39.202926] arch_do_signal_or_restart+0x35/0x100 [ 39.202930] syscall_exit_to_user_mode+0x1fc/0x290 [ 39.202932] do_syscall_64+0xa1/0x180 [ 39.202934] ? do_user_addr_fault+0x59f/0x8a0 [ 39.202937] ? lock_release+0xd2/0x2a0 [ 39.202939] ? do_user_addr_fault+0x5a9/0x8a0 [ 39.202942] ? trace_hardirqs_off+0x4b/0xc0 [ 39.202944] ? clear_bhb_loop+0x25/0x80 [ 39.202946] ? clear_bhb_loop+0x25/0x80 [ 39.202947] ? clear_bhb_loop+0x25/0x80 [ 39.202950] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 39.202952] RIP: 0033:0x7fa945e543e1 [ 39.202961] Code: Unable to access opcode bytes at 0x7fa945e543b7. [ 39.202962] RSP: 002b:00007ffca8fb4170 EFLAGS: 00000293 [ 39.202963] RAX: 000000000000003d RBX: 0000000000000000 RCX: 00007fa945e543e3 [ 39.202964] RDX: 0000000000000000 RSI: 00007ffca8fb41ac RDI: 00000000ffffffff [ 39.202964] RBP: 00007ffca8fb4190 R08: 0000000000000000 R09: 00007fa945f600a0 [ 39.202965] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 [ 39.202966] R13: 00007fa9460dd310 R14: 00007ffca8fb41ac R15: 0000000000000000 [ 39.202970] [ 39.202970] ---[ end trace ]--- Fixes: 332dd0116c82 ("drm/xe: Add range based TLB invalidations") Cc: Matthew Brost Cc: Rodrigo Vivi Cc: # v6.8+ Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi #v1 Link: https://lore.kernel.org/r/20250326151634.36916-1-thomas.hellstrom@linux.intel.com commit c045e03634ab677ef9351e9b350da78b5c9d7961 Author: Aradhya Bhatia Date: Wed Mar 26 20:49:29 2025 +0530 drm/xe/migrate: Switch from drm to dev managed actions Change the scope of the migrate subsystem to be dev managed instead of drm managed. The parent pci struct &device, that the xe struct &drm_device is a part of, gets removed when a hot unplug is triggered, which causes the underlying iommu group to get destroyed as well. The migrate subsystem, which handles the lifetime of the page-table tree (pt) BO, doesn't get a chance to keep the BO back during the hot unplug, as all the references to DRM haven't been put back. When all the references to DRM are indeed put back later, the migrate subsystem tries to put back the pt BO. Since the underlying iommu group has been already destroyed, a kernel NULL ptr dereference takes place while attempting to keep back the pt BO. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3914 Suggested-by: Thomas Hellstrom Reviewed-by: Tejas Upadhyay Signed-off-by: Aradhya Bhatia Link: https://patchwork.freedesktop.org/patch/msgid/20250326151929.1495972-1-aradhya.bhatia@intel.com Signed-off-by: Tejas Upadhyay commit 003802c3a732301ff9edd99fe410ee08efe5f157 Author: Saket Dumbre Date: Wed Mar 26 21:11:33 2025 +0100 ACPICA: Logfile: Changes for version 20241212 ACPICA commit 7dae72155bf06b0edda9f3aea713da1d48c1c418 Link: https://github.com/acpica/acpica/commit/7dae7215 Signed-off-by: Saket Dumbre Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/22641776.EfDdHjke4D@rjwysocki.net commit 4a0bb41df4d5d7666d01a7f118d21a7d1661be3c Author: Saket Dumbre Date: Wed Mar 26 21:10:39 2025 +0100 ACPICA: Fix warnings from PR #295 merge Possible loss of data from u32 to u8 conversions. ACPICA commit 1d7a0aa04793ff731da13f2070877ec7a9498571 Link: https://github.com/acpica/acpica/commit/1d7a0aa0 Signed-off-by: Saket Dumbre Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2304653.iZASKD2KPV@rjwysocki.net commit 6ff5c32881bf7681523d9f6cd619baec8cc82927 Author: Adam Lackorzynski Date: Wed Mar 26 21:09:53 2025 +0100 ACPICA: Fix typo in comments for SRAT structures ACPICA commit 218b5b3654b355e7481cbee8209f5212201b1196 Link: https://github.com/acpica/acpica/commit/218b5b36 Signed-off-by: Adam Lackorzynski Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/8507690.T7Z3S40VBb@rjwysocki.net commit 56b594fdb6dd68d085067a69f5f78171aa6f1657 Author: Zaid Alali Date: Wed Mar 26 21:08:46 2025 +0100 ACPICA: actbl1: Add EINJv2 get error type action ACPICA commit 6975cd07e20ba955556e1eafe8a326834c354ae6 Add EINJV2_GET_ERROR_TYPE as defined in the new specs(1)(2). Link: https://bugzilla.tianocore.org/show_bug.cgi?id=4615 (1) Link: https://bugzilla.tianocore.org/attachment.cgi?id=1446 (2) Link: https://github.com/acpica/acpica/commit/6975cd07 Signed-off-by: Zaid Alali Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3344273.aeNJFYEL58@rjwysocki.net commit 5d2f7e76b70121fe06fd12315a6ea439e3bf0414 Author: Zaid Alali Date: Wed Mar 26 21:07:57 2025 +0100 ACPICA: actbl1: Update values to hex to follow ACPI specs ACPICA commit 0b44ed75fb551bf3fbbbd39ca72bd932872fff20 ACPI specs(1) define Error Injection Actions in hex values. This commit intends to update values from decimal to hex to be consistent with ACPI specs. Link: https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html (1) Link: https://github.com/acpica/acpica/commit/0b44ed75 Signed-off-by: Zaid Alali Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/13729719.uLZWGnKmhe@rjwysocki.net commit a05cea36dc9ef76b4c6651a25214b9e2b742d212 Author: Saket Dumbre Date: Wed Mar 26 21:07:06 2025 +0100 ACPICA: New release 20240927 ACPICA commit 4632caf451c28da5355ab7131df8bef77818e0f4 Link: https://github.com/acpica/acpica/commit/4632caf4 Signed-off-by: Saket Dumbre Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/1918458.tdWV9SEqCh@rjwysocki.net commit bed18f0bdcd6737a938264a59d67923688696fc4 Author: Seunghun Han Date: Wed Mar 26 21:06:21 2025 +0100 ACPICA: fix acpi parse and parseext cache leaks ACPICA commit 8829e70e1360c81e7a5a901b5d4f48330e021ea5 I'm Seunghun Han, and I work for National Security Research Institute of South Korea. I have been doing a research on ACPI and found an ACPI cache leak in ACPI early abort cases. Boot log of ACPI cache leak is as follows: [ 0.352414] ACPI: Added _OSI(Module Device) [ 0.353182] ACPI: Added _OSI(Processor Device) [ 0.353182] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.353182] ACPI: Added _OSI(Processor Aggregator Device) [ 0.356028] ACPI: Unable to start the ACPI Interpreter [ 0.356799] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) [ 0.360215] kmem_cache_destroy Acpi-State: Slab cache still has objects [ 0.360648] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.12.0-rc4-next-20170608+ #10 [ 0.361273] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 [ 0.361873] Call Trace: [ 0.362243] ? dump_stack+0x5c/0x81 [ 0.362591] ? kmem_cache_destroy+0x1aa/0x1c0 [ 0.362944] ? acpi_sleep_proc_init+0x27/0x27 [ 0.363296] ? acpi_os_delete_cache+0xa/0x10 [ 0.363646] ? acpi_ut_delete_caches+0x6d/0x7b [ 0.364000] ? acpi_terminate+0xa/0x14 [ 0.364000] ? acpi_init+0x2af/0x34f [ 0.364000] ? __class_create+0x4c/0x80 [ 0.364000] ? video_setup+0x7f/0x7f [ 0.364000] ? acpi_sleep_proc_init+0x27/0x27 [ 0.364000] ? do_one_initcall+0x4e/0x1a0 [ 0.364000] ? kernel_init_freeable+0x189/0x20a [ 0.364000] ? rest_init+0xc0/0xc0 [ 0.364000] ? kernel_init+0xa/0x100 [ 0.364000] ? ret_from_fork+0x25/0x30 I analyzed this memory leak in detail. I found that “Acpi-State” cache and “Acpi-Parse” cache were merged because the size of cache objects was same slab cache size. I finally found “Acpi-Parse” cache and “Acpi-parse_ext” cache were leaked using SLAB_NEVER_MERGE flag in kmem_cache_create() function. Real ACPI cache leak point is as follows: [ 0.360101] ACPI: Added _OSI(Module Device) [ 0.360101] ACPI: Added _OSI(Processor Device) [ 0.360101] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.361043] ACPI: Added _OSI(Processor Aggregator Device) [ 0.364016] ACPI: Unable to start the ACPI Interpreter [ 0.365061] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) [ 0.368174] kmem_cache_destroy Acpi-Parse: Slab cache still has objects [ 0.369332] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.12.0-rc4-next-20170608+ #8 [ 0.371256] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 [ 0.372000] Call Trace: [ 0.372000] ? dump_stack+0x5c/0x81 [ 0.372000] ? kmem_cache_destroy+0x1aa/0x1c0 [ 0.372000] ? acpi_sleep_proc_init+0x27/0x27 [ 0.372000] ? acpi_os_delete_cache+0xa/0x10 [ 0.372000] ? acpi_ut_delete_caches+0x56/0x7b [ 0.372000] ? acpi_terminate+0xa/0x14 [ 0.372000] ? acpi_init+0x2af/0x34f [ 0.372000] ? __class_create+0x4c/0x80 [ 0.372000] ? video_setup+0x7f/0x7f [ 0.372000] ? acpi_sleep_proc_init+0x27/0x27 [ 0.372000] ? do_one_initcall+0x4e/0x1a0 [ 0.372000] ? kernel_init_freeable+0x189/0x20a [ 0.372000] ? rest_init+0xc0/0xc0 [ 0.372000] ? kernel_init+0xa/0x100 [ 0.372000] ? ret_from_fork+0x25/0x30 [ 0.388039] kmem_cache_destroy Acpi-parse_ext: Slab cache still has objects [ 0.389063] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.12.0-rc4-next-20170608+ #8 [ 0.390557] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 [ 0.392000] Call Trace: [ 0.392000] ? dump_stack+0x5c/0x81 [ 0.392000] ? kmem_cache_destroy+0x1aa/0x1c0 [ 0.392000] ? acpi_sleep_proc_init+0x27/0x27 [ 0.392000] ? acpi_os_delete_cache+0xa/0x10 [ 0.392000] ? acpi_ut_delete_caches+0x6d/0x7b [ 0.392000] ? acpi_terminate+0xa/0x14 [ 0.392000] ? acpi_init+0x2af/0x34f [ 0.392000] ? __class_create+0x4c/0x80 [ 0.392000] ? video_setup+0x7f/0x7f [ 0.392000] ? acpi_sleep_proc_init+0x27/0x27 [ 0.392000] ? do_one_initcall+0x4e/0x1a0 [ 0.392000] ? kernel_init_freeable+0x189/0x20a [ 0.392000] ? rest_init+0xc0/0xc0 [ 0.392000] ? kernel_init+0xa/0x100 [ 0.392000] ? ret_from_fork+0x25/0x30 When early abort is occurred due to invalid ACPI information, Linux kernel terminates ACPI by calling acpi_terminate() function. The function calls acpi_ut_delete_caches() function to delete local caches (acpi_gbl_namespace_ cache, state_cache, operand_cache, ps_node_cache, ps_node_ext_cache). But the deletion codes in acpi_ut_delete_caches() function only delete slab caches using kmem_cache_destroy() function, therefore the cache objects should be flushed before acpi_ut_delete_caches() function. "Acpi-Parse" cache and "Acpi-ParseExt" cache are used in an AML parse function, acpi_ps_parse_loop(). The function should complete all ops using acpi_ps_complete_final_op() when an error occurs due to invalid AML codes. However, the current implementation of acpi_ps_complete_final_op() does not complete all ops when it meets some errors and this cause cache leak. This cache leak has a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR. To fix ACPI cache leak for enhancing security, I made a patch to complete all ops unconditionally for acpi_ps_complete_final_op() function. I hope that this patch improves the security of Linux kernel. Thank you. Link: https://github.com/acpica/acpica/commit/8829e70e Signed-off-by: Seunghun Han Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2363774.ElGaqSPkdT@rjwysocki.net commit 156fd20a41e776bbf334bd5e45c4f78dfc90ce1c Author: Seunghun Han Date: Wed Mar 26 21:05:24 2025 +0100 ACPICA: fix acpi operand cache leak in dswstate.c ACPICA commit 987a3b5cf7175916e2a4b6ea5b8e70f830dfe732 I found an ACPI cache leak in ACPI early termination and boot continuing case. When early termination occurs due to malicious ACPI table, Linux kernel terminates ACPI function and continues to boot process. While kernel terminates ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak. Boot log of ACPI operand cache leak is as follows: >[ 0.585957] ACPI: Added _OSI(Module Device) >[ 0.587218] ACPI: Added _OSI(Processor Device) >[ 0.588530] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.589790] ACPI: Added _OSI(Processor Aggregator Device) >[ 0.591534] ACPI Error: Illegal I/O port address/length above 64K: C806E00000004002/0x2 (20170303/hwvalid-155) >[ 0.594351] ACPI Exception: AE_LIMIT, Unable to initialize fixed events (20170303/evevent-88) >[ 0.597858] ACPI: Unable to start the ACPI Interpreter >[ 0.599162] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) >[ 0.601836] kmem_cache_destroy Acpi-Operand: Slab cache still has objects >[ 0.603556] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 #26 >[ 0.605159] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 >[ 0.609177] Call Trace: >[ 0.610063] ? dump_stack+0x5c/0x81 >[ 0.611118] ? kmem_cache_destroy+0x1aa/0x1c0 >[ 0.612632] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.613906] ? acpi_os_delete_cache+0xa/0x10 >[ 0.617986] ? acpi_ut_delete_caches+0x3f/0x7b >[ 0.619293] ? acpi_terminate+0xa/0x14 >[ 0.620394] ? acpi_init+0x2af/0x34f >[ 0.621616] ? __class_create+0x4c/0x80 >[ 0.623412] ? video_setup+0x7f/0x7f >[ 0.624585] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.625861] ? do_one_initcall+0x4e/0x1a0 >[ 0.627513] ? kernel_init_freeable+0x19e/0x21f >[ 0.628972] ? rest_init+0x80/0x80 >[ 0.630043] ? kernel_init+0xa/0x100 >[ 0.631084] ? ret_from_fork+0x25/0x30 >[ 0.633343] vgaarb: loaded >[ 0.635036] EDAC MC: Ver: 3.0.0 >[ 0.638601] PCI: Probing PCI hardware >[ 0.639833] PCI host bridge to bus 0000:00 >[ 0.641031] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] > ... Continue to boot and log is omitted ... I analyzed this memory leak in detail and found acpi_ds_obj_stack_pop_and_ delete() function miscalculated the top of the stack. acpi_ds_obj_stack_push() function uses walk_state->operand_index for start position of the top, but acpi_ds_obj_stack_pop_and_delete() function considers index 0 for it. Therefore, this causes acpi operand memory leak. This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR. I made a patch to fix ACPI operand cache leak. Link: https://github.com/acpica/acpica/commit/987a3b5c Signed-off-by: Seunghun Han Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/4999480.31r3eYUQgx@rjwysocki.net commit e8b8b57783418d4c3b619d5f3e491a94115a6a83 Author: Huacai Chen Date: Mon Nov 11 21:21:49 2024 +0800 drm: Remove redundant statement in drm_crtc_helper_set_mode() Commit dbbfaf5f2641a ("drm: Remove bridge support from legacy helpers") removes the drm_bridge_mode_fixup() call in drm_crtc_helper_set_mode(), which makes the subsequent "encoder_funcs = encoder->helper_private" be redundant, so remove it. Signed-off-by: Huacai Chen Reviewed-by: Jani Nikula Link: https://lore.kernel.org/r/20241111132149.1113736-1-chenhuacai@loongson.cn Signed-off-by: Jani Nikula commit a600794afeb8529c1bf9243ff133a0525cdae9c6 Author: Boris Brezillon Date: Thu Mar 27 11:43:00 2025 +0100 accel/amdxdna: s/drm_gem_v[un]map_unlocked/drm_gem_v[un]map/ Commit 8f5c4871a014 ("drm/gem: Change locked/unlocked postfix of drm_gem_v/unmap() function names") dropped the _unlocked suffix, but accel drivers were left behind. Fixes: 8f5c4871a014 ("drm/gem: Change locked/unlocked postfix of drm_gem_v/unmap() function names") Signed-off-by: Boris Brezillon Cc: Dmitry Osipenko Cc: Min Ma Cc: Lizhi Hou Cc: Oded Gabbay Cc: dri-devel@lists.freedesktop.org Reviewed-by: Dmitry Osipenko Tested-by: Jani Nikula Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250327104300.1982058-3-boris.brezillon@collabora.com commit 835b14ce4ee3f69585d3fc718173b342a18f3ce3 Author: Boris Brezillon Date: Thu Mar 27 11:42:59 2025 +0100 accel/ivpu: s/drm_gem_shmem_v[un]map/drm_gem_shmem_v[un]map_locked/ Commit 954907f7147d ("drm/shmem-helper: Refactor locked/unlocked functions") suffixed drm_gem_shmem_v[un]map with _locked to reflect the fact these functions must be called with the GEM resv lock held, but accel drivers were left behind. Fixes: 954907f7147d ("drm/shmem-helper: Refactor locked/unlocked functions") Signed-off-by: Boris Brezillon Cc: Dmitry Osipenko Cc: Jacek Lawrynowicz Cc: Maciej Falkowski Cc: Oded Gabbay Cc: dri-devel@lists.freedesktop.org Reviewed-by: Dmitry Osipenko Tested-by: Jani Nikula Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250327104300.1982058-2-boris.brezillon@collabora.com commit d5d0daffccc2a1f40d90d241b53629af3a013557 Author: Boris Brezillon Date: Thu Mar 27 11:42:58 2025 +0100 accel/ivpu: pages_use_count is now a refcount_t Commit 051b6646d36d ("drm/shmem-helper: Use refcount_t for pages_use_count") changed the type of drm_gem_shmem_object::pages_use_count but accel drivers were left behind. Fixes: 051b6646d36d ("drm/shmem-helper: Use refcount_t for pages_use_count") Signed-off-by: Boris Brezillon Cc: Dmitry Osipenko Cc: Jacek Lawrynowicz Cc: Maciej Falkowski Cc: Oded Gabbay Cc: dri-devel@lists.freedesktop.org Reviewed-by: Dmitry Osipenko Tested-by: Jani Nikula Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250327104300.1982058-1-boris.brezillon@collabora.com commit b2d4b03b03a781f09148fa255baeccc3c3789ed2 Author: Thomas Hellström Date: Wed Mar 26 09:05:51 2025 +0100 drm/xe: Make the PT code handle placement per PTE rather than per vma / range With SVM, ranges forwarded to the PT code for binding can, mostly due to races when migrating, point to both VRAM and system / foreign device memory. Make the PT code able to handle that by checking, for each PTE set up, whether it points to local VRAM or to system memory. v2: - Fix system memory GPU atomic access. v3: - Avoid the UAPI change. It needs more thought. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250326080551.40201-6-thomas.hellstrom@linux.intel.com commit 4c2007540f2d89a3e708e884dda0df6975fd31bd Author: Thomas Hellström Date: Wed Mar 26 09:05:50 2025 +0100 drm/xe/migrate: Allow xe_migrate_vram() also on non-pagefault capable devices The drm_pagemap functionality does not depend on the device having recoverable pagefaults available. So allow xe_migrate_vram() also for such devices. Even if this will have little use in practice, it's beneficial for testin multi-device SVM, since a memory provider could be a non-pagefault capable gpu. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250326080551.40201-5-thomas.hellstrom@linux.intel.com commit 3cbb651117ff8a23ab22de595754e9d66b533ab9 Author: Thomas Hellström Date: Wed Mar 26 09:05:49 2025 +0100 drm/xe/bo: Add a bo remove callback On device unbind, migrate exported bos, including pagemap bos to system. This allows importers to take proper action without disruption. In particular, SVM clients on remote devices may continue as if nothing happened, and can chose a different placement. The evict_flags() placement is chosen in such a way that bos that aren't exported are purged. For pinned bos, we unmap DMA, but their pages are not freed yet since we can't be 100% sure they are not accessed. All pinned external bos (not just the VRAM ones) are put on the pinned.external list with this patch. But this only affects the xe_bo_pci_dev_remove_pinned() function since !VRAM bos are ignored by the suspend / resume functionality. As a follow-up we could look at removing the suspend / resume iteration over pinned external bos since we currently don't allow pinning external bos in VRAM, and other external bos don't need any special treatment at suspend / resume. v2: - Address review comments. (Matthew Auld). v3: - Don't introduce an external_evicted list (Matthew Auld) - Add a discussion around suspend / resume behaviour to the commit message. - Formatting fixes. v4: - Move dma-unmaps of pinned kernel bos to a dev managed callback to give subsystems using these bos a chance to clean them up. (Matthew Auld) Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20250326080551.40201-4-thomas.hellstrom@linux.intel.com commit c9db07cab766b665c8fa1184649cef452f448dc8 Author: Thomas Hellström Date: Wed Mar 26 09:05:48 2025 +0100 drm/xe/svm: Fix a potential bo UAF If drm_gpusvm_migrate_to_devmem() succeeds, if a cpu access happens to the range the bo may be freed before xe_bo_unlock(), causing a UAF. Since the reference is transferred, use xe_svm_devmem_release() to release the reference on drm_gpusvm_migrate_to_devmem() failure, and hold a local reference to protect the UAF. Fixes: 2f118c949160 ("drm/xe: Add SVM VRAM migration") Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250326080551.40201-3-thomas.hellstrom@linux.intel.com commit 6c55404d4f7306889eca9c333066bb4bdc2a4a7c Author: Thomas Hellström Date: Wed Mar 26 09:05:47 2025 +0100 drm/xe: Introduce CONFIG_DRM_XE_GPUSVM Don't rely on CONFIG_DRM_GPUSVM because other drivers may enable it causing us to compile in SVM support unintentionally. Also take the opportunity to leave more code out of compilation if !CONFIG_DRM_XE_GPUSVM and !CONFIG_DRM_XE_DEVMEM_MIRROR v3: - Fixes for compilation errors on 32-bit. This changes the Kconfig logic a bit. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250326080551.40201-2-thomas.hellstrom@linux.intel.com commit 0a4ae87706c6d15d14648e428c3a76351f823e48 Author: Badal Nilawar Date: Mon Mar 10 20:58:21 2025 +0530 drm/i915: Disable RPG during live selftest The Forcewake timeout issue has been observed on Gen 12.0 and above. To address this, disable Render Power-Gating (RPG) during live self-tests for these generations. The temporary workaround 'drm/i915/mtl: do not enable render power-gating on MTL' disables RPG globally, which is unnecessary since the issues were only seen during self-tests. v2: take runtime pm wakeref Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413 Fixes: 25e7976db86b ("drm/i915/mtl: do not enable render power-gating on MTL") Cc: Rodrigo Vivi Cc: Andi Shyti Cc: Andrzej Hajda Signed-off-by: Badal Nilawar Signed-off-by: Sk Anirban Reviewed-by: Karthik Poosa Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20250310152821.2931678-1-sk.anirban@intel.com commit cca9734ebe55f6af11ce8d57ca1afdc4d158c808 Author: Matt Roper Date: Tue Mar 25 15:47:10 2025 -0700 drm/xe/bmg: Add one additional PCI ID One additional BMG PCI ID has been added to the spec; make sure our driver recognizes devices with this ID properly. Bspec: 68090 Cc: stable@vger.kernel.org # v6.12+ Reviewed-by: Clint Taylor Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250325224709.4073080-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper commit e1fc39a923329c34c61dfed0665620d21826e8f4 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:08 2025 +0300 drm/shmem-helper: Use refcount_t for vmap_use_count Use refcount_t helper for vmap_use_count to make refcounting consistent with pages_use_count and pages_pin_count that use refcount_t. This also makes vmapping to benefit from the refcount_t's overflow checks. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-11-dmitry.osipenko@collabora.com commit 0271cc484f3f73d5c6f88d3e43a5d98e07c76381 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:07 2025 +0300 drm/shmem-helper: Switch drm_gem_shmem_vmap/vunmap to use pin/unpin The vmapped pages shall be pinned in memory and previously get/put_pages() were implicitly hard-pinning/unpinning the pages. This will no longer be the case with addition of memory shrinker because pages_use_count > 0 won't determine anymore whether pages are hard-pinned (they will be soft-pinned), while the new pages_pin_count will do the hard-pinning. Switch the vmap/vunmap() to use pin/unpin() functions in a preparation of addition of the memory shrinker support to drm-shmem. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-10-dmitry.osipenko@collabora.com commit 051b6646d36dc974c3884d75021bf282925b171c Author: Dmitry Osipenko Date: Sun Mar 23 00:26:06 2025 +0300 drm/shmem-helper: Use refcount_t for pages_use_count Use atomic refcount_t helper for pages_use_count to optimize pin/unpin functions by skipping reservation locking while GEM's pin refcount > 1. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-9-dmitry.osipenko@collabora.com commit d586b535f1448a6969e2b664e4e061c40bec4679 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:05 2025 +0300 drm/shmem-helper: Add and use pages_pin_count Add separate pages_pin_count for tracking of whether drm-shmem pages are moveable or not. With the addition of memory shrinker support to drm-shmem, the pages_use_count will no longer determine whether pages are hard-pinned in memory, but whether pages exist and are soft-pinned (and could be swapped out). The pages_pin_count > 1 will hard-pin pages in memory. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-8-dmitry.osipenko@collabora.com commit eab10538073c3ff9e21c857bd462f79f2f6f7e00 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:04 2025 +0300 drm/shmem-helper: Remove obsoleted is_iomem test Everything that uses the mapped buffer should be agnostic to is_iomem. The only reason for the is_iomem test is that we're setting shmem->vaddr to the returned map->vaddr. Now that the shmem->vaddr code is gone, remove the obsoleted is_iomem test to clean up the code. Acked-by: Maxime Ripard Suggested-by: Thomas Zimmermann Reviewed-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-7-dmitry.osipenko@collabora.com commit 954907f7147dc43e0d1cd4d430c21d143d5fdf55 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:03 2025 +0300 drm/shmem-helper: Refactor locked/unlocked functions Add locked and remove unlocked postfixes from drm-shmem function names, making names consistent with the drm/gem core code. Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-6-dmitry.osipenko@collabora.com commit 1d23391d7e0975c36c312321917f144846e239a5 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:02 2025 +0300 drm/shmem-helper: Make all exported symbols GPL Make all drm-shmem exported symbols GPL to make them consistent with the rest of drm-shmem symbols. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-5-dmitry.osipenko@collabora.com commit 5462dc8371486fe72129c7b1ad9386cf00679737 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:01 2025 +0300 drm/gem: Document locking rule of vmap and evict callbacks The vmap/vunmap/evict GEM callbacks are always invoked with a held GEM's reservation lock. Document this locking rule for clarity. Reviewed-by: Boris Brezillon Reviewed-by: Christian König Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-4-dmitry.osipenko@collabora.com commit 9a0fd089f08d059c1d9cc3f8ac6fc268e93ff6d7 Author: Dmitry Osipenko Date: Sun Mar 23 00:26:00 2025 +0300 drm/gem: Add _locked postfix to functions that have unlocked counterpart Add _locked postfix to drm_gem functions that have unlocked counterpart functions to make GEM functions naming more consistent and intuitive in regards to the locking requirements. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Reviewed-by: Christian König Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-3-dmitry.osipenko@collabora.com commit 8f5c4871a014cf31133476ffd2f117bffeaf6b60 Author: Dmitry Osipenko Date: Sun Mar 23 00:25:59 2025 +0300 drm/gem: Change locked/unlocked postfix of drm_gem_v/unmap() function names Make drm/gem API function names consistent by having locked function use the _locked postfix in the name, while the unlocked variants don't use the _unlocked postfix. Rename drm_gem_v/unmap() function names to make them consistent with the rest of the API functions. Acked-by: Maxime Ripard Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Reviewed-by: Christian König Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-2-dmitry.osipenko@collabora.com commit e417c5b196bbde4acac1fcad014fe9212d96f97d Author: Niravkumar L Rabara Date: Mon Jan 6 15:31:10 2025 +0800 arm64: dts: socfpga: agilex: Add dma channel id for spi Add DMA channel ids for spi0 and spi1 nodes in device tree. Signed-off-by: Niravkumar L Rabara Signed-off-by: Dinh Nguyen commit 17d321d4a05de2d678c2c6db2c9a9a639e3eaa41 Author: Niravkumar L Rabara Date: Tue Feb 18 09:01:06 2025 +0800 arm64: dts: socfpga: agilex5: add led and memory nodes Add LED and memory nodes, and enabled GPIO0 for Agilex5 devkit. Signed-off-by: Niravkumar L Rabara Signed-off-by: Dinh Nguyen commit 76f15cd968ed755052be297eaf7cfef924c5f24b Author: Matthew Gerlach Date: Wed Feb 26 10:54:51 2025 -0800 arm64: dts: intel: socfpga_agilex: add frequencies to internal oscillators Add clock-frequency property to the internal oscillators, cb_intosc_ls_clk and cb_intosc_hs_div2_clk. Signed-off-by: Matthew Gerlach Signed-off-by: Dinh Nguyen commit 144616a8088974477480ddf736897f5cacc4c0c7 Author: Uwe Kleine-König Date: Mon Feb 3 17:46:37 2025 +0100 ARM: dts: socfpga: Add basic support for Terrasic's de10-nano This dts is enough to make the board boot to Linux with the rootfs on a micro SD card. Signed-off-by: Uwe Kleine-König Signed-off-by: Dinh Nguyen commit 9e8a6b1902562294dbb66896b1f0c896ae10da9b Author: Uwe Kleine-König Date: Mon Feb 3 17:46:36 2025 +0100 dt-bindings: altera: Add compatible for Terasic's DE10-nano The Terasic DE10-nano development board features a Cyclone5 FPGA, USB, HDMI output and an Arduino compatible header. Signed-off-by: Uwe Kleine-König Acked-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit a63766f32d62cf3677429faf75f24539735fef1b Author: Niravkumar L Rabara Date: Wed Feb 5 18:11:53 2025 +0800 arm64: dts: socfpga: agilex5: add qspi flash node Add Micron qspi nor flash node for Intel SoCFPGA Agilex5. Signed-off-by: Niravkumar L Rabara Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit fbfb6498706241547c238d045182f4039a1df233 Author: Mahesh Rao Date: Tue Feb 4 20:58:06 2025 +0800 dt-bindings: firmware: stratix10: Convert to json-schema Convert intel,stratix10-svc service layer devicetree binding file from freeform format to json-schema. Also added DT binding for optional stratix10-soc FPGA manager child node. Signed-off-by: Mahesh Rao Acked-by: Conor Dooley Signed-off-by: Dinh Nguyen commit dd72b1ad9876f5dc807dac3237bbeadb74e05b87 Author: Mahesh Rao Date: Tue Feb 4 20:58:05 2025 +0800 dt-bindings: fpga: stratix10: Convert to json-schema Convert intel,stratix10-soc fpga manager devicetree binding file from freeform format to json-schema. Reviewed-by: Rob Herring (Arm) Signed-off-by: Mahesh Rao Signed-off-by: Dinh Nguyen commit a6c9896e65e555d679a4bc71c3cdfce6df4b2343 Author: Niravkumar L Rabara Date: Thu Feb 13 18:50:36 2025 +0800 arm64: dts: socfpga: agilex5: fix gpio0 address Use the correct gpio0 address for Agilex5. Fixes: 3f7c869e143a ("arm64: dts: socfpga: agilex5: Add gpio0 node and spi dma handshake id") Cc: stable@vger.kernel.org Signed-off-by: Niravkumar L Rabara Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit b76bca66ec3de25c3e700b7f5c37dc0c9de1e51a Author: Niravkumar L Rabara Date: Mon Feb 10 15:46:04 2025 +0800 arm64: dts: socfpga: agilex5: add NAND daughter board The Agilex5 devkit supports a separate NAND daughter card. The NAND daughter card replaces the SDMMC slot that is on the default daughter card thus requires a separate board dts file. Signed-off-by: Niravkumar L Rabara Acked-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit a6ad0ff60f488242dd460724f2c16de2b7ecf358 Author: Niravkumar L Rabara Date: Mon Feb 10 15:46:03 2025 +0800 dt-bindings: intel: document Agilex5 NAND daughter board Agilex5 devkit supports a separate NAND daughter board. Document Agilex5 NAND daughter board compatible. Signed-off-by: Niravkumar L Rabara Acked-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 6fe653f82402fafecb913375e74f386f52c10938 Author: Nakshtra Goyal Date: Thu Feb 27 15:53:39 2025 +0530 drm/xe: Add fault injection for xe_oa_alloc_regs Add fault injection for xe_oa_alloc_regs to allow it to fail while executing xe_oa_add_config_ioctl(). This need to be added as it cannot be reached by injecting error through IOCTL arguments. Signed-off-by: Nakshtra Goyal Reviewed-by: Francois Dugast Reviewed-by: Himal Prasad Ghimiray Link: https://lore.kernel.org/r/20250227102339.2859726-1-nakshtra.goyal@intel.com Signed-off-by: Himal Prasad Ghimiray commit 0717b1392dc7e3f350e5a5d25ea794aa92210684 Author: Uros Bizjak Date: Tue Mar 25 18:52:01 2025 +0100 x86/bitops: Use TZCNT mnemonic in Current minimum required version of binutils is 2.25, which supports TZCNT instruction mnemonic. Replace "REP; BSF" in variable__{ffs,ffz}() function with this proper mnemonic. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250325175215.330659-1-ubizjak@gmail.com commit e8828d7fdbb9241d44f9c403f5088e05b3da102c Author: Ville Syrjälä Date: Mon Mar 10 20:35:28 2025 +0200 drm/i915: Move intel_disable_shared_dpll() into ilk_pch_post_disable() On ILK-IVB only PCH outputs use shared dplls. Move the relevant intel_disable_shared_dpll() into ilk_pch_post_disable() to make that clear (and if we extend the dpll mgr to cover all plls we need different enable/disable points anyway for the PCH vs. CPU eDP cases). The intel_enable_shared_dpll() counterpart was already in ilk_pch_enable() anyway, so this is the more symmetric place for the disable as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250310183528.3203-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7ab420b966346067132b05be8196e67adc72e568 Author: Ville Syrjälä Date: Mon Mar 10 20:35:27 2025 +0200 drm/i915: Enable/disable shared dplls just the once for joined pipes Currently we loop over all joined pipes and enable/disable the shared dplls for each. We don't really have to do that since all joined pipes will be using the same dpll. So let's just do the enable/disable once for the whole set of joined pipes. We can still keep tracking the dpll active set as pipes as long as we remember to flip the bits for all the joined pipes on one go. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250310183528.3203-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2f9d51740cc30e0d2c8a23a55b1e20cf2513c250 Author: David Turner Date: Mon Mar 17 17:12:24 2025 +0000 drm/vc4: hdmi: Add jack detection to HDMI audio driver Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: Stefan Wahren Reviewed-by: Maxime Ripard Signed-off-by: David Turner Link: https://patchwork.freedesktop.org/patch/msgid/20250317-vc4_hotplug-v4-3-2af625629186@raspberrypi.com Signed-off-by: Dave Stevenson commit 34f051accedb642087fdcf19b3501fe150fbee49 Author: Stefan Wahren Date: Mon Mar 17 17:12:23 2025 +0000 drm/vc4: hdmi: Call HDMI hotplug helper on disconnect drm_atomic_helper_connector_hdmi_hotplug() must be called regardless of the connection status, otherwise the HDMI audio disconnect event won't be notified. Fixes: 2ea9ec5d2c20 ("drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug()") Suggested-by: Dmitry Baryshkov Signed-off-by: Stefan Wahren Reviewed-by: Maxime Ripard Signed-off-by: David Turner Link: https://patchwork.freedesktop.org/patch/msgid/20250317-vc4_hotplug-v4-2-2af625629186@raspberrypi.com Signed-off-by: Dave Stevenson commit 0b87bbbeaf023b70fa1e66b674e74ec5cb59d0c3 Author: David Turner Date: Mon Mar 17 17:12:22 2025 +0000 drm/display: Update comment on hdmi hotplug helper Update the comment on drm_atomic_helper_connector_hdmi_hotplug() to clarify that it must be called for all status updates. Signed-off-by: David Turner Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250317-vc4_hotplug-v4-1-2af625629186@raspberrypi.com Signed-off-by: Dave Stevenson commit e2b1dd430d3643842990589302c61c7d6ec4115e Author: Ankit Nautiyal Date: Mon Mar 24 19:02:46 2025 +0530 drm/i915/vrr: Set trans_vrr_ctl in intel_vrr_set_transcoder_timings() We now always set vrr.flipline, vmin, and vmax for all platforms that support VRR. Therefore, we should set all TRANS_VRR_CTL bits except VRR_ENABLE. Without this, the readback for these bits will fail because we only read vrr.flipline, vmin, and vmax if TRANS_VRR_CTL has the FLIPLINE_EN bit set. For platforms that always have the VRR Timing Generator enabled, the FLIPLINE_EN bit is always set in TRANS_VRR_CTL during intel_transcoder_vrr_enable(). However, for the remaining platforms (that do not always have the VRR Timing Generator enabled) if a full modeset doesn't occur and VRR is not enabled, the bit is not set. This results in a mismatch between the software state and hardware state because the software state expects VRR timings like flipline, vmin, and vmax to be set, but the readout for these doesn't happen since the FLIPLINE_EN bit is not set in TRANS_VRR_CTL. To avoid this mismatch, write trans_vrr_ctl in intel_vrr_set_transcoder_timings() even when VRR is not enabled for platforms that do not have the VRR Timing Generator always enabled. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-15-ankit.k.nautiyal@intel.com commit cfd51309f8c89594ceac7d084c1e4eb4fbf9f142 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:45 2025 +0530 drm/i915/vrr: Always use VRR timing generator for PTL+ Currently, the VRR timing generator is used only when VRR is enabled by userspace for sinks that support VRR. Starting with PTL+, gradually move away from the legacy timing generator and use the VRR timing generator for both variable and fixed timings. Note: For platforms where we always enable the VRR timing generator, the LRR fastset is not allowed to avoid live programming of vrr.guardband with VRR TG enabled. This effectively breaks the LRR fastset functionality for these platforms and needs to be addressed. v2: Use this for PTL for now to avoid losing LRR fastset for older platforms. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-14-ankit.k.nautiyal@intel.com commit 0ec46988ae6c5f3e6c4ccdf5e0abbc541b8d0680 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:44 2025 +0530 drm/i915/vrr: Allow fixed_rr with pipe joiner VRR with joiner is currently disabled as it still needs some work to correctly sequence the primary and secondary transcoders. However, we can still use VRR Timing generator in fixed refresh rate for joiner and since it just need to program vrr timings once and does not involve changing timings on the fly. We still need to skip the VRR and LRR for joiner. To achieve this set vrr.in_range to 0 for joiner case, so that we do not try VRR and LRR for the joiner case. v2: Avoid checks for secondary pipes, where not required. (Ville) v3: Remove a redundant check and reset vrr.in_range to false. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-13-ankit.k.nautiyal@intel.com commit 423f9d7c52235a7b63f5b03655a722ee3c1cdb24 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:43 2025 +0530 drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset block Since the vrr.guardband can now change for platforms that always use the VRR Timing Generator, and it is unsafe to reprogram the guardband on the fly, move the guardband and pipeline_full checks from the pure !fastboot path and add a check for intel_vrr_always_use_vrr_tg(). For older platforms the vrr.guardband change happens when VRR Timing generator is off. For the platforms that always use the VRR Timing Generator, this will prevent reprogramming the vrr.guardband without a full modeset. However, this will disrupt LRR functionality for these platforms. v2: Modify the check to avoid breaking the LRR on older platform. (Ville) v3: Correct the oversight of not removing the lines from the original location. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-12-ankit.k.nautiyal@intel.com commit 704bd24d010e1491bc63b738145be4827e235e22 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:42 2025 +0530 drm/i915/display: Use fixed rr timings in intel_set_transcoder_timings_lrr() Update the intel_set_transcoder_timings_lrr() function to use fixed refresh rate timings. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-11-ankit.k.nautiyal@intel.com commit dda7dcd9da73c5327aef42b89f0519bb51e84217 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:41 2025 +0530 drm/i915/vrr: Use fixed timings for platforms that support VRR For fixed refresh rate use fixed timings for all platforms that support VRR. For this add checks to avoid computing and reading VRR for platforms that do not support VRR. v2: Avoid touching check for VRR_CTL_FLIP_LINE_EN. (Ville) v3: Avoid redundant statements in vrr_{compute/get}_config. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-10-ankit.k.nautiyal@intel.com commit 7895991a29942b7843b14074e661830cb37e6e95 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:40 2025 +0530 drm/i915/display: Use fixed_rr timings in modeset sequence During modeset enable sequence, program the fixed timings, and turn on the VRR Timing Generator (VRR TG) for platforms that always use VRR TG. For this intel_vrr_set_transcoder now always programs fixed timings. Later if vrr timings are required, vrr_enable() will switch to the real VRR timings. For platforms that will always use VRR TG, the VRR_CTL Enable bit is set and reset in the transcoder enable/disable path. v2: Update intel_vrr_set_transcoder_timings for fixed_rr. v3: Update intel_set_transcoder_timings_lrr for fixed_rr. (Ville) v4: Have separate functions to enable/disable VRR CTL v5: -For platforms that do not always have VRRTG on, do write bits other than enable bit and also use write the TRANS_VRR_PUSH register. (Ville) -Avoid writing trans_ctl_vrr if !vrr_possible(). v6: -Disable VRR just before intel_ddi_disable_transcoder_func(). (Ville) -Correct the sequence of configuring PUSH and VRR Enable/Disable. (Ville) v7: Reset trans_vrr_ctl to 0 unconditionally in intel_vrr_transcoder_disable(). (Ville) v8: Reset trans_vrr_ctl if flipline is not set. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-9-ankit.k.nautiyal@intel.com commit 1d46cee7b6e4dad25c2621aa2a3ac325500ed620 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:39 2025 +0530 drm/i915/vrr: Set vrr.enable for VRR TG with fixed_rr For platforms that enable VRR TG only for variable timings, the VRR_CTL.VRR_ENABLE bit indicates VRR is active. For platforms that always have VRR TG enabled, the VRR_CTL.VRR_ENABLE bit indicates VRR is active only when not in fixed refresh rate mode. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-8-ankit.k.nautiyal@intel.com commit be7f2ef5355370d0659b40f5a425af0f310e369a Author: Ankit Nautiyal Date: Mon Mar 24 19:02:38 2025 +0530 drm/i915/vrr: Always set vrr vmax/vmin/flipline in vrr_{enable/disable} For platforms for which vrr timing generator is always set, VRR_CTL enable bit does not need to toggle, so modify the vrr_{enable/disable} for this. At the moment the helper intel_vrr_always_use_vrr_tg() return false for all cases. This will be set later when all other bits are in place. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-7-ankit.k.nautiyal@intel.com commit 660d1c6385b96c3985010589382c9c7849d4734c Author: Ankit Nautiyal Date: Mon Mar 24 19:02:37 2025 +0530 drm/i915/vrr: Refactor condition for computing vmax and LRR LRR and Vmax can be computed only if VRR is supported and vrr.in_range is set. Currently we proceed with vrr timings only for VRR supporting panels and return otherwise. For using VRR TG with fix timings, need to continue even for panels that do not support VRR. To achieve this, refactor the condition for computing vmax and update_lrr so that we can continue for fixed timings for panels that do not support VRR. v2: Set vmax = vmin for non VRR panels. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-6-ankit.k.nautiyal@intel.com commit 9c29a0dd8c6eae77f3d0addac78331d1a516dc39 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:36 2025 +0530 drm/i915/display: Move intel_psr_post_plane_update() at the later In intel_post_plane_update() there are things which might need to do vblank waits, so enabling PSR as early as we do now is simply counter-productive. Therefore move intel_psr_post_plane_update() at the last of intel_post_plane_update(). Signed-off-by: Ankit Nautiyal Suggested-by: Ville Syrjälä Reviewed-by: Jouni Högander Link: https://lore.kernel.org/r/20250324133248.4071909-5-ankit.k.nautiyal@intel.com commit 8b68938364b6fa528d5ae1cd2ffbcd95880bff19 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:35 2025 +0530 drm/i915/display: Disable PSR before disabling VRR As per bspec 49268: Disable PSR before disabling VRR. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-4-ankit.k.nautiyal@intel.com commit 5e25f996be596800c0d8ba0df46ffacd6cae9fc8 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:34 2025 +0530 drm/i915/dp_mst: Use VRR Timing generator for DP MST for fixed_rr Currently the variable timings are supported only for DP and eDP and not for DP MST. Call intel_vrr_compute_config() for MST which will configure fixed refresh rate timings irrespective of whether VRR is supported or not. Since vrr_capable still doesn't have support for DP MST this will be just treated as non VRR case and vrr.vmin/vmax/flipline will be all set to adjusted_mode->crtc_vtotal. This will help to move away from the legacy timing generator and always use VRR timing generator by default. With this change, we need to exclude MST in intel_vrr_is_capable for now, to avoid having LRR with MST. v2: Exclude MST in intel_vrr_is_capable() for now. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/20250324133248.4071909-3-ankit.k.nautiyal@intel.com commit 635125e3b4d5ec4be0a89d809f58879203930c03 Author: Ankit Nautiyal Date: Mon Mar 24 19:02:33 2025 +0530 drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr Currently VRR is not supported with HDMI, but we can still leverage the VRR Timing Generator to achieve a fixed refresh rate. Call intel_vrr_compute_config() for HDMI which will handle the vrr timings to have fixed refresh rate with VRR Timing Generator. v2: Improve commit message. (Ville). Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani (#v1) Link: https://lore.kernel.org/r/20250324133248.4071909-2-ankit.k.nautiyal@intel.com commit c0dd3f4f70918cbcdd8da611811036a91b7dce33 Author: Balamurugan S Date: Fri Mar 21 16:22:50 2025 +0530 wifi: ath12k: enable ath12k AHB support Currently only PCI devices are supported in Ath12k driver. Refactor Ath12k module_init and module_exit to include Ath12k AHB support. Add Ath12k AHB support in Kconfig with dependency on Remoteproc driver. Ath12k AHB support relies on remoteproc driver for firmware download, power up/down etc. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Co-developed-by: P Praneesh Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-13-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 881edc164071c2da3504b72fdc08ca8f1b915fdb Author: Sowmiya Sree Elavalagan Date: Fri Mar 21 16:22:49 2025 +0530 wifi: ath12k: Power down userPD Set the stop bit in SMEM to power down the userPD. Wait for stop-ack IRQ to indicate power down completion. Release the userPD firmware using its peripheral ID. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-12-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit c01d5cc9b9fe2673885db738ec8d2e01de169b92 Author: Sowmiya Sree Elavalagan Date: Fri Mar 21 16:22:48 2025 +0530 wifi: ath12k: Power up userPD UserPD firmware image is loaded and booted by ath12k driver. Get the userPD memory region from DTS and load the firmware for userPD from pre-defined path into io-remapped address of this region. Authenticate this image using pasid which is a peripheral ID. Set the spawn bit to instruct Q6 to spawn userPD thread. Wait for userPD to spawn which is indicated by spawn interrupt. Ready interrupt is triggered once the userPD is powered up completely. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-11-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit f73e089745a000b6eb99457f71b47dc862ab221a Author: Sowmiya Sree Elavalagan Date: Fri Mar 21 16:22:47 2025 +0530 wifi: ath12k: Register various userPD interrupts and save SMEM entries Q6 and ath12k driver communicates using SMEM and IRQs. Spawn interrupt is triggered once the userPD thread is spawned. Ready interrupts denotes userPD is completely powered up and ready. Stop-ack is to acknowledge the ath12k driver that userPD is stopped. Ath12k driver needs to set spawn bit in SMEM to instruct Q6 to spawn a userPD. Similarly stop bit is set when userPD needs to be stopped. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-10-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 10a355ba6238e13d196be2f226a59f7886d7b5bd Author: Sowmiya Sree Elavalagan Date: Fri Mar 21 16:22:46 2025 +0530 wifi: ath12k: Power up root PD Q6 processor acts as rootPD, other hardware like IPQ5332 which are attached to Q6 act as userPDs. WCSS driver handles loading and booting of rootPD, while the ath12k driver boots the userPD. Get the rproc handle from the DTS entry and boot the rootPD if it is not already powered on. Register to the rproc notifier to monitor the rproc state, this allows ath12k driver to know power up/down sequence of the rootPD. Power up the rootPD and wait for a power-up notification from the notifier callback before powering up the userPDs. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Reviewed-by: Vasanthakumar Thiagarajan Co-developed-by: Raj Kumar Bhagat Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-9-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 6cee30f0da751284662affaa0d7fc567cdd65f48 Author: Balamurugan S Date: Fri Mar 21 16:22:45 2025 +0530 wifi: ath12k: add AHB driver support for IPQ5332 Add Initial Ath12k AHB driver support for IPQ5332. IPQ5332 is AHB based IEEE802.11be 2 GHz 2x2 WiFi device. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Co-developed-by: P Praneesh Signed-off-by: P Praneesh Co-developed-by: Raj Kumar Bhagat Signed-off-by: Raj Kumar Bhagat Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-8-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 6757079c5890f7168a9bc111b2345209f05ae278 Author: Raj Kumar Bhagat Date: Fri Mar 21 16:22:44 2025 +0530 wifi: ath12k: add support for fixed QMI firmware memory IPQ5332 firmware supports only fixed QMI firmware memory. Hence, add support to read reserved fixed memory region from device-tree and provide the reserved memory segments for firmware to use during QMI firmware memory request. Note that the ability to set the fixed memory will be introduced in a subsequent patch. Currently, the flag remains unset by default, ensuring that existing chipsets are unaffected. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-7-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 12070392be0b39d5305a235401d3ff9f03fdba13 Author: Balamurugan S Date: Fri Mar 21 16:22:43 2025 +0530 wifi: ath12k: Add hw_params to remap CE register space for IPQ5332 For IPQ5332 CE register space is moved out of WCSS region and the space is not contiguous. Hence, add hardware params (ce_ie_addr & ce_remap) for IPQ5332. These parameters would be used by Ath12k AHB driver (in subsequent patches) to remap the CE registers to a new space for accessing them. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Co-developed-by: P Praneesh Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-6-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 11794f8540043c230ec4bf57ee1227e765ab52ab Author: Balamurugan S Date: Fri Mar 21 16:22:42 2025 +0530 wifi: ath12k: avoid m3 firmware download in AHB device IPQ5332 Current ath12k devices, QCN9274 and WCN7850, supports m3.bin firmware download through ath12k driver. The new ath12k AHB based device IPQ5332 supports m3 firmware download through remoteproc driver. Hence, add new parameter (fw.m3_loader) in ath12k_hw_params to avoid m3 firmware download in IPQ5332. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Co-developed-by: P Praneesh Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-5-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 5fa2fab69f59da8eaf9cbb53fd89727c750b14cf Author: Balamurugan S Date: Fri Mar 21 16:22:41 2025 +0530 wifi: ath12k: add ath12k_hw_params for IPQ5332 Add ath12k_hw_params for new ath12k AHB based WiFi device IPQ5332. Some hardware parameters like hw_ops, wmi_init & hal_ops are same between IPQ5332 and QCN9274, hence use these same parameters for IPQ5332. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Co-developed-by: P Praneesh Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-4-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 5257324583e32fd5bd6bbb6c82b4f5880b842f99 Author: P Praneesh Date: Fri Mar 21 16:22:40 2025 +0530 wifi: ath12k: refactor ath12k_hw_regs structure IPQ5332 device have different register address values for the below registers: HAL_TCL1_RING_BASE_LSB HAL_TCL1_RING_BASE_MSB HAL_TCL2_RING_BASE_LSB HAL_SEQ_WCSS_UMAC_CE0_SRC_REG HAL_SEQ_WCSS_UMAC_CE0_DST_REG HAL_SEQ_WCSS_UMAC_CE1_SRC_REG HAL_SEQ_WCSS_UMAC_CE1_DST_REG Hence, refactor ath12k_hw_regs structure to accommodate these changes in IPQ5332. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: P Praneesh Co-developed-by: Balamurugan S Signed-off-by: Balamurugan S Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-3-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 60031d9c3589c7983fd1deb4a4c0bebf0929890e Author: Balamurugan S Date: Fri Mar 21 16:22:39 2025 +0530 wifi: ath12k: fix incorrect CE addresses In the current ath12k implementation, the CE addresses CE_HOST_IE_ADDRESS and CE_HOST_IE_2_ADDRESS are incorrect. These values were inherited from ath11k, but ath12k does not currently use them. However, the Ath12k AHB support relies on these addresses. Therefore, correct the CE addresses for ath12k. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-2-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 94fcd39ca255758335ace05f70365f2126190ee0 Author: Raj Kumar Bhagat Date: Fri Mar 21 16:22:38 2025 +0530 dt-bindings: net: wireless: describe the ath12k AHB module for IPQ5332 Add device-tree bindings for the ATH12K module found in the IPQ5332 device. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Raj Kumar Bhagat Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-1-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson commit 5babdd45b737702e1563db317867594a12857eeb Author: Ville Syrjälä Date: Tue Feb 11 02:01:34 2025 +0200 drm/i915/gvt: Stop using intel_runtime_pm_put_unchecked() intel_runtime_pm_put_unchecked() is not meant to be used outside the runtime pm implementation, so don't. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250211000135.6096-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ce0779378c62758a0c503bf85e643c6d8f343703 Author: Baochen Qiang Date: Fri Mar 21 09:45:53 2025 +0800 wifi: ath12k: don't put ieee80211_chanctx_conf struct in ath12k_link_vif ieee80211_chanctx_conf struct is not put at the end of ath12k_link_vif. Note ieee80211_chanctx_conf has flexible array member inside it, causing below warning with GCC-14: drivers/net/wireless/ath/ath12k/core.h:298:39: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Although there is no issue for now since the array is not getting used, this should be fixed to avoid any potential data corruption issue in the future. Remove this struct from ath12k_link_vif, fetch it from ieee80211_bss_conf instead when needed. This change only applies to WCN7850, and should has no impact on other chipsets. This is an alternative to the solution proposed in [1]. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Reported-by: Gustavo A. R. Silva Closes: https://msgid.link/Z8-Snz86Xfwdlyd7@kspp # [1] Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250321-ath12k-dont-put-chanctx-in-arvif-v1-1-c8e93061952b@quicinc.com Signed-off-by: Jeff Johnson commit 95c4ea2e0329b370a53a041a19227f8da3f47481 Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:24 2025 +0200 drm/display: dp-tunnel: use new DCPD access helpers Switch drm_dp_tunnel.c to use new set of DPCD read / write helpers. Reviewed-by: Lyude Paul Acked-by: Jani Nikula Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-6-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 2554da0de3e8312c7149d03d702ddc6c1ff5e3de Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:23 2025 +0200 drm/display: dp-mst-topology: use new DCPD access helpers Switch drm_dp_mst_topology.c to use new set of DPCD read / write helpers. Reviewed-by: Lyude Paul Acked-by: Jani Nikula Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-5-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit 97f37939881327e118d6252289973c186377a075 Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:22 2025 +0200 drm/display: dp-cec: use new DCPD access helpers Switch drm_dp_cec.c to use new set of DPCD read / write helpers. Reviewed-by: Lyude Paul Acked-by: Jani Nikula Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-4-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit af67978ee37e543e62d6d3f7eba58f8f259423a7 Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:21 2025 +0200 drm/display: dp: use new DCPD access helpers Switch drm_dp_helper.c to use new set of DPCD read / write helpers. Reviewed-by: Lyude Paul Acked-by: Jani Nikula Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-3-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit fcbb93f1e48a150159534a1e6ec19e6fdf9196df Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:20 2025 +0200 drm/display: dp: change drm_dp_dpcd_read_link_status() return value drm_dp_dpcd_read_link_status() follows the "return error code or number of bytes read" protocol, with the code returning less bytes than requested in case of some errors. However most of the drivers interpreted that as "return error code in case of any error". Switch drm_dp_dpcd_read_link_status() to drm_dp_dpcd_read_data() and make it follow that protocol too. Acked-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-2-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit d8343e115658fb35115e0720f4761ffa0147329a Author: Dmitry Baryshkov Date: Mon Mar 24 13:51:19 2025 +0200 drm/display: dp: implement new access helpers Existing DPCD access functions return an error code or the number of bytes being read / write in case of partial access. However a lot of drivers either (incorrectly) ignore partial access or mishandle error codes. In other cases this results in a boilerplate code which compares returned value with the size. Implement new set of DPCD access helpers, which ignore partial access, always return 0 or an error code. Suggested-by: Jani Nikula Acked-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-1-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov commit bf6cb06c0e05ff6fb5bfab3e5d7c22e4617e23e0 Author: Riana Tauro Date: Tue Mar 11 12:47:59 2025 +0530 drm/xe/pf: Enable per-function engine activity stats Enable per-function engine activity stats when VF's are enabled and disable when VF's are disabled v2: fix commit message remove reset stats from pf config (Michal) Cc: Michal Wajdeczko Signed-off-by: Riana Tauro Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20250311071759.2117211-4-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit 8a4339fe2422a8080e45b76b4938827c807dcd52 Author: Riana Tauro Date: Tue Mar 11 12:47:58 2025 +0530 drm/xe/xe_pmu: Add PMU support for per-function engine activity stats Add PMU support for per-function engine activity stats. per-function engine activity is enabled when VF's are enabled. If 2 VF's are enabled, then the applicable function values are 0 - PF engine activity 1 - VF1 engine activity 2 - VF2 engine activity This can be read from perf tool as shown below ./perf stat -e xe_/engine-active-ticks,gt=0,engine_class=0, engine_instance=0,function=1/ -I 1000 v2: fix documentation (Umesh) remove global for functions (Lucas, Michal) v3: fix commit message move function_id checks to same place (Michal) v4: fix comment (Umesh) Cc: Michal Wajdeczko Signed-off-by: Riana Tauro Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20250311071759.2117211-3-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit 2de3f38fbf89d3cb96d1237aa7a10c0f6480f450 Author: Riana Tauro Date: Tue Mar 11 12:47:57 2025 +0530 drm/xe: Add support for per-function engine activity Add support for function level engine activity stats. Engine activity stats are enabled when VF's are enabled v2: remove unnecessary initialization move offset to improve code readability (Umesh) remove global for function engine activity (Lucas) v3: fix commit message (Michal) v4: remove enable function parameter fix kernel-doc (Umesh) Cc: Michal Wajdeczko Signed-off-by: Riana Tauro Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20250311071759.2117211-2-riana.tauro@intel.com Signed-off-by: Lucas De Marchi commit 79ec15a1e952f30fd8980f106d99d8fd42377676 Author: Ville Syrjälä Date: Fri Feb 7 23:54:06 2025 +0200 drm/i915: Replace the HAS_DDI() in intel_crtc_scanline_offset() with specific platform checks The HDMI vs. not scanline offset stuff no longer applies to the latest platforms, so using HAS_DDI() is a bit confusing. Replace with a more specific set of conditions. Also let's just deal with the platform types in the if ladder itself, and handle the HDMI vs. not within the specific branch for those platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250207215406.19348-4-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 9db49526b708a131c866e91238d99f18d25cef94 Author: Ville Syrjälä Date: Fri Feb 7 23:54:05 2025 +0200 drm/i915: Reverse the scanline_offset if ladder Make intel_crtc_scanline_offset() a bit less confusing by fully reordering the if ladder to use the new->old platform order. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250207215406.19348-3-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit fede97b72b957b46260ca98fc924ba2b916e50d7 Author: Ville Syrjälä Date: Fri Feb 7 23:54:04 2025 +0200 drm/i915: Fix scanline_offset for LNL+ and BMG+ Turns out LNL+ and BMG+ no longer have the weird extra scanline offset for HDMI outputs. Fix intel_crtc_scanline_offset() accordingly so that scanline evasion/etc. works correctly on HDMI outputs on these new platforms. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250207215406.19348-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 55d657da8e50adab2847fbff965eeac72f429388 Author: Imre Deak Date: Mon Mar 24 20:01:45 2025 +0200 drm/i915/dp_mst: Fix side-band message timeouts due to long PPS delays The Panel Power Sequencer lock held on an eDP port (a) blocks a DP AUX transfer on another port (b), since the PPS lock is device global, thus shared by all ports. The PPS lock can be held on port (a) for a longer period due to the various PPS delays (panel/backlight on/off, power-cycle delays). This in turn can cause an MST down-message request on port (b) time out, if the above PPS delay defers the handling of the reply to the request by more than 100ms: the MST branch device sending the reply (signaling this via the DP_DOWN_REP_MSG_RDY flag in the DP_DEVICE_SERVICE_IRQ_VECTOR DPCD register) may cancel the reply (clearing DP_DOWN_REP_MSG_RDY and the reply message buffer) after 110 ms, if the reply is not processed by that time. Avoid MST down-message timeouts described above, by locking the PPS state for AUX transfers only if this is actually required: on eDP ports, where the VDD power depends on the PPS state and on all DP and eDP ports on VLV/CHV, where the PPS is a pipe instance and hence a modeset on any port possibly affecting the PPS state. v2: Don't move PPS locking/VDD enabling to a separate function. (Jani) Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250324180145.142884-3-imre.deak@intel.com commit 88f931ceb457903e72778e1bca06f3a37c584a7e Author: Imre Deak Date: Mon Mar 24 20:01:44 2025 +0200 drm/i915/pps: Let calling intel_pps_vdd_{on, off}_unlocked() w/o PPS lock held After a follow-up change on non-eDP outputs intel_pps_vdd_{on,off}_unlocked() can be called without the PPS lock held, allow for this. Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20250324180145.142884-2-imre.deak@intel.com commit 3d66af75b08609281cbd7b71d40bbb9829c88764 Author: David Woodhouse Date: Fri Mar 14 17:27:34 2025 +0000 x86/kexec: Debugging support: Dump registers on exception The actual serial output function is a no-op for now. Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Link: https://lore.kernel.org/r/20250314173226.3062535-3-dwmw2@infradead.org commit 8df505af7fefe34573fdd1eacdd2b3381349c45c Author: David Woodhouse Date: Fri Mar 14 17:27:33 2025 +0000 x86/kexec: Debugging support: Load an IDT and basic exception entry points [ mingo: Minor readability edits ] Signed-off-by: David Woodhouse Signed-off-by: Ingo Molnar Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Kees Cook Link: https://lore.kernel.org/r/20250314173226.3062535-2-dwmw2@infradead.org commit 1bb2864b71ed3cf411e1b612af7a06dda45674ff Author: Vignesh Raman Date: Fri Mar 14 14:28:52 2025 +0530 drm/ci: arm64.config: mediatek: enable PHY drivers The mediatek display driver fails to probe on mt8173-elm-hana and mt8183-kukui-jacuzzi-juniper-sku16 in v6.14-rc4 due to missing PHY configurations. Enable the following PHY drivers for MediaTek platforms: - CONFIG_PHY_MTK_HDMI=y for HDMI display - CONFIG_PHY_MTK_MIPI_DSI=y for DSI display Signed-off-by: Vignesh Raman Acked-by: Helen Koike Link: https://lore.kernel.org/r/20250314085858.39328-4-vignesh.raman@collabora.com commit 8be48c4f0cca68297676395d43420867be023056 Author: Vignesh Raman Date: Fri Mar 14 14:28:51 2025 +0530 drm/ci: uprev IGT Uprev IGT to the latest version and update expectation files. Signed-off-by: Vignesh Raman Acked-by: Helen Koike Link: https://lore.kernel.org/r/20250314085858.39328-3-vignesh.raman@collabora.com commit a8bd38e04a05fef74fb7644ed389662e59a18cd7 Author: Vignesh Raman Date: Fri Mar 14 14:28:50 2025 +0530 drm/ci: uprev mesa LAVA was recently patched [1] with a fix on how parameters are parsed in `lava-test-case`, so we don't need to repeat quotes to send the arguments properly to it. Uprev mesa to fix this issue. [1] https://gitlab.com/lava/lava/-/commit/18c9cf79 Signed-off-by: Vignesh Raman Acked-by: Helen Koike Acked-by: Daniel Stone Link: https://lore.kernel.org/r/20250314085858.39328-2-vignesh.raman@collabora.com commit f2d7e9ba184f79521c83bd8199b7baee7a557ee8 Author: Maarten Lankhorst Date: Thu Mar 20 22:15:18 2025 +0100 drm/xe: Remove extra spaces in xe_vm.c There are extra spaces in xe_vm_bind_ioctl_validate_bo(), remove those. Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250320211519.632432-1-dev@lankhorst.se Signed-off-by: Maarten Lankhorst commit 93e7a4c7167e537889dcb81797a0a87bd42f5eaa Author: Jani Nikula Date: Fri Mar 21 12:52:56 2025 +0200 drm/i915/pch: convert intel_pch_refclk.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_pch_refclk.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/1bf35f05dc921e0ca548b0d0d8d7f5b7098e8140.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ca2f596a6705f740acaf6fd508c2f2fe3ff279e5 Author: Jani Nikula Date: Fri Mar 21 12:52:55 2025 +0200 drm/i915/pch: convert intel_pch_display.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_pch_display.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/0341f0c14a4770cfd41708200cd6c5416b8a17b9.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e94feeb2087935a553edcb28aeceb700571b6da4 Author: Jani Nikula Date: Fri Mar 21 12:52:54 2025 +0200 drm/i915/display: convert intel_crtc_state_dump.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_crtc_state_dump.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/b0d7c61f40e26e8d74de2217963d333fe8c304c4.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0a9231901eef98fb7ad65d656f1008fb28d0995c Author: Jani Nikula Date: Fri Mar 21 12:52:53 2025 +0200 drm/i915/atomic: convert intel_atomic.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_atomic.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/7ef6fe795e4e5c26ae0d546e57f64f494aaf56fc.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 744edb461bc50cb2d2e8c31d2df5186afef2f711 Author: Jani Nikula Date: Fri Mar 21 12:52:52 2025 +0200 drm/i915/tc: convert intel_tc.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_tc.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/bbff21269f348ac72eb749b6cf3f692234bed9f2.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5e4098f706dd9e5b6a58d65093b9d52cd29dbdf8 Author: Jani Nikula Date: Fri Mar 21 12:52:51 2025 +0200 drm/i915/lvds: convert intel_lvds.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_lvds.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/2b5205db60f956dba788cc894531cc74d0dd853d.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 87ec114e09a9b7c845612ebea6076e9a7267f4e4 Author: Jani Nikula Date: Fri Mar 21 12:52:50 2025 +0200 drm/i915/dvo: convert intel_dvo.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_dvo.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/a78b5c8d0030957523eb467401b06e2d290cf14d.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1767a751509451910df53a4f4f51d5865ebec7eb Author: Jani Nikula Date: Fri Mar 21 12:52:49 2025 +0200 drm/i915/dsi: convert intel_dsi_dcs_backlight.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert intel_dsi_dcs_backlight.c to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/19ed78f51ac153016fbe60c49037bef840a9cc1b.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit bf5169db50c0edbdbc4528cb52c4741304219f3d Author: Jani Nikula Date: Fri Mar 21 12:52:48 2025 +0200 drm/i915/dsi: convert intel_dsi_vbt.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_dsi_vbt.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/d2a327c7121263cd67986a2d9199e18d7bf03acd.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 70c716349a5c29ba1ada1f6945a68e93c4ab6afc Author: Jani Nikula Date: Fri Mar 21 12:52:47 2025 +0200 drm/i915/dsi: convert parameter printing to drm_printer The DSI VBT initialization debug logs a lot of parameters. Convert this to use struct drm_printer with a prefix. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/50ff85e66c058a12b2fe0d0cba6a542f7cfa71cf.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 767efb276ea80af8a71a8be9cfd8e668d8720a98 Author: Jani Nikula Date: Fri Mar 21 12:52:46 2025 +0200 drm/i915/dsi: convert vlv_dsi_pll.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of vlv_dsi_pll.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/9d34d8b91c6bc8b2dd8e2081194ee496b251bbf3.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 77ba0b8562251f44bdc4002813d976dfb3c0a387 Author: Jani Nikula Date: Fri Mar 21 12:52:45 2025 +0200 drm/i915/dsi: convert vlv_dsi.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of vlv_dsi.[ch] to struct intel_display. Reviewed-by: Ville Syrjälä Link: https://lore.kernel.org/r/320449f3b58c6eca6fdbb16e4e819cd0e133887a.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0dd09e215a391805130338688586805fe8bf2b32 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:24 2025 +0100 x86/cacheinfo: Apply maintainer-tip coding style fixes The x86/cacheinfo code has been heavily refactored and fleshed out at parent commits, where any necessary coding style fixes were also done in place. Apply Documentation/process/maintainer-tip.rst coding style fixes to the rest of the code, and align its assignment expressions for readability. Standardize on CPUID(n) when mentioning leaf queries. Avoid breaking long lines when doing so helps readability. At cacheinfo_amd_init_llc_id(), rename variable 'msb' to 'index_msb' as this is how it's called at the rest of cacheinfo.c code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-30-darwi@linutronix.de commit 6c963c42fc19d7c9ae9582ab75c3476d1752d979 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:23 2025 +0100 x86/cacheinfo: Introduce cpuid_amd_hygon_has_l3_cache() Multiple code paths at cacheinfo.c and amd_nb.c check for AMD/Hygon CPUs L3 cache presensce by directly checking leaf 0x80000006 EDX output. Extract that logic into its own function. While at it, rework the AMD/Hygon LLC topology ID caclculation comments for clarity. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-29-darwi@linutronix.de commit eeeebc4fc642f492522e4be92dcaf22119123581 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:22 2025 +0100 x86/cacheinfo: Relocate CPUID leaf 0x4 cache_type mapping The cache_type_map[] array is used to map Intel leaf 0x4 cache_type values to their corresponding types at . Move that array's definition after the actual CPUID leaf 0x4 structures, instead of having it in the middle of AMD leaf 0x4 emulation code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-28-darwi@linutronix.de commit 05d48035e5f69cfe3c125b2bac47e4003b4acccf Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:21 2025 +0100 x86/cacheinfo: Extract out cache self-snoop checks The logic of not doing a cache flush if the CPU declares cache self snooping support is repeated across the x86/cacheinfo code. Extract it into its own function. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-27-darwi@linutronix.de commit fda5f817ae41035db9e36854600525145688b35e Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:20 2025 +0100 x86/cacheinfo: Extract out cache level topology ID calculation For Intel CPUID leaf 0x4 parsing, refactor the cache level topology ID calculation code into its own method instead of repeating the same logic twice for L2 and L3. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-26-darwi@linutronix.de commit 66122616e212f1b9fee7d03582a5fdab2e8ed0e4 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:19 2025 +0100 x86/cacheinfo: Separate Intel CPUID leaf 0x4 handling init_intel_cacheinfo() was overly complex. It parsed leaf 0x4 data, leaf 0x2 data, and performed post-processing, all within one function. Parent commit moved leaf 0x2 parsing and the post-processing logic into their own functions. Continue the refactoring by extracting leaf 0x4 parsing into its own function. Initialize local L2/L3 topology ID variables to BAD_APICID by default, thus ensuring they can be used unconditionally. Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-25-darwi@linutronix.de commit 5adfd367589cf9bb984aabfab74107bcf4402fde Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:18 2025 +0100 x86/cacheinfo: Separate CPUID leaf 0x2 handling and post-processing logic The logic of init_intel_cacheinfo() is quite convoluted: it mixes leaf 0x4 parsing, leaf 0x2 parsing, plus some post-processing, in a single place. Begin simplifying its logic by extracting the leaf 0x2 parsing code, and the post-processing logic, into their own functions. While at it, rework the SMT LLC topology ID comment for clarity. Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-24-darwi@linutronix.de commit 4772304ee651b952fd098ec80a8298af9905743f Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:17 2025 +0100 x86/cpu: Use consolidated CPUID leaf 0x2 descriptor table CPUID leaf 0x2 output is a stream of one-byte descriptors, each implying certain details about the CPU's cache and TLB entries. At previous commits, the mapping tables for such descriptors were merged into one consolidated table. The mapping was also transformed into a hash lookup instead of a loop-based lookup for each descriptor. Use the new consolidated table and its hash-based lookup through the for_each_leaf_0x2_tlb_entry() accessor. Remove the TLB-specific mapping, intel_tlb_table[], as it is now no longer used. Remove the macro, for_each_leaf_0x2_desc(), since the converted code was its last user. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-23-darwi@linutronix.de commit da23a6259844b576d98ad5c633eb437d3a2d90d3 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:16 2025 +0100 x86/cacheinfo: Use consolidated CPUID leaf 0x2 descriptor table CPUID leaf 0x2 output is a stream of one-byte descriptors, each implying certain details about the CPU's cache and TLB entries. At previous commits, the mapping tables for such descriptors were merged into one consolidated table. The mapping was also transformed into a hash lookup instead of a loop-based lookup for each descriptor. Use the new consolidated table and its hash-based lookup through the for_each_leaf_0x2_tlb_entry() accessor. Remove the old cache-specific mapping, cache_table[], as it is no longer used. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-22-darwi@linutronix.de commit 37aedb806bc68ff23bd0d90dce1564bfb0dca911 Author: Thomas Gleixner Date: Mon Mar 24 14:33:15 2025 +0100 x86/cpu: Consolidate CPUID leaf 0x2 tables CPUID leaf 0x2 describes TLBs and caches. So there are two tables with the respective descriptor constants in intel.c and cacheinfo.c. The tables occupy almost 600 byte and require a loop based lookup for each variant. Combining them into one table occupies exactly 1k rodata and allows to get rid of the loop based lookup by just using the descriptor byte provided by CPUID leaf 0x2 as index into the table, which simplifies the code and reduces text size. The conversion of the intel.c and cacheinfo.c code is done separately. [ darwi: Actually define struct leaf_0x2_table. Tab-align all of cpuid_0x2_table[] mapping entries. Define needed SZ_* macros at instead (merged commit.) Use CACHE_L1_{INST,DATA} as names for L1 cache descriptor types. Set descriptor 0x63 type as TLB_DATA_1G_2M_4M and explain why. Use enums for cache and TLB descriptor types (parent commits.) Start enum types at 1 since type 0 is reserved for unknown descriptors. Ensure that cache and TLB enum type values do not intersect. Add leaf 0x2 table accessor for_each_leaf_0x2_entry() + documentation. ] Co-developed-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-21-darwi@linutronix.de commit 543904cdfe1eb53ff4267f561a4d59cb1fe6ceb7 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:14 2025 +0100 x86/cpu: Use enums for TLB descriptor types The leaf 0x2 one-byte TLB descriptor types: TLB_INST_4K TLB_INST_4M TLB_INST_2M_4M ... are just discriminators to be used within the intel_tlb_table[] mapping. Their specific values are irrelevant. Use enums for such types. Make the enum packed and static assert that its values remain within a single byte so that the intel_tlb_table[] size do not go out of hand. Use a __CHECKER__ guard for the static_assert(sizeof(enum) == 1) line as sparse ignores the __packed annotation on enums. This is similar to: fe3944fb245a ("fs: Move enum rw_hint into a new header file") for the core SCSI code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/Z9rsTirs9lLfEPD9@lx-t490 Link: https://lore.kernel.org/r/20250324133324.23458-20-darwi@linutronix.de commit e1e6b57146554a321d0ed1e76d2839ac24117f26 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:13 2025 +0100 x86/cacheinfo: Use enums for cache descriptor types The leaf 0x2 one-byte cache descriptor types: CACHE_L1_INST CACHE_L1_DATA CACHE_L2 CACHE_L3 are just discriminators to be used within the cache_table[] mapping. Their specific values are irrelevant. Use enums for such types. Make the enum packed and static assert that its values remain within a single byte so that the cache_table[] array size do not go out of hand. Use a __CHECKER__ guard for the static_assert(sizeof(enum) == 1) line as sparse ignores the __packed annotation on enums. This is similar to: fe3944fb245a ("fs: Move enum rw_hint into a new header file") for the core SCSI code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/Z9rsTirs9lLfEPD9@lx-t490 Link: https://lore.kernel.org/r/20250324133324.23458-19-darwi@linutronix.de commit 7596ab7a107bf70d571d75ad6ae078127f5ea11b Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:12 2025 +0100 x86/cacheinfo: Clarify type markers for CPUID leaf 0x2 cache descriptors CPUID leaf 0x2 output is a stream of one-byte descriptors, each implying certain details about the CPU's cache and TLB entries. Two separate tables exist for interpreting these descriptors: one for TLBs at intel.c and one for caches at cacheinfo.c. These mapping tables will be merged in further commits, among other improvements to their model. In preparation for this, use more descriptive type names for the leaf 0x2 descriptors associated with cpu caches. Namely: LVL_1_INST => CACHE_L1_INST LVL_1_DATA => CACHE_L1_DATA LVL_2 => CACHE_L2 LVL_3 => CACHE_L3 After the TLB and cache descriptors mapping tables are merged, this will make it clear that such descriptors correspond to cpu caches. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-18-darwi@linutronix.de commit eb1c7c08c5a8155d0d2d0a6c7fd741039b7287f1 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:11 2025 +0100 x86/cacheinfo: Rename 'struct _cpuid4_info_regs' to 'struct _cpuid4_info' Parent commits decoupled amd_northbridge from _cpuid4_info_regs, moved AMD L3 northbridge cache_disable_0/1 sysfs code to its own file, and splitted AMD vs. Intel leaf 0x4 handling into: amd_fill_cpuid4_info() intel_fill_cpuid4_info() fill_cpuid4_info() After doing all that, the "_cpuid4_info_regs" name becomes a mouthful. It is also not totally accurate, as the structure holds cpuid4 derived information like cache node ID and size -- not just regs. Rename struct _cpuid4_info_regs to _cpuid4_info. That new name also better matches the AMD/Intel leaf 0x4 functions mentioned above. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-17-darwi@linutronix.de commit 2d56cc87225035919dfceb40e676081d833dab13 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:10 2025 +0100 x86/cacheinfo: Separate Intel and AMD CPUID leaf 0x4 code paths The CPUID leaf 0x4 parsing code at cpuid4_cache_lookup_regs() is ugly and convoluted. It is tangled with multiple nested conditions to handle: * AMD with TOPEXT, or Hygon CPUs via leaf 0x8000001d * Legacy AMD fallback via leaf 0x4 emulation * Intel CPUs via the actual CPUID leaf 0x4 Moreover, AMD L3 northbridge initialization is also awkwardly placed alongside the CPUID calls of the first two scenarios above. Refactor all of that as follows: * Update AMD's leaf 0x4 emulation comment to represent current state * Clearly label the AMD leaf 0x4 emulation function as a fallback * Split AMD/Hygon and Intel code paths into separate functions * Move AMD L3 northbridge initialization out of CPUID leaf 0x4 code, and into populate_cache_leaves() where it belongs. There, ci_info_init() can directly store the initialized object in the private pointer of the API. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-16-darwi@linutronix.de commit 071f4ad6494aff76589ca30a2d13e74bc1e33e0f Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:09 2025 +0100 x86/cacheinfo: Use sysfs_emit() for sysfs attributes show() Per Documentation/filesystems/sysfs.rst, a sysfs attribute's show() method should only use sysfs_emit() or sysfs_emit_at() when returning values to user space. Use sysfs_emit() for the AMD L3 cache sysfs attributes cache_disable_0, cache_disable_1, and subcaches. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-15-darwi@linutronix.de commit 365e960d296ef9f36b20971aa4854ce07817a9bb Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:08 2025 +0100 x86/cacheinfo: Move AMD cache_disable_0/1 handling to separate file Parent commit decoupled amd_northbridge out of _cpuid4_info_regs, where it was merely "parked" there until ci_info_init() can store it in the private pointer of the API. Given that decoupling, move the AMD-specific L3 cache_disable_0/1 sysfs code from the generic (and already extremely convoluted) x86/cacheinfo code into its own file. Compile the file only if CONFIG_AMD_NB and CONFIG_SYSFS are both enabled, which mirrors the existing logic. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-14-darwi@linutronix.de commit c58ed2d4da8dced3fa4505f498bd393f565b471a Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:07 2025 +0100 x86/cacheinfo: Separate amd_northbridge from _cpuid4_info_regs 'struct _cpuid4_info_regs' is meant to hold the CPUID leaf 0x4 output registers (EAX, EBX, and ECX), as well as derived information such as the cache node ID and size. It also contains a reference to amd_northbridge, which is there only to be "parked" until ci_info_init() can store it in the priv pointer of the API. That priv pointer is then used by AMD-specific L3 cache_disable_0/1 sysfs attributes. Decouple amd_northbridge from _cpuid4_info_regs and pass it explicitly through the functions at x86/cacheinfo. Doing so clarifies when amd_northbridge is actually needed (AMD-only code) and when it is not (Intel-specific code). It also prepares for moving the AMD-specific L3 cache_disable_0/1 sysfs code into its own file in next commit. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-13-darwi@linutronix.de commit 77676e6802a10ffa5a0ad6367e8f6e14cbd88781 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:06 2025 +0100 x86/cacheinfo: Consolidate AMD/Hygon leaf 0x8000001d calls While gathering CPU cache info, CPUID leaf 0x8000001d is invoked in two separate if blocks: one for Hygon CPUs and one for AMDs with topology extensions. After each invocation, amd_init_l3_cache() is called. Merge the two if blocks into a single condition, thus removing the duplicated code. Future commits will expand these if blocks, so combining them now is both cleaner and more maintainable. Note, while at it, remove a useless "better error?" comment that was within the same function since the 2005 commit e2cac78935ff ("[PATCH] x86_64: When running cpuid4 need to run on the correct CPU"). Note, as previously done at commit aec28d852ed2 ("x86/cpuid: Standardize on u32 in "), standardize on using 'u32' and 'u8' types. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-12-darwi@linutronix.de commit 1374ff60ed0d4cedd55f653edd3f59f9f19c4171 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:05 2025 +0100 x86/cacheinfo: Standardize _cpuid4_info_regs instance naming The cacheinfo code frequently uses the output registers from CPUID leaf 0x4. Such registers are cached in 'struct _cpuid4_info_regs', augmented with related information, and are then passed across functions. The naming of these _cpuid4_info_regs instances is confusing at best. Some instances are called "this_leaf", which is vague as "this" lacks context and "leaf" is overly generic given that other CPUID leaves are also processed within cacheinfo. Other _cpuid4_info_regs instances are just called "base", adding further ambiguity. Standardize on id4 for all instances. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-11-darwi@linutronix.de commit 036a73b5174477b72d881b4c75740d3dbfd7ec49 Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:04 2025 +0100 x86/cacheinfo: Align ci_info_init() assignment expressions The ci_info_init() function initializes 10 members of a 'struct cacheinfo' instance using passed data from CPUID leaf 0x4. Such assignment expressions are difficult to read in their current form. Align them for clarity. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-10-darwi@linutronix.de commit 7b83e0d2b20b38a025d15ba88516c1b8fe9c6f3d Author: Ahmed S. Darwish Date: Mon Mar 24 14:33:03 2025 +0100 x86/cacheinfo: Constify _cpuid4_info_regs instances _cpuid4_info_regs instances are passed through a large number of functions at cacheinfo.c. For clarity, constify the instance parameters where _cpuid4_info_regs is only read from. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-9-darwi@linutronix.de commit cf8758205264707b4521163c0a37bf587c4425c4 Author: Thomas Gleixner Date: Mon Mar 24 14:33:02 2025 +0100 x86/cacheinfo: Use proper name for cacheinfo instances The cacheinfo structure defined at is a generic cache info object representation. Calling its instances at x86 cacheinfo.c "leaf" confuses it with a CPUID leaf -- especially that multiple CPUID calls are already sprinkled across that file. Most of such instances also have a redundant "this_" prefix. Rename all of the cacheinfo "this_leaf" instances to just "ci". [ darwi: Move into separate commit and write commit log ] Signed-off-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-8-darwi@linutronix.de commit 21e2a452dca34538db0731b45c113cfd31aa45e6 Author: Thomas Gleixner Date: Mon Mar 24 14:33:01 2025 +0100 x86/cacheinfo: Properly name amd_cpuid4()'s first parameter amd_cpuid4()'s first parameter, "leaf", is not a CPUID leaf as the name implies. Rather, it's an index emulating CPUID(4)'s subleaf semantics; i.e. an ID for the cache object currently enumerated. Rename that parameter to "index". Apply minor coding style fixes to the rest of the function as well. [ darwi: Move into a separate commit and write commit log. Use "index" instead of "subleaf" for amd_cpuid4() first param, as that's the name typically used at the whole of cacheinfo.c. ] Signed-off-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-7-darwi@linutronix.de commit ee159792a4db06e359a5e2e231c6f1242ec76c31 Author: Thomas Gleixner Date: Mon Mar 24 14:33:00 2025 +0100 x86/cacheinfo: Refactor CPUID leaf 0x2 cache descriptor lookup Extract the cache descriptor lookup logic out of the leaf 0x2 parsing code and into a dedicated function. This disentangles such lookup from the deeply nested leaf 0x2 parsing loop. Remove the cache table termination entry, as it is no longer needed after the ARRAY_SIZE()-based lookup. [ darwi: Move refactoring logic into this separate commit + commit log. Remove the cache table termination entry. ] Signed-off-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-6-darwi@linutronix.de commit a078aaa38a23a2595addb14ac286d8b8ae793d39 Author: Ahmed S. Darwish Date: Mon Mar 24 14:32:59 2025 +0100 x86/cacheinfo: Use CPUID leaf 0x2 parsing helpers Parent commit introduced CPUID leaf 0x2 parsing helpers at . The new API allows sharing leaf 0x2's output validation and iteration logic across both intel.c and cacheinfo.c. Convert cacheinfo.c to that new API. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-5-darwi@linutronix.de commit fe78079ec07fd48a19abcfeac74bc97e07171fb6 Author: Ahmed S. Darwish Date: Mon Mar 24 14:32:58 2025 +0100 x86/cpu: Introduce and use CPUID leaf 0x2 parsing helpers Introduce CPUID leaf 0x2 parsing helpers at . This allows sharing the leaf 0x2's output validation and iteration logic across both x86/cpu intel.c and cacheinfo.c. Start by converting intel.c to the new API. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-4-darwi@linutronix.de commit 09a1da4beb310420b720994f7b6599e8d0bce3e1 Author: Ahmed S. Darwish Date: Mon Mar 24 14:32:57 2025 +0100 x86/cacheinfo: Remove CPUID leaf 0x2 parsing loop Leaf 0x2 output includes a "query count" byte where it was supposed to specify the number of repeated CPUID leaf 0x2 subleaf 0 queries needed to extract all of the CPU's cache and TLB descriptors. Per current Intel manuals, all CPUs supporting this leaf "will always" return an iteration count of 1. Remove the leaf 0x2 query loop and just query the hardware once. Note, as previously done at commit aec28d852ed2 ("x86/cpuid: Standardize on u32 in "), standardize on using 'u32' and 'u8' types. Suggested-by: Ingo Molnar Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-3-darwi@linutronix.de commit b5969494c8d8a2384c0636707a538efad15d8660 Author: Ahmed S. Darwish Date: Mon Mar 24 14:32:56 2025 +0100 x86/cpu: Remove CPUID leaf 0x2 parsing loop Leaf 0x2 output includes a "query count" byte where it was supposed to specify the number of repeated CPUID leaf 0x2 subleaf 0 queries needed to extract all of the CPU's cache and TLB descriptors. Per current Intel manuals, all CPUs supporting this leaf "will always" return an iteration count of 1. Remove the leaf 0x2 query loop and just query the hardware once. Note, as previously done in: aec28d852ed2 ("x86/cpuid: Standardize on u32 in ") standardize on using 'u32' and 'u8' types. Suggested-by: Ingo Molnar Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324133324.23458-2-darwi@linutronix.de commit 0efb4dc3b084579efe7f5f88370b76d4f1c3bcee Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:41 2025 +0100 MAINTAINERS: Include the entire kcpuid/ directory under the X86 CPUID DATABASE entry kcpuid's CSV file is covered by the "x86 CPUID database" MAINTAINERS entry. Recent patches have shown that changes to that file may require updates to the kcpuid code, so include the whole of tools/x86/kcpuid/ under the same entry. This also ensures that myself and the x86-cpuid mailing list are CCed on future kcpuid patches. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-21-darwi@linutronix.de commit 300ba891418ae72df8d16fc26886f1d049c70907 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:40 2025 +0100 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.3 Update kcpuid's CSV file to version 2.3, as generated by x86-cpuid-db. Summary of the v2.3 changes: * Per H. Peter Anvin's feedback, leaf 0x3 is not unique to Transmeta as the CSV file earlier claimed. Since leaf 0x3's format differs between Intel and Transmeta, and the project does not yet support having the same CPUID bitfield with varying interpretations across vendors, leaf 0x3 is removed for now. Given that Intel discontinued support for PSN from Pentium 4 onward, and Linux force disables it on early boot for privacy concerns, this should have minimal impact. * Leaf 0x80000021: Make bitfield IDs and descriptions coherent with each other. Remove "_support" from bitfield IDs, as no other leaf has such convention. Reported-by: "H. Peter Anvin" Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.3/CHANGELOG.rst Link: https://lore.kernel.org/r/20250324142042.29010-20-darwi@linutronix.de Closes: https://lkml.kernel.org/r/C7684E03-36E0-4D58-B6F0-78F4DB82D737@zytor.com commit 5e0c3c5e95f09236e5f7a73615bfa2666c58f182 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:39 2025 +0100 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.2 Update kcpuid's CSV file to version 2.2, as generated by x86-cpuid-db. Per Ingo Molnar's feedback, it is desired to always use CPUID in its capitalized form. The v2.2 release fixed all instances of small case "cpuid" at the project's XML database, and thus all of its generated files. Reported-by: Ingo Molnar Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.2/CHANGELOG.rst Link: https://lore.kernel.org/r/20250324142042.29010-19-darwi@linutronix.de Closes: https://lkml.kernel.org/r/Z8bHK391zKE4gUEW@gmail.com commit f5e7fd6857963e697600d881242bbb39b0b9ac37 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:38 2025 +0100 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.1 Update kcpuid's CSV file to version 2.1, as generated by x86-cpuid-db. Summary of the v2.1 changes: * Use a standardized style for all x86 trademarks, registers, opcodes, byte units, hexadecimal digits, and x86 technical terms. This was enforced by a number of x86-specific hunspell(5) dictionary and affix files at the x86-cpuid-db project's CI pipeline. * Expand abbreviated terms that might be OK in code but not in official listings (e.g., "addr", "instr", "reg", "virt", etc.) * Add new Zen5 SoC bits to leaf 0x80000020 and leaf 0x80000021. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.1/CHANGELOG.rst Link: https://lore.kernel.org/r/20250324142042.29010-18-darwi@linutronix.de commit e1dde2f5a4ef4a0e91a67adebb7037bbfbcb0c50 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:37 2025 +0100 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.0 Update kcpuid's CSV file to version v2.0, as generated by x86-cpuid-db. Summary of the v2.0 changes: * Introduce the leaves: - Leaf 0x00000003, Transmeta Processor serial number - Leaf 0x80860000, Transmeta max leaf number + CPU vendor ID - Leaf 0x80860001, Transmeta extended CPU information - Leaf 0x80860002, Transmeta Code Morphing Software (CMS) enumeration - Leaf 0x80860003 => 0x80860006, Transmeta CPU information string - Leaf 0x80860007, Transmeta "live" CPU information - Leaf 0xc0000000, Centaur/Zhaoxin's max leaf number - Leaf 0xc0000001, Centaur/Zhaoxin's extended CPU features * Add a 0x prefix for leaves 0x0 to 0x9. This maintains consistency with the rest of the CSV entries. * Add the new bitfields: - Leaf 0x7: nmi_src, NMI-source reporting - Leaf 0x80000001: e_base_type and e_mmx (Transmeta) * Update the section headers for leaves 0x80000000 and 0x80000005 to indicate that they are also valid for Transmeta. Notes: Leaf 0x3, being not unique to Transmeta, is handled at the generated CSV file v2.3 update, later in this patch queue. Leaf 0x80000001 EDX:23 bit, e_mmx, is also available on AMD. A bugfix is already merged at x86-cpuid-db's -tip for that, and it will be part of the project's upcoming v2.4 release.: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/commit/65fff25daa41 Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.0/CHANGELOG.rst Link: https://lore.kernel.org/r/20250324142042.29010-17-darwi@linutronix.de commit 87669e74d8481a066eb8d319cef7b2ea93d4e24b Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:36 2025 +0100 tools/x86/kcpuid: Define Transmeta and Centaur index ranges Explicitly define the CPUID index ranges for Transmeta (0x80860000) and Centaur/Zhaoxin (0xc0000000). Without these explicit definitions, their respective CPUID indices would be skipped during CSV bitfield parsing. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-16-darwi@linutronix.de commit 72383c8274edf0a1736973462603dcfd0a088bb9 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:35 2025 +0100 tools/x86/kcpuid: Filter valid CPUID ranges Next commits will introduce vendor-specific CPUID ranges like Transmeta's 0x8086000 range and Centaur's 0xc0000000. Initially explicit vendor detection was implemented, but it turned out to be not strictly necessary. As Dave Hansen noted, even established tools like cpuid(1) just tries all ranges indices, and see if the CPU responds back with something sensible. Do something similar at setup_cpuid_range(). Query the range's index, and check the maximum range function value returned. If it's within an expected interval of [range_index, range_index + MAX_RANGE_INDEX_OFFSET], accept the range as valid and further query its leaves. Set MAX_RANGE_INDEX_OFFSET to a heuristic of 0xff. That should be sensible enough since all the ranges covered by x86-cpuid-db XML database are: 0x00000000 0x00000023 0x40000000 0x40000000 0x80000000 0x80000026 0x80860000 0x80860007 0xc0000000 0xc0000001 At setup_cpuid_range(), if the range's returned maximum function was not sane, mark it as invalid by setting its number of leaves, range->nr, to zero. Introduce the for_each_valid_cpuid_range() iterator instead of sprinkling "range->nr != 0" checks throughout the code. Suggested-by: Dave Hansen Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-15-darwi@linutronix.de commit 74d29127f83042500c20c903dd67151dbdd86ec8 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:34 2025 +0100 tools/x86/kcpuid: Consolidate index validity checks Let index_to_cpuid_range() return a CPUID range only if the passed index is within a CPUID range's maximum supported function on the CPU. Returning a CPUID range that is invalid on the CPU for the passed index does not make sense. This also avoids repeating the "function index is within CPUID range" checks, both at setup_cpuid_range() and index_to_func(). Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-14-darwi@linutronix.de commit f2e2efe9489d883fdaac8b7b46bd669b6214b1cb Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:33 2025 +0100 tools/x86/kcpuid: Extend CPUID index mask macro Extend the CPUID index mask macro from 0x80000000 to 0xffff0000. This accommodates the Transmeta (0x80860000) and Centaur (0xc0000000) index ranges which will be later added. This also automatically sets CPUID_FUNCTION_MASK to 0x0000ffff, which is the actual correct value. Use that macro, instead of the 0xffff literal where appropriate. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-13-darwi@linutronix.de commit 3151ec059dd1e71761f3beccc1e5f5c18fac4afa Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:32 2025 +0100 tools/x86/kcpuid: Refactor CPUID range handling for future expansion The kcpuid code assumes only two CPUID index ranges, standard (0x0...) and extended (0x80000000...). Since additional CPUID index ranges will be added in further commits, replace the "is_ext" boolean with enumeration-based range classification. Collect all CPUID ranges in a structured array and introduce helper macros to iterate over it. Use such helpers throughout the code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-12-darwi@linutronix.de commit c479a84488d10b3d4259186d80839f99e26b1706 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:31 2025 +0100 tools/x86/kcpuid: Use intrinsics Use the __cpuid_count() intrinsic, provided by GCC and LLVM, instead of rolling a manual version. Both of the kernel's minimum required GCC version (5.1) and LLVM version (13.0.1) supports it, and it is heavily used across standard Linux user-space tooling. This also makes the CPUID call sites more readable. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-11-darwi@linutronix.de commit 0a8f12ccd2e6edac89292af63c3a2050b4aac61b Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:30 2025 +0100 tools/x86/kcpuid: Use C99-style for loops Since commit e8c07082a810 ("Kbuild: move to -std=gnu11") and the kernel allows C99-style variable declarations inside of a for() loop. Adjust the kcpuid code accordingly. Note, this helps readability as some of the kcpuid functions have a huge list of variable declarations on top. Note, remove the empty lines before cpuid() invocations as it is clearer to have their parameter initialization and the actual call in one block. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-10-darwi@linutronix.de commit 8984cea5c4743d7fabf5de9da142cfc5dde1a144 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:29 2025 +0100 tools/x86/kcpuid: Set parse_line() return type to void parse_line() returns an integer but its caller ignored it. Change the function signature to return void. While at it, adjust some of the "Skip line" comments for readability. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-9-darwi@linutronix.de commit 2b383ca0896f0ffc24fd4d93440320d2dd5daad1 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:28 2025 +0100 tools/x86/kcpuid: Remove unused global variable The global variable "is_amd" is written to, but is not read from anywhere. Remove it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-8-darwi@linutronix.de commit c061ded035b5bdeb21adc1046c0bfbba4bcee2d2 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:27 2025 +0100 tools/x86/kcpuid: Remove unused local variable The local variable "index" is written to, but is not read from anywhere. Remove it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-7-darwi@linutronix.de commit ce61b6067d8cbfcd3607d942913b21c7ce2b384b Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:26 2025 +0100 tools/x86/kcpuid: Print correct CPUID output register names kcpuid --all --detail claims that all bits belong to ECX, in the form of the header CPUID_${leaf}_ECX[${subleaf}]. Print the correct register name for all CPUID output. kcpuid --detail also dumps the raw register value if a leaf/subleaf is covered in the CSV file, but a certain output register within it is not covered by any CSV entry. Since register names are now properly printed, and since the CSV file has become exhaustive using x86-cpuid-db, remove that value dump as it pollutes the output. While at it, rename decode_bits() to show_reg(). This makes it match its show_range(), show_leaf() and show_reg_header() counterparts. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-6-darwi@linutronix.de commit 6bef74cab03ada39f16f1fb86b732f7c71a9f07a Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:25 2025 +0100 tools/x86/kcpuid: Save CPUID output in an array For each CPUID leaf/subleaf query, save the output in an output[] array instead of spelling it out using EAX to EDX variables. This allows the CPUID output to be accessed programmatically instead of calling decode_bits() four times. Loop-based access also allows "kcpuid --detail" to print the correct output register names in next commit. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-5-darwi@linutronix.de commit 660c29fe53deeb3b3aef1d666ed3bde7608380bd Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:24 2025 +0100 tools/x86/kcpuid: Simplify usage() handling Refactor usage() to accept an exit code parameter and exit the program after usage output. This streamlines its callers' code paths. Remove the "Invalid option" error message since getopt_long(3) already emits a similar message by default. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-4-darwi@linutronix.de commit a866a6775793a2554585073704b83c4691d80740 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:23 2025 +0100 tools/x86/kcpuid: Exit the program on invalid parameters If the user passed an invalid CPUID index value through --leaf=index, kcpuid prints a warning, does nothing, then exits successfully. Transform the warning to an error, and exit the program with a proper error code. Similarly, if the user passed an invalid subleaf, kcpuid prints a warning, dumps the whole leaf, then exits successfully. Print a clear error message regarding the invalid subleaf and exit the program with the proper error code. Note, moving the "Invalid input index" message from index_to_func() to show_info() localizes error message handling to the latter, where it should be. It also allows index_to_func() to be refactored at further commits. Note, since after this commit and its parent kcpuid does not just "move on" on failures, remove the NULL parameter check plus silent exit at show_func() and show_leaf(). Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-3-darwi@linutronix.de commit 116edfe173d0c59ec2aa87fb91f2f31d477b61b3 Author: Ahmed S. Darwish Date: Mon Mar 24 15:20:22 2025 +0100 tools/x86/kcpuid: Fix error handling Error handling in kcpuid is unreliable. On malloc() failures, the code prints an error then just goes on. The error messages are also printed to standard output instead of standard error. Use err() and errx() from to direct all error messages to standard error and automatically exit the program. Use err() to include the errno information, and errx() otherwise. Use warnx() for warnings. While at it, alphabetically reorder the header includes. [ mingo: Fix capitalization in the help text while at it. ] Fixes: c6b2f240bf8d ("tools/x86: Add a kcpuid tool to show raw CPU features") Reported-by: Remington Brasga Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250324142042.29010-2-darwi@linutronix.de Closes: https://lkml.kernel.org/r/20240926223557.2048-1-rbrasga@uci.edu commit 5003720e7d96c2f77c5ae3049aa8958e8074dc44 Author: Animesh Manna Date: Mon Mar 24 15:38:23 2025 +0530 drm/i915/display: Read panel replay source status through PSR2 status register PTL onwards get panel replay status from PSR2 status register instead of SRD status. Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20250324100823.3111564-1-animesh.manna@intel.com commit ad9b861824ac55d81431815fffaaff5e981badc1 Author: Nathan Chancellor Date: Mon Mar 24 20:23:00 2025 -0700 x86/kbuild/64: Restrict clang versions that can use '-march=native' There are two issues that can appear when building with clang and '-march=native'. The first issue is a compiler crash in the ipv6 stack with clang-18, such as when building allmodconfig. This was frequently reported on the LLVM issue tracker: # Link: https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20ip6_rcv_core Stack dump: 0. Program arguments: clang ... -march=native ... net/ipv6/ip6_input.c 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'net/ipv6/ip6_input.c'. 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@ip6_rcv_core' The second issue is certain -Wframe-larger-than warnings that appear with clang versions prior to 19, which introduced an optimization that produces much better code: # Link: https://github.com/llvm/llvm-project/commit/90ba33099cbb17e7c159e9ebc5a512037db99d6d [2] clang-18: drivers/media/pci/saa7164/saa7164-core.c:605:20: error: stack frame size (2392) exceeds limit (2048) in 'saa7164_irq' [-Werror,-Wframe-larger-than] 605 | static irqreturn_t saa7164_irq(int irq, void *dev_id) | ^ clang-19: drivers/media/pci/saa7164/saa7164-core.c:605:20: error: stack frame size (216) exceeds limit (128) in 'saa7164_irq' [-Werror,-Wframe-larger-than] 605 | static irqreturn_t saa7164_irq(int irq, void *dev_id) | ^ Restrict the testing of the availability of '-march=native' to all supported GCC versions and clang-19 and newer to avoid these known resolved issues. Fixes: 0480bc7e65dc ("x86/kbuild/64: Add the CONFIG_X86_NATIVE_CPU option to locally optimize the kernel with '-march=native'") Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Cc: Nick Desaulniers Cc: Tor Vic Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Kees Cook Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324-x86-march-native-clang-19-and-newer-v1-1-3a05ed32a89e@kernel.org commit 01412081863aa81db47423d5719f2726d2a00a32 Author: Ingo Molnar Date: Mon Mar 24 08:05:19 2025 +0100 x86/kbuild/64: Test for the availability of the -mtune=native compiler flag Stephen reported this build failure when cross-compiling: cc1: error: bad value 'native' for '-march=' switch Test for the availability of the -march=native flag. Reported-by: Stephen Rothwell Signed-off-by: Ingo Molnar Tested-by: Stephen Rothwell # build test Cc: Tor Vic Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Kees Cook Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250324172723.49fb0416@canb.auug.org.au commit ea1dcca1de129dfdf145338a868648bc0e24717c Author: Tor Vic Date: Fri Mar 21 15:28:58 2025 +0100 x86/kbuild/64: Add the CONFIG_X86_NATIVE_CPU option to locally optimize the kernel with '-march=native' Add a 'native' option that allows users to build an optimized kernel for their local machine (i.e. the machine which is used to build the kernel) by passing '-march=native' to CFLAGS. The idea comes from Linus' reply to Arnd's initial proposal: https://lore.kernel.org/all/CAHk-=wji1sV93yKbc==Z7OSSHBiDE=LAdG_d5Y-zPBrnSs0k2A@mail.gmail.com/ Here are some numbers comparing 'generic' to 'native' on a Skylake dual-core laptop (generic --> native): - vmlinux and compressed modules size: 125'907'744 bytes --> 125'595'280 bytes (-0.248 %) 18'810 kilobytes --> 18'770 kilobytes (-0.213 %) - phoronix, average of 3 runs: ffmpeg: 130.99 --> 131.15 (+0.122 %) nginx: 10'650 --> 10'725 (+0.704 %) hackbench (lower is better): 102.27 --> 99.50 (-2.709 %) - xz compression of firefox tarball (lower is better): 319.57 seconds --> 317.34 seconds (-0.698 %) - stress-ng, bogoops, average of 3 15-second runs: fork: 111'744 --> 115'509 (+3.397 %) bsearch: 7'211 --> 7'436 (+3.120 %) memfd: 3'591 --> 3'604 (+0.362 %) mmapfork: 630 --> 629 (-0.159 %) schedmix: 42'715 --> 43'251 (+1.255 %) epoll: 2'443'767 --> 2'454'413 (+0.436 %) vm: 1'442'256 --> 1'486'615 (+3.076 %) - schbench (two message threads), 30-second runs: 304 rps --> 305 rps (+0.329 %) There is little difference both in terms of size and of performance, however the native build comes out on top ever so slightly. [ mingo: Renamed the option to CONFIG_X86_NATIVE_CPU, expanded the help text and added Linus's Suggested-by tag. ] Suggested-by: Linus Torvalds Signed-off-by: Tor Vic Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: Juergen Gross Cc: H. Peter Anvin Cc: Kees Cook Cc: Josh Poimboeuf Link: https://lore.kernel.org/r/20250321142859.13889-1-torvic9@mailbox.org commit 3d6d238851dff53f49ff88d280ab9fc45eaec60a Author: Johan Korsnes Date: Sun Mar 23 20:10:04 2025 +0100 arch: xtensa: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX This option was removed from the Kconfig in commit 8c710f75256b ("net/sched: Retire tcindex classifier") but it was not removed from the defconfigs. Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier") Signed-off-by: Johan Korsnes Cc: Chris Zankel Cc: Max Filippov Message-Id: <20250323191004.112743-1-johan.korsnes@gmail.com> Signed-off-by: Max Filippov commit 327e30123cafcb45c0fc5843da0367b90332999d Author: Vivek Kasireddy Date: Mon Mar 24 10:22:33 2025 -0700 drm/i915/xe2hpd: Identify the memory type for SKUs with GDDR + ECC Some SKUs of Xe2_HPD platforms (such as BMG) have GDDR memory type with ECC enabled. We need to identify this scenario and add a new case in xelpdp_get_dram_info() to handle it. In addition, the derating value needs to be adjusted accordingly to compensate for the limited bandwidth. Bspec: 64602 Cc: Matt Roper Fixes: 3adcf970dc7e ("drm/xe/bmg: Drop force_probe requirement") Cc: stable@vger.kernel.org Signed-off-by: Vivek Kasireddy Reviewed-by: Matt Roper Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250324-tip-v2-1-38397de319f8@intel.com Signed-off-by: Lucas De Marchi commit c8ba07caaecc622a9922cda49f24790821af8a71 Author: Anusha Srivatsa Date: Tue Mar 18 10:37:07 2025 -0400 drm/panel/synaptics-r63353: Use _multi variants Move away from using deprecated API and use _multi variants if available. Use mipi_dsi_msleep() and mipi_dsi_usleep_range() instead of msleep() and usleep_range() respectively. Used Coccinelle to find the _multi variant APIs, replacing mpi_dsi_msleep() where necessary and for returning dsi_ctx.accum_err in these functions. Manually handled the reset step before returning from r63353_panel_activate() v2: Do not skip the reset in case of error during panel activate (Dmitry) - Convert all usleep_range() v3: mipi_dsi_usleep_range() is to be used only when in between _multi commands(Doug) - Check for error once in the end while using _multi variants (Doug) v4: Change return type of r63353_panel_deactivate() to void (Doug) @rule_1@ identifier dsi_var; identifier r; identifier func; type t; position p; expression dsi_device; expression list es; @@ t func(...) { ... struct mipi_dsi_device *dsi_var = dsi_device; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; <+... ( -r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx); | -r = mipi_dsi_dcs_exit_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); | -r = mipi_dsi_dcs_enter_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); | -r = mipi_dsi_dcs_write_buffer(dsi_var,es)@p; +mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_display_off(dsi_var,es)@p; +mipi_dsi_dcs_set_display_off_multi(&dsi_ctx,es); | -r = mipi_dsi_compression_mode_ext(dsi_var,es)@p; +mipi_dsi_compression_mode_ext_multi(&dsi_ctx,es); | -r = mipi_dsi_compression_mode(dsi_var,es)@p; +mipi_dsi_compression_mode_multi(&dsi_ctx,es); | -r = mipi_dsi_picture_parameter_set(dsi_var,es)@p; +mipi_dsi_picture_parameter_set_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_display_on(dsi_var,es)@p; +mipi_dsi_dcs_set_display_on_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_tear_on(dsi_var)@p; +mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx); | -r = mipi_dsi_turn_on_peripheral(dsi_var)@p; +mipi_dsi_turn_on_peripheral_multi(&dsi_ctx); | -r = mipi_dsi_dcs_soft_reset(dsi_var)@p; +mipi_dsi_dcs_soft_reset_multi(&dsi_ctx); | -r = mipi_dsi_dcs_set_display_brightness(dsi_var,es)@p; +mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_pixel_format(dsi_var,es)@p; +mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_column_address(dsi_var,es)@p; +mipi_dsi_dcs_set_column_address_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_page_address(dsi_var,es)@p; +mipi_dsi_dcs_set_page_address_multi(&dsi_ctx,es); | -r = mipi_dsi_dcs_set_tear_scanline(dsi_var,es)@p; +mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx,es); ) -if(r < 0) { -... -} ...+> } @rule_2@ identifier dsi_var; identifier r; identifier func; type t; position p; expression dsi_device; expression list es; @@ t func(...) { ... struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; <+... ( -r = msleep(es)@p; +r = mipi_dsi_msleep(&dsi_ctx,es); | -msleep(es)@p; +mipi_dsi_msleep(&dsi_ctx,es); | -r = usleep_range(es)@p; +r = mipi_dsi_usleep_range(&dsi_ctx,es); | -usleep_range(es)@p; +mipi_dsi_usleep_range(&dsi_ctx,es); ) ...+> } @rule_3@ identifier dsi_var; identifier func; type t; position p; expression list es; @@ t func(...) { ... struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; ... -return 0; +return dsi_ctx.accum_err; } Cc: Maxime Ripard Cc: Dmitry Baryshkov Cc: Tejas Vipin Cc: Douglas Anderson Cc: Neil Armstrong Reviewed-by: Douglas Anderson Signed-off-by: Anusha Srivatsa Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250318-synaptic-expt-v1-1-fa3831a7d883@redhat.com commit 15a226179c55ffef2e0a883b6bc15eaceff4a08d Author: Tejas Vipin Date: Sat Mar 15 23:55:22 2025 +0530 drm/panel: novatek-nt36523: transition to mipi_dsi wrapped functions Changes the novatek-nt36523 panel to use multi style functions for improved error handling. Reviewed-by: Douglas Anderson Signed-off-by: Tejas Vipin Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250315182522.628187-1-tejasvipin76@gmail.com commit 837f9b917c47b4d35f0ee571a736de2895e2dd54 Author: Tejas Vipin Date: Thu Mar 20 00:01:06 2025 +0530 drm/panel: samsung-s6d7aa0: transition to mipi_dsi wrapped functions Changes the samsung-s6d7aa0 panel to use multi style functions for improved error handling. Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson [dianders: fixed whitespace errors] Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250319183106.12613-1-tejasvipin76@gmail.com commit d69362f55fba92eb4cac10fe8da618de52b49bfc Author: Wolfram Sang Date: Tue Mar 18 16:52:56 2025 +0100 drm/bridge: ti-sn65dsi86: Check bridge connection failure Read out and check the ID registers, so we can bail out if I2C communication does not work or if the device is unknown. Tested on a Renesas GrayHawk board (R-Car V4M) by using a wrong I2C address and by not enabling RuntimePM for the device. Signed-off-by: Wolfram Sang Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250318155549.19625-2-wsa+renesas@sang-engineering.com commit 1d1f7b15cb9c11974cebfd39da51dc69b8cb31ff Author: Wolfram Sang Date: Sat Mar 15 21:15:11 2025 +0100 drm/bridge: ti-sn65dsi86: make use of debugfs_init callback Do not create a custom directory in debugfs-root, but use the debugfs_init callback to create a custom directory at the given place for the bridge. The new directory layout looks like this on a Renesas GrayHawk-Single with a R-Car V4M SoC: /sys/kernel/debug/dri/feb00000.display/DP-1/1-002c Signed-off-by: Wolfram Sang Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250315201651.7339-2-wsa+renesas@sang-engineering.com commit ac7759c74a602688c77519f056bd83ab657a73a3 Author: Francois Dugast Date: Fri Mar 14 11:50:50 2025 +0100 drm/xe/hw_engine_class_sysfs: Allow to inject error during probe Allow fault injection in a function used during initialization by xe_hw_engine_class_sysfs_init() so that its error handling can be tested. Signed-off-by: Francois Dugast Reviewed-by: Tejas Upadhyay Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250314105050.636983-1-francois.dugast@intel.com Signed-off-by: Rodrigo Vivi commit 11938353bfbfaf1acad000bac45adc296748f2f1 Author: Vinod Govindapillai Date: Fri Mar 21 11:45:29 2025 +0200 drm/i915/fbc: update the panel_replay dependency in fbc wa's There are two panel_replay scenarios fbc wa need to be aware of, panel replay with and without selective update capability. Panel replay without selective update don't have any fbc wa. So keep the fbc psr1 wa as it is. The current fbc psr2 wa is mainly about selective fetch and we need to apply the fbc wa if selective fetch is on - irrespective of panel replay. Hence we can't exclude panel replay from the fbc psr2 wa. v1: keep panel_replay exclusion in PSR1 case (Jouni) Patch description updated Bspec: 66624, 50442 Signed-off-by: Vinod Govindapillai Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20250321094529.197397-3-vinod.govindapillai@intel.com commit ccdb96cc7186c51045d707503d87cd220c5fed26 Author: Vinod Govindapillai Date: Fri Mar 21 11:45:28 2025 +0200 drm/i915/fbc: keep FBC disabled if selective update is on in xe2lpd FBC was disabled in case PSR2 selective update in display 12 to 14 as part of a wa. From xe2lpd onwards there is a logic to be implemented to decide between FBC and selective update. Until that logic is implemented keep FBC disabled in case selective update is enabled. v1: updated patch description and some explanation and todo Signed-off-by: Vinod Govindapillai Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20250321094529.197397-2-vinod.govindapillai@intel.com commit 909bda2206a698be88d0351910446932a9843d58 Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:33 2025 +0000 drm/sched: Add a basic test for checking credit limit Add a basic test for checking whether scheduler respects the configured credit limit. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-7-tvrtko.ursulin@igalia.com commit c85fc5db76e51693e8ce9b700f32d88e04e5081c Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:32 2025 +0000 drm/sched: Add a basic test for modifying entities scheduler list Add a basic test for exercising modifying the entities scheduler list at runtime. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-6-tvrtko.ursulin@igalia.com commit 7b765cda7ae96c13930285224d1cf8d7f4bb6027 Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:31 2025 +0000 drm/sched: Add basic priority tests Add some basic tests for exercising entity priority handling. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-5-tvrtko.ursulin@igalia.com commit 53e65974924ec3e66b2cdf71780f089b338fed33 Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:30 2025 +0000 drm/sched: Add a simple timeout test Add a very simple timeout test which submits a single job and verifies that the timeout handling will run if the backend failed to complete the job in time. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-4-tvrtko.ursulin@igalia.com commit 5a99350794fec11faaed8a4b36a6931e696f672f Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:29 2025 +0000 drm/sched: Add scheduler unit testing infrastructure and some basic tests Implement a mock scheduler backend and add some basic test to exercise the core scheduler code paths. Mock backend (kind of like a very simple mock GPU) can either process jobs by tests manually advancing the "timeline" job at a time, or alternatively jobs can be configured with a time duration in which case they get completed asynchronously from the unit test code. Core scheduler classes are subclassed to support this mock implementation. The tests added are just a few simple submission patterns. Signed-off-by: Tvrtko Ursulin Suggested-by: Philipp Stanner Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-3-tvrtko.ursulin@igalia.com commit 8e623137f112eb86ad949e3bcb6c0e5ae11a092a Author: Tvrtko Ursulin Date: Mon Mar 24 09:26:28 2025 +0000 drm: Move some options to separate new Kconfig Move some options out into a new debug specific kconfig file in order to make things a bit cleaner. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-2-tvrtko.ursulin@igalia.com commit f878af62c06c3e0f2b94f6bafd040400d8cfa4d9 Author: Thomas Zimmermann Date: Mon Mar 3 15:52:58 2025 +0100 drm/probe-helper: Do not fail from drmm_kms_helper_poll_init() Failing to set up connector polling is not significant enough to fail device probing. Print a warning and return nothing from the init helper. This only affects the managed init function. The unmanaged init already never fails with an error. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250303145604.62962-4-tzimmermann@suse.de commit 695a7f1c11355bbb50986423f11096421a466078 Author: Thomas Zimmermann Date: Mon Mar 3 15:52:57 2025 +0100 drm/udl: Switch poll helpers to managed cleanup Call drmm_kms_helper_poll_init() to set up managed cleanup for connector polling. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250303145604.62962-3-tzimmermann@suse.de commit ff9cb6d2035c586ea7c8f1754d4409eec7a2d26d Author: Thomas Zimmermann Date: Mon Mar 3 15:52:56 2025 +0100 drm/udl: Unregister device before cleaning up on disconnect Disconnecting a DisplayLink device results in the following kernel error messages [ 93.041748] [drm:udl_urb_completion [udl]] *ERROR* udl_urb_completion - nonzero write bulk status received: -115 [ 93.055299] [drm:udl_submit_urb [udl]] *ERROR* usb_submit_urb error fffffffe [ 93.065363] [drm:udl_urb_completion [udl]] *ERROR* udl_urb_completion - nonzero write bulk status received: -115 [ 93.078207] [drm:udl_submit_urb [udl]] *ERROR* usb_submit_urb error fffffffe coming from KMS poll helpers. Shutting down poll helpers runs them one final time when the USB device is already gone. Run drm_dev_unplug() first in udl's USB disconnect handler. Udl's polling code already handles disconnects gracefully if the device has been marked as unplugged. Signed-off-by: Thomas Zimmermann Fixes: b1a981bd5576 ("drm/udl: drop drm_driver.release hook") Cc: dri-devel@lists.freedesktop.org Cc: # v5.8+ Reviewed-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250303145604.62962-2-tzimmermann@suse.de commit 88c1f9a4d36de61f87cc52aac670020b13d1ccaa Author: Mohammed Thasleem Date: Fri Mar 21 18:07:07 2025 +0530 drm/i915/dmc: Create debugfs entry for dc6 counter Starting from MTL we don't have a platform agnostic way to validate DC6 state due to dc6 counter has been removed to validate DC state. The goal is to validate that the display HW can reach the DC6 power state. There is no HW DC6 residency counter (and there wasn't such a counter earlier either), so an alternative way is required. According to the HW team the display driver has programmed everything correctly in order to allow the DC6 power state if the DC5 power state is reached (indicated by the HW DC5 residency counter incrementing) and DC6 is enabled by the driver. Driver could take a snapshot of the DC5 residency counter right after it enables DC6 (dc5_residency_start) and increment the SW DC6 residency counter right before it disables DC6 or when user space reads the DC6 counter. So the driver would update the counter at these two points in the following way: dc6_residency_counter += dc5_current_count - dc5_start_count v2: Update the discription. (Imre) Read dc5 count during dc6 enable and disable then and update dc6 residency counter. (Imre) Remove variable from dmc structure. (Jani) Updated the subject title. v3: Add i915_power_domains lock to updated dc6 count in debugfs. (Imre) Use flags to check dc6 enable/disable states. (Imre) Move the display version check and counter read/update to a helper. (Imre) Resize the variable length. (Rodrigo) Use old dc6 debugfs entry for every platform. (Rodrigo) v4: Remove superfluous whitespace. (Jani) Read DMC registers in intel_dmc.c (Jani) Rename dc6_en_dis to dc6_enabled and change its type to bool. (Jani) Rename update_dc6_count and move it to intel_dmc.c (Jani) Rename dc6_en_dis to start_tracking. (Imre) Have lock for dc6 state read aswelll. (Imre) Keep the existing way print 'DC5 -> DC6 count' along with new 'DC6 Allowed Count' print. (Imre) Add counters in intel_dmc struct. (Imre) Have interface to return dc6 allowed count. (Imre) Rename dc6_count to dc6_allowed_count. (Rodrigo) v5: Rename counters and move in to dc6_allowed structure. (Imre) Order declaration lines in decreasing line length. (Imre) Update start_tacking logic. (Imre) Move get couner inside lock and DISPLAY_VER code to helper. (Imre) v6: Change intel_dmc_get_dc6_allowed_count return type to bool. (Imre) Update debugfs print to better allien with old print. (Imre) Remove braces at if/else for signle line statements. (Imre) v7: Remove in line variable declaration. (Imre) v8: Rebase the changes. Signed-off-by: Mohammed Thasleem Reviewed-by: Imre Deak Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20250321123707.287745-1-mohammed.thasleem@intel.com commit 0ead88112bf69da4ee54d3f26e21258f00640865 Author: Ankit Nautiyal Date: Sat Mar 22 10:13:45 2025 +0530 drm/i915/vrr: Avoid reading vrr.enable based on fixed_rr check Currently, vrr.enable is intended only for variable refresh rate timings. At this point, we do not set fixed refresh rate timings, but the GOP can, which creates a problem during the readback of vrr.enable. The GOP enables the VRR timing generator with fixed timings, while the driver only recognizes the VRR timing generator as enabled with variable timings. This discrepancy causes an issue due to the fixed refresh rate check during readback. Since the VRR timing generator is enabled and we do not support fixed timings, the readback should set vrr.enable so that the driver can disable the VRR timing generator. However, the current check does not allow this. Therefore, remove the fixed refresh rate check during readback. Fixes: 27217f9d1856 ("drm/i915/vrr: Track vrr.enable only for variable timing") Cc: Ankit Nautiyal Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250322044345.3827137-3-ankit.k.nautiyal@intel.com commit fe8fd8af6de6bc76506f739b9fd1acb1837cfa02 Author: Ankit Nautiyal Date: Sat Mar 22 10:13:44 2025 +0530 drm/i915/display: Add fixed_rr to crtc_state dump Add fixed refresh rate mode in crtc_state dump. VRR Timing Generator is running in fixed refresh rate mode when vrr.vmin = vrr.vmax = vrr.flipline. v2: s/fixed_rr/fixed rr for consistency with the other stuff. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250322044345.3827137-2-ankit.k.nautiyal@intel.com commit c63d00e388f2240c732bf1c89dc48bc8ff98089d Author: Suraj Kandpal Date: Fri Feb 28 20:55:32 2025 +0530 drm/i915/vdsc: Use the DSC config tables for DSI panels Some DSI panel vendors end up hardcoding PPS params because of which it does not listen to the params sent from the source. We use the default config tables for DSI panels when using DSC 1.1 rather than calculate our own rc parameters. --v2 -Use intel_crtc_has_type [Jani] --v4 -Use a function to check Mipi dsi dsc 1.1 condition [Ankit] -Add documentation for using this condition [Ankit] -Rebase --v5 -Pass only the crtc_state [Jani] -Fixup the comment [Jani] -Check for dsc major version [Jani] -Use co-developed-by tag [Jani] --v6 -Add more definition of the issue and solution in the comment [Ankit] Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13719 Co-developed-by: William Tseng Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20250228152531.403026-1-suraj.kandpal@intel.com commit 616299b6669ff66400c7341720f2dbf4b1fa81d1 Author: Luca Ceresoli Date: Thu Mar 6 18:28:41 2025 +0100 drm/bridge: fsl-ldb: make warning message more informative This warning notifies a clock was set to an inaccurate value. Modify the string to also show the clock name. While doing that also rewrap the entire function call. Signed-off-by: Luca Ceresoli Acked-by: Liu Ying Signed-off-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20250306-drm-two-ldb-improvements-v1-2-f139d768b92c@bootlin.com commit 8c6c3d207549d517638d31ee99d59f2bc16823ca Author: Luca Ceresoli Date: Thu Mar 6 18:28:40 2025 +0100 drm/bridge: imx8qxp-ldb: cleanup return value 'ret' can only be 0 at this point, being preceded by a 'if (ret) return ret;'. So return 0 for clarity. Signed-off-by: Luca Ceresoli Reviewed-by: Liu Ying Signed-off-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20250306-drm-two-ldb-improvements-v1-1-f139d768b92c@bootlin.com commit 689582882802cd64986c1eb584c9f5184d67f0cf Author: Yue Haibing Date: Sun Mar 23 19:41:03 2025 +0800 drm/xe: Fix unmet direct dependencies warning WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n] Selected by [m]: - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=m] && DRM_XE [=m] && DRM_XE [=m]=m [=m] && HAS_IOPORT [=y] DRM_XE_DISPLAY requires FB_IOMEM_HELPERS, but the dependency FB_CORE is missing, selecting FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION is set as other drm drivers. Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Signed-off-by: Yue Haibing Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250323114103.1960511-1-yuehaibing@huawei.com Signed-off-by: Lucas De Marchi commit 1bdf2ccc351ce73ec5fcc0fa82eb6959b30f34c7 Author: Maíra Canal Date: Mon Mar 17 22:01:13 2025 -0300 drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x In addition to the standard reset controller, V3D 7.x requires configuring the V3D_SMS registers for proper power on/off and reset. Add the new registers to `v3d_regs.h` and ensure they are properly configured during device probing, removal, and reset. This change fixes GPU reset issues on the Raspberry Pi 5 (BCM2712). Without exposing these registers, a GPU reset causes the GPU to hang, stopping any further job execution and freezing the desktop GUI. The same issue occurs when unloading and loading the v3d driver. Link: https://github.com/raspberrypi/linux/issues/6660 Reviewed-by: Iago Toral Quiroga Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250317-v3d-gpu-reset-fixes-v6-5-f3ee7717ed17@igalia.com commit b1cd1d738e8d98296a01768ba217f2f2ea5dd7b8 Author: Maíra Canal Date: Mon Mar 17 22:01:12 2025 -0300 dt-bindings: gpu: v3d: Add V3D driver maintainer as DT maintainer As established in commit 89d04995f76c ("MAINTAINERS: Drop Emma Anholt from all M lines."), Emma is no longer active in the Linux kernel and dropped the V3D maintainership. Therefore, remove Emma as one of the DT maintainers and add the current V3D driver maintainer. Acked-by: Emma Anholt Acked-by: Rob Herring (Arm) Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250317-v3d-gpu-reset-fixes-v6-4-f3ee7717ed17@igalia.com commit e29671ae9714d2c37cd5165a2e928cc2fdd829c1 Author: Maíra Canal Date: Mon Mar 17 22:01:11 2025 -0300 dt-bindings: gpu: v3d: Add SMS register to BCM2712 compatible V3D 7.1 exposes a new register block, called V3D_SMS. As BCM2712 has a V3D 7.1 core, add a new register item to its compatible. Similar to the GCA, which is specific for V3D 3.3, SMS should only be added for V3D 7.1 variants (such as brcm,2712-v3d). Acked-by: Krzysztof Kozlowski Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250317-v3d-gpu-reset-fixes-v6-3-f3ee7717ed17@igalia.com commit 38712c5281ac5f6f27058b825ca62ae69f2e2451 Author: Maíra Canal Date: Mon Mar 17 22:01:10 2025 -0300 dt-bindings: gpu: v3d: Add per-compatible register restrictions In order to enforce per-SoC register rules, add per-compatible restrictions. For example, V3D 3.3 (used in brcm,7268-v3d) has a cache controller (GCA), which is not present in other V3D generations. Declaring these differences helps ensure the DTB accurately reflect the hardware design. The example was using an incorrect order for the register names. This commit corrects that by enforcing the order established in the register items description. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250317-v3d-gpu-reset-fixes-v6-2-f3ee7717ed17@igalia.com commit 76dbd0973c555037931d2ed055a4a69e592caad4 Author: Maíra Canal Date: Mon Mar 17 22:01:09 2025 -0300 drm/v3d: Associate a V3D tech revision to all supported devices The V3D driver currently determines the GPU tech version (33, 41...) by reading a register. This approach has worked so far since this information wasn’t needed before powering on the GPU. V3D 7.1 introduces new registers that must be written to power on the GPU, requiring us to know the V3D version beforehand. To address this, associate each supported SoC with the corresponding VideoCore GPU version as part of the device data. To prevent possible mistakes, add an assertion to verify that the version specified in the device data matches the one reported by the hardware. If there is a mismatch, the kernel will trigger a warning. With the goal of maintaining consistency around the driver, use `enum v3d_gen` to assign values to `v3d->ver` and for comparisons with other V3D generations. Note that all mentions of unsupported or non-existing V3D generations (such as V3D 4.0) were removed by this commit and replaced with supported generations without functional changes. Reviewed-by: Iago Toral Quiroga Reviewed-by: Stefan Wahren Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250317-v3d-gpu-reset-fixes-v6-1-f3ee7717ed17@igalia.com commit 676da6ba5bdc1997910ac1cc901cbf16bc6f6d97 Author: Lucas De Marchi Date: Fri Mar 14 06:54:27 2025 -0700 drm/xe: Allow to inject error in early probe Allow to test if driver behaves correctly when xe_pcode_probe_early() fails. Note that this is not sufficient for testing survivability mode as it's still required to read the hw to check for errors, which doesn't happen on an injected failure. To complete the early probe coverage, allow injection in the other functions as well: xe_mmio_probe_early() and xe_device_probe_early(). Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20250314-fix-survivability-v5-3-fdb3559ea965@intel.com Signed-off-by: Lucas De Marchi commit 14efa739ca70514e8b923a02b5bcb42511dd1ee8 Author: Lucas De Marchi Date: Fri Mar 14 06:54:26 2025 -0700 drm/xe: Set survivability mode before heci init Commit d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci") tried to follow the logic: initialize everything needed and if everything succeeds, set the flag that it's enabled. While it fixed some corner cases of those calls failing, it was wrong for setting the flag after the call to xe_heci_gsc_init(): that function does a different initialization for survivability mode. Fix that and add comments about this being done on purpose. Suggested-by: Riana Tauro Fixes: d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci") Reviewed-by: Riana Tauro Link: https://patchwork.freedesktop.org/patch/msgid/20250314-fix-survivability-v5-2-fdb3559ea965@intel.com Signed-off-by: Lucas De Marchi commit 86b5e0dbba07438de91dd81095464c6c4aa7a372 Author: Lucas De Marchi Date: Fri Mar 14 06:48:58 2025 -0700 drm/xe: Move survivability back to xe Commit d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci") moved the survivability handling to be done entirely in the xe_pci layer. However there are some issues with that approach: 1) Survivability mode needs at least the mmio initialized, otherwise it can't really read a register to decide if it should enter that state 2) SR-IOV mode should be initialized, otherwise it's not possible to check if it's VF Besides, as pointed by Riana the check for xe_survivability_mode_enable() was wrong in xe_pci_probe() since it's not a bool return. Fix that by moving the initialization to be entirely in the xe_device layer, with the correct dependencies handled: only after mmio and sriov initialization, and not triggering it on error from wait_for_lmem_ready(). This restores the trigger behavior before that commit. The xe_pci layer now only checks for "is it enabled?", like it's doing in xe_pci_suspend()/xe_pci_remove(), etc. Cc: Riana Tauro Fixes: d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci") Reviewed-by: Riana Tauro Link: https://patchwork.freedesktop.org/patch/msgid/20250314-fix-survivability-v5-1-fdb3559ea965@intel.com Signed-off-by: Lucas De Marchi commit 613256e67cfd836a521a60b315772b3d31fb017d Author: Lucas De Marchi Date: Fri Mar 7 10:13:22 2025 -0800 drm/xe/uc: Add support for different firmware files on each GT The different GTs on a device can be very different. Right now for all platforms the same firmware is loaded in each GT, however future platforms may benefit from loading a different file depending on the GT type. Based on previous patch by John Harrison . Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20250307-xe-per-gt-fw-v1-2-459574d76400@intel.com Signed-off-by: Lucas De Marchi commit 75584c8213d341ddd5b7c72abf822e62f4b3ab27 Author: Lucas De Marchi Date: Fri Mar 7 10:13:21 2025 -0800 drm/xe/uc: Remove static from loop variable The `entries` variable is used to loop through the array - it's supposed to be const, but not static. Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20250307-xe-per-gt-fw-v1-1-459574d76400@intel.com Signed-off-by: Lucas De Marchi commit f3e08e98bf408a44182b0e3e946521a0e9b5482f Author: Thomas Hellström Date: Fri Mar 21 14:37:09 2025 +0100 drm/xe: Simplify pinned bo iteration Introduce and use a helper to iterate over the various pinned bo lists. There are a couple of slight functional changes: 1) GGTT maps are now performed with the bo locked. 2) If the per-bo callback fails, keep the bo on the original list. v2: - Skip unrelated change in xe_bo.c Cc: Matthew Auld Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20250321133709.75327-1-thomas.hellstrom@linux.intel.com commit eece12237a13a483913b7d7ef44153a6241fec3b Author: Arnd Bergmann Date: Fri Mar 21 07:44:06 2025 +0100 platform: cznic: fix function parameter names A invalid prototype made it into a previous patch, causing an clang warning: drivers/platform/cznic/turris-signing-key.c:25:55: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] and a slightly different warning with gcc-11 and earlier but not gcc-12 and up: drivers/platform/cznic/turris-signing-key.c: In function 'turris_signing_key_instantiate': drivers/platform/cznic/turris-signing-key.c:25:43: error: parameter name omitted Add the parameters to get a clean build with all compilers. Fixes: 0b28b7080ef5 ("platform: cznic: Add keyctl helpers for Turris platform") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503210450.AoOpbJXC-lkp@intel.com/ Signed-off-by: Arnd Bergmann commit f5c3bcd23afb4b2888c8f6eaa608b8a0c70091e4 Author: Jani Nikula Date: Thu Mar 20 17:04:00 2025 +0200 drm/xe/compat: remove intel_runtime_pm.h Now that all display code has been converted to display specific runtime PM interfaces, there's no need for the compat header anymore. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/037ed1f38c96715c76514e9eb7069b896ce06ba1.1742483007.git.jani.nikula@intel.com commit b5de8f445a5f0b9ea1504f89900702d67d2ece2b Author: Jani Nikula Date: Thu Mar 20 17:03:59 2025 +0200 drm/i915/power: convert to display runtime PM interfaces Finish the conversions to display specific runtime PM interfaces in the power code. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/b08a074d466a966b7f0fda9ef35c8ef81d180ebb.1742483007.git.jani.nikula@intel.com commit 4d3408328af05a6d9399e14c7505cce0b2f2e3b9 Author: Jani Nikula Date: Thu Mar 20 17:03:58 2025 +0200 drm/i915/display: convert to display runtime PM interfaces Convert i915 runtime PM interfaces to display runtime PM interfaces all over the place in display code. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/494d0bd0348e4aa99560f1aed21aaaff31706c44.1742483007.git.jani.nikula@intel.com commit 31630f39e7a5f6186f25e08e502b8d1c775635d3 Author: Jani Nikula Date: Thu Mar 20 17:03:57 2025 +0200 drm/i915/display: use display runtime PM interfaces for for atomic state Convert intel_atomic_commit() and intel_atomic_commit_tail() to use display runtime PM interfaces. Also convert the wakeref member type to struct ref_tracker *, which is the same as intel_wakeref_t, but without the typedef. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/2682fa92089ab87429eef4d45f931839f0d32077.1742483007.git.jani.nikula@intel.com commit e1de63b84cf0e621e69b0accaed4d5504e01b7ff Author: Jani Nikula Date: Thu Mar 20 17:03:56 2025 +0200 drm/i915/display: conversions to with_intel_display_rpm() Convert all with_intel_runtime_pm() uses to with_intel_display_rpm(). Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/888566433ca5f31b3fa3c0a192fd495d86c2f201.1742483007.git.jani.nikula@intel.com commit 336c0eaed2bde68b592769e9cd9c12d76d2b4578 Author: Jani Nikula Date: Thu Mar 20 17:03:55 2025 +0200 drm/i915/display: add display specific runtime PM wrappers Add display specific wrappers around the i915 and xe dedicated runtime PM interfaces. There are no conversions here, just the wrappers. Implement with_intel_display_rpm() without needing to provide a local variable, which neatly narrows the scope and hides the type of the wakeref cookie. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/086b312367fa0fbd8de92e9764117aa7ff4a8cc5.1742483007.git.jani.nikula@intel.com commit 09b9563e54415d51c7a3cb35e127e42a5419a0e5 Author: Jani Nikula Date: Thu Mar 20 16:46:05 2025 +0200 drm/i915/display: rename I915_HAS_HOTPLUG() to HAS_HOTPLUG Most of the other display feature check macros are just HAS_. Follow suit with hotplug check. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/c386ef007ae8bdda1bb9b1b353b1cd2957897842.1742481923.git.jani.nikula@intel.com commit d22168b68632a427c795da27b739b65eeb85473d Author: Jani Nikula Date: Thu Mar 20 16:46:04 2025 +0200 drm/i915/irq: convert rest of intel_display_irq.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_display_irq.[ch] to struct intel_display. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/b6e281875278ad84772938f81129fde6065b2745.1742481923.git.jani.nikula@intel.com commit 007232f685e622b9c8813809222aea2f2610760f Author: Jani Nikula Date: Thu Mar 20 16:46:03 2025 +0200 drm/i915/irq: convert intel_display_irq.[ch] interfaces to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert the external interfaces of intel_display_irq.[ch] to struct intel_display. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/83b552154761d2790d8c774707e8d7612037bdf5.1742481923.git.jani.nikula@intel.com commit 1e40b20ed47646eea52d8521b8b2ff0bdc716106 Author: Jani Nikula Date: Thu Mar 20 16:46:02 2025 +0200 drm/i915/hotplug: convert intel_hotplug_irq.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_hotplug_irq.[ch] to struct intel_display. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/8ddf27ea31b543f88c5f124f029c2eaa06a9aae7.1742481923.git.jani.nikula@intel.com commit 79e23d576c7b970c5addb4a4ab0a0b7c25cb57ff Author: Jani Nikula Date: Thu Mar 20 16:46:01 2025 +0200 drm/i915/hotplug: convert hotplug irq handling to intel_de_*() All the registers handled here are display registers. Switch from intel_uncore_*() to intel_de_*() functions. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/cd1149b3ebcb7a9f73830b99957f09e468cd5fd9.1742481923.git.jani.nikula@intel.com commit 8e0f3bb5085d000f232672c1c62988ce598d1eda Author: Jani Nikula Date: Thu Mar 20 16:46:00 2025 +0200 drm/i915/hotplug: convert hotplug debugfs to struct intel_display Pass struct intel_display as the cookie to debugfs functions. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/b1cbf64d366ca97005f9b139e85d8a32b460623a.1742481923.git.jani.nikula@intel.com commit 4cd502aa7ef9fff33fa2d801735709d606a11ee2 Author: Jani Nikula Date: Thu Mar 20 16:45:59 2025 +0200 drm/i915/hotplug: convert intel_hotplug.[ch] to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_hotplug.[ch] to struct intel_display. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/cf382dbfacf1445b26fbe1e7c011e7a3ea6e1594.1742481923.git.jani.nikula@intel.com commit 3e1966e2db6fbeb124cb32a0c57202662781a617 Author: Jani Nikula Date: Thu Mar 20 16:45:58 2025 +0200 drm/i915/connector: convert intel_connector.c to struct intel_display Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_connector.c to struct intel_display. i915_inject_probe_failure() remains the only call that requires i915 pointer. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/398e3210459a65f74e78f2d34584cda6eea6a99b.1742481923.git.jani.nikula@intel.com commit 49567c41766f0b389ec8ec97775420d279675004 Author: Jani Nikula Date: Thu Mar 20 16:45:57 2025 +0200 drm/i915/color: prefer display->platform. checks This let's us drop the dependency on i915_drv.h. Reviewed-by: Uma Shankar Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/d57fd6444c512b3cc35c0e216c86eeb95124eead.1742481923.git.jani.nikula@intel.com commit 7c53ff050ba88bb37eed3e17f2bb8ec592d83302 Author: Vinay Belgaumkar Date: Thu Mar 20 10:51:23 2025 -0700 drm/xe: Apply Wa_16023105232 The WA requires KMD to disable DOP clock gating during a semaphore wait and also ensure that idle delay for every CS is lower than the idle wait time in the PWRCTX_MAXCNT register. Default values for these registers already comply with this restriction. v2: Store timestamp_base in gt info and other comments (Daniele) v3: Skip WA check for VF v4: Review comments (Matt Roper) v5: Cleanup the clock functions and use reg_field_get (Matt Roper) v6: Fix checkpatch issue v7: Fix CI issue Cc: Matt Roper Reviewed-by: Matt Roper Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Vinay Belgaumkar Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20250320175123.3026754-1-vinay.belgaumkar@intel.com commit ba8755ab541fc629948233125db870d4dbf00a75 Author: Marek Behún Date: Tue Feb 4 14:14:15 2025 +0100 firmware: turris-mox-rwtm: Add support for ECDSA signatures with HW private key Add support for digital message signing with the private key stored in the rWTM secure coprocessor. Turris Mox devices have an ECDSA private key generated and burned into rWTM eFuses when manufactured. This private key is not readable from the rWTM, but rWTM firmware allows for signing messages with it and retrieving the public key. This is exposed to userspace via the keyctl API. User can find the key by either looking at /proc/keys or listing the keyring: $ cat /proc/keys 0240b221 ... keyring .turris-signing-keys: 1 34ff9ac9 ... turris-si Turris MOX SN 0000000D30000005 rWTM ECDSA ke... $ keyctl rlist %:.turris-signing-keys 889166537 To get the public key: $ keyctl read 889166537 67 bytes of data in key: 0201a05c 1a79242b 13f2fc02 b48ffdbb 6ee8d5ba 812d6784 5f04f302 c0894d3e b93474f9 46235777 5c926fb4 cce89b50 88cf5d10 c07fd9c5 fdcea257 3d8f1c33 1bf826 To sign a message: $ dd if=/dev/urandom of=msg_to_sign bs=64 count=1 $ keyctl pkey_sign 889166537 0 msg_to_sign >signature Signed-off-by: Marek Behún Signed-off-by: Arnd Bergmann commit 4110ad034fb7438eb16e73e2f949bedfabfc9d66 Author: Marek Behún Date: Tue Feb 4 14:14:14 2025 +0100 firmware: turris-mox-rwtm: Drop ECDSA signatures via debugfs Drop the debugfs implementation of the ECDSA message signing, in preparation for a new implementation via the keyctl() syscall. Signed-off-by: Marek Behún Signed-off-by: Arnd Bergmann commit df94a2f1eb455b57dd01f9b64419e3163d44df7f Author: Marek Behún Date: Tue Feb 4 14:14:13 2025 +0100 platform: cznic: turris-omnia-mcu: Add support for digital message signing with HW private key Add support for digital message signing with the private key stored in the MCU. Turris Omnia boards with MKL MCUs have a NIST256p ECDSA private key generated and burned into MCU's flash when manufactured. The private key is not readable from the MCU, but MCU allows for signing messages with it and retrieving the public key. This is exposed to userspace via the keyctl API. In userspace, the user can look at /proc/keys or list the keyring: $ cat /proc/keys 0a3b7cd3 ... keyring .turris-signing-keys: 1 3caf0b1a ... turris-om Turris Omnia SN 0000000A1000023 MCU ECDSA k... $ keyctl rlist %:.turris-signing-keys 1018104602 To get the public key: $ keyctl read 1018104602 33 bytes of data in key: 025d9108 1fb538ae 8435c88b b4379171 d6b158a9 55751b91 1d23e6a9 d017f4b2 1c To sign a message: $ dd if=/dev/urandom of=msg_to_sign bs=32 count=1 $ keyctl pkey_sign 1018104602 0 msg_to_sign >signature Signed-off-by: Marek Behún Signed-off-by: Arnd Bergmann commit 0b28b7080ef5a323c3afa3860c3d45d627629830 Author: Marek Behún Date: Tue Feb 4 14:14:12 2025 +0100 platform: cznic: Add keyctl helpers for Turris platform Some Turris devices support signing messages with a per-device unique asymmetric key that was created on the device at manufacture time. Add helper module that helps to expose this ability via the keyctl() syscall. A device-specific driver can register a signing key by calling devm_turris_signing_key_create(). Both the `.turris-signing-keys` keyring and the signing key are created with only the VIEW, READ and SEARCH permissions for userspace - it is impossible to link / unlink / move them, set their attributes, or unlink the keyring from userspace. Signed-off-by: Marek Behún Signed-off-by: Arnd Bergmann commit ee7f8ed72990f28657b5bf598e695fcf4633f4ed Author: Marek Behún Date: Tue Feb 4 14:14:11 2025 +0100 platform: cznic: turris-omnia-mcu: Refactor requesting MCU interrupt Refactor the code that gets and requests the TRNG MCU interrupt in the TRNG part of the driver into a helper function and put it into the GPIO part of the driver. Signed-off-by: Marek Behún Signed-off-by: Arnd Bergmann commit 97e81f78d3cbf061a809bbb8180a5b96395b8e03 Author: Yue Haibing Date: Sat Mar 15 20:01:43 2025 +0800 drm/i915/display: Fix build error without DRM_FBDEV_EMULATION In file included from : ./drivers/gpu/drm/i915/display/intel_fbdev.h: In function ‘intel_fbdev_framebuffer’: ./drivers/gpu/drm/i915/display/intel_fbdev.h:32:16: error: ‘NULL’ undeclared (first use in this function) 32 | return NULL; | ^~~~ ./drivers/gpu/drm/i915/display/intel_fbdev.h:1:1: note: ‘NULL’ is defined in header ‘’; did you forget to ‘#include ’? +++ |+#include 1 | /* SPDX-License-Identifier: MIT */ ./drivers/gpu/drm/i915/display/intel_fbdev.h:32:16: note: each undeclared identifier is reported only once for each function it appears in 32 | return NULL; | ^~~~ Build fails if CONFIG_DRM_FBDEV_EMULATION is n, add missing header file. Fixes: 9fa154f40eb6 ("drm/{i915,xe}: Run DRM default client setup") Signed-off-by: Yue Haibing Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250315120143.2344958-1-yuehaibing@huawei.com Signed-off-by: Jani Nikula commit f24d1d4a7a425e67551ca8d86a89df7102766ac9 Author: Maxime Ripard Date: Thu Mar 13 13:00:10 2025 +0100 drm/bridge: ti-sn65dsi86: Remove drm_encoder->crtc use The TI sn65dsi86 driver follows the drm_encoder->crtc pointer that is deprecated and shouldn't be used by atomic drivers. Fortunately, the atomic hooks provide the drm_atomic_state and we can access our current CRTC from that, going from the bridge to its encoder, to its connector, and to its CRTC. This bridge driver uses the atomic hooks already, but dereferences the drm_encoder->crtc pointer in functions that don't have access to it. Let's rework the driver to pass the state where needed, and remove the need for the drm_encoder->crtc dereference. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-16-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 070bac234bc6e8e925f87bb5a5ab1a98b890fce8 Author: Maxime Ripard Date: Thu Mar 13 13:00:09 2025 +0100 drm/bridge: tc358768: Convert to atomic helpers The tc358768 driver follows the drm_encoder->crtc pointer that is deprecated and shouldn't be used by atomic drivers. Fortunately, the atomic hooks provide the drm_atomic_state and we can access our current CRTC from that, going from the bridge to its encoder, to its connector, and to its CRTC. Let's convert this bridge driver to atomic so we can get rid of the drm_encoder->crtc dereference. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-15-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 9c77154b71ad936227d0c407835854604c532700 Author: Maxime Ripard Date: Thu Mar 13 13:00:08 2025 +0100 drm/bridge: tc358768: Stop disabling when failing to enable The tc358768 bridge driver, if enabling it fails, tries to disable it. This is pretty uncommon in bridge drivers, and also stands in the way for further reworks. Worse, since pre_enable and enable aren't expected to fail, disable and post_disable might be called twice: once to handle the failure, and once to actually disable the bridge. Since post_disable uses regulators and clocks, this would lead to enable count imbalances. In order to prevent that imbalance, and to allow further reworks, let's drop the calls to disable and post_disable, but keep the warning to let users know about what's going on. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-14-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit ae875180318a51b2812295e8948162108f5e46ef Author: Maxime Ripard Date: Thu Mar 13 13:00:07 2025 +0100 drm/bridge: tc358775: Switch to atomic commit The tc358775 driver follows the drm_encoder->crtc pointer that is deprecated and shouldn't be used by atomic drivers. Fortunately, the atomic hooks provide the drm_atomic_state and we can access our current CRTC from that, going from the bridge to its encoder, to its connector, and to its CRTC. Let's convert this bridge driver to atomic so we can get rid of the drm_encoder->crtc dereference. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-13-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 68c98e227a960c567530b2c4c6765fdeab993e3b Author: Maxime Ripard Date: Thu Mar 13 13:00:06 2025 +0100 drm/bridge: cdns-csi: Switch to atomic helpers The Cadence DSI driver follows the drm_encoder->crtc pointer that is deprecated and shouldn't be used by atomic drivers. Fortunately, the atomic hooks provide the drm_atomic_state and we can access our current CRTC from that, going from the bridge to its encoder, to its connector, and to its CRTC. Let's convert this bridge driver to atomic so we can get rid of the drm_encoder->crtc dereference. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-12-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit ba6c94d51a87bb4f1faacd3bfa33af57ea9b84eb Author: Maxime Ripard Date: Thu Mar 13 13:00:05 2025 +0100 drm/bridge: Introduce drm_bridge_is_atomic() helper We test for whether the bridge is atomic in several places in the source code, so let's consolidate them. Suggested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-11-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit e17fadff7ab9b1536af8120d161e6c0a450961ed Author: Maxime Ripard Date: Thu Mar 13 13:00:04 2025 +0100 drm/bridge: ti-sn65dsi83: Switch to drm_bridge_helper_reset_crtc Now that we have a helper for bridge drivers to call to reset the output pipeline, let's use it. Reviewed-by: Dmitry Baryshkov Reviewed-by: Herve Codina Tested-by: Herve Codina Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-10-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit d4dfff472e3936bd2ff3a61c3830237f8c442e41 Author: Maxime Ripard Date: Thu Mar 13 13:00:03 2025 +0100 drm/tests: bridge: Provide tests for drm_bridge_helper_reset_crtc Let's provide a bunch of kunit tests to make sure drm_bridge_helper_reset_crtc() works as expected. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-9-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 56ae6212417702f7e456007b2afa834810ed10a6 Author: Maxime Ripard Date: Thu Mar 13 13:00:02 2025 +0100 drm/bridge: Add helper to reset bridge pipeline Let's provide an helper to make it easier for bridge drivers to power-cycle their bridge. In order to avoid a circular dependency between that new helper and drm_atomic_helper_reset_crtc(), this new helper will be in a drm_bridge_helper.c file to follow the pattern we have for other objects. Reviewed-by: Herve Codina Reviewed-by: Simona Vetter Tested-by: Herve Codina Co-developed-by: Simona Vetter Signed-off-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-8-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit e0c358e2edf5906689ecb46053d755fcaf4339f0 Author: Maxime Ripard Date: Thu Mar 13 13:00:01 2025 +0100 drm/tests: Create tests for drm_atomic We don't have a set of kunit tests for the functions under drm_atomic.h. Let's use the introduction of drm_atomic_get_connector_for_encoder() to create some tests for it and thus create that set. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-7-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 6a5c0ad7e08e0345653058355ac1cdd0a7786af3 Author: Maxime Ripard Date: Thu Mar 13 13:00:00 2025 +0100 drm/tests: hdmi_state_helpers: Switch to new helper We introduced a new helper that supersedes the light_up_connector() function in drm_hdmi_state_helper_test, so let's convert all our tests to it. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-6-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit e4e3de631d148d075cb0b3dc3c4c62f1e70fc46c Author: Maxime Ripard Date: Thu Mar 13 12:59:59 2025 +0100 drm/tests: helpers: Create new helper to enable output We'll need the HDMI state tests light_up_connector() function in more tests, so let's promote it to a helper. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-5-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit a7e4886e06f723045ce52de69491196a08cf14e9 Author: Maxime Ripard Date: Thu Mar 13 12:59:58 2025 +0100 drm/atomic: Introduce helper to lookup connector by encoder With the bridges switching over to drm_bridge_connector, the direct association between a bridge driver and its connector was lost. This is mitigated for atomic bridge drivers by the fact you can access the encoder, and then call drm_atomic_get_old_connector_for_encoder() or drm_atomic_get_new_connector_for_encoder() with drm_atomic_state. This was also made easier by providing drm_atomic_state directly to all atomic hooks bridges can implement. However, bridge drivers don't have a way to access drm_atomic_state outside of the modeset path, like from the hotplug interrupt path or any interrupt handler. Let's introduce a function to retrieve the connector currently assigned to an encoder, without using drm_atomic_state, to make these drivers' life easier. Reviewed-by: Dmitry Baryshkov Reviewed-by: Simona Vetter Tested-by: Herve Codina Co-developed-by: Simona Vetter Signed-off-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-4-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 6b4dc0803a362f501047e08caddfeb92a580130d Author: Maxime Ripard Date: Thu Mar 13 12:59:57 2025 +0100 drm/tests: Add kunit tests for bridges None of the drm_bridge function have kunit tests so far. Let's change that, starting with drm_bridge_get_current_state(). Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-3-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 93b244866cf641f83130bb08946f84a6fdeeca4c Author: Maxime Ripard Date: Thu Mar 13 12:59:56 2025 +0100 drm/bridge: Provide a helper to retrieve current bridge state The current bridge state is accessible from the drm_bridge structure, but since it's fairly indirect it's not easy to figure out. Provide a helper to retrieve it. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-2-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 98007a0d56b07605c626c9bdb550b5ae5ce71453 Author: Maxime Ripard Date: Thu Mar 13 12:59:55 2025 +0100 drm/bridge: Add encoder parameter to drm_bridge_funcs.attach The drm_bridge structure contains an encoder pointer that is widely used by bridge drivers. This pattern is largely documented as deprecated in other KMS entities for atomic drivers. However, one of the main use of that pointer is done in attach to just call drm_bridge_attach on the next bridge to add it to the bridge list. While this dereferences the bridge->encoder pointer, it's effectively the same encoder the bridge was being attached to. We can make it more explicit by adding the encoder the bridge is attached to to the list of attach parameters. This also removes the need to dereference bridge->encoder in most drivers. Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-1-511c54a604fb@kernel.org Signed-off-by: Maxime Ripard commit 707bd8cceaac1af31d3eeeee166687bdde580fd3 Author: Manikandan Muralidharan Date: Thu Jun 20 15:28:56 2024 +0530 MAINTAINERS: update Microchip's Atmel-HLCDC driver maintainers Drop Sam Ravnborg and Boris Brezillon as they are no longer interested in maintaining the drivers. Add myself and Dharma Balasubiramani as the Maintainer and co-maintainer for Microchip's Atmel-HLCDC driver. Thanks for their work. Signed-off-by: Manikandan Muralidharan Acked-by: Sam Ravnborg Acked-by: Boris Brezillon Acked-by: Nicolas Ferre Link: https://patchwork.freedesktop.org/patch/msgid/20240620095856.777390-1-manikandan.m@microchip.com Signed-off-by: Boris Brezillon commit 880d851a7fe1bbb6d78ec59087f7cdba46292c36 Author: Pranav Tyagi Date: Tue Mar 18 11:12:50 2025 +0700 Documentation: vgaarbiter: Fix grammar Correct grammar issues: - Fix "co-exist" subject-verb agreement - Correct plural form of "server" in context of more than one legacy devices - Use passive mood for intro sentence of libpciaccess section Signed-off-by: Pranav Tyagi Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20250220164946.18007-1-pranav.tyagi03@gmail.com [Bagas: massage commit message] Signed-off-by: Bagas Sanjaya Link: https://patchwork.freedesktop.org/patch/msgid/20250318041249.20786-2-bagasdotme@gmail.com Signed-off-by: Maxime Ripard commit b96dabdba9b95f71ded50a1c094ee244408b2a8e Author: Tomasz Rusinowicz Date: Tue Feb 18 11:03:53 2025 +0100 drm/xe: Fix exporting xe buffers multiple times The `struct ttm_resource->placement` contains TTM_PL_FLAG_* flags, but it was incorrectly tested for XE_PL_* flags. This caused xe_dma_buf_pin() to always fail when invoked for the second time. Fix this by checking the `mem_type` field instead. Fixes: 7764222d54b7 ("drm/xe: Disallow pinning dma-bufs in VRAM") Cc: Thomas Hellström Cc: Rodrigo Vivi Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Michal Wajdeczko Cc: Matthew Brost Cc: Matthew Auld Cc: Nirmoy Das Cc: Jani Nikula Cc: intel-xe@lists.freedesktop.org Cc: # v6.8+ Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250218100353.2137964-1-jacek.lawrynowicz@linux.intel.com Signed-off-by: Thomas Hellström commit 52eb8cd788f1a56a0645c1f6650e5795e04aaed0 Merge: 28f79ac609de27 5da39dce1fa3c8 Author: Thomas Hellström Date: Wed Mar 19 11:08:52 2025 +0100 Merge drm/drm-next into drm-xe-next Backmerging to bring in the xe shrinker from drm-next. Signed-off-by: Thomas Hellström commit e95635d776a6bbb9ac46ae7602b9b1b74be42a3e Author: Ian Forbes Date: Fri Jan 31 14:03:21 2025 -0600 drm/vmwgfx: Switch to exclusively using GEM references Currently we use a combination of TTM and GEM reference counting which is cumbersome. TTM references are used for kernel internal BOs and operations like validation. Simply switching the ttm_bo_(get|put) calls to their GEM equivalents is insufficient as not all BOs are GEM BOs so we must set the GEM vtable for all BOs even if they are not exposed to userspace. Suggested-by: Christian König Signed-off-by: Ian Forbes Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20250131200321.193939-1-ian.forbes@broadcom.com commit f42c09e614f1bda96f5690be8d0bb273234febbc Author: Ian Forbes Date: Thu Jan 23 14:44:24 2025 -0600 drm/vmwgfx: Fix dumb buffer leak Dumb buffers were not being freed because the GEM reference that was acquired in gb_surface_define was not dropped like it is in the 2D case. Dropping this ref uncovered a few additional issues with freeing the resources associated with dirty tracking in vmw_bo_free/release. Additionally the TTM object associated with the surface were also leaking which meant that when the ttm_object_file was closed at process exit the destructor unreferenced an already destroyed surface. The solution is to remove the destructor from the vmw_user_surface associated with the dumb_buffer and immediately unreferencing the TTM object which his removes it from the ttm_object_file. This also allows the early return in vmw_user_surface_base_release for the dumb buffer case to be removed as it should no longer occur. The chain of references now has the GEM handle(s) owning the dumb buffer. The GEM handles have a singular GEM reference to the vmw_bo which is dropped when all handles are closed. When the GEM reference count hits zero the vmw_bo is freed which then unreferences the surface via vmw_resource_release in vmw_bo_release. Fixes: d6667f0ddf46 ("drm/vmwgfx: Fix handling of dumb buffers") Signed-off-by: Ian Forbes Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20250123204424.836896-1-ian.forbes@broadcom.com commit 223038731489c0ed6bdd3498ad187d4286536ce3 Author: Janusz Krzysztofik Date: Fri Mar 14 21:38:35 2025 +0100 drm/i915: Fix harmful driver register/unregister asymmetry Starting with commit ec3e00b4ee27 ("drm/i915: stop registering if drm_dev_register() fails"), we return from i915_driver_register() immediately if drm_dev_register() fails, skipping remaining registration steps, and continue only with remaining probe steps. However, the _unregister() counterpart called at driver remove knows nothing about that skip and executes reverts of all those steps. As a consequence, a number of kernel warnings that taint the kernel are triggered: <3> [525.823143] i915 0000:00:02.0: [drm] *ERROR* Failed to register driver for userspace access! ... <4> [525.831069] ------------[ cut here ]------------ <4> [525.831071] i915 0000:00:02.0: [drm] drm_WARN_ON(power_domains->init_wakeref) <4> [525.831095] WARNING: CPU: 6 PID: 3440 at drivers/gpu/drm/i915/display/intel_display_power.c:2074 intel_power_domains_disable+0xc2/0xd0 [i915] ... <4> [525.831328] CPU: 6 UID: 0 PID: 3440 Comm: i915_module_loa Tainted: G U 6.14.0-rc1-CI_DRM_16076-g7a632b6798b6+ #1 ... <4> [525.831334] RIP: 0010:intel_power_domains_disable+0xc2/0xd0 [i915] ... <4> [525.831483] Call Trace: <4> [525.831484] ... <4> [525.831943] i915_driver_remove+0x4b/0x140 [i915] <4> [525.832028] i915_pci_remove+0x1e/0x40 [i915] <4> [525.832099] pci_device_remove+0x3e/0xb0 <4> [525.832103] device_remove+0x40/0x80 <4> [525.832107] device_release_driver_internal+0x215/0x280 ... Moreover, that unexpected PM reference is left untouched (not released) but overwritten, then that triggers another kernel warning at driver release phase: <4> [526.685700] ------------[ cut here ]------------ <4> [526.685706] i915 0000:00:02.0: [drm] i915 raw-wakerefs=1 wakelocks=1 on cleanup <4> [526.685734] WARNING: CPU: 1 PID: 3440 at drivers/gpu/drm/i915/intel_runtime_pm.c:443 intel_runtime_pm_driver_release+0x75/0x90 [i915] ... <4> [526.686090] RIP: 0010:intel_runtime_pm_driver_release+0x75/0x90 [i915] ... <4> [526.686294] Call Trace: <4> [526.686296] ... <4> [526.687025] i915_driver_release+0x7e/0xb0 [i915] <4> [526.687243] drm_dev_put.part.0+0x47/0x90 <4> [526.687250] devm_drm_dev_init_release+0x13/0x30 <4> [526.687255] devm_action_release+0x12/0x30 <4> [526.687261] release_nodes+0x3a/0x120 <4> [526.687268] devres_release_all+0x97/0xe0 <4> [526.687277] device_unbind_cleanup+0x12/0x80 <4> [526.687282] device_release_driver_internal+0x23a/0x280 ... A call to intel_power_domains_disable() was already there. It triggers the drm_WARN_ON() when it finds a reference to a wakeref taken on device probe and not released after device registration failure. That wakeref is then left held forever once its handle gets lost overwritten with another wakeref, hence another WARN() is called from intel_runtime_pm_driver_release(). The WARN() triggered by kernfs_remove_by_name_ns() from i915_teardown_sysfs()->i915_gpu_error_sysfs_teardown(), formerly i915_teardown_error_capture(), was also there when the return was added. A call to intel_gt_sysfs_unregister() that triggers the WARN() from kobject_put() was added to intel_gt_driver_unregister() with commit 69d6bf5c3754ff ("drm/i915/gt: Fix memory leaks in per-gt sysfs"). Fix the asymmetry by failing the driver probe on device registration failure and going through rewind paths. For that to work as expected, we apparently need to start the rewind path of i915_driver_register() with drm_dev_unregister(), even if drm_dev_register() returned an error. v5: Drop unsigned keyword from ret variable declaration (Krzysztof), - keep the "Failed to register driver for userspace access" error message (Krzysztof), - split PXP cleanup addition to rewind path out to a separate patch. v4: Switch to taking an error rewind path on device registration failure (Krzysztof, Lucas). v3: Based on Andi's commitment on introducing a flag, try to address Jani's "must find another way" by finding a better place and name for the flag (in hope that's what Jani had on mind), - split into a series of patches and limit the scope of the first (this) one to a minimum of omitting conditionally only those unregister (sub)steps that trigger kernel warnings when not registered. v2: Check in _unregister whether the drm_dev_register has succeeded and skip some of the _unregister() steps. (Andi) Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10047 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10131 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10887 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12817 Cc: Lucas De Marchi Cc: Chris Wilson Cc: Ashutosh Dixit Cc: Andi Shyti Cc: Krzysztof Niemiec Cc: Jani Nikula Signed-off-by: Janusz Krzysztofik Reviewed-by: Krzysztof Niemiec Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20250314205202.809563-8-janusz.krzysztofik@linux.intel.com commit 4cce01dc3ecdf5fb9ae75723aea7873ef52e4005 Author: Janusz Krzysztofik Date: Fri Mar 14 21:38:34 2025 +0100 drm/i915: Fix PXP cleanup missing from probe error rewind Commit f67986b0119c04 ("drm/i915/pxp: Promote pxp subsystem to top-level of i915") added PXP initialization to driver probe path, but didn't add a respective PXP cleanup on probe error. That lack of cleanup seems harmless as long as PXP is still unused and idle when a probe failure occurs and error rewind path is entered, but as soon as PXP starts consuming device and driver resources keeping them busy, kernel warnings may be triggered when cleaning up resources provided by memory regions, GGTT, GEM and/or VMA cache from the probe error rewind and/or module unload paths because of missing PXP cleanup. That scenario was observed on attempts to fail the probe and enter the rewind path on injection of now ignored error in device registration path. Fix it. Cc: Alan Previn Cc: Daniele Ceraolo Spurio Signed-off-by: Janusz Krzysztofik Reviewed-by: Krzysztof Niemiec Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20250314205202.809563-7-janusz.krzysztofik@linux.intel.com commit 2ae485e3d11d34cb70fcfebf149f5f4fce97f089 Author: Janusz Krzysztofik Date: Fri Mar 14 21:38:33 2025 +0100 drm/i915: Downgrade device register error if injected Commit 8f460e2c78f2 ("drm/i915: Demidlayer driver loading") which introduced manual device registration also added a message that is submitted on device registration failure as an error. If that failure is triggered by error injection test, that's an expected error, but CI still reports it as a bug. Fix it. Suggested-by: Krzysztof Niemiec Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9820 Cc: Chris Wilson Cc: Daniel Vetter Signed-off-by: Janusz Krzysztofik Reviewed-by: Krzysztof Niemiec Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20250314205202.809563-6-janusz.krzysztofik@linux.intel.com commit 5ba97b5925229ab9211c72de7ff40283685876a3 Author: Andi Shyti Date: Fri Mar 14 03:12:24 2025 +0100 drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms msleep is very imprecise for timeouts shorter than 20 milliseconds and most probably will sleep longer. Use uslee_range() instead. Signed-off-by: Andi Shyti Reviewed-by: Sebastian Brzezinka Reviewed-by: Krzysztof Karas Link: https://patchwork.freedesktop.org/patch/msgid/20250314021225.11813-5-andi.shyti@linux.intel.com commit 5bebf804effe3dd85e01a71d6a1fd82f4a1b436f Author: Andi Shyti Date: Fri Mar 14 03:12:23 2025 +0100 drm/i915/gt: Remove trailing blank lines Remove useless blank lines before and after the brackets. Signed-off-by: Andi Shyti Reviewed-by: Sebastian Brzezinka Reviewed-by: Krzysztof Karas Link: https://patchwork.freedesktop.org/patch/msgid/20250314021225.11813-4-andi.shyti@linux.intel.com commit b6aa4b8b3ebf502898a8164bd7d1aa7d5870c1b9 Author: Andi Shyti Date: Fri Mar 14 03:12:22 2025 +0100 drm/i915/gt: Fix SPDX license format Header files need to declare the SPDX under /* ... */ style comments at the beginning of the file. Signed-off-by: Andi Shyti Reviewed-by: Sebastian Brzezinka Reviewed-by: Krzysztof Karas Link: https://patchwork.freedesktop.org/patch/msgid/20250314021225.11813-3-andi.shyti@linux.intel.com commit 1a7646d784513dcf0e8b16c1d9124ef54b4ec5e0 Author: Johan Hovold Date: Tue Mar 18 08:49:07 2025 +0100 arm64: dts: qcom: x1e001de-devkit: fix USB retimer reset polarity The ps8830 retimer reset is active low. Fix up the retimer nodes which were based on an early version of the driver which inverted the polarity. Fixes: 019e1ee32fec ("arm64: dts: qcom: x1e001de-devkit: Enable external DP support") Cc: Sibi Sankar Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20250318074907.13903-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 47c91531edd2a552a8131414e4bdb0654277ad6a Author: Muna Sinada Date: Fri Mar 14 11:56:05 2025 -0700 wifi: ath12k: remove open parenthesis PMF debug log has an open parenthesis that is not needed. Remove open parenthesis. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Muna Sinada Link: https://patch.msgid.link/20250314185605.68454-1-muna.sinada@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 9a1cf85c9c7cca15bfc452f207818977621dedf8 Author: Kees Cook Date: Mon Mar 10 15:23:40 2025 -0700 wifi: carl9170: Add __nonstring annotations for unterminated strings When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby eliminate the warning. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Cc: Christian Lamparter Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Christian Lamparter Link: https://patch.msgid.link/20250310222339.work.654-kees@kernel.org Signed-off-by: Jeff Johnson commit e92c658b056b31fbc923a59bd72d51ca9f2ba921 Author: Aditya Kumar Singh Date: Thu Mar 6 15:52:15 2025 +0530 wifi: ath12k: add get_txpower mac ops Driver does not support get_txpower mac ops because of which cfg80211 returns vif->bss_conf.txpower to user space. bss_conf.txpower gets its value from ieee80211_channel->max_reg_power. However, the final txpower is dependent on few other parameters apart from max regulatory supported power. It is the firmware which knows about all these parameters and considers the minimum for each packet transmission. All ath12k firmware reports the final TX power in firmware pdev stats which falls under fw_stats. add get_txpower mac ops to get the TX power from firmware leveraging fw_stats and return it accordingly. While at it, there is a possibility that repeated stats request WMI commands are queued to FW if mac80211/userspace does get tx power back to back(in Multiple BSS cases). This could potentially consume the WMI queue completely. Hence limit this by fetching the power only for every 5 seconds and reusing the value until the refresh timeout or when there is a change in channel. Also remove init_completion(&ar->fw_stats_complete) in ath12k_mac_hw_register() as ath12k_fw_stats_init() takes care of it for each ar. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Signed-off-by: Rameshkumar Sundaram Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250306102215.1300522-3-rameshkumar.sundaram@oss.qualcomm.com Signed-off-by: Jeff Johnson commit b8a0d83fe4c7a8d5c060eab91d9cc16bf0dcaa46 Author: Aditya Kumar Singh Date: Thu Mar 6 15:52:14 2025 +0530 wifi: ath12k: move firmware stats out of debugfs Currently, firmware stats, comprising pdev, vdev and beacon stats are part of debugfs. In firmware pdev stats, firmware reports the final Tx power used to transmit each packet. If driver wants to know the final Tx power being used at firmware level, it can leverage from firmware pdev stats. Move firmware stats out of debugfs context in order to leverage the final Tx power reported in it even when debugfs is disabled. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh Signed-off-by: Rameshkumar Sundaram Reviewed-by: Mahendran P Link: https://patch.msgid.link/20250306102215.1300522-2-rameshkumar.sundaram@oss.qualcomm.com Signed-off-by: Jeff Johnson commit 5e44b181bec8e2fe3826033360fc1a42bb432191 Author: Sriram R Date: Tue Mar 4 15:23:15 2025 +0530 wifi: ath12k: Pass correct values of center freq1 and center freq2 for 320 MHz Currently, for 320 MHz bandwidth, center frequency1 and center frequency2 are not passed correctly to the firmware. Set center frequency1 as the center frequency of the primary 160 MHz channel segment and center frequency2 as the center frequency of the 320 MHz channel and pass the values to the firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Signed-off-by: Suraj P Kizhakkethil Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250304095315.3050325-3-quic_surapk@quicinc.com Signed-off-by: Jeff Johnson commit b1b01e46a3db5ad44d1e4691ba37c1e0832cd5cf Author: Suraj P Kizhakkethil Date: Tue Mar 4 15:23:14 2025 +0530 wifi: ath12k: Pass correct values of center freq1 and center freq2 for 160 MHz Currently, for 160 MHz bandwidth, center frequency1 and center frequency2 are not passed correctly to the firmware. Set center frequency1 as the center frequency of the primary 80 MHz channel segment and center frequency2 as the center frequency of the 160 MHz channel and pass the values to the firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Suraj P Kizhakkethil Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250304095315.3050325-2-quic_surapk@quicinc.com Signed-off-by: Jeff Johnson commit bba4e13c0f337df4cab3d65ccdb5524eb81a00bf Author: Maulik Shah Date: Mon Mar 17 18:08:41 2025 +0530 arm64: dts: qcom: qcs8300: Add RPMh sleep stats Add RPMh stats to read low power statistics for various subsystem and SoC sleep modes. Signed-off-by: Maulik Shah Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250317-add_qcom_stats-v1-1-016ae05ac4b0@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 6464510651e8402cfb2dfa1ff9c30a6a1b11219a Author: Devi Priya Date: Thu Mar 13 16:33:58 2025 +0530 arm64: dts: qcom: ipq9574: Add nsscc node Add a node for the nss clock controller found on ipq9574 based devices. Reviewed-by: Konrad Dybcio Signed-off-by: Devi Priya Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250313110359.242491-6-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 75bfe7a0381e7fafd268e184b60b17574417a316 Merge: b53c2c23d3c2e5 28300ecedce41d Author: Bjorn Andersson Date: Mon Mar 17 10:11:57 2025 -0500 Merge branch '20250313110359.242491-1-quic_mmanikan@quicinc.com' into arm64-for-6.15 Merge the IPQ9574 NSSCC bindings from a topic branch in order to gain access to the clock and reset constants. commit b53c2c23d3c2e50473c0be17a392d4b03a296b52 Author: Johan Hovold Date: Wed Feb 19 14:41:18 2025 +0100 arm64: dts: qcom: x1e80100: enable rtc On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On X1E based Windows on Arm machines the offset is stored in a Qualcomm specific UEFI variable. Unlike on previous platforms the alarm registers are also unaccessible on X1E as they are owned by the ADSP. Assume all X1E machines use similar firmware and enable the RTC in the PMIC dtsi for now. Based on a patch by Jonathan Marek. [1] Link: https://lore.kernel.org/r/20241015004945.3676-4-jonathan@marek.ca # [1] Tested-by: Jens Glathe Tested-by: Joel Stanley Tested-by: Sebastian Reichel # Lenovo T14s Gen6 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250219134118.31017-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 409803681a55e061f5ea6be82f05f14c0b9c707e Author: Johan Hovold Date: Wed Feb 19 14:41:17 2025 +0100 arm64: dts: qcom: sc8280xp-x13s: switch to uefi rtc offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. Switch to using the Qualcomm specific UEFI variable that is used by the UEFI firmware (and Windows) to store the RTC offset. This specifically means that the RTC time will be synchronised between the UEFI firmware setup (or UEFI shell), Windows and Linux. Note however that Windows stores the RTC time in local time by default, while Linux typically uses UTC (i.e. as on X86). Tested-by: Jens Glathe Tested-by: Steev Klimaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250219134118.31017-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 47812144d39566da3f1dbc7a615f656969f99337 Author: Masahiro Yamada Date: Sun Dec 22 09:29:46 2024 +0900 xtensa: migrate to the generic rule for built-in DTB Commit 654102df2ac2 ("kbuild: add generic support for built-in boot DTBs") introduced generic support for built-in DTBs. Select GENERIC_BUILTIN_DTB to use the generic rule. To keep consistency across architectures, this commit also renames CONFIG_BUILTIN_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada Message-Id: <20241222002957.2582212-1-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 9bb5ca464100e7c8f2d740148088f60e04fed8ed Author: Luca Weiss Date: Fri Mar 14 09:21:16 2025 +0100 arm64: dts: qcom: sm8650: Fix domain-idle-state for CPU2 On SM8650 the CPUs 0-1 are "silver" (Cortex-A520), CPU 2-6 are "gold" (Cortex-A720) and CPU 7 is "gold-plus" (Cortex-X4). So reference the correct "gold" idle-state for CPU core 2. Fixes: d2350377997f ("arm64: dts: qcom: add initial SM8650 dtsi") Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250314-sm8650-cpu2-sleep-v1-1-31d5c7c87a5d@fairphone.com Signed-off-by: Bjorn Andersson commit f5b7564fedcfd32df68d56781b9d7698343f8fbf Author: Ivan Belokobylskiy Date: Sun Mar 16 23:16:55 2025 +0100 ARM: dts: qcom: Initial dts for LG Nexus 4 Add initial support for LG Nexus 4 (mako). Features currently working: regulators, eMMC, and volume keys. Signed-off-by: Ivan Belokobylskiy Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250316-lg-nexus4-mako-v5-1-79feae815a85@ixit.cz Signed-off-by: Bjorn Andersson commit cc13a858a79d8c5798a99e8cde677ea36272a5a0 Author: Jagadeesh Kona Date: Fri Jan 17 16:35:54 2025 +0530 arm64: dts: qcom: sa8775p: Add LMH interrupts for cpufreq_hw node Add LMH interrupts for cpufreq_hw node to indicate if there is any thermal throttle. Signed-off-by: Jagadeesh Kona Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250117-sa8775p-lmh-interrupts-v1-1-bae549f0bfe8@quicinc.com Signed-off-by: Bjorn Andersson commit 96c85e428ebaeacd2c640eba075479ab92072ccd Author: Vicki Pfau Date: Thu Mar 13 14:16:44 2025 -0700 drm: panel-orientation-quirks: Add ZOTAC Gaming Zone Add a panel orientation quirk for the ZOTAC Gaming Zone handheld gaming device. Signed-off-by: Vicki Pfau Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20250313211643.860786-2-vi@endrift.com Signed-off-by: Dmitry Baryshkov commit 54040a3e3da67ef0e014e5f04f9f3fe680fc4b55 Author: Tingguo Cheng Date: Fri Jan 17 11:24:31 2025 +0800 arm64: dts: qcom: qcs615: remove disallowed property in spmi bus node Remove the unevaluated 'cell-index' property from qcs615-ride.dtb spmi@c440000 to fix the Devicetree validation error reported by the kernel test robot. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202412272210.GpGmqcPC-lkp@intel.com/ Fixes: 27554e2bef4d ("arm64: dts: qcom: qcs615: Adds SPMI support") Signed-off-by: Tingguo Cheng Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250117-fix-kernel-test-robot-unexpected-property-issue-v2-1-0b68cf481249@quicinc.com [bjorn: Fixes commit message wording about LKP] Signed-off-by: Bjorn Andersson commit 1fcbbdc0806219153dd0761999ca4bf47d164787 Author: Maud Spierings Date: Sun Jan 19 15:50:52 2025 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Enable micro-sd card reader The asus vivobook s15 has a micro-sd card reader attached to usb_2. Enable usb_2 to enable this reader. Signed-off-by: Maud Spierings Link: https://lore.kernel.org/r/20250119-usb_a_micro_sd-v1-2-01eb7502ae05@hotmail.com Signed-off-by: Bjorn Andersson commit c0c46eea2444dcd78400bfa6b264f59dd55aaf42 Author: Maud Spierings Date: Sun Jan 19 15:50:51 2025 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Enable USB-A ports The asus vivobook has 2 USB type A ports on the right side, enable them Signed-off-by: Maud Spierings Link: https://lore.kernel.org/r/20250119-usb_a_micro_sd-v1-1-01eb7502ae05@hotmail.com Signed-off-by: Bjorn Andersson commit 4bf9fac3a85b90002de373b2f067864d837bac31 Author: Manikanta Mylavarapu Date: Mon Jan 20 12:15:08 2025 +0530 arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons Add support for wlan-2g LED on GPIO 42 and wps buttons on GPIO 19. Signed-off-by: Manikanta Mylavarapu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250120064508.2722341-1-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 27b85be287f96180de2499b981eec83850df0da9 Author: Eugene Lepshy Date: Tue Feb 18 01:24:31 2025 +0300 arm64: dts: qcom: sm7325-nothing-spacewar: Enable panel and GPU Enable the Adreno GPU and configure the Visionox RM692E5 panel. Signed-off-by: Eugene Lepshy Co-developed-by: Danila Tikhonov Signed-off-by: Danila Tikhonov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250217222431.82522-5-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 32768db9cfc56554d1570ac71aa204f0751bd12e Author: Matti Lehtimäki Date: Mon Feb 17 23:05:27 2025 +0100 ARM: dts: qcom: msm8226-samsung-matisse-common: Enable modem Enable modem remoteproc on samsung,matisse-wifi & matisselte. The mattisselte - being msm8926 - requires an extra mss-supply, so add that as well. Signed-off-by: Matti Lehtimäki Reviewed-by: Stephan Gerhold Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-13-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 36663812eeb5e57f1d167c33bcb1dc970333bef1 Author: Luca Weiss Date: Mon Feb 17 23:05:26 2025 +0100 ARM: dts: qcom: msm8926-htc-memul: Enable modem Enable the modem found on the MSM8926 HTC One Mini 2. Reviewed-by: Stephan Gerhold Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-12-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit fc532eb25c0aeca1d20e7d3c8d8a24b3ff39e3a9 Author: Luca Weiss Date: Mon Feb 17 23:05:25 2025 +0100 ARM: dts: qcom: Introduce dtsi for LTE-capable MSM8926 MSM8926, while being 'just' an LTE-capable variant of MSM8226, the dts needs to slightly change since the modem doesn't use the ext-bhs-reg and needs mss-supply, therefore it gets a new compatible. Since we already have two -common.dtsi files which are used on both APQ8026/MSM8226 and MSM8926 devices, change the setup a bit by removing the SoC include from those and requiring the device dts to pick the correct one. Reviewed-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-11-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 6b47ce06f22b3ad2921dda442be23abbe93ed251 Author: Luca Weiss Date: Mon Feb 17 23:05:24 2025 +0100 ARM: dts: qcom: msm8226: Add BAM DMUX Ethernet/IP device BAM DMUX is used as the network interface to the modem. Reviewed-by: Stephan Gerhold Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-10-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 075555387244b51d9414a35d3b1d9f58a4df0fe3 Author: Luca Weiss Date: Mon Feb 17 23:05:23 2025 +0100 ARM: dts: qcom: msm8226: Add modem remoteproc node Add a node for the modem remoteproc found on MSM8226. Co-developed-by: Matti Lehtimäki Signed-off-by: Matti Lehtimäki Reviewed-by: Stephan Gerhold Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-9-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 184cb65984ca164e4adb3abe3ec1549ed358d1bd Author: Matti Lehtimäki Date: Mon Feb 17 23:05:22 2025 +0100 ARM: dts: qcom: msm8226: Add smsm node Add smsm node for remoteproc cores. Reviewed-by: Stephan Gerhold Signed-off-by: Matti Lehtimäki Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-8-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 300edf73651b1151b18c0ef4b90cdf71946787f0 Author: Matti Lehtimäki Date: Mon Feb 17 23:05:21 2025 +0100 ARM: dts: qcom: msm8226: Add node for TCSR halt regs Add a syscon device node for the TCSR halt regs needed by modem and other remoteprocs. Signed-off-by: Matti Lehtimäki Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250217-msm8226-modem-v5-7-2bc74b80e0ae@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 39e6ca14ace9d138e40ddd42313c2649a6f3e69f Author: Vikram Sharma Date: Sun Feb 9 04:21:43 2025 +0530 arm64: dts: qcom: qcs6490-rb3gen2-vision-mezzanine: Add vision mezzanine The Vision Mezzanine for the Qualcomm RB3 Gen 2 ships with an imx577 camera sensor. Enable IMX577 on the vision mezzanine. An example media-ctl pipeline for the imx577 is: media-ctl --reset media-ctl -V '"imx577 '17-001a'":0[fmt:SRGGB10/4056x3040 field:none]' media-ctl -V '"msm_csiphy3":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' media-ctl -l '"msm_csiphy3":1->"msm_csid0":0[1]' media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 Signed-off-by: Hariram Purushothaman Signed-off-by: Trishansh Bhardwaj Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Vikram Sharma Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250208225143.2868279-3-quic_vikramsa@quicinc.com Signed-off-by: Bjorn Andersson commit d4da3adfc560fcb55578f8564d9f5a972507b118 Author: Vikram Sharma Date: Sun Feb 9 04:21:42 2025 +0530 arm64: dts: qcom: sc7280: Add support for camss Add changes to support the camera subsystem on the SC7280. Signed-off-by: Suresh Vankadara Signed-off-by: Trishansh Bhardwaj Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Vikram Sharma Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250208225143.2868279-2-quic_vikramsa@quicinc.com Signed-off-by: Bjorn Andersson commit 4f4c905e6a2a4e884f4e9b7326c94fac3500e0f9 Author: Varadarajan Narayanan Date: Fri Feb 7 13:05:45 2025 +0530 arm64: dts: qcom: ipq9574: Fix USB vdd info USB phys in ipq9574 use the 'L5' regulator. The commit ec4f047679d5 ("arm64: dts: qcom: ipq9574: Enable USB") incorrectly specified it as 'L2'. Because of this when the phy module turns off/on its regulators, the wrong regulator is turned off/on resulting in 2 issues, namely the correct regulator related to the USB phy is not turned off/on and the module powered by the incorrect regulator is affected. Fixes: ec4f047679d5 ("arm64: dts: qcom: ipq9574: Enable USB") Signed-off-by: Varadarajan Narayanan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250207073545.1768990-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit d40da533a701ef9e22f89e5ceee1ab48150daa30 Author: Taniya Das Date: Thu Feb 6 15:43:21 2025 +0530 arm64: dts: qcom: qcm6490-idp: Update protected clocks list Certain clocks are not accessible on QCM6490-IDP board, thus mark them as protected. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20250206-protected_clock_qcm6490-v1-1-5923e8c47ab5@quicinc.com [bjorn: Fix node sort order] Signed-off-by: Bjorn Andersson commit 55e52d055393f11ba0193975d3db87af36f4b273 Author: Johan Hovold Date: Fri Mar 14 15:54:40 2025 +0100 arm64: dts: qcom: x1e78100-t14s: fix missing HID supplies Add the missing HID supplies to avoid relying on other consumers to keep them on. This also avoids the following warnings on boot: i2c_hid_of 0-0010: supply vdd not found, using dummy regulator i2c_hid_of 0-0010: supply vddl not found, using dummy regulator i2c_hid_of 1-0015: supply vdd not found, using dummy regulator i2c_hid_of 1-002c: supply vdd not found, using dummy regulator i2c_hid_of 1-0015: supply vddl not found, using dummy regulator i2c_hid_of 1-002c: supply vddl not found, using dummy regulator i2c_hid_of 1-003a: supply vdd not found, using dummy regulator i2c_hid_of 1-003a: supply vddl not found, using dummy regulator Note that VCC3B is also used for things like the modem which are not yet described so mark the regulator as always-on for now. Fixes: 7d1cbe2f4985 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6") Cc: stable@vger.kernel.org # 6.12 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-9-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit ff6ba96378367133b66587bd3ee9f068a39ff3a9 Author: Johan Hovold Date: Fri Mar 14 15:54:39 2025 +0100 arm64: dts: qcom: x1e80100-qcp: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Cc: stable@vger.kernel.org # 6.8 Cc: Rajendra Nayak Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-8-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit f43a71dc6d8d8378af587675eec77c06e0298c79 Author: Johan Hovold Date: Fri Mar 14 15:54:38 2025 +0100 arm64: dts: qcom: x1e80100-yoga-slim7x: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Cc: stable@vger.kernel.org # 6.11 Cc: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 3ab4e212a41c46668adf93c8d10d0d3d6de8f0e4 Author: Johan Hovold Date: Fri Mar 14 15:54:37 2025 +0100 arm64: dts: qcom: x1e80100-hp-x14: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14") Cc: stable@vger.kernel.org # 6.14 Cc: Jens Glathe Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 63169c07d74031c5e10a9f91229dabade880cf0f Author: Johan Hovold Date: Fri Mar 14 15:54:36 2025 +0100 arm64: dts: qcom: x1e80100-dell-xps13-9345: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Note that these supplies currently have no consumers described in mainline. Fixes: f5b788d0e8cd ("arm64: dts: qcom: Add support for X1-based Dell XPS 13 9345") Cc: stable@vger.kernel.org # 6.13 Reviewed-by: Aleksandrs Vinarskis Tested-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 7d328cc134f7db1e062f616a30cffe96fbc43abb Author: Johan Hovold Date: Fri Mar 14 15:54:35 2025 +0100 arm64: dts: qcom: x1e001de-devkit: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: 7b8a31e82b87 ("arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows") Cc: stable@vger.kernel.org # 6.14 Cc: Sibi Sankar Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 673fa129e558c5f1196adb27d97ac90ddfe4f19c Author: Johan Hovold Date: Fri Mar 14 15:54:34 2025 +0100 arm64: dts: qcom: x1e78100-t14s: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: 7d1cbe2f4985 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6") Cc: stable@vger.kernel.org # 6.12 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit abf89bc4bb09c16a53d693b09ea85225cf57ff39 Author: Johan Hovold Date: Fri Mar 14 15:54:33 2025 +0100 arm64: dts: qcom: x1e80100-crd: mark l12b and l15b always-on The l12b and l15b supplies are used by components that are not (fully) described (and some never will be) and must never be disabled. Mark the regulators as always-on to prevent them from being disabled, for example, when consumers probe defer or suspend. Fixes: bd50b1f5b6f3 ("arm64: dts: qcom: x1e80100: Add Compute Reference Device") Cc: stable@vger.kernel.org # 6.8 Cc: Abel Vesa Cc: Rajendra Nayak Cc: Sibi Sankar Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250314145440.11371-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 3529d9536105b78d9756ef81722554a7f9e3c6b0 Author: Johan Hovold Date: Fri Mar 7 18:10:36 2025 +0100 arm64: dts: qcom: sc8280xp-crd: add support for volume-up key Add support for the keypad volume-up key on the debug extension board. This is useful to have when testing PMIC interrupt handling, and the key can also be used to wake up from deep suspend states (CX shutdown). Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250307171036.7276-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 7bcf7246c42a81e77fbe18a0a3e7c2813c1690a6 Merge: 9913212bce907b 52f52ea79a4c8c Author: Paolo Bonzini Date: Wed Mar 12 07:59:07 2025 -0400 Merge branch 'kvm-tdx-finish-initial' into HEAD This patch ties the remaining loose ends and finally enables TDX guests to run inside KVM. It implements handling of EPT violation/misconfig and of several TDVMCALL leaves that are handled in the kernel (CPUID, HLT, RDMSR/WRMSR, GetTdVmCallInfo); it also adds a bunch of wrappers in vmx/main.c to ignore operations not supported by TDX guests(*) Finally, it introduces documentation for the new APIs that have been added along the way. (*) access to CPU state, VMX preemption timer, accesses to TSC offset or multiplier, LMCE enable/disable, hypercall patching. commit 9913212bce907b5fec014490d8e5a282d109ffeb Merge: 4d2dc9a2676513 6c441e4d6e7296 Author: Paolo Bonzini Date: Wed Mar 12 07:41:52 2025 -0400 Merge branch 'kvm-tdx-interrupts' into HEAD Introduces support for interrupt handling for TDX guests, including virtual interrupt injection and VM-Exits caused by vectored events. Injection ========= TDX supports non-NMI interrupt injection only by posted interrupt. Posted interrupt descriptors (PIDs) are allocated in shared memory, KVM can update them directly. To post pending interrupts in the PID, KVM can generate a self-IPI with notification vector prior to TD entry. TDX guest status is protected, KVM can't get the interrupt status of TDX guest. For now, assume the interrupt is always allowed. A later patch set will let TDX guests to call TDVMCALL with HLT, which passes the interrupt block flag, so that whether interrupt is allowed in HLT will checked against the interrupt block flag. For NMIs, KVM can request the TDX module to inject a NMI into a TDX vCPU by setting the PEND_NMI TDVPS field to 1. Following that, KVM can call TDH.VP.ENTER to run the vCPU and the TDX module will attempt to inject the NMI as soon as possible. PEND_NMI TDVPS field is a 1-bit filed, i.e. KVM can only pend one NMI in the TDX module. Also, TDX doesn't allow KVM to request NMI-window exit directly. When there is already one NMI pending in the TDX module, i.e. it has not been delivered to TDX guest yet, if there is NMI pending in KVM, collapse the pending NMI in KVM into the one pending in the TDX module. Such collapse is OK considering on X86 bare metal, multiple NMIs could collapse into one NMI, e.g. when NMI is blocked by SMI. It's OS's responsibility to poll all NMI sources in the NMI handler to avoid missing handling of some NMI events. More details can be found in the changelog of the patch "KVM: TDX: Implement methods to inject NMI". TDX doesn't support system-management mode (SMM) and system-management interrupt (SMI) in guest TDs because TDX module doesn't provide a way for VMM to inject SMI into guest TD or switch guest vCPU mode into SMM. SMI requests return -ENOTTY similar to CONFIG_KVM_SMM=n. Likewise, INIT and SIPI events are not used and are blocked for TDX guests; TDX defines its own vCPU creation and initialization sequence, which is done on the host via SEAMCALLs at TD build time. VM-exit for external events =========================== Similar to the VMX case, external interrupts are with interrupts off: in the .handle_exit_irqoff() callback for external interrupts and in the noinstr region for NMIs. Just like VMX, NMI remains blocked after exiting from TDX guest for NMI-induced exits. Machine check, which is handled in the .handle_exit_irqoff() callback, is the only exception type KVM handles for TDX guests. For other exceptions, because TDX guest state is protected, exceptions in TDX guests can't be intercepted. TDX VMM isn't supposed to handle these exceptions. Exit to userspace with KVM_EXIT_EXCEPTION If unexpected exception occurs. Host SMIs also cause an exit to KVM. This is needed because in SEAM root mode (TDX module) all interrupts are blocked. An SMI can be "I/O SMI" or "other SMI". For TDX, there will be no I/O SMI because I/O instructions inside TDX guest trigger #VE and TDX guest needs to use TDVMCALL to request VMM to do I/O emulation. The only case of interest for "other SMI" is an #MC occurring in the guest when MCE-SMI morphing is enabled in the host firmware. Such "MSMI" is marked by having bit 0 set in the exit qualification; MSMI exits are fatal for the TD and are eventually handled by the kernel machine check handler (7911f14 x86/mce: Implement recovery for errors in TDX/SEAM non-root mode), which marks the page as poisoned. It is not possible right now to pass machine check exceptions to the guest. SMIs other than machine check SMIs are handled just by leaving SEAM root mode and KVM doesn't need to do anything. commit 4d2dc9a26765131641c545549ad5476ae7f4d611 Merge: 77ab80c6bda044 bb723bebde1eee Author: Paolo Bonzini Date: Wed Mar 12 07:41:52 2025 -0400 Merge branch 'kvm-tdx-userspace-exit' into HEAD Introduces support for VM exits that are forwarded the host VMM in userspace. These are initiated from the TDCALL exit code; although these userspace exits have the same TDX exit code, they result in several different types of exits to userspace. When a guest TD issues a TDVMCALL, it exits to VMM with a new exit reason. The arguments from the guest TD and return values from the VMM are passed through the guest registers. The ABI details for the guest TD hypercalls are specified in the TDX GHCI specification. There are two types of hypercalls defined in the GHCI specification: - Standard TDVMCALLs: When input of R10 from guest TD is set to 0, it indicates that the TDVMCALL sub-function used in R11 is defined in GHCI specification. - Vendor-Specific TDVMCALLs: When input of R10 from guest TD is non-zero, it indicates a vendor-specific TDVMCALL. KVM hypercalls from the guest follow this interface, using R10 as KVM hypercall number and R11-R14 as 4 arguments. The error code returned in R10. This series includes basic standard TDVMCALLs that map to existing eixt reasons: - TDG.VP.VMCALL reuses exit reason KVM_EXIT_HYPERCALL with the hypercall number KVM_HC_MAP_GPA_RANGE. - TDG.VP.VMCALL reuses exit reason KVM_EXIT_SYSTEM_EVENT with a new event type KVM_SYSTEM_EVENT_TDX_FATAL. - TDG.VP.VMCALL reuses exit reason KVM_EXIT_IO. - TDG.VP.VMCALL<#VE.RequestMMIO> reuses exit reason KVM_EXIT_MMIO. Notably, handling for TDG.VP.VMCALL and TDG.VP.VMCALL is not included yet. commit 77ab80c6bda044a716da2d2022f6d93e46c052ac Merge: fcbe34825a99c4 484612f1a7d738 Author: Paolo Bonzini Date: Wed Mar 12 07:38:46 2025 -0400 Merge branch 'kvm-tdx-enter-exit' into HEAD This series introduces callbacks to facilitate the entry of a TD VCPU and the corresponding save/restore of host state. A TD VCPU is entered via the SEAMCALL TDH.VP.ENTER. The TDX Module manages the save/restore of guest state and, in conjunction with the SEAMCALL interface, handles certain aspects of host state. However, there are specific elements of the host state that require additional attention, as detailed in the Intel TDX ABI documentation for TDH.VP.ENTER. TDX is quite different from VMX in this regard. For VMX, the host VMM is heavily involved in restoring, managing and saving guest CPU state, whereas for TDX this is handled by the TDX Module. In that way, the TDX Module can protect the confidentiality and integrity of TD CPU state. The TDX Module does not save/restore all host CPU state because the host VMM can do it more efficiently and selectively. CPU state referred to below is host CPU state. Often values are already held in memory so no explicit save is needed, and restoration may not be needed if the kernel is not using a feature. TDX does not support PAUSE-loop exiting. According to the TDX Module Base arch. spec., hypercalls are expected to be used instead. Note that the Linux TDX guest supports existing hypercalls via TDG.VP.VMCALL. This series requires TDX module 1.5.06.00.0744, or later, due to removal of the workarounds for the lack of the NO_RBP_MOD feature required by the kernel. NO_RBP_MOD is now required. commit fcbe34825a99c4f6bc9344193c83864cbc4f907e Merge: 0d20742b8e6bd9 eac0b72fae3936 Author: Paolo Bonzini Date: Thu Mar 6 11:21:46 2025 -0500 Merge branch 'kvm-tdx-mmu' into HEAD This series picks up from commit 86eb1aef7279 ("Merge branch 'kvm-mirror-page-tables' into HEAD", 2025-01-20), which focused on changes to the generic x86 parts of the KVM MMU code, and adds support for TDX's secure page tables to the Intel side of KVM. Confidential computing solutions have concepts of private and shared memory. Often the guest accesses either private or shared memory via a bit in the guest PTE. Solutions like SEV treat this bit more like a permission bit, where solutions like TDX and ARM CCA treat it more like a GPA bit. In the latter case, the host maps private memory in one half of the address space and shared in another. For TDX these two halves are mapped by different EPT roots. The private half (also called Secure EPT in Intel documentation) gets managed by the privileged TDX Module. The shared half is managed by the untrusted part of the VMM (KVM). In addition to the separate roots for private and shared, there are limitations on what operations can be done on the private side. Like SNP, TDX wants to protect against protected memory being reset or otherwise scrambled by the host. In order to prevent this, the guest has to take specific action to “accept” memory after changes are made by the VMM to the private EPT. This prevents the VMM from performing many of the usual memory management operations that involve zapping and refaulting memory. The private memory also is always RWX and cannot have VMM specified cache attribute attributes applied. TDX memory implementation ========================= Creating shared EPT ------------------- Shared EPT handling is relatively simple compared to private memory. It is managed from within KVM. The main differences between shared EPT and EPT in a normal VM are that the root is set with a TDVMCS field (via SEAMCALL), and that the GFN specified in the memslot perspective needs to be mapped at an offset in the EPT. For the former, this series plumbs in the load_mmu_pgd() operation to the correct field for the shared EPT. For the latter, previous patches have laid the groundwork for mapping so called “direct roots” roots at an offset specified in kvm->arch.gfn_direct_bits. Creating private EPT -------------------- In previous patches, the concept of “mirrored roots” were introduced. Such roots maintain a KVM side “mirror” of the “external” EPT by keeping an unmapped EPT tree within the KVM MMU code. When changing these mirror EPTs, the KVM MMU code calls out via x86_ops to update the external EPT. This series adds implementations for these “external” ops for TDX to create and manage “private” memory via TDX module APIs. Managing S-EPT with the TDX Module ---------------------------------- The TDX module allows the TD’s private memory to be managed via SEAMCALLs. This management consists of operating on two internal elements: 1. The private EPT, which the TDX module calls the S-EPT. It maps the actual mapped, private half of the GPA space using an EPT tree. 2. The HKID, which represents private encryption keys used for encrypting TD memory. The CPU doesn’t guarantee cache coherency between these encryption keys, so memory that is encrypted with one of these keys needs to be reclaimed for use on the host in special ways. This series will primarily focus on the SEAMCALLs for managing the private EPT. Consideration of the HKID is needed for when the TD is torn down. Populating TDX Private memory ----------------------------- TDX allows the EPT mapping the TD's private memory to be modified in limited ways. There are SEAMCALLs for building and tearing down the EPT tree, as well as mapping pages into the private EPT. As for building and tearing down the EPT page tables, it is relatively simple. There are SEAMCALLs for installing and removing them. However, the current implementation only supports adding private EPT page tables, and leaves them installed for the lifetime of the TD. For teardown, the details are discussed in a later section. As for populating and zapping private SPTE, there are SEAMCALLs for this as well. The zapping case will be described in detail later. As for the populating case, there are two categories: before TD is finalized and after TD is finalized. Both of these scenarios go through the TDP MMU map path. The changes done previously to introduce “mirror” and “external” page tables handle directing SPTE installation operations through the set_external_spte() op. In the “after” case, the TDX set_external_spte() handler simply calls a SEAMCALL (TDX.MEM.PAGE.AUG). For the before case, it is a bit more complicated as it requires both setting the private SPTE *and* copying in the initial contents of the page at the same time. For TDX this is done via the KVM_TDX_INIT_MEM_REGION ioctl, which is effectively the kvm_gmem_populate() operation. For SNP, the private memory can be pre-populated first, and faulted in later like normal. But for TDX these need to both happen both at the same time and the setting of the private SPTE needs to happen in a different way than the “after” case described above. It needs to use the TDH.MEM.SEPT.ADD SEAMCALL which does both the copying in of the data and setting the SPTE. Without extensive modification to the fault path, it’s not possible utilize this callback from the set_external_spte() handler because it the source page for the data to be copied in is not known deep down in this callchain. So instead the post-populate callback does a three step process. 1. Pre-fault the memory into the mirror EPT, but have the set_external_spte() not make any SEAMCALLs. 2. Check that the page is still faulted into the mirror EPT under read mmu_lock that is held over this and the following step. 3. Call TDH.MEM.SEPT.ADD with the HPA of the page to copy data from, and the private page installed in the mirror EPT to use for the private mapping. The scheme involves some assumptions about the operations that might operate on the mirrored EPT before the VM is finalized. It assumes that no other memory will be faulted into the mirror EPT, that is not also added via TDH.MEM.SEPT.ADD). If this is violated the KVM MMU may not see private memory faulted in there later and so not make the proper external spte callbacks. To check this, KVM enforces that the number of pre-faulted pages is the same as the number of pages added via KVM_TDX_INIT_MEM_REGION. TDX TLB flushing ---------------- For TDX, TLB flushing needs to happen in different ways depending on whether private and/or shared EPT needs to be flushed. Shared EPT can be flushed like normal EPT with INVEPT. To avoid reading TD's EPTP out from TDX module, this series flushes shared EPT with type 2 INVEPT. Private TLB entries can be flushed this way too (via type 2). However, since the TDX module needs to enforce some guarantees around which private memory is mapped in the TD, it requires these operations to be done in special ways for private memory. For flushing private memory, two methods are possible. The simple one is the TDH.VP.FLUSH SEAMCALL; this flush is of the INVEPT type 1 variety (i.e. mappings associated with the TD). The second method is part of a sequence of SEAMCALLs for removing a guest page. The sequence looks like: 1. TDH.MEM.RANGE.BLOCK - Remove RWX bits from entry (similar to KVM’s zap). 2. TDH.MEM.TRACK - Increment the TD TLB epoch, which is a per-TD counter 3. Kick off all vCPUs - In order to force them to have to re-enter. 4. TDH.MEM.PAGE.REMOVE - Actually remove the page and make it available for other use. 5. TDH.VP.ENTER - On re-entering TDX module will see the epoch is incremented and flush the TLB. On top of this, during TDX module init TDH.SYS.LP.INIT (which is used to online a CPU for TDX usage) invokes INVEPT to flush all mappings in the TLB. During runtime, for normal (TDP MMU, non-nested) guests, KVM will do a TLB flushes in 4 scenarios: (1) kvm_mmu_load() After EPT is loaded, call kvm_x86_flush_tlb_current() to invalidate TLBs for current vCPU loaded EPT on current pCPU. (2) Loading vCPU to a new pCPU Send request KVM_REQ_TLB_FLUSH to current vCPU, the request handler will call kvm_x86_flush_tlb_all() to flush all EPTs assocated with the new pCPU. (3) When EPT mapping has changed (after removing or permission reduction) (e.g. in kvm_flush_remote_tlbs()) Send request KVM_REQ_TLB_FLUSH to all vCPUs by kicking all them off, the request handler on each vCPU will call kvm_x86_flush_tlb_all() to invalidate TLBs for all EPTs associated with the pCPU. (4) When EPT changes only affects current vCPU, e.g. virtual apic mode changed. Send request KVM_REQ_TLB_FLUSH_CURRENT, the request handler will call kvm_x86_flush_tlb_current() to invalidate TLBs for current vCPU loaded EPT on current pCPU. Only the first 3 are relevant to TDX. They are implemented as follows. (1) kvm_mmu_load() Only the shared EPT root is loaded in this path. The TDX module does not require any assurances about the operation, so the flush_tlb_current()->ept_sync_global() can be called as normal. (2) vCPU load When a vCPU migrates to a new logical processor, it has to be flushed on the *old* pCPU, unlike normal VMs where the INVEPT is executed on the new pCPU to remove stale mappings from previous usage of the same EPTP on the new pCPU. The TDX behavior comes from a requirement that a vCPU can only be associated with one pCPU at at time. This flush happens via an IPI that invokes TDH.VP.FLUSH SEAMCALL, during the vcpu_load callback. (3) Removing a private SPTE This is the more complicated flow. It is done in a simple way for now and is especially inefficient during VM teardown. The plan is to get a basic functional version working and optimize some of these flows later. When a private page mapping is removed, the core MMU code calls the newly remove_external_spte() op, and flushes the TLB on all vCPUs. But TDX can’t rely on doing that for private memory, so it has it’s own process for making sure the private page is removed. This flow (TDH.MEM.RANGE.BLOCK, TDH.MEM.TRACK, TDH.MEM.PAGE.REMOVE) is done withing the remove_external_spte() implementation as described in the “TDX TLB flushing” section above. After that, back in the core MMU code, KVM will call kvm_flush_remote_tlbs*() resulting in an INVEPT. Despite that, when the vCPUs re-enter (TDH.VP.ENTER) the TD, the TDX module will do another INVEPT for its own reassurance. Private memory teardown ----------------------- Tearing down private memory involves reclaiming three types of resources from the TDX module: 1. TD’s HKID To reclaim the TD’s HKID, no mappings may be mapped with it. 2. Private guest pages (mapped with HKID) 3. Private page tables that map private pages (mapped with HKID) From the TDX module’s perspective, to reclaim guest private pages they need to be prevented from be accessed via the HKID (unmapped and TLB flushed), their HKID associated cachelines need to be flushed, and they need to be marked as no longer use by the TD in the TDX modules internal tracking (PAMT) During runtime private PTEs can be zapped as part of memslot deletion or when memory coverts from shared to private, but private page tables and HKIDs are not torn down until the TD is being destructed. The means the operation to zap private guest mapped pages needs to do the required cache writeback under the assumption that other vCPU’s may be active, but the PTs do not. TD teardown resource reclamation -------------------------------- The code that does the TD teardown is organized such that when an HKID is reclaimed: 1. vCPUs will no longer enter the TD 2. The TLB is flushed on all CPUs 3. The HKID associated cachelines have been flushed. So at that point most of the steps needed to reclaim TD private pages and page tables have already been done and the reclaim operation only needs to update the TDX module’s tracking of page ownership. For simplicity each operation only supports one scenario: before or after HKID reclaim. Since zapping and reclaiming private pages has to function during runtime for memslot deletion and converting from shared to private, the TD teardown is arranged so this happens before HKID reclaim. Since private page tables are never torn down during TD runtime, they can happen in a simpler and more efficient way after HKID reclaim. The private page reclaim is initiated from the kvm fd release. The callchain looks like this: do_exit |->exit_mm --> tdx_mmu_release_hkid() was called here previously in v19 |->exit_files |->1.release vcpu fd |->2.kvm_gmem_release | |->kvm_gmem_invalidate_begin --> unmap all leaf entries, causing | zapping of private guest pages |->3.release kvmfd |->kvm_destroy_vm |->kvm_arch_pre_destroy_vm | | kvm_x86_call(vm_pre_destroy)(kvm) -->tdx_mmu_release_hkid() |->kvm_arch_destroy_vm |->kvm_unload_vcpu_mmus | kvm_destroy_vcpus(kvm) | |->kvm_arch_vcpu_destroy | |->kvm_x86_call(vcpu_free)(vcpu) | | kvm_mmu_destroy(vcpu) -->unref mirror root | kvm_mmu_uninit_vm(kvm) --> mirror root ref is 1 here, | zap private page tables | static_call_cond(kvm_x86_vm_destroy)(kvm); commit 0d20742b8e6bd94a3a335c061557ec9592a3444b Merge: 74c1807f6c4fed 7c035bea94074b Author: Paolo Bonzini Date: Thu Mar 6 11:06:04 2025 -0500 Merge branch 'kvm-tdx-initialization' into HEAD This series kicks off the actual interaction of KVM with the TDX module. This series encompasses the basic setup for using the TDX module from KVM, and the creation of TD VMs and vCPUs. The TDX Module is a software component that runs in a special CPU mode called SEAM (Secure Arbitration Mode). Loading it is mostly handled outside of KVM by the core kernel. Once it’s loaded KVM can interact with the TDX Module via a new instruction called SEAMCALL to virtualize a TD guests. This instruction can be used to make various types of seamcalls, with names organized into a hierarchy. The format is TDH.[AREA].[ACTION], where “TDH” stands for “Trust Domain Host”, and differentiates from another set of calls that can be done by the guest “TDG”. The KVM relevant areas of SEAMCALLs are: SYS – TDX module management, static metadata reading. MNG – TD management. VM scoped things that operate on a TDX module controlled structure called the TDCS. VP – vCPU management. vCPU scoped things that operate on TDX module controlled structures called the TDVPS. PHYMEM - Operations related to physical memory management (page reclaiming, cache operations, etc). This series introduces some TDX specific KVM APIs and stops short of fully “finalizing” the creation of a TD VM. The part of initializing a guest where initial private memory is loaded is left to a separate MMU related series. commit 52f52ea79a4c8c21d5aa00a5453da000ad37c67f Author: Isaku Yamahata Date: Thu Feb 27 09:20:21 2025 +0800 Documentation/virt/kvm: Document on Trust Domain Extensions (TDX) Add documentation to Intel Trusted Domain Extensions (TDX) support. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-21-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 161d34609f9b319d0706eaf7d2cb7a2731251b25 Author: Isaku Yamahata Date: Tue Dec 10 08:49:43 2024 +0800 KVM: TDX: Make TDX VM type supported Now all the necessary code for TDX is in place, it's ready to run TDX guest. Advertise the VM type of KVM_X86_TDX_VM so that the user space VMM like QEMU can start to use it. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu --- TDX "the rest" v2: - No change. TDX "the rest" v1: - Move down to the end of patch series. Signed-off-by: Paolo Bonzini commit 90fe64a94d5475738ca5db781cdf93ab39bf844f Author: Yan Zhao Date: Mon Feb 24 15:10:39 2025 +0800 KVM: TDX: KVM: TDX: Always honor guest PAT on TDX enabled guests Always honor guest PAT in KVM-managed EPTs on TDX enabled guests by making self-snoop feature a hard dependency for TDX and making quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT not a valid quirk once TDX is enabled. The quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT only affects memory type of KVM-managed EPTs. For the TDX-module-managed private EPT, memory type is always forced to WB now. Honoring guest PAT in KVM-managed EPTs ensures KVM does not invoke kvm_zap_gfn_range() when attaching/detaching non-coherent DMA devices, which would cause mirrored EPTs for TDs to be zapped, leading to the TDX-module-managed private EPT being incorrectly zapped. As a new feature, TDX always comes with support for self-snoop, and does not have to worry about unmodifiable but buggy guests. So, simply ignore KVM_X86_QUIRK_IGNORE_GUEST_PAT on TDX guests just like kvm-amd.ko already does. Suggested-by: Sean Christopherson Signed-off-by: Yan Zhao Message-ID: <20250224071039.31511-1-yan.y.zhao@intel.com> [Only apply to TDX guests. - Paolo] Signed-off-by: Paolo Bonzini commit 3fee4837ef405597971e9486e46a92270eadae5e Author: Paolo Bonzini Date: Mon Mar 3 11:31:50 2025 -0500 KVM: x86: remove shadow_memtype_mask The IGNORE_GUEST_PAT quirk is inapplicable, and thus always-disabled, if shadow_memtype_mask is zero. As long as vmx_get_mt_mask is not called for the shadow paging case, there is no need to consult shadow_memtype_mask and it can be removed altogether. Signed-off-by: Paolo Bonzini commit c9c1e20b4c7d60fa084b3257525d21a49fe651a1 Author: Yan Zhao Date: Mon Feb 24 15:09:45 2025 +0800 KVM: x86: Introduce Intel specific quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT Introduce an Intel specific quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT to have KVM ignore guest PAT when this quirk is enabled. On AMD platforms, KVM always honors guest PAT. On Intel however there are two issues. First, KVM *cannot* honor guest PAT if CPU feature self-snoop is not supported. Second, UC access on certain Intel platforms can be very slow[1] and honoring guest PAT on those platforms may break some old guests that accidentally specify video RAM as UC. Those old guests may never expect the slowness since KVM always forces WB previously. See [2]. So, introduce a quirk that KVM can enable by default on all Intel platforms to avoid breaking old unmodifiable guests. Newer userspace can disable this quirk if it wishes KVM to honor guest PAT; disabling the quirk will fail if self-snoop is not supported, i.e. if KVM cannot obey the wish. The quirk is a no-op on AMD and also if any assigned devices have non-coherent DMA. This is not an issue, as KVM_X86_QUIRK_CD_NW_CLEARED is another example of a quirk that is sometimes automatically disabled. Suggested-by: Paolo Bonzini Suggested-by: Sean Christopherson Cc: Kevin Tian Signed-off-by: Yan Zhao Link: https://lore.kernel.org/all/Ztl9NWCOupNfVaCA@yzhao56-desk.sh.intel.com # [1] Link: https://lore.kernel.org/all/87jzfutmfc.fsf@redhat.com # [2] Message-ID: <20250224070946.31482-1-yan.y.zhao@intel.com> [Use supported_quirks/inapplicable_quirks to support both AMD and no-self-snoop cases, as well as to remove the shadow_memtype_mask check from kvm_mmu_may_ignore_guest_pat(). - Paolo] Signed-off-by: Paolo Bonzini commit bd7d5362b4c4ac8b951385867a0fadfae0ba3c07 Author: Yan Zhao Date: Mon Feb 24 15:08:32 2025 +0800 KVM: x86: Introduce supported_quirks to block disabling quirks Introduce supported_quirks in kvm_caps to store platform-specific force-enabled quirks. No functional changes intended. Signed-off-by: Yan Zhao Message-ID: <20250224070832.31394-1-yan.y.zhao@intel.com> [Remove unsupported quirks at KVM_ENABLE_CAP time. - Paolo] Signed-off-by: Paolo Bonzini commit a4dae7c7a41d803a05192015b2d47aca8aca4abf Author: Paolo Bonzini Date: Mon Mar 3 11:18:38 2025 -0500 KVM: x86: Allow vendor code to disable quirks In some cases, the handling of quirks is split between platform-specific code and generic code, or it is done entirely in generic code, but the relevant bug does not trigger on some platforms; for example, this will be the case for "ignore guest PAT". Allow unaffected vendor modules to disable handling of a quirk for all VMs via a new entry in kvm_caps. Such quirks remain available in KVM_CAP_DISABLE_QUIRKS2, because that API tells userspace that KVM *knows* that some of its past behavior was bogus or just undesirable. In other words, it's plausible for userspace to refuse to run if a quirk is not listed by KVM_CAP_DISABLE_QUIRKS2, so preserve that and make it part of the API. As an example, mark KVM_X86_QUIRK_CD_NW_CLEARED as auto-disabled on Intel systems. Signed-off-by: Paolo Bonzini commit 9966b7822b3f49b3aea5d926ece4bc92f1f0a700 Author: Paolo Bonzini Date: Mon Mar 3 09:09:37 2025 -0500 KVM: x86: do not allow re-enabling quirks Allowing arbitrary re-enabling of quirks puts a limit on what the quirks themselves can do, since you cannot assume that the quirk prevents a particular state. More important, it also prevents KVM from disabling a quirk at VM creation time, because userspace can always go back and re-enable that. Signed-off-by: Paolo Bonzini commit 26eab9ae4be0255ecb603684b46841857f71df90 Author: Binbin Wu Date: Thu Feb 27 09:20:19 2025 +0800 KVM: TDX: Enable guest access to MTRR MSRs Allow TDX guests to access MTRR MSRs as what KVM does for normal VMs, i.e., KVM emulates accesses to MTRR MSRs, but doesn't virtualize guest MTRR memory types. TDX module exposes MTRR feature to TDX guests unconditionally. KVM needs to support MTRR MSRs accesses for TDX guests to match the architectural behavior. Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-19-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 0b75889b0cca92a5692d4266921f9604fcf9ae28 Author: Isaku Yamahata Date: Thu Feb 27 09:20:18 2025 +0800 KVM: TDX: Add a method to ignore hypercall patching Because guest TD memory is protected, VMM patching guest binary for hypercall instruction isn't possible. Add a method to ignore hypercall patching. Note: guest TD kernel needs to be modified to use TDG.VP.VMCALL for hypercall. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-18-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 79264ff080c7902c6f23e0245641bc06b4f9e4d1 Author: Isaku Yamahata Date: Thu Feb 27 09:20:17 2025 +0800 KVM: TDX: Ignore setting up mce Because vmx_set_mce function is VMX specific and it cannot be used for TDX. Add vt stub to ignore setting up mce for TDX. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-17-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit cf5f3668c58c34030eadc9f3c8c228a302cd5f67 Author: Isaku Yamahata Date: Thu Feb 27 09:20:16 2025 +0800 KVM: TDX: Add methods to ignore accesses to TSC TDX protects TDX guest TSC state from VMM. Implement access methods to ignore guest TSC. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-16-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit a946c71cf86bd5eb16e57bb03997b54ef8dd15d5 Author: Isaku Yamahata Date: Thu Feb 27 09:20:15 2025 +0800 KVM: TDX: Add methods to ignore VMX preemption timer TDX doesn't support VMX preemption timer. Implement access methods for VMM to ignore VMX preemption timer. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-15-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit e6bb3978848098e23e5485905870ce585f85a1df Author: Isaku Yamahata Date: Thu Feb 27 09:20:14 2025 +0800 KVM: TDX: Add method to ignore guest instruction emulation Skip instruction emulation and let the TDX guest retry for MMIO emulation after installing the MMIO SPTE with suppress #VE bit cleared. TDX protects TDX guest state from VMM, instructions in guest memory cannot be emulated. MMIO emulation is the only case that triggers the instruction emulation code path for TDX guest. The MMIO emulation handling flow as following: - The TDX guest issues a vMMIO instruction. (The GPA must be shared and is not covered by KVM memory slot.) - The default SPTE entry for shared-EPT by KVM has suppress #VE bit set. So EPT violation causes TD exit to KVM. - Trigger KVM page fault handler and install a new SPTE with suppress #VE bit cleared. - Skip instruction emulation and return X86EMU_RETRY_INSTR to let the vCPU retry. - TDX guest re-executes the vMMIO instruction. - TDX guest gets #VE because KVM has cleared #VE suppress bit. - TDX guest #VE handler converts MMIO into TDG.VP.VMCALL Return X86EMU_RETRY_INSTR in the callback check_emulate_instruction() for TDX guests to retry the MMIO instruction. Also, the instruction emulation handling will be skipped, so that the callback check_intercept() will never be called for TDX guest. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-14-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit a141f28d6b02af2e9c3aa6b7a3138b15ea7cef98 Author: Isaku Yamahata Date: Thu Feb 27 09:20:13 2025 +0800 KVM: TDX: Add methods to ignore accesses to CPU state TDX protects TDX guest state from VMM. Implement access methods for TDX guest state to ignore them or return zero. Because those methods can be called by kvm ioctls to set/get cpu registers, they don't have KVM_BUG_ON. Signed-off-by: Isaku Yamahata Co-developed-by: Adrian Hunter Signed-off-by: Adrian Hunter Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-13-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 04733836fe7d55b23c69234e2c90ab6b6a2794e0 Author: Isaku Yamahata Date: Thu Feb 27 09:20:12 2025 +0800 KVM: TDX: Handle TDG.VP.VMCALL hypercall Implement TDG.VP.VMCALL hypercall. If the input value is zero, return success code and zero in output registers. TDG.VP.VMCALL hypercall is a subleaf of TDG.VP.VMCALL to enumerate which TDG.VP.VMCALL sub leaves are supported. This hypercall is for future enhancement of the Guest-Host-Communication Interface (GHCI) specification. The GHCI version of 344426-001US defines it to require input R12 to be zero and to return zero in output registers, R11, R12, R13, and R14 so that guest TD enumerates no enhancement. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-12-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 9fc3402a20771ebd3abedec9d354b89b10ccfd98 Author: Isaku Yamahata Date: Thu Feb 27 09:20:11 2025 +0800 KVM: TDX: Enable guest access to LMCE related MSRs Allow TDX guest to configure LMCE (Local Machine Check Event) by handling MSR IA32_FEAT_CTL and IA32_MCG_EXT_CTL. MCE and MCA are advertised via cpuid based on the TDX module spec. Guest kernel can access IA32_FEAT_CTL to check whether LMCE is opted-in by the platform or not. If LMCE is opted-in by the platform, guest kernel can access IA32_MCG_EXT_CTL to enable/disable LMCE. Handle MSR IA32_FEAT_CTL and IA32_MCG_EXT_CTL for TDX guests to avoid failure when a guest accesses them with TDG.VP.VMCALL on #VE. E.g., Linux guest will treat the failure as a #GP(0). Userspace VMM may not opt-in LMCE by default, e.g., QEMU disables it by default, "-cpu lmce=on" is needed in QEMU command line to opt-in it. Signed-off-by: Isaku Yamahata [binbin: rework changelog] Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-11-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 081385dbc65fe46e8fecb8ffdb6d3eb36b8e4880 Author: Isaku Yamahata Date: Thu Feb 27 09:20:10 2025 +0800 KVM: TDX: Handle TDX PV rdmsr/wrmsr hypercall Morph PV RDMSR/WRMSR hypercall to EXIT_REASON_MSR_{READ,WRITE} and wire up KVM backend functions. For complete_emulated_msr() callback, instead of injecting #GP on error, implement tdx_complete_emulated_msr() to set return code on error. Also set return value on MSR read according to the values from kvm x86 registers. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250227012021.1778144-10-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit dd50294f3e3c017d7e7d98aea62b2f3a181de356 Author: Isaku Yamahata Date: Thu Feb 27 09:20:09 2025 +0800 KVM: TDX: Implement callbacks for MSR operations Add functions to implement MSR related callbacks, .set_msr(), .get_msr(), and .has_emulated_msr(), for preparation of handling hypercalls from TDX guest for PV RDMSR and WRMSR. Ignore KVM_REQ_MSR_FILTER_CHANGED for TDX. There are three classes of MSR virtualization for TDX. - Non-configurable: TDX module directly virtualizes it. VMM can't configure it, the value set by KVM_SET_MSRS is ignored. - Configurable: TDX module directly virtualizes it. VMM can configure it at VM creation time. The value set by KVM_SET_MSRS is used. - #VE case: TDX guest would issue TDG.VP.VMCALL and VMM handles the MSR hypercall. The value set by KVM_SET_MSRS is used. For the MSRs belonging to the #VE case, the TDX module injects #VE to the TDX guest upon RDMSR or WRMSR. The exact list of such MSRs is defined in TDX Module ABI Spec. Upon #VE, the TDX guest may call TDG.VP.VMCALL, which are defined in GHCI (Guest-Host Communication Interface) so that the host VMM (e.g. KVM) can virtualize the MSRs. TDX doesn't allow VMM to configure interception of MSR accesses. Ignore KVM_REQ_MSR_FILTER_CHANGED for TDX guest. If the userspace has set any MSR filters, it will be applied when handling TDG.VP.VMCALL in a later patch. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250227012021.1778144-9-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 7ddf314441f65828ddcc61dd664955f663e0f9f6 Author: Isaku Yamahata Date: Thu Feb 27 09:20:08 2025 +0800 KVM: x86: Move KVM_MAX_MCE_BANKS to header file Move KVM_MAX_MCE_BANKS to header file so that it can be used for TDX in a future patch. Signed-off-by: Isaku Yamahata [binbin: split into new patch] Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-8-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 5cf7239b78930ff8d14b12f7a6d90dabf323ec0c Author: Isaku Yamahata Date: Thu Feb 27 09:20:07 2025 +0800 KVM: TDX: Handle TDX PV HLT hypercall Handle TDX PV HLT hypercall and the interrupt status due to it. TDX guest status is protected, KVM can't get the interrupt status of TDX guest and it assumes interrupt is always allowed unless TDX guest calls TDVMCALL with HLT, which passes the interrupt blocked flag. If the guest halted with interrupt enabled, also query pending RVI by checking bit 0 of TD_VCPU_STATE_DETAILS_NON_ARCH field via a seamcall. Update vt_interrupt_allowed() for TDX based on interrupt blocked flag passed by HLT TDVMCALL. Do not wakeup TD vCPU if interrupt is blocked for VT-d PI. For NMIs, KVM cannot determine the NMI blocking status for TDX guests, so KVM always assumes NMIs are not blocked. In the unlikely scenario where a guest invokes the PV HLT hypercall within an NMI handler, this could result in a spurious wakeup. The guest should implement the PV HLT hypercall within a loop if it truly requires no interruptions, since NMI could be unblocked by an IRET due to an exception occurring before the PV HLT is executed in the NMI handler. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-7-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 3bf31b5786eaa362df31343f9cd7249eab0b6da3 Author: Isaku Yamahata Date: Thu Feb 27 09:20:06 2025 +0800 KVM: TDX: Handle TDX PV CPUID hypercall Handle TDX PV CPUID hypercall for the CPUIDs virtualized by VMM according to TDX Guest Host Communication Interface (GHCI). For TDX, most CPUID leaf/sub-leaf combinations are virtualized by the TDX module while some trigger #VE. On #VE, TDX guest can issue TDG.VP.VMCALL (same value as EXIT_REASON_CPUID) to request VMM to emulate CPUID operation. Morph PV CPUID hypercall to EXIT_REASON_CPUID and wire up to the KVM backend function. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata [binbin: rewrite changelog] Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-6-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 4b2abc49712b2f50ee57d71a47f6a771b86f1bd8 Author: Yan Zhao Date: Thu Feb 27 09:20:05 2025 +0800 KVM: TDX: Kick off vCPUs when SEAMCALL is busy during TD page removal Kick off all vCPUs and prevent tdh_vp_enter() from executing whenever tdh_mem_range_block()/tdh_mem_track()/tdh_mem_page_remove() encounters contention, since the page removal path does not expect error and is less sensitive to the performance penalty caused by kicking off vCPUs. Although KVM has protected SEPT zap-related SEAMCALLs with kvm->mmu_lock, KVM may still encounter TDX_OPERAND_BUSY due to the contention in the TDX module. - tdh_mem_track() may contend with tdh_vp_enter(). - tdh_mem_range_block()/tdh_mem_page_remove() may contend with tdh_vp_enter() and TDCALLs. Resources SHARED users EXCLUSIVE users ------------------------------------------------------------ TDCS epoch tdh_vp_enter tdh_mem_track ------------------------------------------------------------ SEPT tree tdh_mem_page_remove tdh_vp_enter (0-step mitigation) tdh_mem_range_block ------------------------------------------------------------ SEPT entry tdh_mem_range_block (Host lock) tdh_mem_page_remove (Host lock) tdg_mem_page_accept (Guest lock) tdg_mem_page_attr_rd (Guest lock) tdg_mem_page_attr_wr (Guest lock) Use a TDX specific per-VM flag wait_for_sept_zap along with KVM_REQ_OUTSIDE_GUEST_MODE to kick off vCPUs and prevent them from entering TD, thereby avoiding the potential contention. Apply the kick-off and no vCPU entering only after each SEAMCALL busy error to minimize the window of no TD entry, as the contention due to 0-step mitigation or TDCALLs is expected to be rare. Suggested-by: Sean Christopherson Signed-off-by: Yan Zhao Message-ID: <20250227012021.1778144-5-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 6c441e4d6e729616061237cba5da9ed2133084d1 Author: Isaku Yamahata Date: Sat Feb 22 09:47:57 2025 +0800 KVM: TDX: Handle EXIT_REASON_OTHER_SMI Handle VM exit caused by "other SMI" for TDX, by returning back to userspace for Machine Check System Management Interrupt (MSMI) case or ignoring it and resume vCPU for non-MSMI case. For VMX, SMM transition can happen in both VMX non-root mode and VMX root mode. Unlike VMX, in SEAM root mode (TDX module), all interrupts are blocked. If an SMI occurs in SEAM non-root mode (TD guest), the SMI causes VM exit to TDX module, then SEAMRET to KVM. Once it exits to KVM, SMI is delivered and handled by kernel handler right away. An SMI can be "I/O SMI" or "other SMI". For TDX, there will be no I/O SMI because I/O instructions inside TDX guest trigger #VE and TDX guest needs to use TDVMCALL to request VMM to do I/O emulation. For "other SMI", there are two cases: - MSMI case. When BIOS eMCA MCE-SMI morphing is enabled, the #MC occurs in TDX guest will be delivered as an MSMI. It causes an EXIT_REASON_OTHER_SMI VM exit with MSMI (bit 0) set in the exit qualification. On VM exit, TDX module checks whether the "other SMI" is caused by an MSMI or not. If so, TDX module marks TD as fatal, preventing further TD entries, and then completes the TD exit flow to KVM with the TDH.VP.ENTER outputs indicating TDX_NON_RECOVERABLE_TD. After TD exit, the MSMI is delivered and eventually handled by the kernel machine check handler (7911f145de5f x86/mce: Implement recovery for errors in TDX/SEAM non-root mode), i.e., the memory page is marked as poisoned and it won't be freed to the free list when the TDX guest is terminated. Since the TDX guest is dead, follow other non-recoverable cases, exit to userspace. - For non-MSMI case, KVM doesn't need to do anything, just continue TDX vCPU execution. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014757.897978-17-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit b0327bb2e7e0016b1d19d8797668c418c7e0df7b Author: Yan Zhao Date: Thu Feb 27 09:20:04 2025 +0800 KVM: TDX: Retry locally in TDX EPT violation handler on RET_PF_RETRY Retry locally in the TDX EPT violation handler for private memory to reduce the chances for tdh_mem_sept_add()/tdh_mem_page_aug() to contend with tdh_vp_enter(). TDX EPT violation installs private pages via tdh_mem_sept_add() and tdh_mem_page_aug(). The two may have contention with tdh_vp_enter() or TDCALLs. Resources SHARED users EXCLUSIVE users ------------------------------------------------------------ SEPT tree tdh_mem_sept_add tdh_vp_enter(0-step mitigation) tdh_mem_page_aug ------------------------------------------------------------ SEPT entry tdh_mem_sept_add (Host lock) tdh_mem_page_aug (Host lock) tdg_mem_page_accept (Guest lock) tdg_mem_page_attr_rd (Guest lock) tdg_mem_page_attr_wr (Guest lock) Though the contention between tdh_mem_sept_add()/tdh_mem_page_aug() and TDCALLs may be removed in future TDX module, their contention with tdh_vp_enter() due to 0-step mitigation still persists. The TDX module may trigger 0-step mitigation in SEAMCALL TDH.VP.ENTER, which works as follows: 0. Each TDH.VP.ENTER records the guest RIP on TD entry. 1. When the TDX module encounters a VM exit with reason EPT_VIOLATION, it checks if the guest RIP is the same as last guest RIP on TD entry. -if yes, it means the EPT violation is caused by the same instruction that caused the last VM exit. Then, the TDX module increases the guest RIP no-progress count. When the count increases from 0 to the threshold (currently 6), the TDX module records the faulting GPA into a last_epf_gpa_list. -if no, it means the guest RIP has made progress. So, the TDX module resets the RIP no-progress count and the last_epf_gpa_list. 2. On the next TDH.VP.ENTER, the TDX module (after saving the guest RIP on TD entry) checks if the last_epf_gpa_list is empty. -if yes, TD entry continues without acquiring the lock on the SEPT tree. -if no, it triggers the 0-step mitigation by acquiring the exclusive lock on SEPT tree, walking the EPT tree to check if all page faults caused by the GPAs in the last_epf_gpa_list have been resolved before continuing TD entry. Since KVM TDP MMU usually re-enters guest whenever it exits to userspace (e.g. for KVM_EXIT_MEMORY_FAULT) or encounters a BUSY, it is possible for a tdh_vp_enter() to be called more than the threshold count before a page fault is addressed, triggering contention when tdh_vp_enter() attempts to acquire exclusive lock on SEPT tree. Retry locally in TDX EPT violation handler to reduce the count of invoking tdh_vp_enter(), hence reducing the possibility of its contention with tdh_mem_sept_add()/tdh_mem_page_aug(). However, the 0-step mitigation and the contention are still not eliminated due to KVM_EXIT_MEMORY_FAULT, signals/interrupts, and cases when one instruction faults more GFNs than the threshold count. Signed-off-by: Yan Zhao Message-ID: <20250227012021.1778144-4-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit f30cb6429f750ad7225214072d8d13b9e3a851dc Author: Isaku Yamahata Date: Sat Feb 22 09:47:56 2025 +0800 KVM: TDX: Handle EXCEPTION_NMI and EXTERNAL_INTERRUPT Handle EXCEPTION_NMI and EXTERNAL_INTERRUPT exits for TDX. NMI Handling: Just like the VMX case, NMI remains blocked after exiting from TDX guest for NMI-induced exits [*]. Handle NMI-induced exits for TDX guests in the same way as they are handled for VMX guests, i.e., handle NMI in tdx_vcpu_enter_exit() by calling the vmx_handle_nmi() helper. Interrupt and Exception Handling: Similar to the VMX case, external interrupts and exceptions (machine check is the only exception type KVM handles for TDX guests) are handled in the .handle_exit_irqoff() callback. For other exceptions, because TDX guest state is protected, exceptions in TDX guests can't be intercepted. TDX VMM isn't supposed to handle these exceptions. If unexpected exception occurs, exit to userspace with KVM_EXIT_EXCEPTION. For external interrupt, increase the statistics, same as the VMX case. [*]: Some old TDX modules have a bug which makes NMI unblocked after exiting from TDX guest for NMI-induced exits. This could potentially lead to nested NMIs: a new NMI arrives when KVM is manually calling the host NMI handler. This is an architectural violation, but it doesn't have real harm until FRED is enabled together with TDX (for non-FRED, the host NMI handler can handle nested NMIs). Given this is rare to happen and has no real harm, ignore this for the initial TDX support. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014757.897978-16-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit e6a85781f7837037fb780f322df47ff2142dbd8f Author: Yan Zhao Date: Thu Feb 27 09:20:03 2025 +0800 KVM: TDX: Detect unexpected SEPT violations due to pending SPTEs Detect SEPT violations that occur when an SEPT entry is in PENDING state while the TD is configured not to receive #VE on SEPT violations. A TD guest can be configured not to receive #VE by setting SEPT_VE_DISABLE to 1 in tdh_mng_init() or modifying pending_ve_disable to 1 in TDCS when flexible_pending_ve is permitted. In such cases, the TDX module will not inject #VE into the TD upon encountering an EPT violation caused by an SEPT entry in the PENDING state. Instead, TDX module will exit to VMM and set extended exit qualification type to PENDING_EPT_VIOLATION and exit qualification bit 6:3 to 0. Since #VE will not be injected to such TDs, they are not able to be notified to accept a GPA. TD accessing before accepting a private GPA is regarded as an error within the guest. Detect such guest error by inspecting the (extended) exit qualification bits and make such VM dead. Cc: Xiaoyao Li Cc: Rick Edgecombe Signed-off-by: Yan Zhao Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-3-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 7e548b0d90a7576f0158e0ea2d819c026b279150 Author: Sean Christopherson Date: Sat Feb 22 09:47:55 2025 +0800 KVM: VMX: Add a helper for NMI handling Add a helper to handles NMI exit. TDX handles the NMI exit the same as VMX case. Add a helper to share the code with TDX, expose the helper in common.h. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-15-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit da407fe4590878754c790ec22d89398651790856 Author: Isaku Yamahata Date: Thu Feb 27 09:20:02 2025 +0800 KVM: TDX: Handle EPT violation/misconfig exit For TDX, on EPT violation, call common __vmx_handle_ept_violation() to trigger x86 MMU code; on EPT misconfiguration, bug the VM since it shouldn't happen. EPT violation due to instruction fetch should never be triggered from shared memory in TDX guest. If such EPT violation occurs, treat it as broken hardware. EPT misconfiguration shouldn't happen on neither shared nor secure EPT for TDX guests. - TDX module guarantees no EPT misconfiguration on secure EPT. Per TDX module v1.5 spec section 9.4 "Secure EPT Induced TD Exits": "By design, since secure EPT is fully controlled by the TDX module, an EPT misconfiguration on a private GPA indicates a TDX module bug and is handled as a fatal error." - For shared EPT, the MMIO caching optimization, which is the only case where current KVM configures EPT entries to generate EPT misconfiguration, is implemented in a different way for TDX guests. KVM configures EPT entries to non-present value without suppressing #VE bit. It causes #VE in the TDX guest and the guest will call TDG.VP.VMCALL to request MMIO emulation. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Adrian Hunter Signed-off-by: Adrian Hunter [binbin: rework changelog] Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250227012021.1778144-2-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit d5bc91e8e74a8c4be43797d0d5bd24070ca36757 Author: Binbin Wu Date: Sat Feb 22 09:47:54 2025 +0800 KVM: VMX: Move emulation_required to struct vcpu_vt Move emulation_required from struct vcpu_vmx to struct vcpu_vt so that vmx_handle_exit_irqoff() can be reused by TDX code. No functional change intended. Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-14-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 8dac6b9a974e0544e543b732a7de4ba0144269a4 Author: Isaku Yamahata Date: Sat Feb 22 09:47:53 2025 +0800 KVM: TDX: Add methods to ignore virtual apic related operation TDX protects TDX guest APIC state from VMM. Implement access methods of TDX guest vAPIC state to ignore them or return zero. Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-13-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit f65916ae2d734b48f6ef616eceeb790a1c239457 Author: Isaku Yamahata Date: Sat Feb 22 09:47:52 2025 +0800 KVM: TDX: Force APICv active for TDX guest Force APICv active for TDX guests in KVM because APICv is always enabled by TDX module. From the view of KVM, whether APICv state is active or not is decided by: 1. APIC is hw enabled 2. VM and vCPU have no inhibit reasons set. After TDX vCPU init, APIC is set to x2APIC mode. KVM_SET_{SREGS,SREGS2} are rejected due to has_protected_state for TDs and guest_state_protected for TDX vCPUs are set. Reject KVM_{GET,SET}_LAPIC from userspace since migration is not supported yet, so that userspace cannot disable APIC. For various APICv inhibit reasons: - APICV_INHIBIT_REASON_DISABLED is impossible after checking enable_apicv in tdx_bringup(). If !enable_apicv, TDX support will be disabled. - APICV_INHIBIT_REASON_PHYSICAL_ID_ALIASED is impossible since x2APIC is mandatory, KVM emulates APIC_ID as read-only for x2APIC mode. (Note: APICV_INHIBIT_REASON_PHYSICAL_ID_ALIASED could be set if the memory allocation fails for KVM apic_map.) - APICV_INHIBIT_REASON_HYPERV is impossible since TDX doesn't support HyperV guest yet. - APICV_INHIBIT_REASON_ABSENT is impossible since in-kernel LAPIC is checked in tdx_vcpu_create(). - APICV_INHIBIT_REASON_BLOCKIRQ is impossible since TDX doesn't support KVM_SET_GUEST_DEBUG. - APICV_INHIBIT_REASON_APIC_ID_MODIFIED is impossible since x2APIC is mandatory. - APICV_INHIBIT_REASON_APIC_BASE_MODIFIED is impossible since KVM rejects userspace to set APIC base. - The rest inhibit reasons are relevant only to AMD's AVIC, including APICV_INHIBIT_REASON_NESTED, APICV_INHIBIT_REASON_IRQWIN, APICV_INHIBIT_REASON_PIT_REINJ, APICV_INHIBIT_REASON_SEV, and APICV_INHIBIT_REASON_LOGICAL_ID_ALIASED. (For APICV_INHIBIT_REASON_PIT_REINJ, similar to AVIC, KVM can't intercept EOI for TDX guests neither, but KVM enforces KVM_IRQCHIP_SPLIT for TDX guests, which eliminates the in-kernel PIT.) Implement vt_refresh_apicv_exec_ctrl() to call KVM_BUG_ON() if APICv is disabled for TDX guests. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-12-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 209afc0c4286f9950b891eb05004ab8e53f8e817 Author: Binbin Wu Date: Sat Feb 22 09:47:51 2025 +0800 KVM: TDX: Enforce KVM_IRQCHIP_SPLIT for TDX guests Enforce KVM_IRQCHIP_SPLIT for TDX guests to disallow in-kernel I/O APIC while in-kernel local APIC is needed. APICv is always enabled by TDX module and TDX Module doesn't allow the hypervisor to modify the EOI-bitmap, i.e. all EOIs are accelerated and never trigger exits. Level-triggered interrupts and other things depending on EOI VM-Exit can't be faithfully emulated in KVM. Also, the lazy check of pending APIC EOI for RTC edge-triggered interrupts, which was introduced as a workaround when EOI cannot be intercepted, doesn't work for TDX either because kvm_apic_pending_eoi() checks vIRR and vISR, but both values are invisible in KVM. If the guest induces generation of a level-triggered interrupt, the VMM is left with the choice of dropping the interrupt, sending it as-is, or converting it to an edge-triggered interrupt. Ditto for KVM. All of those options will make the guest unhappy. There's no architectural behavior KVM can provide that's better than sending the interrupt and hoping for the best. Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-11-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 4cdf243eb1f5a4e87fc1883de9332f6ac0476a9c Author: Isaku Yamahata Date: Sat Feb 22 09:47:50 2025 +0800 KVM: TDX: Always block INIT/SIPI Always block INIT and SIPI events for the TDX guest because the TDX module doesn't provide API for VMM to inject INIT IPI or SIPI. TDX defines its own vCPU creation and initialization sequence including multiple seamcalls. Also, it's only allowed during TD build time. Given that TDX guest is para-virtualized to boot BSP/APs, normally there shouldn't be any INIT/SIPI event for TDX guest. If any, three options to handle them: 1. Always block INIT/SIPI request. 2. (Silently) ignore INIT/SIPI request during delivery. 3. Return error to guest TDs somehow. Choose option 1 for simplicity. Since INIT and SIPI are always blocked, INIT handling and the OP vcpu_deliver_sipi_vector() won't be called, no need to add new interface or helper function for INIT/SIPI delivery. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-10-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 2b06beb08f560dbc14f1887cc32f7291586209c4 Author: Isaku Yamahata Date: Sat Feb 22 09:47:49 2025 +0800 KVM: TDX: Handle SMI request as !CONFIG_KVM_SMM Handle SMI request as what KVM does for CONFIG_KVM_SMM=n, i.e. return -ENOTTY, and add KVM_BUG_ON() to SMI related OPs for TD. TDX doesn't support system-management mode (SMM) and system-management interrupt (SMI) in guest TDs. Because guest state (vCPU state, memory state) is protected, it must go through the TDX module APIs to change guest state. However, the TDX module doesn't provide a way for VMM to inject SMI into guest TD or a way for VMM to switch guest vCPU mode into SMM. MSR_IA32_SMBASE will not be emulated for TDX guest, -ENOTTY will be returned when SMI is requested. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-9-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit acc64eb4e2931a09e3f33625511b90e8af29503d Author: Isaku Yamahata Date: Sat Feb 22 09:47:48 2025 +0800 KVM: TDX: Implement methods to inject NMI Inject NMI to TDX guest by setting the PEND_NMI TDVPS field to 1, i.e. make the NMI pending in the TDX module. If there is a further pending NMI in KVM, collapse it to the one pending in the TDX module. VMM can request the TDX module to inject a NMI into a TDX vCPU by setting the PEND_NMI TDVPS field to 1. Following that, VMM can call TDH.VP.ENTER to run the vCPU and the TDX module will attempt to inject the NMI as soon as possible. KVM has the following 3 cases to inject two NMIs when handling simultaneous NMIs and they need to be injected in a back-to-back way. Otherwise, OS kernel may fire a warning about the unknown NMI [1]: K1. One NMI is being handled in the guest and one NMI pending in KVM. KVM requests NMI window exit to inject the pending NMI. K2. Two NMIs are pending in KVM. KVM injects the first NMI and requests NMI window exit to inject the second NMI. K3. A previous NMI needs to be rejected and one NMI pending in KVM. KVM first requests force immediate exit followed by a VM entry to complete the NMI rejection. Then, during the force immediate exit, KVM requests NMI window exit to inject the pending NMI. For TDX, PEND_NMI TDVPS field is a 1-bit field, i.e. KVM can only pend one NMI in the TDX module. Also, the vCPU state is protected, KVM doesn't know the NMI blocking states of TDX vCPU, KVM has to assume NMI is always unmasked and allowed. When KVM sees PEND_NMI is 1 after a TD exit, it means the previous NMI needs to be re-injected. Based on KVM's NMI handling flow, there are following 6 cases: In NMI handler TDX module KVM T1. No PEND_NMI=0 1 pending NMI T2. No PEND_NMI=0 2 pending NMIs T3. No PEND_NMI=1 1 pending NMI T4. Yes PEND_NMI=0 1 pending NMI T5. Yes PEND_NMI=0 2 pending NMIs T6. Yes PEND_NMI=1 1 pending NMI K1 is mapped to T4. K2 is mapped to T2 or T5. K3 is mapped to T3 or T6. Note: KVM doesn't know whether NMI is blocked by a NMI or not, case T5 and T6 can happen. When handling pending NMI in KVM for TDX guest, what KVM can do is to add a pending NMI in TDX module when PEND_NMI is 0. T1 and T4 can be handled by this way. However, TDX doesn't allow KVM to request NMI window exit directly, if PEND_NMI is already set and there is still pending NMI in KVM, the only way KVM could try is to request a force immediate exit. But for case T5 and T6, force immediate exit will result in infinite loop because force immediate exit makes it no progress in the NMI handler, so that the pending NMI in the TDX module can never be injected. Considering on X86 bare metal, multiple NMIs could collapse into one NMI, e.g. when NMI is blocked by SMI. It's OS's responsibility to poll all NMI sources in the NMI handler to avoid missing handling of some NMI events. Based on that, for the above 3 cases (K1-K3), only case K1 must inject the second NMI because the guest NMI handler may have already polled some of the NMI sources, which could include the source of the pending NMI, the pending NMI must be injected to avoid the lost of NMI. For case K2 and K3, the guest OS will poll all NMI sources (including the sources caused by the second NMI and further NMI collapsed) when the delivery of the first NMI, KVM doesn't have the necessity to inject the second NMI. To handle the NMI injection properly for TDX, there are two options: - Option 1: Modify the KVM's NMI handling common code, to collapse the second pending NMI for K2 and K3. - Option 2: Do it in TDX specific way. When the previous NMI is still pending in the TDX module, i.e. it has not been delivered to TDX guest yet, collapse the pending NMI in KVM into the previous one. This patch goes with option 2 because it is simple and doesn't impact other VM types. Option 1 may need more discussions. This is the first need to access vCPU scope metadata in the "management" class. Make needed accessors available. [1] https://lore.kernel.org/all/1317409584-23662-5-git-send-email-dzickus@redhat.com/ Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014757.897978-8-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit bb723bebde1eee606ab0bd56bbc9aafda96d3801 Author: Sean Christopherson Date: Sat Feb 22 09:42:25 2025 +0800 KVM: TDX: Handle TDX PV MMIO hypercall Handle TDX PV MMIO hypercall when TDX guest calls TDVMCALL with the leaf #VE.RequestMMIO (same value as EXIT_REASON_EPT_VIOLATION) according to TDX Guest Host Communication Interface (GHCI) spec. For TDX guests, VMM is not allowed to access vCPU registers and the private memory, and the code instructions must be fetched from the private memory. So MMIO emulation implemented for non-TDX VMs is not possible for TDX guests. In TDX the MMIO regions are instead configured by VMM to trigger a #VE exception in the guest. The #VE handling is supposed to emulate the MMIO instruction inside the guest and convert it into a TDVMCALL with the leaf #VE.RequestMMIO, which equals to EXIT_REASON_EPT_VIOLATION. The requested MMIO address must be in shared GPA space. The shared bit is stripped after check because the existing code for MMIO emulation is not aware of the shared bit. The MMIO GPA shouldn't have a valid memslot, also the attribute of the GPA should be shared. KVM could do the checks before exiting to userspace, however, even if KVM does the check, there still will be race conditions between the check in KVM and the emulation of MMIO access in userspace due to a memslot hotplug, or a memory attribute conversion. If userspace doesn't check the attribute of the GPA and the attribute happens to be private, it will not pose a security risk or cause an MCE, but it can lead to another issue. E.g., in QEMU, treating a GPA with private attribute as shared when it falls within RAM's range can result in extra memory consumption during the emulation to the access to the HVA of the GPA. There are two options: 1) Do the check both in KVM and userspace. 2) Do the check only in QEMU. This patch chooses option 2, i.e. KVM omits the memslot and attribute checks, and expects userspace to do the checks. Similar to normal MMIO emulation, try to handle the MMIO in kernel first, if kernel can't support it, forward the request to userspace. Export needed symbols used for MMIO handling. Fragments handling is not needed for TDX PV MMIO because GPA is provided, if a MMIO access crosses page boundary, it should be continuous in GPA. Also, the size is limited to 1, 2, 4, 8 bytes. No further split needed. Allow cross page access because no extra handling needed after checking both start and end GPA are shared GPAs. Suggested-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014225.897298-10-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit fc17de99019a479e9df27cb532624d1f14cb13f1 Author: Isaku Yamahata Date: Sat Feb 22 09:47:47 2025 +0800 KVM: TDX: Wait lapic expire when timer IRQ was injected Call kvm_wait_lapic_expire() when POSTED_INTR_ON is set and the vector for LVTT is set in PIR before TD entry. KVM always assumes a timer IRQ was injected if APIC state is protected. For TDX guest, APIC state is protected and KVM injects timer IRQ via posted interrupt. To avoid unnecessary wait calls, only call kvm_wait_lapic_expire() when a timer IRQ was injected, i.e., POSTED_INTR_ON is set and the vector for LVTT is set in PIR. Add a helper to test PIR. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-7-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 33608aaf71e16b2db5e0eaa7656505e1fef61e88 Author: Isaku Yamahata Date: Sat Feb 22 09:42:24 2025 +0800 KVM: TDX: Handle TDX PV port I/O hypercall Emulate port I/O requested by TDX guest via TDVMCALL with leaf Instruction.IO (same value as EXIT_REASON_IO_INSTRUCTION) according to TDX Guest Host Communication Interface (GHCI). All port I/O instructions inside the TDX guest trigger the #VE exception. On #VE triggered by I/O instructions, TDX guest can call TDVMCALL with leaf Instruction.IO to request VMM to emulate I/O instructions. Similar to normal port I/O emulation, try to handle the port I/O in kernel first, if kernel can't support it, forward the request to userspace. Note string I/O operations are not supported in TDX. Guest should unroll them before calling the TDVMCALL. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014225.897298-9-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 14aecf2a5bc3418bfb760ee9e45ddbc12480ebca Author: Sean Christopherson Date: Sat Feb 22 09:47:46 2025 +0800 KVM: x86: Assume timer IRQ was injected if APIC state is protected If APIC state is protected, i.e. the vCPU is a TDX guest, assume a timer IRQ was injected when deciding whether or not to busy wait in the "timer advanced" path. The "real" vIRR is not readable/writable, so trying to query for a pending timer IRQ will return garbage. Note, TDX can scour the PIR if it wants to be more precise and skip the "wait" call entirely. Signed-off-by: Sean Christopherson Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-6-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 79462faa2b2aa89db029af5e61df11b5bb6ef4e3 Author: Binbin Wu Date: Sat Feb 22 09:42:23 2025 +0800 KVM: TDX: Handle TDG.VP.VMCALL Convert TDG.VP.VMCALL to KVM_EXIT_SYSTEM_EVENT with a new type KVM_SYSTEM_EVENT_TDX_FATAL and forward it to userspace for handling. TD guest can use TDG.VP.VMCALL to report the fatal error it has experienced. This hypercall is special because TD guest is requesting a termination with the error information, KVM needs to forward the hypercall to userspace anyway, KVM doesn't do parsing or conversion, it just dumps the 16 general-purpose registers to userspace and let userspace decide what to do. Signed-off-by: Binbin Wu Message-ID: <20250222014225.897298-8-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 24c12911160e47700f9c96cea95770f0300682f4 Author: Isaku Yamahata Date: Sat Feb 22 09:47:45 2025 +0800 KVM: TDX: Implement non-NMI interrupt injection Implement non-NMI interrupt injection for TDX via posted interrupt. As CPU state is protected and APICv is enabled for the TDX guest, TDX supports non-NMI interrupt injection only by posted interrupt. Posted interrupt descriptors (PIDs) are allocated in shared memory, KVM can update them directly. If target vCPU is in non-root mode, send posted interrupt notification to the vCPU and hardware will sync PIR to vIRR atomically. Otherwise, kick it to pick up the interrupt from PID. To post pending interrupts in the PID, KVM can generate a self-IPI with notification vector prior to TD entry. Since the guest status of TD vCPU is protected, assume interrupt is always allowed. Ignore the code path for event injection mechanism or LAPIC emulation for TDX. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Paolo Bonzini Message-ID: <20250222014757.897978-5-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 2c304880835d9c9dbbaec80443f0f6790884d410 Author: Binbin Wu Date: Sat Feb 22 09:42:22 2025 +0800 KVM: TDX: Handle TDG.VP.VMCALL Convert TDG.VP.VMCALL to KVM_EXIT_HYPERCALL with KVM_HC_MAP_GPA_RANGE and forward it to userspace for handling. MapGPA is used by TDX guest to request to map a GPA range as private or shared memory. It needs to exit to userspace for handling. KVM has already implemented a similar hypercall KVM_HC_MAP_GPA_RANGE, which will exit to userspace with exit reason KVM_EXIT_HYPERCALL. Do sanity checks, convert TDVMCALL_MAP_GPA to KVM_HC_MAP_GPA_RANGE and forward the request to userspace. To prevent a TDG.VP.VMCALL call from taking too long, the MapGPA range is split into 2MB chunks and check interrupt pending between chunks. This allows for timely injection of interrupts and prevents issues with guest lockup detection. TDX guest should retry the operation for the GPA starting at the address specified in R11 when the TDVMCALL return TDVMCALL_RETRY as status code. Note userspace needs to enable KVM_CAP_EXIT_HYPERCALL with KVM_HC_MAP_GPA_RANGE bit set for TD VM. Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Message-ID: <20250222014225.897298-7-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 254e5dcd5af300e40cfd5b29fee4a9626645b6d3 Author: Isaku Yamahata Date: Sat Feb 22 09:47:44 2025 +0800 KVM: VMX: Move posted interrupt delivery code to common header Move posted interrupt delivery code to common header so that TDX can leverage it. No functional change intended. Signed-off-by: Isaku Yamahata [binbin: split into new patch] Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Message-ID: <20250222014757.897978-4-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit d5998c02bcc22a5a0b3c34f89f2458f6aecceb4a Author: Isaku Yamahata Date: Sat Feb 22 09:42:21 2025 +0800 KVM: TDX: Handle KVM hypercall with TDG.VP.VMCALL Handle KVM hypercall for TDX according to TDX Guest-Host Communication Interface (GHCI) specification. The TDX GHCI specification defines the ABI for the guest TD to issue hypercalls. When R10 is non-zero, it indicates the TDG.VP.VMCALL is vendor-specific. KVM uses R10 as KVM hypercall number and R11-R14 as 4 arguments, while the error code is returned in R10. Morph the TDG.VP.VMCALL with KVM hypercall to EXIT_REASON_VMCALL and marshall r10~r14 from vp_enter_args to the appropriate x86 registers for KVM hypercall handling. Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Message-ID: <20250222014225.897298-6-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 34d2d1ca1b3995a9de958bc47b76fcedce45162d Author: Isaku Yamahata Date: Sat Feb 22 09:47:43 2025 +0800 KVM: TDX: Disable PI wakeup for IPIv Disable PI wakeup for IPI virtualization (IPIv) case for TDX. When a vCPU is being scheduled out, notification vector is switched and pi_wakeup_handler() is enabled when the vCPU has interrupt enabled and posted interrupt is used to wake up the vCPU. For VMX, a blocked vCPU can be the target of posted interrupts when using IPIv or VT-d PI. TDX doesn't support IPIv, disable PI wakeup for IPIv. Also, since the guest status of TD vCPU is protected, assume interrupt is always enabled for TD. (PV HLT hypercall is not support yet, TDX guest tells VMM whether HLT is called with interrupt disabled or not.) Signed-off-by: Isaku Yamahata [binbin: split into new patch] Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-3-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit c42856af8f70d983c007724afb0a684cfae34382 Author: Isaku Yamahata Date: Sat Feb 22 09:42:20 2025 +0800 KVM: TDX: Add a place holder for handler of TDX hypercalls (TDG.VP.VMCALL) Add a place holder and related helper functions for preparation of TDG.VP.VMCALL handling. The TDX module specification defines TDG.VP.VMCALL API (TDVMCALL for short) for the guest TD to call hypercall to VMM. When the guest TD issues a TDVMCALL, the guest TD exits to VMM with a new exit reason. The arguments from the guest TD and returned values from the VMM are passed in the guest registers. The guest RCX register indicates which registers are used. Define helper functions to access those registers. A new VMX exit reason TDCALL is added to indicate the exit is due to TDVMCALL from the guest TD. Define the TDCALL exit reason and add a place holder to handle such exit. Some leafs of TDCALL will be morphed to another VMX exit reason instead of EXIT_REASON_TDCALL, add a helper tdcall_to_vmx_exit_reason() as a place holder to do the conversion. Suggested-by: Sean Christopherson Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Message-ID: <20250222014225.897298-5-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 90cfe144c8ed983a433f315fa860389e082b1f3f Author: Sean Christopherson Date: Sat Feb 22 09:47:42 2025 +0800 KVM: TDX: Add support for find pending IRQ in a protected local APIC Add flag and hook to KVM's local APIC management to support determining whether or not a TDX guest has a pending IRQ. For TDX vCPUs, the virtual APIC page is owned by the TDX module and cannot be accessed by KVM. As a result, registers that are virtualized by the CPU, e.g. PPR, cannot be read or written by KVM. To deliver interrupts for TDX guests, KVM must send an IRQ to the CPU on the posted interrupt notification vector. And to determine if TDX vCPU has a pending interrupt, KVM must check if there is an outstanding notification. Return "no interrupt" in kvm_apic_has_interrupt() if the guest APIC is protected to short-circuit the various other flows that try to pull an IRQ out of the vAPIC, the only valid operation is querying _if_ an IRQ is pending, KVM can't do anything based on _which_ IRQ is pending. Intentionally omit sanity checks from other flows, e.g. PPR update, so as not to degrade non-TDX guests with unnecessary checks. A well-behaved KVM and userspace will never reach those flows for TDX guests, but reaching them is not fatal if something does go awry. For the TD exits not due to HLT TDCALL, skip checking RVI pending in tdx_protected_apic_has_interrupt(). Except for the guest being stupid (e.g., non-HLT TDCALL in an interrupt shadow), it's not even possible to have an interrupt in RVI that is fully unmasked. There is no any CPU flows that modify RVI in the middle of instruction execution. I.e. if RVI is non-zero, then either the interrupt has been pending since before the TD exit, or the instruction caused the TD exit is in an STI/SS shadow. KVM doesn't care about STI/SS shadows outside of the HALTED case. And if the interrupt was pending before TD exit, then it _must_ be blocked, otherwise the interrupt would have been serviced at the instruction boundary. For the HLT TDCALL case, it will be handled in a future patch when HLT TDCALL is supported. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Binbin Wu Message-ID: <20250222014757.897978-2-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 484612f1a7d7386cec8fc9a3fa9dd45dd39e8b6d Author: Isaku Yamahata Date: Wed Jan 29 11:59:01 2025 +0200 KVM: x86: Add a switch_db_regs flag to handle TDX's auto-switched behavior Add a flag KVM_DEBUGREG_AUTO_SWITCH to skip saving/restoring guest DRs. TDX-SEAM unconditionally saves/restores guest DRs on TD exit/enter, and resets DRs to architectural INIT state on TD exit. Use the new flag KVM_DEBUGREG_AUTO_SWITCH to indicate that KVM doesn't need to save/restore guest DRs. KVM still needs to restore host DRs after TD exit if there are active breakpoints in the host, which is covered by the existing code. MOV-DR exiting is always cleared for TDX guests, so the handler for DR access is never called, and KVM_DEBUGREG_WONT_EXIT is never set. Add a warning if both KVM_DEBUGREG_WONT_EXIT and KVM_DEBUGREG_AUTO_SWITCH are set. Opportunistically convert the KVM_DEBUGREG_* definitions to use BIT(). Reported-by: Xiaoyao Li Signed-off-by: Sean Christopherson Co-developed-by: Chao Gao Signed-off-by: Chao Gao Signed-off-by: Isaku Yamahata [binbin: rework changelog] Signed-off-by: Binbin Wu Message-ID: <20241210004946.3718496-2-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini Message-ID: <20250129095902.16391-13-adrian.hunter@intel.com> Signed-off-by: Paolo Bonzini commit 095b71a03f4905982953625edd9a1ad16682cfb7 Author: Isaku Yamahata Date: Thu Mar 6 13:27:04 2025 -0500 KVM: TDX: Add a place holder to handle TDX VM exit Introduce the wiring for handling TDX VM exits by implementing the callbacks .get_exit_info(), .get_entry_info(), and .handle_exit(). Additionally, add error handling during the TDX VM exit flow, and add a place holder to handle various exit reasons. Store VMX exit reason and exit qualification in struct vcpu_vt for TDX, so that TDX/VMX can use the same helpers to get exit reason and exit qualification. Store extended exit qualification and exit GPA info in struct vcpu_tdx because they are used by TDX code only. Contention Handling: The TDH.VP.ENTER operation may contend with TDH.MEM.* operations due to secure EPT or TD EPOCH. If the contention occurs, the return value will have TDX_OPERAND_BUSY set, prompting the vCPU to attempt re-entry into the guest with EXIT_FASTPATH_EXIT_HANDLED, not EXIT_FASTPATH_REENTER_GUEST, so that the interrupts pending during IN_GUEST_MODE can be delivered for sure. Otherwise, the requester of KVM_REQ_OUTSIDE_GUEST_MODE may be blocked endlessly. Error Handling: - TDX_SW_ERROR: This includes #UD caused by SEAMCALL instruction if the CPU isn't in VMX operation, #GP caused by SEAMCALL instruction when TDX isn't enabled by the BIOS, and TDX_SEAMCALL_VMFAILINVALID when SEAM firmware is not loaded or disabled. - TDX_ERROR: This indicates some check failed in the TDX module, preventing the vCPU from running. - Failed VM Entry: Exit to userspace with KVM_EXIT_FAIL_ENTRY. Handle it separately before handling TDX_NON_RECOVERABLE because when off-TD debug is not enabled, TDX_NON_RECOVERABLE is set. - TDX_NON_RECOVERABLE: Set by the TDX module when the error is non-recoverable, indicating that the TDX guest is dead or the vCPU is disabled. A special case is triple fault, which also sets TDX_NON_RECOVERABLE but exits to userspace with KVM_EXIT_SHUTDOWN, aligning with the VMX case. - Any unhandled VM exit reason will also return to userspace with KVM_EXIT_INTERNAL_ERROR. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Message-ID: <20250222014225.897298-4-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 8af099037527c54399d44c4fd30eab15931700ce Author: Adrian Hunter Date: Wed Jan 29 11:59:00 2025 +0200 KVM: TDX: Save and restore IA32_DEBUGCTL Save the IA32_DEBUGCTL MSR before entering a TDX VCPU and restore it afterwards. The TDX Module preserves bits 1, 12, and 14, so if no other bits are set, no restore is done. Signed-off-by: Adrian Hunter Message-ID: <20250129095902.16391-12-adrian.hunter@intel.com> Reviewed-by: Xiayao Li Signed-off-by: Paolo Bonzini commit 44428e4936022a7a31743017849b167e64f33a32 Author: Binbin Wu Date: Sat Feb 22 09:42:18 2025 +0800 KVM: x86: Move pv_unhalted check out of kvm_vcpu_has_events() Move pv_unhalted check out of kvm_vcpu_has_events(), check pv_unhalted explicitly when handling PV unhalt and expose kvm_vcpu_has_events(). kvm_vcpu_has_events() returns true if pv_unhalted is set, and pv_unhalted is only cleared on transitions to KVM_MP_STATE_RUNNABLE. If the guest initiates a spurious wakeup, pv_unhalted could be left set in perpetuity. Currently, this is not problematic because kvm_vcpu_has_events() is only called when handling PV unhalt. However, if kvm_vcpu_has_events() is used for other purposes in the future, it could return the unexpected results. Export kvm_vcpu_has_events() for its usage in broader contexts. Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Message-ID: <20250222014225.897298-3-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 6d415778f1069b52344f7cb09ae7b623579486c9 Author: Adrian Hunter Date: Wed Jan 29 11:58:59 2025 +0200 KVM: TDX: Disable support for TSX and WAITPKG Support for restoring IA32_TSX_CTRL MSR and IA32_UMWAIT_CONTROL MSR is not yet implemented, so disable support for TSX and WAITPKG for now. Clear the associated CPUID bits returned by KVM_TDX_CAPABILITIES, and return an error if those bits are set in KVM_TDX_INIT_VM. Signed-off-by: Adrian Hunter Message-ID: <20250129095902.16391-11-adrian.hunter@intel.com> Signed-off-by: Paolo Bonzini commit 6162b37357d039614ee0e9ff53c000e4de081536 Author: Binbin Wu Date: Sat Feb 22 09:42:17 2025 +0800 KVM: x86: Have ____kvm_emulate_hypercall() read the GPRs Have ____kvm_emulate_hypercall() read the GPRs instead of passing them in via the macro. When emulating KVM hypercalls via TDVMCALL, TDX will marshall registers of TDVMCALL ABI into KVM's x86 registers to match the definition of KVM hypercall ABI _before_ ____kvm_emulate_hypercall() gets called. Therefore, ____kvm_emulate_hypercall() can just read registers internally based on KVM hypercall ABI, and those registers can be removed from the __kvm_emulate_hypercall() macro. Also, op_64_bit can be determined inside ____kvm_emulate_hypercall(), remove it from the __kvm_emulate_hypercall() macro as well. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Reviewed-by: Kai Huang Message-ID: <20250222014225.897298-2-binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini commit e0b4f31a3c65af66ad39bf686ce5602e49c905ae Author: Isaku Yamahata Date: Wed Jan 29 11:58:58 2025 +0200 KVM: TDX: restore user ret MSRs Several MSRs are clobbered on TD exit that are not used by Linux while in ring 0. Ensure the cached value of the MSR is updated on vcpu_put, and the MSRs themselves before returning to ring 3. Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Isaku Yamahata Signed-off-by: Adrian Hunter Reviewed-by: Paolo Bonzini Message-ID: <20250129095902.16391-10-adrian.hunter@intel.com> Reviewed-by: Xiayao Li Signed-off-by: Paolo Bonzini commit d3a6b6cfb82a9158ee624bf3d43e6ebd8fe05fc8 Author: Chao Gao Date: Wed Jan 29 11:58:57 2025 +0200 KVM: x86: Allow to update cached values in kvm_user_return_msrs w/o wrmsr Several MSRs are constant and only used in userspace(ring 3). But VMs may have different values. KVM uses kvm_set_user_return_msr() to switch to guest's values and leverages user return notifier to restore them when the kernel is to return to userspace. To eliminate unnecessary wrmsr, KVM also caches the value it wrote to an MSR last time. TDX module unconditionally resets some of these MSRs to architectural INIT state on TD exit. It makes the cached values in kvm_user_return_msrs are inconsistent with values in hardware. This inconsistency needs to be fixed. Otherwise, it may mislead kvm_on_user_return() to skip restoring some MSRs to the host's values. kvm_set_user_return_msr() can help correct this case, but it is not optimal as it always does a wrmsr. So, introduce a variation of kvm_set_user_return_msr() to update cached values and skip that wrmsr. Signed-off-by: Chao Gao Signed-off-by: Isaku Yamahata Signed-off-by: Adrian Hunter Reviewed-by: Paolo Bonzini Message-ID: <20250129095902.16391-9-adrian.hunter@intel.com> Reviewed-by: Xiayao Li Signed-off-by: Paolo Bonzini commit 6bfa6d8509ad71f26ceec1e2ab64efbe39c58c8d Author: Isaku Yamahata Date: Wed Jan 29 11:58:56 2025 +0200 KVM: TDX: restore host xsave state when exit from the guest TD On exiting from the guest TD, xsave state is clobbered; restore it. Do not use kvm_load_host_xsave_state(), as it relies on vcpu->arch to find out whether other KVM_RUN code has loaded guest state into XCR0/PKRU/XSS or not. In the case of TDX, the exit values are known independent of the guest CR0 and CR4, and in fact the latter are not available. Signed-off-by: Isaku Yamahata Signed-off-by: Adrian Hunter Message-ID: <20250129095902.16391-8-adrian.hunter@intel.com> [Rewrite to not use kvm_load_host_xsave_state. - Paolo] Reviewed-by: Xiayao Li Signed-off-by: Paolo Bonzini commit 81bf40d54cd56e33b4cd381cc719efaa53832468 Author: Isaku Yamahata Date: Wed Jan 29 11:58:55 2025 +0200 KVM: TDX: vcpu_run: save/restore host state(host kernel gs) On entering/exiting TDX vcpu, preserved or clobbered CPU state is different from the VMX case. Add TDX hooks to save/restore host/guest CPU state. Save/restore kernel GS base MSR. Signed-off-by: Isaku Yamahata Signed-off-by: Adrian Hunter Reviewed-by: Paolo Bonzini Message-ID: <20250129095902.16391-7-adrian.hunter@intel.com> Reviewed-by: Xiayao Li Signed-off-by: Paolo Bonzini commit 81bf912b2c15201ac96ee07042f804d02c0f69ee Author: Isaku Yamahata Date: Wed Jan 29 11:58:54 2025 +0200 KVM: TDX: Implement TDX vcpu enter/exit path Implement callbacks to enter/exit a TDX VCPU by calling tdh_vp_enter(). Ensure the TDX VCPU is in a correct state to run. Do not pass arguments from/to vcpu->arch.regs[] unconditionally. Instead, marshall state to/from the appropriate x86 registers only when needed, i.e., to handle some TDVMCALL sub-leaves following KVM's ABI to leverage the existing code. Signed-off-by: Isaku Yamahata Signed-off-by: Adrian Hunter Message-ID: <20250129095902.16391-6-adrian.hunter@intel.com> Signed-off-by: Paolo Bonzini commit 7172c753c26a51c2e2bce922f0c94b62cb2ade46 Author: Binbin Wu Date: Fri Mar 14 14:06:48 2025 -0400 KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a struct Move common fields of struct vcpu_vmx and struct vcpu_tdx to struct vcpu_vt, to share the code between VMX/TDX as much as possible and to make TDX exit handling more VMX like. No functional change intended. [Adrian: move code that depends on struct vcpu_vmx back to vmx.h] Suggested-by: Sean Christopherson Link: https://lore.kernel.org/r/Z1suNzg2Or743a7e@google.com Signed-off-by: Binbin Wu Signed-off-by: Adrian Hunter Message-ID: <20250129095902.16391-5-adrian.hunter@intel.com> Signed-off-by: Paolo Bonzini commit eac0b72fae3936028feb0f5f44af9dc850ca0133 Author: Yan Zhao Date: Mon Feb 17 16:56:42 2025 +0800 KVM: TDX: Handle SEPT zap error due to page add error in premap Move the handling of SEPT zap errors caused by unsuccessful execution of tdh_mem_page_add() in KVM_TDX_INIT_MEM_REGION from tdx_sept_drop_private_spte() to tdx_sept_zap_private_spte(). Introduce a new helper function tdx_is_sept_zap_err_due_to_premap() to detect this specific error. During the IOCTL KVM_TDX_INIT_MEM_REGION, KVM premaps leaf SPTEs in the mirror page table before the corresponding entry in the private page table is successfully installed by tdh_mem_page_add(). If an error occurs during the invocation of tdh_mem_page_add(), a mismatch between the mirror and private page tables results in SEAMCALLs for SEPT zap returning the error code TDX_EPT_ENTRY_STATE_INCORRECT. The error TDX_EPT_WALK_FAILED is not possible because, during KVM_TDX_INIT_MEM_REGION, KVM only premaps leaf SPTEs after successfully mapping non-leaf SPTEs. Unlike leaf SPTEs, there is no mismatch in non-leaf PTEs between the mirror and private page tables. Therefore, during zap, SEAMCALLs should find an empty leaf entry in the private EPT, leading to the error TDX_EPT_ENTRY_STATE_INCORRECT instead of TDX_EPT_WALK_FAILED. Since tdh_mem_range_block() is always invoked before tdh_mem_page_remove(), move the handling of SEPT zap errors from tdx_sept_drop_private_spte() to tdx_sept_zap_private_spte(). In tdx_sept_zap_private_spte(), return 0 for errors due to premap to skip executing other SEAMCALLs for zap, which are unnecessary. Return 1 to indicate no other errors, allowing the execution of other zap SEAMCALLs to continue. The failure of tdh_mem_page_add() is uncommon and has not been observed in real workloads. Currently, this failure is only hypothetically triggered by skipping the real SEAMCALL and faking the add error in the SEAMCALL wrapper. Additionally, without this fix, there will be no host crashes or other severe issues. Signed-off-by: Yan Zhao Message-ID: <20250217085642.19696-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 69e23faf82b4e7efe3581f9055a9c29d8d6ff9af Author: Kai Huang Date: Thu Nov 21 22:14:40 2024 +0200 x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest Intel TDX protects guest VM's from malicious host and certain physical attacks. TDX introduces a new operation mode, Secure Arbitration Mode (SEAM) to isolate and protect guest VM's. A TDX guest VM runs in SEAM and, unlike VMX, direct control and interaction with the guest by the host VMM is not possible. Instead, Intel TDX Module, which also runs in SEAM, provides a SEAMCALL API. The SEAMCALL that provides the ability to enter a guest is TDH.VP.ENTER. The TDX Module processes TDH.VP.ENTER, and enters the guest via VMX VMLAUNCH/VMRESUME instructions. When a guest VM-exit requires host VMM interaction, the TDH.VP.ENTER SEAMCALL returns to the host VMM (KVM). Add tdh_vp_enter() to wrap the SEAMCALL invocation of TDH.VP.ENTER; tdh_vp_enter() needs to be noinstr because VM entry in KVM is noinstr as well, which is for two reasons: * marking the area as CT_STATE_GUEST via guest_state_enter_irqoff() and guest_state_exit_irqoff() * IRET must be avoided between VM-exit and NMI handling, in order to avoid prematurely releasing the NMI inhibit. TDH.VP.ENTER is different from other SEAMCALLs in several ways: it uses more arguments, and after it returns some host state may need to be restored. Therefore tdh_vp_enter() uses __seamcall_saved_ret() instead of __seamcall_ret(); since it is the only caller of __seamcall_saved_ret(), it can be made noinstr also. TDH.VP.ENTER arguments are passed through General Purpose Registers (GPRs). For the special case of the TD guest invoking TDG.VP.VMCALL, nearly any GPR can be used, as well as XMM0 to XMM15. Notably, RBP is not used, and Linux mandates the TDX Module feature NO_RBP_MOD, which is enforced elsewhere. Additionally, XMM registers are not required for the existing Guest Hypervisor Communication Interface and are handled by existing KVM code should they be modified by the guest. There are 2 input formats and 5 output formats for TDH.VP.ENTER arguments. Input #1 : Initial entry or following a previous async. TD Exit Input #2 : Following a previous TDCALL(TDG.VP.VMCALL) Output #1 : On Error (No TD Entry) Output #2 : Async. Exits with a VMX Architectural Exit Reason Output #3 : Async. Exits with a non-VMX TD Exit Status Output #4 : Async. Exits with Cross-TD Exit Details Output #5 : On TDCALL(TDG.VP.VMCALL) Currently, to keep things simple, the wrapper function does not attempt to support different formats, and just passes all the GPRs that could be used. The GPR values are held by KVM in the area set aside for guest GPRs. KVM code uses the guest GPR area (vcpu->arch.regs[]) to set up for or process results of tdh_vp_enter(). Therefore changing tdh_vp_enter() to use more complex argument formats would also alter the way KVM code interacts with tdh_vp_enter(). Signed-off-by: Kai Huang Signed-off-by: Adrian Hunter Message-ID: <20241121201448.36170-2-adrian.hunter@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 1f62531bc9fa33f2b5169f02871ac14b9e20f575 Author: Paolo Bonzini Date: Wed Feb 19 07:43:51 2025 -0500 KVM: TDX: Skip updating CPU dirty logging request for TDs Wrap vmx_update_cpu_dirty_logging so as to ignore requests to update CPU dirty logging for TDs, as basic TDX does not support the PML feature. Invoking vmx_update_cpu_dirty_logging() for TDs would cause an incorrect access to a kvm_vmx struct for a TDX VM, so block that before it happens. Signed-off-by: Yan Zhao Signed-off-by: Paolo Bonzini commit fbb4adadea55e68f0f9ebde83b069552b7a67fe1 Author: Yan Zhao Date: Thu Jan 23 17:58:26 2025 -0800 KVM: x86: Make cpu_dirty_log_size a per-VM value Make cpu_dirty_log_size (CPU's dirty log buffer size) a per-VM value and set the per-VM cpu_dirty_log_size only for normal VMs when PML is enabled. Do not set it for TDs. Until now, cpu_dirty_log_size was a system-wide value that is used for all VMs and is set to the PML buffer size when PML was enabled in VMX. However, PML is not currently supported for TDs, though PML remains available for normal VMs as long as the feature is supported by hardware and enabled in VMX. Making cpu_dirty_log_size a per-VM value allows it to be ther PML buffer size for normal VMs and 0 for TDs. This allows functions like kvm_arch_sync_dirty_log() and kvm_mmu_update_cpu_dirty_logging() to determine if PML is supported, in order to kick off vCPUs or request them to update CPU dirty logging status (turn on/off PML in VMCS). This fixes an issue first reported in [1], where QEMU attaches an emulated VGA device to a TD; note that KVM_MEM_LOG_DIRTY_PAGES still works if the corresponding has no flag KVM_MEM_GUEST_MEMFD. KVM then invokes kvm_mmu_update_cpu_dirty_logging() and from there vmx_update_cpu_dirty_logging(), which incorrectly accesses a kvm_vmx struct for a TDX VM. Reported-by: ANAND NARSHINHA PATIL Reported-by: Pedro Principeza Reported-by: Farrah Chen Closes: https://github.com/canonical/tdx/issues/202 Link: https://github.com/canonical/tdx/issues/202 [1] Suggested-by: Kai Huang Signed-off-by: Yan Zhao Signed-off-by: Paolo Bonzini commit fd3252571b13639e21c24a740b6cc23083ed1c9c Author: Yan Zhao Date: Mon Jan 13 11:08:59 2025 +0800 KVM: x86/mmu: Add parameter "kvm" to kvm_mmu_page_ad_need_write_protect() Add a parameter "kvm" to kvm_mmu_page_ad_need_write_protect() and its caller tdp_mmu_need_write_protect(). This is a preparation to make cpu_dirty_log_size a per-VM value rather than a system-wide value. No function changes expected. Signed-off-by: Yan Zhao Signed-off-by: Paolo Bonzini commit c4a92f12cf35b83ce81757f6e5e8eb6223b87388 Author: Yan Zhao Date: Mon Jan 13 11:08:41 2025 +0800 KVM: Add parameter "kvm" to kvm_cpu_dirty_log_size() and its callers Add a parameter "kvm" to kvm_cpu_dirty_log_size() and down to its callers: kvm_dirty_ring_get_rsvd_entries(), kvm_dirty_ring_alloc(). This is a preparation to make cpu_dirty_log_size a per-VM value rather than a system-wide value. No function changes expected. Signed-off-by: Yan Zhao Signed-off-by: Paolo Bonzini commit d789fa6efac9328c9db5a1e45bc2a665a13b7a65 Author: Isaku Yamahata Date: Tue Nov 12 15:38:58 2024 +0800 KVM: TDX: Handle vCPU dissociation Handle vCPUs dissociations by invoking SEAMCALL TDH.VP.FLUSH which flushes the address translation caches and cached TD VMCS of a TD vCPU in its associated pCPU. In TDX, a vCPUs can only be associated with one pCPU at a time, which is done by invoking SEAMCALL TDH.VP.ENTER. For a successful association, the vCPU must be dissociated from its previous associated pCPU. To facilitate vCPU dissociation, introduce a per-pCPU list associated_tdvcpus. Add a vCPU into this list when it's loaded into a new pCPU (i.e. when a vCPU is loaded for the first time or migrated to a new pCPU). vCPU dissociations can happen under below conditions: - On the op hardware_disable is called. This op is called when virtualization is disabled on a given pCPU, e.g. when hot-unplug a pCPU or machine shutdown/suspend. In this case, dissociate all vCPUs from the pCPU by iterating its per-pCPU list associated_tdvcpus. - On vCPU migration to a new pCPU. Before adding a vCPU into associated_tdvcpus list of the new pCPU, dissociation from its old pCPU is required, which is performed by issuing an IPI and executing SEAMCALL TDH.VP.FLUSH on the old pCPU. On a successful dissociation, the vCPU will be removed from the associated_tdvcpus list of its previously associated pCPU. - On tdx_mmu_release_hkid() is called. TDX mandates that all vCPUs must be disassociated prior to the release of an hkid. Therefore, dissociation of all vCPUs is a must before executing the SEAMCALL TDH.MNG.VPFLUSHDONE and subsequently freeing the hkid. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Message-ID: <20241112073858.22312-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 012426d6f59cab21f4e1ab4cc2c919fd26a04ead Author: Isaku Yamahata Date: Tue Sep 3 20:07:50 2024 -0700 KVM: TDX: Finalize VM initialization Add a new VM-scoped KVM_MEMORY_ENCRYPT_OP IOCTL subcommand, KVM_TDX_FINALIZE_VM, to perform TD Measurement Finalization. Documentation for the API is added in another patch: "Documentation/virt/kvm: Document on Trust Domain Extensions(TDX)" For the purpose of attestation, a measurement must be made of the TDX VM initial state. This is referred to as TD Measurement Finalization, and uses SEAMCALL TDH.MR.FINALIZE, after which: 1. The VMM adding TD private pages with arbitrary content is no longer allowed 2. The TDX VM is runnable Co-developed-by: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Message-ID: <20240904030751.117579-21-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini commit c846b451d3c5d4ba304bbeeaf7aa9a04bb432408 Author: Isaku Yamahata Date: Tue Nov 12 15:38:37 2024 +0800 KVM: TDX: Add an ioctl to create initial guest memory Add a new ioctl for the user space VMM to initialize guest memory with the specified memory contents. Because TDX protects the guest's memory, the creation of the initial guest memory requires a dedicated TDX module API, TDH.MEM.PAGE.ADD(), instead of directly copying the memory contents into the guest's memory in the case of the default VM type. Define a new subcommand, KVM_TDX_INIT_MEM_REGION, of vCPU-scoped KVM_MEMORY_ENCRYPT_OP. Check if the GFN is already pre-allocated, assign the guest page in Secure-EPT, copy the initial memory contents into the guest memory, and encrypt the guest memory. Optionally, extend the memory measurement of the TDX guest. The ioctl uses the vCPU file descriptor because of the TDX module's requirement that the memory is added to the S-EPT (via TDH.MEM.SEPT.ADD) prior to initialization (TDH.MEM.PAGE.ADD). Accessing the MMU in turn requires a vCPU file descriptor, just like for KVM_PRE_FAULT_MEMORY. In fact, the post-populate callback is able to reuse the same logic used by KVM_PRE_FAULT_MEMORY, so that userspace can do everything with a single ioctl. Note that this is the only way to invoke TDH.MEM.SEPT.ADD before the TD in finalized, as userspace cannot use KVM_PRE_FAULT_MEMORY at that point. This ensures that there cannot be pages in the S-EPT awaiting TDH.MEM.PAGE.ADD, which would be treated incorrectly as spurious by tdp_mmu_map_handle_target_level() (KVM would see the SPTE as PRESENT, but the corresponding S-EPT entry will be !PRESENT). Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao --- - KVM_BUG_ON() for kvm_tdx->nr_premapped (Paolo) - Use tdx_operand_busy() - Merge first patch in SEPT SEAMCALL retry series in to this base (Paolo) Signed-off-by: Paolo Bonzini commit b832317b8cbe92eea43129d220f7f8111c574995 Author: Rick Edgecombe Date: Tue Nov 12 15:38:27 2024 +0800 KVM: x86/mmu: Export kvm_tdp_map_page() In future changes coco specific code will need to call kvm_tdp_map_page() from within their respective gmem_post_populate() callbacks. Export it so this can be done from vendor specific code. Since kvm_mmu_reload() will be needed for this operation, export its callee kvm_mmu_load() as well. Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073827.22270-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 958810a09412d5d30eb507bd08a4f9eb5077f699 Author: Yan Zhao Date: Thu Feb 20 18:27:27 2025 +0800 KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM dead Bail out of the loop in kvm_tdp_map_page() when a VM is dead. Otherwise, kvm_tdp_map_page() may get stuck in the kernel loop when there's only one vCPU in the VM (or if the other vCPUs are not executing ioctls), even if fatal errors have occurred. kvm_tdp_map_page() is called by the ioctl KVM_PRE_FAULT_MEMORY or the TDX ioctl KVM_TDX_INIT_MEM_REGION. It loops in the kernel whenever RET_PF_RETRY is returned. In the TDP MMU, kvm_tdp_mmu_map() always returns RET_PF_RETRY, regardless of the specific error code from tdp_mmu_set_spte_atomic(), tdp_mmu_link_sp(), or tdp_mmu_split_huge_page(). While this is acceptable in general cases where the only possible error code from these functions is -EBUSY, TDX introduces an additional error code, -EIO, due to SEAMCALL errors. Since this -EIO error is also a fatal error, check for VM dead in the kvm_tdp_map_page() to avoid unnecessary retries until a signal is pending. The error -EIO is uncommon and has not been observed in real workloads. Currently, it is only hypothetically triggered by bypassing the real SEAMCALL and faking an error in the SEAMCALL wrapper. Signed-off-by: Yan Zhao Message-ID: <20250220102728.24546-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 0036b87a95f1350a159ccb422149f13fd0ee19e0 Author: Isaku Yamahata Date: Tue Nov 12 15:38:16 2024 +0800 KVM: TDX: Implement hook to get max mapping level of private pages Implement hook private_max_mapping_level for TDX to let TDP MMU core get max mapping level of private pages. The value is hard coded to 4K for no huge page support for now. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073816.22256-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 02ab57707bdbc25f43bf217748ff82d84c197556 Author: Isaku Yamahata Date: Tue Nov 12 15:38:04 2024 +0800 KVM: TDX: Implement hooks to propagate changes of TDP MMU mirror page table Implement hooks in TDX to propagate changes of mirror page table to private EPT, including changes for page table page adding/removing, guest page adding/removing. TDX invokes corresponding SEAMCALLs in the hooks. - Hook link_external_spt propagates adding page table page into private EPT. - Hook set_external_spte tdx_sept_set_private_spte() in this patch only handles adding of guest private page when TD is finalized. Later patches will handle the case of adding guest private pages before TD finalization. - Hook free_external_spt It is invoked when page table page is removed in mirror page table, which currently must occur at TD tear down phase, after hkid is freed. - Hook remove_external_spte It is invoked when guest private page is removed in mirror page table, which can occur when TD is active, e.g. during shared <-> private conversion and slot move/deletion. This hook is ensured to be triggered before hkid is freed, because gmem fd is released along with all private leaf mappings zapped before freeing hkid at VM destroy. TDX invokes below SEAMCALLs sequentially: 1) TDH.MEM.RANGE.BLOCK (remove RWX bits from a private EPT entry), 2) TDH.MEM.TRACK (increases TD epoch) 3) TDH.MEM.PAGE.REMOVE (remove the private EPT entry and untrack the guest page). TDH.MEM.PAGE.REMOVE can't succeed without TDH.MEM.RANGE.BLOCK and TDH.MEM.TRACK being called successfully. SEAMCALL TDH.MEM.TRACK is called in function tdx_track() to enforce that TLB tracking will be performed by TDX module for private EPT. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao --- - Remove TDX_ERROR_SEPT_BUSY and Add tdx_operand_busy() helper (Binbin) Signed-off-by: Paolo Bonzini commit 22836e1de6862c8ed0bc75ccdacd35dd13278864 Author: Isaku Yamahata Date: Tue Nov 12 15:37:53 2024 +0800 KVM: TDX: Handle TLB tracking for TDX Handle TLB tracking for TDX by introducing function tdx_track() for private memory TLB tracking and implementing flush_tlb* hooks to flush TLBs for shared memory. Introduce function tdx_track() to do TLB tracking on private memory, which basically does two things: calling TDH.MEM.TRACK to increase TD epoch and kicking off all vCPUs. The private EPT will then be flushed when each vCPU re-enters the TD. This function is unused temporarily in this patch and will be called on a page-by-page basis on removal of private guest page in a later patch. In earlier revisions, tdx_track() relied on an atomic counter to coordinate the synchronization between the actions of kicking off vCPUs, incrementing the TD epoch, and the vCPUs waiting for the incremented TD epoch after being kicked off. However, the core MMU only actually needs to call tdx_track() while aleady under a write mmu_lock. So this sychnonization can be made to be unneeded. vCPUs are kicked off only after the successful execution of TDH.MEM.TRACK, eliminating the need for vCPUs to wait for TDH.MEM.TRACK completion after being kicked off. tdx_track() is therefore able to send requests KVM_REQ_OUTSIDE_GUEST_MODE rather than KVM_REQ_TLB_FLUSH. Hooks for flush_remote_tlb and flush_remote_tlbs_range are not necessary for TDX, as tdx_track() will handle TLB tracking of private memory on page-by-page basis when private guest pages are removed. There is no need to invoke tdx_track() again in kvm_flush_remote_tlbs() even after changes to the mirrored page table. For hooks flush_tlb_current and flush_tlb_all, which are invoked during kvm_mmu_load() and vcpu load for normal VMs, let VMM to flush all EPTs in the two hooks for simplicity, since TDX does not depend on the two hooks to notify TDX module to flush private EPT in those cases. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Message-ID: <20241112073753.22228-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 7d10ffb1acac2c17c2c839e2db88565529e8c8ef Author: Isaku Yamahata Date: Tue Nov 12 15:37:43 2024 +0800 KVM: TDX: Set per-VM shadow_mmio_value to 0 Set per-VM shadow_mmio_value to 0 for TDX. With enable_mmio_caching on, KVM installs MMIO SPTEs for TDs. To correctly configure MMIO SPTEs, TDX requires the per-VM shadow_mmio_value to be set to 0. This is necessary to override the default value of the suppress VE bit in the SPTE, which is 1, and to ensure value 0 in RWX bits. For MMIO SPTE, the spte value changes as follows: 1. initial value (suppress VE bit is set) 2. Guest issues MMIO and triggers EPT violation 3. KVM updates SPTE value to MMIO value (suppress VE bit is cleared) 4. Guest MMIO resumes. It triggers VE exception in guest TD 5. Guest VE handler issues TDG.VP.VMCALL 6. KVM handles MMIO 7. Guest VE handler resumes its execution after MMIO instruction Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073743.22214-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 5a46fd48d884f3ed1bac8adf64dafd7e60d0d6e3 Author: Isaku Yamahata Date: Tue Nov 12 15:37:30 2024 +0800 KVM: x86/mmu: Add setter for shadow_mmio_value Future changes will want to set shadow_mmio_value from TDX code. Add a helper to setter with a name that makes more sense from that context. Signed-off-by: Isaku Yamahata [split into new patch] Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073730.22200-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 427a6486c51b285ac471434168ce401659b78766 Author: Isaku Yamahata Date: Tue Nov 12 15:37:20 2024 +0800 KVM: TDX: Require TDP MMU, mmio caching and EPT A/D bits for TDX Disable TDX support when TDP MMU or mmio caching or EPT A/D bits aren't supported. As TDP MMU is becoming main stream than the legacy MMU, the legacy MMU support for TDX isn't implemented. TDX requires KVM mmio caching. Without mmio caching, KVM will go to MMIO emulation without installing SPTEs for MMIOs. However, TDX guest is protected and KVM would meet errors when trying to emulate MMIOs for TDX guest during instruction decoding. So, TDX guest relies on SPTEs being installed for MMIOs, which are with no RWX bits and with VE suppress bit unset, to inject VE to TDX guest. The TDX guest would then issue TDVMCALL in the VE handler to perform instruction decoding and have host do MMIO emulation. TDX also relies on EPT A/D bits as EPT A/D bits have been supported in all CPUs since Haswell. Relying on it can avoid RWX bits being masked out in the mirror page table for prefaulted entries. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Signed-off-by: Yan Zhao --- Requested by Sean at [1]. [1] https://lore.kernel.org/kvm/Zva4aORxE9ljlMNe@google.com/ Signed-off-by: Paolo Bonzini commit e0fbb3bbb5d076769621d7bac06046d4f3c75875 Author: Isaku Yamahata Date: Tue Nov 12 15:36:13 2024 +0800 KVM: TDX: Set gfn_direct_bits to shared bit Make the direct root handle memslot GFNs at an alias with the TDX shared bit set. For TDX shared memory, the memslot GFNs need to be mapped at an alias with the shared bit set. These shared mappings will be mapped on the KVM MMU's "direct" root. The direct root has it's mappings shifted by applying "gfn_direct_bits" as a mask. The concept of "GPAW" (guest physical address width) determines the location of the shared bit. So set gfn_direct_bits based on this, to map shared memory at the proper GPA. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073613.22100-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 87e3f45e80474a652ad6e75cc33a6b68602de463 Author: Sean Christopherson Date: Tue Nov 12 15:36:01 2024 +0800 KVM: TDX: Add load_mmu_pgd method for TDX TDX uses two EPT pointers, one for the private half of the GPA space and one for the shared half. The private half uses the normal EPT_POINTER vmcs field, which is managed in a special way by the TDX module. For TDX, KVM is not allowed to operate on it directly. The shared half uses a new SHARED_EPT_POINTER field and will be managed by the conventional MMU management operations that operate directly on the EPT root. This means for TDX the .load_mmu_pgd() operation will need to know to use the SHARED_EPT_POINTER field instead of the normal one. Add a new wrapper in x86 ops for load_mmu_pgd() that either directs the write to the existing vmx implementation or a TDX one. tdx_load_mmu_pgd() is so much simpler than vmx_load_mmu_pgd() since for the TDX mode of operation, EPT will always be used and KVM does not need to be involved in virtualization of CR3 behavior. So tdx_load_mmu_pgd() can simply write to SHARED_EPT_POINTER. Signed-off-by: Sean Christopherson Co-developed-by: Isaku Yamahata Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073601.22084-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit fe1e6d483fcfd46ee16436749bc73a5b1fc89324 Author: Isaku Yamahata Date: Tue Nov 12 15:35:50 2024 +0800 KVM: TDX: Add accessors VMX VMCS helpers TDX defines SEAMCALL APIs to access TDX control structures corresponding to the VMX VMCS. Introduce helper accessors to hide its SEAMCALL ABI details. Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Message-ID: <20241112073551.22070-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 3b725e972fd003218397437bae81ee309ed26322 Author: Rick Edgecombe Date: Tue Nov 12 15:35:39 2024 +0800 KVM: VMX: Teach EPT violation helper about private mem Teach EPT violation helper to check shared mask of a GPA to find out whether the GPA is for private memory. When EPT violation is triggered after TD accessing a private GPA, KVM will exit to user space if the corresponding GFN's attribute is not private. User space will then update GFN's attribute during its memory conversion process. After that, TD will re-access the private GPA and trigger EPT violation again. Only with GFN's attribute matches to private, KVM will fault in private page, map it in mirrored TDP root, and propagate changes to private EPT to resolve the EPT violation. Relying on GFN's attribute tracking xarray to determine if a GFN is private, as for KVM_X86_SW_PROTECTED_VM, may lead to endless EPT violations. Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Message-ID: <20241112073539.22056-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit c8563d1b69988ef9b6803508e1c95f2aea0a171d Author: Sean Christopherson Date: Tue Nov 12 15:35:28 2024 +0800 KVM: VMX: Split out guts of EPT violation to common/exposed function The difference of TDX EPT violation is how to retrieve information, GPA, and exit qualification. To share the code to handle EPT violation, split out the guts of EPT violation handler so that VMX/TDX exit handler can call it after retrieving GPA and exit qualification. Signed-off-by: Sean Christopherson Co-developed-by: Isaku Yamahata Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Reviewed-by: Kai Huang Reviewed-by: Binbin Wu Message-ID: <20241112073528.22042-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 6d15a641fddb0455600f3399238aee5c6fccdef3 Author: Yan Zhao Date: Tue Nov 12 15:35:15 2024 +0800 KVM: x86/mmu: Do not enable page track for TD guest Fail kvm_page_track_write_tracking_enabled() if VM type is TDX to make the external page track user fail in kvm_page_track_register_notifier() since TDX does not support write protection and hence page track. No need to fail KVM internal users of page track (i.e. for shadow page), because TDX is always with EPT enabled and currently TDX module does not emulate and send VMLAUNCH/VMRESUME VMExits to VMM. Suggested-by: Paolo Bonzini Signed-off-by: Yan Zhao Reviewed-by: Binbin Wu Cc: Yuan Yao Message-ID: <20241112073515.22028-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 2608f105760115e94a03efd9f12f8fbfd1f9af4b Author: Isaku Yamahata Date: Tue Nov 12 15:34:57 2024 +0800 KVM: x86/tdp_mmu: Add a helper function to walk down the TDP MMU Export a function to walk down the TDP without modifying it and simply check if a GPA is mapped. Future changes will support pre-populating TDX private memory. In order to implement this KVM will need to check if a given GFN is already pre-populated in the mirrored EPT. [1] There is already a TDP MMU walker, kvm_tdp_mmu_get_walk() for use within the KVM MMU that almost does what is required. However, to make sense of the results, MMU internal PTE helpers are needed. Refactor the code to provide a helper that can be used outside of the KVM MMU code. Refactoring the KVM page fault handler to support this lookup usage was also considered, but it was an awkward fit. kvm_tdp_mmu_gpa_is_mapped() is based on a diff by Paolo Bonzini. Link: https://lore.kernel.org/kvm/ZfBkle1eZFfjPI8l@google.com/ [1] Signed-off-by: Isaku Yamahata Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Reviewed-by: Paolo Bonzini Message-ID: <20241112073457.22011-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit ae80c7d66c5f18c7d86629a2fb47765c6917f3e5 Author: Rick Edgecombe Date: Tue Nov 12 15:34:26 2024 +0800 KVM: x86/mmu: Implement memslot deletion for TDX Update attr_filter field to zap both private and shared mappings for TDX when memslot is deleted. Signed-off-by: Rick Edgecombe Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Message-ID: <20241112073426.21997-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini commit 099d7e9bea82f442950dff57ee3aa5a5599a361b Author: Isaku Yamahata Date: Tue Nov 12 15:37:08 2024 +0800 x86/virt/tdx: Add SEAMCALL wrappers for TD measurement of initial contents The TDX module measures the TD during the build process and saves the measurement in TDCS.MRTD to facilitate TD attestation of the initial contents of the TD. Wrap the SEAMCALL TDH.MR.EXTEND with tdh_mr_extend() and TDH.MR.FINALIZE with tdh_mr_finalize() to enable the host kernel to assist the TDX module in performing the measurement. The measurement in TDCS.MRTD is a SHA-384 digest of the build process. SEAMCALLs TDH.MNG.INIT and TDH.MEM.PAGE.ADD initialize and contribute to the MRTD digest calculation. The caller of tdh_mr_extend() should break the TD private page into chunks of size TDX_EXTENDMR_CHUNKSIZE and invoke tdh_mr_extend() to add the page content into the digest calculation. Failures are possible with TDH.MR.EXTEND (e.g., due to SEPT walking). The caller of tdh_mr_extend() can check the function return value and retrieve extended error information from the function output parameters. Calling tdh_mr_finalize() completes the measurement. The TDX module then turns the TD into the runnable state. Further TDH.MEM.PAGE.ADD and TDH.MR.EXTEND calls will fail. TDH.MR.FINALIZE may fail due to errors such as the TD having no vCPUs or contentions. Check function return value when calling tdh_mr_finalize() to determine the exact reason for failure. Take proper locks on the caller's side to avoid contention failures, or handle the BUSY error in specific ways (e.g., retry). Return the SEAMCALL error code directly to the caller. Do not attempt to handle it in the core kernel. [Kai: Switched from generic seamcall export] [Yan: Re-wrote the changelog] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073709.22171-1-yan.y.zhao@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 7c035bea94074b19ed560a4f23a76c5a6c8e594f Author: Zhiming Hu Date: Wed Feb 19 09:02:51 2025 -0500 KVM: TDX: Register TDX host key IDs to cgroup misc controller TDX host key IDs (HKID) are limit resources in a machine, and the misc cgroup lets the machine owner track their usage and limits the possibility of abusing them outside the owner's control. The cgroup v2 miscellaneous subsystem was introduced to control the resource of AMD SEV & SEV-ES ASIDs. Likewise introduce HKIDs as a misc resource. Signed-off-by: Zhiming Hu Signed-off-by: Isaku Yamahata Signed-off-by: Paolo Bonzini commit 206e7860e754e184cc35a535bb0f2136cf57f376 Author: Isaku Yamahata Date: Tue Nov 12 15:36:58 2024 +0800 x86/virt/tdx: Add SEAMCALL wrappers to remove a TD private page TDX architecture introduces the concept of private GPA vs shared GPA, depending on the GPA.SHARED bit. The TDX module maintains a single Secure EPT (S-EPT or SEPT) tree per TD to translate TD's private memory accessed using a private GPA. Wrap the SEAMCALL TDH.MEM.PAGE.REMOVE with tdh_mem_page_remove() and TDH_PHYMEM_PAGE_WBINVD with tdh_phymem_page_wbinvd_hkid() to unmap a TD private page from the SEPT, remove the TD private page from the TDX module and flush cache lines to memory after removal of the private page. Callers should specify "GPA" and "level" when calling tdh_mem_page_remove() to indicate to the TDX module which TD private page to unmap and remove. TDH.MEM.PAGE.REMOVE may fail, and the caller of tdh_mem_page_remove() can check the function return value and retrieve extended error information from the function output parameters. Follow the TLB tracking protocol before calling tdh_mem_page_remove() to remove a TD private page to avoid SEAMCALL failure. After removing a TD's private page, the TDX module does not write back and invalidate cache lines associated with the page and the page's keyID (i.e., the TD's guest keyID). Therefore, provide tdh_phymem_page_wbinvd_hkid() to allow the caller to pass in the TD's guest keyID and invoke TDH_PHYMEM_PAGE_WBINVD to perform this action. Before reusing the page, the host kernel needs to map the page with keyID 0 and invoke movdir64b() to convert the TD private page to a normal shared page. TDH.MEM.PAGE.REMOVE and TDH_PHYMEM_PAGE_WBINVD may meet contentions inside the TDX module for TDX's internal resources. To avoid staying in SEAM mode for too long, TDX module will return a BUSY error code to the kernel instead of spinning on the locks. The caller may need to handle this error in specific ways (e.g., retry). The wrappers return the SEAMCALL error code directly to the caller. Don't attempt to handle it in the core kernel. [Kai: Switched from generic seamcall export] [Yan: Re-wrote the changelog] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073658.22157-1-yan.y.zhao@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 20d913729c116a43119de76d346e0d3da0dc856b Author: Xiaoyao Li Date: Wed Oct 30 12:00:38 2024 -0700 KVM: x86/mmu: Taking guest pa into consideration when calculate tdp level For TDX, the maxpa (CPUID.0x80000008.EAX[7:0]) is fixed as native and the max_gpa (CPUID.0x80000008.EAX[23:16]) is configurable and used to configure the EPT level and GPAW. Use max_gpa to determine the TDP level. Signed-off-by: Xiaoyao Li Signed-off-by: Rick Edgecombe Signed-off-by: Paolo Bonzini commit ee4884eb84dc876d1474652acc1351495921b45c Author: Isaku Yamahata Date: Tue Jan 14 16:44:26 2025 -0500 x86/virt/tdx: Add SEAMCALL wrappers to manage TDX TLB tracking TDX module defines a TLB tracking protocol to make sure that no logical processor holds any stale Secure EPT (S-EPT or SEPT) TLB translations for a given TD private GPA range. After a successful TDH.MEM.RANGE.BLOCK, TDH.MEM.TRACK, and kicking off all vCPUs, TDX module ensures that the subsequent TDH.VP.ENTER on each vCPU will flush all stale TLB entries for the specified GPA ranges in TDH.MEM.RANGE.BLOCK. Wrap the TDH.MEM.RANGE.BLOCK with tdh_mem_range_block() and TDH.MEM.TRACK with tdh_mem_track() to enable the kernel to assist the TDX module in TLB tracking management. The caller of tdh_mem_range_block() needs to specify "GPA" and "level" to request the TDX module to block the subsequent creation of TLB translation for a GPA range. This GPA range can correspond to a SEPT page or a TD private page at any level. Contentions and errors are possible with the SEAMCALL TDH.MEM.RANGE.BLOCK. Therefore, the caller of tdh_mem_range_block() needs to check the function return value and retrieve extended error info from the function output params. Upon TDH.MEM.RANGE.BLOCK success, no new TLB entries will be created for the specified private GPA range, though the existing TLB translations may still persist. TDH.MEM.TRACK will then advance the TD's epoch counter to ensure TDX module will flush TLBs in all vCPUs once the vCPUs re-enter the TD. TDH.MEM.TRACK will fail to advance TD's epoch counter if there are vCPUs still running in non-root mode at the previous TD epoch counter. So to ensure private GPA translations are flushed, callers must first call tdh_mem_range_block(), then tdh_mem_track(), and lastly send IPIs to kick all the vCPUs and force them to re-enter, thus triggering the TLB flush. Don't export a single operation and instead export functions that just expose the block and track operations; this is for a couple reasons: 1. The vCPU kick should use KVM's functionality for doing this, which can better target sending IPIs to only the minimum required pCPUs. 2. tdh_mem_track() doesn't need to be executed if a vCPU has not entered a TD, which is information only KVM knows. 3. Leaving the operations separate will allow for batching many tdh_mem_range_block() calls before a tdh_mem_track(). While this batching will not be done initially by KVM, it demonstrates that keeping mem block and track as separate operations is a generally good design. Contentions are also possible in TDH.MEM.TRACK. For example, TDH.MEM.TRACK may contend with TDH.VP.ENTER when advancing the TD epoch counter. tdh_mem_track() does not provide the retries for the caller. Callers can choose to avoid contentions or retry on their own. [Kai: Switched from generic seamcall export] [Yan: Re-wrote the changelog] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073648.22143-1-yan.y.zhao@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 488808e682e72bdb15a579d61f5b90ece92ba83c Author: Xiaoyao Li Date: Wed Oct 30 12:00:37 2024 -0700 KVM: x86: Introduce KVM_TDX_GET_CPUID Implement an IOCTL to allow userspace to read the CPUID bit values for a configured TD. The TDX module doesn't provide the ability to set all CPUID bits. Instead some are configured indirectly, or have fixed values. But it does allow for the final resulting CPUID bits to be read. This information will be useful for userspace to understand the configuration of the TD, and set KVM's copy via KVM_SET_CPUID2. Signed-off-by: Xiaoyao Li Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rick Edgecombe --- - Fix subleaf mask check (Binbin) - Search all possible sub-leafs (Francesco Lavra) - Reduce off-by-one error sensitve code (Francesco, Xiaoyao) - Handle buffers too small from userspace (Xiaoyao) - Read max CPUID from TD instead of using fixed values (Xiaoyao) Signed-off-by: Paolo Bonzini commit 94c477a751c7b835f52e9171f1266027dd06aa1d Author: Isaku Yamahata Date: Tue Nov 12 15:36:36 2024 +0800 x86/virt/tdx: Add SEAMCALL wrappers to add TD private pages TDX architecture introduces the concept of private GPA vs shared GPA, depending on the GPA.SHARED bit. The TDX module maintains a Secure EPT (S-EPT or SEPT) tree per TD to translate TD's private memory accessed using a private GPA. Wrap the SEAMCALL TDH.MEM.PAGE.ADD with tdh_mem_page_add() and TDH.MEM.PAGE.AUG with tdh_mem_page_aug() to add TD private pages and map them to the TD's private GPAs in the SEPT. Callers of tdh_mem_page_add() and tdh_mem_page_aug() allocate and provide normal pages to the wrappers, who further pass those pages to the TDX module. Before passing the pages to the TDX module, tdh_mem_page_add() and tdh_mem_page_aug() perform a CLFLUSH on the page mapped with keyID 0 to ensure that any dirty cache lines don't write back later and clobber TD memory or control structures. Don't worry about the other MK-TME keyIDs because the kernel doesn't use them. The TDX docs specify that this flush is not needed unless the TDX module exposes the CLFLUSH_BEFORE_ALLOC feature bit. Do the CLFLUSH unconditionally for two reasons: make the solution simpler by having a single path that can handle both !CLFLUSH_BEFORE_ALLOC and CLFLUSH_BEFORE_ALLOC cases. Avoid wading into any correctness uncertainty by going with a conservative solution to start. Call tdh_mem_page_add() to add a private page to a TD during the TD's build time (i.e., before TDH.MR.FINALIZE). Specify which GPA the 4K private page will map to. No need to specify level info since TDH.MEM.PAGE.ADD only adds pages at 4K level. To provide initial contents to TD, provide an additional source page residing in memory managed by the host kernel itself (encrypted with a shared keyID). The TDX module will copy the initial contents from the source page in shared memory into the private page after mapping the page in the SEPT to the specified private GPA. The TDX module allows the source page to be the same page as the private page to be added. In that case, the TDX module converts and encrypts the source page as a TD private page. Call tdh_mem_page_aug() to add a private page to a TD during the TD's runtime (i.e., after TDH.MR.FINALIZE). TDH.MEM.PAGE.AUG supports adding huge pages. Specify which GPA the private page will map to, along with level info embedded in the lower bits of the GPA. The TDX module will recognize the added page as the TD's private page after the TD's acceptance with TDCALL TDG.MEM.PAGE.ACCEPT. tdh_mem_page_add() and tdh_mem_page_aug() may fail. Callers can check function return value and retrieve extended error info from the function output parameters. The TDX module has many internal locks. To avoid staying in SEAM mode for too long, SEAMCALLs returns a BUSY error code to the kernel instead of spinning on the locks. Depending on the specific SEAMCALL, the caller may need to handle this error in specific ways (e.g., retry). Therefore, return the SEAMCALL error code directly to the caller. Don't attempt to handle it in the core kernel. [Kai: Switched from generic seamcall export] [Yan: Re-wrote the changelog] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073636.22129-1-yan.y.zhao@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit a50f673f25e0ba2b594d94efe235f4eb57d0e784 Author: Isaku Yamahata Date: Wed Oct 30 12:00:36 2024 -0700 KVM: TDX: Do TDX specific vcpu initialization TD guest vcpu needs TDX specific initialization before running. Repurpose KVM_MEMORY_ENCRYPT_OP to vcpu-scope, add a new sub-command KVM_TDX_INIT_VCPU, and implement the callback for it. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Co-developed-by: Adrian Hunter Signed-off-by: Adrian Hunter Signed-off-by: Rick Edgecombe --- - Fix comment: https://lore.kernel.org/kvm/Z36OYfRW9oPjW8be@google.com/ (Sean) Signed-off-by: Paolo Bonzini commit 385ba3fd8d3d22d907484f9eec27d7906d48a446 Author: Isaku Yamahata Date: Tue Nov 12 15:36:24 2024 +0800 x86/virt/tdx: Add SEAMCALL wrapper tdh_mem_sept_add() to add SEPT pages TDX architecture introduces the concept of private GPA vs shared GPA, depending on the GPA.SHARED bit. The TDX module maintains a Secure EPT (S-EPT or SEPT) tree per TD for private GPA to HPA translation. Wrap the TDH.MEM.SEPT.ADD SEAMCALL with tdh_mem_sept_add() to provide pages to the TDX module for building a TD's SEPT tree. (Refer to these pages as SEPT pages). Callers need to allocate and provide a normal page to tdh_mem_sept_add(), which then passes the page to the TDX module via the SEAMCALL TDH.MEM.SEPT.ADD. The TDX module then installs the page into SEPT tree and encrypts this SEPT page with the TD's guest keyID. The kernel cannot use the SEPT page until after reclaiming it via TDH.MEM.SEPT.REMOVE or TDH.PHYMEM.PAGE.RECLAIM. Before passing the page to the TDX module, tdh_mem_sept_add() performs a CLFLUSH on the page mapped with keyID 0 to ensure that any dirty cache lines don't write back later and clobber TD memory or control structures. Don't worry about the other MK-TME keyIDs because the kernel doesn't use them. The TDX docs specify that this flush is not needed unless the TDX module exposes the CLFLUSH_BEFORE_ALLOC feature bit. Do the CLFLUSH unconditionally for two reasons: make the solution simpler by having a single path that can handle both !CLFLUSH_BEFORE_ALLOC and CLFLUSH_BEFORE_ALLOC cases. Avoid wading into any correctness uncertainty by going with a conservative solution to start. Callers should specify "GPA" and "level" for the TDX module to install the SEPT page at the specified position in the SEPT. Do not include the root page level in "level" since TDH.MEM.SEPT.ADD can only add non-root pages to the SEPT. Ensure "level" is between 1 and 3 for a 4-level SEPT or between 1 and 4 for a 5-level SEPT. Call tdh_mem_sept_add() during the TD's build time or during the TD's runtime. Check for errors from the function return value and retrieve extended error info from the function output parameters. The TDX module has many internal locks. To avoid staying in SEAM mode for too long, SEAMCALLs returns a BUSY error code to the kernel instead of spinning on the locks. Depending on the specific SEAMCALL, the caller may need to handle this error in specific ways (e.g., retry). Therefore, return the SEAMCALL error code directly to the caller. Don't attempt to handle it in the core kernel. TDH.MEM.SEPT.ADD effectively manages two internal resources of the TDX module: it installs page table pages in the SEPT tree and also updates the TDX module's page metadata (PAMT). Don't add a wrapper for the matching SEAMCALL for removing a SEPT page (TDH.MEM.SEPT.REMOVE) because KVM, as the only in-kernel user, will only tear down the SEPT tree when the TD is being torn down. When this happens it can just do other operations that reclaim the SEPT pages for the host kernels to use, update the PAMT and let the SEPT get trashed. [Kai: Switched from generic seamcall export] [Yan: Re-wrote the changelog] Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Signed-off-by: Yan Zhao Message-ID: <20241112073624.22114-1-yan.y.zhao@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 9002f8cf5295218eefdd54111e8f8930ce25d0ad Author: Isaku Yamahata Date: Wed Oct 30 12:00:35 2024 -0700 KVM: TDX: create/free TDX vcpu structure Implement vcpu related stubs for TDX for create, reset and free. For now, create only the features that do not require the TDX SEAMCALL. The TDX specific vcpu initialization will be handled by KVM_TDX_INIT_VCPU. Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe --- - Use lapic_in_kernel() (Nikolay Borisov) Signed-off-by: Paolo Bonzini commit 9934d7e529334d4671f96c1cab9fb1dec6ea219a Author: Isaku Yamahata Date: Wed Oct 30 12:00:34 2024 -0700 KVM: TDX: Don't offline the last cpu of one package when there's TDX guest Destroying TDX guest requires there's at least one cpu online for each package, because reclaiming the TDX KeyID of the guest (as part of the teardown process) requires to call some SEAMCALL (on any cpu) on all packages. Do not offline the last cpu of one package when there's any TDX guest running, otherwise KVM may not be able to teardown TDX guest resulting in leaking of TDX KeyID and other resources like TDX guest control structure pages. Implement the TDX version 'offline_cpu()' to prevent the cpu from going offline if it is the last cpu on the package. Co-developed-by: Kai Huang Signed-off-by: Kai Huang Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Signed-off-by: Paolo Bonzini commit ffb6fc84134ba60bac41b77b65747407fe6e69d9 Author: Isaku Yamahata Date: Wed Oct 30 12:00:33 2024 -0700 KVM: TDX: Make pmu_intel.c ignore guest TD case TDX KVM doesn't support PMU yet, it's future work of TDX KVM support as another patch series. For now, handle TDX by updating vcpu_to_lbr_desc() and vcpu_to_lbr_records() to return NULL. Signed-off-by: Isaku Yamahata Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rick Edgecombe --- - Add pragma poison for to_vmx() (Paolo) Signed-off-by: Paolo Bonzini commit 0186dd29a251866d9b69064006a5da36f7ae070e Author: Isaku Yamahata Date: Tue Jan 14 12:34:46 2025 -0500 KVM: TDX: add ioctl to initialize VM with TDX specific parameters After the crypto-protection key has been configured, TDX requires a VM-scope initialization as a step of creating the TDX guest. This "per-VM" TDX initialization does the global configurations/features that the TDX guest can support, such as guest's CPUIDs (emulated by the TDX module), the maximum number of vcpus etc. Because there is no room in KVM_CREATE_VM to pass all the required parameters, introduce a new ioctl KVM_TDX_INIT_VM and mark the VM as TD_STATE_UNINITIALIZED until it is invoked. This "per-VM" TDX initialization must be done before any "vcpu-scope" TDX initialization; KVM_TDX_INIT_VM IOCTL must be invoked before the creation of vCPUs. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Signed-off-by: Paolo Bonzini commit a656dac80078def3dd7784e2bd5e6edc1c36e11c Author: Paolo Bonzini Date: Wed Jan 22 06:31:31 2025 -0500 KVM: x86: expose cpuid_entry2_find for TDX CPUID values are provided for TDX virtual machines as part of the KVM_TDX_INIT_VM ioctl. Unlike KVM_SET_CPUID2, TDX will need to examine the leaves, either to validate against the CPUIDs listed in the TDX modules configuration or to fill other controls with matching values. Since there is an existing function to look up a leaf/index pair into a given list of CPUID entries, export it as kvm_find_cpuid_entry2(). Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini commit f94f4a97e66543bd51d86b4216cc5945041d11c3 Author: Isaku Yamahata Date: Wed Oct 30 12:00:31 2024 -0700 KVM: TDX: Support per-VM KVM_CAP_MAX_VCPUS extension check Change to report the KVM_CAP_MAX_VCPUS extension from globally to per-VM to allow userspace to be able to query maximum vCPUs for TDX guest via checking the KVM_CAP_MAX_VCPU extension on per-VM basis. Today KVM x86 reports KVM_MAX_VCPUS as guest's maximum vCPUs for all guests globally, and userspace, i.e. Qemu, queries the KVM_MAX_VCPUS extension globally but not on per-VM basis. TDX has its own limit of maximum vCPUs it can support for all TDX guests in addition to KVM_MAX_VCPUS. TDX module reports this limit via the MAX_VCPU_PER_TD global metadata. Different modules may report different values. In practice, the reported value reflects the maximum logical CPUs that ALL the platforms that the module supports can possibly have. Note some old modules may also not support this metadata, in which case the limit is U16_MAX. The current way to always report KVM_MAX_VCPUS in the KVM_CAP_MAX_VCPUS extension is not enough for TDX. To accommodate TDX, change to report the KVM_CAP_MAX_VCPUS extension on per-VM basis. Specifically, override kvm->max_vcpus in tdx_vm_init() for TDX guest, and report kvm->max_vcpus in the KVM_CAP_MAX_VCPUS extension check. Change to report "the number of logical CPUs the platform has" as the maximum vCPUs for TDX guest. Simply forwarding the MAX_VCPU_PER_TD reported by the TDX module would result in an unpredictable ABI because the reported value to userspace would be depending on whims of TDX modules. This works in practice because of the MAX_VCPU_PER_TD reported by the TDX module will never be smaller than the one reported to userspace. But to make sure KVM never reports an unsupported value, sanity check the MAX_VCPU_PER_TD reported by TDX module is not smaller than the number of logical CPUs the platform has, otherwise refuse to use TDX. Note, when creating a TDX guest, TDX actually requires the "maximum vCPUs for _this_ TDX guest" as an input to initialize the TDX guest. But TDX guest's maximum vCPUs is not part of TDREPORT thus not part of attestation, thus there's no need to allow userspace to explicitly _configure_ the maximum vCPUs on per-VM basis. KVM will simply use kvm->max_vcpus as input when initializing the TDX guest. Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Signed-off-by: Paolo Bonzini commit 8d032b683c299302aa8b5fbce17b9b87a138a5f5 Author: Isaku Yamahata Date: Tue Feb 25 12:45:13 2025 -0500 KVM: TDX: create/destroy VM structure Implement managing the TDX private KeyID to implement, create, destroy and free for a TDX guest. When creating at TDX guest, assign a TDX private KeyID for the TDX guest for memory encryption, and allocate pages for the guest. These are used for the Trust Domain Root (TDR) and Trust Domain Control Structure (TDCS). On destruction, free the allocated pages, and the KeyID. Before tearing down the private page tables, TDX requires the guest TD to be destroyed by reclaiming the KeyID. Do it in the vm_pre_destroy() kvm_x86_ops hook. The TDR control structures can be freed in the vm_destroy() hook, which runs last. Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Isaku Yamahata Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Co-developed-by: Yan Zhao Signed-off-by: Yan Zhao Co-developed-by: Rick Edgecombe Signed-off-by: Rick Edgecombe --- - Fix build issue in kvm-coco-queue - Init ret earlier to fix __tdx_td_init() error handling. (Chao) - Standardize -EAGAIN for __tdx_td_init() retry errors (Rick) Signed-off-by: Paolo Bonzini commit 61bb28279623b636bb368ca37dc6c93a414170a3 Author: Isaku Yamahata Date: Wed Oct 30 12:00:29 2024 -0700 KVM: TDX: Get system-wide info about TDX module on initialization TDX KVM needs system-wide information about the TDX module. Generate the data based on tdx_sysinfo td_conf CPUID data. Signed-off-by: Isaku Yamahata Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu --- - Clarify comment about EAX[23:16] in td_init_cpuid_entry2() (Xiaoyao) - Add comment for configurable CPUID bits (Xiaoyao) Signed-off-by: Paolo Bonzini commit b2aaf38ced6905b812109915e6a94ed1a9c5bb0e Author: Isaku Yamahata Date: Wed Oct 30 12:00:28 2024 -0700 KVM: TDX: Add place holder for TDX VM specific mem_enc_op ioctl KVM_MEMORY_ENCRYPT_OP was introduced for VM-scoped operations specific for guest state-protected VM. It defined subcommands for technology-specific operations under KVM_MEMORY_ENCRYPT_OP. Despite its name, the subcommands are not limited to memory encryption, but various technology-specific operations are defined. It's natural to repurpose KVM_MEMORY_ENCRYPT_OP for TDX specific operations and define subcommands. Add a place holder function for TDX specific VM-scoped ioctl as mem_enc_op. TDX specific sub-commands will be added to retrieve/pass TDX specific parameters. Make mem_enc_ioctl non-optional as it's always filled. Signed-off-by: Isaku Yamahata Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rick Edgecombe --- - Drop the misleading "defined for consistency" line. It's a copy-paste error introduced in the earlier patches. Earlier there was padding at the end to match struct kvm_sev_cmd size. (Tony) Signed-off-by: Paolo Bonzini commit e4aa6f6961f40249df9923acc4921c75036af3fc Author: Isaku Yamahata Date: Wed Oct 30 12:00:27 2024 -0700 KVM: TDX: Add helper functions to print TDX SEAMCALL error Add helper functions to print out errors from the TDX module in a uniform manner. Signed-off-by: Isaku Yamahata Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Signed-off-by: Paolo Bonzini commit 1001d9886f25a88c3b6a097bea98572c1f9b9380 Author: Sean Christopherson Date: Wed Oct 30 12:00:26 2024 -0700 KVM: TDX: Add TDX "architectural" error codes Add error codes for the TDX SEAMCALLs both for TDX VMM side for TDH SEAMCALL and TDX guest side for TDG.VP.VMCALL. KVM issues the TDX SEAMCALLs and checks its error code. KVM handles hypercall from the TDX guest and may return an error. So error code for the TDX guest is also needed. TDX SEAMCALL uses bits 31:0 to return more information, so these error codes will only exactly match RAX[63:32]. Error codes for TDG.VP.VMCALL is defined by TDX Guest-Host-Communication interface spec. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Reviewed-by: Paolo Bonzini Reviewed-by: Yuan Yao Reviewed-by: Xiaoyao Li Message-ID: <20241030190039.77971-14-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini commit fcae3a3e7ce4a4f12f689222d559872cf6ff3892 Author: Isaku Yamahata Date: Wed Oct 30 12:00:25 2024 -0700 KVM: TDX: Define TDX architectural definitions Define architectural definitions for KVM to issue the TDX SEAMCALLs. Structures and values that are architecturally defined in the TDX module specifications the chapter of ABI Reference. Co-developed-by: Tony Lindgren Signed-off-by: Tony Lindgren Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Reviewed-by: Paolo Bonzini Reviewed-by: Xiaoyao Li --- - Drop old duplicate defines, the x86 core exports what's needed (Kai) Signed-off-by: Paolo Bonzini commit 09b3d3c17f365f0a5e66d2d0fe0b25aa69cb5da7 Author: Isaku Yamahata Date: Wed Oct 30 12:00:24 2024 -0700 KVM: TDX: Add placeholders for TDX VM/vCPU structures Add TDX's own VM and vCPU structures as placeholder to manage and run TDX guests. Also add helper functions to check whether a VM/vCPU is TDX or normal VMX one, and add helpers to convert between TDX VM/vCPU and KVM VM/vCPU. TDX protects guest VMs from malicious host. Unlike VMX guests, TDX guests are crypto-protected. KVM cannot access TDX guests' memory and vCPU states directly. Instead, TDX requires KVM to use a set of TDX architecture-defined firmware APIs (a.k.a TDX module SEAMCALLs) to manage and run TDX guests. In fact, the way to manage and run TDX guests and normal VMX guests are quite different. Because of that, the current structures ('struct kvm_vmx' and 'struct vcpu_vmx') to manage VMX guests are not quite suitable for TDX guests. E.g., the majority of the members of 'struct vcpu_vmx' don't apply to TDX guests. Introduce TDX's own VM and vCPU structures ('struct kvm_tdx' and 'struct vcpu_tdx' respectively) for KVM to manage and run TDX guests. And instead of building TDX's VM and vCPU structures based on VMX's, build them directly based on 'struct kvm'. As a result, TDX and VMX guests will have different VM size and vCPU size/alignment. Currently, kvm_arch_alloc_vm() uses 'kvm_x86_ops::vm_size' to allocate enough space for the VM structure when creating guest. With TDX guests, ideally, KVM should allocate the VM structure based on the VM type so that the precise size can be allocated for VMX and TDX guests. But this requires more extensive code change. For now, simply choose the maximum size of 'struct kvm_tdx' and 'struct kvm_vmx' for VM structure allocation for both VMX and TDX guests. This would result in small memory waste for each VM which has smaller VM structure size but this is acceptable. For simplicity, use the same way for vCPU allocation too. Otherwise KVM would need to maintain a separate 'kvm_vcpu_cache' for each VM type. Note, updating the 'vt_x86_ops::vm_size' needs to be done before calling kvm_ops_update(), which copies vt_x86_ops to kvm_x86_ops. However this happens before TDX module initialization. Therefore theoretically it is possible that 'kvm_x86_ops::vm_size' is set to size of 'struct kvm_tdx' (when it's larger) but TDX actually fails to initialize at a later time. Again the worst case of this is wasting couple of bytes memory for each VM. KVM could choose to update 'kvm_x86_ops::vm_size' at a later time depending on TDX's status but that would require base KVM module to export either kvm_x86_ops or kvm_ops_update(). Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Signed-off-by: Paolo Bonzini --- - Make to_kvm_tdx() and to_tdx() private to tdx.c (Francesco, Tony) - Add pragma poison for to_vmx() (Paolo) Signed-off-by: Paolo Bonzini commit 45154fb010f7fdd99a67ce110f2abd646eaa209b Author: Kai Huang Date: Wed Oct 30 12:00:15 2024 -0700 KVM: TDX: Get TDX global information KVM will need to consult some essential TDX global information to create and run TDX guests. Get the global information after initializing TDX. Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Message-ID: <20241030190039.77971-3-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini commit fcdbdf63431c9faf639bffc957ea2ce9b545432e Author: Kai Huang Date: Fri Nov 15 22:52:41 2024 +1300 KVM: VMX: Initialize TDX during KVM module load Before KVM can use TDX to create and run TDX guests, TDX needs to be initialized from two perspectives: 1) TDX module must be initialized properly to a working state; 2) A per-cpu TDX initialization, a.k.a the TDH.SYS.LP.INIT SEAMCALL must be done on any logical cpu before it can run any other TDX SEAMCALLs. The TDX host core-kernel provides two functions to do the above two respectively: tdx_enable() and tdx_cpu_enable(). There are two options in terms of when to initialize TDX: initialize TDX at KVM module loading time, or when creating the first TDX guest. Choose to initialize TDX during KVM module loading time: Initializing TDX module is both memory and CPU time consuming: 1) the kernel needs to allocate a non-trivial size(~1/256) of system memory as metadata used by TDX module to track each TDX-usable memory page's status; 2) the TDX module needs to initialize this metadata, one entry for each TDX-usable memory page. Also, the kernel uses alloc_contig_pages() to allocate those metadata chunks, because they are large and need to be physically contiguous. alloc_contig_pages() can fail. If initializing TDX when creating the first TDX guest, then there's chance that KVM won't be able to run any TDX guests albeit KVM _declares_ to be able to support TDX. This isn't good for the user. On the other hand, initializing TDX at KVM module loading time can make sure KVM is providing a consistent view of whether KVM can support TDX to the user. Always only try to initialize TDX after VMX has been initialized. TDX is based on VMX, and if VMX fails to initialize then TDX is likely to be broken anyway. Also, in practice, supporting TDX will require part of VMX and common x86 infrastructure in working order, so TDX cannot be enabled alone w/o VMX support. There are two cases that can result in failure to initialize TDX: 1) TDX cannot be supported (e.g., because of TDX is not supported or enabled by hardware, or module is not loaded, or missing some dependency in KVM's configuration); 2) Any unexpected error during TDX bring-up. For the first case only mark TDX is disabled but still allow KVM module to be loaded. For the second case just fail to load the KVM module so that the user can be aware. Because TDX costs additional memory, don't enable TDX by default. Add a new module parameter 'enable_tdx' to allow the user to opt-in. Note, the name tdx_init() has already been taken by the early boot code. Use tdx_bringup() for initializing TDX (and tdx_cleanup() since KVM doesn't actually teardown TDX). They don't match vt_init()/vt_exit(), vmx_init()/vmx_exit() etc but it's not end of the world. Also, once initialized, the TDX module cannot be disabled and enabled again w/o the TDX module runtime update, which isn't supported by the kernel. After TDX is enabled, nothing needs to be done when KVM disables hardware virtualization, e.g., when offlining CPU, or during suspend/resume. TDX host core-kernel code internally tracks TDX status and can handle "multiple enabling" scenario. Similar to KVM_AMD_SEV, add a new KVM_INTEL_TDX Kconfig to guide KVM TDX code. Make it depend on INTEL_TDX_HOST but not replace INTEL_TDX_HOST because in the longer term there's a use case that requires making SEAMCALLs w/o KVM as mentioned by Dan [1]. Link: https://lore.kernel.org/6723fc2070a96_60c3294dc@dwillia2-mobl3.amr.corp.intel.com.notmuch/ [1] Signed-off-by: Kai Huang Message-ID: <162f9dee05c729203b9ad6688db1ca2960b4b502.1731664295.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit d6bee7813752b3dcf0a057315ab5cca0805bf905 Author: Kai Huang Date: Wed Jan 22 05:40:25 2025 -0500 KVM: VMX: Refactor VMX module init/exit functions Add vt_init() and vt_exit() as the new module init/exit functions and refactor existing vmx_init()/vmx_exit() as helper to make room for TDX specific initialization and teardown. To support TDX, KVM will need to enable TDX during KVM module loading time. Enabling TDX requires enabling hardware virtualization first so that all online CPUs (and the new CPU going online) are in post-VMXON state. Currently, the vmx_init() flow is: 1) hv_init_evmcs(), 2) kvm_x86_vendor_init(), 3) Other VMX specific initialization, 4) kvm_init() The kvm_x86_vendor_init() invokes kvm_x86_init_ops::hardware_setup() to do VMX specific hardware setup and calls kvm_update_ops() to initialize kvm_x86_ops to VMX's version. TDX will have its own version for most of kvm_x86_ops callbacks. It would be nice if kvm_x86_init_ops::hardware_setup() could also be used for TDX, but in practice it cannot. The reason is, as mentioned above, TDX initialization requires hardware virtualization having been enabled, which must happen after kvm_update_ops(), but hardware_setup() is done before that. Also, TDX is based on VMX, and it makes sense to only initialize TDX after VMX has been initialized. If VMX fails to initialize, TDX is likely broken anyway. So the new flow of KVM module init function will be: 1) Current VMX initialization code in vmx_init() before kvm_init(), 2) TDX initialization, 3) kvm_init() Split vmx_init() into two parts based on above 1) and 3) so that TDX initialization can fit in between. Make part 1) as the new helper vmx_init(). Introduce vt_init() as the new module init function which calls vmx_init() and kvm_init(). TDX initialization will be added later. Do the same thing for vmx_exit()/vt_exit(). Signed-off-by: Kai Huang Message-ID: <3f23f24098bdcf42e213798893ffff7cdc7103be.1731664295.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 62b1fa69f31969e11d03529d3a80599ddda2d043 Author: Kai Huang Date: Fri Nov 15 22:52:40 2024 +1300 KVM: Export hardware virtualization enabling/disabling functions To support TDX, KVM will need to enable TDX during KVM module loading time. Enabling TDX requires enabling hardware virtualization first so that all online CPUs (and the new CPU going online) are in post-VMXON state. KVM by default enables hardware virtualization but that is done in kvm_init(), which must be the last step after all initialization is done thus is too late for enabling TDX. Export functions to enable/disable hardware virtualization so that TDX code can use them to handle hardware virtualization enabling before kvm_init(). Signed-off-by: Kai Huang Message-ID: Signed-off-by: Paolo Bonzini commit aed4dde24c8e10e579ad40d04333a13140d011fc Author: Isaku Yamahata Date: Wed Oct 30 12:00:17 2024 -0700 x86/virt/tdx: Add tdx_guest_keyid_alloc/free() to alloc and free TDX guest KeyID Intel TDX protects guest VMs from malicious host and certain physical attacks. Pre-TDX Intel hardware has support for a memory encryption architecture called MK-TME, which repurposes several high bits of physical address as "KeyID". The BIOS reserves a sub-range of MK-TME KeyIDs as "TDX private KeyIDs". Each TDX guest must be assigned with a unique TDX KeyID when it is created. The kernel reserves the first TDX private KeyID for crypto-protection of specific TDX module data which has a lifecycle that exceeds the KeyID reserved for the TD's use. The rest of the KeyIDs are left for TDX guests to use. Create a small KeyID allocator. Export tdx_guest_keyid_alloc()/tdx_guest_keyid_free() to allocate and free TDX guest KeyID for KVM to use. Don't provide the stub functions when CONFIG_INTEL_TDX_HOST=n since they are not supposed to be called in this case. Signed-off-by: Isaku Yamahata Signed-off-by: Rick Edgecombe Message-ID: <20241030190039.77971-5-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 4caf32daf0b4f83681d63acc559635a2a8ddf71c Author: Kai Huang Date: Tue Dec 24 09:07:40 2024 -0500 x86/virt/tdx: Read essential global metadata for KVM KVM needs two classes of global metadata to create and run TDX guests: - "TD Control Structures" - "TD Configurability" The first class contains the sizes of TDX guest per-VM and per-vCPU control structures. KVM will need to use them to allocate enough space for those control structures. The second class contains info which reports things like which features are configurable to TDX guest etc. KVM will need to use them to properly configure TDX guests. Read them for KVM TDX to use. The code change is auto-generated by re-running the script in [1] after uncommenting the "td_conf" and "td_ctrl" part to regenerate the tdx_global_metadata.{hc} and update them to the existing ones in the kernel. #python tdx.py global_metadata.json tdx_global_metadata.h \ tdx_global_metadata.c The 'global_metadata.json' can be fetched from [2]. Note that as of this writing, the JSON file only allows a maximum of 32 CPUID entries. While this is enough for current contents of the CPUID leaves, there were plans to change the JSON per TDX module release which would change the ABI and potentially prevent future versions of the TDX module from working with older kernels. While discussions are ongoing with the TDX module team on what exactly constitutes an ABI breakage, in the meantime the TDX module team has agreed to not increase the number of CPUID entries beyond 128 without an opt in. Therefore the file was tweaked by hand to change the maximum number of CPUID_CONFIGs. Link: https://lore.kernel.org/kvm/0853b155ec9aac09c594caa60914ed6ea4dc0a71.camel@intel.com/ [1] Link: https://cdrdv2.intel.com/v1/dl/getContent/795381 [2] Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Message-ID: <20241030190039.77971-4-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 7ba2fd80ee43e34f5e5c449e5e26538c44bbf52e Author: Paolo Bonzini Date: Wed Jan 22 06:00:28 2025 -0500 x86/virt/tdx: allocate tdx_sys_info in static memory Adding all the information that KVM needs increases the size of struct tdx_sys_info, to the point that you can get warnings about the stack size of init_tdx_module(). Since KVM also needs to read the TDX metadata after init_tdx_module() returns, make the variable a global. Reviewed-by: Rick Edgecombe Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini commit e465cc63db1956f41370099c8ba0a62cf4f65990 Author: Rick Edgecombe Date: Mon Dec 2 17:03:16 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX flush operations Intel TDX protects guest VMs from malicious host and certain physical attacks. The TDX module has the concept of flushing vCPUs. These flushes include both a flush of the translation caches and also any other state internal to the TDX module. Before freeing a KeyID, this flush operation needs to be done. KVM will need to perform the flush on each pCPU associated with the TD, and also perform a TD scoped operation that checks if the flush has been done on all vCPU's associated with the TD. Add a tdh_vp_flush() function to be used to call TDH.VP.FLUSH on each pCPU associated with the TD during TD teardown. It will also be called when disabling TDX and during vCPU migration between pCPUs. Add tdh_mng_vpflushdone() to be used by KVM to call TDH.MNG.VPFLUSHDONE. KVM will use this during TD teardown to verify that TDH.VP.FLUSH has been called sufficiently, and advance the state machine that will allow for reclaiming the TD's KeyID. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Message-ID: <20241203010317.827803-7-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 5e5151c5562afa28555b45e70f4386d62f62e640 Author: Rick Edgecombe Date: Mon Dec 2 17:03:15 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX VM/vCPU field access Intel TDX protects guest VMs from malicious host and certain physical attacks. The TDX module has TD scoped and vCPU scoped "metadata fields". These fields are a bit like VMCS fields, and stored in data structures maintained by the TDX module. Export 3 SEAMCALLs for use in reading and writing these fields: Make tdh_mng_rd() use MNG.VP.RD to read the TD scoped metadata. Make tdh_vp_rd()/tdh_vp_wr() use TDH.VP.RD/WR to read/write the vCPU scoped metadata. KVM will use these by creating inline helpers that target various metadata sizes. Export the raw SEAMCALL leaf, to avoid exporting the large number of various sized helpers. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Acked-by: Dave Hansen Message-ID: <20241203010317.827803-6-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 541b3e9e0d907b5d94e5d6e4a2e57962a7d1d134 Author: Rick Edgecombe Date: Mon Dec 2 17:03:14 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX page cache management Intel TDX protects guest VMs from malicious host and certain physical attacks. The TDX module uses pages provided by the host for both control structures and for TD guest pages. These pages are encrypted using the MK-TME encryption engine, with its special requirements around cache invalidation. For its own security, the TDX module ensures pages are flushed properly and track which usage they are currently assigned. For creating and tearing down TD VMs and vCPUs KVM will need to use the TDH.PHYMEM.PAGE.RECLAIM, TDH.PHYMEM.CACHE.WB, and TDH.PHYMEM.PAGE.WBINVD SEAMCALLs. Add tdh_phymem_page_reclaim() to enable KVM to call TDH.PHYMEM.PAGE.RECLAIM to reclaim the page for use by the host kernel. This effectively resets its state in the TDX module's page tracking (PAMT), if the page is available to be reclaimed. This will be used by KVM to reclaim the various types of pages owned by the TDX module. It will have a small wrapper in KVM that retries in the case of a relevant error code. Don't implement this wrapper in arch/x86 because KVM's solution around retrying SEAMCALLs will be better located in a single place. Add tdh_phymem_cache_wb() to enable KVM to call TDH.PHYMEM.CACHE.WB to do a cache write back in a way that the TDX module can verify, before it allows a KeyID to be freed. The KVM code will use this to have a small wrapper that handles retries. Since the TDH.PHYMEM.CACHE.WB operation is interruptible, have tdh_phymem_cache_wb() take a resume argument to pass this info to the TDX module for restarts. It is worth noting that this SEAMCALL uses a SEAM specific MSR to do the write back in sections. In this way it does export some new functionality that affects CPU state. Add tdh_phymem_page_wbinvd_tdr() to enable KVM to call TDH.PHYMEM.PAGE.WBINVD to do a cache write back and invalidate of a TDR, using the global KeyID. The underlying TDH.PHYMEM.PAGE.WBINVD SEAMCALL requires the related KeyID to be encoded into the SEAMCALL args. Since the global KeyID is not exposed to KVM, a dedicated wrapper is needed for TDR focused TDH.PHYMEM.PAGE.WBINVD operations. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Message-ID: <20241203010317.827803-5-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 0d65dff2b9057107cd002864a27de6c2b49a5755 Author: Rick Edgecombe Date: Mon Dec 2 17:03:13 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX vCPU creation Intel TDX protects guest VMs from malicious host and certain physical attacks. It defines various control structures that hold state for virtualized components of the TD (i.e. VMs or vCPUs) These control structures are stored in pages given to the TDX module and encrypted with either the global KeyID or the guest KeyIDs. To manipulate these control structures the TDX module defines a few SEAMCALLs. KVM will use these during the process of creating a vCPU as follows: 1) Call TDH.VP.CREATE to create a TD vCPU Root (TDVPR) page for each vCPU. 2) Call TDH.VP.ADDCX to add per-vCPU control pages (TDCX) for each vCPU. 3) Call TDH.VP.INIT to initialize the TDCX for each vCPU. To reclaim these pages for use by the kernel other SEAMCALLs are needed, which will be added in future patches. Export functions to allow KVM to make these SEAMCALLs. Export two variants for TDH.VP.CREATE, in order to support the planned logic of KVM to support TDX modules with and without the ENUM_TOPOLOGY feature. If KVM can drop support for the !ENUM_TOPOLOGY case, this could go down a single version. Leave that for later discussion. The TDX module provides SEAMCALLs to hand pages to the TDX module for storing TDX controlled state. SEAMCALLs that operate on this state are directed to the appropriate TD vCPU using references to the pages originally provided for managing the vCPU's state. So the host kernel needs to track these pages, both as an ID for specifying which vCPU to operate on, and to allow them to be eventually reclaimed. The vCPU associated pages are called TDVPR (Trust Domain Virtual Processor Root) and TDCX (Trust Domain Control Extension). Introduce "struct tdx_vp" for holding references to pages provided to the TDX module for the TD vCPU associated state. Don't plan for any vCPU associated state that is controlled by KVM to live in this struct. Only expect it to hold data for concepts specific to the TDX architecture, for which there can't already be preexisting storage for in KVM. Add both the TDVPR page and an array of TDCX pages, even though the SEAMCALL wrappers will only need to know about the TDVPR pages for directing the SEAMCALLs to the right vCPU. Adding the TDCX pages to this struct will let all of the vCPU associated pages handed to the TDX module be tracked in one location. For a type to specify physical pages, use KVM's hpa_t type. Do this for KVM's benefit This is the common type used to hold physical addresses in KVM, so will make interoperability easier. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Message-ID: <20241203010317.827803-4-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit b8a4e7de84a2587a250e130a85e4b049dff06448 Author: Rick Edgecombe Date: Mon Dec 2 17:03:12 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX TD creation Intel TDX protects guest VMs from malicious hosts and certain physical attacks. It defines various control structures that hold state for things like TDs or vCPUs. These control structures are stored in pages given to the TDX module and encrypted with either the global KeyID or the guest KeyIDs. To manipulate these control structures the TDX module defines a few SEAMCALLs. KVM will use these during the process of creating a TD as follows: 1) Allocate a unique TDX KeyID for a new guest. 1) Call TDH.MNG.CREATE to create a "TD Root" (TDR) page, together with the new allocated KeyID. Unlike the rest of the TDX guest, the TDR page is crypto-protected by the 'global KeyID'. 2) Call the previously added TDH.MNG.KEY.CONFIG on each package to configure the KeyID for the guest. After this step, the KeyID to protect the guest is ready and the rest of the guest will be protected by this KeyID. 3) Call TDH.MNG.ADDCX to add TD Control Structure (TDCS) pages. 4) Call TDH.MNG.INIT to initialize the TDCS. To reclaim these pages for use by the kernel other SEAMCALLs are needed, which will be added in future patches. Add tdh_mng_addcx(), tdh_mng_create() and tdh_mng_init() to export these SEAMCALLs so that KVM can use them to create TDs. For SEAMCALLs that give a page to the TDX module to be encrypted, CLFLUSH the page mapped with KeyID 0, such that any dirty cache lines don't write back later and clobber TD memory or control structures. Don't worry about the other MK-TME KeyIDs because the kernel doesn't use them. The TDX docs specify that this flush is not needed unless the TDX module exposes the CLFLUSH_BEFORE_ALLOC feature bit. Be conservative and always flush. Add a helper function to facilitate this. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Message-ID: <20241203010317.827803-3-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit d19a42d69692f4f1ef6dd0984caf280edd4a403a Author: Rick Edgecombe Date: Mon Dec 2 17:03:11 2024 -0800 x86/virt/tdx: Add SEAMCALL wrappers for TDX KeyID management Intel TDX protects guest VMs from malicious host and certain physical attacks. Pre-TDX Intel hardware has support for a memory encryption architecture called MK-TME, which repurposes several high bits of physical address as "KeyID". TDX ends up with reserving a sub-range of MK-TME KeyIDs as "TDX private KeyIDs". Like MK-TME, these KeyIDs can be associated with an ephemeral key. For TDX this association is done by the TDX module. It also has its own tracking for which KeyIDs are in use. To do this ephemeral key setup and manipulate the TDX module's internal tracking, KVM will use the following SEAMCALLs: TDH.MNG.KEY.CONFIG: Mark the KeyID as in use, and initialize its ephemeral key. TDH.MNG.KEY.FREEID: Mark the KeyID as not in use. These SEAMCALLs both operate on TDR structures, which are setup using the previously added TDH.MNG.CREATE SEAMCALL. KVM's use of these operations will go like: - tdx_guest_keyid_alloc() - Initialize TD and TDR page with TDH.MNG.CREATE (not yet-added), passing KeyID - TDH.MNG.KEY.CONFIG to initialize the key - TD runs, teardown is started - TDH.MNG.KEY.FREEID - tdx_guest_keyid_free() Don't try to combine the tdx_guest_keyid_alloc() and TDH.MNG.KEY.CONFIG operations because TDH.MNG.CREATE and some locking need to be done in the middle. Don't combine TDH.MNG.KEY.FREEID and tdx_guest_keyid_free() so they are symmetrical with the creation path. So implement tdh_mng_key_config() and tdh_mng_key_freeid() as separate functions than tdx_guest_keyid_alloc() and tdx_guest_keyid_free(). The TDX module provides SEAMCALLs to hand pages to the TDX module for storing TDX controlled state. SEAMCALLs that operate on this state are directed to the appropriate TD VM using references to the pages originally provided for managing the TD's state. So the host kernel needs to track these pages, both as an ID for specifying which TD to operate on, and to allow them to be eventually reclaimed. The TD VM associated pages are called TDR (Trust Domain Root) and TDCS (Trust Domain Control Structure). Introduce "struct tdx_td" for holding references to pages provided to the TDX module for this TD VM associated state. Don't plan for any TD associated state that is controlled by KVM to live in this struct. Only expect it to hold data for concepts specific to the TDX architecture, for which there can't already be preexisting storage for in KVM. Add both the TDR page and an array of TDCS pages, even though the SEAMCALL wrappers will only need to know about the TDR pages for directing the SEAMCALLs to the right TD. Adding the TDCS pages to this struct will let all of the TD VM associated pages handed to the TDX module be tracked in one location. For a type to specify physical pages, use KVM's hpa_t type. Do this for KVM's benefit This is the common type used to hold physical addresses in KVM, so will make interoperability easier. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata Signed-off-by: Kai Huang Signed-off-by: Rick Edgecombe Reviewed-by: Binbin Wu Reviewed-by: Yuan Yao Message-ID: <20241203010317.827803-2-rick.p.edgecombe@intel.com> Acked-by: Dave Hansen Signed-off-by: Paolo Bonzini commit 28f79ac609de2797cccdd5fa6c4d5ec8bcef92b4 Author: Raag Jadav Date: Wed Mar 12 14:29:09 2025 +0530 drm/xe/hwmon: expose fan speed Add hwmon support for fan1_input, fan2_input and fan3_input attributes, which will expose fan speed of respective channels in RPM when supported by hardware. With this in place we can monitor fan speed using lm-sensors tool. v2: Rely on platform checks instead of mailbox error (Aravind, Rodrigo) v3: Introduce has_fan_control flag (Rodrigo) Signed-off-by: Raag Jadav Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20250312085909.755073-1-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi commit 83a0237859bc5a9e0a716e1db8e7fd3cafd63259 Author: Chen Ni Date: Wed Mar 12 15:34:04 2025 +0800 accel/qaic: Remove redundant 'flush_workqueue()' calls 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Chen Ni Reviewed-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20250312073404.1429992-1-nichen@iscas.ac.cn commit b49e37de8e70bc433b526a9f4382f72b7ac6492e Author: Stephan Gerhold Date: Tue Dec 3 18:44:03 2024 +0100 arm64: dts: qcom: x1e80100-crd: Drop duplicate DMIC supplies The WCD938x codec provides two controls for each of the MIC_BIASn outputs: - "MIC BIASn" enables an internal regulator to generate the output with a configurable voltage (qcom,micbiasN-microvolt). - "VA MIC BIASn" enables "pull-up mode" that bypasses the internal regulator and directly outputs fixed 1.8V from the VDD_PX pin. This is intended for low-power VA (voice activation) use cases. The audio-routing setup for the X1E80100 CRD currently specifies both as power supplies for the DMICs, but only one of them can be active at the same time. In practice, only the internal regulator is used with the current setup because the driver prefers it over pull-up mode. Make this more clear by dropping the redundant routes to the pull-up "VA MIC BIASn" supply. There is no functional difference except that we skip briefly switching to pull-up mode when shutting down the microphone. Fixes: 4442a67eedc1 ("arm64: dts: qcom: x1e80100-crd: add sound card") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20241203-x1e80100-va-mic-bias-v1-2-0dfd4d9b492c@linaro.org Signed-off-by: Bjorn Andersson commit a2e617f4e6981aa514a569e927f90b0d39bb31b2 Author: Stephan Gerhold Date: Tue Dec 3 18:44:02 2024 +0100 arm64: dts: qcom: sc8280xp-x13s: Drop duplicate DMIC supplies The WCD938x codec provides two controls for each of the MIC_BIASn outputs: - "MIC BIASn" enables an internal regulator to generate the output with a configurable voltage (qcom,micbiasN-microvolt). - "VA MIC BIASn" enables "pull-up mode" that bypasses the internal regulator and directly outputs fixed 1.8V from the VDD_PX pin. This is intended for low-power VA (voice activation) use cases. The audio-routing setup for the ThinkPad X13s currently specifies both as power supplies for the DMICs, but only one of them can be active at the same time. In practice, only the internal regulator is used with the current setup because the driver prefers it over pull-up mode. Make this more clear by dropping the redundant routes to the pull-up "VA MIC BIASn" supply. There is no functional difference except that we skip briefly switching to pull-up mode when shutting down the microphone. Fixes: 2e498f35c385 ("arm64: dts: qcom: sc8280xp-x13s: fix va dmic dai links and routing") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20241203-x1e80100-va-mic-bias-v1-1-0dfd4d9b492c@linaro.org Signed-off-by: Bjorn Andersson commit ace6b365cf2a49a3600271186455b1b281babe5c Author: Abel Vesa Date: Fri Mar 14 16:03:25 2025 +0200 arm64: dts: qcom: x1e78100-t14s: Add OLED variant Since the Lenovo Thinkpad T14s Gen6 is available with an OLED, add dedicated a dedicated dts for it. This is needed because the backlight is handled differently for OLED panels when compared to LCD ones. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250314140325.4143779-4-abel.vesa@linaro.org Signed-off-by: Bjorn Andersson commit 31eff589d00b1b41376800ff1322dc88d81f6ee1 Author: Abel Vesa Date: Fri Mar 14 16:03:24 2025 +0200 arm64: dts: qcom: x1e78100-t14s: Add LCD variant with backlight support Due to the fact that Lenovo Thinkpad T14s Gen6 is available with both OLED and LCD, the backlight control differs HW-wise. For the LCD variant, the panel's backlight is controlled via one of the PWMs provided by the PMK8550 PMIC. For the OLED variant, the backlight is internal to the panel and therefore it is not described in devicetree. For this reason, create a generic dtsi for the T14s by renaming the existing dts. While at it, add a node name to panel and drop the enable gpio and pinctrl properties from the panel node. Then add the LCD variant dts file with the old name and describe all backlight related nodes. So the existing dts will now be used for LCD variant while for OLED new dts will be added. Tested-by: Sebastian Reichel Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250314140325.4143779-3-abel.vesa@linaro.org Signed-off-by: Bjorn Andersson commit 26cc0304d1352a4b1db7d2807cd276ab31e4da05 Author: Abel Vesa Date: Fri Mar 14 16:03:23 2025 +0200 dt-bindings: arm: qcom: Document Lenovo ThinkPad T14s Gen 6 LCD and OLED Due to the difference in how the panel backlight is being handled between the OLED variant and LCD one, it is required to have two separate DTBs. So document the compatible string for both the OLED and LCD variants. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250314140325.4143779-2-abel.vesa@linaro.org Signed-off-by: Bjorn Andersson commit 6c6d55f41c1b54b16d35f16c02fe99cc0ad019e0 Author: Luca Weiss Date: Wed Mar 12 12:14:59 2025 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Add touchscreen node Add a node for the GT9897 touchscreen found on this smartphone connected via SPI. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250312-fp5-touchscreen-v2-1-4bed270e0065@fairphone.com Signed-off-by: Bjorn Andersson commit 515551e65635b988f2afa9e8683a6b57d6cfba36 Author: Jyothi Kumar Seerapu Date: Wed Mar 12 16:13:58 2025 +0530 arm64: dts: qcom: sm8750: Correct clocks property for uart14 node Correct the clocks property for the uart14 node to fix UART functionality on QUP2_SE6. The current failure is due to an incorrect clocks assignment. Change the clocks property to GCC_QUPV3_WRAP2_S6_CLK to resolve the issue. Signed-off-by: Jyothi Kumar Seerapu Reviewed-by: Konrad Dybcio Fixes: 068c3d3c83be ("arm64: dts: qcom: Add base SM8750 dtsi") Link: https://lore.kernel.org/r/20250312104358.2558-1-quic_jseerapu@quicinc.com Signed-off-by: Bjorn Andersson commit 7a54680f192f3fc0a6bac8bf6f91ce7bd63b8907 Author: Krishna Kurapati Date: Wed Mar 12 15:35:44 2025 +0530 arm64: dts: qcom: qcs6490-rb3gen2: Add orientation gpio Specify orientation GPIO to the PMIC GLINK node. Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/20250312100544.1510190-1-krishna.kurapati@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 4001b1bffd21d5cdbdc84d6b97213e68fed9c785 Author: Manikanta Mylavarapu Date: Wed Mar 12 15:19:48 2025 +0530 arm64: dts: qcom: ipq5424: add reserved memory region for bootloader In IPQ5424, the bootloader collects the system RAM contents upon a crash for post-morterm analysis. If we don't reserve the memory region used by the bootloader, linux will consume it. Upon the next boot after a crash, the bootloader will be loaded in the same region, which could lead to the loss of some data. sometimes, we may miss out critical information. Therefore, let's reserve the region used by the bootloader. Signed-off-by: Manikanta Mylavarapu Reviewed-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250312094948.3376126-1-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 28ef67df3658365b0a8ae6b54c800e70b0216778 Author: Pratyush Brahma Date: Mon Mar 10 16:48:35 2025 +0530 arm64: dts: qcom: qcs8300: Add device node for gfx_smmu Add the device node for gfx smmu that is required for gpu specific address translations. Signed-off-by: Pratyush Brahma Link: https://lore.kernel.org/r/20250310-b4-branch-gfx-smmu-v6-2-15c60b8abd99@quicinc.com Signed-off-by: Bjorn Andersson commit 64f8541e7a2c5e91498f297bce89a88ab9a34fd3 Author: Manish Nagar Date: Mon Mar 10 16:17:43 2025 +0530 arm64: dts: qcom: qcs8300-ride: Enable second USB controller on QCS8300 Ride Enable secondary USB controller on QCS8300 Ride platform. Since it is a Type-A port, the dr_mode has been set to "host". The VBUS to connected peripherals is provided by TPS2559QWDRCTQ1 regulator connected to the port. The regulator has an enable pin controlled by PMM8650. Model it as fixed regulator and keep it Always-On at boot, since the regulator is GPIO controlled regulator. Co-developed-by: Krishna Kurapati Signed-off-by: Krishna Kurapati Signed-off-by: Manish Nagar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250310104743.976265-1-quic_mnagar@quicinc.com Signed-off-by: Bjorn Andersson commit 28f997b89967afdc0855d8aa7538b251fb44f654 Author: Xilin Wu Date: Sat Mar 8 18:27:51 2025 +0800 arm64: dts: qcom: sm8250: Fix CPU7 opp table There is a typo in cpu7_opp9. Fix it to get rid of the following errors. [ 0.198043] cpu cpu7: Voltage update failed freq=1747200 [ 0.198052] cpu cpu7: failed to update OPP for freq=1747200 Fixes: 8e0e8016cb79 ("arm64: dts: qcom: sm8250: Add CPU opp tables") Signed-off-by: Xilin Wu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250308-fix-sm8250-cpufreq-v1-1-8a0226721399@gmail.com Signed-off-by: Bjorn Andersson commit ee95bcc58890e63f52fdb9ab096c3d7b9cb889cc Author: Johan Hovold Date: Fri Mar 7 18:12:22 2025 +0100 arm64: dts: qcom: x1e80100-crd: add gpio-keys label for lid switch Add a gpio-keys label for the lid-switch for consistency and to separate it from the volume-up key (e.g. in /proc/interrupts). Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250307171222.7470-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 9eca3fd5c336afc3b90804ec008f54ce59320aee Author: Johan Hovold Date: Fri Mar 7 18:12:21 2025 +0100 arm64: dts: qcom: x1e80100-crd: add support for volume-up key Add support for the keypad volume-up key on the debug extension board. This is useful to have when testing PMIC interrupt handling, and the key can also be used to wake up from deep suspend states (CX shutdown). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250307171222.7470-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 8cd4b0f6bc71b2bf4f5c3fb8ec2857192182cb23 Author: Konrad Dybcio Date: Thu Mar 6 19:11:23 2025 +0100 arm64: dts: qcom: x1e001de-devkit: Drop clock-names from PS8830 The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio Fixes: 019e1ee32fec ("arm64: dts: qcom: x1e001de-devkit: Enable external DP support") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-11-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 57aac7bd091cd7a1f43c852ce3703ce6c2433b21 Author: Konrad Dybcio Date: Thu Mar 6 19:11:22 2025 +0100 arm64: dts: qcom: x1e80100-romulus: Drop clock-names from PS8830 The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio Fixes: b16ee3d0cda4 ("arm64: dts: qcom: x1e80100-romulus: Set up PS8830s") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-10-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 6d617082867d4789ea4dcc67fc483460e2ac1d05 Author: Konrad Dybcio Date: Thu Mar 6 19:11:21 2025 +0100 arm64: dts: qcom: x1e80100-dell-xps13-9345: Drop clock-names from PS8830 The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio Fixes: bd2dbbb1f35a ("arm64: dts: qcom: x1e80100-dell-xps13-9345: Introduce retimer support") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-9-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 9ea77c65b7b0357c54899a24ffd37d0430c90913 Author: Konrad Dybcio Date: Thu Mar 6 19:11:20 2025 +0100 arm64: dts: qcom: sc8180x: Rename AOSS_QMP to power-management The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c310000: '#power-domain-cells' is a required property Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-8-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit bc09537f4745aae561f56daad0353d1b876bc096 Author: Konrad Dybcio Date: Thu Mar 6 19:11:19 2025 +0100 arm64: dts: qcom: qcs615: Rename AOSS_QMP to power-management The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c300000: '#power-domain-cells' is a required property Fixes: 0775021783b5 ("arm64: dts: qcom: qcs615: add AOSS_QMP node") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-7-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit a3715ce8650928e2da7060957a7e9b962d8bb7be Author: Konrad Dybcio Date: Thu Mar 6 19:11:18 2025 +0100 arm64: dts: qcom: sdx75: Rename AOSS_QMP to power-management The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c310000: '#power-domain-cells' is a required property Fixes: 91f767eb6938 ("arm64: dts: qcom: sdx75: Add AOSS node") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-6-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 6810ecd57eb4ba9e09bac851d5b9d56c5e5acc1a Author: Konrad Dybcio Date: Thu Mar 6 19:11:17 2025 +0100 arm64: dts: qcom: sdx75: Fix up the USB interrupt description Commit 53c6d854be4e ("dt-bindings: usb: dwc3: Clean up hs_phy_irq in binding") reworked the dt-bindings to accurately represent the hardware. Execute the second half of the cleanup by wiring up the missing pwr_event IRQ and adjusting the entry order. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250306-topic-dt_bindings_fixups-v1-5-0c84aceb0ef9@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 8140d10568a806864c915613ac03afb98ccd349c Author: Md Sadre Alam Date: Thu Mar 6 17:03:57 2025 +0530 arm64: dts: qcom: ipq9574: Remove eMMC node Remove eMMC node for rdp433, since rdp433 default boot mode is norplusnand Reviewed-by: Konrad Dybcio Signed-off-by: Md Sadre Alam Link: https://lore.kernel.org/r/20250306113357.126602-4-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson commit 2f24e13c8f090344482fbff4911240eb3c1d9092 Author: Md Sadre Alam Date: Thu Mar 6 17:03:56 2025 +0530 arm64: dts: qcom: ipq9574: Enable SPI NAND for ipq9574 Enable SPI NAND support for ipq9574 SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Md Sadre Alam Link: https://lore.kernel.org/r/20250306113357.126602-3-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson commit 2eabf101f62a158fb66c2ff4a80ccd1581606568 Author: Md Sadre Alam Date: Thu Mar 6 17:03:55 2025 +0530 arm64: dts: qcom: ipq9574: Add SPI nand support Add SPI NAND support for ipq9574 SoC. Signed-off-by: Md Sadre Alam Link: https://lore.kernel.org/r/20250306113357.126602-2-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson commit 73782fc64793f6e6e0118797d3b9044436f2e8e9 Author: Mikolaj Wasiak Date: Tue Mar 11 10:33:14 2025 +0100 i915/gt/selftests: Disable lrc_timestamp test This test was designed to isolate a bug in tigerlake and dg2 hardware. The bug was found and fixed in newer generations. Since we won't support any new hardware with this driver, the test should now be turned off in the CI to not pollute it with random failures on previous hardware. For reference, the issue has been discssued here[*]. [*] https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13697 Signed-off-by: Mikolaj Wasiak Reviewed-by: Chris Wilson Reviewed-by: Krzysztof Karas Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/uxxb22n667zb3aic6zs4mr2krv5zavav5v2zjgqnhnabgxgzif@4icszicjakex commit 34b1c1c71d375835d589e0929299b8caf0171cf1 Author: Mikolaj Wasiak Date: Tue Mar 4 09:43:26 2025 +0100 i915/selftest/igt_mmap: let mmap tests run in kthread When the driver is loaded on the system with numa nodes it might be run in a kthread, which makes it impossible to use current->mm in the selftest. This patch allows the selftest to use current->mm by using active_mm. Signed-off-by: Mikolaj Wasiak Reviewed-by: Eugene Kobyak Reviewed-by: Krzysztof Niemiec Reviewed-by: Krzysztof Karas Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/2w6pt2hnemndwmanwhyn3keexa6vtha7rmo6rqoerkmyxhbrh2@ls7lndjpia6z commit c8619f5402cbcccfe58151b53421029852473e4c Author: Alyssa Rosenzweig Date: Mon Mar 10 15:28:02 2025 -0400 drm: add modifiers for Apple GPU layouts Apple GPUs support non-linear "GPU-tiled" image layouts. Add modifiers for these layouts. Mesa requires these modifiers to share non-linear buffers across processes, but no other userspace or kernel support is required/expected. These layouts are notably not used for interchange across hardware blocks (e.g. with the display controller). There are other layouts for that but we don't support them either in userspace or kernelspace yet (even downstream), so we don't add modifiers here. Acked-by: Faith Ekstrand Reviewed-by: Sven Peter Link: https://patchwork.freedesktop.org/patch/msgid/20250310-apple-twiddled-modifiers-v4-1-1ccac9544808@rosenzweig.io Signed-off-by: Alyssa Rosenzweig commit ff568d622b0a587e15925b681152bef3e11b5f3f Author: Ankit Nautiyal Date: Wed Mar 12 11:14:24 2025 +0530 drm/i915/display: Maintain asciibetical order for HAS_* macros Move HAS_* macros to maintain asciibetical order. Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250312054424.1628358-1-ankit.k.nautiyal@intel.com commit 9df13c356d0886d174e977406570f75f4012f27b Author: Philipp Stanner Date: Thu Mar 13 10:30:54 2025 +0100 drm/sched: Clarify docu concerning drm_sched_job_arm() The documentation for drm_sched_job_arm() and especially drm_sched_job_cleanup() does not make it very clear why drm_sched_job_arm() is a point of no return, which it indeed is. Make the nature of drm_sched_job_arm() in the docu as clear as possible. Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250313093053.65001-2-phasta@kernel.org commit 6df22c6f1823cc1e3ae973a43b88c6d153df35e0 Author: Maxime Ripard Date: Wed Mar 12 14:39:17 2025 +0100 drm/display: hdmi: Mention Infoframes testing with edid-decode edid-decode gained recently support to check that infoframes are compliant and match the EDID the monitor exposes. Since the HDMI helpers provide those infoframes in debugfs, it makes it easy to check from userspace that the drivers (and helpers) behave properly. Let's document it. Cc: Hans Verkuil Reviewed-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20250312-drm-hdmi-state-docs-v2-2-6352a5d68d5b@kernel.org Signed-off-by: Maxime Ripard commit b5c68869d2f42f864773778b74cccb316d8359fe Author: Maxime Ripard Date: Wed Mar 12 14:39:16 2025 +0100 drm/display: hdmi: Create documentation section We have had documentation for the public functions in the HDMI helpers, but those were never referenced anywhere and thus not compiled as part of the doc. Let's add a section. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250312-drm-hdmi-state-docs-v2-1-6352a5d68d5b@kernel.org Signed-off-by: Maxime Ripard commit 878516a9e62cd220379e511d43dcf58df3a6ca9f Author: Qasim Ijaz Date: Thu Mar 13 16:14:24 2025 +0000 drm/ttm/tests: fix incorrect assert in ttm_bo_unreserve_bulk() In the ttm_bo_unreserve_bulk() test function, resv is allocated using kunit_kzalloc(), but the subsequent assertion mistakenly verifies the ttm_dev pointer instead of the resv pointer. Fix the assertion to properly verify the resv pointer. Signed-off-by: Qasim Ijaz Link: https://patchwork.freedesktop.org/patch/msgid/20250313161424.10688-1-qasdev00@gmail.com Reviewed-by: Christian König Signed-off-by: Christian König commit 9b1a6c925c88ed9331a2cae64fb3580e05345ded Author: Gabriel Gonzales Date: Tue Mar 11 08:33:48 2025 +0800 arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo Add support for the Xiaomi Redmi Note 8 based on the SM6125 SoC. Defined features: - dmesg output to bootloader preconfigured display - USB - eMMC - SD card - SMD RPM regulators - Volume Up, Down and Power buttons Signed-off-by: Gabriel Gonzales Link: https://lore.kernel.org/r/20250311003353.8250-3-semfault@disroot.org Signed-off-by: Bjorn Andersson commit 4ca8d6f898a85070934490071e429e97bc4e219b Author: Gabriel Gonzales Date: Tue Mar 11 08:33:47 2025 +0800 dt-bindings: arm: qcom: Add Xiaomi Redmi Note 8 Document the Xiaomi Redmi Note 8 (codenamed ginkgo), which is based off the SM6125 SoC. Signed-off-by: Gabriel Gonzales Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250311003353.8250-2-semfault@disroot.org Signed-off-by: Bjorn Andersson commit 37bd695c16b1b443e357eb37c09ef30b401f8b83 Author: Vikash Garodia Date: Mon Mar 3 18:07:01 2025 +0530 arm64: dts: qcom: sc7280: drop video decoder and encoder nodes Decoder and encoder nodes are already deprecated from bindings. Update the venus node to align with bindings. The nodes were deprecated with commit 459997e8990d9 ("media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable") and is part of v6.14-rc1 and onwards. Signed-off-by: Vikash Garodia Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20250303-b4-media-v2-1-893651a4b1c7@quicinc.com Signed-off-by: Bjorn Andersson commit 05ed68070d7a061f62f502d07f883c05dc666990 Author: Jie Gan Date: Mon Mar 3 11:29:31 2025 +0800 arm64: dts: qcom: sa8775p: Add CTCU and ETR nodes Add CTCU and ETR nodes in DT to enable related functionalities. Reviewed-by: Konrad Dybcio Signed-off-by: Jie Gan Acked-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20250303032931.2500935-11-quic_jiegan@quicinc.com Signed-off-by: Bjorn Andersson commit e03ed4ee41c054dcfc3fe8d045e016cc0aa3a22a Author: Alexey Klimov Date: Fri Feb 28 16:23:08 2025 +0000 arm64: dts: qcom: qrb5165-rb5: add compressed playback support Audio DSP supports compressed playback on this SoC. It is required to add compressed DAI and separate MultimeMedia DAI link to enable this. Fcplay or cplay tools from tinycompress can playback, say, mp3 files: fcplay -c 0 -d 3 test.mp3 Cc: Srinivas Kandagatla Signed-off-by: Alexey Klimov Link: https://lore.kernel.org/r/20250228162308.388818-1-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson commit 2c06e0797c32997a2ea9d1458bcdbb97c7090406 Author: Neil Armstrong Date: Fri Feb 28 09:40:26 2025 +0100 arm64: dts: qcom: sm8650: add PPI interrupt partitions for the ARM PMUs The PMUs shares the same per-cpu (PPI) interrupt, so declare the proper interrupt partition maps and use the 4th interrupt cell to pass the partition phandle for each ARM PMU node. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250228-topic-sm8650-pmu-ppi-partition-v4-2-78cffd35c73d@linaro.org Signed-off-by: Bjorn Andersson commit 9ce52e908bd5c0a93a3f17ef28d19209873b573f Author: Neil Armstrong Date: Fri Feb 28 09:40:25 2025 +0100 arm64: dts: qcom: sm8650: switch to interrupt-cells 4 to add PPI partitions The ARM PMUs shares the same per-cpu (PPI) interrupt, so we need to switch to interrupt-cells = <4> in the GIC node to allow adding an interrupt partition map phandle as the 4th cell value for GIC_PPI interrupts. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250228-topic-sm8650-pmu-ppi-partition-v4-1-78cffd35c73d@linaro.org Signed-off-by: Bjorn Andersson commit 4712dbd5fabdd5909b8b3367dfafd61f502b3bb7 Author: Rudraksha Gupta Date: Thu Feb 27 17:16:55 2025 -0800 ARM: dts: qcom: msm8960: Add thermal sensor (tsens) Add support for the thermal sensor (tsens) on the MSM8960 by copying and modifying the relevant nodes from the APQ8064 dtsi. These changes enable thermal management. Reviewed-by: Dmitry Baryshkov Signed-off-by: Rudraksha Gupta Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250227-expressatt-tsens-v4-2-d70afa5a1fd0@gmail.com Signed-off-by: Bjorn Andersson commit a3daa844ed8104617174bc1ac4554f8b88a9c878 Author: Abhinaba Rakshit Date: Fri Feb 28 01:45:55 2025 +0530 arm64: dts: qcom: qcs615: add TRNG node The qcs615 SoC has a True Random Number Generator, add the node with the correct compatible set. Signed-off-by: Abhinaba Rakshit Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250228-enable-trng-for-qcs615-v2-2-017aa858576e@quicinc.com Signed-off-by: Bjorn Andersson commit 778dc0f876c70b3d781a49981560ec88e1b7083a Author: Maulik Shah Date: Wed Feb 26 12:21:27 2025 +0530 arm64: dts: qcom: sm8750: Fix cluster hierarchy for idle states SM8750 have two different clusters. cluster0 have CPU 0-5 as child and cluster1 have CPU 6-7 as child. Each cluster requires its own idle state and power domain in order to achieve complete domain sleep state. However only single cluster idle state is added mapping CPU 0-7 to the same power domain. Fix this by correctly mapping each CPU to respective cluster power domain and make cluster1 power domain use same domain idle state as cluster0 since both use same idle state parameters. Fixes: 068c3d3c83be ("arm64: dts: qcom: Add base SM8750 dtsi") Signed-off-by: Maulik Shah Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250226-sm8750_cluster_idle-v2-1-ef0ac81e242f@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit bffe01a9b4bbccd07a1fe2bd78c3795004b56645 Author: Dmitry Baryshkov Date: Fri Feb 21 17:52:06 2025 +0200 arm64: dts: qcom: sm8450: add PCIe EP device nodes On the Qualcomm SM8450 platform the second PCIe host can be used either as an RC or as an EP device. Add device node for the PCIe EP. Signed-off-by: Dmitry Baryshkov Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250221-sar2130p-pci-v3-8-61a0fdfb75b4@linaro.org Signed-off-by: Bjorn Andersson commit 84247db00a5c4f9b6fbf23cc46979508ddd8d855 Author: Dmitry Baryshkov Date: Fri Feb 21 17:52:05 2025 +0200 arm64: dts: qcom: sar2130p: add PCIe EP device nodes On the Qualcomm AR2 Gen1 platform the second PCIe host can be used either as an RC or as an EP device. Add device node for the PCIe EP. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250221-sar2130p-pci-v3-7-61a0fdfb75b4@linaro.org Signed-off-by: Bjorn Andersson commit df52f9ab185e91886c8fb0660a0768d29b4cc379 Author: Lad Prabhakar Date: Tue Feb 18 12:51:57 2025 +0000 arm64: dts: qcom: Drop `tx-sched-sp` property The `tx-sched-sp` property was removed in commit aed6864035b1 ("net: stmmac: platform: Delete a redundant condition branch"). Therefore, it can be safely removed from the device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250218125157.412701-1-prabhakar.csengg@gmail.com Signed-off-by: Bjorn Andersson commit 5ee449c75f49c9a6b0cbff7848f922183e7888c1 Author: Rudraksha Gupta Date: Thu Feb 13 22:28:39 2025 -0800 ARM: dts: qcom: msm8960: Add BAM Copy bam nodes from qcom-ipq8064.dtsi and change the reg values to match msm8960. Co-developed-by: Sam Day Signed-off-by: Sam Day Reviewed-by: Dmitry Baryshkov Signed-off-by: Rudraksha Gupta Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250213-expressatt-bam-v3-1-0ff338f488b2@gmail.com Signed-off-by: Bjorn Andersson commit 5b74065e6c2482507435cdf7c4d0aab1830b9676 Author: Barnabás Czémán Date: Thu Feb 13 20:54:49 2025 +0100 arm64: dts: qcom: msm8917-xiaomi-riva: Add display backlight Redmi 5A display uses pwm backlight, add support for it. Signed-off-by: Barnabás Czémán Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250213-pm8937-pwm-v2-3-49ea59801a33@mainlining.org Signed-off-by: Bjorn Andersson commit b18c1aa6404303888ab924f149135835d223f4e8 Author: Daniil Titov Date: Thu Feb 13 20:54:48 2025 +0100 arm64: dts: qcom: pm8937: Add LPG PWM driver Add PWM/LPG node to the PM8937 dtsi so devices which use this block can enable them. Signed-off-by: Daniil Titov Signed-off-by: Barnabás Czémán Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250213-pm8937-pwm-v2-2-49ea59801a33@mainlining.org Signed-off-by: Bjorn Andersson commit c87d58bc7f831bf3d887e6ec846246cb673c2e50 Author: Manikanta Mylavarapu Date: Thu Mar 13 12:44:22 2025 +0530 arm64: dts: qcom: ipq9574: fix the msi interrupt numbers of pcie3 The MSI interrupt numbers of the PCIe3 controller are incorrect. Due to this, the functional bring up of the QDSP6 processor on the PCIe endpoint has failed. Correct the MSI interrupt numbers to properly bring up the QDSP6 processor on the PCIe endpoint. Fixes: d80c7fbfa908 ("arm64: dts: qcom: ipq9574: Add PCIe PHYs and controller nodes") Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250313071422.510-1-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit b4cd966edb2deb5c75fe356191422e127445b830 Author: Stephan Gerhold Date: Wed Feb 12 18:03:52 2025 +0100 arm64: dts: qcom: ipq9574: Add missing properties for cryptobam num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs before [1, 2]. Add the missing information from the hardware registers to ensure the driver can probe successfully without causing crashes. [1]: https://lore.kernel.org/r/CY01EKQVWE36.B9X5TDXAREPF@fairphone.com/ [2]: https://lore.kernel.org/r/20230626145959.646747-1-krzysztof.kozlowski@linaro.org/ Cc: stable@vger.kernel.org Tested-by: Md Sadre Alam Fixes: ffadc79ed99f ("arm64: dts: qcom: ipq9574: Enable crypto nodes") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-6-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit a2517331f11bd22cded60e791a8818cec3e7597a Author: Stephan Gerhold Date: Wed Feb 12 18:03:51 2025 +0100 arm64: dts: qcom: sa8775p: Add missing properties for cryptobam num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs before [1, 2]. Add the missing information from the hardware registers to ensure the driver can probe successfully without causing crashes. [1]: https://lore.kernel.org/r/CY01EKQVWE36.B9X5TDXAREPF@fairphone.com/ [2]: https://lore.kernel.org/r/20230626145959.646747-1-krzysztof.kozlowski@linaro.org/ Cc: stable@vger.kernel.org Fixes: 7ff3da43ef44 ("arm64: dts: qcom: sa8775p: add QCrypto nodes") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-5-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit 38b88722bce07b6a5927f45fbf7a9a85e834572c Author: Stephan Gerhold Date: Wed Feb 12 18:03:50 2025 +0100 arm64: dts: qcom: sm8650: Add missing properties for cryptobam num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs before [1, 2]. Add the missing information from the hardware registers to ensure the driver can probe successfully without causing crashes. [1]: https://lore.kernel.org/r/CY01EKQVWE36.B9X5TDXAREPF@fairphone.com/ [2]: https://lore.kernel.org/r/20230626145959.646747-1-krzysztof.kozlowski@linaro.org/ Cc: stable@vger.kernel.org Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-4-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit 663cd2cad36da23cf1a3db7868fce9f1a19b2d61 Author: Stephan Gerhold Date: Wed Feb 12 18:03:49 2025 +0100 arm64: dts: qcom: sm8550: Add missing properties for cryptobam num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs before [1, 2]. Add the missing information from the hardware registers to ensure the driver can probe successfully without causing crashes. [1]: https://lore.kernel.org/r/CY01EKQVWE36.B9X5TDXAREPF@fairphone.com/ [2]: https://lore.kernel.org/r/20230626145959.646747-1-krzysztof.kozlowski@linaro.org/ Cc: stable@vger.kernel.org Fixes: 433477c3bf0b ("arm64: dts: qcom: sm8550: add QCrypto nodes") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-3-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit 0fe6357229cb15a64b6413c62f1c3d4de68ce55f Author: Stephan Gerhold Date: Wed Feb 12 18:03:48 2025 +0100 arm64: dts: qcom: sm8450: Add missing properties for cryptobam num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs before [1, 2]. Add the missing information from the hardware registers to ensure the driver can probe successfully without causing crashes. [1]: https://lore.kernel.org/r/CY01EKQVWE36.B9X5TDXAREPF@fairphone.com/ [2]: https://lore.kernel.org/r/20230626145959.646747-1-krzysztof.kozlowski@linaro.org/ Cc: stable@vger.kernel.org Fixes: b92b0d2f7582 ("arm64: dts: qcom: sm8450: add crypto nodes") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-2-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit 75eefd474469abf95aa9ef6da8161d69f86b98b4 Author: Luca Weiss Date: Wed Feb 12 18:03:47 2025 +0100 arm64: dts: qcom: sm8350: Reenable crypto & cryptobam When num-channels and qcom,num-ees is not provided in devicetree, the driver will try to read these values from the registers during probe but this fails if the interconnect is not on and then crashes the system. So we can provide these properties in devicetree (queried after patching BAM driver to enable the necessary interconnect) so we can probe cryptobam without reading registers and then also use the QCE as expected. Fixes: 4d29db204361 ("arm64: dts: qcom: sm8350: fix BAM DMA crash and reboot") Fixes: f1040a7fe8f0 ("arm64: dts: qcom: sm8350: Add Crypto Engine support") Signed-off-by: Luca Weiss Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250212-bam-dma-fixes-v1-1-f560889e65d8@linaro.org Signed-off-by: Bjorn Andersson commit 278469ff569e1082d56b4a7af26fbaecef9fbf3b Author: Harish Chegondi Date: Wed Mar 12 10:31:20 2025 -0700 drm/xe/eustall: Fix a possible pointer dereference after free If devm_add_action_or_reset() isn't successful, xe_eu_stall_fini() is invoked. So, unsuccessful return from devm_add_action_or_reset() shouldn't dereference gt->eu_stall as xe_eu_stall_fini() already frees it. Fix this issue. Fixes: 9a0b11d4cf3b ("drm/xe/eustall: Add support to init, enable and disable EU stall sampling") Signed-off-by: Harish Chegondi Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/eae49a414a7314921108e0388810aaee6261ad92.1741800396.git.harish.chegondi@intel.com commit dbe74119ff71c00f2d863a32f72aab2d15e61c39 Author: Ville Syrjälä Date: Fri Feb 28 23:14:54 2025 +0200 drm/client: s/unsigned int i/int i/ Replace the 'unsigned int i' footguns with plain old signed int. Avoids accidents if/when someone decides they need to iterate backwards. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c11acfe20c24f91588f1d9401f79da71a74fc5a1 Author: Ville Syrjälä Date: Fri Feb 28 23:14:53 2025 +0200 drm/client: Move variables to tighter scope Bunch of variables are only needed inside loops and whatnot. Move them to a tighter scope to make the code less confusing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4e5613849ecde8c8c4b0cb4e7bfe25ba5d149020 Author: Ville Syrjälä Date: Fri Feb 28 23:14:52 2025 +0200 drm/client: s/new_crtc/crtc/ Rename the 'new_crtc' variable to just 'crtc' in drm_client_firmware_config(). We don't call any of the other stuff in here new or old so this feels out of place. v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 82f9570b3563e9045c70658f474f11a48a21d4b9 Author: Ville Syrjälä Date: Fri Feb 28 23:14:51 2025 +0200 drm/client: Stop using the legacy crtc->mode crtc->mode is legacy junk and shouldn't really be used with atomic drivers. Most (all?) atomic drivers do end up still calling drm_atomic_helper_update_legacy_modeset_state() at some point, so crtc->mode does still get populated, and this does work for now. But now that the modes[] lifetime issues have been sorted out we can just switch over to the proper crtc->state->mode. v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3039cc0c0653c6e15130a8719c3237329a954670 Author: Ville Syrjälä Date: Fri Feb 28 23:14:50 2025 +0200 drm/client: Make copies of modes drm_client_firmware_config() is currently picking up the current mode of the crtc via the legacy crtc->mode, which is not supposed to be used by atomic drivers at all. We can't simply switch over to the proper crtc->state->mode because we drop the crtc->mutex (which protects crtc->state) before the mode gets used. The most straightforward solution to extend the lifetime of modes[] seem to be to make full copies of the modes. And with this we can undo also commit 3eadd887dbac ("drm/client:Fully protect modes[] with dev->mode_config.mutex") as the lifetime of modes[] no longer has anything to do with that lock. v2: Don't try to copy NULL modes v3: Keep storing pointers and use drm_mode_{duplicate,destroy}() Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7640a1c20f144eb933d981102b60080c8114d1d5 Author: Ville Syrjälä Date: Fri Feb 28 23:14:49 2025 +0200 drm/client: Streamline mode selection debugs Get rid of all the redundant debugs and just wait until the end to print which mode (and of which type) we picked. Reviewed-by: Thomas Zimmermann Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-4-ville.syrjala@linux.intel.com commit b218e72b8ac2c11ccab4d41263dd0406d8291c6f Author: Ville Syrjälä Date: Fri Feb 28 23:14:48 2025 +0200 drm/client: Use array notation for function arguments Use the array notation rather that the pointer notation for function arguments. This makes it clear to the reader that we are in fact dealing with an array rather than a single pointer. Functionally the two are equivalent. Reviewed-by: Jani Nikula Reviewed-by: Thomas Zimmermann Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-3-ville.syrjala@linux.intel.com commit f68429691c938a2e9131faf2ab2a8f0563966ba1 Author: Ville Syrjälä Date: Mon Mar 3 11:38:47 2025 +0200 drm/client: Constify modes The modes used by the client code live on the connectors' mode lists, which are not owned by the client code, and thus it has no business modifying the modes. Mark the modes const to make that fact abundantly clear. v2: Fix up the kunit test Reviewed-by: Jani Nikula Reviewed-by: Thomas Zimmermann Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250303093847.7698-1-ville.syrjala@linux.intel.com commit 4051c59e2a6a1b3584fa8932361b8f50198e7396 Author: Gustavo Sousa Date: Tue Mar 11 14:04:52 2025 -0300 drm/i915/xe3lpd: Update bandwidth parameters Bandwidth parameters for Xe3_LPD have been updated with respect to previous display releases. Encode them into xe3lpd_sa_info and use that new struct. Bspec: 68859 Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311-xe3lpd-bandwidth-update-v5-3-a95a9d90ad71@intel.com Signed-off-by: Gustavo Sousa commit d706998b6da687dcafee2cf6e9712136dafa574a Author: Gustavo Sousa Date: Tue Mar 11 14:04:51 2025 -0300 drm/i915/display: Convert intel_bw.c externally to intel_display We already have internal interface for intel_bw.c converted to use intel_display. Now convert the external interface as well. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311-xe3lpd-bandwidth-update-v5-2-a95a9d90ad71@intel.com Signed-off-by: Gustavo Sousa commit 9377c00cfdb5cfc35dee3f62c52fce96d91464b7 Author: Gustavo Sousa Date: Tue Mar 11 14:04:50 2025 -0300 drm/i915/display: Convert intel_bw.c internally to intel_display Update intel_bw.c internally use intel_display. Conversion of the public interface will come as a follow-up. v2: - Prefer intel_uncore_read() for MCHBAR registers. (Ville) v3: - Remove the unnecessary inclusion of intel_de.h after changes from v2. (Ville) Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311-xe3lpd-bandwidth-update-v5-1-a95a9d90ad71@intel.com Signed-off-by: Gustavo Sousa commit 2e921e1d47e627e575ac94eca9db81e374b1e409 Author: Ankit Nautiyal Date: Tue Mar 11 15:07:51 2025 +0530 drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode MSA Ignore Timing PAR enable is set in the DP sink when we enable variable refresh rate. Currently for link training we depend on flipline to decide whether we want to ignore the msa timings. With fixed refresh rate we will still fill the flipline in all cases whether panel supports VRR or not. Change the condition for link training to ignore the msa timings if vrr.in_range. v2: Add more documentation and a #TODO for readout of vrr.in_range. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-9-ankit.k.nautiyal@intel.com commit bef1e60c7087418eea26f85a19dca7e6360857a9 Author: Ankit Nautiyal Date: Tue Mar 11 15:07:50 2025 +0530 drm/i915/vrr: Prepare for fixed refresh rate timings Currently we always compute the timings as if vrr is enabled. With this approach the state checker becomes complicated when we introduce fixed refresh rate mode with vrr timing generator. To avoid the complications, instead of always computing vrr timings, we compute vrr timings based on uapi.vrr_enable knob. So when the knob is disabled we always compute vmin=flipline=vmax. v2: Use actual timings without any adjustments while preparing for fixed timings in compute_config. (Ville) v3: Avoid setting fixed timings if !vrr_possible(). v4: Move vmin adjustement after all other timings are complete. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä (#v2) Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-8-ankit.k.nautiyal@intel.com commit 1f44247dde98b582d7d6ce7d402facc070fa4506 Author: Ankit Nautiyal Date: Tue Mar 11 15:07:49 2025 +0530 drm/i915/vrr: Use crtc_vtotal for vmin To have fixed refresh rate with VRR timing generator the guardband/pipeline full can't be programmed on the fly. So we need to ensure that the values satisfy both the fixed and variable refresh rates. Since we compute these value based on vmin, lets set the vmin to crtc_vtotal for both fixed and variable timings instead of using the current refresh rate based approach. This way the guardband remains sufficient for both cases. v2: Avoid using vblank delay while computing vtotal, as this comes into the picture later. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-7-ankit.k.nautiyal@intel.com commit 27217f9d185666c8bc1449796cd4029ca66d8d3c Author: Ankit Nautiyal Date: Tue Mar 11 15:07:48 2025 +0530 drm/i915/vrr: Track vrr.enable only for variable timing Since CMRR is now disabled, use the flag vrr.enable to tracks if vrr timing generator is used with variable timings. Avoid setting vrr.enable for CMRR and adjust readout to not set vrr.enable when vmax == vmin == flipline (fixed refresh rate timing). v2: Use intel_vrr_vmin_flipline() to account for adjustments required for icl/tgl. (Ville) v3: Add a #TODO for handling I915_MODE_FLAG_VRR better for CMRR. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-6-ankit.k.nautiyal@intel.com commit a15b20e5094abd3bed90edfc22bf9ff84ef99e3c Author: Ankit Nautiyal Date: Tue Mar 11 15:07:47 2025 +0530 drm/i915/vrr: Disable CMRR Switching between variable and fixed timings is possible as for that we just need to flip between VRR timings. However for CMRR along with the timings, few other bits also need to be changed on the fly, which might cause issues. So disable CMRR for now, till we have variable and fixed timings sorted out. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-5-ankit.k.nautiyal@intel.com commit 58f9466c8292f8319158eb4b0f5fcbe89709d499 Author: Ankit Nautiyal Date: Tue Mar 11 15:07:46 2025 +0530 drm/i915/vrr: Make helpers for cmrr and vrr timings Separate out functions for computing cmrr and vrr timings. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-4-ankit.k.nautiyal@intel.com commit 022d04b355a2771bc3de970a7f14980a716bfe4c Author: Ankit Nautiyal Date: Tue Mar 11 15:07:45 2025 +0530 drm/i915:vrr: Separate out functions to compute vmin and vmax Make helpers to compute vmin and vmax. v2: Make the adjusted mode const (Ville) Use reverse xmas tree order of declarations. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-3-ankit.k.nautiyal@intel.com commit 03710f3d063d8f4873ef43d030bea375243bcbe4 Author: Ankit Nautiyal Date: Tue Mar 11 15:07:44 2025 +0530 drm/i915/vrr: Remove unwanted comment The comment about fixed average vtotal is incorrect. Remove it. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-2-ankit.k.nautiyal@intel.com commit 5d6c69b712f9cb34063ef32168ce6a12af8acf0c Author: Ankit Nautiyal Date: Thu Feb 27 09:11:06 2025 +0530 drm/i915/watermark: Check bounds for scaler_users for dsc prefill latency Currently, during the computation of global watermarks, the latency for each scaler user is calculated to compute the DSC prefill latency. At this point, the number of scaler users can exceed the number of supported scalers, which is checked later in intel_atomic_setup_scalers(). This can cause issues when the number of scaler users exceeds the number of supported scalers. While checking for DSC prefill, ensure that the number of scaler users does not exceed the number of supported scalers. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4341 Fixes: a9b14af999b0 ("drm/i915/dsc: Check if vblank is sufficient for dsc prefill") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Jani Nikula Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani Link: https://patchwork.freedesktop.org/patch/msgid/20250227034106.1638203-1-ankit.k.nautiyal@intel.com commit 80bcbdfc8cf51b41fde0a2466a83e057c5a1bf3a Author: Francois Dugast Date: Wed Mar 12 10:27:49 2025 +0100 drm/xe/svm: Add stats for SVM page faults Add a new entry in stats to for svm page faults. If CONFIG_DEBUG_FS is enabled, the count can be viewed with per GT stat debugfs file. This is similar to what is already in place for vma page faults. Example output: cat /sys/kernel/debug/dri/0/gt0/stats svm_pagefault_count: 6 tlb_inval_count: 78 vma_pagefault_count: 0 vma_pagefault_kb: 0 v2: Fix build with CONFIG_DRM_GPUSVM disabled v3: Update argument in kernel doc Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250312092749.164232-1-francois.dugast@intel.com Signed-off-by: Francois Dugast commit 0bbdfaa204ce673570e41fe71d4f571a82c7b04d Author: Krzysztof Kozlowski Date: Wed Mar 12 14:13:59 2025 +0100 arm64: dts: qcom: sm8750-qrd: Enable CDSP Enable the CDSP on QRD8750 board. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-b4-sm8750-cdsp-v4-3-4925d607cea6@linaro.org Signed-off-by: Bjorn Andersson commit 070b7e0490b521999b95c9262ab9e1609c8ab4a1 Author: Krzysztof Kozlowski Date: Wed Mar 12 14:13:58 2025 +0100 arm64: dts: qcom: sm8750-mtp: Enable CDSP Enable the CDSP on MPT8750 board. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-b4-sm8750-cdsp-v4-2-4925d607cea6@linaro.org Signed-off-by: Bjorn Andersson commit 58471055ae76f639ba8cc2df3e1bc12fa4be2c02 Author: Krzysztof Kozlowski Date: Wed Mar 12 14:13:57 2025 +0100 arm64: dts: qcom: sm8750: Add CDSP Add nodes for the CDSP and its SMP2P. These are compatible with earlier SM8650 with difference in one more interrupt. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-b4-sm8750-cdsp-v4-1-4925d607cea6@linaro.org Signed-off-by: Bjorn Andersson commit 23d8b031f302a43408cf43002b6cb13e88e99a10 Author: Krzysztof Kozlowski Date: Wed Mar 12 13:44:48 2025 +0100 arm64: dts: qcom: sm8750-qrd: Enable ADSP Enable ADSP on QRD8750 board. Reviewed-by: Melody Olvera Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-sm8750-audio-v3-4-40fbb3e53f95@linaro.org Signed-off-by: Bjorn Andersson commit 0c23fa8648871e6e74cb93ab7089c50f9bc20857 Author: Krzysztof Kozlowski Date: Wed Mar 12 13:44:47 2025 +0100 arm64: dts: qcom: sm8750-mtp: Enable ADSP Enable ADSP on MTP8750 board. Reviewed-by: Melody Olvera Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-sm8750-audio-v3-3-40fbb3e53f95@linaro.org Signed-off-by: Bjorn Andersson commit 0fe088574b30588e5fc437be376383b1372da49a Author: Krzysztof Kozlowski Date: Wed Mar 12 13:44:46 2025 +0100 arm64: dts: qcom: sm8750: Add LPASS macro codecs and pinctrl Add LPASS macro codecs and LPASS TLMM pin controller on Qualcomm SM8750 for proper sound support. These are fully compatible with earlier SM8550. Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-sm8750-audio-v3-2-40fbb3e53f95@linaro.org Signed-off-by: Bjorn Andersson commit 8744dd90cd6b8ee105f5ade1ca9649451aff416a Author: Krzysztof Kozlowski Date: Wed Mar 12 13:44:45 2025 +0100 arm64: dts: qcom: sm8750: Add IPCC, SMP2P, AOSS and ADSP Add nodes for IPCC mailbox, SMP2P for ADSP, AOSS and the ADSP remoteproc PAS loader (compatible with SM8550). Reviewed-by: Melody Olvera Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250312-sm8750-audio-v3-1-40fbb3e53f95@linaro.org Signed-off-by: Bjorn Andersson commit 1f552db1b953b737183fd7c11c4814d3d152d4cd Author: Varadarajan Narayanan Date: Tue Mar 4 17:04:00 2025 +0530 arm64: dts: qcom: ipq5424: Enable MMC Enable MMC and relevant pinctrl entries. Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20250304113400.2806670-1-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit b1dac789c650a20a54d5089b23fbb800fb289b8b Author: Gaurav Kashyap Date: Mon Jan 13 13:16:26 2025 -0800 arm64: dts: qcom: sm8750: Add ICE nodes Add the SM8750 nodes for the UFS Inline Crypto Engine (ICE). Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250113-sm8750_crypto_master-v1-6-d8e265729848@quicinc.com Signed-off-by: Bjorn Andersson commit 9f9dcac2f85e6a0641a4a4f7f3b2c35a984ed4cc Author: Gaurav Kashyap Date: Mon Jan 13 13:16:24 2025 -0800 arm64: dts: qcom: sm8750: Add TRNG nodes Add the SM8750 nodes for the True Random Number Generator (TRNG). Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20250113-sm8750_crypto_master-v1-4-d8e265729848@quicinc.com Signed-off-by: Bjorn Andersson commit eeb0f3e4ea67cb1c2dd7cacfef218bfa0ae56970 Author: Gaurav Kashyap Date: Mon Jan 13 13:16:22 2025 -0800 arm64: dts: qcom: sm8750: Add QCrypto nodes Add the QCE and Crypto BAM DMA nodes. Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20250113-sm8750_crypto_master-v1-2-d8e265729848@quicinc.com Signed-off-by: Bjorn Andersson commit dd5c8d7222fbccd7d0accb7523e11657b827cc99 Author: Krzysztof Kozlowski Date: Wed Jan 8 13:05:30 2025 +0100 arm64: dts: qcom: Use recommended MBN firmware path All Qualcomm firmwares uploaded to linux-firmware are in MBN format, instead of split MDT. Firmware for boards here is not yet in linux-firmware, but if it gets accepted it will be MBN, not MDT. Change might affect users of DTS which rely on manually placed firmware files, not coming from linux-firmware package. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250108120530.156928-1-krzysztof.kozlowski@linaro.org [bjorn: Updated subject] Signed-off-by: Bjorn Andersson commit 10646ddac2917b31c985ceff0e4982c42a9c924b Author: Vignesh Raman Date: Fri Feb 28 18:56:18 2025 +0530 drm/ci: fix merge request rules Merge request pipelines were only created when changes were made to drivers/gpu/drm/ci/, causing MRs that didn't touch this path to break. Fix MR pipeline rules to trigger jobs for all changes. Run jobs automatically for marge-bot and scheduled pipelines, but in all other cases run manually. Also remove CI_PROJECT_NAMESPACE checks specific to mesa. Fixes: df54f04f2020 ("drm/ci: update gitlab rules") Signed-off-by: Vignesh Raman Reviewed-by: Daniel Stone Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20250228132620.556079-1-vignesh.raman@collabora.com commit f9f087d946266bc5da7c3a17bd8fd9d01969e3cf Author: Arnd Bergmann Date: Thu Feb 27 14:20:32 2025 +0100 drm: xlnx: zynqmp_dpsub: fix Kconfig dependencies for ASoC The new audio code fails to build when sounds support is in a loadable module but the GPU driver is built-in: x86_64-linux-ld: zynqmp_dp_audio.c:(.text+0x6a8): undefined reference to `devm_snd_soc_register_card' x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1bc): undefined reference to `snd_soc_info_volsw' x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f0): undefined reference to `snd_soc_get_volsw' x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f4): undefined reference to `snd_soc_put_volsw' Change the Kconfig dependency to disallow the sound support in this configuration. Fixes: 3ec5c1579305 ("drm: xlnx: zynqmp_dpsub: Add DP audio support") Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20250227132036.1136600-1-arnd@kernel.org commit c67c0fef5d4d1b888275a588f0fb0f6f2755924b Author: Christian König Date: Wed Mar 12 14:44:00 2025 +0100 drm/sched: revert "drm_sched_job_cleanup(): correct false doc" This reverts commit 44d2f310f008613c1dbe5e234c2cf2be90cbbfab. The function drm_sched_job_arm() is indeed the point of no return. The background is that it is nearly impossible for the driver to correctly retract the fence and signal it in the order enforced by the dma_fence framework. The code in drm_sched_job_cleanup() is for the purpose to cleanup after the job was armed through drm_sched_job_arm() *and* processed by the scheduler. We can certainly improve the documentation, but removing the warning is clearly not a good idea. Signed-off-by: Christian König Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250312134400.2176393-1-christian.koenig@amd.com commit 459664c98da853527c757edb7e6e529a24fff03f Author: Michal Wajdeczko Date: Tue Mar 11 12:40:42 2025 +0100 drm/xe/pf: Drop CTC_MODE from VF runtime register list This register shouldn't be used by the VF drivers. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311114042.1954-3-michal.wajdeczko@intel.com commit fce3fb7b914bcd19341de8d8eff8bef371c2cddf Author: Michal Wajdeczko Date: Tue Mar 11 12:40:41 2025 +0100 drm/xe/vf: Don't check CTC_MODE[0] if VF Starting from commit 18778b5fdd01 ("drm/xe: Eliminate usage of TIMESTAMP_OVERRIDE") we access the CTC_MODE register only to warn if it has undocumented value. There is no point in doing that on the VF driver. While here, move this check to a helper function. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311114042.1954-2-michal.wajdeczko@intel.com commit f990c11a63bb957ecdde4629492b334e3e42f072 Author: Michal Wajdeczko Date: Tue Mar 11 14:57:26 2025 +0100 drm/xe/vf: Catch all unexpected register reads While we can only mimic read32 for a few GT registers for which the PF shared the values, we shouldn't avoid calling helper code if we try to access non-GT register, as then we miss to trigger a debug warning. For cases where sriov_vf_gt was not set, just use primary_gt instead. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311135726.1998-3-michal.wajdeczko@intel.com commit d3414acf4a01c1bb28d9dc9b389862ffcc01aab4 Author: Michal Wajdeczko Date: Tue Mar 11 14:57:25 2025 +0100 drm/xe/vf: Don't try Driver-FLR if VF Driver-FLR can't be triggered from the VF driver, so treat it as disabled if VF. While around, fix also the message, as it shouldn't be printed just 'once' as we may have many devices. Signed-off-by: Michal Wajdeczko Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311135726.1998-2-michal.wajdeczko@intel.com commit de35cc27fdf35a966f933fa5b611181e83689e1f Author: Michal Wajdeczko Date: Tue Mar 11 15:01:15 2025 +0100 drm/xe: Prefer USEC_PER_SEC over MICRO It will be easier to understand the meaning of the flr_timeout value if the USEC_PER_SEC macro is used in the expression. Signed-off-by: Michal Wajdeczko Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20250311140115.2042-1-michal.wajdeczko@intel.com commit 92a5bd302458a1663daaad36994373e2ff0df5be Author: Michal Wajdeczko Date: Tue Mar 11 11:52:21 2025 +0100 drm/xe/vf: Unblock xe_rtp_process_to_sr for VFs In commit 9632dfb0def4 ("drm/xe/vf: Don't run any save-restore RTP actions if VF") we disabled processing of all RTP rules if we were running as a VFs, since many of the RTP actions were trying to access registers unaccessible for VFs. This also included all of LRC WA rules, since some of them were implemented in a way that required RMW pattern. Now, as we can program LRC WAs without accessing such registers from the driver, relying on the MI_MATH instruction instead, we can unblock xe_rtp_process_to_sr() for VFs. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250311105221.1910-1-michal.wajdeczko@intel.com commit c19e705ec9815896abed94b929a843a0b3010651 Author: Michal Wajdeczko Date: Mon Mar 3 18:35:21 2025 +0100 drm/xe/vf: Stop applying save-restore MMIOs if VF Currently we are blocking processing of all save-restore rules by the VFs inside the xe_rtp_process_to_sr() function, but we want to unblock that to allow processing of the LRC WA rules. To avoid hitting WARNs about reading an inaccessible registers by the VFs, stop applying save-restore MMIOs action if VF, without relying that SR list will be always empty for the VF. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250303173522.1822-5-michal.wajdeczko@intel.com commit f2f90989ccff2d010472d47e4e62f7afe8ce67ff Author: Michal Wajdeczko Date: Mon Mar 3 18:35:20 2025 +0100 drm/xe: Avoid reading RMW registers in emit_wa_job To allow VFs properly handle LRC WAs, we should postpone doing all RMW register operations and let them be run by the engine itself, since attempt to perform read registers from within the driver will fail on the VF. Use MI_MATH and ALU for that. Signed-off-by: Michal Wajdeczko Cc: Michał Winiarski Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250303173522.1822-4-michal.wajdeczko@intel.com commit b823f80bbd63f67c926a3a0c5dcf246fb8736d7b Author: Michal Wajdeczko Date: Tue Mar 4 17:23:07 2025 +0100 drm/xe: Add MI_MATH and ALU instruction definitions The command streamer implements an Arithmetic Logic Unit (ALU) which supports basic arithmetic and logical operations on two 64-bit operands. Access to this ALU is thru the MI_MATH command and sixteen General Purpose Register (GPR) 64-bit registers, which are used as temporary storage. Bspec: 45737, 60236 # MI Bspec: 45525, 60132 # ALU Bspec: 45533, 60309 # GPR Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250304162307.1866-1-michal.wajdeczko@intel.com commit 4383dd88fa77b8489b627125b268c3f1ab934e37 Author: Michal Wajdeczko Date: Mon Mar 3 18:35:18 2025 +0100 drm/xe: Add MI_LOAD_REGISTER_REG command definition The MI_LOAD_REGISTER_REG command reads value from a source register location and writes that value to a destination register location. Bspec: 45730, 60233 Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250303173522.1822-2-michal.wajdeczko@intel.com commit eff0347e7c228335e9ff64aaf02c66957803af6a Author: Luca Ceresoli Date: Wed Feb 26 22:23:53 2025 +0100 drm/debugfs: add top-level 'bridges' file showing all added bridges The global bridges_list holding all the bridges between drm_bridge_add() and drm_bridge_remove() cannot be inspected via debugfs. Add a file showing it. To avoid code duplication, move the code printing a bridge info to a common function. Signed-off-by: Luca Ceresoli Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250226-drm-debugfs-show-all-bridges-v8-2-bb511cc49d83@bootlin.com Signed-off-by: Louis Chauvet commit 9497c5a0f7c26ff81f11df738a94c6b80f890c0a Author: Luca Ceresoli Date: Wed Feb 26 22:23:52 2025 +0100 drm/bridge: move bridges_show logic from drm_debugfs.c In preparation to expose more info about bridges in debugfs, which will require more insight into drm_bridge data structures, move the bridges_show code to drm_bridge.c. Suggested-by: Jani Nikula Suggested-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250226-drm-debugfs-show-all-bridges-v8-1-bb511cc49d83@bootlin.com Signed-off-by: Louis Chauvet commit 6374a1005f20c1c2f7bbcc1bc735c2be4910a685 Author: Antonin Godard Date: Tue Mar 11 17:40:06 2025 +0100 drm/panel: simple: Add POWERTIP PH128800T004-ZZA01 panel entry Add support for the POWERTIP PH128800T004-ZZA01 10.1" (1280x800) LCD-TFT panel. Its panel description is very much like the POWERTIP PH128800T006-ZHC01 configured below this one, only its timings are different. Signed-off-by: Antonin Godard Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250311-add-powertip-ph128800t004-v1-2-7f95e6984cea@bootlin.com Signed-off-by: Louis Chauvet commit 36cb24049b911ed83d34441cd2e9adebfc999da8 Author: Antonin Godard Date: Tue Mar 11 17:40:05 2025 +0100 dt-bindings: display: simple: Add POWERTIP PH128800T004-ZZA01 panel Add POWERTIP PH128800T004-ZZA01 10.1" LCD-TFT LVDS panel compatible string. Signed-off-by: Antonin Godard Acked-by: "Rob Herring (Arm)" Link: https://patchwork.freedesktop.org/patch/msgid/20250311-add-powertip-ph128800t004-v1-1-7f95e6984cea@bootlin.com Signed-off-by: Louis Chauvet commit c8e7b185d45be0915c08b4c91743071e0d2d298a Author: Dario Binacchi Date: Wed Mar 5 15:09:16 2025 +0100 drm/mxsfb: Remove generic DRM drivers in probe function Use aperture helpers to remove all generic graphics drivers before loading mxsfb. Makes mxsfb compatible with simpledrm. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250305140929.174398-1-dario.binacchi@amarulasolutions.com commit edd9231f3af4e580bc6679309bde65cbe10783ca Author: Thomas Zimmermann Date: Fri Mar 7 09:04:03 2025 +0100 drm/udl: Set struct drm_device.dma_dev Set the dma_dev field provided by the DRM device. Required for PRIME dma-buf import. Remove the driver's implementation. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250307080836.42848-6-tzimmermann@suse.de commit f5bd9d528ebac41a31919aa41f1a99eccb8917c8 Author: Thomas Zimmermann Date: Fri Mar 7 09:04:02 2025 +0100 drm/gud: Set struct drm_device.dma_dev Set the dma_dev field provided by the DRM device. Required for PRIME dma-buf import. Remove the driver's implementation. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250307080836.42848-5-tzimmermann@suse.de commit e3d4dfe91bdcb9c2f4ac07ea3885a94b863ba28e Author: Thomas Zimmermann Date: Fri Mar 7 09:04:01 2025 +0100 drm/gm12u320: Set struct drm_device.dma_dev Set the dma_dev field provided by the DRM device. Required for PRIME dma-buf import. Remove the driver's implementation. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250307080836.42848-4-tzimmermann@suse.de commit 7b7af1740108424158c6e1629c66fc8f603bf647 Author: Thomas Zimmermann Date: Fri Mar 7 09:04:00 2025 +0100 drm/appletbdrm: Set struct drm_device.dma_dev Set the dma_dev field provided by the DRM device. Required for PRIME dma-buf import. Remove the driver's implementation. Signed-off-by: Thomas Zimmermann Tested-by: Aditya Garg Reviewed-by: Aditya Garg Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250307080836.42848-3-tzimmermann@suse.de commit 143ec8d3f93965110689897f0d25165dc9664009 Author: Thomas Zimmermann Date: Fri Mar 7 09:03:59 2025 +0100 drm/prime: Support dedicated DMA device for dma-buf imports Importing dma-bufs via PRIME requires a DMA-capable device. Devices on peripheral busses, such as USB, often cannot perform DMA by themselves. Without DMA-capable device PRIME import fails. DRM drivers for USB devices already use a separate DMA device for dma-buf imports. Make the mechanism generally available. Besides the case of USB, there are embedded DRM devices without DMA capability. DMA is performed by a separate controller. DRM drivers should set this accordingly. Add the field dma_dev to struct drm_device to refer to the device's DMA device. For USB this should be the USB controller. Use dma_dev in the PRIME import helpers, if set. v2: - acquire internal reference on dma_dev (Jani) - add DMA-controller usecase to docs (Maxime) Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250307080836.42848-2-tzimmermann@suse.de commit c6a84bc9690afc40b103c5df3cdfb357439cb563 Author: Thomas Zimmermann Date: Wed Mar 5 17:30:46 2025 +0100 drm/ast: cursor: Drop page alignment The cursor scanout address requires alignment to a multiple of 8, but does not require page alignment. Change the offset calculation accordingly. Frees up a few more bytes for the primary framebuffer. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-8-tzimmermann@suse.de commit e5f953b8eae7249bf50f86d79f80327621edc2d5 Author: Thomas Zimmermann Date: Wed Mar 5 17:30:45 2025 +0100 drm/ast: Remove vram_fb_available from struct ast_device Helpers compute the offset and size of the available framebuffer memory. Remove the obsolete field vram_fb_available from struct ast_device. Also define the cursor-signature size next to its only user. v2: - initialize plane size Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-7-tzimmermann@suse.de commit ca7a8e8efc9cba4f131b65197bae5011d0a7a250 Author: Thomas Zimmermann Date: Wed Mar 5 17:30:44 2025 +0100 drm/ast: Add helper for computing framebuffer location in video memory The ast driver stores the primary plane's image in the framebuffer memory up to where the cursor is located. Add helpers to calculate the offset and size. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-6-tzimmermann@suse.de commit 4ee3229bbe6cb0e80f1dedcddda8072bb9cc884f Author: Thomas Zimmermann Date: Wed Mar 5 17:30:43 2025 +0100 drm/ast: cursor: Add helpers for computing location in video memory The ast drivers stores the cursor image at the end of the video memory. Add helpers to calculate the offset and size. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-5-tzimmermann@suse.de commit a958c7f13b0b4ffd41384293d307b9d6218fcc87 Author: Thomas Zimmermann Date: Wed Mar 5 17:30:42 2025 +0100 drm/ast: Add VGACR99 register constants Add register constants for VGACR99 and use them when detecting the size of the VGA memory. Aligns the code with the programming manual. Also replace literal size values with Linux' SZ_ size constants. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-4-tzimmermann@suse.de commit 9f711d1877e052171ae21da4cb831e7184b9872e Author: Thomas Zimmermann Date: Wed Mar 5 17:30:41 2025 +0100 drm/ast: Add VGACRAA register constants Add register constants for VGACRAA and use them when detecting the size of the VGA memory. Aligns the code with the programming manual. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-3-tzimmermann@suse.de commit 2b7970e9a632b1e45ccf52b620079ab9ea5cad1a Author: Thomas Zimmermann Date: Wed Mar 5 17:30:40 2025 +0100 drm/ast: Replace AST_VIDMEM_SIZE_ with Linux SZ_ constants Ast's AST_VIDMEM_SIZE_ constants enumerate supported video-memory sizes from 8 MiB to 128 MiB. Replace them with Linux' SZ_ constants of the same value. When expanded, the literal values remain the same. The size constant for 128 MiB is unused and the default size is not necessary. Remove both of them. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-2-tzimmermann@suse.de commit 27b6bce72c7721449d924ef987aa835daf015f26 Author: Vignesh Raman Date: Mon Feb 17 11:07:12 2025 +0530 drm/ci: enable lockdep detection We have enabled PROVE_LOCKING (which enables LOCKDEP) in drm-ci. This will output warnings when kernel locking errors are encountered and will continue executing tests. To detect if lockdep has been triggered, check the debug_locks value in /proc/lockdep_stats after the tests have run. When debug_locks is 0, it indicates that lockdep has detected issues and turned itself off. Check this value, and if lockdep is detected, exit with an error and configure it as a warning in GitLab CI. GitLab CI ignores exit codes other than 1 by default. Pass the correct exit code with variable FF_USE_NEW_BASH_EVAL_STRATEGY set to true or exit on failure. Also update the documentation. Acked-by: Helen Koike Reviewed-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20250217053719.442644-4-vignesh.raman@collabora.com Signed-off-by: Vignesh Raman commit 7948fd1b8ea57791a3d5eaf5320ebcea56748d79 Author: Vignesh Raman Date: Mon Feb 17 11:07:11 2025 +0530 drm/ci: enable CONFIG_DEBUG_WW_MUTEX_SLOWPATH Enable CONFIG_DEBUG_WW_MUTEX_SLOWPATH for mutex slowpath debugging. Acked-by: Helen Koike Reviewed-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20250217053719.442644-3-vignesh.raman@collabora.com Signed-off-by: Vignesh Raman commit afb7a1d669b7c3f7c0f1678299377d88b57a48f8 Author: Vignesh Raman Date: Mon Feb 17 11:07:10 2025 +0530 drm/ci: refactor software-driver stage jobs Move common job configuration for software-driver stage jobs to separate job. Acked-by: Helen Koike Reviewed-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20250217053719.442644-2-vignesh.raman@collabora.com Signed-off-by: Vignesh Raman commit 6ace085c453ccdcad34e64eead21eb120270c383 Author: Imre Deak Date: Tue Mar 4 17:29:17 2025 +0200 drm/i915/crt: Use intel_hpd_block/unblock() instead of intel_hpd_disable/enable() intel_hpd_disable/enable() have the same purpose as intel_hpd_block/unblock(), except that disable/enable will drop any HPD IRQs which were triggered while the HPD was disabled, while block/unblock will handle such IRQs after the IRQ handling is unblocked. Use intel_hpd_block/unblock() for crt as well, by adding a helper to explicitly clear any pending IRQs before unblocking. v2: - Handle encoders without a port assigned to them. - Rebase on change in intel_hpd_suspend() documentation. v3: - Rebase on the suspend/resume -> block/unblock rename change. - Clear the pending events only after all encoders have unblocked the HPD handling. - Clear the short/long port events for all encoders using the given HPD pin. v4: - Rebase on port->hpd_pin tracking. (Ville) Cc: Ville Syrjälä Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250304152917.3407080-7-imre.deak@intel.com commit 29c09cf200f736138707857696d1f6db2db0299b Author: Imre Deak Date: Wed Mar 5 13:48:20 2025 +0200 drm/i915/dp: Queue a link check after link training is complete After link training - both in case of a passing and failing LT result - a work is scheduled to check the link state. This check should take place after the link training is completed by disabling the link training pattern and setting intel_dp::link_trained=true. Atm, the work is scheduled before these steps, which may result in checking the link state too early (and thus not retraining the link as expected). Fix the above by scheduling the link check work after link training is complete. v2: - Add MAX_SEQ_TRAIN_FAILURES instead of open-coding it. (Jani) Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250305114820.3523077-2-imre.deak@intel.com commit 35021b5b15de0c4eceecda9e2dadab2e5e56b7e2 Author: Imre Deak Date: Tue Mar 4 17:29:15 2025 +0200 drm/i915/dp: Fix link training interrupted by a short HPD pulse During Display Port link training the handling of HPD pulses should be prevented, as that handling can interfere with the link training: - Accessing DPCD registers outside the range of link training registers are not allowed by the Standard (see DP Standard v2.1, 3.5.2.16.1, 3.6.6.1). The pulse handler reads the DPRX capability registers, which are outside of the allowed range. - Switching of the LTTPR transparent/non-transparent mode may reset the LTTPRs on the link, thus aborting any ongoing link training. The pulse handler does set the LTTPR mode, thus it could unexpectedly abort the ongoing link training. Block/unblock the HPD pulse handling for the duration of the link training to prevent the above DPCD register accesses / LTTPR mode change. Apart from the above scenarios, there are other ways a non-link training DPCD register could be accessed during link training: via the DRM AUX device node, or via DPCD register probing (as performed by drm_dp_dpcd_probe()). These will be addressed by a follow-up change. v2: Rebase on the intel_hpd_suspend/resume -> intel_hpd_block/unblock() rename change. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250304152917.3407080-5-imre.deak@intel.com commit 0d77a3e0ea90a7ee25755a94694cdfd822c9db6b Author: Imre Deak Date: Wed Mar 5 13:48:19 2025 +0200 drm/i915/hpd: Add support for blocking the IRQ handling on an HPD pin Add support for blocking the IRQ handling on the HPD pin of a given encoder, handling IRQs that arrived while in the blocked state after unblocking the IRQ handling. This will be used by a follow-up change, which blocks/unblocks the IRQ handling around DP link training. This is similar to the intel_hpd_disable/enable() functionality, by also handling encoders/ports with a pulse handler (i.e. also blocking/unblocking the short/long pulse handling) and handling the IRQs arrived in the blocked state after the handling is unblocked (vs. just dropping such IRQs). v2: - Handle encoders without a port assigned to them. - Fix clearing IRQs from intel_hotplug::short_port_mask. v3: - Rename intel_hpd_suspend/resume() to intel_hpd_block/unblock(). (Jani) - Refer to HPD pins as hpd_pin vs. hpd. - Flush dig_port_work in intel_hpd_block() if any encoder using the HPD pin has a pulse handler. v4: - Fix hpd_pin_has_pulse(), checking the encoder's HPD pin. v5: - Rebase on port->hpd_pin tracking. (Ville) v6: (Jani) - Add hpd_pin_is_blocked() helper. - Use the hpd_pin_mask term for a mask of pins instead of hpd_pins. - Prevent decrementing a 0 refcount in unblock_hpd_pin(). Cc: Jani Nikula Cc: Ville Syrjälä Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250305114820.3523077-1-imre.deak@intel.com commit 4b16619608ff14338b6001acb810506079c49749 Author: Imre Deak Date: Tue Mar 4 17:29:13 2025 +0200 drm/i915/hpd: Let an HPD pin be in the disabled state when handling missed IRQs After suspending and resuming the detection on connectors, HPD IRQs that arrived while the detection was suspended, are handled by scheduling the intel_hotplug::hotplug work for them. All HPD pins must be at this point in either the HPD_ENABLED (set for all pins during driver loading/system resuming) or HPD_MARK_DISABLED (set by IRQ storm detection) state: the HPD_DISABLED state for a pin can be set only from the HPD_MARK_DISABLED state by the hotplug work after a storm detection (enabling polling on the given pin/connector), however the hotplug work won't be scheduled while the detection is suspended. A follow-up change will add support for blocking the HPD IRQ handling on a given HPD pin (without disabling the IRQ generation on it), after which it becomes possible to see a pin in the HPD_DISABLED state when unblocking the IRQ handling (since the blocking could've happened for an already disabled pin). Adjust queue_work_for_missed_irqs() accordingly, so that this function can be reused for unblocking the IRQ handling. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250304152917.3407080-3-imre.deak@intel.com commit 9e75b6ef407fee5d4ed8021cd7ddd9d6a8f7b0e8 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:37 2025 -0500 Documentation: Update the todo Update the Documentation to be more precise. v2: Update for clarity v3: Further details in Todo Cc: Thomas Zimmermann Signed-off-by: Anusha Srivatsa Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/640856/?series=144073&rev=5 commit 67c4ea8267cf015653610278e0dc36c58e9a7363 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:35 2025 -0500 drm/sti: move to devm_platform_ioremap_resource() usage Replace platform_get_resource/_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byname(pdev,mem,name); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource_byname(pdev,name); and @rule_2@ identifier res; expression ioremap; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource(pdev,0); v2: Fix compilation error. v3: Handle returns properly since the new API return error pointers and not NULL Cc: Raphael Gallais-Pou Cc: Alain Volmat Reviewed-by: Maxime Ripard (v2) Acked-by: Raphael Gallais-Pou (v2) Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/640854/?series=144073&rev=5 commit 92b8f062a620b1231cc7aef06be871b88b771123 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:34 2025 -0500 drm/sprd: move to devm_platform_ioremap_resource() usage Replace platform_get_resource + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_2@ identifier res; expression ioremap; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource(pdev,0); v2: Address the return handling properly since the new API returns error pointers and not NULL. Cc: Chunyan Zhang Cc: Dmitry Baryshkov Signed-off-by: Anusha Srivatsa Reviewed-by: Chunyan Zhang (v1) Reviewed-by: Maxime Ripard (v1) Link: https://patchwork.freedesktop.org/patch/640854/?series=144073&rev=5 commit 3282422bf251db541fe07c548ca304130d37d754 Author: Keisuke Nishimura Date: Tue Feb 25 15:52:23 2025 +0100 drm/vmwgfx: Add error path for xa_store in vmw_bo_add_detached_resource The xa_store() may fail due to memory allocation failure because there is no guarantee that the index is already used. This fix introduces new paths to handle the error. This patch also aligns the order of function calls by calling vmw_bo_add_detached_resource() before ttm_prime_object_init() in order to allow consistent error handling. Fixes: d6667f0ddf46 ("drm/vmwgfx: Fix handling of dumb buffers") Signed-off-by: Keisuke Nishimura Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20250225145223.34773-1-keisuke.nishimura@inria.fr commit 0039a3b35b10d9c15d3d26320532ab56cc566750 Author: Ian Forbes Date: Fri Feb 28 14:06:33 2025 -0600 drm/vmwgfx: Add seqno waiter for sync_files Because sync_files are passive waiters they do not participate in the processing of fences like the traditional vmw_fence_wait IOCTL. If userspace exclusively uses sync_files for synchronization then nothing in the kernel actually processes fence updates as interrupts for fences are masked and ignored if the kernel does not indicate to the SVGA device that there are active waiters. This oversight results in a bug where the entire GUI can freeze waiting on a sync_file that will never be signalled as we've masked the interrupts to signal its completion. This bug is incredibly racy as any process which interacts with the fencing code via the 3D stack can process the stuck fences on behalf of the stuck process causing it to run again. Even a simple app like eglinfo is enough to resume the stuck process. Usually this bug is seen at a login screen like GDM because there are no other 3D apps running. By adding a seqno waiter we re-enable interrupt based processing of the dma_fences associated with the sync_file which is signalled as part of a dma_fence_callback. This has likely been broken since it was initially added to the kernel in 2017 but has gone unnoticed until mutter recently started using sync_files heavily over the course of 2024 as part of their explicit sync support. Fixes: c906965dee22 ("drm/vmwgfx: Add export fence to file descriptor support") Signed-off-by: Ian Forbes Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20250228200633.642417-1-ian.forbes@broadcom.com commit 171e3a45f42593b74434d740936d1d0dc80ed332 Author: Zack Rusin Date: Fri Mar 7 07:57:39 2025 -0500 drm/vmwgfx: Bump the minor version Bump the minor version of vmwgfx in order to detect releases where the cursor issues have been fixed. Cursors created with dumb buffer were broken on vmwgfx. Userspace (e.g. kwin) has workarounds for those issues and often disables hardware cursors on vmwgfx. This allows enabling hardware cursors on vmwgfx again. Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20250307125836.3877138-3-zack.rusin@broadcom.com commit 965544150d1cadf0e8f5bb6c13c19697e46e1429 Author: Zack Rusin Date: Fri Mar 7 07:57:38 2025 -0500 drm/vmwgfx: Refactor cursor handling Refactor cursor handling to make the code maintainable again. Over the last 12 years the svga device improved support for virtualized cursors and at the same time the drm interfaces evolved quite a bit from pre-atomic to current atomic ones. vmwgfx only added new code over the years, instead of adjusting/refactoring the paths. Export the cursor plane handling to its own file. Remove special handling of the legacy cursor support to make it fit within the global cursor plane mechanism. Finally redo dirty tracking because memcmp never worked correctly resulting in the cursor not being properly updated in the guest. Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20250307125836.3877138-2-zack.rusin@broadcom.com commit 8da8aecf1f2d89c2b8188bcf7aa252ec146ddd12 Author: Xin Wang Date: Mon Mar 3 08:49:41 2025 +0800 drm/xe: remove redundant check in xe_vm_create_ioctl() The check for args->extensions is repeated twice in xe_vm_create_ioctl(). This commit removes the redundant check to streamline the code. Fixes: 7224788f6756 ("drm/xe: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension") Cc: Rodrigo Vivi Signed-off-by: Xin Wang Reviewed-by: Tejas Upadhyay Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20250303004942.951699-1-x.wang@intel.com Signed-off-by: Rodrigo Vivi commit 3b545b216cd1bcc33fb4b826fbfb517f1d8a3a93 Author: Matt Roper Date: Fri Mar 7 11:07:55 2025 -0800 drm/xe/xe3: Recognize 3DSTATE_COARSE_PIXEL in LRC dumps Xe3 adds a new 3DSTATE_COARSE_PIXEL state instruction as part of the render engine LRC. Ensure we can recognize and report this properly in the LRC dumps. Bspec: 65182, 73415 Reviewed-by: Sai Teja Pottumuttu Link: https://patchwork.freedesktop.org/patch/msgid/20250307190754.678376-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper commit 9f1e253d789649745db33a205969169033f078c9 Author: Imre Deak Date: Tue Mar 4 17:29:12 2025 +0200 drm/i915/hpd: Track HPD pins instead of ports for HPD pulse events Track the HPD pin instead of the corresponding encoder ports for pending short/long HPD pulse events. This is how the pending hotplug events are tracked and there is no reason for tracking the pulse events differently. After this change intel_hpd_trigger_irq() will set the short pulse event pending for all encoders using the given HPD pin. This doesn't change the behavior, as atm in case of multiple (2) encoders sharing the same pin only one will have a pulse handler, so for other encoders without a pulse handler the event is ignored. Also setting the pulse event pending for all encoders using the HPD pin is what happens after an actual HPD IRQ, the effect of calling intel_hpd_trigger_irq() should match this. In a following change this also makes it simpler to block the handling of a short/long pulse event on an HPD pin for all the encoders using this HPD pin. Suggested-by: Ville Syrjälä Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250304152917.3407080-2-imre.deak@intel.com commit b4b05e53b550a886b4754b87fd0dd2b304579e85 Author: Rodrigo Vivi Date: Fri Mar 7 11:03:07 2025 -0500 drm/xe/guc_pc: Retry and wait longer for GuC PC start In a rare situation of thermal limit during resume, GuC can be slow and run into delays like this: xe 0000:00:02.0: [drm] GT1: excessive init time: 667ms! \ [status = 0x8002F034, timeouts = 0] xe 0000:00:02.0: [drm] GT1: excessive init time: \ [freq = 100MHz (req = 800MHz), before = 100MHz, \ perf_limit_reasons = 0x1C001000] xe 0000:00:02.0: [drm] *ERROR* GT1: GuC PC Start failed ------------[ cut here ]------------ xe 0000:00:02.0: [drm] GT1: Failed to start GuC PC: -EIO When this happens, it will block entirely the GPU to be used. So, let's try and with a huge timeout in the hope it comes back. Also, let's collect some information on how long it is usually taking on situations like this, so perhaps the time can be tuned later. Cc: Vinay Belgaumkar Cc: Jonathan Cavitt Cc: John Harrison Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20250307160307.1093391-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit c36e3442ea1c4c63f9876486dd9091487a77c5f2 Author: Tvrtko Ursulin Date: Fri Mar 7 11:14:02 2025 +0000 drm/xe: Use correct type width for alignment in fb pinning code Plane->min_alignment returns an unsigned int so lets use that in the whole relevant call chain. Signed-off-by: Tvrtko Ursulin Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250307111402.26577-5-tvrtko.ursulin@igalia.com Signed-off-by: Rodrigo Vivi commit 52a237e8d6c4abcda40c71268ee6cec75aa62799 Author: Tvrtko Ursulin Date: Fri Mar 7 11:14:01 2025 +0000 drm/xe: Pass flags directly to emit_flush_imm_ggtt This is more readable than the nameless booleans and will also come handy later. Signed-off-by: Tvrtko Ursulin Reviewed-by: Matt Roper Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250307111402.26577-4-tvrtko.ursulin@igalia.com Signed-off-by: Rodrigo Vivi commit 08ea901d0b8f6ea261d9936e03fa690540af0126 Author: Tvrtko Ursulin Date: Fri Mar 7 11:14:00 2025 +0000 drm/xe: Fix ring flush invalidation Emit_flush_invalidate() is incorrectly marking the write to LRC_PPHWSP as a GGTT write and also writing an atypical ~0 dword as the payload. Fix it. While at it drop the unused flags argument. Signed-off-by: Tvrtko Ursulin Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20250307111402.26577-3-tvrtko.ursulin@igalia.com Signed-off-by: Rodrigo Vivi commit 1182bc74b39ba3d124b544dab22d5672fae54b67 Author: Tvrtko Ursulin Date: Fri Mar 7 11:13:59 2025 +0000 drm/xe: Fix MOCS debugfs LNCF readout With only XE_FW_GT taken LNCF registers read back as all zeroes, leading to a wild goose chase trying to figure out why is register programming incorrect. Fix it by grabbing XE_FORCEWAKE_ALL for affected platforms. Signed-off-by: Tvrtko Ursulin Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250307111402.26577-2-tvrtko.ursulin@igalia.com Signed-off-by: Rodrigo Vivi commit d945cc876277851053c0cf37927c8d7bd9d0e880 Author: Rodrigo Vivi Date: Fri Mar 7 19:56:35 2025 -0500 drm/xe/pm: Temporarily disable D3Cold on BMG Currently, many instability cases related to D3Cold -> D0 transition on BMG are under investigation. Among them some bad cases where the device is lost after 1 to 3 transitions from D3Cold to D0 on the runtime pm, with pcieport upstream bridge port link retrain failure. In other cases, it works fine, but with some sudden random memory corruptions after D3cold, that could be 0xffff missed ack on GT forcewake or GuC reload related failures. In some other cases though, D3Cold -> D0 works pretty reliably. It looks like it is a combination of GPU cards and Host boards at this point. So, there is no possible/available quirk at this time. This patch disables the D3Cold by default on BMG by reducing the vram_d3cold_threshold to 0. Users and developers who wants to enable it are still able to via $ echo 300 > /sys/bus/pci/devices//vram_d3cold_threshold Fixes: 3adcf970dc7e ("drm/xe/bmg: Drop force_probe requirement") Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4037 Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4395 Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4396 Cc: Karthik Poosa Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250308005636.1475420-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 8aa8c2d4214e1771c32101d70740002662d31bb7 Author: Lucas De Marchi Date: Thu Mar 6 20:00:05 2025 -0800 drm/xe/rtp: Drop sentinels from arg to xe_rtp_process_to_sr() There's a mismatch on API: while xe_rtp_process_to_sr() processes entries until an entry without name, the active tracking with xe_rtp_process_ctx_enable_active_tracking() needs to use the number of elements. The number of elements is taken everywhere using ARRAY_SIZE(), but that will have one entry too many. This leads to the following warning, as reported by lkp: drivers/gpu/drm/xe/xe_tuning.c: In function 'xe_tuning_dump': >> include/drm/drm_print.h:228:31: warning: '%s' directive argument is null [-Wformat-overflow=] 228 | drm_printf((printer), "%.*s" fmt, (indent), "\t\t\t\t\tX", ##__VA_ARGS__) | ^~~~~~ drivers/gpu/drm/xe/xe_tuning.c:226:17: note: in expansion of macro 'drm_printf_indent' 226 | drm_printf_indent(p, 1, "%s\n", engine_tunings[idx].name); | ^~~~~~~~~~~~~~~~~ That's because it will still process the last entry when tracking the active tunings. The same issue exists in the WAs. Change xe_rtp_process_to_sr() to also take the number of elements so the empty entry can be removed and the warning should go away. Fixing on the active-tracking side would more fragile as the it would need a `- 1` everywhere and continue to use a different approach for number of elements. Aside from the warning, it's a non-issue as there would always be enough bits allocated and the last entry would never be active since xe_rtp_process_to_sr() stops on the sentinel. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503021906.P2MwAvyK-lkp@intel.com/ Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20250306-fix-print-warning-v1-1-979c3dc03c0d@intel.com Signed-off-by: Lucas De Marchi commit eb4796d8625902adfd0bc7226306afcde617f7c9 Author: Gustavo Sousa Date: Thu Feb 27 16:14:25 2025 -0300 drm/i915/xe3lpd: Map POWER_DOMAIN_AUDIO_PLAYBACK to DC_off In Xe3_LPD, display audio has the core audio logic located in PG0 and per-transcoder logic in the same power well that provides power for the transcoder [1]. For stuff like audio device enumeration, we need to ensure that PG0 is turned on. For playback, we additionally need the transcoder's power well to be enabled. That essentially means that, for audio playback, there isn't a special power well that needs to be enabled, because modeset sequences will ensure that the required power wells are enabled. That said, there might be cases where PG0 could be disabled due to display entering DC6 while the audio driver tries to interact with the graphics driver for stuff like audio device enumeration. We recently hit that kind of scenario, where "aplay -l" was being used to enumerate audio devices on a PTL machine with PSR enabled and no external displays attached. Since intel_audio_component_get_power() uses POWER_DOMAIN_AUDIO_PLAYBACK, make sure to map that power domain to DC_off power well, so that we disable dynamic DC states (which includes DC6) while the audio driver needs display audio power. [1] The core-audio vs per-transcoder logic split is not really new in Xe3_LPD. This is also true for previous display generations. We need to figure out the correct version where this split happened so that we can apply fixes in the current power domain mapping. Bspec: 72519 Reviewed-by: Kai Vehmanen Link: https://patchwork.freedesktop.org/patch/msgid/20250227-xe3lpd-power-domain-audio-playback-v1-1-5765f21da977@intel.com Signed-off-by: Gustavo Sousa commit 89f8d10f981ed1236eeb9705510b877c82cff9a1 Author: Lucas De Marchi Date: Thu Mar 6 14:08:03 2025 -0800 drm/xe: Remove GEN11 prefixes from documentation The registers are already named without the GEN11 prefix. Do the same in the memirq documentation. Reviewed-by: Jonathan Cavitt Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250306-drop-gen-v1-2-03683e56006a@intel.com Signed-off-by: Lucas De Marchi commit a30d96ea656c926f908391dcd67fb6b5e285b1a3 Author: Lucas De Marchi Date: Thu Mar 6 14:08:02 2025 -0800 drm/xe: Remove pointless gen11 assertions xe driver doesn't really work in gen11. Stop asserting for >= 11, as it would likely explode anyway if tried on such platforms. Reviewed-by: Jonathan Cavitt Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250306-drop-gen-v1-1-03683e56006a@intel.com Signed-off-by: Lucas De Marchi commit 6efda95a66c5651bb30c948d876b7239df9ec384 Author: Vignesh Raman Date: Wed Feb 5 19:17:47 2025 +0530 MAINTAINERS: Update drm/ci maintainers Update drm/ci maintainer entries: * Add myself as drm/ci maintainer. * Update Helen's email address. Signed-off-by: Vignesh Raman Acked-by: Helen Koike Acked-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20250205134811.2002718-1-vignesh.raman@collabora.com commit 57145afa3326947154c3a890b1118774b55212a0 Author: Miguel Ojeda Date: Mon Mar 3 10:32:42 2025 +0100 drm/panic: clean Clippy warning Clippy warns: error: manual implementation of an assign operation --> drivers/gpu/drm/drm_panic_qr.rs:418:25 | 418 | self.carry = self.carry % pow; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.carry %= pow` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern Thus clean it up. Fixes: dbed4a797e00 ("drm/panic: Better binary encoding in QR code") Signed-off-by: Miguel Ojeda Reviewed-by: Alice Ryhl Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250303093242.1011790-1-ojeda@kernel.org commit 12ec4f30fcab97747f9df04c0078dbacceb0900e Author: Dr. David Alan Gilbert Date: Sat Mar 8 23:44:28 2025 +0000 drm/gma500: Remove unused psb_mmu_virtual_to_pfn psb_mmu_virtual_to_pfn() was added in 2011 by commit 8c8f1c958ab5 ("gma500: introduce the GTT and MMU handling logic") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250308234428.255164-1-linux@treblig.org commit 629067565c8fa0cff7b4ac3dbd18e21e0d185c32 Author: Dr. David Alan Gilbert Date: Sat Mar 8 23:43:56 2025 +0000 drm/gma500/psb_intel_modes: Remove unused psb_intel_ddc_probe psb_intel_ddc_probe() was added in 2011 by commit 89c78134cc54 ("gma500: Add Poulsbo support") but has remained unused (probably because drm_get_edid is used instead). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250308234356.255114-1-linux@treblig.org commit 4da1fb61e02a783fdd7eb725ea03d897b8ef19ea Author: Lucas De Marchi Date: Fri Mar 7 17:14:28 2025 -0800 drm/gpusvm: Fix kernel-doc Due to wrong `.. kernel-doc` directive in Documentation/gpu/rfc/gpusvm.rst the documentation was actually not parsing anything from drivers/gpu/drm/drm_gpusvm.c. This fixes the kernel-doc include and all warnings/errors created when doing so. Cc: Simona Vetter Cc: Dave Airlie Cc: Christian König Cc: dri-devel@lists.freedesktop.org Cc: Matthew Brost Cc: Thomas Hellström Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/intel-xe/20250307195239.57abcd2d@canb.auug.org.au/ Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory") Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250307-fix-svm-kerneldoc-v2-1-03c74b199620@intel.com Signed-off-by: Lucas De Marchi commit ce468a7b63f1e4e2b09f951ca0a7c8d402fed746 Author: Charles Han Date: Wed Mar 5 18:21:07 2025 +0800 drm/vc4: plane: fix inconsistent indenting warning Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/vc4/vc4_plane.c:2083 vc6_plane_mode_set() warn: inconsistent indenting Signed-off-by: Charles Han Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20250305102107.2595-1-hanchunchao@inspur.com commit a738fa9105ac2897701ba4067c33e85faa27d1e2 Author: Zhi Wang Date: Thu Feb 27 01:35:54 2025 +0000 drm/nouveau/nvkm: introduce new GSP reply policy NVKM_GSP_RPC_REPLY_POLL Some GSP RPC commands need a new reply policy: "caller don't care about the message content but want to make sure a reply is received". To support this case, a new reply policy is introduced. NV_VGPU_MSG_FUNCTION_ALLOC_MEMORY is a large GSP RPC command. The actual required policy is NVKM_GSP_RPC_REPLY_POLL. This can be observed from the dump of the GSP message queue. After the large GSP RPC command is issued, GSP will write only an empty RPC header in the queue as the reply. Without this change, the policy "receiving the entire message" is used for NV_VGPU_MSG_FUNCTION_ALLOC_MEMORY. This causes the timeout of receiving the returned GSP message in the suspend/resume path. Introduce the new reply policy NVKM_GSP_RPC_REPLY_POLL, which waits for the returned GSP message but discards it for the caller. Use the new policy NVKM_GSP_RPC_REPLY_POLL on the GSP RPC command NV_VGPU_MSG_FUNCTION_ALLOC_MEMORY. Fixes: 50f290053d79 ("drm/nouveau: support handling the return of large GSP message") Cc: Danilo Krummrich Cc: Alexandre Courbot Tested-by: Ben Skeggs Signed-off-by: Zhi Wang Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250227013554.8269-3-zhiw@nvidia.com commit 4570355f8eaa476164cfb7ca959fdbf0cebbc9eb Author: Zhi Wang Date: Thu Feb 27 01:35:53 2025 +0000 drm/nouveau/nvkm: factor out current GSP RPC command policies There can be multiple cases of handling the GSP RPC messages, which are the reply of GSP RPC commands according to the requirement of the callers and the nature of the GSP RPC commands. The current supported reply policies are "callers don't care" and "receive the entire message" according to the requirement of the callers. To introduce a new policy, factor out the current RPC command reply polices. Also, centralize the handling of the reply in a single function. Factor out NVKM_GSP_RPC_REPLY_NOWAIT as "callers don't care" and NVKM_GSP_RPC_REPLY_RECV as "receive the entire message". Introduce a kernel doc to document the policies. Factor out r535_gsp_rpc_handle_reply(). No functional change is intended for small GSP RPC commands. For large GSP commands, the caller decides the policy of how to handle the returned GSP RPC message. Cc: Ben Skeggs Cc: Alexandre Courbot Signed-off-by: Zhi Wang Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250227013554.8269-2-zhiw@nvidia.com commit 70e5043ba85eae199b232e39921abd706b5c1fa4 Author: Thomas Hellström Date: Fri Mar 7 11:01:09 2025 +0100 drm/xe/userptr: Fix an incorrect assert The assert incorrectly checks the total length processed which can in fact be greater than the number of pages. Fix. Fixes: ea3e66d280ce ("drm/xe/hmm: Don't dereference struct page pointers without notifier lock") Cc: Matthew Auld Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20250307100109.21397-1-thomas.hellstrom@linux.intel.com commit 801733b4757ccef4dfce046639cf3ddeae7253b1 Author: Dzmitry Sankouski Date: Tue Feb 25 19:39:00 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add touchscreen support Add support for samsung,s6sy761 touchscreen. Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-9-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 3a4600448befafe598f30d7e30aa89cef8226519 Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:59 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add display PMIC Add support for s2dos05 display / touchscreen PMIC Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-8-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 7a88a931d09564b3ae84e7abd5cd412af1dd5280 Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:58 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC Add support for max77705 MFD device. Supported sub-devices: charger, fuelgauge, haptic, led Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-7-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit b58e67cd607e43b56f7cd509bdef0577d4658f10 Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:57 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: add gpio keys Add support for phone buttons. Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-6-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit fb5fce873b952f8b1c5f7edcabcc8611ef45ea7a Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:56 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios Starqltechn has 2 reserved gpio ranges <27 4>, <85 4>. <27 4> is spi for eSE(embedded Secure Element). <85 4> is spi for fingerprint. Remove excess reserved gpio regions. Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn") Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-5-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit cba1dd3d851ebc1b6c5ae4000208a9753320694b Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:55 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: refactor node order Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn") Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-4-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 242e4126ee007b95765c21a9d74651fdcf221f2b Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:54 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake Usb regulator was wrongly pointed to vreg_l1a_0p875. However, on starqltechn it's powered from vreg_l5a_0p8. Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn") Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-3-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit 2d3dd4b237638853b8a99353401ab8d88a6afb6c Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:53 2025 +0300 arm64: dts: qcom: sdm845-starqltechn: remove wifi Starqltechn has broadcom chip for wifi, so sdm845 wifi part can be disabled. Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn") Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn") Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-2-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit eb8b09e61bd2419263a15c37b068982be620eab6 Author: Dzmitry Sankouski Date: Tue Feb 25 19:38:52 2025 +0300 arm64: dts: qcom: sdm845: enable gmu Leave gmu enabled, because it's only probed when GPU is. Reviewed-by: Konrad Dybcio Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250225-starqltechn_integration_upstream-v9-1-a5d80375cb66@gmail.com Signed-off-by: Bjorn Andersson commit fc858ddf9c68696537cec530d2d48bf6ed06ea92 Author: Rodrigo Vivi Date: Thu Mar 6 17:06:43 2025 -0500 drm/xe/guc_pc: Remove duplicated pc_start call xe_guc_pc_start() was getting called from both xe_uc_init_hw() and from xe_guc_start(). But both are called from do_gt_restart() and only xe_uc_init_hw() is called at initialization. So, let's remove the duplication in the regular gt_restart path. The only place where xe_guc_pc_start() won't get called now is on the gt_reset failure path. However, if gt_reset has failed, it is really unlikely that the PC start will work or is desired. Cc: Vinay Belgaumkar Reviewed-by: Jonathan Cavitt Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20250306220643.1014049-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 2c7aafc05c8330be4c5f0092b79843507a5e1023 Author: José Expósito Date: Tue Feb 18 11:12:14 2025 +0100 drm/vkms: Allow to attach connectors and encoders Add a list of possible encoders to the connector configuration and helpers to attach and detach them. Now that the default configuration has its connector and encoder correctly, configure the output following the configuration. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-15-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit da38c72018e28b08197975cec7ffd5e07f189a9c Author: José Expósito Date: Tue Feb 18 11:12:13 2025 +0100 drm/vkms: Allow to configure multiple connectors Add a list of connectors to vkms_config and helper functions to add and remove as many connectors as wanted. For backwards compatibility, add one enabled connector to the default configuration. A future patch will allow to attach connectors and encoders, but for the moment there are no changes in the way the output is configured. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-14-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit b8776fc9b2863c55193f66e1146a89bbccd2b4e0 Author: José Expósito Date: Tue Feb 18 11:12:12 2025 +0100 drm/vkms: Allow to attach encoders and CRTCs Add a list of possible CRTCs to the encoder configuration and helpers to attach and detach them. Now that the default configuration has its encoder and CRTC correctly attached, configure the output following the configuration. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-13-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit f60a183dc9105e3dc5120d5aa03b294d182965fb Author: José Expósito Date: Tue Feb 18 11:12:11 2025 +0100 drm/vkms: Allow to configure multiple encoders Add a list of encoders to vkms_config and helper functions to add and remove as many encoders as wanted. For backwards compatibility, add one encoder to the default configuration. A future patch will allow to attach encoders and CRTCs, but for the moment there are no changes in the way the output is configured. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-12-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit c204bf652a5b9e03bbd420199a326f02c2e5cb65 Author: José Expósito Date: Tue Feb 18 11:12:10 2025 +0100 drm/vkms: Allow to attach planes and CRTCs Add a list of possible CRTCs to the plane configuration and helpers to attach, detach and get the primary and cursor planes attached to a CRTC. Now that the default configuration has its planes and CRTC correctly attached, configure the output following the configuration. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-11-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 600df32dac40ad4b1069615a970063f0b15abfda Author: José Expósito Date: Tue Feb 18 11:12:09 2025 +0100 drm/vkms: Allow to configure multiple CRTCs Add a list of CRTCs to vkms_config and helper functions to add and remove as many CRTCs as wanted. For backwards compatibility, add one CRTC to the default configuration. A future patch will allow to attach planes and CRTCs, but for the moment there are no changes in the way the output is configured. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-10-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit bc5b0d5dccf3c842872d63b937a1bb2a6e93d5b0 Author: José Expósito Date: Tue Feb 18 11:12:08 2025 +0100 drm/vkms: Allow to configure multiple planes Add a list of planes to vkms_config and create as many planes as configured during output initialization. For backwards compatibility, add one primary plane and, if configured, one cursor plane and NUM_OVERLAY_PLANES planes to the default configuration. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-9-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit d1386d721d19f8127c2edd43601693e2856db8dd Author: Louis Chauvet Date: Tue Feb 18 11:12:07 2025 +0100 drm/vkms: Add a validation function for VKMS configuration As the configuration will be used by userspace, add a validator to avoid creating a broken DRM device. For the moment, the function always returns true, but rules will be added in future patches. Reviewed-by: Louis Chauvet Signed-off-by: Louis Chauvet Co-developed-by: José Expósito Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-8-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 969a3a4e2ba30138f065dbf8904798a80a528ca5 Author: José Expósito Date: Tue Feb 18 11:12:06 2025 +0100 drm/vkms: Set device name from vkms_config In order to be able to create multiple devices, the device name needs to be unique. Allow to set it in the VKMS configuration. Reviewed-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-7-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 8b059b0c3f721373f45c9d72d0481345e765be86 Author: José Expósito Date: Tue Feb 18 11:12:05 2025 +0100 drm/vkms: Move default_config creation to its own function Extract the initialization of the default configuration to a function. Refactor, no functional changes. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-6-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit d3ae1e394bdc267a1699f7ac2ff3d3a990e791b9 Author: José Expósito Date: Tue Feb 18 11:12:04 2025 +0100 drm/vkms: Extract vkms_config header Creating a new vkms_config structure will be more complex once we start adding more options. Extract the vkms_config structure to its own header and source files and add functions to create and delete a vkms_config and to initialize debugfs. Refactor, no functional changes. Reviewed-by: Louis Chauvet Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-5-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 5b5a56d9a2d64e8395dfbaddecb3e5149d7ecae8 Author: José Expósito Date: Tue Feb 18 11:12:03 2025 +0100 drm/vkms: Add KUnit test scaffolding Add the required boilerplate to start creating KUnit test. To run the tests: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig=drivers/gpu/drm/vkms/tests Reviewed-by: Louis Chauvet Co-developed-by: Arthur Grillo Signed-off-by: Arthur Grillo Co-developed-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-4-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit a833c5880a5fbecd71f60efca6ad641e51d0d29e Author: José Expósito Date: Tue Feb 18 11:12:02 2025 +0100 drm/vkms: Create vkms_connector struct Create a structure wrapping the drm_connector. Reviewed-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-3-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 6fdbc11502b2fd47206b833ded2e407c84b6658c Author: José Expósito Date: Tue Feb 18 11:12:01 2025 +0100 drm/vkms: Extract vkms_connector header Up until now, the logic to manage connectors was in vkms_output.c. Since more options will be added to connectors in the future, extract the code to its own file. Refactor, no functional changes. Reviewed-by: Louis Chauvet Signed-off-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-2-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard commit 2d4d775d11d314a505283cf31ae83460ef26ec70 Author: Charles Han Date: Wed Mar 5 18:25:40 2025 +0800 drm: pl111: fix inconsistent indenting warning Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/pl111/pl111_versatile.c:504 pl111_versatile_init() warn: inconsistent indenting Signed-off-by: Charles Han Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20250305102540.2815-1-hanchunchao@inspur.com commit 9249a900fee4d7bdbe0dd183efbea09fbc8ce409 Author: Dr. David Alan Gilbert Date: Thu Mar 6 15:51:55 2025 +0000 drm/gma500: Remove unused mrst_clock_funcs The mrst_clock_funcs const was added in 2013 by commit ac6113ebb70d ("drm/gma500/mrst: Add SDVO clock calculation") and commented as 'Not used yet'. It's not been used since, so remove it. The helper functions it points to are still used elsewhere. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250306155155.212599-1-linux@treblig.org commit 8e8d76f62329127b31c64a034b052fb9e30e92af Author: Tejas Upadhyay Date: Thu Mar 6 18:42:11 2025 +0530 drm/xe: Release guc ids before cancelling work A GT resets can be occurring in parallel while cancelling work in async call which can requeue these workers. to avoid that, lets first release guc ids and then cancel work so they don't requeued. Fixes: 8ae8a2e8dd21 ("drm/xe: Long running job update") Fixes: 18fbd567e75f ("drm/xe: cancel pending job timer before freeing scheduler") Signed-off-by: Tejas Upadhyay Suggested-by: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250306131211.975503-1-tejas.upadhyay@intel.com Signed-off-by: Lucas De Marchi commit 5f7a654b5ed2828e0da8e8331f236854c70f0893 Author: Charles Han Date: Wed Mar 5 18:30:42 2025 +0800 drm/imx: legacy-bridge: fix inconsistent indenting warning Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c:79 devm_imx_drm_legacy_bridge() warn: inconsistent indenting Signed-off-by: Charles Han Reviewed-by: Liu Ying Signed-off-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20250305103042.3017-1-hanchunchao@inspur.com commit fc51acfca9ca2049e0f6bde0ca41f760e081c281 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:36 2025 -0500 drm/tegra: move to devm_platform_ioremap_resource() usage Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Thierry Reding Cc: Mikko Perttunen Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/640855/?series=144073&rev=5 commit 46babeac0e0856ca7d3c68a28328b55867922fe3 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:33 2025 -0500 drm/mxsfb: move to devm_platform_ioremap_resource() usage Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Marek Vasut Cc: Stefan Agner Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/640852/?series=144073&rev=5 commit 9da894756ee1c67c020a80f4037a8a20652337c6 Author: Anusha Srivatsa Date: Tue Mar 4 16:05:32 2025 -0500 drm/hisilicon: move to devm_platform_ioremap_resource() usage Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/640850/?series=144073&rev=5 commit 41668e792e4606882b67f4febb59672fe68c4e9e Author: Anusha Srivatsa Date: Tue Mar 4 16:05:31 2025 -0500 drm/fsl-dcu: move to devm_platform_ioremap_resource() usage Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Stefan Agner Cc: Alison Wang Reviewed-by: Maxime Ripard Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/640851/?series=144073&rev=5 commit fa0af721bd1f983c5c9c109815a154bd1cb29c75 Author: Christian König Date: Wed Jan 29 16:28:48 2025 +0100 drm/ttm: test private resv obj on release/destroy Test the fences in the private dma_resv object instead of the pointer to a potentially shared dma_resv object. This only matters for imported BOs with an SG table since those don't get their dma_resv pointer replaced on release. Signed-off-by: Christian König Signed-off-by: James Zhu Reviewed-by: James Zhu Tested-by: James Zhu Link: https://patchwork.freedesktop.org/patch/msgid/20250129152849.15777-1-christian.koenig@amd.com commit 2eeed61db4550171a32854e4d3fdf974b749c214 Author: Philipp Stanner Date: Wed Mar 5 14:05:52 2025 +0100 drm/sched: Update timedout_job()'s documentation drm_sched_backend_ops.timedout_job()'s documentation is outdated. It mentions the deprecated function drm_sched_resubmit_jobs(). Furthermore, it does not point out the important distinction between hardware and firmware schedulers. Since firmware schedulers typically only use one entity per scheduler, timeout handling is significantly more simple because the entity the faulted job came from can just be killed without affecting innocent processes. Update the documentation with that distinction and other details. Reformat the docstring to work to a unified style with the other handles. Acked-by: Danilo Krummrich Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250305130551.136682-5-phasta@kernel.org commit 72ebc18b34993777bd6473be36cd63f37b3574ba Author: Philipp Stanner Date: Wed Mar 5 14:05:51 2025 +0100 drm/sched: Document run_job() refcount hazard drm_sched_backend_ops.run_job() returns a dma_fence for the scheduler. That fence is signalled by the driver once the hardware completed the associated job. The scheduler does not increment the reference count on that fence, but implicitly expects to inherit this fence from run_job(). This is relatively subtle and prone to misunderstandings. This implies that, to keep a reference for itself, a driver needs to call dma_fence_get() in addition to dma_fence_init() in that callback. It's further complicated by the fact that the scheduler even decrements the refcount in drm_sched_run_job_work() since it created a new reference in drm_sched_fence_scheduled(). It does, however, still use its pointer to the fence after calling dma_fence_put() - which is safe because of the aforementioned new reference, but actually still violates the refcounting rules. Move the call to dma_fence_put() to the position behind the last usage of the fence. Suggested-by: Danilo Krummrich Signed-off-by: Philipp Stanner Reviewed-by: Danilo Krummrich Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250305130551.136682-4-phasta@kernel.org commit 87edca6261c1327977d86c16857e74f4fc7c3ae8 Author: Philipp Stanner Date: Wed Mar 5 14:05:50 2025 +0100 drm/sched: Adjust outdated docu for run_job() The documentation for drm_sched_backend_ops.run_job() mentions a certain function called drm_sched_job_recovery(). This function does not exist. What's actually meant is drm_sched_resubmit_jobs(), which is by now also deprecated. Furthermore, the scheduler expects to "inherit" a reference on the fence from the run_job() callback. This, so far, is also not documented. Remove the mention of the removed function. Discourage the behavior of drm_sched_backend_ops.run_job() being called multiple times for the same job. Document the necessity of incrementing the refcount in run_job(). Acked-by: Danilo Krummrich Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250305130551.136682-3-phasta@kernel.org commit b72f66f22c0e39ae6684c43fead774c13db24e73 Author: Christian König Date: Tue Feb 11 17:20:53 2025 +0100 dma-buf: drop caching of sg_tables That was purely for the transition from static to dynamic dma-buf handling and can be removed again now. Signed-off-by: Christian König Reviewed-by: Simona Vetter Reviewed-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-5-christian.koenig@amd.com commit de68b17d5d0716c9a02b8a6ffa34f47c8f2f7690 Author: Christian König Date: Tue Feb 11 15:26:16 2025 +0100 dma-buf: dma-buf: stop mapping sg_tables on attach v2 As a workaround to smoothly transit from static to dynamic DMA-buf handling we cached the sg_table on attach if dynamic handling mismatched between exporter and importer. Since Dmitry and Thomas cleaned that up and also documented the lock handling we can drop this workaround now. V2: implement Sima's comments Signed-off-by: Christian König Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-4-christian.koenig@amd.com commit 2ce07fea3cc8b866f7955a7ce1d62b0cc1f74819 Author: Christian König Date: Wed Sep 18 08:16:57 2024 +0200 dma-buf/dma-fence: remove unnecessary callbacks The fence_value_str and timeline_value_str callbacks were just an unnecessary abstraction in the SW sync implementation. The only caller of those callbacks already knew that the fence in questions is a timeline_fence. So print the values directly instead of using a redirection. Additional to that remove the implementations from virtgpu and vgem. As far as I can see those were never used in the first place. Signed-off-by: Christian König Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-3-christian.koenig@amd.com commit 2b2d7ca7ce25fbec8389e7d85e57742caa47c97d Author: Christian König Date: Tue Dec 10 10:08:42 2024 +0100 dma-buf: fix incorrect dma-fence documentation v2 There isn't much worse than documentation giving an incorrect advise. Grabbing a spinlock while interrupts are disabled usually means that you must also disable interrupts for all other uses of this spinlock. Otherwise really hard to debug issues can occur. So fix that invalid documentation. v2: use Dmitry's suggestion on the documentation Signed-off-by: Christian König Reviewed-by: Simona Vetter (v1) Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-2-christian.koenig@amd.com commit 49215915cc57e6d506e464df2ccc810f11babd26 Author: Abel Vesa Date: Tue Mar 4 12:57:49 2025 +0200 arm64: dts: qcom: x1e80100-t14s: Enable external DisplayPort support The Lenovo ThinkPad T14s Gen6 provides external DisplayPort on all 2 USB Type-C ports. Each one of this ports is connected to a dedicated DisplayPort controller. Due to support missing in the USB/DisplayPort combo PHY driver, the external DisplayPort is limited to 2 lanes. So enable the first and second DisplayPort controllers and limit their data lanes number to 2. Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250304-x1e80100-dts-crd-t14s-enable-typec-retimers-v6-4-e5a49fae4e94@linaro.org Signed-off-by: Bjorn Andersson commit b7e331d18cd012bf972269f676d292604e23ae5e Author: Abel Vesa Date: Tue Mar 4 12:57:48 2025 +0200 arm64: dts: qcom: x1e80100-t14s: Describe the Parade PS8830 retimers The Lenovo ThinkPad T14s Gen6 laptop comes with 3 Parade PS8830 retimers, one for each Type-C port. These handle the orientation and altmode switching and are controlled over I2C. In the connection chain, they sit between the USB/DisplayPort combo PHY and the Type-C connector. Describe the retimers and all gpio controlled voltage regulators used by each retimer. Also, modify the pmic glink graph to include the retimers in between the SuperSpeed/Sideband in endpoints and the QMP PHY out endpoints. Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250304-x1e80100-dts-crd-t14s-enable-typec-retimers-v6-3-e5a49fae4e94@linaro.org Signed-off-by: Bjorn Andersson commit d9ff9537baea7433f9f6479876b8f1ef4d822bc7 Author: Abel Vesa Date: Tue Mar 4 12:57:47 2025 +0200 arm64: dts: qcom: x1e80100-crd: Enable external DisplayPort support The X Elite CRD provides external DisplayPort on all 3 USB Type-C ports. Each one of this ports is connected to a dedicated DisplayPort controller. Due to support missing in the USB/DisplayPort combo PHY driver, the external DisplayPort is limited to 2 lanes. So enable all 3 remaining DisplayPort controllers and limit their data lanes number to 2. Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250304-x1e80100-dts-crd-t14s-enable-typec-retimers-v6-2-e5a49fae4e94@linaro.org Signed-off-by: Bjorn Andersson commit 9db543299ec0d765083dd9a0bdb15707b33f7d73 Author: Abel Vesa Date: Tue Mar 4 12:57:46 2025 +0200 arm64: dts: qcom: x1e80100-crd: Describe the Parade PS8830 retimers The X Elite CRD board comes with 3 Parade PS8830 retimers, one for each Type-C port. These handle the orientation and altmode switching and are controlled over I2C. In the connection chain, they sit between the USB/DisplayPort combo PHY and the Type-C connector. Describe the retimers and all gpio controlled voltage regulators used by each retimer. Also, modify the pmic glink graph to include the retimers in between the SuperSpeed/Sideband in endpoints and the QMP PHY out endpoints. Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20250304-x1e80100-dts-crd-t14s-enable-typec-retimers-v6-1-e5a49fae4e94@linaro.org Signed-off-by: Bjorn Andersson commit 0783c8b3c06b9cf16b5108d558e2faffb8c533b7 Author: Konrad Dybcio Date: Tue Mar 4 18:10:46 2025 +0100 arm64: dts: qcom: x1e80100-romulus: Keep L12B and L15B always on These regulators power some electronic components onboard. They're most likely kept online by other pieces of firmware, but you can never be sure enough. Fixes: 09d77be56093 ("arm64: dts: qcom: Add support for X1-based Surface Laptop 7 devices") Reported-by: Johan Hovold Signed-off-by: Konrad Dybcio Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20250304-topic-sl7_vregs_aon-v1-1-b2dc706e4157@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit aeb520ce520a2fc69e7d692a44f72da431769b0a Author: Neil Armstrong Date: Thu Feb 27 09:55:26 2025 +0100 arm64: dts: qcom: sm8650: add all 8 coresight ETE nodes Only CPU0 Embedded Trace Extension (ETE) was added, but there's one for all 8 CPUs, so add the missing ones. Fixes: 256e6937e48a ("arm64: dts: qcom: sm8650: Add coresight nodes") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250227-topic-sm8650-upstream-add-all-coresight-cpus-v3-1-48ae516be0d5@linaro.org Signed-off-by: Bjorn Andersson commit d09ab685a8f51ba412d37305ea62628a01cbea57 Author: Stephan Gerhold Date: Mon Feb 17 18:55:23 2025 +0100 arm64: dts: qcom: x1e80100-qcp: Add WiFi/BT pwrseq Add the WiFi/BT nodes for QCP and describe the regulators for the WCN7850 combo chip using the new power sequencing bindings. All voltages are derived from chained fixed regulators controlled using a single GPIO. The same setup also works for CRD (and likely most of the other X1E80100 laptops). However, unlike the QCP they use soldered or removable M.2 cards supplied by a single 3.3V fixed regulator. The other necessary voltages are then derived inside the M.2 card. Describing this properly requires new bindings, so this commit only adds QCP for now. Signed-off-by: Stephan Gerhold Reviewed-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250217-x1e80100-pwrseq-qcp-v3-1-a0525cc01666@linaro.org Signed-off-by: Bjorn Andersson commit 97bf440d95f1bafd8345739663ad3c04627f1505 Author: Maulik Shah Date: Tue Feb 18 11:21:48 2025 +0530 arm64: dts: qcom: sm8750: Add RPMh sleep stats Add RPMh stats to read low power statistics for various subsystem and SoC sleep modes. Signed-off-by: Maulik Shah Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio # 8750 QRD Link: https://lore.kernel.org/r/20250218-sm8750_stats-v1-1-8902e213f82d@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 27fd3266e8bd615af8ec5e91addac0b1dedc0b29 Author: Krzysztof Kozlowski Date: Wed Feb 19 10:07:51 2025 +0100 arm64: dts: qcom: Correct white-space style There should be exactly one space before and after '=', and one space before '{'. No functional impact. Verified with comparing decompiled DTB (dtx_diff and fdtdump+diff). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250219090751.124267-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 91e3ac15523fda23f5429d641248ab31b0d46fe7 Author: Krzysztof Kozlowski Date: Wed Feb 19 10:07:50 2025 +0100 arm64: dts: qcom: sm8750: Change labels to lower-case DTS coding style expects labels to be lowercase. No functional impact. Verified with comparing decompiled DTB (dtx_diff and fdtdump+diff). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250219090751.124267-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit d0c38cbe3556fea446b9350ec597a8e9c2cdaf36 Author: Luca Weiss Date: Sat Feb 22 14:00:50 2025 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Enable modem Add the necessary supplies and set an appropriete firmware-name for the modem and enable it. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250222-fp3-remoteprocs-firmware-v1-4-237ed21c334a@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 9ab813d5191f61301dbaeaf8e82d21e689b080f4 Author: Luca Weiss Date: Sat Feb 22 14:00:49 2025 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Add firmware-name for adsp & wcnss Set the paths where the device-specific firmware can be found for this device. Fairphone 3 was shipped with secure-boot off so any testkey-signed firmware is accepted. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250222-fp3-remoteprocs-firmware-v1-3-237ed21c334a@lucaweiss.eu Signed-off-by: Bjorn Andersson commit a4600b160eca7f889c4b4a370d42e4619fa5162a Author: Luca Weiss Date: Sat Feb 22 14:00:48 2025 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Add newlines between regulator nodes As is common style nowadays, make sure there's an empty line between regulator subnodes. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250222-fp3-remoteprocs-firmware-v1-2-237ed21c334a@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 09a3840bcb72bcd9b43cbffbb7dedccf85e6d558 Author: Luca Weiss Date: Sat Feb 22 14:00:47 2025 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Move status properties last As is common style nowadays, move the status properties to be the last property of a node. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250222-fp3-remoteprocs-firmware-v1-1-237ed21c334a@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 83934b5d6b1a9664867beb4e822a6f9fa1fac687 Author: Lijuan Gao Date: Fri Feb 21 15:39:57 2025 +0800 arm64: dts: qcom: qcs615: Add Command DB support Command DB is a database in the shared memory of QCOM SoCs, that provides a mapping between resource key and the resource address for a system resource managed by a remote processor. The data is stored in a shared memory region and is loaded by the remote processor. Therefore, enabling Command DB ensures that those resources function properly. Signed-off-by: Lijuan Gao Link: https://lore.kernel.org/r/20250221-add_command_db_support-v1-1-d60acbf913aa@quicinc.com Signed-off-by: Bjorn Andersson commit 37eb85ae550004790c98605762c2e0326a82e160 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:10 2025 +0100 arm64: dts: qcom: sm8250-elish: Switch to undeprecated qcom,calibration-variant The property qcom,ath11k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-13-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit d12ce84c88013cd4ea770d244d44362f691e1690 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:09 2025 +0100 arm64: dts: qcom: sc8280xp: Switch to undeprecated qcom,calibration-variant The property qcom,ath11k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-12-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit fda76284e9b4c4606758fb62cfd81dd57e8f2516 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:08 2025 +0100 arm64: dts: qcom: sa8775p-ride: Switch to undeprecated qcom,calibration-variant The property qcom,ath11k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-11-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit cfbcd6d483dc7203db230cb24c9ee286033682fa Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:07 2025 +0100 arm64: dts: qcom: qcm6490: Switch to undeprecated qcom,calibration-variant The property qcom,ath11k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-10-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit b187df5a0224d2e1b5ab8ea19c98d6ebbe554fe8 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:06 2025 +0100 arm64: dts: qcom: sm8150-hdk: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-9-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit d39d4fd49337be1e8f6c28e4d31344a2124acb57 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:05 2025 +0100 arm64: dts: qcom: sm6115: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-8-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit 020ec05884e97175a181b33eb60d556ceaa32de8 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:04 2025 +0100 arm64: dts: qcom: sda660-ifc6560: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-7-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit 218718e0c2536bc17c1a10eed35e99100bed5b46 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:03 2025 +0100 arm64: dts: qcom: sdm845: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-6-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit 4f8fc2038b3ce9fa1fd52491e774e43bf5e67547 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:02 2025 +0100 arm64: dts: qcom: sc7180: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-5-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit a83356f7ba575f536dd2bf2338cafd0d1d2d51ec Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:01 2025 +0100 arm64: dts: qcom: qrb4210-rb2: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-4-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit 41eeff2fc2292c56592206741b05fde63acef4f0 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:59:00 2025 +0100 arm64: dts: qcom: qrb2210-rb1: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-3-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit f1bf8a943bea70c7432731c11761d161882aeedc Author: Krzysztof Kozlowski Date: Tue Feb 25 10:58:59 2025 +0100 arm64: dts: qcom: msm8998: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-2-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit adbbdcf4b2d6556721b580385ba387baca5c26ee Author: Krzysztof Kozlowski Date: Tue Feb 25 10:58:58 2025 +0100 ARM: dts: qcom: ipq4018: Switch to undeprecated qcom,calibration-variant The property qcom,ath10k-calibration-variant was deprecated in favor of recently introduced generic qcom,calibration-variant, common to all Qualcomm Atheros WiFi bindings. Change will affect out of tree users, like other projects, of this DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250225-dts-qcom-wifi-calibration-v1-1-347e9c72dcfc@linaro.org Signed-off-by: Bjorn Andersson commit c72c7105c82de59fb711f8379843f80b4abef7e3 Author: Aleksandrs Vinarskis Date: Thu Feb 27 00:12:12 2025 +0100 arm64: dts: qcom: x1e80100-qcp: Enable HBR3 on external DPs When no link frequencies are set, msm/dp driver defaults to HBR2 speed. Explicitly list supported frequencies including HBR3/8.1Gbps for all external DisplayPort(s). Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250226231436.16138-5-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 9a49698252b78471a61873b4fe27dfd2e2fe2bad Author: Aleksandrs Vinarskis Date: Thu Feb 27 00:12:11 2025 +0100 arm64: dts: qcom: x1e80100-hp-x14: Enable HBR3 on external DPs When no link frequencies are set, msm/dp driver defaults to HBR2 speed. Explicitly list supported frequencies including HBR3/8.1Gbps for all external DisplayPort(s). Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250226231436.16138-4-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 027dcb3de88dfd1b82f5f712361d216f209110b0 Author: Aleksandrs Vinarskis Date: Thu Feb 27 00:12:10 2025 +0100 arm64: dts: qcom: x1e001de-devkit: Enable HBR3 on external DPs When no link frequencies are set, msm/dp driver defaults to HBR2 speed. Explicitly list supported frequencies including HBR3/8.1Gbps for all external DisplayPort(s). Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250226231436.16138-3-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 01a3d5e3cdc833292bdc80a4320235551083982f Author: Aleksandrs Vinarskis Date: Thu Feb 27 00:12:09 2025 +0100 arm64: dts: qcom: x1e80100-dell-xps13-9345: Enable external DP support Particular laptops comes with two USB Type-C ports, both supporting DP alt mode. Enable output on both of them. Explicitly list supported frequencies including HBR3/8.1Gbps for all external DisplayPort(s). Due to support missing in the USB/DisplayPort combo PHY driver, the external DisplayPort is limited to 2 lanes. Derived from: arm64: dts: qcom: x1e80100-t14s: Add external DP support Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250226231436.16138-2-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson commit 4de3e8d657f2111dd8d45c2ba0eef8b2437b85f2 Author: Nikita Travkin Date: Thu Feb 27 19:26:49 2025 +0500 arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Drop CMA heap Initially added, the cma heap was supposed to help with libcamera swisp, however a mistake was made such that the node was never applied as part of the overlay since the change was added to the overlay root ("/") and not with a reference to the target dtb root ("&{/}"). Moveover libcamera doesn't require CMA heap on Qualcomm platforms anymore as it can now use UDMA buffers instead. Drop the CMA heap node. This change has no effect on the final dtb. This reverts commit d40fd02c1faf8faad57a7579b573bc5be51faabe. Fixes: d40fd02c1faf ("arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add cma heap for libcamera softisp support") Suggested-by: Bryan O'Donoghue Signed-off-by: Nikita Travkin Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20250227-qcom-nonroot-overlays-v2-2-bde44f708cbe@trvn.ru Signed-off-by: Bjorn Andersson commit 2a26a02e668ff101580647221c898d75ed93f8f5 Author: Nikita Travkin Date: Thu Feb 27 19:26:48 2025 +0500 arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Drop CMA heap Initially added, the cma heap was supposed to help with libcamera swisp, however a mistake was made such that the node was never applied as part of the overlay since the change was added to the overlay root ("/") and not with a reference to the target dtb root ("&{/}"). Moveover libcamera doesn't require CMA heap on Qualcomm platforms anymore as it can now use UDMA buffers instead. Drop the CMA heap node. This change has no effect on the final dtb. This reverts commit 99d557cfe4fcf89664762796678e26009aa3bdd9. Fixes: 99d557cfe4fc ("arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add cma heap for libcamera softisp support") Suggested-by: Bryan O'Donoghue Signed-off-by: Nikita Travkin Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20250227-qcom-nonroot-overlays-v2-1-bde44f708cbe@trvn.ru Signed-off-by: Bjorn Andersson commit 06eadce936971dd11279e53b6dfb151804137836 Author: Stephan Gerhold Date: Wed Feb 19 12:36:21 2025 +0100 arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU There are currently two passive trip points defined for the CPU, but no cooling devices are attached to the thermal zones. We don't have support for cpufreq upstream yet, but actually this is redundant anyway because the CPU is throttled automatically when reaching high temperatures. Drop the passive trip points and keep just the critical shutdown as safety measure in case the throttling fails. Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20250219-x1e80100-thermal-fixes-v1-4-d110e44ac3f9@linaro.org Signed-off-by: Bjorn Andersson commit 5ba21fa11f473c9827f378ace8c9f983de9e0287 Author: Stephan Gerhold Date: Wed Feb 19 12:36:20 2025 +0100 arm64: dts: qcom: x1e80100: Add GPU cooling Unlike the CPU, the GPU does not throttle its speed automatically when it reaches high temperatures. With certain high GPU loads it is possible to reach the critical hardware shutdown temperature of 120°C, endangering the hardware and making it impossible to run certain applications. Set up GPU cooling similar to the ACPI tables, by throttling the GPU speed when reaching 95°C and polling every 200ms. Cc: stable@vger.kernel.org Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250219-x1e80100-thermal-fixes-v1-3-d110e44ac3f9@linaro.org Signed-off-by: Bjorn Andersson commit 03f2b8eed73418269a158ccebad5d8d8f2f6daa1 Author: Stephan Gerhold Date: Wed Feb 19 12:36:19 2025 +0100 arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown The firmware configures the TSENS controller with a maximum temperature of 120°C. When reaching that temperature, the hardware automatically triggers a reset of the entire platform. Some of the thermal zones in x1e80100.dtsi use a critical trip point of 125°C. It's impossible to reach those. It's preferable to shut down the system cleanly before reaching the hardware trip point. Make the critical temperature trip points consistent by setting all of them to 115°C and apply a consistent hysteresis. The ACPI tables also specify 115°C as critical shutdown temperature. Cc: stable@vger.kernel.org Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250219-x1e80100-thermal-fixes-v1-2-d110e44ac3f9@linaro.org Signed-off-by: Bjorn Andersson commit 801befff4c827aa72e3698367c5afc18987a6a3f Author: Stephan Gerhold Date: Wed Feb 19 12:36:18 2025 +0100 arm64: dts: qcom: x1e80100: Fix video thermal zone A passive trip point at 125°C is pretty high, this is usually the temperature for the critical shutdown trip point. Also, we don't have any passive cooling devices attached to the video thermal zone. Change this to be a critical trip point, and add a "hot" trip point at 90°C for consistency with the other thermal zones. Cc: stable@vger.kernel.org Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250219-x1e80100-thermal-fixes-v1-1-d110e44ac3f9@linaro.org Signed-off-by: Bjorn Andersson commit f22be5c1dd3e12519e3f3b80c14d10b90be2c2fc Author: Neil Armstrong Date: Thu Feb 27 10:00:33 2025 +0100 arm64: dts: qcom: sm8650: add missing cpu-cfg interconnect path in the mdss node The bindings requires the mdp0-mem and the cpu-cfg interconnect path, add the missing cpu-cfg path to fix the dtbs check error and also to ensure that MDSS has enough bandwidth to let HLOS write config registers. Fixes: 9fa33cbca3d2 ("arm64: dts: qcom: sm8650: correct MDSS interconnects") Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250227-topic-sm8x50-mdss-interconnect-bindings-fix-v5-2-bf6233c6ebe5@linaro.org Signed-off-by: Bjorn Andersson commit 327d489d1ecaf16182952f079cc21f04cf83f967 Author: Neil Armstrong Date: Thu Feb 27 10:00:32 2025 +0100 arm64: dts: qcom: sm8550: add missing cpu-cfg interconnect path in the mdss node The bindings requires the mdp0-mem and the cpu-cfg interconnect path, add the missing cpu-cfg path to fix the dtbs check error and also to ensure that MDSS has enough bandwidth to let HLOS write config registers. Fixes: b8591df49cde ("arm64: dts: qcom: sm8550: correct MDSS interconnects") Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250227-topic-sm8x50-mdss-interconnect-bindings-fix-v5-1-bf6233c6ebe5@linaro.org Signed-off-by: Bjorn Andersson commit fb03174d17ec98e939dac81e29b372c9b568fca9 Author: Krzysztof Kozlowski Date: Tue Feb 25 10:30:51 2025 +0100 arm64: dts: qcom: x1e80100-slim7x: Drop incorrect qcom,ath12k-calibration-variant There is no such property as qcom,ath12k-calibration-variant: neither in the bindings nor in the driver. See dtbs_check: x1e80100-lenovo-yoga-slim7x.dtb: wifi@0: 'qcom,ath12k-calibration-variant' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250225093051.58406-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit cdc117c40537c5babfa7f261360d5a98e434d59e Author: Krzysztof Kozlowski Date: Tue Jan 28 12:53:33 2025 +0100 arm64: dts: qcom: qcs8300: Partially revert "arm64: dts: qcom: qcs8300: add QCrypto nodes" Partially revert commit a86d84409947 ("arm64: dts: qcom: qcs8300: add QCrypto nodes") by dropping the untested QCE device node. Devicetree bindings test failures were reported on mailing list on 16th of January and after two weeks still no fixes: qcs8300-ride.dtb: crypto@1dfa000: compatible: 'oneOf' conditional failed, one must be fixed: ... 'qcom,qcs8300-qce' is not one of ['qcom,ipq4019-qce', 'qcom,sm8150-qce'] Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_JsqL0HzzGXnCD+z4GASeXNsBxrdw8-qyfHj8S+C2ucK6EPQ@mail.gmail.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250128115333.95021-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 92979f12a201c54ea94b8b3c9f0737c33bb45e23 Author: Krzysztof Kozlowski Date: Tue Jan 28 12:53:32 2025 +0100 arm64: dts: qcom: sa8775p: Partially revert "arm64: dts: qcom: sa8775p: add QCrypto nodes" Partially revert commit 7ff3da43ef44 ("arm64: dts: qcom: sa8775p: add QCrypto nodes") by dropping the untested QCE device node. Devicetree bindings test failures were reported on mailing list on 16th of January and after two weeks still no fixes: sa8775p-ride.dtb: crypto@1dfa000: compatible: 'oneOf' conditional failed, one must be fixed: ... 'qcom,sa8775p-qce' is not one of ['qcom,ipq4019-qce', 'qcom,sm8150-qce'] Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_JsqJG_w9jyWjVR=QnPuJganG4uj9+9cEXZ__UAiCw2ZYZZA@mail.gmail.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250128115333.95021-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 0e2a500eff87c710f3947926e274fd83d0cabb02 Author: Alexey Minnekhanov Date: Mon Feb 3 09:34:26 2025 +0300 arm64: dts: qcom: sdm630: Add missing resets to mmc blocks Add resets to eMMC/SD card blocks so linux can properly reset them during initialization. Signed-off-by: Alexey Minnekhanov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203063427.358327-4-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit 7cfc492d0de2b09a0afdcdb5e5c0171a950cbff1 Merge: 61dcbf45110bb3 f95c37c339ab39 Author: Bjorn Andersson Date: Tue Feb 25 22:09:56 2025 -0600 Merge branch '20250203063427.358327-2-alexeymin@postmarketos.org' into arm64-for-6.15 Add SDM660 global clock controller binding update from topic branch, to get access to the missing SDCC reset constants. commit 61dcbf45110bb3c3bfd7c92abaca9fffb84110e0 Author: Neil Armstrong Date: Wed Jan 15 14:44:02 2025 +0100 arm64: dts: qcom: sm8650: add UFS OPP table instead of freq-table-hz property Swich to an OPP table for the UFS frequency scaling instead of the deprecated freq-table-hz property. The Operating Point table will also provide the associated power domain level. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-10-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 2c885d85dff832d9be99093bdae73e77795f0aec Author: Neil Armstrong Date: Wed Jan 15 14:44:01 2025 +0100 arm64: dts: qcom: sm8650: add QUP serial engines OPP tables The QUP Serial Engines requires different power domain level depending on their working frequency, add the required OPP table with the level associated with all possible frequencies. For the "I2C Hub" serial engines, sinse they only support a single Operating Point, only add a single power domain level property. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-9-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 5cddecc3d1dce1e20bb64364cb6cd5d8edf376b3 Author: Neil Armstrong Date: Wed Jan 15 14:44:00 2025 +0100 arm64: dts: qcom: sm8650: add OPP table support to PCIe The PCIe bus interconnect path can be scaled depending on the PCIe link established, add the OPP table with all the possible link speeds and the associated power domain level. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-8-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit e61d8377c7b5e9fa6c4d57a5478118043e94d907 Author: Neil Armstrong Date: Wed Jan 15 14:43:59 2025 +0100 arm64: dts: qcom: sm8650: add USB interconnect paths Add the interconnect paths for the USB controller. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-7-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit a4da40505d72385495ef5d4f1cc8479ab75b95e4 Author: Neil Armstrong Date: Wed Jan 15 14:43:58 2025 +0100 arm64: dts: qcom: sm8650: set CPU interconnect paths as ACTIVE_ONLY In all interconnect paths involving the cpu (MASTER_APPSS_PROC), use the QCOM_ICC_TAG_ACTIVE_ONLY which will only retain the vote if the CPU is online, leaving the firmware disabling the path when the CPUs goes in suspend-idle. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-6-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit ee6dfc9c75d43a2e2b2ea4c5055e31545b2aee83 Author: Neil Armstrong Date: Wed Jan 15 14:43:57 2025 +0100 arm64: dts: qcom: sm8650: use ICC tag for IPA interconnect phandles Use the proper QCOM_ICC_TAG_ define instead of passing 0 in the IPA interconnect paths phandle third argument Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-5-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit ac2b7b1e8432fc758f6cd345e9a2472b269cb1c5 Author: Neil Armstrong Date: Wed Jan 15 14:43:56 2025 +0100 arm64: dts: qcom: sm8550: add QUP serial engines OPP tables The QUP Serial Engines requires different power domain level depending on their working frequency, add the required OPP table with the level associated with all possible frequencies. For the "I2C Hub" serial engines, sinse they only support a single Operating Point, only add a single power domain level property. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-4-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 0acd169330b81036aebd27c025b0a5bb8a77ea4b Author: Neil Armstrong Date: Wed Jan 15 14:43:55 2025 +0100 arm64: dts: qcom: sm8550: add OPP table support to PCIe The PCIe bus interconnect path can be scaled depending on the PCIe link established, add the OPP table with all the possible link speeds and the associated power domain level. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-3-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 48c84d96dcd022de3b445e20d4cdfc96c2b05538 Author: Neil Armstrong Date: Wed Jan 15 14:43:54 2025 +0100 arm64: dts: qcom: sm8550: set CPU interconnect paths as ACTIVE_ONLY In all interconnect paths involving the cpu (MASTER_APPSS_PROC), use the QCOM_ICC_TAG_ACTIVE_ONLY which will only retain the vote if the CPU is online, leaving the firmware disabling the path when the CPUs goes in suspend-idle. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-2-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 54df5e52777e1126862778a2796c3809df85acd7 Author: Neil Armstrong Date: Wed Jan 15 14:43:53 2025 +0100 arm64: dts: qcom: sm8550: use ICC tag for all interconnect phandles Use the proper QCOM_ICC_TAG_ define instead of passing 0 in all interconnect paths phandle third argument. Use QCOM_ICC_TAG_ALWAYS which is the fallback mask if 0 is used as third phandle argument. Signed-off-by: Neil Armstrong Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250115-topic-sm8x50-upstream-dt-icc-update-v1-1-eaa8b10e2af7@linaro.org Signed-off-by: Bjorn Andersson commit 984748d30cd3ce0e11d63b0ba16dcbd61f7b4b9d Author: Konrad Dybcio Date: Sun Feb 2 23:45:52 2025 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Enable the GPU Enable the Adreno GPU and point to the correct ZAP fw path. Signed-off-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20250202-fp5-display-v1-2-f52bf546e38f@fairphone.com Signed-off-by: Bjorn Andersson commit c365a026155ca926f878dee528715be8a02dabc7 Author: Luca Weiss Date: Sun Feb 2 23:45:51 2025 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Enable display Configure the MDSS nodes for the phone and add the panel node. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20250202-fp5-display-v1-1-f52bf546e38f@fairphone.com Signed-off-by: Bjorn Andersson commit 588a6d006d640fde038d794bbf8db99a2cc2646f Author: Danila Tikhonov Date: Mon Feb 3 14:14:29 2025 +0300 arm64: dts: qcom: sm7325-nothing-spacewar: Enable camera EEPROMs Configure the EEPROMs which are found on the different camera sensors on this device. The pull-up regulator for these I2C busses is vreg_cam_vio_1p8, the same supply that powers VCC of all the EEPROMs. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20250203111429.22062-5-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 542b34247f3a5aeb4d094b21522803448005685a Author: Danila Tikhonov Date: Mon Feb 3 14:14:26 2025 +0300 arm64: dts: qcom: sm7325-nothing-spacewar: Add CAM fixed-regulators Two regulators (GPIO 72 & 107) for the IMX766 sensor are missing here. Without a driver, it's unclear if they're extra supplies or pwdn/power GPIOs (labeled "custom" in the downstream kernel). So add only those fixed regulators that are currently predictable for camera sensors, camera EEPROMs and camera actuators. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20250203111429.22062-2-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 30235bb8b0487537ddd7dd4a480c907add6cd19b Author: Neil Armstrong Date: Mon Feb 3 14:23:20 2025 +0100 arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties Remove the remaining polling-delay-passive properties from thermal nodes without a passive trip point. Suggested-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250203-topic-sm8650-thermal-cpu-idle-v4-4-65e35f307301@linaro.org Signed-off-by: Bjorn Andersson commit c516beb248a96f5a93fb4f9a6cb0dda4155eadbb Author: Neil Armstrong Date: Mon Feb 3 14:23:19 2025 +0100 arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points While the CPUs thermal is handled by the LMH, and GPU has a passive cooldowm via the HLOS DCVS, all the other thermal blocks only have hot and critical and no passive/active trip points. Passive or active thermal management for those blocks should be either defined if somehow we can express those in DT or in the board definition if there's an active cooling device available. The tsens MAX_THRESHOLD is set to 120C on those platforms, so set the hot to 110C to leave a chance to HLOS to react and critical to 115C to avoid the monitor thermal shutdown. In the case a passive or active cooling device would be available, the downstream reference implementation uses the 95C "tj" trip point, as we already use for the gpuss thermal blocks. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-sm8650-thermal-cpu-idle-v4-3-65e35f307301@linaro.org Signed-off-by: Bjorn Andersson commit 2250f65b32565eb8b757e89248c75977f370f498 Author: Neil Armstrong Date: Mon Feb 3 14:23:18 2025 +0100 arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU is done from the HLOS, but the GPU can achieve a much higher temperature before failing according the reference downstream implementation. Set higher temperatures in the GPU trip points corresponding to the temperatures provided by Qualcomm in the dowstream source, much closer to the junction temperature and with a higher critical temperature trip in the case the HLOS DCVS cannot handle the temperature surge. The tsens MAX_THRESHOLD is set to 120C on those platforms, so set the hot to 110C to leave a chance to HLOS to react and critical to 115C to avoid the monitor thermal shutdown. Fixes: 497624ed5506 ("arm64: dts: qcom: sm8650: Throttle the GPU when overheating") Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-sm8650-thermal-cpu-idle-v4-2-65e35f307301@linaro.org Signed-off-by: Bjorn Andersson commit 7f9a670396029116424a803d3971ff0e552ff0b3 Author: Neil Armstrong Date: Mon Feb 3 14:23:17 2025 +0100 arm64: dts: qcom: sm8650: drop cpu thermal passive trip points On the SM8650, the dynamic clock and voltage scaling (DCVS) is done in an hardware controlled loop using the LMH and EPSS blocks with constraints and OPPs programmed in the board firmware. Since the Hardware does a better job at maintaining the CPUs temperature in an acceptable range by taking in account more parameters like the die characteristics or other factory fused values, it makes no sense to try and reproduce a similar set of constraints with the Linux cpufreq thermal core. In addition, the tsens IP is responsible for monitoring the temperature across the SoC and the current settings will heavily trigger the tsens UP/LOW interrupts if the CPU temperatures reaches the hardware thermal constraints which are currently defined in the DT. And since the CPUs are not hooked in the thermal trip points, the potential interrupts and calculations are a waste of system resources. Drop the current passive trip points and only leave the critical trip point that will trigger a software system reboot before an hardware thermal shutdown in the allmost impossible case the hardware DCVS cannot handle the temperature surge. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-sm8650-thermal-cpu-idle-v4-1-65e35f307301@linaro.org Signed-off-by: Bjorn Andersson commit f08edb5299166b7c6d4eae439b1d3f81c31ba50e Author: Konrad Dybcio Date: Mon Feb 3 15:43:25 2025 +0100 arm64: dts: qcom: Add X1P42100 SoC and CRD The X1 family is split into two parts: the 10- and 12-core parts are variants of the same silicon with different fusing, whereas the 8-core ones are a separate design. Thankfully, the software interface is only barely different, letting us reuse much of the existing X1 work. Introduce support for the X1P42100 SoC and the CRD based on it, through overlaying some bits. Everything we already support on X1E80100 and friends, minus the GPU, should work as-is. Tested-by: Jens Glathe Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-x1p4_dts-v2-6-72cd4cdc767b@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit fbf5e007588f3f2bace84309b4a0d428ad619322 Author: Konrad Dybcio Date: Mon Feb 3 15:43:24 2025 +0100 arm64: dts: qcom: Commonize X1 CRD DTSI Certain X1 SKUs vary very noticeably, but the CRDs based on them don't. Commonize the existing X1E80100 DTSI to allow reuse. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-x1p4_dts-v2-5-72cd4cdc767b@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 62ca6669d62eb554eb467f2953cabb4238e18823 Author: Konrad Dybcio Date: Mon Feb 3 15:43:23 2025 +0100 arm64: dts: qcom: x1e80100: Wire up PCIe PHY NOCSR resets Asserting the NOCSR reset line keeps the PHY registers in tact. This allows us to avoid programming long tables of magic values in the operating system. Wire up these resets to PCIe PHY4 and 5 (it's there on the others). Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250203-topic-x1p4_dts-v2-4-72cd4cdc767b@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 467284a3097f4348cf227053b53eb1bba2af9ae5 Author: Viken Dadhaniya Date: Mon Feb 24 12:03:38 2025 +0530 arm64: dts: qcom: qcs8300: Add QUPv3 configuration Add DT support for QUPV3 Serial Engines. Co-developed-by: Mukesh Kumar Savaliya Signed-off-by: Mukesh Kumar Savaliya Signed-off-by: Viken Dadhaniya Link: https://lore.kernel.org/r/20250224063338.27306-1-quic_vdadhani@quicinc.com Signed-off-by: Bjorn Andersson commit 017c28788a4caffb14f4895597bdf38ee9fc8f2b Author: Manikanta Mylavarapu Date: Mon Feb 10 17:34:36 2025 +0530 arm64: dts: qcom: ipq5424: Add thermal zone nodes Add thermal zone nodes for sensors present in IPQ5424. Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250210120436.821684-7-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit a61adfe29624bd1a4530046e76808ed60927b9ad Author: Manikanta Mylavarapu Date: Mon Feb 10 17:34:35 2025 +0530 arm64: dts: qcom: ipq5424: Add tsens node IPQ5424 has tsens v2.3.3 peripheral. This patch adds the tsens node with nvmem cells for calibration data. Reviewed-by: Konrad Dybcio Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250210120436.821684-6-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 9b341f34293f92096044431957a8dbd6793c8aa6 Author: Praveenkumar I Date: Mon Feb 10 17:34:34 2025 +0530 arm64: dts: qcom: ipq5332: Add thermal zone nodes This patch adds thermal zone nodes for sensors present in IPQ5332. Reviewed-by: Dmitry Baryshkov Signed-off-by: Praveenkumar I Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250210120436.821684-5-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit 3fe12c798f9abf26933b35b91d7aaaa77349c63c Author: Praveenkumar I Date: Mon Feb 10 17:34:33 2025 +0530 arm64: dts: qcom: ipq5332: Add tsens node IPQ5332 has tsens v2.3.3 peripheral. This patch adds the tsens node with nvmem cells for calibration data. Reviewed-by: Konrad Dybcio Signed-off-by: Praveenkumar I Signed-off-by: Manikanta Mylavarapu Link: https://lore.kernel.org/r/20250210120436.821684-4-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson commit a566fb9ba8ffecb56c50729390a9ea076f5c9532 Author: Chukun Pan Date: Mon Feb 10 15:01:22 2025 +0800 arm64: dts: qcom: ipq6018: add LDOA2 regulator Add LDOA2 regulator from MP5496 to support SDCC voltage scaling. Suggested-by: Robert Marko Signed-off-by: Chukun Pan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250210070122.208842-6-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit e60f872c2dc4c1d9227977c8714373fe6328699c Author: Chukun Pan Date: Mon Feb 10 15:01:21 2025 +0800 arm64: dts: qcom: ipq6018: rename labels of mp5496 regulator Change the labels of mp5496 regulator from ipq6018 to mp5496. Suggested-by: Konrad Dybcio Suggested-by: Dmitry Baryshkov Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20250210070122.208842-5-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit 0c4c0f14b7d704bcb728d018a74788771dc9286b Author: Chukun Pan Date: Mon Feb 10 15:01:20 2025 +0800 arm64: dts: qcom: ipq6018: move mp5496 regulator out of soc dtsi Some IPQ60xx SoCs don't come with the mp5496 pmic chip. The mp5496 pmic was never part of the IPQ60xx SoC, it's optional, so we moved it out of the soc dtsi. Signed-off-by: Chukun Pan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250210070122.208842-4-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit a96e765a7b3f64429f7eec3471a2093355ab041e Author: Chukun Pan Date: Mon Feb 10 15:01:19 2025 +0800 arm64: dts: qcom: ipq6018: add 1.5GHz CPU Frequency The early version of IPQ6000 (SoC id: IPQ6018, SBL version: BOOT.XF.0.3-00077-IPQ60xxLZB-2) and IPQ6005 SoCs can reach a max frequency of 1.5GHz, so add this CPU frequency. Signed-off-by: Chukun Pan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250210070122.208842-3-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit 144230e5840c09984ad743c3df9de5fb443159a9 Author: Chukun Pan Date: Mon Feb 10 15:01:18 2025 +0800 arm64: dts: qcom: ipq6018: add 1.2GHz CPU Frequency The final version of IPQ6000 (SoC id: IPQ6000, SBL version: BOOT.XF.0.3-00086-IPQ60xxLZB-1) has a max design frequency of 1.2GHz, so add this CPU frequency. Signed-off-by: Chukun Pan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250210070122.208842-2-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit bd3801a8d44e0c538f3ffe011274a5c8a9a0a629 Author: Cheng Jiang Date: Fri Jan 10 14:39:14 2025 +0800 arm64: dts: qcom: sa8775p-ride: Add firmware-name in BT node The sa8775p-ride platform uses the QCA6698 Bluetooth chip. While the QCA6698 shares the same IP core as the WCN6855, it has different RF components and RAM sizes, requiring new firmware files. Use the firmware-name property to specify the NVM and rampatch firmware to load. Signed-off-by: Cheng Jiang Reviewed-by: Zijun Hu Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250110063914.28001-2-quic_chejiang@quicinc.com Signed-off-by: Bjorn Andersson commit 45bd6ff900cfe5038e2718a900f153ded3fa5392 Author: Mark Kettenis Date: Thu Jan 9 21:52:31 2025 +0100 arm64: dts: qcom: x1e80100: Mark usb_2 as dma-coherent Make this USB controller consistent with the others on this platform. Fixes: 4af46b7bd66f ("arm64: dts: qcom: x1e80100: Add USB nodes") Signed-off-by: Mark Kettenis Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250109205232.92336-1-kettenis@openbsd.org Signed-off-by: Bjorn Andersson commit 341e66232128b674300d4474557c23bb32b7aeba Author: Dmitry Baryshkov Date: Sat Feb 22 02:43:05 2025 +0200 arm64: dts: qcom: qrb5165-rb5: enable sensors DSP Enable SLPI, sensors DSP, on the Qualcomm Robotics RB5 platform. The firmware for the DSP is a part of linux-firmware repository. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250222-rb3-rb5-slpi-v1-2-6739be1684b6@linaro.org Signed-off-by: Bjorn Andersson commit 7373610dde49566fe091545aa0b753cc5e34116d Author: Dmitry Baryshkov Date: Sat Feb 22 02:43:04 2025 +0200 arm64: dts: qcom: sdm845-db845c: enable sensors DSP Enable SLPI, sensors DSP, on the Qualcomm Robotics RB3 platform. The firmware for the DSP is a part of linux-firmware repository. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250222-rb3-rb5-slpi-v1-1-6739be1684b6@linaro.org Signed-off-by: Bjorn Andersson commit 5429861bdc33bdc37697909b1f62b1214cd335a9 Author: Pengyu Luo Date: Sun Feb 23 19:01:51 2025 +0800 arm64: dts: qcom: sc8280xp: Fix clock for spi0 to spi7 Enabling spi6 caused boot loop on my device(Huawei Matebook E Go), &spi6 { pinctrl-0 = <&spi6_default>; pinctrl-names = "default"; status = "okay"; }; After looking into this, I found the clocks for spi0 to spi7 are wrong, we can derive the correct clocks from the regular pattern between spi8 to spi15, spi16 to spi23. Or we can verify it according to the hex file of BSRC_QSPI.bin(From windows driver qcspi8280.cab) 000035d0: 0700 4445 5649 4345 0001 000a 005c 5f53 ..DEVICE.....\_S 000035e0: 422e 5350 4937 0003 0076 0001 000a 0043 B.SPI7...v.....C 000035f0: 4f4d 504f 4e45 4e54 0000 0008 0000 0000 OMPONENT........ 00003600: 0000 0000 0003 0017 0001 0007 0046 5354 .............FST 00003610: 4154 4500 0000 0800 0000 0000 0000 0000 ATE............. 00003620: 0300 3d00 0100 1400 4449 5343 4f56 4552 ..=.....DISCOVER 00003630: 4142 4c45 5f50 5354 4154 4500 0100 0600 ABLE_PSTATE..... 00003640: 434c 4f43 4b00 0100 1700 6763 635f 7175 CLOCK.....gcc_qu 00003650: 7076 335f 7772 6170 305f 7336 5f63 6c6b pv3_wrap0_s6_clk Signed-off-by: Pengyu Luo Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250223110152.47192-1-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson commit 9221ec2a65bc8beabb28fcbd9a3c53e743633b3f Author: Tingguo Cheng Date: Wed Jan 8 19:00:18 2025 +0800 arm64: dts: qcom: qcs8300-ride: Enable PMIC peripherals Enable PMIC and PMIC peripherals for qcs8300-ride board. The qcs8 300-ride uses 2 pmics(pmm8620au:0,pmm8650au:1) on the board, which are variants of pmm8654au used on sa8775p/qcs9100 -ride(4x pmics). Reviewed-by: Dmitry Baryshkov Signed-off-by: Tingguo Cheng Link: https://lore.kernel.org/r/20250108-adds-spmi-pmic-peripherals-for-qcs8300-v3-2-ee94642279ff@quicinc.com Signed-off-by: Bjorn Andersson commit 8d6a7321514964ca2814edc6232ae47122874a5e Author: Tingguo Cheng Date: Wed Jan 8 19:00:17 2025 +0800 arm64: dts: qcom: qcs8300: Adds SPMI support Add the SPMI bus arbiter(Version:5.2.0) node for QCS8300 SoC which connected with PMICs on QCS8300 boards. Reviewed-by: Dmitry Baryshkov Signed-off-by: Tingguo Cheng Link: https://lore.kernel.org/r/20250108-adds-spmi-pmic-peripherals-for-qcs8300-v3-1-ee94642279ff@quicinc.com Signed-off-by: Bjorn Andersson commit 0a05ddb42ea942b21c7459f1b80d68508fea225e Author: Sanjay Chitroda Date: Mon Feb 3 13:30:59 2025 +0530 ARM: dts: qcom: Fix indentation errors Corrected indentation issues in the qcom devicetree files as identified by ./scripts/checkpatch.pl. Signed-off-by: Sanjay Chitroda Link: https://lore.kernel.org/r/40fc9c914f5972decbd6d639396d65bf080d3ceb.1738568609.git.quic_ckantibh@quicinc.com Signed-off-by: Bjorn Andersson commit 44ebb21f6080ec0d6492a01eb3d2a125655fbb51 Author: Wojciech Slenska Date: Tue Nov 12 13:46:49 2024 +0100 arm64: dts: qcom: qcm2290: Add uart3 node Add node to support uart3. Signed-off-by: Wojciech Slenska Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20241112124651.215537-1-wojciech.slenska@gmail.com Signed-off-by: Bjorn Andersson commit 914d16b4a9c4569cc8091a1dfda432dab2fcb9d1 Author: Janaki Ramaiah Thota Date: Fri Feb 21 22:40:14 2025 +0530 arm64: dts: qcom: qcs6490-rb3gen2: add and enable BT node Add the PMU node for WCN6750 present on the qcs6490-rb3gen2 board and assign its power outputs to the Bluetooth module. In WCN6750 module sw_ctrl and wifi-enable pins are handled in the wifi controller firmware. Therefore, it is not required to have those pins' entries in the PMU node. Signed-off-by: Janaki Ramaiah Thota Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250221171014.120946-2-quic_janathot@quicinc.com Signed-off-by: Bjorn Andersson commit c24db2c178578ab069dba8be81ef278854bad74f Author: Neil Armstrong Date: Tue Feb 11 13:56:39 2025 +0100 arm64: dts: qcom: sm8650: add cpu OPP table with DDR, LLCC & L3 bandwidths Add the OPP tables for each CPU clusters (cpu0-1, cpu2-3-4, cpu5-6 & cpu7) to permit scaling the Last Level Cache Controller (LLCC), DDR and L3 cache frequency by aggregating bandwidth requests of all CPU core with referenc to the current OPP they are configured in by the LMH/EPSS hardware. The effect is a proper caches & DDR frequency scaling when CPU cores changes frequency. The OPP tables were built using the downstream memlat ddr, llcc & l3 tables for each cluster types with the actual EPSS cpufreq LUT tables from running HDK and QRD devices. The cpu2 and cpu5 tables are similar but must be kept separate to take in account that they define OPP for shared CPUs of two different clusters that can scale separately, thus vote different bandwidths. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250211-topic-sm8650-ddr-bw-scaling-v2-3-a0c950540e68@linaro.org Signed-off-by: Bjorn Andersson commit c9658c3963b8a5ebe488acfa2609fc641a126b60 Author: Neil Armstrong Date: Tue Feb 11 13:56:38 2025 +0100 arm64: dts: qcom: sm8650: add cpu interconnect nodes Add the interconnect entry for each cpu, with 3 different paths: - CPU to Last Level Cache Controller (LLCC) - Last Level Cache Controller (LLCC) to DDR - L3 Cache from CPU to DDR interface Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20250211-topic-sm8650-ddr-bw-scaling-v2-2-a0c950540e68@linaro.org Signed-off-by: Bjorn Andersson commit 62a770da5327910233ff0b0e1989e14feb3d766e Author: Neil Armstrong Date: Tue Feb 11 13:56:37 2025 +0100 arm64: dts: qcom: sm8650: add OSM L3 node Add the OSC L3 Cache controller node. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250211-topic-sm8650-ddr-bw-scaling-v2-1-a0c950540e68@linaro.org Signed-off-by: Bjorn Andersson commit 97e05bb2253db34fc0971e87f523a0f1d4cf14c2 Author: Rajendra Nayak Date: Wed Feb 12 15:31:36 2025 +0200 arm64: dts: qcom: x1e80100: Add the watchdog device The X Elite implements Server Base System Architecture (SBSA) specification compliant generic watchdog. Describe it. Signed-off-by: Rajendra Nayak Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20250212-x1e80100-add-watchdog-v2-1-a73897f0dad5@linaro.org Signed-off-by: Bjorn Andersson commit a9ca8e5c6379f00efbfbccd873ff66b0f0c46873 Author: Rakesh Kota Date: Wed Feb 12 17:03:42 2025 +0530 arm64: dts: qcom: qcs6490-rb3gen2: Add vadc and adc-tm channels Add support for vadc and adc-tm channels which are used for monitoring thermistors present on the platform. - Add the necessary includes for qcom,spmi-adc7-pm7325 and qcom,spmi-adc7-pmk8350. - Add thermal zones for quiet-thermal, sdm-skin-thermal, and xo-thermal, and define their polling delays and thermal sensors. - Configure the pm7325_temp_alarm node to use the pmk8350_vadc channel for thermal monitoring. - Configure the pmk8350_adc_tm node to enable its thermal sensors and define their registers and settings. - Configure the pmk8350_vadc node to define its channels and settings Signed-off-by: Rakesh Kota Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250212113342.873086-1-quic_kotarake@quicinc.com Signed-off-by: Bjorn Andersson commit dbef257ab7fabc845fe359cbe74b08d3b590550e Author: Thorsten Blum Date: Wed Feb 19 12:48:00 2025 +0100 xtensa: ptrace: Remove zero-length alignment array Use a compiler attribute to align the areg field to 16 bytes instead of using a zero-length alignment array. Signed-off-by: Thorsten Blum Message-Id: <20250219114759.20110-2-thorsten.blum@linux.dev> Signed-off-by: Max Filippov commit 60a2c9cc15825fd0016a622fe7a3b2838abc32f5 Author: Pengyu Luo Date: Sat Jan 11 16:32:08 2025 +0800 arm64: dts: qcom: sc8280xp-pmics: Add more temp-alarm devices There are 4 Qualcomm PMIC Die Temp Alarm Sensor Devices under windows os, in separate dt files, pm8350c and pmr735a have already support temp alarm, add the rest 2 devices for sc8280xp-pmic. Temperature trip points are from dsdt(Temp. in tenths of degrees Kelvin). example: Name (TPSV, 0x0E60) // 0x0E60 - 2730 = 950 Method (_PSV, 0, NotSerialized) // _PSV: Passive Temperature { Return (\_SB.TZ15.TPSV) } Name (TCRT, 0x0F28) // 0X0F28 - 2730 = 1150 Method (_CRT, 0, NotSerialized) // _CRT: Critical Temperature { Return (\_SB.TZ15.TCRT) } Signed-off-by: Pengyu Luo Link: https://lore.kernel.org/r/20250111083209.262269-2-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson commit 18ecea8e04d8a259625a1f44c41a5d2c4b552d33 Author: Pengyu Luo Date: Sat Jan 11 16:32:07 2025 +0800 arm64: dts: qcom: sc8280xp-pmics: Fix slave ID in interrupts configuration According to the binding for qcom,spmi-pmic-arb, the cell 1 should be slave id, the slave id of pmc8280_2 is 3. Signed-off-by: Pengyu Luo Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250111083209.262269-1-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson commit 7017524e39dbf6ba42c34b06ec36c99859ffe361 Author: Konrad Dybcio Date: Sat Jan 11 17:54:19 2025 +0100 arm64: dts: qcom: x1e80100: Set CPU interconnect paths as ACTIVE_ONLY There is no use wasting power on keeping the links between the CPU and something else online when the CPUs are online. Change the interconnect tag for such paths, so that RPMh is requested to automatically clock-gate those when possible. Keeping these paths online is also a potential power collapse blocker, however this commit alone doesn't magically fix all the remaining TODOs related to suspend. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250111-topic-x1e_fixups-v1-2-77dc39237c12@oss.qualcomm.com Signed-off-by: Bjorn Andersson commit 52b70e5b605c38996b74788a140702e69f34d2e1 Author: Rob Herring (Arm) Date: Tue Dec 31 10:14:23 2024 -0600 microblaze: Use of_property_present() for non-boolean properties The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20241231161424.214934-1-robh@kernel.org Signed-off-by: Michal Simek